pspp-1.0.1/0000755000175000017500000000000013150620334007471 500000000000000pspp-1.0.1/COPYING0000644000175000017500000010437412470242642010463 00000000000000 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 . pspp-1.0.1/package.m40000644000175000017500000000053413150617737011265 00000000000000# Signature of the current package. m4_define([AT_PACKAGE_NAME], [GNU PSPP]) m4_define([AT_PACKAGE_TARNAME], [pspp]) m4_define([AT_PACKAGE_VERSION], [1.0.1]) m4_define([AT_PACKAGE_STRING], [GNU PSPP 1.0.1]) m4_define([AT_PACKAGE_BUGREPORT], [bug-gnu-pspp@gnu.org]) m4_define([AT_PACKAGE_URL], [http://www.gnu.org/software/pspp/]) pspp-1.0.1/m4/0000755000175000017500000000000013150620332010007 500000000000000pspp-1.0.1/m4/libtool.m40000644000175000017500000106011113143642674011654 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 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. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # 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 ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl 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 # 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 _LT_CC_BASENAME([$compiler]) # 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 _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify 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' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [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. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### 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 _LT_PROG_LTMAIN # 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 '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # 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 ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl 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* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl 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* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [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" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) 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" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_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=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="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}" _LT_TAGVAR(module_expsym_cmds, $1)="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}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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 "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) 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 AC_TRY_EVAL(ac_compile); 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 '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); 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*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); 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*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*) 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" ;; powerpcle-*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*) 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" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) 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 ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) 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" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # 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 \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # 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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" 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>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 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; ;; mint*) # On MiNT this can take a long time and run out of memory. 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 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; 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" && \ test undefined != "$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"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$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 ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "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 /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl 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 AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; 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" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) 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 _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 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 "$_lt_compiler_boilerplate" | $SED '/^$/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_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $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* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) 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 AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [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]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != 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, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = 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 _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) 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" AC_MSG_RESULT([yes]) 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" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # 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 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # 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; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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=`func_echo_all "$lib" | $SED '\''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 # correct to gnu/linux during the next big refactor 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,$cc_basename in yes,*) # gcc 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}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; 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 dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. 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 # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # 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' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # 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`' m4_if([$1], [],[ 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 # correct to gnu/linux during the next big refactor 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 ;; 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[[23]].*) 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 ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" 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=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 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' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor 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 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # 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 # 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;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $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' ;; netbsdelf*-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 shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 # correct to gnu/linux during the next big refactor 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 AC_MSG_RESULT([$dynamic_linker]) 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 _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[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]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [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 dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" 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]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) 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 AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [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 &1 /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 # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 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 ;; haiku*) 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])(-bit)?( [LM]SB)? 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 glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) 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 ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi 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 _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [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]) 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 "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # 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};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /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 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # 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 AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && 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 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #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. */ LT@&t@_DLSYM_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_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 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 ]) 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 AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | 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 m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; 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*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | 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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-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 m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; 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_TAGVAR(lt_prog_compiler_pic, $1)='-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_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # 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 # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # 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'. _LT_TAGVAR(exclude_expsyms, $1)=['_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. dnl Note also adjust exclude_expsyms for C++ above. 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 ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = 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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[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 _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, 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 install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$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)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$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... _LT_TAGVAR(archive_expsym_cmds, $1)='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 _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='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 | kopensolaris*-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=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$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 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='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* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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 _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$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. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=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 # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$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. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${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 _LT_TAGVAR(hardcode_direct, $1)=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 _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no 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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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. _LT_TAGVAR(always_export_symbols, $1)=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. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$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. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${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. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$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)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-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. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # 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. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=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. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=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*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${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. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='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 "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${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='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='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}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=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. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$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. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) 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. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [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]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$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);}' _LT_TAG_COMPILER # 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 _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) 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 AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # 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(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; 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 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 case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac 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. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = 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 _LT_TAGVAR(hardcode_direct, $1)=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 _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= 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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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. _LT_TAGVAR(always_export_symbols, $1)=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. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$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. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${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. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$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 ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # 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. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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... _LT_TAGVAR(archive_expsym_cmds, $1)='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 -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${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. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='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' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=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'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; 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. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf 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). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) 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 AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) 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 AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # 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 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # 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}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS pspp-1.0.1/m4/ltoptions.m40000644000175000017500000003007313143642674012246 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [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], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [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], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [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], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) pspp-1.0.1/m4/ltsugar.m40000644000175000017500000001042413143642674011672 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) pspp-1.0.1/m4/lt~obsolete.m40000644000175000017500000001375613143642675012577 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) pspp-1.0.1/m4/ltversion.m40000644000175000017500000000126213143642675012237 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) pspp-1.0.1/TODO0000644000175000017500000000346512135546033010116 00000000000000warning: `bank.sav' near offset 0x500: Integer format indicated by system file (1) differs from expected (2). http://www.uccs.edu/~faculty/lbecker/SPSS/data/bank.sav $FL2@(#) SPSS DATA FILE SPSS for Unix Release 5.0 (SCO UNIX To fix before merging --------------------- Moving the focus to a different top-level window, then back to the datasheet or variable sheet window, causes editing of the current cell to stop. One must click again to start editing again. Other bugs ---------- If you resize the columns on the variable view, for example the Type column, such that it is narrower than default, the button gets cut, before the label. This causes the startup condition to look odd in locales with longer than normal labels. For example a German locale, which says "Numerisch" and then there is half a button to the right. Switching between Data and Variable view causes the Toolbar to be redrawn. I guess that's ok. But it redraws in a funny way. It seems to redraw, then insert the buttons one by one, redrawing after each. Looks distracting. (Reported by John Darrington.) The case buttons at the head of each row in the data sheet should not scroll with the rest of the row. (Reported by John Darrington.) The space to the right of the "new variable" column in the data sheet doesn't look like the SPSS sheet or like a normal spreadsheet. (Reported by John Darrington and Michel Boaventura.) I think a solid line or some kind of separator beneath the data sheet's entry/label hbox would make the appearance nicer. (Reported by John Darrington and Michel Boaventura.) If I click on Insert Case in the data sheet, the new case assumes the value of the cell which is currently selected. It should have all values empty. This happens only on Windows. (Reported by John Darrington.) Large copies hang in the data sheet. pspp-1.0.1/glade/0000755000175000017500000000000013150620333010544 500000000000000pspp-1.0.1/glade/psppire.xml0000644000175000017500000002374513137223525012712 00000000000000 pspp-1.0.1/glade/automake.mk0000644000175000017500000000472713137223525012644 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- module_LTLIBRARIES = libglade-psppire.la moduledir = `pkg-config --variable=moduledir gladeui-2.0` catalogdir = `pkg-config --variable=catalogdir gladeui-2.0` pixmapdir = `pkg-config --variable=pixmapdir gladeui-2.0` small_pixmapdir = $(pixmapdir)/hicolor/16x16/actions large_pixmapdir = $(pixmapdir)/hicolor/22x22/actions # format.c for psppire-value-entry.c libglade_psppire_la_SOURCES = \ src/ui/gui/helper.c \ src/ui/gui/dialog-common.c \ src/ui/gui/psppire-var-ptr.c \ src/data/format.c \ src/ui/gui/psppire-format.c \ src/data/value-labels.c \ src/ui/gui/psppire-conf.c \ src/ui/gui/psppire-acr.c \ src/ui/gui/psppire-buttonbox.c \ src/ui/gui/psppire-dialog.c \ src/ui/gui/psppire-keypad.c \ src/ui/gui/psppire-dictview.c \ src/ui/gui/psppire-selector.c \ src/ui/gui/psppire-select-dest.c \ src/ui/gui/psppire-var-view.c \ src/ui/gui/psppire-checkbox-treeview.c \ src/ui/gui/psppire-val-chooser.c \ src/ui/gui/psppire-value-entry.c \ src/ui/gui/psppire-window-base.c dist_catalog_DATA = \ glade/psppire.xml dist_small_pixmap_DATA = \ glade/icons/16x16/widget-psppire-psppire-acr.png \ glade/icons/16x16/widget-psppire-psppire-dialog.png \ glade/icons/16x16/widget-psppire-psppire-keypad.png \ glade/icons/16x16/widget-psppire-psppire-selector.png dist_large_pixmap_DATA = \ glade/icons/22x22/widget-psppire-psppire-acr.png \ glade/icons/22x22/widget-psppire-psppire-dialog.png \ glade/icons/22x22/widget-psppire-psppire-keypad.png \ glade/icons/22x22/widget-psppire-psppire-selector.png libglade_psppire_la_CFLAGS = $(GLADE_UI_CFLAGS) $(GLADE_CFLAGS) \ $(GTKSOURCEVIEW_CFLAGS) -I $(top_srcdir)/src/ui/gui -DDEBUGGING libglade_psppire_la_LIBADD = gl/libgl.la pspp-1.0.1/glade/icons/0000755000175000017500000000000013150620332011656 500000000000000pspp-1.0.1/glade/icons/22x22/0000755000175000017500000000000013150620332012435 500000000000000pspp-1.0.1/glade/icons/22x22/widget-psppire-psppire-selector.png0000644000175000017500000000020612541563522021334 00000000000000PNG  IHDRĴl;MIDAT8풹 0CĎ)I&t\G5 n('gq ,V:>g*ZGߍVVIENDB`pspp-1.0.1/glade/icons/22x22/widget-psppire-psppire-keypad.png0000644000175000017500000000017012541563522020771 00000000000000PNG  IHDRĴl;?IDAT8c Oc``@]DF``&&&QGhF%Yj8aIENDB`pspp-1.0.1/glade/icons/22x22/widget-psppire-psppire-acr.png0000644000175000017500000000037312541563522020266 00000000000000PNG  IHDRĴl;bKGD pHYs  tIME  UIDAT8UA c'/7. !$E4a݁5$g+n^Fp5A"c sX7K+ x&6c*hfw$XӊQhZ]6ڭڱTf1A~]zIENDB`pspp-1.0.1/glade/icons/22x22/widget-psppire-psppire-dialog.png0000644000175000017500000000043312541563522020755 00000000000000PNG  IHDRĴl;IDAT8UA 0RE)IKn^,AB> JCQc [& D2r3!Ix3ymUU0 >i$o). ʲ J5&f?!^snx-ho1I|)shHJ 9|YhllZ/,˦ k-1u]m!dm;;oNY^P̑DJ J94M71jR{t5mx'Sډ@IENDB`pspp-1.0.1/glade/icons/16x16/0000755000175000017500000000000013150620332012443 500000000000000pspp-1.0.1/glade/icons/16x16/widget-psppire-psppire-selector.png0000644000175000017500000000017412541563522021346 00000000000000PNG  IHDRaCIDAT8c` <<xxb3b3rJF d^'(h@`!V'./43HN:IENDB`pspp-1.0.1/glade/icons/16x16/widget-psppire-psppire-keypad.png0000644000175000017500000000016012541563522020776 00000000000000PNG  IHDRa7IDAT8c Oc``@HgHcb )2a4GZHQvej1K-IENDB`pspp-1.0.1/glade/icons/16x16/widget-psppire-psppire-acr.png0000644000175000017500000000063612541563522020276 00000000000000PNG  IHDRabKGD pHYs  tIME ;yy+IDAT8˥S@=n!"ŀ aM VOm Fa@b1E U` )ǜs5$m;\.?ĶpAJ9 }Bd9NSH@JfJJ)e8mIRJ8ZV4UU i ˲=,yjUJM;cR?u Z,{i_q"as&n9u2(2׳C4UCJ zy(b3Oq {CPIENDB`pspp-1.0.1/glade/icons/16x16/widget-psppire-psppire-dialog.png0000644000175000017500000000032412541563522020762 00000000000000PNG  IHDRaIDAT8ݓ ͙/zE ӹò9RA.wˑ|ycԵHjd J))q)xe9<2֐Ժ")I23H̾Bn=c X  [4MIENDB`pspp-1.0.1/tests/0000755000175000017500000000000013150620333010632 500000000000000pspp-1.0.1/tests/math/0000755000175000017500000000000013150620333011563 500000000000000pspp-1.0.1/tests/math/chart-get-scale-test.c0000644000175000017500000000453313137223525015603 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include "libpspp/compiler.h" #include "math/chart-geometry.h" #include #include #include #if 0 static void dump_scale (const double low, const double interval, int n_ticks) { int i; double tick = low; for (i = 0; i <= n_ticks; ++i) { printf ("Tick %d: %g\n", i, tick); tick += interval; } } #endif static void test_range (double low, double high) { int n_ticks = 0; double interval; double lower; chart_get_scale (high, low, &lower, &interval, &n_ticks); if ((high - low) < 10 * DBL_MIN){ assert (n_ticks == 0); assert (lower == low); assert (interval <= 10 * DBL_MIN); } else assert (n_ticks > 4); assert (n_ticks <= 10); #if 0 printf("%s: high: %lg, low %lg, interval: %lg, nticks: %d\n", __FUNCTION__, high, low, interval, n_ticks); dump_scale (lower, interval, n_ticks); #endif if ((high - low) > 10 * DBL_MIN) { assert (lower <= low); assert (lower + interval > low); assert (lower + n_ticks * interval < high); assert (lower + (n_ticks + 1) * interval >= high); } } int main (int argc UNUSED, char **argv UNUSED) { test_range (0, 0); test_range (5, 5); test_range (-5, -5); test_range (0, 7); test_range (0.2, 11); test_range (-0.2, 11); test_range (-10, 0.2); test_range (-10, -0.2); test_range (-10000, 10003); test_range (50042,50053); test_range (-50010, -49999); test_range (0.000100002, 0.000100010); test_range (102, 50030); test_range (0.00102, 0.0050030); return 0; } pspp-1.0.1/tests/math/chart-get-ticks-format-test.c0000644000175000017500000000540512537363615017126 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "math/chart-geometry.h" #include "libpspp/compiler.h" struct range { double lower; double interval; int nticks; }; struct range tv[] = { { 1000.0, 10.0, 10}, { 10000.0, 10.0, 10}, { 100000.0, 10.0, 10}, { 1000000.0, 10.0, 10}, { 10000000.0, 10.0, 10}, { 100000000.0, 10.0, 10}, { 0.1, 0.01, 10}, { 0.01, 0.001, 10}, { 0.001, 0.0001, 10}, { 0.0001, 0.00001, 10}, { 0.00001, 0.0000001, 10}, { 0.0000001, 0.00000001, 10}, { -5.0, 1.0, 10}, { -5.0, 0.5, 10}, { -5.0, 0.2, 9}, { -5.0, 2.0, 10}, { -0.5, 0.1, 9}, { 0.975E9, 0.005E9, 9}, { 0.970E9, 0.01E9, 9}, { -4E7, 1E7, 9}, { -3E7, 0.5E7, 9}, { 1.001E-95, 0.0002E-95, 10}, { 1.001E98, 0.0002E98, 10}, { 5984, 0.00001, 10}, { 3E33, 1E-22, 10}, { 3E33, 1000, 10}, { 0.1, 2E-42, 10}, { 0.0, 0.0, -1} }; int main (int argc UNUSED, char **argv UNUSED) { char *fs; double scale; int i = 0; double lower, interval; int nticks; for(i=0;tv[i].nticks > 0;i++) { lower = tv[i].lower; interval = tv[i].interval; nticks = tv[i].nticks; fs = chart_get_ticks_format (lower, interval, nticks, &scale); printf("lower: %lg, interval: %lg, nticks: %d, fs: %s, scale: %lg, ex: ", lower, interval, nticks, fs, scale); printf(fs,(lower + 3 * interval)*scale); printf(", ex 2: "); printf(fs,(lower + 4 * interval)*scale); printf("\n"); free(fs); } return 0; } pspp-1.0.1/tests/math/chart-geometry.at0000644000175000017500000000761213137223525015000 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([Chart Geometry]) AT_SETUP([Chart Scale]) AT_CHECK([../../math/chart-get-scale-test], [0], [ignore]) AT_CLEANUP AT_SETUP([Chart Ticks Format]) AT_CHECK([../../math/chart-get-ticks-format-test], [0], [dnl lower: 1000, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 1030, ex 2: 1040 lower: 10000, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 10030, ex 2: 10040 lower: 100000, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 100030, ex 2: 100040 lower: 1e+06, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 1000030, ex 2: 1000040 lower: 1e+07, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 10000030, ex 2: 10000040 lower: 1e+08, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 100000030, ex 2: 100000040 lower: 0.1, interval: 0.01, nticks: 10, fs: %.2lf, scale: 1, ex: 0.13, ex 2: 0.14 lower: 0.01, interval: 0.001, nticks: 10, fs: %.3lf, scale: 1, ex: 0.013, ex 2: 0.014 lower: 0.001, interval: 0.0001, nticks: 10, fs: %.4lf, scale: 1, ex: 0.0013, ex 2: 0.0014 lower: 0.0001, interval: 1e-05, nticks: 10, fs: %.1lf×10-4, scale: 10000, ex: 1.3×10-4, ex 2: 1.4×10-4 lower: 1e-05, interval: 1e-07, nticks: 10, fs: %.2lf×10-5, scale: 100000, ex: 1.03×10-5, ex 2: 1.04×10-5 lower: 1e-07, interval: 1e-08, nticks: 10, fs: %.1lf×10-7, scale: 1e+07, ex: 1.3×10-7, ex 2: 1.4×10-7 lower: -5, interval: 1, nticks: 10, fs: %.0lf, scale: 1, ex: -2, ex 2: -1 lower: -5, interval: 0.5, nticks: 10, fs: %.1lf, scale: 1, ex: -3.5, ex 2: -3.0 lower: -5, interval: 0.2, nticks: 9, fs: %.1lf, scale: 1, ex: -4.4, ex 2: -4.2 lower: -5, interval: 2, nticks: 10, fs: %.0lf, scale: 1, ex: 1, ex 2: 3 lower: -0.5, interval: 0.1, nticks: 9, fs: %.1lf, scale: 1, ex: -0.2, ex 2: -0.1 lower: 9.75e+08, interval: 5e+06, nticks: 9, fs: %.3lf×109, scale: 1e-09, ex: 0.990×109, ex 2: 0.995×109 lower: 9.7e+08, interval: 1e+07, nticks: 9, fs: %.2lf×109, scale: 1e-09, ex: 1.00×109, ex 2: 1.01×109 lower: -4e+07, interval: 1e+07, nticks: 9, fs: %.0lf×107, scale: 1e-07, ex: -1×107, ex 2: 0×107 lower: -3e+07, interval: 5e+06, nticks: 9, fs: %.1lf×107, scale: 1e-07, ex: -1.5×107, ex 2: -1.0×107 lower: 1.001e-95, interval: 2e-99, nticks: 10, fs: %.4lf×10-95, scale: 1e+95, ex: 1.0016×10-95, ex 2: 1.0018×10-95 lower: 1.001e+98, interval: 2e+94, nticks: 10, fs: %.4lf×1098, scale: 1e-98, ex: 1.0016×1098, ex 2: 1.0018×1098 lower: 5984, interval: 1e-05, nticks: 10, fs: %.5lf, scale: 1, ex: 5984.00003, ex 2: 5984.00004 lower: 3e+33, interval: 1e-22, nticks: 10, fs: %lg, scale: 1, ex: 3e+33, ex 2: 3e+33 lower: 3e+33, interval: 1000, nticks: 10, fs: %.8lf×1033, scale: 1e-33, ex: 3.00000000×1033, ex 2: 3.00000000×1033 lower: 0.1, interval: 2e-42, nticks: 10, fs: %.8lf, scale: 1, ex: 0.10000000, ex 2: 0.10000000 ]) AT_CLEANUP pspp-1.0.1/tests/math/moments.at0000644000175000017500000000360413137223525013525 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([calculating moments]) m4_define([MOMENTS_TESTCASES], [[[1 2 3 4], [W=4.000 M1=2.500 M2=1.667 M3=0.000 M4=-1.200]], [[1*5 2*5 3*5 4*5], [W=20.000 M1=2.500 M2=1.316 M3=0.000 M4=-1.401]], [[1*1 2*2 3*3 4*4], [W=10.000 M1=3.000 M2=1.111 M3=-0.712 M4=-0.450]], [[1*0], [W=0.000 M1=sysmis M2=sysmis M3=sysmis M4=sysmis]], [[1*1], [W=1.000 M1=1.000 M2=sysmis M3=sysmis M4=sysmis]], [[1*2], [W=2.000 M1=1.000 M2=0.000 M3=sysmis M4=sysmis]], [[1*3], [W=3.000 M1=1.000 M2=0.000 M3=sysmis M4=sysmis]], [[1*2 3], [W=3.000 M1=1.667 M2=1.333 M3=1.732 M4=sysmis]], [[1 1.00000001], [W=2.000 M1=1.000 M2=0.000 M3=sysmis M4=sysmis]], [[1000001 1000002 1000003 1000004], [W=4.000 M1=1000002.500 M2=1.667 M3=0.000 M4=-1.200]]]) m4_define([TEST_MOMENTS], [AT_SETUP([$1 moments]) AT_CAPTURE_FILE([moments.sps]) AT_DATA([moments.sps], [m4_foreach([pair], [MOMENTS_TESTCASES], [DEBUG MOMENTS $2/m4_car(pair). ])]) AT_CHECK([pspp --testing-mode --no-output moments.sps], [0], [], [m4_foreach([pair], [MOMENTS_TESTCASES], [m4_argn([2], pair) ])]) AT_CLEANUP ]) TEST_MOMENTS([two-pass], []) TEST_MOMENTS([one-pass], [ONEPASS]) pspp-1.0.1/tests/math/randist.at0000644000175000017500000051363413137223525013520 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([random distributions]) m4_divert_push([PREPARE_TESTS]) [randist_compare () { cat > compare.pl <<'EOF' use strict; use warnings 'all'; my ($epsilon) = 1; open (EXPECTED, '<', $ARGV[0]) or die "$ARGV[0]: open: $!\n"; open (ACTUAL, '<', $ARGV[1]) or die "$ARGV[1]: open: $!\n"; my ($errors) = 0; LINE: for (;;) { my $a = ; my $b = ; last if !defined $a && !defined $b; die "$ARGV[0]:$.: unexpected end of file\n" if !defined $a; die "$ARGV[1]:$.: unexpected end of file\n" if !defined $b; my (@a) = split (' ', $a); my (@b) = split (' ', $b); die "$ARGV[1]:$.: contains ". scalar (@b) . " fields but should " . "contain " . scalar (@a) . "\n" if $#a != $#b; foreach my $i (0...$#a) { die "$ARGV[1]:$.: unexpected number of decimals\n" if count_decimals ($a[$i]) != count_decimals ($b[$i]); my ($an) = to_int ($a[$i]); my ($bn) = to_int ($b[$i]); if ($an ne $bn && ($bn < $an - $epsilon || $bn > $an + $epsilon)) { $errors++; if ($errors > 50) { print "$ARGV[1]: Additional differences suppressed.\n"; last LINE; } print "$ARGV[1]:$.: Values differ from $ARGV[0]:$.\n"; print "Expected:\n", $a; print "Calculated:\n", $b; } } } exit ($errors > 0); sub count_decimals { my ($s) = @_; return length (substr ($s, index ($s, '.'))); } sub to_int { local ($_) = @_; s/\.//; return $_; } EOF }] m4_divert_pop([PREPARE_TESTS]) m4_define([RANDIST_CHECK], [AT_SETUP([random distributions -- $1]) randist_compare AT_DATA([$1.in], [$4]) AT_DATA([$1.sps], [dnl DATA LIST LIST FILE='$1.in' NOTABLE SKIP=1 /P $2[]m4_foreach_w([function], [x $3], [ X[]function]). NUMERIC x $3 (F10.4). COMPUTE x = IDF.$1(P[]m4_foreach_w([variable], [$2], [, variable])). m4_foreach_w([function], [$3], [COMPUTE function = function[].$1[](x[]m4_foreach_w([variable], [$2], [, variable])). ])dnl DO IF $CASENUM = 1. PRINT OUTFILE='$1.out'/"dnl m4_foreach_w([variable], [P $2], [m4_format([%8s ], variable)])dnl m4_foreach_w([function], [x $3], [m4_format([%10s ], function)])". END IF. PRINT OUTFILE='$1.out'/P $2 x $3. EXECUTE. ]) AT_CHECK([pspp -O format=csv $1.sps]) AT_CHECK([$PERL compare.pl $1.in $1.out]) AT_CLEANUP]) RANDIST_CHECK([beta], [a b], [cdf pdf], [dnl P a b x cdf pdf .01 .75 .25 .0107 .0100 .7059 .01 .75 .50 .0047 .0100 1.5975 .01 .75 1.00 .0022 .0100 3.4812 .01 .75 1.50 .0014 .0100 5.4014 .01 .75 2.00 .0010 .0100 7.3328 .01 .75 2.50 .0008 .0100 9.2691 .01 .75 3.00 .0007 .0100 11.2077 .01 1.00 .25 .0394 .0100 .2577 .01 1.00 .50 .0199 .0100 .5051 .01 1.00 1.00 .0100 .0100 1.0000 .01 1.00 1.50 .0067 .0100 1.4950 .01 1.00 2.00 .0050 .0100 1.9900 .01 1.00 2.50 .0040 .0100 2.4850 .01 1.00 3.00 .0033 .0100 2.9800 .01 1.50 .25 .1343 .0100 .1168 .01 1.50 .50 .0808 .0100 .1888 .01 1.50 1.00 .0464 .0100 .3232 .01 1.50 1.50 .0328 .0100 .4538 .01 1.50 2.00 .0255 .0100 .5831 .01 1.50 2.50 .0208 .0100 .7118 .01 1.50 3.00 .0176 .0100 .8402 .10 .75 .25 .2094 .1000 .3968 .10 .75 .50 .0985 .1000 .7845 .10 .75 1.00 .0464 .1000 1.6158 .10 .75 1.50 .0302 .1000 2.4656 .10 .75 2.00 .0223 .1000 3.3210 .10 .75 2.50 .0177 .1000 4.1787 .10 .75 3.00 .0146 .1000 5.0376 .10 1.00 .25 .3439 .1000 .3429 .10 1.00 .50 .1900 .1000 .5556 .10 1.00 1.00 .1000 .1000 1.0000 .10 1.00 1.50 .0678 .1000 1.4482 .10 1.00 2.00 .0513 .1000 1.8974 .10 1.00 2.50 .0413 .1000 2.3469 .10 1.00 3.00 .0345 .1000 2.7965 .10 1.50 .25 .5280 .1000 .3650 .10 1.50 .50 .3514 .1000 .4685 .10 1.50 1.00 .2154 .1000 .6962 .10 1.50 1.50 .1565 .1000 .9252 .10 1.50 2.00 .1231 .1000 1.1537 .10 1.50 2.50 .1015 .1000 1.3821 .10 1.50 3.00 .0864 .1000 1.6102 .20 .75 .25 .4559 .2000 .4324 .20 .75 .50 .2372 .2000 .6847 .20 .75 1.00 .1170 .2000 1.2825 .20 .75 1.50 .0770 .2000 1.9025 .20 .75 2.00 .0573 .2000 2.5285 .20 .75 2.50 .0456 .2000 3.1569 .20 .75 3.00 .0379 .2000 3.7865 .20 1.00 .25 .5904 .2000 .4883 .20 1.00 .50 .3600 .2000 .6250 .20 1.00 1.00 .2000 .2000 1.0000 .20 1.00 1.50 .1382 .2000 1.3925 .20 1.00 2.00 .1056 .2000 1.7889 .20 1.00 2.50 .0854 .2000 2.1867 .20 1.00 3.00 .0717 .2000 2.5853 .20 1.50 .25 .7324 .2000 .6579 .20 1.50 .50 .5280 .2000 .6733 .20 1.50 1.00 .3420 .2000 .8772 .20 1.50 1.50 .2541 .2000 1.1086 .20 1.50 2.00 .2024 .2000 1.3456 .20 1.50 2.50 .1683 .2000 1.5847 .20 1.50 3.00 .1441 .2000 1.8249 .30 .75 .25 .6615 .3000 .5624 .30 .75 .50 .3852 .3000 .6756 .30 .75 1.00 .2008 .3000 1.1204 .30 .75 1.50 .1346 .3000 1.6023 .30 .75 2.00 .1010 .3000 2.0929 .30 .75 2.50 .0808 .3000 2.5868 .30 .75 3.00 .0673 .3000 3.0823 .30 1.00 .25 .7599 .3000 .7289 .30 1.00 .50 .5100 .3000 .7143 .30 1.00 1.00 .3000 .3000 1.0000 .30 1.00 1.50 .2116 .3000 1.3319 .30 1.00 2.00 .1633 .3000 1.6733 .30 1.00 2.50 .1330 .3000 2.0184 .30 1.00 3.00 .1121 .3000 2.3651 .30 1.50 .25 .8510 .3000 1.1004 .30 1.50 .50 .6576 .3000 .8823 .30 1.50 1.00 .4481 .3000 1.0041 .30 1.50 1.50 .3402 .3000 1.2064 .30 1.50 2.00 .2743 .3000 1.4253 .30 1.50 2.50 .2298 .3000 1.6503 .30 1.50 3.00 .1978 .3000 1.8782 .40 .75 .25 .8106 .4000 .8261 .40 .75 .50 .5300 .4000 .7134 .40 .75 1.00 .2947 .4000 1.0179 .40 .75 1.50 .2017 .4000 1.3908 .40 .75 2.00 .1530 .4000 1.7776 .40 .75 2.50 .1231 .4000 2.1695 .40 .75 3.00 .1029 .4000 2.5638 .40 1.00 .25 .8704 .4000 1.1574 .40 1.00 .50 .6400 .4000 .8333 .40 1.00 1.00 .4000 .4000 1.0000 .40 1.00 1.50 .2886 .4000 1.2651 .40 1.00 2.00 .2254 .4000 1.5492 .40 1.00 2.50 .1848 .4000 1.8401 .40 1.00 3.00 .1566 .4000 2.1341 .40 1.50 .25 .9219 .4000 1.8596 .40 1.50 .50 .7581 .4000 1.1269 .40 1.50 1.00 .5429 .4000 1.1052 .40 1.50 1.50 .4211 .4000 1.2573 .40 1.50 2.00 .3438 .4000 1.4428 .40 1.50 2.50 .2904 .4000 1.6405 .40 1.50 3.00 .2514 .4000 1.8440 .50 .75 .25 .9067 .5000 1.3662 .50 .75 .50 .6633 .5000 .7969 .50 .75 1.00 .3969 .5000 .9449 .50 .75 1.50 .2786 .5000 1.2197 .50 .75 2.00 .2139 .5000 1.5170 .50 .75 2.50 .1734 .5000 1.8224 .50 .75 3.00 .1458 .5000 2.1314 .50 1.00 .25 .9375 .5000 2.0000 .50 1.00 .50 .7500 .5000 1.0000 .50 1.00 1.00 .5000 .5000 1.0000 .50 1.00 1.50 .3700 .5000 1.1906 .50 1.00 2.00 .2929 .5000 1.4142 .50 1.00 2.50 .2421 .5000 1.6494 .50 1.00 3.00 .2063 .5000 1.8899 .50 1.50 .25 .9630 .5000 3.3258 .50 1.50 .50 .8368 .5000 1.4416 .50 1.50 1.00 .6300 .5000 1.1906 .50 1.50 1.50 .5000 .5000 1.2732 .50 1.50 2.00 .4136 .5000 1.4142 .50 1.50 2.50 .3525 .5000 1.5755 .50 1.50 3.00 .3069 .5000 1.7464 .60 .75 .25 .9613 .6000 2.6072 .60 .75 .50 .7793 .6000 .9454 .60 .75 1.00 .5061 .6000 .8892 .60 .75 1.50 .3662 .6000 1.0676 .60 .75 2.00 .2856 .6000 1.2826 .60 .75 2.50 .2337 .6000 1.5099 .60 .75 3.00 .1976 .6000 1.7426 .60 1.00 .25 .9744 .6000 3.9063 .60 1.00 .50 .8400 .6000 1.2500 .60 1.00 1.00 .6000 .6000 1.0000 .60 1.00 1.50 .4571 .6000 1.1052 .60 1.00 2.00 .3675 .6000 1.2649 .60 1.00 2.50 .3069 .6000 1.4427 .60 1.00 3.00 .2632 .6000 1.6287 .60 1.50 .25 .9850 .6000 6.6134 .60 1.50 .50 .8978 .6000 1.8869 .60 1.50 1.00 .7114 .6000 1.2651 .60 1.50 1.50 .5789 .6000 1.2573 .60 1.50 2.00 .4860 .6000 1.3438 .60 1.50 2.50 .4182 .6000 1.4617 .60 1.50 3.00 .3667 .6000 1.5938 .70 .75 .25 .9877 .7000 6.1137 .70 .75 .50 .8736 .7000 1.2142 .70 .75 1.00 .6215 .7000 .8447 .70 .75 1.50 .4670 .7000 .9214 .70 .75 2.00 .3714 .7000 1.0570 .70 .75 2.50 .3075 .7000 1.2110 .70 .75 3.00 .2622 .7000 1.3731 .70 1.00 .25 .9919 .7000 9.2593 .70 1.00 .50 .9100 .7000 1.6667 .70 1.00 1.00 .7000 .7000 1.0000 .70 1.00 1.50 .5519 .7000 1.0041 .70 1.00 2.00 .4523 .7000 1.0954 .70 1.00 2.50 .3822 .7000 1.2140 .70 1.00 3.00 .3306 .7000 1.3444 .70 1.50 .25 .9953 .7000 15.8068 .70 1.50 .50 .9434 .7000 2.5994 .70 1.50 1.00 .7884 .7000 1.3319 .70 1.50 1.50 .6598 .7000 1.2064 .70 1.50 2.00 .5635 .7000 1.2287 .70 1.50 2.50 .4905 .7000 1.2972 .70 1.50 3.00 .4337 .7000 1.3859 .80 .75 .25 .9976 .8000 20.5520 .80 .75 .50 .9431 .8000 1.7757 .80 .75 1.00 .7427 .8000 .8079 .80 .75 1.50 .5855 .8000 .7679 .80 .75 2.00 .4781 .8000 .8238 .80 .75 2.50 .4025 .8000 .9075 .80 .75 3.00 .3469 .8000 1.0028 .80 1.00 .25 .9984 .8000 31.2500 .80 1.00 .50 .9600 .8000 2.5000 .80 1.00 1.00 .8000 .8000 1.0000 .80 1.00 1.50 .6580 .8000 .8772 .80 1.00 2.00 .5528 .8000 .8944 .80 1.00 2.50 .4747 .8000 .9518 .80 1.00 3.00 .4152 .8000 1.0260 .80 1.50 .25 .9991 .8000 53.5108 .80 1.50 .50 .9751 .8000 3.9855 .80 1.50 1.00 .8618 .8000 1.3925 .80 1.50 1.50 .7459 .8000 1.1086 .80 1.50 2.00 .6508 .8000 1.0564 .80 1.50 2.50 .5748 .8000 1.0706 .80 1.50 3.00 .5137 .8000 1.1124 .90 .75 .25 .9998 .9000 164.2657 .90 .75 .50 .9857 .9000 3.4998 .90 .75 1.00 .8689 .9000 .7768 .90 .75 1.50 .7336 .9000 .5818 .90 .75 2.00 .6239 .9000 .5555 .90 .75 2.50 .5392 .9000 .5712 .90 .75 3.00 .4734 .9000 .6033 .90 1.00 .25 .9999 .9000 250.0000 .90 1.00 .50 .9900 .9000 5.0000 .90 1.00 1.00 .9000 .9000 1.0000 .90 1.00 1.50 .7846 .9000 .6962 .90 1.00 2.00 .6838 .9000 .6325 .90 1.00 2.50 .6019 .9000 .6280 .90 1.00 3.00 .5358 .9000 .6463 .90 1.50 .25 .9999 .9000 428.3866 .90 1.50 .50 .9938 .9000 8.0723 .90 1.50 1.00 .9322 .9000 1.4482 .90 1.50 1.50 .8435 .9000 .9252 .90 1.50 2.00 .7586 .9000 .7883 .90 1.50 2.50 .6847 .9000 .7461 .90 1.50 3.00 .6218 .9000 .7400 .99 .75 .25 1.0000 .9900 164255.717 .99 .75 .50 .9999 .9900 34.8318 .99 .75 1.00 .9867 .9900 .7525 .99 .75 1.50 .9412 .9900 .2568 .99 .75 2.00 .8779 .9900 .1656 .99 .75 2.50 .8116 .9900 .1348 .99 .75 3.00 .7492 .9900 .1220 .99 1.00 .25 1.0000 .9900 249999.999 .99 1.00 .50 .9999 .9900 50.0000 .99 1.00 1.00 .9900 .9900 1.0000 .99 1.00 1.50 .9536 .9900 .3232 .99 1.00 2.00 .9000 .9900 .2000 .99 1.00 2.50 .8415 .9900 .1577 .99 1.00 3.00 .7846 .9900 .1392 .99 1.50 .25 1.0000 .9900 428406.592 .99 1.50 .50 .9999 .9900 81.0536 .99 1.50 1.00 .9933 .9900 1.4950 .99 1.50 1.50 .9672 .9900 .4538 .99 1.50 2.00 .9260 .9900 .2669 .99 1.50 2.50 .8786 .9900 .2020 .99 1.50 3.00 .8302 .9900 .1724 ]) RANDIST_CHECK([cauchy], [a b], [cdf pdf], [dnl P a b x cdf pdf .01 -5.00 .50 -20.9103 .0100 .0006 .01 -5.00 .75 -28.8654 .0100 .0004 .01 -5.00 1.00 -36.8205 .0100 .0003 .01 -5.00 1.25 -44.7756 .0100 .0003 .01 -5.00 1.50 -52.7308 .0100 .0002 .01 -4.00 .50 -19.9103 .0100 .0006 .01 -4.00 .75 -27.8654 .0100 .0004 .01 -4.00 1.00 -35.8205 .0100 .0003 .01 -4.00 1.25 -43.7756 .0100 .0003 .01 -4.00 1.50 -51.7308 .0100 .0002 .01 -3.00 .50 -18.9103 .0100 .0006 .01 -3.00 .75 -26.8654 .0100 .0004 .01 -3.00 1.00 -34.8205 .0100 .0003 .01 -3.00 1.25 -42.7756 .0100 .0003 .01 -3.00 1.50 -50.7308 .0100 .0002 .01 -2.00 .50 -17.9103 .0100 .0006 .01 -2.00 .75 -25.8654 .0100 .0004 .01 -2.00 1.00 -33.8205 .0100 .0003 .01 -2.00 1.25 -41.7756 .0100 .0003 .01 -2.00 1.50 -49.7308 .0100 .0002 .01 -1.00 .50 -16.9103 .0100 .0006 .01 -1.00 .75 -24.8654 .0100 .0004 .01 -1.00 1.00 -32.8205 .0100 .0003 .01 -1.00 1.25 -40.7756 .0100 .0003 .01 -1.00 1.50 -48.7308 .0100 .0002 .01 .00 .50 -15.9103 .0100 .0006 .01 .00 .75 -23.8654 .0100 .0004 .01 .00 1.00 -31.8205 .0100 .0003 .01 .00 1.25 -39.7756 .0100 .0003 .01 .00 1.50 -47.7308 .0100 .0002 .01 1.00 .50 -14.9103 .0100 .0006 .01 1.00 .75 -22.8654 .0100 .0004 .01 1.00 1.00 -30.8205 .0100 .0003 .01 1.00 1.25 -38.7756 .0100 .0003 .01 1.00 1.50 -46.7308 .0100 .0002 .01 2.00 .50 -13.9103 .0100 .0006 .01 2.00 .75 -21.8654 .0100 .0004 .01 2.00 1.00 -29.8205 .0100 .0003 .01 2.00 1.25 -37.7756 .0100 .0003 .01 2.00 1.50 -45.7308 .0100 .0002 .01 3.00 .50 -12.9103 .0100 .0006 .01 3.00 .75 -20.8654 .0100 .0004 .01 3.00 1.00 -28.8205 .0100 .0003 .01 3.00 1.25 -36.7756 .0100 .0003 .01 3.00 1.50 -44.7308 .0100 .0002 .01 4.00 .50 -11.9103 .0100 .0006 .01 4.00 .75 -19.8654 .0100 .0004 .01 4.00 1.00 -27.8205 .0100 .0003 .01 4.00 1.25 -35.7756 .0100 .0003 .01 4.00 1.50 -43.7308 .0100 .0002 .01 5.00 .50 -10.9103 .0100 .0006 .01 5.00 .75 -18.8654 .0100 .0004 .01 5.00 1.00 -26.8205 .0100 .0003 .01 5.00 1.25 -34.7756 .0100 .0003 .01 5.00 1.50 -42.7308 .0100 .0002 .10 -5.00 .50 -6.5388 .1000 .0608 .10 -5.00 .75 -7.3083 .1000 .0405 .10 -5.00 1.00 -8.0777 .1000 .0304 .10 -5.00 1.25 -8.8471 .1000 .0243 .10 -5.00 1.50 -9.6165 .1000 .0203 .10 -4.00 .50 -5.5388 .1000 .0608 .10 -4.00 .75 -6.3083 .1000 .0405 .10 -4.00 1.00 -7.0777 .1000 .0304 .10 -4.00 1.25 -7.8471 .1000 .0243 .10 -4.00 1.50 -8.6165 .1000 .0203 .10 -3.00 .50 -4.5388 .1000 .0608 .10 -3.00 .75 -5.3083 .1000 .0405 .10 -3.00 1.00 -6.0777 .1000 .0304 .10 -3.00 1.25 -6.8471 .1000 .0243 .10 -3.00 1.50 -7.6165 .1000 .0203 .10 -2.00 .50 -3.5388 .1000 .0608 .10 -2.00 .75 -4.3083 .1000 .0405 .10 -2.00 1.00 -5.0777 .1000 .0304 .10 -2.00 1.25 -5.8471 .1000 .0243 .10 -2.00 1.50 -6.6165 .1000 .0203 .10 -1.00 .50 -2.5388 .1000 .0608 .10 -1.00 .75 -3.3083 .1000 .0405 .10 -1.00 1.00 -4.0777 .1000 .0304 .10 -1.00 1.25 -4.8471 .1000 .0243 .10 -1.00 1.50 -5.6165 .1000 .0203 .10 .00 .50 -1.5388 .1000 .0608 .10 .00 .75 -2.3083 .1000 .0405 .10 .00 1.00 -3.0777 .1000 .0304 .10 .00 1.25 -3.8471 .1000 .0243 .10 .00 1.50 -4.6165 .1000 .0203 .10 1.00 .50 -.5388 .1000 .0608 .10 1.00 .75 -1.3083 .1000 .0405 .10 1.00 1.00 -2.0777 .1000 .0304 .10 1.00 1.25 -2.8471 .1000 .0243 .10 1.00 1.50 -3.6165 .1000 .0203 .10 2.00 .50 .4612 .1000 .0608 .10 2.00 .75 -.3083 .1000 .0405 .10 2.00 1.00 -1.0777 .1000 .0304 .10 2.00 1.25 -1.8471 .1000 .0243 .10 2.00 1.50 -2.6165 .1000 .0203 .10 3.00 .50 1.4612 .1000 .0608 .10 3.00 .75 .6917 .1000 .0405 .10 3.00 1.00 -.0777 .1000 .0304 .10 3.00 1.25 -.8471 .1000 .0243 .10 3.00 1.50 -1.6165 .1000 .0203 .10 4.00 .50 2.4612 .1000 .0608 .10 4.00 .75 1.6917 .1000 .0405 .10 4.00 1.00 .9223 .1000 .0304 .10 4.00 1.25 .1529 .1000 .0243 .10 4.00 1.50 -.6165 .1000 .0203 .10 5.00 .50 3.4612 .1000 .0608 .10 5.00 .75 2.6917 .1000 .0405 .10 5.00 1.00 1.9223 .1000 .0304 .10 5.00 1.25 1.1529 .1000 .0243 .10 5.00 1.50 .3835 .1000 .0203 .20 -5.00 .50 -5.6882 .2000 .2199 .20 -5.00 .75 -6.0323 .2000 .1466 .20 -5.00 1.00 -6.3764 .2000 .1100 .20 -5.00 1.25 -6.7205 .2000 .0880 .20 -5.00 1.50 -7.0646 .2000 .0733 .20 -4.00 .50 -4.6882 .2000 .2199 .20 -4.00 .75 -5.0323 .2000 .1466 .20 -4.00 1.00 -5.3764 .2000 .1100 .20 -4.00 1.25 -5.7205 .2000 .0880 .20 -4.00 1.50 -6.0646 .2000 .0733 .20 -3.00 .50 -3.6882 .2000 .2199 .20 -3.00 .75 -4.0323 .2000 .1466 .20 -3.00 1.00 -4.3764 .2000 .1100 .20 -3.00 1.25 -4.7205 .2000 .0880 .20 -3.00 1.50 -5.0646 .2000 .0733 .20 -2.00 .50 -2.6882 .2000 .2199 .20 -2.00 .75 -3.0323 .2000 .1466 .20 -2.00 1.00 -3.3764 .2000 .1100 .20 -2.00 1.25 -3.7205 .2000 .0880 .20 -2.00 1.50 -4.0646 .2000 .0733 .20 -1.00 .50 -1.6882 .2000 .2199 .20 -1.00 .75 -2.0323 .2000 .1466 .20 -1.00 1.00 -2.3764 .2000 .1100 .20 -1.00 1.25 -2.7205 .2000 .0880 .20 -1.00 1.50 -3.0646 .2000 .0733 .20 .00 .50 -.6882 .2000 .2199 .20 .00 .75 -1.0323 .2000 .1466 .20 .00 1.00 -1.3764 .2000 .1100 .20 .00 1.25 -1.7205 .2000 .0880 .20 .00 1.50 -2.0646 .2000 .0733 .20 1.00 .50 .3118 .2000 .2199 .20 1.00 .75 -.0323 .2000 .1466 .20 1.00 1.00 -.3764 .2000 .1100 .20 1.00 1.25 -.7205 .2000 .0880 .20 1.00 1.50 -1.0646 .2000 .0733 .20 2.00 .50 1.3118 .2000 .2199 .20 2.00 .75 .9677 .2000 .1466 .20 2.00 1.00 .6236 .2000 .1100 .20 2.00 1.25 .2795 .2000 .0880 .20 2.00 1.50 -.0646 .2000 .0733 .20 3.00 .50 2.3118 .2000 .2199 .20 3.00 .75 1.9677 .2000 .1466 .20 3.00 1.00 1.6236 .2000 .1100 .20 3.00 1.25 1.2795 .2000 .0880 .20 3.00 1.50 .9354 .2000 .0733 .20 4.00 .50 3.3118 .2000 .2199 .20 4.00 .75 2.9677 .2000 .1466 .20 4.00 1.00 2.6236 .2000 .1100 .20 4.00 1.25 2.2795 .2000 .0880 .20 4.00 1.50 1.9354 .2000 .0733 .20 5.00 .50 4.3118 .2000 .2199 .20 5.00 .75 3.9677 .2000 .1466 .20 5.00 1.00 3.6236 .2000 .1100 .20 5.00 1.25 3.2795 .2000 .0880 .20 5.00 1.50 2.9354 .2000 .0733 .30 -5.00 .50 -5.3633 .3000 .4167 .30 -5.00 .75 -5.5449 .3000 .2778 .30 -5.00 1.00 -5.7265 .3000 .2083 .30 -5.00 1.25 -5.9082 .3000 .1667 .30 -5.00 1.50 -6.0898 .3000 .1389 .30 -4.00 .50 -4.3633 .3000 .4167 .30 -4.00 .75 -4.5449 .3000 .2778 .30 -4.00 1.00 -4.7265 .3000 .2083 .30 -4.00 1.25 -4.9082 .3000 .1667 .30 -4.00 1.50 -5.0898 .3000 .1389 .30 -3.00 .50 -3.3633 .3000 .4167 .30 -3.00 .75 -3.5449 .3000 .2778 .30 -3.00 1.00 -3.7265 .3000 .2083 .30 -3.00 1.25 -3.9082 .3000 .1667 .30 -3.00 1.50 -4.0898 .3000 .1389 .30 -2.00 .50 -2.3633 .3000 .4167 .30 -2.00 .75 -2.5449 .3000 .2778 .30 -2.00 1.00 -2.7265 .3000 .2083 .30 -2.00 1.25 -2.9082 .3000 .1667 .30 -2.00 1.50 -3.0898 .3000 .1389 .30 -1.00 .50 -1.3633 .3000 .4167 .30 -1.00 .75 -1.5449 .3000 .2778 .30 -1.00 1.00 -1.7265 .3000 .2083 .30 -1.00 1.25 -1.9082 .3000 .1667 .30 -1.00 1.50 -2.0898 .3000 .1389 .30 .00 .50 -.3633 .3000 .4167 .30 .00 .75 -.5449 .3000 .2778 .30 .00 1.00 -.7265 .3000 .2083 .30 .00 1.25 -.9082 .3000 .1667 .30 .00 1.50 -1.0898 .3000 .1389 .30 1.00 .50 .6367 .3000 .4167 .30 1.00 .75 .4551 .3000 .2778 .30 1.00 1.00 .2735 .3000 .2083 .30 1.00 1.25 .0918 .3000 .1667 .30 1.00 1.50 -.0898 .3000 .1389 .30 2.00 .50 1.6367 .3000 .4167 .30 2.00 .75 1.4551 .3000 .2778 .30 2.00 1.00 1.2735 .3000 .2083 .30 2.00 1.25 1.0918 .3000 .1667 .30 2.00 1.50 .9102 .3000 .1389 .30 3.00 .50 2.6367 .3000 .4167 .30 3.00 .75 2.4551 .3000 .2778 .30 3.00 1.00 2.2735 .3000 .2083 .30 3.00 1.25 2.0918 .3000 .1667 .30 3.00 1.50 1.9102 .3000 .1389 .30 4.00 .50 3.6367 .3000 .4167 .30 4.00 .75 3.4551 .3000 .2778 .30 4.00 1.00 3.2735 .3000 .2083 .30 4.00 1.25 3.0918 .3000 .1667 .30 4.00 1.50 2.9102 .3000 .1389 .30 5.00 .50 4.6367 .3000 .4167 .30 5.00 .75 4.4551 .3000 .2778 .30 5.00 1.00 4.2735 .3000 .2083 .30 5.00 1.25 4.0918 .3000 .1667 .30 5.00 1.50 3.9102 .3000 .1389 .40 -5.00 .50 -5.1625 .4000 .5758 .40 -5.00 .75 -5.2437 .4000 .3839 .40 -5.00 1.00 -5.3249 .4000 .2879 .40 -5.00 1.25 -5.4061 .4000 .2303 .40 -5.00 1.50 -5.4874 .4000 .1919 .40 -4.00 .50 -4.1625 .4000 .5758 .40 -4.00 .75 -4.2437 .4000 .3839 .40 -4.00 1.00 -4.3249 .4000 .2879 .40 -4.00 1.25 -4.4061 .4000 .2303 .40 -4.00 1.50 -4.4874 .4000 .1919 .40 -3.00 .50 -3.1625 .4000 .5758 .40 -3.00 .75 -3.2437 .4000 .3839 .40 -3.00 1.00 -3.3249 .4000 .2879 .40 -3.00 1.25 -3.4061 .4000 .2303 .40 -3.00 1.50 -3.4874 .4000 .1919 .40 -2.00 .50 -2.1625 .4000 .5758 .40 -2.00 .75 -2.2437 .4000 .3839 .40 -2.00 1.00 -2.3249 .4000 .2879 .40 -2.00 1.25 -2.4061 .4000 .2303 .40 -2.00 1.50 -2.4874 .4000 .1919 .40 -1.00 .50 -1.1625 .4000 .5758 .40 -1.00 .75 -1.2437 .4000 .3839 .40 -1.00 1.00 -1.3249 .4000 .2879 .40 -1.00 1.25 -1.4061 .4000 .2303 .40 -1.00 1.50 -1.4874 .4000 .1919 .40 .00 .50 -.1625 .4000 .5758 .40 .00 .75 -.2437 .4000 .3839 .40 .00 1.00 -.3249 .4000 .2879 .40 .00 1.25 -.4061 .4000 .2303 .40 .00 1.50 -.4874 .4000 .1919 .40 1.00 .50 .8375 .4000 .5758 .40 1.00 .75 .7563 .4000 .3839 .40 1.00 1.00 .6751 .4000 .2879 .40 1.00 1.25 .5939 .4000 .2303 .40 1.00 1.50 .5126 .4000 .1919 .40 2.00 .50 1.8375 .4000 .5758 .40 2.00 .75 1.7563 .4000 .3839 .40 2.00 1.00 1.6751 .4000 .2879 .40 2.00 1.25 1.5939 .4000 .2303 .40 2.00 1.50 1.5126 .4000 .1919 .40 3.00 .50 2.8375 .4000 .5758 .40 3.00 .75 2.7563 .4000 .3839 .40 3.00 1.00 2.6751 .4000 .2879 .40 3.00 1.25 2.5939 .4000 .2303 .40 3.00 1.50 2.5126 .4000 .1919 .40 4.00 .50 3.8375 .4000 .5758 .40 4.00 .75 3.7563 .4000 .3839 .40 4.00 1.00 3.6751 .4000 .2879 .40 4.00 1.25 3.5939 .4000 .2303 .40 4.00 1.50 3.5126 .4000 .1919 .40 5.00 .50 4.8375 .4000 .5758 .40 5.00 .75 4.7563 .4000 .3839 .40 5.00 1.00 4.6751 .4000 .2879 .40 5.00 1.25 4.5939 .4000 .2303 .40 5.00 1.50 4.5126 .4000 .1919 .50 -5.00 .50 -5.0000 .5000 .6366 .50 -5.00 .75 -5.0000 .5000 .4244 .50 -5.00 1.00 -5.0000 .5000 .3183 .50 -5.00 1.25 -5.0000 .5000 .2546 .50 -5.00 1.50 -5.0000 .5000 .2122 .50 -4.00 .50 -4.0000 .5000 .6366 .50 -4.00 .75 -4.0000 .5000 .4244 .50 -4.00 1.00 -4.0000 .5000 .3183 .50 -4.00 1.25 -4.0000 .5000 .2546 .50 -4.00 1.50 -4.0000 .5000 .2122 .50 -3.00 .50 -3.0000 .5000 .6366 .50 -3.00 .75 -3.0000 .5000 .4244 .50 -3.00 1.00 -3.0000 .5000 .3183 .50 -3.00 1.25 -3.0000 .5000 .2546 .50 -3.00 1.50 -3.0000 .5000 .2122 .50 -2.00 .50 -2.0000 .5000 .6366 .50 -2.00 .75 -2.0000 .5000 .4244 .50 -2.00 1.00 -2.0000 .5000 .3183 .50 -2.00 1.25 -2.0000 .5000 .2546 .50 -2.00 1.50 -2.0000 .5000 .2122 .50 -1.00 .50 -1.0000 .5000 .6366 .50 -1.00 .75 -1.0000 .5000 .4244 .50 -1.00 1.00 -1.0000 .5000 .3183 .50 -1.00 1.25 -1.0000 .5000 .2546 .50 -1.00 1.50 -1.0000 .5000 .2122 .50 .00 .50 .0000 .5000 .6366 .50 .00 .75 .0000 .5000 .4244 .50 .00 1.00 .0000 .5000 .3183 .50 .00 1.25 .0000 .5000 .2546 .50 .00 1.50 .0000 .5000 .2122 .50 1.00 .50 1.0000 .5000 .6366 .50 1.00 .75 1.0000 .5000 .4244 .50 1.00 1.00 1.0000 .5000 .3183 .50 1.00 1.25 1.0000 .5000 .2546 .50 1.00 1.50 1.0000 .5000 .2122 .50 2.00 .50 2.0000 .5000 .6366 .50 2.00 .75 2.0000 .5000 .4244 .50 2.00 1.00 2.0000 .5000 .3183 .50 2.00 1.25 2.0000 .5000 .2546 .50 2.00 1.50 2.0000 .5000 .2122 .50 3.00 .50 3.0000 .5000 .6366 .50 3.00 .75 3.0000 .5000 .4244 .50 3.00 1.00 3.0000 .5000 .3183 .50 3.00 1.25 3.0000 .5000 .2546 .50 3.00 1.50 3.0000 .5000 .2122 .50 4.00 .50 4.0000 .5000 .6366 .50 4.00 .75 4.0000 .5000 .4244 .50 4.00 1.00 4.0000 .5000 .3183 .50 4.00 1.25 4.0000 .5000 .2546 .50 4.00 1.50 4.0000 .5000 .2122 .50 5.00 .50 5.0000 .5000 .6366 .50 5.00 .75 5.0000 .5000 .4244 .50 5.00 1.00 5.0000 .5000 .3183 .50 5.00 1.25 5.0000 .5000 .2546 .50 5.00 1.50 5.0000 .5000 .2122 .60 -5.00 .50 -4.8375 .6000 .5758 .60 -5.00 .75 -4.7563 .6000 .3839 .60 -5.00 1.00 -4.6751 .6000 .2879 .60 -5.00 1.25 -4.5939 .6000 .2303 .60 -5.00 1.50 -4.5126 .6000 .1919 .60 -4.00 .50 -3.8375 .6000 .5758 .60 -4.00 .75 -3.7563 .6000 .3839 .60 -4.00 1.00 -3.6751 .6000 .2879 .60 -4.00 1.25 -3.5939 .6000 .2303 .60 -4.00 1.50 -3.5126 .6000 .1919 .60 -3.00 .50 -2.8375 .6000 .5758 .60 -3.00 .75 -2.7563 .6000 .3839 .60 -3.00 1.00 -2.6751 .6000 .2879 .60 -3.00 1.25 -2.5939 .6000 .2303 .60 -3.00 1.50 -2.5126 .6000 .1919 .60 -2.00 .50 -1.8375 .6000 .5758 .60 -2.00 .75 -1.7563 .6000 .3839 .60 -2.00 1.00 -1.6751 .6000 .2879 .60 -2.00 1.25 -1.5939 .6000 .2303 .60 -2.00 1.50 -1.5126 .6000 .1919 .60 -1.00 .50 -.8375 .6000 .5758 .60 -1.00 .75 -.7563 .6000 .3839 .60 -1.00 1.00 -.6751 .6000 .2879 .60 -1.00 1.25 -.5939 .6000 .2303 .60 -1.00 1.50 -.5126 .6000 .1919 .60 .00 .50 .1625 .6000 .5758 .60 .00 .75 .2437 .6000 .3839 .60 .00 1.00 .3249 .6000 .2879 .60 .00 1.25 .4061 .6000 .2303 .60 .00 1.50 .4874 .6000 .1919 .60 1.00 .50 1.1625 .6000 .5758 .60 1.00 .75 1.2437 .6000 .3839 .60 1.00 1.00 1.3249 .6000 .2879 .60 1.00 1.25 1.4061 .6000 .2303 .60 1.00 1.50 1.4874 .6000 .1919 .60 2.00 .50 2.1625 .6000 .5758 .60 2.00 .75 2.2437 .6000 .3839 .60 2.00 1.00 2.3249 .6000 .2879 .60 2.00 1.25 2.4061 .6000 .2303 .60 2.00 1.50 2.4874 .6000 .1919 .60 3.00 .50 3.1625 .6000 .5758 .60 3.00 .75 3.2437 .6000 .3839 .60 3.00 1.00 3.3249 .6000 .2879 .60 3.00 1.25 3.4061 .6000 .2303 .60 3.00 1.50 3.4874 .6000 .1919 .60 4.00 .50 4.1625 .6000 .5758 .60 4.00 .75 4.2437 .6000 .3839 .60 4.00 1.00 4.3249 .6000 .2879 .60 4.00 1.25 4.4061 .6000 .2303 .60 4.00 1.50 4.4874 .6000 .1919 .60 5.00 .50 5.1625 .6000 .5758 .60 5.00 .75 5.2437 .6000 .3839 .60 5.00 1.00 5.3249 .6000 .2879 .60 5.00 1.25 5.4061 .6000 .2303 .60 5.00 1.50 5.4874 .6000 .1919 .70 -5.00 .50 -4.6367 .7000 .4167 .70 -5.00 .75 -4.4551 .7000 .2778 .70 -5.00 1.00 -4.2735 .7000 .2083 .70 -5.00 1.25 -4.0918 .7000 .1667 .70 -5.00 1.50 -3.9102 .7000 .1389 .70 -4.00 .50 -3.6367 .7000 .4167 .70 -4.00 .75 -3.4551 .7000 .2778 .70 -4.00 1.00 -3.2735 .7000 .2083 .70 -4.00 1.25 -3.0918 .7000 .1667 .70 -4.00 1.50 -2.9102 .7000 .1389 .70 -3.00 .50 -2.6367 .7000 .4167 .70 -3.00 .75 -2.4551 .7000 .2778 .70 -3.00 1.00 -2.2735 .7000 .2083 .70 -3.00 1.25 -2.0918 .7000 .1667 .70 -3.00 1.50 -1.9102 .7000 .1389 .70 -2.00 .50 -1.6367 .7000 .4167 .70 -2.00 .75 -1.4551 .7000 .2778 .70 -2.00 1.00 -1.2735 .7000 .2083 .70 -2.00 1.25 -1.0918 .7000 .1667 .70 -2.00 1.50 -.9102 .7000 .1389 .70 -1.00 .50 -.6367 .7000 .4167 .70 -1.00 .75 -.4551 .7000 .2778 .70 -1.00 1.00 -.2735 .7000 .2083 .70 -1.00 1.25 -.0918 .7000 .1667 .70 -1.00 1.50 .0898 .7000 .1389 .70 .00 .50 .3633 .7000 .4167 .70 .00 .75 .5449 .7000 .2778 .70 .00 1.00 .7265 .7000 .2083 .70 .00 1.25 .9082 .7000 .1667 .70 .00 1.50 1.0898 .7000 .1389 .70 1.00 .50 1.3633 .7000 .4167 .70 1.00 .75 1.5449 .7000 .2778 .70 1.00 1.00 1.7265 .7000 .2083 .70 1.00 1.25 1.9082 .7000 .1667 .70 1.00 1.50 2.0898 .7000 .1389 .70 2.00 .50 2.3633 .7000 .4167 .70 2.00 .75 2.5449 .7000 .2778 .70 2.00 1.00 2.7265 .7000 .2083 .70 2.00 1.25 2.9082 .7000 .1667 .70 2.00 1.50 3.0898 .7000 .1389 .70 3.00 .50 3.3633 .7000 .4167 .70 3.00 .75 3.5449 .7000 .2778 .70 3.00 1.00 3.7265 .7000 .2083 .70 3.00 1.25 3.9082 .7000 .1667 .70 3.00 1.50 4.0898 .7000 .1389 .70 4.00 .50 4.3633 .7000 .4167 .70 4.00 .75 4.5449 .7000 .2778 .70 4.00 1.00 4.7265 .7000 .2083 .70 4.00 1.25 4.9082 .7000 .1667 .70 4.00 1.50 5.0898 .7000 .1389 .70 5.00 .50 5.3633 .7000 .4167 .70 5.00 .75 5.5449 .7000 .2778 .70 5.00 1.00 5.7265 .7000 .2083 .70 5.00 1.25 5.9082 .7000 .1667 .70 5.00 1.50 6.0898 .7000 .1389 .80 -5.00 .50 -4.3118 .8000 .2199 .80 -5.00 .75 -3.9677 .8000 .1466 .80 -5.00 1.00 -3.6236 .8000 .1100 .80 -5.00 1.25 -3.2795 .8000 .0880 .80 -5.00 1.50 -2.9354 .8000 .0733 .80 -4.00 .50 -3.3118 .8000 .2199 .80 -4.00 .75 -2.9677 .8000 .1466 .80 -4.00 1.00 -2.6236 .8000 .1100 .80 -4.00 1.25 -2.2795 .8000 .0880 .80 -4.00 1.50 -1.9354 .8000 .0733 .80 -3.00 .50 -2.3118 .8000 .2199 .80 -3.00 .75 -1.9677 .8000 .1466 .80 -3.00 1.00 -1.6236 .8000 .1100 .80 -3.00 1.25 -1.2795 .8000 .0880 .80 -3.00 1.50 -.9354 .8000 .0733 .80 -2.00 .50 -1.3118 .8000 .2199 .80 -2.00 .75 -.9677 .8000 .1466 .80 -2.00 1.00 -.6236 .8000 .1100 .80 -2.00 1.25 -.2795 .8000 .0880 .80 -2.00 1.50 .0646 .8000 .0733 .80 -1.00 .50 -.3118 .8000 .2199 .80 -1.00 .75 .0323 .8000 .1466 .80 -1.00 1.00 .3764 .8000 .1100 .80 -1.00 1.25 .7205 .8000 .0880 .80 -1.00 1.50 1.0646 .8000 .0733 .80 .00 .50 .6882 .8000 .2199 .80 .00 .75 1.0323 .8000 .1466 .80 .00 1.00 1.3764 .8000 .1100 .80 .00 1.25 1.7205 .8000 .0880 .80 .00 1.50 2.0646 .8000 .0733 .80 1.00 .50 1.6882 .8000 .2199 .80 1.00 .75 2.0323 .8000 .1466 .80 1.00 1.00 2.3764 .8000 .1100 .80 1.00 1.25 2.7205 .8000 .0880 .80 1.00 1.50 3.0646 .8000 .0733 .80 2.00 .50 2.6882 .8000 .2199 .80 2.00 .75 3.0323 .8000 .1466 .80 2.00 1.00 3.3764 .8000 .1100 .80 2.00 1.25 3.7205 .8000 .0880 .80 2.00 1.50 4.0646 .8000 .0733 .80 3.00 .50 3.6882 .8000 .2199 .80 3.00 .75 4.0323 .8000 .1466 .80 3.00 1.00 4.3764 .8000 .1100 .80 3.00 1.25 4.7205 .8000 .0880 .80 3.00 1.50 5.0646 .8000 .0733 .80 4.00 .50 4.6882 .8000 .2199 .80 4.00 .75 5.0323 .8000 .1466 .80 4.00 1.00 5.3764 .8000 .1100 .80 4.00 1.25 5.7205 .8000 .0880 .80 4.00 1.50 6.0646 .8000 .0733 .80 5.00 .50 5.6882 .8000 .2199 .80 5.00 .75 6.0323 .8000 .1466 .80 5.00 1.00 6.3764 .8000 .1100 .80 5.00 1.25 6.7205 .8000 .0880 .80 5.00 1.50 7.0646 .8000 .0733 .90 -5.00 .50 -3.4612 .9000 .0608 .90 -5.00 .75 -2.6917 .9000 .0405 .90 -5.00 1.00 -1.9223 .9000 .0304 .90 -5.00 1.25 -1.1529 .9000 .0243 .90 -5.00 1.50 -.3835 .9000 .0203 .90 -4.00 .50 -2.4612 .9000 .0608 .90 -4.00 .75 -1.6917 .9000 .0405 .90 -4.00 1.00 -.9223 .9000 .0304 .90 -4.00 1.25 -.1529 .9000 .0243 .90 -4.00 1.50 .6165 .9000 .0203 .90 -3.00 .50 -1.4612 .9000 .0608 .90 -3.00 .75 -.6917 .9000 .0405 .90 -3.00 1.00 .0777 .9000 .0304 .90 -3.00 1.25 .8471 .9000 .0243 .90 -3.00 1.50 1.6165 .9000 .0203 .90 -2.00 .50 -.4612 .9000 .0608 .90 -2.00 .75 .3083 .9000 .0405 .90 -2.00 1.00 1.0777 .9000 .0304 .90 -2.00 1.25 1.8471 .9000 .0243 .90 -2.00 1.50 2.6165 .9000 .0203 .90 -1.00 .50 .5388 .9000 .0608 .90 -1.00 .75 1.3083 .9000 .0405 .90 -1.00 1.00 2.0777 .9000 .0304 .90 -1.00 1.25 2.8471 .9000 .0243 .90 -1.00 1.50 3.6165 .9000 .0203 .90 .00 .50 1.5388 .9000 .0608 .90 .00 .75 2.3083 .9000 .0405 .90 .00 1.00 3.0777 .9000 .0304 .90 .00 1.25 3.8471 .9000 .0243 .90 .00 1.50 4.6165 .9000 .0203 .90 1.00 .50 2.5388 .9000 .0608 .90 1.00 .75 3.3083 .9000 .0405 .90 1.00 1.00 4.0777 .9000 .0304 .90 1.00 1.25 4.8471 .9000 .0243 .90 1.00 1.50 5.6165 .9000 .0203 .90 2.00 .50 3.5388 .9000 .0608 .90 2.00 .75 4.3083 .9000 .0405 .90 2.00 1.00 5.0777 .9000 .0304 .90 2.00 1.25 5.8471 .9000 .0243 .90 2.00 1.50 6.6165 .9000 .0203 .90 3.00 .50 4.5388 .9000 .0608 .90 3.00 .75 5.3083 .9000 .0405 .90 3.00 1.00 6.0777 .9000 .0304 .90 3.00 1.25 6.8471 .9000 .0243 .90 3.00 1.50 7.6165 .9000 .0203 .90 4.00 .50 5.5388 .9000 .0608 .90 4.00 .75 6.3083 .9000 .0405 .90 4.00 1.00 7.0777 .9000 .0304 .90 4.00 1.25 7.8471 .9000 .0243 .90 4.00 1.50 8.6165 .9000 .0203 .90 5.00 .50 6.5388 .9000 .0608 .90 5.00 .75 7.3083 .9000 .0405 .90 5.00 1.00 8.0777 .9000 .0304 .90 5.00 1.25 8.8471 .9000 .0243 .90 5.00 1.50 9.6165 .9000 .0203 .99 -5.00 .50 10.9103 .9900 .0006 .99 -5.00 .75 18.8654 .9900 .0004 .99 -5.00 1.00 26.8205 .9900 .0003 .99 -5.00 1.25 34.7756 .9900 .0003 .99 -5.00 1.50 42.7308 .9900 .0002 .99 -4.00 .50 11.9103 .9900 .0006 .99 -4.00 .75 19.8654 .9900 .0004 .99 -4.00 1.00 27.8205 .9900 .0003 .99 -4.00 1.25 35.7756 .9900 .0003 .99 -4.00 1.50 43.7308 .9900 .0002 .99 -3.00 .50 12.9103 .9900 .0006 .99 -3.00 .75 20.8654 .9900 .0004 .99 -3.00 1.00 28.8205 .9900 .0003 .99 -3.00 1.25 36.7756 .9900 .0003 .99 -3.00 1.50 44.7308 .9900 .0002 .99 -2.00 .50 13.9103 .9900 .0006 .99 -2.00 .75 21.8654 .9900 .0004 .99 -2.00 1.00 29.8205 .9900 .0003 .99 -2.00 1.25 37.7756 .9900 .0003 .99 -2.00 1.50 45.7308 .9900 .0002 .99 -1.00 .50 14.9103 .9900 .0006 .99 -1.00 .75 22.8654 .9900 .0004 .99 -1.00 1.00 30.8205 .9900 .0003 .99 -1.00 1.25 38.7756 .9900 .0003 .99 -1.00 1.50 46.7308 .9900 .0002 .99 .00 .50 15.9103 .9900 .0006 .99 .00 .75 23.8654 .9900 .0004 .99 .00 1.00 31.8205 .9900 .0003 .99 .00 1.25 39.7756 .9900 .0003 .99 .00 1.50 47.7308 .9900 .0002 .99 1.00 .50 16.9103 .9900 .0006 .99 1.00 .75 24.8654 .9900 .0004 .99 1.00 1.00 32.8205 .9900 .0003 .99 1.00 1.25 40.7756 .9900 .0003 .99 1.00 1.50 48.7308 .9900 .0002 .99 2.00 .50 17.9103 .9900 .0006 .99 2.00 .75 25.8654 .9900 .0004 .99 2.00 1.00 33.8205 .9900 .0003 .99 2.00 1.25 41.7756 .9900 .0003 .99 2.00 1.50 49.7308 .9900 .0002 .99 3.00 .50 18.9103 .9900 .0006 .99 3.00 .75 26.8654 .9900 .0004 .99 3.00 1.00 34.8205 .9900 .0003 .99 3.00 1.25 42.7756 .9900 .0003 .99 3.00 1.50 50.7308 .9900 .0002 .99 4.00 .50 19.9103 .9900 .0006 .99 4.00 .75 27.8654 .9900 .0004 .99 4.00 1.00 35.8205 .9900 .0003 .99 4.00 1.25 43.7756 .9900 .0003 .99 4.00 1.50 51.7308 .9900 .0002 .99 5.00 .50 20.9103 .9900 .0006 .99 5.00 .75 28.8654 .9900 .0004 .99 5.00 1.00 36.8205 .9900 .0003 .99 5.00 1.25 44.7756 .9900 .0003 .99 5.00 1.50 52.7308 .9900 .0002 ]) RANDIST_CHECK([chisq], [df], [cdf pdf sig], [dnl P df x cdf pdf sig .01 1.00 .0002 .0100 31.8277 .9900 .01 2.00 .0201 .0100 .4950 .9900 .01 5.00 .5543 .0100 .0416 .9900 .01 10.00 2.5582 .0100 .0155 .9900 .10 1.00 .0158 .1000 3.1498 .9000 .10 2.00 .2107 .1000 .4500 .9000 .10 5.00 1.6103 .1000 .1215 .9000 .10 10.00 4.8652 .1000 .0641 .9000 .20 1.00 .0642 .2000 1.5250 .8000 .20 2.00 .4463 .2000 .4000 .8000 .20 5.00 2.3425 .2000 .1478 .8000 .20 10.00 6.1791 .2000 .0864 .8000 .30 1.00 .1485 .3000 .9613 .7000 .30 2.00 .7133 .3000 .3500 .7000 .30 5.00 2.9999 .3000 .1542 .7000 .30 10.00 7.2672 .3000 .0960 .7000 .40 1.00 .2750 .4000 .6630 .6000 .40 2.00 1.0217 .4000 .3000 .6000 .40 5.00 3.6555 .4000 .1494 .6000 .40 10.00 8.2955 .4000 .0974 .6000 .50 1.00 .4549 .5000 .4711 .5000 .50 2.00 1.3863 .5000 .2500 .5000 .50 5.00 4.3515 .5000 .1370 .5000 .50 10.00 9.3418 .5000 .0929 .5000 .60 1.00 .7083 .6000 .3326 .4000 .60 2.00 1.8326 .6000 .2000 .4000 .60 5.00 5.1319 .6000 .1188 .4000 .60 10.00 10.4732 .6000 .0833 .4000 .70 1.00 1.0742 .7000 .2250 .3000 .70 2.00 2.4079 .7000 .1500 .3000 .70 5.00 6.0644 .7000 .0957 .3000 .70 10.00 11.7807 .7000 .0694 .3000 .80 1.00 1.6424 .8000 .1369 .2000 .80 2.00 3.2189 .8000 .1000 .2000 .80 5.00 7.2893 .8000 .0684 .2000 .80 10.00 13.4420 .8000 .0512 .2000 .90 1.00 2.7055 .9000 .0627 .1000 .90 2.00 4.6052 .9000 .0500 .1000 .90 5.00 9.2364 .9000 .0368 .1000 .90 10.00 15.9872 .9000 .0287 .1000 .99 1.00 6.6349 .9900 .0056 .0100 .99 2.00 9.2103 .9900 .0050 .0100 .99 5.00 15.0863 .9900 .0041 .0100 .99 10.00 23.2093 .9900 .0034 .0100 ]) RANDIST_CHECK([exp], [a], [cdf pdf], [dnl P a x cdf pdf .01 1.00 .0101 .0100 .9900 .01 2.00 .0050 .0100 1.9800 .01 5.00 .0020 .0100 4.9500 .01 10.00 .0010 .0100 9.9000 .10 1.00 .1054 .1000 .9000 .10 2.00 .0527 .1000 1.8000 .10 5.00 .0211 .1000 4.5000 .10 10.00 .0105 .1000 9.0000 .20 1.00 .2231 .2000 .8000 .20 2.00 .1116 .2000 1.6000 .20 5.00 .0446 .2000 4.0000 .20 10.00 .0223 .2000 8.0000 .30 1.00 .3567 .3000 .7000 .30 2.00 .1783 .3000 1.4000 .30 5.00 .0713 .3000 3.5000 .30 10.00 .0357 .3000 7.0000 .40 1.00 .5108 .4000 .6000 .40 2.00 .2554 .4000 1.2000 .40 5.00 .1022 .4000 3.0000 .40 10.00 .0511 .4000 6.0000 .50 1.00 .6931 .5000 .5000 .50 2.00 .3466 .5000 1.0000 .50 5.00 .1386 .5000 2.5000 .50 10.00 .0693 .5000 5.0000 .60 1.00 .9163 .6000 .4000 .60 2.00 .4581 .6000 .8000 .60 5.00 .1833 .6000 2.0000 .60 10.00 .0916 .6000 4.0000 .70 1.00 1.2040 .7000 .3000 .70 2.00 .6020 .7000 .6000 .70 5.00 .2408 .7000 1.5000 .70 10.00 .1204 .7000 3.0000 .80 1.00 1.6094 .8000 .2000 .80 2.00 .8047 .8000 .4000 .80 5.00 .3219 .8000 1.0000 .80 10.00 .1609 .8000 2.0000 .90 1.00 2.3026 .9000 .1000 .90 2.00 1.1513 .9000 .2000 .90 5.00 .4605 .9000 .5000 .90 10.00 .2303 .9000 1.0000 .99 1.00 4.6052 .9900 .0100 .99 2.00 2.3026 .9900 .0200 .99 5.00 .9210 .9900 .0500 .99 10.00 .4605 .9900 .1000 ]) RANDIST_CHECK([f], [df1 df2], [cdf pdf], [dnl P df1 df2 x cdf pdf .01 1.00 1.00 .0002 .0100 20.2576 .01 1.00 2.00 .0002 .0100 24.9950 .01 1.00 5.00 .0002 .0100 28.8162 .01 1.00 10.00 .0002 .0100 30.2774 .01 2.00 1.00 .0102 .0100 .9703 .01 2.00 2.00 .0101 .0100 .9801 .01 2.00 5.00 .0101 .0100 .9860 .01 2.00 10.00 .0101 .0100 .9880 .01 5.00 1.00 .0615 .0100 .3238 .01 5.00 2.00 .0753 .0100 .2793 .01 5.00 5.00 .0912 .0100 .2417 .01 5.00 10.00 .0995 .0100 .2261 .01 10.00 1.00 .0996 .0100 .2704 .01 10.00 2.00 .1323 .0100 .2275 .01 10.00 5.00 .1774 .0100 .1907 .01 10.00 10.00 .2062 .0100 .1747 .10 1.00 1.00 .0251 .1000 1.9605 .10 1.00 2.00 .0202 .1000 2.4503 .10 1.00 5.00 .0175 .1000 2.8421 .10 1.00 10.00 .0166 .1000 2.9915 .10 2.00 1.00 .1173 .1000 .7290 .10 2.00 2.00 .1111 .1000 .8100 .10 2.00 5.00 .1076 .1000 .8629 .10 2.00 10.00 .1065 .1000 .8812 .10 5.00 1.00 .2463 .1000 .5220 .10 5.00 2.00 .2646 .1000 .5687 .10 5.00 5.00 .2896 .1000 .5934 .10 5.00 10.00 .3033 .1000 .6006 .10 10.00 1.00 .3044 .1000 .4857 .10 10.00 2.00 .3419 .1000 .5396 .10 10.00 5.00 .3966 .1000 .5816 .10 10.00 10.00 .4306 .1000 .6031 .20 1.00 1.00 .1056 .2000 .8861 .20 1.00 2.00 .0833 .2000 1.1520 .20 1.00 5.00 .0714 .2000 1.3616 .20 1.00 10.00 .0677 .2000 1.4410 .20 2.00 1.00 .2812 .2000 .5120 .20 2.00 2.00 .2500 .2000 .6400 .20 2.00 5.00 .2334 .2000 .7317 .20 2.00 10.00 .2282 .2000 .7651 .20 5.00 1.00 .4591 .2000 .4124 .20 5.00 2.00 .4426 .2000 .5362 .20 5.00 5.00 .4489 .2000 .6397 .20 5.00 10.00 .4563 .2000 .6842 .20 10.00 1.00 .5311 .2000 .3893 .20 10.00 2.00 .5267 .2000 .5225 .20 10.00 5.00 .5547 .2000 .6584 .20 10.00 10.00 .5775 .2000 .7343 .30 1.00 1.00 .2596 .3000 .4960 .30 1.00 2.00 .1978 .3000 .6901 .30 1.00 5.00 .1667 .3000 .8428 .30 1.00 10.00 .1573 .3000 .9004 .30 2.00 1.00 .5204 .3000 .3430 .30 2.00 2.00 .4286 .3000 .4900 .30 2.00 5.00 .3834 .3000 .6069 .30 2.00 10.00 .3697 .3000 .6518 .30 5.00 1.00 .7486 .3000 .2880 .30 5.00 2.00 .6466 .3000 .4433 .30 5.00 5.00 .6094 .3000 .5984 .30 5.00 10.00 .6026 .3000 .6729 .30 10.00 1.00 .8370 .3000 .2732 .30 10.00 2.00 .7346 .3000 .4370 .30 10.00 5.00 .7085 .3000 .6313 .30 10.00 10.00 .7112 .3000 .7487 .40 1.00 1.00 .5279 .4000 .2868 .40 1.00 2.00 .3810 .4000 .4410 .40 1.00 5.00 .3130 .4000 .5656 .40 1.00 10.00 .2933 .4000 .6129 .40 2.00 1.00 .8889 .4000 .2160 .40 2.00 2.00 .6667 .4000 .3600 .40 2.00 5.00 .5668 .4000 .4891 .40 2.00 10.00 .5378 .4000 .5417 .40 5.00 1.00 1.1826 .4000 .1847 .40 5.00 2.00 .9035 .4000 .3396 .40 5.00 5.00 .7879 .4000 .5199 .40 5.00 10.00 .7573 .4000 .6147 .40 10.00 1.00 1.2941 .4000 .1755 .40 10.00 2.00 .9944 .4000 .3368 .40 10.00 5.00 .8763 .4000 .5572 .40 10.00 10.00 .8484 .4000 .7011 .50 1.00 1.00 1.0000 .5000 .1592 .50 1.00 2.00 .6667 .5000 .2813 .50 1.00 5.00 .5281 .5000 .3865 .50 1.00 10.00 .4897 .5000 .4274 .50 2.00 1.00 1.5000 .5000 .1250 .50 2.00 2.00 1.0000 .5000 .2500 .50 2.00 5.00 .7988 .5000 .3789 .50 2.00 10.00 .7435 .5000 .4353 .50 5.00 1.00 1.8937 .5000 .1078 .50 5.00 2.00 1.2519 .5000 .2418 .50 5.00 5.00 1.0000 .5000 .4244 .50 5.00 10.00 .9319 .5000 .5295 .50 10.00 1.00 2.0419 .5000 .1025 .50 10.00 2.00 1.3450 .5000 .2406 .50 10.00 5.00 1.0730 .5000 .4599 .50 10.00 10.00 1.0000 .5000 .6152 .60 1.00 1.00 1.8944 .6000 .0799 .60 1.00 2.00 1.1250 .6000 .1707 .60 1.00 5.00 .8456 .6000 .2583 .60 1.00 10.00 .7727 .6000 .2939 .60 2.00 1.00 2.6250 .6000 .0640 .60 2.00 2.00 1.5000 .6000 .1600 .60 2.00 5.00 1.1067 .6000 .2773 .60 2.00 10.00 1.0056 .6000 .3330 .60 5.00 1.00 3.1953 .6000 .0554 .60 5.00 2.00 1.7644 .6000 .1571 .60 5.00 5.00 1.2692 .6000 .3227 .60 5.00 10.00 1.1412 .6000 .4278 .60 10.00 1.00 3.4100 .6000 .0527 .60 10.00 2.00 1.8593 .6000 .1567 .60 10.00 5.00 1.3204 .6000 .3526 .60 10.00 10.00 1.1787 .6000 .5047 .70 1.00 1.00 3.8518 .7000 .0334 .70 1.00 2.00 1.9216 .7000 .0929 .70 1.00 5.00 1.3358 .7000 .1614 .70 1.00 10.00 1.1948 .7000 .1914 .70 2.00 1.00 5.0556 .7000 .0270 .70 2.00 2.00 2.3333 .7000 .0900 .70 2.00 5.00 1.5466 .7000 .1853 .70 2.00 10.00 1.3613 .7000 .2358 .70 5.00 1.00 6.0006 .7000 .0234 .70 5.00 2.00 2.6084 .7000 .0892 .70 5.00 5.00 1.6410 .7000 .2222 .70 5.00 10.00 1.4114 .7000 .3169 .70 10.00 1.00 6.3579 .7000 .0223 .70 10.00 2.00 2.7049 .7000 .0891 .70 10.00 5.00 1.6595 .7000 .2443 .70 10.00 10.00 1.4061 .7000 .3787 .80 1.00 1.00 9.4721 .8000 .0099 .80 1.00 2.00 3.5556 .8000 .0405 .80 1.00 5.00 2.1782 .8000 .0869 .80 1.00 10.00 1.8829 .8000 .1098 .80 2.00 1.00 12.0000 .8000 .0080 .80 2.00 2.00 4.0000 .8000 .0400 .80 2.00 5.00 2.2591 .8000 .1051 .80 2.00 10.00 1.8986 .8000 .1450 .80 5.00 1.00 14.0084 .8000 .0069 .80 5.00 2.00 4.2844 .8000 .0399 .80 5.00 5.00 2.2275 .8000 .1289 .80 5.00 10.00 1.8027 .8000 .2026 .80 10.00 1.00 14.7719 .8000 .0066 .80 10.00 2.00 4.3822 .8000 .0398 .80 10.00 5.00 2.1914 .8000 .1425 .80 10.00 10.00 1.7316 .8000 .2449 .90 1.00 1.00 39.8635 .9000 .0012 .90 1.00 2.00 8.5263 .9000 .0100 .90 1.00 5.00 4.0604 .9000 .0317 .90 1.00 10.00 3.2850 .9000 .0450 .90 2.00 1.00 49.5000 .9000 .0010 .90 2.00 2.00 9.0000 .9000 .0100 .90 2.00 5.00 3.7797 .9000 .0398 .90 2.00 10.00 2.9245 .9000 .0631 .90 5.00 1.00 57.2401 .9000 .0009 .90 5.00 2.00 9.2926 .9000 .0100 .90 5.00 5.00 3.4530 .9000 .0498 .90 5.00 10.00 2.5216 .9000 .0915 .90 10.00 1.00 60.1950 .9000 .0008 .90 10.00 2.00 9.3916 .9000 .0100 .90 10.00 5.00 3.2974 .9000 .0552 .90 10.00 10.00 2.3226 .9000 .1118 .99 1.00 1.00 4052.1807 .9900 .0000 .99 1.00 2.00 98.5025 .9900 .0001 .99 1.00 5.00 16.2582 .9900 .0012 .99 1.00 10.00 10.0443 .9900 .0027 .99 2.00 1.00 4999.5000 .9900 .0000 .99 2.00 2.00 99.0000 .9900 .0001 .99 2.00 5.00 13.2739 .9900 .0016 .99 2.00 10.00 7.5594 .9900 .0040 .99 5.00 1.00 5763.6496 .9900 .0000 .99 5.00 2.00 99.2993 .9900 .0001 .99 5.00 5.00 10.9670 .9900 .0020 .99 5.00 10.00 5.6363 .9900 .0060 .99 10.00 1.00 6055.8467 .9900 .0000 .99 10.00 2.00 99.3992 .9900 .0001 .99 10.00 5.00 10.0510 .9900 .0022 .99 10.00 10.00 4.8491 .9900 .0074 ]) RANDIST_CHECK([gamma], [a b], [cdf pdf], [dnl P a b x cdf pdf .01 .50 -10.00 . . . .01 .50 -5.00 . . . .01 .50 .00 . . . .01 .50 5.00 .0000 .0100 318.2766 .01 .50 10.00 .0000 .0100 636.5531 .01 1.00 -10.00 . . . .01 1.00 -5.00 . . . .01 1.00 .00 . . . .01 1.00 5.00 .0020 .0100 4.9500 .01 1.00 10.00 .0010 .0100 9.9000 .01 2.00 -10.00 . . . .01 2.00 -5.00 . . . .01 2.00 .00 . . . .01 2.00 5.00 .0297 .0100 .6402 .01 2.00 10.00 .0149 .0100 1.2805 .01 5.00 -10.00 . . . .01 5.00 -5.00 . . . .01 5.00 .00 . . . .01 5.00 5.00 .2558 .0100 .1552 .01 5.00 10.00 .1279 .0100 .3104 .10 .50 -10.00 . . . .10 .50 -5.00 . . . .10 .50 .00 . . . .10 .50 5.00 .0016 .1000 31.4977 .10 .50 10.00 .0008 .1000 62.9955 .10 1.00 -10.00 . . . .10 1.00 -5.00 . . . .10 1.00 .00 . . . .10 1.00 5.00 .0211 .1000 4.5000 .10 1.00 10.00 .0105 .1000 9.0000 .10 2.00 -10.00 . . . .10 2.00 -5.00 . . . .10 2.00 .00 . . . .10 2.00 5.00 .1064 .1000 1.5623 .10 2.00 10.00 .0532 .1000 3.1246 .10 5.00 -10.00 . . . .10 5.00 -5.00 . . . .10 5.00 .00 . . . .10 5.00 5.00 .4865 .1000 .6406 .10 5.00 10.00 .2433 .1000 1.2812 .20 .50 -10.00 . . . .20 .50 -5.00 . . . .20 .50 .00 . . . .20 .50 5.00 .0064 .2000 15.2495 .20 .50 10.00 .0032 .2000 30.4991 .20 1.00 -10.00 . . . .20 1.00 -5.00 . . . .20 1.00 .00 . . . .20 1.00 5.00 .0446 .2000 4.0000 .20 1.00 10.00 .0223 .2000 8.0000 .20 2.00 -10.00 . . . .20 2.00 -5.00 . . . .20 2.00 .00 . . . .20 2.00 5.00 .1649 .2000 1.8075 .20 2.00 10.00 .0824 .2000 3.6150 .20 5.00 -10.00 . . . .20 5.00 -5.00 . . . .20 5.00 .00 . . . .20 5.00 5.00 .6179 .2000 .8641 .20 5.00 10.00 .3090 .2000 1.7282 .30 .50 -10.00 . . . .30 .50 -5.00 . . . .30 .50 .00 . . . .30 .50 5.00 .0148 .3000 9.6128 .30 .50 10.00 .0074 .3000 19.2255 .30 1.00 -10.00 . . . .30 1.00 -5.00 . . . .30 1.00 .00 . . . .30 1.00 5.00 .0713 .3000 3.5000 .30 1.00 10.00 .0357 .3000 7.0000 .30 2.00 -10.00 . . . .30 2.00 -5.00 . . . .30 2.00 .00 . . . .30 2.00 5.00 .2195 .3000 1.8312 .30 2.00 10.00 .1097 .3000 3.6625 .30 5.00 -10.00 . . . .30 5.00 -5.00 . . . .30 5.00 .00 . . . .30 5.00 5.00 .7267 .3000 .9595 .30 5.00 10.00 .3634 .3000 1.9190 .40 .50 -10.00 . . . .40 .50 -5.00 . . . .40 .50 .00 . . . .40 .50 5.00 .0275 .4000 6.6303 .40 .50 10.00 .0137 .4000 13.2606 .40 1.00 -10.00 . . . .40 1.00 -5.00 . . . .40 1.00 .00 . . . .40 1.00 5.00 .1022 .4000 3.0000 .40 1.00 10.00 .0511 .4000 6.0000 .40 2.00 -10.00 . . . .40 2.00 -5.00 . . . .40 2.00 .00 . . . .40 2.00 5.00 .2753 .4000 1.7376 .40 2.00 10.00 .1376 .4000 3.4752 .40 5.00 -10.00 . . . .40 5.00 -5.00 . . . .40 5.00 .00 . . . .40 5.00 5.00 .8295 .4000 .9742 .40 5.00 10.00 .4148 .4000 1.9485 .50 .50 -10.00 . . . .50 .50 -5.00 . . . .50 .50 .00 . . . .50 .50 5.00 .0455 .5000 4.7114 .50 .50 10.00 .0227 .5000 9.4227 .50 1.00 -10.00 . . . .50 1.00 -5.00 . . . .50 1.00 .00 . . . .50 1.00 5.00 .1386 .5000 2.5000 .50 1.00 10.00 .0693 .5000 5.0000 .50 2.00 -10.00 . . . .50 2.00 -5.00 . . . .50 2.00 .00 . . . .50 2.00 5.00 .3357 .5000 1.5666 .50 2.00 10.00 .1678 .5000 3.1332 .50 5.00 -10.00 . . . .50 5.00 -5.00 . . . .50 5.00 .00 . . . .50 5.00 5.00 .9342 .5000 .9286 .50 5.00 10.00 .4671 .5000 1.8571 .60 .50 -10.00 . . . .60 .50 -5.00 . . . .60 .50 .00 . . . .60 .50 5.00 .0708 .6000 3.3265 .60 .50 10.00 .0354 .6000 6.6529 .60 1.00 -10.00 . . . .60 1.00 -5.00 . . . .60 1.00 .00 . . . .60 1.00 5.00 .1833 .6000 2.0000 .60 1.00 10.00 .0916 .6000 4.0000 .60 2.00 -10.00 . . . .60 2.00 -5.00 . . . .60 2.00 .00 . . . .60 2.00 5.00 .4045 .6000 1.3383 .60 2.00 10.00 .2022 .6000 2.6765 .60 5.00 -10.00 . . . .60 5.00 -5.00 . . . .60 5.00 .00 . . . .60 5.00 5.00 1.0473 .6000 .8332 .60 5.00 10.00 .5237 .6000 1.6663 .70 .50 -10.00 . . . .70 .50 -5.00 . . . .70 .50 .00 . . . .70 .50 5.00 .1074 .7000 2.2496 .70 .50 10.00 .0537 .7000 4.4993 .70 1.00 -10.00 . . . .70 1.00 -5.00 . . . .70 1.00 .00 . . . .70 1.00 5.00 .2408 .7000 1.5000 .70 1.00 10.00 .1204 .7000 3.0000 .70 2.00 -10.00 . . . .70 2.00 -5.00 . . . .70 2.00 .00 . . . .70 2.00 5.00 .4878 .7000 1.0639 .70 2.00 10.00 .2439 .7000 2.1277 .70 5.00 -10.00 . . . .70 5.00 -5.00 . . . .70 5.00 .00 . . . .70 5.00 5.00 1.1781 .7000 .6937 .70 5.00 10.00 .5890 .7000 1.3874 .80 .50 -10.00 . . . .80 .50 -5.00 . . . .80 .50 .00 . . . .80 .50 5.00 .1642 .8000 1.3694 .80 .50 10.00 .0821 .8000 2.7388 .80 1.00 -10.00 . . . .80 1.00 -5.00 . . . .80 1.00 .00 . . . .80 1.00 5.00 .3219 .8000 1.0000 .80 1.00 10.00 .1609 .8000 2.0000 .80 2.00 -10.00 . . . .80 2.00 -5.00 . . . .80 2.00 .00 . . . .80 2.00 5.00 .5989 .8000 .7496 .80 2.00 10.00 .2994 .8000 1.4993 .80 5.00 -10.00 . . . .80 5.00 -5.00 . . . .80 5.00 .00 . . . .80 5.00 5.00 1.3442 .8000 .5124 .80 5.00 10.00 .6721 .8000 1.0248 .90 .50 -10.00 . . . .90 .50 -5.00 . . . .90 .50 .00 . . . .90 .50 5.00 .2706 .9000 .6270 .90 .50 10.00 .1353 .9000 1.2540 .90 1.00 -10.00 . . . .90 1.00 -5.00 . . . .90 1.00 .00 . . . .90 1.00 5.00 .4605 .9000 .5000 .90 1.00 10.00 .2303 .9000 1.0000 .90 2.00 -10.00 . . . .90 2.00 -5.00 . . . .90 2.00 .00 . . . .90 2.00 5.00 .7779 .9000 .3977 .90 2.00 10.00 .3890 .9000 .7955 .90 5.00 -10.00 . . . .90 5.00 -5.00 . . . .90 5.00 .00 . . . .90 5.00 5.00 1.5987 .9000 .2872 .90 5.00 10.00 .7994 .9000 .5744 .99 .50 -10.00 . . . .99 .50 -5.00 . . . .99 .50 .00 . . . .99 .50 5.00 .6635 .9900 .0561 .99 .50 10.00 .3317 .9900 .1123 .99 1.00 -10.00 . . . .99 1.00 -5.00 . . . .99 1.00 .00 . . . .99 1.00 5.00 .9210 .9900 .0500 .99 1.00 10.00 .4605 .9900 .1000 .99 2.00 -10.00 . . . .99 2.00 -5.00 . . . .99 2.00 .00 . . . .99 2.00 5.00 1.3277 .9900 .0435 .99 2.00 10.00 .6638 .9900 .0869 .99 5.00 -10.00 . . . .99 5.00 -5.00 . . . .99 5.00 .00 . . . .99 5.00 5.00 2.3209 .9900 .0345 .99 5.00 10.00 1.1605 .9900 .0689 ]) RANDIST_CHECK([laplace], [a b], [cdf pdf], [dnl P a b x cdf pdf .01 -10.00 .50 -11.9560 .0100 .0200 .01 -10.00 1.00 -13.9120 .0100 .0100 .01 -10.00 2.00 -17.8240 .0100 .0050 .01 -10.00 5.00 -29.5601 .0100 .0020 .01 -5.00 .50 -6.9560 .0100 .0200 .01 -5.00 1.00 -8.9120 .0100 .0100 .01 -5.00 2.00 -12.8240 .0100 .0050 .01 -5.00 5.00 -24.5601 .0100 .0020 .01 .00 .50 -1.9560 .0100 .0200 .01 .00 1.00 -3.9120 .0100 .0100 .01 .00 2.00 -7.8240 .0100 .0050 .01 .00 5.00 -19.5601 .0100 .0020 .01 5.00 .50 3.0440 .0100 .0200 .01 5.00 1.00 1.0880 .0100 .0100 .01 5.00 2.00 -2.8240 .0100 .0050 .01 5.00 5.00 -14.5601 .0100 .0020 .01 10.00 .50 8.0440 .0100 .0200 .01 10.00 1.00 6.0880 .0100 .0100 .01 10.00 2.00 2.1760 .0100 .0050 .01 10.00 5.00 -9.5601 .0100 .0020 .10 -10.00 .50 -10.8047 .1000 .2000 .10 -10.00 1.00 -11.6094 .1000 .1000 .10 -10.00 2.00 -13.2189 .1000 .0500 .10 -10.00 5.00 -18.0472 .1000 .0200 .10 -5.00 .50 -5.8047 .1000 .2000 .10 -5.00 1.00 -6.6094 .1000 .1000 .10 -5.00 2.00 -8.2189 .1000 .0500 .10 -5.00 5.00 -13.0472 .1000 .0200 .10 .00 .50 -.8047 .1000 .2000 .10 .00 1.00 -1.6094 .1000 .1000 .10 .00 2.00 -3.2189 .1000 .0500 .10 .00 5.00 -8.0472 .1000 .0200 .10 5.00 .50 4.1953 .1000 .2000 .10 5.00 1.00 3.3906 .1000 .1000 .10 5.00 2.00 1.7811 .1000 .0500 .10 5.00 5.00 -3.0472 .1000 .0200 .10 10.00 .50 9.1953 .1000 .2000 .10 10.00 1.00 8.3906 .1000 .1000 .10 10.00 2.00 6.7811 .1000 .0500 .10 10.00 5.00 1.9528 .1000 .0200 .20 -10.00 .50 -10.4581 .2000 .4000 .20 -10.00 1.00 -10.9163 .2000 .2000 .20 -10.00 2.00 -11.8326 .2000 .1000 .20 -10.00 5.00 -14.5815 .2000 .0400 .20 -5.00 .50 -5.4581 .2000 .4000 .20 -5.00 1.00 -5.9163 .2000 .2000 .20 -5.00 2.00 -6.8326 .2000 .1000 .20 -5.00 5.00 -9.5815 .2000 .0400 .20 .00 .50 -.4581 .2000 .4000 .20 .00 1.00 -.9163 .2000 .2000 .20 .00 2.00 -1.8326 .2000 .1000 .20 .00 5.00 -4.5815 .2000 .0400 .20 5.00 .50 4.5419 .2000 .4000 .20 5.00 1.00 4.0837 .2000 .2000 .20 5.00 2.00 3.1674 .2000 .1000 .20 5.00 5.00 .4185 .2000 .0400 .20 10.00 .50 9.5419 .2000 .4000 .20 10.00 1.00 9.0837 .2000 .2000 .20 10.00 2.00 8.1674 .2000 .1000 .20 10.00 5.00 5.4185 .2000 .0400 .30 -10.00 .50 -10.2554 .3000 .6000 .30 -10.00 1.00 -10.5108 .3000 .3000 .30 -10.00 2.00 -11.0217 .3000 .1500 .30 -10.00 5.00 -12.5541 .3000 .0600 .30 -5.00 .50 -5.2554 .3000 .6000 .30 -5.00 1.00 -5.5108 .3000 .3000 .30 -5.00 2.00 -6.0217 .3000 .1500 .30 -5.00 5.00 -7.5541 .3000 .0600 .30 .00 .50 -.2554 .3000 .6000 .30 .00 1.00 -.5108 .3000 .3000 .30 .00 2.00 -1.0217 .3000 .1500 .30 .00 5.00 -2.5541 .3000 .0600 .30 5.00 .50 4.7446 .3000 .6000 .30 5.00 1.00 4.4892 .3000 .3000 .30 5.00 2.00 3.9783 .3000 .1500 .30 5.00 5.00 2.4459 .3000 .0600 .30 10.00 .50 9.7446 .3000 .6000 .30 10.00 1.00 9.4892 .3000 .3000 .30 10.00 2.00 8.9783 .3000 .1500 .30 10.00 5.00 7.4459 .3000 .0600 .40 -10.00 .50 -10.1116 .4000 .8000 .40 -10.00 1.00 -10.2231 .4000 .4000 .40 -10.00 2.00 -10.4463 .4000 .2000 .40 -10.00 5.00 -11.1157 .4000 .0800 .40 -5.00 .50 -5.1116 .4000 .8000 .40 -5.00 1.00 -5.2231 .4000 .4000 .40 -5.00 2.00 -5.4463 .4000 .2000 .40 -5.00 5.00 -6.1157 .4000 .0800 .40 .00 .50 -.1116 .4000 .8000 .40 .00 1.00 -.2231 .4000 .4000 .40 .00 2.00 -.4463 .4000 .2000 .40 .00 5.00 -1.1157 .4000 .0800 .40 5.00 .50 4.8884 .4000 .8000 .40 5.00 1.00 4.7769 .4000 .4000 .40 5.00 2.00 4.5537 .4000 .2000 .40 5.00 5.00 3.8843 .4000 .0800 .40 10.00 .50 9.8884 .4000 .8000 .40 10.00 1.00 9.7769 .4000 .4000 .40 10.00 2.00 9.5537 .4000 .2000 .40 10.00 5.00 8.8843 .4000 .0800 .50 -10.00 .50 -10.0000 .5000 1.0000 .50 -10.00 1.00 -10.0000 .5000 .5000 .50 -10.00 2.00 -10.0000 .5000 .2500 .50 -10.00 5.00 -10.0000 .5000 .1000 .50 -5.00 .50 -5.0000 .5000 1.0000 .50 -5.00 1.00 -5.0000 .5000 .5000 .50 -5.00 2.00 -5.0000 .5000 .2500 .50 -5.00 5.00 -5.0000 .5000 .1000 .50 .00 .50 .0000 .5000 1.0000 .50 .00 1.00 .0000 .5000 .5000 .50 .00 2.00 .0000 .5000 .2500 .50 .00 5.00 .0000 .5000 .1000 .50 5.00 .50 5.0000 .5000 1.0000 .50 5.00 1.00 5.0000 .5000 .5000 .50 5.00 2.00 5.0000 .5000 .2500 .50 5.00 5.00 5.0000 .5000 .1000 .50 10.00 .50 10.0000 .5000 1.0000 .50 10.00 1.00 10.0000 .5000 .5000 .50 10.00 2.00 10.0000 .5000 .2500 .50 10.00 5.00 10.0000 .5000 .1000 .60 -10.00 .50 -9.8884 .6000 .8000 .60 -10.00 1.00 -9.7769 .6000 .4000 .60 -10.00 2.00 -9.5537 .6000 .2000 .60 -10.00 5.00 -8.8843 .6000 .0800 .60 -5.00 .50 -4.8884 .6000 .8000 .60 -5.00 1.00 -4.7769 .6000 .4000 .60 -5.00 2.00 -4.5537 .6000 .2000 .60 -5.00 5.00 -3.8843 .6000 .0800 .60 .00 .50 .1116 .6000 .8000 .60 .00 1.00 .2231 .6000 .4000 .60 .00 2.00 .4463 .6000 .2000 .60 .00 5.00 1.1157 .6000 .0800 .60 5.00 .50 5.1116 .6000 .8000 .60 5.00 1.00 5.2231 .6000 .4000 .60 5.00 2.00 5.4463 .6000 .2000 .60 5.00 5.00 6.1157 .6000 .0800 .60 10.00 .50 10.1116 .6000 .8000 .60 10.00 1.00 10.2231 .6000 .4000 .60 10.00 2.00 10.4463 .6000 .2000 .60 10.00 5.00 11.1157 .6000 .0800 .70 -10.00 .50 -9.7446 .7000 .6000 .70 -10.00 1.00 -9.4892 .7000 .3000 .70 -10.00 2.00 -8.9783 .7000 .1500 .70 -10.00 5.00 -7.4459 .7000 .0600 .70 -5.00 .50 -4.7446 .7000 .6000 .70 -5.00 1.00 -4.4892 .7000 .3000 .70 -5.00 2.00 -3.9783 .7000 .1500 .70 -5.00 5.00 -2.4459 .7000 .0600 .70 .00 .50 .2554 .7000 .6000 .70 .00 1.00 .5108 .7000 .3000 .70 .00 2.00 1.0217 .7000 .1500 .70 .00 5.00 2.5541 .7000 .0600 .70 5.00 .50 5.2554 .7000 .6000 .70 5.00 1.00 5.5108 .7000 .3000 .70 5.00 2.00 6.0217 .7000 .1500 .70 5.00 5.00 7.5541 .7000 .0600 .70 10.00 .50 10.2554 .7000 .6000 .70 10.00 1.00 10.5108 .7000 .3000 .70 10.00 2.00 11.0217 .7000 .1500 .70 10.00 5.00 12.5541 .7000 .0600 .80 -10.00 .50 -9.5419 .8000 .4000 .80 -10.00 1.00 -9.0837 .8000 .2000 .80 -10.00 2.00 -8.1674 .8000 .1000 .80 -10.00 5.00 -5.4185 .8000 .0400 .80 -5.00 .50 -4.5419 .8000 .4000 .80 -5.00 1.00 -4.0837 .8000 .2000 .80 -5.00 2.00 -3.1674 .8000 .1000 .80 -5.00 5.00 -.4185 .8000 .0400 .80 .00 .50 .4581 .8000 .4000 .80 .00 1.00 .9163 .8000 .2000 .80 .00 2.00 1.8326 .8000 .1000 .80 .00 5.00 4.5815 .8000 .0400 .80 5.00 .50 5.4581 .8000 .4000 .80 5.00 1.00 5.9163 .8000 .2000 .80 5.00 2.00 6.8326 .8000 .1000 .80 5.00 5.00 9.5815 .8000 .0400 .80 10.00 .50 10.4581 .8000 .4000 .80 10.00 1.00 10.9163 .8000 .2000 .80 10.00 2.00 11.8326 .8000 .1000 .80 10.00 5.00 14.5815 .8000 .0400 .90 -10.00 .50 -9.1953 .9000 .2000 .90 -10.00 1.00 -8.3906 .9000 .1000 .90 -10.00 2.00 -6.7811 .9000 .0500 .90 -10.00 5.00 -1.9528 .9000 .0200 .90 -5.00 .50 -4.1953 .9000 .2000 .90 -5.00 1.00 -3.3906 .9000 .1000 .90 -5.00 2.00 -1.7811 .9000 .0500 .90 -5.00 5.00 3.0472 .9000 .0200 .90 .00 .50 .8047 .9000 .2000 .90 .00 1.00 1.6094 .9000 .1000 .90 .00 2.00 3.2189 .9000 .0500 .90 .00 5.00 8.0472 .9000 .0200 .90 5.00 .50 5.8047 .9000 .2000 .90 5.00 1.00 6.6094 .9000 .1000 .90 5.00 2.00 8.2189 .9000 .0500 .90 5.00 5.00 13.0472 .9000 .0200 .90 10.00 .50 10.8047 .9000 .2000 .90 10.00 1.00 11.6094 .9000 .1000 .90 10.00 2.00 13.2189 .9000 .0500 .90 10.00 5.00 18.0472 .9000 .0200 .99 -10.00 .50 -8.0440 .9900 .0200 .99 -10.00 1.00 -6.0880 .9900 .0100 .99 -10.00 2.00 -2.1760 .9900 .0050 .99 -10.00 5.00 9.5601 .9900 .0020 .99 -5.00 .50 -3.0440 .9900 .0200 .99 -5.00 1.00 -1.0880 .9900 .0100 .99 -5.00 2.00 2.8240 .9900 .0050 .99 -5.00 5.00 14.5601 .9900 .0020 .99 .00 .50 1.9560 .9900 .0200 .99 .00 1.00 3.9120 .9900 .0100 .99 .00 2.00 7.8240 .9900 .0050 .99 .00 5.00 19.5601 .9900 .0020 .99 5.00 .50 6.9560 .9900 .0200 .99 5.00 1.00 8.9120 .9900 .0100 .99 5.00 2.00 12.8240 .9900 .0050 .99 5.00 5.00 24.5601 .9900 .0020 .99 10.00 .50 11.9560 .9900 .0200 .99 10.00 1.00 13.9120 .9900 .0100 .99 10.00 2.00 17.8240 .9900 .0050 .99 10.00 5.00 29.5601 .9900 .0020 ]) RANDIST_CHECK([logistic], [a b], [cdf pdf], [dnl P a b x cdf pdf .01 -10.00 .50 -12.2976 .0100 .0198 .01 -10.00 1.00 -14.5951 .0100 .0099 .01 -10.00 2.00 -19.1902 .0100 .0049 .01 -10.00 5.00 -32.9756 .0100 .0020 .01 -5.00 .50 -7.2976 .0100 .0198 .01 -5.00 1.00 -9.5951 .0100 .0099 .01 -5.00 2.00 -14.1902 .0100 .0050 .01 -5.00 5.00 -27.9756 .0100 .0020 .01 .00 .50 -2.2976 .0100 .0198 .01 .00 1.00 -4.5951 .0100 .0099 .01 .00 2.00 -9.1902 .0100 .0050 .01 .00 5.00 -22.9756 .0100 .0020 .01 5.00 .50 2.7024 .0100 .0198 .01 5.00 1.00 .4049 .0100 .0099 .01 5.00 2.00 -4.1902 .0100 .0050 .01 5.00 5.00 -17.9756 .0100 .0020 .01 10.00 .50 7.7024 .0100 .0198 .01 10.00 1.00 5.4049 .0100 .0099 .01 10.00 2.00 .8098 .0100 .0050 .01 10.00 5.00 -12.9756 .0100 .0020 .10 -10.00 .50 -11.0986 .1000 .1800 .10 -10.00 1.00 -12.1972 .1000 .0900 .10 -10.00 2.00 -14.3944 .1000 .0450 .10 -10.00 5.00 -20.9861 .1000 .0180 .10 -5.00 .50 -6.0986 .1000 .1800 .10 -5.00 1.00 -7.1972 .1000 .0900 .10 -5.00 2.00 -9.3944 .1000 .0450 .10 -5.00 5.00 -15.9861 .1000 .0180 .10 .00 .50 -1.0986 .1000 .1800 .10 .00 1.00 -2.1972 .1000 .0900 .10 .00 2.00 -4.3944 .1000 .0450 .10 .00 5.00 -10.9861 .1000 .0180 .10 5.00 .50 3.9014 .1000 .1800 .10 5.00 1.00 2.8028 .1000 .0900 .10 5.00 2.00 .6056 .1000 .0450 .10 5.00 5.00 -5.9861 .1000 .0180 .10 10.00 .50 8.9014 .1000 .1800 .10 10.00 1.00 7.8028 .1000 .0900 .10 10.00 2.00 5.6056 .1000 .0450 .10 10.00 5.00 -.9861 .1000 .0180 .20 -10.00 .50 -10.6931 .2000 .3200 .20 -10.00 1.00 -11.3863 .2000 .1600 .20 -10.00 2.00 -12.7726 .2000 .0800 .20 -10.00 5.00 -16.9315 .2000 .0320 .20 -5.00 .50 -5.6931 .2000 .3200 .20 -5.00 1.00 -6.3863 .2000 .1600 .20 -5.00 2.00 -7.7726 .2000 .0800 .20 -5.00 5.00 -11.9315 .2000 .0320 .20 .00 .50 -.6931 .2000 .3200 .20 .00 1.00 -1.3863 .2000 .1600 .20 .00 2.00 -2.7726 .2000 .0800 .20 .00 5.00 -6.9315 .2000 .0320 .20 5.00 .50 4.3069 .2000 .3200 .20 5.00 1.00 3.6137 .2000 .1600 .20 5.00 2.00 2.2274 .2000 .0800 .20 5.00 5.00 -1.9315 .2000 .0320 .20 10.00 .50 9.3069 .2000 .3200 .20 10.00 1.00 8.6137 .2000 .1600 .20 10.00 2.00 7.2274 .2000 .0800 .20 10.00 5.00 3.0685 .2000 .0320 .30 -10.00 .50 -10.4236 .3000 .4200 .30 -10.00 1.00 -10.8473 .3000 .2100 .30 -10.00 2.00 -11.6946 .3000 .1050 .30 -10.00 5.00 -14.2365 .3000 .0420 .30 -5.00 .50 -5.4236 .3000 .4200 .30 -5.00 1.00 -5.8473 .3000 .2100 .30 -5.00 2.00 -6.6946 .3000 .1050 .30 -5.00 5.00 -9.2365 .3000 .0420 .30 .00 .50 -.4236 .3000 .4200 .30 .00 1.00 -.8473 .3000 .2100 .30 .00 2.00 -1.6946 .3000 .1050 .30 .00 5.00 -4.2365 .3000 .0420 .30 5.00 .50 4.5764 .3000 .4200 .30 5.00 1.00 4.1527 .3000 .2100 .30 5.00 2.00 3.3054 .3000 .1050 .30 5.00 5.00 .7635 .3000 .0420 .30 10.00 .50 9.5764 .3000 .4200 .30 10.00 1.00 9.1527 .3000 .2100 .30 10.00 2.00 8.3054 .3000 .1050 .30 10.00 5.00 5.7635 .3000 .0420 .40 -10.00 .50 -10.2027 .4000 .4800 .40 -10.00 1.00 -10.4055 .4000 .2400 .40 -10.00 2.00 -10.8109 .4000 .1200 .40 -10.00 5.00 -12.0273 .4000 .0480 .40 -5.00 .50 -5.2027 .4000 .4800 .40 -5.00 1.00 -5.4055 .4000 .2400 .40 -5.00 2.00 -5.8109 .4000 .1200 .40 -5.00 5.00 -7.0273 .4000 .0480 .40 .00 .50 -.2027 .4000 .4800 .40 .00 1.00 -.4055 .4000 .2400 .40 .00 2.00 -.8109 .4000 .1200 .40 .00 5.00 -2.0273 .4000 .0480 .40 5.00 .50 4.7973 .4000 .4800 .40 5.00 1.00 4.5945 .4000 .2400 .40 5.00 2.00 4.1891 .4000 .1200 .40 5.00 5.00 2.9727 .4000 .0480 .40 10.00 .50 9.7973 .4000 .4800 .40 10.00 1.00 9.5945 .4000 .2400 .40 10.00 2.00 9.1891 .4000 .1200 .40 10.00 5.00 7.9727 .4000 .0480 .50 -10.00 .50 -10.0000 .5000 .5000 .50 -10.00 1.00 -10.0000 .5000 .2500 .50 -10.00 2.00 -10.0000 .5000 .1250 .50 -10.00 5.00 -10.0000 .5000 .0500 .50 -5.00 .50 -5.0000 .5000 .5000 .50 -5.00 1.00 -5.0000 .5000 .2500 .50 -5.00 2.00 -5.0000 .5000 .1250 .50 -5.00 5.00 -5.0000 .5000 .0500 .50 .00 .50 .0000 .5000 .5000 .50 .00 1.00 .0000 .5000 .2500 .50 .00 2.00 .0000 .5000 .1250 .50 .00 5.00 .0000 .5000 .0500 .50 5.00 .50 5.0000 .5000 .5000 .50 5.00 1.00 5.0000 .5000 .2500 .50 5.00 2.00 5.0000 .5000 .1250 .50 5.00 5.00 5.0000 .5000 .0500 .50 10.00 .50 10.0000 .5000 .5000 .50 10.00 1.00 10.0000 .5000 .2500 .50 10.00 2.00 10.0000 .5000 .1250 .50 10.00 5.00 10.0000 .5000 .0500 .60 -10.00 .50 -9.7973 .6000 .4800 .60 -10.00 1.00 -9.5945 .6000 .2400 .60 -10.00 2.00 -9.1891 .6000 .1200 .60 -10.00 5.00 -7.9727 .6000 .0480 .60 -5.00 .50 -4.7973 .6000 .4800 .60 -5.00 1.00 -4.5945 .6000 .2400 .60 -5.00 2.00 -4.1891 .6000 .1200 .60 -5.00 5.00 -2.9727 .6000 .0480 .60 .00 .50 .2027 .6000 .4800 .60 .00 1.00 .4055 .6000 .2400 .60 .00 2.00 .8109 .6000 .1200 .60 .00 5.00 2.0273 .6000 .0480 .60 5.00 .50 5.2027 .6000 .4800 .60 5.00 1.00 5.4055 .6000 .2400 .60 5.00 2.00 5.8109 .6000 .1200 .60 5.00 5.00 7.0273 .6000 .0480 .60 10.00 .50 10.2027 .6000 .4800 .60 10.00 1.00 10.4055 .6000 .2400 .60 10.00 2.00 10.8109 .6000 .1200 .60 10.00 5.00 12.0273 .6000 .0480 .70 -10.00 .50 -9.5764 .7000 .4200 .70 -10.00 1.00 -9.1527 .7000 .2100 .70 -10.00 2.00 -8.3054 .7000 .1050 .70 -10.00 5.00 -5.7635 .7000 .0420 .70 -5.00 .50 -4.5764 .7000 .4200 .70 -5.00 1.00 -4.1527 .7000 .2100 .70 -5.00 2.00 -3.3054 .7000 .1050 .70 -5.00 5.00 -.7635 .7000 .0420 .70 .00 .50 .4236 .7000 .4200 .70 .00 1.00 .8473 .7000 .2100 .70 .00 2.00 1.6946 .7000 .1050 .70 .00 5.00 4.2365 .7000 .0420 .70 5.00 .50 5.4236 .7000 .4200 .70 5.00 1.00 5.8473 .7000 .2100 .70 5.00 2.00 6.6946 .7000 .1050 .70 5.00 5.00 9.2365 .7000 .0420 .70 10.00 .50 10.4236 .7000 .4200 .70 10.00 1.00 10.8473 .7000 .2100 .70 10.00 2.00 11.6946 .7000 .1050 .70 10.00 5.00 14.2365 .7000 .0420 .80 -10.00 .50 -9.3069 .8000 .3200 .80 -10.00 1.00 -8.6137 .8000 .1600 .80 -10.00 2.00 -7.2274 .8000 .0800 .80 -10.00 5.00 -3.0685 .8000 .0320 .80 -5.00 .50 -4.3069 .8000 .3200 .80 -5.00 1.00 -3.6137 .8000 .1600 .80 -5.00 2.00 -2.2274 .8000 .0800 .80 -5.00 5.00 1.9315 .8000 .0320 .80 .00 .50 .6931 .8000 .3200 .80 .00 1.00 1.3863 .8000 .1600 .80 .00 2.00 2.7726 .8000 .0800 .80 .00 5.00 6.9315 .8000 .0320 .80 5.00 .50 5.6931 .8000 .3200 .80 5.00 1.00 6.3863 .8000 .1600 .80 5.00 2.00 7.7726 .8000 .0800 .80 5.00 5.00 11.9315 .8000 .0320 .80 10.00 .50 10.6931 .8000 .3200 .80 10.00 1.00 11.3863 .8000 .1600 .80 10.00 2.00 12.7726 .8000 .0800 .80 10.00 5.00 16.9315 .8000 .0320 .90 -10.00 .50 -8.9014 .9000 .1800 .90 -10.00 1.00 -7.8028 .9000 .0900 .90 -10.00 2.00 -5.6056 .9000 .0450 .90 -10.00 5.00 .9861 .9000 .0180 .90 -5.00 .50 -3.9014 .9000 .1800 .90 -5.00 1.00 -2.8028 .9000 .0900 .90 -5.00 2.00 -.6056 .9000 .0450 .90 -5.00 5.00 5.9861 .9000 .0180 .90 .00 .50 1.0986 .9000 .1800 .90 .00 1.00 2.1972 .9000 .0900 .90 .00 2.00 4.3944 .9000 .0450 .90 .00 5.00 10.9861 .9000 .0180 .90 5.00 .50 6.0986 .9000 .1800 .90 5.00 1.00 7.1972 .9000 .0900 .90 5.00 2.00 9.3944 .9000 .0450 .90 5.00 5.00 15.9861 .9000 .0180 .90 10.00 .50 11.0986 .9000 .1800 .90 10.00 1.00 12.1972 .9000 .0900 .90 10.00 2.00 14.3944 .9000 .0450 .90 10.00 5.00 20.9861 .9000 .0180 .99 -10.00 .50 -7.7024 .9900 .0198 .99 -10.00 1.00 -5.4049 .9900 .0099 .99 -10.00 2.00 -.8098 .9900 .0050 .99 -10.00 5.00 12.9756 .9900 .0020 .99 -5.00 .50 -2.7024 .9900 .0198 .99 -5.00 1.00 -.4049 .9900 .0099 .99 -5.00 2.00 4.1902 .9900 .0050 .99 -5.00 5.00 17.9756 .9900 .0020 .99 .00 .50 2.2976 .9900 .0198 .99 .00 1.00 4.5951 .9900 .0099 .99 .00 2.00 9.1902 .9900 .0050 .99 .00 5.00 22.9756 .9900 .0020 .99 5.00 .50 7.2976 .9900 .0198 .99 5.00 1.00 9.5951 .9900 .0099 .99 5.00 2.00 14.1902 .9900 .0050 .99 5.00 5.00 27.9756 .9900 .0020 .99 10.00 .50 12.2976 .9900 .0198 .99 10.00 1.00 14.5951 .9900 .0099 .99 10.00 2.00 19.1902 .9900 .0050 .99 10.00 5.00 32.9756 .9900 .0020 ]) RANDIST_CHECK([lnormal], [z s], [cdf pdf], [dnl P z s x cdf pdf .01 .50 .50 .1562 .0100 .3412 .01 .50 1.00 .0488 .0100 .5459 .01 .50 2.00 .0048 .0100 2.7949 .01 .50 5.00 .0000 .0100 1200.5834 .01 1.00 .50 .3125 .0100 .1706 .01 1.00 1.00 .0977 .0100 .2729 .01 1.00 2.00 .0095 .0100 1.3975 .01 1.00 5.00 .0000 .0100 600.2917 .01 2.00 .50 .6250 .0100 .0853 .01 2.00 1.00 .1953 .0100 .1365 .01 2.00 2.00 .0191 .0100 .6987 .01 2.00 5.00 .0000 .0100 300.1459 .01 5.00 .50 1.5625 .0100 .0341 .01 5.00 1.00 .4883 .0100 .0546 .01 5.00 2.00 .0477 .0100 .2795 .01 5.00 5.00 .0000 .0100 120.0583 .10 .50 .50 .2634 .1000 1.3324 .10 .50 1.00 .1388 .1000 1.2644 .10 .50 2.00 .0385 .1000 2.2773 .10 .50 5.00 .0008 .1000 42.5782 .10 1.00 .50 .5269 .1000 .6662 .10 1.00 1.00 .2776 .1000 .6322 .10 1.00 2.00 .0771 .1000 1.1386 .10 1.00 5.00 .0016 .1000 21.2891 .10 2.00 .50 1.0538 .1000 .3331 .10 2.00 1.00 .5552 .1000 .3161 .10 2.00 2.00 .1541 .1000 .5693 .10 2.00 5.00 .0033 .1000 10.6445 .10 5.00 .50 2.6344 .1000 .1332 .10 5.00 1.00 1.3880 .1000 .1264 .10 5.00 2.00 .3853 .1000 .2277 .10 5.00 5.00 .0082 .1000 4.2578 .20 .50 .50 .3283 .2000 1.7057 .20 .50 1.00 .2155 .2000 1.2991 .20 .50 2.00 .0929 .2000 1.5070 .20 .50 5.00 .0074 .2000 7.5286 .20 1.00 .50 .6565 .2000 .8529 .20 1.00 1.00 .4310 .2000 .6495 .20 1.00 2.00 .1858 .2000 .7535 .20 1.00 5.00 .0149 .2000 3.7643 .20 2.00 .50 1.3130 .2000 .4264 .20 2.00 1.00 .8620 .2000 .3248 .20 2.00 2.00 .3715 .2000 .3768 .20 2.00 5.00 .0297 .2000 1.8822 .20 5.00 .50 3.2826 .2000 .1706 .20 5.00 1.00 2.1551 .2000 .1299 .20 5.00 2.00 .9289 .2000 .1507 .20 5.00 5.00 .0744 .2000 .7529 .30 .50 .50 .3847 .3000 1.8077 .30 .50 1.00 .2960 .3000 1.1748 .30 .50 2.00 .1752 .3000 .9924 .30 .50 5.00 .0363 .3000 1.9142 .30 1.00 .50 .7694 .3000 .9039 .30 1.00 1.00 .5919 .3000 .5874 .30 1.00 2.00 .3504 .3000 .4962 .30 1.00 5.00 .0727 .3000 .9571 .30 2.00 .50 1.5387 .3000 .4519 .30 2.00 1.00 1.1838 .3000 .2937 .30 2.00 2.00 .7007 .3000 .2481 .30 2.00 5.00 .1453 .3000 .4785 .30 5.00 .50 3.8468 .3000 .1808 .30 5.00 1.00 2.9596 .3000 .1175 .30 5.00 2.00 1.7518 .3000 .0992 .30 5.00 5.00 .3633 .3000 .1914 .40 .50 .50 .4405 .4000 1.7541 .40 .50 1.00 .3881 .4000 .9955 .40 .50 2.00 .3012 .4000 .6412 .40 .50 5.00 .1409 .4000 .5485 .40 1.00 .50 .8810 .4000 .8770 .40 1.00 1.00 .7762 .4000 .4977 .40 1.00 2.00 .6025 .4000 .3206 .40 1.00 5.00 .2817 .4000 .2742 .40 2.00 .50 1.7620 .4000 .4385 .40 2.00 1.00 1.5524 .4000 .2489 .40 2.00 2.00 1.2050 .4000 .1603 .40 2.00 5.00 .5635 .4000 .1371 .40 5.00 .50 4.4051 .4000 .1754 .40 5.00 1.00 3.8810 .4000 .0995 .40 5.00 2.00 3.0124 .4000 .0641 .40 5.00 5.00 1.4087 .4000 .0548 .50 .50 .50 .5000 .5000 1.5958 .50 .50 1.00 .5000 .5000 .7979 .50 .50 2.00 .5000 .5000 .3989 .50 .50 5.00 .5000 .5000 .1596 .50 1.00 .50 1.0000 .5000 .7979 .50 1.00 1.00 1.0000 .5000 .3989 .50 1.00 2.00 1.0000 .5000 .1995 .50 1.00 5.00 1.0000 .5000 .0798 .50 2.00 .50 2.0000 .5000 .3989 .50 2.00 1.00 2.0000 .5000 .1995 .50 2.00 2.00 2.0000 .5000 .0997 .50 2.00 5.00 2.0000 .5000 .0399 .50 5.00 .50 5.0000 .5000 .1596 .50 5.00 1.00 5.0000 .5000 .0798 .50 5.00 2.00 5.0000 .5000 .0399 .50 5.00 5.00 5.0000 .5000 .0160 .60 .50 .50 .5675 .6000 1.3615 .60 .50 1.00 .6442 .6000 .5998 .60 .50 2.00 .8299 .6000 .2328 .60 .50 5.00 1.7746 .6000 .0435 .60 1.00 .50 1.1350 .6000 .6808 .60 1.00 1.00 1.2883 .6000 .2999 .60 1.00 2.00 1.6598 .6000 .1164 .60 1.00 5.00 3.5492 .6000 .0218 .60 2.00 .50 2.2701 .6000 .3404 .60 2.00 1.00 2.5767 .6000 .1499 .60 2.00 2.00 3.3196 .6000 .0582 .60 2.00 5.00 7.0985 .6000 .0109 .60 5.00 .50 5.6752 .6000 .1362 .60 5.00 1.00 6.4417 .6000 .0600 .60 5.00 2.00 8.2990 .6000 .0233 .60 5.00 5.00 17.7462 .6000 .0044 .70 .50 .50 .6499 .7000 1.0700 .70 .50 1.00 .8447 .7000 .4116 .70 .50 2.00 1.4271 .7000 .1218 .70 .50 5.00 6.8816 .7000 .0101 .70 1.00 .50 1.2998 .7000 .5350 .70 1.00 1.00 1.6894 .7000 .2058 .70 1.00 2.00 2.8542 .7000 .0609 .70 1.00 5.00 13.7633 .7000 .0051 .70 2.00 .50 2.5996 .7000 .2675 .70 2.00 1.00 3.3789 .7000 .1029 .70 2.00 2.00 5.7085 .7000 .0305 .70 2.00 5.00 27.5265 .7000 .0025 .70 5.00 .50 6.4989 .7000 .1070 .70 5.00 1.00 8.4472 .7000 .0412 .70 5.00 2.00 14.2711 .7000 .0122 .70 5.00 5.00 68.8163 .7000 .0010 .80 .50 .50 .7616 .8000 .7352 .80 .50 1.00 1.1601 .8000 .2413 .80 .50 2.00 2.6915 .8000 .0520 .80 .50 5.00 33.6145 .8000 .0017 .80 1.00 .50 1.5232 .8000 .3676 .80 1.00 1.00 2.3201 .8000 .1207 .80 1.00 2.00 5.3830 .8000 .0260 .80 1.00 5.00 67.2291 .8000 .0008 .80 2.00 .50 3.0464 .8000 .1838 .80 2.00 1.00 4.6403 .8000 .0603 .80 2.00 2.00 10.7660 .8000 .0130 .80 2.00 5.00 134.4582 .8000 .0004 .80 5.00 .50 7.6160 .8000 .0735 .80 5.00 1.00 11.6006 .8000 .0241 .80 5.00 2.00 26.9149 .8000 .0052 .80 5.00 5.00 336.1455 .8000 .0002 .90 .50 .50 .9490 .9000 .3699 .90 .50 1.00 1.8011 .9000 .0974 .90 .50 2.00 6.4880 .9000 .0135 .90 .50 5.00 303.2661 .9000 .0001 .90 1.00 .50 1.8980 .9000 .1849 .90 1.00 1.00 3.6022 .9000 .0487 .90 1.00 2.00 12.9760 .9000 .0068 .90 1.00 5.00 606.5322 .9000 .0001 .90 2.00 .50 3.7959 .9000 .0925 .90 2.00 1.00 7.2044 .9000 .0244 .90 2.00 2.00 25.9520 .9000 .0034 .90 2.00 5.00 1213.0644 .9000 .0000 .90 5.00 .50 9.4898 .9000 .0370 .90 5.00 1.00 18.0111 .9000 .0097 .90 5.00 2.00 64.8801 .9000 .0014 .90 5.00 5.00 3032.6610 .9000 .0000 .99 .50 .50 1.6000 .9900 .0333 .99 .50 1.00 5.1202 .9900 .0052 .99 .50 2.00 52.4337 .9900 .0003 .99 .50 5.00 56308.0163 .9900 .0000 .99 1.00 .50 3.2001 .9900 .0167 .99 1.00 1.00 10.2405 .9900 .0026 .99 1.00 2.00 104.8673 .9900 .0001 .99 1.00 5.00 112616.033 .9900 .0000 .99 2.00 .50 6.4001 .9900 .0083 .99 2.00 1.00 20.4809 .9900 .0013 .99 2.00 2.00 209.7346 .9900 .0001 .99 2.00 5.00 225232.065 .9900 .0000 .99 5.00 .50 16.0004 .9900 .0033 .99 5.00 1.00 51.2024 .9900 .0005 .99 5.00 2.00 524.3365 .9900 .0000 .99 5.00 5.00 563080.163 .9900 .0000 ]) RANDIST_CHECK([normal], [u s], [cdf pdf], [dnl P u s x cdf pdf .01 -10.00 .50 -11.1632 .0100 .0533 .01 -10.00 1.00 -12.3263 .0100 .0267 .01 -10.00 2.00 -14.6527 .0100 .0133 .01 -10.00 5.00 -21.6317 .0100 .0053 .01 -5.00 .50 -6.1632 .0100 .0533 .01 -5.00 1.00 -7.3263 .0100 .0267 .01 -5.00 2.00 -9.6527 .0100 .0133 .01 -5.00 5.00 -16.6317 .0100 .0053 .01 .00 .50 -1.1632 .0100 .0533 .01 .00 1.00 -2.3263 .0100 .0267 .01 .00 2.00 -4.6527 .0100 .0133 .01 .00 5.00 -11.6317 .0100 .0053 .01 5.00 .50 3.8368 .0100 .0533 .01 5.00 1.00 2.6737 .0100 .0267 .01 5.00 2.00 .3473 .0100 .0133 .01 5.00 5.00 -6.6317 .0100 .0053 .01 10.00 .50 8.8368 .0100 .0533 .01 10.00 1.00 7.6737 .0100 .0267 .01 10.00 2.00 5.3473 .0100 .0133 .01 10.00 5.00 -1.6317 .0100 .0053 .10 -10.00 .50 -10.6408 .1000 .3510 .10 -10.00 1.00 -11.2816 .1000 .1755 .10 -10.00 2.00 -12.5631 .1000 .0877 .10 -10.00 5.00 -16.4078 .1000 .0351 .10 -5.00 .50 -5.6408 .1000 .3510 .10 -5.00 1.00 -6.2816 .1000 .1755 .10 -5.00 2.00 -7.5631 .1000 .0877 .10 -5.00 5.00 -11.4078 .1000 .0351 .10 .00 .50 -.6408 .1000 .3510 .10 .00 1.00 -1.2816 .1000 .1755 .10 .00 2.00 -2.5631 .1000 .0877 .10 .00 5.00 -6.4078 .1000 .0351 .10 5.00 .50 4.3592 .1000 .3510 .10 5.00 1.00 3.7184 .1000 .1755 .10 5.00 2.00 2.4369 .1000 .0877 .10 5.00 5.00 -1.4078 .1000 .0351 .10 10.00 .50 9.3592 .1000 .3510 .10 10.00 1.00 8.7184 .1000 .1755 .10 10.00 2.00 7.4369 .1000 .0877 .10 10.00 5.00 3.5922 .1000 .0351 .20 -10.00 .50 -10.4208 .2000 .5599 .20 -10.00 1.00 -10.8416 .2000 .2800 .20 -10.00 2.00 -11.6832 .2000 .1400 .20 -10.00 5.00 -14.2081 .2000 .0560 .20 -5.00 .50 -5.4208 .2000 .5599 .20 -5.00 1.00 -5.8416 .2000 .2800 .20 -5.00 2.00 -6.6832 .2000 .1400 .20 -5.00 5.00 -9.2081 .2000 .0560 .20 .00 .50 -.4208 .2000 .5599 .20 .00 1.00 -.8416 .2000 .2800 .20 .00 2.00 -1.6832 .2000 .1400 .20 .00 5.00 -4.2081 .2000 .0560 .20 5.00 .50 4.5792 .2000 .5599 .20 5.00 1.00 4.1584 .2000 .2800 .20 5.00 2.00 3.3168 .2000 .1400 .20 5.00 5.00 .7919 .2000 .0560 .20 10.00 .50 9.5792 .2000 .5599 .20 10.00 1.00 9.1584 .2000 .2800 .20 10.00 2.00 8.3168 .2000 .1400 .20 10.00 5.00 5.7919 .2000 .0560 .30 -10.00 .50 -10.2622 .3000 .6954 .30 -10.00 1.00 -10.5244 .3000 .3477 .30 -10.00 2.00 -11.0488 .3000 .1738 .30 -10.00 5.00 -12.6220 .3000 .0695 .30 -5.00 .50 -5.2622 .3000 .6954 .30 -5.00 1.00 -5.5244 .3000 .3477 .30 -5.00 2.00 -6.0488 .3000 .1738 .30 -5.00 5.00 -7.6220 .3000 .0695 .30 .00 .50 -.2622 .3000 .6954 .30 .00 1.00 -.5244 .3000 .3477 .30 .00 2.00 -1.0488 .3000 .1738 .30 .00 5.00 -2.6220 .3000 .0695 .30 5.00 .50 4.7378 .3000 .6954 .30 5.00 1.00 4.4756 .3000 .3477 .30 5.00 2.00 3.9512 .3000 .1738 .30 5.00 5.00 2.3780 .3000 .0695 .30 10.00 .50 9.7378 .3000 .6954 .30 10.00 1.00 9.4756 .3000 .3477 .30 10.00 2.00 8.9512 .3000 .1738 .30 10.00 5.00 7.3780 .3000 .0695 .40 -10.00 .50 -10.1267 .4000 .7727 .40 -10.00 1.00 -10.2533 .4000 .3863 .40 -10.00 2.00 -10.5067 .4000 .1932 .40 -10.00 5.00 -11.2667 .4000 .0773 .40 -5.00 .50 -5.1267 .4000 .7727 .40 -5.00 1.00 -5.2533 .4000 .3863 .40 -5.00 2.00 -5.5067 .4000 .1932 .40 -5.00 5.00 -6.2667 .4000 .0773 .40 .00 .50 -.1267 .4000 .7727 .40 .00 1.00 -.2533 .4000 .3863 .40 .00 2.00 -.5067 .4000 .1932 .40 .00 5.00 -1.2667 .4000 .0773 .40 5.00 .50 4.8733 .4000 .7727 .40 5.00 1.00 4.7467 .4000 .3863 .40 5.00 2.00 4.4933 .4000 .1932 .40 5.00 5.00 3.7333 .4000 .0773 .40 10.00 .50 9.8733 .4000 .7727 .40 10.00 1.00 9.7467 .4000 .3863 .40 10.00 2.00 9.4933 .4000 .1932 .40 10.00 5.00 8.7333 .4000 .0773 .50 -10.00 .50 -10.0000 .5000 .7979 .50 -10.00 1.00 -10.0000 .5000 .3989 .50 -10.00 2.00 -10.0000 .5000 .1995 .50 -10.00 5.00 -10.0000 .5000 .0798 .50 -5.00 .50 -5.0000 .5000 .7979 .50 -5.00 1.00 -5.0000 .5000 .3989 .50 -5.00 2.00 -5.0000 .5000 .1995 .50 -5.00 5.00 -5.0000 .5000 .0798 .50 .00 .50 .0000 .5000 .7979 .50 .00 1.00 .0000 .5000 .3989 .50 .00 2.00 .0000 .5000 .1995 .50 .00 5.00 .0000 .5000 .0798 .50 5.00 .50 5.0000 .5000 .7979 .50 5.00 1.00 5.0000 .5000 .3989 .50 5.00 2.00 5.0000 .5000 .1995 .50 5.00 5.00 5.0000 .5000 .0798 .50 10.00 .50 10.0000 .5000 .7979 .50 10.00 1.00 10.0000 .5000 .3989 .50 10.00 2.00 10.0000 .5000 .1995 .50 10.00 5.00 10.0000 .5000 .0798 .60 -10.00 .50 -9.8733 .6000 .7727 .60 -10.00 1.00 -9.7467 .6000 .3863 .60 -10.00 2.00 -9.4933 .6000 .1932 .60 -10.00 5.00 -8.7333 .6000 .0773 .60 -5.00 .50 -4.8733 .6000 .7727 .60 -5.00 1.00 -4.7467 .6000 .3863 .60 -5.00 2.00 -4.4933 .6000 .1932 .60 -5.00 5.00 -3.7333 .6000 .0773 .60 .00 .50 .1267 .6000 .7727 .60 .00 1.00 .2533 .6000 .3863 .60 .00 2.00 .5067 .6000 .1932 .60 .00 5.00 1.2667 .6000 .0773 .60 5.00 .50 5.1267 .6000 .7727 .60 5.00 1.00 5.2533 .6000 .3863 .60 5.00 2.00 5.5067 .6000 .1932 .60 5.00 5.00 6.2667 .6000 .0773 .60 10.00 .50 10.1267 .6000 .7727 .60 10.00 1.00 10.2533 .6000 .3863 .60 10.00 2.00 10.5067 .6000 .1932 .60 10.00 5.00 11.2667 .6000 .0773 .70 -10.00 .50 -9.7378 .7000 .6954 .70 -10.00 1.00 -9.4756 .7000 .3477 .70 -10.00 2.00 -8.9512 .7000 .1738 .70 -10.00 5.00 -7.3780 .7000 .0695 .70 -5.00 .50 -4.7378 .7000 .6954 .70 -5.00 1.00 -4.4756 .7000 .3477 .70 -5.00 2.00 -3.9512 .7000 .1738 .70 -5.00 5.00 -2.3780 .7000 .0695 .70 .00 .50 .2622 .7000 .6954 .70 .00 1.00 .5244 .7000 .3477 .70 .00 2.00 1.0488 .7000 .1738 .70 .00 5.00 2.6220 .7000 .0695 .70 5.00 .50 5.2622 .7000 .6954 .70 5.00 1.00 5.5244 .7000 .3477 .70 5.00 2.00 6.0488 .7000 .1738 .70 5.00 5.00 7.6220 .7000 .0695 .70 10.00 .50 10.2622 .7000 .6954 .70 10.00 1.00 10.5244 .7000 .3477 .70 10.00 2.00 11.0488 .7000 .1738 .70 10.00 5.00 12.6220 .7000 .0695 .80 -10.00 .50 -9.5792 .8000 .5599 .80 -10.00 1.00 -9.1584 .8000 .2800 .80 -10.00 2.00 -8.3168 .8000 .1400 .80 -10.00 5.00 -5.7919 .8000 .0560 .80 -5.00 .50 -4.5792 .8000 .5599 .80 -5.00 1.00 -4.1584 .8000 .2800 .80 -5.00 2.00 -3.3168 .8000 .1400 .80 -5.00 5.00 -.7919 .8000 .0560 .80 .00 .50 .4208 .8000 .5599 .80 .00 1.00 .8416 .8000 .2800 .80 .00 2.00 1.6832 .8000 .1400 .80 .00 5.00 4.2081 .8000 .0560 .80 5.00 .50 5.4208 .8000 .5599 .80 5.00 1.00 5.8416 .8000 .2800 .80 5.00 2.00 6.6832 .8000 .1400 .80 5.00 5.00 9.2081 .8000 .0560 .80 10.00 .50 10.4208 .8000 .5599 .80 10.00 1.00 10.8416 .8000 .2800 .80 10.00 2.00 11.6832 .8000 .1400 .80 10.00 5.00 14.2081 .8000 .0560 .90 -10.00 .50 -9.3592 .9000 .3510 .90 -10.00 1.00 -8.7184 .9000 .1755 .90 -10.00 2.00 -7.4369 .9000 .0877 .90 -10.00 5.00 -3.5922 .9000 .0351 .90 -5.00 .50 -4.3592 .9000 .3510 .90 -5.00 1.00 -3.7184 .9000 .1755 .90 -5.00 2.00 -2.4369 .9000 .0877 .90 -5.00 5.00 1.4078 .9000 .0351 .90 .00 .50 .6408 .9000 .3510 .90 .00 1.00 1.2816 .9000 .1755 .90 .00 2.00 2.5631 .9000 .0877 .90 .00 5.00 6.4078 .9000 .0351 .90 5.00 .50 5.6408 .9000 .3510 .90 5.00 1.00 6.2816 .9000 .1755 .90 5.00 2.00 7.5631 .9000 .0877 .90 5.00 5.00 11.4078 .9000 .0351 .90 10.00 .50 10.6408 .9000 .3510 .90 10.00 1.00 11.2816 .9000 .1755 .90 10.00 2.00 12.5631 .9000 .0877 .90 10.00 5.00 16.4078 .9000 .0351 .99 -10.00 .50 -8.8368 .9900 .0533 .99 -10.00 1.00 -7.6737 .9900 .0267 .99 -10.00 2.00 -5.3473 .9900 .0133 .99 -10.00 5.00 1.6317 .9900 .0053 .99 -5.00 .50 -3.8368 .9900 .0533 .99 -5.00 1.00 -2.6737 .9900 .0267 .99 -5.00 2.00 -.3473 .9900 .0133 .99 -5.00 5.00 6.6317 .9900 .0053 .99 .00 .50 1.1632 .9900 .0533 .99 .00 1.00 2.3263 .9900 .0267 .99 .00 2.00 4.6527 .9900 .0133 .99 .00 5.00 11.6317 .9900 .0053 .99 5.00 .50 6.1632 .9900 .0533 .99 5.00 1.00 7.3263 .9900 .0267 .99 5.00 2.00 9.6527 .9900 .0133 .99 5.00 5.00 16.6317 .9900 .0053 .99 10.00 .50 11.1632 .9900 .0533 .99 10.00 1.00 12.3263 .9900 .0267 .99 10.00 2.00 14.6527 .9900 .0133 .99 10.00 5.00 21.6317 .9900 .0053 ]) RANDIST_CHECK([pareto], [a b], [cdf pdf], [dnl P a b x cdf pdf .01 1.00 1.00 1.0101 .0100 .9801 .01 1.00 2.00 1.0050 .0100 1.9701 .01 1.00 5.00 1.0020 .0100 4.9401 .01 1.00 10.00 1.0010 .0100 9.8901 .01 5.00 1.00 5.0505 .0100 .1960 .01 5.00 2.00 5.0252 .0100 .3940 .01 5.00 5.00 5.0101 .0100 .9880 .01 5.00 10.00 5.0050 .0100 1.9780 .01 10.00 1.00 10.1010 .0100 .0980 .01 10.00 2.00 10.0504 .0100 .1970 .01 10.00 5.00 10.0201 .0100 .4940 .01 10.00 10.00 10.0101 .0100 .9890 .10 1.00 1.00 1.1111 .1000 .8100 .10 1.00 2.00 1.0541 .1000 1.7076 .10 1.00 5.00 1.0213 .1000 4.4062 .10 1.00 10.00 1.0106 .1000 8.9057 .10 5.00 1.00 5.5556 .1000 .1620 .10 5.00 2.00 5.2705 .1000 .3415 .10 5.00 5.00 5.1065 .1000 .8812 .10 5.00 10.00 5.0530 .1000 1.7811 .10 10.00 1.00 11.1111 .1000 .0810 .10 10.00 2.00 10.5409 .1000 .1708 .10 10.00 5.00 10.2130 .1000 .4406 .10 10.00 10.00 10.1059 .1000 .8906 .20 1.00 1.00 1.2500 .2000 .6400 .20 1.00 2.00 1.1180 .2000 1.4311 .20 1.00 5.00 1.0456 .2000 3.8254 .20 1.00 10.00 1.0226 .2000 7.8235 .20 5.00 1.00 6.2500 .2000 .1280 .20 5.00 2.00 5.5902 .2000 .2862 .20 5.00 5.00 5.2282 .2000 .7651 .20 5.00 10.00 5.1128 .2000 1.5647 .20 10.00 1.00 12.5000 .2000 .0640 .20 10.00 2.00 11.1803 .2000 .1431 .20 10.00 5.00 10.4564 .2000 .3825 .20 10.00 10.00 10.2257 .2000 .7823 .30 1.00 1.00 1.4286 .3000 .4900 .30 1.00 2.00 1.1952 .3000 1.1713 .30 1.00 5.00 1.0739 .3000 3.2590 .30 1.00 10.00 1.0363 .3000 6.7547 .30 5.00 1.00 7.1429 .3000 .0980 .30 5.00 2.00 5.9761 .3000 .2343 .30 5.00 5.00 5.3697 .3000 .6518 .30 5.00 10.00 5.1816 .3000 1.3509 .30 10.00 1.00 14.2857 .3000 .0490 .30 10.00 2.00 11.9523 .3000 .1171 .30 10.00 5.00 10.7394 .3000 .3259 .30 10.00 10.00 10.3631 .3000 .6755 .40 1.00 1.00 1.6667 .4000 .3600 .40 1.00 2.00 1.2910 .4000 .9295 .40 1.00 5.00 1.1076 .4000 2.7086 .40 1.00 10.00 1.0524 .4000 5.7012 .40 5.00 1.00 8.3333 .4000 .0720 .40 5.00 2.00 6.4550 .4000 .1859 .40 5.00 5.00 5.5378 .4000 .5417 .40 5.00 10.00 5.2620 .4000 1.1402 .40 10.00 1.00 16.6667 .4000 .0360 .40 10.00 2.00 12.9099 .4000 .0930 .40 10.00 5.00 11.0757 .4000 .2709 .40 10.00 10.00 10.5241 .4000 .5701 .50 1.00 1.00 2.0000 .5000 .2500 .50 1.00 2.00 1.4142 .5000 .7071 .50 1.00 5.00 1.1487 .5000 2.1764 .50 1.00 10.00 1.0718 .5000 4.6652 .50 5.00 1.00 10.0000 .5000 .0500 .50 5.00 2.00 7.0711 .5000 .1414 .50 5.00 5.00 5.7435 .5000 .4353 .50 5.00 10.00 5.3589 .5000 .9330 .50 10.00 1.00 20.0000 .5000 .0250 .50 10.00 2.00 14.1421 .5000 .0707 .50 10.00 5.00 11.4870 .5000 .2176 .50 10.00 10.00 10.7177 .5000 .4665 .60 1.00 1.00 2.5000 .6000 .1600 .60 1.00 2.00 1.5811 .6000 .5060 .60 1.00 5.00 1.2011 .6000 1.6651 .60 1.00 10.00 1.0960 .6000 3.6498 .60 5.00 1.00 12.5000 .6000 .0320 .60 5.00 2.00 7.9057 .6000 .1012 .60 5.00 5.00 6.0056 .6000 .3330 .60 5.00 10.00 5.4798 .6000 .7300 .60 10.00 1.00 25.0000 .6000 .0160 .60 10.00 2.00 15.8114 .6000 .0506 .60 10.00 5.00 12.0112 .6000 .1665 .60 10.00 10.00 10.9596 .6000 .3650 .70 1.00 1.00 3.3333 .7000 .0900 .70 1.00 2.00 1.8257 .7000 .3286 .70 1.00 5.00 1.2723 .7000 1.1790 .70 1.00 10.00 1.1279 .7000 2.6597 .70 5.00 1.00 16.6667 .7000 .0180 .70 5.00 2.00 9.1287 .7000 .0657 .70 5.00 5.00 6.3613 .7000 .2358 .70 5.00 10.00 5.6397 .7000 .5319 .70 10.00 1.00 33.3333 .7000 .0090 .70 10.00 2.00 18.2574 .7000 .0329 .70 10.00 5.00 12.7226 .7000 .1179 .70 10.00 10.00 11.2794 .7000 .2660 .80 1.00 1.00 5.0000 .8000 .0400 .80 1.00 2.00 2.2361 .8000 .1789 .80 1.00 5.00 1.3797 .8000 .7248 .80 1.00 10.00 1.1746 .8000 1.7027 .80 5.00 1.00 25.0000 .8000 .0080 .80 5.00 2.00 11.1803 .8000 .0358 .80 5.00 5.00 6.8986 .8000 .1450 .80 5.00 10.00 5.8731 .8000 .3405 .80 10.00 1.00 50.0000 .8000 .0040 .80 10.00 2.00 22.3607 .8000 .0179 .80 10.00 5.00 13.7973 .8000 .0725 .80 10.00 10.00 11.7462 .8000 .1703 .90 1.00 1.00 10.0000 .9000 .0100 .90 1.00 2.00 3.1623 .9000 .0632 .90 1.00 5.00 1.5849 .9000 .3155 .90 1.00 10.00 1.2589 .9000 .7943 .90 5.00 1.00 50.0000 .9000 .0020 .90 5.00 2.00 15.8114 .9000 .0126 .90 5.00 5.00 7.9245 .9000 .0631 .90 5.00 10.00 6.2946 .9000 .1589 .90 10.00 1.00 100.0000 .9000 .0010 .90 10.00 2.00 31.6228 .9000 .0063 .90 10.00 5.00 15.8489 .9000 .0315 .90 10.00 10.00 12.5893 .9000 .0794 .99 1.00 1.00 100.0000 .9900 .0001 .99 1.00 2.00 10.0000 .9900 .0020 .99 1.00 5.00 2.5119 .9900 .0199 .99 1.00 10.00 1.5849 .9900 .0631 .99 5.00 1.00 500.0000 .9900 .0000 .99 5.00 2.00 50.0000 .9900 .0004 .99 5.00 5.00 12.5594 .9900 .0040 .99 5.00 10.00 7.9245 .9900 .0126 .99 10.00 1.00 1000.0000 .9900 .0000 .99 10.00 2.00 100.0000 .9900 .0002 .99 10.00 5.00 25.1189 .9900 .0020 .99 10.00 10.00 15.8489 .9900 .0063 ]) RANDIST_CHECK([t], [df], [cdf pdf], [dnl P df x cdf pdf .01 1.00 -31.8205 .0100 .0003 .01 2.00 -6.9646 .0100 .0028 .01 3.00 -4.5407 .0100 .0059 .01 4.00 -3.7469 .0100 .0087 .01 5.00 -3.3649 .0100 .0109 .01 10.00 -2.7638 .0100 .0172 .01 30.00 -2.4573 .0100 .0231 .01 100.00 -2.3642 .0100 .0255 .10 1.00 -3.0777 .1000 .0304 .10 2.00 -1.8856 .1000 .0764 .10 3.00 -1.6377 .1000 .1025 .10 4.00 -1.5332 .1000 .1181 .10 5.00 -1.4759 .1000 .1283 .10 10.00 -1.3722 .1000 .1507 .10 30.00 -1.3104 .1000 .1670 .10 100.00 -1.2901 .1000 .1729 .20 1.00 -1.3764 .2000 .1100 .20 2.00 -1.0607 .2000 .1810 .20 3.00 -.9785 .2000 .2112 .20 4.00 -.9410 .2000 .2275 .20 5.00 -.9195 .2000 .2376 .20 10.00 -.8791 .2000 .2584 .20 30.00 -.8538 .2000 .2727 .20 100.00 -.8452 .2000 .2778 .30 1.00 -.7265 .3000 .2083 .30 2.00 -.6172 .3000 .2722 .30 3.00 -.5844 .3000 .2963 .30 4.00 -.5686 .3000 .3088 .30 5.00 -.5594 .3000 .3164 .30 10.00 -.5415 .3000 .3319 .30 30.00 -.5300 .3000 .3424 .30 100.00 -.5261 .3000 .3461 .40 1.00 -.3249 .4000 .2879 .40 2.00 -.2887 .4000 .3326 .40 3.00 -.2767 .4000 .3495 .40 4.00 -.2707 .4000 .3584 .40 5.00 -.2672 .4000 .3638 .40 10.00 -.2602 .4000 .3749 .40 30.00 -.2556 .4000 .3825 .40 100.00 -.2540 .4000 .3852 .50 1.00 .0000 .5000 .3183 .50 2.00 .0000 .5000 .3536 .50 3.00 .0000 .5000 .3676 .50 4.00 .0000 .5000 .3750 .50 5.00 .0000 .5000 .3796 .50 10.00 .0000 .5000 .3891 .50 30.00 .0000 .5000 .3956 .50 100.00 .0000 .5000 .3979 .60 1.00 .3249 .6000 .2879 .60 2.00 .2887 .6000 .3326 .60 3.00 .2767 .6000 .3495 .60 4.00 .2707 .6000 .3584 .60 5.00 .2672 .6000 .3638 .60 10.00 .2602 .6000 .3749 .60 30.00 .2556 .6000 .3825 .60 100.00 .2540 .6000 .3852 .70 1.00 .7265 .7000 .2083 .70 2.00 .6172 .7000 .2722 .70 3.00 .5844 .7000 .2963 .70 4.00 .5686 .7000 .3088 .70 5.00 .5594 .7000 .3164 .70 10.00 .5415 .7000 .3319 .70 30.00 .5300 .7000 .3424 .70 100.00 .5261 .7000 .3461 .80 1.00 1.3764 .8000 .1100 .80 2.00 1.0607 .8000 .1810 .80 3.00 .9785 .8000 .2112 .80 4.00 .9410 .8000 .2275 .80 5.00 .9195 .8000 .2376 .80 10.00 .8791 .8000 .2584 .80 30.00 .8538 .8000 .2727 .80 100.00 .8452 .8000 .2778 .90 1.00 3.0777 .9000 .0304 .90 2.00 1.8856 .9000 .0764 .90 3.00 1.6377 .9000 .1025 .90 4.00 1.5332 .9000 .1181 .90 5.00 1.4759 .9000 .1283 .90 10.00 1.3722 .9000 .1507 .90 30.00 1.3104 .9000 .1670 .90 100.00 1.2901 .9000 .1729 .99 1.00 31.8205 .9900 .0003 .99 2.00 6.9646 .9900 .0028 .99 3.00 4.5407 .9900 .0059 .99 4.00 3.7469 .9900 .0087 .99 5.00 3.3649 .9900 .0109 .99 10.00 2.7638 .9900 .0172 .99 30.00 2.4573 .9900 .0231 .99 100.00 2.3642 .9900 .0255 ]) RANDIST_CHECK([uniform], [a b], [cdf pdf], [dnl P a b x cdf pdf .01 -10.00 40.00 -9.5000 .0100 .0200 .01 -10.00 41.00 -9.4900 .0100 .0196 .01 -10.00 45.00 -9.4500 .0100 .0182 .01 -10.00 50.00 -9.4000 .0100 .0167 .01 .00 40.00 .4000 .0100 .0250 .01 .00 41.00 .4100 .0100 .0244 .01 .00 45.00 .4500 .0100 .0222 .01 .00 50.00 .5000 .0100 .0200 .01 20.00 40.00 20.2000 .0100 .0500 .01 20.00 41.00 20.2100 .0100 .0476 .01 20.00 45.00 20.2500 .0100 .0400 .01 20.00 50.00 20.3000 .0100 .0333 .01 30.00 40.00 30.1000 .0100 .1000 .01 30.00 41.00 30.1100 .0100 .0909 .01 30.00 45.00 30.1500 .0100 .0667 .01 30.00 50.00 30.2000 .0100 .0500 .10 -10.00 40.00 -5.0000 .1000 .0200 .10 -10.00 41.00 -4.9000 .1000 .0196 .10 -10.00 45.00 -4.5000 .1000 .0182 .10 -10.00 50.00 -4.0000 .1000 .0167 .10 .00 40.00 4.0000 .1000 .0250 .10 .00 41.00 4.1000 .1000 .0244 .10 .00 45.00 4.5000 .1000 .0222 .10 .00 50.00 5.0000 .1000 .0200 .10 20.00 40.00 22.0000 .1000 .0500 .10 20.00 41.00 22.1000 .1000 .0476 .10 20.00 45.00 22.5000 .1000 .0400 .10 20.00 50.00 23.0000 .1000 .0333 .10 30.00 40.00 31.0000 .1000 .1000 .10 30.00 41.00 31.1000 .1000 .0909 .10 30.00 45.00 31.5000 .1000 .0667 .10 30.00 50.00 32.0000 .1000 .0500 .20 -10.00 40.00 .0000 .2000 .0200 .20 -10.00 41.00 .2000 .2000 .0196 .20 -10.00 45.00 1.0000 .2000 .0182 .20 -10.00 50.00 2.0000 .2000 .0167 .20 .00 40.00 8.0000 .2000 .0250 .20 .00 41.00 8.2000 .2000 .0244 .20 .00 45.00 9.0000 .2000 .0222 .20 .00 50.00 10.0000 .2000 .0200 .20 20.00 40.00 24.0000 .2000 .0500 .20 20.00 41.00 24.2000 .2000 .0476 .20 20.00 45.00 25.0000 .2000 .0400 .20 20.00 50.00 26.0000 .2000 .0333 .20 30.00 40.00 32.0000 .2000 .1000 .20 30.00 41.00 32.2000 .2000 .0909 .20 30.00 45.00 33.0000 .2000 .0667 .20 30.00 50.00 34.0000 .2000 .0500 .30 -10.00 40.00 5.0000 .3000 .0200 .30 -10.00 41.00 5.3000 .3000 .0196 .30 -10.00 45.00 6.5000 .3000 .0182 .30 -10.00 50.00 8.0000 .3000 .0167 .30 .00 40.00 12.0000 .3000 .0250 .30 .00 41.00 12.3000 .3000 .0244 .30 .00 45.00 13.5000 .3000 .0222 .30 .00 50.00 15.0000 .3000 .0200 .30 20.00 40.00 26.0000 .3000 .0500 .30 20.00 41.00 26.3000 .3000 .0476 .30 20.00 45.00 27.5000 .3000 .0400 .30 20.00 50.00 29.0000 .3000 .0333 .30 30.00 40.00 33.0000 .3000 .1000 .30 30.00 41.00 33.3000 .3000 .0909 .30 30.00 45.00 34.5000 .3000 .0667 .30 30.00 50.00 36.0000 .3000 .0500 .40 -10.00 40.00 10.0000 .4000 .0200 .40 -10.00 41.00 10.4000 .4000 .0196 .40 -10.00 45.00 12.0000 .4000 .0182 .40 -10.00 50.00 14.0000 .4000 .0167 .40 .00 40.00 16.0000 .4000 .0250 .40 .00 41.00 16.4000 .4000 .0244 .40 .00 45.00 18.0000 .4000 .0222 .40 .00 50.00 20.0000 .4000 .0200 .40 20.00 40.00 28.0000 .4000 .0500 .40 20.00 41.00 28.4000 .4000 .0476 .40 20.00 45.00 30.0000 .4000 .0400 .40 20.00 50.00 32.0000 .4000 .0333 .40 30.00 40.00 34.0000 .4000 .1000 .40 30.00 41.00 34.4000 .4000 .0909 .40 30.00 45.00 36.0000 .4000 .0667 .40 30.00 50.00 38.0000 .4000 .0500 .50 -10.00 40.00 15.0000 .5000 .0200 .50 -10.00 41.00 15.5000 .5000 .0196 .50 -10.00 45.00 17.5000 .5000 .0182 .50 -10.00 50.00 20.0000 .5000 .0167 .50 .00 40.00 20.0000 .5000 .0250 .50 .00 41.00 20.5000 .5000 .0244 .50 .00 45.00 22.5000 .5000 .0222 .50 .00 50.00 25.0000 .5000 .0200 .50 20.00 40.00 30.0000 .5000 .0500 .50 20.00 41.00 30.5000 .5000 .0476 .50 20.00 45.00 32.5000 .5000 .0400 .50 20.00 50.00 35.0000 .5000 .0333 .50 30.00 40.00 35.0000 .5000 .1000 .50 30.00 41.00 35.5000 .5000 .0909 .50 30.00 45.00 37.5000 .5000 .0667 .50 30.00 50.00 40.0000 .5000 .0500 .60 -10.00 40.00 20.0000 .6000 .0200 .60 -10.00 41.00 20.6000 .6000 .0196 .60 -10.00 45.00 23.0000 .6000 .0182 .60 -10.00 50.00 26.0000 .6000 .0167 .60 .00 40.00 24.0000 .6000 .0250 .60 .00 41.00 24.6000 .6000 .0244 .60 .00 45.00 27.0000 .6000 .0222 .60 .00 50.00 30.0000 .6000 .0200 .60 20.00 40.00 32.0000 .6000 .0500 .60 20.00 41.00 32.6000 .6000 .0476 .60 20.00 45.00 35.0000 .6000 .0400 .60 20.00 50.00 38.0000 .6000 .0333 .60 30.00 40.00 36.0000 .6000 .1000 .60 30.00 41.00 36.6000 .6000 .0909 .60 30.00 45.00 39.0000 .6000 .0667 .60 30.00 50.00 42.0000 .6000 .0500 .70 -10.00 40.00 25.0000 .7000 .0200 .70 -10.00 41.00 25.7000 .7000 .0196 .70 -10.00 45.00 28.5000 .7000 .0182 .70 -10.00 50.00 32.0000 .7000 .0167 .70 .00 40.00 28.0000 .7000 .0250 .70 .00 41.00 28.7000 .7000 .0244 .70 .00 45.00 31.5000 .7000 .0222 .70 .00 50.00 35.0000 .7000 .0200 .70 20.00 40.00 34.0000 .7000 .0500 .70 20.00 41.00 34.7000 .7000 .0476 .70 20.00 45.00 37.5000 .7000 .0400 .70 20.00 50.00 41.0000 .7000 .0333 .70 30.00 40.00 37.0000 .7000 .1000 .70 30.00 41.00 37.7000 .7000 .0909 .70 30.00 45.00 40.5000 .7000 .0667 .70 30.00 50.00 44.0000 .7000 .0500 .80 -10.00 40.00 30.0000 .8000 .0200 .80 -10.00 41.00 30.8000 .8000 .0196 .80 -10.00 45.00 34.0000 .8000 .0182 .80 -10.00 50.00 38.0000 .8000 .0167 .80 .00 40.00 32.0000 .8000 .0250 .80 .00 41.00 32.8000 .8000 .0244 .80 .00 45.00 36.0000 .8000 .0222 .80 .00 50.00 40.0000 .8000 .0200 .80 20.00 40.00 36.0000 .8000 .0500 .80 20.00 41.00 36.8000 .8000 .0476 .80 20.00 45.00 40.0000 .8000 .0400 .80 20.00 50.00 44.0000 .8000 .0333 .80 30.00 40.00 38.0000 .8000 .1000 .80 30.00 41.00 38.8000 .8000 .0909 .80 30.00 45.00 42.0000 .8000 .0667 .80 30.00 50.00 46.0000 .8000 .0500 .90 -10.00 40.00 35.0000 .9000 .0200 .90 -10.00 41.00 35.9000 .9000 .0196 .90 -10.00 45.00 39.5000 .9000 .0182 .90 -10.00 50.00 44.0000 .9000 .0167 .90 .00 40.00 36.0000 .9000 .0250 .90 .00 41.00 36.9000 .9000 .0244 .90 .00 45.00 40.5000 .9000 .0222 .90 .00 50.00 45.0000 .9000 .0200 .90 20.00 40.00 38.0000 .9000 .0500 .90 20.00 41.00 38.9000 .9000 .0476 .90 20.00 45.00 42.5000 .9000 .0400 .90 20.00 50.00 47.0000 .9000 .0333 .90 30.00 40.00 39.0000 .9000 .1000 .90 30.00 41.00 39.9000 .9000 .0909 .90 30.00 45.00 43.5000 .9000 .0667 .90 30.00 50.00 48.0000 .9000 .0500 .99 -10.00 40.00 39.5000 .9900 .0200 .99 -10.00 41.00 40.4900 .9900 .0196 .99 -10.00 45.00 44.4500 .9900 .0182 .99 -10.00 50.00 49.4000 .9900 .0167 .99 .00 40.00 39.6000 .9900 .0250 .99 .00 41.00 40.5900 .9900 .0244 .99 .00 45.00 44.5500 .9900 .0222 .99 .00 50.00 49.5000 .9900 .0200 .99 20.00 40.00 39.8000 .9900 .0500 .99 20.00 41.00 40.7900 .9900 .0476 .99 20.00 45.00 44.7500 .9900 .0400 .99 20.00 50.00 49.7000 .9900 .0333 .99 30.00 40.00 39.9000 .9900 .1000 .99 30.00 41.00 40.8900 .9900 .0909 .99 30.00 45.00 44.8500 .9900 .0667 .99 30.00 50.00 49.8000 .9900 .0500 ]) RANDIST_CHECK([weibull], [a b], [cdf pdf], [dnl P a b x cdf pdf .01 .50 1.00 .0050 .0100 1.9800 .01 .50 2.00 .0501 .0100 .3970 .01 .50 4.00 .1583 .0100 .2514 .01 .50 8.00 .2813 .0100 .2829 .01 1.00 1.00 .0101 .0100 .9900 .01 1.00 2.00 .1003 .0100 .1985 .01 1.00 4.00 .3166 .0100 .1257 .01 1.00 8.00 .5627 .0100 .1415 .01 2.00 1.00 .0201 .0100 .4950 .01 2.00 2.00 .2005 .0100 .0992 .01 2.00 4.00 .6332 .0100 .0628 .01 2.00 8.00 1.1254 .0100 .0707 .01 5.00 1.00 .0503 .0100 .1980 .01 5.00 2.00 .5013 .0100 .0397 .01 5.00 4.00 1.5831 .0100 .0251 .01 5.00 8.00 2.8135 .0100 .0283 .10 .50 1.00 .0527 .1000 1.8000 .10 .50 2.00 .1623 .1000 1.1685 .10 .50 4.00 .2849 .1000 1.3315 .10 .50 8.00 .3774 .1000 2.0100 .10 1.00 1.00 .1054 .1000 .9000 .10 1.00 2.00 .3246 .1000 .5843 .10 1.00 4.00 .5697 .1000 .6657 .10 1.00 8.00 .7548 .1000 1.0050 .10 2.00 1.00 .2107 .1000 .4500 .10 2.00 2.00 .6492 .1000 .2921 .10 2.00 4.00 1.1395 .1000 .3329 .10 2.00 8.00 1.5096 .1000 .5025 .10 5.00 1.00 .5268 .1000 .1800 .10 5.00 2.00 1.6230 .1000 .1169 .10 5.00 4.00 2.8487 .1000 .1331 .10 5.00 8.00 3.7740 .1000 .2010 .20 .50 1.00 .1116 .2000 1.6000 .20 .50 2.00 .2362 .2000 1.5116 .20 .50 4.00 .3436 .2000 2.0779 .20 .50 8.00 .4145 .2000 3.4453 .20 1.00 1.00 .2231 .2000 .8000 .20 1.00 2.00 .4724 .2000 .7558 .20 1.00 4.00 .6873 .2000 1.0389 .20 1.00 8.00 .8290 .2000 1.7226 .20 2.00 1.00 .4463 .2000 .4000 .20 2.00 2.00 .9448 .2000 .3779 .20 2.00 4.00 1.3746 .2000 .5195 .20 2.00 8.00 1.6581 .2000 .8613 .20 5.00 1.00 1.1157 .2000 .1600 .20 5.00 2.00 2.3619 .2000 .1512 .20 5.00 4.00 3.4365 .2000 .2078 .20 5.00 8.00 4.1452 .2000 .3445 .30 .50 1.00 .1783 .3000 1.4000 .30 .50 2.00 .2986 .3000 1.6722 .30 .50 4.00 .3864 .3000 2.5846 .30 .50 8.00 .4395 .3000 4.5442 .30 1.00 1.00 .3567 .3000 .7000 .30 1.00 2.00 .5972 .3000 .8361 .30 1.00 4.00 .7728 .3000 1.2923 .30 1.00 8.00 .8791 .3000 2.2721 .30 2.00 1.00 .7133 .3000 .3500 .30 2.00 2.00 1.1944 .3000 .4181 .30 2.00 4.00 1.5456 .3000 .6461 .30 2.00 8.00 1.7582 .3000 1.1360 .30 5.00 1.00 1.7834 .3000 .1400 .30 5.00 2.00 2.9861 .3000 .1672 .30 5.00 4.00 3.8640 .3000 .2585 .30 5.00 8.00 4.3955 .3000 .4544 .40 .50 1.00 .2554 .4000 1.2000 .40 .50 2.00 .3574 .4000 1.7153 .40 .50 4.00 .4227 .4000 2.9003 .40 .50 8.00 .4597 .4000 5.3335 .40 1.00 1.00 .5108 .4000 .6000 .40 1.00 2.00 .7147 .4000 .8577 .40 1.00 4.00 .8454 .4000 1.4502 .40 1.00 8.00 .9195 .4000 2.6667 .40 2.00 1.00 1.0217 .4000 .3000 .40 2.00 2.00 1.4294 .4000 .4288 .40 2.00 4.00 1.6908 .4000 .7251 .40 2.00 8.00 1.8389 .4000 1.3334 .40 5.00 1.00 2.5541 .4000 .1200 .40 5.00 2.00 3.5736 .4000 .1715 .40 5.00 4.00 4.2271 .4000 .2900 .40 5.00 8.00 4.5973 .4000 .5333 .50 .50 1.00 .3466 .5000 1.0000 .50 .50 2.00 .4163 .5000 1.6651 .50 .50 4.00 .4562 .5000 3.0386 .50 .50 8.00 .4776 .5000 5.8051 .50 1.00 1.00 .6931 .5000 .5000 .50 1.00 2.00 .8326 .5000 .8326 .50 1.00 4.00 .9124 .5000 1.5193 .50 1.00 8.00 .9552 .5000 2.9026 .50 2.00 1.00 1.3863 .5000 .2500 .50 2.00 2.00 1.6651 .5000 .4163 .50 2.00 4.00 1.8249 .5000 .7597 .50 2.00 8.00 1.9104 .5000 1.4513 .50 5.00 1.00 3.4657 .5000 .1000 .50 5.00 2.00 4.1628 .5000 .1665 .50 5.00 4.00 4.5622 .5000 .3039 .50 5.00 8.00 4.7761 .5000 .5805 .60 .50 1.00 .4581 .6000 .8000 .60 .50 2.00 .4786 .6000 1.5316 .60 .50 4.00 .4892 .6000 2.9969 .60 .50 8.00 .4946 .6000 5.9287 .60 1.00 1.00 .9163 .6000 .4000 .60 1.00 2.00 .9572 .6000 .7658 .60 1.00 4.00 .9784 .6000 1.4985 .60 1.00 8.00 .9891 .6000 2.9643 .60 2.00 1.00 1.8326 .6000 .2000 .60 2.00 2.00 1.9145 .6000 .3829 .60 2.00 4.00 1.9568 .6000 .7492 .60 2.00 8.00 1.9783 .6000 1.4822 .60 5.00 1.00 4.5815 .6000 .0800 .60 5.00 2.00 4.7862 .6000 .1532 .60 5.00 4.00 4.8919 .6000 .2997 .60 5.00 8.00 4.9457 .6000 .5929 .70 .50 1.00 .6020 .7000 .6000 .70 .50 2.00 .5486 .7000 1.3167 .70 .50 4.00 .5238 .7000 2.7585 .70 .50 8.00 .5117 .7000 5.6465 .70 1.00 1.00 1.2040 .7000 .3000 .70 1.00 2.00 1.0973 .7000 .6584 .70 1.00 4.00 1.0475 .7000 1.3793 .70 1.00 8.00 1.0235 .7000 2.8233 .70 2.00 1.00 2.4079 .7000 .1500 .70 2.00 2.00 2.1945 .7000 .3292 .70 2.00 4.00 2.0950 .7000 .6896 .70 2.00 8.00 2.0469 .7000 1.4116 .70 5.00 1.00 6.0199 .7000 .0600 .70 5.00 2.00 5.4863 .7000 .1317 .70 5.00 4.00 5.2375 .7000 .2759 .70 5.00 8.00 5.1174 .7000 .5647 .80 .50 1.00 .8047 .8000 .4000 .80 .50 2.00 .6343 .8000 1.0149 .80 .50 4.00 .5632 .8000 2.2863 .80 .50 8.00 .5306 .8000 4.8528 .80 1.00 1.00 1.6094 .8000 .2000 .80 1.00 2.00 1.2686 .8000 .5075 .80 1.00 4.00 1.1263 .8000 1.1431 .80 1.00 8.00 1.0613 .8000 2.4264 .80 2.00 1.00 3.2189 .8000 .1000 .80 2.00 2.00 2.5373 .8000 .2537 .80 2.00 4.00 2.2527 .8000 .5716 .80 2.00 8.00 2.1226 .8000 1.2132 .80 5.00 1.00 8.0472 .8000 .0400 .80 5.00 2.00 6.3432 .8000 .1015 .80 5.00 4.00 5.6317 .8000 .2286 .80 5.00 8.00 5.3065 .8000 .4853 .90 .50 1.00 1.1513 .9000 .2000 .90 .50 2.00 .7587 .9000 .6070 .90 .50 4.00 .6159 .9000 1.4954 .90 .50 8.00 .5549 .9000 3.3194 .90 1.00 1.00 2.3026 .9000 .1000 .90 1.00 2.00 1.5174 .9000 .3035 .90 1.00 4.00 1.2318 .9000 .7477 .90 1.00 8.00 1.1099 .9000 1.6597 .90 2.00 1.00 4.6052 .9000 .0500 .90 2.00 2.00 3.0349 .9000 .1517 .90 2.00 4.00 2.4637 .9000 .3738 .90 2.00 8.00 2.2198 .9000 .8298 .90 5.00 1.00 11.5129 .9000 .0200 .90 5.00 2.00 7.5871 .9000 .0607 .90 5.00 4.00 6.1592 .9000 .1495 .90 5.00 8.00 5.5494 .9000 .3319 .99 .50 1.00 2.3026 .9900 .0200 .99 .50 2.00 1.0730 .9900 .0858 .99 .50 4.00 .7325 .9900 .2515 .99 .50 8.00 .6052 .9900 .6088 .99 1.00 1.00 4.6052 .9900 .0100 .99 1.00 2.00 2.1460 .9900 .0429 .99 1.00 4.00 1.4649 .9900 .1257 .99 1.00 8.00 1.2103 .9900 .3044 .99 2.00 1.00 9.2103 .9900 .0050 .99 2.00 2.00 4.2919 .9900 .0215 .99 2.00 4.00 2.9298 .9900 .0629 .99 2.00 8.00 2.4207 .9900 .1522 .99 5.00 1.00 23.0259 .9900 .0020 .99 5.00 2.00 10.7298 .9900 .0086 .99 5.00 4.00 7.3246 .9900 .0251 .99 5.00 8.00 6.0517 .9900 .0609 ]) pspp-1.0.1/tests/coverage.sh0000755000175000017500000000324113137223525012713 00000000000000#!/bin/sh # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # This little script can be used in conjunction with gcov to see how well # the regression test suite is covering the PSPP code. # # To use it: # # make distclean # CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" # export CFLAGS # ./configure # make check # tests/coverage.sh TEMPDIR=/tmp/pspp-cov-$$ export TEMPDIR mkdir -p $TEMPDIR files=`find src -name '*.c'` summary_file="$TEMPDIR/coverage.txt" export summary_file rm -f $summary_file for f in $files ; do dir=`dirname $f` gcov -p -l -n -o $dir $f | grep -v '^Creat' >> $summary_file done cat > "$TEMPDIR/cov.sps" << EOF DATA LIST FREE FILE='$summary_file' /COVERAGE (PCT8) d1 (a2) lines * d2 (a10) d3 (a10) d4 (a10) d5 (a10) file (a25). AGGREGATE OUTFILE=* /BREAK=file /COVERAGE=MIN(COVERAGE). SORT CASES BY COVERAGE. LIST /COVERAGE file. FREQUENCIES /COVERAGE /HISTOGRAM /PERCENTILES=25,50,75,90. EOF src/pspp -o pspp.html $TEMPDIR/cov.sps rm -rf $TEMPDIR pspp-1.0.1/tests/perl-module.at0000644000175000017500000004131613137223525013341 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([Perl module tests]) dnl This command can be used to run with the PSPP Perl module after it has been dnl built (with "make") but before it has been installed. The -I options are dnl equivalent to "use ExtUtils::testlib;" inside the Perl program, but it does dnl not need to be run with the perl-module build directory as the current dnl working directory. dnl dnl XXX "libtool --mode=execute" is probably better than setting dnl LD_LIBRARY_PATH. m4_define([RUN_PERL_MODULE], [LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib]) AT_SETUP([Perl create system file]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) AT_DATA([test.pl], [use warnings; use strict; use PSPP; my $d = PSPP::Dict->new(); die "dictionary creation" if !ref $d; die if $d->get_var_cnt () != 0; $d->set_label ("My Dictionary"); $d->set_documents ("These Documents"); # Tests for variable creation my $var0 = PSPP::Var->new ($d, "le"); die "trap illegal variable name" if ref $var0; die if $d->get_var_cnt () != 0; $var0 = PSPP::Var->new ($d, "legal"); die "accept legal variable name" if !ref $var0; die if $d->get_var_cnt () != 1; my $var1 = PSPP::Var->new ($d, "money", (fmt=>PSPP::Fmt::DOLLAR, width=>4, decimals=>2) ); die "cappet valid format" if !ref $var1; die if $d->get_var_cnt () != 2; $d->set_weight ($var1); my $sysfile = PSPP::Sysfile->new ('testfile.sav', $d); die "create sysfile object" if !ref $sysfile; $sysfile->close (); ]) AT_CHECK([RUN_PERL_MODULE test.pl]) AT_DATA([dump-dict.sps], [GET FILE='testfile.sav'. DISPLAY FILE LABEL. DISPLAY DOCUMENTS. DISPLAY DICTIONARY. SHOW WEIGHT. ]) AT_CHECK([pspp -O format=csv dump-dict.sps], [0], [File label: My Dictionary Documents in the active dataset: These Documents Variable,Description,Position legal,Format: F9.2,1 money,Format: DOLLAR6.2,2 dump-dict.sps:5: note: SHOW: WEIGHT is money. ]) AT_CLEANUP AT_SETUP([Perl writing cases to system files]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) AT_DATA([test.pl], [[use warnings; use strict; use PSPP; my $d = PSPP::Dict->new(); PSPP::Var->new ($d, "id", ( fmt=>PSPP::Fmt::F, width=>2, decimals=>0 ) ); PSPP::Var->new ($d, "name", ( fmt=>PSPP::Fmt::A, width=>20, ) ); $d->set_documents ("This should not appear"); $d->clear_documents (); $d->add_document ("This is a document line"); $d->set_label ("This is the file label"); # Check that we can write cases to system files. my $sysfile = PSPP::Sysfile->new ("testfile.sav", $d); my $res = $sysfile->append_case ( [34, "frederick"]); die "append case" if !$res; $res = $sysfile->append_case ( [34, "frederick", "extra"]); die "append case with too many variables" if $res; $sysfile->close (); # Check that sysfiles are closed properly automaticallly in the destructor. my $sysfile2 = PSPP::Sysfile->new ("testfile2.sav", $d); $res = $sysfile2->append_case ( [21, "wheelbarrow"]); die "append case 2" if !$res; $res = $sysfile->append_case ( [34, "frederick", "extra"]); die "append case with too many variables" if $res; # Don't close. We want to test that the destructor does that. ]]) AT_CHECK([RUN_PERL_MODULE test.pl]) AT_DATA([dump-dicts.sps], [GET FILE='testfile.sav'. DISPLAY DICTIONARY. DISPLAY FILE LABEL. DISPLAY DOCUMENTS. LIST. GET FILE='testfile2.sav'. DISPLAY DICTIONARY. DISPLAY FILE LABEL. DISPLAY DOCUMENTS. LIST. ]) AT_CHECK([pspp -O format=csv dump-dicts.sps], [0], [Variable,Description,Position id,Format: F2.0,1 name,Format: A20,2 File label: This is the file label Documents in the active dataset: This is a document line Table: Data List id,name 34,frederick @&t@ Variable,Description,Position id,Format: F2.0,1 name,Format: A20,2 File label: This is the file label Documents in the active dataset: This is a document line Table: Data List id,name 21,wheelbarrow @&t@ ]) AT_CLEANUP AT_SETUP([Perl write variable parameters]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) AT_DATA([test.pl], [[use warnings; use strict; use PSPP; my $dict = PSPP::Dict->new(); die "dictionary creation" if !ref $dict; my $int = PSPP::Var->new ($dict, "integer", (width=>8, decimals=>0) ); $int->set_label ("My Integer"); $int->add_value_label (99, "Silly"); $int->clear_value_labels (); $int->add_value_label (0, "Zero"); $int->add_value_label (1, "Unity"); $int->add_value_label (2, "Duality"); my $str = PSPP::Var->new ($dict, "string", (fmt=>PSPP::Fmt::A, width=>8) ); $str->set_label ("My String"); $str->add_value_label ("xx", "foo"); $str->add_value_label ("yy", "bar"); $str->set_missing_values ("this", "that"); my $longstr = PSPP::Var->new ($dict, "longstring", (fmt=>PSPP::Fmt::A, width=>9) ); $longstr->set_label ("My Long String"); my $re = $longstr->add_value_label ("xxx", "xfoo"); $int->set_missing_values (9, 99); my $sysfile = PSPP::Sysfile->new ("testfile.sav", $dict); $sysfile->close (); ]]) AT_CHECK([RUN_PERL_MODULE test.pl]) AT_DATA([dump-dict.sps], [GET FILE='testfile.sav'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -O format=csv dump-dict.sps], [0], [Variable,Description,Position integer,"Label: My Integer Format: F8.0 Missing Values: 9; 99 Value,Label 0,Zero 1,Unity 2,Duality",1 string,"Label: My String Format: A8 Missing Values: ""this ""; ""that "" Value,Label xx ,foo yy ,bar",2 longstring,"Label: My Long String Format: A9 Value,Label xxx ,xfoo",3 ]) AT_CLEANUP AT_SETUP([Perl dictionary survives system file]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) AT_DATA([test.pl], [[use warnings; use strict; use PSPP; my $sysfile ; { my $d = PSPP::Dict->new(); PSPP::Var->new ($d, "id", ( fmt=>PSPP::Fmt::F, width=>2, decimals=>0 ) ); $sysfile = PSPP::Sysfile->new ("testfile.sav", $d); } my $res = $sysfile->append_case ([3]); print "Dictionary survives sysfile\n" if $res; ]]) AT_CHECK([RUN_PERL_MODULE test.pl], [0], [Dictionary survives sysfile ]) AT_CLEANUP m4_define([PERL_GENERATE_SYSFILE], [AT_DATA([sample.sps], [[data list notable list /string (a8) longstring (a12) numeric (f10) date (date11) dollar (dollar8.2) datetime (datetime17) begin data. 1111 One 1 1/1/1 1 1/1/1+01:01 2222 Two 2 2/2/2 2 2/2/2+02:02 3333 Three 3 3/3/3 3 3/3/3+03:03 . . . . . . 5555 Five 5 5/5/5 5 5/5/5+05:05 end data. variable labels string 'A Short String Variable' /longstring 'A Long String Variable' /numeric 'A Numeric Variable' /date 'A Date Variable' /dollar 'A Dollar Variable' /datetime 'A Datetime Variable'. missing values numeric (9, 5, 999). missing values string ("3333"). add value labels /string '1111' 'ones' '2222' 'twos' '3333' 'threes' /numeric 1 'Unity' 2 'Duality' 3 'Thripality'. variable attribute variables = numeric attribute=colour[1]('blue') colour[2]('pink') colour[3]('violet') attribute=size('large') nationality('foreign'). save outfile='sample.sav'. ]]) AT_CHECK([pspp -O format=csv sample.sps])]) AT_SETUP([Perl read system file]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) PERL_GENERATE_SYSFILE AT_DATA([test.pl], [[use warnings; use strict; use PSPP; my $sf = PSPP::Reader->open ("sample.sav"); my $dict = $sf->get_dict (); for (my $v = 0 ; $v < $dict->get_var_cnt() ; $v++) { my $var = $dict->get_var ($v); my $name = $var->get_name (); my $label = $var->get_label (); print "Variable $v is \"$name\", label is \"$label\"\n"; my $vl = $var->get_value_labels (); print "Value Labels:\n"; print "$_ => $vl->{$_}\n" for sort (keys %$vl); } while (my @c = $sf->get_next_case () ) { for (my $v = 0; $v < $dict->get_var_cnt(); $v++) { print "val$v: \"$c[$v]\"\n"; } print "\n"; } ]]) AT_CHECK([RUN_PERL_MODULE test.pl], [0], [Variable 0 is "string", label is "A Short String Variable" Value Labels: 1111 => ones 2222 => twos 3333 => threes Variable 1 is "longstring", label is "A Long String Variable" Value Labels: Variable 2 is "numeric", label is "A Numeric Variable" Value Labels: 1 => Unity 2 => Duality 3 => Thripality Variable 3 is "date", label is "A Date Variable" Value Labels: Variable 4 is "dollar", label is "A Dollar Variable" Value Labels: Variable 5 is "datetime", label is "A Datetime Variable" Value Labels: val0: "1111 " val1: "One " val2: "1" val3: "13197686400" val4: "1" val5: "13197690060" val0: "2222 " val1: "Two " val2: "2" val3: "13231987200" val4: "2" val5: "13231994520" val0: "3333 " val1: "Three " val2: "3" val3: "13266028800" val4: "3" val5: "13266039780" val0: ". " val1: ". " val2: "" val3: "" val4: "" val5: "" val0: "5555 " val1: "Five " val2: "5" val3: "13334630400" val4: "5" val5: "13334648700" ]) AT_CLEANUP AT_SETUP([Perl copying system files]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) PERL_GENERATE_SYSFILE AT_DATA([test.pl], [[use warnings; use strict; use PSPP; my $input = PSPP::Reader->open ("sample.sav"); my $dict = $input->get_dict (); my $output = PSPP::Sysfile->new ("copy.sav", $dict); while (my (@c) = $input->get_next_case () ) { $output->append_case (\@c); } $output->close (); ]]) AT_CHECK([RUN_PERL_MODULE test.pl]) AT_DATA([dump-dicts.sps], [GET FILE='sample.sav'. DISPLAY DICTIONARY. LIST. GET FILE='copy.sav'. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -O format=csv dump-dicts.sps], [0], [[Variable,Description,Position string,"Label: A Short String Variable Format: A8 Missing Values: ""3333 "" Value,Label 1111 ,ones 2222 ,twos 3333 ,threes",1 longstring,"Label: A Long String Variable Format: A12",2 numeric,"Label: A Numeric Variable Format: F10.0 Missing Values: 9; 5; 999 Value,Label 1,Unity 2,Duality 3,Thripality Attribute,Value colour[1],blue colour[2],pink colour[3],violet nationality,foreign size,large",3 date,"Label: A Date Variable Format: DATE11",4 dollar,"Label: A Dollar Variable Format: DOLLAR11.2",5 datetime,"Label: A Datetime Variable Format: DATETIME17.0",6 Table: Data List string,longstring,numeric,date,dollar,datetime 1111 ,One ,1,01-JAN-2001,$1.00,01-JAN-2001 01:01 2222 ,Two ,2,02-FEB-2002,$2.00,02-FEB-2002 02:02 3333 ,Three ,3,03-MAR-2003,$3.00,03-MAR-2003 03:03 . ,. ,.,.,. ,. 5555 ,Five ,5,05-MAY-2005,$5.00,05-MAY-2005 05:05 Variable,Description,Position string,"Label: A Short String Variable Format: A8 Missing Values: ""3333 "" Value,Label 1111 ,ones 2222 ,twos 3333 ,threes",1 longstring,"Label: A Long String Variable Format: A12",2 numeric,"Label: A Numeric Variable Format: F10.0 Missing Values: 9; 5; 999 Value,Label 1,Unity 2,Duality 3,Thripality Attribute,Value colour[1],blue colour[2],pink colour[3],violet nationality,foreign size,large",3 date,"Label: A Date Variable Format: DATE11",4 dollar,"Label: A Dollar Variable Format: DOLLAR11.2",5 datetime,"Label: A Datetime Variable Format: DATETIME17.0",6 Table: Data List string,longstring,numeric,date,dollar,datetime 1111 ,One ,1,01-JAN-2001,$1.00,01-JAN-2001 01:01 2222 ,Two ,2,02-FEB-2002,$2.00,02-FEB-2002 02:02 3333 ,Three ,3,03-MAR-2003,$3.00,03-MAR-2003 03:03 . ,. ,.,.,. ,. 5555 ,Five ,5,05-MAY-2005,$5.00,05-MAY-2005 05:05 ]]) AT_CLEANUP AT_SETUP([Perl value formatting]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) AT_DATA([dd.sps], [DATA LIST LIST /d (DATETIME17). BEGIN DATA. 11/9/2001+08:20 END DATA. SAVE OUTFILE='dd.sav'. ]) AT_CHECK([pspp -O format=csv dd.sps], [0], [Table: Reading free-form data from INLINE. Variable,Format d,DATETIME17.0 ]) AT_DATA([test.pl], [[use warnings; use strict; use PSPP; my $sf = PSPP::Reader->open ("dd.sav"); my $dict = $sf->get_dict (); my (@c) = $sf->get_next_case (); my $var = $dict->get_var (0); my $val = $c[0]; my $formatted = PSPP::format_value ($val, $var); my $str = gmtime ($val - PSPP::PERL_EPOCH); print "Formatted string is \"$formatted\"\n"; print "Perl representation is \"$str\"\n"; ]]) AT_CHECK([RUN_PERL_MODULE test.pl], [0], [[Formatted string is "11-SEP-2001 08:20" Perl representation is "Tue Sep 11 08:20:00 2001" ]]) AT_CLEANUP AT_SETUP([Perl opening nonexistent file]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) AT_DATA([test.pl], [[use warnings; use strict; use PSPP; my $sf = PSPP::Reader->open ("no-such-file.sav"); die "Returns undef on opening failure" if ref $sf; print $PSPP::errstr, "\n"; ]]) AT_CHECK([RUN_PERL_MODULE test.pl], [0], [[An error occurred while opening `no-such-file.sav': No such file or directory. ]], [[Name "PSPP::errstr" used only once: possible typo at test.pl line 8. ]]) AT_CLEANUP AT_SETUP([Perl missing values]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) PERL_GENERATE_SYSFILE AT_DATA([test.pl], [[use warnings; use strict; use PSPP; my $sf = PSPP::Reader->open ("sample.sav"); my $dict = $sf->get_dict (); my (@c) = $sf->get_next_case (); my $stringvar = $dict->get_var (0); my $numericvar = $dict->get_var (2); my $val = $c[0]; die "Missing Value Negative String" if PSPP::value_is_missing ($val, $stringvar); $val = $c[2]; die "Missing Value Negative Num" if PSPP::value_is_missing ($val, $numericvar); @c = $sf->get_next_case (); @c = $sf->get_next_case (); $val = $c[0]; die "Missing Value Positive" if !PSPP::value_is_missing ($val, $stringvar); @c = $sf->get_next_case (); $val = $c[2]; die "Missing Value Positive SYS" if !PSPP::value_is_missing ($val, $numericvar); @c = $sf->get_next_case (); $val = $c[2]; die "Missing Value Positive Num" if !PSPP::value_is_missing ($val, $numericvar); ]]) AT_CHECK([RUN_PERL_MODULE test.pl]) AT_CLEANUP AT_SETUP([Perl custom attributes]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) PERL_GENERATE_SYSFILE AT_DATA([test.pl], [[use warnings; use strict; use PSPP; my $sf = PSPP::Reader->open ("sample.sav"); my $dict = $sf->get_dict (); my $var = $dict->get_var_by_name ("numeric"); my $attr = $var->get_attributes (); foreach my $k (sort (keys (%$attr))) { my $ll = $attr->{$k}; print "$k =>"; print map "$_\n", join ', ', @$ll; } ]]) AT_CHECK([RUN_PERL_MODULE test.pl], [0], [[$@Role =>0 colour =>blue, pink, violet nationality =>foreign size =>large ]]) AT_CLEANUP AT_SETUP([Perl Pspp.t]) AT_SKIP_IF([test "$WITH_PERL_MODULE" = no]) # Skip this test if Perl's Text::Diff module is not installed. AT_CHECK([perl -MText::Diff -e '' || exit 77]) AT_CHECK([RUN_PERL_MODULE $abs_top_builddir/perl-module/t/Pspp.t], [0], [[1..37 ok 1 - use PSPP; ok 2 - Dictionary Creation ok 3 ok 4 - Trap illegal variable name ok 5 ok 6 - Accept legal variable name ok 7 ok 8 - Trap duplicate variable name ok 9 ok 10 - Accept valid format ok 11 ok 12 - Create sysfile object ok 13 - Write system file ok 14 - Append Case ok 15 - Appending Case with too many variables ok 16 - existance ok 17 - Append Case 2 ok 18 - existance2 ok 19 - Check output ok 20 - Dictionary Creation 2 ok 21 - Value label for short string ok 22 - Value label for long string ok 23 - Check output 2 ok 24 - Dictionary survives sysfile ok 25 - Basic reader operation ok 26 - Streaming of files Formatted string is "11-SEP-2001 08:20" ok 27 - format_value function ok 28 - Perl representation of time ok 29 - Returns undef on opening failure ok 30 - Error string on open failure ok 31 - Missing Value Negative String ok 32 - Missing Value Negative Num ok 33 - Missing Value Positive ok 34 - Missing Value Positive SYS ok 35 - Missing Value Positive Num ok 36 - Custom Attributes ok 37 - Case count ]],[ignore]) AT_CLEANUP pspp-1.0.1/tests/testsuite0000644000175000017500001301266313150620001012532 00000000000000#! /bin/sh # Generated from ../tests/testsuite.at by GNU Autoconf 2.69. # # Copyright (C) 2009-2012 Free Software Foundation, Inc. # # This test suite is free software; the Free Software Foundation gives # unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi 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'` if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} # How were we run? at_cli_args="$@" # Not all shells have the 'times' builtin; the subshell is needed to make # sure we discard the 'times: not found' message from the shell. at_times_p=false (times) >/dev/null 2>&1 && at_times_p=: # CLI Arguments to pass to the debugging scripts. at_debug_args= # -e sets to true at_errexit_p=false # Shall we be verbose? ':' means no, empty means yes. at_verbose=: at_quiet= # Running several jobs in parallel, 0 means as many as test groups. at_jobs=1 at_traceon=: at_trace_echo=: at_check_filter_trace=: # Shall we keep the debug scripts? Must be `:' when the suite is # run by a debug script, so that the script doesn't remove itself. at_debug_p=false # Display help message? at_help_p=false # Display the version message? at_version_p=false # List test groups? at_list_p=false # --clean at_clean=false # Test groups to run at_groups= # Whether to rerun failed tests. at_recheck= # Whether a write failure occurred at_write_fail=0 # The directory we run the suite in. Default to . if no -C option. at_dir=`pwd` # An absolute reference to this testsuite script. case $as_myself in [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;; * ) at_myself=$at_dir/$as_myself ;; esac # Whether -C is in effect. at_change_dir=false # Whether to enable colored test results. at_color=no # List of the tested programs. at_tested='' # As many question marks as there are digits in the last test group number. # Used to normalize the test group numbers so that `ls' lists them in # numerical order. at_format='????' # Description of all the test groups. at_help_all="1;calendar.at:19;epoch;; 2;data-in.at:295;numeric input formats;data-in; 3;data-in.at:418;reading big numbers;data-in; 4;data-in.at:498;DATE input format;data-in; 5;data-in.at:710;ADATE input format;data-in; 6;data-in.at:922;EDATE input format;data-in; 7;data-in.at:1134;JDATE input format;data-in; 8;data-in.at:1346;SDATE input format;data-in; 9;data-in.at:1558;QYR input format;data-in; 10;data-in.at:1770;MOYR input format;data-in; 11;data-in.at:1982;WKYR input format;data-in; 12;data-in.at:2194;DATETIME input format;data-in; 13;data-in.at:2606;TIME input format;data-in; 14;data-in.at:3018;DTIME input format;data-in; 15;data-in.at:3430;binary and hexadecimal input (IB, PIB, and PIBHEX formats);; 16;data-in.at:3451;BCD input (P and PK formats);; 17;data-in.at:3471;legacy input (N and Z formats);; 18;data-in.at:3491;WKDAY input format;; 19;data-in.at:3551;MONTH input format;; 20;data-out.at:19;numeric format output;; 21;data-out.at:237;non-ASCII custom currency formats;; 22;data-out.at:273;binary and hexadecimal output;; 23;data-out.at:391;output valid dates;; 24;data-out.at:823;output invalid dates;; 25;data-out.at:916;time output;; 26;data-out.at:13993;MONTH output;; 27;data-out.at:14949;WKDAY output;; 28;data-out.at:15696;AHEX output bug;; 29;datasheet-test.at:28;3x3, 0 backing rows, backing widths ;datasheet; 30;datasheet-test.at:29;3x3, 3 backing rows, backing widths 0,0,0;datasheet; 31;datasheet-test.at:30;3x3, 3 backing rows, backing widths 0;datasheet; 32;datasheet-test.at:31;3x3, 3 backing rows, backing widths 5;datasheet; 33;datasheet-test.at:32;3x3, 1 backing rows, backing widths 0,9,0;datasheet; 34;dictionary.at:19;dictionary case-insensitivity;; 35;file.at:19;Write error - directory exists;; 36;file.at:40;Write error - no permission;; 37;file.at:66;Write error - temp file disappeared;; 38;file.at:84;Write fifo;; 39;file.at:107;Reading from pipe;; 40;format-guesser.at:19;format guesser;; 41;pc+-file-reader.at:19;variable labels and missing values;sack synthetic pc+ file positive; 42;pc+-file-reader.at:137;value labels;sack synthetic pc+ file positive; 43;pc+-file-reader.at:302;compressed data;sack synthetic pc+ file positive; 44;pc+-file-reader.at:379;weighted;sack synthetic pc+ file negative; 45;pc+-file-reader.at:465;unspecified character encoding;sack synthetic pc+ file negative; 46;pc+-file-reader.at:569;unexpected fixed values;sack synthetic pc+ file negative; 47;pc+-file-reader.at:627;short main header;sack synthetic pc+ file negative; 48;pc+-file-reader.at:678;long main header;sack synthetic pc+ file negative; 49;pc+-file-reader.at:730;invalid compression type;sack synthetic pc+ file negative; 50;pc+-file-reader.at:782;unrealistic number of cases;sack synthetic pc+ file negative; 51;pc+-file-reader.at:834;labels bad offsets;sack synthetic pc+ file negative; 52;pc+-file-reader.at:899;record 1 bad length;sack synthetic pc+ file negative; 53;pc+-file-reader.at:952;bad variable format;sack synthetic pc+ file negative; 54;pc+-file-reader.at:1004;bad variable name;sack synthetic pc+ file negative; 55;pc+-file-reader.at:1056;duplicate variable name;sack synthetic pc+ file negative; 56;pc+-file-reader.at:1112;partial case;sack synthetic pc+ file negative; 57;pc+-file-reader.at:1176;case extends past end of data record;sack synthetic pc+ file negative; 58;pc+-file-reader.at:1241;corrupt compressed data;sack synthetic pc+ file positive; 59;pc+-file-reader.at:1319;invalid weight index;sack synthetic pc+ file negative; 60;pc+-file-reader.at:1371;string weight;sack synthetic pc+ file negative; 61;por-file.at:19;overwriting portable file;; 62;por-file.at:34;overwriting portable file atomically;; 63;por-file.at:52;write to same portable file being read;; 64;por-file.at:86;write portable file with value labels;; 65;sys-file-reader.at:19;variable labels and missing values;sack synthetic system file positive; 66;sys-file-reader.at:203;unspecified number of variable positions;sack synthetic system file positive; 67;sys-file-reader.at:254;wrong number of variable positions but version 13;sack synthetic system file positive; 68;sys-file-reader.at:308;value labels;sack synthetic system file positive; 69;sys-file-reader.at:521;documents;sack synthetic system file positive; 70;sys-file-reader.at:587;empty document record;sack synthetic system file positive; 71;sys-file-reader.at:634;multiple response sets;sack synthetic system file positive; 72;sys-file-reader.at:751;extra product info;sack synthetic system file positive; 73;sys-file-reader.at:798;variable display parameters, without width;sack synthetic system file positive; 74;sys-file-reader.at:904;variable display parameters, with width;sack synthetic system file positive; 75;sys-file-reader.at:1022;long variable names;sack synthetic system file positive; 76;sys-file-reader.at:1088;very long strings;sack synthetic system file positive; 77;sys-file-reader.at:1156;data file and variable attributes;sack synthetic system file positive; 78;sys-file-reader.at:1273;variable roles;sack synthetic system file positive; 79;sys-file-reader.at:1347;compressed data;sack synthetic system file positive; 80;sys-file-reader.at:1409;compressed data, zero bias;sack synthetic system file positive; 81;sys-file-reader.at:1471;compressed data, other bias;sack synthetic system file positive; 82;sys-file-reader.at:1606;zcompressed data;sack synthetic system file positive zlib; 83;sys-file-reader.at:1636;no variables;sack synthetic system file negative; 84;sys-file-reader.at:1673;unspecified character encoding;sack synthetic system file positive; 85;sys-file-reader.at:1709;misplaced type 4 record;sack synthetic system file negative; 86;sys-file-reader.at:1732;bad record type;sack synthetic system file negative; 87;sys-file-reader.at:1755;wrong number of variable positions;sack synthetic system file negative; 88;sys-file-reader.at:1781;variable name may not begin with \`#';sack synthetic system file negative; 89;sys-file-reader.at:1807;variable name may not be reserved word;sack synthetic system file negative; 90;sys-file-reader.at:1833;variable width must be between 0 and 255;sack synthetic system file negative; 91;sys-file-reader.at:1861;duplicate variable name;sack synthetic system file negative; 92;sys-file-reader.at:1893;variable label indicator not 0 or 1;sack synthetic system file negative; 93;sys-file-reader.at:1919;invalid numeric missing value indicator;sack synthetic system file negative; 94;sys-file-reader.at:1945;invalid string missing value indicator;sack synthetic system file negative; 95;sys-file-reader.at:1971;missing string continuation record;sack synthetic system file negative; 96;sys-file-reader.at:1998;invalid variable format;sack synthetic system file negative; 97;sys-file-reader.at:2047;invalid long string missing values;sack synthetic system file negative; 98;sys-file-reader.at:2136;weighting variable must be numeric;sack synthetic system file negative; 99;sys-file-reader.at:2170;bad weighting variable index;sack synthetic system file negative; 100;sys-file-reader.at:2199;variable index is long string contination;sack synthetic system file negative; 101;sys-file-reader.at:2229;multiple documents records;sack synthetic system file negative; 102;sys-file-reader.at:2263;extension record too large;sack synthetic system file negative; 103;sys-file-reader.at:2287;unknown extension record;sack synthetic system file negative; 104;sys-file-reader.at:2317;bad machine integer info size;sack synthetic system file negative; 105;sys-file-reader.at:2347;bad machine integer info float format;sack synthetic system file negative; 106;sys-file-reader.at:2377;bad machine integer info endianness;sack synthetic system file negative; 107;sys-file-reader.at:2413;bad machine floating-point info size;sack synthetic system file negative; 108;sys-file-reader.at:2443;wrong special floating point values;sack synthetic system file negative; 109;sys-file-reader.at:2476;bad mrsets name;sack synthetic system file negative multiple response; 110;sys-file-reader.at:2576;missing space after C in mrsets;sack synthetic system file negative multiple response; 111;sys-file-reader.at:2604;missing space after E in mrsets;sack synthetic system file negative multiple response; 112;sys-file-reader.at:2632;unexpected label source in mrsets;sack synthetic system file negative multiple response; 113;sys-file-reader.at:2662;bad type character in mrsets;sack synthetic system file negative multiple response; 114;sys-file-reader.at:2690;bad counted string length in mrsets;sack synthetic system file negative multiple response; 115;sys-file-reader.at:2718;missing space in counted string in mrsets;sack synthetic system file negative multiple response; 116;sys-file-reader.at:2746;counted string too long in mrsets;sack synthetic system file negative multiple response; 117;sys-file-reader.at:2774;missing space after counted string in mrsets;sack synthetic system file negative multiple response; 118;sys-file-reader.at:2802;missing newline after variable name in mrsets;sack synthetic system file negative multiple response; 119;sys-file-reader.at:2832;duplicate variable name in mrsets;sack synthetic system file negative multiple response; 120;sys-file-reader.at:2862;mixed variable types in mrsets;sack synthetic system file negative multiple response; 121;sys-file-reader.at:2893;missing newline after variable name in mrsets;sack synthetic system file negative multiple response; 122;sys-file-reader.at:2921;zero or one variable in mrset;sack synthetic system file negative multiple response; 123;sys-file-reader.at:2951;wrong display parameter size;sack synthetic system file negative; 124;sys-file-reader.at:2980;wrong display parameter count;sack synthetic system file negative; 125;sys-file-reader.at:3009;wrong display measurement level;sack synthetic system file negative; 126;sys-file-reader.at:3038;wrong display alignment;sack synthetic system file negative; 127;sys-file-reader.at:3067;bad variable name in variable/value pair;sack synthetic system file negative; 128;sys-file-reader.at:3097;duplicate long variable name;sack synthetic system file negative; 129;sys-file-reader.at:3142;bad very long string length;sack synthetic system file negative; 130;sys-file-reader.at:3180;bad very long string segment width;sack synthetic system file negative; 131;sys-file-reader.at:3215;too many value labels;sack synthetic system file negative; 132;sys-file-reader.at:3237;missing type 4 record;sack synthetic system file negative; 133;sys-file-reader.at:3267;value label with no associated variables;sack synthetic system file negative; 134;sys-file-reader.at:3291;type 4 record names long string variable;sack synthetic system file negative; 135;sys-file-reader.at:3322;variables for value label must all be same type;sack synthetic system file negative; 136;sys-file-reader.at:3353;duplicate value labels type;sack synthetic system file negative; 137;sys-file-reader.at:3387;missing attribute value;sack synthetic system file negative; 138;sys-file-reader.at:3427;unquoted attribute value;sack synthetic system file negative; 139;sys-file-reader.at:3468;duplicate attribute name;sack synthetic system file negative; 140;sys-file-reader.at:3510;bad variable name in long string value label;sack synthetic system file negative; 141;sys-file-reader.at:3569;fewer data records than indicated by file header;sack synthetic system file negative; 142;sys-file-reader.at:3609;partial data record between variables;sack synthetic system file negative; 143;sys-file-reader.at:3643;partial data record within long string;sack synthetic system file negative; 144;sys-file-reader.at:3677;partial compressed data record;sack synthetic system file positive; 145;sys-file-reader.at:3725;zcompressed data - bad zheader_ofs;sack synthetic system file negative zlib; 146;sys-file-reader.at:3737;zcompressed data - bad ztrailer_ofs;sack synthetic system file negative zlib; 147;sys-file-reader.at:3751;zcompressed data - invalid ztrailer_len;sack synthetic system file negative zlib; 148;sys-file-reader.at:3764;zcompressed data - wrong ztrailer_len;sack synthetic system file negative zlib; 149;sys-file-reader.at:3777;zcompressed data - wrong ztrailer_bias;sack synthetic system file negative zlib; 150;sys-file-reader.at:3789;zcompressed data - wrong ztrailer_zero;sack synthetic system file negative zlib; 151;sys-file-reader.at:3801;zcompressed data - wrong block_size;sack synthetic system file negative zlib; 152;sys-file-reader.at:3813;zcompressed data - wrong n_blocks;sack synthetic system file negative zlib; 153;sys-file-reader.at:3825;zcompressed data - wrong uncompressed_ofs;sack synthetic system file negative zlib; 154;sys-file-reader.at:3837;zcompressed data - wrong compressed_ofs;sack synthetic system file negative zlib; 155;sys-file-reader.at:3849;zcompressed data - compressed sizes don't add up;sack synthetic system file negative zlib; 156;sys-file-reader.at:3915;zcompressed data - uncompressed_size > block_size;sack synthetic system file negative zlib; 157;sys-file-reader.at:3927;zcompressed data - compression expands data too much;sack synthetic system file negative zlib; 158;sys-file-reader.at:3940;zcompressed data - compressed sizes don't add up;sack synthetic system file negative zlib; 159;sys-file-reader.at:3957;integer overflows in long string missing values;system file negative; 160;sys-file-reader.at:3970;null dereference skipping bad extension record 18;system file negative; 161;sys-file.at:20;write and read numeric data;save get system file; 162;sys-file.at:62;write and read long string value labels and missing values;save get system file; 163;sys-file.at:115;write and read compressed files;save get system file; 164;sys-file.at:142;overwriting system file;; 165;sys-file.at:157;overwriting system file atomically;; 166;sys-file.at:176;write to same system file being read;; 167;sys-file.at:207;nonempty case_map doesn't crash;save system file; 168;sys-file.at:233;system files with -1 case_size;save get; 169;sys-file.at:291;write v2 system file;save; 170;sys-file.at:332;read very long strings written by SPSS 13;; 171;sys-file.at:358;read very long strings written by SPSS 14;; 172;sys-file.at:427;save very long string -- uncompressed;; 173;sys-file.at:428;save very long string -- compressed;; 174;sys-file.at:433;system file character encoding;; 175;encrypted-file.at:19;decrypt an encrypted system file;system file decrypt pspp-convert; 176;encrypted-file.at:45;decrypt an encrypted syntax file;syntax file decrypt pspp-convert; 177;command.at:20;command parser crash bug;; 178;command.at:36;FINISH executes immediately;; 179;command.at:42;ERASE -- safer mode;; 180;command.at:57;ERASE -- not safer mode;; 181;command.at:70;N OF CASES;; 182;command.at:109;COMMENT at end of file;; 183;do-if.at:19;DO IF;; 184;do-if.at:68;unpaired END IF crash;; 185;do-if.at:80;ELSE without DO IF;; 186;do-repeat.at:19;DO REPEAT -- simple;; 187;do-repeat.at:43;DO REPEAT -- containing BEGIN DATA;; 188;do-repeat.at:78;DO REPEAT -- dummy vars not expanded in include files;; 189;do-repeat.at:108;DO REPEAT -- nested;; 190;do-repeat.at:141;DO REPEAT -- empty;; 191;do-repeat.at:158;DO REPEAT -- missing END REPEAT;; 192;loop.at:29;LOOP with index;; 193;loop.at:64;LOOP with IF condition;; 194;loop.at:101;LOOP with END IF condition;; 195;loop.at:140;LOOP with index and IF based on index;; 196;loop.at:169;LOOP with index and END IF based on index;; 197;loop.at:202;LOOP with index and IF and END IF based on index;; 198;loop.at:227;LOOP with no conditions containing BREAK;; 199;loop.at:265;LOOP with no conditions that ends due to MXLOOPS;; 200;temporary.at:20;TEMPORARY as first transformation;; 201;data-list.at:19;DATA LIST LIST with empty fields;; 202;data-list.at:50;DATA LIST LIST with explicit delimiters;; 203;data-list.at:79;DATA LIST FREE with SKIP;; 204;data-list.at:113;DATA LIST LIST with SKIP and tab delimiter;; 205;data-list.at:162;DATA LIST FREE with explicit delimiter at end of line;; 206;data-list.at:223;DATA LIST FIXED with multiple records per case;; 207;data-list.at:255;DATA LIST FIXED with empty trailing record;; 208;data-list.at:285;DATA LIST with various line-ends;; 209;data-list.at:309;DATA LIST properly expands tabs in input;; 210;data-list.at:339;DATA LIST FREE and LIST report missing delimiters;; 211;data-list.at:357;DATA LIST FREE and LIST assume a width if omitted;; 212;data-list.at:370;DATA LIST Decimal comma;; 213;data-list.at:405;DATA LIST - Negative SKIP;; 214;data-list.at:421;DATA LIST - Negative RECORDS;; 215;data-reader.at:21;BEGIN DATA as part of a procedure;; 216;data-reader.at:54;BEGIN DATA as an independent command;; 217;data-reader.at:211;read and write files with MODE=BINARY;; 218;data-reader.at:217;read and write files with MODE=360 /RECFORM=FIXED /LRECL=32;; 219;data-reader.at:227;read and write files with MODE=360 /RECFORM=VARIABLE;; 220;data-reader.at:234;read and write files with MODE=360 /RECFORM=SPANNED;; 221;dataset.at:19;DATASET COPY;; 222;dataset.at:115;DATASET DECLARE;; 223;dataset.at:146;DATASET NAME deletes duplicate name;; 224;dataset.at:170;DATASET ACTIVATE deletes unnamed dataset;; 225;dataset.at:190;DATASET ACTIVATE executes pending transformations;; 226;dataset.at:240;DATASET CLOSE;; 227;file-handle.at:19;FILE HANDLE;; 228;get-data-spreadsheet.at:169;GET DATA /TYPE=GNM with CELLRANGE;; 229;get-data-spreadsheet.at:169;GET DATA /TYPE=GNM with CELLRANGE and READNAMES;; 230;get-data-spreadsheet.at:169;GET DATA /TYPE=GNM without CELLRANGE;; 231;get-data-spreadsheet.at:169;GET DATA /TYPE=GNM with missing data;; 232;get-data-spreadsheet.at:169;GET DATA /TYPE=GNM with no options;; 233;get-data-spreadsheet.at:169;GET DATA /TYPE=GNM with empty sheet;; 234;get-data-spreadsheet.at:169;GET DATA /TYPE=GNM with nonexistent sheet;; 235;get-data-spreadsheet.at:172;GET DATA /TYPE=GNM sheet index bug;; 236;get-data-spreadsheet.at:321;GET DATA /TYPE=GNM assert-fail;; 237;get-data-spreadsheet.at:375;GET DATA /TYPE=ODS with CELLRANGE;; 238;get-data-spreadsheet.at:375;GET DATA /TYPE=ODS with CELLRANGE and READNAMES;; 239;get-data-spreadsheet.at:375;GET DATA /TYPE=ODS without CELLRANGE;; 240;get-data-spreadsheet.at:375;GET DATA /TYPE=ODS with missing data;; 241;get-data-spreadsheet.at:375;GET DATA /TYPE=ODS with no options;; 242;get-data-spreadsheet.at:375;GET DATA /TYPE=ODS with empty sheet;; 243;get-data-spreadsheet.at:375;GET DATA /TYPE=ODS with nonexistent sheet;; 244;get-data-spreadsheet.at:378;GET DATA /TYPE=ODS crash;; 245;get-data-psql.at:140;GET DATA /TYPE=PSQL;; 246;get-data-txt.at:23;GET DATA /TYPE=TXT with explicit delimiters;; 247;get-data-txt.at:45;GET DATA /TYPE=TXT with FIRSTCASE;; 248;get-data-txt.at:83;GET DATA /TYPE=TXT with FIRSTCASE and tab delimiter;; 249;get-data-txt.at:132;GET DATA /TYPE=TXT with multiple records per case;; 250;get-data-txt.at:161;GET DATA /TYPE=TXT with empty trailing record;; 251;get-data-txt.at:194;GET DATA /TYPE=TXT password example;; 252;get-data-txt.at:225;GET DATA /TYPE=TXT cars example;; 253;get-data-txt.at:272;GET DATA /TYPE=TXT pets example;; 254;get-data-txt.at:305;GET DATA /TYPE=TXT with IMPORTCASE;; 255;get-data-txt.at:332;GET DATA /TYPE=TXT with ENCODING subcommand;; 256;get-data-txt.at:350;GET DATA /TYPE= truncated;; 257;get-data-txt.at:363;GET DATA /TYPE=txt bug;; 258;get-data-txt.at:400;GET DATA /TYPE=txt another bug;; 259;get.at:21;GET data works in multiple procedures;; 260;get.at:72;GET nonexistent file doesn't crash;; 261;get.at:106;GET with /KEEP=ALL crashes -- uncompressed;; 262;get.at:107;GET with /KEEP=ALL crashes -- compressed;; 263;get.at:111;GET data no type;; 264;inpt-pgm.at:21;INPUT PROGRAM invalid syntax crash;; 265;inpt-pgm.at:37;INPUT PROGRAM invalid syntax crash;; 266;inpt-pgm.at:52;INPUT PROGRAM infinite loop;; 267;inpt-pgm.at:69;INPUT PROGRAM with VECTOR and EXECUTE;; 268;list.at:19;LIST plain cases;; 269;list.at:61;LIST numbered cases;; 270;list.at:105;LIST with split file;; 271;list.at:147;LIST lots of variables;; 272;list.at:173;LIST selected cases;; 273;list.at:241;LIST very long string;; 274;list.at:269;LIST crash on invalid input;; 275;match-files.at:120;MATCH FILES -- system file and system file;; 276;match-files.at:121;MATCH FILES -- system file and active file;; 277;match-files.at:122;MATCH FILES -- active file and system file;; 278;match-files.at:123;MATCH FILES -- system file and system table;; 279;match-files.at:124;MATCH FILES -- system file and active table;; 280;match-files.at:125;MATCH FILES -- active file and system table;; 281;match-files.at:127;MATCH FILES parallel match;; 282;match-files.at:154;MATCH FILES bug with TABLE from active dataset;; 283;match-files.at:186;MATCH FILES bug with scratch variables;; 284;match-files.at:222;MATCH FILES with incompatible variable types;; 285;matrix-data.at:19;Matrix data (lower file);; 286;matrix-data.at:66;Matrix data (upper);; 287;matrix-data.at:100;Matrix data (full);; 288;matrix-data.at:137;Matrix data (upper nodiagonal);; 289;matrix-data.at:171;Matrix data (lower nodiagonal);; 290;matrix-data.at:206;Matrix data split data;; 291;matrix-data.at:265;Matrix data duplicate variable;; 292;matrix-data.at:297;Matrix data - long variable names;; 293;matrix-data.at:333;Matrix reader - read integrity;; 294;matrix-data.at:383;Matrix data - too many rows;; 295;matrix-data.at:423;Matrix data (badly formed);; 296;matrix-data.at:450;Matrix data (N subcommand);; 297;print-space.at:19;PRINT SPACE without arguments;; 298;print-space.at:41;PRINT SPACE with number;; 299;print-space.at:67;PRINT SPACE to file;; 300;print-space.at:88;PRINT SPACE to file with number;; 301;print.at:36;PRINT numeric variables;; 302;print.at:107;PRINT string variables;; 303;print.at:134;PRINT to file;; 304;print.at:179;PRINT crash bug;; 305;print.at:200;WRITE to file;; 306;print.at:243;PRINT overwrites file;; 307;print.at:259;PRINT overwrites file atomically;; 308;print.at:277;PRINT to same file being read;; 309;print.at:293;PRINT to special file;; 310;print.at:322;PRINT with special line ends;; 311;save.at:19;IMPORT and EXPORT;; 312;save.at:47;SAVE -- delete unselected;; 313;save-translate.at:39;CSV output -- defaults;save translate; 314;save-translate.at:48;CSV output -- recode missing, delete unselected;save translate; 315;save-translate.at:56;CSV output -- var names, formats;save translate; 316;save-translate.at:67;CSV output -- comma as decimal point;save translate; 317;save-translate.at:77;CSV output -- custom delimiter, qualifier;save translate; 318;save-translate.at:88;CSV output -- KEEP, RENAME;save translate; 319;save-translate.at:100;TAB output;save translate; 320;attributes.at:19;VARIABLE ATTRIBUTES and DATAFILE ATTRIBUTES;; 321;delete-variables.at:20;DELETE VARIABLES with FILTER;; 322;formats.at:19;FORMATS positive tests;; 323;formats.at:65;FORMATS negative tests;; 324;missing-values.at:19;MISSING VALUES valid cases;; 325;missing-values.at:145;MISSING VALUES invalid cases;; 326;mrsets.at:137;MRSETS add, display, delete;; 327;mrsets.at:208;MRSETS read and write;; 328;mrsets.at:222;MRSETS names must begin with \$;; 329;mrsets.at:232;MRSETS must have at least 2 variables;; 330;mrsets.at:242;MRSETS does not allow noninteger VALUE;; 331;mrsets.at:252;MRSETS requires NAME to define a group;; 332;mrsets.at:262;MRSETS requires VARIABLES to define a group;; 333;mrsets.at:272;MRSETS variables must be same type;; 334;mrsets.at:284;MRSETS variables and VALUE must be same type;; 335;mrsets.at:297;MRSETS VALUE must not be too wide;; 336;mrsets.at:307;MRSETS LABEL and LABELSOURCE are exclusive;; 337;mrsets.at:318;MRSETS DISPLAY or DELETE unknown group;; 338;rename-variables.at:19;RENAME VARIABLES;; 339;rename-variables.at:64;RENAME VARIABLES -- multiple sets;; 340;rename-variables.at:93;RENAME VARIABLES -- invalid syntax 1;; 341;rename-variables.at:105;RENAME VARIABLES -- invalid syntax 2;; 342;rename-variables.at:119;RENAME VARIABLES -- invalid syntax 3;; 343;sort-variables.at:19;SORT VARIABLES;; 344;split-file.at:19;SPLIT FILE - basic test;; 345;split-file.at:77;SPLIT FILE - vs procedures;; 346;sys-file-info.at:19;SYSFILE INFO;; 347;sys-file-info.at:70;DISPLAY FILE LABEL;; 348;sys-file-info.at:90;DISPLAY SCRATCH;; 349;sys-file-info.at:105;DISPLAY INDEX;; 350;sys-file-info.at:117;DISPLAY NAMES;; 351;sys-file-info.at:129;DISPLAY LABELS;; 352;value-labels.at:19;VALUE LABELS date formats;; 353;value-labels.at:43;VALUE LABELS with new-line;; 354;value-labels.at:74;VALUE LABELS with new-line in system file;; 355;value-labels.at:112;VALUE LABELS invalid syntax bug;; 356;value-labels.at:130;VALUE LABELS trailing \`/' bug;; 357;variable-display.at:19;variable display attribute commands;; 358;variable-display.at:52;variable labels;; 359;vector.at:19;VECTOR short form;; 360;vector.at:35;VECTOR short form with format specification;; 361;vector.at:55;VECTOR short form in INPUT PROGRAM;; 362;vector.at:74;VECTOR long form;; 363;weight.at:19;WEIGHT;; 364;evaluate.at:1989;LAG function;; 365;evaluate.at:2021;LAG crash bug;; 366;evaluate.at:2046;UNIFORM function;; 367;evaluate.at:2088;VALUELABEL function;; 368;evaluate.at:2132;variables in expressions;; 369;evaluate.at:2181;vectors in expressions;; 370;parse.at:19;parse expression with unknown variable crash;; 371;parse.at:41;parse expression with invalid logical expression;; 372;command-name.at:19;single words;command name matching; 373;command-name.at:61;two words without prefix match;command name matching; 374;command-name.at:102;two words with prefix match;command name matching; 375;command-name.at:128;ambiguous single-word names;command name matching; 376;command-name.at:154;ambiguous two-word names;command name matching; 377;command-name.at:190;numbers and punctuation;command name matching; 378;command-name.at:226;off by more than one word;command name matching; 379;lexer.at:19;lexer ignores initial #! line;; 380;lexer.at:38;lexer properly reports scan errors;; 381;lexer.at:82;lexer crash due to null byte;; 382;q2c.at:19;q2c enforces mandatory subcommands;; 383;scan.at:21;identifiers;scan; 384;scan.at:82;reserved words;scan; 385;scan.at:179;punctuation;scan; 386;scan.at:252;numbers;scan; 387;scan.at:337;strings;scan; 388;scan.at:432;#! construct;scan; 389;scan.at:456;* and COMMENT commands;scan; 390;scan.at:533;DOCUMENT command;scan; 391;scan.at:582;TITLE, SUBTITLE, FILE LABEL commands;scan; 392;scan.at:666;BEGIN DATA command;scan; 393;scan.at:723;DO REPEAT command;scan; 394;scan.at:780;batch mode;scan; 395;segment.at:24;identifiers;segment; 396;segment.at:107;identifiers that end in '.';segment; 397;segment.at:213;reserved words;segment; 398;segment.at:277;punctuation;segment; 399;segment.at:333;numbers;segment; 400;segment.at:400;strings;segment; 401;segment.at:472;#! construct;segment; 402;segment.at:503;* and COMMENT commands;segment; 403;segment.at:591;DOCUMENT command;segment; 404;segment.at:650;TITLE, SUBTITLE, FILE LABEL commands;segment; 405;segment.at:739;BEGIN DATA command;segment; 406;segment.at:864;DO REPEAT command;segment; 407;segment.at:946;batch mode;segment; 408;segment.at:1000;auto mode;segment; 409;variable-parser.at:22;Long variable names;; 410;aggregate.at:177;AGGREGATE presorted data to dataset file, itemwise missing;; 411;aggregate.at:178;AGGREGATE presorted data to dataset file, columnwise missing;; 412;aggregate.at:179;AGGREGATE unsorted data to dataset file, itemwise missing;; 413;aggregate.at:180;AGGREGATE unsorted data to dataset file, columnwise missing;; 414;aggregate.at:181;AGGREGATE presorted data to active file, itemwise missing;; 415;aggregate.at:182;AGGREGATE presorted data to active file, columnwise missing;; 416;aggregate.at:183;AGGREGATE unsorted data to active file, itemwise missing;; 417;aggregate.at:184;AGGREGATE unsorted data to active file, columnwise missing;; 418;aggregate.at:185;AGGREGATE presorted data to external file, itemwise missing;; 419;aggregate.at:186;AGGREGATE presorted data to external file, columnwise missing;; 420;aggregate.at:187;AGGREGATE unsorted data to external file, itemwise missing;; 421;aggregate.at:188;AGGREGATE unsorted data to external file, columnwise missing;; 422;aggregate.at:190;AGGREGATE crash with MAX function;; 423;aggregate.at:216;AGGREGATE crash with invalid syntax;; 424;aggregate.at:232;AGGREGATE mode=addvariables;; 425;aggregate.at:271;AGGREGATE buggy duplicate variables;; 426;autorecode.at:19;AUTORECODE numbers and short strings;; 427;autorecode.at:75;AUTORECODE long strings and check the value labels;; 428;autorecode.at:121;AUTORECODE group subcommand;; 429;autorecode.at:155;AUTORECODE group - string variables;; 430;autorecode.at:191;AUTORECODE group vs. strings;; 431;autorecode.at:221;AUTORECODE /blank;; 432;autorecode.at:252;AUTORECODE with TEMPORARY;; 433;autorecode.at:295;AUTORECODE with /INTO;; 434;correlations.at:19;CORRELATIONS -- unweighted;; 435;correlations.at:89;CORRELATIONS -- weighted;; 436;correlations.at:137;CORRELATIONS -- non-square;; 437;correlations.at:166;CORRELATIONS -- crash with WITH keyword;; 438;correlations.at:222;CORRELATIONS -- incorrect subtable selection;; 439;correlations.at:370;CORRELATIONS -- empty dataset;; 440;correlations.at:382;CORRELATIONS -- empty dataset 2;; 441;crosstabs.at:19;CROSSTABS integer mode crash;; 442;crosstabs.at:57;CROSSTABS integer mode crash 2;; 443;crosstabs.at:83;CROSSTABS long string crash;; 444;crosstabs.at:124;CROSSTABS crash;; 445;crosstabs.at:184;CROSSTABS chi-square crash;; 446;crosstabs.at:228;CROSSTABS crash with SPLIT FILE;; 447;crosstabs.at:323;3-way CROSSTABS;; 448;crosstabs.at:450;CROSSTABS rounding weights with COUNT;; 449;crosstabs.at:557;CROSSTABS descending sort order;; 450;crosstabs.at:592;CROSSTABS crash when all cases missing;; 451;crosstabs.at:617;CROSSTABS Fisher Exact Test;; 452;crosstabs.at:882;CROSSTABS Pearson's R;; 453;crosstabs.at:1115;CROSSTABS Goodman and Kruskal's lambda;; 454;crosstabs.at:1216;CROSSTABS Goodman and Kruskal's lambda - treatment of ties;; 455;crosstabs.at:1251;CROSSTABS Somers' D, Tau-B, Tau-C, Gamma;; 456;crosstabs.at:1592;CROSSTABS Cohens Kappa;; 457;crosstabs.at:1637;CROSSTABS many statistics;; 458;crosstabs.at:1695;CROSSTABS uncertainy coefficient;; 459;crosstabs.at:1734;CROSSTABS barchart;; 460;descriptives.at:19;DESCRIPTIVES basics;; 461;descriptives.at:98;DESCRIPTIVES -- excluding missing data;; 462;descriptives.at:112;DESCRIPTIVES -- including missing data;; 463;descriptives.at:126;DESCRIPTIVES -- excluding missing data listwise;; 464;descriptives.at:140;DESCRIPTIVES -- including missing data listwise;; 465;descriptives.at:154;DESCRIPTIVES bug calculating mean only;; 466;descriptives.at:180;DESCRIPTIVES bug with TEMPORARY;; 467;descriptives.at:205;DESCRIPTIVES -- Z scores;; 468;descriptives.at:236;DESCRIPTIVES -- Z scores with SPLIT FILE;; 469;descriptives.at:300;DESCRIPTIVES -- Z scores bug with TEMPORARY;; 470;descriptives.at:342;DESCRIPTIVES -- Z scores with FILTER;; 471;examine.at:19;EXAMINE;; 472;examine.at:190;EXAMINE -- extremes;; 473;examine.at:251;EXAMINE -- extremes with fractional weights;; 474;examine.at:327;EXAMINE -- percentiles;; 475;examine.at:419;EXAMINE -- missing values;; 476;examine.at:459;EXAMINE -- user missing values;; 477;examine.at:485;EXAMINE -- missing values and percentiles;; 478;examine.at:505;EXAMINE -- trimmed mean;; 479;examine.at:552;EXAMINE -- crash bug;; 480;examine.at:570;EXAMINE -- consecutive runs don't crash;; 481;examine.at:588;EXAMINE -- missing values don't crash;; 482;examine.at:605;EXAMINE -- single case doesn't crash;; 483;examine.at:624;EXAMINE -- all-missing data doesn't crash;; 484;examine.at:646;EXAMINE -- big input doesn't crash;; 485;examine.at:666;EXAMINE -- big input doesn't crash 2;; 486;examine.at:693;EXAMINE -- non-numeric ID;; 487;examine.at:745;EXAMINE -- Bad Input;; 488;examine.at:775;EXAMINE -- MISSING=REPORT;; 489;examine.at:903;EXAMINE -- sample unweighted;; 490;examine.at:1046;EXAMINE -- Empty Parentheses;; 491;examine.at:1070;EXAMINE -- Bad variable;; 492;examine.at:1093;EXAMINE -- Extremes vs. Missing Weights;; 493;graph.at:19;GRAPH simple scatterplot;; 494;graph.at:43;GRAPH Scatter and Histogram;; 495;graph.at:97;GRAPH missing values don't crash;; 496;graph.at:118;GRAPH missing=VARIABLE no crash;; 497;graph.at:141;GRAPH missing value in by variable;; 498;graph.at:166;GRAPH histogram with null data;; 499;graph.at:184;GRAPH histogram all missing;; 500;graph.at:203;GRAPH barcharts;; 501;graph.at:232;GRAPH barchart arity;; 502;graph.at:261;GRAPH barchart bad syntax;; 503;graph.at:289;GRAPH barchart full;; 504;graph.at:332;GRAPH buggy syntax;; 505;factor.at:19;FACTOR extraction=paf method=correlation;; 506;factor.at:1539;FACTOR extraction=pc method=correlation;; 507;factor.at:1800;FACTOR empty dataset;; 508;factor.at:1821;FACTOR /ROTATION=NOROTATE;; 509;factor.at:1895;FACTOR /CRITERIA=ITERATE;; 510;factor.at:1945;FACTOR promax;; 511;factor.at:2090;FACTOR covariance matrix;; 512;factor.at:2171;FACTOR correlation matrix;; 513;factor.at:2267;FACTOR bad input;; 514;factor.at:2300;FACTOR anti-image matrix;; 515;factor.at:2357;FACTOR Kaiser-Meyer-Olkin;; 516;flip.at:19;FLIP with NEWNAMES;; 517;flip.at:66;FLIP without NEWNAMES;; 518;flip.at:104;FLIP badly formed;; 519;flip.at:120;FLIP with invalid variable names;; 520;frequencies.at:19;FREQUENCIES string variable;; 521;frequencies.at:52;FREQUENCIES two runs crash;; 522;frequencies.at:101;FREQUENCIES with LIMIT;; 523;frequencies.at:125;FREQUENCIES HTML output crash;; 524;frequencies.at:160;FREQUENCIES pie chart crash;; 525;frequencies.at:196;FREQUENCIES histogram crash;; 526;frequencies.at:227;FREQUENCIES median with histogram crash;; 527;frequencies.at:242;FREQUENCIES crash after TEMPORARY;; 528;frequencies.at:303;FREQUENCIES basic percentiles;; 529;frequencies.at:323;FREQUENCIES basic n-tiles;; 530;frequencies.at:344;FREQUENCIES compatibility percentiles;; 531;frequencies.at:385;FREQUENCIES enhanced percentiles;; 532;frequencies.at:425;FREQUENCIES enhanced percentiles, weighted;; 533;frequencies.at:469;FREQUENCIES enhanced percentiles, weighted (2);; 534;frequencies.at:511;FREQUENCIES enhanced percentiles, weighted (3);; 535;frequencies.at:551;FREQUENCIES enhanced percentiles, weighted, missing values;; 536;frequencies.at:596;FREQUENCIES dichotomous histogram;; 537;frequencies.at:630;FREQUENCIES median;; 538;frequencies.at:660;FREQUENCIES variance;; 539;frequencies.at:691;FREQUENCIES default statistics;; 540;frequencies.at:746;FREQUENCIES no valid data;; 541;frequencies.at:789;FREQUENCIES histogram no valid cases;; 542;frequencies.at:810;FREQUENCIES percentiles + histogram bug#48128;; 543;glm.at:19;GLM latin square design;; 544;glm.at:90;GLM 2 by 2 factorial design;; 545;glm.at:142;GLM Type I and II Sums of Squares;; 546;glm.at:275;GLM excluded intercept;; 547;glm.at:346;GLM missing values;; 548;logistic.at:97;LOGISTIC REGRESSION basic test;; 549;logistic.at:149;LOGISTIC REGRESSION missing values;; 550;logistic.at:197;LOGISTIC REGRESSION weights;; 551;logistic.at:258;LOGISTIC REGRESSION without constant;; 552;logistic.at:315;LOGISTIC REGRESSION non-dichotomous dep var;; 553;logistic.at:340;LOGISTIC REGRESSION with categorical;; 554;logistic.at:808;LOGISTIC REGRESSION with cat var 2;; 555;logistic.at:1075;LOGISTIC REGRESSION identical categories;; 556;logistic.at:1095;LOGISTIC REGRESSION missing categoricals;; 557;logistic.at:1232;LOGISTIC REGRESSION confidence interval;; 558;means.at:19;MEANS simple example;; 559;means.at:80;MEANS very simple example;; 560;means.at:114;MEANS default missing;; 561;means.at:168;MEANS linear stats;; 562;means.at:217;MEANS standard errors;; 563;means.at:263;MEANS harmonic and geometric means;; 564;means.at:305;MEANS all/none/default;; 565;means.at:365;MEANS missing=table ;; 566;means.at:475;MEANS user missing values;; 567;means.at:573;MEANS empty factor spec;; 568;means.at:593;MEANS parser bug;; 569;npar.at:19;NPAR TESTS BINOMIAL P < 0.5; N1/N2 < 1;; 570;npar.at:44;NPAR TESTS BINOMIAL P < 0.5; N1/N2 > 1;; 571;npar.at:69;NPAR TESTS BINOMIAL P < 0.5; N1/N2 = 1;; 572;npar.at:94;NPAR TESTS BINOMIAL P > 0.5; N1/N2 < 1;; 573;npar.at:119;NPAR TESTS BINOMIAL P > 0.5; N1/N2 > 1;; 574;npar.at:143;NPAR TESTS BINOMIAL P > 0.5; N1/N2 = 1;; 575;npar.at:167;NPAR TESTS BINOMIAL P = 0.5; N1/N2 < 1;; 576;npar.at:192;NPAR TESTS BINOMIAL P = 0.5; N1/N2 > 1;; 577;npar.at:216;NPAR TESTS BINOMIAL P = 0.5; N1/N2 = 1;; 578;npar.at:241;NPAR TESTS BINOMIAL P = 0.5; N1/N2 = 1 Cutpoint;; 579;npar.at:267;NPAR TESTS BINOMIAL P = 0.5; N1/N2 = 1 Named values;; 580;npar.at:296;NPAR TESTS BINOMIAL - crash;; 581;npar.at:315;NPAR TESTS CHISQUARE;; 582;npar.at:401;NPAR TESTS CHISQUARE expected values missing;; 583;npar.at:434;NPAR TESTS CHISQUARE with DESCRIPTIVES;; 584;npar.at:487;NPAR TESTS CHISQUARE, listwise missing;; 585;npar.at:540;NPAR TESTS WILCOXON;; 586;npar.at:588;NPAR TESTS WILCOXON with missing values;; 587;npar.at:636;NPAR TESTS SIGN;; 588;npar.at:680;NPAR Kruskal-Wallis test;; 589;npar.at:775;NPAR Kruskal-Wallis multiple-variables;; 590;npar.at:842;NPAR TESTS Runs;; 591;npar.at:930;NPAR TESTS Runs (2);; 592;npar.at:953;NPAR TESTS Friedman;; 593;npar.at:992;NPAR TESTS Mann-Whitney;; 594;npar.at:1053;NPAR TESTS Mann-Whitney Multiple;; 595;npar.at:1099;NPAR TESTS Cochran;; 596;npar.at:1146;NPAR TESTS Kendall;; 597;npar.at:1211;NPAR TESTS McNemar;; 598;npar.at:1265;NPAR TESTS Kolmogorov-Smirnov Uniform parameters given;; 599;npar.at:1302;NPAR TESTS Kolmogorov-Smirnov Normal parameters imputed;; 600;npar.at:1506;NPAR TESTS Median Test (median imputed);; 601;npar.at:1571;NPAR TESTS Median Test (median given);; 602;npar.at:1634;NPAR TESTS Median Test (two sample);; 603;npar.at:1700;NPAR TESTS Jonckheere-Terpstra;; 604;npar.at:1743;NPAR TESTS (PAIRED);; 605;npar.at:1780;NPAR TESTS CHISQUARE crash;; 606;npar.at:1809;NPAR TESTS - crash on invalid syntax;; 607;npar.at:1833;NPAR TESTS - crash on unterminated string;; 608;oneway.at:19;ONEWAY basic operation;; 609;oneway.at:88;ONEWAY with splits;; 610;oneway.at:195;ONEWAY with missing values;; 611;oneway.at:300;ONEWAY descriptives subcommand;; 612;oneway.at:349;ONEWAY homogeneity subcommand;; 613;oneway.at:394;ONEWAY multiple variables;; 614;oneway.at:502;ONEWAY vs. weights;; 615;oneway.at:573;ONEWAY posthoc LSD and BONFERRONI;; 616;oneway.at:655;ONEWAY posthoc Tukey HSD and Games-Howell;; 617;oneway.at:711;ONEWAY posthoc Sidak;; 618;oneway.at:771;ONEWAY posthoc Scheffe;; 619;oneway.at:853;ONEWAY bad contrast count;; 620;oneway.at:924;ONEWAY crash on single category independent variable;; 621;oneway.at:945;ONEWAY crash on missing dependent variable;; 622;oneway.at:973;ONEWAY Games-Howell test with few cases;; 623;oneway.at:995;ONEWAY Crash on empty data;; 624;oneway.at:1017;ONEWAY Crash on invalid dependent variable;; 625;oneway.at:1037;ONEWAY Crash on unterminated string;; 626;quick-cluster.at:19;QUICK CLUSTER with small data set;; 627;quick-cluster.at:62;QUICK CLUSTER with large data set;; 628;quick-cluster.at:92;QUICK CLUSTER with weights;; 629;quick-cluster.at:134;QUICK CLUSTER with listwise missing;; 630;quick-cluster.at:173;QUICK CLUSTER with pairwise missing;; 631;quick-cluster.at:246;QUICK CLUSTER crash on bad cluster quantity;; 632;quick-cluster.at:263;QUICK CLUSTER infinite loop on bad command name;; 633;quick-cluster.at:280;QUICK CLUSTER /PRINT subcommand;; 634;quick-cluster.at:436;QUICK CLUSTER -- Empty Parentheses;; 635;rank.at:19;RANK simple case with defaults;; 636;rank.at:59;RANK multiple variables with defaults;; 637;rank.at:90;RANK with RANK, RFRACTION, N;; 638;rank.at:167;RANK with SAVAGE, PERCENT, PROPORTION, NTILES;; 639;rank.at:226;RANK with SPLIT FILE;; 640;rank.at:316;RANK with fractional ranks;; 641;rank.at:363;RANK all-ties due to tiny weights;; 642;rank.at:440;RANK and TEMPORARY;; 643;rank.at:496;RANK variable name fallback;; 644;rank.at:534;RANK robust variable name creation;; 645;rank.at:587;RANK handling of invalid input;; 646;rank.at:615;RANK handling of invalid syntax;; 647;regression.at:19;LINEAR REGRESSION - basic;; 648;regression.at:76;LINEAR REGRESSION - one save;; 649;regression.at:149;LINEAR REGRESSION - SAVE vs SPLITS;; 650;regression.at:242;LINEAR REGRESSION multiple dependent variables;; 651;regression.at:274;LINEAR REGRESSION test of QR decomposition;; 652;regression.at:1807;LINEAR REGRESSION no crash on all missing;; 653;regression.at:1833;LINEAR REGRESSION missing dependent variable;; 654;regression.at:1890;LINEAR REGRESSION with invalid syntax (and empty dataset);; 655;regression.at:1910;LINEAR REGRESSION coefficient confidence interval;; 656;regression.at:2152;LINEAR REGRESSION crash with long string variables;; 657;regression.at:2202;LINEAR REGRESSION -- Empty Parentheses;; 658;regression.at:2227;LINEAR REGRESSION varibles on ENTER subcommand;; 659;regression.at:2283;LINEAR REGRESSION /ORIGIN;; 660;reliability.at:19;RELIABILITY;; 661;reliability.at:274;RELIABILITY bad syntax;; 662;reliability.at:294;RELIABILITY bad syntax 2;; 663;reliability.at:309;RELIABILITY crash with no data;; 664;reliability.at:327;RELIABILITY tutorial example;; 665;roc.at:19;ROC, free distribution;; 666;roc.at:70;ROC, negative exponential distribution;; 667;roc.at:129;ROC, with anomaly;; 668;roc.at:187;ROC crash on no state variable;; 669;roc.at:204;ROC crash on invalid syntax;; 670;sort-cases.at:73;sort 500 cases (100 unique) with 2 buffers;sort cases; 671;sort-cases.at:74;sort 500 cases (100 unique) with 3 buffers;sort cases; 672;sort-cases.at:75;sort 500 cases (100 unique) with 4 buffers;sort cases; 673;sort-cases.at:76;sort 500 cases (100 unique) with 5 buffers;sort cases; 674;sort-cases.at:77;sort 500 cases (100 unique) with 10 buffers;sort cases; 675;sort-cases.at:78;sort 500 cases (100 unique) with 50 buffers;sort cases; 676;sort-cases.at:79;sort 500 cases (100 unique) with 100 buffers;sort cases; 677;sort-cases.at:80;sort 500 cases (100 unique);sort cases; 678;sort-cases.at:82;sort 1000 cases (100 unique) with 2 buffers;sort cases; 679;sort-cases.at:83;sort 1000 cases (100 unique) with 3 buffers;sort cases; 680;sort-cases.at:84;sort 1000 cases (100 unique) with 5 buffers;sort cases; 681;sort-cases.at:85;sort 1000 cases (100 unique);sort cases; 682;sort-cases.at:87;sort 5000 cases (1000 unique) with 5 buffers;sort cases; 683;sort-cases.at:88;sort 5000 cases (1000 unique) with 50 buffers;sort cases; 684;sort-cases.at:89;sort 5000 cases (1000 unique);sort cases; 685;sort-cases.at:91;sort 10000 cases (100 unique) with 3 buffers;sort cases; 686;sort-cases.at:92;sort 10000 cases (100 unique) with 5 buffers;sort cases; 687;sort-cases.at:93;sort 10000 cases (100 unique);sort cases; 688;sort-cases.at:95;sort 50000 cases (10000 unique) with 500 buffers;sort cases; 689;sort-cases.at:97;sort 50000 cases;sort cases; 690;sort-cases.at:100;SORT CASES preserves filtered cases;; 691;t-test.at:19;T-TEST /PAIRS;; 692;t-test.at:59;T-TEST /PAIRS with per-analysis missing values;; 693;t-test.at:124;T-TEST /PAIRS with listwise missing values;; 694;t-test.at:192;T-TEST weighted paired bug;; 695;t-test.at:234;T-TEST /PAIRS bug;; 696;t-test.at:270;T-TEST /GROUPS;; 697;t-test.at:320;T-TEST /GROUPS with one value for independent variable;; 698;t-test.at:370;T-TEST /GROUPS with per-analysis missing values;; 699;t-test.at:430;T-TEST /GROUPS with listwise missing values;; 700;t-test.at:490;T-TEST /TESTVAL;; 701;t-test.at:522;T-TEST /TESTVAL with per-analysis missing values;; 702;t-test.at:575;T-TEST /TESTVAL with listwise missing values;; 703;t-test.at:628;T-TEST wih TEMPORARY transformation;; 704;t-test.at:684;T-TEST invalid syntax;; 705;t-test.at:707;T-TEST string variable;; 706;t-test.at:754;T-TEST string variable, only one value;; 707;t-test.at:780;T-TEST string variable comparison bug;; 708;t-test.at:821;T-TEST wrong group;; 709;t-test.at:842;T-TEST non number p value;; 710;t-test.at:861;T-TEST unterminated string - paired;; 711;cache.at:19;CACHE;; 712;cd.at:19;CD;; 713;date.at:19;USE ALL;; 714;insert.at:31;INSERT SYNTAX=INTERACTIVE;; 715;insert.at:47;INSERT SYNTAX=BATCH;; 716;insert.at:67;INSERT CD=NO;; 717;insert.at:88;INSERT CD=YES;; 718;insert.at:132;INSERT ERROR=STOP;; 719;insert.at:142;INSERT ERROR=CONTINUE;; 720;insert.at:162;INSERT nonexistent file;; 721;insert.at:181;INCLUDE full check;; 722;insert.at:205;INSERT unterminated string;; 723;permissions.at:19;PERMISSIONS;; 724;permissions.at:45;PERMISSIONS - bad syntax;; 725;set.at:20;SET FORMAT to invalid output format;; 726;set.at:42;SET crash on invalid cc;; 727;set.at:52;SET MXWARNS;; 728;set.at:88;SET MXWARNS special case zero;; 729;set.at:126;PRESERVE of SET FORMAT;; 730;show.at:19;SHOW N;; 731;show.at:39;SHOW N empty;; 732;title.at:19;FILE LABEL and (ADD) DOCUMENT;; 733;compute.at:19;COMPUTE crash with SAVE;; 734;compute.at:38;COMPUTE bug in long string UPCASE;; 735;compute.at:66;COMPUTE bug with long variable names;; 736;compute.at:92;COMPUTE self-reference to new variable;; 737;count.at:19;COUNT -- numeric data;; 738;count.at:58;COUNT -- string data;; 739;recode.at:37;RECODE numeric to numeric, without INTO;; 740;recode.at:79;RECODE numeric to numeric, with INTO, without COPY;; 741;recode.at:111;RECODE numeric to numeric, with INTO, with COPY;; 742;recode.at:144;RECODE string to string, with INTO, without COPY;; 743;recode.at:172;RECODE string to string;; 744;recode.at:200;RECODE string to numeric;; 745;recode.at:226;RECODE numeric to string;; 746;recode.at:252;RECODE bug in COPY;; 747;recode.at:283;RECODE bug in COPY with INTO;; 748;recode.at:316;RECODE increased string widths;; 749;recode.at:347;RECODE crash on invalid dest variable;; 750;sample.at:19;SAMPLE;; 751;select-if.at:19;FILTER;; 752;abt.at:24;ABT -- insert-any-remove-any;; 753;abt.at:25;ABT -- insert-any-remove-same;; 754;abt.at:26;ABT -- insert-any-remove-reverse;; 755;abt.at:27;ABT -- random-sequence;; 756;abt.at:28;ABT -- insert-ordered;; 757;abt.at:29;ABT -- moved;; 758;abt.at:30;ABT -- changed;; 759;bt.at:24;BT -- insert-any-remove-any;; 760;bt.at:25;BT -- insert-any-remove-same;; 761;bt.at:26;BT -- insert-any-remove-reverse;; 762;bt.at:27;BT -- random-sequence;; 763;bt.at:28;BT -- insert-ordered;; 764;bt.at:29;BT -- find-ge-le;; 765;bt.at:30;BT -- moved;; 766;bt.at:31;BT -- changed;; 767;encoding-guesser.at:19;ASCII;encoding guesser; 768;encoding-guesser.at:25;UTF-8;encoding guesser; 769;encoding-guesser.at:32;UTF-8 starting with ASCII;encoding guesser; 770;encoding-guesser.at:39;UTF-16 with big-endian byte order mark;encoding guesser; 771;encoding-guesser.at:46;UTF-16 with little-endian byte order mark;encoding guesser; 772;encoding-guesser.at:53;UTF-16BE;encoding guesser; 773;encoding-guesser.at:62;UTF-16BE starting with U+0100;encoding guesser; 774;encoding-guesser.at:69;UTF-16LE;encoding guesser; 775;encoding-guesser.at:78;UTF-16LE starting with U+0100;encoding guesser; 776;encoding-guesser.at:85;UTF-32 with big-endian byte order mark;encoding guesser; 777;encoding-guesser.at:92;UTF-32 with little-endian byte order mark;encoding guesser; 778;encoding-guesser.at:99;UTF-32BE;encoding guesser; 779;encoding-guesser.at:106;UTF-32LE;encoding guesser; 780;encoding-guesser.at:113;ISO-8859-1;encoding guesser; 781;encoding-guesser.at:121;GB-18030 with byte order mark;encoding guesser; 782;encoding-guesser.at:129;UTF-EBCDIC with byte order mark;encoding guesser; 783;encoding-guesser.at:137;EUC-JP as Auto,EUC-JP;encoding guesser; 784;encoding-guesser.at:145;EUC-JP starting with ASCII as Auto,EUC-JP;encoding guesser; 785;encoding-guesser.at:153;UTF-8 with character split across input buffers;encoding guesser; 786;encoding-guesser.at:161;windows-1252 as Auto,UTF-8;encoding guesser; 787;float-format.at:19;floating point format conversions;; 788;heap.at:24;heap -- insert-no-dups-delete-min;; 789;heap.at:25;heap -- insert-with-dups-delete-min;; 790;heap.at:26;heap -- insert-no-dups-delete-random;; 791;heap.at:27;heap -- inc-dec;; 792;heap.at:28;heap -- random-insert-delete;; 793;hmap.at:24;hmap -- insert-any-remove-any-random-hash;; 794;hmap.at:25;hmap -- insert-any-remove-any-identity-hash;; 795;hmap.at:26;hmap -- insert-any-remove-any-constant-hash;; 796;hmap.at:27;hmap -- insert-any-remove-same-random-hash;; 797;hmap.at:28;hmap -- insert-any-remove-same-identity-hash;; 798;hmap.at:29;hmap -- insert-any-remove-same-constant-hash;; 799;hmap.at:30;hmap -- insert-any-remove-reverse-random-hash;; 800;hmap.at:31;hmap -- insert-any-remove-reverse-identity-hash;; 801;hmap.at:32;hmap -- insert-any-remove-reverse-constant-hash;; 802;hmap.at:33;hmap -- random-sequence-random-hash;; 803;hmap.at:34;hmap -- random-sequence-identity-hash;; 804;hmap.at:35;hmap -- random-sequence-constant-hash;; 805;hmap.at:36;hmap -- insert-ordered-random-hash;; 806;hmap.at:37;hmap -- insert-ordered-identity-hash;; 807;hmap.at:38;hmap -- insert-ordered-constant-hash;; 808;hmap.at:39;hmap -- moved-random-hash;; 809;hmap.at:40;hmap -- moved-identity-hash;; 810;hmap.at:41;hmap -- moved-constant-hash;; 811;hmap.at:42;hmap -- changed-random-hash;; 812;hmap.at:43;hmap -- changed-identity-hash;; 813;hmap.at:44;hmap -- changed-constant-hash;; 814;hmap.at:45;hmap -- swap-random-hash;; 815;hmap.at:46;hmap -- clear;; 816;hmap.at:47;hmap -- destroy-null;; 817;hmap.at:48;hmap -- shrink-empty;; 818;hmapx.at:24;hmapx -- insert-any-remove-any-random-hash;; 819;hmapx.at:25;hmapx -- insert-any-remove-any-identity-hash;; 820;hmapx.at:26;hmapx -- insert-any-remove-any-constant-hash;; 821;hmapx.at:27;hmapx -- insert-any-remove-same-random-hash;; 822;hmapx.at:28;hmapx -- insert-any-remove-same-identity-hash;; 823;hmapx.at:29;hmapx -- insert-any-remove-same-constant-hash;; 824;hmapx.at:30;hmapx -- insert-any-remove-reverse-random-hash;; 825;hmapx.at:31;hmapx -- insert-any-remove-reverse-identity-hash;; 826;hmapx.at:32;hmapx -- insert-any-remove-reverse-constant-hash;; 827;hmapx.at:33;hmapx -- random-sequence-random-hash;; 828;hmapx.at:34;hmapx -- random-sequence-identity-hash;; 829;hmapx.at:35;hmapx -- random-sequence-constant-hash;; 830;hmapx.at:36;hmapx -- insert-ordered-random-hash;; 831;hmapx.at:37;hmapx -- insert-ordered-identity-hash;; 832;hmapx.at:38;hmapx -- insert-ordered-constant-hash;; 833;hmapx.at:39;hmapx -- moved-random-hash;; 834;hmapx.at:40;hmapx -- moved-identity-hash;; 835;hmapx.at:41;hmapx -- moved-constant-hash;; 836;hmapx.at:42;hmapx -- changed-random-hash;; 837;hmapx.at:43;hmapx -- changed-identity-hash;; 838;hmapx.at:44;hmapx -- changed-constant-hash;; 839;hmapx.at:45;hmapx -- change-random-hash;; 840;hmapx.at:46;hmapx -- change-identity-hash;; 841;hmapx.at:47;hmapx -- change-constant-hash;; 842;hmapx.at:48;hmapx -- swap-random-hash;; 843;hmapx.at:49;hmapx -- clear;; 844;hmapx.at:50;hmapx -- destroy-null;; 845;hmapx.at:51;hmapx -- shrink-empty;; 846;i18n.at:36;convert reflexively;i18n; 847;i18n.at:37;convert without any change;i18n; 848;i18n.at:39;convert from ISO-8859-1 to UTF-8;i18n; 849;i18n.at:41;convert from UTF-8 to ISO-8859-1;i18n; 850;i18n.at:45;convert invalid UTF-8 to ISO-8859-1;i18n; 851;i18n.at:48;convert truncated UTF-8 to ISO-8559-1;i18n; 852;i18n.at:53;convert dropped final character in windows-1258;i18n; 853;i18n.at:58;convert from ISO-8859-1 to UTF-8 with overflow;i18n; 854;i18n.at:62;convert unknown encoding;i18n; 855;i18n.at:93;truncate \"abc\" to 6 bytes in UTF-8;i18n; 856;i18n.at:94;truncate \"\" + \"xyz\" to 6 bytes in UTF-8;i18n; 857;i18n.at:95;truncate \"\" to 6 bytes in UTF-8;i18n; 858;i18n.at:96;truncate \"abcdefghij\" to 6 bytes in UTF-8;i18n; 859;i18n.at:97;truncate \"\" + \"tuvwxyz\" to 6 bytes in UTF-8;i18n; 860;i18n.at:99;truncate \"abc\" + \"xyz\" to 6 bytes in UTF-8;i18n; 861;i18n.at:100;truncate \"abcd\" + \"xyz\" to 6 bytes in UTF-8;i18n; 862;i18n.at:101;truncate \"abc\" + \"uvwxyz\" to 6 bytes in UTF-8;i18n; 863;i18n.at:105;truncate \"x\\342\\203\\236\" + \"y\" to 0 bytes in UTF-8;i18n; 864;i18n.at:106;truncate \"x\\342\\203\\236\" + \"y\" to 1 bytes in UTF-8;i18n; 865;i18n.at:107;truncate \"x\\342\\203\\236\" + \"y\" to 2 bytes in UTF-8;i18n; 866;i18n.at:108;truncate \"x\\342\\203\\236\" + \"y\" to 3 bytes in UTF-8;i18n; 867;i18n.at:109;truncate \"x\\342\\203\\236\" + \"y\" to 4 bytes in UTF-8;i18n; 868;i18n.at:110;truncate \"x\\342\\203\\236\" + \"y\" to 5 bytes in UTF-8;i18n; 869;i18n.at:113;truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 0 bytes in ISO-8859-1;i18n; 870;i18n.at:114;truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 1 bytes in ISO-8859-1;i18n; 871;i18n.at:115;truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 2 bytes in ISO-8859-1;i18n; 872;i18n.at:116;truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 3 bytes in ISO-8859-1;i18n; 873;i18n.at:117;truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 4 bytes in ISO-8859-1;i18n; 874;i18n.at:119;truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 5 bytes in ISO-8859-1;i18n; 875;i18n.at:121;truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 6 bytes in ISO-8859-1;i18n; 876;line-reader.at:19;read ASCII;line_reader; 877;line-reader.at:28;read UTF-8;line_reader; 878;line-reader.at:36;read EUC-JP;line_reader; 879;line-reader.at:45;read ASCII as Auto;line_reader; 880;line-reader.at:53;read UTF-8 as Auto;line_reader; 881;line-reader.at:62;read ISO-8859-1 as Auto,ISO-8859-1;line_reader; 882;line-reader.at:74;read UTF-16BE as Auto,UTF-16BE;line_reader; 883;line-reader.at:83;read EUC-JP as Auto,EUC-JP;line_reader; 884;ll.at:24;ll -- push-pop;; 885;ll.at:25;ll -- insert-remove;; 886;ll.at:26;ll -- swap;; 887;ll.at:27;ll -- swap-range;; 888;ll.at:28;ll -- remove-range;; 889;ll.at:29;ll -- remove-equal;; 890;ll.at:30;ll -- remove-if;; 891;ll.at:31;ll -- moved;; 892;ll.at:32;ll -- find-equal;; 893;ll.at:33;ll -- find-if;; 894;ll.at:34;ll -- find-adjacent-equal;; 895;ll.at:35;ll -- count-range;; 896;ll.at:36;ll -- count-equal;; 897;ll.at:37;ll -- count-if;; 898;ll.at:38;ll -- min-max;; 899;ll.at:39;ll -- lexicographical-compare-3way;; 900;ll.at:40;ll -- apply;; 901;ll.at:41;ll -- reverse;; 902;ll.at:42;ll -- permutations-no-dups;; 903;ll.at:43;ll -- permutations-with-dups;; 904;ll.at:44;ll -- merge-no-dups;; 905;ll.at:45;ll -- merge-with-dups;; 906;ll.at:46;ll -- sort-exhaustive;; 907;ll.at:47;ll -- sort-stable;; 908;ll.at:48;ll -- sort-subset;; 909;ll.at:49;ll -- sort-big;; 910;ll.at:50;ll -- unique;; 911;ll.at:51;ll -- sort-unique;; 912;ll.at:52;ll -- insert-ordered;; 913;ll.at:53;ll -- partition;; 914;llx.at:24;llx -- push-pop;; 915;llx.at:25;llx -- insert-remove;; 916;llx.at:26;llx -- swap;; 917;llx.at:27;llx -- swap-range;; 918;llx.at:28;llx -- remove-range;; 919;llx.at:29;llx -- remove-equal;; 920;llx.at:30;llx -- remove-if;; 921;llx.at:31;llx -- find-equal;; 922;llx.at:32;llx -- find;; 923;llx.at:33;llx -- find-if;; 924;llx.at:34;llx -- find-adjacent-equal;; 925;llx.at:35;llx -- count-range;; 926;llx.at:36;llx -- count-equal;; 927;llx.at:37;llx -- count-if;; 928;llx.at:38;llx -- min-max;; 929;llx.at:39;llx -- lexicographical-compare-3way;; 930;llx.at:40;llx -- apply;; 931;llx.at:41;llx -- destroy;; 932;llx.at:42;llx -- reverse;; 933;llx.at:43;llx -- permutations-no-dups;; 934;llx.at:44;llx -- permutations-with-dups;; 935;llx.at:45;llx -- merge-no-dups;; 936;llx.at:46;llx -- merge-with-dups;; 937;llx.at:47;llx -- sort-exhaustive;; 938;llx.at:48;llx -- sort-stable;; 939;llx.at:49;llx -- sort-subset;; 940;llx.at:50;llx -- sort-big;; 941;llx.at:51;llx -- unique;; 942;llx.at:52;llx -- sort-unique;; 943;llx.at:53;llx -- insert-ordered;; 944;llx.at:54;llx -- partition;; 945;llx.at:55;llx -- allocation-failure;; 946;range-map.at:24;range-map -- insert;; 947;range-map.at:25;range-map -- delete-contiguous;; 948;range-map.at:26;range-map -- delete-gaps;; 949;range-set.at:24;range-set -- insert;; 950;range-set.at:25;range-set -- delete;; 951;range-set.at:26;range-set -- allocate;; 952;range-set.at:27;range-set -- allocate-fully;; 953;range-set.at:28;range-set -- pool;; 954;range-set.at:29;range-set -- destroy-null;; 955;range-tower.at:24;range-tower -- set1;; 956;range-tower.at:25;range-tower -- set0;; 957;range-tower.at:26;range-tower -- insert0;; 958;range-tower.at:27;range-tower -- insert1;; 959;range-tower.at:28;range-tower -- delete;; 960;range-tower.at:29;range-tower -- move;; 961;range-tower.at:30;range-tower -- pool;; 962;range-tower.at:31;range-tower -- destroy-null;; 963;sparse-array.at:25;sparse array -- random-insert-delete;sparse-array; 964;sparse-array.at:27;sparse array -- insert and delete with strides;sparse-array; 965;sparse-xarray-test.at:58;in-memory sparse_xarray;; 966;sparse-xarray-test.at:73;on-disk sparse_xarray max-memory-rows=0;; 967;sparse-xarray-test.at:74;on-disk sparse_xarray max-memory-rows=1;; 968;sparse-xarray-test.at:75;on-disk sparse_xarray max-memory-rows=2;; 969;sparse-xarray-test.at:77;copying between in-memory sparse_xarrays;sparse_xarray; 970;sparse-xarray-test.at:98;copying between on-disk sparse_xarrays max-memory-rows=0;sparse_xarray; 971;sparse-xarray-test.at:99;copying between on-disk sparse_xarrays max-memory-rows=1;sparse_xarray; 972;str.at:19;26-adic string formatting;; 973;string-map.at:25;string map -- insert-any-remove-any;string-map; 974;string-map.at:26;string map -- insert-any-remove-same;string-map; 975;string-map.at:27;string map -- insert-any-remove-reverse;string-map; 976;string-map.at:28;string map -- random-sequence;string-map; 977;string-map.at:29;string map -- replace;string-map; 978;string-map.at:30;string map -- insert-ordered;string-map; 979;string-map.at:31;string map -- clear;string-map; 980;string-map.at:32;string map -- clone;string-map; 981;string-map.at:33;string map -- swap;string-map; 982;string-map.at:34;string map -- node-swap-value;string-map; 983;string-map.at:35;string map -- insert-map;string-map; 984;string-map.at:36;string map -- replace-map;string-map; 985;string-map.at:37;string map -- get-keys-and-values;string-map; 986;string-map.at:38;string map -- destroy-null;string-map; 987;stringi-map.at:25;case-insensitive string map -- insert-any-remove-any;stringi-map; 988;stringi-map.at:26;case-insensitive string map -- insert-any-remove-same;stringi-map; 989;stringi-map.at:27;case-insensitive string map -- insert-any-remove-reverse;stringi-map; 990;stringi-map.at:28;case-insensitive string map -- random-sequence;stringi-map; 991;stringi-map.at:29;case-insensitive string map -- replace;stringi-map; 992;stringi-map.at:30;case-insensitive string map -- insert-ordered;stringi-map; 993;stringi-map.at:31;case-insensitive string map -- clear;stringi-map; 994;stringi-map.at:32;case-insensitive string map -- clone;stringi-map; 995;stringi-map.at:33;case-insensitive string map -- swap;stringi-map; 996;stringi-map.at:34;case-insensitive string map -- node-swap-value;stringi-map; 997;stringi-map.at:35;case-insensitive string map -- insert-map;stringi-map; 998;stringi-map.at:36;case-insensitive string map -- replace-map;stringi-map; 999;stringi-map.at:37;case-insensitive string map -- get-keys-and-values;stringi-map; 1000;stringi-map.at:38;case-insensitive string map -- destroy-null;stringi-map; 1001;string-set.at:25;string set -- insert-any-remove-any;string-set; 1002;string-set.at:26;string set -- insert-any-remove-same;string-set; 1003;string-set.at:27;string set -- insert-any-remove-reverse;string-set; 1004;string-set.at:28;string set -- random-sequence;string-set; 1005;string-set.at:29;string set -- insert-ordered;string-set; 1006;string-set.at:30;string set -- union;string-set; 1007;string-set.at:31;string set -- union-and-intersection;string-set; 1008;string-set.at:32;string set -- intersect;string-set; 1009;string-set.at:33;string set -- subtract;string-set; 1010;string-set.at:34;string set -- swap;string-set; 1011;string-set.at:35;string set -- clear;string-set; 1012;string-set.at:36;string set -- clone;string-set; 1013;string-set.at:37;string set -- destroy-null;string-set; 1014;stringi-set.at:25;case-insensitive string set -- insert-any-remove-any;stringi-set; 1015;stringi-set.at:26;case-insensitive string set -- insert-any-remove-same;stringi-set; 1016;stringi-set.at:27;case-insensitive string set -- insert-any-remove-reverse;stringi-set; 1017;stringi-set.at:28;case-insensitive string set -- random-sequence;stringi-set; 1018;stringi-set.at:29;case-insensitive string set -- insert-ordered;stringi-set; 1019;stringi-set.at:30;case-insensitive string set -- union;stringi-set; 1020;stringi-set.at:31;case-insensitive string set -- union-and-intersection;stringi-set; 1021;stringi-set.at:32;case-insensitive string set -- intersect;stringi-set; 1022;stringi-set.at:33;case-insensitive string set -- subtract;stringi-set; 1023;stringi-set.at:34;case-insensitive string set -- swap;stringi-set; 1024;stringi-set.at:35;case-insensitive string set -- clear;stringi-set; 1025;stringi-set.at:36;case-insensitive string set -- clone;stringi-set; 1026;stringi-set.at:37;case-insensitive string set -- destroy-null;stringi-set; 1027;tower.at:24;tower -- insert;; 1028;tower.at:25;tower -- delete;; 1029;tower.at:26;tower -- resize;; 1030;tower.at:27;tower -- splice-out;; 1031;tower.at:28;tower -- splice-in;; 1032;u8-istream.at:19;read ASCII;u8_istream; 1033;u8-istream.at:26;read UTF-8;u8_istream; 1034;u8-istream.at:35;read EUC-JP;u8_istream; 1035;u8-istream.at:44;read UTF-8 with character split across input buffers;u8_istream; 1036;u8-istream.at:55;read UTF-8 with character split across output buffers;u8_istream; 1037;u8-istream.at:64;read UTF-8 with character split across input and output buffers;u8_istream; 1038;u8-istream.at:75;read EUC-JP with character split across input buffers;u8_istream; 1039;u8-istream.at:89;read EUC-JP with character split across output buffers;u8_istream; 1040;u8-istream.at:98;read EUC-JP with character split across input and output buffers;u8_istream; 1041;u8-istream.at:112;read ASCII as Auto;u8_istream; 1042;u8-istream.at:121;read UTF-8 as Auto;u8_istream; 1043;u8-istream.at:135;read ISO-8859-1 as Auto,ISO-8859-1;u8_istream; 1044;u8-istream.at:147;read UTF-16BE as Auto,UTF-16BE;u8_istream; 1045;u8-istream.at:156;read UTF-16 as Auto;u8_istream; 1046;u8-istream.at:175;read UTF-32 as Auto;u8_istream; 1047;u8-istream.at:192;read EUC-JP as Auto,EUC-JP;u8_istream; 1048;zip.at:19;Basic zip - unzip test;compression; 1049;chart-geometry.at:19;Chart Scale;; 1050;chart-geometry.at:23;Chart Ticks Format;; 1051;moments.at:44;two-pass moments;; 1052;moments.at:45;one-pass moments;; 1053;randist.at:102;random distributions -- beta;; 1054;randist.at:337;random distributions -- cauchy;; 1055;randist.at:946;random distributions -- chisq;; 1056;randist.at:994;random distributions -- exp;; 1057;randist.at:1042;random distributions -- f;; 1058;randist.at:1222;random distributions -- gamma;; 1059;randist.at:1446;random distributions -- laplace;; 1060;randist.at:1670;random distributions -- logistic;; 1061;randist.at:1894;random distributions -- lnormal;; 1062;randist.at:2074;random distributions -- normal;; 1063;randist.at:2298;random distributions -- pareto;; 1064;randist.at:2434;random distributions -- t;; 1065;randist.at:2526;random distributions -- uniform;; 1066;randist.at:2706;random distributions -- weibull;; 1067;ascii.at:19;ASCII driver overwriting single-width text;render rendering; 1068;ascii.at:151;ASCII driver overwriting double-width text;render rendering; 1069;ascii.at:407;ASCII driver overwriting combining characters;render rendering; 1070;ascii.at:539;ASCII driver u8_line_set_length;render rendering; 1071;ascii.at:580;ASCII driver Unicode box characters;render rendering; 1072;ascii.at:600;ASCII driver syntax printback;; 1073;ascii.at:647;ASCII unicode box chars;; 1074;ascii.at:673;ASCII crash on empty line;; 1075;charts.at:24;Examine;; 1076;charts.at:56;Roc;; 1077;charts.at:111;Scree;; 1078;charts.at:139;Histogram;; 1079;charts.at:176;FREQUENCIES charts;; 1080;charts.at:214;CROSSTABS charts;; 1081;charts.at:258;BOXPLOT Empty;; 1082;html.at:19;HTML bug;; 1083;output.at:39;output csv to unwritable directory;; 1084;output.at:40;output html to unwritable directory;; 1085;output.at:41;output odt to unwritable directory;; 1086;output.at:42;output pdf to unwritable directory;; 1087;output.at:43;output txt to unwritable directory;; 1088;paper-size.at:19;letter default paper size;; 1089;paper-size.at:28;a4 default paper size;; 1090;paper-size.at:37;specific paper sizes;paper size; 1091;render.at:176;single cell;render rendering; 1092;render.at:185;nested single cell;render rendering; 1093;render.at:196;single cell with border;render rendering; 1094;render.at:208;nested single cell with border;render rendering; 1095;render.at:224;joined columns;render rendering; 1096;render.at:240;3x3, joined rows and columns;render rendering; 1097;render.at:260;joined rows and columns (with footnotes);render rendering footnote; 1098;render.at:302;6x6, joined rows and columns;render rendering; 1099;render.at:322;3 rows with many joined cells;render rendering; 1100;render.at:341;3 columns with many joined cells;render rendering; 1101;render.at:393;joined rows;render rendering; 1102;render.at:409;nested joined rows;render rendering; 1103;render.at:431;joined rows only, no rules;render rendering; 1104;render.at:444;joined columns only, no rules;render rendering; 1105;render.at:459;5 big narrow cells;render rendering; 1106;render.at:480;9 big narrow cells;render rendering; 1107;render.at:511;2 big cells with new-lines;render rendering; 1108;render.at:542;8x8 with many 2x2 joins;render rendering; 1109;render.at:571;nested 8x8;render rendering; 1110;render.at:600;nested 8x8s and 6x6s;render rendering; 1111;render.at:682;doubly nested cells;render rendering; 1112;render.at:770;breaking row of many small cells;render rendering; 1113;render.at:796;breaking row of many small cells, with headers;render rendering; 1114;render.at:835;breaking row of many medium-size cells;render rendering; 1115;render.at:885;breaking row of many medium-size cells, with headers;render rendering; 1116;render.at:943;breaking row of many big narrow cells;render rendering; 1117;render.at:1053;breaking 2 rows of many small cells;render rendering; 1118;render.at:1087;breaking 3 rows with many joined cells;render rendering; 1119;render.at:1129;horz break 6x6, joined rows and columns;render rendering; 1120;render.at:1179;horz break 6x6, joined rows and columns, left header;render rendering; 1121;render.at:1215;horz break 6x6, joined rows and columns, right header;render rendering; 1122;render.at:1251;breaking joined cells too wide for page;render rendering; 1123;render.at:1319;breaking joined cells much too wide for page;render rendering; 1124;render.at:1411;breaking cell too wide for page, no border;render rendering; 1125;render.at:1441;breaking cell too wide for page, with border;render rendering; 1126;render.at:1472;horz break 8x8 with many 2x2 joins;render rendering; 1127;render.at:1622;breaking column of many small cells;render rendering; 1128;render.at:1732;breaking column of many small cells, with headers;render rendering; 1129;render.at:1852;disabling too-big headers;render rendering; 1130;render.at:1909;breaking column of many medium-size cells;render rendering; 1131;render.at:2111;breaking 3 columns with many joined cells;render rendering; 1132;render.at:2223;vert break 6x6, joined rows and columns;render rendering; 1133;render.at:2266;breaking joined cells too tall for page;render rendering; 1134;render.at:2322;breaking cell too tall for page, no border;render rendering; 1135;render.at:2364;breaking cell too tall for page, with border;render rendering; 1136;render.at:2396;breaking nested cell too tall for page;render rendering; 1137;render.at:2430;double break 6x6, joined rows and columns;render rendering; 1138;render.at:2545;double break 8x8, with joins, left and right headers;render rendering; 1139;render.at:2632;double break 8x8, with joins, top and bottom headers;render rendering; 1140;render.at:2739;double break 8x8, with joins, all headers;render rendering; 1141;render.at:2846;double break joined cells too big for page;render rendering; 1142;render.at:2983;LIST puts space between columns;render rendering; 1143;render.at:3008;ASCII driver renders end of line spaces reasonably;render rendering; 1144;render.at:3046;multiple spanned cells all contribute to dimensions;render rendering; 1145;tables.at:19;OUTPUT precision;; 1146;tables.at:84;OUTPUT crash;; 1147;main.at:19;nonexistent syntax file crash;; 1148;main.at:25;SIGTERM yields clean shutdown;; 1149;main.at:40;SIGSEGV yields error report;; 1150;main.at:60;argument parsing;; 1151;syntax-gen.at:19;Syntax Generation - printf like;; 1152;pspp-convert.at:3;pspp-convert crash when output cannot be opened;; 1153;perl-module.at:33;Perl create system file;; 1154;perl-module.at:93;Perl writing cases to system files;; 1155;perl-module.at:186;Perl write variable parameters;; 1156;perl-module.at:261;Perl dictionary survives system file;; 1157;perl-module.at:330;Perl read system file;; 1158;perl-module.at:422;Perl copying system files;; 1159;perl-module.at:538;Perl value formatting;; 1160;perl-module.at:577;Perl opening nonexistent file;; 1161;perl-module.at:596;Perl missing values;; 1162;perl-module.at:642;Perl custom attributes;; 1163;perl-module.at:673;Perl Pspp.t;; " # List of the all the test groups. at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'` # at_fn_validate_ranges NAME... # ----------------------------- # Validate and normalize the test group number contained in each variable # NAME. Leading zeroes are treated as decimal. at_fn_validate_ranges () { for at_grp do eval at_value=\$$at_grp if test $at_value -lt 1 || test $at_value -gt 1163; then $as_echo "invalid test group: $at_value" >&2 exit 1 fi case $at_value in 0*) # We want to treat leading 0 as decimal, like expr and test, but # AS_VAR_ARITH treats it as octal if it uses $(( )). # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the # expr fork, but it is not worth the effort to determine if the # shell supports XSI when the user can just avoid leading 0. eval $at_grp='`expr $at_value + 0`' ;; esac done } at_prev= for at_option do # If the previous option needs an argument, assign it. if test -n "$at_prev"; then at_option=$at_prev=$at_option at_prev= fi case $at_option in *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;; *) at_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $at_option in --help | -h ) at_help_p=: ;; --list | -l ) at_list_p=: ;; --version | -V ) at_version_p=: ;; --clean | -c ) at_clean=: ;; --color ) at_color=always ;; --color=* ) case $at_optarg in no | never | none) at_color=never ;; auto | tty | if-tty) at_color=auto ;; always | yes | force) at_color=always ;; *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'` as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;; esac ;; --debug | -d ) at_debug_p=: ;; --errexit | -e ) at_debug_p=: at_errexit_p=: ;; --verbose | -v ) at_verbose=; at_quiet=: ;; --trace | -x ) at_traceon='set -x' at_trace_echo=echo at_check_filter_trace=at_fn_filter_trace ;; [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]) at_fn_validate_ranges at_option as_fn_append at_groups "$at_option$as_nl" ;; # Ranges [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-) at_range_start=`echo $at_option |tr -d X-` at_fn_validate_ranges at_range_start at_range=`$as_echo "$at_groups_all" | \ sed -ne '/^'$at_range_start'$/,$p'` as_fn_append at_groups "$at_range$as_nl" ;; -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]) at_range_end=`echo $at_option |tr -d X-` at_fn_validate_ranges at_range_end at_range=`$as_echo "$at_groups_all" | \ sed -ne '1,/^'$at_range_end'$/p'` as_fn_append at_groups "$at_range$as_nl" ;; [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \ [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \ [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \ [0-9][0-9][0-9]-[0-9][0-9][0-9] | \ [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \ [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] ) at_range_start=`expr $at_option : '\(.*\)-'` at_range_end=`expr $at_option : '.*-\(.*\)'` if test $at_range_start -gt $at_range_end; then at_tmp=$at_range_end at_range_end=$at_range_start at_range_start=$at_tmp fi at_fn_validate_ranges at_range_start at_range_end at_range=`$as_echo "$at_groups_all" | \ sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'` as_fn_append at_groups "$at_range$as_nl" ;; # Directory selection. --directory | -C ) at_prev=--directory ;; --directory=* ) at_change_dir=: at_dir=$at_optarg if test x- = "x$at_dir" ; then at_dir=./- fi ;; # Parallel execution. --jobs | -j ) at_jobs=0 ;; --jobs=* | -j[0-9]* ) if test -n "$at_optarg"; then at_jobs=$at_optarg else at_jobs=`expr X$at_option : 'X-j\(.*\)'` fi case $at_jobs in *[!0-9]*) at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'` as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;; esac ;; # Keywords. --keywords | -k ) at_prev=--keywords ;; --keywords=* ) at_groups_selected=$at_help_all at_save_IFS=$IFS IFS=, set X $at_optarg shift IFS=$at_save_IFS for at_keyword do at_invert= case $at_keyword in '!'*) at_invert="-v" at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'` ;; esac # It is on purpose that we match the test group titles too. at_groups_selected=`$as_echo "$at_groups_selected" | grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"` done # Smash the keywords. at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'` as_fn_append at_groups "$at_groups_selected$as_nl" ;; --recheck) at_recheck=: ;; *=*) at_envvar=`expr "x$at_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $at_envvar in '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$at_envvar'" ;; esac at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` # Export now, but save eval for later and for debug scripts. export $at_envvar as_fn_append at_debug_args " $at_envvar='$at_value'" ;; *) $as_echo "$as_me: invalid option: $at_option" >&2 $as_echo "Try \`$0 --help' for more information." >&2 exit 1 ;; esac done # Verify our last option didn't require an argument if test -n "$at_prev"; then : as_fn_error $? "\`$at_prev' requires an argument" fi # The file containing the suite. at_suite_log=$at_dir/$as_me.log # Selected test groups. if test -z "$at_groups$at_recheck"; then at_groups=$at_groups_all else if test -n "$at_recheck" && test -r "$at_suite_log"; then at_oldfails=`sed -n ' /^Failed tests:$/,/^Skipped tests:$/{ s/^[ ]*\([1-9][0-9]*\):.*/\1/p } /^Unexpected passes:$/,/^## Detailed failed tests/{ s/^[ ]*\([1-9][0-9]*\):.*/\1/p } /^## Detailed failed tests/q ' "$at_suite_log"` as_fn_append at_groups "$at_oldfails$as_nl" fi # Sort the tests, removing duplicates. at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'` fi if test x"$at_color" = xalways \ || { test x"$at_color" = xauto && test -t 1; }; then at_red=`printf '\033[0;31m'` at_grn=`printf '\033[0;32m'` at_lgn=`printf '\033[1;32m'` at_blu=`printf '\033[1;34m'` at_std=`printf '\033[m'` else at_red= at_grn= at_lgn= at_blu= at_std= fi # Help message. if $at_help_p; then cat <<_ATEOF || at_write_fail=1 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS] Run all the tests, or the selected TESTS, given by numeric ranges, and save a detailed log file. Upon failure, create debugging scripts. Do not change environment variables directly. Instead, set them via command line arguments. Set \`AUTOTEST_PATH' to select the executables to exercise. Each relative directory is expanded as build and source directories relative to the top level of this distribution. E.g., from within the build directory /tmp/foo-1.0, invoking this: $ $0 AUTOTEST_PATH=bin is equivalent to the following, assuming the source directory is /src/foo-1.0: PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0 _ATEOF cat <<_ATEOF || at_write_fail=1 Operation modes: -h, --help print the help message, then exit -V, --version print version number, then exit -c, --clean remove all the files this test suite might create and exit -l, --list describes all the tests, or the selected TESTS _ATEOF cat <<_ATEOF || at_write_fail=1 Execution tuning: -C, --directory=DIR change to directory DIR before starting --color[=never|auto|always] enable colored test results on terminal, or always -j, --jobs[=N] Allow N jobs at once; infinite jobs with no arg (default 1) -k, --keywords=KEYWORDS select the tests matching all the comma-separated KEYWORDS multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD --recheck select all tests that failed or passed unexpectedly last time -e, --errexit abort as soon as a test fails; implies --debug -v, --verbose force more detailed output default for debugging scripts -d, --debug inhibit clean up and top-level logging default for debugging scripts -x, --trace enable tests shell tracing _ATEOF cat <<_ATEOF || at_write_fail=1 Report bugs to . GNU PSPP home page: . General help using GNU software: . _ATEOF exit $at_write_fail fi # List of tests. if $at_list_p; then cat <<_ATEOF || at_write_fail=1 GNU PSPP 1.0.1 test suite test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS _ATEOF # Pass an empty line as separator between selected groups and help. $as_echo "$at_groups$as_nl$as_nl$at_help_all" | awk 'NF == 1 && FS != ";" { selected[$ 1] = 1 next } /^$/ { FS = ";" } NF > 0 { if (selected[$ 1]) { printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 if ($ 4) { lmax = 79 indent = " " line = indent len = length (line) n = split ($ 4, a, " ") for (i = 1; i <= n; i++) { l = length (a[i]) + 1 if (i > 1 && len + l > lmax) { print line line = indent " " a[i] len = length (line) } else { line = line " " a[i] len += l } } if (n) print line } } }' || at_write_fail=1 exit $at_write_fail fi if $at_version_p; then $as_echo "$as_me (GNU PSPP 1.0.1)" && cat <<\_ATEOF || at_write_fail=1 Copyright (C) 2012 Free Software Foundation, Inc. This test suite is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ATEOF exit $at_write_fail fi # Should we print banners? Yes if more than one test is run. case $at_groups in #( *$as_nl* ) at_print_banners=: ;; #( * ) at_print_banners=false ;; esac # Text for banner N, set to a single space once printed. # Banner 1. calendar.at:17 # Category starts at test group 1. at_banner_text_1="calendar" # Banner 2. data-in.at:17 # Category starts at test group 2. at_banner_text_2="data input (data-in)" # Banner 3. data-out.at:17 # Category starts at test group 20. at_banner_text_3="data output (data-out)" # Banner 4. datasheet-test.at:17 # Category starts at test group 29. at_banner_text_4="datasheet" # Banner 5. dictionary.at:17 # Category starts at test group 34. at_banner_text_5="dictionary" # Banner 6. file.at:17 # Category starts at test group 35. at_banner_text_6="files handling" # Banner 7. format-guesser.at:17 # Category starts at test group 40. at_banner_text_7="format guesser" # Banner 8. pc+-file-reader.at:17 # Category starts at test group 41. at_banner_text_8="SPSS/PC+ file reader - positive" # Banner 9. pc+-file-reader.at:463 # Category starts at test group 45. at_banner_text_9="SPSS/PC+ file reader - negative" # Banner 10. por-file.at:17 # Category starts at test group 61. at_banner_text_10="portable files" # Banner 11. sys-file-reader.at:17 # Category starts at test group 65. at_banner_text_11="system file reader - positive" # Banner 12. sys-file-reader.at:1634 # Category starts at test group 83. at_banner_text_12="system file reader - negative" # Banner 13. sys-file.at:17 # Category starts at test group 161. at_banner_text_13="system files" # Banner 14. sys-file.at:330 # Category starts at test group 170. at_banner_text_14="system files -- very long strings" # Banner 15. encrypted-file.at:17 # Category starts at test group 175. at_banner_text_15="encrypted files" # Banner 16. command.at:17 # Category starts at test group 177. at_banner_text_16="command parser" # Banner 17. command.at:40 # Category starts at test group 179. at_banner_text_17="ERASE" # Banner 18. command.at:68 # Category starts at test group 181. at_banner_text_18="N OF CASES" # Banner 19. command.at:105 # Category starts at test group 182. at_banner_text_19="COMMENT" # Banner 20. do-if.at:17 # Category starts at test group 183. at_banner_text_20="DO IF" # Banner 21. do-repeat.at:17 # Category starts at test group 186. at_banner_text_21="DO REPEAT" # Banner 22. loop.at:17 # Category starts at test group 192. at_banner_text_22="LOOP" # Banner 23. temporary.at:17 # Category starts at test group 200. at_banner_text_23="TEMPORARY" # Banner 24. add-files.at:118 # Category starts at test group 201. at_banner_text_24="ADD FILES" # Banner 25. data-list.at:17 # Category starts at test group 201. at_banner_text_25="DATA LIST" # Banner 26. data-reader.at:17 # Category starts at test group 215. at_banner_text_26="BEGIN DATA" # Banner 27. dataset.at:17 # Category starts at test group 221. at_banner_text_27="DATASET commands" # Banner 28. file-handle.at:17 # Category starts at test group 227. at_banner_text_28="FILE HANDLE" # Banner 29. get-data-spreadsheet.at:167 # Category starts at test group 228. at_banner_text_29="GET DATA Spreadsheet /TYPE=GNM" # Banner 30. get-data-spreadsheet.at:373 # Category starts at test group 237. at_banner_text_30="GET DATA Spreadsheet /TYPE=ODS" # Banner 31. get-data-psql.at:17 # Category starts at test group 245. at_banner_text_31="GET DATA /TYPE=PSQL" # Banner 32. get-data-txt.at:17 # Category starts at test group 246. at_banner_text_32="GET DATA /TYPE=TXT" # Banner 33. get.at:17 # Category starts at test group 259. at_banner_text_33="GET" # Banner 34. inpt-pgm.at:17 # Category starts at test group 264. at_banner_text_34="INPUT PROGRAM" # Banner 35. list.at:17 # Category starts at test group 268. at_banner_text_35="LIST" # Banner 36. match-files.at:17 # Category starts at test group 275. at_banner_text_36="MATCH FILES" # Banner 37. matrix-data.at:17 # Category starts at test group 285. at_banner_text_37="MATRIX DATA" # Banner 38. print-space.at:17 # Category starts at test group 297. at_banner_text_38="PRINT SPACE" # Banner 39. print.at:17 # Category starts at test group 301. at_banner_text_39="PRINT and WRITE" # Banner 40. save.at:17 # Category starts at test group 311. at_banner_text_40="IMPORT and EXPORT" # Banner 41. save.at:43 # Category starts at test group 312. at_banner_text_41="SAVE" # Banner 42. save-translate.at:17 # Category starts at test group 313. at_banner_text_42="SAVE TRANSLATE /TYPE=CSV" # Banner 43. save-translate.at:98 # Category starts at test group 319. at_banner_text_43="SAVE TRANSLATE /TYPE=TAB" # Banner 44. update.at:86 # Category starts at test group 320. at_banner_text_44="UPDATE" # Banner 45. attributes.at:17 # Category starts at test group 320. at_banner_text_45="VARIABLE ATTRIBUTES and DATAFILE ATTRIBUTES" # Banner 46. delete-variables.at:17 # Category starts at test group 321. at_banner_text_46="DELETE VARIABLES" # Banner 47. formats.at:17 # Category starts at test group 322. at_banner_text_47="FORMATS" # Banner 48. missing-values.at:17 # Category starts at test group 324. at_banner_text_48="MISSING VALUES" # Banner 49. mrsets.at:17 # Category starts at test group 326. at_banner_text_49="MRSETS" # Banner 50. rename-variables.at:17 # Category starts at test group 338. at_banner_text_50="RENAME VARIABLES" # Banner 51. sort-variables.at:17 # Category starts at test group 343. at_banner_text_51="SORT VARIABLES" # Banner 52. split-file.at:17 # Category starts at test group 344. at_banner_text_52="SPLIT FILE" # Banner 53. sys-file-info.at:17 # Category starts at test group 346. at_banner_text_53="SYSFILE INFO" # Banner 54. sys-file-info.at:66 # Category starts at test group 347. at_banner_text_54="DISPLAY" # Banner 55. value-labels.at:17 # Category starts at test group 352. at_banner_text_55="VALUE LABELS" # Banner 56. variable-display.at:17 # Category starts at test group 357. at_banner_text_56="variable display attributes" # Banner 57. variable-display.at:50 # Category starts at test group 358. at_banner_text_57="VARIABLE LABELS" # Banner 58. vector.at:17 # Category starts at test group 359. at_banner_text_58="VECTOR" # Banner 59. weight.at:17 # Category starts at test group 363. at_banner_text_59="WEIGHT" # Banner 60. evaluate.at:48 # Category starts at test group 364. at_banner_text_60="expressions" # Banner 61. parse.at:17 # Category starts at test group 370. at_banner_text_61="expression parsing" # Banner 62. command-name.at:17 # Category starts at test group 372. at_banner_text_62="command name matching" # Banner 63. lexer.at:17 # Category starts at test group 379. at_banner_text_63="lexer" # Banner 64. q2c.at:17 # Category starts at test group 382. at_banner_text_64="q2c" # Banner 65. scan.at:17 # Category starts at test group 383. at_banner_text_65="syntax scanning" # Banner 66. segment.at:17 # Category starts at test group 395. at_banner_text_66="syntax segmentation" # Banner 67. variable-parser.at:17 # Category starts at test group 409. at_banner_text_67="Variable parser" # Banner 68. aggregate.at:17 # Category starts at test group 410. at_banner_text_68="AGGREGATE procedure" # Banner 69. autorecode.at:17 # Category starts at test group 426. at_banner_text_69="AUTORECODE procedure" # Banner 70. correlations.at:17 # Category starts at test group 434. at_banner_text_70="CORRELATIONS" # Banner 71. crosstabs.at:17 # Category starts at test group 441. at_banner_text_71="CROSSTABS procedure" # Banner 72. descriptives.at:17 # Category starts at test group 460. at_banner_text_72="DESCRIPTIVES procedure" # Banner 73. examine.at:17 # Category starts at test group 471. at_banner_text_73="EXAMINE" # Banner 74. graph.at:17 # Category starts at test group 493. at_banner_text_74="GRAPH" # Banner 75. factor.at:17 # Category starts at test group 505. at_banner_text_75="FACTOR procedure" # Banner 76. flip.at:17 # Category starts at test group 516. at_banner_text_76="FLIP command" # Banner 77. frequencies.at:17 # Category starts at test group 520. at_banner_text_77="FREQUENCIES procedure" # Banner 78. glm.at:17 # Category starts at test group 543. at_banner_text_78="GLM procedure" # Banner 79. logistic.at:17 # Category starts at test group 548. at_banner_text_79="LOGISTIC REGRESSION" # Banner 80. means.at:17 # Category starts at test group 558. at_banner_text_80="MEANS procedure" # Banner 81. npar.at:17 # Category starts at test group 569. at_banner_text_81="NPAR TESTS" # Banner 82. oneway.at:17 # Category starts at test group 608. at_banner_text_82="ONEWAY procedure" # Banner 83. quick-cluster.at:17 # Category starts at test group 626. at_banner_text_83="QUICK CLUSTER" # Banner 84. rank.at:17 # Category starts at test group 635. at_banner_text_84="RANK" # Banner 85. regression.at:17 # Category starts at test group 647. at_banner_text_85="LINEAR REGRESSION" # Banner 86. reliability.at:17 # Category starts at test group 660. at_banner_text_86="RELIABILITY" # Banner 87. roc.at:17 # Category starts at test group 665. at_banner_text_87="ROC" # Banner 88. sort-cases.at:17 # Category starts at test group 670. at_banner_text_88="SORT CASES" # Banner 89. t-test.at:17 # Category starts at test group 691. at_banner_text_89="T-TEST" # Banner 90. cache.at:17 # Category starts at test group 711. at_banner_text_90="CACHE" # Banner 91. cd.at:17 # Category starts at test group 712. at_banner_text_91="CD" # Banner 92. date.at:17 # Category starts at test group 713. at_banner_text_92="USE" # Banner 93. insert.at:17 # Category starts at test group 714. at_banner_text_93="INSERT" # Banner 94. permissions.at:17 # Category starts at test group 723. at_banner_text_94="PERMISSIONS" # Banner 95. set.at:17 # Category starts at test group 725. at_banner_text_95="SET" # Banner 96. set.at:124 # Category starts at test group 729. at_banner_text_96="PRESERVE and RESTORE" # Banner 97. show.at:17 # Category starts at test group 730. at_banner_text_97="SHOW" # Banner 98. title.at:17 # Category starts at test group 732. at_banner_text_98="TITLE and related commands" # Banner 99. compute.at:17 # Category starts at test group 733. at_banner_text_99="COMPUTE transformation" # Banner 100. count.at:17 # Category starts at test group 737. at_banner_text_100="COUNT" # Banner 101. recode.at:17 # Category starts at test group 739. at_banner_text_101="RECODE transformation" # Banner 102. sample.at:17 # Category starts at test group 750. at_banner_text_102="SAMPLE" # Banner 103. select-if.at:17 # Category starts at test group 751. at_banner_text_103="FILTER" # Banner 104. abt.at:17 # Category starts at test group 752. at_banner_text_104="Augmented binary tree (ABT) library" # Banner 105. bt.at:17 # Category starts at test group 759. at_banner_text_105="Balanced tree (BT) library" # Banner 106. encoding-guesser.at:17 # Category starts at test group 767. at_banner_text_106="encoding guesser" # Banner 107. float-format.at:17 # Category starts at test group 787. at_banner_text_107="floating point formats" # Banner 108. heap.at:17 # Category starts at test group 788. at_banner_text_108="Heap library" # Banner 109. hmap.at:17 # Category starts at test group 793. at_banner_text_109="Hash map (hmap) library" # Banner 110. hmapx.at:17 # Category starts at test group 818. at_banner_text_110="Hash map of pointers (hmapx) library" # Banner 111. i18n.at:17 # Category starts at test group 846. at_banner_text_111="i18n recoding" # Banner 112. i18n.at:70 # Category starts at test group 855. at_banner_text_112="i18n concatenation" # Banner 113. line-reader.at:17 # Category starts at test group 876. at_banner_text_113="line_reader" # Banner 114. ll.at:17 # Category starts at test group 884. at_banner_text_114="doubly linked list (ll) library" # Banner 115. llx.at:17 # Category starts at test group 914. at_banner_text_115="doubly linked list of pointers (llx) library" # Banner 116. range-map.at:17 # Category starts at test group 946. at_banner_text_116="range map library" # Banner 117. range-set.at:17 # Category starts at test group 949. at_banner_text_117="range set library" # Banner 118. range-tower.at:17 # Category starts at test group 955. at_banner_text_118="range tower library" # Banner 119. sparse-array.at:17 # Category starts at test group 963. at_banner_text_119="sparse array library" # Banner 120. sparse-xarray-test.at:17 # Category starts at test group 965. at_banner_text_120="sparse external arrays" # Banner 121. str.at:17 # Category starts at test group 972. at_banner_text_121="string library" # Banner 122. string-map.at:17 # Category starts at test group 973. at_banner_text_122="string map library" # Banner 123. stringi-map.at:17 # Category starts at test group 987. at_banner_text_123="case-insensitive string map library" # Banner 124. string-set.at:17 # Category starts at test group 1001. at_banner_text_124="string set library" # Banner 125. stringi-set.at:17 # Category starts at test group 1014. at_banner_text_125="case-insensitive string set library" # Banner 126. tower.at:17 # Category starts at test group 1027. at_banner_text_126="tower library" # Banner 127. u8-istream.at:17 # Category starts at test group 1032. at_banner_text_127="u8_istream" # Banner 128. zip.at:17 # Category starts at test group 1048. at_banner_text_128="zip" # Banner 129. chart-geometry.at:17 # Category starts at test group 1049. at_banner_text_129="Chart Geometry" # Banner 130. moments.at:17 # Category starts at test group 1051. at_banner_text_130="calculating moments" # Banner 131. randist.at:17 # Category starts at test group 1053. at_banner_text_131="random distributions" # Banner 132. ascii.at:17 # Category starts at test group 1067. at_banner_text_132="ASCII driver -- rendering corner cases" # Banner 133. charts.at:17 # Category starts at test group 1075. at_banner_text_133="CHARTS Rudimentary run tests" # Banner 134. html.at:17 # Category starts at test group 1082. at_banner_text_134="HTML driver" # Banner 135. output.at:17 # Category starts at test group 1083. at_banner_text_135="output drivers" # Banner 136. paper-size.at:17 # Category starts at test group 1088. at_banner_text_136="output -- paper sizes" # Banner 137. render.at:174 # Category starts at test group 1091. at_banner_text_137="output rendering -- no page breaking" # Banner 138. render.at:768 # Category starts at test group 1112. at_banner_text_138="output rendering -- horizontal page breaks" # Banner 139. render.at:1620 # Category starts at test group 1127. at_banner_text_139="output rendering -- vertical page breaks" # Banner 140. render.at:2428 # Category starts at test group 1137. at_banner_text_140="output rendering -- double page breaks" # Banner 141. render.at:2979 # Category starts at test group 1142. at_banner_text_141="output rendering -- problematic procedures" # Banner 142. tables.at:17 # Category starts at test group 1145. at_banner_text_142="output -- tables" # Banner 143. main.at:17 # Category starts at test group 1147. at_banner_text_143="PSPP terminal UI" # Banner 144. syntax-gen.at:17 # Category starts at test group 1151. at_banner_text_144="SYNTAX GENERATOR" # Banner 145. pspp-convert.at:1 # Category starts at test group 1152. at_banner_text_145="pspp-convert" # Banner 146. perl-module.at:17 # Category starts at test group 1153. at_banner_text_146="Perl module tests" # Take any -C into account. if $at_change_dir ; then test x != "x$at_dir" && cd "$at_dir" \ || as_fn_error $? "unable to change directory" at_dir=`pwd` fi # Load the config files for any default variable assignments. for at_file in atconfig atlocal do test -r $at_file || continue . ./$at_file || as_fn_error $? "invalid content: $at_file" done # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: : "${at_top_build_prefix=$at_top_builddir}" # Perform any assignments requested during argument parsing. eval "$at_debug_args" # atconfig delivers names relative to the directory the test suite is # in, but the groups themselves are run in testsuite-dir/group-dir. if test -n "$at_top_srcdir"; then builddir=../.. for at_dir_var in srcdir top_srcdir top_build_prefix do eval at_val=\$at_$at_dir_var case $at_val in [\\/$]* | ?:[\\/]* ) at_prefix= ;; *) at_prefix=../../ ;; esac eval "$at_dir_var=\$at_prefix\$at_val" done fi ## -------------------- ## ## Directory structure. ## ## -------------------- ## # This is the set of directories and files used by this script # (non-literals are capitalized): # # TESTSUITE - the testsuite # TESTSUITE.log - summarizes the complete testsuite run # TESTSUITE.dir/ - created during a run, remains after -d or failed test # + at-groups/ - during a run: status of all groups in run # | + NNN/ - during a run: meta-data about test group NNN # | | + check-line - location (source file and line) of current AT_CHECK # | | + status - exit status of current AT_CHECK # | | + stdout - stdout of current AT_CHECK # | | + stder1 - stderr, including trace # | | + stderr - stderr, with trace filtered out # | | + test-source - portion of testsuite that defines group # | | + times - timestamps for computing duration # | | + pass - created if group passed # | | + xpass - created if group xpassed # | | + fail - created if group failed # | | + xfail - created if group xfailed # | | + skip - created if group skipped # + at-stop - during a run: end the run if this file exists # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction # + 0..NNN/ - created for each group NNN, remains after -d or failed test # | + TESTSUITE.log - summarizes the group results # | + ... - files created during the group # The directory the whole suite works in. # Should be absolute to let the user `cd' at will. at_suite_dir=$at_dir/$as_me.dir # The file containing the suite ($at_dir might have changed since earlier). at_suite_log=$at_dir/$as_me.log # The directory containing helper files per test group. at_helper_dir=$at_suite_dir/at-groups # Stop file: if it exists, do not start new jobs. at_stop_file=$at_suite_dir/at-stop # The fifo used for the job dispatcher. at_job_fifo=$at_suite_dir/at-job-fifo if $at_clean; then test -d "$at_suite_dir" && find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; rm -f -r "$at_suite_dir" "$at_suite_log" exit $? fi # Don't take risks: use only absolute directories in PATH. # # For stand-alone test suites (ie. atconfig was not found), # AUTOTEST_PATH is relative to `.'. # # For embedded test suites, AUTOTEST_PATH is relative to the top level # of the package. Then expand it into build/src parts, since users # may create executables in both places. AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"` at_path= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $AUTOTEST_PATH $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR case $as_dir in [\\/]* | ?:[\\/]* ) as_fn_append at_path "$as_dir" ;; * ) if test -z "$at_top_build_prefix"; then # Stand-alone test suite. as_fn_append at_path "$as_dir" else # Embedded test suite. as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR" as_fn_append at_path "$at_top_srcdir/$as_dir" fi ;; esac done IFS=$as_save_IFS # Now build and simplify PATH. # # There might be directories that don't exist, but don't redirect # builtins' (eg., cd) stderr directly: Ultrix's sh hates that. at_new_path= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $at_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -d "$as_dir" || continue case $as_dir in [\\/]* | ?:[\\/]* ) ;; * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; esac case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;; esac done IFS=$as_save_IFS PATH=$at_new_path export PATH # Setting up the FDs. # 5 is the log file. Not to be overwritten if `-d'. if $at_debug_p; then at_suite_log=/dev/null else : >"$at_suite_log" fi exec 5>>"$at_suite_log" # Banners and logs. $as_echo "## -------------------------- ## ## GNU PSPP 1.0.1 test suite. ## ## -------------------------- ##" { $as_echo "## -------------------------- ## ## GNU PSPP 1.0.1 test suite. ## ## -------------------------- ##" echo $as_echo "$as_me: command line was:" $as_echo " \$ $0 $at_cli_args" echo # If ChangeLog exists, list a few lines in case it might help determining # the exact version. if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then $as_echo "## ---------- ## ## ChangeLog. ## ## ---------- ##" echo sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog" echo fi { 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 } echo # Contents of the config files. for at_file in atconfig atlocal do test -r $at_file || continue $as_echo "$as_me: $at_file:" sed 's/^/| /' $at_file echo done } >&5 ## ------------------------- ## ## Autotest shell functions. ## ## ------------------------- ## # at_fn_banner NUMBER # ------------------- # Output banner NUMBER, provided the testsuite is running multiple groups and # this particular banner has not yet been printed. at_fn_banner () { $at_print_banners || return 0 eval at_banner_text=\$at_banner_text_$1 test "x$at_banner_text" = "x " && return 0 eval "at_banner_text_$1=\" \"" if test -z "$at_banner_text"; then $at_first || echo else $as_echo "$as_nl$at_banner_text$as_nl" fi } # at_fn_banner # at_fn_check_prepare_notrace REASON LINE # --------------------------------------- # Perform AT_CHECK preparations for the command at LINE for an untraceable # command; REASON is the reason for disabling tracing. at_fn_check_prepare_notrace () { $at_trace_echo "Not enabling shell tracing (command contains $1)" $as_echo "$2" >"$at_check_line_file" at_check_trace=: at_check_filter=: : >"$at_stdout"; : >"$at_stderr" } # at_fn_check_prepare_trace LINE # ------------------------------ # Perform AT_CHECK preparations for the command at LINE for a traceable # command. at_fn_check_prepare_trace () { $as_echo "$1" >"$at_check_line_file" at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace : >"$at_stdout"; : >"$at_stderr" } # at_fn_check_prepare_dynamic COMMAND LINE # ---------------------------------------- # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate # preparation function. at_fn_check_prepare_dynamic () { case $1 in *$as_nl*) at_fn_check_prepare_notrace 'an embedded newline' "$2" ;; *) at_fn_check_prepare_trace "$2" ;; esac } # at_fn_filter_trace # ------------------ # Remove the lines in the file "$at_stderr" generated by "set -x" and print # them to stderr. at_fn_filter_trace () { mv "$at_stderr" "$at_stder1" grep '^ *+' "$at_stder1" >&2 grep -v '^ *+' "$at_stder1" >"$at_stderr" } # at_fn_log_failure FILE-LIST # --------------------------- # Copy the files in the list on stdout with a "> " prefix, and exit the shell # with a failure exit code. at_fn_log_failure () { for file do $as_echo "$file:"; sed 's/^/> /' "$file"; done echo 1 > "$at_status_file" exit 1 } # at_fn_check_skip EXIT-CODE LINE # ------------------------------- # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit # the test group subshell with that same exit code. Use LINE in any report # about test failure. at_fn_check_skip () { case $1 in 99) echo 99 > "$at_status_file"; at_failed=: $as_echo "$2: hard failure"; exit 99;; 77) echo 77 > "$at_status_file"; exit 77;; esac } # at_fn_check_status EXPECTED EXIT-CODE LINE # ------------------------------------------ # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing. # Otherwise, if it is 77 or 99, exit the test group subshell with that same # exit code; if it is anything else print an error message referring to LINE, # and fail the test. at_fn_check_status () { case $2 in $1 ) ;; 77) echo 77 > "$at_status_file"; exit 77;; 99) echo 99 > "$at_status_file"; at_failed=: $as_echo "$3: hard failure"; exit 99;; *) $as_echo "$3: exit code was $2, expected $1" at_failed=:;; esac } # at_fn_diff_devnull FILE # ----------------------- # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff # invocations. at_fn_diff_devnull () { test -s "$1" || return 0 $at_diff "$at_devnull" "$1" } # at_fn_test NUMBER # ----------------- # Parse out test NUMBER from the tail of this file. at_fn_test () { eval at_sed=\$at_sed$1 sed "$at_sed" "$at_myself" > "$at_test_source" } # at_fn_create_debugging_script # ----------------------------- # Create the debugging script $at_group_dir/run which will reproduce the # current test group. at_fn_create_debugging_script () { { echo "#! /bin/sh" && echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' && $as_echo "cd '$at_dir'" && $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" && echo 'exit 1' } >"$at_group_dir/run" && chmod +x "$at_group_dir/run" } ## -------------------------------- ## ## End of autotest shell functions. ## ## -------------------------------- ## { $as_echo "## ---------------- ## ## Tested programs. ## ## ---------------- ##" echo } >&5 # Report what programs are being tested. for at_program in : $at_tested do test "$at_program" = : && continue case $at_program in [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;; * ) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -f "$as_dir/$at_program" && break done IFS=$as_save_IFS at_program_=$as_dir/$at_program ;; esac if test -f "$at_program_"; then { $as_echo "$at_srcdir/testsuite.at:19: $at_program_ --version" "$at_program_" --version &5 2>&1 else as_fn_error $? "cannot find $at_program" "$LINENO" 5 fi done { $as_echo "## ------------------ ## ## Running the tests. ## ## ------------------ ##" } >&5 at_start_date=`date` at_start_time=`date +%s 2>/dev/null` $as_echo "$as_me: starting at: $at_start_date" >&5 if test X"$RUNNER" != X; then wrapper_dir=`pwd`/wrappers rm -f "$wrapper_dir"/* test -d "$wrapper_dir" || mkdir "$wrapper_dir" wrap_dir () { test -d "$1" || return for file in "$1"/*; do if test -x "$file" && test -f "$file"; then base=`basename $file $EXEEXT` wrapper=$wrapper_dir/$base if test ! -e "$wrapper"; then echo "exec $RUNNER $file \"\$@\"" > $wrapper chmod +x $wrapper fi fi done } save_IFS=$IFS; IFS=$PATH_SEPARATOR for dir in $AUTOTEST_PATH; do IFS=$save_IFS test X"$dir" = X && dir=. case $dir in \\/* | ?:\\/*) wrap_dir "$dir" ;; *) wrap_dir "$abs_top_builddir/$dir" wrap_dir "$abs_top_srcdir/$dir" ;; esac done IFS=$save_IFS PATH=$wrapper_dir:$PATH fi data_in_prng () { cat > my-rand.pl <<'EOF' # This random number generator and the test for it below are drawn # from Park and Miller, "Random Number Generators: Good Ones are Hard # to Come By", Communications of the ACM 31:10 (October 1988). It is # documented to function properly on systems with a 46-bit or longer # real significand, which includes systems that have 64-bit IEEE reals # (with 53-bit significand). The test should catch any systems for # which this is not true, in any case. our ($seed) = 1; sub my_rand { my ($modulo) = @_; my ($a) = 16807; my ($m) = 2147483647; my ($tmp) = $a * $seed; $seed = $tmp - $m * int ($tmp / $m); return $seed % $modulo; } EOF cat > test-my-rand.pl <<'EOF' #! /usr/bin/perl use strict; use warnings; do './my-rand.pl'; my_rand (1) foreach 1...10000; our $seed; die $seed if $seed != 1043618065; EOF } date_in () { data_in_prng cat > date-in.pl << 'EOF' #! /usr/bin/perl use strict; use warnings; do './my-rand.pl'; my ($fmt_name, @templates) = @ARGV; my @dates = (#yyyy mm dd jjj HH MM SS [1648, 6, 10, 162, 0, 0, 0], [1680, 6, 30, 182, 4, 50, 38], [1716, 7, 24, 206, 12, 31, 35], [1768, 6, 19, 171, 12, 47, 53], [1819, 8, 2, 214, 1, 26, 0], [1839, 3, 27, 86, 20, 58, 11], [1903, 4, 19, 109, 7, 36, 5], [1929, 8, 25, 237, 15, 43, 49], [1941, 9, 29, 272, 4, 25, 9], [1943, 4, 19, 109, 6, 49, 27], [1943, 10, 7, 280, 2, 57, 52], [1992, 3, 17, 77, 16, 45, 44], [1996, 2, 25, 56, 21, 30, 57], [1941, 9, 29, 272, 4, 25, 9], [1943, 4, 19, 109, 6, 49, 27], [1943, 10, 7, 280, 2, 57, 52], [1992, 3, 17, 77, 16, 45, 44], [1996, 2, 25, 56, 21, 30, 57], [2038, 11, 10, 314, 22, 30, 4], [2094, 7, 18, 199, 1, 56, 51]); open (SYNTAX, '>', "$fmt_name.sps") or die "$fmt_name.sps: create: $!\n"; print SYNTAX "SET EPOCH 1930.\n"; print SYNTAX "DATA LIST NOTABLE FILE='$fmt_name.in'/$fmt_name 1-40 ($fmt_name).\n"; print SYNTAX "PRINT OUTFILE='$fmt_name.out'/$fmt_name (F16.2).\n"; print SYNTAX "EXECUTE.\n"; close (SYNTAX); my ($fn) = "$fmt_name.in"; open (DATA, '>', $fn) or die "$fn: create: $!\n"; select DATA; for my $template (@templates) { for my $date (@dates) { print_date_with_template ($date, $template) for 1...10; } } close (DATA); sub print_date_with_template { my ($date, $template) = @_; my ($year, $month, $day, $julian, $hour, $minute, $second) = @$date; my ($quarter) = int (($month - 1) / 3) + 1; my ($week) = int (($julian - 1) / 7) + 1; my (@year_types) = ('full'); push (@year_types, '2digit') if $year >= 1930 && $year < 2030; for my $c (split ('', $template)) { if ($c eq 'd') { printf (+pick ('%d', '%02d'), $day); } elsif ($c eq 'm') { my ($type) = pick ('arabic', 'roman', 'abbrev', 'full'); if ($type eq 'arabic') { printf (+pick ('%d', '%02d'), $month); } elsif ($type eq 'roman') { my ($mmm) = ('i', 'ii', 'iii', 'iv', 'v', 'vi', 'vii', 'viii', 'ix', 'x', 'xi', 'xii')[$month - 1]; print_rand_case ($mmm); } elsif ($type eq 'abbrev') { my ($mmm) = qw (jan feb mar apr may jun jul aug sep oct nov dec)[$month - 1]; print_rand_case ($mmm); } elsif ($type eq 'full') { my ($mmm) = qw (january february march april may june july august september october november december)[$month - 1]; print_rand_case ($mmm); } else { die; } } elsif ($c eq 'y') { my ($type) = pick (@year_types); if ($type eq '2digit') { printf (+pick ('%d', '%02d'), $year % 100); } elsif ($type eq 'full') { print $year; } else { die; } } elsif ($c eq 'j') { my ($type) = pick (@year_types); if ($type eq '2digit') { printf ("%02d%03d", $year % 100, $julian); } elsif ($type eq 'full') { printf ("%04d%03d", $year, $julian); } else { die; } } elsif ($c eq 'q') { print $quarter; } elsif ($c eq 'w') { print $week; } elsif ($c eq 'H') { printf (+pick ('%d', '%02d'), $hour); } elsif ($c eq 'M') { printf (+pick ('%d', '%02d'), $minute); } elsif ($c eq 'S') { printf (+pick ('%d', '%02d'), $second); } elsif ($c eq '-') { print +pick (' ', '-', '.', ',', '/'); } elsif ($c eq ':') { print +pick (' ', ':'); } elsif ($c eq ' ') { print ' '; } elsif ($c eq 'Q') { maybe_print_space (); print_rand_case ('q'); maybe_print_space (); } elsif ($c eq 'W') { maybe_print_space (); print_rand_case ('wk'); maybe_print_space (); } elsif ($c eq '+') { print +pick ('', '-', '+'); } else { die; } } print "\n"; } sub print_rand_case { my ($s) = @_; my ($case) = pick (qw (uc lc tc)); if ($case eq 'uc') { print uc ($s); } elsif ($case eq 'lc') { print lc ($s); } elsif ($case eq 'tc') { print ucfirst ($s); } else { die; } } sub maybe_print_space { print +pick ('', ' '); } sub pick { return $_[int (my_rand ($#_ + 1))]; } EOF } time_in () { data_in_prng cat > time-in.pl << 'EOF' #! /usr/bin/perl use strict; use warnings; do './my-rand.pl'; my ($skip, $fmt_name, @templates) = @ARGV; my_rand (1) foreach 1...$skip; my @times = (# D HH MM SS [ 0, 0, 0, 0.00], [ 1, 4, 50, 38.68], [ 5, 12, 31, 35.82], [ 0, 12, 47, 53.41], [ 3, 1, 26, 0.69], [ 1, 20, 58, 11.19], [ 12, 7, 36, 5.98], [ 52, 15, 43, 49.27], [ 7, 4, 25, 9.24], [ 0, 6, 49, 27.89], [ 20, 2, 57, 52.56], [555, 16, 45, 44.12], [120, 21, 30, 57.27], [ 0, 4, 25, 9.98], [ 3, 6, 49, 27.24], [ 5, 2, 57, 52.13], [ 0, 16, 45, 44.35], [ 1, 21, 30, 57.32], [ 10, 22, 30, 4.27], [ 22, 1, 56, 51.18]); open (SYNTAX, '>', "$fmt_name.sps") or die "$fmt_name.sps: create: $!\n"; print SYNTAX "DATA LIST NOTABLE FILE='$fmt_name.data'/$fmt_name 1-40 ($fmt_name).\n"; print SYNTAX "PRINT OUTFILE='$fmt_name.out'/$fmt_name (F16.2).\n"; print SYNTAX "EXECUTE.\n"; close (SYNTAX); my ($fn) = "$fmt_name.data"; open (DATA, '>', $fn) or die "$fn: create: $!\n"; select DATA; for my $template (@templates) { for my $time (@times) { print_time_with_template ($time, $template) for 1...10; } } close (DATA); sub print_time_with_template { my ($time, $template) = @_; my ($day, $hour, $minute, $second) = @$time; for my $c (split ('', $template)) { if ($c eq '+') { print +pick ('', '-', '+'); } elsif ($c eq 'D') { printf (+pick ('%d', '%02d'), $day); $day = 0; } elsif ($c eq 'H') { printf (+pick ('%d', '%02d'), $hour + 24 * $day); } elsif ($c eq 'M') { printf (+pick ('%d', '%02d'), $minute); } elsif ($c eq 'S') { printf (+pick ('%.0f', '%02.0f', '%.1f', '%.2f'), $second); } elsif ($c eq ':') { print +pick (' ', ':'); } elsif ($c eq ' ') { print ' '; } else { die; } } print "\n"; } sub pick { return $_[int (my_rand ($#_ + 1)) ]; } EOF } zcompressed_sack () { cat <<'EOF' "$FL3"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 6; 2; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; 7; 20; 1; 12; "windows-1252"; 999; 0; i64 0x194; # zheader_ofs i64 0x205; # ztrailer_ofs i64 48; # ztrailer_len hex "78 01 63 4c f9 f7 f7 df df ff bf 13 93 92 53 52"; hex "d3 d2 33 0c 0c 8d 8c 15 80 e0 ef df bf ff 52 d3"; hex "fe fe cd ca ce c9 05 f1 f3 f2 0b 0a 8b 8a 4b 4a"; hex "cb ca 2b 2a ab 1c 9d 9c 5d 5c dd dc 41 e2 1e 9e"; hex "5e de 3e be 7e fe ff fe fe 61 00 81 80 c0 a0 e0"; hex "90 d0 b0 70 00 0f 3f 23 d7"; i64 -100; # ztrailer_bias i64 0; # ztrailer_zero 0x3ff000; # block_size 1; # n_blocks i64 0x194; # uncompressed_ofs i64 0x1ac; # compressed_ofs 88; # uncompressed_size 89; # compressed_size EOF } vls_gen_data () { cat > data.txt < gen-data.pl <<'EOF' use strict; use warnings; # Generate shuffled data. my (@data); for my $i (0...$ARGV[0] - 1) { push (@data, ($i) x $ARGV[1]); } fisher_yates_shuffle (\@data); # Output shuffled data. my (@shuffled) = map ([$data[$_], $_], 0...$#data); open (SHUFFLED, ">data.txt"); print SHUFFLED "$data[$_] $_\n" foreach 0...$#data; # Output sorted data. my (@sorted) = sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] } @shuffled; open (SORTED, ">expout"); printf SORTED " %8d %8d \n", $_->[0], $_->[1] foreach @sorted; # From perlfaq4. sub fisher_yates_shuffle { my $deck = shift; # $deck is a reference to an array my $i = @$deck; while ($i--) { my $j = int rand ($i+1); @$deck[$i,$j] = @$deck[$j,$i]; } } EOF $PERL gen-data.pl "$@" } sparse_xarray_queue_limit () { # Each on-disk sparse_xarray eats up a file descriptor, so for the # tests that involve on-disk sparse_xarrays we need to limit the # maximum length of the queue. Figure out how many file descriptors # we can let the test program open at once. OPEN_MAX=`getconf OPEN_MAX 2>/dev/null` case $OPEN_MAX in [0-9]*) # Divide by 2 because some fds are used by other code. queue_limit=`expr $OPEN_MAX / 2` ;; undefined) # Assume that any system with a dynamic fd limit has a large limit. queue_limit=500 ;; *) case `uname -m 2>/dev/null` in CYGWIN*) # Cygwin claims a 256-fd limit as OPEN_MAX in . queue_limit=128 ;; MINGW*) # The following email claims that Mingw should have a # 2048-fd limit: # http://www.mail-archive.com/squid-users@squid-cache.org/msg35249.html queue_limit=1024 ;; *) # This seems fairly conservative these days. queue_limit=50 ;; esac ;; esac echo "$queue_limit" } randist_compare () { cat > compare.pl <<'EOF' use strict; use warnings 'all'; my ($epsilon) = 1; open (EXPECTED, '<', $ARGV[0]) or die "$ARGV[0]: open: $!\n"; open (ACTUAL, '<', $ARGV[1]) or die "$ARGV[1]: open: $!\n"; my ($errors) = 0; LINE: for (;;) { my $a = ; my $b = ; last if !defined $a && !defined $b; die "$ARGV[0]:$.: unexpected end of file\n" if !defined $a; die "$ARGV[1]:$.: unexpected end of file\n" if !defined $b; my (@a) = split (' ', $a); my (@b) = split (' ', $b); die "$ARGV[1]:$.: contains ". scalar (@b) . " fields but should " . "contain " . scalar (@a) . "\n" if $#a != $#b; foreach my $i (0...$#a) { die "$ARGV[1]:$.: unexpected number of decimals\n" if count_decimals ($a[$i]) != count_decimals ($b[$i]); my ($an) = to_int ($a[$i]); my ($bn) = to_int ($b[$i]); if ($an ne $bn && ($bn < $an - $epsilon || $bn > $an + $epsilon)) { $errors++; if ($errors > 50) { print "$ARGV[1]: Additional differences suppressed.\n"; last LINE; } print "$ARGV[1]:$.: Values differ from $ARGV[0]:$.\n"; print "Expected:\n", $a; print "Calculated:\n", $b; } } } exit ($errors > 0); sub count_decimals { my ($s) = @_; return length (substr ($s, index ($s, '.'))); } sub to_int { local ($_) = @_; s/\.//; return $_; } EOF } # Create the master directory if it doesn't already exist. as_dir="$at_suite_dir"; as_fn_mkdir_p || as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5 # Can we diff with `/dev/null'? DU 5.0 refuses. if diff /dev/null /dev/null >/dev/null 2>&1; then at_devnull=/dev/null else at_devnull=$at_suite_dir/devnull >"$at_devnull" fi # Use `diff -u' when possible. if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff" then at_diff='diff -u' else at_diff=diff fi # Get the last needed group. for at_group in : $at_groups; do :; done # Extract the start and end lines of each test group at the tail # of this file awk ' BEGIN { FS="" } /^#AT_START_/ { start = NR } /^#AT_STOP_/ { test = substr ($ 0, 10) print "at_sed" test "=\"1," start "d;" (NR-1) "q\"" if (test == "'"$at_group"'") exit }' "$at_myself" > "$at_suite_dir/at-source-lines" && . "$at_suite_dir/at-source-lines" || as_fn_error $? "cannot create test line number cache" "$LINENO" 5 rm -f "$at_suite_dir/at-source-lines" # Set number of jobs for `-j'; avoid more jobs than test groups. set X $at_groups; shift; at_max_jobs=$# if test $at_max_jobs -eq 0; then at_jobs=1 fi if test $at_jobs -ne 1 && { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then at_jobs=$at_max_jobs fi # If parallel mode, don't output banners, don't split summary lines. if test $at_jobs -ne 1; then at_print_banners=false at_quiet=: fi # Set up helper dirs. rm -rf "$at_helper_dir" && mkdir "$at_helper_dir" && cd "$at_helper_dir" && { test -z "$at_groups" || mkdir $at_groups; } || as_fn_error $? "testsuite directory setup failed" "$LINENO" 5 # Functions for running a test group. We leave the actual # test group execution outside of a shell function in order # to avoid hitting zsh 4.x exit status bugs. # at_fn_group_prepare # ------------------- # Prepare for running a test group. at_fn_group_prepare () { # The directory for additional per-group helper files. at_job_dir=$at_helper_dir/$at_group # The file containing the location of the last AT_CHECK. at_check_line_file=$at_job_dir/check-line # The file containing the exit status of the last command. at_status_file=$at_job_dir/status # The files containing the output of the tested commands. at_stdout=$at_job_dir/stdout at_stder1=$at_job_dir/stder1 at_stderr=$at_job_dir/stderr # The file containing the code for a test group. at_test_source=$at_job_dir/test-source # The file containing dates. at_times_file=$at_job_dir/times # Be sure to come back to the top test directory. cd "$at_suite_dir" # Clearly separate the test groups when verbose. $at_first || $at_verbose echo at_group_normalized=$at_group eval 'while :; do case $at_group_normalized in #( '"$at_format"'*) break;; esac at_group_normalized=0$at_group_normalized done' # Create a fresh directory for the next test group, and enter. # If one already exists, the user may have invoked ./run from # within that directory; we remove the contents, but not the # directory itself, so that we aren't pulling the rug out from # under the shell's notion of the current directory. at_group_dir=$at_suite_dir/$at_group_normalized at_group_log=$at_group_dir/$as_me.log if test -d "$at_group_dir"; then find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \; rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??* fi || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5 $as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;} # Be tolerant if the above `rm' was not able to remove the directory. as_dir="$at_group_dir"; as_fn_mkdir_p echo 0 > "$at_status_file" # In verbose mode, append to the log file *and* show on # the standard output; in quiet mode only write to the log. if test -z "$at_verbose"; then at_tee_pipe='tee -a "$at_group_log"' else at_tee_pipe='cat >> "$at_group_log"' fi } # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER] # ------------------------------------------------- # Declare the test group ORDINAL, located at LINE with group description DESC, # and residing under BANNER. Use PAD to align the status column. at_fn_group_banner () { at_setup_line="$2" test -n "$5" && at_fn_banner $5 at_desc="$3" case $1 in [0-9]) at_desc_line=" $1: ";; [0-9][0-9]) at_desc_line=" $1: " ;; *) at_desc_line="$1: " ;; esac as_fn_append at_desc_line "$3$4" $at_quiet $as_echo_n "$at_desc_line" echo "# -*- compilation -*-" >> "$at_group_log" } # at_fn_group_postprocess # ----------------------- # Perform cleanup after running a test group. at_fn_group_postprocess () { # Be sure to come back to the suite directory, in particular # since below we might `rm' the group directory we are in currently. cd "$at_suite_dir" if test ! -f "$at_check_line_file"; then sed "s/^ */$as_me: WARNING: /" <<_ATEOF A failure happened in a test group before any test could be run. This means that test suite is improperly designed. Please report this failure to . _ATEOF $as_echo "$at_setup_line" >"$at_check_line_file" at_status=99 fi $at_verbose $as_echo_n "$at_group. $at_setup_line: " $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log" case $at_xfail:$at_status in yes:0) at_msg="UNEXPECTED PASS" at_res=xpass at_errexit=$at_errexit_p at_color=$at_red ;; no:0) at_msg="ok" at_res=pass at_errexit=false at_color=$at_grn ;; *:77) at_msg='skipped ('`cat "$at_check_line_file"`')' at_res=skip at_errexit=false at_color=$at_blu ;; no:* | *:99) at_msg='FAILED ('`cat "$at_check_line_file"`')' at_res=fail at_errexit=$at_errexit_p at_color=$at_red ;; yes:*) at_msg='expected failure ('`cat "$at_check_line_file"`')' at_res=xfail at_errexit=false at_color=$at_lgn ;; esac echo "$at_res" > "$at_job_dir/$at_res" # In parallel mode, output the summary line only afterwards. if test $at_jobs -ne 1 && test -n "$at_verbose"; then $as_echo "$at_desc_line $at_color$at_msg$at_std" else # Make sure there is a separator even with long titles. $as_echo " $at_color$at_msg$at_std" fi at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" case $at_status in 0|77) # $at_times_file is only available if the group succeeded. # We're not including the group log, so the success message # is written in the global log separately. But we also # write to the group log in case they're using -d. if test -f "$at_times_file"; then at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' rm -f "$at_times_file" fi $as_echo "$at_log_msg" >> "$at_group_log" $as_echo "$at_log_msg" >&5 # Cleanup the group directory, unless the user wants the files # or the success was unexpected. if $at_debug_p || test $at_res = xpass; then at_fn_create_debugging_script if test $at_res = xpass && $at_errexit; then echo stop > "$at_stop_file" fi else if test -d "$at_group_dir"; then find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; rm -fr "$at_group_dir" fi rm -f "$at_test_source" fi ;; *) # Upon failure, include the log into the testsuite's global # log. The failure message is written in the group log. It # is later included in the global log. $as_echo "$at_log_msg" >> "$at_group_log" # Upon failure, keep the group directory for autopsy, and create # the debugging script. With -e, do not start any further tests. at_fn_create_debugging_script if $at_errexit; then echo stop > "$at_stop_file" fi ;; esac } ## ------------ ## ## Driver loop. ## ## ------------ ## if (set -m && set +m && set +b) >/dev/null 2>&1; then set +b at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=- else at_job_control_on=: at_job_control_off=: at_job_group= fi for at_signal in 1 2 15; do trap 'set +x; set +e $at_job_control_off at_signal='"$at_signal"' echo stop > "$at_stop_file" trap "" $at_signal at_pgids= for at_pgid in `jobs -p 2>/dev/null`; do at_pgids="$at_pgids $at_job_group$at_pgid" done test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null wait if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then echo >&2 fi at_signame=`kill -l $at_signal 2>&1 || echo $at_signal` set x $at_signame test 0 -gt 2 && at_signame=$at_signal { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5 $as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;} as_fn_arith 128 + $at_signal && exit_status=$as_val as_fn_exit $exit_status' $at_signal done rm -f "$at_stop_file" at_first=: if test $at_jobs -ne 1 && rm -f "$at_job_fifo" && test -n "$at_job_group" && ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null then # FIFO job dispatcher. trap 'at_pids= for at_pid in `jobs -p`; do at_pids="$at_pids $at_job_group$at_pid" done if test -n "$at_pids"; then at_sig=TSTP test "${TMOUT+set}" = set && at_sig=STOP kill -$at_sig $at_pids 2>/dev/null fi kill -STOP $$ test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP echo # Turn jobs into a list of numbers, starting from 1. at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p` set X $at_joblist shift for at_group in $at_groups; do $at_job_control_on 2>/dev/null ( # Start one test group. $at_job_control_off if $at_first; then exec 7>"$at_job_fifo" else exec 6<&- fi trap 'set +x; set +e trap "" PIPE echo stop > "$at_stop_file" echo >&7 as_fn_exit 141' PIPE at_fn_group_prepare if cd "$at_group_dir" && at_fn_test $at_group && . "$at_test_source" then :; else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} at_failed=: fi at_fn_group_postprocess echo >&7 ) & $at_job_control_off if $at_first; then at_first=false exec 6<"$at_job_fifo" 7>"$at_job_fifo" fi shift # Consume one token. if test $# -gt 0; then :; else read at_token <&6 || break set x $* fi test -f "$at_stop_file" && break done exec 7>&- # Read back the remaining ($at_jobs - 1) tokens. set X $at_joblist shift if test $# -gt 0; then shift for at_job do read at_token done <&6 fi exec 6<&- wait else # Run serially, avoid forks and other potential surprises. for at_group in $at_groups; do at_fn_group_prepare if cd "$at_group_dir" && at_fn_test $at_group && . "$at_test_source"; then :; else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} at_failed=: fi at_fn_group_postprocess test -f "$at_stop_file" && break at_first=false done fi # Wrap up the test suite with summary statistics. cd "$at_helper_dir" # Use ?..???? when the list must remain sorted, the faster * otherwise. at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'` at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'` at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'` at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do echo $f; done | sed '/?/d; s,/xpass,,'` at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do echo $f; done | sed '/?/d; s,/fail,,'` set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list shift; at_group_count=$# set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$* set X $at_xfail_list; shift; at_xfail_count=$# set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$* set X $at_skip_list; shift; at_skip_count=$# as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val # Back to the top directory. cd "$at_dir" rm -rf "$at_helper_dir" # Compute the duration of the suite. at_stop_date=`date` at_stop_time=`date +%s 2>/dev/null` $as_echo "$as_me: ending at: $at_stop_date" >&5 case $at_start_time,$at_stop_time in [0-9]*,[0-9]*) as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" $as_echo "$as_me: test suite duration: $at_duration" >&5 ;; esac echo $as_echo "## ------------- ## ## Test results. ## ## ------------- ##" echo { echo $as_echo "## ------------- ## ## Test results. ## ## ------------- ##" echo } >&5 if test $at_run_count = 1; then at_result="1 test" at_were=was else at_result="$at_run_count tests" at_were=were fi if $at_errexit_p && test $at_unexpected_count != 0; then if test $at_xpass_count = 1; then at_result="$at_result $at_were run, one passed" else at_result="$at_result $at_were run, one failed" fi at_result="$at_result unexpectedly and inhibited subsequent tests." at_color=$at_red else # Don't you just love exponential explosion of the number of cases? at_color=$at_red case $at_xpass_count:$at_fail_count:$at_xfail_count in # So far, so good. 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;; 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;; # Some unexpected failures 0:*:0) at_result="$at_result $at_were run, $at_fail_count failed unexpectedly." ;; # Some failures, both expected and unexpected 0:*:1) at_result="$at_result $at_were run, $at_total_fail_count failed ($at_xfail_count expected failure)." ;; 0:*:*) at_result="$at_result $at_were run, $at_total_fail_count failed ($at_xfail_count expected failures)." ;; # No unexpected failures, but some xpasses *:0:*) at_result="$at_result $at_were run, $at_xpass_count passed unexpectedly." ;; # No expected failures, but failures and xpasses *:1:0) at_result="$at_result $at_were run, $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;; *:*:0) at_result="$at_result $at_were run, $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;; # All of them. *:*:1) at_result="$at_result $at_were run, $at_xpass_count passed unexpectedly, $at_total_fail_count failed ($at_xfail_count expected failure)." ;; *:*:*) at_result="$at_result $at_were run, $at_xpass_count passed unexpectedly, $at_total_fail_count failed ($at_xfail_count expected failures)." ;; esac if test $at_skip_count = 0 && test $at_run_count -gt 1; then at_result="All $at_result" fi fi # Now put skips in the mix. case $at_skip_count in 0) ;; 1) at_result="$at_result 1 test was skipped." ;; *) at_result="$at_result $at_skip_count tests were skipped." ;; esac if test $at_unexpected_count = 0; then echo "$at_color$at_result$at_std" echo "$at_result" >&5 else echo "${at_color}ERROR: $at_result$at_std" >&2 echo "ERROR: $at_result" >&5 { echo $as_echo "## ------------------------ ## ## Summary of the failures. ## ## ------------------------ ##" # Summary of failed and skipped tests. if test $at_fail_count != 0; then echo "Failed tests:" $SHELL "$at_myself" $at_fail_list --list echo fi if test $at_skip_count != 0; then echo "Skipped tests:" $SHELL "$at_myself" $at_skip_list --list echo fi if test $at_xpass_count != 0; then echo "Unexpected passes:" $SHELL "$at_myself" $at_xpass_list --list echo fi if test $at_fail_count != 0; then $as_echo "## ---------------------- ## ## Detailed failed tests. ## ## ---------------------- ##" echo for at_group in $at_fail_list do at_group_normalized=$at_group eval 'while :; do case $at_group_normalized in #( '"$at_format"'*) break;; esac at_group_normalized=0$at_group_normalized done' cat "$at_suite_dir/$at_group_normalized/$as_me.log" echo done echo fi if test -n "$at_top_srcdir"; then sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## ${at_top_build_prefix}config.log ## _ASBOX sed 's/^/| /' ${at_top_build_prefix}config.log echo fi } >&5 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## $as_me.log was created. ## _ASBOX echo if $at_debug_p; then at_msg='per-test log files' else at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'" fi $as_echo "Please send $at_msg and all information you think might help: To: Subject: [GNU PSPP 1.0.1] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} You may investigate any problem if you feel able to do so, in which case the test suite provides a good starting point. Its output may be found below \`${at_testdir+${at_testdir}/}$as_me.dir'. " exit 1 fi exit 0 ## ------------- ## ## Actual tests. ## ## ------------- ## #AT_START_1 at_fn_group_banner 1 'calendar.at:19' \ "epoch" " " 1 at_xfail=no ( $as_echo "1. $at_setup_line: testing $at_desc ..." $at_traceon cat >epoch.sps <<'_ATEOF' SET MXERR 1000. SET MXWARN 1000. SET EPOCH 1900. DEBUG EVALUATE/YRMODA(0,1,1) = YRMODA(1900,1,1). DEBUG EVALUATE/YRMODA(1,1,1) = YRMODA(1901,1,1). DEBUG EVALUATE/YRMODA(12,1,1) = YRMODA(1912,1,1). DEBUG EVALUATE/YRMODA(70,1,1) = YRMODA(1970,1,1). DEBUG EVALUATE/YRMODA(87,1,1) = YRMODA(1987,1,1). DEBUG EVALUATE/YRMODA(99,1,1) = YRMODA(1999,1,1). DEBUG EVALUATE/YRMODA(100,1,1). DEBUG EVALUATE/DATE.DMY(1,1,0) = DATE.DMY(1,1,1900). DEBUG EVALUATE/DATE.DMY(1,1,1) = DATE.DMY(1,1,1901). DEBUG EVALUATE/DATE.DMY(1,1,12) = DATE.DMY(1,1,1912). DEBUG EVALUATE/DATE.DMY(1,1,70) = DATE.DMY(1,1,1970). DEBUG EVALUATE/DATE.DMY(1,1,87) = DATE.DMY(1,1,1987). DEBUG EVALUATE/DATE.DMY(1,1,99) = DATE.DMY(1,1,1999). DEBUG EVALUATE/DATE.DMY(1,1,100). SET EPOCH 1901. DEBUG EVALUATE/YRMODA(0,1,1) = YRMODA(1900,1,1). DEBUG EVALUATE/YRMODA(1,1,1) = YRMODA(1901,1,1). DEBUG EVALUATE/YRMODA(12,1,1) = YRMODA(1912,1,1). DEBUG EVALUATE/YRMODA(70,1,1) = YRMODA(1970,1,1). DEBUG EVALUATE/YRMODA(87,1,1) = YRMODA(1987,1,1). DEBUG EVALUATE/YRMODA(99,1,1) = YRMODA(1999,1,1). DEBUG EVALUATE/YRMODA(100,1,1). DEBUG EVALUATE/DATE.DMY(1,1,0) = DATE.DMY(1,1,2000). DEBUG EVALUATE/DATE.DMY(1,1,1) = DATE.DMY(1,1,1901). DEBUG EVALUATE/DATE.DMY(1,1,12) = DATE.DMY(1,1,1912). DEBUG EVALUATE/DATE.DMY(1,1,70) = DATE.DMY(1,1,1970). DEBUG EVALUATE/DATE.DMY(1,1,87) = DATE.DMY(1,1,1987). DEBUG EVALUATE/DATE.DMY(1,1,99) = DATE.DMY(1,1,1999). DEBUG EVALUATE/DATE.DMY(1,1,100). SET EPOCH 1911. DEBUG EVALUATE/YRMODA(0,1,1) = YRMODA(1900,1,1). DEBUG EVALUATE/YRMODA(1,1,1) = YRMODA(1901,1,1). DEBUG EVALUATE/YRMODA(12,1,1) = YRMODA(1912,1,1). DEBUG EVALUATE/YRMODA(70,1,1) = YRMODA(1970,1,1). DEBUG EVALUATE/YRMODA(87,1,1) = YRMODA(1987,1,1). DEBUG EVALUATE/YRMODA(99,1,1) = YRMODA(1999,1,1). DEBUG EVALUATE/YRMODA(100,1,1). DEBUG EVALUATE/DATE.DMY(1,1,0) = DATE.DMY(1,1,2000). DEBUG EVALUATE/DATE.DMY(1,1,1) = DATE.DMY(1,1,2001). DEBUG EVALUATE/DATE.DMY(1,1,12) = DATE.DMY(1,1,1912). DEBUG EVALUATE/DATE.DMY(1,1,70) = DATE.DMY(1,1,1970). DEBUG EVALUATE/DATE.DMY(1,1,87) = DATE.DMY(1,1,1987). DEBUG EVALUATE/DATE.DMY(1,1,99) = DATE.DMY(1,1,1999). DEBUG EVALUATE/DATE.DMY(1,1,100). SET EPOCH 1912. DEBUG EVALUATE/YRMODA(0,1,1) = YRMODA(1900,1,1). DEBUG EVALUATE/YRMODA(1,1,1) = YRMODA(1901,1,1). DEBUG EVALUATE/YRMODA(12,1,1) = YRMODA(1912,1,1). DEBUG EVALUATE/YRMODA(70,1,1) = YRMODA(1970,1,1). DEBUG EVALUATE/YRMODA(87,1,1) = YRMODA(1987,1,1). DEBUG EVALUATE/YRMODA(99,1,1) = YRMODA(1999,1,1). DEBUG EVALUATE/YRMODA(100,1,1). DEBUG EVALUATE/DATE.DMY(1,1,0) = DATE.DMY(1,1,2000). DEBUG EVALUATE/DATE.DMY(1,1,1) = DATE.DMY(1,1,2001). DEBUG EVALUATE/DATE.DMY(1,1,12) = DATE.DMY(1,1,1912). DEBUG EVALUATE/DATE.DMY(1,1,70) = DATE.DMY(1,1,1970). DEBUG EVALUATE/DATE.DMY(1,1,87) = DATE.DMY(1,1,1987). DEBUG EVALUATE/DATE.DMY(1,1,99) = DATE.DMY(1,1,1999). DEBUG EVALUATE/DATE.DMY(1,1,100). SET EPOCH 2012. DEBUG EVALUATE/YRMODA(0,1,1) = YRMODA(1900,1,1). DEBUG EVALUATE/YRMODA(1,1,1) = YRMODA(1901,1,1). DEBUG EVALUATE/YRMODA(12,1,1) = YRMODA(1912,1,1). DEBUG EVALUATE/YRMODA(70,1,1) = YRMODA(1970,1,1). DEBUG EVALUATE/YRMODA(87,1,1) = YRMODA(1987,1,1). DEBUG EVALUATE/YRMODA(99,1,1) = YRMODA(1999,1,1). DEBUG EVALUATE/YRMODA(100,1,1). DEBUG EVALUATE/DATE.DMY(1,1,0) = DATE.DMY(1,1,2100). DEBUG EVALUATE/DATE.DMY(1,1,1) = DATE.DMY(1,1,2101). DEBUG EVALUATE/DATE.DMY(1,1,12) = DATE.DMY(1,1,2012). DEBUG EVALUATE/DATE.DMY(1,1,70) = DATE.DMY(1,1,2070). DEBUG EVALUATE/DATE.DMY(1,1,87) = DATE.DMY(1,1,2087). DEBUG EVALUATE/DATE.DMY(1,1,99) = DATE.DMY(1,1,2099). DEBUG EVALUATE/DATE.DMY(1,1,100). _ATEOF { set +x $as_echo "$at_srcdir/calendar.at:105: pspp --testing-mode --error-file=- --no-output epoch.sps" at_fn_check_prepare_trace "calendar.at:105" ( $at_check_trace; pspp --testing-mode --error-file=- --no-output epoch.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "true true true true true true epoch.sps:11: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:18: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:27: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:34: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:43: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:50: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:59: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:66: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:75: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:82: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/calendar.at:105" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1 #AT_START_2 at_fn_group_banner 2 'data-in.at:295' \ "numeric input formats" " " 2 at_xfail=no ( $as_echo "2. $at_setup_line: testing $at_desc ..." $at_traceon data_in_prng { set +x $as_echo "$at_srcdir/data-in.at:298: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:298" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:298" $at_failed && at_fn_log_failure $at_traceon; } cat >num-in.pl <<'_ATEOF' #! /usr/bin/perl use POSIX; use strict; use warnings; do './my-rand.pl'; for my $number (0, 1, .5, .015625, 123) { my ($base_exp) = floor ($number ? log10 ($number) : 0); for my $offset (-3...3) { my ($exponent) = $base_exp + $offset; my ($fraction) = $number / 10**$offset; permute_zeros ($fraction, $exponent); } } sub permute_zeros { my ($fraction, $exponent) = @_; my ($frac_rep) = sprintf ("%f", $fraction); my ($leading_zeros) = length (($frac_rep =~ /^(0*)/)[0]); my ($trailing_zeros) = length (($frac_rep =~ /(\.?0*)$/)[0]); for my $i (0...$leading_zeros) { for my $j (0...$trailing_zeros) { my ($trimmed) = substr ($frac_rep, $i, length ($frac_rep) - $i - $j); next if $trimmed eq '.' || $trimmed eq ''; permute_commas ($trimmed, $exponent); } } } sub permute_commas { my ($frac_rep, $exponent) = @_; permute_dot_comma ($frac_rep, $exponent); my ($pos) = int (my_rand (length ($frac_rep) + 1)); $frac_rep = substr ($frac_rep, 0, $pos) . "," . substr ($frac_rep, $pos); permute_dot_comma ($frac_rep, $exponent); } sub permute_dot_comma { my ($frac_rep, $exponent) = @_; permute_exponent_syntax ($frac_rep, $exponent); if ($frac_rep =~ /[,.]/) { $frac_rep =~ tr/.,/,./; permute_exponent_syntax ($frac_rep, $exponent); } } sub permute_exponent_syntax { my ($frac_rep, $exponent) = @_; my (@exp_reps); if ($exponent == 0) { @exp_reps = pick ('', 'e0', 'e-0', 'e+0', '-0', '+0'); } elsif ($exponent > 0) { @exp_reps = pick ("e$exponent", "e+$exponent", "+$exponent"); } else { my ($abs_exp) = -$exponent; @exp_reps = pick ("e-$abs_exp", , "e-$abs_exp", "-$abs_exp"); } permute_sign_and_affix ($frac_rep, $_) foreach @exp_reps; } sub permute_sign_and_affix { my ($frac_rep, $exp_rep) = @_; for my $prefix (pick ('', '$'), pick ('-', '-$', '$-', '$-$'), pick ('+', '+$', '$+', '$+$')) { for my $suffix ('', '%') { permute_spaces ("$prefix$frac_rep$exp_rep$suffix"); } } } sub permute_spaces { my ($s) = @_; $s =~ s/([-+\$e%])/ $1 /g; my (@fields) = split (' ', $s); print join ('', @fields), "\n"; if ($#fields > 0) { my ($pos) = int (my_rand ($#fields)) + 1; print join ('', @fields[0...$pos - 1]); print " "; print join ('', @fields[$pos...$#fields]); print "\n"; } } sub pick { return $_[int (my_rand ($#_ + 1))]; } _ATEOF { set +x $as_echo "$at_srcdir/data-in.at:396: \$PERL num-in.pl > num-in.data" at_fn_check_prepare_dynamic "$PERL num-in.pl > num-in.data" "data-in.at:396" ( $at_check_trace; $PERL num-in.pl > num-in.data ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:396" $at_failed && at_fn_log_failure $at_traceon; } cat >num-in.sps <<'_ATEOF' SET ERRORS=NONE. SET MXERRS=10000000. SET MXWARNS=10000000. DATA LIST FILE='num-in.data' NOTABLE/ f 1-40 (f) comma 1-40 (comma) dot 1-40 (dot) dollar 1-40 (dollar) pct 1-40 (pct) e 1-40 (e). PRINT OUTFILE='num-in.out'/all (6f10.4). EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-in.at:411: pspp -O format=csv num-in.sps" at_fn_check_prepare_trace "data-in.at:411" ( $at_check_trace; pspp -O format=csv num-in.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:411" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:412: gzip -cd < \$top_srcdir/tests/data/num-in.expected.gz > expout" at_fn_check_prepare_dynamic "gzip -cd < $top_srcdir/tests/data/num-in.expected.gz > expout" "data-in.at:412" ( $at_check_trace; gzip -cd < $top_srcdir/tests/data/num-in.expected.gz > expout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:412" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:413: cat num-in.out" at_fn_check_prepare_trace "data-in.at:413" ( $at_check_trace; cat num-in.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:413" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_2 #AT_START_3 at_fn_group_banner 3 'data-in.at:418' \ "reading big numbers" " " 2 at_xfail=no ( $as_echo "3. $at_setup_line: testing $at_desc ..." $at_traceon cat >bignum.txt <<'_ATEOF' 0 0.1 0.5 0.8 0.9 0.999 1 2 3 4 5 12 123 1234 12345 123456 1234567 12345678 123456789 1234567890 19999999999 199999999999 1234567890123 19999999999999 199999999999999 1234567890123456 19999999999999999 123456789012345678 1999999999999999999 12345678901234567890 199999999999999999999 1234567890123456789012 19999999999999999999999 123456789012345678901234 1999999999999999999999999 12345678901234567890123456 199999999999999999999999999 1234567890123456789012345678 19999999999999999999999999999 123456789012345678901234567890 1999999999999999999999999999999 12345678901234567890123456789012 199999999999999999999999999999999 1234567890123456789012345678901234 19999999999999999999999999999999999 123456789012345678901234567890123456 1999999999999999999999999999999999999 12345678901234567890123456789012345678 199999999999999999999999999999999999999 1234567890123456789012345678901234567890 1999999999999999999999999999999999999999 1e40 1.1e40 1.5e40 1e41 1e50 1e100 1e150 1e200 1e250 1e300 1.79641e308 wizzah _ATEOF cat >bignum.sps <<'_ATEOF' title 'Test use of big numbers'. *** Do the portable output. data list file='bignum.txt'/BIGNUM 1-40. list. *** Do the nonportable output for fun. descriptives BIGNUM. _ATEOF { set +x $as_echo "$at_srcdir/data-in.at:495: pspp -o pspp.csv bignum.sps" at_fn_check_prepare_trace "data-in.at:495" ( $at_check_trace; pspp -o pspp.csv bignum.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:495" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_3 #AT_START_4 at_fn_group_banner 4 'data-in.at:498' \ "DATE input format" " " 2 at_xfail=no ( $as_echo "4. $at_setup_line: testing $at_desc ..." $at_traceon date_in { set +x $as_echo "$at_srcdir/data-in.at:501: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:501" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:501" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:502: \$PERL date-in.pl date d-m-y" at_fn_check_prepare_dynamic "$PERL date-in.pl date d-m-y" "data-in.at:502" ( $at_check_trace; $PERL date-in.pl date d-m-y ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:502" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:503: test -s date.sps" at_fn_check_prepare_trace "data-in.at:503" ( $at_check_trace; test -s date.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:503" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:504: test -s date.in" at_fn_check_prepare_trace "data-in.at:504" ( $at_check_trace; test -s date.in ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:504" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:505: pspp -O format=csv date.sps" at_fn_check_prepare_trace "data-in.at:505" ( $at_check_trace; pspp -O format=csv date.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:505" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:506: cat date.out" at_fn_check_prepare_trace "data-in.at:506" ( $at_check_trace; cat date.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:506" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_4 #AT_START_5 at_fn_group_banner 5 'data-in.at:710' \ "ADATE input format" " " 2 at_xfail=no ( $as_echo "5. $at_setup_line: testing $at_desc ..." $at_traceon date_in { set +x $as_echo "$at_srcdir/data-in.at:713: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:713" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:713" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:714: \$PERL date-in.pl adate m-d-y" at_fn_check_prepare_dynamic "$PERL date-in.pl adate m-d-y" "data-in.at:714" ( $at_check_trace; $PERL date-in.pl adate m-d-y ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:714" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:715: test -s adate.sps" at_fn_check_prepare_trace "data-in.at:715" ( $at_check_trace; test -s adate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:715" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:716: test -s adate.in" at_fn_check_prepare_trace "data-in.at:716" ( $at_check_trace; test -s adate.in ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:716" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:717: pspp -O format=csv adate.sps" at_fn_check_prepare_trace "data-in.at:717" ( $at_check_trace; pspp -O format=csv adate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:717" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:718: cat adate.out" at_fn_check_prepare_trace "data-in.at:718" ( $at_check_trace; cat adate.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:718" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_5 #AT_START_6 at_fn_group_banner 6 'data-in.at:922' \ "EDATE input format" " " 2 at_xfail=no ( $as_echo "6. $at_setup_line: testing $at_desc ..." $at_traceon date_in { set +x $as_echo "$at_srcdir/data-in.at:925: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:925" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:925" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:926: \$PERL date-in.pl edate d-m-y" at_fn_check_prepare_dynamic "$PERL date-in.pl edate d-m-y" "data-in.at:926" ( $at_check_trace; $PERL date-in.pl edate d-m-y ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:926" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:927: test -s edate.sps" at_fn_check_prepare_trace "data-in.at:927" ( $at_check_trace; test -s edate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:927" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:928: test -s edate.in" at_fn_check_prepare_trace "data-in.at:928" ( $at_check_trace; test -s edate.in ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:928" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:929: pspp -O format=csv edate.sps" at_fn_check_prepare_trace "data-in.at:929" ( $at_check_trace; pspp -O format=csv edate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:929" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:930: cat edate.out" at_fn_check_prepare_trace "data-in.at:930" ( $at_check_trace; cat edate.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:930" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_6 #AT_START_7 at_fn_group_banner 7 'data-in.at:1134' \ "JDATE input format" " " 2 at_xfail=no ( $as_echo "7. $at_setup_line: testing $at_desc ..." $at_traceon date_in { set +x $as_echo "$at_srcdir/data-in.at:1137: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:1137" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1137" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1138: \$PERL date-in.pl jdate j" at_fn_check_prepare_dynamic "$PERL date-in.pl jdate j" "data-in.at:1138" ( $at_check_trace; $PERL date-in.pl jdate j ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1138" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1139: test -s jdate.sps" at_fn_check_prepare_trace "data-in.at:1139" ( $at_check_trace; test -s jdate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1139" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1140: test -s jdate.in" at_fn_check_prepare_trace "data-in.at:1140" ( $at_check_trace; test -s jdate.in ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1140" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1141: pspp -O format=csv jdate.sps" at_fn_check_prepare_trace "data-in.at:1141" ( $at_check_trace; pspp -O format=csv jdate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1141" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1142: cat jdate.out" at_fn_check_prepare_trace "data-in.at:1142" ( $at_check_trace; cat jdate.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1142" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_7 #AT_START_8 at_fn_group_banner 8 'data-in.at:1346' \ "SDATE input format" " " 2 at_xfail=no ( $as_echo "8. $at_setup_line: testing $at_desc ..." $at_traceon date_in { set +x $as_echo "$at_srcdir/data-in.at:1349: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:1349" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1349" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1350: \$PERL date-in.pl sdate y-m-d" at_fn_check_prepare_dynamic "$PERL date-in.pl sdate y-m-d" "data-in.at:1350" ( $at_check_trace; $PERL date-in.pl sdate y-m-d ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1350" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1351: test -s sdate.sps" at_fn_check_prepare_trace "data-in.at:1351" ( $at_check_trace; test -s sdate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1351" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1352: test -s sdate.in" at_fn_check_prepare_trace "data-in.at:1352" ( $at_check_trace; test -s sdate.in ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1352" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1353: pspp -O format=csv sdate.sps" at_fn_check_prepare_trace "data-in.at:1353" ( $at_check_trace; pspp -O format=csv sdate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1353" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1354: cat sdate.out" at_fn_check_prepare_trace "data-in.at:1354" ( $at_check_trace; cat sdate.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1354" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_8 #AT_START_9 at_fn_group_banner 9 'data-in.at:1558' \ "QYR input format" " " 2 at_xfail=no ( $as_echo "9. $at_setup_line: testing $at_desc ..." $at_traceon date_in { set +x $as_echo "$at_srcdir/data-in.at:1561: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:1561" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1561" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1562: \$PERL date-in.pl qyr qQy" at_fn_check_prepare_dynamic "$PERL date-in.pl qyr qQy" "data-in.at:1562" ( $at_check_trace; $PERL date-in.pl qyr qQy ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1562" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1563: test -s qyr.sps" at_fn_check_prepare_trace "data-in.at:1563" ( $at_check_trace; test -s qyr.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1563" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1564: test -s qyr.in" at_fn_check_prepare_trace "data-in.at:1564" ( $at_check_trace; test -s qyr.in ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1564" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1565: pspp -O format=csv qyr.sps" at_fn_check_prepare_trace "data-in.at:1565" ( $at_check_trace; pspp -O format=csv qyr.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1565" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1566: cat qyr.out" at_fn_check_prepare_trace "data-in.at:1566" ( $at_check_trace; cat qyr.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1566" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_9 #AT_START_10 at_fn_group_banner 10 'data-in.at:1770' \ "MOYR input format" " " 2 at_xfail=no ( $as_echo "10. $at_setup_line: testing $at_desc ..." $at_traceon date_in { set +x $as_echo "$at_srcdir/data-in.at:1773: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:1773" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1773" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1774: \$PERL date-in.pl moyr m-y" at_fn_check_prepare_dynamic "$PERL date-in.pl moyr m-y" "data-in.at:1774" ( $at_check_trace; $PERL date-in.pl moyr m-y ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1774" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1775: test -s moyr.sps" at_fn_check_prepare_trace "data-in.at:1775" ( $at_check_trace; test -s moyr.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1775" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1776: test -s moyr.in" at_fn_check_prepare_trace "data-in.at:1776" ( $at_check_trace; test -s moyr.in ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1776" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1777: pspp -O format=csv moyr.sps" at_fn_check_prepare_trace "data-in.at:1777" ( $at_check_trace; pspp -O format=csv moyr.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1777" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1778: cat moyr.out" at_fn_check_prepare_trace "data-in.at:1778" ( $at_check_trace; cat moyr.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1778" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_10 #AT_START_11 at_fn_group_banner 11 'data-in.at:1982' \ "WKYR input format" " " 2 at_xfail=no ( $as_echo "11. $at_setup_line: testing $at_desc ..." $at_traceon date_in { set +x $as_echo "$at_srcdir/data-in.at:1985: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:1985" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1985" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1986: \$PERL date-in.pl wkyr wWy" at_fn_check_prepare_dynamic "$PERL date-in.pl wkyr wWy" "data-in.at:1986" ( $at_check_trace; $PERL date-in.pl wkyr wWy ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1986" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1987: test -s wkyr.sps" at_fn_check_prepare_trace "data-in.at:1987" ( $at_check_trace; test -s wkyr.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1987" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1988: test -s wkyr.in" at_fn_check_prepare_trace "data-in.at:1988" ( $at_check_trace; test -s wkyr.in ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1988" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1989: pspp -O format=csv wkyr.sps" at_fn_check_prepare_trace "data-in.at:1989" ( $at_check_trace; pspp -O format=csv wkyr.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1989" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:1990: cat wkyr.out" at_fn_check_prepare_trace "data-in.at:1990" ( $at_check_trace; cat wkyr.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:1990" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_11 #AT_START_12 at_fn_group_banner 12 'data-in.at:2194' \ "DATETIME input format" " " 2 at_xfail=no ( $as_echo "12. $at_setup_line: testing $at_desc ..." $at_traceon date_in { set +x $as_echo "$at_srcdir/data-in.at:2197: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:2197" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2197" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:2198: \$PERL date-in.pl datetime \"d-m-y +H:M\" \"d-m-y +H:M:S\"" at_fn_check_prepare_dynamic "$PERL date-in.pl datetime \"d-m-y +H:M\" \"d-m-y +H:M:S\"" "data-in.at:2198" ( $at_check_trace; $PERL date-in.pl datetime "d-m-y +H:M" "d-m-y +H:M:S" ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2198" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:2199: test -s datetime.sps" at_fn_check_prepare_trace "data-in.at:2199" ( $at_check_trace; test -s datetime.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2199" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:2200: test -s datetime.in" at_fn_check_prepare_trace "data-in.at:2200" ( $at_check_trace; test -s datetime.in ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2200" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:2201: pspp -O format=csv datetime.sps" at_fn_check_prepare_trace "data-in.at:2201" ( $at_check_trace; pspp -O format=csv datetime.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2201" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:2202: cat datetime.out" at_fn_check_prepare_trace "data-in.at:2202" ( $at_check_trace; cat datetime.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083512200.00 3083512200.00 3083547000.00 3083547000.00 3083547000.00 3083512200.00 3083547000.00 3083547000.00 3083512200.00 3083512200.00 4221545340.00 4221635460.00 4221545340.00 4221545340.00 4221635460.00 4221635460.00 4221545340.00 4221635460.00 4221545340.00 4221635460.00 5859607620.00 5859607620.00 5859515580.00 5859515580.00 5859607620.00 5859607620.00 5859607620.00 5859607620.00 5859515580.00 5859607620.00 7472644440.00 7472654760.00 7472654760.00 7472654760.00 7472654760.00 7472654760.00 7472654760.00 7472654760.00 7472644440.00 7472654760.00 8092817880.00 8092666920.00 8092817880.00 8092666920.00 8092817880.00 8092817880.00 8092666920.00 8092817880.00 8092666920.00 8092817880.00 10114302240.00 10114356960.00 10114302240.00 10114302240.00 10114302240.00 10114356960.00 10114302240.00 10114302240.00 10114302240.00 10114356960.00 10945873020.00 10945986180.00 10945986180.00 10945986180.00 10945873020.00 10945986180.00 10945986180.00 10945873020.00 10945986180.00 10945873020.00 11327628900.00 11327660700.00 11327660700.00 11327660700.00 11327660700.00 11327628900.00 11327628900.00 11327660700.00 11327660700.00 11327660700.00 11376658140.00 11376609060.00 11376658140.00 11376658140.00 11376609060.00 11376658140.00 11376609060.00 11376658140.00 11376658140.00 11376658140.00 11391418620.00 11391418620.00 11391397380.00 11391397380.00 11391418620.00 11391418620.00 11391397380.00 11391418620.00 11391418620.00 11391418620.00 12920229900.00 12920229900.00 12920229900.00 12920229900.00 12920229900.00 12920109300.00 12920229900.00 12920109300.00 12920229900.00 12920229900.00 13044508200.00 13044663000.00 13044508200.00 13044663000.00 13044508200.00 13044508200.00 13044663000.00 13044663000.00 13044663000.00 13044663000.00 11327660700.00 11327628900.00 11327628900.00 11327660700.00 11327628900.00 11327628900.00 11327628900.00 11327628900.00 11327628900.00 11327628900.00 11376609060.00 11376658140.00 11376658140.00 11376609060.00 11376658140.00 11376609060.00 11376658140.00 11376609060.00 11376658140.00 11376658140.00 11391397380.00 11391397380.00 11391418620.00 11391397380.00 11391418620.00 11391418620.00 11391418620.00 11391418620.00 11391418620.00 11391397380.00 12920229900.00 12920229900.00 12920229900.00 12920229900.00 12920229900.00 12920229900.00 12920109300.00 12920229900.00 12920229900.00 12920229900.00 13044508200.00 13044663000.00 13044508200.00 13044508200.00 13044508200.00 13044663000.00 13044663000.00 13044663000.00 13044508200.00 13044508200.00 14392420200.00 14392258200.00 14392420200.00 14392420200.00 14392420200.00 14392420200.00 14392258200.00 14392420200.00 14392420200.00 14392420200.00 16149635760.00 16149635760.00 16149635760.00 16149635760.00 16149635760.00 16149635760.00 16149635760.00 16149635760.00 16149621840.00 16149635760.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083512162.00 3083512162.00 3083512162.00 3083547038.00 3083512162.00 3083512162.00 3083547038.00 3083512162.00 3083547038.00 3083547038.00 4221635495.00 4221545305.00 4221635495.00 4221635495.00 4221635495.00 4221545305.00 4221635495.00 4221635495.00 4221635495.00 4221635495.00 5859607673.00 5859515527.00 5859607673.00 5859607673.00 5859607673.00 5859607673.00 5859515527.00 5859607673.00 5859607673.00 5859607673.00 7472654760.00 7472644440.00 7472654760.00 7472654760.00 7472654760.00 7472644440.00 7472654760.00 7472654760.00 7472644440.00 7472654760.00 8092817891.00 8092817891.00 8092666909.00 8092817891.00 8092817891.00 8092817891.00 8092817891.00 8092817891.00 8092817891.00 8092817891.00 10114302235.00 10114302235.00 10114302235.00 10114356965.00 10114356965.00 10114356965.00 10114356965.00 10114356965.00 10114356965.00 10114302235.00 10945986229.00 10945986229.00 10945872971.00 10945872971.00 10945986229.00 10945986229.00 10945872971.00 10945986229.00 10945986229.00 10945986229.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11391397328.00 11391418672.00 11391418672.00 11391418672.00 11391397328.00 11391418672.00 11391397328.00 11391418672.00 11391418672.00 11391418672.00 12920229944.00 12920229944.00 12920109256.00 12920229944.00 12920229944.00 12920109256.00 12920109256.00 12920109256.00 12920229944.00 12920109256.00 13044663057.00 13044663057.00 13044663057.00 13044508143.00 13044663057.00 13044663057.00 13044663057.00 13044508143.00 13044663057.00 13044663057.00 11327628891.00 11327628891.00 11327660709.00 11327660709.00 11327660709.00 11327628891.00 11327628891.00 11327660709.00 11327660709.00 11327628891.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376609033.00 11376658167.00 11376609033.00 11376658167.00 11376658167.00 11391418672.00 11391397328.00 11391418672.00 11391397328.00 11391397328.00 11391397328.00 11391397328.00 11391397328.00 11391397328.00 11391397328.00 12920229944.00 12920229944.00 12920229944.00 12920109256.00 12920229944.00 12920229944.00 12920229944.00 12920229944.00 12920229944.00 12920229944.00 13044663057.00 13044663057.00 13044663057.00 13044663057.00 13044508143.00 13044663057.00 13044508143.00 13044508143.00 13044663057.00 13044663057.00 14392258196.00 14392420204.00 14392420204.00 14392420204.00 14392258196.00 14392420204.00 14392420204.00 14392258196.00 14392420204.00 14392420204.00 16149635811.00 16149635811.00 16149635811.00 16149635811.00 16149635811.00 16149621789.00 16149621789.00 16149621789.00 16149635811.00 16149635811.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2202" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_12 #AT_START_13 at_fn_group_banner 13 'data-in.at:2606' \ "TIME input format" " " 2 at_xfail=no ( $as_echo "13. $at_setup_line: testing $at_desc ..." $at_traceon time_in { set +x $as_echo "$at_srcdir/data-in.at:2609: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:2609" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2609" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:2610: \$PERL time-in.pl 0 time +H:M +H:M:S" at_fn_check_prepare_dynamic "$PERL time-in.pl 0 time +H:M +H:M:S" "data-in.at:2610" ( $at_check_trace; $PERL time-in.pl 0 time +H:M +H:M:S ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2610" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:2611: test -s time.sps" at_fn_check_prepare_trace "data-in.at:2611" ( $at_check_trace; test -s time.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2611" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:2612: test -s time.data" at_fn_check_prepare_trace "data-in.at:2612" ( $at_check_trace; test -s time.data ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2612" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:2613: pspp -O format=csv time.sps" at_fn_check_prepare_trace "data-in.at:2613" ( $at_check_trace; pspp -O format=csv time.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2613" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:2614: cat time.out" at_fn_check_prepare_trace "data-in.at:2614" ( $at_check_trace; cat time.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 -103800.00 103800.00 103800.00 -103800.00 103800.00 -103800.00 103800.00 103800.00 -103800.00 103800.00 477060.00 477060.00 477060.00 477060.00 -477060.00 477060.00 477060.00 477060.00 477060.00 -477060.00 46020.00 -46020.00 -46020.00 -46020.00 46020.00 46020.00 -46020.00 46020.00 46020.00 -46020.00 264360.00 264360.00 -264360.00 -264360.00 264360.00 -264360.00 264360.00 -264360.00 -264360.00 -264360.00 161880.00 161880.00 161880.00 161880.00 161880.00 -161880.00 161880.00 161880.00 161880.00 -161880.00 1064160.00 1064160.00 1064160.00 1064160.00 1064160.00 1064160.00 -1064160.00 1064160.00 1064160.00 1064160.00 -4549380.00 4549380.00 4549380.00 4549380.00 4549380.00 4549380.00 4549380.00 -4549380.00 4549380.00 4549380.00 620700.00 -620700.00 620700.00 620700.00 -620700.00 620700.00 -620700.00 -620700.00 620700.00 620700.00 24540.00 -24540.00 24540.00 24540.00 24540.00 24540.00 24540.00 24540.00 24540.00 24540.00 -1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 48012300.00 -48012300.00 -48012300.00 48012300.00 48012300.00 48012300.00 48012300.00 48012300.00 48012300.00 48012300.00 10445400.00 -10445400.00 -10445400.00 10445400.00 10445400.00 10445400.00 -10445400.00 10445400.00 10445400.00 -10445400.00 15900.00 15900.00 -15900.00 15900.00 -15900.00 -15900.00 15900.00 15900.00 15900.00 15900.00 283740.00 -283740.00 283740.00 283740.00 283740.00 -283740.00 283740.00 283740.00 -283740.00 283740.00 442620.00 442620.00 442620.00 442620.00 442620.00 442620.00 442620.00 442620.00 442620.00 -442620.00 60300.00 60300.00 60300.00 60300.00 60300.00 -60300.00 -60300.00 60300.00 -60300.00 -60300.00 163800.00 -163800.00 -163800.00 -163800.00 163800.00 163800.00 163800.00 163800.00 -163800.00 163800.00 945000.00 -945000.00 -945000.00 -945000.00 945000.00 945000.00 945000.00 -945000.00 945000.00 945000.00 -1907760.00 1907760.00 -1907760.00 1907760.00 -1907760.00 1907760.00 1907760.00 1907760.00 1907760.00 -1907760.00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 103839.00 103838.68 -103838.70 -103838.68 103838.70 103838.68 -103839.00 103838.68 103838.70 -103839.00 477095.82 477096.00 477096.00 477095.82 477095.82 477095.82 477095.80 -477095.80 477095.82 -477095.82 -46073.00 -46073.40 46073.00 46073.40 46073.40 46073.00 -46073.00 46073.00 46073.00 46073.00 264360.69 -264360.70 264361.00 264360.70 264360.69 264360.70 264361.00 264360.70 -264361.00 264361.00 161891.00 -161891.20 -161891.00 161891.00 -161891.00 161891.20 -161891.20 -161891.20 161891.20 -161891.19 -1064166.00 1064165.98 -1064166.00 -1064166.00 -1064165.98 1064166.00 1064166.00 -1064166.00 -1064165.98 1064166.00 4549429.00 4549429.27 4549429.27 -4549429.30 4549429.00 -4549429.00 4549429.00 4549429.27 4549429.00 4549429.30 620709.00 -620709.24 620709.24 620709.24 620709.24 620709.20 -620709.24 620709.20 620709.24 620709.24 24567.90 24567.89 24567.90 24568.00 24567.90 24568.00 24568.00 -24567.90 24567.90 24568.00 1738672.56 1738673.00 -1738672.60 -1738672.56 1738673.00 1738673.00 1738673.00 1738672.60 -1738672.56 1738672.60 -48012344.10 48012344.12 -48012344.10 -48012344.00 -48012344.00 48012344.00 -48012344.00 -48012344.00 -48012344.00 48012344.00 10445457.27 10445457.00 10445457.30 10445457.00 10445457.27 10445457.00 10445457.27 10445457.00 10445457.00 -10445457.30 -15909.98 15910.00 -15910.00 15910.00 -15909.98 15910.00 -15909.98 15909.98 15910.00 15909.98 -283767.00 283767.20 283767.20 283767.00 -283767.00 283767.00 283767.24 283767.00 283767.24 283767.00 -442672.00 442672.13 442672.00 442672.13 442672.00 442672.00 442672.00 442672.00 -442672.00 442672.13 -60344.40 -60344.00 60344.00 60344.35 60344.00 60344.40 60344.40 -60344.00 60344.00 60344.40 163857.00 163857.00 163857.00 163857.00 163857.30 -163857.30 163857.30 -163857.00 -163857.00 163857.30 945004.30 945004.00 945004.27 945004.30 945004.30 945004.00 945004.30 945004.00 945004.00 945004.00 1907811.00 1907811.00 -1907811.00 1907811.18 1907811.20 1907811.00 -1907811.00 1907811.18 -1907811.00 -1907811.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:2614" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_13 #AT_START_14 at_fn_group_banner 14 'data-in.at:3018' \ "DTIME input format" " " 2 at_xfail=no ( $as_echo "14. $at_setup_line: testing $at_desc ..." $at_traceon time_in { set +x $as_echo "$at_srcdir/data-in.at:3021: \$PERL test-my-rand.pl" at_fn_check_prepare_dynamic "$PERL test-my-rand.pl" "data-in.at:3021" ( $at_check_trace; $PERL test-my-rand.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3021" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3022: \$PERL time-in.pl 2000 dtime '+D H:M' '+D H:M:S'" at_fn_check_prepare_dynamic "$PERL time-in.pl 2000 dtime '+D H:M' '+D H:M:S'" "data-in.at:3022" ( $at_check_trace; $PERL time-in.pl 2000 dtime '+D H:M' '+D H:M:S' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3022" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3023: test -s dtime.sps" at_fn_check_prepare_trace "data-in.at:3023" ( $at_check_trace; test -s dtime.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3023" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3024: test -s dtime.data" at_fn_check_prepare_trace "data-in.at:3024" ( $at_check_trace; test -s dtime.data ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3024" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3025: pspp -O format=csv dtime.sps" at_fn_check_prepare_trace "data-in.at:3025" ( $at_check_trace; pspp -O format=csv dtime.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3025" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3026: cat dtime.out" at_fn_check_prepare_trace "data-in.at:3026" ( $at_check_trace; cat dtime.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 103800.00 103800.00 -103800.00 103800.00 103800.00 -103800.00 103800.00 -103800.00 103800.00 -103800.00 477060.00 477060.00 477060.00 477060.00 477060.00 477060.00 -477060.00 -477060.00 -477060.00 477060.00 46020.00 46020.00 46020.00 46020.00 -46020.00 -46020.00 -46020.00 46020.00 46020.00 46020.00 264360.00 264360.00 -264360.00 264360.00 264360.00 264360.00 264360.00 -264360.00 -264360.00 -264360.00 -161880.00 -161880.00 161880.00 161880.00 161880.00 -161880.00 161880.00 -161880.00 161880.00 -161880.00 1064160.00 1064160.00 1064160.00 1064160.00 1064160.00 1064160.00 -1064160.00 1064160.00 1064160.00 1064160.00 -4549380.00 4549380.00 -4549380.00 -4549380.00 -4549380.00 4549380.00 4549380.00 4549380.00 4549380.00 4549380.00 -620700.00 620700.00 620700.00 -620700.00 620700.00 620700.00 620700.00 -620700.00 620700.00 620700.00 -24540.00 24540.00 24540.00 24540.00 -24540.00 24540.00 24540.00 -24540.00 24540.00 -24540.00 1738620.00 1738620.00 1738620.00 -1738620.00 -1738620.00 -1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 48012300.00 48012300.00 48012300.00 48012300.00 48012300.00 -48012300.00 -48012300.00 48012300.00 -48012300.00 -48012300.00 -10445400.00 10445400.00 -10445400.00 10445400.00 10445400.00 10445400.00 10445400.00 10445400.00 10445400.00 10445400.00 15900.00 15900.00 15900.00 15900.00 15900.00 -15900.00 15900.00 15900.00 15900.00 15900.00 -283740.00 283740.00 -283740.00 -283740.00 283740.00 283740.00 283740.00 283740.00 283740.00 -283740.00 442620.00 -442620.00 -442620.00 442620.00 442620.00 -442620.00 -442620.00 -442620.00 442620.00 442620.00 60300.00 -60300.00 60300.00 60300.00 60300.00 60300.00 60300.00 60300.00 60300.00 60300.00 163800.00 163800.00 -163800.00 163800.00 -163800.00 -163800.00 -163800.00 163800.00 163800.00 -163800.00 945000.00 945000.00 945000.00 945000.00 -945000.00 945000.00 945000.00 945000.00 945000.00 -945000.00 -1907760.00 1907760.00 1907760.00 1907760.00 -1907760.00 -1907760.00 -1907760.00 1907760.00 -1907760.00 -1907760.00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 103838.70 103838.70 103839.00 103838.68 103838.70 103839.00 103838.70 -103839.00 103839.00 103839.00 477095.80 477095.80 -477095.80 477095.82 477095.82 477095.82 -477095.82 477095.82 477096.00 -477096.00 -46073.00 46073.00 -46073.00 46073.41 46073.00 46073.40 46073.00 46073.41 46073.41 -46073.00 264360.70 264360.70 264360.69 264361.00 -264360.70 264360.69 -264360.70 264360.69 -264361.00 264360.69 161891.00 -161891.20 -161891.19 161891.19 161891.00 161891.20 161891.20 161891.00 161891.00 161891.20 -1064165.98 1064166.00 1064166.00 1064166.00 1064165.98 1064166.00 1064166.00 -1064165.98 1064165.98 -1064166.00 4549429.27 4549429.27 4549429.27 4549429.27 4549429.00 4549429.27 -4549429.27 4549429.00 4549429.27 4549429.27 -620709.00 620709.20 620709.00 -620709.20 -620709.24 -620709.00 620709.00 620709.24 -620709.24 620709.00 -24567.89 24567.90 24568.00 24567.89 24568.00 24568.00 24567.90 -24568.00 -24567.89 -24568.00 1738672.56 -1738672.56 1738672.56 -1738672.60 -1738673.00 1738672.56 1738673.00 -1738672.60 1738672.60 1738672.56 48012344.00 -48012344.12 -48012344.00 48012344.12 -48012344.12 -48012344.00 48012344.12 -48012344.00 -48012344.00 -48012344.00 -10445457.00 10445457.00 10445457.00 10445457.00 -10445457.00 -10445457.00 10445457.00 10445457.00 10445457.00 -10445457.30 -15909.98 15910.00 -15909.98 15910.00 15910.00 -15910.00 -15910.00 -15910.00 -15910.00 15909.98 -283767.24 283767.20 283767.24 283767.24 283767.00 283767.20 283767.20 283767.24 -283767.00 283767.24 442672.13 -442672.13 442672.00 442672.13 442672.10 442672.00 442672.00 -442672.10 442672.00 -442672.10 -60344.35 60344.00 60344.00 -60344.00 60344.00 60344.35 60344.00 60344.35 60344.00 60344.00 -163857.00 -163857.00 163857.32 163857.00 -163857.30 -163857.00 163857.30 163857.00 163857.00 -163857.00 -945004.00 -945004.30 945004.27 945004.27 -945004.27 -945004.27 -945004.00 -945004.27 -945004.00 945004.30 1907811.00 1907811.00 1907811.00 1907811.00 1907811.20 1907811.18 1907811.18 1907811.18 1907811.18 1907811.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3026" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_14 #AT_START_15 at_fn_group_banner 15 'data-in.at:3430' \ "binary and hexadecimal input (IB, PIB, and PIBHEX formats)" "" 2 at_xfail=no ( $as_echo "15. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/data-in.at:3431: \$PERL -e 'print pack \"n\", \$_ foreach 0...65535' > binhex-in.data" at_fn_check_prepare_dynamic "$PERL -e 'print pack \"n\", $_ foreach 0...65535' > binhex-in.data" "data-in.at:3431" ( $at_check_trace; $PERL -e 'print pack "n", $_ foreach 0...65535' > binhex-in.data ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3431" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3432: wc -c < binhex-in.data | sed 's/[ ]//g'" at_fn_check_prepare_notrace 'a shell pipeline' "data-in.at:3432" ( $at_check_trace; wc -c < binhex-in.data | sed 's/[ ]//g' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "131072 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3432" $at_failed && at_fn_log_failure $at_traceon; } cat >binhex-in.sps <<'_ATEOF' SET RIB=MSBFIRST. SET ERRORS=NONE. SET MXWARNS=10000000. SET MXERRS=10000000. FILE HANDLE data/NAME='binhex-in.data'/MODE=IMAGE/LRECL=2. DATA LIST FILE=data NOTABLE/ib 1-2 (IB) pib 1-2 (PIB) pibhex 1-2 (PIBHEX). COMPUTE x=$CASENUM - 1. PRINT OUTFILE='binhex-in.out'/x (PIBHEX4) ' ' ib pib pibhex. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-in.at:3445: gzip -cd < \$top_srcdir/tests/data/binhex-in.expected.cmp.gz | \\ \$PERL -pe \"printf ' %04X ', \$.-1\" > expout" at_fn_check_prepare_notrace 'an embedded newline' "data-in.at:3445" ( $at_check_trace; gzip -cd < $top_srcdir/tests/data/binhex-in.expected.cmp.gz | \ $PERL -pe "printf ' %04X ', $.-1" > expout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3445" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3447: pspp -O format=csv binhex-in.sps" at_fn_check_prepare_trace "data-in.at:3447" ( $at_check_trace; pspp -O format=csv binhex-in.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3447" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3448: cat binhex-in.out" at_fn_check_prepare_trace "data-in.at:3448" ( $at_check_trace; cat binhex-in.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3448" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_15 #AT_START_16 at_fn_group_banner 16 'data-in.at:3451' \ "BCD input (P and PK formats)" " " 2 at_xfail=no ( $as_echo "16. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/data-in.at:3452: \$PERL -e 'print pack \"n\", \$_ foreach 0...65535' > bcd-in.data" at_fn_check_prepare_dynamic "$PERL -e 'print pack \"n\", $_ foreach 0...65535' > bcd-in.data" "data-in.at:3452" ( $at_check_trace; $PERL -e 'print pack "n", $_ foreach 0...65535' > bcd-in.data ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3452" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3453: wc -c < bcd-in.data | sed 's/[ ]//g'" at_fn_check_prepare_notrace 'a shell pipeline' "data-in.at:3453" ( $at_check_trace; wc -c < bcd-in.data | sed 's/[ ]//g' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "131072 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3453" $at_failed && at_fn_log_failure $at_traceon; } cat >bcd-in.sps <<'_ATEOF' SET ERRORS=NONE. SET MXWARNS=10000000. SET MXERRS=10000000. FILE HANDLE data/NAME='bcd-in.data'/MODE=IMAGE/LRECL=2. DATA LIST FILE=data NOTABLE/p 1-2 (P) pk 1-2 (PK). COMPUTE x=$CASENUM - 1. PRINT OUTFILE='bcd-in.out'/x (PIBHEX4) ' ' P PK. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-in.at:3465: gzip -cd < \$top_srcdir/tests/data/bcd-in.expected.cmp.gz | \\ \$PERL -pe \"printf ' %04X ', \$.-1\" > expout" at_fn_check_prepare_notrace 'an embedded newline' "data-in.at:3465" ( $at_check_trace; gzip -cd < $top_srcdir/tests/data/bcd-in.expected.cmp.gz | \ $PERL -pe "printf ' %04X ', $.-1" > expout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3465" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3467: pspp -O format=csv bcd-in.sps" at_fn_check_prepare_trace "data-in.at:3467" ( $at_check_trace; pspp -O format=csv bcd-in.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3467" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3468: cat bcd-in.out" at_fn_check_prepare_trace "data-in.at:3468" ( $at_check_trace; cat bcd-in.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3468" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_16 #AT_START_17 at_fn_group_banner 17 'data-in.at:3471' \ "legacy input (N and Z formats)" " " 2 at_xfail=no ( $as_echo "17. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/data-in.at:3472: \$PERL -e 'print pack \"n\", \$_ foreach 0...65535' > legacy-in.data" at_fn_check_prepare_dynamic "$PERL -e 'print pack \"n\", $_ foreach 0...65535' > legacy-in.data" "data-in.at:3472" ( $at_check_trace; $PERL -e 'print pack "n", $_ foreach 0...65535' > legacy-in.data ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3472" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3473: wc -c < legacy-in.data | sed 's/[ ]//g'" at_fn_check_prepare_notrace 'a shell pipeline' "data-in.at:3473" ( $at_check_trace; wc -c < legacy-in.data | sed 's/[ ]//g' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "131072 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3473" $at_failed && at_fn_log_failure $at_traceon; } cat >legacy-in.sps <<'_ATEOF' SET ERRORS=NONE. SET MXWARNS=10000000. SET MXERRS=10000000. FILE HANDLE data/NAME='legacy-in.data'/MODE=IMAGE/LRECL=2. DATA LIST NOTABLE FILE=data/n 1-2 (N) z 1-2 (z). COMPUTE x=$CASENUM - 1. PRINT OUTFILE='legacy-in.out'/x (PIBHEX4) ' ' N Z. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-in.at:3485: gzip -cd < \$top_srcdir/tests/data/legacy-in.expected.cmp.gz | \\ \$PERL -pe \"printf ' %04X ', \$.-1\" > expout" at_fn_check_prepare_notrace 'an embedded newline' "data-in.at:3485" ( $at_check_trace; gzip -cd < $top_srcdir/tests/data/legacy-in.expected.cmp.gz | \ $PERL -pe "printf ' %04X ', $.-1" > expout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3485" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3487: pspp -O format=csv legacy-in.sps" at_fn_check_prepare_trace "data-in.at:3487" ( $at_check_trace; pspp -O format=csv legacy-in.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3487" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3488: cat legacy-in.out" at_fn_check_prepare_trace "data-in.at:3488" ( $at_check_trace; cat legacy-in.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3488" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_17 #AT_START_18 at_fn_group_banner 18 'data-in.at:3491' \ "WKDAY input format" " " 2 at_xfail=no ( $as_echo "18. $at_setup_line: testing $at_desc ..." $at_traceon cat >wkday.sps <<'_ATEOF' DATA LIST NOTABLE /wkday2 1-2 (wkday) wkday3 1-3 (wkday) wkday4 1-4 (wkday) wkday5 1-5 (wkday) wkday6 1-6 (wkday) wkday7 1-7 (wkday) wkday8 1-8 (wkday) wkday9 1-9 (wkday) wkday10 1-10 (wkday). BEGIN DATA. . monady tuseday WEDENSDAY Thurdsay fRidya SAturady sudnay sturday END DATA. FORMATS ALL (WKDAY2). PRINT OUTFILE='wkday.out'/ALL. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-in.at:3518: pspp -O format=csv wkday.sps" at_fn_check_prepare_trace "data-in.at:3518" ( $at_check_trace; pspp -O format=csv wkday.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "wkday.sps:20.1-20.2: warning: Data for variable wkday2 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.3: warning: Data for variable wkday3 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.4: warning: Data for variable wkday4 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.5: warning: Data for variable wkday5 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.6: warning: Data for variable wkday6 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.7: warning: Data for variable wkday7 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.8: warning: Data for variable wkday8 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.9: warning: Data for variable wkday9 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.10: warning: Data for variable wkday10 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3518" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3537: cat wkday.out" at_fn_check_prepare_trace "data-in.at:3537" ( $at_check_trace; cat wkday.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " . . . . . . . . . . . . . . . . . . MO MO MO MO MO MO MO MO MO TU TU TU TU TU TU TU TU TU WE WE WE WE WE WE WE WE WE TH TH TH TH TH TH TH TH TH FR FR FR FR FR FR FR FR FR SA SA SA SA SA SA SA SA SA SU SU SU SU SU SU SU SU SU . . . . . . . . . " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3537" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_18 #AT_START_19 at_fn_group_banner 19 'data-in.at:3551' \ "MONTH input format" " " 2 at_xfail=no ( $as_echo "19. $at_setup_line: testing $at_desc ..." $at_traceon cat >month.sps <<'_ATEOF' DATA LIST NOTABLE /month3 1-3 (MONTH) month4 1-4 (MONTH) month5 1-5 (MONTH) month6 1-6 (MONTH) month7 1-7 (MONTH) month8 1-8 (MONTH) month9 1-9 (MONTH) month10 1-10 (MONTH). BEGIN DATA. . i ii iii iiii iv v vi vii viii ix viiii x xi xii 0 1 2 3 4 5 6 7 8 9 10 11 12 13 january JANAURY February fEbraury MArch marhc apRIL may june july august september october november decmeber december END DATA. FORMATS ALL (MONTH3). PRINT OUTFILE='month.out'/ALL. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-in.at:3613: pspp -O format=csv month.sps" at_fn_check_prepare_trace "data-in.at:3613" ( $at_check_trace; pspp -O format=csv month.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "month.sps:15.1-15.4: warning: Data for variable month4 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.5: warning: Data for variable month5 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.6: warning: Data for variable month6 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.7: warning: Data for variable month7 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.8: warning: Data for variable month8 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.9: warning: Data for variable month9 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.10: warning: Data for variable month10 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.3: warning: Data for variable month3 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.4: warning: Data for variable month4 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.5: warning: Data for variable month5 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.6: warning: Data for variable month6 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.7: warning: Data for variable month7 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.8: warning: Data for variable month8 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.9: warning: Data for variable month9 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.10: warning: Data for variable month10 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.3: warning: Data for variable month3 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.4: warning: Data for variable month4 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.5: warning: Data for variable month5 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.6: warning: Data for variable month6 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.7: warning: Data for variable month7 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.8: warning: Data for variable month8 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.9: warning: Data for variable month9 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.10: warning: Data for variable month10 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3613" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-in.at:3660: cat month.out" at_fn_check_prepare_trace "data-in.at:3660" ( $at_check_trace; cat month.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " . . . . . . . . . . . . . . . . JAN JAN JAN JAN JAN JAN JAN JAN FEB FEB FEB FEB FEB FEB FEB FEB MAR MAR MAR MAR MAR MAR MAR MAR MAR . . . . . . . APR APR APR APR APR APR APR APR MAY MAY MAY MAY MAY MAY MAY MAY JUN JUN JUN JUN JUN JUN JUN JUN JUL JUL JUL JUL JUL JUL JUL JUL JUL AUG AUG AUG AUG AUG AUG AUG SEP SEP SEP SEP SEP SEP SEP SEP JUL AUG AUG AUG AUG AUG AUG AUG OCT OCT OCT OCT OCT OCT OCT OCT NOV NOV NOV NOV NOV NOV NOV NOV DEC DEC DEC DEC DEC DEC DEC DEC . . . . . . . . JAN JAN JAN JAN JAN JAN JAN JAN FEB FEB FEB FEB FEB FEB FEB FEB MAR MAR MAR MAR MAR MAR MAR MAR APR APR APR APR APR APR APR APR MAY MAY MAY MAY MAY MAY MAY MAY JUN JUN JUN JUN JUN JUN JUN JUN JUL JUL JUL JUL JUL JUL JUL JUL AUG AUG AUG AUG AUG AUG AUG AUG SEP SEP SEP SEP SEP SEP SEP SEP OCT OCT OCT OCT OCT OCT OCT OCT NOV NOV NOV NOV NOV NOV NOV NOV DEC DEC DEC DEC DEC DEC DEC DEC . . . . . . . . JAN JAN JAN JAN JAN JAN JAN JAN JAN JAN JAN JAN JAN JAN JAN JAN FEB FEB FEB FEB FEB FEB FEB FEB FEB FEB FEB FEB FEB FEB FEB FEB MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR APR APR APR APR APR APR APR APR MAY MAY MAY MAY MAY MAY MAY MAY JUN JUN JUN JUN JUN JUN JUN JUN JUL JUL JUL JUL JUL JUL JUL JUL AUG AUG AUG AUG AUG AUG AUG AUG SEP SEP SEP SEP SEP SEP SEP SEP OCT OCT OCT OCT OCT OCT OCT OCT NOV NOV NOV NOV NOV NOV NOV NOV DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-in.at:3660" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_19 #AT_START_20 at_fn_group_banner 20 'data-out.at:19' \ "numeric format output" " " 3 at_xfail=no ( $as_echo "20. $at_setup_line: testing $at_desc ..." $at_traceon cat >num-out.pl <<'_ATEOF' use strict; use warnings 'all'; my @values = qw(0 2 9.5 27 271 999.95 2718 9999.995 27182 271828 2718281 2**39 2**333 2**-21 -2 -9.5 -27 -271 -999.95 -2718 -9999.995 -27182 -271828 -2718281 -2**39 -2**333 -2**-21 -0 3.125 31.25 314.125 3141.5 31415.875 314159.25 3141592.625 31415926.5 271828182.25 3214567890.5 31415926535.875 -3.125 -31.375 -314.125 -3141.5 -31415.875 -314159.25 -3141592.625 -31415926.5 -271828182.25 -3214567890.5 -31415926535.875); print "SET CCA=',,,'.\n"; print "SET CCB='-,[[[,]]],-'.\n"; print "SET CCC='((,[,],))'.\n"; print "SET CCD=',XXX,,-'.\n"; print "SET CCE=',,YYY,-'.\n"; print "INPUT PROGRAM.\n"; print "STRING EXPR(A16).\n"; print map ("COMPUTE NUM=$_.\nCOMPUTE EXPR='$_'.\nEND CASE.\n", @values); print "END FILE.\n"; print "END INPUT PROGRAM.\n"; print "PRINT OUTFILE='output.txt'/EXPR.\n"; for my $format (qw (F COMMA DOT DOLLAR PCT E CCA CCB CCC CCD CCE N Z)) { for my $d (0...16) { my ($min_w); if ($format ne 'E') { $min_w = $d + 1; $min_w++ if $format eq 'DOLLAR' || $format eq 'PCT'; $min_w = 2 if $min_w == 1 && ($format =~ /^CC/); } else { $min_w = $d + 7; } for my $w ($min_w...40) { my ($f) = "$format$w.$d"; print "PRINT OUTFILE='output.txt'/'$f: \"' NUM($f) '\"'.\n"; } } print "PRINT SPACE OUTFILE='output.txt'.\n"; } print "EXECUTE.\n"; _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:63: \$PERL num-out.pl > num-out.sps" at_fn_check_prepare_dynamic "$PERL num-out.pl > num-out.sps" "data-out.at:63" ( $at_check_trace; $PERL num-out.pl > num-out.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:63" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:64: pspp -O format=csv num-out.sps" at_fn_check_prepare_trace "data-out.at:64" ( $at_check_trace; pspp -O format=csv num-out.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:64" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:65: inexactify < output.txt > output.inexact" at_fn_check_prepare_trace "data-out.at:65" ( $at_check_trace; inexactify < output.txt > output.inexact ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:65" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:66: gzip -cd < \$top_srcdir/tests/data/num-out.expected.cmp.gz > expout.cmp" at_fn_check_prepare_dynamic "gzip -cd < $top_srcdir/tests/data/num-out.expected.cmp.gz > expout.cmp" "data-out.at:66" ( $at_check_trace; gzip -cd < $top_srcdir/tests/data/num-out.expected.cmp.gz > expout.cmp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:66" $at_failed && at_fn_log_failure $at_traceon; } cat >num-out-decmp.pl <<'_ATEOF' use strict; use warnings 'all'; my (@line); while (<>) { if (my ($n) = /^\*(\d+)$/) { for (1...$n) { $line[1]++; $line[3] = " $line[3]"; print ' ', join ('', @line), "\n"; } } elsif (my ($suffix) = /^\$(.*)$/) { for my $c (split ('', $suffix)) { $line[1]++; $line[4] .= $c; print ' ', join ('', @line), "\n"; } } elsif (my ($prefix) = /^\^(.*)$/) { for my $c (split ('', $prefix)) { $line[1]++; $line[4] = "$c$line[4]"; print ' ', join ('', @line), "\n"; } } else { @line = /^([A-Z]+)(\d+)([^"]+")( *)([^%"]*)(%?")$/; print " $_"; } } _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:97: \$PERL num-out-decmp.pl < expout.cmp > expout.exact" at_fn_check_prepare_dynamic "$PERL num-out-decmp.pl < expout.cmp > expout.exact" "data-out.at:97" ( $at_check_trace; $PERL num-out-decmp.pl < expout.cmp > expout.exact ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:97" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:98: inexactify < expout.exact > expout.inexact" at_fn_check_prepare_trace "data-out.at:98" ( $at_check_trace; inexactify < expout.exact > expout.inexact ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:98" $at_failed && at_fn_log_failure $at_traceon; } cat >num-out-compare.pl <<'_ATEOF' #! /usr/bin/perl -w use strict; use warnings 'all'; use Getopt::Long; my $exact = 0; my $spss = 0; my $verbose = 0; Getopt::Long::Configure ("bundling"); GetOptions ("e|exact!" => \$exact, "s|spss!" => \$spss, "v|verbose+" => \$verbose, "h|help" => sub { usage (0) }) or usage (1); sub usage { print "$0: compare expected and actual numeric formatting output\n"; print "usage: $0 [OPTION...] EXPECTED ACTUAL\n"; print "where EXPECTED is the file containing expected output\n"; print "and ACTUAL is the file containing actual output.\n"; print "Options:\n"; print " -e, --exact: Require numbers to be exactly equal.\n"; print " (By default, small differences are permitted.)\n"; print " -s, --spss: Ignore most SPSS formatting bugs in EXPECTED.\n"; print " (A few differences are not compensated)\n"; print " -v, --verbose: Use once to summarize errors and differences.\n"; print " Use twice for details of differences.\n"; exit (@_); } open (EXPECTED, '<', $ARGV[0]) or die "$ARGV[0]: open: $!\n"; open (ACTUAL, '<', $ARGV[1]) or die "$ARGV[1]: open: $!\n"; my ($expr); my ($bad_round) = 0; my ($approximate) = 0; my ($spss_wtf1) = 0; my ($spss_wtf2) = 0; my ($lost_sign) = 0; my ($errors) = 0; while (defined (my $a = ) && defined (my $b = )) { chomp $a; chomp $b; if ($a eq $b) { if ($a !~ /^\s*$/ && $a !~ /:/) { $expr = $a; $expr =~ s/\s*$//; $expr =~ s/^\s*//; } } else { my ($fmt, $a_out) = $a =~ /^ (.*): "(.*)"$/ or die; my ($b_fmt, $b_out) = $b =~ /^ (.*): "(.*)"$/ or die; die if $fmt ne $b_fmt; die if $a_out eq $b_out; if (!$exact) { if (increment ($a_out) eq $b_out || increment ($b_out) eq $a_out) { $approximate++; next; } } if ($spss) { if ($a_out =~ /0.*0/ && $a_out !~ /[1-9]/) { $bad_round++; next; } elsif ($a_out =~ /\*/ && $a_out !~ /^\*+$/) { $spss_wtf1++; next; } elsif ($expr =~ /^-/ && $a_out =~ /^\*+$/ && $b_out =~ /-\d(\.\d*#*)?E[-+]\d\d\d/ && $fmt =~ /^E/) { $spss_wtf2++; next; } elsif ($expr =~ /^-/ && (($a_out !~ /-/ && $a_out =~ /[1-9]/ && $b_out =~ /-/) || ($a_out =~ /^[0-9]+$/ && $b_out =~ /^\*+$/))) { $lost_sign++; next; } } print "$.: $expr in $fmt: expected \"$a_out\", got \"$b_out\"\n" if $verbose > 1; $errors++; } } while () { print "Extra lines in $ARGV[0]\n"; $errors++; last; } while () { print "Extra lines in $ARGV[1]\n"; $errors++; last; } if ($verbose) { print "$errors errors\n"; if (!$exact) { print "$approximate approximate matches\n"; } if ($spss) { print "$bad_round bad rounds\n"; print "$spss_wtf1 SPSS WTF 1\n"; print "$spss_wtf2 SPSS WTF 2\n"; print "$lost_sign lost signs\n"; } } exit ($errors > 0); # Returns the argument value incremented by one unit in its final # decimal place. sub increment { local ($_) = @_; my ($last_digit, $i); for ($i = 0; $i < length $_; $i++) { my ($c) = substr ($_, $i, 1); last if ($c eq 'E'); $last_digit = $i if $c =~ /[0-9]/; } return $_ if !defined $last_digit; for ($i = $last_digit; $i >= 0; $i--) { my ($c) = substr ($_, $i, 1); if ($c eq '9') { substr ($_, $i, 1) = '0'; } elsif ($c =~ /[0-8]/) { substr ($_, $i, 1) = chr (ord ($c) + 1); last; } } $_ = "1$_" if $i < 0; return $_; } _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:234: \$PERL num-out-compare.pl \$PSPP_NUM_OUT_COMPARE_FLAGS expout.inexact output.inexact" at_fn_check_prepare_dynamic "$PERL num-out-compare.pl $PSPP_NUM_OUT_COMPARE_FLAGS expout.inexact output.inexact" "data-out.at:234" ( $at_check_trace; $PERL num-out-compare.pl $PSPP_NUM_OUT_COMPARE_FLAGS expout.inexact output.inexact ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:234" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_20 #AT_START_21 at_fn_group_banner 21 'data-out.at:237' \ "non-ASCII custom currency formats" " " 3 at_xfail=no ( $as_echo "21. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-out.sps <<'_ATEOF' SET CCA='«,¥,€,»'. SHOW CCA. DATA LIST LIST NOTABLE/x. PRINT/x (F8.2) x (CCA10.2). EXECUTE. BEGIN DATA. 1 -1 1.5 -1.5 .75 1.5e10 -1.5e10 END DATA. _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:254: pspp -O format=csv data-out.sps" at_fn_check_prepare_trace "data-out.at:254" ( $at_check_trace; pspp -O format=csv data-out.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"data-out.sps:2: note: SHOW: CCA is «,¥,€,».\" 1.00 ¥1.00€ -1.00 «¥1.00€» 1.50 ¥1.50€ -1.50 «¥1.50€» .75 ¥.75€ 1.5E+010 ¥2E+010€ -2E+010«¥2E+010€» " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:254" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_21 #AT_START_22 at_fn_group_banner 22 'data-out.at:273' \ "binary and hexadecimal output" " " 3 at_xfail=no ( $as_echo "22. $at_setup_line: testing $at_desc ..." $at_traceon cat >binhex-out.sps <<'_ATEOF' SET ERRORS=NONE. SET MXWARNS=10000000. SET WIB=MSBFIRST. DATA LIST NOTABLE/x 1-10. BEGIN DATA. 2 11 123 1234 913 3.14159 777 82 690 -2 -11 -123 -1234 -913 -3.14159 -777 -82 -690 -.1 -.5 -.9 9999.1 9999.5 9999.9 10000 18231237 -9999.1 -9999.5 -9999.9 -10000 -8231237 999.1 999.5 999.9 1000 8231237 -999.1 -999.5 -999.9 -1000 -8231237 99.1 99.5 99.9 100 821237 -99.1 -99.5 -99.9 -100 -831237 9.1 9.5 9.9 10 81237 -9.1 -9.5 -9.9 -10 -81237 1.1 -1.1 1.5 -1.5 1.9 -1.9 END DATA. FILE HANDLE output/NAME='binhex.out'/MODE=IMAGE/LRECL=256. WRITE OUTFILE=output/ x(p1.0) x(p2.0) x(p3.0) x(p4.0) /* 000 x(p2.1) x(p3.1) x(p4.1) /* 00a x(p3.2) x(p4.2) /* 013 x(p4.3) /* 01a x(pk1.0) x(pk2.0) x(pk3.0) x(pk4.0) /* 01e x(pk2.1) x(pk3.1) x(pk4.1) /* 028 x(pk3.2) x(pk4.2) /* 031 x(pk4.3) /* 038 x(ib1.0) x(ib2.0) x(ib3.0) x(ib4.0) /* 03c x(ib1.1) x(ib2.1) x(ib3.1) x(ib4.1) /* 046 x(ib1.2) x(ib2.2) x(ib3.2) x(ib4.2) /* 050 x(ib1.3) x(ib2.3) x(ib3.3) x(ib4.3) /* 05a x(ib2.4) x(ib3.4) x(ib4.4) /* 064 x(ib2.5) x(ib3.5) x(ib4.5) /* 06d x(ib3.6) x(ib4.6) /* 076 x(ib3.7) x(ib4.7) /* 07d x(ib3.8) x(ib4.8) /* 084 x(ib4.9) /* 08b x(ib4.10) /* 08f x(pib1.0) x(pib2.0) x(pib3.0) x(pib4.0) /* 093 x(pib1.1) x(pib2.1) x(pib3.1) x(pib4.1) /* 09d x(pib1.2) x(pib2.2) x(pib3.2) x(pib4.2) /* 0a7 x(pib1.3) x(pib2.3) x(pib3.3) x(pib4.3) /* 0b1 x(pib2.4) x(pib3.4) x(pib4.4) /* 0bb x(pib2.5) x(pib3.5) x(pib4.5) /* 0c4 x(pib3.6) x(pib4.6) /* 0cd x(pib3.7) x(pib4.7) /* 0d4 x(pib3.8) x(pib4.8) /* 0db x(pib4.9) /* 0e2 x(pib4.10) /* 0e6 x(pibhex2) x(pibhex4) /* 0ea x(pibhex6) x(pibhex8). /* 0f0 /* 0fe EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:386: pspp -O format=csv binhex-out.sps" at_fn_check_prepare_trace "data-out.at:386" ( $at_check_trace; pspp -O format=csv binhex-out.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:386" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:387: gzip -cd < \$top_srcdir/tests/data/binhex-out.expected.gz > expout" at_fn_check_prepare_dynamic "gzip -cd < $top_srcdir/tests/data/binhex-out.expected.gz > expout" "data-out.at:387" ( $at_check_trace; gzip -cd < $top_srcdir/tests/data/binhex-out.expected.gz > expout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:387" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:388: cat binhex.out" at_fn_check_prepare_trace "data-out.at:388" ( $at_check_trace; cat binhex.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:388" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_22 #AT_START_23 at_fn_group_banner 23 'data-out.at:391' \ "output valid dates" " " 3 at_xfail=no ( $as_echo "23. $at_setup_line: testing $at_desc ..." $at_traceon cat >date-out.sps <<'_ATEOF' set epoch=1930. data list notable /x 1-30 (datetime). begin data. 10-6-1648 0:0:0 30-6-1680 4:50:38.12301 24-7-1716 12:31:35.23453 19-6-1768 12:47:53.34505 2-8-1819 1:26:0.45615 27-3-1839 20:58:11.56677 19-4-1903 7:36:5.18964 25-8-1929 15:43:49.83132 29-9-1941 4:25:9.01293 19-4-1943 6:49:27.52375 7-10-1943 2:57:52.01565 17-3-1992 16:45:44.86529 25-2-1996 21:30:57.82047 29-9-41 4:25:9.15395 19-4-43 6:49:27.10533 7-10-43 2:57:52.48229 17-3-92 16:45:44.65827 25-2-96 21:30:57.58219 10-11-2038 22:30:4.18347 18-7-2094 1:56:51.59319 end data. print outfile='date-out.out'/x(date9) ' | ' x(date11). print outfile='date-out.out'/x(adate8) ' | ' x(adate10). print outfile='date-out.out'/x(edate8) ' | ' x(edate10). print outfile='date-out.out'/x(jdate5) ' | ' x(jdate7). print outfile='date-out.out'/x(sdate8) ' | ' x(sdate10). print outfile='date-out.out'/x(qyr6) ' | ' x(qyr8). print outfile='date-out.out'/x(moyr6) ' | ' x(moyr8). print outfile='date-out.out'/x(wkyr8) ' | ' x(wkyr10). print outfile='date-out.out'/x(datetime17). print outfile='date-out.out'/x(datetime18). print outfile='date-out.out'/x(datetime19). print outfile='date-out.out'/x(datetime20). print outfile='date-out.out'/x(datetime21). print outfile='date-out.out'/x(datetime22). print outfile='date-out.out'/x(datetime22.1). print outfile='date-out.out'/x(datetime23.2). print outfile='date-out.out'/x(datetime24.3). print outfile='date-out.out'/x(datetime25.4). print outfile='date-out.out'/x(datetime26.5). execute. _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:438: pspp -O format=csv date-out.sps" at_fn_check_prepare_trace "data-out.at:438" ( $at_check_trace; pspp -O format=csv date-out.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:438" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:439: cat date-out.out" at_fn_check_prepare_trace "data-out.at:439" ( $at_check_trace; cat date-out.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " ********* | 10-JUN-1648 ******** | 06/10/1648 ******** | 10.06.1648 ***** | 1648162 ******** | 1648/06/10 ****** | 2 Q 1648 ****** | JUN 1648 ******** | 24 WK 1648 10-JUN-1648 00:00 10-JUN-1648 00:00 10-JUN-1648 00:00 10-JUN-1648 00:00:00 10-JUN-1648 00:00:00 10-JUN-1648 00:00:00 10-JUN-1648 00:00:00.0 10-JUN-1648 00:00:00.00 10-JUN-1648 00:00:00.000 10-JUN-1648 00:00:00.0000 10-JUN-1648 00:00:00.00000 ********* | 30-JUN-1680 ******** | 06/30/1680 ******** | 30.06.1680 ***** | 1680182 ******** | 1680/06/30 ****** | 2 Q 1680 ****** | JUN 1680 ******** | 26 WK 1680 30-JUN-1680 04:50 30-JUN-1680 04:50 30-JUN-1680 04:50 30-JUN-1680 04:50:38 30-JUN-1680 04:50:38 30-JUN-1680 04:50:38 30-JUN-1680 04:50:38.1 30-JUN-1680 04:50:38.12 30-JUN-1680 04:50:38.123 30-JUN-1680 04:50:38.1230 30-JUN-1680 04:50:38.12301 ********* | 24-JUL-1716 ******** | 07/24/1716 ******** | 24.07.1716 ***** | 1716206 ******** | 1716/07/24 ****** | 3 Q 1716 ****** | JUL 1716 ******** | 30 WK 1716 24-JUL-1716 12:31 24-JUL-1716 12:31 24-JUL-1716 12:31 24-JUL-1716 12:31:35 24-JUL-1716 12:31:35 24-JUL-1716 12:31:35 24-JUL-1716 12:31:35.2 24-JUL-1716 12:31:35.23 24-JUL-1716 12:31:35.235 24-JUL-1716 12:31:35.2345 24-JUL-1716 12:31:35.23453 ********* | 19-JUN-1768 ******** | 06/19/1768 ******** | 19.06.1768 ***** | 1768171 ******** | 1768/06/19 ****** | 2 Q 1768 ****** | JUN 1768 ******** | 25 WK 1768 19-JUN-1768 12:47 19-JUN-1768 12:47 19-JUN-1768 12:47 19-JUN-1768 12:47:53 19-JUN-1768 12:47:53 19-JUN-1768 12:47:53 19-JUN-1768 12:47:53.3 19-JUN-1768 12:47:53.35 19-JUN-1768 12:47:53.345 19-JUN-1768 12:47:53.3450 19-JUN-1768 12:47:53.34505 ********* | 02-AUG-1819 ******** | 08/02/1819 ******** | 02.08.1819 ***** | 1819214 ******** | 1819/08/02 ****** | 3 Q 1819 ****** | AUG 1819 ******** | 31 WK 1819 02-AUG-1819 01:26 02-AUG-1819 01:26 02-AUG-1819 01:26 02-AUG-1819 01:26:00 02-AUG-1819 01:26:00 02-AUG-1819 01:26:00 02-AUG-1819 01:26:00.5 02-AUG-1819 01:26:00.46 02-AUG-1819 01:26:00.456 02-AUG-1819 01:26:00.4562 02-AUG-1819 01:26:00.45615 ********* | 27-MAR-1839 ******** | 03/27/1839 ******** | 27.03.1839 ***** | 1839086 ******** | 1839/03/27 ****** | 1 Q 1839 ****** | MAR 1839 ******** | 13 WK 1839 27-MAR-1839 20:58 27-MAR-1839 20:58 27-MAR-1839 20:58 27-MAR-1839 20:58:11 27-MAR-1839 20:58:11 27-MAR-1839 20:58:11 27-MAR-1839 20:58:11.6 27-MAR-1839 20:58:11.57 27-MAR-1839 20:58:11.567 27-MAR-1839 20:58:11.5668 27-MAR-1839 20:58:11.56677 ********* | 19-APR-1903 ******** | 04/19/1903 ******** | 19.04.1903 ***** | 1903109 ******** | 1903/04/19 ****** | 2 Q 1903 ****** | APR 1903 ******** | 16 WK 1903 19-APR-1903 07:36 19-APR-1903 07:36 19-APR-1903 07:36 19-APR-1903 07:36:05 19-APR-1903 07:36:05 19-APR-1903 07:36:05 19-APR-1903 07:36:05.2 19-APR-1903 07:36:05.19 19-APR-1903 07:36:05.190 19-APR-1903 07:36:05.1896 19-APR-1903 07:36:05.18964 ********* | 25-AUG-1929 ******** | 08/25/1929 ******** | 25.08.1929 ***** | 1929237 ******** | 1929/08/25 ****** | 3 Q 1929 ****** | AUG 1929 ******** | 34 WK 1929 25-AUG-1929 15:43 25-AUG-1929 15:43 25-AUG-1929 15:43 25-AUG-1929 15:43:49 25-AUG-1929 15:43:49 25-AUG-1929 15:43:49 25-AUG-1929 15:43:49.8 25-AUG-1929 15:43:49.83 25-AUG-1929 15:43:49.831 25-AUG-1929 15:43:49.8313 25-AUG-1929 15:43:49.83132 29-SEP-41 | 29-SEP-1941 09/29/41 | 09/29/1941 29.09.41 | 29.09.1941 41272 | 1941272 41/09/29 | 1941/09/29 3 Q 41 | 3 Q 1941 SEP 41 | SEP 1941 39 WK 41 | 39 WK 1941 29-SEP-1941 04:25 29-SEP-1941 04:25 29-SEP-1941 04:25 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09.0 29-SEP-1941 04:25:09.01 29-SEP-1941 04:25:09.013 29-SEP-1941 04:25:09.0129 29-SEP-1941 04:25:09.01293 19-APR-43 | 19-APR-1943 04/19/43 | 04/19/1943 19.04.43 | 19.04.1943 43109 | 1943109 43/04/19 | 1943/04/19 2 Q 43 | 2 Q 1943 APR 43 | APR 1943 16 WK 43 | 16 WK 1943 19-APR-1943 06:49 19-APR-1943 06:49 19-APR-1943 06:49 19-APR-1943 06:49:27 19-APR-1943 06:49:27 19-APR-1943 06:49:27 19-APR-1943 06:49:27.5 19-APR-1943 06:49:27.52 19-APR-1943 06:49:27.524 19-APR-1943 06:49:27.5238 19-APR-1943 06:49:27.52375 07-OCT-43 | 07-OCT-1943 10/07/43 | 10/07/1943 07.10.43 | 07.10.1943 43280 | 1943280 43/10/07 | 1943/10/07 4 Q 43 | 4 Q 1943 OCT 43 | OCT 1943 40 WK 43 | 40 WK 1943 07-OCT-1943 02:57 07-OCT-1943 02:57 07-OCT-1943 02:57 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52.0 07-OCT-1943 02:57:52.02 07-OCT-1943 02:57:52.016 07-OCT-1943 02:57:52.0156 07-OCT-1943 02:57:52.01565 17-MAR-92 | 17-MAR-1992 03/17/92 | 03/17/1992 17.03.92 | 17.03.1992 92077 | 1992077 92/03/17 | 1992/03/17 1 Q 92 | 1 Q 1992 MAR 92 | MAR 1992 11 WK 92 | 11 WK 1992 17-MAR-1992 16:45 17-MAR-1992 16:45 17-MAR-1992 16:45 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44.9 17-MAR-1992 16:45:44.87 17-MAR-1992 16:45:44.865 17-MAR-1992 16:45:44.8653 17-MAR-1992 16:45:44.86529 25-FEB-96 | 25-FEB-1996 02/25/96 | 02/25/1996 25.02.96 | 25.02.1996 96056 | 1996056 96/02/25 | 1996/02/25 1 Q 96 | 1 Q 1996 FEB 96 | FEB 1996 8 WK 96 | 8 WK 1996 25-FEB-1996 21:30 25-FEB-1996 21:30 25-FEB-1996 21:30 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57.8 25-FEB-1996 21:30:57.82 25-FEB-1996 21:30:57.820 25-FEB-1996 21:30:57.8205 25-FEB-1996 21:30:57.82047 29-SEP-41 | 29-SEP-1941 09/29/41 | 09/29/1941 29.09.41 | 29.09.1941 41272 | 1941272 41/09/29 | 1941/09/29 3 Q 41 | 3 Q 1941 SEP 41 | SEP 1941 39 WK 41 | 39 WK 1941 29-SEP-1941 04:25 29-SEP-1941 04:25 29-SEP-1941 04:25 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09.2 29-SEP-1941 04:25:09.15 29-SEP-1941 04:25:09.154 29-SEP-1941 04:25:09.1539 29-SEP-1941 04:25:09.15395 19-APR-43 | 19-APR-1943 04/19/43 | 04/19/1943 19.04.43 | 19.04.1943 43109 | 1943109 43/04/19 | 1943/04/19 2 Q 43 | 2 Q 1943 APR 43 | APR 1943 16 WK 43 | 16 WK 1943 19-APR-1943 06:49 19-APR-1943 06:49 19-APR-1943 06:49 19-APR-1943 06:49:27 19-APR-1943 06:49:27 19-APR-1943 06:49:27 19-APR-1943 06:49:27.1 19-APR-1943 06:49:27.11 19-APR-1943 06:49:27.105 19-APR-1943 06:49:27.1053 19-APR-1943 06:49:27.10533 07-OCT-43 | 07-OCT-1943 10/07/43 | 10/07/1943 07.10.43 | 07.10.1943 43280 | 1943280 43/10/07 | 1943/10/07 4 Q 43 | 4 Q 1943 OCT 43 | OCT 1943 40 WK 43 | 40 WK 1943 07-OCT-1943 02:57 07-OCT-1943 02:57 07-OCT-1943 02:57 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52.5 07-OCT-1943 02:57:52.48 07-OCT-1943 02:57:52.482 07-OCT-1943 02:57:52.4823 07-OCT-1943 02:57:52.48229 17-MAR-92 | 17-MAR-1992 03/17/92 | 03/17/1992 17.03.92 | 17.03.1992 92077 | 1992077 92/03/17 | 1992/03/17 1 Q 92 | 1 Q 1992 MAR 92 | MAR 1992 11 WK 92 | 11 WK 1992 17-MAR-1992 16:45 17-MAR-1992 16:45 17-MAR-1992 16:45 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44.7 17-MAR-1992 16:45:44.66 17-MAR-1992 16:45:44.658 17-MAR-1992 16:45:44.6583 17-MAR-1992 16:45:44.65827 25-FEB-96 | 25-FEB-1996 02/25/96 | 02/25/1996 25.02.96 | 25.02.1996 96056 | 1996056 96/02/25 | 1996/02/25 1 Q 96 | 1 Q 1996 FEB 96 | FEB 1996 8 WK 96 | 8 WK 1996 25-FEB-1996 21:30 25-FEB-1996 21:30 25-FEB-1996 21:30 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57.6 25-FEB-1996 21:30:57.58 25-FEB-1996 21:30:57.582 25-FEB-1996 21:30:57.5822 25-FEB-1996 21:30:57.58219 ********* | 10-NOV-2038 ******** | 11/10/2038 ******** | 10.11.2038 ***** | 2038314 ******** | 2038/11/10 ****** | 4 Q 2038 ****** | NOV 2038 ******** | 45 WK 2038 10-NOV-2038 22:30 10-NOV-2038 22:30 10-NOV-2038 22:30 10-NOV-2038 22:30:04 10-NOV-2038 22:30:04 10-NOV-2038 22:30:04 10-NOV-2038 22:30:04.2 10-NOV-2038 22:30:04.18 10-NOV-2038 22:30:04.183 10-NOV-2038 22:30:04.1835 10-NOV-2038 22:30:04.18347 ********* | 18-JUL-2094 ******** | 07/18/2094 ******** | 18.07.2094 ***** | 2094199 ******** | 2094/07/18 ****** | 3 Q 2094 ****** | JUL 2094 ******** | 29 WK 2094 18-JUL-2094 01:56 18-JUL-2094 01:56 18-JUL-2094 01:56 18-JUL-2094 01:56:51 18-JUL-2094 01:56:51 18-JUL-2094 01:56:51 18-JUL-2094 01:56:51.6 18-JUL-2094 01:56:51.59 18-JUL-2094 01:56:51.593 18-JUL-2094 01:56:51.5932 18-JUL-2094 01:56:51.59319 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:439" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_23 #AT_START_24 at_fn_group_banner 24 'data-out.at:823' \ "output invalid dates" " " 3 at_xfail=no ( $as_echo "24. $at_setup_line: testing $at_desc ..." $at_traceon cat >bad-date.sps <<'_ATEOF' set epoch=1930. set errors=none. data list list notable/x. begin data. 0 -1 3e11 end data. print outfile='bad-date.out'/x(date9) ' | ' x(date11). print outfile='bad-date.out'/x(adate8) ' | ' x(adate10). print outfile='bad-date.out'/x(edate8) ' | ' x(edate10). print outfile='bad-date.out'/x(jdate5) ' | ' x(jdate7). print outfile='bad-date.out'/x(sdate8) ' | ' x(sdate10). print outfile='bad-date.out'/x(qyr6) ' | ' x(qyr8). print outfile='bad-date.out'/x(moyr6) ' | ' x(moyr8). print outfile='bad-date.out'/x(wkyr8) ' | ' x(wkyr10). print outfile='bad-date.out'/x(datetime17). print outfile='bad-date.out'/x(datetime18). print outfile='bad-date.out'/x(datetime19). print outfile='bad-date.out'/x(datetime20). print outfile='bad-date.out'/x(datetime21). print outfile='bad-date.out'/x(datetime22). print outfile='bad-date.out'/x(datetime22.1). print outfile='bad-date.out'/x(datetime23.2). print outfile='bad-date.out'/x(datetime24.3). print outfile='bad-date.out'/x(datetime25.4). print outfile='bad-date.out'/x(datetime26.5). execute. _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:854: pspp -O format=csv bad-date.sps" at_fn_check_prepare_trace "data-out.at:854" ( $at_check_trace; pspp -O format=csv bad-date.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:854" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:855: cat bad-date.out" at_fn_check_prepare_trace "data-out.at:855" ( $at_check_trace; cat bad-date.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " . | . . | . . | . . | . . | . . | . . | . . | . . . . . . . . . . . . . | . . | . . | . . | . . | . . | . . | . . | . . . . . . . . . . . . ********* | *********** ******** | ********** ******** | ********** ***** | ******* ******** | ********** ****** | ******** ****** | ******** ******** | ********** 28-MAY-**** 05:20 28-MAY-**** 05:20 28-MAY-**** 05:20 28-MAY-**** 05:20:00 28-MAY-**** 05:20:00 28-MAY-**** 05:20:00 28-MAY-**** 05:20:00.0 28-MAY-**** 05:20:00.00 28-MAY-**** 05:20:00.000 28-MAY-**** 05:20:00.0000 28-MAY-**** 05:20:00.00000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:855" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_24 #AT_START_25 at_fn_group_banner 25 'data-out.at:916' \ "time output" " " 3 at_xfail=no ( $as_echo "25. $at_setup_line: testing $at_desc ..." $at_traceon cat >time-out.sps <<'_ATEOF' set epoch=1930. data list notable /x 1-30 (dtime). begin data. 0 0:0:0 0 4:50:38.12301 0 12:31:35.23453 0 12:47:53.34505 0 1:26:0.45615 0 20:58:11.56677 0 7:36:5.18964 0 15:43:49.83132 0 4:25:9.01293 0 6:49:27.52375 0 2:57:52.01565 0 16:45:44.86529 0 21:30:57.82047 0 4:25:9.15395 0 6:49:27.10533 0 2:57:52.48229 0 16:45:44.65827 0 21:30:57.58219 0 22:30:4.18347 0 1:56:51.59319 1 0:0:0 1 4:50:38.12301 1 12:31:35.23453 1 12:47:53.34505 1 1:26:0.45615 1 20:58:11.56677 1 7:36:5.18964 1 15:43:49.83132 1 4:25:9.01293 1 6:49:27.52375 1 2:57:52.01565 1 16:45:44.86529 1 21:30:57.82047 1 4:25:9.15395 1 6:49:27.10533 1 2:57:52.48229 1 16:45:44.65827 1 21:30:57.58219 1 22:30:4.18347 1 1:56:51.59319 2 0:0:0 2 4:50:38.12301 2 12:31:35.23453 2 12:47:53.34505 2 1:26:0.45615 2 20:58:11.56677 2 7:36:5.18964 2 15:43:49.83132 2 4:25:9.01293 2 6:49:27.52375 2 2:57:52.01565 2 16:45:44.86529 2 21:30:57.82047 2 4:25:9.15395 2 6:49:27.10533 2 2:57:52.48229 2 16:45:44.65827 2 21:30:57.58219 2 22:30:4.18347 2 1:56:51.59319 54 0:0:0 54 4:50:38.12301 54 12:31:35.23453 54 12:47:53.34505 54 1:26:0.45615 54 20:58:11.56677 54 7:36:5.18964 54 15:43:49.83132 54 4:25:9.01293 54 6:49:27.52375 54 2:57:52.01565 54 16:45:44.86529 54 21:30:57.82047 54 4:25:9.15395 54 6:49:27.10533 54 2:57:52.48229 54 16:45:44.65827 54 21:30:57.58219 54 22:30:4.18347 54 1:56:51.59319 681 0:0:0 681 4:50:38.12301 681 12:31:35.23453 681 12:47:53.34505 681 1:26:0.45615 681 20:58:11.56677 681 7:36:5.18964 681 15:43:49.83132 681 4:25:9.01293 681 6:49:27.52375 681 2:57:52.01565 681 16:45:44.86529 681 21:30:57.82047 681 4:25:9.15395 681 6:49:27.10533 681 2:57:52.48229 681 16:45:44.65827 681 21:30:57.58219 681 22:30:4.18347 681 1:56:51.59319 -0 0:0:0 -0 4:50:38.12301 -0 12:31:35.23453 -0 12:47:53.34505 -0 1:26:0.45615 -0 20:58:11.56677 -0 7:36:5.18964 -0 15:43:49.83132 -0 4:25:9.01293 -0 6:49:27.52375 -0 2:57:52.01565 -0 16:45:44.86529 -0 21:30:57.82047 -0 4:25:9.15395 -0 6:49:27.10533 -0 2:57:52.48229 -0 16:45:44.65827 -0 21:30:57.58219 -0 22:30:4.18347 -0 1:56:51.59319 -1 0:0:0 -1 4:50:38.12301 -1 12:31:35.23453 -1 12:47:53.34505 -1 1:26:0.45615 -1 20:58:11.56677 -1 7:36:5.18964 -1 15:43:49.83132 -1 4:25:9.01293 -1 6:49:27.52375 -1 2:57:52.01565 -1 16:45:44.86529 -1 21:30:57.82047 -1 4:25:9.15395 -1 6:49:27.10533 -1 2:57:52.48229 -1 16:45:44.65827 -1 21:30:57.58219 -1 22:30:4.18347 -1 1:56:51.59319 -2 0:0:0 -2 4:50:38.12301 -2 12:31:35.23453 -2 12:47:53.34505 -2 1:26:0.45615 -2 20:58:11.56677 -2 7:36:5.18964 -2 15:43:49.83132 -2 4:25:9.01293 -2 6:49:27.52375 -2 2:57:52.01565 -2 16:45:44.86529 -2 21:30:57.82047 -2 4:25:9.15395 -2 6:49:27.10533 -2 2:57:52.48229 -2 16:45:44.65827 -2 21:30:57.58219 -2 22:30:4.18347 -2 1:56:51.59319 -54 0:0:0 -54 4:50:38.12301 -54 12:31:35.23453 -54 12:47:53.34505 -54 1:26:0.45615 -54 20:58:11.56677 -54 7:36:5.18964 -54 15:43:49.83132 -54 4:25:9.01293 -54 6:49:27.52375 -54 2:57:52.01565 -54 16:45:44.86529 -54 21:30:57.82047 -54 4:25:9.15395 -54 6:49:27.10533 -54 2:57:52.48229 -54 16:45:44.65827 -54 21:30:57.58219 -54 22:30:4.18347 -54 1:56:51.59319 -681 0:0:0 -681 4:50:38.12301 -681 12:31:35.23453 -681 12:47:53.34505 -681 1:26:0.45615 -681 20:58:11.56677 -681 7:36:5.18964 -681 15:43:49.83132 -681 4:25:9.01293 -681 6:49:27.52375 -681 2:57:52.01565 -681 16:45:44.86529 -681 21:30:57.82047 -681 4:25:9.15395 -681 6:49:27.10533 -681 2:57:52.48229 -681 16:45:44.65827 -681 21:30:57.58219 -681 22:30:4.18347 -681 1:56:51.59319 end data. print outfile='time-out.out'/x(time5). print outfile='time-out.out'/x(time6). print outfile='time-out.out'/x(time7). print outfile='time-out.out'/x(time8). print outfile='time-out.out'/x(time9). print outfile='time-out.out'/x(time10). print outfile='time-out.out'/x(time10.1). print outfile='time-out.out'/x(time11). print outfile='time-out.out'/x(time11.1). print outfile='time-out.out'/x(time11.2). print outfile='time-out.out'/x(time12). print outfile='time-out.out'/x(time12.1). print outfile='time-out.out'/x(time12.2). print outfile='time-out.out'/x(time12.3). print outfile='time-out.out'/x(time13). print outfile='time-out.out'/x(time13.1). print outfile='time-out.out'/x(time13.2). print outfile='time-out.out'/x(time13.3). print outfile='time-out.out'/x(time13.4). print outfile='time-out.out'/x(time14). print outfile='time-out.out'/x(time14.1). print outfile='time-out.out'/x(time14.2). print outfile='time-out.out'/x(time14.3). print outfile='time-out.out'/x(time14.4). print outfile='time-out.out'/x(time14.5). print outfile='time-out.out'/x(time15). print outfile='time-out.out'/x(time15.1). print outfile='time-out.out'/x(time15.2). print outfile='time-out.out'/x(time15.3). print outfile='time-out.out'/x(time15.4). print outfile='time-out.out'/x(time15.5). print outfile='time-out.out'/x(time15.6). print outfile='time-out.out'/x(dtime8). print outfile='time-out.out'/x(dtime9). print outfile='time-out.out'/x(dtime10). print outfile='time-out.out'/x(dtime11). print outfile='time-out.out'/x(dtime12). print outfile='time-out.out'/x(dtime13). print outfile='time-out.out'/x(dtime13.1). print outfile='time-out.out'/x(dtime14). print outfile='time-out.out'/x(dtime14.1). print outfile='time-out.out'/x(dtime14.2). print outfile='time-out.out'/x(dtime15). print outfile='time-out.out'/x(dtime15.1). print outfile='time-out.out'/x(dtime15.2). print outfile='time-out.out'/x(dtime15.3). print outfile='time-out.out'/x(dtime16). print outfile='time-out.out'/x(dtime16.1). print outfile='time-out.out'/x(dtime16.2). print outfile='time-out.out'/x(dtime16.3). print outfile='time-out.out'/x(dtime16.4). print outfile='time-out.out'/x(dtime17). print outfile='time-out.out'/x(dtime17.1). print outfile='time-out.out'/x(dtime17.2). print outfile='time-out.out'/x(dtime17.3). print outfile='time-out.out'/x(dtime17.4). print outfile='time-out.out'/x(dtime17.5). print outfile='time-out.out'/x(dtime18). print outfile='time-out.out'/x(dtime18.1). print outfile='time-out.out'/x(dtime18.2). print outfile='time-out.out'/x(dtime18.3). print outfile='time-out.out'/x(dtime18.4). print outfile='time-out.out'/x(dtime18.5). print outfile='time-out.out'/x(dtime18.6). execute. _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:1188: pspp -O format=csv time-out.sps" at_fn_check_prepare_trace "data-out.at:1188" ( $at_check_trace; pspp -O format=csv time-out.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:1188" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:1189: cat time-out.out" at_fn_check_prepare_trace "data-out.at:1189" ( $at_check_trace; cat time-out.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 0:00 0:00 0:00:00 0:00:00 0:00:00 0:00:00 0:00:00.0 0:00:00 0:00:00.0 0:00:00.00 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00.00000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00.00000 0:00:00.000000 0 00:00 0 00:00 0 00:00:00 0 00:00:00 0 00:00:00 0 00:00:00 0 00:00:00.0 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00.00000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00.00000 0 00:00:00.000000 4:50 4:50 4:50:38 4:50:38 4:50:38 4:50:38 4:50:38.1 4:50:38 4:50:38.1 4:50:38.12 4:50:38 4:50:38.1 4:50:38.12 4:50:38.123 4:50:38 4:50:38.1 4:50:38.12 4:50:38.123 4:50:38.1230 4:50:38 4:50:38.1 4:50:38.12 4:50:38.123 4:50:38.1230 4:50:38.12301 4:50:38 4:50:38.1 4:50:38.12 4:50:38.123 4:50:38.1230 4:50:38.12301 4:50:38.123010 0 04:50 0 04:50 0 04:50:38 0 04:50:38 0 04:50:38 0 04:50:38 0 04:50:38.1 0 04:50:38 0 04:50:38.1 0 04:50:38.12 0 04:50:38 0 04:50:38.1 0 04:50:38.12 0 04:50:38.123 0 04:50:38 0 04:50:38.1 0 04:50:38.12 0 04:50:38.123 0 04:50:38.1230 0 04:50:38 0 04:50:38.1 0 04:50:38.12 0 04:50:38.123 0 04:50:38.1230 0 04:50:38.12301 0 04:50:38 0 04:50:38.1 0 04:50:38.12 0 04:50:38.123 0 04:50:38.1230 0 04:50:38.12301 0 04:50:38.123010 12:31 12:31 12:31 12:31:35 12:31:35 12:31:35 12:31:35.2 12:31:35 12:31:35.2 12:31:35.23 12:31:35 12:31:35.2 12:31:35.23 12:31:35.235 12:31:35 12:31:35.2 12:31:35.23 12:31:35.235 12:31:35.2345 12:31:35 12:31:35.2 12:31:35.23 12:31:35.235 12:31:35.2345 12:31:35.23453 12:31:35 12:31:35.2 12:31:35.23 12:31:35.235 12:31:35.2345 12:31:35.23453 12:31:35.234530 0 12:31 0 12:31 0 12:31:35 0 12:31:35 0 12:31:35 0 12:31:35 0 12:31:35.2 0 12:31:35 0 12:31:35.2 0 12:31:35.23 0 12:31:35 0 12:31:35.2 0 12:31:35.23 0 12:31:35.235 0 12:31:35 0 12:31:35.2 0 12:31:35.23 0 12:31:35.235 0 12:31:35.2345 0 12:31:35 0 12:31:35.2 0 12:31:35.23 0 12:31:35.235 0 12:31:35.2345 0 12:31:35.23453 0 12:31:35 0 12:31:35.2 0 12:31:35.23 0 12:31:35.235 0 12:31:35.2345 0 12:31:35.23453 0 12:31:35.234530 12:47 12:47 12:47 12:47:53 12:47:53 12:47:53 12:47:53.3 12:47:53 12:47:53.3 12:47:53.35 12:47:53 12:47:53.3 12:47:53.35 12:47:53.345 12:47:53 12:47:53.3 12:47:53.35 12:47:53.345 12:47:53.3451 12:47:53 12:47:53.3 12:47:53.35 12:47:53.345 12:47:53.3451 12:47:53.34505 12:47:53 12:47:53.3 12:47:53.35 12:47:53.345 12:47:53.3451 12:47:53.34505 12:47:53.345050 0 12:47 0 12:47 0 12:47:53 0 12:47:53 0 12:47:53 0 12:47:53 0 12:47:53.3 0 12:47:53 0 12:47:53.3 0 12:47:53.35 0 12:47:53 0 12:47:53.3 0 12:47:53.35 0 12:47:53.345 0 12:47:53 0 12:47:53.3 0 12:47:53.35 0 12:47:53.345 0 12:47:53.3451 0 12:47:53 0 12:47:53.3 0 12:47:53.35 0 12:47:53.345 0 12:47:53.3451 0 12:47:53.34505 0 12:47:53 0 12:47:53.3 0 12:47:53.35 0 12:47:53.345 0 12:47:53.3451 0 12:47:53.34505 0 12:47:53.345050 1:26 1:26 1:26:00 1:26:00 1:26:00 1:26:00 1:26:00.5 1:26:00 1:26:00.5 1:26:00.46 1:26:00 1:26:00.5 1:26:00.46 1:26:00.456 1:26:00 1:26:00.5 1:26:00.46 1:26:00.456 1:26:00.4561 1:26:00 1:26:00.5 1:26:00.46 1:26:00.456 1:26:00.4561 1:26:00.45615 1:26:00 1:26:00.5 1:26:00.46 1:26:00.456 1:26:00.4561 1:26:00.45615 1:26:00.456150 0 01:26 0 01:26 0 01:26:00 0 01:26:00 0 01:26:00 0 01:26:00 0 01:26:00.5 0 01:26:00 0 01:26:00.5 0 01:26:00.46 0 01:26:00 0 01:26:00.5 0 01:26:00.46 0 01:26:00.456 0 01:26:00 0 01:26:00.5 0 01:26:00.46 0 01:26:00.456 0 01:26:00.4561 0 01:26:00 0 01:26:00.5 0 01:26:00.46 0 01:26:00.456 0 01:26:00.4561 0 01:26:00.45615 0 01:26:00 0 01:26:00.5 0 01:26:00.46 0 01:26:00.456 0 01:26:00.4561 0 01:26:00.45615 0 01:26:00.456150 20:58 20:58 20:58 20:58:11 20:58:11 20:58:11 20:58:11.6 20:58:11 20:58:11.6 20:58:11.57 20:58:11 20:58:11.6 20:58:11.57 20:58:11.567 20:58:11 20:58:11.6 20:58:11.57 20:58:11.567 20:58:11.5668 20:58:11 20:58:11.6 20:58:11.57 20:58:11.567 20:58:11.5668 20:58:11.56677 20:58:11 20:58:11.6 20:58:11.57 20:58:11.567 20:58:11.5668 20:58:11.56677 20:58:11.566770 0 20:58 0 20:58 0 20:58:11 0 20:58:11 0 20:58:11 0 20:58:11 0 20:58:11.6 0 20:58:11 0 20:58:11.6 0 20:58:11.57 0 20:58:11 0 20:58:11.6 0 20:58:11.57 0 20:58:11.567 0 20:58:11 0 20:58:11.6 0 20:58:11.57 0 20:58:11.567 0 20:58:11.5668 0 20:58:11 0 20:58:11.6 0 20:58:11.57 0 20:58:11.567 0 20:58:11.5668 0 20:58:11.56677 0 20:58:11 0 20:58:11.6 0 20:58:11.57 0 20:58:11.567 0 20:58:11.5668 0 20:58:11.56677 0 20:58:11.566770 7:36 7:36 7:36:05 7:36:05 7:36:05 7:36:05 7:36:05.2 7:36:05 7:36:05.2 7:36:05.19 7:36:05 7:36:05.2 7:36:05.19 7:36:05.190 7:36:05 7:36:05.2 7:36:05.19 7:36:05.190 7:36:05.1896 7:36:05 7:36:05.2 7:36:05.19 7:36:05.190 7:36:05.1896 7:36:05.18964 7:36:05 7:36:05.2 7:36:05.19 7:36:05.190 7:36:05.1896 7:36:05.18964 7:36:05.189640 0 07:36 0 07:36 0 07:36:05 0 07:36:05 0 07:36:05 0 07:36:05 0 07:36:05.2 0 07:36:05 0 07:36:05.2 0 07:36:05.19 0 07:36:05 0 07:36:05.2 0 07:36:05.19 0 07:36:05.190 0 07:36:05 0 07:36:05.2 0 07:36:05.19 0 07:36:05.190 0 07:36:05.1896 0 07:36:05 0 07:36:05.2 0 07:36:05.19 0 07:36:05.190 0 07:36:05.1896 0 07:36:05.18964 0 07:36:05 0 07:36:05.2 0 07:36:05.19 0 07:36:05.190 0 07:36:05.1896 0 07:36:05.18964 0 07:36:05.189640 15:43 15:43 15:43 15:43:49 15:43:49 15:43:49 15:43:49.8 15:43:49 15:43:49.8 15:43:49.83 15:43:49 15:43:49.8 15:43:49.83 15:43:49.831 15:43:49 15:43:49.8 15:43:49.83 15:43:49.831 15:43:49.8313 15:43:49 15:43:49.8 15:43:49.83 15:43:49.831 15:43:49.8313 15:43:49.83132 15:43:49 15:43:49.8 15:43:49.83 15:43:49.831 15:43:49.8313 15:43:49.83132 15:43:49.831320 0 15:43 0 15:43 0 15:43:49 0 15:43:49 0 15:43:49 0 15:43:49 0 15:43:49.8 0 15:43:49 0 15:43:49.8 0 15:43:49.83 0 15:43:49 0 15:43:49.8 0 15:43:49.83 0 15:43:49.831 0 15:43:49 0 15:43:49.8 0 15:43:49.83 0 15:43:49.831 0 15:43:49.8313 0 15:43:49 0 15:43:49.8 0 15:43:49.83 0 15:43:49.831 0 15:43:49.8313 0 15:43:49.83132 0 15:43:49 0 15:43:49.8 0 15:43:49.83 0 15:43:49.831 0 15:43:49.8313 0 15:43:49.83132 0 15:43:49.831320 4:25 4:25 4:25:09 4:25:09 4:25:09 4:25:09 4:25:09.0 4:25:09 4:25:09.0 4:25:09.01 4:25:09 4:25:09.0 4:25:09.01 4:25:09.013 4:25:09 4:25:09.0 4:25:09.01 4:25:09.013 4:25:09.0129 4:25:09 4:25:09.0 4:25:09.01 4:25:09.013 4:25:09.0129 4:25:09.01293 4:25:09 4:25:09.0 4:25:09.01 4:25:09.013 4:25:09.0129 4:25:09.01293 4:25:09.012930 0 04:25 0 04:25 0 04:25:09 0 04:25:09 0 04:25:09 0 04:25:09 0 04:25:09.0 0 04:25:09 0 04:25:09.0 0 04:25:09.01 0 04:25:09 0 04:25:09.0 0 04:25:09.01 0 04:25:09.013 0 04:25:09 0 04:25:09.0 0 04:25:09.01 0 04:25:09.013 0 04:25:09.0129 0 04:25:09 0 04:25:09.0 0 04:25:09.01 0 04:25:09.013 0 04:25:09.0129 0 04:25:09.01293 0 04:25:09 0 04:25:09.0 0 04:25:09.01 0 04:25:09.013 0 04:25:09.0129 0 04:25:09.01293 0 04:25:09.012930 6:49 6:49 6:49:27 6:49:27 6:49:27 6:49:27 6:49:27.5 6:49:27 6:49:27.5 6:49:27.52 6:49:27 6:49:27.5 6:49:27.52 6:49:27.524 6:49:27 6:49:27.5 6:49:27.52 6:49:27.524 6:49:27.5238 6:49:27 6:49:27.5 6:49:27.52 6:49:27.524 6:49:27.5238 6:49:27.52375 6:49:27 6:49:27.5 6:49:27.52 6:49:27.524 6:49:27.5238 6:49:27.52375 6:49:27.523750 0 06:49 0 06:49 0 06:49:27 0 06:49:27 0 06:49:27 0 06:49:27 0 06:49:27.5 0 06:49:27 0 06:49:27.5 0 06:49:27.52 0 06:49:27 0 06:49:27.5 0 06:49:27.52 0 06:49:27.524 0 06:49:27 0 06:49:27.5 0 06:49:27.52 0 06:49:27.524 0 06:49:27.5238 0 06:49:27 0 06:49:27.5 0 06:49:27.52 0 06:49:27.524 0 06:49:27.5238 0 06:49:27.52375 0 06:49:27 0 06:49:27.5 0 06:49:27.52 0 06:49:27.524 0 06:49:27.5238 0 06:49:27.52375 0 06:49:27.523750 2:57 2:57 2:57:52 2:57:52 2:57:52 2:57:52 2:57:52.0 2:57:52 2:57:52.0 2:57:52.02 2:57:52 2:57:52.0 2:57:52.02 2:57:52.016 2:57:52 2:57:52.0 2:57:52.02 2:57:52.016 2:57:52.0156 2:57:52 2:57:52.0 2:57:52.02 2:57:52.016 2:57:52.0156 2:57:52.01565 2:57:52 2:57:52.0 2:57:52.02 2:57:52.016 2:57:52.0156 2:57:52.01565 2:57:52.015650 0 02:57 0 02:57 0 02:57:52 0 02:57:52 0 02:57:52 0 02:57:52 0 02:57:52.0 0 02:57:52 0 02:57:52.0 0 02:57:52.02 0 02:57:52 0 02:57:52.0 0 02:57:52.02 0 02:57:52.016 0 02:57:52 0 02:57:52.0 0 02:57:52.02 0 02:57:52.016 0 02:57:52.0156 0 02:57:52 0 02:57:52.0 0 02:57:52.02 0 02:57:52.016 0 02:57:52.0156 0 02:57:52.01565 0 02:57:52 0 02:57:52.0 0 02:57:52.02 0 02:57:52.016 0 02:57:52.0156 0 02:57:52.01565 0 02:57:52.015650 16:45 16:45 16:45 16:45:44 16:45:44 16:45:44 16:45:44.9 16:45:44 16:45:44.9 16:45:44.87 16:45:44 16:45:44.9 16:45:44.87 16:45:44.865 16:45:44 16:45:44.9 16:45:44.87 16:45:44.865 16:45:44.8653 16:45:44 16:45:44.9 16:45:44.87 16:45:44.865 16:45:44.8653 16:45:44.86529 16:45:44 16:45:44.9 16:45:44.87 16:45:44.865 16:45:44.8653 16:45:44.86529 16:45:44.865290 0 16:45 0 16:45 0 16:45:44 0 16:45:44 0 16:45:44 0 16:45:44 0 16:45:44.9 0 16:45:44 0 16:45:44.9 0 16:45:44.87 0 16:45:44 0 16:45:44.9 0 16:45:44.87 0 16:45:44.865 0 16:45:44 0 16:45:44.9 0 16:45:44.87 0 16:45:44.865 0 16:45:44.8653 0 16:45:44 0 16:45:44.9 0 16:45:44.87 0 16:45:44.865 0 16:45:44.8653 0 16:45:44.86529 0 16:45:44 0 16:45:44.9 0 16:45:44.87 0 16:45:44.865 0 16:45:44.8653 0 16:45:44.86529 0 16:45:44.865290 21:30 21:30 21:30 21:30:57 21:30:57 21:30:57 21:30:57.8 21:30:57 21:30:57.8 21:30:57.82 21:30:57 21:30:57.8 21:30:57.82 21:30:57.820 21:30:57 21:30:57.8 21:30:57.82 21:30:57.820 21:30:57.8205 21:30:57 21:30:57.8 21:30:57.82 21:30:57.820 21:30:57.8205 21:30:57.82047 21:30:57 21:30:57.8 21:30:57.82 21:30:57.820 21:30:57.8205 21:30:57.82047 21:30:57.820470 0 21:30 0 21:30 0 21:30:57 0 21:30:57 0 21:30:57 0 21:30:57 0 21:30:57.8 0 21:30:57 0 21:30:57.8 0 21:30:57.82 0 21:30:57 0 21:30:57.8 0 21:30:57.82 0 21:30:57.820 0 21:30:57 0 21:30:57.8 0 21:30:57.82 0 21:30:57.820 0 21:30:57.8205 0 21:30:57 0 21:30:57.8 0 21:30:57.82 0 21:30:57.820 0 21:30:57.8205 0 21:30:57.82047 0 21:30:57 0 21:30:57.8 0 21:30:57.82 0 21:30:57.820 0 21:30:57.8205 0 21:30:57.82047 0 21:30:57.820470 4:25 4:25 4:25:09 4:25:09 4:25:09 4:25:09 4:25:09.2 4:25:09 4:25:09.2 4:25:09.15 4:25:09 4:25:09.2 4:25:09.15 4:25:09.154 4:25:09 4:25:09.2 4:25:09.15 4:25:09.154 4:25:09.1539 4:25:09 4:25:09.2 4:25:09.15 4:25:09.154 4:25:09.1539 4:25:09.15395 4:25:09 4:25:09.2 4:25:09.15 4:25:09.154 4:25:09.1539 4:25:09.15395 4:25:09.153950 0 04:25 0 04:25 0 04:25:09 0 04:25:09 0 04:25:09 0 04:25:09 0 04:25:09.2 0 04:25:09 0 04:25:09.2 0 04:25:09.15 0 04:25:09 0 04:25:09.2 0 04:25:09.15 0 04:25:09.154 0 04:25:09 0 04:25:09.2 0 04:25:09.15 0 04:25:09.154 0 04:25:09.1539 0 04:25:09 0 04:25:09.2 0 04:25:09.15 0 04:25:09.154 0 04:25:09.1539 0 04:25:09.15395 0 04:25:09 0 04:25:09.2 0 04:25:09.15 0 04:25:09.154 0 04:25:09.1539 0 04:25:09.15395 0 04:25:09.153950 6:49 6:49 6:49:27 6:49:27 6:49:27 6:49:27 6:49:27.1 6:49:27 6:49:27.1 6:49:27.11 6:49:27 6:49:27.1 6:49:27.11 6:49:27.105 6:49:27 6:49:27.1 6:49:27.11 6:49:27.105 6:49:27.1053 6:49:27 6:49:27.1 6:49:27.11 6:49:27.105 6:49:27.1053 6:49:27.10533 6:49:27 6:49:27.1 6:49:27.11 6:49:27.105 6:49:27.1053 6:49:27.10533 6:49:27.105330 0 06:49 0 06:49 0 06:49:27 0 06:49:27 0 06:49:27 0 06:49:27 0 06:49:27.1 0 06:49:27 0 06:49:27.1 0 06:49:27.11 0 06:49:27 0 06:49:27.1 0 06:49:27.11 0 06:49:27.105 0 06:49:27 0 06:49:27.1 0 06:49:27.11 0 06:49:27.105 0 06:49:27.1053 0 06:49:27 0 06:49:27.1 0 06:49:27.11 0 06:49:27.105 0 06:49:27.1053 0 06:49:27.10533 0 06:49:27 0 06:49:27.1 0 06:49:27.11 0 06:49:27.105 0 06:49:27.1053 0 06:49:27.10533 0 06:49:27.105330 2:57 2:57 2:57:52 2:57:52 2:57:52 2:57:52 2:57:52.5 2:57:52 2:57:52.5 2:57:52.48 2:57:52 2:57:52.5 2:57:52.48 2:57:52.482 2:57:52 2:57:52.5 2:57:52.48 2:57:52.482 2:57:52.4823 2:57:52 2:57:52.5 2:57:52.48 2:57:52.482 2:57:52.4823 2:57:52.48229 2:57:52 2:57:52.5 2:57:52.48 2:57:52.482 2:57:52.4823 2:57:52.48229 2:57:52.482290 0 02:57 0 02:57 0 02:57:52 0 02:57:52 0 02:57:52 0 02:57:52 0 02:57:52.5 0 02:57:52 0 02:57:52.5 0 02:57:52.48 0 02:57:52 0 02:57:52.5 0 02:57:52.48 0 02:57:52.482 0 02:57:52 0 02:57:52.5 0 02:57:52.48 0 02:57:52.482 0 02:57:52.4823 0 02:57:52 0 02:57:52.5 0 02:57:52.48 0 02:57:52.482 0 02:57:52.4823 0 02:57:52.48229 0 02:57:52 0 02:57:52.5 0 02:57:52.48 0 02:57:52.482 0 02:57:52.4823 0 02:57:52.48229 0 02:57:52.482290 16:45 16:45 16:45 16:45:44 16:45:44 16:45:44 16:45:44.7 16:45:44 16:45:44.7 16:45:44.66 16:45:44 16:45:44.7 16:45:44.66 16:45:44.658 16:45:44 16:45:44.7 16:45:44.66 16:45:44.658 16:45:44.6583 16:45:44 16:45:44.7 16:45:44.66 16:45:44.658 16:45:44.6583 16:45:44.65827 16:45:44 16:45:44.7 16:45:44.66 16:45:44.658 16:45:44.6583 16:45:44.65827 16:45:44.658270 0 16:45 0 16:45 0 16:45:44 0 16:45:44 0 16:45:44 0 16:45:44 0 16:45:44.7 0 16:45:44 0 16:45:44.7 0 16:45:44.66 0 16:45:44 0 16:45:44.7 0 16:45:44.66 0 16:45:44.658 0 16:45:44 0 16:45:44.7 0 16:45:44.66 0 16:45:44.658 0 16:45:44.6583 0 16:45:44 0 16:45:44.7 0 16:45:44.66 0 16:45:44.658 0 16:45:44.6583 0 16:45:44.65827 0 16:45:44 0 16:45:44.7 0 16:45:44.66 0 16:45:44.658 0 16:45:44.6583 0 16:45:44.65827 0 16:45:44.658270 21:30 21:30 21:30 21:30:57 21:30:57 21:30:57 21:30:57.6 21:30:57 21:30:57.6 21:30:57.58 21:30:57 21:30:57.6 21:30:57.58 21:30:57.582 21:30:57 21:30:57.6 21:30:57.58 21:30:57.582 21:30:57.5822 21:30:57 21:30:57.6 21:30:57.58 21:30:57.582 21:30:57.5822 21:30:57.58219 21:30:57 21:30:57.6 21:30:57.58 21:30:57.582 21:30:57.5822 21:30:57.58219 21:30:57.582190 0 21:30 0 21:30 0 21:30:57 0 21:30:57 0 21:30:57 0 21:30:57 0 21:30:57.6 0 21:30:57 0 21:30:57.6 0 21:30:57.58 0 21:30:57 0 21:30:57.6 0 21:30:57.58 0 21:30:57.582 0 21:30:57 0 21:30:57.6 0 21:30:57.58 0 21:30:57.582 0 21:30:57.5822 0 21:30:57 0 21:30:57.6 0 21:30:57.58 0 21:30:57.582 0 21:30:57.5822 0 21:30:57.58219 0 21:30:57 0 21:30:57.6 0 21:30:57.58 0 21:30:57.582 0 21:30:57.5822 0 21:30:57.58219 0 21:30:57.582190 22:30 22:30 22:30 22:30:04 22:30:04 22:30:04 22:30:04.2 22:30:04 22:30:04.2 22:30:04.18 22:30:04 22:30:04.2 22:30:04.18 22:30:04.183 22:30:04 22:30:04.2 22:30:04.18 22:30:04.183 22:30:04.1835 22:30:04 22:30:04.2 22:30:04.18 22:30:04.183 22:30:04.1835 22:30:04.18347 22:30:04 22:30:04.2 22:30:04.18 22:30:04.183 22:30:04.1835 22:30:04.18347 22:30:04.183470 0 22:30 0 22:30 0 22:30:04 0 22:30:04 0 22:30:04 0 22:30:04 0 22:30:04.2 0 22:30:04 0 22:30:04.2 0 22:30:04.18 0 22:30:04 0 22:30:04.2 0 22:30:04.18 0 22:30:04.183 0 22:30:04 0 22:30:04.2 0 22:30:04.18 0 22:30:04.183 0 22:30:04.1835 0 22:30:04 0 22:30:04.2 0 22:30:04.18 0 22:30:04.183 0 22:30:04.1835 0 22:30:04.18347 0 22:30:04 0 22:30:04.2 0 22:30:04.18 0 22:30:04.183 0 22:30:04.1835 0 22:30:04.18347 0 22:30:04.183470 1:56 1:56 1:56:51 1:56:51 1:56:51 1:56:51 1:56:51.6 1:56:51 1:56:51.6 1:56:51.59 1:56:51 1:56:51.6 1:56:51.59 1:56:51.593 1:56:51 1:56:51.6 1:56:51.59 1:56:51.593 1:56:51.5932 1:56:51 1:56:51.6 1:56:51.59 1:56:51.593 1:56:51.5932 1:56:51.59319 1:56:51 1:56:51.6 1:56:51.59 1:56:51.593 1:56:51.5932 1:56:51.59319 1:56:51.593190 0 01:56 0 01:56 0 01:56:51 0 01:56:51 0 01:56:51 0 01:56:51 0 01:56:51.6 0 01:56:51 0 01:56:51.6 0 01:56:51.59 0 01:56:51 0 01:56:51.6 0 01:56:51.59 0 01:56:51.593 0 01:56:51 0 01:56:51.6 0 01:56:51.59 0 01:56:51.593 0 01:56:51.5932 0 01:56:51 0 01:56:51.6 0 01:56:51.59 0 01:56:51.593 0 01:56:51.5932 0 01:56:51.59319 0 01:56:51 0 01:56:51.6 0 01:56:51.59 0 01:56:51.593 0 01:56:51.5932 0 01:56:51.59319 0 01:56:51.593190 24:00 24:00 24:00 24:00:00 24:00:00 24:00:00 24:00:00.0 24:00:00 24:00:00.0 24:00:00.00 24:00:00 24:00:00.0 24:00:00.00 24:00:00.000 24:00:00 24:00:00.0 24:00:00.00 24:00:00.000 24:00:00.0000 24:00:00 24:00:00.0 24:00:00.00 24:00:00.000 24:00:00.0000 24:00:00.00000 24:00:00 24:00:00.0 24:00:00.00 24:00:00.000 24:00:00.0000 24:00:00.00000 24:00:00.000000 1 00:00 1 00:00 1 00:00:00 1 00:00:00 1 00:00:00 1 00:00:00 1 00:00:00.0 1 00:00:00 1 00:00:00.0 1 00:00:00.00 1 00:00:00 1 00:00:00.0 1 00:00:00.00 1 00:00:00.000 1 00:00:00 1 00:00:00.0 1 00:00:00.00 1 00:00:00.000 1 00:00:00.0000 1 00:00:00 1 00:00:00.0 1 00:00:00.00 1 00:00:00.000 1 00:00:00.0000 1 00:00:00.00000 1 00:00:00 1 00:00:00.0 1 00:00:00.00 1 00:00:00.000 1 00:00:00.0000 1 00:00:00.00000 1 00:00:00.000000 28:50 28:50 28:50 28:50:38 28:50:38 28:50:38 28:50:38.1 28:50:38 28:50:38.1 28:50:38.12 28:50:38 28:50:38.1 28:50:38.12 28:50:38.123 28:50:38 28:50:38.1 28:50:38.12 28:50:38.123 28:50:38.1230 28:50:38 28:50:38.1 28:50:38.12 28:50:38.123 28:50:38.1230 28:50:38.12301 28:50:38 28:50:38.1 28:50:38.12 28:50:38.123 28:50:38.1230 28:50:38.12301 28:50:38.123010 1 04:50 1 04:50 1 04:50:38 1 04:50:38 1 04:50:38 1 04:50:38 1 04:50:38.1 1 04:50:38 1 04:50:38.1 1 04:50:38.12 1 04:50:38 1 04:50:38.1 1 04:50:38.12 1 04:50:38.123 1 04:50:38 1 04:50:38.1 1 04:50:38.12 1 04:50:38.123 1 04:50:38.1230 1 04:50:38 1 04:50:38.1 1 04:50:38.12 1 04:50:38.123 1 04:50:38.1230 1 04:50:38.12301 1 04:50:38 1 04:50:38.1 1 04:50:38.12 1 04:50:38.123 1 04:50:38.1230 1 04:50:38.12301 1 04:50:38.123010 36:31 36:31 36:31 36:31:35 36:31:35 36:31:35 36:31:35.2 36:31:35 36:31:35.2 36:31:35.23 36:31:35 36:31:35.2 36:31:35.23 36:31:35.235 36:31:35 36:31:35.2 36:31:35.23 36:31:35.235 36:31:35.2345 36:31:35 36:31:35.2 36:31:35.23 36:31:35.235 36:31:35.2345 36:31:35.23453 36:31:35 36:31:35.2 36:31:35.23 36:31:35.235 36:31:35.2345 36:31:35.23453 36:31:35.234530 1 12:31 1 12:31 1 12:31:35 1 12:31:35 1 12:31:35 1 12:31:35 1 12:31:35.2 1 12:31:35 1 12:31:35.2 1 12:31:35.23 1 12:31:35 1 12:31:35.2 1 12:31:35.23 1 12:31:35.235 1 12:31:35 1 12:31:35.2 1 12:31:35.23 1 12:31:35.235 1 12:31:35.2345 1 12:31:35 1 12:31:35.2 1 12:31:35.23 1 12:31:35.235 1 12:31:35.2345 1 12:31:35.23453 1 12:31:35 1 12:31:35.2 1 12:31:35.23 1 12:31:35.235 1 12:31:35.2345 1 12:31:35.23453 1 12:31:35.234530 36:47 36:47 36:47 36:47:53 36:47:53 36:47:53 36:47:53.3 36:47:53 36:47:53.3 36:47:53.35 36:47:53 36:47:53.3 36:47:53.35 36:47:53.345 36:47:53 36:47:53.3 36:47:53.35 36:47:53.345 36:47:53.3451 36:47:53 36:47:53.3 36:47:53.35 36:47:53.345 36:47:53.3451 36:47:53.34505 36:47:53 36:47:53.3 36:47:53.35 36:47:53.345 36:47:53.3451 36:47:53.34505 36:47:53.345050 1 12:47 1 12:47 1 12:47:53 1 12:47:53 1 12:47:53 1 12:47:53 1 12:47:53.3 1 12:47:53 1 12:47:53.3 1 12:47:53.35 1 12:47:53 1 12:47:53.3 1 12:47:53.35 1 12:47:53.345 1 12:47:53 1 12:47:53.3 1 12:47:53.35 1 12:47:53.345 1 12:47:53.3451 1 12:47:53 1 12:47:53.3 1 12:47:53.35 1 12:47:53.345 1 12:47:53.3451 1 12:47:53.34505 1 12:47:53 1 12:47:53.3 1 12:47:53.35 1 12:47:53.345 1 12:47:53.3451 1 12:47:53.34505 1 12:47:53.345050 25:26 25:26 25:26 25:26:00 25:26:00 25:26:00 25:26:00.5 25:26:00 25:26:00.5 25:26:00.46 25:26:00 25:26:00.5 25:26:00.46 25:26:00.456 25:26:00 25:26:00.5 25:26:00.46 25:26:00.456 25:26:00.4561 25:26:00 25:26:00.5 25:26:00.46 25:26:00.456 25:26:00.4561 25:26:00.45615 25:26:00 25:26:00.5 25:26:00.46 25:26:00.456 25:26:00.4561 25:26:00.45615 25:26:00.456150 1 01:26 1 01:26 1 01:26:00 1 01:26:00 1 01:26:00 1 01:26:00 1 01:26:00.5 1 01:26:00 1 01:26:00.5 1 01:26:00.46 1 01:26:00 1 01:26:00.5 1 01:26:00.46 1 01:26:00.456 1 01:26:00 1 01:26:00.5 1 01:26:00.46 1 01:26:00.456 1 01:26:00.4561 1 01:26:00 1 01:26:00.5 1 01:26:00.46 1 01:26:00.456 1 01:26:00.4561 1 01:26:00.45615 1 01:26:00 1 01:26:00.5 1 01:26:00.46 1 01:26:00.456 1 01:26:00.4561 1 01:26:00.45615 1 01:26:00.456150 44:58 44:58 44:58 44:58:11 44:58:11 44:58:11 44:58:11.6 44:58:11 44:58:11.6 44:58:11.57 44:58:11 44:58:11.6 44:58:11.57 44:58:11.567 44:58:11 44:58:11.6 44:58:11.57 44:58:11.567 44:58:11.5668 44:58:11 44:58:11.6 44:58:11.57 44:58:11.567 44:58:11.5668 44:58:11.56677 44:58:11 44:58:11.6 44:58:11.57 44:58:11.567 44:58:11.5668 44:58:11.56677 44:58:11.566770 1 20:58 1 20:58 1 20:58:11 1 20:58:11 1 20:58:11 1 20:58:11 1 20:58:11.6 1 20:58:11 1 20:58:11.6 1 20:58:11.57 1 20:58:11 1 20:58:11.6 1 20:58:11.57 1 20:58:11.567 1 20:58:11 1 20:58:11.6 1 20:58:11.57 1 20:58:11.567 1 20:58:11.5668 1 20:58:11 1 20:58:11.6 1 20:58:11.57 1 20:58:11.567 1 20:58:11.5668 1 20:58:11.56677 1 20:58:11 1 20:58:11.6 1 20:58:11.57 1 20:58:11.567 1 20:58:11.5668 1 20:58:11.56677 1 20:58:11.566770 31:36 31:36 31:36 31:36:05 31:36:05 31:36:05 31:36:05.2 31:36:05 31:36:05.2 31:36:05.19 31:36:05 31:36:05.2 31:36:05.19 31:36:05.190 31:36:05 31:36:05.2 31:36:05.19 31:36:05.190 31:36:05.1896 31:36:05 31:36:05.2 31:36:05.19 31:36:05.190 31:36:05.1896 31:36:05.18964 31:36:05 31:36:05.2 31:36:05.19 31:36:05.190 31:36:05.1896 31:36:05.18964 31:36:05.189640 1 07:36 1 07:36 1 07:36:05 1 07:36:05 1 07:36:05 1 07:36:05 1 07:36:05.2 1 07:36:05 1 07:36:05.2 1 07:36:05.19 1 07:36:05 1 07:36:05.2 1 07:36:05.19 1 07:36:05.190 1 07:36:05 1 07:36:05.2 1 07:36:05.19 1 07:36:05.190 1 07:36:05.1896 1 07:36:05 1 07:36:05.2 1 07:36:05.19 1 07:36:05.190 1 07:36:05.1896 1 07:36:05.18964 1 07:36:05 1 07:36:05.2 1 07:36:05.19 1 07:36:05.190 1 07:36:05.1896 1 07:36:05.18964 1 07:36:05.189640 39:43 39:43 39:43 39:43:49 39:43:49 39:43:49 39:43:49.8 39:43:49 39:43:49.8 39:43:49.83 39:43:49 39:43:49.8 39:43:49.83 39:43:49.831 39:43:49 39:43:49.8 39:43:49.83 39:43:49.831 39:43:49.8313 39:43:49 39:43:49.8 39:43:49.83 39:43:49.831 39:43:49.8313 39:43:49.83132 39:43:49 39:43:49.8 39:43:49.83 39:43:49.831 39:43:49.8313 39:43:49.83132 39:43:49.831320 1 15:43 1 15:43 1 15:43:49 1 15:43:49 1 15:43:49 1 15:43:49 1 15:43:49.8 1 15:43:49 1 15:43:49.8 1 15:43:49.83 1 15:43:49 1 15:43:49.8 1 15:43:49.83 1 15:43:49.831 1 15:43:49 1 15:43:49.8 1 15:43:49.83 1 15:43:49.831 1 15:43:49.8313 1 15:43:49 1 15:43:49.8 1 15:43:49.83 1 15:43:49.831 1 15:43:49.8313 1 15:43:49.83132 1 15:43:49 1 15:43:49.8 1 15:43:49.83 1 15:43:49.831 1 15:43:49.8313 1 15:43:49.83132 1 15:43:49.831320 28:25 28:25 28:25 28:25:09 28:25:09 28:25:09 28:25:09.0 28:25:09 28:25:09.0 28:25:09.01 28:25:09 28:25:09.0 28:25:09.01 28:25:09.013 28:25:09 28:25:09.0 28:25:09.01 28:25:09.013 28:25:09.0129 28:25:09 28:25:09.0 28:25:09.01 28:25:09.013 28:25:09.0129 28:25:09.01293 28:25:09 28:25:09.0 28:25:09.01 28:25:09.013 28:25:09.0129 28:25:09.01293 28:25:09.012930 1 04:25 1 04:25 1 04:25:09 1 04:25:09 1 04:25:09 1 04:25:09 1 04:25:09.0 1 04:25:09 1 04:25:09.0 1 04:25:09.01 1 04:25:09 1 04:25:09.0 1 04:25:09.01 1 04:25:09.013 1 04:25:09 1 04:25:09.0 1 04:25:09.01 1 04:25:09.013 1 04:25:09.0129 1 04:25:09 1 04:25:09.0 1 04:25:09.01 1 04:25:09.013 1 04:25:09.0129 1 04:25:09.01293 1 04:25:09 1 04:25:09.0 1 04:25:09.01 1 04:25:09.013 1 04:25:09.0129 1 04:25:09.01293 1 04:25:09.012930 30:49 30:49 30:49 30:49:27 30:49:27 30:49:27 30:49:27.5 30:49:27 30:49:27.5 30:49:27.52 30:49:27 30:49:27.5 30:49:27.52 30:49:27.524 30:49:27 30:49:27.5 30:49:27.52 30:49:27.524 30:49:27.5237 30:49:27 30:49:27.5 30:49:27.52 30:49:27.524 30:49:27.5237 30:49:27.52375 30:49:27 30:49:27.5 30:49:27.52 30:49:27.524 30:49:27.5237 30:49:27.52375 30:49:27.523750 1 06:49 1 06:49 1 06:49:27 1 06:49:27 1 06:49:27 1 06:49:27 1 06:49:27.5 1 06:49:27 1 06:49:27.5 1 06:49:27.52 1 06:49:27 1 06:49:27.5 1 06:49:27.52 1 06:49:27.524 1 06:49:27 1 06:49:27.5 1 06:49:27.52 1 06:49:27.524 1 06:49:27.5237 1 06:49:27 1 06:49:27.5 1 06:49:27.52 1 06:49:27.524 1 06:49:27.5237 1 06:49:27.52375 1 06:49:27 1 06:49:27.5 1 06:49:27.52 1 06:49:27.524 1 06:49:27.5237 1 06:49:27.52375 1 06:49:27.523750 26:57 26:57 26:57 26:57:52 26:57:52 26:57:52 26:57:52.0 26:57:52 26:57:52.0 26:57:52.02 26:57:52 26:57:52.0 26:57:52.02 26:57:52.016 26:57:52 26:57:52.0 26:57:52.02 26:57:52.016 26:57:52.0157 26:57:52 26:57:52.0 26:57:52.02 26:57:52.016 26:57:52.0157 26:57:52.01565 26:57:52 26:57:52.0 26:57:52.02 26:57:52.016 26:57:52.0157 26:57:52.01565 26:57:52.015650 1 02:57 1 02:57 1 02:57:52 1 02:57:52 1 02:57:52 1 02:57:52 1 02:57:52.0 1 02:57:52 1 02:57:52.0 1 02:57:52.02 1 02:57:52 1 02:57:52.0 1 02:57:52.02 1 02:57:52.016 1 02:57:52 1 02:57:52.0 1 02:57:52.02 1 02:57:52.016 1 02:57:52.0157 1 02:57:52 1 02:57:52.0 1 02:57:52.02 1 02:57:52.016 1 02:57:52.0157 1 02:57:52.01565 1 02:57:52 1 02:57:52.0 1 02:57:52.02 1 02:57:52.016 1 02:57:52.0157 1 02:57:52.01565 1 02:57:52.015650 40:45 40:45 40:45 40:45:44 40:45:44 40:45:44 40:45:44.9 40:45:44 40:45:44.9 40:45:44.87 40:45:44 40:45:44.9 40:45:44.87 40:45:44.865 40:45:44 40:45:44.9 40:45:44.87 40:45:44.865 40:45:44.8653 40:45:44 40:45:44.9 40:45:44.87 40:45:44.865 40:45:44.8653 40:45:44.86529 40:45:44 40:45:44.9 40:45:44.87 40:45:44.865 40:45:44.8653 40:45:44.86529 40:45:44.865290 1 16:45 1 16:45 1 16:45:44 1 16:45:44 1 16:45:44 1 16:45:44 1 16:45:44.9 1 16:45:44 1 16:45:44.9 1 16:45:44.87 1 16:45:44 1 16:45:44.9 1 16:45:44.87 1 16:45:44.865 1 16:45:44 1 16:45:44.9 1 16:45:44.87 1 16:45:44.865 1 16:45:44.8653 1 16:45:44 1 16:45:44.9 1 16:45:44.87 1 16:45:44.865 1 16:45:44.8653 1 16:45:44.86529 1 16:45:44 1 16:45:44.9 1 16:45:44.87 1 16:45:44.865 1 16:45:44.8653 1 16:45:44.86529 1 16:45:44.865290 45:30 45:30 45:30 45:30:57 45:30:57 45:30:57 45:30:57.8 45:30:57 45:30:57.8 45:30:57.82 45:30:57 45:30:57.8 45:30:57.82 45:30:57.820 45:30:57 45:30:57.8 45:30:57.82 45:30:57.820 45:30:57.8205 45:30:57 45:30:57.8 45:30:57.82 45:30:57.820 45:30:57.8205 45:30:57.82047 45:30:57 45:30:57.8 45:30:57.82 45:30:57.820 45:30:57.8205 45:30:57.82047 45:30:57.820470 1 21:30 1 21:30 1 21:30:57 1 21:30:57 1 21:30:57 1 21:30:57 1 21:30:57.8 1 21:30:57 1 21:30:57.8 1 21:30:57.82 1 21:30:57 1 21:30:57.8 1 21:30:57.82 1 21:30:57.820 1 21:30:57 1 21:30:57.8 1 21:30:57.82 1 21:30:57.820 1 21:30:57.8205 1 21:30:57 1 21:30:57.8 1 21:30:57.82 1 21:30:57.820 1 21:30:57.8205 1 21:30:57.82047 1 21:30:57 1 21:30:57.8 1 21:30:57.82 1 21:30:57.820 1 21:30:57.8205 1 21:30:57.82047 1 21:30:57.820470 28:25 28:25 28:25 28:25:09 28:25:09 28:25:09 28:25:09.2 28:25:09 28:25:09.2 28:25:09.15 28:25:09 28:25:09.2 28:25:09.15 28:25:09.154 28:25:09 28:25:09.2 28:25:09.15 28:25:09.154 28:25:09.1540 28:25:09 28:25:09.2 28:25:09.15 28:25:09.154 28:25:09.1540 28:25:09.15395 28:25:09 28:25:09.2 28:25:09.15 28:25:09.154 28:25:09.1540 28:25:09.15395 28:25:09.153950 1 04:25 1 04:25 1 04:25:09 1 04:25:09 1 04:25:09 1 04:25:09 1 04:25:09.2 1 04:25:09 1 04:25:09.2 1 04:25:09.15 1 04:25:09 1 04:25:09.2 1 04:25:09.15 1 04:25:09.154 1 04:25:09 1 04:25:09.2 1 04:25:09.15 1 04:25:09.154 1 04:25:09.1540 1 04:25:09 1 04:25:09.2 1 04:25:09.15 1 04:25:09.154 1 04:25:09.1540 1 04:25:09.15395 1 04:25:09 1 04:25:09.2 1 04:25:09.15 1 04:25:09.154 1 04:25:09.1540 1 04:25:09.15395 1 04:25:09.153950 30:49 30:49 30:49 30:49:27 30:49:27 30:49:27 30:49:27.1 30:49:27 30:49:27.1 30:49:27.11 30:49:27 30:49:27.1 30:49:27.11 30:49:27.105 30:49:27 30:49:27.1 30:49:27.11 30:49:27.105 30:49:27.1053 30:49:27 30:49:27.1 30:49:27.11 30:49:27.105 30:49:27.1053 30:49:27.10533 30:49:27 30:49:27.1 30:49:27.11 30:49:27.105 30:49:27.1053 30:49:27.10533 30:49:27.105330 1 06:49 1 06:49 1 06:49:27 1 06:49:27 1 06:49:27 1 06:49:27 1 06:49:27.1 1 06:49:27 1 06:49:27.1 1 06:49:27.11 1 06:49:27 1 06:49:27.1 1 06:49:27.11 1 06:49:27.105 1 06:49:27 1 06:49:27.1 1 06:49:27.11 1 06:49:27.105 1 06:49:27.1053 1 06:49:27 1 06:49:27.1 1 06:49:27.11 1 06:49:27.105 1 06:49:27.1053 1 06:49:27.10533 1 06:49:27 1 06:49:27.1 1 06:49:27.11 1 06:49:27.105 1 06:49:27.1053 1 06:49:27.10533 1 06:49:27.105330 26:57 26:57 26:57 26:57:52 26:57:52 26:57:52 26:57:52.5 26:57:52 26:57:52.5 26:57:52.48 26:57:52 26:57:52.5 26:57:52.48 26:57:52.482 26:57:52 26:57:52.5 26:57:52.48 26:57:52.482 26:57:52.4823 26:57:52 26:57:52.5 26:57:52.48 26:57:52.482 26:57:52.4823 26:57:52.48229 26:57:52 26:57:52.5 26:57:52.48 26:57:52.482 26:57:52.4823 26:57:52.48229 26:57:52.482290 1 02:57 1 02:57 1 02:57:52 1 02:57:52 1 02:57:52 1 02:57:52 1 02:57:52.5 1 02:57:52 1 02:57:52.5 1 02:57:52.48 1 02:57:52 1 02:57:52.5 1 02:57:52.48 1 02:57:52.482 1 02:57:52 1 02:57:52.5 1 02:57:52.48 1 02:57:52.482 1 02:57:52.4823 1 02:57:52 1 02:57:52.5 1 02:57:52.48 1 02:57:52.482 1 02:57:52.4823 1 02:57:52.48229 1 02:57:52 1 02:57:52.5 1 02:57:52.48 1 02:57:52.482 1 02:57:52.4823 1 02:57:52.48229 1 02:57:52.482290 40:45 40:45 40:45 40:45:44 40:45:44 40:45:44 40:45:44.7 40:45:44 40:45:44.7 40:45:44.66 40:45:44 40:45:44.7 40:45:44.66 40:45:44.658 40:45:44 40:45:44.7 40:45:44.66 40:45:44.658 40:45:44.6583 40:45:44 40:45:44.7 40:45:44.66 40:45:44.658 40:45:44.6583 40:45:44.65827 40:45:44 40:45:44.7 40:45:44.66 40:45:44.658 40:45:44.6583 40:45:44.65827 40:45:44.658270 1 16:45 1 16:45 1 16:45:44 1 16:45:44 1 16:45:44 1 16:45:44 1 16:45:44.7 1 16:45:44 1 16:45:44.7 1 16:45:44.66 1 16:45:44 1 16:45:44.7 1 16:45:44.66 1 16:45:44.658 1 16:45:44 1 16:45:44.7 1 16:45:44.66 1 16:45:44.658 1 16:45:44.6583 1 16:45:44 1 16:45:44.7 1 16:45:44.66 1 16:45:44.658 1 16:45:44.6583 1 16:45:44.65827 1 16:45:44 1 16:45:44.7 1 16:45:44.66 1 16:45:44.658 1 16:45:44.6583 1 16:45:44.65827 1 16:45:44.658270 45:30 45:30 45:30 45:30:57 45:30:57 45:30:57 45:30:57.6 45:30:57 45:30:57.6 45:30:57.58 45:30:57 45:30:57.6 45:30:57.58 45:30:57.582 45:30:57 45:30:57.6 45:30:57.58 45:30:57.582 45:30:57.5822 45:30:57 45:30:57.6 45:30:57.58 45:30:57.582 45:30:57.5822 45:30:57.58219 45:30:57 45:30:57.6 45:30:57.58 45:30:57.582 45:30:57.5822 45:30:57.58219 45:30:57.582190 1 21:30 1 21:30 1 21:30:57 1 21:30:57 1 21:30:57 1 21:30:57 1 21:30:57.6 1 21:30:57 1 21:30:57.6 1 21:30:57.58 1 21:30:57 1 21:30:57.6 1 21:30:57.58 1 21:30:57.582 1 21:30:57 1 21:30:57.6 1 21:30:57.58 1 21:30:57.582 1 21:30:57.5822 1 21:30:57 1 21:30:57.6 1 21:30:57.58 1 21:30:57.582 1 21:30:57.5822 1 21:30:57.58219 1 21:30:57 1 21:30:57.6 1 21:30:57.58 1 21:30:57.582 1 21:30:57.5822 1 21:30:57.58219 1 21:30:57.582190 46:30 46:30 46:30 46:30:04 46:30:04 46:30:04 46:30:04.2 46:30:04 46:30:04.2 46:30:04.18 46:30:04 46:30:04.2 46:30:04.18 46:30:04.183 46:30:04 46:30:04.2 46:30:04.18 46:30:04.183 46:30:04.1835 46:30:04 46:30:04.2 46:30:04.18 46:30:04.183 46:30:04.1835 46:30:04.18347 46:30:04 46:30:04.2 46:30:04.18 46:30:04.183 46:30:04.1835 46:30:04.18347 46:30:04.183470 1 22:30 1 22:30 1 22:30:04 1 22:30:04 1 22:30:04 1 22:30:04 1 22:30:04.2 1 22:30:04 1 22:30:04.2 1 22:30:04.18 1 22:30:04 1 22:30:04.2 1 22:30:04.18 1 22:30:04.183 1 22:30:04 1 22:30:04.2 1 22:30:04.18 1 22:30:04.183 1 22:30:04.1835 1 22:30:04 1 22:30:04.2 1 22:30:04.18 1 22:30:04.183 1 22:30:04.1835 1 22:30:04.18347 1 22:30:04 1 22:30:04.2 1 22:30:04.18 1 22:30:04.183 1 22:30:04.1835 1 22:30:04.18347 1 22:30:04.183470 25:56 25:56 25:56 25:56:51 25:56:51 25:56:51 25:56:51.6 25:56:51 25:56:51.6 25:56:51.59 25:56:51 25:56:51.6 25:56:51.59 25:56:51.593 25:56:51 25:56:51.6 25:56:51.59 25:56:51.593 25:56:51.5932 25:56:51 25:56:51.6 25:56:51.59 25:56:51.593 25:56:51.5932 25:56:51.59319 25:56:51 25:56:51.6 25:56:51.59 25:56:51.593 25:56:51.5932 25:56:51.59319 25:56:51.593190 1 01:56 1 01:56 1 01:56:51 1 01:56:51 1 01:56:51 1 01:56:51 1 01:56:51.6 1 01:56:51 1 01:56:51.6 1 01:56:51.59 1 01:56:51 1 01:56:51.6 1 01:56:51.59 1 01:56:51.593 1 01:56:51 1 01:56:51.6 1 01:56:51.59 1 01:56:51.593 1 01:56:51.5932 1 01:56:51 1 01:56:51.6 1 01:56:51.59 1 01:56:51.593 1 01:56:51.5932 1 01:56:51.59319 1 01:56:51 1 01:56:51.6 1 01:56:51.59 1 01:56:51.593 1 01:56:51.5932 1 01:56:51.59319 1 01:56:51.593190 48:00 48:00 48:00 48:00:00 48:00:00 48:00:00 48:00:00.0 48:00:00 48:00:00.0 48:00:00.00 48:00:00 48:00:00.0 48:00:00.00 48:00:00.000 48:00:00 48:00:00.0 48:00:00.00 48:00:00.000 48:00:00.0000 48:00:00 48:00:00.0 48:00:00.00 48:00:00.000 48:00:00.0000 48:00:00.00000 48:00:00 48:00:00.0 48:00:00.00 48:00:00.000 48:00:00.0000 48:00:00.00000 48:00:00.000000 2 00:00 2 00:00 2 00:00:00 2 00:00:00 2 00:00:00 2 00:00:00 2 00:00:00.0 2 00:00:00 2 00:00:00.0 2 00:00:00.00 2 00:00:00 2 00:00:00.0 2 00:00:00.00 2 00:00:00.000 2 00:00:00 2 00:00:00.0 2 00:00:00.00 2 00:00:00.000 2 00:00:00.0000 2 00:00:00 2 00:00:00.0 2 00:00:00.00 2 00:00:00.000 2 00:00:00.0000 2 00:00:00.00000 2 00:00:00 2 00:00:00.0 2 00:00:00.00 2 00:00:00.000 2 00:00:00.0000 2 00:00:00.00000 2 00:00:00.000000 52:50 52:50 52:50 52:50:38 52:50:38 52:50:38 52:50:38.1 52:50:38 52:50:38.1 52:50:38.12 52:50:38 52:50:38.1 52:50:38.12 52:50:38.123 52:50:38 52:50:38.1 52:50:38.12 52:50:38.123 52:50:38.1230 52:50:38 52:50:38.1 52:50:38.12 52:50:38.123 52:50:38.1230 52:50:38.12301 52:50:38 52:50:38.1 52:50:38.12 52:50:38.123 52:50:38.1230 52:50:38.12301 52:50:38.123010 2 04:50 2 04:50 2 04:50:38 2 04:50:38 2 04:50:38 2 04:50:38 2 04:50:38.1 2 04:50:38 2 04:50:38.1 2 04:50:38.12 2 04:50:38 2 04:50:38.1 2 04:50:38.12 2 04:50:38.123 2 04:50:38 2 04:50:38.1 2 04:50:38.12 2 04:50:38.123 2 04:50:38.1230 2 04:50:38 2 04:50:38.1 2 04:50:38.12 2 04:50:38.123 2 04:50:38.1230 2 04:50:38.12301 2 04:50:38 2 04:50:38.1 2 04:50:38.12 2 04:50:38.123 2 04:50:38.1230 2 04:50:38.12301 2 04:50:38.123010 60:31 60:31 60:31 60:31:35 60:31:35 60:31:35 60:31:35.2 60:31:35 60:31:35.2 60:31:35.23 60:31:35 60:31:35.2 60:31:35.23 60:31:35.235 60:31:35 60:31:35.2 60:31:35.23 60:31:35.235 60:31:35.2345 60:31:35 60:31:35.2 60:31:35.23 60:31:35.235 60:31:35.2345 60:31:35.23453 60:31:35 60:31:35.2 60:31:35.23 60:31:35.235 60:31:35.2345 60:31:35.23453 60:31:35.234530 2 12:31 2 12:31 2 12:31:35 2 12:31:35 2 12:31:35 2 12:31:35 2 12:31:35.2 2 12:31:35 2 12:31:35.2 2 12:31:35.23 2 12:31:35 2 12:31:35.2 2 12:31:35.23 2 12:31:35.235 2 12:31:35 2 12:31:35.2 2 12:31:35.23 2 12:31:35.235 2 12:31:35.2345 2 12:31:35 2 12:31:35.2 2 12:31:35.23 2 12:31:35.235 2 12:31:35.2345 2 12:31:35.23453 2 12:31:35 2 12:31:35.2 2 12:31:35.23 2 12:31:35.235 2 12:31:35.2345 2 12:31:35.23453 2 12:31:35.234530 60:47 60:47 60:47 60:47:53 60:47:53 60:47:53 60:47:53.3 60:47:53 60:47:53.3 60:47:53.35 60:47:53 60:47:53.3 60:47:53.35 60:47:53.345 60:47:53 60:47:53.3 60:47:53.35 60:47:53.345 60:47:53.3451 60:47:53 60:47:53.3 60:47:53.35 60:47:53.345 60:47:53.3451 60:47:53.34505 60:47:53 60:47:53.3 60:47:53.35 60:47:53.345 60:47:53.3451 60:47:53.34505 60:47:53.345050 2 12:47 2 12:47 2 12:47:53 2 12:47:53 2 12:47:53 2 12:47:53 2 12:47:53.3 2 12:47:53 2 12:47:53.3 2 12:47:53.35 2 12:47:53 2 12:47:53.3 2 12:47:53.35 2 12:47:53.345 2 12:47:53 2 12:47:53.3 2 12:47:53.35 2 12:47:53.345 2 12:47:53.3451 2 12:47:53 2 12:47:53.3 2 12:47:53.35 2 12:47:53.345 2 12:47:53.3451 2 12:47:53.34505 2 12:47:53 2 12:47:53.3 2 12:47:53.35 2 12:47:53.345 2 12:47:53.3451 2 12:47:53.34505 2 12:47:53.345050 49:26 49:26 49:26 49:26:00 49:26:00 49:26:00 49:26:00.5 49:26:00 49:26:00.5 49:26:00.46 49:26:00 49:26:00.5 49:26:00.46 49:26:00.456 49:26:00 49:26:00.5 49:26:00.46 49:26:00.456 49:26:00.4562 49:26:00 49:26:00.5 49:26:00.46 49:26:00.456 49:26:00.4562 49:26:00.45615 49:26:00 49:26:00.5 49:26:00.46 49:26:00.456 49:26:00.4562 49:26:00.45615 49:26:00.456150 2 01:26 2 01:26 2 01:26:00 2 01:26:00 2 01:26:00 2 01:26:00 2 01:26:00.5 2 01:26:00 2 01:26:00.5 2 01:26:00.46 2 01:26:00 2 01:26:00.5 2 01:26:00.46 2 01:26:00.456 2 01:26:00 2 01:26:00.5 2 01:26:00.46 2 01:26:00.456 2 01:26:00.4562 2 01:26:00 2 01:26:00.5 2 01:26:00.46 2 01:26:00.456 2 01:26:00.4562 2 01:26:00.45615 2 01:26:00 2 01:26:00.5 2 01:26:00.46 2 01:26:00.456 2 01:26:00.4562 2 01:26:00.45615 2 01:26:00.456150 68:58 68:58 68:58 68:58:11 68:58:11 68:58:11 68:58:11.6 68:58:11 68:58:11.6 68:58:11.57 68:58:11 68:58:11.6 68:58:11.57 68:58:11.567 68:58:11 68:58:11.6 68:58:11.57 68:58:11.567 68:58:11.5668 68:58:11 68:58:11.6 68:58:11.57 68:58:11.567 68:58:11.5668 68:58:11.56677 68:58:11 68:58:11.6 68:58:11.57 68:58:11.567 68:58:11.5668 68:58:11.56677 68:58:11.566770 2 20:58 2 20:58 2 20:58:11 2 20:58:11 2 20:58:11 2 20:58:11 2 20:58:11.6 2 20:58:11 2 20:58:11.6 2 20:58:11.57 2 20:58:11 2 20:58:11.6 2 20:58:11.57 2 20:58:11.567 2 20:58:11 2 20:58:11.6 2 20:58:11.57 2 20:58:11.567 2 20:58:11.5668 2 20:58:11 2 20:58:11.6 2 20:58:11.57 2 20:58:11.567 2 20:58:11.5668 2 20:58:11.56677 2 20:58:11 2 20:58:11.6 2 20:58:11.57 2 20:58:11.567 2 20:58:11.5668 2 20:58:11.56677 2 20:58:11.566770 55:36 55:36 55:36 55:36:05 55:36:05 55:36:05 55:36:05.2 55:36:05 55:36:05.2 55:36:05.19 55:36:05 55:36:05.2 55:36:05.19 55:36:05.190 55:36:05 55:36:05.2 55:36:05.19 55:36:05.190 55:36:05.1896 55:36:05 55:36:05.2 55:36:05.19 55:36:05.190 55:36:05.1896 55:36:05.18964 55:36:05 55:36:05.2 55:36:05.19 55:36:05.190 55:36:05.1896 55:36:05.18964 55:36:05.189640 2 07:36 2 07:36 2 07:36:05 2 07:36:05 2 07:36:05 2 07:36:05 2 07:36:05.2 2 07:36:05 2 07:36:05.2 2 07:36:05.19 2 07:36:05 2 07:36:05.2 2 07:36:05.19 2 07:36:05.190 2 07:36:05 2 07:36:05.2 2 07:36:05.19 2 07:36:05.190 2 07:36:05.1896 2 07:36:05 2 07:36:05.2 2 07:36:05.19 2 07:36:05.190 2 07:36:05.1896 2 07:36:05.18964 2 07:36:05 2 07:36:05.2 2 07:36:05.19 2 07:36:05.190 2 07:36:05.1896 2 07:36:05.18964 2 07:36:05.189640 63:43 63:43 63:43 63:43:49 63:43:49 63:43:49 63:43:49.8 63:43:49 63:43:49.8 63:43:49.83 63:43:49 63:43:49.8 63:43:49.83 63:43:49.831 63:43:49 63:43:49.8 63:43:49.83 63:43:49.831 63:43:49.8313 63:43:49 63:43:49.8 63:43:49.83 63:43:49.831 63:43:49.8313 63:43:49.83132 63:43:49 63:43:49.8 63:43:49.83 63:43:49.831 63:43:49.8313 63:43:49.83132 63:43:49.831320 2 15:43 2 15:43 2 15:43:49 2 15:43:49 2 15:43:49 2 15:43:49 2 15:43:49.8 2 15:43:49 2 15:43:49.8 2 15:43:49.83 2 15:43:49 2 15:43:49.8 2 15:43:49.83 2 15:43:49.831 2 15:43:49 2 15:43:49.8 2 15:43:49.83 2 15:43:49.831 2 15:43:49.8313 2 15:43:49 2 15:43:49.8 2 15:43:49.83 2 15:43:49.831 2 15:43:49.8313 2 15:43:49.83132 2 15:43:49 2 15:43:49.8 2 15:43:49.83 2 15:43:49.831 2 15:43:49.8313 2 15:43:49.83132 2 15:43:49.831320 52:25 52:25 52:25 52:25:09 52:25:09 52:25:09 52:25:09.0 52:25:09 52:25:09.0 52:25:09.01 52:25:09 52:25:09.0 52:25:09.01 52:25:09.013 52:25:09 52:25:09.0 52:25:09.01 52:25:09.013 52:25:09.0129 52:25:09 52:25:09.0 52:25:09.01 52:25:09.013 52:25:09.0129 52:25:09.01293 52:25:09 52:25:09.0 52:25:09.01 52:25:09.013 52:25:09.0129 52:25:09.01293 52:25:09.012930 2 04:25 2 04:25 2 04:25:09 2 04:25:09 2 04:25:09 2 04:25:09 2 04:25:09.0 2 04:25:09 2 04:25:09.0 2 04:25:09.01 2 04:25:09 2 04:25:09.0 2 04:25:09.01 2 04:25:09.013 2 04:25:09 2 04:25:09.0 2 04:25:09.01 2 04:25:09.013 2 04:25:09.0129 2 04:25:09 2 04:25:09.0 2 04:25:09.01 2 04:25:09.013 2 04:25:09.0129 2 04:25:09.01293 2 04:25:09 2 04:25:09.0 2 04:25:09.01 2 04:25:09.013 2 04:25:09.0129 2 04:25:09.01293 2 04:25:09.012930 54:49 54:49 54:49 54:49:27 54:49:27 54:49:27 54:49:27.5 54:49:27 54:49:27.5 54:49:27.52 54:49:27 54:49:27.5 54:49:27.52 54:49:27.524 54:49:27 54:49:27.5 54:49:27.52 54:49:27.524 54:49:27.5237 54:49:27 54:49:27.5 54:49:27.52 54:49:27.524 54:49:27.5237 54:49:27.52375 54:49:27 54:49:27.5 54:49:27.52 54:49:27.524 54:49:27.5237 54:49:27.52375 54:49:27.523750 2 06:49 2 06:49 2 06:49:27 2 06:49:27 2 06:49:27 2 06:49:27 2 06:49:27.5 2 06:49:27 2 06:49:27.5 2 06:49:27.52 2 06:49:27 2 06:49:27.5 2 06:49:27.52 2 06:49:27.524 2 06:49:27 2 06:49:27.5 2 06:49:27.52 2 06:49:27.524 2 06:49:27.5237 2 06:49:27 2 06:49:27.5 2 06:49:27.52 2 06:49:27.524 2 06:49:27.5237 2 06:49:27.52375 2 06:49:27 2 06:49:27.5 2 06:49:27.52 2 06:49:27.524 2 06:49:27.5237 2 06:49:27.52375 2 06:49:27.523750 50:57 50:57 50:57 50:57:52 50:57:52 50:57:52 50:57:52.0 50:57:52 50:57:52.0 50:57:52.02 50:57:52 50:57:52.0 50:57:52.02 50:57:52.016 50:57:52 50:57:52.0 50:57:52.02 50:57:52.016 50:57:52.0156 50:57:52 50:57:52.0 50:57:52.02 50:57:52.016 50:57:52.0156 50:57:52.01565 50:57:52 50:57:52.0 50:57:52.02 50:57:52.016 50:57:52.0156 50:57:52.01565 50:57:52.015650 2 02:57 2 02:57 2 02:57:52 2 02:57:52 2 02:57:52 2 02:57:52 2 02:57:52.0 2 02:57:52 2 02:57:52.0 2 02:57:52.02 2 02:57:52 2 02:57:52.0 2 02:57:52.02 2 02:57:52.016 2 02:57:52 2 02:57:52.0 2 02:57:52.02 2 02:57:52.016 2 02:57:52.0156 2 02:57:52 2 02:57:52.0 2 02:57:52.02 2 02:57:52.016 2 02:57:52.0156 2 02:57:52.01565 2 02:57:52 2 02:57:52.0 2 02:57:52.02 2 02:57:52.016 2 02:57:52.0156 2 02:57:52.01565 2 02:57:52.015650 64:45 64:45 64:45 64:45:44 64:45:44 64:45:44 64:45:44.9 64:45:44 64:45:44.9 64:45:44.87 64:45:44 64:45:44.9 64:45:44.87 64:45:44.865 64:45:44 64:45:44.9 64:45:44.87 64:45:44.865 64:45:44.8653 64:45:44 64:45:44.9 64:45:44.87 64:45:44.865 64:45:44.8653 64:45:44.86529 64:45:44 64:45:44.9 64:45:44.87 64:45:44.865 64:45:44.8653 64:45:44.86529 64:45:44.865290 2 16:45 2 16:45 2 16:45:44 2 16:45:44 2 16:45:44 2 16:45:44 2 16:45:44.9 2 16:45:44 2 16:45:44.9 2 16:45:44.87 2 16:45:44 2 16:45:44.9 2 16:45:44.87 2 16:45:44.865 2 16:45:44 2 16:45:44.9 2 16:45:44.87 2 16:45:44.865 2 16:45:44.8653 2 16:45:44 2 16:45:44.9 2 16:45:44.87 2 16:45:44.865 2 16:45:44.8653 2 16:45:44.86529 2 16:45:44 2 16:45:44.9 2 16:45:44.87 2 16:45:44.865 2 16:45:44.8653 2 16:45:44.86529 2 16:45:44.865290 69:30 69:30 69:30 69:30:57 69:30:57 69:30:57 69:30:57.8 69:30:57 69:30:57.8 69:30:57.82 69:30:57 69:30:57.8 69:30:57.82 69:30:57.820 69:30:57 69:30:57.8 69:30:57.82 69:30:57.820 69:30:57.8205 69:30:57 69:30:57.8 69:30:57.82 69:30:57.820 69:30:57.8205 69:30:57.82047 69:30:57 69:30:57.8 69:30:57.82 69:30:57.820 69:30:57.8205 69:30:57.82047 69:30:57.820470 2 21:30 2 21:30 2 21:30:57 2 21:30:57 2 21:30:57 2 21:30:57 2 21:30:57.8 2 21:30:57 2 21:30:57.8 2 21:30:57.82 2 21:30:57 2 21:30:57.8 2 21:30:57.82 2 21:30:57.820 2 21:30:57 2 21:30:57.8 2 21:30:57.82 2 21:30:57.820 2 21:30:57.8205 2 21:30:57 2 21:30:57.8 2 21:30:57.82 2 21:30:57.820 2 21:30:57.8205 2 21:30:57.82047 2 21:30:57 2 21:30:57.8 2 21:30:57.82 2 21:30:57.820 2 21:30:57.8205 2 21:30:57.82047 2 21:30:57.820470 52:25 52:25 52:25 52:25:09 52:25:09 52:25:09 52:25:09.2 52:25:09 52:25:09.2 52:25:09.15 52:25:09 52:25:09.2 52:25:09.15 52:25:09.154 52:25:09 52:25:09.2 52:25:09.15 52:25:09.154 52:25:09.1540 52:25:09 52:25:09.2 52:25:09.15 52:25:09.154 52:25:09.1540 52:25:09.15395 52:25:09 52:25:09.2 52:25:09.15 52:25:09.154 52:25:09.1540 52:25:09.15395 52:25:09.153950 2 04:25 2 04:25 2 04:25:09 2 04:25:09 2 04:25:09 2 04:25:09 2 04:25:09.2 2 04:25:09 2 04:25:09.2 2 04:25:09.15 2 04:25:09 2 04:25:09.2 2 04:25:09.15 2 04:25:09.154 2 04:25:09 2 04:25:09.2 2 04:25:09.15 2 04:25:09.154 2 04:25:09.1540 2 04:25:09 2 04:25:09.2 2 04:25:09.15 2 04:25:09.154 2 04:25:09.1540 2 04:25:09.15395 2 04:25:09 2 04:25:09.2 2 04:25:09.15 2 04:25:09.154 2 04:25:09.1540 2 04:25:09.15395 2 04:25:09.153950 54:49 54:49 54:49 54:49:27 54:49:27 54:49:27 54:49:27.1 54:49:27 54:49:27.1 54:49:27.11 54:49:27 54:49:27.1 54:49:27.11 54:49:27.105 54:49:27 54:49:27.1 54:49:27.11 54:49:27.105 54:49:27.1053 54:49:27 54:49:27.1 54:49:27.11 54:49:27.105 54:49:27.1053 54:49:27.10533 54:49:27 54:49:27.1 54:49:27.11 54:49:27.105 54:49:27.1053 54:49:27.10533 54:49:27.105330 2 06:49 2 06:49 2 06:49:27 2 06:49:27 2 06:49:27 2 06:49:27 2 06:49:27.1 2 06:49:27 2 06:49:27.1 2 06:49:27.11 2 06:49:27 2 06:49:27.1 2 06:49:27.11 2 06:49:27.105 2 06:49:27 2 06:49:27.1 2 06:49:27.11 2 06:49:27.105 2 06:49:27.1053 2 06:49:27 2 06:49:27.1 2 06:49:27.11 2 06:49:27.105 2 06:49:27.1053 2 06:49:27.10533 2 06:49:27 2 06:49:27.1 2 06:49:27.11 2 06:49:27.105 2 06:49:27.1053 2 06:49:27.10533 2 06:49:27.105330 50:57 50:57 50:57 50:57:52 50:57:52 50:57:52 50:57:52.5 50:57:52 50:57:52.5 50:57:52.48 50:57:52 50:57:52.5 50:57:52.48 50:57:52.482 50:57:52 50:57:52.5 50:57:52.48 50:57:52.482 50:57:52.4823 50:57:52 50:57:52.5 50:57:52.48 50:57:52.482 50:57:52.4823 50:57:52.48229 50:57:52 50:57:52.5 50:57:52.48 50:57:52.482 50:57:52.4823 50:57:52.48229 50:57:52.482290 2 02:57 2 02:57 2 02:57:52 2 02:57:52 2 02:57:52 2 02:57:52 2 02:57:52.5 2 02:57:52 2 02:57:52.5 2 02:57:52.48 2 02:57:52 2 02:57:52.5 2 02:57:52.48 2 02:57:52.482 2 02:57:52 2 02:57:52.5 2 02:57:52.48 2 02:57:52.482 2 02:57:52.4823 2 02:57:52 2 02:57:52.5 2 02:57:52.48 2 02:57:52.482 2 02:57:52.4823 2 02:57:52.48229 2 02:57:52 2 02:57:52.5 2 02:57:52.48 2 02:57:52.482 2 02:57:52.4823 2 02:57:52.48229 2 02:57:52.482290 64:45 64:45 64:45 64:45:44 64:45:44 64:45:44 64:45:44.7 64:45:44 64:45:44.7 64:45:44.66 64:45:44 64:45:44.7 64:45:44.66 64:45:44.658 64:45:44 64:45:44.7 64:45:44.66 64:45:44.658 64:45:44.6583 64:45:44 64:45:44.7 64:45:44.66 64:45:44.658 64:45:44.6583 64:45:44.65827 64:45:44 64:45:44.7 64:45:44.66 64:45:44.658 64:45:44.6583 64:45:44.65827 64:45:44.658270 2 16:45 2 16:45 2 16:45:44 2 16:45:44 2 16:45:44 2 16:45:44 2 16:45:44.7 2 16:45:44 2 16:45:44.7 2 16:45:44.66 2 16:45:44 2 16:45:44.7 2 16:45:44.66 2 16:45:44.658 2 16:45:44 2 16:45:44.7 2 16:45:44.66 2 16:45:44.658 2 16:45:44.6583 2 16:45:44 2 16:45:44.7 2 16:45:44.66 2 16:45:44.658 2 16:45:44.6583 2 16:45:44.65827 2 16:45:44 2 16:45:44.7 2 16:45:44.66 2 16:45:44.658 2 16:45:44.6583 2 16:45:44.65827 2 16:45:44.658270 69:30 69:30 69:30 69:30:57 69:30:57 69:30:57 69:30:57.6 69:30:57 69:30:57.6 69:30:57.58 69:30:57 69:30:57.6 69:30:57.58 69:30:57.582 69:30:57 69:30:57.6 69:30:57.58 69:30:57.582 69:30:57.5822 69:30:57 69:30:57.6 69:30:57.58 69:30:57.582 69:30:57.5822 69:30:57.58219 69:30:57 69:30:57.6 69:30:57.58 69:30:57.582 69:30:57.5822 69:30:57.58219 69:30:57.582190 2 21:30 2 21:30 2 21:30:57 2 21:30:57 2 21:30:57 2 21:30:57 2 21:30:57.6 2 21:30:57 2 21:30:57.6 2 21:30:57.58 2 21:30:57 2 21:30:57.6 2 21:30:57.58 2 21:30:57.582 2 21:30:57 2 21:30:57.6 2 21:30:57.58 2 21:30:57.582 2 21:30:57.5822 2 21:30:57 2 21:30:57.6 2 21:30:57.58 2 21:30:57.582 2 21:30:57.5822 2 21:30:57.58219 2 21:30:57 2 21:30:57.6 2 21:30:57.58 2 21:30:57.582 2 21:30:57.5822 2 21:30:57.58219 2 21:30:57.582190 70:30 70:30 70:30 70:30:04 70:30:04 70:30:04 70:30:04.2 70:30:04 70:30:04.2 70:30:04.18 70:30:04 70:30:04.2 70:30:04.18 70:30:04.183 70:30:04 70:30:04.2 70:30:04.18 70:30:04.183 70:30:04.1835 70:30:04 70:30:04.2 70:30:04.18 70:30:04.183 70:30:04.1835 70:30:04.18347 70:30:04 70:30:04.2 70:30:04.18 70:30:04.183 70:30:04.1835 70:30:04.18347 70:30:04.183470 2 22:30 2 22:30 2 22:30:04 2 22:30:04 2 22:30:04 2 22:30:04 2 22:30:04.2 2 22:30:04 2 22:30:04.2 2 22:30:04.18 2 22:30:04 2 22:30:04.2 2 22:30:04.18 2 22:30:04.183 2 22:30:04 2 22:30:04.2 2 22:30:04.18 2 22:30:04.183 2 22:30:04.1835 2 22:30:04 2 22:30:04.2 2 22:30:04.18 2 22:30:04.183 2 22:30:04.1835 2 22:30:04.18347 2 22:30:04 2 22:30:04.2 2 22:30:04.18 2 22:30:04.183 2 22:30:04.1835 2 22:30:04.18347 2 22:30:04.183470 49:56 49:56 49:56 49:56:51 49:56:51 49:56:51 49:56:51.6 49:56:51 49:56:51.6 49:56:51.59 49:56:51 49:56:51.6 49:56:51.59 49:56:51.593 49:56:51 49:56:51.6 49:56:51.59 49:56:51.593 49:56:51.5932 49:56:51 49:56:51.6 49:56:51.59 49:56:51.593 49:56:51.5932 49:56:51.59319 49:56:51 49:56:51.6 49:56:51.59 49:56:51.593 49:56:51.5932 49:56:51.59319 49:56:51.593190 2 01:56 2 01:56 2 01:56:51 2 01:56:51 2 01:56:51 2 01:56:51 2 01:56:51.6 2 01:56:51 2 01:56:51.6 2 01:56:51.59 2 01:56:51 2 01:56:51.6 2 01:56:51.59 2 01:56:51.593 2 01:56:51 2 01:56:51.6 2 01:56:51.59 2 01:56:51.593 2 01:56:51.5932 2 01:56:51 2 01:56:51.6 2 01:56:51.59 2 01:56:51.593 2 01:56:51.5932 2 01:56:51.59319 2 01:56:51 2 01:56:51.6 2 01:56:51.59 2 01:56:51.593 2 01:56:51.5932 2 01:56:51.59319 2 01:56:51.593190 ***** ****** 1296:00 1296:00 1296:00 1296:00:00 1296:00:00 1296:00:00 1296:00:00 1296:00:00 1296:00:00 1296:00:00.0 1296:00:00.0 1296:00:00.0 1296:00:00 1296:00:00.0 1296:00:00.00 1296:00:00.00 1296:00:00.00 1296:00:00 1296:00:00.0 1296:00:00.00 1296:00:00.000 1296:00:00.000 1296:00:00.000 1296:00:00 1296:00:00.0 1296:00:00.00 1296:00:00.000 1296:00:00.0000 1296:00:00.0000 1296:00:00.0000 54 00:00 54 00:00 54 00:00 54 00:00:00 54 00:00:00 54 00:00:00 54 00:00:00.0 54 00:00:00 54 00:00:00.0 54 00:00:00.00 54 00:00:00 54 00:00:00.0 54 00:00:00.00 54 00:00:00.000 54 00:00:00 54 00:00:00.0 54 00:00:00.00 54 00:00:00.000 54 00:00:00.0000 54 00:00:00 54 00:00:00.0 54 00:00:00.00 54 00:00:00.000 54 00:00:00.0000 54 00:00:00.00000 54 00:00:00 54 00:00:00.0 54 00:00:00.00 54 00:00:00.000 54 00:00:00.0000 54 00:00:00.00000 54 00:00:00.000000 ***** ****** 1300:50 1300:50 1300:50 1300:50:38 1300:50:38 1300:50:38 1300:50:38 1300:50:38 1300:50:38 1300:50:38.1 1300:50:38.1 1300:50:38.1 1300:50:38 1300:50:38.1 1300:50:38.12 1300:50:38.12 1300:50:38.12 1300:50:38 1300:50:38.1 1300:50:38.12 1300:50:38.123 1300:50:38.123 1300:50:38.123 1300:50:38 1300:50:38.1 1300:50:38.12 1300:50:38.123 1300:50:38.1230 1300:50:38.1230 1300:50:38.1230 54 04:50 54 04:50 54 04:50 54 04:50:38 54 04:50:38 54 04:50:38 54 04:50:38.1 54 04:50:38 54 04:50:38.1 54 04:50:38.12 54 04:50:38 54 04:50:38.1 54 04:50:38.12 54 04:50:38.123 54 04:50:38 54 04:50:38.1 54 04:50:38.12 54 04:50:38.123 54 04:50:38.1230 54 04:50:38 54 04:50:38.1 54 04:50:38.12 54 04:50:38.123 54 04:50:38.1230 54 04:50:38.12301 54 04:50:38 54 04:50:38.1 54 04:50:38.12 54 04:50:38.123 54 04:50:38.1230 54 04:50:38.12301 54 04:50:38.123010 ***** ****** 1308:31 1308:31 1308:31 1308:31:35 1308:31:35 1308:31:35 1308:31:35 1308:31:35 1308:31:35 1308:31:35.2 1308:31:35.2 1308:31:35.2 1308:31:35 1308:31:35.2 1308:31:35.23 1308:31:35.23 1308:31:35.23 1308:31:35 1308:31:35.2 1308:31:35.23 1308:31:35.235 1308:31:35.235 1308:31:35.235 1308:31:35 1308:31:35.2 1308:31:35.23 1308:31:35.235 1308:31:35.2345 1308:31:35.2345 1308:31:35.2345 54 12:31 54 12:31 54 12:31 54 12:31:35 54 12:31:35 54 12:31:35 54 12:31:35.2 54 12:31:35 54 12:31:35.2 54 12:31:35.23 54 12:31:35 54 12:31:35.2 54 12:31:35.23 54 12:31:35.235 54 12:31:35 54 12:31:35.2 54 12:31:35.23 54 12:31:35.235 54 12:31:35.2345 54 12:31:35 54 12:31:35.2 54 12:31:35.23 54 12:31:35.235 54 12:31:35.2345 54 12:31:35.23453 54 12:31:35 54 12:31:35.2 54 12:31:35.23 54 12:31:35.235 54 12:31:35.2345 54 12:31:35.23453 54 12:31:35.234530 ***** ****** 1308:47 1308:47 1308:47 1308:47:53 1308:47:53 1308:47:53 1308:47:53 1308:47:53 1308:47:53 1308:47:53.3 1308:47:53.3 1308:47:53.3 1308:47:53 1308:47:53.3 1308:47:53.35 1308:47:53.35 1308:47:53.35 1308:47:53 1308:47:53.3 1308:47:53.35 1308:47:53.345 1308:47:53.345 1308:47:53.345 1308:47:53 1308:47:53.3 1308:47:53.35 1308:47:53.345 1308:47:53.3450 1308:47:53.3450 1308:47:53.3450 54 12:47 54 12:47 54 12:47 54 12:47:53 54 12:47:53 54 12:47:53 54 12:47:53.3 54 12:47:53 54 12:47:53.3 54 12:47:53.35 54 12:47:53 54 12:47:53.3 54 12:47:53.35 54 12:47:53.345 54 12:47:53 54 12:47:53.3 54 12:47:53.35 54 12:47:53.345 54 12:47:53.3450 54 12:47:53 54 12:47:53.3 54 12:47:53.35 54 12:47:53.345 54 12:47:53.3450 54 12:47:53.34505 54 12:47:53 54 12:47:53.3 54 12:47:53.35 54 12:47:53.345 54 12:47:53.3450 54 12:47:53.34505 54 12:47:53.345050 ***** ****** 1297:26 1297:26 1297:26 1297:26:00 1297:26:00 1297:26:00 1297:26:00 1297:26:00 1297:26:00 1297:26:00.5 1297:26:00.5 1297:26:00.5 1297:26:00 1297:26:00.5 1297:26:00.46 1297:26:00.46 1297:26:00.46 1297:26:00 1297:26:00.5 1297:26:00.46 1297:26:00.456 1297:26:00.456 1297:26:00.456 1297:26:00 1297:26:00.5 1297:26:00.46 1297:26:00.456 1297:26:00.4561 1297:26:00.4561 1297:26:00.4561 54 01:26 54 01:26 54 01:26 54 01:26:00 54 01:26:00 54 01:26:00 54 01:26:00.5 54 01:26:00 54 01:26:00.5 54 01:26:00.46 54 01:26:00 54 01:26:00.5 54 01:26:00.46 54 01:26:00.456 54 01:26:00 54 01:26:00.5 54 01:26:00.46 54 01:26:00.456 54 01:26:00.4561 54 01:26:00 54 01:26:00.5 54 01:26:00.46 54 01:26:00.456 54 01:26:00.4561 54 01:26:00.45615 54 01:26:00 54 01:26:00.5 54 01:26:00.46 54 01:26:00.456 54 01:26:00.4561 54 01:26:00.45615 54 01:26:00.456150 ***** ****** 1316:58 1316:58 1316:58 1316:58:11 1316:58:11 1316:58:11 1316:58:11 1316:58:11 1316:58:11 1316:58:11.6 1316:58:11.6 1316:58:11.6 1316:58:11 1316:58:11.6 1316:58:11.57 1316:58:11.57 1316:58:11.57 1316:58:11 1316:58:11.6 1316:58:11.57 1316:58:11.567 1316:58:11.567 1316:58:11.567 1316:58:11 1316:58:11.6 1316:58:11.57 1316:58:11.567 1316:58:11.5668 1316:58:11.5668 1316:58:11.5668 54 20:58 54 20:58 54 20:58 54 20:58:11 54 20:58:11 54 20:58:11 54 20:58:11.6 54 20:58:11 54 20:58:11.6 54 20:58:11.57 54 20:58:11 54 20:58:11.6 54 20:58:11.57 54 20:58:11.567 54 20:58:11 54 20:58:11.6 54 20:58:11.57 54 20:58:11.567 54 20:58:11.5668 54 20:58:11 54 20:58:11.6 54 20:58:11.57 54 20:58:11.567 54 20:58:11.5668 54 20:58:11.56677 54 20:58:11 54 20:58:11.6 54 20:58:11.57 54 20:58:11.567 54 20:58:11.5668 54 20:58:11.56677 54 20:58:11.566770 ***** ****** 1303:36 1303:36 1303:36 1303:36:05 1303:36:05 1303:36:05 1303:36:05 1303:36:05 1303:36:05 1303:36:05.2 1303:36:05.2 1303:36:05.2 1303:36:05 1303:36:05.2 1303:36:05.19 1303:36:05.19 1303:36:05.19 1303:36:05 1303:36:05.2 1303:36:05.19 1303:36:05.190 1303:36:05.190 1303:36:05.190 1303:36:05 1303:36:05.2 1303:36:05.19 1303:36:05.190 1303:36:05.1896 1303:36:05.1896 1303:36:05.1896 54 07:36 54 07:36 54 07:36 54 07:36:05 54 07:36:05 54 07:36:05 54 07:36:05.2 54 07:36:05 54 07:36:05.2 54 07:36:05.19 54 07:36:05 54 07:36:05.2 54 07:36:05.19 54 07:36:05.190 54 07:36:05 54 07:36:05.2 54 07:36:05.19 54 07:36:05.190 54 07:36:05.1896 54 07:36:05 54 07:36:05.2 54 07:36:05.19 54 07:36:05.190 54 07:36:05.1896 54 07:36:05.18964 54 07:36:05 54 07:36:05.2 54 07:36:05.19 54 07:36:05.190 54 07:36:05.1896 54 07:36:05.18964 54 07:36:05.189640 ***** ****** 1311:43 1311:43 1311:43 1311:43:49 1311:43:49 1311:43:49 1311:43:49 1311:43:49 1311:43:49 1311:43:49.8 1311:43:49.8 1311:43:49.8 1311:43:49 1311:43:49.8 1311:43:49.83 1311:43:49.83 1311:43:49.83 1311:43:49 1311:43:49.8 1311:43:49.83 1311:43:49.831 1311:43:49.831 1311:43:49.831 1311:43:49 1311:43:49.8 1311:43:49.83 1311:43:49.831 1311:43:49.8313 1311:43:49.8313 1311:43:49.8313 54 15:43 54 15:43 54 15:43 54 15:43:49 54 15:43:49 54 15:43:49 54 15:43:49.8 54 15:43:49 54 15:43:49.8 54 15:43:49.83 54 15:43:49 54 15:43:49.8 54 15:43:49.83 54 15:43:49.831 54 15:43:49 54 15:43:49.8 54 15:43:49.83 54 15:43:49.831 54 15:43:49.8313 54 15:43:49 54 15:43:49.8 54 15:43:49.83 54 15:43:49.831 54 15:43:49.8313 54 15:43:49.83132 54 15:43:49 54 15:43:49.8 54 15:43:49.83 54 15:43:49.831 54 15:43:49.8313 54 15:43:49.83132 54 15:43:49.831320 ***** ****** 1300:25 1300:25 1300:25 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09.0 1300:25:09.0 1300:25:09.0 1300:25:09 1300:25:09.0 1300:25:09.01 1300:25:09.01 1300:25:09.01 1300:25:09 1300:25:09.0 1300:25:09.01 1300:25:09.013 1300:25:09.013 1300:25:09.013 1300:25:09 1300:25:09.0 1300:25:09.01 1300:25:09.013 1300:25:09.0129 1300:25:09.0129 1300:25:09.0129 54 04:25 54 04:25 54 04:25 54 04:25:09 54 04:25:09 54 04:25:09 54 04:25:09.0 54 04:25:09 54 04:25:09.0 54 04:25:09.01 54 04:25:09 54 04:25:09.0 54 04:25:09.01 54 04:25:09.013 54 04:25:09 54 04:25:09.0 54 04:25:09.01 54 04:25:09.013 54 04:25:09.0129 54 04:25:09 54 04:25:09.0 54 04:25:09.01 54 04:25:09.013 54 04:25:09.0129 54 04:25:09.01293 54 04:25:09 54 04:25:09.0 54 04:25:09.01 54 04:25:09.013 54 04:25:09.0129 54 04:25:09.01293 54 04:25:09.012930 ***** ****** 1302:49 1302:49 1302:49 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27.5 1302:49:27.5 1302:49:27.5 1302:49:27 1302:49:27.5 1302:49:27.52 1302:49:27.52 1302:49:27.52 1302:49:27 1302:49:27.5 1302:49:27.52 1302:49:27.524 1302:49:27.524 1302:49:27.524 1302:49:27 1302:49:27.5 1302:49:27.52 1302:49:27.524 1302:49:27.5237 1302:49:27.5237 1302:49:27.5237 54 06:49 54 06:49 54 06:49 54 06:49:27 54 06:49:27 54 06:49:27 54 06:49:27.5 54 06:49:27 54 06:49:27.5 54 06:49:27.52 54 06:49:27 54 06:49:27.5 54 06:49:27.52 54 06:49:27.524 54 06:49:27 54 06:49:27.5 54 06:49:27.52 54 06:49:27.524 54 06:49:27.5237 54 06:49:27 54 06:49:27.5 54 06:49:27.52 54 06:49:27.524 54 06:49:27.5237 54 06:49:27.52375 54 06:49:27 54 06:49:27.5 54 06:49:27.52 54 06:49:27.524 54 06:49:27.5237 54 06:49:27.52375 54 06:49:27.523750 ***** ****** 1298:57 1298:57 1298:57 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52.0 1298:57:52.0 1298:57:52.0 1298:57:52 1298:57:52.0 1298:57:52.02 1298:57:52.02 1298:57:52.02 1298:57:52 1298:57:52.0 1298:57:52.02 1298:57:52.016 1298:57:52.016 1298:57:52.016 1298:57:52 1298:57:52.0 1298:57:52.02 1298:57:52.016 1298:57:52.0157 1298:57:52.0157 1298:57:52.0157 54 02:57 54 02:57 54 02:57 54 02:57:52 54 02:57:52 54 02:57:52 54 02:57:52.0 54 02:57:52 54 02:57:52.0 54 02:57:52.02 54 02:57:52 54 02:57:52.0 54 02:57:52.02 54 02:57:52.016 54 02:57:52 54 02:57:52.0 54 02:57:52.02 54 02:57:52.016 54 02:57:52.0157 54 02:57:52 54 02:57:52.0 54 02:57:52.02 54 02:57:52.016 54 02:57:52.0157 54 02:57:52.01565 54 02:57:52 54 02:57:52.0 54 02:57:52.02 54 02:57:52.016 54 02:57:52.0157 54 02:57:52.01565 54 02:57:52.015650 ***** ****** 1312:45 1312:45 1312:45 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44.9 1312:45:44.9 1312:45:44.9 1312:45:44 1312:45:44.9 1312:45:44.87 1312:45:44.87 1312:45:44.87 1312:45:44 1312:45:44.9 1312:45:44.87 1312:45:44.865 1312:45:44.865 1312:45:44.865 1312:45:44 1312:45:44.9 1312:45:44.87 1312:45:44.865 1312:45:44.8653 1312:45:44.8653 1312:45:44.8653 54 16:45 54 16:45 54 16:45 54 16:45:44 54 16:45:44 54 16:45:44 54 16:45:44.9 54 16:45:44 54 16:45:44.9 54 16:45:44.87 54 16:45:44 54 16:45:44.9 54 16:45:44.87 54 16:45:44.865 54 16:45:44 54 16:45:44.9 54 16:45:44.87 54 16:45:44.865 54 16:45:44.8653 54 16:45:44 54 16:45:44.9 54 16:45:44.87 54 16:45:44.865 54 16:45:44.8653 54 16:45:44.86529 54 16:45:44 54 16:45:44.9 54 16:45:44.87 54 16:45:44.865 54 16:45:44.8653 54 16:45:44.86529 54 16:45:44.865290 ***** ****** 1317:30 1317:30 1317:30 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57.8 1317:30:57.8 1317:30:57.8 1317:30:57 1317:30:57.8 1317:30:57.82 1317:30:57.82 1317:30:57.82 1317:30:57 1317:30:57.8 1317:30:57.82 1317:30:57.820 1317:30:57.820 1317:30:57.820 1317:30:57 1317:30:57.8 1317:30:57.82 1317:30:57.820 1317:30:57.8205 1317:30:57.8205 1317:30:57.8205 54 21:30 54 21:30 54 21:30 54 21:30:57 54 21:30:57 54 21:30:57 54 21:30:57.8 54 21:30:57 54 21:30:57.8 54 21:30:57.82 54 21:30:57 54 21:30:57.8 54 21:30:57.82 54 21:30:57.820 54 21:30:57 54 21:30:57.8 54 21:30:57.82 54 21:30:57.820 54 21:30:57.8205 54 21:30:57 54 21:30:57.8 54 21:30:57.82 54 21:30:57.820 54 21:30:57.8205 54 21:30:57.82047 54 21:30:57 54 21:30:57.8 54 21:30:57.82 54 21:30:57.820 54 21:30:57.8205 54 21:30:57.82047 54 21:30:57.820470 ***** ****** 1300:25 1300:25 1300:25 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09.2 1300:25:09.2 1300:25:09.2 1300:25:09 1300:25:09.2 1300:25:09.15 1300:25:09.15 1300:25:09.15 1300:25:09 1300:25:09.2 1300:25:09.15 1300:25:09.154 1300:25:09.154 1300:25:09.154 1300:25:09 1300:25:09.2 1300:25:09.15 1300:25:09.154 1300:25:09.1540 1300:25:09.1540 1300:25:09.1540 54 04:25 54 04:25 54 04:25 54 04:25:09 54 04:25:09 54 04:25:09 54 04:25:09.2 54 04:25:09 54 04:25:09.2 54 04:25:09.15 54 04:25:09 54 04:25:09.2 54 04:25:09.15 54 04:25:09.154 54 04:25:09 54 04:25:09.2 54 04:25:09.15 54 04:25:09.154 54 04:25:09.1540 54 04:25:09 54 04:25:09.2 54 04:25:09.15 54 04:25:09.154 54 04:25:09.1540 54 04:25:09.15395 54 04:25:09 54 04:25:09.2 54 04:25:09.15 54 04:25:09.154 54 04:25:09.1540 54 04:25:09.15395 54 04:25:09.153950 ***** ****** 1302:49 1302:49 1302:49 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27.1 1302:49:27.1 1302:49:27.1 1302:49:27 1302:49:27.1 1302:49:27.11 1302:49:27.11 1302:49:27.11 1302:49:27 1302:49:27.1 1302:49:27.11 1302:49:27.105 1302:49:27.105 1302:49:27.105 1302:49:27 1302:49:27.1 1302:49:27.11 1302:49:27.105 1302:49:27.1053 1302:49:27.1053 1302:49:27.1053 54 06:49 54 06:49 54 06:49 54 06:49:27 54 06:49:27 54 06:49:27 54 06:49:27.1 54 06:49:27 54 06:49:27.1 54 06:49:27.11 54 06:49:27 54 06:49:27.1 54 06:49:27.11 54 06:49:27.105 54 06:49:27 54 06:49:27.1 54 06:49:27.11 54 06:49:27.105 54 06:49:27.1053 54 06:49:27 54 06:49:27.1 54 06:49:27.11 54 06:49:27.105 54 06:49:27.1053 54 06:49:27.10533 54 06:49:27 54 06:49:27.1 54 06:49:27.11 54 06:49:27.105 54 06:49:27.1053 54 06:49:27.10533 54 06:49:27.105330 ***** ****** 1298:57 1298:57 1298:57 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52.5 1298:57:52.5 1298:57:52.5 1298:57:52 1298:57:52.5 1298:57:52.48 1298:57:52.48 1298:57:52.48 1298:57:52 1298:57:52.5 1298:57:52.48 1298:57:52.482 1298:57:52.482 1298:57:52.482 1298:57:52 1298:57:52.5 1298:57:52.48 1298:57:52.482 1298:57:52.4823 1298:57:52.4823 1298:57:52.4823 54 02:57 54 02:57 54 02:57 54 02:57:52 54 02:57:52 54 02:57:52 54 02:57:52.5 54 02:57:52 54 02:57:52.5 54 02:57:52.48 54 02:57:52 54 02:57:52.5 54 02:57:52.48 54 02:57:52.482 54 02:57:52 54 02:57:52.5 54 02:57:52.48 54 02:57:52.482 54 02:57:52.4823 54 02:57:52 54 02:57:52.5 54 02:57:52.48 54 02:57:52.482 54 02:57:52.4823 54 02:57:52.48229 54 02:57:52 54 02:57:52.5 54 02:57:52.48 54 02:57:52.482 54 02:57:52.4823 54 02:57:52.48229 54 02:57:52.482290 ***** ****** 1312:45 1312:45 1312:45 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44.7 1312:45:44.7 1312:45:44.7 1312:45:44 1312:45:44.7 1312:45:44.66 1312:45:44.66 1312:45:44.66 1312:45:44 1312:45:44.7 1312:45:44.66 1312:45:44.658 1312:45:44.658 1312:45:44.658 1312:45:44 1312:45:44.7 1312:45:44.66 1312:45:44.658 1312:45:44.6583 1312:45:44.6583 1312:45:44.6583 54 16:45 54 16:45 54 16:45 54 16:45:44 54 16:45:44 54 16:45:44 54 16:45:44.7 54 16:45:44 54 16:45:44.7 54 16:45:44.66 54 16:45:44 54 16:45:44.7 54 16:45:44.66 54 16:45:44.658 54 16:45:44 54 16:45:44.7 54 16:45:44.66 54 16:45:44.658 54 16:45:44.6583 54 16:45:44 54 16:45:44.7 54 16:45:44.66 54 16:45:44.658 54 16:45:44.6583 54 16:45:44.65827 54 16:45:44 54 16:45:44.7 54 16:45:44.66 54 16:45:44.658 54 16:45:44.6583 54 16:45:44.65827 54 16:45:44.658270 ***** ****** 1317:30 1317:30 1317:30 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57.6 1317:30:57.6 1317:30:57.6 1317:30:57 1317:30:57.6 1317:30:57.58 1317:30:57.58 1317:30:57.58 1317:30:57 1317:30:57.6 1317:30:57.58 1317:30:57.582 1317:30:57.582 1317:30:57.582 1317:30:57 1317:30:57.6 1317:30:57.58 1317:30:57.582 1317:30:57.5822 1317:30:57.5822 1317:30:57.5822 54 21:30 54 21:30 54 21:30 54 21:30:57 54 21:30:57 54 21:30:57 54 21:30:57.6 54 21:30:57 54 21:30:57.6 54 21:30:57.58 54 21:30:57 54 21:30:57.6 54 21:30:57.58 54 21:30:57.582 54 21:30:57 54 21:30:57.6 54 21:30:57.58 54 21:30:57.582 54 21:30:57.5822 54 21:30:57 54 21:30:57.6 54 21:30:57.58 54 21:30:57.582 54 21:30:57.5822 54 21:30:57.58219 54 21:30:57 54 21:30:57.6 54 21:30:57.58 54 21:30:57.582 54 21:30:57.5822 54 21:30:57.58219 54 21:30:57.582190 ***** ****** 1318:30 1318:30 1318:30 1318:30:04 1318:30:04 1318:30:04 1318:30:04 1318:30:04 1318:30:04 1318:30:04.2 1318:30:04.2 1318:30:04.2 1318:30:04 1318:30:04.2 1318:30:04.18 1318:30:04.18 1318:30:04.18 1318:30:04 1318:30:04.2 1318:30:04.18 1318:30:04.183 1318:30:04.183 1318:30:04.183 1318:30:04 1318:30:04.2 1318:30:04.18 1318:30:04.183 1318:30:04.1835 1318:30:04.1835 1318:30:04.1835 54 22:30 54 22:30 54 22:30 54 22:30:04 54 22:30:04 54 22:30:04 54 22:30:04.2 54 22:30:04 54 22:30:04.2 54 22:30:04.18 54 22:30:04 54 22:30:04.2 54 22:30:04.18 54 22:30:04.183 54 22:30:04 54 22:30:04.2 54 22:30:04.18 54 22:30:04.183 54 22:30:04.1835 54 22:30:04 54 22:30:04.2 54 22:30:04.18 54 22:30:04.183 54 22:30:04.1835 54 22:30:04.18347 54 22:30:04 54 22:30:04.2 54 22:30:04.18 54 22:30:04.183 54 22:30:04.1835 54 22:30:04.18347 54 22:30:04.183470 ***** ****** 1297:56 1297:56 1297:56 1297:56:51 1297:56:51 1297:56:51 1297:56:51 1297:56:51 1297:56:51 1297:56:51.6 1297:56:51.6 1297:56:51.6 1297:56:51 1297:56:51.6 1297:56:51.59 1297:56:51.59 1297:56:51.59 1297:56:51 1297:56:51.6 1297:56:51.59 1297:56:51.593 1297:56:51.593 1297:56:51.593 1297:56:51 1297:56:51.6 1297:56:51.59 1297:56:51.593 1297:56:51.5932 1297:56:51.5932 1297:56:51.5932 54 01:56 54 01:56 54 01:56 54 01:56:51 54 01:56:51 54 01:56:51 54 01:56:51.6 54 01:56:51 54 01:56:51.6 54 01:56:51.59 54 01:56:51 54 01:56:51.6 54 01:56:51.59 54 01:56:51.593 54 01:56:51 54 01:56:51.6 54 01:56:51.59 54 01:56:51.593 54 01:56:51.5932 54 01:56:51 54 01:56:51.6 54 01:56:51.59 54 01:56:51.593 54 01:56:51.5932 54 01:56:51.59319 54 01:56:51 54 01:56:51.6 54 01:56:51.59 54 01:56:51.593 54 01:56:51.5932 54 01:56:51.59319 54 01:56:51.593190 ***** ****** ******* 16344:00 16344:00 16344:00 16344:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00.0 16344:00:00.0 16344:00:00.0 16344:00:00.0 16344:00:00 16344:00:00.0 16344:00:00.00 16344:00:00.00 16344:00:00.00 16344:00:00.00 16344:00:00 16344:00:00.0 16344:00:00.00 16344:00:00.000 16344:00:00.000 16344:00:00.000 16344:00:00.000 ******** 681 00:00 681 00:00 681 00:00 681 00:00:00 681 00:00:00 681 00:00:00 681 00:00:00 681 00:00:00.0 681 00:00:00.0 681 00:00:00 681 00:00:00.0 681 00:00:00.00 681 00:00:00.00 681 00:00:00 681 00:00:00.0 681 00:00:00.00 681 00:00:00.000 681 00:00:00.000 681 00:00:00 681 00:00:00.0 681 00:00:00.00 681 00:00:00.000 681 00:00:00.0000 681 00:00:00.0000 681 00:00:00 681 00:00:00.0 681 00:00:00.00 681 00:00:00.000 681 00:00:00.0000 681 00:00:00.00000 681 00:00:00.00000 ***** ****** ******* 16348:50 16348:50 16348:50 16348:50 16348:50:38 16348:50:38 16348:50:38 16348:50:38 16348:50:38 16348:50:38 16348:50:38 16348:50:38 16348:50:38.1 16348:50:38.1 16348:50:38.1 16348:50:38.1 16348:50:38 16348:50:38.1 16348:50:38.12 16348:50:38.12 16348:50:38.12 16348:50:38.12 16348:50:38 16348:50:38.1 16348:50:38.12 16348:50:38.123 16348:50:38.123 16348:50:38.123 16348:50:38.123 ******** 681 04:50 681 04:50 681 04:50 681 04:50:38 681 04:50:38 681 04:50:38 681 04:50:38 681 04:50:38.1 681 04:50:38.1 681 04:50:38 681 04:50:38.1 681 04:50:38.12 681 04:50:38.12 681 04:50:38 681 04:50:38.1 681 04:50:38.12 681 04:50:38.123 681 04:50:38.123 681 04:50:38 681 04:50:38.1 681 04:50:38.12 681 04:50:38.123 681 04:50:38.1230 681 04:50:38.1230 681 04:50:38 681 04:50:38.1 681 04:50:38.12 681 04:50:38.123 681 04:50:38.1230 681 04:50:38.12301 681 04:50:38.12301 ***** ****** ******* 16356:31 16356:31 16356:31 16356:31 16356:31:35 16356:31:35 16356:31:35 16356:31:35 16356:31:35 16356:31:35 16356:31:35 16356:31:35 16356:31:35.2 16356:31:35.2 16356:31:35.2 16356:31:35.2 16356:31:35 16356:31:35.2 16356:31:35.23 16356:31:35.23 16356:31:35.23 16356:31:35.23 16356:31:35 16356:31:35.2 16356:31:35.23 16356:31:35.235 16356:31:35.235 16356:31:35.235 16356:31:35.235 ******** 681 12:31 681 12:31 681 12:31 681 12:31:35 681 12:31:35 681 12:31:35 681 12:31:35 681 12:31:35.2 681 12:31:35.2 681 12:31:35 681 12:31:35.2 681 12:31:35.23 681 12:31:35.23 681 12:31:35 681 12:31:35.2 681 12:31:35.23 681 12:31:35.235 681 12:31:35.235 681 12:31:35 681 12:31:35.2 681 12:31:35.23 681 12:31:35.235 681 12:31:35.2345 681 12:31:35.2345 681 12:31:35 681 12:31:35.2 681 12:31:35.23 681 12:31:35.235 681 12:31:35.2345 681 12:31:35.23453 681 12:31:35.23453 ***** ****** ******* 16356:47 16356:47 16356:47 16356:47 16356:47:53 16356:47:53 16356:47:53 16356:47:53 16356:47:53 16356:47:53 16356:47:53 16356:47:53 16356:47:53.3 16356:47:53.3 16356:47:53.3 16356:47:53.3 16356:47:53 16356:47:53.3 16356:47:53.35 16356:47:53.35 16356:47:53.35 16356:47:53.35 16356:47:53 16356:47:53.3 16356:47:53.35 16356:47:53.345 16356:47:53.345 16356:47:53.345 16356:47:53.345 ******** 681 12:47 681 12:47 681 12:47 681 12:47:53 681 12:47:53 681 12:47:53 681 12:47:53 681 12:47:53.3 681 12:47:53.3 681 12:47:53 681 12:47:53.3 681 12:47:53.35 681 12:47:53.35 681 12:47:53 681 12:47:53.3 681 12:47:53.35 681 12:47:53.345 681 12:47:53.345 681 12:47:53 681 12:47:53.3 681 12:47:53.35 681 12:47:53.345 681 12:47:53.3450 681 12:47:53.3450 681 12:47:53 681 12:47:53.3 681 12:47:53.35 681 12:47:53.345 681 12:47:53.3450 681 12:47:53.34505 681 12:47:53.34505 ***** ****** ******* 16345:26 16345:26 16345:26 16345:26 16345:26:00 16345:26:00 16345:26:00 16345:26:00 16345:26:00 16345:26:00 16345:26:00 16345:26:00 16345:26:00.5 16345:26:00.5 16345:26:00.5 16345:26:00.5 16345:26:00 16345:26:00.5 16345:26:00.46 16345:26:00.46 16345:26:00.46 16345:26:00.46 16345:26:00 16345:26:00.5 16345:26:00.46 16345:26:00.456 16345:26:00.456 16345:26:00.456 16345:26:00.456 ******** 681 01:26 681 01:26 681 01:26 681 01:26:00 681 01:26:00 681 01:26:00 681 01:26:00 681 01:26:00.5 681 01:26:00.5 681 01:26:00 681 01:26:00.5 681 01:26:00.46 681 01:26:00.46 681 01:26:00 681 01:26:00.5 681 01:26:00.46 681 01:26:00.456 681 01:26:00.456 681 01:26:00 681 01:26:00.5 681 01:26:00.46 681 01:26:00.456 681 01:26:00.4562 681 01:26:00.4562 681 01:26:00 681 01:26:00.5 681 01:26:00.46 681 01:26:00.456 681 01:26:00.4562 681 01:26:00.45615 681 01:26:00.45615 ***** ****** ******* 16364:58 16364:58 16364:58 16364:58 16364:58:11 16364:58:11 16364:58:11 16364:58:11 16364:58:11 16364:58:11 16364:58:11 16364:58:11 16364:58:11.6 16364:58:11.6 16364:58:11.6 16364:58:11.6 16364:58:11 16364:58:11.6 16364:58:11.57 16364:58:11.57 16364:58:11.57 16364:58:11.57 16364:58:11 16364:58:11.6 16364:58:11.57 16364:58:11.567 16364:58:11.567 16364:58:11.567 16364:58:11.567 ******** 681 20:58 681 20:58 681 20:58 681 20:58:11 681 20:58:11 681 20:58:11 681 20:58:11 681 20:58:11.6 681 20:58:11.6 681 20:58:11 681 20:58:11.6 681 20:58:11.57 681 20:58:11.57 681 20:58:11 681 20:58:11.6 681 20:58:11.57 681 20:58:11.567 681 20:58:11.567 681 20:58:11 681 20:58:11.6 681 20:58:11.57 681 20:58:11.567 681 20:58:11.5668 681 20:58:11.5668 681 20:58:11 681 20:58:11.6 681 20:58:11.57 681 20:58:11.567 681 20:58:11.5668 681 20:58:11.56677 681 20:58:11.56677 ***** ****** ******* 16351:36 16351:36 16351:36 16351:36 16351:36:05 16351:36:05 16351:36:05 16351:36:05 16351:36:05 16351:36:05 16351:36:05 16351:36:05 16351:36:05.2 16351:36:05.2 16351:36:05.2 16351:36:05.2 16351:36:05 16351:36:05.2 16351:36:05.19 16351:36:05.19 16351:36:05.19 16351:36:05.19 16351:36:05 16351:36:05.2 16351:36:05.19 16351:36:05.190 16351:36:05.190 16351:36:05.190 16351:36:05.190 ******** 681 07:36 681 07:36 681 07:36 681 07:36:05 681 07:36:05 681 07:36:05 681 07:36:05 681 07:36:05.2 681 07:36:05.2 681 07:36:05 681 07:36:05.2 681 07:36:05.19 681 07:36:05.19 681 07:36:05 681 07:36:05.2 681 07:36:05.19 681 07:36:05.190 681 07:36:05.190 681 07:36:05 681 07:36:05.2 681 07:36:05.19 681 07:36:05.190 681 07:36:05.1896 681 07:36:05.1896 681 07:36:05 681 07:36:05.2 681 07:36:05.19 681 07:36:05.190 681 07:36:05.1896 681 07:36:05.18964 681 07:36:05.18964 ***** ****** ******* 16359:43 16359:43 16359:43 16359:43 16359:43:49 16359:43:49 16359:43:49 16359:43:49 16359:43:49 16359:43:49 16359:43:49 16359:43:49 16359:43:49.8 16359:43:49.8 16359:43:49.8 16359:43:49.8 16359:43:49 16359:43:49.8 16359:43:49.83 16359:43:49.83 16359:43:49.83 16359:43:49.83 16359:43:49 16359:43:49.8 16359:43:49.83 16359:43:49.831 16359:43:49.831 16359:43:49.831 16359:43:49.831 ******** 681 15:43 681 15:43 681 15:43 681 15:43:49 681 15:43:49 681 15:43:49 681 15:43:49 681 15:43:49.8 681 15:43:49.8 681 15:43:49 681 15:43:49.8 681 15:43:49.83 681 15:43:49.83 681 15:43:49 681 15:43:49.8 681 15:43:49.83 681 15:43:49.831 681 15:43:49.831 681 15:43:49 681 15:43:49.8 681 15:43:49.83 681 15:43:49.831 681 15:43:49.8313 681 15:43:49.8313 681 15:43:49 681 15:43:49.8 681 15:43:49.83 681 15:43:49.831 681 15:43:49.8313 681 15:43:49.83132 681 15:43:49.83132 ***** ****** ******* 16348:25 16348:25 16348:25 16348:25 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09.0 16348:25:09.0 16348:25:09.0 16348:25:09.0 16348:25:09 16348:25:09.0 16348:25:09.01 16348:25:09.01 16348:25:09.01 16348:25:09.01 16348:25:09 16348:25:09.0 16348:25:09.01 16348:25:09.013 16348:25:09.013 16348:25:09.013 16348:25:09.013 ******** 681 04:25 681 04:25 681 04:25 681 04:25:09 681 04:25:09 681 04:25:09 681 04:25:09 681 04:25:09.0 681 04:25:09.0 681 04:25:09 681 04:25:09.0 681 04:25:09.01 681 04:25:09.01 681 04:25:09 681 04:25:09.0 681 04:25:09.01 681 04:25:09.013 681 04:25:09.013 681 04:25:09 681 04:25:09.0 681 04:25:09.01 681 04:25:09.013 681 04:25:09.0129 681 04:25:09.0129 681 04:25:09 681 04:25:09.0 681 04:25:09.01 681 04:25:09.013 681 04:25:09.0129 681 04:25:09.01293 681 04:25:09.01293 ***** ****** ******* 16350:49 16350:49 16350:49 16350:49 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27.5 16350:49:27.5 16350:49:27.5 16350:49:27.5 16350:49:27 16350:49:27.5 16350:49:27.52 16350:49:27.52 16350:49:27.52 16350:49:27.52 16350:49:27 16350:49:27.5 16350:49:27.52 16350:49:27.524 16350:49:27.524 16350:49:27.524 16350:49:27.524 ******** 681 06:49 681 06:49 681 06:49 681 06:49:27 681 06:49:27 681 06:49:27 681 06:49:27 681 06:49:27.5 681 06:49:27.5 681 06:49:27 681 06:49:27.5 681 06:49:27.52 681 06:49:27.52 681 06:49:27 681 06:49:27.5 681 06:49:27.52 681 06:49:27.524 681 06:49:27.524 681 06:49:27 681 06:49:27.5 681 06:49:27.52 681 06:49:27.524 681 06:49:27.5237 681 06:49:27.5237 681 06:49:27 681 06:49:27.5 681 06:49:27.52 681 06:49:27.524 681 06:49:27.5237 681 06:49:27.52375 681 06:49:27.52375 ***** ****** ******* 16346:57 16346:57 16346:57 16346:57 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52.0 16346:57:52.0 16346:57:52.0 16346:57:52.0 16346:57:52 16346:57:52.0 16346:57:52.02 16346:57:52.02 16346:57:52.02 16346:57:52.02 16346:57:52 16346:57:52.0 16346:57:52.02 16346:57:52.016 16346:57:52.016 16346:57:52.016 16346:57:52.016 ******** 681 02:57 681 02:57 681 02:57 681 02:57:52 681 02:57:52 681 02:57:52 681 02:57:52 681 02:57:52.0 681 02:57:52.0 681 02:57:52 681 02:57:52.0 681 02:57:52.02 681 02:57:52.02 681 02:57:52 681 02:57:52.0 681 02:57:52.02 681 02:57:52.016 681 02:57:52.016 681 02:57:52 681 02:57:52.0 681 02:57:52.02 681 02:57:52.016 681 02:57:52.0156 681 02:57:52.0156 681 02:57:52 681 02:57:52.0 681 02:57:52.02 681 02:57:52.016 681 02:57:52.0156 681 02:57:52.01565 681 02:57:52.01565 ***** ****** ******* 16360:45 16360:45 16360:45 16360:45 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44.9 16360:45:44.9 16360:45:44.9 16360:45:44.9 16360:45:44 16360:45:44.9 16360:45:44.87 16360:45:44.87 16360:45:44.87 16360:45:44.87 16360:45:44 16360:45:44.9 16360:45:44.87 16360:45:44.865 16360:45:44.865 16360:45:44.865 16360:45:44.865 ******** 681 16:45 681 16:45 681 16:45 681 16:45:44 681 16:45:44 681 16:45:44 681 16:45:44 681 16:45:44.9 681 16:45:44.9 681 16:45:44 681 16:45:44.9 681 16:45:44.87 681 16:45:44.87 681 16:45:44 681 16:45:44.9 681 16:45:44.87 681 16:45:44.865 681 16:45:44.865 681 16:45:44 681 16:45:44.9 681 16:45:44.87 681 16:45:44.865 681 16:45:44.8653 681 16:45:44.8653 681 16:45:44 681 16:45:44.9 681 16:45:44.87 681 16:45:44.865 681 16:45:44.8653 681 16:45:44.86529 681 16:45:44.86529 ***** ****** ******* 16365:30 16365:30 16365:30 16365:30 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57.8 16365:30:57.8 16365:30:57.8 16365:30:57.8 16365:30:57 16365:30:57.8 16365:30:57.82 16365:30:57.82 16365:30:57.82 16365:30:57.82 16365:30:57 16365:30:57.8 16365:30:57.82 16365:30:57.820 16365:30:57.820 16365:30:57.820 16365:30:57.820 ******** 681 21:30 681 21:30 681 21:30 681 21:30:57 681 21:30:57 681 21:30:57 681 21:30:57 681 21:30:57.8 681 21:30:57.8 681 21:30:57 681 21:30:57.8 681 21:30:57.82 681 21:30:57.82 681 21:30:57 681 21:30:57.8 681 21:30:57.82 681 21:30:57.820 681 21:30:57.820 681 21:30:57 681 21:30:57.8 681 21:30:57.82 681 21:30:57.820 681 21:30:57.8205 681 21:30:57.8205 681 21:30:57 681 21:30:57.8 681 21:30:57.82 681 21:30:57.820 681 21:30:57.8205 681 21:30:57.82047 681 21:30:57.82047 ***** ****** ******* 16348:25 16348:25 16348:25 16348:25 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09.2 16348:25:09.2 16348:25:09.2 16348:25:09.2 16348:25:09 16348:25:09.2 16348:25:09.15 16348:25:09.15 16348:25:09.15 16348:25:09.15 16348:25:09 16348:25:09.2 16348:25:09.15 16348:25:09.154 16348:25:09.154 16348:25:09.154 16348:25:09.154 ******** 681 04:25 681 04:25 681 04:25 681 04:25:09 681 04:25:09 681 04:25:09 681 04:25:09 681 04:25:09.2 681 04:25:09.2 681 04:25:09 681 04:25:09.2 681 04:25:09.15 681 04:25:09.15 681 04:25:09 681 04:25:09.2 681 04:25:09.15 681 04:25:09.154 681 04:25:09.154 681 04:25:09 681 04:25:09.2 681 04:25:09.15 681 04:25:09.154 681 04:25:09.1539 681 04:25:09.1539 681 04:25:09 681 04:25:09.2 681 04:25:09.15 681 04:25:09.154 681 04:25:09.1539 681 04:25:09.15395 681 04:25:09.15395 ***** ****** ******* 16350:49 16350:49 16350:49 16350:49 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27.1 16350:49:27.1 16350:49:27.1 16350:49:27.1 16350:49:27 16350:49:27.1 16350:49:27.11 16350:49:27.11 16350:49:27.11 16350:49:27.11 16350:49:27 16350:49:27.1 16350:49:27.11 16350:49:27.105 16350:49:27.105 16350:49:27.105 16350:49:27.105 ******** 681 06:49 681 06:49 681 06:49 681 06:49:27 681 06:49:27 681 06:49:27 681 06:49:27 681 06:49:27.1 681 06:49:27.1 681 06:49:27 681 06:49:27.1 681 06:49:27.11 681 06:49:27.11 681 06:49:27 681 06:49:27.1 681 06:49:27.11 681 06:49:27.105 681 06:49:27.105 681 06:49:27 681 06:49:27.1 681 06:49:27.11 681 06:49:27.105 681 06:49:27.1053 681 06:49:27.1053 681 06:49:27 681 06:49:27.1 681 06:49:27.11 681 06:49:27.105 681 06:49:27.1053 681 06:49:27.10533 681 06:49:27.10533 ***** ****** ******* 16346:57 16346:57 16346:57 16346:57 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52.5 16346:57:52.5 16346:57:52.5 16346:57:52.5 16346:57:52 16346:57:52.5 16346:57:52.48 16346:57:52.48 16346:57:52.48 16346:57:52.48 16346:57:52 16346:57:52.5 16346:57:52.48 16346:57:52.482 16346:57:52.482 16346:57:52.482 16346:57:52.482 ******** 681 02:57 681 02:57 681 02:57 681 02:57:52 681 02:57:52 681 02:57:52 681 02:57:52 681 02:57:52.5 681 02:57:52.5 681 02:57:52 681 02:57:52.5 681 02:57:52.48 681 02:57:52.48 681 02:57:52 681 02:57:52.5 681 02:57:52.48 681 02:57:52.482 681 02:57:52.482 681 02:57:52 681 02:57:52.5 681 02:57:52.48 681 02:57:52.482 681 02:57:52.4823 681 02:57:52.4823 681 02:57:52 681 02:57:52.5 681 02:57:52.48 681 02:57:52.482 681 02:57:52.4823 681 02:57:52.48229 681 02:57:52.48229 ***** ****** ******* 16360:45 16360:45 16360:45 16360:45 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44.7 16360:45:44.7 16360:45:44.7 16360:45:44.7 16360:45:44 16360:45:44.7 16360:45:44.66 16360:45:44.66 16360:45:44.66 16360:45:44.66 16360:45:44 16360:45:44.7 16360:45:44.66 16360:45:44.658 16360:45:44.658 16360:45:44.658 16360:45:44.658 ******** 681 16:45 681 16:45 681 16:45 681 16:45:44 681 16:45:44 681 16:45:44 681 16:45:44 681 16:45:44.7 681 16:45:44.7 681 16:45:44 681 16:45:44.7 681 16:45:44.66 681 16:45:44.66 681 16:45:44 681 16:45:44.7 681 16:45:44.66 681 16:45:44.658 681 16:45:44.658 681 16:45:44 681 16:45:44.7 681 16:45:44.66 681 16:45:44.658 681 16:45:44.6583 681 16:45:44.6583 681 16:45:44 681 16:45:44.7 681 16:45:44.66 681 16:45:44.658 681 16:45:44.6583 681 16:45:44.65827 681 16:45:44.65827 ***** ****** ******* 16365:30 16365:30 16365:30 16365:30 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57.6 16365:30:57.6 16365:30:57.6 16365:30:57.6 16365:30:57 16365:30:57.6 16365:30:57.58 16365:30:57.58 16365:30:57.58 16365:30:57.58 16365:30:57 16365:30:57.6 16365:30:57.58 16365:30:57.582 16365:30:57.582 16365:30:57.582 16365:30:57.582 ******** 681 21:30 681 21:30 681 21:30 681 21:30:57 681 21:30:57 681 21:30:57 681 21:30:57 681 21:30:57.6 681 21:30:57.6 681 21:30:57 681 21:30:57.6 681 21:30:57.58 681 21:30:57.58 681 21:30:57 681 21:30:57.6 681 21:30:57.58 681 21:30:57.582 681 21:30:57.582 681 21:30:57 681 21:30:57.6 681 21:30:57.58 681 21:30:57.582 681 21:30:57.5822 681 21:30:57.5822 681 21:30:57 681 21:30:57.6 681 21:30:57.58 681 21:30:57.582 681 21:30:57.5822 681 21:30:57.58219 681 21:30:57.58219 ***** ****** ******* 16366:30 16366:30 16366:30 16366:30 16366:30:04 16366:30:04 16366:30:04 16366:30:04 16366:30:04 16366:30:04 16366:30:04 16366:30:04 16366:30:04.2 16366:30:04.2 16366:30:04.2 16366:30:04.2 16366:30:04 16366:30:04.2 16366:30:04.18 16366:30:04.18 16366:30:04.18 16366:30:04.18 16366:30:04 16366:30:04.2 16366:30:04.18 16366:30:04.183 16366:30:04.183 16366:30:04.183 16366:30:04.183 ******** 681 22:30 681 22:30 681 22:30 681 22:30:04 681 22:30:04 681 22:30:04 681 22:30:04 681 22:30:04.2 681 22:30:04.2 681 22:30:04 681 22:30:04.2 681 22:30:04.18 681 22:30:04.18 681 22:30:04 681 22:30:04.2 681 22:30:04.18 681 22:30:04.183 681 22:30:04.183 681 22:30:04 681 22:30:04.2 681 22:30:04.18 681 22:30:04.183 681 22:30:04.1835 681 22:30:04.1835 681 22:30:04 681 22:30:04.2 681 22:30:04.18 681 22:30:04.183 681 22:30:04.1835 681 22:30:04.18347 681 22:30:04.18347 ***** ****** ******* 16345:56 16345:56 16345:56 16345:56 16345:56:51 16345:56:51 16345:56:51 16345:56:51 16345:56:51 16345:56:51 16345:56:51 16345:56:51 16345:56:51.6 16345:56:51.6 16345:56:51.6 16345:56:51.6 16345:56:51 16345:56:51.6 16345:56:51.59 16345:56:51.59 16345:56:51.59 16345:56:51.59 16345:56:51 16345:56:51.6 16345:56:51.59 16345:56:51.593 16345:56:51.593 16345:56:51.593 16345:56:51.593 ******** 681 01:56 681 01:56 681 01:56 681 01:56:51 681 01:56:51 681 01:56:51 681 01:56:51 681 01:56:51.6 681 01:56:51.6 681 01:56:51 681 01:56:51.6 681 01:56:51.59 681 01:56:51.59 681 01:56:51 681 01:56:51.6 681 01:56:51.59 681 01:56:51.593 681 01:56:51.593 681 01:56:51 681 01:56:51.6 681 01:56:51.59 681 01:56:51.593 681 01:56:51.5932 681 01:56:51.5932 681 01:56:51 681 01:56:51.6 681 01:56:51.59 681 01:56:51.593 681 01:56:51.5932 681 01:56:51.59319 681 01:56:51.59319 0:00 0:00 0:00:00 0:00:00 0:00:00 0:00:00 0:00:00.0 0:00:00 0:00:00.0 0:00:00.00 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00.00000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00.00000 0:00:00.000000 0 00:00 0 00:00 0 00:00:00 0 00:00:00 0 00:00:00 0 00:00:00 0 00:00:00.0 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00.00000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00.00000 0 00:00:00.000000 -4:50 -4:50 -4:50 -4:50:38 -4:50:38 -4:50:38 -4:50:38.1 -4:50:38 -4:50:38.1 -4:50:38.12 -4:50:38 -4:50:38.1 -4:50:38.12 -4:50:38.123 -4:50:38 -4:50:38.1 -4:50:38.12 -4:50:38.123 -4:50:38.1230 -4:50:38 -4:50:38.1 -4:50:38.12 -4:50:38.123 -4:50:38.1230 -4:50:38.12301 -4:50:38 -4:50:38.1 -4:50:38.12 -4:50:38.123 -4:50:38.1230 -4:50:38.12301 -4:50:38.123010 -0 04:50 -0 04:50 -0 04:50 -0 04:50:38 -0 04:50:38 -0 04:50:38 -0 04:50:38.1 -0 04:50:38 -0 04:50:38.1 -0 04:50:38.12 -0 04:50:38 -0 04:50:38.1 -0 04:50:38.12 -0 04:50:38.123 -0 04:50:38 -0 04:50:38.1 -0 04:50:38.12 -0 04:50:38.123 -0 04:50:38.1230 -0 04:50:38 -0 04:50:38.1 -0 04:50:38.12 -0 04:50:38.123 -0 04:50:38.1230 -0 04:50:38.12301 -0 04:50:38 -0 04:50:38.1 -0 04:50:38.12 -0 04:50:38.123 -0 04:50:38.1230 -0 04:50:38.12301 -0 04:50:38.123010 ***** -12:31 -12:31 -12:31 -12:31:35 -12:31:35 -12:31:35 -12:31:35 -12:31:35.2 -12:31:35.2 -12:31:35 -12:31:35.2 -12:31:35.23 -12:31:35.23 -12:31:35 -12:31:35.2 -12:31:35.23 -12:31:35.235 -12:31:35.235 -12:31:35 -12:31:35.2 -12:31:35.23 -12:31:35.235 -12:31:35.2345 -12:31:35.2345 -12:31:35 -12:31:35.2 -12:31:35.23 -12:31:35.235 -12:31:35.2345 -12:31:35.23453 -12:31:35.23453 -0 12:31 -0 12:31 -0 12:31 -0 12:31:35 -0 12:31:35 -0 12:31:35 -0 12:31:35.2 -0 12:31:35 -0 12:31:35.2 -0 12:31:35.23 -0 12:31:35 -0 12:31:35.2 -0 12:31:35.23 -0 12:31:35.235 -0 12:31:35 -0 12:31:35.2 -0 12:31:35.23 -0 12:31:35.235 -0 12:31:35.2345 -0 12:31:35 -0 12:31:35.2 -0 12:31:35.23 -0 12:31:35.235 -0 12:31:35.2345 -0 12:31:35.23453 -0 12:31:35 -0 12:31:35.2 -0 12:31:35.23 -0 12:31:35.235 -0 12:31:35.2345 -0 12:31:35.23453 -0 12:31:35.234530 ***** -12:47 -12:47 -12:47 -12:47:53 -12:47:53 -12:47:53 -12:47:53 -12:47:53.3 -12:47:53.3 -12:47:53 -12:47:53.3 -12:47:53.35 -12:47:53.35 -12:47:53 -12:47:53.3 -12:47:53.35 -12:47:53.345 -12:47:53.345 -12:47:53 -12:47:53.3 -12:47:53.35 -12:47:53.345 -12:47:53.3451 -12:47:53.3451 -12:47:53 -12:47:53.3 -12:47:53.35 -12:47:53.345 -12:47:53.3451 -12:47:53.34505 -12:47:53.34505 -0 12:47 -0 12:47 -0 12:47 -0 12:47:53 -0 12:47:53 -0 12:47:53 -0 12:47:53.3 -0 12:47:53 -0 12:47:53.3 -0 12:47:53.35 -0 12:47:53 -0 12:47:53.3 -0 12:47:53.35 -0 12:47:53.345 -0 12:47:53 -0 12:47:53.3 -0 12:47:53.35 -0 12:47:53.345 -0 12:47:53.3451 -0 12:47:53 -0 12:47:53.3 -0 12:47:53.35 -0 12:47:53.345 -0 12:47:53.3451 -0 12:47:53.34505 -0 12:47:53 -0 12:47:53.3 -0 12:47:53.35 -0 12:47:53.345 -0 12:47:53.3451 -0 12:47:53.34505 -0 12:47:53.345050 -1:26 -1:26 -1:26 -1:26:00 -1:26:00 -1:26:00 -1:26:00.5 -1:26:00 -1:26:00.5 -1:26:00.46 -1:26:00 -1:26:00.5 -1:26:00.46 -1:26:00.456 -1:26:00 -1:26:00.5 -1:26:00.46 -1:26:00.456 -1:26:00.4561 -1:26:00 -1:26:00.5 -1:26:00.46 -1:26:00.456 -1:26:00.4561 -1:26:00.45615 -1:26:00 -1:26:00.5 -1:26:00.46 -1:26:00.456 -1:26:00.4561 -1:26:00.45615 -1:26:00.456150 -0 01:26 -0 01:26 -0 01:26 -0 01:26:00 -0 01:26:00 -0 01:26:00 -0 01:26:00.5 -0 01:26:00 -0 01:26:00.5 -0 01:26:00.46 -0 01:26:00 -0 01:26:00.5 -0 01:26:00.46 -0 01:26:00.456 -0 01:26:00 -0 01:26:00.5 -0 01:26:00.46 -0 01:26:00.456 -0 01:26:00.4561 -0 01:26:00 -0 01:26:00.5 -0 01:26:00.46 -0 01:26:00.456 -0 01:26:00.4561 -0 01:26:00.45615 -0 01:26:00 -0 01:26:00.5 -0 01:26:00.46 -0 01:26:00.456 -0 01:26:00.4561 -0 01:26:00.45615 -0 01:26:00.456150 ***** -20:58 -20:58 -20:58 -20:58:11 -20:58:11 -20:58:11 -20:58:11 -20:58:11.6 -20:58:11.6 -20:58:11 -20:58:11.6 -20:58:11.57 -20:58:11.57 -20:58:11 -20:58:11.6 -20:58:11.57 -20:58:11.567 -20:58:11.567 -20:58:11 -20:58:11.6 -20:58:11.57 -20:58:11.567 -20:58:11.5668 -20:58:11.5668 -20:58:11 -20:58:11.6 -20:58:11.57 -20:58:11.567 -20:58:11.5668 -20:58:11.56677 -20:58:11.56677 -0 20:58 -0 20:58 -0 20:58 -0 20:58:11 -0 20:58:11 -0 20:58:11 -0 20:58:11.6 -0 20:58:11 -0 20:58:11.6 -0 20:58:11.57 -0 20:58:11 -0 20:58:11.6 -0 20:58:11.57 -0 20:58:11.567 -0 20:58:11 -0 20:58:11.6 -0 20:58:11.57 -0 20:58:11.567 -0 20:58:11.5668 -0 20:58:11 -0 20:58:11.6 -0 20:58:11.57 -0 20:58:11.567 -0 20:58:11.5668 -0 20:58:11.56677 -0 20:58:11 -0 20:58:11.6 -0 20:58:11.57 -0 20:58:11.567 -0 20:58:11.5668 -0 20:58:11.56677 -0 20:58:11.566770 -7:36 -7:36 -7:36 -7:36:05 -7:36:05 -7:36:05 -7:36:05.2 -7:36:05 -7:36:05.2 -7:36:05.19 -7:36:05 -7:36:05.2 -7:36:05.19 -7:36:05.190 -7:36:05 -7:36:05.2 -7:36:05.19 -7:36:05.190 -7:36:05.1896 -7:36:05 -7:36:05.2 -7:36:05.19 -7:36:05.190 -7:36:05.1896 -7:36:05.18964 -7:36:05 -7:36:05.2 -7:36:05.19 -7:36:05.190 -7:36:05.1896 -7:36:05.18964 -7:36:05.189640 -0 07:36 -0 07:36 -0 07:36 -0 07:36:05 -0 07:36:05 -0 07:36:05 -0 07:36:05.2 -0 07:36:05 -0 07:36:05.2 -0 07:36:05.19 -0 07:36:05 -0 07:36:05.2 -0 07:36:05.19 -0 07:36:05.190 -0 07:36:05 -0 07:36:05.2 -0 07:36:05.19 -0 07:36:05.190 -0 07:36:05.1896 -0 07:36:05 -0 07:36:05.2 -0 07:36:05.19 -0 07:36:05.190 -0 07:36:05.1896 -0 07:36:05.18964 -0 07:36:05 -0 07:36:05.2 -0 07:36:05.19 -0 07:36:05.190 -0 07:36:05.1896 -0 07:36:05.18964 -0 07:36:05.189640 ***** -15:43 -15:43 -15:43 -15:43:49 -15:43:49 -15:43:49 -15:43:49 -15:43:49.8 -15:43:49.8 -15:43:49 -15:43:49.8 -15:43:49.83 -15:43:49.83 -15:43:49 -15:43:49.8 -15:43:49.83 -15:43:49.831 -15:43:49.831 -15:43:49 -15:43:49.8 -15:43:49.83 -15:43:49.831 -15:43:49.8313 -15:43:49.8313 -15:43:49 -15:43:49.8 -15:43:49.83 -15:43:49.831 -15:43:49.8313 -15:43:49.83132 -15:43:49.83132 -0 15:43 -0 15:43 -0 15:43 -0 15:43:49 -0 15:43:49 -0 15:43:49 -0 15:43:49.8 -0 15:43:49 -0 15:43:49.8 -0 15:43:49.83 -0 15:43:49 -0 15:43:49.8 -0 15:43:49.83 -0 15:43:49.831 -0 15:43:49 -0 15:43:49.8 -0 15:43:49.83 -0 15:43:49.831 -0 15:43:49.8313 -0 15:43:49 -0 15:43:49.8 -0 15:43:49.83 -0 15:43:49.831 -0 15:43:49.8313 -0 15:43:49.83132 -0 15:43:49 -0 15:43:49.8 -0 15:43:49.83 -0 15:43:49.831 -0 15:43:49.8313 -0 15:43:49.83132 -0 15:43:49.831320 -4:25 -4:25 -4:25 -4:25:09 -4:25:09 -4:25:09 -4:25:09.0 -4:25:09 -4:25:09.0 -4:25:09.01 -4:25:09 -4:25:09.0 -4:25:09.01 -4:25:09.013 -4:25:09 -4:25:09.0 -4:25:09.01 -4:25:09.013 -4:25:09.0129 -4:25:09 -4:25:09.0 -4:25:09.01 -4:25:09.013 -4:25:09.0129 -4:25:09.01293 -4:25:09 -4:25:09.0 -4:25:09.01 -4:25:09.013 -4:25:09.0129 -4:25:09.01293 -4:25:09.012930 -0 04:25 -0 04:25 -0 04:25 -0 04:25:09 -0 04:25:09 -0 04:25:09 -0 04:25:09.0 -0 04:25:09 -0 04:25:09.0 -0 04:25:09.01 -0 04:25:09 -0 04:25:09.0 -0 04:25:09.01 -0 04:25:09.013 -0 04:25:09 -0 04:25:09.0 -0 04:25:09.01 -0 04:25:09.013 -0 04:25:09.0129 -0 04:25:09 -0 04:25:09.0 -0 04:25:09.01 -0 04:25:09.013 -0 04:25:09.0129 -0 04:25:09.01293 -0 04:25:09 -0 04:25:09.0 -0 04:25:09.01 -0 04:25:09.013 -0 04:25:09.0129 -0 04:25:09.01293 -0 04:25:09.012930 -6:49 -6:49 -6:49 -6:49:27 -6:49:27 -6:49:27 -6:49:27.5 -6:49:27 -6:49:27.5 -6:49:27.52 -6:49:27 -6:49:27.5 -6:49:27.52 -6:49:27.524 -6:49:27 -6:49:27.5 -6:49:27.52 -6:49:27.524 -6:49:27.5238 -6:49:27 -6:49:27.5 -6:49:27.52 -6:49:27.524 -6:49:27.5238 -6:49:27.52375 -6:49:27 -6:49:27.5 -6:49:27.52 -6:49:27.524 -6:49:27.5238 -6:49:27.52375 -6:49:27.523750 -0 06:49 -0 06:49 -0 06:49 -0 06:49:27 -0 06:49:27 -0 06:49:27 -0 06:49:27.5 -0 06:49:27 -0 06:49:27.5 -0 06:49:27.52 -0 06:49:27 -0 06:49:27.5 -0 06:49:27.52 -0 06:49:27.524 -0 06:49:27 -0 06:49:27.5 -0 06:49:27.52 -0 06:49:27.524 -0 06:49:27.5238 -0 06:49:27 -0 06:49:27.5 -0 06:49:27.52 -0 06:49:27.524 -0 06:49:27.5238 -0 06:49:27.52375 -0 06:49:27 -0 06:49:27.5 -0 06:49:27.52 -0 06:49:27.524 -0 06:49:27.5238 -0 06:49:27.52375 -0 06:49:27.523750 -2:57 -2:57 -2:57 -2:57:52 -2:57:52 -2:57:52 -2:57:52.0 -2:57:52 -2:57:52.0 -2:57:52.02 -2:57:52 -2:57:52.0 -2:57:52.02 -2:57:52.016 -2:57:52 -2:57:52.0 -2:57:52.02 -2:57:52.016 -2:57:52.0156 -2:57:52 -2:57:52.0 -2:57:52.02 -2:57:52.016 -2:57:52.0156 -2:57:52.01565 -2:57:52 -2:57:52.0 -2:57:52.02 -2:57:52.016 -2:57:52.0156 -2:57:52.01565 -2:57:52.015650 -0 02:57 -0 02:57 -0 02:57 -0 02:57:52 -0 02:57:52 -0 02:57:52 -0 02:57:52.0 -0 02:57:52 -0 02:57:52.0 -0 02:57:52.02 -0 02:57:52 -0 02:57:52.0 -0 02:57:52.02 -0 02:57:52.016 -0 02:57:52 -0 02:57:52.0 -0 02:57:52.02 -0 02:57:52.016 -0 02:57:52.0156 -0 02:57:52 -0 02:57:52.0 -0 02:57:52.02 -0 02:57:52.016 -0 02:57:52.0156 -0 02:57:52.01565 -0 02:57:52 -0 02:57:52.0 -0 02:57:52.02 -0 02:57:52.016 -0 02:57:52.0156 -0 02:57:52.01565 -0 02:57:52.015650 ***** -16:45 -16:45 -16:45 -16:45:44 -16:45:44 -16:45:44 -16:45:44 -16:45:44.9 -16:45:44.9 -16:45:44 -16:45:44.9 -16:45:44.87 -16:45:44.87 -16:45:44 -16:45:44.9 -16:45:44.87 -16:45:44.865 -16:45:44.865 -16:45:44 -16:45:44.9 -16:45:44.87 -16:45:44.865 -16:45:44.8653 -16:45:44.8653 -16:45:44 -16:45:44.9 -16:45:44.87 -16:45:44.865 -16:45:44.8653 -16:45:44.86529 -16:45:44.86529 -0 16:45 -0 16:45 -0 16:45 -0 16:45:44 -0 16:45:44 -0 16:45:44 -0 16:45:44.9 -0 16:45:44 -0 16:45:44.9 -0 16:45:44.87 -0 16:45:44 -0 16:45:44.9 -0 16:45:44.87 -0 16:45:44.865 -0 16:45:44 -0 16:45:44.9 -0 16:45:44.87 -0 16:45:44.865 -0 16:45:44.8653 -0 16:45:44 -0 16:45:44.9 -0 16:45:44.87 -0 16:45:44.865 -0 16:45:44.8653 -0 16:45:44.86529 -0 16:45:44 -0 16:45:44.9 -0 16:45:44.87 -0 16:45:44.865 -0 16:45:44.8653 -0 16:45:44.86529 -0 16:45:44.865290 ***** -21:30 -21:30 -21:30 -21:30:57 -21:30:57 -21:30:57 -21:30:57 -21:30:57.8 -21:30:57.8 -21:30:57 -21:30:57.8 -21:30:57.82 -21:30:57.82 -21:30:57 -21:30:57.8 -21:30:57.82 -21:30:57.820 -21:30:57.820 -21:30:57 -21:30:57.8 -21:30:57.82 -21:30:57.820 -21:30:57.8205 -21:30:57.8205 -21:30:57 -21:30:57.8 -21:30:57.82 -21:30:57.820 -21:30:57.8205 -21:30:57.82047 -21:30:57.82047 -0 21:30 -0 21:30 -0 21:30 -0 21:30:57 -0 21:30:57 -0 21:30:57 -0 21:30:57.8 -0 21:30:57 -0 21:30:57.8 -0 21:30:57.82 -0 21:30:57 -0 21:30:57.8 -0 21:30:57.82 -0 21:30:57.820 -0 21:30:57 -0 21:30:57.8 -0 21:30:57.82 -0 21:30:57.820 -0 21:30:57.8205 -0 21:30:57 -0 21:30:57.8 -0 21:30:57.82 -0 21:30:57.820 -0 21:30:57.8205 -0 21:30:57.82047 -0 21:30:57 -0 21:30:57.8 -0 21:30:57.82 -0 21:30:57.820 -0 21:30:57.8205 -0 21:30:57.82047 -0 21:30:57.820470 -4:25 -4:25 -4:25 -4:25:09 -4:25:09 -4:25:09 -4:25:09.2 -4:25:09 -4:25:09.2 -4:25:09.15 -4:25:09 -4:25:09.2 -4:25:09.15 -4:25:09.154 -4:25:09 -4:25:09.2 -4:25:09.15 -4:25:09.154 -4:25:09.1539 -4:25:09 -4:25:09.2 -4:25:09.15 -4:25:09.154 -4:25:09.1539 -4:25:09.15395 -4:25:09 -4:25:09.2 -4:25:09.15 -4:25:09.154 -4:25:09.1539 -4:25:09.15395 -4:25:09.153950 -0 04:25 -0 04:25 -0 04:25 -0 04:25:09 -0 04:25:09 -0 04:25:09 -0 04:25:09.2 -0 04:25:09 -0 04:25:09.2 -0 04:25:09.15 -0 04:25:09 -0 04:25:09.2 -0 04:25:09.15 -0 04:25:09.154 -0 04:25:09 -0 04:25:09.2 -0 04:25:09.15 -0 04:25:09.154 -0 04:25:09.1539 -0 04:25:09 -0 04:25:09.2 -0 04:25:09.15 -0 04:25:09.154 -0 04:25:09.1539 -0 04:25:09.15395 -0 04:25:09 -0 04:25:09.2 -0 04:25:09.15 -0 04:25:09.154 -0 04:25:09.1539 -0 04:25:09.15395 -0 04:25:09.153950 -6:49 -6:49 -6:49 -6:49:27 -6:49:27 -6:49:27 -6:49:27.1 -6:49:27 -6:49:27.1 -6:49:27.11 -6:49:27 -6:49:27.1 -6:49:27.11 -6:49:27.105 -6:49:27 -6:49:27.1 -6:49:27.11 -6:49:27.105 -6:49:27.1053 -6:49:27 -6:49:27.1 -6:49:27.11 -6:49:27.105 -6:49:27.1053 -6:49:27.10533 -6:49:27 -6:49:27.1 -6:49:27.11 -6:49:27.105 -6:49:27.1053 -6:49:27.10533 -6:49:27.105330 -0 06:49 -0 06:49 -0 06:49 -0 06:49:27 -0 06:49:27 -0 06:49:27 -0 06:49:27.1 -0 06:49:27 -0 06:49:27.1 -0 06:49:27.11 -0 06:49:27 -0 06:49:27.1 -0 06:49:27.11 -0 06:49:27.105 -0 06:49:27 -0 06:49:27.1 -0 06:49:27.11 -0 06:49:27.105 -0 06:49:27.1053 -0 06:49:27 -0 06:49:27.1 -0 06:49:27.11 -0 06:49:27.105 -0 06:49:27.1053 -0 06:49:27.10533 -0 06:49:27 -0 06:49:27.1 -0 06:49:27.11 -0 06:49:27.105 -0 06:49:27.1053 -0 06:49:27.10533 -0 06:49:27.105330 -2:57 -2:57 -2:57 -2:57:52 -2:57:52 -2:57:52 -2:57:52.5 -2:57:52 -2:57:52.5 -2:57:52.48 -2:57:52 -2:57:52.5 -2:57:52.48 -2:57:52.482 -2:57:52 -2:57:52.5 -2:57:52.48 -2:57:52.482 -2:57:52.4823 -2:57:52 -2:57:52.5 -2:57:52.48 -2:57:52.482 -2:57:52.4823 -2:57:52.48229 -2:57:52 -2:57:52.5 -2:57:52.48 -2:57:52.482 -2:57:52.4823 -2:57:52.48229 -2:57:52.482290 -0 02:57 -0 02:57 -0 02:57 -0 02:57:52 -0 02:57:52 -0 02:57:52 -0 02:57:52.5 -0 02:57:52 -0 02:57:52.5 -0 02:57:52.48 -0 02:57:52 -0 02:57:52.5 -0 02:57:52.48 -0 02:57:52.482 -0 02:57:52 -0 02:57:52.5 -0 02:57:52.48 -0 02:57:52.482 -0 02:57:52.4823 -0 02:57:52 -0 02:57:52.5 -0 02:57:52.48 -0 02:57:52.482 -0 02:57:52.4823 -0 02:57:52.48229 -0 02:57:52 -0 02:57:52.5 -0 02:57:52.48 -0 02:57:52.482 -0 02:57:52.4823 -0 02:57:52.48229 -0 02:57:52.482290 ***** -16:45 -16:45 -16:45 -16:45:44 -16:45:44 -16:45:44 -16:45:44 -16:45:44.7 -16:45:44.7 -16:45:44 -16:45:44.7 -16:45:44.66 -16:45:44.66 -16:45:44 -16:45:44.7 -16:45:44.66 -16:45:44.658 -16:45:44.658 -16:45:44 -16:45:44.7 -16:45:44.66 -16:45:44.658 -16:45:44.6583 -16:45:44.6583 -16:45:44 -16:45:44.7 -16:45:44.66 -16:45:44.658 -16:45:44.6583 -16:45:44.65827 -16:45:44.65827 -0 16:45 -0 16:45 -0 16:45 -0 16:45:44 -0 16:45:44 -0 16:45:44 -0 16:45:44.7 -0 16:45:44 -0 16:45:44.7 -0 16:45:44.66 -0 16:45:44 -0 16:45:44.7 -0 16:45:44.66 -0 16:45:44.658 -0 16:45:44 -0 16:45:44.7 -0 16:45:44.66 -0 16:45:44.658 -0 16:45:44.6583 -0 16:45:44 -0 16:45:44.7 -0 16:45:44.66 -0 16:45:44.658 -0 16:45:44.6583 -0 16:45:44.65827 -0 16:45:44 -0 16:45:44.7 -0 16:45:44.66 -0 16:45:44.658 -0 16:45:44.6583 -0 16:45:44.65827 -0 16:45:44.658270 ***** -21:30 -21:30 -21:30 -21:30:57 -21:30:57 -21:30:57 -21:30:57 -21:30:57.6 -21:30:57.6 -21:30:57 -21:30:57.6 -21:30:57.58 -21:30:57.58 -21:30:57 -21:30:57.6 -21:30:57.58 -21:30:57.582 -21:30:57.582 -21:30:57 -21:30:57.6 -21:30:57.58 -21:30:57.582 -21:30:57.5822 -21:30:57.5822 -21:30:57 -21:30:57.6 -21:30:57.58 -21:30:57.582 -21:30:57.5822 -21:30:57.58219 -21:30:57.58219 -0 21:30 -0 21:30 -0 21:30 -0 21:30:57 -0 21:30:57 -0 21:30:57 -0 21:30:57.6 -0 21:30:57 -0 21:30:57.6 -0 21:30:57.58 -0 21:30:57 -0 21:30:57.6 -0 21:30:57.58 -0 21:30:57.582 -0 21:30:57 -0 21:30:57.6 -0 21:30:57.58 -0 21:30:57.582 -0 21:30:57.5822 -0 21:30:57 -0 21:30:57.6 -0 21:30:57.58 -0 21:30:57.582 -0 21:30:57.5822 -0 21:30:57.58219 -0 21:30:57 -0 21:30:57.6 -0 21:30:57.58 -0 21:30:57.582 -0 21:30:57.5822 -0 21:30:57.58219 -0 21:30:57.582190 ***** -22:30 -22:30 -22:30 -22:30:04 -22:30:04 -22:30:04 -22:30:04 -22:30:04.2 -22:30:04.2 -22:30:04 -22:30:04.2 -22:30:04.18 -22:30:04.18 -22:30:04 -22:30:04.2 -22:30:04.18 -22:30:04.183 -22:30:04.183 -22:30:04 -22:30:04.2 -22:30:04.18 -22:30:04.183 -22:30:04.1835 -22:30:04.1835 -22:30:04 -22:30:04.2 -22:30:04.18 -22:30:04.183 -22:30:04.1835 -22:30:04.18347 -22:30:04.18347 -0 22:30 -0 22:30 -0 22:30 -0 22:30:04 -0 22:30:04 -0 22:30:04 -0 22:30:04.2 -0 22:30:04 -0 22:30:04.2 -0 22:30:04.18 -0 22:30:04 -0 22:30:04.2 -0 22:30:04.18 -0 22:30:04.183 -0 22:30:04 -0 22:30:04.2 -0 22:30:04.18 -0 22:30:04.183 -0 22:30:04.1835 -0 22:30:04 -0 22:30:04.2 -0 22:30:04.18 -0 22:30:04.183 -0 22:30:04.1835 -0 22:30:04.18347 -0 22:30:04 -0 22:30:04.2 -0 22:30:04.18 -0 22:30:04.183 -0 22:30:04.1835 -0 22:30:04.18347 -0 22:30:04.183470 -1:56 -1:56 -1:56 -1:56:51 -1:56:51 -1:56:51 -1:56:51.6 -1:56:51 -1:56:51.6 -1:56:51.59 -1:56:51 -1:56:51.6 -1:56:51.59 -1:56:51.593 -1:56:51 -1:56:51.6 -1:56:51.59 -1:56:51.593 -1:56:51.5932 -1:56:51 -1:56:51.6 -1:56:51.59 -1:56:51.593 -1:56:51.5932 -1:56:51.59319 -1:56:51 -1:56:51.6 -1:56:51.59 -1:56:51.593 -1:56:51.5932 -1:56:51.59319 -1:56:51.593190 -0 01:56 -0 01:56 -0 01:56 -0 01:56:51 -0 01:56:51 -0 01:56:51 -0 01:56:51.6 -0 01:56:51 -0 01:56:51.6 -0 01:56:51.59 -0 01:56:51 -0 01:56:51.6 -0 01:56:51.59 -0 01:56:51.593 -0 01:56:51 -0 01:56:51.6 -0 01:56:51.59 -0 01:56:51.593 -0 01:56:51.5932 -0 01:56:51 -0 01:56:51.6 -0 01:56:51.59 -0 01:56:51.593 -0 01:56:51.5932 -0 01:56:51.59319 -0 01:56:51 -0 01:56:51.6 -0 01:56:51.59 -0 01:56:51.593 -0 01:56:51.5932 -0 01:56:51.59319 -0 01:56:51.593190 ***** -24:00 -24:00 -24:00 -24:00:00 -24:00:00 -24:00:00 -24:00:00 -24:00:00.0 -24:00:00.0 -24:00:00 -24:00:00.0 -24:00:00.00 -24:00:00.00 -24:00:00 -24:00:00.0 -24:00:00.00 -24:00:00.000 -24:00:00.000 -24:00:00 -24:00:00.0 -24:00:00.00 -24:00:00.000 -24:00:00.0000 -24:00:00.0000 -24:00:00 -24:00:00.0 -24:00:00.00 -24:00:00.000 -24:00:00.0000 -24:00:00.00000 -24:00:00.00000 -1 00:00 -1 00:00 -1 00:00 -1 00:00:00 -1 00:00:00 -1 00:00:00 -1 00:00:00.0 -1 00:00:00 -1 00:00:00.0 -1 00:00:00.00 -1 00:00:00 -1 00:00:00.0 -1 00:00:00.00 -1 00:00:00.000 -1 00:00:00 -1 00:00:00.0 -1 00:00:00.00 -1 00:00:00.000 -1 00:00:00.0000 -1 00:00:00 -1 00:00:00.0 -1 00:00:00.00 -1 00:00:00.000 -1 00:00:00.0000 -1 00:00:00.00000 -1 00:00:00 -1 00:00:00.0 -1 00:00:00.00 -1 00:00:00.000 -1 00:00:00.0000 -1 00:00:00.00000 -1 00:00:00.000000 ***** -28:50 -28:50 -28:50 -28:50:38 -28:50:38 -28:50:38 -28:50:38 -28:50:38.1 -28:50:38.1 -28:50:38 -28:50:38.1 -28:50:38.12 -28:50:38.12 -28:50:38 -28:50:38.1 -28:50:38.12 -28:50:38.123 -28:50:38.123 -28:50:38 -28:50:38.1 -28:50:38.12 -28:50:38.123 -28:50:38.1230 -28:50:38.1230 -28:50:38 -28:50:38.1 -28:50:38.12 -28:50:38.123 -28:50:38.1230 -28:50:38.12301 -28:50:38.12301 -1 04:50 -1 04:50 -1 04:50 -1 04:50:38 -1 04:50:38 -1 04:50:38 -1 04:50:38.1 -1 04:50:38 -1 04:50:38.1 -1 04:50:38.12 -1 04:50:38 -1 04:50:38.1 -1 04:50:38.12 -1 04:50:38.123 -1 04:50:38 -1 04:50:38.1 -1 04:50:38.12 -1 04:50:38.123 -1 04:50:38.1230 -1 04:50:38 -1 04:50:38.1 -1 04:50:38.12 -1 04:50:38.123 -1 04:50:38.1230 -1 04:50:38.12301 -1 04:50:38 -1 04:50:38.1 -1 04:50:38.12 -1 04:50:38.123 -1 04:50:38.1230 -1 04:50:38.12301 -1 04:50:38.123010 ***** -36:31 -36:31 -36:31 -36:31:35 -36:31:35 -36:31:35 -36:31:35 -36:31:35.2 -36:31:35.2 -36:31:35 -36:31:35.2 -36:31:35.23 -36:31:35.23 -36:31:35 -36:31:35.2 -36:31:35.23 -36:31:35.235 -36:31:35.235 -36:31:35 -36:31:35.2 -36:31:35.23 -36:31:35.235 -36:31:35.2345 -36:31:35.2345 -36:31:35 -36:31:35.2 -36:31:35.23 -36:31:35.235 -36:31:35.2345 -36:31:35.23453 -36:31:35.23453 -1 12:31 -1 12:31 -1 12:31 -1 12:31:35 -1 12:31:35 -1 12:31:35 -1 12:31:35.2 -1 12:31:35 -1 12:31:35.2 -1 12:31:35.23 -1 12:31:35 -1 12:31:35.2 -1 12:31:35.23 -1 12:31:35.235 -1 12:31:35 -1 12:31:35.2 -1 12:31:35.23 -1 12:31:35.235 -1 12:31:35.2345 -1 12:31:35 -1 12:31:35.2 -1 12:31:35.23 -1 12:31:35.235 -1 12:31:35.2345 -1 12:31:35.23453 -1 12:31:35 -1 12:31:35.2 -1 12:31:35.23 -1 12:31:35.235 -1 12:31:35.2345 -1 12:31:35.23453 -1 12:31:35.234530 ***** -36:47 -36:47 -36:47 -36:47:53 -36:47:53 -36:47:53 -36:47:53 -36:47:53.3 -36:47:53.3 -36:47:53 -36:47:53.3 -36:47:53.35 -36:47:53.35 -36:47:53 -36:47:53.3 -36:47:53.35 -36:47:53.345 -36:47:53.345 -36:47:53 -36:47:53.3 -36:47:53.35 -36:47:53.345 -36:47:53.3451 -36:47:53.3451 -36:47:53 -36:47:53.3 -36:47:53.35 -36:47:53.345 -36:47:53.3451 -36:47:53.34505 -36:47:53.34505 -1 12:47 -1 12:47 -1 12:47 -1 12:47:53 -1 12:47:53 -1 12:47:53 -1 12:47:53.3 -1 12:47:53 -1 12:47:53.3 -1 12:47:53.35 -1 12:47:53 -1 12:47:53.3 -1 12:47:53.35 -1 12:47:53.345 -1 12:47:53 -1 12:47:53.3 -1 12:47:53.35 -1 12:47:53.345 -1 12:47:53.3451 -1 12:47:53 -1 12:47:53.3 -1 12:47:53.35 -1 12:47:53.345 -1 12:47:53.3451 -1 12:47:53.34505 -1 12:47:53 -1 12:47:53.3 -1 12:47:53.35 -1 12:47:53.345 -1 12:47:53.3451 -1 12:47:53.34505 -1 12:47:53.345050 ***** -25:26 -25:26 -25:26 -25:26:00 -25:26:00 -25:26:00 -25:26:00 -25:26:00.5 -25:26:00.5 -25:26:00 -25:26:00.5 -25:26:00.46 -25:26:00.46 -25:26:00 -25:26:00.5 -25:26:00.46 -25:26:00.456 -25:26:00.456 -25:26:00 -25:26:00.5 -25:26:00.46 -25:26:00.456 -25:26:00.4561 -25:26:00.4561 -25:26:00 -25:26:00.5 -25:26:00.46 -25:26:00.456 -25:26:00.4561 -25:26:00.45615 -25:26:00.45615 -1 01:26 -1 01:26 -1 01:26 -1 01:26:00 -1 01:26:00 -1 01:26:00 -1 01:26:00.5 -1 01:26:00 -1 01:26:00.5 -1 01:26:00.46 -1 01:26:00 -1 01:26:00.5 -1 01:26:00.46 -1 01:26:00.456 -1 01:26:00 -1 01:26:00.5 -1 01:26:00.46 -1 01:26:00.456 -1 01:26:00.4561 -1 01:26:00 -1 01:26:00.5 -1 01:26:00.46 -1 01:26:00.456 -1 01:26:00.4561 -1 01:26:00.45615 -1 01:26:00 -1 01:26:00.5 -1 01:26:00.46 -1 01:26:00.456 -1 01:26:00.4561 -1 01:26:00.45615 -1 01:26:00.456150 ***** -44:58 -44:58 -44:58 -44:58:11 -44:58:11 -44:58:11 -44:58:11 -44:58:11.6 -44:58:11.6 -44:58:11 -44:58:11.6 -44:58:11.57 -44:58:11.57 -44:58:11 -44:58:11.6 -44:58:11.57 -44:58:11.567 -44:58:11.567 -44:58:11 -44:58:11.6 -44:58:11.57 -44:58:11.567 -44:58:11.5668 -44:58:11.5668 -44:58:11 -44:58:11.6 -44:58:11.57 -44:58:11.567 -44:58:11.5668 -44:58:11.56677 -44:58:11.56677 -1 20:58 -1 20:58 -1 20:58 -1 20:58:11 -1 20:58:11 -1 20:58:11 -1 20:58:11.6 -1 20:58:11 -1 20:58:11.6 -1 20:58:11.57 -1 20:58:11 -1 20:58:11.6 -1 20:58:11.57 -1 20:58:11.567 -1 20:58:11 -1 20:58:11.6 -1 20:58:11.57 -1 20:58:11.567 -1 20:58:11.5668 -1 20:58:11 -1 20:58:11.6 -1 20:58:11.57 -1 20:58:11.567 -1 20:58:11.5668 -1 20:58:11.56677 -1 20:58:11 -1 20:58:11.6 -1 20:58:11.57 -1 20:58:11.567 -1 20:58:11.5668 -1 20:58:11.56677 -1 20:58:11.566770 ***** -31:36 -31:36 -31:36 -31:36:05 -31:36:05 -31:36:05 -31:36:05 -31:36:05.2 -31:36:05.2 -31:36:05 -31:36:05.2 -31:36:05.19 -31:36:05.19 -31:36:05 -31:36:05.2 -31:36:05.19 -31:36:05.190 -31:36:05.190 -31:36:05 -31:36:05.2 -31:36:05.19 -31:36:05.190 -31:36:05.1896 -31:36:05.1896 -31:36:05 -31:36:05.2 -31:36:05.19 -31:36:05.190 -31:36:05.1896 -31:36:05.18964 -31:36:05.18964 -1 07:36 -1 07:36 -1 07:36 -1 07:36:05 -1 07:36:05 -1 07:36:05 -1 07:36:05.2 -1 07:36:05 -1 07:36:05.2 -1 07:36:05.19 -1 07:36:05 -1 07:36:05.2 -1 07:36:05.19 -1 07:36:05.190 -1 07:36:05 -1 07:36:05.2 -1 07:36:05.19 -1 07:36:05.190 -1 07:36:05.1896 -1 07:36:05 -1 07:36:05.2 -1 07:36:05.19 -1 07:36:05.190 -1 07:36:05.1896 -1 07:36:05.18964 -1 07:36:05 -1 07:36:05.2 -1 07:36:05.19 -1 07:36:05.190 -1 07:36:05.1896 -1 07:36:05.18964 -1 07:36:05.189640 ***** -39:43 -39:43 -39:43 -39:43:49 -39:43:49 -39:43:49 -39:43:49 -39:43:49.8 -39:43:49.8 -39:43:49 -39:43:49.8 -39:43:49.83 -39:43:49.83 -39:43:49 -39:43:49.8 -39:43:49.83 -39:43:49.831 -39:43:49.831 -39:43:49 -39:43:49.8 -39:43:49.83 -39:43:49.831 -39:43:49.8313 -39:43:49.8313 -39:43:49 -39:43:49.8 -39:43:49.83 -39:43:49.831 -39:43:49.8313 -39:43:49.83132 -39:43:49.83132 -1 15:43 -1 15:43 -1 15:43 -1 15:43:49 -1 15:43:49 -1 15:43:49 -1 15:43:49.8 -1 15:43:49 -1 15:43:49.8 -1 15:43:49.83 -1 15:43:49 -1 15:43:49.8 -1 15:43:49.83 -1 15:43:49.831 -1 15:43:49 -1 15:43:49.8 -1 15:43:49.83 -1 15:43:49.831 -1 15:43:49.8313 -1 15:43:49 -1 15:43:49.8 -1 15:43:49.83 -1 15:43:49.831 -1 15:43:49.8313 -1 15:43:49.83132 -1 15:43:49 -1 15:43:49.8 -1 15:43:49.83 -1 15:43:49.831 -1 15:43:49.8313 -1 15:43:49.83132 -1 15:43:49.831320 ***** -28:25 -28:25 -28:25 -28:25:09 -28:25:09 -28:25:09 -28:25:09 -28:25:09.0 -28:25:09.0 -28:25:09 -28:25:09.0 -28:25:09.01 -28:25:09.01 -28:25:09 -28:25:09.0 -28:25:09.01 -28:25:09.013 -28:25:09.013 -28:25:09 -28:25:09.0 -28:25:09.01 -28:25:09.013 -28:25:09.0129 -28:25:09.0129 -28:25:09 -28:25:09.0 -28:25:09.01 -28:25:09.013 -28:25:09.0129 -28:25:09.01293 -28:25:09.01293 -1 04:25 -1 04:25 -1 04:25 -1 04:25:09 -1 04:25:09 -1 04:25:09 -1 04:25:09.0 -1 04:25:09 -1 04:25:09.0 -1 04:25:09.01 -1 04:25:09 -1 04:25:09.0 -1 04:25:09.01 -1 04:25:09.013 -1 04:25:09 -1 04:25:09.0 -1 04:25:09.01 -1 04:25:09.013 -1 04:25:09.0129 -1 04:25:09 -1 04:25:09.0 -1 04:25:09.01 -1 04:25:09.013 -1 04:25:09.0129 -1 04:25:09.01293 -1 04:25:09 -1 04:25:09.0 -1 04:25:09.01 -1 04:25:09.013 -1 04:25:09.0129 -1 04:25:09.01293 -1 04:25:09.012930 ***** -30:49 -30:49 -30:49 -30:49:27 -30:49:27 -30:49:27 -30:49:27 -30:49:27.5 -30:49:27.5 -30:49:27 -30:49:27.5 -30:49:27.52 -30:49:27.52 -30:49:27 -30:49:27.5 -30:49:27.52 -30:49:27.524 -30:49:27.524 -30:49:27 -30:49:27.5 -30:49:27.52 -30:49:27.524 -30:49:27.5237 -30:49:27.5237 -30:49:27 -30:49:27.5 -30:49:27.52 -30:49:27.524 -30:49:27.5237 -30:49:27.52375 -30:49:27.52375 -1 06:49 -1 06:49 -1 06:49 -1 06:49:27 -1 06:49:27 -1 06:49:27 -1 06:49:27.5 -1 06:49:27 -1 06:49:27.5 -1 06:49:27.52 -1 06:49:27 -1 06:49:27.5 -1 06:49:27.52 -1 06:49:27.524 -1 06:49:27 -1 06:49:27.5 -1 06:49:27.52 -1 06:49:27.524 -1 06:49:27.5237 -1 06:49:27 -1 06:49:27.5 -1 06:49:27.52 -1 06:49:27.524 -1 06:49:27.5237 -1 06:49:27.52375 -1 06:49:27 -1 06:49:27.5 -1 06:49:27.52 -1 06:49:27.524 -1 06:49:27.5237 -1 06:49:27.52375 -1 06:49:27.523750 ***** -26:57 -26:57 -26:57 -26:57:52 -26:57:52 -26:57:52 -26:57:52 -26:57:52.0 -26:57:52.0 -26:57:52 -26:57:52.0 -26:57:52.02 -26:57:52.02 -26:57:52 -26:57:52.0 -26:57:52.02 -26:57:52.016 -26:57:52.016 -26:57:52 -26:57:52.0 -26:57:52.02 -26:57:52.016 -26:57:52.0157 -26:57:52.0157 -26:57:52 -26:57:52.0 -26:57:52.02 -26:57:52.016 -26:57:52.0157 -26:57:52.01565 -26:57:52.01565 -1 02:57 -1 02:57 -1 02:57 -1 02:57:52 -1 02:57:52 -1 02:57:52 -1 02:57:52.0 -1 02:57:52 -1 02:57:52.0 -1 02:57:52.02 -1 02:57:52 -1 02:57:52.0 -1 02:57:52.02 -1 02:57:52.016 -1 02:57:52 -1 02:57:52.0 -1 02:57:52.02 -1 02:57:52.016 -1 02:57:52.0157 -1 02:57:52 -1 02:57:52.0 -1 02:57:52.02 -1 02:57:52.016 -1 02:57:52.0157 -1 02:57:52.01565 -1 02:57:52 -1 02:57:52.0 -1 02:57:52.02 -1 02:57:52.016 -1 02:57:52.0157 -1 02:57:52.01565 -1 02:57:52.015650 ***** -40:45 -40:45 -40:45 -40:45:44 -40:45:44 -40:45:44 -40:45:44 -40:45:44.9 -40:45:44.9 -40:45:44 -40:45:44.9 -40:45:44.87 -40:45:44.87 -40:45:44 -40:45:44.9 -40:45:44.87 -40:45:44.865 -40:45:44.865 -40:45:44 -40:45:44.9 -40:45:44.87 -40:45:44.865 -40:45:44.8653 -40:45:44.8653 -40:45:44 -40:45:44.9 -40:45:44.87 -40:45:44.865 -40:45:44.8653 -40:45:44.86529 -40:45:44.86529 -1 16:45 -1 16:45 -1 16:45 -1 16:45:44 -1 16:45:44 -1 16:45:44 -1 16:45:44.9 -1 16:45:44 -1 16:45:44.9 -1 16:45:44.87 -1 16:45:44 -1 16:45:44.9 -1 16:45:44.87 -1 16:45:44.865 -1 16:45:44 -1 16:45:44.9 -1 16:45:44.87 -1 16:45:44.865 -1 16:45:44.8653 -1 16:45:44 -1 16:45:44.9 -1 16:45:44.87 -1 16:45:44.865 -1 16:45:44.8653 -1 16:45:44.86529 -1 16:45:44 -1 16:45:44.9 -1 16:45:44.87 -1 16:45:44.865 -1 16:45:44.8653 -1 16:45:44.86529 -1 16:45:44.865290 ***** -45:30 -45:30 -45:30 -45:30:57 -45:30:57 -45:30:57 -45:30:57 -45:30:57.8 -45:30:57.8 -45:30:57 -45:30:57.8 -45:30:57.82 -45:30:57.82 -45:30:57 -45:30:57.8 -45:30:57.82 -45:30:57.820 -45:30:57.820 -45:30:57 -45:30:57.8 -45:30:57.82 -45:30:57.820 -45:30:57.8205 -45:30:57.8205 -45:30:57 -45:30:57.8 -45:30:57.82 -45:30:57.820 -45:30:57.8205 -45:30:57.82047 -45:30:57.82047 -1 21:30 -1 21:30 -1 21:30 -1 21:30:57 -1 21:30:57 -1 21:30:57 -1 21:30:57.8 -1 21:30:57 -1 21:30:57.8 -1 21:30:57.82 -1 21:30:57 -1 21:30:57.8 -1 21:30:57.82 -1 21:30:57.820 -1 21:30:57 -1 21:30:57.8 -1 21:30:57.82 -1 21:30:57.820 -1 21:30:57.8205 -1 21:30:57 -1 21:30:57.8 -1 21:30:57.82 -1 21:30:57.820 -1 21:30:57.8205 -1 21:30:57.82047 -1 21:30:57 -1 21:30:57.8 -1 21:30:57.82 -1 21:30:57.820 -1 21:30:57.8205 -1 21:30:57.82047 -1 21:30:57.820470 ***** -28:25 -28:25 -28:25 -28:25:09 -28:25:09 -28:25:09 -28:25:09 -28:25:09.2 -28:25:09.2 -28:25:09 -28:25:09.2 -28:25:09.15 -28:25:09.15 -28:25:09 -28:25:09.2 -28:25:09.15 -28:25:09.154 -28:25:09.154 -28:25:09 -28:25:09.2 -28:25:09.15 -28:25:09.154 -28:25:09.1540 -28:25:09.1540 -28:25:09 -28:25:09.2 -28:25:09.15 -28:25:09.154 -28:25:09.1540 -28:25:09.15395 -28:25:09.15395 -1 04:25 -1 04:25 -1 04:25 -1 04:25:09 -1 04:25:09 -1 04:25:09 -1 04:25:09.2 -1 04:25:09 -1 04:25:09.2 -1 04:25:09.15 -1 04:25:09 -1 04:25:09.2 -1 04:25:09.15 -1 04:25:09.154 -1 04:25:09 -1 04:25:09.2 -1 04:25:09.15 -1 04:25:09.154 -1 04:25:09.1540 -1 04:25:09 -1 04:25:09.2 -1 04:25:09.15 -1 04:25:09.154 -1 04:25:09.1540 -1 04:25:09.15395 -1 04:25:09 -1 04:25:09.2 -1 04:25:09.15 -1 04:25:09.154 -1 04:25:09.1540 -1 04:25:09.15395 -1 04:25:09.153950 ***** -30:49 -30:49 -30:49 -30:49:27 -30:49:27 -30:49:27 -30:49:27 -30:49:27.1 -30:49:27.1 -30:49:27 -30:49:27.1 -30:49:27.11 -30:49:27.11 -30:49:27 -30:49:27.1 -30:49:27.11 -30:49:27.105 -30:49:27.105 -30:49:27 -30:49:27.1 -30:49:27.11 -30:49:27.105 -30:49:27.1053 -30:49:27.1053 -30:49:27 -30:49:27.1 -30:49:27.11 -30:49:27.105 -30:49:27.1053 -30:49:27.10533 -30:49:27.10533 -1 06:49 -1 06:49 -1 06:49 -1 06:49:27 -1 06:49:27 -1 06:49:27 -1 06:49:27.1 -1 06:49:27 -1 06:49:27.1 -1 06:49:27.11 -1 06:49:27 -1 06:49:27.1 -1 06:49:27.11 -1 06:49:27.105 -1 06:49:27 -1 06:49:27.1 -1 06:49:27.11 -1 06:49:27.105 -1 06:49:27.1053 -1 06:49:27 -1 06:49:27.1 -1 06:49:27.11 -1 06:49:27.105 -1 06:49:27.1053 -1 06:49:27.10533 -1 06:49:27 -1 06:49:27.1 -1 06:49:27.11 -1 06:49:27.105 -1 06:49:27.1053 -1 06:49:27.10533 -1 06:49:27.105330 ***** -26:57 -26:57 -26:57 -26:57:52 -26:57:52 -26:57:52 -26:57:52 -26:57:52.5 -26:57:52.5 -26:57:52 -26:57:52.5 -26:57:52.48 -26:57:52.48 -26:57:52 -26:57:52.5 -26:57:52.48 -26:57:52.482 -26:57:52.482 -26:57:52 -26:57:52.5 -26:57:52.48 -26:57:52.482 -26:57:52.4823 -26:57:52.4823 -26:57:52 -26:57:52.5 -26:57:52.48 -26:57:52.482 -26:57:52.4823 -26:57:52.48229 -26:57:52.48229 -1 02:57 -1 02:57 -1 02:57 -1 02:57:52 -1 02:57:52 -1 02:57:52 -1 02:57:52.5 -1 02:57:52 -1 02:57:52.5 -1 02:57:52.48 -1 02:57:52 -1 02:57:52.5 -1 02:57:52.48 -1 02:57:52.482 -1 02:57:52 -1 02:57:52.5 -1 02:57:52.48 -1 02:57:52.482 -1 02:57:52.4823 -1 02:57:52 -1 02:57:52.5 -1 02:57:52.48 -1 02:57:52.482 -1 02:57:52.4823 -1 02:57:52.48229 -1 02:57:52 -1 02:57:52.5 -1 02:57:52.48 -1 02:57:52.482 -1 02:57:52.4823 -1 02:57:52.48229 -1 02:57:52.482290 ***** -40:45 -40:45 -40:45 -40:45:44 -40:45:44 -40:45:44 -40:45:44 -40:45:44.7 -40:45:44.7 -40:45:44 -40:45:44.7 -40:45:44.66 -40:45:44.66 -40:45:44 -40:45:44.7 -40:45:44.66 -40:45:44.658 -40:45:44.658 -40:45:44 -40:45:44.7 -40:45:44.66 -40:45:44.658 -40:45:44.6583 -40:45:44.6583 -40:45:44 -40:45:44.7 -40:45:44.66 -40:45:44.658 -40:45:44.6583 -40:45:44.65827 -40:45:44.65827 -1 16:45 -1 16:45 -1 16:45 -1 16:45:44 -1 16:45:44 -1 16:45:44 -1 16:45:44.7 -1 16:45:44 -1 16:45:44.7 -1 16:45:44.66 -1 16:45:44 -1 16:45:44.7 -1 16:45:44.66 -1 16:45:44.658 -1 16:45:44 -1 16:45:44.7 -1 16:45:44.66 -1 16:45:44.658 -1 16:45:44.6583 -1 16:45:44 -1 16:45:44.7 -1 16:45:44.66 -1 16:45:44.658 -1 16:45:44.6583 -1 16:45:44.65827 -1 16:45:44 -1 16:45:44.7 -1 16:45:44.66 -1 16:45:44.658 -1 16:45:44.6583 -1 16:45:44.65827 -1 16:45:44.658270 ***** -45:30 -45:30 -45:30 -45:30:57 -45:30:57 -45:30:57 -45:30:57 -45:30:57.6 -45:30:57.6 -45:30:57 -45:30:57.6 -45:30:57.58 -45:30:57.58 -45:30:57 -45:30:57.6 -45:30:57.58 -45:30:57.582 -45:30:57.582 -45:30:57 -45:30:57.6 -45:30:57.58 -45:30:57.582 -45:30:57.5822 -45:30:57.5822 -45:30:57 -45:30:57.6 -45:30:57.58 -45:30:57.582 -45:30:57.5822 -45:30:57.58219 -45:30:57.58219 -1 21:30 -1 21:30 -1 21:30 -1 21:30:57 -1 21:30:57 -1 21:30:57 -1 21:30:57.6 -1 21:30:57 -1 21:30:57.6 -1 21:30:57.58 -1 21:30:57 -1 21:30:57.6 -1 21:30:57.58 -1 21:30:57.582 -1 21:30:57 -1 21:30:57.6 -1 21:30:57.58 -1 21:30:57.582 -1 21:30:57.5822 -1 21:30:57 -1 21:30:57.6 -1 21:30:57.58 -1 21:30:57.582 -1 21:30:57.5822 -1 21:30:57.58219 -1 21:30:57 -1 21:30:57.6 -1 21:30:57.58 -1 21:30:57.582 -1 21:30:57.5822 -1 21:30:57.58219 -1 21:30:57.582190 ***** -46:30 -46:30 -46:30 -46:30:04 -46:30:04 -46:30:04 -46:30:04 -46:30:04.2 -46:30:04.2 -46:30:04 -46:30:04.2 -46:30:04.18 -46:30:04.18 -46:30:04 -46:30:04.2 -46:30:04.18 -46:30:04.183 -46:30:04.183 -46:30:04 -46:30:04.2 -46:30:04.18 -46:30:04.183 -46:30:04.1835 -46:30:04.1835 -46:30:04 -46:30:04.2 -46:30:04.18 -46:30:04.183 -46:30:04.1835 -46:30:04.18347 -46:30:04.18347 -1 22:30 -1 22:30 -1 22:30 -1 22:30:04 -1 22:30:04 -1 22:30:04 -1 22:30:04.2 -1 22:30:04 -1 22:30:04.2 -1 22:30:04.18 -1 22:30:04 -1 22:30:04.2 -1 22:30:04.18 -1 22:30:04.183 -1 22:30:04 -1 22:30:04.2 -1 22:30:04.18 -1 22:30:04.183 -1 22:30:04.1835 -1 22:30:04 -1 22:30:04.2 -1 22:30:04.18 -1 22:30:04.183 -1 22:30:04.1835 -1 22:30:04.18347 -1 22:30:04 -1 22:30:04.2 -1 22:30:04.18 -1 22:30:04.183 -1 22:30:04.1835 -1 22:30:04.18347 -1 22:30:04.183470 ***** -25:56 -25:56 -25:56 -25:56:51 -25:56:51 -25:56:51 -25:56:51 -25:56:51.6 -25:56:51.6 -25:56:51 -25:56:51.6 -25:56:51.59 -25:56:51.59 -25:56:51 -25:56:51.6 -25:56:51.59 -25:56:51.593 -25:56:51.593 -25:56:51 -25:56:51.6 -25:56:51.59 -25:56:51.593 -25:56:51.5932 -25:56:51.5932 -25:56:51 -25:56:51.6 -25:56:51.59 -25:56:51.593 -25:56:51.5932 -25:56:51.59319 -25:56:51.59319 -1 01:56 -1 01:56 -1 01:56 -1 01:56:51 -1 01:56:51 -1 01:56:51 -1 01:56:51.6 -1 01:56:51 -1 01:56:51.6 -1 01:56:51.59 -1 01:56:51 -1 01:56:51.6 -1 01:56:51.59 -1 01:56:51.593 -1 01:56:51 -1 01:56:51.6 -1 01:56:51.59 -1 01:56:51.593 -1 01:56:51.5932 -1 01:56:51 -1 01:56:51.6 -1 01:56:51.59 -1 01:56:51.593 -1 01:56:51.5932 -1 01:56:51.59319 -1 01:56:51 -1 01:56:51.6 -1 01:56:51.59 -1 01:56:51.593 -1 01:56:51.5932 -1 01:56:51.59319 -1 01:56:51.593190 ***** -48:00 -48:00 -48:00 -48:00:00 -48:00:00 -48:00:00 -48:00:00 -48:00:00.0 -48:00:00.0 -48:00:00 -48:00:00.0 -48:00:00.00 -48:00:00.00 -48:00:00 -48:00:00.0 -48:00:00.00 -48:00:00.000 -48:00:00.000 -48:00:00 -48:00:00.0 -48:00:00.00 -48:00:00.000 -48:00:00.0000 -48:00:00.0000 -48:00:00 -48:00:00.0 -48:00:00.00 -48:00:00.000 -48:00:00.0000 -48:00:00.00000 -48:00:00.00000 -2 00:00 -2 00:00 -2 00:00 -2 00:00:00 -2 00:00:00 -2 00:00:00 -2 00:00:00.0 -2 00:00:00 -2 00:00:00.0 -2 00:00:00.00 -2 00:00:00 -2 00:00:00.0 -2 00:00:00.00 -2 00:00:00.000 -2 00:00:00 -2 00:00:00.0 -2 00:00:00.00 -2 00:00:00.000 -2 00:00:00.0000 -2 00:00:00 -2 00:00:00.0 -2 00:00:00.00 -2 00:00:00.000 -2 00:00:00.0000 -2 00:00:00.00000 -2 00:00:00 -2 00:00:00.0 -2 00:00:00.00 -2 00:00:00.000 -2 00:00:00.0000 -2 00:00:00.00000 -2 00:00:00.000000 ***** -52:50 -52:50 -52:50 -52:50:38 -52:50:38 -52:50:38 -52:50:38 -52:50:38.1 -52:50:38.1 -52:50:38 -52:50:38.1 -52:50:38.12 -52:50:38.12 -52:50:38 -52:50:38.1 -52:50:38.12 -52:50:38.123 -52:50:38.123 -52:50:38 -52:50:38.1 -52:50:38.12 -52:50:38.123 -52:50:38.1230 -52:50:38.1230 -52:50:38 -52:50:38.1 -52:50:38.12 -52:50:38.123 -52:50:38.1230 -52:50:38.12301 -52:50:38.12301 -2 04:50 -2 04:50 -2 04:50 -2 04:50:38 -2 04:50:38 -2 04:50:38 -2 04:50:38.1 -2 04:50:38 -2 04:50:38.1 -2 04:50:38.12 -2 04:50:38 -2 04:50:38.1 -2 04:50:38.12 -2 04:50:38.123 -2 04:50:38 -2 04:50:38.1 -2 04:50:38.12 -2 04:50:38.123 -2 04:50:38.1230 -2 04:50:38 -2 04:50:38.1 -2 04:50:38.12 -2 04:50:38.123 -2 04:50:38.1230 -2 04:50:38.12301 -2 04:50:38 -2 04:50:38.1 -2 04:50:38.12 -2 04:50:38.123 -2 04:50:38.1230 -2 04:50:38.12301 -2 04:50:38.123010 ***** -60:31 -60:31 -60:31 -60:31:35 -60:31:35 -60:31:35 -60:31:35 -60:31:35.2 -60:31:35.2 -60:31:35 -60:31:35.2 -60:31:35.23 -60:31:35.23 -60:31:35 -60:31:35.2 -60:31:35.23 -60:31:35.235 -60:31:35.235 -60:31:35 -60:31:35.2 -60:31:35.23 -60:31:35.235 -60:31:35.2345 -60:31:35.2345 -60:31:35 -60:31:35.2 -60:31:35.23 -60:31:35.235 -60:31:35.2345 -60:31:35.23453 -60:31:35.23453 -2 12:31 -2 12:31 -2 12:31 -2 12:31:35 -2 12:31:35 -2 12:31:35 -2 12:31:35.2 -2 12:31:35 -2 12:31:35.2 -2 12:31:35.23 -2 12:31:35 -2 12:31:35.2 -2 12:31:35.23 -2 12:31:35.235 -2 12:31:35 -2 12:31:35.2 -2 12:31:35.23 -2 12:31:35.235 -2 12:31:35.2345 -2 12:31:35 -2 12:31:35.2 -2 12:31:35.23 -2 12:31:35.235 -2 12:31:35.2345 -2 12:31:35.23453 -2 12:31:35 -2 12:31:35.2 -2 12:31:35.23 -2 12:31:35.235 -2 12:31:35.2345 -2 12:31:35.23453 -2 12:31:35.234530 ***** -60:47 -60:47 -60:47 -60:47:53 -60:47:53 -60:47:53 -60:47:53 -60:47:53.3 -60:47:53.3 -60:47:53 -60:47:53.3 -60:47:53.35 -60:47:53.35 -60:47:53 -60:47:53.3 -60:47:53.35 -60:47:53.345 -60:47:53.345 -60:47:53 -60:47:53.3 -60:47:53.35 -60:47:53.345 -60:47:53.3451 -60:47:53.3451 -60:47:53 -60:47:53.3 -60:47:53.35 -60:47:53.345 -60:47:53.3451 -60:47:53.34505 -60:47:53.34505 -2 12:47 -2 12:47 -2 12:47 -2 12:47:53 -2 12:47:53 -2 12:47:53 -2 12:47:53.3 -2 12:47:53 -2 12:47:53.3 -2 12:47:53.35 -2 12:47:53 -2 12:47:53.3 -2 12:47:53.35 -2 12:47:53.345 -2 12:47:53 -2 12:47:53.3 -2 12:47:53.35 -2 12:47:53.345 -2 12:47:53.3451 -2 12:47:53 -2 12:47:53.3 -2 12:47:53.35 -2 12:47:53.345 -2 12:47:53.3451 -2 12:47:53.34505 -2 12:47:53 -2 12:47:53.3 -2 12:47:53.35 -2 12:47:53.345 -2 12:47:53.3451 -2 12:47:53.34505 -2 12:47:53.345050 ***** -49:26 -49:26 -49:26 -49:26:00 -49:26:00 -49:26:00 -49:26:00 -49:26:00.5 -49:26:00.5 -49:26:00 -49:26:00.5 -49:26:00.46 -49:26:00.46 -49:26:00 -49:26:00.5 -49:26:00.46 -49:26:00.456 -49:26:00.456 -49:26:00 -49:26:00.5 -49:26:00.46 -49:26:00.456 -49:26:00.4562 -49:26:00.4562 -49:26:00 -49:26:00.5 -49:26:00.46 -49:26:00.456 -49:26:00.4562 -49:26:00.45615 -49:26:00.45615 -2 01:26 -2 01:26 -2 01:26 -2 01:26:00 -2 01:26:00 -2 01:26:00 -2 01:26:00.5 -2 01:26:00 -2 01:26:00.5 -2 01:26:00.46 -2 01:26:00 -2 01:26:00.5 -2 01:26:00.46 -2 01:26:00.456 -2 01:26:00 -2 01:26:00.5 -2 01:26:00.46 -2 01:26:00.456 -2 01:26:00.4562 -2 01:26:00 -2 01:26:00.5 -2 01:26:00.46 -2 01:26:00.456 -2 01:26:00.4562 -2 01:26:00.45615 -2 01:26:00 -2 01:26:00.5 -2 01:26:00.46 -2 01:26:00.456 -2 01:26:00.4562 -2 01:26:00.45615 -2 01:26:00.456150 ***** -68:58 -68:58 -68:58 -68:58:11 -68:58:11 -68:58:11 -68:58:11 -68:58:11.6 -68:58:11.6 -68:58:11 -68:58:11.6 -68:58:11.57 -68:58:11.57 -68:58:11 -68:58:11.6 -68:58:11.57 -68:58:11.567 -68:58:11.567 -68:58:11 -68:58:11.6 -68:58:11.57 -68:58:11.567 -68:58:11.5668 -68:58:11.5668 -68:58:11 -68:58:11.6 -68:58:11.57 -68:58:11.567 -68:58:11.5668 -68:58:11.56677 -68:58:11.56677 -2 20:58 -2 20:58 -2 20:58 -2 20:58:11 -2 20:58:11 -2 20:58:11 -2 20:58:11.6 -2 20:58:11 -2 20:58:11.6 -2 20:58:11.57 -2 20:58:11 -2 20:58:11.6 -2 20:58:11.57 -2 20:58:11.567 -2 20:58:11 -2 20:58:11.6 -2 20:58:11.57 -2 20:58:11.567 -2 20:58:11.5668 -2 20:58:11 -2 20:58:11.6 -2 20:58:11.57 -2 20:58:11.567 -2 20:58:11.5668 -2 20:58:11.56677 -2 20:58:11 -2 20:58:11.6 -2 20:58:11.57 -2 20:58:11.567 -2 20:58:11.5668 -2 20:58:11.56677 -2 20:58:11.566770 ***** -55:36 -55:36 -55:36 -55:36:05 -55:36:05 -55:36:05 -55:36:05 -55:36:05.2 -55:36:05.2 -55:36:05 -55:36:05.2 -55:36:05.19 -55:36:05.19 -55:36:05 -55:36:05.2 -55:36:05.19 -55:36:05.190 -55:36:05.190 -55:36:05 -55:36:05.2 -55:36:05.19 -55:36:05.190 -55:36:05.1896 -55:36:05.1896 -55:36:05 -55:36:05.2 -55:36:05.19 -55:36:05.190 -55:36:05.1896 -55:36:05.18964 -55:36:05.18964 -2 07:36 -2 07:36 -2 07:36 -2 07:36:05 -2 07:36:05 -2 07:36:05 -2 07:36:05.2 -2 07:36:05 -2 07:36:05.2 -2 07:36:05.19 -2 07:36:05 -2 07:36:05.2 -2 07:36:05.19 -2 07:36:05.190 -2 07:36:05 -2 07:36:05.2 -2 07:36:05.19 -2 07:36:05.190 -2 07:36:05.1896 -2 07:36:05 -2 07:36:05.2 -2 07:36:05.19 -2 07:36:05.190 -2 07:36:05.1896 -2 07:36:05.18964 -2 07:36:05 -2 07:36:05.2 -2 07:36:05.19 -2 07:36:05.190 -2 07:36:05.1896 -2 07:36:05.18964 -2 07:36:05.189640 ***** -63:43 -63:43 -63:43 -63:43:49 -63:43:49 -63:43:49 -63:43:49 -63:43:49.8 -63:43:49.8 -63:43:49 -63:43:49.8 -63:43:49.83 -63:43:49.83 -63:43:49 -63:43:49.8 -63:43:49.83 -63:43:49.831 -63:43:49.831 -63:43:49 -63:43:49.8 -63:43:49.83 -63:43:49.831 -63:43:49.8313 -63:43:49.8313 -63:43:49 -63:43:49.8 -63:43:49.83 -63:43:49.831 -63:43:49.8313 -63:43:49.83132 -63:43:49.83132 -2 15:43 -2 15:43 -2 15:43 -2 15:43:49 -2 15:43:49 -2 15:43:49 -2 15:43:49.8 -2 15:43:49 -2 15:43:49.8 -2 15:43:49.83 -2 15:43:49 -2 15:43:49.8 -2 15:43:49.83 -2 15:43:49.831 -2 15:43:49 -2 15:43:49.8 -2 15:43:49.83 -2 15:43:49.831 -2 15:43:49.8313 -2 15:43:49 -2 15:43:49.8 -2 15:43:49.83 -2 15:43:49.831 -2 15:43:49.8313 -2 15:43:49.83132 -2 15:43:49 -2 15:43:49.8 -2 15:43:49.83 -2 15:43:49.831 -2 15:43:49.8313 -2 15:43:49.83132 -2 15:43:49.831320 ***** -52:25 -52:25 -52:25 -52:25:09 -52:25:09 -52:25:09 -52:25:09 -52:25:09.0 -52:25:09.0 -52:25:09 -52:25:09.0 -52:25:09.01 -52:25:09.01 -52:25:09 -52:25:09.0 -52:25:09.01 -52:25:09.013 -52:25:09.013 -52:25:09 -52:25:09.0 -52:25:09.01 -52:25:09.013 -52:25:09.0129 -52:25:09.0129 -52:25:09 -52:25:09.0 -52:25:09.01 -52:25:09.013 -52:25:09.0129 -52:25:09.01293 -52:25:09.01293 -2 04:25 -2 04:25 -2 04:25 -2 04:25:09 -2 04:25:09 -2 04:25:09 -2 04:25:09.0 -2 04:25:09 -2 04:25:09.0 -2 04:25:09.01 -2 04:25:09 -2 04:25:09.0 -2 04:25:09.01 -2 04:25:09.013 -2 04:25:09 -2 04:25:09.0 -2 04:25:09.01 -2 04:25:09.013 -2 04:25:09.0129 -2 04:25:09 -2 04:25:09.0 -2 04:25:09.01 -2 04:25:09.013 -2 04:25:09.0129 -2 04:25:09.01293 -2 04:25:09 -2 04:25:09.0 -2 04:25:09.01 -2 04:25:09.013 -2 04:25:09.0129 -2 04:25:09.01293 -2 04:25:09.012930 ***** -54:49 -54:49 -54:49 -54:49:27 -54:49:27 -54:49:27 -54:49:27 -54:49:27.5 -54:49:27.5 -54:49:27 -54:49:27.5 -54:49:27.52 -54:49:27.52 -54:49:27 -54:49:27.5 -54:49:27.52 -54:49:27.524 -54:49:27.524 -54:49:27 -54:49:27.5 -54:49:27.52 -54:49:27.524 -54:49:27.5237 -54:49:27.5237 -54:49:27 -54:49:27.5 -54:49:27.52 -54:49:27.524 -54:49:27.5237 -54:49:27.52375 -54:49:27.52375 -2 06:49 -2 06:49 -2 06:49 -2 06:49:27 -2 06:49:27 -2 06:49:27 -2 06:49:27.5 -2 06:49:27 -2 06:49:27.5 -2 06:49:27.52 -2 06:49:27 -2 06:49:27.5 -2 06:49:27.52 -2 06:49:27.524 -2 06:49:27 -2 06:49:27.5 -2 06:49:27.52 -2 06:49:27.524 -2 06:49:27.5237 -2 06:49:27 -2 06:49:27.5 -2 06:49:27.52 -2 06:49:27.524 -2 06:49:27.5237 -2 06:49:27.52375 -2 06:49:27 -2 06:49:27.5 -2 06:49:27.52 -2 06:49:27.524 -2 06:49:27.5237 -2 06:49:27.52375 -2 06:49:27.523750 ***** -50:57 -50:57 -50:57 -50:57:52 -50:57:52 -50:57:52 -50:57:52 -50:57:52.0 -50:57:52.0 -50:57:52 -50:57:52.0 -50:57:52.02 -50:57:52.02 -50:57:52 -50:57:52.0 -50:57:52.02 -50:57:52.016 -50:57:52.016 -50:57:52 -50:57:52.0 -50:57:52.02 -50:57:52.016 -50:57:52.0156 -50:57:52.0156 -50:57:52 -50:57:52.0 -50:57:52.02 -50:57:52.016 -50:57:52.0156 -50:57:52.01565 -50:57:52.01565 -2 02:57 -2 02:57 -2 02:57 -2 02:57:52 -2 02:57:52 -2 02:57:52 -2 02:57:52.0 -2 02:57:52 -2 02:57:52.0 -2 02:57:52.02 -2 02:57:52 -2 02:57:52.0 -2 02:57:52.02 -2 02:57:52.016 -2 02:57:52 -2 02:57:52.0 -2 02:57:52.02 -2 02:57:52.016 -2 02:57:52.0156 -2 02:57:52 -2 02:57:52.0 -2 02:57:52.02 -2 02:57:52.016 -2 02:57:52.0156 -2 02:57:52.01565 -2 02:57:52 -2 02:57:52.0 -2 02:57:52.02 -2 02:57:52.016 -2 02:57:52.0156 -2 02:57:52.01565 -2 02:57:52.015650 ***** -64:45 -64:45 -64:45 -64:45:44 -64:45:44 -64:45:44 -64:45:44 -64:45:44.9 -64:45:44.9 -64:45:44 -64:45:44.9 -64:45:44.87 -64:45:44.87 -64:45:44 -64:45:44.9 -64:45:44.87 -64:45:44.865 -64:45:44.865 -64:45:44 -64:45:44.9 -64:45:44.87 -64:45:44.865 -64:45:44.8653 -64:45:44.8653 -64:45:44 -64:45:44.9 -64:45:44.87 -64:45:44.865 -64:45:44.8653 -64:45:44.86529 -64:45:44.86529 -2 16:45 -2 16:45 -2 16:45 -2 16:45:44 -2 16:45:44 -2 16:45:44 -2 16:45:44.9 -2 16:45:44 -2 16:45:44.9 -2 16:45:44.87 -2 16:45:44 -2 16:45:44.9 -2 16:45:44.87 -2 16:45:44.865 -2 16:45:44 -2 16:45:44.9 -2 16:45:44.87 -2 16:45:44.865 -2 16:45:44.8653 -2 16:45:44 -2 16:45:44.9 -2 16:45:44.87 -2 16:45:44.865 -2 16:45:44.8653 -2 16:45:44.86529 -2 16:45:44 -2 16:45:44.9 -2 16:45:44.87 -2 16:45:44.865 -2 16:45:44.8653 -2 16:45:44.86529 -2 16:45:44.865290 ***** -69:30 -69:30 -69:30 -69:30:57 -69:30:57 -69:30:57 -69:30:57 -69:30:57.8 -69:30:57.8 -69:30:57 -69:30:57.8 -69:30:57.82 -69:30:57.82 -69:30:57 -69:30:57.8 -69:30:57.82 -69:30:57.820 -69:30:57.820 -69:30:57 -69:30:57.8 -69:30:57.82 -69:30:57.820 -69:30:57.8205 -69:30:57.8205 -69:30:57 -69:30:57.8 -69:30:57.82 -69:30:57.820 -69:30:57.8205 -69:30:57.82047 -69:30:57.82047 -2 21:30 -2 21:30 -2 21:30 -2 21:30:57 -2 21:30:57 -2 21:30:57 -2 21:30:57.8 -2 21:30:57 -2 21:30:57.8 -2 21:30:57.82 -2 21:30:57 -2 21:30:57.8 -2 21:30:57.82 -2 21:30:57.820 -2 21:30:57 -2 21:30:57.8 -2 21:30:57.82 -2 21:30:57.820 -2 21:30:57.8205 -2 21:30:57 -2 21:30:57.8 -2 21:30:57.82 -2 21:30:57.820 -2 21:30:57.8205 -2 21:30:57.82047 -2 21:30:57 -2 21:30:57.8 -2 21:30:57.82 -2 21:30:57.820 -2 21:30:57.8205 -2 21:30:57.82047 -2 21:30:57.820470 ***** -52:25 -52:25 -52:25 -52:25:09 -52:25:09 -52:25:09 -52:25:09 -52:25:09.2 -52:25:09.2 -52:25:09 -52:25:09.2 -52:25:09.15 -52:25:09.15 -52:25:09 -52:25:09.2 -52:25:09.15 -52:25:09.154 -52:25:09.154 -52:25:09 -52:25:09.2 -52:25:09.15 -52:25:09.154 -52:25:09.1540 -52:25:09.1540 -52:25:09 -52:25:09.2 -52:25:09.15 -52:25:09.154 -52:25:09.1540 -52:25:09.15395 -52:25:09.15395 -2 04:25 -2 04:25 -2 04:25 -2 04:25:09 -2 04:25:09 -2 04:25:09 -2 04:25:09.2 -2 04:25:09 -2 04:25:09.2 -2 04:25:09.15 -2 04:25:09 -2 04:25:09.2 -2 04:25:09.15 -2 04:25:09.154 -2 04:25:09 -2 04:25:09.2 -2 04:25:09.15 -2 04:25:09.154 -2 04:25:09.1540 -2 04:25:09 -2 04:25:09.2 -2 04:25:09.15 -2 04:25:09.154 -2 04:25:09.1540 -2 04:25:09.15395 -2 04:25:09 -2 04:25:09.2 -2 04:25:09.15 -2 04:25:09.154 -2 04:25:09.1540 -2 04:25:09.15395 -2 04:25:09.153950 ***** -54:49 -54:49 -54:49 -54:49:27 -54:49:27 -54:49:27 -54:49:27 -54:49:27.1 -54:49:27.1 -54:49:27 -54:49:27.1 -54:49:27.11 -54:49:27.11 -54:49:27 -54:49:27.1 -54:49:27.11 -54:49:27.105 -54:49:27.105 -54:49:27 -54:49:27.1 -54:49:27.11 -54:49:27.105 -54:49:27.1053 -54:49:27.1053 -54:49:27 -54:49:27.1 -54:49:27.11 -54:49:27.105 -54:49:27.1053 -54:49:27.10533 -54:49:27.10533 -2 06:49 -2 06:49 -2 06:49 -2 06:49:27 -2 06:49:27 -2 06:49:27 -2 06:49:27.1 -2 06:49:27 -2 06:49:27.1 -2 06:49:27.11 -2 06:49:27 -2 06:49:27.1 -2 06:49:27.11 -2 06:49:27.105 -2 06:49:27 -2 06:49:27.1 -2 06:49:27.11 -2 06:49:27.105 -2 06:49:27.1053 -2 06:49:27 -2 06:49:27.1 -2 06:49:27.11 -2 06:49:27.105 -2 06:49:27.1053 -2 06:49:27.10533 -2 06:49:27 -2 06:49:27.1 -2 06:49:27.11 -2 06:49:27.105 -2 06:49:27.1053 -2 06:49:27.10533 -2 06:49:27.105330 ***** -50:57 -50:57 -50:57 -50:57:52 -50:57:52 -50:57:52 -50:57:52 -50:57:52.5 -50:57:52.5 -50:57:52 -50:57:52.5 -50:57:52.48 -50:57:52.48 -50:57:52 -50:57:52.5 -50:57:52.48 -50:57:52.482 -50:57:52.482 -50:57:52 -50:57:52.5 -50:57:52.48 -50:57:52.482 -50:57:52.4823 -50:57:52.4823 -50:57:52 -50:57:52.5 -50:57:52.48 -50:57:52.482 -50:57:52.4823 -50:57:52.48229 -50:57:52.48229 -2 02:57 -2 02:57 -2 02:57 -2 02:57:52 -2 02:57:52 -2 02:57:52 -2 02:57:52.5 -2 02:57:52 -2 02:57:52.5 -2 02:57:52.48 -2 02:57:52 -2 02:57:52.5 -2 02:57:52.48 -2 02:57:52.482 -2 02:57:52 -2 02:57:52.5 -2 02:57:52.48 -2 02:57:52.482 -2 02:57:52.4823 -2 02:57:52 -2 02:57:52.5 -2 02:57:52.48 -2 02:57:52.482 -2 02:57:52.4823 -2 02:57:52.48229 -2 02:57:52 -2 02:57:52.5 -2 02:57:52.48 -2 02:57:52.482 -2 02:57:52.4823 -2 02:57:52.48229 -2 02:57:52.482290 ***** -64:45 -64:45 -64:45 -64:45:44 -64:45:44 -64:45:44 -64:45:44 -64:45:44.7 -64:45:44.7 -64:45:44 -64:45:44.7 -64:45:44.66 -64:45:44.66 -64:45:44 -64:45:44.7 -64:45:44.66 -64:45:44.658 -64:45:44.658 -64:45:44 -64:45:44.7 -64:45:44.66 -64:45:44.658 -64:45:44.6583 -64:45:44.6583 -64:45:44 -64:45:44.7 -64:45:44.66 -64:45:44.658 -64:45:44.6583 -64:45:44.65827 -64:45:44.65827 -2 16:45 -2 16:45 -2 16:45 -2 16:45:44 -2 16:45:44 -2 16:45:44 -2 16:45:44.7 -2 16:45:44 -2 16:45:44.7 -2 16:45:44.66 -2 16:45:44 -2 16:45:44.7 -2 16:45:44.66 -2 16:45:44.658 -2 16:45:44 -2 16:45:44.7 -2 16:45:44.66 -2 16:45:44.658 -2 16:45:44.6583 -2 16:45:44 -2 16:45:44.7 -2 16:45:44.66 -2 16:45:44.658 -2 16:45:44.6583 -2 16:45:44.65827 -2 16:45:44 -2 16:45:44.7 -2 16:45:44.66 -2 16:45:44.658 -2 16:45:44.6583 -2 16:45:44.65827 -2 16:45:44.658270 ***** -69:30 -69:30 -69:30 -69:30:57 -69:30:57 -69:30:57 -69:30:57 -69:30:57.6 -69:30:57.6 -69:30:57 -69:30:57.6 -69:30:57.58 -69:30:57.58 -69:30:57 -69:30:57.6 -69:30:57.58 -69:30:57.582 -69:30:57.582 -69:30:57 -69:30:57.6 -69:30:57.58 -69:30:57.582 -69:30:57.5822 -69:30:57.5822 -69:30:57 -69:30:57.6 -69:30:57.58 -69:30:57.582 -69:30:57.5822 -69:30:57.58219 -69:30:57.58219 -2 21:30 -2 21:30 -2 21:30 -2 21:30:57 -2 21:30:57 -2 21:30:57 -2 21:30:57.6 -2 21:30:57 -2 21:30:57.6 -2 21:30:57.58 -2 21:30:57 -2 21:30:57.6 -2 21:30:57.58 -2 21:30:57.582 -2 21:30:57 -2 21:30:57.6 -2 21:30:57.58 -2 21:30:57.582 -2 21:30:57.5822 -2 21:30:57 -2 21:30:57.6 -2 21:30:57.58 -2 21:30:57.582 -2 21:30:57.5822 -2 21:30:57.58219 -2 21:30:57 -2 21:30:57.6 -2 21:30:57.58 -2 21:30:57.582 -2 21:30:57.5822 -2 21:30:57.58219 -2 21:30:57.582190 ***** -70:30 -70:30 -70:30 -70:30:04 -70:30:04 -70:30:04 -70:30:04 -70:30:04.2 -70:30:04.2 -70:30:04 -70:30:04.2 -70:30:04.18 -70:30:04.18 -70:30:04 -70:30:04.2 -70:30:04.18 -70:30:04.183 -70:30:04.183 -70:30:04 -70:30:04.2 -70:30:04.18 -70:30:04.183 -70:30:04.1835 -70:30:04.1835 -70:30:04 -70:30:04.2 -70:30:04.18 -70:30:04.183 -70:30:04.1835 -70:30:04.18347 -70:30:04.18347 -2 22:30 -2 22:30 -2 22:30 -2 22:30:04 -2 22:30:04 -2 22:30:04 -2 22:30:04.2 -2 22:30:04 -2 22:30:04.2 -2 22:30:04.18 -2 22:30:04 -2 22:30:04.2 -2 22:30:04.18 -2 22:30:04.183 -2 22:30:04 -2 22:30:04.2 -2 22:30:04.18 -2 22:30:04.183 -2 22:30:04.1835 -2 22:30:04 -2 22:30:04.2 -2 22:30:04.18 -2 22:30:04.183 -2 22:30:04.1835 -2 22:30:04.18347 -2 22:30:04 -2 22:30:04.2 -2 22:30:04.18 -2 22:30:04.183 -2 22:30:04.1835 -2 22:30:04.18347 -2 22:30:04.183470 ***** -49:56 -49:56 -49:56 -49:56:51 -49:56:51 -49:56:51 -49:56:51 -49:56:51.6 -49:56:51.6 -49:56:51 -49:56:51.6 -49:56:51.59 -49:56:51.59 -49:56:51 -49:56:51.6 -49:56:51.59 -49:56:51.593 -49:56:51.593 -49:56:51 -49:56:51.6 -49:56:51.59 -49:56:51.593 -49:56:51.5932 -49:56:51.5932 -49:56:51 -49:56:51.6 -49:56:51.59 -49:56:51.593 -49:56:51.5932 -49:56:51.59319 -49:56:51.59319 -2 01:56 -2 01:56 -2 01:56 -2 01:56:51 -2 01:56:51 -2 01:56:51 -2 01:56:51.6 -2 01:56:51 -2 01:56:51.6 -2 01:56:51.59 -2 01:56:51 -2 01:56:51.6 -2 01:56:51.59 -2 01:56:51.593 -2 01:56:51 -2 01:56:51.6 -2 01:56:51.59 -2 01:56:51.593 -2 01:56:51.5932 -2 01:56:51 -2 01:56:51.6 -2 01:56:51.59 -2 01:56:51.593 -2 01:56:51.5932 -2 01:56:51.59319 -2 01:56:51 -2 01:56:51.6 -2 01:56:51.59 -2 01:56:51.593 -2 01:56:51.5932 -2 01:56:51.59319 -2 01:56:51.593190 ***** ****** ******* -1296:00 -1296:00 -1296:00 -1296:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00.0 -1296:00:00.0 -1296:00:00.0 -1296:00:00.0 -1296:00:00 -1296:00:00.0 -1296:00:00.00 -1296:00:00.00 -1296:00:00.00 -1296:00:00.00 -1296:00:00 -1296:00:00.0 -1296:00:00.00 -1296:00:00.000 -1296:00:00.000 -1296:00:00.000 -1296:00:00.000 ******** -54 00:00 -54 00:00 -54 00:00 -54 00:00:00 -54 00:00:00 -54 00:00:00 -54 00:00:00 -54 00:00:00.0 -54 00:00:00.0 -54 00:00:00 -54 00:00:00.0 -54 00:00:00.00 -54 00:00:00.00 -54 00:00:00 -54 00:00:00.0 -54 00:00:00.00 -54 00:00:00.000 -54 00:00:00.000 -54 00:00:00 -54 00:00:00.0 -54 00:00:00.00 -54 00:00:00.000 -54 00:00:00.0000 -54 00:00:00.0000 -54 00:00:00 -54 00:00:00.0 -54 00:00:00.00 -54 00:00:00.000 -54 00:00:00.0000 -54 00:00:00.00000 -54 00:00:00.00000 ***** ****** ******* -1300:50 -1300:50 -1300:50 -1300:50 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38.1 -1300:50:38.1 -1300:50:38.1 -1300:50:38.1 -1300:50:38 -1300:50:38.1 -1300:50:38.12 -1300:50:38.12 -1300:50:38.12 -1300:50:38.12 -1300:50:38 -1300:50:38.1 -1300:50:38.12 -1300:50:38.123 -1300:50:38.123 -1300:50:38.123 -1300:50:38.123 ******** -54 04:50 -54 04:50 -54 04:50 -54 04:50:38 -54 04:50:38 -54 04:50:38 -54 04:50:38 -54 04:50:38.1 -54 04:50:38.1 -54 04:50:38 -54 04:50:38.1 -54 04:50:38.12 -54 04:50:38.12 -54 04:50:38 -54 04:50:38.1 -54 04:50:38.12 -54 04:50:38.123 -54 04:50:38.123 -54 04:50:38 -54 04:50:38.1 -54 04:50:38.12 -54 04:50:38.123 -54 04:50:38.1230 -54 04:50:38.1230 -54 04:50:38 -54 04:50:38.1 -54 04:50:38.12 -54 04:50:38.123 -54 04:50:38.1230 -54 04:50:38.12301 -54 04:50:38.12301 ***** ****** ******* -1308:31 -1308:31 -1308:31 -1308:31 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35.2 -1308:31:35.2 -1308:31:35.2 -1308:31:35.2 -1308:31:35 -1308:31:35.2 -1308:31:35.23 -1308:31:35.23 -1308:31:35.23 -1308:31:35.23 -1308:31:35 -1308:31:35.2 -1308:31:35.23 -1308:31:35.235 -1308:31:35.235 -1308:31:35.235 -1308:31:35.235 ******** -54 12:31 -54 12:31 -54 12:31 -54 12:31:35 -54 12:31:35 -54 12:31:35 -54 12:31:35 -54 12:31:35.2 -54 12:31:35.2 -54 12:31:35 -54 12:31:35.2 -54 12:31:35.23 -54 12:31:35.23 -54 12:31:35 -54 12:31:35.2 -54 12:31:35.23 -54 12:31:35.235 -54 12:31:35.235 -54 12:31:35 -54 12:31:35.2 -54 12:31:35.23 -54 12:31:35.235 -54 12:31:35.2345 -54 12:31:35.2345 -54 12:31:35 -54 12:31:35.2 -54 12:31:35.23 -54 12:31:35.235 -54 12:31:35.2345 -54 12:31:35.23453 -54 12:31:35.23453 ***** ****** ******* -1308:47 -1308:47 -1308:47 -1308:47 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53.3 -1308:47:53.3 -1308:47:53.3 -1308:47:53.3 -1308:47:53 -1308:47:53.3 -1308:47:53.35 -1308:47:53.35 -1308:47:53.35 -1308:47:53.35 -1308:47:53 -1308:47:53.3 -1308:47:53.35 -1308:47:53.345 -1308:47:53.345 -1308:47:53.345 -1308:47:53.345 ******** -54 12:47 -54 12:47 -54 12:47 -54 12:47:53 -54 12:47:53 -54 12:47:53 -54 12:47:53 -54 12:47:53.3 -54 12:47:53.3 -54 12:47:53 -54 12:47:53.3 -54 12:47:53.35 -54 12:47:53.35 -54 12:47:53 -54 12:47:53.3 -54 12:47:53.35 -54 12:47:53.345 -54 12:47:53.345 -54 12:47:53 -54 12:47:53.3 -54 12:47:53.35 -54 12:47:53.345 -54 12:47:53.3450 -54 12:47:53.3450 -54 12:47:53 -54 12:47:53.3 -54 12:47:53.35 -54 12:47:53.345 -54 12:47:53.3450 -54 12:47:53.34505 -54 12:47:53.34505 ***** ****** ******* -1297:26 -1297:26 -1297:26 -1297:26 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00.5 -1297:26:00.5 -1297:26:00.5 -1297:26:00.5 -1297:26:00 -1297:26:00.5 -1297:26:00.46 -1297:26:00.46 -1297:26:00.46 -1297:26:00.46 -1297:26:00 -1297:26:00.5 -1297:26:00.46 -1297:26:00.456 -1297:26:00.456 -1297:26:00.456 -1297:26:00.456 ******** -54 01:26 -54 01:26 -54 01:26 -54 01:26:00 -54 01:26:00 -54 01:26:00 -54 01:26:00 -54 01:26:00.5 -54 01:26:00.5 -54 01:26:00 -54 01:26:00.5 -54 01:26:00.46 -54 01:26:00.46 -54 01:26:00 -54 01:26:00.5 -54 01:26:00.46 -54 01:26:00.456 -54 01:26:00.456 -54 01:26:00 -54 01:26:00.5 -54 01:26:00.46 -54 01:26:00.456 -54 01:26:00.4561 -54 01:26:00.4561 -54 01:26:00 -54 01:26:00.5 -54 01:26:00.46 -54 01:26:00.456 -54 01:26:00.4561 -54 01:26:00.45615 -54 01:26:00.45615 ***** ****** ******* -1316:58 -1316:58 -1316:58 -1316:58 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11.6 -1316:58:11.6 -1316:58:11.6 -1316:58:11.6 -1316:58:11 -1316:58:11.6 -1316:58:11.57 -1316:58:11.57 -1316:58:11.57 -1316:58:11.57 -1316:58:11 -1316:58:11.6 -1316:58:11.57 -1316:58:11.567 -1316:58:11.567 -1316:58:11.567 -1316:58:11.567 ******** -54 20:58 -54 20:58 -54 20:58 -54 20:58:11 -54 20:58:11 -54 20:58:11 -54 20:58:11 -54 20:58:11.6 -54 20:58:11.6 -54 20:58:11 -54 20:58:11.6 -54 20:58:11.57 -54 20:58:11.57 -54 20:58:11 -54 20:58:11.6 -54 20:58:11.57 -54 20:58:11.567 -54 20:58:11.567 -54 20:58:11 -54 20:58:11.6 -54 20:58:11.57 -54 20:58:11.567 -54 20:58:11.5668 -54 20:58:11.5668 -54 20:58:11 -54 20:58:11.6 -54 20:58:11.57 -54 20:58:11.567 -54 20:58:11.5668 -54 20:58:11.56677 -54 20:58:11.56677 ***** ****** ******* -1303:36 -1303:36 -1303:36 -1303:36 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05.2 -1303:36:05.2 -1303:36:05.2 -1303:36:05.2 -1303:36:05 -1303:36:05.2 -1303:36:05.19 -1303:36:05.19 -1303:36:05.19 -1303:36:05.19 -1303:36:05 -1303:36:05.2 -1303:36:05.19 -1303:36:05.190 -1303:36:05.190 -1303:36:05.190 -1303:36:05.190 ******** -54 07:36 -54 07:36 -54 07:36 -54 07:36:05 -54 07:36:05 -54 07:36:05 -54 07:36:05 -54 07:36:05.2 -54 07:36:05.2 -54 07:36:05 -54 07:36:05.2 -54 07:36:05.19 -54 07:36:05.19 -54 07:36:05 -54 07:36:05.2 -54 07:36:05.19 -54 07:36:05.190 -54 07:36:05.190 -54 07:36:05 -54 07:36:05.2 -54 07:36:05.19 -54 07:36:05.190 -54 07:36:05.1896 -54 07:36:05.1896 -54 07:36:05 -54 07:36:05.2 -54 07:36:05.19 -54 07:36:05.190 -54 07:36:05.1896 -54 07:36:05.18964 -54 07:36:05.18964 ***** ****** ******* -1311:43 -1311:43 -1311:43 -1311:43 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49.8 -1311:43:49.8 -1311:43:49.8 -1311:43:49.8 -1311:43:49 -1311:43:49.8 -1311:43:49.83 -1311:43:49.83 -1311:43:49.83 -1311:43:49.83 -1311:43:49 -1311:43:49.8 -1311:43:49.83 -1311:43:49.831 -1311:43:49.831 -1311:43:49.831 -1311:43:49.831 ******** -54 15:43 -54 15:43 -54 15:43 -54 15:43:49 -54 15:43:49 -54 15:43:49 -54 15:43:49 -54 15:43:49.8 -54 15:43:49.8 -54 15:43:49 -54 15:43:49.8 -54 15:43:49.83 -54 15:43:49.83 -54 15:43:49 -54 15:43:49.8 -54 15:43:49.83 -54 15:43:49.831 -54 15:43:49.831 -54 15:43:49 -54 15:43:49.8 -54 15:43:49.83 -54 15:43:49.831 -54 15:43:49.8313 -54 15:43:49.8313 -54 15:43:49 -54 15:43:49.8 -54 15:43:49.83 -54 15:43:49.831 -54 15:43:49.8313 -54 15:43:49.83132 -54 15:43:49.83132 ***** ****** ******* -1300:25 -1300:25 -1300:25 -1300:25 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09.0 -1300:25:09.0 -1300:25:09.0 -1300:25:09.0 -1300:25:09 -1300:25:09.0 -1300:25:09.01 -1300:25:09.01 -1300:25:09.01 -1300:25:09.01 -1300:25:09 -1300:25:09.0 -1300:25:09.01 -1300:25:09.013 -1300:25:09.013 -1300:25:09.013 -1300:25:09.013 ******** -54 04:25 -54 04:25 -54 04:25 -54 04:25:09 -54 04:25:09 -54 04:25:09 -54 04:25:09 -54 04:25:09.0 -54 04:25:09.0 -54 04:25:09 -54 04:25:09.0 -54 04:25:09.01 -54 04:25:09.01 -54 04:25:09 -54 04:25:09.0 -54 04:25:09.01 -54 04:25:09.013 -54 04:25:09.013 -54 04:25:09 -54 04:25:09.0 -54 04:25:09.01 -54 04:25:09.013 -54 04:25:09.0129 -54 04:25:09.0129 -54 04:25:09 -54 04:25:09.0 -54 04:25:09.01 -54 04:25:09.013 -54 04:25:09.0129 -54 04:25:09.01293 -54 04:25:09.01293 ***** ****** ******* -1302:49 -1302:49 -1302:49 -1302:49 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27.5 -1302:49:27.5 -1302:49:27.5 -1302:49:27.5 -1302:49:27 -1302:49:27.5 -1302:49:27.52 -1302:49:27.52 -1302:49:27.52 -1302:49:27.52 -1302:49:27 -1302:49:27.5 -1302:49:27.52 -1302:49:27.524 -1302:49:27.524 -1302:49:27.524 -1302:49:27.524 ******** -54 06:49 -54 06:49 -54 06:49 -54 06:49:27 -54 06:49:27 -54 06:49:27 -54 06:49:27 -54 06:49:27.5 -54 06:49:27.5 -54 06:49:27 -54 06:49:27.5 -54 06:49:27.52 -54 06:49:27.52 -54 06:49:27 -54 06:49:27.5 -54 06:49:27.52 -54 06:49:27.524 -54 06:49:27.524 -54 06:49:27 -54 06:49:27.5 -54 06:49:27.52 -54 06:49:27.524 -54 06:49:27.5237 -54 06:49:27.5237 -54 06:49:27 -54 06:49:27.5 -54 06:49:27.52 -54 06:49:27.524 -54 06:49:27.5237 -54 06:49:27.52375 -54 06:49:27.52375 ***** ****** ******* -1298:57 -1298:57 -1298:57 -1298:57 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52.0 -1298:57:52.0 -1298:57:52.0 -1298:57:52.0 -1298:57:52 -1298:57:52.0 -1298:57:52.02 -1298:57:52.02 -1298:57:52.02 -1298:57:52.02 -1298:57:52 -1298:57:52.0 -1298:57:52.02 -1298:57:52.016 -1298:57:52.016 -1298:57:52.016 -1298:57:52.016 ******** -54 02:57 -54 02:57 -54 02:57 -54 02:57:52 -54 02:57:52 -54 02:57:52 -54 02:57:52 -54 02:57:52.0 -54 02:57:52.0 -54 02:57:52 -54 02:57:52.0 -54 02:57:52.02 -54 02:57:52.02 -54 02:57:52 -54 02:57:52.0 -54 02:57:52.02 -54 02:57:52.016 -54 02:57:52.016 -54 02:57:52 -54 02:57:52.0 -54 02:57:52.02 -54 02:57:52.016 -54 02:57:52.0157 -54 02:57:52.0157 -54 02:57:52 -54 02:57:52.0 -54 02:57:52.02 -54 02:57:52.016 -54 02:57:52.0157 -54 02:57:52.01565 -54 02:57:52.01565 ***** ****** ******* -1312:45 -1312:45 -1312:45 -1312:45 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44.9 -1312:45:44.9 -1312:45:44.9 -1312:45:44.9 -1312:45:44 -1312:45:44.9 -1312:45:44.87 -1312:45:44.87 -1312:45:44.87 -1312:45:44.87 -1312:45:44 -1312:45:44.9 -1312:45:44.87 -1312:45:44.865 -1312:45:44.865 -1312:45:44.865 -1312:45:44.865 ******** -54 16:45 -54 16:45 -54 16:45 -54 16:45:44 -54 16:45:44 -54 16:45:44 -54 16:45:44 -54 16:45:44.9 -54 16:45:44.9 -54 16:45:44 -54 16:45:44.9 -54 16:45:44.87 -54 16:45:44.87 -54 16:45:44 -54 16:45:44.9 -54 16:45:44.87 -54 16:45:44.865 -54 16:45:44.865 -54 16:45:44 -54 16:45:44.9 -54 16:45:44.87 -54 16:45:44.865 -54 16:45:44.8653 -54 16:45:44.8653 -54 16:45:44 -54 16:45:44.9 -54 16:45:44.87 -54 16:45:44.865 -54 16:45:44.8653 -54 16:45:44.86529 -54 16:45:44.86529 ***** ****** ******* -1317:30 -1317:30 -1317:30 -1317:30 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57.8 -1317:30:57.8 -1317:30:57.8 -1317:30:57.8 -1317:30:57 -1317:30:57.8 -1317:30:57.82 -1317:30:57.82 -1317:30:57.82 -1317:30:57.82 -1317:30:57 -1317:30:57.8 -1317:30:57.82 -1317:30:57.820 -1317:30:57.820 -1317:30:57.820 -1317:30:57.820 ******** -54 21:30 -54 21:30 -54 21:30 -54 21:30:57 -54 21:30:57 -54 21:30:57 -54 21:30:57 -54 21:30:57.8 -54 21:30:57.8 -54 21:30:57 -54 21:30:57.8 -54 21:30:57.82 -54 21:30:57.82 -54 21:30:57 -54 21:30:57.8 -54 21:30:57.82 -54 21:30:57.820 -54 21:30:57.820 -54 21:30:57 -54 21:30:57.8 -54 21:30:57.82 -54 21:30:57.820 -54 21:30:57.8205 -54 21:30:57.8205 -54 21:30:57 -54 21:30:57.8 -54 21:30:57.82 -54 21:30:57.820 -54 21:30:57.8205 -54 21:30:57.82047 -54 21:30:57.82047 ***** ****** ******* -1300:25 -1300:25 -1300:25 -1300:25 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09.2 -1300:25:09.2 -1300:25:09.2 -1300:25:09.2 -1300:25:09 -1300:25:09.2 -1300:25:09.15 -1300:25:09.15 -1300:25:09.15 -1300:25:09.15 -1300:25:09 -1300:25:09.2 -1300:25:09.15 -1300:25:09.154 -1300:25:09.154 -1300:25:09.154 -1300:25:09.154 ******** -54 04:25 -54 04:25 -54 04:25 -54 04:25:09 -54 04:25:09 -54 04:25:09 -54 04:25:09 -54 04:25:09.2 -54 04:25:09.2 -54 04:25:09 -54 04:25:09.2 -54 04:25:09.15 -54 04:25:09.15 -54 04:25:09 -54 04:25:09.2 -54 04:25:09.15 -54 04:25:09.154 -54 04:25:09.154 -54 04:25:09 -54 04:25:09.2 -54 04:25:09.15 -54 04:25:09.154 -54 04:25:09.1540 -54 04:25:09.1540 -54 04:25:09 -54 04:25:09.2 -54 04:25:09.15 -54 04:25:09.154 -54 04:25:09.1540 -54 04:25:09.15395 -54 04:25:09.15395 ***** ****** ******* -1302:49 -1302:49 -1302:49 -1302:49 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27.1 -1302:49:27.1 -1302:49:27.1 -1302:49:27.1 -1302:49:27 -1302:49:27.1 -1302:49:27.11 -1302:49:27.11 -1302:49:27.11 -1302:49:27.11 -1302:49:27 -1302:49:27.1 -1302:49:27.11 -1302:49:27.105 -1302:49:27.105 -1302:49:27.105 -1302:49:27.105 ******** -54 06:49 -54 06:49 -54 06:49 -54 06:49:27 -54 06:49:27 -54 06:49:27 -54 06:49:27 -54 06:49:27.1 -54 06:49:27.1 -54 06:49:27 -54 06:49:27.1 -54 06:49:27.11 -54 06:49:27.11 -54 06:49:27 -54 06:49:27.1 -54 06:49:27.11 -54 06:49:27.105 -54 06:49:27.105 -54 06:49:27 -54 06:49:27.1 -54 06:49:27.11 -54 06:49:27.105 -54 06:49:27.1053 -54 06:49:27.1053 -54 06:49:27 -54 06:49:27.1 -54 06:49:27.11 -54 06:49:27.105 -54 06:49:27.1053 -54 06:49:27.10533 -54 06:49:27.10533 ***** ****** ******* -1298:57 -1298:57 -1298:57 -1298:57 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52.5 -1298:57:52.5 -1298:57:52.5 -1298:57:52.5 -1298:57:52 -1298:57:52.5 -1298:57:52.48 -1298:57:52.48 -1298:57:52.48 -1298:57:52.48 -1298:57:52 -1298:57:52.5 -1298:57:52.48 -1298:57:52.482 -1298:57:52.482 -1298:57:52.482 -1298:57:52.482 ******** -54 02:57 -54 02:57 -54 02:57 -54 02:57:52 -54 02:57:52 -54 02:57:52 -54 02:57:52 -54 02:57:52.5 -54 02:57:52.5 -54 02:57:52 -54 02:57:52.5 -54 02:57:52.48 -54 02:57:52.48 -54 02:57:52 -54 02:57:52.5 -54 02:57:52.48 -54 02:57:52.482 -54 02:57:52.482 -54 02:57:52 -54 02:57:52.5 -54 02:57:52.48 -54 02:57:52.482 -54 02:57:52.4823 -54 02:57:52.4823 -54 02:57:52 -54 02:57:52.5 -54 02:57:52.48 -54 02:57:52.482 -54 02:57:52.4823 -54 02:57:52.48229 -54 02:57:52.48229 ***** ****** ******* -1312:45 -1312:45 -1312:45 -1312:45 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44.7 -1312:45:44.7 -1312:45:44.7 -1312:45:44.7 -1312:45:44 -1312:45:44.7 -1312:45:44.66 -1312:45:44.66 -1312:45:44.66 -1312:45:44.66 -1312:45:44 -1312:45:44.7 -1312:45:44.66 -1312:45:44.658 -1312:45:44.658 -1312:45:44.658 -1312:45:44.658 ******** -54 16:45 -54 16:45 -54 16:45 -54 16:45:44 -54 16:45:44 -54 16:45:44 -54 16:45:44 -54 16:45:44.7 -54 16:45:44.7 -54 16:45:44 -54 16:45:44.7 -54 16:45:44.66 -54 16:45:44.66 -54 16:45:44 -54 16:45:44.7 -54 16:45:44.66 -54 16:45:44.658 -54 16:45:44.658 -54 16:45:44 -54 16:45:44.7 -54 16:45:44.66 -54 16:45:44.658 -54 16:45:44.6583 -54 16:45:44.6583 -54 16:45:44 -54 16:45:44.7 -54 16:45:44.66 -54 16:45:44.658 -54 16:45:44.6583 -54 16:45:44.65827 -54 16:45:44.65827 ***** ****** ******* -1317:30 -1317:30 -1317:30 -1317:30 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57.6 -1317:30:57.6 -1317:30:57.6 -1317:30:57.6 -1317:30:57 -1317:30:57.6 -1317:30:57.58 -1317:30:57.58 -1317:30:57.58 -1317:30:57.58 -1317:30:57 -1317:30:57.6 -1317:30:57.58 -1317:30:57.582 -1317:30:57.582 -1317:30:57.582 -1317:30:57.582 ******** -54 21:30 -54 21:30 -54 21:30 -54 21:30:57 -54 21:30:57 -54 21:30:57 -54 21:30:57 -54 21:30:57.6 -54 21:30:57.6 -54 21:30:57 -54 21:30:57.6 -54 21:30:57.58 -54 21:30:57.58 -54 21:30:57 -54 21:30:57.6 -54 21:30:57.58 -54 21:30:57.582 -54 21:30:57.582 -54 21:30:57 -54 21:30:57.6 -54 21:30:57.58 -54 21:30:57.582 -54 21:30:57.5822 -54 21:30:57.5822 -54 21:30:57 -54 21:30:57.6 -54 21:30:57.58 -54 21:30:57.582 -54 21:30:57.5822 -54 21:30:57.58219 -54 21:30:57.58219 ***** ****** ******* -1318:30 -1318:30 -1318:30 -1318:30 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04.2 -1318:30:04.2 -1318:30:04.2 -1318:30:04.2 -1318:30:04 -1318:30:04.2 -1318:30:04.18 -1318:30:04.18 -1318:30:04.18 -1318:30:04.18 -1318:30:04 -1318:30:04.2 -1318:30:04.18 -1318:30:04.183 -1318:30:04.183 -1318:30:04.183 -1318:30:04.183 ******** -54 22:30 -54 22:30 -54 22:30 -54 22:30:04 -54 22:30:04 -54 22:30:04 -54 22:30:04 -54 22:30:04.2 -54 22:30:04.2 -54 22:30:04 -54 22:30:04.2 -54 22:30:04.18 -54 22:30:04.18 -54 22:30:04 -54 22:30:04.2 -54 22:30:04.18 -54 22:30:04.183 -54 22:30:04.183 -54 22:30:04 -54 22:30:04.2 -54 22:30:04.18 -54 22:30:04.183 -54 22:30:04.1835 -54 22:30:04.1835 -54 22:30:04 -54 22:30:04.2 -54 22:30:04.18 -54 22:30:04.183 -54 22:30:04.1835 -54 22:30:04.18347 -54 22:30:04.18347 ***** ****** ******* -1297:56 -1297:56 -1297:56 -1297:56 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51.6 -1297:56:51.6 -1297:56:51.6 -1297:56:51.6 -1297:56:51 -1297:56:51.6 -1297:56:51.59 -1297:56:51.59 -1297:56:51.59 -1297:56:51.59 -1297:56:51 -1297:56:51.6 -1297:56:51.59 -1297:56:51.593 -1297:56:51.593 -1297:56:51.593 -1297:56:51.593 ******** -54 01:56 -54 01:56 -54 01:56 -54 01:56:51 -54 01:56:51 -54 01:56:51 -54 01:56:51 -54 01:56:51.6 -54 01:56:51.6 -54 01:56:51 -54 01:56:51.6 -54 01:56:51.59 -54 01:56:51.59 -54 01:56:51 -54 01:56:51.6 -54 01:56:51.59 -54 01:56:51.593 -54 01:56:51.593 -54 01:56:51 -54 01:56:51.6 -54 01:56:51.59 -54 01:56:51.593 -54 01:56:51.5932 -54 01:56:51.5932 -54 01:56:51 -54 01:56:51.6 -54 01:56:51.59 -54 01:56:51.593 -54 01:56:51.5932 -54 01:56:51.59319 -54 01:56:51.59319 ***** ****** ******* ******** -16344:00 -16344:00 -16344:00 -16344:00 -16344:00 -16344:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00.0 -16344:00:00.0 -16344:00:00.0 -16344:00:00.0 -16344:00:00.0 -16344:00:00 -16344:00:00.0 -16344:00:00.00 -16344:00:00.00 -16344:00:00.00 -16344:00:00.00 -16344:00:00.00 ******** ********* -681 00:00 -681 00:00 -681 00:00 -681 00:00:00 -681 00:00:00 -681 00:00:00 -681 00:00:00 -681 00:00:00 -681 00:00:00 -681 00:00:00.0 -681 00:00:00.0 -681 00:00:00.0 -681 00:00:00 -681 00:00:00.0 -681 00:00:00.00 -681 00:00:00.00 -681 00:00:00.00 -681 00:00:00 -681 00:00:00.0 -681 00:00:00.00 -681 00:00:00.000 -681 00:00:00.000 -681 00:00:00.000 -681 00:00:00 -681 00:00:00.0 -681 00:00:00.00 -681 00:00:00.000 -681 00:00:00.0000 -681 00:00:00.0000 -681 00:00:00.0000 ***** ****** ******* ******** -16348:50 -16348:50 -16348:50 -16348:50 -16348:50 -16348:50 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38.1 -16348:50:38.1 -16348:50:38.1 -16348:50:38.1 -16348:50:38.1 -16348:50:38 -16348:50:38.1 -16348:50:38.12 -16348:50:38.12 -16348:50:38.12 -16348:50:38.12 -16348:50:38.12 ******** ********* -681 04:50 -681 04:50 -681 04:50 -681 04:50:38 -681 04:50:38 -681 04:50:38 -681 04:50:38 -681 04:50:38 -681 04:50:38 -681 04:50:38.1 -681 04:50:38.1 -681 04:50:38.1 -681 04:50:38 -681 04:50:38.1 -681 04:50:38.12 -681 04:50:38.12 -681 04:50:38.12 -681 04:50:38 -681 04:50:38.1 -681 04:50:38.12 -681 04:50:38.123 -681 04:50:38.123 -681 04:50:38.123 -681 04:50:38 -681 04:50:38.1 -681 04:50:38.12 -681 04:50:38.123 -681 04:50:38.1230 -681 04:50:38.1230 -681 04:50:38.1230 ***** ****** ******* ******** -16356:31 -16356:31 -16356:31 -16356:31 -16356:31 -16356:31 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35.2 -16356:31:35.2 -16356:31:35.2 -16356:31:35.2 -16356:31:35.2 -16356:31:35 -16356:31:35.2 -16356:31:35.23 -16356:31:35.23 -16356:31:35.23 -16356:31:35.23 -16356:31:35.23 ******** ********* -681 12:31 -681 12:31 -681 12:31 -681 12:31:35 -681 12:31:35 -681 12:31:35 -681 12:31:35 -681 12:31:35 -681 12:31:35 -681 12:31:35.2 -681 12:31:35.2 -681 12:31:35.2 -681 12:31:35 -681 12:31:35.2 -681 12:31:35.23 -681 12:31:35.23 -681 12:31:35.23 -681 12:31:35 -681 12:31:35.2 -681 12:31:35.23 -681 12:31:35.235 -681 12:31:35.235 -681 12:31:35.235 -681 12:31:35 -681 12:31:35.2 -681 12:31:35.23 -681 12:31:35.235 -681 12:31:35.2345 -681 12:31:35.2345 -681 12:31:35.2345 ***** ****** ******* ******** -16356:47 -16356:47 -16356:47 -16356:47 -16356:47 -16356:47 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53.3 -16356:47:53.3 -16356:47:53.3 -16356:47:53.3 -16356:47:53.3 -16356:47:53 -16356:47:53.3 -16356:47:53.35 -16356:47:53.35 -16356:47:53.35 -16356:47:53.35 -16356:47:53.35 ******** ********* -681 12:47 -681 12:47 -681 12:47 -681 12:47:53 -681 12:47:53 -681 12:47:53 -681 12:47:53 -681 12:47:53 -681 12:47:53 -681 12:47:53.3 -681 12:47:53.3 -681 12:47:53.3 -681 12:47:53 -681 12:47:53.3 -681 12:47:53.35 -681 12:47:53.35 -681 12:47:53.35 -681 12:47:53 -681 12:47:53.3 -681 12:47:53.35 -681 12:47:53.345 -681 12:47:53.345 -681 12:47:53.345 -681 12:47:53 -681 12:47:53.3 -681 12:47:53.35 -681 12:47:53.345 -681 12:47:53.3450 -681 12:47:53.3450 -681 12:47:53.3450 ***** ****** ******* ******** -16345:26 -16345:26 -16345:26 -16345:26 -16345:26 -16345:26 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00.5 -16345:26:00.5 -16345:26:00.5 -16345:26:00.5 -16345:26:00.5 -16345:26:00 -16345:26:00.5 -16345:26:00.46 -16345:26:00.46 -16345:26:00.46 -16345:26:00.46 -16345:26:00.46 ******** ********* -681 01:26 -681 01:26 -681 01:26 -681 01:26:00 -681 01:26:00 -681 01:26:00 -681 01:26:00 -681 01:26:00 -681 01:26:00 -681 01:26:00.5 -681 01:26:00.5 -681 01:26:00.5 -681 01:26:00 -681 01:26:00.5 -681 01:26:00.46 -681 01:26:00.46 -681 01:26:00.46 -681 01:26:00 -681 01:26:00.5 -681 01:26:00.46 -681 01:26:00.456 -681 01:26:00.456 -681 01:26:00.456 -681 01:26:00 -681 01:26:00.5 -681 01:26:00.46 -681 01:26:00.456 -681 01:26:00.4562 -681 01:26:00.4562 -681 01:26:00.4562 ***** ****** ******* ******** -16364:58 -16364:58 -16364:58 -16364:58 -16364:58 -16364:58 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11.6 -16364:58:11.6 -16364:58:11.6 -16364:58:11.6 -16364:58:11.6 -16364:58:11 -16364:58:11.6 -16364:58:11.57 -16364:58:11.57 -16364:58:11.57 -16364:58:11.57 -16364:58:11.57 ******** ********* -681 20:58 -681 20:58 -681 20:58 -681 20:58:11 -681 20:58:11 -681 20:58:11 -681 20:58:11 -681 20:58:11 -681 20:58:11 -681 20:58:11.6 -681 20:58:11.6 -681 20:58:11.6 -681 20:58:11 -681 20:58:11.6 -681 20:58:11.57 -681 20:58:11.57 -681 20:58:11.57 -681 20:58:11 -681 20:58:11.6 -681 20:58:11.57 -681 20:58:11.567 -681 20:58:11.567 -681 20:58:11.567 -681 20:58:11 -681 20:58:11.6 -681 20:58:11.57 -681 20:58:11.567 -681 20:58:11.5668 -681 20:58:11.5668 -681 20:58:11.5668 ***** ****** ******* ******** -16351:36 -16351:36 -16351:36 -16351:36 -16351:36 -16351:36 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05.2 -16351:36:05.2 -16351:36:05.2 -16351:36:05.2 -16351:36:05.2 -16351:36:05 -16351:36:05.2 -16351:36:05.19 -16351:36:05.19 -16351:36:05.19 -16351:36:05.19 -16351:36:05.19 ******** ********* -681 07:36 -681 07:36 -681 07:36 -681 07:36:05 -681 07:36:05 -681 07:36:05 -681 07:36:05 -681 07:36:05 -681 07:36:05 -681 07:36:05.2 -681 07:36:05.2 -681 07:36:05.2 -681 07:36:05 -681 07:36:05.2 -681 07:36:05.19 -681 07:36:05.19 -681 07:36:05.19 -681 07:36:05 -681 07:36:05.2 -681 07:36:05.19 -681 07:36:05.190 -681 07:36:05.190 -681 07:36:05.190 -681 07:36:05 -681 07:36:05.2 -681 07:36:05.19 -681 07:36:05.190 -681 07:36:05.1896 -681 07:36:05.1896 -681 07:36:05.1896 ***** ****** ******* ******** -16359:43 -16359:43 -16359:43 -16359:43 -16359:43 -16359:43 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49.8 -16359:43:49.8 -16359:43:49.8 -16359:43:49.8 -16359:43:49.8 -16359:43:49 -16359:43:49.8 -16359:43:49.83 -16359:43:49.83 -16359:43:49.83 -16359:43:49.83 -16359:43:49.83 ******** ********* -681 15:43 -681 15:43 -681 15:43 -681 15:43:49 -681 15:43:49 -681 15:43:49 -681 15:43:49 -681 15:43:49 -681 15:43:49 -681 15:43:49.8 -681 15:43:49.8 -681 15:43:49.8 -681 15:43:49 -681 15:43:49.8 -681 15:43:49.83 -681 15:43:49.83 -681 15:43:49.83 -681 15:43:49 -681 15:43:49.8 -681 15:43:49.83 -681 15:43:49.831 -681 15:43:49.831 -681 15:43:49.831 -681 15:43:49 -681 15:43:49.8 -681 15:43:49.83 -681 15:43:49.831 -681 15:43:49.8313 -681 15:43:49.8313 -681 15:43:49.8313 ***** ****** ******* ******** -16348:25 -16348:25 -16348:25 -16348:25 -16348:25 -16348:25 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09.0 -16348:25:09.0 -16348:25:09.0 -16348:25:09.0 -16348:25:09.0 -16348:25:09 -16348:25:09.0 -16348:25:09.01 -16348:25:09.01 -16348:25:09.01 -16348:25:09.01 -16348:25:09.01 ******** ********* -681 04:25 -681 04:25 -681 04:25 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09.0 -681 04:25:09.0 -681 04:25:09.0 -681 04:25:09 -681 04:25:09.0 -681 04:25:09.01 -681 04:25:09.01 -681 04:25:09.01 -681 04:25:09 -681 04:25:09.0 -681 04:25:09.01 -681 04:25:09.013 -681 04:25:09.013 -681 04:25:09.013 -681 04:25:09 -681 04:25:09.0 -681 04:25:09.01 -681 04:25:09.013 -681 04:25:09.0129 -681 04:25:09.0129 -681 04:25:09.0129 ***** ****** ******* ******** -16350:49 -16350:49 -16350:49 -16350:49 -16350:49 -16350:49 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27.5 -16350:49:27.5 -16350:49:27.5 -16350:49:27.5 -16350:49:27.5 -16350:49:27 -16350:49:27.5 -16350:49:27.52 -16350:49:27.52 -16350:49:27.52 -16350:49:27.52 -16350:49:27.52 ******** ********* -681 06:49 -681 06:49 -681 06:49 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27.5 -681 06:49:27.5 -681 06:49:27.5 -681 06:49:27 -681 06:49:27.5 -681 06:49:27.52 -681 06:49:27.52 -681 06:49:27.52 -681 06:49:27 -681 06:49:27.5 -681 06:49:27.52 -681 06:49:27.524 -681 06:49:27.524 -681 06:49:27.524 -681 06:49:27 -681 06:49:27.5 -681 06:49:27.52 -681 06:49:27.524 -681 06:49:27.5237 -681 06:49:27.5237 -681 06:49:27.5237 ***** ****** ******* ******** -16346:57 -16346:57 -16346:57 -16346:57 -16346:57 -16346:57 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52.0 -16346:57:52.0 -16346:57:52.0 -16346:57:52.0 -16346:57:52.0 -16346:57:52 -16346:57:52.0 -16346:57:52.02 -16346:57:52.02 -16346:57:52.02 -16346:57:52.02 -16346:57:52.02 ******** ********* -681 02:57 -681 02:57 -681 02:57 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52.0 -681 02:57:52.0 -681 02:57:52.0 -681 02:57:52 -681 02:57:52.0 -681 02:57:52.02 -681 02:57:52.02 -681 02:57:52.02 -681 02:57:52 -681 02:57:52.0 -681 02:57:52.02 -681 02:57:52.016 -681 02:57:52.016 -681 02:57:52.016 -681 02:57:52 -681 02:57:52.0 -681 02:57:52.02 -681 02:57:52.016 -681 02:57:52.0156 -681 02:57:52.0156 -681 02:57:52.0156 ***** ****** ******* ******** -16360:45 -16360:45 -16360:45 -16360:45 -16360:45 -16360:45 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44.9 -16360:45:44.9 -16360:45:44.9 -16360:45:44.9 -16360:45:44.9 -16360:45:44 -16360:45:44.9 -16360:45:44.87 -16360:45:44.87 -16360:45:44.87 -16360:45:44.87 -16360:45:44.87 ******** ********* -681 16:45 -681 16:45 -681 16:45 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44.9 -681 16:45:44.9 -681 16:45:44.9 -681 16:45:44 -681 16:45:44.9 -681 16:45:44.87 -681 16:45:44.87 -681 16:45:44.87 -681 16:45:44 -681 16:45:44.9 -681 16:45:44.87 -681 16:45:44.865 -681 16:45:44.865 -681 16:45:44.865 -681 16:45:44 -681 16:45:44.9 -681 16:45:44.87 -681 16:45:44.865 -681 16:45:44.8653 -681 16:45:44.8653 -681 16:45:44.8653 ***** ****** ******* ******** -16365:30 -16365:30 -16365:30 -16365:30 -16365:30 -16365:30 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57.8 -16365:30:57.8 -16365:30:57.8 -16365:30:57.8 -16365:30:57.8 -16365:30:57 -16365:30:57.8 -16365:30:57.82 -16365:30:57.82 -16365:30:57.82 -16365:30:57.82 -16365:30:57.82 ******** ********* -681 21:30 -681 21:30 -681 21:30 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57.8 -681 21:30:57.8 -681 21:30:57.8 -681 21:30:57 -681 21:30:57.8 -681 21:30:57.82 -681 21:30:57.82 -681 21:30:57.82 -681 21:30:57 -681 21:30:57.8 -681 21:30:57.82 -681 21:30:57.820 -681 21:30:57.820 -681 21:30:57.820 -681 21:30:57 -681 21:30:57.8 -681 21:30:57.82 -681 21:30:57.820 -681 21:30:57.8205 -681 21:30:57.8205 -681 21:30:57.8205 ***** ****** ******* ******** -16348:25 -16348:25 -16348:25 -16348:25 -16348:25 -16348:25 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09.2 -16348:25:09.2 -16348:25:09.2 -16348:25:09.2 -16348:25:09.2 -16348:25:09 -16348:25:09.2 -16348:25:09.15 -16348:25:09.15 -16348:25:09.15 -16348:25:09.15 -16348:25:09.15 ******** ********* -681 04:25 -681 04:25 -681 04:25 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09.2 -681 04:25:09.2 -681 04:25:09.2 -681 04:25:09 -681 04:25:09.2 -681 04:25:09.15 -681 04:25:09.15 -681 04:25:09.15 -681 04:25:09 -681 04:25:09.2 -681 04:25:09.15 -681 04:25:09.154 -681 04:25:09.154 -681 04:25:09.154 -681 04:25:09 -681 04:25:09.2 -681 04:25:09.15 -681 04:25:09.154 -681 04:25:09.1539 -681 04:25:09.1539 -681 04:25:09.1539 ***** ****** ******* ******** -16350:49 -16350:49 -16350:49 -16350:49 -16350:49 -16350:49 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27.1 -16350:49:27.1 -16350:49:27.1 -16350:49:27.1 -16350:49:27.1 -16350:49:27 -16350:49:27.1 -16350:49:27.11 -16350:49:27.11 -16350:49:27.11 -16350:49:27.11 -16350:49:27.11 ******** ********* -681 06:49 -681 06:49 -681 06:49 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27.1 -681 06:49:27.1 -681 06:49:27.1 -681 06:49:27 -681 06:49:27.1 -681 06:49:27.11 -681 06:49:27.11 -681 06:49:27.11 -681 06:49:27 -681 06:49:27.1 -681 06:49:27.11 -681 06:49:27.105 -681 06:49:27.105 -681 06:49:27.105 -681 06:49:27 -681 06:49:27.1 -681 06:49:27.11 -681 06:49:27.105 -681 06:49:27.1053 -681 06:49:27.1053 -681 06:49:27.1053 ***** ****** ******* ******** -16346:57 -16346:57 -16346:57 -16346:57 -16346:57 -16346:57 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52.5 -16346:57:52.5 -16346:57:52.5 -16346:57:52.5 -16346:57:52.5 -16346:57:52 -16346:57:52.5 -16346:57:52.48 -16346:57:52.48 -16346:57:52.48 -16346:57:52.48 -16346:57:52.48 ******** ********* -681 02:57 -681 02:57 -681 02:57 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52.5 -681 02:57:52.5 -681 02:57:52.5 -681 02:57:52 -681 02:57:52.5 -681 02:57:52.48 -681 02:57:52.48 -681 02:57:52.48 -681 02:57:52 -681 02:57:52.5 -681 02:57:52.48 -681 02:57:52.482 -681 02:57:52.482 -681 02:57:52.482 -681 02:57:52 -681 02:57:52.5 -681 02:57:52.48 -681 02:57:52.482 -681 02:57:52.4823 -681 02:57:52.4823 -681 02:57:52.4823 ***** ****** ******* ******** -16360:45 -16360:45 -16360:45 -16360:45 -16360:45 -16360:45 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44.7 -16360:45:44.7 -16360:45:44.7 -16360:45:44.7 -16360:45:44.7 -16360:45:44 -16360:45:44.7 -16360:45:44.66 -16360:45:44.66 -16360:45:44.66 -16360:45:44.66 -16360:45:44.66 ******** ********* -681 16:45 -681 16:45 -681 16:45 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44.7 -681 16:45:44.7 -681 16:45:44.7 -681 16:45:44 -681 16:45:44.7 -681 16:45:44.66 -681 16:45:44.66 -681 16:45:44.66 -681 16:45:44 -681 16:45:44.7 -681 16:45:44.66 -681 16:45:44.658 -681 16:45:44.658 -681 16:45:44.658 -681 16:45:44 -681 16:45:44.7 -681 16:45:44.66 -681 16:45:44.658 -681 16:45:44.6583 -681 16:45:44.6583 -681 16:45:44.6583 ***** ****** ******* ******** -16365:30 -16365:30 -16365:30 -16365:30 -16365:30 -16365:30 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57.6 -16365:30:57.6 -16365:30:57.6 -16365:30:57.6 -16365:30:57.6 -16365:30:57 -16365:30:57.6 -16365:30:57.58 -16365:30:57.58 -16365:30:57.58 -16365:30:57.58 -16365:30:57.58 ******** ********* -681 21:30 -681 21:30 -681 21:30 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57.6 -681 21:30:57.6 -681 21:30:57.6 -681 21:30:57 -681 21:30:57.6 -681 21:30:57.58 -681 21:30:57.58 -681 21:30:57.58 -681 21:30:57 -681 21:30:57.6 -681 21:30:57.58 -681 21:30:57.582 -681 21:30:57.582 -681 21:30:57.582 -681 21:30:57 -681 21:30:57.6 -681 21:30:57.58 -681 21:30:57.582 -681 21:30:57.5822 -681 21:30:57.5822 -681 21:30:57.5822 ***** ****** ******* ******** -16366:30 -16366:30 -16366:30 -16366:30 -16366:30 -16366:30 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04.2 -16366:30:04.2 -16366:30:04.2 -16366:30:04.2 -16366:30:04.2 -16366:30:04 -16366:30:04.2 -16366:30:04.18 -16366:30:04.18 -16366:30:04.18 -16366:30:04.18 -16366:30:04.18 ******** ********* -681 22:30 -681 22:30 -681 22:30 -681 22:30:04 -681 22:30:04 -681 22:30:04 -681 22:30:04 -681 22:30:04 -681 22:30:04 -681 22:30:04.2 -681 22:30:04.2 -681 22:30:04.2 -681 22:30:04 -681 22:30:04.2 -681 22:30:04.18 -681 22:30:04.18 -681 22:30:04.18 -681 22:30:04 -681 22:30:04.2 -681 22:30:04.18 -681 22:30:04.183 -681 22:30:04.183 -681 22:30:04.183 -681 22:30:04 -681 22:30:04.2 -681 22:30:04.18 -681 22:30:04.183 -681 22:30:04.1835 -681 22:30:04.1835 -681 22:30:04.1835 ***** ****** ******* ******** -16345:56 -16345:56 -16345:56 -16345:56 -16345:56 -16345:56 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51.6 -16345:56:51.6 -16345:56:51.6 -16345:56:51.6 -16345:56:51.6 -16345:56:51 -16345:56:51.6 -16345:56:51.59 -16345:56:51.59 -16345:56:51.59 -16345:56:51.59 -16345:56:51.59 ******** ********* -681 01:56 -681 01:56 -681 01:56 -681 01:56:51 -681 01:56:51 -681 01:56:51 -681 01:56:51 -681 01:56:51 -681 01:56:51 -681 01:56:51.6 -681 01:56:51.6 -681 01:56:51.6 -681 01:56:51 -681 01:56:51.6 -681 01:56:51.59 -681 01:56:51.59 -681 01:56:51.59 -681 01:56:51 -681 01:56:51.6 -681 01:56:51.59 -681 01:56:51.593 -681 01:56:51.593 -681 01:56:51.593 -681 01:56:51 -681 01:56:51.6 -681 01:56:51.59 -681 01:56:51.593 -681 01:56:51.5932 -681 01:56:51.5932 -681 01:56:51.5932 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:1189" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_25 #AT_START_26 at_fn_group_banner 26 'data-out.at:13993' \ "MONTH output" " " 3 at_xfail=no ( $as_echo "26. $at_setup_line: testing $at_desc ..." $at_traceon cat >month-out.sps <<'_ATEOF' set mxerr=1000000. set mxwarns=10000000. data list notable/x 1-10. begin data. 0 0.5 0.9 1 2 3 4 4.1 4.5 4.9 5 6 7 7.1 7.5 7.9 8 9 10 11 12 13 end data. print outfile='month-out.out'/x(month3). print outfile='month-out.out'/x(month4). print outfile='month-out.out'/x(month5). print outfile='month-out.out'/x(month6). print outfile='month-out.out'/x(month7). print outfile='month-out.out'/x(month8). print outfile='month-out.out'/x(month9). print outfile='month-out.out'/x(month10). print outfile='month-out.out'/x(month11). print outfile='month-out.out'/x(month12). print outfile='month-out.out'/x(month13). print outfile='month-out.out'/x(month14). print outfile='month-out.out'/x(month15). print outfile='month-out.out'/x(month16). print outfile='month-out.out'/x(month17). print outfile='month-out.out'/x(month18). print outfile='month-out.out'/x(month19). print outfile='month-out.out'/x(month20). print outfile='month-out.out'/x(month21). print outfile='month-out.out'/x(month22). print outfile='month-out.out'/x(month23). print outfile='month-out.out'/x(month24). print outfile='month-out.out'/x(month25). print outfile='month-out.out'/x(month26). print outfile='month-out.out'/x(month27). print outfile='month-out.out'/x(month28). print outfile='month-out.out'/x(month29). print outfile='month-out.out'/x(month30). print outfile='month-out.out'/x(month31). print outfile='month-out.out'/x(month32). print outfile='month-out.out'/x(month33). print outfile='month-out.out'/x(month34). print outfile='month-out.out'/x(month35). print outfile='month-out.out'/x(month36). print outfile='month-out.out'/x(month37). print outfile='month-out.out'/x(month38). print outfile='month-out.out'/x(month39). print outfile='month-out.out'/x(month40). execute. _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:14063: pspp -O format=csv month-out.sps" at_fn_check_prepare_trace "data-out.at:14063" ( $at_check_trace; pspp -O format=csv month-out.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/data-out.at:14063" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:14064: sed '/^ * *\$/d' stdout | sort | uniq -c | sed 's/^[ ]*//'" at_fn_check_prepare_notrace 'a shell pipeline' "data-out.at:14064" ( $at_check_trace; sed '/^ * *$/d' stdout | sort | uniq -c | sed 's/^[ ]*//' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "38 error: Month number 0.000000 is not between 1 and 12. 38 error: Month number 0.500000 is not between 1 and 12. 38 error: Month number 0.900000 is not between 1 and 12. 38 error: Month number 13.000000 is not between 1 and 12. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:14064" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:14071: cat month-out.out" at_fn_check_prepare_trace "data-out.at:14071" ( $at_check_trace; cat month-out.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . JAN JANU JANUA JANUAR JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY JANUARY FEB FEBR FEBRU FEBRUA FEBRUAR FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY FEBRUARY MAR MARC MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH MARCH APR APRI APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APR APRI APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APR APRI APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APR APRI APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL APRIL MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY MAY JUN JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUNE JUL JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JUL JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JUL JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JUL JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY JULY AUG AUGU AUGUS AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST AUGUST SEP SEPT SEPTE SEPTEM SEPTEMB SEPTEMBE SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER SEPTEMBER OCT OCTO OCTOB OCTOBE OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER OCTOBER NOV NOVE NOVEM NOVEMB NOVEMBE NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER NOVEMBER DEC DECE DECEM DECEMB DECEMBE DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER DECEMBER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:14071" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_26 #AT_START_27 at_fn_group_banner 27 'data-out.at:14949' \ "WKDAY output" " " 3 at_xfail=no ( $as_echo "27. $at_setup_line: testing $at_desc ..." $at_traceon cat >wkday-out.sps <<'_ATEOF' set mxwarns=10000000. set mxerrs=10000000. data list notable/x 1-10. begin data. 0 0.5 0.9 1 2 3 4 4.1 4.5 4.9 5 6 7 7.1 7.5 7.9 8 end data. do repeat format=wkday2 to wkday40. print outfile='wkday-out.out'/x(format). end repeat. execute. _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:14979: pspp -O format=csv wkday-out.sps" at_fn_check_prepare_trace "data-out.at:14979" ( $at_check_trace; pspp -O format=csv wkday-out.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/data-out.at:14979" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:14980: sed '/^ * *\$/d' stdout | sort | uniq -c | sed 's/^[ ]*//'" at_fn_check_prepare_notrace 'a shell pipeline' "data-out.at:14980" ( $at_check_trace; sed '/^ * *$/d' stdout | sort | uniq -c | sed 's/^[ ]*//' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "39 error: Weekday number 0.000000 is not between 1 and 7. 39 error: Weekday number 0.500000 is not between 1 and 7. 39 error: Weekday number 0.900000 is not between 1 and 7. 39 error: Weekday number 8.000000 is not between 1 and 7. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:14980" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-out.at:14987: cat wkday-out.out" at_fn_check_prepare_trace "data-out.at:14987" ( $at_check_trace; cat wkday-out.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SU SUN SUND SUNDA SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY SUNDAY MO MON MOND MONDA MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY MONDAY TU TUE TUES TUESD TUESDA TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY TUESDAY WE WED WEDN WEDNE WEDNES WEDNESD WEDNESDA WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WE WED WEDN WEDNE WEDNES WEDNESD WEDNESDA WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WE WED WEDN WEDNE WEDNES WEDNESD WEDNESDA WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WE WED WEDN WEDNE WEDNES WEDNESD WEDNESDA WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY WEDNESDAY TH THU THUR THURS THURSD THURSDA THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY THURSDAY FR FRI FRID FRIDA FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY FRIDAY SA SAT SATU SATUR SATURD SATURDA SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SA SAT SATU SATUR SATURD SATURDA SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SA SAT SATU SATUR SATURD SATURDA SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SA SAT SATU SATUR SATURD SATURDA SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY SATURDAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:14987" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_27 #AT_START_28 at_fn_group_banner 28 'data-out.at:15696' \ "AHEX output bug" " " 3 at_xfail=no ( $as_echo "28. $at_setup_line: testing $at_desc ..." $at_traceon cat >ahex.sps <<'_ATEOF' DATA LIST NOTABLE /s (a8). BEGIN DATA. abcdefgh END DATA. FORMATS s (AHEX16). LIST. _ATEOF { set +x $as_echo "$at_srcdir/data-out.at:15705: pspp -O format=csv ahex.sps" at_fn_check_prepare_trace "data-out.at:15705" ( $at_check_trace; pspp -O format=csv ahex.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List s 6162636465666768 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-out.at:15705" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_28 #AT_START_29 at_fn_group_banner 29 'datasheet-test.at:28' \ "3x3, 0 backing rows, backing widths " " " 4 at_xfail=no ( $as_echo "29. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/datasheet-test.at:28: datasheet-test --verbosity=0 --max-rows=3 --max-columns=3 \\ --backing-rows=0 --backing-widths=" at_fn_check_prepare_notrace 'an embedded newline' "datasheet-test.at:28" ( $at_check_trace; datasheet-test --verbosity=0 --max-rows=3 --max-columns=3 \ --backing-rows=0 --backing-widths= ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/datasheet-test.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_29 #AT_START_30 at_fn_group_banner 30 'datasheet-test.at:29' \ "3x3, 3 backing rows, backing widths 0,0,0" " " 4 at_xfail=no ( $as_echo "30. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/datasheet-test.at:29: datasheet-test --verbosity=0 --max-rows=3 --max-columns=3 \\ --backing-rows=3 --backing-widths=0,0,0" at_fn_check_prepare_notrace 'an embedded newline' "datasheet-test.at:29" ( $at_check_trace; datasheet-test --verbosity=0 --max-rows=3 --max-columns=3 \ --backing-rows=3 --backing-widths=0,0,0 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/datasheet-test.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_30 #AT_START_31 at_fn_group_banner 31 'datasheet-test.at:30' \ "3x3, 3 backing rows, backing widths 0" " " 4 at_xfail=no ( $as_echo "31. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/datasheet-test.at:30: datasheet-test --verbosity=0 --max-rows=3 --max-columns=3 \\ --backing-rows=3 --backing-widths=0" at_fn_check_prepare_notrace 'an embedded newline' "datasheet-test.at:30" ( $at_check_trace; datasheet-test --verbosity=0 --max-rows=3 --max-columns=3 \ --backing-rows=3 --backing-widths=0 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/datasheet-test.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_31 #AT_START_32 at_fn_group_banner 32 'datasheet-test.at:31' \ "3x3, 3 backing rows, backing widths 5" " " 4 at_xfail=no ( $as_echo "32. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/datasheet-test.at:31: datasheet-test --verbosity=0 --max-rows=3 --max-columns=3 \\ --backing-rows=3 --backing-widths=5" at_fn_check_prepare_notrace 'an embedded newline' "datasheet-test.at:31" ( $at_check_trace; datasheet-test --verbosity=0 --max-rows=3 --max-columns=3 \ --backing-rows=3 --backing-widths=5 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/datasheet-test.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_32 #AT_START_33 at_fn_group_banner 33 'datasheet-test.at:32' \ "3x3, 1 backing rows, backing widths 0,9,0" " " 4 at_xfail=no ( $as_echo "33. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/datasheet-test.at:32: datasheet-test --verbosity=0 --max-rows=3 --max-columns=3 \\ --backing-rows=1 --backing-widths=0,9,0" at_fn_check_prepare_notrace 'an embedded newline' "datasheet-test.at:32" ( $at_check_trace; datasheet-test --verbosity=0 --max-rows=3 --max-columns=3 \ --backing-rows=1 --backing-widths=0,9,0 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/datasheet-test.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_33 #AT_START_34 at_fn_group_banner 34 'dictionary.at:19' \ "dictionary case-insensitivity" " " 5 at_xfail=no ( $as_echo "34. $at_setup_line: testing $at_desc ..." $at_traceon cat >dictionary.sps <<'_ATEOF' DATA LIST LIST /aèiöu aeiou. BEGIN DATA 1 2 END DATA. LIST AÈIÖU RENAME VARIABLE (aèiöu=AÈIÖU). LIST. RENAME VARIABLE (aeiou=aèiöu). _ATEOF { set +x $as_echo "$at_srcdir/dictionary.at:31: pspp -O format=csv dictionary.sps" at_fn_check_prepare_trace "dictionary.at:31" ( $at_check_trace; pspp -O format=csv dictionary.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format aèiöu,F8.0 aeiou,F8.0 Table: Data List aèiöu 1.00 Table: Data List AÈIÖU,aeiou 1.00,2.00 dictionary.sps:8: error: RENAME VARIABLES: Renaming would duplicate variable name aèiöu. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/dictionary.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_34 #AT_START_35 at_fn_group_banner 35 'file.at:19' \ "Write error - directory exists" " " 6 at_xfail=no ( $as_echo "35. $at_setup_line: testing $at_desc ..." $at_traceon mkdir foobar.sav cat >file.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. SAVE OUTFILE='foobar.sav'. _ATEOF { set +x $as_echo "$at_srcdir/file.at:31: pspp -O format=csv file.sps" at_fn_check_prepare_trace "file.at:31" ( $at_check_trace; pspp -O format=csv file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: Opening foobar.sav for writing: Is a directory. error: Error opening \`foobar.sav' for writing as a system file: Is a directory. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/file.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_35 #AT_START_36 at_fn_group_banner 36 'file.at:40' \ "Write error - no permission" " " 6 at_xfail=no ( $as_echo "36. $at_setup_line: testing $at_desc ..." $at_traceon mkdir directory touch directory/foobar.sav chmod 000 directory cat >file.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. SAVE OUTFILE='directory/foobar.sav'. _ATEOF { set +x $as_echo "$at_srcdir/file.at:54: pspp -O format=csv file.sps" at_fn_check_prepare_trace "file.at:54" ( $at_check_trace; pspp -O format=csv file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: Creating temporary file to replace directory/foobar.sav: Permission denied. error: Error opening \`directory/foobar.sav' for writing as a system file: Permission denied. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/file.at:54" $at_failed && at_fn_log_failure $at_traceon; } chmod 700 directory set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_36 #AT_START_37 at_fn_group_banner 37 'file.at:66' \ "Write error - temp file disappeared" " " 6 at_xfail=no ( $as_echo "37. $at_setup_line: testing $at_desc ..." $at_traceon cat >file.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. XSAVE OUTFILE='foobar.sav'. HOST COMMAND=['rm foobar.savtmp*']. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/file.at:78: pspp -O format=csv file.sps" at_fn_check_prepare_trace "file.at:78" ( $at_check_trace; pspp -O format=csv file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/file.at:78" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_37 #AT_START_38 at_fn_group_banner 38 'file.at:84' \ "Write fifo" " " 6 at_xfail=no ( $as_echo "38. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "file.at:87" >"$at_check_line_file" (case $host in *-*-mingw*) true ;; *) false ;; esac) \ && at_fn_check_skip 77 "$at_srcdir/file.at:87" cat >file.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. SAVE OUTFILE='foobar.sav'. _ATEOF mkfifo foobar.sav cat foobar.sav > /dev/null & pid=$! { set +x $as_echo "$at_srcdir/file.at:101: pspp -O format=csv file.sps" at_fn_check_prepare_trace "file.at:101" ( $at_check_trace; pspp -O format=csv file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/file.at:101" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_38 #AT_START_39 at_fn_group_banner 39 'file.at:107' \ "Reading from pipe" " " 6 at_xfail=no ( $as_echo "39. $at_setup_line: testing $at_desc ..." $at_traceon cat >pipe.sps <<'_ATEOF' data list file='printf "1 2\n 3 4\n 5 6\n" |' notable list /x * y *. list. _ATEOF { set +x $as_echo "$at_srcdir/file.at:114: pspp -O format=csv pipe.sps" at_fn_check_prepare_trace "file.at:114" ( $at_check_trace; pspp -O format=csv pipe.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,y 1.00,2.00 3.00,4.00 5.00,6.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/file.at:114" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_39 #AT_START_40 at_fn_group_banner 40 'format-guesser.at:19' \ "format guesser" " " 7 at_xfail=no ( $as_echo "40. $at_setup_line: testing $at_desc ..." $at_traceon cat >format-guesser.txt <<'_ATEOF' # No data. => F8.2 "" => F8.2 "." => F8.2 # Numeric formats. "1.2" => F3.1 "$1.2" => DOLLAR4.1 "1.2%" => PCT4.1 "$1.2%" => A5 "1e5" => E3.0 "1e+5" => E4.0 "1+5" => E3.0 "1-5" => E3.0 "1.2e5" => E5.1 "1.3e+5" => E6.1 "1.4+5" => E5.1 "1e" => A2 "1e+" => A3 "1+" => A2 "1-" => A2 "1.5-5" => E5.1 "1,123" => COMMA5.0 # Is , is grouping or decimal? Assume grouping. "1.123" => F5.3 # Ditto. "1,12" => F4.2 # Not a group of 3, so last delim must be decimal. "1.12" => F4.2 # Ditto. "1,1234" => F6.4 # Not a group of 3, so last delim must be decimal. "1.1234" => F6.4 # Ditto. "$1.234" => DOLLAR6.3 # Dollar sign means decimal has to be '.'. "$1,234" => DOLLAR6.0 # Ditto. "1.234%" => PCT6.3 # Percent sign means decimal has to be '.'. "1,234%" => PCT6.0 # Ditto. "1,123.456" => COMMA9.3 # Both '.' and ',', so last delim must be decimal. "1.123,456" => DOT9.3 # Ditto. "1,123,456.45" => COMMA12.2 # Ditto. "1.123.456,45" => DOT12.2 # Ditto. "1,123,456" => COMMA9.0 # Ditto. "1.123.456" => DOT9.0 # Ditto. # Date and time formats. "01-OCT-1978" => DATE11 "01-x-1978" => EDATE9 # Roman numeral for month. "01-13-99" => ADATE8 "1-13-99" => ADATE7 (ADATE8) "13-01-99" => EDATE8 "13-1-99" => EDATE7 (EDATE8) "32-1-1" => SDATE6 (SDATE8) "1q01" => QYR4 "1Q01" => QYR4 "1 q 01" => QYR6 "1 Q 01" => QYR6 "1q2001" => QYR6 "1Q2001" => QYR6 "1 q 2001" => QYR8 "1 Q 2001" => QYR8 "oct 05" => MOYR6 "oct 2005" => MOYR8 "1-1-01 1:2" => A10 # Minute needs at least two digits. "1-1-01 1:02" => DATETIME11.0 (DATETIME17.0) "1-1-01 1:02:3" => A13 # Second needs at least two digits. "1-1-01 1:02:03" => DATETIME20.0 "1-1-01 1:02:03.1" => DATETIME20.1 (DATETIME22.1) "1-1-01 +1:02:03.1" => DATETIME20.1 (DATETIME22.1) "1-1-01 -1:02:03.1" => DATETIME20.1 (DATETIME22.1) "1:30" => TIME4.0 (TIME5.0) "1:30:05" => TIME8.0 "-1:30" => TIME5.0 "+1:30" => TIME5.0 "-1:30:15" => TIME8.0 "+1:30:15" => TIME8.0 "-1:30:15.5" => TIME10.1 "+1:30:15.75" => TIME11.2 "1 1:30" => DTIME6.0 (DTIME8.0) "+1 1:30" => DTIME7.0 (DTIME8.0) "-1 1:30" => DTIME7.0 (DTIME8.0) "-1-13-99" => A8 "+1-13-99" => A8 "1+13+99" => A7 "1:00:01.03" => TIME10.2 (TIME11.2) "12 1:00:01.3" => DTIME12.1 (DTIME13.1) "jan" => MONTH3 "Feb" => MONTH3 "MAR" => MONTH3 "i" => A1 # Not detected as MONTH format. "v" => A1 "ix" => A2 "x" => A1 "january" => MONTH7 "janaury" => MONTH7 # Only first three letters are significant. "february" => MONTH8 "febraury" => MONTH8 "march" => MONTH5 "marhc" => MONTH5 "april" => MONTH5 "may" => MONTH3 "june" => MONTH4 "july" => MONTH4 "august" => MONTH6 "september" => MONTH9 "october" => MONTH7 "november" => MONTH8 "decmeber" => MONTH8 "december" => MONTH8 "monady" => WKDAY6 "tuseday" => WKDAY7 "wedensday" => WKDAY9 "thurdsay" => WKDAY8 "fridya" => WKDAY6 "saturady" => WKDAY8 "sudnay" => WKDAY6 # Ambiguous; bias in favor of more sensible DD/MM/YY format: "1/1/1978" => EDATE8 "01/01/01" => EDATE8 # Several ambiguous dates can be clarified by one unambiguous example: "1/1/1978" "1/2/1978" "1/3/1978" "1/13/1978" => ADATE9 # MM/DD/YY "01/01/01" "02/01/01" "03/01/01" "13/01/01" => EDATE8 # DD/MM/YY "01/01/01" "02/01/01" "03/01/01" "2013/01/01" => SDATE10 # YY/MM/DD _ATEOF { set +x $as_echo "$at_srcdir/format-guesser.at:141: (echo \"SET DECIMAL=DOT.\" sed -e 's/#.*// s/[ ]*\$// /^\$/d s,^\\(.*\\)=> \\(.*\\)\$,DEBUG FORMAT GUESSER \\1.,') \\ < format-guesser.txt > format-guesser.sps" at_fn_check_prepare_notrace 'an embedded newline' "format-guesser.at:141" ( $at_check_trace; (echo "SET DECIMAL=DOT." sed -e 's/#.*// s/[ ]*$// /^$/d s,^\(.*\)=> \(.*\)$,DEBUG FORMAT GUESSER \1.,') \ < format-guesser.txt > format-guesser.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/format-guesser.at:141" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/format-guesser.at:147: pspp --testing-mode -O format=csv format-guesser.sps" at_fn_check_prepare_trace "format-guesser.at:147" ( $at_check_trace; pspp --testing-mode -O format=csv format-guesser.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; tee stderr <"$at_stderr" at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/format-guesser.at:147" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/format-guesser.at:149: sed -e 's/#.*// s/[ ]*\$// /^\$/d' < format-guesser.txt > expout" at_fn_check_prepare_notrace 'an embedded newline' "format-guesser.at:149" ( $at_check_trace; sed -e 's/#.*// s/[ ]*$// /^$/d' < format-guesser.txt > expout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/format-guesser.at:149" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/format-guesser.at:152: cat stderr" at_fn_check_prepare_trace "format-guesser.at:152" ( $at_check_trace; cat stderr ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/format-guesser.at:152" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_40 #AT_START_41 at_fn_group_banner 41 'pc+-file-reader.at:19' \ "variable labels and missing values" " " 8 at_xfail=no ( $as_echo "41. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; @LABELS; @LABELS_END - @LABELS; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 15; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; @NUM2_LABEL - @LABELS_OFS; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; 1.0; 0; 0; @NUM4_LABEL - @LABELS_OFS; 0x050800; s8 "NUM4"; 2.0; 0; 0; 0; 0x010800; s8 "STR1"; PCSYSMIS; 0; 0; @STR2_LABEL - @LABELS_OFS; 0x010400; s8 "STR2"; PCSYSMIS; 0; 0; 0; 0x010500; s8 "STR3"; s8 "MISS"; 0; 0; @STR4_LABEL - @LABELS_OFS; 0x010100; s8 "STR4"; s8 "OTHR"; 0; 0; 0; 0x010b00; s8 "STR5"; PCSYSMIS; 0 * 8; 0; 0; @STR6_LABEL - @LABELS_OFS; 0x010b00; s8 "STR6"; PCSYSMIS; 0 * 8; VARS_END: LABELS: 3; i8 0 0 0; LABELS_OFS: i8 0; NUM2_LABEL: COUNT8("Numeric variable 2's label"); NUM4_LABEL: COUNT8("Another numeric variable label"); STR2_LABEL: COUNT8("STR2's variable label"); STR4_LABEL: COUNT8("STR4's variable label"); STR6_LABEL: COUNT8("Another string variable's label"); LABELS_END: DATA: 0.0; "11/28/14"; 1.0; 0.0; 1.0; 2.0; PCSYSMIS; s8 "abcdefgh"; s8 "ijkl"; s8 "mnopq"; s8 "r"; s16 "stuvwxyzAB"; s16 "CDEFGHIJKLM"; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:99: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:99" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:99" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:106: pspp -o pspp.csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:106" ( $at_check_trace; pspp -o pspp.csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:106" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/pc+-file-reader.at:107: cat pspp.csv" at_fn_check_prepare_trace "pc+-file-reader.at:107" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "File label: PSPP synthetic test file Variable,Description,Position NUM1,Format: F8.0,1 NUM2,\"Label: Numeric variable 2's label Format: F8.0\",2 NUM3,\"Format: F8.0 Missing Values: 1\",3 NUM4,\"Label: Another numeric variable label Format: F8.0 Missing Values: 2\",4 STR1,Format: A8,5 STR2,\"Label: STR2's variable label Format: A4\",6 STR3,\"Format: A5 Missing Values: \"\"MISS \"\"\",7 STR4,\"Label: STR4's variable label Format: A1 Missing Values: \"\"O\"\"\",8 STR5,Format: A11,9 STR6,\"Label: Another string variable's label Format: A11\",10 Table: Data List NUM1,NUM2,NUM3,NUM4,STR1,STR2,STR3,STR4,STR5,STR6 0,1,2,.,abcdefgh,ijkl,mnopq,r,stuvwxyzAB ,CDEFGHIJKLM " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:107" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_41 #AT_START_42 at_fn_group_banner 42 'pc+-file-reader.at:137' \ "value labels" " " 8 at_xfail=no ( $as_echo "42. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; @LABELS; @LABELS_END - @LABELS; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 16; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; @N1 - @LOFF; @N1E - @LOFF; 0; 0x050800; s8 "NUM1"; PCSYSMIS; @N2 - @LOFF; @N2E - @LOFF; 0; 0x050800; s8 "NUM2"; PCSYSMIS; @N3 - @LOFF; @N3E - @LOFF; 0; 0x050800; s8 "NUM3"; PCSYSMIS; @N4 - @LOFF; @N4E - @LOFF; 0; 0x050800; s8 "NUM4"; PCSYSMIS; @N5 - @LOFF; @N5E - @LOFF; 0; 0x050800; s8 "NUM5"; PCSYSMIS; @S1 - @LOFF; @S1E - @LOFF; 0; 0x010100; s8 "STR1"; PCSYSMIS; @S2 - @LOFF; @S2E - @LOFF; 0; 0x010200; s8 "STR2"; PCSYSMIS; @S3 - @LOFF; @S3E - @LOFF; 0; 0x010300; s8 "STR3"; PCSYSMIS; @S4 - @LOFF; @S4E - @LOFF; 0; 0x010400; s8 "STR4"; PCSYSMIS; @S5 - @LOFF; @S5E - @LOFF; 0; 0x010500; s8 "STR5"; PCSYSMIS; @S6 - @LOFF; @S6E - @LOFF; 0; 0x010600; s8 "STR6"; PCSYSMIS; @S7 - @LOFF; @S7E - @LOFF; 0; 0x010700; s8 "STR7"; PCSYSMIS; @S8 - @LOFF; @S8E - @LOFF; 0; 0x010800; s8 "STR8"; PCSYSMIS; VARS_END: LABELS: 3; i8 0 0 0; LOFF: i8 0; N1: 1.0; COUNT8("one"); N1E: N2: 2.0; COUNT8("two"); 3.0; COUNT8("three"); N2E: N3: 3.0; COUNT8("three"); N4: N5: 4.0; COUNT8("four"); N3E: N4E: 5.0; COUNT8("five"); N5E: S1: s8 "a"; COUNT8("value label for `a'"); S1E: S2: s8 "ab"; COUNT8("value label for `ab'"); S2E: S3: s8 "abc"; COUNT8("value label for `abc'"); S3E: S4: S5: S6: S7: s8 "abcdefgh"; COUNT8("value label for abcdefgh"); S4E: S8: s8 "ijklmnop"; COUNT8("value label for ijklmnop"); S5E: s8 "qrstuvwx"; COUNT8("value label for qrstuvwx"); S6E: s8 "yzABCDEF"; COUNT8("value label for yzABCDEF"); S7E: s8 "GHIJKLMN"; COUNT8("value label for GHIJKLMN"); S8E: LABELS_END: DATA: 1.0; "11/28/14"; 1.0; 1.0; 2.0; 3.0; 4.0; 5.0; s8 "a"; s8 "bc"; s8 "cde"; s8 "fghj"; s8 "klmno"; s8 "pqrstu"; s8 "vwxyzAB"; s8 "CDEFGHIJ"; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:219: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:219" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:219" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:226: pspp -o pspp.csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:226" ( $at_check_trace; pspp -o pspp.csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:226" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/pc+-file-reader.at:227: cat pspp.csv" at_fn_check_prepare_trace "pc+-file-reader.at:227" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "File label: PSPP synthetic test file Variable,Description,Position NUM1,\"Format: F8.0 Value,Label 1,one\",1 NUM2,\"Format: F8.0 Value,Label 2,two 3,three\",2 NUM3,\"Format: F8.0 Value,Label 3,three 4,four\",3 NUM4,\"Format: F8.0 Value,Label 4,four\",4 NUM5,\"Format: F8.0 Value,Label 4,four 5,five\",5 STR1,\"Format: A1 Value,Label a,value label for \`a'\",6 STR2,\"Format: A2 Value,Label ab,value label for \`ab'\",7 STR3,\"Format: A3 Value,Label abc,value label for \`abc'\",8 STR4,\"Format: A4 Value,Label abcd,value label for abcdefgh\",9 STR5,\"Format: A5 Value,Label abcde,value label for abcdefgh ijklm,value label for ijklmnop\",10 STR6,\"Format: A6 Value,Label abcdef,value label for abcdefgh ijklmn,value label for ijklmnop qrstuv,value label for qrstuvwx\",11 STR7,\"Format: A7 Value,Label abcdefg,value label for abcdefgh ijklmno,value label for ijklmnop qrstuvw,value label for qrstuvwx yzABCDE,value label for yzABCDEF\",12 STR8,\"Format: A8 Value,Label GHIJKLMN,value label for GHIJKLMN ijklmnop,value label for ijklmnop qrstuvwx,value label for qrstuvwx yzABCDEF,value label for yzABCDEF\",13 Table: Data List NUM1,NUM2,NUM3,NUM4,NUM5,STR1,STR2,STR3,STR4,STR5,STR6,STR7,STR8 1,2,3,4,5,a,bc,cde,fghj,klmno,pqrstu,vwxyzAB,CDEFGHIJ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:227" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_42 #AT_START_43 at_fn_group_banner 43 'pc+-file-reader.at:302' \ "compressed data" " " 8 at_xfail=no ( $as_echo "43. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 1; i16 9; 2; i16 0; 2; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x010400; s8 "STR4"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "STR8"; PCSYSMIS; 0; 0; 0; 0x010f00; s8 "STR15"; PCSYSMIS; 0 * 8; VARS_END: DATA: i8 101 1 101 100 255 1 1 1; s8 "11/28/14"; s8 "abcd"; s8 "efghj"; s8 "efghijkl"; i8 1; i8 102 1 101 1 0 1 1; s8 "ABCDEFG"; s8 "11/28/14"; 1000.0; s8 "PQRS"; s8 "TUVWXYZa"; i8 1 1 0 0 0 0 0 0; s16 "bcdefghijklmnop"; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:354: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:354" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:354" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:361: pspp -o pspp.csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:361" ( $at_check_trace; pspp -o pspp.csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:361" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/pc+-file-reader.at:362: cat pspp.csv" at_fn_check_prepare_trace "pc+-file-reader.at:362" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "File label: PSPP synthetic test file Variable,Description,Position NUM1,Format: F8.0,1 NUM2,Format: F8.0,2 STR4,Format: A4,3 STR8,Format: A8,4 STR15,Format: A15,5 Table: Data List NUM1,NUM2,STR4,STR8,STR15 -5,150,abcd,efghj ,efghijklABCDEFG 1000,.,PQRS,TUVWXYZa,bcdefghijklmnop " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:362" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_43 #AT_START_44 at_fn_group_banner 44 'pc+-file-reader.at:379' \ "weighted" " " 8 at_xfail=no ( $as_echo "44. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; i16 1; i16 6; i16 0; i16 1; i16 0; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:422: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:422" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:422" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' SYSFILE INFO FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:426: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:426" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "File:,pc+-file.sav Label:,PSPP synthetic test file Created:,11/28/14 15:11:00 by PCSPSS PSPP synthetic test product Integer Format:,Little Endian Real Format:,IEEE 754 LE. Variables:,4 Cases:,1 Type:,SPSS/PC+ System File Weight:,NUM3 Compression:,None Encoding:,us-ascii Variable,Description,Position NUM1,\"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8\",1 NUM2,\"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8\",2 NUM3,\"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8\",3 NUM4,\"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8\",4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:426" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_44 #AT_START_45 at_fn_group_banner 45 'pc+-file-reader.at:465' \ "unspecified character encoding" " " 9 at_xfail=no ( $as_echo "45. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:508: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:508" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:508" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. SYSFILE INFO FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:517: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:517" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:517" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/pc+-file-reader.at:518: sed 's/default encoding.*For/default encoding. For/' stdout" at_fn_check_prepare_trace "pc+-file-reader.at:518" ( $at_check_trace; sed 's/default encoding.*For/default encoding. For/' stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`pc+-file.sav': Using default encoding. For best results, specify an encoding explicitly. Use SYSFILE INFO with ENCODING=\"\"DETECT\"\" to analyze the possible encodings.\" File label: PSPP synthetic test file Variable,Description,Position NUM1,Format: F8.0,1 NUM2,Format: F8.0,2 NUM3,Format: F8.0,3 NUM4,Format: F8.0,4 Table: Data List NUM1,NUM2,NUM3,NUM4 2,3,4,5 File:,pc+-file.sav Label:,PSPP synthetic test file Created:,11/28/14 15:11:00 by PCSPSS PSPP synthetic test product Integer Format:,Little Endian Real Format:,IEEE 754 LE. Variables:,4 Cases:,1 Type:,SPSS/PC+ System File Weight:,Not weighted. Compression:,None Encoding:,us-ascii Variable,Description,Position NUM1,\"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8\",1 NUM2,\"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8\",2 NUM3,\"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8\",3 NUM4,\"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8\",4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:518" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_45 #AT_START_46 at_fn_group_banner 46 'pc+-file-reader.at:569' \ "unexpected fixed values" " " 9 at_xfail=no ( $as_echo "46. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' >>1; 2;<< @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; >>1.0<<; 0; >>2<<; i16 1; i16 0; i16 7; 1; i16 0; 3; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:612: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:612" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:612" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:616: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:616" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`pc+-file.sav' near offset 0x0: Directory fields have unexpected values (1,2).\" warning: \`pc+-file.sav' near offset 0x100: Record 0 specifies unexpected system missing value 1 (0x1p+0). \"warning: \`pc+-file.sav' near offset 0x100: Record 0 reserved fields have unexpected values (1,1,0,2,0,0).\" warning: \`pc+-file.sav' near offset 0x100: Record 0 case counts differ (1 versus 3). " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:616" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_46 #AT_START_47 at_fn_group_banner 47 'pc+-file-reader.at:627' \ "short main header" " " 9 at_xfail=no ( $as_echo "47. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:669: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:669" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:669" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:673: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:673" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`pc+-file.sav' near offset 0x100: This is not an SPSS/PC+ system file. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/pc+-file-reader.at:673" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_47 #AT_START_48 at_fn_group_banner 48 'pc+-file-reader.at:678' \ "long main header" " " 9 at_xfail=no ( $as_echo "48. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; >>s80 "PSPP synthetic test file"<<; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:721: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:721" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:721" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:725: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:725" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`pc+-file.sav' near offset 0x100: Record 0 has unexpected length 192. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:725" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_48 #AT_START_49 at_fn_group_banner 49 'pc+-file-reader.at:730' \ "invalid compression type" " " 9 at_xfail=no ( $as_echo "49. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 >>2<<; i16 7; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:773: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:773" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:773" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:777: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:777" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`pc+-file.sav' near offset 0x100: Invalid compression type 2. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/pc+-file-reader.at:777" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_49 #AT_START_50 at_fn_group_banner 50 'pc+-file-reader.at:782' \ "unrealistic number of cases" " " 9 at_xfail=no ( $as_echo "50. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 1000; i16 0; 1000; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:825: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:825" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:825" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:829: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:829" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`pc+-file.sav' near offset 0x100: Record 0 claims 1000 cases with 7 values per case (requiring at least 56000 bytes) but data record is only 56 bytes long. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:829" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_50 #AT_START_51 at_fn_group_banner 51 'pc+-file-reader.at:834' \ "labels bad offsets" " " 9 at_xfail=no ( $as_echo "51. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; @LABELS; @LABELS_END - @LABELS; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; @N1L - @LOFF; @N1E - @LOFF; 1000; 0x050800; s8 "NUM1"; PCSYSMIS; @N1L - @LOFF - 1; @LABELS_END - @LOFF; 0; 0x050800; s8 "NUM2"; PCSYSMIS; @N1L - @LOFF + 1; @LABELS_END - @LOFF; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; @LABELS_END - @LOFF - 1; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: LABELS: 3; i8 0 0 0; LOFF: i8 0; N1L: PCSYSMIS; LABELS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; N1E: DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:882: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:882" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:882" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:886: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:886" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`pc+-file.sav' near offset 0x210: Variable label claimed to start at offset 1007 in labels record but labels record is only 16 bytes. warning: \`pc+-file.sav' near offset 0x210: Value labels claimed to end at offset 72 in labels record but labels record is only 16 bytes. \"warning: \`pc+-file.sav' near offset 0x2a0: Value labels end with partial label (0 bytes left in record, label length 255).\" warning: \`pc+-file.sav' near offset 0x299: 7 leftover bytes following value labels. warning: \`pc+-file.sav' near offset 0x29f: Variable label with length 255 starting at offset 16 in labels record overruns end of 16-byte labels record. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:886" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_51 #AT_START_52 at_fn_group_banner 52 'pc+-file-reader.at:899' \ "record 1 bad length" " " 9 at_xfail=no ( $as_echo "52. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:941: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:941" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:941" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:945: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:945" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`pc+-file.sav' near offset 0x1b0: Record 1 has length 192 (expected 224). pc+-file.sps:1: error: GET: \`pc+-file.sav': Data file dictionary has no variables. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/pc+-file-reader.at:945" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_52 #AT_START_53 at_fn_group_banner 53 'pc+-file-reader.at:952' \ "bad variable format" " " 9 at_xfail=no ( $as_echo "53. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0xff0000; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:995: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:995" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:995" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:999: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:999" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`pc+-file.sav' near offset 0x210: Variable 3 has invalid type 255. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/pc+-file-reader.at:999" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_53 #AT_START_54 at_fn_group_banner 54 'pc+-file-reader.at:1004' \ "bad variable name" " " 9 at_xfail=no ( $as_echo "54. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050000; s8 "#NUM"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1047: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:1047" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1047" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1051: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:1051" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`pc+-file.sav' near offset 0x210: Invalid variable name \`#NUM'. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/pc+-file-reader.at:1051" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_54 #AT_START_55 at_fn_group_banner 55 'pc+-file-reader.at:1056' \ "duplicate variable name" " " 9 at_xfail=no ( $as_echo "55. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 1; i16 0; 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050000; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1099: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:1099" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1099" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1103: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:1103" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`pc+-file.sav' near offset 0x230: Renaming variable with duplicate name \`NUM1' to \`VAR001'. warning: \`pc+-file.sav' near offset 0x250: Renaming variable with duplicate name \`NUM1' to \`VAR002'. warning: \`pc+-file.sav' near offset 0x270: Renaming variable with duplicate name \`NUM1' to \`VAR003'. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1103" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_55 #AT_START_56 at_fn_group_banner 56 'pc+-file-reader.at:1112' \ "partial case" " " 9 at_xfail=no ( $as_echo "56. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 3; i16 0; 3; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050000; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 1.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; 2.0; "11/28/14"; 1.0; 6.0; 7.0; 8.0; 9.0; 3.0; "11/28/14"; 1.0; 10.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1157: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:1157" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1157" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1162: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:1162" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`pc+-file.sav' near offset 0x100: Record 0 claims 3 cases with 7 values per case (requiring at least 168 bytes) but data record is only 144 bytes long. error: \`pc+-file.sav' near offset 0x320: File ends in partial case. error: Error reading case from file \`pc+-file.sav'. Table: Data List NUM1,NUM2,NUM3,NUM4 2,3,4,5 6,7,8,9 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/pc+-file-reader.at:1162" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_56 #AT_START_57 at_fn_group_banner 57 'pc+-file-reader.at:1176' \ "case extends past end of data record" " " 9 at_xfail=no ( $as_echo "57. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; 3; i16 0; 3; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050000; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 1.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; 2.0; "11/28/14"; 1.0; 6.0; 7.0; 8.0; 9.0; 3.0; "11/28/14"; 1.0; 10.0; DATA_END: 11.0; 12.0; 13.0; _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1222: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:1222" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1222" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1227: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:1227" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`pc+-file.sav' near offset 0x100: Record 0 claims 3 cases with 7 values per case (requiring at least 168 bytes) but data record is only 144 bytes long. error: \`pc+-file.sav' near offset 0x338: Case beginning at offset 0x00000300 extends past end of data record at offset 0x00000320. error: Error reading case from file \`pc+-file.sav'. Table: Data List NUM1,NUM2,NUM3,NUM4 2,3,4,5 6,7,8,9 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/pc+-file-reader.at:1227" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_57 #AT_START_58 at_fn_group_banner 58 'pc+-file-reader.at:1241' \ "corrupt compressed data" " " 9 at_xfail=no ( $as_echo "58. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 1; i16 9; 2; i16 0; 2; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x010400; s8 "STR4"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "STR8"; PCSYSMIS; 0; 0; 0; 0x010f00; s8 "STR15"; PCSYSMIS; 0 * 8; VARS_END: DATA: i8 101 1 101 100 255 1 1 1; s8 "11/28/14"; s8 "abcd"; s8 "efghj"; s8 "efghijkl"; i8 1; i8 102 101 101 1 0 1 1; s8 "ABCDEFG"; 1000.0; s8 "PQRS"; s8 "TUVWXYZa"; i8 1 1 0 0 0 0 0 0; s16 "bcdefghijklmnop"; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1293: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:1293" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1293" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1300: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:1300" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "File label: PSPP synthetic test file Variable,Description,Position NUM1,Format: F8.0,1 NUM2,Format: F8.0,2 STR4,Format: A4,3 STR8,Format: A8,4 STR15,Format: A15,5 warning: \`pc+-file.sav' near offset 0x308: Possible compressed data corruption: string contains compressed integer (opcode 101). Table: Data List NUM1,NUM2,STR4,STR8,STR15 -5,150,abcd,efghj ,efghijklABCDEFG 1000,.,PQRS,TUVWXYZa,bcdefghijklmnop " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1300" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_58 #AT_START_59 at_fn_group_banner 59 'pc+-file-reader.at:1319' \ "invalid weight index" " " 9 at_xfail=no ( $as_echo "59. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; i16 1; i16 10; i16 0; i16 1; i16 0; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1362: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:1362" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1362" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1366: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:1366" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`pc+-file.sav': Invalid weight index 10. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1366" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_59 #AT_START_60 at_fn_group_banner 60 'pc+-file-reader.at:1371' \ "string weight" " " 9 at_xfail=no ( $as_echo "60. $at_setup_line: testing $at_desc ..." $at_traceon cat >pc+-file.sack <<'_ATEOF' 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; i16 0; i16 7; i16 1; i16 6; i16 0; i16 1; i16 0; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "STR1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; s8 "acbdefgh"; 3.0; 4.0; 5.0; DATA_END: _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1414: sack --le pc+-file.sack > pc+-file.sav" at_fn_check_prepare_trace "pc+-file-reader.at:1414" ( $at_check_trace; sack --le pc+-file.sack > pc+-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1414" $at_failed && at_fn_log_failure $at_traceon; } cat >pc+-file.sps <<'_ATEOF' GET FILE='pc+-file.sav' ENCODING='us-ascii'. _ATEOF { set +x $as_echo "$at_srcdir/pc+-file-reader.at:1418: pspp -O format=csv pc+-file.sps" at_fn_check_prepare_trace "pc+-file-reader.at:1418" ( $at_check_trace; pspp -O format=csv pc+-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`pc+-file.sav' near offset 0x250: Cannot weight by string variable \`STR1'. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pc+-file-reader.at:1418" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_60 #AT_START_61 at_fn_group_banner 61 'por-file.at:19' \ "overwriting portable file" " " 10 at_xfail=no ( $as_echo "61. $at_setup_line: testing $at_desc ..." $at_traceon cat >output.por <<'_ATEOF' abcdef _ATEOF cp output.por output.por.backup cat >porfile.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. EXPORT OUTFILE='output.por'. _ATEOF { set +x $as_echo "$at_srcdir/por-file.at:30: pspp -O format=csv porfile.sps" at_fn_check_prepare_trace "por-file.at:30" ( $at_check_trace; pspp -O format=csv porfile.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:30" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/por-file.at:31: cmp output.por output.por.backup" at_fn_check_prepare_trace "por-file.at:31" ( $at_check_trace; cmp output.por output.por.backup ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/por-file.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_61 #AT_START_62 at_fn_group_banner 62 'por-file.at:34' \ "overwriting portable file atomically" " " 10 at_xfail=no ( $as_echo "62. $at_setup_line: testing $at_desc ..." $at_traceon cat >output.por <<'_ATEOF' abcdef _ATEOF cp output.por output.por.backup cat >porfile.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. XEXPORT OUTFILE='output.por'. HOST COMMAND=['kill -TERM $PPID']. _ATEOF { set +x $as_echo "$at_srcdir/por-file.at:46: pspp -O format=csv porfile.sps" at_fn_check_prepare_trace "por-file.at:46" ( $at_check_trace; pspp -O format=csv porfile.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 143 $at_status "$at_srcdir/por-file.at:46" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/por-file.at:47: cmp output.por output.por.backup" at_fn_check_prepare_trace "por-file.at:47" ( $at_check_trace; cmp output.por output.por.backup ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:47" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/por-file.at:48: for file in *.tmp*; do if test -e \$file; then echo \$file; exit 1; fi; done" at_fn_check_prepare_dynamic "for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done" "por-file.at:48" ( $at_check_trace; for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:48" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_62 #AT_START_63 at_fn_group_banner 63 'por-file.at:52' \ "write to same portable file being read" " " 10 at_xfail=no ( $as_echo "63. $at_setup_line: testing $at_desc ..." $at_traceon cat >export.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 2 END DATA. EXPORT OUTFILE='data.por'. _ATEOF { set +x $as_echo "$at_srcdir/por-file.at:60: pspp -O format=csv export.sps" at_fn_check_prepare_trace "por-file.at:60" ( $at_check_trace; pspp -O format=csv export.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:60" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/por-file.at:61: test -s data.por" at_fn_check_prepare_trace "por-file.at:61" ( $at_check_trace; test -s data.por ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:61" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/por-file.at:62: for file in *.tmp*; do if test -e \$file; then echo \$file; exit 1; fi; done" at_fn_check_prepare_dynamic "for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done" "por-file.at:62" ( $at_check_trace; for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:62" $at_failed && at_fn_log_failure $at_traceon; } cat >export2.sps <<'_ATEOF' IMPORT FILE='data.por'. COMPUTE y = x * 2. EXPORT OUTFILE='data.por'. _ATEOF { set +x $as_echo "$at_srcdir/por-file.at:69: pspp -O format=csv export2.sps" at_fn_check_prepare_trace "por-file.at:69" ( $at_check_trace; pspp -O format=csv export2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:69" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/por-file.at:70: for file in *.tmp*; do if test -e \$file; then echo \$file; exit 1; fi; done" at_fn_check_prepare_dynamic "for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done" "por-file.at:70" ( $at_check_trace; for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:70" $at_failed && at_fn_log_failure $at_traceon; } cat >export3.sps <<'_ATEOF' IMPORT FILE='data.por'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/por-file.at:76: pspp -O format=csv export3.sps" at_fn_check_prepare_trace "por-file.at:76" ( $at_check_trace; pspp -O format=csv export3.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List X,Y 2,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:76" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_63 #AT_START_64 at_fn_group_banner 64 'por-file.at:86' \ "write portable file with value labels" " " 10 at_xfail=no ( $as_echo "64. $at_setup_line: testing $at_desc ..." $at_traceon cat >export.sps <<'_ATEOF' DATA LIST NOTABLE/var1 TO var5 1-5. VALUE LABELS /var1 1 'one' /var2 2 'two' /var3 3 'three' /var4 4 'four' /var5 5 'five'. BEGIN DATA. 12345 END DATA. EXPORT OUTFILE='data.por'. _ATEOF { set +x $as_echo "$at_srcdir/por-file.at:100: pspp -O format=csv export.sps" at_fn_check_prepare_trace "por-file.at:100" ( $at_check_trace; pspp -O format=csv export.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:100" $at_failed && at_fn_log_failure $at_traceon; } cat >import.sps <<'_ATEOF' IMPORT FILE='data.por'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/por-file.at:106: pspp -O format=csv import.sps" at_fn_check_prepare_trace "por-file.at:106" ( $at_check_trace; pspp -O format=csv import.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position VAR1,\"Format: F1.0 Value,Label 1,one\",1 VAR2,\"Format: F1.0 Value,Label 2,two\",2 VAR3,\"Format: F1.0 Value,Label 3,three\",3 VAR4,\"Format: F1.0 Value,Label 4,four\",4 VAR5,\"Format: F1.0 Value,Label 5,five\",5 Table: Data List VAR1,VAR2,VAR3,VAR4,VAR5 1,2,3,4,5 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:106" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file-info.sps <<'_ATEOF' SYSFILE INFO FILE='data.por' _ATEOF { set +x $as_echo "$at_srcdir/por-file.at:135: pspp -O format=csv sys-file-info.sps | sed '/Encoding/d /Integer Format/d /Real Format/d /Created/d /Product/d '" at_fn_check_prepare_notrace 'an embedded newline' "por-file.at:135" ( $at_check_trace; pspp -O format=csv sys-file-info.sps | sed '/Encoding/d /Integer Format/d /Real Format/d /Created/d /Product/d ' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "File:,data.por Label:,No label. Variables:,5 Cases:,Unknown Type:,SPSS Portable File Weight:,Not weighted. Compression:,None Variable,Description,Position VAR1,\"Format: F1.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8 Value,Label 1,one\",1 VAR2,\"Format: F1.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8 Value,Label 2,two\",2 VAR3,\"Format: F1.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8 Value,Label 3,three\",3 VAR4,\"Format: F1.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8 Value,Label 4,four\",4 VAR5,\"Format: F1.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8 Value,Label 5,five\",5 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/por-file.at:135" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_64 #AT_START_65 at_fn_group_banner 65 'sys-file-reader.at:19' \ "variable labels and missing values" " " 11 at_xfail=no ( $as_echo "65. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 28; 0; 0; 1; 100.0; "01 Jan 11"; "20:53:52"; "PSPP synthetic test file: "; i8 244; i8 245; i8 246; i8 248; s34 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 1; 0; 0x050800 *2; s8 "NUM2"; 32; "Numeric variable 2's label ("; i8 249; i8 250; i8 251; ")"; 2; 0; 0; 1; 0x050800 *2; s8 "NUM3"; 1.0; 2; 0; 1; 1; 0x050800 *2; s8 "NUM4"; 30; "Another numeric variable label"; i8 0 * 2; 1.0; 2; 0; 0; 2; 0x050800 *2; s8 "NUM5"; 1.0; 2.0; 2; 0; 0; 3; 0x050800 *2; s8 "NUM6"; 1.0; 2.0; 3.0; 2; 0; 0; -2; 0x050800 *2; s8 "NUM7"; 1.0; 3.0; 2; 0; 0; -3; 0x050800 *2; s8 "NUM8"; 1.0; 3.0; 5.0; 2; 0; 0; -3; 0x050800 *2; s8 "NUM9"; 1.0; HIGHEST; -5.0; 2; 0; 0; -3; 0x050800 *2; "NUM"; i8 192; i8 200; i8 204; i8 209; i8 210; LOWEST; 1.0; 5.0; 2; 4; 0; 0; 0x010400 *2; s8 "STR1"; 2; 4; 1; 0; 0x010400 *2; s8 "STR2"; 25; "String variable 2's label"; i8 0 * 3; 2; 4; 0; 1; 0x010400 *2; s8 "STR3"; s8 "MISS"; 2; 4; 1; 1; 0x010400 *2; s8 "STR4"; 29; "Another string variable label"; i8 0 * 3; s8 "OTHR"; 2; 4; 0; 2; 0x010400 *2; s8 "STR5"; s8 "MISS"; s8 "OTHR"; 2; 4; 0; 3; 0x010400 *2; s8 "STR6"; s8 "MISS"; s8 "OTHR"; s8 "MORE"; 2; 11; 0; 1; 0x010b00 *2; s8 "STR7"; "first8by"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 9; 0; 0; 0x010900 *2; s8 "STR8"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 10; 0; 0; 0x010a00 *2; s8 "STR9"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 11; 0; 0; 0x010b00 *2; s8 "STR10"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 25; 1; 0; 0x011900 *2; s8 "STR11"; 14; "25-byte string"; i8 0 * 2; ( 2; -1; 0; 0; 0; 0; s8 ""; ) * 2; 2; -1; 1; 0; 0; 0; s8 ""; 20; "dummy variable label"; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST; 7; 22; 1; COUNT ( COUNT("STR8"); i8 1; 8; "abcdefgh"; COUNT("STR9"); i8 2; 8; "abcdefgh"; 8; "01234567"; COUNT("STR10"); i8 3; 8; "abcdefgh"; 8; "01234567"; 8; "0 "; ); 7; 20; 1; 12; "windows-1252"; 999; 0; 1.0; 2.0; 3.0; 4.0; 5.0; 6.0; 7.0; 8.0; 9.0; 10.0; s8 "abcd"; s8 "efgh"; s8 "ijkl"; s8 "mnop"; s8 "qrst"; s8 "uvwx"; s16 "yzABCDEFGHI"; s16 "JKLMNOPQR"; s16 "STUVWXYZ01"; s16 "23456789abc"; s32 "defghijklmnopqstuvwxyzABC"; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:141: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:141" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:141" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:148: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:148" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:148" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:149: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:149" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "File label: PSPP synthetic test file: ôõöø Variable,Description,Position num1,Format: F8.0,1 num2,\"Label: Numeric variable 2's label (ùúû) Format: F8.0\",2 num3,\"Format: F8.0 Missing Values: 1\",3 num4,\"Label: Another numeric variable label Format: F8.0 Missing Values: 1\",4 num5,\"Format: F8.0 Missing Values: 1; 2\",5 num6,\"Format: F8.0 Missing Values: 1; 2; 3\",6 num7,\"Format: F8.0 Missing Values: 1 THRU 3\",7 num8,\"Format: F8.0 Missing Values: 1 THRU 3; 5\",8 num9,\"Format: F8.0 Missing Values: 1 THRU HIGHEST; -5\",9 numàèìñò,\"Format: F8.0 Missing Values: LOWEST THRU 1; 5\",10 str1,Format: A4,11 str2,\"Label: String variable 2's label Format: A4\",12 str3,\"Format: A4 Missing Values: \"\"MISS\"\"\",13 str4,\"Label: Another string variable label Format: A4 Missing Values: \"\"OTHR\"\"\",14 str5,\"Format: A4 Missing Values: \"\"MISS\"\"; \"\"OTHR\"\"\",15 str6,\"Format: A4 Missing Values: \"\"MISS\"\"; \"\"OTHR\"\"; \"\"MORE\"\"\",16 str7,\"Format: A11 Missing Values: \"\"first8by\"\"\",17 str8,\"Format: A9 Missing Values: \"\"abcdefgh\"\"\",18 str9,\"Format: A10 Missing Values: \"\"abcdefgh\"\"; \"\"01234567\"\"\",19 str10,\"Format: A11 Missing Values: \"\"abcdefgh\"\"; \"\"01234567\"\"; \"\"0 \"\"\",20 str11,\"Label: 25-byte string Format: A25\",21 Table: Data List num1,num2,num3,num4,num5,num6,num7,num8,num9,numàèìñò,str1,str2,str3,str4,str5,str6,str7,str8,str9,str10,str11 1,2,3,4,5,6,7,8,9,10,abcd,efgh,ijkl,mnop,qrst,uvwx,yzABCDEFGHI,JKLMNOPQR,STUVWXYZ01,23456789abc,defghijklmnopqstuvwxyzABC " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:149" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_65 #AT_START_66 at_fn_group_banner 66 'sys-file-reader.at:203' \ "unspecified number of variable positions" " " 11 at_xfail=no ( $as_echo "66. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; -1; 0; 0; 1; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 1; 0; 0x050800 *2; s8 "NUM2"; 26; "Numeric variable 2's label"; i8 0 *2; 7; 20; 1; 12; "windows-1252"; 999; 0; 1.0; 2.0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:234: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:234" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:234" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:240: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:240" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:240" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:241: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:241" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position num1,Format: F8.0,1 num2,\"Label: Numeric variable 2's label Format: F8.0\",2 Table: Data List num1,num2 1,2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:241" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_66 #AT_START_67 at_fn_group_banner 67 'sys-file-reader.at:254' \ "wrong number of variable positions but version 13" "" 11 at_xfail=no ( $as_echo "67. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; -1; 0; 0; 1; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 1; 0; 0x050800 *2; s8 "NUM2"; 26; "Numeric variable 2's label"; i8 0 *2; 7; 3; 4; 8; 13; 2; 3; -1; 1; 1; ENDIAN; 1252; 7; 20; 1; 12; "windows-1252"; 999; 0; 1.0; 2.0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:288: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:288" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:288" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:294: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:294" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:294" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:295: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:295" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position num1,Format: F8.0,1 num2,\"Label: Numeric variable 2's label Format: F8.0\",2 Table: Data List num1,num2 1,2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:295" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_67 #AT_START_68 at_fn_group_banner 68 'sys-file-reader.at:308' \ "value labels" " " 11 at_xfail=no ( $as_echo "68. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 22; 0; 0; 1; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM3"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM4"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM5"; 2; 1; 0; 0; 0x010100 *2; s8 "STR1"; 2; 2; 0; 0; 0x010200 *2; s8 "STR2"; 2; 3; 0; 0; 0x010300 *2; s8 "STR3"; 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 4; 0; 0; 0x010400 *2; s8 "STR5"; 2; 6; 0; 0; 0x010600 *2; s8 "STR6"; 2; 7; 0; 0; 0x010700 *2; s8 "STR7"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 9; 0; 0; 0x010900 *2; "STR9"; i8 230; s3 ""; 2; -1; 0; 0; 0; 0; s8 ""; 2; 12; 0; 0; 0x010c00 *2; s8 "STR12"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 16; 0; 0; 0x011000 *2; s8 "STR16"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 17; 0; 0; 0x011100 *2; s8 "STR17"; ( 2; -1; 0; 0; 0; 0; s8 ""; ) * 2; 3; 1; 1.0; i8 17; i8 238; i8 228; i8 232; i8 237; s19 " (in Russian)"; 4; 1; 1; 3; 2; 1.0; i8 3; s7 "one"; 2.0; i8 3; s7 "two"; 4; 1; 2; 3; 1; 3.0; i8 5; s7 "three"; 4; 1; 3; 3; 1; 4.0; i8 4; s7 "four"; 4; 1; 3; 3; 1; 5.0; i8 4; s7 "five"; 4; 1; 4; 3; 1; 6.0; i8 3; s7 "six"; 4; 1; 5; 3; 2; 7.0; i8 5; s7 "seven"; 8.0; i8 5; s7 "eight"; 4; 2; 4; 5; 3; 1; 9.0; i8 4; s7 "nine"; 4; 1; 4; 3; 1; 10.0; i8 3; s7 "ten"; 4; 1; 5; 3; 1; s8 "a"; i8 19; s23 "value label for `a'"; 4; 1; 6; 3; 2; s8 "bc"; i8 20; s23 "value label for `bc'"; s8 "de"; i8 20; s23 "value label for `de'"; 4; 1; 7; 3; 1; s8 "fgh"; i8 21; s23 "value label for `fgh'"; 4; 1; 8; 3; 1; s8 "ijk"; i8 21; s23 "value label for `ijk'"; 4; 1; 8; 3; 1; s8 "lmno"; i8 22; s23 "value label for `lmno'"; 4; 1; 9; 3; 1; s8 "pqrs"; i8 22; s23 "value label for `pqrs'"; 4; 1; 10; 3; 2; s8 "tuvw"; i8 22; s23 "value label for `tuvw'"; s8 "xyzA"; i8 22; s23 "value label for `xyzA'"; 4; 2; 9; 10; 3; 1; s8 "BCDE"; i8 22; s23 "value label for `BCDE'"; 4; 1; 9; 3; 1; s8 "FGHI"; i8 22; s23 "value label for `FGHI'"; 4; 1; 10; 3; 1; s8 "JKLMNO"; i8 24; s31 "value label for `JKLMNO'"; 4; 1; 11; 3; 1; s8 "JKLMNOP"; i8 25; s31 "value label for `JKLMNOP'"; 4; 1; 12; 3; 1; s8 "JKLMNOPQ"; i8 26; s31 "value label for `JKLMNOPQ'"; 4; 1; 13; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1251; 7; 20; 1; 12; "windows-1251"; 7; 21; 1; COUNT ( COUNT("STR9"; i8 230); 9; 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'"); COUNT("STR12"); 12; 2; COUNT("0123456789ab"); COUNT("value label for `0123456789ab'"); COUNT("cdefghijklmn"); COUNT("value label for `cdefghijklmn'"); COUNT("STR16"); 16; 3; COUNT("opqrstuvwxyzABCD"); COUNT("value label for `opqrstuvwxyzABCD'"); COUNT("EFGHIJKLMNOPQRST"); COUNT("value label for `EFGHIJKLMNOPQRST'"); COUNT("UVWXYZ0123456789"); COUNT("value label for `UVWXYZ0123456789' with Cyrillic letters: `"; i8 244; i8 245; i8 246; "'"); COUNT("STR17"); 17; 1; COUNT("abcdefghijklmnopq"); COUNT("value label for `abcdefghijklmnopq'"); ); 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:422: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:422" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:422" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:427: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:427" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:427" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:428: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:428" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position num1,\"Format: F8.0 Value,Label 1,один (in Russian)\",1 num2,\"Format: F8.0 Value,Label 1,one 2,two\",2 num3,\"Format: F8.0 Value,Label 3,three 4,four\",3 num4,\"Format: F8.0 Value,Label 5,five 7,seven 8,eight 9,nine\",4 num5,\"Format: F8.0 Value,Label 6,six 7,seven 8,eight 10,ten\",5 str1,\"Format: A1 Value,Label a,value label for \`a'\",6 str2,\"Format: A2 Value,Label bc,value label for \`bc' de,value label for \`de'\",7 str3,\"Format: A3 Value,Label fgh,value label for \`fgh' ijk,value label for \`ijk'\",8 str4,\"Format: A4 Value,Label BCDE,value label for \`BCDE' lmno,value label for \`lmno' tuvw,value label for \`tuvw' xyzA,value label for \`xyzA'\",9 str5,\"Format: A4 Value,Label FGHI,value label for \`FGHI' pqrs,value label for \`pqrs' tuvw,value label for \`tuvw' xyzA,value label for \`xyzA'\",10 str6,\"Format: A6 Value,Label JKLMNO,value label for \`JKLMNO'\",11 str7,\"Format: A7 Value,Label JKLMNOP,value label for \`JKLMNOP'\",12 str8,\"Format: A8 Value,Label JKLMNOPQ,value label for \`JKLMNOPQ'\",13 str9ж,\"Format: A9 Value,Label RSTUVWXYZ,value label for \`RSTUVWXYZ'\",14 str12,\"Format: A12 Value,Label 0123456789ab,value label for \`0123456789ab' cdefghijklmn,value label for \`cdefghijklmn'\",15 str16,\"Format: A16 Value,Label EFGHIJKLMNOPQRST,value label for \`EFGHIJKLMNOPQRST' UVWXYZ0123456789,value label for \`UVWXYZ0123456789' with Cyrillic letters: \`фхц' opqrstuvwxyzABCD,value label for \`opqrstuvwxyzABCD'\",16 str17,\"Format: A17 Value,Label abcdefghijklmnopq,value label for \`abcdefghijklmnopq'\",17 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:428" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_68 #AT_START_69 at_fn_group_banner 69 'sys-file-reader.at:521' \ "documents" " " 11 at_xfail=no ( $as_echo "69. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 0; 0; 1; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; 6; 5; s80 "First line of documents"; s80 "Second line of documents"; "abb"; i8 233; " appliqu"; i8 233; " attach"; i8 233; " blas"; i8 233; " caf"; i8 233; " canap"; i8 233; " clich"; i8 233; " consomm"; i8 233; s25 ""; s80 ""; s80 "Last line of documents"; 7; 20; 1; 12; "windows-1252"; 999; 0; 1.0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:560: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:560" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:560" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DOCUMENTS. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:566: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:566" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:566" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:567: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:567" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Documents in the active dataset: First line of documents Second line of documents abbé appliqué attaché blasé café canapé cliché consommé Last line of documents Table: Data List num1 1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:567" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_69 #AT_START_70 at_fn_group_banner 70 'sys-file-reader.at:587' \ "empty document record" " " 11 at_xfail=no ( $as_echo "70. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 0; 0; 1; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; 6; 0; 7; 20; 1; 12; "windows-1252"; 999; 0; 1.0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:620: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:620" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:620" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:625: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:625" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:625" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:626: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:626" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List num1 1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:626" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_70 #AT_START_71 at_fn_group_banner 71 'sys-file-reader.at:634' \ "multiple response sets" " " 11 at_xfail=no ( $as_echo "71. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 16; 0; 0; 0; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; i8 0x82; i8 0xa0; s6 ""; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; 2; 0; 0; 0; 0x050800 *2; s8 "D"; 2; 0; 0; 0; 0x050800 *2; s8 "E"; 2; 0; 0; 0; 0x050800 *2; s8 "F"; 2; 0; 0; 0; 0x050800 *2; s8 "G"; 2; 4; 0; 0; 0x010400 *2; s8 "H"; 2; 4; 0; 0; 0x010400 *2; s8 "I"; 2; 4; 0; 0; 0x010400 *2; s8 "J"; 2; 0; 0; 0; 0x050800 *2; s8 "K"; 2; 0; 0; 0; 0x050800 *2; s8 "L"; 2; 0; 0; 0; 0x050800 *2; s8 "M"; 2; 6; 0; 0; 0x010600 *2; s8 "N"; 2; 6; 0; 0; 0x010600 *2; s8 "O"; 2; 6; 0; 0; 0x010600 *2; s8 "P"; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 932; 7; 7; 1; COUNT( "$a=C 10 my mcgroup "; i8 0x82; i8 0xa0; " b c"; i8 10; "$b=D2 55 0 g e f d"; i8 10; i8 10; "$c=D4 "; i8 0x82; i8 0xcd; i8 0x82; i8 0xa2; " 10 mdgroup #2 h i j"; i8 10); 7; 19; 1; COUNT( i8 10; "$d=E 1 2 34 13 third mdgroup k l m"; i8 10; "$e=E 11 6 choice 0 n o p"; i8 10; i8 10; i8 10; i8 10); 7; 20; 1; 9; "shift_jis"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:696: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:696" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:696" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. MRSETS /DISPLAY NAME=ALL. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:701: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:701" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:701" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:702: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:702" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Multiple Response Sets Name,Variables,Details \$a,\"あ b c \",\"Multiple category set Label: my mcgroup \" \$b,\"g e f d \",\"Multiple dichotomy set Counted value: 55 Category label source: Variable labels \" \$c,\"h i j \",\"Multiple dichotomy set Label: mdgroup #2 Label source: Provided by user Counted value: \`はい' Category label source: Variable labels \" \$d,\"k l m \",\"Multiple dichotomy set Label: third mdgroup Label source: Provided by user Counted value: 34 Category label source: Value labels of counted value \" \$e,\"n o p \",\"Multiple dichotomy set Label source: First variable label among variables Counted value: \`choice' Category label source: Value labels of counted value \" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:702" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_71 #AT_START_72 at_fn_group_banner 72 'sys-file-reader.at:751' \ "extra product info" " " 11 at_xfail=no ( $as_echo "72. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 4; 0; 0; 0; 100.0; "01 Jan 11"; "20:53:52"; "PSPP synthetic"; i8 13; s49 "test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "A"; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; 2; 0; 0; 0; 0x050800 *2; s8 "D"; 7; 10; 1; COUNT ("Extra product info"; i8 13; "another line"; i8 13; "blah"); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:781: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:781" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:781" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' SYSFILE INFO FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:785: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:785" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:785" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:786: sed 7q pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:786" ( $at_check_trace; sed 7q pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "File:,sys-file.sav Label:,\"PSPP synthetic test file\" Created:,01 Jan 11 20:53:52 by \$(#) SPSS DATA FILE PSPP synthetic test file Product:,\"Extra product info another line blah\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:786" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_72 #AT_START_73 at_fn_group_banner 73 'sys-file-reader.at:798' \ "variable display parameters, without width" " " 11 at_xfail=no ( $as_echo "73. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 19; 0; 0; 0; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "A"; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; 2; 0; 0; 0; 0x050800 *2; s8 "D"; 2; 3; 0; 0; 0x010300 *2; s8 "H"; 2; 3; 0; 0; 0x010300 *2; s8 "I"; 2; 3; 0; 0; 0x010300 *2; s8 "J"; 2; 3; 0; 0; 0x010300 *2; s8 "K"; 2; 9; 0; 0; 0x010900 *2; s8 "L"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 10; 0; 0; 0x010a00 *2; s8 "M"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 17; 0; 0; 0x011100 *2; s8 "N"; ( 2; -1; 0; 0; 0; 0; s8 "" ) * 2; 2; 25; 0; 0; 0x011900 *2; s8 "O"; ( 2; -1; 0; 0; 0; 0; s8 "" ) * 3; 7; 11; 4; 24; 1; 0; 2; 0; 3; 0; 1; 1; 2; 1; 3; 1; 1; 2; 2; 2; 3; 2; 0; 0; 0; 1; 0; 2; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:856: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:856" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:856" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:861: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:861" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:861" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:862: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:862" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position a,\"Format: F8.0 Measure: Nominal Display Alignment: Left\",1 b,\"Format: F8.0 Measure: Ordinal Display Alignment: Left\",2 c,\"Format: F8.0 Measure: Scale Display Alignment: Left\",3 d,\"Format: F8.0 Measure: Nominal Display Alignment: Right\",4 h,\"Format: A3 Measure: Ordinal Display Alignment: Right\",5 i,\"Format: A3 Measure: Scale Display Alignment: Right\",6 j,\"Format: A3 Measure: Nominal Display Alignment: Center\",7 k,\"Format: A3 Measure: Ordinal Display Alignment: Center\",8 l,\"Format: A9 Measure: Scale Display Alignment: Center\",9 m,\"Format: A10 Measure: Nominal Display Alignment: Left\",10 n,\"Format: A17 Measure: Nominal Display Alignment: Right\",11 o,\"Format: A25 Measure: Nominal Display Alignment: Center\",12 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:862" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_73 #AT_START_74 at_fn_group_banner 74 'sys-file-reader.at:904' \ "variable display parameters, with width" " " 11 at_xfail=no ( $as_echo "74. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 19; 0; 0; 0; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "A"; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; 2; 0; 0; 0; 0x050800 *2; s8 "D"; 2; 3; 0; 0; 0x010300 *2; s8 "H"; 2; 3; 0; 0; 0x010300 *2; s8 "I"; 2; 3; 0; 0; 0x010300 *2; s8 "J"; 2; 3; 0; 0; 0x010300 *2; s8 "K"; 2; 9; 0; 0; 0x010900 *2; s8 "L"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 10; 0; 0; 0x010a00 *2; s8 "M"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 17; 0; 0; 0x011100 *2; s8 "N"; ( 2; -1; 0; 0; 0; 0; s8 "" ) * 2; 2; 25; 0; 0; 0x011900 *2; s8 "O"; ( 2; -1; 0; 0; 0; 0; s8 "" ) * 3; 7; 11; 4; 36; 1; 1; 0; 2; 2; 0; 3; 3; 0; 1; 4; 1; 2; 5; 1; 3; 6; 1; 1; 7; 2; 2; 8; 2; 3; 9; 2; 0; 10; 0; 0; 11; 1; 0; 12; 2; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:962: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:962" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:962" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:967: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:967" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:967" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:968: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:968" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position a,\"Format: F8.0 Measure: Nominal Display Alignment: Left Display Width: 1\",1 b,\"Format: F8.0 Measure: Ordinal Display Alignment: Left Display Width: 2\",2 c,\"Format: F8.0 Measure: Scale Display Alignment: Left Display Width: 3\",3 d,\"Format: F8.0 Measure: Nominal Display Alignment: Right Display Width: 4\",4 h,\"Format: A3 Measure: Ordinal Display Alignment: Right Display Width: 5\",5 i,\"Format: A3 Measure: Scale Display Alignment: Right Display Width: 6\",6 j,\"Format: A3 Measure: Nominal Display Alignment: Center Display Width: 7\",7 k,\"Format: A3 Measure: Ordinal Display Alignment: Center Display Width: 8\",8 l,\"Format: A9 Measure: Scale Display Alignment: Center Display Width: 9\",9 m,\"Format: A10 Measure: Nominal Display Alignment: Left Display Width: 10\",10 n,\"Format: A17 Measure: Nominal Display Alignment: Right Display Width: 11\",11 o,\"Format: A25 Measure: Nominal Display Alignment: Center Display Width: 12\",12 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:968" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_74 #AT_START_75 at_fn_group_banner 75 'sys-file-reader.at:1022' \ "long variable names" " " 11 at_xfail=no ( $as_echo "75. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 7; 0; 0; 0; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_A"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_B"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_C"; 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDINA"; 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDI_A"; 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDI_B"; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST; 7; 13; 1; COUNT ( "LONGVARI=LongVariableName1"; i8 9; "LONGVA_A=LongVariableName2"; i8 9; "LONGVA_B=LongVariableName3"; i8 9; "LONGVA_C=LongVariableName4"; i8 9; "CO"; i8 214; "RDINA=Co"; i8 246; "rdinate_X"; i8 9; "CO"; i8 214; "RDI_A=Co"; i8 246; "rdinate_Y"; i8 9; "CO"; i8 214; "RDI_B=Co"; i8 246; "rdinate_Z"; ); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1069: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1069" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1069" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1074: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1074" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1074" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1075: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:1075" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position LongVariableName1,Format: F8.0,1 LongVariableName2,Format: F8.0,2 LongVariableName3,Format: F8.0,3 LongVariableName4,Format: F8.0,4 Coördinate_X,Format: F8.0,5 Coördinate_Y,Format: F8.0,6 Coördinate_Z,Format: F8.0,7 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1075" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_75 #AT_START_76 at_fn_group_banner 76 'sys-file-reader.at:1088' \ "very long strings" " " 11 at_xfail=no ( $as_echo "76. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 109; 0; 0; 1; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 255; 0; 0; 0x01FF00 *2; "S"; i8 201; s6 "Q256"; (2; -1; 0; 0; 0; 0; s8 "") * 31; 2; 4; 0; 0; 0x010400 *2; "S"; i8 201; "Q256_1"; 2; 255; 0; 0; 0x01FF00 *2; s8 "STR600"; (2; -1; 0; 0; 0; 0; s8 "") * 31; 2; 255; 0; 0; 0x01FF00 *2; s8 "STR600_1"; (2; -1; 0; 0; 0; 0; s8 "") * 31; 2; 96; 0; 0; 0x016000 *2; s8 "STR600_2"; (2; -1; 0; 0; 0; 0; s8 "") * 11; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; 7; 14; 1; COUNT ( "S"; i8 201; "Q256=00256"; i8 0; i8 9; "STR600=00600"; i8 0; i8 9; ); 7; 20; 1; 12; "windows-1252"; 999; 0; "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#" * 4; "abcdefgh"; "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#" * 9; "abcdefghijklmnopqrstuvwxyzABCDEF"; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1137: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1137" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1137" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1143: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1143" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1143" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1144: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:1144" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position séq256,Format: A256,1 str600,Format: A600,2 Table: Data List séq256,str600 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@a,abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyz " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1144" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_76 #AT_START_77 at_fn_group_banner 77 'sys-file-reader.at:1156' \ "data file and variable attributes" " " 11 at_xfail=no ( $as_echo "77. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 3; 0; 0; 0; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR"; 2; 0; 0; 0; 0x050800 *2; s8 "SECONDVA"; 2; 0; 0; 0; 0x050800 *2; s8 "THIRDVAR"; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; 7; 13; 1; COUNT ( "FIRSTVAR=FirstVariable"; i8 9; "SECONDVA=S"; i8 233; "condVariable"; i8 9; "THIRDVAR=ThirdVariable"; i8 9 ); 7; 17; 1; COUNT ( "Attr1('Value1'"; i8 10; "''d"; i8 233; "claration''"; i8 10; ")"; "S"; i8 233; "condAttr('123'"; i8 10; "'456'"; i8 10; ")"; ); 7; 18; 1; COUNT ( "FirstVariable:"; "ad"; i8 232; "le('23'"; i8 10; "'34'"; i8 10; ")"; "bert('123'"; i8 10; ")"; "$@Role('1'"; i8 10; ")"; "/S"; i8 233; "condVariable:"; "xyzzy('quux'"; i8 10; ")"; ); 7; 18; 1; COUNT ("ThirdVariable:fizz('buzz'"; i8 10; ")";); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1213: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1213" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1213" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY @ATTRIBUTES. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1218: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1218" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1218" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1219: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:1219" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description FirstVariable,\"Attribute,Value \$@Role,1 adèle[1],23 adèle[2],34 bert,123\" SécondVariable,\"Attribute,Value xyzzy,quux\" ThirdVariable,\"Attribute,Value fizz,buzz\" Table: Custom data file attributes. Attribute,Value Attr1[1],Value1 Attr1[2],'déclaration' SécondAttr[1],123 SécondAttr[2],456 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1219" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1242: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1242" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1242" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1243: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:1243" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position FirstVariable,\"Format: F8.0 Role: Output Attribute,Value adèle[1],23 adèle[2],34 bert,123\",1 SécondVariable,\"Format: F8.0 Role: Input Attribute,Value xyzzy,quux\",2 ThirdVariable,\"Format: F8.0 Role: Input Attribute,Value fizz,buzz\",3 Table: Custom data file attributes. Attribute,Value Attr1[1],Value1 Attr1[2],'déclaration' SécondAttr[1],123 SécondAttr[2],456 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1243" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_77 #AT_START_78 at_fn_group_banner 78 'sys-file-reader.at:1273' \ "variable roles" " " 11 at_xfail=no ( $as_echo "78. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 7; 0; 0; 0; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "I"; 2; 0; 0; 0; 0x050800 *2; s8 "O"; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "N"; 2; 0; 0; 0; 0x050800 *2; s8 "P"; 2; 0; 0; 0; 0x050800 *2; s8 "S"; 2; 0; 0; 0; 0x050800 *2; s8 "X"; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; 7; 18; 1; COUNT ( "I:$@Role('0'"; i8 10; ")"; "/O:$@Role('1'"; i8 10; ")"; "/B:$@Role('2'"; i8 10; ")"; "/N:$@Role('3'"; i8 10; ")"; "/P:$@Role('4'"; i8 10; ")"; "/S:$@Role('5'"; i8 10; ")"; "/X:$@Role('6'"; i8 10; ")"; ); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1317: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1317" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1317" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1322: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1322" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav': Invalid role for variable x. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1322" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1325: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:1325" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav': Invalid role for variable x. Variable,Description,Position i,\"Format: F8.0 Role: Input\",1 o,\"Format: F8.0 Role: Output\",2 b,\"Format: F8.0 Role: Both\",3 n,\"Format: F8.0 Role: None\",4 p,\"Format: F8.0 Role: Partition\",5 s,\"Format: F8.0 Role: Split\",6 x,\"Format: F8.0 Role: Input\",7 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1325" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_78 #AT_START_79 at_fn_group_banner 79 'sys-file-reader.at:1347' \ "compressed data" " " 11 at_xfail=no ( $as_echo "79. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 6; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; 7; 20; 1; 12; "windows-1252"; 999; 0; i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123"; i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu"; s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO"; i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW"; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1385: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1385" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1385" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1391: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1391" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1391" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1392: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:1392" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position num1,Format: F8.0,1 num2,Format: F8.0,2 str4,Format: A4,3 str8,Format: A8,4 str15,Format: A15,5 Table: Data List num1,num2,str4,str8,str15 -99,0,,abcdefgh,0123 .,151,jklm,nopqrstu,vwxyzABC 1,2,DEFG,HIJKLMNO,PQRSTUV " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1392" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_79 #AT_START_80 at_fn_group_banner 80 'sys-file-reader.at:1409' \ "compressed data, zero bias" " " 11 at_xfail=no ( $as_echo "80. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 6; 1; 0; -1; 0.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; 7; 20; 1; 12; "windows-1252"; 999; 0; i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123"; i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu"; s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO"; i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW"; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1447: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1447" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1447" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1453: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1453" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1453" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1454: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:1454" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position num1,Format: F8.0,1 num2,Format: F8.0,2 str4,Format: A4,3 str8,Format: A8,4 str15,Format: A15,5 Table: Data List num1,num2,str4,str8,str15 1,100,,abcdefgh,0123 .,251,jklm,nopqrstu,vwxyzABC 101,102,DEFG,HIJKLMNO,PQRSTUV " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1454" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_80 #AT_START_81 at_fn_group_banner 81 'sys-file-reader.at:1471' \ "compressed data, other bias" " " 11 at_xfail=no ( $as_echo "81. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 6; 1; 0; -1; 50.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; 7; 20; 1; 12; "windows-1252"; 999; 0; i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123"; i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu"; s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO"; i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW"; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1509: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1509" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1509" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1515: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1515" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0x54: Compression bias is not the usual value of 100, or system file uses unrecognized floating-point format. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1515" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1518: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:1518" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`sys-file.sav' near offset 0x54: Compression bias is not the usual value of 100, or system file uses unrecognized floating-point format.\" Variable,Description,Position num1,Format: F8.0,1 num2,Format: F8.0,2 str4,Format: A4,3 str8,Format: A8,4 str15,Format: A15,5 Table: Data List num1,num2,str4,str8,str15 -49,50,,abcdefgh,0123 .,201,jklm,nopqrstu,vwxyzABC 51,52,DEFG,HIJKLMNO,PQRSTUV " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1518" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_81 #AT_START_82 at_fn_group_banner 82 'sys-file-reader.at:1606' \ "zcompressed data" " " 11 at_xfail=no ( $as_echo "82. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1610: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1610" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1610" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1616: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1616" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1616" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1617: cat pspp.csv" at_fn_check_prepare_trace "sys-file-reader.at:1617" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position num1,Format: F8.0,1 num2,Format: F8.0,2 str4,Format: A4,3 str8,Format: A8,4 str15,Format: A15,5 Table: Data List num1,num2,str4,str8,str15 -99,0,,abcdefgh,0123 .,151,jklm,nopqrstu,vwxyzABC 1,2,DEFG,HIJKLMNO,PQRSTUV " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1617" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_82 #AT_START_83 at_fn_group_banner 83 'sys-file-reader.at:1636' \ "no variables" " " 12 at_xfail=no ( $as_echo "83. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 0; 0; 0; 0; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1657: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1657" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1657" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1661: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1661" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "sys-file.sps:1: error: GET: \`sys-file.sav': Data file dictionary has no variables. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:1661" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1667: pspp-convert sys-file.sav sys-file.txt" at_fn_check_prepare_trace "sys-file-reader.at:1667" ( $at_check_trace; pspp-convert sys-file.sav sys-file.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1667" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1668: cat sys-file.txt" at_fn_check_prepare_trace "sys-file-reader.at:1668" ( $at_check_trace; cat sys-file.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1668" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_83 #AT_START_84 at_fn_group_banner 84 'sys-file-reader.at:1673' \ "unspecified character encoding" " " 12 at_xfail=no ( $as_echo "84. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 4; 0; 0; 0; 100.0; "01 Jan 11"; "20:53:52"; "PSPP synthetic test file: "; i8 244; i8 245; i8 246; i8 248; s34 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "A"; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; 2; 0; 0; 0; 0x050800 *2; s8 "D"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1698: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1698" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1698" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET 'sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1702: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1702" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1702" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-reader.at:1703: sed 's/default encoding.*For/default encoding. For/' stdout" at_fn_check_prepare_trace "sys-file-reader.at:1703" ( $at_check_trace; sed 's/default encoding.*For/default encoding. For/' stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`sys-file.sav': This system file does not indicate its own character encoding. Using default encoding. For best results, specify an encoding explicitly. Use SYSFILE INFO with ENCODING=\"\"DETECT\"\" to analyze the possible encodings.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1703" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_84 #AT_START_85 at_fn_group_banner 85 'sys-file-reader.at:1709' \ "misplaced type 4 record" " " 12 at_xfail=no ( $as_echo "85. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; >>4<<; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1723: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1723" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1723" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1726: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1726" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xd4: Misplaced type 4 record. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:1726" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_85 #AT_START_86 at_fn_group_banner 86 'sys-file-reader.at:1732' \ "bad record type" " " 12 at_xfail=no ( $as_echo "86. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; >>8<<; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1746: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1746" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1746" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1749: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1749" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xd4: Unrecognized record type 8. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:1749" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_86 #AT_START_87 at_fn_group_banner 87 'sys-file-reader.at:1755' \ "wrong number of variable positions" " " 12 at_xfail=no ( $as_echo "87. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; >>2<<; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1772: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1772" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1772" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1775: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1775" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav': File header claims 2 variable positions but 1 were read from file. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1775" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_87 #AT_START_88 at_fn_group_banner 88 'sys-file-reader.at:1781' \ "variable name may not begin with \`#'" " " 12 at_xfail=no ( $as_echo "88. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 >>"$UM1"<<; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1798: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1798" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1798" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1801: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1801" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xb4: Invalid variable name \`\$UM1'. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:1801" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_88 #AT_START_89 at_fn_group_banner 89 'sys-file-reader.at:1807' \ "variable name may not be reserved word" " " 12 at_xfail=no ( $as_echo "89. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 >>"TO"<<; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1824: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1824" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1824" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1827: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1827" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xb4: Invalid variable name \`TO'. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:1827" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_89 #AT_START_90 at_fn_group_banner 90 'sys-file-reader.at:1833' \ "variable width must be between 0 and 255" " " 12 at_xfail=no ( $as_echo "90. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 256; 0; 0; 0x050800 *2; s8 "VAR1"; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1850: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1850" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1850" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1853: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1853" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xb4: Bad width 256 for variable VAR1. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:1853" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_90 #AT_START_91 at_fn_group_banner 91 'sys-file-reader.at:1861' \ "duplicate variable name" " " 12 at_xfail=no ( $as_echo "91. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "VAR1"; 2; 0; 0; 0; 0x050800 *2; s8 "VAR1"; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1879: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1879" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1879" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1883: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1883" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd4: Renaming variable with duplicate name \`VAR1' to \`VAR001'. Variable,Description,Position var1,Format: F8.0,1 var001,Format: F8.0,2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1883" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_91 #AT_START_92 at_fn_group_banner 92 'sys-file-reader.at:1893' \ "variable label indicator not 0 or 1" " " 12 at_xfail=no ( $as_echo "92. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; >>2<<; 0; 0x050800 *2; s8 "VAR1"; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1910: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1910" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1910" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1913: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1913" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xb4: Variable label indicator field is not 0 or 1. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:1913" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_92 #AT_START_93 at_fn_group_banner 93 'sys-file-reader.at:1919' \ "invalid numeric missing value indicator" " " 12 at_xfail=no ( $as_echo "93. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; >>-1<<; 0x050800 *2; s8 "VAR1"; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1936: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1936" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1936" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1939: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1939" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"error: \`sys-file.sav' near offset 0xb4: Numeric missing value indicator field is not -3, -2, 0, 1, 2, or 3.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:1939" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_93 #AT_START_94 at_fn_group_banner 94 'sys-file-reader.at:1945' \ "invalid string missing value indicator" " " 12 at_xfail=no ( $as_echo "94. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 8; 0; >>4<<; 0x010800 *2; s8 "VAR1"; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1962: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1962" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1962" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1965: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1965" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"error: \`sys-file.sav' near offset 0xb4: String missing value indicator field is not 0, 1, 2, or 3.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:1965" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_94 #AT_START_95 at_fn_group_banner 95 'sys-file-reader.at:1971' \ "missing string continuation record" " " 12 at_xfail=no ( $as_echo "95. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 10; 0; 0; 0x010a00 *2; s8 "VAR1"; >>2; 0; 0; 0; 0x050800 *2; s8 "VAR2";<< 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:1989: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:1989" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:1989" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:1992: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:1992" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xb4: Missing string continuation record. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:1992" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_95 #AT_START_96 at_fn_group_banner 96 'sys-file-reader.at:1998' \ "invalid variable format" " " 12 at_xfail=no ( $as_echo "96. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 4; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; >>0xff0800; 0<<; s8 "NUM1"; 2; 0; 0; 0; >>0x010800<<; >>0x021000<<; s8 "VAR1"; 2; 4; 0; 0; >>0x050800<<; >>0x110a01<<; s8 "STR1"; 2; 4; 0; 0; >>0x010800<<; >>0x020400<<; s8 "STR2"; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2026: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2026" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2026" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2029: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2029" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xc0: Variable NUM1 with width 0 has invalid print format 0xff0800. warning: \`sys-file.sav' near offset 0xe0: Variable VAR1 with width 0 has invalid print format 0x10800. warning: \`sys-file.sav' near offset 0xe4: Variable VAR1 with width 0 has invalid write format 0x21000. warning: \`sys-file.sav' near offset 0x100: Variable STR1 with width 4 has invalid print format 0x50800. warning: \`sys-file.sav' near offset 0x104: Variable STR1 with width 4 has invalid write format 0x110a01. warning: \`sys-file.sav' near offset 0x120: Variable STR2 with width 4 has invalid print format 0x10800. warning: \`sys-file.sav' near offset 0x124: Variable STR2 with width 4 has invalid write format 0x20400. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2029" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_96 #AT_START_97 at_fn_group_banner 97 'sys-file-reader.at:2047' \ "invalid long string missing values" " " 12 at_xfail=no ( $as_echo "97. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 7; 0; 0; 1; 100.0; "01 Jan 11"; "20:53:52"; "PSPP synthetic test file: "; i8 244; i8 245; i8 246; i8 248; s34 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 9; 0; 0; 0x010900 *2; s8 "STR1"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 10; 0; 0; 0x010a00 *2; s8 "STR2"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 11; 0; 0; 0x010b00 *2; s8 "STR3"; 2; -1; 0; 0; 0; 0; s8 ""; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST; 7; 22; 1; COUNT ( COUNT("STR1"); i8 >>0<<; COUNT("STR2"); i8 4; 8; "abcdefgh"; 8; "ijklmnop"; 8; "qrstuvwx"; 8; "yz012345"; COUNT(>>"Nonexistent"<<); i8 1; 8; "abcdefgh"; COUNT(>>"NUM1"<<); i8 1; 8; "abcdefgh"; COUNT("STR3"); i8 1; >>COUNT("abcdefghijkl")<<; ); 7; 20; 1; 12; "windows-1252"; 999; 0; s8 "abcd"; s8 "efgh"; s8 "ijkl"; s8 "mnop"; s8 "qrst"; s8 "uvwx"; s16 "yzABCDEFGHI"; s16 "JKLMNOPQR"; s16 "STUVWXYZ01"; s16 "23456789abc"; s32 "defghijklmnopqstuvwxyzABC"; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2110: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2110" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2110" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2115: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2115" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`sys-file.sav' near offset 0x1f8: Long string missing values record says variable STR1 has 0 missing values, but only 1 to 3 missing values are allowed.\" \"warning: \`sys-file.sav' near offset 0x201: Long string missing values record says variable STR2 has 4 missing values, but only 1 to 3 missing values are allowed.\" warning: \`sys-file.sav' near offset 0x242: Ignoring long string missing value record for unknown variable Nonexistent. warning: \`sys-file.sav' near offset 0x257: Ignoring long string missing value record for numeric variable NUM1. \"warning: \`sys-file.sav' near offset 0x270: Ignoring long string missing value 0 for variable str3, with width 11, that has bad value width 12.\" Variable,Description,Position num1,Format: F8.0,1 str1,Format: A9,2 str2,\"Format: A10 Missing Values: \"\"abcdefgh\"\"; \"\"ijklmnop\"\"; \"\"qrstuvwx\"\"\",3 str3,Format: A11,4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2115" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_97 #AT_START_98 at_fn_group_banner 98 'sys-file-reader.at:2136' \ "weighting variable must be numeric" " " 12 at_xfail=no ( $as_echo "98. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; >>2<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 4; 0; 0; 0x010400 *2; s8 "STR1"; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2156: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2156" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2156" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2160: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2160" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav': Ignoring string variable \`STR1' set as weighting variable. Variable,Description,Position num1,Format: F8.0,1 str1,Format: A4,2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2160" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_98 #AT_START_99 at_fn_group_banner 99 'sys-file-reader.at:2170' \ "bad weighting variable index" " " 12 at_xfail=no ( $as_echo "99. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; >>3<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 4; 0; 0; 0x010400 *2; s8 "STR1"; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2190: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2190" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2190" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2193: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2193" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x4c: Variable index 3 not in valid range 1...2. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:2193" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_99 #AT_START_100 at_fn_group_banner 100 'sys-file-reader.at:2199' \ "variable index is long string contination" " " 12 at_xfail=no ( $as_echo "100. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 3; 1; >>3<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 9; 0; 0; 0x010900 *2; s8 "STR1"; (2; -1; 0; 0; 0; 0; s8 ""); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2220: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2220" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2220" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2223: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2223" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x4c: Variable index 3 refers to long string continuation. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:2223" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_100 #AT_START_101 at_fn_group_banner 101 'sys-file-reader.at:2229' \ "multiple documents records" " " 12 at_xfail=no ( $as_echo "101. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; (6; 1; s80 "One line of documents") >>* 2<<; 999; 0; 7; 20; 1; 12; "windows-1252"; 1.0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2252: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2252" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2252" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2256: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2256" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x12c: Duplicate type 6 (document) record. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:2256" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_101 #AT_START_102 at_fn_group_banner 102 'sys-file-reader.at:2263' \ "extension record too large" " " 12 at_xfail=no ( $as_echo "102. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 3; >>0xfffff000 * 2<<; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2277: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2277" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2277" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2281: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2281" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xd8: Record type 7 subtype 3 too large. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:2281" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_102 #AT_START_103 at_fn_group_banner 103 'sys-file-reader.at:2287' \ "unknown extension record" " " 12 at_xfail=no ( $as_echo "103. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 30; 1; 1; i8 0; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2307: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2307" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2307" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2311: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2311" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`sys-file.sav' near offset 0xd8: Unrecognized record type 7, subtype 30. For help, please send this file to ${PACKAGE_BUGREPORT} and mention that you were using ${PACKAGE_STRING}.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2311" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_103 #AT_START_104 at_fn_group_banner 104 'sys-file-reader.at:2317' \ "bad machine integer info size" " " 12 at_xfail=no ( $as_echo "104. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 3; 4; >>9<<; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; >>1234<<; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2337: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2337" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2337" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2341: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2341" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`sys-file.sav' near offset 0xd8: Record type 7, subtype 3 has bad count 9 (expected 8).\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2341" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_104 #AT_START_105 at_fn_group_banner 105 'sys-file-reader.at:2347' \ "bad machine integer info float format" " " 12 at_xfail=no ( $as_echo "105. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 3; 4; 8; 1; 2; 3; -1; >>2<<; 1; ENDIAN; 1252; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2367: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2367" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2367" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2371: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2371" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xd8: Floating-point representation indicated by system file (2) differs from expected (1). " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:2371" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_105 #AT_START_106 at_fn_group_banner 106 'sys-file-reader.at:2377' \ "bad machine integer info endianness" " " 12 at_xfail=no ( $as_echo "106. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; >>3<<; 1252; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in "be 1" "le 2"; do set $variant { set +x $as_echo "$at_srcdir/sys-file-reader.at:2398: sack --\$1 sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$1 sys-file.sack > sys-file.sav" "sys-file-reader.at:2398" ( $at_check_trace; sack --$1 sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2398" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2403: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2403" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Integer format indicated by system file (3) differs from expected ($2). Variable,Description,Position num1,Format: F8.0,1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2403" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_106 #AT_START_107 at_fn_group_banner 107 'sys-file-reader.at:2413' \ "bad machine floating-point info size" " " 12 at_xfail=no ( $as_echo "107. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 4; 8; >>4<<; SYSMIS; HIGHEST; LOWEST; 0.0; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2433: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2433" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2433" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2437: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2437" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`sys-file.sav' near offset 0xd8: Record type 7, subtype 4 has bad count 4 (expected 3).\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2437" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_107 #AT_START_108 at_fn_group_banner 108 'sys-file-reader.at:2443' \ "wrong special floating point values" " " 12 at_xfail=no ( $as_echo "108. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 4; 8; 3; >>0.0<<; >>1.0<<; >>2.0<<; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2463: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2463" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2463" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2466: pspp -O format=csv sys-file.sps | sed 's/ (.*/.../'" at_fn_check_prepare_notrace 'a shell pipeline' "sys-file-reader.at:2466" ( $at_check_trace; pspp -O format=csv sys-file.sps | sed 's/ (.*/.../' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`sys-file.sav' near offset 0xd8: File specifies unexpected value 0... \"warning: \`sys-file.sav' near offset 0xd8: File specifies unexpected value 1... \"warning: \`sys-file.sav' near offset 0xd8: File specifies unexpected value 2... " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2466" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_108 #AT_START_109 at_fn_group_banner 109 'sys-file-reader.at:2476' \ "bad mrsets name" " " 12 at_xfail=no ( $as_echo "109. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 16; 0; 0; 0; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; i8 0x82; i8 0xa0; s6 ""; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; 2; 0; 0; 0; 0x050800 *2; s8 "D"; 2; 0; 0; 0; 0x050800 *2; s8 "E"; 2; 0; 0; 0; 0x050800 *2; s8 "F"; 2; 0; 0; 0; 0x050800 *2; s8 "G"; 2; 4; 0; 0; 0x010400 *2; s8 "H"; 2; 4; 0; 0; 0x010400 *2; s8 "I"; 2; 4; 0; 0; 0x010400 *2; s8 "J"; 2; 0; 0; 0; 0x050800 *2; s8 "K"; 2; 0; 0; 0; 0x050800 *2; s8 "L"; 2; 0; 0; 0; 0x050800 *2; s8 "M"; 2; 6; 0; 0; 0x010600 *2; s8 "N"; 2; 6; 0; 0; 0x010600 *2; s8 "O"; 2; 6; 0; 0; 0x010600 *2; s8 "P"; 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 932; 7; 7; 1; COUNT( "$a=C 10 my mcgroup "; i8 0x82; i8 0xa0; " b c"; i8 10; "b=D2 55 0 g e f d"; i8 10; "$c=D4 "; i8 0x82; i8 0xcd; i8 0x82; i8 0xa2; " 10 mdgroup #2 h i j"; i8 10); 7; 19; 1; COUNT( "$d=E 1 2 34 13 third mdgroup k l m"; i8 10; "e=E 11 6 choice 0 n o p"; i8 10); 7; 20; 1; 9; "shift_jis"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2537: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2537" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2537" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. MRSETS /DISPLAY NAME=ALL. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2541: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2541" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav': Invalid multiple response set name \`b'. warning: \`sys-file.sav': Invalid multiple response set name \`e'. Table: Multiple Response Sets Name,Variables,Details \$a,\"あ b c \",\"Multiple category set Label: my mcgroup \" \$c,\"h i j \",\"Multiple dichotomy set Label: mdgroup #2 Label source: Provided by user Counted value: \`はい' Category label source: Variable labels \" \$d,\"k l m \",\"Multiple dichotomy set Label: third mdgroup Label source: Provided by user Counted value: 34 Category label source: Value labels of counted value \" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2541" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_109 #AT_START_110 at_fn_group_banner 110 'sys-file-reader.at:2576' \ "missing space after C in mrsets" " " 12 at_xfail=no ( $as_echo "110. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=Cx"); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2595: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2595" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2595" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2598: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2598" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Missing space following \`C' at offset 4 in MRSETS record. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2598" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_110 #AT_START_111 at_fn_group_banner 111 'sys-file-reader.at:2604' \ "missing space after E in mrsets" " " 12 at_xfail=no ( $as_echo "111. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=Ex"); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2623: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2623" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2623" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2626: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2626" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Missing space following \`E' at offset 4 in MRSETS record. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2626" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_111 #AT_START_112 at_fn_group_banner 112 'sys-file-reader.at:2632' \ "unexpected label source in mrsets" " " 12 at_xfail=no ( $as_echo "112. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=E 2"); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2651: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2651" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2651" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2654: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2654" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Unexpected label source value following \`E' at offset 7 in MRSETS record. warning: \`sys-file.sav' near offset 0xd8: Expecting digit at offset 7 in MRSETS record. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2654" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_112 #AT_START_113 at_fn_group_banner 113 'sys-file-reader.at:2662' \ "bad type character in mrsets" " " 12 at_xfail=no ( $as_echo "113. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a="); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2681: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2681" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2681" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2684: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2684" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`sys-file.sav' near offset 0xd8: Missing \`C', \`D', or \`E' at offset 3 in MRSETS record.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2684" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_113 #AT_START_114 at_fn_group_banner 114 'sys-file-reader.at:2690' \ "bad counted string length in mrsets" " " 12 at_xfail=no ( $as_echo "114. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=Dx"); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2709: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2709" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2709" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2712: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2712" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Expecting digit at offset 4 in MRSETS record. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2712" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_114 #AT_START_115 at_fn_group_banner 115 'sys-file-reader.at:2718' \ "missing space in counted string in mrsets" " " 12 at_xfail=no ( $as_echo "115. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=D1x"); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2737: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2737" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2737" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2740: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2740" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Expecting space at offset 5 in MRSETS record. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2740" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_115 #AT_START_116 at_fn_group_banner 116 'sys-file-reader.at:2746' \ "counted string too long in mrsets" " " 12 at_xfail=no ( $as_echo "116. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=D4 abc"); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2765: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2765" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2765" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2768: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2768" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: 4-byte string starting at offset 6 exceeds record length 9. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2768" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_116 #AT_START_117 at_fn_group_banner 117 'sys-file-reader.at:2774' \ "missing space after counted string in mrsets" " " 12 at_xfail=no ( $as_echo "117. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=D3 abcx"); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2793: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2793" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2793" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2796: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2796" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Expecting space at offset 9 following 3-byte string. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2796" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_117 #AT_START_118 at_fn_group_banner 118 'sys-file-reader.at:2802' \ "missing newline after variable name in mrsets" " " 12 at_xfail=no ( $as_echo "118. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=C 0 NUM1"); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2821: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2821" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2821" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2824: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2824" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Missing new-line parsing variable names at offset 13 in MRSETS record. warning: \`sys-file.sav': MRSET \$a has only one variable. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2824" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_118 #AT_START_119 at_fn_group_banner 119 'sys-file-reader.at:2832' \ "duplicate variable name in mrsets" " " 12 at_xfail=no ( $as_echo "119. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=C 0 NUM1 NUM1"; i8 10); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2851: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2851" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2851" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2854: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2854" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav': MRSET \$a contains duplicate variable name NUM1. warning: \`sys-file.sav': MRSET \$a has only one variable. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2854" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_119 #AT_START_120 at_fn_group_banner 120 'sys-file-reader.at:2862' \ "mixed variable types in mrsets" " " 12 at_xfail=no ( $as_echo "120. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 8; 0; 0; 0x010800 *2; s8 "STR1"; 7; 7; 1; COUNT("$a=C 0 NUM1 STR1"; i8 10); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2882: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2882" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2882" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2885: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2885" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav': MRSET \$a contains both string and numeric variables. warning: \`sys-file.sav': MRSET \$a has only one variable. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2885" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_120 #AT_START_121 at_fn_group_banner 121 'sys-file-reader.at:2893' \ "missing newline after variable name in mrsets" " " 12 at_xfail=no ( $as_echo "121. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=C 0 NUM1"; i8 10); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2912: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2912" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2912" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2915: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2915" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav': MRSET \$a has only one variable. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2915" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_121 #AT_START_122 at_fn_group_banner 122 'sys-file-reader.at:2921' \ "zero or one variable in mrset" " " 12 at_xfail=no ( $as_echo "122. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 7; 1; COUNT("$a=C 0 NUM1"; i8 10; "$b=C 0 "; i8 10); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2940: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2940" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2940" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2943: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2943" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav': MRSET \$a has only one variable. warning: \`sys-file.sav': MRSET \$b has no variables. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2943" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_122 #AT_START_123 at_fn_group_banner 123 'sys-file-reader.at:2951' \ "wrong display parameter size" " " 12 at_xfail=no ( $as_echo "123. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 11; >>8<<; 2; 1.0; 1.0; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:2971: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:2971" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2971" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:2974: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:2974" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"warning: \`sys-file.sav' near offset 0xd8: Record type 7, subtype 11 has bad size 8 (expected 4).\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:2974" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_123 #AT_START_124 at_fn_group_banner 124 'sys-file-reader.at:2980' \ "wrong display parameter count" " " 12 at_xfail=no ( $as_echo "124. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 11; 4; >>4<<; 1; 1; 2; 2; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3000: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3000" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3000" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3003: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3003" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Extension 11 has bad count 4 (for 1 variables). " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3003" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_124 #AT_START_125 at_fn_group_banner 125 'sys-file-reader.at:3009' \ "wrong display measurement level" " " 12 at_xfail=no ( $as_echo "125. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 11; 4; 2; >>4<<; 0; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3029: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3029" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3029" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3032: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3032" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Invalid variable display parameters for variable 0 (NUM1). Default parameters substituted. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3032" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_125 #AT_START_126 at_fn_group_banner 126 'sys-file-reader.at:3038' \ "wrong display alignment" " " 12 at_xfail=no ( $as_echo "126. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 11; 4; 2; 1; >>-1<<; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3058: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3058" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3058" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3061: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3061" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: Invalid variable display parameters for variable 0 (NUM1). Default parameters substituted. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3061" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_126 #AT_START_127 at_fn_group_banner 127 'sys-file-reader.at:3067' \ "bad variable name in variable/value pair" " " 12 at_xfail=no ( $as_echo "127. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI"; 7; 13; 1; COUNT (>>"xyzzy"<<); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3087: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3087" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3087" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3091: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3091" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xde: Dictionary record refers to unknown variable xyzzy. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3091" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_127 #AT_START_128 at_fn_group_banner 128 'sys-file-reader.at:3097' \ "duplicate long variable name" " " 12 at_xfail=no ( $as_echo "128. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 4; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_A"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_B"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_C"; 7; 13; 1; COUNT ( "LONGVARI=_Invalid"; i8 9; "LONGVARI=$Invalid"; i8 9; "LONGVARI=#Invalid"; i8 9; "LONGVA_A=LongVariableName"; i8 9; "LONGVA_B=LONGVARIABLENAME"; i8 9; ); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3126: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3126" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3126" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3130: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3130" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name \`_Invalid'. warning: \`sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name \`\$Invalid'. warning: \`sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name \`#Invalid'. warning: \`sys-file.sav' near offset 0x138: Duplicate long variable name \`LONGVARIABLENAME'. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3130" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_128 #AT_START_129 at_fn_group_banner 129 'sys-file-reader.at:3142' \ "bad very long string length" " " 12 at_xfail=no ( $as_echo "129. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 7; 14; 1; COUNT ( "NUM1=00000"; i8 0; i8 9; "NUM1=00255"; i8 0; i8 9; "NUM1=00256"; i8 0; i8 9; ); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3166: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3166" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3166" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3170: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3170" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xd8: NUM1 listed as string of invalid length 00000 in very long string record. \"warning: \`sys-file.sav' near offset 0xd8: NUM1 listed in very long string record with width 00255, which requires only one segment.\" error: \`sys-file.sav' near offset 0xd8: Very long string NUM1 overflows dictionary. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3170" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_129 #AT_START_130 at_fn_group_banner 130 'sys-file-reader.at:3180' \ "bad very long string segment width" " " 12 at_xfail=no ( $as_echo "130. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 255; 0; 0; 0x01ff00 *2; s8 "STR1"; (2; -1; 0; 0; 0; 0; s8 "") * 31; 2; >>9<<; 0; 0; 0x010900 *2; s8 "STR1_A"; >>2; -1; 0; 0; 0; 0; s8 "";<< 7; 14; 1; COUNT ( "STR1=00256"; i8 0; i8 9; ); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3205: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3205" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3205" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3209: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3209" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x4f8: Very long string with width 256 has segment 1 of width 9 (expected 4). " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3209" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_130 #AT_START_131 at_fn_group_banner 131 'sys-file-reader.at:3215' \ "too many value labels" " " 12 at_xfail=no ( $as_echo "131. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 3; >>0x7fffffff<<; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3227: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3227" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3227" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3231: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3231" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xd4: Invalid number of labels 2147483647. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3231" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_131 #AT_START_132 at_fn_group_banner 132 'sys-file-reader.at:3237' \ "missing type 4 record" " " 12 at_xfail=no ( $as_echo "132. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 3; 1; 1.0; i8 3; s7 "one"; 7; 20; 1; 12; "windows-1252"; >>999; 0<<; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3257: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3257" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3257" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3261: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3261" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xe8: Variable index record (type 4) does not immediately follow value label record (type 3) as it should. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3261" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_132 #AT_START_133 at_fn_group_banner 133 'sys-file-reader.at:3267' \ "value label with no associated variables" " " 12 at_xfail=no ( $as_echo "133. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 3; 1; 1.0; i8 3; s7 "one"; 4; >>0<<; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3281: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3281" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3281" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3285: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3285" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xec: Number of variables associated with a value label (0) is not between 1 and the number of variables (1). " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3285" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_133 #AT_START_134 at_fn_group_banner 134 'sys-file-reader.at:3291' \ "type 4 record names long string variable" " " 12 at_xfail=no ( $as_echo "134. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 9; 0; 0; 0x010900 *2; s8 "STR1"; 2; -1; 0; 0; 0; 0; s8 ""; 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 1; >>1<<; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3312: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3312" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3312" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3316: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3316" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0xf4: Value labels may not be added to long string variables (e.g. STR1) using records types 3 and 4. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3316" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_134 #AT_START_135 at_fn_group_banner 135 'sys-file-reader.at:3322' \ "variables for value label must all be same type" "" 12 at_xfail=no ( $as_echo "135. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 6; 0; 0; 0x010600 *2; s8 "STR1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 2<<; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3343: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3343" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3343" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3347: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3347" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"error: \`sys-file.sav' near offset 0xf4: Variables associated with value label are not all of identical type. Variable STR1 is string, but variable NUM1 is numeric.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3347" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_135 #AT_START_136 at_fn_group_banner 136 'sys-file-reader.at:3353' \ "duplicate value labels type" " " 12 at_xfail=no ( $as_echo "136. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 6; 0; 0; 0x010600 *2; s8 "STR1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 1<<; 3; 1; 1.0; i8 3; s7 "one"; 4; 2; >>2; 2<<; 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3375: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3375" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3375" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3379: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3379" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xf4: Duplicate value label for \`xyzzy ' on STR1. warning: \`sys-file.sav' near offset 0x11c: Duplicate value label for 1 on NUM1. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3379" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_136 #AT_START_137 at_fn_group_banner 137 'sys-file-reader.at:3387' \ "missing attribute value" " " 12 at_xfail=no ( $as_echo "137. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR"; 7; 17; 1; COUNT ( "Attr1(" ); 7; 18; 1; COUNT ( "FIRSTVAR:"; "fred('23'"; i8 10 ); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3415: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3415" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3415" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3419: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3419" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xde: Error parsing attribute value Attr1[1]. warning: \`sys-file.sav' near offset 0x101: Error parsing attribute value fred[2]. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3419" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_137 #AT_START_138 at_fn_group_banner 138 'sys-file-reader.at:3427' \ "unquoted attribute value" " " 12 at_xfail=no ( $as_echo "138. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR"; 7; 17; 1; COUNT ( "Attr1(value"; i8 10; ")" ); 7; 18; 1; COUNT ( "FIRSTVAR:"; "fred(23"; i8 10; ")" ); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3456: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3456" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3456" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3460: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3460" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xe4: Attribute value Attr1[1] is not quoted: value. warning: \`sys-file.sav' near offset 0x106: Attribute value fred[1] is not quoted: 23. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3460" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_138 #AT_START_139 at_fn_group_banner 139 'sys-file-reader.at:3468' \ "duplicate attribute name" " " 12 at_xfail=no ( $as_echo "139. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR"; 7; 17; 1; COUNT ( "Attr1('value'"; i8 10; ")"; "Attr1('value'"; i8 10; ")"; ); 7; 18; 1; COUNT ( "FIRSTVAR:"; "fred('23'"; i8 10; ")"; "fred('23'"; i8 10; ")"; ); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3498: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3498" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3498" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3502: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3502" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0xf6: Duplicate attribute Attr1. warning: \`sys-file.sav' near offset 0x125: Duplicate attribute fred. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3502" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_139 #AT_START_140 at_fn_group_banner 140 'sys-file-reader.at:3510' \ "bad variable name in long string value label" " " 12 at_xfail=no ( $as_echo "140. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 3; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 14; 0; 0; 0x010e00 *2; s8 "STR14"; 2; -1; 0; 0; 0; 0; s8 ""; 7; 21; 1; COUNT ( COUNT(>>"STR9"<<); 9; 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'"); COUNT(>>"NUM1"<<); 0; 1; COUNT("xyz"); COUNT("value label for 1.0"); COUNT("STR14"); >>9<<; 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'"); COUNT("STR14"); 14; 1; COUNT(>>"RSTUVWXYZ"<<); COUNT("value label for `RSTUVWXYZ'"); COUNT("STR14"); 14; 2; COUNT("abcdefghijklmn"); COUNT("value label for `abcdefghijklmn'"); >>COUNT("abcdefghijklmn"); COUNT("another value label for `abcdefghijklmn'")<<; ); 7; 20; 1; 12; "windows-1252"; 999; 0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3552: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3552" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3552" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3555: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3555" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0x128: Ignoring long string value label record for unknown variable STR9. warning: \`sys-file.sav' near offset 0x164: Ignoring long string value label record for numeric variable NUM1. warning: \`sys-file.sav' near offset 0x193: Ignoring long string value label record for variable STR14 because the record's width (9) does not match the variable's width (14). \"warning: \`sys-file.sav' near offset 0x1d4: Ignoring long string value label 0 for variable str14, with width 14, that has bad value width 9.\" warning: \`sys-file.sav' near offset 0x259: Duplicate value label for \`abcdefghijklmn' on str14. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3555" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_140 #AT_START_141 at_fn_group_banner 141 'sys-file-reader.at:3569' \ "fewer data records than indicated by file header" "" 12 at_xfail=no ( $as_echo "141. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 0; 0; >>5<<; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; 7; 20; 1; 12; "windows-1252"; 999; 0; 1.0; 2.0; 3.0; 4.0; 5.0; 6.0; 7.0; 8.0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3592: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3592" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3592" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3596: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3596" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: Error reading case from file \`sys-file.sav'. Table: Data List num1,num2 1,2 3,4 5,6 7,8 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3596" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_141 #AT_START_142 at_fn_group_banner 142 'sys-file-reader.at:3609' \ "partial data record between variables" " " 12 at_xfail=no ( $as_echo "142. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 0; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; 7; 20; 1; 12; "windows-1252"; 999; 0; 1.0; 2.0; 3.0; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3629: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3629" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3629" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3633: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3633" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x12c: File ends in partial case. Table: Data List num1,num2 1,2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3633" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_142 #AT_START_143 at_fn_group_banner 143 'sys-file-reader.at:3643' \ "partial data record within long string" " " 12 at_xfail=no ( $as_echo "143. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 0; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; 2; 14; 0; 0; 0x010e00 *2; s8 "STR14"; 2; -1; 0; 0; 0; 0; s8 ""; 7; 20; 1; 12; "windows-1252"; 999; 0; s14 "one data item"; s8 "partial"; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3663: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3663" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3663" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3667: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3667" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x12a: Unexpected end of file. Table: Data List str14 one data item " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3667" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_143 #AT_START_144 at_fn_group_banner 144 'sys-file-reader.at:3677' \ "partial compressed data record" " " 12 at_xfail=no ( $as_echo "144. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 6; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; 7; 20; 1; 12; "windows-1252"; 999; 0; i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123"; _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3711: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3711" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3711" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3715: pspp -O format=csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3715" ( $at_check_trace; pspp -O format=csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x1ac: File ends in partial case. Table: Data List num1,num2,str4,str8,str15 -99,0,,abcdefgh,0123 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3715" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_144 #AT_START_145 at_fn_group_banner 145 'sys-file-reader.at:3725' \ "zcompressed data - bad zheader_ofs" " " 12 at_xfail=no ( $as_echo "145. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*zheader_ofs.*/>>i64 0<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3729: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3729" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3729" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3732: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3732" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x194: Wrong ZLIB data header offset 0 (expected 0x194). " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3732" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_145 #AT_START_146 at_fn_group_banner 146 'sys-file-reader.at:3737' \ "zcompressed data - bad ztrailer_ofs" " " 12 at_xfail=no ( $as_echo "146. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*ztrailer_ofs.*/>>i64 0<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3741: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3741" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3741" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3744: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3744" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x194: Impossible ZLIB trailer offset 0x0. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3744" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_146 #AT_START_147 at_fn_group_banner 147 'sys-file-reader.at:3751' \ "zcompressed data - invalid ztrailer_len" " " 12 at_xfail=no ( $as_echo "147. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*ztrailer_len.*/>>i64 12<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3755: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3755" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3755" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3758: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3758" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x194: Invalid ZLIB trailer length 12. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3758" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_147 #AT_START_148 at_fn_group_banner 148 'sys-file-reader.at:3764' \ "zcompressed data - wrong ztrailer_len" " " 12 at_xfail=no ( $as_echo "148. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*ztrailer_len.*/>>i64 72<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3768: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3768" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3768" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3771: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3771" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0x1ac: End of ZLIB trailer (0x24d) is not file size (0x235). error: \`sys-file.sav' near offset 0x21d: 72-byte ZLIB trailer specifies 1 data blocks (expected 2). " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3771" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_148 #AT_START_149 at_fn_group_banner 149 'sys-file-reader.at:3777' \ "zcompressed data - wrong ztrailer_bias" " " 12 at_xfail=no ( $as_echo "149. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*ztrailer_bias.*/>>i64 0<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3781: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3781" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3781" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3784: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3784" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x20d: ZLIB trailer bias (0) differs from file header bias (100.00). " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3784" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_149 #AT_START_150 at_fn_group_banner 150 'sys-file-reader.at:3789' \ "zcompressed data - wrong ztrailer_zero" " " 12 at_xfail=no ( $as_echo "150. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*ztrailer_zero.*/>>i64 100<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3793: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3793" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3793" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3796: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3796" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0x215: ZLIB trailer \"zero\" field has nonzero value 100. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3796" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_150 #AT_START_151 at_fn_group_banner 151 'sys-file-reader.at:3801' \ "zcompressed data - wrong block_size" " " 12 at_xfail=no ( $as_echo "151. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*block_size.*/>>0x1000<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3805: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3805" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3805" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3808: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3808" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0x219: ZLIB trailer specifies unexpected 4096-byte block size. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3808" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_151 #AT_START_152 at_fn_group_banner 152 'sys-file-reader.at:3813' \ "zcompressed data - wrong n_blocks" " " 12 at_xfail=no ( $as_echo "152. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*n_blocks.*/>>2<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3817: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3817" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3817" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3820: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3820" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x21d: 48-byte ZLIB trailer specifies 2 data blocks (expected 1). " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3820" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_152 #AT_START_153 at_fn_group_banner 153 'sys-file-reader.at:3825' \ "zcompressed data - wrong uncompressed_ofs" " " 12 at_xfail=no ( $as_echo "153. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*uncompressed_ofs.*/i64 >>0x177<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3829: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3829" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3829" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3832: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3832" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported uncompressed data offset 0x177, when 0x194 was expected. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3832" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_153 #AT_START_154 at_fn_group_banner 154 'sys-file-reader.at:3837' \ "zcompressed data - wrong compressed_ofs" " " 12 at_xfail=no ( $as_echo "154. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*# compressed_ofs.*/i64 >>0x191<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3841: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3841" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3841" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3844: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3844" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported compressed data offset 0x191, when 0x1ac was expected. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3844" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_154 #AT_START_155 at_fn_group_banner 155 'sys-file-reader.at:3849' \ "zcompressed data - compressed sizes don't add up" "" 12 at_xfail=no ( $as_echo "155. $at_setup_line: testing $at_desc ..." $at_traceon cat >sys-file.sack <<'_ATEOF' "$FL3"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 6; 2; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; 7; 20; 1; 12; "windows-1252"; 999; 0; i64 0x194; # zheader_ofs i64 0x1ac; # ztrailer_ofs i64 72; # ztrailer_len i64 -100; # ztrailer_bias i64 0; # ztrailer_zero 0x3ff000; # block_size 2; # n_blocks i64 0x194; # uncompressed_ofs i64 0x1ac; # compressed_ofs 0x100000; # uncompressed_size 0x12345; # compressed_size i64 0x100194; # uncompressed_ofs i64 0x12421; # compressed_ofs 0x100000; # uncompressed_size 0x12345; # compressed_size _ATEOF for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3906: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3906" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3906" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3909: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3909" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0x1c4: ZLIB block descriptor 0 reported block size 0x100000, when 0x3ff000 was expected. error: \`sys-file.sav' near offset 0x1dc: ZLIB block descriptor 1 reported compressed data offset 0x12421, when 0x124f1 was expected. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3909" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_155 #AT_START_156 at_fn_group_banner 156 'sys-file-reader.at:3915' \ "zcompressed data - uncompressed_size > block_size" "" 12 at_xfail=no ( $as_echo "156. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*uncompressed_size.*/>>0x400000<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3919: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3919" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3919" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3922: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3922" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: \`sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported block size 0x400000, when at most 0x3ff000 was expected. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3922" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_156 #AT_START_157 at_fn_group_banner 157 'sys-file-reader.at:3927' \ "zcompressed data - compression expands data too much" "" 12 at_xfail=no ( $as_echo "157. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*uncompressed_size.*/>>50<<;/ s/.*# compressed_size.*/>>100<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3932: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3932" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3932" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3935: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3935" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reports compressed size 100 and uncompressed size 50. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3935" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_157 #AT_START_158 at_fn_group_banner 158 'sys-file-reader.at:3940' \ "zcompressed data - compressed sizes don't add up" "" 12 at_xfail=no ( $as_echo "158. $at_setup_line: testing $at_desc ..." $at_traceon zcompressed_sack | sed 's/.*# compressed_size.*/>>88<<;/' > sys-file.sack for variant in be le; do { set +x $as_echo "$at_srcdir/sys-file-reader.at:3944: sack --\$variant sys-file.sack > sys-file.sav" at_fn_check_prepare_dynamic "sack --$variant sys-file.sack > sys-file.sav" "sys-file-reader.at:3944" ( $at_check_trace; sack --$variant sys-file.sack > sys-file.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3944" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='sys-file.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-reader.at:3947: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file-reader.at:3947" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: \`sys-file.sav' near offset 0x235: ZLIB trailer is at offset 0x205 but 0x204 would be expected from block descriptors. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file-reader.at:3947" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_158 #AT_START_159 at_fn_group_banner 159 'sys-file-reader.at:3957' \ "integer overflows in long string missing values" "" 12 at_xfail=no ( $as_echo "159. $at_setup_line: testing $at_desc ..." $at_traceon cp $top_srcdir/tests/data/CVE-2017-10791.sav . { set +x $as_echo "$at_srcdir/sys-file-reader.at:3960: pspp-convert -O csv -e ASCII CVE-2017-10791.sav -" at_fn_check_prepare_trace "sys-file-reader.at:3960" ( $at_check_trace; pspp-convert -O csv -e ASCII CVE-2017-10791.sav - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo >>"$at_stderr"; $as_echo "\`CVE-2017-10791.sav' near offset 0x217: Extension record subtype 21 ends unexpectedly. " | \ $at_diff - "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3960" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_159 #AT_START_160 at_fn_group_banner 160 'sys-file-reader.at:3970' \ "null dereference skipping bad extension record 18" "" 12 at_xfail=no ( $as_echo "160. $at_setup_line: testing $at_desc ..." $at_traceon cp $top_srcdir/tests/data/CVE-2017-10792.sav . { set +x $as_echo "$at_srcdir/sys-file-reader.at:3973: pspp-convert -O csv -e ASCII CVE-2017-10792.sav -" at_fn_check_prepare_trace "sys-file-reader.at:3973" ( $at_check_trace; pspp-convert -O csv -e ASCII CVE-2017-10792.sav - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo >>"$at_stderr"; $as_echo "\`CVE-2017-10792.sav' near offset 0x1c0: Record type 7, subtype 18 has bad size 4 (expected 1). " | \ $at_diff - "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-reader.at:3973" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_160 #AT_START_161 at_fn_group_banner 161 'sys-file.at:20' \ "write and read numeric data" " " 13 at_xfail=no ( $as_echo "161. $at_setup_line: testing $at_desc ..." $at_traceon for variant in 'UNCOMPRESSED $FL2' 'ZCOMPRESSED $FL3'; do set $variant compression=$1 magic=$2 cat >sysfile.sps <>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:44" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:45: cat pspp.csv" at_fn_check_prepare_trace "sys-file.at:45" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List variable001,variable002,variable003,variable004 1.00,1.00,1.00,2.00 1.00,1.00,2.00,30.00 1.00,2.00,1.00,8.00 1.00,2.00,2.00,20.00 2.00,1.00,1.00,2.00 2.00,1.00,2.00,22.00 2.00,2.00,1.00,1.00 2.00,2.00,2.00,3.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:45" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:57: dd if=foo.sav bs=1 count=4; echo" at_fn_check_prepare_trace "sys-file.at:57" ( $at_check_trace; dd if=foo.sav bs=1 count=4; echo ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo >>"$at_stdout"; $as_echo "$magic " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:57" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_161 #AT_START_162 at_fn_group_banner 162 'sys-file.at:62' \ "write and read long string value labels and missing values" "" 13 at_xfail=no ( $as_echo "162. $at_setup_line: testing $at_desc ..." $at_traceon for variant in 'UNCOMPRESSED $FL2' 'ZCOMPRESSED $FL3'; do set $variant compression=$1 magic=$2 cat >sysfile.sps <>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:90" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:91: cat pspp.csv" at_fn_check_prepare_trace "sys-file.at:91" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position s1,\"Format: A9 Missing Values: \"\"0 \"\" Value,Label abc ,First value label abcdefgh ,Second value label abcdefghi,Third value label\",1 s2,\"Format: A9 Missing Values: \"\"12 \"\"; \"\"123 \"\" Value,Label 0 ,Fourth value label 01234567 ,Fifth value label 012345678,Sixth value label\",2 s3,\"Format: A9 Missing Values: \"\"1234 \"\"; \"\"12345 \"\"; \"\"12345678\"\"\",3 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:91" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:110: dd if=foo.sav bs=1 count=4; echo" at_fn_check_prepare_trace "sys-file.at:110" ( $at_check_trace; dd if=foo.sav bs=1 count=4; echo ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo >>"$at_stdout"; $as_echo "$magic " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:110" $at_failed && at_fn_log_failure $at_traceon; } done set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_162 #AT_START_163 at_fn_group_banner 163 'sys-file.at:115' \ "write and read compressed files" " " 13 at_xfail=no ( $as_echo "163. $at_setup_line: testing $at_desc ..." $at_traceon cat >sysfile.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * y (a200). BEGIN DATA. 1.2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx . yyyyyyyyyyyyyyy 0 ddddddddddddddddddddddddddddddd 101 z END DATA. SAVE OUTFILE='com.sav' /COMPRESS . GET FILE='com.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:132: pspp -o pspp.csv sysfile.sps" at_fn_check_prepare_trace "sys-file.at:132" ( $at_check_trace; pspp -o pspp.csv sysfile.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:132" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:134: dd if=com.sav bs=1 skip=72 count=4 2> /dev/null > com.sav.subset" at_fn_check_prepare_trace "sys-file.at:134" ( $at_check_trace; dd if=com.sav bs=1 skip=72 count=4 2> /dev/null > com.sav.subset ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:134" $at_failed && at_fn_log_failure $at_traceon; } od com.sav.subset { set +x $as_echo "$at_srcdir/sys-file.at:136: (printf '\\000\\000\\000\\001' | cmp -l com.sav.subset -) || (printf '\\001\\000\\000\\000' | cmp -l com.sav.subset -)" at_fn_check_prepare_notrace 'an embedded newline' "sys-file.at:136" ( $at_check_trace; (printf '\000\000\000\001' | cmp -l com.sav.subset -) || (printf '\001\000\000\000' | cmp -l com.sav.subset -) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:136" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_163 #AT_START_164 at_fn_group_banner 164 'sys-file.at:142' \ "overwriting system file" " " 13 at_xfail=no ( $as_echo "164. $at_setup_line: testing $at_desc ..." $at_traceon cat >output.sav <<'_ATEOF' abcdef _ATEOF cp output.sav output.sav.backup cat >sysfile.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. SAVE OUTFILE='output.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:153: pspp -O format=csv sysfile.sps" at_fn_check_prepare_trace "sys-file.at:153" ( $at_check_trace; pspp -O format=csv sysfile.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:153" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:154: cmp output.sav output.sav.backup" at_fn_check_prepare_trace "sys-file.at:154" ( $at_check_trace; cmp output.sav output.sav.backup ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/sys-file.at:154" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_164 #AT_START_165 at_fn_group_banner 165 'sys-file.at:157' \ "overwriting system file atomically" " " 13 at_xfail=no ( $as_echo "165. $at_setup_line: testing $at_desc ..." $at_traceon cat >output.sav <<'_ATEOF' abcdef _ATEOF cp output.sav output.sav.backup cat >sysfile.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. XSAVE OUTFILE='output.sav'. HOST COMMAND=['kill -TERM $PPID']. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:169: pspp -O format=csv sysfile.sps" at_fn_check_prepare_trace "sys-file.at:169" ( $at_check_trace; pspp -O format=csv sysfile.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 143 $at_status "$at_srcdir/sys-file.at:169" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:170: cmp output.sav output.sav.backup" at_fn_check_prepare_trace "sys-file.at:170" ( $at_check_trace; cmp output.sav output.sav.backup ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:170" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:171: for file in *.tmp*; do if test -e \$file; then echo \$file; exit 1; fi; done" at_fn_check_prepare_dynamic "for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done" "sys-file.at:171" ( $at_check_trace; for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:171" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_165 #AT_START_166 at_fn_group_banner 166 'sys-file.at:176' \ "write to same system file being read" " " 13 at_xfail=no ( $as_echo "166. $at_setup_line: testing $at_desc ..." $at_traceon cat >save.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 3 END DATA. SAVE OUTFILE='data.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:184: pspp -O format=csv save.sps" at_fn_check_prepare_trace "sys-file.at:184" ( $at_check_trace; pspp -O format=csv save.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:184" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:185: test -s data.sav" at_fn_check_prepare_trace "sys-file.at:185" ( $at_check_trace; test -s data.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:185" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:186: for file in *.tmp*; do if test -e \$file; then echo \$file; exit 1; fi; done" at_fn_check_prepare_dynamic "for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done" "sys-file.at:186" ( $at_check_trace; for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:186" $at_failed && at_fn_log_failure $at_traceon; } cat >save2.sps <<'_ATEOF' GET FILE='data.sav'. COMPUTE y = x * 3. SAVE OUTFILE='data.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:193: pspp -O format=csv save2.sps" at_fn_check_prepare_trace "sys-file.at:193" ( $at_check_trace; pspp -O format=csv save2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:193" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:194: for file in *.tmp*; do if test -e \$file; then echo \$file; exit 1; fi; done" at_fn_check_prepare_dynamic "for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done" "sys-file.at:194" ( $at_check_trace; for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:194" $at_failed && at_fn_log_failure $at_traceon; } cat >save3.sps <<'_ATEOF' GET FILE='data.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:200: pspp -O format=csv save3.sps" at_fn_check_prepare_trace "sys-file.at:200" ( $at_check_trace; pspp -O format=csv save3.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,y 3,9.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:200" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_166 #AT_START_167 at_fn_group_banner 167 'sys-file.at:207' \ "nonempty case_map doesn't crash" " " 13 at_xfail=no ( $as_echo "167. $at_setup_line: testing $at_desc ..." $at_traceon cat >save.sps <<'_ATEOF' INPUT PROGRAM. COMPUTE #I = 1. COMPUTE X = #I + 1. END CASE. END FILE. END INPUT PROGRAM. SAVE OUTFILE='tiny.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:219: pspp -O format=csv save.sps" at_fn_check_prepare_trace "sys-file.at:219" ( $at_check_trace; pspp -O format=csv save.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:219" $at_failed && at_fn_log_failure $at_traceon; } cat >get.sps <<'_ATEOF' GET FILE='tiny.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:224: pspp -O format=csv get.sps" at_fn_check_prepare_trace "sys-file.at:224" ( $at_check_trace; pspp -O format=csv get.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List X 2.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:224" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_167 #AT_START_168 at_fn_group_banner 168 'sys-file.at:233' \ "system files with -1 case_size" " " 13 at_xfail=no ( $as_echo "168. $at_setup_line: testing $at_desc ..." $at_traceon cat >save.sps <<'_ATEOF' DATA LIST LIST NOTABLE /cont (A32) size pop count. VAR LABEL cont 'continents of the world' size 'sq km' pop 'population' count 'number of countries'. SAVE OUTFILE='cont.sav'. BEGIN DATA. Asia, 44579000, 3.7E+009, 44.00 Africa, 30065000, 7.8E+008, 53.00 "North America", 24256000, 4.8E+008, 23.00 "South America", 17819000, 3.4E+008, 12.00 Antarctica, 13209000, .00, .00 Europe, 9938000, 7.3E+008, 46.00 Australia/Oceania, 7687000, 31000000, 14.00 END DATA. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:253: pspp -O format=csv save.sps" at_fn_check_prepare_trace "sys-file.at:253" ( $at_check_trace; pspp -O format=csv save.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:253" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:254: test -f cont.sav" at_fn_check_prepare_trace "sys-file.at:254" ( $at_check_trace; test -f cont.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:254" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:258: (dd if=cont.sav bs=1 count=68; printf '\\377\\377\\377\\377'; dd if=cont.sav bs=1 skip=72) > cont2.sav" at_fn_check_prepare_notrace 'an embedded newline' "sys-file.at:258" ( $at_check_trace; (dd if=cont.sav bs=1 count=68; printf '\377\377\377\377'; dd if=cont.sav bs=1 skip=72) > cont2.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:258" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:262: cmp cont.sav cont2.sav" at_fn_check_prepare_trace "sys-file.at:262" ( $at_check_trace; cmp cont.sav cont2.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "cont.sav cont2.sav differ: char 69, line 1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file.at:262" $at_failed && at_fn_log_failure $at_traceon; } cat >get.sps <<'_ATEOF' GET FILE='cont2.sav'. DISPLAY LABELS. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:271: pspp -o pspp.csv get.sps" at_fn_check_prepare_trace "sys-file.at:271" ( $at_check_trace; pspp -o pspp.csv get.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:271" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:272: cat pspp.csv" at_fn_check_prepare_trace "sys-file.at:272" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Label,Position cont,continents of the world,1 size,sq km,2 pop,population,3 count,number of countries,4 Table: Data List cont,size,pop,count Asia ,44579000,3.7E+009,44.00 Africa ,30065000,7.8E+008,53.00 North America ,24256000,4.8E+008,23.00 South America ,17819000,3.4E+008,12.00 Antarctica ,13209000,.00,.00 Europe ,9938000,7.3E+008,46.00 Australia/Oceania ,7687000,31000000,14.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:272" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_168 #AT_START_169 at_fn_group_banner 169 'sys-file.at:291' \ "write v2 system file" " " 13 at_xfail=no ( $as_echo "169. $at_setup_line: testing $at_desc ..." $at_traceon cat >sysfile.sps <<'_ATEOF' DATA LIST LIST NOTABLE / X * variable001 * variable002 * variable003 * . BEGIN DATA. 1.00 1.00 1.0 2.00 1.00 1.00 2.0 30.00 1.00 2.00 1.0 8.00 1.00 2.00 2.0 20.00 2.00 1.00 1.0 2.00 2.00 1.00 2.0 22.00 2.00 2.00 1.0 1.00 2.00 2.00 2.0 3.00 END DATA. SAVE /OUTFILE='foo.sav' /VERSION=2 . GET /FILE='foo.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:314: pspp -O format=csv sysfile.sps" at_fn_check_prepare_trace "sys-file.at:314" ( $at_check_trace; pspp -O format=csv sysfile.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,variable,variab_a,variab_b 1.00,1.00,1.00,2.00 1.00,1.00,2.00,30.00 1.00,2.00,1.00,8.00 1.00,2.00,2.00,20.00 2.00,1.00,1.00,2.00 2.00,1.00,2.00,22.00 2.00,2.00,1.00,1.00 2.00,2.00,2.00,3.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:314" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:327: grep 'X=X' foo.sav" at_fn_check_prepare_trace "sys-file.at:327" ( $at_check_trace; grep 'X=X' foo.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/sys-file.at:327" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_169 #AT_START_170 at_fn_group_banner 170 'sys-file.at:332' \ "read very long strings written by SPSS 13" " " 14 at_xfail=no ( $as_echo "170. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sys-file.at:333: cp \$top_srcdir/tests/data/v13.sav ." at_fn_check_prepare_dynamic "cp $top_srcdir/tests/data/v13.sav ." "sys-file.at:333" ( $at_check_trace; cp $top_srcdir/tests/data/v13.sav . ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:333" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='v13.sav' ENCODING='utf-8'. DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:339: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file.at:339" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:339" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:340: cat pspp.csv" at_fn_check_prepare_trace "sys-file.at:340" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position N,\"Format: F8.2 Display Width: 10\",1 A255,\"Format: A255 Display Width: 32\",2 A258,\"Format: A258 Display Width: 32\",3 A2000,\"Format: A2000 Display Width: 32\",4 Table: Data List N,A255,A258,A2000 1.00,a1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,b1BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,c1CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 2.00,a2XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,b2YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY,c2ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:340" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_170 #AT_START_171 at_fn_group_banner 171 'sys-file.at:358' \ "read very long strings written by SPSS 14" " " 14 at_xfail=no ( $as_echo "171. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sys-file.at:359: cp \$top_srcdir/tests/data/v14.sav ." at_fn_check_prepare_dynamic "cp $top_srcdir/tests/data/v14.sav ." "sys-file.at:359" ( $at_check_trace; cp $top_srcdir/tests/data/v14.sav . ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:359" $at_failed && at_fn_log_failure $at_traceon; } cat >sys-file.sps <<'_ATEOF' GET FILE='v14.sav' ENCODING='utf-8'. DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:365: pspp -o pspp.csv sys-file.sps" at_fn_check_prepare_trace "sys-file.at:365" ( $at_check_trace; pspp -o pspp.csv sys-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:365" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:366: cat pspp.csv" at_fn_check_prepare_trace "sys-file.at:366" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position vl255,\"Format: A255 Display Width: 26\",1 vl256,\"Format: A256 Display Width: 26\",2 vl1335,\"Format: A1335 Display Width: 26\",3 vl2000,\"Format: A2000 Display Width: 26\",4 Table: Data List vl255,vl256,vl1335,vl2000 MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:366" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_171 #AT_START_172 at_fn_group_banner 172 'sys-file.at:427' \ "save very long string -- uncompressed" " " 14 at_xfail=no ( $as_echo "172. $at_setup_line: testing $at_desc ..." $at_traceon vls_gen_data cat >save.sps <<'_ATEOF' DATA LIST FIXED NOTABLE FILE='data.txt' /a 2-11 (a) b (a256) c (a200) d (a32767). SAVE OUTFILE='foo.sav' /UNCOMPRESSED. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:427: pspp -O format=csv save.sps" at_fn_check_prepare_trace "sys-file.at:427" ( $at_check_trace; pspp -O format=csv save.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:427" $at_failed && at_fn_log_failure $at_traceon; } cat >get.sps <<'_ATEOF' GET FILE='foo.sav'. DISPLAY VARIABLES. PRINT OUTFILE='out.txt' /a (a10) b (a256) c (a200) d (a32767) . EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:427: pspp -o pspp.csv get.sps" at_fn_check_prepare_trace "sys-file.at:427" ( $at_check_trace; pspp -o pspp.csv get.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:427" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:427: cat pspp.csv" at_fn_check_prepare_trace "sys-file.at:427" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position a,Format: A10,1 b,Format: A256,2 c,Format: A200,3 d,Format: A32767,4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:427" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_172 #AT_START_173 at_fn_group_banner 173 'sys-file.at:428' \ "save very long string -- compressed" " " 14 at_xfail=no ( $as_echo "173. $at_setup_line: testing $at_desc ..." $at_traceon vls_gen_data cat >save.sps <<'_ATEOF' DATA LIST FIXED NOTABLE FILE='data.txt' /a 2-11 (a) b (a256) c (a200) d (a32767). SAVE OUTFILE='foo.sav' /COMPRESSED. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:428: pspp -O format=csv save.sps" at_fn_check_prepare_trace "sys-file.at:428" ( $at_check_trace; pspp -O format=csv save.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:428" $at_failed && at_fn_log_failure $at_traceon; } cat >get.sps <<'_ATEOF' GET FILE='foo.sav'. DISPLAY VARIABLES. PRINT OUTFILE='out.txt' /a (a10) b (a256) c (a200) d (a32767) . EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:428: pspp -o pspp.csv get.sps" at_fn_check_prepare_trace "sys-file.at:428" ( $at_check_trace; pspp -o pspp.csv get.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:428" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:428: cat pspp.csv" at_fn_check_prepare_trace "sys-file.at:428" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position a,Format: A10,1 b,Format: A256,2 c,Format: A200,3 d,Format: A32767,4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:428" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_173 #AT_START_174 at_fn_group_banner 174 'sys-file.at:433' \ "system file character encoding" " " 14 at_xfail=no ( $as_echo "174. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sys-file.at:434: i18n-test supports_encodings windows-1252" at_fn_check_prepare_trace "sys-file.at:434" ( $at_check_trace; i18n-test supports_encodings windows-1252 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:434" $at_failed && at_fn_log_failure $at_traceon; } cat >save.sps <<'_ATEOF' SET LOCALE='windows-1252'. DATA LIST LIST NOTABLE /àéîöçxyzabc * roué (A9) croûton (A1000). FILE LABEL 'clientèle confrère cortège crèche'. DOCUMENT coördinate smörgåsbord épée séance soufflé soirée jalapeño vicuña. VALUE LABEL /àéîöçxyzabc 1 'éclair élan' /roué 'abcdefghi' 'sauté précis'. VARIABLE LABEL roué 'Provençal soupçon'. DATAFILE ATTRIBUTE ATTRIBUTE=Furtwängler('kindergärtner'). VARIABLE ATTRIBUTE VARIABLES=àéîöçxyzabc ATTRIBUTE=Atatürk('Düsseldorf Gewürztraminer'). BEGIN DATA. 1 a x 2 b y 3 c z END DATA. SAVE OUTFILE='foo.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:459: pspp -O format=csv save.sps" at_fn_check_prepare_trace "sys-file.at:459" ( $at_check_trace; pspp -O format=csv save.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:459" $at_failed && at_fn_log_failure $at_traceon; } cat >get.sps <<'_ATEOF' GET FILE='foo.sav'. DISPLAY FILE LABEL. DISPLAY DOCUMENTS. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/sys-file.at:466: pspp -o pspp.csv get.sps" at_fn_check_prepare_trace "sys-file.at:466" ( $at_check_trace; pspp -o pspp.csv get.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:466" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file.at:467: sed 's/(Entered [^)]*)/(Entered )/' pspp.csv" at_fn_check_prepare_trace "sys-file.at:467" ( $at_check_trace; sed 's/(Entered [^)]*)/(Entered )/' pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "File label: clientèle confrère cortège crèche Documents in the active dataset: DOCUMENT coördinate smörgåsbord épée séance soufflé soirée jalapeño vicuña. (Entered ) Variable,Description,Position àéîöçxyzabc,\"Format: F8.2 Value,Label 1.00,éclair élan Attribute,Value Atatürk,Düsseldorf Gewürztraminer\",1 roué,\"Label: Provençal soupçon Format: A9 Value,Label abcdefghi,sauté précis\",2 croûton,Format: A1000,3 Table: Custom data file attributes. Attribute,Value Furtwängler,kindergärtner " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file.at:467" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_174 #AT_START_175 at_fn_group_banner 175 'encrypted-file.at:19' \ "decrypt an encrypted system file" " " 15 at_xfail=no ( $as_echo "175. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encrypted-file.at:21: pspp-convert \$srcdir/data/hotel-encrypted.sav hotel.sav -p pspp" at_fn_check_prepare_dynamic "pspp-convert $srcdir/data/hotel-encrypted.sav hotel.sav -p pspp" "encrypted-file.at:21" ( $at_check_trace; pspp-convert $srcdir/data/hotel-encrypted.sav hotel.sav -p pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encrypted-file.at:21" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encrypted-file.at:22: pspp-convert hotel.sav hotel.csv" at_fn_check_prepare_trace "encrypted-file.at:22" ( $at_check_trace; pspp-convert hotel.sav hotel.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encrypted-file.at:22" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encrypted-file.at:23: cat hotel.csv" at_fn_check_prepare_trace "encrypted-file.at:23" ( $at_check_trace; cat hotel.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "v1,v2,v3,v4,v5 4,2,3,4,1 1,1,3,1,1 5,2,2,3,4 3,1,3,1,2 5,3,1,5,3 1,2,5,4,2 3,2,4,3,1 1,4,5,2,1 3,2,3,1,2 2,5,4,2,1 4,2,2,3,5 2,1,4,1,1 1,2,5,5,2 2,3,3,3,1 4,1,1,1,3 1,1,5,1,2 2,5,5,2,2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encrypted-file.at:23" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_175 #AT_START_176 at_fn_group_banner 176 'encrypted-file.at:45' \ "decrypt an encrypted syntax file" " " 15 at_xfail=no ( $as_echo "176. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encrypted-file.at:47: pspp-convert \$srcdir/data/test-encrypted.sps test.sps -p password" at_fn_check_prepare_dynamic "pspp-convert $srcdir/data/test-encrypted.sps test.sps -p password" "encrypted-file.at:47" ( $at_check_trace; pspp-convert $srcdir/data/test-encrypted.sps test.sps -p password ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encrypted-file.at:47" $at_failed && at_fn_log_failure $at_traceon; } # The sample file is not ideal: lines end in CRLF and its last line # lacks a new-line, so "sed" and "echo" make it easier to work with. { set +x $as_echo "$at_srcdir/encrypted-file.at:51: tr -d \"\\r\" < test.sps; echo" at_fn_check_prepare_trace "encrypted-file.at:51" ( $at_check_trace; tr -d "\r" < test.sps; echo ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "* Encoding: windows-1252. DATA LIST LIST /name (a25) quantity (f8). BEGIN DATA. widgets 10345 oojars 2345 dubreys 98 thingumies 518 END DATA. LIST. DESCRIPTIVES /quantity /statistics ALL. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encrypted-file.at:51" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_176 #AT_START_177 at_fn_group_banner 177 'command.at:20' \ "command parser crash bug" " " 16 at_xfail=no ( $as_echo "177. $at_setup_line: testing $at_desc ..." $at_traceon cat >command.sps <<'_ATEOF' DATA rubbish. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/command.at:25: pspp -O format=csv command.sps" at_fn_check_prepare_trace "command.at:25" ( $at_check_trace; pspp -O format=csv command.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "command.sps:1: error: Unknown command \`DATA rubbish'. command.sps:2: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/command.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_177 #AT_START_178 at_fn_group_banner 178 'command.at:36' \ "FINISH executes immediately" " " 16 at_xfail=no ( $as_echo "178. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/command.at:37: (echo \"FINISH.\"; while echo ; do true; done) | pspp" at_fn_check_prepare_notrace 'a shell pipeline' "command.at:37" ( $at_check_trace; (echo "FINISH."; while echo ; do true; done) | pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/command.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_178 #AT_START_179 at_fn_group_banner 179 'command.at:42' \ "ERASE -- safer mode" " " 17 at_xfail=no ( $as_echo "179. $at_setup_line: testing $at_desc ..." $at_traceon cat >foobar <<'_ATEOF' contents _ATEOF cat >erase.sps <<'_ATEOF' set safer on erase FILE='foobar'. _ATEOF { set +x $as_echo "$at_srcdir/command.at:50: pspp -O format=csv erase.sps" at_fn_check_prepare_trace "command.at:50" ( $at_check_trace; pspp -O format=csv erase.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "erase.sps:3: error: ERASE: This command not allowed when the SAFER option is set. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/command.at:50" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/command.at:53: cat foobar" at_fn_check_prepare_trace "command.at:53" ( $at_check_trace; cat foobar ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "contents " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command.at:53" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_179 #AT_START_180 at_fn_group_banner 180 'command.at:57' \ "ERASE -- not safer mode" " " 17 at_xfail=no ( $as_echo "180. $at_setup_line: testing $at_desc ..." $at_traceon cat >foobar <<'_ATEOF' contents _ATEOF { set +x $as_echo "$at_srcdir/command.at:60: test -e foobar" at_fn_check_prepare_trace "command.at:60" ( $at_check_trace; test -e foobar ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command.at:60" $at_failed && at_fn_log_failure $at_traceon; } cat >erase.sps <<'_ATEOF' erase FILE='foobar'. _ATEOF { set +x $as_echo "$at_srcdir/command.at:64: pspp -O format=csv erase.sps" at_fn_check_prepare_trace "command.at:64" ( $at_check_trace; pspp -O format=csv erase.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command.at:64" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/command.at:65: test ! -e foobar" at_fn_check_prepare_trace "command.at:65" ( $at_check_trace; test ! -e foobar ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command.at:65" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_180 #AT_START_181 at_fn_group_banner 181 'command.at:70' \ "N OF CASES" " " 18 at_xfail=no ( $as_echo "181. $at_setup_line: testing $at_desc ..." $at_traceon cat >n-of-cases.sps <<'_ATEOF' INPUT PROGRAM. LOOP #i = 1 TO 100. COMPUTE x=#i. END CASE. END LOOP. END FILE. END INPUT PROGRAM. N OF CASES 15. LIST. _ATEOF { set +x $as_echo "$at_srcdir/command.at:84: pspp -O format=csv n-of-cases.sps" at_fn_check_prepare_trace "command.at:84" ( $at_check_trace; pspp -O format=csv n-of-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command.at:84" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_181 #AT_START_182 at_fn_group_banner 182 'command.at:109' \ "COMMENT at end of file" " " 19 at_xfail=no ( $as_echo "182. $at_setup_line: testing $at_desc ..." $at_traceon cat >comment.sps <<'_ATEOF' COMMENT this is a comment at end of file. _ATEOF { set +x $as_echo "$at_srcdir/command.at:113: pspp -O format=csv comment.sps" at_fn_check_prepare_trace "command.at:113" ( $at_check_trace; pspp -O format=csv comment.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command.at:113" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_182 #AT_START_183 at_fn_group_banner 183 'do-if.at:19' \ "DO IF" " " 20 at_xfail=no ( $as_echo "183. $at_setup_line: testing $at_desc ..." $at_traceon (for a in 0 1 ' '; do for b in 0 1 ' '; do for c in 0 1 ' '; do for d in 0 1 ' '; do abcd=$a$b$c$d echo "$abcd" 1>&3 if test "$a" = "1"; then echo " $abcd A" elif test "$a" = " "; then : elif test "$b" = "1"; then echo " $abcd B" elif test "$b" = " "; then : elif test "$c" = "1"; then echo " $abcd C" elif test "$c" = " "; then : elif test "$d" = "1"; then echo " $abcd D" elif test "$d" = " "; then : else echo " $abcd E" fi done done done done) >expout 3>do-if.txt || exit 99 cat >do-if.sps <<'_ATEOF' DATA LIST FILE="do-if.txt"/A B C D 1-4 ABCD 1-4 (A). DO IF A. PRINT OUTFILE="do-if.out"/ABCD 'A'. ELSE IF B. PRINT OUTFILE="do-if.out"/ABCD 'B'. ELSE IF C. PRINT OUTFILE="do-if.out"/ABCD 'C'. ELSE IF D. PRINT OUTFILE="do-if.out"/ABCD 'D'. ELSE. PRINT OUTFILE="do-if.out"/ABCD 'E'. END IF. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/do-if.at:64: pspp do-if.sps" at_fn_check_prepare_trace "do-if.at:64" ( $at_check_trace; pspp do-if.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/do-if.at:64" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/do-if.at:65: cat do-if.out" at_fn_check_prepare_trace "do-if.at:65" ( $at_check_trace; cat do-if.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-if.at:65" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_183 #AT_START_184 at_fn_group_banner 184 'do-if.at:68' \ "unpaired END IF crash" " " 20 at_xfail=no ( $as_echo "184. $at_setup_line: testing $at_desc ..." $at_traceon cat >do-if.sps <<'_ATEOF' DATA LIST LIST NOTABLE/a b c. END IF. _ATEOF { set +x $as_echo "$at_srcdir/do-if.at:73: pspp -O format=csv do-if.sps" at_fn_check_prepare_trace "do-if.at:73" ( $at_check_trace; pspp -O format=csv do-if.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "do-if.sps:2: error: END IF: This command cannot appear outside DO IF...END IF. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/do-if.at:73" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_184 #AT_START_185 at_fn_group_banner 185 'do-if.at:80' \ "ELSE without DO IF" " " 20 at_xfail=no ( $as_echo "185. $at_setup_line: testing $at_desc ..." $at_traceon cat >do-if.sps <<'_ATEOF' DATA lIST NOTABLE LIST /QUA BRA *. BEGIN DATA 4 1 6 3 END DATA ELSE QUA 'A string'. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/do-if.at:92: pspp -O format=csv do-if.sps" at_fn_check_prepare_trace "do-if.at:92" ( $at_check_trace; pspp -O format=csv do-if.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "do-if.sps:7: error: ELSE: This command cannot appear outside DO IF...END IF. do-if.sps:9: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/do-if.at:92" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_185 #AT_START_186 at_fn_group_banner 186 'do-repeat.at:19' \ "DO REPEAT -- simple" " " 21 at_xfail=no ( $as_echo "186. $at_setup_line: testing $at_desc ..." $at_traceon cat >do-repeat.sps <<'_ATEOF' INPUT PROGRAM. STRING y(A1). DO REPEAT xval = 1 2 3 / yval = 'a' 'b' 'c' / var = a b c. COMPUTE x=xval. COMPUTE y=yval. COMPUTE var=xval. END CASE. END REPEAT. END FILE. END INPUT PROGRAM. LIST. _ATEOF { set +x $as_echo "$at_srcdir/do-repeat.at:33: pspp -o pspp.csv do-repeat.sps" at_fn_check_prepare_trace "do-repeat.at:33" ( $at_check_trace; pspp -o pspp.csv do-repeat.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-repeat.at:33" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/do-repeat.at:34: cat pspp.csv" at_fn_check_prepare_trace "do-repeat.at:34" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List y,x,a,b,c a,1.00,1.00,. ,. b,2.00,. ,2.00,. c,3.00,. ,. ,3.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-repeat.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_186 #AT_START_187 at_fn_group_banner 187 'do-repeat.at:43' \ "DO REPEAT -- containing BEGIN DATA" " " 21 at_xfail=no ( $as_echo "187. $at_setup_line: testing $at_desc ..." $at_traceon cat >do-repeat.sps <<'_ATEOF' DO REPEAT offset = 1 2 3. DATA LIST NOTABLE /x 1-2. BEGIN DATA. 10 20 30 END DATA. COMPUTE x = x + offset. LIST. END REPEAT. _ATEOF { set +x $as_echo "$at_srcdir/do-repeat.at:56: pspp -o pspp.csv do-repeat.sps" at_fn_check_prepare_trace "do-repeat.at:56" ( $at_check_trace; pspp -o pspp.csv do-repeat.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-repeat.at:56" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/do-repeat.at:57: cat pspp.csv" at_fn_check_prepare_trace "do-repeat.at:57" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x 11 21 31 Table: Data List x 12 22 32 Table: Data List x 13 23 33 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-repeat.at:57" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_187 #AT_START_188 at_fn_group_banner 188 'do-repeat.at:78' \ "DO REPEAT -- dummy vars not expanded in include files" "" 21 at_xfail=no ( $as_echo "188. $at_setup_line: testing $at_desc ..." $at_traceon cat >include.sps <<'_ATEOF' COMPUTE y = y + x + 10. _ATEOF cat >do-repeat.sps <<'_ATEOF' INPUT PROGRAM. COMPUTE x = 0. COMPUTE y = 0. END CASE. END FILE. END INPUT PROGRAM. DO REPEAT x = 1 2 3. INCLUDE 'include.sps'. END REPEAT. LIST. _ATEOF { set +x $as_echo "$at_srcdir/do-repeat.at:96: pspp -o pspp.csv do-repeat.sps" at_fn_check_prepare_trace "do-repeat.at:96" ( $at_check_trace; pspp -o pspp.csv do-repeat.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "do-repeat.sps:8: warning: DO REPEAT: Dummy variable name \`x' hides dictionary variable \`x'. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-repeat.at:96" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/do-repeat.at:99: cat pspp.csv" at_fn_check_prepare_trace "do-repeat.at:99" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "do-repeat.sps:8: warning: DO REPEAT: Dummy variable name \`x' hides dictionary variable \`x'. Table: Data List x,y .00,30.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-repeat.at:99" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_188 #AT_START_189 at_fn_group_banner 189 'do-repeat.at:108' \ "DO REPEAT -- nested" " " 21 at_xfail=no ( $as_echo "189. $at_setup_line: testing $at_desc ..." $at_traceon cat >do-repeat.sps <<'_ATEOF' DATA LIST NOTABLE /a 1. BEGIN DATA. 0 END DATA. DO REPEAT h = h0 TO h3 / x = 0 TO 3 / y = 8, 7.5, 6, 5. COMPUTE h = x + y. END REPEAT. VECTOR v(6). COMPUTE #idx = 0. DO REPEAT i = 1 TO 2. DO REPEAT j = 3 TO 5. COMPUTE #x = i + j. COMPUTE #idx = #idx + 1. COMPUTE v(#idx) = #x. END REPEAT. END REPEAT. LIST. _ATEOF { set +x $as_echo "$at_srcdir/do-repeat.at:131: pspp -o pspp.csv do-repeat.sps" at_fn_check_prepare_trace "do-repeat.at:131" ( $at_check_trace; pspp -o pspp.csv do-repeat.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-repeat.at:131" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/do-repeat.at:132: cat pspp.csv" at_fn_check_prepare_trace "do-repeat.at:132" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List a,h0,h1,h2,h3,v1,v2,v3,v4,v5,v6 0,8.00,8.50,8.00,8.00,4.00,5.00,6.00,5.00,6.00,7.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-repeat.at:132" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_189 #AT_START_190 at_fn_group_banner 190 'do-repeat.at:141' \ "DO REPEAT -- empty" " " 21 at_xfail=no ( $as_echo "190. $at_setup_line: testing $at_desc ..." $at_traceon cat >do-repeat.sps <<'_ATEOF' DATA LIST NOTABLE /a 1. BEGIN DATA. 0 END DATA. DO REPEAT h = a. END REPEAT. _ATEOF { set +x $as_echo "$at_srcdir/do-repeat.at:151: pspp -o pspp.csv do-repeat.sps" at_fn_check_prepare_trace "do-repeat.at:151" ( $at_check_trace; pspp -o pspp.csv do-repeat.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-repeat.at:151" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/do-repeat.at:152: cat pspp.csv" at_fn_check_prepare_trace "do-repeat.at:152" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/do-repeat.at:152" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_190 #AT_START_191 at_fn_group_banner 191 'do-repeat.at:158' \ "DO REPEAT -- missing END REPEAT" " " 21 at_xfail=no ( $as_echo "191. $at_setup_line: testing $at_desc ..." $at_traceon cat >do-repeat.sps <<'_ATEOF' DATA LIST NOTABLE /x 1. DO REPEAT y = 1 TO 10. _ATEOF { set +x $as_echo "$at_srcdir/do-repeat.at:163: pspp -O format=csv do-repeat.sps" at_fn_check_prepare_trace "do-repeat.at:163" ( $at_check_trace; pspp -O format=csv do-repeat.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: DO REPEAT: Syntax error at end of input: expecting END. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/do-repeat.at:163" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_191 #AT_START_192 at_fn_group_banner 192 'loop.at:29' \ "LOOP with index" " " 22 at_xfail=no ( $as_echo "192. $at_setup_line: testing $at_desc ..." $at_traceon cat >loop.sps <<'_ATEOF' data list notable /x 1 y 2 z 3. begin data. 121 252 393 404 end data. loop #i=x to y by z. print /#i. end loop. print/'--------'. execute. _ATEOF { set +x $as_echo "$at_srcdir/loop.at:38: pspp -o pspp.csv loop.sps" at_fn_check_prepare_trace "loop.at:38" ( $at_check_trace; pspp -o pspp.csv loop.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:38" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/loop.at:39: cat pspp.csv" at_fn_check_prepare_trace "loop.at:39" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1.00 2.00 -------- 2.00 4.00 -------- 3.00 6.00 9.00 -------- -------- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_192 #AT_START_193 at_fn_group_banner 193 'loop.at:64' \ "LOOP with IF condition" " " 22 at_xfail=no ( $as_echo "193. $at_setup_line: testing $at_desc ..." $at_traceon cat >loop.sps <<'_ATEOF' data list notable /x 1 y 2 z 3. begin data. 121 252 393 404 end data. compute #j=x. loop if #j <= y. print /#j. compute #j = #j + z. end loop. print/'--------'. execute. _ATEOF { set +x $as_echo "$at_srcdir/loop.at:75: pspp -o pspp.csv loop.sps" at_fn_check_prepare_trace "loop.at:75" ( $at_check_trace; pspp -o pspp.csv loop.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:75" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/loop.at:76: cat pspp.csv" at_fn_check_prepare_trace "loop.at:76" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1.00 2.00 -------- 2.00 4.00 -------- 3.00 6.00 9.00 -------- -------- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:76" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_193 #AT_START_194 at_fn_group_banner 194 'loop.at:101' \ "LOOP with END IF condition" " " 22 at_xfail=no ( $as_echo "194. $at_setup_line: testing $at_desc ..." $at_traceon cat >loop.sps <<'_ATEOF' data list notable /x 1 y 2 z 3. begin data. 121 252 393 404 end data. compute #k=x. loop. print /#k. compute #k = #k + z. end loop if #k > y. print/'--------'. execute. _ATEOF { set +x $as_echo "$at_srcdir/loop.at:112: pspp -o pspp.csv loop.sps" at_fn_check_prepare_trace "loop.at:112" ( $at_check_trace; pspp -o pspp.csv loop.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:112" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/loop.at:113: cat pspp.csv" at_fn_check_prepare_trace "loop.at:113" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1.00 2.00 -------- 2.00 4.00 -------- 3.00 6.00 9.00 -------- 4.00 -------- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:113" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_194 #AT_START_195 at_fn_group_banner 195 'loop.at:140' \ "LOOP with index and IF based on index" " " 22 at_xfail=no ( $as_echo "195. $at_setup_line: testing $at_desc ..." $at_traceon cat >loop.sps <<'_ATEOF' data list notable /x 1 y 2 z 3. begin data. 121 252 393 404 end data. loop #m=x to y by z if #m < 4. print /#m. end loop. print/'--------'. execute. _ATEOF { set +x $as_echo "$at_srcdir/loop.at:149: pspp -o pspp.csv loop.sps" at_fn_check_prepare_trace "loop.at:149" ( $at_check_trace; pspp -o pspp.csv loop.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:149" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/loop.at:150: cat pspp.csv" at_fn_check_prepare_trace "loop.at:150" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1.00 2.00 -------- 2.00 -------- 3.00 -------- -------- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:150" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_195 #AT_START_196 at_fn_group_banner 196 'loop.at:169' \ "LOOP with index and END IF based on index" " " 22 at_xfail=no ( $as_echo "196. $at_setup_line: testing $at_desc ..." $at_traceon cat >loop.sps <<'_ATEOF' data list notable /x 1 y 2 z 3. begin data. 121 252 393 404 end data. loop #n=x to y by z. print /#n. end loop if #n >= 4. print/'--------'. execute. _ATEOF { set +x $as_echo "$at_srcdir/loop.at:178: pspp -o pspp.csv loop.sps" at_fn_check_prepare_trace "loop.at:178" ( $at_check_trace; pspp -o pspp.csv loop.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:178" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/loop.at:179: cat pspp.csv" at_fn_check_prepare_trace "loop.at:179" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1.00 2.00 -------- 2.00 4.00 -------- 3.00 6.00 -------- -------- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:179" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_196 #AT_START_197 at_fn_group_banner 197 'loop.at:202' \ "LOOP with index and IF and END IF based on index" "" 22 at_xfail=no ( $as_echo "197. $at_setup_line: testing $at_desc ..." $at_traceon cat >loop.sps <<'_ATEOF' data list notable /x 1 y 2 z 3. begin data. 121 252 393 404 end data. loop #o=x to y by z if mod(#o,2) = 0. print /#o. end loop if #o >= 4. print/'--------'. execute. _ATEOF { set +x $as_echo "$at_srcdir/loop.at:211: pspp -o pspp.csv loop.sps" at_fn_check_prepare_trace "loop.at:211" ( $at_check_trace; pspp -o pspp.csv loop.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:211" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/loop.at:212: cat pspp.csv" at_fn_check_prepare_trace "loop.at:212" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "-------- 2.00 4.00 -------- -------- -------- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:212" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_197 #AT_START_198 at_fn_group_banner 198 'loop.at:227' \ "LOOP with no conditions containing BREAK" " " 22 at_xfail=no ( $as_echo "198. $at_setup_line: testing $at_desc ..." $at_traceon cat >loop.sps <<'_ATEOF' data list notable /x 1 y 2 z 3. begin data. 121 252 393 404 end data. compute #p = x. loop. print /#p. compute #p = #p + z. do if #p >= y. break. end if. end loop. print/'--------'. execute. _ATEOF { set +x $as_echo "$at_srcdir/loop.at:241: pspp -o pspp.csv loop.sps" at_fn_check_prepare_trace "loop.at:241" ( $at_check_trace; pspp -o pspp.csv loop.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:241" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/loop.at:242: cat pspp.csv" at_fn_check_prepare_trace "loop.at:242" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1.00 -------- 2.00 4.00 -------- 3.00 6.00 -------- 4.00 -------- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:242" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_198 #AT_START_199 at_fn_group_banner 199 'loop.at:265' \ "LOOP with no conditions that ends due to MXLOOPS" "" 22 at_xfail=no ( $as_echo "199. $at_setup_line: testing $at_desc ..." $at_traceon cat >loop.sps <<'_ATEOF' data list notable /x 1 y 2 z 3. begin data. 121 252 393 404 end data. set mxloops=2. loop. compute #p = #p + 1. print /x #p. end loop. print/'--------'. execute. _ATEOF { set +x $as_echo "$at_srcdir/loop.at:276: pspp -o pspp.csv loop.sps" at_fn_check_prepare_trace "loop.at:276" ( $at_check_trace; pspp -o pspp.csv loop.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:276" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/loop.at:277: cat pspp.csv" at_fn_check_prepare_trace "loop.at:277" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1 1.00 1 2.00 -------- 2 3.00 2 4.00 -------- 3 5.00 3 6.00 -------- 4 7.00 4 8.00 -------- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/loop.at:277" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_199 #AT_START_200 at_fn_group_banner 200 'temporary.at:20' \ "TEMPORARY as first transformation" " " 23 at_xfail=no ( $as_echo "200. $at_setup_line: testing $at_desc ..." $at_traceon cat >temporary.sps <<'_ATEOF' DATA LIST LIST NOTABLE /X *. BEGIN DATA. 1 2 3 4 5 6 7 8 9 END DATA. TEMPORARY. SELECT IF x > 5 . LIST. LIST. _ATEOF { set +x $as_echo "$at_srcdir/temporary.at:41: pspp -o pspp.csv temporary.sps" at_fn_check_prepare_trace "temporary.at:41" ( $at_check_trace; pspp -o pspp.csv temporary.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/temporary.at:41" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/temporary.at:42: cat pspp.csv" at_fn_check_prepare_trace "temporary.at:42" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List X 6.00 7.00 8.00 9.00 Table: Data List X 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/temporary.at:42" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_200 #AT_START_201 at_fn_group_banner 201 'data-list.at:19' \ "DATA LIST LIST with empty fields" " " 25 at_xfail=no ( $as_echo "201. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.pspp <<'_ATEOF' DATA LIST LIST NOTABLE /A B C (F1.0). BEGIN DATA. ,, ,,3 ,2, ,2,3 1,, 1,,3 1,2, 1,2,3 END DATA. LIST. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:35: pspp -O format=csv data-list.pspp" at_fn_check_prepare_trace "data-list.at:35" ( $at_check_trace; pspp -O format=csv data-list.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List A,B,C .,.,. .,.,3 .,2,. .,2,3 1,.,. 1,.,3 1,2,. 1,2,3 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_201 #AT_START_202 at_fn_group_banner 202 'data-list.at:50' \ "DATA LIST LIST with explicit delimiters" " " 25 at_xfail=no ( $as_echo "202. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.pspp <<'_ATEOF' data list list ('|','X') /A B C D. begin data. 1|23X45|2.03x 2X22|34|23| 3|34|34X34 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:61: pspp -O format=csv data-list.pspp" at_fn_check_prepare_trace "data-list.at:61" ( $at_check_trace; pspp -O format=csv data-list.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format A,F8.0 B,F8.0 C,F8.0 D,F8.0 data-list.pspp:3.9-3.13: warning: Data for variable D is not valid as format F: Number followed by garbage. Table: Data List A,B,C,D 1.00,23.00,45.00,. 2.00,22.00,34.00,23.00 3.00,34.00,34.00,34.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:61" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_202 #AT_START_203 at_fn_group_banner 203 'data-list.at:79' \ "DATA LIST FREE with SKIP" " " 25 at_xfail=no ( $as_echo "203. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.pspp <<'_ATEOF' data list free skip=1/A B C D. begin data. # This record is ignored. ,1,2,x ,4,,5 6 7, 8 9 0,1 ,,, ,,,, 2 3 4 5 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:99: pspp -O format=csv data-list.pspp" at_fn_check_prepare_trace "data-list.at:99" ( $at_check_trace; pspp -O format=csv data-list.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "data-list.pspp:4.6: warning: Data for variable D is not valid as format F: Field contents are not numeric. Table: Data List A,B,C,D . ,1.00,2.00,. . ,4.00,. ,5.00 6.00,7.00,8.00,9.00 .00,1.00,. ,. . ,. ,. ,. 2.00,3.00,4.00,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:99" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_203 #AT_START_204 at_fn_group_banner 204 'data-list.at:113' \ "DATA LIST LIST with SKIP and tab delimiter" " " 25 at_xfail=no ( $as_echo "204. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.pspp <<'_ATEOF' data list list (tab) notable skip=2/A B C D. begin data. # These records # are skipped. 1 2 3 4 1 2 3 1 2 4 1 2 1 3 4 1 3 1 4 1 2 3 4 2 3 2 4 2 3 4 3 4 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:138: pspp -O format=csv data-list.pspp" at_fn_check_prepare_trace "data-list.at:138" ( $at_check_trace; pspp -O format=csv data-list.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List A,B,C,D 1.00,2.00,3.00,4.00 1.00,2.00,3.00,. 1.00,2.00,. ,4.00 1.00,2.00,. ,. 1.00,. ,3.00,4.00 1.00,. ,3.00,. 1.00,. ,. ,4.00 1.00,. ,. ,. . ,2.00,3.00,4.00 . ,2.00,3.00,. . ,2.00,. ,4.00 . ,2.00,. ,. . ,. ,3.00,4.00 . ,. ,3.00,. . ,. ,. ,4.00 . ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:138" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_204 #AT_START_205 at_fn_group_banner 205 'data-list.at:162' \ "DATA LIST FREE with explicit delimiter at end of line" "" 25 at_xfail=no ( $as_echo "205. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.pspp <<'_ATEOF' DATA LIST FREE(',')/x y z. BEGIN DATA. 1,2,3 4,5,6 7,8,9 END DATA. LIST. DATA LIST FREE(',')/x y z. BEGIN DATA. 11,12,13, 14,15,16, 17,18,19, END DATA. LIST. DATA LIST FREE(TAB)/x y z. BEGIN DATA. 21 22 23 24 25 26 27 28 29 END DATA. LIST. DATA LIST FREE(TAB)/x y z. BEGIN DATA. 31 32 33 34 35 36 37 38 39 END DATA. LIST. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:196: pspp -O format=csv data-list.pspp" at_fn_check_prepare_trace "data-list.at:196" ( $at_check_trace; pspp -O format=csv data-list.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,y,z 1.00,2.00,3.00 4.00,5.00,6.00 7.00,8.00,9.00 Table: Data List x,y,z 11.00,12.00,13.00 14.00,15.00,16.00 17.00,18.00,19.00 Table: Data List x,y,z 21.00,22.00,23.00 24.00,25.00,26.00 27.00,28.00,29.00 Table: Data List x,y,z 31.00,32.00,33.00 34.00,35.00,36.00 37.00,38.00,39.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:196" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_205 #AT_START_206 at_fn_group_banner 206 'data-list.at:223' \ "DATA LIST FIXED with multiple records per case" " " 25 at_xfail=no ( $as_echo "206. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.pspp <<'_ATEOF' data list fixed notable /1 start 1-20 (adate) /2 end 1-20 (adate) /3 count 1-3. begin data. 07-22-2007 10-06-2007 x 07-14-1789 08-26-1789 xy 01-01-1972 12-31-1999 682 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:242: pspp -O format=csv data-list.pspp" at_fn_check_prepare_trace "data-list.at:242" ( $at_check_trace; pspp -O format=csv data-list.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "data-list.pspp:8.1-8.3: warning: Data for variable count is not valid as format F: Field contents are not numeric. data-list.pspp:11.1-11.3: warning: Data for variable count is not valid as format F: Field contents are not numeric. Table: Data List start,end,count 07/22/2007,10/06/2007,. 07/14/1789,08/26/1789,. 01/01/1972,12/31/1999,682 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:242" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_206 #AT_START_207 at_fn_group_banner 207 'data-list.at:255' \ "DATA LIST FIXED with empty trailing record" " " 25 at_xfail=no ( $as_echo "207. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.pspp <<'_ATEOF' data list fixed notable records=2/x 1 y 2. begin data. 12 34 56 78 90 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:272: pspp -O format=csv data-list.pspp" at_fn_check_prepare_trace "data-list.at:272" ( $at_check_trace; pspp -O format=csv data-list.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,y 1,2 3,4 5,6 7,8 9,0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:272" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_207 #AT_START_208 at_fn_group_banner 208 'data-list.at:285' \ "DATA LIST with various line-ends" " " 25 at_xfail=no ( $as_echo "208. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.sps <<'_ATEOF' data list list notable file='input.txt'/a b c. list. _ATEOF printf '1 2 3\n4 5 6\r\n7\r8\r9\r\n10 11 12\n13 14 15 \r\n16\r\r17\r18\n' > input.txt { set +x $as_echo "$at_srcdir/data-list.at:294: cksum input.txt" at_fn_check_prepare_trace "data-list.at:294" ( $at_check_trace; cksum input.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1732021750 50 input.txt " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:294" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-list.at:296: pspp -o pspp.csv data-list.sps" at_fn_check_prepare_trace "data-list.at:296" ( $at_check_trace; pspp -o pspp.csv data-list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:296" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-list.at:297: cat pspp.csv" at_fn_check_prepare_trace "data-list.at:297" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List a,b,c 1.00,2.00,3.00 4.00,5.00,6.00 7.00,8.00,9.00 10.00,11.00,12.00 13.00,14.00,15.00 16.00,17.00,18.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:297" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_208 #AT_START_209 at_fn_group_banner 209 'data-list.at:309' \ "DATA LIST properly expands tabs in input" " " 25 at_xfail=no ( $as_echo "209. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.sps <<'_ATEOF' data list notable /X 1-50 (a). begin data. 1 12 123 1234 12345 . end data. print /x. print outfile='print.txt' /x. write outfile='write.txt' /x. execute. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:320: sed -n '/12345/l' data-list.sps" at_fn_check_prepare_trace "data-list.at:320" ( $at_check_trace; sed -n '/12345/l' data-list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\\t1\\t12\\t123\\t1234\\t12345 .\$ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:320" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-list.at:323: pspp -o pspp.csv data-list.sps" at_fn_check_prepare_trace "data-list.at:323" ( $at_check_trace; pspp -o pspp.csv data-list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:323" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-list.at:325: cat pspp.csv" at_fn_check_prepare_trace "data-list.at:325" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1 12 123 1234 12345 . " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:325" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-list.at:330: cat print.txt" at_fn_check_prepare_trace "data-list.at:330" ( $at_check_trace; cat print.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 1 12 123 1234 12345 . " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:330" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-list.at:334: cat write.txt" at_fn_check_prepare_trace "data-list.at:334" ( $at_check_trace; cat write.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 1 12 123 1234 12345 . " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:334" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_209 #AT_START_210 at_fn_group_banner 210 'data-list.at:339' \ "DATA LIST FREE and LIST report missing delimiters" "" 25 at_xfail=no ( $as_echo "210. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.sps <<'_ATEOF' DATA LIST FREE NOTABLE/s (a10). LIST. BEGIN DATA. 'y'z END DATA. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:347: pspp -O format=csv data-list.sps" at_fn_check_prepare_trace "data-list.at:347" ( $at_check_trace; pspp -O format=csv data-list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "data-list.sps:4: warning: Missing delimiter following quoted string. Table: Data List s y z " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:347" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_210 #AT_START_211 at_fn_group_banner 211 'data-list.at:357' \ "DATA LIST FREE and LIST assume a width if omitted" "" 25 at_xfail=no ( $as_echo "211. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.sps <<'_ATEOF' DATA LIST FREE TABLE/s (a) d (datetime) f (f). _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:361: pspp -O format=csv data-list.sps" at_fn_check_prepare_trace "data-list.at:361" ( $at_check_trace; pspp -O format=csv data-list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format s,A1 d,DATETIME17.0 f,F1.0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:361" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_211 #AT_START_212 at_fn_group_banner 212 'data-list.at:370' \ "DATA LIST Decimal comma" " " 25 at_xfail=no ( $as_echo "212. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.sps <<'_ATEOF' SET DECIMAL=COMMA. DATA LIST NOTABLE LIST /A *. BEGIN DATA 1 2 3 3,5 4 4,5 5 6 END DATA LIST /FORMAT=NUMBERED. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:389: pspp -O format=csv data-list.sps" at_fn_check_prepare_trace "data-list.at:389" ( $at_check_trace; pspp -O format=csv data-list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List Case Number,A 1,\"1,00\" 2,\"2,00\" 3,\"3,00\" 4,\"3,50\" 5,\"4,00\" 6,\"4,50\" 7,\"5,00\" 8,\"6,00\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-list.at:389" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_212 #AT_START_213 at_fn_group_banner 213 'data-list.at:405' \ "DATA LIST - Negative SKIP" " " 25 at_xfail=no ( $as_echo "213. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.sps <<'_ATEOF' DATA LIST LIST FILE='f.in' NOTABLE SKIP=-1 /a b c d. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:412: pspp -O format=csv data-list.sps" at_fn_check_prepare_trace "data-list.at:412" ( $at_check_trace; pspp -O format=csv data-list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "data-list.sps:1: error: DATA LIST: The SKIP value must be nonnegative. data-list.sps:3: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/data-list.at:412" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_213 #AT_START_214 at_fn_group_banner 214 'data-list.at:421' \ "DATA LIST - Negative RECORDS" " " 25 at_xfail=no ( $as_echo "214. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-list.sps <<'_ATEOF' DATA LIST LIST FILE='f.in' NOTABLE RECORDS=-1 /a b c d. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-list.at:428: pspp -O format=csv data-list.sps" at_fn_check_prepare_trace "data-list.at:428" ( $at_check_trace; pspp -O format=csv data-list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "data-list.sps:1: error: DATA LIST: The RECORDS value must be nonnegative. data-list.sps:3: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/data-list.at:428" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_214 #AT_START_215 at_fn_group_banner 215 'data-reader.at:21' \ "BEGIN DATA as part of a procedure" " " 26 at_xfail=no ( $as_echo "215. $at_setup_line: testing $at_desc ..." $at_traceon cat >begin-data.sps <<'_ATEOF' TITLE 'Test BEGIN DATA ... END DATA'. DATA LIST /a b 1-2. LIST. BEGIN DATA. 12 34 56 78 90 END DATA. _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:35: pspp -O format=csv begin-data.sps" at_fn_check_prepare_trace "data-reader.at:35" ( $at_check_trace; pspp -O format=csv begin-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Title: Test BEGIN DATA ... END DATA Table: Reading 1 record from INLINE. Variable,Record,Columns,Format a,1,1- 1,F1.0 b,1,2- 2,F1.0 Table: Data List a,b 1,2 3,4 5,6 7,8 9,0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_215 #AT_START_216 at_fn_group_banner 216 'data-reader.at:54' \ "BEGIN DATA as an independent command" " " 26 at_xfail=no ( $as_echo "216. $at_setup_line: testing $at_desc ..." $at_traceon cat >begin-data.sps <<'_ATEOF' data list /A B 1-2. begin data. 09 87 65 43 21 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:66: pspp -O format=csv begin-data.sps" at_fn_check_prepare_trace "data-reader.at:66" ( $at_check_trace; pspp -O format=csv begin-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from INLINE. Variable,Record,Columns,Format A,1,1- 1,F1.0 B,1,2- 2,F1.0 Table: Data List A,B 0,9 8,7 6,5 4,3 2,1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:66" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_216 #AT_START_217 at_fn_group_banner 217 'data-reader.at:211' \ "read and write files with MODE=BINARY" " " 26 at_xfail=no ( $as_echo "217. $at_setup_line: testing $at_desc ..." $at_traceon cat >input.txt <<'_ATEOF' 07-22-2007 10-06-2007 321 07-14-1789 08-26-1789 4 01-01-1972 12-31-1999 682 _ATEOF cat >make-binary.pl <<'_ATEOF' use strict; use warnings; # ASCII to EBCDIC translation table our ($ascii2ebcdic) = "" . "\x00\x01\x02\x03\x37\x2d\x2e\x2f" . "\x16\x05\x25\x0b\x0c\x0d\x0e\x0f" . "\x10\x11\x12\x13\x3c\x3d\x32\x26" . "\x18\x19\x3f\x27\x1c\x1d\x1e\x1f" . "\x40\x5a\x7f\x7b\x5b\x6c\x50\x7d" . "\x4d\x5d\x5c\x4e\x6b\x60\x4b\x61" . "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" . "\xf8\xf9\x7a\x5e\x4c\x7e\x6e\x6f" . "\x7c\xc1\xc2\xc3\xc4\xc5\xc6\xc7" . "\xc8\xc9\xd1\xd2\xd3\xd4\xd5\xd6" . "\xd7\xd8\xd9\xe2\xe3\xe4\xe5\xe6" . "\xe7\xe8\xe9\xad\xe0\xbd\x9a\x6d" . "\x79\x81\x82\x83\x84\x85\x86\x87" . "\x88\x89\x91\x92\x93\x94\x95\x96" . "\x97\x98\x99\xa2\xa3\xa4\xa5\xa6" . "\xa7\xa8\xa9\xc0\x4f\xd0\x5f\x07" . "\x20\x21\x22\x23\x24\x15\x06\x17" . "\x28\x29\x2a\x2b\x2c\x09\x0a\x1b" . "\x30\x31\x1a\x33\x34\x35\x36\x08" . "\x38\x39\x3a\x3b\x04\x14\x3e\xe1" . "\x41\x42\x43\x44\x45\x46\x47\x48" . "\x49\x51\x52\x53\x54\x55\x56\x57" . "\x58\x59\x62\x63\x64\x65\x66\x67" . "\x68\x69\x70\x71\x72\x73\x74\x75" . "\x76\x77\x78\x80\x8a\x8b\x8c\x8d" . "\x8e\x8f\x90\x6a\x9b\x9c\x9d\x9e" . "\x9f\xa0\xaa\xab\xac\x4a\xae\xaf" . "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" . "\xb8\xb9\xba\xbb\xbc\xa1\xbe\xbf" . "\xca\xcb\xcc\xcd\xce\xcf\xda\xdb" . "\xdc\xdd\xde\xdf\xea\xeb\xec\xed" . "\xee\xef\xfa\xfb\xfc\xfd\xfe\xff"; length ($ascii2ebcdic) == 256 || die; open (INPUT, '<', 'input.txt') or die "input.txt: open: $!\n"; my (@data) = or die; close (INPUT) or die; chomp $_ foreach @data; our @records; for $_ (@data) { my ($reclen) = pack ("V", length); print $reclen, $_, $reclen; } sub a2e { local ($_) = @_; my ($s) = ""; foreach (split (//)) { $s .= substr ($ascii2ebcdic, ord, 1); } return $s; } sub min { my ($a, $b) = @_; return $a < $b ? $a : $b } sub dump_records { while (@records) { my ($n) = min (int (rand (5)) + 1, scalar (@records)); my (@r) = splice (@records, 0, $n); my ($len) = 0; $len += length foreach @r; print pack ("n xx", $len + 4); print foreach @r; } } _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:211: \$PERL make-binary.pl < input.txt > input.bin" at_fn_check_prepare_dynamic "$PERL make-binary.pl < input.txt > input.bin" "data-reader.at:211" ( $at_check_trace; $PERL make-binary.pl < input.txt > input.bin ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:211" $at_failed && at_fn_log_failure $at_traceon; } cat >data-reader.sps <<'_ATEOF' FILE HANDLE input/NAME='input.bin'/MODE=BINARY. DATA LIST FIXED FILE=input NOTABLE /1 start 1-10 (ADATE) /2 end 1-10 (ADATE) /3 count 1-3. LIST. * Output the data to a new file in the same format. FILE HANDLE OUTPUT/NAME='output.bin'/MODE=BINARY. COMPUTE count=count + 1. PRINT OUTFILE=output/start end count. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:211: pspp -O format=csv data-reader.sps" at_fn_check_prepare_trace "data-reader.at:211" ( $at_check_trace; pspp -O format=csv data-reader.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List start,end,count 07/22/2007,10/06/2007,321 07/14/1789,08/26/1789,4 01/01/1972,12/31/1999,682 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:211" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-reader.at:211: test -s output.bin" at_fn_check_prepare_trace "data-reader.at:211" ( $at_check_trace; test -s output.bin ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:211" $at_failed && at_fn_log_failure $at_traceon; } cat >data-reader-2.sps <<'_ATEOF' * Re-read the new data and list it, to verify that it was written correctly. FILE HANDLE OUTPUT/NAME='output.bin'/MODE=BINARY. DATA LIST FIXED FILE=output NOTABLE/ start 2-11 (ADATE) end 13-22 (ADATE) count 24-26. LIST. _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:211: pspp -O format=csv data-reader-2.sps" at_fn_check_prepare_trace "data-reader.at:211" ( $at_check_trace; pspp -O format=csv data-reader-2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List start,end,count 07/22/2007,10/06/2007,322 07/14/1789,08/26/1789,5 01/01/1972,12/31/1999,683 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:211" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_217 #AT_START_218 at_fn_group_banner 218 'data-reader.at:217' \ "read and write files with MODE=360 /RECFORM=FIXED /LRECL=32" "" 26 at_xfail=no ( $as_echo "218. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/data-reader.at:217: i18n-test supports_encodings EBCDIC-US" at_fn_check_prepare_trace "data-reader.at:217" ( $at_check_trace; i18n-test supports_encodings EBCDIC-US ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:217" $at_failed && at_fn_log_failure $at_traceon; } cat >input.txt <<'_ATEOF' 07-22-2007 10-06-2007 321 07-14-1789 08-26-1789 4 01-01-1972 12-31-1999 682 _ATEOF cat >make-binary.pl <<'_ATEOF' use strict; use warnings; # ASCII to EBCDIC translation table our ($ascii2ebcdic) = "" . "\x00\x01\x02\x03\x37\x2d\x2e\x2f" . "\x16\x05\x25\x0b\x0c\x0d\x0e\x0f" . "\x10\x11\x12\x13\x3c\x3d\x32\x26" . "\x18\x19\x3f\x27\x1c\x1d\x1e\x1f" . "\x40\x5a\x7f\x7b\x5b\x6c\x50\x7d" . "\x4d\x5d\x5c\x4e\x6b\x60\x4b\x61" . "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" . "\xf8\xf9\x7a\x5e\x4c\x7e\x6e\x6f" . "\x7c\xc1\xc2\xc3\xc4\xc5\xc6\xc7" . "\xc8\xc9\xd1\xd2\xd3\xd4\xd5\xd6" . "\xd7\xd8\xd9\xe2\xe3\xe4\xe5\xe6" . "\xe7\xe8\xe9\xad\xe0\xbd\x9a\x6d" . "\x79\x81\x82\x83\x84\x85\x86\x87" . "\x88\x89\x91\x92\x93\x94\x95\x96" . "\x97\x98\x99\xa2\xa3\xa4\xa5\xa6" . "\xa7\xa8\xa9\xc0\x4f\xd0\x5f\x07" . "\x20\x21\x22\x23\x24\x15\x06\x17" . "\x28\x29\x2a\x2b\x2c\x09\x0a\x1b" . "\x30\x31\x1a\x33\x34\x35\x36\x08" . "\x38\x39\x3a\x3b\x04\x14\x3e\xe1" . "\x41\x42\x43\x44\x45\x46\x47\x48" . "\x49\x51\x52\x53\x54\x55\x56\x57" . "\x58\x59\x62\x63\x64\x65\x66\x67" . "\x68\x69\x70\x71\x72\x73\x74\x75" . "\x76\x77\x78\x80\x8a\x8b\x8c\x8d" . "\x8e\x8f\x90\x6a\x9b\x9c\x9d\x9e" . "\x9f\xa0\xaa\xab\xac\x4a\xae\xaf" . "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" . "\xb8\xb9\xba\xbb\xbc\xa1\xbe\xbf" . "\xca\xcb\xcc\xcd\xce\xcf\xda\xdb" . "\xdc\xdd\xde\xdf\xea\xeb\xec\xed" . "\xee\xef\xfa\xfb\xfc\xfd\xfe\xff"; length ($ascii2ebcdic) == 256 || die; open (INPUT, '<', 'input.txt') or die "input.txt: open: $!\n"; my (@data) = or die; close (INPUT) or die; chomp $_ foreach @data; our @records; my ($lrecl) = 32; for $_ (@data) { my ($out) = substr ($_, 0, $lrecl); $out .= ' ' x ($lrecl - length ($out)); length ($out) == 32 or die; print +a2e ($out); } sub a2e { local ($_) = @_; my ($s) = ""; foreach (split (//)) { $s .= substr ($ascii2ebcdic, ord, 1); } return $s; } sub min { my ($a, $b) = @_; return $a < $b ? $a : $b } sub dump_records { while (@records) { my ($n) = min (int (rand (5)) + 1, scalar (@records)); my (@r) = splice (@records, 0, $n); my ($len) = 0; $len += length foreach @r; print pack ("n xx", $len + 4); print foreach @r; } } _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:217: \$PERL make-binary.pl < input.txt > input.bin" at_fn_check_prepare_dynamic "$PERL make-binary.pl < input.txt > input.bin" "data-reader.at:217" ( $at_check_trace; $PERL make-binary.pl < input.txt > input.bin ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:217" $at_failed && at_fn_log_failure $at_traceon; } cat >data-reader.sps <<'_ATEOF' FILE HANDLE input/NAME='input.bin'/MODE=360 /RECFORM=FIXED /LRECL=32. DATA LIST FIXED FILE=input NOTABLE /1 start 1-10 (ADATE) /2 end 1-10 (ADATE) /3 count 1-3. LIST. * Output the data to a new file in the same format. FILE HANDLE OUTPUT/NAME='output.bin'/MODE=360 /RECFORM=FIXED /LRECL=32. COMPUTE count=count + 1. PRINT OUTFILE=output/start end count. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:217: pspp -O format=csv data-reader.sps" at_fn_check_prepare_trace "data-reader.at:217" ( $at_check_trace; pspp -O format=csv data-reader.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List start,end,count 07/22/2007,10/06/2007,321 07/14/1789,08/26/1789,4 01/01/1972,12/31/1999,682 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:217" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-reader.at:217: test -s output.bin" at_fn_check_prepare_trace "data-reader.at:217" ( $at_check_trace; test -s output.bin ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:217" $at_failed && at_fn_log_failure $at_traceon; } cat >data-reader-2.sps <<'_ATEOF' * Re-read the new data and list it, to verify that it was written correctly. FILE HANDLE OUTPUT/NAME='output.bin'/MODE=360 /RECFORM=FIXED /LRECL=32. DATA LIST FIXED FILE=output NOTABLE/ start 2-11 (ADATE) end 13-22 (ADATE) count 24-26. LIST. _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:217: pspp -O format=csv data-reader-2.sps" at_fn_check_prepare_trace "data-reader.at:217" ( $at_check_trace; pspp -O format=csv data-reader-2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List start,end,count 07/22/2007,10/06/2007,322 07/14/1789,08/26/1789,5 01/01/1972,12/31/1999,683 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:217" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_218 #AT_START_219 at_fn_group_banner 219 'data-reader.at:227' \ "read and write files with MODE=360 /RECFORM=VARIABLE" "" 26 at_xfail=no ( $as_echo "219. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/data-reader.at:227: i18n-test supports_encodings EBCDIC-US" at_fn_check_prepare_trace "data-reader.at:227" ( $at_check_trace; i18n-test supports_encodings EBCDIC-US ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:227" $at_failed && at_fn_log_failure $at_traceon; } cat >input.txt <<'_ATEOF' 07-22-2007 10-06-2007 321 07-14-1789 08-26-1789 4 01-01-1972 12-31-1999 682 _ATEOF cat >make-binary.pl <<'_ATEOF' use strict; use warnings; # ASCII to EBCDIC translation table our ($ascii2ebcdic) = "" . "\x00\x01\x02\x03\x37\x2d\x2e\x2f" . "\x16\x05\x25\x0b\x0c\x0d\x0e\x0f" . "\x10\x11\x12\x13\x3c\x3d\x32\x26" . "\x18\x19\x3f\x27\x1c\x1d\x1e\x1f" . "\x40\x5a\x7f\x7b\x5b\x6c\x50\x7d" . "\x4d\x5d\x5c\x4e\x6b\x60\x4b\x61" . "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" . "\xf8\xf9\x7a\x5e\x4c\x7e\x6e\x6f" . "\x7c\xc1\xc2\xc3\xc4\xc5\xc6\xc7" . "\xc8\xc9\xd1\xd2\xd3\xd4\xd5\xd6" . "\xd7\xd8\xd9\xe2\xe3\xe4\xe5\xe6" . "\xe7\xe8\xe9\xad\xe0\xbd\x9a\x6d" . "\x79\x81\x82\x83\x84\x85\x86\x87" . "\x88\x89\x91\x92\x93\x94\x95\x96" . "\x97\x98\x99\xa2\xa3\xa4\xa5\xa6" . "\xa7\xa8\xa9\xc0\x4f\xd0\x5f\x07" . "\x20\x21\x22\x23\x24\x15\x06\x17" . "\x28\x29\x2a\x2b\x2c\x09\x0a\x1b" . "\x30\x31\x1a\x33\x34\x35\x36\x08" . "\x38\x39\x3a\x3b\x04\x14\x3e\xe1" . "\x41\x42\x43\x44\x45\x46\x47\x48" . "\x49\x51\x52\x53\x54\x55\x56\x57" . "\x58\x59\x62\x63\x64\x65\x66\x67" . "\x68\x69\x70\x71\x72\x73\x74\x75" . "\x76\x77\x78\x80\x8a\x8b\x8c\x8d" . "\x8e\x8f\x90\x6a\x9b\x9c\x9d\x9e" . "\x9f\xa0\xaa\xab\xac\x4a\xae\xaf" . "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" . "\xb8\xb9\xba\xbb\xbc\xa1\xbe\xbf" . "\xca\xcb\xcc\xcd\xce\xcf\xda\xdb" . "\xdc\xdd\xde\xdf\xea\xeb\xec\xed" . "\xee\xef\xfa\xfb\xfc\xfd\xfe\xff"; length ($ascii2ebcdic) == 256 || die; open (INPUT, '<', 'input.txt') or die "input.txt: open: $!\n"; my (@data) = or die; close (INPUT) or die; chomp $_ foreach @data; our @records; for $_ (@data) { push (@records, pack ("n xx", length ($_) + 4) . a2e ($_)); } dump_records (); sub a2e { local ($_) = @_; my ($s) = ""; foreach (split (//)) { $s .= substr ($ascii2ebcdic, ord, 1); } return $s; } sub min { my ($a, $b) = @_; return $a < $b ? $a : $b } sub dump_records { while (@records) { my ($n) = min (int (rand (5)) + 1, scalar (@records)); my (@r) = splice (@records, 0, $n); my ($len) = 0; $len += length foreach @r; print pack ("n xx", $len + 4); print foreach @r; } } _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:227: \$PERL make-binary.pl < input.txt > input.bin" at_fn_check_prepare_dynamic "$PERL make-binary.pl < input.txt > input.bin" "data-reader.at:227" ( $at_check_trace; $PERL make-binary.pl < input.txt > input.bin ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:227" $at_failed && at_fn_log_failure $at_traceon; } cat >data-reader.sps <<'_ATEOF' FILE HANDLE input/NAME='input.bin'/MODE=360 /RECFORM=VARIABLE. DATA LIST FIXED FILE=input NOTABLE /1 start 1-10 (ADATE) /2 end 1-10 (ADATE) /3 count 1-3. LIST. * Output the data to a new file in the same format. FILE HANDLE OUTPUT/NAME='output.bin'/MODE=360 /RECFORM=VARIABLE. COMPUTE count=count + 1. PRINT OUTFILE=output/start end count. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:227: pspp -O format=csv data-reader.sps" at_fn_check_prepare_trace "data-reader.at:227" ( $at_check_trace; pspp -O format=csv data-reader.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List start,end,count 07/22/2007,10/06/2007,321 07/14/1789,08/26/1789,4 01/01/1972,12/31/1999,682 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:227" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-reader.at:227: test -s output.bin" at_fn_check_prepare_trace "data-reader.at:227" ( $at_check_trace; test -s output.bin ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:227" $at_failed && at_fn_log_failure $at_traceon; } cat >data-reader-2.sps <<'_ATEOF' * Re-read the new data and list it, to verify that it was written correctly. FILE HANDLE OUTPUT/NAME='output.bin'/MODE=360 /RECFORM=VARIABLE. DATA LIST FIXED FILE=output NOTABLE/ start 2-11 (ADATE) end 13-22 (ADATE) count 24-26. LIST. _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:227: pspp -O format=csv data-reader-2.sps" at_fn_check_prepare_trace "data-reader.at:227" ( $at_check_trace; pspp -O format=csv data-reader-2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List start,end,count 07/22/2007,10/06/2007,322 07/14/1789,08/26/1789,5 01/01/1972,12/31/1999,683 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:227" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_219 #AT_START_220 at_fn_group_banner 220 'data-reader.at:234' \ "read and write files with MODE=360 /RECFORM=SPANNED" "" 26 at_xfail=no ( $as_echo "220. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/data-reader.at:234: i18n-test supports_encodings EBCDIC-US" at_fn_check_prepare_trace "data-reader.at:234" ( $at_check_trace; i18n-test supports_encodings EBCDIC-US ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:234" $at_failed && at_fn_log_failure $at_traceon; } cat >input.txt <<'_ATEOF' 07-22-2007 10-06-2007 321 07-14-1789 08-26-1789 4 01-01-1972 12-31-1999 682 _ATEOF cat >make-binary.pl <<'_ATEOF' use strict; use warnings; # ASCII to EBCDIC translation table our ($ascii2ebcdic) = "" . "\x00\x01\x02\x03\x37\x2d\x2e\x2f" . "\x16\x05\x25\x0b\x0c\x0d\x0e\x0f" . "\x10\x11\x12\x13\x3c\x3d\x32\x26" . "\x18\x19\x3f\x27\x1c\x1d\x1e\x1f" . "\x40\x5a\x7f\x7b\x5b\x6c\x50\x7d" . "\x4d\x5d\x5c\x4e\x6b\x60\x4b\x61" . "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" . "\xf8\xf9\x7a\x5e\x4c\x7e\x6e\x6f" . "\x7c\xc1\xc2\xc3\xc4\xc5\xc6\xc7" . "\xc8\xc9\xd1\xd2\xd3\xd4\xd5\xd6" . "\xd7\xd8\xd9\xe2\xe3\xe4\xe5\xe6" . "\xe7\xe8\xe9\xad\xe0\xbd\x9a\x6d" . "\x79\x81\x82\x83\x84\x85\x86\x87" . "\x88\x89\x91\x92\x93\x94\x95\x96" . "\x97\x98\x99\xa2\xa3\xa4\xa5\xa6" . "\xa7\xa8\xa9\xc0\x4f\xd0\x5f\x07" . "\x20\x21\x22\x23\x24\x15\x06\x17" . "\x28\x29\x2a\x2b\x2c\x09\x0a\x1b" . "\x30\x31\x1a\x33\x34\x35\x36\x08" . "\x38\x39\x3a\x3b\x04\x14\x3e\xe1" . "\x41\x42\x43\x44\x45\x46\x47\x48" . "\x49\x51\x52\x53\x54\x55\x56\x57" . "\x58\x59\x62\x63\x64\x65\x66\x67" . "\x68\x69\x70\x71\x72\x73\x74\x75" . "\x76\x77\x78\x80\x8a\x8b\x8c\x8d" . "\x8e\x8f\x90\x6a\x9b\x9c\x9d\x9e" . "\x9f\xa0\xaa\xab\xac\x4a\xae\xaf" . "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" . "\xb8\xb9\xba\xbb\xbc\xa1\xbe\xbf" . "\xca\xcb\xcc\xcd\xce\xcf\xda\xdb" . "\xdc\xdd\xde\xdf\xea\xeb\xec\xed" . "\xee\xef\xfa\xfb\xfc\xfd\xfe\xff"; length ($ascii2ebcdic) == 256 || die; open (INPUT, '<', 'input.txt') or die "input.txt: open: $!\n"; my (@data) = or die; close (INPUT) or die; chomp $_ foreach @data; our @records; for my $line (@data) { local ($_) = $line; my (@r); while (length) { my ($n) = min (int (rand (5)), length); push (@r, substr ($_, 0, $n, '')); } foreach my $i (0...$#r) { my $scc = ($#r == 0 ? 0 : $i == 0 ? 1 : $i == $#r ? 2 : 3); push (@records, pack ("nCx", length ($r[$i]) + 4, $scc) . a2e ($r[$i])); } } dump_records (); sub a2e { local ($_) = @_; my ($s) = ""; foreach (split (//)) { $s .= substr ($ascii2ebcdic, ord, 1); } return $s; } sub min { my ($a, $b) = @_; return $a < $b ? $a : $b } sub dump_records { while (@records) { my ($n) = min (int (rand (5)) + 1, scalar (@records)); my (@r) = splice (@records, 0, $n); my ($len) = 0; $len += length foreach @r; print pack ("n xx", $len + 4); print foreach @r; } } _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:234: \$PERL make-binary.pl < input.txt > input.bin" at_fn_check_prepare_dynamic "$PERL make-binary.pl < input.txt > input.bin" "data-reader.at:234" ( $at_check_trace; $PERL make-binary.pl < input.txt > input.bin ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:234" $at_failed && at_fn_log_failure $at_traceon; } cat >data-reader.sps <<'_ATEOF' FILE HANDLE input/NAME='input.bin'/MODE=360 /RECFORM=SPANNED. DATA LIST FIXED FILE=input NOTABLE /1 start 1-10 (ADATE) /2 end 1-10 (ADATE) /3 count 1-3. LIST. * Output the data to a new file in the same format. FILE HANDLE OUTPUT/NAME='output.bin'/MODE=360 /RECFORM=SPANNED. COMPUTE count=count + 1. PRINT OUTFILE=output/start end count. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:234: pspp -O format=csv data-reader.sps" at_fn_check_prepare_trace "data-reader.at:234" ( $at_check_trace; pspp -O format=csv data-reader.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List start,end,count 07/22/2007,10/06/2007,321 07/14/1789,08/26/1789,4 01/01/1972,12/31/1999,682 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:234" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/data-reader.at:234: test -s output.bin" at_fn_check_prepare_trace "data-reader.at:234" ( $at_check_trace; test -s output.bin ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:234" $at_failed && at_fn_log_failure $at_traceon; } cat >data-reader-2.sps <<'_ATEOF' * Re-read the new data and list it, to verify that it was written correctly. FILE HANDLE OUTPUT/NAME='output.bin'/MODE=360 /RECFORM=SPANNED. DATA LIST FIXED FILE=output NOTABLE/ start 2-11 (ADATE) end 13-22 (ADATE) count 24-26. LIST. _ATEOF { set +x $as_echo "$at_srcdir/data-reader.at:234: pspp -O format=csv data-reader-2.sps" at_fn_check_prepare_trace "data-reader.at:234" ( $at_check_trace; pspp -O format=csv data-reader-2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List start,end,count 07/22/2007,10/06/2007,322 07/14/1789,08/26/1789,5 01/01/1972,12/31/1999,683 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/data-reader.at:234" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_220 #AT_START_221 at_fn_group_banner 221 'dataset.at:19' \ "DATASET COPY" " " 27 at_xfail=no ( $as_echo "221. $at_setup_line: testing $at_desc ..." $at_traceon cat >dataset.pspp <<'_ATEOF' DATASET NAME initial. DATA LIST NOTABLE /x 1. COMPUTE x = x + 1. DATASET COPY clone. BEGIN DATA. 1 2 3 4 5 END DATA. NEW FILE. DATA LIST NOTABLE /y 1. BEGIN DATA. 6 7 8 END DATA. LIST. DATASET DISPLAY. DATASET ACTIVATE clone. DATASET DISPLAY. LIST. DATASET ACTIVATE initial. DATASET DISPLAY. LIST. COMPUTE z=y. DATASET COPY clone. DATASET ACTIVATE clone. LIST. DATASET COPY clone. DATASET DISPLAY. DATASET CLOSE initial. DATASET DISPLAY. _ATEOF { set +x $as_echo "$at_srcdir/dataset.at:62: pspp -O format=csv dataset.pspp" at_fn_check_prepare_trace "dataset.at:62" ( $at_check_trace; pspp -O format=csv dataset.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List y 6 7 8 Table: Open datasets. Dataset clone initial (active dataset) Table: Open datasets. Dataset clone (active dataset) initial Table: Data List x 2 3 4 5 6 Table: Open datasets. Dataset clone initial (active dataset) Table: Data List y 6 7 8 Table: Data List y,z 6,6.00 7,7.00 8,8.00 Table: Open datasets. Dataset unnamed dataset (active dataset) initial Table: Open datasets. Dataset unnamed dataset (active dataset) " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/dataset.at:62" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_221 #AT_START_222 at_fn_group_banner 222 'dataset.at:115' \ "DATASET DECLARE" " " 27 at_xfail=no ( $as_echo "222. $at_setup_line: testing $at_desc ..." $at_traceon cat >dataset.pspp <<'_ATEOF' DATASET DECLARE second. DATASET DISPLAY. DATA LIST NOTABLE/x 1. BEGIN DATA. 1 END DATA. LIST. DATASET ACTIVATE second. DATASET DISPLAY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/dataset.at:128: pspp -O format=csv dataset.pspp" at_fn_check_prepare_trace "dataset.at:128" ( $at_check_trace; pspp -O format=csv dataset.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Open datasets. Dataset unnamed dataset (active dataset) second Table: Data List x 1 Table: Open datasets. Dataset second (active dataset) dataset.pspp:10: error: LIST: LIST is allowed only after the active dataset has been defined. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/dataset.at:128" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_222 #AT_START_223 at_fn_group_banner 223 'dataset.at:146' \ "DATASET NAME deletes duplicate name" " " 27 at_xfail=no ( $as_echo "223. $at_setup_line: testing $at_desc ..." $at_traceon cat >dataset.pspp <<'_ATEOF' DATASET NAME a. DATASET DECLARE b. DATASET DECLARE c. DATASET DISPLAY. DATASET NAME b. DATASET NAME c. DATASET DISPLAY. _ATEOF { set +x $as_echo "$at_srcdir/dataset.at:157: pspp -O format=csv dataset.pspp" at_fn_check_prepare_trace "dataset.at:157" ( $at_check_trace; pspp -O format=csv dataset.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Open datasets. Dataset a (active dataset) b c Table: Open datasets. Dataset c (active dataset) " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/dataset.at:157" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_223 #AT_START_224 at_fn_group_banner 224 'dataset.at:170' \ "DATASET ACTIVATE deletes unnamed dataset" " " 27 at_xfail=no ( $as_echo "224. $at_setup_line: testing $at_desc ..." $at_traceon cat >dataset.pspp <<'_ATEOF' DATASET DECLARE x. DATASET DISPLAY. DATASET ACTIVATE x. DATASET DISPLAY. _ATEOF { set +x $as_echo "$at_srcdir/dataset.at:178: pspp -O format=csv dataset.pspp" at_fn_check_prepare_trace "dataset.at:178" ( $at_check_trace; pspp -O format=csv dataset.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Open datasets. Dataset unnamed dataset (active dataset) x Table: Open datasets. Dataset x (active dataset) " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/dataset.at:178" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_224 #AT_START_225 at_fn_group_banner 225 'dataset.at:190' \ "DATASET ACTIVATE executes pending transformations" "" 27 at_xfail=no ( $as_echo "225. $at_setup_line: testing $at_desc ..." $at_traceon cat >dataset.pspp <<'_ATEOF' DATASET NAME one. DATASET DECLARE another. DATASET DISPLAY. DATA LIST NOTABLE /x 1. PRINT/x. DATASET ACTIVATE another. BEGIN DATA. 1 2 3 4 5 END DATA. LIST. DATASET ACTIVATE one. LIST. _ATEOF { set +x $as_echo "$at_srcdir/dataset.at:212: pspp -O format=csv dataset.pspp" at_fn_check_prepare_trace "dataset.at:212" ( $at_check_trace; pspp -O format=csv dataset.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Open datasets. Dataset another one (active dataset) 1 2 3 4 5 dataset.pspp:16: error: LIST: LIST is allowed only after the active dataset has been defined. Table: Data List x 1 2 3 4 5 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/dataset.at:212" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_225 #AT_START_226 at_fn_group_banner 226 'dataset.at:240' \ "DATASET CLOSE" " " 27 at_xfail=no ( $as_echo "226. $at_setup_line: testing $at_desc ..." $at_traceon cat >dataset.pspp <<'_ATEOF' DATASET DISPLAY DATASET CLOSE *. DATASET DISPLAY. DATASET NAME this. DATASET DISPLAY. DATASET CLOSE this. DATASET DISPLAY. DATASET NAME this. DATASET DISPLAY. DATASET CLOSE *. DATASET DISPLAY. DATASET DECLARE that. DATASET DECLARE theother. DATASET DECLARE yetanother. DATASET DISPLAY. DATASET CLOSE ALL. DATASET DISPLAY. DATASET NAME this. DATASET DECLARE that. DATASET DECLARE theother. DATASET DECLARE yetanother. DATASET DISPLAY. DATASET CLOSE ALL. DATASET DISPLAY. _ATEOF { set +x $as_echo "$at_srcdir/dataset.at:271: pspp -O format=csv dataset.pspp" at_fn_check_prepare_trace "dataset.at:271" ( $at_check_trace; pspp -O format=csv dataset.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Open datasets. Dataset unnamed dataset (active dataset) Table: Open datasets. Dataset unnamed dataset (active dataset) Table: Open datasets. Dataset this (active dataset) Table: Open datasets. Dataset unnamed dataset (active dataset) Table: Open datasets. Dataset this (active dataset) Table: Open datasets. Dataset unnamed dataset (active dataset) Table: Open datasets. Dataset unnamed dataset (active dataset) that theother yetanother Table: Open datasets. Dataset unnamed dataset (active dataset) Table: Open datasets. Dataset that theother this (active dataset) yetanother Table: Open datasets. Dataset unnamed dataset (active dataset) " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/dataset.at:271" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_226 #AT_START_227 at_fn_group_banner 227 'file-handle.at:19' \ "FILE HANDLE" " " 28 at_xfail=no ( $as_echo "227. $at_setup_line: testing $at_desc ..." $at_traceon cat >wiggle.txt <<'_ATEOF' 1 2 5 109 _ATEOF cat >file-handle.sps <<'_ATEOF' FILE HANDLE myhandle /NAME='wiggle.txt'. DATA LIST LIST FILE=myhandle /x *. LIST. _ATEOF { set +x $as_echo "$at_srcdir/file-handle.at:31: pspp -O format=csv file-handle.sps" at_fn_check_prepare_trace "file-handle.at:31" ( $at_check_trace; pspp -O format=csv file-handle.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from myhandle. Variable,Format x,F8.0 Table: Data List x 1.00 2.00 5.00 109.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/file-handle.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_227 #AT_START_228 at_fn_group_banner 228 'get-data-spreadsheet.at:169' \ "GET DATA /TYPE=GNM with CELLRANGE" " " 29 at_xfail=no ( $as_echo "228. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: gzip -c \$top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" at_fn_check_prepare_dynamic "gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" "get-data-spreadsheet.at:169" ( $at_check_trace; gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:169" >"$at_check_line_file" (test n$GNM_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:169" cat >get-data.sps <<'_ATEOF' GET DATA /TYPE=GNM /FILE='Book1.gnumeric' /READNAMES=off /SHEET=name 'This' /CELLRANGE=range 'g9:i13' . DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:169" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: cat pspp.csv" at_fn_check_prepare_trace "get-data-spreadsheet.at:169" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position VAR001,Format: F8.2,1 VAR002,Format: A8,2 VAR003,Format: F8.2,3 Table: Data List VAR001,VAR002,VAR003 .00,fred ,20.00 1.00,11 ,21.00 2.00,twelve ,22.00 3.00,13 ,23.00 4.00,14 ,24.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_228 #AT_START_229 at_fn_group_banner 229 'get-data-spreadsheet.at:169' \ "GET DATA /TYPE=GNM with CELLRANGE and READNAMES" "" 29 at_xfail=no ( $as_echo "229. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: gzip -c \$top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" at_fn_check_prepare_dynamic "gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" "get-data-spreadsheet.at:169" ( $at_check_trace; gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:169" >"$at_check_line_file" (test n$GNM_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:169" cat >get-data.sps <<'_ATEOF' GET DATA /TYPE=GNM /FILE='Book1.gnumeric' /READNAMES=on /SHEET=name 'This' /CELLRANGE=range 'g8:i13' . DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:169" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: cat pspp.csv" at_fn_check_prepare_trace "get-data-spreadsheet.at:169" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position V1,Format: F8.2,1 V2,Format: A8,2 VAR001,Format: F8.2,3 Table: Data List V1,V2,VAR001 .00,fred ,20.00 1.00,11 ,21.00 2.00,twelve ,22.00 3.00,13 ,23.00 4.00,14 ,24.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_229 #AT_START_230 at_fn_group_banner 230 'get-data-spreadsheet.at:169' \ "GET DATA /TYPE=GNM without CELLRANGE" " " 29 at_xfail=no ( $as_echo "230. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: gzip -c \$top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" at_fn_check_prepare_dynamic "gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" "get-data-spreadsheet.at:169" ( $at_check_trace; gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:169" >"$at_check_line_file" (test n$GNM_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:169" cat >get-data.sps <<'_ATEOF' GET DATA /TYPE=GNM /FILE='Book1.gnumeric' /SHEET=index 3. DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: pspp -O format=csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:169" ( $at_check_trace; pspp -O format=csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position name,Format: A8,1 id,Format: F8.2,2 height,Format: F8.2,3 warning: Cannot convert the value in the spreadsheet cell C4 to format (F8.2): Field contents are not numeric. Table: Data List name,id,height fred ,.00,23.40 bert ,1.00,.56 charlie ,2.00,. dick ,3.00,-34.09 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_230 #AT_START_231 at_fn_group_banner 231 'get-data-spreadsheet.at:169' \ "GET DATA /TYPE=GNM with missing data" " " 29 at_xfail=no ( $as_echo "231. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: gzip -c \$top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" at_fn_check_prepare_dynamic "gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" "get-data-spreadsheet.at:169" ( $at_check_trace; gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:169" >"$at_check_line_file" (test n$GNM_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:169" cat >get-data.sps <<'_ATEOF' * This sheet has no data in one of its variables GET DATA /TYPE=GNM /FILE='Book1.gnumeric' /READNAMES=on /SHEET=index 5. DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:169" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: cat pspp.csv" at_fn_check_prepare_trace "get-data-spreadsheet.at:169" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position vone,Format: F8.2,1 vtwo,Format: F8.2,2 vthree,Format: A8,3 v4,Format: F8.2,4 Table: Data List vone,vtwo,vthree,v4 1.00,3.00,,5.00 2.00,4.00,,6.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_231 #AT_START_232 at_fn_group_banner 232 'get-data-spreadsheet.at:169' \ "GET DATA /TYPE=GNM with no options" " " 29 at_xfail=no ( $as_echo "232. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: gzip -c \$top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" at_fn_check_prepare_dynamic "gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" "get-data-spreadsheet.at:169" ( $at_check_trace; gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:169" >"$at_check_line_file" (test n$GNM_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:169" cat >get-data.sps <<'_ATEOF' * This sheet is empty GET DATA /TYPE=GNM /FILE='Book1.gnumeric'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:169" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_232 #AT_START_233 at_fn_group_banner 233 'get-data-spreadsheet.at:169' \ "GET DATA /TYPE=GNM with empty sheet" " " 29 at_xfail=no ( $as_echo "233. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: gzip -c \$top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" at_fn_check_prepare_dynamic "gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" "get-data-spreadsheet.at:169" ( $at_check_trace; gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:169" >"$at_check_line_file" (test n$GNM_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:169" cat >get-data.sps <<'_ATEOF' * This sheet is empty GET DATA /TYPE=GNM /FILE='Book1.gnumeric' /SHEET=name 'Empty'. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:169" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: Selected sheet or range of spreadsheet \`Book1.gnumeric' is empty. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_233 #AT_START_234 at_fn_group_banner 234 'get-data-spreadsheet.at:169' \ "GET DATA /TYPE=GNM with nonexistent sheet" " " 29 at_xfail=no ( $as_echo "234. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: gzip -c \$top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" at_fn_check_prepare_dynamic "gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric" "get-data-spreadsheet.at:169" ( $at_check_trace; gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:169" >"$at_check_line_file" (test n$GNM_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:169" cat >get-data.sps <<'_ATEOF' * This sheet doesnt exist. GET DATA /TYPE=GNM /FILE='Book1.gnumeric' /SHEET=name 'foobarxx'. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:169: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:169" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: Selected sheet or range of spreadsheet \`Book1.gnumeric' is empty. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:169" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_234 #AT_START_235 at_fn_group_banner 235 'get-data-spreadsheet.at:172' \ "GET DATA /TYPE=GNM sheet index bug" " " 29 at_xfail=no ( $as_echo "235. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "get-data-spreadsheet.at:173" >"$at_check_line_file" (test n$GNM_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:173" cat >minimal3.gnumeric <<'_ATEOF' Sheet1 Sheet2 Sheet3 Sheet1 2 3 Print_Area #REF! A1 Sheet_Title "Sheet1" A1 Name x y Sheet One 1 2 foo 3 4 bar 5 6 Sheet2 2 2 Print_Area #REF! A1 Sheet_Title "Sheet2" A1 Comment DOB wealth Sheet Two 24/5/1966 0.02 wee 37145 3000 Sheet3 2 2 Print_Area #REF! A1 Sheet_Title "Sheet3" A1 3 4 5 6 7 8 9 10 11 _ATEOF cat >gnum.sps <<'_ATEOF' GET DATA /TYPE=GNM /FILE='minimal3.gnumeric' /SHEET=index 3 /READNAMES=off . LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:308: pspp -O format=csv gnum.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:308" ( $at_check_trace; pspp -O format=csv gnum.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List VAR001,VAR002,VAR003 3 ,4.00,5.00 6 ,7.00,8.00 9 ,10.00,11.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:308" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_235 #AT_START_236 at_fn_group_banner 236 'get-data-spreadsheet.at:321' \ "GET DATA /TYPE=GNM assert-fail" " " 29 at_xfail=no ( $as_echo "236. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "get-data-spreadsheet.at:322" >"$at_check_line_file" (test n$GNM_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:322" cat >read.sps <<'_ATEOF' GET DATA /TYPE=GNM /FILE='crash.gnumeric' . list. _ATEOF cat >crash.gnumeric <<'_ATEOF' Sheet1 Sheet1 2 4 one two 1 2 1 2 1 2 _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:366: pspp -O format=csv read.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:366" ( $at_check_trace; pspp -O format=csv read.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:366" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_236 #AT_START_237 at_fn_group_banner 237 'get-data-spreadsheet.at:375' \ "GET DATA /TYPE=ODS with CELLRANGE" " " 30 at_xfail=no ( $as_echo "237. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: cp \$top_srcdir/tests/language/data-io/test.ods test.ods" at_fn_check_prepare_dynamic "cp $top_srcdir/tests/language/data-io/test.ods test.ods" "get-data-spreadsheet.at:375" ( $at_check_trace; cp $top_srcdir/tests/language/data-io/test.ods test.ods ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:375" >"$at_check_line_file" (test n$ODF_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:375" cat >get-data.sps <<'_ATEOF' GET DATA /TYPE=ODS /FILE='test.ods' /READNAMES=off /SHEET=name 'This' /CELLRANGE=range 'g9:i13' . DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:375" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: cat pspp.csv" at_fn_check_prepare_trace "get-data-spreadsheet.at:375" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position VAR001,Format: F8.2,1 VAR002,Format: A8,2 VAR003,Format: F8.2,3 Table: Data List VAR001,VAR002,VAR003 .00,fred ,20.00 1.00,11 ,21.00 2.00,twelve ,22.00 3.00,13 ,23.00 4.00,14 ,24.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_237 #AT_START_238 at_fn_group_banner 238 'get-data-spreadsheet.at:375' \ "GET DATA /TYPE=ODS with CELLRANGE and READNAMES" "" 30 at_xfail=no ( $as_echo "238. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: cp \$top_srcdir/tests/language/data-io/test.ods test.ods" at_fn_check_prepare_dynamic "cp $top_srcdir/tests/language/data-io/test.ods test.ods" "get-data-spreadsheet.at:375" ( $at_check_trace; cp $top_srcdir/tests/language/data-io/test.ods test.ods ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:375" >"$at_check_line_file" (test n$ODF_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:375" cat >get-data.sps <<'_ATEOF' GET DATA /TYPE=ODS /FILE='test.ods' /READNAMES=on /SHEET=name 'This' /CELLRANGE=range 'g8:i13' . DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:375" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: cat pspp.csv" at_fn_check_prepare_trace "get-data-spreadsheet.at:375" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position V1,Format: F8.2,1 V2,Format: A8,2 VAR001,Format: F8.2,3 Table: Data List V1,V2,VAR001 .00,fred ,20.00 1.00,11 ,21.00 2.00,twelve ,22.00 3.00,13 ,23.00 4.00,14 ,24.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_238 #AT_START_239 at_fn_group_banner 239 'get-data-spreadsheet.at:375' \ "GET DATA /TYPE=ODS without CELLRANGE" " " 30 at_xfail=no ( $as_echo "239. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: cp \$top_srcdir/tests/language/data-io/test.ods test.ods" at_fn_check_prepare_dynamic "cp $top_srcdir/tests/language/data-io/test.ods test.ods" "get-data-spreadsheet.at:375" ( $at_check_trace; cp $top_srcdir/tests/language/data-io/test.ods test.ods ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:375" >"$at_check_line_file" (test n$ODF_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:375" cat >get-data.sps <<'_ATEOF' GET DATA /TYPE=ODS /FILE='test.ods' /SHEET=index 3. DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: pspp -O format=csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:375" ( $at_check_trace; pspp -O format=csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position name,Format: A8,1 id,Format: F8.2,2 height,Format: F8.2,3 warning: Cannot convert the value in the spreadsheet cell C4 to format (F8.2): Field contents are not numeric. Table: Data List name,id,height fred ,.00,23.40 bert ,1.00,.56 charlie ,2.00,. dick ,3.00,-34.09 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_239 #AT_START_240 at_fn_group_banner 240 'get-data-spreadsheet.at:375' \ "GET DATA /TYPE=ODS with missing data" " " 30 at_xfail=no ( $as_echo "240. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: cp \$top_srcdir/tests/language/data-io/test.ods test.ods" at_fn_check_prepare_dynamic "cp $top_srcdir/tests/language/data-io/test.ods test.ods" "get-data-spreadsheet.at:375" ( $at_check_trace; cp $top_srcdir/tests/language/data-io/test.ods test.ods ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:375" >"$at_check_line_file" (test n$ODF_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:375" cat >get-data.sps <<'_ATEOF' * This sheet has no data in one of its variables GET DATA /TYPE=ODS /FILE='test.ods' /READNAMES=on /SHEET=index 5. DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:375" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: cat pspp.csv" at_fn_check_prepare_trace "get-data-spreadsheet.at:375" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position vone,Format: F8.2,1 vtwo,Format: F8.2,2 vthree,Format: A8,3 v4,Format: F8.2,4 Table: Data List vone,vtwo,vthree,v4 1.00,3.00,,5.00 2.00,4.00,,6.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_240 #AT_START_241 at_fn_group_banner 241 'get-data-spreadsheet.at:375' \ "GET DATA /TYPE=ODS with no options" " " 30 at_xfail=no ( $as_echo "241. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: cp \$top_srcdir/tests/language/data-io/test.ods test.ods" at_fn_check_prepare_dynamic "cp $top_srcdir/tests/language/data-io/test.ods test.ods" "get-data-spreadsheet.at:375" ( $at_check_trace; cp $top_srcdir/tests/language/data-io/test.ods test.ods ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:375" >"$at_check_line_file" (test n$ODF_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:375" cat >get-data.sps <<'_ATEOF' * This sheet is empty GET DATA /TYPE=ODS /FILE='test.ods'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:375" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_241 #AT_START_242 at_fn_group_banner 242 'get-data-spreadsheet.at:375' \ "GET DATA /TYPE=ODS with empty sheet" " " 30 at_xfail=no ( $as_echo "242. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: cp \$top_srcdir/tests/language/data-io/test.ods test.ods" at_fn_check_prepare_dynamic "cp $top_srcdir/tests/language/data-io/test.ods test.ods" "get-data-spreadsheet.at:375" ( $at_check_trace; cp $top_srcdir/tests/language/data-io/test.ods test.ods ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:375" >"$at_check_line_file" (test n$ODF_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:375" cat >get-data.sps <<'_ATEOF' * This sheet is empty GET DATA /TYPE=ODS /FILE='test.ods' /SHEET=name 'Empty'. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:375" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: Selected sheet or range of spreadsheet \`test.ods' is empty. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_242 #AT_START_243 at_fn_group_banner 243 'get-data-spreadsheet.at:375' \ "GET DATA /TYPE=ODS with nonexistent sheet" " " 30 at_xfail=no ( $as_echo "243. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: cp \$top_srcdir/tests/language/data-io/test.ods test.ods" at_fn_check_prepare_dynamic "cp $top_srcdir/tests/language/data-io/test.ods test.ods" "get-data-spreadsheet.at:375" ( $at_check_trace; cp $top_srcdir/tests/language/data-io/test.ods test.ods ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "get-data-spreadsheet.at:375" >"$at_check_line_file" (test n$ODF_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:375" cat >get-data.sps <<'_ATEOF' * This sheet doesnt exist. GET DATA /TYPE=ODS /FILE='test.ods' /SHEET=name 'foobarxx'. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:375: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:375" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: Selected sheet or range of spreadsheet \`test.ods' is empty. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:375" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_243 #AT_START_244 at_fn_group_banner 244 'get-data-spreadsheet.at:378' \ "GET DATA /TYPE=ODS crash" " " 30 at_xfail=no ( $as_echo "244. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "get-data-spreadsheet.at:379" >"$at_check_line_file" (test n$ODF_READ_SUPPORT != nyes) \ && at_fn_check_skip 77 "$at_srcdir/get-data-spreadsheet.at:379" { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:382: cp \$top_srcdir/tests/language/data-io/newone.ods this.ods" at_fn_check_prepare_dynamic "cp $top_srcdir/tests/language/data-io/newone.ods this.ods" "get-data-spreadsheet.at:382" ( $at_check_trace; cp $top_srcdir/tests/language/data-io/newone.ods this.ods ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:382" $at_failed && at_fn_log_failure $at_traceon; } cat >crash.sps <<'_ATEOF' GET DATA /TYPE=ODS /FILE='this.ods' /CELLRANGE=RANGE 'A1:C8' /READNAMES=ON LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-spreadsheet.at:389: pspp -O format=csv crash.sps" at_fn_check_prepare_trace "get-data-spreadsheet.at:389" ( $at_check_trace; pspp -O format=csv crash.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/get-data-spreadsheet.at:389" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_244 #AT_START_245 at_fn_group_banner 245 'get-data-psql.at:140' \ "GET DATA /TYPE=PSQL" " " 31 at_xfail=no ( $as_echo "245. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "get-data-psql.at:141" >"$at_check_line_file" (test "$PSQL_SUPPORT" = no) \ && at_fn_check_skip 77 "$at_srcdir/get-data-psql.at:141" PATH=$PG_PATH:$PATH export PATH PGDATA=`pwd`/cluster export PGDATA PGPORT=$PG_PORT export PGPORT socket_dir=`mktemp -d` PGHOST="$socket_dir" export PGHOST { set +x $as_echo "$at_srcdir/get-data-psql.at:141: initdb -A trust" at_fn_check_prepare_trace "get-data-psql.at:141" ( $at_check_trace; initdb -A trust ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:141" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:141: pg_ctl start -w -o \"-k \$socket_dir -h ''\"" at_fn_check_prepare_dynamic "pg_ctl start -w -o \"-k $socket_dir -h ''\"" "get-data-psql.at:141" ( $at_check_trace; pg_ctl start -w -o "-k $socket_dir -h ''" ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:141" $at_failed && at_fn_log_failure $at_traceon; } trap 'pg_ctl stop -W -o "-k $socket_dir -h ''"' 0 { set +x $as_echo "$at_srcdir/get-data-psql.at:141: createdb -h \"\$socket_dir\" -p \$PG_PORT \$PG_DBASE" at_fn_check_prepare_dynamic "createdb -h \"$socket_dir\" -p $PG_PORT $PG_DBASE" "get-data-psql.at:141" ( $at_check_trace; createdb -h "$socket_dir" -p $PG_PORT $PG_DBASE ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:141" $at_failed && at_fn_log_failure $at_traceon; } cat >populate.sql <<'_ATEOF' CREATE TABLE empty (a int, b date, c numeric(23, 4)); -- a largeish table to check big queries work ok. CREATE TABLE large (x int); INSERT INTO large (select * from generate_series(1, 1000)); CREATE TABLE thing ( bool bool , bytea bytea , char char , int8 int8 , int2 int2 , int4 int4 , numeric numeric(50,6) , text text , oid oid , float4 float4 , float8 float8 , money money , pbchar bpchar , varchar varchar , date date , time time , timestamp timestamp , timestamptz timestamptz , interval interval , timetz timetz ); INSERT INTO thing VALUES ( false, '0', 'a', '0', 0, 0, -256.098, 'this-long-text', 0, 0, 0, '0.01', 'a', 'A', '1-Jan-2000', '00:00', 'January 8 04:05:06 1999', 'January 8 04:05:06 1999 PST', '1 minutes', '10:09 UTC+4' ); INSERT INTO thing VALUES ( null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ); INSERT INTO thing VALUES ( true, '1', 'b', '1', 1, 1, 65535.00001, 'that-long-text', 1, 1, 1, '1.23', 'b', 'B', '10-Jan-1963', '01:05:02', '10-Jan-1963 23:58:00', '10-Jan-1963 23:58:00 CET', '2 year 1 month 12 days 1 hours 3 minutes 4 seconds', '01:05:02 UTC-7' ); _ATEOF { set +x $as_echo "$at_srcdir/get-data-psql.at:141: psql -h \"\$socket_dir\" -p \$PG_PORT \$PG_DBASE < populate.sql" at_fn_check_prepare_dynamic "psql -h \"$socket_dir\" -p $PG_PORT $PG_DBASE < populate.sql" "get-data-psql.at:141" ( $at_check_trace; psql -h "$socket_dir" -p $PG_PORT $PG_DBASE < populate.sql ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:141" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:144: cat > ordinary-query.sps < ordinary-query.sps <>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:144" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:155: pspp -o pspp.csv ordinary-query.sps" at_fn_check_prepare_trace "get-data-psql.at:155" ( $at_check_trace; pspp -o pspp.csv ordinary-query.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:155" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:156: cat pspp.csv" at_fn_check_prepare_trace "get-data-psql.at:156" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position bool,Format: F8.2,1 bytea,Format: AHEX2,2 char,Format: A8,3 int8,Format: F8.2,4 int2,Format: F8.2,5 int4,Format: F8.2,6 numeric,Format: E40.6,7 text,Format: A16,8 oid,Format: F8.2,9 float4,Format: F8.2,10 float8,Format: F8.2,11 money,Format: DOLLAR8.2,12 pbchar,Format: A8,13 varchar,Format: A8,14 date,Format: DATE11,15 time,Format: TIME11.0,16 timestamp,Format: DATETIME22.0,17 timestamptz,Format: DATETIME22.0,18 interval,Format: DTIME13.0,19 interval_months,Format: F3.0,20 timetz,Format: TIME11.0,21 timetz_zone,Format: F8.2,22 Table: Data List bool,bytea,char,int8,int2,int4,numeric,text,oid,float4,float8,money,pbchar,varchar,date,time,timestamp,timestamptz,interval,interval_months,timetz,timetz_zone .00,30,a ,.00,.00,.00,-2.560980E+002,this-long-text ,.00,.00,.00,\$.01,a ,A ,01-JAN-2000,0:00:00,08-JAN-1999 04:05:06,08-JAN-1999 12:05:06,0 00:01:00,0,10:09:00,4.00 . ,20,,. ,. ,. ,. ,,. ,. ,. ,. ,,,.,.,.,.,.,.,.,. 1.00,31,b ,1.00,1.00,1.00,6.553500E+004,that-long-text ,.00,1.00,1.00,\$1.23,b ,B ,10-JAN-1963,1:05:02,10-JAN-1963 23:58:00,10-JAN-1963 22:58:00,12 01:03:04,25,1:05:02,-7.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:156" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:189: cat > empty-result.sps < empty-result.sps <>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:189" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:200: pspp -o pspp.csv empty-result.sps" at_fn_check_prepare_trace "get-data-psql.at:200" ( $at_check_trace; pspp -o pspp.csv empty-result.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:200" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:201: cat pspp.csv" at_fn_check_prepare_trace "get-data-psql.at:201" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position a,Format: F8.2,1 b,Format: DATE11,2 c,Format: E40.2,3 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:201" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:209: cat > large-result.sps < 1). LIST. TEMPORARY. N OF CASES 6. LIST. SORT CASES BY x (D). TEMPORARY. N OF CASES 6. LIST. EOF " at_fn_check_prepare_notrace 'an embedded newline' "get-data-psql.at:209" ( $at_check_trace; cat > large-result.sps < 1). LIST. TEMPORARY. N OF CASES 6. LIST. SORT CASES BY x (D). TEMPORARY. N OF CASES 6. LIST. EOF ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:209" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:233: pspp -o pspp.csv large-result.sps" at_fn_check_prepare_trace "get-data-psql.at:233" ( $at_check_trace; pspp -o pspp.csv large-result.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:233" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:234: cat pspp.csv" at_fn_check_prepare_trace "get-data-psql.at:234" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,diff 1.00,. 2.00,1.00 3.00,1.00 4.00,1.00 5.00,1.00 6.00,1.00 Table: Data List x,diff 1000.00,1.00 999.00,1.00 998.00,1.00 997.00,1.00 996.00,1.00 995.00,1.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:234" $at_failed && at_fn_log_failure $at_traceon; } cat >all-null-string.sql <<'_ATEOF' -- a table which has a text field containing only null, or zero -- length entries. CREATE TABLE foo (int4 int4, text text); INSERT INTO foo VALUES ('12', ''); INSERT INTO foo VALUES (null, ''); _ATEOF { set +x $as_echo "$at_srcdir/get-data-psql.at:266: psql -h \"\$socket_dir\" -p \$PG_PORT \$PG_DBASE < all-null-string.sql" at_fn_check_prepare_dynamic "psql -h \"$socket_dir\" -p $PG_PORT $PG_DBASE < all-null-string.sql" "get-data-psql.at:266" ( $at_check_trace; psql -h "$socket_dir" -p $PG_PORT $PG_DBASE < all-null-string.sql ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:266" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:269: cat > get-data.sps < get-data.sps <>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:269" $at_failed && at_fn_log_failure \ "get-data.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-psql.at:280: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-psql.at:280" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-psql.at:280" $at_failed && at_fn_log_failure \ "get-data.sps" $at_traceon; } rm -rf "$socket_dir" set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_245 #AT_START_246 at_fn_group_banner 246 'get-data-txt.at:23' \ "GET DATA /TYPE=TXT with explicit delimiters" " " 32 at_xfail=no ( $as_echo "246. $at_setup_line: testing $at_desc ..." $at_traceon cat >get-data.sps <<'_ATEOF' get data /type=txt /file=inline /delimiters="|X" /variables=A f7.2 B f7.2 C f7.2 D f7.2. begin data. 1|23X45|2.03 2X22|34|23| 3|34|34X34 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:35: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-txt.at:35" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:35" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-txt.at:36: cat pspp.csv" at_fn_check_prepare_trace "get-data-txt.at:36" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List A,B,C,D 1.00,23.00,45.00,2.03 2.00,22.00,34.00,23.00 3.00,34.00,34.00,34.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_246 #AT_START_247 at_fn_group_banner 247 'get-data-txt.at:45' \ "GET DATA /TYPE=TXT with FIRSTCASE" " " 32 at_xfail=no ( $as_echo "247. $at_setup_line: testing $at_desc ..." $at_traceon cat >get-data.sps <<'_ATEOF' get data /type=txt /file=inline /delimiters=', ' /delcase=variables 4 /firstcase=2 /variables=A f7.2 B f7.2 C f7.2 D f7.2. begin data. # This record is ignored. ,1,2,3 ,4,,5 6 7, 8 9 0,1,,, ,,,, 2 3 4 5 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:69: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-txt.at:69" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:69" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-txt.at:70: cat pspp.csv" at_fn_check_prepare_trace "get-data-txt.at:70" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List A,B,C,D . ,1.00,2.00,3.00 . ,4.00,. ,5.00 6.00,7.00,. ,8.00 9.00,.00,1.00,. . ,. ,. ,. . ,. ,. ,2.00 . ,3.00,4.00,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:70" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_247 #AT_START_248 at_fn_group_banner 248 'get-data-txt.at:83' \ "GET DATA /TYPE=TXT with FIRSTCASE and tab delimiter" "" 32 at_xfail=no ( $as_echo "248. $at_setup_line: testing $at_desc ..." $at_traceon cat >get-data.sps <<'_ATEOF' get data /type=txt /file=inline /delimiters='\t' /delcase=variables 4 /firstcase=3 /variables=A f7.2 B f7.2 C f7.2 D f7.2. begin data. # These records # are skipped. 1 2 3 4 1 2 3 4 1 2 4 1 2 4 1 3 4 1 3 4 1 4 1 4 2 3 4 2 3 4 2 4 2 4 3 4 3 4 4 4 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:109: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-txt.at:109" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:109" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-txt.at:110: cat pspp.csv" at_fn_check_prepare_trace "get-data-txt.at:110" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List A,B,C,D 1.00,2.00,3.00,4.00 1.00,2.00,3.00,4.00 1.00,2.00,. ,4.00 1.00,2.00,. ,4.00 1.00,. ,3.00,4.00 1.00,. ,3.00,4.00 1.00,. ,. ,4.00 1.00,. ,. ,4.00 . ,2.00,3.00,4.00 . ,2.00,3.00,4.00 . ,2.00,. ,4.00 . ,2.00,. ,4.00 . ,. ,3.00,4.00 . ,. ,3.00,4.00 . ,. ,. ,4.00 . ,. ,. ,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:110" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_248 #AT_START_249 at_fn_group_banner 249 'get-data-txt.at:132' \ "GET DATA /TYPE=TXT with multiple records per case" "" 32 at_xfail=no ( $as_echo "249. $at_setup_line: testing $at_desc ..." $at_traceon cat >get-data.sps <<'_ATEOF' get data /type=txt /file=inline /arrangement=fixed /fixcase=3 /variables= /1 start 0-19 adate8 /2 end 0-19 adate /3 count 0-2 f. begin data. 07-22-2007 10-06-2007 321 07-14-1789 08-26-1789 4 01-01-1972 12-31-1999 682 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:151: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-txt.at:151" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:151" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-txt.at:152: cat pspp.csv" at_fn_check_prepare_trace "get-data-txt.at:152" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List start,end,count 07/22/07,10/06/2007,321 ********,08/26/1789,4 01/01/72,12/31/1999,682 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:152" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_249 #AT_START_250 at_fn_group_banner 250 'get-data-txt.at:161' \ "GET DATA /TYPE=TXT with empty trailing record" " " 32 at_xfail=no ( $as_echo "250. $at_setup_line: testing $at_desc ..." $at_traceon cat >get-data.sps <<'_ATEOF' get data /type=txt /file=inline /arrangement=fixed /fixcase=2 /variables= /1 x 0 f y 1 f. begin data. 12 34 56 78 90 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:180: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-txt.at:180" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:180" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-txt.at:181: cat pspp.csv" at_fn_check_prepare_trace "get-data-txt.at:181" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,y 1,2 3,4 5,6 7,8 9,0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:181" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_250 #AT_START_251 at_fn_group_banner 251 'get-data-txt.at:194' \ "GET DATA /TYPE=TXT password example" " " 32 at_xfail=no ( $as_echo "251. $at_setup_line: testing $at_desc ..." $at_traceon cat >passwd.data <<'_ATEOF' root:$1$nyeSP5gD$pDq/:0:0:,,,:/root:/bin/bash blp:$1$BrP/pFg4$g7OG:1000:1000:Ben Pfaff,,,:/home/blp:/bin/bash john:$1$JBuq/Fioq$g4A:1001:1001:John Darrington,,,:/home/john:/bin/bash jhs:$1$D3li4hPL$88X1:1002:1002:Jason Stover,,,:/home/jhs:/bin/csh _ATEOF cat >passwd.sps <<'_ATEOF' GET DATA /TYPE=TXT /FILE='passwd.data' /DELIMITERS=':' /VARIABLES=username A20 password A40 uid F10 gid F10 gecos A40 home A40 shell A40. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:212: pspp -o pspp.csv passwd.sps" at_fn_check_prepare_trace "get-data-txt.at:212" ( $at_check_trace; pspp -o pspp.csv passwd.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:212" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-txt.at:213: cat pspp.csv" at_fn_check_prepare_trace "get-data-txt.at:213" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List username,password,uid,gid,gecos,home,shell root ,\$1\$nyeSP5gD\$pDq/ ,0,0,\",,, \",/root ,/bin/bash blp ,\$1\$BrP/pFg4\$g7OG ,1000,1000,\"Ben Pfaff,,, \",/home/blp ,/bin/bash john ,\$1\$JBuq/Fioq\$g4A ,1001,1001,\"John Darrington,,, \",/home/john ,/bin/bash jhs ,\$1\$D3li4hPL\$88X1 ,1002,1002,\"Jason Stover,,, \",/home/jhs ,/bin/csh " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:213" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_251 #AT_START_252 at_fn_group_banner 252 'get-data-txt.at:225' \ "GET DATA /TYPE=TXT cars example" " " 32 at_xfail=no ( $as_echo "252. $at_setup_line: testing $at_desc ..." $at_traceon cat >cars.data <<'_ATEOF' model year mileage price type age Civic 2002 29883 15900 Si 2 Civic 2003 13415 15900 EX 1 Civic 1992 107000 3800 n/a 12 Accord 2002 26613 17900 EX 1 _ATEOF cat >cars.sps <<'_ATEOF' GET DATA /TYPE=TXT /FILE='cars.data' /DELIMITERS=' ' /FIRSTCASE=2 /VARIABLES=model A8 year F4 mileage F6 price F5 type A4 age F2. LIST. GET DATA /TYPE=TXT /FILE='cars.data' /ARRANGEMENT=FIXED /FIRSTCASE=2 /VARIABLES=model 0-7 A year 8-15 F mileage 16-23 F price 24-31 F type 32-39 A age 40-47 F. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:252: pspp -o pspp.csv cars.sps" at_fn_check_prepare_trace "get-data-txt.at:252" ( $at_check_trace; pspp -o pspp.csv cars.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:252" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-txt.at:253: cat pspp.csv" at_fn_check_prepare_trace "get-data-txt.at:253" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List model,year,mileage,price,type,age Civic ,2002,29883,15900,Si ,2 Civic ,2003,13415,15900,EX ,1 Civic ,1992,107000,3800,n/a ,12 Accord ,2002,26613,17900,EX ,1 Table: Data List model,year,mileage,price,type,age Civic ,2002,29883,15900,Si ,2 Civic ,2003,13415,15900,EX ,1 Civic ,1992,107000,3800,n/a ,12 Accord ,2002,26613,17900,EX ,1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:253" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_252 #AT_START_253 at_fn_group_banner 253 'get-data-txt.at:272' \ "GET DATA /TYPE=TXT pets example" " " 32 at_xfail=no ( $as_echo "253. $at_setup_line: testing $at_desc ..." $at_traceon cat >pets.data <<'_ATEOF' 'Pet''s Name', "Age", "Color", "Date Received", "Price", "Height", "Type" , (Years), , , (Dollars), , "Rover", 4.5, Brown, "12 Feb 2004", 80, '1''4"', "Dog" "Charlie", , Gold, "5 Apr 2007", 12.3, "3""", "Fish" "Molly", 2, Black, "12 Dec 2006", 25, '5"', "Cat" "Gilly", , White, "10 Apr 2007", 10, "3""", "Guinea Pig" _ATEOF cat >pets.sps <<'_ATEOF' GET DATA /TYPE=TXT /FILE='pets.data' /DELIMITERS=', ' /QUALIFIER='''"' /FIRSTCASE=3 /VARIABLES=name A10 age F3.1 color A5 received EDATE10 price F5.2 height a5 type a10. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:293: pspp -o pspp.csv pets.sps" at_fn_check_prepare_trace "get-data-txt.at:293" ( $at_check_trace; pspp -o pspp.csv pets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:293" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-txt.at:294: cat pspp.csv" at_fn_check_prepare_trace "get-data-txt.at:294" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List name,age,color,received,price,height,type Rover ,4.5,Brown,12.02.2004,80.00,\"1'4\"\" \",Dog Charlie ,. ,Gold ,05.04.2007,12.30,\"3\"\" \",Fish Molly ,2.0,Black,12.12.2006,25.00,\"5\"\" \",Cat Gilly ,. ,White,10.04.2007,10.00,\"3\"\" \",Guinea Pig " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:294" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_253 #AT_START_254 at_fn_group_banner 254 'get-data-txt.at:305' \ "GET DATA /TYPE=TXT with IMPORTCASE" " " 32 at_xfail=no ( $as_echo "254. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-txt.at:306: \$PERL > test.data <<'EOF' for (\$i = 1; \$i <= 100; \$i++) { printf \"%02d\\n\", \$i; } EOF " at_fn_check_prepare_notrace 'an embedded newline' "get-data-txt.at:306" ( $at_check_trace; $PERL > test.data <<'EOF' for ($i = 1; $i <= 100; $i++) { printf "%02d\n", $i; } EOF ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:306" $at_failed && at_fn_log_failure $at_traceon; } cat >get-data.sps <<'_ATEOF' get data /type=txt /file='test.data' /importcase=first 10 /variables x f8.0. get data /type=txt /file='test.data' /importcase=percent 1 /variables x f8.0. get data /type=txt /file='test.data' /importcase=percent 35 /variables x f8.0. get data /type=txt /file='test.data' /importcase=percent 95 /variables x f8.0. get data /type=txt /file='test.data' /importcase=percent 100 /variables x f8.0. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:319: pspp -O format=csv get-data.sps" at_fn_check_prepare_trace "get-data-txt.at:319" ( $at_check_trace; pspp -O format=csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "get-data.sps:1: warning: GET DATA: Ignoring obsolete IMPORTCASES subcommand. (N OF CASES or SAMPLE may be used to substitute.) get-data.sps:2: warning: GET DATA: Ignoring obsolete IMPORTCASES subcommand. (N OF CASES or SAMPLE may be used to substitute.) get-data.sps:3: warning: GET DATA: Ignoring obsolete IMPORTCASES subcommand. (N OF CASES or SAMPLE may be used to substitute.) get-data.sps:4: warning: GET DATA: Ignoring obsolete IMPORTCASES subcommand. (N OF CASES or SAMPLE may be used to substitute.) get-data.sps:5: warning: GET DATA: Ignoring obsolete IMPORTCASES subcommand. (N OF CASES or SAMPLE may be used to substitute.) " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:319" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_254 #AT_START_255 at_fn_group_banner 255 'get-data-txt.at:332' \ "GET DATA /TYPE=TXT with ENCODING subcommand" " " 32 at_xfail=no ( $as_echo "255. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get-data-txt.at:333: i18n-test supports_encodings UTF-8 ISO-8859-1" at_fn_check_prepare_trace "get-data-txt.at:333" ( $at_check_trace; i18n-test supports_encodings UTF-8 ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:333" $at_failed && at_fn_log_failure $at_traceon; } cat >get-data.sps <<'_ATEOF' set locale='utf-8' get data /type=txt /file='data.txt' /encoding='iso-8859-1' /delimiters="," /variables=s a8. list. _ATEOF printf '\351' > data.txt # é in ISO-8859-1. { set +x $as_echo "$at_srcdir/get-data-txt.at:341: pspp -o pspp.csv get-data.sps" at_fn_check_prepare_trace "get-data-txt.at:341" ( $at_check_trace; pspp -o pspp.csv get-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:341" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get-data-txt.at:342: cat pspp.csv" at_fn_check_prepare_trace "get-data-txt.at:342" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List s é " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:342" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_255 #AT_START_256 at_fn_group_banner 256 'get-data-txt.at:350' \ "GET DATA /TYPE= truncated" " " 32 at_xfail=no ( $as_echo "256. $at_setup_line: testing $at_desc ..." $at_traceon cat >x.sps <<'_ATEOF' GET DATA /TYPE= . _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:357: pspp -o pspp.csv x.sps" at_fn_check_prepare_trace "get-data-txt.at:357" ( $at_check_trace; pspp -o pspp.csv x.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/get-data-txt.at:357" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_256 #AT_START_257 at_fn_group_banner 257 'get-data-txt.at:363' \ "GET DATA /TYPE=txt bug" " " 32 at_xfail=no ( $as_echo "257. $at_setup_line: testing $at_desc ..." $at_traceon cat >thing.txt <<'_ATEOF' foo, title, last 1, this, 1 2, that, 2 3, other, 3 _ATEOF cat >x.sps <<'_ATEOF' GET DATA /TYPE=TXT /FILE="thing.txt" /ARRANGEMENT=DELIMITED /DELCASE=LINE /FIRSTCASE=2 /DELIMITERS="," /VARIABLES=foo F1.0 title A8 last F2.0. list. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:388: pspp -O format=csv x.sps" at_fn_check_prepare_trace "get-data-txt.at:388" ( $at_check_trace; pspp -O format=csv x.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List foo,title,last 1,this ,1 2,that ,2 3,other ,3 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get-data-txt.at:388" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_257 #AT_START_258 at_fn_group_banner 258 'get-data-txt.at:400' \ "GET DATA /TYPE=txt another bug" " " 32 at_xfail=no ( $as_echo "258. $at_setup_line: testing $at_desc ..." $at_traceon cat >crash.sps <<'_ATEOF' get data /type=txt /file=inline /variables=C f7.2 D f7>2. begin data. 3 2 4 2 5 2 end data. _ATEOF { set +x $as_echo "$at_srcdir/get-data-txt.at:411: pspp -O format=csv crash.sps" at_fn_check_prepare_trace "get-data-txt.at:411" ( $at_check_trace; pspp -O format=csv crash.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/get-data-txt.at:411" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_258 #AT_START_259 at_fn_group_banner 259 'get.at:21' \ "GET data works in multiple procedures" " " 33 at_xfail=no ( $as_echo "259. $at_setup_line: testing $at_desc ..." $at_traceon cat >get.sps <<'_ATEOF' DATA LIST LIST NOTABLE /LOCATION * EDITOR * SHELL * FREQ * . BEGIN DATA. 1.00 1.00 1.0 2.00 1.00 1.00 2.0 30.00 1.00 2.00 1.0 8.00 1.00 2.00 2.0 20.00 2.00 1.00 1.0 2.00 2.00 1.00 2.0 22.00 2.00 2.00 1.0 1.00 2.00 2.00 2.0 3.00 END DATA. SAVE /OUTFILE='foo.sav'. GET /FILE='foo.sav'. * This one's ok LIST. * But this one get rubbish LIST. _ATEOF { set +x $as_echo "$at_srcdir/get.at:45: pspp -o pspp.csv get.sps" at_fn_check_prepare_trace "get.at:45" ( $at_check_trace; pspp -o pspp.csv get.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get.at:45" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get.at:46: cat pspp.csv" at_fn_check_prepare_trace "get.at:46" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List LOCATION,EDITOR,SHELL,FREQ 1.00,1.00,1.00,2.00 1.00,1.00,2.00,30.00 1.00,2.00,1.00,8.00 1.00,2.00,2.00,20.00 2.00,1.00,1.00,2.00 2.00,1.00,2.00,22.00 2.00,2.00,1.00,1.00 2.00,2.00,2.00,3.00 Table: Data List LOCATION,EDITOR,SHELL,FREQ 1.00,1.00,1.00,2.00 1.00,1.00,2.00,30.00 1.00,2.00,1.00,8.00 1.00,2.00,2.00,20.00 2.00,1.00,1.00,2.00 2.00,1.00,2.00,22.00 2.00,2.00,1.00,1.00 2.00,2.00,2.00,3.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get.at:46" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_259 #AT_START_260 at_fn_group_banner 260 'get.at:72' \ "GET nonexistent file doesn't crash" " " 33 at_xfail=no ( $as_echo "260. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/get.at:75: echo \"GET /FILE='nonexistent.sav'.\" | pspp -O format=csv" at_fn_check_prepare_notrace 'a shell pipeline' "get.at:75" ( $at_check_trace; echo "GET /FILE='nonexistent.sav'." | pspp -O format=csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: An error occurred while opening \`nonexistent.sav': No such file or directory. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/get.at:75" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_260 #AT_START_261 at_fn_group_banner 261 'get.at:106' \ "GET with /KEEP=ALL crashes -- uncompressed" " " 33 at_xfail=no ( $as_echo "261. $at_setup_line: testing $at_desc ..." $at_traceon cat >get.sps <<'_ATEOF' DATA LIST LIST NOTABLE /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 (F2.0). BEGIN DATA. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 END DATA. LIST. SAVE OUTFILE='test.sav'/uncompressed. GET FILE='test.sav'/KEEP=x y z all. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get.at:106: pspp -o pspp.csv get.sps" at_fn_check_prepare_trace "get.at:106" ( $at_check_trace; pspp -o pspp.csv get.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get.at:106" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get.at:106: cat pspp.csv" at_fn_check_prepare_trace "get.at:106" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 Table: Data List x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w 24,25,26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get.at:106" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_261 #AT_START_262 at_fn_group_banner 262 'get.at:107' \ "GET with /KEEP=ALL crashes -- compressed" " " 33 at_xfail=no ( $as_echo "262. $at_setup_line: testing $at_desc ..." $at_traceon cat >get.sps <<'_ATEOF' DATA LIST LIST NOTABLE /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 (F2.0). BEGIN DATA. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 END DATA. LIST. SAVE OUTFILE='test.sav'/compressed. GET FILE='test.sav'/KEEP=x y z all. LIST. _ATEOF { set +x $as_echo "$at_srcdir/get.at:107: pspp -o pspp.csv get.sps" at_fn_check_prepare_trace "get.at:107" ( $at_check_trace; pspp -o pspp.csv get.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get.at:107" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/get.at:107: cat pspp.csv" at_fn_check_prepare_trace "get.at:107" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 Table: Data List x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w 24,25,26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/get.at:107" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_262 #AT_START_263 at_fn_group_banner 263 'get.at:111' \ "GET data no type" " " 33 at_xfail=no ( $as_echo "263. $at_setup_line: testing $at_desc ..." $at_traceon cat >get.sps <<'_ATEOF' get data /file='anything'. _ATEOF { set +x $as_echo "$at_srcdir/get.at:116: pspp get.sps" at_fn_check_prepare_trace "get.at:116" ( $at_check_trace; pspp get.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/get.at:116" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_263 #AT_START_264 at_fn_group_banner 264 'inpt-pgm.at:21' \ "INPUT PROGRAM invalid syntax crash" " " 34 at_xfail=no ( $as_echo "264. $at_setup_line: testing $at_desc ..." $at_traceon cat >input-program.sps <<'_ATEOF' INPUT PROGRAM. DATA LIST NOTABLE /a 1-9. BEGIN DATA 123456789 END DATA. END INPUT PROGRAM. _ATEOF { set +x $as_echo "$at_srcdir/inpt-pgm.at:30: pspp -O format=csv input-program.sps" at_fn_check_prepare_trace "inpt-pgm.at:30" ( $at_check_trace; pspp -O format=csv input-program.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "input-program.sps:3: error: BEGIN DATA: BEGIN DATA is not allowed inside INPUT PROGRAM. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/inpt-pgm.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_264 #AT_START_265 at_fn_group_banner 265 'inpt-pgm.at:37' \ "INPUT PROGRAM invalid syntax crash" " " 34 at_xfail=no ( $as_echo "265. $at_setup_line: testing $at_desc ..." $at_traceon cat >input-program.sps <<'_ATEOF' INPUT PROGRAM. DATA LIST LIST NOTABLE /x. END FILE. END INPUT PROGRAM. DESCRIPTIVES x. _ATEOF { set +x $as_echo "$at_srcdir/inpt-pgm.at:46: pspp -O format=csv input-program.sps" at_fn_check_prepare_trace "inpt-pgm.at:46" ( $at_check_trace; pspp -O format=csv input-program.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: DESCRIPTIVES: Syntax error at end of input: expecting BEGIN. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/inpt-pgm.at:46" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_265 #AT_START_266 at_fn_group_banner 266 'inpt-pgm.at:52' \ "INPUT PROGRAM infinite loop" " " 34 at_xfail=no ( $as_echo "266. $at_setup_line: testing $at_desc ..." $at_traceon cat >input-program.sps <<'_ATEOF' INPUT PROGRAM. STRING firstname lastname (a24) / address (a80). END INPUT PROGRAM. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/inpt-pgm.at:59: pspp -O format=csv input-program.sps" at_fn_check_prepare_trace "inpt-pgm.at:59" ( $at_check_trace; pspp -O format=csv input-program.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "input-program.sps:3: error: Input program must contain DATA LIST or END FILE. input-program.sps:4: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/inpt-pgm.at:59" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_266 #AT_START_267 at_fn_group_banner 267 'inpt-pgm.at:69' \ "INPUT PROGRAM with VECTOR and EXECUTE" " " 34 at_xfail=no ( $as_echo "267. $at_setup_line: testing $at_desc ..." $at_traceon cat >input-program.sps <<'_ATEOF' INPUT PROGRAM. VECTOR vec(5). LOOP #c = 1 to 10. LOOP #v = 1 to 5. COMPUTE vec(#v) = #v. END LOOP. END CASE. END LOOP. END FILE. END INPUT PROGRAM. DATASET COPY x. LIST. _ATEOF { set +x $as_echo "$at_srcdir/inpt-pgm.at:84: pspp -O format=csv input-program.sps" at_fn_check_prepare_trace "inpt-pgm.at:84" ( $at_check_trace; pspp -O format=csv input-program.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List vec1,vec2,vec3,vec4,vec5 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/inpt-pgm.at:84" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_267 #AT_START_268 at_fn_group_banner 268 'list.at:19' \ "LIST plain cases" " " 35 at_xfail=no ( $as_echo "268. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 18 1 19 7 20 26 21 76 22 57 23 58 24 38 25 38 26 30 27 21 28 23 _ATEOF cat >list.sps <<'_ATEOF' DATA LIST FILE='data.txt'/avar 1-5 bvar 6-10. WEIGHT BY bvar. LIST. _ATEOF { set +x $as_echo "$at_srcdir/list.at:38: pspp -o pspp.csv list.sps" at_fn_check_prepare_trace "list.at:38" ( $at_check_trace; pspp -o pspp.csv list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:38" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/list.at:39: cat pspp.csv" at_fn_check_prepare_trace "list.at:39" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from \`data.txt'. Variable,Record,Columns,Format avar,1,1- 5,F5.0 bvar,1,6- 10,F5.0 Table: Data List avar,bvar 18,1 19,7 20,26 21,76 22,57 23,58 24,38 25,38 26,30 27,21 28,23 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_268 #AT_START_269 at_fn_group_banner 269 'list.at:61' \ "LIST numbered cases" " " 35 at_xfail=no ( $as_echo "269. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 18 1 19 7 20 26 21 76 22 57 23 58 24 38 25 38 26 30 27 21 28 23 _ATEOF cat >list.sps <<'_ATEOF' DATA LIST FILE='data.txt'/avar 1-5 bvar 6-10. WEIGHT BY bvar. LIST/FORMAT NUMBERED. _ATEOF { set +x $as_echo "$at_srcdir/list.at:80: pspp -o pspp.csv list.sps" at_fn_check_prepare_trace "list.at:80" ( $at_check_trace; pspp -o pspp.csv list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:80" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/list.at:81: cat pspp.csv" at_fn_check_prepare_trace "list.at:81" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from \`data.txt'. Variable,Record,Columns,Format avar,1,1- 5,F5.0 bvar,1,6- 10,F5.0 Table: Data List Case Number,avar,bvar 1,18,1 2,19,7 3,20,26 4,21,76 5,22,57 6,23,58 7,24,38 8,25,38 9,26,30 10,27,21 11,28,23 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:81" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_269 #AT_START_270 at_fn_group_banner 270 'list.at:105' \ "LIST with split file" " " 35 at_xfail=no ( $as_echo "270. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' a 1 a 2 a 3 b 1 c 4 c 5 _ATEOF cat >list.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/s (a1) n. SPLIT FILE BY s. LIST n. _ATEOF { set +x $as_echo "$at_srcdir/list.at:119: pspp -o pspp.csv list.sps" at_fn_check_prepare_trace "list.at:119" ( $at_check_trace; pspp -o pspp.csv list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:119" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/list.at:120: cat pspp.csv" at_fn_check_prepare_trace "list.at:120" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Value,Label s,a, Table: Data List n 1.00 2.00 3.00 Variable,Value,Label s,b, Table: Data List n 1.00 Variable,Value,Label s,c, Table: Data List n 4.00 5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:120" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_270 #AT_START_271 at_fn_group_banner 271 'list.at:147' \ "LIST lots of variables" " " 35 at_xfail=no ( $as_echo "271. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 767532466348513789073483106409 888693089424177542378334186760 492611507909187152726427852242 819848892023195875879332001491 452777898709563729845541516650 239961967077732760663525115073 _ATEOF cat >list.sps <<'_ATEOF' DATA LIST FILE='data.txt' NOTABLE/x01 to x30 1-30. LIST. _ATEOF { set +x $as_echo "$at_srcdir/list.at:160: pspp -o pspp.csv list.sps" at_fn_check_prepare_trace "list.at:160" ( $at_check_trace; pspp -o pspp.csv list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:160" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/list.at:161: cat pspp.csv" at_fn_check_prepare_trace "list.at:161" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x01,x02,x03,x04,x05,x06,x07,x08,x09,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30 7,6,7,5,3,2,4,6,6,3,4,8,5,1,3,7,8,9,0,7,3,4,8,3,1,0,6,4,0,9 8,8,8,6,9,3,0,8,9,4,2,4,1,7,7,5,4,2,3,7,8,3,3,4,1,8,6,7,6,0 4,9,2,6,1,1,5,0,7,9,0,9,1,8,7,1,5,2,7,2,6,4,2,7,8,5,2,2,4,2 8,1,9,8,4,8,8,9,2,0,2,3,1,9,5,8,7,5,8,7,9,3,3,2,0,0,1,4,9,1 4,5,2,7,7,7,8,9,8,7,0,9,5,6,3,7,2,9,8,4,5,5,4,1,5,1,6,6,5,0 2,3,9,9,6,1,9,6,7,0,7,7,7,3,2,7,6,0,6,6,3,5,2,5,1,1,5,0,7,3 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:161" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_271 #AT_START_272 at_fn_group_banner 272 'list.at:173' \ "LIST selected cases" " " 35 at_xfail=no ( $as_echo "272. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 7675324663 8886930894 4926115079 8198488920 4527778987 2399619670 1667799691 1623914684 3681393233 6418731145 2284534083 6617637452 9865713582 1163234537 9981663637 6821567746 0952774952 1641790193 3763182871 2046820753 7970620091 4841176017 6949973797 1396285996 0700489524 _ATEOF cat >list.sps <<'_ATEOF' DATA LIST FILE='data.txt' NOTABLE/x0 to x9 1-10. LIST /CASES=FROM 6 TO 20 BY 5. LIST /CASES=4. LIST /CASES=BY 10. LIST /CASES=FROM 25. LIST /CASES=FROM 26. _ATEOF { set +x $as_echo "$at_srcdir/list.at:209: pspp -o pspp.csv list.sps" at_fn_check_prepare_trace "list.at:209" ( $at_check_trace; pspp -o pspp.csv list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:209" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/list.at:210: cat pspp.csv" at_fn_check_prepare_trace "list.at:210" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 2,3,9,9,6,1,9,6,7,0 2,2,8,4,5,3,4,0,8,3 6,8,2,1,5,6,7,7,4,6 Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 7,6,7,5,3,2,4,6,6,3 8,8,8,6,9,3,0,8,9,4 4,9,2,6,1,1,5,0,7,9 8,1,9,8,4,8,8,9,2,0 Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 7,6,7,5,3,2,4,6,6,3 2,2,8,4,5,3,4,0,8,3 7,9,7,0,6,2,0,0,9,1 Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 0,7,0,0,4,8,9,5,2,4 Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:210" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_272 #AT_START_273 at_fn_group_banner 273 'list.at:241' \ "LIST very long string" " " 35 at_xfail=no ( $as_echo "273. $at_setup_line: testing $at_desc ..." $at_traceon cat >list.sps <<'_ATEOF' INPUT PROGRAM. STRING foo (a2000). + COMPUTE foo=CONCAT(RPAD('A',1999, 'x'), 'Z'). END CASE. END FILE. END INPUT PROGRAM. EXECUTE. DISPLAY VARIABLES. LIST. _ATEOF { set +x $as_echo "$at_srcdir/list.at:256: pspp -o pspp.csv list.sps" at_fn_check_prepare_trace "list.at:256" ( $at_check_trace; pspp -o pspp.csv list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:256" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/list.at:257: cat pspp.csv" at_fn_check_prepare_trace "list.at:257" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position foo,Format: A2000,1 Table: Data List foo AxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxZ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/list.at:257" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_273 #AT_START_274 at_fn_group_banner 274 'list.at:269' \ "LIST crash on invalid input" " " 35 at_xfail=no ( $as_echo "274. $at_setup_line: testing $at_desc ..." $at_traceon cat >list.sps <<'_ATEOF' DATA LIST LIST /`$b. BEGIN DATA. 1 3 4 6 7 9 END DATA. LIST. _ATEOF { set +x $as_echo "$at_srcdir/list.at:282: pspp -o pspp.csv list.sps" at_fn_check_prepare_trace "list.at:282" ( $at_check_trace; pspp -o pspp.csv list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/list.at:282" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_274 #AT_START_275 at_fn_group_banner 275 'match-files.at:120' \ "MATCH FILES -- system file and system file" " " 36 at_xfail=no ( $as_echo "275. $at_setup_line: testing $at_desc ..." $at_traceon cat >data1.txt <<'_ATEOF' 1aB 8aM 3aE 5aG 0aA 5aH 6aI 7aJ 2aD 7aK 1aC 7aL 4aF _ATEOF cat >data2.txt <<'_ATEOF' 1bN 3bO 4bP 6bQ 7bR 9bS _ATEOF cat >prepare.sps <<'_ATEOF' DATA LIST NOTABLE FILE='data1.txt' /a b c 1-3 (A). SAVE OUTFILE='data1.sav'. DATA LIST NOTABLE FILE='data2.txt' /a b c 1-3 (A). SAVE OUTFILE='data2.sav'. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:120: pspp -O format=csv prepare.sps" at_fn_check_prepare_trace "match-files.at:120" ( $at_check_trace; pspp -O format=csv prepare.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:120" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:120: test -f data1.sav && test -f data2.sav" at_fn_check_prepare_trace "match-files.at:120" ( $at_check_trace; test -f data1.sav && test -f data2.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:120" $at_failed && at_fn_log_failure $at_traceon; } cat >expout <<'_ATEOF' Table: Data List a,b,c,d,ina,inb,first,last 0,a,A,,1,0,1,1 1,a,B,N,1,1,1,0 1,a,C,,1,0,0,1 2,a,D,,1,0,1,1 3,a,E,O,1,1,1,1 4,a,F,P,1,1,1,1 5,a,G,,1,0,1,0 5,a,H,,1,0,0,1 6,a,I,Q,1,1,1,1 7,a,J,R,1,1,1,0 7,a,K,,1,0,0,0 7,a,L,,1,0,0,1 8,a,M,,1,0,1,1 9,b,,S,0,1,1,1 _ATEOF cat >match-files.sps <<'_ATEOF' MATCH FILES FILE='data1.sav' /IN=ina /SORT file='data2.sav' /in=inb /rename c=d /BY a /FIRST=first /LAST=last. LIST. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:120: pspp -o pspp.csv match-files.sps" at_fn_check_prepare_trace "match-files.at:120" ( $at_check_trace; pspp -o pspp.csv match-files.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:120" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:120: cat pspp.csv" at_fn_check_prepare_trace "match-files.at:120" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:120" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_275 #AT_START_276 at_fn_group_banner 276 'match-files.at:121' \ "MATCH FILES -- system file and active file" " " 36 at_xfail=no ( $as_echo "276. $at_setup_line: testing $at_desc ..." $at_traceon cat >data1.txt <<'_ATEOF' 1aB 8aM 3aE 5aG 0aA 5aH 6aI 7aJ 2aD 7aK 1aC 7aL 4aF _ATEOF cat >data2.txt <<'_ATEOF' 1bN 3bO 4bP 6bQ 7bR 9bS _ATEOF cat >prepare.sps <<'_ATEOF' DATA LIST NOTABLE FILE='data1.txt' /a b c 1-3 (A). SAVE OUTFILE='data1.sav'. DATA LIST NOTABLE FILE='data2.txt' /a b c 1-3 (A). SAVE OUTFILE='data2.sav'. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:121: pspp -O format=csv prepare.sps" at_fn_check_prepare_trace "match-files.at:121" ( $at_check_trace; pspp -O format=csv prepare.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:121" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:121: test -f data1.sav && test -f data2.sav" at_fn_check_prepare_trace "match-files.at:121" ( $at_check_trace; test -f data1.sav && test -f data2.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:121" $at_failed && at_fn_log_failure $at_traceon; } cat >expout <<'_ATEOF' Table: Data List a,b,c,d,ina,inb,first,last 0,a,A,,1,0,1,1 1,a,B,N,1,1,1,0 1,a,C,,1,0,0,1 2,a,D,,1,0,1,1 3,a,E,O,1,1,1,1 4,a,F,P,1,1,1,1 5,a,G,,1,0,1,0 5,a,H,,1,0,0,1 6,a,I,Q,1,1,1,1 7,a,J,R,1,1,1,0 7,a,K,,1,0,0,0 7,a,L,,1,0,0,1 8,a,M,,1,0,1,1 9,b,,S,0,1,1,1 _ATEOF cat >match-files.sps <<'_ATEOF' GET FILE='data2.sav'. MATCH FILES FILE='data1.sav' /IN=ina /SORT file=* /in=inb /rename c=d /BY a /FIRST=first /LAST=last. LIST. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:121: pspp -o pspp.csv match-files.sps" at_fn_check_prepare_trace "match-files.at:121" ( $at_check_trace; pspp -o pspp.csv match-files.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:121" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:121: cat pspp.csv" at_fn_check_prepare_trace "match-files.at:121" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:121" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_276 #AT_START_277 at_fn_group_banner 277 'match-files.at:122' \ "MATCH FILES -- active file and system file" " " 36 at_xfail=no ( $as_echo "277. $at_setup_line: testing $at_desc ..." $at_traceon cat >data1.txt <<'_ATEOF' 1aB 8aM 3aE 5aG 0aA 5aH 6aI 7aJ 2aD 7aK 1aC 7aL 4aF _ATEOF cat >data2.txt <<'_ATEOF' 1bN 3bO 4bP 6bQ 7bR 9bS _ATEOF cat >prepare.sps <<'_ATEOF' DATA LIST NOTABLE FILE='data1.txt' /a b c 1-3 (A). SAVE OUTFILE='data1.sav'. DATA LIST NOTABLE FILE='data2.txt' /a b c 1-3 (A). SAVE OUTFILE='data2.sav'. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:122: pspp -O format=csv prepare.sps" at_fn_check_prepare_trace "match-files.at:122" ( $at_check_trace; pspp -O format=csv prepare.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:122" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:122: test -f data1.sav && test -f data2.sav" at_fn_check_prepare_trace "match-files.at:122" ( $at_check_trace; test -f data1.sav && test -f data2.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:122" $at_failed && at_fn_log_failure $at_traceon; } cat >expout <<'_ATEOF' Table: Data List a,b,c,d,ina,inb,first,last 0,a,A,,1,0,1,1 1,a,B,N,1,1,1,0 1,a,C,,1,0,0,1 2,a,D,,1,0,1,1 3,a,E,O,1,1,1,1 4,a,F,P,1,1,1,1 5,a,G,,1,0,1,0 5,a,H,,1,0,0,1 6,a,I,Q,1,1,1,1 7,a,J,R,1,1,1,0 7,a,K,,1,0,0,0 7,a,L,,1,0,0,1 8,a,M,,1,0,1,1 9,b,,S,0,1,1,1 _ATEOF cat >match-files.sps <<'_ATEOF' GET FILE='data1.sav'. MATCH FILES FILE=* /IN=ina /SORT file='data2.sav' /in=inb /rename c=d /BY a /FIRST=first /LAST=last. LIST. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:122: pspp -o pspp.csv match-files.sps" at_fn_check_prepare_trace "match-files.at:122" ( $at_check_trace; pspp -o pspp.csv match-files.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:122" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:122: cat pspp.csv" at_fn_check_prepare_trace "match-files.at:122" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:122" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_277 #AT_START_278 at_fn_group_banner 278 'match-files.at:123' \ "MATCH FILES -- system file and system table" " " 36 at_xfail=no ( $as_echo "278. $at_setup_line: testing $at_desc ..." $at_traceon cat >data1.txt <<'_ATEOF' 1aB 8aM 3aE 5aG 0aA 5aH 6aI 7aJ 2aD 7aK 1aC 7aL 4aF _ATEOF cat >data2.txt <<'_ATEOF' 1bN 3bO 4bP 6bQ 7bR 9bS _ATEOF cat >prepare.sps <<'_ATEOF' DATA LIST NOTABLE FILE='data1.txt' /a b c 1-3 (A). SAVE OUTFILE='data1.sav'. DATA LIST NOTABLE FILE='data2.txt' /a b c 1-3 (A). SAVE OUTFILE='data2.sav'. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:123: pspp -O format=csv prepare.sps" at_fn_check_prepare_trace "match-files.at:123" ( $at_check_trace; pspp -O format=csv prepare.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:123" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:123: test -f data1.sav && test -f data2.sav" at_fn_check_prepare_trace "match-files.at:123" ( $at_check_trace; test -f data1.sav && test -f data2.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:123" $at_failed && at_fn_log_failure $at_traceon; } cat >expout <<'_ATEOF' Table: Data List a,b,c,d,ina,inb,first,last 0,a,A,,1,0,1,1 1,a,B,N,1,1,1,0 1,a,C,N,1,1,0,1 2,a,D,,1,0,1,1 3,a,E,O,1,1,1,1 4,a,F,P,1,1,1,1 5,a,G,,1,0,1,0 5,a,H,,1,0,0,1 6,a,I,Q,1,1,1,1 7,a,J,R,1,1,1,0 7,a,K,R,1,1,0,0 7,a,L,R,1,1,0,1 8,a,M,,1,0,1,1 _ATEOF cat >match-files.sps <<'_ATEOF' MATCH FILES FILE='data1.sav' /IN=ina /SORT table='data2.sav' /in=inb /rename c=d /BY a /FIRST=first /LAST=last. LIST. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:123: pspp -o pspp.csv match-files.sps" at_fn_check_prepare_trace "match-files.at:123" ( $at_check_trace; pspp -o pspp.csv match-files.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:123" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:123: cat pspp.csv" at_fn_check_prepare_trace "match-files.at:123" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:123" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_278 #AT_START_279 at_fn_group_banner 279 'match-files.at:124' \ "MATCH FILES -- system file and active table" " " 36 at_xfail=no ( $as_echo "279. $at_setup_line: testing $at_desc ..." $at_traceon cat >data1.txt <<'_ATEOF' 1aB 8aM 3aE 5aG 0aA 5aH 6aI 7aJ 2aD 7aK 1aC 7aL 4aF _ATEOF cat >data2.txt <<'_ATEOF' 1bN 3bO 4bP 6bQ 7bR 9bS _ATEOF cat >prepare.sps <<'_ATEOF' DATA LIST NOTABLE FILE='data1.txt' /a b c 1-3 (A). SAVE OUTFILE='data1.sav'. DATA LIST NOTABLE FILE='data2.txt' /a b c 1-3 (A). SAVE OUTFILE='data2.sav'. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:124: pspp -O format=csv prepare.sps" at_fn_check_prepare_trace "match-files.at:124" ( $at_check_trace; pspp -O format=csv prepare.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:124" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:124: test -f data1.sav && test -f data2.sav" at_fn_check_prepare_trace "match-files.at:124" ( $at_check_trace; test -f data1.sav && test -f data2.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:124" $at_failed && at_fn_log_failure $at_traceon; } cat >expout <<'_ATEOF' Table: Data List a,b,c,d,ina,inb,first,last 0,a,A,,1,0,1,1 1,a,B,N,1,1,1,0 1,a,C,N,1,1,0,1 2,a,D,,1,0,1,1 3,a,E,O,1,1,1,1 4,a,F,P,1,1,1,1 5,a,G,,1,0,1,0 5,a,H,,1,0,0,1 6,a,I,Q,1,1,1,1 7,a,J,R,1,1,1,0 7,a,K,R,1,1,0,0 7,a,L,R,1,1,0,1 8,a,M,,1,0,1,1 _ATEOF cat >match-files.sps <<'_ATEOF' GET FILE='data2.sav'. MATCH FILES FILE='data1.sav' /IN=ina /SORT table=* /in=inb /rename c=d /BY a /FIRST=first /LAST=last. LIST. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:124: pspp -o pspp.csv match-files.sps" at_fn_check_prepare_trace "match-files.at:124" ( $at_check_trace; pspp -o pspp.csv match-files.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:124" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:124: cat pspp.csv" at_fn_check_prepare_trace "match-files.at:124" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:124" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_279 #AT_START_280 at_fn_group_banner 280 'match-files.at:125' \ "MATCH FILES -- active file and system table" " " 36 at_xfail=no ( $as_echo "280. $at_setup_line: testing $at_desc ..." $at_traceon cat >data1.txt <<'_ATEOF' 1aB 8aM 3aE 5aG 0aA 5aH 6aI 7aJ 2aD 7aK 1aC 7aL 4aF _ATEOF cat >data2.txt <<'_ATEOF' 1bN 3bO 4bP 6bQ 7bR 9bS _ATEOF cat >prepare.sps <<'_ATEOF' DATA LIST NOTABLE FILE='data1.txt' /a b c 1-3 (A). SAVE OUTFILE='data1.sav'. DATA LIST NOTABLE FILE='data2.txt' /a b c 1-3 (A). SAVE OUTFILE='data2.sav'. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:125: pspp -O format=csv prepare.sps" at_fn_check_prepare_trace "match-files.at:125" ( $at_check_trace; pspp -O format=csv prepare.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:125" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:125: test -f data1.sav && test -f data2.sav" at_fn_check_prepare_trace "match-files.at:125" ( $at_check_trace; test -f data1.sav && test -f data2.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:125" $at_failed && at_fn_log_failure $at_traceon; } cat >expout <<'_ATEOF' Table: Data List a,b,c,d,ina,inb,first,last 0,a,A,,1,0,1,1 1,a,B,N,1,1,1,0 1,a,C,N,1,1,0,1 2,a,D,,1,0,1,1 3,a,E,O,1,1,1,1 4,a,F,P,1,1,1,1 5,a,G,,1,0,1,0 5,a,H,,1,0,0,1 6,a,I,Q,1,1,1,1 7,a,J,R,1,1,1,0 7,a,K,R,1,1,0,0 7,a,L,R,1,1,0,1 8,a,M,,1,0,1,1 _ATEOF cat >match-files.sps <<'_ATEOF' GET FILE='data1.sav'. MATCH FILES FILE=* /IN=ina /SORT table='data2.sav' /in=inb /rename c=d /BY a /FIRST=first /LAST=last. LIST. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:125: pspp -o pspp.csv match-files.sps" at_fn_check_prepare_trace "match-files.at:125" ( $at_check_trace; pspp -o pspp.csv match-files.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:125" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:125: cat pspp.csv" at_fn_check_prepare_trace "match-files.at:125" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:125" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_280 #AT_START_281 at_fn_group_banner 281 'match-files.at:127' \ "MATCH FILES parallel match" " " 36 at_xfail=no ( $as_echo "281. $at_setup_line: testing $at_desc ..." $at_traceon cat >data1.txt <<'_ATEOF' 1aB 8aM 3aE 5aG 0aA 5aH 6aI 7aJ 2aD 7aK 1aC 7aL 4aF _ATEOF cat >data2.txt <<'_ATEOF' 1bN 3bO 4bP 6bQ 7bR 9bS _ATEOF cat >prepare.sps <<'_ATEOF' DATA LIST NOTABLE FILE='data1.txt' /a b c 1-3 (A). SAVE OUTFILE='data1.sav'. DATA LIST NOTABLE FILE='data2.txt' /a b c 1-3 (A). SAVE OUTFILE='data2.sav'. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:128: pspp -O format=csv prepare.sps" at_fn_check_prepare_trace "match-files.at:128" ( $at_check_trace; pspp -O format=csv prepare.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:128" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:128: test -f data1.sav && test -f data2.sav" at_fn_check_prepare_trace "match-files.at:128" ( $at_check_trace; test -f data1.sav && test -f data2.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:128" $at_failed && at_fn_log_failure $at_traceon; } cat >match-files.sps <<'_ATEOF' MATCH FILES FILE='data1.sav' /FILE='data2.sav' /RENAME (a b c=d e f). LIST. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:133: pspp -o pspp.csv match-files.sps" at_fn_check_prepare_trace "match-files.at:133" ( $at_check_trace; pspp -o pspp.csv match-files.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:133" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:134: cat pspp.csv" at_fn_check_prepare_trace "match-files.at:134" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List a,b,c,d,e,f 1,a,B,1,b,N 8,a,M,3,b,O 3,a,E,4,b,P 5,a,G,6,b,Q 0,a,A,7,b,R 5,a,H,9,b,S 6,a,I,,, 7,a,J,,, 2,a,D,,, 7,a,K,,, 1,a,C,,, 7,a,L,,, 4,a,F,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:134" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_281 #AT_START_282 at_fn_group_banner 282 'match-files.at:154' \ "MATCH FILES bug with TABLE from active dataset" " " 36 at_xfail=no ( $as_echo "282. $at_setup_line: testing $at_desc ..." $at_traceon cat >match-files.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * y *. BEGIN DATA 3 30 2 21 1 22 END DATA. SAVE OUTFILE='bar.sav'. DATA LIST LIST NOTABLE /x * z *. BEGIN DATA 3 8 2 9 END DATA. MATCH FILES TABLE=* /FILE='bar.sav' /BY=x. LIST. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:174: pspp -o pspp.csv match-files.sps" at_fn_check_prepare_trace "match-files.at:174" ( $at_check_trace; pspp -o pspp.csv match-files.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:174" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:175: cat pspp.csv" at_fn_check_prepare_trace "match-files.at:175" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,z,y 3.00,8.00,30.00 2.00,. ,21.00 1.00,. ,22.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:175" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_282 #AT_START_283 at_fn_group_banner 283 'match-files.at:186' \ "MATCH FILES bug with scratch variables" " " 36 at_xfail=no ( $as_echo "283. $at_setup_line: testing $at_desc ..." $at_traceon cat >match-files.sps <<'_ATEOF' DATA LIST LIST /w * x * y * . BEGIN DATA 4 5 6 1 2 3 END DATA. COMPUTE j=0. LOOP #k = 1 to 10. COMPUTE j=#k + j. END LOOP. MATCH FILES FILE=* /DROP=w. LIST. FINISH. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:203: pspp -o pspp.csv match-files.sps" at_fn_check_prepare_trace "match-files.at:203" ( $at_check_trace; pspp -o pspp.csv match-files.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:203" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/match-files.at:204: cat pspp.csv" at_fn_check_prepare_trace "match-files.at:204" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format w,F8.0 x,F8.0 y,F8.0 Table: Data List x,y,j 5.00,6.00,55.00 2.00,3.00,55.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/match-files.at:204" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_283 #AT_START_284 at_fn_group_banner 284 'match-files.at:222' \ "MATCH FILES with incompatible variable types" " " 36 at_xfail=no ( $as_echo "284. $at_setup_line: testing $at_desc ..." $at_traceon cat >match-files.sps <<'_ATEOF' DATA LIST LIST NOTABLE/name (A6) x. BEGIN DATA. al,7 brad,8 carl,9 END DATA. SAVE OUTFILE='x.sav'. DATA LIST LIST NOTABLE/name (A7) y. BEGIN DATA. al,1 carl,2 dan,3 END DATA. MATCH FILES/FILE='x.sav'/FILE=*/BY name. LIST. _ATEOF { set +x $as_echo "$at_srcdir/match-files.at:241: pspp -O format=csv match-files.sps" at_fn_check_prepare_trace "match-files.at:241" ( $at_check_trace; pspp -O format=csv match-files.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"match-files.sps:15: error: MATCH FILES: Variable name in file * has different type or width from the same variable in earlier file. In file *, name is a string variable with width 7. In an earlier file, name was a string variable with width 6.\" match-files.sps:16: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/match-files.at:241" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_284 #AT_START_285 at_fn_group_banner 285 'matrix-data.at:19' \ "Matrix data (lower file)" " " 37 at_xfail=no ( $as_echo "285. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-data.pspp <<'_ATEOF' matrix data variables = rowtype_ var01 TO var08 /format = lower diagonal /file = 'matrix.dat' . list. _ATEOF cat >matrix.dat <<'_ATEOF' mean 24.3 5.4 69.7 20.1 13.4 2.7 27.9 3.7 sd 5.7 1.5 23.5 5.8 2.8 4.5 5.4 1.5 n 92 92 92 92 92 92 92 92 corr 1.00 corr .18 1.00 corr -.22 -.17 1.00 corr .36 .31 -.14 1.00 corr .27 .16 -.12 .22 1.00 corr .33 .15 -.17 .24 .21 1.00 corr .50 .29 -.20 .32 .12 .38 1.00 corr .17 .29 -.05 .20 .27 .20 .04 1.00 _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:47: pspp -O format=csv matrix-data.pspp" at_fn_check_prepare_trace "matrix-data.at:47" ( $at_check_trace; pspp -O format=csv matrix-data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04,var05,var06,var07,var08 mean ,,24.3000,5.4000,69.7000,20.1000,13.4000,2.7000,27.9000,3.7000 STDDEV ,,5.7000,1.5000,23.5000,5.8000,2.8000,4.5000,5.4000,1.5000 n ,,92.0000,92.0000,92.0000,92.0000,92.0000,92.0000,92.0000,92.0000 corr ,var01,1.0000,.1800,-.2200,.3600,.2700,.3300,.5000,.1700 corr ,var02,.1800,1.0000,-.1700,.3100,.1600,.1500,.2900,.2900 corr ,var03,-.2200,-.1700,1.0000,-.1400,-.1200,-.1700,-.2000,-.0500 corr ,var04,.3600,.3100,-.1400,1.0000,.2200,.2400,.3200,.2000 corr ,var05,.2700,.1600,-.1200,.2200,1.0000,.2100,.1200,.2700 corr ,var06,.3300,.1500,-.1700,.2400,.2100,1.0000,.3800,.2000 corr ,var07,.5000,.2900,-.2000,.3200,.1200,.3800,1.0000,.0400 corr ,var08,.1700,.2900,-.0500,.2000,.2700,.2000,.0400,1.0000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/matrix-data.at:47" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_285 #AT_START_286 at_fn_group_banner 286 'matrix-data.at:66' \ "Matrix data (upper)" " " 37 at_xfail=no ( $as_echo "286. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-data.pspp <<'_ATEOF' matrix data variables = rowtype_ var01 var02 var03 var04 /format = upper diagonal. begin data mean 34 35 36 37 sd 22 11 55 66 n_vector 100 101 102 103 corr 1 9 8 7 corr 1 6 5 corr 1 4 corr 1 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:86: pspp -O format=csv matrix-data.pspp" at_fn_check_prepare_trace "matrix-data.at:86" ( $at_check_trace; pspp -O format=csv matrix-data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04 mean ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 N ,,100.0000,101.0000,102.0000,103.0000 corr ,var01,1.0000,9.0000,8.0000,7.0000 corr ,var02,9.0000,1.0000,6.0000,5.0000 corr ,var03,8.0000,6.0000,1.0000,4.0000 corr ,var04,7.0000,5.0000,4.0000,1.0000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/matrix-data.at:86" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_286 #AT_START_287 at_fn_group_banner 287 'matrix-data.at:100' \ "Matrix data (full)" " " 37 at_xfail=no ( $as_echo "287. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-data.pspp <<'_ATEOF' matrix data variables = ROWTYPE_ var01 var02 var03 var04 /format = full diagonal. begin data MEAN 34 35 36 37 SD 22 11 55 66 N 100 101 102 103 CORR 1 9 8 7 CORR 9 1 6 5 CORR 8 6 1 4 CORR 7 5 4 1 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:122: pspp -O format=csv matrix-data.pspp" at_fn_check_prepare_trace "matrix-data.at:122" ( $at_check_trace; pspp -O format=csv matrix-data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04 MEAN ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 N ,,100.0000,101.0000,102.0000,103.0000 CORR ,var01,1.0000,9.0000,8.0000,7.0000 CORR ,var02,9.0000,1.0000,6.0000,5.0000 CORR ,var03,8.0000,6.0000,1.0000,4.0000 CORR ,var04,7.0000,5.0000,4.0000,1.0000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/matrix-data.at:122" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_287 #AT_START_288 at_fn_group_banner 288 'matrix-data.at:137' \ "Matrix data (upper nodiagonal)" " " 37 at_xfail=no ( $as_echo "288. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-data.pspp <<'_ATEOF' matrix data variables = rowtype_ var01 var02 var03 var04 /format = upper nodiagonal. begin data mean 34 35 36 37 sd 22 11 55 66 n 100 101 102 103 corr 9 8 7 corr 6 5 corr 4 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:156: pspp -O format=csv matrix-data.pspp" at_fn_check_prepare_trace "matrix-data.at:156" ( $at_check_trace; pspp -O format=csv matrix-data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04 mean ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 n ,,100.0000,101.0000,102.0000,103.0000 corr ,var01,1.0000,9.0000,8.0000,7.0000 corr ,var02,9.0000,1.0000,6.0000,5.0000 corr ,var03,8.0000,6.0000,1.0000,4.0000 corr ,var04,7.0000,5.0000,4.0000,1.0000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/matrix-data.at:156" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_288 #AT_START_289 at_fn_group_banner 289 'matrix-data.at:171' \ "Matrix data (lower nodiagonal)" " " 37 at_xfail=no ( $as_echo "289. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-data.pspp <<'_ATEOF' matrix data variables = rowtype_ var01 var02 var03 var04 /format = lower nodiagonal. begin data mean 34 35 36 37 sd 22 11 55 66 n 100 101 102 103 corr 9 corr 8 6 corr 7 5 4 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:190: pspp -O format=csv matrix-data.pspp" at_fn_check_prepare_trace "matrix-data.at:190" ( $at_check_trace; pspp -O format=csv matrix-data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04 mean ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 n ,,100.0000,101.0000,102.0000,103.0000 corr ,var01,1.0000,9.0000,8.0000,7.0000 corr ,var02,9.0000,1.0000,6.0000,5.0000 corr ,var03,8.0000,6.0000,1.0000,4.0000 corr ,var04,7.0000,5.0000,4.0000,1.0000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/matrix-data.at:190" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_289 #AT_START_290 at_fn_group_banner 290 'matrix-data.at:206' \ "Matrix data split data" " " 37 at_xfail=no ( $as_echo "290. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-data.pspp <<'_ATEOF' matrix data variables = s1 s2 rowtype_ var01 var02 var03 /split=s1 s2. begin data 8 0 mean 21.4 5.0 72.9 8 0 sd 6.5 1.6 22.8 8 0 n 106 106 106 8 0 corr 1 8 0 corr .41 1 8 0 corr -.16 -.22 1 8 1 mean 11.4 1.0 52.9 8 1 sd 9.5 8.6 12.8 8 1 n 10 11 12 8 1 corr 1 8 1 corr .51 1 8 1 corr .36 -.41 1 end data. display dictionary. list. _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:234: pspp -O format=csv matrix-data.pspp" at_fn_check_prepare_trace "matrix-data.at:234" ( $at_check_trace; pspp -O format=csv matrix-data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position s1,Format: F4.0,1 s2,Format: F4.0,2 ROWTYPE_,Format: A8,3 VARNAME_,Format: A8,4 var01,Format: F10.4,5 var02,Format: F10.4,6 var03,Format: F10.4,7 Table: Data List s1,s2,ROWTYPE_,VARNAME_,var01,var02,var03 8,0,mean ,,21.4000,5.0000,72.9000 8,0,STDDEV ,,6.5000,1.6000,22.8000 8,0,n ,,106.0000,106.0000,106.0000 8,0,corr ,var01,1.0000,.4100,-.1600 8,0,corr ,var02,.4100,1.0000,-.2200 8,0,corr ,var03,-.1600,-.2200,1.0000 8,1,mean ,,11.4000,1.0000,52.9000 8,1,STDDEV ,,9.5000,8.6000,12.8000 8,1,n ,,10.0000,11.0000,12.0000 8,1,corr ,var01,1.0000,.5100,.3600 8,1,corr ,var02,.5100,1.0000,-.4100 8,1,corr ,var03,.3600,-.4100,1.0000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/matrix-data.at:234" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_290 #AT_START_291 at_fn_group_banner 291 'matrix-data.at:265' \ "Matrix data duplicate variable" " " 37 at_xfail=no ( $as_echo "291. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-data.pspp <<'_ATEOF' set decimal = dot . matrix data variables = s1 s1 rowtype_ var01 var02 var03 /split=s1. begin data 0 mean 21.4 5.0 72.9 0 sd 6.5 1.6 22.8 0 n 106 106 106 0 corr 1 0 corr .41 1 0 corr -.16 -.22 1 end data . list. _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:287: pspp -O format=csv matrix-data.pspp" at_fn_check_prepare_trace "matrix-data.at:287" ( $at_check_trace; pspp -O format=csv matrix-data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "matrix-data.pspp:3: error: MATRIX DATA: Variable s1 appears twice in variable list. matrix-data.pspp:6: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/matrix-data.at:287" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_291 #AT_START_292 at_fn_group_banner 292 'matrix-data.at:297' \ "Matrix data - long variable names" " " 37 at_xfail=no ( $as_echo "292. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-data.pspp <<'_ATEOF' matrix data variables = rowtype_ var01 var_two variable_number_three variableFour /format = upper diagonal. begin data mean 34 35 36 37 sd 22 11 55 66 n_vector 100 101 102 103 corr 1 9 8 7 corr 1 6 5 corr 1 4 corr 1 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:317: pspp -O format=csv matrix-data.pspp" at_fn_check_prepare_trace "matrix-data.at:317" ( $at_check_trace; pspp -O format=csv matrix-data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List ROWTYPE_,VARNAME_,var01,var_two,variable_number_three,variableFour mean ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 N ,,100.0000,101.0000,102.0000,103.0000 corr ,var01,1.0000,9.0000,8.0000,7.0000 corr ,var_two,9.0000,1.0000,6.0000,5.0000 corr ,variable_number_three,8.0000,6.0000,1.0000,4.0000 corr ,variableFour,7.0000,5.0000,4.0000,1.0000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/matrix-data.at:317" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_292 #AT_START_293 at_fn_group_banner 293 'matrix-data.at:333' \ "Matrix reader - read integrity" " " 37 at_xfail=no ( $as_echo "293. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-reader.pspp <<'_ATEOF' matrix data variables = rowtype_ var01 to var9 /format = full. begin data n 1 2 3 4 5 6 7 8 9 sd 100 200 300 400 500 600 700 800 900 corr 11 12 13 14 15 16 17 18 19 corr 21 22 23 24 25 26 27 28 29 corr 31 32 33 34 35 36 37 38 39 corr 41 42 43 44 45 46 47 48 49 corr 51 52 53 54 55 56 57 58 59 corr 61 62 63 64 65 66 67 68 69 corr 71 72 73 74 75 76 77 78 79 corr 81 82 83 84 85 86 87 88 89 corr 91 92 93 94 95 96 97 98 99 end data. factor /matrix = in (corr = *) /analysis var02 var04 var06 /method = correlation /rotation = norotate /print correlation. _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:365: pspp -O format=csv matrix-reader.pspp" at_fn_check_prepare_trace "matrix-data.at:365" ( $at_check_trace; pspp -O format=csv matrix-reader.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Correlation Matrix ,,var02,var04,var06 Correlations,var02,22.00,24.00,26.00 ,var04,42.00,44.00,46.00 ,var06,62.00,64.00,66.00 Table: Component Matrix ,Component, ,1,2 var02,6.73,-2.23 var04,6.95,2.15 var06,9.22,.01 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/matrix-data.at:365" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_293 #AT_START_294 at_fn_group_banner 294 'matrix-data.at:383' \ "Matrix data - too many rows" " " 37 at_xfail=no ( $as_echo "294. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-data.pspp <<'_ATEOF' matrix data variables = rowtype_ var01 var02 var03 var04 / format = upper diagonal . begin data mean 21.4 5.0 72.9 17.4 sd 6.5 1.6 22.8 5.7 n 106 106 106 106 corr 1.00 .32 .48 .28 corr 1.00 .72 .54 .44 corr 1.00 .50 .59 .64 corr 1.00 .62 .49 -.30 corr 1.00 .56 -.38 .52 corr 1.00 -.73 .91 .80 corr 1.00 -.65 -.60 corr 1.00 .70 corr 1.00 end data . execute. _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:411: pspp -O format=csv matrix-data.pspp" at_fn_check_prepare_trace "matrix-data.at:411" ( $at_check_trace; pspp -O format=csv matrix-data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "matrix-data.pspp:13: error: MATRIX DATA: There are 4 variable declared but the data has at least 5 matrix rows. matrix-data.pspp:20: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/matrix-data.at:411" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_294 #AT_START_295 at_fn_group_banner 295 'matrix-data.at:423' \ "Matrix data (badly formed)" " " 37 at_xfail=no ( $as_echo "295. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.pspp <<'_ATEOF' data list list /ROWTYPE_ (a8) VARNAME_(a4) v1 v2 v3 v4xxxxxxxxxxxxxxxxxxxxxzzzzzzzzzzzzzxxxxxxxxx. begin data mean "" 1 2 3 4 sd "" 5 6 7 8 n "" 2 3 4 5 corr v1 11 22 33 44 corr v2 55 66 77 88 corr v3 111 222 333 444 corr v4 4 3 21 1 end data. list. factor matrix=in(corr = *) . _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:443: pspp -O format=csv data.pspp" at_fn_check_prepare_trace "matrix-data.at:443" ( $at_check_trace; pspp -O format=csv data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/matrix-data.at:443" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_295 #AT_START_296 at_fn_group_banner 296 'matrix-data.at:450' \ "Matrix data (N subcommand)" " " 37 at_xfail=no ( $as_echo "296. $at_setup_line: testing $at_desc ..." $at_traceon cat >matrix-data.pspp <<'_ATEOF' matrix data variables = rowtype_ var01 var02 var03 var04 /n = 99 /format = upper nodiagonal. begin data mean 34 35 36 37 sd 22 11 55 66 n_vector 1 2 3 4 corr 9 8 7 corr 6 5 corr 4 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/matrix-data.at:469: pspp -O format=csv matrix-data.pspp" at_fn_check_prepare_trace "matrix-data.at:469" ( $at_check_trace; pspp -O format=csv matrix-data.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"matrix-data.pspp:12: warning: MATRIX DATA: The N subcommand was specified, but a N record was also found in the data. The N record will be ignored.\" Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04 N ,,99.0000,99.0000,99.0000,99.0000 mean ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 corr ,var01,1.0000,9.0000,8.0000,7.0000 corr ,var02,9.0000,1.0000,6.0000,5.0000 corr ,var03,8.0000,6.0000,1.0000,4.0000 corr ,var04,7.0000,5.0000,4.0000,1.0000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/matrix-data.at:469" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_296 #AT_START_297 at_fn_group_banner 297 'print-space.at:19' \ "PRINT SPACE without arguments" " " 38 at_xfail=no ( $as_echo "297. $at_setup_line: testing $at_desc ..." $at_traceon cat >print-space.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 1 2 END DATA. PRINT/x. PRINT SPACE. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/print-space.at:30: pspp -O format=csv print-space.sps" at_fn_check_prepare_trace "print-space.at:30" ( $at_check_trace; pspp -O format=csv print-space.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1 2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print-space.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_297 #AT_START_298 at_fn_group_banner 298 'print-space.at:41' \ "PRINT SPACE with number" " " 38 at_xfail=no ( $as_echo "298. $at_setup_line: testing $at_desc ..." $at_traceon cat >print-space.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 1 2 END DATA. PRINT/x. PRINT SPACE 2. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/print-space.at:52: pspp -O format=csv print-space.sps" at_fn_check_prepare_trace "print-space.at:52" ( $at_check_trace; pspp -O format=csv print-space.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1 2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print-space.at:52" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_298 #AT_START_299 at_fn_group_banner 299 'print-space.at:67' \ "PRINT SPACE to file" " " 38 at_xfail=no ( $as_echo "299. $at_setup_line: testing $at_desc ..." $at_traceon cat >print-space.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 1 2 END DATA. PRINT OUTFILE='output.txt'/x. PRINT SPACE OUTFILE='output.txt'. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/print-space.at:79: pspp -O format=csv print-space.sps" at_fn_check_prepare_trace "print-space.at:79" ( $at_check_trace; pspp -O format=csv print-space.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print-space.at:79" $at_failed && at_fn_log_failure \ "output.txt" $at_traceon; } { set +x $as_echo "$at_srcdir/print-space.at:80: cat output.txt" at_fn_check_prepare_trace "print-space.at:80" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 1 2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print-space.at:80" $at_failed && at_fn_log_failure \ "output.txt" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_299 #AT_START_300 at_fn_group_banner 300 'print-space.at:88' \ "PRINT SPACE to file with number" " " 38 at_xfail=no ( $as_echo "300. $at_setup_line: testing $at_desc ..." $at_traceon cat >print-space.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 1 2 END DATA. PRINT OUTFILE='output.txt'/x. PRINT SPACE OUTFILE='output.txt' 2. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/print-space.at:100: pspp -O format=csv print-space.sps" at_fn_check_prepare_trace "print-space.at:100" ( $at_check_trace; pspp -O format=csv print-space.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print-space.at:100" $at_failed && at_fn_log_failure \ "output.txt" $at_traceon; } { set +x $as_echo "$at_srcdir/print-space.at:101: cat output.txt" at_fn_check_prepare_trace "print-space.at:101" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 1 2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print-space.at:101" $at_failed && at_fn_log_failure \ "output.txt" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_300 #AT_START_301 at_fn_group_banner 301 'print.at:36' \ "PRINT numeric variables" " " 39 at_xfail=no ( $as_echo "301. $at_setup_line: testing $at_desc ..." $at_traceon cat >print.sps <<'_ATEOF' data list notable /x y 1-2. begin data. 12 34 6 7 90 end data. print /x y. print eject /x y 1-2. print /x '-' y. print. execute. _ATEOF { set +x $as_echo "$at_srcdir/print.at:54: pspp -O format=csv print.sps" at_fn_check_prepare_trace "print.at:54" ( $at_check_trace; pspp -O format=csv print.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1 2 12 1 -2 3 4 34 3 -4 . 6 .6 . -6 7 . 7. 7 -. 9 0 90 9 -0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:54" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_301 #AT_START_302 at_fn_group_banner 302 'print.at:107' \ "PRINT string variables" " " 39 at_xfail=no ( $as_echo "302. $at_setup_line: testing $at_desc ..." $at_traceon cat >print.sps <<'_ATEOF' DATA LIST FREE /s8 (a8) s10 (a10) vl255 (a255) vl258 (a258). BEGIN DATA. 12345678 AaaaaaaaaZ AbbbbMaryHadALittleLambbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbZ AccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccZ 87654321 AnnnnnnnnZ AmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmZ AoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooWhyIsItSoZ END DATA. print outfile='print.txt' /s10 * vl255 * vl258 *. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/print.at:127: pspp -O format=csv print.sps" at_fn_check_prepare_trace "print.at:127" ( $at_check_trace; pspp -O format=csv print.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:127" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:128: cat print.txt" at_fn_check_prepare_trace "print.at:128" ( $at_check_trace; cat print.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " AaaaaaaaaZ AbbbbMaryHadALittleLambbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbZ AccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccZ AnnnnnnnnZ AmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmZ AoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooWhyIsItSoZ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:128" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_302 #AT_START_303 at_fn_group_banner 303 'print.at:134' \ "PRINT to file" " " 39 at_xfail=no ( $as_echo "303. $at_setup_line: testing $at_desc ..." $at_traceon cat >print.sps <<'_ATEOF' data list notable /x y 1-2. begin data. 12 34 6 7 90 end data. print outfile='print.out' /x y. print eject outfile='print.out' /x y (f1,f1). print outfile='print.out' /x '-' y. print outfile='print.out'. execute. _ATEOF { set +x $as_echo "$at_srcdir/print.at:152: pspp -O format=csv print.sps" at_fn_check_prepare_trace "print.at:152" ( $at_check_trace; pspp -O format=csv print.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:152" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:153: cat print.out" at_fn_check_prepare_trace "print.at:153" ( $at_check_trace; cat print.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 1 2 112 1 -2 3 4 134 3 -4 . 6 1.6 . -6 7 . 17. 7 -. 9 0 190 9 -0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:153" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_303 #AT_START_304 at_fn_group_banner 304 'print.at:179' \ "PRINT crash bug" " " 39 at_xfail=no ( $as_echo "304. $at_setup_line: testing $at_desc ..." $at_traceon cat >print.sps <<'_ATEOF' DATA LIST LIST NOTABLE /a * b *. BEGIN DATA. 1 2 3 4 END DATA. PRINT F8.2 LIST. _ATEOF { set +x $as_echo "$at_srcdir/print.at:190: pspp -O format=csv print.sps" at_fn_check_prepare_trace "print.at:190" ( $at_check_trace; pspp -O format=csv print.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "print.sps:7.7-7.10: error: PRINT: Syntax error at \`F8.2': expecting a valid subcommand. Table: Data List a,b 1.00,2.00 3.00,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/print.at:190" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_304 #AT_START_305 at_fn_group_banner 305 'print.at:200' \ "WRITE to file" " " 39 at_xfail=no ( $as_echo "305. $at_setup_line: testing $at_desc ..." $at_traceon cat >write.sps <<'_ATEOF' data list notable /x y 1-2. begin data. 12 34 6 7 90 end data. write outfile='write.out' /x y. write outfile='write.out' /x y (2(f1)). write outfile='write.out' /x '-' y. write outfile='write.out'. execute. _ATEOF { set +x $as_echo "$at_srcdir/print.at:218: pspp -O format=csv write.sps" at_fn_check_prepare_trace "print.at:218" ( $at_check_trace; pspp -O format=csv write.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:218" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:219: cat write.out" at_fn_check_prepare_trace "print.at:219" ( $at_check_trace; cat write.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "12 12 1-2 34 34 3-4 6 6 -6 7 7 7- 90 90 9-0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:219" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_305 #AT_START_306 at_fn_group_banner 306 'print.at:243' \ "PRINT overwrites file" " " 39 at_xfail=no ( $as_echo "306. $at_setup_line: testing $at_desc ..." $at_traceon cat >output.txt <<'_ATEOF' abcdef _ATEOF cat >print.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. PRINT OUTFILE='output.txt'/x. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/print.at:254: pspp -O format=csv print.sps" at_fn_check_prepare_trace "print.at:254" ( $at_check_trace; pspp -O format=csv print.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:254" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:255: cat output.txt" at_fn_check_prepare_trace "print.at:255" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 5 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:255" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_306 #AT_START_307 at_fn_group_banner 307 'print.at:259' \ "PRINT overwrites file atomically" " " 39 at_xfail=no ( $as_echo "307. $at_setup_line: testing $at_desc ..." $at_traceon cat >output.txt <<'_ATEOF' abcdef _ATEOF cat >print.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. PRINT OUTFILE='output.txt'/x. HOST COMMAND=['kill -TERM $PPID']. _ATEOF { set +x $as_echo "$at_srcdir/print.at:270: pspp -O format=csv print.sps" at_fn_check_prepare_trace "print.at:270" ( $at_check_trace; pspp -O format=csv print.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 143 $at_status "$at_srcdir/print.at:270" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:271: cat output.txt" at_fn_check_prepare_trace "print.at:271" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "abcdef " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:271" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:273: for file in *.tmp*; do if test -e \$file; then echo \$file; exit 1; fi; done" at_fn_check_prepare_dynamic "for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done" "print.at:273" ( $at_check_trace; for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:273" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_307 #AT_START_308 at_fn_group_banner 308 'print.at:277' \ "PRINT to same file being read" " " 39 at_xfail=no ( $as_echo "308. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 5 _ATEOF cat >print.sps <<'_ATEOF' DATA LIST FILE='data.txt' NOTABLE/x 1. COMPUTE y = x + 1. PRINT OUTFILE='data.txt'/y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/print.at:286: pspp -O format=csv print.sps" at_fn_check_prepare_trace "print.at:286" ( $at_check_trace; pspp -O format=csv print.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:286" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:287: cat data.txt" at_fn_check_prepare_trace "print.at:287" ( $at_check_trace; cat data.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 6.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:287" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:289: for file in *.tmp*; do if test -e \$file; then echo \$file; exit 1; fi; done" at_fn_check_prepare_dynamic "for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done" "print.at:289" ( $at_check_trace; for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:289" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_308 #AT_START_309 at_fn_group_banner 309 'print.at:293' \ "PRINT to special file" " " 39 at_xfail=no ( $as_echo "309. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "print.at:294" >"$at_check_line_file" (test ! -c /dev/null) \ && at_fn_check_skip 77 "$at_srcdir/print.at:294" { set +x $as_echo "$at_srcdir/print.at:295: ln -s /dev/null foo.out || exit 77" at_fn_check_prepare_trace "print.at:295" ( $at_check_trace; ln -s /dev/null foo.out || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:295" $at_failed && at_fn_log_failure $at_traceon; } $as_echo "print.at:296" >"$at_check_line_file" (test ! -c foo.out) \ && at_fn_check_skip 77 "$at_srcdir/print.at:296" cat >print.sps <<'_ATEOF' DATA LIST NOTABLE /x 1. BEGIN DATA. 1 2 3 4 5 END DATA. PRINT OUTFILE='foo.out'/x. PRINT OUTFILE='foo2.out'/x. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/print.at:310: pspp -O format=csv print.sps" at_fn_check_prepare_trace "print.at:310" ( $at_check_trace; pspp -O format=csv print.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:310" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:311: cat foo2.out" at_fn_check_prepare_trace "print.at:311" ( $at_check_trace; cat foo2.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 1 2 3 4 5 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:311" $at_failed && at_fn_log_failure $at_traceon; } ls -l foo.out foo2.out { set +x $as_echo "$at_srcdir/print.at:319: test -c foo.out" at_fn_check_prepare_trace "print.at:319" ( $at_check_trace; test -c foo.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:319" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_309 #AT_START_310 at_fn_group_banner 310 'print.at:322' \ "PRINT with special line ends" " " 39 at_xfail=no ( $as_echo "310. $at_setup_line: testing $at_desc ..." $at_traceon cat >print.sps <<'_ATEOF' FILE HANDLE lf /NAME='lf.txt' /ENDS=LF. FILE HANDLE crlf /NAME='crlf.txt' /ENDS=CRLF. DATA LIST NOTABLE /x 1. BEGIN DATA. 1 2 3 4 5 END DATA. PRINT OUTFILE=lf/x. PRINT OUTFILE=crlf/x. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/print.at:338: pspp -O format=csv print.sps" at_fn_check_prepare_trace "print.at:338" ( $at_check_trace; pspp -O format=csv print.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:338" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:339: cat lf.txt" at_fn_check_prepare_trace "print.at:339" ( $at_check_trace; cat lf.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 1 2 3 4 5 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:339" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/print.at:346: tr '\\r' R < crlf.txt" at_fn_check_prepare_trace "print.at:346" ( $at_check_trace; tr '\r' R < crlf.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 1 R 2 R 3 R 4 R 5 R " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/print.at:346" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_310 #AT_START_311 at_fn_group_banner 311 'save.at:19' \ "IMPORT and EXPORT" " " 40 at_xfail=no ( $as_echo "311. $at_setup_line: testing $at_desc ..." $at_traceon cat >import-export.sps <<'_ATEOF' DATA LIST LIST NOTABLE /X Y. BEGIN DATA. 1 2 3 . 5 6 END DATA. EXPORT /OUTFILE='wiz.por'. IMPORT /FILE='wiz.por'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/save.at:33: pspp -o pspp.csv import-export.sps" at_fn_check_prepare_trace "save.at:33" ( $at_check_trace; pspp -o pspp.csv import-export.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save.at:33" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/save.at:34: cat pspp.csv" at_fn_check_prepare_trace "save.at:34" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List X,Y 1.00,2.00 3.00,. 5.00,6.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_311 #AT_START_312 at_fn_group_banner 312 'save.at:47' \ "SAVE -- delete unselected" " " 41 at_xfail=no ( $as_echo "312. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1 1.625,'0 12:00',,,xyzzy,1 _ATEOF cat >save.pspp <<'_ATEOF' SET DECIMAL=DOT. DATA LIST LIST NOTABLE FILE="data.txt" /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8) filter(F1.0). MISSING VALUES number(0) time('0 12:00') string('xyzzy'). FILTER BY filter. SAVE /OUTFILE="data.sav" /UNSELECTED=DELETE. _ATEOF cat >get.pspp <<'_ATEOF' GET FILE='data.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/save.at:66: pspp -O format=csv save.pspp" at_fn_check_prepare_trace "save.at:66" ( $at_check_trace; pspp -O format=csv save.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save.at:66" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/save.at:67: pspp -O format=csv get.pspp" at_fn_check_prepare_trace "save.at:67" ( $at_check_trace; pspp -O format=csv get.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List number,time,date,datetime,string,filter . ,-0 05:17,10/31/2010,09-APR-2008 09:29:00,xxx ,1 1.625,0 12:00:00,.,.,xyzzy ,1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save.at:67" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_312 #AT_START_313 at_fn_group_banner 313 'save-translate.at:39' \ "CSV output -- defaults" " " 42 at_xfail=no ( $as_echo "313. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1 1.625,'0 12:00',,,xyzzy,1 _ATEOF cat >save-translate.pspp <<'_ATEOF' SET DECIMAL=DOT. DATA LIST LIST NOTABLE FILE="data.txt" /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8) filter(F1.0). MISSING VALUES number(0) time('0 12:00') string('xyzzy'). FILTER BY filter. SAVE TRANSLATE /OUTFILE="data.csv" /TYPE=CSV . _ATEOF { set +x $as_echo "$at_srcdir/save-translate.at:40: pspp -O format=csv save-translate.pspp" at_fn_check_prepare_trace "save-translate.at:40" ( $at_check_trace; pspp -O format=csv save-translate.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:40" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/save-translate.at:41: cat data.csv" at_fn_check_prepare_trace "save-translate.at:41" ( $at_check_trace; cat data.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "0,33:30:05,01/02/2003,08/25/1995 15:30:00,\"'a,b,c'\",0 ,-05:17:00,10/31/2010,04/09/2008 09:29:00, xxx,1 1.625,12:00:00, , ,xyzzy,1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:41" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_313 #AT_START_314 at_fn_group_banner 314 'save-translate.at:48' \ "CSV output -- recode missing, delete unselected" "" 42 at_xfail=no ( $as_echo "314. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1 1.625,'0 12:00',,,xyzzy,1 _ATEOF cat >save-translate.pspp <<'_ATEOF' SET DECIMAL=DOT. DATA LIST LIST NOTABLE FILE="data.txt" /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8) filter(F1.0). MISSING VALUES number(0) time('0 12:00') string('xyzzy'). FILTER BY filter. SAVE TRANSLATE /OUTFILE="data.csv" /TYPE=CSV /MISSING=RECODE /UNSELECTED=DELETE. _ATEOF { set +x $as_echo "$at_srcdir/save-translate.at:49: pspp -O format=csv save-translate.pspp" at_fn_check_prepare_trace "save-translate.at:49" ( $at_check_trace; pspp -O format=csv save-translate.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:49" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/save-translate.at:50: cat data.csv" at_fn_check_prepare_trace "save-translate.at:50" ( $at_check_trace; cat data.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " ,-05:17:00,10/31/2010,04/09/2008 09:29:00, xxx,1 1.625, , , ,,1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:50" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_314 #AT_START_315 at_fn_group_banner 315 'save-translate.at:56' \ "CSV output -- var names, formats" " " 42 at_xfail=no ( $as_echo "315. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1 1.625,'0 12:00',,,xyzzy,1 _ATEOF cat >save-translate.pspp <<'_ATEOF' SET DECIMAL=DOT. DATA LIST LIST NOTABLE FILE="data.txt" /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8) filter(F1.0). MISSING VALUES number(0) time('0 12:00') string('xyzzy'). FILTER BY filter. SAVE TRANSLATE /OUTFILE="data.csv" /TYPE=CSV /FIELDNAMES /TEXTOPTIONS FORMAT=VARIABLE /UNSELECTED=RETAIN. _ATEOF { set +x $as_echo "$at_srcdir/save-translate.at:57: pspp -O format=csv save-translate.pspp" at_fn_check_prepare_trace "save-translate.at:57" ( $at_check_trace; pspp -O format=csv save-translate.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:57" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/save-translate.at:59: cat data.csv" at_fn_check_prepare_trace "save-translate.at:59" ( $at_check_trace; cat data.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "number,time,date,datetime,string,filter .000,1 09:30:05,01/02/2003,25-AUG-1995 15:30:00,\"'a,b,c'\",0 ,-0 05:17,10/31/2010,09-APR-2008 09:29:00, xxx,1 1.625,0 12:00:00, , ,xyzzy,1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:59" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_315 #AT_START_316 at_fn_group_banner 316 'save-translate.at:67' \ "CSV output -- comma as decimal point" " " 42 at_xfail=no ( $as_echo "316. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1 1.625,'0 12:00',,,xyzzy,1 _ATEOF cat >save-translate.pspp <<'_ATEOF' SET DECIMAL=DOT. DATA LIST LIST NOTABLE FILE="data.txt" /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8) filter(F1.0). MISSING VALUES number(0) time('0 12:00') string('xyzzy'). FILTER BY filter. SAVE TRANSLATE /OUTFILE="data.csv" /TYPE=CSV /FIELDNAMES /TEXTOPTIONS DECIMAL=COMMA. _ATEOF { set +x $as_echo "$at_srcdir/save-translate.at:68: pspp -O format=csv save-translate.pspp" at_fn_check_prepare_trace "save-translate.at:68" ( $at_check_trace; pspp -O format=csv save-translate.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:68" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/save-translate.at:69: cat data.csv" at_fn_check_prepare_trace "save-translate.at:69" ( $at_check_trace; cat data.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "number;time;date;datetime;string;filter 0;33:30:05;01/02/2003;08/25/1995 15:30:00;'a,b,c';0 ;-05:17:00;10/31/2010;04/09/2008 09:29:00; xxx;1 1,625;12:00:00; ; ;xyzzy;1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:69" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_316 #AT_START_317 at_fn_group_banner 317 'save-translate.at:77' \ "CSV output -- custom delimiter, qualifier" " " 42 at_xfail=no ( $as_echo "317. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1 1.625,'0 12:00',,,xyzzy,1 _ATEOF cat >save-translate.pspp <<'_ATEOF' SET DECIMAL=DOT. DATA LIST LIST NOTABLE FILE="data.txt" /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8) filter(F1.0). MISSING VALUES number(0) time('0 12:00') string('xyzzy'). FILTER BY filter. SAVE TRANSLATE /OUTFILE="data.csv" /TYPE=CSV /FIELDNAMES /TEXTOPTIONS DELIMITER=':' QUALIFIER="'". _ATEOF { set +x $as_echo "$at_srcdir/save-translate.at:78: pspp -O format=csv save-translate.pspp" at_fn_check_prepare_trace "save-translate.at:78" ( $at_check_trace; pspp -O format=csv save-translate.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:78" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/save-translate.at:80: cat data.csv" at_fn_check_prepare_trace "save-translate.at:80" ( $at_check_trace; cat data.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "number:time:date:datetime:string:filter 0:'33:30:05':01/02/2003:'08/25/1995 15:30:00':'''a,b,c''':0 :'-05:17:00':10/31/2010:'04/09/2008 09:29:00': xxx:1 1.625:'12:00:00': : :xyzzy:1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:80" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_317 #AT_START_318 at_fn_group_banner 318 'save-translate.at:88' \ "CSV output -- KEEP, RENAME" " " 42 at_xfail=no ( $as_echo "318. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1 1.625,'0 12:00',,,xyzzy,1 _ATEOF cat >save-translate.pspp <<'_ATEOF' SET DECIMAL=DOT. DATA LIST LIST NOTABLE FILE="data.txt" /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8) filter(F1.0). MISSING VALUES number(0) time('0 12:00') string('xyzzy'). FILTER BY filter. SAVE TRANSLATE /OUTFILE="data.csv" /TYPE=CSV /FIELDNAMES /KEEP=time string /RENAME string=name /UNSELECTED=DELETE. _ATEOF { set +x $as_echo "$at_srcdir/save-translate.at:89: pspp -O format=csv save-translate.pspp" at_fn_check_prepare_trace "save-translate.at:89" ( $at_check_trace; pspp -O format=csv save-translate.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:89" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/save-translate.at:91: cat data.csv" at_fn_check_prepare_trace "save-translate.at:91" ( $at_check_trace; cat data.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "time,name -05:17:00, xxx 12:00:00,xyzzy " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:91" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_318 #AT_START_319 at_fn_group_banner 319 'save-translate.at:100' \ "TAB output" " " 43 at_xfail=no ( $as_echo "319. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1 1.625,'0 12:00',,,xyzzy,1 _ATEOF cat >save-translate.pspp <<'_ATEOF' SET DECIMAL=DOT. DATA LIST LIST NOTABLE FILE="data.txt" /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8) filter(F1.0). MISSING VALUES number(0) time('0 12:00') string('xyzzy'). FILTER BY filter. SAVE TRANSLATE /OUTFILE="data.csv" /TYPE=TAB /FIELDNAMES. _ATEOF { set +x $as_echo "$at_srcdir/save-translate.at:101: pspp -O format=csv save-translate.pspp" at_fn_check_prepare_trace "save-translate.at:101" ( $at_check_trace; pspp -O format=csv save-translate.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:101" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/save-translate.at:102: cat data.csv" at_fn_check_prepare_trace "save-translate.at:102" ( $at_check_trace; cat data.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "number time date datetime string filter 0 33:30:05 01/02/2003 08/25/1995 15:30:00 'a,b,c' 0 -05:17:00 10/31/2010 04/09/2008 09:29:00 xxx 1 1.625 12:00:00 xyzzy 1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/save-translate.at:102" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_319 #AT_START_320 at_fn_group_banner 320 'attributes.at:19' \ "VARIABLE ATTRIBUTES and DATAFILE ATTRIBUTES" " " 45 at_xfail=no ( $as_echo "320. $at_setup_line: testing $at_desc ..." $at_traceon cat >save-attrs.pspp <<'_ATEOF' DATA LIST FREE/a b c. BEGIN DATA. 1 2 3 END DATA. DATAFILE ATTRIBUTE ATTRIBUTE=key('value') array('array element 1') Array[2]('array element 2'). VARIABLE ATTRIBUTE VARIABLES=a b ATTRIBUTE=ValidationRule[2]("a + b > 2") ValidationRule[1]('a * b > 3') /VARIABLES=c ATTRIBUTE=QuestionWording('X or Y?'). DISPLAY ATTRIBUTES. SAVE OUTFILE='attributes.sav'. _ATEOF cat >get-attrs.pspp <<'_ATEOF' GET FILE='attributes.sav'. DATAFILE ATTRIBUTE DELETE=Array[1] Array[2]. VARIABLE ATTRIBUTE VARIABLES=a DELETE=ValidationRule /VARIABLE=b DELETE=validationrule[2]. DISPLAY ATTRIBUTES. _ATEOF { set +x $as_echo "$at_srcdir/attributes.at:53: pspp -O format=csv save-attrs.pspp" at_fn_check_prepare_trace "attributes.at:53" ( $at_check_trace; pspp -O format=csv save-attrs.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description a,\"Attribute,Value ValidationRule[1],a * b > 3 ValidationRule[2],a + b > 2\" b,\"Attribute,Value ValidationRule[1],a * b > 3 ValidationRule[2],a + b > 2\" c,\"Attribute,Value QuestionWording,X or Y?\" Table: Custom data file attributes. Attribute,Value array[1],array element 1 array[2],array element 2 key,value " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/attributes.at:53" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/attributes.at:70: pspp -O format=csv get-attrs.pspp" at_fn_check_prepare_trace "attributes.at:70" ( $at_check_trace; pspp -O format=csv get-attrs.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description a, b,\"Attribute,Value ValidationRule,a * b > 3\" c,\"Attribute,Value QuestionWording,X or Y?\" Table: Custom data file attributes. Attribute,Value array,array element 2 key,value " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/attributes.at:70" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_320 #AT_START_321 at_fn_group_banner 321 'delete-variables.at:20' \ "DELETE VARIABLES with FILTER" " " 46 at_xfail=no ( $as_echo "321. $at_setup_line: testing $at_desc ..." $at_traceon cat >delete-variables.sps <<'_ATEOF' DATA LIST LIST /a b. BEGIN DATA. 1 3 4 6 7 9 END DATA. FILTER BY b. DELETE VARIABLES a. LIST. _ATEOF { set +x $as_echo "$at_srcdir/delete-variables.at:33: pspp -O format=csv delete-variables.sps" at_fn_check_prepare_trace "delete-variables.at:33" ( $at_check_trace; pspp -O format=csv delete-variables.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format a,F8.0 b,F8.0 Table: Data List b 3.00 6.00 9.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/delete-variables.at:33" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_321 #AT_START_322 at_fn_group_banner 322 'formats.at:19' \ "FORMATS positive tests" " " 47 at_xfail=no ( $as_echo "322. $at_setup_line: testing $at_desc ..." $at_traceon cat >formats.sps <<'_ATEOF' DATA LIST LIST /a b c * x (A1) y (A2) z (A3). DISPLAY VARIABLES. FORMATS /a (COMMA10) b (N4). DISPLAY VARIABLES. FORMATS c (E8.1) x (A1) /y (AHEX4) z (A3). DISPLAY VARIABLES. _ATEOF { set +x $as_echo "$at_srcdir/formats.at:28: pspp -o pspp.csv formats.sps" at_fn_check_prepare_trace "formats.at:28" ( $at_check_trace; pspp -o pspp.csv formats.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/formats.at:28" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/formats.at:29: grep -E -v 'Measure|Display' pspp.csv" at_fn_check_prepare_notrace 'a shell pipeline' "formats.at:29" ( $at_check_trace; grep -E -v 'Measure|Display' pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format a,F8.0 b,F8.0 c,F8.0 x,A1 y,A2 z,A3 Variable,Description,Position a,Format: F8.2,1 b,Format: F8.2,2 c,Format: F8.2,3 x,Format: A1,4 y,Format: A2,5 z,Format: A3,6 Variable,Description,Position a,Format: COMMA10.0,1 b,Format: N4.0,2 c,Format: F8.2,3 x,Format: A1,4 y,Format: A2,5 z,Format: A3,6 Variable,Description,Position a,Format: COMMA10.0,1 b,Format: N4.0,2 c,Format: E8.1,3 x,Format: A1,4 y,Format: AHEX4,5 z,Format: A3,6 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/formats.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_322 #AT_START_323 at_fn_group_banner 323 'formats.at:65' \ "FORMATS negative tests" " " 47 at_xfail=no ( $as_echo "323. $at_setup_line: testing $at_desc ..." $at_traceon cat >formats.sps <<'_ATEOF' DATA LIST LIST /a b c * x (A1) y (A2) z (A3). FORMATS a (E6.1). FORMATS a y (F4). FORMATS x (A2). FORMATS y (AHEX2). FORMATS x y (A2). _ATEOF { set +x $as_echo "$at_srcdir/formats.at:74: pspp -O format=csv formats.sps" at_fn_check_prepare_trace "formats.at:74" ( $at_check_trace; pspp -O format=csv formats.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format a,F8.0 b,F8.0 c,F8.0 x,A1 y,A2 z,A3 \"formats.sps:2: error: FORMATS: Output format E6.1 specifies 1 decimal place, but the given width does not allow for any decimals.\" formats.sps:3: error: FORMATS: a and y are not the same type. All variables in this variable list must be of the same type. y will be omitted from the list. formats.sps:4: error: FORMATS: String variable with width 1 is not compatible with format A2. formats.sps:5: error: FORMATS: String variable with width 2 is not compatible with format AHEX2. formats.sps:6: error: FORMATS: x and y are string variables with different widths. All variables in this variable list must have the same width. y will be omitted from the list. formats.sps:6: error: FORMATS: String variable with width 1 is not compatible with format A2. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/formats.at:74" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_323 #AT_START_324 at_fn_group_banner 324 'missing-values.at:19' \ "MISSING VALUES valid cases" " " 48 at_xfail=no ( $as_echo "324. $at_setup_line: testing $at_desc ..." $at_traceon cat >missing-values.sps <<'_ATEOF' DATA LIST NOTABLE/str1 1-5 (A) str2 6-8 (A) date1 9-19 (DATE) num1 20-25 longstr 26-36 (A). * Numeric missing values. MISSING VALUES date1 num1 (1). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 (1, 2). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 (1, 2, 3). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 (9999998, 9999984, 3). DISPLAY DICTIONARY date1 num1. * Numeric missing values using the first variable's format. MISSING VALUES num1 date1 ('1'). DISPLAY DICTIONARY date1 num1. MISSING VALUES num1 date1 ('1', '2'). DISPLAY DICTIONARY date1 num1. MISSING VALUES num1 date1 ('1', '2', '3'). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 ('06-AUG-05'). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 ('06-AUG-05', '01-OCT-78'). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 ('06-AUG-05', '01-OCT-78', '14-FEB-81'). DISPLAY DICTIONARY date1 num1. * Ranges of numeric missing values. MISSING VALUES num1 (1 THRU 2). DISPLAY DICTIONARY num1. MISSING VALUES num1 (LO THRU 2). DISPLAY DICTIONARY num1. MISSING VALUES num1 (LOWEST THRU 2). DISPLAY DICTIONARY num1. MISSING VALUES num1 (1 THRU HI). DISPLAY DICTIONARY num1. MISSING VALUES num1 (1 THRU HIGHEST). DISPLAY DICTIONARY num1. * A range of numeric missing values, plus an individual value. MISSING VALUES num1 (1 THRU 2, 3). DISPLAY DICTIONARY num1. MISSING VALUES num1 (LO THRU 2, 3). DISPLAY DICTIONARY num1. MISSING VALUES num1 (LOWEST THRU 2, 3). DISPLAY DICTIONARY num1. MISSING VALUES num1 (1 THRU HI, -1). DISPLAY DICTIONARY num1. MISSING VALUES num1 (1 THRU HIGHEST, -1). DISPLAY DICTIONARY num1. * String missing values. MISSING VALUES str1 str2 longstr ('abc ','def'). DISPLAY DICTIONARY str1 str2 longstr. * May mix variable types when clearing missing values. MISSING VALUES ALL (). DISPLAY DICTIONARY _ATEOF { set +x $as_echo "$at_srcdir/missing-values.at:80: pspp -o pspp.csv missing-values.sps" at_fn_check_prepare_trace "missing-values.at:80" ( $at_check_trace; pspp -o pspp.csv missing-values.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/missing-values.at:80" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/missing-values.at:81: sed -n '/^\$/p; /^[^\"]*\"[^\"]*\$/N; s/^\\([a-z0-9]*\\),\".*Missing Values: \\(.*\\)\",[0-9]*\$/\\1: \\2/p; s/^\\([a-z0-9]*\\),Format: [A-Z0-9.]*,[0-9]*\$/\\1: none/p' pspp.csv " at_fn_check_prepare_notrace 'an embedded newline' "missing-values.at:81" ( $at_check_trace; sed -n '/^$/p; /^[^"]*"[^"]*$/N; s/^\([a-z0-9]*\),".*Missing Values: \(.*\)",[0-9]*$/\1: \2/p; s/^\([a-z0-9]*\),Format: [A-Z0-9.]*,[0-9]*$/\1: none/p' pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "date1: 1 num1: 1 date1: 1; 2 num1: 1; 2 date1: 1; 2; 3 num1: 1; 2; 3 date1: 9999998; 9999984; 3 num1: 9999998; 9999984; 3 date1: 1 num1: 1 date1: 1; 2 num1: 1; 2 date1: 1; 2; 3 num1: 1; 2; 3 date1: 13342665600 num1: 13342665600 date1: 13342665600; 12495427200 num1: 13342665600; 12495427200 date1: 13342665600; 12495427200; 12570336000 num1: 13342665600; 12495427200; 12570336000 num1: 1 THRU 2 num1: LOWEST THRU 2 num1: LOWEST THRU 2 num1: 1 THRU HIGHEST num1: 1 THRU HIGHEST num1: 1 THRU 2; 3 num1: LOWEST THRU 2; 3 num1: LOWEST THRU 2; 3 num1: 1 THRU HIGHEST; -1 num1: 1 THRU HIGHEST; -1 str1: \"\"abc \"\"; \"\"def \"\" str2: \"\"abc\"\"; \"\"def\"\" longstr: \"\"abc \"\"; \"\"def \"\" str1: none str2: none date1: none num1: none longstr: none " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/missing-values.at:81" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_324 #AT_START_325 at_fn_group_banner 325 'missing-values.at:145' \ "MISSING VALUES invalid cases" " " 48 at_xfail=no ( $as_echo "325. $at_setup_line: testing $at_desc ..." $at_traceon cat >missing-values.sps <<'_ATEOF' DATA LIST NOTABLE/str1 1-5 (A) str2 6-8 (A) date1 9-19 (DATE) num1 20-25 longstr 26-36 (A). * Too long for str2. MISSING VALUES str1 str2 longstr ('abcde'). * Long string missing value longer than 8 bytes. MISSING VALUES longstr ('abcdefghijk'). * No string ranges. MISSING VALUES str1 ('a' THRU 'z'). * Mixing string and numeric variables. MISSING VALUES str1 num1 ('123'). * Too many values. MISSING VALUES num1 (1, 2, 3, 4). MISSING VALUES num1 (1 THRU 2, 3 THRU 4). MISSING VALUES num1 (1, 2 THRU 3, 4). MISSING VALUES str1 ('abc', 'def', 'ghi', 'jkl'). * Bad range. MISSING VALUES num1 (2 THRU 1). _ATEOF { set +x $as_echo "$at_srcdir/missing-values.at:171: pspp -O format=csv missing-values.sps" at_fn_check_prepare_trace "missing-values.at:171" ( $at_check_trace; pspp -O format=csv missing-values.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "missing-values.sps:5: error: MISSING VALUES: Missing values provided are too long to assign to variable of width 3. missing-values.sps:8: error: MISSING VALUES: Truncating missing value to maximum acceptable length (8 bytes). missing-values.sps:11.26-11.29: error: MISSING VALUES: Syntax error at \`THRU': expecting string. missing-values.sps:11: error: MISSING VALUES: THRU is not a variable name. missing-values.sps:14: error: MISSING VALUES: Cannot mix numeric variables (e.g. num1) and string variables (e.g. str1) within a single list. missing-values.sps:17: error: MISSING VALUES: Too many numeric missing values. At most three individual values or one value and one range are allowed. missing-values.sps:18: error: MISSING VALUES: Too many numeric missing values. At most three individual values or one value and one range are allowed. missing-values.sps:19: error: MISSING VALUES: Too many numeric missing values. At most three individual values or one value and one range are allowed. missing-values.sps:20: error: MISSING VALUES: Too many string missing values. At most three individual values are allowed. missing-values.sps:23: warning: MISSING VALUES: The high end of the range (1) is below the low end (2). The range will be treated as if reversed. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/missing-values.at:171" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_325 #AT_START_326 at_fn_group_banner 326 'mrsets.at:137' \ "MRSETS add, display, delete" " " 49 at_xfail=no ( $as_echo "326. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. VARIABLE LABEL w 'duplicate variable label' x 'Variable x' z 'Duplicate variable label'. VALUE LABELS /w 1 'w value 1' /y 1 'duplicate Value label' /z 1 'duplicate value Label' /a b c d 'a' 'burger' 'b' 'fries' 'c' 'shake' 'd' 'taco'. ADD VALUE LABELS /b 'b' 'Fries' /c 'b' 'XXX'. MRSETS /MDGROUP NAME=$a LABEL='First multiple dichotomy group' CATEGORYLABELS=VARLABELS VARIABLES=w x y z VALUE=5 /MDGROUP NAME=$b CATEGORYLABELS=COUNTEDVALUES VARIABLES=z y VALUE=123 /MDGROUP NAME=$c LABELSOURCE=VARLABEL CATEGORYLABELS=COUNTEDVALUES VARIABLES=w x y z VALUE=1 /MDGROUP NAME=$d LABELSOURCE=VARLABEL VARIABLES=a b c d VALUE='c' /MCGROUP NAME=$e LABEL='First multiple category group' VARIABLES=w x y z /MCGROUP NAME=$f VARIABLES=a b c d. MRSETS /DISPLAY NAME=[$a] /DISPLAY NAME=ALL /DELETE NAME=[$c] /DISPLAY NAME=ALL /DELETE NAME=ALL /DISPLAY NAME=ALL. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:148: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:148" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "mrsets.sps:25: warning: MRSETS: Variables w and z specified as part of multiple dichotomy group \$a have the same variable label. Categories represented by these variables will not be distinguishable in output. mrsets.sps:29: warning: MRSETS: Variable z specified as part of multiple dichotomy group \$b (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value. This category will not be distinguishable in output. mrsets.sps:29: warning: MRSETS: Variable y specified as part of multiple dichotomy group \$b (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value. This category will not be distinguishable in output. mrsets.sps:34: warning: MRSETS: Variable x specified as part of multiple dichotomy group \$c (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value. This category will not be distinguishable in output. mrsets.sps:34: warning: MRSETS: Variables y and z specified as part of multiple dichotomy group \$c (which has CATEGORYLABELS=COUNTEDVALUES) have the same value label for the group's counted value. These categories will not be distinguishable in output. mrsets.sps:38: warning: MRSETS: MDGROUP subcommand for group \$d specifies LABELSOURCE=VARLABEL but not CATEGORYLABELS=COUNTEDVALUES. Ignoring LABELSOURCE. \"mrsets.sps:41: warning: MRSETS: Variables specified on MCGROUP should have the same categories, but w and y (and possibly others) in multiple category group \$e have different value labels for value 1.\" \"mrsets.sps:42: warning: MRSETS: Variables specified on MCGROUP should have the same categories, but a and c (and possibly others) in multiple category group \$f have different value labels for value b.\" Table: Multiple Response Sets Name,Variables,Details \$a,\"w x y z \",\"Multiple dichotomy set Label: First multiple dichotomy group Label source: Provided by user Counted value: 5 Category label source: Variable labels \" Table: Multiple Response Sets Name,Variables,Details \$a,\"w x y z \",\"Multiple dichotomy set Label: First multiple dichotomy group Label source: Provided by user Counted value: 5 Category label source: Variable labels \" \$b,\"z y \",\"Multiple dichotomy set Counted value: 123 Category label source: Value labels of counted value \" \$c,\"w x y z \",\"Multiple dichotomy set Label: duplicate variable label Label source: First variable label among variables Counted value: 1 Category label source: Value labels of counted value \" \$d,\"a b c d \",\"Multiple dichotomy set Counted value: \`c' Category label source: Variable labels \" \$e,\"w x y z \",\"Multiple category set Label: First multiple category group \" \$f,\"a b c d \",\"Multiple category set \" Table: Multiple Response Sets Name,Variables,Details \$a,\"w x y z \",\"Multiple dichotomy set Label: First multiple dichotomy group Label source: Provided by user Counted value: 5 Category label source: Variable labels \" \$b,\"z y \",\"Multiple dichotomy set Counted value: 123 Category label source: Value labels of counted value \" \$d,\"a b c d \",\"Multiple dichotomy set Counted value: \`c' Category label source: Variable labels \" \$e,\"w x y z \",\"Multiple category set Label: First multiple category group \" \$f,\"a b c d \",\"Multiple category set \" mrsets.sps:50: note: MRSETS: The active dataset dictionary does not contain any multiple response sets. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/mrsets.at:148" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_326 #AT_START_327 at_fn_group_banner 327 'mrsets.at:208' \ "MRSETS read and write" " " 49 at_xfail=no ( $as_echo "327. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. VARIABLE LABEL w 'duplicate variable label' x 'Variable x' z 'Duplicate variable label'. VALUE LABELS /w 1 'w value 1' /y 1 'duplicate Value label' /z 1 'duplicate value Label' /a b c d 'a' 'burger' 'b' 'fries' 'c' 'shake' 'd' 'taco'. ADD VALUE LABELS /b 'b' 'Fries' /c 'b' 'XXX'. MRSETS /MDGROUP NAME=$a LABEL='First multiple dichotomy group' CATEGORYLABELS=VARLABELS VARIABLES=w x y z VALUE=5 /MDGROUP NAME=$b CATEGORYLABELS=COUNTEDVALUES VARIABLES=z y VALUE=123 /MDGROUP NAME=$c LABELSOURCE=VARLABEL CATEGORYLABELS=COUNTEDVALUES VARIABLES=w x y z VALUE=1 /MDGROUP NAME=$d LABELSOURCE=VARLABEL VARIABLES=a b c d VALUE='c' /MCGROUP NAME=$e LABEL='First multiple category group' VARIABLES=w x y z /MCGROUP NAME=$f VARIABLES=a b c d. SAVE OUTFILE='mrsets.sav'. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:213: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:213" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "mrsets.sps:25: warning: MRSETS: Variables w and z specified as part of multiple dichotomy group \$a have the same variable label. Categories represented by these variables will not be distinguishable in output. mrsets.sps:29: warning: MRSETS: Variable z specified as part of multiple dichotomy group \$b (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value. This category will not be distinguishable in output. mrsets.sps:29: warning: MRSETS: Variable y specified as part of multiple dichotomy group \$b (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value. This category will not be distinguishable in output. mrsets.sps:34: warning: MRSETS: Variable x specified as part of multiple dichotomy group \$c (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value. This category will not be distinguishable in output. mrsets.sps:34: warning: MRSETS: Variables y and z specified as part of multiple dichotomy group \$c (which has CATEGORYLABELS=COUNTEDVALUES) have the same value label for the group's counted value. These categories will not be distinguishable in output. mrsets.sps:38: warning: MRSETS: MDGROUP subcommand for group \$d specifies LABELSOURCE=VARLABEL but not CATEGORYLABELS=COUNTEDVALUES. Ignoring LABELSOURCE. \"mrsets.sps:41: warning: MRSETS: Variables specified on MCGROUP should have the same categories, but w and y (and possibly others) in multiple category group \$e have different value labels for value 1.\" \"mrsets.sps:42: warning: MRSETS: Variables specified on MCGROUP should have the same categories, but a and c (and possibly others) in multiple category group \$f have different value labels for value b.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/mrsets.at:213" $at_failed && at_fn_log_failure $at_traceon; } cat >mrsets2.sps <<'_ATEOF' GET FILE='mrsets.sav'. MRSETS /DISPLAY NAME=ALL. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:218: pspp -O format=csv mrsets2.sps" at_fn_check_prepare_trace "mrsets.at:218" ( $at_check_trace; pspp -O format=csv mrsets2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Multiple Response Sets Name,Variables,Details \$a,\"w x y z \",\"Multiple dichotomy set Label: First multiple dichotomy group Label source: Provided by user Counted value: 5 Category label source: Variable labels \" \$b,\"z y \",\"Multiple dichotomy set Counted value: 123 Category label source: Value labels of counted value \" \$c,\"w x y z \",\"Multiple dichotomy set Label: duplicate variable label Label source: First variable label among variables Counted value: 1 Category label source: Value labels of counted value \" \$d,\"a b c d \",\"Multiple dichotomy set Counted value: \`c' Category label source: Variable labels \" \$e,\"w x y z \",\"Multiple category set Label: First multiple category group \" \$f,\"a b c d \",\"Multiple category set \" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/mrsets.at:218" if $at_failed; then : hd mrsets.sav fi $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_327 #AT_START_328 at_fn_group_banner 328 'mrsets.at:222' \ "MRSETS names must begin with \$" " " 49 at_xfail=no ( $as_echo "328. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. MRSETS /MCGROUP NAME=x. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:227: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:227" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "mrsets.sps:6: error: MRSETS: x is not a valid name for a multiple response set. Multiple response set names must begin with \`\$'. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/mrsets.at:227" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_328 #AT_START_329 at_fn_group_banner 329 'mrsets.at:232' \ "MRSETS must have at least 2 variables" " " 49 at_xfail=no ( $as_echo "329. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. MRSETS /MCGROUP NAME=$x VARIABLES=a. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:237: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:237" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"mrsets.sps:6: error: MRSETS: VARIABLES specified only variable a on MCGROUP, but at least two variables are required.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/mrsets.at:237" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_329 #AT_START_330 at_fn_group_banner 330 'mrsets.at:242' \ "MRSETS does not allow noninteger VALUE" " " 49 at_xfail=no ( $as_echo "330. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. MRSETS /MDGROUP VALUE=1.5. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:247: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:247" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "mrsets.sps:6: error: MRSETS: Numeric VALUE must be an integer. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/mrsets.at:247" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_330 #AT_START_331 at_fn_group_banner 331 'mrsets.at:252' \ "MRSETS requires NAME to define a group" " " 49 at_xfail=no ( $as_echo "331. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. MRSETS /MCGROUP VARIABLES=a b c. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:257: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:257" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "mrsets.sps:6.32: error: MRSETS: Syntax error at end of command: Required MCGROUP specification missing from NAME subcommand. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/mrsets.at:257" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_331 #AT_START_332 at_fn_group_banner 332 'mrsets.at:262' \ "MRSETS requires VARIABLES to define a group" " " 49 at_xfail=no ( $as_echo "332. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. MRSETS /MCGROUP NAME=$Mcgroup. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:267: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:267" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "mrsets.sps:6.30: error: MRSETS: Syntax error at end of command: Required MCGROUP specification missing from VARIABLES subcommand. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/mrsets.at:267" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_332 #AT_START_333 at_fn_group_banner 333 'mrsets.at:272' \ "MRSETS variables must be same type" " " 49 at_xfail=no ( $as_echo "333. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. MRSETS /MCGROUP NAME=$mygroup VARIABLES=a b x y. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:277: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:277" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "mrsets.sps:6: error: MRSETS: a and x are not the same type. All variables in this variable list must be of the same type. x will be omitted from the list. mrsets.sps:6: error: MRSETS: a and y are not the same type. All variables in this variable list must be of the same type. y will be omitted from the list. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/mrsets.at:277" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_333 #AT_START_334 at_fn_group_banner 334 'mrsets.at:284' \ "MRSETS variables and VALUE must be same type" " " 49 at_xfail=no ( $as_echo "334. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. MRSETS /MDGROUP NAME=$group1 VARIABLES=a b VALUE=1. MRSETS /MDGROUP NAME=$group2 VARIABLES=x y VALUE='abc'. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:290: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:290" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"mrsets.sps:6: error: MRSETS: MDGROUP subcommand for group \$group1 specifies a string VALUE, but the variables specified for this group are numeric.\" \"mrsets.sps:7: error: MRSETS: MDGROUP subcommand for group \$group2 specifies a string VALUE, but the variables specified for this group are numeric.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/mrsets.at:290" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_334 #AT_START_335 at_fn_group_banner 335 'mrsets.at:297' \ "MRSETS VALUE must not be too wide" " " 49 at_xfail=no ( $as_echo "335. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. MRSETS /MDGROUP NAME=$group1 VARIABLES=a b VALUE='abc'. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:302: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:302" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"mrsets.sps:6: error: MRSETS: VALUE string on MDGROUP subcommand for group \$group1 is 3 bytes long, but it must be no longer than the narrowest variable in the group, which is a with a width of 1 bytes.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/mrsets.at:302" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_335 #AT_START_336 at_fn_group_banner 336 'mrsets.at:307' \ "MRSETS LABEL and LABELSOURCE are exclusive" " " 49 at_xfail=no ( $as_echo "336. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. MRSETS /MDGROUP NAME=$group1 VARIABLES=a b VALUE='a' LABEL='label' LABELSOURCE=VARLABEL. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:313: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:313" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "mrsets.sps:7: warning: MRSETS: MDGROUP subcommand for group \$group1 specifies LABELSOURCE=VARLABEL but not CATEGORYLABELS=COUNTEDVALUES. Ignoring LABELSOURCE. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/mrsets.at:313" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_336 #AT_START_337 at_fn_group_banner 337 'mrsets.at:318' \ "MRSETS DISPLAY or DELETE unknown group" " " 49 at_xfail=no ( $as_echo "337. $at_setup_line: testing $at_desc ..." $at_traceon cat >mrsets.sps <<'_ATEOF' DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA. MRSETS /DISPLAY NAME=[$x]. MRSETS /DELETE NAME=[$y]. _ATEOF { set +x $as_echo "$at_srcdir/mrsets.at:324: pspp -O format=csv mrsets.sps" at_fn_check_prepare_trace "mrsets.at:324" ( $at_check_trace; pspp -O format=csv mrsets.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "mrsets.sps:6: error: MRSETS: No multiple response set named \$x. mrsets.sps:7: error: MRSETS: No multiple response set named \$y. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/mrsets.at:324" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_337 #AT_START_338 at_fn_group_banner 338 'rename-variables.at:19' \ "RENAME VARIABLES" " " 50 at_xfail=no ( $as_echo "338. $at_setup_line: testing $at_desc ..." $at_traceon cat >rename-variables.sps <<'_ATEOF' DATA LIST LIST /brakeFluid y auxiliary warp (F2.0). BEGIN DATA. 1 3 5 9 2 3 6 10 3 3 7 11 4 3 8 11 END DATA. LIST. RENAME VARIABLES brakeFluid=applecarts y=bananamobiles. RENAME VARIABLES (warp auxiliary=foobar xyzzy). LIST. SAVE /OUTFILE='rename.sav'. _ATEOF { set +x $as_echo "$at_srcdir/rename-variables.at:38: pspp -O format=csv rename-variables.sps" at_fn_check_prepare_trace "rename-variables.at:38" ( $at_check_trace; pspp -O format=csv rename-variables.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format brakeFluid,F2.0 y,F2.0 auxiliary,F2.0 warp,F2.0 Table: Data List brakeFluid,y,auxiliary,warp 1,3,5,9 2,3,6,10 3,3,7,11 4,3,8,11 Table: Data List applecarts,bananamobiles,xyzzy,foobar 1,3,5,9 2,3,6,10 3,3,7,11 4,3,8,11 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rename-variables.at:38" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/rename-variables.at:60: grep 'bBrRaAkKeE' rename.sav" at_fn_check_prepare_trace "rename-variables.at:60" ( $at_check_trace; grep 'bBrRaAkKeE' rename.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/rename-variables.at:60" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_338 #AT_START_339 at_fn_group_banner 339 'rename-variables.at:64' \ "RENAME VARIABLES -- multiple sets" " " 50 at_xfail=no ( $as_echo "339. $at_setup_line: testing $at_desc ..." $at_traceon cat >rename-variables.sps <<'_ATEOF' data list list /a b c d e *. begin data. 1 2 3 4 5 end data. rename variables (a b=x y) (c d e=z zz zzz). list. _ATEOF { set +x $as_echo "$at_srcdir/rename-variables.at:76: pspp -O format=csv rename-variables.sps" at_fn_check_prepare_trace "rename-variables.at:76" ( $at_check_trace; pspp -O format=csv rename-variables.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format a,F8.0 b,F8.0 c,F8.0 d,F8.0 e,F8.0 Table: Data List x,y,z,zz,zzz 1.00,2.00,3.00,4.00,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rename-variables.at:76" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_339 #AT_START_340 at_fn_group_banner 340 'rename-variables.at:93' \ "RENAME VARIABLES -- invalid syntax 1" " " 50 at_xfail=no ( $as_echo "340. $at_setup_line: testing $at_desc ..." $at_traceon cat >rename-variables.sps <<'_ATEOF' DATA LIST LIST /brakeFluid y auxiliary warp (F2.0). RENAME VARIABLES warp auxiliary=foobar xyzzy. _ATEOF { set +x $as_echo "$at_srcdir/rename-variables.at:100: pspp -o pspp.csv rename-variables.sps" at_fn_check_prepare_trace "rename-variables.at:100" ( $at_check_trace; pspp -o pspp.csv rename-variables.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "rename-variables.sps:2.23-2.31: error: RENAME VARIABLES: Syntax error at \`auxiliary': expecting \`='. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/rename-variables.at:100" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_340 #AT_START_341 at_fn_group_banner 341 'rename-variables.at:105' \ "RENAME VARIABLES -- invalid syntax 2" " " 50 at_xfail=no ( $as_echo "341. $at_setup_line: testing $at_desc ..." $at_traceon cat >rename-variables.sps <<'_ATEOF' DATA LIST LIST /brakeFluid y auxiliary warp (F2.0). RENAME VARIABLES (brakeFluid=applecarts y=bananamobiles). _ATEOF { set +x $as_echo "$at_srcdir/rename-variables.at:111: pspp -o pspp.csv rename-variables.sps" at_fn_check_prepare_trace "rename-variables.at:111" ( $at_check_trace; pspp -o pspp.csv rename-variables.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "rename-variables.sps:2: error: RENAME VARIABLES: Differing number of variables in old name list (1) and in new name list (2). " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/rename-variables.at:111" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_341 #AT_START_342 at_fn_group_banner 342 'rename-variables.at:119' \ "RENAME VARIABLES -- invalid syntax 3" " " 50 at_xfail=no ( $as_echo "342. $at_setup_line: testing $at_desc ..." $at_traceon cat >rename-variables.sps <<'_ATEOF' DATA LIST NOTABLE LIST /z y p q (F2.0). BEGIN DATA. 4 3 8 11 END DATA. RENAME VARIABLES z=a y}bqnanamobiles. LIST. _ATEOF { set +x $as_echo "$at_srcdir/rename-variables.at:131: pspp -O format=csv rename-variables.sps" at_fn_check_prepare_trace "rename-variables.at:131" ( $at_check_trace; pspp -O format=csv rename-variables.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/rename-variables.at:131" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_342 #AT_START_343 at_fn_group_banner 343 'sort-variables.at:19' \ "SORT VARIABLES" " " 51 at_xfail=no ( $as_echo "343. $at_setup_line: testing $at_desc ..." $at_traceon # This reverses the order of its input lines. # From the GNU sed manual. tac () { sed -n '1! G $ p h' } test_sort () { cat > sort-variables.sps <>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable `for var in $4; do echo $var; done` Variable `for var in $4; do echo $var; done | tac` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-variables.at:37" $at_failed && at_fn_log_failure $at_traceon; } } test_sort 'x100 c b x99 a y400 y5' '' NAME 'a b c x99 x100 y5 y400' test_sort 'c(a10) a(a5) b' '' TYPE 'b a c' test_sort 'a (datetime) b (f) c (a5) d (a2) e (a1)' '' FORMAT 'e d c b a' test_sort 'a b c' \ 'VARIABLE LABEL a "hi there".' \ LABEL 'b c a' test_sort 'a b c' \ 'VALUE LABELS a 123 "xyzzy".' \ VALUES 'b c a' test_sort 'a b c' \ 'MISSING VALUES a (123).' \ MISSING 'b c a' test_sort 'a b c' \ 'VARIABLE LEVEL a (SCALE) b (ORDINAL) c (NOMINAL).' \ MEASURE 'c b a' test_sort 'b n i s t p' \ 'VARIABLE ROLE /INPUT i /TARGET t /BOTH b /NONE n /PARTITION p /SPLIT s.' \ ROLE 'i t b n p s' test_sort 'c10 c5 c15 c9' \ 'VARIABLE WIDTH c10(10) c5(5) c15(15) c9(9).' \ COLUMNS 'c5 c9 c10 c15' test_sort 'c l r' \ 'VARIABLE ALIGNMENT c (CENTER) l (LEFT) r (RIGHT).' \ ALIGNMENT 'l r c' test_sort 'az ax ay ab' \ 'VARIABLE ATTRIBUTE VARIABLES=az ATTRIBUTE=key("z"). VARIABLE ATTRIBUTE VARIABLES=ax ATTRIBUTE=key("x"). VARIABLE ATTRIBUTE VARIABLES=ay ATTRIBUTE=key("y"). VARIABLE ATTRIBUTE VARIABLES=ab ATTRIBUTE=key("b").' \ 'ATTRIBUTE key' 'ab ax ay az' set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_343 #AT_START_344 at_fn_group_banner 344 'split-file.at:19' \ "SPLIT FILE - basic test" " " 52 at_xfail=no ( $as_echo "344. $at_setup_line: testing $at_desc ..." $at_traceon cat >split-file.sps <<'_ATEOF' title 'Test SPLIT FILE utility'. data list notable /X 1 Y 2. begin data. 12 16 17 19 15 14 27 20 26 25 28 29 24 end data. split file by x. list. _ATEOF { set +x $as_echo "$at_srcdir/split-file.at:42: pspp -o pspp.csv split-file.sps" at_fn_check_prepare_trace "split-file.at:42" ( $at_check_trace; pspp -o pspp.csv split-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/split-file.at:42" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/split-file.at:43: cat pspp.csv" at_fn_check_prepare_trace "split-file.at:43" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Title: Test SPLIT FILE utility Variable,Value,Label X,1, Table: Data List X,Y 1,2 1,6 1,7 1,9 1,5 1,4 Variable,Value,Label X,2, Table: Data List X,Y 2,7 2,0 2,6 2,5 2,8 2,9 2,4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/split-file.at:43" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_344 #AT_START_345 at_fn_group_banner 345 'split-file.at:77' \ "SPLIT FILE - vs procedures" " " 52 at_xfail=no ( $as_echo "345. $at_setup_line: testing $at_desc ..." $at_traceon cat >split-file.sps <<'_ATEOF' * This test is a compendium of those procedures which might * have problems when run in conjunction with SPLITS. data list list /a b c q g *. begin data. 1 2 3 1 0 4 5 6 0 0 7 8 9 1 0 10 11 12 0 1 13 14 15 1 1 end data. split file by g. * The commented out lines are ones which currently fail. AGGREGATE outfile='foo' /break=c /X=sum(a). AUTORECODE variables = c into d . COUNT e = c (1 2 3 4 5 6 7). CROSSTABS a by b. CORRELATIONS /VARIABLES = a b. DELETE VARIABLES a. DESCRIPTIVES e . EXAMINE c by b. EXPORT outfile='xxx'. FACTOR /VARIABLES = b c d. FILTER BY c. FREQUENCIES b. GLM c BY b. GRAPH /HISTOGRAM = b . GRAPH /SCATTERPLOT(BIVARIATE) = b with c by e . GRAPH /BAR (GROUPED) = MEAN(b) by c by e. GRAPH /BAR = COUNT BY b. LIST. LOGISTIC REGRESSION q WITH b. MEANS c b. NPAR TESTS /MCNEMAR q. ONEWAY c BY b. QUICK CLUSTER b c. RANK b c. REGRESSION /VARIABLES = c /DEPENDENT = q. RELIABILITY /VARIABLES = c b d. RENAME VARIABLES (b = bb). ROC bb by q(1). SAMPLE 0.9 . SAVE outfile='xx.sav'. SORT CASES by bb. T-TEST /GROUP=q(0,1) /VARIABLES=bb. USE ALL. FLIP /VARIABLES = bb, c . execute. finish. _ATEOF { set +x $as_echo "$at_srcdir/split-file.at:136: pspp -O format=csv split-file.sps" at_fn_check_prepare_trace "split-file.at:136" ( $at_check_trace; pspp -O format=csv split-file.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/split-file.at:136" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_345 #AT_START_346 at_fn_group_banner 346 'sys-file-info.at:19' \ "SYSFILE INFO" " " 53 at_xfail=no ( $as_echo "346. $at_setup_line: testing $at_desc ..." $at_traceon cat >sysfile-info.sps <<'_ATEOF' DATA LIST LIST /x * name (a10) . BEGIN DATA 1 one 2 two 3 three END DATA. SAVE OUTFILE='pro.sav'. sysfile info file='pro.sav'. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-info.at:31: pspp -o pspp.csv sysfile-info.sps" at_fn_check_prepare_trace "sys-file-info.at:31" ( $at_check_trace; pspp -o pspp.csv sysfile-info.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-info.at:31" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sys-file-info.at:32: sed -e '/^Created:,/d' \\ -e '/^Endian:,/d' \\ -e '/^Integer Format:,/d' \\ -e '/^Real Format:,/d' \\ -e '/^Encoding:,/d' pspp.csv" at_fn_check_prepare_notrace 'an embedded newline' "sys-file-info.at:32" ( $at_check_trace; sed -e '/^Created:,/d' \ -e '/^Endian:,/d' \ -e '/^Integer Format:,/d' \ -e '/^Real Format:,/d' \ -e '/^Encoding:,/d' pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 name,A10 File:,pro.sav Label:,No label. Variables:,2 Cases:,3 Type:,SPSS System File Weight:,Not weighted. Compression:,SAV Variable,Description,Position x,\"Format: F8.2 Measure: Scale Role: Input Display Alignment: Right Display Width: 8\",1 name,\"Format: A10 Measure: Nominal Role: Input Display Alignment: Left Display Width: 10\",2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-info.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_346 #AT_START_347 at_fn_group_banner 347 'sys-file-info.at:70' \ "DISPLAY FILE LABEL" " " 54 at_xfail=no ( $as_echo "347. $at_setup_line: testing $at_desc ..." $at_traceon cat >display.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * name (a10) . DISPLAY FILE LABEL. FILE LABEL 'foo bar baz quux'. DISPLAY FILE LABEL. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-info.at:79: pspp -O format=csv display.sps" at_fn_check_prepare_trace "sys-file-info.at:79" ( $at_check_trace; pspp -O format=csv display.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "The active dataset does not have a file label. File label: foo bar baz quux " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-info.at:79" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_347 #AT_START_348 at_fn_group_banner 348 'sys-file-info.at:90' \ "DISPLAY SCRATCH" " " 54 at_xfail=no ( $as_echo "348. $at_setup_line: testing $at_desc ..." $at_traceon cat >sysfile-info.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * name (a10) . DISPLAY SCRATCH. COMPUTE #x=0. DISPLAY SCRATCH. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-info.at:97: pspp -O format=csv sysfile-info.sps" at_fn_check_prepare_trace "sys-file-info.at:97" ( $at_check_trace; pspp -O format=csv sysfile-info.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "sysfile-info.sps:2: warning: DISPLAY: No variables to display. Variable #x " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-info.at:97" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_348 #AT_START_349 at_fn_group_banner 349 'sys-file-info.at:105' \ "DISPLAY INDEX" " " 54 at_xfail=no ( $as_echo "349. $at_setup_line: testing $at_desc ..." $at_traceon cat >sysfile-info.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * name (a10) . DISPLAY INDEX. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-info.at:110: pspp -O format=csv sysfile-info.sps" at_fn_check_prepare_trace "sys-file-info.at:110" ( $at_check_trace; pspp -O format=csv sysfile-info.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Position x,1 name,2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-info.at:110" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_349 #AT_START_350 at_fn_group_banner 350 'sys-file-info.at:117' \ "DISPLAY NAMES" " " 54 at_xfail=no ( $as_echo "350. $at_setup_line: testing $at_desc ..." $at_traceon cat >sysfile-info.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * name (a10) . DISPLAY NAMES. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-info.at:122: pspp -O format=csv sysfile-info.sps" at_fn_check_prepare_trace "sys-file-info.at:122" ( $at_check_trace; pspp -O format=csv sysfile-info.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable x name " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-info.at:122" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_350 #AT_START_351 at_fn_group_banner 351 'sys-file-info.at:129' \ "DISPLAY LABELS" " " 54 at_xfail=no ( $as_echo "351. $at_setup_line: testing $at_desc ..." $at_traceon cat >sysfile-info.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * name (a10) . VARIABLE LABEL x 'variable one' name 'variable two'. VALUE LABEL x 1 'asdf' 2 'jkl;'. DISPLAY LABELS. _ATEOF { set +x $as_echo "$at_srcdir/sys-file-info.at:136: pspp -O format=csv sysfile-info.sps" at_fn_check_prepare_trace "sys-file-info.at:136" ( $at_check_trace; pspp -O format=csv sysfile-info.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Label,Position x,variable one,1 name,variable two,2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sys-file-info.at:136" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_351 #AT_START_352 at_fn_group_banner 352 'value-labels.at:19' \ "VALUE LABELS date formats" " " 55 at_xfail=no ( $as_echo "352. $at_setup_line: testing $at_desc ..." $at_traceon cat >value-labels.sps <<'_ATEOF' DATA LIST LIST NOTABLE /ad (adate10) dt (datetime20). VALUE LABELS ad 'july 10, 1982' 'label 1' '1-2-93' 'label 2' '5-4-2003' 'label 3' /dt '12 Apr 2011 06:09:56' 'label 4'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/value-labels.at:28: pspp -O format=csv value-labels.sps" at_fn_check_prepare_trace "value-labels.at:28" ( $at_check_trace; pspp -O format=csv value-labels.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position ad,\"Format: ADATE10 Value,Label 07/10/1982,label 1 01/02/1993,label 2 05/04/2003,label 3\",1 dt,\"Format: DATETIME20.0 Value,Label 12-APR-2011 06:09:56,label 4\",2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/value-labels.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_352 #AT_START_353 at_fn_group_banner 353 'value-labels.at:43' \ "VALUE LABELS with new-line" " " 55 at_xfail=no ( $as_echo "353. $at_setup_line: testing $at_desc ..." $at_traceon cat >value-labels.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x. VALUE LABELS x 1 'one' 2 'first line\nsecond line' 3 'three'. BEGIN DATA. 1 2 3 END DATA. DISPLAY DICTIONARY. FREQUENCIES x/STAT=NONE. _ATEOF { set +x $as_echo "$at_srcdir/value-labels.at:55: pspp -O format=csv value-labels.sps" at_fn_check_prepare_trace "value-labels.at:55" ( $at_check_trace; pspp -O format=csv value-labels.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position x,\"Format: F8.2 Value,Label 1.00,one 2.00,first line\\nsecond line 3.00,three\",1 Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent one,1.00,1,33.33,33.33,33.33 \"first line second line\",2.00,1,33.33,33.33,66.67 three,3.00,1,33.33,33.33,100.00 Total,,3,100.0,100.0, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/value-labels.at:55" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_353 #AT_START_354 at_fn_group_banner 354 'value-labels.at:74' \ "VALUE LABELS with new-line in system file" " " 55 at_xfail=no ( $as_echo "354. $at_setup_line: testing $at_desc ..." $at_traceon cat >save.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x. VALUE LABELS x 1 'one' 2 'first line\nsecond line' 3 'three'. BEGIN DATA. 1 2 3 END DATA. SAVE OUTFILE='value-labels.sav'. _ATEOF { set +x $as_echo "$at_srcdir/value-labels.at:85: pspp -O format=csv save.sps" at_fn_check_prepare_trace "value-labels.at:85" ( $at_check_trace; pspp -O format=csv save.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/value-labels.at:85" $at_failed && at_fn_log_failure $at_traceon; } cat >get.sps <<'_ATEOF' GET FILE='value-labels.sav'. DISPLAY DICTIONARY. FREQUENCIES x/STAT=NONE. _ATEOF { set +x $as_echo "$at_srcdir/value-labels.at:91: pspp -O format=csv get.sps" at_fn_check_prepare_trace "value-labels.at:91" ( $at_check_trace; pspp -O format=csv get.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position x,\"Format: F8.2 Value,Label 1.00,one 2.00,first line\\nsecond line 3.00,three\",1 Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent one,1.00,1,33.33,33.33,33.33 \"first line second line\",2.00,1,33.33,33.33,66.67 three,3.00,1,33.33,33.33,100.00 Total,,3,100.0,100.0, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/value-labels.at:91" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_354 #AT_START_355 at_fn_group_banner 355 'value-labels.at:112' \ "VALUE LABELS invalid syntax bug" " " 55 at_xfail=no ( $as_echo "355. $at_setup_line: testing $at_desc ..." $at_traceon cat >value-labels.sps <<'_ATEOF' DATA LIST LIST NOTABLE /a * pref * . BEGIN DATA. 1.00 1.00 1.00 2.00 2.00 1.00 2.00 2.00 END DATA. VALUE LABELS /var=a 'label for a'. _ATEOF { set +x $as_echo "$at_srcdir/value-labels.at:124: pspp -O format=csv value-labels.sps" at_fn_check_prepare_trace "value-labels.at:124" ( $at_check_trace; pspp -O format=csv value-labels.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "value-labels.sps:9: error: VALUE LABELS: var is not a variable name. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/value-labels.at:124" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_355 #AT_START_356 at_fn_group_banner 356 'value-labels.at:130' \ "VALUE LABELS trailing \`/' bug" " " 55 at_xfail=no ( $as_echo "356. $at_setup_line: testing $at_desc ..." $at_traceon cat >value-labels.sps <<'_ATEOF' DATA LIST LIST NOTABLE /X * . BEGIN DATA. 1 2 3 4 END DATA. VALUE LABELS X 1 'one' 2 'two' 3 'three'/ LIST VARIABLES=X. _ATEOF { set +x $as_echo "$at_srcdir/value-labels.at:146: pspp -O format=csv value-labels.sps" at_fn_check_prepare_trace "value-labels.at:146" ( $at_check_trace; pspp -O format=csv value-labels.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List X 1.00 2.00 3.00 4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/value-labels.at:146" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_356 #AT_START_357 at_fn_group_banner 357 'variable-display.at:19' \ "variable display attribute commands" " " 56 at_xfail=no ( $as_echo "357. $at_setup_line: testing $at_desc ..." $at_traceon cat >var-display.sps <<'_ATEOF' DATA LIST FREE /x y z. VARIABLE ALIGNMENT x (LEFT)/y (RIGHT)/z (CENTER). VARIABLE WIDTH x (10)/y (12)/z (14). VARIABLE LEVEL x (SCALE)/y (ORDINAL)/z (NOMINAL). VARIABLE ROLE /TARGET x /BOTH y /NONE z. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/variable-display.at:28: pspp -o pspp.csv var-display.sps" at_fn_check_prepare_trace "variable-display.at:28" ( $at_check_trace; pspp -o pspp.csv var-display.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/variable-display.at:28" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/variable-display.at:29: cat pspp.csv" at_fn_check_prepare_trace "variable-display.at:29" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position x,\"Format: F8.2 Measure: Scale Role: Output Display Alignment: Left Display Width: 10\",1 y,\"Format: F8.2 Measure: Ordinal Role: Both Display Alignment: Right Display Width: 12\",2 z,\"Format: F8.2 Measure: Nominal Role: None Display Alignment: Center Display Width: 14\",3 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/variable-display.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_357 #AT_START_358 at_fn_group_banner 358 'variable-display.at:52' \ "variable labels" " " 57 at_xfail=no ( $as_echo "358. $at_setup_line: testing $at_desc ..." $at_traceon cat >var-labels.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * y *. BEGIN DATA. 1 100 2 200 3 300 4 400 END DATA. * While no labels have been set, the TVARS is irrelevant. SET TVARS=NAMES. DESCRIPTIVES ALL. SET TVARS=LABELS. DESCRIPTIVES ALL. SET TVARS=BOTH. DESCRIPTIVES ALL. VARIABLE LABEL x 'foo' y 'bar'. * Now, the TVARS setting should have effect SET TVARS=NAMES. DESCRIPTIVES ALL. SET TVARS=LABELS. DESCRIPTIVES ALL. SET TVARS=BOTH. DESCRIPTIVES ALL. _ATEOF { set +x $as_echo "$at_srcdir/variable-display.at:89: pspp -O format=csv var-labels.sps" at_fn_check_prepare_trace "variable-display.at:89" ( $at_check_trace; pspp -O format=csv var-labels.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum x,4,2.50,1.29,1.00,4.00 y,4,250.00,129.10,100.00,400.00 Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum x,4,2.50,1.29,1.00,4.00 y,4,250.00,129.10,100.00,400.00 Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum x,4,2.50,1.29,1.00,4.00 y,4,250.00,129.10,100.00,400.00 Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum x,4,2.50,1.29,1.00,4.00 y,4,250.00,129.10,100.00,400.00 Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum foo,4,2.50,1.29,1.00,4.00 bar,4,250.00,129.10,100.00,400.00 Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum foo (x),4,2.50,1.29,1.00,4.00 bar (y),4,250.00,129.10,100.00,400.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/variable-display.at:89" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_358 #AT_START_359 at_fn_group_banner 359 'vector.at:19' \ "VECTOR short form" " " 58 at_xfail=no ( $as_echo "359. $at_setup_line: testing $at_desc ..." $at_traceon cat >vector.sps <<'_ATEOF' data list notable/x 1. vector v(4). display vector. _ATEOF { set +x $as_echo "$at_srcdir/vector.at:25: pspp -o pspp.csv vector.sps" at_fn_check_prepare_trace "vector.at:25" ( $at_check_trace; pspp -o pspp.csv vector.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/vector.at:25" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/vector.at:26: cat pspp.csv" at_fn_check_prepare_trace "vector.at:26" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Vector,Position,Variable,Print Format v,1,v1,F8.2 ,2,v2,F8.2 ,3,v3,F8.2 ,4,v4,F8.2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/vector.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_359 #AT_START_360 at_fn_group_banner 360 'vector.at:35' \ "VECTOR short form with format specification" " " 58 at_xfail=no ( $as_echo "360. $at_setup_line: testing $at_desc ..." $at_traceon cat >vector.sps <<'_ATEOF' data list notable/x 1. vector #vec(4, comma10.2) /#svec(3, a8). display vector. _ATEOF { set +x $as_echo "$at_srcdir/vector.at:42: pspp -o pspp.csv vector.sps" at_fn_check_prepare_trace "vector.at:42" ( $at_check_trace; pspp -o pspp.csv vector.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/vector.at:42" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/vector.at:43: cat pspp.csv" at_fn_check_prepare_trace "vector.at:43" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Vector,Position,Variable,Print Format #vec,1,#vec1,COMMA10.2 ,2,#vec2,COMMA10.2 ,3,#vec3,COMMA10.2 ,4,#vec4,COMMA10.2 #svec,1,#svec1,A8 ,2,#svec2,A8 ,3,#svec3,A8 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/vector.at:43" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_360 #AT_START_361 at_fn_group_banner 361 'vector.at:55' \ "VECTOR short form in INPUT PROGRAM" " " 58 at_xfail=no ( $as_echo "361. $at_setup_line: testing $at_desc ..." $at_traceon cat >vector.sps <<'_ATEOF' input program. vector x(5). data list notable/x5 x2 x3 x1 x4 1-5. end input program. display vector. _ATEOF { set +x $as_echo "$at_srcdir/vector.at:63: pspp -o pspp.csv vector.sps" at_fn_check_prepare_trace "vector.at:63" ( $at_check_trace; pspp -o pspp.csv vector.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/vector.at:63" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/vector.at:64: cat pspp.csv" at_fn_check_prepare_trace "vector.at:64" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Vector,Position,Variable,Print Format x,1,x1,F8.2 ,2,x2,F8.2 ,3,x3,F8.2 ,4,x4,F8.2 ,5,x5,F8.2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/vector.at:64" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_361 #AT_START_362 at_fn_group_banner 362 'vector.at:74' \ "VECTOR long form" " " 58 at_xfail=no ( $as_echo "362. $at_setup_line: testing $at_desc ..." $at_traceon cat >vector.sps <<'_ATEOF' data list notable/u w x y z 1-5. vector a=u to y. vector b=x to z. vector c=all. display vector. _ATEOF { set +x $as_echo "$at_srcdir/vector.at:82: pspp -o pspp.csv vector.sps" at_fn_check_prepare_trace "vector.at:82" ( $at_check_trace; pspp -o pspp.csv vector.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/vector.at:82" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/vector.at:83: cat pspp.csv" at_fn_check_prepare_trace "vector.at:83" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Vector,Position,Variable,Print Format a,1,u,F1.0 ,2,w,F1.0 ,3,x,F1.0 ,4,y,F1.0 b,1,x,F1.0 ,2,y,F1.0 ,3,z,F1.0 c,1,u,F1.0 ,2,w,F1.0 ,3,x,F1.0 ,4,y,F1.0 ,5,z,F1.0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/vector.at:83" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_362 #AT_START_363 at_fn_group_banner 363 'weight.at:19' \ "WEIGHT" " " 59 at_xfail=no ( $as_echo "363. $at_setup_line: testing $at_desc ..." $at_traceon cat >weight.txt <<'_ATEOF' 18 1 19 7 20 26 21 76 22 57 23 58 24 38 25 38 26 30 27 21 28 23 29 24 30 23 31 14 32 21 33 21 34 14 35 14 36 17 37 11 38 16 39 14 40 15 41 14 42 14 43 8 44 15 45 10 46 12 47 13 48 13 49 5 50 5 51 3 52 7 53 6 54 2 55 2 56 2 57 3 58 1 59 3 61 1 62 3 63 1 64 1 65 2 70 1 78 1 79 1 80 1 94 1 _ATEOF cat >weight.sps <<'_ATEOF' SET FORMAT F8.3. data list file='weight.txt'/AVAR 1-5 BVAR 6-10. weight by BVAR. descriptives AVAR /statistics all /format serial. frequencies AVAR /statistics all. _ATEOF { set +x $as_echo "$at_srcdir/weight.at:82: pspp -o pspp.csv weight.sps" at_fn_check_prepare_trace "weight.at:82" ( $at_check_trace; pspp -o pspp.csv weight.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/weight.at:82" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/weight.at:83: cat pspp.csv" at_fn_check_prepare_trace "weight.at:83" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from \`weight.txt'. Variable,Record,Columns,Format AVAR,1,1- 5,F5.0 BVAR,1,6- 10,F5.0 Table: Valid cases = 730; cases with missing value(s) = 0. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum AVAR,730,0,31.515,.405,10.937,119.608,2.411,.181,1.345,.090,76.000,18.000,94.000,23006.000 Table: AVAR Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,18,1,.137,.137,.137 ,19,7,.959,.959,1.096 ,20,26,3.562,3.562,4.658 ,21,76,10.411,10.411,15.068 ,22,57,7.808,7.808,22.877 ,23,58,7.945,7.945,30.822 ,24,38,5.205,5.205,36.027 ,25,38,5.205,5.205,41.233 ,26,30,4.110,4.110,45.342 ,27,21,2.877,2.877,48.219 ,28,23,3.151,3.151,51.370 ,29,24,3.288,3.288,54.658 ,30,23,3.151,3.151,57.808 ,31,14,1.918,1.918,59.726 ,32,21,2.877,2.877,62.603 ,33,21,2.877,2.877,65.479 ,34,14,1.918,1.918,67.397 ,35,14,1.918,1.918,69.315 ,36,17,2.329,2.329,71.644 ,37,11,1.507,1.507,73.151 ,38,16,2.192,2.192,75.342 ,39,14,1.918,1.918,77.260 ,40,15,2.055,2.055,79.315 ,41,14,1.918,1.918,81.233 ,42,14,1.918,1.918,83.151 ,43,8,1.096,1.096,84.247 ,44,15,2.055,2.055,86.301 ,45,10,1.370,1.370,87.671 ,46,12,1.644,1.644,89.315 ,47,13,1.781,1.781,91.096 ,48,13,1.781,1.781,92.877 ,49,5,.685,.685,93.562 ,50,5,.685,.685,94.247 ,51,3,.411,.411,94.658 ,52,7,.959,.959,95.616 ,53,6,.822,.822,96.438 ,54,2,.274,.274,96.712 ,55,2,.274,.274,96.986 ,56,2,.274,.274,97.260 ,57,3,.411,.411,97.671 ,58,1,.137,.137,97.808 ,59,3,.411,.411,98.219 ,61,1,.137,.137,98.356 ,62,3,.411,.411,98.767 ,63,1,.137,.137,98.904 ,64,1,.137,.137,99.041 ,65,2,.274,.274,99.315 ,70,1,.137,.137,99.452 ,78,1,.137,.137,99.589 ,79,1,.137,.137,99.726 ,80,1,.137,.137,99.863 ,94,1,.137,.137,100.000 Total,,730,100.0,100.0, Table: AVAR N,Valid,730 ,Missing,0 Mean,,31.515 S.E. Mean,,.405 Mode,,21.000 Std Dev,,10.937 Variance,,119.608 Kurtosis,,2.411 S.E. Kurt,,.181 Skewness,,1.345 S.E. Skew,,.090 Range,,76.000 Minimum,,18.000 Maximum,,94.000 Sum,,23006.000 Percentiles,50 (Median),28 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/weight.at:83" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_363 #AT_START_364 at_fn_group_banner 364 'evaluate.at:1989' \ "LAG function" " " 60 at_xfail=no ( $as_echo "364. $at_setup_line: testing $at_desc ..." $at_traceon cat >lag.sps <<'_ATEOF' data list /W 1. begin data. 1 2 3 4 5 end data. compute X=lag(w,1). compute Y=lag(x). compute Z=lag(w,2). list. _ATEOF { set +x $as_echo "$at_srcdir/evaluate.at:2005: pspp -o pspp.csv lag.sps" at_fn_check_prepare_trace "evaluate.at:2005" ( $at_check_trace; pspp -o pspp.csv lag.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2005" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/evaluate.at:2006: cat pspp.csv" at_fn_check_prepare_trace "evaluate.at:2006" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from INLINE. Variable,Record,Columns,Format W,1,1- 1,F1.0 Table: Data List W,X,Y,Z 1,. ,. ,. 2,1.00,. ,. 3,2.00,1.00,1.00 4,3.00,2.00,2.00 5,4.00,3.00,3.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2006" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_364 #AT_START_365 at_fn_group_banner 365 'evaluate.at:2021' \ "LAG crash bug" " " 60 at_xfail=no ( $as_echo "365. $at_setup_line: testing $at_desc ..." $at_traceon cat >lag.sps <<'_ATEOF' DATA LIST LIST /x. BEGIN DATA 1 2 END DATA. DO IF (x <> LAG(x) ). ECHO 'hello'. END IF. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/evaluate.at:2035: pspp -o pspp.csv lag.sps" at_fn_check_prepare_trace "evaluate.at:2035" ( $at_check_trace; pspp -o pspp.csv lag.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2035" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/evaluate.at:2036: cat pspp.csv" at_fn_check_prepare_trace "evaluate.at:2036" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 hello " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2036" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_365 #AT_START_366 at_fn_group_banner 366 'evaluate.at:2046' \ "UNIFORM function" " " 60 at_xfail=no ( $as_echo "366. $at_setup_line: testing $at_desc ..." $at_traceon cat >uniform.sps <<'_ATEOF' set seed=10. input program. + loop #i = 1 to 20. + do repeat response=R1. + compute response = uniform(10). + end repeat. + end case. + end loop. + end file. end input program. list. _ATEOF { set +x $as_echo "$at_srcdir/evaluate.at:2061: pspp -o pspp.csv uniform.sps" at_fn_check_prepare_trace "evaluate.at:2061" ( $at_check_trace; pspp -o pspp.csv uniform.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2061" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/evaluate.at:2062: cat pspp.csv" at_fn_check_prepare_trace "evaluate.at:2062" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List R1 7.71 2.99 .21 4.95 6.34 4.43 7.49 8.32 4.99 5.83 2.25 .25 1.98 7.09 7.61 2.66 1.69 2.64 .88 1.50 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2062" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_366 #AT_START_367 at_fn_group_banner 367 'evaluate.at:2088' \ "VALUELABEL function" " " 60 at_xfail=no ( $as_echo "367. $at_setup_line: testing $at_desc ..." $at_traceon cat >valuelabel.sps <<'_ATEOF' DATA LIST notable /n 1 s 2(a). VALUE LABELS /n 0 'Very dissatisfied' 1 'Dissatisfied' 1.5 'Slightly Peeved' 2 'Neutral' 3 'Satisfied' 4 'Very satisfied'. VALUE LABELS /s 'a' 'Wouldn''t buy again' 'b' 'Unhappy' 'c' 'Bored' 'd' 'Satiated' 'e' 'Elated'. STRING nlabel slabel(a10). COMPUTE nlabel = VALUELABEL(n). COMPUTE slabel = VALUELABEL(s). LIST. BEGIN DATA. 0a 1b 2c 3d 4e 5f 6g END DATA. _ATEOF { set +x $as_echo "$at_srcdir/evaluate.at:2117: pspp -o pspp.csv valuelabel.sps" at_fn_check_prepare_trace "evaluate.at:2117" ( $at_check_trace; pspp -o pspp.csv valuelabel.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2117" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/evaluate.at:2118: cat pspp.csv" at_fn_check_prepare_trace "evaluate.at:2118" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List n,s,nlabel,slabel .,,, 0,a,Very dissa,Wouldn't b 1,b,Dissatisfi,Unhappy 2,c,Neutral ,Bored 3,d,Satisfied ,Satiated 4,e,Very satis,Elated 5,f,, 6,g,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2118" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_367 #AT_START_368 at_fn_group_banner 368 'evaluate.at:2132' \ "variables in expressions" " " 60 at_xfail=no ( $as_echo "368. $at_setup_line: testing $at_desc ..." $at_traceon cat >variables.sps <<'_ATEOF' DATA LIST NOTABLE/N1 TO N5 1-5. MISSING VALUES N1 TO N5 (3 THRU 5, 1). BEGIN DATA. 12345 6789 END DATA. COMPUTE P1=N1. COMPUTE P2=N2. COMPUTE P3=N3. COMPUTE P4=N4. COMPUTE P5=N5. COMPUTE MC=NMISS(N1 TO N5). COMPUTE VC=NVALID(N1 TO N5). COMPUTE S1=SYSMIS(N1). COMPUTE S2=SYSMIS(N2). COMPUTE S3=SYSMIS(N3). COMPUTE S4=SYSMIS(N4). COMPUTE S5=SYSMIS(N5). COMPUTE M1=MISSING(N1). COMPUTE M2=MISSING(N2). COMPUTE M3=MISSING(N3). COMPUTE M4=MISSING(N4). COMPUTE M5=MISSING(N5). COMPUTE V1=VALUE(N1). COMPUTE V2=VALUE(N2). COMPUTE V3=VALUE(N3). COMPUTE V4=VALUE(N4). COMPUTE V5=VALUE(N5). FORMATS ALL (F1). LIST. _ATEOF { set +x $as_echo "$at_srcdir/evaluate.at:2172: pspp -o pspp.csv variables.sps" at_fn_check_prepare_trace "evaluate.at:2172" ( $at_check_trace; pspp -o pspp.csv variables.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2172" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/evaluate.at:2173: cat pspp.csv" at_fn_check_prepare_trace "evaluate.at:2173" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List N1,N2,N3,N4,N5,P1,P2,P3,P4,P5,MC,VC,S1,S2,S3,S4,S5,M1,M2,M3,M4,M5,V1,V2,V3,V4,V5 1,2,3,4,5,.,2,.,.,.,4,1,0,0,0,0,0,1,0,1,1,1,1,2,3,4,5 6,7,8,9,.,6,7,8,9,.,1,4,0,0,0,0,1,0,0,0,0,1,6,7,8,9,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2173" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_368 #AT_START_369 at_fn_group_banner 369 'evaluate.at:2181' \ "vectors in expressions" " " 60 at_xfail=no ( $as_echo "369. $at_setup_line: testing $at_desc ..." $at_traceon cat >vectors.sps <<'_ATEOF' DATA LIST NOTABLE /N1 TO N5 1-5. MISSING VALUES N1 TO N5 (3 THRU 5, 1). BEGIN DATA. 12345 6789 END DATA. VECTOR N=N1 TO N5. VECTOR X(5). LOOP I=1 TO 5. COMPUTE X(I)=N(I) + 1. END LOOP. FORMATS ALL (F2). LIST. _ATEOF { set +x $as_echo "$at_srcdir/evaluate.at:2200: pspp -o pspp.csv vectors.sps" at_fn_check_prepare_trace "evaluate.at:2200" ( $at_check_trace; pspp -o pspp.csv vectors.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2200" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/evaluate.at:2201: cat pspp.csv" at_fn_check_prepare_trace "evaluate.at:2201" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List N1,N2,N3,N4,N5,X1,X2,X3,X4,X5,I 1,2,3,4,5,.,3,.,.,.,5 6,7,8,9,.,7,8,9,10,.,5 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/evaluate.at:2201" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_369 #AT_START_370 at_fn_group_banner 370 'parse.at:19' \ "parse expression with unknown variable crash" " " 61 at_xfail=no ( $as_echo "370. $at_setup_line: testing $at_desc ..." $at_traceon cat >parse.sps <<'_ATEOF' INPUT PROGRAM. LOOP c=1 to 10. COMPUTE var1=NORMAL(100). END CASE. END LOOP. END FILE. END INPUT PROGRAM. IF ( y > 0 ) . COMPUTE x=y. END IF. _ATEOF { set +x $as_echo "$at_srcdir/parse.at:34: pspp -O format=csv parse.sps" at_fn_check_prepare_trace "parse.at:34" ( $at_check_trace; pspp -O format=csv parse.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "parse.sps:10: error: IF: Unknown identifier y. parse.sps:11: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/parse.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_370 #AT_START_371 at_fn_group_banner 371 'parse.at:41' \ "parse expression with invalid logical expression" "" 61 at_xfail=no ( $as_echo "371. $at_setup_line: testing $at_desc ..." $at_traceon cat >parse.sps <<'_ATEOF' INPUT PROGRAM. LOOP c=1 to 10. COMPUTE var1=NORMAL(100). END CASE. END LOOP. END FILE. END INPUT PROGRAM. SELECT IF 2. _ATEOF { set +x $as_echo "$at_srcdir/parse.at:53: pspp -O format=csv parse.sps" at_fn_check_prepare_trace "parse.at:53" ( $at_check_trace; pspp -O format=csv parse.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"parse.sps:9: error: SELECT IF: A logical expression was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/parse.at:53" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_371 #AT_START_372 at_fn_group_banner 372 'command-name.at:19' \ "single words" " " 62 at_xfail=no ( $as_echo "372. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/command-name.at:21: command-name-test DESCRIPTIVES , DESCRIPTIVESX DESCRIPTIVES descr Des DEX DE '' 'DESCRIPTIVES MORE' 'DESCRIPTIVES MORE'" at_fn_check_prepare_trace "command-name.at:21" ( $at_check_trace; command-name-test DESCRIPTIVES , DESCRIPTIVESX DESCRIPTIVES descr Des DEX DE '' 'DESCRIPTIVES MORE' 'DESCRIPTIVES MORE' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "string=\"DESCRIPTIVESX\": command=\"DESCRIPTIVES\" match=no match: none, missing_words=0 string=\"DESCRIPTIVES\": command=\"DESCRIPTIVES\" match=yes exact=yes missing_words=0 match: DESCRIPTIVES, missing_words=0 string=\"descr\": command=\"DESCRIPTIVES\" match=yes exact=no missing_words=0 match: DESCRIPTIVES, missing_words=0 string=\"Des\": command=\"DESCRIPTIVES\" match=yes exact=no missing_words=0 match: DESCRIPTIVES, missing_words=0 string=\"DEX\": command=\"DESCRIPTIVES\" match=no match: none, missing_words=0 string=\"DE\": command=\"DESCRIPTIVES\" match=no match: none, missing_words=0 string=\"\": command=\"DESCRIPTIVES\" match=yes exact=yes missing_words=1 match: none, missing_words=1 string=\"DESCRIPTIVES MORE\": command=\"DESCRIPTIVES\" match=yes exact=yes missing_words=-1 match: DESCRIPTIVES, missing_words=-1 string=\"DESCRIPTIVES MORE\": command=\"DESCRIPTIVES\" match=yes exact=yes missing_words=-1 match: DESCRIPTIVES, missing_words=-1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command-name.at:21" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_372 #AT_START_373 at_fn_group_banner 373 'command-name.at:61' \ "two words without prefix match" " " 62 at_xfail=no ( $as_echo "373. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/command-name.at:63: command-name-test 'DO IF' 'DO REPEAT' , 'DO IF' 'DO REPEAT' 'DO REP' 'DO OTHER' 'D IF' 'DO I' DO" at_fn_check_prepare_trace "command-name.at:63" ( $at_check_trace; command-name-test 'DO IF' 'DO REPEAT' , 'DO IF' 'DO REPEAT' 'DO REP' 'DO OTHER' 'D IF' 'DO I' DO ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "string=\"DO IF\": command=\"DO IF\" match=yes exact=yes missing_words=0 command=\"DO REPEAT\" match=no match: DO IF, missing_words=0 string=\"DO REPEAT\": command=\"DO IF\" match=no command=\"DO REPEAT\" match=yes exact=yes missing_words=0 match: DO REPEAT, missing_words=0 string=\"DO REP\": command=\"DO IF\" match=no command=\"DO REPEAT\" match=yes exact=no missing_words=0 match: DO REPEAT, missing_words=0 string=\"DO OTHER\": command=\"DO IF\" match=no command=\"DO REPEAT\" match=no match: none, missing_words=0 string=\"D IF\": command=\"DO IF\" match=no command=\"DO REPEAT\" match=no match: none, missing_words=0 string=\"DO I\": command=\"DO IF\" match=no command=\"DO REPEAT\" match=no match: none, missing_words=0 string=\"DO\": command=\"DO IF\" match=yes exact=yes missing_words=1 command=\"DO REPEAT\" match=yes exact=yes missing_words=1 match: none, missing_words=1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command-name.at:63" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_373 #AT_START_374 at_fn_group_banner 374 'command-name.at:102' \ "two words with prefix match" " " 62 at_xfail=no ( $as_echo "374. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/command-name.at:104: command-name-test GET 'GET DATA' , GET 'GET TYPE' 'GET DAT' 'GET DATA'" at_fn_check_prepare_trace "command-name.at:104" ( $at_check_trace; command-name-test GET 'GET DATA' , GET 'GET TYPE' 'GET DAT' 'GET DATA' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "string=\"GET\": command=\"GET\" match=yes exact=yes missing_words=0 command=\"GET DATA\" match=yes exact=yes missing_words=1 match: none, missing_words=1 string=\"GET TYPE\": command=\"GET\" match=yes exact=yes missing_words=-1 command=\"GET DATA\" match=no match: GET, missing_words=-1 string=\"GET DAT\": command=\"GET\" match=yes exact=yes missing_words=-1 command=\"GET DATA\" match=yes exact=no missing_words=0 match: GET DATA, missing_words=0 string=\"GET DATA\": command=\"GET\" match=yes exact=yes missing_words=-1 command=\"GET DATA\" match=yes exact=yes missing_words=0 match: GET DATA, missing_words=0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command-name.at:104" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_374 #AT_START_375 at_fn_group_banner 375 'command-name.at:128' \ "ambiguous single-word names" " " 62 at_xfail=no ( $as_echo "375. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/command-name.at:130: command-name-test CASEPLOT CASESTOVARS , CAS Case CaseP CaseS" at_fn_check_prepare_trace "command-name.at:130" ( $at_check_trace; command-name-test CASEPLOT CASESTOVARS , CAS Case CaseP CaseS ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "string=\"CAS\": command=\"CASEPLOT\" match=yes exact=no missing_words=0 command=\"CASESTOVARS\" match=yes exact=no missing_words=0 match: none, missing_words=0 string=\"Case\": command=\"CASEPLOT\" match=yes exact=no missing_words=0 command=\"CASESTOVARS\" match=yes exact=no missing_words=0 match: none, missing_words=0 string=\"CaseP\": command=\"CASEPLOT\" match=yes exact=no missing_words=0 command=\"CASESTOVARS\" match=no match: CASEPLOT, missing_words=0 string=\"CaseS\": command=\"CASEPLOT\" match=no command=\"CASESTOVARS\" match=yes exact=no missing_words=0 match: CASESTOVARS, missing_words=0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command-name.at:130" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_375 #AT_START_376 at_fn_group_banner 376 'command-name.at:154' \ "ambiguous two-word names" " " 62 at_xfail=no ( $as_echo "376. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/command-name.at:156: command-name-test VARCOMP VARSTOCASES 'VARIABLE ATTRIBUTE' , VAR VARC VARS VARI 'VAR ATT'" at_fn_check_prepare_trace "command-name.at:156" ( $at_check_trace; command-name-test VARCOMP VARSTOCASES 'VARIABLE ATTRIBUTE' , VAR VARC VARS VARI 'VAR ATT' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "string=\"VAR\": command=\"VARCOMP\" match=yes exact=no missing_words=0 command=\"VARSTOCASES\" match=yes exact=no missing_words=0 command=\"VARIABLE ATTRIBUTE\" match=yes exact=no missing_words=1 match: none, missing_words=1 string=\"VARC\": command=\"VARCOMP\" match=yes exact=no missing_words=0 command=\"VARSTOCASES\" match=no command=\"VARIABLE ATTRIBUTE\" match=no match: VARCOMP, missing_words=0 string=\"VARS\": command=\"VARCOMP\" match=no command=\"VARSTOCASES\" match=yes exact=no missing_words=0 command=\"VARIABLE ATTRIBUTE\" match=no match: VARSTOCASES, missing_words=0 string=\"VARI\": command=\"VARCOMP\" match=no command=\"VARSTOCASES\" match=no command=\"VARIABLE ATTRIBUTE\" match=yes exact=no missing_words=1 match: none, missing_words=1 string=\"VAR ATT\": command=\"VARCOMP\" match=yes exact=no missing_words=-1 command=\"VARSTOCASES\" match=yes exact=no missing_words=-1 command=\"VARIABLE ATTRIBUTE\" match=yes exact=no missing_words=0 match: VARIABLE ATTRIBUTE, missing_words=0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command-name.at:156" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_376 #AT_START_377 at_fn_group_banner 377 'command-name.at:190' \ "numbers and punctuation" " " 62 at_xfail=no ( $as_echo "377. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/command-name.at:192: command-name-test T-TEST 2SLS LIST , T-TEST 'T - Test' 2SLS '2 SLS' List" at_fn_check_prepare_trace "command-name.at:192" ( $at_check_trace; command-name-test T-TEST 2SLS LIST , T-TEST 'T - Test' 2SLS '2 SLS' List ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "string=\"T-TEST\": command=\"T-TEST\" match=yes exact=yes missing_words=0 command=\"2SLS\" match=no command=\"LIST\" match=no match: T-TEST, missing_words=0 string=\"T - Test\": command=\"T-TEST\" match=yes exact=yes missing_words=0 command=\"2SLS\" match=no command=\"LIST\" match=no match: T-TEST, missing_words=0 string=\"2SLS\": command=\"T-TEST\" match=no command=\"2SLS\" match=yes exact=yes missing_words=0 command=\"LIST\" match=no match: 2SLS, missing_words=0 string=\"2 SLS\": command=\"T-TEST\" match=no command=\"2SLS\" match=yes exact=yes missing_words=0 command=\"LIST\" match=no match: 2SLS, missing_words=0 string=\"List\": command=\"T-TEST\" match=no command=\"2SLS\" match=no command=\"LIST\" match=yes exact=yes missing_words=0 match: LIST, missing_words=0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command-name.at:192" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_377 #AT_START_378 at_fn_group_banner 378 'command-name.at:226' \ "off by more than one word" " " 62 at_xfail=no ( $as_echo "378. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/command-name.at:228: command-name-test 'a b c' , a 'a b' 'a b c' 'a b c d' 'a b c d e'" at_fn_check_prepare_trace "command-name.at:228" ( $at_check_trace; command-name-test 'a b c' , a 'a b' 'a b c' 'a b c d' 'a b c d e' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "string=\"a\": command=\"a b c\" match=yes exact=yes missing_words=2 match: none, missing_words=1 string=\"a b\": command=\"a b c\" match=yes exact=yes missing_words=1 match: none, missing_words=1 string=\"a b c\": command=\"a b c\" match=yes exact=yes missing_words=0 match: a b c, missing_words=0 string=\"a b c d\": command=\"a b c\" match=yes exact=yes missing_words=-1 match: a b c, missing_words=-1 string=\"a b c d e\": command=\"a b c\" match=yes exact=yes missing_words=-2 match: a b c, missing_words=-2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/command-name.at:228" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_378 #AT_START_379 at_fn_group_banner 379 'lexer.at:19' \ "lexer ignores initial #! line" " " 63 at_xfail=no ( $as_echo "379. $at_setup_line: testing $at_desc ..." $at_traceon cat >lexer.sps <<'_ATEOF' #! /usr/local/bin/pspp DATA LIST LIST NOTABLE /a. BEGIN DATA. 1 2 END DATA. LIST. _ATEOF { set +x $as_echo "$at_srcdir/lexer.at:29: pspp -o pspp.csv lexer.sps" at_fn_check_prepare_trace "lexer.at:29" ( $at_check_trace; pspp -o pspp.csv lexer.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/lexer.at:29" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/lexer.at:30: cat pspp.csv" at_fn_check_prepare_trace "lexer.at:30" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List a 1.00 2.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/lexer.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_379 #AT_START_380 at_fn_group_banner 380 'lexer.at:38' \ "lexer properly reports scan errors" " " 63 at_xfail=no ( $as_echo "380. $at_setup_line: testing $at_desc ..." $at_traceon cat >lexer.sps <<'_ATEOF' x'123' x'1x' u'' u'012345678' u'd800' u'110000' 'foo 'very long unterminated string that be ellipsized in its error message 1e .x ` � _ATEOF { set +x $as_echo "$at_srcdir/lexer.at:52: pspp -O format=csv lexer.sps" at_fn_check_prepare_trace "lexer.at:52" ( $at_check_trace; pspp -O format=csv lexer.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"lexer.sps:1.1-1.6: error: Syntax error at \`x'123'': String of hex digits has 3 characters, which is not a multiple of 2.\" lexer.sps:2.1-2.5: error: Syntax error at \`x'1x'': \`x' is not a valid hex digit. \"lexer.sps:3.1-3.3: error: Syntax error at \`u''': Unicode string contains 0 bytes, which is not in the valid range of 1 to 8 bytes.\" \"lexer.sps:4.1-4.12: error: Syntax error at \`u'012345678'': Unicode string contains 9 bytes, which is not in the valid range of 1 to 8 bytes.\" lexer.sps:5.1-5.7: error: Syntax error at \`u'd800'': U+D800 is not a valid Unicode code point. lexer.sps:6.1-6.9: error: Syntax error at \`u'110000'': U+110000 is not a valid Unicode code point. lexer.sps:7.1-7.4: error: Syntax error at \`'foo': Unterminated string constant. lexer.sps:8.1-8.70: error: Syntax error at \`'very long unterminated string that be ellipsized in its err...': Unterminated string constant. lexer.sps:9.1-9.2: error: Syntax error at \`1e': Missing exponent following \`1e'. lexer.sps:9.4: error: Syntax error at \`.': Unexpected \`.' in middle of command. lexer.sps:9: error: Unknown command \`x'. lexer.sps:10.1: error: Syntax error at \`\`': Bad character \`\`' in input. lexer.sps:11.1: error: Syntax error at \`�': Bad character U+FFFD in input. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/lexer.at:52" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_380 #AT_START_381 at_fn_group_banner 381 'lexer.at:82' \ "lexer crash due to null byte" " " 63 at_xfail=no ( $as_echo "381. $at_setup_line: testing $at_desc ..." $at_traceon # Intentionally leave out the new-line and add a null byte: printf "datA dist list notable file='input.txt'/a b c. lis|.\0" > lexer.sps # We sort the output into a predictable order because the lexer finds # and reports null bytes as soon as it reads them into its input # buffer, as opposed to when it encounters them during tokenization. # This also means that null bytes might be reported as part of one # command or another or none, hence removing the LIST: prefix. { set +x $as_echo "$at_srcdir/lexer.at:92: pspp -O format=csv lexer.sps > lexer.csv" at_fn_check_prepare_trace "lexer.at:92" ( $at_check_trace; pspp -O format=csv lexer.sps > lexer.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/lexer.at:92" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/lexer.at:93: sed '/^\$/d s/LIST: //' lexer.csv | sort" at_fn_check_prepare_notrace 'an embedded newline' "lexer.at:93" ( $at_check_trace; sed '/^$/d s/LIST: //' lexer.csv | sort ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "lexer.sps: error: Bad character U+0000 in input. lexer.sps:1: error: Unknown command \`datA dist'. lexer.sps:2: error: LIST is allowed only after the active dataset has been defined. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/lexer.at:93" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_381 #AT_START_382 at_fn_group_banner 382 'q2c.at:19' \ "q2c enforces mandatory subcommands" " " 64 at_xfail=no ( $as_echo "382. $at_setup_line: testing $at_desc ..." $at_traceon cat >q2c.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x *. BEGIN DATA. 1 2 3 END DATA. EXAMINE. ONEWAY. CROSSTABS. _ATEOF { set +x $as_echo "$at_srcdir/q2c.at:32: pspp -O format=csv q2c.sps" at_fn_check_prepare_trace "q2c.at:32" ( $at_check_trace; pspp -O format=csv q2c.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "q2c.sps:8.8: error: EXAMINE: Syntax error at end of command: expecting variable name. q2c.sps:9.7: error: ONEWAY: Syntax error at end of command: expecting variable name. q2c.sps:10: error: CROSSTABS: Required subcommand TABLES was not specified. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/q2c.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_382 #AT_START_383 at_fn_group_banner 383 'scan.at:21' \ "identifiers" " " 65 at_xfail=no ( $as_echo "383. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' a aB i5 $x @efg @@. #.# .x _z. abcd. abcd. QRSTUV./* end of line comment */ QrStUv./* end of line comment */ WXYZ. /* unterminated end of line comment �. /* U+FFFD is not valid in an identifier _ATEOF cat >expout <<'_ATEOF' ID "a" SKIP ID "aB" SKIP ID "i5" SKIP ID "$x" SKIP ID "@efg" SKIP ID "@@." SKIP ID "#.#" SKIP UNEXPECTED_DOT ID "x" SKIP UNEXPECTED_CHAR 95 ID "z" ENDCMD SKIP ID "abcd." SKIP ID "abcd" ENDCMD SKIP ID "QRSTUV" ENDCMD SKIP SKIP ID "QrStUv" ENDCMD SKIP SKIP SKIP ID "WXYZ" ENDCMD SKIP SKIP SKIP UNEXPECTED_CHAR 65533 ENDCMD SKIP SKIP SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:79: scan-test -i input" at_fn_check_prepare_trace "scan.at:79" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:79" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_383 #AT_START_384 at_fn_group_banner 384 'scan.at:82' \ "reserved words" " " 65 at_xfail=no ( $as_echo "384. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' and or not eq ge gt le lt ne all by to with AND OR NOT EQ GE GT LE LT NE ALL BY TO WITH andx orx notx eqx gex gtx lex ltx nex allx byx tox withx and. with. _ATEOF cat >expout <<'_ATEOF' AND SKIP OR SKIP NOT SKIP EQ SKIP GE SKIP GT SKIP LE SKIP LT SKIP NE SKIP ALL SKIP BY SKIP TO SKIP WITH SKIP AND SKIP OR SKIP NOT SKIP EQ SKIP GE SKIP GT SKIP LE SKIP LT SKIP NE SKIP ALL SKIP BY SKIP TO SKIP WITH SKIP ID "andx" SKIP ID "orx" SKIP ID "notx" SKIP ID "eqx" SKIP ID "gex" SKIP ID "gtx" SKIP ID "lex" SKIP ID "ltx" SKIP ID "nex" SKIP ID "allx" SKIP ID "byx" SKIP ID "tox" SKIP ID "withx" SKIP ID "and." SKIP WITH ENDCMD SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:176: scan-test -i input" at_fn_check_prepare_trace "scan.at:176" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:176" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_384 #AT_START_385 at_fn_group_banner 385 'scan.at:179' \ "punctuation" " " 65 at_xfail=no ( $as_echo "385. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' ~ & | = >= > <= < ~= <> ( ) , - + * / [ ] ** ~&|=>=><=<~=<>(),-+*/[]** _ATEOF cat >expout <<'_ATEOF' NOT SKIP AND SKIP OR SKIP EQUALS SKIP GE SKIP GT SKIP LE SKIP LT SKIP NE SKIP NE SKIP LPAREN SKIP RPAREN SKIP COMMA SKIP DASH SKIP PLUS SKIP ASTERISK SKIP SLASH SKIP LBRACK SKIP RBRACK SKIP EXP SKIP NOT AND OR EQUALS GE GT LE LT NE NE LPAREN RPAREN COMMA DASH PLUS ASTERISK SLASH LBRACK RBRACK EXP SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:249: scan-test -i input" at_fn_check_prepare_trace "scan.at:249" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:249" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_385 #AT_START_386 at_fn_group_banner 386 'scan.at:252' \ "numbers" " " 65 at_xfail=no ( $as_echo "386. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 0 1 01 001. 1. 123. /* comment 1 */ /* comment 2 */ .1 0.1 00.1 00.10 5e1 6E-1 7e+1 6E+01 6e-03 .3E1 .4e-1 .5E+1 .6e+01 .7E-03 1.23e1 45.6E-1 78.9e+1 99.9E+01 11.2e-03 . 1e e1 1e+ 1e- _ATEOF cat >expout <<'_ATEOF' POS_NUM SKIP POS_NUM 1 SKIP POS_NUM 1 SKIP POS_NUM 1 SKIP POS_NUM 1 ENDCMD SKIP POS_NUM 123 ENDCMD SKIP SKIP SKIP SKIP SKIP ENDCMD POS_NUM 1 SKIP POS_NUM 0.1 SKIP POS_NUM 0.1 SKIP POS_NUM 0.1 SKIP POS_NUM 50 SKIP POS_NUM 0.6 SKIP POS_NUM 70 SKIP POS_NUM 60 SKIP POS_NUM 0.006 SKIP ENDCMD POS_NUM 30 SKIP POS_NUM 0.04 SKIP POS_NUM 5 SKIP POS_NUM 6 SKIP POS_NUM 0.0007 SKIP POS_NUM 12.3 SKIP POS_NUM 4.56 SKIP POS_NUM 789 SKIP POS_NUM 999 SKIP POS_NUM 0.0112 SKIP ENDCMD SKIP EXPECTED_EXPONENT "1e" SKIP ID "e1" SKIP EXPECTED_EXPONENT "1e+" SKIP EXPECTED_EXPONENT "1e-" SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:334: scan-test -i input" at_fn_check_prepare_trace "scan.at:334" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:334" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_386 #AT_START_387 at_fn_group_banner 387 'scan.at:337' \ "strings" " " 65 at_xfail=no ( $as_echo "387. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 'x' "y" 'abc' 'Don''t' "Can't" 'Won''t' """quoted""" '"quoted"' '' "" '''' """" 'missing end quote "missing double quote 'x' + "y" + 'z' + 'a' /* abc */ + "b" /* + 'c' +/* */"d"/* */+'e' 'foo' + /* special case: + in column 0 would ordinarily start a new command 'bar' 'foo' + 'bar' 'foo' + 'bar' + x"4142"+'5152' "4142"+ x'5152' x"4142" +u'304a' "�あいうえお" "abc"+U"FFFD"+u'3048'+"xyz" _ATEOF cat >expout <<'_ATEOF' STRING "x" SKIP STRING "y" SKIP STRING "abc" SKIP STRING "Don't" SKIP STRING "Can't" SKIP STRING "Won't" SKIP STRING ""quoted"" SKIP STRING ""quoted"" SKIP STRING "" SKIP STRING "" SKIP STRING "'" SKIP STRING """ SKIP EXPECTED_QUOTE SKIP EXPECTED_QUOTE SKIP STRING "xyzabcde" SKIP STRING "foobar" SKIP STRING "foobar" SKIP STRING "foo" SKIP PLUS SKIP ENDCMD SKIP STRING "bar" SKIP ENDCMD SKIP PLUS SKIP STRING "AB5152" SKIP STRING "4142QR" SKIP STRING "ABお" SKIP STRING "�あいうえお" SKIP STRING "abc�えxyz" SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:429: scan-test -i input" at_fn_check_prepare_trace "scan.at:429" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:429" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_387 #AT_START_388 at_fn_group_banner 388 'scan.at:432' \ "#! construct" " " 65 at_xfail=no ( $as_echo "388. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' #! /usr/bin/pspp #! /usr/bin/pspp _ATEOF cat >expout <<'_ATEOF' SKIP SKIP ID "#" UNEXPECTED_CHAR 33 SKIP SLASH ID "usr" SLASH ID "bin" SLASH ID "pspp" SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:453: scan-test -i input" at_fn_check_prepare_trace "scan.at:453" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:453" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_388 #AT_START_389 at_fn_group_banner 389 'scan.at:456' \ "* and COMMENT commands" " " 65 at_xfail=no ( $as_echo "389. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' * Comment commands "don't have to contain valid tokens. ** Check ambiguity with ** token. ****************. comment keyword works too. COMM also. com is ambiguous with COMPUTE. * Comment need not start at left margin. * Comment ends with blank line next command. _ATEOF cat >expout <<'_ATEOF' SKIP SKIP SKIP ENDCMD SKIP ENDCMD SKIP SKIP ENDCMD SKIP SKIP ENDCMD SKIP ENDCMD SKIP SKIP ENDCMD SKIP SKIP ENDCMD SKIP ID "com" SKIP ID "is" SKIP ID "ambiguous" SKIP WITH SKIP ID "COMPUTE" ENDCMD SKIP ENDCMD SKIP SKIP SKIP ENDCMD SKIP ENDCMD SKIP SKIP SKIP ENDCMD SKIP ID "next" SKIP ID "command" ENDCMD SKIP ENDCMD SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:530: scan-test -i input" at_fn_check_prepare_trace "scan.at:530" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:530" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_389 #AT_START_390 at_fn_group_banner 390 'scan.at:533' \ "DOCUMENT command" " " 65 at_xfail=no ( $as_echo "390. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' DOCUMENT one line. DOC more than one line. docu first.paragraph isn't parsed as tokens second paragraph. _ATEOF cat >expout <<'_ATEOF' ID "DOCUMENT" STRING "DOCUMENT one line." ENDCMD ENDCMD SKIP ID "DOCUMENT" STRING "DOC more" SKIP STRING " than" SKIP STRING " one" SKIP STRING " line." ENDCMD ENDCMD SKIP ID "DOCUMENT" STRING "docu" SKIP STRING "first.paragraph" SKIP STRING "isn't parsed as tokens" SKIP STRING "" SKIP STRING "second paragraph." ENDCMD ENDCMD SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:579: scan-test -i input" at_fn_check_prepare_trace "scan.at:579" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:579" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_390 #AT_START_391 at_fn_group_banner 391 'scan.at:582' \ "TITLE, SUBTITLE, FILE LABEL commands" " " 65 at_xfail=no ( $as_echo "391. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' title/**/'Quoted string title'. tit /* "Quoted string on second line". sub "Quoted string subtitle" . TITL /* Not a */ quoted string title. SUBT Not a quoted string /* subtitle FIL label isn't quoted. FILE lab 'is quoted'. FILE /* /**/ lab not quoted here either _ATEOF cat >expout <<'_ATEOF' ID "title" SKIP STRING "Quoted string title" ENDCMD SKIP ID "tit" SKIP SKIP SKIP STRING "Quoted string on second line" ENDCMD SKIP ID "sub" SKIP STRING "Quoted string subtitle" SKIP SKIP ENDCMD SKIP ENDCMD SKIP ID "TITL" SKIP STRING "/* Not a */ quoted string title" ENDCMD SKIP ID "SUBT" SKIP STRING "Not a quoted string /* subtitle" SKIP ENDCMD SKIP ID "FIL" SKIP ID "label" SKIP STRING "isn't quoted" ENDCMD SKIP ID "FILE" SKIP SKIP ID "lab" SKIP STRING "is quoted" ENDCMD SKIP ID "FILE" SKIP SKIP SKIP SKIP SKIP ID "lab" SKIP STRING "not quoted here either" SKIP ENDCMD SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:663: scan-test -i input" at_fn_check_prepare_trace "scan.at:663" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:663" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_391 #AT_START_392 at_fn_group_banner 392 'scan.at:666' \ "BEGIN DATA command" " " 65 at_xfail=no ( $as_echo "392. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' begin data. 123 xxx end data. BEG /**/ DAT /* 5 6 7 /* x end data end data . _ATEOF cat >expout <<'_ATEOF' ID "begin" SKIP ID "data" ENDCMD SKIP STRING "123" SKIP STRING "xxx" SKIP ID "end" SKIP ID "data" ENDCMD SKIP ENDCMD SKIP ID "BEG" SKIP SKIP SKIP ID "DAT" SKIP SKIP SKIP STRING "5 6 7 /* x" SKIP STRING "" SKIP STRING "end data" SKIP ID "end" SKIP ID "data" SKIP ENDCMD SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:720: scan-test -i input" at_fn_check_prepare_trace "scan.at:720" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:720" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_392 #AT_START_393 at_fn_group_banner 393 'scan.at:723' \ "DO REPEAT command" " " 65 at_xfail=no ( $as_echo "393. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' do repeat x=a b c y=d e f. do repeat a=1 thru 5. another command. second command + third command. end /* x */ /* y */ repeat print. end repeat. _ATEOF cat >expout <<'_ATEOF' ID "do" SKIP ID "repeat" SKIP ID "x" EQUALS ID "a" SKIP ID "b" SKIP ID "c" SKIP SKIP ID "y" EQUALS ID "d" SKIP ID "e" SKIP ID "f" ENDCMD SKIP STRING " do repeat a=1 thru 5." SKIP STRING "another command." SKIP STRING "second command" SKIP STRING "+ third command." SKIP STRING "end /* x */ /* y */ repeat print." SKIP ID "end" SKIP SKIP ID "repeat" ENDCMD SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:777: scan-test -i input" at_fn_check_prepare_trace "scan.at:777" ( $at_check_trace; scan-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:777" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_393 #AT_START_394 at_fn_group_banner 394 'scan.at:780' \ "batch mode" " " 65 at_xfail=no ( $as_echo "394. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' first command another line of first command + second command third command fourth command. fifth command. _ATEOF cat >expout <<'_ATEOF' ID "first" SKIP ID "command" SKIP SKIP ID "another" SKIP ID "line" SKIP ID "of" SKIP ID "first" SKIP ID "command" SKIP ENDCMD SKIP ID "second" SKIP ID "command" SKIP ENDCMD ID "third" SKIP ID "command" SKIP ENDCMD SKIP ID "fourth" SKIP ID "command" ENDCMD SKIP SKIP ID "fifth" SKIP ID "command" ENDCMD SKIP STOP _ATEOF { set +x $as_echo "$at_srcdir/scan.at:833: scan-test -b input" at_fn_check_prepare_trace "scan.at:833" ( $at_check_trace; scan-test -b input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/scan.at:833" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_394 #AT_START_395 at_fn_group_banner 395 'segment.at:24' \ "identifiers" " " 66 at_xfail=no ( $as_echo "395. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' a ab abc abcd A AB ABC ABCD aB aBC aBcD $x $y $z grève Ângstrom poté #a #b #c ## #d @efg @ @@. @#@ ## # #12345 #.# f@#_.#6 GhIjK .x 1y _z _ATEOF cat >expout <<'_ATEOF' identifier a space identifier ab space identifier abc space identifier abcd newline \n (later) identifier A space identifier AB space identifier ABC space identifier ABCD newline \n (later) identifier aB space identifier aBC space identifier aBcD newline \n (later) identifier $x space identifier $y space identifier $z newline \n (later) identifier grève spaces identifier Ângstrom spaces identifier poté newline \n (later) identifier #a space identifier #b space identifier #c space identifier ## space identifier #d newline \n (later) identifier @efg space identifier @ space identifier @@. space identifier @#@ space newline \n (later) identifier ## space identifier # space identifier #12345 space identifier #.# newline \n (later) identifier f@#\_.#6 newline \n (later) identifier GhIjK newline \n (later) start_command . identifier x space number 1 identifier y space unexpected_char \_ identifier z newline \n (later) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:104: segment-test -i input" at_fn_check_prepare_trace "segment.at:104" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:104" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:104: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:104" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:104" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:104: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:104" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:104" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:104: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:104" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:104" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_395 #AT_START_396 at_fn_group_banner 396 'segment.at:107' \ "identifiers that end in '.'" " " 66 at_xfail=no ( $as_echo "396. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' abcd. abcd. ABCD. ABCD. aBcD. aBcD. $y. $z. あいうえお. #c. #d.. @@. @@.... #.#. #abcd. . . LMNOP. QRSTUV./* end of line comment */ qrstuv. /* end of line comment */ QrStUv./* end of line comment */ wxyz./* unterminated end of line comment WXYZ. /* unterminated end of line comment WxYz./* unterminated end of line comment _ATEOF cat >expout <<'_ATEOF' identifier abcd. space identifier abcd end_command . newline \n (first) identifier ABCD. space identifier ABCD end_command . newline \n (first) identifier aBcD. space identifier aBcD end_command . space newline \n (first) identifier $y. space identifier $z. space identifier あいうえお end_command . newline \n (first) identifier #c. space identifier #d. end_command . newline \n (first) identifier @@. space identifier @@... end_command . newline \n (first) identifier #.# end_command . newline \n (first) identifier #abcd end_command . newline \n (first) start_command . newline \n (first) start_command . space newline \n (first) identifier LMNOP end_command . space newline \n (first) identifier QRSTUV end_command . comment /*_end_of_line_comment_*/ newline \n (first) identifier qrstuv end_command . space comment /*_end_of_line_comment_*/ newline \n (first) identifier QrStUv end_command . comment /*_end_of_line_comment_*/ space newline \n (first) identifier wxyz end_command . comment /*_unterminated_end_of_line_comment newline \n (first) identifier WXYZ end_command . space comment /*_unterminated_end_of_line_comment newline \n (first) identifier WxYz end_command . comment /*_unterminated_end_of_line_comment_ newline \n (first) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:210: segment-test -i input" at_fn_check_prepare_trace "segment.at:210" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:210" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:210: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:210" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:210" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:210: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:210" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:210" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:210: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:210" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:210" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_396 #AT_START_397 at_fn_group_banner 397 'segment.at:213' \ "reserved words" " " 66 at_xfail=no ( $as_echo "397. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' and or not eq ge gt le lt ne all by to with AND OR NOT EQ GE GT LE LT NE ALL BY TO WITH andx orx notx eqx gex gtx lex ltx nex allx byx tox withx and. with. _ATEOF cat >expout <<'_ATEOF' reserved_word and space reserved_word or space reserved_word not space reserved_word eq space reserved_word ge space reserved_word gt space reserved_word le space reserved_word lt space reserved_word ne space reserved_word all space reserved_word by space reserved_word to space reserved_word with newline \n (later) reserved_word AND space reserved_word OR space reserved_word NOT space reserved_word EQ space reserved_word GE space reserved_word GT space reserved_word LE space reserved_word LT space reserved_word NE space reserved_word ALL space reserved_word BY space reserved_word TO space reserved_word WITH newline \n (later) identifier andx space identifier orx space identifier notx space identifier eqx space identifier gex space identifier gtx space identifier lex space identifier ltx space identifier nex space identifier allx space identifier byx space identifier tox space identifier withx newline \n (later) identifier and. space reserved_word with end_command . newline \n (first) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:274: segment-test -i input" at_fn_check_prepare_trace "segment.at:274" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:274" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:274: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:274" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:274" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:274: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:274" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:274" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:274: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:274" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:274" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_397 #AT_START_398 at_fn_group_banner 398 'segment.at:277' \ "punctuation" " " 66 at_xfail=no ( $as_echo "398. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' ~ & | = >= > <= < ~= <> ( ) , - + * / [ ] ** ~&|=>=><=<~=<>(),-+*/[]** _ATEOF cat >expout <<'_ATEOF' punct ~ space punct & space punct | space punct = space punct >= space punct > space punct <= space punct < space punct ~= space punct <> space punct ( space punct ) space punct , space punct - space punct + space punct * space punct / space punct [ space punct ] space punct ** newline \n (later) punct ~ punct & punct | punct = punct >= punct > punct <= punct < punct ~= punct <> punct ( punct ) punct , punct - punct + punct * punct / punct [ punct ] punct ** newline \n (later) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:330: segment-test -i input" at_fn_check_prepare_trace "segment.at:330" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:330" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:330: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:330" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:330" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:330: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:330" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:330" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:330: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:330" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:330" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_398 #AT_START_399 at_fn_group_banner 399 'segment.at:333' \ "numbers" " " 66 at_xfail=no ( $as_echo "399. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 0 1 01 001. 1. 123. /* comment 1 */ /* comment 2 */ .1 0.1 00.1 00.10 5e1 6E-1 7e+1 6E+01 6e-03 .3E1 .4e-1 .5E+1 .6e+01 .7E-03 1.23e1 45.6E-1 78.9e+1 99.9E+01 11.2e-03 . 1e e1 1e+ 1e- _ATEOF cat >expout <<'_ATEOF' number 0 space number 1 space number 01 space number 001. space number 1 end_command . newline \n (first) number 123 end_command . space comment /*_comment_1_*/ space comment /*_comment_2_*/ newline \n (first) start_command . number 1 space number 0.1 space number 00.1 space number 00.10 newline \n (later) number 5e1 space number 6E-1 space number 7e+1 space number 6E+01 space number 6e-03 newline \n (later) start_command . number 3E1 space number .4e-1 space number .5E+1 space number .6e+01 space number .7E-03 newline \n (later) number 1.23e1 space number 45.6E-1 space number 78.9e+1 space number 99.9E+01 space number 11.2e-03 newline \n (later) start_command . space expected_exponent 1e space identifier e1 space expected_exponent 1e+ space expected_exponent 1e- newline \n (later) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:397: segment-test -i input" at_fn_check_prepare_trace "segment.at:397" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:397" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:397: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:397" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:397" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:397: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:397" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:397" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:397: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:397" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:397" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_399 #AT_START_400 at_fn_group_banner 400 'segment.at:400' \ "strings" " " 66 at_xfail=no ( $as_echo "400. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 'x' "y" 'abc' 'Don''t' "Can't" 'Won''t' """quoted""" '"quoted"' '' "" 'missing end quote "missing double quote x"4142" X'5152' u'fffd' U"041" + new command + /* comment */ 'string continuation' + /* also a punctuator on blank line - 'new command' _ATEOF cat >expout <<'_ATEOF' quoted_string 'x' space quoted_string "y" space quoted_string 'abc' newline \n (later) quoted_string 'Don''t' space quoted_string "Can't" space quoted_string 'Won''t' newline \n (later) quoted_string """quoted""" space quoted_string '"quoted"' newline \n (later) quoted_string '' space quoted_string "" newline \n (later) expected_quote 'missing_end_quote newline \n (later) expected_quote "missing_double_quote newline \n (later) hex_string x"4142" space hex_string X'5152' newline \n (later) unicode_string u'fffd' space unicode_string U"041" newline \n (later) start_command + space identifier new space identifier command newline \n (later) punct + space comment /*_comment_*/ space quoted_string 'string_continuation' newline \n (later) punct + space comment /*_also_a_punctuator_on_blank_line newline \n (later) start_command - space quoted_string 'new_command' newline \n (later) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:469: segment-test -i input" at_fn_check_prepare_trace "segment.at:469" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:469" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:469: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:469" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:469" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:469: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:469" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:469" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:469: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:469" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:469" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_400 #AT_START_401 at_fn_group_banner 401 'segment.at:472' \ "#! construct" " " 66 at_xfail=no ( $as_echo "401. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' #! /usr/bin/pspp title my title. #! /usr/bin/pspp _ATEOF cat >expout <<'_ATEOF' shbang #!_/usr/bin/pspp newline \n (first) identifier title space unquoted_string my_title end_command . newline \n (first) identifier # unexpected_char ! space punct / identifier usr punct / identifier bin punct / identifier pspp newline \n (later) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:500: segment-test -i input" at_fn_check_prepare_trace "segment.at:500" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:500" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:500: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:500" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:500" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:500: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:500" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:500" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:500: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:500" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:500" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_401 #AT_START_402 at_fn_group_banner 402 'segment.at:503' \ "* and COMMENT commands" " " 66 at_xfail=no ( $as_echo "402. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' * Comment commands "don't have to contain valid tokens. ** Check ambiguity with ** token. ****************. comment keyword works too. COMM also. com is ambiguous with COMPUTE. * Comment need not start at left margin. * Comment ends with blank line next command. _ATEOF cat >expout <<'_ATEOF' comment_command *_Comment_commands_"don't newline \n (COMMENT) comment_command have_to_contain_valid_tokens end_command . newline \n (first) separate_commands newline \n (first) comment_command **_Check_ambiguity_with_**_token end_command . newline \n (first) comment_command **************** end_command . newline \n (first) separate_commands newline \n (first) comment_command comment_keyword_works_too end_command . newline \n (first) comment_command COMM_also end_command . newline \n (first) identifier com space identifier is space identifier ambiguous space reserved_word with space identifier COMPUTE end_command . newline \n (first) separate_commands newline \n (first) spaces ___ comment_command *_Comment_need_not_start_at_left_margin end_command . newline \n (first) separate_commands newline \n (first) comment_command *_Comment_ends_with_blank_line newline \n (COMMENT) separate_commands newline \n (first) identifier next space identifier command end_command . newline \n (first) separate_commands newline \n (first) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:588: segment-test -i input" at_fn_check_prepare_trace "segment.at:588" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:588" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:588: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:588" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:588" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:588: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:588" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:588" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:588: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:588" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:588" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_402 #AT_START_403 at_fn_group_banner 403 'segment.at:591' \ "DOCUMENT command" " " 66 at_xfail=no ( $as_echo "403. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' DOCUMENT one line. DOC more than one line. docu first.paragraph isn't parsed as tokens second paragraph. _ATEOF cat >expout <<'_ATEOF' start_document document DOCUMENT_one_line. end_command separate_commands newline \n (first) start_document document DOC_more newline \n (DOCUMENT) document ____than newline \n (DOCUMENT) document ________one newline \n (DOCUMENT) document ____________line. end_command separate_commands newline \n (first) start_document document docu newline \n (DOCUMENT) document first.paragraph newline \n (DOCUMENT) document isn't_parsed_as_tokens newline \n (DOCUMENT) document newline \n (DOCUMENT) document second_paragraph. end_command separate_commands newline \n (first) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:647: segment-test -i input" at_fn_check_prepare_trace "segment.at:647" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:647" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:647: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:647" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:647" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:647: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:647" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:647" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:647: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:647" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:647" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_403 #AT_START_404 at_fn_group_banner 404 'segment.at:650' \ "TITLE, SUBTITLE, FILE LABEL commands" " " 66 at_xfail=no ( $as_echo "404. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' title/**/'Quoted string title'. tit /* "Quoted string on second line". sub "Quoted string subtitle" . TITL /* Not a */ quoted string title. SUBT Not a quoted string /* subtitle FIL label isn't quoted. FILE lab 'is quoted'. FILE /* /**/ lab not quoted here either _ATEOF cat >expout <<'_ATEOF' identifier title comment /**/ quoted_string 'Quoted_string_title' end_command . newline \n (first) identifier tit space comment /* newline \n (later) quoted_string "Quoted_string_on_second_line" end_command . newline \n (first) identifier sub space quoted_string "Quoted_string_subtitle" newline \n (later) space end_command . newline \n (first) separate_commands newline \n (first) identifier TITL space unquoted_string /*_Not_a_*/_quoted_string_title end_command . newline \n (first) identifier SUBT space unquoted_string Not_a_quoted_string_/*_subtitle newline \n (later) separate_commands newline \n (first) identifier FIL space identifier label space unquoted_string isn't_quoted end_command . newline \n (first) identifier FILE newline \n (later) spaces __ identifier lab space quoted_string 'is_quoted' end_command . newline \n (first) identifier FILE space comment /* newline \n (later) comment /**/ spaces __ identifier lab space unquoted_string not_quoted_here_either newline \n (later) separate_commands newline \n (first) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:736: segment-test -i input" at_fn_check_prepare_trace "segment.at:736" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:736" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:736: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:736" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:736" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:736: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:736" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:736" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:736: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:736" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:736" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_404 #AT_START_405 at_fn_group_banner 405 'segment.at:739' \ "BEGIN DATA command" " " 66 at_xfail=no ( $as_echo "405. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' begin data. end data. begin data. /* 123 xxx end data. BEG /**/ DAT /* 5 6 7 /* x end data end data . begin data. data end data. begin data "xxx". begin data 123. not data _ATEOF cat >expout <<'_ATEOF' identifier begin space identifier data end_command . newline \n (data) identifier end space identifier data end_command . newline \n (first) separate_commands newline \n (first) identifier begin space identifier data end_command . space comment /* newline \n (data) inline_data 123 newline \n (data) inline_data xxx newline \n (data) identifier end space identifier data end_command . newline \n (first) separate_commands newline \n (first) identifier BEG space comment /**/ space identifier DAT space comment /* newline \n (data) inline_data 5_6_7_/*_x newline \n (data) inline_data newline \n (data) inline_data end__data newline \n (data) identifier end space identifier data newline \n (later) start_command . newline \n (first) separate_commands newline \n (first) identifier begin newline \n (later) space identifier data end_command . newline \n (data) inline_data data newline \n (data) identifier end space identifier data end_command . newline \n (first) separate_commands newline \n (first) identifier begin space identifier data space quoted_string "xxx" end_command . newline \n (first) identifier begin space identifier data space number 123 end_command . newline \n (first) reserved_word not space identifier data newline \n (later) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:861: segment-test -i input" at_fn_check_prepare_trace "segment.at:861" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:861" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:861: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:861" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:861" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:861: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:861" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:861" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:861: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:861" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:861" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_405 #AT_START_406 at_fn_group_banner 406 'segment.at:864' \ "DO REPEAT command" " " 66 at_xfail=no ( $as_echo "406. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' do repeat x=a b c y=d e f. do repeat a=1 thru 5. another command. second command + third command. end /* x */ /* y */ repeat print. end repeat. do repeat #a=1. inner command. end repeat. _ATEOF cat >expout <<'_ATEOF' identifier do space identifier repeat space identifier x punct = identifier a space identifier b space identifier c newline \n (later) spaces __________ identifier y punct = identifier d space identifier e space identifier f end_command . newline \n (DO REPEAT) do_repeat_command __do_repeat_a=1_thru_5. newline \n (DO REPEAT) do_repeat_command another_command. newline \n (DO REPEAT) do_repeat_command second_command newline \n (DO REPEAT) do_repeat_command +_third_command. newline \n (DO REPEAT) do_repeat_command end_/*_x_*/_/*_y_*/_repeat_print. newline \n (DO REPEAT) identifier end newline \n (later) space identifier repeat end_command . newline \n (first) identifier do newline \n (later) spaces __ identifier repeat space identifier #a punct = number 1 end_command . newline \n (DO REPEAT) do_repeat_command __inner_command. newline \n (DO REPEAT) identifier end space identifier repeat end_command . newline \n (first) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:943: segment-test -i input" at_fn_check_prepare_trace "segment.at:943" ( $at_check_trace; segment-test -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:943" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:943: segment-test -1 -i input" at_fn_check_prepare_trace "segment.at:943" ( $at_check_trace; segment-test -1 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:943" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:943: segment-test -0 -i input" at_fn_check_prepare_trace "segment.at:943" ( $at_check_trace; segment-test -0 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:943" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:943: segment-test -01 -i input" at_fn_check_prepare_trace "segment.at:943" ( $at_check_trace; segment-test -01 -i input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:943" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_406 #AT_START_407 at_fn_group_banner 407 'segment.at:946' \ "batch mode" " " 66 at_xfail=no ( $as_echo "407. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' first command another line of first command + second command third command fourth command. fifth command. _ATEOF cat >expout <<'_ATEOF' identifier first space identifier command newline \n (later) spaces _____ identifier another space identifier line space identifier of space identifier first space identifier command newline \n (later) start_command + spaces __ identifier second space identifier command newline \n (later) start_command identifier third space identifier command newline \n (later) separate_commands newline \n (first) identifier fourth space identifier command end_command . newline \n (first) spaces ___ identifier fifth space identifier command end_command . newline \n (first) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:997: segment-test -b input" at_fn_check_prepare_trace "segment.at:997" ( $at_check_trace; segment-test -b input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:997" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:997: segment-test -1 -b input" at_fn_check_prepare_trace "segment.at:997" ( $at_check_trace; segment-test -1 -b input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:997" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:997: segment-test -0 -b input" at_fn_check_prepare_trace "segment.at:997" ( $at_check_trace; segment-test -0 -b input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:997" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:997: segment-test -01 -b input" at_fn_check_prepare_trace "segment.at:997" ( $at_check_trace; segment-test -01 -b input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:997" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_407 #AT_START_408 at_fn_group_banner 408 'segment.at:1000' \ "auto mode" " " 66 at_xfail=no ( $as_echo "408. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' command another line of command 2sls + another command another line of second command data list /x 1 aggregate. print eject. twostep cluster fourth command. fifth command. _ATEOF cat >expout <<'_ATEOF' identifier command newline \n (later) spaces _____ identifier another space identifier line space identifier of space identifier command newline \n (later) start_command number 2 identifier sls newline \n (later) start_command + spaces __ identifier another space identifier command newline \n (later) identifier another space identifier line space identifier of space identifier second space identifier command newline \n (later) start_command identifier data space identifier list space punct / identifier x space number 1 newline \n (later) start_command identifier aggregate end_command . newline \n (first) identifier print space identifier eject end_command . newline \n (first) identifier twostep space identifier cluster newline \n (later) separate_commands newline \n (first) separate_commands newline \n (first) identifier fourth space identifier command end_command . newline \n (first) spaces ___ identifier fifth space identifier command end_command . newline \n (first) end _ATEOF { set +x $as_echo "$at_srcdir/segment.at:1087: segment-test -a input" at_fn_check_prepare_trace "segment.at:1087" ( $at_check_trace; segment-test -a input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:1087" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:1087: segment-test -1 -a input" at_fn_check_prepare_trace "segment.at:1087" ( $at_check_trace; segment-test -1 -a input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:1087" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:1087: segment-test -0 -a input" at_fn_check_prepare_trace "segment.at:1087" ( $at_check_trace; segment-test -0 -a input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:1087" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/segment.at:1087: segment-test -01 -a input" at_fn_check_prepare_trace "segment.at:1087" ( $at_check_trace; segment-test -01 -a input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/segment.at:1087" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_408 #AT_START_409 at_fn_group_banner 409 'variable-parser.at:22' \ "Long variable names" " " 67 at_xfail=no ( $as_echo "409. $at_setup_line: testing $at_desc ..." $at_traceon cat >longvars.sps <<'_ATEOF' DATA LIST LIST /AlphaBetaGamma * B * X * Yabbadabbadoo * . BEGIN DATA. 2 3 4 5 END DATA. LIST. CROSSTABS VARIABLES X (1,7) Yabbadabbadoo (1,7) /TABLES X BY Yabbadabbadoo. _ATEOF { set +x $as_echo "$at_srcdir/variable-parser.at:35: pspp -o pspp.csv longvars.sps" at_fn_check_prepare_trace "variable-parser.at:35" ( $at_check_trace; pspp -o pspp.csv longvars.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/variable-parser.at:35" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/variable-parser.at:36: cat pspp.csv" at_fn_check_prepare_trace "variable-parser.at:36" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format AlphaBetaGamma,F8.0 B,F8.0 X,F8.0 Yabbadabbadoo,F8.0 Table: Data List AlphaBetaGamma,B,X,Yabbadabbadoo 2.00,3.00,4.00,5.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X * Yabbadabbadoo,1,100.0%,0,0.0%,1,100.0% Table: X * Yabbadabbadoo [count]. ,Yabbadabbadoo,,,,,,, X,1.00,2.00,3.00,4.00,5.00,6.00,7.00,Total 1.00,.00,.00,.00,.00,.00,.00,.00,.00 2.00,.00,.00,.00,.00,.00,.00,.00,.00 3.00,.00,.00,.00,.00,.00,.00,.00,.00 4.00,.00,.00,.00,.00,1.00,.00,.00,1.00 5.00,.00,.00,.00,.00,.00,.00,.00,.00 6.00,.00,.00,.00,.00,.00,.00,.00,.00 7.00,.00,.00,.00,.00,.00,.00,.00,.00 Total,.00,.00,.00,.00,1.00,.00,.00,1.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/variable-parser.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_409 #AT_START_410 at_fn_group_banner 410 'aggregate.at:177' \ "AGGREGATE presorted data to dataset file, itemwise missing" "" 68 at_xfail=no ( $as_echo "410. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). DATASET DECLARE aggregate. SORT CASES BY g. AGGREGATE outfile=aggregate /PRESORTED /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). DATASET ACTIVATE aggregate. LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:177: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:177" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:177" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:177: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:177" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,.333,.429,.333,.429,.333,.286,.333,.286,.500,.429,.500,.429,0,0,0,0,.667,.714,.667,.714,5,5,5,5,5,5,5,5,2.00,2.29,0,0,0,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,33.3,42.9,33.3,42.9,33.3,28.6,33.3,28.6,50.0,42.9,50.0,42.9,66.7,71.4,66.7,71.4,1.50,2.00,1.79,1.80,12.00,16.00 2,5.00,5.00,4,4,1.000,1.000,1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,6,6,6,4,1.000,1.000,1.000,1.000,8,8,8,8,8,8,8,8,7.00,7.00,6,6,6,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,100.0,100.0,100.0,100.0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,7.00,7.00,1.00,1.00,21.00,21.00 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,NaN,NaN,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:177" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_410 #AT_START_411 at_fn_group_banner 411 'aggregate.at:178' \ "AGGREGATE presorted data to dataset file, columnwise missing" "" 68 at_xfail=no ( $as_echo "411. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). DATASET DECLARE aggregate. SORT CASES BY g. AGGREGATE outfile=aggregate /PRESORTED /MISSING=COLUMNWISE /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). DATASET ACTIVATE aggregate. LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:178: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:178" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:178" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:178: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:178" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,. ,.429,. ,.429,. ,.286,. ,.286,. ,.429,. ,.429,.,0,,0,. ,.714,. ,.714,.,5,,5,.,5,,5,. ,2.29,.,0,,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,. ,42.9,. ,42.9,. ,28.6,. ,28.6,. ,42.9,. ,42.9,. ,71.4,. ,71.4,. ,2.00,. ,1.80,. ,16.00 2,5.00,5.00,4,4,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,8,.,.,,8,. ,. ,.,.,,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:178" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_411 #AT_START_412 at_fn_group_banner 412 'aggregate.at:179' \ "AGGREGATE unsorted data to dataset file, itemwise missing" "" 68 at_xfail=no ( $as_echo "412. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). DATASET DECLARE aggregate. AGGREGATE outfile=aggregate /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). DATASET ACTIVATE aggregate. LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:179: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:179" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:179" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:179: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:179" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,.333,.429,.333,.429,.333,.286,.333,.286,.500,.429,.500,.429,0,0,0,0,.667,.714,.667,.714,5,5,5,5,5,5,5,5,2.00,2.29,0,0,0,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,33.3,42.9,33.3,42.9,33.3,28.6,33.3,28.6,50.0,42.9,50.0,42.9,66.7,71.4,66.7,71.4,1.50,2.00,1.79,1.80,12.00,16.00 2,5.00,5.00,4,4,1.000,1.000,1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,6,6,6,4,1.000,1.000,1.000,1.000,8,8,8,8,8,8,8,8,7.00,7.00,6,6,6,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,100.0,100.0,100.0,100.0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,7.00,7.00,1.00,1.00,21.00,21.00 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,NaN,NaN,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:179" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_412 #AT_START_413 at_fn_group_banner 413 'aggregate.at:180' \ "AGGREGATE unsorted data to dataset file, columnwise missing" "" 68 at_xfail=no ( $as_echo "413. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). DATASET DECLARE aggregate. AGGREGATE outfile=aggregate /MISSING=COLUMNWISE /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). DATASET ACTIVATE aggregate. LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:180: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:180" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:180" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:180: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:180" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,. ,.429,. ,.429,. ,.286,. ,.286,. ,.429,. ,.429,.,0,,0,. ,.714,. ,.714,.,5,,5,.,5,,5,. ,2.29,.,0,,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,. ,42.9,. ,42.9,. ,28.6,. ,28.6,. ,42.9,. ,42.9,. ,71.4,. ,71.4,. ,2.00,. ,1.80,. ,16.00 2,5.00,5.00,4,4,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,8,.,.,,8,. ,. ,.,.,,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:180" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_413 #AT_START_414 at_fn_group_banner 414 'aggregate.at:181' \ "AGGREGATE presorted data to active file, itemwise missing" "" 68 at_xfail=no ( $as_echo "414. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). SORT CASES BY g. AGGREGATE OUTFILE=* /PRESORTED /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:181: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:181" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:181" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:181: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:181" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,.333,.429,.333,.429,.333,.286,.333,.286,.500,.429,.500,.429,0,0,0,0,.667,.714,.667,.714,5,5,5,5,5,5,5,5,2.00,2.29,0,0,0,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,33.3,42.9,33.3,42.9,33.3,28.6,33.3,28.6,50.0,42.9,50.0,42.9,66.7,71.4,66.7,71.4,1.50,2.00,1.79,1.80,12.00,16.00 2,5.00,5.00,4,4,1.000,1.000,1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,6,6,6,4,1.000,1.000,1.000,1.000,8,8,8,8,8,8,8,8,7.00,7.00,6,6,6,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,100.0,100.0,100.0,100.0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,7.00,7.00,1.00,1.00,21.00,21.00 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,NaN,NaN,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:181" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_414 #AT_START_415 at_fn_group_banner 415 'aggregate.at:182' \ "AGGREGATE presorted data to active file, columnwise missing" "" 68 at_xfail=no ( $as_echo "415. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). SORT CASES BY g. AGGREGATE OUTFILE=* /PRESORTED /MISSING=COLUMNWISE /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:182: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:182" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:182" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:182: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:182" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,. ,.429,. ,.429,. ,.286,. ,.286,. ,.429,. ,.429,.,0,,0,. ,.714,. ,.714,.,5,,5,.,5,,5,. ,2.29,.,0,,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,. ,42.9,. ,42.9,. ,28.6,. ,28.6,. ,42.9,. ,42.9,. ,71.4,. ,71.4,. ,2.00,. ,1.80,. ,16.00 2,5.00,5.00,4,4,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,8,.,.,,8,. ,. ,.,.,,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:182" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_415 #AT_START_416 at_fn_group_banner 416 'aggregate.at:183' \ "AGGREGATE unsorted data to active file, itemwise missing" "" 68 at_xfail=no ( $as_echo "416. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). AGGREGATE OUTFILE=* /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:183: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:183" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:183" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:183: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:183" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,.333,.429,.333,.429,.333,.286,.333,.286,.500,.429,.500,.429,0,0,0,0,.667,.714,.667,.714,5,5,5,5,5,5,5,5,2.00,2.29,0,0,0,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,33.3,42.9,33.3,42.9,33.3,28.6,33.3,28.6,50.0,42.9,50.0,42.9,66.7,71.4,66.7,71.4,1.50,2.00,1.79,1.80,12.00,16.00 2,5.00,5.00,4,4,1.000,1.000,1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,6,6,6,4,1.000,1.000,1.000,1.000,8,8,8,8,8,8,8,8,7.00,7.00,6,6,6,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,100.0,100.0,100.0,100.0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,7.00,7.00,1.00,1.00,21.00,21.00 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,NaN,NaN,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:183" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_416 #AT_START_417 at_fn_group_banner 417 'aggregate.at:184' \ "AGGREGATE unsorted data to active file, columnwise missing" "" 68 at_xfail=no ( $as_echo "417. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). AGGREGATE OUTFILE=* /MISSING=COLUMNWISE /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:184: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:184" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:184" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:184: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:184" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,. ,.429,. ,.429,. ,.286,. ,.286,. ,.429,. ,.429,.,0,,0,. ,.714,. ,.714,.,5,,5,.,5,,5,. ,2.29,.,0,,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,. ,42.9,. ,42.9,. ,28.6,. ,28.6,. ,42.9,. ,42.9,. ,71.4,. ,71.4,. ,2.00,. ,1.80,. ,16.00 2,5.00,5.00,4,4,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,8,.,.,,8,. ,. ,.,.,,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:184" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_417 #AT_START_418 at_fn_group_banner 418 'aggregate.at:185' \ "AGGREGATE presorted data to external file, itemwise missing" "" 68 at_xfail=no ( $as_echo "418. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). SORT CASES BY g. AGGREGATE OUTFILE='aggregate.sys' /PRESORTED /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). GET FILE='aggregate.sys'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:185: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:185" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:185" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:185: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:185" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,.333,.429,.333,.429,.333,.286,.333,.286,.500,.429,.500,.429,0,0,0,0,.667,.714,.667,.714,5,5,5,5,5,5,5,5,2.00,2.29,0,0,0,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,33.3,42.9,33.3,42.9,33.3,28.6,33.3,28.6,50.0,42.9,50.0,42.9,66.7,71.4,66.7,71.4,1.50,2.00,1.79,1.80,12.00,16.00 2,5.00,5.00,4,4,1.000,1.000,1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,6,6,6,4,1.000,1.000,1.000,1.000,8,8,8,8,8,8,8,8,7.00,7.00,6,6,6,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,100.0,100.0,100.0,100.0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,7.00,7.00,1.00,1.00,21.00,21.00 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,NaN,NaN,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:185" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_418 #AT_START_419 at_fn_group_banner 419 'aggregate.at:186' \ "AGGREGATE presorted data to external file, columnwise missing" "" 68 at_xfail=no ( $as_echo "419. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). SORT CASES BY g. AGGREGATE OUTFILE='aggregate.sys' /PRESORTED /MISSING=COLUMNWISE /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). GET FILE='aggregate.sys'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:186: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:186" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:186" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:186: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:186" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,. ,.429,. ,.429,. ,.286,. ,.286,. ,.429,. ,.429,.,0,,0,. ,.714,. ,.714,.,5,,5,.,5,,5,. ,2.29,.,0,,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,. ,42.9,. ,42.9,. ,28.6,. ,28.6,. ,42.9,. ,42.9,. ,71.4,. ,71.4,. ,2.00,. ,1.80,. ,16.00 2,5.00,5.00,4,4,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,8,.,.,,8,. ,. ,.,.,,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:186" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_419 #AT_START_420 at_fn_group_banner 420 'aggregate.at:187' \ "AGGREGATE unsorted data to external file, itemwise missing" "" 68 at_xfail=no ( $as_echo "420. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). AGGREGATE OUTFILE='aggregate.sys' /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). GET FILE='aggregate.sys'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:187: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:187" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:187" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:187: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:187" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,.333,.429,.333,.429,.333,.286,.333,.286,.500,.429,.500,.429,0,0,0,0,.667,.714,.667,.714,5,5,5,5,5,5,5,5,2.00,2.29,0,0,0,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,33.3,42.9,33.3,42.9,33.3,28.6,33.3,28.6,50.0,42.9,50.0,42.9,66.7,71.4,66.7,71.4,1.50,2.00,1.79,1.80,12.00,16.00 2,5.00,5.00,4,4,1.000,1.000,1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,6,6,6,4,1.000,1.000,1.000,1.000,8,8,8,8,8,8,8,8,7.00,7.00,6,6,6,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,100.0,100.0,100.0,100.0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,7.00,7.00,1.00,1.00,21.00,21.00 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,NaN,NaN,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:187" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_420 #AT_START_421 at_fn_group_banner 421 'aggregate.at:188' \ "AGGREGATE unsorted data to external file, columnwise missing" "" 68 at_xfail=no ( $as_echo "421. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.data <<'_ATEOF' 2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 _ATEOF cat >aggregate.sps <<'_ATEOF' DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). AGGREGATE OUTFILE='aggregate.sys' /MISSING=COLUMNWISE /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). GET FILE='aggregate.sys'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:188: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:188" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:188" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/aggregate.at:188: sed 's/^[^:]*:[0-9]*: //' < stdout" at_fn_check_prepare_trace "aggregate.at:188" ( $at_check_trace; sed 's/^[^:]*:[0-9]*: //' < stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,. ,.429,. ,.429,. ,.286,. ,.286,. ,.429,. ,.429,.,0,,0,. ,.714,. ,.714,.,5,,5,.,5,,5,. ,2.29,.,0,,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,. ,42.9,. ,42.9,. ,28.6,. ,28.6,. ,42.9,. ,42.9,. ,71.4,. ,71.4,. ,2.00,. ,1.80,. ,16.00 2,5.00,5.00,4,4,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,8,.,.,,8,. ,. ,.,.,,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:188" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_421 #AT_START_422 at_fn_group_banner 422 'aggregate.at:190' \ "AGGREGATE crash with MAX function" " " 68 at_xfail=no ( $as_echo "422. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.sps <<'_ATEOF' DATA LIST LIST /X (F8.2) Y (a25). BEGIN DATA. 87.50 foo 87.34 bar 1 bar END DATA. AGGREGATE OUTFILE=* /BREAK=y /X=MAX(x). LIST /x y. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:203: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:203" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format X,F8.2 Y,A25 Table: Data List X,Y 87.34,bar 87.50,foo " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:203" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_422 #AT_START_423 at_fn_group_banner 423 'aggregate.at:216' \ "AGGREGATE crash with invalid syntax" " " 68 at_xfail=no ( $as_echo "423. $at_setup_line: testing $at_desc ..." $at_traceon cat >aggregate.sps <<'_ATEOF' INPUT PROGRAM. LOOP c=1 TO 20. COMPUTE x=UNIFORM(10) END CASE. END LOOP. END FILE. END INPUT PROGRAM. AGGREGATE /BREAK=x . _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:228: pspp -O format=csv aggregate.sps" at_fn_check_prepare_trace "aggregate.at:228" ( $at_check_trace; pspp -O format=csv aggregate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/aggregate.at:228" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_423 #AT_START_424 at_fn_group_banner 424 'aggregate.at:232' \ "AGGREGATE mode=addvariables" " " 68 at_xfail=no ( $as_echo "424. $at_setup_line: testing $at_desc ..." $at_traceon cat >addvariables.sps <<'_ATEOF' data list notable list /x * cn * y *. begin data. 1 1 2 3 2 3 3 3 4 5 4 6 7 5 8 7 6 9 7 7 20 9 8 11 end data. aggregate outfile=* mode=addvariables /break = x /sum = sum(y) /mean = mean (y) /median = median (y). list. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:255: pspp -O format=csv addvariables.sps" at_fn_check_prepare_trace "aggregate.at:255" ( $at_check_trace; pspp -O format=csv addvariables.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,cn,y,sum,mean,median 1.00,1.00,2.00,2.00,2.00,2.00 3.00,2.00,3.00,7.00,3.50,3.50 3.00,3.00,4.00,7.00,3.50,3.50 5.00,4.00,6.00,6.00,6.00,6.00 7.00,5.00,8.00,37.00,12.33,9.00 7.00,6.00,9.00,37.00,12.33,9.00 7.00,7.00,20.00,37.00,12.33,9.00 9.00,8.00,11.00,11.00,11.00,11.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/aggregate.at:255" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_424 #AT_START_425 at_fn_group_banner 425 'aggregate.at:271' \ "AGGREGATE buggy duplicate variables" " " 68 at_xfail=no ( $as_echo "425. $at_setup_line: testing $at_desc ..." $at_traceon cat >dup-variables.sps <<'_ATEOF' DATA LIST NOTABLE LIST /x * . begin data 1 1 1 1 2 2 2 3 3 3 3 3 3 end data. AGGREGATE OUTFILE=* MODE=ADDVARIABLES /BREAK= x /N_BREAK = N. AGGREGATE OUTFILE=* MODE=ADDVARIABLES /BREAK= x /N_BREAK = N. _ATEOF { set +x $as_echo "$at_srcdir/aggregate.at:301: pspp -O format=csv dup-variables.sps" at_fn_check_prepare_trace "aggregate.at:301" ( $at_check_trace; pspp -O format=csv dup-variables.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"dup-variables.sps:24: error: AGGREGATE: Variable name N_BREAK is not unique within the aggregate file dictionary, which contains the aggregate variables and the break variables.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/aggregate.at:301" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_425 #AT_START_426 at_fn_group_banner 426 'autorecode.at:19' \ "AUTORECODE numbers and short strings" " " 69 at_xfail=no ( $as_echo "426. $at_setup_line: testing $at_desc ..." $at_traceon cat >autorecode.sps <<'_ATEOF' data list /X 1-5(a) Y 7. begin data. lasdj 1 asdfk 0 asdfj 2 asdfj 1 asdfk 2 asdfj 9 lajks 9 asdfk 0 asdfk 1 end data. autorecode x y into A B/descend. list. compute Z=trunc(y/2). autorecode z into W. list. _ATEOF { set +x $as_echo "$at_srcdir/autorecode.at:41: pspp -O format=csv autorecode.sps" at_fn_check_prepare_trace "autorecode.at:41" ( $at_check_trace; pspp -O format=csv autorecode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from INLINE. Variable,Record,Columns,Format X,1,1- 5,A5 Y,1,7- 7,F1.0 Table: Data List X,Y,A,B lasdj,1,1.00,3.00 asdfk,0,3.00,4.00 asdfj,2,4.00,2.00 asdfj,1,4.00,3.00 asdfk,2,3.00,2.00 asdfj,9,4.00,1.00 lajks,9,2.00,1.00 asdfk,0,3.00,4.00 asdfk,1,3.00,3.00 Table: Data List X,Y,A,B,Z,W lasdj,1,1.00,3.00,.00,1.00 asdfk,0,3.00,4.00,.00,1.00 asdfj,2,4.00,2.00,1.00,2.00 asdfj,1,4.00,3.00,.00,1.00 asdfk,2,3.00,2.00,1.00,2.00 asdfj,9,4.00,1.00,4.00,3.00 lajks,9,2.00,1.00,4.00,3.00 asdfk,0,3.00,4.00,.00,1.00 asdfk,1,3.00,3.00,.00,1.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/autorecode.at:41" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_426 #AT_START_427 at_fn_group_banner 427 'autorecode.at:75' \ "AUTORECODE long strings and check the value labels" "" 69 at_xfail=no ( $as_echo "427. $at_setup_line: testing $at_desc ..." $at_traceon cat >ar.sps <<'_ATEOF' data list notable list /s (a16) x *. begin data. widgets 1 thingummies 2 oojars 3 widgets 4 oojars 5 thingummies 6 oojimiflips 7 end data. autorecode s into new. list. display dictionary. _ATEOF { set +x $as_echo "$at_srcdir/autorecode.at:95: pspp -O format=csv ar.sps" at_fn_check_prepare_trace "autorecode.at:95" ( $at_check_trace; pspp -O format=csv ar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List s,x,new widgets ,1.00,4.00 thingummies ,2.00,3.00 oojars ,3.00,1.00 widgets ,4.00,4.00 oojars ,5.00,1.00 thingummies ,6.00,3.00 oojimiflips ,7.00,2.00 Variable,Description,Position s,Format: A16,1 x,Format: F8.2,2 new,\"Format: F8.2 Value,Label 1.00,oojars 2.00,oojimiflips 3.00,thingummies 4.00,widgets\",3 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/autorecode.at:95" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_427 #AT_START_428 at_fn_group_banner 428 'autorecode.at:121' \ "AUTORECODE group subcommand" " " 69 at_xfail=no ( $as_echo "428. $at_setup_line: testing $at_desc ..." $at_traceon cat >ar-group.sps <<'_ATEOF' data list notable list /x * y *. begin data. 11 10 12 12 13 15 14 11 15 12 16 18 end data. autorecode x y into a b /group. list. _ATEOF { set +x $as_echo "$at_srcdir/autorecode.at:140: pspp -O format=csv ar-group.sps" at_fn_check_prepare_trace "autorecode.at:140" ( $at_check_trace; pspp -O format=csv ar-group.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,y,a,b 11.00,10.00,2.00,1.00 12.00,12.00,3.00,3.00 13.00,15.00,4.00,6.00 14.00,11.00,5.00,2.00 15.00,12.00,6.00,3.00 16.00,18.00,7.00,8.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/autorecode.at:140" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_428 #AT_START_429 at_fn_group_banner 429 'autorecode.at:155' \ "AUTORECODE group - string variables" " " 69 at_xfail=no ( $as_echo "429. $at_setup_line: testing $at_desc ..." $at_traceon cat >strings.sps <<'_ATEOF' data list notable list /x (a8) y (a16). begin data. fred bert charlie " " delta echo " " windows " " nothing end data. autorecode x y into a b /group. delete variables x y. list. _ATEOF { set +x $as_echo "$at_srcdir/autorecode.at:176: pspp -O format=csv strings.sps" at_fn_check_prepare_trace "autorecode.at:176" ( $at_check_trace; pspp -O format=csv strings.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List a,b 7.00,3.00 4.00,1.00 5.00,6.00 2.00,9.00 2.00,8.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/autorecode.at:176" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_429 #AT_START_430 at_fn_group_banner 430 'autorecode.at:191' \ "AUTORECODE group vs. strings" " " 69 at_xfail=no ( $as_echo "430. $at_setup_line: testing $at_desc ..." $at_traceon cat >ar-strings.sps <<'_ATEOF' data list notable list /a (a12) b (a6). begin data. one nine two ten three eleven four nought end data. autorecode a b into x y /group. list. _ATEOF { set +x $as_echo "$at_srcdir/autorecode.at:207: pspp -O format=csv ar-strings.sps" at_fn_check_prepare_trace "autorecode.at:207" ( $at_check_trace; pspp -O format=csv ar-strings.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List a,b,x,y one ,nine ,5.00,3.00 two ,ten ,8.00,6.00 three ,eleven,7.00,1.00 four ,nought,2.00,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/autorecode.at:207" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_430 #AT_START_431 at_fn_group_banner 431 'autorecode.at:221' \ "AUTORECODE /blank" " " 69 at_xfail=no ( $as_echo "431. $at_setup_line: testing $at_desc ..." $at_traceon cat >auto-blank.sps <<'_ATEOF' data list notable list /x (a8) y * z (a16). begin data. one 2 fred two 4 "" "" 4 fred "" 2 charliebrown three 2 charliebrown end data. autorecode variables x y z into a b c /blank=missing. list a b c y. _ATEOF { set +x $as_echo "$at_srcdir/autorecode.at:238: pspp -O format=csv auto-blank.sps" at_fn_check_prepare_trace "autorecode.at:238" ( $at_check_trace; pspp -O format=csv auto-blank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List a,b,c,y 1.00,1.00,2.00,2.00 3.00,2.00,. ,4.00 . ,2.00,2.00,4.00 . ,1.00,1.00,2.00 2.00,1.00,1.00,2.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/autorecode.at:238" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_431 #AT_START_432 at_fn_group_banner 432 'autorecode.at:252' \ "AUTORECODE with TEMPORARY" " " 69 at_xfail=no ( $as_echo "432. $at_setup_line: testing $at_desc ..." $at_traceon cat >autorecode.sps <<'_ATEOF' data list /X 1-5(a) Y 7. begin data. lasdj 1 asdfk 0 asdfj 2 asdfj 1 asdfk 2 asdfj 9 lajks 9 asdfk 0 asdfk 1 end data. temporary. select if y > 1. autorecode x y into A B/descend. list. _ATEOF { set +x $as_echo "$at_srcdir/autorecode.at:272: pspp -O format=csv autorecode.sps" at_fn_check_prepare_trace "autorecode.at:272" ( $at_check_trace; pspp -O format=csv autorecode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from INLINE. Variable,Record,Columns,Format X,1,1- 5,A5 Y,1,7- 7,F1.0 Table: Data List X,Y,A,B lasdj,1,. ,. asdfk,0,2.00,. asdfj,2,3.00,2.00 asdfj,1,3.00,. asdfk,2,2.00,2.00 asdfj,9,3.00,1.00 lajks,9,1.00,1.00 asdfk,0,2.00,. asdfk,1,2.00,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/autorecode.at:272" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_432 #AT_START_433 at_fn_group_banner 433 'autorecode.at:295' \ "AUTORECODE with /INTO" " " 69 at_xfail=no ( $as_echo "433. $at_setup_line: testing $at_desc ..." $at_traceon cat >autorecode.sps <<'_ATEOF' data list list notable /x . begin data. 1 8 -901 4 1 99 8 end data. autorecode x /into y. list. _ATEOF { set +x $as_echo "$at_srcdir/autorecode.at:312: pspp -O format=csv autorecode.sps" at_fn_check_prepare_trace "autorecode.at:312" ( $at_check_trace; pspp -O format=csv autorecode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,y 1.00,2.00 8.00,4.00 -901.00,1.00 4.00,3.00 1.00,2.00 99.00,5.00 8.00,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/autorecode.at:312" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_433 #AT_START_434 at_fn_group_banner 434 'correlations.at:19' \ "CORRELATIONS -- unweighted" " " 70 at_xfail=no ( $as_echo "434. $at_setup_line: testing $at_desc ..." $at_traceon cat >correlations.sps <<'_ATEOF' set format = F11.3. data list notable list /foo * bar * wiz * bang *. begin data. 1 0 3 1 3 9 -50 5 3 4 3 203 4 -9 0 -4 98 78 104 2 3 50 -49 200 . 4 4 4 5 3 0 . end data. correlations variables = foo bar wiz bang /print nosig /missing = listwise . correlations variables = bar wiz /print nosig /missing = listwise . correlations variables = foo bar wiz bang /print nosig /missing = pairwise . _ATEOF { set +x $as_echo "$at_srcdir/correlations.at:52: pspp -o pspp.csv correlations.sps" at_fn_check_prepare_trace "correlations.at:52" ( $at_check_trace; pspp -o pspp.csv correlations.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/correlations.at:52" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/correlations.at:53: cat pspp.csv" at_fn_check_prepare_trace "correlations.at:53" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Correlations ,,foo,bar,wiz,bang foo,Pearson Correlation,1.000,.802,.890,-.308 ,Sig. (2-tailed),,.055,.017,.553 bar,Pearson Correlation,.802,1.000,.519,.118 ,Sig. (2-tailed),.055,,.291,.824 wiz,Pearson Correlation,.890,.519,1.000,-.344 ,Sig. (2-tailed),.017,.291,,.505 bang,Pearson Correlation,-.308,.118,-.344,1.000 ,Sig. (2-tailed),.553,.824,.505, Table: Correlations ,,bar,wiz bar,Pearson Correlation,1.000,.497 ,Sig. (2-tailed),,.210 wiz,Pearson Correlation,.497,1.000 ,Sig. (2-tailed),.210, Table: Correlations ,,foo,bar,wiz,bang foo,Pearson Correlation,1.000,.805,.883,-.308 ,Sig. (2-tailed),,.029,.008,.553 ,N,7,7,7,6 bar,Pearson Correlation,.805,1.000,.497,.164 ,Sig. (2-tailed),.029,,.210,.725 ,N,7,8,8,7 wiz,Pearson Correlation,.883,.497,1.000,-.337 ,Sig. (2-tailed),.008,.210,,.460 ,N,7,8,8,7 bang,Pearson Correlation,-.308,.164,-.337,1.000 ,Sig. (2-tailed),.553,.725,.460, ,N,6,7,7,7 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/correlations.at:53" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_434 #AT_START_435 at_fn_group_banner 435 'correlations.at:89' \ "CORRELATIONS -- weighted" " " 70 at_xfail=no ( $as_echo "435. $at_setup_line: testing $at_desc ..." $at_traceon cat >correlations1.sps <<'_ATEOF' set format = F11.3. data list notable list /foo * bar * wiz * bang * w *. begin data. 1 0 3 1 1 3 9 -50 5 2 3 4 3 203 1 4 -9 0 -4 1 98 78 104 2 3 3 50 -49 200 1 end data. weight by w. correlations variables = foo bar wiz bang /statistics=descriptives xprod . _ATEOF cat >correlations2.sps <<'_ATEOF' set format = F11.3. data list notable list /foo * bar * wiz * bang * w *. begin data. 1 0 3 1 1 3 9 -50 5 1 3 9 -50 5 1 3 4 3 203 1 4 -9 0 -4 1 98 78 104 2 1 98 78 104 2 1 98 78 104 2 1 3 50 -49 200 1 end data. weight by w. correlations variables = foo bar wiz bang /statistics=descriptives xprod . _ATEOF { set +x $as_echo "$at_srcdir/correlations.at:131: pspp -O format=csv correlations1.sps" at_fn_check_prepare_trace "correlations.at:131" ( $at_check_trace; pspp -O format=csv correlations1.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/correlations.at:131" $at_failed && at_fn_log_failure $at_traceon; } mv stdout expout { set +x $as_echo "$at_srcdir/correlations.at:133: pspp -O format=csv correlations2.sps" at_fn_check_prepare_trace "correlations.at:133" ( $at_check_trace; pspp -O format=csv correlations2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/correlations.at:133" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_435 #AT_START_436 at_fn_group_banner 436 'correlations.at:137' \ "CORRELATIONS -- non-square" " " 70 at_xfail=no ( $as_echo "436. $at_setup_line: testing $at_desc ..." $at_traceon cat >corr-ns.sps <<'_ATEOF' set format = F11.3. data list notable list /foo * bar * wiz *. begin data. 1 1 6 2 2 5 3 3 4 4 4 3 5 5 2 6 6 1 end data. correlations variables = foo with bar wiz . _ATEOF { set +x $as_echo "$at_srcdir/correlations.at:155: pspp -O format=csv corr-ns.sps" at_fn_check_prepare_trace "correlations.at:155" ( $at_check_trace; pspp -O format=csv corr-ns.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Correlations ,,bar,wiz foo,Pearson Correlation,1.000,-1.000 ,Sig. (2-tailed),.000,.000 ,N,6,6 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/correlations.at:155" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_436 #AT_START_437 at_fn_group_banner 437 'correlations.at:166' \ "CORRELATIONS -- crash with WITH keyword" " " 70 at_xfail=no ( $as_echo "437. $at_setup_line: testing $at_desc ..." $at_traceon cat >correlations.sps <<'_ATEOF' DATA LIST LIST NOTABLE /a b c d e f g h i. . BEGIN DATA. 20 21 17 28 23 4.35 24 19 25 28 18 29 30 23 4.55 17 23 28 47 18 30 30 29 4.35 26 31 31 20 7 19 22 22 4.80 24 16 27 19 12 17 27 22 . 22 14 25 22 9 19 30 33 5 29 30 27 41 16 22 32 23 3.90 26 27 23 18 18 20 26 22 5.80 17 20 39 18 24 25 25 31 5.15 27 27 34 19 22 26 23 37 6 41 32 27 23 12 15 29 25 4.10 21 27 20 21 4 28 37 31 5.65 27 18 42 19 5 17 17 29 3.10 19 16 19 21 17 20 35 31 . 28 30 22 END DATA. CORRELATIONS VARIABLE=a f b WITH c g h i e d/STATISTICS=DESCRIPTIVES. _ATEOF { set +x $as_echo "$at_srcdir/correlations.at:189: pspp -o pspp.csv correlations.sps" at_fn_check_prepare_trace "correlations.at:189" ( $at_check_trace; pspp -o pspp.csv correlations.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/correlations.at:189" $at_failed && at_fn_log_failure $at_traceon; } # Check the output, ignoring the actual correlations values since # they look pretty nonsensical to me for this input (they include NaNs). { set +x $as_echo "$at_srcdir/correlations.at:192: sed '/a,Pearson/,\$s/,\\([^,]*\\),.*/,\\1,.../' pspp.csv" at_fn_check_prepare_dynamic "sed '/a,Pearson/,$s/,\\([^,]*\\),.*/,\\1,.../' pspp.csv" "correlations.at:192" ( $at_check_trace; sed '/a,Pearson/,$s/,\([^,]*\),.*/,\1,.../' pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Descriptive Statistics ,Mean,Std. Deviation,N a,24.00,8.93,14.00 f,4.73,.85,12.00 b,14.50,6.41,14.00 c,21.71,4.98,14.00 g,24.86,6.09,14.00 h,23.57,6.30,14.00 i,27.79,6.73,14.00 e,27.21,4.95,14.00 d,27.93,5.23,14.00 Table: Correlations ,,c,g,h,i,e,d a,Pearson Correlation,... ,Sig. (2-tailed),... ,N,... f,Pearson Correlation,... ,Sig. (2-tailed),... ,N,... b,Pearson Correlation,... ,Sig. (2-tailed),... ,N,... " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/correlations.at:192" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_437 #AT_START_438 at_fn_group_banner 438 'correlations.at:222' \ "CORRELATIONS -- incorrect subtable selection" " " 70 at_xfail=no ( $as_echo "438. $at_setup_line: testing $at_desc ..." $at_traceon cat >correlations.sps <<'_ATEOF' set format = F12.4. set decimal = dot. data list notable list /var1 var2 var3 var4 var5 *. begin data. 7,6,9,2,3 9,12,8,5,8 8,9,7,8,6 8,8,9,10,8 7,6,4,5,3 7,9,8,2,1 9,8,11,,10 8,7,6,,5 6,7,6,,8 6,,3,,4 6,,7,3,3 5,4,2,7,8 9,8,6,11,10 5,6,2,2,4 8,7,6,8,7 10,13,8,12,10 7,8,7,11,2 8,7,7,9,6 10,11,11,8,1 5,8,6,9,9 8,7,5,5,6 5,7,2,1,8 9,8,8,13,6 5,8,5,6,4 ,7,5,4,5 ,8,4,4,3 ,6,4,9,5 8,11,9,12,3 9,11,8,10,6 10,10,7,8,1 6,6,3,8,9 10,9,7,12,2 6,8,,7,4 6,8,3,2,9 7,8,8,2,9 5,6,5,5,5 9,9,7,7,5 9,10,11,7,8 8,11,9,3,3 5,4,4,0,5 9,9,11,14,2 5,6,2,4,4 8,8,7,4,1 9,9,8,14, 6,8,7,2, 10,9,9,6, 8,8,10,9, 7,8,4,12, 6,6,6,7,1 5,7,7,4,10 9,10,10,13,4 9,11,9,8,7 10,13,12,6,8 8,11,6,8,5 7,8,7,12,2 6,7,4,1,10 5,4,5,6,10 7,8,6,12,10 6,5,3,9,2 7,8,8,7,2 5,4,4,9,8 5,7,6,3,9 10,10,9,13,1 8,10,9,5,4 8,9,8,8,7 7,9,9,6,7 10,9,7,12,6 10,13,12,12,4 7,10,9,7,2 6,8,7,11,6 8,11,5,13,2 7,10,6,12,8 10,10,9,7,9 9,12,6,7,10 6,6,8,2,9 10,9,12,13,10 8,9,8,3,6 8,7,6,4,10 8,7,10,12,2 7,6,8,2,7 8,11,6,9,4 6,6,7,8,2 6,7,3,11,4 5,6,3,0,5 10,10,11,15,6 5,4,7,6,8 5,4,4,1,3 6,9,8,1,6 10,11,10,15,8 7,10,4,11,7 9,12,8,6,3 10,10,11,15,2 10,9,9,15,3 6,6,8,5,1 5,7,7,0,3 9,8,10,6,8 9,8,11,11,4 8,10,7,3,4 7,8,7,3,3 8,9,10,13,8 end data. CORRELATION /VARIABLES = var1 var2 var3 WITH var4 var5 /PRINT = TWOTAIL NOSIG. CORRELATION /VARIABLES = var3 var4 var5 WITH var1 var2 /PRINT = TWOTAIL NOSIG. _ATEOF { set +x $as_echo "$at_srcdir/correlations.at:340: pspp -O format=csv correlations.sps" at_fn_check_prepare_trace "correlations.at:340" ( $at_check_trace; pspp -O format=csv correlations.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Correlations ,,var4,var5 var1,Pearson Correlation,.5693,-.0519 ,Sig. (2-tailed),.000,.623 ,N,93,92 var2,Pearson Correlation,.3792,-.0407 ,Sig. (2-tailed),.000,.698 ,N,95,93 var3,Pearson Correlation,.3699,-.0543 ,Sig. (2-tailed),.000,.603 ,N,95,94 Table: Correlations ,,var1,var2 var3,Pearson Correlation,.6964,.5615 ,Sig. (2-tailed),.000,.000 ,N,96,97 var4,Pearson Correlation,.5693,.3792 ,Sig. (2-tailed),.000,.000 ,N,93,95 var5,Pearson Correlation,-.0519,-.0407 ,Sig. (2-tailed),.623,.698 ,N,92,93 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/correlations.at:340" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_438 #AT_START_439 at_fn_group_banner 439 'correlations.at:370' \ "CORRELATIONS -- empty dataset" " " 70 at_xfail=no ( $as_echo "439. $at_setup_line: testing $at_desc ..." $at_traceon cat >correlations.sps <<'_ATEOF' data list list /a b c q g *. CORRELATIONS 'VARIABLES = a b. _ATEOF { set +x $as_echo "$at_srcdir/correlations.at:377: pspp -o pspp.csv correlations.sps" at_fn_check_prepare_trace "correlations.at:377" ( $at_check_trace; pspp -o pspp.csv correlations.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/correlations.at:377" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_439 #AT_START_440 at_fn_group_banner 440 'correlations.at:382' \ "CORRELATIONS -- empty dataset 2" " " 70 at_xfail=no ( $as_echo "440. $at_setup_line: testing $at_desc ..." $at_traceon cat >correlations.sps <<'_ATEOF' data list notable list /foo * bar * wiz bang *. begin data. 1 00 3 . 3 9 -50 . 98 78 104 . . 4 4 . 5 3 0 . end data. correlations variables = foo bar wiz bang /missing = listwise . _ATEOF { set +x $as_echo "$at_srcdir/correlations.at:400: pspp -O format=csv correlations.sps" at_fn_check_prepare_trace "correlations.at:400" ( $at_check_trace; pspp -O format=csv correlations.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "correlations.sps:13: error: CORRELATIONS: The data for the chosen variables are all missing or empty. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/correlations.at:400" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_440 #AT_START_441 at_fn_group_banner 441 'crosstabs.at:19' \ "CROSSTABS integer mode crash" " " 71 at_xfail=no ( $as_echo "441. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs.sps <<'_ATEOF' DATA LIST LIST /A * B * X * Y * . BEGIN DATA. 2 3 4 5 END DATA. CROSSTABS VARIABLES X (1,7) Y (1,7) /TABLES X BY Y. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:28: pspp -O format=csv crosstabs.sps" at_fn_check_prepare_trace "crosstabs.at:28" ( $at_check_trace; pspp -O format=csv crosstabs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format A,F8.0 B,F8.0 X,F8.0 Y,F8.0 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X * Y,1,100.0%,0,0.0%,1,100.0% Table: X * Y [count]. ,Y,,,,,,, X,1.00,2.00,3.00,4.00,5.00,6.00,7.00,Total 1.00,.00,.00,.00,.00,.00,.00,.00,.00 2.00,.00,.00,.00,.00,.00,.00,.00,.00 3.00,.00,.00,.00,.00,.00,.00,.00,.00 4.00,.00,.00,.00,.00,1.00,.00,.00,1.00 5.00,.00,.00,.00,.00,.00,.00,.00,.00 6.00,.00,.00,.00,.00,.00,.00,.00,.00 7.00,.00,.00,.00,.00,.00,.00,.00,.00 Total,.00,.00,.00,.00,1.00,.00,.00,1.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_441 #AT_START_442 at_fn_group_banner 442 'crosstabs.at:57' \ "CROSSTABS integer mode crash 2" " " 71 at_xfail=no ( $as_echo "442. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs.sps <<'_ATEOF' DATA LIST lIST /x y. BEGIN DATA. 4 5 END DATA. CROSSTABS VARIABLES x (1,3) y (1,7) /TABLES x BY y. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:68: pspp -O format=csv crosstabs.sps" at_fn_check_prepare_trace "crosstabs.at:68" ( $at_check_trace; pspp -O format=csv crosstabs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,F8.0 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,0,0.0%,1,100.0%,1,100.0% " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:68" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_442 #AT_START_443 at_fn_group_banner 443 'crosstabs.at:83' \ "CROSSTABS long string crash" " " 71 at_xfail=no ( $as_echo "443. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs.sps <<'_ATEOF' data list list /x * y (a18). begin data. 1. 'zero none' 1 'one unity' 2 'two duality' 3 'three lots' end data. CROSSTABS /TABLES = x BY y. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:98: pspp -o - -O format=csv crosstabs.sps" at_fn_check_prepare_trace "crosstabs.at:98" ( $at_check_trace; pspp -o - -O format=csv crosstabs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,A18 \"crosstabs.sps:4: warning: Missing value(s) for all variables from x onward. These will be filled with the system-missing value or blanks, as appropriate.\" \"crosstabs.sps:6: warning: Missing value(s) for all variables from x onward. These will be filled with the system-missing value or blanks, as appropriate.\" Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,4,66.7%,2,33.3%,6,100.0% Table: x * y [count]. ,y,,,, x,one unity ,three lots ,two duality ,zero none ,Total 1.00,1.00,.00,.00,1.00,2.00 2.00,.00,.00,1.00,.00,1.00 3.00,.00,1.00,.00,.00,1.00 Total,1.00,1.00,1.00,1.00,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:98" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_443 #AT_START_444 at_fn_group_banner 444 'crosstabs.at:124' \ "CROSSTABS crash" " " 71 at_xfail=no ( $as_echo "444. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs.sps <<'_ATEOF' DATA LIST FIXED / x 1-2 y 3 z 4. BEGIN DATA. 0111 0222 0311 0412 0521 0612 0711 0811 0912 END DATA. LIST. CROSSTABS TABLES y by z. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:148: pspp -O format=csv crosstabs.sps" at_fn_check_prepare_trace "crosstabs.at:148" ( $at_check_trace; pspp -O format=csv crosstabs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from INLINE. Variable,Record,Columns,Format x,1,1- 2,F2.0 y,1,3- 3,F1.0 z,1,4- 4,F1.0 Table: Data List x,y,z 1,1,1 2,2,2 3,1,1 4,1,2 5,2,1 6,1,2 7,1,1 8,1,1 9,1,2 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent y * z,9,100.0%,0,0.0%,9,100.0% Table: y * z [count]. ,z,, y,1,2,Total 1,4.00,3.00,7.00 2,1.00,1.00,2.00 Total,5.00,4.00,9.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:148" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_444 #AT_START_445 at_fn_group_banner 445 'crosstabs.at:184' \ "CROSSTABS chi-square crash" " " 71 at_xfail=no ( $as_echo "445. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs.sps <<'_ATEOF' DATA LIST LIST /x * y *. BEGIN DATA. 2 2 3 1 4 2 4 1 END DATA. CROSSTABS /TABLES= x BY y /STATISTICS=CHISQ. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:198: pspp -O format=csv crosstabs.sps" at_fn_check_prepare_trace "crosstabs.at:198" ( $at_check_trace; pspp -O format=csv crosstabs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,F8.0 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,4,100.0%,0,0.0%,4,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 2.00,.00,1.00,1.00 3.00,1.00,.00,1.00 4.00,1.00,1.00,2.00 Total,2.00,2.00,4.00 Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed) Pearson Chi-Square,2.00,2,.368 Likelihood Ratio,2.77,2,.250 Linear-by-Linear Association,.27,1,.602 N of Valid Cases,4,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:198" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_445 #AT_START_446 at_fn_group_banner 446 'crosstabs.at:228' \ "CROSSTABS crash with SPLIT FILE" " " 71 at_xfail=no ( $as_echo "446. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs.sps <<'_ATEOF' data list notable / v0 to v2 1-6 (A) begin data. a c e a c e a c e a d e a d f b d f b d f b c f b d e a c f end data. SORT CASES BY v0. SPLIT FILE SEPARATE BY v0. CROSSTABS /TABLES= v1 BY v2 /FORMAT=AVALUE TABLES PIVOT /STATISTICS=CHISQ /CELLS=COUNT ROW COLUMN TOTAL. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:253: pspp -O format=csv crosstabs.sps" at_fn_check_prepare_trace "crosstabs.at:253" ( $at_check_trace; pspp -O format=csv crosstabs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Value,Label v0,a , Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent v1 * v2,6,100.0%,0,0.0%,6,100.0% \"Table: v1 * v2 [count, row %, column %, total %].\" ,v2,, v1,e ,f ,Total c ,3.00,1.00,4.00 ,75.00%,25.00%,100.00% ,75.00%,50.00%,66.67% ,50.00%,16.67%,66.67% d ,1.00,1.00,2.00 ,50.00%,50.00%,100.00% ,25.00%,50.00%,33.33% ,16.67%,16.67%,33.33% Total,4.00,2.00,6.00 ,66.67%,33.33%,100.00% ,100.00%,100.00%,100.00% ,66.67%,33.33%,100.00% Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed) Pearson Chi-Square,.38,1,.540,, Likelihood Ratio,.37,1,.545,, Fisher's Exact Test,,,,1.000,.600 Continuity Correction,.00,1,1.000,, N of Valid Cases,6,,,, Variable,Value,Label v0,b , Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent v1 * v2,4,100.0%,0,0.0%,4,100.0% \"Table: v1 * v2 [count, row %, column %, total %].\" ,v2,, v1,e ,f ,Total c ,.00,1.00,1.00 ,.00%,100.00%,100.00% ,.00%,33.33%,25.00% ,.00%,25.00%,25.00% d ,1.00,2.00,3.00 ,33.33%,66.67%,100.00% ,100.00%,66.67%,75.00% ,25.00%,50.00%,75.00% Total,1.00,3.00,4.00 ,25.00%,75.00%,100.00% ,100.00%,100.00%,100.00% ,25.00%,75.00%,100.00% Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed) Pearson Chi-Square,.44,1,.505,, Likelihood Ratio,.68,1,.410,, Fisher's Exact Test,,,,1.000,.750 Continuity Correction,.00,1,1.000,, N of Valid Cases,4,,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:253" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_446 #AT_START_447 at_fn_group_banner 447 'crosstabs.at:323' \ "3-way CROSSTABS" " " 71 at_xfail=no ( $as_echo "447. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs.sps <<'_ATEOF' DATA LIST FIXED / x 1-2 y 3 z 4. BEGIN DATA. 0111 0222 0311 0412 0521 0612 0711 0811 0912 END DATA. LIST. CROSSTABS TABLES x BY y BY z/STATISTICS=ALL. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:347: pspp -O format=csv crosstabs.sps" at_fn_check_prepare_trace "crosstabs.at:347" ( $at_check_trace; pspp -O format=csv crosstabs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from INLINE. Variable,Record,Columns,Format x,1,1- 2,F2.0 y,1,3- 3,F1.0 z,1,4- 4,F1.0 Table: Data List x,y,z 1,1,1 2,2,2 3,1,1 4,1,2 5,2,1 6,1,2 7,1,1 8,1,1 9,1,2 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y * z,9,100.0%,0,0.0%,9,100.0% Table: x * y * z [count]. z,,y,, ,x,1,2,Total 1,1,1.00,.00,1.00 ,3,1.00,.00,1.00 ,5,.00,1.00,1.00 ,7,1.00,.00,1.00 ,8,1.00,.00,1.00 Total,,4.00,1.00,5.00 2,2,.00,1.00,1.00 ,4,1.00,.00,1.00 ,6,1.00,.00,1.00 ,9,1.00,.00,1.00 Total,,3.00,1.00,4.00 Table: Chi-square tests. z,Statistic,Value,df,Asymp. Sig. (2-tailed) 1,Pearson Chi-Square,5.00,4,.287 ,Likelihood Ratio,5.00,4,.287 ,Linear-by-Linear Association,.01,1,.938 ,N of Valid Cases,5,, 2,Pearson Chi-Square,4.00,3,.261 ,Likelihood Ratio,4.50,3,.212 ,Linear-by-Linear Association,1.58,1,.209 ,N of Valid Cases,4,, Table: Symmetric measures. z,Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. 1,Nominal by Nominal,Phi,1.00,,, ,,Cramer's V,1.00,,, ,,Contingency Coefficient,.71,,, ,Ordinal by Ordinal,Kendall's tau-b,.00,.32,.00, ,,Kendall's tau-c,.00,.32,.00, ,,Gamma,.00,.50,.00, ,,Spearman Correlation,.00,.22,.00, ,Interval by Interval,Pearson's R,.04,.22,.07, ,N of Valid Cases,,5,,, 2,Nominal by Nominal,Phi,1.00,,, ,,Cramer's V,1.00,,, ,,Contingency Coefficient,.71,,, ,Ordinal by Ordinal,Kendall's tau-b,-.71,.20,-1.73, ,,Kendall's tau-c,-.75,.43,-1.73, ,,Gamma,-1.00,.00,-1.73, ,,Spearman Correlation,-.77,.17,-1.73, ,Interval by Interval,Pearson's R,-.73,.18,-1.49, ,N of Valid Cases,,4,,, Table: Directional measures. z,Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. 1,Nominal by Nominal,Lambda,Symmetric,.40,.28,1.12,.264 ,,,x Dependent,.25,.22,1.12,.264 ,,,y Dependent,1.00,.00,1.12,.264 ,,Goodman and Kruskal tau,x Dependent,.25,,,. ,,,y Dependent,1.00,,,. ,,Uncertainty Coefficient,Symmetric,.47,.18,,. ,,,x Dependent,.31,.15,2.02,. ,,,y Dependent,1.00,.00,2.02,. ,Ordinal by Ordinal,Somers' d,Symmetric,.00,,.00,1.000 ,,,x Dependent,.00,.50,.00,1.000 ,,,y Dependent,.00,.20,.00,1.000 ,Nominal by Interval,Eta,x Dependent,.04,,,. ,,,y Dependent,1.00,,,. 2,Nominal by Nominal,Lambda,Symmetric,.50,.25,2.00,.046 ,,,x Dependent,.33,.27,1.15,.248 ,,,y Dependent,1.00,.00,1.15,.248 ,,Goodman and Kruskal tau,x Dependent,.33,,,. ,,,y Dependent,1.00,,,. ,,Uncertainty Coefficient,Symmetric,.58,.17,,. ,,,x Dependent,.41,.17,2.36,. ,,,y Dependent,1.00,.00,2.36,. ,Ordinal by Ordinal,Somers' d,Symmetric,-.67,,-1.73,.083 ,,,x Dependent,-1.00,.00,-1.73,.083 ,,,y Dependent,-.50,.29,-1.73,.083 ,Nominal by Interval,Eta,x Dependent,.73,,,. ,,,y Dependent,1.00,,,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:347" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_447 #AT_START_448 at_fn_group_banner 448 'crosstabs.at:450' \ "CROSSTABS rounding weights with COUNT" " " 71 at_xfail=no ( $as_echo "448. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs.sps <<'_ATEOF' DATA LIST NOTABLE LIST /x y w. BEGIN DATA. 1 1 1.4 1 1 1.4 1 2 1.6 1 2 1.6 2 1 1 2 2 2 END DATA. WEIGHT BY w. * These should have the same effect (no rounding). CROSSTABS /TABLES x BY y. CROSSTABS /TABLES x BY y /COUNT ASIS. * Round input weights. CROSSTABS /TABLES x BY y /COUNT CASE ROUND. CROSSTABS /TABLES x BY y /COUNT CASE TRUNCATE. * Round cell weights. CROSSTABS /TABLES x BY y /COUNT. CROSSTABS /TABLES x BY y /COUNT TRUNCATE. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:476: pspp -O format=csv crosstabs.sps" at_fn_check_prepare_trace "crosstabs.at:476" ( $at_check_trace; pspp -O format=csv crosstabs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,9.00,100.0%,.00,0.0%,9.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,2.80,3.20,6.00 2.00,1.00,2.00,3.00 Total,3.80,5.20,9.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,9.00,100.0%,.00,0.0%,9.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,2.80,3.20,6.00 2.00,1.00,2.00,3.00 Total,3.80,5.20,9.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,9.00,100.0%,.00,0.0%,9.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,2.00,4.00,6.00 2.00,1.00,2.00,3.00 Total,3.00,6.00,9.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,7.00,100.0%,.00,0.0%,7.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,2.00,2.00,4.00 2.00,1.00,2.00,3.00 Total,3.00,4.00,7.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,9.00,100.0%,.00,0.0%,9.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,3.00,3.00,6.00 2.00,1.00,2.00,3.00 Total,4.00,5.00,9.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,8.00,100.0%,.00,0.0%,8.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,2.00,3.00,5.00 2.00,1.00,2.00,3.00 Total,3.00,5.00,8.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:476" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_448 #AT_START_449 at_fn_group_banner 449 'crosstabs.at:557' \ "CROSSTABS descending sort order" " " 71 at_xfail=no ( $as_echo "449. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs-descending.sps <<'_ATEOF' DATA LIST NOTABLE LIST /x * y *. BEGIN DATA. 2 2 2 2 3 1 4 1 3 2 3 2 END DATA. CROSSTABS /TABLES= x BY y /FORMAT = DVALUE. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:574: pspp -O format=csv crosstabs-descending.sps" at_fn_check_prepare_trace "crosstabs.at:574" ( $at_check_trace; pspp -O format=csv crosstabs-descending.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,6,100.0%,0,0.0%,6,100.0% Table: x * y [count]. ,y,, x,2.00,1.00,Total 4.00,.00,1.00,1.00 3.00,2.00,1.00,3.00 2.00,2.00,.00,2.00 Total,4.00,2.00,6.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:574" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_449 #AT_START_450 at_fn_group_banner 450 'crosstabs.at:592' \ "CROSSTABS crash when all cases missing" " " 71 at_xfail=no ( $as_echo "450. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs.sps <<'_ATEOF' DATA LIST LIST NOTABLE /X1 X2. BEGIN DATA. 1 1 END DATA. MISSING VALUES x2 (1). CROSSTABS /TABLES= X1 by X2. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:603: pspp -O format=csv crosstabs.sps" at_fn_check_prepare_trace "crosstabs.at:603" ( $at_check_trace; pspp -O format=csv crosstabs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X1 * X2,0,0.0%,1,100.0%,1,100.0% crosstabs.sps:8: warning: CROSSTABS: Crosstabulation X1 * X2 contained no non-missing cases. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:603" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_450 #AT_START_451 at_fn_group_banner 451 'crosstabs.at:617' \ "CROSSTABS Fisher Exact Test" " " 71 at_xfail=no ( $as_echo "451. $at_setup_line: testing $at_desc ..." $at_traceon cat >fisher-exact.sps <<'_ATEOF' SET FORMAT F12.3. SET DECIMAL DOT. DATA LIST notable LIST /schtyp (F9.2) female (F9.2) ses (F9.2) . begin data. 1.00 .00 1.00 1.00 1.00 2.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 1.00 1.00 .00 1.00 1.00 .00 3.00 2.00 .00 2.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 2.00 .00 2.00 2.00 .00 3.00 1.00 .00 1.00 1.00 .00 2.00 1.00 .00 3.00 2.00 .00 3.00 1.00 .00 2.00 2.00 .00 3.00 1.00 .00 3.00 2.00 .00 2.00 1.00 .00 3.00 1.00 .00 1.00 1.00 .00 2.00 2.00 .00 2.00 2.00 .00 2.00 1.00 .00 2.00 1.00 .00 1.00 1.00 .00 3.00 1.00 .00 1.00 1.00 .00 3.00 1.00 .00 2.00 2.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 2.00 2.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 1.00 1.00 .00 2.00 2.00 .00 2.00 1.00 .00 2.00 2.00 .00 2.00 1.00 .00 3.00 1.00 .00 1.00 1.00 .00 2.00 2.00 .00 3.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 1.00 1.00 .00 1.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 1.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 1.00 2.00 .00 2.00 1.00 .00 1.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 1.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 2.00 1.00 3.00 1.00 1.00 3.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 3.00 1.00 1.00 1.00 2.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 3.00 2.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 2.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 2.00 1.00 3.00 1.00 1.00 2.00 2.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 2.00 2.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 1.00 2.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 2.00 2.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 2.00 2.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 3.00 2.00 1.00 2.00 1.00 1.00 3.00 2.00 1.00 2.00 2.00 1.00 2.00 1.00 1.00 2.00 2.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 3.00 end data. VARIABLE LABEL schtyp 'type of school'. ADD VALUE LABELS female 0 male 1 female. ADD VALUE LABELS ses 1 low 2 middle 3 high. ADD VALUE LABELS schtyp 1 public 2 private. crosstabs /tables = schtyp by female /statistic = chisq. crosstabs /tables = female by ses /statistic = chisq. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:836: pspp -O format=csv fisher-exact.sps" at_fn_check_prepare_trace "crosstabs.at:836" ( $at_check_trace; pspp -O format=csv fisher-exact.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent type of school * female,200,100.0%,0,0.0%,200,100.0% Table: type of school * female [count]. ,female,, type of school,male,female,Total public,77.000,91.000,168.000 private,14.000,18.000,32.000 Total,91.000,109.000,200.000 Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed) Pearson Chi-Square,.047,1,.828,, Likelihood Ratio,.047,1,.828,, Fisher's Exact Test,,,,.849,.492 Continuity Correction,.001,1,.981,, Linear-by-Linear Association,.047,1,.829,, N of Valid Cases,200,,,, Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent female * ses,200,100.0%,0,0.0%,200,100.0% Table: female * ses [count]. ,ses,,, female,low,middle,high,Total male,15.000,47.000,29.000,91.000 female,32.000,48.000,29.000,109.000 Total,47.000,95.000,58.000,200.000 Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed) Pearson Chi-Square,4.577,2,.101 Likelihood Ratio,4.679,2,.096 Linear-by-Linear Association,3.110,1,.078 N of Valid Cases,200,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:836" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_451 #AT_START_452 at_fn_group_banner 452 'crosstabs.at:882' \ "CROSSTABS Pearson's R" " " 71 at_xfail=no ( $as_echo "452. $at_setup_line: testing $at_desc ..." $at_traceon # Test 1. cat >pearson.sps <<'_ATEOF' SET FORMAT F8.3. * From http://www.statisticslectures.com/topics/pearsonr/. DATA LIST FREE/x y. BEGIN DATA. 1 4 3 6 5 10 5 12 6 13 END DATA. CROSSTABS x BY y/STATISTICS=CORR. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:898: pspp -O format=csv pearson.sps" at_fn_check_prepare_trace "crosstabs.at:898" ( $at_check_trace; pspp -O format=csv pearson.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,5,100.0%,0,0.0%,5,100.0% Table: x * y [count]. ,y,,,,, x,4.000,6.000,10.000,12.000,13.000,Total 1.000,1.000,.000,.000,.000,.000,1.000 3.000,.000,1.000,.000,.000,.000,1.000 5.000,.000,.000,1.000,1.000,.000,2.000 6.000,.000,.000,.000,.000,1.000,1.000 Total,1.000,1.000,1.000,1.000,1.000,5.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Spearman Correlation,.975,.022,7.550, Interval by Interval,Pearson's R,.968,.017,6.708, N of Valid Cases,,5,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:898" $at_failed && at_fn_log_failure $at_traceon; } # Test 2. cat >pearson2.sps <<'_ATEOF' SET FORMAT F8.3. * Checked with http://www.socscistatistics.com/tests/pearson/Default2.aspx. DATA LIST FREE/x y. BEGIN DATA. 1 1.5 2 1.5 3 4 4 6 5 5 6 7 7 6.5 8 9 9 10.5 10 11 END DATA. CROSSTABS x BY y/STATISTICS=CORR. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:941: pspp -O format=csv pearson2.sps" at_fn_check_prepare_trace "crosstabs.at:941" ( $at_check_trace; pspp -O format=csv pearson2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,10,100.0%,0,0.0%,10,100.0% Table: x * y [count]. ,y,,,,,,,,, x,1.500,4.000,5.000,6.000,6.500,7.000,9.000,10.500,11.000,Total 1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 2.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 3.000,.000,1.000,.000,.000,.000,.000,.000,.000,.000,1.000 4.000,.000,.000,.000,1.000,.000,.000,.000,.000,.000,1.000 5.000,.000,.000,1.000,.000,.000,.000,.000,.000,.000,1.000 6.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,1.000 7.000,.000,.000,.000,.000,1.000,.000,.000,.000,.000,1.000 8.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,1.000 9.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,1.000 10.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000 Total,2.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,10.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Spearman Correlation,.973,.015,11.844, Interval by Interval,Pearson's R,.971,.017,11.580, N of Valid Cases,,10,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:941" $at_failed && at_fn_log_failure $at_traceon; } # Test 3. cat >pearson3.sps <<'_ATEOF' SET FORMAT F8.3. * From http://learntech.uwe.ac.uk/da/Default.aspx?pageid=1442. DATA LIST FREE/x y. BEGIN DATA. 56 87 56 91 65 85 65 91 50 75 25 28 87 122 44 66 35 58 END DATA. CROSSTABS x BY y/STATISTICS=CORR. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:989: pspp -O format=csv pearson3.sps" at_fn_check_prepare_trace "crosstabs.at:989" ( $at_check_trace; pspp -O format=csv pearson3.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,9,100.0%,0,0.0%,9,100.0% Table: x * y [count]. ,y,,,,,,,, x,28.000,58.000,66.000,75.000,85.000,87.000,91.000,122.000,Total 25.000,1.000,.000,.000,.000,.000,.000,.000,.000,1.000 35.000,.000,1.000,.000,.000,.000,.000,.000,.000,1.000 44.000,.000,.000,1.000,.000,.000,.000,.000,.000,1.000 50.000,.000,.000,.000,1.000,.000,.000,.000,.000,1.000 56.000,.000,.000,.000,.000,.000,1.000,1.000,.000,2.000 65.000,.000,.000,.000,.000,1.000,.000,1.000,.000,2.000 87.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000 Total,1.000,1.000,1.000,1.000,1.000,1.000,2.000,1.000,9.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Spearman Correlation,.911,.068,5.860, Interval by Interval,Pearson's R,.966,.017,9.915, N of Valid Cases,,9,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:989" $at_failed && at_fn_log_failure $at_traceon; } # Test 4. cat >pearson4.sps <<'_ATEOF' SET FORMAT F8.3. * From http://psychology.ucdavis.edu/faculty_sites/sommerb/sommerdemo/correlation/hand/pearson_hand.htm. DATA LIST FREE/x y. BEGIN DATA. 5 5 10 20 6 4 8 15 4 11 4 9 3 12 10 18 2 7 6 2 7 14 9 17 END DATA. CROSSTABS x BY y/STATISTICS=CORR. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:1037: pspp -O format=csv pearson4.sps" at_fn_check_prepare_trace "crosstabs.at:1037" ( $at_check_trace; pspp -O format=csv pearson4.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,12,100.0%,0,0.0%,12,100.0% Table: x * y [count]. ,y,,,,,,,,,,,, x,2.000,4.000,5.000,7.000,9.000,11.000,12.000,14.000,15.000,17.000,18.000,20.000,Total 2.000,.000,.000,.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 3.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,.000,.000,1.000 4.000,.000,.000,.000,.000,1.000,1.000,.000,.000,.000,.000,.000,.000,2.000 5.000,.000,.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 6.000,1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,2.000 7.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,.000,1.000 8.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,1.000 9.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,1.000 10.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,2.000 Total,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,12.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Spearman Correlation,.657,.140,2.758, Interval by Interval,Pearson's R,.667,.132,2.830, N of Valid Cases,,12,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1037" $at_failed && at_fn_log_failure $at_traceon; } # Test 5. cat >pearson5.sps <<'_ATEOF' SET FORMAT F8.3. * From http://www.statisticslectures.com/topics/pearsonr/. DATA LIST FREE/x y. BEGIN DATA. 18 15000 25 29000 57 68000 45 52000 26 32000 64 80000 37 41000 40 45000 24 26000 33 33000 END DATA. CROSSTABS x BY y/STATISTICS=CORR. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:1085: pspp -O format=csv pearson5.sps" at_fn_check_prepare_trace "crosstabs.at:1085" ( $at_check_trace; pspp -O format=csv pearson5.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,10,100.0%,0,0.0%,10,100.0% Table: x * y [count]. ,y,,,,,,,,,, x,15000.000,26000.000,29000.000,32000.000,33000.000,41000.000,45000.000,52000.000,68000.000,80000.000,Total 18.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 24.000,.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 25.000,.000,.000,1.000,.000,.000,.000,.000,.000,.000,.000,1.000 26.000,.000,.000,.000,1.000,.000,.000,.000,.000,.000,.000,1.000 33.000,.000,.000,.000,.000,1.000,.000,.000,.000,.000,.000,1.000 37.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,.000,1.000 40.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,1.000 45.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,1.000 57.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,1.000 64.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000 Total,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,10.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Spearman Correlation,1.000,.000,+Infinity, Interval by Interval,Pearson's R,.992,.004,22.638, N of Valid Cases,,10,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1085" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_452 #AT_START_453 at_fn_group_banner 453 'crosstabs.at:1115' \ "CROSSTABS Goodman and Kruskal's lambda" " " 71 at_xfail=no ( $as_echo "453. $at_setup_line: testing $at_desc ..." $at_traceon cat >lambda.sps <<'_ATEOF' SET FORMAT F8.3. * From http://www.csupomona.edu/~jlkorey/POWERMUTT/Topics/contingency_tables.html. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 424 1 2 213 1 3 59 3 1 55 3 2 188 3 3 357 END DATA. CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA. * From http://vassarstats.net. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 19 1 2 26 1 3 8 2 1 21 2 2 13 2 3 5 3 1 6 3 2 12 3 3 27 END DATA. CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA. * From Goodman, L.A., Kruskal, W.H. (1954) "Measures of association for cross classifications". Part I. Journal of the American Statistical Association, 49, 732-764. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 1768 1 2 807 1 3 189 1 4 47 2 1 946 2 2 1387 2 3 746 2 4 53 3 1 115 3 2 438 3 3 288 3 4 16 END DATA. CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:1171: pspp -O format=csv lambda.sps" at_fn_check_prepare_trace "crosstabs.at:1171" ( $at_check_trace; pspp -O format=csv lambda.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,1296.000,100.0%,.000,0.0%,1296.000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.423,.021,16.875,.000 ,,x Dependent,.497,.024,15.986,.000 ,,y Dependent,.370,.020,16.339,.000 ,Goodman and Kruskal tau,x Dependent,.382,,,. ,,y Dependent,.198,,,. Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,137.000,100.0%,.000,0.0%,137.000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.259,.081,2.902,.004 ,,x Dependent,.250,.089,2.479,.013 ,,y Dependent,.267,.085,2.766,.006 ,Goodman and Kruskal tau,x Dependent,.129,,,. ,,y Dependent,.123,,,. Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,6800.000,100.0%,.000,0.0%,6800.000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.208,.010,18.793,.000 ,,x Dependent,.224,.013,16.076,.000 ,,y Dependent,.192,.012,14.438,.000 ,Goodman and Kruskal tau,x Dependent,.089,,,. ,,y Dependent,.081,,,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1171" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_453 #AT_START_454 at_fn_group_banner 454 'crosstabs.at:1216' \ "CROSSTABS Goodman and Kruskal's lambda - treatment of ties" "" 71 at_xfail=no ( $as_echo "454. $at_setup_line: testing $at_desc ..." $at_traceon cat >lambda.sps <<'_ATEOF' SET FORMAT F8.3. * From Douglas Bonett. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 225 1 2 43 1 3 216 2 1 3 2 2 1 2 3 12 END DATA. CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:1234: pspp -O format=csv lambda.sps" at_fn_check_prepare_trace "crosstabs.at:1234" ( $at_check_trace; pspp -O format=csv lambda.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,500.000,100.0%,.000,0.0%,500.000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.031,.013,2.336,.019 ,,x Dependent,.000,.000,NaN,NaN ,,y Dependent,.033,.014,2.336,.019 ,Goodman and Kruskal tau,x Dependent,.012,,,. ,,y Dependent,.009,,,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1234" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_454 #AT_START_455 at_fn_group_banner 455 'crosstabs.at:1251' \ "CROSSTABS Somers' D, Tau-B, Tau-C, Gamma" " " 71 at_xfail=no ( $as_echo "455. $at_setup_line: testing $at_desc ..." $at_traceon cat >somersd.sps <<'_ATEOF' SET FORMAT F8.3. * From http://stats.stackexchange.com/questions/72203/problem-with-calculating-asymptotic-standard-error-for-somers-d. DATA LIST LIST NOTABLE/x y * w (F10.6). WEIGHT BY w. BEGIN DATA. 1 1 0.000025 1 2 0.0001 1 3 0.001 1 4 0.0025 1 5 0.004 1 6 0.0075 1 7 0.0125 2 1 0.049975 2 2 0.0999 2 3 0.199 2 4 0.2475 2 5 0.196 2 6 0.1425 2 7 0.0375 END DATA. CROSSTABS x BY y/STATISTICS=D/CELLS=NONE. * From http://uregina.ca/~gingrich/gamma.pdf. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 34 1 2 24 1 3 15 2 1 42 2 2 74 2 3 67 3 1 28 3 2 111 3 3 292 END DATA. CROSSTABS x BY y/STATISTICS=BTAU CTAU GAMMA D/CELLS=NONE. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:1292: pspp -O format=csv somersd.sps" at_fn_check_prepare_trace "crosstabs.at:1292" ( $at_check_trace; pspp -O format=csv somersd.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,1.000000,100.0%,.000000,0.0%,1.000000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,-.084,,-.149,.882 ,,x Dependent,-.045,.300,-.149,.882 ,,y Dependent,-.684,2.378,-.149,.882 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,687.000,100.0%,.000,0.0%,687.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,.372,.033,10.669, ,Kendall's tau-c,.310,.029,10.669, ,Gamma,.591,.043,10.669, N of Valid Cases,,687.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,.371,,10.669,.000 ,,x Dependent,.351,.032,10.669,.000 ,,y Dependent,.394,.035,10.669,.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1292" $at_failed && at_fn_log_failure $at_traceon; } cat >ordinal.sps <<'_ATEOF' SET FORMAT F8.3. * From https://www.iup.edu/WorkArea/DownloadAsset.aspx?id=9829, "Case 1". DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 2 40 2 3 80 3 4 30 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 2. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 1 40 2 3 80 3 4 30 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 3. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 4 40 2 3 80 3 2 30 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 4. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 1 20 1 2 20 2 3 80 3 4 30 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 5. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 2 40 2 2 80 3 2 29 3 3 1 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 6. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 1 3 1 2 6 1 3 28 1 4 61 2 1 4 2 2 5 2 3 21 2 4 20 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 7. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 1 38 1 2 6 1 3 3 1 4 51 2 1 4 2 2 20 2 3 21 2 4 5 END DATA. CROSSTABS x BY y/STATISTICS=LAMBDA D PHI GAMMA/CELLS=NONE. * Same site, case 8. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 1 2 1 2 3 1 3 5 1 4 1 2 1 2 2 2 16 2 3 3 2 4 6 3 1 3 3 2 10 3 3 35 3 4 27 4 1 6 4 2 15 4 3 33 4 4 45 END DATA. CROSSTABS x BY y/STATISTICS=LAMBDA D PHI BTAU/CELLS=NONE. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:1433: pspp -O format=csv ordinal.sps" at_fn_check_prepare_trace "crosstabs.at:1433" ( $at_check_trace; pspp -O format=csv ordinal.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,150.000,100.0%,.000,0.0%,150.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,1.000,.000,24.841, ,Gamma,1.000,.000,24.841, N of Valid Cases,,150.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,1.000,,24.841,.000 ,,x Dependent,1.000,.000,24.841,.000 ,,y Dependent,1.000,.000,24.841,.000 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,150.000,100.0%,.000,0.0%,150.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,1.000,.000,24.841, ,Gamma,1.000,.000,24.841, N of Valid Cases,,150.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,1.000,,24.841,.000 ,,x Dependent,1.000,.000,24.841,.000 ,,y Dependent,1.000,.000,24.841,.000 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,150.000,100.0%,.000,0.0%,150.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,-1.000,.000,-24.841, ,Gamma,-1.000,.000,-24.841, N of Valid Cases,,150.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,-1.000,,-24.841,.000 ,,x Dependent,-1.000,.000,-24.841,.000 ,,y Dependent,-1.000,.000,-24.841,.000 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,150.000,100.0%,.000,0.0%,150.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,.972,.007,24.841, ,Gamma,1.000,.000,24.841, N of Valid Cases,,150.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,.971,,24.841,.000 ,,x Dependent,.944,.013,24.841,.000 ,,y Dependent,1.000,.000,24.841,.000 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,150.000,100.0%,.000,0.0%,150.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,.119,.059,1.009, ,Gamma,1.000,.000,1.009, N of Valid Cases,,150.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,.035,,1.009,.313 ,,x Dependent,.805,.032,1.009,.313 ,,y Dependent,.018,.017,1.009,.313 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,148.000,100.0%,.000,0.0%,148.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,-.208,.078,-2.641, ,Gamma,-.381,.130,-2.641, N of Valid Cases,,148.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,-.206,,-2.641,.008 ,,x Dependent,-.182,.069,-2.641,.008 ,,y Dependent,-.237,.089,-2.641,.008 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,148.000,100.0%,.000,0.0%,148.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Phi,.731,,, ,Cramer's V,.731,,, Ordinal by Ordinal,Gamma,-.110,.107,-1.022, N of Valid Cases,,148.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.338,.059,4.743,.000 ,,x Dependent,.640,.085,4.875,.000 ,,y Dependent,.174,.050,3.248,.001 ,Goodman and Kruskal tau,x Dependent,.534,,,. ,,y Dependent,.167,,,. Ordinal by Ordinal,Somers' d,Symmetric,-.074,,-1.022,.307 ,,x Dependent,-.060,.059,-1.022,.307 ,,y Dependent,-.096,.094,-1.022,.307 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,212.000,100.0%,.000,0.0%,212.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Phi,.432,,, ,Cramer's V,.249,,, Ordinal by Ordinal,Kendall's tau-b,.209,.062,3.338, N of Valid Cases,,212.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.102,.067,1.473,.141 ,,x Dependent,.027,.087,.302,.763 ,,y Dependent,.165,.065,2.349,.019 ,Goodman and Kruskal tau,x Dependent,.051,,,. ,,y Dependent,.068,,,. Ordinal by Ordinal,Somers' d,Symmetric,.209,,3.338,.001 ,,x Dependent,.202,.060,3.338,.001 ,,y Dependent,.217,.064,3.338,.001 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1433" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_455 #AT_START_456 at_fn_group_banner 456 'crosstabs.at:1592' \ "CROSSTABS Cohens Kappa" " " 71 at_xfail=no ( $as_echo "456. $at_setup_line: testing $at_desc ..." $at_traceon cat >kappa.sps <<'_ATEOF' SET FORMAT=F8.3. data list notable list /p1 * p2 * w *. begin data. 0 0 18 1 0 1 0 1 1 end data. weight by w. crosstabs /table = p1 by p2 statistics = kappa . _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:1614: pspp -O format=csv kappa.sps" at_fn_check_prepare_trace "crosstabs.at:1614" ( $at_check_trace; pspp -O format=csv kappa.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent p1 * p2,20.000,100.0%,.000,0.0%,20.000,100.0% Table: p1 * p2 [count]. ,p2,, p1,.000,1.000,Total .000,18.000,1.000,19.000 1.000,1.000,.000,1.000 Total,19.000,1.000,20.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Measure of Agreement,Kappa,-.053,.037,-.235, N of Valid Cases,,20.000,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1614" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_456 #AT_START_457 at_fn_group_banner 457 'crosstabs.at:1637' \ "CROSSTABS many statistics" " " 71 at_xfail=no ( $as_echo "457. $at_setup_line: testing $at_desc ..." $at_traceon cat >crosstabs.sps <<'_ATEOF' SET FORMAT=F8.4. * From http://www4.stat.ncsu.edu/~dzhang2/st744/table3.9.lst.txt. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 25 1 2 25 1 3 12 2 2 1 2 3 3 END DATA. CROSSTABS x BY y/STATISTICS=CHISQ PHI CC LAMBDA UC BTAU CTAU GAMMA D CORR/CELLS=NONE. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:1653: pspp -O format=csv crosstabs.sps" at_fn_check_prepare_trace "crosstabs.at:1653" ( $at_check_trace; pspp -O format=csv crosstabs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,66.0000,100.0%,.0000,0.0%,66.0000,100.0% Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed) Pearson Chi-Square,6.9562,2.0000,.031 Likelihood Ratio,6.6901,2.0000,.035 Linear-by-Linear Association,5.8450,1.0000,.016 N of Valid Cases,66.0000,, Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Phi,.3246,,, ,Cramer's V,.3246,,, ,Contingency Coefficient,.3088,,, Ordinal by Ordinal,Kendall's tau-b,.2752,.0856,1.9920, ,Kendall's tau-c,.1497,.0751,1.9920, ,Gamma,.8717,.1250,1.9920, ,Spearman Correlation,.2908,.0906,2.4311, Interval by Interval,Pearson's R,.2999,.0973,2.5147, N of Valid Cases,,66.0000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.0455,.1629,.2723,.785 ,,x Dependent,.0000,.0000,NaN,NaN ,,y Dependent,.0500,.1791,.2723,.785 ,Goodman and Kruskal tau,x Dependent,.1054,,,. ,,y Dependent,.0434,,,. ,Uncertainty Coefficient,Symmetric,.0780,.0474,,. ,,x Dependent,.2217,.1062,1.5373,. ,,y Dependent,.0473,.0306,1.5373,. Ordinal by Ordinal,Somers' d,Symmetric,.1960,,1.9920,.046 ,,x Dependent,.1152,.0572,1.9920,.046 ,,y Dependent,.6573,.1417,1.9920,.046 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1653" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_457 #AT_START_458 at_fn_group_banner 458 'crosstabs.at:1695' \ "CROSSTABS uncertainy coefficient" " " 71 at_xfail=no ( $as_echo "458. $at_setup_line: testing $at_desc ..." $at_traceon cat >uc.sps <<'_ATEOF' * From http://groups.chass.utoronto.ca/pol242/5bMeasuringAssociation.htm. SET FORMAT=F8.3. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 416 1 2 121 2 1 335 2 2 2 3 1 112 3 2 1 END DATA. CROSSTABS x BY y/STATISTICS=LAMBDA UC/CELLS=NONE. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:1712: pspp -O format=csv uc.sps" at_fn_check_prepare_trace "crosstabs.at:1712" ( $at_check_trace; pspp -O format=csv uc.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,987.000,100.0%,.000,0.0%,987.000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.000,.000,NaN,NaN ,,x Dependent,.000,.000,NaN,NaN ,,y Dependent,.000,.000,NaN,NaN ,Goodman and Kruskal tau,x Dependent,.076,,,. ,,y Dependent,.108,,,. ,Uncertainty Coefficient,Symmetric,.105,.012,,. ,,x Dependent,.073,.009,7.890,. ,,y Dependent,.184,.019,7.890,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1712" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_458 #AT_START_459 at_fn_group_banner 459 'crosstabs.at:1734' \ "CROSSTABS barchart" " " 71 at_xfail=no ( $as_echo "459. $at_setup_line: testing $at_desc ..." $at_traceon cat >bc.sps <<'_ATEOF' SET FORMAT=F8.3. DATA LIST LIST NOTABLE /x (a20) y (f8) z (f8) w (f8) . BEGIN DATA. This 1 0 416 That 2 0 121 Other 2 0 335 This 2 0 231 That 3 0 112 Other 4 0 130 This 1 1 160 That 2 1 211 Other 2 1 352 This 2 1 212 That 3 1 121 Other 4 1 101 END DATA. WEIGHT BY w. CROSSTABS /table x BY y BY z /table x BY y /barchart. _ATEOF { set +x $as_echo "$at_srcdir/crosstabs.at:1762: pspp -O format=txt -o xxx bc.sps" at_fn_check_prepare_trace "crosstabs.at:1762" ( $at_check_trace; pspp -O format=txt -o xxx bc.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1762" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/crosstabs.at:1764: test -e xxx-1.png" at_fn_check_prepare_trace "crosstabs.at:1764" ( $at_check_trace; test -e xxx-1.png ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1764" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/crosstabs.at:1765: test -e xxx-2.png" at_fn_check_prepare_trace "crosstabs.at:1765" ( $at_check_trace; test -e xxx-2.png ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1765" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/crosstabs.at:1767: diff xxx-1.png xxx-2.png" at_fn_check_prepare_trace "crosstabs.at:1767" ( $at_check_trace; diff xxx-1.png xxx-2.png ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/crosstabs.at:1767" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_459 #AT_START_460 at_fn_group_banner 460 'descriptives.at:19' \ "DESCRIPTIVES basics" " " 72 at_xfail=no ( $as_echo "460. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' title 'Test DESCRIPTIVES procedure'. data list / V0 to V16 1-17. begin data. 12128989012389023 34128080123890128 56127781237893217 78127378123793112 90913781237892318 37978547878935789 52878237892378279 12377912789378932 26787654347894348 29137178947891888 end data. descript all/stat=all/format=serial. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:39: pspp -O format=csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:39" ( $at_check_trace; pspp -O format=csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Title: Test DESCRIPTIVES procedure Table: Reading 1 record from INLINE. Variable,Record,Columns,Format V0,1,1- 1,F1.0 V1,1,2- 2,F1.0 V2,1,3- 3,F1.0 V3,1,4- 4,F1.0 V4,1,5- 5,F1.0 V5,1,6- 6,F1.0 V6,1,7- 7,F1.0 V7,1,8- 8,F1.0 V8,1,9- 9,F1.0 V9,1,10- 10,F1.0 V10,1,11- 11,F1.0 V11,1,12- 12,F1.0 V12,1,13- 13,F1.0 V13,1,14- 14,F1.0 V14,1,15- 15,F1.0 V15,1,16- 16,F1.0 V16,1,17- 17,F1.0 Table: Valid cases = 10; cases with missing value(s) = 0. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum V0,10,0,3.80,.84,2.66,7.07,-.03,1.33,.89,.69,8.00,1.00,9.00,38.00 V1,10,0,4.60,.96,3.03,9.16,-1.39,1.33,-.03,.69,9.00,.00,9.00,46.00 V2,10,0,4.10,1.16,3.67,13.43,-2.02,1.33,.48,.69,8.00,1.00,9.00,41.00 V3,10,0,4.10,.87,2.77,7.66,-2.05,1.33,.42,.69,7.00,1.00,8.00,41.00 V4,10,0,7.00,.47,1.49,2.22,7.15,1.33,-2.52,.69,5.00,3.00,8.00,70.00 V5,10,0,4.90,1.03,3.25,10.54,-1.40,1.33,-.20,.69,9.00,.00,9.00,49.00 V6,10,0,5.90,.80,2.51,6.32,-.29,1.33,-.96,.69,7.00,1.00,8.00,59.00 V7,10,0,4.70,1.10,3.47,12.01,-1.99,1.33,-.16,.69,9.00,.00,9.00,47.00 V8,10,0,4.10,1.10,3.48,12.10,-1.93,1.33,.37,.69,9.00,.00,9.00,41.00 V9,10,0,4.30,.87,2.75,7.57,-.87,1.33,.73,.69,8.00,1.00,9.00,43.00 V10,10,0,5.50,.85,2.68,7.17,-1.84,1.33,-.33,.69,7.00,2.00,9.00,55.00 V11,10,0,6.50,.78,2.46,6.06,-1.28,1.33,-.89,.69,6.00,3.00,9.00,65.00 V12,10,0,7.90,.60,1.91,3.66,5.24,1.33,-2.21,.69,6.00,3.00,9.00,79.00 V13,10,0,4.30,.99,3.13,9.79,-1.25,1.33,.33,.69,9.00,.00,9.00,43.00 V14,10,0,3.60,1.01,3.20,10.27,-.96,1.33,.81,.69,9.00,.00,9.00,36.00 V15,10,0,3.70,.92,2.91,8.46,-1.35,1.33,.71,.69,7.00,1.00,8.00,37.00 V16,10,0,6.40,.91,2.88,8.27,-1.14,1.33,-.92,.69,7.00,2.00,9.00,64.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_460 #AT_START_461 at_fn_group_banner 461 'descriptives.at:98' \ "DESCRIPTIVES -- excluding missing data" " " 72 at_xfail=no ( $as_echo "461. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' data list notable / V1 TO V3 1-3. mis val v1 to v3 (1). begin data. 111 1 1 1 112 123 234 end data. descript all/stat=all/format=serial. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:103: pspp -O format=csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:103" ( $at_check_trace; pspp -O format=csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Valid cases = 7; cases with missing value(s) = 6. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum V1,1,6,2.00,. ,. ,. ,. ,. ,. ,. ,.00,2.00,2.00,2.00 V2,2,5,2.50,.50,.71,.50,. ,. ,. ,. ,1.00,2.00,3.00,5.00 V3,3,4,3.00,.58,1.00,1.00,. ,. ,.00,1.22,2.00,2.00,4.00,9.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:103" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_461 #AT_START_462 at_fn_group_banner 462 'descriptives.at:112' \ "DESCRIPTIVES -- including missing data" " " 72 at_xfail=no ( $as_echo "462. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' data list notable / V1 TO V3 1-3. mis val v1 to v3 (1). begin data. 111 1 1 1 112 123 234 end data. descript all/stat=all/format=serial/missing=include. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:117: pspp -O format=csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:117" ( $at_check_trace; pspp -O format=csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Valid cases = 7; cases with missing value(s) = 3. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum V1,5,2,1.20,.20,.45,.20,5.00,2.00,2.24,.91,1.00,1.00,2.00,6.00 V2,5,2,1.60,.40,.89,.80,.31,2.00,1.26,.91,2.00,1.00,3.00,8.00 V3,5,2,2.20,.58,1.30,1.70,-1.49,2.00,.54,.91,3.00,1.00,4.00,11.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:117" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_462 #AT_START_463 at_fn_group_banner 463 'descriptives.at:126' \ "DESCRIPTIVES -- excluding missing data listwise" "" 72 at_xfail=no ( $as_echo "463. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' data list notable / V1 TO V3 1-3. mis val v1 to v3 (1). begin data. 111 1 1 1 112 123 234 end data. descript all/stat=all/format=serial/missing=listwise. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:131: pspp -O format=csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:131" ( $at_check_trace; pspp -O format=csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Valid cases = 1; cases with missing value(s) = 6. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum V1,1,0,2.00,. ,. ,. ,. ,. ,. ,. ,.00,2.00,2.00,2.00 V2,1,0,3.00,. ,. ,. ,. ,. ,. ,. ,.00,3.00,3.00,3.00 V3,1,0,4.00,. ,. ,. ,. ,. ,. ,. ,.00,4.00,4.00,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:131" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_463 #AT_START_464 at_fn_group_banner 464 'descriptives.at:140' \ "DESCRIPTIVES -- including missing data listwise" "" 72 at_xfail=no ( $as_echo "464. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' data list notable / V1 TO V3 1-3. mis val v1 to v3 (1). begin data. 111 1 1 1 112 123 234 end data. descript all/stat=all/format=serial/missing=listwise include. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:145: pspp -O format=csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:145" ( $at_check_trace; pspp -O format=csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Valid cases = 4; cases with missing value(s) = 3. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum V1,4,0,1.25,.25,.50,.25,4.00,2.62,2.00,1.01,1.00,1.00,2.00,5.00 V2,4,0,1.75,.48,.96,.92,-1.29,2.62,.85,1.01,2.00,1.00,3.00,7.00 V3,4,0,2.50,.65,1.29,1.67,-1.20,2.62,.00,1.01,3.00,1.00,4.00,10.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:145" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_464 #AT_START_465 at_fn_group_banner 465 'descriptives.at:154' \ "DESCRIPTIVES bug calculating mean only" " " 72 at_xfail=no ( $as_echo "465. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' SET FORMAT F8.3. data list notable / X 1. begin data. 0 1 2 3 4 5 end data. descript all/stat=mean. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:170: pspp -O format=csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:170" ( $at_check_trace; pspp -O format=csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Valid cases = 6; cases with missing value(s) = 0. Variable,N,Mean X,6,2.500 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:170" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_465 #AT_START_466 at_fn_group_banner 466 'descriptives.at:180' \ "DESCRIPTIVES bug with TEMPORARY" " " 72 at_xfail=no ( $as_echo "466. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' DATA LIST LIST NOTABLE /id * abc *. BEGIN DATA. 1 3.5 2 2.0 3 2.0 4 3.5 5 3.0 6 4.0 7 5.0 END DATA. TEMPORARY. SELECT IF id < 7 . DESCRIPTIVES /VAR=abc. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:198: pspp -O format=csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:198" ( $at_check_trace; pspp -O format=csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Valid cases = 6; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum abc,6,3.00,.84,2.00,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:198" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_466 #AT_START_467 at_fn_group_banner 467 'descriptives.at:205' \ "DESCRIPTIVES -- Z scores" " " 72 at_xfail=no ( $as_echo "467. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' DATA LIST LIST NOTABLE /a b. BEGIN DATA. 1 50 2 60 3 70 END DATA. DESCRIPTIVES /VAR=a b /SAVE. LIST. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:217: pspp -O format=csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:217" ( $at_check_trace; pspp -O format=csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Mapping of variables to corresponding Z-scores. Source,Target a,Za b,Zb Table: Valid cases = 3; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum a,3,2.00,1.00,1.00,3.00 b,3,60.00,10.00,50.00,70.00 Table: Data List a,b,Za,Zb 1.00,50.00,-1.00,-1.00 2.00,60.00,.00,.00 3.00,70.00,1.00,1.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:217" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_467 #AT_START_468 at_fn_group_banner 468 'descriptives.at:236' \ "DESCRIPTIVES -- Z scores with SPLIT FILE" " " 72 at_xfail=no ( $as_echo "468. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' DATA LIST LIST NOTABLE /group a b. BEGIN DATA. 1 1 50 1 2 60 1 3 70 2 100 6000 2 200 7000 2 400 9000 2 500 10000 END DATA. SPLIT FILE BY group. DESCRIPTIVES /VAR=a b /SAVE. LIST. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:253: pspp -O format=csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:253" ( $at_check_trace; pspp -O format=csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Mapping of variables to corresponding Z-scores. Source,Target a,Za b,Zb Variable,Value,Label group,1.00, Table: Valid cases = 3; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum a,3,2.00,1.00,1.00,3.00 b,3,60.00,10.00,50.00,70.00 Variable,Value,Label group,2.00, Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum a,4,300.00,182.57,100.00,500.00 b,4,8000.00,1825.74,6000.00,10000.00 Variable,Value,Label group,1.00, Table: Data List group,a,b,Za,Zb 1.00,1.00,50.00,-1.00,-1.00 1.00,2.00,60.00,.00,.00 1.00,3.00,70.00,1.00,1.00 Variable,Value,Label group,2.00, Table: Data List group,a,b,Za,Zb 2.00,100.00,6000.00,-1.10,-1.10 2.00,200.00,7000.00,-.55,-.55 2.00,400.00,9000.00,.55,.55 2.00,500.00,10000.00,1.10,1.10 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:253" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_468 #AT_START_469 at_fn_group_banner 469 'descriptives.at:300' \ "DESCRIPTIVES -- Z scores bug with TEMPORARY" " " 72 at_xfail=no ( $as_echo "469. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' DATA LIST LIST NOTABLE /id abc. BEGIN DATA. 1 3.5 2 2.0 3 2.0 4 3.5 5 3.0 6 4.0 7 5.0 END DATA. TEMPORARY. SELECT IF id < 7 . DESCRIPTIVES /VAR=abc/SAVE. LIST. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:319: pspp -O format=csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:319" ( $at_check_trace; pspp -O format=csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "descriptives.sps:15: warning: DESCRIPTIVES: DESCRIPTIVES with Z scores ignores TEMPORARY. Temporary transformations will be made permanent. Table: Mapping of variables to corresponding Z-scores. Source,Target abc,Zabc Table: Valid cases = 6; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum abc,6,3.00,.84,2.00,4.00 Table: Data List id,abc,Zabc 1.00,3.50,.60 2.00,2.00,-1.20 3.00,2.00,-1.20 4.00,3.50,.60 5.00,3.00,.00 6.00,4.00,1.20 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:319" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_469 #AT_START_470 at_fn_group_banner 470 'descriptives.at:342' \ "DESCRIPTIVES -- Z scores with FILTER" " " 72 at_xfail=no ( $as_echo "470. $at_setup_line: testing $at_desc ..." $at_traceon cat >descriptives.sps <<'_ATEOF' DATA LIST LIST/filter1 filter2 x. BEGIN DATA. 0,0,300 0,1,200 0,1,100 1,0,5 1,0,4 1,1,3 1,1,2 1,1,1 END DATA. FILTER OFF. SPLIT FILE OFF. DESCRIPTIVES /VARIABLES=X /SAVE. FILTER BY filter1. SPLIT FILE OFF. DESCRIPTIVES /VARIABLES=X /SAVE. FILTER OFF. SORT CASES BY filter1. SPLIT FILE BY filter1. DESCRIPTIVES /VARIABLES=X /SAVE. FILTER BY filter2. SPLIT FILE BY filter1. DESCRIPTIVES /VARIABLES=X /SAVE. FILTER OFF. SORT CASES BY filter1 filter2. SPLIT FILE BY filter1 filter2. DESCRIPTIVES /VARIABLES=X /SAVE. EXECUTE. SPLIT FILE OFF. LIST. _ATEOF { set +x $as_echo "$at_srcdir/descriptives.at:382: pspp -o pspp.csv descriptives.sps" at_fn_check_prepare_trace "descriptives.at:382" ( $at_check_trace; pspp -o pspp.csv descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:382" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/descriptives.at:383: sed -n '/Table: Data List/,\$p' < pspp.csv" at_fn_check_prepare_dynamic "sed -n '/Table: Data List/,$p' < pspp.csv" "descriptives.at:383" ( $at_check_trace; sed -n '/Table: Data List/,$p' < pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List filter1,filter2,x,Zx,ZSC001,ZSC002,ZSC003,ZSC004 .00,.00,300.00,1.94,. ,1.00,. ,. .00,1.00,200.00,1.07,. ,.00,.71,.71 .00,1.00,100.00,.20,. ,-1.00,-.71,-.71 1.00,.00,5.00,-.62,1.26,1.26,. ,.71 1.00,.00,4.00,-.63,.63,.63,. ,-.71 1.00,1.00,3.00,-.64,.00,.00,1.00,1.00 1.00,1.00,2.00,-.65,-.63,-.63,.00,.00 1.00,1.00,1.00,-.66,-1.26,-1.26,-1.00,-1.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/descriptives.at:383" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_470 #AT_START_471 at_fn_group_banner 471 'examine.at:19' \ "EXAMINE" " " 73 at_xfail=no ( $as_echo "471. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' DATA LIST LIST /QUALITY * W * BRAND * . BEGIN DATA 3 1 1 2 2 1 1 2 1 1 1 1 4 1 1 4 1 1 5 1 2 2 1 2 4 4 2 2 1 2 3 1 2 7 1 3 4 2 3 5 3 3 3 1 3 6 1 3 END DATA WEIGHT BY w. VARIABLE LABELS brand 'Manufacturer'. VARIABLE LABELS quality 'Breaking Strain'. VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'. LIST /FORMAT=NUMBERED. EXAMINE quality BY brand /STATISTICS descriptives extreme(3) . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:59: pspp -O format=csv examine.sps" at_fn_check_prepare_trace "examine.at:59" ( $at_check_trace; pspp -O format=csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format QUALITY,F8.0 W,F8.0 BRAND,F8.0 Table: Data List Case Number,QUALITY,W,BRAND 1,3.00,1.00,1.00 2,2.00,2.00,1.00 3,1.00,2.00,1.00 4,1.00,1.00,1.00 5,4.00,1.00,1.00 6,4.00,1.00,1.00 7,5.00,1.00,2.00 8,2.00,1.00,2.00 9,4.00,4.00,2.00 10,2.00,1.00,2.00 11,3.00,1.00,2.00 12,7.00,1.00,3.00 13,4.00,2.00,3.00 14,5.00,3.00,3.00 15,3.00,1.00,3.00 16,6.00,1.00,3.00 Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent Breaking Strain,24.00,100%,.00,0%,24.00,100% Table: Extreme Values ,,,Case Number,Value Breaking Strain,Highest,1,12,7.00 ,,2,16,6.00 ,,3,14,5.00 ,Lowest,1,3,1.00 ,,2,4,1.00 ,,3,2,2.00 Table: Descriptives ,,,Statistic,Std. Error Breaking Strain,Mean,,3.54,.32 ,95% Confidence Interval for Mean,Lower Bound,2.87, ,,Upper Bound,4.21, ,5% Trimmed Mean,,3.50, ,Median,,4.00, ,Variance,,2.52, ,Std. Deviation,,1.59, ,Minimum,,1.00, ,Maximum,,7.00, ,Range,,6.00, ,Interquartile Range,,2.75, ,Skewness,,.06,.47 ,Kurtosis,,-.36,.92 Table: Case Processing Summary ,,Cases,,,,, ,,Valid,,Missing,,Total, ,Manufacturer,N,Percent,N,Percent,N,Percent Breaking Strain,Aspeger,8.00,100%,.00,0%,8.00,100% ,Bloggs,8.00,100%,.00,0%,8.00,100% ,Charlies,8.00,100%,.00,0%,8.00,100% Table: Extreme Values ,Manufacturer,,,Case Number,Value Breaking Strain,Aspeger,Highest,1,6,4.00 ,,,2,5,4.00 ,,,3,1,3.00 ,,Lowest,1,3,1.00 ,,,2,4,1.00 ,,,3,2,2.00 ,Bloggs,Highest,1,7,5.00 ,,,2,9,4.00 ,,,3,11,3.00 ,,Lowest,1,8,2.00 ,,,2,10,2.00 ,,,3,11,3.00 ,Charlies,Highest,1,12,7.00 ,,,2,16,6.00 ,,,3,14,5.00 ,,Lowest,1,15,3.00 ,,,2,13,4.00 ,,,3,14,5.00 Table: Descriptives ,Manufacturer,,,Statistic,Std. Error Breaking Strain,Aspeger,Mean,,2.25,.45 ,,95% Confidence Interval for Mean,Lower Bound,1.18, ,,,Upper Bound,3.32, ,,5% Trimmed Mean,,2.22, ,,Median,,2.00, ,,Variance,,1.64, ,,Std. Deviation,,1.28, ,,Minimum,,1.00, ,,Maximum,,4.00, ,,Range,,3.00, ,,Interquartile Range,,2.75, ,,Skewness,,.47,.75 ,,Kurtosis,,-1.55,1.48 ,Bloggs,Mean,,3.50,.38 ,,95% Confidence Interval for Mean,Lower Bound,2.61, ,,,Upper Bound,4.39, ,,5% Trimmed Mean,,3.50, ,,Median,,4.00, ,,Variance,,1.14, ,,Std. Deviation,,1.07, ,,Minimum,,2.00, ,,Maximum,,5.00, ,,Range,,3.00, ,,Interquartile Range,,1.75, ,,Skewness,,-.47,.75 ,,Kurtosis,,-.83,1.48 ,Charlies,Mean,,4.88,.44 ,,95% Confidence Interval for Mean,Lower Bound,3.83, ,,,Upper Bound,5.92, ,,5% Trimmed Mean,,4.86, ,,Median,,5.00, ,,Variance,,1.55, ,,Std. Deviation,,1.25, ,,Minimum,,3.00, ,,Maximum,,7.00, ,,Range,,4.00, ,,Interquartile Range,,1.75, ,,Skewness,,.30,.75 ,,Kurtosis,,.15,1.48 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:59" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_471 #AT_START_472 at_fn_group_banner 472 'examine.at:190' \ "EXAMINE -- extremes" " " 73 at_xfail=no ( $as_echo "472. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' data list free /V1 W begin data. 1 1 2 1 3 2 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 2 19 1 20 1 end data. weight by w. examine v1 /statistics=extreme(6) . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:224: pspp -O format=csv examine.sps" at_fn_check_prepare_trace "examine.at:224" ( $at_check_trace; pspp -O format=csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent V1,23.00,100%,.00,0%,23.00,100% Table: Extreme Values ,,,Case Number,Value V1,Highest,1,21,20.00 ,,2,20,19.00 ,,3,19,18.00 ,,4,18,17.00 ,,5,17,16.00 ,,6,16,15.00 ,Lowest,1,1,1.00 ,,2,2,2.00 ,,3,3,3.00 ,,4,4,3.00 ,,5,5,4.00 ,,6,6,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:224" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_472 #AT_START_473 at_fn_group_banner 473 'examine.at:251' \ "EXAMINE -- extremes with fractional weights" " " 73 at_xfail=no ( $as_echo "473. $at_setup_line: testing $at_desc ..." $at_traceon cat >extreme.sps <<'_ATEOF' set format=F20.3. data list notable list /w * x *. begin data. 0.88 300000 0.86 320000 0.98 480000 0.93 960000 1.35 960000 1.31 960000 0.88 960000 0.88 1080000 0.88 1080000 0.95 1200000 1.47 1200000 0.93 1200000 0.98 1320000 1.31 1380000 0.93 1440000 0.88 1560000 1.56 1560000 1.47 1560000 end data. weight by w. EXAMINE x /STATISTICS = DESCRIPTIVES EXTREME (5) . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:285: pspp -O format=csv extreme.sps" at_fn_check_prepare_trace "examine.at:285" ( $at_check_trace; pspp -O format=csv extreme.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x,19.430,100%,.000,0%,19.430,100% Table: Extreme Values ,,,Case Number,Value x,Highest,1,18,1560000.000 ,,2,17,1560000.000 ,,3,16,1560000.000 ,,4,15,1440000.000 ,,5,14,1380000.000 ,Lowest,1,1,300000.000 ,,2,2,320000.000 ,,3,3,480000.000 ,,4,4,960000.000 ,,5,5,960000.000 Table: Descriptives ,,,Statistic,Std. Error x,Mean,,1120010.293,86222.178 ,95% Confidence Interval for Mean,Lower Bound,939166.693, ,,Upper Bound,1300853.894, ,5% Trimmed Mean,,1141017.899, ,Median,,1200000.000, ,Variance,,144447748124.869, ,Std. Deviation,,380062.821, ,Minimum,,300000.000, ,Maximum,,1560000.000, ,Range,,1260000.000, ,Interquartile Range,,467258.065, ,Skewness,,-.887,.519 ,Kurtosis,,.340,1.005 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:285" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_473 #AT_START_474 at_fn_group_banner 474 'examine.at:327' \ "EXAMINE -- percentiles" " " 73 at_xfail=no ( $as_echo "474. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' DATA LIST LIST /X *. BEGIN DATA. 2.00 8.00 5.00 END DATA. EXAMINE /x /PERCENTILES=HAVERAGE. EXAMINE /x /PERCENTILES=WAVERAGE. EXAMINE /x /PERCENTILES=ROUND. EXAMINE /x /PERCENTILES=EMPIRICAL. EXAMINE /x /PERCENTILES=AEMPIRICAL. _ATEOF { set +x $as_echo "$at_srcdir/examine.at:351: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:351" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:351" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/examine.at:352: cat pspp.csv" at_fn_check_prepare_trace "examine.at:352" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format X,F8.0 Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,3,100%,0,0%,3,100% Table: Percentiles ,,Percentiles,,,,,, ,,5,10,25,50,75,90,95 X,HAverage,.40,.80,2.00,5.00,8.00,8.00,8.00 ,Tukey's Hinges,,,3.50,5.00,6.50,, Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,3,100%,0,0%,3,100% Table: Percentiles ,,Percentiles,,,,,, ,,5,10,25,50,75,90,95 X,Weighted Average,.30,.60,1.50,3.50,5.75,7.10,7.55 ,Tukey's Hinges,,,3.50,5.00,6.50,, Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,3,100%,0,0%,3,100% Table: Percentiles ,,Percentiles,,,,,, ,,5,10,25,50,75,90,95 X,Rounded,.00,.00,2.00,5.00,5.00,8.00,8.00 ,Tukey's Hinges,,,3.50,5.00,6.50,, Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,3,100%,0,0%,3,100% Table: Percentiles ,,Percentiles,,,,,, ,,5,10,25,50,75,90,95 X,Empirical,2.00,2.00,2.00,5.00,8.00,8.00,8.00 ,Tukey's Hinges,,,3.50,5.00,6.50,, Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,3,100%,0,0%,3,100% Table: Percentiles ,,Percentiles,,,,,, ,,5,10,25,50,75,90,95 X,Empirical with averaging,2.00,2.00,2.00,5.00,8.00,8.00,8.00 ,Tukey's Hinges,,,3.50,5.00,6.50,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:352" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_474 #AT_START_475 at_fn_group_banner 475 'examine.at:419' \ "EXAMINE -- missing values" " " 73 at_xfail=no ( $as_echo "475. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' DATA LIST LIST /x * y *. BEGIN DATA. 1 1 2 1 3 1 4 1 5 2 6 2 . 2 END DATA EXAMINE /x by y /MISSING = PAIRWISE . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:436: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:436" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:436" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/examine.at:437: cat pspp.csv" at_fn_check_prepare_trace "examine.at:437" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,F8.0 Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x,6,85.7143%,1,14.2857%,7,100% Table: Case Processing Summary ,,Cases,,,,, ,,Valid,,Missing,,Total, ,y,N,Percent,N,Percent,N,Percent x,1.00,4,100%,0,0%,4,100% ,2.00,2,66.6667%,1,33.3333%,3,100% " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:437" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_475 #AT_START_476 at_fn_group_banner 476 'examine.at:459' \ "EXAMINE -- user missing values" " " 73 at_xfail=no ( $as_echo "476. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine-m.sps <<'_ATEOF' DATA LIST notable LIST /x * y *. BEGIN DATA. 1 2 9999999999 2 9999999999 99 END DATA. MISSING VALUES x (9999999999). MISSING VALUES y (99). EXAMINE /VARIABLES= x y /MISSING=PAIRWISE. _ATEOF { set +x $as_echo "$at_srcdir/examine.at:475: pspp -O format=csv examine-m.sps" at_fn_check_prepare_trace "examine.at:475" ( $at_check_trace; pspp -O format=csv examine-m.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x,1,33.3333%,2,66.6667%,3,100% y,2,66.6667%,1,33.3333%,3,100% " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:475" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_476 #AT_START_477 at_fn_group_banner 477 'examine.at:485' \ "EXAMINE -- missing values and percentiles" " " 73 at_xfail=no ( $as_echo "477. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' DATA LIST LIST /X *. BEGIN DATA. 99 99 5.00 END DATA. MISSING VALUE X (99). EXAMINE /x /PERCENTILES=HAVERAGE. _ATEOF { set +x $as_echo "$at_srcdir/examine.at:499: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:499" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:499" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_477 #AT_START_478 at_fn_group_banner 478 'examine.at:505' \ "EXAMINE -- trimmed mean" " " 73 at_xfail=no ( $as_echo "478. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' DATA LIST LIST /X * C *. BEGIN DATA. 1 1 2 49 3 2 END DATA. WEIGHT BY c. EXAMINE x /STATISTICS=DESCRIPTIVES . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:521: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:521" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:521" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/examine.at:522: cat pspp.csv" at_fn_check_prepare_trace "examine.at:522" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format X,F8.0 C,F8.0 Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,52.00,100%,.00,0%,52.00,100% Table: Descriptives ,,,Statistic,Std. Error X,Mean,,2.02,.03 ,95% Confidence Interval for Mean,Lower Bound,1.95, ,,Upper Bound,2.09, ,5% Trimmed Mean,,2.00, ,Median,,2.00, ,Variance,,.06, ,Std. Deviation,,.24, ,Minimum,,1.00, ,Maximum,,3.00, ,Range,,2.00, ,Interquartile Range,,.00, ,Skewness,,1.19,.33 ,Kurtosis,,15.73,.65 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:522" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_478 #AT_START_479 at_fn_group_banner 479 'examine.at:552' \ "EXAMINE -- crash bug" " " 73 at_xfail=no ( $as_echo "479. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' data list list /a * x * y *. begin data. 3 1 3 5 1 4 7 2 3 end data. examine a by x by y /statistics=DESCRIPTIVES . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:565: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:565" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:565" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_479 #AT_START_480 at_fn_group_banner 480 'examine.at:570' \ "EXAMINE -- consecutive runs don't crash" " " 73 at_xfail=no ( $as_echo "480. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' data list list /y * z *. begin data. 6 4 5 3 7 6 end data. EXAMINE /VARIABLES= z BY y. EXAMINE /VARIABLES= z. _ATEOF { set +x $as_echo "$at_srcdir/examine.at:583: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:583" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:583" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_480 #AT_START_481 at_fn_group_banner 481 'examine.at:588' \ "EXAMINE -- missing values don't crash" " " 73 at_xfail=no ( $as_echo "481. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' data list list /x * y *. begin data. 1 0 2 0 . 0 3 1 4 1 end data. examine x by y /statistics=descriptives. _ATEOF { set +x $as_echo "$at_srcdir/examine.at:600: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:600" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:600" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_481 #AT_START_482 at_fn_group_banner 482 'examine.at:605' \ "EXAMINE -- single case doesn't crash" " " 73 at_xfail=no ( $as_echo "482. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' DATA LIST LIST /quality * . BEGIN DATA 3 END DATA EXAMINE quality /STATISTICS descriptives /PLOT = histogram . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:619: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:619" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/examine.at:619" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_482 #AT_START_483 at_fn_group_banner 483 'examine.at:624' \ "EXAMINE -- all-missing data doesn't crash" " " 73 at_xfail=no ( $as_echo "483. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' DATA LIST LIST /x *. BEGIN DATA. . . . . END DATA. EXAMINE /x PLOT=HISTOGRAM BOXPLOT NPPLOT SPREADLEVEL(1) ALL /ID=x /STATISTICS = DESCRIPTIVES EXTREME (5) ALL /PERCENTILE=AEMPIRICAL . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:641: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:641" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/examine.at:641" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_483 #AT_START_484 at_fn_group_banner 484 'examine.at:646' \ "EXAMINE -- big input doesn't crash" " " 73 at_xfail=no ( $as_echo "484. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine.sps <<'_ATEOF' INPUT PROGRAM. LOOP #I=1 TO 50000. COMPUTE X=NORMAL(10). END CASE. END LOOP. END FILE. END INPUT PROGRAM. EXAMINE /x /STATISTICS=DESCRIPTIVES. _ATEOF { set +x $as_echo "$at_srcdir/examine.at:660: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:660" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:660" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_484 #AT_START_485 at_fn_group_banner 485 'examine.at:666' \ "EXAMINE -- big input doesn't crash 2" " " 73 at_xfail=no ( $as_echo "485. $at_setup_line: testing $at_desc ..." $at_traceon cat >make-big-input.pl <<'_ATEOF' for ($i=0; $i<100000; $i++) { print "AB12\n" }; for ($i=0; $i<100000; $i++) { print "AB04\n" }; _ATEOF { set +x $as_echo "$at_srcdir/examine.at:671: \$PERL make-big-input.pl > large.txt" at_fn_check_prepare_dynamic "$PERL make-big-input.pl > large.txt" "examine.at:671" ( $at_check_trace; $PERL make-big-input.pl > large.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:671" $at_failed && at_fn_log_failure $at_traceon; } cat >examine.sps <<'_ATEOF' DATA LIST FILE='large.txt' /S 1-2 (A) X 3 . AGGREGATE OUTFILE=* /BREAK=X /A=N. EXAMINE /A BY X. _ATEOF { set +x $as_echo "$at_srcdir/examine.at:681: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:681" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:681" $at_failed && at_fn_log_failure $at_traceon; } cat >more-big-input.pl <<'_ATEOF' for ($i=0; $i<25000; $i++) { print "AB04\nAB12\n" }; _ATEOF { set +x $as_echo "$at_srcdir/examine.at:686: \$PERL more-big-input.pl >> large.txt" at_fn_check_prepare_dynamic "$PERL more-big-input.pl >> large.txt" "examine.at:686" ( $at_check_trace; $PERL more-big-input.pl >> large.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:686" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/examine.at:687: pspp -o pspp.csv examine.sps" at_fn_check_prepare_trace "examine.at:687" ( $at_check_trace; pspp -o pspp.csv examine.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:687" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_485 #AT_START_486 at_fn_group_banner 486 'examine.at:693' \ "EXAMINE -- non-numeric ID" " " 73 at_xfail=no ( $as_echo "486. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine-id.sps <<'_ATEOF' data list notable list /x * y (a12). begin data. 1 one 2 two 3 three 4 four 5 five 6 six 7 seven 8 eight 9 nine 10 ten 11 eleven 12 twelve 30 thirty 300 threehundred end data. examine x /statistics = extreme /id = y /plot = boxplot . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:721: pspp -O format=csv examine-id.sps" at_fn_check_prepare_trace "examine.at:721" ( $at_check_trace; pspp -O format=csv examine-id.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x,14,100%,0,0%,14,100% Table: Extreme Values ,,,y,Value x,Highest,1,threehundred,300.00 ,,2,thirty ,30.00 ,,3,twelve ,12.00 ,,4,eleven ,11.00 ,,5,ten ,10.00 ,Lowest,1,one ,1.00 ,,2,two ,2.00 ,,3,three ,3.00 ,,4,four ,4.00 ,,5,five ,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:721" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_486 #AT_START_487 at_fn_group_banner 487 'examine.at:745' \ "EXAMINE -- Bad Input" " " 73 at_xfail=no ( $as_echo "487. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine-bad.sps <<'_ATEOF' data list list /h * g *. begin data. 1 1 2 1 3 1 4 1 5 2 6 2 7 2 8 2 9 2 end data. EXAMINE /VARIABLES= h BY g /STATISTICS = DESCRIPTIVES EXTREME /PLOT = lkajsdas . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:769: pspp -o pspp.csv examine-bad.sps" at_fn_check_prepare_trace "examine.at:769" ( $at_check_trace; pspp -o pspp.csv examine-bad.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/examine.at:769" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_487 #AT_START_488 at_fn_group_banner 488 'examine.at:775' \ "EXAMINE -- MISSING=REPORT" " " 73 at_xfail=no ( $as_echo "488. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine-report.sps <<'_ATEOF' set format = F22.0. data list list /x * g *. begin data. 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 2 20 2 30 2 40 2 50 2 60 2 70 2 80 2 90 2 101 9 201 9 301 9 401 9 501 99 601 99 701 99 801 99 901 99 1001 . 2002 . 3003 . 4004 . end data. MISSING VALUES g (9, 99, 999). EXAMINE /VARIABLES = x BY g /STATISTICS = EXTREME /NOTOTAL /MISSING = REPORT. _ATEOF { set +x $as_echo "$at_srcdir/examine.at:826: pspp -O format=csv examine-report.sps" at_fn_check_prepare_trace "examine.at:826" ( $at_check_trace; pspp -O format=csv examine-report.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 g,F8.0 Table: Case Processing Summary ,,Cases,,,,, ,,Valid,,Missing,,Total, ,g,N,Percent,N,Percent,N,Percent x,. (missing),4,100%,0,0%,4,100% ,1,9,100%,0,0%,9,100% ,2,9,100%,0,0%,9,100% ,9 (missing),4,100%,0,0%,4,100% ,99 (missing),5,100%,0,0%,5,100% Table: Extreme Values ,g,,,Case Number,Value x,. (missing),Highest,1,31,4004 ,,,2,30,3003 ,,,3,29,2002 ,,,4,28,1001 ,,,5,0,0 ,,Lowest,1,28,1001 ,,,2,29,2002 ,,,3,30,3003 ,,,4,31,4004 ,,,5,31,4004 ,1,Highest,1,9,9 ,,,2,8,8 ,,,3,7,7 ,,,4,6,6 ,,,5,5,5 ,,Lowest,1,1,1 ,,,2,2,2 ,,,3,3,3 ,,,4,4,4 ,,,5,5,5 ,2,Highest,1,18,90 ,,,2,17,80 ,,,3,16,70 ,,,4,15,60 ,,,5,14,50 ,,Lowest,1,10,10 ,,,2,11,20 ,,,3,12,30 ,,,4,13,40 ,,,5,14,50 ,9 (missing),Highest,1,22,401 ,,,2,21,301 ,,,3,20,201 ,,,4,19,101 ,,,5,0,0 ,,Lowest,1,19,101 ,,,2,20,201 ,,,3,21,301 ,,,4,22,401 ,,,5,22,401 ,99 (missing),Highest,1,27,901 ,,,2,26,801 ,,,3,25,701 ,,,4,24,601 ,,,5,23,501 ,,Lowest,1,23,501 ,,,2,24,601 ,,,3,25,701 ,,,4,26,801 ,,,5,27,901 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:826" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_488 #AT_START_489 at_fn_group_banner 489 'examine.at:903' \ "EXAMINE -- sample unweighted" " " 73 at_xfail=no ( $as_echo "489. $at_setup_line: testing $at_desc ..." $at_traceon cat >sample.sps <<'_ATEOF' set format = F22.4. DATA LIST notable LIST /X * BEGIN DATA. 461.19000000 466.38000000 479.46000000 480.10000000 483.43000000 488.30000000 489.00000000 491.62000000 505.62000000 511.30000000 521.53000000 526.70000000 528.25000000 538.70000000 540.22000000 540.58000000 546.10000000 548.17000000 553.99000000 566.21000000 575.90000000 584.38000000 593.40000000 357.05000000 359.73000000 360.48000000 373.98000000 374.13000000 381.45000000 383.72000000 390.00000000 400.34000000 415.32000000 415.91000000 418.30000000 421.03000000 422.43000000 426.93000000 433.25000000 436.89000000 445.33000000 446.33000000 446.55000000 456.44000000 689.49000000 691.92000000 695.00000000 695.36000000 698.21000000 699.46000000 706.61000000 710.69000000 715.82000000 715.82000000 741.39000000 752.27000000 756.73000000 757.74000000 759.57000000 796.07000000 813.78000000 817.25000000 825.48000000 831.28000000 849.24000000 890.00000000 894.78000000 935.65000000 935.90000000 945.90000000 1012.8600000 1022.6000000 1061.8100000 1063.5000000 1077.2300000 1151.6300000 1355.2800000 598.88000000 606.91000000 621.60000000 624.80000000 636.13000000 637.38000000 640.32000000 649.35000000 656.51000000 662.55000000 664.69000000 106.22000000 132.24000000 174.76000000 204.85000000 264.93000000 264.99000000 269.84000000 325.12000000 331.67000000 337.26000000 347.68000000 354.91000000 END DATA. EXAMINE x /STATISTICS=DESCRIPTIVES . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:1017: pspp -O format=csv sample.sps" at_fn_check_prepare_trace "examine.at:1017" ( $at_check_trace; pspp -O format=csv sample.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,100,100%,0,0%,100,100% Table: Descriptives ,,,Statistic,Std. Error X,Mean,,587.6603,23.2665 ,95% Confidence Interval for Mean,Lower Bound,541.4946, ,,Upper Bound,633.8260, ,5% Trimmed Mean,,579.7064, ,Median,,547.1350, ,Variance,,54132.8466, ,Std. Deviation,,232.6647, ,Minimum,,106.2200, ,Maximum,,1355.2800, ,Range,,1249.0600, ,Interquartile Range,,293.1575, ,Skewness,,.6331,.2414 ,Kurtosis,,.5300,.4783 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:1017" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_489 #AT_START_490 at_fn_group_banner 490 'examine.at:1046' \ "EXAMINE -- Empty Parentheses" " " 73 at_xfail=no ( $as_echo "490. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine-empty-parens.sps <<'_ATEOF' DATA LIST notable LIST /X * BEGIN DATA. 2 3 END DATA. EXAMINE x /PLOT = SPREADLEVEL() . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:1062: pspp -o pspp.csv examine-empty-parens.sps" at_fn_check_prepare_trace "examine.at:1062" ( $at_check_trace; pspp -o pspp.csv examine-empty-parens.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/examine.at:1062" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_490 #AT_START_491 at_fn_group_banner 491 'examine.at:1070' \ "EXAMINE -- Bad variable" " " 73 at_xfail=no ( $as_echo "491. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine-bad-variable.sps <<'_ATEOF' data list list /h * g *. begin data. 3 1 4 1 5 2 end data. EXAMINE /VARIABLES/ h BY g . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:1086: pspp -o pspp.csv examine-bad-variable.sps" at_fn_check_prepare_trace "examine.at:1086" ( $at_check_trace; pspp -o pspp.csv examine-bad-variable.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/examine.at:1086" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_491 #AT_START_492 at_fn_group_banner 492 'examine.at:1093' \ "EXAMINE -- Extremes vs. Missing Weights" " " 73 at_xfail=no ( $as_echo "492. $at_setup_line: testing $at_desc ..." $at_traceon cat >examine-missing-weights.sps <<'_ATEOF' data list notable list /h * g *. begin data. 3 1 4 . 5 1 2 1 end data. WEIGHT BY g. EXAMINE h /STATISTICS extreme(3) . _ATEOF { set +x $as_echo "$at_srcdir/examine.at:1111: pspp -O format=csv examine-missing-weights.sps" at_fn_check_prepare_trace "examine.at:1111" ( $at_check_trace; pspp -O format=csv examine-missing-weights.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"examine-missing-weights.sps:13: warning: EXAMINE: At least one case in the data file had a weight value that was user-missing, system-missing, zero, or negative. These case(s) were ignored.\" Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent h,3.00,100%,.00,0%,3.00,100% Table: Extreme Values ,,,Case Number,Value h,Highest,1,3,5.00 ,,2,2,4.00 ,,3,1,3.00 ,Lowest,1,4,2.00 ,,2,1,3.00 ,,3,2,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/examine.at:1111" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_492 #AT_START_493 at_fn_group_banner 493 'graph.at:19' \ "GRAPH simple scatterplot" " " 74 at_xfail=no ( $as_echo "493. $at_setup_line: testing $at_desc ..." $at_traceon cat >scatterplot.sps <<'_ATEOF' * Simple Scatterplot test NEW FILE. INPUT PROGRAM. LOOP #i = 1 to 100. COMPUTE Age = RV.NORMAL(40,10). END CASE. END LOOP. END FILE. END INPUT PROGRAM. COMPUTE Size = Age * 3 + 50. GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH Size. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:38: pspp -O format=csv scatterplot.sps" at_fn_check_prepare_trace "graph.at:38" ( $at_check_trace; pspp -O format=csv scatterplot.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/graph.at:38" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_493 #AT_START_494 at_fn_group_banner 494 'graph.at:43' \ "GRAPH Scatter and Histogram" " " 74 at_xfail=no ( $as_echo "494. $at_setup_line: testing $at_desc ..." $at_traceon cat >scatterlong.sps <<'_ATEOF' NEW FILE. INPUT PROGRAM. LOOP #i = 1 to 10000. COMPUTE Age = RV.NORMAL(40,10). COMPUTE CityNum = TRUNC(UNIFORM(2.95)). END CASE. END LOOP. END FILE. END INPUT PROGRAM. COMPUTE Size = Age * 3 + 50 + 50*CityNum. STRING City (a20). Recode CityNum (0 = "Madrid") (1 = "Paris") (ELSE = "Stockholm") into City. GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH Size GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH CityNum GRAPH /SCATTERPLOT = CityNum WITH Age GRAPH /SCATTERPLOT = CityNum WITH Size GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH Size BY City GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH Size BY CityNum ADD VALUE LABELS /CityNum 1 'Rio' 2 'Tokyo' 0 'Mumbai'. GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH Size BY CityNum GRAPH /HISTOGRAM = Age. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:94: pspp -O format=pdf scatterlong.sps" at_fn_check_prepare_trace "graph.at:94" ( $at_check_trace; pspp -O format=pdf scatterlong.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/graph.at:94" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_494 #AT_START_495 at_fn_group_banner 495 'graph.at:97' \ "GRAPH missing values don't crash" " " 74 at_xfail=no ( $as_echo "495. $at_setup_line: testing $at_desc ..." $at_traceon cat >scatter.sps <<'_ATEOF' data list list /x * y *. begin data. 1 0 2 0 . 0 3 1 4 1 5 . 6 1 end data. graph /scatterplot = x with y. graph /histogram = x. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:114: pspp -o pspp.pdf scatter.sps" at_fn_check_prepare_trace "graph.at:114" ( $at_check_trace; pspp -o pspp.pdf scatter.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/graph.at:114" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_495 #AT_START_496 at_fn_group_banner 496 'graph.at:118' \ "GRAPH missing=VARIABLE no crash" " " 74 at_xfail=no ( $as_echo "496. $at_setup_line: testing $at_desc ..." $at_traceon cat >scatter.sps <<'_ATEOF' data list list /x * y *. begin data. 1 0 2 0 . 0 3 1 4 1 5 . 6 1 end data. graph /scatterplot = x with y /missing = VARIABLE. graph /histogram = x /missing = VARIABLE. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:137: pspp -o pspp.pdf scatter.sps" at_fn_check_prepare_trace "graph.at:137" ( $at_check_trace; pspp -o pspp.pdf scatter.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/graph.at:137" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_496 #AT_START_497 at_fn_group_banner 497 'graph.at:141' \ "GRAPH missing value in by variable" " " 74 at_xfail=no ( $as_echo "497. $at_setup_line: testing $at_desc ..." $at_traceon cat >scatter.sps <<'_ATEOF' data list list /x * y * z *. begin data. 1 0 9 2 0 9 . 0 9 3 1 . 4 1 8 5 . 8 6 1 8 end data. graph /scatterplot = x with y by z /missing = VARIABLE. graph /scatterplot = x with y by z. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:161: pspp -o pspp.pdf scatter.sps" at_fn_check_prepare_trace "graph.at:161" ( $at_check_trace; pspp -o pspp.pdf scatter.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/graph.at:161" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_497 #AT_START_498 at_fn_group_banner 498 'graph.at:166' \ "GRAPH histogram with null data" " " 74 at_xfail=no ( $as_echo "498. $at_setup_line: testing $at_desc ..." $at_traceon cat >null-hist.sps <<'_ATEOF' data list list /x *. begin data. 1109 . end data. graph /histogram = x. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:179: pspp -o pspp.pdf null-hist.sps" at_fn_check_prepare_trace "graph.at:179" ( $at_check_trace; pspp -o pspp.pdf null-hist.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/graph.at:179" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_498 #AT_START_499 at_fn_group_banner 499 'graph.at:184' \ "GRAPH histogram all missing" " " 74 at_xfail=no ( $as_echo "499. $at_setup_line: testing $at_desc ..." $at_traceon cat >null-hist.sps <<'_ATEOF' data list list /x *. begin data. . end data. graph /histogram = x. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:196: pspp null-hist.sps" at_fn_check_prepare_trace "graph.at:196" ( $at_check_trace; pspp null-hist.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/graph.at:196" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_499 #AT_START_500 at_fn_group_banner 500 'graph.at:203' \ "GRAPH barcharts" " " 74 at_xfail=no ( $as_echo "500. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/graph.at:204: ln -s \$top_srcdir/examples/physiology.sav ." at_fn_check_prepare_dynamic "ln -s $top_srcdir/examples/physiology.sav ." "graph.at:204" ( $at_check_trace; ln -s $top_srcdir/examples/physiology.sav . ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/graph.at:204" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/graph.at:205: ln -s \$top_srcdir/examples/repairs.sav ." at_fn_check_prepare_dynamic "ln -s $top_srcdir/examples/repairs.sav ." "graph.at:205" ( $at_check_trace; ln -s $top_srcdir/examples/repairs.sav . ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/graph.at:205" $at_failed && at_fn_log_failure $at_traceon; } cat >barchart.sps <<'_ATEOF' GET FILE="physiology.sav". GRAPH /BAR = COUNT BY SEX. GRAPH /BAR = MEAN(height) BY SEX. NEW FILE. GET FILE="repairs.sav". GRAPH /BAR = MEAN (mtbf) BY factory. COMPUTE R = TRUNC(RV.UNIFORM(1,5)). GRAPH /BAR = MEAN (mtbf) BY factory BY R. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:225: pspp -o pspp.pdf barchart.sps" at_fn_check_prepare_trace "graph.at:225" ( $at_check_trace; pspp -o pspp.pdf barchart.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/graph.at:225" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_500 #AT_START_501 at_fn_group_banner 501 'graph.at:232' \ "GRAPH barchart arity" " " 74 at_xfail=no ( $as_echo "501. $at_setup_line: testing $at_desc ..." $at_traceon cat >barchart.sps <<'_ATEOF' data list notable list /x y z*. begin data 1 1 3 2 1 4 3 1 3 4 1 4 5 . 3 6 2 4 7 2 3 8 2 4 9 2 3 10 2 4 end data. * This line is invalid GRAPH /BAR = COUNT(x) BY y. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:253: pspp -o pspp.pdf barchart.sps" at_fn_check_prepare_trace "graph.at:253" ( $at_check_trace; pspp -o pspp.pdf barchart.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/graph.at:253" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_501 #AT_START_502 at_fn_group_banner 502 'graph.at:261' \ "GRAPH barchart bad syntax" " " 74 at_xfail=no ( $as_echo "502. $at_setup_line: testing $at_desc ..." $at_traceon cat >barchart.sps <<'_ATEOF' data list notable list /x y z*. begin data 1 1 3 2 1 4 3 1 3 4 1 4 5 . 3 6 2 4 7 2 3 8 2 4 9 2 3 10 2 4 end data. * This line is invalid GRAPH /BAR = SCROD BY y. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:282: pspp -o pspp.pdf barchart.sps" at_fn_check_prepare_trace "graph.at:282" ( $at_check_trace; pspp -o pspp.pdf barchart.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/graph.at:282" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_502 #AT_START_503 at_fn_group_banner 503 'graph.at:289' \ "GRAPH barchart full" " " 74 at_xfail=no ( $as_echo "503. $at_setup_line: testing $at_desc ..." $at_traceon cat >barchart.sps <<'_ATEOF' data list notable list /x y z*. begin data 1 1 3 2 1 4 3 1 3 4 1 4 5 . 3 6 2 4 7 2 3 8 2 4 9 2 3 10 2 4 end data. * This line is invalid GRAPH /BAR = COUNT by z. GRAPH /BAR = CUFREQ by z. GRAPH /BAR = PCT by z. GRAPH /BAR = CUPCT by z. GRAPH /BAR = MEAN(y) BY z. GRAPH /BAR = SUM(y) BY z. GRAPH /BAR = MAXIMUM(y) BY z. GRAPH /BAR = MINIMUM(y) BY z. GRAPH /BAR = MEAN(y) BY z BY y. GRAPH /BAR = SUM(y) BY z BY y. GRAPH /BAR = MAXIMUM(y) BY z BY y. GRAPH /BAR = MINIMUM(y) BY z BY y. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:323: pspp -o pspp.pdf barchart.sps" at_fn_check_prepare_trace "graph.at:323" ( $at_check_trace; pspp -o pspp.pdf barchart.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/graph.at:323" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_503 #AT_START_504 at_fn_group_banner 504 'graph.at:332' \ "GRAPH buggy syntax" " " 74 at_xfail=no ( $as_echo "504. $at_setup_line: testing $at_desc ..." $at_traceon cat >barchart.sps <<'_ATEOF' data list notable list /x y z*. begin data 1 1 3 2 1 4 10 2 4 end data. GRAPH /BAR = MINIMUM({) BY z BY y. _ATEOF { set +x $as_echo "$at_srcdir/graph.at:345: pspp -o pspp.pdf barchart.sps" at_fn_check_prepare_trace "graph.at:345" ( $at_check_trace; pspp -o pspp.pdf barchart.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/graph.at:345" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_504 #AT_START_505 at_fn_group_banner 505 'factor.at:19' \ "FACTOR extraction=paf method=correlation" " " 75 at_xfail=no ( $as_echo "505. $at_setup_line: testing $at_desc ..." $at_traceon cat >factor.sps <<'_ATEOF' set format = F11.3. data list notable fixed /question13 to question24 1-12. begin data. 555555535543 544453434443 545555544444 444442444433 554545554554 554455454455 555554555244 554455544443 555554434344 544454544344 555545555555 555454544455 555445544455 455544443343 544454344344 555555555455 555554454455 555555554445 555555554555 545534553343 555555535554 555544444445 545544334433 554555434443 555555544454 555445545453 555554434244 444444433233 545555454443 554443434243 444534334333 454534444332 555455353444 555544443243 555554543243 555544444343 445444434443 555555555544 444444434340 455044434334 555555533433 554554535040 434533334232 443232444432 555555555555 555555554544 555544444445 444224343344 444554454355 444434332433 555555555555 043243432433 444443334333 453443433434 443342332232 554434434533 444344434443 444444434443 554552434133 453334332432 444445554444 431232332223 555555555544 544445543443 444455535543 444444444433 444444543243 555431443333 444443433433 444433433443 454334444433 111111111544 444423442433 555443333353 555543334344 055454400000 555454444355 555555555555 055544533333 555554555554 555555535554 555555545355 555555555455 555544545543 555554404455 555454435454 555555535554 555555555555 555443433544 555554435454 555555545344 555555535454 555445535453 444444333544 555554434444 455454434454 555555535555 554545534455 555555555443 454443434444 555553334444 555554545454 555555555555 555554554454 555555555555 544545534544 555555534454 555555555455 555554535544 555555535555 555451234443 555444444544 555544434354 555545533444 555554534443 545554434554 554433444433 544432233524 411111111111 445423442233 555543433344 444443342233 555555534455 545442434223 554553352333 544554554445 555555435455 444334304234 455453444434 444443443245 555552232132 555434324345 544444434344 534344344444 445555555344 444343442132 444444434344 444444554334 444545444333 434442343224 443443433233 555551555554 544544434444 454544434433 555555535434 555555555555 455544444444 454444434233 555555544344 454445544445 444444554434 555455455443 555454425444 444454434443 544443433233 444543434433 555553545354 544444444433 444445434433 555533353333 555434234333 444314222411 555555555555 455545534443 455045534433 555545444444 455544243543 444421113343 554444534444 555555544554 555334434452 555544543455 555554434554 555445554454 555555545344 555555555555 554543334245 554441233333 555554334545 555555535544 555555554554 555445444543 444424544432 444425544333 555434344443 555533233223 544433442343 555555555555 555445452234 555444555444 555444544455 555544354554 545445555555 555555555555 455443342232 555555544454 455534443455 555555555055 444554333244 444445434543 555554544455 444443444434 444444434445 334231314323 444444434433 555554444443 444444434443 555455434444 444444444444 555455435455 444444434344 444543433232 544443334454 555544433244 534443324224 555555544444 444443434444 555553444344 443434443333 444444434333 554445444343 444443344434 445555544543 555554443443 322232403322 444444444433 444445444443 444454534445 544344444344 554445534544 555555555554 555544432333 444444444443 555555555554 455555555554 555555555543 555555555544 555554445555 444335544455 555555555555 555454444454 555455544454 444445444444 555555555555 555455454554 555454544554 555555555455 555555554444 444444544434 334334443333 422224222211 121512011111 443444432332 434335533344 444443543433 554454443453 555555545454 555555555344 555555555554 555555334555 454445554444 454545534444 555554555444 455444534455 555544554544 444444444444 555424423133 222433443224 544544532344 545554544544 555532544144 444432343433 434545554545 444344505443 555555555544 555554555344 444531113112 555554333133 455433233233 354354434345 454534433433 433112332321 555445433333 454343434143 555554445555 455423334322 443333332222 444443444443 553432224134 444223432233 454324425444 344434514443 555552415255 354332543353 444531333233 443433334133 444444444433 444444445533 445133212223 343433432213 442333333332 345455535244 443211121122 555445444444 555555544344 453243332232 443543422533 554444434344 554444333444 555555335343 444231121133 454433332233 455524434244 554433224354 555455555444 454444424444 554242232134 555553315443 555553333454 455421434211 111111151111 454443203123 454243334132 355332213144 554534334134 555543434355 555543433255 444441223334 555443143255 444444444454 444442323544 454443434343 445453434444 454455554433 554532342234 444442243233 444442343334 555443433444 555543253444 554554444455 555543355344 555444445444 434443204222 444432444234 222142441111 111111141111 334334454433 555354552543 433411122112 455534504444 543211224233 344333332532 344443233333 444424432434 555555544454 555555554544 555444444444 555443533443 555554544344 555554444444 544543433343 444445434444 555555555555 555443333233 545444534454 555454434343 555453434544 544334444333 555443443444 555555534544 444444444433 555543433343 555444445334 555543442433 455444334443 554443434443 555254500544 555444433344 555555535544 444443532232 544443433433 555555535544 555455454444 555455445544 544444534433 555555555554 555553533444 555555555554 555554434343 555455544443 555554444443 555454444445 333222333223 444443544233 543443534433 555545454533 444444404033 455454504543 455555555454 454443344343 555553435244 555543544444 555553343044 444443444433 445543434434 555554433545 555554455445 455553333234 555552344243 444141212213 444443504234 445544253444 555554354555 534552234543 555554544544 444233404224 555554534444 444443444344 422442434324 554434434344 444444434334 443433432444 555454435344 252423332214 454544434434 444444444244 555554544445 443222432333 555544444332 545555543445 554544334444 555445555544 554343434433 555555535554 444554444333 553544343534 555553254433 555555554554 544443443344 555443444344 544432144123 555555555555 555555555354 555555535545 455454434444 455455534445 455555554455 555553545445 445545544444 545345553555 444445444433 443435433433 555554545353 444443232223 444444434433 555555545454 555554444343 555554444443 434544333422 444443434343 555555455443 555544434343 455545534444 555555555553 444443343434 555555555445 433444444434 344221512132 333421132223 333444443444 435544545533 444335544443 333323223323 334434332333 444422323213 324433443423 555555554555 555452424444 555544434444 555544443343 555445545453 555555344453 555544545550 454443434334 444332233344 555554332344 554444433444 555554555554 555555543544 444442443132 555555545555 544553435533 044044444444 444443434533 555454433434 555555555454 555555555555 454544434444 444444434333 554555455554 555555543444 423331124132 445445534455 555555555554 444535554434 555555555554 354443422232 555545535443 555555555555 555455444453 455434443333 455444443233 343322434411 555555555534 453442432333 445554434544 345444443333 454554554355 444434453434 555555454443 555443343341 545553343433 222343222201 444433434443 535555555544 552541442423 545433343334 455445433443 444444433433 455543343433 434444432333 444545444444 555554534444 452444434433 454443432533 555453334433 444442233432 555555553433 545555545445 335543222333 554554344445 243424442212 133222432411 343434534233 222222212211 445455554434 455554453344 223334424434 555355555544 455544554434 544455555444 444444444444 444444444344 444334444444 444444444434 555455534243 555555545555 555555555555 444443534343 555554544444 555555555454 444434433433 455445544444 555544544455 444333433333 455443445343 444432442444 443334451543 555554455555 555444444444 555555555455 555555555554 555454345154 555555555555 555555555455 555554454544 454444454544 554443334544 455555402535 555554531534 455545544554 444423444223 555444334533 455554445243 453444334344 555555555554 555555555455 555555555554 455443334344 555555253555 555554433454 555444344455 550030034433 555444233343 555343222133 555555555554 555555243243 555555555355 555554345555 555443434454 545543133133 555443334154 444444344454 555555242254 555554444344 545443334454 554444132454 555455143154 555554453044 555555555455 555534335454 555555245555 545543333444 555555355454 555353145133 555553043454 555555354554 555543434454 555444324454 444444203443 555552233355 555555445455 555500034354 555354354444 555555555555 555543334144 555555005254 454444344254 555555555554 555555555255 555555555455 444444242243 555554445154 444444234333 555555553455 444422224243 555545443344 545552133143 555455044344 555555455555 555555545454 454433343144 555555555555 555455255155 555555454455 555555424455 555555355555 555444444455 555555454455 544411211314 223322441123 444223434233 444441121232 555555535555 454445533444 434442434433 545355554454 555542544333 445545555444 321000001011 444444444444 333223321322 444232433233 425432523122 455555555544 555555545555 555555534354 554554444243 555554343443 444443434333 555224252443 555544433433 344544434423 555554434344 555542134233 444344434444 445443433233 455343333434 455443333445 355344434433 234234433333 445444444445 455535535545 443423234443 455544334544 345441333323 445444533433 455554443355 445444433243 455454453444 444244444444 554244544154 555555555555 454343444444 555444444344 545455534454 555555555555 555554534454 555254555444 544354544453 553454534445 555454445355 545253554454 433342322233 544444444443 555455445544 424322433233 444424222233 555355555544 000000000000 555455345344 000055505450 434333444333 444445444444 555555555545 555554455545 555455435533 544544444243 444331232323 555555554444 443332323233 444224342433 555555555544 433443342333 555445504554 555545555544 555555535555 555555535345 454443433333 555444444555 444443232435 555433444443 555443434543 555555535555 555555533544 555543234444 433432332221 443433544233 443443333334 444424433444 552444333123 233332232211 223422221122 434433414133 332323333102 552544223222 542423343232 555552534132 455554544134 433523533132 433333433433 435434543333 434553433444 555544434345 443543443433 555555542344 544444553144 555544544243 535443441342 344555444333 444444443333 443443433432 545554534544 443533433433 333443432223 333333433123 322432122213 555555555555 554555444433 444543443234 444444433433 452555534433 244444444233 433442422232 555555535555 555555554455 555554545244 555555355455 555555555555 555555555555 444433323233 555455455455 434445444433 555554444455 454444543445 555555535455 555545554455 555555555555 555555555555 555443344353 455543304132 444443444433 555555555355 434433443333 444434444433 444444444433 555555555555 445553443323 445444444444 555554444054 455555554543 555555535555 555554445454 555444444443 555555555454 555554344455 555555454454 554444444454 555555555353 555545544454 553545332223 444424444332 545555543433 555444433444 555555444445 444444424433 444444543434 124113531311 555554534543 555343333333 545444544344 555444534444 555544543444 555455544443 444324402121 555554534544 555455544444 555555544454 444334404433 555443534444 555545554444 555555555555 455333233433 455444433433 455444444444 444235442443 555443343433 444445453444 454345453432 555555453444 344433322323 444443444244 444442343133 554445432233 555555544444 555555534444 555554455554 454443334244 544443333233 444445534445 444432134121 555555332243 555555544433 555554434444 454543534233 454432432343 444424432433 545553335344 555443434344 454443433333 555553534444 554544434355 552532421235 454543433434 544544343234 555552334125 555543455555 443442334222 554443444344 555554543334 555552342444 554443433333 443444434445 555554533344 442412242121 454543343244 445554433344 444443333433 444443433333 444433333334 444444334444 432321102223 444444434443 444444434343 454531432331 445543433434 554554434554 334253232333 444443434244 444433443234 444433334334 444443433333 553434303222 454443434244 444445544444 443441133433 444432232133 444444404344 444444333243 455543124243 555544532344 444432333132 554553434244 454443443333 433111121111 555555555544 444432433222 444443433233 443332332133 445344453243 444444405434 554554434343 455344534443 444444400434 444444344344 544554533443 555554443455 555555544544 555554534444 323123232311 444344344443 555554555544 343323332333 444443434444 444442214340 555434434444 455543343444 445432434433 455553434455 243321332322 444422332332 555533454444 555544443433 354422431422 333322421211 444443432434 344422431322 333342222321 444443454433 443443444433 553434531334 554434552343 545455553544 554455554443 555555555533 555555554543 454454544433 555444532143 554545544443 444233442434 544444434234 554344432233 555345533355 554554544433 455444444344 555554554554 555554545555 444433534434 444444421134 334333333333 334443443343 122333441413 434444333333 444344433233 444333332143 555154344133 324344333223 244444402233 454443433543 444344433344 455555445555 555555544433 454544434443 344535554533 333435443433 444444554544 343434443333 544553544455 555444444455 244333332222 333441232233 544433433433 555544343344 344211142124 442442232113 433432332223 333424322222 444443333233 344321232223 442434342422 545555535555 455454434454 455355544444 454444444445 555554432430 555444344144 455534342234 555555554354 213332443111 555545434433 555554424444 443434443433 555555554443 555555555544 435535554433 555455545443 555555554533 554545443455 555553333233 434432232323 443443333433 443544231534 434533334334 555555535544 555544444445 555555555555 555555555555 555555555555 555555555555 544555544544 555555545555 545555534354 445444344344 555555555555 444443343334 555444440000 555555555554 555555545455 454434444345 555445544443 555554535433 454445555555 555444444355 555555555555 555555555555 555555555555 555555554555 555455554455 454435544255 545543342243 555544355345 555555455354 435553244333 555555443454 444444433445 121422433111 555554543244 555444554444 444203444433 344342553322 554445554344 545445454454 444245504233 334335555533 554355544444 444445545444 555555555344 454544543233 444455532434 555544354243 535444554433 444444444444 455555553243 244442343235 554544504043 444435553433 455553434354 555444343314 555553344453 555555555544 544444444433 434434550033 555455544444 455445534344 454445444554 555555555555 555555555555 555555555454 555455545412 334433343132 555454455455 555554454443 555555555555 555555553433 555555555555 555555445555 555545445455 555555545554 555555555555 445455554443 555445554433 555555554445 555553333144 555554455143 554454445444 555555554533 334422433422 555554434444 433531133222 443432342224 555544554433 553434333333 555543334443 444443344323 555555555555 555554545344 555555545554 555342434333 444443333233 444544435444 555555555555 555455554354 555555405054 555555555555 554555545545 555555555544 555545454344 555555455555 433444444343 454555554444 453555554544 444445554444 544455555455 555343434343 555553444454 555444434443 555555555444 555555545443 555444534455 555555555555 444443443434 555445533543 555555555444 555544444354 445444544243 555554555455 555555455444 555555555544 555555555454 554445545454 555555555543 344444434443 555555454453 455444443433 344244434433 355234452132 555445545455 444444444444 455444454433 555555555555 344233341155 333334433233 444433434333 444233443334 454344544444 555554245253 444444333344 554544434333 555444443343 555554555445 005555555544 554444445244 555455555555 555555555444 444444444433 555555555444 555555544454 555555555544 444444434444 555555535553 545534543334 554554534533 555555555554 554554544544 454541231221 555555535544 445344334432 444444344333 555555534444 555555545555 443434544232 545544433343 343234434333 444444443233 555454444455 555455535455 554433442243 444444544454 554545554544 454444444444 554455534455 555555544355 555445555555 555444534444 455454534444 555555555544 444444444455 454455554344 443244442233 350554554434 455444535343 344233443433 454444535545 244222232232 245345554344 355344444443 555455555444 444434444233 334323444322 333234443233 455455554454 555554544434 555355555444 444444544443 555554555544 344231224131 444443434433 454344444431 555554555553 454544444443 444443443532 334323423222 455555545554 555542434443 554444444443 554444534344 555443454555 555555534554 444434443343 444234432233 334323311333 444443443233 355424552242 233335323322 234233443333 123353532334 444345555244 332222433422 545445555443 555555555555 555554444443 455445554455 455455555455 555555555555 444443433445 555455555544 355453434232 555555554344 444433433433 434322242112 444444433433 444445444544 555444535444 544444444443 454544344334 454444334333 434433433332 334434423423 444455552233 442442342233 445433433343 555555444355 555555555555 455554555545 555445544444 544444434443 555555535333 554444444344 555554554445 345433334121 555555555554 545444444233 555555544455 555554545555 555555455555 555555545555 555554544455 444444444333 544544544445 555445544544 555455444455 555455555454 554455535444 453423442244 444443444444 454444333333 555555555542 555555555543 555555555544 555555535534 555555555444 444443423333 555444444444 555445544453 444444444443 555555443444 444443444333 554554154344 555543353333 554445443333 555555553455 554534444243 554555554545 555544443443 555554555555 555425552422 555555555555 454421121321 555454453433 555555554443 244224431223 455444453444 454345544455 344235545044 555555555544 555553325554 554554444244 555545544544 454555554545 444444545444 545544444455 454344445443 545555554453 444444444443 545554554453 555453434444 005434434454 455555455544 555555555554 455542444433 545543444555 445545445444 555553325454 555554555554 444544444443 555555444454 443332443222 454444443444 344333433332 555455444455 555555555445 555555534454 445433432343 555554434444 555555545444 544545434455 454435543444 555555555555 555455554555 555555544554 555553554455 555555555555 545454545444 555555445555 554534343444 555545443343 545454334444 554445544544 555455354344 555555555355 554445544354 455554444444 555555553543 555554444444 555543233444 555554344433 333334441223 543554344434 055541243244 555555555544 555555533444 555445444544 444335343433 544434344333 544435533333 444444443333 555555555554 555552343233 444444444433 544444434444 555555545555 555555555554 445244434444 445444434444 445555554521 443444543343 444433343434 355444433442 555543444455 555444334544 555555555555 554555545555 555555554555 555555555555 454444343445 444444433444 354445443444 555334242132 455445555543 254153343433 354244443333 554455444344 343255535444 455454555553 555455545555 444343433343 343323443323 455444444424 555544444455 343434543444 555555555544 555554534243 555554543344 555455555544 555443344343 444445533133 555543534555 444554444444 444002323320 444232322222 244344424441 555443344334 555555555555 555444534443 555555555555 555555555550 455555554555 555555555555 end data. missing values question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24 (0). factor /variables question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24 /analysis all /print univariate det correlation /format blank(.30) /plot eigen /criteria factors(3) /extraction paf /method = correlation. _ATEOF { set +x $as_echo "$at_srcdir/factor.at:1472: pspp -O format=csv factor.sps" at_fn_check_prepare_trace "factor.at:1472" ( $at_check_trace; pspp -O format=csv factor.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Descriptive Statistics ,Mean,Std. Deviation,Analysis N question13,4.462,.729,1365 question14,4.525,.700,1365 question15,4.445,.732,1365 question16,4.281,.829,1365 question17,4.166,.895,1365 question18,3.930,1.034,1365 question19,4.077,.963,1365 question20,3.777,.909,1365 question21,3.774,.984,1365 question22,3.607,1.116,1365 question23,3.813,.957,1365 question24,3.666,.926,1365 Table: Correlation Matrix ,,question13,question14,question15,question16,question17,question18,question19,question20,question21,question22,question23,question24 Correlations,question13,1.000,.661,.600,.566,.577,.409,.286,.304,.476,.333,.564,.454 ,question14,.661,1.000,.635,.500,.552,.433,.320,.315,.449,.333,.565,.443 ,question15,.600,.635,1.000,.505,.587,.457,.359,.356,.509,.369,.582,.435 ,question16,.566,.500,.505,1.000,.586,.405,.335,.317,.452,.363,.459,.430 ,question17,.577,.552,.587,.586,1.000,.555,.449,.417,.595,.450,.613,.521 ,question18,.409,.433,.457,.405,.555,1.000,.627,.521,.554,.536,.569,.474 ,question19,.286,.320,.359,.335,.449,.627,1.000,.446,.499,.484,.444,.374 ,question20,.304,.315,.356,.317,.417,.521,.446,1.000,.425,.383,.410,.357 ,question21,.476,.449,.509,.452,.595,.554,.499,.425,1.000,.507,.598,.500 ,question22,.333,.333,.369,.363,.450,.536,.484,.383,.507,1.000,.493,.444 ,question23,.564,.565,.582,.459,.613,.569,.444,.410,.598,.493,1.000,.705 ,question24,.454,.443,.435,.430,.521,.474,.374,.357,.500,.444,.705,1.000 Determinant,.002,,,,,,,,,,,, Table: Factor Matrix ,Factor,, ,1,2,3 question13,.713,.398, question14,.703,.339, question15,.721,, question16,.648,, question17,.783,, question18,.740,-.345, question19,.616,-.415, question20,.550,, question21,.732,, question22,.613,, question23,.819,,.345 question24,.695,,.386 Table: Rotated Factor Matrix ,Factor,, ,1,2,3 question13,.771,, question14,.726,, question15,.676,, question16,.591,, question17,.587,.446, question18,,.739, question19,,.727, question20,,.540, question21,.402,.533,.321 question22,,.559, question23,.449,.377,.668 question24,.324,.321,.652 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/factor.at:1472" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_505 #AT_START_506 at_fn_group_banner 506 'factor.at:1539' \ "FACTOR extraction=pc method=correlation" " " 75 at_xfail=no ( $as_echo "506. $at_setup_line: testing $at_desc ..." $at_traceon cat >factor2.sps <<'_ATEOF' set format = F11.3. data list notable list /id female race ses schtyp prog read write math science socst. begin data. 70.00 .00 4.00 1.00 1.00 1.00 57.00 52.00 41.00 47.00 57.00 121.00 1.00 4.00 2.00 1.00 3.00 68.00 59.00 53.00 63.00 61.00 86.00 .00 4.00 3.00 1.00 1.00 44.00 33.00 54.00 58.00 31.00 141.00 .00 4.00 3.00 1.00 3.00 63.00 44.00 47.00 53.00 56.00 172.00 .00 4.00 2.00 1.00 2.00 47.00 52.00 57.00 53.00 61.00 113.00 .00 4.00 2.00 1.00 2.00 44.00 52.00 51.00 63.00 61.00 50.00 .00 3.00 2.00 1.00 1.00 50.00 59.00 42.00 53.00 61.00 11.00 .00 1.00 2.00 1.00 2.00 34.00 46.00 45.00 39.00 36.00 84.00 .00 4.00 2.00 1.00 1.00 63.00 57.00 54.00 58.00 51.00 48.00 .00 3.00 2.00 1.00 2.00 57.00 55.00 52.00 50.00 51.00 75.00 .00 4.00 2.00 1.00 3.00 60.00 46.00 51.00 53.00 61.00 60.00 .00 4.00 2.00 1.00 2.00 57.00 65.00 51.00 63.00 61.00 95.00 .00 4.00 3.00 1.00 2.00 73.00 60.00 71.00 61.00 71.00 104.00 .00 4.00 3.00 1.00 2.00 54.00 63.00 57.00 55.00 46.00 38.00 .00 3.00 1.00 1.00 2.00 45.00 57.00 50.00 31.00 56.00 115.00 .00 4.00 1.00 1.00 1.00 42.00 49.00 43.00 50.00 56.00 76.00 .00 4.00 3.00 1.00 2.00 47.00 52.00 51.00 50.00 56.00 195.00 .00 4.00 2.00 2.00 1.00 57.00 57.00 60.00 58.00 56.00 114.00 .00 4.00 3.00 1.00 2.00 68.00 65.00 62.00 55.00 61.00 85.00 .00 4.00 2.00 1.00 1.00 55.00 39.00 57.00 53.00 46.00 167.00 .00 4.00 2.00 1.00 1.00 63.00 49.00 35.00 66.00 41.00 143.00 .00 4.00 2.00 1.00 3.00 63.00 63.00 75.00 72.00 66.00 41.00 .00 3.00 2.00 1.00 2.00 50.00 40.00 45.00 55.00 56.00 20.00 .00 1.00 3.00 1.00 2.00 60.00 52.00 57.00 61.00 61.00 12.00 .00 1.00 2.00 1.00 3.00 37.00 44.00 45.00 39.00 46.00 53.00 .00 3.00 2.00 1.00 3.00 34.00 37.00 46.00 39.00 31.00 154.00 .00 4.00 3.00 1.00 2.00 65.00 65.00 66.00 61.00 66.00 178.00 .00 4.00 2.00 2.00 3.00 47.00 57.00 57.00 58.00 46.00 196.00 .00 4.00 3.00 2.00 2.00 44.00 38.00 49.00 39.00 46.00 29.00 .00 2.00 1.00 1.00 1.00 52.00 44.00 49.00 55.00 41.00 126.00 .00 4.00 2.00 1.00 1.00 42.00 31.00 57.00 47.00 51.00 103.00 .00 4.00 3.00 1.00 2.00 76.00 52.00 64.00 64.00 61.00 192.00 .00 4.00 3.00 2.00 2.00 65.00 67.00 63.00 66.00 71.00 150.00 .00 4.00 2.00 1.00 3.00 42.00 41.00 57.00 72.00 31.00 199.00 .00 4.00 3.00 2.00 2.00 52.00 59.00 50.00 61.00 61.00 144.00 .00 4.00 3.00 1.00 1.00 60.00 65.00 58.00 61.00 66.00 200.00 .00 4.00 2.00 2.00 2.00 68.00 54.00 75.00 66.00 66.00 80.00 .00 4.00 3.00 1.00 2.00 65.00 62.00 68.00 66.00 66.00 16.00 .00 1.00 1.00 1.00 3.00 47.00 31.00 44.00 36.00 36.00 153.00 .00 4.00 2.00 1.00 3.00 39.00 31.00 40.00 39.00 51.00 176.00 .00 4.00 2.00 2.00 2.00 47.00 47.00 41.00 42.00 51.00 177.00 .00 4.00 2.00 2.00 2.00 55.00 59.00 62.00 58.00 51.00 168.00 .00 4.00 2.00 1.00 2.00 52.00 54.00 57.00 55.00 51.00 40.00 .00 3.00 1.00 1.00 1.00 42.00 41.00 43.00 50.00 41.00 62.00 .00 4.00 3.00 1.00 1.00 65.00 65.00 48.00 63.00 66.00 169.00 .00 4.00 1.00 1.00 1.00 55.00 59.00 63.00 69.00 46.00 49.00 .00 3.00 3.00 1.00 3.00 50.00 40.00 39.00 49.00 47.00 136.00 .00 4.00 2.00 1.00 2.00 65.00 59.00 70.00 63.00 51.00 189.00 .00 4.00 2.00 2.00 2.00 47.00 59.00 63.00 53.00 46.00 7.00 .00 1.00 2.00 1.00 2.00 57.00 54.00 59.00 47.00 51.00 27.00 .00 2.00 2.00 1.00 2.00 53.00 61.00 61.00 57.00 56.00 128.00 .00 4.00 3.00 1.00 2.00 39.00 33.00 38.00 47.00 41.00 21.00 .00 1.00 2.00 1.00 1.00 44.00 44.00 61.00 50.00 46.00 183.00 .00 4.00 2.00 2.00 2.00 63.00 59.00 49.00 55.00 71.00 132.00 .00 4.00 2.00 1.00 2.00 73.00 62.00 73.00 69.00 66.00 15.00 .00 1.00 3.00 1.00 3.00 39.00 39.00 44.00 26.00 42.00 67.00 .00 4.00 1.00 1.00 3.00 37.00 37.00 42.00 33.00 32.00 22.00 .00 1.00 2.00 1.00 3.00 42.00 39.00 39.00 56.00 46.00 185.00 .00 4.00 2.00 2.00 2.00 63.00 57.00 55.00 58.00 41.00 9.00 .00 1.00 2.00 1.00 3.00 48.00 49.00 52.00 44.00 51.00 181.00 .00 4.00 2.00 2.00 2.00 50.00 46.00 45.00 58.00 61.00 170.00 .00 4.00 3.00 1.00 2.00 47.00 62.00 61.00 69.00 66.00 134.00 .00 4.00 1.00 1.00 1.00 44.00 44.00 39.00 34.00 46.00 108.00 .00 4.00 2.00 1.00 1.00 34.00 33.00 41.00 36.00 36.00 197.00 .00 4.00 3.00 2.00 2.00 50.00 42.00 50.00 36.00 61.00 140.00 .00 4.00 2.00 1.00 3.00 44.00 41.00 40.00 50.00 26.00 171.00 .00 4.00 2.00 1.00 2.00 60.00 54.00 60.00 55.00 66.00 107.00 .00 4.00 1.00 1.00 3.00 47.00 39.00 47.00 42.00 26.00 81.00 .00 4.00 1.00 1.00 2.00 63.00 43.00 59.00 65.00 44.00 18.00 .00 1.00 2.00 1.00 3.00 50.00 33.00 49.00 44.00 36.00 155.00 .00 4.00 2.00 1.00 1.00 44.00 44.00 46.00 39.00 51.00 97.00 .00 4.00 3.00 1.00 2.00 60.00 54.00 58.00 58.00 61.00 68.00 .00 4.00 2.00 1.00 2.00 73.00 67.00 71.00 63.00 66.00 157.00 .00 4.00 2.00 1.00 1.00 68.00 59.00 58.00 74.00 66.00 56.00 .00 4.00 2.00 1.00 3.00 55.00 45.00 46.00 58.00 51.00 5.00 .00 1.00 1.00 1.00 2.00 47.00 40.00 43.00 45.00 31.00 159.00 .00 4.00 3.00 1.00 2.00 55.00 61.00 54.00 49.00 61.00 123.00 .00 4.00 3.00 1.00 1.00 68.00 59.00 56.00 63.00 66.00 164.00 .00 4.00 2.00 1.00 3.00 31.00 36.00 46.00 39.00 46.00 14.00 .00 1.00 3.00 1.00 2.00 47.00 41.00 54.00 42.00 56.00 127.00 .00 4.00 3.00 1.00 2.00 63.00 59.00 57.00 55.00 56.00 165.00 .00 4.00 1.00 1.00 3.00 36.00 49.00 54.00 61.00 36.00 174.00 .00 4.00 2.00 2.00 2.00 68.00 59.00 71.00 66.00 56.00 3.00 .00 1.00 1.00 1.00 2.00 63.00 65.00 48.00 63.00 56.00 58.00 .00 4.00 2.00 1.00 3.00 55.00 41.00 40.00 44.00 41.00 146.00 .00 4.00 3.00 1.00 2.00 55.00 62.00 64.00 63.00 66.00 102.00 .00 4.00 3.00 1.00 2.00 52.00 41.00 51.00 53.00 56.00 117.00 .00 4.00 3.00 1.00 3.00 34.00 49.00 39.00 42.00 56.00 133.00 .00 4.00 2.00 1.00 3.00 50.00 31.00 40.00 34.00 31.00 94.00 .00 4.00 3.00 1.00 2.00 55.00 49.00 61.00 61.00 56.00 24.00 .00 2.00 2.00 1.00 2.00 52.00 62.00 66.00 47.00 46.00 149.00 .00 4.00 1.00 1.00 1.00 63.00 49.00 49.00 66.00 46.00 82.00 1.00 4.00 3.00 1.00 2.00 68.00 62.00 65.00 69.00 61.00 8.00 1.00 1.00 1.00 1.00 2.00 39.00 44.00 52.00 44.00 48.00 129.00 1.00 4.00 1.00 1.00 1.00 44.00 44.00 46.00 47.00 51.00 173.00 1.00 4.00 1.00 1.00 1.00 50.00 62.00 61.00 63.00 51.00 57.00 1.00 4.00 2.00 1.00 2.00 71.00 65.00 72.00 66.00 56.00 100.00 1.00 4.00 3.00 1.00 2.00 63.00 65.00 71.00 69.00 71.00 1.00 1.00 1.00 1.00 1.00 3.00 34.00 44.00 40.00 39.00 41.00 194.00 1.00 4.00 3.00 2.00 2.00 63.00 63.00 69.00 61.00 61.00 88.00 1.00 4.00 3.00 1.00 2.00 68.00 60.00 64.00 69.00 66.00 99.00 1.00 4.00 3.00 1.00 1.00 47.00 59.00 56.00 66.00 61.00 47.00 1.00 3.00 1.00 1.00 2.00 47.00 46.00 49.00 33.00 41.00 120.00 1.00 4.00 3.00 1.00 2.00 63.00 52.00 54.00 50.00 51.00 166.00 1.00 4.00 2.00 1.00 2.00 52.00 59.00 53.00 61.00 51.00 65.00 1.00 4.00 2.00 1.00 2.00 55.00 54.00 66.00 42.00 56.00 101.00 1.00 4.00 3.00 1.00 2.00 60.00 62.00 67.00 50.00 56.00 89.00 1.00 4.00 1.00 1.00 3.00 35.00 35.00 40.00 51.00 33.00 54.00 1.00 3.00 1.00 2.00 1.00 47.00 54.00 46.00 50.00 56.00 180.00 1.00 4.00 3.00 2.00 2.00 71.00 65.00 69.00 58.00 71.00 162.00 1.00 4.00 2.00 1.00 3.00 57.00 52.00 40.00 61.00 56.00 4.00 1.00 1.00 1.00 1.00 2.00 44.00 50.00 41.00 39.00 51.00 131.00 1.00 4.00 3.00 1.00 2.00 65.00 59.00 57.00 46.00 66.00 125.00 1.00 4.00 1.00 1.00 2.00 68.00 65.00 58.00 59.00 56.00 34.00 1.00 1.00 3.00 2.00 2.00 73.00 61.00 57.00 55.00 66.00 106.00 1.00 4.00 2.00 1.00 3.00 36.00 44.00 37.00 42.00 41.00 130.00 1.00 4.00 3.00 1.00 1.00 43.00 54.00 55.00 55.00 46.00 93.00 1.00 4.00 3.00 1.00 2.00 73.00 67.00 62.00 58.00 66.00 163.00 1.00 4.00 1.00 1.00 2.00 52.00 57.00 64.00 58.00 56.00 37.00 1.00 3.00 1.00 1.00 3.00 41.00 47.00 40.00 39.00 51.00 35.00 1.00 1.00 1.00 2.00 1.00 60.00 54.00 50.00 50.00 51.00 87.00 1.00 4.00 2.00 1.00 1.00 50.00 52.00 46.00 50.00 56.00 73.00 1.00 4.00 2.00 1.00 2.00 50.00 52.00 53.00 39.00 56.00 151.00 1.00 4.00 2.00 1.00 3.00 47.00 46.00 52.00 48.00 46.00 44.00 1.00 3.00 1.00 1.00 3.00 47.00 62.00 45.00 34.00 46.00 152.00 1.00 4.00 3.00 1.00 2.00 55.00 57.00 56.00 58.00 61.00 105.00 1.00 4.00 2.00 1.00 2.00 50.00 41.00 45.00 44.00 56.00 28.00 1.00 2.00 2.00 1.00 1.00 39.00 53.00 54.00 50.00 41.00 91.00 1.00 4.00 3.00 1.00 3.00 50.00 49.00 56.00 47.00 46.00 45.00 1.00 3.00 1.00 1.00 3.00 34.00 35.00 41.00 29.00 26.00 116.00 1.00 4.00 2.00 1.00 2.00 57.00 59.00 54.00 50.00 56.00 33.00 1.00 2.00 1.00 1.00 2.00 57.00 65.00 72.00 54.00 56.00 66.00 1.00 4.00 2.00 1.00 3.00 68.00 62.00 56.00 50.00 51.00 72.00 1.00 4.00 2.00 1.00 3.00 42.00 54.00 47.00 47.00 46.00 77.00 1.00 4.00 1.00 1.00 2.00 61.00 59.00 49.00 44.00 66.00 61.00 1.00 4.00 3.00 1.00 2.00 76.00 63.00 60.00 67.00 66.00 190.00 1.00 4.00 2.00 2.00 2.00 47.00 59.00 54.00 58.00 46.00 42.00 1.00 3.00 2.00 1.00 3.00 46.00 52.00 55.00 44.00 56.00 2.00 1.00 1.00 2.00 1.00 3.00 39.00 41.00 33.00 42.00 41.00 55.00 1.00 3.00 2.00 2.00 2.00 52.00 49.00 49.00 44.00 61.00 19.00 1.00 1.00 1.00 1.00 1.00 28.00 46.00 43.00 44.00 51.00 90.00 1.00 4.00 3.00 1.00 2.00 42.00 54.00 50.00 50.00 52.00 142.00 1.00 4.00 2.00 1.00 3.00 47.00 42.00 52.00 39.00 51.00 17.00 1.00 1.00 2.00 1.00 2.00 47.00 57.00 48.00 44.00 41.00 122.00 1.00 4.00 2.00 1.00 2.00 52.00 59.00 58.00 53.00 66.00 191.00 1.00 4.00 3.00 2.00 2.00 47.00 52.00 43.00 48.00 61.00 83.00 1.00 4.00 2.00 1.00 3.00 50.00 62.00 41.00 55.00 31.00 182.00 1.00 4.00 2.00 2.00 2.00 44.00 52.00 43.00 44.00 51.00 6.00 1.00 1.00 1.00 1.00 2.00 47.00 41.00 46.00 40.00 41.00 46.00 1.00 3.00 1.00 1.00 2.00 45.00 55.00 44.00 34.00 41.00 43.00 1.00 3.00 1.00 1.00 2.00 47.00 37.00 43.00 42.00 46.00 96.00 1.00 4.00 3.00 1.00 2.00 65.00 54.00 61.00 58.00 56.00 138.00 1.00 4.00 2.00 1.00 3.00 43.00 57.00 40.00 50.00 51.00 10.00 1.00 1.00 2.00 1.00 1.00 47.00 54.00 49.00 53.00 61.00 71.00 1.00 4.00 2.00 1.00 1.00 57.00 62.00 56.00 58.00 66.00 139.00 1.00 4.00 2.00 1.00 2.00 68.00 59.00 61.00 55.00 71.00 110.00 1.00 4.00 2.00 1.00 3.00 52.00 55.00 50.00 54.00 61.00 148.00 1.00 4.00 2.00 1.00 3.00 42.00 57.00 51.00 47.00 61.00 109.00 1.00 4.00 2.00 1.00 1.00 42.00 39.00 42.00 42.00 41.00 39.00 1.00 3.00 3.00 1.00 2.00 66.00 67.00 67.00 61.00 66.00 147.00 1.00 4.00 1.00 1.00 2.00 47.00 62.00 53.00 53.00 61.00 74.00 1.00 4.00 2.00 1.00 2.00 57.00 50.00 50.00 51.00 58.00 198.00 1.00 4.00 3.00 2.00 2.00 47.00 61.00 51.00 63.00 31.00 161.00 1.00 4.00 1.00 1.00 2.00 57.00 62.00 72.00 61.00 61.00 112.00 1.00 4.00 2.00 1.00 2.00 52.00 59.00 48.00 55.00 61.00 69.00 1.00 4.00 1.00 1.00 3.00 44.00 44.00 40.00 40.00 31.00 156.00 1.00 4.00 2.00 1.00 2.00 50.00 59.00 53.00 61.00 61.00 111.00 1.00 4.00 1.00 1.00 1.00 39.00 54.00 39.00 47.00 36.00 186.00 1.00 4.00 2.00 2.00 2.00 57.00 62.00 63.00 55.00 41.00 98.00 1.00 4.00 1.00 1.00 3.00 57.00 60.00 51.00 53.00 37.00 119.00 1.00 4.00 1.00 1.00 1.00 42.00 57.00 45.00 50.00 43.00 13.00 1.00 1.00 2.00 1.00 3.00 47.00 46.00 39.00 47.00 61.00 51.00 1.00 3.00 3.00 1.00 1.00 42.00 36.00 42.00 31.00 39.00 26.00 1.00 2.00 3.00 1.00 2.00 60.00 59.00 62.00 61.00 51.00 36.00 1.00 3.00 1.00 1.00 1.00 44.00 49.00 44.00 35.00 51.00 135.00 1.00 4.00 1.00 1.00 2.00 63.00 60.00 65.00 54.00 66.00 59.00 1.00 4.00 2.00 1.00 2.00 65.00 67.00 63.00 55.00 71.00 78.00 1.00 4.00 2.00 1.00 2.00 39.00 54.00 54.00 53.00 41.00 64.00 1.00 4.00 3.00 1.00 3.00 50.00 52.00 45.00 58.00 36.00 63.00 1.00 4.00 1.00 1.00 1.00 52.00 65.00 60.00 56.00 51.00 79.00 1.00 4.00 2.00 1.00 2.00 60.00 62.00 49.00 50.00 51.00 193.00 1.00 4.00 2.00 2.00 2.00 44.00 49.00 48.00 39.00 51.00 92.00 1.00 4.00 3.00 1.00 1.00 52.00 67.00 57.00 63.00 61.00 160.00 1.00 4.00 2.00 1.00 2.00 55.00 65.00 55.00 50.00 61.00 32.00 1.00 2.00 3.00 1.00 3.00 50.00 67.00 66.00 66.00 56.00 23.00 1.00 2.00 1.00 1.00 2.00 65.00 65.00 64.00 58.00 71.00 158.00 1.00 4.00 2.00 1.00 1.00 52.00 54.00 55.00 53.00 51.00 25.00 1.00 2.00 2.00 1.00 1.00 47.00 44.00 42.00 42.00 36.00 188.00 1.00 4.00 3.00 2.00 2.00 63.00 62.00 56.00 55.00 61.00 52.00 1.00 3.00 1.00 1.00 2.00 50.00 46.00 53.00 53.00 66.00 124.00 1.00 4.00 1.00 1.00 3.00 42.00 54.00 41.00 42.00 41.00 175.00 1.00 4.00 3.00 2.00 1.00 36.00 57.00 42.00 50.00 41.00 184.00 1.00 4.00 2.00 2.00 3.00 50.00 52.00 53.00 55.00 56.00 30.00 1.00 2.00 3.00 1.00 2.00 41.00 59.00 42.00 34.00 51.00 179.00 1.00 4.00 2.00 2.00 2.00 47.00 65.00 60.00 50.00 56.00 31.00 1.00 2.00 2.00 2.00 1.00 55.00 59.00 52.00 42.00 56.00 145.00 1.00 4.00 2.00 1.00 3.00 42.00 46.00 38.00 36.00 46.00 187.00 1.00 4.00 2.00 2.00 1.00 57.00 41.00 57.00 55.00 52.00 118.00 1.00 4.00 2.00 1.00 1.00 55.00 62.00 58.00 58.00 61.00 137.00 1.00 4.00 3.00 1.00 2.00 63.00 65.00 65.00 53.00 61.00 end data. factor /variables read write math science socst /analysis read write math science socst /extraction pc /plot eigen /criteria mineigen (.557) . _ATEOF { set +x $as_echo "$at_srcdir/factor.at:1759: pspp -O format=csv factor2.sps" at_fn_check_prepare_trace "factor.at:1759" ( $at_check_trace; pspp -O format=csv factor2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Communalities ,Initial,Extraction read,1.000,.736 write,1.000,.704 math,1.000,.750 science,1.000,.849 socst,1.000,.900 Table: Total Variance Explained ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,,Rotation Sums of Squared Loadings,, Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative % 1,3.381,67.616,67.616,3.381,67.616,67.616,2.113,42.267,42.267 2,.557,11.148,78.764,.557,11.148,78.764,1.825,36.497,78.764 3,.407,8.136,86.900,,,,,, 4,.356,7.123,94.023,,,,,, 5,.299,5.977,100.000,,,,,, Table: Component Matrix ,Component, ,1,2 read,.858,.020 write,.824,-.155 math,.844,.195 science,.801,.456 socst,.783,-.536 Table: Rotated Component Matrix ,Component, ,1,2 read,.650,.559 write,.508,.667 math,.757,.421 science,.900,.198 socst,.222,.922 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/factor.at:1759" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_506 #AT_START_507 at_fn_group_banner 507 'factor.at:1800' \ "FACTOR empty dataset" " " 75 at_xfail=no ( $as_echo "507. $at_setup_line: testing $at_desc ..." $at_traceon cat >factor-empty.sps <<'_ATEOF' data list notable list /x * y * z *. begin data. 3.4 . 92.9 . 32.09 34.2 1.00 19.80 . 2.00 . 3.6 end data. factor /variables = ALL. _ATEOF { set +x $as_echo "$at_srcdir/factor.at:1815: pspp -O format=csv factor-empty.sps" at_fn_check_prepare_trace "factor.at:1815" ( $at_check_trace; pspp -O format=csv factor-empty.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/factor.at:1815" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_507 #AT_START_508 at_fn_group_banner 508 'factor.at:1821' \ "FACTOR /ROTATION=NOROTATE" " " 75 at_xfail=no ( $as_echo "508. $at_setup_line: testing $at_desc ..." $at_traceon cat >factor-norotate.sps <<'_ATEOF' DATA LIST FREE / TRAIT1 TO TRAIT5 (F8.2). BEGIN DATA 1 5 5 1 1 8 9 7 9 8 9 8 9 9 8 9 9 9 9 9 1 9 1 1 9 9 7 7 9 9 9 7 9 9 7 END DATA FACTOR /VARIABLES=TRAIT1 TO TRAIT5 /ROTATION=NOROTATE /* NOROTATE may have caused the problem. */ /EXTRACTION=PC /PRINT=DEFAULT DET UNIVARIATE ROTATION SIG CORRELATION. _ATEOF { set +x $as_echo "$at_srcdir/factor.at:1840: pspp -O format=csv factor-norotate.sps" at_fn_check_prepare_trace "factor.at:1840" ( $at_check_trace; pspp -O format=csv factor-norotate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Descriptive Statistics ,Mean,Std. Deviation,Analysis N TRAIT1,6.57,3.54,7 TRAIT2,7.71,1.39,7 TRAIT3,6.71,2.71,7 TRAIT4,6.71,3.61,7 TRAIT5,7.29,2.66,7 Table: Correlation Matrix ,,TRAIT1,TRAIT2,TRAIT3,TRAIT4,TRAIT5 Correlations,TRAIT1,1.00,.30,.88,1.00,.54 ,TRAIT2,.30,1.00,-.02,.33,.84 ,TRAIT3,.88,-.02,1.00,.87,.13 ,TRAIT4,1.00,.33,.87,1.00,.54 ,TRAIT5,.54,.84,.13,.54,1.00 Sig. (1-tailed),TRAIT1,,.260,.004,.000,.103 ,TRAIT2,.260,,.482,.238,.009 ,TRAIT3,.004,.482,,.006,.390 ,TRAIT4,.000,.238,.006,,.103 ,TRAIT5,.103,.009,.390,.103, Determinant,.00,,,,, Table: Communalities ,Initial,Extraction TRAIT1,1.00,1.00 TRAIT2,1.00,1.00 TRAIT3,1.00,.99 TRAIT4,1.00,.99 TRAIT5,1.00,.99 Table: Total Variance Explained ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,, Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative % 1,3.26,65.26,65.26,3.26,65.26,65.26 2,1.54,30.77,96.03,1.54,30.77,96.03 3,.17,3.36,99.39,.17,3.36,99.39 4,.03,.61,100.00,.03,.61,100.00 5,.00,.00,100.00,,, Table: Component Matrix ,Component,,, ,1,2,3,4 TRAIT1,.97,.23,-.08,.00 TRAIT2,.52,-.81,.28,.00 TRAIT3,.78,.59,.17,.00 TRAIT4,.97,.21,-.04,.00 TRAIT5,.70,-.67,-.23,.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/factor.at:1840" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_508 #AT_START_509 at_fn_group_banner 509 'factor.at:1895' \ "FACTOR /CRITERIA=ITERATE" " " 75 at_xfail=no ( $as_echo "509. $at_setup_line: testing $at_desc ..." $at_traceon cat >factor-iterate.sps <<'_ATEOF' set format = F20.3. data list notable list /x y z *. begin data. 1.00 5.00 3.00 2.00 2.00 2.00 3.00 1.00 1.00 4.00 4.00 5.00 5.00 3.00 9.00 6.00 6.00 4.00 7.00 7.00 6.00 8.00 8.00 8.00 9.00 9.00 7.00 end data. FACTOR /VARIABLES= x y z /CRITERIA = MINEIGEN (1) ITERATE (25) /EXTRACTION =PAF /METHOD = CORRELATION /PRINT = INITIAL EXTRACTION /CRITERIA = ITERATE (0) /ROTATION = NOROTATE. _ATEOF { set +x $as_echo "$at_srcdir/factor.at:1921: pspp -O format=csv factor-iterate.sps" at_fn_check_prepare_trace "factor.at:1921" ( $at_check_trace; pspp -O format=csv factor-iterate.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Communalities ,Initial,Extraction x,.735,.979 y,.640,.653 z,.514,.523 Table: Total Variance Explained ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,, Factor,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative % 1,2.404,80.124,80.124,2.155,71.847,71.847 2,.425,14.166,94.290,,, 3,.171,5.710,100.000,,, Table: Factor Matrix ,Factor ,1 x,.990 y,.808 z,.723 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/factor.at:1921" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_509 #AT_START_510 at_fn_group_banner 510 'factor.at:1945' \ "FACTOR promax" " " 75 at_xfail=no ( $as_echo "510. $at_setup_line: testing $at_desc ..." $at_traceon cat >factor-promax.sps <<'_ATEOF' set decimal=dot. set format=F22.3. get file='llz.zsav'. factor /variables pz pn ps nz nn ns tz tn ts oz on os sz sn ss zz zn zs /missing listwise /print initial extraction rotation /criteria mineigen(1) iterate(25) /extraction paf /method correlation /rotation promax (5). _ATEOF { set +x $as_echo "$at_srcdir/factor.at:1962: ln -s \$top_srcdir/tests/language/stats/llz.zsav ." at_fn_check_prepare_dynamic "ln -s $top_srcdir/tests/language/stats/llz.zsav ." "factor.at:1962" ( $at_check_trace; ln -s $top_srcdir/tests/language/stats/llz.zsav . ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/factor.at:1962" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/factor.at:1964: pspp -O format=csv factor-promax.sps" at_fn_check_prepare_trace "factor.at:1964" ( $at_check_trace; pspp -O format=csv factor-promax.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Communalities ,Initial,Extraction PZ,.191,.375 PN,.042,.102 PS,.458,.623 NZ,.100,.163 NN,.065,.079 NS,.129,.148 TZ,.181,.344 TN,.102,.142 TS,.310,.372 OZ,.097,.158 ON,.323,.410 OS,.469,.617 SZ,.104,.170 SN,.154,.267 SS,.081,.180 ZZ,.123,.192 ZN,.208,.412 ZS,.130,.158 Table: Total Variance Explained ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,,Rotation Sums of Squared Loadings Factor,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total 1,2.968,16.491,16.491,2.411,13.393,13.393,2.355 2,2.026,11.253,27.744,1.271,7.059,20.452,1.209 3,1.622,9.011,36.756,.948,5.264,25.716,1.231 4,1.086,6.032,42.788,.283,1.574,27.290,.770 5,.996,5.533,48.321,,,, 6,.923,5.130,53.451,,,, 7,.873,4.852,58.303,,,, 8,.856,4.756,63.060,,,, 9,.836,4.644,67.703,,,, 10,.816,4.534,72.237,,,, 11,.785,4.359,76.596,,,, 12,.740,4.110,80.706,,,, 13,.713,3.964,84.670,,,, 14,.653,3.626,88.296,,,, 15,.633,3.519,91.815,,,, 16,.604,3.356,95.171,,,, 17,.484,2.687,97.858,,,, 18,.386,2.142,100.000,,,, Table: Factor Matrix ,Factor,,, ,1,2,3,4 PZ,-.276,.154,.510,.124 PN,.096,.129,-.091,.261 PS,.746,-.085,.234,.063 NZ,-.111,.323,.206,-.058 NN,.007,.260,-.083,-.069 NS,.366,.096,.046,.051 TZ,-.228,.172,.509,.059 TN,.131,.345,-.074,.029 TS,.601,-.005,.098,.030 OZ,-.145,.166,.322,-.081 ON,.607,.082,.073,-.173 OS,.757,-.059,.171,-.104 SZ,-.142,.307,.226,-.066 SN,.175,.436,-.183,.115 SS,.199,.206,-.083,.302 ZZ,-.074,.411,-.080,-.104 ZN,.015,.580,-.252,-.114 ZS,.365,.156,-.004,.015 Table: Pattern Matrix ,Factor,,, ,1,2,3,4 PZ,-.063,-.126,.599,.085 PN,-.035,.000,-.033,.325 PS,.762,-.175,.058,.081 NZ,.027,.230,.327,-.044 NN,.008,.289,.008,-.026 NS,.344,.044,.015,.091 TZ,.004,-.074,.589,.020 TN,.097,.307,.033,.103 TS,.585,-.043,-.017,.062 OZ,.046,.067,.382,-.109 ON,.654,.151,-.029,-.145 OS,.803,-.037,-.009,-.092 SZ,.009,.213,.345,-.060 SN,.065,.376,-.036,.227 SS,.054,.042,-.013,.388 ZZ,-.044,.434,.078,-.046 ZN,-.025,.646,-.041,-.006 ZS,.337,.133,-.013,.067 Table: Structure Matrix ,Factor,,, ,1,2,3,4 PZ,-.177,-.058,.598,-.022 PN,.068,.110,-.049,.317 PS,.771,-.138,-.136,.240 NZ,-.060,.236,.339,.019 NN,.000,.281,.027,.076 NS,.368,.080,-.068,.207 TZ,-.127,-.028,.582,-.049 TN,.122,.345,.023,.235 TS,.607,-.018,-.160,.221 OZ,-.074,.055,.384,-.101 ON,.619,.104,-.160,.102 OS,.778,-.064,-.190,.132 SZ,-.086,.215,.361,-.009 SN,.143,.453,-.044,.380 SS,.171,.176,-.052,.420 ZZ,-.073,.422,.120,.085 ZN,-.013,.641,.008,.214 ZS,.361,.158,-.088,.213 Table: Factor Correlation Matrix Factor,1,2,3,4 1,1.000,.008,-.232,.294 2,.008,1.000,.065,.347 3,-.232,.065,1.000,-.076 4,.294,.347,-.076,1.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/factor.at:1964" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_510 #AT_START_511 at_fn_group_banner 511 'factor.at:2090' \ "FACTOR covariance matrix" " " 75 at_xfail=no ( $as_echo "511. $at_setup_line: testing $at_desc ..." $at_traceon cat >covariance-matrix.sps <<'_ATEOF' set format = F10.3. matrix data variables = rowtype_ var01 var02 var03 var04 var05 var06 var07 var08 / format = lower diagonal . begin data mean 24.3 5.4 69.7 20.1 13.4 2.7 27.9 3.7 sd 5.7 1.5 23.5 5.8 2.8 4.5 5.4 1.5 n 92 92 92 92 92 92 92 92 cov 32.490000 cov 1.539000 2.250000 cov -29.469000 -5.992500 552.250000 cov 11.901600 2.697000 -19.082000 33.640000 cov 4.309200 0.672000 -7.896000 3.572800 7.840000 cov 8.464500 1.012500 -17.977500 6.264000 2.646000 20.250000 cov 15.390000 2.349000 -25.380000 10.022400 1.814400 9.234000 29.160000 cov 1.453500 0.652500 -1.762500 1.740000 1.134000 1.350000 0.324000 2.250000 end data. factor matrix in (cov = *) / method = covariance / print = initial covariance / extraction = pc / rotation = norotate. _ATEOF { set +x $as_echo "$at_srcdir/factor.at:2118: pspp -O format=csv covariance-matrix.sps" at_fn_check_prepare_trace "factor.at:2118" ( $at_check_trace; pspp -O format=csv covariance-matrix.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Covariance Matrix ,var01,var02,var03,var04,var05,var06,var07,var08 var01,32.490,1.539,-29.469,11.902,4.309,8.464,15.390,1.454 var02,1.539,2.250,-5.992,2.697,.672,1.013,2.349,.653 var03,-29.469,-5.992,552.250,-19.082,-7.896,-17.977,-25.380,-1.763 var04,11.902,2.697,-19.082,33.640,3.573,6.264,10.022,1.740 var05,4.309,.672,-7.896,3.573,7.840,2.646,1.814,1.134 var06,8.464,1.013,-17.977,6.264,2.646,20.250,9.234,1.350 var07,15.390,2.349,-25.380,10.022,1.814,9.234,29.160,.324 var08,1.454,.653,-1.763,1.740,1.134,1.350,.324,2.250 Table: Communalities ,Initial var01,32.490 var02,2.250 var03,552.250 var04,33.640 var05,7.840 var06,20.250 var07,29.160 var08,2.250 Table: Total Variance Explained ,Initial Eigenvalues,, Component,Total,% of Variance,Cumulative % 1,556.895,81.881,81.881 2,57.963,8.522,90.403 3,23.576,3.466,93.869 4,16.446,2.418,96.288 5,14.603,2.147,98.435 6,6.831,1.004,99.439 7,2.375,.349,99.788 8,1.440,.212,100.000 Table: Component Matrix ,Component,,,,,, ,1,2,3,4,5,6,7 var01,1.394,4.388,1.513,-2.851,.849,.396,.033 var02,.269,.460,-.173,.147,-.146,-.213,.872 var03,-23.489,.725,.058,.003,.022,-.012,.006 var04,.926,4.007,-4.068,.241,-.253,.218,-.026 var05,.363,.829,-.172,-.255,.805,-2.492,.058 var06,.843,2.354,.971,2.425,2.649,.392,.046 var07,1.205,3.948,1.926,1.515,-2.450,-.317,-.087 var08,.085,.319,-.157,-.011,.353,-.341,-.816 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/factor.at:2118" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_511 #AT_START_512 at_fn_group_banner 512 'factor.at:2171' \ "FACTOR correlation matrix" " " 75 at_xfail=no ( $as_echo "512. $at_setup_line: testing $at_desc ..." $at_traceon cat >correlation-matrix.sps <<'_ATEOF' set format = F10.3. matrix data variables = rowtype_ cdi_actws_16 cdi_maxzin_16 rdls_passws_16 rdls_actws_16 cdi_actws_20 cdi_maxzin_20 cdi_actws_26 cdi_maxzin_26 rdls_passws_26 rdls_actws_26 nepsy_passws_36 morf_verv_36 bnt_actws_36 klankgr_id_36 snelnoe_36 letters_36 ppvt_passws_50 morf_verv_50 nepsy_passws_56 bnt_actws_56 klank_gr_weg_56 snelnoe_56 letters_56 leesacc_wo_owo_811 leesacc_tekst_811 leesacc_otekst_811 leessne_wo_owo_811 leesvl_tekst_811 leesvl_otekst_811 leessne_wo_811 spel_wo_owo_811 / format = upper diagonal . begin data mean 64.44 1.74 15.30 11.50 269.03 5.37 441.90 8.57 36.59 33.99 11.68 14.74 18.67 6.70 71.57 2.28 70.45 51.82 18.82 34.57 11.68 45.63 12.94 35.08 92.60 79.28 2.78 61.71 29.44 9.46 13.17 sd 74.93 1.36 5.51 4.17 159.26 2.76 128.77 3.50 6.20 6.50 3.55 8.37 5.90 3.01 24.81 4.09 24.44 18.55 2.90 6.46 3.01 14.06 7.69 4.36 7.10 17.57 1.27 25.68 11.75 3.36 4.13 n 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 corr 1.00 .784 .397 .862 .692 .625 .490 .374 .406 .371 .260 .257 .306 .118 -.148 .072 .202 .234 .198 .241 .205 -.054 .246 .166 .143 .155 -.122 .144 -.010 .135 .241 corr 1.00 .333 .751 .549 .553 .447 .313 .304 .377 .204 .249 .258 .193 -.158 .119 .150 .216 .127 .209 .242 .046 .233 .120 .155 .107 -.126 .147 -.009 .134 .208 corr 1.00 .469 .433 .381 .442 .307 .462 .391 .378 .293 .369 .191 -.306 .238 .204 .215 .295 .285 .157 .069 .241 .029 .060 .054 -.043 .124 -.069 .054 .136 corr 1.00 .708 .663 .509 .419 .434 .432 .267 .255 .342 .132 -.192 .142 .228 .203 .248 .260 .200 -.051 .254 .136 .156 .109 -.126 .172 -.004 .157 .268 corr 1.00 .787 .710 .567 .402 .511 .274 .285 .332 .154 -.096 .247 .253 .235 .245 .257 .261 -.048 .243 .119 .194 .164 -.108 .184 .011 .157 .235 corr 1.00 .590 .646 .449 .505 .313 .322 .405 .148 -.117 .152 .294 .322 .252 .321 .267 -.055 .255 .118 .178 .137 -.110 .182 .004 .146 .216 corr 1.00 .548 .343 .619 .296 .260 .456 .149 -.098 .252 .279 .267 .342 .361 .186 -.066 .215 .107 .148 .059 -.114 .156 -.035 .095 .220 corr 1.00 .406 .509 .397 .236 .416 .037 -.179 .192 .334 .293 .277 .367 .162 -.150 .306 .171 .307 .173 -.128 .255 .075 .224 .315 corr 1.00 .410 .497 .560 .574 .240 -.301 .204 .508 .351 .457 .428 .242 -.117 .367 .136 .191 .191 -.102 .215 .053 .185 .273 corr 1.00 .328 .258 .534 .236 -.202 .200 .333 .209 .352 .375 .302 -.119 .272 .062 .203 .042 -.092 .220 .020 .158 .227 corr 1.00 .439 .488 .323 -.213 .287 .507 .427 .493 .522 .298 -.142 .371 .109 .215 .213 -.048 .228 .009 .133 .267 corr 1.00 .437 .381 -.158 .153 .403 .430 .383 .379 .150 -.141 .303 .115 .131 .155 -.170 .206 .039 .193 .254 corr 1.00 .247 -.143 .182 .521 .364 .415 .688 .304 -.185 .327 .188 .211 .202 -.111 .272 .122 .226 .301 corr 1.00 -.150 .229 .296 .249 .329 .255 .210 -.036 .252 .141 .230 .112 -.195 .309 .135 .250 .195 corr 1.00 -.132 -.204 -.162 -.284 -.166 -.189 .294 -.339 -.094 -.218 -.144 .153 -.246 -.128 -.192 -.239 corr 1.00 .151 .132 .166 .195 .387 -.214 .476 .154 .187 .167 -.236 .410 .316 .370 .245 corr 1.00 .388 .479 .591 .294 -.171 .351 .102 .245 .180 .003 .274 .059 .178 .236 corr 1.00 .408 .437 .276 -.153 .353 .251 .318 .229 -.111 .263 .042 .203 .349 corr 1.00 .467 .234 -.249 .382 .199 .313 .197 -.117 .263 .047 .215 .318 corr 1.00 .368 -.199 .441 .198 .224 .197 -.099 .329 .105 .256 .322 corr 1.00 -.211 .473 .233 .253 .268 -.198 .397 .229 .309 .277 corr 1.00 -.310 -.217 -.312 -.203 .227 -.296 -.260 -.276 -.321 corr 1.00 .368 .350 .311 -.313 .578 .338 .521 .458 corr 1.00 .415 .580 -.588 .545 .497 .635 .683 corr 1.00 .570 -.386 .494 .340 .538 .524 corr 1.00 -.366 .427 .299 .498 .506 corr 1.00 -.684 -.620 -.746 -.568 corr 1.00 .759 .900 .555 corr 1.00 .814 .400 corr 1.00 .621 corr 1.00 end data . factor matrix in (cor = *) / analysis = cdi_actws_16 rdls_actws_16 cdi_actws_20 cdi_actws_26 rdls_actws_26 bnt_actws_36 bnt_actws_56 / format = default / criteria = factors (1) / extraction = pc / rotation = norotate / print = initial extraction . _ATEOF { set +x $as_echo "$at_srcdir/factor.at:2230: pspp -O format=csv correlation-matrix.sps" at_fn_check_prepare_trace "factor.at:2230" ( $at_check_trace; pspp -O format=csv correlation-matrix.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Communalities ,Initial,Extraction cdi_actws_16,1.000,.614 rdls_actws_16,1.000,.660 cdi_actws_20,1.000,.695 cdi_actws_26,1.000,.650 rdls_actws_26,1.000,.536 bnt_actws_36,1.000,.443 bnt_actws_56,1.000,.316 Table: Total Variance Explained ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,, Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative % 1,3.914,55.908,55.908,3.914,55.908,55.908 2,1.320,18.852,74.760,,, 3,.716,10.223,84.983,,, 4,.422,6.030,91.012,,, 5,.278,3.977,94.989,,, 6,.216,3.088,98.077,,, 7,.135,1.923,100.000,,, Table: Component Matrix ,Component ,1 cdi_actws_16,.784 rdls_actws_16,.812 cdi_actws_20,.834 cdi_actws_26,.806 rdls_actws_26,.732 bnt_actws_36,.666 bnt_actws_56,.562 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/factor.at:2230" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_512 #AT_START_513 at_fn_group_banner 513 'factor.at:2267' \ "FACTOR bad input" " " 75 at_xfail=no ( $as_echo "513. $at_setup_line: testing $at_desc ..." $at_traceon cat >bad-input.sps <<'_ATEOF' set format = F10.3. MATRIX DATA VARIABLES S1 ROWTYPE_ V1 TO V3 /SPLIT=S1. BEGIN DATA 0 MEAN 2 4 3 0 SD 1 2 3 0 N 9 9 9 0 KORR 1 0 CORV .6 1 0 CORR .7 .8 1 1 MEAN 9 8 7 1 SD 5 6 7 1 N 9 9 9 1 CORR 1 X CORR .4 1 1 CORR .3 .2 1 END DATA. EXECUTE. FACTOR MATRIX IN (CORR =!*) /PRINT = CORRELATION . _ATEOF { set +x $as_echo "$at_srcdir/factor.at:2295: pspp -O format=csv bad-input.sps" at_fn_check_prepare_trace "factor.at:2295" ( $at_check_trace; pspp -O format=csv bad-input.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/factor.at:2295" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_513 #AT_START_514 at_fn_group_banner 514 'factor.at:2300' \ "FACTOR anti-image matrix" " " 75 at_xfail=no ( $as_echo "514. $at_setup_line: testing $at_desc ..." $at_traceon cat >anti-image-matrix.sps <<'_ATEOF' SET FORMAT=F20.3 . matrix data variables = rowtype_ viq piq pa ran piatwr piatc / n = 476 / format = lower diagonal . begin data mean 96.88 100.51 -1.73 -0.94 -2.52 -1.85 sd 10.97 11.19 1.19 0.88 0.85 0.97 corr 1.00 corr 0.38 1.00 corr 0.26 0.24 1.00 corr 0.16 0.17 0.34 1.00 corr 0.25 0.07 0.46 0.38 1.00 corr 0.37 0.22 0.39 0.30 0.59 1.00 end data. factor matrix = in (cor = *) / analysis = viq piq pa ran piatwr piatc / format = sort / extraction = pc / rotation = norotate / print = aic _ATEOF { set +x $as_echo "$at_srcdir/factor.at:2327: pspp -O format=csv anti-image-matrix.sps" at_fn_check_prepare_trace "factor.at:2327" ( $at_check_trace; pspp -O format=csv anti-image-matrix.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Anti-Image Matrices ,,viq,piq,pa,ran,piatwr,piatc Anti-image Covariance,viq,.762,-.248,-.048,.008,-.031,-.143 ,piq,-.248,.807,-.117,-.081,.108,-.071 ,pa,-.048,-.117,.711,-.125,-.173,-.060 ,ran,.008,-.081,-.125,.808,-.143,-.035 ,piatwr,-.031,.108,-.173,-.143,.551,-.265 ,piatc,-.143,-.071,-.060,-.035,-.265,.581 Anti-image Correlation,viq,.741,-.316,-.066,.011,-.048,-.215 ,piq,-.316,.624,-.154,-.100,.163,-.103 ,pa,-.066,-.154,.811,-.165,-.277,-.093 ,ran,.011,-.100,-.165,.825,-.214,-.051 ,piatwr,-.048,.163,-.277,-.214,.675,-.469 ,piatc,-.215,-.103,-.093,-.051,-.469,.729 Table: Component Matrix ,Component,,,, ,1,2,3,4,5 piatc,.774,.122,-.368,.365,-.322 piatwr,.754,.418,.442,.219,-.115 pa,.707,.124,-.117,-.161,.256 piq,.456,-.733,.122,-.289,-.377 viq,.589,-.539,.033,.298,.457 ran,.592,.262,-.069,-.638,.096 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/factor.at:2327" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_514 #AT_START_515 at_fn_group_banner 515 'factor.at:2357' \ "FACTOR Kaiser-Meyer-Olkin" " " 75 at_xfail=no ( $as_echo "515. $at_setup_line: testing $at_desc ..." $at_traceon cat >kmo.sps <<'_ATEOF' SET FORMAT=F20.3 . matrix data variables = rowtype_ viq piq pa ran piatwr piatc / n = 476 / format = lower diagonal . begin data mean 96.88 100.51 -1.73 -0.94 -2.52 -1.85 sd 10.97 11.19 1.19 0.88 0.85 0.97 corr 1.00 corr 0.38 1.00 corr 0.26 0.24 1.00 corr 0.16 0.17 0.34 1.00 corr 0.25 0.07 0.46 0.38 1.00 corr 0.37 0.22 0.39 0.30 0.59 1.00 end data. factor matrix = in (cor = *) / analysis = viq piq pa ran piatwr piatc / extraction = pc / rotation = norotate / print = kmo _ATEOF { set +x $as_echo "$at_srcdir/factor.at:2383: pspp -O format=csv kmo.sps" at_fn_check_prepare_trace "factor.at:2383" ( $at_check_trace; pspp -O format=csv kmo.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: KMO and Bartlett's Test Kaiser-Meyer-Olkin Measure of Sampling Adequacy,,.730 Bartlett's Test of Sphericity,Approx. Chi-Square,602.673 ,df,15 ,Sig.,.000 Table: Component Matrix ,Component,,,, ,1,2,3,4,5 viq,.589,-.539,.033,.298,.457 piq,.456,-.733,.122,-.289,-.377 pa,.707,.124,-.117,-.161,.256 ran,.592,.262,-.069,-.638,.096 piatwr,.754,.418,.442,.219,-.115 piatc,.774,.122,-.368,.365,-.322 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/factor.at:2383" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_515 #AT_START_516 at_fn_group_banner 516 'flip.at:19' \ "FLIP with NEWNAMES" " " 76 at_xfail=no ( $as_echo "516. $at_setup_line: testing $at_desc ..." $at_traceon cat >flip.sps <<'_ATEOF' data list notable /N 1 (a) a b c d 2-9. list. begin data. v 1 2 3 4 5 w 6 7 8 910 x1112131415 y1617181920 z2122232425 end data. temporary. compute e = a. flip newnames=n. list. flip. list. _ATEOF { set +x $as_echo "$at_srcdir/flip.at:37: pspp -O format=csv flip.sps" at_fn_check_prepare_trace "flip.at:37" ( $at_check_trace; pspp -O format=csv flip.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List N,a,b,c,d v,1,2,3,4 w,6,7,8,9 x,11,12,13,14 y,16,17,18,19 z,21,22,23,24 flip.sps:12: warning: FLIP: FLIP ignores TEMPORARY. Temporary transformations will be made permanent. Table: Data List CASE_LBL,v,w,x,y,z a ,1.00,6.00,11.00,16.00,21.00 b ,2.00,7.00,12.00,17.00,22.00 c ,3.00,8.00,13.00,18.00,23.00 d ,4.00,9.00,14.00,19.00,24.00 e ,1.00,6.00,11.00,16.00,21.00 Table: Data List CASE_LBL,a,b,c,d,e v ,1.00,2.00,3.00,4.00,1.00 w ,6.00,7.00,8.00,9.00,6.00 x ,11.00,12.00,13.00,14.00,11.00 y ,16.00,17.00,18.00,19.00,16.00 z ,21.00,22.00,23.00,24.00,21.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/flip.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_516 #AT_START_517 at_fn_group_banner 517 'flip.at:66' \ "FLIP without NEWNAMES" " " 76 at_xfail=no ( $as_echo "517. $at_setup_line: testing $at_desc ..." $at_traceon cat >flip.sps <<'_ATEOF' data list list notable /v1 to v10. format all(f2). begin data. 1 2 3 4 5 6 7 8 9 10 4 5 6 7 8 9 10 11 12 13 end data. list. flip. list. _ATEOF { set +x $as_echo "$at_srcdir/flip.at:80: pspp -O format=csv flip.sps" at_fn_check_prepare_trace "flip.at:80" ( $at_check_trace; pspp -O format=csv flip.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List v1,v2,v3,v4,v5,v6,v7,v8,v9,v10 1,2,3,4,5,6,7,8,9,10 4,5,6,7,8,9,10,11,12,13 Table: Data List CASE_LBL,VAR000,VAR001 v1 ,1.00,4.00 v2 ,2.00,5.00 v3 ,3.00,6.00 v4 ,4.00,7.00 v5 ,5.00,8.00 v6 ,6.00,9.00 v7 ,7.00,10.00 v8 ,8.00,11.00 v9 ,9.00,12.00 v10 ,10.00,13.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/flip.at:80" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_517 #AT_START_518 at_fn_group_banner 518 'flip.at:104' \ "FLIP badly formed" " " 76 at_xfail=no ( $as_echo "518. $at_setup_line: testing $at_desc ..." $at_traceon cat >flip.sps <<'_ATEOF' data list notable /N 1 (a) a b c d 2-9. flip newnames=n. list. flip. _ATEOF { set +x $as_echo "$at_srcdir/flip.at:114: pspp -O format=csv flip.sps" at_fn_check_prepare_trace "flip.at:114" ( $at_check_trace; pspp -O format=csv flip.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/flip.at:114" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_518 #AT_START_519 at_fn_group_banner 519 'flip.at:120' \ "FLIP with invalid variable names" " " 76 at_xfail=no ( $as_echo "519. $at_setup_line: testing $at_desc ..." $at_traceon cat >flip.sps <<'_ATEOF' data list notable list /N (a3) a b c d *. begin data. "" 1 2 3 4 BY 1 2 3 4 end data. flip newnames=n. list. _ATEOF { set +x $as_echo "$at_srcdir/flip.at:134: pspp -O format=csv flip.sps" at_fn_check_prepare_trace "flip.at:134" ( $at_check_trace; pspp -O format=csv flip.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List CASE_LBL,v,BY1 a ,1.00,1.00 b ,2.00,2.00 c ,3.00,3.00 d ,4.00,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/flip.at:134" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_519 #AT_START_520 at_fn_group_banner 520 'frequencies.at:19' \ "FREQUENCIES string variable" " " 77 at_xfail=no ( $as_echo "520. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' DATA LIST FREE/ name (A8) value * quantity . BEGIN DATA. foo 1 5 bar 2 6 baz 1 9 quux 3 1 bar 1 2 baz 4 3 baz 1 4 baz 1 1 foo 6 0 quux 5 8 END DATA. EXECUTE. FREQUENCIES /VAR = name/ORDER=ANALYSIS. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:39: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:39" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: name Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,bar ,2,20.00,20.00,20.00 ,baz ,4,40.00,40.00,60.00 ,foo ,2,20.00,20.00,80.00 ,quux ,2,20.00,20.00,100.00 Total,,10,100.0,100.0, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_520 #AT_START_521 at_fn_group_banner 521 'frequencies.at:52' \ "FREQUENCIES two runs crash" " " 77 at_xfail=no ( $as_echo "521. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' data list free /v1 v2. begin data. 0 1 2 3 4 5 3 4 end data. frequencies v1 v2/statistics=none/ORDER=VARIABLE. frequencies v1 v2/statistics=none. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:65: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:65" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: v1 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,.00,1,25.00,25.00,25.00 ,2.00,1,25.00,25.00,50.00 ,3.00,1,25.00,25.00,75.00 ,4.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, Table: v2 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,25.00,25.00,25.00 ,3.00,1,25.00,25.00,50.00 ,4.00,1,25.00,25.00,75.00 ,5.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, Table: v1 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,.00,1,25.00,25.00,25.00 ,2.00,1,25.00,25.00,50.00 ,3.00,1,25.00,25.00,75.00 ,4.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, Table: v2 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,25.00,25.00,25.00 ,3.00,1,25.00,25.00,50.00 ,4.00,1,25.00,25.00,75.00 ,5.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:65" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_521 #AT_START_522 at_fn_group_banner 522 'frequencies.at:101' \ "FREQUENCIES with LIMIT" " " 77 at_xfail=no ( $as_echo "522. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' data list free /v1 v2. begin data. 0 1 2 5 4 3 3 5 end data. frequencies v1 v2/statistics=none/FORMAT=LIMIT(3). _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:113: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:113" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: v2 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,25.00,25.00,25.00 ,3.00,1,25.00,25.00,50.00 ,5.00,2,50.00,50.00,100.00 Total,,4,100.0,100.0, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:113" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_522 #AT_START_523 at_fn_group_banner 523 'frequencies.at:125' \ "FREQUENCIES HTML output crash" " " 77 at_xfail=no ( $as_echo "523. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' data list free /v1 v2. begin data. 0 1 2 3 4 5 3 4 end data. list. frequencies v1/statistics=none. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:139: pspp -o - -O format=csv -o pspp.html frequencies.sps" at_fn_check_prepare_trace "frequencies.at:139" ( $at_check_trace; pspp -o - -O format=csv -o pspp.html frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List v1,v2 .00,1.00 2.00,3.00 4.00,5.00 3.00,4.00 Table: v1 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,.00,1,25.00,25.00,25.00 ,2.00,1,25.00,25.00,50.00 ,3.00,1,25.00,25.00,75.00 ,4.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:139" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/frequencies.at:155: test -s pspp.html" at_fn_check_prepare_trace "frequencies.at:155" ( $at_check_trace; test -s pspp.html ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:155" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_523 #AT_START_524 at_fn_group_banner 524 'frequencies.at:160' \ "FREQUENCIES pie chart crash" " " 77 at_xfail=no ( $as_echo "524. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' data list list /x * w *. begin data. 1 4 34 10 -9 15 232 6 11 4 134 1 9 5 32 16 -2 6 2 16 20 6 end data. weight by w. frequencies /x /format=notable /statistics=none /piechart. _ATEOF # Cannot use the CSV driver for this because it does not output charts # at all. { set +x $as_echo "$at_srcdir/frequencies.at:184: pspp frequencies.sps" at_fn_check_prepare_trace "frequencies.at:184" ( $at_check_trace; pspp frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Reading free-form data from INLINE. +--------+------+ |Variable|Format| #========#======# |x |F8.0 | |w |F8.0 | +--------+------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:184" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_524 #AT_START_525 at_fn_group_banner 525 'frequencies.at:196' \ "FREQUENCIES histogram crash" " " 77 at_xfail=no ( $as_echo "525. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' data list notable list /x * w *. begin data. 1 4 34 10 -9 15 232 6 11 4 134 1 9 5 32 16 -2 6 2 16 20 6 end data. weight by w. frequencies /x /format=notable /statistics=none /histogram=minimum(0) maximum(50) percent(5) normal. _ATEOF # Cannot use the CSV driver for this because it does not output charts # at all. { set +x $as_echo "$at_srcdir/frequencies.at:222: pspp -O format=pdf frequencies.sps" at_fn_check_prepare_trace "frequencies.at:222" ( $at_check_trace; pspp -O format=pdf frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:222" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_525 #AT_START_526 at_fn_group_banner 526 'frequencies.at:227' \ "FREQUENCIES median with histogram crash" " " 77 at_xfail=no ( $as_echo "526. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' data list list notable /x. begin data. 1 end data. frequencies /x /histogram /STATISTICS=median. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:236: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:236" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:236" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_526 #AT_START_527 at_fn_group_banner 527 'frequencies.at:242' \ "FREQUENCIES crash after TEMPORARY" " " 77 at_xfail=no ( $as_echo "527. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' DATA LIST LIST /SEX (A1) X *. BEGIN DATA. M 31 F 21 M 41 F 31 M 13 F 12 M 14 F 13 END DATA. TEMPORARY SELECT IF SEX EQ 'F' FREQUENCIES /X . FINISH _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:263: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:263" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format SEX,A1 X,F8.0 Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,12.00,1,25.00,25.00,25.00 ,13.00,1,25.00,25.00,50.00 ,21.00,1,25.00,25.00,75.00 ,31.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, Table: X N,Valid,4 ,Missing,0 Mean,,19.25 Std Dev,,8.81 Minimum,,12.00 Maximum,,31.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:263" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_527 #AT_START_528 at_fn_group_banner 528 'frequencies.at:303' \ "FREQUENCIES basic percentiles" " " 77 at_xfail=no ( $as_echo "528. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' DATA LIST LIST notable /x * . BEGIN DATA. 1 2 3 4 5 END DATA. FREQUENCIES VAR=x /FORMAT=NOTABLE /PERCENTILES = 0 25 33.333 50 66.666 75 100. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:319: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:319" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: x N,Valid,5 ,Missing,0 Mean,,3.00 Std Dev,,1.58 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,2.00 ,33,2.33 ,50 (Median),3.00 ,67,3.67 ,75,4.00 ,100,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:319" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_528 #AT_START_529 at_fn_group_banner 529 'frequencies.at:323' \ "FREQUENCIES basic n-tiles" " " 77 at_xfail=no ( $as_echo "529. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' DATA LIST LIST notable /x * . BEGIN DATA. 1 2 3 4 5 END DATA. FREQUENCIES VAR=x /FORMAT=NOTABLE /NTILES = 3 /NTILES = 4. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:340: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:340" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: x N,Valid,5 ,Missing,0 Mean,,3.00 Std Dev,,1.58 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,2.00 ,33,2.33 ,50 (Median),3.00 ,67,3.67 ,75,4.00 ,100,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:340" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_529 #AT_START_530 at_fn_group_banner 530 'frequencies.at:344' \ "FREQUENCIES compatibility percentiles" " " 77 at_xfail=no ( $as_echo "530. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' DATA LIST LIST notable /X * . BEGIN DATA. 1 2 3 4 5 END DATA. FREQUENCIES VAR=x /ALGORITHM=COMPATIBLE /PERCENTILES = 0 25 50 75 100. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:360: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:360" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,20.00,20.00,20.00 ,2.00,1,20.00,20.00,40.00 ,3.00,1,20.00,20.00,60.00 ,4.00,1,20.00,20.00,80.00 ,5.00,1,20.00,20.00,100.00 Total,,5,100.0,100.0, Table: X N,Valid,5 ,Missing,0 Mean,,3.00 Std Dev,,1.58 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,1.50 ,50 (Median),3.00 ,75,4.50 ,100,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:360" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_530 #AT_START_531 at_fn_group_banner 531 'frequencies.at:385' \ "FREQUENCIES enhanced percentiles" " " 77 at_xfail=no ( $as_echo "531. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' DATA LIST LIST notable /X * . BEGIN DATA. 1 2 3 4 5 END DATA. FREQUENCIES VAR=x /PERCENTILES = 0 25 50 75 100. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:400: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:400" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,20.00,20.00,20.00 ,2.00,1,20.00,20.00,40.00 ,3.00,1,20.00,20.00,60.00 ,4.00,1,20.00,20.00,80.00 ,5.00,1,20.00,20.00,100.00 Total,,5,100.0,100.0, Table: X N,Valid,5 ,Missing,0 Mean,,3.00 Std Dev,,1.58 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,2.00 ,50 (Median),3.00 ,75,4.00 ,100,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:400" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_531 #AT_START_532 at_fn_group_banner 532 'frequencies.at:425' \ "FREQUENCIES enhanced percentiles, weighted" " " 77 at_xfail=no ( $as_echo "532. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' DATA LIST LIST notable /X * F *. BEGIN DATA. 1 2 2 2 3 2 4 1 4 1 5 1 5 1 END DATA. WEIGHT BY f. FREQUENCIES VAR=x /PERCENTILES = 0 25 50 75 100. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:444: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:444" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,2.00,20.00,20.00,20.00 ,2.00,2.00,20.00,20.00,40.00 ,3.00,2.00,20.00,20.00,60.00 ,4.00,2.00,20.00,20.00,80.00 ,5.00,2.00,20.00,20.00,100.00 Total,,10.00,100.0,100.0, Table: X N,Valid,10.00 ,Missing,.00 Mean,,3.00 Std Dev,,1.49 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,2.00 ,50 (Median),3.00 ,75,4.00 ,100,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:444" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_532 #AT_START_533 at_fn_group_banner 533 'frequencies.at:469' \ "FREQUENCIES enhanced percentiles, weighted (2)" " " 77 at_xfail=no ( $as_echo "533. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' DATA LIST LIST notable /X * F *. BEGIN DATA. 1 1 3 2 4 1 5 1 5 1 END DATA. WEIGHT BY f. FREQUENCIES VAR=x /PERCENTILES = 0 25 50 75 100. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:486: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:486" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1.00,16.67,16.67,16.67 ,3.00,2.00,33.33,33.33,50.00 ,4.00,1.00,16.67,16.67,66.67 ,5.00,2.00,33.33,33.33,100.00 Total,,6.00,100.0,100.0, Table: X N,Valid,6.00 ,Missing,.00 Mean,,3.50 Std Dev,,1.52 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,3.00 ,50 (Median),3.50 ,75,4.75 ,100,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:486" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_533 #AT_START_534 at_fn_group_banner 534 'frequencies.at:511' \ "FREQUENCIES enhanced percentiles, weighted (3)" " " 77 at_xfail=no ( $as_echo "534. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' DATA LIST LIST notable /X * F *. BEGIN DATA. 1 7 2 16 3 12 4 5 END DATA. WEIGHT BY f. FREQUENCIES VAR=x /PERCENTILES = 0 25 50 75 100. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:527: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:527" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,7.00,17.50,17.50,17.50 ,2.00,16.00,40.00,40.00,57.50 ,3.00,12.00,30.00,30.00,87.50 ,4.00,5.00,12.50,12.50,100.00 Total,,40.00,100.0,100.0, Table: X N,Valid,40.00 ,Missing,.00 Mean,,2.38 Std Dev,,.93 Minimum,,1.00 Maximum,,4.00 Percentiles,0,1.00 ,25,2.00 ,50 (Median),2.00 ,75,3.00 ,100,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:527" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_534 #AT_START_535 at_fn_group_banner 535 'frequencies.at:551' \ "FREQUENCIES enhanced percentiles, weighted, missing values" "" 77 at_xfail=no ( $as_echo "535. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' DATA LIST LIST notable /X * F *. BEGIN DATA. 1 1 3 2 4 1 5 1 5 1 99 4 END DATA. MISSING VALUE x (99.0) . WEIGHT BY f. FREQUENCIES VAR=x /PERCENTILES = 0 25 50 75 100. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:571: pspp -O format=csv frequencies.sps" at_fn_check_prepare_trace "frequencies.at:571" ( $at_check_trace; pspp -O format=csv frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1.00,10.00,16.67,16.67 ,3.00,2.00,20.00,33.33,50.00 ,4.00,1.00,10.00,16.67,66.67 ,5.00,2.00,20.00,33.33,100.00 ,99.00,4.00,40.00,Missing, Total,,10.00,100.0,100.0, Table: X N,Valid,6.00 ,Missing,4.00 Mean,,3.50 Std Dev,,1.52 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,3.00 ,50 (Median),3.50 ,75,4.75 ,100,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:571" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_535 #AT_START_536 at_fn_group_banner 536 'frequencies.at:596' \ "FREQUENCIES dichotomous histogram" " " 77 at_xfail=no ( $as_echo "536. $at_setup_line: testing $at_desc ..." $at_traceon cat >frequencies.sps <<'_ATEOF' data list notable list /d4 *. begin data. 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 2 0 end data. FREQUENCIES /VARIABLES = d4 /FORMAT=AVALUE TABLE /HISTOGRAM=NORMAL . _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:626: pspp frequencies.sps" at_fn_check_prepare_trace "frequencies.at:626" ( $at_check_trace; pspp frequencies.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:626" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_536 #AT_START_537 at_fn_group_banner 537 'frequencies.at:630' \ "FREQUENCIES median" " " 77 at_xfail=no ( $as_echo "537. $at_setup_line: testing $at_desc ..." $at_traceon cat >median.sps <<'_ATEOF' data list notable list /x *. begin data. 1 2 3000000 end data. FREQUENCIES /VARIABLES = x /STATISTICS = MEDIAN . _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:645: pspp median.sps -O format=csv" at_fn_check_prepare_trace "frequencies.at:645" ( $at_check_trace; pspp median.sps -O format=csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,33.33,33.33,33.33 ,2.00,1,33.33,33.33,66.67 ,3000000.00,1,33.33,33.33,100.00 Total,,3,100.0,100.0, Table: x N,Valid,3 ,Missing,0 Percentiles,50 (Median),2.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:645" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_537 #AT_START_538 at_fn_group_banner 538 'frequencies.at:660' \ "FREQUENCIES variance" " " 77 at_xfail=no ( $as_echo "538. $at_setup_line: testing $at_desc ..." $at_traceon cat >variance.sps <<'_ATEOF' data list notable list /forename (A12) height. begin data. Ahmed 188 bertram 167 Catherine 134 David 109 end data. FREQUENCIES /VARIABLES = height /STATISTICS = VARIANCE. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:675: pspp variance.sps -O format=csv" at_fn_check_prepare_trace "frequencies.at:675" ( $at_check_trace; pspp variance.sps -O format=csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: height Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,109.00,1,25.00,25.00,25.00 ,134.00,1,25.00,25.00,50.00 ,167.00,1,25.00,25.00,75.00 ,188.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, Table: height N,Valid,4 ,Missing,0 Variance,,1223.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:675" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_538 #AT_START_539 at_fn_group_banner 539 'frequencies.at:691' \ "FREQUENCIES default statistics" " " 77 at_xfail=no ( $as_echo "539. $at_setup_line: testing $at_desc ..." $at_traceon cat >median.sps <<'_ATEOF' data list notable list /x *. begin data. 10 20 3000000 end data. FREQUENCIES /VARIABLES = x /STATISTICS . FREQUENCIES /VARIABLES = x /STATISTICS = DEFAULT . _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:711: pspp median.sps -O format=csv" at_fn_check_prepare_trace "frequencies.at:711" ( $at_check_trace; pspp median.sps -O format=csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,10.00,1,33.33,33.33,33.33 ,20.00,1,33.33,33.33,66.67 ,3000000.00,1,33.33,33.33,100.00 Total,,3,100.0,100.0, Table: x N,Valid,3 ,Missing,0 Mean,,1000010.00 Std Dev,,1732042.15 Minimum,,10.00 Maximum,,3000000.00 Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,10.00,1,33.33,33.33,33.33 ,20.00,1,33.33,33.33,66.67 ,3000000.00,1,33.33,33.33,100.00 Total,,3,100.0,100.0, Table: x N,Valid,3 ,Missing,0 Mean,,1000010.00 Std Dev,,1732042.15 Minimum,,10.00 Maximum,,3000000.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:711" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_539 #AT_START_540 at_fn_group_banner 540 'frequencies.at:746' \ "FREQUENCIES no valid data" " " 77 at_xfail=no ( $as_echo "540. $at_setup_line: testing $at_desc ..." $at_traceon cat >empty.sps <<'_ATEOF' data list notable list /x *. begin data. . . . end data. FREQUENCIES /VARIABLES = x /STATISTICS = ALL . _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:761: pspp empty.sps -O format=csv" at_fn_check_prepare_trace "frequencies.at:761" ( $at_check_trace; pspp empty.sps -O format=csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,. ,3,100.00,Missing, Total,,3,100.0,100.0, Table: x N,Valid,0 ,Missing,3 Mean,,. S.E. Mean,,. Mode,,. Std Dev,,. Variance,,. Kurtosis,,. S.E. Kurt,,. Skewness,,. S.E. Skew,,. Range,,. Minimum,,. Maximum,,. Sum,,. Percentiles,,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:761" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_540 #AT_START_541 at_fn_group_banner 541 'frequencies.at:789' \ "FREQUENCIES histogram no valid cases" " " 77 at_xfail=no ( $as_echo "541. $at_setup_line: testing $at_desc ..." $at_traceon cat >empty.sps <<'_ATEOF' data list notable list /x w *. begin data. 1 . 2 . 3 . end data. weight by w. FREQUENCIES /VARIABLES = x /histogram . _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:806: pspp empty.sps -O format=csv" at_fn_check_prepare_trace "frequencies.at:806" ( $at_check_trace; pspp empty.sps -O format=csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:806" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_541 #AT_START_542 at_fn_group_banner 542 'frequencies.at:810' \ "FREQUENCIES percentiles + histogram bug#48128" " " 77 at_xfail=no ( $as_echo "542. $at_setup_line: testing $at_desc ..." $at_traceon cat >bug.sps <<'_ATEOF' SET FORMAT=F8.0. INPUT PROGRAM. LOOP I=1 TO 10. COMPUTE SCORE=EXP(NORMAL(1)). END CASE. END LOOP. END FILE. END INPUT PROGRAM. FREQUENCIES VARIABLES=SCORE /FORMAT=NOTABLE /STATISTICS=ALL /PERCENTILES=1 10 20 30 40 50 60 70 80 90 99 /HISTOGRAM. _ATEOF { set +x $as_echo "$at_srcdir/frequencies.at:830: pspp bug.sps" at_fn_check_prepare_trace "frequencies.at:830" ( $at_check_trace; pspp bug.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/frequencies.at:830" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_542 #AT_START_543 at_fn_group_banner 543 'glm.at:19' \ "GLM latin square design" " " 78 at_xfail=no ( $as_echo "543. $at_setup_line: testing $at_desc ..." $at_traceon cat >latin.sps <<'_ATEOF' set format = F20.3. data list notable fixed /a 1 b 3 c 5 y 7-10(2). begin data. 1 1 6 3.5 1 2 2 8.9 1 3 3 9.6 1 4 4 10.5 1 5 5 3.1 1 6 1 5.9 2 1 2 4.2 2 2 6 1.9 2 3 5 3.7 2 4 3 10.2 2 5 1 7.2 2 6 4 7.6 3 1 1 6.7 3 2 4 5.8 3 3 6 -2.7 3 4 2 4.6 3 5 3 4.0 3 6 5 -0.7 4 1 4 6.6 4 2 1 4.5 4 3 2 3.7 4 4 5 3.7 4 5 6 -3.3 4 6 3 3.0 5 1 3 4.1 5 2 5 2.4 5 3 4 6.0 5 4 1 5.1 5 5 2 3.5 5 6 6 4.0 6 1 5 3.8 6 2 3 5.8 6 3 1 7.0 6 4 6 3.8 6 5 4 5.0 6 6 2 8.6 end data. variable labels a 'Factor A' b 'Factor B' c 'Factor C' y 'Criterion'. glm y by b a c /intercept=include /criteria=alpha(.05) /design = a b c . _ATEOF { set +x $as_echo "$at_srcdir/glm.at:74: pspp -O format=csv latin.sps | sed 's/329.62[678]/329.62/'" at_fn_check_prepare_notrace 'a shell pipeline' "glm.at:74" ( $at_check_trace; pspp -O format=csv latin.sps | sed 's/329.62[678]/329.62/' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,263.064,15,17.538,5.269,.000 Intercept,815.103,1,815.103,244.910,.000 Factor A,78.869,5,15.774,4.739,.005 Factor B,28.599,5,5.720,1.719,.176 Factor C,155.596,5,31.119,9.350,.000 Error,66.563,20,3.328,, Total,1144.730,36,,, Corrected Total,329.62,35,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/glm.at:74" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_543 #AT_START_544 at_fn_group_banner 544 'glm.at:90' \ "GLM 2 by 2 factorial design" " " 78 at_xfail=no ( $as_echo "544. $at_setup_line: testing $at_desc ..." $at_traceon cat >2by2.sps <<'_ATEOF' set format = F20.3. data list notable list /Factor0 * Factor1 * points (F10). begin data. 1 4 332 1 4 380 1 4 371 1 4 366 1 4 354 1 0 259.5 1 0 302.5 1 0 296 1 0 349 1 0 309 2 4 354.67 2 4 353.5 2 4 304 2 4 365 2 4 339 2 0 306 2 0 339 2 0 353 2 0 351 2 0 333 end data. glm points by Factor0 Factor1 /intercept=include /criteria=alpha(.05) . _ATEOF { set +x $as_echo "$at_srcdir/glm.at:125: pspp -O format=csv 2by2.sps " at_fn_check_prepare_trace "glm.at:125" ( $at_check_trace; pspp -O format=csv 2by2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,8667.053,3,2889.018,5.043,.012 Intercept,2256018.640,1,2256018.640,3937.693,.000 Factor0,313.394,1,313.394,.547,.470 Factor1,5157.508,1,5157.508,9.002,.008 Factor0 * Factor1,3196.150,1,3196.150,5.579,.031 Error,9166.865,16,572.929,, Total,2273852.559,20,,, Corrected Total,17833.918,19,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/glm.at:125" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_544 #AT_START_545 at_fn_group_banner 545 'glm.at:142' \ "GLM Type I and II Sums of Squares" " " 78 at_xfail=no ( $as_echo "545. $at_setup_line: testing $at_desc ..." $at_traceon cat >data-inc.sps <<'_ATEOF' set decimal = dot. set format=F20.3. data list notable list /dv * Agrp * B0 * B1 * B2 * i0 * i1 * i2 * sss *. begin data. 5 1 1 0 0 1 0 0 1.00 7 1 1 0 0 1 0 0 1.00 9 1 1 0 0 1 0 0 1.00 8 1 1 0 0 1 0 0 1.00 2 1 0 1 0 0 1 0 1.00 5 1 0 1 0 0 1 0 1.00 7 1 0 1 0 0 1 0 1.00 3 1 0 1 0 0 1 0 1.00 9 1 0 1 0 0 1 0 1.00 8 1 0 0 1 0 0 1 1.00 11 1 0 0 1 0 0 1 1.00 12 1 0 0 1 0 0 1 1.00 14 1 0 0 1 0 0 1 1.00 11 1 -1 -1 -1 -1 -1 -1 1.00 15 1 -1 -1 -1 -1 -1 -1 1.00 16 1 -1 -1 -1 -1 -1 -1 1.00 10 1 -1 -1 -1 -1 -1 -1 1.00 9 1 -1 -1 -1 -1 -1 -1 1.00 7 -1 1 0 0 -1 0 0 2.00 9 -1 1 0 0 -1 0 0 2.00 10 -1 1 0 0 -1 0 0 2.00 9 -1 1 0 0 -1 0 0 2.00 3 -1 0 1 0 0 -1 0 2.00 8 -1 0 1 0 0 -1 0 2.00 9 -1 0 1 0 0 -1 0 2.00 11 -1 0 1 0 0 -1 0 2.00 9 -1 0 0 1 0 0 -1 2.00 12 -1 0 0 1 0 0 -1 2.00 14 -1 0 0 1 0 0 -1 2.00 8 -1 0 0 1 0 0 -1 2.00 7 -1 0 0 1 0 0 -1 2.00 11 -1 -1 -1 -1 1 1 1 2.00 14 -1 -1 -1 -1 1 1 1 2.00 10 -1 -1 -1 -1 1 1 1 2.00 12 -1 -1 -1 -1 1 1 1 2.00 13 -1 -1 -1 -1 1 1 1 2.00 11 -1 -1 -1 -1 1 1 1 2.00 12 -1 -1 -1 -1 1 1 1 2.00 end data. do if B0 = -1 AND B1 = -1 AND B2 = -1. compute Bgrp = 4. end if. do if B0 = 0 AND B1 = 0 AND B2 = 1. compute Bgrp = 3. end if. do if B0 = 0 AND B1 = 1 AND B2 = 0. compute Bgrp = 2. end if. do if B0 = 1 AND B1 = 0 AND B2 = 0. compute Bgrp = 1. end if. _ATEOF cat >type1.sps <<'_ATEOF' include 'data-inc.sps'. glm dv by Agrp Bgrp /method = sstype (1) . glm dv by Agrp Bgrp /method = sstype (1) /design Bgrp Agrp Bgrp * Agrp . _ATEOF { set +x $as_echo "$at_srcdir/glm.at:222: pspp -O format=csv type1.sps" at_fn_check_prepare_trace "glm.at:222" ( $at_check_trace; pspp -O format=csv type1.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Tests of Between-Subjects Effects Source,Type I Sum of Squares,df,Mean Square,F,Sig. Corrected Model,216.017,7,30.860,5.046,.001 Intercept,,,,, Agrp,9.579,1,9.579,1.566,.220 Bgrp,186.225,3,62.075,10.151,.000 Agrp * Bgrp,20.212,3,6.737,1.102,.364 Error,183.457,30,6.115,, Total,3810.000,38,,, Corrected Total,399.474,37,,, Table: Tests of Between-Subjects Effects Source,Type I Sum of Squares,df,Mean Square,F,Sig. Corrected Model,216.017,7,30.860,5.046,.001 Intercept,,,,, Bgrp,193.251,3,64.417,10.534,.000 Agrp,2.553,1,2.553,.418,.523 Bgrp * Agrp,20.212,3,6.737,1.102,.364 Error,183.457,30,6.115,, Total,3810.000,38,,, Corrected Total,399.474,37,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/glm.at:222" $at_failed && at_fn_log_failure $at_traceon; } cat >type2.sps <<'_ATEOF' include 'data-inc.sps'. glm dv by Agrp Bgrp /method = sstype (2) . _ATEOF { set +x $as_echo "$at_srcdir/glm.at:257: pspp -O format=csv type2.sps" at_fn_check_prepare_trace "glm.at:257" ( $at_check_trace; pspp -O format=csv type2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Tests of Between-Subjects Effects Source,Type II Sum of Squares,df,Mean Square,F,Sig. Corrected Model,216.017,7,30.860,5.046,.001 Intercept,,,,, Agrp,2.553,1,2.553,.418,.523 Bgrp,186.225,3,62.075,10.151,.000 Agrp * Bgrp,20.212,3,6.737,1.102,.364 Error,183.457,30,6.115,, Total,3810.000,38,,, Corrected Total,399.474,37,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/glm.at:257" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_545 #AT_START_546 at_fn_group_banner 546 'glm.at:275' \ "GLM excluded intercept" " " 78 at_xfail=no ( $as_echo "546. $at_setup_line: testing $at_desc ..." $at_traceon cat >intercept-exclude.sps <<'_ATEOF' set format = F20.3. data list notable list /depvar * A *. begin data. 10 1 14 1 8 1 7 1 2 1 10 1 1 1 3 1 2 1 8.5 1 14.29 2 18.49 2 12.46 2 11.63 2 6.66 2 14.02 2 5.66 2 7.06 2 6.37 2 13.26 2 end data. GLM depvar by A /intercept = exclude . GLM depvar by A /intercept = include . _ATEOF { set +x $as_echo "$at_srcdir/glm.at:324: pspp -O format=csv intercept-exclude.sps" at_fn_check_prepare_trace "glm.at:324" ( $at_check_trace; pspp -O format=csv intercept-exclude.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Model,1636.826,2,818.413,43.556,.000 A,1636.826,2,818.413,43.556,.000 Error,338.216,18,18.790,, Total,1975.042,20,,, Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,98.568,1,98.568,5.246,.034 Intercept,1538.258,1,1538.258,81.867,.000 A,98.568,1,98.568,5.246,.034 Error,338.216,18,18.790,, Total,1975.042,20,,, Corrected Total,436.784,19,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/glm.at:324" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_546 #AT_START_547 at_fn_group_banner 547 'glm.at:346' \ "GLM missing values" " " 78 at_xfail=no ( $as_echo "547. $at_setup_line: testing $at_desc ..." $at_traceon cat >glm.data <<'_ATEOF' 1 1 6 3.5 1 2 2 8.9 1 3 3 9.6 1 4 4 10.5 1 5 5 3.1 1 6 1 5.9 2 1 2 4.2 2 2 6 1.9 2 3 5 3.7 2 4 3 10.2 2 5 1 7.2 2 6 4 7.6 3 1 1 6.7 3 2 4 5.8 3 3 6 -2.7 3 4 2 4.6 3 5 3 4.0 3 6 5 -0.7 4 1 4 6.6 4 2 1 4.5 4 3 2 3.7 4 4 5 3.7 4 5 6 -3.3 4 6 3 3.0 5 1 3 4.1 5 2 5 2.4 5 3 4 6.0 5 4 1 5.1 5 5 2 3.5 5 6 6 4.0 6 1 5 3.8 6 2 3 5.8 6 3 1 7.0 6 4 6 3.8 6 5 4 5.0 6 6 2 8.6 _ATEOF cat >glm-miss.sps <<'_ATEOF' set format = F20.3. data list file='glm.data' notable fixed /a 1 b 3 c 5 y 7-10(2). do if a=6. recode y (else=SYSMIS). end if. glm y by b a c /criteria=alpha(.05) /design = a b c . _ATEOF { set +x $as_echo "$at_srcdir/glm.at:401: pspp -O format=csv glm-miss.sps" at_fn_check_prepare_trace "glm.at:401" ( $at_check_trace; pspp -O format=csv glm-miss.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,251.621,14,17.973,4.969,.002 Intercept,628.376,1,628.376,173.737,.000 a,72.929,4,18.232,5.041,.009 b,20.703,5,4.141,1.145,.380 c,135.179,5,27.036,7.475,.001 Error,54.253,15,3.617,, Total,934.250,30,,, Corrected Total,305.874,29,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/glm.at:401" $at_failed && at_fn_log_failure $at_traceon; } cat >glm-miss2.sps <<'_ATEOF' set format = F20.3. data list file='glm.data' notable fixed /a 1 b 3 c 5 y 7-10(2). select if a <> 6. glm y by b a c /criteria=alpha(.05) /design = a b c . _ATEOF { set +x $as_echo "$at_srcdir/glm.at:428: pspp -O format=csv glm-miss2.sps" at_fn_check_prepare_trace "glm.at:428" ( $at_check_trace; pspp -O format=csv glm-miss2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,251.621,14,17.973,4.969,.002 Intercept,628.376,1,628.376,173.737,.000 a,72.929,4,18.232,5.041,.009 b,20.703,5,4.141,1.145,.380 c,135.179,5,27.036,7.475,.001 Error,54.253,15,3.617,, Total,934.250,30,,, Corrected Total,305.874,29,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/glm.at:428" $at_failed && at_fn_log_failure $at_traceon; } cat >glm-miss3.sps <<'_ATEOF' set format = F20.3. data list file=glm.data notable fixed /a 1 b 3 c 5 y 7-10(2). do if a=6. recode a (else=SYSMIS). end if. glm y by b a c /criteria=alpha(.05) /design = a b c . _ATEOF { set +x $as_echo "$at_srcdir/glm.at:458: pspp -O format=csv glm-miss3.sps" at_fn_check_prepare_trace "glm.at:458" ( $at_check_trace; pspp -O format=csv glm-miss3.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,251.621,14,17.973,4.969,.002 Intercept,628.376,1,628.376,173.737,.000 a,72.929,4,18.232,5.041,.009 b,20.703,5,4.141,1.145,.380 c,135.179,5,27.036,7.475,.001 Error,54.253,15,3.617,, Total,934.250,30,,, Corrected Total,305.874,29,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/glm.at:458" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_547 #AT_START_548 at_fn_group_banner 548 'logistic.at:97' \ "LOGISTIC REGRESSION basic test" " " 79 at_xfail=no ( $as_echo "548. $at_setup_line: testing $at_desc ..." $at_traceon cat >lr-data.txt <<'_ATEOF' 105.00 1.00 33.00 3.00 2.00 .35 17.00 20.00 .50110 -2.00440 1 106.00 1.00 50.00 2.00 3.00 .38 7.00 15.00 .20168 -1.25264 1 107.00 1.00 91.00 3.00 2.00 .28 15.00 7.00 .00897 -1.00905 1 108.00 1.00 90.00 3.00 2.00 .20 2.00 2.00 .00972 -1.00982 1 109.00 1.00 70.00 3.00 3.00 .38 23.00 27.00 .04745 -1.04981 1 111.00 2.00 31.00 2.00 2.00 .00 19.00 10.00 .54159 1.84640 1 112.00 1.00 91.00 2.00 3.00 .18 6.00 16.00 .00897 -1.00905 1 113.00 1.00 81.00 3.00 2.00 .00 3.00 9.00 .01998 -1.02039 1 114.00 2.00 15.00 1.00 2.00 .13 19.00 13.00 .81241 1.23090 1 116.00 2.00 1.00 1.00 2.00 .88 15.00 7.00 .93102 1.07410 1 117.00 1.00 93.00 3.00 2.00 .18 9.00 15.00 .00764 -1.00770 1 118.00 2.00 14.00 1.00 3.00 .15 23.00 18.00 .82447 1.21289 1 120.00 1.00 91.00 2.00 2.00 .43 17.00 14.00 .00897 -1.00905 1 121.00 1.00 55.00 3.00 2.00 .69 20.00 14.00 .14409 -1.16834 1 122.00 1.00 70.00 2.00 3.00 .03 .00 6.00 .04745 -1.04981 1 123.00 1.00 25.00 2.00 2.00 .45 4.00 10.00 .65789 -2.92301 1 125.00 1.00 91.00 2.00 2.00 .13 .00 3.00 .00897 -1.00905 1 126.00 1.00 91.00 3.00 3.00 .23 4.00 6.00 .00897 -1.00905 1 127.00 1.00 91.00 3.00 2.00 .00 8.00 8.00 .00897 -1.00905 1 128.00 2.00 13.00 2.00 2.00 .65 16.00 14.00 .83592 1.19629 1 129.00 1.00 50.00 2.00 2.00 .25 20.00 23.00 .20168 -1.25264 1 135.00 1.00 90.00 3.00 3.00 .03 5.00 12.00 .00972 -1.00982 1 138.00 1.00 70.00 3.00 3.00 .10 1.00 6.00 .04745 -1.04981 1 139.00 2.00 19.00 3.00 3.00 .10 11.00 12.00 .75787 1.31949 1 149.00 2.00 50.00 3.00 2.00 .03 .00 .00 .20168 4.95826 1 204.00 1.00 50.00 3.00 1.00 .13 .00 1.00 .20168 -1.25264 1 205.00 1.00 91.00 3.00 3.00 .72 16.00 18.00 .00897 -1.00905 1 206.00 2.00 24.00 1.00 1.00 .10 5.00 21.00 .67592 1.47947 1 207.00 1.00 80.00 3.00 3.00 .13 6.00 7.00 .02164 -1.02212 1 208.00 1.00 87.00 2.00 2.00 .18 9.00 20.00 .01237 -1.01253 1 209.00 1.00 70.00 2.00 2.00 .53 15.00 12.00 .04745 -1.04981 1 211.00 1.00 55.00 2.00 1.00 .33 8.00 5.00 .14409 -1.16834 1 212.00 1.00 56.00 3.00 1.00 .30 6.00 20.00 .13436 -1.15522 1 214.00 1.00 54.00 2.00 2.00 .15 .00 16.00 .15439 -1.18258 1 215.00 1.00 71.00 3.00 3.00 .35 12.00 12.00 .04391 -1.04592 1 217.00 2.00 36.00 1.00 1.00 .10 12.00 8.00 .44049 2.27020 1 218.00 1.00 91.00 2.00 2.00 .05 11.00 25.00 .00897 -1.00905 1 219.00 1.00 91.00 2.00 2.00 1.23 11.00 24.00 .00897 -1.00905 1 220.00 1.00 91.00 2.00 3.00 .08 8.00 11.00 .00897 -1.00905 1 221.00 1.00 91.00 2.00 2.00 .33 5.00 11.00 .00897 -1.00905 1 222.00 2.00 36.00 2.00 1.00 .18 5.00 3.00 .44049 2.27020 1 223.00 1.00 70.00 2.00 3.00 .18 14.00 3.00 .04745 -1.04981 1 224.00 1.00 91.00 2.00 2.00 .43 2.00 10.00 .00897 -1.00905 1 225.00 1.00 55.00 2.00 1.00 .18 6.00 11.00 .14409 -1.16834 1 229.00 2.00 75.00 2.00 2.00 .40 30.00 25.00 .03212 31.12941 1 232.00 1.00 91.00 3.00 2.00 .15 6.00 3.00 .00897 -1.00905 1 233.00 1.00 70.00 2.00 1.00 .00 11.00 8.00 .04745 -1.04981 1 234.00 1.00 54.00 3.00 2.00 .10 .00 .00 .15439 -1.18258 1 237.00 1.00 70.00 3.00 2.00 .18 5.00 25.00 .04745 -1.04981 1 241.00 1.00 19.00 2.00 3.00 .33 13.00 9.00 .75787 -4.12995 1 304.00 2.00 18.00 2.00 2.00 .26 25.00 6.00 .77245 1.29458 1 305.00 1.00 88.00 3.00 2.00 1.35 17.00 29.00 .01142 -1.01155 1 306.00 1.00 70.00 2.00 3.00 .63 14.00 33.00 .04745 -1.04981 1 307.00 1.00 85.00 2.00 2.00 2.65 18.00 14.00 .01452 -1.01474 1 308.00 1.00 13.00 2.00 2.00 .23 5.00 5.00 .83592 -6.09442 1 309.00 2.00 13.00 2.00 2.00 .23 7.00 17.00 .83592 1.19629 1 311.00 2.00 1.00 2.00 2.00 .50 20.00 14.00 .93102 1.07410 1 315.00 1.00 19.00 2.00 3.00 .18 1.00 11.00 .75787 -4.12995 1 316.00 1.00 88.00 2.00 2.00 .38 12.00 11.00 .01142 -1.01155 2 318.00 1.00 88.00 3.00 2.00 .03 5.00 5.00 .01142 -1.01155 3 319.00 2.00 18.00 2.00 3.00 .30 15.00 16.00 .77245 1.29458 1 321.00 2.00 15.00 2.00 2.00 .63 15.00 18.00 .81241 1.23090 1 322.00 1.00 88.00 3.00 2.00 .40 18.00 15.00 .01142 -1.01155 1 325.00 2.00 18.00 2.00 3.00 1.00 28.00 18.00 .77245 1.29458 1 329.00 1.00 88.00 3.00 2.00 .03 7.00 11.00 .01142 -1.01155 4 332.00 2.00 2.00 2.00 2.00 .05 8.00 9.00 .92562 1.08036 1 _ATEOF cat >lr-data.sps <<'_ATEOF' set format = F12.3. set decimal dot. data list notable file='lr-data.txt' list /id outcome survrate prognos amttreat gsi avoid intrus pre_1 lre_1 w *. logistic regression variables = outcome with survrate . _ATEOF { set +x $as_echo "$at_srcdir/logistic.at:112: pspp -O format=csv lr-data.sps" at_fn_check_prepare_trace "logistic.at:112" ( $at_check_trace; pspp -O format=csv lr-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Dependent Variable Encoding Original Value,Internal Value 1.000,0 2.000,1 Table: Case Processing Summary Unweighted Cases,N,Percent Included in Analysis,66,100.000 Missing Cases,0,.000 Total,66,100.000 note: Estimation terminated at iteration number 6 because parameter estimates changed by less than 0.001 Table: Model Summary Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square ,37.323,.455,.659 Table: Classification Table ,,,Predicted,, ,,,outcome,,\"Percentage Correct\" ,Observed,,1.000,2.000, Step 1,outcome,1.000,43,5,89.583 ,,2.000,4,14,77.778 ,Overall Percentage,,,,86.364 Table: Variables in the Equation ,,B,S.E.,Wald,df,Sig.,Exp(B) Step 1,survrate,-.081,.019,17.756,1,.000,.922 ,Constant,2.684,.811,10.941,1,.001,14.639 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:112" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_548 #AT_START_549 at_fn_group_banner 549 'logistic.at:149' \ "LOGISTIC REGRESSION missing values" " " 79 at_xfail=no ( $as_echo "549. $at_setup_line: testing $at_desc ..." $at_traceon cat >lr-data.txt <<'_ATEOF' 105.00 1.00 33.00 3.00 2.00 .35 17.00 20.00 .50110 -2.00440 1 106.00 1.00 50.00 2.00 3.00 .38 7.00 15.00 .20168 -1.25264 1 107.00 1.00 91.00 3.00 2.00 .28 15.00 7.00 .00897 -1.00905 1 108.00 1.00 90.00 3.00 2.00 .20 2.00 2.00 .00972 -1.00982 1 109.00 1.00 70.00 3.00 3.00 .38 23.00 27.00 .04745 -1.04981 1 111.00 2.00 31.00 2.00 2.00 .00 19.00 10.00 .54159 1.84640 1 112.00 1.00 91.00 2.00 3.00 .18 6.00 16.00 .00897 -1.00905 1 113.00 1.00 81.00 3.00 2.00 .00 3.00 9.00 .01998 -1.02039 1 114.00 2.00 15.00 1.00 2.00 .13 19.00 13.00 .81241 1.23090 1 116.00 2.00 1.00 1.00 2.00 .88 15.00 7.00 .93102 1.07410 1 117.00 1.00 93.00 3.00 2.00 .18 9.00 15.00 .00764 -1.00770 1 118.00 2.00 14.00 1.00 3.00 .15 23.00 18.00 .82447 1.21289 1 120.00 1.00 91.00 2.00 2.00 .43 17.00 14.00 .00897 -1.00905 1 121.00 1.00 55.00 3.00 2.00 .69 20.00 14.00 .14409 -1.16834 1 122.00 1.00 70.00 2.00 3.00 .03 .00 6.00 .04745 -1.04981 1 123.00 1.00 25.00 2.00 2.00 .45 4.00 10.00 .65789 -2.92301 1 125.00 1.00 91.00 2.00 2.00 .13 .00 3.00 .00897 -1.00905 1 126.00 1.00 91.00 3.00 3.00 .23 4.00 6.00 .00897 -1.00905 1 127.00 1.00 91.00 3.00 2.00 .00 8.00 8.00 .00897 -1.00905 1 128.00 2.00 13.00 2.00 2.00 .65 16.00 14.00 .83592 1.19629 1 129.00 1.00 50.00 2.00 2.00 .25 20.00 23.00 .20168 -1.25264 1 135.00 1.00 90.00 3.00 3.00 .03 5.00 12.00 .00972 -1.00982 1 138.00 1.00 70.00 3.00 3.00 .10 1.00 6.00 .04745 -1.04981 1 139.00 2.00 19.00 3.00 3.00 .10 11.00 12.00 .75787 1.31949 1 149.00 2.00 50.00 3.00 2.00 .03 .00 .00 .20168 4.95826 1 204.00 1.00 50.00 3.00 1.00 .13 .00 1.00 .20168 -1.25264 1 205.00 1.00 91.00 3.00 3.00 .72 16.00 18.00 .00897 -1.00905 1 206.00 2.00 24.00 1.00 1.00 .10 5.00 21.00 .67592 1.47947 1 207.00 1.00 80.00 3.00 3.00 .13 6.00 7.00 .02164 -1.02212 1 208.00 1.00 87.00 2.00 2.00 .18 9.00 20.00 .01237 -1.01253 1 209.00 1.00 70.00 2.00 2.00 .53 15.00 12.00 .04745 -1.04981 1 211.00 1.00 55.00 2.00 1.00 .33 8.00 5.00 .14409 -1.16834 1 212.00 1.00 56.00 3.00 1.00 .30 6.00 20.00 .13436 -1.15522 1 214.00 1.00 54.00 2.00 2.00 .15 .00 16.00 .15439 -1.18258 1 215.00 1.00 71.00 3.00 3.00 .35 12.00 12.00 .04391 -1.04592 1 217.00 2.00 36.00 1.00 1.00 .10 12.00 8.00 .44049 2.27020 1 218.00 1.00 91.00 2.00 2.00 .05 11.00 25.00 .00897 -1.00905 1 219.00 1.00 91.00 2.00 2.00 1.23 11.00 24.00 .00897 -1.00905 1 220.00 1.00 91.00 2.00 3.00 .08 8.00 11.00 .00897 -1.00905 1 221.00 1.00 91.00 2.00 2.00 .33 5.00 11.00 .00897 -1.00905 1 222.00 2.00 36.00 2.00 1.00 .18 5.00 3.00 .44049 2.27020 1 223.00 1.00 70.00 2.00 3.00 .18 14.00 3.00 .04745 -1.04981 1 224.00 1.00 91.00 2.00 2.00 .43 2.00 10.00 .00897 -1.00905 1 225.00 1.00 55.00 2.00 1.00 .18 6.00 11.00 .14409 -1.16834 1 229.00 2.00 75.00 2.00 2.00 .40 30.00 25.00 .03212 31.12941 1 232.00 1.00 91.00 3.00 2.00 .15 6.00 3.00 .00897 -1.00905 1 233.00 1.00 70.00 2.00 1.00 .00 11.00 8.00 .04745 -1.04981 1 234.00 1.00 54.00 3.00 2.00 .10 .00 .00 .15439 -1.18258 1 237.00 1.00 70.00 3.00 2.00 .18 5.00 25.00 .04745 -1.04981 1 241.00 1.00 19.00 2.00 3.00 .33 13.00 9.00 .75787 -4.12995 1 304.00 2.00 18.00 2.00 2.00 .26 25.00 6.00 .77245 1.29458 1 305.00 1.00 88.00 3.00 2.00 1.35 17.00 29.00 .01142 -1.01155 1 306.00 1.00 70.00 2.00 3.00 .63 14.00 33.00 .04745 -1.04981 1 307.00 1.00 85.00 2.00 2.00 2.65 18.00 14.00 .01452 -1.01474 1 308.00 1.00 13.00 2.00 2.00 .23 5.00 5.00 .83592 -6.09442 1 309.00 2.00 13.00 2.00 2.00 .23 7.00 17.00 .83592 1.19629 1 311.00 2.00 1.00 2.00 2.00 .50 20.00 14.00 .93102 1.07410 1 315.00 1.00 19.00 2.00 3.00 .18 1.00 11.00 .75787 -4.12995 1 316.00 1.00 88.00 2.00 2.00 .38 12.00 11.00 .01142 -1.01155 2 318.00 1.00 88.00 3.00 2.00 .03 5.00 5.00 .01142 -1.01155 3 319.00 2.00 18.00 2.00 3.00 .30 15.00 16.00 .77245 1.29458 1 321.00 2.00 15.00 2.00 2.00 .63 15.00 18.00 .81241 1.23090 1 322.00 1.00 88.00 3.00 2.00 .40 18.00 15.00 .01142 -1.01155 1 325.00 2.00 18.00 2.00 3.00 1.00 28.00 18.00 .77245 1.29458 1 329.00 1.00 88.00 3.00 2.00 .03 7.00 11.00 .01142 -1.01155 4 332.00 2.00 2.00 2.00 2.00 .05 8.00 9.00 .92562 1.08036 1 _ATEOF cat >lr-data.sps <<'_ATEOF' set format = F12.3. set decimal dot. data list notable file='lr-data.txt' list /id outcome survrate prognos amttreat gsi avoid intrus pre_1 lre_1 w *. missing values survrate (999) avoid (44444) outcome (99). logistic regression variables = outcome with survrate avoid . _ATEOF { set +x $as_echo "$at_srcdir/logistic.at:166: pspp -O format=csv lr-data.sps > run0" at_fn_check_prepare_trace "logistic.at:166" ( $at_check_trace; pspp -O format=csv lr-data.sps > run0 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:166" $at_failed && at_fn_log_failure $at_traceon; } cat >> lr-data.txt << HERE 105.00 1.00 999.00 3.00 2.00 .35 17.00 20.00 .50110 -2.00440 1 106.00 1.00 999.00 2.00 3.00 .38 7.00 15.00 .20168 -1.25264 1 107.00 1.00 5.00 3.00 2.00 .28 44444 34 .00897 -1.00905 1 108.00 99 5.00 3.00 2.00 .28 4 34 .00897 -1.00905 1 HERE { set +x $as_echo "$at_srcdir/logistic.at:176: pspp -O format=csv lr-data.sps > run1" at_fn_check_prepare_trace "logistic.at:176" ( $at_check_trace; pspp -O format=csv lr-data.sps > run1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:176" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/logistic.at:179: diff run0 run1" at_fn_check_prepare_trace "logistic.at:179" ( $at_check_trace; diff run0 run1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "8,10c8,10 < Included in Analysis,66,100.000 < Missing Cases,0,.000 < Total,66,100.000 --- > Included in Analysis,66,94.286 > Missing Cases,4,5.714 > Total,70,100.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/logistic.at:179" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_549 #AT_START_550 at_fn_group_banner 550 'logistic.at:197' \ "LOGISTIC REGRESSION weights" " " 79 at_xfail=no ( $as_echo "550. $at_setup_line: testing $at_desc ..." $at_traceon cat >lr-data.txt <<'_ATEOF' 105.00 1.00 33.00 3.00 2.00 .35 17.00 20.00 .50110 -2.00440 1 106.00 1.00 50.00 2.00 3.00 .38 7.00 15.00 .20168 -1.25264 1 107.00 1.00 91.00 3.00 2.00 .28 15.00 7.00 .00897 -1.00905 1 108.00 1.00 90.00 3.00 2.00 .20 2.00 2.00 .00972 -1.00982 1 109.00 1.00 70.00 3.00 3.00 .38 23.00 27.00 .04745 -1.04981 1 111.00 2.00 31.00 2.00 2.00 .00 19.00 10.00 .54159 1.84640 1 112.00 1.00 91.00 2.00 3.00 .18 6.00 16.00 .00897 -1.00905 1 113.00 1.00 81.00 3.00 2.00 .00 3.00 9.00 .01998 -1.02039 1 114.00 2.00 15.00 1.00 2.00 .13 19.00 13.00 .81241 1.23090 1 116.00 2.00 1.00 1.00 2.00 .88 15.00 7.00 .93102 1.07410 1 117.00 1.00 93.00 3.00 2.00 .18 9.00 15.00 .00764 -1.00770 1 118.00 2.00 14.00 1.00 3.00 .15 23.00 18.00 .82447 1.21289 1 120.00 1.00 91.00 2.00 2.00 .43 17.00 14.00 .00897 -1.00905 1 121.00 1.00 55.00 3.00 2.00 .69 20.00 14.00 .14409 -1.16834 1 122.00 1.00 70.00 2.00 3.00 .03 .00 6.00 .04745 -1.04981 1 123.00 1.00 25.00 2.00 2.00 .45 4.00 10.00 .65789 -2.92301 1 125.00 1.00 91.00 2.00 2.00 .13 .00 3.00 .00897 -1.00905 1 126.00 1.00 91.00 3.00 3.00 .23 4.00 6.00 .00897 -1.00905 1 127.00 1.00 91.00 3.00 2.00 .00 8.00 8.00 .00897 -1.00905 1 128.00 2.00 13.00 2.00 2.00 .65 16.00 14.00 .83592 1.19629 1 129.00 1.00 50.00 2.00 2.00 .25 20.00 23.00 .20168 -1.25264 1 135.00 1.00 90.00 3.00 3.00 .03 5.00 12.00 .00972 -1.00982 1 138.00 1.00 70.00 3.00 3.00 .10 1.00 6.00 .04745 -1.04981 1 139.00 2.00 19.00 3.00 3.00 .10 11.00 12.00 .75787 1.31949 1 149.00 2.00 50.00 3.00 2.00 .03 .00 .00 .20168 4.95826 1 204.00 1.00 50.00 3.00 1.00 .13 .00 1.00 .20168 -1.25264 1 205.00 1.00 91.00 3.00 3.00 .72 16.00 18.00 .00897 -1.00905 1 206.00 2.00 24.00 1.00 1.00 .10 5.00 21.00 .67592 1.47947 1 207.00 1.00 80.00 3.00 3.00 .13 6.00 7.00 .02164 -1.02212 1 208.00 1.00 87.00 2.00 2.00 .18 9.00 20.00 .01237 -1.01253 1 209.00 1.00 70.00 2.00 2.00 .53 15.00 12.00 .04745 -1.04981 1 211.00 1.00 55.00 2.00 1.00 .33 8.00 5.00 .14409 -1.16834 1 212.00 1.00 56.00 3.00 1.00 .30 6.00 20.00 .13436 -1.15522 1 214.00 1.00 54.00 2.00 2.00 .15 .00 16.00 .15439 -1.18258 1 215.00 1.00 71.00 3.00 3.00 .35 12.00 12.00 .04391 -1.04592 1 217.00 2.00 36.00 1.00 1.00 .10 12.00 8.00 .44049 2.27020 1 218.00 1.00 91.00 2.00 2.00 .05 11.00 25.00 .00897 -1.00905 1 219.00 1.00 91.00 2.00 2.00 1.23 11.00 24.00 .00897 -1.00905 1 220.00 1.00 91.00 2.00 3.00 .08 8.00 11.00 .00897 -1.00905 1 221.00 1.00 91.00 2.00 2.00 .33 5.00 11.00 .00897 -1.00905 1 222.00 2.00 36.00 2.00 1.00 .18 5.00 3.00 .44049 2.27020 1 223.00 1.00 70.00 2.00 3.00 .18 14.00 3.00 .04745 -1.04981 1 224.00 1.00 91.00 2.00 2.00 .43 2.00 10.00 .00897 -1.00905 1 225.00 1.00 55.00 2.00 1.00 .18 6.00 11.00 .14409 -1.16834 1 229.00 2.00 75.00 2.00 2.00 .40 30.00 25.00 .03212 31.12941 1 232.00 1.00 91.00 3.00 2.00 .15 6.00 3.00 .00897 -1.00905 1 233.00 1.00 70.00 2.00 1.00 .00 11.00 8.00 .04745 -1.04981 1 234.00 1.00 54.00 3.00 2.00 .10 .00 .00 .15439 -1.18258 1 237.00 1.00 70.00 3.00 2.00 .18 5.00 25.00 .04745 -1.04981 1 241.00 1.00 19.00 2.00 3.00 .33 13.00 9.00 .75787 -4.12995 1 304.00 2.00 18.00 2.00 2.00 .26 25.00 6.00 .77245 1.29458 1 305.00 1.00 88.00 3.00 2.00 1.35 17.00 29.00 .01142 -1.01155 1 306.00 1.00 70.00 2.00 3.00 .63 14.00 33.00 .04745 -1.04981 1 307.00 1.00 85.00 2.00 2.00 2.65 18.00 14.00 .01452 -1.01474 1 308.00 1.00 13.00 2.00 2.00 .23 5.00 5.00 .83592 -6.09442 1 309.00 2.00 13.00 2.00 2.00 .23 7.00 17.00 .83592 1.19629 1 311.00 2.00 1.00 2.00 2.00 .50 20.00 14.00 .93102 1.07410 1 315.00 1.00 19.00 2.00 3.00 .18 1.00 11.00 .75787 -4.12995 1 316.00 1.00 88.00 2.00 2.00 .38 12.00 11.00 .01142 -1.01155 2 318.00 1.00 88.00 3.00 2.00 .03 5.00 5.00 .01142 -1.01155 3 319.00 2.00 18.00 2.00 3.00 .30 15.00 16.00 .77245 1.29458 1 321.00 2.00 15.00 2.00 2.00 .63 15.00 18.00 .81241 1.23090 1 322.00 1.00 88.00 3.00 2.00 .40 18.00 15.00 .01142 -1.01155 1 325.00 2.00 18.00 2.00 3.00 1.00 28.00 18.00 .77245 1.29458 1 329.00 1.00 88.00 3.00 2.00 .03 7.00 11.00 .01142 -1.01155 4 332.00 2.00 2.00 2.00 2.00 .05 8.00 9.00 .92562 1.08036 1 _ATEOF cat >lr-data-unweighted.sps <<'_ATEOF' set format = F12.3. set decimal dot. data list notable file='lr-data.txt' list /id outcome survrate prognos amttreat gsi avoid intrus pre_1 lre_1 w *. logistic regression variables = outcome with survrate . _ATEOF cat >lr-data-weighted.sps <<'_ATEOF' set format = F12.3. set decimal dot. data list notable file='lr-data.txt' list /id outcome survrate prognos amttreat gsi avoid intrus pre_1 lre_1 w *. weight by w. * Omit duplicate cases. select if id <> 305 and id <> 316 and id <> 318. logistic regression variables = outcome with survrate . _ATEOF { set +x $as_echo "$at_srcdir/logistic.at:229: pspp -O format=csv lr-data-unweighted.sps > unweighted-result" at_fn_check_prepare_trace "logistic.at:229" ( $at_check_trace; pspp -O format=csv lr-data-unweighted.sps > unweighted-result ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:229" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/logistic.at:230: pspp -O format=csv lr-data-weighted.sps > weighted-result" at_fn_check_prepare_trace "logistic.at:230" ( $at_check_trace; pspp -O format=csv lr-data-weighted.sps > weighted-result ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:230" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/logistic.at:234: diff unweighted-result weighted-result" at_fn_check_prepare_trace "logistic.at:234" ( $at_check_trace; diff unweighted-result weighted-result ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "8c8 < Included in Analysis,66,100.000 --- > Included in Analysis,63,100.000 10c10 < Total,66,100.000 --- > Total,63,100.000 23,24c23,24 < Step 1,outcome,1.000,43,5,89.583 < ,,2.000,4,14,77.778 --- > Step 1,outcome,1.000,43.000,5.000,89.583 > ,,2.000,4.000,14.000,77.778 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/logistic.at:234" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_550 #AT_START_551 at_fn_group_banner 551 'logistic.at:258' \ "LOGISTIC REGRESSION without constant" " " 79 at_xfail=no ( $as_echo "551. $at_setup_line: testing $at_desc ..." $at_traceon cat >non-const.sps <<'_ATEOF' set format=F20.3. input program. loop #i = 1 to 200. compute female = (#i > 91). end case. end loop. end file. end input program. compute constant = 1. logistic regression female with constant /noconst. _ATEOF { set +x $as_echo "$at_srcdir/logistic.at:276: pspp -O format=csv non-const.sps" at_fn_check_prepare_trace "logistic.at:276" ( $at_check_trace; pspp -O format=csv non-const.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Dependent Variable Encoding Original Value,Internal Value .00,0 1.00,1 Table: Case Processing Summary Unweighted Cases,N,Percent Included in Analysis,200,100.000 Missing Cases,0,.000 Total,200,100.000 note: Estimation terminated at iteration number 2 because parameter estimates changed by less than 0.001 Table: Model Summary Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square ,275.637,.008,.011 Table: Classification Table ,,,Predicted,, ,,,female,,\"Percentage Correct\" ,Observed,,.00,1.00, Step 1,female,.00,0,91,.000 ,,1.00,0,109,100.000 ,Overall Percentage,,,,54.500 Table: Variables in the Equation ,,B,S.E.,Wald,df,Sig.,Exp(B) Step 1,constant,.180,.142,1.616,1,.204,1.198 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:276" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_551 #AT_START_552 at_fn_group_banner 552 'logistic.at:315' \ "LOGISTIC REGRESSION non-dichotomous dep var" " " 79 at_xfail=no ( $as_echo "552. $at_setup_line: testing $at_desc ..." $at_traceon cat >non-dich.sps <<'_ATEOF' data list notable list /y x1 x2 x3 x4. begin data. 1 2 3 4 5 0 2 3 4 8 2 3 4 5 6 end data. logistic regression y with x1 x2 x3 x4. _ATEOF { set +x $as_echo "$at_srcdir/logistic.at:328: pspp -O format=csv non-dich.sps" at_fn_check_prepare_trace "logistic.at:328" ( $at_check_trace; pspp -O format=csv non-dich.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: Dependent variable's values are not dichotomous. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/logistic.at:328" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_552 #AT_START_553 at_fn_group_banner 553 'logistic.at:340' \ "LOGISTIC REGRESSION with categorical" " " 79 at_xfail=no ( $as_echo "553. $at_setup_line: testing $at_desc ..." $at_traceon cat >lr-cat.data <<'_ATEOF' 620 3.07 2 4 800 4.00 3 9 580 3.40 2 4 600 3.13 2 4 540 2.70 2 4 660 3.31 4 4 480 3.58 1 9 620 4.00 1 9 680 3.98 2 9 580 3.40 4 4 760 3.35 3 4 700 3.72 2 4 460 3.64 1 9 540 3.28 3 4 680 3.48 3 4 740 3.31 1 4 460 3.77 3 4 740 3.54 1 4 600 3.63 3 4 620 3.05 2 4 560 3.04 3 4 520 2.70 3 4 640 3.35 3 4 620 3.58 2 4 660 3.70 4 9 500 2.86 4 4 640 3.50 2 4 720 4.00 3 4 720 3.94 3 4 400 3.65 2 4 800 2.90 2 4 520 2.90 3 4 440 3.24 4 4 580 3.51 2 4 500 3.31 3 4 440 3.22 1 4 540 3.17 1 9 420 3.02 1 4 780 3.22 2 9 440 3.13 4 4 800 3.66 1 9 580 3.32 2 9 480 2.67 2 9 700 4.00 1 9 740 2.97 2 9 700 3.83 2 4 640 3.93 2 4 800 3.90 2 4 400 3.38 2 4 700 3.52 2 4 680 3.00 4 9 540 3.20 1 4 580 4.00 2 4 780 4.00 2 9 220 2.83 3 4 580 3.20 2 9 580 3.50 2 4 620 3.30 1 4 520 3.65 4 9 600 3.38 3 9 660 3.77 3 4 580 2.86 4 9 580 3.46 2 9 560 3.36 3 4 740 4.00 3 9 480 3.44 3 4 640 3.19 4 9 600 3.54 1 9 540 3.38 4 4 500 2.81 3 4 360 2.56 3 4 460 3.15 4 4 460 2.63 2 4 440 2.76 2 4 740 3.62 4 4 380 3.38 2 4 640 3.63 1 9 800 3.73 1 4 660 3.67 2 4 760 3.00 2 9 420 2.96 1 4 740 3.74 4 4 800 3.75 2 4 620 3.40 2 4 660 3.67 3 9 400 3.35 3 4 680 3.14 2 4 660 3.47 3 9 660 3.63 2 9 420 3.41 4 4 660 4.00 1 4 680 3.70 2 4 620 3.23 3 9 520 3.35 3 4 500 4.00 3 4 400 3.36 2 4 700 3.56 1 9 540 3.81 1 9 520 2.68 3 9 540 3.50 2 4 700 4.00 2 4 600 3.64 3 9 800 3.31 3 4 520 3.29 1 4 580 3.69 1 4 380 3.43 3 4 560 3.19 3 4 760 2.81 1 9 540 3.13 2 4 660 3.14 2 9 520 3.81 1 9 680 3.19 4 4 540 3.78 4 4 500 3.57 3 4 660 3.49 2 4 340 3.00 2 9 400 3.15 2 9 420 3.92 4 4 760 3.35 2 9 700 2.94 2 4 540 3.04 1 4 780 3.87 4 4 560 3.78 2 4 700 3.82 3 4 400 2.93 3 4 440 3.45 2 9 800 3.47 3 4 340 3.15 3 4 520 4.00 1 9 520 3.15 3 4 600 2.98 2 9 420 2.69 2 4 460 3.44 2 4 620 3.71 1 9 480 3.13 2 4 580 3.40 3 4 540 3.39 3 9 540 3.94 3 4 440 2.98 3 4 380 3.59 4 4 500 2.97 4 4 340 2.92 3 4 440 3.15 2 4 600 3.48 2 4 420 2.67 3 4 460 3.07 2 4 460 3.45 3 9 480 3.39 4 4 480 2.78 3 4 720 3.42 2 9 680 3.67 2 9 800 3.89 2 4 360 3.00 3 4 620 3.17 2 9 700 3.52 4 9 540 3.19 2 4 580 3.30 2 4 800 4.00 3 9 660 3.33 2 4 380 3.34 3 4 720 3.84 3 4 600 3.59 2 4 500 3.03 3 4 640 3.81 2 4 540 3.49 1 9 680 3.85 3 9 540 3.84 2 9 460 2.93 3 4 380 2.94 3 4 620 3.22 2 4 740 3.37 4 4 620 4.00 2 4 800 3.74 1 9 400 3.31 3 4 540 3.46 4 4 620 3.18 2 9 480 2.91 1 9 300 2.84 2 9 440 2.48 4 4 640 2.79 2 4 400 3.23 4 9 680 3.46 2 9 620 3.37 1 9 700 3.92 2 4 620 3.37 2 9 620 3.63 2 4 620 3.95 3 9 560 2.52 2 4 520 2.62 2 4 600 3.35 2 4 700 4.00 1 4 640 3.67 3 4 640 4.00 3 4 520 2.93 4 4 620 3.21 4 4 680 3.99 3 4 660 3.34 3 4 700 3.45 3 4 560 3.36 1 9 800 2.78 2 4 500 3.88 4 4 700 3.65 2 4 680 3.76 3 9 660 3.07 3 4 580 3.46 4 4 460 2.87 2 4 600 3.31 4 4 620 3.94 4 4 400 3.05 2 4 800 3.43 2 9 600 3.58 1 9 580 3.36 2 4 540 3.16 3 4 500 2.71 2 4 600 3.28 3 4 600 2.82 4 4 460 3.58 2 4 520 2.85 3 4 740 3.52 4 9 500 3.95 4 4 560 3.61 3 4 620 3.45 2 9 640 3.51 2 4 660 3.44 2 9 660 2.91 3 9 540 3.28 1 4 560 2.98 1 9 800 3.97 1 4 720 3.77 3 4 720 3.64 1 9 480 3.71 4 9 680 3.34 2 4 680 3.11 2 4 540 2.81 3 4 620 3.75 2 9 540 3.12 1 4 560 3.48 2 9 720 3.40 3 4 680 3.90 1 4 640 3.76 3 4 560 3.16 1 4 520 3.30 2 9 640 3.12 3 4 580 3.57 3 4 540 3.55 4 9 780 3.63 4 9 600 3.89 1 9 800 4.00 1 9 580 3.29 4 4 360 3.27 3 4 800 4.00 2 9 640 3.52 4 4 720 3.45 4 4 580 3.06 2 4 580 3.02 2 4 500 3.60 3 9 580 3.12 3 9 600 2.82 4 4 620 3.99 3 4 700 4.00 3 4 480 4.00 2 4 560 2.95 2 4 560 4.00 3 4 560 2.65 3 9 400 3.08 2 4 480 2.62 2 9 640 3.86 3 4 480 3.57 2 4 540 3.51 2 4 380 3.33 4 4 680 3.64 3 4 400 3.51 3 4 340 2.90 1 4 700 3.08 2 4 480 3.02 1 9 600 3.15 2 9 780 3.80 3 9 520 3.74 2 9 520 3.51 2 4 640 3.73 3 4 560 3.32 4 4 620 2.85 2 4 700 3.28 1 4 760 4.00 1 9 800 3.60 2 4 580 3.34 2 4 540 3.77 2 9 640 3.17 2 4 540 3.02 4 4 680 3.08 4 4 680 3.31 2 4 680 2.96 3 9 700 2.88 2 4 580 3.77 4 4 540 3.49 2 9 700 3.56 2 9 600 3.56 2 9 560 3.59 2 4 640 2.94 2 9 560 3.33 4 4 620 3.69 3 4 680 3.27 2 9 460 3.14 3 4 500 3.53 4 4 620 3.33 3 4 600 3.62 3 4 500 3.01 4 4 740 3.34 4 4 560 3.69 3 9 620 3.95 3 9 740 3.86 2 9 800 3.53 1 9 620 3.78 3 4 700 3.27 2 4 540 3.78 2 9 700 3.65 2 4 800 3.22 1 9 560 3.59 2 9 800 3.15 4 4 520 3.90 3 9 520 3.74 4 9 480 2.55 1 4 800 4.00 4 4 620 3.09 4 4 560 3.49 4 4 500 3.17 3 4 480 3.40 2 4 460 2.98 1 4 580 3.58 1 9 640 3.30 2 4 480 3.45 2 4 440 3.17 2 4 660 3.32 1 4 500 3.08 3 4 660 3.94 2 4 720 3.31 1 4 460 3.64 3 9 500 2.93 4 4 800 3.54 3 4 580 2.93 2 4 620 3.61 1 9 500 2.98 3 4 660 4.00 2 9 560 3.24 4 4 560 2.42 2 4 580 3.80 2 4 500 3.23 4 4 680 2.42 1 9 580 3.46 3 4 800 3.91 3 4 700 2.90 4 4 520 3.12 2 4 300 2.92 4 4 560 3.43 3 4 620 3.63 3 4 500 2.79 4 4 360 3.14 1 4 640 3.94 2 9 460 3.99 3 9 300 3.01 3 4 520 2.73 2 4 600 3.47 2 9 580 3.25 1 4 520 3.10 4 4 620 3.43 3 4 380 2.91 4 4 660 3.59 3 4 660 3.95 2 9 540 3.33 3 4 740 4.00 3 4 640 3.38 3 4 600 3.89 3 4 720 3.88 3 4 580 4.00 3 4 420 2.26 4 4 520 4.00 2 9 800 3.70 1 9 700 4.00 1 9 480 3.43 2 4 660 3.45 4 4 520 3.25 3 4 560 2.71 3 4 600 3.32 2 4 580 2.88 2 4 660 3.88 2 9 600 3.22 1 4 580 4.00 1 4 660 3.60 3 9 500 3.35 2 4 520 2.98 2 4 660 3.49 2 9 560 3.07 2 4 500 3.13 2 9 720 3.50 3 9 440 3.39 2 9 640 3.95 2 9 380 3.61 3 4 800 3.05 2 9 520 3.19 3 9 600 3.40 3 4 _ATEOF cat >lr-cat.sps <<'_ATEOF' set format=F20.3. data list notable list file='lr-cat.data' /b1 b2 bcat y. logistic regression y with b1 b2 bcat /categorical = bcat . _ATEOF { set +x $as_echo "$at_srcdir/logistic.at:756: pspp -O format=csv lr-cat.sps" at_fn_check_prepare_trace "logistic.at:756" ( $at_check_trace; pspp -O format=csv lr-cat.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Dependent Variable Encoding Original Value,Internal Value 4.000,0 9.000,1 Table: Case Processing Summary Unweighted Cases,N,Percent Included in Analysis,400,100.000 Missing Cases,0,.000 Total,400,100.000 note: Estimation terminated at iteration number 4 because parameter estimates changed by less than 0.001 Table: Model Summary Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square ,458.517,.098,.138 Table: Categorical Variables' Codings ,,,Parameter coding,, ,,Frequency,(1),(2),(3) bcat,1.000,61,1,0,0 ,2.000,151,0,1,0 ,3.000,121,0,0,1 ,4.000,67,0,0,0 Table: Classification Table ,,,Predicted,, ,,,y,,\"Percentage Correct\" ,Observed,,4.000,9.000, Step 1,y,4.000,254,19,93.040 ,,9.000,97,30,23.622 ,Overall Percentage,,,,71.000 Table: Variables in the Equation ,,B,S.E.,Wald,df,Sig.,Exp(B) Step 1,b1,.002,.001,4.284,1,.038,1.002 ,b2,.804,.332,5.872,1,.015,2.235 ,bcat,,,20.895,3,.000, ,bcat(1),1.551,.418,13.788,1,.000,4.718 ,bcat(2),.876,.367,5.706,1,.017,2.401 ,bcat(3),.211,.393,.289,1,.591,1.235 ,Constant,-5.541,1.138,23.709,1,.000,.004 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:756" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_553 #AT_START_554 at_fn_group_banner 554 'logistic.at:808' \ "LOGISTIC REGRESSION with cat var 2" " " 79 at_xfail=no ( $as_echo "554. $at_setup_line: testing $at_desc ..." $at_traceon cat >lr-cat2.data <<'_ATEOF' 60.00 1.00 8.00 50.00 47.00 .00 9.00 42.00 57.00 1.00 7.00 53.00 60.00 .00 8.00 53.00 68.00 .00 8.00 66.00 63.00 .00 8.00 55.00 65.00 .00 8.00 63.00 52.00 .00 8.00 61.00 34.00 .00 9.00 42.00 37.00 .00 8.00 39.00 68.00 1.00 9.00 69.00 60.00 .00 9.00 61.00 44.00 .00 9.00 58.00 42.00 .00 8.00 47.00 57.00 1.00 7.00 61.00 55.00 1.00 8.00 50.00 55.00 .00 9.00 58.00 44.00 .00 8.00 63.00 50.00 1.00 9.00 66.00 44.00 .00 8.00 39.00 55.00 .00 8.00 58.00 44.00 .00 8.00 50.00 47.00 1.00 7.00 34.00 48.00 .00 8.00 44.00 45.00 .00 7.00 31.00 43.00 .00 8.00 50.00 39.00 .00 8.00 42.00 63.00 .00 9.00 50.00 47.00 .00 8.00 58.00 42.00 .00 7.00 50.00 50.00 .00 9.00 36.00 47.00 .00 7.00 33.00 60.00 .00 9.00 61.00 47.00 .00 7.00 42.00 68.00 1.00 9.00 69.00 52.00 .00 8.00 54.00 63.00 1.00 9.00 61.00 65.00 1.00 9.00 61.00 63.00 1.00 9.00 53.00 57.00 .00 8.00 51.00 34.00 .00 8.00 36.00 50.00 .00 8.00 39.00 52.00 1.00 7.00 56.00 45.00 .00 7.00 34.00 47.00 1.00 7.00 53.00 34.00 .00 7.00 39.00 50.00 1.00 8.00 55.00 60.00 .00 9.00 58.00 63.00 .00 8.00 58.00 35.00 .00 7.00 51.00 50.00 .00 8.00 58.00 68.00 .00 8.00 63.00 41.00 .00 9.00 34.00 47.00 .00 8.00 47.00 76.00 .00 9.00 64.00 44.00 .00 8.00 44.00 36.00 .00 9.00 50.00 68.00 1.00 9.00 55.00 47.00 1.00 8.00 50.00 50.00 .00 7.00 53.00 68.00 .00 8.00 74.00 39.00 .00 7.00 44.00 50.00 .00 8.00 55.00 52.00 .00 9.00 61.00 47.00 .00 8.00 53.00 39.00 .00 7.00 47.00 55.00 1.00 9.00 49.00 68.00 1.00 8.00 50.00 52.00 1.00 9.00 63.00 55.00 .00 8.00 58.00 57.00 .00 8.00 55.00 66.00 1.00 9.00 61.00 65.00 1.00 7.00 58.00 42.00 .00 7.00 42.00 68.00 1.00 7.00 59.00 60.00 1.00 9.00 61.00 52.00 .00 8.00 55.00 57.00 1.00 7.00 54.00 42.00 .00 9.00 50.00 42.00 .00 8.00 47.00 57.00 .00 8.00 50.00 47.00 .00 7.00 45.00 44.00 .00 7.00 40.00 43.00 .00 9.00 55.00 31.00 .00 8.00 39.00 37.00 .00 7.00 33.00 63.00 1.00 7.00 63.00 47.00 .00 8.00 39.00 57.00 1.00 8.00 63.00 52.00 .00 8.00 44.00 44.00 .00 7.00 35.00 52.00 .00 7.00 55.00 55.00 .00 7.00 69.00 52.00 .00 8.00 53.00 55.00 .00 9.00 61.00 65.00 1.00 9.00 63.00 55.00 .00 8.00 44.00 63.00 .00 7.00 65.00 44.00 .00 7.00 39.00 47.00 .00 7.00 36.00 63.00 1.00 9.00 55.00 68.00 .00 8.00 66.00 34.00 .00 8.00 39.00 47.00 .00 9.00 50.00 50.00 .00 9.00 58.00 63.00 .00 8.00 66.00 44.00 .00 7.00 34.00 44.00 .00 8.00 50.00 50.00 .00 8.00 53.00 47.00 1.00 9.00 69.00 65.00 .00 9.00 58.00 57.00 .00 8.00 47.00 39.00 .00 8.00 39.00 47.00 .00 8.00 53.00 50.00 1.00 7.00 63.00 50.00 .00 8.00 50.00 63.00 .00 9.00 53.00 73.00 1.00 9.00 61.00 44.00 .00 7.00 47.00 47.00 .00 8.00 42.00 47.00 .00 8.00 58.00 36.00 .00 7.00 61.00 57.00 1.00 8.00 55.00 53.00 1.00 8.00 57.00 63.00 .00 7.00 66.00 50.00 .00 8.00 34.00 47.00 .00 9.00 48.00 57.00 1.00 8.00 58.00 39.00 .00 8.00 53.00 42.00 .00 8.00 42.00 42.00 .00 9.00 31.00 42.00 .00 8.00 72.00 46.00 .00 8.00 44.00 55.00 .00 8.00 42.00 42.00 .00 8.00 47.00 50.00 .00 8.00 44.00 44.00 .00 9.00 39.00 73.00 1.00 8.00 69.00 71.00 1.00 9.00 58.00 50.00 .00 9.00 49.00 63.00 1.00 7.00 54.00 42.00 .00 8.00 36.00 47.00 .00 7.00 42.00 39.00 .00 9.00 26.00 63.00 .00 8.00 58.00 50.00 .00 8.00 55.00 65.00 1.00 8.00 55.00 76.00 1.00 9.00 67.00 71.00 1.00 8.00 66.00 39.00 .00 9.00 47.00 47.00 1.00 9.00 63.00 60.00 .00 7.00 50.00 63.00 .00 9.00 55.00 54.00 1.00 9.00 55.00 55.00 1.00 8.00 58.00 57.00 .00 8.00 61.00 55.00 1.00 9.00 63.00 42.00 .00 7.00 50.00 50.00 .00 8.00 44.00 55.00 .00 8.00 42.00 42.00 .00 7.00 50.00 34.00 .00 8.00 39.00 65.00 .00 9.00 46.00 52.00 .00 7.00 58.00 44.00 .00 8.00 39.00 65.00 1.00 9.00 66.00 47.00 .00 8.00 42.00 41.00 .00 7.00 39.00 68.00 .00 9.00 63.00 63.00 1.00 8.00 72.00 52.00 .00 8.00 53.00 57.00 .00 8.00 50.00 68.00 .00 8.00 55.00 42.00 .00 8.00 56.00 47.00 .00 8.00 48.00 73.00 1.00 9.00 58.00 39.00 .00 8.00 50.00 63.00 1.00 9.00 69.00 60.00 .00 8.00 55.00 65.00 1.00 9.00 66.00 73.00 1.00 8.00 63.00 52.00 .00 8.00 55.00 36.00 .00 8.00 42.00 28.00 .00 7.00 44.00 47.00 .00 8.00 44.00 57.00 .00 7.00 47.00 34.00 .00 7.00 29.00 47.00 .00 9.00 66.00 57.00 .00 8.00 58.00 60.00 1.00 9.00 50.00 50.00 .00 9.00 47.00 73.00 1.00 9.00 55.00 52.00 1.00 8.00 47.00 55.00 .00 8.00 53.00 47.00 .00 8.00 53.00 50.00 .00 8.00 61.00 61.00 .00 7.00 44.00 52.00 .00 9.00 53.00 47.00 .00 7.00 40.00 47.00 .00 7.00 50.00 _ATEOF cat >stringcat.sps <<'_ATEOF' set format=F20.3. data list notable file='lr-cat2.data' list /read honcomp wiz science *. string ses(a1). recode wiz (7 = "a") (8 = "b") (9 = "c") into ses. logistic regression honcomp with read science ses /categorical = ses. _ATEOF { set +x $as_echo "$at_srcdir/logistic.at:1025: pspp -O format=csv stringcat.sps" at_fn_check_prepare_trace "logistic.at:1025" ( $at_check_trace; pspp -O format=csv stringcat.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Dependent Variable Encoding Original Value,Internal Value .000,0 1.000,1 Table: Case Processing Summary Unweighted Cases,N,Percent Included in Analysis,200,100.000 Missing Cases,0,.000 Total,200,100.000 note: Estimation terminated at iteration number 5 because parameter estimates changed by less than 0.001 Table: Model Summary Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square ,165.701,.280,.408 Table: Categorical Variables' Codings ,,,Parameter coding, ,,Frequency,(1),(2) ses,a,47,1,0 ,b,95,0,1 ,c,58,0,0 Table: Classification Table ,,,Predicted,, ,,,honcomp,,\"Percentage Correct\" ,Observed,,.000,1.000, Step 1,honcomp,.000,132,15,89.796 ,,1.000,26,27,50.943 ,Overall Percentage,,,,79.500 Table: Variables in the Equation ,,B,S.E.,Wald,df,Sig.,Exp(B) Step 1,read,.098,.025,15.199,1,.000,1.103 ,science,.066,.027,5.867,1,.015,1.068 ,ses,,,6.690,2,.035, ,ses(1),.058,.532,.012,1,.913,1.060 ,ses(2),-1.013,.444,5.212,1,.022,.363 ,Constant,-9.561,1.662,33.113,1,.000,.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:1025" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_554 #AT_START_555 at_fn_group_banner 555 'logistic.at:1075' \ "LOGISTIC REGRESSION identical categories" " " 79 at_xfail=no ( $as_echo "555. $at_setup_line: testing $at_desc ..." $at_traceon cat >crash.sps <<'_ATEOF' data list notable list /y x1 x2*. begin data 0 1 1 1 2 1 end data. logistic regression y with x1 x2 /categorical = x2. _ATEOF { set +x $as_echo "$at_srcdir/logistic.at:1088: pspp -O format=csv crash.sps" at_fn_check_prepare_trace "logistic.at:1088" ( $at_check_trace; pspp -O format=csv crash.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/logistic.at:1088" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_555 #AT_START_556 at_fn_group_banner 556 'logistic.at:1095' \ "LOGISTIC REGRESSION missing categoricals" " " 79 at_xfail=no ( $as_echo "556. $at_setup_line: testing $at_desc ..." $at_traceon cat >data.txt <<'_ATEOF' .00 3.69 .00 .00 1.16 1.00 1.00 -12.99 .00 .00 2.97 1.00 .00 20.48 .00 .00 4.90 .00 1.00 -4.38 .00 .00 -1.69 1.00 1.00 -5.71 .00 1.00 -14.28 .00 .00 9.00 .00 .00 2.89 1.00 .00 13.51 1.00 .00 23.32 1.00 .00 2.31 1.00 .00 -2.07 1.00 1.00 -4.52 1.00 1.00 -5.83 .00 1.00 -1.91 .00 1.00 -11.12 1.00 .00 -1.51 .00 .00 6.59 1.00 .00 19.28 1.00 .00 5.94 .00 .00 8.21 1.00 .00 8.11 1.00 .00 2.49 .00 .00 9.62 .00 1.00 -20.74 1.00 .00 -1.41 1.00 .00 15.15 1.00 .00 9.39 .00 1.00 -15.14 1.00 1.00 -5.86 .00 1.00 -11.64 1.00 1.00 -14.36 .00 1.00 -8.95 1.00 1.00 -16.42 1.00 1.00 -1.04 1.00 .00 12.89 1.00 .00 -7.08 1.00 .00 4.87 1.00 .00 11.53 1.00 1.00 -6.24 1.00 .00 1.25 1.00 .00 4.39 1.00 .00 3.17 .00 .00 19.39 1.00 .00 13.03 1.00 .00 2.43 .00 1.00 -14.73 1.00 .00 8.25 1.00 1.00 -13.28 1.00 .00 5.27 1.00 1.00 -3.46 1.00 .00 13.81 1.00 .00 1.35 1.00 1.00 -3.94 1.00 .00 20.73 1.00 1.00 -15.40 .00 1.00 -11.01 1.00 .00 4.56 .00 1.00 -15.35 1.00 .00 15.21 .00 .00 5.34 1.00 1.00 -21.55 1.00 .00 10.12 1.00 .00 -.73 1.00 .00 15.28 1.00 .00 11.08 1.00 1.00 -8.24 .00 .00 2.46 .00 .00 9.60 .00 .00 11.24 .00 .00 14.13 1.00 .00 19.72 1.00 .00 5.58 .00 .00 26.23 1.00 .00 7.25 .00 1.00 -.79 .00 .00 6.24 .00 1.00 1.16 .00 1.00 -7.89 1.00 1.00 -1.86 1.00 1.00 -10.80 1.00 1.00 -5.51 .00 .00 7.51 .00 .00 11.18 .00 .00 8.73 .00 1.00 -11.21 1.00 1.00 -13.24 .00 .00 19.34 .00 .00 9.32 1.00 .00 17.97 1.00 1.00 -1.56 1.00 1.00 -3.13 .00 .00 3.98 .00 .00 -1.21 1.00 .00 2.37 .00 1.00 -18.03 1.00 _ATEOF cat >miss.sps <<'_ATEOF' data list notable file='data.txt' list /y x1 cat0*. logistic regression y with x1 cat0 /categorical = cat0. _ATEOF { set +x $as_echo "$at_srcdir/logistic.at:1207: pspp -O format=csv miss.sps > file1" at_fn_check_prepare_trace "logistic.at:1207" ( $at_check_trace; pspp -O format=csv miss.sps > file1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:1207" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/logistic.at:1210: echo '1 34 .' >> data.txt" at_fn_check_prepare_trace "logistic.at:1210" ( $at_check_trace; echo '1 34 .' >> data.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:1210" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/logistic.at:1212: pspp -O format=csv miss.sps > file2" at_fn_check_prepare_trace "logistic.at:1212" ( $at_check_trace; pspp -O format=csv miss.sps > file2 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:1212" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/logistic.at:1214: diff file1 file2" at_fn_check_prepare_trace "logistic.at:1214" ( $at_check_trace; diff file1 file2 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "8,10c8,10 < Included in Analysis,100,100.00 < Missing Cases,0,.00 < Total,100,100.00 --- > Included in Analysis,100,99.01 > Missing Cases,1,.99 > Total,101,100.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/logistic.at:1214" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_556 #AT_START_557 at_fn_group_banner 557 'logistic.at:1232' \ "LOGISTIC REGRESSION confidence interval" " " 79 at_xfail=no ( $as_echo "557. $at_setup_line: testing $at_desc ..." $at_traceon cat >ci.sps <<'_ATEOF' set FORMAT=F20.3 data list notable list /disease age sciostat sector savings *. begin data. 0 33 1 1 1 0 35 1 1 1 0 6 1 1 0 0 60 1 1 1 1 18 3 1 0 0 26 3 1 0 0 6 3 1 0 1 31 2 1 1 1 26 2 1 0 0 37 2 1 0 0 23 1 1 0 0 23 1 1 0 0 27 1 1 1 1 9 1 1 1 1 37 1 2 1 1 22 1 2 1 1 67 1 2 1 0 8 1 2 1 1 6 1 2 1 1 15 1 2 1 1 21 2 2 1 1 32 2 2 1 1 16 1 2 1 0 11 2 2 0 0 14 3 2 0 0 9 2 2 0 0 18 2 2 0 0 2 3 1 0 0 61 3 1 1 0 20 3 1 0 0 16 3 1 0 0 9 2 1 0 0 35 2 1 1 0 4 1 1 1 0 44 3 2 0 1 11 3 2 0 0 3 2 2 1 0 6 3 2 0 1 17 2 2 0 0 1 3 2 1 1 53 2 2 1 1 13 1 2 0 0 24 1 2 0 1 70 1 2 1 1 16 3 2 1 0 12 2 2 1 1 20 3 2 1 0 65 3 2 1 1 40 2 2 0 1 38 2 2 1 1 68 2 2 1 1 74 1 2 1 1 14 1 2 1 1 27 1 2 1 0 31 1 2 1 0 18 1 2 1 0 39 1 2 0 0 50 1 2 1 0 31 1 2 1 0 61 1 2 1 0 18 3 1 0 0 5 3 1 0 0 2 3 1 1 0 16 3 1 0 1 59 3 1 1 0 22 3 1 0 0 24 1 1 1 0 30 1 1 1 0 46 1 1 1 0 28 1 1 0 0 27 1 1 1 1 27 1 1 0 0 28 1 1 1 1 52 1 1 1 0 11 3 1 1 0 6 2 1 1 0 46 3 1 0 1 20 2 1 1 0 3 1 1 1 0 18 2 1 0 0 25 2 1 0 0 6 3 1 1 1 65 3 1 1 0 51 3 1 1 0 39 2 1 1 0 8 1 1 1 0 8 2 1 0 0 14 3 1 0 0 6 3 1 0 0 6 3 1 1 0 7 3 1 0 0 4 3 1 0 0 8 3 1 0 0 9 2 1 0 1 32 3 1 0 0 19 3 1 0 0 11 3 1 0 0 35 3 1 0 0 16 1 1 0 0 1 1 1 1 0 6 1 1 1 0 27 1 1 1 0 25 1 1 1 0 18 1 1 0 0 37 3 1 0 1 33 3 1 0 0 27 2 1 0 0 2 1 1 0 0 8 2 1 0 0 5 1 1 0 0 1 1 1 1 0 32 1 1 0 1 25 1 1 1 0 15 1 2 0 0 15 1 2 1 0 26 1 2 1 1 42 1 2 1 0 7 1 2 1 0 2 1 2 0 1 65 1 2 1 0 33 2 2 1 1 8 2 2 0 0 30 2 2 0 0 5 3 2 0 0 15 3 2 0 1 60 3 2 1 1 13 3 2 1 0 70 3 1 1 0 5 3 1 0 0 3 3 1 1 0 50 2 1 1 0 6 2 1 0 0 12 2 1 1 1 39 3 2 0 0 15 2 2 1 1 35 2 2 0 0 2 2 2 1 0 17 3 2 0 1 43 3 2 1 0 30 2 2 1 0 11 1 2 1 1 39 1 2 1 0 32 1 2 1 0 17 1 2 1 0 3 3 2 1 0 7 3 2 0 0 2 2 2 0 1 64 2 2 1 1 13 1 2 2 1 15 2 2 1 0 48 2 2 1 0 23 1 2 1 1 48 1 2 0 0 25 1 2 1 0 12 1 2 1 1 46 1 2 1 0 79 1 2 1 0 56 1 2 1 0 8 1 2 1 1 29 3 1 0 1 35 3 1 0 1 11 3 1 0 0 69 3 1 1 1 21 3 1 0 0 13 3 1 0 0 21 1 1 1 1 32 1 1 1 1 24 1 1 0 0 24 1 1 1 0 73 1 1 1 0 42 1 1 1 1 34 1 1 1 0 30 2 1 0 0 7 2 1 0 1 29 3 1 0 1 22 3 1 0 0 38 2 1 1 0 13 2 1 1 0 12 2 1 1 0 42 3 1 0 1 17 3 1 0 0 21 3 1 1 0 34 1 1 1 0 1 3 1 0 0 14 2 1 0 0 16 2 1 0 0 9 3 1 0 0 53 3 1 0 0 27 3 1 0 0 15 3 1 0 0 9 3 1 0 0 4 2 1 1 0 10 3 1 1 0 31 3 1 0 0 85 3 1 1 0 24 2 1 0 end data. logistic regression disease WITH age sciostat sector savings /categorical = sciostat sector /print = ci(95). _ATEOF { set +x $as_echo "$at_srcdir/logistic.at:1442: pspp -O format=csv ci.sps" at_fn_check_prepare_trace "logistic.at:1442" ( $at_check_trace; pspp -O format=csv ci.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Dependent Variable Encoding Original Value,Internal Value .000,0 1.000,1 Table: Case Processing Summary Unweighted Cases,N,Percent Included in Analysis,196,100.000 Missing Cases,0,.000 Total,196,100.000 note: Estimation terminated at iteration number 4 because parameter estimates changed by less than 0.001 Table: Model Summary Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square ,211.195,.120,.172 Table: Categorical Variables' Codings ,,,Parameter coding, ,,Frequency,(1),(2) sciostat,1.000,77,1,0 ,2.000,49,0,1 ,3.000,70,0,0 sector,1.000,117,1, ,2.000,79,0, Table: Classification Table ,,,Predicted,, ,,,disease,,\"Percentage Correct\" ,Observed,,.000,1.000, Step 1,disease,.000,131,8,94.245 ,,1.000,41,16,28.070 ,Overall Percentage,,,,75.000 Table: Variables in the Equation ,,,,,,,,95% CI for Exp(B), ,,B,S.E.,Wald,df,Sig.,Exp(B),Lower,Upper Step 1,age,.027,.009,8.647,1,.003,1.027,1.009,1.045 ,savings,.061,.386,.025,1,.874,1.063,.499,2.264 ,sciostat,,,.440,2,.803,,, ,sciostat(1),-.278,.434,.409,1,.522,.757,.323,1.775 ,sciostat(2),-.219,.459,.227,1,.634,.803,.327,1.976 ,sector,,,11.974,1,.001,,, ,sector(1),-1.235,.357,11.974,1,.001,.291,.145,.586 ,Constant,-.814,.452,3.246,1,.072,.443,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/logistic.at:1442" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_557 #AT_START_558 at_fn_group_banner 558 'means.at:19' \ "MEANS simple example" " " 80 at_xfail=no ( $as_echo "558. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-simple.sps <<'_ATEOF' SET FORMAT=F12.5. data list notable list /score * factor *. BEGIN DATA. 22 01 22 01 29 01 16 01 24 02 21 02 22 01 24 01 19 01 17 01 22 01 17 02 23 02 25 02 20 01 15 01 18 01 26 01 23 02 35 02 20 01 16 01 19 01 14 01 14 01 21 01 END DATA. MEANS TABLES = score BY factor. _ATEOF { set +x $as_echo "$at_srcdir/means.at:57: pspp -O format=csv means-simple.sps" at_fn_check_prepare_trace "means.at:57" ( $at_check_trace; pspp -O format=csv means-simple.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent score: factor,26,100%,0,0%,26,100% score: ,26,100%,0,0%,26,100% Table: Report ,factor,Mean,N,Std. Deviation score,1.00000,19.78947,19.00000,4.03566 ,2.00000,24.00000,7.00000,5.50757 Table: Report ,Mean,N,Std. Deviation score,20.92308,26.00000,4.75750 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/means.at:57" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_558 #AT_START_559 at_fn_group_banner 559 'means.at:80' \ "MEANS very simple example" " " 80 at_xfail=no ( $as_echo "559. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-vsimple.sps <<'_ATEOF' SET FORMAT=F12.5. data list notable list /score. begin data. 1 1 2 2 end data. means tables = score. _ATEOF { set +x $as_echo "$at_srcdir/means.at:96: pspp -O format=csv means-vsimple.sps" at_fn_check_prepare_trace "means.at:96" ( $at_check_trace; pspp -O format=csv means-vsimple.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent score: ,4,100%,0,0%,4,100% Table: Report ,Mean,N,Std. Deviation score,1.50000,4.00000,.57735 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/means.at:96" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_559 #AT_START_560 at_fn_group_banner 560 'means.at:114' \ "MEANS default missing" " " 80 at_xfail=no ( $as_echo "560. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-dmiss.sps <<'_ATEOF' SET FORMAT=F12.2. data list notable list /a * g1 * g2 *. begin data. 3 1 . 4 1 11 3 1 21 6 2 21 2 2 31 . 2 31 8 2 31 7 2 31 end data. MEANS TABLES = a BY g1 g2 BY g2 /cells = MEAN COUNT . _ATEOF { set +x $as_echo "$at_srcdir/means.at:137: pspp -O format=csv means-dmiss.sps" at_fn_check_prepare_trace "means.at:137" ( $at_check_trace; pspp -O format=csv means-dmiss.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1 * g2,6,75%,2,25%,8,100% a: g2,6,75%,2,25%,8,100% a: ,7,87.5%,1,12.5%,8,100% Table: Report ,g1,g2,Mean,N a,1.00,11.00,4.00,1.00 ,1.00,21.00,3.00,1.00 ,2.00,21.00,6.00,1.00 ,2.00,31.00,5.67,3.00 Table: Report ,g2,Mean,N a,11.00,4.00,1.00 ,21.00,4.50,2.00 ,31.00,5.67,3.00 Table: Report ,Mean,N a,5.00,6.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/means.at:137" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_560 #AT_START_561 at_fn_group_banner 561 'means.at:168' \ "MEANS linear stats" " " 80 at_xfail=no ( $as_echo "561. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-linear.sps <<'_ATEOF' set format F12.4. data list notable list /id * group * test1 * begin data. 1 1 85 2 1 90 3 1 82 4 1 75 5 1 99 6 2 70 7 2 66 8 2 52 9 2 71 10 2 50 end data. add value labels /group 1 "experimental group" 2 "control group". means test1 by group /cells = mean count stddev sum min max range variance kurt skew . _ATEOF { set +x $as_echo "$at_srcdir/means.at:195: pspp -O format=csv means-linear.sps" at_fn_check_prepare_trace "means.at:195" ( $at_check_trace; pspp -O format=csv means-linear.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent test1: group,10,100%,0,0%,10,100% test1: ,10,100%,0,0%,10,100% Table: Report ,group,Mean,N,Std. Deviation,Sum,Min,Max,Range,Variance,Kurtosis,Skewness test1,experimental group,86.2000,5.0000,8.9833,431.0000,75.0000,99.0000,24.0000,80.7000,.2727,.3858 ,control group,61.8000,5.0000,10.0598,309.0000,50.0000,71.0000,21.0000,101.2000,-3.0437,-.4830 Table: Report ,Mean,N,Std. Deviation,Sum,Min,Max,Range,Variance,Kurtosis,Skewness test1,74.0000,10.0000,15.6915,740.0000,50.0000,99.0000,49.0000,246.2222,-.5759,-.1262 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/means.at:195" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_561 #AT_START_562 at_fn_group_banner 562 'means.at:217' \ "MEANS standard errors" " " 80 at_xfail=no ( $as_echo "562. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-stderr.sps <<'_ATEOF' set format F12.4. data list notable list /id * group * test1 * begin data. 1 1 85 2 1 90 3 1 82 4 1 75 5 1 99 6 1 70 7 2 66 8 2 52 9 2 71 10 2 50 end data. means test1 by group /cells = mean count semean seskew sekurt. _ATEOF { set +x $as_echo "$at_srcdir/means.at:240: pspp -O format=csv means-stderr.sps" at_fn_check_prepare_trace "means.at:240" ( $at_check_trace; pspp -O format=csv means-stderr.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent test1: group,10,100%,0,0%,10,100% test1: ,10,100%,0,0%,10,100% Table: Report ,group,Mean,N,S.E. Mean,S.E. Skew,S.E. Kurt test1,1.0000,83.5000,6.0000,4.2485,.8452,1.7408 ,2.0000,59.7500,4.0000,5.1700,1.0142,2.6186 Table: Report ,Mean,N,S.E. Mean,S.E. Skew,S.E. Kurt test1,74.0000,10.0000,4.9621,.6870,1.3342 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/means.at:240" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_562 #AT_START_563 at_fn_group_banner 563 'means.at:263' \ "MEANS harmonic and geometric means" " " 80 at_xfail=no ( $as_echo "563. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-hg.sps <<'_ATEOF' set format F12.4. data list notable list /x * y *. begin data. 1 3 2 3 3 3 4 3 5 3 end data. means x y /cells = mean harmonic geometric . _ATEOF { set +x $as_echo "$at_srcdir/means.at:283: pspp -O format=csv means-hg.sps" at_fn_check_prepare_trace "means.at:283" ( $at_check_trace; pspp -O format=csv means-hg.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent x: ,5,100%,0,0%,5,100% y: ,5,100%,0,0%,5,100% Table: Report ,Mean,Harmonic Mean,Geom. Mean x,3.0000,2.1898,2.6052 y,3.0000,3.0000,3.0000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/means.at:283" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_563 #AT_START_564 at_fn_group_banner 564 'means.at:305' \ "MEANS all/none/default" " " 80 at_xfail=no ( $as_echo "564. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-stat-keywords.sps <<'_ATEOF' SET FORMAT=F12.2. SET DECIMAL=DOT. DATA LIST NOTABLE LIST /score *. BEGIN DATA. 22 22 29 16 23 END DATA. MEANS score /CELLS = ALL. MEANS score /CELLS = DEFAULT. MEANS score /CELLS = NONE. _ATEOF { set +x $as_echo "$at_srcdir/means.at:327: pspp -O format=csv means-stat-keywords.sps" at_fn_check_prepare_trace "means.at:327" ( $at_check_trace; pspp -O format=csv means-stat-keywords.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent score: ,5,100%,0,0%,5,100% Table: Report ,Mean,N,Std. Deviation,S.E. Mean,Sum,Min,Max,Range,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,First,Last,Harmonic Mean,Geom. Mean score,22.40,5.00,4.62,2.06,112.00,16.00,29.00,13.00,21.30,1.85,2.00,.11,.91,22.00,23.00,21.61,22.01 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent score: ,5,100%,0,0%,5,100% Table: Report ,Mean,N,Std. Deviation score,22.40,5.00,4.62 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent score: ,5,100%,0,0%,5,100% Table: Report score " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/means.at:327" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_564 #AT_START_565 at_fn_group_banner 565 'means.at:365' \ "MEANS missing=table " " " 80 at_xfail=no ( $as_echo "565. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-miss-table.sps <<'_ATEOF' data list notable list /a * b * g1. begin data. 1 9 1 2 9 1 3 9 1 4 9 2 5 9 2 6 9 2 7 . 2 end data. MEANS a b BY g1 /a BY g1 /cells = COUNT /missing = TABLE . MEANS a b BY g1 /a BY g1 /cells = COUNT . _ATEOF { set +x $as_echo "$at_srcdir/means.at:392: pspp -O format=csv means-miss-table.sps" at_fn_check_prepare_trace "means.at:392" ( $at_check_trace; pspp -O format=csv means-miss-table.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% b: g1,6,85.7143%,1,14.2857%,7,100% b: ,6,85.7143%,1,14.2857%,7,100% Table: Report ,g1,N a,1.00,3.00 ,2.00,3.00 b,1.00,3.00 ,2.00,3.00 Table: Report ,N a,6.00 b,6.00 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% Table: Report ,g1,N a,1.00,3.00 ,2.00,4.00 Table: Report ,N a,7.00 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% b: g1,6,85.7143%,1,14.2857%,7,100% b: ,6,85.7143%,1,14.2857%,7,100% Table: Report ,g1,N a,1.00,3.00 ,2.00,4.00 b,1.00,3.00 ,2.00,3.00 Table: Report ,N a,7.00 b,6.00 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% Table: Report ,g1,N a,1.00,3.00 ,2.00,4.00 Table: Report ,N a,7.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/means.at:392" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_565 #AT_START_566 at_fn_group_banner 566 'means.at:475' \ "MEANS user missing values" " " 80 at_xfail=no ( $as_echo "566. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-missing.sps <<'_ATEOF' data list notable list /a * b * g1. begin data. 1 2 9 2 2 1 3 2 1 4 2 2 5 2 2 6 2 2 7 9 2 end data. MISSING VALUES a b g1 (9). MEANS a b BY g1 /cells = COUNT . MEANS a b BY g1 /cells = COUNT /missing = include . MEANS a b BY g1 /cells = COUNT /missing = dependent . _ATEOF { set +x $as_echo "$at_srcdir/means.at:499: pspp -O format=csv means-missing.sps" at_fn_check_prepare_trace "means.at:499" ( $at_check_trace; pspp -O format=csv means-missing.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,6,85.7143%,1,14.2857%,7,100% a: ,7,100%,0,0%,7,100% b: g1,5,71.4286%,2,28.5714%,7,100% b: ,6,85.7143%,1,14.2857%,7,100% Table: Report ,g1,N a,1.00,2.00 ,2.00,4.00 b,1.00,2.00 ,2.00,3.00 Table: Report ,N a,6.00 b,5.00 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% b: g1,7,100%,0,0%,7,100% b: ,7,100%,0,0%,7,100% Table: Report ,g1,N a,1.00,2.00 ,2.00,4.00 ,9.00,1.00 b,1.00,2.00 ,2.00,4.00 ,9.00,1.00 Table: Report ,N a,7.00 b,7.00 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% b: g1,6,85.7143%,1,14.2857%,7,100% b: ,6,85.7143%,1,14.2857%,7,100% Table: Report ,g1,N a,1.00,2.00 ,2.00,4.00 ,9.00,1.00 b,1.00,2.00 ,2.00,3.00 ,9.00,1.00 Table: Report ,N a,7.00 b,6.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/means.at:499" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_566 #AT_START_567 at_fn_group_banner 567 'means.at:573' \ "MEANS empty factor spec" " " 80 at_xfail=no ( $as_echo "567. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-bad.sps <<'_ATEOF' data list list /outcome *. begin data. 1 2 3 end data. MEANS TABLES = outcome BY. _ATEOF { set +x $as_echo "$at_srcdir/means.at:587: pspp -O format=csv means-bad.sps" at_fn_check_prepare_trace "means.at:587" ( $at_check_trace; pspp -O format=csv means-bad.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/means.at:587" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_567 #AT_START_568 at_fn_group_banner 568 'means.at:593' \ "MEANS parser bug" " " 80 at_xfail=no ( $as_echo "568. $at_setup_line: testing $at_desc ..." $at_traceon cat >means-bad.sps <<'_ATEOF' DATA LIST notable LIST /a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 fylo *. begin data. 1 2 3 4 5 6 7 8 9 0 11 end data. MEANS TABLES = a1 a2 a3 a4 a5 a6 a7 a8 a9 a10a BY fylo. _ATEOF { set +x $as_echo "$at_srcdir/means.at:605: pspp -O format=csv means-bad.sps" at_fn_check_prepare_trace "means.at:605" ( $at_check_trace; pspp -O format=csv means-bad.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/means.at:605" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_568 #AT_START_569 at_fn_group_banner 569 'npar.at:19' \ "NPAR TESTS BINOMIAL P < 0.5; N1/N2 < 1" " " 81 at_xfail=no ( $as_echo "569. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x * w *. BEGIN DATA. 1 6 2 15 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.3) = x . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:35: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:35" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1.000,6.000,.286,.300,.551 ,Group2,2.000,15.000,.714,, ,Total,,21.000,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_569 #AT_START_570 at_fn_group_banner 570 'npar.at:44' \ "NPAR TESTS BINOMIAL P < 0.5; N1/N2 > 1" " " 81 at_xfail=no ( $as_echo "570. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 7 2 6 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.4) = x . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:60: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:60" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1,7,.538,.400,.229 ,Group2,2,6,.462,, ,Total,,13,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:60" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_570 #AT_START_571 at_fn_group_banner 571 'npar.at:69' \ "NPAR TESTS BINOMIAL P < 0.5; N1/N2 = 1" " " 81 at_xfail=no ( $as_echo "571. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 8 2 8 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.4) = x . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:85: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:85" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1,8,.500,.400,.284 ,Group2,2,8,.500,, ,Total,,16,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:85" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_571 #AT_START_572 at_fn_group_banner 572 'npar.at:94' \ "NPAR TESTS BINOMIAL P > 0.5; N1/N2 < 1" " " 81 at_xfail=no ( $as_echo "572. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 11 2 12 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.6) = x . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:110: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:110" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1,11,.478,.600,.164 ,Group2,2,12,.522,, ,Total,,23,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:110" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_572 #AT_START_573 at_fn_group_banner 573 'npar.at:119' \ "NPAR TESTS BINOMIAL P > 0.5; N1/N2 > 1" " " 81 at_xfail=no ( $as_echo "573. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 11 2 9 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.6) = x. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:134: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:134" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1,11,.550,.600,.404 ,Group2,2,9,.450,, ,Total,,20,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:134" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_573 #AT_START_574 at_fn_group_banner 574 'npar.at:143' \ "NPAR TESTS BINOMIAL P > 0.5; N1/N2 = 1" " " 81 at_xfail=no ( $as_echo "574. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 11 2 11 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.6) = x. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:158: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:158" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1,11,.500,.600,.228 ,Group2,2,11,.500,, ,Total,,22,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:158" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_574 #AT_START_575 at_fn_group_banner 575 'npar.at:167' \ "NPAR TESTS BINOMIAL P = 0.5; N1/N2 < 1" " " 81 at_xfail=no ( $as_echo "575. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 8 2 15 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL = x . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:183: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:183" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed) x,Group1,1,8,.348,.500,.210 ,Group2,2,15,.652,, ,Total,,23,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:183" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_575 #AT_START_576 at_fn_group_banner 576 'npar.at:192' \ "NPAR TESTS BINOMIAL P = 0.5; N1/N2 > 1" " " 81 at_xfail=no ( $as_echo "576. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 12 2 6 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.5) = x. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:207: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:207" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed) x,Group1,1,12,.667,.500,.238 ,Group2,2,6,.333,, ,Total,,18,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:207" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_576 #AT_START_577 at_fn_group_banner 577 'npar.at:216' \ "NPAR TESTS BINOMIAL P = 0.5; N1/N2 = 1" " " 81 at_xfail=no ( $as_echo "577. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 10 2 10 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.5) = x . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:232: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:232" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed) x,Group1,1,10,.500,.500,1.000 ,Group2,2,10,.500,, ,Total,,20,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:232" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_577 #AT_START_578 at_fn_group_banner 578 'npar.at:241' \ "NPAR TESTS BINOMIAL P = 0.5; N1/N2 = 1 Cutpoint" "" 81 at_xfail=no ( $as_echo "578. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x * w *. BEGIN DATA. 9 3 10 7 11 16 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.5) = x (10) . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:258: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:258" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed) x,Group1,<= 10,10.000,.385,.500,.327 ,Group2,,16.000,.615,, ,Total,,26.000,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:258" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_578 #AT_START_579 at_fn_group_banner 579 'npar.at:267' \ "NPAR TESTS BINOMIAL P = 0.5; N1/N2 = 1 Named values" "" 81 at_xfail=no ( $as_echo "579. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' SET FORMAT F8.3. DATA LIST LIST NOTABLE /x * w *. BEGIN DATA. 10 10 15 45 20 13 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.5) = x (10, 20) . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:284: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:284" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed) x,Group1,10.000,10.000,.435,.500,.678 ,Group2,20.000,13.000,.565,, ,Total,,23.000,1.000,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:284" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_579 #AT_START_580 at_fn_group_banner 580 'npar.at:296' \ "NPAR TESTS BINOMIAL - crash" " " 81 at_xfail=no ( $as_echo "580. $at_setup_line: testing $at_desc ..." $at_traceon cat >nparX.sps <<'_ATEOF' data list list /range *. begin data. 0 1 end data. * This is invalid syntax NPAR TEST /BINOMIAL(0.5) = Range(). _ATEOF { set +x $as_echo "$at_srcdir/npar.at:309: pspp -O format=csv nparX.sps" at_fn_check_prepare_trace "npar.at:309" ( $at_check_trace; pspp -O format=csv nparX.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/npar.at:309" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_580 #AT_START_581 at_fn_group_banner 581 'npar.at:315' \ "NPAR TESTS CHISQUARE" " " 81 at_xfail=no ( $as_echo "581. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' DATA LIST NOTABLE LIST /x * y * w *. BEGIN DATA. 1 2 1 2 1 3 3.1 1 4 3.2 2 1 4 2 2 5 3 1 1 4 2 END DATA. WEIGHT BY w. NPAR TESTS CHISQUARE=x y . NPAR TESTS CHISQUARE=y /EXPECTED=3 4 5 4 . NPAR TESTS CHISQUARE=x y(2, 4) /EXPECTED = 6 10 3 . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:345: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:345" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: x ,Observed N,Expected N,Residual 1.00,3.00,2.33,.67 2.00,3.00,2.33,.67 3.10,4.00,2.33,1.67 3.20,1.00,2.33,-1.33 4.00,2.00,2.33,-.33 5.00,1.00,2.33,-1.33 Total,14.00,, Table: y ,Observed N,Expected N,Residual 1.00,7.00,3.50,3.50 2.00,4.00,3.50,.50 3.00,1.00,3.50,-2.50 4.00,2.00,3.50,-1.50 Total,14.00,, Table: Test Statistics ,x,y Chi-Square,3.14,6.00 df,5,3 Asymp. Sig.,.678,.112 Table: y ,Observed N,Expected N,Residual 1.00,7.00,2.63,4.38 2.00,4.00,3.50,.50 3.00,1.00,4.38,-3.38 4.00,2.00,3.50,-1.50 Total,14.00,, Table: Test Statistics ,y Chi-Square,10.61 df,3 Asymp. Sig.,.014 Table: Frequencies ,x,,,,y,,, ,Category,Observed N,Expected N,Residual,Category,Observed N,Expected N,Residual 1,2.00,3.00,3.16,-.16,2.00,4.00,2.21,1.79 2,3.00,5.00,5.26,-.26,3.00,1.00,3.68,-2.68 3,4.00,2.00,1.58,.42,4.00,2.00,1.11,.89 Total,,10.00,,,,7.00,, Table: Test Statistics ,x,y Chi-Square,.13,4.13 df,2,2 Asymp. Sig.,.936,.127 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:345" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_581 #AT_START_582 at_fn_group_banner 582 'npar.at:401' \ "NPAR TESTS CHISQUARE expected values missing" " " 81 at_xfail=no ( $as_echo "582. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' DATA LIST NOTABLE LIST /x * y * w *. BEGIN DATA. 1 2 1 2 1 3 3.1 1 4 3.2 2 1 4 2 2 5 3 1 1 4 2 END DATA. WEIGHT BY w. NPAR TESTS CHISQUARE=y /EXPECTED = 3 4 5 4 3 1 . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:422: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:422" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"error: CHISQUARE test specified 6 expected values, but 4 distinct values were encountered in variable y.\" Table: Test Statistics ,y Chi-Square,.00 df,0 Asymp. Sig.,1.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/npar.at:422" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_582 #AT_START_583 at_fn_group_banner 583 'npar.at:434' \ "NPAR TESTS CHISQUARE with DESCRIPTIVES" " " 81 at_xfail=no ( $as_echo "583. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' DATA LIST NOTABLE LIST /x * y * w * . BEGIN DATA. 1 2 1 2 1 3 3.1 1 4 3.2 2 1 4 2 2 5 3 1 1 4 2 . 5 1 END DATA. WEIGHT BY w. MISSING VALUES x (4). NPAR TESTS CHISQUARE=x y(-2,5) /MISSING=ANALYSIS /STATISTICS=DESCRIPTIVES . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:459: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:459" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Frequencies ,x,,,,y,,, ,Category,Observed N,Expected N,Residual,Category,Observed N,Expected N,Residual 1,-2.00,.00,1.50,-1.50,-2.00,.00,1.88,-1.88 2,-1.00,.00,1.50,-1.50,-1.00,.00,1.88,-1.88 3,.00,.00,1.50,-1.50,.00,.00,1.88,-1.88 4,1.00,3.00,1.50,1.50,1.00,7.00,1.88,5.13 5,2.00,3.00,1.50,1.50,2.00,4.00,1.88,2.13 6,3.00,5.00,1.50,3.50,3.00,1.00,1.88,-.88 7,4.00,.00,1.50,-1.50,4.00,2.00,1.88,.13 8,5.00,1.00,1.50,-.50,5.00,1.00,1.88,-.88 Total,,12.00,,,,15.00,, Table: Test Statistics ,x,y Chi-Square,17.33,22.87 df,7,7 Asymp. Sig.,.015,.002 Table: Descriptive Statistics ,N,Mean,Std. Deviation,Minimum,Maximum ,,,,, x,12.00,2.47,1.19,1.00,5.00 y,15.00,2.07,1.33,1.00,5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:459" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_583 #AT_START_584 at_fn_group_banner 584 'npar.at:487' \ "NPAR TESTS CHISQUARE, listwise missing" " " 81 at_xfail=no ( $as_echo "584. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' DATA LIST NOTABLE LIST /x * y * w * . BEGIN DATA. 1 2 1 2 1 3 3.1 1 4 3.2 2 1 4 2 2 5 3 1 1 4 2 . 5 1 END DATA. WEIGHT BY w. * MISSING VALUES x (4). NPAR TESTS CHISQUARE=x y(-2,5) /MISSING=LISTWISE /STATISTICS=DESCRIPTIVES . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:512: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:512" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Frequencies ,x,,,,y,,, ,Category,Observed N,Expected N,Residual,Category,Observed N,Expected N,Residual 1,-2.00,.00,1.75,-1.75,-2.00,.00,1.75,-1.75 2,-1.00,.00,1.75,-1.75,-1.00,.00,1.75,-1.75 3,.00,.00,1.75,-1.75,.00,.00,1.75,-1.75 4,1.00,3.00,1.75,1.25,1.00,7.00,1.75,5.25 5,2.00,3.00,1.75,1.25,2.00,4.00,1.75,2.25 6,3.00,5.00,1.75,3.25,3.00,1.00,1.75,-.75 7,4.00,2.00,1.75,.25,4.00,2.00,1.75,.25 8,5.00,1.00,1.75,-.75,5.00,.00,1.75,-1.75 Total,,14.00,,,,14.00,, Table: Test Statistics ,x,y Chi-Square,13.43,26.00 df,7,7 Asymp. Sig.,.062,.001 Table: Descriptive Statistics ,N,Mean,Std. Deviation,Minimum,Maximum ,,,,, x,14.00,2.69,1.23,1.00,5.00 y,14.00,1.86,1.10,1.00,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:512" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_584 #AT_START_585 at_fn_group_banner 585 'npar.at:540' \ "NPAR TESTS WILCOXON" " " 81 at_xfail=no ( $as_echo "585. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' data list notable list /foo * bar * w (f8.0). begin data. 1.00 1.00 1 1.00 2.00 1 2.00 1.00 1 1.00 4.00 1 2.00 5.00 1 1.00 19.00 1 2.00 7.00 1 4.00 5.00 1 1.00 12.00 1 2.00 13.00 1 2.00 2.00 1 12.00 .00 2 12.00 1.00 1 13.00 1.00 1 end data variable labels foo "first" bar "second". weight by w. npar test /wilcoxon=foo with bar (paired) /missing analysis /method=exact. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:570: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:570" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Ranks ,,N,Mean Rank,Sum of Ranks first - second,Negative Ranks,8,6.00,48.00 ,Positive Ranks,5,8.60,43.00 ,Ties,2,, ,Total,15,, Table: Test Statistics ,first - second Z,-.18 Asymp. Sig. (2-tailed),.861 Exact Sig. (2-tailed),.893 Exact Sig. (1-tailed),.446 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:570" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_585 #AT_START_586 at_fn_group_banner 586 'npar.at:588' \ "NPAR TESTS WILCOXON with missing values" " " 81 at_xfail=no ( $as_echo "586. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' data list notable list /foo * bar * dummy *. begin data. 1.00 1.00 1 1.00 2.00 1 2.00 1.00 1 1.00 4.00 . 2.00 5.00 . 1.00 19.00 . 2.00 7.00 1 4.00 5.00 1 1.00 12.00 1 2.00 13.00 1 2.00 2.00 1 12.00 .00 1 12.00 .00 1 34.2 . 1 12.00 1.00 1 13.00 1.00 1 end data variable labels foo "first" bar "second". npar test /wilcoxon=foo with bar (paired) /missing analysis /method=exact. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:619: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:619" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Ranks ,,N,Mean Rank,Sum of Ranks first - second,Negative Ranks,8,6.00,48.00 ,Positive Ranks,5,8.60,43.00 ,Ties,2,, ,Total,15,, Table: Test Statistics ,first - second Z,-.18 Asymp. Sig. (2-tailed),.861 Exact Sig. (2-tailed),.893 Exact Sig. (1-tailed),.446 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:619" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_586 #AT_START_587 at_fn_group_banner 587 'npar.at:636' \ "NPAR TESTS SIGN" " " 81 at_xfail=no ( $as_echo "587. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' set format = F9.3. data list notable list /age * height rank *. begin data. 10 12 11 12 13 13 13 14 12 12 12 10 9 9 10 10.3 10.2 12 end data. npar tests /sign=age height WITH height rank (PAIRED) /MISSING ANALYSIS /METHOD=EXACT . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:656: pspp -o pspp.csv npar.sps" at_fn_check_prepare_trace "npar.at:656" ( $at_check_trace; pspp -o pspp.csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:656" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/npar.at:659: sed -e 's/\\.313\$/.312/' -e 's/^Exact Sig\\. (1-tailed),\\.313/Exact Sig. (1-tailed),.312/' pspp.csv" at_fn_check_prepare_dynamic "sed -e 's/\\.313$/.312/' -e 's/^Exact Sig\\. (1-tailed),\\.313/Exact Sig. (1-tailed),.312/' pspp.csv" "npar.at:659" ( $at_check_trace; sed -e 's/\.313$/.312/' -e 's/^Exact Sig\. (1-tailed),\.313/Exact Sig. (1-tailed),.312/' pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Frequencies ,,N age - height,Negative Differences,3 ,Positive Differences,1 ,Ties,2 ,Total,6 height - rank,Negative Differences,2 ,Positive Differences,3 ,Ties,1 ,Total,6 Table: Test Statistics ,age - height,height - rank Exact Sig. (2-tailed),.625,1.000 Exact Sig. (1-tailed),.312,.500 Point Probability,.250,.312 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:659" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_587 #AT_START_588 at_fn_group_banner 588 'npar.at:680' \ "NPAR Kruskal-Wallis test" " " 81 at_xfail=no ( $as_echo "588. $at_setup_line: testing $at_desc ..." $at_traceon cat >kw-simple.sps <<'_ATEOF' set format = F9.3. data list notable list /gv * xscore *. begin data 1 96 1 128 1 83 2 132 2 135 2 109 3 115 1 61 1 101 2 82 2 124 3 149 3 166 3 147 end data. value label /gv 1 "timed out" 2 "hit wicket" 3 "handled the ball". npar tests /kruskal-wallis xscore by gv (1, 3) . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:714: pspp -o pspp.csv kw-simple.sps" at_fn_check_prepare_trace "npar.at:714" ( $at_check_trace; pspp -o pspp.csv kw-simple.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:714" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/npar.at:715: cat pspp.csv" at_fn_check_prepare_trace "npar.at:715" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Ranks ,gv,N,Mean Rank xscore,timed out,5,4.400 ,hit wicket,5,7.400 ,handled the ball,4,11.500 ,Total,14, Table: Test Statistics ,,xscore Chi-Square,,6.406 df,,2 Asymp. Sig.,,.041 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:715" $at_failed && at_fn_log_failure $at_traceon; } cat >kw-missing-group.sps <<'_ATEOF' set format = F9.3. data list notable list /gv * xscore *. begin data 1 96 1 128 1 83 1 61 1 101 2 82 2 124 2 132 2 135 2 109 3 115 3 149 3 166 3 147 2.5 344 end data. missing values gv (2.5). value label /gv 1 "timed out" 2 "hit wicket" 3 "handled the ball". npar tests /kruskal-wallis xscore by gv (1, 3) /missing=exclude . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:767: pspp -o pspp2.csv kw-missing-group.sps" at_fn_check_prepare_trace "npar.at:767" ( $at_check_trace; pspp -o pspp2.csv kw-missing-group.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:767" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/npar.at:770: diff pspp.csv pspp2.csv" at_fn_check_prepare_trace "npar.at:770" ( $at_check_trace; diff pspp.csv pspp2.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:770" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_588 #AT_START_589 at_fn_group_banner 589 'npar.at:775' \ "NPAR Kruskal-Wallis multiple-variables" " " 81 at_xfail=no ( $as_echo "589. $at_setup_line: testing $at_desc ..." $at_traceon cat >kw-multi.sps <<'_ATEOF' set format = F9.3. data list notable list /gv * xscore * yscore. begin data 1 96 . 1 128 . 1 83 . 2 132 132 2 135 135 2 109 109 3 115 115 1 61 . 1 101 . 2 82 82 2 124 124 3 149 149 3 166 166 3 147 147 4 . 96 4 . 128 4 . 83 4 . 61 4 . 101 end data. value label /gv 1 "timed out" 2 "hit wicket" 3 "handled the ball" 4 "bowled" 5 "lbw" . npar tests /k-w xscore yscore by gv (1, 5) . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:818: pspp -o pspp.csv kw-multi.sps" at_fn_check_prepare_trace "npar.at:818" ( $at_check_trace; pspp -o pspp.csv kw-multi.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:818" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/npar.at:819: cat pspp.csv" at_fn_check_prepare_trace "npar.at:819" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Ranks ,gv,N,Mean Rank xscore,timed out,5,4.400 ,hit wicket,5,7.400 ,handled the ball,4,11.500 ,Total,14, yscore,hit wicket,5,7.400 ,handled the ball,4,11.500 ,bowled,5,4.400 ,Total,14, Table: Test Statistics ,,xscore,yscore, Chi-Square,,6.406,6.406, df,,2,2, Asymp. Sig.,,.041,.041, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:819" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_589 #AT_START_590 at_fn_group_banner 590 'npar.at:842' \ "NPAR TESTS Runs" " " 81 at_xfail=no ( $as_echo "590. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar-runs.sps <<'_ATEOF' set format F11.4. data list notable list /score * w *. begin data 4 6 . 4 4 3 3 20 2 29 1 42 6 18 5 7 6 78 5 10 6 46 5 5 6 17 5 1 6 11 4 2 3 7 2 6 1 10 4 13 3 22 3 11 2 24 1 18 4 4 3 12 2 10 1 25 4 4 3 7 2 3 1 4 4 2 3 3 2 2 1 4 end data. weight by w. npar tests /runs (MEDIAN) = score /runs (MEAN) = score /runs (MODE) = score . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:894: pspp -O format=csv npar-runs.sps" at_fn_check_prepare_trace "npar.at:894" ( $at_check_trace; pspp -O format=csv npar-runs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Runs Test ,score Test Value (median),3.0000 Cases < Test Value,177.0000 Cases ≥ Test Value,309.0000 Total Cases,486.0000 Number of Runs,12 Z,-20.9931 Asymp. Sig. (2-tailed),2.000 Table: Runs Test ,score Test Value (mean),3.6379 Cases < Test Value,259.0000 Cases ≥ Test Value,227.0000 Total Cases,486.0000 Number of Runs,12 Z,-21.0650 Asymp. Sig. (2-tailed),2.000 Table: Runs Test ,score Test Value (mode),6.0000 Cases < Test Value,316.0000 Cases ≥ Test Value,170.0000 Total Cases,486.0000 Number of Runs,11 Z,-21.0742 Asymp. Sig. (2-tailed),2.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:894" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_590 #AT_START_591 at_fn_group_banner 591 'npar.at:930' \ "NPAR TESTS Runs (2)" " " 81 at_xfail=no ( $as_echo "591. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar-runs.sps <<'_ATEOF' data list notable free /y. begin data 1 1 2 1 2 1 1 2 1 1 1 2 1 2 end data. NPAR TEST /RUNS(1.5) = y. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:939: pspp -O format=csv npar-runs.sps" at_fn_check_prepare_trace "npar.at:939" ( $at_check_trace; pspp -O format=csv npar-runs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Runs Test ,y Test Value,1.50 Cases < Test Value,9 Cases ≥ Test Value,5 Total Cases,14 Number of Runs,10 Z,1.26 Asymp. Sig. (2-tailed),.206 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:939" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_591 #AT_START_592 at_fn_group_banner 592 'npar.at:953' \ "NPAR TESTS Friedman" " " 81 at_xfail=no ( $as_echo "592. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar-friedman.sps <<'_ATEOF' set format F15.4. data list notable list /x * y * z. begin data 9.5 6.5 8.1 8.0 6.0 6.0 7.0 6.5 4.2 9.5 5.0 7.3 9.0 7.0 6.2 8.5 6.9 6.5 7.5 8.0 6.5 6.0 8.0 3.1 5.0 6.0 4.9 7.5 7.5 6.2 end data. npar tests /friedman = x y z. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:974: pspp -O format=csv npar-friedman.sps" at_fn_check_prepare_trace "npar.at:974" ( $at_check_trace; pspp -O format=csv npar-friedman.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Ranks ,Mean Rank x,2.6500 y,2.1000 z,1.2500 Table: Test Statistics N,10 Chi-Square,10.4737 df,2 Asymp. Sig.,.005 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:974" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_592 #AT_START_593 at_fn_group_banner 593 'npar.at:992' \ "NPAR TESTS Mann-Whitney" " " 81 at_xfail=no ( $as_echo "593. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar-mann-whitney.sps <<'_ATEOF' SET FORMAT = F11.4 data list notable list /height * sex (f1.0). begin data. 201 1 84 1 83 1 94 1 88 0 99 0 55 0 69 0 86 1 79 1 91 0 201 0 88 1 85 1 82 1 88 0 75 0 99 0 81 0 72 1 89 1 92 1 80 0 82 0 76 0 65 0 85 0 76 1 145 1 24 1 1 4 -4 5 34 5 21 4 end data. NPAR TESTS /M-W = height BY sex (0,1). _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1038: pspp -O format=csv npar-mann-whitney.sps" at_fn_check_prepare_trace "npar.at:1038" ( $at_check_trace; pspp -O format=csv npar-mann-whitney.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Ranks ,N,,,Mean Rank,,Sum of Ranks, ,0,1,Total,0,1,0,1 height,15.0000,15.0000,30.0000,14.5333,16.4667,218.0000,247.0000 Table: Test Statistics ,Mann-Whitney U,Wilcoxon W,Z,Asymp. Sig. (2-tailed) height,98.0000,218.0000,-.6020,.547 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1038" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_593 #AT_START_594 at_fn_group_banner 594 'npar.at:1053' \ "NPAR TESTS Mann-Whitney Multiple" " " 81 at_xfail=no ( $as_echo "594. $at_setup_line: testing $at_desc ..." $at_traceon cp $abs_srcdir/language/mann-whitney.txt . cat >npar-mann-whitney.sps <<'_ATEOF' SET FORMAT = F11.3 DATA LIST NOTABLE FILE='mann-whitney.txt' LIST /I002_01 I002_02 I002_03 I002_04 sum_HL *. VARIABLE LABELS I002_01 'IOS: Familie' I002_02 'IOS: Freunde' I002_03 'IOS: Partner*in' I002_04 'IOS: Bekannte'. MISSING VALUES I002_01 I002_02 I002_03 I002_04 (-9 -1). NPAR TESTS /MISSING=ANALYSIS /M-W=I002_01 I002_02 I002_03 I002_04 BY sum_HL (0 1). _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1078: pspp -O format=csv npar-mann-whitney.sps" at_fn_check_prepare_trace "npar.at:1078" ( $at_check_trace; pspp -O format=csv npar-mann-whitney.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Ranks ,N,,,Mean Rank,,Sum of Ranks, ,.000,1.000,Total,.000,1.000,.000,1.000 IOS: Familie,114.000,115.000,229.000,110.018,119.939,12542.000,13793.000 IOS: Freunde,115.000,115.000,230.000,108.339,122.661,12459.000,14106.000 IOS: Partner*in,97.000,91.000,188.000,95.351,93.593,9249.000,8517.000 IOS: Bekannte,115.000,115.000,230.000,111.065,119.935,12772.500,13792.500 Table: Test Statistics ,Mann-Whitney U,Wilcoxon W,Z,Asymp. Sig. (2-tailed) IOS: Familie,5987.000,12542.000,-1.167,.243 IOS: Freunde,5789.000,12459.000,-1.674,.094 IOS: Partner*in,4331.000,8517.000,-.245,.807 IOS: Bekannte,6102.500,12772.500,-1.046,.296 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1078" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_594 #AT_START_595 at_fn_group_banner 595 'npar.at:1099' \ "NPAR TESTS Cochran" " " 81 at_xfail=no ( $as_echo "595. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar-cochran.sps <<'_ATEOF' set format f11.3. data list notable list /v1 * v2 * v3 * v4 * v5 * v6 * v7 *. begin data. 2 1 1 2 1 1 2 2 2 2 2 1 1 1 1 1 2 2 1 1 2 2 2 2 2 1 1 2 2 1 2 1 1 2 1 1 2 2 1 1 1 1 1 2 2 2 2 2 2 2 2 1 2 1 1 1 1 2 1 2 1 1 2 end data. npar tests /cochran = v1 to v7 . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1121: pspp -o pspp.csv npar-cochran.sps" at_fn_check_prepare_trace "npar.at:1121" ( $at_check_trace; pspp -o pspp.csv npar-cochran.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1121" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/npar.at:1123: cat pspp.csv" at_fn_check_prepare_trace "npar.at:1123" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Frequencies ,Value, ,Success (2),Failure (1) v1,5,4 v2,6,3 v3,6,3 v4,7,2 v5,1,8 v6,2,7 v7,5,4 Table: Test Statistics N,9 Cochran's Q,12.735 df,6 Asymp. Sig.,.047 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1123" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_595 #AT_START_596 at_fn_group_banner 596 'npar.at:1146' \ "NPAR TESTS Kendall" " " 81 at_xfail=no ( $as_echo "596. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar-kendall.sps <<'_ATEOF' SET FORMAT F14.3. data list notable list /v1 * v2 * v3 begin data. 7 7 2 5 6 5 8 6 4 5 7 4 5 4 4 8 6 5 6 3 5 7 6 5 8 5 5 . 2 2 5 4 5 3 4 4 5 1 2 5 2 1 7 6 5 6 3 4 6 6 6 5 4 5 4 3 4 9 1 1 6 2 1 3 7 8 6 3 4 4 4 4 5 4 3 6 5 2 4 4 8 4 6 4 6 5 5 7 8 6 5 3 5 end data. npar tests /kendall = all . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1190: pspp -o pspp.csv npar-kendall.sps" at_fn_check_prepare_trace "npar.at:1190" ( $at_check_trace; pspp -o pspp.csv npar-kendall.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1190" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/npar.at:1192: cat pspp.csv" at_fn_check_prepare_trace "npar.at:1192" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Ranks ,Mean Rank v1,2.500 v2,1.817 v3,1.683 Table: Test Statistics N,30 Kendall's W,.233 Chi-Square,13.960 df,2 Asymp. Sig.,.001 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1192" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_596 #AT_START_597 at_fn_group_banner 597 'npar.at:1211' \ "NPAR TESTS McNemar" " " 81 at_xfail=no ( $as_echo "597. $at_setup_line: testing $at_desc ..." $at_traceon cat >mcnemar.sps <<'_ATEOF' set format = F12.3. data list notable list /v1 * v2 * junk *. begin data. 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 end data. npar tests /mcnemar = v1 WITH v2 junk. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1243: pspp -O format=csv mcnemar.sps" at_fn_check_prepare_trace "npar.at:1243" ( $at_check_trace; pspp -O format=csv mcnemar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: v1 & v2 v1,v2, ,.000,1.000 .000,4,9 1.000,2,5 Table: v1 & junk v1,junk, ,.000,1.000 .000,8,5 1.000,2,5 Table: Test Statistics ,N,Exact Sig. (2-tailed),Exact Sig. (1-tailed),Point Probability v1 & v2,20,.065,.033,.027 v1 & junk,20,.453,.227,.164 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1243" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_597 #AT_START_598 at_fn_group_banner 598 'npar.at:1265' \ "NPAR TESTS Kolmogorov-Smirnov Uniform parameters given" "" 81 at_xfail=no ( $as_echo "598. $at_setup_line: testing $at_desc ..." $at_traceon cat >ks-uniform.sps <<'_ATEOF' set format F12.3. data list notable list /x *. begin data .554 .382 .329 .480 .711 .503 .203 .477 .621 .581 end data. npar tests k-s (uniform 0 1) = x. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1286: pspp -O format=csv ks-uniform.sps" at_fn_check_prepare_trace "npar.at:1286" ( $at_check_trace; pspp -O format=csv ks-uniform.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: One-Sample Kolmogorov-Smirnov Test ,,x N,,10 Uniform Parameters,Minimum,.000 ,Maximum,1.000 Most Extreme Differences,Absolute,.289 ,Positive,.289 ,Negative,-.229 Kolmogorov-Smirnov Z,,.914 Asymp. Sig. (2-tailed),,.374 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1286" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_598 #AT_START_599 at_fn_group_banner 599 'npar.at:1302' \ "NPAR TESTS Kolmogorov-Smirnov Normal parameters imputed" "" 81 at_xfail=no ( $as_echo "599. $at_setup_line: testing $at_desc ..." $at_traceon cat >ks-normal.sps <<'_ATEOF' set format = F12.3. data list notable list /foo * bar *. begin data. 65 12.5 59 14.2 43 12.6 57 68 79 51 62 57 73 58 58 68 75 47 70 59 71 52 48 13.0 58 14.1 37 15.0 39 13.1 58 13.2 43 14.5 58 13.5 86 14.0 63 12.5 80 12.8 70 63 53 53 48 49 51 47 81 66 78 65 69 70 12.1 63 12.5 64 12.4 39 13.8 51 13.2 68 14.0 76 12.6 53 12.1 71 13.5 47 13.8 87 14.1 72 12.9 48 12.1 75 12.8 51 13.4 63 13.9 61 12.5 61 12.4 66 12.8 82 12.9 81 13.6 46 52 71 73 58 57 46 58 52 13.5 71 13.2 57 12.8 78 14.1 73 12.1 50 12.6 71 51 51 68 84 64 66 65 52 56 70 68 66 78 65 71 53 81 53 57 64 61 43 56 37 74 66 81 67 80 68 76 70 80 42 74 80 70 60 39 72 69 63 72 63 49 53 13.2 43 13.8 51 12.5 63 12.6 64 12.9 65 13.0 64 12.5 66 12.0 55 62 58 48 67 46 36 61 55 77 74 60 70 69 57 49 63 69 63 76 53 54 42 64 66 61 62 73 73 60 79 40 48 76 60 76 54 69 65 69 51 54 82 end data. npar tests /k-s (normal) = foo bar. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1489: pspp -O format=csv ks-normal.sps" at_fn_check_prepare_trace "npar.at:1489" ( $at_check_trace; pspp -O format=csv ks-normal.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: One-Sample Kolmogorov-Smirnov Test ,,foo,bar N,,174,48 Normal Parameters,Mean,62.109,13.108 ,Std. Deviation,11.548,.718 Most Extreme Differences,Absolute,.059,.115 ,Positive,.055,.115 ,Negative,-.059,-.082 Kolmogorov-Smirnov Z,,.785,.795 Asymp. Sig. (2-tailed),,.569,.552 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1489" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_599 #AT_START_600 at_fn_group_banner 600 'npar.at:1506' \ "NPAR TESTS Median Test (median imputed)" " " 81 at_xfail=no ( $as_echo "600. $at_setup_line: testing $at_desc ..." $at_traceon cat >median1.sps <<'_ATEOF' set format F12.3. data list notable list /ignore * animal * years * w *. begin data 99 1 10 1 99 4 1 1 99 5 11 1 99 5 10 1 99 3 7 1 99 6 10 1 99 0 7 1 99 3 14 1 99 2 3 1 99 1 1 1 99 4 7 1 99 5 12 1 99 3 6 1 99 4 1 1 99 3 5 1 99 5 7 1 99 4 6 1 99 3 14 1 99 4 8 1 99 5 13 1 99 2 0 1 99 4 7 1 99 4 7 1 99 1 0 1 99 2 8 1 99 4 10 1 99 2 3 1 99 2 0 1 99 4 8 1 99 1 8 1 end data. variable label years 'Years expected'. variable label animal 'Animal Genus'. add value labels animal 1 'Animal 1' 2 'Animal 2' 3 'Animal 3' 4 'Animal 4' 5 'Animal 5'. npar tests /median = years by animal (1, 5) . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1556: pspp -O format=csv median1.sps" at_fn_check_prepare_trace "npar.at:1556" ( $at_check_trace; pspp -O format=csv median1.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Frequencies ,,Animal Genus,,,, ,,Animal 1,Animal 2,Animal 3,Animal 4,Animal 5 Years expected,> Median,2,1,2,3,4 ,≤ Median,2,4,3,6,1 Table: Test Statistics ,N,Median,Chi-Square,df,Asymp. Sig. Years expected,28,7.000,4.317,4,.365 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1556" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_600 #AT_START_601 at_fn_group_banner 601 'npar.at:1571' \ "NPAR TESTS Median Test (median given)" " " 81 at_xfail=no ( $as_echo "601. $at_setup_line: testing $at_desc ..." $at_traceon cat >median2.sps <<'_ATEOF' set format F12.3. data list notable list /ignore * animal * years * w *. begin data 99 1 10 1 99 4 1 1 99 5 11 1 99 5 10 1 99 3 7 1 99 3 14 1 99 2 3 1 99 1 1 1 99 4 7 1 99 5 12 1 99 3 6 1 99 4 1 1 99 3 5 1 99 5 7 1 99 4 6 1 99 3 14 1 99 4 8 1 99 5 13 1 99 2 0 1 99 4 7 1 99 4 7 1 99 1 0 1 99 2 8 1 99 4 10 1 99 2 3 1 99 2 0 1 99 4 8 1 99 1 8 1 end data. variable label years 'Years expected'. variable label animal 'Animal Genus'. add value labels animal 1 'Animal 1' 2 'Animal 2' 3 'Animal 3' 4 'Animal 4' 5 'Animal 5'. npar tests /median (7) = years by animal (1, 5) . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1619: pspp -O format=csv median2.sps" at_fn_check_prepare_trace "npar.at:1619" ( $at_check_trace; pspp -O format=csv median2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Frequencies ,,Animal Genus,,,, ,,Animal 1,Animal 2,Animal 3,Animal 4,Animal 5 Years expected,> Median,2,1,2,3,4 ,≤ Median,2,4,3,6,1 Table: Test Statistics ,N,Median,Chi-Square,df,Asymp. Sig. Years expected,28,7.000,4.317,4,.365 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1619" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_601 #AT_START_602 at_fn_group_banner 602 'npar.at:1634' \ "NPAR TESTS Median Test (two sample)" " " 81 at_xfail=no ( $as_echo "602. $at_setup_line: testing $at_desc ..." $at_traceon cat >median3.sps <<'_ATEOF' set format F12.3. data list notable list /xx * animal * years * w *. begin data 99 1 10 1 99 4 1 1 99 5 11 1 99 5 10 1 99 3 7 1 99 3 14 1 99 2 3 1 99 1 1 1 99 4 7 1 99 5 12 1 99 3 6 1 99 4 1 1 99 3 5 1 99 5 7 1 99 4 6 1 99 3 14 1 99 4 8 1 99 5 13 1 99 2 0 1 99 4 7 1 99 4 7 1 99 1 0 1 99 2 8 1 99 4 10 1 99 2 3 1 99 2 0 1 99 4 8 1 99 1 8 1 end data. variable label years 'Years expected'. variable label animal 'Animal Genus'. add value labels animal 1 'Animal 1' 2 'Animal 2' 3 'Animal 3' 4 'Animal 4' 5 'Animal 5'. npar tests /median (7) = xx years by animal (5, 1) . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1682: pspp -O format=csv median3.sps" at_fn_check_prepare_trace "npar.at:1682" ( $at_check_trace; pspp -O format=csv median3.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Frequencies ,,Animal Genus, ,,Animal 1,Animal 5 xx,> Median,4,5 ,≤ Median,0,0 Years expected,> Median,2,4 ,≤ Median,2,1 Table: Test Statistics ,N,Median,Chi-Square,df,Asymp. Sig. xx,9,7.000,NaN,1,NaN Years expected,9,7.000,.900,1,.343 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1682" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_602 #AT_START_603 at_fn_group_banner 603 'npar.at:1700' \ "NPAR TESTS Jonckheere-Terpstra" " " 81 at_xfail=no ( $as_echo "603. $at_setup_line: testing $at_desc ..." $at_traceon cat >jt.sps <<'_ATEOF' set format = F12.3. data list notable list /x * g * w *. begin data. 52 2 2 58 2 1 60 2 1 62 2 1 58 0 1 44 2 1 46 2 1 14 3 1 32 2 1 16 3 1 56 2 1 26 3 1 40 3 2 50 4 1 6 5 1 34 2 3 36 2 2 40 2 2 50 2 1 end data. weight by w. npar test /jonckheere-terpstra = x by g (5, 2). _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1733: pspp -O format=csv jt.sps" at_fn_check_prepare_trace "npar.at:1733" ( $at_check_trace; pspp -O format=csv jt.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Jonckheere-Terpstra Test ,Number of levels in g,N,Observed J-T Statistic,Mean J-T Statistic,Std. Deviation of J-T Statistic,Std. J-T Statistic,Asymp. Sig. (2-tailed) x,4,24.000,29.500,65.000,15.902,-2.232,.026 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1733" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_603 #AT_START_604 at_fn_group_banner 604 'npar.at:1743' \ "NPAR TESTS (PAIRED)" " " 81 at_xfail=no ( $as_echo "604. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' set format = F12.3. data list notable list /a * b * c *. begin data. 1 2 4 4 5 3 1 2 2 4 5 1 end data. npar tests /wilcoxon a b with c c (paired). _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1757: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:1757" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Ranks ,,N,Mean Rank,Sum of Ranks a - c,Negative Ranks,2,2.500,5.000 ,Positive Ranks,2,2.500,5.000 ,Ties,0,, ,Total,4,, b - c,Negative Ranks,1,1.500,1.500 ,Positive Ranks,2,2.250,4.500 ,Ties,1,, ,Total,4,, Table: Test Statistics ,a - c,b - c Z,.000,-.816 Asymp. Sig. (2-tailed),1.000,.414 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/npar.at:1757" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_604 #AT_START_605 at_fn_group_banner 605 'npar.at:1780' \ "NPAR TESTS CHISQUARE crash" " " 81 at_xfail=no ( $as_echo "605. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' data list list /x *. begin data. 1 2 3 4 5 6 7 8 9 10 end data. * This happens to be invalid syntax. But should not crash. NPAR TEST /CHISQUARE= x(0.098, 99.098) /EXPECTED = 1.2. _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1804: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:1804" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/npar.at:1804" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_605 #AT_START_606 at_fn_group_banner 606 'npar.at:1809' \ "NPAR TESTS - crash on invalid syntax" " " 81 at_xfail=no ( $as_echo "606. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' data list notable list /ev * xscore *. begin data. 2 109 3 115 1 61 1 101 3 147 end data. npar tests /kruskal-wallis xscore by(gv (1, 3). _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1826: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:1826" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/npar.at:1826" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_606 #AT_START_607 at_fn_group_banner 607 'npar.at:1833' \ "NPAR TESTS - crash on unterminated string" " " 81 at_xfail=no ( $as_echo "607. $at_setup_line: testing $at_desc ..." $at_traceon cat >npar.sps <<'_ATEOF' DATA LIST NOTABLE LIST /x * y * w * . BEGIN DATA. 3.1 1 4 3.2 2 1 4 2 6 END DATA. NPAR TESTS " CHISQUARE=x y(-2,5) /STATISTICS=DESCRIPTIVES . _ATEOF { set +x $as_echo "$at_srcdir/npar.at:1850: pspp -O format=csv npar.sps" at_fn_check_prepare_trace "npar.at:1850" ( $at_check_trace; pspp -O format=csv npar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/npar.at:1850" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_607 #AT_START_608 at_fn_group_banner 608 'oneway.at:19' \ "ONEWAY basic operation" " " 82 at_xfail=no ( $as_echo "608. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway.sps <<'_ATEOF' DATA LIST NOTABLE LIST /QUALITY * BRAND * . BEGIN DATA 7 3 4 3 3 1 2 1 1 1 4 2 2 2 3 2 5 3 1 1 4 1 5 2 2 2 3 3 6 3 END DATA VARIABLE LABELS brand 'Manufacturer'. VARIABLE LABELS quality 'Breaking Strain'. VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'. ONEWAY quality BY brand /STATISTICS descriptives homogeneity /CONTRAST = -2 1 1 /CONTRAST = 0 -1 1 . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:53: pspp -O format=csv oneway.sps" at_fn_check_prepare_trace "oneway.at:53" ( $at_check_trace; pspp -O format=csv oneway.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum Breaking Strain,Aspeger,5,2.20,1.30,.58,.58,3.82,1.00,4.00 ,Bloggs,5,3.20,1.30,.58,1.58,4.82,2.00,5.00 ,Charlies,5,5.00,1.58,.71,3.04,6.96,3.00,7.00 ,Total,15,3.47,1.77,.46,2.49,4.45,1.00,7.00 Table: Test of Homogeneity of Variances ,Levene Statistic,df1,df2,Sig. Breaking Strain,.09,2,12,.913 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. Breaking Strain,Between Groups,20.13,2,10.07,5.12,.025 ,Within Groups,23.60,12,1.97,, ,Total,43.73,14,,, Table: Contrast Coefficients ,,Manufacturer,, ,,Aspeger,Bloggs,Charlies Contrast,1,-2,1,1 ,2,0,-1,1 Table: Contrast Tests ,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed) Breaking Strain,Assume equal variances,1,3.80,1.54,2.47,12,.029 ,,2,1.80,.89,2.03,12,.065 ,Does not assume equal,1,3.80,1.48,2.56,8.74,.031 ,,2,1.80,.92,1.96,7.72,.086 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:53" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_608 #AT_START_609 at_fn_group_banner 609 'oneway.at:88' \ "ONEWAY with splits" " " 82 at_xfail=no ( $as_echo "609. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway-splits.sps <<'_ATEOF' DATA LIST NOTABLE LIST /QUALITY * BRAND * S *. BEGIN DATA 3 1 1 2 1 1 1 1 1 1 1 1 4 1 1 5 2 1 2 2 1 4 2 2 2 2 2 3 2 2 7 3 2 4 3 2 5 3 2 3 3 2 6 3 2 END DATA VARIABLE LABELS brand 'Manufacturer'. VARIABLE LABELS quality 'Breaking Strain'. VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'. SPLIT FILE by s. ONEWAY quality BY brand /STATISTICS descriptives homogeneity /CONTRAST = -2 2 /CONTRAST = -1 1 . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:124: pspp -O format=csv oneway-splits.sps" at_fn_check_prepare_trace "oneway.at:124" ( $at_check_trace; pspp -O format=csv oneway-splits.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Value,Label S,1.00, Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum Breaking Strain,Aspeger,5,2.20,1.30,.58,.58,3.82,1.00,4.00 ,Bloggs,2,3.50,2.12,1.50,-15.56,22.56,2.00,5.00 ,Total,7,2.57,1.51,.57,1.17,3.97,1.00,5.00 Table: Test of Homogeneity of Variances ,Levene Statistic,df1,df2,Sig. Breaking Strain,1.09,1,5,.345 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. Breaking Strain,Between Groups,2.41,1,2.41,1.07,.349 ,Within Groups,11.30,5,2.26,, ,Total,13.71,6,,, Table: Contrast Coefficients ,,Manufacturer, ,,Aspeger,Bloggs Contrast,1,-2,2 ,2,-1,1 Table: Contrast Tests ,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed) Breaking Strain,Assume equal variances,1,2.60,2.52,1.03,5,.349 ,,2,1.30,1.26,1.03,5,.349 ,Does not assume equal,1,2.60,3.22,.81,1.32,.539 ,,2,1.30,1.61,.81,1.32,.539 Variable,Value,Label S,2.00, Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum Breaking Strain,Bloggs,3,3.00,1.00,.58,.52,5.48,2.00,4.00 ,Charlies,5,5.00,1.58,.71,3.04,6.96,3.00,7.00 ,Total,8,4.25,1.67,.59,2.85,5.65,2.00,7.00 Table: Test of Homogeneity of Variances ,Levene Statistic,df1,df2,Sig. Breaking Strain,.92,1,6,.374 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. Breaking Strain,Between Groups,7.50,1,7.50,3.75,.101 ,Within Groups,12.00,6,2.00,, ,Total,19.50,7,,, Table: Contrast Coefficients ,,Manufacturer, ,,Bloggs,Charlies Contrast,1,-2,2 ,2,-1,1 Table: Contrast Tests ,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed) Breaking Strain,Assume equal variances,1,4.00,2.07,1.94,6,.101 ,,2,2.00,1.03,1.94,6,.101 ,Does not assume equal,1,4.00,1.83,2.19,5.88,.072 ,,2,2.00,.91,2.19,5.88,.072 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:124" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_609 #AT_START_610 at_fn_group_banner 610 'oneway.at:195' \ "ONEWAY with missing values" " " 82 at_xfail=no ( $as_echo "610. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway-missing1.sps <<'_ATEOF' DATA LIST NOTABLE LIST /v1 * v2 * dep * vn *. BEGIN DATA . . 1 4 3 3 1 2 2 2 1 2 1 1 1 2 1 1 1 2 4 4 1 2 5 5 2 2 2 2 2 2 4 4 2 2 2 2 2 2 3 3 2 2 7 7 3 2 4 4 3 2 5 5 3 2 3 3 3 2 6 6 3 2 END DATA ONEWAY v1 v2 BY dep /STATISTICS descriptives homogeneity /MISSING ANALYSIS . _ATEOF cat >oneway-missing2.sps <<'_ATEOF' DATA LIST NOTABLE LIST /v1 * v2 * dep * vn * . BEGIN DATA 4 . 1 2 3 3 1 2 2 2 1 2 1 1 1 2 1 1 1 2 4 4 1 2 5 5 2 2 2 2 2 2 4 4 2 2 2 2 2 2 3 3 2 2 7 7 3 2 4 4 3 2 5 5 3 2 3 3 3 2 6 6 3 2 END DATA ONEWAY v1 v2 BY dep /STATISTICS descriptives homogeneity /MISSING LISTWISE . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:255: pspp -O format=csv oneway-missing1.sps > first.out" at_fn_check_prepare_trace "oneway.at:255" ( $at_check_trace; pspp -O format=csv oneway-missing1.sps > first.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:255" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/oneway.at:257: pspp -O format=csv oneway-missing2.sps > second.out" at_fn_check_prepare_trace "oneway.at:257" ( $at_check_trace; pspp -O format=csv oneway-missing2.sps > second.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:257" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/oneway.at:259: diff first.out second.out" at_fn_check_prepare_trace "oneway.at:259" ( $at_check_trace; diff first.out second.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:259" $at_failed && at_fn_log_failure $at_traceon; } cat >oneway-missing3.sps <<'_ATEOF' DATA LIST NOTABLE LIST /v1 * v2 * dep * vn * . BEGIN DATA 4 2 . 2 3 3 1 2 2 2 1 2 1 1 1 2 1 1 1 2 4 4 1 2 5 5 2 2 2 2 2 2 4 4 2 2 2 2 2 2 3 3 2 2 7 7 3 2 4 4 3 2 5 5 3 4 3 3 3 2 6 6 3 2 END DATA ONEWAY v1 v2 BY dep /STATISTICS descriptives homogeneity /MISSING ANALYSIS . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:290: pspp -O format=csv oneway-missing3.sps > third.out" at_fn_check_prepare_trace "oneway.at:290" ( $at_check_trace; pspp -O format=csv oneway-missing3.sps > third.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:290" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/oneway.at:292: diff first.out third.out" at_fn_check_prepare_trace "oneway.at:292" ( $at_check_trace; diff first.out third.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:292" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_610 #AT_START_611 at_fn_group_banner 611 'oneway.at:300' \ "ONEWAY descriptives subcommand" " " 82 at_xfail=no ( $as_echo "611. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway-descriptives.sps <<'_ATEOF' DATA LIST NOTABLE LIST /QUALITY * BRAND * . BEGIN DATA 13 11 12 11 11 11 11 11 14 11 15 25 12 25 14 25 12 25 13 25 17 301 14 301 15 301 13 301 16 301 END DATA ONEWAY quality BY brand /STATISTICS descriptives . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:329: pspp -O format=csv oneway-descriptives.sps" at_fn_check_prepare_trace "oneway.at:329" ( $at_check_trace; pspp -O format=csv oneway-descriptives.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum QUALITY,11.00,5,12.20,1.30,.58,10.58,13.82,11.00,14.00 ,25.00,5,13.20,1.30,.58,11.58,14.82,12.00,15.00 ,301.00,5,15.00,1.58,.71,13.04,16.96,13.00,17.00 ,Total,15,13.47,1.77,.46,12.49,14.45,11.00,17.00 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. QUALITY,Between Groups,20.13,2,10.07,5.12,.025 ,Within Groups,23.60,12,1.97,, ,Total,43.73,14,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:329" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_611 #AT_START_612 at_fn_group_banner 612 'oneway.at:349' \ "ONEWAY homogeneity subcommand" " " 82 at_xfail=no ( $as_echo "612. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway-homogeneity.sps <<'_ATEOF' DATA LIST NOTABLE LIST /QUALITY * BRAND * . BEGIN DATA 13 11 12 11 11 11 11 11 14 11 15 25 12 25 14 25 12 25 13 25 17 301 14 301 15 301 13 301 16 301 END DATA ONEWAY quality BY brand /STATISTICS homogeneity . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:378: pspp -O format=csv oneway-homogeneity.sps" at_fn_check_prepare_trace "oneway.at:378" ( $at_check_trace; pspp -O format=csv oneway-homogeneity.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Test of Homogeneity of Variances ,Levene Statistic,df1,df2,Sig. QUALITY,.09,2,12,.913 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. QUALITY,Between Groups,20.13,2,10.07,5.12,.025 ,Within Groups,23.60,12,1.97,, ,Total,43.73,14,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:378" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_612 #AT_START_613 at_fn_group_banner 613 'oneway.at:394' \ "ONEWAY multiple variables" " " 82 at_xfail=no ( $as_echo "613. $at_setup_line: testing $at_desc ..." $at_traceon cat >multivar.sps <<'_ATEOF' DATA LIST notable LIST /x * y * z * g *. begin data. 1 1 0 10 1 1 9 10 9 1 2 10 1 1 3 20 1 1 8 20 1 1 1 20 1 1 2 20 0 1 3 20 1 1 4 30 0 1 5 30 1 1 6 30 0 1 7 30 1 2 8 30 2 2 9 30 1 2 1 30 1 2 0 30 1 2 2 40 8 2 3 40 1 2 4 40 1 2 9 40 9 2 8 40 7 3 7 40 2 3 6 40 3 3 5 40 end data. ONEWAY x y z by g /STATISTICS = DESCRIPTIVES HOMOGENEITY /CONTRAST 3 2 0 -5 /CONTRAST 2 -9 7 0 . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:434: pspp -o pspp.csv multivar.sps" at_fn_check_prepare_trace "oneway.at:434" ( $at_check_trace; pspp -o pspp.csv multivar.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:434" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/oneway.at:437: sed 's/^,Within Groups,3.88/,Within Groups,3.87/' pspp.csv" at_fn_check_prepare_trace "oneway.at:437" ( $at_check_trace; sed 's/^,Within Groups,3.88/,Within Groups,3.87/' pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum x,10.00,3,3.67,4.62,2.67,-7.81,15.14,1.00,9.00 ,20.00,5,.80,.45,.20,.24,1.36,.00,1.00 ,30.00,8,.88,.64,.23,.34,1.41,.00,2.00 ,40.00,8,4.00,3.42,1.21,1.14,6.86,1.00,9.00 ,Total,24,2.25,2.83,.58,1.05,3.45,.00,9.00 y,10.00,3,1.00,.00,.00,1.00,1.00,1.00,1.00 ,20.00,5,1.00,.00,.00,1.00,1.00,1.00,1.00 ,30.00,8,1.50,.53,.19,1.05,1.95,1.00,2.00 ,40.00,8,2.38,.52,.18,1.94,2.81,2.00,3.00 ,Total,24,1.63,.71,.15,1.32,1.93,1.00,3.00 z,10.00,3,3.67,4.73,2.73,-8.07,15.41,.00,9.00 ,20.00,5,3.40,2.70,1.21,.05,6.75,1.00,8.00 ,30.00,8,5.00,3.21,1.13,2.32,7.68,.00,9.00 ,40.00,8,5.50,2.45,.87,3.45,7.55,2.00,9.00 ,Total,24,4.67,2.99,.61,3.40,5.93,.00,9.00 Table: Test of Homogeneity of Variances ,Levene Statistic,df1,df2,Sig. x,18.76,3,20,.000 y,71.41,3,20,.000 z,.89,3,20,.463 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. x,Between Groups,56.16,3,18.72,2.92,.059 ,Within Groups,128.34,20,6.42,, ,Total,184.50,23,,, y,Between Groups,7.75,3,2.58,13.33,.000 ,Within Groups,3.87,20,.19,, ,Total,11.63,23,,, z,Between Groups,17.47,3,5.82,.62,.610 ,Within Groups,187.87,20,9.39,, ,Total,205.33,23,,, Table: Contrast Coefficients ,,g,,, ,,10.00,20.00,30.00,40.00 Contrast,1,3,2,0,-5 ,2,2,-9,7,0 Table: Contrast Tests ,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed) x,Assume equal variances,1,-7.40,6.67,1.11,20,.280 ,,2,6.26,12.32,.51,20,.617 ,Does not assume equal,1,-7.40,10.04,-.74,4.53,.497 ,,2,6.26,5.85,1.07,2.87,.366 y,Assume equal variances,1,-6.88,1.16,5.94,20,.000 ,,2,3.50,2.14,1.63,20,.118 ,Does not assume equal,1,-6.88,.91,-7.51,7.00,.000 ,,2,3.50,1.32,2.65,7.00,.033 z,Assume equal variances,1,-9.70,8.07,1.20,20,.243 ,,2,11.73,14.91,.79,20,.440 ,Does not assume equal,1,-9.70,9.57,-1.01,3.64,.373 ,,2,11.73,14.53,.81,9.88,.438 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:437" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_613 #AT_START_614 at_fn_group_banner 614 'oneway.at:502' \ "ONEWAY vs. weights" " " 82 at_xfail=no ( $as_echo "614. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway-unweighted.sps <<'_ATEOF' DATA LIST NOTABLE LIST /QUALITY * BRAND * W *. BEGIN DATA 3 1 1 2 1 1 1 1 1 1 1 1 4 1 1 5 2 1 2 2 1 4 2 1 4 2 1 4 2 1 2 2 1 2 2 1 3 2 1 7 3 1 4 3 1 5 3 1 5 3 1 3 3 1 6 3 1 END DATA. WEIGHT BY W. ONEWAY quality BY brand /STATISTICS descriptives homogeneity . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:536: pspp -o pspp-unweighted.csv oneway-unweighted.sps" at_fn_check_prepare_trace "oneway.at:536" ( $at_check_trace; pspp -o pspp-unweighted.csv oneway-unweighted.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:536" $at_failed && at_fn_log_failure $at_traceon; } cat >oneway-weighted.sps <<'_ATEOF' DATA LIST NOTABLE LIST /QUALITY * BRAND * W *. BEGIN DATA 3 1 1 2 1 1 1 1 2 4 1 1 5 2 1 2 2 1 4 2 3 2 2 2 3 2 1 7 3 1 4 3 1 5 3 2 3 3 1 6 3 1 END DATA. WEIGHT BY W. ONEWAY quality BY brand /STATISTICS descriptives homogeneity . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:565: pspp -o pspp-weighted.csv oneway-weighted.sps" at_fn_check_prepare_trace "oneway.at:565" ( $at_check_trace; pspp -o pspp-weighted.csv oneway-weighted.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:565" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/oneway.at:567: diff pspp-weighted.csv pspp-unweighted.csv" at_fn_check_prepare_trace "oneway.at:567" ( $at_check_trace; diff pspp-weighted.csv pspp-unweighted.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:567" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_614 #AT_START_615 at_fn_group_banner 615 'oneway.at:573' \ "ONEWAY posthoc LSD and BONFERRONI" " " 82 at_xfail=no ( $as_echo "615. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway-pig.sps <<'_ATEOF' SET FORMAT F12.3. data list notable list /pigmentation * family *. begin data. 36 1 39 1 43 1 38 1 37 1 46 2 47 2 47 2 47 2 43 2 40 3 50 3 44 3 48 3 50 3 45 4 53 4 56 4 52 4 56 4 end data. oneway pigmentation by family /statistics = descriptives /posthoc = lsd bonferroni alpha (0.05) . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:607: pspp -O format=csv oneway-pig.sps" at_fn_check_prepare_trace "oneway.at:607" ( $at_check_trace; pspp -O format=csv oneway-pig.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum pigmentation,1.000,5,38.600,2.702,1.208,35.245,41.955,36.000,43.000 ,2.000,5,46.000,1.732,.775,43.849,48.151,43.000,47.000 ,3.000,5,46.400,4.336,1.939,41.016,51.784,40.000,50.000 ,4.000,5,52.400,4.506,2.015,46.806,57.994,45.000,56.000 ,Total,20,45.850,5.967,1.334,43.057,48.643,36.000,56.000 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. pigmentation,Between Groups,478.950,3,159.650,12.927,.000 ,Within Groups,197.600,16,12.350,, ,Total,676.550,19,,, Table: Multiple Comparisons (pigmentation) ,,,Mean Difference,,,95% Confidence Interval, ,(I) family,(J) family,(I - J),Std. Error,Sig.,Lower Bound,Upper Bound LSD,1.000,2.000,-7.400,2.223,.004,-12.112,-2.688 ,,3.000,-7.800,2.223,.003,-12.512,-3.088 ,,4.000,-13.800,2.223,.000,-18.512,-9.088 ,2.000,1.000,7.400,2.223,.004,2.688,12.112 ,,3.000,-.400,2.223,.859,-5.112,4.312 ,,4.000,-6.400,2.223,.011,-11.112,-1.688 ,3.000,1.000,7.800,2.223,.003,3.088,12.512 ,,2.000,.400,2.223,.859,-4.312,5.112 ,,4.000,-6.000,2.223,.016,-10.712,-1.288 ,4.000,1.000,13.800,2.223,.000,9.088,18.512 ,,2.000,6.400,2.223,.011,1.688,11.112 ,,3.000,6.000,2.223,.016,1.288,10.712 Bonferroni,1.000,2.000,-7.400,2.223,.025,-14.086,-.714 ,,3.000,-7.800,2.223,.017,-14.486,-1.114 ,,4.000,-13.800,2.223,.000,-20.486,-7.114 ,2.000,1.000,7.400,2.223,.025,.714,14.086 ,,3.000,-.400,2.223,1.000,-7.086,6.286 ,,4.000,-6.400,2.223,.065,-13.086,.286 ,3.000,1.000,7.800,2.223,.017,1.114,14.486 ,,2.000,.400,2.223,1.000,-6.286,7.086 ,,4.000,-6.000,2.223,.095,-12.686,.686 ,4.000,1.000,13.800,2.223,.000,7.114,20.486 ,,2.000,6.400,2.223,.065,-.286,13.086 ,,3.000,6.000,2.223,.095,-.686,12.686 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:607" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_615 #AT_START_616 at_fn_group_banner 616 'oneway.at:655' \ "ONEWAY posthoc Tukey HSD and Games-Howell" " " 82 at_xfail=no ( $as_echo "616. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway-tukey.sps <<'_ATEOF' set format = f11.3. data list notable list /libido * dose *. begin data. 3 0 2 0 1 0 1 0 4 0 5 1 2 1 4 1 2 1 3 1 7 2 4 2 5 2 3 2 6 2 end data. variable label dose 'Dose of Viagra'. add value labels dose 0 'Placebo' 1 '1 Dose' 2 '2 Doses'. oneway libido by dose /posthoc tukey gh. _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:685: pspp -O format=csv oneway-tukey.sps" at_fn_check_prepare_trace "oneway.at:685" ( $at_check_trace; pspp -O format=csv oneway-tukey.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. libido,Between Groups,20.133,2,10.067,5.119,.025 ,Within Groups,23.600,12,1.967,, ,Total,43.733,14,,, Table: Multiple Comparisons (libido) ,,,Mean Difference,,,95% Confidence Interval, ,(I) Dose of Viagra,(J) Dose of Viagra,(I - J),Std. Error,Sig.,Lower Bound,Upper Bound Tukey HSD,Placebo,1 Dose,-1.000,.887,.516,-3.366,1.366 ,,2 Doses,-2.800,.887,.021,-5.166,-.434 ,1 Dose,Placebo,1.000,.887,.516,-1.366,3.366 ,,2 Doses,-1.800,.887,.147,-4.166,.566 ,2 Doses,Placebo,2.800,.887,.021,.434,5.166 ,,1 Dose,1.800,.887,.147,-.566,4.166 Games-Howell,Placebo,1 Dose,-1.000,.887,.479,-3.356,1.356 ,,2 Doses,-2.800,.887,.039,-5.439,-.161 ,1 Dose,Placebo,1.000,.887,.479,-1.356,3.356 ,,2 Doses,-1.800,.887,.185,-4.439,.839 ,2 Doses,Placebo,2.800,.887,.039,.161,5.439 ,,1 Dose,1.800,.887,.185,-.839,4.439 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:685" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_616 #AT_START_617 at_fn_group_banner 617 'oneway.at:711' \ "ONEWAY posthoc Sidak" " " 82 at_xfail=no ( $as_echo "617. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway-sidak.sps <<'_ATEOF' SET FORMAT F20.4. DATA LIST notable LIST /program score. BEGIN DATA. 1 9 1 12 1 14 1 11 1 13 2 10 2 6 2 9 2 9 2 10 3 12 3 14 3 11 3 13 3 11 4 9 4 8 4 11 4 7 4 8 END DATA. ONEWAY score BY program /MISSING ANALYSIS /POSTHOC = SIDAK. _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:745: pspp -O format=csv oneway-sidak.sps" at_fn_check_prepare_trace "oneway.at:745" ( $at_check_trace; pspp -O format=csv oneway-sidak.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. score,Between Groups,54.9500,3,18.3167,7.0449,.003 ,Within Groups,41.6000,16,2.6000,, ,Total,96.5500,19,,, Table: Multiple Comparisons (score) ,,,Mean Difference,,,95% Confidence Interval, ,(I) program,(J) program,(I - J),Std. Error,Sig.,Lower Bound,Upper Bound Šidák,1.0000,2.0000,3.0000,1.0198,.056,-.0575,6.0575 ,,3.0000,-.4000,1.0198,.999,-3.4575,2.6575 ,,4.0000,3.2000,1.0198,.038,.1425,6.2575 ,2.0000,1.0000,-3.0000,1.0198,.056,-6.0575,.0575 ,,3.0000,-3.4000,1.0198,.025,-6.4575,-.3425 ,,4.0000,.2000,1.0198,1.000,-2.8575,3.2575 ,3.0000,1.0000,.4000,1.0198,.999,-2.6575,3.4575 ,,2.0000,3.4000,1.0198,.025,.3425,6.4575 ,,4.0000,3.6000,1.0198,.017,.5425,6.6575 ,4.0000,1.0000,-3.2000,1.0198,.038,-6.2575,-.1425 ,,2.0000,-.2000,1.0198,1.000,-3.2575,2.8575 ,,3.0000,-3.6000,1.0198,.017,-6.6575,-.5425 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:745" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_617 #AT_START_618 at_fn_group_banner 618 'oneway.at:771' \ "ONEWAY posthoc Scheffe" " " 82 at_xfail=no ( $as_echo "618. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway-scheffe.sps <<'_ATEOF' set format = f11.3. data list notable list /usage * group *. begin data. 21.00 1 19.00 1 18.00 1 25.00 1 14.00 1 13.00 1 24.00 1 19.00 1 20.00 1 21.00 1 15.00 2 10.00 2 13.00 2 16.00 2 14.00 2 24.00 2 16.00 2 14.00 2 18.00 2 16.00 2 10.00 3 7.00 3 13.00 3 20.00 3 .00 3 8.00 3 6.00 3 1.00 3 12.00 3 14.00 3 18.00 4 15.00 4 3.00 4 27.00 4 6.00 4 14.00 4 13.00 4 11.00 4 9.00 4 18.00 4 end data. variable label usage 'Days of Use'. add value labels group 0 'none' 1 'one' 2 'two' 3 'three' 4 'four'. oneway usage by group /posthoc scheffe. _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:826: pspp -O format=csv oneway-scheffe.sps" at_fn_check_prepare_trace "oneway.at:826" ( $at_check_trace; pspp -O format=csv oneway-scheffe.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. Days of Use,Between Groups,555.275,3,185.092,6.663,.001 ,Within Groups,1000.100,36,27.781,, ,Total,1555.375,39,,, Table: Multiple Comparisons (Days of Use) ,,,Mean Difference,,,95% Confidence Interval, ,(I) group,(J) group,(I - J),Std. Error,Sig.,Lower Bound,Upper Bound Scheffé,one,two,3.800,2.357,.467,-3.112,10.712 ,,three,10.300,2.357,.001,3.388,17.212 ,,four,6.000,2.357,.110,-.912,12.912 ,two,one,-3.800,2.357,.467,-10.712,3.112 ,,three,6.500,2.357,.072,-.412,13.412 ,,four,2.200,2.357,.832,-4.712,9.112 ,three,one,-10.300,2.357,.001,-17.212,-3.388 ,,two,-6.500,2.357,.072,-13.412,.412 ,,four,-4.300,2.357,.358,-11.212,2.612 ,four,one,-6.000,2.357,.110,-12.912,.912 ,,two,-2.200,2.357,.832,-9.112,4.712 ,,three,4.300,2.357,.358,-2.612,11.212 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:826" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_618 #AT_START_619 at_fn_group_banner 619 'oneway.at:853' \ "ONEWAY bad contrast count" " " 82 at_xfail=no ( $as_echo "619. $at_setup_line: testing $at_desc ..." $at_traceon cat >oneway-bad-contrast.sps <<'_ATEOF' DATA LIST NOTABLE LIST /height * weight * temperature * sex *. BEGIN DATA. 1884 88.6 39.97 0 1801 90.9 39.03 0 1801 91.7 38.98 0 1607 56.3 36.26 1 1608 46.3 46.26 1 1607 55.9 37.84 1 1604 56.6 36.81 1 1606 56.1 34.56 1 END DATA. ONEWAY /VARIABLES= height weight temperature BY sex /CONTRAST = -1 1 /CONTRAST = -3 3 /CONTRAST = 2 -2 1 /CONTRAST = -9 9 . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:877: pspp -O format=csv oneway-bad-contrast.sps" at_fn_check_prepare_trace "oneway.at:877" ( $at_check_trace; pspp -O format=csv oneway-bad-contrast.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"oneway-bad-contrast.sps:18: warning: ONEWAY: In contrast list 3, the number of coefficients (3) does not equal the number of groups (2). This contrast list will be ignored.\" Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. height,Between Groups,92629.63,1,92629.63,120.77,.000 ,Within Groups,4601.87,6,766.98,, ,Total,97231.50,7,,, weight,Between Groups,2451.65,1,2451.65,174.59,.000 ,Within Groups,84.25,6,14.04,, ,Total,2535.90,7,,, temperature,Between Groups,1.80,1,1.80,.13,.733 ,Within Groups,84.55,6,14.09,, ,Total,86.36,7,,, Table: Contrast Coefficients ,,sex, ,,.00,1.00 Contrast,1,-1,1 ,2,-3,3 ,3,-9,9 Table: Contrast Tests ,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed) height,Assume equal variances,1,-222.27,20.23,10.99,6,.000 ,,2,-666.80,60.68,10.99,6,.000 ,,3,-2000.40,182.03,10.99,6,.000 ,Does not assume equal,1,-222.27,27.67,-8.03,2.00,.015 ,,2,-666.80,83.02,-8.03,2.00,.015 ,,3,-2000.40,249.07,-8.03,2.00,.015 weight,Assume equal variances,1,-36.16,2.74,13.21,6,.000 ,,2,-108.48,8.21,13.21,6,.000 ,,3,-325.44,24.63,13.21,6,.000 ,Does not assume equal,1,-36.16,2.19,-16.48,5.42,.000 ,,2,-108.48,6.58,-16.48,5.42,.000 ,,3,-325.44,19.75,-16.48,5.42,.000 temperature,Assume equal variances,1,-.98,2.74,.36,6,.733 ,,2,-2.94,8.22,.36,6,.733 ,,3,-8.83,24.67,.36,6,.733 ,Does not assume equal,1,-.98,2.07,-.47,4.19,.660 ,,2,-2.94,6.22,-.47,4.19,.660 ,,3,-8.83,18.66,-.47,4.19,.660 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:877" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_619 #AT_START_620 at_fn_group_banner 620 'oneway.at:924' \ "ONEWAY crash on single category independent variable" "" 82 at_xfail=no ( $as_echo "620. $at_setup_line: testing $at_desc ..." $at_traceon cat >crash.sps <<'_ATEOF' input program. loop #i = 1 to 10. compute test = #i. end case. end loop. end file. end input program. compute x = 1. oneway test by x. _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:939: pspp -O format=csv crash.sps" at_fn_check_prepare_trace "oneway.at:939" ( $at_check_trace; pspp -O format=csv crash.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:939" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_620 #AT_START_621 at_fn_group_banner 621 'oneway.at:945' \ "ONEWAY crash on missing dependent variable" " " 82 at_xfail=no ( $as_echo "621. $at_setup_line: testing $at_desc ..." $at_traceon cat >crash2.sps <<'_ATEOF' data list notable list /dv1 * dv2 * y * . begin data. 2 . 2 1 . 2 1 . 1 2 . 4 3 . 4 4 . 4 5 . 4 end data. ONEWAY /VARIABLES= dv1 dv2 BY y /STATISTICS = DESCRIPTIVES /POSTHOC = BONFERRONI LSD SCHEFFE SIDAK TUKEY /MISSING = ANALYSIS . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:966: pspp -O format=csv crash2.sps" at_fn_check_prepare_trace "oneway.at:966" ( $at_check_trace; pspp -O format=csv crash2.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:966" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_621 #AT_START_622 at_fn_group_banner 622 'oneway.at:973' \ "ONEWAY Games-Howell test with few cases" " " 82 at_xfail=no ( $as_echo "622. $at_setup_line: testing $at_desc ..." $at_traceon cat >crash3.sps <<'_ATEOF' data list notable list /dv * y * . begin data. 2 2 1 2 1 1 2 4 3 4 end data. ONEWAY /VARIABLES= dv BY y /POSTHOC = GH . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:990: pspp -O format=csv crash3.sps" at_fn_check_prepare_trace "oneway.at:990" ( $at_check_trace; pspp -O format=csv crash3.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:990" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_622 #AT_START_623 at_fn_group_banner 623 'oneway.at:995' \ "ONEWAY Crash on empty data" " " 82 at_xfail=no ( $as_echo "623. $at_setup_line: testing $at_desc ..." $at_traceon cat >crash4.sps <<'_ATEOF' DATA LIST NOTABLE LIST /height * weight * temperature * sex *. BEGIN DATA. 1801 . . 0 1606 . . 1 END DATA. ONEWAY /VARIABLES= height weight temperature BY sex /CONTRAST = -1 1 /CONTRAST = -3 3 /CONTRAST = 2 -2 1 /CONTRAST = -9 9 . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:1011: pspp -O format=csv crash4.sps" at_fn_check_prepare_trace "oneway.at:1011" ( $at_check_trace; pspp -O format=csv crash4.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/oneway.at:1011" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_623 #AT_START_624 at_fn_group_banner 624 'oneway.at:1017' \ "ONEWAY Crash on invalid dependent variable" " " 82 at_xfail=no ( $as_echo "624. $at_setup_line: testing $at_desc ..." $at_traceon cat >crash5.sps <<'_ATEOF' data list notable list /a * b *. begin data. 3 0 2 0 6 2 end data. oneway a"by b. _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:1030: pspp -O format=csv crash5.sps" at_fn_check_prepare_trace "oneway.at:1030" ( $at_check_trace; pspp -O format=csv crash5.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/oneway.at:1030" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_624 #AT_START_625 at_fn_group_banner 625 'oneway.at:1037' \ "ONEWAY Crash on unterminated string" " " 82 at_xfail=no ( $as_echo "625. $at_setup_line: testing $at_desc ..." $at_traceon cat >crash6.sps <<'_ATEOF' DATA LIST NOTABLE LIST /height * weight * temperature * sex *. BEGIN DATA. 1801 . . 0 1606 . 0 . 1 END DATA. ONEWAY /VARIABLES= height weight temperature BY sex /CONTRAST =" 2 -2 1 . _ATEOF { set +x $as_echo "$at_srcdir/oneway.at:1051: pspp -O format=csv crash6.sps" at_fn_check_prepare_trace "oneway.at:1051" ( $at_check_trace; pspp -O format=csv crash6.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/oneway.at:1051" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_625 #AT_START_626 at_fn_group_banner 626 'quick-cluster.at:19' \ "QUICK CLUSTER with small data set" " " 83 at_xfail=no ( $as_echo "626. $at_setup_line: testing $at_desc ..." $at_traceon cat >quick-cluster.sps <<'_ATEOF' DATA LIST LIST /x y z. BEGIN DATA. 22,2930,4099 17,3350,4749 22,2640,3799 20, 3250,4816 15,4080,7827 4,5,4 5,6,5 6,7,6 7,8,7 8,9,8 9,10,9 END DATA. QUICK CLUSTER x y z /CRITERIA=CLUSTER(2) MXITER(20). _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:38: pspp -o pspp.csv quick-cluster.sps" at_fn_check_prepare_trace "quick-cluster.at:38" ( $at_check_trace; pspp -o pspp.csv quick-cluster.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:38" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/quick-cluster.at:39: cat pspp.csv" at_fn_check_prepare_trace "quick-cluster.at:39" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,F8.0 z,F8.0 Table: Final Cluster Centers ,Cluster, ,, ,1,2 ,, x,6.50,19.20 y,7.50,3250.00 z,6.50,5058.00 Table: Number of Cases in each Cluster Cluster,1,6 ,2,5 Valid,,11 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_626 #AT_START_627 at_fn_group_banner 627 'quick-cluster.at:62' \ "QUICK CLUSTER with large data set" " " 83 at_xfail=no ( $as_echo "627. $at_setup_line: testing $at_desc ..." $at_traceon cat >quick-cluster.sps <<'_ATEOF' input program. loop #i = 1 to 50000. compute x = 3. end case. end loop. end file. end input program. QUICK CLUSTER x /CRITERIA = CLUSTER(4) NOINITIAL. _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:73: pspp -o pspp.csv quick-cluster.sps" at_fn_check_prepare_trace "quick-cluster.at:73" ( $at_check_trace; pspp -o pspp.csv quick-cluster.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:73" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/quick-cluster.at:74: cat pspp.csv" at_fn_check_prepare_trace "quick-cluster.at:74" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Final Cluster Centers ,Cluster,,, ,,,, ,1,2,3,4 ,,,, x,NaN,NaN,NaN,3.00 Table: Number of Cases in each Cluster Cluster,1,0 ,2,0 ,3,0 ,4,50000 Valid,,50000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:74" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_627 #AT_START_628 at_fn_group_banner 628 'quick-cluster.at:92' \ "QUICK CLUSTER with weights" " " 83 at_xfail=no ( $as_echo "628. $at_setup_line: testing $at_desc ..." $at_traceon cat >qc-weighted.sps <<'_ATEOF' input program. loop #i = 1 to 400. compute x = mod (#i, 4). compute w = 5. end case. end loop. loop #i = 1 to 400. compute x = mod (#i, 4). compute w = 3. end case. end loop. end file. end input program. weight by w. QUICK CLUSTER x /CRITERIA = CLUSTER(4) MXITER (10). _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:113: pspp -o pspp-w.csv qc-weighted.sps" at_fn_check_prepare_trace "quick-cluster.at:113" ( $at_check_trace; pspp -o pspp-w.csv qc-weighted.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:113" $at_failed && at_fn_log_failure $at_traceon; } cat >qc-unweighted.sps <<'_ATEOF' input program. loop #i = 1 to 3200. compute x = mod (#i, 4). end case. end loop. end file. end input program. QUICK CLUSTER x /CRITERIA = CLUSTER(4) MXITER (10). _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:128: pspp -o pspp-unw.csv qc-unweighted.sps" at_fn_check_prepare_trace "quick-cluster.at:128" ( $at_check_trace; pspp -o pspp-unw.csv qc-unweighted.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:128" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/quick-cluster.at:130: diff pspp-w.csv pspp-unw.csv" at_fn_check_prepare_trace "quick-cluster.at:130" ( $at_check_trace; diff pspp-w.csv pspp-unw.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:130" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_628 #AT_START_629 at_fn_group_banner 629 'quick-cluster.at:134' \ "QUICK CLUSTER with listwise missing" " " 83 at_xfail=no ( $as_echo "629. $at_setup_line: testing $at_desc ..." $at_traceon cat >quick-miss.sps <<'_ATEOF' data list notable list /x *. begin data. 1 1 2 3 4 . 2 end data. QUICK CLUSTER x /CRITERIA = CLUSTER(4) MXITER (10). _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:150: pspp -o pspp-m.csv quick-miss.sps" at_fn_check_prepare_trace "quick-cluster.at:150" ( $at_check_trace; pspp -o pspp-m.csv quick-miss.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:150" $at_failed && at_fn_log_failure $at_traceon; } cat >quick-nmiss.sps <<'_ATEOF' data list notable list /x *. begin data. 1 1 2 3 4 2 end data. QUICK CLUSTER x /CRITERIA = CLUSTER(4) MXITER (10). _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:166: pspp -o pspp-nm.csv quick-nmiss.sps" at_fn_check_prepare_trace "quick-cluster.at:166" ( $at_check_trace; pspp -o pspp-nm.csv quick-nmiss.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:166" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/quick-cluster.at:168: diff pspp-m.csv pspp-nm.csv" at_fn_check_prepare_trace "quick-cluster.at:168" ( $at_check_trace; diff pspp-m.csv pspp-nm.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:168" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_629 #AT_START_630 at_fn_group_banner 630 'quick-cluster.at:173' \ "QUICK CLUSTER with pairwise missing" " " 83 at_xfail=no ( $as_echo "630. $at_setup_line: testing $at_desc ..." $at_traceon cat >quick-s.sps <<'_ATEOF' data list notable list /x * y *. begin data. 1 2 1 2.2 1.1 1.9 1 9 1 10 1.3 9.5 0.9 8.9 3.5 2 3.4 3 3.5 2.5 3.1 2.0 end data. QUICK CLUSTER x y /PRINT = INITIAL /CRITERIA = CLUSTER(3) NOINITIAL NOUPDATE . _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:202: pspp -O format=csv quick-s.sps > pspp-s.csv" at_fn_check_prepare_trace "quick-cluster.at:202" ( $at_check_trace; pspp -O format=csv quick-s.sps > pspp-s.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:202" $at_failed && at_fn_log_failure $at_traceon; } cat >quick-pw.sps <<'_ATEOF' data list notable list /x * y *. begin data. 1 2 1 2.2 1.1 1.9 1 9 1 10 1.3 9.5 0.9 8.9 3.5 2 3.4 3 3.5 2.5 3.1 2.0 . 2.3 end data. QUICK CLUSTER x y /CRITERIA = CLUSTER(3) NOINITIAL NOUPDATE /PRINT = INITIAL /MISSING = PAIRWISE . _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:228: pspp -O format=csv quick-pw.sps > pspp-pw.csv" at_fn_check_prepare_trace "quick-cluster.at:228" ( $at_check_trace; pspp -O format=csv quick-pw.sps > pspp-pw.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:228" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/quick-cluster.at:230: head -n 18 pspp-s.csv > top-s.csv" at_fn_check_prepare_trace "quick-cluster.at:230" ( $at_check_trace; head -n 18 pspp-s.csv > top-s.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:230" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/quick-cluster.at:231: head -n 18 pspp-pw.csv > top-pw.csv" at_fn_check_prepare_trace "quick-cluster.at:231" ( $at_check_trace; head -n 18 pspp-pw.csv > top-pw.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:231" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/quick-cluster.at:232: diff top-s.csv top-pw.csv" at_fn_check_prepare_trace "quick-cluster.at:232" ( $at_check_trace; diff top-s.csv top-pw.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:232" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/quick-cluster.at:235: grep Valid pspp-s.csv" at_fn_check_prepare_trace "quick-cluster.at:235" ( $at_check_trace; grep Valid pspp-s.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Valid,,11 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:235" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/quick-cluster.at:238: grep Valid pspp-pw.csv" at_fn_check_prepare_trace "quick-cluster.at:238" ( $at_check_trace; grep Valid pspp-pw.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Valid,,12 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:238" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_630 #AT_START_631 at_fn_group_banner 631 'quick-cluster.at:246' \ "QUICK CLUSTER crash on bad cluster quantity" " " 83 at_xfail=no ( $as_echo "631. $at_setup_line: testing $at_desc ..." $at_traceon cat >badn.sps <<'_ATEOF' data list notable list /x * y *. begin data. 1 2 1 2.2 end data. QUICK CLUSTER x y /CRITERIA = CLUSTER(0) . _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:259: pspp -O format=csv badn.sps" at_fn_check_prepare_trace "quick-cluster.at:259" ( $at_check_trace; pspp -O format=csv badn.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/quick-cluster.at:259" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_631 #AT_START_632 at_fn_group_banner 632 'quick-cluster.at:263' \ "QUICK CLUSTER infinite loop on bad command name" "" 83 at_xfail=no ( $as_echo "632. $at_setup_line: testing $at_desc ..." $at_traceon cat >quick-cluster.sps <<'_ATEOF' data list notable list /x y. begin data. 1 2 1 2.2 end data. QUICK CLUSTER x y /UNSUPPORTED. _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:273: pspp -O format=csv quick-cluster.sps" at_fn_check_prepare_trace "quick-cluster.at:273" ( $at_check_trace; pspp -O format=csv quick-cluster.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "quick-cluster.sps:7.20-7.30: error: QUICK CLUSTER: Syntax error at \`UNSUPPORTED'. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/quick-cluster.at:273" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_632 #AT_START_633 at_fn_group_banner 633 'quick-cluster.at:280' \ "QUICK CLUSTER /PRINT subcommand" " " 83 at_xfail=no ( $as_echo "633. $at_setup_line: testing $at_desc ..." $at_traceon cat >quick-cluster.sps <<'_ATEOF' data list notable list /cluster (A8) x (F) y (F). begin data. A 10.45 9.38 A 10.67 9.17 A 10.86 9.63 A 8.77 8.45 A 8.04 11.77 A 10.34 9.83 A 10.37 10.54 A 11.49 8.18 A 10.17 11.10 A 11.37 9.16 A 10.25 8.83 A 8.69 9.92 A 10.36 10.39 A 10.89 10.51 A 9.9 11.39 A 11.1 10.91 A 11.77 8.47 A 9.5 10.46 B -11.01 -9.21 B -10.8 -11.76 B -10.03 -10.29 B -9.54 -9.17 B -10.16 -9.82 B -10.01 -8.63 B -9.6 -10.22 B -11.36 -10.93 B -10.63 -10.97 B -9.53 -10.78 B -9.40 -10.26 B -10.76 -9.76 B -9.9 -10.11 B -10.16 -9.75 B -8.65 -11.31 B -10.10 -10.90 B -11.67 -9.89 B -11.11 -9.23 B -8.7 -8.43 B -11.35 -8.68 C -10.20 9.00 C -10.12 9.92 C -10.41 10.16 C -9.86 10.12 C -10.31 10.12 C -9.57 10.16 C -9.69 9.93 C -9.14 10.84 C -9.8 10.19 C -9.97 10.22 C -11.65 10.81 C -9.80 11.39 C -10.31 10.74 C -10.26 10.38 C -11.57 10.02 C -10.50 9.75 C -9.06 9.63 C -10.17 10.82 C -10.22 9.99 end data. QUICK CLUSTER x y /CRITERIA=CLUSTERS(3) /PRINT=INITIAL CLUSTER. _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:348: pspp -O format=csv quick-cluster.sps" at_fn_check_prepare_trace "quick-cluster.at:348" ( $at_check_trace; pspp -O format=csv quick-cluster.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Initial Cluster Centers ,Cluster,, ,,, ,1,2,3 ,,, x,-11,-12,11 y,-12,11,11 Table: Final Cluster Centers ,Cluster,, ,,, ,1,2,3 ,,, x,-10,-10,10 y,-10,10,10 Table: Number of Cases in each Cluster Cluster,1,20 ,2,19 ,3,18 Valid,,57 Table: Cluster Membership Case Number,Cluster 1,3 2,3 3,3 4,3 5,3 6,3 7,3 8,3 9,3 10,3 11,3 12,3 13,3 14,3 15,3 16,3 17,3 18,3 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,2 40,2 41,2 42,2 43,2 44,2 45,2 46,2 47,2 48,2 49,2 50,2 51,2 52,2 53,2 54,2 55,2 56,2 57,2 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/quick-cluster.at:348" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_633 #AT_START_634 at_fn_group_banner 634 'quick-cluster.at:436' \ "QUICK CLUSTER -- Empty Parentheses" " " 83 at_xfail=no ( $as_echo "634. $at_setup_line: testing $at_desc ..." $at_traceon cat >empty-parens.sps <<'_ATEOF' data list notable list /x * y *. begin data. 1 2 1 2.2 end data. QUICK CLUSTER x y /CRITERIA = CONVERGE() . _ATEOF { set +x $as_echo "$at_srcdir/quick-cluster.at:450: pspp -o pspp.csv empty-parens.sps" at_fn_check_prepare_trace "quick-cluster.at:450" ( $at_check_trace; pspp -o pspp.csv empty-parens.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/quick-cluster.at:450" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_634 #AT_START_635 at_fn_group_banner 635 'rank.at:19' \ "RANK simple case with defaults" " " 84 at_xfail=no ( $as_echo "635. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x (f8). BEGIN DATA. -1 0 1 2 2 4 5 END DATA. RANK x. LIST. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:36: pspp -o pspp.csv rank.sps" at_fn_check_prepare_trace "rank.at:36" ( $at_check_trace; pspp -o pspp.csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:36" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/rank.at:37: cat pspp.csv" at_fn_check_prepare_trace "rank.at:37" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variables Created By RANK x into Rx(RANK of x) Table: Data List x,Rx -1,1.000 0,2.000 1,3.000 2,4.500 2,4.500 4,6.000 5,7.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_635 #AT_START_636 at_fn_group_banner 636 'rank.at:59' \ "RANK multiple variables with defaults" " " 84 at_xfail=no ( $as_echo "636. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * y * z *. BEGIN DATA. 1.00 2.00 3.00 4.00 5.00 6.00 END DATA. RANK ALL. LIST. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:71: pspp -o pspp.csv rank.sps" at_fn_check_prepare_trace "rank.at:71" ( $at_check_trace; pspp -o pspp.csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:71" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/rank.at:72: cat pspp.csv" at_fn_check_prepare_trace "rank.at:72" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variables Created By RANK x into Rx(RANK of x) y into Ry(RANK of y) z into Rz(RANK of z) Table: Data List x,y,z,Rx,Ry,Rz 1.00,2.00,3.00,1.000,1.000,1.000 4.00,5.00,6.00,2.000,2.000,2.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:72" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_636 #AT_START_637 at_fn_group_banner 637 'rank.at:90' \ "RANK with RANK, RFRACTION, N" " " 84 at_xfail=no ( $as_echo "637. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /a * b *. BEGIN DATA. 0 24 1 32 2 31 2 32 4 30 5 29 6 1 7 43 8 . 9 45 END DATA. RANK a b (D) /PRINT=YES /RANK /TIES=HIGH /RFRACTION /N INTO count . DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:118: pspp -o pspp.csv rank.sps" at_fn_check_prepare_trace "rank.at:118" ( $at_check_trace; pspp -o pspp.csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:118" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/rank.at:119: cat pspp.csv" at_fn_check_prepare_trace "rank.at:119" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variables Created By RANK a into Ra(RANK of a) b into Rb(RANK of b) a into RFR001(RFRACTION of a) b into RFR002(RFRACTION of b) a into count(N of a) b into Nb(N of b) Variable,Description,Position a,Format: F8.2,1 b,Format: F8.2,2 Ra,\"Label: RANK of a Format: F9.3\",3 RFR001,\"Label: RFRACTION of a Format: F6.4\",4 count,\"Label: N of a Format: F6.0\",5 Rb,\"Label: RANK of b Format: F9.3\",6 RFR002,\"Label: RFRACTION of b Format: F6.4\",7 Nb,\"Label: N of b Format: F6.0\",8 Table: Data List a,b,Ra,RFR001,count,Rb,RFR002,Nb .00,24.00,10.000,1.0000,10,8.000,.8889,9 1.00,32.00,9.000,.9000,10,4.000,.4444,9 2.00,31.00,8.000,.8000,10,5.000,.5556,9 2.00,32.00,8.000,.8000,10,4.000,.4444,9 4.00,30.00,6.000,.6000,10,6.000,.6667,9 5.00,29.00,5.000,.5000,10,7.000,.7778,9 6.00,1.00,4.000,.4000,10,9.000,1.0000,9 7.00,43.00,3.000,.3000,10,2.000,.2222,9 8.00,. ,2.000,.2000,10,. ,. ,. 9.00,45.00,1.000,.1000,10,1.000,.1111,9 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:119" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_637 #AT_START_638 at_fn_group_banner 638 'rank.at:167' \ "RANK with SAVAGE, PERCENT, PROPORTION, NTILES" " " 84 at_xfail=no ( $as_echo "638. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /a * b *. BEGIN DATA. 0 24 1 32 2 31 2 32 4 30 5 29 6 1 7 43 8 8 9 45 END DATA. RANK a /PRINT=YES /TIES=CONDENSE /SAVAGE /PERCENT /PROPORTION /NTILES(4) /NORMAL . LIST. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:195: pspp -o pspp.csv rank.sps" at_fn_check_prepare_trace "rank.at:195" ( $at_check_trace; pspp -o pspp.csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:195" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/rank.at:196: cat pspp.csv" at_fn_check_prepare_trace "rank.at:196" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variables Created By RANK a into Sa(SAVAGE of a) a into Pa(PERCENT of a) a into PRO001(PROPORTION of a using BLOM) a into Na(NTILES of a) a into NOR001(NORMAL of a using BLOM) Table: Data List a,b,Sa,Pa,PRO001,Na,NOR001 .00,24.00,-.9000,10.00,.0610,1,-1.547 1.00,32.00,-.7889,20.00,.1585,1,-1.000 2.00,31.00,-.5925,30.00,.2561,2,-.6554 2.00,32.00,-.5925,30.00,.2561,2,-.6554 4.00,30.00,-.3544,40.00,.3537,2,-.3755 5.00,29.00,-.1544,50.00,.4512,2,-.1226 6.00,1.00,.0956,60.00,.5488,3,.1226 7.00,43.00,.4290,70.00,.6463,3,.3755 8.00,8.00,.9290,80.00,.7439,3,.6554 9.00,45.00,1.9290,90.00,.8415,4,1.0005 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:196" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_638 #AT_START_639 at_fn_group_banner 639 'rank.at:226' \ "RANK with SPLIT FILE" " " 84 at_xfail=no ( $as_echo "639. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /a * g1 g2 *. BEGIN DATA. 2 1 2 2 1 2 3 1 2 4 1 2 5 1 2 1 0 2 2 0 2 3 0 2 4 0 2 5 0 2 6 0 2 7 0 2 8 0 2 6 1 2 7 1 2 7 1 2 8 1 2 9 1 1 END DATA. RANK a (D) BY g2 g1 /PRINT=YES /TIES=LOW /MISSING=INCLUDE /FRACTION=RANKIT /RANK /NORMAL . SPLIT FILE BY g1. RANK a (D) BY g2 /PRINT=YES /TIES=LOW /MISSING=INCLUDE /FRACTION=RANKIT /RANK /NORMAL . SPLIT FILE OFF. LIST. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:274: pspp -o pspp.csv rank.sps" at_fn_check_prepare_trace "rank.at:274" ( $at_check_trace; pspp -o pspp.csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:274" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/rank.at:275: cat pspp.csv" at_fn_check_prepare_trace "rank.at:275" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variables Created By RANK a into Ra(RANK of a BY g2 g1) a into Na(NORMAL of a using RANKIT BY g2 g1) Variables Created By RANK a into RAN001(RANK of a BY g2) a into NOR001(NORMAL of a using RANKIT BY g2) Table: Data List a,g1,g2,Ra,Na,RAN001,NOR001 2.00,1.00,2.00,8.000,.9674,4.000,.5244 2.00,1.00,2.00,8.000,.9674,4.000,.5244 3.00,1.00,2.00,7.000,.5895,3.000,.0000 4.00,1.00,2.00,6.000,.2822,2.000,-.5244 5.00,1.00,2.00,5.000,.0000,1.000,-1.282 1.00,.00,2.00,8.000,1.5341,8.000,1.5341 2.00,.00,2.00,7.000,.8871,7.000,.8871 3.00,.00,2.00,6.000,.4888,6.000,.4888 4.00,.00,2.00,5.000,.1573,5.000,.1573 5.00,.00,2.00,4.000,-.1573,4.000,-.1573 6.00,.00,2.00,3.000,-.4888,3.000,-.4888 7.00,.00,2.00,2.000,-.8871,2.000,-.8871 8.00,.00,2.00,1.000,-1.534,1.000,-1.534 6.00,1.00,2.00,4.000,-.2822,4.000,1.1503 7.00,1.00,2.00,2.000,-.9674,2.000,-.3186 7.00,1.00,2.00,2.000,-.9674,2.000,-.3186 8.00,1.00,2.00,1.000,-1.593,1.000,-1.150 9.00,1.00,1.00,1.000,.0000,1.000,.0000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:275" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_639 #AT_START_640 at_fn_group_banner 640 'rank.at:316' \ "RANK with fractional ranks" " " 84 at_xfail=no ( $as_echo "640. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /a * w * . BEGIN DATA. 1 1.5 2 0.2 3 0.1 4 1 5 1 6 1 7 1 8 1 END DATA. WEIGHT BY w. RANK a /FRACTION=TUKEY /PROPORTION /SAVAGE . LIST. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:340: pspp -o pspp.csv rank.sps" at_fn_check_prepare_trace "rank.at:340" ( $at_check_trace; pspp -o pspp.csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:340" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/rank.at:341: cat pspp.csv" at_fn_check_prepare_trace "rank.at:341" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variables Created By RANK a into Pa(PROPORTION of a using TUKEY) a into Sa(SAVAGE of a) Table: Data List a,w,Pa,Sa 1.00,1.50,.1285,-.8016 2.00,.20,.1776,-.6905 3.00,.10,.1986,-.6905 4.00,1.00,.3458,-.5305 5.00,1.00,.4860,-.2905 6.00,1.00,.6262,.0262 7.00,1.00,.7664,.4929 8.00,1.00,.9065,1.3929 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:341" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_640 #AT_START_641 at_fn_group_banner 641 'rank.at:363' \ "RANK all-ties due to tiny weights" " " 84 at_xfail=no ( $as_echo "641. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * w *. BEGIN DATA. 1 0.1 2 0.1 3 0.1 4 0.2 5 0.1 6 0.1 7 0.1 8 0.1 END DATA. WEIGHT BY w. RANK x /TIES=low /RANK into xl. RANK x /TIES=high /RANK into xh. RANK x /TIES=condense /RANK into xc. * Test VW fraction RANK x /FRACTION=VW /NORMAL. LIST. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:401: pspp -o pspp.csv rank.sps" at_fn_check_prepare_trace "rank.at:401" ( $at_check_trace; pspp -o pspp.csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:401" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/rank.at:402: cat pspp.csv" at_fn_check_prepare_trace "rank.at:402" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variables Created By RANK x into xl(RANK of x) Variables Created By RANK x into xh(RANK of x) Variables Created By RANK x into xc(RANK of x) Variables Created By RANK x into Nx(NORMAL of x using VW) Table: Data List x,w,xl,xh,xc,Nx 1.00,.10,.000,.100,1.000,-1.938 2.00,.10,.100,.200,2.000,-1.412 3.00,.10,.200,.300,3.000,-1.119 4.00,.20,.300,.500,4.000,-.8046 5.00,.10,.500,.600,5.000,-.5549 6.00,.10,.600,.700,6.000,-.4067 7.00,.10,.700,.800,7.000,-.2670 8.00,.10,.800,.900,8.000,-.1323 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:402" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_641 #AT_START_642 at_fn_group_banner 642 'rank.at:440' \ "RANK and TEMPORARY" " " 84 at_xfail=no ( $as_echo "642. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /age (f2) gender (a1). BEGIN DATA. 44 m 32 f 43 m 49 m 33 f 35 f 29 f 50 m 42 m 33 f 48 m END DATA. TEMPORARY. SELECT IF gender = 'm'. RANK age /RANK INTO Rm. TEMPORARY. SELECT IF gender = 'f'. RANK age /RANK INTO Rf. LIST. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:467: pspp -O format=csv rank.sps" at_fn_check_prepare_trace "rank.at:467" ( $at_check_trace; pspp -O format=csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variables Created By RANK age into Rm(RANK of age) Variables Created By RANK age into Rf(RANK of age) Table: Data List age,gender,Rm,Rf 44,m,3.000,. 32,f,. ,2.000 43,m,2.000,. 49,m,5.000,. 33,f,. ,3.500 35,f,. ,5.000 29,f,. ,1.000 50,m,6.000,. 42,m,1.000,. 33,f,. ,3.500 48,m,4.000,. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:467" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_642 #AT_START_643 at_fn_group_banner 643 'rank.at:496' \ "RANK variable name fallback" " " 84 at_xfail=no ( $as_echo "643. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /foo * rfoo * ran003 *. BEGIN DATA. 0 3 2 1 3 2 2 3 2 2 3 2 4 3 2 5 3 2 6 3 2 7 3 2 8 3 2 9 3 2 END DATA. RANK foo. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:517: pspp -o pspp.csv rank.sps" at_fn_check_prepare_trace "rank.at:517" ( $at_check_trace; pspp -o pspp.csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:517" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/rank.at:518: cat pspp.csv" at_fn_check_prepare_trace "rank.at:518" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variables Created By RANK foo into RAN001(RANK of foo) Variable,Description,Position foo,Format: F8.2,1 rfoo,Format: F8.2,2 ran003,Format: F8.2,3 RAN001,\"Label: RANK of foo Format: F9.3\",4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:518" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_643 #AT_START_644 at_fn_group_banner 644 'rank.at:534' \ "RANK robust variable name creation" " " 84 at_xfail=no ( $as_echo "644. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST notable /x * rx * ran001 TO ran999. BEGIN DATA. 1 2 3 4 5 6 7 END DATA. RANK x. DELETE VAR ran001 TO ran999. LIST. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:553: pspp -O format=csv rank.sps" at_fn_check_prepare_trace "rank.at:553" ( $at_check_trace; pspp -O format=csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"rank.sps:3: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate.\" \"rank.sps:4: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate.\" \"rank.sps:5: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate.\" \"rank.sps:6: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate.\" \"rank.sps:7: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate.\" \"rank.sps:8: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate.\" \"rank.sps:9: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate.\" Variables Created By RANK x into RNKRA01(RANK of x) Table: Data List x,rx,RNKRA01 1.00,. ,1.000 2.00,. ,2.000 3.00,. ,3.000 4.00,. ,4.000 5.00,. ,5.000 6.00,. ,6.000 7.00,. ,7.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/rank.at:553" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_644 #AT_START_645 at_fn_group_banner 645 'rank.at:587' \ "RANK handling of invalid input" " " 84 at_xfail=no ( $as_echo "645. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * a (a2). BEGIN DATA. -1 s 0 s 1 s 2 s 2 s 4 s 5 s END DATA. DEBUG XFORM FAIL. RANK x. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:604: pspp -O format=csv --testing-mode rank.sps" at_fn_check_prepare_trace "rank.at:604" ( $at_check_trace; pspp -O format=csv --testing-mode rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variables Created By RANK x into Rx(RANK of x) rank.sps:14: error: RANK: DEBUG XFORM FAIL transformation executed " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/rank.at:604" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_645 #AT_START_646 at_fn_group_banner 646 'rank.at:615' \ "RANK handling of invalid syntax" " " 84 at_xfail=no ( $as_echo "646. $at_setup_line: testing $at_desc ..." $at_traceon cat >rank.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x * a (a2). BEGIN DATA. -1 s 0 s 1 s 2 s 2 s 4 s 5 s END DATA. * invalid NTILES (no parameter) RANK x /NTILES . * invalid NTILES (not an integer) RANK x /NTILES(d) . * destination variable already exists RANK x /RANK INTO x. * Too many variables in INTO RANK x /RANK INTO foo bar wiz. _ATEOF { set +x $as_echo "$at_srcdir/rank.at:648: pspp -O format=csv rank.sps" at_fn_check_prepare_trace "rank.at:648" ( $at_check_trace; pspp -O format=csv rank.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "rank.sps:15.1: error: RANK: Syntax error at end of command: expecting \`('. rank.sps:19.11: error: RANK: Syntax error at \`d': expecting integer. rank.sps:25: error: RANK: Variable x already exists. rank.sps:30: error: RANK: Too many variables in INTO clause. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/rank.at:648" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_646 #AT_START_647 at_fn_group_banner 647 'regression.at:19' \ "LINEAR REGRESSION - basic" " " 85 at_xfail=no ( $as_echo "647. $at_setup_line: testing $at_desc ..." $at_traceon cat >regression.sps <<'_ATEOF' set format = F22.3. data list notable list / v0 to v2. filter by v0. begin data 0.65377128 7.735648 -23.97588 -0.13087553 6.142625 -19.63854 0.34880368 7.651430 -25.26557 0.69249021 6.125125 -16.57090 -0.07368178 8.245789 -25.80001 -0.34404919 6.031540 -17.56743 0.75981559 9.832291 -28.35977 -0.46958313 5.343832 -16.79548 -0.06108490 8.838262 -29.25689 0.56154863 6.200189 -18.58219 end data regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=pred resid. list. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:40: pspp -O format=csv regression.sps" at_fn_check_prepare_trace "regression.at:40" ( $at_check_trace; pspp -O format=csv regression.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "regression.sps:16: warning: REGRESSION: REGRESSION with SAVE ignores FILTER. All cases will be processed. Table: Model Summary (v2) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.971,.942,.925,1.337 Table: ANOVA (v2) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,202.753,2,101.376,56.754,.000 ,Residual,12.504,7,1.786,, ,Total,215.256,9,,, Table: Coefficients (v2) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),2.191,2.357,.000,.930,.380 ,v0,1.813,1.053,.171,1.722,.129 ,v1,-3.427,.332,-1.026,-10.334,.000 Table: Data List v0,v1,v2,RES1,PRED1 .654,7.736,-23.976,-.84,-23.13 -.131,6.143,-19.639,-.54,-19.10 .349,7.651,-25.266,-1.87,-23.40 .692,6.125,-16.571,.97,-17.54 -.074,8.246,-25.800,.40,-26.20 -.344,6.032,-17.567,1.53,-19.10 .760,9.832,-28.360,1.77,-30.13 -.470,5.344,-16.795,.18,-16.97 -.061,8.838,-29.257,-1.05,-28.21 .562,6.200,-18.582,-.54,-18.04 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:40" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_647 #AT_START_648 at_fn_group_banner 648 'regression.at:76' \ "LINEAR REGRESSION - one save" " " 85 at_xfail=no ( $as_echo "648. $at_setup_line: testing $at_desc ..." $at_traceon cat >regression.sps <<'_ATEOF' set format = F22.3. data list notable list / v0 to v2. begin data 0.65377128 7.735648 -23.97588 -0.13087553 6.142625 -19.63854 0.34880368 7.651430 -25.26557 0.69249021 6.125125 -16.57090 -0.07368178 8.245789 -25.80001 -0.34404919 6.031540 -17.56743 0.75981559 9.832291 -28.35977 -0.46958313 5.343832 -16.79548 -0.06108490 8.838262 -29.25689 0.56154863 6.200189 -18.58219 end data regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=resid. regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=pred. list. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:97: pspp -O format=csv regression.sps" at_fn_check_prepare_trace "regression.at:97" ( $at_check_trace; pspp -O format=csv regression.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Model Summary (v2) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.971,.942,.925,1.337 Table: ANOVA (v2) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,202.753,2,101.376,56.754,.000 ,Residual,12.504,7,1.786,, ,Total,215.256,9,,, Table: Coefficients (v2) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),2.191,2.357,.000,.930,.380 ,v0,1.813,1.053,.171,1.722,.129 ,v1,-3.427,.332,-1.026,-10.334,.000 Table: Model Summary (v2) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.971,.942,.925,1.337 Table: ANOVA (v2) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,202.753,2,101.376,56.754,.000 ,Residual,12.504,7,1.786,, ,Total,215.256,9,,, Table: Coefficients (v2) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),2.191,2.357,.000,.930,.380 ,v0,1.813,1.053,.171,1.722,.129 ,v1,-3.427,.332,-1.026,-10.334,.000 Table: Data List v0,v1,v2,RES1,PRED1 .654,7.736,-23.976,-.84,-23.13 -.131,6.143,-19.639,-.54,-19.10 .349,7.651,-25.266,-1.87,-23.40 .692,6.125,-16.571,.97,-17.54 -.074,8.246,-25.800,.40,-26.20 -.344,6.032,-17.567,1.53,-19.10 .760,9.832,-28.360,1.77,-30.13 -.470,5.344,-16.795,.18,-16.97 -.061,8.838,-29.257,-1.05,-28.21 .562,6.200,-18.582,-.54,-18.04 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:97" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_648 #AT_START_649 at_fn_group_banner 649 'regression.at:149' \ "LINEAR REGRESSION - SAVE vs SPLITS" " " 85 at_xfail=no ( $as_echo "649. $at_setup_line: testing $at_desc ..." $at_traceon # Generate some test data based on a linear model cat >gen-data.sps <<'_ATEOF' set seed = 1. input program. loop #c = 1 to 20. compute x0 = rv.normal (0,1). compute x1 = rv.normal (0,2). compute err = rv.normal (0,0.1). compute y = 4 - 2 * x0 + 3 * x1 + err. compute g = (#c > 10). end case. end loop. end file. end input program. print outfile='regdata.txt' /g x0 x1 y err *. execute. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:170: pspp -O format=csv gen-data.sps" at_fn_check_prepare_trace "regression.at:170" ( $at_check_trace; pspp -O format=csv gen-data.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/regression.at:170" $at_failed && at_fn_log_failure $at_traceon; } # Use our test data to create a predictor and a residual variable # for G == 0 cat >regression0.sps <<'_ATEOF' data list notable file='regdata.txt' list /g x0 x1 y err *. select if (g = 0). regression /variables = x0 x1 /dependent = y /statistics = all /save = pred resid. . print outfile='outdata-g0.txt' /g x0 x1 y err res1 pred1 *. execute. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:191: pspp -O format=csv regression0.sps" at_fn_check_prepare_trace "regression.at:191" ( $at_check_trace; pspp -O format=csv regression0.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/regression.at:191" $at_failed && at_fn_log_failure $at_traceon; } # Use our test data to create a predictor and a residual variable # for G == 1 cat >regression1.sps <<'_ATEOF' data list notable file='regdata.txt' list /g x0 x1 y err *. select if (g = 1). regression /variables = x0 x1 /dependent = y /statistics = all /save = pred resid. . print outfile='outdata-g1.txt' /g x0 x1 y err res1 pred1 *. execute. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:212: pspp -O format=csv regression1.sps" at_fn_check_prepare_trace "regression.at:212" ( $at_check_trace; pspp -O format=csv regression1.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/regression.at:212" $at_failed && at_fn_log_failure $at_traceon; } # Use our test data to create a predictor and a residual variable # The data is split on G cat >regression-split.sps <<'_ATEOF' data list notable file='regdata.txt' list /g x0 x1 y err *. split file by g. regression /variables = x0 x1 /dependent = y /statistics = all /save = pred resid. . print outfile='outdata-split.txt' /g x0 x1 y err res1 pred1 *. execute. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:232: pspp -O format=csv regression-split.sps" at_fn_check_prepare_trace "regression.at:232" ( $at_check_trace; pspp -O format=csv regression-split.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/regression.at:232" $at_failed && at_fn_log_failure $at_traceon; } # The concatenation of G==0 and G==1 should be identical to the SPLIT data { set +x $as_echo "$at_srcdir/regression.at:235: cat outdata-g0.txt outdata-g1.txt | diff outdata-split.txt - " at_fn_check_prepare_notrace 'a shell pipeline' "regression.at:235" ( $at_check_trace; cat outdata-g0.txt outdata-g1.txt | diff outdata-split.txt - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:235" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_649 #AT_START_650 at_fn_group_banner 650 'regression.at:242' \ "LINEAR REGRESSION multiple dependent variables" " " 85 at_xfail=no ( $as_echo "650. $at_setup_line: testing $at_desc ..." $at_traceon cat >regression.sps <<'_ATEOF' set seed = 2. input program. loop #c = 1 to 200. compute x0 = rv.normal (0, 1). compute x1 = rv.normal (0, 2). compute err = rv.normal (0, 0.8). compute y = 2 - 1.5 * x0 + 8.4 * x1 + err. compute ycopy = y. end case. end loop. end file. end input program. regression /variables = x0 x1 /dependent = y ycopy /statistics = default. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:263: pspp -O format=csv regression.sps > output" at_fn_check_prepare_trace "regression.at:263" ( $at_check_trace; pspp -O format=csv regression.sps > output ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/regression.at:263" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/regression.at:265: head -16 output > first" at_fn_check_prepare_trace "regression.at:265" ( $at_check_trace; head -16 output > first ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:265" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/regression.at:266: tail -16 output > second" at_fn_check_prepare_trace "regression.at:266" ( $at_check_trace; tail -16 output > second ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:266" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/regression.at:268: sed -e 's/ycopy/y/g' second | diff first -" at_fn_check_prepare_notrace 'a shell pipeline' "regression.at:268" ( $at_check_trace; sed -e 's/ycopy/y/g' second | diff first - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:268" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_650 #AT_START_651 at_fn_group_banner 651 'regression.at:274' \ "LINEAR REGRESSION test of QR decomposition" " " 85 at_xfail=no ( $as_echo "651. $at_setup_line: testing $at_desc ..." $at_traceon cat >regression.sps <<'_ATEOF' data list list / v0 to v1. begin data -12.84099361 0.873270778 16.64932538 0.371315664 -1.88061907 0.505503722 -6.20952354 0.734698282 0.33272576 0.891224610 -5.54912717 0.052318165 6.11832417 0.448853404 11.78124974 0.470447593 0.75960353 0.565082303 6.06432768 0.149316743 -2.64919436 0.752532411 -10.32250712 0.798263603 2.06355038 0.469129797 -9.71851742 0.927162270 4.65582553 0.250629262 9.54574474 0.847032310 7.35544368 0.197028541 -2.09609740 0.400584261 10.30101161 0.671546480 -5.24501039 0.929962876 1.73412473 0.758161354 -3.12732732 0.569785505 12.66261501 0.630640223 -2.90956805 0.576067804 4.89649177 0.624483995 13.64613114 0.591089881 14.03198397 0.544587572 2.23566810 0.967898139 5.37367760 0.916246929 9.01346888 0.451702743 0.75378683 0.235544137 -3.47470624 0.742668194 -1.02063266 0.860311687 -2.67132813 0.082460702 23.67661680 0.932553932 7.95061359 0.430161125 2.05300558 0.066331375 -2.01332644 0.163705417 20.00663784 0.587292630 3.06099417 0.161411889 -3.46115358 0.216684625 -6.85287183 0.548714855 -4.27923809 0.630997663 -0.94863395 0.880612945 4.47481747 0.359885215 -12.80962955 0.886070341 9.35753086 0.187176558 2.81002235 0.063035095 0.01532424 0.964327101 0.29867732 0.866408063 -2.89035649 0.812135868 4.17352811 0.608884061 18.15502183 0.920568258 -2.92662792 0.550792959 -6.08090449 0.965036595 -1.09135397 0.862548019 7.02816784 0.042277017 -21.20245068 0.430673493 -8.83397584 0.724976162 -0.89055843 0.017934904 7.03871587 0.308829557 3.84286316 0.685105924 4.50280692 0.447635420 11.39207346 0.875177896 10.86673874 0.518530912 7.09853081 0.588367569 -12.82864915 0.184667098 13.74888760 0.610891139 0.37379146 0.557720134 -9.79020267 0.942839981 0.71574466 0.564570338 -17.56040637 0.182061777 2.52620466 0.306875011 5.37718673 0.366807049 -1.83964300 0.465772898 6.04848363 0.644501799 4.57402403 0.121419591 8.55606848 0.373011464 -8.46827907 0.491176571 -1.77989798 0.734722847 -0.68661121 0.540984182 1.55798880 0.822587656 5.22810831 0.333747878 9.50280477 0.068100934 -3.74521465 0.248537644 1.36045068 0.851827791 4.41604088 0.197207162 -3.72568327 0.726916693 -5.36123334 0.906513529 3.61594583 0.414340595 -10.01952852 0.140372658 25.48681482 0.354309660 -3.34529093 0.090075388 -18.00437582 0.461438059 -5.29782460 0.004362856 2.79608522 0.861294398 -1.64076209 0.345775481 6.82802334 0.137933862 -0.45416818 0.404379208 -1.66868582 0.797685201 -10.02820292 0.075876582 5.68232031 0.404815042 8.25113850 0.769173748 -2.83544237 0.076583474 0.87659945 0.092751009 6.60270870 0.530444351 -12.63924989 0.362099960 -6.24451253 0.641993458 3.53339015 0.461991892 -0.74012232 0.437409755 15.37311996 0.974913038 -8.09464797 0.543308711 -9.61320222 0.221564578 0.21843662 0.856512540 -1.56958954 0.610709221 6.44977372 0.200382138 -13.29136274 0.093222309 6.46257214 0.024135196 -3.82727990 0.601335801 0.43081953 0.268230667 19.06654416 0.219972815 17.02906651 0.996849502 -10.18073139 0.012543080 12.72088788 0.910600764 10.45328185 0.331285901 7.14370922 0.896312020 -2.81754334 0.048741266 6.40217095 0.075796756 -3.18030478 0.666325307 8.64585957 0.120549153 1.37952764 0.899991932 -11.81143886 0.601949630 0.03899706 0.363808260 -10.63828243 0.031092967 -6.66940972 0.246204205 -5.07374962 0.951272057 4.82281566 0.063928187 -21.93693564 0.050972680 -4.54569883 0.225839693 -0.92422779 0.437796785 -1.11683029 0.740215139 16.77765554 0.851072372 9.73614597 0.388180586 14.05345168 0.063760129 1.20512012 0.665964184 8.00307080 0.102447114 8.01252623 0.580929209 -13.54924183 0.438420739 9.87164361 0.970859344 17.63437095 0.250501797 -3.42503574 0.873290220 -2.45873197 0.847756049 17.29212092 0.411683187 1.15496098 0.530658504 -2.14438907 0.592255367 -1.79942021 0.517773009 -1.30677990 0.830860762 1.70233874 0.291826660 -3.05532536 0.801767829 -4.06732625 0.092294501 6.34665476 0.270426235 9.46946411 0.196915311 14.50919907 0.480357167 8.93767237 0.778228613 1.90298854 0.903146151 18.50500507 0.598561307 4.45123027 0.555898218 11.37344114 0.616557707 -12.14693218 0.409187285 18.27198688 0.141619222 -5.75939569 0.056989619 -4.05515382 0.369281201 16.69882098 0.946885257 6.39050536 0.679704228 4.04213339 0.662792380 6.89608366 0.419877433 1.56496633 0.358227958 5.16679947 0.095144366 -3.06280456 0.883265975 2.76279175 0.866571973 1.84969249 0.264869828 21.79840498 0.702650979 1.42450528 0.719308635 0.96797046 0.111937435 18.26840323 0.075621738 13.38288377 0.573399086 2.41101500 0.766238677 3.83866337 0.499888953 -1.56577367 0.695244089 -0.90342790 0.671654151 10.83775583 0.026041124 -9.89767935 0.745297991 11.74840150 0.309144074 1.73069359 0.814063985 -5.27966183 0.591005828 3.33030043 0.559401806 1.31427975 0.520950237 -10.04588558 0.507008362 10.41228345 0.425867272 1.71961097 0.595783108 -17.54904427 0.328788939 -2.23545419 0.223377350 -8.68774333 0.980964240 -3.48048220 0.008877675 -3.69635326 0.090236718 9.76114237 0.769375983 -10.25662038 0.508137553 0.11155446 0.468504431 -8.06824580 0.414098962 3.10031660 0.327130207 -3.33393146 0.756896774 -3.96276749 0.530956360 14.53610268 0.846474699 1.70505918 0.754662464 -1.93495001 0.656650411 5.01974522 0.745337633 13.41249973 0.489362476 11.49288744 0.335924476 12.59019763 0.155560469 -10.17947298 0.677318449 0.05556115 0.655090105 3.82092860 0.051838719 8.23041456 0.918272190 -0.50314649 0.772015826 20.05162157 0.880265258 8.98816884 0.666646668 -6.28312120 0.138534416 3.68589909 0.274559458 0.59699510 0.253180863 -2.74783135 0.983525221 0.32515065 0.839969577 -3.60606166 0.330646732 -0.82037740 0.129591173 6.12444860 0.098536516 10.95671074 0.033546728 -2.84911174 0.720288722 6.04597572 0.577061422 -0.60147150 0.674096868 -5.30458364 0.291468008 2.68044943 0.379853840 0.85986585 0.984214339 -12.77906359 0.882390290 7.21420144 0.550884826 2.31817022 0.231021556 11.60161950 0.888496654 -0.19346228 0.242609713 5.07478120 0.759161318 14.54155003 0.040387654 3.81039636 0.874572741 2.23233049 0.448317248 0.19481869 0.201906051 2.81530451 0.132131690 12.39893259 0.674693704 0.47054642 0.632959494 2.16152913 0.734480632 0.33398836 0.315024718 7.35509037 0.304570986 -2.92336559 0.539062343 5.79622573 0.392393310 -2.37607425 0.403380474 0.04498550 0.756875541 -1.63674414 0.613789514 11.80310547 0.832651469 6.30630243 0.850689403 1.48394652 0.096243229 4.03361865 0.799660045 3.54707273 0.408520520 2.00327040 0.702944912 17.30761707 0.380542812 5.72738968 0.105447516 -13.64604891 0.328506659 8.35976334 0.702173924 -7.41197443 0.134396488 -15.95683040 0.618526462 8.76889573 0.950243069 -1.13482624 0.113477080 -0.60311407 0.090444247 4.95508365 0.612511543 5.36934491 0.979213258 -0.03554882 0.807185690 -11.58131144 0.183341373 4.46809041 0.796330582 12.49741067 0.346860912 8.63824488 0.073684997 0.49990913 0.732519306 12.82688360 0.109400213 13.20375065 0.850369092 -8.41110869 0.177717087 16.31959963 0.727704840 17.59203613 0.235311681 0.32148420 0.842195936 5.43148331 0.670904647 7.14649727 0.028190029 0.25410683 0.421535783 -12.41047826 0.086404379 -10.64180909 0.229659236 -6.40185653 0.876365242 15.63063324 0.667672536 1.94280423 0.799266628 -5.76507450 0.367344192 8.60895533 0.154109357 9.38306751 0.788742770 3.43573528 0.284535277 4.81848966 0.872283177 11.65839314 0.234109111 -5.57884822 0.030363060 -3.94238060 0.325320686 9.38133340 0.201141788 -7.65003459 0.647734396 11.23091019 0.084927159 -6.07705432 0.037273791 7.46380750 0.506897136 7.42034855 0.869351148 -4.43031973 0.231191152 -1.07351537 0.480234836 -1.40653281 0.690620421 -3.82710168 0.990191328 5.04583490 0.543427375 -11.54265099 0.270542185 0.49059479 0.991447248 -1.40871469 0.555998766 3.64241437 0.743840673 -18.30031589 0.357478210 4.27487959 0.770619738 1.28805821 0.654787106 -3.19542768 0.218110139 12.53375654 0.011857644 11.78889419 0.054127726 -5.38392310 0.839309080 16.38024181 0.228801038 -0.59622631 0.134381782 -0.74107258 0.258146632 -12.31429450 0.020524447 -0.79785028 0.968028764 6.39899711 0.038162566 7.42024044 0.716163692 -3.62470664 0.018201813 -2.55049724 0.162446610 -10.79888854 0.683070478 10.18490144 0.546461234 -2.76979044 0.198830067 4.85164813 0.094100357 0.96477200 0.381801756 8.13344336 0.639730450 9.04684412 0.786084368 10.41746272 0.828304181 0.94334368 0.798419831 10.13116556 0.191715972 -4.12728628 0.575178239 -9.59222379 0.876405375 1.64680258 0.391003085 -4.58897613 0.039176486 0.38394379 0.511577564 -4.80428215 0.222785463 0.35363661 0.681658725 -9.63685708 0.183035382 3.54363414 0.766127414 6.89610808 0.967514568 -2.03781105 0.464416752 8.67956196 0.421424078 -1.09959038 0.061231448 7.12587456 0.028601318 -6.93064672 0.402561175 8.57989199 0.925089270 -9.55071810 0.454993099 -8.11914736 0.509644286 -5.41909698 0.077813151 -17.03336572 0.875713545 -1.27438609 0.602163625 3.09834374 0.105599007 -1.59865741 0.439939102 11.82272089 0.754984309 4.30969696 0.483834579 -10.76886192 0.222486992 7.05419803 0.903020271 7.36096847 0.440357053 -2.05864869 0.581170147 -9.08366913 0.318677911 8.57119930 0.605668919 7.87702340 0.570206991 5.22035786 0.542344385 2.37238850 0.595969470 -4.29809941 0.634313781 4.51647479 0.796663089 -0.62478780 0.562099444 8.50866078 0.490014249 3.46694991 0.122890089 -7.31956453 0.885170890 2.20259268 0.167180856 -1.81003626 0.702563515 8.44526939 0.973495019 8.19767069 0.881261264 -5.92422578 0.686557351 -0.11826129 0.712798344 5.66132869 0.922826429 -5.40845018 0.642183516 6.67839036 0.680978989 11.88962825 0.487904896 3.32266332 0.931709581 0.24234019 0.405641313 -12.79023339 0.361005489 -13.57875491 0.266289733 1.81304596 0.775093821 0.36755600 0.400225605 -9.15574205 0.518040748 -3.90436548 0.396869908 9.24764042 0.669374848 0.74869385 0.609881390 -3.62958907 0.928867495 -0.02527232 0.557679930 0.04433418 0.152565816 11.76152632 0.865663501 -4.62181124 0.007000650 5.82271403 0.389678502 0.33289002 0.532940826 -7.65647076 0.681574524 11.81023732 0.107165912 11.42121999 0.989580324 -5.47120641 0.762285550 3.82311561 0.388755074 16.91059711 0.461236022 4.14012105 0.802420151 -1.35278659 0.036646959 -12.81733350 0.179096148 -0.94395134 0.450959878 -5.39002376 0.264783062 4.16227017 0.780743762 7.26179625 0.821382454 15.10062276 0.469253936 1.45877225 0.685434405 -9.87966760 0.767201511 7.03156071 0.195142483 -11.71327419 0.774014869 -4.55518706 0.973103604 -1.75221406 0.175172193 10.35631400 0.080670414 4.97650495 0.597478189 2.25703939 0.585949751 10.72500409 0.339720931 -5.02901029 0.997874377 6.24398637 0.655067479 -5.83880059 0.184948259 2.17256077 0.746741866 -5.59809380 0.277523381 8.19384177 0.334565607 3.35250431 0.952057263 16.20874892 0.901400446 1.63205839 0.235388475 -1.07921163 0.608376332 0.24315118 0.862639830 15.61923078 0.050955422 1.99639207 0.358905687 8.14825538 0.190069662 4.55210835 0.784025901 13.51582298 0.973572910 15.42415796 0.969080992 2.23978124 0.551857514 1.00858991 0.919566804 -2.77293574 0.906998180 7.10750420 0.934792213 -8.01377290 0.682306063 9.67873875 0.239576806 7.54867950 0.065860266 13.85701962 0.733823443 8.48212853 0.285731085 3.55278843 0.998255904 21.94592206 0.205463912 -2.07957143 0.948665109 1.54169997 0.200109744 -11.36934275 0.447122472 3.07094572 0.815147945 6.45818709 0.007849948 1.85594578 0.818796540 -2.43799564 0.962013689 -17.96539549 0.654190963 -0.93433746 0.454930236 -11.06904368 0.898560975 14.89733742 0.479152492 -5.72390675 0.136197255 9.46781102 0.669006610 5.35954546 0.259381138 3.78388994 0.933778797 1.95373423 0.517555994 10.96772341 0.666138826 9.40585102 0.779906833 0.75347502 0.142656741 7.64803672 0.734297119 -0.40051164 0.362230232 10.00747057 0.660820381 -12.86024975 0.072988046 1.43515528 0.229672223 -6.75981709 0.658534537 -5.61355474 0.795897133 -4.40596595 0.038787666 -1.37033650 0.371835229 6.66666573 0.560963737 8.18430044 0.284787698 -0.55742330 0.622783662 -0.39757686 0.673551753 -12.68628005 0.373038561 4.06416215 0.760546238 4.65859855 0.516761886 3.55304076 0.266856843 -7.35294817 0.615783196 1.01222898 0.158266779 9.91052610 0.285619547 -6.42966726 0.573689954 10.97425098 0.985095061 5.79394599 0.404333309 10.09106608 0.441037857 -1.47295537 0.577661077 -2.07959719 0.547176133 -8.76910940 0.498979558 -11.15658312 0.135862745 -0.88456783 0.326480064 9.71607440 0.998076370 -8.76072622 0.386244511 -19.26823092 0.461833959 -0.11280313 0.064155908 0.64625887 0.172078148 -5.35323428 0.331153163 -1.71034509 0.330955888 4.27104744 0.590544244 7.33843789 0.263171531 -5.38121637 0.539675802 -6.87566548 0.127313096 -2.50161298 0.269417630 10.99076986 0.097362729 6.34017269 0.318528587 -4.63672382 0.451038055 -11.55122495 0.987073278 4.78618612 0.297342215 2.97547390 0.197312152 -5.54495280 0.499701114 17.67606173 0.810316588 16.01578815 0.643667608 -0.16258467 0.228284761 7.92123340 0.784289369 -2.26303900 0.270764770 5.84136933 0.437763291 4.96955217 0.389720490 -8.09516710 0.829068548 14.59207207 0.513593803 2.80954688 0.650799867 4.53653552 0.672326278 4.49116737 0.807447691 18.87549709 0.647303378 9.80118464 0.932576117 -13.02124969 0.038651904 -6.15189291 0.697593318 15.81920283 0.249825051 10.81503188 0.152372300 -23.58738366 0.593560367 8.15716338 0.411680007 3.45349379 0.351061414 -6.39345334 0.374926213 8.72924585 0.165759028 22.17948804 0.003736780 -4.73053410 0.582425257 16.88289626 0.484899167 -1.78826142 0.663273340 -0.78106025 0.337039969 -2.92461669 0.810174719 -13.89224399 0.177428986 4.56809819 0.025010350 -1.07452825 0.649632933 0.58148751 0.829606422 12.13329525 0.354819526 17.35605568 0.284862590 -12.43678107 0.827661083 -1.89492796 0.574929572 2.18520382 0.846299917 18.11449649 0.603173531 4.34508582 0.484049042 17.49394569 0.094811656 10.67752350 0.166176400 17.13374502 0.547208197 4.42138123 0.768691494 5.38445574 0.788597361 0.79946671 0.851883720 -4.67547904 0.995621191 -5.61496422 0.523793593 -20.52093126 0.881207308 -8.95996814 0.851078124 -7.63483710 0.739657373 11.02131097 0.678060014 -10.56228517 0.202393048 6.48841788 0.143946271 3.44853632 0.913249620 -0.02080024 0.070765134 2.08654297 0.032468089 8.13415912 0.439470874 11.19028936 0.944954026 0.26670866 0.492724593 -9.33692734 0.982611921 17.23967092 0.313428994 0.36906670 0.660669528 7.89735684 0.977628886 -4.00171487 0.379327632 5.01615432 0.735627296 0.42214214 0.092461754 13.60634772 0.218359635 6.57431413 0.067653525 -1.77668341 0.717799276 5.16227422 0.325502093 -15.29091550 0.332815338 3.33602480 0.594168551 13.80131443 0.817724470 5.92111679 0.947854666 3.59747624 0.330860216 -6.79722403 0.093518715 -1.86606213 0.824179728 17.05226458 0.466573672 10.39712467 0.409067778 -4.78536386 0.891470739 11.92963128 0.719633060 -1.44230992 0.232628002 -12.31860616 0.834134222 2.93439660 0.957842480 14.27963295 0.546264646 2.17488820 0.701170328 10.78772417 0.612332448 -0.47049341 0.378564293 -0.35140634 0.034337429 5.04887868 0.211697132 -3.51562580 0.663243607 -0.82013387 0.602497174 2.78954743 0.325294790 8.67905777 0.820296625 -12.70343389 0.315467361 -2.59373236 0.015571904 -4.60369241 0.293737716 1.58669084 0.671091860 -10.44245103 0.501340276 4.85215578 0.141572007 10.46303284 0.801814632 1.27898298 0.236929983 -1.72225479 0.608500539 20.18685735 0.827124630 3.27308817 0.542065179 1.01596956 0.254672115 -8.88872881 0.460876757 -11.31397349 0.636168639 0.85294367 0.816417328 3.54262337 0.944147626 -10.53603202 0.675775741 4.34832198 0.121988381 11.56451662 0.283063133 -7.36454369 0.500596540 -8.23701113 0.379483261 -8.36081323 0.219730782 -6.39158860 0.739171315 -1.40518544 0.478709398 -4.01314821 0.460476388 -7.34814047 0.406242873 -7.80836711 0.730648091 -0.57729135 0.152336258 4.98352832 0.026424939 -3.78181635 0.453598432 20.16821827 0.845273124 5.20758271 0.573569671 -3.05534245 0.286828574 -5.31306254 0.961990401 1.09307567 0.006478724 -3.75412572 0.598277695 -2.38444245 0.777900122 2.46837742 0.280363751 9.72195519 0.041094463 3.96271247 0.604775284 2.14105354 0.400315328 7.88645912 0.404573389 -4.03565076 0.798377309 10.80180959 0.932152434 -10.89359212 0.446813857 1.43144578 0.310194540 4.79825196 0.504826858 10.73201365 0.384306369 -4.07526187 0.893893643 -2.84330198 0.390202663 5.81825057 0.830581384 -2.77842745 0.382966910 -7.70333673 0.157692966 -3.25753058 0.726303603 8.50032387 0.556524444 2.35027236 0.857076526 -1.70740565 0.194760923 -3.40693880 0.696420946 -8.03983352 0.514393263 -1.85105344 0.609459979 -9.01148029 0.526019631 18.37344635 0.690793045 16.46079416 0.811535334 4.10224315 0.043403618 7.06657672 0.831274577 15.31421824 0.434558881 -12.36760970 0.004215634 1.95473415 0.277788662 -0.93207006 0.368433415 15.39919341 0.843189783 5.23452387 0.626226925 11.40805770 0.002417288 -1.30282837 0.072493756 3.92130690 0.675355182 2.53148399 0.027222295 4.92705318 0.934429364 5.54978818 0.042268708 -2.19608977 0.246743834 -0.62565550 0.858214200 -8.98329365 0.646827226 12.78468146 0.533966352 2.01061290 0.418710227 1.03689579 0.019241741 8.01166696 0.992268130 -4.49786437 0.694127903 -8.15387184 0.066275002 2.22256207 0.083301613 -12.27145086 0.535369809 9.95709112 0.227692557 14.58198717 0.667298058 5.98046083 0.922503625 1.25640725 0.632933575 9.77623752 0.136171032 5.57068426 0.374916651 -10.07048336 0.470411379 3.69267954 0.897278365 2.22185354 0.212539549 7.96155623 0.720525208 -6.21272358 0.771491819 2.63054735 0.474989115 -2.81488890 0.675381020 4.52747191 0.118615879 -3.22975936 0.783991133 11.42834761 0.423344824 0.26512464 0.617515445 -5.84322807 0.210915613 9.61073028 0.988117333 -6.11878012 0.492318959 5.30581443 0.339379499 -6.40132703 0.903540026 1.22921808 0.122161655 8.08547837 0.197296588 -0.77943801 0.935963718 11.43194858 0.828270943 -5.41689395 0.556863468 15.14667847 0.565186375 -5.15327419 0.542802437 -3.95903082 0.643379366 5.78847793 0.391369361 11.54430873 0.158789330 1.90340148 0.841316129 14.69680285 0.532022770 0.68552840 0.367073827 -8.72287967 0.250127491 9.35401445 0.836083158 5.32139524 0.996712598 -14.53387897 0.825434481 -2.93925146 0.513153861 12.54386493 0.713306793 2.04842442 0.993893406 2.87461954 0.049843312 4.89765230 0.376710062 -6.23945314 0.321108142 -3.45840168 0.854710947 9.05807160 0.199992188 3.33815006 0.787302467 4.22244242 0.351841910 15.75879160 0.268699469 2.78549859 0.920299974 -4.46643118 0.727283862 0.48021298 0.428672083 2.55814938 0.130915212 5.00692968 0.062266047 4.78801127 0.325124688 6.39524485 0.693406744 -10.46792584 0.458128441 10.14111908 0.353412759 -10.56424183 0.821588957 7.60967746 0.267669137 -2.34956688 0.434855697 23.82269027 0.802311880 8.37170447 0.445185000 10.05024769 0.778687843 -9.15753018 0.957292819 12.17438228 0.774769426 1.57960028 0.783591989 0.06719501 0.849073924 16.21114558 0.243444943 -3.79808298 0.842994720 8.98927715 0.020537113 7.72362992 0.984168340 11.25158442 0.152385348 -21.23936903 0.909204114 7.34995949 0.987249305 -7.99435203 0.335456401 -2.78218185 0.768517548 11.59547596 0.466617637 15.90870706 0.071892573 5.58160897 0.554485703 16.05253351 0.815206562 -3.23103465 0.280495460 -4.61108636 0.035757819 5.41596511 0.746146856 2.92445613 0.136743821 11.23628254 0.681316365 -12.93714705 0.838791576 9.94668264 0.084457395 -4.56061529 0.983605894 -4.24795688 0.601732731 -2.83740044 0.375102341 -0.43078317 0.403870303 15.19689584 0.114826374 -10.29920266 0.731582141 6.01686515 0.641655876 6.69431335 0.496723697 4.62223602 0.328118236 -1.74309026 0.072604771 14.31971261 0.827101483 -1.86629155 0.613346722 8.30971428 0.274948560 8.50080711 0.059822908 -7.94061422 0.121069240 -2.72096492 0.710791774 3.33259421 0.398621625 1.73248470 0.488581205 9.56008489 0.011104565 12.71499762 0.038568985 4.11512127 0.219846314 -0.96707584 0.822646857 4.98621667 0.633779997 4.69384821 0.295708955 10.16008645 0.778287787 -7.72973800 0.097096969 2.87264210 0.796538177 4.56095440 0.862952770 5.02621658 0.934628629 3.18138681 0.805600816 -1.02245780 0.317640678 18.16001652 0.992503640 4.13729026 0.941910149 1.61211303 0.377271914 1.71520009 0.735196094 3.26325421 0.514432564 12.94663819 0.591190711 10.53239931 0.005877708 8.06705056 0.340779884 -5.09007267 0.332516161 12.31973355 0.323119296 -2.69957650 0.633232996 12.51207803 0.377641090 8.02081444 0.859293157 -0.13098726 0.099370804 -0.97757546 0.852873609 16.73605399 0.595854575 3.63219184 0.329310613 -4.79105630 0.247760146 -4.77209495 0.708235587 0.92107647 0.924567254 12.12724271 0.433550712 -5.07731478 0.200109463 9.16019579 0.897456586 18.33260560 0.649877409 1.93596773 0.584401505 8.51254631 0.283154523 11.41092928 0.698703314 10.85035748 0.351078210 12.62749979 0.570101319 -2.32028296 0.313842122 -2.45778301 0.007943144 6.93102526 0.108737491 -0.67304654 0.245399613 9.27294774 0.204010286 14.29292826 0.396294626 14.05843185 0.864613328 -3.73515954 0.305862948 0.36606339 0.116802407 -5.79235478 0.457308058 8.70346900 0.858244380 -8.91321043 0.077001581 0.58499566 0.503209780 0.39160153 0.324883353 7.46715326 0.343451039 12.36256009 0.679483638 8.84283689 0.687359177 -6.39396909 0.113065562 -3.67844896 0.667335667 9.36904962 0.009815419 -3.25244888 0.213105120 19.09389976 0.593130536 7.28826611 0.829483570 -5.44565944 0.956490203 7.96993416 0.770961635 0.20683778 0.006497153 -3.73273760 0.037042812 -10.64745846 0.813594448 5.70578906 0.157678242 4.05282218 0.224663656 14.77711159 0.577586777 0.89685942 0.297213941 3.92600687 0.672347849 -12.29347477 0.367072171 -9.33603480 0.456544225 -0.86683190 0.088696811 4.65685745 0.779783359 1.24438030 0.712958633 11.43533814 0.920345548 -10.18380242 0.044456697 -1.20684029 0.992051648 -9.78059038 0.611477837 3.05588762 0.581933667 3.47419279 0.769325101 0.87528245 0.455214184 -3.13185655 0.805887381 -0.82283965 0.707668384 -1.86717272 0.984060013 16.56357048 0.217369677 -2.11052646 0.474156371 -1.39795364 0.958554209 4.87468692 0.328779186 2.69163553 0.401633221 6.08640626 0.599963560 7.41420081 0.240202007 5.73729928 0.696034193 7.31747120 0.569520861 -6.20465547 0.214005920 17.52477873 0.667125450 12.97855692 0.796977778 -3.35883428 0.379721403 -2.90306972 0.552454626 5.31617371 0.401625473 -3.86414389 0.830986352 -14.94107832 0.702705123 -5.74060402 0.833328045 -8.10116203 0.078855027 23.48247017 0.568666620 20.22005082 0.357069809 -2.53387193 0.637455425 15.72048831 0.845354124 -4.41494567 0.934471473 -8.02254420 0.378467959 -0.13398716 0.489382793 0.95967155 0.813667919 0.14835664 0.215786848 14.31875579 0.675145039 -6.36589196 0.822037848 8.25942906 0.156787526 -7.33597529 0.051076292 12.58936771 0.666507807 2.34653798 0.626196518 -0.69351398 0.050664564 7.08738260 0.808776877 5.19653521 0.779008623 3.20900427 0.197212774 7.81171331 0.744975548 6.49008186 0.991318119 7.27471854 0.839642650 -7.68367290 0.880500743 12.04846713 0.797754890 14.93435279 0.190527791 -3.83641079 0.075995951 2.15090497 0.426560973 -3.61166623 0.777188818 8.49333248 0.891445999 -7.46936100 0.148607446 13.85406193 0.983656455 12.20477754 0.499345090 10.09415710 0.638127733 5.37134772 0.110929011 8.17660840 0.879411588 -4.38804367 0.608933700 -11.78145902 0.265134740 6.18940186 0.970982743 -16.24831477 0.844983635 9.52790402 0.578152651 16.44372225 0.264144422 -2.48286428 0.893865621 5.33297280 0.512990215 -2.68912507 0.851636020 9.94607707 0.644483197 -1.93526852 0.550759844 2.34310539 0.787853650 11.79131608 0.983668283 3.16689104 0.605394987 10.47759320 0.919442774 2.86973133 0.557835916 10.30674302 0.442504870 10.92820575 0.976183635 7.98050212 0.139334994 -0.64719705 0.981199028 -2.63625596 0.341524563 11.38799583 0.858987904 1.37321916 0.202373294 12.66698520 0.142127091 5.83599540 0.864497670 4.88659560 0.472598564 13.00108599 0.961629827 5.79514791 0.408377170 -1.47807631 0.536772872 -3.38142805 0.288956265 6.25154986 0.828695103 2.40919373 0.478123848 3.72990486 0.056539500 -9.90915815 0.603356617 0.21737084 0.737251896 5.36929388 0.026920178 -1.05027354 0.034992509 -4.97887624 0.506301429 -6.40058435 0.014061876 -0.14610837 0.619699963 3.78483619 0.653952701 3.84143365 0.162122572 2.66030676 0.196542503 -10.56809462 0.386200215 -5.01140125 0.711703654 -3.09809005 0.118120179 -2.76110171 0.118809515 2.85825107 0.129646974 2.75993661 0.171779333 11.55931169 0.372165133 9.21211486 0.969079819 6.02207148 0.498965865 -3.52883224 0.954619249 -2.60190803 0.069405278 1.34183694 0.569402487 -11.35155228 0.766344735 1.04661568 0.023673810 -1.90461932 0.179728300 13.72465582 0.467775796 19.14882438 0.476924297 -1.07480326 0.944407858 -8.44289331 0.059804028 1.89732882 0.743225795 -7.87832463 0.672539050 -12.24163608 0.916803014 -12.77212790 0.648129714 6.39197262 0.622954436 5.26261666 0.494421400 -10.65239640 0.695527931 4.63841458 0.499519163 -2.94276544 0.429201572 4.68788953 0.639613685 -1.03031400 0.349342009 -2.69946354 0.221796918 -15.32237714 0.631289988 -8.31962698 0.925363812 -5.80897714 0.833536878 7.16070989 0.832098478 -10.99679727 0.794048223 0.84514458 0.748014415 2.23308495 0.111176288 3.56351018 0.599805508 0.88336430 0.746908710 -14.63461670 0.314391808 4.39039715 0.079604833 -7.07001439 0.633705345 2.11252583 0.461468123 7.60219364 0.497389476 -4.87713428 0.039952736 2.17515292 0.421830084 0.64302362 0.267982804 -22.29371533 0.646257366 0.31652779 0.060548371 7.93445046 0.343570449 0.28292029 0.651909785 2.77775640 0.637679287 6.22941586 0.291132945 23.68567532 0.708513840 9.49503014 0.645200206 0.87405420 0.063154289 -4.04931224 0.110797498 8.91607239 0.732917195 -5.77728018 0.635435595 -16.37296319 0.343727613 9.87409940 0.774177478 -8.11360210 0.377765616 14.54242540 0.204343527 0.36239636 0.115528352 19.51009176 0.181365423 1.23592729 0.011676577 -15.81877035 0.767155028 -0.05911251 0.737944231 -6.55395965 0.214062137 -7.85591487 0.539865054 -9.73010882 0.730924287 11.79433862 0.267116856 -8.84308360 0.088069165 -5.56689174 0.405987947 7.59010135 0.655631611 10.07629305 0.031106157 -6.19331485 0.052350502 -4.58626710 0.326901540 -5.19431549 0.125740555 -2.08129025 0.034657174 -10.48798034 0.153632237 13.04657686 0.317295703 1.94142067 0.731437668 -1.62470735 0.701070475 -12.27046912 0.505781742 -2.96095228 0.122808075 -2.91847765 0.372668438 -14.83230131 0.100749725 16.57350659 0.707854947 10.05473238 0.244046174 5.50858969 0.070691273 7.65309196 0.245393047 7.16359996 0.056261015 4.33026356 0.318855549 -4.65721575 0.271249938 2.85909691 0.309377566 3.02736080 0.553944209 6.22796768 0.763945813 -4.47036396 0.197721195 2.78901176 0.441166128 -9.94574794 0.964660659 1.86451969 0.704635530 -10.38926659 0.772304221 -5.36565800 0.029527218 1.99230152 0.578448308 13.65547415 0.936050102 -2.05229879 0.851521142 0.99504588 0.974891334 -1.46027404 0.320227281 -8.45614275 0.727910071 -0.95201934 0.199101032 -2.46642929 0.462252060 -6.44060430 0.703637604 -2.58115910 0.084948525 0.76248197 0.125769097 12.00603845 0.675927328 1.97538215 0.782502470 2.23331320 0.870228155 -3.10226060 0.485056198 12.59337170 0.584729095 -2.42247402 0.387588168 9.41981063 0.374604221 6.26806243 0.727453335 -5.30630356 0.427294265 13.81542647 0.394246994 1.05647858 0.646684666 -12.25005208 0.010531726 -4.58162076 0.077133994 0.58094190 0.400275636 5.79443858 0.641731247 8.87635216 0.913593476 9.71048520 0.955285711 13.10563373 0.908471848 4.99194220 0.967014095 15.88178853 0.041518216 9.35962068 0.864770023 -7.53095731 0.300106124 12.18427585 0.248876997 9.22034502 0.450149366 -1.02861237 0.684246939 -2.98140404 0.326901490 -4.64316598 0.425381055 15.35233259 0.630774937 -1.85655250 0.226889991 15.43748330 0.584219351 10.39060893 0.387854461 2.80705696 0.564024865 3.48201221 0.787103673 7.03787977 0.112019552 8.41853061 0.798376796 15.63925527 0.873984550 -4.05742183 0.699131238 6.56954685 0.720018710 2.44007265 0.232697343 3.75597926 0.975133449 2.92362149 0.290975435 -4.74372257 0.003738451 1.28365940 0.987536495 15.65288265 0.179629701 -11.76385004 0.850614822 1.56331228 0.592017435 -9.64774741 0.024951969 -9.44879860 0.993960270 29.33340056 0.913358233 7.97233120 0.021820585 -12.10837953 0.401535846 -1.20729618 0.984977268 3.63219301 0.491142613 2.79853507 0.663823888 3.19584583 0.612511282 -0.81790885 0.908769330 -1.67795944 0.611690031 2.55137163 0.109447998 4.36572889 0.382049700 -6.35667866 0.162787163 -0.76239101 0.892383562 -3.99558996 0.466572017 -0.47513018 0.457760464 -10.69568261 0.544872910 4.30943512 0.982456072 2.91825703 0.823403368 0.10753188 0.945676881 -8.38623073 0.923085521 4.95690232 0.188128654 5.39956649 0.331692462 -1.47421789 0.327711090 -1.81689665 0.713285385 5.15137860 0.414906436 5.68897151 0.110799415 0.78825159 0.396824099 -1.78376652 0.929264595 0.76991060 0.950124414 15.81469073 0.951245195 -4.33820920 0.009896093 1.67174323 0.821983745 0.38997945 0.928857784 1.97848484 0.175680230 -5.81067801 0.772580245 -10.45208478 0.418845035 13.34024524 0.905645046 -8.79585122 0.906516178 2.89093397 0.113010960 2.22324289 0.799940482 8.95497981 0.984663669 0.93288527 0.277914575 -17.35306978 0.455587022 -3.26914604 0.406757639 8.75871227 0.067059659 1.79914932 0.784879863 -0.67305388 0.006393497 1.66805704 0.039614073 9.03868439 0.601066847 4.29458670 0.015772820 -8.15564320 0.939633197 12.50538902 0.766347628 -0.45547258 0.464314122 -9.47180656 0.640114882 -13.25567198 0.125841930 2.87660101 0.381931128 7.37834152 0.648958712 -0.45874073 0.303139498 4.87941450 0.500090729 4.50344891 0.311329309 -6.14257896 0.061368838 5.98243271 0.873804882 -2.64694079 0.080493398 -17.79727796 0.188420116 -13.52552336 0.798403568 2.29086373 0.518700767 5.21493652 0.788828533 -8.09641615 0.775041349 5.87005782 0.079447757 10.74795720 0.955691540 -8.01115709 0.004508053 -7.53735064 0.054195934 -6.79130165 0.877193354 -1.26419539 0.837772170 8.31082852 0.967509866 21.83090247 0.261529880 11.20453234 0.913858875 7.19128396 0.541942489 -2.93623595 0.860095891 -3.61446403 0.022418065 -6.59997709 0.532998307 3.71486934 0.522669434 18.03420874 0.295064126 -8.75452291 0.390175021 -7.83680812 0.263760724 -1.10263921 0.501819826 2.05633484 0.338684642 5.25636848 0.558667384 -7.33260497 0.457327559 3.86721296 0.612182242 -15.94331373 0.478329365 3.71501899 0.264241588 18.26175822 0.023212661 -5.21093378 0.184378036 -2.44074986 0.297114134 -11.88339919 0.875956945 7.52127093 0.927322099 5.31597834 0.416344968 11.42012314 0.952491078 13.64950955 0.794183413 12.50861255 0.390723282 -3.48142207 0.538708662 14.32910902 0.085221990 5.76196699 0.313860477 2.63751452 0.917424732 2.99975231 0.208662214 7.09852825 0.798246964 -1.95742636 0.352166210 7.80534904 0.386523123 -4.47229047 0.290188493 -4.35535158 0.761527294 1.47083860 0.447897289 3.09504296 0.048513534 3.50446804 0.925072429 12.00487617 0.574499971 10.35171466 0.934193962 -5.63256003 0.968833982 7.15625220 0.467160468 -7.81378393 0.790220187 4.52101003 0.014459969 12.90773453 0.990835752 7.70737851 0.785329264 -3.37196794 0.066025357 -5.12793918 0.347459322 -7.96083724 0.216608294 12.81247279 0.287880308 4.63872463 0.426881173 -3.85439309 0.336532356 4.55633320 0.108001536 -2.40824634 0.135247519 1.65932541 0.005108006 3.26129578 0.093163961 -3.52114597 0.544041275 -9.08479260 0.111212700 7.75150456 0.942726234 7.44829768 0.396996218 14.44430576 0.525470762 -2.13457508 0.207577358 9.74871681 0.537177845 -4.53338693 0.625854028 16.15962824 0.947933141 -0.17711664 0.480940902 -7.21470818 0.006952612 -6.27644212 0.737909602 -0.81648165 0.230003567 -2.10429152 0.209671398 7.69291241 0.987903443 -0.32284504 0.183904658 -0.90833921 0.782169770 10.35542238 0.201758865 10.40788689 0.540802365 10.80011849 0.298263948 7.39943598 0.785716539 -12.71674257 0.154135834 16.67139866 0.116794235 12.47832985 0.998179468 3.24041348 0.653080096 -5.50381593 0.995396942 -10.41952811 0.576472768 4.33514092 0.146434686 4.41294276 0.507165968 -0.14746982 0.698144836 -1.33323051 0.466481571 -7.01201350 0.797150114 6.58669848 0.942287809 7.19444974 0.053569397 -5.66046997 0.435728340 -5.07828702 0.497727572 13.72045272 0.324222944 9.99111984 0.355713969 -4.42363728 0.071790181 -2.34300923 0.618434528 4.98594041 0.605667438 -2.45307721 0.894546647 -3.52276424 0.760086779 -3.69489441 0.960758209 13.04792817 0.511273320 21.61433486 0.236270637 -9.57303968 0.964235539 11.70400744 0.391045695 4.25170422 0.411577090 7.87516537 0.952858161 9.89202673 0.971106687 7.51554467 0.505791978 2.17944879 0.893835908 0.82420351 0.213912155 2.47121932 0.688019842 -14.88503628 0.640950883 8.16032283 0.277742858 -4.65776244 0.129415853 7.48274838 0.074213153 7.70537066 0.476778957 5.88202944 0.351838898 1.95618325 0.106331699 7.22064623 0.511434587 -18.64632081 0.009314188 -6.16794611 0.526204245 2.14042033 0.675800465 -1.89535048 0.916845690 -7.77156605 0.069742819 -6.84078801 0.865082345 8.17539904 0.095895629 10.75170309 0.821383078 14.31498805 0.117893208 -2.82264467 0.809086411 0.11117380 0.400587471 6.43898314 0.333163663 9.48110784 0.465173316 5.39395511 0.695273081 -2.05636570 0.508060862 0.68666117 0.647109494 -6.41880322 0.267530762 -0.12096589 0.986901165 6.46062643 0.588580914 -4.20926136 0.550783675 4.07354300 0.907963701 10.84045143 0.900920521 2.64504664 0.767700269 10.34578229 0.197810342 -0.19222273 0.281932395 3.47400952 0.977555902 11.04549389 0.694010579 6.79729856 0.056652433 9.28300628 0.598930531 -3.53453282 0.183412212 8.04028248 0.250746943 5.75964045 0.424692336 -4.98252741 0.867446071 12.00352175 0.289615080 7.53497791 0.350915526 2.54579776 0.655113837 -9.29572208 0.900136667 6.41659249 0.100570650 7.37095646 0.907179211 -12.78417775 0.262214556 0.87962107 0.624657444 -5.96939907 0.296725805 -2.56857339 0.604065931 4.27131811 0.962952479 21.72603838 0.442485270 6.10056565 0.418383130 10.48099521 0.333593221 19.28363092 0.382408442 2.12080726 0.601206970 -6.82450704 0.740158518 11.32395692 0.627015570 5.00040701 0.476274658 -11.64750733 0.105099095 5.77442654 0.576560214 0.31340364 0.516479036 -2.09881449 0.146089191 5.12411327 0.368130477 1.70530391 0.621828438 -12.95649749 0.355726301 8.43735652 0.275383759 -15.56161079 0.413160084 5.28942694 0.069125495 5.96040877 0.438716686 -2.59318107 0.571116303 6.95988992 0.650760909 14.00074797 0.623645969 1.66101456 0.558763985 -2.57968349 0.648185379 -5.47584253 0.716901151 6.37222581 0.060563130 2.83664864 0.842419730 1.48926558 0.620280308 0.33471689 0.170312461 5.21648412 0.317639631 0.51733642 0.843867329 9.86005834 0.306036746 -5.81145791 0.975655452 -5.43219061 0.303385368 5.87157118 0.677369776 2.08889926 0.310200439 -2.53433085 0.194730908 7.01359575 0.674259533 -2.00936260 0.682056466 -2.98240739 0.787899917 -7.43289210 0.357483044 -12.58905988 0.981387385 5.78095517 0.533526274 -1.23065889 0.687266774 -6.82309960 0.293249774 8.47000829 0.842056399 -5.81624772 0.303700280 -14.83571031 0.311387926 4.66808472 0.091222946 -2.90144463 0.438301785 10.62458662 0.828335698 7.88002491 0.990156110 10.27680283 0.251087079 -9.42498970 0.292462244 6.73027640 0.213065205 1.28169895 0.353152789 -14.29203733 0.264563048 20.35772711 0.265208837 3.55095071 0.242905653 -17.97067670 0.373951756 10.53141139 0.247520698 0.05293205 0.579940423 12.79674707 0.288031751 -5.44235185 0.075899079 14.29464811 0.960707538 -1.36753291 0.124265178 -4.25946974 0.521720352 -12.46519252 0.385503339 -6.65343143 0.540942219 5.55949184 0.143194404 -1.20480594 0.515905644 -4.13839908 0.164461445 -2.21345425 0.812969725 3.94223380 0.229238952 -10.78661097 0.395049514 3.06997341 0.791234255 24.82205477 0.110859039 6.28791249 0.867125744 -2.80296119 0.703583849 13.24274039 0.425951975 -0.19577471 0.361568727 -2.34894781 0.954814545 19.76339577 0.635462177 -1.87591480 0.149121567 -7.70962391 0.711708342 -2.46291902 0.390902746 end data regression /variables=v0 v1 /statistics defaults /dependent=v0 /method=enter. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:1782: pspp -O format=csv regression.sps" at_fn_check_prepare_trace "regression.at:1782" ( $at_check_trace; pspp -O format=csv regression.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format v0,F8.0 v1,F8.0 Table: Model Summary (v0) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.05,.00,.00,8.11 Table: ANOVA (v0) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,235.23,1,235.23,3.58,.059 ,Residual,98438.40,1498,65.71,, ,Total,98673.63,1499,,, Table: Coefficients (v0) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),1.24,.42,.00,2.95,.003 ,v1,1.37,.72,.05,1.89,.059 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:1782" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_651 #AT_START_652 at_fn_group_banner 652 'regression.at:1807' \ "LINEAR REGRESSION no crash on all missing" " " 85 at_xfail=no ( $as_echo "652. $at_setup_line: testing $at_desc ..." $at_traceon cat >regcrash.sps <<'_ATEOF' data list list /x * y. begin data. . . . . . . . . . . . . . . . . . . . . end data. regression /variables=x y /dependent=y. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:1827: pspp -o pspp.csv regcrash.sps" at_fn_check_prepare_trace "regression.at:1827" ( $at_check_trace; pspp -o pspp.csv regcrash.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/regression.at:1827" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_652 #AT_START_653 at_fn_group_banner 653 'regression.at:1833' \ "LINEAR REGRESSION missing dependent variable" " " 85 at_xfail=no ( $as_echo "653. $at_setup_line: testing $at_desc ..." $at_traceon cat >reg-mdv-ref.sps <<'_ATEOF' data list notable list / v0 to v2. begin data 0.65377128 7.735648 -23.97588 -0.13087553 6.142625 -19.63854 0.34880368 7.651430 -25.26557 0.69249021 6.125125 -16.57090 -0.07368178 8.245789 -25.80001 -0.34404919 6.031540 -17.56743 0.75981559 9.832291 -28.35977 -0.46958313 5.343832 -16.79548 -0.06108490 8.838262 -29.25689 0.56154863 6.200189 -18.58219 end data regression /variables=v0 v1 /statistics defaults /dependent=v2 /method=enter. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:1857: pspp -o pspp-ref.csv reg-mdv-ref.sps" at_fn_check_prepare_trace "regression.at:1857" ( $at_check_trace; pspp -o pspp-ref.csv reg-mdv-ref.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:1857" $at_failed && at_fn_log_failure $at_traceon; } cat >reg-mdv.sps <<'_ATEOF' data list notable list / v0 to v2. begin data 0.65377128 7.735648 -23.97588 -0.13087553 6.142625 -19.63854 0.34880368 7.651430 -25.26557 0.69249021 6.125125 -16.57090 -0.07368178 8.245789 -25.80001 -0.34404919 6.031540 -17.56743 0.75981559 9.832291 -28.35977 -0.46958313 5.343832 -16.79548 -0.06108490 8.838262 -29.25689 0.56154863 6.200189 -18.58219 0.5 8 9 end data missing values v2 (9). regression /variables=v0 v1 /statistics defaults /dependent=v2 /method=enter. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:1883: pspp -o pspp.csv reg-mdv.sps" at_fn_check_prepare_trace "regression.at:1883" ( $at_check_trace; pspp -o pspp.csv reg-mdv.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:1883" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/regression.at:1885: diff pspp.csv pspp-ref.csv" at_fn_check_prepare_trace "regression.at:1885" ( $at_check_trace; diff pspp.csv pspp-ref.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:1885" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_653 #AT_START_654 at_fn_group_banner 654 'regression.at:1890' \ "LINEAR REGRESSION with invalid syntax (and empty dataset)" "" 85 at_xfail=no ( $as_echo "654. $at_setup_line: testing $at_desc ..." $at_traceon cat >ss.sps <<'_ATEOF' data list notable list / v0 to v2. begin data end data. regression /variables=v0 v1 /statistics r coeff anova /dependent=v2 /method=enter v2. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:1903: pspp ss.sps" at_fn_check_prepare_trace "regression.at:1903" ( $at_check_trace; pspp ss.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/regression.at:1903" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_654 #AT_START_655 at_fn_group_banner 655 'regression.at:1910' \ "LINEAR REGRESSION coefficient confidence interval" "" 85 at_xfail=no ( $as_echo "655. $at_setup_line: testing $at_desc ..." $at_traceon cat >conf.sps <<'_ATEOF' set format = F22.3. data list notable list /math female socst read science * begin data. 41.00 .00 57.00 57.00 47.00 53.00 1.00 61.00 68.00 63.00 54.00 .00 31.00 44.00 58.00 47.00 .00 56.00 63.00 53.00 57.00 .00 61.00 47.00 53.00 51.00 .00 61.00 44.00 63.00 42.00 .00 61.00 50.00 53.00 45.00 .00 36.00 34.00 39.00 54.00 .00 51.00 63.00 58.00 52.00 .00 51.00 57.00 50.00 51.00 .00 61.00 60.00 53.00 51.00 .00 61.00 57.00 63.00 71.00 .00 71.00 73.00 61.00 57.00 .00 46.00 54.00 55.00 50.00 .00 56.00 45.00 31.00 43.00 .00 56.00 42.00 50.00 51.00 .00 56.00 47.00 50.00 60.00 .00 56.00 57.00 58.00 62.00 .00 61.00 68.00 55.00 57.00 .00 46.00 55.00 53.00 35.00 .00 41.00 63.00 66.00 75.00 .00 66.00 63.00 72.00 45.00 .00 56.00 50.00 55.00 57.00 .00 61.00 60.00 61.00 45.00 .00 46.00 37.00 39.00 46.00 .00 31.00 34.00 39.00 66.00 .00 66.00 65.00 61.00 57.00 .00 46.00 47.00 58.00 49.00 .00 46.00 44.00 39.00 49.00 .00 41.00 52.00 55.00 57.00 .00 51.00 42.00 47.00 64.00 .00 61.00 76.00 64.00 63.00 .00 71.00 65.00 66.00 57.00 .00 31.00 42.00 72.00 50.00 .00 61.00 52.00 61.00 58.00 .00 66.00 60.00 61.00 75.00 .00 66.00 68.00 66.00 68.00 .00 66.00 65.00 66.00 44.00 .00 36.00 47.00 36.00 40.00 .00 51.00 39.00 39.00 41.00 .00 51.00 47.00 42.00 62.00 .00 51.00 55.00 58.00 57.00 .00 51.00 52.00 55.00 43.00 .00 41.00 42.00 50.00 48.00 .00 66.00 65.00 63.00 63.00 .00 46.00 55.00 69.00 39.00 .00 47.00 50.00 49.00 70.00 .00 51.00 65.00 63.00 63.00 .00 46.00 47.00 53.00 59.00 .00 51.00 57.00 47.00 61.00 .00 56.00 53.00 57.00 38.00 .00 41.00 39.00 47.00 61.00 .00 46.00 44.00 50.00 49.00 .00 71.00 63.00 55.00 73.00 .00 66.00 73.00 69.00 44.00 .00 42.00 39.00 26.00 42.00 .00 32.00 37.00 33.00 39.00 .00 46.00 42.00 56.00 55.00 .00 41.00 63.00 58.00 52.00 .00 51.00 48.00 44.00 45.00 .00 61.00 50.00 58.00 61.00 .00 66.00 47.00 69.00 39.00 .00 46.00 44.00 34.00 41.00 .00 36.00 34.00 36.00 50.00 .00 61.00 50.00 36.00 40.00 .00 26.00 44.00 50.00 60.00 .00 66.00 60.00 55.00 47.00 .00 26.00 47.00 42.00 59.00 .00 44.00 63.00 65.00 49.00 .00 36.00 50.00 44.00 46.00 .00 51.00 44.00 39.00 58.00 .00 61.00 60.00 58.00 71.00 .00 66.00 73.00 63.00 58.00 .00 66.00 68.00 74.00 46.00 .00 51.00 55.00 58.00 43.00 .00 31.00 47.00 45.00 54.00 .00 61.00 55.00 49.00 56.00 .00 66.00 68.00 63.00 46.00 .00 46.00 31.00 39.00 54.00 .00 56.00 47.00 42.00 57.00 .00 56.00 63.00 55.00 54.00 .00 36.00 36.00 61.00 71.00 .00 56.00 68.00 66.00 48.00 .00 56.00 63.00 63.00 40.00 .00 41.00 55.00 44.00 64.00 .00 66.00 55.00 63.00 51.00 .00 56.00 52.00 53.00 39.00 .00 56.00 34.00 42.00 40.00 .00 31.00 50.00 34.00 61.00 .00 56.00 55.00 61.00 66.00 .00 46.00 52.00 47.00 49.00 .00 46.00 63.00 66.00 65.00 1.00 61.00 68.00 69.00 52.00 1.00 48.00 39.00 44.00 46.00 1.00 51.00 44.00 47.00 61.00 1.00 51.00 50.00 63.00 72.00 1.00 56.00 71.00 66.00 71.00 1.00 71.00 63.00 69.00 40.00 1.00 41.00 34.00 39.00 69.00 1.00 61.00 63.00 61.00 64.00 1.00 66.00 68.00 69.00 56.00 1.00 61.00 47.00 66.00 49.00 1.00 41.00 47.00 33.00 54.00 1.00 51.00 63.00 50.00 53.00 1.00 51.00 52.00 61.00 66.00 1.00 56.00 55.00 42.00 67.00 1.00 56.00 60.00 50.00 40.00 1.00 33.00 35.00 51.00 46.00 1.00 56.00 47.00 50.00 69.00 1.00 71.00 71.00 58.00 40.00 1.00 56.00 57.00 61.00 41.00 1.00 51.00 44.00 39.00 57.00 1.00 66.00 65.00 46.00 58.00 1.00 56.00 68.00 59.00 57.00 1.00 66.00 73.00 55.00 37.00 1.00 41.00 36.00 42.00 55.00 1.00 46.00 43.00 55.00 62.00 1.00 66.00 73.00 58.00 64.00 1.00 56.00 52.00 58.00 40.00 1.00 51.00 41.00 39.00 50.00 1.00 51.00 60.00 50.00 46.00 1.00 56.00 50.00 50.00 53.00 1.00 56.00 50.00 39.00 52.00 1.00 46.00 47.00 48.00 45.00 1.00 46.00 47.00 34.00 56.00 1.00 61.00 55.00 58.00 45.00 1.00 56.00 50.00 44.00 54.00 1.00 41.00 39.00 50.00 56.00 1.00 46.00 50.00 47.00 41.00 1.00 26.00 34.00 29.00 54.00 1.00 56.00 57.00 50.00 72.00 1.00 56.00 57.00 54.00 56.00 1.00 51.00 68.00 50.00 47.00 1.00 46.00 42.00 47.00 49.00 1.00 66.00 61.00 44.00 60.00 1.00 66.00 76.00 67.00 54.00 1.00 46.00 47.00 58.00 55.00 1.00 56.00 46.00 44.00 33.00 1.00 41.00 39.00 42.00 49.00 1.00 61.00 52.00 44.00 43.00 1.00 51.00 28.00 44.00 50.00 1.00 52.00 42.00 50.00 52.00 1.00 51.00 47.00 39.00 48.00 1.00 41.00 47.00 44.00 58.00 1.00 66.00 52.00 53.00 43.00 1.00 61.00 47.00 48.00 41.00 1.00 31.00 50.00 55.00 43.00 1.00 51.00 44.00 44.00 46.00 1.00 41.00 47.00 40.00 44.00 1.00 41.00 45.00 34.00 43.00 1.00 46.00 47.00 42.00 61.00 1.00 56.00 65.00 58.00 40.00 1.00 51.00 43.00 50.00 49.00 1.00 61.00 47.00 53.00 56.00 1.00 66.00 57.00 58.00 61.00 1.00 71.00 68.00 55.00 50.00 1.00 61.00 52.00 54.00 51.00 1.00 61.00 42.00 47.00 42.00 1.00 41.00 42.00 42.00 67.00 1.00 66.00 66.00 61.00 53.00 1.00 61.00 47.00 53.00 50.00 1.00 58.00 57.00 51.00 51.00 1.00 31.00 47.00 63.00 72.00 1.00 61.00 57.00 61.00 48.00 1.00 61.00 52.00 55.00 40.00 1.00 31.00 44.00 40.00 53.00 1.00 61.00 50.00 61.00 39.00 1.00 36.00 39.00 47.00 63.00 1.00 41.00 57.00 55.00 51.00 1.00 37.00 57.00 53.00 45.00 1.00 43.00 42.00 50.00 39.00 1.00 61.00 47.00 47.00 42.00 1.00 39.00 42.00 31.00 62.00 1.00 51.00 60.00 61.00 44.00 1.00 51.00 44.00 35.00 65.00 1.00 66.00 63.00 54.00 63.00 1.00 71.00 65.00 55.00 54.00 1.00 41.00 39.00 53.00 45.00 1.00 36.00 50.00 58.00 60.00 1.00 51.00 52.00 56.00 49.00 1.00 51.00 60.00 50.00 48.00 1.00 51.00 44.00 39.00 57.00 1.00 61.00 52.00 63.00 55.00 1.00 61.00 55.00 50.00 66.00 1.00 56.00 50.00 66.00 64.00 1.00 71.00 65.00 58.00 55.00 1.00 51.00 52.00 53.00 42.00 1.00 36.00 47.00 42.00 56.00 1.00 61.00 63.00 55.00 53.00 1.00 66.00 50.00 53.00 41.00 1.00 41.00 42.00 42.00 42.00 1.00 41.00 36.00 50.00 53.00 1.00 56.00 50.00 55.00 42.00 1.00 51.00 41.00 34.00 60.00 1.00 56.00 47.00 50.00 52.00 1.00 56.00 55.00 42.00 38.00 1.00 46.00 42.00 36.00 57.00 1.00 52.00 57.00 55.00 58.00 1.00 61.00 55.00 58.00 65.00 1.00 61.00 63.00 53.00 end data. regression /variables = math female socst read /statistics = coeff r anova ci (95) /dependent = science /method = enter _ATEOF { set +x $as_echo "$at_srcdir/regression.at:2126: pspp -O format=csv conf.sps" at_fn_check_prepare_trace "regression.at:2126" ( $at_check_trace; pspp -O format=csv conf.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Model Summary (science) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.699,.489,.479,7.148 Table: ANOVA (science) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,9543.721,4,2385.930,46.695,.000 ,Residual,9963.779,195,51.096,, ,Total,19507.500,199,,, Table: Coefficients (science) ,,Unstandardized Coefficients,,Standardized Coefficients,,,95% Confidence Interval for B, ,,B,Std. Error,Beta,t,Sig.,Lower Bound,Upper Bound ,(Constant),12.325,3.194,.000,3.859,.000,6.027,18.624 ,math,.389,.074,.368,5.252,.000,.243,.535 ,female,-2.010,1.023,-.101,-1.965,.051,-4.027,.007 ,socst,.050,.062,.054,.801,.424,-.073,.173 ,read,.335,.073,.347,4.607,.000,.192,.479 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:2126" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_655 #AT_START_656 at_fn_group_banner 656 'regression.at:2152' \ "LINEAR REGRESSION crash with long string variables" "" 85 at_xfail=no ( $as_echo "656. $at_setup_line: testing $at_desc ..." $at_traceon cat >regression.sps <<'_ATEOF' SET DECIMAL=DOT. DATA LIST notable LIST /text (A24) Y * X1 * BEGIN DATA. V00276601 0.00 90.00 V00292909 10.00 30.00 V00291204 20.00 20.00 V00300070 0.00 90.00 END DATA. REGRESSION /VARIABLES= Y /DEPENDENT= X1 /METHOD=ENTER /STATISTICS=COEFF R ANOVA /SAVE= RESID. LIST. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:2173: pspp -o pspp.csv regression.sps" at_fn_check_prepare_trace "regression.at:2173" ( $at_check_trace; pspp -o pspp.csv regression.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:2173" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/regression.at:2174: cat pspp.csv" at_fn_check_prepare_trace "regression.at:2174" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Model Summary (X1) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.95,.89,.84,15.08 Table: ANOVA (X1) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,3820.45,1,3820.45,16.81,.055 ,Residual,454.55,2,227.27,, ,Total,4275.00,3,,, Table: Coefficients (X1) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),85.45,10.16,.00,8.41,.004 ,Y,-3.73,.91,-.95,-4.10,.055 Table: Data List text,Y,X1,RES1 V00276601 ,.00,90.00,4.55 V00292909 ,10.00,30.00,-18.18 V00291204 ,20.00,20.00,9.09 V00300070 ,.00,90.00,4.55 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:2174" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_656 #AT_START_657 at_fn_group_banner 657 'regression.at:2202' \ "LINEAR REGRESSION -- Empty Parentheses" " " 85 at_xfail=no ( $as_echo "657. $at_setup_line: testing $at_desc ..." $at_traceon cat >empty-parens.sps <<'_ATEOF' set format = F22.3. data list notable list /math female socst read science * begin data. 58.00 1.00 61.00 55.00 58.00 65.00 1.00 61.00 63.00 53.00 end data. regression /variables = math female socst read /statistics = coeff r anova ci () /dependent = science /method = enter _ATEOF { set +x $as_echo "$at_srcdir/regression.at:2220: pspp -o pspp.csv empty-parens.sps" at_fn_check_prepare_trace "regression.at:2220" ( $at_check_trace; pspp -o pspp.csv empty-parens.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/regression.at:2220" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_657 #AT_START_658 at_fn_group_banner 658 'regression.at:2227' \ "LINEAR REGRESSION varibles on ENTER subcommand" " " 85 at_xfail=no ( $as_echo "658. $at_setup_line: testing $at_desc ..." $at_traceon cat >regression.sps <<'_ATEOF' SET FORMAT=F10.3. DATA LIST notable LIST /number * value *. BEGIN DATA 16 7.25 0 .00 1 .10 9 27.9 0 .00 7 3.65 14 16.8 24 9.15 0 .00 24 19.0 7 4.05 12 7.90 6 .75 11 1.40 0 .00 3 2.30 12 7.60 11 6.80 16 8.65 END DATA. REGRESSION /STATISTICS COEFF R ANOVA /DEPENDENT value /METHOD=ENTER number. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:2261: pspp -O format=csv regression.sps" at_fn_check_prepare_trace "regression.at:2261" ( $at_check_trace; pspp -O format=csv regression.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Model Summary (value) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.612,.374,.338,6.176 Table: ANOVA (value) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,388.065,1,388.065,10.173,.005 ,Residual,648.498,17,38.147,, ,Total,1036.563,18,,, Table: Coefficients (value) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),.927,2.247,.000,.413,.685 ,number,.611,.192,.612,3.189,.005 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:2261" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_658 #AT_START_659 at_fn_group_banner 659 'regression.at:2283' \ "LINEAR REGRESSION /ORIGIN" " " 85 at_xfail=no ( $as_echo "659. $at_setup_line: testing $at_desc ..." $at_traceon cat >regression-origin.sps <<'_ATEOF' SET FORMAT=F10.3. DATA LIST notable LIST /number * value *. BEGIN DATA 16 7.25 0 .00 1 .10 9 27.9 0 .00 7 3.65 14 16.8 24 9.15 0 .00 24 19.0 7 4.05 12 7.90 6 .75 11 1.40 0 .00 3 2.30 12 7.60 11 6.80 16 8.65 END DATA. REGRESSION /STATISTICS COEFF R ANOVA /DEPENDENT value /ORIGIN /METHOD=ENTER number. _ATEOF { set +x $as_echo "$at_srcdir/regression.at:2318: pspp -O format=csv regression-origin.sps" at_fn_check_prepare_trace "regression.at:2318" ( $at_check_trace; pspp -O format=csv regression-origin.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Model Summary (value) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.802,.643,.622,6.032 Table: ANOVA (value) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,1181.726,1,1181.726,32.475,.000 ,Residual,654.989,18,36.388,, ,Total,1836.715,19,,, Table: Coefficients (value) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,number,.672,.118,.802,5.699,.000 ,,,,,, " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/regression.at:2318" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_659 #AT_START_660 at_fn_group_banner 660 'reliability.at:19' \ "RELIABILITY" " " 86 at_xfail=no ( $as_echo "660. $at_setup_line: testing $at_desc ..." $at_traceon cat >reliability.sps <<'_ATEOF' data list notable list /var1 * var2 * var6 * var7 * var8 * var9 * var11 * var12 * var15 * var16 * var17 * var19 * . begin data. 6 7 7 5 7 7 7 7 7 7 6 6 6 7 7 6 7 6 7 5 6 5 7 7 6 6 7 6 5 3 6 4 5 6 4 5 4 6 5 6 6 5 4 3 5 6 5 6 5 6 5 5 6 5 4 4 6 6 5 5 6 6 7 6 6 5 6 5 6 6 5 6 5 6 6 5 6 5 5 4 6 5 5 5 5 7 7 7 7 7 6 5 7 7 7 7 6 6 6 5 5 7 6 5 6 6 5 6 . . . . . . . . . . . . 6 6 5 5 5 6 6 4 6 5 5 5 7 7 7 6 7 6 7 6 6 6 7 6 4 7 6 6 6 5 5 4 4 5 5 6 5 6 3 5 4 1 4 6 2 3 3 2 3 6 6 5 6 2 4 2 2 4 4 5 6 6 7 5 6 5 7 6 5 6 6 5 6 5 6 6 5 6 6 6 6 4 5 5 5 7 7 . 6 6 6 5 6 6 6 6 5 7 5 5 4 6 7 6 5 4 6 5 7 7 7 6 7 7 7 6 7 7 7 6 3 6 5 6 5 7 7 3 4 7 5 7 6 7 7 6 5 6 5 5 6 6 6 6 5 5 6 5 5 5 5 4 5 5 5 6 6 6 7 4 5 6 6 6 6 5 5 6 6 5 6 6 4 4 5 4 5 6 4 5 5 6 7 6 6 7 7 5 6 6 6 5 5 6 5 7 4 6 6 5 7 7 5 6 . . . . . . . . . . . . 7 6 6 5 6 6 7 6 6 5 5 6 6 6 7 7 7 7 7 6 7 6 6 7 7 5 5 . 5 . 7 3 5 4 5 3 7 6 7 5 4 5 7 5 7 5 5 6 6 5 6 6 6 5 5 5 5 6 5 6 7 7 7 7 7 7 7 7 5 6 7 7 . . . . . . . . . . . . 5 5 6 7 5 6 6 4 6 6 6 5 6 6 5 7 5 6 7 5 6 5 4 6 7 6 7 6 7 5 6 7 7 6 6 6 5 6 5 6 5 6 7 2 5 7 3 7 6 6 5 6 5 6 6 6 6 6 5 6 7 6 7 6 6 6 6 6 6 7 6 7 7 7 6 5 6 6 7 7 7 4 6 5 3 7 7 6 6 7 7 7 6 6 6 4 3 5 3 4 3 3 3 3 3 3 3 5 5 7 7 7 5 7 6 2 6 7 6 7 7 7 7 7 7 7 7 6 7 7 7 6 6 5 7 4 4 4 5 6 5 5 4 5 4 7 7 4 4 3 6 3 5 3 4 5 7 7 7 7 7 7 7 7 7 7 7 5 3 6 5 5 4 5 4 4 5 5 3 5 6 7 6 6 6 7 7 6 6 6 7 6 2 5 4 6 3 2 2 2 2 7 2 2 4 6 6 5 5 5 6 5 5 6 6 5 5 7 4 5 6 6 6 5 6 6 5 6 5 7 7 5 6 5 6 5 5 4 5 4 4 5 6 5 6 4 5 5 5 4 5 5 7 6 6 5 5 6 7 5 6 5 7 6 5 6 6 5 4 5 5 3 4 5 5 5 5 7 6 4 4 5 6 5 6 4 4 6 6 6 6 6 5 7 7 6 5 5 6 6 6 6 7 6 7 6 6 5 6 7 6 5 7 6 7 6 7 6 7 7 5 5 6 6 5 6 6 5 5 5 6 5 6 7 7 5 5 6 6 5 6 5 6 6 6 6 6 6 5 5 5 5 6 4 5 3 4 7 6 5 5 7 7 6 6 6 6 5 6 7 6 7 6 6 7 7 7 5 6 5 5 5 5 4 2 7 5 4 6 5 5 2 5 6 4 6 6 7 7 5 6 6 7 6 6 7 5 7 5 6 7 6 6 3 5 7 6 6 5 6 6 6 6 3 5 5 5 6 6 6 4 5 4 7 7 4 7 4 5 5 5 7 4 4 . . . . . . . . . . . . 6 6 7 6 7 6 7 7 6 7 7 6 . . . . . . . . . . . . 5 6 5 7 6 5 6 6 5 6 4 6 5 5 5 5 4 5 5 5 7 5 5 5 6 6 6 4 5 4 6 6 6 4 5 4 6 5 7 4 6 4 6 5 6 6 6 3 5 7 6 5 5 5 5 5 6 7 6 6 5 5 7 7 5 5 6 6 5 5 5 7 5 6 7 6 7 5 6 4 6 7 6 7 4 5 5 5 6 5 6 5 6 6 5 6 6 5 5 5 6 3 4 5 5 4 5 3 6 6 6 5 5 5 4 3 4 5 5 5 6 7 7 6 2 3 6 6 6 5 7 7 6 7 5 5 6 6 6 5 6 6 6 6 6 7 7 6 7 7 7 5 5 6 6 6 6 6 6 6 7 6 6 7 6 6 6 6 5 6 6 6 3 5 6 6 5 5 4 6 4 6 5 6 6 5 6 5 6 6 5 5 6 4 6 5 4 6 7 4 5 6 5 5 6 7 6 4 6 5 7 6 7 7 6 5 6 7 7 6 7 6 7 7 7 6 6 6 6 6 6 4 5 6 7 7 5 6 4 4 3 3 5 3 3 1 5 6 3 2 3 3 7 7 5 6 6 7 7 6 7 7 7 7 5 6 6 6 7 5 4 5 4 7 6 7 3 6 5 4 3 3 3 5 5 6 3 4 5 7 6 4 6 5 5 6 6 7 5 6 5 7 6 6 6 6 6 5 6 7 7 6 7 7 5 6 7 7 7 7 6 5 7 7 6 7 6 6 5 6 7 7 6 5 6 6 6 7 7 7 7 6 6 7 6 7 7 7 4 6 4 7 3 6 5 5 4 3 5 6 5 5 7 5 4 6 7 5 4 6 6 5 5 5 6 4 6 5 7 6 5 5 5 6 . . . . . . . . . . . . . . . . . . . . . . . . 5 7 7 5 6 6 7 7 6 6 6 7 6 7 7 1 2 1 7 7 5 5 5 2 . . . . . . . . . . . . 3 7 4 6 4 7 4 6 4 7 4 7 5 7 3 5 5 6 7 5 4 7 7 4 4 7 7 5 4 6 7 7 6 5 4 4 6 6 2 2 6 4 6 5 5 1 5 2 5 5 6 4 5 4 6 5 5 6 5 5 . . . . . . . . . . . . 5 7 6 6 6 6 6 6 5 6 6 6 6 6 6 5 6 6 6 6 7 5 6 7 3 6 3 3 5 3 3 5 3 5 7 4 4 4 6 3 3 3 4 3 4 2 3 6 5 7 7 6 5 4 7 5 7 7 3 7 4 5 4 4 4 4 3 3 3 4 3 3 6 7 7 5 6 6 7 5 4 5 5 5 3 5 3 3 1 3 4 3 4 7 6 7 4 5 4 4 4 3 4 5 6 6 4 5 5 6 3 4 5 3 5 3 4 5 6 4 5 5 5 6 6 6 6 4 5 6 6 5 6 7 7 2 2 6 7 7 7 7 5 7 5 7 7 4 6 5 7 5 5 5 6 6 6 6 7 7 5 5 5 7 6 7 7 7 6 5 7 3 6 5 6 5 5 6 5 4 5 7 6 5 6 6 6 5 6 5 5 6 4 5 5 5 6 3 5 3 3 6 5 5 . . . . . . . . . . . . 5 6 6 4 4 4 5 3 5 5 2 6 5 6 7 5 5 6 6 5 5 6 6 6 6 7 7 6 4 7 7 6 7 5 6 7 6 6 5 4 5 2 7 6 6 5 6 6 2 2 2 2 2 2 3 2 3 1 1 2 end data. RELIABILITY /VARIABLES=var2 var8 var15 var17 var6 /SCALE('Everything') var6 var8 var15 var17 /MODEL=ALPHA. RELIABILITY /VARIABLES=var6 var8 var15 var17 /SCALE('Nothing') ALL /MODEL=SPLIT(2) . RELIABILITY /VARIABLES=var2 var6 var8 var15 var17 var19 /SCALE('Totals') var6 var8 var15 var17 /SUMMARY = total /STATISTICS = DESCRIPTIVES COVARIANCES . RELIABILITY /VARIABLES=var6 var8 var15 var17 . _ATEOF { set +x $as_echo "$at_srcdir/reliability.at:202: pspp -o pspp.csv reliability.sps" at_fn_check_prepare_trace "reliability.at:202" ( $at_check_trace; pspp -o pspp.csv reliability.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "reliability.sps:174: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented. No statistics will be produced. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/reliability.at:202" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/reliability.at:205: cat pspp.csv" at_fn_check_prepare_trace "reliability.at:205" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Scale: Everything Table: Case Processing Summary ,,N,% Cases,Valid,131,92.91 ,Excluded,10,7.09 ,Total,141,100.00 Table: Reliability Statistics Cronbach's Alpha,N of Items .75,4 Scale: Nothing Table: Case Processing Summary ,,N,% Cases,Valid,131,92.91 ,Excluded,10,7.09 ,Total,141,100.00 Table: Reliability Statistics Cronbach's Alpha,Part 1,Value,.55 ,,N of Items,2 ,Part 2,Value,.63 ,,N of Items,2 ,Total N of Items,,4 Correlation Between Forms,,,.61 Spearman-Brown Coefficient,Equal Length,,.75 ,Unequal Length,,.75 Guttman Split-Half Coefficient,,,.75 reliability.sps:174: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented. No statistics will be produced. Scale: Totals Table: Case Processing Summary ,,N,% Cases,Valid,131,92.91 ,Excluded,10,7.09 ,Total,141,100.00 Table: Reliability Statistics Cronbach's Alpha,N of Items .75,4 Table: Item-Total Statistics ,Scale Mean if Item Deleted,Scale Variance if Item Deleted,Corrected Item-Total Correlation,Cronbach's Alpha if Item Deleted var6,15.97,8.43,.51,.71 var8,16.56,7.86,.53,.70 var15,16.47,8.45,.56,.68 var17,16.60,8.00,.57,.67 Scale: ANY Table: Case Processing Summary ,,N,% Cases,Valid,131,92.91 ,Excluded,10,7.09 ,Total,141,100.00 Table: Reliability Statistics Cronbach's Alpha,N of Items .75,4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/reliability.at:205" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_660 #AT_START_661 at_fn_group_banner 661 'reliability.at:274' \ "RELIABILITY bad syntax" " " 86 at_xfail=no ( $as_echo "661. $at_setup_line: testing $at_desc ..." $at_traceon cat >bad-syntax.sps <<'_ATEOF' data list notable list /x * y *. begin data. 1 10 2 20 3 30 4 50 5 50 end data. * This syntax is incorrect reliability x y. _ATEOF { set +x $as_echo "$at_srcdir/reliability.at:289: pspp -O format=csv bad-syntax.sps" at_fn_check_prepare_trace "reliability.at:289" ( $at_check_trace; pspp -O format=csv bad-syntax.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/reliability.at:289" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_661 #AT_START_662 at_fn_group_banner 662 'reliability.at:294' \ "RELIABILITY bad syntax 2" " " 86 at_xfail=no ( $as_echo "662. $at_setup_line: testing $at_desc ..." $at_traceon cat >bad-syntax.sps <<'_ATEOF' new file. data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *. begin data. end data. * This syntax is incorrect reliability variables=f01 to f10/asdfj. _ATEOF { set +x $as_echo "$at_srcdir/reliability.at:304: pspp -O format=csv bad-syntax.sps" at_fn_check_prepare_trace "reliability.at:304" ( $at_check_trace; pspp -O format=csv bad-syntax.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/reliability.at:304" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_662 #AT_START_663 at_fn_group_banner 663 'reliability.at:309' \ "RELIABILITY crash with no data" " " 86 at_xfail=no ( $as_echo "663. $at_setup_line: testing $at_desc ..." $at_traceon cat >reliability.sps <<'_ATEOF' new file. data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *. begin data. end data. reliability variables=f01 to f10. _ATEOF { set +x $as_echo "$at_srcdir/reliability.at:318: pspp -O format=csv reliability.sps" at_fn_check_prepare_trace "reliability.at:318" ( $at_check_trace; pspp -O format=csv reliability.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/reliability.at:318" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_663 #AT_START_664 at_fn_group_banner 664 'reliability.at:327' \ "RELIABILITY tutorial example" " " 86 at_xfail=no ( $as_echo "664. $at_setup_line: testing $at_desc ..." $at_traceon cat >tut-example.sps <<'_ATEOF' get file='hotel.sav'. compute v3 = 6 - v3. compute v5 = 6 - v5. reliability variables = v1 v3 v4. _ATEOF { set +x $as_echo "$at_srcdir/reliability.at:337: ln -s \$top_srcdir/examples/hotel.sav ." at_fn_check_prepare_dynamic "ln -s $top_srcdir/examples/hotel.sav ." "reliability.at:337" ( $at_check_trace; ln -s $top_srcdir/examples/hotel.sav . ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/reliability.at:337" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/reliability.at:338: pspp -O format=csv tut-example.sps" at_fn_check_prepare_trace "reliability.at:338" ( $at_check_trace; pspp -O format=csv tut-example.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Scale: ANY Table: Case Processing Summary ,,N,% Cases,Valid,17,100.00 ,Excluded,0,.00 ,Total,17,100.00 Table: Reliability Statistics Cronbach's Alpha,N of Items .81,3 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/reliability.at:338" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_664 #AT_START_665 at_fn_group_banner 665 'roc.at:19' \ "ROC, free distribution" " " 87 at_xfail=no ( $as_echo "665. $at_setup_line: testing $at_desc ..." $at_traceon cat >roc.sps <<'_ATEOF' set format F10.3. data list notable list /x * y * w * a *. begin data. 1 1 2 1 1 2 28 0 2 3 4 1 2 4 14 0 3 5 10 1 . . 1 0 3 1 5 0 4 2 14 1 4 3 2 0 5 4 20 1 5 4 20 . 5 5 1 0 end data. weight by w. roc x by a (1) /plot = none /print = se coordinates /criteria = testpos(large) distribution(free) ci(99) /missing = exclude . _ATEOF { set +x $as_echo "$at_srcdir/roc.at:46: pspp -o pspp.csv roc.sps" at_fn_check_prepare_trace "roc.at:46" ( $at_check_trace; pspp -o pspp.csv roc.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/roc.at:46" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/roc.at:47: cat pspp.csv" at_fn_check_prepare_trace "roc.at:47" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Summary ,Valid N (listwise), a,Unweighted,Weighted Positive,5,50.000 Negative,5,50.000 Table: Area Under the Curve (x) ,,,Asymp. 99% Confidence Interval, Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound .910,.030,.000,.839,.981 Table: Coordinates of the Curve (x) Positive if greater than or equal to,Sensitivity,1 - Specificity .000,1.000,1.000 1.500,.960,.440 2.500,.880,.160 3.500,.680,.060 4.500,.400,.020 6.000,.000,.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/roc.at:47" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_665 #AT_START_666 at_fn_group_banner 666 'roc.at:70' \ "ROC, negative exponential distribution" " " 87 at_xfail=no ( $as_echo "666. $at_setup_line: testing $at_desc ..." $at_traceon cat >roc.sps <<'_ATEOF' set format F10.3. data list notable list /x * y * w * a *. begin data. 1 1 2 1 1 2 28 0 2 3 4 1 2 4 14 0 3 5 10 1 . . 1 0 3 1 5 0 4 2 14 1 4 3 2 0 5 4 20 1 5 4 20 . 5 5 1 0 end data. weight by w. roc x y by a (1) /plot = curve(reference) /print = se coordinates /criteria = testpos(large) distribution(negexpo) ci(95) /missing = exclude . _ATEOF { set +x $as_echo "$at_srcdir/roc.at:97: pspp -o pspp.csv roc.sps" at_fn_check_prepare_trace "roc.at:97" ( $at_check_trace; pspp -o pspp.csv roc.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/roc.at:97" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/roc.at:98: cat pspp.csv" at_fn_check_prepare_trace "roc.at:98" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Summary ,Valid N (listwise), a,Unweighted,Weighted Positive,5,50.000 Negative,5,50.000 Table: Area Under the Curve ,,,,Asymp. 95% Confidence Interval, Variable under test,Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound x,.910,.030,.000,.860,.960 y,.697,.052,.001,.611,.783 Table: Coordinates of the Curve Test variable,Positive if greater than or equal to,Sensitivity,1 - Specificity x,.000,1.000,1.000 ,1.500,.960,.440 ,2.500,.880,.160 ,3.500,.680,.060 ,4.500,.400,.020 ,6.000,.000,.000 y,.000,1.000,1.000 ,1.500,.960,.900 ,2.500,.680,.340 ,3.000,.600,.340 ,3.500,.600,.300 ,4.500,.200,.020 ,6.000,.000,.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/roc.at:98" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_666 #AT_START_667 at_fn_group_banner 667 'roc.at:129' \ "ROC, with anomaly" " " 87 at_xfail=no ( $as_echo "667. $at_setup_line: testing $at_desc ..." $at_traceon cat >roc.sps <<'_ATEOF' set format F10.3. data list notable list /x * a * comment (a20). begin data. 0 1 "" 0 0 "" 1 1 "" 1 0 "" 2 1 "" 2 0 "" 5 1 "" 5 0 "" 10 1 "" 10 0 "" 15 1 "" 15 0 "" 20 1 "" 20 1 "" 22 0 "here and" 22 0 "here is the anomaly" 25 1 "" 25 0 "" 30 1 "" 30 0 "" 35 1 "" 35 0 "" 38 1 "" 38 0 "" 39 1 "" 39 0 "" 40 1 "" 40 0 "" end data. roc x by a (1) /plot = none print = se . _ATEOF { set +x $as_echo "$at_srcdir/roc.at:169: pspp -o pspp.csv roc.sps" at_fn_check_prepare_trace "roc.at:169" ( $at_check_trace; pspp -o pspp.csv roc.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/roc.at:169" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/roc.at:170: cat pspp.csv" at_fn_check_prepare_trace "roc.at:170" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Case Summary ,Valid N (listwise), a,Unweighted,Weighted Positive,14,14.000 Negative,14,14.000 Table: Area Under the Curve (x) ,,,Asymp. 95% Confidence Interval, Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound .490,.111,.927,.307,.673 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/roc.at:170" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_667 #AT_START_668 at_fn_group_banner 668 'roc.at:187' \ "ROC crash on no state variable" " " 87 at_xfail=no ( $as_echo "668. $at_setup_line: testing $at_desc ..." $at_traceon cat >roc.sps <<'_ATEOF' data list notable list /x * y * w * a *. begin data. 5 5 1 0 end data. roc x y By(a (1) . _ATEOF { set +x $as_echo "$at_srcdir/roc.at:199: pspp -o pspp.csv roc.sps" at_fn_check_prepare_trace "roc.at:199" ( $at_check_trace; pspp -o pspp.csv roc.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/roc.at:199" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_668 #AT_START_669 at_fn_group_banner 669 'roc.at:204' \ "ROC crash on invalid syntax" " " 87 at_xfail=no ( $as_echo "669. $at_setup_line: testing $at_desc ..." $at_traceon cat >roc.sps <<'_ATEOF' data list notable list /x * y * a *. bggin data. 1 1 2 1 2 28 end data. roc x y by a (1) /criteria = ci(y5) _ATEOF { set +x $as_echo "$at_srcdir/roc.at:217: pspp -O format=csv roc.sps" at_fn_check_prepare_trace "roc.at:217" ( $at_check_trace; pspp -O format=csv roc.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/roc.at:217" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_669 #AT_START_670 at_fn_group_banner 670 'sort-cases.at:73' \ "sort 500 cases (100 unique) with 2 buffers" " " 88 at_xfail=no ( $as_echo "670. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:73: sort_cases_gen_data 100 5 2" at_fn_check_prepare_trace "sort-cases.at:73" ( $at_check_trace; sort_cases_gen_data 100 5 2 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:73" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=2. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:73: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:73" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:73" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:73: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:73" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:73" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_670 #AT_START_671 at_fn_group_banner 671 'sort-cases.at:74' \ "sort 500 cases (100 unique) with 3 buffers" " " 88 at_xfail=no ( $as_echo "671. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:74: sort_cases_gen_data 100 5 3" at_fn_check_prepare_trace "sort-cases.at:74" ( $at_check_trace; sort_cases_gen_data 100 5 3 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:74" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=3. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:74: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:74" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:74" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:74: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:74" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:74" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_671 #AT_START_672 at_fn_group_banner 672 'sort-cases.at:75' \ "sort 500 cases (100 unique) with 4 buffers" " " 88 at_xfail=no ( $as_echo "672. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:75: sort_cases_gen_data 100 5 4" at_fn_check_prepare_trace "sort-cases.at:75" ( $at_check_trace; sort_cases_gen_data 100 5 4 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:75" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=4. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:75: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:75" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:75" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:75: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:75" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:75" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_672 #AT_START_673 at_fn_group_banner 673 'sort-cases.at:76' \ "sort 500 cases (100 unique) with 5 buffers" " " 88 at_xfail=no ( $as_echo "673. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:76: sort_cases_gen_data 100 5 5" at_fn_check_prepare_trace "sort-cases.at:76" ( $at_check_trace; sort_cases_gen_data 100 5 5 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:76" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=5. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:76: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:76" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:76" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:76: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:76" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:76" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_673 #AT_START_674 at_fn_group_banner 674 'sort-cases.at:77' \ "sort 500 cases (100 unique) with 10 buffers" " " 88 at_xfail=no ( $as_echo "674. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:77: sort_cases_gen_data 100 5 10" at_fn_check_prepare_trace "sort-cases.at:77" ( $at_check_trace; sort_cases_gen_data 100 5 10 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:77" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=10. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:77: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:77" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:77" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:77: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:77" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:77" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_674 #AT_START_675 at_fn_group_banner 675 'sort-cases.at:78' \ "sort 500 cases (100 unique) with 50 buffers" " " 88 at_xfail=no ( $as_echo "675. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:78: sort_cases_gen_data 100 5 50" at_fn_check_prepare_trace "sort-cases.at:78" ( $at_check_trace; sort_cases_gen_data 100 5 50 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:78" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=50. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:78: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:78" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:78" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:78: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:78" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:78" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_675 #AT_START_676 at_fn_group_banner 676 'sort-cases.at:79' \ "sort 500 cases (100 unique) with 100 buffers" " " 88 at_xfail=no ( $as_echo "676. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:79: sort_cases_gen_data 100 5 100" at_fn_check_prepare_trace "sort-cases.at:79" ( $at_check_trace; sort_cases_gen_data 100 5 100 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:79" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=100. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:79: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:79" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:79" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:79: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:79" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:79" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_676 #AT_START_677 at_fn_group_banner 677 'sort-cases.at:80' \ "sort 500 cases (100 unique)" " " 88 at_xfail=no ( $as_echo "677. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:80: sort_cases_gen_data 100 5 " at_fn_check_prepare_trace "sort-cases.at:80" ( $at_check_trace; sort_cases_gen_data 100 5 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:80" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:80: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:80" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:80" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:80: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:80" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:80" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_677 #AT_START_678 at_fn_group_banner 678 'sort-cases.at:82' \ "sort 1000 cases (100 unique) with 2 buffers" " " 88 at_xfail=no ( $as_echo "678. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:82: sort_cases_gen_data 100 10 2" at_fn_check_prepare_trace "sort-cases.at:82" ( $at_check_trace; sort_cases_gen_data 100 10 2 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:82" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=2. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:82: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:82" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:82" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:82: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:82" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:82" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_678 #AT_START_679 at_fn_group_banner 679 'sort-cases.at:83' \ "sort 1000 cases (100 unique) with 3 buffers" " " 88 at_xfail=no ( $as_echo "679. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:83: sort_cases_gen_data 100 10 3" at_fn_check_prepare_trace "sort-cases.at:83" ( $at_check_trace; sort_cases_gen_data 100 10 3 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:83" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=3. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:83: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:83" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:83" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:83: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:83" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:83" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_679 #AT_START_680 at_fn_group_banner 680 'sort-cases.at:84' \ "sort 1000 cases (100 unique) with 5 buffers" " " 88 at_xfail=no ( $as_echo "680. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:84: sort_cases_gen_data 100 10 5" at_fn_check_prepare_trace "sort-cases.at:84" ( $at_check_trace; sort_cases_gen_data 100 10 5 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:84" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=5. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:84: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:84" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:84" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:84: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:84" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:84" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_680 #AT_START_681 at_fn_group_banner 681 'sort-cases.at:85' \ "sort 1000 cases (100 unique)" " " 88 at_xfail=no ( $as_echo "681. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:85: sort_cases_gen_data 100 10 " at_fn_check_prepare_trace "sort-cases.at:85" ( $at_check_trace; sort_cases_gen_data 100 10 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:85" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:85: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:85" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:85" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:85: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:85" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:85" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_681 #AT_START_682 at_fn_group_banner 682 'sort-cases.at:87' \ "sort 5000 cases (1000 unique) with 5 buffers" " " 88 at_xfail=no ( $as_echo "682. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:87: sort_cases_gen_data 1000 5 5" at_fn_check_prepare_trace "sort-cases.at:87" ( $at_check_trace; sort_cases_gen_data 1000 5 5 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:87" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=5. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:87: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:87" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:87" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:87: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:87" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:87" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_682 #AT_START_683 at_fn_group_banner 683 'sort-cases.at:88' \ "sort 5000 cases (1000 unique) with 50 buffers" " " 88 at_xfail=no ( $as_echo "683. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:88: sort_cases_gen_data 1000 5 50" at_fn_check_prepare_trace "sort-cases.at:88" ( $at_check_trace; sort_cases_gen_data 1000 5 50 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:88" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=50. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:88: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:88" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:88" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:88: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:88" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:88" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_683 #AT_START_684 at_fn_group_banner 684 'sort-cases.at:89' \ "sort 5000 cases (1000 unique)" " " 88 at_xfail=no ( $as_echo "684. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:89: sort_cases_gen_data 1000 5 " at_fn_check_prepare_trace "sort-cases.at:89" ( $at_check_trace; sort_cases_gen_data 1000 5 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:89" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:89: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:89" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:89" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:89: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:89" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:89" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_684 #AT_START_685 at_fn_group_banner 685 'sort-cases.at:91' \ "sort 10000 cases (100 unique) with 3 buffers" " " 88 at_xfail=no ( $as_echo "685. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:91: sort_cases_gen_data 100 100 3" at_fn_check_prepare_trace "sort-cases.at:91" ( $at_check_trace; sort_cases_gen_data 100 100 3 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:91" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=3. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:91: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:91" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:91" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:91: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:91" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:91" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_685 #AT_START_686 at_fn_group_banner 686 'sort-cases.at:92' \ "sort 10000 cases (100 unique) with 5 buffers" " " 88 at_xfail=no ( $as_echo "686. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:92: sort_cases_gen_data 100 100 5" at_fn_check_prepare_trace "sort-cases.at:92" ( $at_check_trace; sort_cases_gen_data 100 100 5 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:92" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=5. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:92: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:92" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:92" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:92: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:92" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:92" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_686 #AT_START_687 at_fn_group_banner 687 'sort-cases.at:93' \ "sort 10000 cases (100 unique)" " " 88 at_xfail=no ( $as_echo "687. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:93: sort_cases_gen_data 100 100 " at_fn_check_prepare_trace "sort-cases.at:93" ( $at_check_trace; sort_cases_gen_data 100 100 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:93" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:93: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:93" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:93" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:93: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:93" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:93" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_687 #AT_START_688 at_fn_group_banner 688 'sort-cases.at:95' \ "sort 50000 cases (10000 unique) with 500 buffers" "" 88 at_xfail=no ( $as_echo "688. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:95: sort_cases_gen_data 10000 5 500" at_fn_check_prepare_trace "sort-cases.at:95" ( $at_check_trace; sort_cases_gen_data 10000 5 500 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:95" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x/BUFFERS=500. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:95: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:95" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:95" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:95: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:95" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:95" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_688 #AT_START_689 at_fn_group_banner 689 'sort-cases.at:97' \ "sort 50000 cases" " " 88 at_xfail=no ( $as_echo "689. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sort-cases.at:97: sort_cases_gen_data 50000 1 " at_fn_check_prepare_trace "sort-cases.at:97" ( $at_check_trace; sort_cases_gen_data 50000 1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:97" $at_failed && at_fn_log_failure $at_traceon; } cat >sort-cases.sps <<'_ATEOF' DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x. PRINT OUTFILE='output.txt'/x y. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:97: pspp --testing-mode -o pspp.csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:97" ( $at_check_trace; pspp --testing-mode -o pspp.csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:97" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } { set +x $as_echo "$at_srcdir/sort-cases.at:97: cat output.txt" at_fn_check_prepare_trace "sort-cases.at:97" ( $at_check_trace; cat output.txt ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:97" $at_failed && at_fn_log_failure \ "data.txt" \ "output.txt" \ "sort-cases.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_689 #AT_START_690 at_fn_group_banner 690 'sort-cases.at:100' \ "SORT CASES preserves filtered cases" " " 88 at_xfail=no ( $as_echo "690. $at_setup_line: testing $at_desc ..." $at_traceon cat >sort-cases.sps <<'_ATEOF' DATA LIST FREE /x. BEGIN DATA. 5 4 3 2 1 0 END DATA. COMPUTE mod2 = MOD(x, 2). LIST. FILTER BY mod2. LIST. SORT CASES BY x. LIST. FILTER OFF. LIST. _ATEOF { set +x $as_echo "$at_srcdir/sort-cases.at:115: pspp -O format=csv sort-cases.sps" at_fn_check_prepare_trace "sort-cases.at:115" ( $at_check_trace; pspp -O format=csv sort-cases.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,mod2 5.00,1.00 4.00,.00 3.00,1.00 2.00,.00 1.00,1.00 .00,.00 Table: Data List x,mod2 5.00,1.00 3.00,1.00 1.00,1.00 Table: Data List x,mod2 1.00,1.00 3.00,1.00 5.00,1.00 Table: Data List x,mod2 .00,.00 1.00,1.00 2.00,.00 3.00,1.00 4.00,.00 5.00,1.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sort-cases.at:115" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_690 #AT_START_691 at_fn_group_banner 691 't-test.at:19' \ "T-TEST /PAIRS" " " 89 at_xfail=no ( $as_echo "691. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test.sps <<'_ATEOF' data list list /ID * A * B *. begin data. 1 2.0 3.0 2 1.0 2.0 3 2.0 4.5 4 2.0 4.5 5 3.0 6.0 end data. t-test /PAIRS a with b (PAIRED). _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:33: pspp -O format=csv t-test.sps" at_fn_check_prepare_trace "t-test.at:33" ( $at_check_trace; pspp -O format=csv t-test.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format ID,F8.0 A,F8.0 B,F8.0 Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,A,2.00,5,.71,.32 ,B,4.00,5,1.54,.69 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,A & B,5,.92,.028 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.009 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:33" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_691 #AT_START_692 at_fn_group_banner 692 't-test.at:59' \ "T-TEST /PAIRS with per-analysis missing values" " " 89 at_xfail=no ( $as_echo "692. $at_setup_line: testing $at_desc ..." $at_traceon cat >ref.sps <<'_ATEOF' data list list /id * a * b * c * d *. begin data. 1 2.0 3.0 4.0 4.0 2 1.0 2.0 5.1 3.9 3 2.0 4.5 5.2 3.8 4 2.0 4.5 5.3 3.7 56 3.0 6.0 5.9 3.6 end data. t-test /PAIRS a c with b d (PAIRED). _ATEOF cat >expout <<'_ATEOF' Table: Reading free-form data from INLINE. Variable,Format id,F8.0 a,F8.0 b,F8.0 c,F8.0 d,F8.0 Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,a,2.00,5,.71,.32 ,b,4.00,5,1.54,.69 Pair 2,c,5.10,5,.69,.31 ,d,3.80,5,.16,.07 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,a & b,5,.92,.028 Pair 2,c & d,5,-.92,.028 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,a - b,-2.00,.94,.42,-3.16,-.84,-4.78,4,.009 Pair 2,c - d,1.30,.84,.37,.26,2.34,3.47,4,.025 _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:103: pspp -o ref.csv ref.sps" at_fn_check_prepare_trace "t-test.at:103" ( $at_check_trace; pspp -o ref.csv ref.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:103" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:104: cat ref.csv" at_fn_check_prepare_trace "t-test.at:104" ( $at_check_trace; cat ref.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:104" $at_failed && at_fn_log_failure $at_traceon; } cat >missing.sps <<'_ATEOF' data list list /id * a * b * c * d *. begin data. 1 2.0 3.0 4.0 4.0 2 1.0 2.0 5.1 3.9 3 2.0 4.5 5.2 3.8 4 2.0 4.5 5.3 3.7 5 3.0 6.0 5.9 . 6 3.0 . 5.9 3.6 end data. t-test /MISSING=analysis /PAIRS a c with b d (PAIRED) /CRITERIA=CI(0.95). _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:120: pspp -o missing.csv missing.sps" at_fn_check_prepare_trace "t-test.at:120" ( $at_check_trace; pspp -o missing.csv missing.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:120" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:121: cat missing.csv" at_fn_check_prepare_trace "t-test.at:121" ( $at_check_trace; cat missing.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:121" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_692 #AT_START_693 at_fn_group_banner 693 't-test.at:124' \ "T-TEST /PAIRS with listwise missing values" " " 89 at_xfail=no ( $as_echo "693. $at_setup_line: testing $at_desc ..." $at_traceon cat >ref.sps <<'_ATEOF' data list list /id * a * b * c * d *. begin data. 1 2.0 3.0 4.0 4.0 2 1.0 2.0 5.1 3.9 3 2.0 4.5 5.2 3.8 4 2.0 4.5 5.3 3.7 5 3.0 6.0 5.9 3.6 end data. t-test /PAIRS a b with c d (PAIRED). _ATEOF cat >expout <<'_ATEOF' Table: Reading free-form data from INLINE. Variable,Format id,F8.0 a,F8.0 b,F8.0 c,F8.0 d,F8.0 Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,a,2.00,5,.71,.32 ,c,5.10,5,.69,.31 Pair 2,b,4.00,5,1.54,.69 ,d,3.80,5,.16,.07 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,a & c,5,.41,.493 Pair 2,b & d,5,-.87,.054 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,a - c,-3.10,.76,.34,-4.04,-2.16,-9.14,4,.001 Pair 2,b - d,.20,1.68,.75,-1.89,2.29,.27,4,.803 _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:167: pspp -o ref.csv ref.sps" at_fn_check_prepare_trace "t-test.at:167" ( $at_check_trace; pspp -o ref.csv ref.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:167" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:169: cat ref.csv" at_fn_check_prepare_trace "t-test.at:169" ( $at_check_trace; cat ref.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:169" $at_failed && at_fn_log_failure $at_traceon; } cat >missing.sps <<'_ATEOF' data list list /id * a * b * c * d *. begin data. 1 2.0 3.0 4.0 4.0 2 1.0 2.0 5.1 3.9 3 2.0 4.5 5.2 3.8 4 2.0 4.5 5.3 3.7 5 3.0 6.0 5.9 3.6 6 3.0 6.0 5.9 . end data. t-test /MISSING=listwise /PAIRS a b with c d (PAIRED). _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:185: pspp -o missing.csv missing.sps" at_fn_check_prepare_trace "t-test.at:185" ( $at_check_trace; pspp -o missing.csv missing.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:185" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:186: cat missing.csv" at_fn_check_prepare_trace "t-test.at:186" ( $at_check_trace; cat missing.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:186" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_693 #AT_START_694 at_fn_group_banner 694 't-test.at:192' \ "T-TEST weighted paired bug" " " 89 at_xfail=no ( $as_echo "694. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test.sps <<'_ATEOF' DATA LIST notable LIST /x y w *. BEGIN DATA. 1 1 255 1 2 43 1 3 216 2 1 3 2 2 1 2 3 12 END DATA. WEIGHT BY w. T-TEST PAIRS = y WITH x (PAIRED) /MISSING=ANALYSIS /CRITERIA=CI(0.95). _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:212: pspp -O format=csv t-test.sps" at_fn_check_prepare_trace "t-test.at:212" ( $at_check_trace; pspp -O format=csv t-test.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,y,1.94,530.00,.96,.04 ,x,1.03,530.00,.17,.01 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,y & x,530.00,.11,.008 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,y - x,.91,.95,.04,.83,.99,22.07,529.00,.000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:212" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_694 #AT_START_695 at_fn_group_banner 695 't-test.at:234' \ "T-TEST /PAIRS bug" " " 89 at_xfail=no ( $as_echo "695. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test.sps <<'_ATEOF' set format f8.3. data list list /A * B *. begin data. 11 2 1 1 1 1 end data. t-test pairs = a with b (paired). _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:246: pspp -o pspp.csv t-test.sps" at_fn_check_prepare_trace "t-test.at:246" ( $at_check_trace; pspp -o pspp.csv t-test.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:246" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:247: cat pspp.csv" at_fn_check_prepare_trace "t-test.at:247" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format A,F8.0 B,F8.0 Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,A,4.333,3,5.774,3.333 ,B,1.333,3,.577,.333 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,A & B,3,1.000,.000 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,A - B,3.000,5.196,3.000,-9.908,15.908,1.000,2,.423 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:247" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_695 #AT_START_696 at_fn_group_banner 696 't-test.at:270' \ "T-TEST /GROUPS" " " 89 at_xfail=no ( $as_echo "696. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test.sps <<'_ATEOF' data list list /ID * INDEP * DEP1 * DEP2 *. begin data. 1 1.1 1 3 2 1.1 2 4 3 1.1 2 4 4 1.1 2 4 5 1.1 3 5 6 2.1 3 1 7 2.1 4 2 8 2.1 4 2 9 2.1 4 2 10 2.1 5 3 11 3.1 2 2 end data. * Note that the last case should be IGNORED since it doesn't have a dependent variable of either 1.1 or 2.1. t-test /GROUPS=indep(1.1,2.1) /var=dep1 dep2. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:293: pspp -O format=csv t-test.sps" at_fn_check_prepare_trace "t-test.at:293" ( $at_check_trace; pspp -O format=csv t-test.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format ID,F8.0 INDEP,F8.0 DEP1,F8.0 DEP2,F8.0 Table: Group Statistics ,INDEP,N,Mean,Std. Deviation,S.E. Mean DEP1,1.10,5,2.00,.71,.32 ,2.10,5,4.00,.71,.32 DEP2,1.10,5,4.00,.71,.32 ,2.10,5,2.00,.71,.32 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper DEP1,Equal variances assumed,.00,1.000,-4.47,8.00,.002,-2.00,.45,-3.03,-.97 ,Equal variances not assumed,,,-4.47,8.00,.002,-2.00,.45,-3.03,-.97 DEP2,Equal variances assumed,.00,1.000,4.47,8.00,.002,2.00,.45,.97,3.03 ,Equal variances not assumed,,,4.47,8.00,.002,2.00,.45,.97,3.03 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:293" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_696 #AT_START_697 at_fn_group_banner 697 't-test.at:320' \ "T-TEST /GROUPS with one value for independent variable" "" 89 at_xfail=no ( $as_echo "697. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test.sps <<'_ATEOF' data list list /INDEP * DEP *. begin data. 1 6 1 6 1 7 1 6 1 13 1 4 1 7 1 9 1 7 1 12 1 11 2 11 2 9 2 8 2 4 2 16 2 9 2 9 2 5 2 4 2 10 2 14 end data. t-test /groups=indep(1.514) /var=dep. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:350: pspp -O format=csv t-test.sps" at_fn_check_prepare_trace "t-test.at:350" ( $at_check_trace; pspp -O format=csv t-test.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format INDEP,F8.0 DEP,F8.0 Table: Group Statistics ,INDEP,N,Mean,Std. Deviation,S.E. Mean DEP,≥ 1.51,11,9.00,3.82,1.15 ,< 1.51,11,8.00,2.86,.86 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper DEP,Equal variances assumed,.17,.683,.69,20.00,.495,1.00,1.44,-2.00,4.00 ,Equal variances not assumed,,,.69,18.54,.496,1.00,1.44,-2.02,4.02 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:350" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_697 #AT_START_698 at_fn_group_banner 698 't-test.at:370' \ "T-TEST /GROUPS with per-analysis missing values" "" 89 at_xfail=no ( $as_echo "698. $at_setup_line: testing $at_desc ..." $at_traceon cat >ref.sps <<'_ATEOF' data list list /id * indep * dep1 * dep2 *. begin data. 1 1.0 3.5 6 2 1.0 2.0 5 3 1.0 2.0 4 4 2.0 3.5 3 56 2.0 3.0 1 end data. t-test /group=indep /var=dep1, dep2. _ATEOF cat >expout <<'_ATEOF' Table: Reading free-form data from INLINE. Variable,Format id,F8.0 indep,F8.0 dep1,F8.0 dep2,F8.0 Table: Group Statistics ,indep,N,Mean,Std. Deviation,S.E. Mean dep1,1.00,3,2.50,.87,.50 ,2.00,2,3.25,.35,.25 dep2,1.00,3,5.00,1.00,.58 ,2.00,2,2.00,1.41,1.00 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper dep1,Equal variances assumed,3.75,.148,-1.12,3.00,.346,-.75,.67,-2.89,1.39 ,Equal variances not assumed,,,-1.34,2.78,.279,-.75,.56,-2.61,1.11 dep2,Equal variances assumed,.60,.495,2.85,3.00,.065,3.00,1.05,-.35,6.35 ,Equal variances not assumed,,,2.60,1.68,.144,3.00,1.15,-2.98,8.98 _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:407: pspp -o ref.csv ref.sps" at_fn_check_prepare_trace "t-test.at:407" ( $at_check_trace; pspp -o ref.csv ref.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:407" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:408: cat ref.csv" at_fn_check_prepare_trace "t-test.at:408" ( $at_check_trace; cat ref.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:408" $at_failed && at_fn_log_failure $at_traceon; } cat >missing.sps <<'_ATEOF' data list list /id * indep * dep1 * dep2. begin data. 1 1.0 3.5 6 2 1.0 2.0 5 3 1.0 2.0 4 4 2.0 3.5 3 5 2.0 3.0 . 6 2.0 . 1 7 . 3.1 5 end data. * Note that if the independent variable is missing, then it's implicitly * listwise missing. t-test /missing=analysis /group=indep /var=dep1 dep2. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:426: pspp -o missing.csv missing.sps" at_fn_check_prepare_trace "t-test.at:426" ( $at_check_trace; pspp -o missing.csv missing.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:426" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:427: cat missing.csv" at_fn_check_prepare_trace "t-test.at:427" ( $at_check_trace; cat missing.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:427" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_698 #AT_START_699 at_fn_group_banner 699 't-test.at:430' \ "T-TEST /GROUPS with listwise missing values" " " 89 at_xfail=no ( $as_echo "699. $at_setup_line: testing $at_desc ..." $at_traceon cat >ref.sps <<'_ATEOF' data list list /id * indep * dep1 * dep2. begin data. 1 1.0 3.5 6 2 1.0 2.0 5 3 1.0 2.0 4 4 2.0 3.5 3 5 2.0 3.0 2 6 2.0 4.0 1 end data. t-test /group=indep /var=dep1 dep2. _ATEOF cat >expout <<'_ATEOF' Table: Reading free-form data from INLINE. Variable,Format id,F8.0 indep,F8.0 dep1,F8.0 dep2,F8.0 Table: Group Statistics ,indep,N,Mean,Std. Deviation,S.E. Mean dep1,1.00,3,2.50,.87,.50 ,2.00,3,3.50,.50,.29 dep2,1.00,3,5.00,1.00,.58 ,2.00,3,2.00,1.00,.58 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper dep1,Equal variances assumed,2.00,.230,-1.73,4.00,.158,-1.00,.58,-2.60,.60 ,Equal variances not assumed,,,-1.73,3.20,.176,-1.00,.58,-2.77,.77 dep2,Equal variances assumed,.00,1.000,3.67,4.00,.021,3.00,.82,.73,5.27 ,Equal variances not assumed,,,3.67,4.00,.021,3.00,.82,.73,5.27 _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:470: pspp -o ref.csv ref.sps" at_fn_check_prepare_trace "t-test.at:470" ( $at_check_trace; pspp -o ref.csv ref.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:470" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:471: cat ref.csv" at_fn_check_prepare_trace "t-test.at:471" ( $at_check_trace; cat ref.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:471" $at_failed && at_fn_log_failure $at_traceon; } cat >missing.sps <<'_ATEOF' data list list /id * indep * dep1 * dep2 *. begin data. 1 1.0 3.5 6 2 1.0 2.0 5 3 1.0 2.0 4 4 2.0 3.5 3 5 2.0 3.0 2 6 2.0 4.0 1 7 2.0 . 0 end data. t-test /missing=listwise,exclude /group=indep /var=dep1, dep2. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:486: pspp -o missing.csv missing.sps" at_fn_check_prepare_trace "t-test.at:486" ( $at_check_trace; pspp -o missing.csv missing.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:486" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:487: cat missing.csv" at_fn_check_prepare_trace "t-test.at:487" ( $at_check_trace; cat missing.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:487" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_699 #AT_START_700 at_fn_group_banner 700 't-test.at:490' \ "T-TEST /TESTVAL" " " 89 at_xfail=no ( $as_echo "700. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test.sps <<'_ATEOF' data list list /ID * ABC *. begin data. 1 3.5 2 2.0 3 2.0 4 3.5 5 3.0 6 4.0 end data. t-test /testval=2.0 /var=abc. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:504: pspp -O format=csv t-test.sps" at_fn_check_prepare_trace "t-test.at:504" ( $at_check_trace; pspp -O format=csv t-test.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format ID,F8.0 ABC,F8.0 Table: One-Sample Statistics ,N,Mean,Std. Deviation,S.E. Mean ABC,6,3.00,.84,.34 Table: One-Sample Test ,Test Value = 2.000000,,,,, ,,,,,95% Confidence Interval of the Difference, ,t,df,Sig. (2-tailed),Mean Difference,Lower,Upper ABC,2.93,5,.033,1.00,.12,1.88 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:504" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_700 #AT_START_701 at_fn_group_banner 701 't-test.at:522' \ "T-TEST /TESTVAL with per-analysis missing values" "" 89 at_xfail=no ( $as_echo "701. $at_setup_line: testing $at_desc ..." $at_traceon cat >ref.sps <<'_ATEOF' data list list /id * x1 * x2. begin data. 1 3.5 34 2 2.0 10 3 2.0 23 4 3.5 98 5 3.0 23 67 4.0 8 end data. t-test /testval=3.0 /var=x1 x2. _ATEOF cat >expout <<'_ATEOF' Table: Reading free-form data from INLINE. Variable,Format id,F8.0 x1,F8.0 x2,F8.0 Table: One-Sample Statistics ,N,Mean,Std. Deviation,S.E. Mean x1,6,3.00,.84,.34 x2,6,32.67,33.40,13.64 Table: One-Sample Test ,Test Value = 3.000000,,,,, ,,,,,95% Confidence Interval of the Difference, ,t,df,Sig. (2-tailed),Mean Difference,Lower,Upper x1,.00,5,1.000,.00,-.88,.88 x2,2.18,5,.082,29.67,-5.39,64.72 _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:555: pspp -o ref.csv ref.sps" at_fn_check_prepare_trace "t-test.at:555" ( $at_check_trace; pspp -o ref.csv ref.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:555" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:556: cat ref.csv" at_fn_check_prepare_trace "t-test.at:556" ( $at_check_trace; cat ref.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:556" $at_failed && at_fn_log_failure $at_traceon; } cat >missing.sps <<'_ATEOF' data list list /id * x1 * x2. begin data. 1 3.5 34 2 2.0 10 3 2.0 23 4 3.5 98 5 3.0 23 6 4.0 . 7 . 8 end data. t-test /missing=analysis /testval=3.0 /var=x1 x2. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:571: pspp -o missing.csv missing.sps" at_fn_check_prepare_trace "t-test.at:571" ( $at_check_trace; pspp -o missing.csv missing.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:571" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:572: cat missing.csv" at_fn_check_prepare_trace "t-test.at:572" ( $at_check_trace; cat missing.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:572" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_701 #AT_START_702 at_fn_group_banner 702 't-test.at:575' \ "T-TEST /TESTVAL with listwise missing values" " " 89 at_xfail=no ( $as_echo "702. $at_setup_line: testing $at_desc ..." $at_traceon cat >ref.sps <<'_ATEOF' data list list /id * x1 * x2. begin data. 1 3.5 34 2 2.0 10 3 2.0 23 4 3.5 98 5 3.0 23 end data. t-test /testval=3.0 /var=x1 x2. _ATEOF cat >expout <<'_ATEOF' Table: Reading free-form data from INLINE. Variable,Format id,F8.0 x1,F8.0 x2,F8.0 Table: One-Sample Statistics ,N,Mean,Std. Deviation,S.E. Mean x1,5,2.80,.76,.34 x2,5,37.60,34.82,15.57 Table: One-Sample Test ,Test Value = 3.000000,,,,, ,,,,,95% Confidence Interval of the Difference, ,t,df,Sig. (2-tailed),Mean Difference,Lower,Upper x1,-.59,4,.587,-.20,-1.14,.74 x2,2.22,4,.090,34.60,-8.63,77.83 _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:607: pspp -o ref.csv ref.sps" at_fn_check_prepare_trace "t-test.at:607" ( $at_check_trace; pspp -o ref.csv ref.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:607" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:608: cat ref.csv" at_fn_check_prepare_trace "t-test.at:608" ( $at_check_trace; cat ref.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:608" $at_failed && at_fn_log_failure $at_traceon; } cat >missing.sps <<'_ATEOF' data list list /id * x1 * x2. begin data. 1 3.5 34 2 2.0 10 3 2.0 23 4 3.5 98 5 3.0 23 6 4.0 99 end data. MISSING VALUES x2(99). t-test /missing=listwise /testval=3.0 /var=x1 x2. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:624: pspp -o missing.csv missing.sps" at_fn_check_prepare_trace "t-test.at:624" ( $at_check_trace; pspp -o missing.csv missing.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:624" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:625: cat missing.csv" at_fn_check_prepare_trace "t-test.at:625" ( $at_check_trace; cat missing.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:625" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_702 #AT_START_703 at_fn_group_banner 703 't-test.at:628' \ "T-TEST wih TEMPORARY transformation" " " 89 at_xfail=no ( $as_echo "703. $at_setup_line: testing $at_desc ..." $at_traceon cat >ref.sps <<'_ATEOF' data list list /ind * x * . begin data. 1 3.5 1 2.0 1 2.0 2 3.5 2 3.0 2 4.0 end data. t-test /groups=ind(1,2) /var x. _ATEOF cat >expout <<'_ATEOF' Table: Reading free-form data from INLINE. Variable,Format ind,F8.0 x,F8.0 Table: Group Statistics ,ind,N,Mean,Std. Deviation,S.E. Mean x,1.00,3,2.50,.87,.50 ,2.00,3,3.50,.50,.29 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper x,Equal variances assumed,2.00,.230,-1.73,4.00,.158,-1.00,.58,-2.60,.60 ,Equal variances not assumed,,,-1.73,3.20,.176,-1.00,.58,-2.77,.77 _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:660: pspp -o ref.csv ref.sps" at_fn_check_prepare_trace "t-test.at:660" ( $at_check_trace; pspp -o ref.csv ref.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:660" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:661: cat ref.csv" at_fn_check_prepare_trace "t-test.at:661" ( $at_check_trace; cat ref.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:661" $at_failed && at_fn_log_failure $at_traceon; } cat >temporary.sps <<'_ATEOF' data list list /ind * x * . begin data. 1 3.5 1 2.0 1 2.0 2 3.5 2 3.0 2 4.0 2 9.0 end data. TEMPORARY. SELECT IF x < 7. t-test /groups=ind(1 2) /var x. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:679: pspp -o temporary.csv temporary.sps" at_fn_check_prepare_trace "t-test.at:679" ( $at_check_trace; pspp -o temporary.csv temporary.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:679" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/t-test.at:680: cat temporary.csv" at_fn_check_prepare_trace "t-test.at:680" ( $at_check_trace; cat temporary.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:680" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_703 #AT_START_704 at_fn_group_banner 704 't-test.at:684' \ "T-TEST invalid syntax" " " 89 at_xfail=no ( $as_echo "704. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test.sps <<'_ATEOF' DATA LIST LIST NOTABLE /id * a * . BEGIN DATA. 1 3.5 2 2.0 3 2.0 4 3.5 5 3.0 6 4.0 END DATA. T-TEST /testval=2.0 . T-TEST /groups=id(3) . _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:699: pspp -O format=csv t-test.sps" at_fn_check_prepare_trace "t-test.at:699" ( $at_check_trace; pspp -O format=csv t-test.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "t-test.sps:11: error: T-TEST: Required subcommand VARIABLES was not specified. t-test.sps:12: error: T-TEST: Required subcommand VARIABLES was not specified. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/t-test.at:699" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_704 #AT_START_705 at_fn_group_banner 705 't-test.at:707' \ "T-TEST string variable" " " 89 at_xfail=no ( $as_echo "705. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test.sps <<'_ATEOF' data list list /ID * INDEP (a1) DEP1 * DEP2 *. begin data. 1 'a' 1 3 2 'a' 2 4 3 'a' 2 4 4 'a' 2 4 5 'a' 3 5 6 'b' 3 1 7 'b' 4 2 8 'b' 4 2 9 'b' 4 2 10 'b' 5 3 11 'c' 2 2 end data. t-test /GROUPS=indep('a','b') /var=dep1 dep2. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:728: pspp -O format=csv t-test.sps" at_fn_check_prepare_trace "t-test.at:728" ( $at_check_trace; pspp -O format=csv t-test.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format ID,F8.0 INDEP,A1 DEP1,F8.0 DEP2,F8.0 Table: Group Statistics ,INDEP,N,Mean,Std. Deviation,S.E. Mean DEP1,a,5,2.00,.71,.32 ,b,5,4.00,.71,.32 DEP2,a,5,4.00,.71,.32 ,b,5,2.00,.71,.32 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper DEP1,Equal variances assumed,.00,1.000,-4.47,8.00,.002,-2.00,.45,-3.03,-.97 ,Equal variances not assumed,,,-4.47,8.00,.002,-2.00,.45,-3.03,-.97 DEP2,Equal variances assumed,.00,1.000,4.47,8.00,.002,2.00,.45,.97,3.03 ,Equal variances not assumed,,,4.47,8.00,.002,2.00,.45,.97,3.03 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:728" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_705 #AT_START_706 at_fn_group_banner 706 't-test.at:754' \ "T-TEST string variable, only one value" " " 89 at_xfail=no ( $as_echo "706. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test.sps <<'_ATEOF' data list list notable /id * indep (a1) dep1 * dep2 *. begin data. 1 'a' 1 3 2 'a' 2 4 3 'a' 2 4 4 'a' 2 4 5 'a' 3 5 6 'b' 3 1 7 'b' 4 2 8 'b' 4 2 9 'b' 4 2 10 'b' 5 3 11 'c' 2 2 end data. t-test /GROUPS=indep('a') /var=dep1 dep2. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:774: pspp -O format=csv t-test.sps" at_fn_check_prepare_trace "t-test.at:774" ( $at_check_trace; pspp -O format=csv t-test.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"t-test.sps:17: error: T-TEST: When applying GROUPS to a string variable, two values must be specified.\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/t-test.at:774" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_706 #AT_START_707 at_fn_group_banner 707 't-test.at:780' \ "T-TEST string variable comparison bug" " " 89 at_xfail=no ( $as_echo "707. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test.sps <<'_ATEOF' data list list /x * gv (a8). begin data. 3 One 2 One 3 One 2 One 3 One 4 Two 3.5 Two 3.0 Two end data. t-test group=gv('One', 'Two') /variables = x. _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:798: pspp -O format=csv t-test.sps" at_fn_check_prepare_trace "t-test.at:798" ( $at_check_trace; pspp -O format=csv t-test.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 gv,A8 Table: Group Statistics ,gv,N,Mean,Std. Deviation,S.E. Mean x,One ,5,2.60,.55,.24 ,Two ,3,3.50,.50,.29 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper x,Equal variances assumed,1.13,.329,-2.32,6.00,.060,-.90,.39,-1.85,.05 ,Equal variances not assumed,,,-2.38,4.70,.067,-.90,.38,-1.89,.09 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:798" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_707 #AT_START_708 at_fn_group_banner 708 't-test.at:821' \ "T-TEST wrong group" " " 89 at_xfail=no ( $as_echo "708. $at_setup_line: testing $at_desc ..." $at_traceon cat >t-test-crs.sps <<'_ATEOF' data list list /x * g *. begin data. 1 2 2 2 3 2 4 2 5 2 end data. t-test /variables = x group=g(1,3). _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:835: pspp t-test-crs.sps" at_fn_check_prepare_trace "t-test.at:835" ( $at_check_trace; pspp t-test-crs.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/t-test.at:835" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_708 #AT_START_709 at_fn_group_banner 709 't-test.at:842' \ "T-TEST non number p value" " " 89 at_xfail=no ( $as_echo "709. $at_setup_line: testing $at_desc ..." $at_traceon cat >t.sps <<'_ATEOF' data list list /age d_frage_1 weight height *. begin data. 1 2 3 1 4 5 6 2 end data. T-TEST /VARIABLES=age weight height /GROUPS=d_frage_1(1,0) /MISSING=ANALYSIS /CRITERIA=CIN(p.95). _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:854: pspp t.sps" at_fn_check_prepare_trace "t-test.at:854" ( $at_check_trace; pspp t.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/t-test.at:854" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_709 #AT_START_710 at_fn_group_banner 710 't-test.at:861' \ "T-TEST unterminated string - paired" " " 89 at_xfail=no ( $as_echo "710. $at_setup_line: testing $at_desc ..." $at_traceon cat >t.sps <<'_ATEOF' data list list /id * a * b * c * d *. begin data. 5 2.0 3.0 4.0 4.0 3 1.0 2.0 5.1 3.9 3 2.0 4.5 5.2(3.8 4 2.0 4.5 5n3 3.7 5 3.0 6.0 5.9 3.6 6 3.4 6.0 5.9 . end data. t-test /MISSING=listwise /PAIRS a"b with c d (PA RED). _ATEOF { set +x $as_echo "$at_srcdir/t-test.at:877: pspp t.sps" at_fn_check_prepare_trace "t-test.at:877" ( $at_check_trace; pspp t.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/t-test.at:877" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_710 #AT_START_711 at_fn_group_banner 711 'cache.at:19' \ "CACHE" " " 90 at_xfail=no ( $as_echo "711. $at_setup_line: testing $at_desc ..." $at_traceon cat >cache.sps <<'_ATEOF' CACHE. _ATEOF { set +x $as_echo "$at_srcdir/cache.at:23: pspp -O format=csv cache.sps" at_fn_check_prepare_trace "cache.at:23" ( $at_check_trace; pspp -O format=csv cache.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/cache.at:23" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_711 #AT_START_712 at_fn_group_banner 712 'cd.at:19' \ "CD" " " 91 at_xfail=no ( $as_echo "712. $at_setup_line: testing $at_desc ..." $at_traceon mkdir subdir cat >cd.sps <<'_ATEOF' cd 'subdir'. host command=['pwd > mydir']. _ATEOF { set +x $as_echo "$at_srcdir/cd.at:25: pspp -O format=csv cd.sps" at_fn_check_prepare_trace "cd.at:25" ( $at_check_trace; pspp -O format=csv cd.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/cd.at:25" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/cd.at:27: sed 's,.*/,,' subdir/mydir" at_fn_check_prepare_trace "cd.at:27" ( $at_check_trace; sed 's,.*/,,' subdir/mydir ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "subdir " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/cd.at:27" $at_failed && at_fn_log_failure \ "subdir/mydir" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_712 #AT_START_713 at_fn_group_banner 713 'date.at:19' \ "USE ALL" " " 92 at_xfail=no ( $as_echo "713. $at_setup_line: testing $at_desc ..." $at_traceon cat >use.sps <<'_ATEOF' data list notable /X 1-2. begin data. 1 2 3 4 5 6 7 8 9 10 end data. use all. list. _ATEOF { set +x $as_echo "$at_srcdir/date.at:37: pspp -o pspp.csv use.sps" at_fn_check_prepare_trace "date.at:37" ( $at_check_trace; pspp -o pspp.csv use.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/date.at:37" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/date.at:38: cat pspp.csv" at_fn_check_prepare_trace "date.at:38" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List X 1 2 3 4 5 6 7 8 9 10 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/date.at:38" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_713 #AT_START_714 at_fn_group_banner 714 'insert.at:31' \ "INSERT SYNTAX=INTERACTIVE" " " 93 at_xfail=no ( $as_echo "714. $at_setup_line: testing $at_desc ..." $at_traceon cat >batch.sps <<'_ATEOF' input program loop #i = 1 to 5 + compute z = #i + end case end loop end file end input program _ATEOF cat >insert.sps <<'_ATEOF' INSERT FILE='batch.sps' SYNTAX=interactive. LIST. _ATEOF { set +x $as_echo "$at_srcdir/insert.at:39: pspp -o pspp.csv insert.sps" at_fn_check_prepare_trace "insert.at:39" ( $at_check_trace; pspp -o pspp.csv insert.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "batch.sps:2.1-2.4: error: INPUT PROGRAM: Syntax error at \`loop': expecting end of command. batch.sps:3: error: COMPUTE: COMPUTE is allowed only after the active dataset has been defined or inside INPUT PROGRAM. batch.sps:4: error: END CASE: END CASE is allowed only inside INPUT PROGRAM. insert.sps:4: error: LIST: LIST is allowed only after the active dataset has been defined. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/insert.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_714 #AT_START_715 at_fn_group_banner 715 'insert.at:47' \ "INSERT SYNTAX=BATCH" " " 93 at_xfail=no ( $as_echo "715. $at_setup_line: testing $at_desc ..." $at_traceon cat >batch.sps <<'_ATEOF' input program loop #i = 1 to 5 + compute z = #i + end case end loop end file end input program _ATEOF cat >insert.sps <<'_ATEOF' INSERT FILE='batch.sps' SYNTAX=BATCH. LIST. _ATEOF { set +x $as_echo "$at_srcdir/insert.at:55: pspp -o pspp.csv insert.sps" at_fn_check_prepare_trace "insert.at:55" ( $at_check_trace; pspp -o pspp.csv insert.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/insert.at:55" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/insert.at:56: cat pspp.csv" at_fn_check_prepare_trace "insert.at:56" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List z 1.00 2.00 3.00 4.00 5.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/insert.at:56" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_715 #AT_START_716 at_fn_group_banner 716 'insert.at:67' \ "INSERT CD=NO" " " 93 at_xfail=no ( $as_echo "716. $at_setup_line: testing $at_desc ..." $at_traceon cat >insert.sps <<'_ATEOF' INSERT FILE='Dir1/foo.sps'. LIST. _ATEOF mkdir Dir1 cat >Dir1/foo.sps <<'_ATEOF' INSERT FILE='bar.sps' CD=NO. _ATEOF cat >Dir1/bar.sps <<'_ATEOF' DATA LIST LIST /x *. BEGIN DATA. 1 2 3 END DATA. _ATEOF { set +x $as_echo "$at_srcdir/insert.at:82: pspp -o pspp.csv insert.sps" at_fn_check_prepare_trace "insert.at:82" ( $at_check_trace; pspp -o pspp.csv insert.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Dir1/foo.sps:1: error: INSERT: Can't find \`bar.sps' in include file search path. insert.sps:2: error: LIST: LIST is allowed only after the active dataset has been defined. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/insert.at:82" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_716 #AT_START_717 at_fn_group_banner 717 'insert.at:88' \ "INSERT CD=YES" " " 93 at_xfail=no ( $as_echo "717. $at_setup_line: testing $at_desc ..." $at_traceon cat >insert.sps <<'_ATEOF' INSERT FILE='Dir1/foo.sps' CD=YES. LIST. _ATEOF mkdir Dir1 cat >Dir1/foo.sps <<'_ATEOF' INSERT FILE='bar.sps'. _ATEOF cat >Dir1/bar.sps <<'_ATEOF' DATA LIST LIST /x *. BEGIN DATA. 1 2 3 END DATA. _ATEOF { set +x $as_echo "$at_srcdir/insert.at:103: pspp -o pspp.csv insert.sps" at_fn_check_prepare_trace "insert.at:103" ( $at_check_trace; pspp -o pspp.csv insert.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/insert.at:103" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/insert.at:104: cat pspp.csv" at_fn_check_prepare_trace "insert.at:104" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 Table: Data List x 1.00 2.00 3.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/insert.at:104" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_717 #AT_START_718 at_fn_group_banner 718 'insert.at:132' \ "INSERT ERROR=STOP" " " 93 at_xfail=no ( $as_echo "718. $at_setup_line: testing $at_desc ..." $at_traceon cat >error.sps <<'_ATEOF' DATA LIST NOTABLE LIST /x *. BEGIN DATA. 1 2 3 END DATA. * The following line is erroneous DISPLAY AKSDJ. LIST. _ATEOF cat >insert.sps <<'_ATEOF' INSERT FILE='error.sps' ERROR=STOP. _ATEOF { set +x $as_echo "$at_srcdir/insert.at:136: pspp -o pspp.csv insert.sps" at_fn_check_prepare_trace "insert.at:136" ( $at_check_trace; pspp -o pspp.csv insert.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error.sps:10: error: DISPLAY: AKSDJ is not a variable name. warning: Error encountered while ERROR=STOP is effective. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/insert.at:136" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_718 #AT_START_719 at_fn_group_banner 719 'insert.at:142' \ "INSERT ERROR=CONTINUE" " " 93 at_xfail=no ( $as_echo "719. $at_setup_line: testing $at_desc ..." $at_traceon cat >error.sps <<'_ATEOF' DATA LIST NOTABLE LIST /x *. BEGIN DATA. 1 2 3 END DATA. * The following line is erroneous DISPLAY AKSDJ. LIST. _ATEOF cat >insert.sps <<'_ATEOF' INSERT FILE='error.sps' ERROR=CONTINUE. _ATEOF { set +x $as_echo "$at_srcdir/insert.at:146: pspp -o pspp.csv insert.sps" at_fn_check_prepare_trace "insert.at:146" ( $at_check_trace; pspp -o pspp.csv insert.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error.sps:10: error: DISPLAY: AKSDJ is not a variable name. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/insert.at:146" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/insert.at:149: cat pspp.csv" at_fn_check_prepare_trace "insert.at:149" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error.sps:10: error: DISPLAY: AKSDJ is not a variable name. Table: Data List x 1.00 2.00 3.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/insert.at:149" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_719 #AT_START_720 at_fn_group_banner 720 'insert.at:162' \ "INSERT nonexistent file" " " 93 at_xfail=no ( $as_echo "720. $at_setup_line: testing $at_desc ..." $at_traceon cat >insert.sps <<'_ATEOF' INSERT FILE='nonexistent' ERROR=CONTINUE. . LIST. _ATEOF { set +x $as_echo "$at_srcdir/insert.at:171: pspp -O format=csv insert.sps" at_fn_check_prepare_trace "insert.at:171" ( $at_check_trace; pspp -O format=csv insert.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "insert.sps:2: error: INSERT: Can't find \`nonexistent' in include file search path. insert.sps:6: error: LIST: LIST is allowed only after the active dataset has been defined. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/insert.at:171" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_720 #AT_START_721 at_fn_group_banner 721 'insert.at:181' \ "INCLUDE full check" " " 93 at_xfail=no ( $as_echo "721. $at_setup_line: testing $at_desc ..." $at_traceon cat >two-utf8.sps <<'_ATEOF' echo 'Äpfelfölfaß'. _ATEOF cat >include.sps <<'_ATEOF' echo 'ONE'. include FILE='two-latin1.sps' ENCODING='ISO_8859-1'. _ATEOF { set +x $as_echo "$at_srcdir/insert.at:192: iconv -f UTF-8 -t iso-8859-1 two-utf8.sps > two-latin1.sps" at_fn_check_prepare_trace "insert.at:192" ( $at_check_trace; iconv -f UTF-8 -t iso-8859-1 two-utf8.sps > two-latin1.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/insert.at:192" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/insert.at:194: pspp -O format=csv include.sps" at_fn_check_prepare_trace "insert.at:194" ( $at_check_trace; pspp -O format=csv include.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "ONE Äpfelfölfaß " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/insert.at:194" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_721 #AT_START_722 at_fn_group_banner 722 'insert.at:205' \ "INSERT unterminated string" " " 93 at_xfail=no ( $as_echo "722. $at_setup_line: testing $at_desc ..." $at_traceon cat >insert.sps <<'_ATEOF' INSERT FILE=7bar.sps' CD=NO. _ATEOF { set +x $as_echo "$at_srcdir/insert.at:210: pspp -O format=csv insert.sps" at_fn_check_prepare_trace "insert.at:210" ( $at_check_trace; pspp -O format=csv insert.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/insert.at:210" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_722 #AT_START_723 at_fn_group_banner 723 'permissions.at:19' \ "PERMISSIONS" " " 94 at_xfail=no ( $as_echo "723. $at_setup_line: testing $at_desc ..." $at_traceon cat >foobar <<'_ATEOF' Hello _ATEOF chmod 666 foobar { set +x $as_echo "$at_srcdir/permissions.at:24: ls -l foobar" at_fn_check_prepare_trace "permissions.at:24" ( $at_check_trace; ls -l foobar ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/permissions.at:24" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/permissions.at:25: sed 's/^\\(..........\\).*/\\1/' stdout" at_fn_check_prepare_trace "permissions.at:25" ( $at_check_trace; sed 's/^\(..........\).*/\1/' stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "-rw-rw-rw- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/permissions.at:25" $at_failed && at_fn_log_failure $at_traceon; } cat >permissions.sps <<'_ATEOF' PERMISSIONS /FILE='foobar' PERMISSIONS=READONLY. _ATEOF { set +x $as_echo "$at_srcdir/permissions.at:30: pspp -O format=csv permissions.sps" at_fn_check_prepare_trace "permissions.at:30" ( $at_check_trace; pspp -O format=csv permissions.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/permissions.at:30" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/permissions.at:31: ls -l foobar" at_fn_check_prepare_trace "permissions.at:31" ( $at_check_trace; ls -l foobar ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/permissions.at:31" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/permissions.at:32: sed 's/^\\(..........\\).*/\\1/' stdout" at_fn_check_prepare_trace "permissions.at:32" ( $at_check_trace; sed 's/^\(..........\).*/\1/' stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "-r--r--r-- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/permissions.at:32" $at_failed && at_fn_log_failure $at_traceon; } cat >permissions.sps <<'_ATEOF' PERMISSIONS /FILE='foobar' PERMISSIONS=WRITEABLE. _ATEOF { set +x $as_echo "$at_srcdir/permissions.at:37: pspp -O format=csv permissions.sps" at_fn_check_prepare_trace "permissions.at:37" ( $at_check_trace; pspp -O format=csv permissions.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/permissions.at:37" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/permissions.at:38: ls -l foobar" at_fn_check_prepare_trace "permissions.at:38" ( $at_check_trace; ls -l foobar ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; tee stdout <"$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/permissions.at:38" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/permissions.at:39: sed 's/^\\(..........\\).*/\\1/' stdout" at_fn_check_prepare_trace "permissions.at:39" ( $at_check_trace; sed 's/^\(..........\).*/\1/' stdout ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "-rw-r--r-- " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/permissions.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_723 #AT_START_724 at_fn_group_banner 724 'permissions.at:45' \ "PERMISSIONS - bad syntax" " " 94 at_xfail=no ( $as_echo "724. $at_setup_line: testing $at_desc ..." $at_traceon cat >pe.sps <<'_ATEOF' PERMI|SIONS /FILE='foobar' PERMISSIONS=WRITEABLE. _ATEOF { set +x $as_echo "$at_srcdir/permissions.at:49: pspp -O format=csv pe.sps" at_fn_check_prepare_trace "permissions.at:49" ( $at_check_trace; pspp -O format=csv pe.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "pe.sps:1.6: error: PERMISSIONS: Syntax error at \`|': expecting STRING. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/permissions.at:49" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_724 #AT_START_725 at_fn_group_banner 725 'set.at:20' \ "SET FORMAT to invalid output format" " " 95 at_xfail=no ( $as_echo "725. $at_setup_line: testing $at_desc ..." $at_traceon cat >set.pspp <<'_ATEOF' DATA LIST LIST NOTABLE /x. BEGIN DATA. 1 2 3 END DATA. SET FORMAT F41. DESCRIPTIVES /x. _ATEOF { set +x $as_echo "$at_srcdir/set.at:31: pspp -O format=csv set.pspp" at_fn_check_prepare_trace "set.at:31" ( $at_check_trace; pspp -O format=csv set.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"set.pspp:7: error: SET: Output format F41.0 specifies width 41, but F requires a width between 1 and 40.\" Table: Valid cases = 3; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum x,3,2.00,1.00,1.00,3.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/set.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_725 #AT_START_726 at_fn_group_banner 726 'set.at:42' \ "SET crash on invalid cc" " " 95 at_xfail=no ( $as_echo "726. $at_setup_line: testing $at_desc ..." $at_traceon cat >set.pspp <<'_ATEOF' SET CCA='xxxx'.SHGW CCA. _ATEOF { set +x $as_echo "$at_srcdir/set.at:47: pspp -O format=csv set.pspp" at_fn_check_prepare_trace "set.at:47" ( $at_check_trace; pspp -O format=csv set.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/set.at:47" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_726 #AT_START_727 at_fn_group_banner 727 'set.at:52' \ "SET MXWARNS" " " 95 at_xfail=no ( $as_echo "727. $at_setup_line: testing $at_desc ..." $at_traceon cat >set.pspp <<'_ATEOF' set mxwarns=2. data list notable list /x (f8.2) y (f8.2). begin data 1 2 3 r 5 x q 8 9 9 3 x w w end data. comment The following line should not be executed. list. _ATEOF { set +x $as_echo "$at_srcdir/set.at:73: pspp -O format=csv set.pspp" at_fn_check_prepare_trace "set.at:73" ( $at_check_trace; pspp -O format=csv set.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "set.pspp:5.3: warning: Data for variable y is not valid as format F: Field contents are not numeric. set.pspp:6.3: warning: Data for variable y is not valid as format F: Field contents are not numeric. set.pspp:7.1: warning: Data for variable x is not valid as format F: Field contents are not numeric. note: Warnings (3) exceed limit (2). Syntax processing will be halted. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/set.at:73" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_727 #AT_START_728 at_fn_group_banner 728 'set.at:88' \ "SET MXWARNS special case zero" " " 95 at_xfail=no ( $as_echo "728. $at_setup_line: testing $at_desc ..." $at_traceon cat >mxwarns.pspp <<'_ATEOF' set mxwarns=0. data list notable list /x (f8.2) y (f8.2) z *. begin data 1 2 3 3 r 3 5 x 3 q 8 4 9 9 4 3 x 4 w w 4 end data. list. _ATEOF { set +x $as_echo "$at_srcdir/set.at:106: pspp -O format=csv mxwarns.pspp" at_fn_check_prepare_trace "set.at:106" ( $at_check_trace; pspp -O format=csv mxwarns.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "warning: MXWARNS set to zero. No further warnings will be given even when potentially problematic situations are encountered. Table: Data List x,y,z 1.00,2.00,3.00 3.00,. ,3.00 5.00,. ,3.00 . ,8.00,4.00 9.00,9.00,4.00 3.00,. ,4.00 . ,. ,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/set.at:106" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_728 #AT_START_729 at_fn_group_banner 729 'set.at:126' \ "PRESERVE of SET FORMAT" " " 96 at_xfail=no ( $as_echo "729. $at_setup_line: testing $at_desc ..." $at_traceon cat >set.pspp <<'_ATEOF' SHOW FORMAT. PRESERVE. SET FORMAT F10.0. SHOW FORMAT RESTORE. SHOW FORMAT. _ATEOF { set +x $as_echo "$at_srcdir/set.at:135: pspp -O format=csv set.pspp" at_fn_check_prepare_trace "set.at:135" ( $at_check_trace; pspp -O format=csv set.pspp ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "set.pspp:1: note: SHOW: FORMAT is F8.2. set.pspp:5: note: SHOW: FORMAT is F10.0. set.pspp:6: note: SHOW: FORMAT is F8.2. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/set.at:135" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_729 #AT_START_730 at_fn_group_banner 730 'show.at:19' \ "SHOW N" " " 97 at_xfail=no ( $as_echo "730. $at_setup_line: testing $at_desc ..." $at_traceon cat >show.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x. BEGIN DATA. 1 2 3 END DATA. SHOW N. _ATEOF { set +x $as_echo "$at_srcdir/show.at:32: pspp -O format=csv show.sps" at_fn_check_prepare_trace "show.at:32" ( $at_check_trace; pspp -O format=csv show.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "show.sps:8: note: SHOW: N is 3. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/show.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_730 #AT_START_731 at_fn_group_banner 731 'show.at:39' \ "SHOW N empty" " " 97 at_xfail=no ( $as_echo "731. $at_setup_line: testing $at_desc ..." $at_traceon cat >shown-empty.sps <<'_ATEOF' SHOW N. _ATEOF { set +x $as_echo "$at_srcdir/show.at:45: pspp -O format=csv shown-empty.sps" at_fn_check_prepare_trace "show.at:45" ( $at_check_trace; pspp -O format=csv shown-empty.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "shown-empty.sps:1: note: SHOW: N is Unknown. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/show.at:45" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_731 #AT_START_732 at_fn_group_banner 732 'title.at:19' \ "FILE LABEL and (ADD) DOCUMENT" " " 98 at_xfail=no ( $as_echo "732. $at_setup_line: testing $at_desc ..." $at_traceon cat >file-label.sps <<'_ATEOF' /* Set up a dummy active dataset in memory. data list /X 1 Y 2. begin data. 16 27 38 49 50 end data. /* Add value labels for some further testing of value labels. value labels x y 1 'first label' 2 'second label' 3 'third label'. add value labels x 1 'first label mark two'. /* Add a file label and a few documents. file label This is a test file label. document First line of a document Second line of a document The last line should end with a period: . /* Display the documents. display documents. display file label. ADD DOCUMENT 'Line one' 'Line two'. /* Save the active dataset then get it and display the documents again. save /OUTFILE='foo.save'. get /FILE='foo.save'. display documents. display file label. /* There is an interesting interaction that occurs if the 'execute' /* command below. What happens is that an error message is output /* at the next 'save' command that 'foo.save' is already open for /* input. This is because the 'get' hasn't been executed yet and /* therefore PSPP would be reading from and writing to the same /* file at once, which is obviously a Bad Thing. But 'execute' /* here clears up that potential problem. execute. /* Add another (shorter) document and try again. document There should be another document now. display documents. /* Save and get. save /OUTFILE='foo.save'. get /FILE='foo.save'. display documents. display file label. /* Done. _ATEOF { set +x $as_echo "$at_srcdir/title.at:75: pspp -o pspp.csv file-label.sps" at_fn_check_prepare_trace "title.at:75" ( $at_check_trace; pspp -o pspp.csv file-label.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/title.at:75" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/title.at:77: sed 's/(Entered [^)]*)/(Entered )/' pspp.csv" at_fn_check_prepare_trace "title.at:77" ( $at_check_trace; sed 's/(Entered [^)]*)/(Entered )/' pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from INLINE. Variable,Record,Columns,Format X,1,1- 1,F1.0 Y,1,2- 2,F1.0 Documents in the active dataset: document First line of a document Second line of a document The last line should end with a period: . (Entered ) File label: This is a test file label Documents in the active dataset: document First line of a document Second line of a document The last line should end with a period: . (Entered ) Line one Line two (Entered ) File label: This is a test file label Documents in the active dataset: document First line of a document Second line of a document The last line should end with a period: . (Entered ) Line one Line two (Entered ) document There should be another document now. (Entered ) Documents in the active dataset: document First line of a document Second line of a document The last line should end with a period: . (Entered ) Line one Line two (Entered ) document There should be another document now. (Entered ) File label: This is a test file label " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/title.at:77" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_732 #AT_START_733 at_fn_group_banner 733 'compute.at:19' \ "COMPUTE crash with SAVE" " " 99 at_xfail=no ( $as_echo "733. $at_setup_line: testing $at_desc ..." $at_traceon cat >compute.sps <<'_ATEOF' INPUT PROGRAM. COMPUTE num = 3. END FILE. END INPUT PROGRAM. EXECUTE. SAVE outfile='temp.sav'. _ATEOF { set +x $as_echo "$at_srcdir/compute.at:29: pspp -O format=csv compute.sps" at_fn_check_prepare_trace "compute.at:29" ( $at_check_trace; pspp -O format=csv compute.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/compute.at:29" $at_failed && at_fn_log_failure $at_traceon; } cat >list.sps <<'_ATEOF' GET FILE='temp.sav'. LIST. _ATEOF { set +x $as_echo "$at_srcdir/compute.at:34: pspp -O format=csv list.sps" at_fn_check_prepare_trace "compute.at:34" ( $at_check_trace; pspp -O format=csv list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/compute.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_733 #AT_START_734 at_fn_group_banner 734 'compute.at:38' \ "COMPUTE bug in long string UPCASE" " " 99 at_xfail=no ( $as_echo "734. $at_setup_line: testing $at_desc ..." $at_traceon cat >compute.sps <<'_ATEOF' DATA LIST LIST /A (A161) B (A3). BEGIN DATA abc def ghi jkl END DATA. COMPUTE A=upcase(A). EXECUTE. LIST. _ATEOF { set +x $as_echo "$at_srcdir/compute.at:53: pspp -O format=csv compute.sps" at_fn_check_prepare_trace "compute.at:53" ( $at_check_trace; pspp -O format=csv compute.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format A,A161 B,A3 Table: Data List A,B ABC ,def GHI ,jkl " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/compute.at:53" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_734 #AT_START_735 at_fn_group_banner 735 'compute.at:66' \ "COMPUTE bug with long variable names" " " 99 at_xfail=no ( $as_echo "735. $at_setup_line: testing $at_desc ..." $at_traceon cat >compute.sps <<'_ATEOF' DATA LIST LIST /longVariablename * x *. BEGIN DATA. 1 2 3 4 END DATA. COMPUTE longvariableName=100-longvariablename. LIST. _ATEOF { set +x $as_echo "$at_srcdir/compute.at:79: pspp -O format=csv compute.sps" at_fn_check_prepare_trace "compute.at:79" ( $at_check_trace; pspp -O format=csv compute.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format longVariablename,F8.0 x,F8.0 Table: Data List longVariablename,x 99.00,2.00 97.00,4.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/compute.at:79" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_735 #AT_START_736 at_fn_group_banner 736 'compute.at:92' \ "COMPUTE self-reference to new variable" " " 99 at_xfail=no ( $as_echo "736. $at_setup_line: testing $at_desc ..." $at_traceon cat >compute.sps <<'_ATEOF' DATA LIST /ITEM 1-3. COMPUTE SUM=SUM+ITEM. PRINT OUTFILE='compute-sum.out' /ITEM SUM. LEAVE SUM BEGIN DATA. 123 404 555 999 END DATA. _ATEOF { set +x $as_echo "$at_srcdir/compute.at:105: pspp -O format=csv compute.sps" at_fn_check_prepare_trace "compute.at:105" ( $at_check_trace; pspp -O format=csv compute.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading 1 record from INLINE. Variable,Record,Columns,Format ITEM,1,1- 3,F3.0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/compute.at:105" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/compute.at:110: cat compute-sum.out" at_fn_check_prepare_trace "compute.at:110" ( $at_check_trace; cat compute-sum.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " 123 123.00 404 527.00 555 1082.00 999 2081.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/compute.at:110" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_736 #AT_START_737 at_fn_group_banner 737 'count.at:19' \ "COUNT -- numeric data" " " 100 at_xfail=no ( $as_echo "737. $at_setup_line: testing $at_desc ..." $at_traceon cat >count.sps <<'_ATEOF' DATA LIST LIST /x y. BEGIN DATA. 1 2 2 3 4 5 2 2 5 6 7 2 . 2 END DATA. MISSING VALUES x(7)/y(3). COUNT c=x y (2)/d=x y(7)/e=x y(missing)/f=x y(sysmis). FORMATS ALL(F1). LIST. _ATEOF { set +x $as_echo "$at_srcdir/count.at:40: pspp -O format=csv count.sps" at_fn_check_prepare_trace "count.at:40" ( $at_check_trace; pspp -O format=csv count.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,F8.0 Table: Data List x,y,c,d,e,f 1,2,1,0,0,0 2,3,1,0,1,0 4,5,0,0,0,0 2,2,2,0,0,0 5,6,0,0,0,0 7,2,1,1,1,0 .,2,1,0,1,1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/count.at:40" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_737 #AT_START_738 at_fn_group_banner 738 'count.at:58' \ "COUNT -- string data" " " 100 at_xfail=no ( $as_echo "738. $at_setup_line: testing $at_desc ..." $at_traceon cat >count.sps <<'_ATEOF' TITLE 'Test COUNT transformation'. DATA LIST /v1 to v2 1-4(a). BEGIN DATA. 1234 321 2 13 4121 1104 03 4 0193 END DATA. COUNT c=v1 to v2('2',' 4','1'). LIST. _ATEOF { set +x $as_echo "$at_srcdir/count.at:75: pspp -O format=csv count.sps" at_fn_check_prepare_trace "count.at:75" ( $at_check_trace; pspp -O format=csv count.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Title: Test COUNT transformation Table: Reading 1 record from INLINE. Variable,Record,Columns,Format v1,1,1- 2,A2 v2,1,3- 4,A2 Table: Data List v1,v2,c 12,34,.00 32,1 ,1.00 2 ,13,1.00 41,21,.00 11,04,.00 03,4,1.00 01,93,.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/count.at:75" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_738 #AT_START_739 at_fn_group_banner 739 'recode.at:37' \ "RECODE numeric to numeric, without INTO" " " 101 at_xfail=no ( $as_echo "739. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10). MISSING VALUES x(9)/s('xxx'). BEGIN DATA. 0, '', '' 1, a, a 2, ab, ab 3, abc, abc 4, abcd, abcd 5, 123, 123 6, ' 123', ' 123' 7, +1, +1 8, 1x, 1x 9, abcd, abcdefghi , xxx, abcdefghij END DATA. NUMERIC x0 TO x8 (F3). MISSING VALUES x0 to x8 (9). COMPUTE x0=value(x). RECODE x0 (1=9). COMPUTE x1=value(x). RECODE x1 (1=9)(3=8)(5=7). COMPUTE x2=value(x). RECODE x2 (1=8)(2,3,4,5,6,8=9)(9=1). COMPUTE x3=value(x). RECODE x3 (1 THRU 9=10)(MISSING=11). COMPUTE x4=value(x). RECODE x4 (MISSING=11)(1 THRU 9=10). COMPUTE x5=value(x). RECODE x5 (LOWEST THRU 5=1). COMPUTE x6=value(x). RECODE x6 (4 THRU HIGHEST=2). COMPUTE x7=value(x). RECODE x7 (LO THRU HI=3). COMPUTE x8=value(x). RECODE x8 (SYSMIS=4). LIST x x0 TO x8. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:62: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:62" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,x0,x1,x2,x3,x4,x5,x6,x7,x8 0,0,0,0,0,0,1,0,3,0 1,9,9,8,10,10,1,1,3,1 2,2,2,9,10,10,1,2,3,2 3,3,8,9,10,10,1,3,3,3 4,4,4,9,10,10,1,2,3,4 5,5,7,9,10,10,1,2,3,5 6,6,6,9,10,10,6,2,3,6 7,7,7,7,10,10,7,2,3,7 8,8,8,9,10,10,8,2,3,8 9,9,9,1,10,11,9,2,3,9 .,.,.,.,11,11,.,.,.,4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/recode.at:62" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_739 #AT_START_740 at_fn_group_banner 740 'recode.at:79' \ "RECODE numeric to numeric, with INTO, without COPY" "" 101 at_xfail=no ( $as_echo "740. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10). MISSING VALUES x(9)/s('xxx'). BEGIN DATA. 0, '', '' 1, a, a 2, ab, ab 3, abc, abc 4, abcd, abcd 5, 123, 123 6, ' 123', ' 123' 7, +1, +1 8, 1x, 1x 9, abcd, abcdefghi , xxx, abcdefghij END DATA. NUMERIC ix0 TO ix8 (F3). RECODE x (1=9) INTO ix0. RECODE x (1=9)(3=8)(5=7) INTO ix1. RECODE x (1=8)(2,3,4,5,6,8=9)(9=1) INTO ix2. RECODE x (1 THRU 9=10)(MISSING=11) INTO ix3. RECODE x (MISSING=11)(1 THRU 9=10) INTO ix4. RECODE x (LOWEST THRU 5=1) INTO ix5. RECODE x (4 THRU HIGHEST=2) INTO ix6. RECODE x (LO THRU HI=3) INTO ix7. RECODE x (SYSMIS=4) INTO ix8. LIST x ix0 TO ix8. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:94: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:94" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,ix0,ix1,ix2,ix3,ix4,ix5,ix6,ix7,ix8 0,.,.,.,.,.,1,.,3,. 1,9,9,8,10,10,1,.,3,. 2,.,.,9,10,10,1,.,3,. 3,.,8,9,10,10,1,.,3,. 4,.,.,9,10,10,1,2,3,. 5,.,7,9,10,10,1,2,3,. 6,.,.,9,10,10,.,2,3,. 7,.,.,.,10,10,.,2,3,. 8,.,.,9,10,10,.,2,3,. 9,.,.,1,10,11,.,2,3,. .,.,.,.,11,11,.,.,.,4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/recode.at:94" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_740 #AT_START_741 at_fn_group_banner 741 'recode.at:111' \ "RECODE numeric to numeric, with INTO, with COPY" "" 101 at_xfail=no ( $as_echo "741. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10). MISSING VALUES x(9)/s('xxx'). BEGIN DATA. 0, '', '' 1, a, a 2, ab, ab 3, abc, abc 4, abcd, abcd 5, 123, 123 6, ' 123', ' 123' 7, +1, +1 8, 1x, 1x 9, abcd, abcdefghi , xxx, abcdefghij END DATA. NUMERIC cx0 TO cx8 (F3). RECODE x (1=9)(ELSE=COPY) INTO cx0. RECODE x (1=9)(3=8)(5=7)(ELSE=COPY) INTO cx1. RECODE x (1=8)(2,3,4,5,6,8=9)(9=1)(ELSE=COPY) INTO cx2. RECODE x (1 THRU 9=10)(MISSING=11)(ELSE=COPY) INTO cx3. RECODE x (MISSING=11)(1 THRU 9=10)(ELSE=COPY) INTO cx4. RECODE x (LOWEST THRU 5=1)(ELSE=COPY) INTO cx5. RECODE x (4 THRU HIGHEST=2)(ELSE=COPY) INTO cx6. RECODE x (LO THRU HI=3)(ELSE=COPY) INTO cx7. RECODE x (SYSMIS=4)(ELSE=COPY) INTO cx8. RECODE x (5=COPY)(ELSE=22) INTO cx9. LIST x cx0 TO cx9. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:127: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:127" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,cx0,cx1,cx2,cx3,cx4,cx5,cx6,cx7,cx8,cx9 0,0,0,0,0,0,1,0,3,0,22.00 1,9,9,8,10,10,1,1,3,1,22.00 2,2,2,9,10,10,1,2,3,2,22.00 3,3,8,9,10,10,1,3,3,3,22.00 4,4,4,9,10,10,1,2,3,4,22.00 5,5,7,9,10,10,1,2,3,5,5.00 6,6,6,9,10,10,6,2,3,6,22.00 7,7,7,7,10,10,7,2,3,7,22.00 8,8,8,9,10,10,8,2,3,8,22.00 9,9,9,1,10,11,9,2,3,9,22.00 .,.,.,.,11,11,.,.,.,4,22.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/recode.at:127" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_741 #AT_START_742 at_fn_group_banner 742 'recode.at:144' \ "RECODE string to string, with INTO, without COPY" "" 101 at_xfail=no ( $as_echo "742. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10). MISSING VALUES x(9)/s('xxx'). BEGIN DATA. 0, '', '' 1, a, a 2, ab, ab 3, abc, abc 4, abcd, abcd 5, 123, 123 6, ' 123', ' 123' 7, +1, +1 8, 1x, 1x 9, abcd, abcdefghi , xxx, abcdefghij END DATA. STRING s0 TO s3 (A4)/t0 TO t3 (A10). RECODE s t ('a'='b')('ab'='bc') INTO s0 t0. RECODE s t ('abcd'='xyzw') INTO s1 t1. RECODE s t ('abc'='def')(ELSE='xyz') INTO s2 t2. RECODE t ('a'='b')('abcdefghi'='xyz')('abcdefghij'='jklmnopqr') INTO t3. RECODE s (MISSING='gone') INTO s3. LIST s t s0 TO s3 t0 TO t3. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:155: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:155" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List s,t,s0,s1,s2,s3,t0,t1,t2,t3 ,,,,xyz ,,,,xyz , a ,a ,b ,,xyz ,,b ,,xyz ,b ab ,ab ,bc ,,xyz ,,bc ,,xyz , abc ,abc ,,,def ,,,,def , abcd,abcd ,,xyzw,xyz ,,,xyzw ,xyz , 123 ,123 ,,,xyz ,,,,xyz , 123,123 ,,,xyz ,,,,xyz , +1 ,+1 ,,,xyz ,,,,xyz , 1x ,1x ,,,xyz ,,,,xyz , abcd,abcdefghi ,,xyzw,xyz ,,,,xyz ,xyz xxx ,abcdefghij,,,xyz ,gone,,,xyz ,jklmnopqr " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/recode.at:155" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_742 #AT_START_743 at_fn_group_banner 743 'recode.at:172' \ "RECODE string to string" " " 101 at_xfail=no ( $as_echo "743. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10). MISSING VALUES x(9)/s('xxx'). BEGIN DATA. 0, '', '' 1, a, a 2, ab, ab 3, abc, abc 4, abcd, abcd 5, 123, 123 6, ' 123', ' 123' 7, +1, +1 8, 1x, 1x 9, abcd, abcdefghi , xxx, abcdefghij END DATA. STRING cs0 TO cs2 (A4)/ct0 TO ct3 (A10). RECODE s t ('a'='b')('ab'='bc')(ELSE=COPY) INTO cs0 ct0. RECODE s t ('abcd'='xyzw')(ELSE=COPY) INTO cs1 ct1. RECODE s t ('abc'='def')(ELSE='xyz')(ELSE=COPY) INTO cs2 ct2. RECODE t ('a'='b')('abcdefghi'='xyz')('abcdefghij'='jklmnopqr')(ELSE=COPY) INTO ct3. LIST s t cs0 TO cs2 ct0 TO ct3. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:183: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:183" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List s,t,cs0,cs1,cs2,ct0,ct1,ct2,ct3 ,,,,xyz ,,,xyz , a ,a ,b ,a ,xyz ,b ,a ,xyz ,b ab ,ab ,bc ,ab ,xyz ,bc ,ab ,xyz ,ab abc ,abc ,abc ,abc ,def ,abc ,abc ,def ,abc abcd,abcd ,abcd,xyzw,xyz ,abcd ,xyzw ,xyz ,abcd 123 ,123 ,123 ,123 ,xyz ,123 ,123 ,xyz ,123 123,123 ,123,123,xyz ,123 ,123 ,xyz ,123 +1 ,+1 ,+1 ,+1 ,xyz ,+1 ,+1 ,xyz ,+1 1x ,1x ,1x ,1x ,xyz ,1x ,1x ,xyz ,1x abcd,abcdefghi ,abcd,xyzw,xyz ,abcdefghi ,abcdefghi ,xyz ,xyz xxx ,abcdefghij,xxx ,xxx ,xyz ,abcdefghij,abcdefghij,xyz ,jklmnopqr " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/recode.at:183" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_743 #AT_START_744 at_fn_group_banner 744 'recode.at:200' \ "RECODE string to numeric" " " 101 at_xfail=no ( $as_echo "744. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10). MISSING VALUES x(9)/s('xxx'). BEGIN DATA. 0, '', '' 1, a, a 2, ab, ab 3, abc, abc 4, abcd, abcd 5, 123, 123 6, ' 123', ' 123' 7, +1, +1 8, 1x, 1x 9, abcd, abcdefghi , xxx, abcdefghij END DATA. NUMERIC ns0 TO ns2 (F3)/nt0 TO nt2 (F3). RECODE s t (CONVERT)(' '=0)('abcd'=1) INTO ns0 nt0. RECODE s t (' '=0)(CONVERT)('abcd'=1) INTO ns1 nt1. RECODE s t ('1x'=1)('abcd'=2)(ELSE=3) INTO ns2 nt2. LIST s t ns0 TO ns2 nt0 TO nt2. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:209: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:209" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List s,t,ns0,ns1,ns2,nt0,nt1,nt2 ,,.,0,3,.,0,3 a ,a ,.,.,3,.,.,3 ab ,ab ,.,.,3,.,.,3 abc ,abc ,.,.,3,.,.,3 abcd,abcd ,1,1,2,1,1,2 123 ,123 ,123,123,3,123,123,3 123,123 ,123,123,3,123,123,3 +1 ,+1 ,1,1,3,1,1,3 1x ,1x ,.,.,1,.,.,1 abcd,abcdefghi ,1,1,2,.,.,3 xxx ,abcdefghij,.,.,3,.,.,3 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/recode.at:209" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_744 #AT_START_745 at_fn_group_banner 745 'recode.at:226' \ "RECODE numeric to string" " " 101 at_xfail=no ( $as_echo "745. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10). MISSING VALUES x(9)/s('xxx'). BEGIN DATA. 0, '', '' 1, a, a 2, ab, ab 3, abc, abc 4, abcd, abcd 5, 123, 123 6, ' 123', ' 123' 7, +1, +1 8, 1x, 1x 9, abcd, abcdefghi , xxx, abcdefghij END DATA. STRING sx0 TO sx2 (a10). RECODE x (1 THRU 9='abcdefghij') INTO sx0. RECODE x (0,1,3,5,7,MISSING='xxx') INTO sx1. RECODE x (2 THRU 6,SYSMIS='xyz')(ELSE='foobar') INTO sx2. LIST x sx0 TO sx2. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:235: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:235" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List x,sx0,sx1,sx2 0,,xxx ,foobar 1,abcdefghij,xxx ,foobar 2,abcdefghij,,xyz 3,abcdefghij,xxx ,xyz 4,abcdefghij,,xyz 5,abcdefghij,xxx ,xyz 6,abcdefghij,,xyz 7,abcdefghij,xxx ,foobar 8,abcdefghij,,foobar 9,abcdefghij,xxx ,foobar .,,xxx ,xyz " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/recode.at:235" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_745 #AT_START_746 at_fn_group_banner 746 'recode.at:252' \ "RECODE bug in COPY" " " 101 at_xfail=no ( $as_echo "746. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' DATA LIST LIST /A (A1) B (A1). BEGIN DATA 1 2 2 3 3 4 END DATA. ** Clearly, the else=copy is superfluous here RECODE A ("1"="3") ("3"="1") (ELSE=COPY). EXECUTE. LIST. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:269: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:269" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format A,A1 B,A1 Table: Data List A,B 3,2 2,3 1,4 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/recode.at:269" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_746 #AT_START_747 at_fn_group_banner 747 'recode.at:283' \ "RECODE bug in COPY with INTO" " " 101 at_xfail=no ( $as_echo "747. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' DATA LIST LIST /A (A1) B (A1). BEGIN DATA 1 2 2 3 3 4 END DATA. STRING A1 (A1). RECODE A ("1"="3") ("3"="1") (ELSE=COPY) INTO a1. EXECUTE. LIST. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:300: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:300" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format A,A1 B,A1 Table: Data List A,B,A1 1,2,3 2,3,2 3,4,1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/recode.at:300" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_747 #AT_START_748 at_fn_group_banner 748 'recode.at:316' \ "RECODE increased string widths" " " 101 at_xfail=no ( $as_echo "748. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' data list notable list /x (a1) y (a8) z *. begin data. a a 2 a two 2 b three 2 c b 2 end data. recode x y ("a" = "first") . list. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:332: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:332" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"error: Cannot recode because the variable x would require a width of 5 bytes or greater, but it has a width of only 1 bytes.\" Table: Data List x,y,z a,a ,2.00 a,two ,2.00 b,three ,2.00 c,b ,2.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/recode.at:332" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_748 #AT_START_749 at_fn_group_banner 749 'recode.at:347' \ "RECODE crash on invalid dest variable" " " 101 at_xfail=no ( $as_echo "749. $at_setup_line: testing $at_desc ..." $at_traceon cat >recode.sps <<'_ATEOF' DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10). MISSING VALUES x(9)/s('xxx'). BEGIN DATA. 0, '', '' 1, a, a 2, ab, ab 3, abc, abc END DATA. RECODE x (1=9) INTO ". EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/recode.at:363: pspp -O format=csv recode.sps" at_fn_check_prepare_trace "recode.at:363" ( $at_check_trace; pspp -O format=csv recode.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/recode.at:363" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_749 #AT_START_750 at_fn_group_banner 750 'sample.at:19' \ "SAMPLE" " " 102 at_xfail=no ( $as_echo "750. $at_setup_line: testing $at_desc ..." $at_traceon cat >sample.sps <<'_ATEOF' set seed=3 data list notable /A 1-2. begin data. 1 2 3 4 5 6 7 8 9 10 end data. sample .5. list. _ATEOF { set +x $as_echo "$at_srcdir/sample.at:39: pspp -o pspp.csv sample.sps" at_fn_check_prepare_trace "sample.at:39" ( $at_check_trace; pspp -o pspp.csv sample.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sample.at:39" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/sample.at:41: n=0 while read line; do n=\`expr \$n + 1\` case \$line in # ( \"Table: Data List\" | A | [0-9] | 10) ;; # ( *) echo \$line; exit 1; esac done < pspp.csv if test \$n -ge 11; then exit 1; fi " at_fn_check_prepare_notrace 'a `...` command substitution' "sample.at:41" ( $at_check_trace; n=0 while read line; do n=`expr $n + 1` case $line in # ( "Table: Data List" | A | [0-9] | 10) ;; # ( *) echo $line; exit 1; esac done < pspp.csv if test $n -ge 11; then exit 1; fi ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sample.at:41" $at_failed && at_fn_log_failure \ "pspp.csv" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_750 #AT_START_751 at_fn_group_banner 751 'select-if.at:19' \ "FILTER" " " 103 at_xfail=no ( $as_echo "751. $at_setup_line: testing $at_desc ..." $at_traceon cat >filter.sps <<'_ATEOF' data list notable /X 1-2. begin data. 1 2 3 4 5 6 7 8 9 10 end data. compute FILTER_$ = mod(x,2). filter by filter_$. list. filter off. list. compute filter_$ = 1 - filter_$. filter by filter_$. list. _ATEOF { set +x $as_echo "$at_srcdir/select-if.at:44: pspp -o pspp.csv filter.sps" at_fn_check_prepare_trace "select-if.at:44" ( $at_check_trace; pspp -o pspp.csv filter.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/select-if.at:44" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/select-if.at:45: cat pspp.csv" at_fn_check_prepare_trace "select-if.at:45" ( $at_check_trace; cat pspp.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Data List X,FILTER_\$ 1,1.00 3,1.00 5,1.00 7,1.00 9,1.00 Table: Data List X,FILTER_\$ 1,1.00 2,.00 3,1.00 4,.00 5,1.00 6,.00 7,1.00 8,.00 9,1.00 10,.00 Table: Data List X,FILTER_\$ 2,1.00 4,1.00 6,1.00 8,1.00 10,1.00 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/select-if.at:45" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_751 #AT_START_752 at_fn_group_banner 752 'abt.at:24' \ "ABT -- insert-any-remove-any" " " 104 at_xfail=no ( $as_echo "752. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/abt.at:24: abt-test insert-any-remove-any" at_fn_check_prepare_trace "abt.at:24" ( $at_check_trace; abt-test insert-any-remove-any ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/abt.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_752 #AT_START_753 at_fn_group_banner 753 'abt.at:25' \ "ABT -- insert-any-remove-same" " " 104 at_xfail=no ( $as_echo "753. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/abt.at:25: abt-test insert-any-remove-same" at_fn_check_prepare_trace "abt.at:25" ( $at_check_trace; abt-test insert-any-remove-same ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/abt.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_753 #AT_START_754 at_fn_group_banner 754 'abt.at:26' \ "ABT -- insert-any-remove-reverse" " " 104 at_xfail=no ( $as_echo "754. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/abt.at:26: abt-test insert-any-remove-reverse" at_fn_check_prepare_trace "abt.at:26" ( $at_check_trace; abt-test insert-any-remove-reverse ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/abt.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_754 #AT_START_755 at_fn_group_banner 755 'abt.at:27' \ "ABT -- random-sequence" " " 104 at_xfail=no ( $as_echo "755. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/abt.at:27: abt-test random-sequence" at_fn_check_prepare_trace "abt.at:27" ( $at_check_trace; abt-test random-sequence ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/abt.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_755 #AT_START_756 at_fn_group_banner 756 'abt.at:28' \ "ABT -- insert-ordered" " " 104 at_xfail=no ( $as_echo "756. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/abt.at:28: abt-test insert-ordered" at_fn_check_prepare_trace "abt.at:28" ( $at_check_trace; abt-test insert-ordered ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/abt.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_756 #AT_START_757 at_fn_group_banner 757 'abt.at:29' \ "ABT -- moved" " " 104 at_xfail=no ( $as_echo "757. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/abt.at:29: abt-test moved" at_fn_check_prepare_trace "abt.at:29" ( $at_check_trace; abt-test moved ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/abt.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_757 #AT_START_758 at_fn_group_banner 758 'abt.at:30' \ "ABT -- changed" " " 104 at_xfail=no ( $as_echo "758. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/abt.at:30: abt-test changed" at_fn_check_prepare_trace "abt.at:30" ( $at_check_trace; abt-test changed ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/abt.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_758 #AT_START_759 at_fn_group_banner 759 'bt.at:24' \ "BT -- insert-any-remove-any" " " 105 at_xfail=no ( $as_echo "759. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/bt.at:24: bt-test insert-any-remove-any" at_fn_check_prepare_trace "bt.at:24" ( $at_check_trace; bt-test insert-any-remove-any ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/bt.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_759 #AT_START_760 at_fn_group_banner 760 'bt.at:25' \ "BT -- insert-any-remove-same" " " 105 at_xfail=no ( $as_echo "760. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/bt.at:25: bt-test insert-any-remove-same" at_fn_check_prepare_trace "bt.at:25" ( $at_check_trace; bt-test insert-any-remove-same ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/bt.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_760 #AT_START_761 at_fn_group_banner 761 'bt.at:26' \ "BT -- insert-any-remove-reverse" " " 105 at_xfail=no ( $as_echo "761. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/bt.at:26: bt-test insert-any-remove-reverse" at_fn_check_prepare_trace "bt.at:26" ( $at_check_trace; bt-test insert-any-remove-reverse ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/bt.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_761 #AT_START_762 at_fn_group_banner 762 'bt.at:27' \ "BT -- random-sequence" " " 105 at_xfail=no ( $as_echo "762. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/bt.at:27: bt-test random-sequence" at_fn_check_prepare_trace "bt.at:27" ( $at_check_trace; bt-test random-sequence ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/bt.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_762 #AT_START_763 at_fn_group_banner 763 'bt.at:28' \ "BT -- insert-ordered" " " 105 at_xfail=no ( $as_echo "763. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/bt.at:28: bt-test insert-ordered" at_fn_check_prepare_trace "bt.at:28" ( $at_check_trace; bt-test insert-ordered ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/bt.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_763 #AT_START_764 at_fn_group_banner 764 'bt.at:29' \ "BT -- find-ge-le" " " 105 at_xfail=no ( $as_echo "764. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/bt.at:29: bt-test find-ge-le" at_fn_check_prepare_trace "bt.at:29" ( $at_check_trace; bt-test find-ge-le ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/bt.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_764 #AT_START_765 at_fn_group_banner 765 'bt.at:30' \ "BT -- moved" " " 105 at_xfail=no ( $as_echo "765. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/bt.at:30: bt-test moved" at_fn_check_prepare_trace "bt.at:30" ( $at_check_trace; bt-test moved ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/bt.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_765 #AT_START_766 at_fn_group_banner 766 'bt.at:31' \ "BT -- changed" " " 105 at_xfail=no ( $as_echo "766. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/bt.at:31: bt-test changed" at_fn_check_prepare_trace "bt.at:31" ( $at_check_trace; bt-test changed ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/bt.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_766 #AT_START_767 at_fn_group_banner 767 'encoding-guesser.at:19' \ "ASCII" " " 106 at_xfail=no ( $as_echo "767. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:21: echo string | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:21" ( $at_check_trace; echo string | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "ASCII " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:21" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_767 #AT_START_768 at_fn_group_banner 768 'encoding-guesser.at:25' \ "UTF-8" " " 106 at_xfail=no ( $as_echo "768. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:27: i18n-test supports_encodings ISO-8859-1" at_fn_check_prepare_trace "encoding-guesser.at:27" ( $at_check_trace; i18n-test supports_encodings ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:27" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encoding-guesser.at:28: printf '\\346\\227\\245\\346\\234\\254\\350\\252\\236\\n' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:28" ( $at_check_trace; printf '\346\227\245\346\234\254\350\252\236\n' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-8 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_768 #AT_START_769 at_fn_group_banner 769 'encoding-guesser.at:32' \ "UTF-8 starting with ASCII" " " 106 at_xfail=no ( $as_echo "769. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:34: i18n-test supports_encodings ISO-8859-1" at_fn_check_prepare_trace "encoding-guesser.at:34" ( $at_check_trace; i18n-test supports_encodings ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:34" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encoding-guesser.at:35: printf 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\346\\227\\245\\346\\234\\254\\350\\252\\236\\n' | encoding-guesser-test Auto,ISO-8859-1 32" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:35" ( $at_check_trace; printf 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\346\227\245\346\234\254\350\252\236\n' | encoding-guesser-test Auto,ISO-8859-1 32 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-8 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_769 #AT_START_770 at_fn_group_banner 770 'encoding-guesser.at:39' \ "UTF-16 with big-endian byte order mark" " " 106 at_xfail=no ( $as_echo "770. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:41: printf '\\376\\377' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:41" ( $at_check_trace; printf '\376\377' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-16 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:41" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_770 #AT_START_771 at_fn_group_banner 771 'encoding-guesser.at:46' \ "UTF-16 with little-endian byte order mark" " " 106 at_xfail=no ( $as_echo "771. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:48: printf '\\377\\376' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:48" ( $at_check_trace; printf '\377\376' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-16 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:48" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_771 #AT_START_772 at_fn_group_banner 772 'encoding-guesser.at:53' \ "UTF-16BE" " " 106 at_xfail=no ( $as_echo "772. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:55: printf '\\0e\\0n\\0t\\0r\\0\\351\\0e\\0\\n' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:55" ( $at_check_trace; printf '\0e\0n\0t\0r\0\351\0e\0\n' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-16BE " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:55" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_772 #AT_START_773 at_fn_group_banner 773 'encoding-guesser.at:62' \ "UTF-16BE starting with U+0100" " " 106 at_xfail=no ( $as_echo "773. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:64: printf '\\1\\0\\0e\\0n\\0t\\0r\\0\\351\\0e\\0\\n' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:64" ( $at_check_trace; printf '\1\0\0e\0n\0t\0r\0\351\0e\0\n' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-16BE " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:64" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_773 #AT_START_774 at_fn_group_banner 774 'encoding-guesser.at:69' \ "UTF-16LE" " " 106 at_xfail=no ( $as_echo "774. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:71: printf 'e\\0n\\0t\\0r\\0\\351\\0e\\0\\n\\0' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:71" ( $at_check_trace; printf 'e\0n\0t\0r\0\351\0e\0\n\0' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-16LE " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:71" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_774 #AT_START_775 at_fn_group_banner 775 'encoding-guesser.at:78' \ "UTF-16LE starting with U+0100" " " 106 at_xfail=no ( $as_echo "775. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:80: printf '\\0\\1e\\0n\\0t\\0r\\0\\351\\0e\\0\\n\\0' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:80" ( $at_check_trace; printf '\0\1e\0n\0t\0r\0\351\0e\0\n\0' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-16LE " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:80" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_775 #AT_START_776 at_fn_group_banner 776 'encoding-guesser.at:85' \ "UTF-32 with big-endian byte order mark" " " 106 at_xfail=no ( $as_echo "776. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:87: printf '\\0\\0\\376\\377' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:87" ( $at_check_trace; printf '\0\0\376\377' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-32 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:87" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_776 #AT_START_777 at_fn_group_banner 777 'encoding-guesser.at:92' \ "UTF-32 with little-endian byte order mark" " " 106 at_xfail=no ( $as_echo "777. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:94: printf '\\377\\376\\0\\0' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:94" ( $at_check_trace; printf '\377\376\0\0' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-32 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:94" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_777 #AT_START_778 at_fn_group_banner 778 'encoding-guesser.at:99' \ "UTF-32BE" " " 106 at_xfail=no ( $as_echo "778. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:101: printf '\\0\\0\\0e\\0\\0\\0n\\0\\0\\0t\\0\\0\\0r\\0\\0\\0\\351\\0\\0\\0e\\0\\0\\0\\n' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:101" ( $at_check_trace; printf '\0\0\0e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-32BE " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:101" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_778 #AT_START_779 at_fn_group_banner 779 'encoding-guesser.at:106' \ "UTF-32LE" " " 106 at_xfail=no ( $as_echo "779. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:108: printf 'e\\0\\0\\0n\\0\\0\\0t\\0\\0\\0r\\0\\0\\0\\351\\0\\0\\0e\\0\\0\\0\\n\\0\\0\\0' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:108" ( $at_check_trace; printf 'e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n\0\0\0' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-32LE " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:108" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_779 #AT_START_780 at_fn_group_banner 780 'encoding-guesser.at:113' \ "ISO-8859-1" " " 106 at_xfail=no ( $as_echo "780. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:115: i18n-test supports_encodings ISO-8859-1" at_fn_check_prepare_trace "encoding-guesser.at:115" ( $at_check_trace; i18n-test supports_encodings ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:115" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encoding-guesser.at:116: printf 'entr\\351e\\n' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:116" ( $at_check_trace; printf 'entr\351e\n' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "ISO-8859-1 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:116" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_780 #AT_START_781 at_fn_group_banner 781 'encoding-guesser.at:121' \ "GB-18030 with byte order mark" " " 106 at_xfail=no ( $as_echo "781. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:123: i18n-test supports_encodings ISO-8859-1" at_fn_check_prepare_trace "encoding-guesser.at:123" ( $at_check_trace; i18n-test supports_encodings ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:123" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encoding-guesser.at:124: printf '\\204\\061\\225\\063' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:124" ( $at_check_trace; printf '\204\061\225\063' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "GB-18030 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:124" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_781 #AT_START_782 at_fn_group_banner 782 'encoding-guesser.at:129' \ "UTF-EBCDIC with byte order mark" " " 106 at_xfail=no ( $as_echo "782. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:131: i18n-test supports_encodings ISO-8859-1" at_fn_check_prepare_trace "encoding-guesser.at:131" ( $at_check_trace; i18n-test supports_encodings ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:131" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encoding-guesser.at:132: printf '\\335\\163\\146\\163' | encoding-guesser-test Auto,ISO-8859-1" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:132" ( $at_check_trace; printf '\335\163\146\163' | encoding-guesser-test Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-EBCDIC " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:132" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_782 #AT_START_783 at_fn_group_banner 783 'encoding-guesser.at:137' \ "EUC-JP as Auto,EUC-JP" " " 106 at_xfail=no ( $as_echo "783. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:139: i18n-test supports_encodings EUC-JP" at_fn_check_prepare_trace "encoding-guesser.at:139" ( $at_check_trace; i18n-test supports_encodings EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:139" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encoding-guesser.at:140: printf '\\244\\241 \\244\\242 \\244\\243 \\244\\244 \\244\\245 \\244\\246 \\244\\247 \\244\\250 \\244\\251 \\244\\252\\n' | encoding-guesser-test Auto,EUC-JP" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:140" ( $at_check_trace; printf '\244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 \244\250 \244\251 \244\252\n' | encoding-guesser-test Auto,EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "EUC-JP " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:140" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_783 #AT_START_784 at_fn_group_banner 784 'encoding-guesser.at:145' \ "EUC-JP starting with ASCII as Auto,EUC-JP" " " 106 at_xfail=no ( $as_echo "784. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:147: i18n-test supports_encodings EUC-JP" at_fn_check_prepare_trace "encoding-guesser.at:147" ( $at_check_trace; i18n-test supports_encodings EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:147" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encoding-guesser.at:148: printf 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \\244\\241 \\244\\242 \\244\\243 \\244\\244 \\244\\245 \\244\\246 \\244\\247 \\244\\250 \\244\\251 \\244\\252\\n' | encoding-guesser-test Auto,EUC-JP 32" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:148" ( $at_check_trace; printf 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 \244\250 \244\251 \244\252\n' | encoding-guesser-test Auto,EUC-JP 32 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "EUC-JP " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:148" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_784 #AT_START_785 at_fn_group_banner 785 'encoding-guesser.at:153' \ "UTF-8 with character split across input buffers" "" 106 at_xfail=no ( $as_echo "785. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:155: i18n-test supports_encodings ISO-8859-1" at_fn_check_prepare_trace "encoding-guesser.at:155" ( $at_check_trace; i18n-test supports_encodings ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:155" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encoding-guesser.at:156: printf '\\343\\201\\201\\343\\201\\202\\343\\201\\203\\343\\201\\204\\343\\201\\205\\343\\201\\206\\343\\201\\207\\343\\201\\210\\343\\201\\211\\343\\201\\212\\343\\201\\201\\343\\201\\202\\343\\201\\203\\343\\201\\204\\343\\201\\205\\343\\201\\206\\343\\201\\207\\343\\201\\210\\343\\201\\211\\343\\201\\212\\n' | encoding-guesser-test Auto,ISO-8859-1 32" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:156" ( $at_check_trace; printf '\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\n' | encoding-guesser-test Auto,ISO-8859-1 32 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-8 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:156" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_785 #AT_START_786 at_fn_group_banner 786 'encoding-guesser.at:161' \ "windows-1252 as Auto,UTF-8" " " 106 at_xfail=no ( $as_echo "786. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/encoding-guesser.at:163: i18n-test supports_encodings windows-1252" at_fn_check_prepare_trace "encoding-guesser.at:163" ( $at_check_trace; i18n-test supports_encodings windows-1252 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:163" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/encoding-guesser.at:164: printf 'entr\\351e' | encoding-guesser-test Auto,UTF-8 32" at_fn_check_prepare_notrace 'a shell pipeline' "encoding-guesser.at:164" ( $at_check_trace; printf 'entr\351e' | encoding-guesser-test Auto,UTF-8 32 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "windows-1252 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/encoding-guesser.at:164" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_786 #AT_START_787 at_fn_group_banner 787 'float-format.at:19' \ "floating point format conversions" " " 107 at_xfail=no ( $as_echo "787. $at_setup_line: testing $at_desc ..." $at_traceon cat >float-format.txt <<'_ATEOF' # Each of the tests below checks that conversion between # floating-point formats works correctly. Comparisons that use == # require that conversion from any format on the line to any other # format on the line work losslessly. Comparisons that use => only # check that conversions work losslessly in the given direction. # Key to format names: # isl: IEEE single-precision, little endian # isb: IEEE single-precision, big endian # idl: IEEE double-precision, little endian # idb: IEEE double-precision, big endian # vf: VAX F # vd: VAX D # vg: VAX G # zs: Z architecture short # zl: Z architecture long # x: hexadecimal digits # IEEE special values. 0 == isb('00000000') x('Infinity') == isb('7f800000') x('-Infinity') == isb('ff800000') x('NaN:') => isb('7f800001') # NaN requires nonzero fraction. x('NaN:e000000000000000') == isb('7ff00000') == idb('7ffe000000000000') x('NaN:5a5a5e0000000000') == isb('7fad2d2f') == idb('7ff5a5a5e0000000') x('NaN:975612abcdef4000') == idb('7ff975612abcdef4') x('-NaN:e000000000000000') == isb('fff00000') == idb('fffe000000000000') x('-NaN:5a5a5e0000000000') == isb('ffad2d2f') == idb('fff5a5a5e0000000') x('-NaN:975612abcdef4000') == idb('fff975612abcdef4') # PSPP special values. x('Missing') == isb('ff7fffff') == idb('ffefffffffffffff') == isl('ffff7fff') == idl('ffffffffffffefff') == vf('ffffffff') == vd('ffffffffffffffff') == vg('ffffffffffffffff') == zs('ffffffff') == zl('ffffffffffffffff') x('Lowest') == isb('ff7ffffe') == idb('ffeffffffffffffe') == isl('feff7fff') == idl('feffffffffffefff') == vf('fffffeff') == vd('fffffeffffffffff') == vg('fffffeffffffffff') == zs('fffffffe') == zl('fffffffffffffffe') x('Highest') == isb('7f7fffff') == idb('7fefffffffffffff') == isl('ffff7f7f') == idl('ffffffffffffef7f') == vf('ff7fffff') == vd('ffffffffff7fffff') == vg('ffffffffff7fffff') == zs('7fffffff') == zl('7fffffffffffffff') # From Wikipedia. 0.15625 == isb('3e200000') -118.625 == isb('c2ed4000') # http://www.psc.edu/general/software/packages/ieee/ieee.html x('NaN:0400000000000000') == isb('7f820000') x('-NaN:2225540000000000') == isb('ff9112aa') 2 == isb('40000000') 6.5 == isb('40d00000') -6.5 == isb('c0d00000') x('.4p-124') == isb('00800000') x('.2p-124') == isb('00400000') # Using converter at http://babbage.cs.qc.edu/IEEE-754/Decimal.html # plus Emacs 'calc' to convert decimal to hexadecimal x('.7b74bc6a7ef9db23p8') => isb('42f6e979') # 123.456 x('.7b74bc6a7ef9db23p8') => idb('405edd2f1a9fbe77') x('.817427d2d4642004p-12') => isb('39017428') # .0001234567 x('.817427d2d4642004p-12') => idb('3f202e84fa5a8c84') x('.446c3b15f9926688p168') => isb('7f800000') # 1e50; overflow x('.446c3b15f9926688p168') => idb('4a511b0ec57e649a') # From multiple editions of the z/Architecture Principles of Operation # manual. 1.0 == zs('41100000') == isb('3f800000') 0.5 == zs('40800000') == isb('3f000000') x('.4p-4') == zs('3f400000') == isb('3c800000') 0 == zs('00000000') == isb('00000000') zs('80000000') == isb('80000000') -15 == zs('c1f00000') == isb('c1700000') # x('.ffffffp252') == zs('7fffffff') x('.3b4p8') == zs('423b4000') x('.1p-256') == zs('00100000') x('.4p-124') == zs('21400000') == isb('00800000') x('.8p-148') == zs('1b800000') == isb('00000001') # x('.ffffffp128') == zs('60ffffff') == isb('7f7fffff') x('.1p-256') == zs('00100000') x('.1p-256') => isb('00000000') # Underflow to zero. x('.ffffffp248') == zs('7effffff') x('.ffffffp248') => isb('7f800000') # Overflow to +Infinity. x('.4p-1020') => zl('0000000000000000') # Underflow to zero. x('.4p-1020') == idb('0010000000000000') x('.4p-1072') => zl('0000000000000000') # Underflow to zero. x('.4p-1072') => idb('0000000000000001') x('.fffffffffffff8p1024') => zl('7fffffffffffffff') # Overflow to maxval. x('.fffffffffffff8p1024') => idb('7fefffffffffffff') x('.1p-256') == zl('0010000000000000') == idb('2fb0000000000000') x('.ffffffffffffffp248') == zl('7effffffffffffff') x('.ffffffffffffffp248') => idb('4f70000000000000') # Loses precision. _ATEOF { set +x $as_echo "$at_srcdir/float-format.at:107: sed 's/#.*// s/^ *// s/ *\$// /^\$/d s/^\\(..*\\)\$/DEBUG FLOAT FORMAT \\1./' < float-format.txt > float-format.sps" at_fn_check_prepare_notrace 'an embedded newline' "float-format.at:107" ( $at_check_trace; sed 's/#.*// s/^ *// s/ *$// /^$/d s/^\(..*\)$/DEBUG FLOAT FORMAT \1./' < float-format.txt > float-format.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/float-format.at:107" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/float-format.at:113: pspp --testing-mode -O format=csv float-format.sps" at_fn_check_prepare_trace "float-format.at:113" ( $at_check_trace; pspp --testing-mode -O format=csv float-format.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/float-format.at:113" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_787 #AT_START_788 at_fn_group_banner 788 'heap.at:24' \ "heap -- insert-no-dups-delete-min" " " 108 at_xfail=no ( $as_echo "788. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/heap.at:24: heap-test insert-no-dups-delete-min" at_fn_check_prepare_trace "heap.at:24" ( $at_check_trace; heap-test insert-no-dups-delete-min ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/heap.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_788 #AT_START_789 at_fn_group_banner 789 'heap.at:25' \ "heap -- insert-with-dups-delete-min" " " 108 at_xfail=no ( $as_echo "789. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/heap.at:25: heap-test insert-with-dups-delete-min" at_fn_check_prepare_trace "heap.at:25" ( $at_check_trace; heap-test insert-with-dups-delete-min ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/heap.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_789 #AT_START_790 at_fn_group_banner 790 'heap.at:26' \ "heap -- insert-no-dups-delete-random" " " 108 at_xfail=no ( $as_echo "790. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/heap.at:26: heap-test insert-no-dups-delete-random" at_fn_check_prepare_trace "heap.at:26" ( $at_check_trace; heap-test insert-no-dups-delete-random ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/heap.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_790 #AT_START_791 at_fn_group_banner 791 'heap.at:27' \ "heap -- inc-dec" " " 108 at_xfail=no ( $as_echo "791. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/heap.at:27: heap-test inc-dec" at_fn_check_prepare_trace "heap.at:27" ( $at_check_trace; heap-test inc-dec ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/heap.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_791 #AT_START_792 at_fn_group_banner 792 'heap.at:28' \ "heap -- random-insert-delete" " " 108 at_xfail=no ( $as_echo "792. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/heap.at:28: heap-test random-insert-delete" at_fn_check_prepare_trace "heap.at:28" ( $at_check_trace; heap-test random-insert-delete ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/heap.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_792 #AT_START_793 at_fn_group_banner 793 'hmap.at:24' \ "hmap -- insert-any-remove-any-random-hash" " " 109 at_xfail=no ( $as_echo "793. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:24: hmap-test insert-any-remove-any-random-hash" at_fn_check_prepare_trace "hmap.at:24" ( $at_check_trace; hmap-test insert-any-remove-any-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_793 #AT_START_794 at_fn_group_banner 794 'hmap.at:25' \ "hmap -- insert-any-remove-any-identity-hash" " " 109 at_xfail=no ( $as_echo "794. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:25: hmap-test insert-any-remove-any-identity-hash" at_fn_check_prepare_trace "hmap.at:25" ( $at_check_trace; hmap-test insert-any-remove-any-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_794 #AT_START_795 at_fn_group_banner 795 'hmap.at:26' \ "hmap -- insert-any-remove-any-constant-hash" " " 109 at_xfail=no ( $as_echo "795. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:26: hmap-test insert-any-remove-any-constant-hash" at_fn_check_prepare_trace "hmap.at:26" ( $at_check_trace; hmap-test insert-any-remove-any-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_795 #AT_START_796 at_fn_group_banner 796 'hmap.at:27' \ "hmap -- insert-any-remove-same-random-hash" " " 109 at_xfail=no ( $as_echo "796. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:27: hmap-test insert-any-remove-same-random-hash" at_fn_check_prepare_trace "hmap.at:27" ( $at_check_trace; hmap-test insert-any-remove-same-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_796 #AT_START_797 at_fn_group_banner 797 'hmap.at:28' \ "hmap -- insert-any-remove-same-identity-hash" " " 109 at_xfail=no ( $as_echo "797. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:28: hmap-test insert-any-remove-same-identity-hash" at_fn_check_prepare_trace "hmap.at:28" ( $at_check_trace; hmap-test insert-any-remove-same-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_797 #AT_START_798 at_fn_group_banner 798 'hmap.at:29' \ "hmap -- insert-any-remove-same-constant-hash" " " 109 at_xfail=no ( $as_echo "798. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:29: hmap-test insert-any-remove-same-constant-hash" at_fn_check_prepare_trace "hmap.at:29" ( $at_check_trace; hmap-test insert-any-remove-same-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_798 #AT_START_799 at_fn_group_banner 799 'hmap.at:30' \ "hmap -- insert-any-remove-reverse-random-hash" " " 109 at_xfail=no ( $as_echo "799. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:30: hmap-test insert-any-remove-reverse-random-hash" at_fn_check_prepare_trace "hmap.at:30" ( $at_check_trace; hmap-test insert-any-remove-reverse-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_799 #AT_START_800 at_fn_group_banner 800 'hmap.at:31' \ "hmap -- insert-any-remove-reverse-identity-hash" "" 109 at_xfail=no ( $as_echo "800. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:31: hmap-test insert-any-remove-reverse-identity-hash" at_fn_check_prepare_trace "hmap.at:31" ( $at_check_trace; hmap-test insert-any-remove-reverse-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_800 #AT_START_801 at_fn_group_banner 801 'hmap.at:32' \ "hmap -- insert-any-remove-reverse-constant-hash" "" 109 at_xfail=no ( $as_echo "801. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:32: hmap-test insert-any-remove-reverse-constant-hash" at_fn_check_prepare_trace "hmap.at:32" ( $at_check_trace; hmap-test insert-any-remove-reverse-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_801 #AT_START_802 at_fn_group_banner 802 'hmap.at:33' \ "hmap -- random-sequence-random-hash" " " 109 at_xfail=no ( $as_echo "802. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:33: hmap-test random-sequence-random-hash" at_fn_check_prepare_trace "hmap.at:33" ( $at_check_trace; hmap-test random-sequence-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:33" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_802 #AT_START_803 at_fn_group_banner 803 'hmap.at:34' \ "hmap -- random-sequence-identity-hash" " " 109 at_xfail=no ( $as_echo "803. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:34: hmap-test random-sequence-identity-hash" at_fn_check_prepare_trace "hmap.at:34" ( $at_check_trace; hmap-test random-sequence-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_803 #AT_START_804 at_fn_group_banner 804 'hmap.at:35' \ "hmap -- random-sequence-constant-hash" " " 109 at_xfail=no ( $as_echo "804. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:35: hmap-test random-sequence-constant-hash" at_fn_check_prepare_trace "hmap.at:35" ( $at_check_trace; hmap-test random-sequence-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_804 #AT_START_805 at_fn_group_banner 805 'hmap.at:36' \ "hmap -- insert-ordered-random-hash" " " 109 at_xfail=no ( $as_echo "805. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:36: hmap-test insert-ordered-random-hash" at_fn_check_prepare_trace "hmap.at:36" ( $at_check_trace; hmap-test insert-ordered-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_805 #AT_START_806 at_fn_group_banner 806 'hmap.at:37' \ "hmap -- insert-ordered-identity-hash" " " 109 at_xfail=no ( $as_echo "806. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:37: hmap-test insert-ordered-identity-hash" at_fn_check_prepare_trace "hmap.at:37" ( $at_check_trace; hmap-test insert-ordered-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_806 #AT_START_807 at_fn_group_banner 807 'hmap.at:38' \ "hmap -- insert-ordered-constant-hash" " " 109 at_xfail=no ( $as_echo "807. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:38: hmap-test insert-ordered-constant-hash" at_fn_check_prepare_trace "hmap.at:38" ( $at_check_trace; hmap-test insert-ordered-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:38" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_807 #AT_START_808 at_fn_group_banner 808 'hmap.at:39' \ "hmap -- moved-random-hash" " " 109 at_xfail=no ( $as_echo "808. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:39: hmap-test moved-random-hash" at_fn_check_prepare_trace "hmap.at:39" ( $at_check_trace; hmap-test moved-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_808 #AT_START_809 at_fn_group_banner 809 'hmap.at:40' \ "hmap -- moved-identity-hash" " " 109 at_xfail=no ( $as_echo "809. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:40: hmap-test moved-identity-hash" at_fn_check_prepare_trace "hmap.at:40" ( $at_check_trace; hmap-test moved-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:40" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_809 #AT_START_810 at_fn_group_banner 810 'hmap.at:41' \ "hmap -- moved-constant-hash" " " 109 at_xfail=no ( $as_echo "810. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:41: hmap-test moved-constant-hash" at_fn_check_prepare_trace "hmap.at:41" ( $at_check_trace; hmap-test moved-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:41" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_810 #AT_START_811 at_fn_group_banner 811 'hmap.at:42' \ "hmap -- changed-random-hash" " " 109 at_xfail=no ( $as_echo "811. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:42: hmap-test changed-random-hash" at_fn_check_prepare_trace "hmap.at:42" ( $at_check_trace; hmap-test changed-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:42" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_811 #AT_START_812 at_fn_group_banner 812 'hmap.at:43' \ "hmap -- changed-identity-hash" " " 109 at_xfail=no ( $as_echo "812. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:43: hmap-test changed-identity-hash" at_fn_check_prepare_trace "hmap.at:43" ( $at_check_trace; hmap-test changed-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:43" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_812 #AT_START_813 at_fn_group_banner 813 'hmap.at:44' \ "hmap -- changed-constant-hash" " " 109 at_xfail=no ( $as_echo "813. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:44: hmap-test changed-constant-hash" at_fn_check_prepare_trace "hmap.at:44" ( $at_check_trace; hmap-test changed-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:44" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_813 #AT_START_814 at_fn_group_banner 814 'hmap.at:45' \ "hmap -- swap-random-hash" " " 109 at_xfail=no ( $as_echo "814. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:45: hmap-test swap-random-hash" at_fn_check_prepare_trace "hmap.at:45" ( $at_check_trace; hmap-test swap-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:45" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_814 #AT_START_815 at_fn_group_banner 815 'hmap.at:46' \ "hmap -- clear" " " 109 at_xfail=no ( $as_echo "815. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:46: hmap-test clear" at_fn_check_prepare_trace "hmap.at:46" ( $at_check_trace; hmap-test clear ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:46" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_815 #AT_START_816 at_fn_group_banner 816 'hmap.at:47' \ "hmap -- destroy-null" " " 109 at_xfail=no ( $as_echo "816. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:47: hmap-test destroy-null" at_fn_check_prepare_trace "hmap.at:47" ( $at_check_trace; hmap-test destroy-null ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:47" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_816 #AT_START_817 at_fn_group_banner 817 'hmap.at:48' \ "hmap -- shrink-empty" " " 109 at_xfail=no ( $as_echo "817. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmap.at:48: hmap-test shrink-empty" at_fn_check_prepare_trace "hmap.at:48" ( $at_check_trace; hmap-test shrink-empty ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmap.at:48" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_817 #AT_START_818 at_fn_group_banner 818 'hmapx.at:24' \ "hmapx -- insert-any-remove-any-random-hash" " " 110 at_xfail=no ( $as_echo "818. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:24: hmapx-test insert-any-remove-any-random-hash" at_fn_check_prepare_trace "hmapx.at:24" ( $at_check_trace; hmapx-test insert-any-remove-any-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_818 #AT_START_819 at_fn_group_banner 819 'hmapx.at:25' \ "hmapx -- insert-any-remove-any-identity-hash" " " 110 at_xfail=no ( $as_echo "819. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:25: hmapx-test insert-any-remove-any-identity-hash" at_fn_check_prepare_trace "hmapx.at:25" ( $at_check_trace; hmapx-test insert-any-remove-any-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_819 #AT_START_820 at_fn_group_banner 820 'hmapx.at:26' \ "hmapx -- insert-any-remove-any-constant-hash" " " 110 at_xfail=no ( $as_echo "820. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:26: hmapx-test insert-any-remove-any-constant-hash" at_fn_check_prepare_trace "hmapx.at:26" ( $at_check_trace; hmapx-test insert-any-remove-any-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_820 #AT_START_821 at_fn_group_banner 821 'hmapx.at:27' \ "hmapx -- insert-any-remove-same-random-hash" " " 110 at_xfail=no ( $as_echo "821. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:27: hmapx-test insert-any-remove-same-random-hash" at_fn_check_prepare_trace "hmapx.at:27" ( $at_check_trace; hmapx-test insert-any-remove-same-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_821 #AT_START_822 at_fn_group_banner 822 'hmapx.at:28' \ "hmapx -- insert-any-remove-same-identity-hash" " " 110 at_xfail=no ( $as_echo "822. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:28: hmapx-test insert-any-remove-same-identity-hash" at_fn_check_prepare_trace "hmapx.at:28" ( $at_check_trace; hmapx-test insert-any-remove-same-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_822 #AT_START_823 at_fn_group_banner 823 'hmapx.at:29' \ "hmapx -- insert-any-remove-same-constant-hash" " " 110 at_xfail=no ( $as_echo "823. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:29: hmapx-test insert-any-remove-same-constant-hash" at_fn_check_prepare_trace "hmapx.at:29" ( $at_check_trace; hmapx-test insert-any-remove-same-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_823 #AT_START_824 at_fn_group_banner 824 'hmapx.at:30' \ "hmapx -- insert-any-remove-reverse-random-hash" " " 110 at_xfail=no ( $as_echo "824. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:30: hmapx-test insert-any-remove-reverse-random-hash" at_fn_check_prepare_trace "hmapx.at:30" ( $at_check_trace; hmapx-test insert-any-remove-reverse-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_824 #AT_START_825 at_fn_group_banner 825 'hmapx.at:31' \ "hmapx -- insert-any-remove-reverse-identity-hash" "" 110 at_xfail=no ( $as_echo "825. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:31: hmapx-test insert-any-remove-reverse-identity-hash" at_fn_check_prepare_trace "hmapx.at:31" ( $at_check_trace; hmapx-test insert-any-remove-reverse-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_825 #AT_START_826 at_fn_group_banner 826 'hmapx.at:32' \ "hmapx -- insert-any-remove-reverse-constant-hash" "" 110 at_xfail=no ( $as_echo "826. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:32: hmapx-test insert-any-remove-reverse-constant-hash" at_fn_check_prepare_trace "hmapx.at:32" ( $at_check_trace; hmapx-test insert-any-remove-reverse-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_826 #AT_START_827 at_fn_group_banner 827 'hmapx.at:33' \ "hmapx -- random-sequence-random-hash" " " 110 at_xfail=no ( $as_echo "827. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:33: hmapx-test random-sequence-random-hash" at_fn_check_prepare_trace "hmapx.at:33" ( $at_check_trace; hmapx-test random-sequence-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:33" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_827 #AT_START_828 at_fn_group_banner 828 'hmapx.at:34' \ "hmapx -- random-sequence-identity-hash" " " 110 at_xfail=no ( $as_echo "828. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:34: hmapx-test random-sequence-identity-hash" at_fn_check_prepare_trace "hmapx.at:34" ( $at_check_trace; hmapx-test random-sequence-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_828 #AT_START_829 at_fn_group_banner 829 'hmapx.at:35' \ "hmapx -- random-sequence-constant-hash" " " 110 at_xfail=no ( $as_echo "829. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:35: hmapx-test random-sequence-constant-hash" at_fn_check_prepare_trace "hmapx.at:35" ( $at_check_trace; hmapx-test random-sequence-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_829 #AT_START_830 at_fn_group_banner 830 'hmapx.at:36' \ "hmapx -- insert-ordered-random-hash" " " 110 at_xfail=no ( $as_echo "830. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:36: hmapx-test insert-ordered-random-hash" at_fn_check_prepare_trace "hmapx.at:36" ( $at_check_trace; hmapx-test insert-ordered-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_830 #AT_START_831 at_fn_group_banner 831 'hmapx.at:37' \ "hmapx -- insert-ordered-identity-hash" " " 110 at_xfail=no ( $as_echo "831. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:37: hmapx-test insert-ordered-identity-hash" at_fn_check_prepare_trace "hmapx.at:37" ( $at_check_trace; hmapx-test insert-ordered-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_831 #AT_START_832 at_fn_group_banner 832 'hmapx.at:38' \ "hmapx -- insert-ordered-constant-hash" " " 110 at_xfail=no ( $as_echo "832. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:38: hmapx-test insert-ordered-constant-hash" at_fn_check_prepare_trace "hmapx.at:38" ( $at_check_trace; hmapx-test insert-ordered-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:38" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_832 #AT_START_833 at_fn_group_banner 833 'hmapx.at:39' \ "hmapx -- moved-random-hash" " " 110 at_xfail=no ( $as_echo "833. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:39: hmapx-test moved-random-hash" at_fn_check_prepare_trace "hmapx.at:39" ( $at_check_trace; hmapx-test moved-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_833 #AT_START_834 at_fn_group_banner 834 'hmapx.at:40' \ "hmapx -- moved-identity-hash" " " 110 at_xfail=no ( $as_echo "834. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:40: hmapx-test moved-identity-hash" at_fn_check_prepare_trace "hmapx.at:40" ( $at_check_trace; hmapx-test moved-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:40" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_834 #AT_START_835 at_fn_group_banner 835 'hmapx.at:41' \ "hmapx -- moved-constant-hash" " " 110 at_xfail=no ( $as_echo "835. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:41: hmapx-test moved-constant-hash" at_fn_check_prepare_trace "hmapx.at:41" ( $at_check_trace; hmapx-test moved-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:41" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_835 #AT_START_836 at_fn_group_banner 836 'hmapx.at:42' \ "hmapx -- changed-random-hash" " " 110 at_xfail=no ( $as_echo "836. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:42: hmapx-test changed-random-hash" at_fn_check_prepare_trace "hmapx.at:42" ( $at_check_trace; hmapx-test changed-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:42" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_836 #AT_START_837 at_fn_group_banner 837 'hmapx.at:43' \ "hmapx -- changed-identity-hash" " " 110 at_xfail=no ( $as_echo "837. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:43: hmapx-test changed-identity-hash" at_fn_check_prepare_trace "hmapx.at:43" ( $at_check_trace; hmapx-test changed-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:43" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_837 #AT_START_838 at_fn_group_banner 838 'hmapx.at:44' \ "hmapx -- changed-constant-hash" " " 110 at_xfail=no ( $as_echo "838. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:44: hmapx-test changed-constant-hash" at_fn_check_prepare_trace "hmapx.at:44" ( $at_check_trace; hmapx-test changed-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:44" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_838 #AT_START_839 at_fn_group_banner 839 'hmapx.at:45' \ "hmapx -- change-random-hash" " " 110 at_xfail=no ( $as_echo "839. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:45: hmapx-test change-random-hash" at_fn_check_prepare_trace "hmapx.at:45" ( $at_check_trace; hmapx-test change-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:45" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_839 #AT_START_840 at_fn_group_banner 840 'hmapx.at:46' \ "hmapx -- change-identity-hash" " " 110 at_xfail=no ( $as_echo "840. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:46: hmapx-test change-identity-hash" at_fn_check_prepare_trace "hmapx.at:46" ( $at_check_trace; hmapx-test change-identity-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:46" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_840 #AT_START_841 at_fn_group_banner 841 'hmapx.at:47' \ "hmapx -- change-constant-hash" " " 110 at_xfail=no ( $as_echo "841. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:47: hmapx-test change-constant-hash" at_fn_check_prepare_trace "hmapx.at:47" ( $at_check_trace; hmapx-test change-constant-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:47" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_841 #AT_START_842 at_fn_group_banner 842 'hmapx.at:48' \ "hmapx -- swap-random-hash" " " 110 at_xfail=no ( $as_echo "842. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:48: hmapx-test swap-random-hash" at_fn_check_prepare_trace "hmapx.at:48" ( $at_check_trace; hmapx-test swap-random-hash ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:48" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_842 #AT_START_843 at_fn_group_banner 843 'hmapx.at:49' \ "hmapx -- clear" " " 110 at_xfail=no ( $as_echo "843. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:49: hmapx-test clear" at_fn_check_prepare_trace "hmapx.at:49" ( $at_check_trace; hmapx-test clear ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:49" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_843 #AT_START_844 at_fn_group_banner 844 'hmapx.at:50' \ "hmapx -- destroy-null" " " 110 at_xfail=no ( $as_echo "844. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:50: hmapx-test destroy-null" at_fn_check_prepare_trace "hmapx.at:50" ( $at_check_trace; hmapx-test destroy-null ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:50" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_844 #AT_START_845 at_fn_group_banner 845 'hmapx.at:51' \ "hmapx -- shrink-empty" " " 110 at_xfail=no ( $as_echo "845. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/hmapx.at:51: hmapx-test shrink-empty" at_fn_check_prepare_trace "hmapx.at:51" ( $at_check_trace; hmapx-test shrink-empty ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/hmapx.at:51" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_845 #AT_START_846 at_fn_group_banner 846 'i18n.at:36' \ "convert reflexively" " " 111 at_xfail=no ( $as_echo "846. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:36: i18n-test supports_encodings 'ASCII' 'ASCII'" at_fn_check_prepare_trace "i18n.at:36" ( $at_check_trace; i18n-test supports_encodings 'ASCII' 'ASCII' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:36" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:36: i18n-test recode 'ASCII' 'ASCII' \`printf 'abc'\`" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:36" ( $at_check_trace; i18n-test recode 'ASCII' 'ASCII' `printf 'abc'` ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'abc'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_846 #AT_START_847 at_fn_group_banner 847 'i18n.at:37' \ "convert without any change" " " 111 at_xfail=no ( $as_echo "847. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:37: i18n-test supports_encodings 'ASCII' 'UTF-8'" at_fn_check_prepare_trace "i18n.at:37" ( $at_check_trace; i18n-test supports_encodings 'ASCII' 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:37" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:37: i18n-test recode 'ASCII' 'UTF-8' \`printf 'abc'\`" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:37" ( $at_check_trace; i18n-test recode 'ASCII' 'UTF-8' `printf 'abc'` ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'abc'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_847 #AT_START_848 at_fn_group_banner 848 'i18n.at:39' \ "convert from ISO-8859-1 to UTF-8" " " 111 at_xfail=no ( $as_echo "848. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:39: i18n-test supports_encodings 'ISO-8859-1' 'UTF-8'" at_fn_check_prepare_trace "i18n.at:39" ( $at_check_trace; i18n-test supports_encodings 'ISO-8859-1' 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:39" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:39: i18n-test recode 'ISO-8859-1' 'UTF-8' \`printf '\\242'\`" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:39" ( $at_check_trace; i18n-test recode 'ISO-8859-1' 'UTF-8' `printf '\242'` ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf '\302\242'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_848 #AT_START_849 at_fn_group_banner 849 'i18n.at:41' \ "convert from UTF-8 to ISO-8859-1" " " 111 at_xfail=no ( $as_echo "849. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:41: i18n-test supports_encodings 'UTF-8' 'ISO-8859-1'" at_fn_check_prepare_trace "i18n.at:41" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' 'ISO-8859-1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:41" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:41: i18n-test recode 'UTF-8' 'ISO-8859-1' \`printf '\\302\\242'\`" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:41" ( $at_check_trace; i18n-test recode 'UTF-8' 'ISO-8859-1' `printf '\302\242'` ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf '\242'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:41" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_849 #AT_START_850 at_fn_group_banner 850 'i18n.at:45' \ "convert invalid UTF-8 to ISO-8859-1" " " 111 at_xfail=no ( $as_echo "850. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:45: i18n-test supports_encodings 'UTF-8' 'ISO-8859-1'" at_fn_check_prepare_trace "i18n.at:45" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' 'ISO-8859-1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:45" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:45: i18n-test recode 'UTF-8' 'ISO-8859-1' \`printf 'xy\\300z'\`" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:45" ( $at_check_trace; i18n-test recode 'UTF-8' 'ISO-8859-1' `printf 'xy\300z'` ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'xy?z'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:45" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_850 #AT_START_851 at_fn_group_banner 851 'i18n.at:48' \ "convert truncated UTF-8 to ISO-8559-1" " " 111 at_xfail=no ( $as_echo "851. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:48: i18n-test supports_encodings 'UTF-8' 'ISO-8859-1'" at_fn_check_prepare_trace "i18n.at:48" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' 'ISO-8859-1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:48" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:48: i18n-test recode 'UTF-8' 'ISO-8859-1' \`printf 'xy\\302'\`" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:48" ( $at_check_trace; i18n-test recode 'UTF-8' 'ISO-8859-1' `printf 'xy\302'` ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'xy?'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:48" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_851 #AT_START_852 at_fn_group_banner 852 'i18n.at:53' \ "convert dropped final character in windows-1258" "" 111 at_xfail=no ( $as_echo "852. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:53: i18n-test supports_encodings 'windows-1258' 'UTF-8'" at_fn_check_prepare_trace "i18n.at:53" ( $at_check_trace; i18n-test supports_encodings 'windows-1258' 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:53" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:53: i18n-test recode 'windows-1258' 'UTF-8' \`printf 'aeiou'\`" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:53" ( $at_check_trace; i18n-test recode 'windows-1258' 'UTF-8' `printf 'aeiou'` ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'aeiou'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:53" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_852 #AT_START_853 at_fn_group_banner 853 'i18n.at:58' \ "convert from ISO-8859-1 to UTF-8 with overflow" " " 111 at_xfail=no ( $as_echo "853. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:58: i18n-test supports_encodings 'ISO-8859-1' 'UTF-8'" at_fn_check_prepare_trace "i18n.at:58" ( $at_check_trace; i18n-test supports_encodings 'ISO-8859-1' 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:58" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:58: i18n-test recode 'ISO-8859-1' 'UTF-8' \`printf 'Tsch\\374\\337!'\`" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:58" ( $at_check_trace; i18n-test recode 'ISO-8859-1' 'UTF-8' `printf 'Tsch\374\337!'` ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'Tsch\303\274\303\237!'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:58" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_853 #AT_START_854 at_fn_group_banner 854 'i18n.at:62' \ "convert unknown encoding" " " 111 at_xfail=no ( $as_echo "854. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:64: i18n-test recode nonexistent1 nonexistent2 asdf" at_fn_check_prepare_trace "i18n.at:64" ( $at_check_trace; i18n-test recode nonexistent1 nonexistent2 asdf ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo >>"$at_stderr"; $as_echo "Warning: cannot create a converter for \`nonexistent1' to \`nonexistent2': Invalid argument " | \ $at_diff - "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "asdf " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:64" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_854 #AT_START_855 at_fn_group_banner 855 'i18n.at:93' \ "truncate \"abc\" to 6 bytes in UTF-8" " " 112 at_xfail=no ( $as_echo "855. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:93: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:93" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:93" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:93: i18n-test concat \"\`printf 'abc'\`\" \"\`printf ''\`\" 'UTF-8' '6'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:93" ( $at_check_trace; i18n-test concat "`printf 'abc'`" "`printf ''`" 'UTF-8' '6' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'abc'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:93" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_855 #AT_START_856 at_fn_group_banner 856 'i18n.at:94' \ "truncate \"\" + \"xyz\" to 6 bytes in UTF-8" " " 112 at_xfail=no ( $as_echo "856. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:94: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:94" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:94" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:94: i18n-test concat \"\`printf ''\`\" \"\`printf 'xyz'\`\" 'UTF-8' '6'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:94" ( $at_check_trace; i18n-test concat "`printf ''`" "`printf 'xyz'`" 'UTF-8' '6' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'xyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:94" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_856 #AT_START_857 at_fn_group_banner 857 'i18n.at:95' \ "truncate \"\" to 6 bytes in UTF-8" " " 112 at_xfail=no ( $as_echo "857. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:95: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:95" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:95" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:95: i18n-test concat \"\`printf ''\`\" \"\`printf ''\`\" 'UTF-8' '6'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:95" ( $at_check_trace; i18n-test concat "`printf ''`" "`printf ''`" 'UTF-8' '6' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf ''` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:95" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_857 #AT_START_858 at_fn_group_banner 858 'i18n.at:96' \ "truncate \"abcdefghij\" to 6 bytes in UTF-8" " " 112 at_xfail=no ( $as_echo "858. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:96: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:96" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:96" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:96: i18n-test concat \"\`printf 'abcdefghij'\`\" \"\`printf ''\`\" 'UTF-8' '6'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:96" ( $at_check_trace; i18n-test concat "`printf 'abcdefghij'`" "`printf ''`" 'UTF-8' '6' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'abcdef'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:96" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_858 #AT_START_859 at_fn_group_banner 859 'i18n.at:97' \ "truncate \"\" + \"tuvwxyz\" to 6 bytes in UTF-8" " " 112 at_xfail=no ( $as_echo "859. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:97: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:97" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:97" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:97: i18n-test concat \"\`printf ''\`\" \"\`printf 'tuvwxyz'\`\" 'UTF-8' '6'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:97" ( $at_check_trace; i18n-test concat "`printf ''`" "`printf 'tuvwxyz'`" 'UTF-8' '6' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'tuvwxyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:97" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_859 #AT_START_860 at_fn_group_banner 860 'i18n.at:99' \ "truncate \"abc\" + \"xyz\" to 6 bytes in UTF-8" " " 112 at_xfail=no ( $as_echo "860. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:99: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:99" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:99" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:99: i18n-test concat \"\`printf 'abc'\`\" \"\`printf 'xyz'\`\" 'UTF-8' '6'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:99" ( $at_check_trace; i18n-test concat "`printf 'abc'`" "`printf 'xyz'`" 'UTF-8' '6' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'abcxyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:99" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_860 #AT_START_861 at_fn_group_banner 861 'i18n.at:100' \ "truncate \"abcd\" + \"xyz\" to 6 bytes in UTF-8" " " 112 at_xfail=no ( $as_echo "861. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:100: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:100" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:100" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:100: i18n-test concat \"\`printf 'abcd'\`\" \"\`printf 'xyz'\`\" 'UTF-8' '6'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:100" ( $at_check_trace; i18n-test concat "`printf 'abcd'`" "`printf 'xyz'`" 'UTF-8' '6' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'abcxyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:100" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_861 #AT_START_862 at_fn_group_banner 862 'i18n.at:101' \ "truncate \"abc\" + \"uvwxyz\" to 6 bytes in UTF-8" " " 112 at_xfail=no ( $as_echo "862. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:101: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:101" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:101" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:101: i18n-test concat \"\`printf 'abc'\`\" \"\`printf 'uvwxyz'\`\" 'UTF-8' '6'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:101" ( $at_check_trace; i18n-test concat "`printf 'abc'`" "`printf 'uvwxyz'`" 'UTF-8' '6' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'uvwxyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:101" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_862 #AT_START_863 at_fn_group_banner 863 'i18n.at:105' \ "truncate \"x\\342\\203\\236\" + \"y\" to 0 bytes in UTF-8" "" 112 at_xfail=no ( $as_echo "863. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:105: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:105" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:105" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:105: i18n-test concat \"\`printf 'x\\342\\203\\236'\`\" \"\`printf 'y'\`\" 'UTF-8' '0'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:105" ( $at_check_trace; i18n-test concat "`printf 'x\342\203\236'`" "`printf 'y'`" 'UTF-8' '0' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'y'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:105" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_863 #AT_START_864 at_fn_group_banner 864 'i18n.at:106' \ "truncate \"x\\342\\203\\236\" + \"y\" to 1 bytes in UTF-8" "" 112 at_xfail=no ( $as_echo "864. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:106: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:106" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:106" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:106: i18n-test concat \"\`printf 'x\\342\\203\\236'\`\" \"\`printf 'y'\`\" 'UTF-8' '1'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:106" ( $at_check_trace; i18n-test concat "`printf 'x\342\203\236'`" "`printf 'y'`" 'UTF-8' '1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'y'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:106" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_864 #AT_START_865 at_fn_group_banner 865 'i18n.at:107' \ "truncate \"x\\342\\203\\236\" + \"y\" to 2 bytes in UTF-8" "" 112 at_xfail=no ( $as_echo "865. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:107: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:107" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:107" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:107: i18n-test concat \"\`printf 'x\\342\\203\\236'\`\" \"\`printf 'y'\`\" 'UTF-8' '2'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:107" ( $at_check_trace; i18n-test concat "`printf 'x\342\203\236'`" "`printf 'y'`" 'UTF-8' '2' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'y'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:107" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_865 #AT_START_866 at_fn_group_banner 866 'i18n.at:108' \ "truncate \"x\\342\\203\\236\" + \"y\" to 3 bytes in UTF-8" "" 112 at_xfail=no ( $as_echo "866. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:108: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:108" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:108" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:108: i18n-test concat \"\`printf 'x\\342\\203\\236'\`\" \"\`printf 'y'\`\" 'UTF-8' '3'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:108" ( $at_check_trace; i18n-test concat "`printf 'x\342\203\236'`" "`printf 'y'`" 'UTF-8' '3' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'y'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:108" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_866 #AT_START_867 at_fn_group_banner 867 'i18n.at:109' \ "truncate \"x\\342\\203\\236\" + \"y\" to 4 bytes in UTF-8" "" 112 at_xfail=no ( $as_echo "867. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:109: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:109" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:109" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:109: i18n-test concat \"\`printf 'x\\342\\203\\236'\`\" \"\`printf 'y'\`\" 'UTF-8' '4'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:109" ( $at_check_trace; i18n-test concat "`printf 'x\342\203\236'`" "`printf 'y'`" 'UTF-8' '4' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'y'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:109" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_867 #AT_START_868 at_fn_group_banner 868 'i18n.at:110' \ "truncate \"x\\342\\203\\236\" + \"y\" to 5 bytes in UTF-8" "" 112 at_xfail=no ( $as_echo "868. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:110: i18n-test supports_encodings 'UTF-8'" at_fn_check_prepare_trace "i18n.at:110" ( $at_check_trace; i18n-test supports_encodings 'UTF-8' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:110" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:110: i18n-test concat \"\`printf 'x\\342\\203\\236'\`\" \"\`printf 'y'\`\" 'UTF-8' '5'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:110" ( $at_check_trace; i18n-test concat "`printf 'x\342\203\236'`" "`printf 'y'`" 'UTF-8' '5' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'x\342\203\236y'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:110" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_868 #AT_START_869 at_fn_group_banner 869 'i18n.at:113' \ "truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 0 bytes in ISO-8859-1" "" 112 at_xfail=no ( $as_echo "869. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:113: i18n-test supports_encodings 'ISO-8859-1'" at_fn_check_prepare_trace "i18n.at:113" ( $at_check_trace; i18n-test supports_encodings 'ISO-8859-1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:113" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:113: i18n-test concat \"\`printf '\\303\\251\\303\\250\\303\\244'\`\" \"\`printf 'xyz'\`\" 'ISO-8859-1' '0'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:113" ( $at_check_trace; i18n-test concat "`printf '\303\251\303\250\303\244'`" "`printf 'xyz'`" 'ISO-8859-1' '0' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'xyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:113" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_869 #AT_START_870 at_fn_group_banner 870 'i18n.at:114' \ "truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 1 bytes in ISO-8859-1" "" 112 at_xfail=no ( $as_echo "870. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:114: i18n-test supports_encodings 'ISO-8859-1'" at_fn_check_prepare_trace "i18n.at:114" ( $at_check_trace; i18n-test supports_encodings 'ISO-8859-1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:114" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:114: i18n-test concat \"\`printf '\\303\\251\\303\\250\\303\\244'\`\" \"\`printf 'xyz'\`\" 'ISO-8859-1' '1'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:114" ( $at_check_trace; i18n-test concat "`printf '\303\251\303\250\303\244'`" "`printf 'xyz'`" 'ISO-8859-1' '1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'xyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:114" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_870 #AT_START_871 at_fn_group_banner 871 'i18n.at:115' \ "truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 2 bytes in ISO-8859-1" "" 112 at_xfail=no ( $as_echo "871. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:115: i18n-test supports_encodings 'ISO-8859-1'" at_fn_check_prepare_trace "i18n.at:115" ( $at_check_trace; i18n-test supports_encodings 'ISO-8859-1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:115" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:115: i18n-test concat \"\`printf '\\303\\251\\303\\250\\303\\244'\`\" \"\`printf 'xyz'\`\" 'ISO-8859-1' '2'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:115" ( $at_check_trace; i18n-test concat "`printf '\303\251\303\250\303\244'`" "`printf 'xyz'`" 'ISO-8859-1' '2' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'xyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:115" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_871 #AT_START_872 at_fn_group_banner 872 'i18n.at:116' \ "truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 3 bytes in ISO-8859-1" "" 112 at_xfail=no ( $as_echo "872. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:116: i18n-test supports_encodings 'ISO-8859-1'" at_fn_check_prepare_trace "i18n.at:116" ( $at_check_trace; i18n-test supports_encodings 'ISO-8859-1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:116" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:116: i18n-test concat \"\`printf '\\303\\251\\303\\250\\303\\244'\`\" \"\`printf 'xyz'\`\" 'ISO-8859-1' '3'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:116" ( $at_check_trace; i18n-test concat "`printf '\303\251\303\250\303\244'`" "`printf 'xyz'`" 'ISO-8859-1' '3' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf 'xyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:116" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_872 #AT_START_873 at_fn_group_banner 873 'i18n.at:117' \ "truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 4 bytes in ISO-8859-1" "" 112 at_xfail=no ( $as_echo "873. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:117: i18n-test supports_encodings 'ISO-8859-1'" at_fn_check_prepare_trace "i18n.at:117" ( $at_check_trace; i18n-test supports_encodings 'ISO-8859-1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:117" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:117: i18n-test concat \"\`printf '\\303\\251\\303\\250\\303\\244'\`\" \"\`printf 'xyz'\`\" 'ISO-8859-1' '4'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:117" ( $at_check_trace; i18n-test concat "`printf '\303\251\303\250\303\244'`" "`printf 'xyz'`" 'ISO-8859-1' '4' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf '\303\251xyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:117" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_873 #AT_START_874 at_fn_group_banner 874 'i18n.at:119' \ "truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 5 bytes in ISO-8859-1" "" 112 at_xfail=no ( $as_echo "874. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:119: i18n-test supports_encodings 'ISO-8859-1'" at_fn_check_prepare_trace "i18n.at:119" ( $at_check_trace; i18n-test supports_encodings 'ISO-8859-1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:119" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:119: i18n-test concat \"\`printf '\\303\\251\\303\\250\\303\\244'\`\" \"\`printf 'xyz'\`\" 'ISO-8859-1' '5'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:119" ( $at_check_trace; i18n-test concat "`printf '\303\251\303\250\303\244'`" "`printf 'xyz'`" 'ISO-8859-1' '5' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf '\303\251\303\250xyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:119" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_874 #AT_START_875 at_fn_group_banner 875 'i18n.at:121' \ "truncate \"\\303\\251\\303\\250\\303\\244\" + \"xyz\" to 6 bytes in ISO-8859-1" "" 112 at_xfail=no ( $as_echo "875. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/i18n.at:121: i18n-test supports_encodings 'ISO-8859-1'" at_fn_check_prepare_trace "i18n.at:121" ( $at_check_trace; i18n-test supports_encodings 'ISO-8859-1' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:121" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/i18n.at:121: i18n-test concat \"\`printf '\\303\\251\\303\\250\\303\\244'\`\" \"\`printf 'xyz'\`\" 'ISO-8859-1' '6'" at_fn_check_prepare_notrace 'a `...` command substitution' "i18n.at:121" ( $at_check_trace; i18n-test concat "`printf '\303\251\303\250\303\244'`" "`printf 'xyz'`" 'ISO-8859-1' '6' ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "`printf '\303\251\303\250\303\244xyz'` " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/i18n.at:121" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_875 #AT_START_876 at_fn_group_banner 876 'line-reader.at:19' \ "read ASCII" " " 113 at_xfail=no ( $as_echo "876. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/line-reader.at:21: i18n-test supports_encodings ASCII" at_fn_check_prepare_trace "line-reader.at:21" ( $at_check_trace; i18n-test supports_encodings ASCII ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:21" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/line-reader.at:22: echo string | line-reader-test read - ASCII" at_fn_check_prepare_notrace 'a shell pipeline' "line-reader.at:22" ( $at_check_trace; echo string | line-reader-test read - ASCII ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "encoded in ASCII \"string\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:22" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_876 #AT_START_877 at_fn_group_banner 877 'line-reader.at:28' \ "read UTF-8" " " 113 at_xfail=no ( $as_echo "877. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/line-reader.at:30: printf '\\346\\227\\245\\346\\234\\254\\350\\252\\236\\n' | line-reader-test read - UTF-8" at_fn_check_prepare_notrace 'a shell pipeline' "line-reader.at:30" ( $at_check_trace; printf '\346\227\245\346\234\254\350\252\236\n' | line-reader-test read - UTF-8 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "encoded in UTF-8 \"日本語\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_877 #AT_START_878 at_fn_group_banner 878 'line-reader.at:36' \ "read EUC-JP" " " 113 at_xfail=no ( $as_echo "878. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/line-reader.at:38: i18n-test supports_encodings EUC-JP" at_fn_check_prepare_trace "line-reader.at:38" ( $at_check_trace; i18n-test supports_encodings EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:38" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/line-reader.at:39: printf '\\244\\241 \\244\\242 \\244\\243 \\244\\244 \\244\\245 \\244\\246 \\244\\247 \\244\\250 \\244\\251 \\244\\252\\n' | line-reader-test read - EUC-JP" at_fn_check_prepare_notrace 'a shell pipeline' "line-reader.at:39" ( $at_check_trace; printf '\244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 \244\250 \244\251 \244\252\n' | line-reader-test read - EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "encoded in EUC-JP \"ぁ あ ぃ い ぅ う ぇ え ぉ お\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_878 #AT_START_879 at_fn_group_banner 879 'line-reader.at:45' \ "read ASCII as Auto" " " 113 at_xfail=no ( $as_echo "879. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/line-reader.at:47: echo string | line-reader-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "line-reader.at:47" ( $at_check_trace; echo string | line-reader-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "encoded in ASCII (auto) \"string\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:47" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_879 #AT_START_880 at_fn_group_banner 880 'line-reader.at:53' \ "read UTF-8 as Auto" " " 113 at_xfail=no ( $as_echo "880. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/line-reader.at:55: printf 'entr\\303\\251e\\n' | line-reader-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "line-reader.at:55" ( $at_check_trace; printf 'entr\303\251e\n' | line-reader-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "encoded in ASCII (auto) encoded in UTF-8 \"entrée\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:55" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_880 #AT_START_881 at_fn_group_banner 881 'line-reader.at:62' \ "read ISO-8859-1 as Auto,ISO-8859-1" " " 113 at_xfail=no ( $as_echo "881. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/line-reader.at:64: i18n-test supports_encodings ISO-8859-1" at_fn_check_prepare_trace "line-reader.at:64" ( $at_check_trace; i18n-test supports_encodings ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:64" $at_failed && at_fn_log_failure $at_traceon; } buffer_size=`line-reader-test buffer-size` ($PERL -e "print 'x' x ($buffer_size - 2)" printf '\none line\ntwo lines\nentr\351e\nfour lines\n') > input (printf 'encoded in ASCII (auto)\n\"' $PERL -e "print 'x' x ($buffer_size - 2)" printf '\"\n"one line"\n"two lines"\nencoded in ISO-8859-1\n"entr\303\251e"\n"four lines"\n') > expout { set +x $as_echo "$at_srcdir/line-reader.at:71: line-reader-test read input Auto,ISO-8859-1" at_fn_check_prepare_trace "line-reader.at:71" ( $at_check_trace; line-reader-test read input Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:71" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_881 #AT_START_882 at_fn_group_banner 882 'line-reader.at:74' \ "read UTF-16BE as Auto,UTF-16BE" " " 113 at_xfail=no ( $as_echo "882. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/line-reader.at:76: i18n-test supports_encodings UTF-16BE" at_fn_check_prepare_trace "line-reader.at:76" ( $at_check_trace; i18n-test supports_encodings UTF-16BE ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:76" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/line-reader.at:77: printf '\\0e\\0n\\0t\\0r\\0\\351\\0e\\0\\n' | line-reader-test read - Auto,UTF-16BE" at_fn_check_prepare_notrace 'a shell pipeline' "line-reader.at:77" ( $at_check_trace; printf '\0e\0n\0t\0r\0\351\0e\0\n' | line-reader-test read - Auto,UTF-16BE ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "encoded in UTF-16BE \"entrée\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:77" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_882 #AT_START_883 at_fn_group_banner 883 'line-reader.at:83' \ "read EUC-JP as Auto,EUC-JP" " " 113 at_xfail=no ( $as_echo "883. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/line-reader.at:85: i18n-test supports_encodings EUC-JP" at_fn_check_prepare_trace "line-reader.at:85" ( $at_check_trace; i18n-test supports_encodings EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:85" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/line-reader.at:86: printf 'entr\\217\\253\\261e\\n' | line-reader-test read - Auto,EUC-JP" at_fn_check_prepare_notrace 'a shell pipeline' "line-reader.at:86" ( $at_check_trace; printf 'entr\217\253\261e\n' | line-reader-test read - Auto,EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "encoded in EUC-JP \"entrée\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/line-reader.at:86" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_883 #AT_START_884 at_fn_group_banner 884 'll.at:24' \ "ll -- push-pop" " " 114 at_xfail=no ( $as_echo "884. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:24: ll-test push-pop" at_fn_check_prepare_trace "ll.at:24" ( $at_check_trace; ll-test push-pop ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_884 #AT_START_885 at_fn_group_banner 885 'll.at:25' \ "ll -- insert-remove" " " 114 at_xfail=no ( $as_echo "885. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:25: ll-test insert-remove" at_fn_check_prepare_trace "ll.at:25" ( $at_check_trace; ll-test insert-remove ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_885 #AT_START_886 at_fn_group_banner 886 'll.at:26' \ "ll -- swap" " " 114 at_xfail=no ( $as_echo "886. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:26: ll-test swap" at_fn_check_prepare_trace "ll.at:26" ( $at_check_trace; ll-test swap ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_886 #AT_START_887 at_fn_group_banner 887 'll.at:27' \ "ll -- swap-range" " " 114 at_xfail=no ( $as_echo "887. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:27: ll-test swap-range" at_fn_check_prepare_trace "ll.at:27" ( $at_check_trace; ll-test swap-range ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_887 #AT_START_888 at_fn_group_banner 888 'll.at:28' \ "ll -- remove-range" " " 114 at_xfail=no ( $as_echo "888. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:28: ll-test remove-range" at_fn_check_prepare_trace "ll.at:28" ( $at_check_trace; ll-test remove-range ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_888 #AT_START_889 at_fn_group_banner 889 'll.at:29' \ "ll -- remove-equal" " " 114 at_xfail=no ( $as_echo "889. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:29: ll-test remove-equal" at_fn_check_prepare_trace "ll.at:29" ( $at_check_trace; ll-test remove-equal ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_889 #AT_START_890 at_fn_group_banner 890 'll.at:30' \ "ll -- remove-if" " " 114 at_xfail=no ( $as_echo "890. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:30: ll-test remove-if" at_fn_check_prepare_trace "ll.at:30" ( $at_check_trace; ll-test remove-if ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_890 #AT_START_891 at_fn_group_banner 891 'll.at:31' \ "ll -- moved" " " 114 at_xfail=no ( $as_echo "891. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:31: ll-test moved" at_fn_check_prepare_trace "ll.at:31" ( $at_check_trace; ll-test moved ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_891 #AT_START_892 at_fn_group_banner 892 'll.at:32' \ "ll -- find-equal" " " 114 at_xfail=no ( $as_echo "892. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:32: ll-test find-equal" at_fn_check_prepare_trace "ll.at:32" ( $at_check_trace; ll-test find-equal ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_892 #AT_START_893 at_fn_group_banner 893 'll.at:33' \ "ll -- find-if" " " 114 at_xfail=no ( $as_echo "893. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:33: ll-test find-if" at_fn_check_prepare_trace "ll.at:33" ( $at_check_trace; ll-test find-if ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:33" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_893 #AT_START_894 at_fn_group_banner 894 'll.at:34' \ "ll -- find-adjacent-equal" " " 114 at_xfail=no ( $as_echo "894. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:34: ll-test find-adjacent-equal" at_fn_check_prepare_trace "ll.at:34" ( $at_check_trace; ll-test find-adjacent-equal ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_894 #AT_START_895 at_fn_group_banner 895 'll.at:35' \ "ll -- count-range" " " 114 at_xfail=no ( $as_echo "895. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:35: ll-test count-range" at_fn_check_prepare_trace "ll.at:35" ( $at_check_trace; ll-test count-range ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_895 #AT_START_896 at_fn_group_banner 896 'll.at:36' \ "ll -- count-equal" " " 114 at_xfail=no ( $as_echo "896. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:36: ll-test count-equal" at_fn_check_prepare_trace "ll.at:36" ( $at_check_trace; ll-test count-equal ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_896 #AT_START_897 at_fn_group_banner 897 'll.at:37' \ "ll -- count-if" " " 114 at_xfail=no ( $as_echo "897. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:37: ll-test count-if" at_fn_check_prepare_trace "ll.at:37" ( $at_check_trace; ll-test count-if ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_897 #AT_START_898 at_fn_group_banner 898 'll.at:38' \ "ll -- min-max" " " 114 at_xfail=no ( $as_echo "898. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:38: ll-test min-max" at_fn_check_prepare_trace "ll.at:38" ( $at_check_trace; ll-test min-max ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:38" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_898 #AT_START_899 at_fn_group_banner 899 'll.at:39' \ "ll -- lexicographical-compare-3way" " " 114 at_xfail=no ( $as_echo "899. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:39: ll-test lexicographical-compare-3way" at_fn_check_prepare_trace "ll.at:39" ( $at_check_trace; ll-test lexicographical-compare-3way ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_899 #AT_START_900 at_fn_group_banner 900 'll.at:40' \ "ll -- apply" " " 114 at_xfail=no ( $as_echo "900. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:40: ll-test apply" at_fn_check_prepare_trace "ll.at:40" ( $at_check_trace; ll-test apply ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:40" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_900 #AT_START_901 at_fn_group_banner 901 'll.at:41' \ "ll -- reverse" " " 114 at_xfail=no ( $as_echo "901. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:41: ll-test reverse" at_fn_check_prepare_trace "ll.at:41" ( $at_check_trace; ll-test reverse ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:41" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_901 #AT_START_902 at_fn_group_banner 902 'll.at:42' \ "ll -- permutations-no-dups" " " 114 at_xfail=no ( $as_echo "902. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:42: ll-test permutations-no-dups" at_fn_check_prepare_trace "ll.at:42" ( $at_check_trace; ll-test permutations-no-dups ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:42" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_902 #AT_START_903 at_fn_group_banner 903 'll.at:43' \ "ll -- permutations-with-dups" " " 114 at_xfail=no ( $as_echo "903. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:43: ll-test permutations-with-dups" at_fn_check_prepare_trace "ll.at:43" ( $at_check_trace; ll-test permutations-with-dups ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:43" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_903 #AT_START_904 at_fn_group_banner 904 'll.at:44' \ "ll -- merge-no-dups" " " 114 at_xfail=no ( $as_echo "904. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:44: ll-test merge-no-dups" at_fn_check_prepare_trace "ll.at:44" ( $at_check_trace; ll-test merge-no-dups ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:44" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_904 #AT_START_905 at_fn_group_banner 905 'll.at:45' \ "ll -- merge-with-dups" " " 114 at_xfail=no ( $as_echo "905. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:45: ll-test merge-with-dups" at_fn_check_prepare_trace "ll.at:45" ( $at_check_trace; ll-test merge-with-dups ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:45" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_905 #AT_START_906 at_fn_group_banner 906 'll.at:46' \ "ll -- sort-exhaustive" " " 114 at_xfail=no ( $as_echo "906. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:46: ll-test sort-exhaustive" at_fn_check_prepare_trace "ll.at:46" ( $at_check_trace; ll-test sort-exhaustive ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:46" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_906 #AT_START_907 at_fn_group_banner 907 'll.at:47' \ "ll -- sort-stable" " " 114 at_xfail=no ( $as_echo "907. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:47: ll-test sort-stable" at_fn_check_prepare_trace "ll.at:47" ( $at_check_trace; ll-test sort-stable ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:47" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_907 #AT_START_908 at_fn_group_banner 908 'll.at:48' \ "ll -- sort-subset" " " 114 at_xfail=no ( $as_echo "908. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:48: ll-test sort-subset" at_fn_check_prepare_trace "ll.at:48" ( $at_check_trace; ll-test sort-subset ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:48" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_908 #AT_START_909 at_fn_group_banner 909 'll.at:49' \ "ll -- sort-big" " " 114 at_xfail=no ( $as_echo "909. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:49: ll-test sort-big" at_fn_check_prepare_trace "ll.at:49" ( $at_check_trace; ll-test sort-big ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:49" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_909 #AT_START_910 at_fn_group_banner 910 'll.at:50' \ "ll -- unique" " " 114 at_xfail=no ( $as_echo "910. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:50: ll-test unique" at_fn_check_prepare_trace "ll.at:50" ( $at_check_trace; ll-test unique ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:50" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_910 #AT_START_911 at_fn_group_banner 911 'll.at:51' \ "ll -- sort-unique" " " 114 at_xfail=no ( $as_echo "911. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:51: ll-test sort-unique" at_fn_check_prepare_trace "ll.at:51" ( $at_check_trace; ll-test sort-unique ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:51" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_911 #AT_START_912 at_fn_group_banner 912 'll.at:52' \ "ll -- insert-ordered" " " 114 at_xfail=no ( $as_echo "912. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:52: ll-test insert-ordered" at_fn_check_prepare_trace "ll.at:52" ( $at_check_trace; ll-test insert-ordered ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:52" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_912 #AT_START_913 at_fn_group_banner 913 'll.at:53' \ "ll -- partition" " " 114 at_xfail=no ( $as_echo "913. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/ll.at:53: ll-test partition" at_fn_check_prepare_trace "ll.at:53" ( $at_check_trace; ll-test partition ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ll.at:53" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_913 #AT_START_914 at_fn_group_banner 914 'llx.at:24' \ "llx -- push-pop" " " 115 at_xfail=no ( $as_echo "914. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:24: llx-test push-pop" at_fn_check_prepare_trace "llx.at:24" ( $at_check_trace; llx-test push-pop ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_914 #AT_START_915 at_fn_group_banner 915 'llx.at:25' \ "llx -- insert-remove" " " 115 at_xfail=no ( $as_echo "915. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:25: llx-test insert-remove" at_fn_check_prepare_trace "llx.at:25" ( $at_check_trace; llx-test insert-remove ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_915 #AT_START_916 at_fn_group_banner 916 'llx.at:26' \ "llx -- swap" " " 115 at_xfail=no ( $as_echo "916. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:26: llx-test swap" at_fn_check_prepare_trace "llx.at:26" ( $at_check_trace; llx-test swap ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_916 #AT_START_917 at_fn_group_banner 917 'llx.at:27' \ "llx -- swap-range" " " 115 at_xfail=no ( $as_echo "917. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:27: llx-test swap-range" at_fn_check_prepare_trace "llx.at:27" ( $at_check_trace; llx-test swap-range ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_917 #AT_START_918 at_fn_group_banner 918 'llx.at:28' \ "llx -- remove-range" " " 115 at_xfail=no ( $as_echo "918. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:28: llx-test remove-range" at_fn_check_prepare_trace "llx.at:28" ( $at_check_trace; llx-test remove-range ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_918 #AT_START_919 at_fn_group_banner 919 'llx.at:29' \ "llx -- remove-equal" " " 115 at_xfail=no ( $as_echo "919. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:29: llx-test remove-equal" at_fn_check_prepare_trace "llx.at:29" ( $at_check_trace; llx-test remove-equal ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_919 #AT_START_920 at_fn_group_banner 920 'llx.at:30' \ "llx -- remove-if" " " 115 at_xfail=no ( $as_echo "920. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:30: llx-test remove-if" at_fn_check_prepare_trace "llx.at:30" ( $at_check_trace; llx-test remove-if ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_920 #AT_START_921 at_fn_group_banner 921 'llx.at:31' \ "llx -- find-equal" " " 115 at_xfail=no ( $as_echo "921. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:31: llx-test find-equal" at_fn_check_prepare_trace "llx.at:31" ( $at_check_trace; llx-test find-equal ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_921 #AT_START_922 at_fn_group_banner 922 'llx.at:32' \ "llx -- find" " " 115 at_xfail=no ( $as_echo "922. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:32: llx-test find" at_fn_check_prepare_trace "llx.at:32" ( $at_check_trace; llx-test find ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_922 #AT_START_923 at_fn_group_banner 923 'llx.at:33' \ "llx -- find-if" " " 115 at_xfail=no ( $as_echo "923. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:33: llx-test find-if" at_fn_check_prepare_trace "llx.at:33" ( $at_check_trace; llx-test find-if ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:33" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_923 #AT_START_924 at_fn_group_banner 924 'llx.at:34' \ "llx -- find-adjacent-equal" " " 115 at_xfail=no ( $as_echo "924. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:34: llx-test find-adjacent-equal" at_fn_check_prepare_trace "llx.at:34" ( $at_check_trace; llx-test find-adjacent-equal ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_924 #AT_START_925 at_fn_group_banner 925 'llx.at:35' \ "llx -- count-range" " " 115 at_xfail=no ( $as_echo "925. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:35: llx-test count-range" at_fn_check_prepare_trace "llx.at:35" ( $at_check_trace; llx-test count-range ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_925 #AT_START_926 at_fn_group_banner 926 'llx.at:36' \ "llx -- count-equal" " " 115 at_xfail=no ( $as_echo "926. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:36: llx-test count-equal" at_fn_check_prepare_trace "llx.at:36" ( $at_check_trace; llx-test count-equal ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_926 #AT_START_927 at_fn_group_banner 927 'llx.at:37' \ "llx -- count-if" " " 115 at_xfail=no ( $as_echo "927. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:37: llx-test count-if" at_fn_check_prepare_trace "llx.at:37" ( $at_check_trace; llx-test count-if ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_927 #AT_START_928 at_fn_group_banner 928 'llx.at:38' \ "llx -- min-max" " " 115 at_xfail=no ( $as_echo "928. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:38: llx-test min-max" at_fn_check_prepare_trace "llx.at:38" ( $at_check_trace; llx-test min-max ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:38" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_928 #AT_START_929 at_fn_group_banner 929 'llx.at:39' \ "llx -- lexicographical-compare-3way" " " 115 at_xfail=no ( $as_echo "929. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:39: llx-test lexicographical-compare-3way" at_fn_check_prepare_trace "llx.at:39" ( $at_check_trace; llx-test lexicographical-compare-3way ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_929 #AT_START_930 at_fn_group_banner 930 'llx.at:40' \ "llx -- apply" " " 115 at_xfail=no ( $as_echo "930. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:40: llx-test apply" at_fn_check_prepare_trace "llx.at:40" ( $at_check_trace; llx-test apply ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:40" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_930 #AT_START_931 at_fn_group_banner 931 'llx.at:41' \ "llx -- destroy" " " 115 at_xfail=no ( $as_echo "931. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:41: llx-test destroy" at_fn_check_prepare_trace "llx.at:41" ( $at_check_trace; llx-test destroy ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:41" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_931 #AT_START_932 at_fn_group_banner 932 'llx.at:42' \ "llx -- reverse" " " 115 at_xfail=no ( $as_echo "932. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:42: llx-test reverse" at_fn_check_prepare_trace "llx.at:42" ( $at_check_trace; llx-test reverse ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:42" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_932 #AT_START_933 at_fn_group_banner 933 'llx.at:43' \ "llx -- permutations-no-dups" " " 115 at_xfail=no ( $as_echo "933. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:43: llx-test permutations-no-dups" at_fn_check_prepare_trace "llx.at:43" ( $at_check_trace; llx-test permutations-no-dups ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:43" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_933 #AT_START_934 at_fn_group_banner 934 'llx.at:44' \ "llx -- permutations-with-dups" " " 115 at_xfail=no ( $as_echo "934. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:44: llx-test permutations-with-dups" at_fn_check_prepare_trace "llx.at:44" ( $at_check_trace; llx-test permutations-with-dups ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:44" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_934 #AT_START_935 at_fn_group_banner 935 'llx.at:45' \ "llx -- merge-no-dups" " " 115 at_xfail=no ( $as_echo "935. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:45: llx-test merge-no-dups" at_fn_check_prepare_trace "llx.at:45" ( $at_check_trace; llx-test merge-no-dups ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:45" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_935 #AT_START_936 at_fn_group_banner 936 'llx.at:46' \ "llx -- merge-with-dups" " " 115 at_xfail=no ( $as_echo "936. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:46: llx-test merge-with-dups" at_fn_check_prepare_trace "llx.at:46" ( $at_check_trace; llx-test merge-with-dups ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:46" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_936 #AT_START_937 at_fn_group_banner 937 'llx.at:47' \ "llx -- sort-exhaustive" " " 115 at_xfail=no ( $as_echo "937. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:47: llx-test sort-exhaustive" at_fn_check_prepare_trace "llx.at:47" ( $at_check_trace; llx-test sort-exhaustive ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:47" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_937 #AT_START_938 at_fn_group_banner 938 'llx.at:48' \ "llx -- sort-stable" " " 115 at_xfail=no ( $as_echo "938. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:48: llx-test sort-stable" at_fn_check_prepare_trace "llx.at:48" ( $at_check_trace; llx-test sort-stable ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:48" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_938 #AT_START_939 at_fn_group_banner 939 'llx.at:49' \ "llx -- sort-subset" " " 115 at_xfail=no ( $as_echo "939. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:49: llx-test sort-subset" at_fn_check_prepare_trace "llx.at:49" ( $at_check_trace; llx-test sort-subset ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:49" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_939 #AT_START_940 at_fn_group_banner 940 'llx.at:50' \ "llx -- sort-big" " " 115 at_xfail=no ( $as_echo "940. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:50: llx-test sort-big" at_fn_check_prepare_trace "llx.at:50" ( $at_check_trace; llx-test sort-big ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:50" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_940 #AT_START_941 at_fn_group_banner 941 'llx.at:51' \ "llx -- unique" " " 115 at_xfail=no ( $as_echo "941. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:51: llx-test unique" at_fn_check_prepare_trace "llx.at:51" ( $at_check_trace; llx-test unique ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:51" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_941 #AT_START_942 at_fn_group_banner 942 'llx.at:52' \ "llx -- sort-unique" " " 115 at_xfail=no ( $as_echo "942. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:52: llx-test sort-unique" at_fn_check_prepare_trace "llx.at:52" ( $at_check_trace; llx-test sort-unique ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:52" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_942 #AT_START_943 at_fn_group_banner 943 'llx.at:53' \ "llx -- insert-ordered" " " 115 at_xfail=no ( $as_echo "943. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:53: llx-test insert-ordered" at_fn_check_prepare_trace "llx.at:53" ( $at_check_trace; llx-test insert-ordered ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:53" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_943 #AT_START_944 at_fn_group_banner 944 'llx.at:54' \ "llx -- partition" " " 115 at_xfail=no ( $as_echo "944. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:54: llx-test partition" at_fn_check_prepare_trace "llx.at:54" ( $at_check_trace; llx-test partition ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:54" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_944 #AT_START_945 at_fn_group_banner 945 'llx.at:55' \ "llx -- allocation-failure" " " 115 at_xfail=no ( $as_echo "945. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/llx.at:55: llx-test allocation-failure" at_fn_check_prepare_trace "llx.at:55" ( $at_check_trace; llx-test allocation-failure ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/llx.at:55" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_945 #AT_START_946 at_fn_group_banner 946 'range-map.at:24' \ "range-map -- insert" " " 116 at_xfail=no ( $as_echo "946. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-map.at:24: range-map-test insert" at_fn_check_prepare_trace "range-map.at:24" ( $at_check_trace; range-map-test insert ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-map.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_946 #AT_START_947 at_fn_group_banner 947 'range-map.at:25' \ "range-map -- delete-contiguous" " " 116 at_xfail=no ( $as_echo "947. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-map.at:25: range-map-test delete-contiguous" at_fn_check_prepare_trace "range-map.at:25" ( $at_check_trace; range-map-test delete-contiguous ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-map.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_947 #AT_START_948 at_fn_group_banner 948 'range-map.at:26' \ "range-map -- delete-gaps" " " 116 at_xfail=no ( $as_echo "948. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-map.at:26: range-map-test delete-gaps" at_fn_check_prepare_trace "range-map.at:26" ( $at_check_trace; range-map-test delete-gaps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-map.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_948 #AT_START_949 at_fn_group_banner 949 'range-set.at:24' \ "range-set -- insert" " " 117 at_xfail=no ( $as_echo "949. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-set.at:24: range-set-test insert" at_fn_check_prepare_trace "range-set.at:24" ( $at_check_trace; range-set-test insert ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-set.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_949 #AT_START_950 at_fn_group_banner 950 'range-set.at:25' \ "range-set -- delete" " " 117 at_xfail=no ( $as_echo "950. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-set.at:25: range-set-test delete" at_fn_check_prepare_trace "range-set.at:25" ( $at_check_trace; range-set-test delete ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-set.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_950 #AT_START_951 at_fn_group_banner 951 'range-set.at:26' \ "range-set -- allocate" " " 117 at_xfail=no ( $as_echo "951. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-set.at:26: range-set-test allocate" at_fn_check_prepare_trace "range-set.at:26" ( $at_check_trace; range-set-test allocate ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-set.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_951 #AT_START_952 at_fn_group_banner 952 'range-set.at:27' \ "range-set -- allocate-fully" " " 117 at_xfail=no ( $as_echo "952. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-set.at:27: range-set-test allocate-fully" at_fn_check_prepare_trace "range-set.at:27" ( $at_check_trace; range-set-test allocate-fully ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-set.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_952 #AT_START_953 at_fn_group_banner 953 'range-set.at:28' \ "range-set -- pool" " " 117 at_xfail=no ( $as_echo "953. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-set.at:28: range-set-test pool" at_fn_check_prepare_trace "range-set.at:28" ( $at_check_trace; range-set-test pool ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-set.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_953 #AT_START_954 at_fn_group_banner 954 'range-set.at:29' \ "range-set -- destroy-null" " " 117 at_xfail=no ( $as_echo "954. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-set.at:29: range-set-test destroy-null" at_fn_check_prepare_trace "range-set.at:29" ( $at_check_trace; range-set-test destroy-null ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-set.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_954 #AT_START_955 at_fn_group_banner 955 'range-tower.at:24' \ "range-tower -- set1" " " 118 at_xfail=no ( $as_echo "955. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-tower.at:24: range-tower-test set1" at_fn_check_prepare_trace "range-tower.at:24" ( $at_check_trace; range-tower-test set1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-tower.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_955 #AT_START_956 at_fn_group_banner 956 'range-tower.at:25' \ "range-tower -- set0" " " 118 at_xfail=no ( $as_echo "956. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-tower.at:25: range-tower-test set0" at_fn_check_prepare_trace "range-tower.at:25" ( $at_check_trace; range-tower-test set0 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-tower.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_956 #AT_START_957 at_fn_group_banner 957 'range-tower.at:26' \ "range-tower -- insert0" " " 118 at_xfail=no ( $as_echo "957. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-tower.at:26: range-tower-test insert0" at_fn_check_prepare_trace "range-tower.at:26" ( $at_check_trace; range-tower-test insert0 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-tower.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_957 #AT_START_958 at_fn_group_banner 958 'range-tower.at:27' \ "range-tower -- insert1" " " 118 at_xfail=no ( $as_echo "958. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-tower.at:27: range-tower-test insert1" at_fn_check_prepare_trace "range-tower.at:27" ( $at_check_trace; range-tower-test insert1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-tower.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_958 #AT_START_959 at_fn_group_banner 959 'range-tower.at:28' \ "range-tower -- delete" " " 118 at_xfail=no ( $as_echo "959. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-tower.at:28: range-tower-test delete" at_fn_check_prepare_trace "range-tower.at:28" ( $at_check_trace; range-tower-test delete ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-tower.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_959 #AT_START_960 at_fn_group_banner 960 'range-tower.at:29' \ "range-tower -- move" " " 118 at_xfail=no ( $as_echo "960. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-tower.at:29: range-tower-test move" at_fn_check_prepare_trace "range-tower.at:29" ( $at_check_trace; range-tower-test move ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-tower.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_960 #AT_START_961 at_fn_group_banner 961 'range-tower.at:30' \ "range-tower -- pool" " " 118 at_xfail=no ( $as_echo "961. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-tower.at:30: range-tower-test pool" at_fn_check_prepare_trace "range-tower.at:30" ( $at_check_trace; range-tower-test pool ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-tower.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_961 #AT_START_962 at_fn_group_banner 962 'range-tower.at:31' \ "range-tower -- destroy-null" " " 118 at_xfail=no ( $as_echo "962. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/range-tower.at:31: range-tower-test destroy-null" at_fn_check_prepare_trace "range-tower.at:31" ( $at_check_trace; range-tower-test destroy-null ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/range-tower.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_962 #AT_START_963 at_fn_group_banner 963 'sparse-array.at:25' \ "sparse array -- random-insert-delete" " " 119 at_xfail=no ( $as_echo "963. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sparse-array.at:25: sparse-array-test random-insert-delete" at_fn_check_prepare_trace "sparse-array.at:25" ( $at_check_trace; sparse-array-test random-insert-delete ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sparse-array.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_963 #AT_START_964 at_fn_group_banner 964 'sparse-array.at:27' \ "sparse array -- insert and delete with strides" " " 119 at_xfail=no ( $as_echo "964. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sparse-array.at:29: sparse-array-test insert-delete-strides" at_fn_check_prepare_trace "sparse-array.at:29" ( $at_check_trace; sparse-array-test insert-delete-strides ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "1 2 4 16 64 4096 262144 16777216 3 5 17 67 4099 262147 16777259 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/sparse-array.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_964 #AT_START_965 at_fn_group_banner 965 'sparse-xarray-test.at:58' \ "in-memory sparse_xarray" " " 120 at_xfail=no ( $as_echo "965. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sparse-xarray-test.at:60: sparse-xarray-test \\ --verbosity=0 --queue-limit=\`sparse_xarray_queue_limit\` \\ --columns=3 --max-rows=3 --max-memory-rows=3 --values=2" at_fn_check_prepare_notrace 'a `...` command substitution' "sparse-xarray-test.at:60" ( $at_check_trace; sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=3 --max-rows=3 --max-memory-rows=3 --values=2 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/sparse-xarray-test.at:60" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_965 #AT_START_966 at_fn_group_banner 966 'sparse-xarray-test.at:73' \ "on-disk sparse_xarray max-memory-rows=0" " " 120 at_xfail=no ( $as_echo "966. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sparse-xarray-test.at:73: sparse-xarray-test \\ --verbosity=0 --queue-limit=\`sparse_xarray_queue_limit\` \\ --columns=2 --max-rows=3 --max-memory-rows=0 --values=2" at_fn_check_prepare_notrace 'a `...` command substitution' "sparse-xarray-test.at:73" ( $at_check_trace; sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=2 --max-rows=3 --max-memory-rows=0 --values=2 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/sparse-xarray-test.at:73" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_966 #AT_START_967 at_fn_group_banner 967 'sparse-xarray-test.at:74' \ "on-disk sparse_xarray max-memory-rows=1" " " 120 at_xfail=no ( $as_echo "967. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sparse-xarray-test.at:74: sparse-xarray-test \\ --verbosity=0 --queue-limit=\`sparse_xarray_queue_limit\` \\ --columns=2 --max-rows=3 --max-memory-rows=1 --values=2" at_fn_check_prepare_notrace 'a `...` command substitution' "sparse-xarray-test.at:74" ( $at_check_trace; sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=2 --max-rows=3 --max-memory-rows=1 --values=2 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/sparse-xarray-test.at:74" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_967 #AT_START_968 at_fn_group_banner 968 'sparse-xarray-test.at:75' \ "on-disk sparse_xarray max-memory-rows=2" " " 120 at_xfail=no ( $as_echo "968. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sparse-xarray-test.at:75: sparse-xarray-test \\ --verbosity=0 --queue-limit=\`sparse_xarray_queue_limit\` \\ --columns=2 --max-rows=3 --max-memory-rows=2 --values=2" at_fn_check_prepare_notrace 'a `...` command substitution' "sparse-xarray-test.at:75" ( $at_check_trace; sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=2 --max-rows=3 --max-memory-rows=2 --values=2 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/sparse-xarray-test.at:75" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_968 #AT_START_969 at_fn_group_banner 969 'sparse-xarray-test.at:77' \ "copying between in-memory sparse_xarrays" " " 120 at_xfail=no ( $as_echo "969. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/sparse-xarray-test.at:79: sparse-xarray-test \\ --verbosity=0 --queue-limit=\`sparse_xarray_queue_limit\` \\ --columns=2 --max-rows=2 --max-memory-rows=2 --values=2 \\ --xarrays=2 --no-write-rows --no-copy-columns" at_fn_check_prepare_notrace 'a `...` command substitution' "sparse-xarray-test.at:79" ( $at_check_trace; sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=2 --max-rows=2 --max-memory-rows=2 --values=2 \ --xarrays=2 --no-write-rows --no-copy-columns ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/sparse-xarray-test.at:79" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_969 #AT_START_970 at_fn_group_banner 970 'sparse-xarray-test.at:98' \ "copying between on-disk sparse_xarrays max-memory-rows=0" "" 120 at_xfail=no ( $as_echo "970. $at_setup_line: testing $at_desc ..." $at_traceon limit=`sparse_xarray_queue_limit` { set +x $as_echo "$at_srcdir/sparse-xarray-test.at:98: sparse-xarray-test \\ --verbosity=0 --queue-limit=\`expr \$limit / 2\` \\ --columns=1 --max-rows=2 --max-memory-rows=\$max_memory_rows \\ --values=2 --xarrays=2 --no-write-rows --no-copy-columns" at_fn_check_prepare_notrace 'a `...` command substitution' "sparse-xarray-test.at:98" ( $at_check_trace; sparse-xarray-test \ --verbosity=0 --queue-limit=`expr $limit / 2` \ --columns=1 --max-rows=2 --max-memory-rows=$max_memory_rows \ --values=2 --xarrays=2 --no-write-rows --no-copy-columns ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/sparse-xarray-test.at:98" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_970 #AT_START_971 at_fn_group_banner 971 'sparse-xarray-test.at:99' \ "copying between on-disk sparse_xarrays max-memory-rows=1" "" 120 at_xfail=no ( $as_echo "971. $at_setup_line: testing $at_desc ..." $at_traceon limit=`sparse_xarray_queue_limit` { set +x $as_echo "$at_srcdir/sparse-xarray-test.at:99: sparse-xarray-test \\ --verbosity=0 --queue-limit=\`expr \$limit / 2\` \\ --columns=1 --max-rows=2 --max-memory-rows=\$max_memory_rows \\ --values=2 --xarrays=2 --no-write-rows --no-copy-columns" at_fn_check_prepare_notrace 'a `...` command substitution' "sparse-xarray-test.at:99" ( $at_check_trace; sparse-xarray-test \ --verbosity=0 --queue-limit=`expr $limit / 2` \ --columns=1 --max-rows=2 --max-memory-rows=$max_memory_rows \ --values=2 --xarrays=2 --no-write-rows --no-copy-columns ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/sparse-xarray-test.at:99" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_971 #AT_START_972 at_fn_group_banner 972 'str.at:19' \ "26-adic string formatting" " " 121 at_xfail=no ( $as_echo "972. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/str.at:20: str-test format-26adic" at_fn_check_prepare_trace "str.at:20" ( $at_check_trace; str-test format-26adic ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/str.at:20" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_972 #AT_START_973 at_fn_group_banner 973 'string-map.at:25' \ "string map -- insert-any-remove-any" " " 122 at_xfail=no ( $as_echo "973. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:25: string-map-test insert-any-remove-any" at_fn_check_prepare_trace "string-map.at:25" ( $at_check_trace; string-map-test insert-any-remove-any ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_973 #AT_START_974 at_fn_group_banner 974 'string-map.at:26' \ "string map -- insert-any-remove-same" " " 122 at_xfail=no ( $as_echo "974. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:26: string-map-test insert-any-remove-same" at_fn_check_prepare_trace "string-map.at:26" ( $at_check_trace; string-map-test insert-any-remove-same ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_974 #AT_START_975 at_fn_group_banner 975 'string-map.at:27' \ "string map -- insert-any-remove-reverse" " " 122 at_xfail=no ( $as_echo "975. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:27: string-map-test insert-any-remove-reverse" at_fn_check_prepare_trace "string-map.at:27" ( $at_check_trace; string-map-test insert-any-remove-reverse ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_975 #AT_START_976 at_fn_group_banner 976 'string-map.at:28' \ "string map -- random-sequence" " " 122 at_xfail=no ( $as_echo "976. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:28: string-map-test random-sequence" at_fn_check_prepare_trace "string-map.at:28" ( $at_check_trace; string-map-test random-sequence ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_976 #AT_START_977 at_fn_group_banner 977 'string-map.at:29' \ "string map -- replace" " " 122 at_xfail=no ( $as_echo "977. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:29: string-map-test replace" at_fn_check_prepare_trace "string-map.at:29" ( $at_check_trace; string-map-test replace ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_977 #AT_START_978 at_fn_group_banner 978 'string-map.at:30' \ "string map -- insert-ordered" " " 122 at_xfail=no ( $as_echo "978. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:30: string-map-test insert-ordered" at_fn_check_prepare_trace "string-map.at:30" ( $at_check_trace; string-map-test insert-ordered ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_978 #AT_START_979 at_fn_group_banner 979 'string-map.at:31' \ "string map -- clear" " " 122 at_xfail=no ( $as_echo "979. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:31: string-map-test clear" at_fn_check_prepare_trace "string-map.at:31" ( $at_check_trace; string-map-test clear ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_979 #AT_START_980 at_fn_group_banner 980 'string-map.at:32' \ "string map -- clone" " " 122 at_xfail=no ( $as_echo "980. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:32: string-map-test clone" at_fn_check_prepare_trace "string-map.at:32" ( $at_check_trace; string-map-test clone ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_980 #AT_START_981 at_fn_group_banner 981 'string-map.at:33' \ "string map -- swap" " " 122 at_xfail=no ( $as_echo "981. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:33: string-map-test swap" at_fn_check_prepare_trace "string-map.at:33" ( $at_check_trace; string-map-test swap ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:33" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_981 #AT_START_982 at_fn_group_banner 982 'string-map.at:34' \ "string map -- node-swap-value" " " 122 at_xfail=no ( $as_echo "982. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:34: string-map-test node-swap-value" at_fn_check_prepare_trace "string-map.at:34" ( $at_check_trace; string-map-test node-swap-value ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_982 #AT_START_983 at_fn_group_banner 983 'string-map.at:35' \ "string map -- insert-map" " " 122 at_xfail=no ( $as_echo "983. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:35: string-map-test insert-map" at_fn_check_prepare_trace "string-map.at:35" ( $at_check_trace; string-map-test insert-map ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_983 #AT_START_984 at_fn_group_banner 984 'string-map.at:36' \ "string map -- replace-map" " " 122 at_xfail=no ( $as_echo "984. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:36: string-map-test replace-map" at_fn_check_prepare_trace "string-map.at:36" ( $at_check_trace; string-map-test replace-map ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_984 #AT_START_985 at_fn_group_banner 985 'string-map.at:37' \ "string map -- get-keys-and-values" " " 122 at_xfail=no ( $as_echo "985. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:37: string-map-test get-keys-and-values" at_fn_check_prepare_trace "string-map.at:37" ( $at_check_trace; string-map-test get-keys-and-values ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_985 #AT_START_986 at_fn_group_banner 986 'string-map.at:38' \ "string map -- destroy-null" " " 122 at_xfail=no ( $as_echo "986. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-map.at:38: string-map-test destroy-null" at_fn_check_prepare_trace "string-map.at:38" ( $at_check_trace; string-map-test destroy-null ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-map.at:38" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_986 #AT_START_987 at_fn_group_banner 987 'stringi-map.at:25' \ "case-insensitive string map -- insert-any-remove-any" "" 123 at_xfail=no ( $as_echo "987. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:25: stringi-map-test insert-any-remove-any" at_fn_check_prepare_trace "stringi-map.at:25" ( $at_check_trace; stringi-map-test insert-any-remove-any ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_987 #AT_START_988 at_fn_group_banner 988 'stringi-map.at:26' \ "case-insensitive string map -- insert-any-remove-same" "" 123 at_xfail=no ( $as_echo "988. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:26: stringi-map-test insert-any-remove-same" at_fn_check_prepare_trace "stringi-map.at:26" ( $at_check_trace; stringi-map-test insert-any-remove-same ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_988 #AT_START_989 at_fn_group_banner 989 'stringi-map.at:27' \ "case-insensitive string map -- insert-any-remove-reverse" "" 123 at_xfail=no ( $as_echo "989. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:27: stringi-map-test insert-any-remove-reverse" at_fn_check_prepare_trace "stringi-map.at:27" ( $at_check_trace; stringi-map-test insert-any-remove-reverse ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_989 #AT_START_990 at_fn_group_banner 990 'stringi-map.at:28' \ "case-insensitive string map -- random-sequence" " " 123 at_xfail=no ( $as_echo "990. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:28: stringi-map-test random-sequence" at_fn_check_prepare_trace "stringi-map.at:28" ( $at_check_trace; stringi-map-test random-sequence ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_990 #AT_START_991 at_fn_group_banner 991 'stringi-map.at:29' \ "case-insensitive string map -- replace" " " 123 at_xfail=no ( $as_echo "991. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:29: stringi-map-test replace" at_fn_check_prepare_trace "stringi-map.at:29" ( $at_check_trace; stringi-map-test replace ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_991 #AT_START_992 at_fn_group_banner 992 'stringi-map.at:30' \ "case-insensitive string map -- insert-ordered" " " 123 at_xfail=no ( $as_echo "992. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:30: stringi-map-test insert-ordered" at_fn_check_prepare_trace "stringi-map.at:30" ( $at_check_trace; stringi-map-test insert-ordered ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_992 #AT_START_993 at_fn_group_banner 993 'stringi-map.at:31' \ "case-insensitive string map -- clear" " " 123 at_xfail=no ( $as_echo "993. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:31: stringi-map-test clear" at_fn_check_prepare_trace "stringi-map.at:31" ( $at_check_trace; stringi-map-test clear ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_993 #AT_START_994 at_fn_group_banner 994 'stringi-map.at:32' \ "case-insensitive string map -- clone" " " 123 at_xfail=no ( $as_echo "994. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:32: stringi-map-test clone" at_fn_check_prepare_trace "stringi-map.at:32" ( $at_check_trace; stringi-map-test clone ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_994 #AT_START_995 at_fn_group_banner 995 'stringi-map.at:33' \ "case-insensitive string map -- swap" " " 123 at_xfail=no ( $as_echo "995. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:33: stringi-map-test swap" at_fn_check_prepare_trace "stringi-map.at:33" ( $at_check_trace; stringi-map-test swap ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:33" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_995 #AT_START_996 at_fn_group_banner 996 'stringi-map.at:34' \ "case-insensitive string map -- node-swap-value" " " 123 at_xfail=no ( $as_echo "996. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:34: stringi-map-test node-swap-value" at_fn_check_prepare_trace "stringi-map.at:34" ( $at_check_trace; stringi-map-test node-swap-value ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_996 #AT_START_997 at_fn_group_banner 997 'stringi-map.at:35' \ "case-insensitive string map -- insert-map" " " 123 at_xfail=no ( $as_echo "997. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:35: stringi-map-test insert-map" at_fn_check_prepare_trace "stringi-map.at:35" ( $at_check_trace; stringi-map-test insert-map ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_997 #AT_START_998 at_fn_group_banner 998 'stringi-map.at:36' \ "case-insensitive string map -- replace-map" " " 123 at_xfail=no ( $as_echo "998. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:36: stringi-map-test replace-map" at_fn_check_prepare_trace "stringi-map.at:36" ( $at_check_trace; stringi-map-test replace-map ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_998 #AT_START_999 at_fn_group_banner 999 'stringi-map.at:37' \ "case-insensitive string map -- get-keys-and-values" "" 123 at_xfail=no ( $as_echo "999. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:37: stringi-map-test get-keys-and-values" at_fn_check_prepare_trace "stringi-map.at:37" ( $at_check_trace; stringi-map-test get-keys-and-values ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_999 #AT_START_1000 at_fn_group_banner 1000 'stringi-map.at:38' \ "case-insensitive string map -- destroy-null" " " 123 at_xfail=no ( $as_echo "1000. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-map.at:38: stringi-map-test destroy-null" at_fn_check_prepare_trace "stringi-map.at:38" ( $at_check_trace; stringi-map-test destroy-null ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-map.at:38" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1000 #AT_START_1001 at_fn_group_banner 1001 'string-set.at:25' \ "string set -- insert-any-remove-any" " " 124 at_xfail=no ( $as_echo "1001. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:25: string-set-test insert-any-remove-any" at_fn_check_prepare_trace "string-set.at:25" ( $at_check_trace; string-set-test insert-any-remove-any ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1001 #AT_START_1002 at_fn_group_banner 1002 'string-set.at:26' \ "string set -- insert-any-remove-same" " " 124 at_xfail=no ( $as_echo "1002. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:26: string-set-test insert-any-remove-same" at_fn_check_prepare_trace "string-set.at:26" ( $at_check_trace; string-set-test insert-any-remove-same ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1002 #AT_START_1003 at_fn_group_banner 1003 'string-set.at:27' \ "string set -- insert-any-remove-reverse" " " 124 at_xfail=no ( $as_echo "1003. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:27: string-set-test insert-any-remove-reverse" at_fn_check_prepare_trace "string-set.at:27" ( $at_check_trace; string-set-test insert-any-remove-reverse ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1003 #AT_START_1004 at_fn_group_banner 1004 'string-set.at:28' \ "string set -- random-sequence" " " 124 at_xfail=no ( $as_echo "1004. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:28: string-set-test random-sequence" at_fn_check_prepare_trace "string-set.at:28" ( $at_check_trace; string-set-test random-sequence ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1004 #AT_START_1005 at_fn_group_banner 1005 'string-set.at:29' \ "string set -- insert-ordered" " " 124 at_xfail=no ( $as_echo "1005. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:29: string-set-test insert-ordered" at_fn_check_prepare_trace "string-set.at:29" ( $at_check_trace; string-set-test insert-ordered ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1005 #AT_START_1006 at_fn_group_banner 1006 'string-set.at:30' \ "string set -- union" " " 124 at_xfail=no ( $as_echo "1006. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:30: string-set-test union" at_fn_check_prepare_trace "string-set.at:30" ( $at_check_trace; string-set-test union ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1006 #AT_START_1007 at_fn_group_banner 1007 'string-set.at:31' \ "string set -- union-and-intersection" " " 124 at_xfail=no ( $as_echo "1007. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:31: string-set-test union-and-intersection" at_fn_check_prepare_trace "string-set.at:31" ( $at_check_trace; string-set-test union-and-intersection ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1007 #AT_START_1008 at_fn_group_banner 1008 'string-set.at:32' \ "string set -- intersect" " " 124 at_xfail=no ( $as_echo "1008. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:32: string-set-test intersect" at_fn_check_prepare_trace "string-set.at:32" ( $at_check_trace; string-set-test intersect ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1008 #AT_START_1009 at_fn_group_banner 1009 'string-set.at:33' \ "string set -- subtract" " " 124 at_xfail=no ( $as_echo "1009. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:33: string-set-test subtract" at_fn_check_prepare_trace "string-set.at:33" ( $at_check_trace; string-set-test subtract ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:33" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1009 #AT_START_1010 at_fn_group_banner 1010 'string-set.at:34' \ "string set -- swap" " " 124 at_xfail=no ( $as_echo "1010. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:34: string-set-test swap" at_fn_check_prepare_trace "string-set.at:34" ( $at_check_trace; string-set-test swap ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1010 #AT_START_1011 at_fn_group_banner 1011 'string-set.at:35' \ "string set -- clear" " " 124 at_xfail=no ( $as_echo "1011. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:35: string-set-test clear" at_fn_check_prepare_trace "string-set.at:35" ( $at_check_trace; string-set-test clear ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1011 #AT_START_1012 at_fn_group_banner 1012 'string-set.at:36' \ "string set -- clone" " " 124 at_xfail=no ( $as_echo "1012. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:36: string-set-test clone" at_fn_check_prepare_trace "string-set.at:36" ( $at_check_trace; string-set-test clone ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1012 #AT_START_1013 at_fn_group_banner 1013 'string-set.at:37' \ "string set -- destroy-null" " " 124 at_xfail=no ( $as_echo "1013. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/string-set.at:37: string-set-test destroy-null" at_fn_check_prepare_trace "string-set.at:37" ( $at_check_trace; string-set-test destroy-null ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/string-set.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1013 #AT_START_1014 at_fn_group_banner 1014 'stringi-set.at:25' \ "case-insensitive string set -- insert-any-remove-any" "" 125 at_xfail=no ( $as_echo "1014. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:25: stringi-set-test insert-any-remove-any" at_fn_check_prepare_trace "stringi-set.at:25" ( $at_check_trace; stringi-set-test insert-any-remove-any ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1014 #AT_START_1015 at_fn_group_banner 1015 'stringi-set.at:26' \ "case-insensitive string set -- insert-any-remove-same" "" 125 at_xfail=no ( $as_echo "1015. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:26: stringi-set-test insert-any-remove-same" at_fn_check_prepare_trace "stringi-set.at:26" ( $at_check_trace; stringi-set-test insert-any-remove-same ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1015 #AT_START_1016 at_fn_group_banner 1016 'stringi-set.at:27' \ "case-insensitive string set -- insert-any-remove-reverse" "" 125 at_xfail=no ( $as_echo "1016. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:27: stringi-set-test insert-any-remove-reverse" at_fn_check_prepare_trace "stringi-set.at:27" ( $at_check_trace; stringi-set-test insert-any-remove-reverse ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1016 #AT_START_1017 at_fn_group_banner 1017 'stringi-set.at:28' \ "case-insensitive string set -- random-sequence" " " 125 at_xfail=no ( $as_echo "1017. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:28: stringi-set-test random-sequence" at_fn_check_prepare_trace "stringi-set.at:28" ( $at_check_trace; stringi-set-test random-sequence ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1017 #AT_START_1018 at_fn_group_banner 1018 'stringi-set.at:29' \ "case-insensitive string set -- insert-ordered" " " 125 at_xfail=no ( $as_echo "1018. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:29: stringi-set-test insert-ordered" at_fn_check_prepare_trace "stringi-set.at:29" ( $at_check_trace; stringi-set-test insert-ordered ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:29" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1018 #AT_START_1019 at_fn_group_banner 1019 'stringi-set.at:30' \ "case-insensitive string set -- union" " " 125 at_xfail=no ( $as_echo "1019. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:30: stringi-set-test union" at_fn_check_prepare_trace "stringi-set.at:30" ( $at_check_trace; stringi-set-test union ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:30" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1019 #AT_START_1020 at_fn_group_banner 1020 'stringi-set.at:31' \ "case-insensitive string set -- union-and-intersection" "" 125 at_xfail=no ( $as_echo "1020. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:31: stringi-set-test union-and-intersection" at_fn_check_prepare_trace "stringi-set.at:31" ( $at_check_trace; stringi-set-test union-and-intersection ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:31" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1020 #AT_START_1021 at_fn_group_banner 1021 'stringi-set.at:32' \ "case-insensitive string set -- intersect" " " 125 at_xfail=no ( $as_echo "1021. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:32: stringi-set-test intersect" at_fn_check_prepare_trace "stringi-set.at:32" ( $at_check_trace; stringi-set-test intersect ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1021 #AT_START_1022 at_fn_group_banner 1022 'stringi-set.at:33' \ "case-insensitive string set -- subtract" " " 125 at_xfail=no ( $as_echo "1022. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:33: stringi-set-test subtract" at_fn_check_prepare_trace "stringi-set.at:33" ( $at_check_trace; stringi-set-test subtract ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:33" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1022 #AT_START_1023 at_fn_group_banner 1023 'stringi-set.at:34' \ "case-insensitive string set -- swap" " " 125 at_xfail=no ( $as_echo "1023. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:34: stringi-set-test swap" at_fn_check_prepare_trace "stringi-set.at:34" ( $at_check_trace; stringi-set-test swap ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:34" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1023 #AT_START_1024 at_fn_group_banner 1024 'stringi-set.at:35' \ "case-insensitive string set -- clear" " " 125 at_xfail=no ( $as_echo "1024. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:35: stringi-set-test clear" at_fn_check_prepare_trace "stringi-set.at:35" ( $at_check_trace; stringi-set-test clear ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:35" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1024 #AT_START_1025 at_fn_group_banner 1025 'stringi-set.at:36' \ "case-insensitive string set -- clone" " " 125 at_xfail=no ( $as_echo "1025. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:36: stringi-set-test clone" at_fn_check_prepare_trace "stringi-set.at:36" ( $at_check_trace; stringi-set-test clone ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:36" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1025 #AT_START_1026 at_fn_group_banner 1026 'stringi-set.at:37' \ "case-insensitive string set -- destroy-null" " " 125 at_xfail=no ( $as_echo "1026. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/stringi-set.at:37: stringi-set-test destroy-null" at_fn_check_prepare_trace "stringi-set.at:37" ( $at_check_trace; stringi-set-test destroy-null ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/stringi-set.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1026 #AT_START_1027 at_fn_group_banner 1027 'tower.at:24' \ "tower -- insert" " " 126 at_xfail=no ( $as_echo "1027. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/tower.at:24: tower-test insert" at_fn_check_prepare_trace "tower.at:24" ( $at_check_trace; tower-test insert ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/tower.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1027 #AT_START_1028 at_fn_group_banner 1028 'tower.at:25' \ "tower -- delete" " " 126 at_xfail=no ( $as_echo "1028. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/tower.at:25: tower-test delete" at_fn_check_prepare_trace "tower.at:25" ( $at_check_trace; tower-test delete ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/tower.at:25" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1028 #AT_START_1029 at_fn_group_banner 1029 'tower.at:26' \ "tower -- resize" " " 126 at_xfail=no ( $as_echo "1029. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/tower.at:26: tower-test resize" at_fn_check_prepare_trace "tower.at:26" ( $at_check_trace; tower-test resize ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/tower.at:26" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1029 #AT_START_1030 at_fn_group_banner 1030 'tower.at:27' \ "tower -- splice-out" " " 126 at_xfail=no ( $as_echo "1030. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/tower.at:27: tower-test splice-out" at_fn_check_prepare_trace "tower.at:27" ( $at_check_trace; tower-test splice-out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/tower.at:27" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1030 #AT_START_1031 at_fn_group_banner 1031 'tower.at:28' \ "tower -- splice-in" " " 126 at_xfail=no ( $as_echo "1031. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/tower.at:28: tower-test splice-in" at_fn_check_prepare_trace "tower.at:28" ( $at_check_trace; tower-test splice-in ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/tower.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1031 #AT_START_1032 at_fn_group_banner 1032 'u8-istream.at:19' \ "read ASCII" " " 127 at_xfail=no ( $as_echo "1032. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:21: i18n-test supports_encodings ASCII" at_fn_check_prepare_trace "u8-istream.at:21" ( $at_check_trace; i18n-test supports_encodings ASCII ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:21" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:22: echo string | u8-istream-test read - ASCII" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:22" ( $at_check_trace; echo string | u8-istream-test read - ASCII ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "string " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:22" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1032 #AT_START_1033 at_fn_group_banner 1033 'u8-istream.at:26' \ "read UTF-8" " " 127 at_xfail=no ( $as_echo "1033. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:28: printf '\\346\\227\\245\\346\\234\\254\\350\\252\\236\\n' | u8-istream-test read - UTF-8" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:28" ( $at_check_trace; printf '\346\227\245\346\234\254\350\252\236\n' | u8-istream-test read - UTF-8 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-8 mode 日本語 UTF-8 mode " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:28" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1033 #AT_START_1034 at_fn_group_banner 1034 'u8-istream.at:35' \ "read EUC-JP" " " 127 at_xfail=no ( $as_echo "1034. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:37: i18n-test supports_encodings EUC-JP" at_fn_check_prepare_trace "u8-istream.at:37" ( $at_check_trace; i18n-test supports_encodings EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:37" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:38: printf '\\244\\241 \\244\\242 \\244\\243 \\244\\244 \\244\\245 \\244\\246 \\244\\247 \\244\\250 \\244\\251 \\244\\252\\n' | u8-istream-test read - EUC-JP" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:38" ( $at_check_trace; printf '\244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 \244\250 \244\251 \244\252\n' | u8-istream-test read - EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "ぁ あ ぃ い ぅ う ぇ え ぉ お " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:38" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1034 #AT_START_1035 at_fn_group_banner 1035 'u8-istream.at:44' \ "read UTF-8 with character split across input buffers" "" 127 at_xfail=no ( $as_echo "1035. $at_setup_line: testing $at_desc ..." $at_traceon buffer_size=`u8-istream-test buffer-size` ($PERL -e "print 'x' x ($buffer_size - 16)" printf '\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\n') > input (echo "UTF-8 mode" cat input echo "UTF-8 mode") > expout { set +x $as_echo "$at_srcdir/u8-istream.at:52: u8-istream-test read input UTF-8 16" at_fn_check_prepare_trace "u8-istream.at:52" ( $at_check_trace; u8-istream-test read input UTF-8 16 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:52" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1035 #AT_START_1036 at_fn_group_banner 1036 'u8-istream.at:55' \ "read UTF-8 with character split across output buffers" "" 127 at_xfail=no ( $as_echo "1036. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:57: printf '\\343\\201\\201\\343\\201\\202\\343\\201\\203\\343\\201\\204\\343\\201\\205\\343\\201\\206\\343\\201\\207\\343\\201\\210\\343\\201\\211\\343\\201\\212\\n' | u8-istream-test read - UTF-8 16" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:57" ( $at_check_trace; printf '\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\n' | u8-istream-test read - UTF-8 16 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-8 mode ぁあぃいぅうぇえぉお UTF-8 mode " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:57" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1036 #AT_START_1037 at_fn_group_banner 1037 'u8-istream.at:64' \ "read UTF-8 with character split across input and output buffers" "" 127 at_xfail=no ( $as_echo "1037. $at_setup_line: testing $at_desc ..." $at_traceon buffer_size=`u8-istream-test buffer-size` ($PERL -e "print 'x' x ($buffer_size - 16)" printf '\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\n') > input (echo "UTF-8 mode" cat input echo "UTF-8 mode") > expout { set +x $as_echo "$at_srcdir/u8-istream.at:72: u8-istream-test read input UTF-8 16" at_fn_check_prepare_trace "u8-istream.at:72" ( $at_check_trace; u8-istream-test read input UTF-8 16 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:72" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1037 #AT_START_1038 at_fn_group_banner 1038 'u8-istream.at:75' \ "read EUC-JP with character split across input buffers" "" 127 at_xfail=no ( $as_echo "1038. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:77: i18n-test supports_encodings EUC-JP" at_fn_check_prepare_trace "u8-istream.at:77" ( $at_check_trace; i18n-test supports_encodings EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:77" $at_failed && at_fn_log_failure $at_traceon; } buffer_size=`u8-istream-test buffer-size` ($PERL -e "print 'x' x ($buffer_size - 16)" printf '\244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 ' printf '\244\250 \244\251 \244\252\n') > input ($PERL -e "print 'x' x ($buffer_size - 16)" printf '\343\201\201\040\343\201\202\040\343\201\203\040\343\201\204\040' printf '\343\201\205\040\343\201\206\040\343\201\207\040\343\201\210\040' printf '\343\201\211\040\343\201\212\n') > expout { set +x $as_echo "$at_srcdir/u8-istream.at:86: u8-istream-test read input EUC-JP" at_fn_check_prepare_trace "u8-istream.at:86" ( $at_check_trace; u8-istream-test read input EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:86" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1038 #AT_START_1039 at_fn_group_banner 1039 'u8-istream.at:89' \ "read EUC-JP with character split across output buffers" "" 127 at_xfail=no ( $as_echo "1039. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:91: i18n-test supports_encodings EUC-JP" at_fn_check_prepare_trace "u8-istream.at:91" ( $at_check_trace; i18n-test supports_encodings EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:91" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:92: printf '\\244\\241\\244\\242\\244\\243\\244\\244\\244\\245\\244\\246\\244\\247\\244\\250\\244\\251\\244\\252\\n' | u8-istream-test read - EUC-JP 16" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:92" ( $at_check_trace; printf '\244\241\244\242\244\243\244\244\244\245\244\246\244\247\244\250\244\251\244\252\n' | u8-istream-test read - EUC-JP 16 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "ぁあぃいぅうぇえぉお " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:92" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1039 #AT_START_1040 at_fn_group_banner 1040 'u8-istream.at:98' \ "read EUC-JP with character split across input and output buffers" "" 127 at_xfail=no ( $as_echo "1040. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:100: i18n-test supports_encodings EUC-JP" at_fn_check_prepare_trace "u8-istream.at:100" ( $at_check_trace; i18n-test supports_encodings EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:100" $at_failed && at_fn_log_failure $at_traceon; } buffer_size=`u8-istream-test buffer-size` ($PERL -e "print 'x' x ($buffer_size - 16)" printf 'xyz\244\241\244\242\244\243\244\244\244\245\244\246\244\247\244\250' printf '\244\251\244\252\n') > input ($PERL -e "print 'x' x ($buffer_size - 16)" printf '\170\171\172\343\201\201\343\201\202\343\201\203\343\201\204\343' printf '\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201' printf '\212\n') > expout { set +x $as_echo "$at_srcdir/u8-istream.at:109: u8-istream-test read input EUC-JP 16" at_fn_check_prepare_trace "u8-istream.at:109" ( $at_check_trace; u8-istream-test read input EUC-JP 16 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:109" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1040 #AT_START_1041 at_fn_group_banner 1041 'u8-istream.at:112' \ "read ASCII as Auto" " " 127 at_xfail=no ( $as_echo "1041. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:114: echo string | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:114" ( $at_check_trace; echo string | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Auto mode string Auto mode " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:114" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1041 #AT_START_1042 at_fn_group_banner 1042 'u8-istream.at:121' \ "read UTF-8 as Auto" " " 127 at_xfail=no ( $as_echo "1042. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:123: printf 'entr\\303\\251e\\n' | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:123" ( $at_check_trace; printf 'entr\303\251e\n' | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Auto mode entrée UTF-8 mode " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:123" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:128: printf '\\357\\273\\277entr\\303\\251e\\n' | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:128" ( $at_check_trace; printf '\357\273\277entr\303\251e\n' | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "UTF-8 mode entrée UTF-8 mode " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:128" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1042 #AT_START_1043 at_fn_group_banner 1043 'u8-istream.at:135' \ "read ISO-8859-1 as Auto,ISO-8859-1" " " 127 at_xfail=no ( $as_echo "1043. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:137: i18n-test supports_encodings ISO-8859-1" at_fn_check_prepare_trace "u8-istream.at:137" ( $at_check_trace; i18n-test supports_encodings ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:137" $at_failed && at_fn_log_failure $at_traceon; } buffer_size=`u8-istream-test buffer-size` ($PERL -e 'print "xyzzy\n" x int('$buffer_size' * 2.5 / 7)'; printf 'entr\351e\n') > input (echo "Auto mode" $PERL -e 'print "xyzzy\n" x int('$buffer_size' * 2.5 / 7)' printf 'entr\303\251e\n') > expout { set +x $as_echo "$at_srcdir/u8-istream.at:143: u8-istream-test read input Auto,ISO-8859-1" at_fn_check_prepare_trace "u8-istream.at:143" ( $at_check_trace; u8-istream-test read input Auto,ISO-8859-1 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:143" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1043 #AT_START_1044 at_fn_group_banner 1044 'u8-istream.at:147' \ "read UTF-16BE as Auto,UTF-16BE" " " 127 at_xfail=no ( $as_echo "1044. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:149: i18n-test supports_encodings UTF-16BE" at_fn_check_prepare_trace "u8-istream.at:149" ( $at_check_trace; i18n-test supports_encodings UTF-16BE ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:149" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:150: printf '\\0e\\0n\\0t\\0r\\0\\351\\0e\\0\\n' | u8-istream-test read - Auto,UTF-16BE" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:150" ( $at_check_trace; printf '\0e\0n\0t\0r\0\351\0e\0\n' | u8-istream-test read - Auto,UTF-16BE ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "entrée " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:150" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1044 #AT_START_1045 at_fn_group_banner 1045 'u8-istream.at:156' \ "read UTF-16 as Auto" " " 127 at_xfail=no ( $as_echo "1045. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:158: i18n-test supports_encodings UTF-16 UTF-16BE UTF-16LE" at_fn_check_prepare_trace "u8-istream.at:158" ( $at_check_trace; i18n-test supports_encodings UTF-16 UTF-16BE UTF-16LE ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:158" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:161: { printf '\\0e\\0n\\0t\\0'; sleep 1; printf 'r\\0\\351\\0e\\0\\n'; } | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:161" ( $at_check_trace; { printf '\0e\0n\0t\0'; sleep 1; printf 'r\0\351\0e\0\n'; } | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "entrée " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:161" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:164: printf 'e\\0n\\0t\\0r\\0\\351\\0e\\0\\n\\0' | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:164" ( $at_check_trace; printf 'e\0n\0t\0r\0\351\0e\0\n\0' | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "entrée " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:164" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:167: printf '\\376\\377\\0e\\0n\\0t\\0r\\0\\351\\0e\\0\\n' | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:167" ( $at_check_trace; printf '\376\377\0e\0n\0t\0r\0\351\0e\0\n' | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "entrée " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:167" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:170: printf '\\377\\376e\\0n\\0t\\0r\\0\\351\\0e\\0\\n\\0' | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:170" ( $at_check_trace; printf '\377\376e\0n\0t\0r\0\351\0e\0\n\0' | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "entrée " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:170" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1045 #AT_START_1046 at_fn_group_banner 1046 'u8-istream.at:175' \ "read UTF-32 as Auto" " " 127 at_xfail=no ( $as_echo "1046. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:177: i18n-test supports_encodings UTF-16 UTF-16BE UTF-16LE" at_fn_check_prepare_trace "u8-istream.at:177" ( $at_check_trace; i18n-test supports_encodings UTF-16 UTF-16BE UTF-16LE ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:177" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:178: printf '\\0\\0\\0e\\0\\0\\0n\\0\\0\\0t\\0\\0\\0r\\0\\0\\0\\351\\0\\0\\0e\\0\\0\\0\\n' | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:178" ( $at_check_trace; printf '\0\0\0e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n' | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "entrée " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:178" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:181: printf 'e\\0\\0\\0n\\0\\0\\0t\\0\\0\\0r\\0\\0\\0\\351\\0\\0\\0e\\0\\0\\0\\n\\0\\0\\0' | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:181" ( $at_check_trace; printf 'e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n\0\0\0' | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "entrée " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:181" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:184: printf '\\0\\0\\376\\377\\0\\0\\0e\\0\\0\\0n\\0\\0\\0t\\0\\0\\0r\\0\\0\\0\\351\\0\\0\\0e\\0\\0\\0\\n' | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:184" ( $at_check_trace; printf '\0\0\376\377\0\0\0e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n' | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "entrée " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:184" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:187: printf '\\377\\376\\0\\0e\\0\\0\\0n\\0\\0\\0t\\0\\0\\0r\\0\\0\\0\\351\\0\\0\\0e\\0\\0\\0\\n\\0\\0\\0' | u8-istream-test read - Auto" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:187" ( $at_check_trace; printf '\377\376\0\0e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n\0\0\0' | u8-istream-test read - Auto ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "entrée " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:187" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1046 #AT_START_1047 at_fn_group_banner 1047 'u8-istream.at:192' \ "read EUC-JP as Auto,EUC-JP" " " 127 at_xfail=no ( $as_echo "1047. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/u8-istream.at:194: i18n-test supports_encodings EUC-JP" at_fn_check_prepare_trace "u8-istream.at:194" ( $at_check_trace; i18n-test supports_encodings EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:194" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/u8-istream.at:195: printf 'entr\\217\\253\\261e\\n' | u8-istream-test read - Auto,EUC-JP" at_fn_check_prepare_notrace 'a shell pipeline' "u8-istream.at:195" ( $at_check_trace; printf 'entr\217\253\261e\n' | u8-istream-test read - Auto,EUC-JP ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "entrée " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/u8-istream.at:195" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1047 #AT_START_1048 at_fn_group_banner 1048 'zip.at:19' \ "Basic zip - unzip test" " " 128 at_xfail=no ( $as_echo "1048. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/zip.at:22: here=\`pwd\` dir1=\$here/original dir2=\$here/recovered mkdir -p \$dir1 # Generate files of differing sizes with random data in them names=\"\" s=1; while test \$s -le 8192 ; do name=\$dir1/\$s dd if=/dev/urandom of=\$name count=1 bs=\$s 2> /dev/null s=\$((\$s * 2)); bn=\`basename \$name\`; names=\"\$names \$bn\"; done (cd \$dir1 && zip-test w foo.zip \$names) mkdir -p \$dir2 cp \$dir1/foo.zip \$dir2 cd \$dir2 zip-test r foo.zip \$names # Compare the files to their originals for f in \$names; do diff \$dir1/\$f \$dir2/\$f; if test \$? -ne 0 ; then exit 1; fi; done exit 0 " at_fn_check_prepare_notrace 'a `...` command substitution' "zip.at:22" ( $at_check_trace; here=`pwd` dir1=$here/original dir2=$here/recovered mkdir -p $dir1 # Generate files of differing sizes with random data in them names="" s=1; while test $s -le 8192 ; do name=$dir1/$s dd if=/dev/urandom of=$name count=1 bs=$s 2> /dev/null s=$(($s * 2)); bn=`basename $name`; names="$names $bn"; done (cd $dir1 && zip-test w foo.zip $names) mkdir -p $dir2 cp $dir1/foo.zip $dir2 cd $dir2 zip-test r foo.zip $names # Compare the files to their originals for f in $names; do diff $dir1/$f $dir2/$f; if test $? -ne 0 ; then exit 1; fi; done exit 0 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/zip.at:22" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1048 #AT_START_1049 at_fn_group_banner 1049 'chart-geometry.at:19' \ "Chart Scale" " " 129 at_xfail=no ( $as_echo "1049. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/chart-geometry.at:20: ../../math/chart-get-scale-test" at_fn_check_prepare_trace "chart-geometry.at:20" ( $at_check_trace; ../../math/chart-get-scale-test ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/chart-geometry.at:20" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1049 #AT_START_1050 at_fn_group_banner 1050 'chart-geometry.at:23' \ "Chart Ticks Format" " " 129 at_xfail=no ( $as_echo "1050. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/chart-geometry.at:24: ../../math/chart-get-ticks-format-test" at_fn_check_prepare_trace "chart-geometry.at:24" ( $at_check_trace; ../../math/chart-get-ticks-format-test ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "lower: 1000, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 1030, ex 2: 1040 lower: 10000, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 10030, ex 2: 10040 lower: 100000, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 100030, ex 2: 100040 lower: 1e+06, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 1000030, ex 2: 1000040 lower: 1e+07, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 10000030, ex 2: 10000040 lower: 1e+08, interval: 10, nticks: 10, fs: %.0lf, scale: 1, ex: 100000030, ex 2: 100000040 lower: 0.1, interval: 0.01, nticks: 10, fs: %.2lf, scale: 1, ex: 0.13, ex 2: 0.14 lower: 0.01, interval: 0.001, nticks: 10, fs: %.3lf, scale: 1, ex: 0.013, ex 2: 0.014 lower: 0.001, interval: 0.0001, nticks: 10, fs: %.4lf, scale: 1, ex: 0.0013, ex 2: 0.0014 lower: 0.0001, interval: 1e-05, nticks: 10, fs: %.1lf×10-4, scale: 10000, ex: 1.3×10-4, ex 2: 1.4×10-4 lower: 1e-05, interval: 1e-07, nticks: 10, fs: %.2lf×10-5, scale: 100000, ex: 1.03×10-5, ex 2: 1.04×10-5 lower: 1e-07, interval: 1e-08, nticks: 10, fs: %.1lf×10-7, scale: 1e+07, ex: 1.3×10-7, ex 2: 1.4×10-7 lower: -5, interval: 1, nticks: 10, fs: %.0lf, scale: 1, ex: -2, ex 2: -1 lower: -5, interval: 0.5, nticks: 10, fs: %.1lf, scale: 1, ex: -3.5, ex 2: -3.0 lower: -5, interval: 0.2, nticks: 9, fs: %.1lf, scale: 1, ex: -4.4, ex 2: -4.2 lower: -5, interval: 2, nticks: 10, fs: %.0lf, scale: 1, ex: 1, ex 2: 3 lower: -0.5, interval: 0.1, nticks: 9, fs: %.1lf, scale: 1, ex: -0.2, ex 2: -0.1 lower: 9.75e+08, interval: 5e+06, nticks: 9, fs: %.3lf×109, scale: 1e-09, ex: 0.990×109, ex 2: 0.995×109 lower: 9.7e+08, interval: 1e+07, nticks: 9, fs: %.2lf×109, scale: 1e-09, ex: 1.00×109, ex 2: 1.01×109 lower: -4e+07, interval: 1e+07, nticks: 9, fs: %.0lf×107, scale: 1e-07, ex: -1×107, ex 2: 0×107 lower: -3e+07, interval: 5e+06, nticks: 9, fs: %.1lf×107, scale: 1e-07, ex: -1.5×107, ex 2: -1.0×107 lower: 1.001e-95, interval: 2e-99, nticks: 10, fs: %.4lf×10-95, scale: 1e+95, ex: 1.0016×10-95, ex 2: 1.0018×10-95 lower: 1.001e+98, interval: 2e+94, nticks: 10, fs: %.4lf×1098, scale: 1e-98, ex: 1.0016×1098, ex 2: 1.0018×1098 lower: 5984, interval: 1e-05, nticks: 10, fs: %.5lf, scale: 1, ex: 5984.00003, ex 2: 5984.00004 lower: 3e+33, interval: 1e-22, nticks: 10, fs: %lg, scale: 1, ex: 3e+33, ex 2: 3e+33 lower: 3e+33, interval: 1000, nticks: 10, fs: %.8lf×1033, scale: 1e-33, ex: 3.00000000×1033, ex 2: 3.00000000×1033 lower: 0.1, interval: 2e-42, nticks: 10, fs: %.8lf, scale: 1, ex: 0.10000000, ex 2: 0.10000000 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/chart-geometry.at:24" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1050 #AT_START_1051 at_fn_group_banner 1051 'moments.at:44' \ "two-pass moments" " " 130 at_xfail=no ( $as_echo "1051. $at_setup_line: testing $at_desc ..." $at_traceon cat >moments.sps <<'_ATEOF' DEBUG MOMENTS /1 2 3 4. DEBUG MOMENTS /1*5 2*5 3*5 4*5. DEBUG MOMENTS /1*1 2*2 3*3 4*4. DEBUG MOMENTS /1*0. DEBUG MOMENTS /1*1. DEBUG MOMENTS /1*2. DEBUG MOMENTS /1*3. DEBUG MOMENTS /1*2 3. DEBUG MOMENTS /1 1.00000001. DEBUG MOMENTS /1000001 1000002 1000003 1000004. _ATEOF { set +x $as_echo "$at_srcdir/moments.at:44: pspp --testing-mode --no-output moments.sps" at_fn_check_prepare_trace "moments.at:44" ( $at_check_trace; pspp --testing-mode --no-output moments.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo >>"$at_stderr"; $as_echo "W=4.000 M1=2.500 M2=1.667 M3=0.000 M4=-1.200 W=20.000 M1=2.500 M2=1.316 M3=0.000 M4=-1.401 W=10.000 M1=3.000 M2=1.111 M3=-0.712 M4=-0.450 W=0.000 M1=sysmis M2=sysmis M3=sysmis M4=sysmis W=1.000 M1=1.000 M2=sysmis M3=sysmis M4=sysmis W=2.000 M1=1.000 M2=0.000 M3=sysmis M4=sysmis W=3.000 M1=1.000 M2=0.000 M3=sysmis M4=sysmis W=3.000 M1=1.667 M2=1.333 M3=1.732 M4=sysmis W=2.000 M1=1.000 M2=0.000 M3=sysmis M4=sysmis W=4.000 M1=1000002.500 M2=1.667 M3=0.000 M4=-1.200 " | \ $at_diff - "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/moments.at:44" $at_failed && at_fn_log_failure \ "moments.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1051 #AT_START_1052 at_fn_group_banner 1052 'moments.at:45' \ "one-pass moments" " " 130 at_xfail=no ( $as_echo "1052. $at_setup_line: testing $at_desc ..." $at_traceon cat >moments.sps <<'_ATEOF' DEBUG MOMENTS ONEPASS/1 2 3 4. DEBUG MOMENTS ONEPASS/1*5 2*5 3*5 4*5. DEBUG MOMENTS ONEPASS/1*1 2*2 3*3 4*4. DEBUG MOMENTS ONEPASS/1*0. DEBUG MOMENTS ONEPASS/1*1. DEBUG MOMENTS ONEPASS/1*2. DEBUG MOMENTS ONEPASS/1*3. DEBUG MOMENTS ONEPASS/1*2 3. DEBUG MOMENTS ONEPASS/1 1.00000001. DEBUG MOMENTS ONEPASS/1000001 1000002 1000003 1000004. _ATEOF { set +x $as_echo "$at_srcdir/moments.at:45: pspp --testing-mode --no-output moments.sps" at_fn_check_prepare_trace "moments.at:45" ( $at_check_trace; pspp --testing-mode --no-output moments.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo >>"$at_stderr"; $as_echo "W=4.000 M1=2.500 M2=1.667 M3=0.000 M4=-1.200 W=20.000 M1=2.500 M2=1.316 M3=0.000 M4=-1.401 W=10.000 M1=3.000 M2=1.111 M3=-0.712 M4=-0.450 W=0.000 M1=sysmis M2=sysmis M3=sysmis M4=sysmis W=1.000 M1=1.000 M2=sysmis M3=sysmis M4=sysmis W=2.000 M1=1.000 M2=0.000 M3=sysmis M4=sysmis W=3.000 M1=1.000 M2=0.000 M3=sysmis M4=sysmis W=3.000 M1=1.667 M2=1.333 M3=1.732 M4=sysmis W=2.000 M1=1.000 M2=0.000 M3=sysmis M4=sysmis W=4.000 M1=1000002.500 M2=1.667 M3=0.000 M4=-1.200 " | \ $at_diff - "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/moments.at:45" $at_failed && at_fn_log_failure \ "moments.sps" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1052 #AT_START_1053 at_fn_group_banner 1053 'randist.at:102' \ "random distributions -- beta" " " 131 at_xfail=no ( $as_echo "1053. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >beta.in <<'_ATEOF' P a b x cdf pdf .01 .75 .25 .0107 .0100 .7059 .01 .75 .50 .0047 .0100 1.5975 .01 .75 1.00 .0022 .0100 3.4812 .01 .75 1.50 .0014 .0100 5.4014 .01 .75 2.00 .0010 .0100 7.3328 .01 .75 2.50 .0008 .0100 9.2691 .01 .75 3.00 .0007 .0100 11.2077 .01 1.00 .25 .0394 .0100 .2577 .01 1.00 .50 .0199 .0100 .5051 .01 1.00 1.00 .0100 .0100 1.0000 .01 1.00 1.50 .0067 .0100 1.4950 .01 1.00 2.00 .0050 .0100 1.9900 .01 1.00 2.50 .0040 .0100 2.4850 .01 1.00 3.00 .0033 .0100 2.9800 .01 1.50 .25 .1343 .0100 .1168 .01 1.50 .50 .0808 .0100 .1888 .01 1.50 1.00 .0464 .0100 .3232 .01 1.50 1.50 .0328 .0100 .4538 .01 1.50 2.00 .0255 .0100 .5831 .01 1.50 2.50 .0208 .0100 .7118 .01 1.50 3.00 .0176 .0100 .8402 .10 .75 .25 .2094 .1000 .3968 .10 .75 .50 .0985 .1000 .7845 .10 .75 1.00 .0464 .1000 1.6158 .10 .75 1.50 .0302 .1000 2.4656 .10 .75 2.00 .0223 .1000 3.3210 .10 .75 2.50 .0177 .1000 4.1787 .10 .75 3.00 .0146 .1000 5.0376 .10 1.00 .25 .3439 .1000 .3429 .10 1.00 .50 .1900 .1000 .5556 .10 1.00 1.00 .1000 .1000 1.0000 .10 1.00 1.50 .0678 .1000 1.4482 .10 1.00 2.00 .0513 .1000 1.8974 .10 1.00 2.50 .0413 .1000 2.3469 .10 1.00 3.00 .0345 .1000 2.7965 .10 1.50 .25 .5280 .1000 .3650 .10 1.50 .50 .3514 .1000 .4685 .10 1.50 1.00 .2154 .1000 .6962 .10 1.50 1.50 .1565 .1000 .9252 .10 1.50 2.00 .1231 .1000 1.1537 .10 1.50 2.50 .1015 .1000 1.3821 .10 1.50 3.00 .0864 .1000 1.6102 .20 .75 .25 .4559 .2000 .4324 .20 .75 .50 .2372 .2000 .6847 .20 .75 1.00 .1170 .2000 1.2825 .20 .75 1.50 .0770 .2000 1.9025 .20 .75 2.00 .0573 .2000 2.5285 .20 .75 2.50 .0456 .2000 3.1569 .20 .75 3.00 .0379 .2000 3.7865 .20 1.00 .25 .5904 .2000 .4883 .20 1.00 .50 .3600 .2000 .6250 .20 1.00 1.00 .2000 .2000 1.0000 .20 1.00 1.50 .1382 .2000 1.3925 .20 1.00 2.00 .1056 .2000 1.7889 .20 1.00 2.50 .0854 .2000 2.1867 .20 1.00 3.00 .0717 .2000 2.5853 .20 1.50 .25 .7324 .2000 .6579 .20 1.50 .50 .5280 .2000 .6733 .20 1.50 1.00 .3420 .2000 .8772 .20 1.50 1.50 .2541 .2000 1.1086 .20 1.50 2.00 .2024 .2000 1.3456 .20 1.50 2.50 .1683 .2000 1.5847 .20 1.50 3.00 .1441 .2000 1.8249 .30 .75 .25 .6615 .3000 .5624 .30 .75 .50 .3852 .3000 .6756 .30 .75 1.00 .2008 .3000 1.1204 .30 .75 1.50 .1346 .3000 1.6023 .30 .75 2.00 .1010 .3000 2.0929 .30 .75 2.50 .0808 .3000 2.5868 .30 .75 3.00 .0673 .3000 3.0823 .30 1.00 .25 .7599 .3000 .7289 .30 1.00 .50 .5100 .3000 .7143 .30 1.00 1.00 .3000 .3000 1.0000 .30 1.00 1.50 .2116 .3000 1.3319 .30 1.00 2.00 .1633 .3000 1.6733 .30 1.00 2.50 .1330 .3000 2.0184 .30 1.00 3.00 .1121 .3000 2.3651 .30 1.50 .25 .8510 .3000 1.1004 .30 1.50 .50 .6576 .3000 .8823 .30 1.50 1.00 .4481 .3000 1.0041 .30 1.50 1.50 .3402 .3000 1.2064 .30 1.50 2.00 .2743 .3000 1.4253 .30 1.50 2.50 .2298 .3000 1.6503 .30 1.50 3.00 .1978 .3000 1.8782 .40 .75 .25 .8106 .4000 .8261 .40 .75 .50 .5300 .4000 .7134 .40 .75 1.00 .2947 .4000 1.0179 .40 .75 1.50 .2017 .4000 1.3908 .40 .75 2.00 .1530 .4000 1.7776 .40 .75 2.50 .1231 .4000 2.1695 .40 .75 3.00 .1029 .4000 2.5638 .40 1.00 .25 .8704 .4000 1.1574 .40 1.00 .50 .6400 .4000 .8333 .40 1.00 1.00 .4000 .4000 1.0000 .40 1.00 1.50 .2886 .4000 1.2651 .40 1.00 2.00 .2254 .4000 1.5492 .40 1.00 2.50 .1848 .4000 1.8401 .40 1.00 3.00 .1566 .4000 2.1341 .40 1.50 .25 .9219 .4000 1.8596 .40 1.50 .50 .7581 .4000 1.1269 .40 1.50 1.00 .5429 .4000 1.1052 .40 1.50 1.50 .4211 .4000 1.2573 .40 1.50 2.00 .3438 .4000 1.4428 .40 1.50 2.50 .2904 .4000 1.6405 .40 1.50 3.00 .2514 .4000 1.8440 .50 .75 .25 .9067 .5000 1.3662 .50 .75 .50 .6633 .5000 .7969 .50 .75 1.00 .3969 .5000 .9449 .50 .75 1.50 .2786 .5000 1.2197 .50 .75 2.00 .2139 .5000 1.5170 .50 .75 2.50 .1734 .5000 1.8224 .50 .75 3.00 .1458 .5000 2.1314 .50 1.00 .25 .9375 .5000 2.0000 .50 1.00 .50 .7500 .5000 1.0000 .50 1.00 1.00 .5000 .5000 1.0000 .50 1.00 1.50 .3700 .5000 1.1906 .50 1.00 2.00 .2929 .5000 1.4142 .50 1.00 2.50 .2421 .5000 1.6494 .50 1.00 3.00 .2063 .5000 1.8899 .50 1.50 .25 .9630 .5000 3.3258 .50 1.50 .50 .8368 .5000 1.4416 .50 1.50 1.00 .6300 .5000 1.1906 .50 1.50 1.50 .5000 .5000 1.2732 .50 1.50 2.00 .4136 .5000 1.4142 .50 1.50 2.50 .3525 .5000 1.5755 .50 1.50 3.00 .3069 .5000 1.7464 .60 .75 .25 .9613 .6000 2.6072 .60 .75 .50 .7793 .6000 .9454 .60 .75 1.00 .5061 .6000 .8892 .60 .75 1.50 .3662 .6000 1.0676 .60 .75 2.00 .2856 .6000 1.2826 .60 .75 2.50 .2337 .6000 1.5099 .60 .75 3.00 .1976 .6000 1.7426 .60 1.00 .25 .9744 .6000 3.9063 .60 1.00 .50 .8400 .6000 1.2500 .60 1.00 1.00 .6000 .6000 1.0000 .60 1.00 1.50 .4571 .6000 1.1052 .60 1.00 2.00 .3675 .6000 1.2649 .60 1.00 2.50 .3069 .6000 1.4427 .60 1.00 3.00 .2632 .6000 1.6287 .60 1.50 .25 .9850 .6000 6.6134 .60 1.50 .50 .8978 .6000 1.8869 .60 1.50 1.00 .7114 .6000 1.2651 .60 1.50 1.50 .5789 .6000 1.2573 .60 1.50 2.00 .4860 .6000 1.3438 .60 1.50 2.50 .4182 .6000 1.4617 .60 1.50 3.00 .3667 .6000 1.5938 .70 .75 .25 .9877 .7000 6.1137 .70 .75 .50 .8736 .7000 1.2142 .70 .75 1.00 .6215 .7000 .8447 .70 .75 1.50 .4670 .7000 .9214 .70 .75 2.00 .3714 .7000 1.0570 .70 .75 2.50 .3075 .7000 1.2110 .70 .75 3.00 .2622 .7000 1.3731 .70 1.00 .25 .9919 .7000 9.2593 .70 1.00 .50 .9100 .7000 1.6667 .70 1.00 1.00 .7000 .7000 1.0000 .70 1.00 1.50 .5519 .7000 1.0041 .70 1.00 2.00 .4523 .7000 1.0954 .70 1.00 2.50 .3822 .7000 1.2140 .70 1.00 3.00 .3306 .7000 1.3444 .70 1.50 .25 .9953 .7000 15.8068 .70 1.50 .50 .9434 .7000 2.5994 .70 1.50 1.00 .7884 .7000 1.3319 .70 1.50 1.50 .6598 .7000 1.2064 .70 1.50 2.00 .5635 .7000 1.2287 .70 1.50 2.50 .4905 .7000 1.2972 .70 1.50 3.00 .4337 .7000 1.3859 .80 .75 .25 .9976 .8000 20.5520 .80 .75 .50 .9431 .8000 1.7757 .80 .75 1.00 .7427 .8000 .8079 .80 .75 1.50 .5855 .8000 .7679 .80 .75 2.00 .4781 .8000 .8238 .80 .75 2.50 .4025 .8000 .9075 .80 .75 3.00 .3469 .8000 1.0028 .80 1.00 .25 .9984 .8000 31.2500 .80 1.00 .50 .9600 .8000 2.5000 .80 1.00 1.00 .8000 .8000 1.0000 .80 1.00 1.50 .6580 .8000 .8772 .80 1.00 2.00 .5528 .8000 .8944 .80 1.00 2.50 .4747 .8000 .9518 .80 1.00 3.00 .4152 .8000 1.0260 .80 1.50 .25 .9991 .8000 53.5108 .80 1.50 .50 .9751 .8000 3.9855 .80 1.50 1.00 .8618 .8000 1.3925 .80 1.50 1.50 .7459 .8000 1.1086 .80 1.50 2.00 .6508 .8000 1.0564 .80 1.50 2.50 .5748 .8000 1.0706 .80 1.50 3.00 .5137 .8000 1.1124 .90 .75 .25 .9998 .9000 164.2657 .90 .75 .50 .9857 .9000 3.4998 .90 .75 1.00 .8689 .9000 .7768 .90 .75 1.50 .7336 .9000 .5818 .90 .75 2.00 .6239 .9000 .5555 .90 .75 2.50 .5392 .9000 .5712 .90 .75 3.00 .4734 .9000 .6033 .90 1.00 .25 .9999 .9000 250.0000 .90 1.00 .50 .9900 .9000 5.0000 .90 1.00 1.00 .9000 .9000 1.0000 .90 1.00 1.50 .7846 .9000 .6962 .90 1.00 2.00 .6838 .9000 .6325 .90 1.00 2.50 .6019 .9000 .6280 .90 1.00 3.00 .5358 .9000 .6463 .90 1.50 .25 .9999 .9000 428.3866 .90 1.50 .50 .9938 .9000 8.0723 .90 1.50 1.00 .9322 .9000 1.4482 .90 1.50 1.50 .8435 .9000 .9252 .90 1.50 2.00 .7586 .9000 .7883 .90 1.50 2.50 .6847 .9000 .7461 .90 1.50 3.00 .6218 .9000 .7400 .99 .75 .25 1.0000 .9900 164255.717 .99 .75 .50 .9999 .9900 34.8318 .99 .75 1.00 .9867 .9900 .7525 .99 .75 1.50 .9412 .9900 .2568 .99 .75 2.00 .8779 .9900 .1656 .99 .75 2.50 .8116 .9900 .1348 .99 .75 3.00 .7492 .9900 .1220 .99 1.00 .25 1.0000 .9900 249999.999 .99 1.00 .50 .9999 .9900 50.0000 .99 1.00 1.00 .9900 .9900 1.0000 .99 1.00 1.50 .9536 .9900 .3232 .99 1.00 2.00 .9000 .9900 .2000 .99 1.00 2.50 .8415 .9900 .1577 .99 1.00 3.00 .7846 .9900 .1392 .99 1.50 .25 1.0000 .9900 428406.592 .99 1.50 .50 .9999 .9900 81.0536 .99 1.50 1.00 .9933 .9900 1.4950 .99 1.50 1.50 .9672 .9900 .4538 .99 1.50 2.00 .9260 .9900 .2669 .99 1.50 2.50 .8786 .9900 .2020 .99 1.50 3.00 .8302 .9900 .1724 _ATEOF cat >beta.sps <<'_ATEOF' DATA LIST LIST FILE='beta.in' NOTABLE SKIP=1 /P a b Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.beta(P, a, b). COMPUTE cdf = cdf.beta(x, a, b). COMPUTE pdf = pdf.beta(x, a, b). DO IF $CASENUM = 1. PRINT OUTFILE='beta.out'/" P a b x cdf pdf ". END IF. PRINT OUTFILE='beta.out'/P a b x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:102: pspp -O format=csv beta.sps" at_fn_check_prepare_trace "randist.at:102" ( $at_check_trace; pspp -O format=csv beta.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:102" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:102: \$PERL compare.pl beta.in beta.out" at_fn_check_prepare_dynamic "$PERL compare.pl beta.in beta.out" "randist.at:102" ( $at_check_trace; $PERL compare.pl beta.in beta.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:102" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1053 #AT_START_1054 at_fn_group_banner 1054 'randist.at:337' \ "random distributions -- cauchy" " " 131 at_xfail=no ( $as_echo "1054. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >cauchy.in <<'_ATEOF' P a b x cdf pdf .01 -5.00 .50 -20.9103 .0100 .0006 .01 -5.00 .75 -28.8654 .0100 .0004 .01 -5.00 1.00 -36.8205 .0100 .0003 .01 -5.00 1.25 -44.7756 .0100 .0003 .01 -5.00 1.50 -52.7308 .0100 .0002 .01 -4.00 .50 -19.9103 .0100 .0006 .01 -4.00 .75 -27.8654 .0100 .0004 .01 -4.00 1.00 -35.8205 .0100 .0003 .01 -4.00 1.25 -43.7756 .0100 .0003 .01 -4.00 1.50 -51.7308 .0100 .0002 .01 -3.00 .50 -18.9103 .0100 .0006 .01 -3.00 .75 -26.8654 .0100 .0004 .01 -3.00 1.00 -34.8205 .0100 .0003 .01 -3.00 1.25 -42.7756 .0100 .0003 .01 -3.00 1.50 -50.7308 .0100 .0002 .01 -2.00 .50 -17.9103 .0100 .0006 .01 -2.00 .75 -25.8654 .0100 .0004 .01 -2.00 1.00 -33.8205 .0100 .0003 .01 -2.00 1.25 -41.7756 .0100 .0003 .01 -2.00 1.50 -49.7308 .0100 .0002 .01 -1.00 .50 -16.9103 .0100 .0006 .01 -1.00 .75 -24.8654 .0100 .0004 .01 -1.00 1.00 -32.8205 .0100 .0003 .01 -1.00 1.25 -40.7756 .0100 .0003 .01 -1.00 1.50 -48.7308 .0100 .0002 .01 .00 .50 -15.9103 .0100 .0006 .01 .00 .75 -23.8654 .0100 .0004 .01 .00 1.00 -31.8205 .0100 .0003 .01 .00 1.25 -39.7756 .0100 .0003 .01 .00 1.50 -47.7308 .0100 .0002 .01 1.00 .50 -14.9103 .0100 .0006 .01 1.00 .75 -22.8654 .0100 .0004 .01 1.00 1.00 -30.8205 .0100 .0003 .01 1.00 1.25 -38.7756 .0100 .0003 .01 1.00 1.50 -46.7308 .0100 .0002 .01 2.00 .50 -13.9103 .0100 .0006 .01 2.00 .75 -21.8654 .0100 .0004 .01 2.00 1.00 -29.8205 .0100 .0003 .01 2.00 1.25 -37.7756 .0100 .0003 .01 2.00 1.50 -45.7308 .0100 .0002 .01 3.00 .50 -12.9103 .0100 .0006 .01 3.00 .75 -20.8654 .0100 .0004 .01 3.00 1.00 -28.8205 .0100 .0003 .01 3.00 1.25 -36.7756 .0100 .0003 .01 3.00 1.50 -44.7308 .0100 .0002 .01 4.00 .50 -11.9103 .0100 .0006 .01 4.00 .75 -19.8654 .0100 .0004 .01 4.00 1.00 -27.8205 .0100 .0003 .01 4.00 1.25 -35.7756 .0100 .0003 .01 4.00 1.50 -43.7308 .0100 .0002 .01 5.00 .50 -10.9103 .0100 .0006 .01 5.00 .75 -18.8654 .0100 .0004 .01 5.00 1.00 -26.8205 .0100 .0003 .01 5.00 1.25 -34.7756 .0100 .0003 .01 5.00 1.50 -42.7308 .0100 .0002 .10 -5.00 .50 -6.5388 .1000 .0608 .10 -5.00 .75 -7.3083 .1000 .0405 .10 -5.00 1.00 -8.0777 .1000 .0304 .10 -5.00 1.25 -8.8471 .1000 .0243 .10 -5.00 1.50 -9.6165 .1000 .0203 .10 -4.00 .50 -5.5388 .1000 .0608 .10 -4.00 .75 -6.3083 .1000 .0405 .10 -4.00 1.00 -7.0777 .1000 .0304 .10 -4.00 1.25 -7.8471 .1000 .0243 .10 -4.00 1.50 -8.6165 .1000 .0203 .10 -3.00 .50 -4.5388 .1000 .0608 .10 -3.00 .75 -5.3083 .1000 .0405 .10 -3.00 1.00 -6.0777 .1000 .0304 .10 -3.00 1.25 -6.8471 .1000 .0243 .10 -3.00 1.50 -7.6165 .1000 .0203 .10 -2.00 .50 -3.5388 .1000 .0608 .10 -2.00 .75 -4.3083 .1000 .0405 .10 -2.00 1.00 -5.0777 .1000 .0304 .10 -2.00 1.25 -5.8471 .1000 .0243 .10 -2.00 1.50 -6.6165 .1000 .0203 .10 -1.00 .50 -2.5388 .1000 .0608 .10 -1.00 .75 -3.3083 .1000 .0405 .10 -1.00 1.00 -4.0777 .1000 .0304 .10 -1.00 1.25 -4.8471 .1000 .0243 .10 -1.00 1.50 -5.6165 .1000 .0203 .10 .00 .50 -1.5388 .1000 .0608 .10 .00 .75 -2.3083 .1000 .0405 .10 .00 1.00 -3.0777 .1000 .0304 .10 .00 1.25 -3.8471 .1000 .0243 .10 .00 1.50 -4.6165 .1000 .0203 .10 1.00 .50 -.5388 .1000 .0608 .10 1.00 .75 -1.3083 .1000 .0405 .10 1.00 1.00 -2.0777 .1000 .0304 .10 1.00 1.25 -2.8471 .1000 .0243 .10 1.00 1.50 -3.6165 .1000 .0203 .10 2.00 .50 .4612 .1000 .0608 .10 2.00 .75 -.3083 .1000 .0405 .10 2.00 1.00 -1.0777 .1000 .0304 .10 2.00 1.25 -1.8471 .1000 .0243 .10 2.00 1.50 -2.6165 .1000 .0203 .10 3.00 .50 1.4612 .1000 .0608 .10 3.00 .75 .6917 .1000 .0405 .10 3.00 1.00 -.0777 .1000 .0304 .10 3.00 1.25 -.8471 .1000 .0243 .10 3.00 1.50 -1.6165 .1000 .0203 .10 4.00 .50 2.4612 .1000 .0608 .10 4.00 .75 1.6917 .1000 .0405 .10 4.00 1.00 .9223 .1000 .0304 .10 4.00 1.25 .1529 .1000 .0243 .10 4.00 1.50 -.6165 .1000 .0203 .10 5.00 .50 3.4612 .1000 .0608 .10 5.00 .75 2.6917 .1000 .0405 .10 5.00 1.00 1.9223 .1000 .0304 .10 5.00 1.25 1.1529 .1000 .0243 .10 5.00 1.50 .3835 .1000 .0203 .20 -5.00 .50 -5.6882 .2000 .2199 .20 -5.00 .75 -6.0323 .2000 .1466 .20 -5.00 1.00 -6.3764 .2000 .1100 .20 -5.00 1.25 -6.7205 .2000 .0880 .20 -5.00 1.50 -7.0646 .2000 .0733 .20 -4.00 .50 -4.6882 .2000 .2199 .20 -4.00 .75 -5.0323 .2000 .1466 .20 -4.00 1.00 -5.3764 .2000 .1100 .20 -4.00 1.25 -5.7205 .2000 .0880 .20 -4.00 1.50 -6.0646 .2000 .0733 .20 -3.00 .50 -3.6882 .2000 .2199 .20 -3.00 .75 -4.0323 .2000 .1466 .20 -3.00 1.00 -4.3764 .2000 .1100 .20 -3.00 1.25 -4.7205 .2000 .0880 .20 -3.00 1.50 -5.0646 .2000 .0733 .20 -2.00 .50 -2.6882 .2000 .2199 .20 -2.00 .75 -3.0323 .2000 .1466 .20 -2.00 1.00 -3.3764 .2000 .1100 .20 -2.00 1.25 -3.7205 .2000 .0880 .20 -2.00 1.50 -4.0646 .2000 .0733 .20 -1.00 .50 -1.6882 .2000 .2199 .20 -1.00 .75 -2.0323 .2000 .1466 .20 -1.00 1.00 -2.3764 .2000 .1100 .20 -1.00 1.25 -2.7205 .2000 .0880 .20 -1.00 1.50 -3.0646 .2000 .0733 .20 .00 .50 -.6882 .2000 .2199 .20 .00 .75 -1.0323 .2000 .1466 .20 .00 1.00 -1.3764 .2000 .1100 .20 .00 1.25 -1.7205 .2000 .0880 .20 .00 1.50 -2.0646 .2000 .0733 .20 1.00 .50 .3118 .2000 .2199 .20 1.00 .75 -.0323 .2000 .1466 .20 1.00 1.00 -.3764 .2000 .1100 .20 1.00 1.25 -.7205 .2000 .0880 .20 1.00 1.50 -1.0646 .2000 .0733 .20 2.00 .50 1.3118 .2000 .2199 .20 2.00 .75 .9677 .2000 .1466 .20 2.00 1.00 .6236 .2000 .1100 .20 2.00 1.25 .2795 .2000 .0880 .20 2.00 1.50 -.0646 .2000 .0733 .20 3.00 .50 2.3118 .2000 .2199 .20 3.00 .75 1.9677 .2000 .1466 .20 3.00 1.00 1.6236 .2000 .1100 .20 3.00 1.25 1.2795 .2000 .0880 .20 3.00 1.50 .9354 .2000 .0733 .20 4.00 .50 3.3118 .2000 .2199 .20 4.00 .75 2.9677 .2000 .1466 .20 4.00 1.00 2.6236 .2000 .1100 .20 4.00 1.25 2.2795 .2000 .0880 .20 4.00 1.50 1.9354 .2000 .0733 .20 5.00 .50 4.3118 .2000 .2199 .20 5.00 .75 3.9677 .2000 .1466 .20 5.00 1.00 3.6236 .2000 .1100 .20 5.00 1.25 3.2795 .2000 .0880 .20 5.00 1.50 2.9354 .2000 .0733 .30 -5.00 .50 -5.3633 .3000 .4167 .30 -5.00 .75 -5.5449 .3000 .2778 .30 -5.00 1.00 -5.7265 .3000 .2083 .30 -5.00 1.25 -5.9082 .3000 .1667 .30 -5.00 1.50 -6.0898 .3000 .1389 .30 -4.00 .50 -4.3633 .3000 .4167 .30 -4.00 .75 -4.5449 .3000 .2778 .30 -4.00 1.00 -4.7265 .3000 .2083 .30 -4.00 1.25 -4.9082 .3000 .1667 .30 -4.00 1.50 -5.0898 .3000 .1389 .30 -3.00 .50 -3.3633 .3000 .4167 .30 -3.00 .75 -3.5449 .3000 .2778 .30 -3.00 1.00 -3.7265 .3000 .2083 .30 -3.00 1.25 -3.9082 .3000 .1667 .30 -3.00 1.50 -4.0898 .3000 .1389 .30 -2.00 .50 -2.3633 .3000 .4167 .30 -2.00 .75 -2.5449 .3000 .2778 .30 -2.00 1.00 -2.7265 .3000 .2083 .30 -2.00 1.25 -2.9082 .3000 .1667 .30 -2.00 1.50 -3.0898 .3000 .1389 .30 -1.00 .50 -1.3633 .3000 .4167 .30 -1.00 .75 -1.5449 .3000 .2778 .30 -1.00 1.00 -1.7265 .3000 .2083 .30 -1.00 1.25 -1.9082 .3000 .1667 .30 -1.00 1.50 -2.0898 .3000 .1389 .30 .00 .50 -.3633 .3000 .4167 .30 .00 .75 -.5449 .3000 .2778 .30 .00 1.00 -.7265 .3000 .2083 .30 .00 1.25 -.9082 .3000 .1667 .30 .00 1.50 -1.0898 .3000 .1389 .30 1.00 .50 .6367 .3000 .4167 .30 1.00 .75 .4551 .3000 .2778 .30 1.00 1.00 .2735 .3000 .2083 .30 1.00 1.25 .0918 .3000 .1667 .30 1.00 1.50 -.0898 .3000 .1389 .30 2.00 .50 1.6367 .3000 .4167 .30 2.00 .75 1.4551 .3000 .2778 .30 2.00 1.00 1.2735 .3000 .2083 .30 2.00 1.25 1.0918 .3000 .1667 .30 2.00 1.50 .9102 .3000 .1389 .30 3.00 .50 2.6367 .3000 .4167 .30 3.00 .75 2.4551 .3000 .2778 .30 3.00 1.00 2.2735 .3000 .2083 .30 3.00 1.25 2.0918 .3000 .1667 .30 3.00 1.50 1.9102 .3000 .1389 .30 4.00 .50 3.6367 .3000 .4167 .30 4.00 .75 3.4551 .3000 .2778 .30 4.00 1.00 3.2735 .3000 .2083 .30 4.00 1.25 3.0918 .3000 .1667 .30 4.00 1.50 2.9102 .3000 .1389 .30 5.00 .50 4.6367 .3000 .4167 .30 5.00 .75 4.4551 .3000 .2778 .30 5.00 1.00 4.2735 .3000 .2083 .30 5.00 1.25 4.0918 .3000 .1667 .30 5.00 1.50 3.9102 .3000 .1389 .40 -5.00 .50 -5.1625 .4000 .5758 .40 -5.00 .75 -5.2437 .4000 .3839 .40 -5.00 1.00 -5.3249 .4000 .2879 .40 -5.00 1.25 -5.4061 .4000 .2303 .40 -5.00 1.50 -5.4874 .4000 .1919 .40 -4.00 .50 -4.1625 .4000 .5758 .40 -4.00 .75 -4.2437 .4000 .3839 .40 -4.00 1.00 -4.3249 .4000 .2879 .40 -4.00 1.25 -4.4061 .4000 .2303 .40 -4.00 1.50 -4.4874 .4000 .1919 .40 -3.00 .50 -3.1625 .4000 .5758 .40 -3.00 .75 -3.2437 .4000 .3839 .40 -3.00 1.00 -3.3249 .4000 .2879 .40 -3.00 1.25 -3.4061 .4000 .2303 .40 -3.00 1.50 -3.4874 .4000 .1919 .40 -2.00 .50 -2.1625 .4000 .5758 .40 -2.00 .75 -2.2437 .4000 .3839 .40 -2.00 1.00 -2.3249 .4000 .2879 .40 -2.00 1.25 -2.4061 .4000 .2303 .40 -2.00 1.50 -2.4874 .4000 .1919 .40 -1.00 .50 -1.1625 .4000 .5758 .40 -1.00 .75 -1.2437 .4000 .3839 .40 -1.00 1.00 -1.3249 .4000 .2879 .40 -1.00 1.25 -1.4061 .4000 .2303 .40 -1.00 1.50 -1.4874 .4000 .1919 .40 .00 .50 -.1625 .4000 .5758 .40 .00 .75 -.2437 .4000 .3839 .40 .00 1.00 -.3249 .4000 .2879 .40 .00 1.25 -.4061 .4000 .2303 .40 .00 1.50 -.4874 .4000 .1919 .40 1.00 .50 .8375 .4000 .5758 .40 1.00 .75 .7563 .4000 .3839 .40 1.00 1.00 .6751 .4000 .2879 .40 1.00 1.25 .5939 .4000 .2303 .40 1.00 1.50 .5126 .4000 .1919 .40 2.00 .50 1.8375 .4000 .5758 .40 2.00 .75 1.7563 .4000 .3839 .40 2.00 1.00 1.6751 .4000 .2879 .40 2.00 1.25 1.5939 .4000 .2303 .40 2.00 1.50 1.5126 .4000 .1919 .40 3.00 .50 2.8375 .4000 .5758 .40 3.00 .75 2.7563 .4000 .3839 .40 3.00 1.00 2.6751 .4000 .2879 .40 3.00 1.25 2.5939 .4000 .2303 .40 3.00 1.50 2.5126 .4000 .1919 .40 4.00 .50 3.8375 .4000 .5758 .40 4.00 .75 3.7563 .4000 .3839 .40 4.00 1.00 3.6751 .4000 .2879 .40 4.00 1.25 3.5939 .4000 .2303 .40 4.00 1.50 3.5126 .4000 .1919 .40 5.00 .50 4.8375 .4000 .5758 .40 5.00 .75 4.7563 .4000 .3839 .40 5.00 1.00 4.6751 .4000 .2879 .40 5.00 1.25 4.5939 .4000 .2303 .40 5.00 1.50 4.5126 .4000 .1919 .50 -5.00 .50 -5.0000 .5000 .6366 .50 -5.00 .75 -5.0000 .5000 .4244 .50 -5.00 1.00 -5.0000 .5000 .3183 .50 -5.00 1.25 -5.0000 .5000 .2546 .50 -5.00 1.50 -5.0000 .5000 .2122 .50 -4.00 .50 -4.0000 .5000 .6366 .50 -4.00 .75 -4.0000 .5000 .4244 .50 -4.00 1.00 -4.0000 .5000 .3183 .50 -4.00 1.25 -4.0000 .5000 .2546 .50 -4.00 1.50 -4.0000 .5000 .2122 .50 -3.00 .50 -3.0000 .5000 .6366 .50 -3.00 .75 -3.0000 .5000 .4244 .50 -3.00 1.00 -3.0000 .5000 .3183 .50 -3.00 1.25 -3.0000 .5000 .2546 .50 -3.00 1.50 -3.0000 .5000 .2122 .50 -2.00 .50 -2.0000 .5000 .6366 .50 -2.00 .75 -2.0000 .5000 .4244 .50 -2.00 1.00 -2.0000 .5000 .3183 .50 -2.00 1.25 -2.0000 .5000 .2546 .50 -2.00 1.50 -2.0000 .5000 .2122 .50 -1.00 .50 -1.0000 .5000 .6366 .50 -1.00 .75 -1.0000 .5000 .4244 .50 -1.00 1.00 -1.0000 .5000 .3183 .50 -1.00 1.25 -1.0000 .5000 .2546 .50 -1.00 1.50 -1.0000 .5000 .2122 .50 .00 .50 .0000 .5000 .6366 .50 .00 .75 .0000 .5000 .4244 .50 .00 1.00 .0000 .5000 .3183 .50 .00 1.25 .0000 .5000 .2546 .50 .00 1.50 .0000 .5000 .2122 .50 1.00 .50 1.0000 .5000 .6366 .50 1.00 .75 1.0000 .5000 .4244 .50 1.00 1.00 1.0000 .5000 .3183 .50 1.00 1.25 1.0000 .5000 .2546 .50 1.00 1.50 1.0000 .5000 .2122 .50 2.00 .50 2.0000 .5000 .6366 .50 2.00 .75 2.0000 .5000 .4244 .50 2.00 1.00 2.0000 .5000 .3183 .50 2.00 1.25 2.0000 .5000 .2546 .50 2.00 1.50 2.0000 .5000 .2122 .50 3.00 .50 3.0000 .5000 .6366 .50 3.00 .75 3.0000 .5000 .4244 .50 3.00 1.00 3.0000 .5000 .3183 .50 3.00 1.25 3.0000 .5000 .2546 .50 3.00 1.50 3.0000 .5000 .2122 .50 4.00 .50 4.0000 .5000 .6366 .50 4.00 .75 4.0000 .5000 .4244 .50 4.00 1.00 4.0000 .5000 .3183 .50 4.00 1.25 4.0000 .5000 .2546 .50 4.00 1.50 4.0000 .5000 .2122 .50 5.00 .50 5.0000 .5000 .6366 .50 5.00 .75 5.0000 .5000 .4244 .50 5.00 1.00 5.0000 .5000 .3183 .50 5.00 1.25 5.0000 .5000 .2546 .50 5.00 1.50 5.0000 .5000 .2122 .60 -5.00 .50 -4.8375 .6000 .5758 .60 -5.00 .75 -4.7563 .6000 .3839 .60 -5.00 1.00 -4.6751 .6000 .2879 .60 -5.00 1.25 -4.5939 .6000 .2303 .60 -5.00 1.50 -4.5126 .6000 .1919 .60 -4.00 .50 -3.8375 .6000 .5758 .60 -4.00 .75 -3.7563 .6000 .3839 .60 -4.00 1.00 -3.6751 .6000 .2879 .60 -4.00 1.25 -3.5939 .6000 .2303 .60 -4.00 1.50 -3.5126 .6000 .1919 .60 -3.00 .50 -2.8375 .6000 .5758 .60 -3.00 .75 -2.7563 .6000 .3839 .60 -3.00 1.00 -2.6751 .6000 .2879 .60 -3.00 1.25 -2.5939 .6000 .2303 .60 -3.00 1.50 -2.5126 .6000 .1919 .60 -2.00 .50 -1.8375 .6000 .5758 .60 -2.00 .75 -1.7563 .6000 .3839 .60 -2.00 1.00 -1.6751 .6000 .2879 .60 -2.00 1.25 -1.5939 .6000 .2303 .60 -2.00 1.50 -1.5126 .6000 .1919 .60 -1.00 .50 -.8375 .6000 .5758 .60 -1.00 .75 -.7563 .6000 .3839 .60 -1.00 1.00 -.6751 .6000 .2879 .60 -1.00 1.25 -.5939 .6000 .2303 .60 -1.00 1.50 -.5126 .6000 .1919 .60 .00 .50 .1625 .6000 .5758 .60 .00 .75 .2437 .6000 .3839 .60 .00 1.00 .3249 .6000 .2879 .60 .00 1.25 .4061 .6000 .2303 .60 .00 1.50 .4874 .6000 .1919 .60 1.00 .50 1.1625 .6000 .5758 .60 1.00 .75 1.2437 .6000 .3839 .60 1.00 1.00 1.3249 .6000 .2879 .60 1.00 1.25 1.4061 .6000 .2303 .60 1.00 1.50 1.4874 .6000 .1919 .60 2.00 .50 2.1625 .6000 .5758 .60 2.00 .75 2.2437 .6000 .3839 .60 2.00 1.00 2.3249 .6000 .2879 .60 2.00 1.25 2.4061 .6000 .2303 .60 2.00 1.50 2.4874 .6000 .1919 .60 3.00 .50 3.1625 .6000 .5758 .60 3.00 .75 3.2437 .6000 .3839 .60 3.00 1.00 3.3249 .6000 .2879 .60 3.00 1.25 3.4061 .6000 .2303 .60 3.00 1.50 3.4874 .6000 .1919 .60 4.00 .50 4.1625 .6000 .5758 .60 4.00 .75 4.2437 .6000 .3839 .60 4.00 1.00 4.3249 .6000 .2879 .60 4.00 1.25 4.4061 .6000 .2303 .60 4.00 1.50 4.4874 .6000 .1919 .60 5.00 .50 5.1625 .6000 .5758 .60 5.00 .75 5.2437 .6000 .3839 .60 5.00 1.00 5.3249 .6000 .2879 .60 5.00 1.25 5.4061 .6000 .2303 .60 5.00 1.50 5.4874 .6000 .1919 .70 -5.00 .50 -4.6367 .7000 .4167 .70 -5.00 .75 -4.4551 .7000 .2778 .70 -5.00 1.00 -4.2735 .7000 .2083 .70 -5.00 1.25 -4.0918 .7000 .1667 .70 -5.00 1.50 -3.9102 .7000 .1389 .70 -4.00 .50 -3.6367 .7000 .4167 .70 -4.00 .75 -3.4551 .7000 .2778 .70 -4.00 1.00 -3.2735 .7000 .2083 .70 -4.00 1.25 -3.0918 .7000 .1667 .70 -4.00 1.50 -2.9102 .7000 .1389 .70 -3.00 .50 -2.6367 .7000 .4167 .70 -3.00 .75 -2.4551 .7000 .2778 .70 -3.00 1.00 -2.2735 .7000 .2083 .70 -3.00 1.25 -2.0918 .7000 .1667 .70 -3.00 1.50 -1.9102 .7000 .1389 .70 -2.00 .50 -1.6367 .7000 .4167 .70 -2.00 .75 -1.4551 .7000 .2778 .70 -2.00 1.00 -1.2735 .7000 .2083 .70 -2.00 1.25 -1.0918 .7000 .1667 .70 -2.00 1.50 -.9102 .7000 .1389 .70 -1.00 .50 -.6367 .7000 .4167 .70 -1.00 .75 -.4551 .7000 .2778 .70 -1.00 1.00 -.2735 .7000 .2083 .70 -1.00 1.25 -.0918 .7000 .1667 .70 -1.00 1.50 .0898 .7000 .1389 .70 .00 .50 .3633 .7000 .4167 .70 .00 .75 .5449 .7000 .2778 .70 .00 1.00 .7265 .7000 .2083 .70 .00 1.25 .9082 .7000 .1667 .70 .00 1.50 1.0898 .7000 .1389 .70 1.00 .50 1.3633 .7000 .4167 .70 1.00 .75 1.5449 .7000 .2778 .70 1.00 1.00 1.7265 .7000 .2083 .70 1.00 1.25 1.9082 .7000 .1667 .70 1.00 1.50 2.0898 .7000 .1389 .70 2.00 .50 2.3633 .7000 .4167 .70 2.00 .75 2.5449 .7000 .2778 .70 2.00 1.00 2.7265 .7000 .2083 .70 2.00 1.25 2.9082 .7000 .1667 .70 2.00 1.50 3.0898 .7000 .1389 .70 3.00 .50 3.3633 .7000 .4167 .70 3.00 .75 3.5449 .7000 .2778 .70 3.00 1.00 3.7265 .7000 .2083 .70 3.00 1.25 3.9082 .7000 .1667 .70 3.00 1.50 4.0898 .7000 .1389 .70 4.00 .50 4.3633 .7000 .4167 .70 4.00 .75 4.5449 .7000 .2778 .70 4.00 1.00 4.7265 .7000 .2083 .70 4.00 1.25 4.9082 .7000 .1667 .70 4.00 1.50 5.0898 .7000 .1389 .70 5.00 .50 5.3633 .7000 .4167 .70 5.00 .75 5.5449 .7000 .2778 .70 5.00 1.00 5.7265 .7000 .2083 .70 5.00 1.25 5.9082 .7000 .1667 .70 5.00 1.50 6.0898 .7000 .1389 .80 -5.00 .50 -4.3118 .8000 .2199 .80 -5.00 .75 -3.9677 .8000 .1466 .80 -5.00 1.00 -3.6236 .8000 .1100 .80 -5.00 1.25 -3.2795 .8000 .0880 .80 -5.00 1.50 -2.9354 .8000 .0733 .80 -4.00 .50 -3.3118 .8000 .2199 .80 -4.00 .75 -2.9677 .8000 .1466 .80 -4.00 1.00 -2.6236 .8000 .1100 .80 -4.00 1.25 -2.2795 .8000 .0880 .80 -4.00 1.50 -1.9354 .8000 .0733 .80 -3.00 .50 -2.3118 .8000 .2199 .80 -3.00 .75 -1.9677 .8000 .1466 .80 -3.00 1.00 -1.6236 .8000 .1100 .80 -3.00 1.25 -1.2795 .8000 .0880 .80 -3.00 1.50 -.9354 .8000 .0733 .80 -2.00 .50 -1.3118 .8000 .2199 .80 -2.00 .75 -.9677 .8000 .1466 .80 -2.00 1.00 -.6236 .8000 .1100 .80 -2.00 1.25 -.2795 .8000 .0880 .80 -2.00 1.50 .0646 .8000 .0733 .80 -1.00 .50 -.3118 .8000 .2199 .80 -1.00 .75 .0323 .8000 .1466 .80 -1.00 1.00 .3764 .8000 .1100 .80 -1.00 1.25 .7205 .8000 .0880 .80 -1.00 1.50 1.0646 .8000 .0733 .80 .00 .50 .6882 .8000 .2199 .80 .00 .75 1.0323 .8000 .1466 .80 .00 1.00 1.3764 .8000 .1100 .80 .00 1.25 1.7205 .8000 .0880 .80 .00 1.50 2.0646 .8000 .0733 .80 1.00 .50 1.6882 .8000 .2199 .80 1.00 .75 2.0323 .8000 .1466 .80 1.00 1.00 2.3764 .8000 .1100 .80 1.00 1.25 2.7205 .8000 .0880 .80 1.00 1.50 3.0646 .8000 .0733 .80 2.00 .50 2.6882 .8000 .2199 .80 2.00 .75 3.0323 .8000 .1466 .80 2.00 1.00 3.3764 .8000 .1100 .80 2.00 1.25 3.7205 .8000 .0880 .80 2.00 1.50 4.0646 .8000 .0733 .80 3.00 .50 3.6882 .8000 .2199 .80 3.00 .75 4.0323 .8000 .1466 .80 3.00 1.00 4.3764 .8000 .1100 .80 3.00 1.25 4.7205 .8000 .0880 .80 3.00 1.50 5.0646 .8000 .0733 .80 4.00 .50 4.6882 .8000 .2199 .80 4.00 .75 5.0323 .8000 .1466 .80 4.00 1.00 5.3764 .8000 .1100 .80 4.00 1.25 5.7205 .8000 .0880 .80 4.00 1.50 6.0646 .8000 .0733 .80 5.00 .50 5.6882 .8000 .2199 .80 5.00 .75 6.0323 .8000 .1466 .80 5.00 1.00 6.3764 .8000 .1100 .80 5.00 1.25 6.7205 .8000 .0880 .80 5.00 1.50 7.0646 .8000 .0733 .90 -5.00 .50 -3.4612 .9000 .0608 .90 -5.00 .75 -2.6917 .9000 .0405 .90 -5.00 1.00 -1.9223 .9000 .0304 .90 -5.00 1.25 -1.1529 .9000 .0243 .90 -5.00 1.50 -.3835 .9000 .0203 .90 -4.00 .50 -2.4612 .9000 .0608 .90 -4.00 .75 -1.6917 .9000 .0405 .90 -4.00 1.00 -.9223 .9000 .0304 .90 -4.00 1.25 -.1529 .9000 .0243 .90 -4.00 1.50 .6165 .9000 .0203 .90 -3.00 .50 -1.4612 .9000 .0608 .90 -3.00 .75 -.6917 .9000 .0405 .90 -3.00 1.00 .0777 .9000 .0304 .90 -3.00 1.25 .8471 .9000 .0243 .90 -3.00 1.50 1.6165 .9000 .0203 .90 -2.00 .50 -.4612 .9000 .0608 .90 -2.00 .75 .3083 .9000 .0405 .90 -2.00 1.00 1.0777 .9000 .0304 .90 -2.00 1.25 1.8471 .9000 .0243 .90 -2.00 1.50 2.6165 .9000 .0203 .90 -1.00 .50 .5388 .9000 .0608 .90 -1.00 .75 1.3083 .9000 .0405 .90 -1.00 1.00 2.0777 .9000 .0304 .90 -1.00 1.25 2.8471 .9000 .0243 .90 -1.00 1.50 3.6165 .9000 .0203 .90 .00 .50 1.5388 .9000 .0608 .90 .00 .75 2.3083 .9000 .0405 .90 .00 1.00 3.0777 .9000 .0304 .90 .00 1.25 3.8471 .9000 .0243 .90 .00 1.50 4.6165 .9000 .0203 .90 1.00 .50 2.5388 .9000 .0608 .90 1.00 .75 3.3083 .9000 .0405 .90 1.00 1.00 4.0777 .9000 .0304 .90 1.00 1.25 4.8471 .9000 .0243 .90 1.00 1.50 5.6165 .9000 .0203 .90 2.00 .50 3.5388 .9000 .0608 .90 2.00 .75 4.3083 .9000 .0405 .90 2.00 1.00 5.0777 .9000 .0304 .90 2.00 1.25 5.8471 .9000 .0243 .90 2.00 1.50 6.6165 .9000 .0203 .90 3.00 .50 4.5388 .9000 .0608 .90 3.00 .75 5.3083 .9000 .0405 .90 3.00 1.00 6.0777 .9000 .0304 .90 3.00 1.25 6.8471 .9000 .0243 .90 3.00 1.50 7.6165 .9000 .0203 .90 4.00 .50 5.5388 .9000 .0608 .90 4.00 .75 6.3083 .9000 .0405 .90 4.00 1.00 7.0777 .9000 .0304 .90 4.00 1.25 7.8471 .9000 .0243 .90 4.00 1.50 8.6165 .9000 .0203 .90 5.00 .50 6.5388 .9000 .0608 .90 5.00 .75 7.3083 .9000 .0405 .90 5.00 1.00 8.0777 .9000 .0304 .90 5.00 1.25 8.8471 .9000 .0243 .90 5.00 1.50 9.6165 .9000 .0203 .99 -5.00 .50 10.9103 .9900 .0006 .99 -5.00 .75 18.8654 .9900 .0004 .99 -5.00 1.00 26.8205 .9900 .0003 .99 -5.00 1.25 34.7756 .9900 .0003 .99 -5.00 1.50 42.7308 .9900 .0002 .99 -4.00 .50 11.9103 .9900 .0006 .99 -4.00 .75 19.8654 .9900 .0004 .99 -4.00 1.00 27.8205 .9900 .0003 .99 -4.00 1.25 35.7756 .9900 .0003 .99 -4.00 1.50 43.7308 .9900 .0002 .99 -3.00 .50 12.9103 .9900 .0006 .99 -3.00 .75 20.8654 .9900 .0004 .99 -3.00 1.00 28.8205 .9900 .0003 .99 -3.00 1.25 36.7756 .9900 .0003 .99 -3.00 1.50 44.7308 .9900 .0002 .99 -2.00 .50 13.9103 .9900 .0006 .99 -2.00 .75 21.8654 .9900 .0004 .99 -2.00 1.00 29.8205 .9900 .0003 .99 -2.00 1.25 37.7756 .9900 .0003 .99 -2.00 1.50 45.7308 .9900 .0002 .99 -1.00 .50 14.9103 .9900 .0006 .99 -1.00 .75 22.8654 .9900 .0004 .99 -1.00 1.00 30.8205 .9900 .0003 .99 -1.00 1.25 38.7756 .9900 .0003 .99 -1.00 1.50 46.7308 .9900 .0002 .99 .00 .50 15.9103 .9900 .0006 .99 .00 .75 23.8654 .9900 .0004 .99 .00 1.00 31.8205 .9900 .0003 .99 .00 1.25 39.7756 .9900 .0003 .99 .00 1.50 47.7308 .9900 .0002 .99 1.00 .50 16.9103 .9900 .0006 .99 1.00 .75 24.8654 .9900 .0004 .99 1.00 1.00 32.8205 .9900 .0003 .99 1.00 1.25 40.7756 .9900 .0003 .99 1.00 1.50 48.7308 .9900 .0002 .99 2.00 .50 17.9103 .9900 .0006 .99 2.00 .75 25.8654 .9900 .0004 .99 2.00 1.00 33.8205 .9900 .0003 .99 2.00 1.25 41.7756 .9900 .0003 .99 2.00 1.50 49.7308 .9900 .0002 .99 3.00 .50 18.9103 .9900 .0006 .99 3.00 .75 26.8654 .9900 .0004 .99 3.00 1.00 34.8205 .9900 .0003 .99 3.00 1.25 42.7756 .9900 .0003 .99 3.00 1.50 50.7308 .9900 .0002 .99 4.00 .50 19.9103 .9900 .0006 .99 4.00 .75 27.8654 .9900 .0004 .99 4.00 1.00 35.8205 .9900 .0003 .99 4.00 1.25 43.7756 .9900 .0003 .99 4.00 1.50 51.7308 .9900 .0002 .99 5.00 .50 20.9103 .9900 .0006 .99 5.00 .75 28.8654 .9900 .0004 .99 5.00 1.00 36.8205 .9900 .0003 .99 5.00 1.25 44.7756 .9900 .0003 .99 5.00 1.50 52.7308 .9900 .0002 _ATEOF cat >cauchy.sps <<'_ATEOF' DATA LIST LIST FILE='cauchy.in' NOTABLE SKIP=1 /P a b Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.cauchy(P, a, b). COMPUTE cdf = cdf.cauchy(x, a, b). COMPUTE pdf = pdf.cauchy(x, a, b). DO IF $CASENUM = 1. PRINT OUTFILE='cauchy.out'/" P a b x cdf pdf ". END IF. PRINT OUTFILE='cauchy.out'/P a b x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:337: pspp -O format=csv cauchy.sps" at_fn_check_prepare_trace "randist.at:337" ( $at_check_trace; pspp -O format=csv cauchy.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:337" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:337: \$PERL compare.pl cauchy.in cauchy.out" at_fn_check_prepare_dynamic "$PERL compare.pl cauchy.in cauchy.out" "randist.at:337" ( $at_check_trace; $PERL compare.pl cauchy.in cauchy.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:337" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1054 #AT_START_1055 at_fn_group_banner 1055 'randist.at:946' \ "random distributions -- chisq" " " 131 at_xfail=no ( $as_echo "1055. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >chisq.in <<'_ATEOF' P df x cdf pdf sig .01 1.00 .0002 .0100 31.8277 .9900 .01 2.00 .0201 .0100 .4950 .9900 .01 5.00 .5543 .0100 .0416 .9900 .01 10.00 2.5582 .0100 .0155 .9900 .10 1.00 .0158 .1000 3.1498 .9000 .10 2.00 .2107 .1000 .4500 .9000 .10 5.00 1.6103 .1000 .1215 .9000 .10 10.00 4.8652 .1000 .0641 .9000 .20 1.00 .0642 .2000 1.5250 .8000 .20 2.00 .4463 .2000 .4000 .8000 .20 5.00 2.3425 .2000 .1478 .8000 .20 10.00 6.1791 .2000 .0864 .8000 .30 1.00 .1485 .3000 .9613 .7000 .30 2.00 .7133 .3000 .3500 .7000 .30 5.00 2.9999 .3000 .1542 .7000 .30 10.00 7.2672 .3000 .0960 .7000 .40 1.00 .2750 .4000 .6630 .6000 .40 2.00 1.0217 .4000 .3000 .6000 .40 5.00 3.6555 .4000 .1494 .6000 .40 10.00 8.2955 .4000 .0974 .6000 .50 1.00 .4549 .5000 .4711 .5000 .50 2.00 1.3863 .5000 .2500 .5000 .50 5.00 4.3515 .5000 .1370 .5000 .50 10.00 9.3418 .5000 .0929 .5000 .60 1.00 .7083 .6000 .3326 .4000 .60 2.00 1.8326 .6000 .2000 .4000 .60 5.00 5.1319 .6000 .1188 .4000 .60 10.00 10.4732 .6000 .0833 .4000 .70 1.00 1.0742 .7000 .2250 .3000 .70 2.00 2.4079 .7000 .1500 .3000 .70 5.00 6.0644 .7000 .0957 .3000 .70 10.00 11.7807 .7000 .0694 .3000 .80 1.00 1.6424 .8000 .1369 .2000 .80 2.00 3.2189 .8000 .1000 .2000 .80 5.00 7.2893 .8000 .0684 .2000 .80 10.00 13.4420 .8000 .0512 .2000 .90 1.00 2.7055 .9000 .0627 .1000 .90 2.00 4.6052 .9000 .0500 .1000 .90 5.00 9.2364 .9000 .0368 .1000 .90 10.00 15.9872 .9000 .0287 .1000 .99 1.00 6.6349 .9900 .0056 .0100 .99 2.00 9.2103 .9900 .0050 .0100 .99 5.00 15.0863 .9900 .0041 .0100 .99 10.00 23.2093 .9900 .0034 .0100 _ATEOF cat >chisq.sps <<'_ATEOF' DATA LIST LIST FILE='chisq.in' NOTABLE SKIP=1 /P df Xx Xcdf Xpdf Xsig. NUMERIC x cdf pdf sig (F10.4). COMPUTE x = IDF.chisq(P, df). COMPUTE cdf = cdf.chisq(x, df). COMPUTE pdf = pdf.chisq(x, df). COMPUTE sig = sig.chisq(x, df). DO IF $CASENUM = 1. PRINT OUTFILE='chisq.out'/" P df x cdf pdf sig ". END IF. PRINT OUTFILE='chisq.out'/P df x cdf pdf sig. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:946: pspp -O format=csv chisq.sps" at_fn_check_prepare_trace "randist.at:946" ( $at_check_trace; pspp -O format=csv chisq.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:946" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:946: \$PERL compare.pl chisq.in chisq.out" at_fn_check_prepare_dynamic "$PERL compare.pl chisq.in chisq.out" "randist.at:946" ( $at_check_trace; $PERL compare.pl chisq.in chisq.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:946" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1055 #AT_START_1056 at_fn_group_banner 1056 'randist.at:994' \ "random distributions -- exp" " " 131 at_xfail=no ( $as_echo "1056. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >exp.in <<'_ATEOF' P a x cdf pdf .01 1.00 .0101 .0100 .9900 .01 2.00 .0050 .0100 1.9800 .01 5.00 .0020 .0100 4.9500 .01 10.00 .0010 .0100 9.9000 .10 1.00 .1054 .1000 .9000 .10 2.00 .0527 .1000 1.8000 .10 5.00 .0211 .1000 4.5000 .10 10.00 .0105 .1000 9.0000 .20 1.00 .2231 .2000 .8000 .20 2.00 .1116 .2000 1.6000 .20 5.00 .0446 .2000 4.0000 .20 10.00 .0223 .2000 8.0000 .30 1.00 .3567 .3000 .7000 .30 2.00 .1783 .3000 1.4000 .30 5.00 .0713 .3000 3.5000 .30 10.00 .0357 .3000 7.0000 .40 1.00 .5108 .4000 .6000 .40 2.00 .2554 .4000 1.2000 .40 5.00 .1022 .4000 3.0000 .40 10.00 .0511 .4000 6.0000 .50 1.00 .6931 .5000 .5000 .50 2.00 .3466 .5000 1.0000 .50 5.00 .1386 .5000 2.5000 .50 10.00 .0693 .5000 5.0000 .60 1.00 .9163 .6000 .4000 .60 2.00 .4581 .6000 .8000 .60 5.00 .1833 .6000 2.0000 .60 10.00 .0916 .6000 4.0000 .70 1.00 1.2040 .7000 .3000 .70 2.00 .6020 .7000 .6000 .70 5.00 .2408 .7000 1.5000 .70 10.00 .1204 .7000 3.0000 .80 1.00 1.6094 .8000 .2000 .80 2.00 .8047 .8000 .4000 .80 5.00 .3219 .8000 1.0000 .80 10.00 .1609 .8000 2.0000 .90 1.00 2.3026 .9000 .1000 .90 2.00 1.1513 .9000 .2000 .90 5.00 .4605 .9000 .5000 .90 10.00 .2303 .9000 1.0000 .99 1.00 4.6052 .9900 .0100 .99 2.00 2.3026 .9900 .0200 .99 5.00 .9210 .9900 .0500 .99 10.00 .4605 .9900 .1000 _ATEOF cat >exp.sps <<'_ATEOF' DATA LIST LIST FILE='exp.in' NOTABLE SKIP=1 /P a Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.exp(P, a). COMPUTE cdf = cdf.exp(x, a). COMPUTE pdf = pdf.exp(x, a). DO IF $CASENUM = 1. PRINT OUTFILE='exp.out'/" P a x cdf pdf ". END IF. PRINT OUTFILE='exp.out'/P a x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:994: pspp -O format=csv exp.sps" at_fn_check_prepare_trace "randist.at:994" ( $at_check_trace; pspp -O format=csv exp.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:994" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:994: \$PERL compare.pl exp.in exp.out" at_fn_check_prepare_dynamic "$PERL compare.pl exp.in exp.out" "randist.at:994" ( $at_check_trace; $PERL compare.pl exp.in exp.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:994" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1056 #AT_START_1057 at_fn_group_banner 1057 'randist.at:1042' \ "random distributions -- f" " " 131 at_xfail=no ( $as_echo "1057. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >f.in <<'_ATEOF' P df1 df2 x cdf pdf .01 1.00 1.00 .0002 .0100 20.2576 .01 1.00 2.00 .0002 .0100 24.9950 .01 1.00 5.00 .0002 .0100 28.8162 .01 1.00 10.00 .0002 .0100 30.2774 .01 2.00 1.00 .0102 .0100 .9703 .01 2.00 2.00 .0101 .0100 .9801 .01 2.00 5.00 .0101 .0100 .9860 .01 2.00 10.00 .0101 .0100 .9880 .01 5.00 1.00 .0615 .0100 .3238 .01 5.00 2.00 .0753 .0100 .2793 .01 5.00 5.00 .0912 .0100 .2417 .01 5.00 10.00 .0995 .0100 .2261 .01 10.00 1.00 .0996 .0100 .2704 .01 10.00 2.00 .1323 .0100 .2275 .01 10.00 5.00 .1774 .0100 .1907 .01 10.00 10.00 .2062 .0100 .1747 .10 1.00 1.00 .0251 .1000 1.9605 .10 1.00 2.00 .0202 .1000 2.4503 .10 1.00 5.00 .0175 .1000 2.8421 .10 1.00 10.00 .0166 .1000 2.9915 .10 2.00 1.00 .1173 .1000 .7290 .10 2.00 2.00 .1111 .1000 .8100 .10 2.00 5.00 .1076 .1000 .8629 .10 2.00 10.00 .1065 .1000 .8812 .10 5.00 1.00 .2463 .1000 .5220 .10 5.00 2.00 .2646 .1000 .5687 .10 5.00 5.00 .2896 .1000 .5934 .10 5.00 10.00 .3033 .1000 .6006 .10 10.00 1.00 .3044 .1000 .4857 .10 10.00 2.00 .3419 .1000 .5396 .10 10.00 5.00 .3966 .1000 .5816 .10 10.00 10.00 .4306 .1000 .6031 .20 1.00 1.00 .1056 .2000 .8861 .20 1.00 2.00 .0833 .2000 1.1520 .20 1.00 5.00 .0714 .2000 1.3616 .20 1.00 10.00 .0677 .2000 1.4410 .20 2.00 1.00 .2812 .2000 .5120 .20 2.00 2.00 .2500 .2000 .6400 .20 2.00 5.00 .2334 .2000 .7317 .20 2.00 10.00 .2282 .2000 .7651 .20 5.00 1.00 .4591 .2000 .4124 .20 5.00 2.00 .4426 .2000 .5362 .20 5.00 5.00 .4489 .2000 .6397 .20 5.00 10.00 .4563 .2000 .6842 .20 10.00 1.00 .5311 .2000 .3893 .20 10.00 2.00 .5267 .2000 .5225 .20 10.00 5.00 .5547 .2000 .6584 .20 10.00 10.00 .5775 .2000 .7343 .30 1.00 1.00 .2596 .3000 .4960 .30 1.00 2.00 .1978 .3000 .6901 .30 1.00 5.00 .1667 .3000 .8428 .30 1.00 10.00 .1573 .3000 .9004 .30 2.00 1.00 .5204 .3000 .3430 .30 2.00 2.00 .4286 .3000 .4900 .30 2.00 5.00 .3834 .3000 .6069 .30 2.00 10.00 .3697 .3000 .6518 .30 5.00 1.00 .7486 .3000 .2880 .30 5.00 2.00 .6466 .3000 .4433 .30 5.00 5.00 .6094 .3000 .5984 .30 5.00 10.00 .6026 .3000 .6729 .30 10.00 1.00 .8370 .3000 .2732 .30 10.00 2.00 .7346 .3000 .4370 .30 10.00 5.00 .7085 .3000 .6313 .30 10.00 10.00 .7112 .3000 .7487 .40 1.00 1.00 .5279 .4000 .2868 .40 1.00 2.00 .3810 .4000 .4410 .40 1.00 5.00 .3130 .4000 .5656 .40 1.00 10.00 .2933 .4000 .6129 .40 2.00 1.00 .8889 .4000 .2160 .40 2.00 2.00 .6667 .4000 .3600 .40 2.00 5.00 .5668 .4000 .4891 .40 2.00 10.00 .5378 .4000 .5417 .40 5.00 1.00 1.1826 .4000 .1847 .40 5.00 2.00 .9035 .4000 .3396 .40 5.00 5.00 .7879 .4000 .5199 .40 5.00 10.00 .7573 .4000 .6147 .40 10.00 1.00 1.2941 .4000 .1755 .40 10.00 2.00 .9944 .4000 .3368 .40 10.00 5.00 .8763 .4000 .5572 .40 10.00 10.00 .8484 .4000 .7011 .50 1.00 1.00 1.0000 .5000 .1592 .50 1.00 2.00 .6667 .5000 .2813 .50 1.00 5.00 .5281 .5000 .3865 .50 1.00 10.00 .4897 .5000 .4274 .50 2.00 1.00 1.5000 .5000 .1250 .50 2.00 2.00 1.0000 .5000 .2500 .50 2.00 5.00 .7988 .5000 .3789 .50 2.00 10.00 .7435 .5000 .4353 .50 5.00 1.00 1.8937 .5000 .1078 .50 5.00 2.00 1.2519 .5000 .2418 .50 5.00 5.00 1.0000 .5000 .4244 .50 5.00 10.00 .9319 .5000 .5295 .50 10.00 1.00 2.0419 .5000 .1025 .50 10.00 2.00 1.3450 .5000 .2406 .50 10.00 5.00 1.0730 .5000 .4599 .50 10.00 10.00 1.0000 .5000 .6152 .60 1.00 1.00 1.8944 .6000 .0799 .60 1.00 2.00 1.1250 .6000 .1707 .60 1.00 5.00 .8456 .6000 .2583 .60 1.00 10.00 .7727 .6000 .2939 .60 2.00 1.00 2.6250 .6000 .0640 .60 2.00 2.00 1.5000 .6000 .1600 .60 2.00 5.00 1.1067 .6000 .2773 .60 2.00 10.00 1.0056 .6000 .3330 .60 5.00 1.00 3.1953 .6000 .0554 .60 5.00 2.00 1.7644 .6000 .1571 .60 5.00 5.00 1.2692 .6000 .3227 .60 5.00 10.00 1.1412 .6000 .4278 .60 10.00 1.00 3.4100 .6000 .0527 .60 10.00 2.00 1.8593 .6000 .1567 .60 10.00 5.00 1.3204 .6000 .3526 .60 10.00 10.00 1.1787 .6000 .5047 .70 1.00 1.00 3.8518 .7000 .0334 .70 1.00 2.00 1.9216 .7000 .0929 .70 1.00 5.00 1.3358 .7000 .1614 .70 1.00 10.00 1.1948 .7000 .1914 .70 2.00 1.00 5.0556 .7000 .0270 .70 2.00 2.00 2.3333 .7000 .0900 .70 2.00 5.00 1.5466 .7000 .1853 .70 2.00 10.00 1.3613 .7000 .2358 .70 5.00 1.00 6.0006 .7000 .0234 .70 5.00 2.00 2.6084 .7000 .0892 .70 5.00 5.00 1.6410 .7000 .2222 .70 5.00 10.00 1.4114 .7000 .3169 .70 10.00 1.00 6.3579 .7000 .0223 .70 10.00 2.00 2.7049 .7000 .0891 .70 10.00 5.00 1.6595 .7000 .2443 .70 10.00 10.00 1.4061 .7000 .3787 .80 1.00 1.00 9.4721 .8000 .0099 .80 1.00 2.00 3.5556 .8000 .0405 .80 1.00 5.00 2.1782 .8000 .0869 .80 1.00 10.00 1.8829 .8000 .1098 .80 2.00 1.00 12.0000 .8000 .0080 .80 2.00 2.00 4.0000 .8000 .0400 .80 2.00 5.00 2.2591 .8000 .1051 .80 2.00 10.00 1.8986 .8000 .1450 .80 5.00 1.00 14.0084 .8000 .0069 .80 5.00 2.00 4.2844 .8000 .0399 .80 5.00 5.00 2.2275 .8000 .1289 .80 5.00 10.00 1.8027 .8000 .2026 .80 10.00 1.00 14.7719 .8000 .0066 .80 10.00 2.00 4.3822 .8000 .0398 .80 10.00 5.00 2.1914 .8000 .1425 .80 10.00 10.00 1.7316 .8000 .2449 .90 1.00 1.00 39.8635 .9000 .0012 .90 1.00 2.00 8.5263 .9000 .0100 .90 1.00 5.00 4.0604 .9000 .0317 .90 1.00 10.00 3.2850 .9000 .0450 .90 2.00 1.00 49.5000 .9000 .0010 .90 2.00 2.00 9.0000 .9000 .0100 .90 2.00 5.00 3.7797 .9000 .0398 .90 2.00 10.00 2.9245 .9000 .0631 .90 5.00 1.00 57.2401 .9000 .0009 .90 5.00 2.00 9.2926 .9000 .0100 .90 5.00 5.00 3.4530 .9000 .0498 .90 5.00 10.00 2.5216 .9000 .0915 .90 10.00 1.00 60.1950 .9000 .0008 .90 10.00 2.00 9.3916 .9000 .0100 .90 10.00 5.00 3.2974 .9000 .0552 .90 10.00 10.00 2.3226 .9000 .1118 .99 1.00 1.00 4052.1807 .9900 .0000 .99 1.00 2.00 98.5025 .9900 .0001 .99 1.00 5.00 16.2582 .9900 .0012 .99 1.00 10.00 10.0443 .9900 .0027 .99 2.00 1.00 4999.5000 .9900 .0000 .99 2.00 2.00 99.0000 .9900 .0001 .99 2.00 5.00 13.2739 .9900 .0016 .99 2.00 10.00 7.5594 .9900 .0040 .99 5.00 1.00 5763.6496 .9900 .0000 .99 5.00 2.00 99.2993 .9900 .0001 .99 5.00 5.00 10.9670 .9900 .0020 .99 5.00 10.00 5.6363 .9900 .0060 .99 10.00 1.00 6055.8467 .9900 .0000 .99 10.00 2.00 99.3992 .9900 .0001 .99 10.00 5.00 10.0510 .9900 .0022 .99 10.00 10.00 4.8491 .9900 .0074 _ATEOF cat >f.sps <<'_ATEOF' DATA LIST LIST FILE='f.in' NOTABLE SKIP=1 /P df1 df2 Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.f(P, df1, df2). COMPUTE cdf = cdf.f(x, df1, df2). COMPUTE pdf = pdf.f(x, df1, df2). DO IF $CASENUM = 1. PRINT OUTFILE='f.out'/" P df1 df2 x cdf pdf ". END IF. PRINT OUTFILE='f.out'/P df1 df2 x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:1042: pspp -O format=csv f.sps" at_fn_check_prepare_trace "randist.at:1042" ( $at_check_trace; pspp -O format=csv f.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:1042" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:1042: \$PERL compare.pl f.in f.out" at_fn_check_prepare_dynamic "$PERL compare.pl f.in f.out" "randist.at:1042" ( $at_check_trace; $PERL compare.pl f.in f.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:1042" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1057 #AT_START_1058 at_fn_group_banner 1058 'randist.at:1222' \ "random distributions -- gamma" " " 131 at_xfail=no ( $as_echo "1058. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >gamma.in <<'_ATEOF' P a b x cdf pdf .01 .50 -10.00 . . . .01 .50 -5.00 . . . .01 .50 .00 . . . .01 .50 5.00 .0000 .0100 318.2766 .01 .50 10.00 .0000 .0100 636.5531 .01 1.00 -10.00 . . . .01 1.00 -5.00 . . . .01 1.00 .00 . . . .01 1.00 5.00 .0020 .0100 4.9500 .01 1.00 10.00 .0010 .0100 9.9000 .01 2.00 -10.00 . . . .01 2.00 -5.00 . . . .01 2.00 .00 . . . .01 2.00 5.00 .0297 .0100 .6402 .01 2.00 10.00 .0149 .0100 1.2805 .01 5.00 -10.00 . . . .01 5.00 -5.00 . . . .01 5.00 .00 . . . .01 5.00 5.00 .2558 .0100 .1552 .01 5.00 10.00 .1279 .0100 .3104 .10 .50 -10.00 . . . .10 .50 -5.00 . . . .10 .50 .00 . . . .10 .50 5.00 .0016 .1000 31.4977 .10 .50 10.00 .0008 .1000 62.9955 .10 1.00 -10.00 . . . .10 1.00 -5.00 . . . .10 1.00 .00 . . . .10 1.00 5.00 .0211 .1000 4.5000 .10 1.00 10.00 .0105 .1000 9.0000 .10 2.00 -10.00 . . . .10 2.00 -5.00 . . . .10 2.00 .00 . . . .10 2.00 5.00 .1064 .1000 1.5623 .10 2.00 10.00 .0532 .1000 3.1246 .10 5.00 -10.00 . . . .10 5.00 -5.00 . . . .10 5.00 .00 . . . .10 5.00 5.00 .4865 .1000 .6406 .10 5.00 10.00 .2433 .1000 1.2812 .20 .50 -10.00 . . . .20 .50 -5.00 . . . .20 .50 .00 . . . .20 .50 5.00 .0064 .2000 15.2495 .20 .50 10.00 .0032 .2000 30.4991 .20 1.00 -10.00 . . . .20 1.00 -5.00 . . . .20 1.00 .00 . . . .20 1.00 5.00 .0446 .2000 4.0000 .20 1.00 10.00 .0223 .2000 8.0000 .20 2.00 -10.00 . . . .20 2.00 -5.00 . . . .20 2.00 .00 . . . .20 2.00 5.00 .1649 .2000 1.8075 .20 2.00 10.00 .0824 .2000 3.6150 .20 5.00 -10.00 . . . .20 5.00 -5.00 . . . .20 5.00 .00 . . . .20 5.00 5.00 .6179 .2000 .8641 .20 5.00 10.00 .3090 .2000 1.7282 .30 .50 -10.00 . . . .30 .50 -5.00 . . . .30 .50 .00 . . . .30 .50 5.00 .0148 .3000 9.6128 .30 .50 10.00 .0074 .3000 19.2255 .30 1.00 -10.00 . . . .30 1.00 -5.00 . . . .30 1.00 .00 . . . .30 1.00 5.00 .0713 .3000 3.5000 .30 1.00 10.00 .0357 .3000 7.0000 .30 2.00 -10.00 . . . .30 2.00 -5.00 . . . .30 2.00 .00 . . . .30 2.00 5.00 .2195 .3000 1.8312 .30 2.00 10.00 .1097 .3000 3.6625 .30 5.00 -10.00 . . . .30 5.00 -5.00 . . . .30 5.00 .00 . . . .30 5.00 5.00 .7267 .3000 .9595 .30 5.00 10.00 .3634 .3000 1.9190 .40 .50 -10.00 . . . .40 .50 -5.00 . . . .40 .50 .00 . . . .40 .50 5.00 .0275 .4000 6.6303 .40 .50 10.00 .0137 .4000 13.2606 .40 1.00 -10.00 . . . .40 1.00 -5.00 . . . .40 1.00 .00 . . . .40 1.00 5.00 .1022 .4000 3.0000 .40 1.00 10.00 .0511 .4000 6.0000 .40 2.00 -10.00 . . . .40 2.00 -5.00 . . . .40 2.00 .00 . . . .40 2.00 5.00 .2753 .4000 1.7376 .40 2.00 10.00 .1376 .4000 3.4752 .40 5.00 -10.00 . . . .40 5.00 -5.00 . . . .40 5.00 .00 . . . .40 5.00 5.00 .8295 .4000 .9742 .40 5.00 10.00 .4148 .4000 1.9485 .50 .50 -10.00 . . . .50 .50 -5.00 . . . .50 .50 .00 . . . .50 .50 5.00 .0455 .5000 4.7114 .50 .50 10.00 .0227 .5000 9.4227 .50 1.00 -10.00 . . . .50 1.00 -5.00 . . . .50 1.00 .00 . . . .50 1.00 5.00 .1386 .5000 2.5000 .50 1.00 10.00 .0693 .5000 5.0000 .50 2.00 -10.00 . . . .50 2.00 -5.00 . . . .50 2.00 .00 . . . .50 2.00 5.00 .3357 .5000 1.5666 .50 2.00 10.00 .1678 .5000 3.1332 .50 5.00 -10.00 . . . .50 5.00 -5.00 . . . .50 5.00 .00 . . . .50 5.00 5.00 .9342 .5000 .9286 .50 5.00 10.00 .4671 .5000 1.8571 .60 .50 -10.00 . . . .60 .50 -5.00 . . . .60 .50 .00 . . . .60 .50 5.00 .0708 .6000 3.3265 .60 .50 10.00 .0354 .6000 6.6529 .60 1.00 -10.00 . . . .60 1.00 -5.00 . . . .60 1.00 .00 . . . .60 1.00 5.00 .1833 .6000 2.0000 .60 1.00 10.00 .0916 .6000 4.0000 .60 2.00 -10.00 . . . .60 2.00 -5.00 . . . .60 2.00 .00 . . . .60 2.00 5.00 .4045 .6000 1.3383 .60 2.00 10.00 .2022 .6000 2.6765 .60 5.00 -10.00 . . . .60 5.00 -5.00 . . . .60 5.00 .00 . . . .60 5.00 5.00 1.0473 .6000 .8332 .60 5.00 10.00 .5237 .6000 1.6663 .70 .50 -10.00 . . . .70 .50 -5.00 . . . .70 .50 .00 . . . .70 .50 5.00 .1074 .7000 2.2496 .70 .50 10.00 .0537 .7000 4.4993 .70 1.00 -10.00 . . . .70 1.00 -5.00 . . . .70 1.00 .00 . . . .70 1.00 5.00 .2408 .7000 1.5000 .70 1.00 10.00 .1204 .7000 3.0000 .70 2.00 -10.00 . . . .70 2.00 -5.00 . . . .70 2.00 .00 . . . .70 2.00 5.00 .4878 .7000 1.0639 .70 2.00 10.00 .2439 .7000 2.1277 .70 5.00 -10.00 . . . .70 5.00 -5.00 . . . .70 5.00 .00 . . . .70 5.00 5.00 1.1781 .7000 .6937 .70 5.00 10.00 .5890 .7000 1.3874 .80 .50 -10.00 . . . .80 .50 -5.00 . . . .80 .50 .00 . . . .80 .50 5.00 .1642 .8000 1.3694 .80 .50 10.00 .0821 .8000 2.7388 .80 1.00 -10.00 . . . .80 1.00 -5.00 . . . .80 1.00 .00 . . . .80 1.00 5.00 .3219 .8000 1.0000 .80 1.00 10.00 .1609 .8000 2.0000 .80 2.00 -10.00 . . . .80 2.00 -5.00 . . . .80 2.00 .00 . . . .80 2.00 5.00 .5989 .8000 .7496 .80 2.00 10.00 .2994 .8000 1.4993 .80 5.00 -10.00 . . . .80 5.00 -5.00 . . . .80 5.00 .00 . . . .80 5.00 5.00 1.3442 .8000 .5124 .80 5.00 10.00 .6721 .8000 1.0248 .90 .50 -10.00 . . . .90 .50 -5.00 . . . .90 .50 .00 . . . .90 .50 5.00 .2706 .9000 .6270 .90 .50 10.00 .1353 .9000 1.2540 .90 1.00 -10.00 . . . .90 1.00 -5.00 . . . .90 1.00 .00 . . . .90 1.00 5.00 .4605 .9000 .5000 .90 1.00 10.00 .2303 .9000 1.0000 .90 2.00 -10.00 . . . .90 2.00 -5.00 . . . .90 2.00 .00 . . . .90 2.00 5.00 .7779 .9000 .3977 .90 2.00 10.00 .3890 .9000 .7955 .90 5.00 -10.00 . . . .90 5.00 -5.00 . . . .90 5.00 .00 . . . .90 5.00 5.00 1.5987 .9000 .2872 .90 5.00 10.00 .7994 .9000 .5744 .99 .50 -10.00 . . . .99 .50 -5.00 . . . .99 .50 .00 . . . .99 .50 5.00 .6635 .9900 .0561 .99 .50 10.00 .3317 .9900 .1123 .99 1.00 -10.00 . . . .99 1.00 -5.00 . . . .99 1.00 .00 . . . .99 1.00 5.00 .9210 .9900 .0500 .99 1.00 10.00 .4605 .9900 .1000 .99 2.00 -10.00 . . . .99 2.00 -5.00 . . . .99 2.00 .00 . . . .99 2.00 5.00 1.3277 .9900 .0435 .99 2.00 10.00 .6638 .9900 .0869 .99 5.00 -10.00 . . . .99 5.00 -5.00 . . . .99 5.00 .00 . . . .99 5.00 5.00 2.3209 .9900 .0345 .99 5.00 10.00 1.1605 .9900 .0689 _ATEOF cat >gamma.sps <<'_ATEOF' DATA LIST LIST FILE='gamma.in' NOTABLE SKIP=1 /P a b Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.gamma(P, a, b). COMPUTE cdf = cdf.gamma(x, a, b). COMPUTE pdf = pdf.gamma(x, a, b). DO IF $CASENUM = 1. PRINT OUTFILE='gamma.out'/" P a b x cdf pdf ". END IF. PRINT OUTFILE='gamma.out'/P a b x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:1222: pspp -O format=csv gamma.sps" at_fn_check_prepare_trace "randist.at:1222" ( $at_check_trace; pspp -O format=csv gamma.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:1222" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:1222: \$PERL compare.pl gamma.in gamma.out" at_fn_check_prepare_dynamic "$PERL compare.pl gamma.in gamma.out" "randist.at:1222" ( $at_check_trace; $PERL compare.pl gamma.in gamma.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:1222" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1058 #AT_START_1059 at_fn_group_banner 1059 'randist.at:1446' \ "random distributions -- laplace" " " 131 at_xfail=no ( $as_echo "1059. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >laplace.in <<'_ATEOF' P a b x cdf pdf .01 -10.00 .50 -11.9560 .0100 .0200 .01 -10.00 1.00 -13.9120 .0100 .0100 .01 -10.00 2.00 -17.8240 .0100 .0050 .01 -10.00 5.00 -29.5601 .0100 .0020 .01 -5.00 .50 -6.9560 .0100 .0200 .01 -5.00 1.00 -8.9120 .0100 .0100 .01 -5.00 2.00 -12.8240 .0100 .0050 .01 -5.00 5.00 -24.5601 .0100 .0020 .01 .00 .50 -1.9560 .0100 .0200 .01 .00 1.00 -3.9120 .0100 .0100 .01 .00 2.00 -7.8240 .0100 .0050 .01 .00 5.00 -19.5601 .0100 .0020 .01 5.00 .50 3.0440 .0100 .0200 .01 5.00 1.00 1.0880 .0100 .0100 .01 5.00 2.00 -2.8240 .0100 .0050 .01 5.00 5.00 -14.5601 .0100 .0020 .01 10.00 .50 8.0440 .0100 .0200 .01 10.00 1.00 6.0880 .0100 .0100 .01 10.00 2.00 2.1760 .0100 .0050 .01 10.00 5.00 -9.5601 .0100 .0020 .10 -10.00 .50 -10.8047 .1000 .2000 .10 -10.00 1.00 -11.6094 .1000 .1000 .10 -10.00 2.00 -13.2189 .1000 .0500 .10 -10.00 5.00 -18.0472 .1000 .0200 .10 -5.00 .50 -5.8047 .1000 .2000 .10 -5.00 1.00 -6.6094 .1000 .1000 .10 -5.00 2.00 -8.2189 .1000 .0500 .10 -5.00 5.00 -13.0472 .1000 .0200 .10 .00 .50 -.8047 .1000 .2000 .10 .00 1.00 -1.6094 .1000 .1000 .10 .00 2.00 -3.2189 .1000 .0500 .10 .00 5.00 -8.0472 .1000 .0200 .10 5.00 .50 4.1953 .1000 .2000 .10 5.00 1.00 3.3906 .1000 .1000 .10 5.00 2.00 1.7811 .1000 .0500 .10 5.00 5.00 -3.0472 .1000 .0200 .10 10.00 .50 9.1953 .1000 .2000 .10 10.00 1.00 8.3906 .1000 .1000 .10 10.00 2.00 6.7811 .1000 .0500 .10 10.00 5.00 1.9528 .1000 .0200 .20 -10.00 .50 -10.4581 .2000 .4000 .20 -10.00 1.00 -10.9163 .2000 .2000 .20 -10.00 2.00 -11.8326 .2000 .1000 .20 -10.00 5.00 -14.5815 .2000 .0400 .20 -5.00 .50 -5.4581 .2000 .4000 .20 -5.00 1.00 -5.9163 .2000 .2000 .20 -5.00 2.00 -6.8326 .2000 .1000 .20 -5.00 5.00 -9.5815 .2000 .0400 .20 .00 .50 -.4581 .2000 .4000 .20 .00 1.00 -.9163 .2000 .2000 .20 .00 2.00 -1.8326 .2000 .1000 .20 .00 5.00 -4.5815 .2000 .0400 .20 5.00 .50 4.5419 .2000 .4000 .20 5.00 1.00 4.0837 .2000 .2000 .20 5.00 2.00 3.1674 .2000 .1000 .20 5.00 5.00 .4185 .2000 .0400 .20 10.00 .50 9.5419 .2000 .4000 .20 10.00 1.00 9.0837 .2000 .2000 .20 10.00 2.00 8.1674 .2000 .1000 .20 10.00 5.00 5.4185 .2000 .0400 .30 -10.00 .50 -10.2554 .3000 .6000 .30 -10.00 1.00 -10.5108 .3000 .3000 .30 -10.00 2.00 -11.0217 .3000 .1500 .30 -10.00 5.00 -12.5541 .3000 .0600 .30 -5.00 .50 -5.2554 .3000 .6000 .30 -5.00 1.00 -5.5108 .3000 .3000 .30 -5.00 2.00 -6.0217 .3000 .1500 .30 -5.00 5.00 -7.5541 .3000 .0600 .30 .00 .50 -.2554 .3000 .6000 .30 .00 1.00 -.5108 .3000 .3000 .30 .00 2.00 -1.0217 .3000 .1500 .30 .00 5.00 -2.5541 .3000 .0600 .30 5.00 .50 4.7446 .3000 .6000 .30 5.00 1.00 4.4892 .3000 .3000 .30 5.00 2.00 3.9783 .3000 .1500 .30 5.00 5.00 2.4459 .3000 .0600 .30 10.00 .50 9.7446 .3000 .6000 .30 10.00 1.00 9.4892 .3000 .3000 .30 10.00 2.00 8.9783 .3000 .1500 .30 10.00 5.00 7.4459 .3000 .0600 .40 -10.00 .50 -10.1116 .4000 .8000 .40 -10.00 1.00 -10.2231 .4000 .4000 .40 -10.00 2.00 -10.4463 .4000 .2000 .40 -10.00 5.00 -11.1157 .4000 .0800 .40 -5.00 .50 -5.1116 .4000 .8000 .40 -5.00 1.00 -5.2231 .4000 .4000 .40 -5.00 2.00 -5.4463 .4000 .2000 .40 -5.00 5.00 -6.1157 .4000 .0800 .40 .00 .50 -.1116 .4000 .8000 .40 .00 1.00 -.2231 .4000 .4000 .40 .00 2.00 -.4463 .4000 .2000 .40 .00 5.00 -1.1157 .4000 .0800 .40 5.00 .50 4.8884 .4000 .8000 .40 5.00 1.00 4.7769 .4000 .4000 .40 5.00 2.00 4.5537 .4000 .2000 .40 5.00 5.00 3.8843 .4000 .0800 .40 10.00 .50 9.8884 .4000 .8000 .40 10.00 1.00 9.7769 .4000 .4000 .40 10.00 2.00 9.5537 .4000 .2000 .40 10.00 5.00 8.8843 .4000 .0800 .50 -10.00 .50 -10.0000 .5000 1.0000 .50 -10.00 1.00 -10.0000 .5000 .5000 .50 -10.00 2.00 -10.0000 .5000 .2500 .50 -10.00 5.00 -10.0000 .5000 .1000 .50 -5.00 .50 -5.0000 .5000 1.0000 .50 -5.00 1.00 -5.0000 .5000 .5000 .50 -5.00 2.00 -5.0000 .5000 .2500 .50 -5.00 5.00 -5.0000 .5000 .1000 .50 .00 .50 .0000 .5000 1.0000 .50 .00 1.00 .0000 .5000 .5000 .50 .00 2.00 .0000 .5000 .2500 .50 .00 5.00 .0000 .5000 .1000 .50 5.00 .50 5.0000 .5000 1.0000 .50 5.00 1.00 5.0000 .5000 .5000 .50 5.00 2.00 5.0000 .5000 .2500 .50 5.00 5.00 5.0000 .5000 .1000 .50 10.00 .50 10.0000 .5000 1.0000 .50 10.00 1.00 10.0000 .5000 .5000 .50 10.00 2.00 10.0000 .5000 .2500 .50 10.00 5.00 10.0000 .5000 .1000 .60 -10.00 .50 -9.8884 .6000 .8000 .60 -10.00 1.00 -9.7769 .6000 .4000 .60 -10.00 2.00 -9.5537 .6000 .2000 .60 -10.00 5.00 -8.8843 .6000 .0800 .60 -5.00 .50 -4.8884 .6000 .8000 .60 -5.00 1.00 -4.7769 .6000 .4000 .60 -5.00 2.00 -4.5537 .6000 .2000 .60 -5.00 5.00 -3.8843 .6000 .0800 .60 .00 .50 .1116 .6000 .8000 .60 .00 1.00 .2231 .6000 .4000 .60 .00 2.00 .4463 .6000 .2000 .60 .00 5.00 1.1157 .6000 .0800 .60 5.00 .50 5.1116 .6000 .8000 .60 5.00 1.00 5.2231 .6000 .4000 .60 5.00 2.00 5.4463 .6000 .2000 .60 5.00 5.00 6.1157 .6000 .0800 .60 10.00 .50 10.1116 .6000 .8000 .60 10.00 1.00 10.2231 .6000 .4000 .60 10.00 2.00 10.4463 .6000 .2000 .60 10.00 5.00 11.1157 .6000 .0800 .70 -10.00 .50 -9.7446 .7000 .6000 .70 -10.00 1.00 -9.4892 .7000 .3000 .70 -10.00 2.00 -8.9783 .7000 .1500 .70 -10.00 5.00 -7.4459 .7000 .0600 .70 -5.00 .50 -4.7446 .7000 .6000 .70 -5.00 1.00 -4.4892 .7000 .3000 .70 -5.00 2.00 -3.9783 .7000 .1500 .70 -5.00 5.00 -2.4459 .7000 .0600 .70 .00 .50 .2554 .7000 .6000 .70 .00 1.00 .5108 .7000 .3000 .70 .00 2.00 1.0217 .7000 .1500 .70 .00 5.00 2.5541 .7000 .0600 .70 5.00 .50 5.2554 .7000 .6000 .70 5.00 1.00 5.5108 .7000 .3000 .70 5.00 2.00 6.0217 .7000 .1500 .70 5.00 5.00 7.5541 .7000 .0600 .70 10.00 .50 10.2554 .7000 .6000 .70 10.00 1.00 10.5108 .7000 .3000 .70 10.00 2.00 11.0217 .7000 .1500 .70 10.00 5.00 12.5541 .7000 .0600 .80 -10.00 .50 -9.5419 .8000 .4000 .80 -10.00 1.00 -9.0837 .8000 .2000 .80 -10.00 2.00 -8.1674 .8000 .1000 .80 -10.00 5.00 -5.4185 .8000 .0400 .80 -5.00 .50 -4.5419 .8000 .4000 .80 -5.00 1.00 -4.0837 .8000 .2000 .80 -5.00 2.00 -3.1674 .8000 .1000 .80 -5.00 5.00 -.4185 .8000 .0400 .80 .00 .50 .4581 .8000 .4000 .80 .00 1.00 .9163 .8000 .2000 .80 .00 2.00 1.8326 .8000 .1000 .80 .00 5.00 4.5815 .8000 .0400 .80 5.00 .50 5.4581 .8000 .4000 .80 5.00 1.00 5.9163 .8000 .2000 .80 5.00 2.00 6.8326 .8000 .1000 .80 5.00 5.00 9.5815 .8000 .0400 .80 10.00 .50 10.4581 .8000 .4000 .80 10.00 1.00 10.9163 .8000 .2000 .80 10.00 2.00 11.8326 .8000 .1000 .80 10.00 5.00 14.5815 .8000 .0400 .90 -10.00 .50 -9.1953 .9000 .2000 .90 -10.00 1.00 -8.3906 .9000 .1000 .90 -10.00 2.00 -6.7811 .9000 .0500 .90 -10.00 5.00 -1.9528 .9000 .0200 .90 -5.00 .50 -4.1953 .9000 .2000 .90 -5.00 1.00 -3.3906 .9000 .1000 .90 -5.00 2.00 -1.7811 .9000 .0500 .90 -5.00 5.00 3.0472 .9000 .0200 .90 .00 .50 .8047 .9000 .2000 .90 .00 1.00 1.6094 .9000 .1000 .90 .00 2.00 3.2189 .9000 .0500 .90 .00 5.00 8.0472 .9000 .0200 .90 5.00 .50 5.8047 .9000 .2000 .90 5.00 1.00 6.6094 .9000 .1000 .90 5.00 2.00 8.2189 .9000 .0500 .90 5.00 5.00 13.0472 .9000 .0200 .90 10.00 .50 10.8047 .9000 .2000 .90 10.00 1.00 11.6094 .9000 .1000 .90 10.00 2.00 13.2189 .9000 .0500 .90 10.00 5.00 18.0472 .9000 .0200 .99 -10.00 .50 -8.0440 .9900 .0200 .99 -10.00 1.00 -6.0880 .9900 .0100 .99 -10.00 2.00 -2.1760 .9900 .0050 .99 -10.00 5.00 9.5601 .9900 .0020 .99 -5.00 .50 -3.0440 .9900 .0200 .99 -5.00 1.00 -1.0880 .9900 .0100 .99 -5.00 2.00 2.8240 .9900 .0050 .99 -5.00 5.00 14.5601 .9900 .0020 .99 .00 .50 1.9560 .9900 .0200 .99 .00 1.00 3.9120 .9900 .0100 .99 .00 2.00 7.8240 .9900 .0050 .99 .00 5.00 19.5601 .9900 .0020 .99 5.00 .50 6.9560 .9900 .0200 .99 5.00 1.00 8.9120 .9900 .0100 .99 5.00 2.00 12.8240 .9900 .0050 .99 5.00 5.00 24.5601 .9900 .0020 .99 10.00 .50 11.9560 .9900 .0200 .99 10.00 1.00 13.9120 .9900 .0100 .99 10.00 2.00 17.8240 .9900 .0050 .99 10.00 5.00 29.5601 .9900 .0020 _ATEOF cat >laplace.sps <<'_ATEOF' DATA LIST LIST FILE='laplace.in' NOTABLE SKIP=1 /P a b Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.laplace(P, a, b). COMPUTE cdf = cdf.laplace(x, a, b). COMPUTE pdf = pdf.laplace(x, a, b). DO IF $CASENUM = 1. PRINT OUTFILE='laplace.out'/" P a b x cdf pdf ". END IF. PRINT OUTFILE='laplace.out'/P a b x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:1446: pspp -O format=csv laplace.sps" at_fn_check_prepare_trace "randist.at:1446" ( $at_check_trace; pspp -O format=csv laplace.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:1446" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:1446: \$PERL compare.pl laplace.in laplace.out" at_fn_check_prepare_dynamic "$PERL compare.pl laplace.in laplace.out" "randist.at:1446" ( $at_check_trace; $PERL compare.pl laplace.in laplace.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:1446" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1059 #AT_START_1060 at_fn_group_banner 1060 'randist.at:1670' \ "random distributions -- logistic" " " 131 at_xfail=no ( $as_echo "1060. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >logistic.in <<'_ATEOF' P a b x cdf pdf .01 -10.00 .50 -12.2976 .0100 .0198 .01 -10.00 1.00 -14.5951 .0100 .0099 .01 -10.00 2.00 -19.1902 .0100 .0049 .01 -10.00 5.00 -32.9756 .0100 .0020 .01 -5.00 .50 -7.2976 .0100 .0198 .01 -5.00 1.00 -9.5951 .0100 .0099 .01 -5.00 2.00 -14.1902 .0100 .0050 .01 -5.00 5.00 -27.9756 .0100 .0020 .01 .00 .50 -2.2976 .0100 .0198 .01 .00 1.00 -4.5951 .0100 .0099 .01 .00 2.00 -9.1902 .0100 .0050 .01 .00 5.00 -22.9756 .0100 .0020 .01 5.00 .50 2.7024 .0100 .0198 .01 5.00 1.00 .4049 .0100 .0099 .01 5.00 2.00 -4.1902 .0100 .0050 .01 5.00 5.00 -17.9756 .0100 .0020 .01 10.00 .50 7.7024 .0100 .0198 .01 10.00 1.00 5.4049 .0100 .0099 .01 10.00 2.00 .8098 .0100 .0050 .01 10.00 5.00 -12.9756 .0100 .0020 .10 -10.00 .50 -11.0986 .1000 .1800 .10 -10.00 1.00 -12.1972 .1000 .0900 .10 -10.00 2.00 -14.3944 .1000 .0450 .10 -10.00 5.00 -20.9861 .1000 .0180 .10 -5.00 .50 -6.0986 .1000 .1800 .10 -5.00 1.00 -7.1972 .1000 .0900 .10 -5.00 2.00 -9.3944 .1000 .0450 .10 -5.00 5.00 -15.9861 .1000 .0180 .10 .00 .50 -1.0986 .1000 .1800 .10 .00 1.00 -2.1972 .1000 .0900 .10 .00 2.00 -4.3944 .1000 .0450 .10 .00 5.00 -10.9861 .1000 .0180 .10 5.00 .50 3.9014 .1000 .1800 .10 5.00 1.00 2.8028 .1000 .0900 .10 5.00 2.00 .6056 .1000 .0450 .10 5.00 5.00 -5.9861 .1000 .0180 .10 10.00 .50 8.9014 .1000 .1800 .10 10.00 1.00 7.8028 .1000 .0900 .10 10.00 2.00 5.6056 .1000 .0450 .10 10.00 5.00 -.9861 .1000 .0180 .20 -10.00 .50 -10.6931 .2000 .3200 .20 -10.00 1.00 -11.3863 .2000 .1600 .20 -10.00 2.00 -12.7726 .2000 .0800 .20 -10.00 5.00 -16.9315 .2000 .0320 .20 -5.00 .50 -5.6931 .2000 .3200 .20 -5.00 1.00 -6.3863 .2000 .1600 .20 -5.00 2.00 -7.7726 .2000 .0800 .20 -5.00 5.00 -11.9315 .2000 .0320 .20 .00 .50 -.6931 .2000 .3200 .20 .00 1.00 -1.3863 .2000 .1600 .20 .00 2.00 -2.7726 .2000 .0800 .20 .00 5.00 -6.9315 .2000 .0320 .20 5.00 .50 4.3069 .2000 .3200 .20 5.00 1.00 3.6137 .2000 .1600 .20 5.00 2.00 2.2274 .2000 .0800 .20 5.00 5.00 -1.9315 .2000 .0320 .20 10.00 .50 9.3069 .2000 .3200 .20 10.00 1.00 8.6137 .2000 .1600 .20 10.00 2.00 7.2274 .2000 .0800 .20 10.00 5.00 3.0685 .2000 .0320 .30 -10.00 .50 -10.4236 .3000 .4200 .30 -10.00 1.00 -10.8473 .3000 .2100 .30 -10.00 2.00 -11.6946 .3000 .1050 .30 -10.00 5.00 -14.2365 .3000 .0420 .30 -5.00 .50 -5.4236 .3000 .4200 .30 -5.00 1.00 -5.8473 .3000 .2100 .30 -5.00 2.00 -6.6946 .3000 .1050 .30 -5.00 5.00 -9.2365 .3000 .0420 .30 .00 .50 -.4236 .3000 .4200 .30 .00 1.00 -.8473 .3000 .2100 .30 .00 2.00 -1.6946 .3000 .1050 .30 .00 5.00 -4.2365 .3000 .0420 .30 5.00 .50 4.5764 .3000 .4200 .30 5.00 1.00 4.1527 .3000 .2100 .30 5.00 2.00 3.3054 .3000 .1050 .30 5.00 5.00 .7635 .3000 .0420 .30 10.00 .50 9.5764 .3000 .4200 .30 10.00 1.00 9.1527 .3000 .2100 .30 10.00 2.00 8.3054 .3000 .1050 .30 10.00 5.00 5.7635 .3000 .0420 .40 -10.00 .50 -10.2027 .4000 .4800 .40 -10.00 1.00 -10.4055 .4000 .2400 .40 -10.00 2.00 -10.8109 .4000 .1200 .40 -10.00 5.00 -12.0273 .4000 .0480 .40 -5.00 .50 -5.2027 .4000 .4800 .40 -5.00 1.00 -5.4055 .4000 .2400 .40 -5.00 2.00 -5.8109 .4000 .1200 .40 -5.00 5.00 -7.0273 .4000 .0480 .40 .00 .50 -.2027 .4000 .4800 .40 .00 1.00 -.4055 .4000 .2400 .40 .00 2.00 -.8109 .4000 .1200 .40 .00 5.00 -2.0273 .4000 .0480 .40 5.00 .50 4.7973 .4000 .4800 .40 5.00 1.00 4.5945 .4000 .2400 .40 5.00 2.00 4.1891 .4000 .1200 .40 5.00 5.00 2.9727 .4000 .0480 .40 10.00 .50 9.7973 .4000 .4800 .40 10.00 1.00 9.5945 .4000 .2400 .40 10.00 2.00 9.1891 .4000 .1200 .40 10.00 5.00 7.9727 .4000 .0480 .50 -10.00 .50 -10.0000 .5000 .5000 .50 -10.00 1.00 -10.0000 .5000 .2500 .50 -10.00 2.00 -10.0000 .5000 .1250 .50 -10.00 5.00 -10.0000 .5000 .0500 .50 -5.00 .50 -5.0000 .5000 .5000 .50 -5.00 1.00 -5.0000 .5000 .2500 .50 -5.00 2.00 -5.0000 .5000 .1250 .50 -5.00 5.00 -5.0000 .5000 .0500 .50 .00 .50 .0000 .5000 .5000 .50 .00 1.00 .0000 .5000 .2500 .50 .00 2.00 .0000 .5000 .1250 .50 .00 5.00 .0000 .5000 .0500 .50 5.00 .50 5.0000 .5000 .5000 .50 5.00 1.00 5.0000 .5000 .2500 .50 5.00 2.00 5.0000 .5000 .1250 .50 5.00 5.00 5.0000 .5000 .0500 .50 10.00 .50 10.0000 .5000 .5000 .50 10.00 1.00 10.0000 .5000 .2500 .50 10.00 2.00 10.0000 .5000 .1250 .50 10.00 5.00 10.0000 .5000 .0500 .60 -10.00 .50 -9.7973 .6000 .4800 .60 -10.00 1.00 -9.5945 .6000 .2400 .60 -10.00 2.00 -9.1891 .6000 .1200 .60 -10.00 5.00 -7.9727 .6000 .0480 .60 -5.00 .50 -4.7973 .6000 .4800 .60 -5.00 1.00 -4.5945 .6000 .2400 .60 -5.00 2.00 -4.1891 .6000 .1200 .60 -5.00 5.00 -2.9727 .6000 .0480 .60 .00 .50 .2027 .6000 .4800 .60 .00 1.00 .4055 .6000 .2400 .60 .00 2.00 .8109 .6000 .1200 .60 .00 5.00 2.0273 .6000 .0480 .60 5.00 .50 5.2027 .6000 .4800 .60 5.00 1.00 5.4055 .6000 .2400 .60 5.00 2.00 5.8109 .6000 .1200 .60 5.00 5.00 7.0273 .6000 .0480 .60 10.00 .50 10.2027 .6000 .4800 .60 10.00 1.00 10.4055 .6000 .2400 .60 10.00 2.00 10.8109 .6000 .1200 .60 10.00 5.00 12.0273 .6000 .0480 .70 -10.00 .50 -9.5764 .7000 .4200 .70 -10.00 1.00 -9.1527 .7000 .2100 .70 -10.00 2.00 -8.3054 .7000 .1050 .70 -10.00 5.00 -5.7635 .7000 .0420 .70 -5.00 .50 -4.5764 .7000 .4200 .70 -5.00 1.00 -4.1527 .7000 .2100 .70 -5.00 2.00 -3.3054 .7000 .1050 .70 -5.00 5.00 -.7635 .7000 .0420 .70 .00 .50 .4236 .7000 .4200 .70 .00 1.00 .8473 .7000 .2100 .70 .00 2.00 1.6946 .7000 .1050 .70 .00 5.00 4.2365 .7000 .0420 .70 5.00 .50 5.4236 .7000 .4200 .70 5.00 1.00 5.8473 .7000 .2100 .70 5.00 2.00 6.6946 .7000 .1050 .70 5.00 5.00 9.2365 .7000 .0420 .70 10.00 .50 10.4236 .7000 .4200 .70 10.00 1.00 10.8473 .7000 .2100 .70 10.00 2.00 11.6946 .7000 .1050 .70 10.00 5.00 14.2365 .7000 .0420 .80 -10.00 .50 -9.3069 .8000 .3200 .80 -10.00 1.00 -8.6137 .8000 .1600 .80 -10.00 2.00 -7.2274 .8000 .0800 .80 -10.00 5.00 -3.0685 .8000 .0320 .80 -5.00 .50 -4.3069 .8000 .3200 .80 -5.00 1.00 -3.6137 .8000 .1600 .80 -5.00 2.00 -2.2274 .8000 .0800 .80 -5.00 5.00 1.9315 .8000 .0320 .80 .00 .50 .6931 .8000 .3200 .80 .00 1.00 1.3863 .8000 .1600 .80 .00 2.00 2.7726 .8000 .0800 .80 .00 5.00 6.9315 .8000 .0320 .80 5.00 .50 5.6931 .8000 .3200 .80 5.00 1.00 6.3863 .8000 .1600 .80 5.00 2.00 7.7726 .8000 .0800 .80 5.00 5.00 11.9315 .8000 .0320 .80 10.00 .50 10.6931 .8000 .3200 .80 10.00 1.00 11.3863 .8000 .1600 .80 10.00 2.00 12.7726 .8000 .0800 .80 10.00 5.00 16.9315 .8000 .0320 .90 -10.00 .50 -8.9014 .9000 .1800 .90 -10.00 1.00 -7.8028 .9000 .0900 .90 -10.00 2.00 -5.6056 .9000 .0450 .90 -10.00 5.00 .9861 .9000 .0180 .90 -5.00 .50 -3.9014 .9000 .1800 .90 -5.00 1.00 -2.8028 .9000 .0900 .90 -5.00 2.00 -.6056 .9000 .0450 .90 -5.00 5.00 5.9861 .9000 .0180 .90 .00 .50 1.0986 .9000 .1800 .90 .00 1.00 2.1972 .9000 .0900 .90 .00 2.00 4.3944 .9000 .0450 .90 .00 5.00 10.9861 .9000 .0180 .90 5.00 .50 6.0986 .9000 .1800 .90 5.00 1.00 7.1972 .9000 .0900 .90 5.00 2.00 9.3944 .9000 .0450 .90 5.00 5.00 15.9861 .9000 .0180 .90 10.00 .50 11.0986 .9000 .1800 .90 10.00 1.00 12.1972 .9000 .0900 .90 10.00 2.00 14.3944 .9000 .0450 .90 10.00 5.00 20.9861 .9000 .0180 .99 -10.00 .50 -7.7024 .9900 .0198 .99 -10.00 1.00 -5.4049 .9900 .0099 .99 -10.00 2.00 -.8098 .9900 .0050 .99 -10.00 5.00 12.9756 .9900 .0020 .99 -5.00 .50 -2.7024 .9900 .0198 .99 -5.00 1.00 -.4049 .9900 .0099 .99 -5.00 2.00 4.1902 .9900 .0050 .99 -5.00 5.00 17.9756 .9900 .0020 .99 .00 .50 2.2976 .9900 .0198 .99 .00 1.00 4.5951 .9900 .0099 .99 .00 2.00 9.1902 .9900 .0050 .99 .00 5.00 22.9756 .9900 .0020 .99 5.00 .50 7.2976 .9900 .0198 .99 5.00 1.00 9.5951 .9900 .0099 .99 5.00 2.00 14.1902 .9900 .0050 .99 5.00 5.00 27.9756 .9900 .0020 .99 10.00 .50 12.2976 .9900 .0198 .99 10.00 1.00 14.5951 .9900 .0099 .99 10.00 2.00 19.1902 .9900 .0050 .99 10.00 5.00 32.9756 .9900 .0020 _ATEOF cat >logistic.sps <<'_ATEOF' DATA LIST LIST FILE='logistic.in' NOTABLE SKIP=1 /P a b Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.logistic(P, a, b). COMPUTE cdf = cdf.logistic(x, a, b). COMPUTE pdf = pdf.logistic(x, a, b). DO IF $CASENUM = 1. PRINT OUTFILE='logistic.out'/" P a b x cdf pdf ". END IF. PRINT OUTFILE='logistic.out'/P a b x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:1670: pspp -O format=csv logistic.sps" at_fn_check_prepare_trace "randist.at:1670" ( $at_check_trace; pspp -O format=csv logistic.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:1670" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:1670: \$PERL compare.pl logistic.in logistic.out" at_fn_check_prepare_dynamic "$PERL compare.pl logistic.in logistic.out" "randist.at:1670" ( $at_check_trace; $PERL compare.pl logistic.in logistic.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:1670" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1060 #AT_START_1061 at_fn_group_banner 1061 'randist.at:1894' \ "random distributions -- lnormal" " " 131 at_xfail=no ( $as_echo "1061. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >lnormal.in <<'_ATEOF' P z s x cdf pdf .01 .50 .50 .1562 .0100 .3412 .01 .50 1.00 .0488 .0100 .5459 .01 .50 2.00 .0048 .0100 2.7949 .01 .50 5.00 .0000 .0100 1200.5834 .01 1.00 .50 .3125 .0100 .1706 .01 1.00 1.00 .0977 .0100 .2729 .01 1.00 2.00 .0095 .0100 1.3975 .01 1.00 5.00 .0000 .0100 600.2917 .01 2.00 .50 .6250 .0100 .0853 .01 2.00 1.00 .1953 .0100 .1365 .01 2.00 2.00 .0191 .0100 .6987 .01 2.00 5.00 .0000 .0100 300.1459 .01 5.00 .50 1.5625 .0100 .0341 .01 5.00 1.00 .4883 .0100 .0546 .01 5.00 2.00 .0477 .0100 .2795 .01 5.00 5.00 .0000 .0100 120.0583 .10 .50 .50 .2634 .1000 1.3324 .10 .50 1.00 .1388 .1000 1.2644 .10 .50 2.00 .0385 .1000 2.2773 .10 .50 5.00 .0008 .1000 42.5782 .10 1.00 .50 .5269 .1000 .6662 .10 1.00 1.00 .2776 .1000 .6322 .10 1.00 2.00 .0771 .1000 1.1386 .10 1.00 5.00 .0016 .1000 21.2891 .10 2.00 .50 1.0538 .1000 .3331 .10 2.00 1.00 .5552 .1000 .3161 .10 2.00 2.00 .1541 .1000 .5693 .10 2.00 5.00 .0033 .1000 10.6445 .10 5.00 .50 2.6344 .1000 .1332 .10 5.00 1.00 1.3880 .1000 .1264 .10 5.00 2.00 .3853 .1000 .2277 .10 5.00 5.00 .0082 .1000 4.2578 .20 .50 .50 .3283 .2000 1.7057 .20 .50 1.00 .2155 .2000 1.2991 .20 .50 2.00 .0929 .2000 1.5070 .20 .50 5.00 .0074 .2000 7.5286 .20 1.00 .50 .6565 .2000 .8529 .20 1.00 1.00 .4310 .2000 .6495 .20 1.00 2.00 .1858 .2000 .7535 .20 1.00 5.00 .0149 .2000 3.7643 .20 2.00 .50 1.3130 .2000 .4264 .20 2.00 1.00 .8620 .2000 .3248 .20 2.00 2.00 .3715 .2000 .3768 .20 2.00 5.00 .0297 .2000 1.8822 .20 5.00 .50 3.2826 .2000 .1706 .20 5.00 1.00 2.1551 .2000 .1299 .20 5.00 2.00 .9289 .2000 .1507 .20 5.00 5.00 .0744 .2000 .7529 .30 .50 .50 .3847 .3000 1.8077 .30 .50 1.00 .2960 .3000 1.1748 .30 .50 2.00 .1752 .3000 .9924 .30 .50 5.00 .0363 .3000 1.9142 .30 1.00 .50 .7694 .3000 .9039 .30 1.00 1.00 .5919 .3000 .5874 .30 1.00 2.00 .3504 .3000 .4962 .30 1.00 5.00 .0727 .3000 .9571 .30 2.00 .50 1.5387 .3000 .4519 .30 2.00 1.00 1.1838 .3000 .2937 .30 2.00 2.00 .7007 .3000 .2481 .30 2.00 5.00 .1453 .3000 .4785 .30 5.00 .50 3.8468 .3000 .1808 .30 5.00 1.00 2.9596 .3000 .1175 .30 5.00 2.00 1.7518 .3000 .0992 .30 5.00 5.00 .3633 .3000 .1914 .40 .50 .50 .4405 .4000 1.7541 .40 .50 1.00 .3881 .4000 .9955 .40 .50 2.00 .3012 .4000 .6412 .40 .50 5.00 .1409 .4000 .5485 .40 1.00 .50 .8810 .4000 .8770 .40 1.00 1.00 .7762 .4000 .4977 .40 1.00 2.00 .6025 .4000 .3206 .40 1.00 5.00 .2817 .4000 .2742 .40 2.00 .50 1.7620 .4000 .4385 .40 2.00 1.00 1.5524 .4000 .2489 .40 2.00 2.00 1.2050 .4000 .1603 .40 2.00 5.00 .5635 .4000 .1371 .40 5.00 .50 4.4051 .4000 .1754 .40 5.00 1.00 3.8810 .4000 .0995 .40 5.00 2.00 3.0124 .4000 .0641 .40 5.00 5.00 1.4087 .4000 .0548 .50 .50 .50 .5000 .5000 1.5958 .50 .50 1.00 .5000 .5000 .7979 .50 .50 2.00 .5000 .5000 .3989 .50 .50 5.00 .5000 .5000 .1596 .50 1.00 .50 1.0000 .5000 .7979 .50 1.00 1.00 1.0000 .5000 .3989 .50 1.00 2.00 1.0000 .5000 .1995 .50 1.00 5.00 1.0000 .5000 .0798 .50 2.00 .50 2.0000 .5000 .3989 .50 2.00 1.00 2.0000 .5000 .1995 .50 2.00 2.00 2.0000 .5000 .0997 .50 2.00 5.00 2.0000 .5000 .0399 .50 5.00 .50 5.0000 .5000 .1596 .50 5.00 1.00 5.0000 .5000 .0798 .50 5.00 2.00 5.0000 .5000 .0399 .50 5.00 5.00 5.0000 .5000 .0160 .60 .50 .50 .5675 .6000 1.3615 .60 .50 1.00 .6442 .6000 .5998 .60 .50 2.00 .8299 .6000 .2328 .60 .50 5.00 1.7746 .6000 .0435 .60 1.00 .50 1.1350 .6000 .6808 .60 1.00 1.00 1.2883 .6000 .2999 .60 1.00 2.00 1.6598 .6000 .1164 .60 1.00 5.00 3.5492 .6000 .0218 .60 2.00 .50 2.2701 .6000 .3404 .60 2.00 1.00 2.5767 .6000 .1499 .60 2.00 2.00 3.3196 .6000 .0582 .60 2.00 5.00 7.0985 .6000 .0109 .60 5.00 .50 5.6752 .6000 .1362 .60 5.00 1.00 6.4417 .6000 .0600 .60 5.00 2.00 8.2990 .6000 .0233 .60 5.00 5.00 17.7462 .6000 .0044 .70 .50 .50 .6499 .7000 1.0700 .70 .50 1.00 .8447 .7000 .4116 .70 .50 2.00 1.4271 .7000 .1218 .70 .50 5.00 6.8816 .7000 .0101 .70 1.00 .50 1.2998 .7000 .5350 .70 1.00 1.00 1.6894 .7000 .2058 .70 1.00 2.00 2.8542 .7000 .0609 .70 1.00 5.00 13.7633 .7000 .0051 .70 2.00 .50 2.5996 .7000 .2675 .70 2.00 1.00 3.3789 .7000 .1029 .70 2.00 2.00 5.7085 .7000 .0305 .70 2.00 5.00 27.5265 .7000 .0025 .70 5.00 .50 6.4989 .7000 .1070 .70 5.00 1.00 8.4472 .7000 .0412 .70 5.00 2.00 14.2711 .7000 .0122 .70 5.00 5.00 68.8163 .7000 .0010 .80 .50 .50 .7616 .8000 .7352 .80 .50 1.00 1.1601 .8000 .2413 .80 .50 2.00 2.6915 .8000 .0520 .80 .50 5.00 33.6145 .8000 .0017 .80 1.00 .50 1.5232 .8000 .3676 .80 1.00 1.00 2.3201 .8000 .1207 .80 1.00 2.00 5.3830 .8000 .0260 .80 1.00 5.00 67.2291 .8000 .0008 .80 2.00 .50 3.0464 .8000 .1838 .80 2.00 1.00 4.6403 .8000 .0603 .80 2.00 2.00 10.7660 .8000 .0130 .80 2.00 5.00 134.4582 .8000 .0004 .80 5.00 .50 7.6160 .8000 .0735 .80 5.00 1.00 11.6006 .8000 .0241 .80 5.00 2.00 26.9149 .8000 .0052 .80 5.00 5.00 336.1455 .8000 .0002 .90 .50 .50 .9490 .9000 .3699 .90 .50 1.00 1.8011 .9000 .0974 .90 .50 2.00 6.4880 .9000 .0135 .90 .50 5.00 303.2661 .9000 .0001 .90 1.00 .50 1.8980 .9000 .1849 .90 1.00 1.00 3.6022 .9000 .0487 .90 1.00 2.00 12.9760 .9000 .0068 .90 1.00 5.00 606.5322 .9000 .0001 .90 2.00 .50 3.7959 .9000 .0925 .90 2.00 1.00 7.2044 .9000 .0244 .90 2.00 2.00 25.9520 .9000 .0034 .90 2.00 5.00 1213.0644 .9000 .0000 .90 5.00 .50 9.4898 .9000 .0370 .90 5.00 1.00 18.0111 .9000 .0097 .90 5.00 2.00 64.8801 .9000 .0014 .90 5.00 5.00 3032.6610 .9000 .0000 .99 .50 .50 1.6000 .9900 .0333 .99 .50 1.00 5.1202 .9900 .0052 .99 .50 2.00 52.4337 .9900 .0003 .99 .50 5.00 56308.0163 .9900 .0000 .99 1.00 .50 3.2001 .9900 .0167 .99 1.00 1.00 10.2405 .9900 .0026 .99 1.00 2.00 104.8673 .9900 .0001 .99 1.00 5.00 112616.033 .9900 .0000 .99 2.00 .50 6.4001 .9900 .0083 .99 2.00 1.00 20.4809 .9900 .0013 .99 2.00 2.00 209.7346 .9900 .0001 .99 2.00 5.00 225232.065 .9900 .0000 .99 5.00 .50 16.0004 .9900 .0033 .99 5.00 1.00 51.2024 .9900 .0005 .99 5.00 2.00 524.3365 .9900 .0000 .99 5.00 5.00 563080.163 .9900 .0000 _ATEOF cat >lnormal.sps <<'_ATEOF' DATA LIST LIST FILE='lnormal.in' NOTABLE SKIP=1 /P z s Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.lnormal(P, z, s). COMPUTE cdf = cdf.lnormal(x, z, s). COMPUTE pdf = pdf.lnormal(x, z, s). DO IF $CASENUM = 1. PRINT OUTFILE='lnormal.out'/" P z s x cdf pdf ". END IF. PRINT OUTFILE='lnormal.out'/P z s x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:1894: pspp -O format=csv lnormal.sps" at_fn_check_prepare_trace "randist.at:1894" ( $at_check_trace; pspp -O format=csv lnormal.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:1894" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:1894: \$PERL compare.pl lnormal.in lnormal.out" at_fn_check_prepare_dynamic "$PERL compare.pl lnormal.in lnormal.out" "randist.at:1894" ( $at_check_trace; $PERL compare.pl lnormal.in lnormal.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:1894" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1061 #AT_START_1062 at_fn_group_banner 1062 'randist.at:2074' \ "random distributions -- normal" " " 131 at_xfail=no ( $as_echo "1062. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >normal.in <<'_ATEOF' P u s x cdf pdf .01 -10.00 .50 -11.1632 .0100 .0533 .01 -10.00 1.00 -12.3263 .0100 .0267 .01 -10.00 2.00 -14.6527 .0100 .0133 .01 -10.00 5.00 -21.6317 .0100 .0053 .01 -5.00 .50 -6.1632 .0100 .0533 .01 -5.00 1.00 -7.3263 .0100 .0267 .01 -5.00 2.00 -9.6527 .0100 .0133 .01 -5.00 5.00 -16.6317 .0100 .0053 .01 .00 .50 -1.1632 .0100 .0533 .01 .00 1.00 -2.3263 .0100 .0267 .01 .00 2.00 -4.6527 .0100 .0133 .01 .00 5.00 -11.6317 .0100 .0053 .01 5.00 .50 3.8368 .0100 .0533 .01 5.00 1.00 2.6737 .0100 .0267 .01 5.00 2.00 .3473 .0100 .0133 .01 5.00 5.00 -6.6317 .0100 .0053 .01 10.00 .50 8.8368 .0100 .0533 .01 10.00 1.00 7.6737 .0100 .0267 .01 10.00 2.00 5.3473 .0100 .0133 .01 10.00 5.00 -1.6317 .0100 .0053 .10 -10.00 .50 -10.6408 .1000 .3510 .10 -10.00 1.00 -11.2816 .1000 .1755 .10 -10.00 2.00 -12.5631 .1000 .0877 .10 -10.00 5.00 -16.4078 .1000 .0351 .10 -5.00 .50 -5.6408 .1000 .3510 .10 -5.00 1.00 -6.2816 .1000 .1755 .10 -5.00 2.00 -7.5631 .1000 .0877 .10 -5.00 5.00 -11.4078 .1000 .0351 .10 .00 .50 -.6408 .1000 .3510 .10 .00 1.00 -1.2816 .1000 .1755 .10 .00 2.00 -2.5631 .1000 .0877 .10 .00 5.00 -6.4078 .1000 .0351 .10 5.00 .50 4.3592 .1000 .3510 .10 5.00 1.00 3.7184 .1000 .1755 .10 5.00 2.00 2.4369 .1000 .0877 .10 5.00 5.00 -1.4078 .1000 .0351 .10 10.00 .50 9.3592 .1000 .3510 .10 10.00 1.00 8.7184 .1000 .1755 .10 10.00 2.00 7.4369 .1000 .0877 .10 10.00 5.00 3.5922 .1000 .0351 .20 -10.00 .50 -10.4208 .2000 .5599 .20 -10.00 1.00 -10.8416 .2000 .2800 .20 -10.00 2.00 -11.6832 .2000 .1400 .20 -10.00 5.00 -14.2081 .2000 .0560 .20 -5.00 .50 -5.4208 .2000 .5599 .20 -5.00 1.00 -5.8416 .2000 .2800 .20 -5.00 2.00 -6.6832 .2000 .1400 .20 -5.00 5.00 -9.2081 .2000 .0560 .20 .00 .50 -.4208 .2000 .5599 .20 .00 1.00 -.8416 .2000 .2800 .20 .00 2.00 -1.6832 .2000 .1400 .20 .00 5.00 -4.2081 .2000 .0560 .20 5.00 .50 4.5792 .2000 .5599 .20 5.00 1.00 4.1584 .2000 .2800 .20 5.00 2.00 3.3168 .2000 .1400 .20 5.00 5.00 .7919 .2000 .0560 .20 10.00 .50 9.5792 .2000 .5599 .20 10.00 1.00 9.1584 .2000 .2800 .20 10.00 2.00 8.3168 .2000 .1400 .20 10.00 5.00 5.7919 .2000 .0560 .30 -10.00 .50 -10.2622 .3000 .6954 .30 -10.00 1.00 -10.5244 .3000 .3477 .30 -10.00 2.00 -11.0488 .3000 .1738 .30 -10.00 5.00 -12.6220 .3000 .0695 .30 -5.00 .50 -5.2622 .3000 .6954 .30 -5.00 1.00 -5.5244 .3000 .3477 .30 -5.00 2.00 -6.0488 .3000 .1738 .30 -5.00 5.00 -7.6220 .3000 .0695 .30 .00 .50 -.2622 .3000 .6954 .30 .00 1.00 -.5244 .3000 .3477 .30 .00 2.00 -1.0488 .3000 .1738 .30 .00 5.00 -2.6220 .3000 .0695 .30 5.00 .50 4.7378 .3000 .6954 .30 5.00 1.00 4.4756 .3000 .3477 .30 5.00 2.00 3.9512 .3000 .1738 .30 5.00 5.00 2.3780 .3000 .0695 .30 10.00 .50 9.7378 .3000 .6954 .30 10.00 1.00 9.4756 .3000 .3477 .30 10.00 2.00 8.9512 .3000 .1738 .30 10.00 5.00 7.3780 .3000 .0695 .40 -10.00 .50 -10.1267 .4000 .7727 .40 -10.00 1.00 -10.2533 .4000 .3863 .40 -10.00 2.00 -10.5067 .4000 .1932 .40 -10.00 5.00 -11.2667 .4000 .0773 .40 -5.00 .50 -5.1267 .4000 .7727 .40 -5.00 1.00 -5.2533 .4000 .3863 .40 -5.00 2.00 -5.5067 .4000 .1932 .40 -5.00 5.00 -6.2667 .4000 .0773 .40 .00 .50 -.1267 .4000 .7727 .40 .00 1.00 -.2533 .4000 .3863 .40 .00 2.00 -.5067 .4000 .1932 .40 .00 5.00 -1.2667 .4000 .0773 .40 5.00 .50 4.8733 .4000 .7727 .40 5.00 1.00 4.7467 .4000 .3863 .40 5.00 2.00 4.4933 .4000 .1932 .40 5.00 5.00 3.7333 .4000 .0773 .40 10.00 .50 9.8733 .4000 .7727 .40 10.00 1.00 9.7467 .4000 .3863 .40 10.00 2.00 9.4933 .4000 .1932 .40 10.00 5.00 8.7333 .4000 .0773 .50 -10.00 .50 -10.0000 .5000 .7979 .50 -10.00 1.00 -10.0000 .5000 .3989 .50 -10.00 2.00 -10.0000 .5000 .1995 .50 -10.00 5.00 -10.0000 .5000 .0798 .50 -5.00 .50 -5.0000 .5000 .7979 .50 -5.00 1.00 -5.0000 .5000 .3989 .50 -5.00 2.00 -5.0000 .5000 .1995 .50 -5.00 5.00 -5.0000 .5000 .0798 .50 .00 .50 .0000 .5000 .7979 .50 .00 1.00 .0000 .5000 .3989 .50 .00 2.00 .0000 .5000 .1995 .50 .00 5.00 .0000 .5000 .0798 .50 5.00 .50 5.0000 .5000 .7979 .50 5.00 1.00 5.0000 .5000 .3989 .50 5.00 2.00 5.0000 .5000 .1995 .50 5.00 5.00 5.0000 .5000 .0798 .50 10.00 .50 10.0000 .5000 .7979 .50 10.00 1.00 10.0000 .5000 .3989 .50 10.00 2.00 10.0000 .5000 .1995 .50 10.00 5.00 10.0000 .5000 .0798 .60 -10.00 .50 -9.8733 .6000 .7727 .60 -10.00 1.00 -9.7467 .6000 .3863 .60 -10.00 2.00 -9.4933 .6000 .1932 .60 -10.00 5.00 -8.7333 .6000 .0773 .60 -5.00 .50 -4.8733 .6000 .7727 .60 -5.00 1.00 -4.7467 .6000 .3863 .60 -5.00 2.00 -4.4933 .6000 .1932 .60 -5.00 5.00 -3.7333 .6000 .0773 .60 .00 .50 .1267 .6000 .7727 .60 .00 1.00 .2533 .6000 .3863 .60 .00 2.00 .5067 .6000 .1932 .60 .00 5.00 1.2667 .6000 .0773 .60 5.00 .50 5.1267 .6000 .7727 .60 5.00 1.00 5.2533 .6000 .3863 .60 5.00 2.00 5.5067 .6000 .1932 .60 5.00 5.00 6.2667 .6000 .0773 .60 10.00 .50 10.1267 .6000 .7727 .60 10.00 1.00 10.2533 .6000 .3863 .60 10.00 2.00 10.5067 .6000 .1932 .60 10.00 5.00 11.2667 .6000 .0773 .70 -10.00 .50 -9.7378 .7000 .6954 .70 -10.00 1.00 -9.4756 .7000 .3477 .70 -10.00 2.00 -8.9512 .7000 .1738 .70 -10.00 5.00 -7.3780 .7000 .0695 .70 -5.00 .50 -4.7378 .7000 .6954 .70 -5.00 1.00 -4.4756 .7000 .3477 .70 -5.00 2.00 -3.9512 .7000 .1738 .70 -5.00 5.00 -2.3780 .7000 .0695 .70 .00 .50 .2622 .7000 .6954 .70 .00 1.00 .5244 .7000 .3477 .70 .00 2.00 1.0488 .7000 .1738 .70 .00 5.00 2.6220 .7000 .0695 .70 5.00 .50 5.2622 .7000 .6954 .70 5.00 1.00 5.5244 .7000 .3477 .70 5.00 2.00 6.0488 .7000 .1738 .70 5.00 5.00 7.6220 .7000 .0695 .70 10.00 .50 10.2622 .7000 .6954 .70 10.00 1.00 10.5244 .7000 .3477 .70 10.00 2.00 11.0488 .7000 .1738 .70 10.00 5.00 12.6220 .7000 .0695 .80 -10.00 .50 -9.5792 .8000 .5599 .80 -10.00 1.00 -9.1584 .8000 .2800 .80 -10.00 2.00 -8.3168 .8000 .1400 .80 -10.00 5.00 -5.7919 .8000 .0560 .80 -5.00 .50 -4.5792 .8000 .5599 .80 -5.00 1.00 -4.1584 .8000 .2800 .80 -5.00 2.00 -3.3168 .8000 .1400 .80 -5.00 5.00 -.7919 .8000 .0560 .80 .00 .50 .4208 .8000 .5599 .80 .00 1.00 .8416 .8000 .2800 .80 .00 2.00 1.6832 .8000 .1400 .80 .00 5.00 4.2081 .8000 .0560 .80 5.00 .50 5.4208 .8000 .5599 .80 5.00 1.00 5.8416 .8000 .2800 .80 5.00 2.00 6.6832 .8000 .1400 .80 5.00 5.00 9.2081 .8000 .0560 .80 10.00 .50 10.4208 .8000 .5599 .80 10.00 1.00 10.8416 .8000 .2800 .80 10.00 2.00 11.6832 .8000 .1400 .80 10.00 5.00 14.2081 .8000 .0560 .90 -10.00 .50 -9.3592 .9000 .3510 .90 -10.00 1.00 -8.7184 .9000 .1755 .90 -10.00 2.00 -7.4369 .9000 .0877 .90 -10.00 5.00 -3.5922 .9000 .0351 .90 -5.00 .50 -4.3592 .9000 .3510 .90 -5.00 1.00 -3.7184 .9000 .1755 .90 -5.00 2.00 -2.4369 .9000 .0877 .90 -5.00 5.00 1.4078 .9000 .0351 .90 .00 .50 .6408 .9000 .3510 .90 .00 1.00 1.2816 .9000 .1755 .90 .00 2.00 2.5631 .9000 .0877 .90 .00 5.00 6.4078 .9000 .0351 .90 5.00 .50 5.6408 .9000 .3510 .90 5.00 1.00 6.2816 .9000 .1755 .90 5.00 2.00 7.5631 .9000 .0877 .90 5.00 5.00 11.4078 .9000 .0351 .90 10.00 .50 10.6408 .9000 .3510 .90 10.00 1.00 11.2816 .9000 .1755 .90 10.00 2.00 12.5631 .9000 .0877 .90 10.00 5.00 16.4078 .9000 .0351 .99 -10.00 .50 -8.8368 .9900 .0533 .99 -10.00 1.00 -7.6737 .9900 .0267 .99 -10.00 2.00 -5.3473 .9900 .0133 .99 -10.00 5.00 1.6317 .9900 .0053 .99 -5.00 .50 -3.8368 .9900 .0533 .99 -5.00 1.00 -2.6737 .9900 .0267 .99 -5.00 2.00 -.3473 .9900 .0133 .99 -5.00 5.00 6.6317 .9900 .0053 .99 .00 .50 1.1632 .9900 .0533 .99 .00 1.00 2.3263 .9900 .0267 .99 .00 2.00 4.6527 .9900 .0133 .99 .00 5.00 11.6317 .9900 .0053 .99 5.00 .50 6.1632 .9900 .0533 .99 5.00 1.00 7.3263 .9900 .0267 .99 5.00 2.00 9.6527 .9900 .0133 .99 5.00 5.00 16.6317 .9900 .0053 .99 10.00 .50 11.1632 .9900 .0533 .99 10.00 1.00 12.3263 .9900 .0267 .99 10.00 2.00 14.6527 .9900 .0133 .99 10.00 5.00 21.6317 .9900 .0053 _ATEOF cat >normal.sps <<'_ATEOF' DATA LIST LIST FILE='normal.in' NOTABLE SKIP=1 /P u s Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.normal(P, u, s). COMPUTE cdf = cdf.normal(x, u, s). COMPUTE pdf = pdf.normal(x, u, s). DO IF $CASENUM = 1. PRINT OUTFILE='normal.out'/" P u s x cdf pdf ". END IF. PRINT OUTFILE='normal.out'/P u s x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:2074: pspp -O format=csv normal.sps" at_fn_check_prepare_trace "randist.at:2074" ( $at_check_trace; pspp -O format=csv normal.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:2074" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:2074: \$PERL compare.pl normal.in normal.out" at_fn_check_prepare_dynamic "$PERL compare.pl normal.in normal.out" "randist.at:2074" ( $at_check_trace; $PERL compare.pl normal.in normal.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:2074" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1062 #AT_START_1063 at_fn_group_banner 1063 'randist.at:2298' \ "random distributions -- pareto" " " 131 at_xfail=no ( $as_echo "1063. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >pareto.in <<'_ATEOF' P a b x cdf pdf .01 1.00 1.00 1.0101 .0100 .9801 .01 1.00 2.00 1.0050 .0100 1.9701 .01 1.00 5.00 1.0020 .0100 4.9401 .01 1.00 10.00 1.0010 .0100 9.8901 .01 5.00 1.00 5.0505 .0100 .1960 .01 5.00 2.00 5.0252 .0100 .3940 .01 5.00 5.00 5.0101 .0100 .9880 .01 5.00 10.00 5.0050 .0100 1.9780 .01 10.00 1.00 10.1010 .0100 .0980 .01 10.00 2.00 10.0504 .0100 .1970 .01 10.00 5.00 10.0201 .0100 .4940 .01 10.00 10.00 10.0101 .0100 .9890 .10 1.00 1.00 1.1111 .1000 .8100 .10 1.00 2.00 1.0541 .1000 1.7076 .10 1.00 5.00 1.0213 .1000 4.4062 .10 1.00 10.00 1.0106 .1000 8.9057 .10 5.00 1.00 5.5556 .1000 .1620 .10 5.00 2.00 5.2705 .1000 .3415 .10 5.00 5.00 5.1065 .1000 .8812 .10 5.00 10.00 5.0530 .1000 1.7811 .10 10.00 1.00 11.1111 .1000 .0810 .10 10.00 2.00 10.5409 .1000 .1708 .10 10.00 5.00 10.2130 .1000 .4406 .10 10.00 10.00 10.1059 .1000 .8906 .20 1.00 1.00 1.2500 .2000 .6400 .20 1.00 2.00 1.1180 .2000 1.4311 .20 1.00 5.00 1.0456 .2000 3.8254 .20 1.00 10.00 1.0226 .2000 7.8235 .20 5.00 1.00 6.2500 .2000 .1280 .20 5.00 2.00 5.5902 .2000 .2862 .20 5.00 5.00 5.2282 .2000 .7651 .20 5.00 10.00 5.1128 .2000 1.5647 .20 10.00 1.00 12.5000 .2000 .0640 .20 10.00 2.00 11.1803 .2000 .1431 .20 10.00 5.00 10.4564 .2000 .3825 .20 10.00 10.00 10.2257 .2000 .7823 .30 1.00 1.00 1.4286 .3000 .4900 .30 1.00 2.00 1.1952 .3000 1.1713 .30 1.00 5.00 1.0739 .3000 3.2590 .30 1.00 10.00 1.0363 .3000 6.7547 .30 5.00 1.00 7.1429 .3000 .0980 .30 5.00 2.00 5.9761 .3000 .2343 .30 5.00 5.00 5.3697 .3000 .6518 .30 5.00 10.00 5.1816 .3000 1.3509 .30 10.00 1.00 14.2857 .3000 .0490 .30 10.00 2.00 11.9523 .3000 .1171 .30 10.00 5.00 10.7394 .3000 .3259 .30 10.00 10.00 10.3631 .3000 .6755 .40 1.00 1.00 1.6667 .4000 .3600 .40 1.00 2.00 1.2910 .4000 .9295 .40 1.00 5.00 1.1076 .4000 2.7086 .40 1.00 10.00 1.0524 .4000 5.7012 .40 5.00 1.00 8.3333 .4000 .0720 .40 5.00 2.00 6.4550 .4000 .1859 .40 5.00 5.00 5.5378 .4000 .5417 .40 5.00 10.00 5.2620 .4000 1.1402 .40 10.00 1.00 16.6667 .4000 .0360 .40 10.00 2.00 12.9099 .4000 .0930 .40 10.00 5.00 11.0757 .4000 .2709 .40 10.00 10.00 10.5241 .4000 .5701 .50 1.00 1.00 2.0000 .5000 .2500 .50 1.00 2.00 1.4142 .5000 .7071 .50 1.00 5.00 1.1487 .5000 2.1764 .50 1.00 10.00 1.0718 .5000 4.6652 .50 5.00 1.00 10.0000 .5000 .0500 .50 5.00 2.00 7.0711 .5000 .1414 .50 5.00 5.00 5.7435 .5000 .4353 .50 5.00 10.00 5.3589 .5000 .9330 .50 10.00 1.00 20.0000 .5000 .0250 .50 10.00 2.00 14.1421 .5000 .0707 .50 10.00 5.00 11.4870 .5000 .2176 .50 10.00 10.00 10.7177 .5000 .4665 .60 1.00 1.00 2.5000 .6000 .1600 .60 1.00 2.00 1.5811 .6000 .5060 .60 1.00 5.00 1.2011 .6000 1.6651 .60 1.00 10.00 1.0960 .6000 3.6498 .60 5.00 1.00 12.5000 .6000 .0320 .60 5.00 2.00 7.9057 .6000 .1012 .60 5.00 5.00 6.0056 .6000 .3330 .60 5.00 10.00 5.4798 .6000 .7300 .60 10.00 1.00 25.0000 .6000 .0160 .60 10.00 2.00 15.8114 .6000 .0506 .60 10.00 5.00 12.0112 .6000 .1665 .60 10.00 10.00 10.9596 .6000 .3650 .70 1.00 1.00 3.3333 .7000 .0900 .70 1.00 2.00 1.8257 .7000 .3286 .70 1.00 5.00 1.2723 .7000 1.1790 .70 1.00 10.00 1.1279 .7000 2.6597 .70 5.00 1.00 16.6667 .7000 .0180 .70 5.00 2.00 9.1287 .7000 .0657 .70 5.00 5.00 6.3613 .7000 .2358 .70 5.00 10.00 5.6397 .7000 .5319 .70 10.00 1.00 33.3333 .7000 .0090 .70 10.00 2.00 18.2574 .7000 .0329 .70 10.00 5.00 12.7226 .7000 .1179 .70 10.00 10.00 11.2794 .7000 .2660 .80 1.00 1.00 5.0000 .8000 .0400 .80 1.00 2.00 2.2361 .8000 .1789 .80 1.00 5.00 1.3797 .8000 .7248 .80 1.00 10.00 1.1746 .8000 1.7027 .80 5.00 1.00 25.0000 .8000 .0080 .80 5.00 2.00 11.1803 .8000 .0358 .80 5.00 5.00 6.8986 .8000 .1450 .80 5.00 10.00 5.8731 .8000 .3405 .80 10.00 1.00 50.0000 .8000 .0040 .80 10.00 2.00 22.3607 .8000 .0179 .80 10.00 5.00 13.7973 .8000 .0725 .80 10.00 10.00 11.7462 .8000 .1703 .90 1.00 1.00 10.0000 .9000 .0100 .90 1.00 2.00 3.1623 .9000 .0632 .90 1.00 5.00 1.5849 .9000 .3155 .90 1.00 10.00 1.2589 .9000 .7943 .90 5.00 1.00 50.0000 .9000 .0020 .90 5.00 2.00 15.8114 .9000 .0126 .90 5.00 5.00 7.9245 .9000 .0631 .90 5.00 10.00 6.2946 .9000 .1589 .90 10.00 1.00 100.0000 .9000 .0010 .90 10.00 2.00 31.6228 .9000 .0063 .90 10.00 5.00 15.8489 .9000 .0315 .90 10.00 10.00 12.5893 .9000 .0794 .99 1.00 1.00 100.0000 .9900 .0001 .99 1.00 2.00 10.0000 .9900 .0020 .99 1.00 5.00 2.5119 .9900 .0199 .99 1.00 10.00 1.5849 .9900 .0631 .99 5.00 1.00 500.0000 .9900 .0000 .99 5.00 2.00 50.0000 .9900 .0004 .99 5.00 5.00 12.5594 .9900 .0040 .99 5.00 10.00 7.9245 .9900 .0126 .99 10.00 1.00 1000.0000 .9900 .0000 .99 10.00 2.00 100.0000 .9900 .0002 .99 10.00 5.00 25.1189 .9900 .0020 .99 10.00 10.00 15.8489 .9900 .0063 _ATEOF cat >pareto.sps <<'_ATEOF' DATA LIST LIST FILE='pareto.in' NOTABLE SKIP=1 /P a b Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.pareto(P, a, b). COMPUTE cdf = cdf.pareto(x, a, b). COMPUTE pdf = pdf.pareto(x, a, b). DO IF $CASENUM = 1. PRINT OUTFILE='pareto.out'/" P a b x cdf pdf ". END IF. PRINT OUTFILE='pareto.out'/P a b x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:2298: pspp -O format=csv pareto.sps" at_fn_check_prepare_trace "randist.at:2298" ( $at_check_trace; pspp -O format=csv pareto.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:2298" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:2298: \$PERL compare.pl pareto.in pareto.out" at_fn_check_prepare_dynamic "$PERL compare.pl pareto.in pareto.out" "randist.at:2298" ( $at_check_trace; $PERL compare.pl pareto.in pareto.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:2298" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1063 #AT_START_1064 at_fn_group_banner 1064 'randist.at:2434' \ "random distributions -- t" " " 131 at_xfail=no ( $as_echo "1064. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >t.in <<'_ATEOF' P df x cdf pdf .01 1.00 -31.8205 .0100 .0003 .01 2.00 -6.9646 .0100 .0028 .01 3.00 -4.5407 .0100 .0059 .01 4.00 -3.7469 .0100 .0087 .01 5.00 -3.3649 .0100 .0109 .01 10.00 -2.7638 .0100 .0172 .01 30.00 -2.4573 .0100 .0231 .01 100.00 -2.3642 .0100 .0255 .10 1.00 -3.0777 .1000 .0304 .10 2.00 -1.8856 .1000 .0764 .10 3.00 -1.6377 .1000 .1025 .10 4.00 -1.5332 .1000 .1181 .10 5.00 -1.4759 .1000 .1283 .10 10.00 -1.3722 .1000 .1507 .10 30.00 -1.3104 .1000 .1670 .10 100.00 -1.2901 .1000 .1729 .20 1.00 -1.3764 .2000 .1100 .20 2.00 -1.0607 .2000 .1810 .20 3.00 -.9785 .2000 .2112 .20 4.00 -.9410 .2000 .2275 .20 5.00 -.9195 .2000 .2376 .20 10.00 -.8791 .2000 .2584 .20 30.00 -.8538 .2000 .2727 .20 100.00 -.8452 .2000 .2778 .30 1.00 -.7265 .3000 .2083 .30 2.00 -.6172 .3000 .2722 .30 3.00 -.5844 .3000 .2963 .30 4.00 -.5686 .3000 .3088 .30 5.00 -.5594 .3000 .3164 .30 10.00 -.5415 .3000 .3319 .30 30.00 -.5300 .3000 .3424 .30 100.00 -.5261 .3000 .3461 .40 1.00 -.3249 .4000 .2879 .40 2.00 -.2887 .4000 .3326 .40 3.00 -.2767 .4000 .3495 .40 4.00 -.2707 .4000 .3584 .40 5.00 -.2672 .4000 .3638 .40 10.00 -.2602 .4000 .3749 .40 30.00 -.2556 .4000 .3825 .40 100.00 -.2540 .4000 .3852 .50 1.00 .0000 .5000 .3183 .50 2.00 .0000 .5000 .3536 .50 3.00 .0000 .5000 .3676 .50 4.00 .0000 .5000 .3750 .50 5.00 .0000 .5000 .3796 .50 10.00 .0000 .5000 .3891 .50 30.00 .0000 .5000 .3956 .50 100.00 .0000 .5000 .3979 .60 1.00 .3249 .6000 .2879 .60 2.00 .2887 .6000 .3326 .60 3.00 .2767 .6000 .3495 .60 4.00 .2707 .6000 .3584 .60 5.00 .2672 .6000 .3638 .60 10.00 .2602 .6000 .3749 .60 30.00 .2556 .6000 .3825 .60 100.00 .2540 .6000 .3852 .70 1.00 .7265 .7000 .2083 .70 2.00 .6172 .7000 .2722 .70 3.00 .5844 .7000 .2963 .70 4.00 .5686 .7000 .3088 .70 5.00 .5594 .7000 .3164 .70 10.00 .5415 .7000 .3319 .70 30.00 .5300 .7000 .3424 .70 100.00 .5261 .7000 .3461 .80 1.00 1.3764 .8000 .1100 .80 2.00 1.0607 .8000 .1810 .80 3.00 .9785 .8000 .2112 .80 4.00 .9410 .8000 .2275 .80 5.00 .9195 .8000 .2376 .80 10.00 .8791 .8000 .2584 .80 30.00 .8538 .8000 .2727 .80 100.00 .8452 .8000 .2778 .90 1.00 3.0777 .9000 .0304 .90 2.00 1.8856 .9000 .0764 .90 3.00 1.6377 .9000 .1025 .90 4.00 1.5332 .9000 .1181 .90 5.00 1.4759 .9000 .1283 .90 10.00 1.3722 .9000 .1507 .90 30.00 1.3104 .9000 .1670 .90 100.00 1.2901 .9000 .1729 .99 1.00 31.8205 .9900 .0003 .99 2.00 6.9646 .9900 .0028 .99 3.00 4.5407 .9900 .0059 .99 4.00 3.7469 .9900 .0087 .99 5.00 3.3649 .9900 .0109 .99 10.00 2.7638 .9900 .0172 .99 30.00 2.4573 .9900 .0231 .99 100.00 2.3642 .9900 .0255 _ATEOF cat >t.sps <<'_ATEOF' DATA LIST LIST FILE='t.in' NOTABLE SKIP=1 /P df Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.t(P, df). COMPUTE cdf = cdf.t(x, df). COMPUTE pdf = pdf.t(x, df). DO IF $CASENUM = 1. PRINT OUTFILE='t.out'/" P df x cdf pdf ". END IF. PRINT OUTFILE='t.out'/P df x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:2434: pspp -O format=csv t.sps" at_fn_check_prepare_trace "randist.at:2434" ( $at_check_trace; pspp -O format=csv t.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:2434" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:2434: \$PERL compare.pl t.in t.out" at_fn_check_prepare_dynamic "$PERL compare.pl t.in t.out" "randist.at:2434" ( $at_check_trace; $PERL compare.pl t.in t.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:2434" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1064 #AT_START_1065 at_fn_group_banner 1065 'randist.at:2526' \ "random distributions -- uniform" " " 131 at_xfail=no ( $as_echo "1065. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >uniform.in <<'_ATEOF' P a b x cdf pdf .01 -10.00 40.00 -9.5000 .0100 .0200 .01 -10.00 41.00 -9.4900 .0100 .0196 .01 -10.00 45.00 -9.4500 .0100 .0182 .01 -10.00 50.00 -9.4000 .0100 .0167 .01 .00 40.00 .4000 .0100 .0250 .01 .00 41.00 .4100 .0100 .0244 .01 .00 45.00 .4500 .0100 .0222 .01 .00 50.00 .5000 .0100 .0200 .01 20.00 40.00 20.2000 .0100 .0500 .01 20.00 41.00 20.2100 .0100 .0476 .01 20.00 45.00 20.2500 .0100 .0400 .01 20.00 50.00 20.3000 .0100 .0333 .01 30.00 40.00 30.1000 .0100 .1000 .01 30.00 41.00 30.1100 .0100 .0909 .01 30.00 45.00 30.1500 .0100 .0667 .01 30.00 50.00 30.2000 .0100 .0500 .10 -10.00 40.00 -5.0000 .1000 .0200 .10 -10.00 41.00 -4.9000 .1000 .0196 .10 -10.00 45.00 -4.5000 .1000 .0182 .10 -10.00 50.00 -4.0000 .1000 .0167 .10 .00 40.00 4.0000 .1000 .0250 .10 .00 41.00 4.1000 .1000 .0244 .10 .00 45.00 4.5000 .1000 .0222 .10 .00 50.00 5.0000 .1000 .0200 .10 20.00 40.00 22.0000 .1000 .0500 .10 20.00 41.00 22.1000 .1000 .0476 .10 20.00 45.00 22.5000 .1000 .0400 .10 20.00 50.00 23.0000 .1000 .0333 .10 30.00 40.00 31.0000 .1000 .1000 .10 30.00 41.00 31.1000 .1000 .0909 .10 30.00 45.00 31.5000 .1000 .0667 .10 30.00 50.00 32.0000 .1000 .0500 .20 -10.00 40.00 .0000 .2000 .0200 .20 -10.00 41.00 .2000 .2000 .0196 .20 -10.00 45.00 1.0000 .2000 .0182 .20 -10.00 50.00 2.0000 .2000 .0167 .20 .00 40.00 8.0000 .2000 .0250 .20 .00 41.00 8.2000 .2000 .0244 .20 .00 45.00 9.0000 .2000 .0222 .20 .00 50.00 10.0000 .2000 .0200 .20 20.00 40.00 24.0000 .2000 .0500 .20 20.00 41.00 24.2000 .2000 .0476 .20 20.00 45.00 25.0000 .2000 .0400 .20 20.00 50.00 26.0000 .2000 .0333 .20 30.00 40.00 32.0000 .2000 .1000 .20 30.00 41.00 32.2000 .2000 .0909 .20 30.00 45.00 33.0000 .2000 .0667 .20 30.00 50.00 34.0000 .2000 .0500 .30 -10.00 40.00 5.0000 .3000 .0200 .30 -10.00 41.00 5.3000 .3000 .0196 .30 -10.00 45.00 6.5000 .3000 .0182 .30 -10.00 50.00 8.0000 .3000 .0167 .30 .00 40.00 12.0000 .3000 .0250 .30 .00 41.00 12.3000 .3000 .0244 .30 .00 45.00 13.5000 .3000 .0222 .30 .00 50.00 15.0000 .3000 .0200 .30 20.00 40.00 26.0000 .3000 .0500 .30 20.00 41.00 26.3000 .3000 .0476 .30 20.00 45.00 27.5000 .3000 .0400 .30 20.00 50.00 29.0000 .3000 .0333 .30 30.00 40.00 33.0000 .3000 .1000 .30 30.00 41.00 33.3000 .3000 .0909 .30 30.00 45.00 34.5000 .3000 .0667 .30 30.00 50.00 36.0000 .3000 .0500 .40 -10.00 40.00 10.0000 .4000 .0200 .40 -10.00 41.00 10.4000 .4000 .0196 .40 -10.00 45.00 12.0000 .4000 .0182 .40 -10.00 50.00 14.0000 .4000 .0167 .40 .00 40.00 16.0000 .4000 .0250 .40 .00 41.00 16.4000 .4000 .0244 .40 .00 45.00 18.0000 .4000 .0222 .40 .00 50.00 20.0000 .4000 .0200 .40 20.00 40.00 28.0000 .4000 .0500 .40 20.00 41.00 28.4000 .4000 .0476 .40 20.00 45.00 30.0000 .4000 .0400 .40 20.00 50.00 32.0000 .4000 .0333 .40 30.00 40.00 34.0000 .4000 .1000 .40 30.00 41.00 34.4000 .4000 .0909 .40 30.00 45.00 36.0000 .4000 .0667 .40 30.00 50.00 38.0000 .4000 .0500 .50 -10.00 40.00 15.0000 .5000 .0200 .50 -10.00 41.00 15.5000 .5000 .0196 .50 -10.00 45.00 17.5000 .5000 .0182 .50 -10.00 50.00 20.0000 .5000 .0167 .50 .00 40.00 20.0000 .5000 .0250 .50 .00 41.00 20.5000 .5000 .0244 .50 .00 45.00 22.5000 .5000 .0222 .50 .00 50.00 25.0000 .5000 .0200 .50 20.00 40.00 30.0000 .5000 .0500 .50 20.00 41.00 30.5000 .5000 .0476 .50 20.00 45.00 32.5000 .5000 .0400 .50 20.00 50.00 35.0000 .5000 .0333 .50 30.00 40.00 35.0000 .5000 .1000 .50 30.00 41.00 35.5000 .5000 .0909 .50 30.00 45.00 37.5000 .5000 .0667 .50 30.00 50.00 40.0000 .5000 .0500 .60 -10.00 40.00 20.0000 .6000 .0200 .60 -10.00 41.00 20.6000 .6000 .0196 .60 -10.00 45.00 23.0000 .6000 .0182 .60 -10.00 50.00 26.0000 .6000 .0167 .60 .00 40.00 24.0000 .6000 .0250 .60 .00 41.00 24.6000 .6000 .0244 .60 .00 45.00 27.0000 .6000 .0222 .60 .00 50.00 30.0000 .6000 .0200 .60 20.00 40.00 32.0000 .6000 .0500 .60 20.00 41.00 32.6000 .6000 .0476 .60 20.00 45.00 35.0000 .6000 .0400 .60 20.00 50.00 38.0000 .6000 .0333 .60 30.00 40.00 36.0000 .6000 .1000 .60 30.00 41.00 36.6000 .6000 .0909 .60 30.00 45.00 39.0000 .6000 .0667 .60 30.00 50.00 42.0000 .6000 .0500 .70 -10.00 40.00 25.0000 .7000 .0200 .70 -10.00 41.00 25.7000 .7000 .0196 .70 -10.00 45.00 28.5000 .7000 .0182 .70 -10.00 50.00 32.0000 .7000 .0167 .70 .00 40.00 28.0000 .7000 .0250 .70 .00 41.00 28.7000 .7000 .0244 .70 .00 45.00 31.5000 .7000 .0222 .70 .00 50.00 35.0000 .7000 .0200 .70 20.00 40.00 34.0000 .7000 .0500 .70 20.00 41.00 34.7000 .7000 .0476 .70 20.00 45.00 37.5000 .7000 .0400 .70 20.00 50.00 41.0000 .7000 .0333 .70 30.00 40.00 37.0000 .7000 .1000 .70 30.00 41.00 37.7000 .7000 .0909 .70 30.00 45.00 40.5000 .7000 .0667 .70 30.00 50.00 44.0000 .7000 .0500 .80 -10.00 40.00 30.0000 .8000 .0200 .80 -10.00 41.00 30.8000 .8000 .0196 .80 -10.00 45.00 34.0000 .8000 .0182 .80 -10.00 50.00 38.0000 .8000 .0167 .80 .00 40.00 32.0000 .8000 .0250 .80 .00 41.00 32.8000 .8000 .0244 .80 .00 45.00 36.0000 .8000 .0222 .80 .00 50.00 40.0000 .8000 .0200 .80 20.00 40.00 36.0000 .8000 .0500 .80 20.00 41.00 36.8000 .8000 .0476 .80 20.00 45.00 40.0000 .8000 .0400 .80 20.00 50.00 44.0000 .8000 .0333 .80 30.00 40.00 38.0000 .8000 .1000 .80 30.00 41.00 38.8000 .8000 .0909 .80 30.00 45.00 42.0000 .8000 .0667 .80 30.00 50.00 46.0000 .8000 .0500 .90 -10.00 40.00 35.0000 .9000 .0200 .90 -10.00 41.00 35.9000 .9000 .0196 .90 -10.00 45.00 39.5000 .9000 .0182 .90 -10.00 50.00 44.0000 .9000 .0167 .90 .00 40.00 36.0000 .9000 .0250 .90 .00 41.00 36.9000 .9000 .0244 .90 .00 45.00 40.5000 .9000 .0222 .90 .00 50.00 45.0000 .9000 .0200 .90 20.00 40.00 38.0000 .9000 .0500 .90 20.00 41.00 38.9000 .9000 .0476 .90 20.00 45.00 42.5000 .9000 .0400 .90 20.00 50.00 47.0000 .9000 .0333 .90 30.00 40.00 39.0000 .9000 .1000 .90 30.00 41.00 39.9000 .9000 .0909 .90 30.00 45.00 43.5000 .9000 .0667 .90 30.00 50.00 48.0000 .9000 .0500 .99 -10.00 40.00 39.5000 .9900 .0200 .99 -10.00 41.00 40.4900 .9900 .0196 .99 -10.00 45.00 44.4500 .9900 .0182 .99 -10.00 50.00 49.4000 .9900 .0167 .99 .00 40.00 39.6000 .9900 .0250 .99 .00 41.00 40.5900 .9900 .0244 .99 .00 45.00 44.5500 .9900 .0222 .99 .00 50.00 49.5000 .9900 .0200 .99 20.00 40.00 39.8000 .9900 .0500 .99 20.00 41.00 40.7900 .9900 .0476 .99 20.00 45.00 44.7500 .9900 .0400 .99 20.00 50.00 49.7000 .9900 .0333 .99 30.00 40.00 39.9000 .9900 .1000 .99 30.00 41.00 40.8900 .9900 .0909 .99 30.00 45.00 44.8500 .9900 .0667 .99 30.00 50.00 49.8000 .9900 .0500 _ATEOF cat >uniform.sps <<'_ATEOF' DATA LIST LIST FILE='uniform.in' NOTABLE SKIP=1 /P a b Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.uniform(P, a, b). COMPUTE cdf = cdf.uniform(x, a, b). COMPUTE pdf = pdf.uniform(x, a, b). DO IF $CASENUM = 1. PRINT OUTFILE='uniform.out'/" P a b x cdf pdf ". END IF. PRINT OUTFILE='uniform.out'/P a b x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:2526: pspp -O format=csv uniform.sps" at_fn_check_prepare_trace "randist.at:2526" ( $at_check_trace; pspp -O format=csv uniform.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:2526" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:2526: \$PERL compare.pl uniform.in uniform.out" at_fn_check_prepare_dynamic "$PERL compare.pl uniform.in uniform.out" "randist.at:2526" ( $at_check_trace; $PERL compare.pl uniform.in uniform.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:2526" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1065 #AT_START_1066 at_fn_group_banner 1066 'randist.at:2706' \ "random distributions -- weibull" " " 131 at_xfail=no ( $as_echo "1066. $at_setup_line: testing $at_desc ..." $at_traceon randist_compare cat >weibull.in <<'_ATEOF' P a b x cdf pdf .01 .50 1.00 .0050 .0100 1.9800 .01 .50 2.00 .0501 .0100 .3970 .01 .50 4.00 .1583 .0100 .2514 .01 .50 8.00 .2813 .0100 .2829 .01 1.00 1.00 .0101 .0100 .9900 .01 1.00 2.00 .1003 .0100 .1985 .01 1.00 4.00 .3166 .0100 .1257 .01 1.00 8.00 .5627 .0100 .1415 .01 2.00 1.00 .0201 .0100 .4950 .01 2.00 2.00 .2005 .0100 .0992 .01 2.00 4.00 .6332 .0100 .0628 .01 2.00 8.00 1.1254 .0100 .0707 .01 5.00 1.00 .0503 .0100 .1980 .01 5.00 2.00 .5013 .0100 .0397 .01 5.00 4.00 1.5831 .0100 .0251 .01 5.00 8.00 2.8135 .0100 .0283 .10 .50 1.00 .0527 .1000 1.8000 .10 .50 2.00 .1623 .1000 1.1685 .10 .50 4.00 .2849 .1000 1.3315 .10 .50 8.00 .3774 .1000 2.0100 .10 1.00 1.00 .1054 .1000 .9000 .10 1.00 2.00 .3246 .1000 .5843 .10 1.00 4.00 .5697 .1000 .6657 .10 1.00 8.00 .7548 .1000 1.0050 .10 2.00 1.00 .2107 .1000 .4500 .10 2.00 2.00 .6492 .1000 .2921 .10 2.00 4.00 1.1395 .1000 .3329 .10 2.00 8.00 1.5096 .1000 .5025 .10 5.00 1.00 .5268 .1000 .1800 .10 5.00 2.00 1.6230 .1000 .1169 .10 5.00 4.00 2.8487 .1000 .1331 .10 5.00 8.00 3.7740 .1000 .2010 .20 .50 1.00 .1116 .2000 1.6000 .20 .50 2.00 .2362 .2000 1.5116 .20 .50 4.00 .3436 .2000 2.0779 .20 .50 8.00 .4145 .2000 3.4453 .20 1.00 1.00 .2231 .2000 .8000 .20 1.00 2.00 .4724 .2000 .7558 .20 1.00 4.00 .6873 .2000 1.0389 .20 1.00 8.00 .8290 .2000 1.7226 .20 2.00 1.00 .4463 .2000 .4000 .20 2.00 2.00 .9448 .2000 .3779 .20 2.00 4.00 1.3746 .2000 .5195 .20 2.00 8.00 1.6581 .2000 .8613 .20 5.00 1.00 1.1157 .2000 .1600 .20 5.00 2.00 2.3619 .2000 .1512 .20 5.00 4.00 3.4365 .2000 .2078 .20 5.00 8.00 4.1452 .2000 .3445 .30 .50 1.00 .1783 .3000 1.4000 .30 .50 2.00 .2986 .3000 1.6722 .30 .50 4.00 .3864 .3000 2.5846 .30 .50 8.00 .4395 .3000 4.5442 .30 1.00 1.00 .3567 .3000 .7000 .30 1.00 2.00 .5972 .3000 .8361 .30 1.00 4.00 .7728 .3000 1.2923 .30 1.00 8.00 .8791 .3000 2.2721 .30 2.00 1.00 .7133 .3000 .3500 .30 2.00 2.00 1.1944 .3000 .4181 .30 2.00 4.00 1.5456 .3000 .6461 .30 2.00 8.00 1.7582 .3000 1.1360 .30 5.00 1.00 1.7834 .3000 .1400 .30 5.00 2.00 2.9861 .3000 .1672 .30 5.00 4.00 3.8640 .3000 .2585 .30 5.00 8.00 4.3955 .3000 .4544 .40 .50 1.00 .2554 .4000 1.2000 .40 .50 2.00 .3574 .4000 1.7153 .40 .50 4.00 .4227 .4000 2.9003 .40 .50 8.00 .4597 .4000 5.3335 .40 1.00 1.00 .5108 .4000 .6000 .40 1.00 2.00 .7147 .4000 .8577 .40 1.00 4.00 .8454 .4000 1.4502 .40 1.00 8.00 .9195 .4000 2.6667 .40 2.00 1.00 1.0217 .4000 .3000 .40 2.00 2.00 1.4294 .4000 .4288 .40 2.00 4.00 1.6908 .4000 .7251 .40 2.00 8.00 1.8389 .4000 1.3334 .40 5.00 1.00 2.5541 .4000 .1200 .40 5.00 2.00 3.5736 .4000 .1715 .40 5.00 4.00 4.2271 .4000 .2900 .40 5.00 8.00 4.5973 .4000 .5333 .50 .50 1.00 .3466 .5000 1.0000 .50 .50 2.00 .4163 .5000 1.6651 .50 .50 4.00 .4562 .5000 3.0386 .50 .50 8.00 .4776 .5000 5.8051 .50 1.00 1.00 .6931 .5000 .5000 .50 1.00 2.00 .8326 .5000 .8326 .50 1.00 4.00 .9124 .5000 1.5193 .50 1.00 8.00 .9552 .5000 2.9026 .50 2.00 1.00 1.3863 .5000 .2500 .50 2.00 2.00 1.6651 .5000 .4163 .50 2.00 4.00 1.8249 .5000 .7597 .50 2.00 8.00 1.9104 .5000 1.4513 .50 5.00 1.00 3.4657 .5000 .1000 .50 5.00 2.00 4.1628 .5000 .1665 .50 5.00 4.00 4.5622 .5000 .3039 .50 5.00 8.00 4.7761 .5000 .5805 .60 .50 1.00 .4581 .6000 .8000 .60 .50 2.00 .4786 .6000 1.5316 .60 .50 4.00 .4892 .6000 2.9969 .60 .50 8.00 .4946 .6000 5.9287 .60 1.00 1.00 .9163 .6000 .4000 .60 1.00 2.00 .9572 .6000 .7658 .60 1.00 4.00 .9784 .6000 1.4985 .60 1.00 8.00 .9891 .6000 2.9643 .60 2.00 1.00 1.8326 .6000 .2000 .60 2.00 2.00 1.9145 .6000 .3829 .60 2.00 4.00 1.9568 .6000 .7492 .60 2.00 8.00 1.9783 .6000 1.4822 .60 5.00 1.00 4.5815 .6000 .0800 .60 5.00 2.00 4.7862 .6000 .1532 .60 5.00 4.00 4.8919 .6000 .2997 .60 5.00 8.00 4.9457 .6000 .5929 .70 .50 1.00 .6020 .7000 .6000 .70 .50 2.00 .5486 .7000 1.3167 .70 .50 4.00 .5238 .7000 2.7585 .70 .50 8.00 .5117 .7000 5.6465 .70 1.00 1.00 1.2040 .7000 .3000 .70 1.00 2.00 1.0973 .7000 .6584 .70 1.00 4.00 1.0475 .7000 1.3793 .70 1.00 8.00 1.0235 .7000 2.8233 .70 2.00 1.00 2.4079 .7000 .1500 .70 2.00 2.00 2.1945 .7000 .3292 .70 2.00 4.00 2.0950 .7000 .6896 .70 2.00 8.00 2.0469 .7000 1.4116 .70 5.00 1.00 6.0199 .7000 .0600 .70 5.00 2.00 5.4863 .7000 .1317 .70 5.00 4.00 5.2375 .7000 .2759 .70 5.00 8.00 5.1174 .7000 .5647 .80 .50 1.00 .8047 .8000 .4000 .80 .50 2.00 .6343 .8000 1.0149 .80 .50 4.00 .5632 .8000 2.2863 .80 .50 8.00 .5306 .8000 4.8528 .80 1.00 1.00 1.6094 .8000 .2000 .80 1.00 2.00 1.2686 .8000 .5075 .80 1.00 4.00 1.1263 .8000 1.1431 .80 1.00 8.00 1.0613 .8000 2.4264 .80 2.00 1.00 3.2189 .8000 .1000 .80 2.00 2.00 2.5373 .8000 .2537 .80 2.00 4.00 2.2527 .8000 .5716 .80 2.00 8.00 2.1226 .8000 1.2132 .80 5.00 1.00 8.0472 .8000 .0400 .80 5.00 2.00 6.3432 .8000 .1015 .80 5.00 4.00 5.6317 .8000 .2286 .80 5.00 8.00 5.3065 .8000 .4853 .90 .50 1.00 1.1513 .9000 .2000 .90 .50 2.00 .7587 .9000 .6070 .90 .50 4.00 .6159 .9000 1.4954 .90 .50 8.00 .5549 .9000 3.3194 .90 1.00 1.00 2.3026 .9000 .1000 .90 1.00 2.00 1.5174 .9000 .3035 .90 1.00 4.00 1.2318 .9000 .7477 .90 1.00 8.00 1.1099 .9000 1.6597 .90 2.00 1.00 4.6052 .9000 .0500 .90 2.00 2.00 3.0349 .9000 .1517 .90 2.00 4.00 2.4637 .9000 .3738 .90 2.00 8.00 2.2198 .9000 .8298 .90 5.00 1.00 11.5129 .9000 .0200 .90 5.00 2.00 7.5871 .9000 .0607 .90 5.00 4.00 6.1592 .9000 .1495 .90 5.00 8.00 5.5494 .9000 .3319 .99 .50 1.00 2.3026 .9900 .0200 .99 .50 2.00 1.0730 .9900 .0858 .99 .50 4.00 .7325 .9900 .2515 .99 .50 8.00 .6052 .9900 .6088 .99 1.00 1.00 4.6052 .9900 .0100 .99 1.00 2.00 2.1460 .9900 .0429 .99 1.00 4.00 1.4649 .9900 .1257 .99 1.00 8.00 1.2103 .9900 .3044 .99 2.00 1.00 9.2103 .9900 .0050 .99 2.00 2.00 4.2919 .9900 .0215 .99 2.00 4.00 2.9298 .9900 .0629 .99 2.00 8.00 2.4207 .9900 .1522 .99 5.00 1.00 23.0259 .9900 .0020 .99 5.00 2.00 10.7298 .9900 .0086 .99 5.00 4.00 7.3246 .9900 .0251 .99 5.00 8.00 6.0517 .9900 .0609 _ATEOF cat >weibull.sps <<'_ATEOF' DATA LIST LIST FILE='weibull.in' NOTABLE SKIP=1 /P a b Xx Xcdf Xpdf. NUMERIC x cdf pdf (F10.4). COMPUTE x = IDF.weibull(P, a, b). COMPUTE cdf = cdf.weibull(x, a, b). COMPUTE pdf = pdf.weibull(x, a, b). DO IF $CASENUM = 1. PRINT OUTFILE='weibull.out'/" P a b x cdf pdf ". END IF. PRINT OUTFILE='weibull.out'/P a b x cdf pdf. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/randist.at:2706: pspp -O format=csv weibull.sps" at_fn_check_prepare_trace "randist.at:2706" ( $at_check_trace; pspp -O format=csv weibull.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:2706" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/randist.at:2706: \$PERL compare.pl weibull.in weibull.out" at_fn_check_prepare_dynamic "$PERL compare.pl weibull.in weibull.out" "randist.at:2706" ( $at_check_trace; $PERL compare.pl weibull.in weibull.out ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/randist.at:2706" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1066 #AT_START_1067 at_fn_group_banner 1067 'ascii.at:19' \ "ASCII driver overwriting single-width text" " " 132 at_xfail=no ( $as_echo "1067. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' ## overwriting rest of line # plain 0 0 0 abc 1 0 0 BCD # emphasized over plain 0 1 0 efg 1 1 1 FGH # plain over emphasized 0 2 1 ijk 1 2 0 JKL # emphasized over emphasized 0 3 1 mno 1 3 1 NOP ## overwriting partial line # plain 0 5 0 abcdef 0 5 0 A 2 5 0 CDE # emphasized over plain 0 6 0 ghijkl 0 6 1 G 2 6 1 IJK # plain over emphasized 0 7 1 mnopqr 0 7 0 M 2 7 0 OPQ # emphasized over emphasized 0 8 1 stuvwx 0 8 1 S 2 8 1 UVW ## overwriting rest of line with double-width characters # plain 0 10 0 kakiku 2 10 0 きくけ # emphasized over plain 0 11 0 kakiku 2 11 1 きくけ # plain over emphasized 0 12 1 kakiku 2 12 0 きくけ # emphasized over emphasized 0 13 1 kakiku 2 13 1 きくけ ## overwriting partial line with double-width characters # plain 0 15 0 kakikukeko 0 15 0 か 4 15 0 くけ # emphasized over plain 0 16 0 kakikukeko 0 16 1 か 4 16 1 くけ # plain over emphasized 0 17 1 kakikukeko 0 17 0 か 4 17 0 くけ # emphasized over emphasized 0 18 1 kakikukeko 0 18 1 か 4 18 1 くけ _ATEOF { set +x $as_echo "$at_srcdir/ascii.at:86: render-test --draw-mode --emph=none input" at_fn_check_prepare_trace "ascii.at:86" ( $at_check_trace; render-test --draw-mode --emph=none input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "aBCD eFGH iJKL mNOP AbCDEf GhIJKl MnOPQr StUVWx kaきくけ kaきくけ kaきくけ kaきくけ かkiくけko かkiくけko かkiくけko かkiくけko " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:86" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/ascii.at:107: render-test --draw-mode --emph=bold input" at_fn_check_prepare_trace "ascii.at:107" ( $at_check_trace; render-test --draw-mode --emph=bold input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "aBCD eFFGGHH iiJKL mmNNOOPP AbCDEf GGhIIJJKKl MnnOPQrr SSttUUVVWWxx kaきくけ kaききくくけけ kkaaきくけ kkaaききくくけけ かkiくけko かかkiくくけけko かkkiiくけkkoo かかkkiiくくけけkkoo " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:107" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/ascii.at:128: render-test --draw-mode --emph=underline input" at_fn_check_prepare_trace "ascii.at:128" ( $at_check_trace; render-test --draw-mode --emph=underline input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "aBCD e_F_G_H _iJKL _m_N_O_P AbCDEf _Gh_I_J_Kl M_nOPQ_r _S_t_U_V_W_x kaきくけ ka_き_く_け _k_aきくけ _k_a_き_く_け かkiくけko _かki_く_けko か_k_iくけ_k_o _か_k_i_く_け_k_o " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:128" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1067 #AT_START_1068 at_fn_group_banner 1068 'ascii.at:151' \ "ASCII driver overwriting double-width text" " " 132 at_xfail=no ( $as_echo "1068. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' ## overwrite rest of line, aligned double-width over double-width # plain 0 0 0 あいう 2 0 0 きくけ # emphasized over plain 0 1 0 あいう 2 1 1 きくけ # plain over emphasized 0 2 1 あいう 2 2 0 きくけ # emphasized over emphasized 0 3 1 あいう 2 3 1 きくけ ## overwrite rest of line, misaligned double-width over double-width # plain 0 5 0 あいう 3 5 0 きくけ # emphasized over plain 0 6 0 あいう 3 6 1 きくけ # plain over emphasized 0 7 1 あいう 3 7 0 きくけ # emphasized over emphasized 0 8 1 あいう 3 8 1 きくけ ## overwrite partial line, aligned double-width over double-width # plain 0 10 0 あいうえお 0 10 0 か 4 10 0 くけ # emphasized over plain 0 11 0 あいうえお 0 11 1 か 4 11 1 くけ # plain over emphasized 0 12 1 あいうえお 0 12 0 か 4 12 0 くけ # emphasized over emphasized 0 13 1 あいうえお 0 13 1 か 4 13 1 くけ ## overwrite partial line, misaligned double-width over double-width # plain 0 15 0 あいうえおさ 1 15 0 か 5 15 0 くけ # emphasized over plain 0 16 0 あいうえおさ 1 16 1 か 5 16 1 くけ # plain over emphasized 0 17 1 あいうえおさ 1 17 0 か 5 17 0 くけ # emphasized over emphasized 0 18 1 あいうえおさ 1 18 1 か 5 18 1 くけ ## overwrite rest of line, aligned single-width over double-width # plain 0 20 0 あいう 2 20 0 kikuko # emphasized over plain 0 21 0 あいう 2 21 1 kikuko # plain over emphasized 0 22 1 あいう 2 22 0 kikuko # emphasized over emphasized 0 23 1 あいう 2 23 1 kikuko ## overwrite rest of line, misaligned single-width over double-width # plain 0 25 0 あいう 3 25 0 kikuko # emphasized over plain 0 26 0 あいう 3 26 1 kikuko # plain over emphasized 0 27 1 あいう 3 27 0 kikuko # emphasized over emphasized 0 28 1 あいう 3 28 1 kikuko ## overwrite partial line, aligned single-width over double-width # plain 0 30 0 あいうえお 0 30 0 ka 4 30 0 kuke # emphasized over plain 0 31 0 あいうえお 0 31 1 ka 4 31 1 kuke # plain over emphasized 0 32 1 あいうえお 0 32 0 ka 4 32 0 kuke # emphasized over emphasized 0 33 1 あいうえお 0 33 1 ka 4 33 1 kuke ## overwrite partial line, misaligned single-width over double-width # plain 0 35 0 あいうえおさ 1 35 0 a 5 35 0 kuke # emphasized over plain 0 36 0 あいうえおさ 1 36 1 a 5 36 1 kuke # plain over emphasized 0 37 1 あいうえおさ 1 37 0 a 5 37 0 kuke # emphasized over emphasized 0 38 1 あいうえおさ 1 38 1 a 5 38 1 kuke _ATEOF { set +x $as_echo "$at_srcdir/ascii.at:282: render-test --draw-mode --emph=none input" at_fn_check_prepare_trace "ascii.at:282" ( $at_check_trace; render-test --draw-mode --emph=none input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "あきくけ あきくけ あきくけ あきくけ あ?きくけ あ?きくけ あ?きくけ あ?きくけ かいくけお かいくけお かいくけお かいくけお ?か??くけ?さ ?か??くけ?さ ?か??くけ?さ ?か??くけ?さ あkikuko あkikuko あkikuko あkikuko あ?kikuko あ?kikuko あ?kikuko あ?kikuko kaいkukeお kaいkukeお kaいkukeお kaいkukeお ?aい?kuke?さ ?aい?kuke?さ ?aい?kuke?さ ?aい?kuke?さ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:282" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/ascii.at:323: render-test --draw-mode --emph=bold input" at_fn_check_prepare_trace "ascii.at:323" ( $at_check_trace; render-test --draw-mode --emph=bold input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "あきくけ あききくくけけ ああきくけ ああききくくけけ あ?きくけ あ?ききくくけけ ああ?きくけ ああ?ききくくけけ かいくけお かかいくくけけお かいいくけおお かかいいくくけけおお ?か??くけ?さ ?かか??くくけけ?さ ?か??くけ?ささ ?かか??くくけけ?ささ あkikuko あkkiikkuukkoo ああkikuko ああkkiikkuukkoo あ?kikuko あ?kkiikkuukkoo ああ?kikuko ああ?kkiikkuukkoo kaいkukeお kkaaいkkuukkeeお kaいいkukeおお kkaaいいkkuukkeeおお ?aい?kuke?さ ?aaい?kkuukkee?さ ?aいい?kuke?ささ ?aaいい?kkuukkee?ささ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:323" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/ascii.at:364: render-test --draw-mode --emph=underline input" at_fn_check_prepare_trace "ascii.at:364" ( $at_check_trace; render-test --draw-mode --emph=underline input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "あきくけ あ_き_く_け _あきくけ _あ_き_く_け あ?きくけ あ?_き_く_け _あ?きくけ _あ?_き_く_け かいくけお _かい_く_けお か_いくけ_お _か_い_く_け_お ?か??くけ?さ ?_か??_く_け?さ ?か??くけ?_さ ?_か??_く_け?_さ あkikuko あ_k_i_k_u_k_o _あkikuko _あ_k_i_k_u_k_o あ?kikuko あ?_k_i_k_u_k_o _あ?kikuko _あ?_k_i_k_u_k_o kaいkukeお _k_aい_k_u_k_eお ka_いkuke_お _k_a_い_k_u_k_e_お ?aい?kuke?さ ?_aい?_k_u_k_e?さ ?a_い?kuke?_さ ?_a_い?_k_u_k_e?_さ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:364" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1068 #AT_START_1069 at_fn_group_banner 1069 'ascii.at:407' \ "ASCII driver overwriting combining characters" " " 132 at_xfail=no ( $as_echo "1069. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' ## overwriting rest of line, ordinary over combining # plain 0 0 0 àéî 1 0 0 xyz # emphasized over plain 0 1 0 àéî 1 1 1 xyz # plain over emphasized 0 2 1 àéî 1 2 0 xyz # emphasized over emphasized 0 3 1 àéî 1 3 1 xyz ## overwriting rest of line, combining over ordinary # plain 0 5 0 xyz 1 5 0 àéî # emphasized over plain 0 6 0 xyz 1 6 1 àéî # plain over emphasized 0 7 1 xyz 1 7 0 àéî # emphasized over emphasized 0 8 1 xyz 1 8 1 àéî ## overwriting partial line, ordinary over combining # plain 0 10 0 àéîo̧ũẙ 0 10 0 a 2 10 0 iou # emphasized over plain 0 11 0 àéîo̧ũẙ 0 11 1 a 2 11 1 iou # plain over emphasized 0 12 1 àéîo̧ũẙ 0 12 0 a 2 12 0 iou # emphasized over emphasized 0 13 1 àéîo̧ũẙ 0 13 1 a 2 13 1 iou ## overwriting partial line, combining over ordinary # plain 0 15 0 aeiouy 0 15 0 à 2 15 0 îo̧ũ # emphasized over plain 0 16 0 aeiouy 0 16 1 à 2 16 1 îo̧ũ # plain over emphasized 0 17 1 aeiouy 0 17 0 à 2 17 0 îo̧ũ # emphasized over emphasized 0 18 1 aeiouy 0 18 1 à 2 18 1 îo̧ũ _ATEOF { set +x $as_echo "$at_srcdir/ascii.at:474: render-test --draw-mode --emph=none input" at_fn_check_prepare_trace "ascii.at:474" ( $at_check_trace; render-test --draw-mode --emph=none input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "àxyz àxyz àxyz àxyz xàéî xàéî xàéî xàéî aéiouẙ aéiouẙ aéiouẙ aéiouẙ àeîo̧ũy àeîo̧ũy àeîo̧ũy àeîo̧ũy " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:474" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/ascii.at:495: render-test --draw-mode --emph=bold input" at_fn_check_prepare_trace "ascii.at:495" ( $at_check_trace; render-test --draw-mode --emph=bold input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "àxyz àxxyyzz aàxyz aàxxyyzz xàéî xaàeéiî xxàéî xxaàeéiî aéiouẙ aaéiioouuẙ aeéiouyẙ aaeéiioouuyẙ àeîo̧ũy aàeiîoo̧uũy àeeîo̧ũyy aàeeiîoo̧uũyy " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:495" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/ascii.at:516: render-test --draw-mode --emph=underline input" at_fn_check_prepare_trace "ascii.at:516" ( $at_check_trace; render-test --draw-mode --emph=underline input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "àxyz à_x_y_z _àxyz _à_x_y_z xàéî x_à_é_î _xàéî _x_à_é_î aéiouẙ _aé_i_o_uẙ a_éiou_ẙ _a_é_i_o_u_ẙ àeîo̧ũy _àe_î_o̧_ũy à_eîo̧ũ_y _à_e_î_o̧_ũ_y " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:516" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1069 #AT_START_1070 at_fn_group_banner 1070 'ascii.at:539' \ "ASCII driver u8_line_set_length" " " 132 at_xfail=no ( $as_echo "1070. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 0 0 0 àéî 0 1 0 àéî 0 2 0 àéî 0 3 0 àéî 0 4 0 àéî set-length 0 4 set-length 1 3 set-length 2 2 set-length 3 1 set-length 4 0 0 6 0 あい 0 7 0 あい 0 8 0 あい 0 9 0 あい 0 10 0 あい 0 11 0 あい set-length 6 5 set-length 7 4 set-length 8 3 set-length 9 2 set-length 10 1 set-length 11 0 _ATEOF { set +x $as_echo "$at_srcdir/ascii.at:566: render-test --draw-mode input" at_fn_check_prepare_trace "ascii.at:566" ( $at_check_trace; render-test --draw-mode input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "àéî àéî àé à あい あい あ? あ ? " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:566" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1070 #AT_START_1071 at_fn_group_banner 1071 'ascii.at:580' \ "ASCII driver Unicode box characters" " " 132 at_xfail=no ( $as_echo "1071. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 3 3 1*2 @abc 2*1 @d\ne\nf 2*1 @g\nh\ni @j 1*2 @klm _ATEOF { set +x $as_echo "$at_srcdir/ascii.at:589: render-test --box=unicode input" at_fn_check_prepare_trace "ascii.at:589" ( $at_check_trace; render-test --box=unicode input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "╭───┬─╮ │abc│d│ ├─┬─┤e│ │g│j│f│ │h├─┴─┤ │i│klm│ ╰─┴───╯ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:589" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1071 #AT_START_1072 at_fn_group_banner 1072 'ascii.at:600' \ "ASCII driver syntax printback" " " 132 at_xfail=no ( $as_echo "1072. $at_setup_line: testing $at_desc ..." $at_traceon cat >ascii.sps <<'_ATEOF' SET PRINTBACK=ON. DATA LIST LIST /x * y * a (a23). BEGIN DATA. 1 11 One 2 22 Two 3 33 Three END DATA. REGRESSION /VARIABLES= a /DEPENDENT= x y /STATISTICS=COEFF R ANOVA. _ATEOF { set +x $as_echo "$at_srcdir/ascii.at:615: pspp ascii.sps" at_fn_check_prepare_trace "ascii.at:615" ( $at_check_trace; pspp ascii.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "SET PRINTBACK=ON. DATA LIST LIST /x * y * a (a23). Reading free-form data from INLINE. +--------+------+ |Variable|Format| #========#======# |x |F8.0 | |y |F8.0 | |a |A23 | +--------+------+ BEGIN DATA. 1 11 One 2 22 Two 3 33 Three END DATA. REGRESSION /VARIABLES= a ascii.sps:11: warning: REGRESSION: a is not a numeric variable. It will not be included in the variable list. /DEPENDENT= x y /STATISTICS=COEFF R ANOVA. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:615" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1072 #AT_START_1073 at_fn_group_banner 1073 'ascii.at:647' \ "ASCII unicode box chars" " " 132 at_xfail=no ( $as_echo "1073. $at_setup_line: testing $at_desc ..." $at_traceon cat >uc.sps <<'_ATEOF' SET FORMAT=F8.4. DATA LIST NOTABLE LIST /x * . BEGIN DATA. 1 2 3 END DATA. DESCRIPTIVES X. _ATEOF { set +x $as_echo "$at_srcdir/ascii.at:662: pspp -O box=unicode uc.sps" at_fn_check_prepare_trace "ascii.at:662" ( $at_check_trace; pspp -O box=unicode uc.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Valid cases = 3; cases with missing value(s) = 0. ╭────────╥─┬──────┬───────┬───────┬───────╮ │Variable║N│ Mean │Std Dev│Minimum│Maximum│ ╞════════╬═╪══════╪═══════╪═══════╪═══════╡ │x ║3│2.0000│ 1.0000│ 1.0000│ 3.0000│ ╰────────╨─┴──────┴───────┴───────┴───────╯ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:662" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1073 #AT_START_1074 at_fn_group_banner 1074 'ascii.at:673' \ "ASCII crash on empty line" " " 132 at_xfail=no ( $as_echo "1074. $at_setup_line: testing $at_desc ..." $at_traceon cat >print.sps <<'_ATEOF' data list notable /x y 1-2. begin data. 12 end data. print. execute. _ATEOF { set +x $as_echo "$at_srcdir/ascii.at:686: pspp print.sps" at_fn_check_prepare_trace "ascii.at:686" ( $at_check_trace; pspp print.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/ascii.at:686" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1074 #AT_START_1075 at_fn_group_banner 1075 'charts.at:24' \ "Examine" " " 133 at_xfail=no ( $as_echo "1075. $at_setup_line: testing $at_desc ..." $at_traceon cat >charts.sps <<'_ATEOF' input program. loop #i = 1 to 1000. compute x = rv.normal (56, 3) + rv.uniform (1, 1). compute y = rv.normal (6, 2) + rv.uniform (1, 2). compute A = rv.uniform (-1, 1). compute A = (A > 0). end case. end loop. end file. end input program. examine x y by a /plot = histogram, npplot spreadlevel(1) . examine x y by a /compare = groups /plot = boxplot . examine x y by a /compare = variables /plot = boxplot . _ATEOF { set +x $as_echo "$at_srcdir/charts.at:52: pspp -o pspp.txt charts.sps" at_fn_check_prepare_trace "charts.at:52" ( $at_check_trace; pspp -o pspp.txt charts.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/charts.at:52" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1075 #AT_START_1076 at_fn_group_banner 1076 'charts.at:56' \ "Roc" " " 133 at_xfail=no ( $as_echo "1076. $at_setup_line: testing $at_desc ..." $at_traceon cat >roc.sps <<'_ATEOF' data list list /fred * group * w *. begin data. 99 0 1000 99 1 3 97 0 908 97 1 2 95 0 904 96 1 7 94 1 9 93 0 823 93 1 12 90 0 723 90 1 42 84 0 523 84 1 98 73 0 500 75 1 180 63 0 520 69 1 320 60 0 510 60 1 418 50 0 488 54 1 432 46 0 428 43 1 528 36 0 324 36 1 612 26 0 294 28 1 682 20 0 119 20 1 719 10 0 97 10 1 809 end data. weight by w. compute bert = fred + (group < 0.5) * 45. compute charlie = fred + (group > 0.5) * 15. ROC /fred bert charlie by group (0) /plot = curve (reference). _ATEOF { set +x $as_echo "$at_srcdir/charts.at:104: pspp -o pspp.txt roc.sps" at_fn_check_prepare_trace "charts.at:104" ( $at_check_trace; pspp -o pspp.txt roc.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/charts.at:104" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1076 #AT_START_1077 at_fn_group_banner 1077 'charts.at:111' \ "Scree" " " 133 at_xfail=no ( $as_echo "1077. $at_setup_line: testing $at_desc ..." $at_traceon cat >scree.sps <<'_ATEOF' input program. vector vec(10). loop #i = 1 to 100. loop #v = 1 to 3. compute vec(#v) = rv.normal (0, 45). end loop. loop #v = 4 to 10. compute vec(#v) = vec (#v - 3) + rv.normal (0, 30). end loop. end case. end loop. end file. end input program. factor /variables = all /print initial /plot = eigen. _ATEOF { set +x $as_echo "$at_srcdir/charts.at:134: pspp -o pspp.txt scree.sps" at_fn_check_prepare_trace "charts.at:134" ( $at_check_trace; pspp -o pspp.txt scree.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/charts.at:134" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1077 #AT_START_1078 at_fn_group_banner 1078 'charts.at:139' \ "Histogram" " " 133 at_xfail=no ( $as_echo "1078. $at_setup_line: testing $at_desc ..." $at_traceon cat >histogram.sps <<'_ATEOF' * This test is designed to "torture" the code which generates histograms. It is no-crash test. However the code is rich in assertions, so any problems we hope will be caught there. input program. loop #i = 1 to 1000. compute pos = rv.normal (56, 3) + rv.uniform (1, 1). compute neg = rv.normal (-86, 2) + rv.uniform (1, 1). compute pn = rv.normal (0, 2) + rv.uniform (1, 2). compute A = rv.uniform (-1, 1). compute A = (A > 0). end case. end loop. end file. end input program. examine pos neg pn by a /plot = histogram . frequencies pos neg pn /format=notable /histogram=normal. _ATEOF { set +x $as_echo "$at_srcdir/charts.at:171: pspp --testing-mode -o pspp.txt histogram.sps" at_fn_check_prepare_trace "charts.at:171" ( $at_check_trace; pspp --testing-mode -o pspp.txt histogram.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/charts.at:171" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1078 #AT_START_1079 at_fn_group_banner 1079 'charts.at:176' \ "FREQUENCIES charts" " " 133 at_xfail=no ( $as_echo "1079. $at_setup_line: testing $at_desc ..." $at_traceon cat >xxx.sps <<'_ATEOF' DATA LIST LIST /nationality (A10) religion (A20) gender (A8). BEGIN DATA. Australian Sikh Male Australian Sikh Male Australian Sikh Male Australian Sikh Male British Zoroastrian Female British Buddist Female British Buddist Female British Zoroastrian Female German Muslim Male German Christian Male German Christian Female German Christian Male German Zoroastrian Female German Sikh Female German Muslim Female German Pastafarian Female German "Jedi Knight" Female Belgian Sikh Male French Muslim Male French Muslim Male French Christian Male END DATA. FREQUENCIES /VARIABLES=religion nationality /BARCHART /PIECHART. _ATEOF { set +x $as_echo "$at_srcdir/charts.at:208: pspp -o pspp.txt xxx.sps" at_fn_check_prepare_trace "charts.at:208" ( $at_check_trace; pspp -o pspp.txt xxx.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/charts.at:208" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1079 #AT_START_1080 at_fn_group_banner 1080 'charts.at:214' \ "CROSSTABS charts" " " 133 at_xfail=no ( $as_echo "1080. $at_setup_line: testing $at_desc ..." $at_traceon cat >xxx.sps <<'_ATEOF' DATA LIST LIST /nationality (A10) religion (A20) gender (A8). BEGIN DATA. Australian Sikh Male Australian Sikh Male Australian Sikh Male Australian Sikh Male British Zoroastrian Female British Buddist Female British Buddist Female British Zoroastrian Female German Muslim Male German Christian Male German Christian Female German Christian Male German Zoroastrian Female German Sikh Female German Muslim Female German Pastafarian Female German "Jedi Knight" Female Belgian Sikh Male French Muslim Male French Muslim Male French Christian Male END DATA. CROSSTABS /tables = nationality by religion by gender /tables = nationality by religion /tables = religion by gender /tables = nationality by religion by gender /barchart. _ATEOF { set +x $as_echo "$at_srcdir/charts.at:251: pspp -o pspp.txt xxx.sps" at_fn_check_prepare_trace "charts.at:251" ( $at_check_trace; pspp -o pspp.txt xxx.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/charts.at:251" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1080 #AT_START_1081 at_fn_group_banner 1081 'charts.at:258' \ "BOXPLOT Empty" " " 133 at_xfail=no ( $as_echo "1081. $at_setup_line: testing $at_desc ..." $at_traceon cat >bp.sps <<'_ATEOF' DATA LIST LIST /X * Y * . BEGIN DATA 1 2 2 2 3 END DATA EXAMINE /VARIABLES = Y /PLOT = BOXPLOT. _ATEOF { set +x $as_echo "$at_srcdir/charts.at:275: pspp -o pspp.txt bp.sps" at_fn_check_prepare_trace "charts.at:275" ( $at_check_trace; pspp -o pspp.txt bp.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/charts.at:275" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1081 #AT_START_1082 at_fn_group_banner 1082 'html.at:19' \ "HTML bug" " " 134 at_xfail=no ( $as_echo "1082. $at_setup_line: testing $at_desc ..." $at_traceon cat >foo.sps <<'_ATEOF' data list notable list /w l96_r l99_r l102_r *. begin data. 15 0 0 0 1 1 1 1 2 1 1 2 1 1 2 1 1 1 2 2 1 2 1 1 4 2 2 1 2 2 2 2 end data. weight by w. crosstabs /tables=l96_r by l99_r by l102_r /format=avalue table pivot /statistics=none /cell=count. _ATEOF { set +x $as_echo "$at_srcdir/html.at:43: pspp -O format=html foo.sps" at_fn_check_prepare_trace "html.at:43" ( $at_check_trace; pspp -O format=html foo.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/html.at:43" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1082 #AT_START_1083 at_fn_group_banner 1083 'output.at:39' \ "output csv to unwritable directory" " " 135 at_xfail=no ( $as_echo "1083. $at_setup_line: testing $at_desc ..." $at_traceon mkdir unwritable chmod u-w unwritable $as_echo "output.at:39" >"$at_check_line_file" (: > unwritable/test) \ && at_fn_check_skip 77 "$at_srcdir/output.at:39" cat >unwritable.sps <<'_ATEOF' data list /x 1. begin data. 1 2 3 end data. frequencies x/histogram. _ATEOF { set +x $as_echo "$at_srcdir/output.at:39: cd unwritable && pspp -o pspp.csv ../unwritable.sps" at_fn_check_prepare_trace "output.at:39" ( $at_check_trace; cd unwritable && pspp -o pspp.csv ../unwritable.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/output.at:39" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1083 #AT_START_1084 at_fn_group_banner 1084 'output.at:40' \ "output html to unwritable directory" " " 135 at_xfail=no ( $as_echo "1084. $at_setup_line: testing $at_desc ..." $at_traceon mkdir unwritable chmod u-w unwritable $as_echo "output.at:40" >"$at_check_line_file" (: > unwritable/test) \ && at_fn_check_skip 77 "$at_srcdir/output.at:40" cat >unwritable.sps <<'_ATEOF' data list /x 1. begin data. 1 2 3 end data. frequencies x/histogram. _ATEOF { set +x $as_echo "$at_srcdir/output.at:40: cd unwritable && pspp -o pspp.html ../unwritable.sps" at_fn_check_prepare_trace "output.at:40" ( $at_check_trace; cd unwritable && pspp -o pspp.html ../unwritable.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/output.at:40" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1084 #AT_START_1085 at_fn_group_banner 1085 'output.at:41' \ "output odt to unwritable directory" " " 135 at_xfail=no ( $as_echo "1085. $at_setup_line: testing $at_desc ..." $at_traceon mkdir unwritable chmod u-w unwritable $as_echo "output.at:41" >"$at_check_line_file" (: > unwritable/test) \ && at_fn_check_skip 77 "$at_srcdir/output.at:41" cat >unwritable.sps <<'_ATEOF' data list /x 1. begin data. 1 2 3 end data. frequencies x/histogram. _ATEOF { set +x $as_echo "$at_srcdir/output.at:41: cd unwritable && pspp -o pspp.odt ../unwritable.sps" at_fn_check_prepare_trace "output.at:41" ( $at_check_trace; cd unwritable && pspp -o pspp.odt ../unwritable.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/output.at:41" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1085 #AT_START_1086 at_fn_group_banner 1086 'output.at:42' \ "output pdf to unwritable directory" " " 135 at_xfail=no ( $as_echo "1086. $at_setup_line: testing $at_desc ..." $at_traceon mkdir unwritable chmod u-w unwritable $as_echo "output.at:42" >"$at_check_line_file" (: > unwritable/test) \ && at_fn_check_skip 77 "$at_srcdir/output.at:42" cat >unwritable.sps <<'_ATEOF' data list /x 1. begin data. 1 2 3 end data. frequencies x/histogram. _ATEOF { set +x $as_echo "$at_srcdir/output.at:42: cd unwritable && pspp -o pspp.pdf ../unwritable.sps" at_fn_check_prepare_trace "output.at:42" ( $at_check_trace; cd unwritable && pspp -o pspp.pdf ../unwritable.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/output.at:42" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1086 #AT_START_1087 at_fn_group_banner 1087 'output.at:43' \ "output txt to unwritable directory" " " 135 at_xfail=no ( $as_echo "1087. $at_setup_line: testing $at_desc ..." $at_traceon mkdir unwritable chmod u-w unwritable $as_echo "output.at:43" >"$at_check_line_file" (: > unwritable/test) \ && at_fn_check_skip 77 "$at_srcdir/output.at:43" cat >unwritable.sps <<'_ATEOF' data list /x 1. begin data. 1 2 3 end data. frequencies x/histogram. _ATEOF { set +x $as_echo "$at_srcdir/output.at:43: cd unwritable && pspp -o pspp.txt ../unwritable.sps" at_fn_check_prepare_trace "output.at:43" ( $at_check_trace; cd unwritable && pspp -o pspp.txt ../unwritable.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/output.at:43" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1087 #AT_START_1088 at_fn_group_banner 1088 'paper-size.at:19' \ "letter default paper size" " " 136 at_xfail=no ( $as_echo "1088. $at_setup_line: testing $at_desc ..." $at_traceon cat >paper-size.sps <<'_ATEOF' debug paper size ''. _ATEOF { set +x $as_echo "$at_srcdir/paper-size.at:23: PAPERSIZE=letter pspp --testing-mode -O format=csv paper-size.sps" at_fn_check_prepare_trace "paper-size.at:23" ( $at_check_trace; PAPERSIZE=letter pspp --testing-mode -O format=csv paper-size.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"\" => 8.5 x 11.0 in, 216 x 279 mm " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/paper-size.at:23" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1088 #AT_START_1089 at_fn_group_banner 1089 'paper-size.at:28' \ "a4 default paper size" " " 136 at_xfail=no ( $as_echo "1089. $at_setup_line: testing $at_desc ..." $at_traceon cat >paper-size.sps <<'_ATEOF' debug paper size ''. _ATEOF { set +x $as_echo "$at_srcdir/paper-size.at:32: PAPERSIZE=a4 pspp --testing-mode -O format=csv paper-size.sps" at_fn_check_prepare_trace "paper-size.at:32" ( $at_check_trace; PAPERSIZE=a4 pspp --testing-mode -O format=csv paper-size.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"\" => 8.3 x 11.7 in, 210 x 297 mm " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/paper-size.at:32" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1089 #AT_START_1090 at_fn_group_banner 1090 'paper-size.at:37' \ "specific paper sizes" " " 136 at_xfail=no ( $as_echo "1090. $at_setup_line: testing $at_desc ..." $at_traceon cat >paper-size.sps <<'_ATEOF' debug paper size 'a4'. debug paper size 'letter'. debug paper size '10x14in'. debug paper size '210x297mm'. _ATEOF { set +x $as_echo "$at_srcdir/paper-size.at:45: PAPERSIZE=a4 pspp --testing-mode -O format=csv paper-size.sps" at_fn_check_prepare_trace "paper-size.at:45" ( $at_check_trace; PAPERSIZE=a4 pspp --testing-mode -O format=csv paper-size.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\"a4\" => 8.3 x 11.7 in, 210 x 297 mm \"letter\" => 8.5 x 11.0 in, 216 x 279 mm \"10x14in\" => 10.0 x 14.0 in, 254 x 356 mm \"210x297mm\" => 8.3 x 11.7 in, 210 x 297 mm " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/paper-size.at:45" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1090 #AT_START_1091 at_fn_group_banner 1091 'render.at:176' \ "single cell" " " 137 at_xfail=no ( $as_echo "1091. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 1 abc _ATEOF { set +x $as_echo "$at_srcdir/render.at:181: render-test input" at_fn_check_prepare_trace "render.at:181" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "abc " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:181" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1091 #AT_START_1092 at_fn_group_banner 1092 'render.at:185' \ "nested single cell" " " 137 at_xfail=no ( $as_echo "1092. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 1 abc 1 1 {0} _ATEOF { set +x $as_echo "$at_srcdir/render.at:192: render-test input" at_fn_check_prepare_trace "render.at:192" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "abc " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:192" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1092 #AT_START_1093 at_fn_group_banner 1093 'render.at:196' \ "single cell with border" " " 137 at_xfail=no ( $as_echo "1093. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 1 @abc _ATEOF { set +x $as_echo "$at_srcdir/render.at:201: render-test input" at_fn_check_prepare_trace "render.at:201" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---+ |abc| +---+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:201" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1093 #AT_START_1094 at_fn_group_banner 1094 'render.at:208' \ "nested single cell with border" " " 137 at_xfail=no ( $as_echo "1094. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 1 @abc 1 1 @{0} _ATEOF { set +x $as_echo "$at_srcdir/render.at:215: render-test input" at_fn_check_prepare_trace "render.at:215" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-----+ |+---+| ||abc|| |+---+| +-----+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:215" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1094 #AT_START_1095 at_fn_group_banner 1095 'render.at:224' \ "joined columns" " " 137 at_xfail=no ( $as_echo "1095. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 2 2 1*2 @abcdefg @hij @klm _ATEOF { set +x $as_echo "$at_srcdir/render.at:231: render-test input" at_fn_check_prepare_trace "render.at:231" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-------+ |abcdefg| +---+---+ |hij|klm| +---+---+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:231" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1095 #AT_START_1096 at_fn_group_banner 1096 'render.at:240' \ "3x3, joined rows and columns" " " 137 at_xfail=no ( $as_echo "1096. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 3 3 1*2 @abc 2*1 @d\ne\nf 2*1 @g\nh\ni @j 1*2 @klm _ATEOF { set +x $as_echo "$at_srcdir/render.at:249: render-test input" at_fn_check_prepare_trace "render.at:249" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---+-+ |abc|d| +-+-+e| |g|j|f| |h+-+-+ |i|klm| +-+---+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:249" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1096 #AT_START_1097 at_fn_group_banner 1097 'render.at:260' \ "joined rows and columns (with footnotes)" " " 137 at_xfail=no ( $as_echo "1097. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 3 3 1*2 @abc#Approximation. 2*1 @d\ne\nf#This is a very long footnote that will have to wrap from one line to the next. Let's see if the rendering engine does it acceptably. 2*1 @g\nh\ni#One#Two#Three @j 1*2 @klm _ATEOF { set +x $as_echo "$at_srcdir/render.at:269: render-test --csv input" at_fn_check_prepare_trace "render.at:269" ( $at_check_trace; render-test --csv input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+------------+----+ | abc[a]| d| +----------+-+ e| | g|j|f[b]| | h+-+----+ |i[c][d][e]| klm| +----------+------+ [a] Approximation. [b] This is a very long footnote that will have to wrap from one line to the next. Let's see if the rendering engine does it acceptably. [c] One [d] Two [e] Three " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:269" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:284: cat render.csv" at_fn_check_prepare_trace "render.at:284" ( $at_check_trace; cat render.csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "abc[a],,\"d e f[b]\" \"g h i[c][d][e]\",j, ,klm, Footnotes: a,Approximation. b,This is a very long footnote that will have to wrap from one line to the next. Let's see if the rendering engine does it acceptably. c,One d,Two e,Three " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:284" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1097 #AT_START_1098 at_fn_group_banner 1098 'render.at:302' \ "6x6, joined rows and columns" " " 137 at_xfail=no ( $as_echo "1098. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 6 6 @a 1*2 @bcd @e 2*1 @f\ng\nh @i 2*1 @j\nk\nl @m 1*2 @nop 2*1 @q\nr\ns 2*1 @t\nu\nv @w 1*2 @xyz @A 2*1 @B\nC\nD @E 1*2 @FGH 1*2 @IJK 2*1 @L\nM\nN @O @P @Q 1*2 @RST @U @V _ATEOF { set +x $as_echo "$at_srcdir/render.at:305: render-test input" at_fn_check_prepare_trace "render.at:305" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+---+-+-+-+ |a|bcd|e|f|i| +-+-+-+-+g+-+ |j|m|nop|h|q| |k+-+-+-+-+r| |l|t|w|xyz|s| +-+u+-+-+-+-+ |A|v|B|E|FGH| +-+-+C+-+-+-+ |IJK|D|L|O|P| +-+-+-+M+-+-+ |Q|RST|N|U|V| +-+---+-+-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:305" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1098 #AT_START_1099 at_fn_group_banner 1099 'render.at:322' \ "3 rows with many joined cells" " " 137 at_xfail=no ( $as_echo "1099. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 3 19 a b c d e f g h i j k l m n o p q r s @1 1*2 @2 1*2 @3 1*2 @4 1*2 @5 1*2 @6 1*2 @7 1*2 @8 1*2 @9 1*2 @10 1*2 @11 1*2 @12 1*2 @13 1*2 @14 1*2 @15 1*2 @16 1*2 @17 1*2 @18 1*2 @19 @20 _ATEOF { set +x $as_echo "$at_srcdir/render.at:331: render-test input" at_fn_check_prepare_trace "render.at:331" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " a b c d e f g h i j k l m n o p q r s +-+---+---+---+---+---+---+---+---+----+ |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+ | 11| 12| 13| 14| 15| 16| 17| 18| 19|20| +---+---+---+---+---+---+---+---+---+--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:331" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1099 #AT_START_1100 at_fn_group_banner 1100 'render.at:341' \ "3 columns with many joined cells" " " 137 at_xfail=no ( $as_echo "1100. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 3 19 a b c d e f g h i j k l m n o p q r s @1 1*2 @2\nab\ncd 1*2 @3\nab\ncd 1*2 @4\nab\ncd 1*2 @5\nab\ncd 1*2 @6\nab\ncd 1*2 @7\nab\ncd 1*2 @8\nab\ncd 1*2 @9\nab\ncd 1*2 @10\nab\ncd 1*2 @11\nab\ncd 1*2 @12\nab\ncd 1*2 @13\nab\ncd 1*2 @14\nab\ncd 1*2 @15\nab\ncd 1*2 @16\nab\ncd 1*2 @17\nab\ncd 1*2 @18\nab\ncd 1*2 @19\nab\ncd @20 _ATEOF { set +x $as_echo "$at_srcdir/render.at:350: render-test --transpose input" at_fn_check_prepare_trace "render.at:350" ( $at_check_trace; render-test --transpose input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " +--+--+ a| 1|11| +--+ab| b| 2|cd| |ab+--+ c|cd|12| +--+ab| d| 3|cd| |ab+--+ e|cd|13| +--+ab| f| 4|cd| |ab+--+ g|cd|14| +--+ab| h| 5|cd| |ab+--+ i|cd|15| +--+ab| j| 6|cd| |ab+--+ k|cd|16| +--+ab| l| 7|cd| |ab+--+ m|cd|17| +--+ab| n| 8|cd| |ab+--+ o|cd|18| +--+ab| p| 9|cd| |ab+--+ q|cd|19| +--+ab| r|10|cd| |ab+--+ s|cd|20| +--+--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:350" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1100 #AT_START_1101 at_fn_group_banner 1101 'render.at:393' \ "joined rows" " " 137 at_xfail=no ( $as_echo "1101. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 2 2 2*1 @ab\ncd\nef @hij @klm _ATEOF { set +x $as_echo "$at_srcdir/render.at:400: render-test input" at_fn_check_prepare_trace "render.at:400" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--+---+ |ab|hij| |cd+---+ |ef|klm| +--+---+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:400" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1101 #AT_START_1102 at_fn_group_banner 1102 'render.at:409' \ "nested joined rows" " " 137 at_xfail=no ( $as_echo "1102. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 2 2 2*1 @ab\ncd\nef @hij @klm 1 1 @{0} _ATEOF { set +x $as_echo "$at_srcdir/render.at:418: render-test input" at_fn_check_prepare_trace "render.at:418" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--------+ |+--+---+| ||ab|hij|| ||cd+---+| ||ef|klm|| |+--+---+| +--------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:418" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1102 #AT_START_1103 at_fn_group_banner 1103 'render.at:431' \ "joined rows only, no rules" " " 137 at_xfail=no ( $as_echo "1103. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 2 2 2*1 ab\ncd\nef 2*1 hij\nklm\nnop _ATEOF { set +x $as_echo "$at_srcdir/render.at:437: render-test input" at_fn_check_prepare_trace "render.at:437" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "ab hij cd klm ef nop " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:437" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1103 #AT_START_1104 at_fn_group_banner 1104 'render.at:444' \ "joined columns only, no rules" " " 137 at_xfail=no ( $as_echo "1104. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 2 2 1*2 abc\ndef 1*2 hij\nklm\nnop _ATEOF { set +x $as_echo "$at_srcdir/render.at:450: render-test input" at_fn_check_prepare_trace "render.at:450" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "abc def hij klm nop " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:450" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1104 #AT_START_1105 at_fn_group_banner 1105 'render.at:459' \ "5 big narrow cells" " " 137 at_xfail=no ( $as_echo "1105. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 5 @This cell has a lot of text but its minimum width is pretty narrow. @This cell also has a lot of text but its minimum width is pretty narrow. @A third cell with a lot of text but a pretty narrow minimum width. @A fourth cell with a lot of text but a pretty narrow minimum width. @A fifth cell with a lot of text but a pretty narrow minimum width. _ATEOF { set +x $as_echo "$at_srcdir/render.at:468: render-test input" at_fn_check_prepare_trace "render.at:468" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---------------+---------------+--------------+---------------+--------------+ |This cell has a| This cell also| A third cell| A fourth cell| A fifth cell| |lot of text but| has a lot of| with a lot of| with a lot of| with a lot of| | its minimum| text but its| text but a| text but a| text but a| |width is pretty| minimum width| pretty narrow| pretty narrow| pretty narrow| | narrow.| is pretty|minimum width.| minimum width.|minimum width.| | | narrow.| | | | +---------------+---------------+--------------+---------------+--------------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:468" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1105 #AT_START_1106 at_fn_group_banner 1106 'render.at:480' \ "9 big narrow cells" " " 137 at_xfail=no ( $as_echo "1106. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 9 @This cell has a lot of text but its minimum width is pretty narrow. @This cell also has a lot of text but its minimum width is pretty narrow. @A third cell with a lot of text but a pretty narrow minimum width. @A fourth cell with a lot of text but a pretty narrow minimum width. @A fifth cell with a lot of text but a pretty narrow minimum width. @A sixth cell with a lot of text but a pretty narrow minimum width. @A seventh cell with a lot of text but a pretty narrow minimum width. @A eighth cell with a lot of text but a pretty narrow minimum width. @A ninth cell with a lot of text but a pretty narrow minimum width. _ATEOF { set +x $as_echo "$at_srcdir/render.at:493: render-test input" at_fn_check_prepare_trace "render.at:493" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--------+-------+--------+--------+-------+--------+--------+-------+--------+ | This| This| A third|A fourth|A fifth| A sixth| A| A| A ninth| |cell has| cell| cell| cell| cell| cell| seventh| eighth| cell| |a lot of| also| with a| with a| with a| with a| cell| cell| with a| |text but| has a| lot of| lot of| lot of| lot of| with a| with a| lot of| | its| lot of|text but|text but| text|text but| lot of| lot of|text but| | minimum| text|a pretty|a pretty| but a|a pretty|text but| text|a pretty| |width is|but its| narrow| narrow| pretty| narrow|a pretty| but a| narrow| | pretty|minimum| minimum| minimum| narrow| minimum| narrow| pretty| minimum| | narrow.| width| width.| width.|minimum| width.| minimum| narrow| width.| | | is| | | width.| | width.|minimum| | | | pretty| | | | | | width.| | | |narrow.| | | | | | | | +--------+-------+--------+--------+-------+--------+--------+-------+--------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:493" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1106 #AT_START_1107 at_fn_group_banner 1107 'render.at:511' \ "2 big cells with new-lines" " " 137 at_xfail=no ( $as_echo "1107. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 2 @PSPP does not place many restrictions on ordering of commands. The main restriction is that variables must be defined before they are otherwise referenced. This section describes the details of command ordering, but most users will have no need to refer to them. PSPP possesses five internal states, called initial, INPUT PROGRAM, FILE TYPE, transformation, and procedure states. @PSPP includes special support\nfor unknown numeric data values.\nMissing observations are assigned\na special value, called the\n``system‑missing value''. This\n``value'' actually indicates the\nabsence of a value; it\nmeans that the actual\nvalue is unknown. _ATEOF { set +x $as_echo "$at_srcdir/render.at:517: render-test input" at_fn_check_prepare_trace "render.at:517" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+----------------------------------------------------------+------------------+ | PSPP does not place many restrictions on ordering of| PSPP includes| | commands. The main restriction is that variables must be| special support| | defined before they are otherwise referenced. This| for unknown| | section describes the details of command ordering, but| numeric data| | most users will have no need to refer to them. PSPP| values.| | possesses five internal states, called initial, INPUT| Missing| | PROGRAM, FILE TYPE, transformation, and procedure states.| observations are| | | assigned| | | a special value,| | | called the| | | \`\`system‑missing| | | value''. This| | |\`\`value'' actually| | | indicates the| | | absence of a| | | value; it| | | means that the| | | actual| | | value is unknown.| +----------------------------------------------------------+------------------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:517" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1107 #AT_START_1108 at_fn_group_banner 1108 'render.at:542' \ "8x8 with many 2x2 joins" " " 137 at_xfail=no ( $as_echo "1108. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 8 8 2*2 @abc\ndef\nghi 1*2 @jkl 2*2 @mno\npqr\nstu 1*2 @vwx 2*2 @yzA\nBCD\nEFG 2*2 @HIJ\nKLM\nNOP 3*1 @Q\nR\nS\nT\nU @V 2*1 @W\nX\nY @Z 2*2 @012\n345\n678 @9 2*2 @abc\ndef\nghi 3*1 @j\nk\nl\nm\nn 2*2 @opq\nrst\nuvw 2*2 @xyz\nABC\nDEF 2*1 @G\nH\nI 1*2 @JKL 2*3 @MNOPQ\nRSTUV\nWXYZ0 2*2 @123\n456\n789 1*3 @abcde _ATEOF { set +x $as_echo "$at_srcdir/render.at:545: render-test input" at_fn_check_prepare_trace "render.at:545" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---+---+----+----+ |abc|jkl| mno| vwx| |def| | pqr| | |ghi+---+ stu+----+ | |yzA| | HIJ| +-+-+BCD+-+--+ KLM| |Q|V|EFG|W| Z| NOP| |R| | |X| | | |S+-+-+-+Y+--+-+--+ |T|012|9| | abc| j| |U|345| | | def| k| | |678+-+-+ ghi| l| | | |opq| | m| +-+-+-+rst+----+ n| |xyz|G|uvw| JKL| | |ABC|H| | | | |DEF|I+---+--+-+--+ | | | MNOPQ| 123| +---+-+ RSTUV| 456| |abcde| WXYZ0| 789| | | | | +-----+------+----+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:545" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1108 #AT_START_1109 at_fn_group_banner 1109 'render.at:571' \ "nested 8x8" " " 137 at_xfail=no ( $as_echo "1109. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 8 8 @a @b @c @d @e @f @g @h @i 1*2 @jkl @m 1*2 @nop 2*1 @q\nr\ns @t @u @v 1*2 @wxy @z 2*1 @A\nB\nC @D @E 2*1 @F\nG\nH @I 1*2 @JKL 2*1 @M\nN\nO @P @Q 2*1 @R\nS\nT 1*2 @UVW @X @Y @Z 2*1 @0\n1\n2 @3 1*2 @456 @7 @8 @9 1*2 @abc @d 1*2 @efg @h @i @j @k @l @m @n @o @p 1 1 @{0} _ATEOF { set +x $as_echo "$at_srcdir/render.at:577: render-test input" at_fn_check_prepare_trace "render.at:577" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-----------------+ |+-+-+-+-+-+-+-+-+| ||a|b|c|d|e|f|g|h|| |+-+-+-+-+-+-+-+-+| ||i|jkl|m|nop|q|t|| |+-+-+-+-+-+-+r+-+| ||u|v|wxy|z|A|s|D|| |+-+-+-+-+-+B+-+-+| ||E|F|I|JKL|C|M|P|| |+-+G+-+---+-+N+-+| ||Q|H|R|UVW|X|O|Y|| |+-+-+S+-+-+-+-+-+| ||Z|0|T|3|456|7|8|| |+-+1+-+-+-+-+-+-+| ||9|2|abc|d|efg|h|| |+-+-+-+-+-+-+-+-+| ||i|j|k|l|m|n|o|p|| |+-+-+-+-+-+-+-+-+| +-----------------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:577" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1109 #AT_START_1110 at_fn_group_banner 1110 'render.at:600' \ "nested 8x8s and 6x6s" " " 137 at_xfail=no ( $as_echo "1110. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 8 8 @a @b @c @d @e @f @g @h @i 1*2 @jkl @m 1*2 @nop 2*1 @q\nr\ns @t @u @v 1*2 @wxy @z 2*1 @A\nB\nC @D @E 2*1 @F\nG\nH @I 1*2 @JKL 2*1 @M\nN\nO @P @Q 2*1 @R\nS\nT 1*2 @UVW @X @Y @Z 2*1 @0\n1\n2 @3 1*2 @456 @7 @8 @9 1*2 @abc @d 1*2 @efg @h @i @j @k @l @m @n @o @p 6 6 @a 1*2 @bcd @e 2*1 @f\ng\nh @i 2*1 @j\nk\nl @m 1*2 @nop 2*1 @q\nr\ns 2*1 @t\nu\nv @w 1*2 @xyz @A 2*1 @B\nC\nD @E 1*2 @FGH 1*2 @IJK 2*1 @L\nM\nN @O @P @Q 1*2 @RST @U @V 4 2 @{0} @{1} @{1} @|{1} @|{1} @({1} @({1} @{0} _ATEOF { set +x $as_echo "$at_srcdir/render.at:613: render-test input" at_fn_check_prepare_trace "render.at:613" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-----------------+-----------------+ |+-+-+-+-+-+-+-+-+| +-+---+-+-+-+| ||a|b|c|d|e|f|g|h|| |a|bcd|e|f|i|| |+-+-+-+-+-+-+-+-+| +-+-+-+-+g+-+| ||i|jkl|m|nop|q|t|| |j|m|nop|h|q|| |+-+-+-+-+-+-+r+-+| |k+-+-+-+-+r|| ||u|v|wxy|z|A|s|D|| |l|t|w|xyz|s|| |+-+-+-+-+-+B+-+-+| +-+u+-+-+-+-+| ||E|F|I|JKL|C|M|P|| |A|v|B|E|FGH|| |+-+G+-+---+-+N+-+| +-+-+C+-+-+-+| ||Q|H|R|UVW|X|O|Y|| |IJK|D|L|O|P|| |+-+-+S+-+-+-+-+-+| +-+-+-+M+-+-+| ||Z|0|T|3|456|7|8|| |Q|RST|N|U|V|| |+-+1+-+-+-+-+-+-+| +-+---+-+-+-+| ||9|2|abc|d|efg|h|| | |+-+-+-+-+-+-+-+-+| | ||i|j|k|l|m|n|o|p|| | |+-+-+-+-+-+-+-+-+| | +-----------------+-----------------+ | +-+---+-+-+-+| +-+---+-+-+-+ | | |a|bcd|e|f|i|| |a|bcd|e|f|i| | | +-+-+-+-+g+-+| +-+-+-+-+g+-+ | | |j|m|nop|h|q|| |j|m|nop|h|q| | | |k+-+-+-+-+r|| |k+-+-+-+-+r| | | |l|t|w|xyz|s|| |l|t|w|xyz|s| | | +-+u+-+-+-+-+| +-+u+-+-+-+-+ | | |A|v|B|E|FGH|| |A|v|B|E|FGH| | | +-+-+C+-+-+-+| +-+-+C+-+-+-+ | | |IJK|D|L|O|P|| |IJK|D|L|O|P| | | +-+-+-+M+-+-+| +-+-+-+M+-+-+ | | |Q|RST|N|U|V|| |Q|RST|N|U|V| | | +-+---+-+-+-+| +-+---+-+-+-+ | +-----------------+-----------------+ | +-+---+-+-+-+ |+-+---+-+-+-+ | | |a|bcd|e|f|i| ||a|bcd|e|f|i| | | +-+-+-+-+g+-+ |+-+-+-+-+g+-+ | | |j|m|nop|h|q| ||j|m|nop|h|q| | | |k+-+-+-+-+r| ||k+-+-+-+-+r| | | |l|t|w|xyz|s| ||l|t|w|xyz|s| | | +-+u+-+-+-+-+ |+-+u+-+-+-+-+ | | |A|v|B|E|FGH| ||A|v|B|E|FGH| | | +-+-+C+-+-+-+ |+-+-+C+-+-+-+ | | |IJK|D|L|O|P| ||IJK|D|L|O|P| | | +-+-+-+M+-+-+ |+-+-+-+M+-+-+ | | |Q|RST|N|U|V| ||Q|RST|N|U|V| | | +-+---+-+-+-+ |+-+---+-+-+-+ | +-----------------+-----------------+ |+-+---+-+-+-+ |+-+-+-+-+-+-+-+-+| ||a|bcd|e|f|i| ||a|b|c|d|e|f|g|h|| |+-+-+-+-+g+-+ |+-+-+-+-+-+-+-+-+| ||j|m|nop|h|q| ||i|jkl|m|nop|q|t|| ||k+-+-+-+-+r| |+-+-+-+-+-+-+r+-+| ||l|t|w|xyz|s| ||u|v|wxy|z|A|s|D|| |+-+u+-+-+-+-+ |+-+-+-+-+-+B+-+-+| ||A|v|B|E|FGH| ||E|F|I|JKL|C|M|P|| |+-+-+C+-+-+-+ |+-+G+-+---+-+N+-+| ||IJK|D|L|O|P| ||Q|H|R|UVW|X|O|Y|| |+-+-+-+M+-+-+ |+-+-+S+-+-+-+-+-+| ||Q|RST|N|U|V| ||Z|0|T|3|456|7|8|| |+-+---+-+-+-+ |+-+1+-+-+-+-+-+-+| | ||9|2|abc|d|efg|h|| | |+-+-+-+-+-+-+-+-+| | ||i|j|k|l|m|n|o|p|| | |+-+-+-+-+-+-+-+-+| +-----------------+-----------------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:613" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1110 #AT_START_1111 at_fn_group_banner 1111 'render.at:682' \ "doubly nested cells" " " 137 at_xfail=no ( $as_echo "1111. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 8 8 @a @b @c @d @e @f @g @h @i 1*2 @jkl @m 1*2 @nop 2*1 @q\nr\ns @t @u @v 1*2 @wxy @z 2*1 @A\nB\nC @D @E 2*1 @F\nG\nH @I 1*2 @JKL 2*1 @M\nN\nO @P @Q 2*1 @R\nS\nT 1*2 @UVW @X @Y @Z 2*1 @0\n1\n2 @3 1*2 @456 @7 @8 @9 1*2 @abc @d 1*2 @efg @h @i @j @k @l @m @n @o @p 6 6 @a 1*2 @bcd @e 2*1 @f\ng\nh @i 2*1 @j\nk\nl @m 1*2 @nop 2*1 @q\nr\ns 2*1 @t\nu\nv @w 1*2 @xyz @A 2*1 @B\nC\nD @E 1*2 @FGH 1*2 @IJK 2*1 @L\nM\nN @O @P @Q 1*2 @RST @U @V 4 2 @{0} @{1} @{1} @|{1} @|{1} @({1} @({1} @{0} 1 1 @{2} _ATEOF { set +x $as_echo "$at_srcdir/render.at:697: render-test input --length=70" at_fn_check_prepare_trace "render.at:697" ( $at_check_trace; render-test input --length=70 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-------------------------------------+ |+-----------------+-----------------+| ||+-+-+-+-+-+-+-+-+| +-+---+-+-+-+|| |||a|b|c|d|e|f|g|h|| |a|bcd|e|f|i||| ||+-+-+-+-+-+-+-+-+| +-+-+-+-+g+-+|| |||i|jkl|m|nop|q|t|| |j|m|nop|h|q||| ||+-+-+-+-+-+-+r+-+| |k+-+-+-+-+r||| |||u|v|wxy|z|A|s|D|| |l|t|w|xyz|s||| ||+-+-+-+-+-+B+-+-+| +-+u+-+-+-+-+|| |||E|F|I|JKL|C|M|P|| |A|v|B|E|FGH||| ||+-+G+-+---+-+N+-+| +-+-+C+-+-+-+|| |||Q|H|R|UVW|X|O|Y|| |IJK|D|L|O|P||| ||+-+-+S+-+-+-+-+-+| +-+-+-+M+-+-+|| |||Z|0|T|3|456|7|8|| |Q|RST|N|U|V||| ||+-+1+-+-+-+-+-+-+| +-+---+-+-+-+|| |||9|2|abc|d|efg|h|| || ||+-+-+-+-+-+-+-+-+| || |||i|j|k|l|m|n|o|p|| || ||+-+-+-+-+-+-+-+-+| || |+-----------------+-----------------+| || +-+---+-+-+-+| +-+---+-+-+-+ || || |a|bcd|e|f|i|| |a|bcd|e|f|i| || || +-+-+-+-+g+-+| +-+-+-+-+g+-+ || || |j|m|nop|h|q|| |j|m|nop|h|q| || || |k+-+-+-+-+r|| |k+-+-+-+-+r| || || |l|t|w|xyz|s|| |l|t|w|xyz|s| || || +-+u+-+-+-+-+| +-+u+-+-+-+-+ || || |A|v|B|E|FGH|| |A|v|B|E|FGH| || || +-+-+C+-+-+-+| +-+-+C+-+-+-+ || || |IJK|D|L|O|P|| |IJK|D|L|O|P| || || +-+-+-+M+-+-+| +-+-+-+M+-+-+ || || |Q|RST|N|U|V|| |Q|RST|N|U|V| || || +-+---+-+-+-+| +-+---+-+-+-+ || |+-----------------+-----------------+| || +-+---+-+-+-+ |+-+---+-+-+-+ || || |a|bcd|e|f|i| ||a|bcd|e|f|i| || || +-+-+-+-+g+-+ |+-+-+-+-+g+-+ || || |j|m|nop|h|q| ||j|m|nop|h|q| || || |k+-+-+-+-+r| ||k+-+-+-+-+r| || || |l|t|w|xyz|s| ||l|t|w|xyz|s| || || +-+u+-+-+-+-+ |+-+u+-+-+-+-+ || || |A|v|B|E|FGH| ||A|v|B|E|FGH| || || +-+-+C+-+-+-+ |+-+-+C+-+-+-+ || || |IJK|D|L|O|P| ||IJK|D|L|O|P| || || +-+-+-+M+-+-+ |+-+-+-+M+-+-+ || || |Q|RST|N|U|V| ||Q|RST|N|U|V| || || +-+---+-+-+-+ |+-+---+-+-+-+ || |+-----------------+-----------------+| ||+-+---+-+-+-+ |+-+-+-+-+-+-+-+-+|| |||a|bcd|e|f|i| ||a|b|c|d|e|f|g|h||| ||+-+-+-+-+g+-+ |+-+-+-+-+-+-+-+-+|| |||j|m|nop|h|q| ||i|jkl|m|nop|q|t||| |||k+-+-+-+-+r| |+-+-+-+-+-+-+r+-+|| |||l|t|w|xyz|s| ||u|v|wxy|z|A|s|D||| ||+-+u+-+-+-+-+ |+-+-+-+-+-+B+-+-+|| |||A|v|B|E|FGH| ||E|F|I|JKL|C|M|P||| ||+-+-+C+-+-+-+ |+-+G+-+---+-+N+-+|| |||IJK|D|L|O|P| ||Q|H|R|UVW|X|O|Y||| ||+-+-+-+M+-+-+ |+-+-+S+-+-+-+-+-+|| |||Q|RST|N|U|V| ||Z|0|T|3|456|7|8||| ||+-+---+-+-+-+ |+-+1+-+-+-+-+-+-+|| || ||9|2|abc|d|efg|h||| || |+-+-+-+-+-+-+-+-+|| || ||i|j|k|l|m|n|o|p||| || |+-+-+-+-+-+-+-+-+|| |+-----------------+-----------------+| +-------------------------------------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:697" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1111 #AT_START_1112 at_fn_group_banner 1112 'render.at:770' \ "breaking row of many small cells" " " 138 at_xfail=no ( $as_echo "1112. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 50 @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @18 @19 @20 @21 @22 @23 @24 @25 @26 @27 @28 @29 @30 @31 @32 @33 @34 @35 @36 @37 @38 @39 @40 @41 @42 @43 @44 @45 @46 @47 @48 @49 @50 _ATEOF { set +x $as_echo "$at_srcdir/render.at:776: render-test input" at_fn_check_prepare_trace "render.at:776" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29| +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:776" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:785: render-test input -o mb0 --min-break=0" at_fn_check_prepare_trace "render.at:785" ( $at_check_trace; render-test input -o mb0 --min-break=0 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29| +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:785" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1112 #AT_START_1113 at_fn_group_banner 1113 'render.at:796' \ "breaking row of many small cells, with headers" " " 138 at_xfail=no ( $as_echo "1113. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 54 2 2 @ha @hb @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @18 @19 @20 @21 @22 @23 @24 @25 @26 @27 @28 @29 @30 @31 @32 @33 @34 @35 @36 @37 @38 @39 @40 @41 @42 @43 @44 @45 @46 @47 @48 @49 @50 @hc @hd _ATEOF { set +x $as_echo "$at_srcdir/render.at:807: render-test input" at_fn_check_prepare_trace "render.at:807" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |ha|hb|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|hc|hd| +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |ha|hb|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|hc|hd| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+ |ha|hb|48|49|50|hc|hd| +--+--+--+--+--+--+--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:807" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:820: render-test -o mb0 --min-break=0 input" at_fn_check_prepare_trace "render.at:820" ( $at_check_trace; render-test -o mb0 --min-break=0 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |ha|hb|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|hc|hd| +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |ha|hb|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|hc|hd| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+ |ha|hb|48|49|50|hc|hd| +--+--+--+--+--+--+--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:820" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1113 #AT_START_1114 at_fn_group_banner 1114 'render.at:835' \ "breaking row of many medium-size cells" " " 138 at_xfail=no ( $as_echo "1114. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 50 @cell 1 @cell 2 @cell 3 @cell 4 @cell 5 @cell 6 @cell 7 @cell 8 @cell 9 @cell 10 @cell 11 @cell 12 @cell 13 @cell 14 @cell 15 @cell 16 @cell 17 @cell 18 @cell 19 @cell 20 @cell 21 @cell 22 @cell 23 @cell 24 @cell 25 @cell 26 @cell 27 @cell 28 @cell 29 @cell 30 @cell 31 @cell 32 @cell 33 @cell 34 @cell 35 @cell 36 @cell 37 @cell 38 @cell 39 @cell 40 @cell 41 @cell 42 @cell 43 @cell 44 @cell 45 @cell 46 @cell 47 @cell 48 @cell 49 @cell 50 _ATEOF { set +x $as_echo "$at_srcdir/render.at:841: render-test input" at_fn_check_prepare_trace "render.at:841" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell| | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell| | 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell| | 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45| +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+ |cell|cell|cell|cell|cell| | 46| 47| 48| 49| 50| +----+----+----+----+----+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:841" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:862: render-test -o mb0 --min-break=0 input" at_fn_check_prepare_trace "render.at:862" ( $at_check_trace; render-test -o mb0 --min-break=0 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cel | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 1 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-- l|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce 6| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-- --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+- ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|c 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47| --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+- ---+----+----+ ell|cell|cell| 48| 49| 50| ---+----+----+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:862" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1114 #AT_START_1115 at_fn_group_banner 1115 'render.at:885' \ "breaking row of many medium-size cells, with headers" "" 138 at_xfail=no ( $as_echo "1115. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 52 1 1 header1 @cell 1 @cell 2 @cell 3 @cell 4 @cell 5 @cell 6 @cell 7 @cell 8 @cell 9 @cell 10 @cell 11 @cell 12 @cell 13 @cell 14 @cell 15 @cell 16 @cell 17 @cell 18 @cell 19 @cell 20 @cell 21 @cell 22 @cell 23 @cell 24 @cell 25 @cell 26 @cell 27 @cell 28 @cell 29 @cell 30 @cell 31 @cell 32 @cell 33 @cell 34 @cell 35 @cell 36 @cell 37 @cell 38 @cell 39 @cell 40 @cell 41 @cell 42 @cell 43 @cell 44 @cell 45 @cell 46 @cell 47 @cell 48 @cell 49 @cell 50 header2 _ATEOF { set +x $as_echo "$at_srcdir/render.at:894: render-test input" at_fn_check_prepare_trace "render.at:894" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " +----+----+----+----+----+----+----+----+----+----+----+----+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| +----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 | 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| +----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 | 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| +----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 | 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48| +----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+ header1|cell|cell|header2 | 49| 50| +----+----+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:894" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:920: render-test -o mb0 --min-break=0 input" at_fn_check_prepare_trace "render.at:920" ( $at_check_trace; render-test -o mb0 --min-break=0 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " +----+----+----+----+----+----+----+----+----+----+----+----+--+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| | +----+----+----+----+----+----+----+----+----+----+----+----+--+ +--+----+----+----+----+----+----+----+----+----+----+----+----+ header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 |13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| +--+----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+--+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| | +----+----+----+----+----+----+----+----+----+----+----+----+--+ +--+----+----+----+----+----+----+----+----+----+----+----+----+ header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 |38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48| 49| 50| +--+----+----+----+----+----+----+----+----+----+----+----+----+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:920" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1115 #AT_START_1116 at_fn_group_banner 1116 'render.at:943' \ "breaking row of many big narrow cells" " " 138 at_xfail=no ( $as_echo "1116. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 50 @This is cell 1 in a series of 50. @This is cell 2 in a series of 50. @This is cell 3 in a series of 50. @This is cell 4 in a series of 50. @This is cell 5 in a series of 50. @This is cell 6 in a series of 50. @This is cell 7 in a series of 50. @This is cell 8 in a series of 50. @This is cell 9 in a series of 50. @This is cell 10 in a series of 50. @This is cell 11 in a series of 50. @This is cell 12 in a series of 50. @This is cell 13 in a series of 50. @This is cell 14 in a series of 50. @This is cell 15 in a series of 50. @This is cell 16 in a series of 50. @This is cell 17 in a series of 50. @This is cell 18 in a series of 50. @This is cell 19 in a series of 50. @This is cell 20 in a series of 50. @This is cell 21 in a series of 50. @This is cell 22 in a series of 50. @This is cell 23 in a series of 50. @This is cell 24 in a series of 50. @This is cell 25 in a series of 50. @This is cell 26 in a series of 50. @This is cell 27 in a series of 50. @This is cell 28 in a series of 50. @This is cell 29 in a series of 50. @This is cell 30 in a series of 50. @This is cell 31 in a series of 50. @This is cell 32 in a series of 50. @This is cell 33 in a series of 50. @This is cell 34 in a series of 50. @This is cell 35 in a series of 50. @This is cell 36 in a series of 50. @This is cell 37 in a series of 50. @This is cell 38 in a series of 50. @This is cell 39 in a series of 50. @This is cell 40 in a series of 50. @This is cell 41 in a series of 50. @This is cell 42 in a series of 50. @This is cell 43 in a series of 50. @This is cell 44 in a series of 50. @This is cell 45 in a series of 50. @This is cell 46 in a series of 50. @This is cell 47 in a series of 50. @This is cell 48 in a series of 50. @This is cell 49 in a series of 50. @This is cell 50 in a series of 50. _ATEOF { set +x $as_echo "$at_srcdir/render.at:949: render-test input" at_fn_check_prepare_trace "render.at:949" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+------+------+------+------+------+------+------+------+------+------+------+ | This| This| This| This| This| This| This| This| This| This| This| | is| is| is| is| is| is| is| is| is| is| is| |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9| cell| cell| | in a| in a| in a| in a| in a| in a| in a| in a| in a| 10 in| 11 in| |series|series|series|series|series|series|series|series|series| a| a| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series| | | | | | | | | | |of 50.|of 50.| +------+------+------+------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+------+------+------+------+ | This| This| This| This| This| This| This| This| This| This| This| | is| is| is| is| is| is| is| is| is| is| is| | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| | 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in| | a| a| a| a| a| a| a| a| a| a| a| |series|series|series|series|series|series|series|series|series|series|series| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.| +------+------+------+------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+------+------+------+------+ | This| This| This| This| This| This| This| This| This| This| This| | is| is| is| is| is| is| is| is| is| is| is| | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| | 23 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in| | a| a| a| a| a| a| a| a| a| a| a| |series|series|series|series|series|series|series|series|series|series|series| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.| +------+------+------+------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+------+------+------+------+ | This| This| This| This| This| This| This| This| This| This| This| | is| is| is| is| is| is| is| is| is| is| is| | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| | 34 in| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in| | a| a| a| a| a| a| a| a| a| a| a| |series|series|series|series|series|series|series|series|series|series|series| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.| +------+------+------+------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+ | This| This| This| This| This| This| | is| is| is| is| is| is| | cell| cell| cell| cell| cell| cell| | 45 in| 46 in| 47 in| 48 in| 49 in| 50 in| | a| a| a| a| a| a| |series|series|series|series|series|series| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.| +------+------+------+------+------+------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:949" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1000: render-test -o mb0 --min-break=0 input" at_fn_check_prepare_trace "render.at:1000" ( $at_check_trace; render-test -o mb0 --min-break=0 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+------+------+------+------+------+------+------+------+------+------+------+- | This| This| This| This| This| This| This| This| This| This| This| | is| is| is| is| is| is| is| is| is| is| is| |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9| cell| cell| | in a| in a| in a| in a| in a| in a| in a| in a| in a| 10 in| 11 in| |series|series|series|series|series|series|series|series|series| a| a| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|s | | | | | | | | | |of 50.|of 50.|o +------+------+------+------+------+------+------+------+------+------+------+- -----+------+------+------+------+------+------+------+------+------+------+--- This| This| This| This| This| This| This| This| This| This| This| T is| is| is| is| is| is| is| is| is| is| is| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| c 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in| 23 a| a| a| a| a| a| a| a| a| a| a| eries|series|series|series|series|series|series|series|series|series|series|ser f 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of -----+------+------+------+------+------+------+------+------+------+------+--- ---+------+------+------+------+------+------+------+------+------+------+----- his| This| This| This| This| This| This| This| This| This| This| Thi is| is| is| is| is| is| is| is| is| is| is| i ell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cel in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in| 34 i a| a| a| a| a| a| a| a| a| a| a| ies|series|series|series|series|series|series|series|series|series|series|serie 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50 ---+------+------+------+------+------+------+------+------+------+------+----- -+------+------+------+------+------+------+------+------+------+------+------+ s| This| This| This| This| This| This| This| This| This| This| This| s| is| is| is| is| is| is| is| is| is| is| is| l| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| n| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in| 45 in| a| a| a| a| a| a| a| a| a| a| a| a| s|series|series|series|series|series|series|series|series|series|series|series| .|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.| -+------+------+------+------+------+------+------+------+------+------+------+ +------+------+------+------+------+ | This| This| This| This| This| | is| is| is| is| is| | cell| cell| cell| cell| cell| | 46 in| 47 in| 48 in| 49 in| 50 in| | a| a| a| a| a| |series|series|series|series|series| |of 50.|of 50.|of 50.|of 50.|of 50.| +------+------+------+------+------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1000" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1116 #AT_START_1117 at_fn_group_banner 1117 'render.at:1053' \ "breaking 2 rows of many small cells" " " 138 at_xfail=no ( $as_echo "1117. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 2 50 @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @18 @19 @20 @21 @22 @23 @24 @25 @26 @27 @28 @29 @30 @31 @32 @33 @34 @35 @36 @37 @38 @39 @40 @41 @42 @43 @44 @45 @46 @47 @48 @49 @50 @51 @52 @53 @54 @55 @56 @57 @58 @59 @60 @61 @62 @63 @64 @65 @66 @67 @68 @69 @70 @71 @72 @73 @74 @75 @76 @77 @78 @79 @80 @81 @82 @83 @84 @85 @86 @87 @88 @89 @90 @91 @92 @93 @94 @95 @96 @97 @98 @99 @100 _ATEOF { set +x $as_echo "$at_srcdir/render.at:1059: render-test input" at_fn_check_prepare_trace "render.at:1059" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1059" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1072: render-test -o mb0 --min-break=0 input" at_fn_check_prepare_trace "render.at:1072" ( $at_check_trace; render-test -o mb0 --min-break=0 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1072" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1117 #AT_START_1118 at_fn_group_banner 1118 'render.at:1087' \ "breaking 3 rows with many joined cells" " " 138 at_xfail=no ( $as_echo "1118. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 3 49 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W @1 1*2 @2 1*2 @3 1*2 @4 1*2 @5 1*2 @6 1*2 @7 1*2 @8 1*2 @9 1*2 @10 1*2 @11 1*2 @12 1*2 @13 1*2 @14 1*2 @15 1*2 @16 1*2 @17 1*2 @18 1*2 @19 1*2 @20 1*2 @21 1*2 @22 1*2 @23 1*2 @24 1*2 @25 1*2 @26 1*2 @27 1*2 @28 1*2 @29 1*2 @30 1*2 @31 1*2 @32 1*2 @33 1*2 @34 1*2 @35 1*2 @36 1*2 @37 1*2 @38 1*2 @39 1*2 @40 1*2 @41 1*2 @42 1*2 @43 1*2 @44 1*2 @45 1*2 @46 1*2 @47 1*2 @48 1*2 @49 @50 _ATEOF { set +x $as_echo "$at_srcdir/render.at:1097: render-test input" at_fn_check_prepare_trace "render.at:1097" ( $at_check_trace; render-test input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-- N O P Q R S T U V W +---+---+---+---+----+ | 21| 22| 23| 24| 25| +-+-+-+-+-+-+-+-+-+--+ 45| 46| 47| 48| 49|50| --+---+---+---+---+--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1097" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1112: render-test -o mb0 --min-break=0 input" at_fn_check_prepare_trace "render.at:1112" ( $at_check_trace; render-test -o mb0 --min-break=0 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-- N O P Q R S T U V W +---+---+---+---+----+ | 21| 22| 23| 24| 25| +-+-+-+-+-+-+-+-+-+--+ 45| 46| 47| 48| 49|50| --+---+---+---+---+--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1112" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1118 #AT_START_1119 at_fn_group_banner 1119 'render.at:1129' \ "horz break 6x6, joined rows and columns" " " 138 at_xfail=no ( $as_echo "1119. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 6 6 @a 1*2 @bcd @e 2*1 @f\ng\nh @i 2*1 @j\nk\nl @m 1*2 @nop 2*1 @q\nr\ns 2*1 @t\nu\nv @w 1*2 @xyz @A 2*1 @B\nC\nD @E 1*2 @FGH 1*2 @IJK 2*1 @L\nM\nN @O @P @Q 1*2 @RST @U @V _ATEOF cat >expout <<'_ATEOF' +-+-- |a|bc +-+-+ |j|m| |k+-+ |l|t| +-+u| |A|v| +-+-+ |IJK| +-+-+ |Q|RS +-+-- --+-+ cd|e| +-+-+ |nop| +-+-+ |w|xy +-+-+ |B|E| |C+-+ |D|L| +-+M| ST|N| --+-+ +-+-+ |f|i| |g+-+ |h|q| +-+r| yz|s| +-+-+ |FGH| +-+-+ |O|P| +-+-+ |U|V| +-+-+ _ATEOF { set +x $as_echo "$at_srcdir/render.at:1175: render-test --width=6 input" at_fn_check_prepare_trace "render.at:1175" ( $at_check_trace; render-test --width=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1175" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1176: render-test -o mb0 --min-break=0 --width=6 input" at_fn_check_prepare_trace "render.at:1176" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1176" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1119 #AT_START_1120 at_fn_group_banner 1120 'render.at:1179' \ "horz break 6x6, joined rows and columns, left header" "" 138 at_xfail=no ( $as_echo "1120. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 6 6 1 0 0 0 @a 1*2 @bcd @e 2*1 @f\ng\nh @i 2*1 @j\nk\nl @m 1*2 @nop 2*1 @q\nr\ns 2*1 @t\nu\nv @w 1*2 @xyz @A 2*1 @B\nC\nD @E 1*2 @FGH 1*2 @IJK 2*1 @L\nM\nN @O @P @Q 1*2 @RST @U @V _ATEOF cat >expout <<'_ATEOF' +-+---+-+ |a|bcd|e| +-+-+-+-+ |j|m|nop| |k+-+-+-+ |l|t|w|xy +-+u+-+-+ |A|v|B|E| +-+-+C+-+ |IJK|D|L| +-+-+-+M| |Q|RST|N| +-+---+-+ +-+-+-+ |a|f|i| +-+g+-+ |j|h|q| |k+-+r| |l|z|s| +-+-+-+ |A|FGH| +-+-+-+ |K|O|P| +-+-+-+ |Q|U|V| +-+-+-+ _ATEOF { set +x $as_echo "$at_srcdir/render.at:1211: render-test --width=10 input" at_fn_check_prepare_trace "render.at:1211" ( $at_check_trace; render-test --width=10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1211" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1212: render-test -o mb0 --min-break=0 --width=10 input" at_fn_check_prepare_trace "render.at:1212" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1212" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1120 #AT_START_1121 at_fn_group_banner 1121 'render.at:1215' \ "horz break 6x6, joined rows and columns, right header" "" 138 at_xfail=no ( $as_echo "1121. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 6 6 0 1 0 0 @a 1*2 @bcd @e 2*1 @f\ng\nh @i 2*1 @j\nk\nl @m 1*2 @nop 2*1 @q\nr\ns 2*1 @t\nu\nv @w 1*2 @xyz @A 2*1 @B\nC\nD @E 1*2 @FGH 1*2 @IJK 2*1 @L\nM\nN @O @P @Q 1*2 @RST @U @V _ATEOF cat >expout <<'_ATEOF' +-+---+-+ |a|bcd|i| +-+-+-+-+ |j|m|n|q| |k+-+-+r| |l|t|w|s| +-+u+-+-+ |A|v|B|H| +-+-+C+-+ |IJK|D|P| +-+-+-+-+ |Q|RST|V| +-+---+-+ +-+-+-+ |e|f|i| +-+g+-+ op|h|q| +-+-+r| |xyz|s| +-+-+-+ |E|FGH| +-+-+-+ |L|O|P| |M+-+-+ |N|U|V| +-+-+-+ _ATEOF { set +x $as_echo "$at_srcdir/render.at:1247: render-test --width=10 input" at_fn_check_prepare_trace "render.at:1247" ( $at_check_trace; render-test --width=10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1247" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1248: render-test -o mb0 --min-break=0 --width=10 input" at_fn_check_prepare_trace "render.at:1248" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1248" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1121 #AT_START_1122 at_fn_group_banner 1122 'render.at:1251' \ "breaking joined cells too wide for page" " " 138 at_xfail=no ( $as_echo "1122. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 4 6 1*6 @abc def ghi jkl 1*3 @mno pqr 1*3 @stu vwx 1*2 @yzA 1*2 @BCD 1*2 @EFG @H @I @J @K @L @M _ATEOF { set +x $as_echo "$at_srcdir/render.at:1267: render-test --width=10 input" at_fn_check_prepare_trace "render.at:1267" ( $at_check_trace; render-test --width=10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-------- |abc def | +-----+-- | mno| | pqr| +---+-+-+ |yzA|BCD| +-+-+-+-+ |H|I|J|K| +-+-+-+-+ ----+ ghi| jkl| ----+ stu| vwx| +---+ |EFG| +-+-+ |L|M| +-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1267" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1292: render-test -o mb0 --min-break=0 --width=10 input" at_fn_check_prepare_trace "render.at:1292" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-------- |abc def | +-----+-- | mno| | pqr| +---+-+-+ |yzA|BCD| +-+-+-+-+ |H|I|J|K| +-+-+-+-+ ----+ ghi| jkl| ----+ stu| vwx| +---+ |EFG| +-+-+ |L|M| +-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1292" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1122 #AT_START_1123 at_fn_group_banner 1123 'render.at:1319' \ "breaking joined cells much too wide for page" " " 138 at_xfail=no ( $as_echo "1123. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 4 6 1*6 @abc def ghi jkl 1*3 @mno pqr 1*3 @stu vwx 1*2 @yzA 1*2 @BCD 1*2 @EFG @H @I @J @K @L @M _ATEOF { set +x $as_echo "$at_srcdir/render.at:1335: render-test --width=6 input" at_fn_check_prepare_trace "render.at:1335" ( $at_check_trace; render-test --width=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---- |abc | +---- | mn | pq +---+ |yzA| +-+-+ |H|I| +-+-+ ----- def --+-- no| qr| +-+-+ |BCD| +-+-+ |J|K| +-+-+ ----+ ghi| jkl| ----+ stu| vwx| +---+ |EFG| +-+-+ |L|M| +-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1335" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1372: render-test -o mb0 --min-break=0 --width=6 input" at_fn_check_prepare_trace "render.at:1372" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---- |abc | +---- | mn | pq +---+ |yzA| +-+-+ |H|I| +-+-+ ----- def --+-- no| qr| +-+-+ |BCD| +-+-+ |J|K| +-+-+ ----+ ghi| jkl| ----+ stu| vwx| +---+ |EFG| +-+-+ |L|M| +-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1372" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1123 #AT_START_1124 at_fn_group_banner 1124 'render.at:1411' \ "breaking cell too wide for page, no border" " " 138 at_xfail=no ( $as_echo "1124. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 1 abcdefghijklmnopqrstuvwxyz _ATEOF { set +x $as_echo "$at_srcdir/render.at:1417: render-test --width=6 input" at_fn_check_prepare_trace "render.at:1417" ( $at_check_trace; render-test --width=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "abcdef ghijkl mnopqr stuvwx yz " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1417" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1428: render-test -o mb0 --min-break=0 --width=6 input" at_fn_check_prepare_trace "render.at:1428" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "abcdef ghijkl mnopqr stuvwx yz " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1428" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1124 #AT_START_1125 at_fn_group_banner 1125 'render.at:1441' \ "breaking cell too wide for page, with border" " " 138 at_xfail=no ( $as_echo "1125. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 1 @abcdefghijklmnopqrstuvwxyz _ATEOF cat >expout <<'_ATEOF' +----- |abcde +----- ------ fghijk ------ ------ lmnopq ------ ------ rstuvw ------ ---+ xyz| ---+ _ATEOF { set +x $as_echo "$at_srcdir/render.at:1468: render-test --width=6 input" at_fn_check_prepare_trace "render.at:1468" ( $at_check_trace; render-test --width=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1468" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1469: render-test -o mb0 --min-break=0 --width=6 input" at_fn_check_prepare_trace "render.at:1469" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1469" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1125 #AT_START_1126 at_fn_group_banner 1126 'render.at:1472' \ "horz break 8x8 with many 2x2 joins" " " 138 at_xfail=no ( $as_echo "1126. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 8 8 2*2 @abc\ndef\nghi 1*2 @jkl 2*2 @mno\npqr\nstu 1*2 @vwx 2*2 @yzA\nBCD\nEFG 2*2 @HIJ\nKLM\nNOP 3*1 @Q\nR\nS\nT\nU @V 2*1 @W\nX\nY @Z 2*2 @012\n345\n678 @9 2*2 @abc\ndef\nghi 3*1 @j\nk\nl\nm\nn 2*2 @opq\nrst\nuvw 2*2 @xyz\nABC\nDEF 2*1 @G\nH\nI 1*2 @JKL 2*3 @MNOPQ\nRSTUV\nWXYZ0 2*2 @123\n456\n789 1*3 @abcde _ATEOF { set +x $as_echo "$at_srcdir/render.at:1475: render-test --width=8 input" at_fn_check_prepare_trace "render.at:1475" ( $at_check_trace; render-test --width=8 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---+-- |abc|jk |def| |ghi+-- | |yz +-+-+BC |Q|V|EF |R| | |S+-+-+ |T|012| |U|345| | |678| | | | +-+-+-+ |xyz|G| |ABC|H| |DEF|I| | | | +---+-+ |abcde| | | +-----+ --+----+ kl| mno| | pqr| --+ stu| zA| | CD+-+--+ FG|W| Z| |X| | +-+Y+--+ |9| | ab | | | de +-+-+ gh |opq| |rst+--- |uvw| JK | | +---+--+ | MNOPQ| | RSTUV| | WXYZ0| | | +------+ +----+ | vwx| | | +----+ | HIJ| | KLM| | NOP| | | +-+--+ bc| j| ef| k| hi| l| | m| --+ n| KL| | | | +-+--+ | 123| | 456| | 456| | 789| | | +----+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1475" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1547: render-test -o mb0 --min-break=0 --width=8 input" at_fn_check_prepare_trace "render.at:1547" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=8 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---+-- |abc|jk |def| |ghi+-- | |yz +-+-+BC |Q|V|EF |R| | |S+-+-+ |T|012| |U|345| | |678| | | | +-+-+-+ |xyz|G| |ABC|H| |DEF|I| | | | +---+-+ |abcde| | | +-----+ --+----+ kl| mno| | pqr| --+ stu| zA| | CD+-+--+ FG|W| Z| |X| | +-+Y+--+ |9| | ab | | | de +-+-+ gh |opq| |rst+--- |uvw| JK | | +---+--+ | MNOPQ| | RSTUV| | WXYZ0| | | +------+ +----+ | vwx| | | +----+ | HIJ| | KLM| | NOP| | | +-+--+ bc| j| ef| k| hi| l| | m| --+ n| KL| | | | +-+--+ | 123| | 456| | 789| | | +----+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1547" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1126 #AT_START_1127 at_fn_group_banner 1127 'render.at:1622' \ "breaking column of many small cells" " " 139 at_xfail=no ( $as_echo "1127. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 20 1 @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @18 @19 @20 _ATEOF { set +x $as_echo "$at_srcdir/render.at:1628: render-test --length=10 input" at_fn_check_prepare_trace "render.at:1628" ( $at_check_trace; render-test --length=10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--+ | 1| +--+ | 2| +--+ | 3| +--+ | 4| +--+ +--+ | 5| +--+ | 6| +--+ | 7| +--+ | 8| +--+ +--+ | 9| +--+ |10| +--+ |11| +--+ |12| +--+ +--+ |13| +--+ |14| +--+ |15| +--+ |16| +--+ +--+ |17| +--+ |18| +--+ |19| +--+ |20| +--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1628" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1679: render-test -o mb0 --min-break=0 --length=10 input" at_fn_check_prepare_trace "render.at:1679" ( $at_check_trace; render-test -o mb0 --min-break=0 --length=10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--+ | 1| +--+ | 2| +--+ | 3| +--+ | 4| +--+ +--+ | 5| +--+ | 6| +--+ | 7| +--+ | 8| +--+ +--+ | 9| +--+ |10| +--+ |11| +--+ |12| +--+ +--+ |13| +--+ |14| +--+ |15| +--+ |16| +--+ +--+ |17| +--+ |18| +--+ |19| +--+ |20| +--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1679" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1127 #AT_START_1128 at_fn_group_banner 1128 'render.at:1732' \ "breaking column of many small cells, with headers" "" 139 at_xfail=no ( $as_echo "1128. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 17 1 0 0 1 1 @a @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @b _ATEOF { set +x $as_echo "$at_srcdir/render.at:1740: render-test --length=13 input" at_fn_check_prepare_trace "render.at:1740" ( $at_check_trace; render-test --length=13 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--+ | a| +--+ | 1| +--+ | 2| +--+ | 3| +--+ | 4| +--+ | b| +--+ +--+ | a| +--+ | 5| +--+ | 6| +--+ | 7| +--+ | 8| +--+ | b| +--+ +--+ | a| +--+ | 9| +--+ |10| +--+ |11| +--+ |12| +--+ | b| +--+ +--+ | a| +--+ |13| +--+ |14| +--+ |15| +--+ | b| +--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1740" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1795: render-test -o mb0 --min-break=0 --length=13 input" at_fn_check_prepare_trace "render.at:1795" ( $at_check_trace; render-test -o mb0 --min-break=0 --length=13 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+--+ | a| +--+ | 1| +--+ | 2| +--+ | 3| +--+ | 4| +--+ | b| +--+ +--+ | a| +--+ | 5| +--+ | 6| +--+ | 7| +--+ | 8| +--+ | b| +--+ +--+ | a| +--+ | 9| +--+ |10| +--+ |11| +--+ |12| +--+ | b| +--+ +--+ | a| +--+ |13| +--+ |14| +--+ |15| +--+ | b| +--+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1795" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1128 #AT_START_1129 at_fn_group_banner 1129 'render.at:1852' \ "disabling too-big headers" " " 139 at_xfail=no ( $as_echo "1129. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 17 1 0 0 1 1 @a @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @b _ATEOF cat >expout <<'_ATEOF' +--+ | a| +--+ | 1| +--+ | 2| +--+ | 3| +--+ +--+ | 4| +--+ | 5| +--+ | 6| +--+ | 7| +--+ +--+ | 8| +--+ | 9| +--+ |10| +--+ |11| +--+ +--+ |12| +--+ |13| +--+ |14| +--+ |15| +--+ +--+ | b| +--+ _ATEOF { set +x $as_echo "$at_srcdir/render.at:1905: render-test --length=10 input" at_fn_check_prepare_trace "render.at:1905" ( $at_check_trace; render-test --length=10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1905" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:1906: render-test -o mb0 --min-break=0 --length=10 input" at_fn_check_prepare_trace "render.at:1906" ( $at_check_trace; render-test -o mb0 --min-break=0 --length=10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1906" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1129 #AT_START_1130 at_fn_group_banner 1130 'render.at:1909' \ "breaking column of many medium-size cells" " " 139 at_xfail=no ( $as_echo "1130. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 20 1 @top 1\ncell 1\nbottom 1 @top 2\ncell 2\nbottom 2 @top 3\ncell 3\nbottom 3 @top 4\ncell 4\nbottom 4 @top 5\ncell 5\nbottom 5 @top 6\ncell 6\nbottom 6 @top 7\ncell 7\nbottom 7 @top 8\ncell 8\nbottom 8 @top 9\ncell 9\nbottom 9 @top 10\ncell 10\nbottom 10 @top 11\ncell 11\nbottom 11 @top 12\ncell 12\nbottom 12 @top 13\ncell 13\nbottom 13 @top 14\ncell 14\nbottom 14 @top 15\ncell 15\nbottom 15 @top 16\ncell 16\nbottom 16 @top 17\ncell 17\nbottom 17 @top 18\ncell 18\nbottom 18 @top 19\ncell 19\nbottom 19 @top 20\ncell 20\nbottom 20 _ATEOF { set +x $as_echo "$at_srcdir/render.at:1915: render-test --length 10 input" at_fn_check_prepare_trace "render.at:1915" ( $at_check_trace; render-test --length 10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---------+ | top 1| | cell 1| | bottom 1| +---------+ | top 2| | cell 2| | bottom 2| +---------+ +---------+ | top 3| | cell 3| | bottom 3| +---------+ | top 4| | cell 4| | bottom 4| +---------+ +---------+ | top 5| | cell 5| | bottom 5| +---------+ | top 6| | cell 6| | bottom 6| +---------+ +---------+ | top 7| | cell 7| | bottom 7| +---------+ | top 8| | cell 8| | bottom 8| +---------+ +---------+ | top 9| | cell 9| | bottom 9| +---------+ | top 10| | cell 10| |bottom 10| +---------+ +---------+ | top 11| | cell 11| |bottom 11| +---------+ | top 12| | cell 12| |bottom 12| +---------+ +---------+ | top 13| | cell 13| |bottom 13| +---------+ | top 14| | cell 14| |bottom 14| +---------+ +---------+ | top 15| | cell 15| |bottom 15| +---------+ | top 16| | cell 16| |bottom 16| +---------+ +---------+ | top 17| | cell 17| |bottom 17| +---------+ | top 18| | cell 18| |bottom 18| +---------+ +---------+ | top 19| | cell 19| |bottom 19| +---------+ | top 20| | cell 20| |bottom 20| +---------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:1915" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2016: render-test -o mb0 --min-break=0 --length 10 input" at_fn_check_prepare_trace "render.at:2016" ( $at_check_trace; render-test -o mb0 --min-break=0 --length 10 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---------+ | top 1| | cell 1| | bottom 1| +---------+ | top 2| | cell 2| | bottom 2| +---------+ | top 3| | cell 3| | bottom 3| +---------+ | top 4| | cell 4| | bottom 4| +---------+ | top 5| | cell 5| | bottom 5| +---------+ | top 6| | cell 6| | bottom 6| +---------+ | top 7| | cell 7| | bottom 7| +---------+ +---------+ | top 8| | cell 8| | bottom 8| +---------+ | top 9| | cell 9| | bottom 9| +---------+ | top 10| | cell 10| |bottom 10| +---------+ | top 11| | cell 11| |bottom 11| +---------+ | top 12| | cell 12| |bottom 12| +---------+ | top 13| | cell 13| |bottom 13| +---------+ | top 14| | cell 14| |bottom 14| +---------+ +---------+ | top 15| | cell 15| |bottom 15| +---------+ | top 16| | cell 16| |bottom 16| +---------+ | top 17| | cell 17| |bottom 17| +---------+ | top 18| | cell 18| |bottom 18| +---------+ | top 19| | cell 19| |bottom 19| +---------+ | top 20| | cell 20| |bottom 20| +---------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2016" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1130 #AT_START_1131 at_fn_group_banner 1131 'render.at:2111' \ "breaking 3 columns with many joined cells" " " 139 at_xfail=no ( $as_echo "1131. $at_setup_line: testing $at_desc ..." $at_traceon # +--+--+ # a| 1|11| # +--+ab| # b| 2|cd| # |ab+--+ # c|cd|12| # +--+ab| # d| 3|cd| # |ab+--+ # e|cd|13| # +--+ab| # f| 4|cd| # |ab+--+ # g|cd|14| # +--+ab| # h| 5|cd| # |ab+--+ # i|cd|15| # +--+ab| # j| 6|cd| # |ab+--+ # k|cd|16| # +--+ab| # l| 7|cd| # |ab+--+ # m|cd|17| # +--+ab| # n| 8|cd| # |ab+--+ # o|cd|18| # +--+ab| # p| 9|cd| # |ab+--+ # q|cd|19| # +--+ab| # r|10|cd| # |ab+--+ # s|cd|20| # +--+--+ cat >input <<'_ATEOF' 3 19 a b c d e f g h i j k l m n o p q r s @1 1*2 @2\nab\ncd 1*2 @3\nab\ncd 1*2 @4\nab\ncd 1*2 @5\nab\ncd 1*2 @6\nab\ncd 1*2 @7\nab\ncd 1*2 @8\nab\ncd 1*2 @9\nab\ncd 1*2 @10\nab\ncd 1*2 @11\nab\ncd 1*2 @12\nab\ncd 1*2 @13\nab\ncd 1*2 @14\nab\ncd 1*2 @15\nab\ncd 1*2 @16\nab\ncd 1*2 @17\nab\ncd 1*2 @18\nab\ncd 1*2 @19\nab\ncd @20 _ATEOF cat >expout <<'_ATEOF' +--+--+ a| 1|11| +--+ab| b| 2|cd| |ab+--+ |ab+--+ c|cd|12| +--+ab| d| 3|cd| |ab+--+ |ab+--+ e|cd|13| +--+ab| f| 4|cd| |ab+--+ |ab+--+ g|cd|14| +--+ab| h| 5|cd| |ab+--+ |ab+--+ i|cd|15| +--+ab| j| 6|cd| |ab+--+ |ab+--+ k|cd|16| +--+ab| l| 7|cd| |ab+--+ |ab+--+ m|cd|17| +--+ab| n| 8|cd| |ab+--+ |ab+--+ o|cd|18| +--+ab| p| 9|cd| |ab+--+ |ab+--+ q|cd|19| +--+ab| r|10|cd| |ab+--+ |ab+--+ s|cd|20| +--+--+ _ATEOF { set +x $as_echo "$at_srcdir/render.at:2218: render-test --length=6 --transpose input" at_fn_check_prepare_trace "render.at:2218" ( $at_check_trace; render-test --length=6 --transpose input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2218" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2219: render-test -o mb0 --min-break=0 --length=6 --transpose input" at_fn_check_prepare_trace "render.at:2219" ( $at_check_trace; render-test -o mb0 --min-break=0 --length=6 --transpose input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2219" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1131 #AT_START_1132 at_fn_group_banner 1132 'render.at:2223' \ "vert break 6x6, joined rows and columns" " " 139 at_xfail=no ( $as_echo "1132. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 6 6 @a 1*2 @bcd @e 2*1 @f\ng\nh @i 2*1 @j\nk\nl @m 1*2 @nop 2*1 @q\nr\ns 2*1 @t\nu\nv @w 1*2 @xyz @A 2*1 @B\nC\nD @E 1*2 @FGH 1*2 @IJK 2*1 @L\nM\nN @O @P @Q 1*2 @RST @U @V _ATEOF { set +x $as_echo "$at_srcdir/render.at:2226: render-test --length=6 input" at_fn_check_prepare_trace "render.at:2226" ( $at_check_trace; render-test --length=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+---+-+-+-+ |a|bcd|e|f|i| +-+-+-+-+g+-+ |j|m|nop|h|q| |k+-+---+-+r| |k+-+-+---+r| |l|t|w|xyz|s| +-+u+-+-+-+-+ |A|v|B|E|FGH| +-+-+C+-+---+ +---+C+-+-+-+ |IJK|D|L|O|P| +-+-+-+M+-+-+ |Q|RST|N|U|V| +-+---+-+-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2226" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2245: render-test -o mb0 --min-break=0 --length=6 input" at_fn_check_prepare_trace "render.at:2245" ( $at_check_trace; render-test -o mb0 --min-break=0 --length=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+---+-+-+-+ |a|bcd|e|f|i| +-+-+-+-+g+-+ |j|m|nop|h|q| |k+-+---+-+r| |k+-+-+---+r| |l|t|w|xyz|s| +-+u+-+-+-+-+ |A|v|B|E|FGH| +-+-+C+-+---+ +---+C+-+-+-+ |IJK|D|L|O|P| +-+-+-+M+-+-+ |Q|RST|N|U|V| +-+---+-+-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2245" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1132 #AT_START_1133 at_fn_group_banner 1133 'render.at:2266' \ "breaking joined cells too tall for page" " " 139 at_xfail=no ( $as_echo "1133. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 4 6 1*6 @abc\ndef\nghi\njkl\nmno\npqr\nstu\nvwx\nyzA\nBCD\nEFG 1*3 @HIJ\nKLM\nOPQ\nRST\nUVW 1*3 @XYZ\n012\n345\n678\n90a 1*2 @bcd\nefg\nhij 1*2 @klm\nnop\nqrs 1*2 @tuv\nwxy\nzAB @C @D @E @F @G @H _ATEOF { set +x $as_echo "$at_srcdir/render.at:2282: render-test --transpose --length=6 input" at_fn_check_prepare_trace "render.at:2282" ( $at_check_trace; render-test --transpose --length=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---+---+---+-+ |abc|HIJ|bcd|C| |def|KLM|efg+-+ |ghi|OPQ|hij|D| |jkl|RST+---+-+ |jkl|RST+---+-+ |mno|UVW|klm|E| |pqr+---+nop+-+ |stu|XYZ|qrs|F| |vwx|012+---+-+ |vwx|012+---+-+ |yzA|345|tuv|G| |BCD|678|wxy+-+ |EFG|90a|zAB|H| +---+---+---+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2282" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2301: render-test -o mb0 --min-break=0 --transpose --length=6 input" at_fn_check_prepare_trace "render.at:2301" ( $at_check_trace; render-test -o mb0 --min-break=0 --transpose --length=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+---+---+---+-+ |abc|HIJ|bcd|C| |def|KLM|efg+-+ |ghi|OPQ|hij|D| |jkl|RST+---+-+ |jkl|RST+---+-+ |mno|UVW|klm|E| |pqr+---+nop+-+ |stu|XYZ|qrs|F| |vwx|012+---+-+ |vwx|012+---+-+ |yzA|345|tuv|G| |BCD|678|wxy+-+ |EFG|90a|zAB|H| +---+---+---+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2301" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1133 #AT_START_1134 at_fn_group_banner 1134 'render.at:2322' \ "breaking cell too tall for page, no border" " " 139 at_xfail=no ( $as_echo "1134. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 1 abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ _ATEOF { set +x $as_echo "$at_srcdir/render.at:2328: render-test --width=6 --length=6 input" at_fn_check_prepare_trace "render.at:2328" ( $at_check_trace; render-test --width=6 --length=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2328" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2345: render-test -o mb0 --min-break=0 --width=6 --length=6 input" at_fn_check_prepare_trace "render.at:2345" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=6 --length=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo " abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2345" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1134 #AT_START_1135 at_fn_group_banner 1135 'render.at:2364' \ "breaking cell too tall for page, with border" " " 139 at_xfail=no ( $as_echo "1135. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 1 1 @abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ _ATEOF cat >expout <<'_ATEOF' +-----+ | abc| | defg| | hij| | klmn| | opq| | rstu| | vwx| | yz| |ABCDE| |FGH I| | JK| |LMNOP| | QR| | STU| |VWXYZ| +-----+ _ATEOF { set +x $as_echo "$at_srcdir/render.at:2391: render-test --width=7 --length=6 input" at_fn_check_prepare_trace "render.at:2391" ( $at_check_trace; render-test --width=7 --length=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2391" $at_failed && at_fn_log_failure \ "input" $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2392: render-test -o mb0 --min-break=0 --width=7 --length=6 input" at_fn_check_prepare_trace "render.at:2392" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=7 --length=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2392" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1135 #AT_START_1136 at_fn_group_banner 1136 'render.at:2396' \ "breaking nested cell too tall for page" " " 139 at_xfail=no ( $as_echo "1136. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 8 8 @a @b @c @d @e @f @g @h @i 1*2 @jkl @m 1*2 @nop 2*1 @q\nr\ns @t @u @v 1*2 @wxy @z 2*1 @A\nB\nC @D @E 2*1 @F\nG\nH @I 1*2 @JKL 2*1 @M\nN\nO @P @Q 2*1 @R\nS\nT 1*2 @UVW @X @Y @Z 2*1 @0\n1\n2 @3 1*2 @456 @7 @8 @9 1*2 @abc @d 1*2 @efg @h @i @j @k @l @m @n @o @p 6 6 @a 1*2 @bcd @e 2*1 @f\ng\nh @i 2*1 @j\nk\nl @m 1*2 @nop 2*1 @q\nr\ns 2*1 @t\nu\nv @w 1*2 @xyz @A 2*1 @B\nC\nD @E 1*2 @FGH 1*2 @IJK 2*1 @L\nM\nN @O @P @Q 1*2 @RST @U @V 1 2 @{0} @{1} _ATEOF { set +x $as_echo "$at_srcdir/render.at:2404: render-test input --length=10" at_fn_check_prepare_trace "render.at:2404" ( $at_check_trace; render-test input --length=10 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-----------------+-------------+ |+-+-+-+-+-+-+-+-+|+-+---+-+-+-+| ||a|b|c|d|e|f|g|h|||a|bcd|e|f|i|| |+-+-+-+-+-+-+-+-+|+-+-+-+-+g+-+| ||i|jkl|m|nop|q|t|||j|m|nop|h|q|| |+-+-+-+-+-+-+r+-+||k+-+-+-+-+r|| ||u|v|wxy|z|A|s|D|||l|t|w|xyz|s|| |+-+-+-+-+-+B+-+-+|+-+u+-+-+-+-+| ||E|F|I|JKL|C|M|P|||A|v|B|E|FGH|| |+-+G+-+---+-+N+-+|+-+-+C+-+-+-+| ||Q|H|R|UVW|X|O|Y|||IJK|D|L|O|P|| |+-+-+S+-+-+-+-+-+|+-+-+-+M+-+-+| ||Z|0|T|3|456|7|8|||Q|RST|N|U|V|| |+-+1+-+-+-+-+-+-+|+-+---+-+-+-+| ||9|2|abc|d|efg|h|| | |+-+-+-+-+-+-+-+-+| | ||i|j|k|l|m|n|o|p|| | |+-+-+-+-+-+-+-+-+| | +-----------------+-------------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2404" $at_failed && at_fn_log_failure \ "input" $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1136 #AT_START_1137 at_fn_group_banner 1137 'render.at:2430' \ "double break 6x6, joined rows and columns" " " 140 at_xfail=no ( $as_echo "1137. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 6 6 @a 1*2 @bcd @e 2*1 @f\ng\nh @i 2*1 @j\nk\nl @m 1*2 @nop 2*1 @q\nr\ns 2*1 @t\nu\nv @w 1*2 @xyz @A 2*1 @B\nC\nD @E 1*2 @FGH 1*2 @IJK 2*1 @L\nM\nN @O @P @Q 1*2 @RST @U @V _ATEOF { set +x $as_echo "$at_srcdir/render.at:2433: render-test --width=6 --length=6 input" at_fn_check_prepare_trace "render.at:2433" ( $at_check_trace; render-test --width=6 --length=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-- |a|bc +-+-+ |j|m| |k+-+ |k+-+ |l|t| +-+u| |A|v| +-+-+ +---+ |IJK| +-+-+ |Q|RS +-+-- --+-+ cd|e| +-+-+ |nop| +---+ +-+-- |w|xy +-+-+ |B|E| |C+-+ |C+-+ |D|L| +-+M| ST|N| --+-+ +-+-+ |f|i| |g+-+ |h|q| +-+r| --+r| yz|s| +-+-+ |FGH| +---+ +-+-+ |O|P| +-+-+ |U|V| +-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2433" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2488: render-test -o mb0 --min-break=0 --width=6 --length=6 input" at_fn_check_prepare_trace "render.at:2488" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=6 --length=6 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-- |a|bc +-+-+ |j|m| |k+-+ |k+-+ |l|t| +-+u| |A|v| +-+-+ +---+ |IJK| +-+-+ |Q|RS +-+-- --+-+ cd|e| +-+-+ |nop| +---+ +-+-- |w|xy +-+-+ |B|E| |C+-+ |C+-+ |D|L| +-+M| ST|N| --+-+ +-+-+ |f|i| |g+-+ |h|q| +-+r| --+r| yz|s| +-+-+ |FGH| +---+ +-+-+ |O|P| +-+-+ |U|V| +-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2488" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1137 #AT_START_1138 at_fn_group_banner 1138 'render.at:2545' \ "double break 8x8, with joins, left and right headers" "" 140 at_xfail=no ( $as_echo "1138. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 8 8 1 1 0 0 @a @b @c @d @e @f @g @h @i 1*2 @jkl @m 1*2 @nop 2*1 @q\nr\ns @t @u @v 1*2 @wxy @z 2*1 @A\nB\nC @D @E 2*1 @F\nG\nH @I 1*2 @JKL 2*1 @M\nN\nO @P @Q 2*1 @R\nS\nT 1*2 @UVW @X @Y @Z 2*1 @0\n1\n2 @3 1*2 @456 @7 @8 @9 1*2 @abc @d 1*2 @efg @h @i @j @k @l @m @n @o @p _ATEOF { set +x $as_echo "$at_srcdir/render.at:2548: render-test input --width=14 --length=14" at_fn_check_prepare_trace "render.at:2548" ( $at_check_trace; render-test input --width=14 --length=14 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |i|jkl|m|n|t| +-+-+-+-+-+-+ |u|v|wxy|z|D| +-+-+-+-+-+-+ |E|F|I|JKL|P| +-+G+-+---+-+ |Q|H|R|UVW|Y| +-+-+S+-+-+-+ |Z|0|T|3|4|8| +-+1+-+-+-+-+ +-+1+---+-+-+ |9|2|abc|d|h| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |i|op|q|t| +-+--+r+-+ |u| A|s|D| +-+ B+-+-+ +-+ B+-+-+ |E| C|M|P| +-+--+N+-+ |Q| X|O|Y| +-+--+-+-+ |Z|56|7|8| +-+--+-+-+ |9| efg|h| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2548" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2589: render-test -o mb0 --min-break=0 input --width=14 --length=14" at_fn_check_prepare_trace "render.at:2589" ( $at_check_trace; render-test -o mb0 --min-break=0 input --width=14 --length=14 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |i|jkl|m|n|t| +-+-+-+-+-+-+ |u|v|wxy|z|D| +-+-+-+-+-+-+ |E|F|I|JKL|P| +-+G+-+---+-+ |Q|H|R|UVW|Y| +-+-+S+-+-+-+ |Z|0|T|3|4|8| +-+1+-+-+-+-+ +-+1+---+-+-+ |9|2|abc|d|h| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |i|op|q|t| +-+--+r+-+ |u| A|s|D| +-+ B+-+-+ +-+ B+-+-+ |E| C|M|P| +-+--+N+-+ |Q| X|O|Y| +-+--+-+-+ |Z|56|7|8| +-+--+-+-+ |9| efg|h| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2589" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1138 #AT_START_1139 at_fn_group_banner 1139 'render.at:2632' \ "double break 8x8, with joins, top and bottom headers" "" 140 at_xfail=no ( $as_echo "1139. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 8 8 0 0 1 1 @a @b @c @d @e @f @g @h @i 1*2 @jkl @m 1*2 @nop 2*1 @q\nr\ns @t @u @v 1*2 @wxy @z 2*1 @A\nB\nC @D @E 2*1 @F\nG\nH @I 1*2 @JKL 2*1 @M\nN\nO @P @Q 2*1 @R\nS\nT 1*2 @UVW @X @Y @Z 2*1 @0\n1\n2 @3 1*2 @456 @7 @8 @9 1*2 @abc @d 1*2 @efg @h @i @j @k @l @m @n @o @p _ATEOF { set +x $as_echo "$at_srcdir/render.at:2635: render-test input --width=14 --length=14" at_fn_check_prepare_trace "render.at:2635" ( $at_check_trace; render-test input --width=14 --length=14 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-+-+-+-+-+ |a|b|c|d|e|f| +-+-+-+-+-+-+ |i|jkl|m|nop| +-+-+-+-+-+-+ |u|v|wxy|z|A| +-+-+-+-+-+B| |E|F|I|JKL|C| +-+G+-+---+-+ |Q|H|R|UVW|X| +-+-+-+-+-+-+ |i|j|k|l|m|n| +-+-+-+-+-+-+ +-+-+-+-+-+-+ |a|b|c|d|e|f| +-+-+-+-+-+-+ |Z|0|S|3|456| | |1|T| | | +-+2+-+-+-+-+ |9| |abc|d|ef +-+-+-+-+-+-+ |i|j|k|l|m|n| +-+-+-+-+-+-+ +-+-+ |g|h| +-+-+ |q|t| |r+-+ |s|D| +-+-+ |M|P| |N+-+ |O|Y| +-+-+ |o|p| +-+-+ +-+-+ |g|h| +-+-+ |7|8| | | | +-+-+ fg|h| +-+-+ |o|p| +-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2635" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2686: render-test -o mb0 --min-break=0 input --width=14 --length=14" at_fn_check_prepare_trace "render.at:2686" ( $at_check_trace; render-test -o mb0 --min-break=0 input --width=14 --length=14 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-+-+-+-+-+ |a|b|c|d|e|f| +-+-+-+-+-+-+ |i|jkl|m|nop| +-+-+-+-+-+-+ |u|v|wxy|z|A| +-+-+-+-+-+B| |E|F|I|JKL|C| +-+G+-+---+-+ |Q|H|R|UVW|X| +-+-+-+-+-+-+ |i|j|k|l|m|n| +-+-+-+-+-+-+ +-+-+-+-+-+-+ |a|b|c|d|e|f| +-+-+-+-+-+-+ |Z|0|S|3|456| | |1|T| | | +-+2+-+-+-+-+ |9| |abc|d|ef +-+-+-+-+-+-+ |i|j|k|l|m|n| +-+-+-+-+-+-+ +-+-+ |g|h| +-+-+ |q|t| |r+-+ |s|D| +-+-+ |M|P| |N+-+ |O|Y| +-+-+ |o|p| +-+-+ +-+-+ |g|h| +-+-+ |7|8| | | | +-+-+ fg|h| +-+-+ |o|p| +-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2686" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1139 #AT_START_1140 at_fn_group_banner 1140 'render.at:2739' \ "double break 8x8, with joins, all headers" " " 140 at_xfail=no ( $as_echo "1140. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 8 8 1 1 1 1 @a @b @c @d @e @f @g @h @i 1*2 @jkl @m 1*2 @nop 2*1 @q\nr\ns @t @u @v 1*2 @wxy @z 2*1 @A\nB\nC @D @E 2*1 @F\nG\nH @I 1*2 @JKL 2*1 @M\nN\nO @P @Q 2*1 @R\nS\nT 1*2 @UVW @X @Y @Z 2*1 @0\n1\n2 @3 1*2 @456 @7 @8 @9 1*2 @abc @d 1*2 @efg @h @i @j @k @l @m @n @o @p _ATEOF { set +x $as_echo "$at_srcdir/render.at:2742: render-test input --width=14 --length=14" at_fn_check_prepare_trace "render.at:2742" ( $at_check_trace; render-test input --width=14 --length=14 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |i|jkl|m|n|t| +-+-+-+-+-+-+ |u|v|wxy|z|D| +-+-+-+-+-+-+ |E|F|I|JKL|P| +-+G+-+---+-+ |Q|H|R|UVW|Y| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |Z|0|S|3|4|8| | |1|T| | | | +-+2+-+-+-+-+ |9| |abc|d|h| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |i|op|q|t| +-+--+r+-+ |u| A|s|D| +-+ B+-+-+ |E| C|M|P| +-+--+N+-+ |Q| X|O|Y| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |Z|56|7|8| | | | | | +-+--+-+-+ |9| efg|h| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2742" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2793: render-test -o mb0 --min-break=0 input --width=14 --length=14" at_fn_check_prepare_trace "render.at:2793" ( $at_check_trace; render-test -o mb0 --min-break=0 input --width=14 --length=14 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |i|jkl|m|n|t| +-+-+-+-+-+-+ |u|v|wxy|z|D| +-+-+-+-+-+-+ |E|F|I|JKL|P| +-+G+-+---+-+ |Q|H|R|UVW|Y| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |Z|0|S|3|4|8| | |1|T| | | | +-+2+-+-+-+-+ |9| |abc|d|h| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |i|op|q|t| +-+--+r+-+ |u| A|s|D| +-+ B+-+-+ |E| C|M|P| +-+--+N+-+ |Q| X|O|Y| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |Z|56|7|8| | | | | | +-+--+-+-+ |9| efg|h| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2793" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1140 #AT_START_1141 at_fn_group_banner 1141 'render.at:2846' \ "double break joined cells too big for page" " " 140 at_xfail=no ( $as_echo "1141. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 7 7 @a @b @c @d @e @f @g @h 6*6 @The MISSING subcommand determines the handling of missing variables. If INCLUDE is set, then user‑missing values are included in the calculations. If NOINCLUDE is set, which is the default, user‑missing values are excluded. @i @j @k @l @m _ATEOF { set +x $as_echo "$at_srcdir/render.at:2864: render-test --width=15 --length=15 input" at_fn_check_prepare_trace "render.at:2864" ( $at_check_trace; render-test --width=15 --length=15 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+--+--+---+ |a| b| c| d| +-+--+--+---+ |h| The | | su +-+ determ |i| han | |missing va | |If INCLUDE +-+ then user |j| va | | include | | calculati +-+ NOINCLUDE +-+ NOINCLUDE |k| whic | | | | user +-+ va |l| e | | | | +-+ |m| | | +-+---------- +--+--+--+ | e| f| g| +--+--+--+ e MISSING| ubcommand| mines the| ndling of| ariables.| E is set,| r‑missing| alues are| ed in the| ions. If| E is set,| E is set,| ch is the| default,| r‑missing| alues are| excluded.| | | | | | ---------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2864" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/render.at:2921: render-test -o mb0 --min-break=0 --width=15 --length=15 input" at_fn_check_prepare_trace "render.at:2921" ( $at_check_trace; render-test -o mb0 --min-break=0 --width=15 --length=15 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+--+--+---+- |a| b| c| d| +-+--+--+---+- |h| The | | sub +-+ determi |i| hand | |missing var | |If INCLUDE +-+ then user‑ |j| val | | included | | calculatio +-+ NOINCLUDE |k| which | | d | | user‑ +-+ val |l| ex | | | | +-+ |m| | | +-+----------- -+--+--+ e| f| g| -+--+--+ MISSING| command| nes the| ling of| iables.| is set,| missing| ues are| in the| ns. If| is set,| is the| efault,| missing| ues are| cluded.| | | | | | -------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2921" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1141 #AT_START_1142 at_fn_group_banner 1142 'render.at:2983' \ "LIST puts space between columns" " " 141 at_xfail=no ( $as_echo "1142. $at_setup_line: testing $at_desc ..." $at_traceon cat >list.sps <<'_ATEOF' DATA LIST LIST NOTABLE /x y z (F1.0). BEGIN DATA. 1 2 3 4 5 6 7 8 9 END DATA. LIST. _ATEOF { set +x $as_echo "$at_srcdir/render.at:2994: pspp list.sps" at_fn_check_prepare_trace "render.at:2994" ( $at_check_trace; pspp list.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Data List x y z ----- 1 2 3 4 5 6 7 8 9 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:2994" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1142 #AT_START_1143 at_fn_group_banner 1143 'render.at:3008' \ "ASCII driver renders end of line spaces reasonably" "" 141 at_xfail=no ( $as_echo "1143. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 3 3 @a @b @xyzzy @d @e @f @g @h @i _ATEOF { set +x $as_echo "$at_srcdir/render.at:3022: render-test --width=15 --length=15 input" at_fn_check_prepare_trace "render.at:3022" ( $at_check_trace; render-test --width=15 --length=15 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-+-+-----+ |a|b|xyzzy| +-+-+-----+ |d|e| f| +-+-+-----+ |g|h| i| +-+-+-----+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:3022" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1143 #AT_START_1144 at_fn_group_banner 1144 'render.at:3046' \ "multiple spanned cells all contribute to dimensions" "" 141 at_xfail=no ( $as_echo "1144. $at_setup_line: testing $at_desc ..." $at_traceon cat >input <<'_ATEOF' 2 2 1*2 @A long text string. 1*2 @shorter _ATEOF { set +x $as_echo "$at_srcdir/render.at:3053: render-test --width=30 --length=15 input" at_fn_check_prepare_trace "render.at:3053" ( $at_check_trace; render-test --width=30 --length=15 input ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "+-------------------+ |A long text string.| +-------------------+ | shorter| +-------------------+ " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/render.at:3053" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1144 #AT_START_1145 at_fn_group_banner 1145 'tables.at:19' \ "OUTPUT precision" " " 142 at_xfail=no ( $as_echo "1145. $at_setup_line: testing $at_desc ..." $at_traceon cat >prec.sps <<'_ATEOF' data list notable list /A * B *. begin data. 2.0 3.0 1.0 2.0 2.0 4.5 2.0 4.5 3.0 6.0 end data. OUTPUT MODIFY /SELECT TABLES /TABLECELLS SELECT = [ SIGNIFICANCE ] FORMAT = F.3. t-test /PAIRS a with b (PAIRED). OUTPUT MODIFY /SELECT TABLES /TABLECELLS SELECT = [ SIGNIFICANCE ] FORMAT = F12.5. t-test /PAIRS a with b (PAIRED). _ATEOF { set +x $as_echo "$at_srcdir/tables.at:47: pspp -O format=csv prec.sps" at_fn_check_prepare_trace "tables.at:47" ( $at_check_trace; pspp -O format=csv prec.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,A,2.00,5,.71,.32 ,B,4.00,5,1.54,.69 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,A & B,5,.92,.028 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.009 Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,A,2.00,5,.71,.32 ,B,4.00,5,1.54,.69 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,A & B,5,.92,.02801 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.00877 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/tables.at:47" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1145 #AT_START_1146 at_fn_group_banner 1146 'tables.at:84' \ "OUTPUT crash" " " 142 at_xfail=no ( $as_echo "1146. $at_setup_line: testing $at_desc ..." $at_traceon cat >prec.sps <<'_ATEOF' data list notable list /A * B *. begin data. 2.0 3.0 1.0 2.0 end data. OUTPUT MODIFY /SELECT TABLES /TABLECELLS SELECT = [ SIGNIFICANCE ] "FORMAT = F/1. t-test /PAIRS a with b (PAIRED). _ATEOF { set +x $as_echo "$at_srcdir/tables.at:101: pspp -O format=csv prec.sps" at_fn_check_prepare_trace "tables.at:101" ( $at_check_trace; pspp -O format=csv prec.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 1 $at_status "$at_srcdir/tables.at:101" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1146 #AT_START_1147 at_fn_group_banner 1147 'main.at:19' \ "nonexistent syntax file crash" " " 143 at_xfail=no ( $as_echo "1147. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/main.at:20: pspp nonexistent" at_fn_check_prepare_trace "main.at:20" ( $at_check_trace; pspp nonexistent ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "error: Opening \`nonexistent': No such file or directory. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/main.at:20" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1147 #AT_START_1148 at_fn_group_banner 1148 'main.at:25' \ "SIGTERM yields clean shutdown" " " 143 at_xfail=no ( $as_echo "1148. $at_setup_line: testing $at_desc ..." $at_traceon cat >main.sps <<'_ATEOF' INPUT PROGRAM. COMPUTE x = x + 1. DO IF x = 10000. END CASE. ELSE IF x < 0. END FILE. END IF. END INPUT PROGRAM. EXECUTE. _ATEOF { set +x $as_echo "$at_srcdir/main.at:37: pspp main.sps & sleep 1; kill \$!; wait \$!" at_fn_check_prepare_dynamic "pspp main.sps & sleep 1; kill $!; wait $!" "main.at:37" ( $at_check_trace; pspp main.sps & sleep 1; kill $!; wait $! ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 143 $at_status "$at_srcdir/main.at:37" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1148 #AT_START_1149 at_fn_group_banner 1149 'main.at:40' \ "SIGSEGV yields error report" " " 143 at_xfail=no ( $as_echo "1149. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/main.at:41: echo 'host command=[\"kill -SEGV \$PPID\"].' | pspp -O format=csv" at_fn_check_prepare_notrace 'a shell pipeline' "main.at:41" ( $at_check_trace; echo 'host command=["kill -SEGV $PPID"].' | pspp -O format=csv ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; tee stderr <"$at_stderr" at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 139 $at_status "$at_srcdir/main.at:41" $at_failed && at_fn_log_failure $at_traceon; } cat > expout <>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/main.at:55" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1149 #AT_START_1150 at_fn_group_banner 1150 'main.at:60' \ "argument parsing" " " 143 at_xfail=no ( $as_echo "1150. $at_setup_line: testing $at_desc ..." $at_traceon cat >main.sps <<'_ATEOF' ECHO 'This is a test'. FINISH. _ATEOF { set +x $as_echo "$at_srcdir/main.at:67: pspp --syntax=enhanced main.sps" at_fn_check_prepare_trace "main.at:67" ( $at_check_trace; pspp --syntax=enhanced main.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" at_fn_check_status 0 $at_status "$at_srcdir/main.at:67" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1150 #AT_START_1151 at_fn_group_banner 1151 'syntax-gen.at:19' \ "Syntax Generation - printf like" " " 144 at_xfail=no ( $as_echo "1151. $at_setup_line: testing $at_desc ..." $at_traceon { set +x $as_echo "$at_srcdir/syntax-gen.at:21: \$abs_top_builddir/tests/ui/syntax-gen-test" at_fn_check_prepare_dynamic "$abs_top_builddir/tests/ui/syntax-gen-test" "syntax-gen.at:21" ( $at_check_trace; $abs_top_builddir/tests/ui/syntax-gen-test ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "A simple string: Hello worldEND A syntax string: \"Hello world\"END A syntax string containing \": 'here\"is the quote'END A syntax string containing non-printables: X'41204374726C4C0C63686172'END An integer: 98765END A floating point number: 3.142END A floating point number with default precision: 1.234000END A floating point number with given precision: 1.23399999999999998579END A literal % and finally a \"concatination\" of 6 different 20.309000 examples 23.09 of 100% conversions. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/syntax-gen.at:21" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1151 #AT_START_1152 at_fn_group_banner 1152 'pspp-convert.at:3' \ "pspp-convert crash when output cannot be opened" "" 145 at_xfail=no ( $as_echo "1152. $at_setup_line: testing $at_desc ..." $at_traceon cat >sysfile.sps <<'_ATEOF' DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. SAVE OUTFILE='data.sav'. _ATEOF { set +x $as_echo "$at_srcdir/pspp-convert.at:12: pspp -O format=csv sysfile.sps" at_fn_check_prepare_trace "pspp-convert.at:12" ( $at_check_trace; pspp -O format=csv sysfile.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pspp-convert.at:12" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/pspp-convert.at:14: pspp-convert data.sav nonexistent/output.sav" at_fn_check_prepare_trace "pspp-convert.at:14" ( $at_check_trace; pspp-convert data.sav nonexistent/output.sav ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; tee stderr <"$at_stderr" at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 1 $at_status "$at_srcdir/pspp-convert.at:14" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/pspp-convert.at:15: grep '[eE]rror opening' stderr" at_fn_check_prepare_trace "pspp-convert.at:15" ( $at_check_trace; grep '[eE]rror opening' stderr ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Error opening \`nonexistent/output.sav' for writing as a system file: No such file or directory. pspp-convert: nonexistent/output.sav: error opening output file " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/pspp-convert.at:15" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1152 #AT_START_1153 at_fn_group_banner 1153 'perl-module.at:33' \ "Perl create system file" " " 146 at_xfail=no ( $as_echo "1153. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:34" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:34" cat >test.pl <<'_ATEOF' use warnings; use strict; use PSPP; my $d = PSPP::Dict->new(); die "dictionary creation" if !ref $d; die if $d->get_var_cnt () != 0; $d->set_label ("My Dictionary"); $d->set_documents ("These Documents"); # Tests for variable creation my $var0 = PSPP::Var->new ($d, "le"); die "trap illegal variable name" if ref $var0; die if $d->get_var_cnt () != 0; $var0 = PSPP::Var->new ($d, "legal"); die "accept legal variable name" if !ref $var0; die if $d->get_var_cnt () != 1; my $var1 = PSPP::Var->new ($d, "money", (fmt=>PSPP::Fmt::DOLLAR, width=>4, decimals=>2) ); die "cappet valid format" if !ref $var1; die if $d->get_var_cnt () != 2; $d->set_weight ($var1); my $sysfile = PSPP::Sysfile->new ('testfile.sav', $d); die "create sysfile object" if !ref $sysfile; $sysfile->close (); _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:70: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib test.pl" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:70" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib test.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:70" $at_failed && at_fn_log_failure $at_traceon; } cat >dump-dict.sps <<'_ATEOF' GET FILE='testfile.sav'. DISPLAY FILE LABEL. DISPLAY DOCUMENTS. DISPLAY DICTIONARY. SHOW WEIGHT. _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:78: pspp -O format=csv dump-dict.sps" at_fn_check_prepare_trace "perl-module.at:78" ( $at_check_trace; pspp -O format=csv dump-dict.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "File label: My Dictionary Documents in the active dataset: These Documents Variable,Description,Position legal,Format: F9.2,1 money,Format: DOLLAR6.2,2 dump-dict.sps:5: note: SHOW: WEIGHT is money. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:78" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1153 #AT_START_1154 at_fn_group_banner 1154 'perl-module.at:93' \ "Perl writing cases to system files" " " 146 at_xfail=no ( $as_echo "1154. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:94" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:94" cat >test.pl <<'_ATEOF' use warnings; use strict; use PSPP; my $d = PSPP::Dict->new(); PSPP::Var->new ($d, "id", ( fmt=>PSPP::Fmt::F, width=>2, decimals=>0 ) ); PSPP::Var->new ($d, "name", ( fmt=>PSPP::Fmt::A, width=>20, ) ); $d->set_documents ("This should not appear"); $d->clear_documents (); $d->add_document ("This is a document line"); $d->set_label ("This is the file label"); # Check that we can write cases to system files. my $sysfile = PSPP::Sysfile->new ("testfile.sav", $d); my $res = $sysfile->append_case ( [34, "frederick"]); die "append case" if !$res; $res = $sysfile->append_case ( [34, "frederick", "extra"]); die "append case with too many variables" if $res; $sysfile->close (); # Check that sysfiles are closed properly automaticallly in the destructor. my $sysfile2 = PSPP::Sysfile->new ("testfile2.sav", $d); $res = $sysfile2->append_case ( [21, "wheelbarrow"]); die "append case 2" if !$res; $res = $sysfile->append_case ( [34, "frederick", "extra"]); die "append case with too many variables" if $res; # Don't close. We want to test that the destructor does that. _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:141: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib test.pl" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:141" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib test.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:141" $at_failed && at_fn_log_failure $at_traceon; } cat >dump-dicts.sps <<'_ATEOF' GET FILE='testfile.sav'. DISPLAY DICTIONARY. DISPLAY FILE LABEL. DISPLAY DOCUMENTS. LIST. GET FILE='testfile2.sav'. DISPLAY DICTIONARY. DISPLAY FILE LABEL. DISPLAY DOCUMENTS. LIST. _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:155: pspp -O format=csv dump-dicts.sps" at_fn_check_prepare_trace "perl-module.at:155" ( $at_check_trace; pspp -O format=csv dump-dicts.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position id,Format: F2.0,1 name,Format: A20,2 File label: This is the file label Documents in the active dataset: This is a document line Table: Data List id,name 34,frederick Variable,Description,Position id,Format: F2.0,1 name,Format: A20,2 File label: This is the file label Documents in the active dataset: This is a document line Table: Data List id,name 21,wheelbarrow " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:155" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1154 #AT_START_1155 at_fn_group_banner 1155 'perl-module.at:186' \ "Perl write variable parameters" " " 146 at_xfail=no ( $as_echo "1155. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:187" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:187" cat >test.pl <<'_ATEOF' use warnings; use strict; use PSPP; my $dict = PSPP::Dict->new(); die "dictionary creation" if !ref $dict; my $int = PSPP::Var->new ($dict, "integer", (width=>8, decimals=>0) ); $int->set_label ("My Integer"); $int->add_value_label (99, "Silly"); $int->clear_value_labels (); $int->add_value_label (0, "Zero"); $int->add_value_label (1, "Unity"); $int->add_value_label (2, "Duality"); my $str = PSPP::Var->new ($dict, "string", (fmt=>PSPP::Fmt::A, width=>8) ); $str->set_label ("My String"); $str->add_value_label ("xx", "foo"); $str->add_value_label ("yy", "bar"); $str->set_missing_values ("this", "that"); my $longstr = PSPP::Var->new ($dict, "longstring", (fmt=>PSPP::Fmt::A, width=>9) ); $longstr->set_label ("My Long String"); my $re = $longstr->add_value_label ("xxx", "xfoo"); $int->set_missing_values (9, 99); my $sysfile = PSPP::Sysfile->new ("testfile.sav", $dict); $sysfile->close (); _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:231: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib test.pl" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:231" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib test.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:231" $at_failed && at_fn_log_failure $at_traceon; } cat >dump-dict.sps <<'_ATEOF' GET FILE='testfile.sav'. DISPLAY DICTIONARY. _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:236: pspp -O format=csv dump-dict.sps" at_fn_check_prepare_trace "perl-module.at:236" ( $at_check_trace; pspp -O format=csv dump-dict.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position integer,\"Label: My Integer Format: F8.0 Missing Values: 9; 99 Value,Label 0,Zero 1,Unity 2,Duality\",1 string,\"Label: My String Format: A8 Missing Values: \"\"this \"\"; \"\"that \"\" Value,Label xx ,foo yy ,bar\",2 longstring,\"Label: My Long String Format: A9 Value,Label xxx ,xfoo\",3 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:236" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1155 #AT_START_1156 at_fn_group_banner 1156 'perl-module.at:261' \ "Perl dictionary survives system file" " " 146 at_xfail=no ( $as_echo "1156. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:262" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:262" cat >test.pl <<'_ATEOF' use warnings; use strict; use PSPP; my $sysfile ; { my $d = PSPP::Dict->new(); PSPP::Var->new ($d, "id", ( fmt=>PSPP::Fmt::F, width=>2, decimals=>0 ) ); $sysfile = PSPP::Sysfile->new ("testfile.sav", $d); } my $res = $sysfile->append_case ([3]); print "Dictionary survives sysfile\n" if $res; _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:287: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib test.pl" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:287" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib test.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Dictionary survives sysfile " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:287" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1156 #AT_START_1157 at_fn_group_banner 1157 'perl-module.at:330' \ "Perl read system file" " " 146 at_xfail=no ( $as_echo "1157. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:331" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:331" cat >sample.sps <<'_ATEOF' data list notable list /string (a8) longstring (a12) numeric (f10) date (date11) dollar (dollar8.2) datetime (datetime17) begin data. 1111 One 1 1/1/1 1 1/1/1+01:01 2222 Two 2 2/2/2 2 2/2/2+02:02 3333 Three 3 3/3/3 3 3/3/3+03:03 . . . . . . 5555 Five 5 5/5/5 5 5/5/5+05:05 end data. variable labels string 'A Short String Variable' /longstring 'A Long String Variable' /numeric 'A Numeric Variable' /date 'A Date Variable' /dollar 'A Dollar Variable' /datetime 'A Datetime Variable'. missing values numeric (9, 5, 999). missing values string ("3333"). add value labels /string '1111' 'ones' '2222' 'twos' '3333' 'threes' /numeric 1 'Unity' 2 'Duality' 3 'Thripality'. variable attribute variables = numeric attribute=colour[1]('blue') colour[2]('pink') colour[3]('violet') attribute=size('large') nationality('foreign'). save outfile='sample.sav'. _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:332: pspp -O format=csv sample.sps" at_fn_check_prepare_trace "perl-module.at:332" ( $at_check_trace; pspp -O format=csv sample.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:332" $at_failed && at_fn_log_failure $at_traceon; } cat >test.pl <<'_ATEOF' use warnings; use strict; use PSPP; my $sf = PSPP::Reader->open ("sample.sav"); my $dict = $sf->get_dict (); for (my $v = 0 ; $v < $dict->get_var_cnt() ; $v++) { my $var = $dict->get_var ($v); my $name = $var->get_name (); my $label = $var->get_label (); print "Variable $v is \"$name\", label is \"$label\"\n"; my $vl = $var->get_value_labels (); print "Value Labels:\n"; print "$_ => $vl->{$_}\n" for sort (keys %$vl); } while (my @c = $sf->get_next_case () ) { for (my $v = 0; $v < $dict->get_var_cnt(); $v++) { print "val$v: \"$c[$v]\"\n"; } print "\n"; } _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:365: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib test.pl" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:365" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib test.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable 0 is \"string\", label is \"A Short String Variable\" Value Labels: 1111 => ones 2222 => twos 3333 => threes Variable 1 is \"longstring\", label is \"A Long String Variable\" Value Labels: Variable 2 is \"numeric\", label is \"A Numeric Variable\" Value Labels: 1 => Unity 2 => Duality 3 => Thripality Variable 3 is \"date\", label is \"A Date Variable\" Value Labels: Variable 4 is \"dollar\", label is \"A Dollar Variable\" Value Labels: Variable 5 is \"datetime\", label is \"A Datetime Variable\" Value Labels: val0: \"1111 \" val1: \"One \" val2: \"1\" val3: \"13197686400\" val4: \"1\" val5: \"13197690060\" val0: \"2222 \" val1: \"Two \" val2: \"2\" val3: \"13231987200\" val4: \"2\" val5: \"13231994520\" val0: \"3333 \" val1: \"Three \" val2: \"3\" val3: \"13266028800\" val4: \"3\" val5: \"13266039780\" val0: \". \" val1: \". \" val2: \"\" val3: \"\" val4: \"\" val5: \"\" val0: \"5555 \" val1: \"Five \" val2: \"5\" val3: \"13334630400\" val4: \"5\" val5: \"13334648700\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:365" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1157 #AT_START_1158 at_fn_group_banner 1158 'perl-module.at:422' \ "Perl copying system files" " " 146 at_xfail=no ( $as_echo "1158. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:423" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:423" cat >sample.sps <<'_ATEOF' data list notable list /string (a8) longstring (a12) numeric (f10) date (date11) dollar (dollar8.2) datetime (datetime17) begin data. 1111 One 1 1/1/1 1 1/1/1+01:01 2222 Two 2 2/2/2 2 2/2/2+02:02 3333 Three 3 3/3/3 3 3/3/3+03:03 . . . . . . 5555 Five 5 5/5/5 5 5/5/5+05:05 end data. variable labels string 'A Short String Variable' /longstring 'A Long String Variable' /numeric 'A Numeric Variable' /date 'A Date Variable' /dollar 'A Dollar Variable' /datetime 'A Datetime Variable'. missing values numeric (9, 5, 999). missing values string ("3333"). add value labels /string '1111' 'ones' '2222' 'twos' '3333' 'threes' /numeric 1 'Unity' 2 'Duality' 3 'Thripality'. variable attribute variables = numeric attribute=colour[1]('blue') colour[2]('pink') colour[3]('violet') attribute=size('large') nationality('foreign'). save outfile='sample.sav'. _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:424: pspp -O format=csv sample.sps" at_fn_check_prepare_trace "perl-module.at:424" ( $at_check_trace; pspp -O format=csv sample.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:424" $at_failed && at_fn_log_failure $at_traceon; } cat >test.pl <<'_ATEOF' use warnings; use strict; use PSPP; my $input = PSPP::Reader->open ("sample.sav"); my $dict = $input->get_dict (); my $output = PSPP::Sysfile->new ("copy.sav", $dict); while (my (@c) = $input->get_next_case () ) { $output->append_case (\@c); } $output->close (); _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:443: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib test.pl" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:443" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib test.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:443" $at_failed && at_fn_log_failure $at_traceon; } cat >dump-dicts.sps <<'_ATEOF' GET FILE='sample.sav'. DISPLAY DICTIONARY. LIST. GET FILE='copy.sav'. DISPLAY DICTIONARY. LIST. _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:453: pspp -O format=csv dump-dicts.sps" at_fn_check_prepare_trace "perl-module.at:453" ( $at_check_trace; pspp -O format=csv dump-dicts.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Variable,Description,Position string,\"Label: A Short String Variable Format: A8 Missing Values: \"\"3333 \"\" Value,Label 1111 ,ones 2222 ,twos 3333 ,threes\",1 longstring,\"Label: A Long String Variable Format: A12\",2 numeric,\"Label: A Numeric Variable Format: F10.0 Missing Values: 9; 5; 999 Value,Label 1,Unity 2,Duality 3,Thripality Attribute,Value colour[1],blue colour[2],pink colour[3],violet nationality,foreign size,large\",3 date,\"Label: A Date Variable Format: DATE11\",4 dollar,\"Label: A Dollar Variable Format: DOLLAR11.2\",5 datetime,\"Label: A Datetime Variable Format: DATETIME17.0\",6 Table: Data List string,longstring,numeric,date,dollar,datetime 1111 ,One ,1,01-JAN-2001,\$1.00,01-JAN-2001 01:01 2222 ,Two ,2,02-FEB-2002,\$2.00,02-FEB-2002 02:02 3333 ,Three ,3,03-MAR-2003,\$3.00,03-MAR-2003 03:03 . ,. ,.,.,. ,. 5555 ,Five ,5,05-MAY-2005,\$5.00,05-MAY-2005 05:05 Variable,Description,Position string,\"Label: A Short String Variable Format: A8 Missing Values: \"\"3333 \"\" Value,Label 1111 ,ones 2222 ,twos 3333 ,threes\",1 longstring,\"Label: A Long String Variable Format: A12\",2 numeric,\"Label: A Numeric Variable Format: F10.0 Missing Values: 9; 5; 999 Value,Label 1,Unity 2,Duality 3,Thripality Attribute,Value colour[1],blue colour[2],pink colour[3],violet nationality,foreign size,large\",3 date,\"Label: A Date Variable Format: DATE11\",4 dollar,\"Label: A Dollar Variable Format: DOLLAR11.2\",5 datetime,\"Label: A Datetime Variable Format: DATETIME17.0\",6 Table: Data List string,longstring,numeric,date,dollar,datetime 1111 ,One ,1,01-JAN-2001,\$1.00,01-JAN-2001 01:01 2222 ,Two ,2,02-FEB-2002,\$2.00,02-FEB-2002 02:02 3333 ,Three ,3,03-MAR-2003,\$3.00,03-MAR-2003 03:03 . ,. ,.,.,. ,. 5555 ,Five ,5,05-MAY-2005,\$5.00,05-MAY-2005 05:05 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:453" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1158 #AT_START_1159 at_fn_group_banner 1159 'perl-module.at:538' \ "Perl value formatting" " " 146 at_xfail=no ( $as_echo "1159. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:539" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:539" cat >dd.sps <<'_ATEOF' DATA LIST LIST /d (DATETIME17). BEGIN DATA. 11/9/2001+08:20 END DATA. SAVE OUTFILE='dd.sav'. _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:548: pspp -O format=csv dd.sps" at_fn_check_prepare_trace "perl-module.at:548" ( $at_check_trace; pspp -O format=csv dd.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Table: Reading free-form data from INLINE. Variable,Format d,DATETIME17.0 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:548" $at_failed && at_fn_log_failure $at_traceon; } cat >test.pl <<'_ATEOF' use warnings; use strict; use PSPP; my $sf = PSPP::Reader->open ("dd.sav"); my $dict = $sf->get_dict (); my (@c) = $sf->get_next_case (); my $var = $dict->get_var (0); my $val = $c[0]; my $formatted = PSPP::format_value ($val, $var); my $str = gmtime ($val - PSPP::PERL_EPOCH); print "Formatted string is \"$formatted\"\n"; print "Perl representation is \"$str\"\n"; _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:571: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib test.pl" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:571" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib test.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Formatted string is \"11-SEP-2001 08:20\" Perl representation is \"Tue Sep 11 08:20:00 2001\" " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:571" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1159 #AT_START_1160 at_fn_group_banner 1160 'perl-module.at:577' \ "Perl opening nonexistent file" " " 146 at_xfail=no ( $as_echo "1160. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:578" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:578" cat >test.pl <<'_ATEOF' use warnings; use strict; use PSPP; my $sf = PSPP::Reader->open ("no-such-file.sav"); die "Returns undef on opening failure" if ref $sf; print $PSPP::errstr, "\n"; _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:589: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib test.pl" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:589" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib test.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo >>"$at_stderr"; $as_echo "Name \"PSPP::errstr\" used only once: possible typo at test.pl line 8. " | \ $at_diff - "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "An error occurred while opening \`no-such-file.sav': No such file or directory. " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:589" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1160 #AT_START_1161 at_fn_group_banner 1161 'perl-module.at:596' \ "Perl missing values" " " 146 at_xfail=no ( $as_echo "1161. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:597" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:597" cat >sample.sps <<'_ATEOF' data list notable list /string (a8) longstring (a12) numeric (f10) date (date11) dollar (dollar8.2) datetime (datetime17) begin data. 1111 One 1 1/1/1 1 1/1/1+01:01 2222 Two 2 2/2/2 2 2/2/2+02:02 3333 Three 3 3/3/3 3 3/3/3+03:03 . . . . . . 5555 Five 5 5/5/5 5 5/5/5+05:05 end data. variable labels string 'A Short String Variable' /longstring 'A Long String Variable' /numeric 'A Numeric Variable' /date 'A Date Variable' /dollar 'A Dollar Variable' /datetime 'A Datetime Variable'. missing values numeric (9, 5, 999). missing values string ("3333"). add value labels /string '1111' 'ones' '2222' 'twos' '3333' 'threes' /numeric 1 'Unity' 2 'Duality' 3 'Thripality'. variable attribute variables = numeric attribute=colour[1]('blue') colour[2]('pink') colour[3]('violet') attribute=size('large') nationality('foreign'). save outfile='sample.sav'. _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:598: pspp -O format=csv sample.sps" at_fn_check_prepare_trace "perl-module.at:598" ( $at_check_trace; pspp -O format=csv sample.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:598" $at_failed && at_fn_log_failure $at_traceon; } cat >test.pl <<'_ATEOF' use warnings; use strict; use PSPP; my $sf = PSPP::Reader->open ("sample.sav"); my $dict = $sf->get_dict (); my (@c) = $sf->get_next_case (); my $stringvar = $dict->get_var (0); my $numericvar = $dict->get_var (2); my $val = $c[0]; die "Missing Value Negative String" if PSPP::value_is_missing ($val, $stringvar); $val = $c[2]; die "Missing Value Negative Num" if PSPP::value_is_missing ($val, $numericvar); @c = $sf->get_next_case (); @c = $sf->get_next_case (); $val = $c[0]; die "Missing Value Positive" if !PSPP::value_is_missing ($val, $stringvar); @c = $sf->get_next_case (); $val = $c[2]; die "Missing Value Positive SYS" if !PSPP::value_is_missing ($val, $numericvar); @c = $sf->get_next_case (); $val = $c[2]; die "Missing Value Positive Num" if !PSPP::value_is_missing ($val, $numericvar); _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:639: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib test.pl" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:639" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib test.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:639" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1161 #AT_START_1162 at_fn_group_banner 1162 'perl-module.at:642' \ "Perl custom attributes" " " 146 at_xfail=no ( $as_echo "1162. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:643" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:643" cat >sample.sps <<'_ATEOF' data list notable list /string (a8) longstring (a12) numeric (f10) date (date11) dollar (dollar8.2) datetime (datetime17) begin data. 1111 One 1 1/1/1 1 1/1/1+01:01 2222 Two 2 2/2/2 2 2/2/2+02:02 3333 Three 3 3/3/3 3 3/3/3+03:03 . . . . . . 5555 Five 5 5/5/5 5 5/5/5+05:05 end data. variable labels string 'A Short String Variable' /longstring 'A Long String Variable' /numeric 'A Numeric Variable' /date 'A Date Variable' /dollar 'A Dollar Variable' /datetime 'A Datetime Variable'. missing values numeric (9, 5, 999). missing values string ("3333"). add value labels /string '1111' 'ones' '2222' 'twos' '3333' 'threes' /numeric 1 'Unity' 2 'Duality' 3 'Thripality'. variable attribute variables = numeric attribute=colour[1]('blue') colour[2]('pink') colour[3]('violet') attribute=size('large') nationality('foreign'). save outfile='sample.sav'. _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:644: pspp -O format=csv sample.sps" at_fn_check_prepare_trace "perl-module.at:644" ( $at_check_trace; pspp -O format=csv sample.sps ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:644" $at_failed && at_fn_log_failure $at_traceon; } cat >test.pl <<'_ATEOF' use warnings; use strict; use PSPP; my $sf = PSPP::Reader->open ("sample.sav"); my $dict = $sf->get_dict (); my $var = $dict->get_var_by_name ("numeric"); my $attr = $var->get_attributes (); foreach my $k (sort (keys (%$attr))) { my $ll = $attr->{$k}; print "$k =>"; print map "$_\n", join ', ', @$ll; } _ATEOF { set +x $as_echo "$at_srcdir/perl-module.at:665: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib test.pl" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:665" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib test.pl ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "\$@Role =>0 colour =>blue, pink, violet nationality =>foreign size =>large " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:665" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1162 #AT_START_1163 at_fn_group_banner 1163 'perl-module.at:673' \ "Perl Pspp.t" " " 146 at_xfail=no ( $as_echo "1163. $at_setup_line: testing $at_desc ..." $at_traceon $as_echo "perl-module.at:674" >"$at_check_line_file" (test "$WITH_PERL_MODULE" = no) \ && at_fn_check_skip 77 "$at_srcdir/perl-module.at:674" # Skip this test if Perl's Text::Diff module is not installed. { set +x $as_echo "$at_srcdir/perl-module.at:676: perl -MText::Diff -e '' || exit 77" at_fn_check_prepare_trace "perl-module.at:676" ( $at_check_trace; perl -MText::Diff -e '' || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:676" $at_failed && at_fn_log_failure $at_traceon; } { set +x $as_echo "$at_srcdir/perl-module.at:677: LD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ DYLD_LIBRARY_PATH=\$abs_top_builddir/src/.libs \\ \$PERL -I\$abs_top_builddir/perl-module/blib/arch \\ -I\$abs_top_builddir/perl-module/blib/lib \$abs_top_builddir/perl-module/t/Pspp.t" at_fn_check_prepare_notrace 'an embedded newline' "perl-module.at:677" ( $at_check_trace; LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \ $PERL -I$abs_top_builddir/perl-module/blib/arch \ -I$abs_top_builddir/perl-module/blib/lib $abs_top_builddir/perl-module/t/Pspp.t ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo >>"$at_stdout"; $as_echo "1..37 ok 1 - use PSPP; ok 2 - Dictionary Creation ok 3 ok 4 - Trap illegal variable name ok 5 ok 6 - Accept legal variable name ok 7 ok 8 - Trap duplicate variable name ok 9 ok 10 - Accept valid format ok 11 ok 12 - Create sysfile object ok 13 - Write system file ok 14 - Append Case ok 15 - Appending Case with too many variables ok 16 - existance ok 17 - Append Case 2 ok 18 - existance2 ok 19 - Check output ok 20 - Dictionary Creation 2 ok 21 - Value label for short string ok 22 - Value label for long string ok 23 - Check output 2 ok 24 - Dictionary survives sysfile ok 25 - Basic reader operation ok 26 - Streaming of files Formatted string is \"11-SEP-2001 08:20\" ok 27 - format_value function ok 28 - Perl representation of time ok 29 - Returns undef on opening failure ok 30 - Error string on open failure ok 31 - Missing Value Negative String ok 32 - Missing Value Negative Num ok 33 - Missing Value Positive ok 34 - Missing Value Positive SYS ok 35 - Missing Value Positive Num ok 36 - Custom Attributes ok 37 - Case count " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/perl-module.at:677" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1163 pspp-1.0.1/tests/libpspp/0000755000175000017500000000000013150620333012303 500000000000000pspp-1.0.1/tests/libpspp/string-set-test.c0000644000175000017500000004236112470242646015464 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the string_set_* routines defined in string-set.c. This test program aims to be as comprehensive as possible. "gcov -a -b" should report almost complete coverage of lines, blocks and branches in string-set.c, except that one branch caused by hash collision is not exercised because our hash function has so few collisions. "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. */ #include #include #include #include #include #include #include #include #include #include #include /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } static void *xmalloc (size_t n) MALLOC_LIKE; static void *xnmalloc (size_t n, size_t m) MALLOC_LIKE; static void *xmemdup (const void *p, size_t n) MALLOC_LIKE; /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } static void * xmemdup (const void *p, size_t n) { void *q = xmalloc (n); memcpy (q, p, n); return q; } /* Clone STRING. */ static char * xstrdup (const char *string) { return xmemdup (string, strlen (string) + 1); } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* Support routines. */ enum { MAX_VALUE = 1024 }; static char *string_table[MAX_VALUE]; static const char * make_string (int value) { char **s; assert (value >= 0 && value < MAX_VALUE); s = &string_table[value]; if (*s == NULL) { *s = xmalloc (16); sprintf (*s, "%d", value); } return *s; } static void free_strings (void) { int i; for (i = 0; i < MAX_VALUE; i++) free (string_table[i]); } /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT elements in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if (values[i] < values[i + 1]) { size_t j; for (j = cnt - 1; values[i] >= values[j]; j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } /* Checks that SET contains the CNT strings in DATA, that its structure is correct, and that certain operations on SET produce the expected results. */ static void check_string_set (struct string_set *set, const int data[], size_t cnt) { size_t i; check (string_set_is_empty (set) == (cnt == 0)); check (string_set_count (set) == cnt); for (i = 0; i < cnt; i++) { struct string_set_node *node; const char *s = make_string (data[i]); check (string_set_contains (set, s)); check (!string_set_insert (set, s)); check (!string_set_insert_nocopy (set, xstrdup (s))); node = string_set_find_node (set, s); check (node != NULL); check (!strcmp (s, string_set_node_get_string (node))); } check (!string_set_contains (set, "xxx")); check (string_set_find_node (set, "") == NULL); if (cnt == 0) check (string_set_first (set) == NULL); else { const struct string_set_node *node; int *data_copy; int left; data_copy = xmemdup (data, cnt * sizeof *data); left = cnt; for (node = string_set_first (set), i = 0; i < cnt; node = string_set_next (set, node), i++) { const char *s = string_set_node_get_string (node); size_t j; for (j = 0; j < left; j++) if (!strcmp (s, make_string (data_copy[j]))) { data_copy[j] = data_copy[--left]; goto next; } check_die (); next: ; } check (node == NULL); free (data_copy); } } /* Inserts the CNT strings from 0 to CNT - 1 (inclusive) into a set in the order specified by INSERTIONS, then deletes them in the order specified by DELETIONS, checking the set's contents for correctness after each operation. */ static void test_insert_delete (const int insertions[], const int deletions[], size_t cnt) { struct string_set set; size_t i; string_set_init (&set); check_string_set (&set, NULL, 0); for (i = 0; i < cnt; i++) { check (string_set_insert (&set, make_string (insertions[i]))); check_string_set (&set, insertions, i + 1); } for (i = 0; i < cnt; i++) { check (string_set_delete (&set, make_string (deletions[i]))); check_string_set (&set, deletions + i + 1, cnt - i - 1); } string_set_destroy (&set); } /* Inserts strings into a set in each possible order, then removes them in each possible order, up to a specified maximum size. */ static void test_insert_any_remove_any (void) { const int max_elems = 5; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int ins_perm_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (ins_perm_cnt = 0; ins_perm_cnt == 0 || next_permutation (insertions, cnt); ins_perm_cnt++) { unsigned int del_perm_cnt; int i; for (i = 0; i < cnt; i++) deletions[i] = i; for (del_perm_cnt = 0; del_perm_cnt == 0 || next_permutation (deletions, cnt); del_perm_cnt++) test_insert_delete (insertions, deletions, cnt); check (del_perm_cnt == factorial (cnt)); } check (ins_perm_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts strings into a set in each possible order, then removes them in the same order, up to a specified maximum size. */ static void test_insert_any_remove_same (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) test_insert_delete (values, values, cnt); check (permutation_cnt == factorial (cnt)); free (values); } } /* Inserts strings into a set in each possible order, then removes them in reverse order, up to a specified maximum size. */ static void test_insert_any_remove_reverse (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int permutation_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (insertions, cnt); permutation_cnt++) { memcpy (deletions, insertions, sizeof *insertions * cnt); reverse (deletions, cnt); test_insert_delete (insertions, deletions, cnt); } check (permutation_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts and removes strings in a set, in random order. */ static void test_random_sequence (void) { const int max_elems = 64; const int max_trials = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt += 2) { int *insertions, *deletions; int trial; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (i = 0; i < cnt; i++) deletions[i] = i; for (trial = 0; trial < max_trials; trial++) { random_shuffle (insertions, cnt, sizeof *insertions); random_shuffle (deletions, cnt, sizeof *deletions); test_insert_delete (insertions, deletions, cnt); } free (insertions); free (deletions); } } /* Inserts strings into a set in ascending order, then delete in ascending order. */ static void test_insert_ordered (void) { const int max_elems = 64; int *values; struct string_set set; int i; string_set_init (&set); values = xnmalloc (max_elems, sizeof *values); for (i = 0; i < max_elems; i++) { values[i] = i; string_set_insert_nocopy (&set, xstrdup (make_string (i))); check_string_set (&set, values, i + 1); } for (i = 0; i < max_elems; i++) { string_set_delete (&set, make_string (i)); check_string_set (&set, values + i + 1, max_elems - i - 1); } string_set_destroy (&set); free (values); } static void test_boolean_ops (void (*function)(struct string_set *a, struct string_set *b, unsigned int *a_pat, unsigned int *b_pat)) { enum { MAX_STRINGS = 7 }; unsigned int a_pat, b_pat; for (a_pat = 0; a_pat < (1u << MAX_STRINGS); a_pat++) for (b_pat = 0; b_pat < (1u << MAX_STRINGS); b_pat++) { unsigned int new_a_pat = a_pat; unsigned int new_b_pat = b_pat; struct string_set a, b; int a_strings[MAX_STRINGS], b_strings[MAX_STRINGS]; size_t i, n_a, n_b; string_set_init (&a); string_set_init (&b); for (i = 0; i < MAX_STRINGS; i++) { if (a_pat & (1u << i)) string_set_insert (&a, make_string (i)); if (b_pat & (1u << i)) string_set_insert (&b, make_string (i)); } function (&a, &b, &new_a_pat, &new_b_pat); n_a = n_b = 0; for (i = 0; i < MAX_STRINGS; i++) { if (new_a_pat & (1u << i)) a_strings[n_a++] = i; if (new_b_pat & (1u << i)) b_strings[n_b++] = i; } check_string_set (&a, a_strings, n_a); check_string_set (&b, b_strings, n_b); string_set_destroy (&a); string_set_destroy (&b); } } static void union_cb (struct string_set *a, struct string_set *b, unsigned int *a_pat, unsigned int *b_pat) { string_set_union (a, b); *a_pat |= *b_pat; } static void test_union (void) { test_boolean_ops (union_cb); } static void union_and_intersection_cb (struct string_set *a, struct string_set *b, unsigned int *a_pat, unsigned int *b_pat) { unsigned int orig_a_pat = *a_pat; unsigned int orig_b_pat = *b_pat; string_set_union_and_intersection (a, b); *a_pat = orig_a_pat | orig_b_pat; *b_pat = orig_a_pat & orig_b_pat; } static void test_union_and_intersection (void) { test_boolean_ops (union_and_intersection_cb); } static void intersect_cb (struct string_set *a, struct string_set *b, unsigned int *a_pat, unsigned int *b_pat) { string_set_intersect (a, b); *a_pat &= *b_pat; } static void test_intersect (void) { test_boolean_ops (intersect_cb); } static void subtract_cb (struct string_set *a, struct string_set *b, unsigned int *a_pat, unsigned int *b_pat) { string_set_subtract (a, b); *a_pat &= ~*b_pat; } static void test_subtract (void) { test_boolean_ops (subtract_cb); } static void swap_cb (struct string_set *a, struct string_set *b, unsigned int *a_pat, unsigned int *b_pat) { unsigned int tmp; string_set_swap (a, b); tmp = *a_pat; *a_pat = *b_pat; *b_pat = tmp; } static void test_swap (void) { test_boolean_ops (swap_cb); } static void clear_cb (struct string_set *a, struct string_set *b UNUSED, unsigned int *a_pat, unsigned int *b_pat UNUSED) { string_set_clear (a); *a_pat = 0; } static void test_clear (void) { test_boolean_ops (clear_cb); } static void clone_cb (struct string_set *a, struct string_set *b, unsigned int *a_pat, unsigned int *b_pat) { string_set_destroy (a); string_set_clone (a, b); *a_pat = *b_pat; } static void test_clone (void) { test_boolean_ops (clone_cb); } static void test_destroy_null (void) { string_set_destroy (NULL); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert-any-remove-any", "insert any order, delete any order", test_insert_any_remove_any }, { "insert-any-remove-same", "insert any order, delete same order", test_insert_any_remove_same }, { "insert-any-remove-reverse", "insert any order, delete reverse order", test_insert_any_remove_reverse }, { "random-sequence", "insert and delete in random sequence", test_random_sequence }, { "insert-ordered", "insert in ascending order", test_insert_ordered }, { "union", "union", test_union }, { "union-and-intersection", "union and intersection", test_union_and_intersection }, { "intersect", "intersect", test_intersect }, { "subtract", "subtract", test_subtract }, { "swap", "swap", test_swap }, { "clear", "clear", test_clear }, { "clone", "clone", test_clone }, { "destroy-null", "destroying null table", test_destroy_null }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test string set library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); free_strings (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/sparse-array-test.c0000644000175000017500000003075512470242646016002 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the sparse array routines defined in sparse-array.c. This test program aims to be as comprehensive as possible. "gcov -b" should report 100% coverage of lines and branches in sparse-array.c when compiled with -DNDEBUG and BITS_PER_LEVEL is greater than the number of bits in a long. "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include /* Support preliminaries. */ #if __GNUC__ >= 2 && !defined UNUSED #define UNUSED __attribute__ ((unused)) #else #define UNUSED #endif /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } /* Returns a malloc()'d duplicate of the N bytes starting at P. */ static void * xmemdup (const void *p, size_t n) { void *q = xmalloc (n); memcpy (q, p, n); return q; } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* Compares A and B and returns a strcmp-type return value. */ static int compare_unsigned_longs_noaux (const void *a_, const void *b_) { const unsigned long *a = a_; const unsigned long *b = b_; return *a < *b ? -1 : *a > *b; } /* Checks that SPAR contains the CNT ints in DATA, that its structure is correct, and that certain operations on SPAR produce the expected results. */ static void check_sparse_array (struct sparse_array *spar, const unsigned long data[], size_t cnt) { unsigned long idx; unsigned long *order; unsigned long *p; size_t i; check (sparse_array_count (spar) == cnt); for (i = 0; i < cnt; i++) { p = sparse_array_get (spar, data[i]); check (p != NULL); check (*p == data[i]); } order = xmemdup (data, cnt * sizeof *data); qsort (order, cnt, sizeof *order, compare_unsigned_longs_noaux); for (i = 0; i < cnt; i++) { p = sparse_array_get (spar, order[i]); check (p != NULL); check (*p == order[i]); } if (cnt > 0 && order[0] - 1 != order[cnt - 1]) { check (sparse_array_get (spar, order[0] - 1) == NULL); check (!sparse_array_remove (spar, order[0] - 1)); } if (cnt > 0 && order[0] != order[cnt - 1] + 1) { check (sparse_array_get (spar, order[cnt - 1] + 1) == NULL); check (!sparse_array_remove (spar, order[cnt - 1] + 1)); } for (i = 0, p = sparse_array_first (spar, &idx); i < cnt; i++, p = sparse_array_next (spar, idx, &idx)) { check (p != NULL); check (idx == order[i]); check (*p == order[i]); } check (p == NULL); for (i = 0, p = sparse_array_last (spar, &idx); i < cnt; i++, p = sparse_array_prev (spar, idx, &idx)) { check (p != NULL); check (idx == order[cnt - i - 1]); check (*p == order[cnt - i - 1]); } check (p == NULL); free (order); } /* Inserts the CNT values from 0 to CNT - 1 (inclusive) into a sparse array in the order specified by INSERTIONS, then deletes them in the order specified by DELETIONS, checking the array's contents for correctness after each operation. */ static void test_insert_delete (const unsigned long insertions[], const unsigned long deletions[], size_t cnt) { struct sparse_array *spar; size_t i; spar = sparse_array_create (sizeof *insertions); for (i = 0; i < cnt; i++) { unsigned long *p = sparse_array_insert (spar, insertions[i]); *p = insertions[i]; check_sparse_array (spar, insertions, i + 1); } for (i = 0; i < cnt; i++) { bool deleted = sparse_array_remove (spar, deletions[i]); check (deleted); check_sparse_array (spar, deletions + i + 1, cnt - (i + 1)); } check_sparse_array (spar, NULL, 0); sparse_array_destroy (spar); } /* Inserts the CNT values from 0 to CNT - 1 (inclusive) into a sparse array in the order specified by INSERTIONS, then destroys the sparse array, to check that sparse_cases_destroy properly frees all the nodes. */ static void test_destroy (const unsigned long insertions[], size_t cnt) { struct sparse_array *spar; size_t i; spar = sparse_array_create (sizeof *insertions); for (i = 0; i < cnt; i++) { unsigned long *p = sparse_array_insert (spar, insertions[i]); *p = insertions[i]; check_sparse_array (spar, insertions, i + 1); } sparse_array_destroy (spar); } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } /* Tests inserting and deleting elements whose values are determined by starting from various offsets and skipping across various strides, and doing so in various orders. */ static void test_insert_delete_strides (void) { static const unsigned long strides[] = { 1, 2, 4, 16, 64, 4096, 262144, 16777216, 3, 5, 17, 67, 4099, 262147, 16777259, }; const size_t stride_cnt = sizeof strides / sizeof *strides; static const unsigned long offsets[] = { 0, 1024ul * 1024 + 1, 1024ul * 1024 * 512 + 23, ULONG_MAX - 59, }; const size_t offset_cnt = sizeof offsets / sizeof *offsets; int cnt = 100; unsigned long *insertions, *deletions; const unsigned long *stride, *offset; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (stride = strides; stride < strides + stride_cnt; stride++) { printf ("%lu\n", *stride); for (offset = offsets; offset < offsets + offset_cnt; offset++) { int k; for (k = 0; k < cnt; k++) insertions[k] = *stride * k + *offset; test_insert_delete (insertions, insertions, cnt); test_destroy (insertions, cnt); for (k = 0; k < cnt; k++) deletions[k] = insertions[cnt - k - 1]; test_insert_delete (insertions, deletions, cnt); random_shuffle (insertions, cnt, sizeof *insertions); test_insert_delete (insertions, insertions, cnt); test_insert_delete (insertions, deletions, cnt); } } free (insertions); free (deletions); } /* Returns the index in ARRAY of the (CNT+1)th element that has the TARGET value. */ static int scan_bools (bool target, bool array[], size_t cnt) { size_t i; for (i = 0; ; i++) if (array[i] == target && cnt-- == 0) return i; } /* Performs a random sequence of insertions and deletions in a sparse array. */ static void test_random_insert_delete (void) { unsigned long int values[] = { 0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 3, 7, 15, 31, 63, 127, 257, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 2147483647, 4294967295, }; const int max_values = sizeof values / sizeof *values; const int num_actions = 250000; struct sparse_array *spar; bool *has_values; int cnt; int insert_chance; int i; has_values = xnmalloc (max_values, sizeof *has_values); memset (has_values, 0, max_values * sizeof *has_values); cnt = 0; insert_chance = 5; spar = sparse_array_create (sizeof *values); for (i = 0; i < num_actions; i++) { enum { INSERT, DELETE } action; unsigned long *p; int j; if (cnt == 0) { action = INSERT; if (insert_chance < 9) insert_chance++; } else if (cnt == max_values) { action = DELETE; if (insert_chance > 0) insert_chance--; } else action = rand () % 10 < insert_chance ? INSERT : DELETE; if (action == INSERT) { int ins_index; ins_index = scan_bools (false, has_values, rand () % (max_values - cnt)); assert (has_values[ins_index] == false); has_values[ins_index] = true; p = sparse_array_insert (spar, values[ins_index]); check (p != NULL); *p = values[ins_index]; cnt++; } else if (action == DELETE) { int del_index; del_index = scan_bools (true, has_values, rand () % cnt); assert (has_values[del_index] == true); has_values[del_index] = false; check (sparse_array_remove (spar, values[del_index])); cnt--; } else abort (); check (sparse_array_count (spar) == cnt); for (j = 0; j < max_values; j++) { p = sparse_array_get (spar, values[j]); if (has_values[j]) { check (p != NULL); check (*p == values[j]); } else { check (p == NULL); if (rand () % 10 == 0) sparse_array_remove (spar, values[j]); } } } sparse_array_destroy (spar); free (has_values); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "random-insert-delete", "random insertions and deletions", test_random_insert_delete }, { "insert-delete-strides", "insert in ascending order with strides and offset", test_insert_delete_strides }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test sparse array library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/hmap-test.c0000644000175000017500000006614313137223525014312 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the hmap_* routines defined in hmap.c. This test program aims to be as comprehensive as possible. "gcov -a -b" should report 100% coverage of lines, blocks and branches in hmap.c (when compiled with -DNDEBUG). "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. */ /* GCC 4.3 miscompiles some of the tests below, so we do not run these tests on GCC 4.3. This is a bug in GCC 4.3 triggered by the test program, not a bug in the library under test. GCC 4.2 or earlier and GCC 4.4 or later do not have this bug. Here is a minimal test program that demonstrates the same or a similar bug in GCC 4.3: #include #include struct node { struct node *next; unsigned int data1; int data2; }; struct list { struct node *head; int dummy; }; static void * xmalloc (int n) { return malloc (n); } static void check_list (struct list *list) { int i __attribute__((unused)); struct node *e; for (e = list->head; e != NULL; e = e->next) if (e->data1 != e->data2) abort (); } int main (void) { #define MAX_ELEMS 2 struct node *elements = xmalloc (MAX_ELEMS * sizeof *elements); int *values = xmalloc (MAX_ELEMS * sizeof *values); struct list list; int i; list.head = NULL; for (i = 0; i < MAX_ELEMS; i++) { values[i] = elements[i].data2 = i; elements[i].data1 = elements[i].data2; elements[i].next = list.head; list.head = &elements[i]; } check_list (&list); return 0; } */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } static void *xmalloc (size_t n) MALLOC_LIKE; static void *xnmalloc (size_t n, size_t m) MALLOC_LIKE; static void *xmemdup (const void *p, size_t n) MALLOC_LIKE; /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } static void * xmemdup (const void *p, size_t n) { void *q = xmalloc (n); memcpy (q, p, n); return q; } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* Node type and support routines. */ /* Test data element. */ struct element { struct hmap_node node; /* Embedded hash table element. */ int data; /* Primary value. */ }; /* Returns the `struct element' that NODE is embedded within. */ static struct element * hmap_node_to_element (const struct hmap_node *node) { return HMAP_DATA (node, struct element, node); } /* Compares A and B and returns a strcmp-type return value. */ static int compare_ints (const void *a_, const void *b_) { const int *a = a_; const int *b = b_; return *a < *b ? -1 : *a > *b; } /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT elements in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if (values[i] < values[i + 1]) { size_t j; for (j = cnt - 1; values[i] >= values[j]; j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } typedef size_t hash_function (int data); static size_t identity_hash (int data) { return data; } static size_t constant_hash (int data UNUSED) { return 0x12345678u; } static inline uint32_t md4_round (uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t data, uint32_t n) { uint32_t x = a + (d ^ (b & (c ^ d))) + data; return (x << n) | (x >> (32 - n)); } static size_t random_hash (int data) { uint32_t a = data; uint32_t b = data; uint32_t c = data; uint32_t d = data; a = md4_round (a, b, c, d, 0, 3); d = md4_round (d, a, b, c, 1, 7); c = md4_round (c, d, a, b, 2, 11); b = md4_round (b, c, d, a, 3, 19); return a ^ b ^ c ^ d; } static struct hmap_node * find_element (struct hmap *hmap, int data, hash_function *hash) { struct element *e; HMAP_FOR_EACH_WITH_HASH (e, struct element, node, hash (data), hmap) if (e->data == data) break; return &e->node; } /* Checks that HMAP contains the CNT ints in DATA, that its structure is correct, and that certain operations on HMAP produce the expected results. */ static void check_hmap (struct hmap *hmap, const int data[], size_t cnt, hash_function *hash) { size_t i, j; int *order; check (hmap_is_empty (hmap) == (cnt == 0)); check (hmap_count (hmap) == cnt); check (cnt <= hmap_capacity (hmap)); order = xmemdup (data, cnt * sizeof *data); qsort (order, cnt, sizeof *order, compare_ints); for (i = 0; i < cnt; i = j) { struct element *e; int count; for (j = i + 1; j < cnt; j++) if (order[i] != order[j]) break; count = 0; HMAP_FOR_EACH_WITH_HASH (e, struct element, node, hash (order[i]), hmap) if (e->data == order[i]) count++; check (count == j - i); } check (find_element (hmap, -1, hash) == NULL); if (cnt == 0) check (hmap_first (hmap) == NULL); else { struct hmap_node *p; int left; left = cnt; for (p = hmap_first (hmap), i = 0; i < cnt; p = hmap_next (hmap, p), i++) { struct element *e = hmap_node_to_element (p); check (hmap_node_hash (&e->node) == hash (e->data)); for (j = 0; j < left; j++) if (order[j] == e->data) { order[j] = order[--left]; goto next; } check_die (); next: ; } check (p == NULL); } free (order); } /* Inserts the CNT values from 0 to CNT - 1 (inclusive) into an HMAP in the order specified by INSERTIONS, then deletes them in the order specified by DELETIONS, checking the HMAP's contents for correctness after each operation. Uses HASH as the hash function. */ static void test_insert_delete (const int insertions[], const int deletions[], size_t cnt, hash_function *hash) { struct element *elements; struct hmap hmap; size_t i; elements = xnmalloc (cnt, sizeof *elements); for (i = 0; i < cnt; i++) elements[i].data = i; hmap_init (&hmap); hmap_reserve (&hmap, 1); check_hmap (&hmap, NULL, 0, hash); for (i = 0; i < cnt; i++) { size_t capacity; hmap_insert (&hmap, &elements[insertions[i]].node, hash (insertions[i])); check_hmap (&hmap, insertions, i + 1, hash); /* A series of insertions should not produce a shrinkable hmap. */ capacity = hmap_capacity (&hmap); hmap_shrink (&hmap); check (capacity == hmap_capacity (&hmap)); } for (i = 0; i < cnt; i++) { hmap_delete (&hmap, &elements[deletions[i]].node); check_hmap (&hmap, deletions + i + 1, cnt - i - 1, hash); } hmap_destroy (&hmap); free (elements); } /* Inserts values into an HMAP in each possible order, then removes them in each possible order, up to a specified maximum size, using hash function HASH. */ static void test_insert_any_remove_any (hash_function *hash) { const int max_elems = 5; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int ins_perm_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (ins_perm_cnt = 0; ins_perm_cnt == 0 || next_permutation (insertions, cnt); ins_perm_cnt++) { unsigned int del_perm_cnt; int i; for (i = 0; i < cnt; i++) deletions[i] = i; for (del_perm_cnt = 0; del_perm_cnt == 0 || next_permutation (deletions, cnt); del_perm_cnt++) test_insert_delete (insertions, deletions, cnt, hash); check (del_perm_cnt == factorial (cnt)); } check (ins_perm_cnt == factorial (cnt)); free (insertions); free (deletions); } } static void test_insert_any_remove_any_random_hash (void) { test_insert_any_remove_any (random_hash); } static void test_insert_any_remove_any_identity_hash (void) { test_insert_any_remove_any (identity_hash); } static void test_insert_any_remove_any_constant_hash (void) { test_insert_any_remove_any (constant_hash); } /* Inserts values into an HMAP in each possible order, then removes them in the same order, up to a specified maximum size, using hash function HASH. */ static void test_insert_any_remove_same (hash_function *hash) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) test_insert_delete (values, values, cnt, hash); check (permutation_cnt == factorial (cnt)); free (values); } } static void test_insert_any_remove_same_random_hash (void) { test_insert_any_remove_same (random_hash); } static void test_insert_any_remove_same_identity_hash (void) { test_insert_any_remove_same (identity_hash); } static void test_insert_any_remove_same_constant_hash (void) { test_insert_any_remove_same (constant_hash); } /* Inserts values into an HMAP in each possible order, then removes them in reverse order, up to a specified maximum size, using hash function HASH. */ static void test_insert_any_remove_reverse (hash_function *hash) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int permutation_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (insertions, cnt); permutation_cnt++) { memcpy (deletions, insertions, sizeof *insertions * cnt); reverse (deletions, cnt); test_insert_delete (insertions, deletions, cnt, hash); } check (permutation_cnt == factorial (cnt)); free (insertions); free (deletions); } } static void test_insert_any_remove_reverse_random_hash (void) { test_insert_any_remove_reverse (random_hash); } static void test_insert_any_remove_reverse_identity_hash (void) { test_insert_any_remove_reverse (identity_hash); } static void test_insert_any_remove_reverse_constant_hash (void) { test_insert_any_remove_reverse (constant_hash); } /* Inserts and removes up to MAX_ELEMS values in an hmap, in random order, using hash function HASH. */ static void test_random_sequence (int max_elems, hash_function *hash) { const int max_trials = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt += 2) { int *insertions, *deletions; int trial; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (i = 0; i < cnt; i++) deletions[i] = i; for (trial = 0; trial < max_trials; trial++) { random_shuffle (insertions, cnt, sizeof *insertions); random_shuffle (deletions, cnt, sizeof *deletions); test_insert_delete (insertions, deletions, cnt, hash); } free (insertions); free (deletions); } } static void test_random_sequence_random_hash (void) { test_random_sequence (64, random_hash); } static void test_random_sequence_identity_hash (void) { test_random_sequence (64, identity_hash); } static void test_random_sequence_constant_hash (void) { test_random_sequence (32, constant_hash); } /* Inserts MAX_ELEMS elements into an HMAP in ascending order, then delete in ascending order and shrink the hmap at each step, using hash function HASH. */ static void test_insert_ordered (int max_elems, hash_function *hash) { struct element *elements; int *values; struct hmap hmap; int i; #if __GNUC__ == 4 && __GNUC_MINOR__ == 3 /* This tells the Autotest framework that the test was skipped. */ exit (77); #endif hmap_init (&hmap); elements = xnmalloc (max_elems, sizeof *elements); values = xnmalloc (max_elems, sizeof *values); for (i = 0; i < max_elems; i++) { values[i] = elements[i].data = i; hmap_insert (&hmap, &elements[i].node, hash (elements[i].data)); check_hmap (&hmap, values, i + 1, hash); if (hash == identity_hash) { /* Check that every every hash bucket has (almost) the same number of nodes in it. */ int min = INT_MAX; int max = INT_MIN; int j; for (j = 0; j <= hmap.mask; j++) { int count = 0; struct hmap_node *node; for (node = hmap.buckets[j]; node != NULL; node = node->next) count++; if (count < min) min = count; if (count > max) max = count; } check (max - min <= 1); } } for (i = 0; i < max_elems; i++) { hmap_delete (&hmap, &elements[i].node); hmap_shrink (&hmap); check_hmap (&hmap, values + i + 1, max_elems - i - 1, hash); } hmap_destroy (&hmap); free (elements); free (values); } static void test_insert_ordered_random_hash (void) { test_insert_ordered (1024, random_hash); } static void test_insert_ordered_identity_hash (void) { test_insert_ordered (1024, identity_hash); } static void test_insert_ordered_constant_hash (void) { test_insert_ordered (128, constant_hash); } /* Inserts up to MAX_ELEMS elements into an HMAP, then moves the nodes around in memory, using hash function HASH. */ static void test_moved (int max_elems, hash_function *hash) { struct element *e[2]; int cur; int *values; struct hmap hmap; int i, j; #if __GNUC__ == 4 && __GNUC_MINOR__ == 3 /* This tells the Autotest framework that the test was skipped. */ exit (77); #endif hmap_init (&hmap); e[0] = xnmalloc (max_elems, sizeof *e[0]); e[1] = xnmalloc (max_elems, sizeof *e[1]); values = xnmalloc (max_elems, sizeof *values); cur = 0; for (i = 0; i < max_elems; i++) { values[i] = e[cur][i].data = i; hmap_insert (&hmap, &e[cur][i].node, hash (e[cur][i].data)); check_hmap (&hmap, values, i + 1, hash); for (j = 0; j <= i; j++) { e[!cur][j] = e[cur][j]; hmap_moved (&hmap, &e[!cur][j].node, &e[cur][j].node); check_hmap (&hmap, values, i + 1, hash); } cur = !cur; } hmap_destroy (&hmap); free (e[0]); free (e[1]); free (values); } static void test_moved_random_hash (void) { test_moved (128, random_hash); } static void test_moved_identity_hash (void) { test_moved (128, identity_hash); } static void test_moved_constant_hash (void) { test_moved (32, constant_hash); } /* Inserts values into an HMAP, then changes their values, using hash function HASH. */ static void test_changed (hash_function *hash) { const int max_elems = 6; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values, *changed_values; struct element *elements; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); changed_values = xnmalloc (cnt, sizeof *changed_values); elements = xnmalloc (cnt, sizeof *elements); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) { for (i = 0; i < cnt; i++) { int j, k; for (j = 0; j <= cnt; j++) { struct hmap hmap; hmap_init (&hmap); /* Add to HMAP in order. */ for (k = 0; k < cnt; k++) { int n = values[k]; elements[n].data = n; hmap_insert (&hmap, &elements[n].node, hash (elements[n].data)); } check_hmap (&hmap, values, cnt, hash); /* Change value i to j. */ elements[i].data = j; hmap_changed (&hmap, &elements[i].node, hash (elements[i].data)); for (k = 0; k < cnt; k++) changed_values[k] = k; changed_values[i] = j; check_hmap (&hmap, changed_values, cnt, hash); hmap_destroy (&hmap); } } } check (permutation_cnt == factorial (cnt)); free (values); free (changed_values); free (elements); } } static void test_changed_random_hash (void) { test_changed (random_hash); } static void test_changed_identity_hash (void) { test_changed (identity_hash); } static void test_changed_constant_hash (void) { test_changed (constant_hash); } static void test_swap (int max_elems, hash_function *hash) { struct element *elements; int *values; struct hmap a, b; struct hmap *working, *empty; int i; #if __GNUC__ == 4 && __GNUC_MINOR__ == 3 /* This tells the Autotest framework that the test was skipped. */ exit (77); #endif hmap_init (&a); hmap_init (&b); working = &a; empty = &b; elements = xnmalloc (max_elems, sizeof *elements); values = xnmalloc (max_elems, sizeof *values); for (i = 0; i < max_elems; i++) { struct hmap *tmp; values[i] = elements[i].data = i; hmap_insert (working, &elements[i].node, hash (elements[i].data)); check_hmap (working, values, i + 1, hash); check_hmap (empty, NULL, 0, hash); hmap_swap (&a, &b); tmp = working; working = empty; empty = tmp; } hmap_destroy (&a); hmap_destroy (&b); free (elements); free (values); } static void test_swap_random_hash (void) { test_swap (128, random_hash); } /* Inserts elements into an hmap in ascending order, then clears the hash table using hmap_clear(). */ static void test_clear (void) { const int max_elems = 128; struct element *elements; int *values; struct hmap hmap; int cnt; #if __GNUC__ == 4 && __GNUC_MINOR__ == 3 /* This tells the Autotest framework that the test was skipped. */ exit (77); #endif elements = xnmalloc (max_elems, sizeof *elements); values = xnmalloc (max_elems, sizeof *values); for (cnt = 0; cnt <= max_elems; cnt++) { int i; hmap_init (&hmap); for (i = 0; i < cnt; i++) { values[i] = elements[i].data = i; hmap_insert (&hmap, &elements[i].node, random_hash (elements[i].data)); check_hmap (&hmap, values, i + 1, random_hash); } hmap_clear (&hmap); check_hmap (&hmap, NULL, 0, random_hash); hmap_destroy (&hmap); } free (elements); free (values); } static void test_destroy_null (void) { hmap_destroy (NULL); } /* Test shrinking an empty hash table. */ static void test_shrink_empty (void) { struct hmap hmap; hmap_init (&hmap); hmap_reserve (&hmap, 123); hmap_shrink (&hmap); hmap_destroy (&hmap); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert-any-remove-any-random-hash", "insert any order, delete any order (random hash)", test_insert_any_remove_any_random_hash }, { "insert-any-remove-any-identity-hash", "insert any order, delete any order (identity hash)", test_insert_any_remove_any_identity_hash }, { "insert-any-remove-any-constant-hash", "insert any order, delete any order (constant hash)", test_insert_any_remove_any_constant_hash }, { "insert-any-remove-same-random-hash", "insert any order, delete same order (random hash)", test_insert_any_remove_same_random_hash }, { "insert-any-remove-same-identity-hash", "insert any order, delete same order (identity hash)", test_insert_any_remove_same_identity_hash }, { "insert-any-remove-same-constant-hash", "insert any order, delete same order (constant hash)", test_insert_any_remove_same_constant_hash }, { "insert-any-remove-reverse-random-hash", "insert any order, delete reverse order (random hash)", test_insert_any_remove_reverse_random_hash }, { "insert-any-remove-reverse-identity-hash", "insert any order, delete reverse order (identity hash)", test_insert_any_remove_reverse_identity_hash }, { "insert-any-remove-reverse-constant-hash", "insert any order, delete reverse order (constant hash)", test_insert_any_remove_reverse_constant_hash }, { "random-sequence-random-hash", "insert and delete in random sequence (random hash)", test_random_sequence_random_hash }, { "random-sequence-identity-hash", "insert and delete in random sequence (identity hash)", test_random_sequence_identity_hash }, { "random-sequence-constant-hash", "insert and delete in random sequence (constant hash)", test_random_sequence_constant_hash }, { "insert-ordered-random-hash", "insert in ascending order (random hash)", test_insert_ordered_random_hash }, { "insert-ordered-identity-hash", "insert in ascending order (identity hash)", test_insert_ordered_identity_hash }, { "insert-ordered-constant-hash", "insert in ascending order (constant hash)", test_insert_ordered_constant_hash }, { "moved-random-hash", "move elements around in memory (random hash)", test_moved_random_hash }, { "moved-identity-hash", "move elements around in memory (identity hash)", test_moved_identity_hash }, { "moved-constant-hash", "move elements around in memory (constant hash)", test_moved_constant_hash }, { "changed-random-hash", "change key data in nodes (random hash)", test_changed_random_hash }, { "changed-identity-hash", "change key data in nodes (identity hash)", test_changed_identity_hash }, { "changed-constant-hash", "change key data in nodes (constant hash)", test_changed_constant_hash }, { "swap-random-hash", "test swapping tables", test_swap_random_hash }, { "clear", "test clearing hash table", test_clear }, { "destroy-null", "test destroying null table", test_destroy_null }, { "shrink-empty", "test shrinking an empty table", test_shrink_empty }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test hash map\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/range-map-test.c0000644000175000017500000003500512470242646015231 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the routines defined in range-map.c. This test program aims to be as comprehensive as possible. With -DNDEBUG, "gcov -b" should report 100% coverage of lines and branches in range-map.c routines. (Without -DNDEBUG, branches caused by failed assertions will not be taken.) "valgrind --leak-check=yes --show-reachable=yes" should give a clean report, both with and without -DNDEBUG. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include "xalloc.h" /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT blocks in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its blocks (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if (values[i] < values[i + 1]) { size_t j; for (j = cnt - 1; values[i] >= values[j]; j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; /* Disallow N values that overflow on 32-bit machines. */ assert (n <= 12); for (; n > 1; ) value *= n--; return value; } /* Tests whether PARTS is a K-part integer composition of N. Returns true if so, false otherwise. */ static bool UNUSED is_k_composition (int n, int k, const int parts[]) { int sum; int i; sum = 0; for (i = 0; i < k; i++) { if (parts[i] < 1 || parts[i] > n) return false; sum += parts[i]; } return sum == n; } /* Advances the K-part integer composition of N stored in PARTS to the next lexicographically greater one. Returns true if successful, false if the composition was already the greatest K-part composition of N (in which case PARTS is unaltered). */ static bool next_k_composition (int n UNUSED, int k, int parts[]) { int x, i; assert (is_k_composition (n, k, parts)); if (k == 1) return false; for (i = k - 1; i > 0; i--) if (parts[i] > 1) break; if (i == 0) return false; x = parts[i] - 1; parts[i] = 1; parts[i - 1]++; parts[k - 1] = x; assert (is_k_composition (n, k, parts)); return true; } /* Sets the K integers in PARTS to the lexicographically first K-part composition of N. */ static void first_k_composition (int n, int k, int parts[]) { int i; assert (n >= k); for (i = 0; i < k; i++) parts[i] = 1; parts[k - 1] += n - k; } /* Advances *K and PARTS to the next integer composition of N. Compositions are ordered from shortest to longest and in lexicographical order within a given length. Before the first call, initialize *K to 0. After each successful call, *K contains the length of the current composition and the *K blocks in PARTS contain its parts. Returns true if successful, false if the set of compositions has been exhausted. */ static bool next_composition (int n, int *k, int parts[]) { if (*k >= 1 && next_k_composition (n, *k, parts)) return true; else if (*k < n) { first_k_composition (n, ++*k, parts); return true; } else return false; } /* Test data element. */ struct element { struct range_map_node node; /* Embedded tower block. */ int x; /* Primary value. */ }; static struct element * range_map_node_to_element (struct range_map_node *node) { return range_map_data (node, struct element, node); } /* Element we expect to find. */ struct expected_element { int x; /* Primary value. */ unsigned long int start; /* Start of region. */ unsigned long int end; /* End of region. */ }; /* Compares expected_element A and B and returns a strcmp()-type result. */ static int compare_expected_element (const void *a_, const void *b_) { const struct expected_element *a = (const struct expected_element *) a_; const struct expected_element *b = (const struct expected_element *) b_; return a->start < b->start ? -1 : a->start > b->start; } /* Checks that RM contains the ELEM_CNT elements described by ELEMENTS[]. */ static void check_range_map (struct range_map *rm, struct expected_element elements[], size_t elem_cnt) { struct expected_element *sorted; struct range_map_node *node; size_t i; sorted = xnmalloc (elem_cnt, sizeof *sorted); memcpy (sorted, elements, elem_cnt * sizeof *elements); qsort (sorted, elem_cnt, sizeof *sorted, compare_expected_element); check (range_map_is_empty (rm) == (elem_cnt == 0)); for (i = 0; i < elem_cnt; i++) { struct expected_element *e = &sorted[i]; unsigned long int position; /* Check that range_map_lookup finds all the positions within the element. */ for (position = e->start; position < e->end; position++) { struct range_map_node *found = range_map_lookup (rm, position); check (found != NULL); check (range_map_node_to_element (found)->x == e->x); check (range_map_node_get_start (found) == e->start); check (range_map_node_get_end (found) == e->end); check (range_map_node_get_width (found) == e->end - e->start); } /* If there shouldn't be any elements in the positions just before or after the element, verify that range_map_lookup doesn't find any there. */ if (e->start > 0 && (i == 0 || e[-1].end < e->start)) check (range_map_lookup (rm, e->start - 1) == NULL); if (i == elem_cnt - 1 || e->end < e[1].start) check (range_map_lookup (rm, e->end) == NULL); } for (node = (rand () % 2 ? range_map_first (rm) : range_map_next (rm, NULL)), i = 0; node != NULL; node = range_map_next (rm, node), i++) { struct expected_element *e = &sorted[i]; check (range_map_node_to_element (node)->x == e->x); } check (i == elem_cnt); free (sorted); } /* Tests inserting all possible sets of ranges into a range map in all possible orders, up to a specified maximum overall range. */ static void test_insert (void) { const int max_range = 7; int cnt; for (cnt = 1; cnt <= max_range; cnt++) { unsigned int composition_cnt; struct expected_element *expected; int *widths; int elem_cnt; int *order; struct element *elements; expected = xnmalloc (cnt, sizeof *expected); widths = xnmalloc (cnt, sizeof *widths); order = xnmalloc (cnt, sizeof *order); elements = xnmalloc (cnt, sizeof *elements); elem_cnt = 0; composition_cnt = 0; while (next_composition (cnt, &elem_cnt, widths)) { int i, j; unsigned int permutation_cnt; for (i = 0; i < elem_cnt; i++) order[i] = i; permutation_cnt = 0; while (permutation_cnt == 0 || next_permutation (order, elem_cnt)) { struct range_map rm; /* Inserts the elem_cnt elements with the given widths[] into T in the order given by order[]. */ range_map_init (&rm); for (i = 0; i < elem_cnt; i++) { unsigned long int start, end; int idx; idx = order[i]; elements[idx].x = idx; /* Find start and end of element. */ start = 0; for (j = 0; j < idx; j++) start += widths[j]; end = start + widths[j]; /* Insert. */ range_map_insert (&rm, start, end - start, &elements[idx].node); /* Check map contents. */ expected[i].x = idx; expected[i].start = start; expected[i].end = end; check_range_map (&rm, expected, i + 1); } permutation_cnt++; } check (permutation_cnt == factorial (elem_cnt)); composition_cnt++; } check (composition_cnt == 1 << (cnt - 1)); free (expected); free (widths); free (order); free (elements); } } /* Tests deleting ranges from a range map in all possible orders, up to a specified maximum overall range. */ static void test_delete (int gap) { const int max_range = 7; int cnt; for (cnt = 1; cnt <= max_range; cnt++) { unsigned int composition_cnt; struct expected_element *expected; int *widths; int elem_cnt; int *order; struct element *elements; expected = xnmalloc (cnt, sizeof *expected); widths = xnmalloc (cnt, sizeof *widths); order = xnmalloc (cnt, sizeof *order); elements = xnmalloc (cnt, sizeof *elements); elem_cnt = 0; composition_cnt = 0; while (next_composition (cnt, &elem_cnt, widths)) { int i, j; unsigned int permutation_cnt; for (i = 0; i < elem_cnt; i++) order[i] = i; permutation_cnt = 0; while (permutation_cnt == 0 || next_permutation (order, elem_cnt)) { struct range_map rm; unsigned long int start; /* Insert all the elements. */ range_map_init (&rm); start = 0; for (i = 0; i < elem_cnt; i++) { int width = widths[i] > gap ? widths[i] - gap : widths[i]; unsigned long int end = start + width; elements[i].x = i; range_map_insert (&rm, start, end - start, &elements[i].node); for (j = 0; ; j++) { assert (j < elem_cnt); if (order[j] == i) { expected[j].x = i; expected[j].start = start; expected[j].end = end; break; } } start += widths[i]; } check_range_map (&rm, expected, elem_cnt); /* Delete the elements in the specified order. */ for (i = 0; i < elem_cnt; i++) { range_map_delete (&rm, &elements[order[i]].node); check_range_map (&rm, expected + i + 1, elem_cnt - i - 1); } permutation_cnt++; } check (permutation_cnt == factorial (elem_cnt)); composition_cnt++; } check (composition_cnt == 1 << (cnt - 1)); free (expected); free (widths); free (order); free (elements); } } /* Tests deleting ranges from a range map filled with contiguous ranges in all possible orders, up to a specified maximum overall range. */ static void test_delete_contiguous (void) { test_delete (0); } /* Tests deleting ranges from a range map filled with ranges sometimes separated by gaps in all possible orders, up to a specified maximum overall range. */ static void test_delete_gaps (void) { test_delete (1); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert", "insert", test_insert }, { "delete-contiguous", "delete from contiguous ranges", test_delete_contiguous }, { "delete-gaps", "delete from ranges separated by gaps", test_delete_gaps }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test range map library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/hmap.at0000644000175000017500000000361213137223525013507 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([Hash map (hmap) library]) m4_define([CHECK_HMAP], [AT_SETUP([hmap -- $1]) AT_CHECK([hmap-test $1]) AT_CLEANUP]) CHECK_HMAP([insert-any-remove-any-random-hash]) CHECK_HMAP([insert-any-remove-any-identity-hash]) CHECK_HMAP([insert-any-remove-any-constant-hash]) CHECK_HMAP([insert-any-remove-same-random-hash]) CHECK_HMAP([insert-any-remove-same-identity-hash]) CHECK_HMAP([insert-any-remove-same-constant-hash]) CHECK_HMAP([insert-any-remove-reverse-random-hash]) CHECK_HMAP([insert-any-remove-reverse-identity-hash]) CHECK_HMAP([insert-any-remove-reverse-constant-hash]) CHECK_HMAP([random-sequence-random-hash]) CHECK_HMAP([random-sequence-identity-hash]) CHECK_HMAP([random-sequence-constant-hash]) CHECK_HMAP([insert-ordered-random-hash]) CHECK_HMAP([insert-ordered-identity-hash]) CHECK_HMAP([insert-ordered-constant-hash]) CHECK_HMAP([moved-random-hash]) CHECK_HMAP([moved-identity-hash]) CHECK_HMAP([moved-constant-hash]) CHECK_HMAP([changed-random-hash]) CHECK_HMAP([changed-identity-hash]) CHECK_HMAP([changed-constant-hash]) CHECK_HMAP([swap-random-hash]) CHECK_HMAP([clear]) CHECK_HMAP([destroy-null]) CHECK_HMAP([shrink-empty]) pspp-1.0.1/tests/libpspp/u8-istream.at0000644000175000017500000001602513137223525014562 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([u8_istream]) AT_SETUP([read ASCII]) AT_KEYWORDS([u8_istream]) AT_CHECK([i18n-test supports_encodings ASCII]) AT_CHECK([echo string | u8-istream-test read - ASCII], [0], [string ]) AT_CLEANUP AT_SETUP([read UTF-8]) AT_KEYWORDS([u8_istream]) AT_CHECK([printf '\346\227\245\346\234\254\350\252\236\n' | u8-istream-test read - UTF-8], [0], [dnl UTF-8 mode 日本語 UTF-8 mode ]) AT_CLEANUP AT_SETUP([read EUC-JP]) AT_KEYWORDS([u8_istream]) AT_CHECK([i18n-test supports_encodings EUC-JP]) AT_CHECK([printf '\244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 \244\250 \244\251 \244\252\n' | u8-istream-test read - EUC-JP], [0], [ぁ あ ぃ い ぅ う ぇ え ぉ お ]) AT_CLEANUP AT_SETUP([read UTF-8 with character split across input buffers]) AT_KEYWORDS([u8_istream]) buffer_size=`u8-istream-test buffer-size` ($PERL -e "print 'x' x ($buffer_size - 16)" printf '\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\n') > input (echo "UTF-8 mode" cat input echo "UTF-8 mode") > expout AT_CHECK([u8-istream-test read input UTF-8 16], [0], [expout]) AT_CLEANUP AT_SETUP([read UTF-8 with character split across output buffers]) AT_KEYWORDS([u8_istream]) AT_CHECK([printf '\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\n' | u8-istream-test read - UTF-8 16], [0], [dnl UTF-8 mode ぁあぃいぅうぇえぉお UTF-8 mode ]) AT_CLEANUP AT_SETUP([read UTF-8 with character split across input and output buffers]) AT_KEYWORDS([u8_istream]) buffer_size=`u8-istream-test buffer-size` ($PERL -e "print 'x' x ($buffer_size - 16)" printf '\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\n') > input (echo "UTF-8 mode" cat input echo "UTF-8 mode") > expout AT_CHECK([u8-istream-test read input UTF-8 16], [0], [expout]) AT_CLEANUP AT_SETUP([read EUC-JP with character split across input buffers]) AT_KEYWORDS([u8_istream]) AT_CHECK([i18n-test supports_encodings EUC-JP]) buffer_size=`u8-istream-test buffer-size` ($PERL -e "print 'x' x ($buffer_size - 16)" printf '\244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 ' printf '\244\250 \244\251 \244\252\n') > input ($PERL -e "print 'x' x ($buffer_size - 16)" printf '\343\201\201\040\343\201\202\040\343\201\203\040\343\201\204\040' printf '\343\201\205\040\343\201\206\040\343\201\207\040\343\201\210\040' printf '\343\201\211\040\343\201\212\n') > expout AT_CHECK([u8-istream-test read input EUC-JP], [0], [expout]) AT_CLEANUP AT_SETUP([read EUC-JP with character split across output buffers]) AT_KEYWORDS([u8_istream]) AT_CHECK([i18n-test supports_encodings EUC-JP]) AT_CHECK([printf '\244\241\244\242\244\243\244\244\244\245\244\246\244\247\244\250\244\251\244\252\n' | u8-istream-test read - EUC-JP 16], [0], [ぁあぃいぅうぇえぉお ]) AT_CLEANUP AT_SETUP([read EUC-JP with character split across input and output buffers]) AT_KEYWORDS([u8_istream]) AT_CHECK([i18n-test supports_encodings EUC-JP]) buffer_size=`u8-istream-test buffer-size` ($PERL -e "print 'x' x ($buffer_size - 16)" printf 'xyz\244\241\244\242\244\243\244\244\244\245\244\246\244\247\244\250' printf '\244\251\244\252\n') > input ($PERL -e "print 'x' x ($buffer_size - 16)" printf '\170\171\172\343\201\201\343\201\202\343\201\203\343\201\204\343' printf '\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201' printf '\212\n') > expout AT_CHECK([u8-istream-test read input EUC-JP 16], [0], [expout]) AT_CLEANUP AT_SETUP([read ASCII as Auto]) AT_KEYWORDS([u8_istream]) AT_CHECK([echo string | u8-istream-test read - Auto], [0], [dnl Auto mode string Auto mode ]) AT_CLEANUP AT_SETUP([read UTF-8 as Auto]) AT_KEYWORDS([u8_istream]) AT_CHECK([printf 'entr\303\251e\n' | u8-istream-test read - Auto], [0], [dnl Auto mode entrée UTF-8 mode ]) AT_CHECK([printf '\357\273\277entr\303\251e\n' | u8-istream-test read - Auto], [0], [dnl UTF-8 mode entrée UTF-8 mode ]) AT_CLEANUP AT_SETUP([read ISO-8859-1 as Auto,ISO-8859-1]) AT_KEYWORDS([u8_istream]) AT_CHECK([i18n-test supports_encodings ISO-8859-1]) buffer_size=`u8-istream-test buffer-size` ($PERL -e 'print "xyzzy\n" x int('$buffer_size' * 2.5 / 7)'; printf 'entr\351e\n') > input (echo "Auto mode" $PERL -e 'print "xyzzy\n" x int('$buffer_size' * 2.5 / 7)' printf 'entr\303\251e\n') > expout AT_CHECK([u8-istream-test read input Auto,ISO-8859-1], [0], [expout]) AT_CLEANUP dnl UTF-16BE is not ASCII compatible so this doesn't start out in Auto mode. AT_SETUP([read UTF-16BE as Auto,UTF-16BE]) AT_KEYWORDS([u8_istream]) AT_CHECK([i18n-test supports_encodings UTF-16BE]) AT_CHECK([printf '\0e\0n\0t\0r\0\351\0e\0\n' | u8-istream-test read - Auto,UTF-16BE], [0], [dnl entrée ]) AT_CLEANUP AT_SETUP([read UTF-16 as Auto]) AT_KEYWORDS([u8_istream]) AT_CHECK([i18n-test supports_encodings UTF-16 UTF-16BE UTF-16LE]) dnl The "sleep 1" checks for a bug in which u8-istream did not properly dnl handle receiving data in multiple chunks. AT_CHECK([{ printf '\0e\0n\0t\0'; sleep 1; printf 'r\0\351\0e\0\n'; } | u8-istream-test read - Auto], [0], [entrée ]) AT_CHECK([printf 'e\0n\0t\0r\0\351\0e\0\n\0' | u8-istream-test read - Auto], [0], [entrée ]) AT_CHECK([printf '\376\377\0e\0n\0t\0r\0\351\0e\0\n' | u8-istream-test read - Auto], [0], [entrée ]) AT_CHECK([printf '\377\376e\0n\0t\0r\0\351\0e\0\n\0' | u8-istream-test read - Auto], [0], [entrée ]) AT_CLEANUP AT_SETUP([read UTF-32 as Auto]) AT_KEYWORDS([u8_istream]) AT_CHECK([i18n-test supports_encodings UTF-16 UTF-16BE UTF-16LE]) AT_CHECK([printf '\0\0\0e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n' | u8-istream-test read - Auto], [0], [entrée ]) AT_CHECK([printf 'e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n\0\0\0' | u8-istream-test read - Auto], [0], [entrée ]) AT_CHECK([printf '\0\0\376\377\0\0\0e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n' | u8-istream-test read - Auto], [0], [entrée ]) AT_CHECK([printf '\377\376\0\0e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n\0\0\0' | u8-istream-test read - Auto], [0], [entrée ]) AT_CLEANUP AT_SETUP([read EUC-JP as Auto,EUC-JP]) AT_KEYWORDS([u8_istream]) AT_CHECK([i18n-test supports_encodings EUC-JP]) AT_CHECK([printf 'entr\217\253\261e\n' | u8-istream-test read - Auto,EUC-JP], [0], [entrée ]) AT_CLEANUP pspp-1.0.1/tests/libpspp/zip-test.c0000644000175000017500000000533413143642441014161 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* A simple program to zip or unzip a file */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "libpspp/assertion.h" #include #include #include #include #include #include "xalloc.h" /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } int main (int argc, char **argv) { if ( argc < 4) { fprintf (stderr, "Usage zip-test: {r|w} archive file0 file1 ... filen\n"); check_die (); } if ( 0 == strcmp ("w", argv[1])) { int i; struct zip_writer *zw = zip_writer_create (argv[2]); for (i = 3; i < argc; ++i) { FILE *fp = fopen (argv[i], "r"); if (!fp ) check_die (); zip_writer_add (zw, fp, argv[i]); } zip_writer_close (zw); } else if ( 0 == strcmp ("r", argv[1])) { const int BUFSIZE=256; char buf[BUFSIZE]; int i; struct string str; struct zip_reader *zr = zip_reader_create (argv[2], &str); if ( NULL == zr) { fprintf (stderr, "Could not create zip reader: %s\n", ds_cstr (&str)); check_die (); } for (i = 3; i < argc; ++i) { int x = 0; struct zip_member *zm ; FILE *fp = fopen (argv[i], "w"); if ( NULL == fp) { int e = errno; fprintf (stderr, "Could not create file %s: %s\n", argv[i], strerror(e)); check_die (); } zm = zip_member_open (zr, argv[i]); if ( NULL == zm) { fprintf (stderr, "Could not open zip member %s from archive: %s\n", argv[i], ds_cstr (&str)); check_die (); } while ((x = zip_member_read (zm, buf, BUFSIZE)) > 0) { fwrite (buf, x, 1, fp); } fclose (fp); if ( x < 0) { fprintf (stderr, "Unzip failed: %s\n", ds_cstr (&str)); check_die (); } } zip_reader_destroy (zr); } else exit (1); return 0; } pspp-1.0.1/tests/libpspp/cmac-aes256-test.c0000644000175000017500000000704612523704223015265 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "libpspp/cmac-aes256.h" #undef NDEBUG #include static void test_cmac (const uint8_t key[32], size_t key_size, const uint8_t *data, size_t data_size, const uint8_t *exp_cmac, size_t exp_cmac_size) { uint8_t cmac[16]; assert (key_size == 32); assert (exp_cmac_size <= 16); cmac_aes256 (key, data, data_size, cmac); assert (!memcmp (cmac, exp_cmac, exp_cmac_size)); } /* From NIST CMAC test vectors. */ static void test_cmac1 (void) { static const uint8_t key[] = { 0x0b,0x12,0x2a,0xc8, 0xf3,0x4e,0xd1,0xfe, 0x08,0x2a,0x36,0x25, 0xd1,0x57,0x56,0x14, 0x54,0x16,0x7a,0xc1, 0x45,0xa1,0x0b,0xbf, 0x77,0xc6,0xa7,0x05, 0x96,0xd5,0x74,0xf1 }; static const uint8_t data[] = { 0x49,0x8b,0x53,0xfd, 0xec,0x87,0xed,0xcb, 0xf0,0x70,0x97,0xdc, 0xcd,0xe9,0x3a,0x08, 0x4b,0xad,0x75,0x01, 0xa2,0x24,0xe3,0x88, 0xdf,0x34,0x9c,0xe1, 0x89,0x59,0xfe,0x84, 0x85,0xf8,0xad,0x15, 0x37,0xf0,0xd8,0x96, 0xea,0x73,0xbe,0xdc, 0x72,0x14,0x71,0x3f, }; static const uint8_t exp_cmac[] = { 0xf6,0x2c,0x46,0x32, 0x9b }; test_cmac (key, sizeof key, data, sizeof data, exp_cmac, sizeof exp_cmac); } /* CMAC-AES-256 test vectors from NIST's updated SP800-38B examples. */ static void test_cmac2 (void) { static const uint8_t key[] = { 0x60,0x3d,0xeb,0x10, 0x15,0xca,0x71,0xbe, 0x2b,0x73,0xae,0xf0, 0x85,0x7d,0x77,0x81, 0x1f,0x35,0x2c,0x07, 0x3b,0x61,0x08,0xd7, 0x2d,0x98,0x10,0xa3, 0x09,0x14,0xdf,0xf4, }; static const uint8_t data[] = { 0x6b,0xc1,0xbe,0xe2, 0x2e,0x40,0x9f,0x96, 0xe9,0x3d,0x7e,0x11, 0x73,0x93,0x17,0x2a, 0xae,0x2d,0x8a,0x57, 0x1e,0x03,0xac,0x9c, 0x9e,0xb7,0x6f,0xac, 0x45,0xaf,0x8e,0x51, 0x30,0xc8,0x1c,0x46, 0xa3,0x5c,0xe4,0x11, 0xe5,0xfb,0xc1,0x19, 0x1a,0x0a,0x52,0xef, 0xf6,0x9f,0x24,0x45, 0xdf,0x4f,0x9b,0x17, 0xad,0x2b,0x41,0x7b, 0xe6,0x6c,0x37,0x10, }; static const uint8_t exp_cmac0[] = { 0x02,0x89,0x62,0xf6, 0x1b,0x7b,0xf8,0x9e, 0xfc,0x6b,0x55,0x1f, 0x46,0x67,0xd9,0x83, }; static const uint8_t exp_cmac16[] = { 0x28,0xa7,0x02,0x3f, 0x45,0x2e,0x8f,0x82, 0xbd,0x4b,0xf2,0x8d, 0x8c,0x37,0xc3,0x5c, }; static const uint8_t exp_cmac40[] = { 0xaa,0xf3,0xd8,0xf1, 0xde,0x56,0x40,0xc2, 0x32,0xf5,0xb1,0x69, 0xb9,0xc9,0x11,0xe6, }; static const uint8_t exp_cmac64[] = { 0xe1,0x99,0x21,0x90, 0x54,0x9f,0x6e,0xd5, 0x69,0x6a,0x2c,0x05, 0x6c,0x31,0x54,0x10, }; test_cmac (key, sizeof key, data, 0, exp_cmac0, sizeof exp_cmac0); test_cmac (key, sizeof key, data, 16, exp_cmac16, sizeof exp_cmac16); test_cmac (key, sizeof key, data, 40, exp_cmac40, sizeof exp_cmac40); test_cmac (key, sizeof key, data, 64, exp_cmac64, sizeof exp_cmac64); } int main(void) { test_cmac1 (); test_cmac2 (); return 0; } pspp-1.0.1/tests/libpspp/str-test.c0000644000175000017500000000536712523704223014173 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2010, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } static void check_26adic (unsigned long int number, const char *expected_string) { char string[8]; str_format_26adic (number, true, string, sizeof string); if (strcmp (string, expected_string)) { printf ("base-26 of %lu: expected \"%s\", got \"%s\"\n", number, expected_string, string); check_die (); } } static void test_format_26adic (void) { check_26adic (0, ""); check_26adic (1, "A"); check_26adic (2, "B"); check_26adic (26, "Z"); check_26adic (27, "AA"); check_26adic (28, "AB"); check_26adic (29, "AC"); check_26adic (18278, "ZZZ"); check_26adic (18279, "AAAA"); check_26adic (19010, "ABCD"); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "format-26adic", "format 26-adic strings", test_format_26adic } }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test string library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/range-tower.at0000644000175000017500000000217013137223525015012 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([range tower library]) m4_define([CHECK_RANGE_TOWER], [AT_SETUP([range-tower -- $1]) AT_CHECK([range-tower-test $1]) AT_CLEANUP]) CHECK_RANGE_TOWER([set1]) CHECK_RANGE_TOWER([set0]) CHECK_RANGE_TOWER([insert0]) CHECK_RANGE_TOWER([insert1]) CHECK_RANGE_TOWER([delete]) CHECK_RANGE_TOWER([move]) CHECK_RANGE_TOWER([pool]) CHECK_RANGE_TOWER([destroy-null]) pspp-1.0.1/tests/libpspp/string-map-test.c0000644000175000017500000005717112470242646015453 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the string_map_* routines defined in string-map.c. This test program aims to be as comprehensive as possible. "gcov -a -b" should report almost complete coverage of lines, blocks and branches in string-map.c, except that one branch caused by hash collision is not exercised because our hash function has so few collisions. "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } static void *xmalloc (size_t n) MALLOC_LIKE; static void *xnmalloc (size_t n, size_t m) MALLOC_LIKE; static void *xmemdup (const void *p, size_t n) MALLOC_LIKE; /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } static void * xmemdup (const void *p, size_t n) { void *q = xmalloc (n); memcpy (q, p, n); return q; } /* Clone STRING. */ static char * xstrdup (const char *string) { return xmemdup (string, strlen (string) + 1); } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* Support routines. */ enum { IDX_BITS = 10, MAX_IDX = 1 << IDX_BITS, KEY_MASK = (MAX_IDX - 1), KEY_SHIFT = 0, VALUE_MASK = (MAX_IDX - 1) << IDX_BITS, VALUE_SHIFT = IDX_BITS }; static char *string_table[MAX_IDX]; static const char * get_string (int idx) { char **s; assert (idx >= 0 && idx < MAX_IDX); s = &string_table[idx]; if (*s == NULL) { *s = xmalloc (16); sprintf (*s, "%d", idx); } return *s; } static void free_strings (void) { int i; for (i = 0; i < MAX_IDX; i++) free (string_table[i]); } static const char * make_key (int value) { return get_string ((value & KEY_MASK) >> KEY_SHIFT); } static const char * make_value (int value) { return get_string ((value & VALUE_MASK) >> VALUE_SHIFT); } static int random_value (unsigned int seed, int basis) { return hash_int (seed, basis) & VALUE_MASK; } /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT elements in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. Comparisons among elements of VALUES consider only the bits in KEY_MASK. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if ((values[i] & KEY_MASK) < (values[i + 1] & KEY_MASK)) { size_t j; for (j = cnt - 1; (values[i] & KEY_MASK) >= (values[j] & KEY_MASK); j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } /* Checks that MAP contains the CNT strings in DATA, that its structure is correct, and that certain operations on MAP produce the expected results. */ static void check_string_map (struct string_map *map, const int data[], size_t cnt) { size_t i; check (string_map_is_empty (map) == (cnt == 0)); check (string_map_count (map) == cnt); for (i = 0; i < cnt; i++) { struct string_map_node *node; const char *key = make_key (data[i]); const char *value = make_value (data[i]); const char *found_value; check (string_map_contains (map, key)); node = string_map_find_node (map, key); check (node != NULL); check (!strcmp (key, string_map_node_get_key (node))); check (!strcmp (value, string_map_node_get_value (node))); check (node == string_map_insert (map, key, "abc")); check (!strcmp (value, string_map_node_get_value (node))); check (node == string_map_insert_nocopy (map, xstrdup (key), xstrdup ("def"))); check (!strcmp (value, string_map_node_get_value (node))); found_value = string_map_find (map, key); check (found_value != NULL); check (!strcmp (found_value, value)); } check (!string_map_contains (map, "xxx")); check (string_map_find (map, "z") == NULL); check (string_map_find_node (map, "") == NULL); check (!string_map_delete (map, "xyz")); if (cnt == 0) check (string_map_first (map) == NULL); else { const struct string_map_node *node; int *data_copy; int left; data_copy = xmemdup (data, cnt * sizeof *data); left = cnt; for (node = string_map_first (map), i = 0; i < cnt; node = string_map_next (map, node), i++) { const char *key = string_map_node_get_key (node); const char *value = string_map_node_get_value (node); size_t j; for (j = 0; j < left; j++) if (!strcmp (key, make_key (data_copy[j])) || !strcmp (value, make_value (data_copy[j]))) { data_copy[j] = data_copy[--left]; goto next; } check_die (); next: ; } check (node == NULL); free (data_copy); } } /* Inserts the CNT strings from 0 to CNT - 1 (inclusive) into a map in the order specified by INSERTIONS, then deletes them in the order specified by DELETIONS, checking the map's contents for correctness after each operation. */ static void test_insert_delete (const int insertions[], const int deletions[], size_t cnt) { struct string_map map; size_t i; string_map_init (&map); check_string_map (&map, NULL, 0); for (i = 0; i < cnt; i++) { check (string_map_insert (&map, make_key (insertions[i]), make_value (insertions[i]))); check_string_map (&map, insertions, i + 1); } for (i = 0; i < cnt; i++) { check (string_map_delete (&map, make_key (deletions[i]))); check_string_map (&map, deletions + i + 1, cnt - i - 1); } string_map_destroy (&map); } /* Inserts strings into a map in each possible order, then removes them in each possible order, up to a specified maximum size. */ static void test_insert_any_remove_any (void) { const int basis = 0; const int max_elems = 5; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int ins_perm_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i | random_value (i, basis); for (ins_perm_cnt = 0; ins_perm_cnt == 0 || next_permutation (insertions, cnt); ins_perm_cnt++) { unsigned int del_perm_cnt; int i; for (i = 0; i < cnt; i++) deletions[i] = i | random_value (i, basis); for (del_perm_cnt = 0; del_perm_cnt == 0 || next_permutation (deletions, cnt); del_perm_cnt++) test_insert_delete (insertions, deletions, cnt); check (del_perm_cnt == factorial (cnt)); } check (ins_perm_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts strings into a map in each possible order, then removes them in the same order, up to a specified maximum size. */ static void test_insert_any_remove_same (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); for (i = 0; i < cnt; i++) values[i] = i | random_value (i, 1); for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) test_insert_delete (values, values, cnt); check (permutation_cnt == factorial (cnt)); free (values); } } /* Inserts strings into a map in each possible order, then removes them in reverse order, up to a specified maximum size. */ static void test_insert_any_remove_reverse (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int permutation_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i | random_value (i, 2); for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (insertions, cnt); permutation_cnt++) { memcpy (deletions, insertions, sizeof *insertions * cnt); reverse (deletions, cnt); test_insert_delete (insertions, deletions, cnt); } check (permutation_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts and removes strings in a map, in random order. */ static void test_random_sequence (void) { const int basis = 3; const int max_elems = 64; const int max_trials = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt += 2) { int *insertions, *deletions; int trial; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i | random_value (i, basis); for (i = 0; i < cnt; i++) deletions[i] = i | random_value (i, basis); for (trial = 0; trial < max_trials; trial++) { random_shuffle (insertions, cnt, sizeof *insertions); random_shuffle (deletions, cnt, sizeof *deletions); test_insert_delete (insertions, deletions, cnt); } free (insertions); free (deletions); } } /* Inserts strings into a map in ascending order, then delete in ascending order. */ static void test_insert_ordered (void) { const int max_elems = 64; int *values; struct string_map map; int i; string_map_init (&map); values = xnmalloc (max_elems, sizeof *values); for (i = 0; i < max_elems; i++) { values[i] = i | random_value (i, 4); string_map_insert_nocopy (&map, xstrdup (make_key (values[i])), xstrdup (make_value (values[i]))); check_string_map (&map, values, i + 1); } for (i = 0; i < max_elems; i++) { string_map_delete (&map, make_key (i)); check_string_map (&map, values + i + 1, max_elems - i - 1); } string_map_destroy (&map); free (values); } /* Inserts and replaces strings in a map, in random order. */ static void test_replace (void) { const int basis = 15; enum { MAX_ELEMS = 16 }; const int max_trials = 8; int cnt; for (cnt = 0; cnt <= MAX_ELEMS; cnt++) { int insertions[MAX_ELEMS]; int trial; int i; for (i = 0; i < cnt; i++) insertions[i] = (i / 2) | random_value (i, basis); for (trial = 0; trial < max_trials; trial++) { struct string_map map; int data[MAX_ELEMS]; int n_data; /* Insert with replacement in random order. */ n_data = 0; string_map_init (&map); random_shuffle (insertions, cnt, sizeof *insertions); for (i = 0; i < cnt; i++) { const char *key = make_key (insertions[i]); const char *value = make_value (insertions[i]); int j; for (j = 0; j < n_data; j++) if ((data[j] & KEY_MASK) == (insertions[i] & KEY_MASK)) { data[j] = insertions[i]; goto found; } data[n_data++] = insertions[i]; found: if (i % 2) string_map_replace (&map, key, value); else string_map_replace_nocopy (&map, xstrdup (key), xstrdup (value)); check_string_map (&map, data, n_data); } /* Delete in original order. */ for (i = 0; i < cnt; i++) { const char *expected_value; char *value; int j; expected_value = NULL; for (j = 0; j < n_data; j++) if ((data[j] & KEY_MASK) == (insertions[i] & KEY_MASK)) { expected_value = make_value (data[j]); data[j] = data[--n_data]; break; } value = string_map_find_and_delete (&map, make_key (insertions[i])); check ((value != NULL) == (expected_value != NULL)); check (value == NULL || !strcmp (value, expected_value)); free (value); } assert (string_map_is_empty (&map)); string_map_destroy (&map); } } } static void make_patterned_map (struct string_map *map, unsigned int pattern, int basis, int insertions[], int *np) { int n; int i; string_map_init (map); n = 0; for (i = 0; pattern != 0; i++) if (pattern & (1u << i)) { pattern &= pattern - 1; insertions[n] = i | random_value (i, basis); check (string_map_insert (map, make_key (insertions[n]), make_value (insertions[n]))); n++; } check_string_map (map, insertions, n); *np = n; } static void for_each_map (void (*cb)(struct string_map *, int data[], int n), int basis) { enum { MAX_ELEMS = 5 }; unsigned int pattern; for (pattern = 0; pattern < (1u << MAX_ELEMS); pattern++) { int data[MAX_ELEMS]; struct string_map map; int n; make_patterned_map (&map, pattern, basis, data, &n); (*cb) (&map, data, n); string_map_destroy (&map); } } static void for_each_pair_of_maps ( void (*cb)(struct string_map *a, int a_data[], int n_a, struct string_map *b, int b_data[], int n_b), int a_basis, int b_basis) { enum { MAX_ELEMS = 5 }; unsigned int a_pattern, b_pattern; for (a_pattern = 0; a_pattern < (1u << MAX_ELEMS); a_pattern++) for (b_pattern = 0; b_pattern < (1u << MAX_ELEMS); b_pattern++) { int a_data[MAX_ELEMS], b_data[MAX_ELEMS]; struct string_map a_map, b_map; int n_a, n_b; make_patterned_map (&a_map, a_pattern, a_basis, a_data, &n_a); make_patterned_map (&b_map, b_pattern, b_basis, b_data, &n_b); (*cb) (&a_map, a_data, n_a, &b_map, b_data, n_b); string_map_destroy (&a_map); string_map_destroy (&b_map); } } static void clear_cb (struct string_map *map, int data[] UNUSED, int n UNUSED) { string_map_clear (map); check_string_map (map, NULL, 0); } static void test_clear (void) { for_each_map (clear_cb, 5); } static void clone_cb (struct string_map *map, int data[], int n) { struct string_map clone; string_map_clone (&clone, map); check_string_map (&clone, data, n); string_map_destroy (&clone); } static void test_clone (void) { for_each_map (clone_cb, 6); } static void node_swap_value_cb (struct string_map *map, int data[], int n) { int i; for (i = 0; i < n; i++) { const char *value = make_value (data[i]); struct string_map_node *node; char *old_value; node = string_map_find_node (map, make_key (data[i])); check (node != NULL); check (!strcmp (string_map_node_get_value (node), value)); data[i] = (data[i] & KEY_MASK) | random_value (i, 15); old_value = string_map_node_swap_value (node, make_value (data[i])); check (old_value != NULL); check (!strcmp (value, old_value)); free (old_value); } } static void test_node_swap_value (void) { for_each_map (node_swap_value_cb, 14); } static void swap_cb (struct string_map *a, int a_data[], int n_a, struct string_map *b, int b_data[], int n_b) { string_map_swap (a, b); check_string_map (a, b_data, n_b); check_string_map (b, a_data, n_a); } static void test_swap (void) { for_each_pair_of_maps (swap_cb, 7, 8); } static void insert_map_cb (struct string_map *a, int a_data[], int n_a, struct string_map *b, int b_data[], int n_b) { int i, j; string_map_insert_map (a, b); for (i = 0; i < n_b; i++) { for (j = 0; j < n_a; j++) if ((b_data[i] & KEY_MASK) == (a_data[j] & KEY_MASK)) goto found; a_data[n_a++] = b_data[i]; found:; } check_string_map (a, a_data, n_a); check_string_map (b, b_data, n_b); } static void test_insert_map (void) { for_each_pair_of_maps (insert_map_cb, 91, 10); } static void replace_map_cb (struct string_map *a, int a_data[], int n_a, struct string_map *b, int b_data[], int n_b) { int i, j; string_map_replace_map (a, b); for (i = 0; i < n_b; i++) { for (j = 0; j < n_a; j++) if ((b_data[i] & KEY_MASK) == (a_data[j] & KEY_MASK)) { a_data[j] = (a_data[j] & KEY_MASK) | (b_data[i] & VALUE_MASK); goto found; } a_data[n_a++] = b_data[i]; found:; } check_string_map (a, a_data, n_a); check_string_map (b, b_data, n_b); } static void test_replace_map (void) { for_each_pair_of_maps (replace_map_cb, 11, 12); } static void check_set (struct string_set *set, const int *data, int n_data, int mask, int shift) { int *unique; int n_unique; int i; n_unique = 0; unique = xmalloc (n_data * sizeof *unique); for (i = 0; i < n_data; i++) { int idx = (data[i] & mask) >> shift; int j; for (j = 0; j < n_unique; j++) if (unique[j] == idx) goto found; unique[n_unique++] = idx; found:; } check (string_set_count (set) == n_unique); for (i = 0; i < n_unique; i++) check (string_set_contains (set, get_string (unique[i]))); string_set_destroy (set); free (unique); } static void get_keys_and_values_cb (struct string_map *map, int data[], int n) { struct string_set keys, values; string_set_init (&keys); string_set_init (&values); string_map_get_keys (map, &keys); string_map_get_values (map, &values); check_set (&keys, data, n, KEY_MASK, KEY_SHIFT); check_set (&values, data, n, VALUE_MASK, VALUE_SHIFT); } static void test_get_keys_and_values (void) { for_each_map (get_keys_and_values_cb, 13); } static void test_destroy_null (void) { string_map_destroy (NULL); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert-any-remove-any", "insert any order, delete any order", test_insert_any_remove_any }, { "insert-any-remove-same", "insert any order, delete same order", test_insert_any_remove_same }, { "insert-any-remove-reverse", "insert any order, delete reverse order", test_insert_any_remove_reverse }, { "random-sequence", "insert and delete in random sequence", test_random_sequence }, { "replace", "insert and replace in random sequence", test_replace }, { "insert-ordered", "insert in ascending order", test_insert_ordered }, { "clear", "clear", test_clear }, { "clone", "clone", test_clone }, { "swap", "swap", test_swap }, { "node-swap-value", "node_swap_value", test_node_swap_value }, { "insert-map", "insert_map", test_insert_map }, { "replace-map", "replace_map", test_replace_map }, { "get-keys-and-values", "get keys and values", test_get_keys_and_values }, { "destroy-null", "destroying null table", test_destroy_null }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test string map library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); free_strings (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/str.at0000644000175000017500000000156313137223525013375 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([string library]) AT_SETUP([26-adic string formatting]) AT_CHECK([str-test format-26adic]) AT_CLEANUP pspp-1.0.1/tests/libpspp/u8-istream-test.c0000644000175000017500000000645612470243701015361 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/u8-istream.h" #include #include #include #include #include #include #include "libpspp/i18n.h" #include "gl/error.h" #include "gl/progname.h" #include "gl/xalloc.h" static void usage (void) { printf ("usage: %s COMMAND [ARG]...\n" "The available commands are:\n" " help\n" " print this usage message\n" " buffer-size\n" " print the buffer size, in bytes, on stdout\n" " read FILE ENCODING [OUTBUF]\n" " read FILE encoded in ENCODING (with output buffer size\n" " OUTBUF) and print it on stdout in UTF-8\n", program_name); exit (0); } static void cmd_read (int argc, char *argv[]) { struct u8_istream *is; const char *encoding; const char *filename; int outbufsize; char *buffer; if (argc < 4 || argc > 5) error (1, 0, "bad syntax for `%s' command; use `%s help' for help", argv[1], program_name); outbufsize = argc > 4 ? atoi (argv[4]) : 4096; buffer = xmalloc (outbufsize); filename = argv[2]; encoding = *argv[3] ? argv[3] : NULL; is = (!strcmp(filename, "-") ? u8_istream_for_fd (encoding, STDIN_FILENO) : u8_istream_for_file (encoding, filename, O_RDONLY)); if (is == NULL) error (1, errno, "u8_istream_open failed"); if (u8_istream_is_auto (is)) printf ("Auto mode\n"); else if (u8_istream_is_utf8 (is)) printf ("UTF-8 mode\n"); for (;;) { ssize_t n; n = u8_istream_read (is, buffer, outbufsize); if (n > 0) fwrite (buffer, 1, n, stdout); else if (n < 0) error (1, errno, "u8_istream_read failed"); else break; } free (buffer); if (u8_istream_is_auto (is)) printf ("Auto mode\n"); else if (u8_istream_is_utf8 (is)) printf ("UTF-8 mode\n"); if (!strcmp(filename, "-")) u8_istream_free (is); else { if (u8_istream_close (is) != 0) error (1, errno, "u8_istream_close failed"); } } int main (int argc, char *argv[]) { set_program_name (argv[0]); i18n_init (); if (argc < 2) error (1, 0, "missing command name; use `%s help' for help", program_name); else if (!strcmp(argv[1], "help") || !strcmp(argv[1], "--help")) usage (); else if (!strcmp(argv[1], "buffer-size")) printf ("%d\n", U8_ISTREAM_BUFFER_SIZE); else if (!strcmp(argv[1], "read")) cmd_read (argc, argv); else error (1, 0, "unknown command `%s'; use `%s help' for help", argv[1], program_name); return 0; } pspp-1.0.1/tests/libpspp/hmapx.at0000644000175000017500000000403513137223525013677 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([Hash map of pointers (hmapx) library]) m4_define([CHECK_HMAPX], [AT_SETUP([hmapx -- $1]) AT_CHECK([hmapx-test $1]) AT_CLEANUP]) CHECK_HMAPX([insert-any-remove-any-random-hash]) CHECK_HMAPX([insert-any-remove-any-identity-hash]) CHECK_HMAPX([insert-any-remove-any-constant-hash]) CHECK_HMAPX([insert-any-remove-same-random-hash]) CHECK_HMAPX([insert-any-remove-same-identity-hash]) CHECK_HMAPX([insert-any-remove-same-constant-hash]) CHECK_HMAPX([insert-any-remove-reverse-random-hash]) CHECK_HMAPX([insert-any-remove-reverse-identity-hash]) CHECK_HMAPX([insert-any-remove-reverse-constant-hash]) CHECK_HMAPX([random-sequence-random-hash]) CHECK_HMAPX([random-sequence-identity-hash]) CHECK_HMAPX([random-sequence-constant-hash]) CHECK_HMAPX([insert-ordered-random-hash]) CHECK_HMAPX([insert-ordered-identity-hash]) CHECK_HMAPX([insert-ordered-constant-hash]) CHECK_HMAPX([moved-random-hash]) CHECK_HMAPX([moved-identity-hash]) CHECK_HMAPX([moved-constant-hash]) CHECK_HMAPX([changed-random-hash]) CHECK_HMAPX([changed-identity-hash]) CHECK_HMAPX([changed-constant-hash]) CHECK_HMAPX([change-random-hash]) CHECK_HMAPX([change-identity-hash]) CHECK_HMAPX([change-constant-hash]) CHECK_HMAPX([swap-random-hash]) CHECK_HMAPX([clear]) CHECK_HMAPX([destroy-null]) CHECK_HMAPX([shrink-empty]) pspp-1.0.1/tests/libpspp/zip.at0000644000175000017500000000265013137223525013365 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([zip]) AT_SETUP([Basic zip - unzip test]) AT_KEYWORDS([compression]) AT_CHECK([dnl here=`pwd` dir1=$here/original dir2=$here/recovered mkdir -p $dir1 # Generate files of differing sizes with random data in them names="" s=1; while test $s -le 8192 ; do name=$dir1/$s dd if=/dev/urandom of=$name count=1 bs=$s 2> /dev/null s=$(($s * 2)); bn=`basename $name`; names="$names $bn"; done (cd $dir1 && zip-test w foo.zip $names) mkdir -p $dir2 cp $dir1/foo.zip $dir2 cd $dir2 zip-test r foo.zip $names # Compare the files to their originals for f in $names; do diff $dir1/$f $dir2/$f; if test $? -ne 0 ; then exit 1; fi; done exit 0 ]) AT_CLEANUP pspp-1.0.1/tests/libpspp/i18n.at0000644000175000017500000001255113137223525013343 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([i18n recoding]) # CHECK_I18N_RECODE([TITLE], [FROM-CODING], [TO-CODING], # [FROM-TEXT], [TO-TEXT]) # # Converts FROM-TEXT from FROM-CODING to TO-CODING and checks that the result # is TO-TEXT. The "printf" program is applied to both FROM-TEXT and TO-TEXT to # allow for backslash-escapes. (Hex escapes are not portable; use octal # escapes instead.) m4_define([CHECK_I18N_RECODE], [AT_SETUP([convert $1]) AT_KEYWORDS([i18n]) dnl Skip the test if this host doesn't know the source and target encodings. AT_CHECK([i18n-test supports_encodings '$2' '$3']) AT_CHECK_UNQUOTED([i18n-test recode '$2' '$3' `printf '$4'`], [0], [`printf '$5'` ]) AT_CLEANUP]) CHECK_I18N_RECODE([reflexively], [ASCII], [ASCII], [abc], [abc]) CHECK_I18N_RECODE([without any change], [ASCII], [UTF-8], [abc], [abc]) CHECK_I18N_RECODE([from ISO-8859-1 to UTF-8], [ISO-8859-1], [UTF-8], [\242], [\302\242]) CHECK_I18N_RECODE([from UTF-8 to ISO-8859-1], [UTF-8], [ISO-8859-1], [\302\242], [\242]) # 0xc0 == 0300 is invalid in UTF-8 CHECK_I18N_RECODE([invalid UTF-8 to ISO-8859-1], [UTF-8], [ISO-8859-1], [xy\300z], [xy?z]) # 0xc2 == 0302 is the first byte of a 2-byte UTF-8 sequence CHECK_I18N_RECODE([truncated UTF-8 to ISO-8559-1], [UTF-8], [ISO-8859-1], [xy\302], [xy?]) # Checks for a bug that caused the last character to be dropped in conversions # from encodings that have combining diacritics (e.g. windows-1258). CHECK_I18N_RECODE([dropped final character in windows-1258], [windows-1258], [UTF-8], [aeiou], [aeiou]) dnl The input to this test is 7 bytes long and the expected output is 9 bytes. dnl So it should exercise the E2BIG case CHECK_I18N_RECODE([from ISO-8859-1 to UTF-8 with overflow], [ISO-8859-1], [UTF-8], [Tsch\374\337!], [Tsch\303\274\303\237!]) AT_SETUP([convert unknown encoding]) AT_KEYWORDS([i18n]) AT_CHECK([i18n-test recode nonexistent1 nonexistent2 asdf], [0], [asdf ], [Warning: cannot create a converter for `nonexistent1' to `nonexistent2': Invalid argument ]) AT_CLEANUP AT_BANNER([i18n concatenation]) # CHECK_I18N_CONCAT([HEAD], [TAIL], [ENCODING], [MAX-LEN], [ANSWER]) # # Concatenates HEAD and TAIL, omitting as many characters from HEAD as needed # to make the result come out to no more than MAX-LEN bytes if it was expressed # in ENCODING, and checks that the answer matches ANSWER. HEAD, TAIL, and # ANSWER are all in UTF-8. The "printf" program is applied to HEAD, TAIL, and # ANSWER to allow for backslash-escapes. (Hex escapes are not portable; use # octal escapes instead.) m4_define([CHECK_I18N_CONCAT], [AT_SETUP([m4_if([$2], [], [truncate "$1" to $4 bytes in $3], [truncate "$1" + "$2" to $4 bytes in $3])]) AT_KEYWORDS([i18n]) dnl Skip the test if this host doesn't know the encoding. AT_CHECK([i18n-test supports_encodings '$3']) AT_CHECK_UNQUOTED( [i18n-test concat "`printf '$1'`" "`printf '$2'`" '$3' '$4'], [0], [`printf '$5'` ]) AT_CLEANUP]) CHECK_I18N_CONCAT([abc], [], [UTF-8], [6], [abc]) CHECK_I18N_CONCAT([], [xyz], [UTF-8], [6], [xyz]) CHECK_I18N_CONCAT([], [], [UTF-8], [6], []) CHECK_I18N_CONCAT([abcdefghij], [], [UTF-8], [6], [abcdef]) CHECK_I18N_CONCAT([], [tuvwxyz], [UTF-8], [6], [tuvwxyz]) CHECK_I18N_CONCAT([abc], [xyz], [UTF-8], [6], [abcxyz]) CHECK_I18N_CONCAT([abcd], [xyz], [UTF-8], [6], [abcxyz]) CHECK_I18N_CONCAT([abc], [uvwxyz], [UTF-8], [6], [uvwxyz]) # x in a box ( x⃞ ) is U+0078, U+20DE, 4 bytes in UTF-8, and one grapheme # cluster. CHECK_I18N_CONCAT([x\342\203\236], [y], [UTF-8], [0], [y]) CHECK_I18N_CONCAT([x\342\203\236], [y], [UTF-8], [1], [y]) CHECK_I18N_CONCAT([x\342\203\236], [y], [UTF-8], [2], [y]) CHECK_I18N_CONCAT([x\342\203\236], [y], [UTF-8], [3], [y]) CHECK_I18N_CONCAT([x\342\203\236], [y], [UTF-8], [4], [y]) CHECK_I18N_CONCAT([x\342\203\236], [y], [UTF-8], [5], [x\342\203\236y]) # éèä is only 3 bytes in ISO-8859-1. CHECK_I18N_CONCAT([\303\251\303\250\303\244], [xyz], [ISO-8859-1], [0], [xyz]) CHECK_I18N_CONCAT([\303\251\303\250\303\244], [xyz], [ISO-8859-1], [1], [xyz]) CHECK_I18N_CONCAT([\303\251\303\250\303\244], [xyz], [ISO-8859-1], [2], [xyz]) CHECK_I18N_CONCAT([\303\251\303\250\303\244], [xyz], [ISO-8859-1], [3], [xyz]) CHECK_I18N_CONCAT([\303\251\303\250\303\244], [xyz], [ISO-8859-1], [4], [\303\251xyz]) CHECK_I18N_CONCAT([\303\251\303\250\303\244], [xyz], [ISO-8859-1], [5], [\303\251\303\250xyz]) CHECK_I18N_CONCAT([\303\251\303\250\303\244], [xyz], [ISO-8859-1], [6], [\303\251\303\250\303\244xyz]) pspp-1.0.1/tests/libpspp/stringi-map.at0000644000175000017500000000270313137223525015014 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([case-insensitive string map library]) m4_define([CHECK_STRINGI_MAP], [AT_SETUP([case-insensitive string map -- $1]) AT_KEYWORDS([stringi-map]) AT_CHECK([stringi-map-test $1]) AT_CLEANUP]) CHECK_STRINGI_MAP([insert-any-remove-any]) CHECK_STRINGI_MAP([insert-any-remove-same]) CHECK_STRINGI_MAP([insert-any-remove-reverse]) CHECK_STRINGI_MAP([random-sequence]) CHECK_STRINGI_MAP([replace]) CHECK_STRINGI_MAP([insert-ordered]) CHECK_STRINGI_MAP([clear]) CHECK_STRINGI_MAP([clone]) CHECK_STRINGI_MAP([swap]) CHECK_STRINGI_MAP([node-swap-value]) CHECK_STRINGI_MAP([insert-map]) CHECK_STRINGI_MAP([replace-map]) CHECK_STRINGI_MAP([get-keys-and-values]) CHECK_STRINGI_MAP([destroy-null]) pspp-1.0.1/tests/libpspp/stringi-set.at0000644000175000017500000000263313137223525015034 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([case-insensitive string set library]) m4_define([CHECK_STRINGI_SET], [AT_SETUP([case-insensitive string set -- $1]) AT_KEYWORDS([stringi-set]) AT_CHECK([stringi-set-test $1]) AT_CLEANUP]) CHECK_STRINGI_SET([insert-any-remove-any]) CHECK_STRINGI_SET([insert-any-remove-same]) CHECK_STRINGI_SET([insert-any-remove-reverse]) CHECK_STRINGI_SET([random-sequence]) CHECK_STRINGI_SET([insert-ordered]) CHECK_STRINGI_SET([union]) CHECK_STRINGI_SET([union-and-intersection]) CHECK_STRINGI_SET([intersect]) CHECK_STRINGI_SET([subtract]) CHECK_STRINGI_SET([swap]) CHECK_STRINGI_SET([clear]) CHECK_STRINGI_SET([clone]) CHECK_STRINGI_SET([destroy-null]) pspp-1.0.1/tests/libpspp/range-map.at0000644000175000017500000000175613137223525014440 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([range map library]) m4_define([CHECK_RANGE_MAP], [AT_SETUP([range-map -- $1]) AT_CHECK([range-map-test $1]) AT_CLEANUP]) CHECK_RANGE_MAP([insert]) CHECK_RANGE_MAP([delete-contiguous]) CHECK_RANGE_MAP([delete-gaps]) pspp-1.0.1/tests/libpspp/line-reader-test.c0000644000175000017500000000666112470243701015550 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/line-reader.h" #include #include #include #include #include #include #include "libpspp/i18n.h" #include "libpspp/str.h" #include "gl/error.h" #include "gl/progname.h" #include "gl/xalloc.h" static void usage (void) { printf ("usage: %s COMMAND [ARG]...\n" "The available commands are:\n" " help\n" " print this usage message\n" " buffer-size\n" " print the buffer size, in bytes, on stdout\n" " read FILE ENCODING\n" " read FILE encoded in ENCODING and print it in UTF-8\n", program_name); exit (0); } static void cmd_read (int argc, char *argv[]) { struct line_reader *r; const char *filename; struct string line; char *encoding; if (argc != 4) error (1, 0, "bad syntax for `%s' command; use `%s help' for help", argv[1], program_name); filename = argv[2]; r = (!strcmp(filename, "-") ? line_reader_for_fd (argv[3], STDIN_FILENO) : line_reader_for_file (argv[3], filename, O_RDONLY)); if (r == NULL) error (1, errno, "line_reader_open failed"); encoding = xstrdup (line_reader_get_encoding (r)); printf ("encoded in %s", encoding); if (line_reader_is_auto (r)) printf (" (auto)"); printf ("\n"); ds_init_empty (&line); while (line_reader_read (r, &line, SIZE_MAX)) { const char *new_encoding; char *utf8_line; new_encoding = line_reader_get_encoding (r); if (strcmp (encoding, new_encoding)) { free (encoding); encoding = xstrdup (new_encoding); printf ("encoded in %s", encoding); if (line_reader_is_auto (r)) printf (" (auto)"); printf ("\n"); } utf8_line = recode_string ("UTF-8", encoding, ds_data (&line), ds_length (&line)); printf ("\"%s\"\n", utf8_line); free (utf8_line); ds_clear (&line); } if (!strcmp(filename, "-")) line_reader_free (r); else { if (line_reader_close (r) != 0) error (1, errno, "line_reader_close failed"); } } int main (int argc, char *argv[]) { set_program_name (argv[0]); i18n_init (); if (argc < 2) error (1, 0, "missing command name; use `%s help' for help", program_name); else if (!strcmp(argv[1], "help") || !strcmp(argv[1], "--help")) usage (); else if (!strcmp(argv[1], "buffer-size")) printf ("%d\n", LINE_READER_BUFFER_SIZE); else if (!strcmp(argv[1], "read")) cmd_read (argc, argv); else error (1, 0, "unknown command `%s'; use `%s help' for help", argv[1], program_name); return 0; } pspp-1.0.1/tests/libpspp/stringi-set-test.c0000644000175000017500000004436712523704223015636 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2008, 2009, 2010, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the stringi_set_* routines defined in stringi-set.c. This test program aims to be as comprehensive as possible. "gcov -a -b" should report almost complete coverage of lines, blocks and branches in stringi-set.c, except that one branch caused by hash collision is not exercised because our hash function has so few collisions. "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. */ #include #include "libpspp/stringi-set.h" #include #include #include #include #include #include #include #include #include #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/str.h" /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } static void *xmalloc (size_t n) MALLOC_LIKE; static void *xnmalloc (size_t n, size_t m) MALLOC_LIKE; static void *xmemdup (const void *p, size_t n) MALLOC_LIKE; /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } static void * xmemdup (const void *p, size_t n) { void *q = xmalloc (n); memcpy (q, p, n); return q; } /* Clone STRING. */ static char * xstrdup (const char *string) { return xmemdup (string, strlen (string) + 1); } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* Support routines. */ enum { MAX_VALUE = 1024 }; static char *string_table[MAX_VALUE]; static const char * make_string (int value) { char **s; assert (value >= 0 && value < MAX_VALUE); s = &string_table[value]; if (*s == NULL) { *s = xmalloc (16); str_format_26adic (value + 1, true, *s, 16); } return *s; } static void free_strings (void) { int i; for (i = 0; i < MAX_VALUE; i++) free (string_table[i]); } /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT elements in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if (values[i] < values[i + 1]) { size_t j; for (j = cnt - 1; values[i] >= values[j]; j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } /* Checks that SET contains STRING. */ static void check_set_contains (struct stringi_set *set, const char *string) { struct stringi_set_node *node; check (stringi_set_contains (set, string)); check (!stringi_set_insert (set, string)); check (!stringi_set_insert_nocopy (set, xstrdup (string))); node = stringi_set_find_node (set, string); check (node != NULL); check (!utf8_strcasecmp (string, stringi_set_node_get_string (node))); } /* Checks that SET contains the CNT strings in DATA, that its structure is correct, and that certain operations on SET produce the expected results. */ static void check_stringi_set (struct stringi_set *set, const int data[], size_t cnt) { size_t i; check (stringi_set_is_empty (set) == (cnt == 0)); check (stringi_set_count (set) == cnt); for (i = 0; i < cnt; i++) { const char *s; char copy[16]; char *p; s = make_string (data[i]); check_set_contains (set, s); strcpy (copy, s); for (p = copy; *p != '\0'; p++) { assert (isupper (*p)); *p = tolower (*p); check_set_contains (set, copy); } } check (!stringi_set_contains (set, "xxx")); check (stringi_set_find_node (set, "") == NULL); if (cnt == 0) { check (stringi_set_first (set) == NULL); free (stringi_set_get_array (set)); } else { const struct stringi_set_node *node; char **array; int *data_copy; int left; array = stringi_set_get_array (set); data_copy = xmemdup (data, cnt * sizeof *data); left = cnt; for (node = stringi_set_first (set), i = 0; i < cnt; node = stringi_set_next (set, node), i++) { const char *s = stringi_set_node_get_string (node); size_t j; check (s == array[i]); for (j = 0; j < left; j++) if (!utf8_strcasecmp (s, make_string (data_copy[j]))) { data_copy[j] = data_copy[--left]; goto next; } check_die (); next: ; } check (node == NULL); free (data_copy); free (array); array = stringi_set_get_sorted_array (set); for (i = 0; i < cnt; i++) { if (i > 0) check (utf8_strcasecmp (array[i - 1], array[i]) < 0); check (stringi_set_contains (set, array[i])); } free (array); } } /* Inserts the CNT strings from 0 to CNT - 1 (inclusive) into a set in the order specified by INSERTIONS, then deletes them in the order specified by DELETIONS, checking the set's contents for correctness after each operation. */ static void test_insert_delete (const int insertions[], const int deletions[], size_t cnt) { struct stringi_set set; size_t i; stringi_set_init (&set); check_stringi_set (&set, NULL, 0); for (i = 0; i < cnt; i++) { check (stringi_set_insert (&set, make_string (insertions[i]))); check_stringi_set (&set, insertions, i + 1); } for (i = 0; i < cnt; i++) { check (stringi_set_delete (&set, make_string (deletions[i]))); check_stringi_set (&set, deletions + i + 1, cnt - i - 1); } stringi_set_destroy (&set); } /* Inserts strings into a set in each possible order, then removes them in each possible order, up to a specified maximum size. */ static void test_insert_any_remove_any (void) { const int max_elems = 5; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int ins_perm_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (ins_perm_cnt = 0; ins_perm_cnt == 0 || next_permutation (insertions, cnt); ins_perm_cnt++) { unsigned int del_perm_cnt; int i; for (i = 0; i < cnt; i++) deletions[i] = i; for (del_perm_cnt = 0; del_perm_cnt == 0 || next_permutation (deletions, cnt); del_perm_cnt++) test_insert_delete (insertions, deletions, cnt); check (del_perm_cnt == factorial (cnt)); } check (ins_perm_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts strings into a set in each possible order, then removes them in the same order, up to a specified maximum size. */ static void test_insert_any_remove_same (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) test_insert_delete (values, values, cnt); check (permutation_cnt == factorial (cnt)); free (values); } } /* Inserts strings into a set in each possible order, then removes them in reverse order, up to a specified maximum size. */ static void test_insert_any_remove_reverse (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int permutation_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (insertions, cnt); permutation_cnt++) { memcpy (deletions, insertions, sizeof *insertions * cnt); reverse (deletions, cnt); test_insert_delete (insertions, deletions, cnt); } check (permutation_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts and removes strings in a set, in random order. */ static void test_random_sequence (void) { const int max_elems = 64; const int max_trials = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt += 2) { int *insertions, *deletions; int trial; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (i = 0; i < cnt; i++) deletions[i] = i; for (trial = 0; trial < max_trials; trial++) { random_shuffle (insertions, cnt, sizeof *insertions); random_shuffle (deletions, cnt, sizeof *deletions); test_insert_delete (insertions, deletions, cnt); } free (insertions); free (deletions); } } /* Inserts strings into a set in ascending order, then delete in ascending order. */ static void test_insert_ordered (void) { const int max_elems = 64; int *values; struct stringi_set set; int i; stringi_set_init (&set); values = xnmalloc (max_elems, sizeof *values); for (i = 0; i < max_elems; i++) { values[i] = i; stringi_set_insert_nocopy (&set, xstrdup (make_string (i))); check_stringi_set (&set, values, i + 1); } for (i = 0; i < max_elems; i++) { stringi_set_delete (&set, make_string (i)); check_stringi_set (&set, values + i + 1, max_elems - i - 1); } stringi_set_destroy (&set); free (values); } static void test_boolean_ops (void (*function)(struct stringi_set *a, struct stringi_set *b, unsigned int *a_pat, unsigned int *b_pat)) { enum { MAX_STRINGS = 7 }; unsigned int a_pat, b_pat; for (a_pat = 0; a_pat < (1u << MAX_STRINGS); a_pat++) for (b_pat = 0; b_pat < (1u << MAX_STRINGS); b_pat++) { unsigned int new_a_pat = a_pat; unsigned int new_b_pat = b_pat; struct stringi_set a, b; int a_strings[MAX_STRINGS], b_strings[MAX_STRINGS]; size_t i, n_a, n_b; stringi_set_init (&a); stringi_set_init (&b); for (i = 0; i < MAX_STRINGS; i++) { if (a_pat & (1u << i)) stringi_set_insert (&a, make_string (i)); if (b_pat & (1u << i)) stringi_set_insert (&b, make_string (i)); } function (&a, &b, &new_a_pat, &new_b_pat); n_a = n_b = 0; for (i = 0; i < MAX_STRINGS; i++) { if (new_a_pat & (1u << i)) a_strings[n_a++] = i; if (new_b_pat & (1u << i)) b_strings[n_b++] = i; } check_stringi_set (&a, a_strings, n_a); check_stringi_set (&b, b_strings, n_b); stringi_set_destroy (&a); stringi_set_destroy (&b); } } static void union_cb (struct stringi_set *a, struct stringi_set *b, unsigned int *a_pat, unsigned int *b_pat) { stringi_set_union (a, b); *a_pat |= *b_pat; } static void test_union (void) { test_boolean_ops (union_cb); } static void union_and_intersection_cb (struct stringi_set *a, struct stringi_set *b, unsigned int *a_pat, unsigned int *b_pat) { unsigned int orig_a_pat = *a_pat; unsigned int orig_b_pat = *b_pat; stringi_set_union_and_intersection (a, b); *a_pat = orig_a_pat | orig_b_pat; *b_pat = orig_a_pat & orig_b_pat; } static void test_union_and_intersection (void) { test_boolean_ops (union_and_intersection_cb); } static void intersect_cb (struct stringi_set *a, struct stringi_set *b, unsigned int *a_pat, unsigned int *b_pat) { stringi_set_intersect (a, b); *a_pat &= *b_pat; } static void test_intersect (void) { test_boolean_ops (intersect_cb); } static void subtract_cb (struct stringi_set *a, struct stringi_set *b, unsigned int *a_pat, unsigned int *b_pat) { stringi_set_subtract (a, b); *a_pat &= ~*b_pat; } static void test_subtract (void) { test_boolean_ops (subtract_cb); } static void swap_cb (struct stringi_set *a, struct stringi_set *b, unsigned int *a_pat, unsigned int *b_pat) { unsigned int tmp; stringi_set_swap (a, b); tmp = *a_pat; *a_pat = *b_pat; *b_pat = tmp; } static void test_swap (void) { test_boolean_ops (swap_cb); } static void clear_cb (struct stringi_set *a, struct stringi_set *b UNUSED, unsigned int *a_pat, unsigned int *b_pat UNUSED) { stringi_set_clear (a); *a_pat = 0; } static void test_clear (void) { test_boolean_ops (clear_cb); } static void clone_cb (struct stringi_set *a, struct stringi_set *b, unsigned int *a_pat, unsigned int *b_pat) { stringi_set_destroy (a); stringi_set_clone (a, b); *a_pat = *b_pat; } static void test_clone (void) { test_boolean_ops (clone_cb); } static void test_destroy_null (void) { stringi_set_destroy (NULL); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert-any-remove-any", "insert any order, delete any order", test_insert_any_remove_any }, { "insert-any-remove-same", "insert any order, delete same order", test_insert_any_remove_same }, { "insert-any-remove-reverse", "insert any order, delete reverse order", test_insert_any_remove_reverse }, { "random-sequence", "insert and delete in random sequence", test_random_sequence }, { "insert-ordered", "insert in ascending order", test_insert_ordered }, { "union", "union", test_union }, { "union-and-intersection", "union and intersection", test_union_and_intersection }, { "intersect", "intersect", test_intersect }, { "subtract", "subtract", test_subtract }, { "swap", "swap", test_swap }, { "clear", "clear", test_clear }, { "clone", "clone", test_clone }, { "destroy-null", "destroying null table", test_destroy_null }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test case-insensitive string set library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); free_strings (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/sparse-array.at0000644000175000017500000000231213137223525015167 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([sparse array library]) m4_define([CHECK_SPARSE_ARRAY], [AT_SETUP([sparse array -- $1]) AT_KEYWORDS([sparse-array]) AT_CHECK([sparse-array-test $1]) AT_CLEANUP]) CHECK_SPARSE_ARRAY([random-insert-delete]) AT_SETUP([sparse array -- insert and delete with strides]) AT_KEYWORDS([sparse-array]) AT_CHECK([sparse-array-test insert-delete-strides], [0], [dnl 1 2 4 16 64 4096 262144 16777216 3 5 17 67 4099 262147 16777259 ]) AT_CLEANUP pspp-1.0.1/tests/libpspp/string-map.at0000644000175000017500000000262013137223525014641 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([string map library]) m4_define([CHECK_STRING_MAP], [AT_SETUP([string map -- $1]) AT_KEYWORDS([string-map]) AT_CHECK([string-map-test $1]) AT_CLEANUP]) CHECK_STRING_MAP([insert-any-remove-any]) CHECK_STRING_MAP([insert-any-remove-same]) CHECK_STRING_MAP([insert-any-remove-reverse]) CHECK_STRING_MAP([random-sequence]) CHECK_STRING_MAP([replace]) CHECK_STRING_MAP([insert-ordered]) CHECK_STRING_MAP([clear]) CHECK_STRING_MAP([clone]) CHECK_STRING_MAP([swap]) CHECK_STRING_MAP([node-swap-value]) CHECK_STRING_MAP([insert-map]) CHECK_STRING_MAP([replace-map]) CHECK_STRING_MAP([get-keys-and-values]) CHECK_STRING_MAP([destroy-null]) pspp-1.0.1/tests/libpspp/bt-test.c0000644000175000017500000004711012470242646013767 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the bt_* routines defined in bt.c. This test program aims to be as comprehensive as possible. "gcov -b" should report 100% coverage of lines and branches in bt.c. "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } static void * xmemdup (const void *p, size_t n) { void *q = xmalloc (n); memcpy (q, p, n); return q; } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* Node type and support routines. */ /* Test data element. */ struct element { struct bt_node node; /* Embedded binary tree element. */ int data; /* Primary value. */ }; static int aux_data; /* Returns the `struct element' that NODE is embedded within. */ static struct element * bt_node_to_element (const struct bt_node *node) { return bt_data (node, struct element, node); } /* Compares the `x' values in A and B and returns a strcmp-type return value. Verifies that AUX points to aux_data. */ static int compare_elements (const struct bt_node *a_, const struct bt_node *b_, const void *aux) { const struct element *a = bt_node_to_element (a_); const struct element *b = bt_node_to_element (b_); check (aux == &aux_data); return a->data < b->data ? -1 : a->data > b->data; } /* Compares A and B and returns a strcmp-type return value. */ static int compare_ints_noaux (const void *a_, const void *b_) { const int *a = a_; const int *b = b_; return *a < *b ? -1 : *a > *b; } /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT elements in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if (values[i] < values[i + 1]) { size_t j; for (j = cnt - 1; values[i] >= values[j]; j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } /* Calculates floor(log(n)/log(sqrt(2))). */ static int calculate_h_alpha (size_t n) { size_t thresholds[] = { 0, 2, 2, 3, 4, 6, 8, 12, 16, 23, 32, 46, 64, 91, 128, 182, 256, 363, 512, 725, 1024, 1449, 2048, 2897, 4096, 5793, 8192, 11586, 16384, 23171, 32768, 46341, 65536, 92682, 131072, 185364, 262144, 370728, 524288, 741456, 1048576, 1482911, 2097152, 2965821, 4194304, 5931642, 8388608, 11863284, 16777216, 23726567, 33554432, 47453133, 67108864, 94906266, 134217728, 189812532, 268435456, 379625063, 536870912, 759250125, 1073741824, 1518500250, 2147483648, 3037000500, }; size_t threshold_cnt = sizeof thresholds / sizeof *thresholds; size_t i; for (i = 0; i < threshold_cnt; i++) if (thresholds[i] > n) break; return i - 1; } /* Returns the height of the tree rooted at NODE. */ static int get_height (struct bt_node *node) { if (node == NULL) return 0; else { int left = get_height (node->down[0]); int right = get_height (node->down[1]); return 1 + (left > right ? left : right); } } /* Checks that BT is loosely alpha-height balanced, that is, that its height is no more than h_alpha(count) + 1, where h_alpha(n) = floor(log(n)/log(1/alpha)). */ static void check_balance (struct bt *bt) { /* In the notation of the Galperin and Rivest paper (and of CLR), the height of a tree is the number of edges in the longest path from the root to a leaf, so we have to subtract 1 from our measured height. */ int height = get_height (bt->root) - 1; int max_height = calculate_h_alpha (bt_count (bt)) + 1; check (height <= max_height); } /* Checks that BT contains the CNT ints in DATA, that its structure is correct, and that certain operations on BT produce the expected results. */ static void check_bt (struct bt *bt, const int data[], size_t cnt) { struct element e; size_t i; int *order; order = xmemdup (data, cnt * sizeof *data); qsort (order, cnt, sizeof *order, compare_ints_noaux); for (i = 0; i < cnt; i++) { struct bt_node *p; e.data = data[i]; if (rand () % 2) p = bt_find (bt, &e.node); else p = bt_insert (bt, &e.node); check (p != NULL); check (p != &e.node); check (bt_node_to_element (p)->data == data[i]); } e.data = -1; check (bt_find (bt, &e.node) == NULL); check_balance (bt); if (cnt == 0) { check (bt_first (bt) == NULL); check (bt_last (bt) == NULL); check (bt_next (bt, NULL) == NULL); check (bt_prev (bt, NULL) == NULL); } else { struct bt_node *p; for (p = bt_first (bt), i = 0; i < cnt; p = bt_next (bt, p), i++) check (bt_node_to_element (p)->data == order[i]); check (p == NULL); for (p = bt_last (bt), i = 0; i < cnt; p = bt_prev (bt, p), i++) check (bt_node_to_element (p)->data == order[cnt - i - 1]); check (p == NULL); } free (order); } /* Inserts the CNT values from 0 to CNT - 1 (inclusive) into an BT in the order specified by INSERTIONS, then deletes them in the order specified by DELETIONS, checking the BT's contents for correctness after each operation. */ static void test_insert_delete (const int insertions[], const int deletions[], size_t cnt) { struct element *elements; struct bt bt; size_t i; elements = xnmalloc (cnt, sizeof *elements); for (i = 0; i < cnt; i++) elements[i].data = i; bt_init (&bt, compare_elements, &aux_data); check_bt (&bt, NULL, 0); for (i = 0; i < cnt; i++) { check (bt_insert (&bt, &elements[insertions[i]].node) == NULL); check_bt (&bt, insertions, i + 1); } for (i = 0; i < cnt; i++) { bt_delete (&bt, &elements[deletions[i]].node); check_bt (&bt, deletions + i + 1, cnt - i - 1); } free (elements); } /* Inserts values into an BT in each possible order, then removes them in each possible order, up to a specified maximum size. */ static void test_insert_any_remove_any (void) { const int max_elems = 5; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int ins_perm_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (ins_perm_cnt = 0; ins_perm_cnt == 0 || next_permutation (insertions, cnt); ins_perm_cnt++) { unsigned int del_perm_cnt; int i; for (i = 0; i < cnt; i++) deletions[i] = i; for (del_perm_cnt = 0; del_perm_cnt == 0 || next_permutation (deletions, cnt); del_perm_cnt++) test_insert_delete (insertions, deletions, cnt); check (del_perm_cnt == factorial (cnt)); } check (ins_perm_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts values into an BT in each possible order, then removes them in the same order, up to a specified maximum size. */ static void test_insert_any_remove_same (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) test_insert_delete (values, values, cnt); check (permutation_cnt == factorial (cnt)); free (values); } } /* Inserts values into an BT in each possible order, then removes them in reverse order, up to a specified maximum size. */ static void test_insert_any_remove_reverse (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int permutation_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (insertions, cnt); permutation_cnt++) { memcpy (deletions, insertions, sizeof *insertions * cnt); reverse (deletions, cnt); test_insert_delete (insertions, deletions, cnt); } check (permutation_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts and removes values in an BT in random orders. */ static void test_random_sequence (void) { const int max_elems = 128; const int max_trials = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt += 2) { int *insertions, *deletions; int trial; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (i = 0; i < cnt; i++) deletions[i] = i; for (trial = 0; trial < max_trials; trial++) { random_shuffle (insertions, cnt, sizeof *insertions); random_shuffle (deletions, cnt, sizeof *deletions); test_insert_delete (insertions, deletions, cnt); } free (insertions); free (deletions); } } /* Inserts elements into an BT in ascending order. */ static void test_insert_ordered (void) { const int max_elems = 1024; struct element *elements; int *values; struct bt bt; int i; bt_init (&bt, compare_elements, &aux_data); elements = xnmalloc (max_elems, sizeof *elements); values = xnmalloc (max_elems, sizeof *values); for (i = 0; i < max_elems; i++) { values[i] = elements[i].data = i; check (bt_insert (&bt, &elements[i].node) == NULL); check_bt (&bt, values, i + 1); } free (elements); free (values); } /* Tests bt_find_ge and bt_find_le. */ static void test_find_ge_le (void) { const int max_elems = 10; struct element *elements; int *values; unsigned int inc_pat; elements = xnmalloc (max_elems, sizeof *elements); values = xnmalloc (max_elems, sizeof *values); for (inc_pat = 0; inc_pat < (1u << max_elems); inc_pat++) { struct bt bt; int elem_cnt = 0; int i; /* Insert the values in the pattern into BT. */ bt_init (&bt, compare_elements, &aux_data); for (i = 0; i < max_elems; i++) if (inc_pat & (1u << i)) { values[elem_cnt] = elements[elem_cnt].data = i; check (bt_insert (&bt, &elements[elem_cnt].node) == NULL); elem_cnt++; } check_bt (&bt, values, elem_cnt); /* Try find_ge and find_le for each possible element value. */ for (i = -1; i <= max_elems; i++) { struct element tmp; struct bt_node *ge, *le; int j; ge = le = NULL; for (j = 0; j < elem_cnt; j++) { if (ge == NULL && values[j] >= i) ge = &elements[j].node; if (values[j] <= i) le = &elements[j].node; } tmp.data = i; check (bt_find_ge (&bt, &tmp.node) == ge); check (bt_find_le (&bt, &tmp.node) == le); } } free (elements); free (values); } /* Inserts elements into an BT, then moves the nodes around in memory. */ static void test_moved (void) { const int max_elems = 128; struct element *e[2]; int cur; int *values; struct bt bt; int i, j; bt_init (&bt, compare_elements, &aux_data); e[0] = xnmalloc (max_elems, sizeof *e[0]); e[1] = xnmalloc (max_elems, sizeof *e[1]); values = xnmalloc (max_elems, sizeof *values); cur = 0; for (i = 0; i < max_elems; i++) { values[i] = e[cur][i].data = i; check (bt_insert (&bt, &e[cur][i].node) == NULL); check_bt (&bt, values, i + 1); for (j = 0; j <= i; j++) { e[!cur][j] = e[cur][j]; bt_moved (&bt, &e[!cur][j].node); check_bt (&bt, values, i + 1); } cur = !cur; } free (e[0]); free (e[1]); free (values); } /* Inserts values into an BT, then changes their values. */ static void test_changed (void) { const int max_elems = 6; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values, *changed_values; struct element *elements; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); changed_values = xnmalloc (cnt, sizeof *changed_values); elements = xnmalloc (cnt, sizeof *elements); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) { for (i = 0; i < cnt; i++) { int j, k; for (j = 0; j <= cnt; j++) { struct bt bt; struct bt_node *changed_retval; bt_init (&bt, compare_elements, &aux_data); /* Add to BT in order. */ for (k = 0; k < cnt; k++) { int n = values[k]; elements[n].data = n; check (bt_insert (&bt, &elements[n].node) == NULL); } check_bt (&bt, values, cnt); /* Change value i to j. */ elements[i].data = j; for (k = 0; k < cnt; k++) changed_values[k] = k; changed_retval = bt_changed (&bt, &elements[i].node); if (i != j && j < cnt) { /* Will cause duplicate. */ check (changed_retval == &elements[j].node); changed_values[i] = changed_values[cnt - 1]; check_bt (&bt, changed_values, cnt - 1); } else { /* Succeeds. */ check (changed_retval == NULL); changed_values[i] = j; check_bt (&bt, changed_values, cnt); } } } } check (permutation_cnt == factorial (cnt)); free (values); free (changed_values); free (elements); } } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert-any-remove-any", "insert any order, delete any order", test_insert_any_remove_any }, { "insert-any-remove-same", "insert any order, delete same order", test_insert_any_remove_same }, { "insert-any-remove-reverse", "insert any order, delete reverse order", test_insert_any_remove_reverse }, { "random-sequence", "insert and delete in random sequence", test_random_sequence }, { "insert-ordered", "insert in ascending order", test_insert_ordered }, { "find-ge-le", "find_ge and find_le", test_find_ge_le }, { "moved", "move elements around in memory", test_moved }, { "changed", "change key data in nodes", test_changed } }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test balanced tree\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/float-format.at0000644000175000017500000001221213137223525015151 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([floating point formats]) AT_SETUP([floating point format conversions]) AT_DATA([float-format.txt], [dnl # Each of the tests below checks that conversion between # floating-point formats works correctly. Comparisons that use == # require that conversion from any format on the line to any other # format on the line work losslessly. Comparisons that use => only # check that conversions work losslessly in the given direction. # Key to format names: # isl: IEEE single-precision, little endian # isb: IEEE single-precision, big endian # idl: IEEE double-precision, little endian # idb: IEEE double-precision, big endian # vf: VAX F # vd: VAX D # vg: VAX G # zs: Z architecture short # zl: Z architecture long # x: hexadecimal digits # IEEE special values. 0 == isb('00000000') x('Infinity') == isb('7f800000') x('-Infinity') == isb('ff800000') x('NaN:') => isb('7f800001') # NaN requires nonzero fraction. x('NaN:e000000000000000') == isb('7ff00000') == idb('7ffe000000000000') x('NaN:5a5a5e0000000000') == isb('7fad2d2f') == idb('7ff5a5a5e0000000') x('NaN:975612abcdef4000') == idb('7ff975612abcdef4') x('-NaN:e000000000000000') == isb('fff00000') == idb('fffe000000000000') x('-NaN:5a5a5e0000000000') == isb('ffad2d2f') == idb('fff5a5a5e0000000') x('-NaN:975612abcdef4000') == idb('fff975612abcdef4') # PSPP special values. x('Missing') == isb('ff7fffff') == idb('ffefffffffffffff') == isl('ffff7fff') == idl('ffffffffffffefff') == vf('ffffffff') == vd('ffffffffffffffff') == vg('ffffffffffffffff') == zs('ffffffff') == zl('ffffffffffffffff') x('Lowest') == isb('ff7ffffe') == idb('ffeffffffffffffe') == isl('feff7fff') == idl('feffffffffffefff') == vf('fffffeff') == vd('fffffeffffffffff') == vg('fffffeffffffffff') == zs('fffffffe') == zl('fffffffffffffffe') x('Highest') == isb('7f7fffff') == idb('7fefffffffffffff') == isl('ffff7f7f') == idl('ffffffffffffef7f') == vf('ff7fffff') == vd('ffffffffff7fffff') == vg('ffffffffff7fffff') == zs('7fffffff') == zl('7fffffffffffffff') # From Wikipedia. 0.15625 == isb('3e200000') -118.625 == isb('c2ed4000') # http://www.psc.edu/general/software/packages/ieee/ieee.html x('NaN:0400000000000000') == isb('7f820000') x('-NaN:2225540000000000') == isb('ff9112aa') 2 == isb('40000000') 6.5 == isb('40d00000') -6.5 == isb('c0d00000') x('.4p-124') == isb('00800000') x('.2p-124') == isb('00400000') # Using converter at http://babbage.cs.qc.edu/IEEE-754/Decimal.html # plus Emacs 'calc' to convert decimal to hexadecimal x('.7b74bc6a7ef9db23p8') => isb('42f6e979') # 123.456 x('.7b74bc6a7ef9db23p8') => idb('405edd2f1a9fbe77') x('.817427d2d4642004p-12') => isb('39017428') # .0001234567 x('.817427d2d4642004p-12') => idb('3f202e84fa5a8c84') x('.446c3b15f9926688p168') => isb('7f800000') # 1e50; overflow x('.446c3b15f9926688p168') => idb('4a511b0ec57e649a') # From multiple editions of the z/Architecture Principles of Operation # manual. 1.0 == zs('41100000') == isb('3f800000') 0.5 == zs('40800000') == isb('3f000000') x('.4p-4') == zs('3f400000') == isb('3c800000') 0 == zs('00000000') == isb('00000000') zs('80000000') == isb('80000000') -15 == zs('c1f00000') == isb('c1700000') # x('.ffffffp252') == zs('7fffffff') x('.3b4p8') == zs('423b4000') x('.1p-256') == zs('00100000') x('.4p-124') == zs('21400000') == isb('00800000') x('.8p-148') == zs('1b800000') == isb('00000001') # x('.ffffffp128') == zs('60ffffff') == isb('7f7fffff') x('.1p-256') == zs('00100000') x('.1p-256') => isb('00000000') # Underflow to zero. x('.ffffffp248') == zs('7effffff') x('.ffffffp248') => isb('7f800000') # Overflow to +Infinity. x('.4p-1020') => zl('0000000000000000') # Underflow to zero. x('.4p-1020') == idb('0010000000000000') x('.4p-1072') => zl('0000000000000000') # Underflow to zero. x('.4p-1072') => idb('0000000000000001') x('.fffffffffffff8p1024') => zl('7fffffffffffffff') # Overflow to maxval. x('.fffffffffffff8p1024') => idb('7fefffffffffffff') x('.1p-256') == zl('0010000000000000') == idb('2fb0000000000000') x('.ffffffffffffffp248') == zl('7effffffffffffff') x('.ffffffffffffffp248') => idb('4f70000000000000') # Loses precision. ]) AT_CHECK( [sed 's/#.*// s/^[ ]*// s/[ ]*$// /^$/d s/^\(..*\)$/DEBUG FLOAT FORMAT \1./' < float-format.txt > float-format.sps]) AT_CHECK([pspp --testing-mode -O format=csv float-format.sps]) AT_CLEANUP pspp-1.0.1/tests/libpspp/stringi-map-test.c0000644000175000017500000006171612523704223015615 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2008, 2009, 2010, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the stringi_map_* routines defined in stringi-map.c. This test program aims to be as comprehensive as possible. "gcov -a -b" should report almost complete coverage of lines, blocks and branches in stringi-map.c, except that one branch caused by hash collision is not exercised because our hash function has so few collisions. "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. */ #ifdef HAVE_CONFIG_H #include #endif #include "libpspp/stringi-map.h" #include #include #include #include #include #include #include #include #include #include "libpspp/hash-functions.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/str.h" #include "libpspp/string-set.h" #include "libpspp/stringi-set.h" /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } static void *xmalloc (size_t n) MALLOC_LIKE; static void *xnmalloc (size_t n, size_t m) MALLOC_LIKE; static void *xmemdup (const void *p, size_t n) MALLOC_LIKE; /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } static void * xmemdup (const void *p, size_t n) { void *q = xmalloc (n); memcpy (q, p, n); return q; } /* Clone STRING. */ static char * xstrdup (const char *string) { return xmemdup (string, strlen (string) + 1); } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* Support routines. */ enum { IDX_BITS = 10, MAX_IDX = 1 << IDX_BITS, KEY_MASK = (MAX_IDX - 1), KEY_SHIFT = 0, VALUE_MASK = (MAX_IDX - 1) << IDX_BITS, VALUE_SHIFT = IDX_BITS }; static char *string_table[MAX_IDX]; static const char * get_string (int idx) { char **s; assert (idx >= 0 && idx < MAX_IDX); s = &string_table[idx]; if (*s == NULL) { *s = xmalloc (16); str_format_26adic (idx + 1, true, *s, 16); } return *s; } static void free_strings (void) { int i; for (i = 0; i < MAX_IDX; i++) free (string_table[i]); } static const char * make_key (int value) { return get_string ((value & KEY_MASK) >> KEY_SHIFT); } static const char * make_value (int value) { return get_string ((value & VALUE_MASK) >> VALUE_SHIFT); } static int random_value (unsigned int seed, int basis) { return hash_int (seed, basis) & VALUE_MASK; } /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT elements in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. Comparisons among elements of VALUES consider only the bits in KEY_MASK. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if ((values[i] & KEY_MASK) < (values[i + 1] & KEY_MASK)) { size_t j; for (j = cnt - 1; (values[i] & KEY_MASK) >= (values[j] & KEY_MASK); j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } /* Checks that MAP has (KEY, VALUE) as a pair. */ static void check_map_contains (struct stringi_map *map, const char *key, const char *value) { struct stringi_map_node *node; const char *found_value; check (stringi_map_contains (map, key)); node = stringi_map_find_node (map, key); check (node != NULL); check (!utf8_strcasecmp (key, stringi_map_node_get_key (node))); check (!strcmp (value, stringi_map_node_get_value (node))); check (node == stringi_map_insert (map, key, "012")); check (!strcmp (value, stringi_map_node_get_value (node))); check (node == stringi_map_insert_nocopy (map, xstrdup (key), xstrdup ("345"))); check (!strcmp (value, stringi_map_node_get_value (node))); found_value = stringi_map_find (map, key); check (found_value == stringi_map_node_get_value (node)); check (found_value != NULL); check (!strcmp (found_value, value)); } /* Checks that MAP contains the CNT strings in DATA, that its structure is correct, and that certain operations on MAP produce the expected results. */ static void check_stringi_map (struct stringi_map *map, const int data[], size_t cnt) { size_t i; check (stringi_map_is_empty (map) == (cnt == 0)); check (stringi_map_count (map) == cnt); for (i = 0; i < cnt; i++) { const char *key = make_key (data[i]); const char *value = make_value (data[i]); char copy[16]; char *p; check_map_contains (map, key, value); strcpy (copy, key); for (p = copy; *p != '\0'; p++) { assert (isupper (*p)); *p = tolower (*p); check_map_contains (map, copy, value); } } check (!stringi_map_contains (map, "xxx")); check (stringi_map_find (map, "0") == NULL); check (stringi_map_find_node (map, "") == NULL); check (!stringi_map_delete (map, "xyz")); if (cnt == 0) check (stringi_map_first (map) == NULL); else { const struct stringi_map_node *node; int *data_copy; int left; data_copy = xmemdup (data, cnt * sizeof *data); left = cnt; for (node = stringi_map_first (map), i = 0; i < cnt; node = stringi_map_next (map, node), i++) { const char *key = stringi_map_node_get_key (node); const char *value = stringi_map_node_get_value (node); size_t j; for (j = 0; j < left; j++) if (!strcmp (key, make_key (data_copy[j])) || !strcmp (value, make_value (data_copy[j]))) { data_copy[j] = data_copy[--left]; goto next; } check_die (); next: ; } check (node == NULL); free (data_copy); } } /* Inserts the CNT strings from 0 to CNT - 1 (inclusive) into a map in the order specified by INSERTIONS, then deletes them in the order specified by DELETIONS, checking the map's contents for correctness after each operation. */ static void test_insert_delete (const int insertions[], const int deletions[], size_t cnt) { struct stringi_map map; size_t i; stringi_map_init (&map); check_stringi_map (&map, NULL, 0); for (i = 0; i < cnt; i++) { check (stringi_map_insert (&map, make_key (insertions[i]), make_value (insertions[i]))); check_stringi_map (&map, insertions, i + 1); } for (i = 0; i < cnt; i++) { check (stringi_map_delete (&map, make_key (deletions[i]))); check_stringi_map (&map, deletions + i + 1, cnt - i - 1); } stringi_map_destroy (&map); } /* Inserts strings into a map in each possible order, then removes them in each possible order, up to a specified maximum size. */ static void test_insert_any_remove_any (void) { const int basis = 0; const int max_elems = 5; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int ins_perm_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i | random_value (i, basis); for (ins_perm_cnt = 0; ins_perm_cnt == 0 || next_permutation (insertions, cnt); ins_perm_cnt++) { unsigned int del_perm_cnt; int i; for (i = 0; i < cnt; i++) deletions[i] = i | random_value (i, basis); for (del_perm_cnt = 0; del_perm_cnt == 0 || next_permutation (deletions, cnt); del_perm_cnt++) test_insert_delete (insertions, deletions, cnt); check (del_perm_cnt == factorial (cnt)); } check (ins_perm_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts strings into a map in each possible order, then removes them in the same order, up to a specified maximum size. */ static void test_insert_any_remove_same (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); for (i = 0; i < cnt; i++) values[i] = i | random_value (i, 1); for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) test_insert_delete (values, values, cnt); check (permutation_cnt == factorial (cnt)); free (values); } } /* Inserts strings into a map in each possible order, then removes them in reverse order, up to a specified maximum size. */ static void test_insert_any_remove_reverse (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int permutation_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i | random_value (i, 2); for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (insertions, cnt); permutation_cnt++) { memcpy (deletions, insertions, sizeof *insertions * cnt); reverse (deletions, cnt); test_insert_delete (insertions, deletions, cnt); } check (permutation_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts and removes strings in a map, in random order. */ static void test_random_sequence (void) { const int basis = 3; const int max_elems = 64; const int max_trials = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt += 2) { int *insertions, *deletions; int trial; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i | random_value (i, basis); for (i = 0; i < cnt; i++) deletions[i] = i | random_value (i, basis); for (trial = 0; trial < max_trials; trial++) { random_shuffle (insertions, cnt, sizeof *insertions); random_shuffle (deletions, cnt, sizeof *deletions); test_insert_delete (insertions, deletions, cnt); } free (insertions); free (deletions); } } /* Inserts strings into a map in ascending order, then delete in ascending order. */ static void test_insert_ordered (void) { const int max_elems = 64; int *values; struct stringi_map map; int i; stringi_map_init (&map); values = xnmalloc (max_elems, sizeof *values); for (i = 0; i < max_elems; i++) { values[i] = i | random_value (i, 4); stringi_map_insert_nocopy (&map, xstrdup (make_key (values[i])), xstrdup (make_value (values[i]))); check_stringi_map (&map, values, i + 1); } for (i = 0; i < max_elems; i++) { stringi_map_delete (&map, make_key (i)); check_stringi_map (&map, values + i + 1, max_elems - i - 1); } stringi_map_destroy (&map); free (values); } /* Inserts and replaces strings in a map, in random order. */ static void test_replace (void) { const int basis = 15; enum { MAX_ELEMS = 16 }; const int max_trials = 8; int cnt; for (cnt = 0; cnt <= MAX_ELEMS; cnt++) { int insertions[MAX_ELEMS]; int trial; int i; for (i = 0; i < cnt; i++) insertions[i] = (i / 2) | random_value (i, basis); for (trial = 0; trial < max_trials; trial++) { struct stringi_map map; int data[MAX_ELEMS]; int n_data; /* Insert with replacement in random order. */ n_data = 0; stringi_map_init (&map); random_shuffle (insertions, cnt, sizeof *insertions); for (i = 0; i < cnt; i++) { const char *key = make_key (insertions[i]); const char *value = make_value (insertions[i]); int j; for (j = 0; j < n_data; j++) if ((data[j] & KEY_MASK) == (insertions[i] & KEY_MASK)) { data[j] = insertions[i]; goto found; } data[n_data++] = insertions[i]; found: if (i % 2) stringi_map_replace (&map, key, value); else stringi_map_replace_nocopy (&map, xstrdup (key), xstrdup (value)); check_stringi_map (&map, data, n_data); } /* Delete in original order. */ for (i = 0; i < cnt; i++) { const char *expected_value; char *value; int j; expected_value = NULL; for (j = 0; j < n_data; j++) if ((data[j] & KEY_MASK) == (insertions[i] & KEY_MASK)) { expected_value = make_value (data[j]); data[j] = data[--n_data]; break; } value = stringi_map_find_and_delete (&map, make_key (insertions[i])); check ((value != NULL) == (expected_value != NULL)); check (value == NULL || !strcmp (value, expected_value)); free (value); } assert (stringi_map_is_empty (&map)); stringi_map_destroy (&map); } } } static void make_patterned_map (struct stringi_map *map, unsigned int pattern, int basis, int insertions[], int *np) { int n; int i; stringi_map_init (map); n = 0; for (i = 0; pattern != 0; i++) if (pattern & (1u << i)) { pattern &= pattern - 1; insertions[n] = i | random_value (i, basis); check (stringi_map_insert (map, make_key (insertions[n]), make_value (insertions[n]))); n++; } check_stringi_map (map, insertions, n); *np = n; } static void for_each_map (void (*cb)(struct stringi_map *, int data[], int n), int basis) { enum { MAX_ELEMS = 5 }; unsigned int pattern; for (pattern = 0; pattern < (1u << MAX_ELEMS); pattern++) { int data[MAX_ELEMS]; struct stringi_map map; int n; make_patterned_map (&map, pattern, basis, data, &n); (*cb) (&map, data, n); stringi_map_destroy (&map); } } static void for_each_pair_of_maps ( void (*cb)(struct stringi_map *a, int a_data[], int n_a, struct stringi_map *b, int b_data[], int n_b), int a_basis, int b_basis) { enum { MAX_ELEMS = 5 }; unsigned int a_pattern, b_pattern; for (a_pattern = 0; a_pattern < (1u << MAX_ELEMS); a_pattern++) for (b_pattern = 0; b_pattern < (1u << MAX_ELEMS); b_pattern++) { int a_data[MAX_ELEMS], b_data[MAX_ELEMS]; struct stringi_map a_map, b_map; int n_a, n_b; make_patterned_map (&a_map, a_pattern, a_basis, a_data, &n_a); make_patterned_map (&b_map, b_pattern, b_basis, b_data, &n_b); (*cb) (&a_map, a_data, n_a, &b_map, b_data, n_b); stringi_map_destroy (&a_map); stringi_map_destroy (&b_map); } } static void clear_cb (struct stringi_map *map, int data[] UNUSED, int n UNUSED) { stringi_map_clear (map); check_stringi_map (map, NULL, 0); } static void test_clear (void) { for_each_map (clear_cb, 5); } static void clone_cb (struct stringi_map *map, int data[], int n) { struct stringi_map clone; stringi_map_clone (&clone, map); check_stringi_map (&clone, data, n); stringi_map_destroy (&clone); } static void test_clone (void) { for_each_map (clone_cb, 6); } static void node_swap_value_cb (struct stringi_map *map, int data[], int n) { int i; for (i = 0; i < n; i++) { const char *value = make_value (data[i]); struct stringi_map_node *node; char *old_value; node = stringi_map_find_node (map, make_key (data[i])); check (node != NULL); check (!strcmp (stringi_map_node_get_value (node), value)); data[i] = (data[i] & KEY_MASK) | random_value (i, 15); old_value = stringi_map_node_swap_value (node, make_value (data[i])); check (old_value != NULL); check (!strcmp (value, old_value)); free (old_value); } } static void test_node_swap_value (void) { for_each_map (node_swap_value_cb, 14); } static void swap_cb (struct stringi_map *a, int a_data[], int n_a, struct stringi_map *b, int b_data[], int n_b) { stringi_map_swap (a, b); check_stringi_map (a, b_data, n_b); check_stringi_map (b, a_data, n_a); } static void test_swap (void) { for_each_pair_of_maps (swap_cb, 7, 8); } static void insert_map_cb (struct stringi_map *a, int a_data[], int n_a, struct stringi_map *b, int b_data[], int n_b) { int i, j; stringi_map_insert_map (a, b); for (i = 0; i < n_b; i++) { for (j = 0; j < n_a; j++) if ((b_data[i] & KEY_MASK) == (a_data[j] & KEY_MASK)) goto found; a_data[n_a++] = b_data[i]; found:; } check_stringi_map (a, a_data, n_a); check_stringi_map (b, b_data, n_b); } static void test_insert_map (void) { for_each_pair_of_maps (insert_map_cb, 91, 10); } static void replace_map_cb (struct stringi_map *a, int a_data[], int n_a, struct stringi_map *b, int b_data[], int n_b) { int i, j; stringi_map_replace_map (a, b); for (i = 0; i < n_b; i++) { for (j = 0; j < n_a; j++) if ((b_data[i] & KEY_MASK) == (a_data[j] & KEY_MASK)) { a_data[j] = (a_data[j] & KEY_MASK) | (b_data[i] & VALUE_MASK); goto found; } a_data[n_a++] = b_data[i]; found:; } check_stringi_map (a, a_data, n_a); check_stringi_map (b, b_data, n_b); } static void test_replace_map (void) { for_each_pair_of_maps (replace_map_cb, 11, 12); } static void check_iset (struct stringi_set *set, const int *data, int n_data, int mask, int shift) { int *unique; int n_unique; int i; n_unique = 0; unique = xmalloc (n_data * sizeof *unique); for (i = 0; i < n_data; i++) { int idx = (data[i] & mask) >> shift; int j; for (j = 0; j < n_unique; j++) if (unique[j] == idx) goto found; unique[n_unique++] = idx; found:; } check (stringi_set_count (set) == n_unique); for (i = 0; i < n_unique; i++) check (stringi_set_contains (set, get_string (unique[i]))); stringi_set_destroy (set); free (unique); } static void check_set (struct string_set *set, const int *data, int n_data, int mask, int shift) { int *unique; int n_unique; int i; n_unique = 0; unique = xmalloc (n_data * sizeof *unique); for (i = 0; i < n_data; i++) { int idx = (data[i] & mask) >> shift; int j; for (j = 0; j < n_unique; j++) if (unique[j] == idx) goto found; unique[n_unique++] = idx; found:; } check (string_set_count (set) == n_unique); for (i = 0; i < n_unique; i++) check (string_set_contains (set, get_string (unique[i]))); string_set_destroy (set); free (unique); } static void get_keys_and_values_cb (struct stringi_map *map, int data[], int n) { struct stringi_set keys; struct string_set values; stringi_set_init (&keys); string_set_init (&values); stringi_map_get_keys (map, &keys); stringi_map_get_values (map, &values); check_iset (&keys, data, n, KEY_MASK, KEY_SHIFT); check_set (&values, data, n, VALUE_MASK, VALUE_SHIFT); } static void test_get_keys_and_values (void) { for_each_map (get_keys_and_values_cb, 13); } static void test_destroy_null (void) { stringi_map_destroy (NULL); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert-any-remove-any", "insert any order, delete any order", test_insert_any_remove_any }, { "insert-any-remove-same", "insert any order, delete same order", test_insert_any_remove_same }, { "insert-any-remove-reverse", "insert any order, delete reverse order", test_insert_any_remove_reverse }, { "random-sequence", "insert and delete in random sequence", test_random_sequence }, { "replace", "insert and replace in random sequence", test_replace }, { "insert-ordered", "insert in ascending order", test_insert_ordered }, { "clear", "clear", test_clear }, { "clone", "clone", test_clone }, { "swap", "swap", test_swap }, { "node-swap-value", "node_swap_value", test_node_swap_value }, { "insert-map", "insert_map", test_insert_map }, { "replace-map", "replace_map", test_replace_map }, { "get-keys-and-values", "get keys and values", test_get_keys_and_values }, { "destroy-null", "destroying null table", test_destroy_null }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test case-insensitive string map library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); free_strings (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/tower.at0000644000175000017500000000176513137223525013731 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([tower library]) m4_define([CHECK_TOWER], [AT_SETUP([tower -- $1]) AT_CHECK([tower-test $1]) AT_CLEANUP]) CHECK_TOWER([insert]) CHECK_TOWER([delete]) CHECK_TOWER([resize]) CHECK_TOWER([splice-out]) CHECK_TOWER([splice-in]) pspp-1.0.1/tests/libpspp/heap.at0000644000175000017500000000206213137223525013475 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([Heap library]) m4_define([CHECK_HEAP], [AT_SETUP([heap -- $1]) AT_CHECK([heap-test $1]) AT_CLEANUP]) CHECK_HEAP([insert-no-dups-delete-min]) CHECK_HEAP([insert-with-dups-delete-min]) CHECK_HEAP([insert-no-dups-delete-random]) CHECK_HEAP([inc-dec]) CHECK_HEAP([random-insert-delete]) pspp-1.0.1/tests/libpspp/i18n-test.c0000644000175000017500000000610612470243701014132 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include "libpspp/i18n.h" #undef NDEBUG #include int main (int argc, char *argv[]) { i18n_init (); if (argc > 1 && !strcmp (argv[1], "supports_encodings")) { int status = 0; int i; for (i = 2; i < argc; i++) if (!is_encoding_supported (argv[i])) { printf ("encoding \"%s\" is NOT supported\n", argv[i]); status = 77; } i18n_done (); exit (status); } if (argc == 5 && !strcmp (argv[1], "recode")) { const char *from = argv[2]; const char *to = argv[3]; const char *string = argv[4]; char *result = recode_string (to, from, string, -1); puts (result); assert (strlen (result) == recode_string_len (to, from, string, -1)); free (result); } else if (argc == 6 && !strcmp (argv[1], "concat")) { const char *head = argv[2]; const char *tail = argv[3]; const char *encoding = argv[4]; int max_len = atoi (argv[5]); char *result; result = utf8_encoding_concat (head, tail, encoding, max_len); puts (result); assert (strlen (result) == utf8_encoding_concat_len (head, tail, encoding, max_len)); if (tail[0] == '\0') { char *result2 = utf8_encoding_trunc (head, encoding, max_len); assert (!strcmp (result, result2)); assert (strlen (result2) == utf8_encoding_trunc_len (head, encoding, max_len)); free (result2); } free (result); } else { fprintf (stderr, "\ usage: %s supports_encodings ENCODING...\n\ where ENCODING is the name of an encoding.\n\ Exits with status 0 if all the encodings are supported, 77 otherwise.\n\ \n\ usage: %s recode FROM TO STRING\n\ where FROM is the source encoding,\n\ TO is the target encoding,\n\ and STRING is the text to recode.\n\ \n\ usage: %s concat HEAD TAIL ENCODING MAX_LEN\n\ where HEAD is the first string to concatenate\n\ TAIL is the second string to concatenate\n\ ENCODING is the encoding in which to measure the result's length\n\ MAX_LEN is the maximum length of the result in ENCODING.\n", argv[0], argv[0], argv[0]); return EXIT_FAILURE; } i18n_done (); return 0; } pspp-1.0.1/tests/libpspp/string-set.at0000644000175000017500000000255113137223525014662 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([string set library]) m4_define([CHECK_STRING_SET], [AT_SETUP([string set -- $1]) AT_KEYWORDS([string-set]) AT_CHECK([string-set-test $1]) AT_CLEANUP]) CHECK_STRING_SET([insert-any-remove-any]) CHECK_STRING_SET([insert-any-remove-same]) CHECK_STRING_SET([insert-any-remove-reverse]) CHECK_STRING_SET([random-sequence]) CHECK_STRING_SET([insert-ordered]) CHECK_STRING_SET([union]) CHECK_STRING_SET([union-and-intersection]) CHECK_STRING_SET([intersect]) CHECK_STRING_SET([subtract]) CHECK_STRING_SET([swap]) CHECK_STRING_SET([clear]) CHECK_STRING_SET([clone]) CHECK_STRING_SET([destroy-null]) pspp-1.0.1/tests/libpspp/sparse-xarray-test.at0000644000175000017500000000700113137223525016334 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([sparse external arrays]) m4_divert_push([PREPARE_TESTS]) [sparse_xarray_queue_limit () { # Each on-disk sparse_xarray eats up a file descriptor, so for the # tests that involve on-disk sparse_xarrays we need to limit the # maximum length of the queue. Figure out how many file descriptors # we can let the test program open at once. OPEN_MAX=`getconf OPEN_MAX 2>/dev/null` case $OPEN_MAX in [0-9]*) # Divide by 2 because some fds are used by other code. queue_limit=`expr $OPEN_MAX / 2` ;; undefined) # Assume that any system with a dynamic fd limit has a large limit. queue_limit=500 ;; *) case `uname -m 2>/dev/null` in CYGWIN*) # Cygwin claims a 256-fd limit as OPEN_MAX in . queue_limit=128 ;; MINGW*) # The following email claims that Mingw should have a # 2048-fd limit: # http://www.mail-archive.com/squid-users@squid-cache.org/msg35249.html queue_limit=1024 ;; *) # This seems fairly conservative these days. queue_limit=50 ;; esac ;; esac echo "$queue_limit" }] m4_divert_pop([PREPARE_TESTS]) AT_SETUP([in-memory sparse_xarray]) dnl --values=3 would be a slightly better test but takes much longer. AT_CHECK([sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=3 --max-rows=3 --max-memory-rows=3 --values=2], [0], [ignore], [ignore]) AT_CLEANUP m4_define([SPARSE_XARRAY_ON_DISK], [AT_SETUP([on-disk sparse_xarray max-memory-rows=$1]) AT_CHECK([sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=2 --max-rows=3 --max-memory-rows=$1 --values=2], [0], [ignore], [ignore]) AT_CLEANUP]) SPARSE_XARRAY_ON_DISK([0]) SPARSE_XARRAY_ON_DISK([1]) SPARSE_XARRAY_ON_DISK([2]) AT_SETUP([copying between in-memory sparse_xarrays]) AT_KEYWORDS([sparse_xarray]) AT_CHECK([sparse-xarray-test \ --verbosity=0 --queue-limit=`sparse_xarray_queue_limit` \ --columns=2 --max-rows=2 --max-memory-rows=2 --values=2 \ --xarrays=2 --no-write-rows --no-copy-columns], [0], [ignore], [ignore]) AT_CLEANUP m4_define([SPARSE_XARRAY_COPY_DISK], [AT_SETUP([copying between on-disk sparse_xarrays max-memory-rows=$1]) AT_KEYWORDS([sparse_xarray]) limit=`sparse_xarray_queue_limit` AT_CHECK([sparse-xarray-test \ --verbosity=0 --queue-limit=`expr $limit / 2` \ --columns=1 --max-rows=2 --max-memory-rows=$max_memory_rows \ --values=2 --xarrays=2 --no-write-rows --no-copy-columns], [0], [ignore], [ignore]) AT_CLEANUP]) dnl These parameters are ridiculously low, but it's necessary dnl unless we want the tests to take a very long time. SPARSE_XARRAY_COPY_DISK([0]) SPARSE_XARRAY_COPY_DISK([1]) pspp-1.0.1/tests/libpspp/tower-test.c0000644000175000017500000004755512470434666014544 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2010, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the routines defined in tower.c. This test program aims to be as comprehensive as possible. With -DNDEBUG, "gcov -b" should report 100% coverage of lines and branches in tower.c routines. (Without -DNDEBUG, branches caused by failed assertions will not be taken.) "valgrind --leak-check=yes --show-reachable=yes" should give a clean report, both with and without -DNDEBUG. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include "xalloc.h" /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Node type and support routines. */ /* Test data block. */ struct block { struct tower_node node; /* Embedded tower block. */ int x; /* Primary value. */ }; /* Returns the `struct block' that NODE is embedded within. */ static struct block * tower_node_to_block (const struct tower_node *node) { return tower_data (node, struct block, node); } /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT blocks in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its blocks (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if (values[i] < values[i + 1]) { size_t j; for (j = cnt - 1; values[i] >= values[j]; j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; /* Disallow N values that overflow on 32-bit machines. */ assert (n <= 12); for (; n > 1; ) value *= n--; return value; } /* Returns C(n, k), the number of ways that K choices can be made from N items when order is unimportant. */ static unsigned int binomial_cofficient (unsigned int n, unsigned int k) { assert (n >= k); return factorial (n) / factorial (k) / factorial (n - k); } /* Tests whether PARTS is a K-part integer composition of N. Returns true if so, false otherwise. */ static bool UNUSED is_k_composition (int n, int k, const int parts[]) { int sum; int i; sum = 0; for (i = 0; i < k; i++) { if (parts[i] < 1 || parts[i] > n) return false; sum += parts[i]; } return sum == n; } /* Advances the K-part integer composition of N stored in PARTS to the next lexicographically greater one. Returns true if successful, false if the composition was already the greatest K-part composition of N (in which case PARTS is unaltered). */ static bool next_k_composition (int n UNUSED, int k, int parts[]) { int x, i; assert (is_k_composition (n, k, parts)); if (k == 1) return false; for (i = k - 1; i > 0; i--) if (parts[i] > 1) break; if (i == 0) return false; x = parts[i] - 1; parts[i] = 1; parts[i - 1]++; parts[k - 1] = x; assert (is_k_composition (n, k, parts)); return true; } /* Sets the K integers in PARTS to the lexicographically first K-part composition of N. */ static void first_k_composition (int n, int k, int parts[]) { int i; assert (n >= k); for (i = 0; i < k; i++) parts[i] = 1; parts[k - 1] += n - k; } /* Advances *K and PARTS to the next integer composition of N. Compositions are ordered from shortest to longest and in lexicographical order within a given length. Before the first call, initialize *K to 0. After each successful call, *K contains the length of the current composition and the *K blocks in PARTS contain its parts. Returns true if successful, false if the set of compositions has been exhausted. */ static bool next_composition (int n, int *k, int parts[]) { if (*k >= 1 && next_k_composition (n, *k, parts)) return true; else if (*k < n) { first_k_composition (n, ++*k, parts); return true; } else return false; } /* A block expected to be found in a tower. */ struct expected_block { int size; /* Expected thickness of block. */ int x; /* Expected value for `x' member. */ }; /* Checks that tower T contains the BLOCK_CNT blocks described by BLOCKS[]. */ static void check_tower (struct tower *t, struct expected_block blocks[], size_t block_cnt) { int total_height; struct tower_node *node; size_t i; check (tower_count (t) == block_cnt); check (tower_is_empty (t) == (block_cnt == 0)); total_height = 0; for (i = 0; i < block_cnt; i++) { unsigned long int level; for (level = total_height; level < total_height + blocks[i].size; level++) { struct tower_node *found; unsigned long int block_start; found = tower_lookup (t, level, &block_start); check (found != NULL); check (tower_node_to_block (found)->x == blocks[i].x); check (block_start == total_height); check (tower_node_get_level (found) == total_height); check (tower_node_get_index (found) == i); check (tower_get (t, i) == found); } total_height += blocks[i].size; } check (tower_height (t) == total_height); for (node = tower_first (t), i = 0; node != NULL; node = tower_next (t, node), i++) { check (tower_node_get_size (node) == blocks[i].size); check (tower_node_to_block (node)->x == blocks[i].x); } check (i == block_cnt); for (node = tower_last (t), i = block_cnt - 1; node != NULL; node = tower_prev (t, node), i--) { check (tower_node_get_size (node) == blocks[i].size); check (tower_node_to_block (node)->x == blocks[i].x); } check (i == SIZE_MAX); } /* Tests inserting all possible sets of block heights into a tower in all possible orders, up to a specified maximum tower height. */ static void test_insert (void) { const int max_height = 7; int cnt; for (cnt = 1; cnt <= max_height; cnt++) { unsigned int composition_cnt; struct expected_block *expected; int *sizes; int block_cnt; int *order; struct block *blocks; expected = xnmalloc (cnt, sizeof *expected); sizes = xnmalloc (cnt, sizeof *sizes); order = xnmalloc (cnt, sizeof *order); blocks = xnmalloc (cnt, sizeof *blocks); block_cnt = 0; composition_cnt = 0; while (next_composition (cnt, &block_cnt, sizes)) { int i, j; unsigned int permutation_cnt; for (i = 0; i < block_cnt; i++) order[i] = i; permutation_cnt = 0; while (permutation_cnt == 0 || next_permutation (order, block_cnt)) { struct tower t; /* Inserts the block_cnt blocks with the given sizes[] into T in the order given by order[]. */ tower_init (&t); for (i = 0; i < block_cnt; i++) { struct block *under; int idx; idx = order[i]; blocks[idx].x = idx; under = NULL; for (j = 0; j < i; j++) if (idx < order[j] && (under == NULL || under->x > order[j])) under = &blocks[order[j]]; tower_insert (&t, sizes[idx], &blocks[idx].node, under != NULL ? &under->node : NULL); } /* Check that the result is what we expect. */ for (i = 0; i < block_cnt; i++) { expected[i].size = sizes[i]; expected[i].x = i; } check_tower (&t, expected, block_cnt); permutation_cnt++; } check (permutation_cnt == factorial (block_cnt)); composition_cnt++; } check (composition_cnt == 1 << (cnt - 1)); free (expected); free (sizes); free (order); free (blocks); } } /* Tests deleting blocks from towers that initially contain all possible sets of block sizes into a tower in all possible orders, up to a specified maximum tower height. */ static void test_delete (void) { const int max_height = 7; int cnt; for (cnt = 1; cnt <= max_height; cnt++) { unsigned int composition_cnt; struct expected_block *expected; int *sizes; int block_cnt; int *order; struct block *blocks; expected = xnmalloc (cnt, sizeof *expected); sizes = xnmalloc (cnt, sizeof *sizes); order = xnmalloc (cnt, sizeof *order); blocks = xnmalloc (cnt, sizeof *blocks); block_cnt = 0; composition_cnt = 0; while (next_composition (cnt, &block_cnt, sizes)) { int i; unsigned int permutation_cnt; for (i = 0; i < block_cnt; i++) order[i] = i; permutation_cnt = 0; while (permutation_cnt == 0 || next_permutation (order, block_cnt)) { struct tower t; /* Insert blocks into tower in ascending order. */ tower_init (&t); for (i = 0; i < block_cnt; i++) { blocks[i].x = i; tower_insert (&t, sizes[i], &blocks[i].node, NULL); expected[i].x = i; expected[i].size = sizes[i]; } check_tower (&t, expected, block_cnt); /* Delete blocks from tower in the order of order[]. */ for (i = 0; i < block_cnt; i++) { int idx = order[i]; int j; tower_delete (&t, &blocks[idx].node); for (j = 0; ; j++) { assert (j < block_cnt - i); if (expected[j].x == idx) { memmove (&expected[j], &expected[j + 1], sizeof *expected * (block_cnt - i - j - 1)); break; } } check_tower (&t, expected, block_cnt - i - 1); } permutation_cnt++; } check (permutation_cnt == factorial (block_cnt)); composition_cnt++; } check (composition_cnt == 1 << (cnt - 1)); free (expected); free (sizes); free (order); free (blocks); } } /* Tests towers containing all possible block sizes, resizing the blocks to all possible sizes that conserve the total tower height, up to a maximum total tower height. */ static void test_resize (void) { const int max_height = 9; int cnt; for (cnt = 1; cnt <= max_height; cnt++) { unsigned int composition_cnt; struct expected_block *expected; int *sizes, *new_sizes; int block_cnt; int *order; struct block *blocks; expected = xnmalloc (cnt, sizeof *expected); sizes = xnmalloc (cnt, sizeof *sizes); new_sizes = xnmalloc (cnt, sizeof *new_sizes); order = xnmalloc (cnt, sizeof *order); blocks = xnmalloc (cnt, sizeof *blocks); block_cnt = 0; composition_cnt = 0; while (next_composition (cnt, &block_cnt, sizes)) { int i; unsigned int resizes = 0; for (resizes = 0, first_k_composition (cnt, block_cnt, new_sizes); (resizes == 0 || next_k_composition (cnt, block_cnt, new_sizes)); resizes++) { struct tower t; /* Insert blocks into tower in ascending order. */ tower_init (&t); for (i = 0; i < block_cnt; i++) { blocks[i].x = i; tower_insert (&t, sizes[i], &blocks[i].node, NULL); expected[i].x = i; expected[i].size = sizes[i]; } check_tower (&t, expected, block_cnt); /* Resize all the blocks. */ for (i = 0; i < block_cnt; i++) { if (expected[i].size != new_sizes[i] || rand () % 2) tower_resize (&t, &blocks[i].node, new_sizes[i]); expected[i].size = new_sizes[i]; } check_tower (&t, expected, block_cnt); } check (resizes == binomial_cofficient (cnt - 1, block_cnt - 1)); composition_cnt++; } check (composition_cnt == 1 << (cnt - 1)); free (expected); free (new_sizes); free (sizes); free (order); free (blocks); } } /* Tests splicing all possible contiguous sets of blocks out of one tower into a second, initially empty tower. */ static void test_splice_out (void) { const int max_height = 9; int cnt; for (cnt = 1; cnt <= max_height; cnt++) { unsigned int composition_cnt; struct expected_block *expected; int *sizes, *new_sizes; int block_cnt; int *order; struct block *blocks; expected = xnmalloc (cnt, sizeof *expected); sizes = xnmalloc (cnt, sizeof *sizes); new_sizes = xnmalloc (cnt, sizeof *new_sizes); order = xnmalloc (cnt, sizeof *order); blocks = xnmalloc (cnt, sizeof *blocks); block_cnt = 0; composition_cnt = 0; while (next_composition (cnt, &block_cnt, sizes)) { int i, j; for (i = 0; i < block_cnt; i++) for (j = i; j <= block_cnt; j++) { struct tower src, dst; int k; tower_init (&src); tower_init (&dst); /* Insert blocks into SRC and DST in ascending order. */ for (k = 0; k < block_cnt; k++) { blocks[k].x = k; tower_insert (&src, sizes[k], &blocks[k].node, NULL); expected[k].x = k; expected[k].size = sizes[k]; } check_tower (&src, expected, block_cnt); /* Splice blocks I...J into DST. */ tower_splice (&dst, NULL, &src, &blocks[i].node, j < block_cnt ? &blocks[j].node : NULL); check_tower (&dst, &expected[i], j - i); memmove (&expected[i], &expected[j], sizeof *expected * (block_cnt - j)); check_tower (&src, expected, block_cnt - (j - i)); } composition_cnt++; } check (composition_cnt == 1 << (cnt - 1)); free (expected); free (new_sizes); free (sizes); free (order); free (blocks); } } /* Tests splicing all of the contents of a tower into all possible positions in a second tower. */ static void test_splice_in (void) { const int max_height = 9; int cnt; for (cnt = 1; cnt <= max_height; cnt++) { unsigned int composition_cnt; struct expected_block *expected; int *sizes, *new_sizes; int block_cnt; int *order; struct block *blocks; expected = xnmalloc (cnt, sizeof *expected); sizes = xnmalloc (cnt, sizeof *sizes); new_sizes = xnmalloc (cnt, sizeof *new_sizes); order = xnmalloc (cnt, sizeof *order); blocks = xnmalloc (cnt, sizeof *blocks); block_cnt = 0; composition_cnt = 0; while (next_composition (cnt, &block_cnt, sizes)) { int i, j; for (i = 0; i < block_cnt; i++) for (j = i; j <= block_cnt; j++) { struct tower src, dst; int k; tower_init (&src); tower_init (&dst); /* Insert blocks into SRC and DST in ascending order. */ for (k = 0; k < block_cnt; k++) { blocks[k].x = k; tower_insert (k >= i && k < j ? &src : &dst, sizes[k], &blocks[k].node, NULL); expected[k].x = k; expected[k].size = sizes[k]; } /* Splice SRC into DST. */ tower_splice (&dst, j < block_cnt ? &blocks[j].node : NULL, &src, i != j ? &blocks[i].node : NULL, NULL); check_tower (&dst, expected, block_cnt); } composition_cnt++; } check (composition_cnt == 1 << (cnt - 1)); free (expected); free (new_sizes); free (sizes); free (order); free (blocks); } } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert", "insert", test_insert }, { "delete", "delete", test_delete }, { "resize", "resize", test_resize }, { "splice-out", "splice out", test_splice_out }, { "splice-in", "splice in", test_splice_in }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test tower library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/abt-test.c0000644000175000017500000005176412470243701014133 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the abt_* routines defined in abt.c. This test program aims to be as comprehensive as possible. "gcov -b" should report 100% coverage of lines and branches in the abt_* routines. "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } static void * xmemdup (const void *p, size_t n) { void *q = xmalloc (n); memcpy (q, p, n); return q; } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* Node type and support routines. */ /* Test data element. */ struct element { struct abt_node node; /* Embedded binary tree element. */ int data; /* Primary value. */ int count; /* Number of nodes in subtree, including this node. */ }; static int aux_data; /* Returns the `struct element' that NODE is embedded within. */ static struct element * abt_node_to_element (const struct abt_node *node) { return abt_data (node, struct element, node); } /* Compares the `x' values in A and B and returns a strcmp-type return value. Verifies that AUX points to aux_data. */ static int compare_elements (const struct abt_node *a_, const struct abt_node *b_, const void *aux) { const struct element *a = abt_node_to_element (a_); const struct element *b = abt_node_to_element (b_); check (aux == &aux_data); return a->data < b->data ? -1 : a->data > b->data; } /* Recalculates the count for NODE's subtree by adding up the counts for its LEFT and RIGHT child subtrees. */ static void reaugment_elements (struct abt_node *node_, const void *aux) { struct element *node = abt_node_to_element (node_); check (aux == &aux_data); node->count = 1; if (node->node.down[0] != NULL) node->count += abt_node_to_element (node->node.down[0])->count; if (node->node.down[1] != NULL) node->count += abt_node_to_element (node->node.down[1])->count; } /* Compares A and B and returns a strcmp-type return value. */ static int compare_ints_noaux (const void *a_, const void *b_) { const int *a = a_; const int *b = b_; return *a < *b ? -1 : *a > *b; } /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT elements in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if (values[i] < values[i + 1]) { size_t j; for (j = cnt - 1; values[i] >= values[j]; j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } /* Finds and returns the element in ABT that is in the given 0-based POSITION in in-order. */ static struct element * find_by_position (struct abt *abt, int position) { struct abt_node *p; for (p = abt->root; p != NULL; ) { int p_pos = p->down[0] ? abt_node_to_element (p->down[0])->count : 0; if (position == p_pos) return abt_node_to_element (p); else if (position < p_pos) p = p->down[0]; else { p = p->down[1]; position -= p_pos + 1; } } return NULL; } /* Checks that all the augmentations are correct in the subtree rooted at P. Returns the number of nodes in the subtree. */ static int check_augmentations (struct abt_node *p_) { if (p_ == NULL) return 0; else { struct element *p = abt_node_to_element (p_); int left_count = check_augmentations (p->node.down[0]); int right_count = check_augmentations (p->node.down[1]); int total = left_count + right_count + 1; check (p->count == total); return total; } } /* Check that the levels are correct in the subtree rooted at P. */ static void check_levels (struct abt_node *p) { if (p != NULL) { int i, j; check_levels (p->down[0]); check_levels (p->down[1]); check (p->level >= 1); if (p->level > 1) { struct abt_node *q = p->down[1]; check (q != NULL); check (q->level == p->level || q->level == p->level - 1); } for (i = 0; i < 2; i++) if (p->down[i] != NULL) for (j = 0; j < 2; j++) if (p->down[i]->down[j] != NULL) check (p->down[i]->down[j]->level < p->level); } } /* Checks that ABT contains the CNT ints in DATA, that its structure is correct, and that certain operations on ABT produce the expected results. */ static void check_abt (struct abt *abt, const int data[], size_t cnt) { struct element e; size_t i; int *order; order = xmemdup (data, cnt * sizeof *data); qsort (order, cnt, sizeof *order, compare_ints_noaux); if (abt->compare != NULL) { for (i = 0; i < cnt; i++) { struct abt_node *p; e.data = data[i]; if (rand () % 2) p = abt_find (abt, &e.node); else p = abt_insert (abt, &e.node); check (p != NULL); check (p != &e.node); check (abt_node_to_element (p)->data == data[i]); } e.data = -1; check (abt_find (abt, &e.node) == NULL); } check_levels (abt->root); check_augmentations (abt->root); for (i = 0; i < cnt; i++) check (find_by_position (abt, i)->data == order[i]); if (cnt == 0) { check (abt_first (abt) == NULL); check (abt_last (abt) == NULL); check (abt_next (abt, NULL) == NULL); check (abt_prev (abt, NULL) == NULL); } else { struct abt_node *p; for (p = abt_first (abt), i = 0; i < cnt; p = abt_next (abt, p), i++) check (abt_node_to_element (p)->data == order[i]); check (p == NULL); for (p = abt_last (abt), i = 0; i < cnt; p = abt_prev (abt, p), i++) check (abt_node_to_element (p)->data == order[cnt - i - 1]); check (p == NULL); } check (abt_is_empty (abt) == (cnt == 0)); free (order); } /* Ways that nodes can be inserted. */ enum insertion_method { INSERT, /* With abt_insert. */ INSERT_AFTER, /* With abt_insert_after. */ INSERT_BEFORE /* With abt_insert_before. */ }; /* Inserts INSERT into ABT with the given METHOD. */ static void insert_node (struct abt *abt, struct element *insert, enum insertion_method method) { if (method == INSERT) check (abt_insert (abt, &insert->node) == NULL); else { struct abt_node *p = abt->root; int dir = 0; if (p != NULL) for (;;) { dir = insert->data > abt_node_to_element (p)->data; if (p->down[dir] == NULL) break; p = p->down[dir]; } if (method == INSERT_AFTER) { if (p != NULL && (dir != 1 || p->down[1] != NULL)) p = abt_prev (abt, p); abt_insert_after (abt, p, &insert->node); } else { if (p != NULL && (dir != 0 || p->down[0] != NULL)) p = abt_next (abt, p); abt_insert_before (abt, p, &insert->node); } } } /* Inserts the CNT values from 0 to CNT - 1 (inclusive) into an ABT in the order specified by INSERTIONS using the given METHOD, then deletes them in the order specified by DELETIONS, checking the ABT's contents for correctness after each operation. */ static void do_test_insert_delete (enum insertion_method method, const int insertions[], const int deletions[], size_t cnt) { struct element *elements; struct abt abt; size_t i; elements = xnmalloc (cnt, sizeof *elements); for (i = 0; i < cnt; i++) elements[i].data = i; abt_init (&abt, method == INSERT ? compare_elements : NULL, reaugment_elements, &aux_data); check_abt (&abt, NULL, 0); for (i = 0; i < cnt; i++) { insert_node (&abt, &elements[insertions[i]], method); check_abt (&abt, insertions, i + 1); } for (i = 0; i < cnt; i++) { abt_delete (&abt, &elements[deletions[i]].node); check_abt (&abt, deletions + i + 1, cnt - i - 1); } free (elements); } /* Inserts the CNT values from 0 to CNT - 1 (inclusive) into an ABT in the order specified by INSERTIONS, then deletes them in the order specified by DELETIONS, checking the ABT's contents for correctness after each operation. */ static void test_insert_delete (const int insertions[], const int deletions[], size_t cnt) { do_test_insert_delete (INSERT, insertions, deletions, cnt); do_test_insert_delete (INSERT_AFTER, insertions, deletions, cnt); do_test_insert_delete (INSERT_BEFORE, insertions, deletions, cnt); } /* Inserts values into an ABT in each possible order, then removes them in each possible order, up to a specified maximum size. */ static void test_insert_any_remove_any (void) { const int max_elems = 5; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int ins_perm_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (ins_perm_cnt = 0; ins_perm_cnt == 0 || next_permutation (insertions, cnt); ins_perm_cnt++) { unsigned int del_perm_cnt; int i; for (i = 0; i < cnt; i++) deletions[i] = i; for (del_perm_cnt = 0; del_perm_cnt == 0 || next_permutation (deletions, cnt); del_perm_cnt++) test_insert_delete (insertions, deletions, cnt); check (del_perm_cnt == factorial (cnt)); } check (ins_perm_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts values into an ABT in each possible order, then removes them in the same order, up to a specified maximum size. */ static void test_insert_any_remove_same (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) test_insert_delete (values, values, cnt); check (permutation_cnt == factorial (cnt)); free (values); } } /* Inserts values into an ABT in each possible order, then removes them in reverse order, up to a specified maximum size. */ static void test_insert_any_remove_reverse (void) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int permutation_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (insertions, cnt); permutation_cnt++) { memcpy (deletions, insertions, sizeof *insertions * cnt); reverse (deletions, cnt); test_insert_delete (insertions, deletions, cnt); } check (permutation_cnt == factorial (cnt)); free (insertions); free (deletions); } } /* Inserts and removes values in an ABT in random orders. */ static void test_random_sequence (void) { const int max_elems = 128; const int max_trials = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt += 2) { int *insertions, *deletions; int trial; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (i = 0; i < cnt; i++) deletions[i] = i; for (trial = 0; trial < max_trials; trial++) { random_shuffle (insertions, cnt, sizeof *insertions); random_shuffle (deletions, cnt, sizeof *deletions); test_insert_delete (insertions, deletions, cnt); } free (insertions); free (deletions); } } /* Inserts elements into an ABT in ascending order. */ static void test_insert_ordered (void) { const int max_elems = 1024; struct element *elements; int *values; struct abt abt; int i; abt_init (&abt, compare_elements, reaugment_elements, &aux_data); elements = xnmalloc (max_elems, sizeof *elements); values = xnmalloc (max_elems, sizeof *values); for (i = 0; i < max_elems; i++) { values[i] = elements[i].data = i; check (abt_insert (&abt, &elements[i].node) == NULL); check_abt (&abt, values, i + 1); } free (elements); free (values); } /* Inserts elements into an ABT, then moves the nodes around in memory. */ static void test_moved (void) { const int max_elems = 128; struct element *e[2]; int cur; int *values; struct abt abt; int i, j; abt_init (&abt, compare_elements, reaugment_elements, &aux_data); e[0] = xnmalloc (max_elems, sizeof *e[0]); e[1] = xnmalloc (max_elems, sizeof *e[1]); values = xnmalloc (max_elems, sizeof *values); cur = 0; for (i = 0; i < max_elems; i++) { values[i] = e[cur][i].data = i; check (abt_insert (&abt, &e[cur][i].node) == NULL); check_abt (&abt, values, i + 1); for (j = 0; j <= i; j++) { e[!cur][j] = e[cur][j]; abt_moved (&abt, &e[!cur][j].node); check_abt (&abt, values, i + 1); } cur = !cur; } free (e[0]); free (e[1]); free (values); } /* Inserts values into an ABT, then changes their values. */ static void test_changed (void) { const int max_elems = 6; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values, *changed_values; struct element *elements; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); changed_values = xnmalloc (cnt, sizeof *changed_values); elements = xnmalloc (cnt, sizeof *elements); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) { for (i = 0; i < cnt; i++) { int j, k; for (j = 0; j <= cnt; j++) { struct abt abt; struct abt_node *changed_retval; abt_init (&abt, compare_elements, reaugment_elements, &aux_data); /* Add to ABT in order. */ for (k = 0; k < cnt; k++) { int n = values[k]; elements[n].data = n; check (abt_insert (&abt, &elements[n].node) == NULL); } check_abt (&abt, values, cnt); /* Change value i to j. */ elements[i].data = j; for (k = 0; k < cnt; k++) changed_values[k] = k; changed_retval = abt_changed (&abt, &elements[i].node); if (i != j && j < cnt) { /* Will cause duplicate. */ check (changed_retval == &elements[j].node); changed_values[i] = changed_values[cnt - 1]; check_abt (&abt, changed_values, cnt - 1); } else { /* Succeeds. */ check (changed_retval == NULL); changed_values[i] = j; check_abt (&abt, changed_values, cnt); } } } } check (permutation_cnt == factorial (cnt)); free (values); free (changed_values); free (elements); } } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert-any-remove-any", "insert any order, delete any order", test_insert_any_remove_any }, { "insert-any-remove-same", "insert any order, delete same order", test_insert_any_remove_same }, { "insert-any-remove-reverse", "insert any order, delete reverse order", test_insert_any_remove_reverse }, { "random-sequence", "insert and delete in random sequence", test_random_sequence }, { "insert-ordered", "insert in ascending order", test_insert_ordered }, { "moved", "move elements around in memory", test_moved }, { "changed", "change key data in nodes", test_changed } }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test augmented binary tree\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/llx-test.c0000644000175000017500000016703612470242646014173 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the llx_* routines defined in ll.c. This test program aims to be as comprehensive as possible. "gcov -b" should report 100% coverage of lines and branches in llx.c and llx.h. "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. This test program depends only on ll.c, llx.c, and the standard C library. See ll-test.c for a similar program for the ll_* routines. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include /* Support preliminaries. */ #if __GNUC__ >= 2 && !defined UNUSED #define UNUSED __attribute__ ((unused)) #else #define UNUSED #endif /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* Always returns a null pointer, failing allocation. */ static struct llx * null_allocate_node (void *aux UNUSED) { return NULL; } /* Does nothing. */ static void null_release_node (struct llx *llx UNUSED, void *aux UNUSED) { } /* Memory manager that fails all allocations and does nothing on free. */ static const struct llx_manager llx_null_mgr = { null_allocate_node, null_release_node, NULL, }; /* List type and support routines. */ /* Test data element. */ struct element { int x; /* Primary value. */ int y; /* Secondary value. */ }; static int aux_data; /* Prints the elements in LIST. */ static void UNUSED print_list (struct llx_list *list) { struct llx *x; printf ("list:"); for (x = llx_head (list); x != llx_null (list); x = llx_next (x)) { const struct element *e = llx_data (x); printf (" %d", e->x); } printf ("\n"); } /* Prints the value returned by PREDICATE given auxiliary data AUX for each element in LIST. */ static void UNUSED print_pred (struct llx_list *list, llx_predicate_func *predicate, void *aux UNUSED) { struct llx *x; printf ("pred:"); for (x = llx_head (list); x != llx_null (list); x = llx_next (x)) printf (" %d", predicate (x, aux)); printf ("\n"); } /* Prints the CNT numbers in VALUES. */ static void UNUSED print_array (int values[], size_t cnt) { size_t i; printf ("arry:"); for (i = 0; i < cnt; i++) printf (" %d", values[i]); printf ("\n"); } /* Compares the `x' values in A and B and returns a strcmp-type return value. Verifies that AUX points to aux_data. */ static int compare_elements (const void *a_, const void *b_, void *aux) { const struct element *a = a_; const struct element *b = b_; check (aux == &aux_data); return a->x < b->x ? -1 : a->x > b->x; } /* Compares the `x' and `y' values in A and B and returns a strcmp-type return value. Verifies that AUX points to aux_data. */ static int compare_elements_x_y (const void *a_, const void *b_, void *aux) { const struct element *a = a_; const struct element *b = b_; check (aux == &aux_data); if (a->x != b->x) return a->x < b->x ? -1 : 1; else if (a->y != b->y) return a->y < b->y ? -1 : 1; else return 0; } /* Compares the `y' values in A and B and returns a strcmp-type return value. Verifies that AUX points to aux_data. */ static int compare_elements_y (const void *a_, const void *b_, void *aux) { const struct element *a = a_; const struct element *b = b_; check (aux == &aux_data); return a->y < b->y ? -1 : a->y > b->y; } /* Returns true if the bit in *PATTERN indicated by `x in *ELEMENT is set, false otherwise. */ static bool pattern_pred (const void *element_, void *pattern_) { const struct element *element = element_; unsigned int *pattern = pattern_; return (*pattern & (1u << element->x)) != 0; } /* Allocates N elements in *ELEMS. Adds the elements to LIST, if it is nonnull. Puts pointers to the elements' list elements in *ELEMP, followed by a pointer to the list null element, if ELEMP is nonnull. Allocates space for N values in *VALUES, if VALUES is nonnull. */ static void allocate_elements (size_t n, struct llx_list *list, struct element ***elems, struct llx ***elemp, int **values) { size_t i; if (list != NULL) llx_init (list); *elems = xnmalloc (n, sizeof **elems); if (elemp != NULL) { *elemp = xnmalloc (n + 1, sizeof *elemp); (*elemp)[n] = llx_null (list); } for (i = 0; i < n; i++) { (*elems)[i] = xmalloc (sizeof ***elems); if (list != NULL) { struct llx *llx = llx_push_tail (list, (*elems)[i], &llx_malloc_mgr); if (elemp != NULL) (*elemp)[i] = llx; } } if (values != NULL) *values = xnmalloc (n, sizeof *values); } /* Copies the CNT values of `x' from LIST into VALUES[]. */ static void extract_values (struct llx_list *list, int values[], size_t cnt) { struct llx *x; check (llx_count (list) == cnt); for (x = llx_head (list); x != llx_null (list); x = llx_next (x)) { struct element *e = llx_data (x); *values++ = e->x; } } /* As allocate_elements, but sets ascending values, starting from 0, in `x' values in *ELEMS and in *VALUES (if nonnull). */ static void allocate_ascending (size_t n, struct llx_list *list, struct element ***elems, struct llx ***elemp, int **values) { size_t i; allocate_elements (n, list, elems, elemp, values); for (i = 0; i < n; i++) (*elems)[i]->x = i; if (values != NULL) extract_values (list, *values, n); } /* As allocate_elements, but sets binary values extracted from successive bits in PATTERN in `x' values in *ELEMS and in *VALUES (if nonnull). */ static void allocate_pattern (size_t n, int pattern, struct llx_list *list, struct element ***elems, struct llx ***elemp, int **values) { size_t i; allocate_elements (n, list, elems, elemp, values); for (i = 0; i < n; i++) (*elems)[i]->x = (pattern & (1 << i)) != 0; if (values != NULL) extract_values (list, *values, n); } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } /* As allocate_ascending, but orders the values randomly. */ static void allocate_random (size_t n, struct llx_list *list, struct element ***elems, struct llx ***elemp, int **values) { size_t i; allocate_elements (n, list, elems, elemp, values); for (i = 0; i < n; i++) (*elems)[i]->x = i; random_shuffle (*elems, n, sizeof **elems); if (values != NULL) extract_values (list, *values, n); } /* Frees LIST, the N elements of ELEMS, ELEMP, and VALUES. */ static void free_elements (size_t n, struct llx_list *list, struct element **elems, struct llx **elemp, int *values) { size_t i; if (list != NULL) llx_destroy (list, NULL, NULL, &llx_malloc_mgr); for (i = 0; i < n; i++) free (elems[i]); free (elems); free (elemp); free (values); } /* Compares A and B and returns a strcmp-type return value. */ static int compare_ints (const void *a_, const void *b_, void *aux UNUSED) { const int *a = a_; const int *b = b_; return *a < *b ? -1 : *a > *b; } /* Compares A and B and returns a strcmp-type return value. */ static int compare_ints_noaux (const void *a_, const void *b_) { const int *a = a_; const int *b = b_; return *a < *b ? -1 : *a > *b; } /* Checks that LIST contains the CNT values in ELEMENTS. */ static void check_list_contents (struct llx_list *list, int elements[], size_t cnt) { struct llx *llx; size_t i; check ((cnt == 0) == llx_is_empty (list)); /* Iterate in forward order. */ for (llx = llx_head (list), i = 0; i < cnt; llx = llx_next (llx), i++) { struct element *e = llx_data (llx); check (elements[i] == e->x); check (llx != llx_null (list)); } check (llx == llx_null (list)); /* Iterate in reverse order. */ for (llx = llx_tail (list), i = 0; i < cnt; llx = llx_prev (llx), i++) { struct element *e = llx_data (llx); check (elements[cnt - i - 1] == e->x); check (llx != llx_null (list)); } check (llx == llx_null (list)); check (llx_count (list) == cnt); } /* Lexicographicallxy compares ARRAY1, which contains COUNT1 elements of SIZE bytes each, to ARRAY2, which contains COUNT2 elements of SIZE bytes, according to COMPARE. Returns a strcmp-type result. AUX is passed to COMPARE as auxiliary data. */ static int lexicographical_compare_3way (const void *array1, size_t count1, const void *array2, size_t count2, size_t size, int (*compare) (const void *, const void *, void *aux), void *aux) { const char *first1 = array1; const char *first2 = array2; size_t min_count = count1 < count2 ? count1 : count2; while (min_count > 0) { int cmp = compare (first1, first2, aux); if (cmp != 0) return cmp; first1 += size; first2 += size; min_count--; } return count1 < count2 ? -1 : count1 > count2; } /* Tests. */ /* Tests list push and pop operations. */ static void test_push_pop (void) { const int max_elems = 1024; struct llx_list list; struct element **elems; int *values; int i; allocate_elements (max_elems, NULL, &elems, NULL, &values); /* Push on tail. */ llx_init (&list); check_list_contents (&list, NULL, 0); for (i = 0; i < max_elems; i++) { values[i] = elems[i]->x = i; llx_push_tail (&list, elems[i], &llx_malloc_mgr); check_list_contents (&list, values, i + 1); } /* Remove from tail. */ for (i = 0; i < max_elems; i++) { struct element *e = llx_pop_tail (&list, &llx_malloc_mgr); check (e->x == max_elems - i - 1); check_list_contents (&list, values, max_elems - i - 1); } /* Push at start. */ check_list_contents (&list, NULL, 0); for (i = 0; i < max_elems; i++) { values[max_elems - i - 1] = elems[i]->x = max_elems - i - 1; llx_push_head (&list, elems[i], &llx_malloc_mgr); check_list_contents (&list, &values[max_elems - i - 1], i + 1); } /* Remove from start. */ for (i = 0; i < max_elems; i++) { struct element *e = llx_pop_head (&list, &llx_malloc_mgr); check (e->x == (int) i); check_list_contents (&list, &values[i + 1], max_elems - i - 1); } free_elements (max_elems, &list, elems, NULL, values); } /* Tests insertion and removal at arbitrary positions. */ static void test_insert_remove (void) { const int max_elems = 16; int cnt; for (cnt = 0; cnt < max_elems; cnt++) { struct element **elems; struct llx **elemp; int *values = xnmalloc (cnt + 1, sizeof *values); struct llx_list list; struct element extra; struct llx *extra_llx; int pos; allocate_ascending (cnt, &list, &elems, &elemp, NULL); extra.x = -1; for (pos = 0; pos <= cnt; pos++) { int i, j; extra_llx = llx_insert (elemp[pos], &extra, &llx_malloc_mgr); check (extra_llx != NULL); j = 0; for (i = 0; i < pos; i++) values[j++] = i; values[j++] = -1; for (; i < cnt; i++) values[j++] = i; check_list_contents (&list, values, cnt + 1); llx_remove (extra_llx, &llx_malloc_mgr); } check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, elemp, values); } } /* Tests swapping individual elements. */ static void test_swap (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int i, j, k; allocate_ascending (cnt, &list, &elems, &elemp, &values); check_list_contents (&list, values, cnt); for (i = 0; i < cnt; i++) for (j = 0; j < cnt; j++) for (k = 0; k < 2; k++) { int t; llx_swap (elemp[i], elemp[j]); t = values[i]; values[i] = values[j]; values[j] = t; check_list_contents (&list, values, cnt); } free_elements (cnt, &list, elems, elemp, values); } } /* Tests swapping ranges of list elements. */ static void test_swap_range (void) { const int max_elems = 8; int cnt, a0, a1, b0, b1, r; for (cnt = 0; cnt <= max_elems; cnt++) for (a0 = 0; a0 <= cnt; a0++) for (a1 = a0; a1 <= cnt; a1++) for (b0 = a1; b0 <= cnt; b0++) for (b1 = b0; b1 <= cnt; b1++) for (r = 0; r < 2; r++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int i, j; allocate_ascending (cnt, &list, &elems, &elemp, &values); check_list_contents (&list, values, cnt); j = 0; for (i = 0; i < a0; i++) values[j++] = i; for (i = b0; i < b1; i++) values[j++] = i; for (i = a1; i < b0; i++) values[j++] = i; for (i = a0; i < a1; i++) values[j++] = i; for (i = b1; i < cnt; i++) values[j++] = i; check (j == cnt); if (r == 0) llx_swap_range (elemp[a0], elemp[a1], elemp[b0], elemp[b1]); else llx_swap_range (elemp[b0], elemp[b1], elemp[a0], elemp[a1]); check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, elemp, values); } } /* Tests removing ranges of list elements. */ static void test_remove_range (void) { const int max_elems = 8; int cnt, r0, r1; for (cnt = 0; cnt <= max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int i, j; allocate_ascending (cnt, &list, &elems, &elemp, &values); check_list_contents (&list, values, cnt); j = 0; for (i = 0; i < r0; i++) values[j++] = i; for (i = r1; i < cnt; i++) values[j++] = i; llx_remove_range (elemp[r0], elemp[r1], &llx_malloc_mgr); check_list_contents (&list, values, j); free_elements (cnt, &list, elems, elemp, values); } } /* Tests llx_remove_equal. */ static void test_remove_equal (void) { const int max_elems = 8; int cnt, r0, r1, eq_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) for (eq_pat = 0; eq_pat <= 1 << cnt; eq_pat++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; struct element to_remove; int remaining; int i; allocate_elements (cnt, &list, &elems, &elemp, &values); remaining = 0; for (i = 0; i < cnt; i++) { int x = eq_pat & (1 << i) ? -1 : i; bool delete = x == -1 && r0 <= i && i < r1; elems[i]->x = x; if (!delete) values[remaining++] = x; } to_remove.x = -1; check ((int) llx_remove_equal (elemp[r0], elemp[r1], &to_remove, compare_elements, &aux_data, &llx_malloc_mgr) == cnt - remaining); check_list_contents (&list, values, remaining); free_elements (cnt, &list, elems, elemp, values); } } /* Tests llx_remove_if. */ static void test_remove_if (void) { const int max_elems = 8; int cnt, r0, r1, pattern; for (cnt = 0; cnt <= max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) for (pattern = 0; pattern <= 1 << cnt; pattern++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int remaining; int i; allocate_ascending (cnt, &list, &elems, &elemp, &values); remaining = 0; for (i = 0; i < cnt; i++) { bool delete = (pattern & (1 << i)) && r0 <= i && i < r1; if (!delete) values[remaining++] = i; } check ((int) llx_remove_if (elemp[r0], elemp[r1], pattern_pred, &pattern, &llx_malloc_mgr) == cnt - remaining); check_list_contents (&list, values, remaining); free_elements (cnt, &list, elems, elemp, values); } } /* Tests, via HELPER, a function that looks at list elements equal to some specified element. */ static void test_examine_equal_range (void (*helper) (int r0, int r1, int eq_pat, const void *to_find, struct llx **elemp)) { const int max_elems = 8; int cnt, r0, r1, eq_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (eq_pat = 0; eq_pat <= 1 << cnt; eq_pat++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; struct element to_find; int i; allocate_ascending (cnt, &list, &elems, &elemp, &values); for (i = 0; i < cnt; i++) if (eq_pat & (1 << i)) values[i] = elems[i]->x = -1; to_find.x = -1; for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) helper (r0, r1, eq_pat, &to_find, elemp); check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, elemp, values); } } /* Tests, via HELPER, a function that looks at list elements for which a given predicate returns true. */ static void test_examine_if_range (void (*helper) (int r0, int r1, int eq_pat, struct llx **elemp)) { const int max_elems = 8; int cnt, r0, r1, eq_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (eq_pat = 0; eq_pat <= 1 << cnt; eq_pat++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; allocate_ascending (cnt, &list, &elems, &elemp, &values); for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) helper (r0, r1, eq_pat, elemp); check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, elemp, values); } } /* Helper function for testing llx_find_equal. */ static void test_find_equal_helper (int r0, int r1, int eq_pat, const void *to_find, struct llx **elemp) { struct llx *match; int i; match = llx_find_equal (elemp[r0], elemp[r1], to_find, compare_elements, &aux_data); for (i = r0; i < r1; i++) if (eq_pat & (1 << i)) break; check (match == elemp[i]); } /* Tests llx_find_equal. */ static void test_find_equal (void) { test_examine_equal_range (test_find_equal_helper); } /* Tests llx_find(). */ static void test_find (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int i; allocate_ascending (cnt, &list, &elems, &elemp, &values); for (i = 0; i < cnt; i++) check (llx_find (llx_head (&list), llx_null (&list), elems[i]) == elemp[i]); check (llx_find (llx_head (&list), llx_null (&list), NULL) == NULL); free_elements (cnt, &list, elems, elemp, values); } } /* Helper function for testing llx_find_if. */ static void test_find_if_helper (int r0, int r1, int eq_pat, struct llx **elemp) { struct llx *match = llx_find_if (elemp[r0], elemp[r1], pattern_pred, &eq_pat); int i; for (i = r0; i < r1; i++) if (eq_pat & (1 << i)) break; check (match == elemp[i]); } /* Tests llx_find_if. */ static void test_find_if (void) { test_examine_if_range (test_find_if_helper); } /* Tests llx_find_adjacent_equal. */ static void test_find_adjacent_equal (void) { const int max_elems = 8; int cnt, eq_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (eq_pat = 0; eq_pat <= 1 << cnt; eq_pat++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int match; int i; allocate_ascending (cnt, &list, &elems, &elemp, &values); match = -1; for (i = 0; i < cnt - 1; i++) { elems[i]->y = i; if (eq_pat & (1 << i)) { values[i] = elems[i]->x = match; values[i + 1] = elems[i + 1]->x = match; } else match--; } for (i = 0; i <= cnt; i++) { struct llx *llx1 = llx_find_adjacent_equal (elemp[i], llx_null (&list), compare_elements, &aux_data); struct llx *llx2; int j; llx2 = llx_null (&list); for (j = i; j < cnt - 1; j++) if (eq_pat & (1 << j)) { llx2 = elemp[j]; break; } check (llx1 == llx2); } check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, elemp, values); } } /* Helper function for testing llx_count_range. */ static void test_count_range_helper (int r0, int r1, int eq_pat UNUSED, struct llx **elemp) { check ((int) llx_count_range (elemp[r0], elemp[r1]) == r1 - r0); } /* Tests llx_count_range. */ static void test_count_range (void) { test_examine_if_range (test_count_range_helper); } /* Helper function for testing llx_count_equal. */ static void test_count_equal_helper (int r0, int r1, int eq_pat, const void *to_find, struct llx **elemp) { int count1, count2; int i; count1 = llx_count_equal (elemp[r0], elemp[r1], to_find, compare_elements, &aux_data); count2 = 0; for (i = r0; i < r1; i++) if (eq_pat & (1 << i)) count2++; check (count1 == count2); } /* Tests llx_count_equal. */ static void test_count_equal (void) { test_examine_equal_range (test_count_equal_helper); } /* Helper function for testing llx_count_if. */ static void test_count_if_helper (int r0, int r1, int eq_pat, struct llx **elemp) { int count1; int count2; int i; count1 = llx_count_if (elemp[r0], elemp[r1], pattern_pred, &eq_pat); count2 = 0; for (i = r0; i < r1; i++) if (eq_pat & (1 << i)) count2++; check (count1 == count2); } /* Tests llx_count_if. */ static void test_count_if (void) { test_examine_if_range (test_count_if_helper); } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Returns the number of permutations of the CNT values in VALUES. If VALUES contains duplicates, they must be adjacent. */ static unsigned int expected_perms (int *values, size_t cnt) { size_t i, j; unsigned int perm_cnt; perm_cnt = factorial (cnt); for (i = 0; i < cnt; i = j) { for (j = i + 1; j < cnt; j++) if (values[i] != values[j]) break; perm_cnt /= factorial (j - i); } return perm_cnt; } /* Tests llx_min and llx_max. */ static void test_min_max (void) { const int max_elems = 6; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int *new_values = xnmalloc (cnt, sizeof *values); size_t perm_cnt; allocate_ascending (cnt, &list, &elems, &elemp, &values); perm_cnt = 1; while (llx_next_permutation (llx_head (&list), llx_null (&list), compare_elements, &aux_data)) { int r0, r1; struct llx *x; int i; for (i = 0, x = llx_head (&list); x != llx_null (&list); x = llx_next (x), i++) { struct element *e = llx_data (x); elemp[i] = x; new_values[i] = e->x; } for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) { struct llx *min = llx_min (elemp[r0], elemp[r1], compare_elements, &aux_data); struct llx *max = llx_max (elemp[r0], elemp[r1], compare_elements, &aux_data); if (r0 == r1) { check (min == elemp[r1]); check (max == elemp[r1]); } else { struct element *min_elem = llx_data (min); struct element *max_elem = llx_data (max); int min_int, max_int; int i; min_int = max_int = new_values[r0]; for (i = r0; i < r1; i++) { int value = new_values[i]; if (value < min_int) min_int = value; if (value > max_int) max_int = value; } check (min != elemp[r1] && min_elem->x == min_int); check (max != elemp[r1] && max_elem->x == max_int); } } perm_cnt++; } check (perm_cnt == factorial (cnt)); check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, elemp, values); free (new_values); } } /* Tests llx_lexicographical_compare_3way. */ static void test_lexicographical_compare_3way (void) { const int max_elems = 4; int cnt_a, pat_a, cnt_b, pat_b; for (cnt_a = 0; cnt_a <= max_elems; cnt_a++) for (pat_a = 0; pat_a <= 1 << cnt_a; pat_a++) for (cnt_b = 0; cnt_b <= max_elems; cnt_b++) for (pat_b = 0; pat_b <= 1 << cnt_b; pat_b++) { struct llx_list list_a, list_b; struct element **elems_a, **elems_b; struct llx **elemp_a, **elemp_b; int *values_a, *values_b; int a0, a1, b0, b1; allocate_pattern (cnt_a, pat_a, &list_a, &elems_a, &elemp_a, &values_a); allocate_pattern (cnt_b, pat_b, &list_b, &elems_b, &elemp_b, &values_b); for (a0 = 0; a0 <= cnt_a; a0++) for (a1 = a0; a1 <= cnt_a; a1++) for (b0 = 0; b0 <= cnt_b; b0++) for (b1 = b0; b1 <= cnt_b; b1++) { int a_ordering = lexicographical_compare_3way ( values_a + a0, a1 - a0, values_b + b0, b1 - b0, sizeof *values_a, compare_ints, NULL); int b_ordering = llx_lexicographical_compare_3way ( elemp_a[a0], elemp_a[a1], elemp_b[b0], elemp_b[b1], compare_elements, &aux_data); check (a_ordering == b_ordering); } free_elements (cnt_a, &list_a, elems_a, elemp_a, values_a); free_elements (cnt_b, &list_b, elems_b, elemp_b, values_b); } } /* Appends the `x' value in element E to the array pointed to by NEXT_OUTPUT, and advances NEXT_OUTPUT to the next position. */ static void apply_func (void *e_, void *next_output_) { struct element *e = e_; int **next_output = next_output_; *(*next_output)++ = e->x; } /* Tests llx_apply. */ static void test_apply (void) { const int max_elems = 8; int cnt, r0, r1; for (cnt = 0; cnt <= max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int *output; int *next_output; int j; allocate_ascending (cnt, &list, &elems, &elemp, &values); check_list_contents (&list, values, cnt); output = next_output = xnmalloc (cnt, sizeof *output); llx_apply (elemp[r0], elemp[r1], apply_func, &next_output); check_list_contents (&list, values, cnt); llx_destroy (&list, NULL, NULL, &llx_malloc_mgr); check (r1 - r0 == next_output - output); for (j = 0; j < r1 - r0; j++) check (output[j] == r0 + j); free_elements (cnt, NULL, elems, elemp, values); free (output); } } /* Tests llx_destroy. */ static void test_destroy (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int *output; int *next_output; int j; allocate_ascending (cnt, &list, &elems, &elemp, &values); check_list_contents (&list, values, cnt); output = next_output = xnmalloc (cnt, sizeof *output); llx_destroy (&list, apply_func, &next_output, &llx_malloc_mgr); check (cnt == next_output - output); for (j = 0; j < cnt; j++) check (output[j] == j); free_elements (cnt, NULL, elems, elemp, values); free (output); } } /* Tests llx_reverse. */ static void test_reverse (void) { const int max_elems = 8; int cnt, r0, r1; for (cnt = 0; cnt <= max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int i, j; allocate_ascending (cnt, &list, &elems, &elemp, &values); check_list_contents (&list, values, cnt); j = 0; for (i = 0; i < r0; i++) values[j++] = i; for (i = r1 - 1; i >= r0; i--) values[j++] = i; for (i = r1; i < cnt; i++) values[j++] = i; llx_reverse (elemp[r0], elemp[r1]); check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, elemp, values); } } /* Tests llx_next_permutation and llx_prev_permutation when the permuted values have no duplicates. */ static void test_permutations_no_dups (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct llx_list list; struct element **elems; int *values; int *old_values = xnmalloc (cnt, sizeof *values); int *new_values = xnmalloc (cnt, sizeof *values); size_t perm_cnt; allocate_ascending (cnt, &list, &elems, NULL, &values); perm_cnt = 1; extract_values (&list, old_values, cnt); while (llx_next_permutation (llx_head (&list), llx_null (&list), compare_elements, &aux_data)) { extract_values (&list, new_values, cnt); check (lexicographical_compare_3way (new_values, cnt, old_values, cnt, sizeof *new_values, compare_ints, NULL) > 0); memcpy (old_values, new_values, (cnt) * sizeof *old_values); perm_cnt++; } check (perm_cnt == factorial (cnt)); check_list_contents (&list, values, cnt); perm_cnt = 1; llx_reverse (llx_head (&list), llx_null (&list)); extract_values (&list, old_values, cnt); while (llx_prev_permutation (llx_head (&list), llx_null (&list), compare_elements, &aux_data)) { extract_values (&list, new_values, cnt); check (lexicographical_compare_3way (new_values, cnt, old_values, cnt, sizeof *new_values, compare_ints, NULL) < 0); memcpy (old_values, new_values, (cnt) * sizeof *old_values); perm_cnt++; } check (perm_cnt == factorial (cnt)); llx_reverse (llx_head (&list), llx_null (&list)); check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, NULL, values); free (old_values); free (new_values); } } /* Tests llx_next_permutation and llx_prev_permutation when the permuted values contain duplicates. */ static void test_permutations_with_dups (void) { const int max_elems = 8; const int max_dup = 3; const int repetitions = 1024; int cnt, repeat; for (repeat = 0; repeat < repetitions; repeat++) for (cnt = 0; cnt < max_elems; cnt++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int *old_values = xnmalloc (max_elems, sizeof *values); int *new_values = xnmalloc (max_elems, sizeof *values); unsigned int permutation_cnt; int left = cnt; int value = 0; allocate_elements (cnt, &list, &elems, &elemp, &values); value = 0; while (left > 0) { int max = left < max_dup ? left : max_dup; int n = rand () % max + 1; while (n-- > 0) { int idx = cnt - left--; values[idx] = elems[idx]->x = value; } value++; } permutation_cnt = 1; extract_values (&list, old_values, cnt); while (llx_next_permutation (llx_head (&list), llx_null (&list), compare_elements, &aux_data)) { extract_values (&list, new_values, cnt); check (lexicographical_compare_3way (new_values, cnt, old_values, cnt, sizeof *new_values, compare_ints, NULL) > 0); memcpy (old_values, new_values, cnt * sizeof *old_values); permutation_cnt++; } check (permutation_cnt == expected_perms (values, cnt)); check_list_contents (&list, values, cnt); permutation_cnt = 1; llx_reverse (llx_head (&list), llx_null (&list)); extract_values (&list, old_values, cnt); while (llx_prev_permutation (llx_head (&list), llx_null (&list), compare_elements, &aux_data)) { extract_values (&list, new_values, cnt); check (lexicographical_compare_3way (new_values, cnt, old_values, cnt, sizeof *new_values, compare_ints, NULL) < 0); permutation_cnt++; } llx_reverse (llx_head (&list), llx_null (&list)); check (permutation_cnt == expected_perms (values, cnt)); check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, elemp, values); free (old_values); free (new_values); } } /* Tests llx_merge when no equal values are to be merged. */ static void test_merge_no_dups (void) { const int max_elems = 8; const int max_fillxer = 3; int merge_cnt, pattern, pfx, gap, sfx, order; for (merge_cnt = 0; merge_cnt < max_elems; merge_cnt++) for (pattern = 0; pattern <= (1 << merge_cnt); pattern++) for (pfx = 0; pfx < max_fillxer; pfx++) for (gap = 0; gap < max_fillxer; gap++) for (sfx = 0; sfx < max_fillxer; sfx++) for (order = 0; order < 2; order++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int list_cnt = pfx + merge_cnt + gap + sfx; int a0, a1, b0, b1; int i, j; allocate_elements (list_cnt, &list, &elems, &elemp, &values); j = 0; for (i = 0; i < pfx; i++) elems[j++]->x = 100 + i; a0 = j; for (i = 0; i < merge_cnt; i++) if (pattern & (1u << i)) elems[j++]->x = i; a1 = j; for (i = 0; i < gap; i++) elems[j++]->x = 200 + i; b0 = j; for (i = 0; i < merge_cnt; i++) if (!(pattern & (1u << i))) elems[j++]->x = i; b1 = j; for (i = 0; i < sfx; i++) elems[j++]->x = 300 + i; check (list_cnt == j); j = 0; for (i = 0; i < pfx; i++) values[j++] = 100 + i; if (order == 0) for (i = 0; i < merge_cnt; i++) values[j++] = i; for (i = 0; i < gap; i++) values[j++] = 200 + i; if (order == 1) for (i = 0; i < merge_cnt; i++) values[j++] = i; for (i = 0; i < sfx; i++) values[j++] = 300 + i; check (list_cnt == j); if (order == 0) llx_merge (elemp[a0], elemp[a1], elemp[b0], elemp[b1], compare_elements, &aux_data); else llx_merge (elemp[b0], elemp[b1], elemp[a0], elemp[a1], compare_elements, &aux_data); check_list_contents (&list, values, list_cnt); free_elements (list_cnt, &list, elems, elemp, values); } } /* Tests llx_merge when equal values are to be merged. */ static void test_merge_with_dups (void) { const int max_elems = 8; int cnt, merge_pat, inc_pat, order; for (cnt = 0; cnt <= max_elems; cnt++) for (merge_pat = 0; merge_pat <= (1 << cnt); merge_pat++) for (inc_pat = 0; inc_pat <= (1 << cnt); inc_pat++) for (order = 0; order < 2; order++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; int mid; int i, j, k; allocate_elements (cnt, &list, &elems, &elemp, &values); j = 0; for (i = k = 0; i < cnt; i++) { if (merge_pat & (1u << i)) elems[j++]->x = k; if (inc_pat & (1u << i)) k++; } mid = j; for (i = k = 0; i < cnt; i++) { if (!(merge_pat & (1u << i))) elems[j++]->x = k; if (inc_pat & (1u << i)) k++; } check (cnt == j); if (order == 0) { for (i = 0; i < cnt; i++) elems[i]->y = i; } else { for (i = 0; i < mid; i++) elems[i]->y = 100 + i; for (i = mid; i < cnt; i++) elems[i]->y = i; } j = 0; for (i = k = 0; i < cnt; i++) { values[j++] = k; if (inc_pat & (1u << i)) k++; } check (cnt == j); if (order == 0) llx_merge (elemp[0], elemp[mid], elemp[mid], elemp[cnt], compare_elements, &aux_data); else llx_merge (elemp[mid], elemp[cnt], elemp[0], elemp[mid], compare_elements, &aux_data); check_list_contents (&list, values, cnt); check (llx_is_sorted (llx_head (&list), llx_null (&list), compare_elements_x_y, &aux_data)); free_elements (cnt, &list, elems, elemp, values); } } /* Tests llx_sort on all permutations up to a maximum number of elements. */ static void test_sort_exhaustive (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct llx_list list; struct element **elems; int *values; struct element **perm_elems; int *perm_values; size_t perm_cnt; allocate_ascending (cnt, &list, &elems, NULL, &values); allocate_elements (cnt, NULL, &perm_elems, NULL, &perm_values); perm_cnt = 1; while (llx_next_permutation (llx_head (&list), llx_null (&list), compare_elements, &aux_data)) { struct llx_list perm_list; int j; extract_values (&list, perm_values, cnt); llx_init (&perm_list); for (j = 0; j < cnt; j++) { perm_elems[j]->x = perm_values[j]; llx_push_tail (&perm_list, perm_elems[j], &llx_malloc_mgr); } llx_sort (llx_head (&perm_list), llx_null (&perm_list), compare_elements, &aux_data); check_list_contents (&perm_list, values, cnt); check (llx_is_sorted (llx_head (&perm_list), llx_null (&perm_list), compare_elements, &aux_data)); llx_destroy (&perm_list, NULL, NULL, &llx_malloc_mgr); perm_cnt++; } check (perm_cnt == factorial (cnt)); free_elements (cnt, &list, elems, NULL, values); free_elements (cnt, NULL, perm_elems, NULL, perm_values); } } /* Tests that llx_sort is stable in the presence of equal values. */ static void test_sort_stable (void) { const int max_elems = 6; int cnt, inc_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (inc_pat = 0; inc_pat <= 1 << cnt; inc_pat++) { struct llx_list list; struct element **elems; int *values; struct element **perm_elems; int *perm_values; size_t perm_cnt; int i, j; allocate_elements (cnt, &list, &elems, NULL, &values); allocate_elements (cnt, NULL, &perm_elems, NULL, &perm_values); j = 0; for (i = 0; i < cnt; i++) { elems[i]->x = values[i] = j; if (inc_pat & (1 << i)) j++; elems[i]->y = i; } perm_cnt = 1; while (llx_next_permutation (llx_head (&list), llx_null (&list), compare_elements_y, &aux_data)) { struct llx_list perm_list; extract_values (&list, perm_values, cnt); llx_init (&perm_list); for (i = 0; i < cnt; i++) { perm_elems[i]->x = perm_values[i]; perm_elems[i]->y = i; llx_push_tail (&perm_list, perm_elems[i], &llx_malloc_mgr); } llx_sort (llx_head (&perm_list), llx_null (&perm_list), compare_elements, &aux_data); check_list_contents (&perm_list, values, cnt); check (llx_is_sorted (llx_head (&perm_list), llx_null (&perm_list), compare_elements_x_y, &aux_data)); llx_destroy (&perm_list, NULL, NULL, &llx_malloc_mgr); perm_cnt++; } check (perm_cnt == factorial (cnt)); free_elements (cnt, &list, elems, NULL, values); free_elements (cnt, NULL, perm_elems, NULL, perm_values); } } /* Tests that llx_sort does not disturb elements outside the range sorted. */ static void test_sort_subset (void) { const int max_elems = 8; int cnt, r0, r1, repeat; for (cnt = 0; cnt <= max_elems; cnt++) for (repeat = 0; repeat < 100; repeat++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; allocate_random (cnt, &list, &elems, &elemp, &values); qsort (&values[r0], r1 - r0, sizeof *values, compare_ints_noaux); llx_sort (elemp[r0], elemp[r1], compare_elements, &aux_data); check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, elemp, values); } } /* Tests that llx_sort works with large lists. */ static void test_sort_big (void) { const int max_elems = 1024; int cnt; for (cnt = 0; cnt < max_elems; cnt++) { struct llx_list list; struct element **elems; int *values; allocate_random (cnt, &list, &elems, NULL, &values); qsort (values, cnt, sizeof *values, compare_ints_noaux); llx_sort (llx_head (&list), llx_null (&list), compare_elements, &aux_data); check_list_contents (&list, values, cnt); free_elements (cnt, &list, elems, NULL, values); } } /* Tests llx_unique. */ static void test_unique (void) { const int max_elems = 10; int *ascending = xnmalloc (max_elems, sizeof *ascending); int cnt, inc_pat, i, j, unique_values; for (i = 0; i < max_elems; i++) ascending[i] = i; for (cnt = 0; cnt < max_elems; cnt++) for (inc_pat = 0; inc_pat < (1 << cnt); inc_pat++) { struct llx_list list, dups; struct element **elems; int *values; allocate_elements (cnt, &list, &elems, NULL, &values); j = unique_values = 0; for (i = 0; i < cnt; i++) { unique_values = j + 1; elems[i]->x = values[i] = j; if (inc_pat & (1 << i)) j++; } check_list_contents (&list, values, cnt); llx_init (&dups); check (llx_unique (llx_head (&list), llx_null (&list), llx_null (&dups), compare_elements, &aux_data, &llx_malloc_mgr) == (size_t) unique_values); check_list_contents (&list, ascending, unique_values); llx_splice (llx_null (&list), llx_head (&dups), llx_null (&dups)); llx_sort (llx_head (&list), llx_null (&list), compare_elements, &aux_data); check_list_contents (&list, values, cnt); llx_destroy (&dups, NULL, NULL, &llx_malloc_mgr); free_elements (cnt, &list, elems, NULL, values); } free (ascending); } /* Tests llx_sort_unique. */ static void test_sort_unique (void) { const int max_elems = 7; int cnt, inc_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (inc_pat = 0; inc_pat <= 1 << cnt; inc_pat++) { struct llx_list list; struct element **elems; int *values; struct element **perm_elems; int *perm_values; int unique_cnt; int *unique_values; size_t perm_cnt; int i, j; allocate_elements (cnt, &list, &elems, NULL, &values); allocate_elements (cnt, NULL, &perm_elems, NULL, &perm_values); j = unique_cnt = 0; for (i = 0; i < cnt; i++) { elems[i]->x = values[i] = j; unique_cnt = j + 1; if (inc_pat & (1 << i)) j++; } unique_values = xnmalloc (unique_cnt, sizeof *unique_values); for (i = 0; i < unique_cnt; i++) unique_values[i] = i; perm_cnt = 1; while (llx_next_permutation (llx_head (&list), llx_null (&list), compare_elements, &aux_data)) { struct llx_list perm_list; extract_values (&list, perm_values, cnt); llx_init (&perm_list); for (i = 0; i < cnt; i++) { perm_elems[i]->x = perm_values[i]; perm_elems[i]->y = i; llx_push_tail (&perm_list, perm_elems[i], &llx_malloc_mgr); } llx_sort_unique (llx_head (&perm_list), llx_null (&perm_list), NULL, compare_elements, &aux_data, &llx_malloc_mgr); check_list_contents (&perm_list, unique_values, unique_cnt); check (llx_is_sorted (llx_head (&perm_list), llx_null (&perm_list), compare_elements_x_y, &aux_data)); llx_destroy (&perm_list, NULL, NULL, &llx_malloc_mgr); perm_cnt++; } check (perm_cnt == expected_perms (values, cnt)); free_elements (cnt, &list, elems, NULL, values); free_elements (cnt, NULL, perm_elems, NULL, perm_values); free (unique_values); } } /* Tests llx_insert_ordered. */ static void test_insert_ordered (void) { const int max_elems = 6; int cnt, inc_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (inc_pat = 0; inc_pat <= 1 << cnt; inc_pat++) { struct llx_list list; struct element **elems; int *values; struct element **perm_elems; int *perm_values; size_t perm_cnt; int i, j; allocate_elements (cnt, &list, &elems, NULL, &values); allocate_elements (cnt, NULL, &perm_elems, NULL, &perm_values); j = 0; for (i = 0; i < cnt; i++) { elems[i]->x = values[i] = j; if (inc_pat & (1 << i)) j++; elems[i]->y = i; } perm_cnt = 1; while (llx_next_permutation (llx_head (&list), llx_null (&list), compare_elements_y, &aux_data)) { struct llx_list perm_list; extract_values (&list, perm_values, cnt); llx_init (&perm_list); for (i = 0; i < cnt; i++) { perm_elems[i]->x = perm_values[i]; perm_elems[i]->y = i; llx_insert_ordered (llx_head (&perm_list), llx_null (&perm_list), perm_elems[i], compare_elements, &aux_data, &llx_malloc_mgr); } check (llx_is_sorted (llx_head (&perm_list), llx_null (&perm_list), compare_elements_x_y, &aux_data)); llx_destroy (&perm_list, NULL, NULL, &llx_malloc_mgr); perm_cnt++; } check (perm_cnt == factorial (cnt)); free_elements (cnt, &list, elems, NULL, values); free_elements (cnt, NULL, perm_elems, NULL, perm_values); } } /* Tests llx_partition. */ static void test_partition (void) { const int max_elems = 10; int cnt; unsigned int pbase; int r0, r1; for (cnt = 0; cnt < max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) for (pbase = 0; pbase <= (1u << (r1 - r0)); pbase++) { struct llx_list list; struct element **elems; struct llx **elemp; int *values; unsigned int pattern = pbase << r0; int i, j; int first_false; struct llx *part_llx; allocate_ascending (cnt, &list, &elems, &elemp, &values); /* Check that llx_find_partition works okay in every case. We use it after partitioning, too, but that only tests cases where it returns non-null. */ for (i = r0; i < r1; i++) if (!(pattern & (1u << i))) break; j = i; for (; i < r1; i++) if (pattern & (1u << i)) break; part_llx = llx_find_partition (elemp[r0], elemp[r1], pattern_pred, &pattern); if (i == r1) check (part_llx == elemp[j]); else check (part_llx == NULL); /* Figure out expected results. */ j = 0; first_false = -1; for (i = 0; i < r0; i++) values[j++] = i; for (i = r0; i < r1; i++) if (pattern & (1u << i)) values[j++] = i; for (i = r0; i < r1; i++) if (!(pattern & (1u << i))) { if (first_false == -1) first_false = i; values[j++] = i; } if (first_false == -1) first_false = r1; for (i = r1; i < cnt; i++) values[j++] = i; check (j == cnt); /* Partition and check for expected results. */ check (llx_partition (elemp[r0], elemp[r1], pattern_pred, &pattern) == elemp[first_false]); check (llx_find_partition (elemp[r0], elemp[r1], pattern_pred, &pattern) == elemp[first_false]); check_list_contents (&list, values, cnt); check ((int) llx_count (&list) == cnt); free_elements (cnt, &list, elems, elemp, values); } } /* Tests that allocation failure is gracefully handled. */ static void test_allocation_failure (void) { struct llx_list list; llx_init (&list); check (llx_push_head (&list, NULL, &llx_null_mgr) == NULL); check (llx_push_tail (&list, NULL, &llx_null_mgr) == NULL); check (llx_insert (llx_null (&list), NULL, &llx_null_mgr) == NULL); check_list_contents (&list, NULL, 0); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "push-pop", "push/pop", test_push_pop }, { "insert-remove", "insert/remove", test_insert_remove }, { "swap", "swap", test_swap }, { "swap-range", "swap_range", test_swap_range }, { "remove-range", "remove_range", test_remove_range }, { "remove-equal", "remove_equal", test_remove_equal }, { "remove-if", "remove_if", test_remove_if }, { "find-equal", "find_equal", test_find_equal }, { "find", "find", test_find }, { "find-if", "find_if", test_find_if }, { "find-adjacent-equal", "find_adjacent_equal", test_find_adjacent_equal }, { "count-range", "count_range", test_count_range }, { "count-equal", "count_equal", test_count_equal }, { "count-if", "count_if", test_count_if }, { "min-max", "min/max", test_min_max }, { "lexicographical-compare-3way", "lexicographical_compare_3way", test_lexicographical_compare_3way }, { "apply", "apply", test_apply }, { "destroy", "destroy", test_destroy }, { "reverse", "reverse", test_reverse }, { "permutations-no-dups", "permutations (no dups)", test_permutations_no_dups }, { "permutations-with-dups", "permutations (with dups)", test_permutations_with_dups }, { "merge-no-dups", "merge (no dups)", test_merge_no_dups }, { "merge-with-dups", "merge (with dups)", test_merge_with_dups }, { "sort-exhaustive", "sort (exhaustive)", test_sort_exhaustive }, { "sort-stable", "sort (stability)", test_sort_stable }, { "sort-subset", "sort (subset)", test_sort_subset }, { "sort-big", "sort (big)", test_sort_big }, { "unique", "unique", test_unique }, { "sort-unique", "sort_unique", test_sort_unique }, { "insert-ordered", "insert_ordered", test_insert_ordered }, { "partition", "partition", test_partition }, { "allocation-failure", "allocation failure", test_allocation_failure }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test doubly linked list of pointers (llx) library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/encoding-guesser-test.c0000644000175000017500000000544012470243701016614 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/encoding-guesser.h" #include #include #include #include #include "libpspp/i18n.h" #include "gl/error.h" #include "gl/progname.h" #include "gl/xalloc.h" static void usage (void) { printf ("usage: %s [OTHER_ENCODING] [BUFSIZE] < INPUT\n" "where OTHER_ENCODING is the fallback encoding (default taken\n" " from the current locale)\n" " and BUFSIZE is the buffer size (default %d)\n", program_name, ENCODING_GUESS_MIN); exit (0); } int main (int argc, char *argv[]) { const char *encoding, *guess; char *buffer; int bufsize; size_t n; int i; set_program_name (argv[0]); i18n_init (); encoding = NULL; bufsize = 0; for (i = 1; i < argc; i++) { const char *arg = argv[i]; if (!strcmp (arg, "--help")) usage (); else if (isdigit (arg[0]) && bufsize == 0) { bufsize = atoi (arg); if (bufsize < ENCODING_GUESS_MIN) error (1, 0, "buffer size %s is less than minimum size %d", arg, ENCODING_GUESS_MIN); } else if (!isdigit (arg[0]) && encoding == NULL) encoding = arg; else error (1, 0, "bad syntax; use `%s --help' for help", program_name); } if (bufsize == 0) bufsize = ENCODING_GUESS_MIN; buffer = xmalloc (bufsize); n = fread (buffer, 1, bufsize, stdin); guess = encoding_guess_head_encoding (encoding, buffer, n); if (!strcmp (guess, "ASCII") && encoding_guess_encoding_is_auto (encoding)) while (n > 0) { size_t n_ascii = encoding_guess_count_ascii (buffer, n); if (n == n_ascii) n = fread (buffer, 1, bufsize, stdin); else { memmove (buffer, buffer + n_ascii, n - n_ascii); n -= n_ascii; n += fread (buffer + n, 1, bufsize - n, stdin); guess = encoding_guess_tail_encoding (encoding, buffer, n); break; } } puts (guess); free (buffer); return 0; } pspp-1.0.1/tests/libpspp/sparse-xarray-test.c0000644000175000017500000005026312470243701016157 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the sparse array routines defined in sparse-xarray.c. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include "minmax.h" #include "progname.h" #include "xalloc.h" /* Maximum size of sparse_xarray supported for model checking purposes. */ #define MAX_ROWS 5 #define MAX_COLS 5 /* Test parameters. */ struct test_params { /* Controlling the test state space. */ int n_columns; /* Number of columns in each row. */ int max_rows; /* Maximum number of rows. */ int max_memory_rows; /* Max rows before writing to disk. */ unsigned char n_values; /* Number of unique cell values. */ int n_xarrays; /* Number of sparse_xarrays in state. */ /* Types of operations to perform. */ bool write_cells; /* Write to individual cells. */ bool write_rows; /* Write whole rows. */ bool write_columns; /* Write whole columns. */ bool copy_within_xarray; /* Copy column ranges in a single xarray. */ }; struct test_state { struct sparse_xarray *xarrays[2]; }; static void test_state_destroy (const struct test_params *params, struct test_state *ts) { int i; for (i = 0; i < params->n_xarrays; i++) sparse_xarray_destroy (ts->xarrays[i]); free (ts); } static struct test_state * test_state_clone (const struct test_params *params, const struct test_state *ots) { struct test_state *ts; int i; ts = xmalloc (sizeof *ts); for (i = 0; i < params->n_xarrays; i++) { ts->xarrays[i] = sparse_xarray_clone (ots->xarrays[i]); if (ts->xarrays[i] == NULL) NOT_REACHED (); } return ts; } struct xarray_model { uint8_t data[MAX_ROWS][MAX_COLS]; bool contains_row[MAX_ROWS]; }; struct test_model { struct xarray_model models[2]; }; /* Extracts the contents of TS into TM. */ static void test_model_extract (const struct test_params *params, const struct test_state *ts, struct test_model *tm) { int i; for (i = 0; i < params->n_xarrays; i++) { const struct sparse_xarray *sx = ts->xarrays[i]; struct xarray_model *model = &tm->models[i]; size_t n_columns = sparse_xarray_get_n_columns (sx); size_t n_rows = sparse_xarray_get_n_rows (sx); size_t row; assert (n_rows < MAX_ROWS); assert (n_columns < MAX_COLS); for (row = 0; row < params->max_rows; row++) { model->contains_row[row] = sparse_xarray_contains_row (sx, row); if (!sparse_xarray_read (sx, row, 0, n_columns, model->data[row])) NOT_REACHED (); } } } /* Checks that test state TS matches the test model TM and reports any mismatches via mc_error. Then, adds SX to MC as a new state. */ static void check_state (struct mc *mc, struct test_state *ts, const struct test_model *tm) { const struct test_params *params = mc_get_aux (mc); int n_columns = params->n_columns; unsigned int hash; int i; for (i = 0; i < params->n_xarrays; i++) { const struct xarray_model *model = &tm->models[i]; const struct sparse_xarray *sx = ts->xarrays[i]; bool difference; int row, col; int n_rows; assert (n_columns < MAX_COLS); /* Check row count. */ n_rows = 0; for (row = 0; row < params->max_rows; row++) if (model->contains_row[row]) n_rows = row + 1; if (n_rows != sparse_xarray_get_n_rows (sx)) mc_error (mc, "xarray %d: row count (%zu) does not match expected " "(%d)", i, sparse_xarray_get_n_rows (sx), n_rows); /* Check row containment. */ for (row = 0; row < params->max_rows; row++) { bool contains = sparse_xarray_contains_row (sx, row); if (contains && !model->contains_row[row]) mc_error (mc, "xarray %d: row %d is contained by sparse_xarray " "but should not be", i, row); else if (!contains && model->contains_row[row]) mc_error (mc, "xarray %d: row %d is not contained by " "sparse_xarray but should be", i, row); } /* Check contents. */ difference = false; for (row = 0; row < params->max_rows; row++) { unsigned char data[MAX_COLS]; if (!sparse_xarray_read (sx, row, 0, n_columns, data)) NOT_REACHED (); for (col = 0; col < params->n_columns; col++) if (data[col] != model->data[row][col]) { mc_error (mc, "xarray %d: element %d,%d (of %d,%d) " "differs: %d should be %d", i, row, col, n_rows, n_columns, data[col], model->data[row][col]); difference = true; } } if (difference) { struct string ds; mc_error (mc, "xarray %d: expected:", i); ds_init_empty (&ds); for (row = 0; row < params->max_rows; row++) { ds_clear (&ds); for (col = 0; col < n_columns; col++) ds_put_format (&ds, " %d", model->data[row][col]); mc_error (mc, "xarray %d: row %d:%s", i, row, ds_cstr (&ds)); } mc_error (mc, "xarray %d: actual:", i); ds_init_empty (&ds); for (row = 0; row < params->max_rows; row++) { unsigned char data[MAX_COLS]; if (!sparse_xarray_read (sx, row, 0, n_columns, data)) NOT_REACHED (); ds_clear (&ds); for (col = 0; col < n_columns; col++) ds_put_format (&ds, " %d", data[col]); mc_error (mc, "xarray %d: row %d:%s", i, row, ds_cstr (&ds)); } ds_destroy (&ds); } } hash = 0; for (i = 0; i < params->n_xarrays; i++) hash = sparse_xarray_model_checker_hash (ts->xarrays[i], hash); if (mc_discard_dup_state (mc, hash)) test_state_destroy (params, ts); else mc_add_state (mc, ts); } static bool next_data (unsigned char *data, int n, int n_values) { int i; for (i = n - 1; i >= 0; i--) { data[i]++; if (data[i] < n_values) return true; data[i] = 0; } return false; } struct copy_columns_params { int n; /* Number of columns to copy. */ int src; /* Offset of first source column. */ int dst; /* Offset of first destination column. */ }; static bool copy_columns (const void *src_, void *dst_, void *copy_) { const struct copy_columns_params *copy = copy_; const uint8_t *src = src_; uint8_t *dst = dst_; memmove (dst + copy->dst, src + copy->src, copy->n); return true; } /* "init" function for struct mc_class. */ static void sparse_xarray_mc_init (struct mc *mc) { struct test_params *params = mc_get_aux (mc); struct test_state *ts; struct test_model tm; int i; mc_name_operation (mc, "empty sparse_xarray with n_columns=%d, " "max_memory_rows=%d", params->n_columns, params->max_memory_rows); ts = xmalloc (sizeof *ts); for (i = 0; i < params->n_xarrays; i++) ts->xarrays[i] = sparse_xarray_create (params->n_columns, params->max_memory_rows); memset (&tm, 0, sizeof tm); check_state (mc, ts, &tm); } /* "mutate" function for struct mc_class. */ static void sparse_xarray_mc_mutate (struct mc *mc, const void *ots_) { struct test_params *params = mc_get_aux (mc); size_t n_columns = params->n_columns; const struct test_state *ots = ots_; struct test_model otm; int i; test_model_extract (params, ots, &otm); for (i = 0; i < params->n_xarrays; i++) { unsigned char value; int row, col, n, src, dst; /* Write all possible values to each possible single cell. */ if (params->write_cells) for (row = 0; row < params->max_rows; row++) for (col = 0; col < n_columns; col++) for (value = 0; value < params->n_values; value++) if (mc_include_state (mc)) { struct test_state *ts = test_state_clone (params, ots); struct sparse_xarray *sx = ts->xarrays[i]; struct test_model tm = otm; struct xarray_model *model = &tm.models[i]; mc_name_operation (mc, "xarray %d: set (%d,%d) to %d", i, row, col, value); if (!sparse_xarray_write (sx, row, col, 1, &value)) NOT_REACHED (); model->data[row][col] = value; model->contains_row[row] = true; check_state (mc, ts, &tm); } /* Write all possible row contents to each row. */ if (params->write_rows) for (row = 0; row < params->max_rows; row++) { struct test_model tm = otm; struct xarray_model *model = &tm.models[i]; memset (model->data[row], 0, n_columns); model->contains_row[row] = true; do { if (mc_include_state (mc)) { struct test_state *ts = test_state_clone (params, ots); struct sparse_xarray *sx = ts->xarrays[i]; char row_string[MAX_COLS + 1]; mc_name_operation (mc, "xarray %d: set row %d to %s", i, row, row_string); for (col = 0; col < n_columns; col++) { value = model->data[row][col]; row_string[col] = value < 10 ? '0' + value : '*'; } row_string[n_columns] = '\0'; if (!sparse_xarray_write (sx, row, 0, n_columns, model->data[row])) NOT_REACHED (); check_state (mc, ts, &tm); } } while (next_data (model->data[row], n_columns, params->n_values)); } /* Write all possible values to each possible column. */ if (params->write_columns) for (col = 0; col < n_columns; col++) for (value = 0; value < params->n_values; value++) if (mc_include_state (mc)) { struct test_state *ts = test_state_clone (params, ots); struct sparse_xarray *sx = ts->xarrays[i]; struct test_model tm = otm; struct xarray_model *model = &tm.models[i]; mc_name_operation (mc, "xarray %d: write value %d to " "column %d", i, value, col); if (!sparse_xarray_write_columns (sx, col, 1, &value)) NOT_REACHED (); for (row = 0; row < params->max_rows; row++) model->data[row][col] = value; check_state (mc, ts, &tm); } /* Copy all possible column ranges within a single sparse_xarray. */ if (params->copy_within_xarray) for (n = 1; n <= n_columns; n++) for (src = 0; src <= n_columns - n; src++) for (dst = 0; dst <= n_columns - n; dst++) if (mc_include_state (mc)) { struct copy_columns_params copy_aux; struct test_state *ts = test_state_clone (params, ots); struct sparse_xarray *sx = ts->xarrays[i]; struct test_model tm = otm; struct xarray_model *model = &tm.models[i]; mc_name_operation (mc, "xarray %d: copy %d columns from " "offset %d to offset %d", i, n, src, dst); copy_aux.n = n; copy_aux.src = src; copy_aux.dst = dst; if (!sparse_xarray_copy (sx, sx, copy_columns, ©_aux)) NOT_REACHED (); for (row = 0; row < params->max_rows; row++) memmove (&model->data[row][dst], &model->data[row][src], n); check_state (mc, ts, &tm); } } if (params->n_xarrays == 2) { int row, n, src, dst; /* Copy all possible column ranges from xarrays[0] to xarrays[1]. */ for (n = 1; n <= n_columns; n++) for (src = 0; src <= n_columns - n; src++) for (dst = 0; dst <= n_columns - n; dst++) if (mc_include_state (mc)) { struct copy_columns_params copy_aux; struct test_state *ts = test_state_clone (params, ots); struct test_model tm = otm; mc_name_operation (mc, "copy %d columns from offset %d in " "xarray 0 to offset %d in xarray 1", n, src, dst); copy_aux.n = n; copy_aux.src = src; copy_aux.dst = dst; if (!sparse_xarray_copy (ts->xarrays[0], ts->xarrays[1], copy_columns, ©_aux)) NOT_REACHED (); for (row = 0; row < params->max_rows; row++) { if (tm.models[0].contains_row[row]) tm.models[1].contains_row[row] = true; memmove (&tm.models[1].data[row][dst], &tm.models[0].data[row][src], n); } check_state (mc, ts, &tm); } } } /* "destroy" function for struct mc_class. */ static void sparse_xarray_mc_destroy (const struct mc *mc UNUSED, void *ts_) { struct test_params *params = mc_get_aux (mc); struct test_state *ts = ts_; test_state_destroy (params, ts); } static void usage (void) { printf ("%s, for testing the sparse_xarray implementation.\n" "Usage: %s [OPTION]...\n" "\nTest state space parameters (min...max, default):\n" " --columns=N Number of columns per row (0...5, 3)\n" " --max-rows=N Maximum number of rows (0...5, 3)\n" " --max-memory-rows=N Max rows before paging to disk (0...5, 3)\n" " --values=N Number of unique cell values (1...254, 3)\n" " --xarrays=N Number of xarrays at a time (1...2, 1)\n" "\nTest operation parameters:\n" " --no-write-cells Do not write individual cells\n" " --no-write-rows Do not write whole rows\n" " --no-write-columns Do not write whole columns\n" " --no-copy-columns Do not copy column ranges in an xarray\n", program_name, program_name); mc_options_usage (); fputs ("\nOther options:\n" " --help Display this help message\n" "\nReport bugs to \n", stdout); exit (0); } enum { OPT_COLUMNS, OPT_MAX_ROWS, OPT_MAX_MEMORY_ROWS, OPT_VALUES, OPT_XARRAYS, OPT_NO_WRITE_CELLS, OPT_NO_WRITE_ROWS, OPT_NO_WRITE_COLUMNS, OPT_NO_COPY_COLUMNS, OPT_HELP, N_SPARSE_XARRAY_OPTIONS }; static struct argv_option sparse_xarray_argv_options[N_SPARSE_XARRAY_OPTIONS] = { {"columns", 0, required_argument, OPT_COLUMNS}, {"max-rows", 0, required_argument, OPT_MAX_ROWS}, {"max-memory-rows", 0, required_argument, OPT_MAX_MEMORY_ROWS}, {"values", 0, required_argument, OPT_VALUES}, {"xarrays", 0, required_argument, OPT_XARRAYS}, {"no-write-cells", 0, no_argument, OPT_NO_WRITE_CELLS}, {"no-write-rows", 0, no_argument, OPT_NO_WRITE_ROWS}, {"no-write-columns", 0, no_argument, OPT_NO_WRITE_COLUMNS}, {"no-copy-columns", 0, no_argument, OPT_NO_COPY_COLUMNS}, {"help", 'h', no_argument, OPT_HELP}, }; static void sparse_xarray_option_callback (int id, void *params_) { struct test_params *params = params_; switch (id) { case OPT_COLUMNS: params->n_columns = atoi (optarg); break; case OPT_MAX_ROWS: params->max_rows = atoi (optarg); break; case OPT_MAX_MEMORY_ROWS: params->max_memory_rows = atoi (optarg); break; case OPT_VALUES: params->n_values = atoi (optarg); break; case OPT_XARRAYS: params->n_xarrays = atoi (optarg); break; case OPT_NO_WRITE_CELLS: params->write_cells = false; break; case OPT_NO_WRITE_ROWS: params->write_rows = false; break; case OPT_NO_WRITE_COLUMNS: params->write_columns = false; break; case OPT_NO_COPY_COLUMNS: params->copy_within_xarray = false; break; case OPT_HELP: usage (); break; default: NOT_REACHED (); } } int main (int argc, char *argv[]) { static const struct mc_class sparse_xarray_mc_class = { sparse_xarray_mc_init, sparse_xarray_mc_mutate, sparse_xarray_mc_destroy, }; struct test_params params; struct mc_options *options; struct mc_results *results; struct argv_parser *parser; int verbosity; bool success; set_program_name (argv[0]); /* Default parameters. */ params.n_columns = 3; params.max_rows = 3; params.max_memory_rows = 3; params.n_values = 3; params.n_xarrays = 1; params.write_cells = true; params.write_rows = true; params.write_columns = true; params.copy_within_xarray = true; /* Parse command line. */ parser = argv_parser_create (); options = mc_options_create (); mc_options_register_argv_parser (options, parser); argv_parser_add_options (parser, sparse_xarray_argv_options, N_SPARSE_XARRAY_OPTIONS, sparse_xarray_option_callback, ¶ms); if (!argv_parser_run (parser, argc, argv)) exit (EXIT_FAILURE); argv_parser_destroy (parser); verbosity = mc_options_get_verbosity (options); /* Force parameters into allowed ranges. */ params.n_columns = MAX (0, MIN (params.n_columns, MAX_COLS)); params.max_rows = MAX (0, MIN (params.max_rows, MAX_ROWS)); params.max_memory_rows = MAX (0, MIN (params.max_memory_rows, params.max_rows)); params.n_values = MIN (254, MAX (1, params.n_values)); params.n_xarrays = MAX (1, MIN (2, params.n_xarrays)); mc_options_set_aux (options, ¶ms); results = mc_run (&sparse_xarray_mc_class, options); /* Output results. */ success = (mc_results_get_stop_reason (results) != MC_MAX_ERROR_COUNT && mc_results_get_stop_reason (results) != MC_INTERRUPTED); if (verbosity > 0 || !success) { printf ("Parameters: " "--columns=%d --max-rows=%d --max-memory-rows=%d --values=%d " "--xarrays=%d", params.n_columns, params.max_rows, params.max_memory_rows, params.n_values, params.n_xarrays); if (!params.write_cells) printf (" --no-write-cells"); if (!params.write_rows) printf (" --no-write-rows"); if (!params.write_columns) printf (" --no-write-columns"); if (!params.copy_within_xarray) printf (" --no-copy-columns"); printf ("\n\n"); mc_results_print (results, stdout); } mc_results_destroy (results); return success ? 0 : EXIT_FAILURE; } pspp-1.0.1/tests/libpspp/abt.at0000644000175000017500000000213713137223525013331 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([Augmented binary tree (ABT) library]) m4_define([CHECK_ABT], [AT_SETUP([ABT -- $1]) AT_CHECK([abt-test $1]) AT_CLEANUP]) CHECK_ABT([insert-any-remove-any]) CHECK_ABT([insert-any-remove-same]) CHECK_ABT([insert-any-remove-reverse]) CHECK_ABT([random-sequence]) CHECK_ABT([insert-ordered]) CHECK_ABT([moved]) CHECK_ABT([changed]) pspp-1.0.1/tests/libpspp/range-tower-test.c0000644000175000017500000004630412470243701015611 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the routines defined in range-tower.c. This test program aims to be as comprehensive as possible. With -DNDEBUG, "gcov -b" should report 100% coverage of lines and branches in range-tower.c routines. (Without -DNDEBUG, branches caused by failed assertions will not be taken.) "valgrind --leak-check=yes --show-reachable=yes" should give a clean report, both with and without -DNDEBUG. */ #ifdef HAVE_CONFIG_H #include #endif #include "libpspp/range-tower.h" #include #include #include #include #include #include "libpspp/compiler.h" #include "libpspp/pool.h" #include "gl/minmax.h" #include "gl/xalloc.h" /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { abort (); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* A contiguous region. */ struct region { unsigned long int start; /* Start of region. */ unsigned long int end; /* One past the end. */ }; /* Number of bits in an unsigned int. */ #define UINT_BIT (CHAR_BIT * sizeof (unsigned int)) /* Returns the number of contiguous 1-bits in X starting from bit 0. This implementation is designed to be obviously correct, not to be efficient. */ static int count_one_bits (unsigned long int x) { int count = 0; while (x & 1) { count++; x >>= 1; } return count; } /* Searches the bits in PATTERN from right to left starting from bit OFFSET for one or more 1-bits. If any are found, sets *START to the bit index of the first and *WIDTH to the number of contiguous 1-bits and returns true. Otherwise, returns false. This implementation is designed to be obviously correct, not to be efficient. */ static bool next_region (unsigned int pattern, unsigned int offset, unsigned long int *start, unsigned long int *width) { unsigned int i; assert (offset <= UINT_BIT); for (i = offset; i < UINT_BIT; i++) if (pattern & (1u << i)) { *start = i; *width = count_one_bits (pattern >> i); return true; } return false; } /* Searches the bits in PATTERN from left to right starting from just beyond bit OFFSET for one or more 1-bits. If any are found, sets *START to the bit index of the first and *WIDTH to the number of contiguous 1-bits and returns true. Otherwise, returns false. This implementation is designed to be obviously correct, not to be efficient. */ static bool prev_region (unsigned int pattern, unsigned int offset, unsigned long int *start, unsigned long int *width) { unsigned int i; assert (offset <= UINT_BIT); for (i = offset; i-- > 0; ) if (pattern & (1u << i)) { *start = i; *width = 1; while (i-- > 0 && pattern & (1u << i)) { ++*width; --*start; } return true; } return false; } /* Searches the bits in PATTERN from right to left starting from bit OFFSET. Returns the bit index of the first 1-bit found, or ULONG_MAX if none is found. */ static unsigned long int next_1bit (unsigned int pattern, unsigned int offset, unsigned long int pattern_offset) { for (; offset < UINT_BIT; offset++) if (pattern & (1u << offset)) return offset + pattern_offset; return ULONG_MAX; } static void print_structure (const struct abt_node *node_) { struct range_tower_node *node; if (node_ == NULL) return; node = abt_data (node_, struct range_tower_node, abt_node); printf ("%lu+%lu/%d", node->n_zeros, node->n_ones, node->abt_node.level); if (node->abt_node.down[0] || node->abt_node.down[1]) { printf ("("); print_structure (node->abt_node.down[0]); printf (","); print_structure (node->abt_node.down[1]); printf (")"); } } /* Prints the regions in RT to stdout. */ static void UNUSED print_regions (const struct range_tower *rt) { const struct range_tower_node *node; printf ("contents:"); for (node = range_tower_first__ (rt); node != NULL; node = range_tower_next__ (rt, node)) printf (" (%lu,%lu)", node->n_zeros, node->n_ones); printf ("\n"); printf ("structure:"); print_structure (rt->abt.root); printf ("\n"); } static void check_tree (const struct abt_node *abt_node, unsigned long int *subtree_width) { const struct range_tower_node *node = range_tower_node_from_abt__ (abt_node); unsigned long int left_width, right_width; if (node == NULL) { *subtree_width = 0; return; } check_tree (node->abt_node.down[0], &left_width); check_tree (node->abt_node.down[1], &right_width); *subtree_width = node->n_zeros + node->n_ones + left_width + right_width; check (node->subtree_width == *subtree_width); } /* Checks that the regions in RT match the bits in PATTERN. */ static void check_pattern (const struct range_tower *rt, unsigned int pattern, unsigned long int offset) { const struct range_tower_node *node; unsigned long int start, start2, width; unsigned long int tree_width; unsigned long int s1, s2; int i; check_tree (rt->abt.root, &tree_width); check (tree_width == ULONG_MAX); if (offset > ULONG_MAX - 32) { pattern <<= offset - (ULONG_MAX - 32); offset = ULONG_MAX - 32; } for (node = rand () % 2 ? range_tower_first (rt) : range_tower_next (rt, NULL), start = width = 0; next_region (pattern, start + width, &start, &width); node = range_tower_next (rt, node)) { unsigned long int node_start; unsigned long int x; check (node != NULL); check (range_tower_node_get_start (node) == start + offset); check (range_tower_node_get_end (node) == start + offset + width); check (range_tower_node_get_width (node) == width); x = start + offset - node->n_zeros; check (range_tower_lookup (rt, x, &node_start) == node); check (node_start == start + offset - node->n_zeros); x = start + offset + width - 1; check (range_tower_lookup (rt, x, &node_start) == node); check (node_start == start + offset - node->n_zeros); } check (node == NULL); start = width = 0; RANGE_TOWER_FOR_EACH (node, start2, rt) { check (next_region (pattern, start + width, &start, &width)); check (start + offset == start2); check (range_tower_node_get_width (node) == width); } check (!next_region (pattern, start + width, &start, &width)); for (node = rand () % 2 ? range_tower_last (rt) : range_tower_prev (rt, NULL), start = UINT_BIT; prev_region (pattern, start, &start, &width); node = range_tower_prev (rt, node)) { check (node != NULL); check (range_tower_node_get_start (node) == offset + start); check (range_tower_node_get_end (node) == offset + start + width); check (range_tower_node_get_width (node) == width); } check (node == NULL); /* Scan from all possible positions, resetting the cache each time, to ensure that we get the correct answers without caching. */ for (start = 0; start <= 32; start++) { struct range_tower *nonconst_rt = CONST_CAST (struct range_tower *, rt); nonconst_rt->cache_end = 0; s1 = range_tower_scan (rt, offset + start); s2 = next_1bit (pattern, start, offset); check (s1 == s2); } /* Scan in forward order to exercise expected cache behavior. */ for (s1 = range_tower_scan (rt, 0), s2 = next_1bit (pattern, 0, offset); ; s1 = range_tower_scan (rt, s1 + 1), s2 = next_1bit (pattern, (s2 - offset) + 1, offset)) { check (s1 == s2); if (s1 == ULONG_MAX) break; } /* Scan in random order to frustrate cache. */ for (i = 0; i < 32; i++) { start = rand () % 32; s1 = range_tower_scan (rt, start + offset); s2 = next_1bit (pattern, start, offset); check (s1 == s2); } /* Test range_tower_scan() with negative cache. */ check (!range_tower_contains (rt, 999)); if (offset < 1111) check (range_tower_scan (rt, 1111) == ULONG_MAX); /* Check for containment without caching. */ for (i = 0; i < UINT_BIT; i++) { struct range_tower *nonconst_rt = CONST_CAST (struct range_tower *, rt); nonconst_rt->cache_end = 0; check (range_tower_contains (rt, i + offset) == ((pattern & (1u << i)) != 0)); } /* Check for containment with caching. */ for (i = 0; i < UINT_BIT; i++) check (range_tower_contains (rt, i + offset) == ((pattern & (1u << i)) != 0)); check (!range_tower_contains (rt, UINT_BIT + rand () % (ULONG_MAX - UINT_BIT * 2))); check (range_tower_is_empty (rt) == (pattern == 0)); } /* Creates and returns a range tower that contains regions for the bits tower in PATTERN. */ static struct range_tower * make_pattern (unsigned int pattern, unsigned long int offset) { unsigned long int start = 0; unsigned long int width = 0; struct range_tower *rt = range_tower_create_pool (NULL); while (next_region (pattern, start + width, &start, &width)) range_tower_set1 (rt, start + offset, width); check_pattern (rt, pattern, offset); return rt; } /* Returns an unsigned int with bits OFS...OFS+CNT (exclusive) tower to 1, other bits tower to 0. */ static unsigned int bit_range (unsigned int ofs, unsigned int cnt) { assert (ofs < UINT_BIT); assert (cnt <= UINT_BIT); assert (ofs + cnt <= UINT_BIT); return cnt < UINT_BIT ? ((1u << cnt) - 1) << ofs : UINT_MAX; } /* Tests setting all possible ranges of 1s into all possible range sets (up to a small maximum number of bits). */ static void test_set1 (void) { const int positions = 9; unsigned int init_pat; int start, width; int k; for (k = 0; k < 2; k++) for (init_pat = 0; init_pat < (1u << positions); init_pat++) for (start = 0; start < positions; start++) for (width = 0; width + start <= positions; width++) { unsigned long int offset = k ? ULONG_MAX - positions : 0; struct range_tower *rt, *rt2; unsigned int final_pat; rt = make_pattern (init_pat, offset); range_tower_set1 (rt, offset + start, width); final_pat = init_pat | bit_range (start, width); check_pattern (rt, final_pat, offset); rt2 = range_tower_clone (rt, NULL); check_pattern (rt2, final_pat, offset); range_tower_destroy (rt); range_tower_destroy (rt2); } } /* Tests setting all possible ranges of 0s into all possible range sets (up to a small maximum number of bits). */ static void test_set0 (void) { const int positions = 9; unsigned int init_pat; int start, width, k; for (k = 0; k < 2; k++) for (init_pat = 0; init_pat < (1u << positions); init_pat++) for (start = 0; start < positions; start++) for (width = 0; start + width <= positions; width++) { unsigned long int offset = k ? ULONG_MAX - positions : 0; struct range_tower *rt; unsigned int final_pat; rt = make_pattern (init_pat, offset); range_tower_set0 (rt, offset + start, width); final_pat = init_pat & ~bit_range (start, width); check_pattern (rt, final_pat, offset); range_tower_destroy (rt); } } /* Tests inserting all possible ranges of 0s into all possible range sets (up to a small maximum number of bits). */ static void test_insert0 (void) { const int positions = 9; unsigned int init_pat; int start, width, k; for (k = 0; k < 2; k++) for (init_pat = 0; init_pat < (1u << positions); init_pat++) for (start = 0; start < positions; start++) for (width = 0; start + width <= positions; width++) { unsigned long int offset = k ? ULONG_MAX - positions : 0; struct range_tower *rt; unsigned int final_pat; rt = make_pattern (init_pat, offset); range_tower_insert0 (rt, offset + start, width); final_pat = init_pat & bit_range (0, start); final_pat |= (init_pat & bit_range (start, positions - start)) << width; check_pattern (rt, final_pat, offset); range_tower_destroy (rt); } } /* Tests inserting all possible ranges of 1s into all possible range sets (up to a small maximum number of bits). */ static void test_insert1 (void) { const int positions = 9; unsigned int init_pat; int start, width, k; for (k = 0; k < 2; k++) for (init_pat = 0; init_pat < (1u << positions); init_pat++) for (start = 0; start < positions; start++) for (width = 0; start + width <= positions; width++) { struct range_tower *rt; unsigned int final_pat; rt = make_pattern (init_pat, 0); range_tower_insert1 (rt, start, width); final_pat = init_pat & bit_range (0, start); final_pat |= bit_range (start, width); final_pat |= (init_pat & bit_range (start, positions - start)) << width; check_pattern (rt, final_pat, 0); range_tower_destroy (rt); } } /* Tests setting all possible ranges from all possible range sets (up to a small maximum number of bits). */ static void test_delete (void) { const int positions = 9; unsigned int init_pat; int start, width, k; for (k = 0; k < 2; k++) for (init_pat = 0; init_pat < (1u << positions); init_pat++) for (start = 0; start < positions; start++) for (width = 0; start + width <= positions; width++) { unsigned long int offset = k ? ULONG_MAX - positions : 0; struct range_tower *rt; unsigned int final_pat; rt = make_pattern (init_pat, offset); range_tower_delete (rt, start + offset, width); final_pat = init_pat & bit_range (0, start); final_pat |= (init_pat & (UINT_MAX << (start + width))) >> width; check_pattern (rt, final_pat, offset); range_tower_destroy (rt); } } /* Tests moving all possible ranges (up to a small maximum number of bits). */ static void test_move (void) { const int positions = 9; unsigned int init_pat; int new_start, old_start, width, k; for (k = 0; k < 2; k++) for (init_pat = 0; init_pat < (1u << positions); init_pat++) for (width = 0; width <= positions; width++) for (new_start = 0; new_start + width <= positions; new_start++) for (old_start = 0; old_start + width <= positions; old_start++) { unsigned long int offset = k ? ULONG_MAX - positions : 0; struct range_tower *rt; unsigned int final_pat; if (new_start == old_start || width == 0) final_pat = init_pat; else if (new_start < old_start) { final_pat = init_pat & bit_range (0, new_start); final_pat |= (init_pat & bit_range (old_start, width)) >> (old_start - new_start); final_pat |= (init_pat & bit_range (new_start, old_start - new_start)) << width; final_pat |= init_pat & bit_range (old_start + width, positions - (old_start + width)); } else { final_pat = init_pat & bit_range (0, old_start); final_pat |= (init_pat & bit_range (old_start + width, new_start - old_start)) >> width; final_pat |= (init_pat & bit_range (old_start, width)) << (new_start - old_start); final_pat |= init_pat & bit_range (new_start + width, positions - (new_start + width)); } rt = make_pattern (init_pat, offset); range_tower_move (rt, old_start + offset, new_start + offset, width); check_pattern (rt, final_pat, offset); range_tower_destroy (rt); } } /* Tests freeing a range tower through a pool. */ static void test_pool (void) { struct pool *pool; struct range_tower *rt; /* Destroy the range tower, then the pool. Makes sure that this doesn't cause a double-free. */ pool = pool_create (); rt = range_tower_create_pool (pool); range_tower_set1 (rt, 1, 10); range_tower_destroy (rt); pool_destroy (pool); /* Just destroy the pool. Makes sure that this doesn't cause a leak. */ pool = pool_create (); rt = range_tower_create_pool (pool); range_tower_set1 (rt, 1, 10); pool_destroy (pool); } /* Tests range_tower_destroy(NULL). */ static void test_destroy_null (void) { range_tower_destroy (NULL); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "set1", "set1", test_set1 }, { "set0", "set0", test_set0 }, { "insert0", "insert0", test_insert0 }, { "insert1", "insert1", test_insert1 }, { "delete", "delete", test_delete }, { "move", "move", test_move }, { "pool", "pool", test_pool }, { "destroy-null", "destroy null", test_destroy_null }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test range tower library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/heap-test.c0000644000175000017500000004436712470413451014304 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2010, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the routines defined in heap.c. This test program aims to be as comprehensive as possible. With -DNDEBUG, "gcov -b" should report 100% coverage of lines and branches in heap.c routines, except for the is_heap function, which is not called at all with -DNDEBUG. (Without -DNDEBUG, branches caused by failed assertions will also not be taken.) "valgrind --leak-check=yes --show-reachable=yes" should give a clean report, both with and without -DNDEBUG. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include "xalloc.h" /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Node type and support routines. */ /* Test data element. */ struct element { struct heap_node node; /* Embedded heap element. */ int x; /* Primary value. */ }; static int aux_data; /* Returns the `struct element' that NODE is embedded within. */ static struct element * heap_node_to_element (const struct heap_node *node) { return heap_data (node, struct element, node); } /* Compares the `x' values in A and B and returns a strcmp-type return value. Verifies that AUX points to aux_data. */ static int compare_elements (const struct heap_node *a_, const struct heap_node *b_, const void *aux) { const struct element *a = heap_node_to_element (a_); const struct element *b = heap_node_to_element (b_); check (aux == &aux_data); return a->x < b->x ? -1 : a->x > b->x; } /* Returns the smallest of the N integers in ARRAY. */ static int min_int (int *array, size_t n) { int min; size_t i; min = INT_MAX; for (i = 0; i < n; i++) if (array[i] < min) min = array[i]; return min; } /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT elements in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if (values[i] < values[i + 1]) { size_t j; for (j = cnt - 1; values[i] >= values[j]; j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Returns the number of permutations of the CNT values in VALUES. If VALUES contains duplicates, they must be adjacent. */ static unsigned int expected_perms (int *values, size_t cnt) { size_t i, j; unsigned int perm_cnt; perm_cnt = factorial (cnt); for (i = 0; i < cnt; i = j) { for (j = i + 1; j < cnt; j++) if (values[i] != values[j]) break; perm_cnt /= factorial (j - i); } return perm_cnt; } /* Tests whether PARTS is a K-part integer composition of N. Returns true if so, false otherwise. */ static bool UNUSED is_k_composition (int n, int k, const int parts[]) { int sum; int i; sum = 0; for (i = 0; i < k; i++) { if (parts[i] < 1 || parts[i] > n) return false; sum += parts[i]; } return sum == n; } /* Advances the K-part integer composition of N stored in PARTS to the next lexicographically greater one. Returns true if successful, false if the composition was already the greatest K-part composition of N (in which case PARTS is unaltered). */ static bool next_k_composition (int n UNUSED, int k, int parts[]) { int x, i; assert (is_k_composition (n, k, parts)); if (k == 1) return false; for (i = k - 1; i > 0; i--) if (parts[i] > 1) break; if (i == 0) return false; x = parts[i] - 1; parts[i] = 1; parts[i - 1]++; parts[k - 1] = x; assert (is_k_composition (n, k, parts)); return true; } /* Advances *K and PARTS to the next integer composition of N. Compositions are ordered from shortest to longest and in lexicographical order within a given length. Before the first call, initialize *K to 0. After each successful call, *K contains the length of the current composition and the *K elements in PARTS contain its parts. Returns true if successful, false if the set of compositions has been exhausted. */ static bool next_composition (int n, int *k, int parts[]) { if (*k >= 1 && next_k_composition (n, *k, parts)) return true; else if (*k < n) { int i; for (i = 0; i < *k; i++) parts[i] = 1; parts[i] = n - *k; (*k)++; return true; } else return false; } /* Inserts sequences without duplicates into a heap, and then ensures that they appear as the minimum element in the correct order as we delete them. Exhaustively tests every input permutation up to 'max_elems' elements. */ static void test_insert_no_dups_delete_min (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct heap *h; struct element *elements; int *values; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); elements = xnmalloc (cnt, sizeof *elements); for (i = 0; i < cnt; i++) values[i] = i; h = heap_create (compare_elements, &aux_data); permutation_cnt = 0; while (permutation_cnt == 0 || next_permutation (values, cnt)) { int i; for (i = 0; i < cnt; i++) elements[i].x = values[i]; check (heap_is_empty (h)); for (i = 0; i < cnt; i++) { heap_insert (h, &elements[i].node); check (heap_node_to_element (heap_minimum (h))->x == min_int (values, i + 1)); check (heap_count (h) == i + 1); } for (i = 0; i < cnt; i++) { check (heap_node_to_element (heap_minimum (h))->x == i); heap_delete (h, heap_minimum (h)); } check (heap_is_empty (h)); permutation_cnt++; } check (permutation_cnt == factorial (cnt)); heap_destroy (h); free (values); free (elements); } } /* Inserts sequences with duplicates into a heap, and then ensures that they appear as the minimum element in the correct order as we delete them. Exhaustively tests every input permutation up to 'max_elems' elements. See Usenet article <87mz4utika.fsf@blp.benpfaff.org> for details of the algorithm used here. */ static void test_insert_with_dups_delete_min (void) { const int max_elems = 7; int cnt; for (cnt = 1; cnt <= max_elems; cnt++) { unsigned int composition_cnt; int *dups; int unique_cnt; int *values; int *sorted_values; struct element *elements; int n = 0; dups = xnmalloc (cnt, sizeof *dups); values = xnmalloc (cnt, sizeof *values); sorted_values = xnmalloc (cnt, sizeof *sorted_values); elements = xnmalloc (cnt, sizeof *elements); unique_cnt = 0; composition_cnt = 0; while (next_composition (cnt, &unique_cnt, dups)) { struct heap *h; int i, j, k; unsigned int permutation_cnt; k = 0; for (i = 0; i < unique_cnt; i++) for (j = 0; j < dups[i]; j++) { values[k] = i; sorted_values[k] = i; k++; } check (k == cnt); h = heap_create (compare_elements, &aux_data); permutation_cnt = 0; while (permutation_cnt == 0 || next_permutation (values, cnt)) { int min = INT_MAX; for (i = 0; i < cnt; i++) elements[i].x = values[i]; n++; check (heap_is_empty (h)); for (i = 0; i < cnt; i++) { heap_insert (h, &elements[i].node); if (values[i] < min) min = values[i]; check (heap_node_to_element (heap_minimum (h))->x == min); check (heap_count (h) == i + 1); } for (i = 0; i < cnt; i++) { struct element *min = heap_node_to_element (heap_minimum (h)); check (min->x == sorted_values[i]); heap_delete (h, heap_minimum (h)); } check (heap_is_empty (h)); permutation_cnt++; } check (permutation_cnt == expected_perms (values, cnt)); heap_destroy (h); composition_cnt++; } check (composition_cnt == 1 << (cnt - 1)); free (dups); free (values); free (sorted_values); free (elements); } } /* Inserts a sequence without duplicates into a heap, then deletes them in a different order. */ static void test_insert_no_dups_delete_random (void) { const int max_elems = 5; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct heap *h; struct element *elements; int *insert, *delete; unsigned int insert_perm_cnt; int i; insert = xnmalloc (cnt, sizeof *insert); delete = xnmalloc (cnt, sizeof *delete); elements = xnmalloc (cnt, sizeof *elements); for (i = 0; i < cnt; i++) { insert[i] = i; delete[i] = i; elements[i].x = i; } h = heap_create (compare_elements, &aux_data); insert_perm_cnt = 0; while (insert_perm_cnt == 0 || next_permutation (insert, cnt)) { unsigned int delete_perm_cnt = 0; while (delete_perm_cnt == 0 || next_permutation (delete, cnt)) { int min; int i; check (heap_is_empty (h)); min = INT_MAX; for (i = 0; i < cnt; i++) { heap_insert (h, &elements[insert[i]].node); if (insert[i] < min) min = insert[i]; check (heap_node_to_element (heap_minimum (h))->x == min); check (heap_count (h) == i + 1); } for (i = 0; i < cnt; i++) { int new_min = min_int (delete + i + 1, cnt - i - 1); heap_delete (h, &elements[delete[i]].node); check (heap_count (h) == cnt - i - 1); if (!heap_is_empty (h)) check (heap_node_to_element (heap_minimum (h))->x == new_min); } check (heap_is_empty (h)); delete_perm_cnt++; } check (delete_perm_cnt == factorial (cnt)); insert_perm_cnt++; } check (insert_perm_cnt == factorial (cnt)); heap_destroy (h); free (insert); free (delete); free (elements); } } /* Inserts a set of values into a heap, then changes them to a different random set of values, then removes them in sorted order. */ static void test_inc_dec (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct heap *h; struct element *elements; int *insert, *delete; unsigned int insert_perm_cnt; int i; insert = xnmalloc (cnt, sizeof *insert); delete = xnmalloc (cnt, sizeof *delete); elements = xnmalloc (cnt, sizeof *elements); for (i = 0; i < cnt; i++) insert[i] = i; h = heap_create (compare_elements, &aux_data); insert_perm_cnt = 0; while (insert_perm_cnt == 0 || next_permutation (insert, cnt)) { for (i = 0; i < cnt; i++) elements[i].x = insert[i]; check (heap_is_empty (h)); for (i = 0; i < cnt; i++) { int new_min = min_int (insert, i + 1); heap_insert (h, &elements[i].node); check (heap_node_to_element (heap_minimum (h))->x == new_min); check (heap_count (h) == i + 1); } for (i = 0; i < cnt; i++) delete[i] = insert[i]; for (i = 0; i < cnt; i++) { elements[i].x = delete[i] = rand () % (cnt + 2) - 1; heap_changed (h, &elements[i].node); check (heap_node_to_element (heap_minimum (h))->x == min_int (delete, cnt)); } for (i = 0; i < cnt; i++) { int new_min = min_int (delete + i + 1, cnt - i - 1); heap_delete (h, &elements[i].node); check (heap_count (h) == cnt - i - 1); if (!heap_is_empty (h)) check (heap_node_to_element (heap_minimum (h))->x == new_min); } check (heap_is_empty (h)); insert_perm_cnt++; } check (insert_perm_cnt == factorial (cnt)); heap_destroy (h); free (insert); free (delete); free (elements); } } /* Performs a random sequence of insertions and deletions in a heap. */ static void test_random_insert_delete (void) { const int max_elems = 64; const int num_actions = 250000; struct heap *h; int *values; struct element *elements; int cnt; int insert_chance; int i; values = xnmalloc (max_elems, sizeof *values); elements = xnmalloc (max_elems, sizeof *elements); cnt = 0; insert_chance = 5; h = heap_create (compare_elements, &aux_data); for (i = 0; i < num_actions; i++) { enum { INSERT, DELETE } action; if (cnt == 0) { action = INSERT; if (insert_chance < 9) insert_chance++; } else if (cnt == max_elems) { action = DELETE; if (insert_chance > 0) insert_chance--; } else action = rand () % 10 < insert_chance ? INSERT : DELETE; if (action == INSERT) { int new_value; new_value = rand () % max_elems; values[cnt] = new_value; elements[cnt].x = new_value; heap_insert (h, &elements[cnt].node); cnt++; } else if (action == DELETE) { int del_idx; del_idx = rand () % cnt; heap_delete (h, &elements[del_idx].node); cnt--; if (del_idx != cnt) { values[del_idx] = values[cnt]; elements[del_idx] = elements[cnt]; heap_moved (h, &elements[del_idx].node); } } else abort (); check (heap_count (h) == cnt); check (heap_is_empty (h) == (cnt == 0)); if (cnt > 0) check (heap_node_to_element (heap_minimum (h))->x == min_int (values, cnt)); } heap_destroy (h); free (elements); free (values); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert-no-dups-delete-min", "insert (no dups), delete minimum values", test_insert_no_dups_delete_min }, { "insert-with-dups-delete-min", "insert with dups, delete minimum values", test_insert_with_dups_delete_min }, { "insert-no-dups-delete-random", "insert (no dups), delete in random order", test_insert_no_dups_delete_random }, { "inc-dec", "increase and decrease values", test_inc_dec }, { "random-insert-delete", "random insertions and deletions", test_random_insert_delete } }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test heap library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/bt.at0000644000175000017500000000214313137223525013165 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([Balanced tree (BT) library]) m4_define([CHECK_BT], [AT_SETUP([BT -- $1]) AT_CHECK([bt-test $1]) AT_CLEANUP]) CHECK_BT([insert-any-remove-any]) CHECK_BT([insert-any-remove-same]) CHECK_BT([insert-any-remove-reverse]) CHECK_BT([random-sequence]) CHECK_BT([insert-ordered]) CHECK_BT([find-ge-le]) CHECK_BT([moved]) CHECK_BT([changed]) pspp-1.0.1/tests/libpspp/range-set-test.c0000644000175000017500000003440313137223525015244 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the routines defined in range-set.c. This test program aims to be as comprehensive as possible. With -DNDEBUG, "gcov -b" should report 100% coverage of lines and branches in range-set.c routines. (Without -DNDEBUG, branches caused by failed assertions will not be taken.) "valgrind --leak-check=yes --show-reachable=yes" should give a clean report, both with and without -DNDEBUG. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include "xalloc.h" /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* A contiguous region. */ struct region { unsigned long int start; /* Start of region. */ unsigned long int end; /* One past the end. */ }; /* Number of bits in an unsigned int. */ #define UINT_BIT (CHAR_BIT * sizeof (unsigned int)) /* Returns the number of contiguous 1-bits in X starting from bit 0. This implementation is designed to be obviously correct, not to be efficient. */ static int count_one_bits (unsigned long int x) { int count = 0; while (x & 1) { count++; x >>= 1; } return count; } /* Searches the bits in PATTERN from right to left starting from bit OFFSET for one or more 1-bits. If any are found, sets *START to the bit index of the first and *WIDTH to the number of contiguous 1-bits and returns true. Otherwise, returns false. This implementation is designed to be obviously correct, not to be efficient. */ static bool next_region (unsigned int pattern, unsigned int offset, unsigned long int *start, unsigned long int *width) { unsigned int i; assert (offset <= UINT_BIT); for (i = offset; i < UINT_BIT; i++) if (pattern & (1u << i)) { *start = i; *width = count_one_bits (pattern >> i); return true; } return false; } /* Searches the bits in PATTERN from left to right starting from just beyond bit OFFSET for one or more 1-bits. If any are found, sets *START to the bit index of the first and *WIDTH to the number of contiguous 1-bits and returns true. Otherwise, returns false. This implementation is designed to be obviously correct, not to be efficient. */ static bool prev_region (unsigned int pattern, unsigned int offset, unsigned long int *start, unsigned long int *width) { unsigned int i; assert (offset <= UINT_BIT); for (i = offset; i-- > 0; ) if (pattern & (1u << i)) { *start = i; *width = 1; while (i-- > 0 && pattern & (1u << i)) { ++*width; --*start; } return true; } return false; } /* Searches the bits in PATTERN from right to left starting from bit OFFSET. Returns the bit index of the first 1-bit found, or ULONG_MAX if none is found. */ static unsigned long int next_1bit (unsigned int pattern, unsigned int offset) { for (; offset < UINT_BIT; offset++) if (pattern & (1u << offset)) return offset; return ULONG_MAX; } /* Prints the regions in RS to stdout. */ static void UNUSED print_regions (const struct range_set *rs) { const struct range_set_node *node; printf ("result:"); RANGE_SET_FOR_EACH (node, rs) printf (" (%lu,%lu)", range_set_node_get_start (node), range_set_node_get_end (node)); printf ("\n"); } /* Checks that the regions in RS match the bits in PATTERN. */ static void check_pattern (const struct range_set *rs, unsigned int pattern) { const struct range_set_node *node; unsigned long int start, width; unsigned long int s1, s2; int i; for (node = rand () % 2 ? range_set_first (rs) : range_set_next (rs, NULL), start = width = 0; next_region (pattern, start + width, &start, &width); node = range_set_next (rs, node)) { check (node != NULL); check (range_set_node_get_start (node) == start); check (range_set_node_get_end (node) == start + width); check (range_set_node_get_width (node) == width); } check (node == NULL); for (node = rand () % 2 ? range_set_last (rs) : range_set_prev (rs, NULL), start = UINT_BIT; prev_region (pattern, start, &start, &width); node = range_set_prev (rs, node)) { check (node != NULL); check (range_set_node_get_start (node) == start); check (range_set_node_get_end (node) == start + width); check (range_set_node_get_width (node) == width); } check (node == NULL); /* Scan from all possible positions, resetting the cache each time, to ensure that we get the correct answers without caching. */ for (start = 0; start <= 32; start++) { struct range_set *nonconst_rs = CONST_CAST (struct range_set *, rs); nonconst_rs->cache_end = 0; s1 = range_set_scan (rs, start); s2 = next_1bit (pattern, start); check (s1 == s2); } /* Scan in forward order to exercise expected cache behavior. */ for (s1 = range_set_scan (rs, 0), s2 = next_1bit (pattern, 0); ; s1 = range_set_scan (rs, s1 + 1), s2 = next_1bit (pattern, s2 + 1)) { check (s1 == s2); if (s1 == ULONG_MAX) break; } /* Scan in random order to frustrate cache. */ for (i = 0; i < 32; i++) { start = rand () % 32; s1 = range_set_scan (rs, start); s2 = next_1bit (pattern, start); check (s1 == s2); } /* Test range_set_scan() with negative cache. */ check (!range_set_contains (rs, 999)); check (range_set_scan (rs, 1111) == ULONG_MAX); for (i = 0; i < UINT_BIT; i++) check (range_set_contains (rs, i) == ((pattern & (1u << i)) != 0)); check (!range_set_contains (rs, UINT_BIT + rand () % (ULONG_MAX - UINT_BIT))); check (range_set_is_empty (rs) == (pattern == 0)); } /* Creates and returns a range set that contains regions for the bits set in PATTERN. */ static struct range_set * make_pattern (unsigned int pattern) { unsigned long int start = 0; unsigned long int width = 0; struct range_set *rs = range_set_create_pool (NULL); while (next_region (pattern, start + width, &start, &width)) range_set_set1 (rs, start, width); check_pattern (rs, pattern); return rs; } /* Returns an unsigned int with bits OFS...OFS+CNT (exclusive) set to 1, other bits set to 0. */ static unsigned int bit_range (unsigned int ofs, unsigned int cnt) { assert (ofs < UINT_BIT); assert (cnt <= UINT_BIT); assert (ofs + cnt <= UINT_BIT); return cnt < UINT_BIT ? ((1u << cnt) - 1) << ofs : UINT_MAX; } /* Tests inserting all possible patterns into all possible range sets (up to a small maximum number of bits). */ static void test_insert (void) { const int positions = 9; unsigned int init_pat; int i, j; for (init_pat = 0; init_pat < (1u << positions); init_pat++) for (i = 0; i < positions + 1; i++) for (j = i; j <= positions + 1; j++) { struct range_set *rs, *rs2; unsigned int final_pat; rs = make_pattern (init_pat); range_set_set1 (rs, i, j - i); final_pat = init_pat | bit_range (i, j - i); check_pattern (rs, final_pat); rs2 = range_set_clone (rs, NULL); check_pattern (rs2, final_pat); range_set_destroy (rs); range_set_destroy (rs2); } } /* Tests deleting all possible patterns from all possible range sets (up to a small maximum number of bits). */ static void test_delete (void) { const int positions = 9; unsigned int init_pat; int i, j; for (init_pat = 0; init_pat < (1u << positions); init_pat++) for (i = 0; i < positions + 1; i++) for (j = i; j <= positions + 1; j++) { struct range_set *rs; unsigned int final_pat; rs = make_pattern (init_pat); range_set_set0 (rs, i, j - i); final_pat = init_pat & ~bit_range (i, j - i); check_pattern (rs, final_pat); range_set_destroy (rs); } } /* Tests all possible allocation in all possible range sets (up to a small maximum number of bits). */ static void test_allocate (void) { const int positions = 9; unsigned int init_pat; int request; for (init_pat = 0; init_pat < (1u << positions); init_pat++) for (request = 1; request <= positions + 1; request++) { struct range_set *rs; unsigned long int start, width, expect_start, expect_width; bool success, expect_success; unsigned int final_pat; int i; /* Figure out expected results. */ expect_success = false; expect_start = expect_width = 0; final_pat = init_pat; for (i = 0; i < positions; i++) if (init_pat & (1u << i)) { expect_success = true; expect_start = i; expect_width = count_one_bits (init_pat >> i); if (expect_width > request) expect_width = request; final_pat &= ~bit_range (expect_start, expect_width); break; } /* Test. */ rs = make_pattern (init_pat); success = range_set_allocate (rs, request, &start, &width); check_pattern (rs, final_pat); range_set_destroy (rs); /* Check results. */ check (success == expect_success); if (expect_success) { check (start == expect_start); check (width == expect_width); } } } /* Tests all possible full allocations in all possible range sets (up to a small maximum number of bits). */ static void test_allocate_fully (void) { const int positions = 9; unsigned int init_pat; int request; for (init_pat = 0; init_pat < (1u << positions); init_pat++) for (request = 1; request <= positions + 1; request++) { struct range_set *rs; unsigned long int start, expect_start; bool success, expect_success; unsigned int final_pat; int i; /* Figure out expected results. */ expect_success = false; expect_start = 0; final_pat = init_pat; for (i = 0; i < positions - request + 1; i++) { int j; final_pat = init_pat; for (j = i; j < i + request; j++) { if (!(init_pat & (1u << j))) goto next; final_pat &= ~(1u << j); } expect_success = true; expect_start = i; break; next: final_pat = init_pat; } /* Test. */ rs = make_pattern (init_pat); success = range_set_allocate_fully (rs, request, &start); check_pattern (rs, final_pat); range_set_destroy (rs); /* Check results. */ check (success == expect_success); if (expect_success) check (start == expect_start); } } /* Tests freeing a range set through a pool. */ static void test_pool (void) { struct pool *pool; struct range_set *rs; /* Destroy the range set, then the pool. Makes sure that this doesn't cause a double-free. */ pool = pool_create (); rs = range_set_create_pool (pool); range_set_set1 (rs, 1, 10); range_set_destroy (rs); pool_destroy (pool); /* Just destroy the pool. Makes sure that this doesn't cause a leak. */ pool = pool_create (); rs = range_set_create_pool (pool); range_set_set1 (rs, 1, 10); pool_destroy (pool); } /* Tests range_set_destroy(NULL). */ static void test_destroy_null (void) { range_set_destroy (NULL); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert", "insert", test_insert }, { "delete", "delete", test_delete }, { "allocate", "allocate", test_allocate }, { "allocate-fully", "allocate_fully", test_allocate_fully }, { "pool", "pool", test_pool }, { "destroy-null", "destroy null", test_destroy_null }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test range set library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/llx.at0000644000175000017500000000330613137223525013361 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([doubly linked list of pointers (llx) library]) m4_define([CHECK_LLX], [AT_SETUP([llx -- $1]) AT_CHECK([llx-test $1]) AT_CLEANUP]) CHECK_LLX([push-pop]) CHECK_LLX([insert-remove]) CHECK_LLX([swap]) CHECK_LLX([swap-range]) CHECK_LLX([remove-range]) CHECK_LLX([remove-equal]) CHECK_LLX([remove-if]) CHECK_LLX([find-equal]) CHECK_LLX([find]) CHECK_LLX([find-if]) CHECK_LLX([find-adjacent-equal]) CHECK_LLX([count-range]) CHECK_LLX([count-equal]) CHECK_LLX([count-if]) CHECK_LLX([min-max]) CHECK_LLX([lexicographical-compare-3way]) CHECK_LLX([apply]) CHECK_LLX([destroy]) CHECK_LLX([reverse]) CHECK_LLX([permutations-no-dups]) CHECK_LLX([permutations-with-dups]) CHECK_LLX([merge-no-dups]) CHECK_LLX([merge-with-dups]) CHECK_LLX([sort-exhaustive]) CHECK_LLX([sort-stable]) CHECK_LLX([sort-subset]) CHECK_LLX([sort-big]) CHECK_LLX([unique]) CHECK_LLX([sort-unique]) CHECK_LLX([insert-ordered]) CHECK_LLX([partition]) CHECK_LLX([allocation-failure]) pspp-1.0.1/tests/libpspp/encoding-guesser.at0000644000175000017500000001320113137223525016016 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([encoding guesser]) AT_SETUP([ASCII]) AT_KEYWORDS([encoding guesser]) AT_CHECK([echo string | encoding-guesser-test Auto,ISO-8859-1], [0], [ASCII ]) AT_CLEANUP AT_SETUP([UTF-8]) AT_KEYWORDS([encoding guesser]) AT_CHECK([i18n-test supports_encodings ISO-8859-1]) AT_CHECK([printf '\346\227\245\346\234\254\350\252\236\n' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-8 ]) AT_CLEANUP AT_SETUP([UTF-8 starting with ASCII]) AT_KEYWORDS([encoding guesser]) AT_CHECK([i18n-test supports_encodings ISO-8859-1]) AT_CHECK([printf 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\346\227\245\346\234\254\350\252\236\n' | encoding-guesser-test Auto,ISO-8859-1 32], [0], [UTF-8 ]) AT_CLEANUP AT_SETUP([UTF-16 with big-endian byte order mark]) AT_KEYWORDS([encoding guesser]) AT_CHECK([printf '\376\377' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-16 ]) AT_CLEANUP AT_SETUP([UTF-16 with little-endian byte order mark]) AT_KEYWORDS([encoding guesser]) AT_CHECK([printf '\377\376' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-16 ]) AT_CLEANUP AT_SETUP([UTF-16BE]) AT_KEYWORDS([encoding guesser]) AT_CHECK([printf '\0e\0n\0t\0r\0\351\0e\0\n' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-16BE ]) AT_CLEANUP dnl Unicode U+XX00 characters are confusing in UTF-16 because they look dnl likely to be of the opposite endianness, so this tests for proper handling. AT_SETUP([UTF-16BE starting with U+0100]) AT_KEYWORDS([encoding guesser]) AT_CHECK([printf '\1\0\0e\0n\0t\0r\0\351\0e\0\n' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-16BE ]) AT_CLEANUP AT_SETUP([UTF-16LE]) AT_KEYWORDS([encoding guesser]) AT_CHECK([printf 'e\0n\0t\0r\0\351\0e\0\n\0' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-16LE ]) AT_CLEANUP dnl Unicode U+XX00 characters are confusing in UTF-16 because they look dnl likely to be of the opposite endianness, so this tests for proper handling. AT_SETUP([UTF-16LE starting with U+0100]) AT_KEYWORDS([encoding guesser]) AT_CHECK([printf '\0\1e\0n\0t\0r\0\351\0e\0\n\0' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-16LE ]) AT_CLEANUP AT_SETUP([UTF-32 with big-endian byte order mark]) AT_KEYWORDS([encoding guesser]) AT_CHECK([printf '\0\0\376\377' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-32 ]) AT_CLEANUP AT_SETUP([UTF-32 with little-endian byte order mark]) AT_KEYWORDS([encoding guesser]) AT_CHECK([printf '\377\376\0\0' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-32 ]) AT_CLEANUP AT_SETUP([UTF-32BE]) AT_KEYWORDS([encoding guesser]) AT_CHECK([printf '\0\0\0e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-32BE ]) AT_CLEANUP AT_SETUP([UTF-32LE]) AT_KEYWORDS([encoding guesser]) AT_CHECK([printf 'e\0\0\0n\0\0\0t\0\0\0r\0\0\0\351\0\0\0e\0\0\0\n\0\0\0' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-32LE ]) AT_CLEANUP AT_SETUP([ISO-8859-1]) AT_KEYWORDS([encoding guesser]) AT_CHECK([i18n-test supports_encodings ISO-8859-1]) AT_CHECK([printf 'entr\351e\n' | encoding-guesser-test Auto,ISO-8859-1], [0], [ISO-8859-1 ]) AT_CLEANUP AT_SETUP([GB-18030 with byte order mark]) AT_KEYWORDS([encoding guesser]) AT_CHECK([i18n-test supports_encodings ISO-8859-1]) AT_CHECK([printf '\204\061\225\063' | encoding-guesser-test Auto,ISO-8859-1], [0], [GB-18030 ]) AT_CLEANUP AT_SETUP([UTF-EBCDIC with byte order mark]) AT_KEYWORDS([encoding guesser]) AT_CHECK([i18n-test supports_encodings ISO-8859-1]) AT_CHECK([printf '\335\163\146\163' | encoding-guesser-test Auto,ISO-8859-1], [0], [UTF-EBCDIC ]) AT_CLEANUP AT_SETUP([EUC-JP as Auto,EUC-JP]) AT_KEYWORDS([encoding guesser]) AT_CHECK([i18n-test supports_encodings EUC-JP]) AT_CHECK([printf '\244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 \244\250 \244\251 \244\252\n' | encoding-guesser-test Auto,EUC-JP], [0], [EUC-JP ]) AT_CLEANUP AT_SETUP([EUC-JP starting with ASCII as Auto,EUC-JP]) AT_KEYWORDS([encoding guesser]) AT_CHECK([i18n-test supports_encodings EUC-JP]) AT_CHECK([printf 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 \244\250 \244\251 \244\252\n' | encoding-guesser-test Auto,EUC-JP 32], [0], [EUC-JP ]) AT_CLEANUP AT_SETUP([UTF-8 with character split across input buffers]) AT_KEYWORDS([encoding guesser]) AT_CHECK([i18n-test supports_encodings ISO-8859-1]) AT_CHECK([printf '\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\343\201\201\343\201\202\343\201\203\343\201\204\343\201\205\343\201\206\343\201\207\343\201\210\343\201\211\343\201\212\n' | encoding-guesser-test Auto,ISO-8859-1 32], [0], [UTF-8 ]) AT_CLEANUP AT_SETUP([windows-1252 as Auto,UTF-8]) AT_KEYWORDS([encoding guesser]) AT_CHECK([i18n-test supports_encodings windows-1252]) AT_CHECK([printf 'entr\351e' | encoding-guesser-test Auto,UTF-8 32], [0], [windows-1252 ]) AT_CLEANUP pspp-1.0.1/tests/libpspp/hmapx-test.c0000644000175000017500000007056313137223525014503 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the hmapx_* routines defined in hmapx.c. This test program aims to be as comprehensive as possible. "gcov -a -b" should report 100% coverage of lines, blocks and branches in hmapx.c (when compiled with -DNDEBUG). "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); abort (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } static void * xmemdup (const void *p, size_t n) { void *q = xmalloc (n); memcpy (q, p, n); return q; } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* Node type and support routines. */ /* Test data element. */ struct element { int data; /* Primary value. */ }; /* Compares A and B and returns a strcmp-type return value. */ static int compare_ints (const void *a_, const void *b_) { const int *a = a_; const int *b = b_; return *a < *b ? -1 : *a > *b; } /* Swaps *A and *B. */ static void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Reverses the order of the CNT integers starting at VALUES. */ static void reverse (int *values, size_t cnt) { size_t i = 0; size_t j = cnt; while (j > i) swap (&values[i++], &values[--j]); } /* Arranges the CNT elements in VALUES into the lexicographically next greater permutation. Returns true if successful. If VALUES is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. */ static bool next_permutation (int *values, size_t cnt) { if (cnt > 0) { size_t i = cnt - 1; while (i != 0) { i--; if (values[i] < values[i + 1]) { size_t j; for (j = cnt - 1; values[i] >= values[j]; j--) continue; swap (values + i, values + j); reverse (values + (i + 1), cnt - (i + 1)); return true; } } reverse (values, cnt); } return false; } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } typedef size_t hash_function (int data); static size_t identity_hash (int data) { return data; } static size_t constant_hash (int data UNUSED) { return 0x12345678u; } static inline uint32_t md4_round (uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t data, uint32_t n) { uint32_t x = a + (d ^ (b & (c ^ d))) + data; return (x << n) | (x >> (32 - n)); } static size_t random_hash (int data) { uint32_t a = data; uint32_t b = data; uint32_t c = data; uint32_t d = data; a = md4_round (a, b, c, d, 0, 3); d = md4_round (d, a, b, c, 1, 7); c = md4_round (c, d, a, b, 2, 11); b = md4_round (b, c, d, a, 3, 19); return a ^ b ^ c ^ d; } static struct hmapx_node * find_element (struct hmapx *hmapx, int data, hash_function *hash) { struct hmapx_node *node; struct element *e; HMAPX_FOR_EACH_WITH_HASH (e, node, hash (data), hmapx) if (e->data == data) break; return node; } /* Checks that HMAPX contains the CNT ints in DATA, that its structure is correct, and that certain operations on HMAPX produce the expected results. */ static void check_hmapx (struct hmapx *hmapx, const int data[], size_t cnt, hash_function *hash) { size_t i, j; int *order; check (hmapx_is_empty (hmapx) == (cnt == 0)); check (hmapx_count (hmapx) == cnt); check (cnt <= hmapx_capacity (hmapx)); order = xmemdup (data, cnt * sizeof *data); qsort (order, cnt, sizeof *order, compare_ints); for (i = 0; i < cnt; i = j) { struct hmapx_node *node; struct element *e; int count; for (j = i + 1; j < cnt; j++) if (order[i] != order[j]) break; count = 0; HMAPX_FOR_EACH_WITH_HASH (e, node, hash (order[i]), hmapx) if (e->data == order[i]) count++; check (count == j - i); } check (find_element (hmapx, -1, hash) == NULL); if (cnt == 0) check (hmapx_first (hmapx) == NULL); else { struct hmapx_node *p; int left; left = cnt; for (p = hmapx_first (hmapx), i = 0; i < cnt; p = hmapx_next (hmapx, p), i++) { struct element *e = hmapx_node_data (p); size_t j; check (hmapx_node_hash (p) == hash (e->data)); for (j = 0; j < left; j++) if (order[j] == e->data) { order[j] = order[--left]; goto next; } abort (); next: ; } check (p == NULL); } free (order); } /* Inserts the CNT values from 0 to CNT - 1 (inclusive) into an HMAPX in the order specified by INSERTIONS, then deletes them in the order specified by DELETIONS, checking the HMAPX's contents for correctness after each operation. Uses HASH as the hash function. */ static void test_insert_delete (const int insertions[], const int deletions[], size_t cnt, hash_function *hash, size_t reserve) { struct element *elements; struct hmapx_node **nodes; struct hmapx hmapx; size_t i; elements = xnmalloc (cnt, sizeof *elements); nodes = xnmalloc (cnt, sizeof *nodes); for (i = 0; i < cnt; i++) elements[i].data = i; hmapx_init (&hmapx); hmapx_reserve (&hmapx, reserve); check_hmapx (&hmapx, NULL, 0, hash); for (i = 0; i < cnt; i++) { struct hmapx_node *(*insert) (struct hmapx *, void *, size_t hash); size_t capacity; /* Insert the node. Use hmapx_insert_fast if we have not yet exceeded the reserve. */ insert = i < reserve ? hmapx_insert_fast : hmapx_insert; nodes[insertions[i]] = insert (&hmapx, &elements[insertions[i]], hash (insertions[i])); check_hmapx (&hmapx, insertions, i + 1, hash); /* A series of insertions should not produce a shrinkable hmapx. */ if (i >= reserve) { capacity = hmapx_capacity (&hmapx); hmapx_shrink (&hmapx); check (capacity == hmapx_capacity (&hmapx)); } } for (i = 0; i < cnt; i++) { hmapx_delete (&hmapx, nodes[deletions[i]]); check_hmapx (&hmapx, deletions + i + 1, cnt - i - 1, hash); } hmapx_destroy (&hmapx); free (elements); free (nodes); } /* Inserts values into an HMAPX in each possible order, then removes them in each possible order, up to a specified maximum size, using hash function HASH. */ static void test_insert_any_remove_any (hash_function *hash) { const int max_elems = 5; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int ins_perm_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (ins_perm_cnt = 0; ins_perm_cnt == 0 || next_permutation (insertions, cnt); ins_perm_cnt++) { unsigned int del_perm_cnt; int i; for (i = 0; i < cnt; i++) deletions[i] = i; for (del_perm_cnt = 0; del_perm_cnt == 0 || next_permutation (deletions, cnt); del_perm_cnt++) test_insert_delete (insertions, deletions, cnt, hash, 1); check (del_perm_cnt == factorial (cnt)); } check (ins_perm_cnt == factorial (cnt)); free (insertions); free (deletions); } } static void test_insert_any_remove_any_random_hash (void) { test_insert_any_remove_any (random_hash); } static void test_insert_any_remove_any_identity_hash (void) { test_insert_any_remove_any (identity_hash); } static void test_insert_any_remove_any_constant_hash (void) { test_insert_any_remove_any (constant_hash); } /* Inserts values into an HMAPX in each possible order, then removes them in the same order, up to a specified maximum size, using hash function HASH. */ static void test_insert_any_remove_same (hash_function *hash) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) test_insert_delete (values, values, cnt, hash, cnt / 2); check (permutation_cnt == factorial (cnt)); free (values); } } static void test_insert_any_remove_same_random_hash (void) { test_insert_any_remove_same (random_hash); } static void test_insert_any_remove_same_identity_hash (void) { test_insert_any_remove_same (identity_hash); } static void test_insert_any_remove_same_constant_hash (void) { test_insert_any_remove_same (constant_hash); } /* Inserts values into an HMAPX in each possible order, then removes them in reverse order, up to a specified maximum size, using hash function HASH. */ static void test_insert_any_remove_reverse (hash_function *hash) { const int max_elems = 7; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *insertions, *deletions; unsigned int permutation_cnt; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (insertions, cnt); permutation_cnt++) { memcpy (deletions, insertions, sizeof *insertions * cnt); reverse (deletions, cnt); test_insert_delete (insertions, deletions, cnt, hash, cnt); } check (permutation_cnt == factorial (cnt)); free (insertions); free (deletions); } } static void test_insert_any_remove_reverse_random_hash (void) { test_insert_any_remove_reverse (random_hash); } static void test_insert_any_remove_reverse_identity_hash (void) { test_insert_any_remove_reverse (identity_hash); } static void test_insert_any_remove_reverse_constant_hash (void) { test_insert_any_remove_reverse (constant_hash); } /* Inserts and removes up to MAX_ELEMS values in an hmapx, in random order, using hash function HASH. */ static void test_random_sequence (int max_elems, hash_function *hash) { const int max_trials = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt += 2) { int *insertions, *deletions; int trial; int i; insertions = xnmalloc (cnt, sizeof *insertions); deletions = xnmalloc (cnt, sizeof *deletions); for (i = 0; i < cnt; i++) insertions[i] = i; for (i = 0; i < cnt; i++) deletions[i] = i; for (trial = 0; trial < max_trials; trial++) { random_shuffle (insertions, cnt, sizeof *insertions); random_shuffle (deletions, cnt, sizeof *deletions); test_insert_delete (insertions, deletions, cnt, hash, 0); } free (insertions); free (deletions); } } static void test_random_sequence_random_hash (void) { test_random_sequence (64, random_hash); } static void test_random_sequence_identity_hash (void) { test_random_sequence (64, identity_hash); } static void test_random_sequence_constant_hash (void) { test_random_sequence (32, constant_hash); } /* Inserts MAX_ELEMS elements into an HMAPX in ascending order, then delete in ascending order and shrink the hmapx at each step, using hash function HASH. */ static void test_insert_ordered (int max_elems, hash_function *hash) { struct element *elements; struct hmapx_node **nodes; int *values; struct hmapx hmapx; int i; hmapx_init (&hmapx); elements = xnmalloc (max_elems, sizeof *elements); nodes = xnmalloc (max_elems, sizeof *nodes); values = xnmalloc (max_elems, sizeof *values); for (i = 0; i < max_elems; i++) { values[i] = elements[i].data = i; nodes[i] = hmapx_insert (&hmapx, &elements[i], hash (elements[i].data)); check_hmapx (&hmapx, values, i + 1, hash); if (hash == identity_hash) { /* Check that every every hash bucket has (almost) the same number of nodes in it. */ int min = INT_MAX; int max = INT_MIN; int j; for (j = 0; j <= hmapx.hmap.mask; j++) { int count = 0; struct hmap_node *node; for (node = hmapx.hmap.buckets[j]; node != NULL; node = node->next) count++; if (count < min) min = count; if (count > max) max = count; } check (max - min <= 1); } } for (i = 0; i < max_elems; i++) { hmapx_delete (&hmapx, nodes[i]); hmapx_shrink (&hmapx); check_hmapx (&hmapx, values + i + 1, max_elems - i - 1, hash); } hmapx_destroy (&hmapx); free (elements); free (nodes); free (values); } static void test_insert_ordered_random_hash (void) { test_insert_ordered (1024, random_hash); } static void test_insert_ordered_identity_hash (void) { test_insert_ordered (1024, identity_hash); } static void test_insert_ordered_constant_hash (void) { test_insert_ordered (128, constant_hash); } /* Inserts up to MAX_ELEMS elements into an HMAPX, then moves the nodes around in memory, using hash function HASH. */ static void test_moved (int max_elems, hash_function *hash) { struct element *e[2]; int cur; int *values; struct hmapx_node **nodes; struct hmapx hmapx; int i, j; hmapx_init (&hmapx); e[0] = xnmalloc (max_elems, sizeof *e[0]); e[1] = xnmalloc (max_elems, sizeof *e[1]); values = xnmalloc (max_elems, sizeof *values); nodes = xnmalloc (max_elems, sizeof *nodes); cur = 0; for (i = 0; i < max_elems; i++) { values[i] = e[cur][i].data = i; nodes[i] = hmapx_insert (&hmapx, &e[cur][i], hash (e[cur][i].data)); check_hmapx (&hmapx, values, i + 1, hash); for (j = 0; j <= i; j++) { e[!cur][j] = e[cur][j]; hmapx_move (nodes[j], &e[cur][j]); check_hmapx (&hmapx, values, i + 1, hash); } cur = !cur; } hmapx_destroy (&hmapx); free (e[0]); free (e[1]); free (values); free (nodes); } static void test_moved_random_hash (void) { test_moved (128, random_hash); } static void test_moved_identity_hash (void) { test_moved (128, identity_hash); } static void test_moved_constant_hash (void) { test_moved (32, constant_hash); } /* Inserts values into an HMAPX, then changes their values, using hash function HASH. */ static void test_changed (hash_function *hash) { const int max_elems = 6; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values, *changed_values; struct hmapx_node **nodes; struct element *elements; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); changed_values = xnmalloc (cnt, sizeof *changed_values); elements = xnmalloc (cnt, sizeof *elements); nodes = xnmalloc (cnt, sizeof *nodes); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) { for (i = 0; i < cnt; i++) { int j, k; for (j = 0; j <= cnt; j++) { struct hmapx hmapx; hmapx_init (&hmapx); /* Add to HMAPX in order. */ for (k = 0; k < cnt; k++) { int n = values[k]; elements[n].data = n; nodes[n] = hmapx_insert (&hmapx, &elements[n], hash (elements[n].data)); } check_hmapx (&hmapx, values, cnt, hash); /* Change value i to j. */ elements[i].data = j; hmapx_changed (&hmapx, nodes[i], hash (elements[i].data)); for (k = 0; k < cnt; k++) changed_values[k] = k; changed_values[i] = j; check_hmapx (&hmapx, changed_values, cnt, hash); hmapx_destroy (&hmapx); } } } check (permutation_cnt == factorial (cnt)); free (values); free (changed_values); free (elements); free (nodes); } } static void test_changed_random_hash (void) { test_changed (random_hash); } static void test_changed_identity_hash (void) { test_changed (identity_hash); } static void test_changed_constant_hash (void) { test_changed (constant_hash); } /* Inserts values into an HMAPX, then changes and moves their values, using hash function HASH. */ static void test_change (hash_function *hash) { const int max_elems = 6; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { int *values, *changed_values; struct hmapx_node **nodes; struct element *elements; struct element replacement; unsigned int permutation_cnt; int i; values = xnmalloc (cnt, sizeof *values); changed_values = xnmalloc (cnt, sizeof *changed_values); elements = xnmalloc (cnt, sizeof *elements); nodes = xnmalloc (cnt, sizeof *nodes); for (i = 0; i < cnt; i++) values[i] = i; for (permutation_cnt = 0; permutation_cnt == 0 || next_permutation (values, cnt); permutation_cnt++) { for (i = 0; i < cnt; i++) { int j, k; for (j = 0; j <= cnt; j++) { struct hmapx hmapx; hmapx_init (&hmapx); /* Add to HMAPX in order. */ for (k = 0; k < cnt; k++) { int n = values[k]; elements[n].data = n; nodes[n] = hmapx_insert (&hmapx, &elements[n], hash (elements[n].data)); } check_hmapx (&hmapx, values, cnt, hash); /* Change value i to j. */ replacement.data = j; hmapx_change (&hmapx, nodes[i], &replacement, hash (j)); for (k = 0; k < cnt; k++) changed_values[k] = k; changed_values[i] = j; check_hmapx (&hmapx, changed_values, cnt, hash); hmapx_destroy (&hmapx); } } } check (permutation_cnt == factorial (cnt)); free (values); free (changed_values); free (elements); free (nodes); } } static void test_change_random_hash (void) { test_change (random_hash); } static void test_change_identity_hash (void) { test_change (identity_hash); } static void test_change_constant_hash (void) { test_change (constant_hash); } static void test_swap (int max_elems, hash_function *hash) { struct element *elements; int *values; struct hmapx a, b; struct hmapx *working, *empty; int i; hmapx_init (&a); hmapx_init (&b); working = &a; empty = &b; elements = xnmalloc (max_elems, sizeof *elements); values = xnmalloc (max_elems, sizeof *values); for (i = 0; i < max_elems; i++) { struct hmapx *tmp; values[i] = elements[i].data = i; hmapx_insert (working, &elements[i], hash (elements[i].data)); check_hmapx (working, values, i + 1, hash); check_hmapx (empty, NULL, 0, hash); hmapx_swap (&a, &b); tmp = working; working = empty; empty = tmp; } hmapx_destroy (&a); hmapx_destroy (&b); free (elements); free (values); } static void test_swap_random_hash (void) { test_swap (128, random_hash); } /* Inserts elements into an HMAPX in ascending order, then clears the hash table using hmapx_clear(). */ static void test_clear (void) { const int max_elems = 128; struct element *elements; struct hmapx_node **nodes; int *values; struct hmapx hmapx; int cnt; elements = xnmalloc (max_elems, sizeof *elements); nodes = xnmalloc (max_elems, sizeof *nodes); values = xnmalloc (max_elems, sizeof *values); hmapx_init (&hmapx); for (cnt = 0; cnt <= max_elems; cnt++) { int i; for (i = 0; i < cnt; i++) { values[i] = elements[i].data = i; nodes[i] = hmapx_insert (&hmapx, &elements[i], random_hash (elements[i].data)); check_hmapx (&hmapx, values, i + 1, random_hash); } hmapx_clear (&hmapx); check_hmapx (&hmapx, NULL, 0, random_hash); } hmapx_destroy (&hmapx); free (elements); free (nodes); free (values); } static void test_destroy_null (void) { hmapx_destroy (NULL); } /* Test shrinking an empty hash table. */ static void test_shrink_empty (void) { struct hmapx hmapx; hmapx_init (&hmapx); hmapx_reserve (&hmapx, 123); hmapx_shrink (&hmapx); hmapx_destroy (&hmapx); } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "insert-any-remove-any-random-hash", "insert any order, delete any order (random hash)", test_insert_any_remove_any_random_hash }, { "insert-any-remove-any-identity-hash", "insert any order, delete any order (identity hash)", test_insert_any_remove_any_identity_hash }, { "insert-any-remove-any-constant-hash", "insert any order, delete any order (constant hash)", test_insert_any_remove_any_constant_hash }, { "insert-any-remove-same-random-hash", "insert any order, delete same order (random hash)", test_insert_any_remove_same_random_hash }, { "insert-any-remove-same-identity-hash", "insert any order, delete same order (identity hash)", test_insert_any_remove_same_identity_hash }, { "insert-any-remove-same-constant-hash", "insert any order, delete same order (constant hash)", test_insert_any_remove_same_constant_hash }, { "insert-any-remove-reverse-random-hash", "insert any order, delete reverse order (random hash)", test_insert_any_remove_reverse_random_hash }, { "insert-any-remove-reverse-identity-hash", "insert any order, delete reverse order (identity hash)", test_insert_any_remove_reverse_identity_hash }, { "insert-any-remove-reverse-constant-hash", "insert any order, delete reverse order (constant hash)", test_insert_any_remove_reverse_constant_hash }, { "random-sequence-random-hash", "insert and delete in random sequence (random hash)", test_random_sequence_random_hash }, { "random-sequence-identity-hash", "insert and delete in random sequence (identity hash)", test_random_sequence_identity_hash }, { "random-sequence-constant-hash", "insert and delete in random sequence (constant hash)", test_random_sequence_constant_hash }, { "insert-ordered-random-hash", "insert in ascending order (random hash)", test_insert_ordered_random_hash }, { "insert-ordered-identity-hash", "insert in ascending order (identity hash)", test_insert_ordered_identity_hash }, { "insert-ordered-constant-hash", "insert in ascending order (constant hash)", test_insert_ordered_constant_hash }, { "moved-random-hash", "move elements around in memory (random hash)", test_moved_random_hash }, { "moved-identity-hash", "move elements around in memory (identity hash)", test_moved_identity_hash }, { "moved-constant-hash", "move elements around in memory (constant hash)", test_moved_constant_hash }, { "changed-random-hash", "change key data in nodes (random hash)", test_changed_random_hash }, { "changed-identity-hash", "change key data in nodes (identity hash)", test_changed_identity_hash }, { "changed-constant-hash", "change key data in nodes (constant hash)", test_changed_constant_hash }, { "change-random-hash", "change and move key data in nodes (random hash)", test_change_random_hash }, { "change-identity-hash", "change and move key data in nodes (identity hash)", test_change_identity_hash }, { "change-constant-hash", "change and move key data in nodes (constant hash)", test_change_constant_hash }, { "swap-random-hash", "test swapping tables", test_swap_random_hash }, { "clear", "test clearing hash table", test_clear }, { "destroy-null", "test destroying null table", test_destroy_null }, { "shrink-empty", "test shrinking an empty table", test_shrink_empty }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test hash map of pointers\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/ll-test.c0000644000175000017500000016137312470242646014001 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This is a test program for the ll_* routines defined in ll.c. This test program aims to be as comprehensive as possible. "gcov -b" should report 100% coverage of lines and branches in the ll_* routines. "valgrind --leak-check=yes --show-reachable=yes" should give a clean report. This test program depends only on ll.c and the standard C library. See llx-test.c for a similar program for the llx_* routines. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include /* Support preliminaries. */ #if __GNUC__ >= 2 && !defined UNUSED #define UNUSED __attribute__ ((unused)) #else #define UNUSED #endif /* Exit with a failure code. (Place a breakpoint on this function while debugging.) */ static void check_die (void) { exit (EXIT_FAILURE); } /* If OK is not true, prints a message about failure on the current source file and the given LINE and terminates. */ static void check_func (bool ok, int line) { if (!ok) { fprintf (stderr, "%s:%d: check failed\n", __FILE__, line); check_die (); } } /* Verifies that EXPR evaluates to true. If not, prints a message citing the calling line number and terminates. */ #define check(EXPR) check_func ((EXPR), __LINE__) /* Prints a message about memory exhaustion and exits with a failure code. */ static void xalloc_die (void) { printf ("virtual memory exhausted\n"); exit (EXIT_FAILURE); } /* Allocates and returns N bytes of memory. */ static void * xmalloc (size_t n) { if (n != 0) { void *p = malloc (n); if (p == NULL) xalloc_die (); return p; } else return NULL; } /* Allocates and returns N * M bytes of memory. */ static void * xnmalloc (size_t n, size_t m) { if ((size_t) -1 / m <= n) xalloc_die (); return xmalloc (n * m); } /* List type and support routines. */ /* Test data element. */ struct element { struct ll ll; /* Embedded list element. */ int x; /* Primary value. */ int y; /* Secondary value. */ }; static int aux_data; /* Returns the `struct element' that LL is embedded within. */ static struct element * ll_to_element (const struct ll *ll) { return ll_data (ll, struct element, ll); } /* Prints the elements in LIST. */ static void UNUSED print_list (struct ll_list *list) { struct ll *x; printf ("list:"); for (x = ll_head (list); x != ll_null (list); x = ll_next (x)) { struct element *e = ll_to_element (x); printf (" %d", e->x); } printf ("\n"); } /* Prints the value returned by PREDICATE given auxiliary data AUX for each element in LIST. */ static void UNUSED print_pred (struct ll_list *list, ll_predicate_func *predicate, void *aux UNUSED) { struct ll *x; printf ("pred:"); for (x = ll_head (list); x != ll_null (list); x = ll_next (x)) printf (" %d", predicate (x, aux)); printf ("\n"); } /* Prints the CNT numbers in VALUES. */ static void UNUSED print_array (int values[], size_t cnt) { size_t i; printf ("arry:"); for (i = 0; i < cnt; i++) printf (" %d", values[i]); printf ("\n"); } /* Compares the `x' values in A and B and returns a strcmp-type return value. Verifies that AUX points to aux_data. */ static int compare_elements (const struct ll *a_, const struct ll *b_, void *aux) { const struct element *a = ll_to_element (a_); const struct element *b = ll_to_element (b_); check (aux == &aux_data); return a->x < b->x ? -1 : a->x > b->x; } /* Compares the `x' and `y' values in A and B and returns a strcmp-type return value. Verifies that AUX points to aux_data. */ static int compare_elements_x_y (const struct ll *a_, const struct ll *b_, void *aux) { const struct element *a = ll_to_element (a_); const struct element *b = ll_to_element (b_); check (aux == &aux_data); if (a->x != b->x) return a->x < b->x ? -1 : 1; else if (a->y != b->y) return a->y < b->y ? -1 : 1; else return 0; } /* Compares the `y' values in A and B and returns a strcmp-type return value. Verifies that AUX points to aux_data. */ static int compare_elements_y (const struct ll *a_, const struct ll *b_, void *aux) { const struct element *a = ll_to_element (a_); const struct element *b = ll_to_element (b_); check (aux == &aux_data); return a->y < b->y ? -1 : a->y > b->y; } /* Returns true if the bit in *PATTERN indicated by `x in *ELEMENT is set, false otherwise. */ static bool pattern_pred (const struct ll *element_, void *pattern_) { const struct element *element = ll_to_element (element_); unsigned int *pattern = pattern_; return (*pattern & (1u << element->x)) != 0; } /* Allocates N elements in *ELEMS. Adds the elements to LIST, if it is nonnull. Puts pointers to the elements' list elements in *ELEMP, followed by a pointer to the list null element, if ELEMP is nonnull. Allocates space for N values in *VALUES, if VALUES is nonnull. */ static void allocate_elements (size_t n, struct ll_list *list, struct element ***elems, struct ll ***elemp, int **values) { size_t i; if (list != NULL) ll_init (list); *elems = xnmalloc (n, sizeof **elems); for (i = 0; i < n; i++) { (*elems)[i] = xmalloc (sizeof ***elems); if (list != NULL) ll_push_tail (list, &(*elems)[i]->ll); } if (elemp != NULL) { *elemp = xnmalloc (n + 1, sizeof *elemp); for (i = 0; i < n; i++) (*elemp)[i] = &(*elems)[i]->ll; (*elemp)[n] = ll_null (list); } if (values != NULL) *values = xnmalloc (n, sizeof *values); } /* Copies the CNT values of `x' from LIST into VALUES[]. */ static void extract_values (struct ll_list *list, int values[], size_t cnt) { struct ll *x; check (ll_count (list) == cnt); for (x = ll_head (list); x != ll_null (list); x = ll_next (x)) { struct element *e = ll_to_element (x); *values++ = e->x; } } /* As allocate_elements, but sets ascending values, starting from 0, in `x' values in *ELEMS and in *VALUES (if nonnull). */ static void allocate_ascending (size_t n, struct ll_list *list, struct element ***elems, struct ll ***elemp, int **values) { size_t i; allocate_elements (n, list, elems, elemp, values); for (i = 0; i < n; i++) (*elems)[i]->x = i; if (values != NULL) extract_values (list, *values, n); } /* As allocate_elements, but sets binary values extracted from successive bits in PATTERN in `x' values in *ELEMS and in *VALUES (if nonnull). */ static void allocate_pattern (size_t n, int pattern, struct ll_list *list, struct element ***elems, struct ll ***elemp, int **values) { size_t i; allocate_elements (n, list, elems, elemp, values); for (i = 0; i < n; i++) (*elems)[i]->x = (pattern & (1 << i)) != 0; if (values != NULL) extract_values (list, *values, n); } /* Randomly shuffles the CNT elements in ARRAY, each of which is SIZE bytes in size. */ static void random_shuffle (void *array_, size_t cnt, size_t size) { char *array = array_; char *tmp = xmalloc (size); size_t i; for (i = 0; i < cnt; i++) { size_t j = rand () % (cnt - i) + i; if (i != j) { memcpy (tmp, array + j * size, size); memcpy (array + j * size, array + i * size, size); memcpy (array + i * size, tmp, size); } } free (tmp); } /* As allocate_ascending, but orders the values randomly. */ static void allocate_random (size_t n, struct ll_list *list, struct element ***elems, struct ll ***elemp, int **values) { size_t i; allocate_elements (n, list, elems, elemp, values); for (i = 0; i < n; i++) (*elems)[i]->x = i; random_shuffle (*elems, n, sizeof **elems); if (values != NULL) extract_values (list, *values, n); } /* Frees the N elements of ELEMS, ELEMP, and VALUES. */ static void free_elements (size_t n, struct element **elems, struct ll **elemp, int *values) { size_t i; for (i = 0; i < n; i++) free (elems[i]); free (elems); free (elemp); free (values); } /* Compares A and B and returns a strcmp-type return value. */ static int compare_ints (const void *a_, const void *b_, void *aux UNUSED) { const int *a = a_; const int *b = b_; return *a < *b ? -1 : *a > *b; } /* Compares A and B and returns a strcmp-type return value. */ static int compare_ints_noaux (const void *a_, const void *b_) { const int *a = a_; const int *b = b_; return *a < *b ? -1 : *a > *b; } /* Checks that LIST contains the CNT values in ELEMENTS. */ static void check_list_contents (struct ll_list *list, int elements[], size_t cnt) { struct ll *ll; size_t i; check ((cnt == 0) == ll_is_empty (list)); /* Iterate in forward order. */ for (ll = ll_head (list), i = 0; i < cnt; ll = ll_next (ll), i++) { struct element *e = ll_to_element (ll); check (elements[i] == e->x); check (ll != ll_null (list)); } check (ll == ll_null (list)); /* Iterate in reverse order. */ for (ll = ll_tail (list), i = 0; i < cnt; ll = ll_prev (ll), i++) { struct element *e = ll_to_element (ll); check (elements[cnt - i - 1] == e->x); check (ll != ll_null (list)); } check (ll == ll_null (list)); check (ll_count (list) == cnt); } /* Lexicographically compares ARRAY1, which contains COUNT1 elements of SIZE bytes each, to ARRAY2, which contains COUNT2 elements of SIZE bytes, according to COMPARE. Returns a strcmp-type result. AUX is passed to COMPARE as auxiliary data. */ static int lexicographical_compare_3way (const void *array1, size_t count1, const void *array2, size_t count2, size_t size, int (*compare) (const void *, const void *, void *aux), void *aux) { const char *first1 = array1; const char *first2 = array2; size_t min_count = count1 < count2 ? count1 : count2; while (min_count > 0) { int cmp = compare (first1, first2, aux); if (cmp != 0) return cmp; first1 += size; first2 += size; min_count--; } return count1 < count2 ? -1 : count1 > count2; } /* Tests. */ /* Tests list push and pop operations. */ static void test_push_pop (void) { const int max_elems = 1024; struct ll_list list; struct element **elems; int *values; int i; allocate_elements (max_elems, NULL, &elems, NULL, &values); /* Push on tail. */ ll_init (&list); check_list_contents (&list, NULL, 0); for (i = 0; i < max_elems; i++) { values[i] = elems[i]->x = i; ll_push_tail (&list, &elems[i]->ll); check_list_contents (&list, values, i + 1); } /* Remove from tail. */ for (i = 0; i < max_elems; i++) { struct element *e = ll_to_element (ll_pop_tail (&list)); check (e->x == max_elems - i - 1); check_list_contents (&list, values, max_elems - i - 1); } /* Push at start. */ check_list_contents (&list, NULL, 0); for (i = 0; i < max_elems; i++) { values[max_elems - i - 1] = elems[i]->x = max_elems - i - 1; ll_push_head (&list, &elems[i]->ll); check_list_contents (&list, &values[max_elems - i - 1], i + 1); } /* Remove from start. */ for (i = 0; i < max_elems; i++) { struct element *e = ll_to_element (ll_pop_head (&list)); check (e->x == (int) i); check_list_contents (&list, &values[i + 1], max_elems - i - 1); } free_elements (max_elems, elems, NULL, values); } /* Tests insertion and removal at arbitrary positions. */ static void test_insert_remove (void) { const int max_elems = 16; int cnt; for (cnt = 0; cnt < max_elems; cnt++) { struct element **elems; struct ll **elemp; int *values = xnmalloc (cnt + 1, sizeof *values); struct ll_list list; struct element extra; int pos; allocate_ascending (cnt, &list, &elems, &elemp, NULL); extra.x = -1; for (pos = 0; pos <= cnt; pos++) { int i, j; ll_insert (elemp[pos], &extra.ll); j = 0; for (i = 0; i < pos; i++) values[j++] = i; values[j++] = -1; for (; i < cnt; i++) values[j++] = i; check_list_contents (&list, values, cnt + 1); ll_remove (&extra.ll); } check_list_contents (&list, values, cnt); free_elements (cnt, elems, elemp, values); } } /* Tests swapping individual elements. */ static void test_swap (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct ll_list list; struct element **elems; int *values; int i, j, k; allocate_ascending (cnt, &list, &elems, NULL, &values); check_list_contents (&list, values, cnt); for (i = 0; i < cnt; i++) for (j = 0; j < cnt; j++) for (k = 0; k < 2; k++) { int t; ll_swap (&elems[i]->ll, &elems[j]->ll); t = values[i]; values[i] = values[j]; values[j] = t; check_list_contents (&list, values, cnt); } free_elements (cnt, elems, NULL, values); } } /* Tests swapping ranges of list elements. */ static void test_swap_range (void) { const int max_elems = 8; int cnt, a0, a1, b0, b1, r; for (cnt = 0; cnt <= max_elems; cnt++) for (a0 = 0; a0 <= cnt; a0++) for (a1 = a0; a1 <= cnt; a1++) for (b0 = a1; b0 <= cnt; b0++) for (b1 = b0; b1 <= cnt; b1++) for (r = 0; r < 2; r++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; int i, j; allocate_ascending (cnt, &list, &elems, &elemp, &values); check_list_contents (&list, values, cnt); j = 0; for (i = 0; i < a0; i++) values[j++] = i; for (i = b0; i < b1; i++) values[j++] = i; for (i = a1; i < b0; i++) values[j++] = i; for (i = a0; i < a1; i++) values[j++] = i; for (i = b1; i < cnt; i++) values[j++] = i; check (j == cnt); if (r == 0) ll_swap_range (elemp[a0], elemp[a1], elemp[b0], elemp[b1]); else ll_swap_range (elemp[b0], elemp[b1], elemp[a0], elemp[a1]); check_list_contents (&list, values, cnt); free_elements (cnt, elems, elemp, values); } } /* Tests removing ranges of list elements. */ static void test_remove_range (void) { const int max_elems = 8; int cnt, r0, r1; for (cnt = 0; cnt <= max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; int i, j; allocate_ascending (cnt, &list, &elems, &elemp, &values); check_list_contents (&list, values, cnt); j = 0; for (i = 0; i < r0; i++) values[j++] = i; for (i = r1; i < cnt; i++) values[j++] = i; ll_remove_range (elemp[r0], elemp[r1]); check_list_contents (&list, values, j); free_elements (cnt, elems, elemp, values); } } /* Tests ll_remove_equal. */ static void test_remove_equal (void) { const int max_elems = 8; int cnt, r0, r1, eq_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) for (eq_pat = 0; eq_pat <= 1 << cnt; eq_pat++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; struct element to_remove; int remaining; int i; allocate_elements (cnt, &list, &elems, &elemp, &values); remaining = 0; for (i = 0; i < cnt; i++) { int x = eq_pat & (1 << i) ? -1 : i; bool delete = x == -1 && r0 <= i && i < r1; elems[i]->x = x; if (!delete) values[remaining++] = x; } to_remove.x = -1; check ((int) ll_remove_equal (elemp[r0], elemp[r1], &to_remove.ll, compare_elements, &aux_data) == cnt - remaining); check_list_contents (&list, values, remaining); free_elements (cnt, elems, elemp, values); } } /* Tests ll_remove_if. */ static void test_remove_if (void) { const int max_elems = 8; int cnt, r0, r1, pattern; for (cnt = 0; cnt <= max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) for (pattern = 0; pattern <= 1 << cnt; pattern++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; int remaining; int i; allocate_elements (cnt, &list, &elems, &elemp, &values); remaining = 0; for (i = 0; i < cnt; i++) { bool delete = (pattern & (1 << i)) && r0 <= i && i < r1; elems[i]->x = i; if (!delete) values[remaining++] = i; } check ((int) ll_remove_if (elemp[r0], elemp[r1], pattern_pred, &pattern) == cnt - remaining); check_list_contents (&list, values, remaining); free_elements (cnt, elems, elemp, values); } } /* Tests ll_moved. */ static void test_moved (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct ll_list list; struct element **elems; struct element **new_elems; int *values; int i; allocate_ascending (cnt, &list, &elems, NULL, &values); allocate_elements (cnt, NULL, &new_elems, NULL, NULL); check_list_contents (&list, values, cnt); for (i = 0; i < cnt; i++) { *new_elems[i] = *elems[i]; ll_moved (&new_elems[i]->ll); check_list_contents (&list, values, cnt); } free_elements (cnt, elems, NULL, values); free_elements (cnt, new_elems, NULL, NULL); } } /* Tests, via HELPER, a function that looks at list elements equal to some specified element. */ static void test_examine_equal_range (void (*helper) (int r0, int r1, int eq_pat, struct ll *to_find, struct ll **elemp)) { const int max_elems = 8; int cnt, r0, r1, eq_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (eq_pat = 0; eq_pat <= 1 << cnt; eq_pat++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; struct element to_find; int i; allocate_ascending (cnt, &list, &elems, &elemp, &values); for (i = 0; i < cnt; i++) if (eq_pat & (1 << i)) values[i] = elems[i]->x = -1; to_find.x = -1; for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) helper (r0, r1, eq_pat, &to_find.ll, elemp); check_list_contents (&list, values, cnt); free_elements (cnt, elems, elemp, values); } } /* Tests, via HELPER, a function that looks at list elements for which a given predicate returns true. */ static void test_examine_if_range (void (*helper) (int r0, int r1, int eq_pat, struct ll **elemp)) { const int max_elems = 8; int cnt, r0, r1, eq_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (eq_pat = 0; eq_pat <= 1 << cnt; eq_pat++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; allocate_ascending (cnt, &list, &elems, &elemp, &values); for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) helper (r0, r1, eq_pat, elemp); check_list_contents (&list, values, cnt); free_elements (cnt, elems, elemp, values); } } /* Helper function for testing ll_find_equal. */ static void test_find_equal_helper (int r0, int r1, int eq_pat, struct ll *to_find, struct ll **elemp) { struct ll *match; int i; match = ll_find_equal (elemp[r0], elemp[r1], to_find, compare_elements, &aux_data); for (i = r0; i < r1; i++) if (eq_pat & (1 << i)) break; check (match == elemp[i]); } /* Tests ll_find_equal. */ static void test_find_equal (void) { test_examine_equal_range (test_find_equal_helper); } /* Helper function for testing ll_find_if. */ static void test_find_if_helper (int r0, int r1, int eq_pat, struct ll **elemp) { struct ll *match = ll_find_if (elemp[r0], elemp[r1], pattern_pred, &eq_pat); int i; for (i = r0; i < r1; i++) if (eq_pat & (1 << i)) break; check (match == elemp[i]); } /* Tests ll_find_if. */ static void test_find_if (void) { test_examine_if_range (test_find_if_helper); } /* Tests ll_find_adjacent_equal. */ static void test_find_adjacent_equal (void) { const int max_elems = 8; int cnt, eq_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (eq_pat = 0; eq_pat <= 1 << cnt; eq_pat++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; int match; int i; allocate_ascending (cnt, &list, &elems, &elemp, &values); match = -1; for (i = 0; i < cnt - 1; i++) { elems[i]->y = i; if (eq_pat & (1 << i)) { values[i] = elems[i]->x = match; values[i + 1] = elems[i + 1]->x = match; } else match--; } for (i = 0; i <= cnt; i++) { struct ll *ll1 = ll_find_adjacent_equal (elemp[i], ll_null (&list), compare_elements, &aux_data); struct ll *ll2; int j; ll2 = ll_null (&list); for (j = i; j < cnt - 1; j++) if (eq_pat & (1 << j)) { ll2 = elemp[j]; break; } check (ll1 == ll2); } check_list_contents (&list, values, cnt); free_elements (cnt, elems, elemp, values); } } /* Helper function for testing ll_count_range. */ static void test_count_range_helper (int r0, int r1, int eq_pat UNUSED, struct ll **elemp) { check ((int) ll_count_range (elemp[r0], elemp[r1]) == r1 - r0); } /* Tests ll_count_range. */ static void test_count_range (void) { test_examine_if_range (test_count_range_helper); } /* Helper function for testing ll_count_equal. */ static void test_count_equal_helper (int r0, int r1, int eq_pat, struct ll *to_find, struct ll **elemp) { int count1, count2; int i; count1 = ll_count_equal (elemp[r0], elemp[r1], to_find, compare_elements, &aux_data); count2 = 0; for (i = r0; i < r1; i++) if (eq_pat & (1 << i)) count2++; check (count1 == count2); } /* Tests ll_count_equal. */ static void test_count_equal (void) { test_examine_equal_range (test_count_equal_helper); } /* Helper function for testing ll_count_if. */ static void test_count_if_helper (int r0, int r1, int eq_pat, struct ll **elemp) { int count1; int count2; int i; count1 = ll_count_if (elemp[r0], elemp[r1], pattern_pred, &eq_pat); count2 = 0; for (i = r0; i < r1; i++) if (eq_pat & (1 << i)) count2++; check (count1 == count2); } /* Tests ll_count_if. */ static void test_count_if (void) { test_examine_if_range (test_count_if_helper); } /* Returns N!. */ static unsigned int factorial (unsigned int n) { unsigned int value = 1; while (n > 1) value *= n--; return value; } /* Returns the number of permutations of the CNT values in VALUES. If VALUES contains duplicates, they must be adjacent. */ static unsigned int expected_perms (int *values, size_t cnt) { size_t i, j; unsigned int perm_cnt; perm_cnt = factorial (cnt); for (i = 0; i < cnt; i = j) { for (j = i + 1; j < cnt; j++) if (values[i] != values[j]) break; perm_cnt /= factorial (j - i); } return perm_cnt; } /* Tests ll_min and ll_max. */ static void test_min_max (void) { const int max_elems = 6; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; int *new_values = xnmalloc (cnt, sizeof *values); size_t perm_cnt; allocate_ascending (cnt, &list, &elems, &elemp, &values); perm_cnt = 1; while (ll_next_permutation (ll_head (&list), ll_null (&list), compare_elements, &aux_data)) { int r0, r1; struct ll *x; int i; for (i = 0, x = ll_head (&list); x != ll_null (&list); x = ll_next (x), i++) { struct element *e = ll_to_element (x); elemp[i] = x; new_values[i] = e->x; } for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) { struct ll *min = ll_min (elemp[r0], elemp[r1], compare_elements, &aux_data); struct ll *max = ll_max (elemp[r0], elemp[r1], compare_elements, &aux_data); if (r0 == r1) { check (min == elemp[r1]); check (max == elemp[r1]); } else { int min_int, max_int; int i; min_int = max_int = new_values[r0]; for (i = r0; i < r1; i++) { int value = new_values[i]; if (value < min_int) min_int = value; if (value > max_int) max_int = value; } check (min != elemp[r1] && ll_to_element (min)->x == min_int); check (max != elemp[r1] && ll_to_element (max)->x == max_int); } } perm_cnt++; } check (perm_cnt == factorial (cnt)); check_list_contents (&list, values, cnt); free_elements (cnt, elems, elemp, values); free (new_values); } } /* Tests ll_lexicographical_compare_3way. */ static void test_lexicographical_compare_3way (void) { const int max_elems = 4; int cnt_a, pat_a, cnt_b, pat_b; for (cnt_a = 0; cnt_a <= max_elems; cnt_a++) for (pat_a = 0; pat_a <= 1 << cnt_a; pat_a++) for (cnt_b = 0; cnt_b <= max_elems; cnt_b++) for (pat_b = 0; pat_b <= 1 << cnt_b; pat_b++) { struct ll_list list_a, list_b; struct element **elems_a, **elems_b; struct ll **elemp_a, **elemp_b; int *values_a, *values_b; int a0, a1, b0, b1; allocate_pattern (cnt_a, pat_a, &list_a, &elems_a, &elemp_a, &values_a); allocate_pattern (cnt_b, pat_b, &list_b, &elems_b, &elemp_b, &values_b); for (a0 = 0; a0 <= cnt_a; a0++) for (a1 = a0; a1 <= cnt_a; a1++) for (b0 = 0; b0 <= cnt_b; b0++) for (b1 = b0; b1 <= cnt_b; b1++) { int a_ordering = lexicographical_compare_3way ( values_a + a0, a1 - a0, values_b + b0, b1 - b0, sizeof *values_a, compare_ints, NULL); int b_ordering = ll_lexicographical_compare_3way ( elemp_a[a0], elemp_a[a1], elemp_b[b0], elemp_b[b1], compare_elements, &aux_data); check (a_ordering == b_ordering); } free_elements (cnt_a, elems_a, elemp_a, values_a); free_elements (cnt_b, elems_b, elemp_b, values_b); } } /* Appends the `x' value in element E to the array pointed to by NEXT_OUTPUT, and advances NEXT_OUTPUT to the next position. */ static void apply_func (struct ll *e_, void *next_output_) { struct element *e = ll_to_element (e_); int **next_output = next_output_; *(*next_output)++ = e->x; } /* Tests ll_apply. */ static void test_apply (void) { const int max_elems = 8; int cnt, r0, r1; for (cnt = 0; cnt <= max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; int *output; int *next_output; int i; allocate_ascending (cnt, &list, &elems, &elemp, &values); check_list_contents (&list, values, cnt); output = next_output = xnmalloc (cnt, sizeof *output); ll_apply (elemp[r0], elemp[r1], apply_func, &next_output); check_list_contents (&list, values, cnt); check (r1 - r0 == next_output - output); for (i = 0; i < r1 - r0; i++) check (output[i] == r0 + i); free_elements (cnt, elems, elemp, values); free (output); } } /* Tests ll_reverse. */ static void test_reverse (void) { const int max_elems = 8; int cnt, r0, r1; for (cnt = 0; cnt <= max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; int i, j; allocate_ascending (cnt, &list, &elems, &elemp, &values); check_list_contents (&list, values, cnt); j = 0; for (i = 0; i < r0; i++) values[j++] = i; for (i = r1 - 1; i >= r0; i--) values[j++] = i; for (i = r1; i < cnt; i++) values[j++] = i; ll_reverse (elemp[r0], elemp[r1]); check_list_contents (&list, values, cnt); free_elements (cnt, elems, elemp, values); } } /* Tests ll_next_permutation and ll_prev_permutation when the permuted values have no duplicates. */ static void test_permutations_no_dups (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct ll_list list; struct element **elems; int *values; int *old_values = xnmalloc (cnt, sizeof *values); int *new_values = xnmalloc (cnt, sizeof *values); size_t perm_cnt; allocate_ascending (cnt, &list, &elems, NULL, &values); perm_cnt = 1; extract_values (&list, old_values, cnt); while (ll_next_permutation (ll_head (&list), ll_null (&list), compare_elements, &aux_data)) { extract_values (&list, new_values, cnt); check (lexicographical_compare_3way (new_values, cnt, old_values, cnt, sizeof *new_values, compare_ints, NULL) > 0); memcpy (old_values, new_values, (cnt) * sizeof *old_values); perm_cnt++; } check (perm_cnt == factorial (cnt)); check_list_contents (&list, values, cnt); perm_cnt = 1; ll_reverse (ll_head (&list), ll_null (&list)); extract_values (&list, old_values, cnt); while (ll_prev_permutation (ll_head (&list), ll_null (&list), compare_elements, &aux_data)) { extract_values (&list, new_values, cnt); check (lexicographical_compare_3way (new_values, cnt, old_values, cnt, sizeof *new_values, compare_ints, NULL) < 0); memcpy (old_values, new_values, (cnt) * sizeof *old_values); perm_cnt++; } check (perm_cnt == factorial (cnt)); ll_reverse (ll_head (&list), ll_null (&list)); check_list_contents (&list, values, cnt); free_elements (cnt, elems, NULL, values); free (old_values); free (new_values); } } /* Tests ll_next_permutation and ll_prev_permutation when the permuted values contain duplicates. */ static void test_permutations_with_dups (void) { const int max_elems = 8; const int max_dup = 3; const int repetitions = 1024; int cnt, repeat; for (repeat = 0; repeat < repetitions; repeat++) for (cnt = 0; cnt < max_elems; cnt++) { struct ll_list list; struct element **elems; int *values; int *old_values = xnmalloc (max_elems, sizeof *values); int *new_values = xnmalloc (max_elems, sizeof *values); unsigned int permutation_cnt; int left = cnt; int value = 0; allocate_elements (cnt, &list, &elems, NULL, &values); value = 0; while (left > 0) { int max = left < max_dup ? left : max_dup; int n = rand () % max + 1; while (n-- > 0) { int idx = cnt - left--; values[idx] = elems[idx]->x = value; } value++; } permutation_cnt = 1; extract_values (&list, old_values, cnt); while (ll_next_permutation (ll_head (&list), ll_null (&list), compare_elements, &aux_data)) { extract_values (&list, new_values, cnt); check (lexicographical_compare_3way (new_values, cnt, old_values, cnt, sizeof *new_values, compare_ints, NULL) > 0); memcpy (old_values, new_values, cnt * sizeof *old_values); permutation_cnt++; } check (permutation_cnt == expected_perms (values, cnt)); check_list_contents (&list, values, cnt); permutation_cnt = 1; ll_reverse (ll_head (&list), ll_null (&list)); extract_values (&list, old_values, cnt); while (ll_prev_permutation (ll_head (&list), ll_null (&list), compare_elements, &aux_data)) { extract_values (&list, new_values, cnt); check (lexicographical_compare_3way (new_values, cnt, old_values, cnt, sizeof *new_values, compare_ints, NULL) < 0); permutation_cnt++; } ll_reverse (ll_head (&list), ll_null (&list)); check (permutation_cnt == expected_perms (values, cnt)); check_list_contents (&list, values, cnt); free_elements (cnt, elems, NULL, values); free (old_values); free (new_values); } } /* Tests ll_merge when no equal values are to be merged. */ static void test_merge_no_dups (void) { const int max_elems = 8; const int max_filler = 3; int merge_cnt, pattern, pfx, gap, sfx, order; for (merge_cnt = 0; merge_cnt < max_elems; merge_cnt++) for (pattern = 0; pattern <= (1 << merge_cnt); pattern++) for (pfx = 0; pfx < max_filler; pfx++) for (gap = 0; gap < max_filler; gap++) for (sfx = 0; sfx < max_filler; sfx++) for (order = 0; order < 2; order++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; int list_cnt = pfx + merge_cnt + gap + sfx; int a0, a1, b0, b1; int i, j; allocate_elements (list_cnt, &list, &elems, &elemp, &values); j = 0; for (i = 0; i < pfx; i++) elems[j++]->x = 100 + i; a0 = j; for (i = 0; i < merge_cnt; i++) if (pattern & (1u << i)) elems[j++]->x = i; a1 = j; for (i = 0; i < gap; i++) elems[j++]->x = 200 + i; b0 = j; for (i = 0; i < merge_cnt; i++) if (!(pattern & (1u << i))) elems[j++]->x = i; b1 = j; for (i = 0; i < sfx; i++) elems[j++]->x = 300 + i; check (list_cnt == j); j = 0; for (i = 0; i < pfx; i++) values[j++] = 100 + i; if (order == 0) for (i = 0; i < merge_cnt; i++) values[j++] = i; for (i = 0; i < gap; i++) values[j++] = 200 + i; if (order == 1) for (i = 0; i < merge_cnt; i++) values[j++] = i; for (i = 0; i < sfx; i++) values[j++] = 300 + i; check (list_cnt == j); if (order == 0) ll_merge (elemp[a0], elemp[a1], elemp[b0], elemp[b1], compare_elements, &aux_data); else ll_merge (elemp[b0], elemp[b1], elemp[a0], elemp[a1], compare_elements, &aux_data); check_list_contents (&list, values, list_cnt); free_elements (list_cnt, elems, elemp, values); } } /* Tests ll_merge when equal values are to be merged. */ static void test_merge_with_dups (void) { const int max_elems = 8; int cnt, merge_pat, inc_pat, order; for (cnt = 0; cnt <= max_elems; cnt++) for (merge_pat = 0; merge_pat <= (1 << cnt); merge_pat++) for (inc_pat = 0; inc_pat <= (1 << cnt); inc_pat++) for (order = 0; order < 2; order++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; int mid; int i, j, k; allocate_elements (cnt, &list, &elems, &elemp, &values); j = 0; for (i = k = 0; i < cnt; i++) { if (merge_pat & (1u << i)) elems[j++]->x = k; if (inc_pat & (1u << i)) k++; } mid = j; for (i = k = 0; i < cnt; i++) { if (!(merge_pat & (1u << i))) elems[j++]->x = k; if (inc_pat & (1u << i)) k++; } check (cnt == j); if (order == 0) { for (i = 0; i < cnt; i++) elems[i]->y = i; } else { for (i = 0; i < mid; i++) elems[i]->y = 100 + i; for (i = mid; i < cnt; i++) elems[i]->y = i; } j = 0; for (i = k = 0; i < cnt; i++) { values[j++] = k; if (inc_pat & (1u << i)) k++; } check (cnt == j); if (order == 0) ll_merge (elemp[0], elemp[mid], elemp[mid], elemp[cnt], compare_elements, &aux_data); else ll_merge (elemp[mid], elemp[cnt], elemp[0], elemp[mid], compare_elements, &aux_data); check_list_contents (&list, values, cnt); check (ll_is_sorted (ll_head (&list), ll_null (&list), compare_elements_x_y, &aux_data)); free_elements (cnt, elems, elemp, values); } } /* Tests ll_sort on all permutations up to a maximum number of elements. */ static void test_sort_exhaustive (void) { const int max_elems = 8; int cnt; for (cnt = 0; cnt <= max_elems; cnt++) { struct ll_list list; struct element **elems; int *values; struct element **perm_elems; int *perm_values; size_t perm_cnt; allocate_ascending (cnt, &list, &elems, NULL, &values); allocate_elements (cnt, NULL, &perm_elems, NULL, &perm_values); perm_cnt = 1; while (ll_next_permutation (ll_head (&list), ll_null (&list), compare_elements, &aux_data)) { struct ll_list perm_list; int j; extract_values (&list, perm_values, cnt); ll_init (&perm_list); for (j = 0; j < cnt; j++) { perm_elems[j]->x = perm_values[j]; ll_push_tail (&perm_list, &perm_elems[j]->ll); } ll_sort (ll_head (&perm_list), ll_null (&perm_list), compare_elements, &aux_data); check_list_contents (&perm_list, values, cnt); check (ll_is_sorted (ll_head (&perm_list), ll_null (&perm_list), compare_elements, &aux_data)); perm_cnt++; } check (perm_cnt == factorial (cnt)); free_elements (cnt, elems, NULL, values); free_elements (cnt, perm_elems, NULL, perm_values); } } /* Tests that ll_sort is stable in the presence of equal values. */ static void test_sort_stable (void) { const int max_elems = 6; int cnt, inc_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (inc_pat = 0; inc_pat <= 1 << cnt; inc_pat++) { struct ll_list list; struct element **elems; int *values; struct element **perm_elems; int *perm_values; size_t perm_cnt; int i, j; allocate_elements (cnt, &list, &elems, NULL, &values); allocate_elements (cnt, NULL, &perm_elems, NULL, &perm_values); j = 0; for (i = 0; i < cnt; i++) { elems[i]->x = values[i] = j; if (inc_pat & (1 << i)) j++; elems[i]->y = i; } perm_cnt = 1; while (ll_next_permutation (ll_head (&list), ll_null (&list), compare_elements_y, &aux_data)) { struct ll_list perm_list; extract_values (&list, perm_values, cnt); ll_init (&perm_list); for (i = 0; i < cnt; i++) { perm_elems[i]->x = perm_values[i]; perm_elems[i]->y = i; ll_push_tail (&perm_list, &perm_elems[i]->ll); } ll_sort (ll_head (&perm_list), ll_null (&perm_list), compare_elements, &aux_data); check_list_contents (&perm_list, values, cnt); check (ll_is_sorted (ll_head (&perm_list), ll_null (&perm_list), compare_elements_x_y, &aux_data)); perm_cnt++; } check (perm_cnt == factorial (cnt)); free_elements (cnt, elems, NULL, values); free_elements (cnt, perm_elems, NULL, perm_values); } } /* Tests that ll_sort does not disturb elements outside the range sorted. */ static void test_sort_subset (void) { const int max_elems = 8; int cnt, r0, r1, repeat; for (cnt = 0; cnt <= max_elems; cnt++) for (repeat = 0; repeat < 100; repeat++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; allocate_random (cnt, &list, &elems, &elemp, &values); qsort (&values[r0], r1 - r0, sizeof *values, compare_ints_noaux); ll_sort (elemp[r0], elemp[r1], compare_elements, &aux_data); check_list_contents (&list, values, cnt); free_elements (cnt, elems, elemp, values); } } /* Tests that ll_sort works with large lists. */ static void test_sort_big (void) { const int max_elems = 1024; int cnt; for (cnt = 0; cnt < max_elems; cnt++) { struct ll_list list; struct element **elems; int *values; allocate_random (cnt, &list, &elems, NULL, &values); qsort (values, cnt, sizeof *values, compare_ints_noaux); ll_sort (ll_head (&list), ll_null (&list), compare_elements, &aux_data); check_list_contents (&list, values, cnt); free_elements (cnt, elems, NULL, values); } } /* Tests ll_unique. */ static void test_unique (void) { const int max_elems = 10; int *ascending = xnmalloc (max_elems, sizeof *ascending); int cnt, inc_pat, i, j, unique_values; for (i = 0; i < max_elems; i++) ascending[i] = i; for (cnt = 0; cnt < max_elems; cnt++) for (inc_pat = 0; inc_pat < (1 << cnt); inc_pat++) { struct ll_list list, dups; struct element **elems; int *values; allocate_elements (cnt, &list, &elems, NULL, &values); j = unique_values = 0; for (i = 0; i < cnt; i++) { unique_values = j + 1; elems[i]->x = values[i] = j; if (inc_pat & (1 << i)) j++; } check_list_contents (&list, values, cnt); ll_init (&dups); check (ll_unique (ll_head (&list), ll_null (&list), ll_null (&dups), compare_elements, &aux_data) == (size_t) unique_values); check_list_contents (&list, ascending, unique_values); ll_splice (ll_null (&list), ll_head (&dups), ll_null (&dups)); ll_sort (ll_head (&list), ll_null (&list), compare_elements, &aux_data); check_list_contents (&list, values, cnt); free_elements (cnt, elems, NULL, values); } free (ascending); } /* Tests ll_sort_unique. */ static void test_sort_unique (void) { const int max_elems = 7; int cnt, inc_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (inc_pat = 0; inc_pat <= 1 << cnt; inc_pat++) { struct ll_list list; struct element **elems; int *values; struct element **perm_elems; int *perm_values; int unique_cnt; int *unique_values; size_t perm_cnt; int i, j; allocate_elements (cnt, &list, &elems, NULL, &values); allocate_elements (cnt, NULL, &perm_elems, NULL, &perm_values); j = unique_cnt = 0; for (i = 0; i < cnt; i++) { elems[i]->x = values[i] = j; unique_cnt = j + 1; if (inc_pat & (1 << i)) j++; } unique_values = xnmalloc (unique_cnt, sizeof *unique_values); for (i = 0; i < unique_cnt; i++) unique_values[i] = i; perm_cnt = 1; while (ll_next_permutation (ll_head (&list), ll_null (&list), compare_elements, &aux_data)) { struct ll_list perm_list; extract_values (&list, perm_values, cnt); ll_init (&perm_list); for (i = 0; i < cnt; i++) { perm_elems[i]->x = perm_values[i]; perm_elems[i]->y = i; ll_push_tail (&perm_list, &perm_elems[i]->ll); } ll_sort_unique (ll_head (&perm_list), ll_null (&perm_list), NULL, compare_elements, &aux_data); check_list_contents (&perm_list, unique_values, unique_cnt); check (ll_is_sorted (ll_head (&perm_list), ll_null (&perm_list), compare_elements_x_y, &aux_data)); perm_cnt++; } check (perm_cnt == expected_perms (values, cnt)); free_elements (cnt, elems, NULL, values); free_elements (cnt, perm_elems, NULL, perm_values); free (unique_values); } } /* Tests ll_insert_ordered. */ static void test_insert_ordered (void) { const int max_elems = 6; int cnt, inc_pat; for (cnt = 0; cnt <= max_elems; cnt++) for (inc_pat = 0; inc_pat <= 1 << cnt; inc_pat++) { struct ll_list list; struct element **elems; int *values; struct element **perm_elems; int *perm_values; size_t perm_cnt; int i, j; allocate_elements (cnt, &list, &elems, NULL, &values); allocate_elements (cnt, NULL, &perm_elems, NULL, &perm_values); j = 0; for (i = 0; i < cnt; i++) { elems[i]->x = values[i] = j; if (inc_pat & (1 << i)) j++; elems[i]->y = i; } perm_cnt = 1; while (ll_next_permutation (ll_head (&list), ll_null (&list), compare_elements_y, &aux_data)) { struct ll_list perm_list; extract_values (&list, perm_values, cnt); ll_init (&perm_list); for (i = 0; i < cnt; i++) { perm_elems[i]->x = perm_values[i]; perm_elems[i]->y = i; ll_insert_ordered (ll_head (&perm_list), ll_null (&perm_list), &perm_elems[i]->ll, compare_elements, &aux_data); } check (ll_is_sorted (ll_head (&perm_list), ll_null (&perm_list), compare_elements_x_y, &aux_data)); perm_cnt++; } check (perm_cnt == factorial (cnt)); free_elements (cnt, elems, NULL, values); free_elements (cnt, perm_elems, NULL, perm_values); } } /* Tests ll_partition. */ static void test_partition (void) { const int max_elems = 10; int cnt; unsigned int pbase; int r0, r1; for (cnt = 0; cnt < max_elems; cnt++) for (r0 = 0; r0 <= cnt; r0++) for (r1 = r0; r1 <= cnt; r1++) for (pbase = 0; pbase <= (1u << (r1 - r0)); pbase++) { struct ll_list list; struct element **elems; struct ll **elemp; int *values; unsigned int pattern = pbase << r0; int i, j; int first_false; struct ll *part_ll; allocate_ascending (cnt, &list, &elems, &elemp, &values); /* Check that ll_find_partition works okay in every case. We use it after partitioning, too, but that only tests cases where it returns non-null. */ for (i = r0; i < r1; i++) if (!(pattern & (1u << i))) break; j = i; for (; i < r1; i++) if (pattern & (1u << i)) break; part_ll = ll_find_partition (elemp[r0], elemp[r1], pattern_pred, &pattern); if (i == r1) check (part_ll == elemp[j]); else check (part_ll == NULL); /* Figure out expected results. */ j = 0; first_false = -1; for (i = 0; i < r0; i++) values[j++] = i; for (i = r0; i < r1; i++) if (pattern & (1u << i)) values[j++] = i; for (i = r0; i < r1; i++) if (!(pattern & (1u << i))) { if (first_false == -1) first_false = i; values[j++] = i; } if (first_false == -1) first_false = r1; for (i = r1; i < cnt; i++) values[j++] = i; check (j == cnt); /* Partition and check for expected results. */ check (ll_partition (elemp[r0], elemp[r1], pattern_pred, &pattern) == elemp[first_false]); check (ll_find_partition (elemp[r0], elemp[r1], pattern_pred, &pattern) == elemp[first_false]); check_list_contents (&list, values, cnt); check ((int) ll_count (&list) == cnt); free_elements (cnt, elems, elemp, values); } } /* Main program. */ struct test { const char *name; const char *description; void (*function) (void); }; static const struct test tests[] = { { "push-pop", "push/pop", test_push_pop }, { "insert-remove", "insert/remove", test_insert_remove }, { "swap", "swap", test_swap }, { "swap-range", "swap_range", test_swap_range }, { "remove-range", "remove_range", test_remove_range }, { "remove-equal", "remove_equal", test_remove_equal }, { "remove-if", "remove_if", test_remove_if }, { "moved", "moved", test_moved }, { "find-equal", "find_equal", test_find_equal }, { "find-if", "find_if", test_find_if }, { "find-adjacent-equal", "find_adjacent_equal", test_find_adjacent_equal }, { "count-range", "count_range", test_count_range }, { "count-equal", "count_equal", test_count_equal }, { "count-if", "count_if", test_count_if }, { "min-max", "min/max", test_min_max }, { "lexicographical-compare-3way", "lexicographical_compare_3way", test_lexicographical_compare_3way }, { "apply", "apply", test_apply }, { "reverse", "reverse", test_reverse }, { "permutations-no-dups", "permutations (no dups)", test_permutations_no_dups }, { "permutations-with-dups", "permutations (with dups)", test_permutations_with_dups }, { "merge-no-dups", "merge (no dups)", test_merge_no_dups }, { "merge-with-dups", "merge (with dups)", test_merge_with_dups }, { "sort-exhaustive", "sort (exhaustive)", test_sort_exhaustive }, { "sort-stable", "sort (stability)", test_sort_stable }, { "sort-subset", "sort (subset)", test_sort_subset }, { "sort-big", "sort (big)", test_sort_big }, { "unique", "unique", test_unique }, { "sort-unique", "sort_unique", test_sort_unique }, { "insert-ordered", "insert_ordered", test_insert_ordered }, { "partition", "partition", test_partition }, }; enum { N_TESTS = sizeof tests / sizeof *tests }; int main (int argc, char *argv[]) { int i; if (argc != 2) { fprintf (stderr, "exactly one argument required; use --help for help\n"); return EXIT_FAILURE; } else if (!strcmp (argv[1], "--help")) { printf ("%s: test doubly linked list (ll) library\n" "usage: %s TEST-NAME\n" "where TEST-NAME is one of the following:\n", argv[0], argv[0]); for (i = 0; i < N_TESTS; i++) printf (" %s\n %s\n", tests[i].name, tests[i].description); return 0; } else { for (i = 0; i < N_TESTS; i++) if (!strcmp (argv[1], tests[i].name)) { tests[i].function (); return 0; } fprintf (stderr, "unknown test %s; use --help for help\n", argv[1]); return EXIT_FAILURE; } } pspp-1.0.1/tests/libpspp/range-set.at0000644000175000017500000000207213137223525014446 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([range set library]) m4_define([CHECK_RANGE_SET], [AT_SETUP([range-set -- $1]) AT_CHECK([range-set-test $1]) AT_CLEANUP]) CHECK_RANGE_SET([insert]) CHECK_RANGE_SET([delete]) CHECK_RANGE_SET([allocate]) CHECK_RANGE_SET([allocate-fully]) CHECK_RANGE_SET([pool]) CHECK_RANGE_SET([destroy-null]) pspp-1.0.1/tests/libpspp/ll.at0000644000175000017500000000314413137223525013171 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([doubly linked list (ll) library]) m4_define([CHECK_LL], [AT_SETUP([ll -- $1]) AT_CHECK([ll-test $1]) AT_CLEANUP]) CHECK_LL([push-pop]) CHECK_LL([insert-remove]) CHECK_LL([swap]) CHECK_LL([swap-range]) CHECK_LL([remove-range]) CHECK_LL([remove-equal]) CHECK_LL([remove-if]) CHECK_LL([moved]) CHECK_LL([find-equal]) CHECK_LL([find-if]) CHECK_LL([find-adjacent-equal]) CHECK_LL([count-range]) CHECK_LL([count-equal]) CHECK_LL([count-if]) CHECK_LL([min-max]) CHECK_LL([lexicographical-compare-3way]) CHECK_LL([apply]) CHECK_LL([reverse]) CHECK_LL([permutations-no-dups]) CHECK_LL([permutations-with-dups]) CHECK_LL([merge-no-dups]) CHECK_LL([merge-with-dups]) CHECK_LL([sort-exhaustive]) CHECK_LL([sort-stable]) CHECK_LL([sort-subset]) CHECK_LL([sort-big]) CHECK_LL([unique]) CHECK_LL([sort-unique]) CHECK_LL([insert-ordered]) CHECK_LL([partition]) pspp-1.0.1/tests/libpspp/line-reader.at0000644000175000017500000000560413137223525014754 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([line_reader]) AT_SETUP([read ASCII]) AT_KEYWORDS([line_reader]) AT_CHECK([i18n-test supports_encodings ASCII]) AT_CHECK([echo string | line-reader-test read - ASCII], [0], [dnl encoded in ASCII "string" ]) AT_CLEANUP AT_SETUP([read UTF-8]) AT_KEYWORDS([line_reader]) AT_CHECK([printf '\346\227\245\346\234\254\350\252\236\n' | line-reader-test read - UTF-8], [0], [dnl encoded in UTF-8 "日本語" ]) AT_CLEANUP AT_SETUP([read EUC-JP]) AT_KEYWORDS([line_reader]) AT_CHECK([i18n-test supports_encodings EUC-JP]) AT_CHECK([printf '\244\241 \244\242 \244\243 \244\244 \244\245 \244\246 \244\247 \244\250 \244\251 \244\252\n' | line-reader-test read - EUC-JP], [0], [dnl encoded in EUC-JP "ぁ あ ぃ い ぅ う ぇ え ぉ お" ]) AT_CLEANUP AT_SETUP([read ASCII as Auto]) AT_KEYWORDS([line_reader]) AT_CHECK([echo string | line-reader-test read - Auto], [0], [dnl encoded in ASCII (auto) "string" ]) AT_CLEANUP AT_SETUP([read UTF-8 as Auto]) AT_KEYWORDS([line_reader]) AT_CHECK([printf 'entr\303\251e\n' | line-reader-test read - Auto], [0], [dnl encoded in ASCII (auto) encoded in UTF-8 "entrée" ]) AT_CLEANUP AT_SETUP([read ISO-8859-1 as Auto,ISO-8859-1]) AT_KEYWORDS([line_reader]) AT_CHECK([i18n-test supports_encodings ISO-8859-1]) buffer_size=`line-reader-test buffer-size` ($PERL -e "print 'x' x ($buffer_size - 2)" printf '\none line\ntwo lines\nentr\351e\nfour lines\n') > input (printf 'encoded in ASCII (auto)\n\"' $PERL -e "print 'x' x ($buffer_size - 2)" printf '\"\n"one line"\n"two lines"\nencoded in ISO-8859-1\n"entr\303\251e"\n"four lines"\n') > expout AT_CHECK([line-reader-test read input Auto,ISO-8859-1], [0], [expout]) AT_CLEANUP AT_SETUP([read UTF-16BE as Auto,UTF-16BE]) AT_KEYWORDS([line_reader]) AT_CHECK([i18n-test supports_encodings UTF-16BE]) AT_CHECK([printf '\0e\0n\0t\0r\0\351\0e\0\n' | line-reader-test read - Auto,UTF-16BE], [0], [encoded in UTF-16BE "entrée" ]) AT_CLEANUP AT_SETUP([read EUC-JP as Auto,EUC-JP]) AT_KEYWORDS([line_reader]) AT_CHECK([i18n-test supports_encodings EUC-JP]) AT_CHECK([printf 'entr\217\253\261e\n' | line-reader-test read - Auto,EUC-JP], [0], [encoded in EUC-JP "entrée" ]) AT_CLEANUP pspp-1.0.1/tests/testsuite.in0000644000175000017500000000346413137223525013151 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_INIT # Define SKIP_IF for compatibility with Autotest before 2.64 m4_ifndef([AT_SKIP_IF], [m4_define([AT_SKIP_IF], [AT_CHECK([($1) \ && exit 77 || exit 0], [0], [ignore], [ignore])])]) m4_divert_text([PREPARE_TESTS], [dnl if test X"$RUNNER" != X; then wrapper_dir=`pwd`/wrappers rm -f "$wrapper_dir"/* test -d "$wrapper_dir" || mkdir "$wrapper_dir" wrap_dir () { test -d "$1" || return for file in "$1"/*; do if test -x "$file" && test -f "$file"; then base=`basename $file $EXEEXT` wrapper=$wrapper_dir/$base if test ! -e "$wrapper"; then echo "exec $RUNNER $file \"\$@\"" > $wrapper chmod +x $wrapper fi fi done } save_IFS=$IFS; IFS=$PATH_SEPARATOR for dir in $AUTOTEST_PATH; do IFS=$save_IFS test X"$dir" = X && dir=. case $dir in [\\/]* | ?:[\\/]*) wrap_dir "$dir" ;; *) wrap_dir "$abs_top_builddir/$dir" wrap_dir "$abs_top_srcdir/$dir" ;; esac done IFS=$save_IFS PATH=$wrapper_dir:$PATH fi ]) pspp-1.0.1/tests/data/0000755000175000017500000000000013150620333011543 500000000000000pspp-1.0.1/tests/data/num-out.expected.cmp.gz0000644000175000017500000063114212470242646016031 00000000000000f_Er:- WȶIfhˈ'ɝǮE#reI{M/w"ըZ"@}8&1߯/^X__<~}O{y.}]§+W uZ?ct]sϵ].__.^Ws4 *8K tqvEW;?ˮ§&|O ҧ&~@K'f4)ݯ_uGEGH"s]ѹ.3sQ H%/h2)bTZ*#ʕ ZS 5 ŏÏ.jgIG,GD,:Ks>h9V\6Rg1NcPМBt^ W^?A ' y}"ulW_?qΒ g Ր]' UjSL_?iܮrɄSl_?]5B'JL1~cxYS_?0J[+~o)[s[ /S[R3[ Zl[ շ No);URPsDo)g&շγȒ9-,ttJ}K9uϡzms+C_1ZÕqΓ??/)|g~zA5r}:ժU!5eiS7OX;XR6gp u.Ϋ\-=_Fh -g%oپ}yզ- іlוΤXoR &^m]ii3-E޴(igL\+gʚ&dʘxZgƚnd&qE/nlΚ&ɻd.&gJʪ?.[ntxَ Y!2d?)SZ#aD?Q0F~;W\4+cewܱ;VwJO-.+'{SrWn:+B985ם9/;wְBV| A1>ac*NRqXQu5ƁqjǮFճTBzXtawxߟ ]˂rs>&+7 ؊[q畭^) ԒZ}KQKK{TZ7зHkpkkeɟ]/%HKudMF5y^5jz:rlky٢˥-5qolF?;|vazig J1kt `G]I+ XJoF͈7vEZVLG+hңe{< WJN):Wzn\i1ʖҳzj^,b)ރZbR,Q ,g#T6>׳j7xFߗ}@Vw,.|C;7x`,hyamM[zTV\ߊs>{^ꇺTv{=ף{w]>Պh-ny-?rSlJKj2&#m2rMƮ_sO#޾jvWݕmw=/[7m|Hu?ė^=B;,ݧw̽t (CŊPz3RoFȽ,# _zbV*=ZdzpeM{\ɽ:W^ҍ;Qg쵞ڳz>wH̔ރ{P{zA|-bR,Q ,g#6ܿe߯w_M{~=O{~=Je_2ϯҳi`Yozޓ]ϛ)ϴ]ϛt)OW]ϛL)~z|'O?r={|'O'?O~r?=~{'g2R^~X4%%߉\ʵPR/of?vՕ3˶d^7%~.`gsAEWYcs f?tmIhs!űυf?ohsjf?E9i䤝ah( G L5Vօ)k$ k&1Fk\QrƇ% GylRQ*8P62 jB!p%]Ndf?@kynf?ׄ7чpf?hA` jf?@8d! ~(!p½^NypW^XG~'ȁ߼9rWp[)'u˗~-).̑ `s$9n};> \D'LϣRlJr^,|y QlJ˃ٜtGFM%.egk]5ζ< ZYxy4t; 3Pwq,N˃.-/zgԼ~}gIz^=H4E/Y&MD=Y& rixOóB𬘆g4YS ۮ Ӯ⌻:al x56 =;gWeo~ 0~6J-ER boZ`M iA0-PR *vpr{#kcmQ126L\j`oƮd*rƦgܥ y;76ލMpcD76ٍu#%ke]^*yv]gevş'垐.'l!u 9s}sȻGKqj -rZN"ӈ~Oi4?49)Z"㯕VתZ_;׊)B9vN v#wNckt-k{~Wϩr|.+eG88aC4rʠP JxqG'*g W)ҒDK;HDwpI9'JNK+\A}Kܔ#M9ԕW/Ȝw=O󸽔.^i@\#끫(Y2e")r=ERe>_pp+ʜn|F{MizgY }R;wJpeYS uЕO& e8,9ShM1)5%BYά=V*Xۓi),Z(4jɍL1N,M2YU˼n,i\9N,@ɼt B -+f6F81lg +(nl V'-"Z/}T1~-ba+WVeSwxM9ҔCM]9Ly=O=K"MK }G])_]ɪ5-iO)=ž*/՚. [Vo%<:hy׍u{݄^7kJ `kͰw]{gNyނ:M6|k?dMZa[f.5ňbXSr$Sd[.c=Vwy?2e&w<]grs;^JZ掷R6w㰜Gq\練}!w?_jjRMߥKs@>g.}]8 n.ǻ逤 )3I>N $}H09qiz瘸RM &?ӥ>I& bɓL2yI&/qo.&dr)L@gqXd.rl2y]6 Lndrɟd-&I&O]3&&X$WGd$L!@\29K&s] d>L\29 %L.ׂtYܢ` t4Fh~Oi$?qR:ZHI錿V*Z_ku_+ MJJvN۩~;o7ۍv8)[JI^߫{?ߏC?NJRR:CPq:aC81A'W!))]#xqGx <NJ'Ĥޝ_"kuLoWr[$6@pH{Nx]i6mߦmkYBR  aGvО$=i=n-IoG}G}C")r=E룃Vo[I M4uc{^7׍ Ȥw]{ޙAz;xvjN9[ϥs#bS k Lo .Xcy{`z{@ybӌrQN0 h.]ky2[%`z;Y9pyA5/慁yA4U .u816vfE:mJH2MڴM{DM-r-nsFz(lzz#p}#߶yS=EP|Lgs{lU챚=#fSrQ8G{b9e^̫y2/Ysg=#ϛTn^DpBGKCI=ESzlO%ڗ1$w\+Z}m1׍u{݄^7kKo?u.ў}B߻&3j$ў;F Nl=kM1)F1ŰD{4=V*XMrQN3ʩF9(h=,D{2YU˼n,cM yA7/ y ў,SD{ƨ6ƑQ$MY*K÷S=|;~N÷S=|;~OR= ~?HR= 徿i&{|?|={|'?O~|?=~{gחQ]Q9_E0=˿2 ~Z{33EŚs}fXcμLk~̙Nbmڏ9>F@$gn?"ǒw_VX ک?%ᄚ5Dj?D&ݾ29N/99_ϕh@w<{7{? ;P , ,. ,. ., 6} ̕z`k_*M~h4A~tCI¯P~¯Ѐ70. ( ~*ï2 Z~R.9$4,RE*fùvh61p G(%h|O9]GnL@Xy7VUrcXe7V֍)ؗQ@x6Mrhd6šw(e>.?=_Èv%ow]vW5ow۔IKlf ls\²pe,=-e 9˕)ˆ@a4 с0 DN*tAʈX!bUD bGXgSq4Nи4nBhrn8_ h ,F^ȫy#?ȏ0C#a:@#_ *XA+ #0+LT2ـT `jqZ'P3EVTjUpp~!LJ>GLS5ueKK)Ӡ :`Jo}Bz~I4ʆO;\'$?!S7t}W l_+ˈA!# rDւ[)]G r!+o*RCR:.@4 gcx{6MgcI] ^ȌĬ7k%vѬ3+EQuוPBRI!h(OF4ȆPjxCs&=- 5Z\kUs`nNg1CyvN3کF;h' rLPӽfWM~`MD lLQVAu a@L| /D7FGnġQq*U"H~0)F&boE7 b:[ (+NSc@mYI. a}XjuG[w:/#Qc@xډ:]'Y]4!h_+}/-F@ hA,  U@wPWT h!`J I}`؞g{6ɞ'QpQ7:vެ]0kEvά@ E#SRj)L*` !F젆P#jCf ̈́\)hV6*Z\ks3[ 3gSvN5F;L C^F š5ӽjMӽhz*@΍F;T@8FفL!XnDݍ8p#܈C7Y)UGڲ6su=MnYGj&D:_޻emYEPO]!2w{9/[wu[Oh"閵r wi'w$pT CK@ \_+}%xem12tD΂Zy " 12!J!+k ԐD€ 0i8)ړP{6ޞMg{.D՞߄1k%vѬ3+.tE>MKO8[}؟%'Lv#q_ŒjdCb 5vL$dB"ksfU͵Ƃw%5!VvN5F;̽w%7a^M^7L6Q0 7@ȁ ;yOзnDݍ8p#܈C7YIU+Cr%*~\Uߠng *' A㒖@KZnb /i^Z(ܿAV|﵉LZ6ʺ0i pĤU;jiC︥L~wmGw8fo>v={蘆)M~ܼ;t5ygګ :O&.!4@ {!*%uuDiAlEx!n!~ !"2cPTg7:"vpuEhAI#.[\ 8H]nl=v ox]lTikUZɨ8ő@C p<ɑ`924G )sd>BDGN|p Qv(!#$Dvd>a؎̇2Q&("zT+8^`J- Ɏ zy̓*v6?Hp2=9 ^#uF)l%Id!NcR$1IT(I;YʒOg$ By)((_o & U0>( I VkL uKK=D1Rl70KCiO70KBi70 ÒALAɒxct,LA370˒!LLA)70ϒaؘHCDKc 1-YiLK^ELKfӒYjfZ2 (ALKfEi, 1-"%ti,}9fZ2 Bk`%0U0ӒY:ӒYJӒP 2-SdY~E/fA~_x)~ CZ"?/.Xt3Kcj}-Oӕ>*WJ` [ӂٚʽkOŭR6=3}{@ԂOL@קȂ.JJ][u[1ERV n h/7 9jX";@ ` Ned~F{g*#BedѠ2*TF 2# U6aktKfeЬ@*hV@#4 a*/9>TF!|n |:B r_1@z Hu H?c ^2I::'ȐATHi@F!a i4@tH3דX p=DZ,Q7#p87NgSgUV{*1i-[&Ls+iiPkn-נ &VvcchW'vN׉:I>*"ƪ3u<ۙ;K=2bJ/ي˄8kBMĄĹ#jfaS"gJdM)Q0%RS.@XZ +kʛ &+cbJ_V¦no&Ingj"0VLyw]2yMewāC0VMG9N0j|Wqq2|>Sm500Fh~#b(wUܱ;VuXɝLĕcv9ySrWnʄQlLXXWs~9e2_z52Ǡt01 } K0j]W8t5]g/)xĎZ]8* |ڽOWC5dS {F{[D/2 ^\K\BW]Yy v=۵N$J2`/뿗tM 5!&bBEQAS"gJdM)Q0%RSQ_GsAWĕ7qL\%WiDJ_no&Ingj"/E P!w]0yLEw591e aӻo[o<)xۨLf>%ҡAZ#ad?0F#EŐ' ҾwUܱ;VuXɝLŗC5 GrWNʩ^9+7ʉ^eR/$Wqs^sΫy9?pΏsL cP} ac>&VY&c]qjƱQs:K{wwꑏ?5}ݫǽdM[-(^=޿zQRܺŭ':v1ʑW{qGEq/u$^,pQu^}=׵g}׉ E sǽ&΄x1!qWԈbĦDΔȚyS`J$B*|~Wj%L\YWU0qL\.s(#MxS7M2uM8STWqJGLw]4yMYT_QD[ڎ3'n=>݂' vu]Cad?0F#szˮFaXwܱ;VwJd2c#5 wӼrWN rWxt!OpΫy9?pΏsUё1P c} 01(>f< `C$Qw5\#W8v5juX!/m21ONUONScQgmatmU<- : TĀMJ]MSL]g3mu;OHغ*쀔j.qv]7YڮC uז Ȼ,b{}'Pli-zjM³L^}MtOt<=?=OtOt2=?=DD`&&7=~0=!MtLtq{d{'C?DDP'O&>=~4Kkv_?`׎%Wjz\%f, <5<f B(` wtosy;7};[A ovtnvmv(lvkm7c=yK;Fh1z?;:RXs}l3sX2ll @s?_A4^ J>10s] rH#(5$[:Be9@oV@s8!N4QgnllDe5+Ld}z~Rϗ6t zvlx#|MƗ D_ 0حH݊[u+nEɭ(e"lCyr*y{=t0zg7MtvDg7MqvӜg'|rq]{Ew]{Uwo,\\$ p ɡЗ̝<eYNa;_"1w2P*@e4 ѡ2*#C;ɀfeЬ@*hV@#4;Ss:|n1|N3w k@zH@~'*T s'iP! :aiA1a0i!̝̻)up87cpq8n;jAa|OĎu˥;=teK;+0G%Ith%o@1"wO9]}"bLs;Lg캜W kn1:U׵ =Cp{Wbv@@Wʳ]+Y1ٳ2]wHɳMyK"kI-%Z<BNnvF8p5\CWը y; =G/ I|{UR3o_no|mgc3O/չ;ϗW\@Yn{|mu} O}v}yҗl_ {oݳ}8pւ[~Aؒ[YK"oI,~='cZEdXSF<{0'~ZT#ad?0FSyveʓqXcUwTrWNʩ^9+7ʉ^a*Obac1'g<WjGơqj\T@(%ȝyo(%g6ro#w6RL*BR>pco#w6r'o#V:o6ro#w6rj?s Ϯ/O|_}526r'o#~/,  g '$D֒[K"}"CXE`*Y25vO0i0/藏5잌`&nN}'5yMw]4yMY'YvOtiA=Y )ߗQvOT,'0Fh~#=1ɻcewܱ;VwJv~{ ^9+yTxD'Yu잒s^sΫy9?pΏsݓ]YvOǠt01 } ݓY{잲Qw5\#W8v5jvOUD`9G=/v0{gy5/{6E~ȿYZW=k;*gk_M=ak~Oܿo7{-=I~O$ݩ:;SNbT'2|~g>3i ߙTLuLucLu ߙf>3M1|~gcT7n[S]2d<) 2|+  }gm g ALYLY冞 0}"PVZJclŠ<4OP* +}m| cgWTZg_:)}T8@i?0v֑h;Kmmg\7$3Cm-f8@7я̣@dFs!ɍBMݓRΈo[h0uݍT έuJ빓?# ma0*Ji6?[N5|5R_yE Ji! mi{4U=R[Eikq8UeRkEkmIZ2wjUTY'!;+wyq^ Sq34)KmkSr*jyIܝFZnSGj멇牦KA >2y0pZvkL\KmPij﨧KMm-qDS V4kf^kAKuV`bp5Sblڶ2-j*GMչM :FnqSIhcwkG]nܴksM .YTڍ_ȵKW:v-yq2Fu0r+rkv}UO:ʧ:qf`a[31{,r{T@[!,rAB#~FS7pN4>Kcu+?plKH% V5mJ&aM n4:7[Hn AQ7#(y{S7+Hap?Z &T*+cXm hVϰ_+]0`NVXKQ+k6VVJ+0(n Uh5+0ѪVJY:dkiy`$V1sEMijf :m m !n !ofСlFСm&СnСo19cs 6}19&{f1s7zmcb j!`>1W$`N^ACܺ S+ snl3,p+GԖ;lGܨ"Ǯef$,%S2xh0S([3.,2 NjF ndč7*FG 7#q3FY d3+eѷ*VGз#};FN/̸Vт6 =/cɅH8=n 7F#&"f"!UZG`FFE{!,ӹ?EQQ3QSQk-9ڋ[s4&N#R8]PE( #  3 S sz⻱-})fha8Zq"Zq&Zq*Zq.Zq2ZJ=P!|7F%wO{Em r>"w br˶{ߙ;lg*\č.qF8x#eȗq-'mmy6tr{d4Oo<2V X$+q2~ĩI- EȚy`~̏] *gg=QGV֑wdY%GVёUv/|k$b_/p+Ǎq|$7MqS|$ex#`~Dyow]veow]BbIˎ]d] %}'e_)EL1^|0{~0"F(@ at o)L_6BXDU"VE"v[ё[˗@4h ӡqh7@vǣ R' `51#?ȏ1, 8.H``XaV&JelxM0AD-jqZǨ jbV5o/yGUQ_?n-ЪUZSU_lnVS_@1/M}ܒ-߹e;GWE6V3ocMrIr#0wT _@DȑYa;3CT# !F#m !N#i][c!^#K-}sC!A#KHzHC68>cZԥd,=&U!E#KMYC3z6 eUA;SgM}O}~{|{A3=~0=N}L}a{`{S'SC?ЦO:=~2=1?Kr"4mK Ov_H#ZۅB?|5%zd^/8}5iz7}mUҁ*H.]H%Vr[nCIb+"%\tJT yV(r^G V5 QB5RSiJ?RW?_;γFn!-tL}%Gj xAj5aҕ"3|SZSPY]&?RU45jF\]lf׬cl?K +{"z]ÅPms ZT*oC((oQdQVF>N-P> G1sZ䣸 GmpQH+bڌ4!y)O ;y)vF)"bɳvMH덓b&ڙ:" +7KX7Ѫ{ԙߟu.T]xUץ,dU|)Oj,l5 RY^3՜9b[QN5wյI{ EjK̲5 uZNn#m@,HY^9koY6oz,|'UڡD9*gOvXEri嬽4Aӏj tօxE[L/Twk'hn \;5wnt ;7>]d`qS|ćK|=C!>C>C>}C>=C>F| N1>|Lc{c{L1{zvMԄ+-]ծ3ڵo&tȿjpQOlE@ng,`BZOGX5RZf-tV 9bo7X 4]Z+'{DrI酑}1v7x>y|BRk?*e?觗8f#`;Ӂs:NI:dt}'X&7Fa @" H2 Q$ʀDB 9:,`:tVEgYetVUFgUY5tVZա)#WGX6Mjd6MjStbNI8:˸"nۮk*n>++VǀheȫEƱ/cx$i)U'aɕZu2| V_^Zu( ZBkthZ3 5ch*(yaE^[JSVз VCߪ[};@ߎзC};Ppttc@"e( G "FpHq$D$L$JƉ1(EtRT *~?GODDOEEŊq=(!tb(Ba0PPPP\c$Q:!ZK!S̊ъhqDLT\dzc5Q&B3]ޔE"t ,G¿>tt{IRVin]yh';Gh-# v,)3 8ޔr}.vtmS{ͦx/yS` N&#Q{oyK41& $qD~c#olQ4+!bshͽy o_1n*n}iDjsh6ɡMthHѕvK7m=.xKxkB+oRqrSeTWu/rʉsTWl)qrF@aT S]9ʱX b5DD!rv +ChSq:4nAа5q#0*F^0##?HBu} NWN+`0+ C0TZQ8D-QJ /{kGn1*t@~],w9?ucO^4pͦ%jj's#ǣn=uۋD1&MbӀ|9tc9!^4m-_F: 9tGn{}#y2/X]'rҕm x`cl 2rЍEy`|񤄈X7VލUpcXE7V ZD$KqmC&9mCSFŽtO{ .{+\!ы^y.-}Ջc\ET/u+zq|1Ջ^ˆ@a4 с0 rGh^ "VCĪX;@Ď*G7X8@4h ӡqh7FlD/y%`XW1:F~a1FbǽZzqSLuaD Q0F@L9Ձ#k3VGʈX!bUD bGp с{Sq4Nи4nBÓQ8mՁ0F^F~bUV``XaV&P8=ՁQ:jqZ1jq8T8~@ҁd .~>+ qľIFE)ʿ*WWZCh_mPs)8޿A k ׷o4vץ)vN RrfgG?=?IjpߙD5~wf?M ;OW7R7oF ;ߔwf95~jpߙf3M}k; ']45R]t58t(jp&o:n XZ(+fLf7T/ UdᶭJEԭXUj),M֭ 麁 knb&߆JKSh*Zfo"l}-Xm)p5~9RZk(ոi@i;F%ýHx90T? @Z G-A3[Bj賂z:ME+v7B3VĻV(u& FnFJg⯵hl~sn´tδ|U2\+ 9S'cfvcOU-!,S5ȼ FUc,He$i&O[=Wq-[-˿*Zv;iM-k*Zv]BehYטAѲ@k护 6I~:e"!QMB O[U 5Qn) <)f &V*p[SX)x#[(t/Bnȇc-ԩkaiapbX6Է408)},L+mJ"08!},l;u:/8},|Ku*bZb2C"U!6 z`끵X5g?k۶Em=0z`lsks9_p_xU#ELq)7 P~!Җ(F􂑞7 FzH\u@<6im Ja Xx`}] cH| |&*b#w$ Dɑ(:eG"{'VNުd|\yWUq}\eWGR.VRʻ&IniB(Q0$W'OG0v ]c0v ])';*prT/e8ꗉpT!e22TFhP*CePTly*4+fЬUA:hvf5(1dy\U6xs*|N s#>7O1+5^ҫ@zH?ҏC H?TI]y m,VJ$H i! H04! HJ T "KUl"Q7#p87NgSʵZX`$q[@KM­U%9=$p&j7 7tRpM+`ye"NKnmol7 xqfOm͞ 6{澠 Ɯ ѓMx`~ɫN#Gn_ӄ#Eޱ(8%ǢXEM %R=h㈏+*J>Ȕ5ْU99ƻ n&)n\ai80ZS6׃ `.+` [kv+(#v  -jt,8\!Uዩ]j> akzu*#BedѠ2*TF 2# K>2 Pgkv hV*Y 4fu4;Aj,M0J.@q9>TF!|n Xm9b(ִX W:~@1~H.2P)ҠCaiC& 3*pnG!q n7΀jj^ڲmdAV/ȗjN 򡗍;Թ#ȗ|)AKM 7&|5 S|molCYP'";^S`m^BI.=1:ws鞌c~A4˛b9}<#:wsyXcQt,ʎ P׆#iؗ!ʛ@##ȸ n&)nI0\ X./ot-kr`.+` -EC D[gmAeh JB-(Sm~X,1A*#CeQ2:TfAUXOz2"P(fЬUA:hvf5$%a>BDD %Ss:|n1||&1'a>ʞDE ׁ H?ҏ@ u /)(CtH04 ! cHaR҂d:depnG!q n7΀kjJcV$y7=#0&+^M򊩍+^҈52'+]҈2%H$ƒ4bH#R$QC҈XF\qKciDNf,)#n]SceDVg, #}cC]DAh,"..4u mp(Je]D˴"ZcYqM.."6u=ۦe]7*:[<[2լPP[d(-~g2|A''3>~0>NL~2|`2|HC ? dd&O&Ç:>~2>1 ? @aJ[/0mI| W |mYt[ 꾆}oaNݙ>H}c\_j@f F=Y |M>;IFeIFAV6H~]( #܂0udj[GT]3QAFDZ"_7J$$nDg*uS `c GJ%Yϴf?b95lنOZ8Z?:@njݳ3"qPrkܯ9((skH ƾ9((pxJn/nv(Bδj7.\+HQCvaAڍLS-nLHU m!UnpU1e^z*υŶ)ŵX$z9w~;aY'^2M@E!$enL5Z-l 9vSժcZu]Eѡf#V=Ӫ[-r7TxH;E2t 5 nډ" ($>PKB+B©cnhBicﮓ(B)c! !t6d׵!TVD׷!4pI!- !mɍi*aycZkZ؈{H[܊d]ZNcbp+Ukq*[|f:D:Peua.,CZ R u.x2ĝp/H3OMO‘k G@trh@P2"A4%Y26a$"I(SUp `I(TWUpc*P[9VkkL"~4&%1* iL-1+*iLZ51$+dӘtR{XcVrɦ1$dWMc2myWj@+;폤.ue^U $FfGV,ZYڳ\{Z(~b@B;NaP.fVË^pBY&)eBdP>(BA&{BON ,;тd =Hf$3 Ɍd&df$Uª\F eS)h)hF{I#(2;Cf!!3!S!ka!5+FSF/nFV{5(-%HQ`0nX7X7X7X7XVsD,;>˵Q߮zZl0~f?f?f?f?f?fBx.;Ntu{fI˪|8a"a&a*a.a2a6ZE~/T:}30,* 81SC 89C@ |uwN+J0 Z>Ҩ¤ٕr+ (噮\`a'R4~"sIZ_+CM0 Bʤ$C9"'X$pTrV$Cg'c=o^2֋v%Pw~ >99xGH #At$ȎEP=*N".U1>F(%c} j8ER'*JjB(YR4h}Ayf06 Mc06 M)]]ri.K"0 ̮k*0 W ev86B_lً]W"H ǔ ,l9'/V0‚UHk42FAhhMihf&_p,Ot_{` UVvk U~¥H`S1v:na1nc҈tR )p{ nun?c~nbP)Re*AG> #0F>L fS˵jP"-!GA qDLT\jCx~oҵP̺ǦWmuXZ_b7zƝ91goy v!;>V,=Q|NߘŷiZbKMsv&eXz*Ɲ 1oy 6:ƾ隹zKO޸7-o{|/EII3qGmoQ[hc cAr,1Zu(rbó[icQr2NFɨ8ɔ5a `sfXVU`XeVU+lb+eΔ &I`l" Ʀi`l*liYX8e0.20̮:0|qy&lz.Z ,tDcY][*2 圬nPl}2ԊwFDhMiT4iFh!R h$l΋2VjZXkv+V*VvNi;ccnc&0%O'*vB=^۫p{n?ۏCn?[SJ䃊|Б0D>ȇZ- Y-u D=q8 B!'g炠V+Bżv[owvgޚY 6Ep2ù/vg-ݿjpT`9R[ownlQ2g,AP ^v%w6:F'و\Ǐz۝z3[ow<ߙdr[z;vg(˽s,ɱ :dzFHG^/vg(s2 NF(:e'$aLg( ҭ;vG*2@ C\$|;J06 Mc06 M")< K\]fE`v]f׀U`vI$UXlK. ?yc ^_&sRA+ď5"Yyo#4Q4FEhfx e UVvkUE _/`41vc7؍1v uުH)/UGp!~ -U2o!f yf#ȇa|#&3ȇ)ZXXX!l½3!GA qDLT\jަsmh^qFCQ}8Ȥ3 fiN8L8$a;3"T48Є3#D#ni,)&kj(J& okk& 睴6RpDPB(8*Y0- β jVp\ۦ fg7(8JY9J#]Y8{u md;=>Aߟ;=>~0=>!LLqz|`z|('C?ЧO`z|dz|Opz|hzL6Tl ~5IBt9D!hIv,mv . r)759iВ-yRVNs&9Л9kLÏNzdgiyd>{j)jnDQF; Gji6DQFq(*hE]PT+ IѧS6BUc,,|]x^ȿ43ұ5|/4a'%>-'+5Uvnx,~~t)v]PfZ|`;x~0U8x5OrœbqBU~J+.ԺV(S7$udj]l;HZL^`n4M!4jൕC)I^;E$y=1?7k/gana6ϭVլysKnlJ.i7\.鮿K~}ݍ3\{R.BdKި'dqOqD-gKbߨ7jw6/z\oVMtׄmv_ vj02 cSl-6~\kk-6mo4tq io4,L{$Dmio<,L3ubqo<,lKhv-yo<,|[!mo<,BkH'ր7?=ti{U 7bLy'2c,fb͈aN%pͿʙ,\`exU̙ؿ/S H%\8g,pXM+HЋz!1 u `qdHt{}/H9o=r\y=pHC<7r+:l~u**k-aUsN_ηUͱ:t=k5׹ln9V^g_XyhNncv{`إr,+/V_%^˞.$UpHmޒ̴"Վ2-2Y8׾Q%vԉ%XuZ%yQwԋ#8Gz2Pqof ^ J3o&0Tw%]U}GdJM0j޺^/ Io[cLM+ߴ='xC|d70޺co}wLd 0\s֍n|du㣠%(GV7"oZFt nRSUBAusVƗ*_Jn[17`ɌL81qbęFL1qrGL1yѫ?G%0ڃOIoGj&N ?}/e; pv#K>XrVR¡qYiҲVZJKLٟ?աm/sw$uq8':$@B+AjKu>zZ䜧y9:Es)j}r<]OGO<yXσy<A Dipj4 7E ppj4/FbVA6_ףKZdG"GqdDdLdSkVm RG) FQ (qDLT J7TCѬ0/[QňE=bq8XF,#'"g"""G?> m?Vx_KFd{HǍ=޿n򍠾%(AdMvj!vaD;pIK=^hc*xo4F1nl:-R+hV&k!|ɧKpNr1$I mpl=M|ćp{9/:%KQEu 7pcnyDw߁;E)tuF2nl-oRB@"Q!* D4,~{cO-EdY%DVUFdUY5DV4bRXszso)^&ᵉxm2^צᵩxm^itO[Hݿ[ .K"x ޮk*x.FPm8е^ݿ[a%HP%-j`2e@~dKd*E4KK5f]oouQ7"FF( untu3B Q7 Y^" ^~rEz v;Gj? }G+D)pZ4 G Fphq4D4Q*}{+RdFQd02~??G&Z =acF)Q (Q0Ja0000R@46_ݿ[9bQXD,"ʼnřũŹQOBnۿ;ٿ*6T+)Ϭۍ}rٵ{w{goyaD;Pb&* =}O\w{goyZiE+-2 pctW$qŁKݿ-l':$@BcA 8w ;ٿKs^r΋yι+ u1Dy{od-;~ dw6;C_A$"! D(%BA ! s`$DVEdY%DVUFdUY5DV4bh)dι{goyⵉxm^&)xm^&FS7eev]oEv]oUv]/D$Rk- !yE)G  IJ)`eMRथOʕ#D j`ԽLrZϨu#nԍQQ7:fn4Ѕ*82A!-C6VU"`X5VD"`X-!aoK4Wh8-Nӣpha48n"NFHpVTu%2ʋZdG"GqdDdLdSkn:tkK2(=Ja0RF)&fQʿ1>.˾Q"M#a8bq"bq&bq*bq.bqSЖ[y^~ 2/Žf]&ZWO^l,g84DCSCh3oh_}{n ,/MA)LugmM^2 C DkWvle/]3 j6_&&[Mwe+vM6}h q}nLzx(l-\4o U,zwFY.z$vwo''0ߟ0t|||0惛0?0'&̇0a>~0a> !OLm|d|'C0?0 10?0 10?0___x Dv-T PAfܶmIcJ6^+M^sW{s`gVؾ҇qܕE]}Rj٫s+un_W$]p\ ܙfXkSҭBWMI;⼶z1ɻFz$"خ]+pvɮ ؕ:3Z>""5+2fEά(%BWz!;VjرrvhG JOǮߍwݤ~7$j}7;.u+$Mԯ%E٤U| Fm!)~ n|PHz_1\pUy]]9Y_m~:??ul.wlQeeO&֪9YZ?AKZ .2WۭV]wĊ4bK,WGn ;Zmms>+_ؖoު[77jtP$s_۔K[ta Vey׉܇mw v+7:\'J/2ڱ\?ߺ ^>/۵Wд,WoԠFyqG߮n0}]5.-m>e-%[rv/W/>g9^g ( t3q>k7يv;t2zPYC}oyߪuGv^>ͺ 6 Xkdm:>+Wc#kl䍍Q16Ʀs]i+gʚ򦭂ib*~%;6֎c;6Ŏt6,u]Bu΍Ouh좶Nveg]le[ RUNgڑƝ>;77Y>A27,~erYw~ܯ;=.fi,g~ݹ#MnuN_l Q* "SCS|- J-t{-*H+ZOʷf*ݧ'>?Ѫ<**sNI}V `9P"׺t[=㉇|8Џ&`KPg )tr (~C0MGBT#όb5Mۿ>4s0>AsP0%A sPa0a8A s^:x,l]?l}bG6}bG9Q}ba(q8}}c&{!sfY0@H/p0+uY dU*U 6@Vu: xd `g\ #ܛJjIfFƎ50j6elٔQifSG65hlQG61jQMm4jIG}εA u#ѿRg 3Na*ė 3„zavzX[c=LWǿ v>A'`1O5fƌ?֘5fs^c?Ύ8=;?~k8;h> ]uD?;C]瑌c?}yx)o#GbQ|ǹ^&AC.# oH6|"3}΍?́rzG/]\ Vr^_=6fu߬[ S\F;z}wNQ_ <ZdTP9!YbUiA|2 6%ؼ` lgIh%X'Nu8go_SI/4$xA<TxdӜW@! s8襞<:E+"H"D)"QH#D5"QHD$"I֜sGNs1ZBV)FUѪhUc1Z1ZG1Z1ZNjyzNHH^Z$S7)M &qøa0nzAQaq75iX78+/O݅R`w1]vOvfb E8IRY$?0Lk uppp8j U#A\ Vq&K=RyC000}x0aÌffxa憇 _<e{f9hFf=hxfFXaanfGXaa~h88O_lBdlΨnި1Ό85h1Ύ8=hqj42VK:SFMn=-NnYlZU?}(ɍ#2"dͺ*gA|rӝWTpRs} QڒG[rchKn8%NtL ަ豥 jt~Q"GDrcHn9p?+89''tGFCn{ȍaO,^K@zȳ$u˟ "'+xP̟q7?B  z yDB@%oƍ۸olH($!rH$!QH4i5@Ԡ¤~SQ Cq٠BV)hUڪmUA[A[GA[A[Pj܊~d1 &q¸a0nz75mmmmM cR: ~dl`w!] .vYa_.G[G@~'[n2`Q?2x[AQ a Uh@\N Z6Z:C0 [#|dgQh  3f<<03L 37Gva8e dKƍƏ7?nbƏ?nr'?F5PC#|d`/iffFi(?1̀S (?9O DV|*o#6B3.4B304a< 3#,L07 #,L0?ˏq]0ڧ|d2F} vJh JxĉgFcqn4gGcq~4o85cy2V3{~G{Ȟw};Wjd&Џw#=dGf]H'*rb[ 9RN0.ozw}d3EsD4ykoSh) BuN?߹w#{ՏpqN!]SqrN'H WqtX^\zG;|dH/% =YzeV^W:^8dr/;~>ߙ" R  j0@Q +!$r!\H($J!bH$!zH $q$MZ| h3wϏw|d .hU *mA[ՠzAQaV-hi*teĥ0n\7)M &qøa0nzAQaq75iJXogA+R`w!] .vYÿ*pއj"::y8z82x[AQaV@〯P b%4ZڪUC-#Q # ## ч 3f8 ;baBvᆡ &FXaaj&GXaazfFX~ԾR#;y4fSjF[fWjƛ&N83hs1N8;h1~c4Ʃјˣx6X/_&}b/C/cw?~sQgb/M9zWψ^7믞a5wEo_=6h~@\~ՓJViWLJۣk_OBS믴-.lK/zO+Ҏ&\FmwUf{l۽~RfI̦ɢ7~_k4̼:/z׏͸a2M_z6Kn趯\g5< 9Ґr|Ɨ__hJ+nM{ڴ2\6Ssv?{h!=|lbnҼR:JS55^#kzׯ|`+_5՘|;_i+u|(_^b5*6lԆalX6ކ+)C62egL9Sv֔7eL9S VƘ Y"p/Cud*@Vu%+Z% o3qF4޸%jM&ZD+hElUL_+,fN2ԉ:P4CdWćK}cIz\/sfW_QW\f'ltPA5:F=/SْQ1=jGǁ鿎nv]Kr\U%u[]-7a&.㮒n)vlÎk[%lUw;v<]Kׅ%_5^20HK[fk"gM䭉5Q.SLFQ+o*JFQ1Kl۶ mmh&--S,&d.&3jKb(]~K%h1[[٥h1_k%i*֗h#mfQ6r5tn5ӭjMӥl0ZVSpn9 .sӺaԭnx n~膼NULН gș0t&Qǩ.őKqR'\.onBϋݢ-.uen祽\ n|5mOz.%hq|uNP7o}Y^>\߇p\jo}]y+uٮ|yg:cz \1=yݑoi,FvՐyC`HxK ˞geYy{VUge9Ks-Ykƛ fmYhƙuE[Z'v޸]0nEvٸ5,[SoiLmTəj$=QdNlT3NF.݄oiQ5F6(\ks]:h+mfUV2|.Φ;tTӝnD F>V9U8GxفUdtv#nݍ0p#C7Yig1b2;ug8r&cgș_Y~d>'߻t.}˧MλvxLGãgɭđ)J tB+yV?R AϨ O?=~0'\ѝJ?3=~04!E?=~0 @?9}~гs`ϝC8s~h'z`NY?i~1?{OC:Y~T)?pNYC>I~ Α)C:C~'?!?S|fPNyC=-~ϊIC>'~(?C>~('\ ?3D1sPNYC= ~)ct:~h>'ѹcx;}'18}zÓ9M~íg9Wy)T7v/${7Y[J*+/joAznPd=,( ['o)n[gl=̤%dY²wJ}_ϳ޿2'/i/;=YbJIo8@ H  A$Ȁ@!d<'rDxO Go[VUoU[5VUo;MWũ=AqPn,&@)Pn2APn:M` ͜7x< `Yh4;WlmH2 5,XRl\L)]8[i/&.x_]@~oToF!f ߨ[!{^` 거XQ,0v ; ; Z?ׯ,LyW2˒qj07 ss3sSsVGu%zKg=?E3Ss6z1R{_5 XM2B PPPPPPa(ϊXQMmWm3x6q8k5N55N55N55Y6mc;e5u<_us~f_9gOm ӷ Rq]Ꮮ?5oԼ%͟]`{ѳ~߯uB{V@WOy"/Ydg,:KB-?76H DcgYaB\F݈Qp#JnDэ(Y7βKG*xJGѪx*,Hn/&y n&{)nYҀ~%̻.8K8kZb˿lUBVL- ȴM-beTHA\Lquǎ^.QvX2 TFʨP*3ʌ22Tg pͭfEЬ U@hVhvf*bڃ?ʦSs|N|n9 gxq,@zHU G@!~ ҫ@_ .鮭HҠCaiC& 3ҳVjeõ}ܨqn'3)pϺ7z;_\7z~ƝsUӷzU;xcs7܍96w{ltx^w:8jw>nP܍;wc.k,qԒÂvуm7`ۍ9v^K6zƳ$i8{Ch7ڍ9v A0>HE\#r~Dɏ(%?Ggڕrgn̙[a]\WUtq]\Wųp ӧܘcW3z n&{)nYMv|w]t|w]u|? -s;#\`@A ,E\ցvt=<}q-XaωkgVvFX2 TFʨP*3ʌ22Tg p ͭfEЬ U@hVhvf*b>4 s>7ύs|g/ X ^ҫ@zH?ҏC H?W<+R[];#3"BTHi@F!a i4@tHZQҤ|7F87Cp8n7N'}ֽӝ;3r;#ם;s;#wfgwFPW3RjkgNwFȝCK:<;X,9sw3rvFHa~a-q%Zr.Űx>'tgܙ{am^36%,s;#wfgwFX`|3,$8#r~Dɏ(%?GgJFȝܙ{a]\WUtq]\WųpcL 6yqn&yny ޞ;GR0]r|%w]v|W5w]r|<.,)Kz֝5ݲ05 %Ah0 PC` >,%L`Z22"TF(P *Bet*3P5DNS hVʠY4fUЬfG!hVDZs2|Ni9>|n4:^&)W^@~@ Y)(4BP A4萆aiBƐ H A5r/Fܨqn'3)p~էLҧLgLҧL'bLҥf@D x&Z@Б`#D?85}aY_?['QS}a(RM,@i azq%9Yce 1O:|9$5temBsY.6Uٷ*vu[RM o[k+1mJw95M.EǕXߛ[ $cZ+QD5BA-(yt 6a6bTEn%|\ɭϭ^r+s]&[&r]ȭ\6VrEMn%X˚J) [@n/ȭrW+T@nhVJ(uJ_VZPn,{~tUA@:~~s+C\ʪ<91X1\TFH>sAjSMjV"zit⟙WNҕ|+ ߰)j8? sc+VXau]4Btr;wuQS׈U~g \ߞ}7|ڴ5zbCN ]ФXoR &!d⸇?bZEδȚyӢ`Z%BTP3qL\YWU0qL\Ot%"Ʀno&Ing*a357ط3yMw]4yMYq{ Әq{ud;*@Lwe8iF,K0F(~a?0.|#}@U˸cewܱ;VwJ` [@r^9+yTxD0+^!z@:5ם9/;iP'oA1>ac1?h~ƴQp5ƁqjǮFULI^':HE KL,yaw?KGlww]tBi525}@+oV*udz7[}KQK]TZ7Hkpk1?gDMFd䚌]t \-|l{c)]vWݵoPֹ0q6oq&H;ZaziIa.6i7z w\G$C뒐͈7I, ?몍=ZG:몊):W ʺ`ӬKg՞3d_ڲ,Fރ{{R<9!dY#D݂8 @(. p+«' Tʹj/Ns۵`A D麰G oB[H`ڕ>oԕl^p=?[A hkSlB5&Sz)r[2OݵrlknK.S;na7[tO{vВ|$Hno?tD,$=Ƚ7 cD|cHnУUzl ̀XIJԫzu| %79ArŞڳz9'Ӄ"ɽ N玩8ł8 8m%l2-ԲeZSR˖{Jj2OI-[)eK=-ٴ\ޒ, 8=_ݔ <.?ttޔ?]O<,?{Фjjw~r={|'O?r?=~{'O'?Ǐ~rq洲S4gRY$Y^(SRo\[RYUWѮ-irnJVZ^ V Jɕkg-e[PktmYjǖkyhjV-c W5\Zj*eUjί)s $5xv?W"$AߺȀIptPD8f`d8np8v8~8a8i9q$9yРD9md簹ࠩsy\ir&U yru)se|R`LTIͶ%`ԌRH˺`x̻V Ⱦ`h X//%/0G[I50MomT<1T <PK)[=-MomB0q  H1DO6b@!~PR [+ ݰ⼵Rs vkܷgpne`Z{))j!%L5sP2T2ME[&6B[75߱+*zKy}YbmכBM$k$--Ԟ0Fײ*JmGٶKBsCnZB&[2vC6|MJwi4oa>JDThͬ-%TRBmz^A/Rϖ[hy|д V]B3s{XЬ %54-f\\ɡy=kzh^ )\SD>kh^1Oޚ&~37q$ʹ٤ \?5=]I4dJU~Y4]AzL֟%g4L7&7˵姾\Tع_Ym |UǛ9)= ^v-{<4&_ 3zPO M G[+2959& $cr"%՛c#o|Q4>rƧ젮:[ m*n*n)/>h9mC&:mCPJd"] r_-!v%ow]vW5ow۔EK+f2~qT<%ޗ!I!"V^ ӁY 0 F¨@3ˆ@=B*gM@+#bDU:"v!beDr>#[d@4h ӡqh7)TOJoF^ȫy#?ȏ0C#aa:ӤE V 0+ `R+UH̸Q:jqZ1jq8ZQ;kEVwI-gl_ĽKuu1N#f疹iН&ߖϕRjд-נ tvtVsN׉:q]')\}Tu<יg;}g)^.Fl-{%[Qlj 3!&ބ@LHzmmYĔșYS"oJLԔ %T+k:1qeM\yWU2qeLLy]I>wbƚnd&q߾A>=5yMw]4yMYSN0)+8ϘCq4+E|RtJf~#a?Q097).~H-cewܱ;VwJTs@+x4ӽrUNg+dʎ 95ם9/;wְR9Dc} 01(>UXBըƑqj5W:^SXI%KX~=?DKˠkD/C[&Xڊ\Jj6 ДM9ҔCM]R6 ؞'yڞ%x14 }G]]]FIzٞbS)QUVo[Iԯn|F{M}gc];.K}L߉,6ʉF|[]o&RҌE,re˟bPShM1)5%s0˟qf0Xc5{,oOPJ?{ErQN3ʩF9L/6bFZ5˼j-er/_l7/ݼ00/eF R?Aƨ6ƑQaKhՈ=R){vupKLQn1"(FJwTʴ]+r1Qiaۘ@@S6HS5uNԓmyABGgr׉ࣞO=ESzlO)K}łQt\+^ Yuc{^7׍%PA'V }R;w%լ K Sh> mNB#ì,jl&)F4ȦÚ&j\'=V*Xۓ/Hi5B*(4jsm Ud,e^K ]L_ h^P ya`^dQ;d[mq`ce9]'7J3g-<*/ﵐ P+0K0kP򌼠K<0+-K_6R - )+w=qt=.LS8:S8:[&)-st=#2sO(L8:MGGixW7j]ݤ8:M]Iׯ?oGIq5Eʙ5gQ!x6;JaG ;Ž*Cq]f;u#p%쨅,aG+e ;@1KYT%5XŽLqJ(zQHR/2g HZ@N82p\rd $82TR@2.d > +d r /d -P)d ,-od ppd LFKhd xhd lF n @K"Tjd } D@Lp2 d @ʓg:&iOsL >1zrwd ݓt Ld ݓGsO<{2qܓ( d W OJ)YHI{MqASЕ=Om"uW8r5]cW*6a^a(IZ\]Nb!:I׮7vpsw++H,$'Je=ɵ Ikf*Iuवia~(a5iء!#J Q`oݓ=m?J0 QPh#t} ~G=ESzlO 񣔁Vo[I~nB;Ǐ}B߻Q,t)? P~lG$ˏBM1)F6(̏sXcy{0? ~(QN1iF9('Q'&ˏZ5˼j-eֳ(yA5/慁yA4󣐵 ˏ"u816b~"(it[/"R-`u'{#WaSZ3pu[+6-l0D*a5iء+ʅ2C[}랴iHVR`G }G]d%)diO)=žFR4Crl+Jk$+Ő^7׍uzhd9 }R;w#YKXֆ$0!Y!V8E$+)F4ȦÚHVTΒXc5{,o YdE0)F9(JdIV$˼fW-e^ ydE4/ݼ00/LaIVdncG6FF@B[$Yy_9k;))h_ߦ[÷Vm-ߥ[9o&uV-ߢ[ɷ|n-zwVMߠ[7ӭVMt+I݊]_&V*ҭ\EJ&P)WZ*伵*UdsLR4{LRtp׬]VZԲ JQd]^v[mPVK+nV6XphU,cUZY:2`d)Dad ӧttf4prMf@nA~A2 ] LPTX\E`EdEhElEp"qKlqK?JꍿAvUR`W-kU:>j.gZ*q"8K. R8 K- p8AbP&]P8 $wjuHawI.ihu.iL`)l;_!K#Sc_f;4lKR_m_/t!9O`؉ ~F !HZ9C+L`oK}DQH^|@5 VڗP#}C\^qb o`6 #@ HYbZ(41 Xo`A70 Q o)70 UL7|H\1({ìŸ,qd1'kbJԚ,\d1ZJs]lY *d1jJ/[YLWVbv +YL-hRZbZIF͐,b`ap5Y *o+I(PV +ǵ7C hovw٧d< lt1@d6,',F1d1`d1 )S@ރ+e_AxWJ0H? 3S~ǜ1TN_0hL1NSLENSx4]<1`>;OL#eӘs4\yb-PwjNU6Kl2~_a)B hQ' oEdAy1k]{uٷ c% @0[$ST9|N5S49| o8&K?<5"Hɱ6GNOhE<B3&@9FtNlW}%$h_a~ь괶)HY d9"(:3jD4>D'\S,] dٕ@vHaA |OYx<ϡshB<:&(}>%:N-S *90CMJ 2`Urtk#!VHȮFm%@ur؇*)1_)z#\opn!̈́daXZ :A;]ɓv?70,5h$^y$M%aZzN MH@%-qvyFid#ILz?9A9eKW{-W <\S \+62^ίϗͺ ͎ҫO_\-/OY W^>6z9_}+$a}W¼ǯ; w7Vo)/]"e/@V=^fN6{-<->>Ͼ5Opo{aUUVYUv?uepoLtr{nPTڗFu|iLg^!t6؅ziLg\t6xiLgZ1~t6v)D .F4b2<#S7Ch^:hTa4j- :@V^5O#A@j|05a@R5iPR5q`R5ypR5eR"5mR&5uR*5cb.Bp*bS{&h^fk $Nye@M 0bή6+xͽ +zͽ+|ͽܫ0 1{!_slUͽ*SWcakpֵZ8\cDl/ vg~S&gCCO-uv6|Fg@^\xDn1&7x\m eF;'s6 tnv>7B7F7J7 nםv=ЇTnGYk>Aߩ^* PsGcp:<ՐO=S mIqOZ$>I&I7Mj4n<3pV)yT;7B:JF:JǛx;Siv*yV*XY3`g&Y5J6@Gh)$䢙\,'W5 H I/csL,419VHd_`bL1l'YyjT6Ѳw$=zW1Hc BG^=n㶷VzثǍzv{{%{W^K >OQ]W}:J]GH.|pWbCBHRI !!$BC{AeKCR(Y %ˡd%C)Dyx' "=JIBw9] qB܅ n|`rꡅzR4LCzO%S TC>O1qGe&%p~0Sn8?Y#cJH(A<3pV)yTAL86:2TLx+otNN &$(pY+`f$fU !%B7> JrL.Irq\ԓl!t ĤZ1MrL4dX=eKTjgiyjRDզppv_45M_}O:U)Qmld+ʯNW?r;iBnp޽wuRJ{zw31IK^dXK%٘oȁzS_`.iP/c ܥ p̋~T#C1geN74O|; @$G- ~VxFgL6}bAUGuUOI^}i`VrXxPW S4+q.h;S6S zW@=[ w+@Ӯ ʯ *\UBx`FWJՂ]+3W ftկ*_=e\N *_EJ"/k\Ej_C*oz-ڵVUvW|\N+?Ɔ.]βxuˈXjAv^.8\3^vnx'0ХvS:RH #c5rRiGo;Ƃ ыƝыG3z G/ҹ_0_j\.(x~/0x~[=y~=fw<^'4A>͐OS|ZA>-!&aaE%"IyZϡsr>/=8_٩dvjjfidvZJf?nG,q q &XL7JJR L 270©@8g, p S1X@xo!MD gx ̦27M0 4&Є 4aMB h070"F(E8(0ShaX+`%4+JSV2 m##@> G0+W/ ? c(sA#HbI 05HI#r$Y$H).FJD.D?+P9C B=P)TD ]0 C>O-S C>Ő]0t4trY 8]0M㧕HpjNy8+g<0]0y(tB:^Ox+ot s.X*Y+`f$fK VrL.Irq\ԓt|+9&3d&9Yic2rt\ VRvyjyJK# ]KEo#7mnr%fȍZ0Ua?VDKFnmFnG7"Ceȍ܎nD1\ )p "+}EHm, mFnmD $9"} 8,GHIV"O-S C>Ő0 Bhc'>m BA?Da16Ѫ 6@ns0Ğ $7@vs4Z 7ǃ@~s2 /W ;y Ab'{ #N~͋$vrɯN^;9n8Nގ;9maYkg'-DN;9h'Cvr`q:d',;9j ;h2qsweNNڇN vrj0@vrJg'zO v:jc'uS%S[mN mxgUNdM^V9Y:-6s<J!:V:IU:VH;:VH:6BݖG0cm\N8-zviz75xq!}83mA .Fk3[AxeziB|,=<5lu{Dw$-%"5""/!"D?`DőD_=:a2Zo^ܫDqR\e'YUBwdA4=S҄As+dAQO;Q! Dh@`aV<^(7>$I$$CtH I!I$ɂ5"LX1*"֧xe,uW^+xVU9Nx)z.*zn[&zЌ>w]̺2 Cб1SGT=udOB4=md Yў"}7j& `VY`@[jTe L+`M. !t; gl7Mws _vJ;=/y_BdFޮj5iF"k0C< fk9e5 J¤`aV0-X,,,,,LyPaby% UzKtk"oYzq^PRTV=lCQ6ƒXJB2MKL L+LKLkL4!U|qFuE\jE#y]B]J]R]Z]b]j]-a 쯺ۦJ)Q\s7DQ(Z_TJu(ڒkz_t2`{l+XDA((-"yI6X,ب`lT%-9'4A>͐OS|ZA>-![ 3fWVС*Rl!OgE"yBJRZ a ~U 4&3ӿ23cU,33̺L4efpUf|4dfݐCf~j̐=˝{stt;xeUiHH䐂RC‡RC?'268(\T#LJB$Qg0F6"tNrI :iAӆ!h:@ r94,~je&dP|*;4]LdٕDv-]MdMCaI!3!9rx9z6ӕ}Hd{jٞjid{ZJCᔰr2CMsY 9k@RB[ /6?3t8N@8gL !'#%k4"Běx?AQ 0W0ۀ7 4&0&̠ Sh4mh $haMQ`g)Fqj ]wޒ V2J6XiV`9Xi,ݦa*[u;(ݤm0oD#LKN0.-yuf,O#`(Œ„d 3p@ B;_aa "@[xo#'"V.ocad4&0&̠ ShD :)\?X03hbm8(N1sd _ilGC `%d&`Xi VRlQ2x je<弤DϤ.hK#nL4qw5q_}{g%DytZ $\ЙEjU>+rQo$NY$ꐩhP; l]?\Pp70GJc/:fWr?9T{)lr#Y Pcw]w${w$u >,=Bo0&@~u'އ'C'KzFDpâzć('"L,8ITOvG 7ޗu#|Bw0x7m'u(jwޣ}~bQ{z~ʾꁷ Dr~ױ*oX#ˡz yt5^n֣HK {IDP@8qlj:Fʁ3U|w83H^xf!A) :+T8O8HO8H='޵ AzNA@ABI[CA“zZ/OXPHP,<)O% IÓ"<; V8)T8D~M޽{U_vyڇc"^O/XtN= Hz/(L!BDIA6(cFIK$=GIOL\`qEXOLw#`G2(D)J#}Y*.xe읁7_z#u Wo^zW(DpF57/\Q|p (PW^* Z1zMF\*R}R7[F'`z/@@.q๼`PI! OtDWTrI>CI?=uuH\ah9wD(d^%1/DdIN%=eNaꗴ___ BWW3XznwK%?:&6z&n~&{.)&5|.U\ERqhpzjpMӽmlhp]аxP6t 0kpIںg;.jpƮD N58Gۇ'h58 e NbhpVYS4Ym'i58I iYQ ΗVF3Rzg}JG= ~ROՙ#L%$oi@_@(ӥ?/E@RAO?)$_}?()4!Oג!)*!OG₷_[0S (]D'$ aPǎMRA¢=9w#ɎQ7dP SG T2=:coE] ?HCuVgHE: #zKz)Vxp_G+J)x=҄)/=zdF{S/JE)(_Tܺ o4zH#AVt߫ I$$I I$$ ( *M e2xnxn ͢(zKC<(C0<,(Æ@) x$*2`OS4=u`O4=m` X@%SUY@LD;nf1% Y*-4ܢB7'֌Y;~g&n WldP'ʇ0^-zX o۵ZY-~^ P R ȉ2|D }^¥T0e52J¤`aV0-X,,,,,LQ&TXnQeBYo}|㭲LV8^V/ΫWת2Ң**|au,˄LRy)B)J)R)Z)b) ;Y&T\HUeBگn-2z]yyyyyyaeBt[&^7|* Zf(C~~Bl$Z{tǪzX=v sRڹW:j^7@M#BRT7W $Bǂ!ZJ\Q+jqE5."cC ƜsbNjI6 ŸpIW| e%&PFBMPDKL 6-L&kjn$[FA/2O)CM?=H?ąVAΓ,nr9Gz.˩r긜.irڸH͂']T7%$v8FISAJjt;UdI-) l4d(43tDh n)[H|}P:[zXo'~ 8ASXu;%q0&8L0308,`l)ɺ"т;pG8;Sw\[5t;ť4YSF>'4A>͐OS|ZA>-![I򺗬۩!Eȓ"Yy^PRTV, 2::;<+uN`Xr-{q& >orwV'v~_Ló<+!x9|xyǤN؂[% VoVt'LJwł<",*E9DF3N%1&cRbLrI1i1& P*rhg%,|Vg-LyH'IcW4v%]KcW4xD7W*)%t JBС&t FBBďH]f{*ٞZg{ٞVR#$UQ=6%q8y8C@8 3p6n8M:"@[xo#'"cz|E㔠 4&0&̠ Sh`z+)b-Q1 8(1RMj%q`%d&`Xi Vm*q*e+g-O6SMx7I.+iZƮA& қRBС$th jBa$Dۘ&~H:IPlO%ST=lO#ʖ52MDu6Ҧ$Y=Φ:a:Zl \g8DMt p&Mڹ&:2"^Gx o"mD?CD2pLg: 4&X`C&Є4a Lt6QgS(ZEhc'FqQc$pMJTJ&X+MJ34+-pM=UQ6jyZ9jyfΦOdK&M%e22XdYɤLW_pU&SڼϟfqFol~fovM! =6&v$Rĥoڤa]6Ý.yඨJm^f3Rב&:ͣ&R@ά&:1f!nunt6tmud-u=Tu}+Oomm$o6DWDD~MW4_2M> pH:Jw5rAtn(/R ķT{>I7H})r::E:]4 4Ke 6B6Ju;wEN!vݹCER0'*rK vBi^:$7jt9׆$^|<0(Gg赇L DH/HBz ]G!/ ]H;$!=Ѕ^C-]HpSҫ)@Hu!v|hc 4 Zh'B!=>@8 CH6ӡd1PpD! $' !=>@!=hQ YV^[lBzMHo,Z7!=a g:BzhZ#vdt8d q&k!kW?Ж]s1TJ [YT29iڕU: m;=mڕ56zl;ڕ>׮"k'?Hazݤ6| iWWS)uWsmHյqDcuu%E:7Q {tuE.7ѹsuE"7Yyj+C¾B3R'D43I4)uGQWu--I43I\Ԩz)V4wu0FS MF]oQ w-L2 FAO:I6("XMD (BeH :$р$ZFĝ`XMSx% $dW2J:^+Yx%/ފ˺%Q_ |ـ/elM Ќ/vky&lCwtw]Gw7-twFw+#]kO%>C0>,} !近OOT? O?MOs9b/[ S.c}>nfÛ1ތrFYO.,i% d}>(G_˦Ԏ񯩸X$YErf]$7)MEr Er+EҌ6RnX9hډ%3ќe?d~R2?+KJWJJZmHȫݰv$@N*"7Q*j †iaüaaaa֬ r@N*r̷kg^ ͲzZ8-s9.99.99.ٰdDrE7F&R3=͋V֊VnnH.YcztDP:,tJh KC / 2kC /:0-)*nr za 섩_ZV {Tp O'ꅼsvq^8~XU/q5ԸH T@ $dh*sbjQ6AHA*!O( %-&􄒑k*eTMQDnVZYM7f#lH` @C3cXŮcX Wv*$90 ̡s:0as60R39$v`]D.;(wj*piwZ&p 9Nlr>,zdaSg #mdE$y$˨`)5K*$f@i!B@OwBܙ;q7AwSqdzTNʆ\>CM76~9~}fj`^+цT cR$HDT"*JJJFH-²CP%H*qR8JV%ΫW[!KDB曔*JJ iҼBiBiBiBiB QɭbIZ,OjyBJRZb,a~U-lX:㋸S9:pTc[}q*D[Jd=t*WN% CN%֩[Pb rlAX eKs1G%(3mJUf! D-II ?'%YАJ,3Yaz-LD%IJXjbYO7 ̓hQd9r師9z6v "53Y{hja{XJC*CR>&T850NS48-0N ur"VPQrHnGC o⒛"8R#T&k ղMF*MQNSr:T΀YP9*gC&PT6ޜ$(nAh͛y4?@S4my SmO `, _  0/SM`P!CT2Z@Fh'@q dm:cцC&T4&44 MSHҴiZ0چe2wPMT7 ynp y \˪A`_::7iQ^VTuX._ԩLB:ZMhzIuy^ !@ : :Jc <؂bfi{z4cJQ9*1G-f̽uun|QJJ'9>`}E_ԩ2RbYN,+e-&(i b\%H/TS)]qWrܵw5]q7rmHis!IP$( J{F.kDb: H850NS48-0N ފ4$>'9 &b249 jF.#4sU:Bt" %VLbUP9*gAL @fPIɽ(%b* h[y4o'h~ h!C K23Ԫ, _  0/MDUH9#sU&2N3 82.`M3+ yLU4ِ iiB搦H цKu!_ aup ng)yn^7UnR3"j#kދm85d/RC5%Z."{eM, Y:E5CG+lݑWIIȿՂ(%[_Ol.hV׍jbU13WUMzq"V 4|zU5J>MWKP&ѩu({ ے&){蒲/wJvG'%G`G7OH*Im?!m?9ГF,Dή YQɉ\ud! h7ςyE'|BNjBFڤf!',";:PSEgiJH8 >MiɢT)"ͳ 4YgvpYAiA+*k/DTc*m@,Aۊ$Dcuejjuct!=\ (!˸KQC00i$@aYg\Hr$K뻺\OBKoեr#h; i[E+=Hָ4aSti;NץD?H־/u]Z'{BWץ/K;u]ڠyCaץ?K;sv]ڤ{aԭ|->0|60&vmUq#o6n m-գU|/^ק&P!PKo ys 7w|G F|;IݤRu>lrgM63oCV/g䬉E7W8֋D! 4ou[):(\(oMuc^-x ~Iym-S)R7n\B1rsmZ'`\!]H)HW(u7i_r.ګ]{Pwld^.>= $y H}HG:KjgI &=.%@P7sHPO2F\w]puvX/awCuv\/ewSUv`/iMUvd/m]x*Xϸʮa],+̺nP=b],+ͼn}b],+ξn2{(+ L9x{_\ǂ#e|_bo;s]ՏE/v?.}N=qԕwM6A߮NjoDҷv^rO$Mt)NYY:+h&]D&nx ♬FRai_Vɂ$>«3YdY|_& L$>$)L@pINL 8IN@p&@pT & c *\[.LL@pk.`jC{p @ Tk￵<+0z']E2}+W^pç&!˶xmjjd3o`3 &! v?i8pQ3d3u4dI! 6W*V{SJ0oUtB47dӗD@#~&M#^F0OFpP`i0oQ4gҤi'W['Ç ^\ԗ,I {M3T#V>PhyMeSڭCV)'/BC|8bBeUDpoX藘csԮG~~"x#چ0 $^,K>ü2YD7fݬ-tn&F7OЕڑOǒ\Ah"ڻkhڻnh6}h$vXS~-&4tK8F8rZ9Q*aqLqqL![ C%) 2Ȩ@0L7Y fq@ " 4 ڀ" Fk^*FLLJ7YnqvGZie|GZiu|aZbad!+@b򑛭la@+%4Zhɋ%Tm^WMޝvU}[k5/55/55/54B/PWq]`CuCbG>Gor&wtpG:Qx0Qo@#R$^kx%r|(Lz"ftwcb ZA1h1҆h@1ÏRQ ?jG%YːN,3{M%)$%ĒXKjbIO7 ē;ARYK2+If-ɬ&$6d,]vw]`W5v]`7-!K)l峃qh` ơq`a!IC JaoHMs*0 ̩s0 i#7S*`UW: "h.iбED')" >UT%q2Ub2T&:Mt4t&FMt34MH: p(M1^z Xom`X?Os`UU6,'`aLq`f)aqXXA/&hM wgp)qw\;mhjps|2O6i|!ȧ9i|ZB޲*w0t^l!OgE"yBJRZLf ~U K\Nʧ9M\zwC(O DEk_|&,F5,<-H/ݤvTO<Dw(Aj|&-݄F7'#fZ󥷛vnuM ?*G-OX%%Bt&-݄%%%ĒK*% KKo7aV$d֒jYO2I2'(ș<9_z Ko&+ ] LkH\Xzե7C8T08L0x+`9# 0̩s0isHUd:mN=+%;p%g8VJq_`'㳒Qr"ho%K$+V xȒ,y(*WyO}'f vH|Ƞ(^}6T$'tX쯨]}FGD'`uT(]}yU'QNu\F\}MT'HU9M.ԪƎ.*:65ZSM-Νiٵ tQoM~-={g,\W:&hsofɖރ{zok}UKQ?jw# o$DyJwY.ki0ץٳ_)w͹zk&\Im=9{SئޛOud?Q枚jrmκdڅnޓn'kb@ݿn(yl@n)@"?n*{*YxTV[UN5䩞y+ V7yH]uҳTчz~otW'˩cN~zs.}$]y֟0*tu r;@vŮzrڻM@ܲuUzMrIwFf+bA5W7Y&K~v9vvP~`RoSֱ:vbN5m1Ff٩wKqy1.i\AU= ?6T@؂[c <6\jc[bblQ- r`o\GHI#IR$0wлbY6~S.v]ϗĺVOyY8>@'MI~!ۆSsu3̵QyR_˪aNCCaN?9; ^[2.&tz'{JOT[,,(Ym?"+W*\N*sWYqEW嗆]9qO,?8M6T CD95Kȳeg[,gk. ^aֲ/w,.P=$L:17rW{[=pYn 4=ξpk#_|גf}O+4ܺ`í–[}0'.ڦvSC/Bn~|'{5aڶqbx x6Noɠ,Zqp=ne-i./bӿ?hԌ`vե{#S3ophG!1s?pl[}7naӞԓ=՟ k=ɻ}hoA-zwuo&}{^E[z]2Gs$OnPo8̒,8?ohߞQC91M_p+~ik>^*G>7䅻[䷾k7ox}7kn]yJնwoxG.PgKAsO썷\Kܡ}nå:\\ >[|dRS"ބ_Ԇ#\de-~WzÒY9;Ug*;SƓ%CeUęַ }rLW\=͵HqF]Sf^NF߆ K~\ d$C BԇBP &>'(Q[1|nX \:}_E(_T&~/E 2f&ڌwN I8)' Lp2N6I^W HkVdGU dY)@ d*@6 I^2E\7u4\*JEv"R]ȮVd7+[͊vEIEYEv"劑-ptR)ѡKt(%:jDU,a蘔蘕蘖JT.*136oʺn,e<2JOZ,i4xe<'efWj۬և%l>fCVx,@Wf[՝VuVx:ήTͪUw󪻅Iի*nGQZj}ë@_p3G?~: |QWF_~m(7  Fg.8{5ąɨQ"GEXaeTQFEXa:*2+;W {Ǚ+>^q5g$NI0H K$ 8H AR0%Oawju6p2׷&+\nt8pJ ) 4pJ)>6M(jGyoğ{#(h;؇rAL - $Pg- ¡wF~piݏlnE9(&䢖\TRrj $~ftMw-$ļwNjI;yj m]=Q~ d,UBVA:! a!5|ϋ> (mEDv]CdWuDvBdW)#Fló$ԱpG)ux^סux^סUF ݄MFя;T;5NS4;-NT+#QiT hKLhӠd-K4RSlxP} 4 [2 oSQw:@Y;ug&n3P/]7I>};G[D+ xު7+ I~Z?*P/  `%m5\F0jFT#̪jj1@hBvD2ѬL+'ie2q2q2ѮL,+P@.ԷJ~fJɬR&UJ*iҼJiJiJiJiRzfFmomhzŲ]$Dwْt퍭[]E5%䢔\%ODshĽ[뷷~NjI;y'=$]Q$vPq@2Y! d uBA(ÂY8-}4.#*"Ȯ""Ȯ RF oŀ9oorCP:t0:41^!mFG;UN S; N ;UH1A1nV{32r $KJ mMֈO*#DE` zY]"nSQw:@Y;ug&n3P/]1Iv3Lyި* x~R?V+ CeAy F5U`V#jY5´a^P`V^1n7*chU&ve2qV8LW&.T&T&ڕj xؼַ*Ye.UJvҤJiV4RW)-T)T)-U)MT1 Wh4n̷HIbyZ:+'50#0>=i)vݟVEkQԛfW?;>wmܘ(#vNvى8)ɟł<ݖZtͦv|914Ob-߿:Vy[___A,˞}>_gt BU}V ߚh݆}Sr^z-|o?MpMn>))9 @<=h37cPGmHrMGnž)E9(g4Hst45k׍hMnF>)I'9$'tRNf挥f˺ӖcsJY19f3G{SNxM4nH'H5]qWrܵw5ў8$clJ%CNP:5Lh2j C)$\?O-S 4Z[W&8^oCx:kVv'db0+aZC}e>Vѹ+Ĵ|aUi2:p^`+,4uR8n=qV..gͭ0ΰ.Uβ9Naή>`YuZ|m¬u끍95 Ω- Kyt {)2Y4΢M :HA)@msW4w.# ҒfL59MR6Q&l8%h{cLsso#O+׊ym *Yt8 Of#Y9:8-QXz0`SgSq+jݳ2{YW8sU{3;N}w`֪;/2Qs½^f2c櫯V-}?o Z9k9X d ߵ-|6{jvKN8\gk-oh[ctR,m0sX%'pL:I!8$ tCT aK{O:Ig-&t$aƝY'O$:դw=Hz$IìӰ;=wXG"ȩ'rDN3>l0v1h!m6a6V=YM9n  9x4Y .4['o>Hci0N0WOEw {j'=^8ehޞ`]ieټ9?!߇Ky@sJ_,.ǎ9vرo۔}YY2,7+ r@t?G(W_5No8ל&tXA5ߚ ?/Bӯ " D1(gY}NR"_ yE-%Gby$9$#6Aké}!7|Z] ggw$-֐3787/w+g Mpp#s[Fpkv&|G'7sҰ=܄o4o|I6,o7tOi4B~m\=I"~i ng:Wޙj@1NTE2*N!Zt:B!t ]|?:bӹhpr.A>p.yMb'Ӯ+?+tuJOds׭'Kg}dwB;Y~Gۺ~ j/M`tchX]ԙm=FZʣ 5ɥOJVd>OVYd>KOҧ'垬rBC>i)^9bk|dy|dq|dy|de|dm|dk|dc|dk|ds|d{|#/2>d|nQ@VF.]5flX|0Vi4fa8mahHH II J J KK)Fempupup5\9\=\d,jpu խ W4\puխW<\pu+õLfxlc8u\?vKc\5vֲ1/a2kc/a:cKc0xcX_9 lsY\wa2|A-軰2k;,:;2s50/ήAzX~8g&?_@'[ť ]q2A\ e2r_ ePg?ss|`%Y^D6߇B~"r߈DnW"3KkFZ6굑~m_6ү\问kFZ6j_Ln#4jl:cb&?G3[-n~8syɫL^`ɿr_`]0/| vþrY˾{wW>)^7e˿9Ք72WW/x؛`c:-lIߗ='^qt_~gbo-#eѽ% k~W-OJWwA48GP<΅psi,° +2, ˰6, 2,˰>,ʰ-NJfAʫ3^t_t͗_]\qeƥFj\quGjFjLѸFZ\6xjgUbVrWkVoZimVoZi}_WoZuV1Fck~~iyfnna=߭,軼4x΋9탪|g~tSj@4èҨ ?C!\v'>ߞ.ɽpK}T(!r!5m=5-TlOe>nRR^Kʳ8ަdlKVd/~PA $4FP{C ~{bLMi8`BNA/ dQ2j@F{K-p[G8G\.YT vKFIr IHRV iHj^d HvҤI/@hD G\g(hd$Y+IVJd$Y/IK͒d$yR<+I6JRnZLRtd >qo/ڮmWkEբzvhY.>)>+>-n uPI3IqRC+㡖xe<2vIYiyj؀ZC8ķQ {*=žjaO],i\(iܚ-#P~ry?pwM?h `po3f0Ɓj1n2Fa3e4Ƃi4,Itڿ98<:<><1ׇ7d ً(O ?.~>\p+/ 6\pRT3C0li#h_.('g%7Y]ra6~t '4~ '0?6C /76&ki^Ls47[Nsq:|@ŅWT\Pqm@WT\Pqa@' >Ph_X#^-tB7[/tC#,-2Kk#,-:K#,ۂ~2^(uR7[*uӵR7_,uya4јFc^yq4јGc^Fc^` .}t?ߤoGr??awJ•~~dQXq|CMF˙ S?3ލ~~d ?7e`1)ϒX 3QOW- hNo'7#M&E4Fh"E2S%8ti1A%mQܧ7#M&~kbQ2j@F{KҦ)3 Sp46Q\R;@TT[~~d ?ߚT iHj^d HvҤI/@DImR,$K%ZIR$%zI]l$%ɓYIQrӒ-pղ!ҽ~?߄oM W*ڮm׊Evvh]}R}V}Z*Z*&0 TC+㡔xe<2v]cRcVcZc^,cj6և)ܐk VS)T {=žfaO礰笰細缰BaO֬򟶠u ~denB[]* &x9f4 v4 D4d 4444T#4t+`[fhЄm?j1[ppfM0~1~&kK^\r%f'LO0~ K'8~ Sn%j>}ee,Zd5͖\8Pqa@ŕT\Pqq@T\Ph7`4~g6&^-tB7[/tC#,-2Kk#,-:K#,8~D2^(uR7[*uӵR7_,uya4јFc^yq4јGc^Fc^<3cwj^ω?|g]xY~},?O@~Y~P{lG3c?~;DZ.gUGweU߾⿳hꏤ;NF۾kGiY'ң@AHTC_7(n}=|q+7Hhy=|q}8p6_OfCŸGǁvEB_T|y~WUXl%v KW\_e|]l.Pֺ̳ٮ+E晹L6u]3ds_פ˂o\lSwOrk~,_۶8_}oĆ{,_ŽS!93?GXC{>LC&-poxtnOgćtyQ".>>2Vxrk&&mMRuY?qG ̻ϼ,t}֏9au^,.KAbP.Y?UhǷܣM!wHbpܡwH}֟{C#1^AB)yAJ)YYAzr`Q-< Ea[PĴitж|ɑ;%rEȝ3"wJ:z^$WzH[ x-ϮZ[GjA#y+`<>9Y҉j:QO'D+htgס&!䎒UҳJFV*Y%;4*Y}v`jn/e#l%䲝\$gYr _ um(tb|'W ۫Px (ƾ/ރ=W&W#RtnmTeҠMVx '$9pVrXY +kae5,a2^ N'5]xW޵w5]X6c^?%C P?#pq2_ }KT8N5SO48~i5'->o4o/-%%l>y!Y9=+gd嬬rb0{ay#9o%伝$gɩ/e:1}9+`$01Ls_6Tjgiq2Rl^Hz8M2N448-dlx$giyx^H<$>?!E(} K _a|/ ~|kk ^G8 _XY:RgQ,}?_R+BBHRI !!$xkJBR(Y %ˡd%C7D_D[k.!r⮅ ![jA/W!zȡJꡆzHޛ2nB/%S C>O-S C>Őm;m/%:g4v؀G-8zDm$~{qqhyjaqXyfGmI3x9 #SM9tN+L9tj7rQ* rZM 5p+ 7H;ύNf_Y9:3Gg&9YnrM2 eTgi~WS6N/g;082ӌ<㰐q3F^6%'Yqx'+G#j+^jZiJi)d_͢f6ވ2!Oas yC^!OaxзCݏw6{.-rS/;#߾=&wX_A+}=W6~wEYQ D9"쓸6wEX$I$$9Dx$?{./nWDY(e9Dѽ% =wTOWp=]uWBݵPw5] ޔߞ˻X C>%C PC>1{.~\޹JD~jjiD~ʑnU߻ n=[Aح'!}ֳ?ui_SCtqF:JǙ8;son]ffVOjVw\މjrH.X3`'&ɅYrAOnڞ˻O1Z9F3h'9Yqc4rCSSMfN5MRMT44O5Yms׌qdgiyq^8O3~7[{?yWڋG;x7؆Y&lsi[\n&&@n^lyYnږ~ӿf߬oooط7w˷}ocoKwŽG834SV[xމ&rNCg;ྺw8 X7};vuN"$JDkG=,}%JR_I+Ѿ=8 nW~XWvA"bY BDM$B{I#|܅ujN:+P'zo=xk{-9\p7J7YkA=`tZ'&GoBV =ڡIQ nDwQjL Ii@[xb;>'=l'iYyFm;>wDhiYZ/;%,~.?窦UyIrol')d{(e^)հֽmm |%LY,KA910l)]# ro4 >Lc10[fН и`OSԠ?-Oӂ4?m s iA7 _Ŀ#\ k}/ms3y9P+l ByE/ jL64$xRjٯΪ3kIܬFnZ#7[[ktʲU@V1V|{rfż]1?UO+ +KvH'7wFI¬~aZ0_X_X_X_X_nwhvUr4AZZfؙ~7vqR8+s9We!~׶~g+KiӼiiiiiii^ [ֆlu 7Yp C χ@^ye!׆@^yu!;Z}~g)t P˿t}΅+rUi߶J?7wBUZ?^ [hI0;!-½)æ w̿s9^‹zxQ /E1{M~s{bOzI='#$~ozR cNU`V"ؕJY%´a^PR`Wn [UWg hV%UYU*q^PRT8ly-2_y\+&J iҼBiBiBiBiBiVݡڡ o2_ZyVG]pm`zjwyO-?NZ(re\^wԡ:/z3&v$H)EHaRZ`ncbZQ1j1F!{K-GA')$|҂OjI ޔqK,yd),呵^/g}T/OY'իex7ŇrnVY ?˵Vhra|[g[~Q} eԖC[~[a?YTnkl`P<ʍS㟍r\I3%(wNЃu/5F~`uUm!%FX9 ZiQ[oV\]i3^70_`i5a7bic ȏ `|@m(~)Cea} W0! :Cuw?{:؆^i9IG۰+MehqO!Wkކ+n[`AhCn+h,aV hpo6ĪE-O1X*}z~P!ttLnXG: [qVC"d{w\mW:{.ckˀ*5!{g5+m#q(r²}]D>zC-?w"i J}H:$"DRmHH}x>2>D+ z(O1Ze!(6Qvt!6vQ]TXnlj́jjЃjþDH[U]'Q5EZCQ5EF!ڶ~2U l t(&Y Q5(& Q5GjU#;jUN$fY QN_ً;m{^ޥWwid9T(4(:hmK& '1s* &l*C|Ym*<}jP_GDGʍ??c 6r7Kb#RnhmŪI !Fh1Z*HQ;}GP⨇{LPh1\z c<b$$ĐRb! vǺ) Ze),вZ mЃCK!b⮄k!RTzOp1CP=p+C [6Rm)}*qZܧi}qcɀA >#$ PJ:mY֖a Ӟb:NMǙ8+gt!$&rZL[iy3-o'iy5-܎fHզu^0 vza^9!;70~G3h'Yq4'd:_kC2qH6iCᐦ89`ә;c2#O3<<#/M<#4{2(D'.?N _סp%_gvug\oE4,Oଋh~2~۪QyӁ^ߵi`!"<]PO0򖘷Ľ%mp c e.2p=]/}"%w~1_n":e=b!gǝPh96T;:ՎN# W(O!iB=Ҷ%f:7H~ݿQP)"gD䬈&E7l@j=CcFM)\opWŌt0V :A-hL>Ig04G+h$A=9d&$4K `C6T̓NI#iIyF40M5AY?Rc/b^V~-e˃'<Щ[?}ẗ@G>lS"N.Wm}9҆ļ%-ao/V~Q\f2K.3qYѭϟ>:K~wN"(Dq ;?D`XSEz8N}tE!#і'LpMޜڛ{sRok T jzzы=b&tH5 cB h͞3&",7^ޓ{{OZ;> / Q"vyAV#3a]`OKTʣe?oQ}+jv?z=o|[y8s: yw1B_w+?XJȹѹs6m_QĽ%mЈڴ>]f2K.3qYH{Bwhvİ!;?doM}{8N0(#oD`7xb bGs10 ݐQ#1{szoN 1߾@=zGI}mZ5Ƚ]o|NshNsT+6e'6eӇ&[{mӺrStiQihc?.n~ݺXK?Z\%T BaYОW^5U*Umh+vUD;RJcmG}Fml2}%UI_iWV1c l }J>_JjhWؼFKh>}OonpӛP:MH&|zk7I>e[ ċl>= ґ*=k /Fo^L PGߟ˷SPua>{fnm}}pu}8-p,[%Jh9.2[57јֻ8Z_G{[`0c2nd܈Iv՟ߩ0:Gv&oQ3wunzޭ9ϻ9y;l>s?smQ+{!pK>CmO+Rchic;Jȧ)omJ(ޜޛz;]qlk6G#ؼEnꏏc[Uɽ`^+y|;ڔG9Z=G 6Oج&#Z=ٽ'w?9Ǯ6GP#vyAV#ctqQ;Nw^F'AmF0:b-) MۣޜޛzwPFGأģ6B`^F0(e9Z=G,6B)H=ٽ'wqOmD#vyAV#w蟻6mC|omz8ylWv~#hJ죂ޜޛz㻍P(n#ң{F^6Hh5XWۈ%6b=Ghn#ۈޓ{z绍Xxn#!lG'd5ۈv>s\~>sv^mmYIcֶ~͵5ymg `Yccض~/5vmgskeKׯ_r_3ן%g.?s}KO]rw,e~_iutƲrܕw?|5Q؞}MyRN16xo+>A Zn}x{=>6Ʀs`칏 ub܇ؽ@ley#{#l}cCy/O|Wfҵ$lk z"f mIf>@G$mc7Vh3_ Y;3K3w<_|f\])kwu߭=?|gs}>/|_ 7aS`lsDWwo㫼Mn,vvyٿ'q4M|}l탵k?] 䞃s= 1Oh _VB͍E9(F"li>py݆8$ВZRBK<-5|AccJY1 1%oi.+Z.;@WF&h/"I84-CM84l#FE)s*Z>ϩsr>CZ5m~c#M Ǚqi1ٱFq#hfolsy:5O<3tvNv/pz[z3_o'z5_G ȎSR;y+`$0;y>fA6͔b?G;8??&dp)LCf8)iCp} ؅we*xd<#S<G6}QGM lfDg8p+ˡwY Fv$7MU`rum l`eʉE/r+Aݲg [:Q>lG˺yOY)=eSKb+[qIn bz^ me}}Jߧ)=l~:J1Fls)PC2~F<ފAB۬V*A+`N {mDȢY#Zd@?^6 Kfx/MKjx@O<>65ScvycŘ4Yz,cle/ۗ?9;;,~.z˵Qs c+^h\ږ9UVZ/2_ل uT[jA>lDG׾yOY)=eS}}.ovW^`lߚ{=^CབnvIߧ}j}Be%k;i~^9X ϋ;0ya;6PCqF(N n۱Xx#oxPn;T fPA W~ݱX,ZE3hGNZ[^K^l}7#+1f;<1bzw [lct#S_9<ᆧJur;ŕ-CFS*ċ^ C+Og*0W &?ElmuVhG}$D([g7(hr͝&=e,iOe,dsr;lEߠ;$zȽJş 'ZT>Oe|ow@Ϯ>l)ۇ-A?Bv'xg4mҖCqz(ʼn-Ce~ƶp+x#ox^$L;c;T0 JPue&g?c;ȢY#Zdu(ރ-|<ȶ%;4 / Ǭc6Dǘ$<11-b8>G|Ngr?my>)uBS>)[E_WN_NӀ\O3ਫ਼bgx;.3⿮3.3修3.33ӓ6KO/_~K/_~K/?q}K\r_3ן%.}/?{̷zm]R~%k-TY_]=`|.n>o[}R77m<'myo`IzއyҶq6}Ľ}'my\odIzuҶQ6 %cw:16mOѶÁvPwv_Q7wC3>Hvpva{A7 nWޮ (]Tx1ew;T}{RVk2`8]\`{Hh;|1[ zhlCh쉿K >cW|mlo`} 1~aw0hxh L .pw<1ƒelfwO@?Rvc.ǧ2dm|;Ƿ4Scm"Ovӣ#h#iloM;mig[)=­)M)])m ʳ}-ʱMj;ݏ1m뇵WvзߐFU6\doc}hl<؍e<؎_~#lǯ<67;;c`-1|P1|X1|T1|\1|280zcw|'w|w|w|gw|7ٙf;tgw ;|3ѝ}Nf|~fxn.̌]+swmF·1~7gyl>g ܷ/3~o{:~ox.[zk[yoO);1a;At~vaN ,OǛUy``y j,(@#kD x= ~r!'%$rB.;q yZ8|VZY >K݃ G7]i4v%]KcW4v1珶]%t JBС&t FBPV@| cd{jٞjid{ZٞJe&o%/Wx XE%rm2/=oy XuNSp:Y@8g&@8qW2 Gxo!MD gxY [M0 4&Є 4aMB h.oل F(E8(0ShaTw+6(`%d&`Xi VJ&X6@3lAF-ۨ jyZ jFn n$ O/ݠw\yT/4Ns4W6coQTh]yGfThKLa0`e8(cghpN"$JDI"NMJ$ľlsByy}lA^A"bY ʾvt,4.r )[q^hT$C9x-C_'-DаN9S :հN)m6az C !>"0H65bچ/!@3uVN筘ϡOHz=\opW­dB3fzb:XA3`+ԎI :zBf=NBj|A4BI $;4I Hz=BCK#iIyF4&A5i(?P7n_>/P((9lq ]ߝ>NC|Ev0A ai#{{3hգN"$JDI,@GEWG}%WJb_U( aQ-"RY dA ' R .+"} mAh @3uVN2!H{Pp7V +Vr*!`tZЕmBnkD =ZG3h'G5J@2F"&@$f $=Yl}ZK4FgiiHn mLkopZ{[F'¾BT%dZ{k>N"$JDIJ!+WJB?Cl%uZ_ Kd1,GY/}_KBHr )S/E 9x-CBBs?\e+_<\8BEcʑS{/[?f9qedBSo/] ?:MϋPDt_i}ׯߴMoZ_7/ti}Mܴ~EoZ_~b7?qnZ_%޴MKi}֗r37/gnZ_Mܴןi}7?u I$Azz3 M}T,Hm0 X"wltHQCj8PvA"4ܝ0)^Zߟsl v@iDImq)vFt{d@OOu$"Χfh2"=e'Dt$ Q~H y=3Cu(r<sq::37ɣgQ 4p(9|u@JnAJPH2? 3TFf+O3آ.4+XLTCGcL#2},S^)ǼS|? 8 `BRZg0l!+U3 XK5 F+" UL3 g0H7v`"r*2:DT^b**kN gTZyNgTZyNgT[yN!T[yN1TP\yN)ɕT\yJTk>ǻN;巎w8wk7w=]x71ޭ7w}v>}xY/WU/SQ ҫk׉|Q_mƹu:շ?GFB{jVБ]C@Һw=뺐WM0@0: 6xh`A , slT^yPd=E8# SdU *D-(dPhp wLI<$%dLҒIj2IJ.&L?jWJ^Y+ye=,UhhBwȹRܵw%]KqWSw#]N?FPq=CP=l5C0=l%r[ C6Hh⧒%~z⧑i%~ZCh&Tu2]d. iRpXB%#4+] ~"*HEr*TNP9 *gBl*7PUтPYA/Ah͛y4?@SмZeבM`L _f)|a_D ῂDb2@F82΀S ȸd4,OƂtcɄ4ِ iiB搦H ɆgV8f<7Spܼn^7/'vˬ!0BVc:be  QS; Xpy=w%;,K`,c𛾫; R'A$N U8ڈ X_E(u"Èfi(BBHbI! :xACR(Y %ˡd%C)D1%$C!b⮄k!B| ΓC=P9C B=P)2D0!YP#!rȧ|!zȧr!bmlq`OZ$5)|&*!oże<3pV)yTb' ~6!t7v:^KTIlIY#`e̬UdԬ*hYś\frN.N䢞\-0C`sLf1MrL4dXATjgiyjRDݦ 5@?B9b ?~v?O#B5߀ݠ{=crл <^8Kz B`V5s_^?/]G(viׅ Tpҏ}BCHrPHq8JBb(Y%+dJa z(1a qCw%] qB,Q.;!zȡJꡆzH&(I C>O-S C>Ő 9 HhE" m NVI[r^N\w7cvJ&5^,sEMl\i*x9UB5r7&3j*woLVtx" [%XH/ѱJf8^>Mxh R9~} ~FEnt_~7_}ׯot_O辤ן}7?qnt_F̍K}ݗq37/Fgnt_ןݍ#|3 e'};/}kwϾ$=0X-B㄄VYUDZmٗ^Qwxw싑 [o;tǫ 4֌k3hOqX q Q@"auۡ/q ʯxx,Q^ȧ~"nkʧ誻: $|Ld8VwdHVF?ǭj ag d[Lz%qhFk0^riq '3 U{%7L]:'gJo(3'+`SpҶW~#(nMD~^ S|^śf_iO!y7z }ӟF6eP; r;oly3(^%7y:1]a>KqmP! SOxjDÂMg`M~$pryY39G0,t֝&_r:B?Kf:}`/B lٌgp:OP[>6g=Nf>ݚ<\iSf%)P373mt̻,z N턡^iy™|.NRY}:*#?hlfuyWy.;/ ض1)\;xzԗw4u.=ÅH{A So3\ @TRp5sZ>L W0[pMq W0_/]p]A W0c/ A "eo'5PJNA$^$^H$^$^L$^³$^Xn({E+J{}ޅwXΖBѻLѻ@./šwii]Yz'Bл$./Abл-[@"лn,?l^y.O}K>bR|}i}a}mp.Zvhq%VbA]!c;ڏWdJ uL8j\` dș=b 7B- >&Z 8ς8r쵀Q g5D$Kd"5DH"B5"Ƽ hB1<Ϯ³k*<n[&< =̃n-cuXVաcuXVac%4#C0"lT;5NS4;-N'#޿H+<"P D'īacpZoԠot%H0c;*D3s")(dȨ$0Zؙ5qG$F27%U$pPRW]HȻ%uL=G q#"ndč7*FG5W 2*|ݣ̻&R8ѷ2VAj[}o'gdp[˄Ќ*g#68 'G)pZ$ GMDDµ3*=FEz dTEūQzTDTLTTTX)\ڳDW+NG(h j0000!^ ?Yc TED+ъzDLT\d9 %?u9nVV:],r%v?jw un>n oziow۝vgyow]vl \F] Yb}h#K4ь*I/>;?aX 0F@6R;(?"byD""VF*X R$ff< q4NƉ8@4h -;=\jPPy #/be0*F^LjA5=cQq` VP :Xa,N 5zᵮ"(ԢZTQ:jq8+ԤZWT{NTߺuǷLbR+\*?um݆c[ 0-4.Wټ.Ǽ-wnй;dR[d`*np*d#MrIrT`<uD6ʀq63u[qY #Lm| @hctZQл F P9 #i~͏3?-jx<u@#+8r#+*!/S@7Ǎq|X7Mhk7Ȕ-;xs;.xKRNa-Nbt-$-;Fbޓ; /$>jt@a 02Fne l@="G X +"beDa1e0<c 8 'BdhӠq*4Lpzфy #/be0*F^LjqV 2XA+h`&ePhBTZ.K(ԢZTPjQE- jPM~-܉VeCC|&r}\.dF& 'a[_.a^;d/I?B"x>.܇{7ɑ&9$d@p!q>,Tq4y8 _W"~>,Oс4:FDGdX.ϓz#i~͏3?w_JG~H;#+9#]?|Kr1>Lq>n&ط*~C;zЈ( O1 ST6 HR0͘*9SB0Fˆ@Ac YK"Pt:"V@JX+#bD%<e(Aq8 'BdhӠq*49aJ_`JECcEW0F^" +Ѹ`0G V 2XA+h`&bdPʠHCG7ĠeԢZP*jQG-NgP㄀T p=.@'/0ruJIͱi E:&:Z{7%sC==)#qEg{hHC+R4=Dp{$ k=҉hvL2P u|2S)*Xt6w?=Cߣ?=Cc?=A }o }r{|c{0CC߃w4=3=ġ!} }e{|k軄lk>NC1ƒWb#j;>Ǟʆ~͚FV m`JS:5] Nx-3&SWۗ(B(2R(8ܚ)Z*ժm-^ h)C)pH@I1@6! evF7} u(]? ?r7{ R5LB̿0;7URj l) uh\Q1w䈎Q,lF~ Do $\P{ DƤhEI_]E.XEהQ*߅cu8LQu]|TxTQ+boM+G!GKԻQ=&:W3U?^?q/oˣ=u~O }?T+k8*¼;͍y M:**d\kqdjn\\`dD#kb{U?~GnDL\hُ˒:I?43q9Z `₣8f&.L\p$F8M zu]utc\}>]y>ucXu>5^q>_m>c\i>uCXe>5c\a>CZ]>Ƶ]Y>u_U>5CZQ>C^M>ԵCYI>uC[E>&֐uY?>cjX9>֍Ucr͸'x/lѳYg"?kCj,JȂ&ƅ -BNX]+>C$Y8 ;w7ݍqwXw7Mpw!56ikcY0v]cE0VHӴXaA= ԀZh`!ZiFX-z4P*Ce22TFhPː`bNBH8fyЬ@"hV*Y 4FK 4K !s|N9>T#X1&2^ҋ@zH5 ׁ@r2shcCIADH iP A4萆 H b@ ,$2Q7jFܨ'3)py&րdN>M0\sNFވdmēMPOB$S (g)2` heL r>rk4ʹtZ2=ox|CjIdmsm*F=v oixCfIdm͞ohSp='o$6?0?40x#|mTȱH;"XdccSciӀq'ds*|N\MbH/E W^@ y@y!%f! "A4( ҠBtHaRAT.$Q7*F ܨupq8$U \^Թ:~QN-rS 5B aQ>.& EdkX9,܉Eso_&X+d9C߿"NaQN,E{&Ѷ96+"JnQN,E{6{fٌ;4`鈑XԹ:go~3?wCsy9,E{.w,ҎEƱ9Y"X?G ν}=>+>}"f cF1nƻ nC#"j`μ=;Wڃs`,;.K`"c+ gJ34|4'ds*|N\$L :VO"UI  ^ҫ@zH?$#/R01ErҐҠ@4H i! H9!&ʗjlU+ n Q7F8n7NJU,cV:J׋n}N׋>IF@dz" #k=Z#kmx1zeu 7Lad #kD&Y ~ȺbM:#+EpYNNJ2&>ֽWұ2uitac5B%9t(ӱ,Q*E:V0ӱzRD*f:@+e9 S+ܡ gkGzq`~0|`q0|` 75>1>Ao n0||c0|;C  ``wÇ<>3> o ia9׏tYwr}˴~Yt/Bm}VTZ6&kLڶ͡9 7gV#:ro`cpsUacsU@{MHvYɘ |BPbsM m+Cr+I^S 3og@ ~w?$DZ5MS~b -R\ⴠ? Xԡ#;tTOw:'`[ͩKOv.paO:{WK/TvAO > 3k?`Th(dҵJ[+?FНЀZr.*_ՐzW]%iK%Q!d+-F W7ƍ8Meuˊ#Otǎ|Q!fF: B:ݍx1kSGՅ5Y+pPU8EAWoC'j6 [0DwV4~!6.@ފnx䭆[Zy+V?a5:F oEC8fVih8$LX] 3p@mm tlp8l[a_K6-k; f,BӀDx!8aZ2]ҳZطEkt!=ý#zV<<ӗl uc }g5 ˯om_q_ Pơ3 _ޕ [Q1&ox\yA7B&o ݼRL݊8`sn]HMFjh]sFjm1F8}qRsFYFxyԦ`9u$;##=/if=)f7tIDp)Qv#=₭,b}x5V4#ڇpTQR)RB5RF5ujJVH i ^exNj-앻xuM'{b#x+=3l5ʞ*e ~yx'?wRٳ3=laIz6P{66Զٶƞll=zz,$z"Dz*ReFz&ӄFzXJ|y a q`a q vbzn qy`ai qYiIq9`q)~a PqemXt>%cfЗcb[h>fEcj]`b? 7A>)b ;j %r~9s%siF5اn eձO8ZVЕ%'q3!&˻,b=S:?Q9?C +vNpoC GsU $$`*$^x/A24"?R{ (W ^A+x DVDF81W*`E Hi"_<|Q/JE(G4#HRAh!+J2+*J"K#ӧٮj ƀ `o<؛&`o2؛M GǨڽAt~yw]~ew]~W%INcV^0- HE/B8Fv R!!x[:(Cx۽c!겅]G: ,;d 9HF тd =Hf"Hf&H3\(;Վ vf'%BfY-dV Cf'BfgBfBJaJ@F\FjFVz5ʓRuZ`XMM\O#,\ȯD3ϺK٫azDLT\d9L|Z;B!H@tЃ000000tI)=+A;at 757dn$k~-ׯe-d 8vo/m,rE7@8mE7XO9c=c] d?>9hGH` #u$M-N"H9#c|1 >m, \xr+ D|_xI06ccx06Mc Z!F` t30;  0.C5C~BgA׵0xCC=LG2$d;E=OVBt;qa4L fSKR|9HZ=!AJ!AA3ASAsAŊKoq>,ɥƌ} BQ \70;5.݉{ܿi5;I#>JXqSKowjN,%}9qD=.ݩ;vGw6:Fو?3߳wC¾b۝Xz;X cw>#yZzKow-zddu2NFɡb $ qN,+<*04""Cp"&scX06McD0VDHUjd[fY`v]fE`v]E0uYz+hGxuN4#x}CM7244T;E](] sSϕ=ix44"FF(h MIJ`U& l#VJZX+k`U:fja:^MN`$1v Nة;c71#b{z,GSp{n/W:~n?7']H 4䃊|БȇA6잧 B D-Q Bԃ'gMYe{B|]:~=/ȇ4_i9:ʋ-Sto#P R4AGNP&:5to#_;U*9Iȷ^FN&2}Цqst|*\,o"7F'\R)r ܑ:%.r7s{ZE.rf.r{gVOhַ8wx|0<>~x|1<>1<>Ao zx||cx|0wLJ8<>3<> mx||gx|[c 9Kz~e?Nn}'GnAwfg2s鱣e7UnTU_Sڄқv?jvky @ L7H*L6zuctdfu{ :\ֱDa`GKȂdLҞdӴg!$u1"ŶagjorX0T90U{MLl}]|^̿rcۏXS[!>q;L[wܯ 6>alD,"Q$:=zj<#he:ZjOk=UѣHU*J7~]yodHs%j{|s8X+&SI=df4=v>Ω^W%g{|RSJw$7>8j~Uvv#|>ޤ t]z0twFp{oUǻc.[o)Wg;.8ZF *>2Ѻ댳<2)6ųx?R^)Yo) 1A0&@kb߹|9=GH ^UԤxWve-̶N6g!eJG|L'|ty%[ pڠ:Sײqt R-ܫ~*iHgk7("ʿ1~TK EVxM ga[ڛHuEZ|]s/'{}^\x=Q?/wKuAW"Ӄ=Nl߉:t'|6ڋ=^\ߋzqt/nl:{z_7?<כz{K;0YqȩoT2}i[ImiG#ݺqnicߊ5_{{"6+nݖ)ƥn{qj8#m}+Hm~eKrGԋ|^5/e[//Nqhׯ~\Ֆ~ҖZ\mZ_7]6~Tڪ_P[K5/CR7'&H?hO|s$DP3X<drZ_.~s@z^jS`ĎaCj3젷~#~젶va跾j렷v됶n跻j렷i~렶zys렶zc됷eSzCPm3렷m#PrP}ؾ:f6cjڶ:6-crܮ:f7٭czަ:7NڨJOh[N#]8SKI#?Cܢ61'Kh,5([aHƧ:Լ_qn,-\L*TSVВ& ߻v/_"caݲhOavǁ$PAI 7Ť.U fCX'|C.y3Obi<0f^Kycc 5UE|Tˠk@#HDh` AB4 "8DSq[Em 8 i#p ‘C8JG(!EpdN M4)AZ+J"҈ +*! ⫈*#*<)Ix?M+bL'[+(wKt5$ ƅdB !٤lbH69$M &$Fh Pu 9D;΄hBK!څRv1D] ѮhWCK!J*FA4#A#ߤ[7vaQ܆V80/JHLücD0 "/0sB84MNÅN#4J8N4434r836+У?lY0k߃"l]+G*ѵZt]GNDDNE*?h^ g\+¦[|7 `;-N Ӄ&f`߻ <"}-U>/rRH+F\0JRx-)^O ?~&)TRIդ$,g񽤈$c5#/eU-E"AO0"a&ET )fS$)Qg@ۨ[qȋLFYe22jD=cDęS2&NfL͘81q"c#Pۀ; 3h ,sr$.bfR7^kvCaH; kh9grث{E|eҲVf]ymԣ/ݓpr89%gyW ֊G_Q(9G<'ssγyʹiݯnn!} y=<zxyІ`ɛTkZ>N*qD%RDȢ9T"JQ*F%e1+JÎk[>h ZIVhe!ZyVUhe J9E"kJ>1F⵱xm^ xm^ҍjFx=bgnyceog9vo%v]ogKH#t Ćk>~3[Z8(eׄ c#"_D5^`cnxos9-VZJ;ZhpW`)n7{[^ps$UVVu6~p>|>gsuSΥMKlG]xo y-~Xw N&({m#]] _/nyAw! DȂyBAHiA56l{yoGDVCdeYyDVUBdeICӳވ~;⵱xm^ xm^ᕲnx*2F-ߎ,x;΂x.,x)vna[YefB ҰD[Cjlp Oʴ7D9"ay :@b[]Eg Q7FB݈un4ԍPO΋~{+t,+DJbDjj+E 0x&Zooeh81NSh85N1^W뷷~EKbdDkjd??/G&$)@0TooeR(%JARP((((%J7&he~{+|ĢD,jjĢ8888E,dZdWp}\wr^\@{8\']q>{3aX;Ї-{~{ovl]tW.bq>Zqp8G8 X,8wqzaNK9:9<뜧KQk6<_|~{'o良w`߁;~dJTL! DHY"BdA<Q! A;m(- Fd%YYDVEdYDV A$e؊3t"sމ{)2൱xm^ xm^ᕲhxZbe2x; ΂s,x;.K"x ΂2j:jgZD#ʮH IJSC#slExP!J H`=_~ϨuãnԍQ72FAhu# B"Jɵ|+ErEz`dpTH U8!Nh8%NShh81 ᘭb"Jdx12^W"x52^#J&.DIz/3AR(-JARУ&f(/+%pY71[rĢE,zDLT\ĢPh-x[0!_}ǯEP/jㄖO-z#NW_ATp_4=IBh~)o߳&Tf95u_WUh)pUEQZk$]P/AY~ԡl@4KP>HeM5wZ%~BXyfw<әnn߯۾r+JV<ZW8W\MBy\{OMэZ?*fYhH_^1 0A o j||c|00̀ƀ7?`>1`>! y||g|(;C00΀Ƿ"#/_x}r5h:/Wo35̳4# ~u|p_ j6iX: URE#/@VyJ%"/VUJE T$Я4%_h iD-+yKB{fM_pޑ?p{$>BO˜Sz&S| a)̐n12Iubϰw_Y{F[d)r3d{$y]~gs=KjvCj7]2wV85gkOdזrIgs wd,Js9/$g;L{{uO-O.] \w8T_ad<%*wAH˘rvx+"N{!go큔|.VQ}Tz.Ucco+Ҕ2A  *)Fg^6Whm+QlR&˿34~Thn«o4Ռ&-s2Rho+}yw Ӽ>/ݳgz}g:}eA{z>Փ{TO=Ug+zD]]+Gu嘮UZpt^t{F'tKWtFWt5_fH"*Zuܸ7%Sdo$L#nLKIfdZ)de~5sr{yb_?6ޯ韒\yWOѕ^yOٍYK|G8R>aErϿyy>/z}yB>X?{qV[\jO~#;TKҩ^:q}bҚ[c ڛ $1E31N =,[Ŵgx^|r`{a zryaxb was琶vac urS琶tqCsb3 rq#琷qb pyPoa neжmrжlu kuзj}ئ9f6i-cj۞96gɭcrcݖ9f7e-czCߎ97c؊9?{E%tϋ֒I2(L[ZGs, c3Nohl6͸ﭽEx(r"?{2^ޫ<*\v59{i = 1X'|H8 G#$pA"؊2M<9 _JRAHy)/ ER)fm"hD,Bm_5'|#@@ d A2@ȔT;F={ԚA6F( Edl2QA6Ȧ&0 u"vNx~kE~e_iWU~_%WU~U_5Wb1XlL,6!M&bc)شXlj,6)gˆx&6̢N/g d)^;.kKxrv%^]׮k~\ *j|5*#,tA#k8((T;#)IKH2"( %+ c#އ-5\t7CЈ5rt]Eר5ztDtLtTtsp@U"\c#X9Vբmh[=v"v&v*v.Vv r(-ē\,+׺DY||#gR`ĥ#dӲ©YpYfMe 7N͊A,Y!r:kEF^,2jіLP)&)̤SJ0Na2l:t &Y77%3#ehkfF]43QO8^q&TzŹg+NWO8^yXSdq.B=|G|Xm6rlpr.eln()hG^c(sm ׷M 46_k/,Li3Y´D޵@Zᲃw_WIf;lǙxkNHMȥ4Z$<|O>yҧ 9vZ7O8{Xq<)c#bA/._u_]pDy8" GQ#2p ZZH[UusgYypVgY%pV'Ռ;Iu?(*| nX6MnD6.eَuEfy[G!y$wɝGr%$w]FrWy$S Z γ&aʆ0}{hxp"N5Cv9-Ag$cEPdDԞkݯ>ʖ 10R #(10Z H1H? VaEnk֍jP8yc8Y)NVd8Y-NVd'd8_+@w#^Q6# 1IAsbМ4iAsjМ47474'-x)ۆSZ7SDPzm3^#z-^#'"g""柦 "`_fQp/& J8Π3  3 S s Z8Vqw Ov&umۨ6zlDlLlTl\ldlQ4`״'|ܨpn8'rZ>}p^nɷ&ε}?Q܆Ok5&9-nCSs}Q_܆/f3ZDS?4ˍ6|q#wı8ʑ 8fu6~r>V $/=ғ^8m~]_ܨLnW& !x@F e XoԷ!ېG<#xD(exUrJ^i$%xmy}ԇ/^_~y5vΐ2i}0:w=DәߺhRø^)M|=싧^9bZ}16JFHoD/zGJ4&zQQpm1 B!A o j}|c}CCBB7;>1>!!! y}|g}(C;CCBBЇwjW^/_xP}l۹Nq[9WH(kkY)e.~u _v`,ف;'&  [wnխ}K_h$_~=կ'M_vU TW rQ~3)=EHؓ^I+zU'~UmQ LU;*3GpcwՆ<"DU}(tb_QƑX/20c^e{gEn uuMVaJ3=ǰMSv:͕bPVܓ&,iLIPKc561ZGZ(kk㬥Grc({ `Bd's2{3hp!NҾ@XgH(EXO틔}/rrVD8YR֬5+g )7W98u]o\³*ߝ}>KP+}\ít^o:/el\nGaɍ=Pylf  rgl$-QV"gZ r 'YoBǬ~ּVaFs&]. !ު4{I۹/&W58omG.3,aͰ7>|lj^-<[e#s}4C8[f4;,~3zBOXXM3hb\6¦0mSlFY2*)6EƦHIQɏOˆuaelXiVچjDUWFw1]>s3?O5S>}\zi~k;&5YUmNhOOSOhKQ 0퇃╂|yj2вZ@+hsxֳϟsye|pG;8CxqC;lpG A38Cz>\pG yG s:Lp%8Cc1}|>Ho6\mڌVd gú}I7I“tO(mԚ4}pH?ǂ~?R8X`,q g>ڀ`2@$|9Пcp(cprN89'rh^ωcIŸp ) =g@zH/Y S6Rid]gϾO`Ё:0@dt Ё:3)C~Z>rG(@y }2Q>jG%pt2E5s 2g ge YrpV18U ΪgUJIFOFOڨpm\6&\&kõڔpmZ65\M Wq28+^0ܹLw!;].p+ܵjw=Dw9 0C"^JLBpoTJTʛЎc=6`S(ڤ 7-͈s2( 9/VI Xd(}_7kY`,0Z5 f" L,0sY`,HÃ$!<5"`#/5ªiaiagNK ;VMNO<8yJ> PFY2BQVeO^'?O~&T>|gO瓟ȧ)Զ wCnM{jH:4B(׌UkmϯP&-m嬶VRVMoz!έ6Íz+b&\rKNp.9ҥmjڎ6t_+WL{a9Þv8Ewlpa8 @8<G<A#HxD+Tng8"ZF+rhE(yVЊ"ZC+eՌдU|+aVo[yVUo[eVd;B9ZMeo 87B(#ȁ2J(22bҏB_Q o>Jabج6jajج6;6;6+-y)]3ZJmg 7Wx4Kqbp\iujp\7\7\7\7n1Ff8j׈ˡJj3SsZ]9fk=p.⋾MP5A|| | | | |PGQay-ga% ,jD= Dę,SY NfA͂gA%dI0a~_5OxpQ_ 4 xoyS#ҦmFF}w#ѻmdOӖWSvmֶܺQ9n7v7-o|~X+a)?Φ86@3Hq?Q݈ny+t1N:I;H'SA;ԭiۍF|v˛#$ x/@iRP 4͑[Eڍ"F|v˛%$>' $|OgfɍF|Ev˻%$\+ pE(%WJF78-tu6~u#>͕As\y4WUBs\e4W͔L;:O,ɍH떷OHp7Mwp7 Mwp7ܔȜa^WOnyzgw]zEw]zװS q]OnuF$ORn*MF jl1![[Phqa%Z`x"%>TOne >a@)PF e@-PF e&e@$‰@zɭlaޟfŰY9lV fհY=lv"lv&lV[ JR =rMnI\H/Ɖurp\שuzpDpLpTp@ 酭}r+'\d#!/+ZjOτOυk?vYCx2uVOF~7A |=a"a&a*a.a2A | A"Xn=l Q4LԲ Y,Yg NeA˂8q6 y$A }rO=o[UsB_8Rf{>'}I}Z$F+߀Zױ~r㜓;}r'Oy2~XKq6š3s#0'8'wjNl礓q N:IG:8TWEjwsOɝ>@< 4)RS Boܩ;}r'$>' $|O&.е̞\+rpE(yW"\+U i*E>'wb䞷OH4WU@s\4W UDs\Y4SfRn+/Rkw8p7Mwp7 Mwp7ܔȤ߳ۋXX;.`Xֻ.bX ֻ.`|Q"wp`LeJP*dhD1[QPf@q%P` Y(I_žNFe@9PF e@=Pf"PF TB8PD] d'cY1lVUfY5lV Ö&gٴQO Fzq4N :-N Ӄ&f릂-/`W(Op FzA6rjګzDLT\cPNE)K oW#>hj00000> Neda% ieAT Y' dAʂ8q2 lD= (!Jℱ:T^^J쎵_EW_T389U_}c<9~)QYStѝ5nm;Ue.W^3/IWW(VB /AYZu}-6}EFU>hb */~z)2)^\&hrN)ڿ6eSecl3׊bHW?z]6w,@FXq?)(Մ+M$c3lybP}|cP}PTTƠ`77>1>AAo iP}|cP}ȃ;CTTڠΠPwՇ>>3>&w̠֠!۾翗/<̾|VJ#?^:/[_\ʁl姁c&S5cvWG9kǮ؍;cGt\t_hd4_~=ݯ]X_vU dWE9O5&)=EH\GrIzUQ\'3SѪ6Nr-*۶;{rj;毲ܺ\M#Zc_eЇbK/ݔa 4/3$yYNr}U<{Aֽ?0&Ib )~t϶ggn]Ss7T>J obLMЙӑFhXnI^i4 a-ZZfslLD7.gi,vŎ@>ٙ䃡ѳŞS{b[̎Y"wԛs@Z( ma-Y$+L\AS{d #ea-C%K> Y){VڞGze.ʠ%.Lot߹ʽg)%|G.=-ڥz,QS~4i%*:iQ5pJ|t(?[nQYK>ryNyW塣?؋'^~~>LM$)_qʧfY}U/i08yِglQgnqfk[lT[+.s,aE0?Hom!U'>2?OzޟJӞU1'}MҊS^Pi5LOxIu{2__oQ4)xWύB.?c6ufLnIPj̨k,k 9qg_Q촬ۙ;ZuLn`epIYXu(q uG߱;~$e?t`"z\Ϙ9sd'ͅ)}\$sm.jĒ͡27rFȘ -*襉џL[VδU2mL,ƭRl͊bX+E]X[wwY_(zKCc(Ez*EVZfwTEX\¨|MYʷ"-/c",e1uPs匥=Lz`0mIcyng: ~qe#>w+">x=ۗRG]v/aٗ /^_^W}TK!e{)+RKjr~um (m[k /ָVRՉ珼~ ۛ'&N$$DyBUD3gALzX> yֳԟ#ye<qp!(18cy@C>p 1|8cw<ʁc8pAt8c|Ў88phl8c z 4う8pp(ád8c x 0C=pL^8ƣ qp-cAX8 acT8f)s1w@=pLN8&c 7$9pa㷎"scs,g%| 3?JtVo}pPDd-40<ږֵn}h9nTQs:?*?BpbO|_hhX Kq6Edq0YD`lFw^9՟cʟpY(cqt 8:G'XvCc}bd9 W}ҞBړH{i/ yW2^AHah |1|(Ko`  E CP!EBP9A EBPj>OщTt"HF'щBt"(D'*щrtE'щRtҠƈ6_IU9,x p%\|W!Up\bh(oU:llFt#c1݄n|L7!Mtb1n1䘦‘o/MBüa0Bw>̻] .yW¼ka0z03aޕ01B<+tz)o{Y˅=hosO(h JN+BY Mb\~'/".G!].RQhbt1zt13b̥LKz҈8lb^JI+8FX1qc@VM 'H ;@v*\ dJ1Y]87\+jnm9ՄU.#-sm( ]F[2NM5H57jn*\TsSMZ~Xʢ8-~F#g?mϨ'$J>?|~2lg/?|YNa-J:JF[4@j%P&1̤cJ0a2l:t ~#T:懹&*m{|IPm(KF[6"W23 4%hL8q:A|H; 4OTi^D=NB{B>y2}-&ErtxG_4`hLo@j 4ٖcxR 0nV£/A43xx/ [_/Lj5EGQ0td;-Hq"0|L rۍ}yKӰ_O#4J<O4434r<0+HWxؽz{dxŗJ#U+Jx^3SJx-4۞6k=smL>+ߩh;-Nӣ&fh^CiQ_!"yBZW0‚WWkIդzR3I᧒%L &E~^(}*lk9sԭ=.G#e9-G#Aϑ0#a> 9fs$9;$J ZNuMy(KFF[32QMLH82q*e\ɔ)S&NL~z)(*k:56~|>Uσoyl@']km{_u6~{> &Lo%Ά[ Mqh<)3{mֽlF|{˻c;vpu|m )\DR.mF}q{#2@8 p4gF6Lu6~){_gB^B y ! ~Ad+1 auz>o_` ~A/ 8ϓn6wGDQQވRoyK32xF(6aݺ#Wb#A͑Hȑ0#a*G\ 9ɏMO){lƧd5$-"LS&NLI82q.edٔ)'R&?TQ^Fq=;v/=ﱵenLwcRf~c{lRnt rY5.jC~N/qN݉={)Kcwm +9iI'SrV9'qN݉=AA plF YJ>ݩ=;v/h)<B^@Ky "#-ÐP;gY~N݉={)!K_ ~A/j#|GP_3RxF9c3عxR1>aaAo z}|c}0ff007ه0>1>aa m}|g};Cff;cf}|g}L o xv ?5|+փbfzo<'k[ ռ|J?Lf/ufPc}cّ:rDx UʉW9ANO`MrؤJn$FG2+x#_Ijt? =cM2myZO{`o 70h{Wz8hn͍17FȘ{kO޾uo%[Vھo[_hg#{6ڞgcYs_w3t;w\*c(5.to[C|_qUw ם[3m_uOPl9VT\g.WcHu.~ce}uaY~]I||$|>?9{U_z- dϺBΒ9u7`3LzmOpIid鐣fqQt 6v&۳I$ˠ KFx O#&d#qB9>@s}¤($ٜ%pJus|ϑ9 >G(,ͬӥ%c<\)WÕp<\yWCqn]x)@rgw6wgܑvٟgɧ;c.^t/{y(/Sy$Nm>Y,K>}i%R#Xj$Kh1L] b0; u [,*X|~t+='潥rΈwJrQ^ʗ|lLg&Y}= _qg$uJil,o ԩ0gI gqr: f{̓+z: pnT&XKP؊]BGQtqu,nI~;:Ѿ$䪷 xπ9< A^ / KK57\{>8 Ca A!00@aZ5=!䜂!r0D(%C`8񭺼2.+*J.+29n|mmw&zImwt.κn.zf<-X$Vd1<3\67YaQNl6Fو6C*,-;`8A1V6ʆA˶*-.y )*./kAnʂma0e}oHC=9[ݷ<=W ._+ϋ%X&m ƥ: i΋;:2s]Rf{ZvoRvXlӂ4lugK NƼg3z'vَ2QfN˶_o8Gr6E{[rSny-Oy<[oH #t$Ўޑ:xGH: ymGP#~Dޏy?"G:5{YRV+m[V+ku:[LH7č7qcMx7t6Y5;k[ ֤ӹy8QNr%%謃86BF:=cC:ýqt8 {M8>Wt;qߘ yy)U^]g_Yg^yĺvye{i%FcחZ25ٵŗ{ (R j)JhZ۟8cĤ֧V%ԚEPbm6>jR׼#LzXIRYģ߇z}ġc<}>{Ўy!8}xA>أw`ucH1>q rA;}1so<}>&lSA>أwP`i3#y@`g=}L>&e=}a;}1{?}1}?v}Ρ7\u>~{Ț.q9QW=[mke{un8gs$ K֟x1.W aLܖAV[2 <g{7E/A.Q-4[n K+ b)DΦxVY,VJ}to s uxW|yX;;ccH϶ٮq,NAXOsm5#(y*@ y!@y-@^ @Þm.ϖb5F?aB: aB!A aB-A aBHFJL![.5RaTX#H52aBX#(5JaZX֨5azX4r28ebXdSS_ЯtW&*~Bj_ЯZW5u"4B8A&H_HQ鰑1 Ii)i鰩M6AKq`ٙمم٥ٵٕٵ'RdI}*Ev-EcGé`8fvYc H 8m8YEIJg)ӇAɠbPR(1CeAn6fA-o%&qe2bb UFK,&L$I,3Xf.db2zb,s-֒kBVr͊.mX5׬kv"L٩\sf's暝5;k٪⼄0 klvRX4?iPHK7n*-\ZɴtiͧIVdqC8 |K(*i؈F]6JQlDLS2OfT?~>Sod<Єq^CX`[Wn5p.}L,0a*y\ 7'o a.yBƹ=\gqߨkF[7ї0q*\>|9s|9Ns8!⡟z;sni;6R9*#/XehKV&| f)LS˧0Oa6t>|O7E^Qw}-'旼@g:-uD=D~řS+NWͯ8_q>L~'&)o\{nc[_};"ـN|۶ @mmpj܆(u =ѳ+p{ul}<ݶ=XFU, ny{Bm])nD5 LI.m5pj ܈ZoJ"$܈a-9 td~͋ZMoc-U FT@9= ^s!~y3u'>Կ*o` 7 d|o3 +qTwVo'7[Z% =D>| S)LSͧ0Oa"Ma6^%ehkvF]3Qϯ8_q&T~Źg+NWϯ8_I˂dpu>ީ{kMW{khnMmS30މ{kEF]¥|F^ƗjG&Pi bFŘAAfTp2 +a D}M5\ vÇ]y5b؍vha7j؍v3v3v3v=Jh%bKI˦@~7{rX% VMH;v* \X- BbT,:a#vdӲ©YpYfMe 7N͊qX5o%K#yI(k:kY,z,3Y⧲e?%^ϒH%qB |õVZ$`y (kXF[2AͧSȧ0Oa*\>| )LS~ɢ8 As#쌼bg%;uD=D~řS+NWͯ8_q>L~'"1Lz[_TVս6;2="{ϛ5aWTW-\w2Ug.]$]}e֦n /K ~#u%7as %寴@AV/}ϐzpXMM:i|ޓ>j޶}R,Hgt\! .n ) ګ.c@zzǷQ4Y/+)v#?(5s]?~.&{%Q1P:)jcΎ79>1>qqon}|c}ww¸Ƹ7݇<>1>qq}}|g}Lqq15>3>Ƿ8^ۿ:SNޗӔ?˗0gs|Jl=yk_mé¿|t*Smy\tl_./4LayJ?PZ lkSm{bP~#PD=jO|Jb*Da'QEHtEyy9Y 'C'u$F#_G r]二% ɒ[ڸĹI ڥ$Jb"%9PIHK$&VHۿXVϿKR}z^)u *Xdz^,iXt]zJgCIODϖB] =J} tSsH&ɴ9Ej|IsԔdR )$?XVQ.]$O@tI@%% ʩK(o"!VTR(.eӉ{/+ EAJ>KyGArbs^y)u&<S=g_V{͵!hϖ > [=v$|o)l+U0{ouAޒlse){KSOSH-NH>[6B+|otJmQz?fgݷ|}+SKU̼/T}eB\^yحS=|PJU-4}ްs]S9]᫷ėro+Rν'nhu'[˱Kz{zl%Gپ^@=ޅSn^RR*X^!Z铻0K=Rl/uO;@S}9Q8ky9y+ߩab˕k>72_0B3MB۵k\>τwOo/G~ArPOo.ǟxy{xzm9KIOo-ǟ$ztwOp?'8=Q_Duz[9[N*G}B.ϟʓ4Qxtd#-._wzQr ]'[8tyZm;ֿ/L7lr)_]׹?/I7}WGhs`y6;d aGW_ 1ԏ 7,ŅLa09&@gr L>[BR 8G#c|3>GD5U|rcX7VڍqcXY7Vލt#vmw0]{h)@ax 0"F(@SϺH"byD""VF*X #rJXFhq4N8ATh)8 Z0F^ȋy#`51Fge*$V XA+`0V:/T! (eԢZP*jQG-NgP2jT*فU .$ok]uKwN4\|Δ::+QZ01&B#:qc'QDۮ>ߗkaHo]gSy3wxd%qQwleBL 4!&DadJL)4%ҦDƔ8h3qC1"5C+eJ&+gJ(b}hiF1nkFh;mΘs&;oNQ[A"pttڎ] omnTkBfkax?0p^wOiw,ܱ;VtXܷ0xrWNʱ^A mvH9%蜗s^sQAW dc| Aи"2Fը5Wj]Q)xDiYn?ns7_6[#+_͗ ŎZ,rqm+@۸*7r*TUjt)]:FAy3 ^s7]>GH|:Rw`o+x+=űHɞbSO=wd݄mҬRd+:Fe퀸 nt6sj2V{g޹woyYə ̈́04#ƦbvA)5CQ nEv5= XKqڠGJS`rQ1T:(˼d-eu3BѼ k^ O3bmQ1j6FƎY`,MVN:UwS;*s|EǵZytS{.X*Tm+}TQT9 VF70xc}PҊcr>GH05U󉠧8"S{BmRJzRd+:"RڥN%u#{^7mL*aON3}\;7(YƎbVU Sh> mNB#ì-mDM1)7X P$챼=VJXX=3{HdrQ""~ X%˼h-e _./k^ yA1/n <*wT16FƨyaaaTjEz/e^ rmZ 4 TYz-WB)Z/R]sh+hKWxA:ZOZkZ-׾mmt^j⼎յy%}MJZ_Z)%cq5yO%)u^[{J1떹{Jt=&KeZu3qS+RojUSM]& I<7)wb&&V$*t7IwEY/$}t?jgrʗ5&)՘>_#*`W-_;p'\dMT Ǜ3ãj5೻#;tdAGW6թsӅ]u4(V8hUd<[KhX6UɛLfPL=2ə]Zx9t_.ctr`!H/E W^@ d uUt`a" BdHi *A4L@f 2+JHp nTQ7 p q ܨ{X }28БifZT&C|!n6f (DVKhViM5DtTy3Gtٙ;Ku>5Cv2&xOi`B*́C1W%¶ږ@h[cKmI4p*=O)3/#mc$m1r6FTkAZ3v%]icWؕ3ve])cSu Uʇ'vc76΍ucH7Rኡ W$j?;s?;.:c#O/u3@_}Kwc#Y/!q"PiӰ~O#i$?觑4 Վ N Z_+keecH\x"vNۉ~;o4w.CK*H 志^+{s FWHHCq A!8 'q2|RWN#xDUQKPZ*ՎU[L+AU7uP_!+iJ2!OJNXȞg{6Ξ'Z`V fY;gΚSfr=c,K*guu׉Y}C Q9hFX  57PC Q(5kys`̵17A"a+P0 F;h'dgtDWneL^6+{\t@e/ҁ :d@j']oTv#nDōU7)? ;i= o-xZ{例嵶*|{77eS= }iAhݍ֞8W7Ը?vN|I*_p6+}@R)&xUZ7DʂHZi `AQZ` !+mrKkⷡ\`F۳1l=aO[a|Pl4kg9v֬2+Vꚺba`rF0V9L̅ƮXUX4P#jhCs9|1H͵V2׊Z\jl _%dvю3:W"ڻBe-c5t/eӽbgM(UXu Ł9xr3RT8X7FT܈Qu# n"Vܞ hk/rmӣ|!ӥQGyMp_u)G?3v[J! %,(g3W-GQf7U.ePR2,Lt)U'^m|GN~`֛?A[zS+DGQ]}䣑X)QB_}]^WK}P {Trx'.q֨˟w_+Zjoh 귰U7*oUR_bs9(*n\ͣnjgq ^0ë_\~w5-mR#hX^nU+@ryUH8T/I  cP<(T2 5G_3ÉU{b(Ase>IA鼏ZsKV\9&,(Kwэ *:d"ytBy) LbrzCrzzcw$+Qޗ#G'|_TI}Y=6zHpzoY%U\4RH&;dM9k=,U](aa=tGrctLK8µ^K.aѽ%6QZ{Y%5W$PJ{U%4dP:{@%3P*{HOd\}JTPo/CuWʲRG+i>]|!T``QaQ ہGaP-׬׫X,w.XtKςrSnZyGB @T (G<Qz4X`p0D>%ى}#b=VR#+T u7wy*_u۩:Y^ER/HWo2 E@>\玦J]͔OK} T/(pKz?\%;-" WJwupGl_RPϒ,Q2,.ڮПo-h8.Z`Po@,w^^-l&\5B݆ VX/B];*W]^ ֦+7B 2loJB*+ 33c6>׷?`uϲKr&OBl){MЭ_}>rz0r P+L.؀h┊pFTsh*TkxTK]nSK]~SKaSK=qSKTbSK՝Hj~A@,pTD<[@j}{_$0n&4kV'ЀrxrAU?;gaWuvŵzM * jpLsin0!ӮR`pЌ2_ou j۫~0ݏ{l:X21_5_7&ps]ea3P~8?g G߆ͮ 9R>G9#s}ϑ9U<q9>`ze_9W_%WTel5V8`Xlc Xlaj];nⲳ.; ..㲳@T{W nqLY+kH5re IvV.DJt!PGhM#iD4Q4FEhbTHW끵(璁(8m D%Q BT ĉ ę ĩ Ĺ D-&hYG*W*%&)Vd.=Fҋea0<FH@#a DF J倈"VBĊX b5D,HJGKjq4N8AThM.LjB%0"F^+y #buQ.j""&V 2XA+h`& "X$+*@u3IԢZTPjQE- jQF픊Tw5W/gj͵L0Y3>jڊj6\XL+n[b-b Z)B {q}/QT^MPR--J90qWS]{kOvS>|ˊ 2!P&҄@Rѽ:ДHIS"mJdL)^cj%. M\IWĕ1qL\ S=iF1nkF*M&Liw3ygMywTh55aQPlzw* ?PEAG6((v ZaMX3ð~#a$?afXܱ;VpJX+c9wrmEEGGrWN)^9֫\1;aYR9/9EWsw.$`UOX1>Ǡ4c|%?YZMIWjT\Qu5FSK2K>GK^#MRJ{:\׽zWZ.{BJѫ}x\-֞j5֋+^=ǽ~/{qT/%]Izݫǽ/Ppמړ]TE~ʗi 6!P&҄@RaD-_ZDʔHiS"cJMI(i~V"+iJ2&+ab*j[pQSX7uMS7ԍ5uLM )BʍYw3ygMywToO­0p+e}Qhą֮jEQו~#aD? G.96wRꈺ;VpJX+c9wrK+:|$HrWN^9+zzR]uGt,s^qky޹\*te9cP| A1>沬(ˊ*rFը5Wj]ge*߭L-Q>Z5Q_jGclGl5Yq?EZ 99J UalWRiTپvcL١~{XRU'e(=KUYnvd!K]RQL-?KײL9KaaV)AU4"lQKe{gPVk{l*Mm͏Vٶ+mq-!lz|_Mh[퇧xWP\F a_BrVɠ N0_@˕j%Wm?ж*gl cڡDžlpm""PZM --Ri?f F(_A2RgO?ָv7uRPksE򭿭¢x*ÝeTf~2]GQ~Z*4ԫ"g>L/r0^4]9wb6z #zfk;5C:|vjn7M ;ƺvJm;F#cd}Qqh"r22+ c#,h *A>z, ƀq`l,&I`l"D+,XaZPct 0;0.PͰdNYJ%~BCgA׵0!xCBG2!$d;*N 2@#EhM#iD4Q4FE@% 8f@%= Z X+ke`Հ*VAO c'`$1v Nة;c71'ZUF2^kp{n'3pB³Ait= |2AA>h#&3ȇ)y& zB!AJ!AA3ASAsAĚܬ7EcRNzԽtlQZrH&ȩ4I 'm iry,]5w][܎ۡsKwnեR9Xd eALNhLrI4&ˍaSIK(q~0y8OawVږ\Ϡe >D(F@hctBD.b~͏6?2GȚ?48x]6`YIGVڑqdYYGVޑ %I1@7Ǎq|X7Mhk$$>۝vg9ow۝v%oSX@ @C 4N @d+ BfPa0<FH@#a vah ; b!<"V@JX+#bD#8P,ATF4NI8'ChS$=ЃL8iKy#/cW1:F,K=Q+` VP :Xa,^&IKuB-ʨEUԢZ@-Π&ؤ>6{ rX.,N@eSuS\p rA.:Hry B4Q r}X.oUܒ! )\p [LrI6 ~ T݈Xi\. uy8OwN\p{itс39OҰ\pʕHi#c~̏Ԥ2Z#+J;2#+;5!⒡.ihlYq>n&ط!’&rU6۝vYow]v; Q3=!k8.4BvI(.db'19 UCuQ(/a 02Fh,=d(׀(D""VF*X Jo0 P#q4N8AThH LUcŌȋy#`51E0W^a:4 dV *XA+L }*YA-ʨEUԢZ@-Π (U*CMEg[4^y,ZW*1 LmZy:Tm͚J&ij.дѬ dmf-=S4k#][Y[5-mH EؖHvkcflkKNXc(2ǚkg[XBc%mknԨpmc*e5-sJ&='ifc[Mqz61=R_%bN6z%ZvE}¶gWWZl\aE_@z}!k}ڏ}-3ZwM_Q_e8P  uqTGukB++qžF:P 5:XRX(]A2#+2HhX WKBb[cĐJ}`޺̊/}#1וȴg?iCUŖTl)OY_/#[Б:CGwoACqO);?iC|~(_/ƌ iUX(cz ~+]>0z|cvTu׵L=&.PhGK uR[ݸGu/ =~˙&==ѷT߾0 z}cWa/PN;a7_űH a;lpWJJ/|A?=PQ '6pDC|bۉ#"?J`DDCg7gFDChẌhi- Ð0"s3#4FD4CyfD q86S >,~`:CtV/K,~`JNz+_ʬgZa!>0bשe:Lzf> %1GGccA ke,oeclQ13Fy(H}g"q\$6"0FΈ0 Cob&3"F&8XH%!)%p:\ :I(!e{#uvʍP)!eRwJ D$[J\HM\o*к07%"V7eanJDuI4nJܔzkiܔՈ)%Ҹ)3?(K%k M} #<c_zLsYo4F{f!˪R,֗!њ=%fQ}8h'?]<ՕdWꭲkt&v%&zC/~^ !G5BmPY6~BO1 Fcھi8 i47Ɛ BiM.ZmO:Q{){#* q?>oAP)8:?SKܧ(SOp#N>} So54pʖQaUh%T? q[,Ā8@RuKDȳ>kKJM5h`Q DU7tQ:ě5S@meѮ{RZVV)fC4 w7mذؽҘE㞗Q9?<t-+vNpk[p"k@D $Ӑto0/@yH !DW ^+x xW "^c+/ #HtmKHI" _d|/ E (ef x1hp>rHԊ]itWU@w]tW UDw]tvDRcnQtj\ ƀ `o<؛&`o2؛M  GG7ώm#+~gw]~Ew]~װeGW @M"+a[pŝF-c'P&0)e&C3]^̛"\f8|0t‘UJWEt5X\KBu:d#psH$I$H$I `$Ji,S9ҩPB3Gn6 'O(SeJLɔ ej2RkHfQd5c*:MDR,F"Z&Vow[=bi`U:USi&ή^#b$-Ji62ffC٢l6ifzɇTmu!]"~ELNI2vtC"n7IscS˥GWsBH+]Hn'V p)vSm٩|uF$ס9 ঽ5:ieoz\ al1!+^r]"ɵh긹qE4 x=[.5E\#7 4闦Ҥ_ۮΕ]0;}6φP>gC<Qfg(&qd,d@2-֒]*.p#uT :&\Dž Rnc(;ra ,<$3Xx bH"[j[*Ϯ@H` L` 0&`X#p.E9" \䁋p/Qdbcypq @.2 %"b`r.'1;pr=BD#C_+}%$WS:CGEQ4V L0EFE<Z`BKLh -37;LJCMM5.pUHX1+FbňalBk 5Q MXvu2Τ)U:eJ Y!+3d7; -CP2Lka-~&8[Ndl [n-ǖdk=HsgcF+?\߈Z/4vb^.|X t"'61|q ] KeB\P pA. ;T|\K{ toMi7 zztVw< >gClp ᳡|ΠJQ]ݷw[}KHZ@D͇֕*ujS 9<0G[EX[J`=cDѓ1z:FĈZe=Е}!܀pn t 7pbVG0``5:i {0"F$#2`DȂJ[Mňb &]A3 :d ^0yWtP)^0Çw5'NXRy H  X @Psf_@x-Gt%a5 q_ux,߼i8 4F҈@H$54}E e!-E 2NkC'¡EQ 4F҈@H$3V@&F#桥qH- Vʐ HXT>b*v:\'$pupV٣ Wa2c0hٖ?6 s'Q~v +=xֵc[׏?~_ټU{0涝kTv s#San?X(̍Nuhj.7Z;厓1*7Q;W>f{bUnw A*7Y;WVE*7];WֈI*7S;W6M*7W;W嶨Q*Pw?qwZ_jT|;Rswu߳;R|fMd➏}v6f5hh|v6{vgW{wwhV qGfڹw51@wcA@PJvR{885TFz'QzgA=,ZZ {WQϕި_Bމ\\oPUu,],en+]+ܺ­7u\VU_^{9:5f5,rbzl%6xo{Nfj/=ʜxo}vn>rCK[vKS}EٴZ"Q_l/Oz$+bw(Ϳ-O\y[S$ϕ i=>ſ!O\yjUө`{~c{-unw5eh9c6 ktw*:7|Mj@ױܴ"VTӃ@5jfU:ҤWJ^EP4۵T{ː~/;6cC)^X Kya/Bvqc(BSjaMvPJ;njcm6 Czwf~,=T(vD팅<>p[c2Wi6xVx[Qc%od okXx{[ZmC oռѹK+mBylu N;*]f0KQS[ jnXɻUQ5Mՙis+=wGcEږh[znUwm16VnOe-j"kcZqlvX{E1L25TQSj,ozEH5#c}.[kxů5"vkcxOpcXxVPȬ荥z|ϢY>Kg),e|!⡠EKWO;_:]ptuAq:]ǣt1P-aCӣQ='ڞC3h{mϢyFdc]J4ZRK|#t:GG`<A#Ht\c(pƦrn)7> z"EO ='D(%zHO!T2~pji$08Q UT$_YLEr7\H3GPɧ P]NQ* ;CJJJ *aJآiTyW1NW;a]LysY%1Df̬`V0U{jcTEgT{.Ḿ?5GLsh-ezhE#Zop5Sq58W]~1LFG a6$Jf3!nBpcdåT#{.=j - L ui$\)Nd-n/[flqWtG*_^Tlo.Ğ-#د.l׿A^+vaj7WWUC)^5jdQi/.(EHF;5>_ʵ4垦Ӥ{voP|9)n( !}7}P9%Ef,%#tdr¾b]jwd1;.pHJ}e(T0Ɠx9`< }C7*_ J @H[`p n-7T~ (cRA1(FH#bdQKcfM3V!Yj!L i0-eaz0E5a4cQ7vHɒ{Fbψ=algcԆچay,x>[_d-11YҊTZJAݡnQiTrzC5tqު#UW^3sgTNVyu2nWë6yuUS#UmT~*ݾ)峻eZ]J\*Z`]-7Xų-JZ6{|}Nq]Nd<=Q' DQ(“j\/7>jG)5ᣦ|Z/G@}o( ᾡ7(5Kd]}30f,%T` ҁV'ԮAw}QaÂtTQA:2HG Y+q7|SxO<&lJ=OWr~䳁(0F$#0`J[րb՗?0&RDH`"Ld<08p}:=X~ t~!J ! ]Q@R@ 4  <  Iit%/M*#V1*Xx`U"JTjW+h}_~X3kcby0"ZXo`Lt5MD_>/Qpnmx6"Flmvfr!u״H-呷VBފ[yAn!io^Z<ǓDIp2 nC"o~[]z{䥷ؗK)ڂu,=[XB CmXUu]z{`KodNZ=Q';}؝Ut]z{`Kodo 5xO_v:째]Yz{7}Co( t Q_Hv>|v朗Yz{5,d`l>.溜T)H #tT A:&刧zS@@y x Oi<XCQY䤵OΆ(0F$#0`Jr#)`"L$0&2Dy`Px=U#-C57 鐾fA7ƺ*K7<|,݌) ʡIDh4A84Ex4A@$4AD a4})Ng8*XX`UJV*cqp˂+CcaY50ZX ;y:harza6ZХJg#X{a|}?lsX{%lDrH4ywN8~/KZuINLd~%ݲb_ȷ?oB7:k80;k;8bgrytP;dgsJe>f3:g=e5Q`Wa,L, M48jgv{;gM-DՔ\qܞ:u0,%گ`Χ9y,1S_k=獖g)i̞^=ǃ/RCWk`k*Rѫ5cf,ތEI弞p3070és8Y%ZJ/[xP Z_w]*k}\nP\PNgN:$s:5R:-xT7iMj$ fIcSޢ7)d['M{֧uqz\ז dG|{IP)>o?'@*"E$TݜZVHˊj{zָ[ݧxHNkuM,/^Fa1 >#*Pߡo-b՞ZSx{jj/L"I]9WziSm(Ƚ)2Hi/ܣ^Θ;c(gLIOʠj ?^r.XKcw?+ZzΫ}~uwU[VHT{m6]zK? T{o6j}S8XbZyϹgnp8(Kώ-j}ⷵO~Ӧ "6sn.pQ̪ bV["t :^pcJKJUR;ikІnk">MLkǖR_ K~ٯ^rSӌe[;%4F}Ӵob6 k|m3^5\렿R6unm]Ke>lsӢnZM˹i17{?}QYƺP|rOSEdjns{ށj-W#~ف9:J _iZ\Kjo@'Pu,k?}nϾlo!С3 fӤѾ=AFjS%Ү=`yݦKOm{Y 236&l7mnZ 3NXoZnkZZKvmZUݮFڈ#qd#m$m]&=aғ&=n2mΝ*8MΏUG'0ү#H:mޝJ"mJ_ͿvN=,~NE-~wNM~NUu~wN@,_Nv{LGy@~ )W.>b]jp{ĺ~Wr+ΪyuI]'*ʯޝQi+WQ&w *_ŕ˺c|.V昽ϧax ZV ZNb~ 1?VPp.Q =R߹떭/:5Yތ[}R3/ ͌nYqs^J=y#G bf{7+[?(fZ8?vSKjnIa-|=NMM5=Zk^O祆Sqk>C`fVnRvnbZ][9 65䰆ѐC-/eď`Kj yR<d7vj_sui_fp WO|'ޛa5'dX*QP)VR|!ʧTDC v5X,pf3bY`vծ*׆q07Ό[}\^>uukN+MhuPq7i1s.!a MZ)h2`#/<6ykz,)\5VEĪXSr PjT_)t{A⪫:i+@BH 󤭦&,>G,Y hFIϬ?g !3,~ϰ {UMexC9|+[`KlI- ,ؒ#]Z:;gKn%8G(Ic p%8GU)FE%Fʈ'8#`Sx29F<ˈ#^b3;IE&AQ) E(QXOQ( EA(pPitMmEsE/L4FH)#Icdi14F(ELcdiL"3ra.Su$.$m D怟MU:Gz1X5"L13?xs{Rk̅=d_tUa(ցd S_`YuXuYu`vX-A`=ژ=BPQzQU`@Y,PR(1 j# N,P{Y,FoH㉮dZ!BKYŬrV荬;YBe -fE~pcY=$|]~50R1I$f#IN$1{Ib6&$?aX1z}cĮo HK\`tr:ٍt;dL'Nv;F:g:^5Kzw/߁~+xrvmK/^n7vzr;k=vn]Eck=2oiVBʗخ\z~¦bx}Kz>oV p ycvR_l*>oV½V׊Za^ݳhe~+5t^ά+!i4$4ChHY gʇ6h&`Cl pbw] Ve㜺f<,xXa 't'B#hܖRq[2nKmѸۈ%V_ 8GH c@p8)-0aH~WzoxO")D< "CA`-_$HW 4^+px@ᕲ wx FꗣI"^$4x/rEȃIR&݆:ԫ_>1:((Iru`"&&lp҆'.n(P4ѡ!뗞Zr>$@ , "V >s{YDP4a@q (3ĀP2c NGS:Ekj8feClh -E6̆`Cl;Q8@×gxM1c8f ˌ13Fbƈa[#օ꧒LdY,ϒXKVd, Kv%+1VcZ嫟6˪0͘scNb̉91am1scÓ\͟!^ߗDz~@oy6)ւy6+Djfٵ~Xo]} Ndv>xycY}KEzV/Org =Dz~@o9k @Sh$t&`ЯΑc]},tQ/28Cg \bm>~kܖRq[2nKmѸ';K p #Ap 8b=β3@Hx"ID<'4"Asx1t lι~@oyv+x @hW ,^+e"TE)d" ^$x/EȁY"^$KGt5uqe DS{(Gɀ|4r,\tbQTPƈO}.zgԁDhԁA8ԁExA@$ADS*#39E(9E3ǀbP<J`@I (%38A49i T4Æ,gC lh -e6e#1șg/0Ltp3cfČ123fÌɷ5s*,q2,Kg ,Y%+deKv%ŒX6E;3ƜĘs2cn1Øb1$ Ԗ[zhGZk~V(vni-oi-_p VGZy#@kt#ϋ0;\?^pmWu<^q,{EW|ZHKJ_Qף rar}}&q }UrCw\r| +崕Pm8sD8,ևhr 3r$K˒ϻD2u3EL z ':aȶtNa'? XkU֛:ʃw`78N룊1y0ZM3m^L6ITD%^DmvFS&^Bz f1[ժך2{ vڛGEl6G&vb;vY8uv+g$=G賯9PR>u0y闯S%3zΛ|ϾpPjx W5W=g_Z5UXM|WF-jbFSާT35P33>Pq+s*J5vS ϩT[9&?1j+?磦OYq^m{P=IvЛ_YQ2b8iΪg?]\)|{%YN.o'Fgj??[oul8N+df=j-&?oUU6׍Ot #J^_M'PU"&ܔz`5u n5ìU5rmz6٫z4;bXɩ7$fjrSR3bZUى]eHa aO&PBMdfCemׄ X =syp߁};O^ABwAO)<R@8(Eh ́yP4 @IYGTE*I>@P38jB 5áfx Q3$j)0thѺmS$\-prZWjy\qM*wMXQ;;(Q;xG8cw|O'^u̽jbo$VӀ_Na= 5W f7$J0`v3n fw,?1̩kųcNF~5FA\eyF2dt[m&MFn?_HF();On2UfygoUO{gw"SE脮 %^Dy@1 [&6=?VTSq~*T|DָmyG?KQh* MG(4ƣH<>Fu4as5yNr A.Hi db@wBU~=X.`), @  X x4oZ&s6QrJFq(9%ǡX#QJyuә90_O 8z GO9=p, 8zǔ€t5Arb:P@t`G(E#|("d+.)^c˺`$Y=Ag#\'YTzHd4l,7,oo "o onAFkGJ=e'M͚@*]%$vȮUvJ`7߹ڐ=UR2;nr 4OZ$[d zlG;g$v5;Os^&ƁHIaĤ0rR0;Ia%L #&E~NCRGz,)-UVb`bX9EF؝[)bRnM+H~C6?~(îp HK7ČqrƸq;2e1n;cF䇏:dW5?sf/w8|5 ӧMN7qZNdj0w%{o(ofu^Nj_[Jd;0g嬢UĮV>Lq}h~*h,M@4Il.}׏Fki{Wڼ`Q*JCGi( AL<"ý_y"yFX `qR`†j!Lw0<p$1x8GvpAӘU=}>tJ7<$ZF3hy-Ϣ)Rf.йcއr @ah] v.@bҐw꦳zG"i$#d C2HF( i$SR  ~{"=y4 'Y*jp#7&l҆8.n9@'5fT:fzJ^68(X@D@8ҭtDXa}nUTe('XϓxROJI< S4t]?ͽ-4f#Mi4-%ҴHI4OZ8=|=~{/ ˠ4FbЈ Aal1hɪuL0+g{Y'd`y:@"Vniw[t=:DgkyƻVL뇲OsϹ :['rdnn[ŭmrDn -(vYK]r˪[5 r׭ϫE{t,V[5 rB+ ތDBZ=Gu?Ur$4ꬢUNc_O-cǺjVȪy9 DӁh2ؘOlp9yl?XҐQ:JFx\IKe^5`dQN4DX#2`=wG #0<p4x8Z~vniU-oi-_pVGZz#Wj#t#{_i*6\?^ˤlWeJ6^1,{EW4oil.7DBXN/=0簷>d3O䨣ϩ~?s=l4·=DK@ҰX}ޓL>Sq)=,7`mˢ׍;O)ƵtNƧBqI,?8s7731x`p8-`mJ`sqG!iP<31'aJ г4(VqWYfoE W]vqU D _I;:C(|<^+{>[oz{q}*jשsyΛϾrwg.|Y^YsQ9o>ݵ6f̳Is+}kzm]kuk*1})Y0u`ϱKxkvm[}*?}W%ޢC[tx43Oؠhh00co T_Y"j/Rgљ|* c ̏Sg-@z{ẘIˣJ|Uݳ!}]\IyXC*}K³r)]^IOT/M4t/BSůwIw1;qG='es,Oɫ{hjnكH{I^ ,.:ח9AȳF)]Z5͙4Wg8![MZjhLVdvK Ceߔq˹v-vhڄ#H'[M~=?a:(:!)h ^y8tCe(<^R@58 *j˷<zI!¼Q7F-ޜϷ<9emS,Þx\~jO)?5^LCS:yÜWj0_ !|56C8|RZWZmMr;@L;nP4%٠ V݀$KYj6`$u<j7HzX]vAa7B҃b @(m9U: CŴ[d|]B݄r)mdmʯmT=γI]b㲎 j`!0麢\Wju="ßK|Z1YQPY4&T` L3i$2^T|StqmB3dh p&4βzj  ĒX*b@,HIlJbT鵣v׎^wni!+KGVylHBa^{kx){;25F9`jzShDΓxiOzW:#Sm,"Dx7*6k6FmKCΰb ]LE]ewzn O܃:ufMJ~,b;}n] a P-ԢJkS_ץiP+_jVϾW^ywY*Vz{v_~mVˎݗ4| ZP C~ՏS`/i%`zPjCMz)5鵊8\4wѠ.EChPӛKvq.Y%Kd),Rz58Gz(AzWcxO9)һZ [Koz$Ñ4)Ñ6^8ԲƓn45ԗq  Mg"*5^9U-e}]uΗS4_WFN@l,v{LңJA" + {GWU=PA$YKŶnKB_"A.W_]̣ޣUPwq[O񛠵enUZ>.$VFK^fխ~)ԏtQy(Q?q"*CI\M.S7B~6˛pOQJEu{1+zg^xbaLva @ѻ%^XSJU| c7H'GpSu*dK%'|:Q bJAj2M@4YGRL5͈6kT,Ϯo`C5-bU)c@tU|yΏgHsgЁZU^f1tUY2Iv5ZU[Y1 U]QgsZ9;Z/T};ן@RUXMfy{y1\,@rat>R<!RPpAw׽^ W9 Q8$ D( AH 98dWnt>~Ο&4F1$fLsi3-`y4Y1L~ ^9P58EՐ UájTQ5F5)0nz^ξYt[xKo)-e [ xss8GR(jGcq5 8'R8j=C^m6E8[e˓ly-ϱ[^bˋly-ϲ4Jgtd st3SHM@2(Fh` g4 2dFg4ݡ{PQU䈒I#ErH Q 9$G(ELr 9ӝMk0Ά. =]vt`7!&H>"GqBeHJgRiHZkF ސ-zY<)EO9jH-z. d Hb------ fKzc^brY=!Z]in[@IQrQ;飶GL>JNLb5LF~( .CB+Q -EJ 7J$J(Pz3nB [|#C@X`/Zru -؁bF={f'V3gvsl={'莉:bNl_&Hk ,b 2&`7dFv3n6lhB6ڭlLIy|j7ĖrAXi)ĵ\sac5N~t{6O/+3?XE1GoµON4mS~1.DڍwANPH")L.,}ݸ=Nr;a@qh.E`"\ qD.E+(/ש;Idr"ENɉ$9%'rDȓrDNɉ29%'I`o4Ax=v'1f}m~NW@#&yD=B$SI\:=Rr@tUM1)a>,  " E/S`-MʉRjL| )3RP|(! J%gj+ ^() Ex[I(YA;~Z -eBY7Bd z3+ *3KZ^$ " ,sĈIb$1Ibvl%K$f7I$ k4 Lm.^גS-5dTN'v9 @Z+nI'Nv/f:td7)?!ɽL: e TNN/^n'VzrvmO/^&8`No]p}>uwy,E}[}I}N/ζah2#Gm{Im"~uYv˖}?uơ8PDCaq"m K\ƂX RAj&HM hfc'o}{uB`0  0C26) ϖ˞}uc1|,>Xc |R>4Gs=H6r\p9.XWJ5\: s{ҩhz MO4=gEhz͔xX@pn 7 hpS"S SZu{ZC֑:XGaY#u֑:9#O35JӋcdu` *m !oP RCt X!ӤzxD `(`((( XM)utaz\1'PmM)6%ѦDڔLڠMЦx-iukl{hz2F&Yr5OZ$W rz\-[VKF|a*p/E2j#Pm$H6Tfj#Qov^$;CNV$ vxG$ފ'إ,^: % 4IY,pr,p;Y඲eN΂4&7Pҷ<}'&9Yg_6m'd䑷ORjN'0~NR^8um)0 5ft 2=؁Ke>y`'d䑷OP a 04 Xϵ'c tQ>y '}c |, >A\ap9 .G cr\QpT-TDɁtn<}'(@3hzMϠ94=$)31+- 7@pn` ة?sV"ފ[xA!no[$XZV%  4@X'eY6dn3 n89 SFU~>RmgxHoןwHo劽}ɷz>r9vM>VwQ>r9*<'zP?^կg+:ZH뙽u(w&׷gb?Os>c>&S͝nx,>.KSU]eO0u\qKW nQgٖ׿ϛ7v\*Ʀd>#i5Ϝ3#:sRb~<0<$V7+,&%eϛSFmF(Xa1Ps)Xz3uEy;J-5,M_^eMY=廒ھFDk:O]Y0pWHھEڷDoOߕG-Eq"̣3HhS  \ml @6p\;Rl {w\[Z. ǵlzZkR︶ҞIx,t+jAQu=IwU>+rttK%.ɗR;=ҋc=ɈG{jٽ{Y$u5'd_#;Uw\ksxN&YԵ\?arTwCn(fbש4|[w7[8䗮w:UǸ~b`o8js?]p3f5|=CɯfNJؑ_>D‡wʼn\wȯ=ȅ>4X<-*: JÀbHxw]qP o#FvcQL^#o^F&x)?[w3|Ù?nM.@R̈́mo?KK`ÇJ ^w}t&]AbÙ21@:%蛭.:.e9rJaNѩ/U|HTi@t}cuKa ]jWQ_5|Ά6<5֠[z[m}z'r+莩Io \+9Ysr.R R)k /Tf+S^L5j3g j25w=fg)-$ R2Hk .& `wn%K^v7yv!y_I^y jmc2ŵuA\]yy6agV>|vvmg|v)f>>3bKg-{~[?#'{~ʘK䪨+X]X ,I//DJ ]N&qX"QPPs}=<ǢXBb9%(rUDĨU!hίFE04@hb) NT<`G\y_O  $CdH A2,Hɐ  (1z~R0ZFKhi-eafO/ ,3B+M -5 e6$J(Pf3nB2 {DAuHFn+&,"Hp .Á3nd0av/f f3dXF%!;8ٽ'2i&dF~JV*A\yF6lt[mfFn?_F[`ߘs[>Sʮ=oOBNF{~/r<})w6CC{/\~)=$t^ &Vec;QX8 GQ%C/0U ]`qK=A14& @3hSPaTwܗ'BC` !C d( a2B@(A<~/ܧʃ'~bY ?Kg),e~Rwp.rO[ Qx:OG8<t,ӑxw>rϥoq8d)=ޞsx{o=wzzP #*az&˽6(?p`ORd, >"G #|D(%>GHO0ZO>y,ӖAZ'X oJsQGwB#h*>F(YVcc#Ye{H> p|'|'H|'|'|,C--Ye77ҫxz@U"JWmЫvU[*Z&rr/{44y8hm-%ȶlzm-^\c9[^"'k`0RR1)f#)NR0{Ia6ˆI AK6fݺr/d+V+戕sn#v/GfrnGҩ)2kH -"S)6RJ2n3enʸq){/QKFv-vcc{`{lR:=[,0ʯuE\am~c{ {lR[wR.E 2S=A薚$C0KR4. c{ {lZ9뱠IBLt-zۜ[EX?=@J}'M@)4f 80 K1cc{`{ldQ`!C!d8 2BB*: *Le==@" %~2Y?g)T]Ox: O(<tqx:OH<ݎ7dŞXۣTޞsx{oY=4*XxQ&?pX?=p"Tz*8G#r|DY>"GQ#r|'2rY4eճ& J,"XY op n!:L>p* {@)YZid9 @OЀX>>AD>A6>3=fi(ԗ+,A;5nn W*^%ѫDzLڠWЫUͨ iPťBQfgMÁZb[lkma[oAibUǬ~=9/rRp+.=FH #%Ia6$J f3)QrάJp+. X)G#V#v'GVؽ9bws9VsL'Q5aW_Ba E$pb89eFʸq[)RmM2n#erūev_#~Gښz m/G,x+W#--KKkˑWaZgxe>H+2{D1"]-WuXJ_Q"~!P?tvL,t~}];ƭz;,_y v5I{09VysMɵg+FՋ:&՘R}ʄO?woa5 a0 !0T Q<[]HRqX"Ka8@[=wa;sGx(qpc3ɽqc{qO8)=q'oh@ r4@;z\+=[)"W_г+:z??VAqt 3V8kFlF륑gWAoY'bm*Mŷy\Eke|_F?H:,ǡ*S7Hv3O(~ŪMuWJ`kzxƏ"T5%) @g8+5e7)-zvyyN=bs|9ew^ys0u^L[7I )Zg9b]t^e>R_^425I*"ɳSZ4C eNҘg4W$Dc)*LcRtNcѝ" yTB7X :tCn zMKg\[,xo-dd>Khâuh:2ZGGhk5< yis+ZEh=d֓p 79\@ xp.:@W#P"JCd(%2X4AzlK7EL$]f bHY.yϤXyц (E}dd.ⲥjȦJQ2eQG) D@W^gʥRZuRF)|5I(EDYX4 K{L\7׭UAh,/5fH !Q34jGͰ5VfFpmt'$,%QJD(Y%ˢdy,RS GB(H !q<$8fӭ_)+ OBiH<g!<$TEjȵ} t>>D߇ߚ!wl 3aF:ȇ0#fl="at!!$L:efHwK=]u]}M9,S&N:?%{cSgzd)В{$)_ уh?wbׄP¦R*hWyЭicnBrxH !9"$DŽ#CJyՈ<'"LD3y:Ar?@~`#i=4ҞFy>bH>/{Uຽv {ӫe~sxWA6Se}ŵӇ-Ȧh*}Xխ>8v{LG#~/KSZaXp{,_&<q{ ?σ؛폾WU= {Ԟf=r]S{QGL3s{,}ԇRT_G{6,z4c' Euga ^a zXQ!Tǭ/FzSG5n!J4(43Van?Ɖyբ囨ARJ`s:,֡~*#6ai:MwE2W (@4^݀A4d/g佄QP yߥ.ŁPpNefmlr9E#RSavJtv>·&p5F3eK(__*C\3kSII2Df854W+]ϖD 3(a'0f Ga 3"aF"̈"TǤ"]{909X8eZUKj9V-êX,VdJZU+jYVs"F%%Kw:+b;y3żw cޱ;y'1D̼`̧84G92h-@JGtT:x.<KϦKtr:t;tH5d>:MlS:P?-oR4i4H@%M&0I l1i4AL 'MH4a+i4baBY;Dh"E<"HJ%Rd)rDb"E)HQNHq'V"ŽDb"3 _!'WGk~ 7papMA!e123$4d567$4!h9G)@ / )xb +Tt`/\IKrإO>AiWFA\%HKj+-^ZʹTiRIԷKcp8'*f ܢ1/n 1+Ǡ7RU浪JUz3UnTBTCIyLVzr?,yͭ: +`vlkf7v^6!_ky!j/MKs;n9 o;ƾlJΞ )k 4Ж@[h+my @h \ׁR@WϲVNd8 GH2Mcp' d8 '82ӇRbIQ:ufSy1O2i<Ø|f'V3gvl'O>|StL{~bK:r+ -& Ң( /HGv+^:th h1w= (H P J1KŰV n'AVu vm'OPu{ ={׏}>uw%E)2\G 矅&w -_ygp~=O08u) Nth=~WVu˻D"RXDH-uwLUPo04mIqƐBBHS`z%Jp4&:zkQ,7k=$>4P@ChH 4,0݆E> /.|-RZ_k9|-$'-*;G`fwQ;p8 w<=O(.:dPOκ 8Y#`Sx29F<ˈ#^b3Gё6g!#E(@RXGQ`) ٍ|ʽ^#UZ:;@Zq_n#N~r{6/_n'rO)v3^y{lZ_eZhd]QPXXZ^#N]yhٹCZ֢rΐ^k} {&Z":V;˛BUxPJ >ZʈHh "q TxIzy3@H҈SD19}{l>J> @Ch( a4PT9|{l>J? _Kk)|-eZtcC&,Aw; pGXcwG)1 F<ň',#cijx/0%F|d7)n{f}+.b’Hkv .ځm/_n/f~rW)1+Fk> ~~oi3>.[>Җ[ni\sV/GZ~k#/v#*ô66\?^˪ Q(m"#ͲWte_b,uO rǿar}}&3~}]i_n{pni%5C0u\Nu\ζ̼k]͛~/c8kj[I=ę}g6suK2n끲et>L˚vzf,~n̯uM5xcPy<Nw9 )a:]Wy.g7^lw]hvu[Ά)c h\lyA$޼QvZMĄF\n}:ӳOrNif\}]pspp-1.0.1/tests/data/calendar.at0000644000175000017500000001341213137223525013572 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([calendar]) AT_SETUP([epoch]) AT_DATA([epoch.sps], [SET MXERR 1000. SET MXWARN 1000. SET EPOCH 1900. DEBUG EVALUATE/YRMODA(0,1,1) = YRMODA(1900,1,1). DEBUG EVALUATE/YRMODA(1,1,1) = YRMODA(1901,1,1). DEBUG EVALUATE/YRMODA(12,1,1) = YRMODA(1912,1,1). DEBUG EVALUATE/YRMODA(70,1,1) = YRMODA(1970,1,1). DEBUG EVALUATE/YRMODA(87,1,1) = YRMODA(1987,1,1). DEBUG EVALUATE/YRMODA(99,1,1) = YRMODA(1999,1,1). DEBUG EVALUATE/YRMODA(100,1,1). DEBUG EVALUATE/DATE.DMY(1,1,0) = DATE.DMY(1,1,1900). DEBUG EVALUATE/DATE.DMY(1,1,1) = DATE.DMY(1,1,1901). DEBUG EVALUATE/DATE.DMY(1,1,12) = DATE.DMY(1,1,1912). DEBUG EVALUATE/DATE.DMY(1,1,70) = DATE.DMY(1,1,1970). DEBUG EVALUATE/DATE.DMY(1,1,87) = DATE.DMY(1,1,1987). DEBUG EVALUATE/DATE.DMY(1,1,99) = DATE.DMY(1,1,1999). DEBUG EVALUATE/DATE.DMY(1,1,100). SET EPOCH 1901. DEBUG EVALUATE/YRMODA(0,1,1) = YRMODA(1900,1,1). DEBUG EVALUATE/YRMODA(1,1,1) = YRMODA(1901,1,1). DEBUG EVALUATE/YRMODA(12,1,1) = YRMODA(1912,1,1). DEBUG EVALUATE/YRMODA(70,1,1) = YRMODA(1970,1,1). DEBUG EVALUATE/YRMODA(87,1,1) = YRMODA(1987,1,1). DEBUG EVALUATE/YRMODA(99,1,1) = YRMODA(1999,1,1). DEBUG EVALUATE/YRMODA(100,1,1). DEBUG EVALUATE/DATE.DMY(1,1,0) = DATE.DMY(1,1,2000). DEBUG EVALUATE/DATE.DMY(1,1,1) = DATE.DMY(1,1,1901). DEBUG EVALUATE/DATE.DMY(1,1,12) = DATE.DMY(1,1,1912). DEBUG EVALUATE/DATE.DMY(1,1,70) = DATE.DMY(1,1,1970). DEBUG EVALUATE/DATE.DMY(1,1,87) = DATE.DMY(1,1,1987). DEBUG EVALUATE/DATE.DMY(1,1,99) = DATE.DMY(1,1,1999). DEBUG EVALUATE/DATE.DMY(1,1,100). SET EPOCH 1911. DEBUG EVALUATE/YRMODA(0,1,1) = YRMODA(1900,1,1). DEBUG EVALUATE/YRMODA(1,1,1) = YRMODA(1901,1,1). DEBUG EVALUATE/YRMODA(12,1,1) = YRMODA(1912,1,1). DEBUG EVALUATE/YRMODA(70,1,1) = YRMODA(1970,1,1). DEBUG EVALUATE/YRMODA(87,1,1) = YRMODA(1987,1,1). DEBUG EVALUATE/YRMODA(99,1,1) = YRMODA(1999,1,1). DEBUG EVALUATE/YRMODA(100,1,1). DEBUG EVALUATE/DATE.DMY(1,1,0) = DATE.DMY(1,1,2000). DEBUG EVALUATE/DATE.DMY(1,1,1) = DATE.DMY(1,1,2001). DEBUG EVALUATE/DATE.DMY(1,1,12) = DATE.DMY(1,1,1912). DEBUG EVALUATE/DATE.DMY(1,1,70) = DATE.DMY(1,1,1970). DEBUG EVALUATE/DATE.DMY(1,1,87) = DATE.DMY(1,1,1987). DEBUG EVALUATE/DATE.DMY(1,1,99) = DATE.DMY(1,1,1999). DEBUG EVALUATE/DATE.DMY(1,1,100). SET EPOCH 1912. DEBUG EVALUATE/YRMODA(0,1,1) = YRMODA(1900,1,1). DEBUG EVALUATE/YRMODA(1,1,1) = YRMODA(1901,1,1). DEBUG EVALUATE/YRMODA(12,1,1) = YRMODA(1912,1,1). DEBUG EVALUATE/YRMODA(70,1,1) = YRMODA(1970,1,1). DEBUG EVALUATE/YRMODA(87,1,1) = YRMODA(1987,1,1). DEBUG EVALUATE/YRMODA(99,1,1) = YRMODA(1999,1,1). DEBUG EVALUATE/YRMODA(100,1,1). DEBUG EVALUATE/DATE.DMY(1,1,0) = DATE.DMY(1,1,2000). DEBUG EVALUATE/DATE.DMY(1,1,1) = DATE.DMY(1,1,2001). DEBUG EVALUATE/DATE.DMY(1,1,12) = DATE.DMY(1,1,1912). DEBUG EVALUATE/DATE.DMY(1,1,70) = DATE.DMY(1,1,1970). DEBUG EVALUATE/DATE.DMY(1,1,87) = DATE.DMY(1,1,1987). DEBUG EVALUATE/DATE.DMY(1,1,99) = DATE.DMY(1,1,1999). DEBUG EVALUATE/DATE.DMY(1,1,100). SET EPOCH 2012. DEBUG EVALUATE/YRMODA(0,1,1) = YRMODA(1900,1,1). DEBUG EVALUATE/YRMODA(1,1,1) = YRMODA(1901,1,1). DEBUG EVALUATE/YRMODA(12,1,1) = YRMODA(1912,1,1). DEBUG EVALUATE/YRMODA(70,1,1) = YRMODA(1970,1,1). DEBUG EVALUATE/YRMODA(87,1,1) = YRMODA(1987,1,1). DEBUG EVALUATE/YRMODA(99,1,1) = YRMODA(1999,1,1). DEBUG EVALUATE/YRMODA(100,1,1). DEBUG EVALUATE/DATE.DMY(1,1,0) = DATE.DMY(1,1,2100). DEBUG EVALUATE/DATE.DMY(1,1,1) = DATE.DMY(1,1,2101). DEBUG EVALUATE/DATE.DMY(1,1,12) = DATE.DMY(1,1,2012). DEBUG EVALUATE/DATE.DMY(1,1,70) = DATE.DMY(1,1,2070). DEBUG EVALUATE/DATE.DMY(1,1,87) = DATE.DMY(1,1,2087). DEBUG EVALUATE/DATE.DMY(1,1,99) = DATE.DMY(1,1,2099). DEBUG EVALUATE/DATE.DMY(1,1,100). ]) AT_CHECK([pspp --testing-mode --error-file=- --no-output epoch.sps], [1], [true true true true true true epoch.sps:11: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:18: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:27: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:34: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:43: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:50: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:59: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:66: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:75: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis true true true true true true epoch.sps:82: error: DEBUG EVALUATE: Date 0100-1-1 is before the earliest acceptable date of 1582-10-15. sysmis ]) AT_CLEANUP pspp-1.0.1/tests/data/data-in.at0000644000175000017500000023074113137223525013344 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([data input (data-in)]) m4_divert_push([PREPARE_TESTS]) [data_in_prng () { cat > my-rand.pl <<'EOF' # This random number generator and the test for it below are drawn # from Park and Miller, "Random Number Generators: Good Ones are Hard # to Come By", Communications of the ACM 31:10 (October 1988). It is # documented to function properly on systems with a 46-bit or longer # real significand, which includes systems that have 64-bit IEEE reals # (with 53-bit significand). The test should catch any systems for # which this is not true, in any case. our ($seed) = 1; sub my_rand { my ($modulo) = @_; my ($a) = 16807; my ($m) = 2147483647; my ($tmp) = $a * $seed; $seed = $tmp - $m * int ($tmp / $m); return $seed % $modulo; } EOF cat > test-my-rand.pl <<'EOF' #! /usr/bin/perl use strict; use warnings; do './my-rand.pl'; my_rand (1) foreach 1...10000; our $seed; die $seed if $seed != 1043618065; EOF } date_in () { data_in_prng cat > date-in.pl << 'EOF' #! /usr/bin/perl use strict; use warnings; do './my-rand.pl'; my ($fmt_name, @templates) = @ARGV; my @dates = (#yyyy mm dd jjj HH MM SS [1648, 6, 10, 162, 0, 0, 0], [1680, 6, 30, 182, 4, 50, 38], [1716, 7, 24, 206, 12, 31, 35], [1768, 6, 19, 171, 12, 47, 53], [1819, 8, 2, 214, 1, 26, 0], [1839, 3, 27, 86, 20, 58, 11], [1903, 4, 19, 109, 7, 36, 5], [1929, 8, 25, 237, 15, 43, 49], [1941, 9, 29, 272, 4, 25, 9], [1943, 4, 19, 109, 6, 49, 27], [1943, 10, 7, 280, 2, 57, 52], [1992, 3, 17, 77, 16, 45, 44], [1996, 2, 25, 56, 21, 30, 57], [1941, 9, 29, 272, 4, 25, 9], [1943, 4, 19, 109, 6, 49, 27], [1943, 10, 7, 280, 2, 57, 52], [1992, 3, 17, 77, 16, 45, 44], [1996, 2, 25, 56, 21, 30, 57], [2038, 11, 10, 314, 22, 30, 4], [2094, 7, 18, 199, 1, 56, 51]); open (SYNTAX, '>', "$fmt_name.sps") or die "$fmt_name.sps: create: $!\n"; print SYNTAX "SET EPOCH 1930.\n"; print SYNTAX "DATA LIST NOTABLE FILE='$fmt_name.in'/$fmt_name 1-40 ($fmt_name).\n"; print SYNTAX "PRINT OUTFILE='$fmt_name.out'/$fmt_name (F16.2).\n"; print SYNTAX "EXECUTE.\n"; close (SYNTAX); my ($fn) = "$fmt_name.in"; open (DATA, '>', $fn) or die "$fn: create: $!\n"; select DATA; for my $template (@templates) { for my $date (@dates) { print_date_with_template ($date, $template) for 1...10; } } close (DATA); sub print_date_with_template { my ($date, $template) = @_; my ($year, $month, $day, $julian, $hour, $minute, $second) = @$date; my ($quarter) = int (($month - 1) / 3) + 1; my ($week) = int (($julian - 1) / 7) + 1; my (@year_types) = ('full'); push (@year_types, '2digit') if $year >= 1930 && $year < 2030; for my $c (split ('', $template)) { if ($c eq 'd') { printf (+pick ('%d', '%02d'), $day); } elsif ($c eq 'm') { my ($type) = pick ('arabic', 'roman', 'abbrev', 'full'); if ($type eq 'arabic') { printf (+pick ('%d', '%02d'), $month); } elsif ($type eq 'roman') { my ($mmm) = ('i', 'ii', 'iii', 'iv', 'v', 'vi', 'vii', 'viii', 'ix', 'x', 'xi', 'xii')[$month - 1]; print_rand_case ($mmm); } elsif ($type eq 'abbrev') { my ($mmm) = qw (jan feb mar apr may jun jul aug sep oct nov dec)[$month - 1]; print_rand_case ($mmm); } elsif ($type eq 'full') { my ($mmm) = qw (january february march april may june july august september october november december)[$month - 1]; print_rand_case ($mmm); } else { die; } } elsif ($c eq 'y') { my ($type) = pick (@year_types); if ($type eq '2digit') { printf (+pick ('%d', '%02d'), $year % 100); } elsif ($type eq 'full') { print $year; } else { die; } } elsif ($c eq 'j') { my ($type) = pick (@year_types); if ($type eq '2digit') { printf ("%02d%03d", $year % 100, $julian); } elsif ($type eq 'full') { printf ("%04d%03d", $year, $julian); } else { die; } } elsif ($c eq 'q') { print $quarter; } elsif ($c eq 'w') { print $week; } elsif ($c eq 'H') { printf (+pick ('%d', '%02d'), $hour); } elsif ($c eq 'M') { printf (+pick ('%d', '%02d'), $minute); } elsif ($c eq 'S') { printf (+pick ('%d', '%02d'), $second); } elsif ($c eq '-') { print +pick (' ', '-', '.', ',', '/'); } elsif ($c eq ':') { print +pick (' ', ':'); } elsif ($c eq ' ') { print ' '; } elsif ($c eq 'Q') { maybe_print_space (); print_rand_case ('q'); maybe_print_space (); } elsif ($c eq 'W') { maybe_print_space (); print_rand_case ('wk'); maybe_print_space (); } elsif ($c eq '+') { print +pick ('', '-', '+'); } else { die; } } print "\n"; } sub print_rand_case { my ($s) = @_; my ($case) = pick (qw (uc lc tc)); if ($case eq 'uc') { print uc ($s); } elsif ($case eq 'lc') { print lc ($s); } elsif ($case eq 'tc') { print ucfirst ($s); } else { die; } } sub maybe_print_space { print +pick ('', ' '); } sub pick { return $_[int (my_rand ($#_ + 1))]; } EOF } time_in () { data_in_prng cat > time-in.pl << 'EOF' #! /usr/bin/perl use strict; use warnings; do './my-rand.pl'; my ($skip, $fmt_name, @templates) = @ARGV; my_rand (1) foreach 1...$skip; my @times = (# D HH MM SS [ 0, 0, 0, 0.00], [ 1, 4, 50, 38.68], [ 5, 12, 31, 35.82], [ 0, 12, 47, 53.41], [ 3, 1, 26, 0.69], [ 1, 20, 58, 11.19], [ 12, 7, 36, 5.98], [ 52, 15, 43, 49.27], [ 7, 4, 25, 9.24], [ 0, 6, 49, 27.89], [ 20, 2, 57, 52.56], [555, 16, 45, 44.12], [120, 21, 30, 57.27], [ 0, 4, 25, 9.98], [ 3, 6, 49, 27.24], [ 5, 2, 57, 52.13], [ 0, 16, 45, 44.35], [ 1, 21, 30, 57.32], [ 10, 22, 30, 4.27], [ 22, 1, 56, 51.18]); open (SYNTAX, '>', "$fmt_name.sps") or die "$fmt_name.sps: create: $!\n"; print SYNTAX "DATA LIST NOTABLE FILE='$fmt_name.data'/$fmt_name 1-40 ($fmt_name).\n"; print SYNTAX "PRINT OUTFILE='$fmt_name.out'/$fmt_name (F16.2).\n"; print SYNTAX "EXECUTE.\n"; close (SYNTAX); my ($fn) = "$fmt_name.data"; open (DATA, '>', $fn) or die "$fn: create: $!\n"; select DATA; for my $template (@templates) { for my $time (@times) { print_time_with_template ($time, $template) for 1...10; } } close (DATA); sub print_time_with_template { my ($time, $template) = @_; my ($day, $hour, $minute, $second) = @$time; for my $c (split ('', $template)) { if ($c eq '+') { print +pick ('', '-', '+'); } elsif ($c eq 'D') { printf (+pick ('%d', '%02d'), $day); $day = 0; } elsif ($c eq 'H') { printf (+pick ('%d', '%02d'), $hour + 24 * $day); } elsif ($c eq 'M') { printf (+pick ('%d', '%02d'), $minute); } elsif ($c eq 'S') { printf (+pick ('%.0f', '%02.0f', '%.1f', '%.2f'), $second); } elsif ($c eq ':') { print +pick (' ', ':'); } elsif ($c eq ' ') { print ' '; } else { die; } } print "\n"; } sub pick { return $_[int (my_rand ($#_ + 1)) ]; } EOF }] m4_divert_pop([PREPARE_TESTS]) AT_SETUP([numeric input formats]) AT_KEYWORDS([data-in]) data_in_prng AT_CHECK([$PERL test-my-rand.pl]) AT_DATA([num-in.pl], [[#! /usr/bin/perl use POSIX; use strict; use warnings; do './my-rand.pl'; for my $number (0, 1, .5, .015625, 123) { my ($base_exp) = floor ($number ? log10 ($number) : 0); for my $offset (-3...3) { my ($exponent) = $base_exp + $offset; my ($fraction) = $number / 10**$offset; permute_zeros ($fraction, $exponent); } } sub permute_zeros { my ($fraction, $exponent) = @_; my ($frac_rep) = sprintf ("%f", $fraction); my ($leading_zeros) = length (($frac_rep =~ /^(0*)/)[0]); my ($trailing_zeros) = length (($frac_rep =~ /(\.?0*)$/)[0]); for my $i (0...$leading_zeros) { for my $j (0...$trailing_zeros) { my ($trimmed) = substr ($frac_rep, $i, length ($frac_rep) - $i - $j); next if $trimmed eq '.' || $trimmed eq ''; permute_commas ($trimmed, $exponent); } } } sub permute_commas { my ($frac_rep, $exponent) = @_; permute_dot_comma ($frac_rep, $exponent); my ($pos) = int (my_rand (length ($frac_rep) + 1)); $frac_rep = substr ($frac_rep, 0, $pos) . "," . substr ($frac_rep, $pos); permute_dot_comma ($frac_rep, $exponent); } sub permute_dot_comma { my ($frac_rep, $exponent) = @_; permute_exponent_syntax ($frac_rep, $exponent); if ($frac_rep =~ /[,.]/) { $frac_rep =~ tr/.,/,./; permute_exponent_syntax ($frac_rep, $exponent); } } sub permute_exponent_syntax { my ($frac_rep, $exponent) = @_; my (@exp_reps); if ($exponent == 0) { @exp_reps = pick ('', 'e0', 'e-0', 'e+0', '-0', '+0'); } elsif ($exponent > 0) { @exp_reps = pick ("e$exponent", "e+$exponent", "+$exponent"); } else { my ($abs_exp) = -$exponent; @exp_reps = pick ("e-$abs_exp", , "e-$abs_exp", "-$abs_exp"); } permute_sign_and_affix ($frac_rep, $_) foreach @exp_reps; } sub permute_sign_and_affix { my ($frac_rep, $exp_rep) = @_; for my $prefix (pick ('', '$'), pick ('-', '-$', '$-', '$-$'), pick ('+', '+$', '$+', '$+$')) { for my $suffix ('', '%') { permute_spaces ("$prefix$frac_rep$exp_rep$suffix"); } } } sub permute_spaces { my ($s) = @_; $s =~ s/([-+\$e%])/ $1 /g; my (@fields) = split (' ', $s); print join ('', @fields), "\n"; if ($#fields > 0) { my ($pos) = int (my_rand ($#fields)) + 1; print join ('', @fields[0...$pos - 1]); print " "; print join ('', @fields[$pos...$#fields]); print "\n"; } } sub pick { return $_[int (my_rand ($#_ + 1))]; } ]]) AT_CHECK([$PERL num-in.pl > num-in.data]) AT_DATA([num-in.sps], [dnl SET ERRORS=NONE. SET MXERRS=10000000. SET MXWARNS=10000000. DATA LIST FILE='num-in.data' NOTABLE/ f 1-40 (f) comma 1-40 (comma) dot 1-40 (dot) dollar 1-40 (dollar) pct 1-40 (pct) e 1-40 (e). PRINT OUTFILE='num-in.out'/all (6f10.4). EXECUTE. ]) AT_CHECK([pspp -O format=csv num-in.sps]) AT_CHECK([gzip -cd < $top_srcdir/tests/data/num-in.expected.gz > expout]) AT_CHECK([cat num-in.out], [0], [expout]) AT_CLEANUP dnl Some very old version of PSPP crashed reading big numbers, dnl so this checks for regressions. AT_SETUP([reading big numbers]) AT_KEYWORDS([data-in]) AT_DATA([bignum.txt], [dnl 0 0.1 0.5 0.8 0.9 0.999 1 2 3 4 5 12 123 1234 12345 123456 1234567 12345678 123456789 1234567890 19999999999 199999999999 1234567890123 19999999999999 199999999999999 1234567890123456 19999999999999999 123456789012345678 1999999999999999999 12345678901234567890 199999999999999999999 1234567890123456789012 19999999999999999999999 123456789012345678901234 1999999999999999999999999 12345678901234567890123456 199999999999999999999999999 1234567890123456789012345678 19999999999999999999999999999 123456789012345678901234567890 1999999999999999999999999999999 12345678901234567890123456789012 199999999999999999999999999999999 1234567890123456789012345678901234 19999999999999999999999999999999999 123456789012345678901234567890123456 1999999999999999999999999999999999999 12345678901234567890123456789012345678 199999999999999999999999999999999999999 1234567890123456789012345678901234567890 1999999999999999999999999999999999999999 1e40 1.1e40 1.5e40 1e41 1e50 1e100 1e150 1e200 1e250 1e300 1.79641e308 wizzah ]) AT_DATA([bignum.sps], [dnl title 'Test use of big numbers'. *** Do the portable output. data list file='bignum.txt'/BIGNUM 1-40. list. *** Do the nonportable output for fun. descriptives BIGNUM. ]) AT_CHECK([pspp -o pspp.csv bignum.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([DATE input format]) AT_KEYWORDS([data-in]) date_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL date-in.pl date d-m-y]) AT_CHECK([test -s date.sps]) AT_CHECK([test -s date.in]) AT_CHECK([pspp -O format=csv date.sps]) AT_CHECK([cat date.out], [0], [dnl 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 ]) AT_CLEANUP AT_SETUP([ADATE input format]) AT_KEYWORDS([data-in]) date_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL date-in.pl adate m-d-y]) AT_CHECK([test -s adate.sps]) AT_CHECK([test -s adate.in]) AT_CHECK([pspp -O format=csv adate.sps]) AT_CHECK([cat adate.out], [0], [dnl 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 ]) AT_CLEANUP AT_SETUP([EDATE input format]) AT_KEYWORDS([data-in]) date_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL date-in.pl edate d-m-y]) AT_CHECK([test -s edate.sps]) AT_CHECK([test -s edate.in]) AT_CHECK([pspp -O format=csv edate.sps]) AT_CHECK([cat edate.out], [0], [dnl 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 ]) AT_CLEANUP AT_SETUP([JDATE input format]) AT_KEYWORDS([data-in]) date_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL date-in.pl jdate j]) AT_CHECK([test -s jdate.sps]) AT_CHECK([test -s jdate.in]) AT_CHECK([pspp -O format=csv jdate.sps]) AT_CHECK([cat jdate.out], [0], [dnl 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 ]) AT_CLEANUP AT_SETUP([SDATE input format]) AT_KEYWORDS([data-in]) date_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL date-in.pl sdate y-m-d]) AT_CHECK([test -s sdate.sps]) AT_CHECK([test -s sdate.in]) AT_CHECK([pspp -O format=csv sdate.sps]) AT_CHECK([cat sdate.out], [0], [dnl 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 3083529600.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 4221590400.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 5859561600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 7472649600.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 8092742400.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10114329600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 10945929600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11327644800.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11376633600.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 11391408000.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 12920169600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 13044585600.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 14392339200.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 16149628800.00 ]) AT_CLEANUP AT_SETUP([QYR input format]) AT_KEYWORDS([data-in]) date_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL date-in.pl qyr qQy]) AT_CHECK([test -s qyr.sps]) AT_CHECK([test -s qyr.in]) AT_CHECK([pspp -O format=csv qyr.sps]) AT_CHECK([cat qyr.out], [0], [dnl 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 2065910400.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 3075753600.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 5852736000.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 7469884800.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 8085398400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 10941177600.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11319868800.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 12913603200.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 13039833600.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 14388883200.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 ]) AT_CLEANUP AT_SETUP([MOYR input format]) AT_KEYWORDS([data-in]) date_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL date-in.pl moyr m-y]) AT_CHECK([test -s moyr.sps]) AT_CHECK([test -s moyr.in]) AT_CHECK([pspp -O format=csv moyr.sps]) AT_CHECK([cat moyr.out], [0], [dnl 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 2071180800.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 3081024000.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 4219603200.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 5858006400.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 7472563200.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 8090496000.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10112774400.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 10943856000.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11325225600.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11375078400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 12918787200.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 13042512000.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 14391561600.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 16148160000.00 ]) AT_CLEANUP AT_SETUP([WKYR input format]) AT_KEYWORDS([data-in]) date_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL date-in.pl wkyr wWy]) AT_CHECK([test -s wkyr.sps]) AT_CHECK([test -s wkyr.in]) AT_CHECK([pspp -O format=csv wkyr.sps]) AT_CHECK([cat wkyr.out], [0], [dnl 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 3083011200.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 4221417600.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 5859388800.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 7472390400.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 8092656000.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10114070400.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 10945497600.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11327212800.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11376374400.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 11390889600.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 12919651200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 13044067200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 14391907200.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 16149456000.00 ]) AT_CLEANUP AT_SETUP([DATETIME input format]) AT_KEYWORDS([data-in]) date_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL date-in.pl datetime "d-m-y +H:M" "d-m-y +H:M:S"]) AT_CHECK([test -s datetime.sps]) AT_CHECK([test -s datetime.in]) AT_CHECK([pspp -O format=csv datetime.sps]) AT_CHECK([cat datetime.out], [0], [dnl 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083512200.00 3083512200.00 3083547000.00 3083547000.00 3083547000.00 3083512200.00 3083547000.00 3083547000.00 3083512200.00 3083512200.00 4221545340.00 4221635460.00 4221545340.00 4221545340.00 4221635460.00 4221635460.00 4221545340.00 4221635460.00 4221545340.00 4221635460.00 5859607620.00 5859607620.00 5859515580.00 5859515580.00 5859607620.00 5859607620.00 5859607620.00 5859607620.00 5859515580.00 5859607620.00 7472644440.00 7472654760.00 7472654760.00 7472654760.00 7472654760.00 7472654760.00 7472654760.00 7472654760.00 7472644440.00 7472654760.00 8092817880.00 8092666920.00 8092817880.00 8092666920.00 8092817880.00 8092817880.00 8092666920.00 8092817880.00 8092666920.00 8092817880.00 10114302240.00 10114356960.00 10114302240.00 10114302240.00 10114302240.00 10114356960.00 10114302240.00 10114302240.00 10114302240.00 10114356960.00 10945873020.00 10945986180.00 10945986180.00 10945986180.00 10945873020.00 10945986180.00 10945986180.00 10945873020.00 10945986180.00 10945873020.00 11327628900.00 11327660700.00 11327660700.00 11327660700.00 11327660700.00 11327628900.00 11327628900.00 11327660700.00 11327660700.00 11327660700.00 11376658140.00 11376609060.00 11376658140.00 11376658140.00 11376609060.00 11376658140.00 11376609060.00 11376658140.00 11376658140.00 11376658140.00 11391418620.00 11391418620.00 11391397380.00 11391397380.00 11391418620.00 11391418620.00 11391397380.00 11391418620.00 11391418620.00 11391418620.00 12920229900.00 12920229900.00 12920229900.00 12920229900.00 12920229900.00 12920109300.00 12920229900.00 12920109300.00 12920229900.00 12920229900.00 13044508200.00 13044663000.00 13044508200.00 13044663000.00 13044508200.00 13044508200.00 13044663000.00 13044663000.00 13044663000.00 13044663000.00 11327660700.00 11327628900.00 11327628900.00 11327660700.00 11327628900.00 11327628900.00 11327628900.00 11327628900.00 11327628900.00 11327628900.00 11376609060.00 11376658140.00 11376658140.00 11376609060.00 11376658140.00 11376609060.00 11376658140.00 11376609060.00 11376658140.00 11376658140.00 11391397380.00 11391397380.00 11391418620.00 11391397380.00 11391418620.00 11391418620.00 11391418620.00 11391418620.00 11391418620.00 11391397380.00 12920229900.00 12920229900.00 12920229900.00 12920229900.00 12920229900.00 12920229900.00 12920109300.00 12920229900.00 12920229900.00 12920229900.00 13044508200.00 13044663000.00 13044508200.00 13044508200.00 13044508200.00 13044663000.00 13044663000.00 13044663000.00 13044508200.00 13044508200.00 14392420200.00 14392258200.00 14392420200.00 14392420200.00 14392420200.00 14392420200.00 14392258200.00 14392420200.00 14392420200.00 14392420200.00 16149635760.00 16149635760.00 16149635760.00 16149635760.00 16149635760.00 16149635760.00 16149635760.00 16149635760.00 16149621840.00 16149635760.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 2071958400.00 3083512162.00 3083512162.00 3083512162.00 3083547038.00 3083512162.00 3083512162.00 3083547038.00 3083512162.00 3083547038.00 3083547038.00 4221635495.00 4221545305.00 4221635495.00 4221635495.00 4221635495.00 4221545305.00 4221635495.00 4221635495.00 4221635495.00 4221635495.00 5859607673.00 5859515527.00 5859607673.00 5859607673.00 5859607673.00 5859607673.00 5859515527.00 5859607673.00 5859607673.00 5859607673.00 7472654760.00 7472644440.00 7472654760.00 7472654760.00 7472654760.00 7472644440.00 7472654760.00 7472654760.00 7472644440.00 7472654760.00 8092817891.00 8092817891.00 8092666909.00 8092817891.00 8092817891.00 8092817891.00 8092817891.00 8092817891.00 8092817891.00 8092817891.00 10114302235.00 10114302235.00 10114302235.00 10114356965.00 10114356965.00 10114356965.00 10114356965.00 10114356965.00 10114356965.00 10114302235.00 10945986229.00 10945986229.00 10945872971.00 10945872971.00 10945986229.00 10945986229.00 10945872971.00 10945986229.00 10945986229.00 10945986229.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11327660709.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11391397328.00 11391418672.00 11391418672.00 11391418672.00 11391397328.00 11391418672.00 11391397328.00 11391418672.00 11391418672.00 11391418672.00 12920229944.00 12920229944.00 12920109256.00 12920229944.00 12920229944.00 12920109256.00 12920109256.00 12920109256.00 12920229944.00 12920109256.00 13044663057.00 13044663057.00 13044663057.00 13044508143.00 13044663057.00 13044663057.00 13044663057.00 13044508143.00 13044663057.00 13044663057.00 11327628891.00 11327628891.00 11327660709.00 11327660709.00 11327660709.00 11327628891.00 11327628891.00 11327660709.00 11327660709.00 11327628891.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376658167.00 11376609033.00 11376658167.00 11376609033.00 11376658167.00 11376658167.00 11391418672.00 11391397328.00 11391418672.00 11391397328.00 11391397328.00 11391397328.00 11391397328.00 11391397328.00 11391397328.00 11391397328.00 12920229944.00 12920229944.00 12920229944.00 12920109256.00 12920229944.00 12920229944.00 12920229944.00 12920229944.00 12920229944.00 12920229944.00 13044663057.00 13044663057.00 13044663057.00 13044663057.00 13044508143.00 13044663057.00 13044508143.00 13044508143.00 13044663057.00 13044663057.00 14392258196.00 14392420204.00 14392420204.00 14392420204.00 14392258196.00 14392420204.00 14392420204.00 14392258196.00 14392420204.00 14392420204.00 16149635811.00 16149635811.00 16149635811.00 16149635811.00 16149635811.00 16149621789.00 16149621789.00 16149621789.00 16149635811.00 16149635811.00 ]) AT_CLEANUP AT_SETUP([TIME input format]) AT_KEYWORDS([data-in]) time_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL time-in.pl 0 time +H:M +H:M:S]) AT_CHECK([test -s time.sps]) AT_CHECK([test -s time.data]) AT_CHECK([pspp -O format=csv time.sps]) AT_CHECK([cat time.out], [0], [dnl .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 -103800.00 103800.00 103800.00 -103800.00 103800.00 -103800.00 103800.00 103800.00 -103800.00 103800.00 477060.00 477060.00 477060.00 477060.00 -477060.00 477060.00 477060.00 477060.00 477060.00 -477060.00 46020.00 -46020.00 -46020.00 -46020.00 46020.00 46020.00 -46020.00 46020.00 46020.00 -46020.00 264360.00 264360.00 -264360.00 -264360.00 264360.00 -264360.00 264360.00 -264360.00 -264360.00 -264360.00 161880.00 161880.00 161880.00 161880.00 161880.00 -161880.00 161880.00 161880.00 161880.00 -161880.00 1064160.00 1064160.00 1064160.00 1064160.00 1064160.00 1064160.00 -1064160.00 1064160.00 1064160.00 1064160.00 -4549380.00 4549380.00 4549380.00 4549380.00 4549380.00 4549380.00 4549380.00 -4549380.00 4549380.00 4549380.00 620700.00 -620700.00 620700.00 620700.00 -620700.00 620700.00 -620700.00 -620700.00 620700.00 620700.00 24540.00 -24540.00 24540.00 24540.00 24540.00 24540.00 24540.00 24540.00 24540.00 24540.00 -1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 48012300.00 -48012300.00 -48012300.00 48012300.00 48012300.00 48012300.00 48012300.00 48012300.00 48012300.00 48012300.00 10445400.00 -10445400.00 -10445400.00 10445400.00 10445400.00 10445400.00 -10445400.00 10445400.00 10445400.00 -10445400.00 15900.00 15900.00 -15900.00 15900.00 -15900.00 -15900.00 15900.00 15900.00 15900.00 15900.00 283740.00 -283740.00 283740.00 283740.00 283740.00 -283740.00 283740.00 283740.00 -283740.00 283740.00 442620.00 442620.00 442620.00 442620.00 442620.00 442620.00 442620.00 442620.00 442620.00 -442620.00 60300.00 60300.00 60300.00 60300.00 60300.00 -60300.00 -60300.00 60300.00 -60300.00 -60300.00 163800.00 -163800.00 -163800.00 -163800.00 163800.00 163800.00 163800.00 163800.00 -163800.00 163800.00 945000.00 -945000.00 -945000.00 -945000.00 945000.00 945000.00 945000.00 -945000.00 945000.00 945000.00 -1907760.00 1907760.00 -1907760.00 1907760.00 -1907760.00 1907760.00 1907760.00 1907760.00 1907760.00 -1907760.00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 103839.00 103838.68 -103838.70 -103838.68 103838.70 103838.68 -103839.00 103838.68 103838.70 -103839.00 477095.82 477096.00 477096.00 477095.82 477095.82 477095.82 477095.80 -477095.80 477095.82 -477095.82 -46073.00 -46073.40 46073.00 46073.40 46073.40 46073.00 -46073.00 46073.00 46073.00 46073.00 264360.69 -264360.70 264361.00 264360.70 264360.69 264360.70 264361.00 264360.70 -264361.00 264361.00 161891.00 -161891.20 -161891.00 161891.00 -161891.00 161891.20 -161891.20 -161891.20 161891.20 -161891.19 -1064166.00 1064165.98 -1064166.00 -1064166.00 -1064165.98 1064166.00 1064166.00 -1064166.00 -1064165.98 1064166.00 4549429.00 4549429.27 4549429.27 -4549429.30 4549429.00 -4549429.00 4549429.00 4549429.27 4549429.00 4549429.30 620709.00 -620709.24 620709.24 620709.24 620709.24 620709.20 -620709.24 620709.20 620709.24 620709.24 24567.90 24567.89 24567.90 24568.00 24567.90 24568.00 24568.00 -24567.90 24567.90 24568.00 1738672.56 1738673.00 -1738672.60 -1738672.56 1738673.00 1738673.00 1738673.00 1738672.60 -1738672.56 1738672.60 -48012344.10 48012344.12 -48012344.10 -48012344.00 -48012344.00 48012344.00 -48012344.00 -48012344.00 -48012344.00 48012344.00 10445457.27 10445457.00 10445457.30 10445457.00 10445457.27 10445457.00 10445457.27 10445457.00 10445457.00 -10445457.30 -15909.98 15910.00 -15910.00 15910.00 -15909.98 15910.00 -15909.98 15909.98 15910.00 15909.98 -283767.00 283767.20 283767.20 283767.00 -283767.00 283767.00 283767.24 283767.00 283767.24 283767.00 -442672.00 442672.13 442672.00 442672.13 442672.00 442672.00 442672.00 442672.00 -442672.00 442672.13 -60344.40 -60344.00 60344.00 60344.35 60344.00 60344.40 60344.40 -60344.00 60344.00 60344.40 163857.00 163857.00 163857.00 163857.00 163857.30 -163857.30 163857.30 -163857.00 -163857.00 163857.30 945004.30 945004.00 945004.27 945004.30 945004.30 945004.00 945004.30 945004.00 945004.00 945004.00 1907811.00 1907811.00 -1907811.00 1907811.18 1907811.20 1907811.00 -1907811.00 1907811.18 -1907811.00 -1907811.00 ]) AT_CLEANUP AT_SETUP([DTIME input format]) AT_KEYWORDS([data-in]) time_in AT_CHECK([$PERL test-my-rand.pl]) AT_CHECK([$PERL time-in.pl 2000 dtime '+D H:M' '+D H:M:S']) AT_CHECK([test -s dtime.sps]) AT_CHECK([test -s dtime.data]) AT_CHECK([pspp -O format=csv dtime.sps]) AT_CHECK([cat dtime.out], [0], [dnl .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 103800.00 103800.00 -103800.00 103800.00 103800.00 -103800.00 103800.00 -103800.00 103800.00 -103800.00 477060.00 477060.00 477060.00 477060.00 477060.00 477060.00 -477060.00 -477060.00 -477060.00 477060.00 46020.00 46020.00 46020.00 46020.00 -46020.00 -46020.00 -46020.00 46020.00 46020.00 46020.00 264360.00 264360.00 -264360.00 264360.00 264360.00 264360.00 264360.00 -264360.00 -264360.00 -264360.00 -161880.00 -161880.00 161880.00 161880.00 161880.00 -161880.00 161880.00 -161880.00 161880.00 -161880.00 1064160.00 1064160.00 1064160.00 1064160.00 1064160.00 1064160.00 -1064160.00 1064160.00 1064160.00 1064160.00 -4549380.00 4549380.00 -4549380.00 -4549380.00 -4549380.00 4549380.00 4549380.00 4549380.00 4549380.00 4549380.00 -620700.00 620700.00 620700.00 -620700.00 620700.00 620700.00 620700.00 -620700.00 620700.00 620700.00 -24540.00 24540.00 24540.00 24540.00 -24540.00 24540.00 24540.00 -24540.00 24540.00 -24540.00 1738620.00 1738620.00 1738620.00 -1738620.00 -1738620.00 -1738620.00 1738620.00 1738620.00 1738620.00 1738620.00 48012300.00 48012300.00 48012300.00 48012300.00 48012300.00 -48012300.00 -48012300.00 48012300.00 -48012300.00 -48012300.00 -10445400.00 10445400.00 -10445400.00 10445400.00 10445400.00 10445400.00 10445400.00 10445400.00 10445400.00 10445400.00 15900.00 15900.00 15900.00 15900.00 15900.00 -15900.00 15900.00 15900.00 15900.00 15900.00 -283740.00 283740.00 -283740.00 -283740.00 283740.00 283740.00 283740.00 283740.00 283740.00 -283740.00 442620.00 -442620.00 -442620.00 442620.00 442620.00 -442620.00 -442620.00 -442620.00 442620.00 442620.00 60300.00 -60300.00 60300.00 60300.00 60300.00 60300.00 60300.00 60300.00 60300.00 60300.00 163800.00 163800.00 -163800.00 163800.00 -163800.00 -163800.00 -163800.00 163800.00 163800.00 -163800.00 945000.00 945000.00 945000.00 945000.00 -945000.00 945000.00 945000.00 945000.00 945000.00 -945000.00 -1907760.00 1907760.00 1907760.00 1907760.00 -1907760.00 -1907760.00 -1907760.00 1907760.00 -1907760.00 -1907760.00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 103838.70 103838.70 103839.00 103838.68 103838.70 103839.00 103838.70 -103839.00 103839.00 103839.00 477095.80 477095.80 -477095.80 477095.82 477095.82 477095.82 -477095.82 477095.82 477096.00 -477096.00 -46073.00 46073.00 -46073.00 46073.41 46073.00 46073.40 46073.00 46073.41 46073.41 -46073.00 264360.70 264360.70 264360.69 264361.00 -264360.70 264360.69 -264360.70 264360.69 -264361.00 264360.69 161891.00 -161891.20 -161891.19 161891.19 161891.00 161891.20 161891.20 161891.00 161891.00 161891.20 -1064165.98 1064166.00 1064166.00 1064166.00 1064165.98 1064166.00 1064166.00 -1064165.98 1064165.98 -1064166.00 4549429.27 4549429.27 4549429.27 4549429.27 4549429.00 4549429.27 -4549429.27 4549429.00 4549429.27 4549429.27 -620709.00 620709.20 620709.00 -620709.20 -620709.24 -620709.00 620709.00 620709.24 -620709.24 620709.00 -24567.89 24567.90 24568.00 24567.89 24568.00 24568.00 24567.90 -24568.00 -24567.89 -24568.00 1738672.56 -1738672.56 1738672.56 -1738672.60 -1738673.00 1738672.56 1738673.00 -1738672.60 1738672.60 1738672.56 48012344.00 -48012344.12 -48012344.00 48012344.12 -48012344.12 -48012344.00 48012344.12 -48012344.00 -48012344.00 -48012344.00 -10445457.00 10445457.00 10445457.00 10445457.00 -10445457.00 -10445457.00 10445457.00 10445457.00 10445457.00 -10445457.30 -15909.98 15910.00 -15909.98 15910.00 15910.00 -15910.00 -15910.00 -15910.00 -15910.00 15909.98 -283767.24 283767.20 283767.24 283767.24 283767.00 283767.20 283767.20 283767.24 -283767.00 283767.24 442672.13 -442672.13 442672.00 442672.13 442672.10 442672.00 442672.00 -442672.10 442672.00 -442672.10 -60344.35 60344.00 60344.00 -60344.00 60344.00 60344.35 60344.00 60344.35 60344.00 60344.00 -163857.00 -163857.00 163857.32 163857.00 -163857.30 -163857.00 163857.30 163857.00 163857.00 -163857.00 -945004.00 -945004.30 945004.27 945004.27 -945004.27 -945004.27 -945004.00 -945004.27 -945004.00 945004.30 1907811.00 1907811.00 1907811.00 1907811.00 1907811.20 1907811.18 1907811.18 1907811.18 1907811.18 1907811.00 ]) AT_CLEANUP AT_SETUP([binary and hexadecimal input (IB, PIB, and PIBHEX formats)]) AT_CHECK([$PERL -e 'print pack "n", $_ foreach 0...65535' > binhex-in.data]) AT_CHECK([[wc -c < binhex-in.data | sed 's/[ ]//g']], [0], [131072 ]) AT_DATA([binhex-in.sps], [dnl SET RIB=MSBFIRST. SET ERRORS=NONE. SET MXWARNS=10000000. SET MXERRS=10000000. FILE HANDLE data/NAME='binhex-in.data'/MODE=IMAGE/LRECL=2. DATA LIST FILE=data NOTABLE/ib 1-2 (IB) pib 1-2 (PIB) pibhex 1-2 (PIBHEX). COMPUTE x=$CASENUM - 1. PRINT OUTFILE='binhex-in.out'/x (PIBHEX4) ' ' ib pib pibhex. EXECUTE. ]) AT_CHECK([gzip -cd < $top_srcdir/tests/data/binhex-in.expected.cmp.gz | \ $PERL -pe "printf ' %04X ', $.-1" > expout]) AT_CHECK([pspp -O format=csv binhex-in.sps], [0]) AT_CHECK([cat binhex-in.out], [0], [expout]) AT_CLEANUP AT_SETUP([BCD input (P and PK formats)]) AT_CHECK([$PERL -e 'print pack "n", $_ foreach 0...65535' > bcd-in.data]) AT_CHECK([[wc -c < bcd-in.data | sed 's/[ ]//g']], [0], [131072 ]) AT_DATA([bcd-in.sps], [dnl SET ERRORS=NONE. SET MXWARNS=10000000. SET MXERRS=10000000. FILE HANDLE data/NAME='bcd-in.data'/MODE=IMAGE/LRECL=2. DATA LIST FILE=data NOTABLE/p 1-2 (P) pk 1-2 (PK). COMPUTE x=$CASENUM - 1. PRINT OUTFILE='bcd-in.out'/x (PIBHEX4) ' ' P PK. EXECUTE. ]) AT_CHECK([gzip -cd < $top_srcdir/tests/data/bcd-in.expected.cmp.gz | \ $PERL -pe "printf ' %04X ', $.-1" > expout]) AT_CHECK([pspp -O format=csv bcd-in.sps]) AT_CHECK([cat bcd-in.out], [0], [expout]) AT_CLEANUP AT_SETUP([legacy input (N and Z formats)]) AT_CHECK([$PERL -e 'print pack "n", $_ foreach 0...65535' > legacy-in.data]) AT_CHECK([[wc -c < legacy-in.data | sed 's/[ ]//g']], [0], [131072 ]) AT_DATA([legacy-in.sps], [dnl SET ERRORS=NONE. SET MXWARNS=10000000. SET MXERRS=10000000. FILE HANDLE data/NAME='legacy-in.data'/MODE=IMAGE/LRECL=2. DATA LIST NOTABLE FILE=data/n 1-2 (N) z 1-2 (z). COMPUTE x=$CASENUM - 1. PRINT OUTFILE='legacy-in.out'/x (PIBHEX4) ' ' N Z. EXECUTE. ]) AT_CHECK([gzip -cd < $top_srcdir/tests/data/legacy-in.expected.cmp.gz | \ $PERL -pe "printf ' %04X ', $.-1" > expout]) AT_CHECK([pspp -O format=csv legacy-in.sps]) AT_CHECK([cat legacy-in.out], [0], [expout]) AT_CLEANUP AT_SETUP([WKDAY input format]) AT_DATA([wkday.sps], [dnl DATA LIST NOTABLE /wkday2 1-2 (wkday) wkday3 1-3 (wkday) wkday4 1-4 (wkday) wkday5 1-5 (wkday) wkday6 1-6 (wkday) wkday7 1-7 (wkday) wkday8 1-8 (wkday) wkday9 1-9 (wkday) wkday10 1-10 (wkday). BEGIN DATA. . monady tuseday WEDENSDAY Thurdsay fRidya SAturady sudnay sturday END DATA. FORMATS ALL (WKDAY2). PRINT OUTFILE='wkday.out'/ALL. EXECUTE. ]) AT_CHECK([pspp -O format=csv wkday.sps], [0], [dnl wkday.sps:20.1-20.2: warning: Data for variable wkday2 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.3: warning: Data for variable wkday3 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.4: warning: Data for variable wkday4 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.5: warning: Data for variable wkday5 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.6: warning: Data for variable wkday6 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.7: warning: Data for variable wkday7 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.8: warning: Data for variable wkday8 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.9: warning: Data for variable wkday9 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. wkday.sps:20.1-20.10: warning: Data for variable wkday10 is not valid as format WKDAY: Unrecognized weekday name. At least the first two letters of an English weekday name must be specified. ]) AT_CHECK([cat wkday.out], [0], [dnl . . . . . . . . . @&t@ . . . . . . . . . @&t@ MO MO MO MO MO MO MO MO MO @&t@ TU TU TU TU TU TU TU TU TU @&t@ WE WE WE WE WE WE WE WE WE @&t@ TH TH TH TH TH TH TH TH TH @&t@ FR FR FR FR FR FR FR FR FR @&t@ SA SA SA SA SA SA SA SA SA @&t@ SU SU SU SU SU SU SU SU SU @&t@ . . . . . . . . . @&t@ ]) AT_CLEANUP AT_SETUP([MONTH input format]) AT_DATA([month.sps], [dnl DATA LIST NOTABLE /month3 1-3 (MONTH) month4 1-4 (MONTH) month5 1-5 (MONTH) month6 1-6 (MONTH) month7 1-7 (MONTH) month8 1-8 (MONTH) month9 1-9 (MONTH) month10 1-10 (MONTH). BEGIN DATA. . i ii iii iiii iv v vi vii viii ix viiii x xi xii 0 1 2 3 4 5 6 7 8 9 10 11 12 13 january JANAURY February fEbraury MArch marhc apRIL may june july august september october november decmeber december END DATA. FORMATS ALL (MONTH3). PRINT OUTFILE='month.out'/ALL. EXECUTE. ]) AT_CHECK([pspp -O format=csv month.sps], [0], [dnl month.sps:15.1-15.4: warning: Data for variable month4 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.5: warning: Data for variable month5 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.6: warning: Data for variable month6 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.7: warning: Data for variable month7 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.8: warning: Data for variable month8 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.9: warning: Data for variable month9 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:15.1-15.10: warning: Data for variable month10 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.3: warning: Data for variable month3 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.4: warning: Data for variable month4 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.5: warning: Data for variable month5 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.6: warning: Data for variable month6 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.7: warning: Data for variable month7 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.8: warning: Data for variable month8 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.9: warning: Data for variable month9 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:26.1-26.10: warning: Data for variable month10 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.3: warning: Data for variable month3 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.4: warning: Data for variable month4 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.5: warning: Data for variable month5 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.6: warning: Data for variable month6 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.7: warning: Data for variable month7 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.8: warning: Data for variable month8 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.9: warning: Data for variable month9 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. month.sps:39.1-39.10: warning: Data for variable month10 is not valid as format MONTH: Unrecognized month format. Months may be specified as Arabic or Roman numerals or as at least 3 letters of their English names. ]) AT_CHECK([cat month.out], [0], [dnl . . . . . . . . @&t@ . . . . . . . . @&t@ JAN JAN JAN JAN JAN JAN JAN JAN @&t@ FEB FEB FEB FEB FEB FEB FEB FEB @&t@ MAR MAR MAR MAR MAR MAR MAR MAR @&t@ MAR . . . . . . . @&t@ APR APR APR APR APR APR APR APR @&t@ MAY MAY MAY MAY MAY MAY MAY MAY @&t@ JUN JUN JUN JUN JUN JUN JUN JUN @&t@ JUL JUL JUL JUL JUL JUL JUL JUL @&t@ JUL AUG AUG AUG AUG AUG AUG AUG @&t@ SEP SEP SEP SEP SEP SEP SEP SEP @&t@ JUL AUG AUG AUG AUG AUG AUG AUG @&t@ OCT OCT OCT OCT OCT OCT OCT OCT @&t@ NOV NOV NOV NOV NOV NOV NOV NOV @&t@ DEC DEC DEC DEC DEC DEC DEC DEC @&t@ . . . . . . . . @&t@ JAN JAN JAN JAN JAN JAN JAN JAN @&t@ FEB FEB FEB FEB FEB FEB FEB FEB @&t@ MAR MAR MAR MAR MAR MAR MAR MAR @&t@ APR APR APR APR APR APR APR APR @&t@ MAY MAY MAY MAY MAY MAY MAY MAY @&t@ JUN JUN JUN JUN JUN JUN JUN JUN @&t@ JUL JUL JUL JUL JUL JUL JUL JUL @&t@ AUG AUG AUG AUG AUG AUG AUG AUG @&t@ SEP SEP SEP SEP SEP SEP SEP SEP @&t@ OCT OCT OCT OCT OCT OCT OCT OCT @&t@ NOV NOV NOV NOV NOV NOV NOV NOV @&t@ DEC DEC DEC DEC DEC DEC DEC DEC @&t@ . . . . . . . . @&t@ JAN JAN JAN JAN JAN JAN JAN JAN @&t@ JAN JAN JAN JAN JAN JAN JAN JAN @&t@ FEB FEB FEB FEB FEB FEB FEB FEB @&t@ FEB FEB FEB FEB FEB FEB FEB FEB @&t@ MAR MAR MAR MAR MAR MAR MAR MAR @&t@ MAR MAR MAR MAR MAR MAR MAR MAR @&t@ APR APR APR APR APR APR APR APR @&t@ MAY MAY MAY MAY MAY MAY MAY MAY @&t@ JUN JUN JUN JUN JUN JUN JUN JUN @&t@ JUL JUL JUL JUL JUL JUL JUL JUL @&t@ AUG AUG AUG AUG AUG AUG AUG AUG @&t@ SEP SEP SEP SEP SEP SEP SEP SEP @&t@ OCT OCT OCT OCT OCT OCT OCT OCT @&t@ NOV NOV NOV NOV NOV NOV NOV NOV @&t@ DEC DEC DEC DEC DEC DEC DEC DEC @&t@ DEC DEC DEC DEC DEC DEC DEC DEC @&t@ ]) AT_CLEANUP pspp-1.0.1/tests/data/legacy-in.expected.cmp.gz0000644000175000017500000000363112470242646016271 00000000000000@Dlegacy-in.expected.cmpKj-G~N 9n*УAeVgΎ#|~ׯ~_$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$Ig.u[Qzջ>_|]|$I$I$I$I$I$I$I$I$I$I$I$I$I$\?#I$ɿ{y5q[x3W|s{Zףw}}|]OϽs-n/n/n/vߟݙݙݙݙݙݙݙݙEIϽk?ߟݙݙݙݙݙݙݙݙOo~-ύ-ύ-ύ-ύ-ύ-ύ-ύ-ύ-ύ-߾ͭskkk[|snnnnnnnnnnϻ{{gwfwfwfwfwfwfwfw[{HsHsHsHsHsHsHsHsHsH/vhh>??33333333w?$z{gggggggggg~gggٝٝٝٝٝٝٝٝyx$޻ܸܸܸܸܸܸܸܸܸݼ{\ߟݙݙݙݙݙݙݙݙ׻_Oo;ύ;ύ;ύ;ύ;ύ;ύ;ύ;ύ;ύ;ͻٝٝٝٝٝٝٝٝyx${xxxxxxxxx狿????ߟݙݙݙݙݙݙݙݙϻ?O$I$I$I$I$I$I$I$ɏ/I$ɏ/I$ɏ/I$ɏ/I$#Ix}H'=^=$I~$I~#I|H'=^=$I~$I~#I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I${$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$I$IPrpspp-1.0.1/tests/data/pc+-file-reader.at0000644000175000017500000010471013137223525014655 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([SPSS/PC+ file reader - positive]) AT_SETUP([variable labels and missing values]) AT_KEYWORDS([sack synthetic PC+ file positive]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; @LABELS; @LABELS_END - @LABELS; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 15; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variable, no label or missing values. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; dnl Numeric variable, variable label. 0; 0; @NUM2_LABEL - @LABELS_OFS; 0x050800; s8 "NUM2"; PCSYSMIS; dnl Numeric variable with missing value. 0; 0; 0; 0x050800; s8 "NUM3"; 1.0; dnl Numeric variable, variable label and missing value. 0; 0; @NUM4_LABEL - @LABELS_OFS; 0x050800; s8 "NUM4"; 2.0; dnl String variable, no label or missing values. 0; 0; 0; 0x010800; s8 "STR1"; PCSYSMIS; dnl String variable, variable label. 0; 0; @STR2_LABEL - @LABELS_OFS; 0x010400; s8 "STR2"; PCSYSMIS; dnl String variable with missing value. 0; 0; 0; 0x010500; s8 "STR3"; s8 "MISS"; dnl String variable, variable label and missing value. 0; 0; @STR4_LABEL - @LABELS_OFS; 0x010100; s8 "STR4"; s8 "OTHR"; dnl Long string variable 0; 0; 0; 0x010b00; s8 "STR5"; PCSYSMIS; 0 * 8; dnl Long string variable with variable label 0; 0; @STR6_LABEL - @LABELS_OFS; 0x010b00; s8 "STR6"; PCSYSMIS; 0 * 8; VARS_END: LABELS: 3; i8 0 0 0; LABELS_OFS: i8 0; NUM2_LABEL: COUNT8("Numeric variable 2's label"); NUM4_LABEL: COUNT8("Another numeric variable label"); STR2_LABEL: COUNT8("STR2's variable label"); STR4_LABEL: COUNT8("STR4's variable label"); STR6_LABEL: COUNT8("Another string variable's label"); LABELS_END: DATA: 0.0; "11/28/14"; 1.0; 0.0; 1.0; 2.0; PCSYSMIS; s8 "abcdefgh"; s8 "ijkl"; s8 "mnopq"; s8 "r"; s16 "stuvwxyzAB"; s16 "CDEFGHIJKLM"; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv pc+-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl File label: PSPP synthetic test file Variable,Description,Position NUM1,Format: F8.0,1 NUM2,"Label: Numeric variable 2's label Format: F8.0",2 NUM3,"Format: F8.0 Missing Values: 1",3 NUM4,"Label: Another numeric variable label Format: F8.0 Missing Values: 2",4 STR1,Format: A8,5 STR2,"Label: STR2's variable label Format: A4",6 STR3,"Format: A5 Missing Values: ""MISS """,7 STR4,"Label: STR4's variable label Format: A1 Missing Values: ""O""",8 STR5,Format: A11,9 STR6,"Label: Another string variable's label Format: A11",10 Table: Data List NUM1,NUM2,NUM3,NUM4,STR1,STR2,STR3,STR4,STR5,STR6 0,1,2,.,abcdefgh,ijkl,mnopq,r,stuvwxyzAB ,CDEFGHIJKLM ]) AT_CLEANUP AT_SETUP([value labels]) AT_KEYWORDS([sack synthetic PC+ file positive]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; @LABELS; @LABELS_END - @LABELS; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 16; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. @N1 - @LOFF; @N1E - @LOFF; 0; 0x050800; s8 "NUM1"; PCSYSMIS; @N2 - @LOFF; @N2E - @LOFF; 0; 0x050800; s8 "NUM2"; PCSYSMIS; @N3 - @LOFF; @N3E - @LOFF; 0; 0x050800; s8 "NUM3"; PCSYSMIS; @N4 - @LOFF; @N4E - @LOFF; 0; 0x050800; s8 "NUM4"; PCSYSMIS; @N5 - @LOFF; @N5E - @LOFF; 0; 0x050800; s8 "NUM5"; PCSYSMIS; dnl String variables. @S1 - @LOFF; @S1E - @LOFF; 0; 0x010100; s8 "STR1"; PCSYSMIS; @S2 - @LOFF; @S2E - @LOFF; 0; 0x010200; s8 "STR2"; PCSYSMIS; @S3 - @LOFF; @S3E - @LOFF; 0; 0x010300; s8 "STR3"; PCSYSMIS; @S4 - @LOFF; @S4E - @LOFF; 0; 0x010400; s8 "STR4"; PCSYSMIS; @S5 - @LOFF; @S5E - @LOFF; 0; 0x010500; s8 "STR5"; PCSYSMIS; @S6 - @LOFF; @S6E - @LOFF; 0; 0x010600; s8 "STR6"; PCSYSMIS; @S7 - @LOFF; @S7E - @LOFF; 0; 0x010700; s8 "STR7"; PCSYSMIS; @S8 - @LOFF; @S8E - @LOFF; 0; 0x010800; s8 "STR8"; PCSYSMIS; VARS_END: LABELS: 3; i8 0 0 0; LOFF: i8 0; N1: 1.0; COUNT8("one"); N1E: N2: 2.0; COUNT8("two"); 3.0; COUNT8("three"); N2E: N3: 3.0; COUNT8("three"); N4: N5: 4.0; COUNT8("four"); N3E: N4E: 5.0; COUNT8("five"); N5E: S1: s8 "a"; COUNT8("value label for `a'"); S1E: S2: s8 "ab"; COUNT8("value label for `ab'"); S2E: S3: s8 "abc"; COUNT8("value label for `abc'"); S3E: S4: S5: S6: S7: s8 "abcdefgh"; COUNT8("value label for abcdefgh"); S4E: S8: s8 "ijklmnop"; COUNT8("value label for ijklmnop"); S5E: s8 "qrstuvwx"; COUNT8("value label for qrstuvwx"); S6E: s8 "yzABCDEF"; COUNT8("value label for yzABCDEF"); S7E: s8 "GHIJKLMN"; COUNT8("value label for GHIJKLMN"); S8E: LABELS_END: DATA: 1.0; "11/28/14"; 1.0; 1.0; 2.0; 3.0; 4.0; 5.0; s8 "a"; s8 "bc"; s8 "cde"; s8 "fghj"; s8 "klmno"; s8 "pqrstu"; s8 "vwxyzAB"; s8 "CDEFGHIJ"; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv pc+-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl File label: PSPP synthetic test file Variable,Description,Position NUM1,"Format: F8.0 Value,Label 1,one",1 NUM2,"Format: F8.0 Value,Label 2,two 3,three",2 NUM3,"Format: F8.0 Value,Label 3,three 4,four",3 NUM4,"Format: F8.0 Value,Label 4,four",4 NUM5,"Format: F8.0 Value,Label 4,four 5,five",5 STR1,"Format: A1 Value,Label a,value label for `a'",6 STR2,"Format: A2 Value,Label ab,value label for `ab'",7 STR3,"Format: A3 Value,Label abc,value label for `abc'",8 STR4,"Format: A4 Value,Label abcd,value label for abcdefgh",9 STR5,"Format: A5 Value,Label abcde,value label for abcdefgh ijklm,value label for ijklmnop",10 STR6,"Format: A6 Value,Label abcdef,value label for abcdefgh ijklmn,value label for ijklmnop qrstuv,value label for qrstuvwx",11 STR7,"Format: A7 Value,Label abcdefg,value label for abcdefgh ijklmno,value label for ijklmnop qrstuvw,value label for qrstuvwx yzABCDE,value label for yzABCDEF",12 STR8,"Format: A8 Value,Label GHIJKLMN,value label for GHIJKLMN ijklmnop,value label for ijklmnop qrstuvwx,value label for qrstuvwx yzABCDEF,value label for yzABCDEF",13 Table: Data List NUM1,NUM2,NUM3,NUM4,NUM5,STR1,STR2,STR3,STR4,STR5,STR6,STR7,STR8 1,2,3,4,5,a,bc,cde,fghj,klmno,pqrstu,vwxyzAB,CDEFGHIJ ]) AT_CLEANUP AT_SETUP([compressed data]) AT_KEYWORDS([sack synthetic PC+ file positive]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 1; i16 9; 2; i16 0; dnl Fixed. 2; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; dnl String variables. 0; 0; 0; 0x010400; s8 "STR4"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "STR8"; PCSYSMIS; 0; 0; 0; 0x010f00; s8 "STR15"; PCSYSMIS; 0 * 8; VARS_END: DATA: i8 101 1 101 100 255 1 1 1; s8 "11/28/14"; s8 "abcd"; s8 "efghj"; s8 "efghijkl"; i8 1; i8 102 1 101 1 0 1 1; s8 "ABCDEFG"; s8 "11/28/14"; 1000.0; s8 "PQRS"; s8 "TUVWXYZa"; i8 1 1 0 0 0 0 0 0; s16 "bcdefghijklmnop"; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv pc+-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl File label: PSPP synthetic test file Variable,Description,Position NUM1,Format: F8.0,1 NUM2,Format: F8.0,2 STR4,Format: A4,3 STR8,Format: A8,4 STR15,Format: A15,5 Table: Data List NUM1,NUM2,STR4,STR8,STR15 -5,150,abcd,efghj ,efghijklABCDEFG 1000,.,PQRS,TUVWXYZa,bcdefghijklmnop ]) AT_CLEANUP AT_SETUP([weighted]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; i16 1; i16 6; i16 0; dnl Fixed. i16 1; i16 0; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl SYSFILE INFO FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [0], [dnl File:,pc+-file.sav Label:,PSPP synthetic test file Created:,11/28/14 15:11:00 by PCSPSS PSPP synthetic test product Integer Format:,Little Endian Real Format:,IEEE 754 LE. Variables:,4 Cases:,1 Type:,SPSS/PC+ System File Weight:,NUM3 Compression:,None Encoding:,us-ascii Variable,Description,Position NUM1,"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8",1 NUM2,"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8",2 NUM3,"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8",3 NUM4,"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8",4 ]) AT_CLEANUP AT_BANNER([SPSS/PC+ file reader - negative]) AT_SETUP([unspecified character encoding]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. SYSFILE INFO FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [0], [stdout], []) AT_CHECK([sed 's/default encoding.*For/default encoding. For/' stdout], [0], [dnl "warning: `pc+-file.sav': Using default encoding. For best results, specify an encoding explicitly. Use SYSFILE INFO with ENCODING=""DETECT"" to analyze the possible encodings." File label: PSPP synthetic test file Variable,Description,Position NUM1,Format: F8.0,1 NUM2,Format: F8.0,2 NUM3,Format: F8.0,3 NUM4,Format: F8.0,4 Table: Data List NUM1,NUM2,NUM3,NUM4 2,3,4,5 File:,pc+-file.sav Label:,PSPP synthetic test file Created:,11/28/14 15:11:00 by PCSPSS PSPP synthetic test product Integer Format:,Little Endian Real Format:,IEEE 754 LE. Variables:,4 Cases:,1 Type:,SPSS/PC+ System File Weight:,Not weighted. Compression:,None Encoding:,us-ascii Variable,Description,Position NUM1,"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8",1 NUM2,"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8",2 NUM3,"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8",3 NUM4,"Format: F8.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8",4 ]) AT_CLEANUP AT_SETUP([unexpected fixed values]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. >>1; 2;<< @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; >>1.0<<; 0; >>2<<; i16 1; dnl Fixed. i16 0; i16 7; 1; i16 0; dnl Fixed. 3; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [0], [dnl "warning: `pc+-file.sav' near offset 0x0: Directory fields have unexpected values (1,2)." warning: `pc+-file.sav' near offset 0x100: Record 0 specifies unexpected system missing value 1 (0x1p+0). "warning: `pc+-file.sav' near offset 0x100: Record 0 reserved fields have unexpected values (1,1,0,2,0,0)." warning: `pc+-file.sav' near offset 0x100: Record 0 case counts differ (1 versus 3). ]) AT_CLEANUP AT_SETUP([short main header]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [1], [dnl error: `pc+-file.sav' near offset 0x100: This is not an SPSS/PC+ system file. ]) AT_CLEANUP AT_SETUP([long main header]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; >>s80 "PSPP synthetic test file"<<; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [0], [dnl warning: `pc+-file.sav' near offset 0x100: Record 0 has unexpected length 192. ]) AT_CLEANUP AT_SETUP([invalid compression type]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 >>2<<; i16 7; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [1], [dnl error: `pc+-file.sav' near offset 0x100: Invalid compression type 2. ]) AT_CLEANUP AT_SETUP([unrealistic number of cases]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 1000; i16 0; dnl Fixed. 1000; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [0], [dnl warning: `pc+-file.sav' near offset 0x100: Record 0 claims 1000 cases with 7 values per case (requiring at least 56000 bytes) but data record is only 56 bytes long. ]) AT_CLEANUP AT_SETUP([labels bad offsets]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; @LABELS; @LABELS_END - @LABELS; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. @N1L - @LOFF; @N1E - @LOFF; 1000; 0x050800; s8 "NUM1"; PCSYSMIS; @N1L - @LOFF - 1; @LABELS_END - @LOFF; 0; 0x050800; s8 "NUM2"; PCSYSMIS; @N1L - @LOFF + 1; @LABELS_END - @LOFF; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; @LABELS_END - @LOFF - 1; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: LABELS: 3; i8 0 0 0; LOFF: i8 0; N1L: PCSYSMIS; LABELS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; N1E: DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [0], [dnl warning: `pc+-file.sav' near offset 0x210: Variable label claimed to start at offset 1007 in labels record but labels record is only 16 bytes. warning: `pc+-file.sav' near offset 0x210: Value labels claimed to end at offset 72 in labels record but labels record is only 16 bytes. "warning: `pc+-file.sav' near offset 0x2a0: Value labels end with partial label (0 bytes left in record, label length 255)." warning: `pc+-file.sav' near offset 0x299: 7 leftover bytes following value labels. warning: `pc+-file.sav' near offset 0x29f: Variable label with length 255 starting at offset 16 in labels record overruns end of 16-byte labels record. ]) AT_CLEANUP AT_SETUP([record 1 bad length]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [1], [dnl error: `pc+-file.sav' near offset 0x1b0: Record 1 has length 192 (expected 224). pc+-file.sps:1: error: GET: `pc+-file.sav': Data file dictionary has no variables. ]) AT_CLEANUP AT_SETUP([bad variable format]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0xff0000; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [1], [dnl error: `pc+-file.sav' near offset 0x210: Variable 3 has invalid type 255. ]) AT_CLEANUP AT_SETUP([bad variable name]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050000; s8 "#NUM"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [1], [dnl error: `pc+-file.sav' near offset 0x210: Invalid variable name `#NUM'. ]) AT_CLEANUP AT_SETUP([duplicate variable name]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 1; i16 0; dnl Fixed. 1; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050000; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [0], [dnl warning: `pc+-file.sav' near offset 0x230: Renaming variable with duplicate name `NUM1' to `VAR001'. warning: `pc+-file.sav' near offset 0x250: Renaming variable with duplicate name `NUM1' to `VAR002'. warning: `pc+-file.sav' near offset 0x270: Renaming variable with duplicate name `NUM1' to `VAR003'. ]) AT_CLEANUP AT_SETUP([partial case]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 3; i16 0; dnl Fixed. 3; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050000; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 1.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; 2.0; "11/28/14"; 1.0; 6.0; 7.0; 8.0; 9.0; 3.0; "11/28/14"; 1.0; 10.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. LIST. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [1], [dnl warning: `pc+-file.sav' near offset 0x100: Record 0 claims 3 cases with 7 values per case (requiring at least 168 bytes) but data record is only 144 bytes long. error: `pc+-file.sav' near offset 0x320: File ends in partial case. error: Error reading case from file `pc+-file.sav'. Table: Data List NUM1,NUM2,NUM3,NUM4 2,3,4,5 6,7,8,9 ]) AT_CLEANUP AT_SETUP([case extends past end of data record]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; 3; i16 0; dnl Fixed. 3; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050000; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 1.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; 2.0; "11/28/14"; 1.0; 6.0; 7.0; 8.0; 9.0; 3.0; "11/28/14"; 1.0; 10.0; DATA_END: 11.0; 12.0; 13.0; ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. LIST. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [1], [dnl warning: `pc+-file.sav' near offset 0x100: Record 0 claims 3 cases with 7 values per case (requiring at least 168 bytes) but data record is only 144 bytes long. error: `pc+-file.sav' near offset 0x338: Case beginning at offset 0x00000300 extends past end of data record at offset 0x00000320. error: Error reading case from file `pc+-file.sav'. Table: Data List NUM1,NUM2,NUM3,NUM4 2,3,4,5 6,7,8,9 ]) AT_CLEANUP AT_SETUP([corrupt compressed data]) AT_KEYWORDS([sack synthetic PC+ file positive]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 1; i16 9; 2; i16 0; dnl Fixed. 2; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; dnl String variables. 0; 0; 0; 0x010400; s8 "STR4"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "STR8"; PCSYSMIS; 0; 0; 0; 0x010f00; s8 "STR15"; PCSYSMIS; 0 * 8; VARS_END: DATA: i8 101 1 101 100 255 1 1 1; s8 "11/28/14"; s8 "abcd"; s8 "efghj"; s8 "efghijkl"; i8 1; i8 102 101 101 1 0 1 1; s8 "ABCDEFG"; 1000.0; s8 "PQRS"; s8 "TUVWXYZa"; i8 1 1 0 0 0 0 0 0; s16 "bcdefghijklmnop"; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [0], [dnl File label: PSPP synthetic test file Variable,Description,Position NUM1,Format: F8.0,1 NUM2,Format: F8.0,2 STR4,Format: A4,3 STR8,Format: A8,4 STR15,Format: A15,5 warning: `pc+-file.sav' near offset 0x308: Possible compressed data corruption: string contains compressed integer (opcode 101). Table: Data List NUM1,NUM2,STR4,STR8,STR15 -5,150,abcd,efghj ,efghijklABCDEFG 1000,.,PQRS,TUVWXYZa,bcdefghijklmnop ]) AT_CLEANUP AT_SETUP([invalid weight index]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; i16 1; i16 10; i16 0; dnl Fixed. i16 1; i16 0; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Numeric variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM3"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; 2.0; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [0], [warning: `pc+-file.sav': Invalid weight index 10. ]) AT_CLEANUP AT_SETUP([string weight]) AT_KEYWORDS([sack synthetic PC+ file negative]) AT_DATA([pc+-file.sack], [dnl dnl File header. 2; 0; @MAIN; @MAIN_END - @MAIN; @VARS; @VARS_END - @VARS; 0; 0; @DATA; @DATA_END - @DATA; (0; 0) * 11; i8 0 * 128; MAIN: i16 1; dnl Fixed. s62 "PCSPSS PSPP synthetic test product"; PCSYSMIS; 0; 0; i16 1; dnl Fixed. i16 0; i16 7; i16 1; i16 6; i16 0; dnl Fixed. i16 1; i16 0; s8 "11/28/14"; s8 "15:11:00"; s64 "PSPP synthetic test file"; MAIN_END: VARS: 0; 0; 0; 0x050800; s8 "$CASENUM"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "$DATE"; PCSYSMIS; 0; 0; 0; 0x050802; s8 "$WEIGHT"; PCSYSMIS; dnl Variables. 0; 0; 0; 0x050800; s8 "NUM1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM2"; PCSYSMIS; 0; 0; 0; 0x010800; s8 "STR1"; PCSYSMIS; 0; 0; 0; 0x050800; s8 "NUM4"; PCSYSMIS; VARS_END: DATA: 0.0; "11/28/14"; 1.0; s8 "acbdefgh"; 3.0; 4.0; 5.0; DATA_END: ]) AT_CHECK([sack --le pc+-file.sack > pc+-file.sav]) AT_DATA([pc+-file.sps], [dnl GET FILE='pc+-file.sav' ENCODING='us-ascii'. ]) AT_CHECK([pspp -O format=csv pc+-file.sps], [0], [warning: `pc+-file.sav' near offset 0x250: Cannot weight by string variable `STR1'. ]) AT_CLEANUP pspp-1.0.1/tests/data/hotel-encrypted.sav0000644000175000017500000000332412523704223015312 00000000000000ENCRYPTEDSAVD2U0{I+3]lm+:F"QM04wOJř^싴 3] C%b]CsMR,Kw+u~|B^04wOJř^04wOJř^04wOJř^i\vN ^a[p7x)lɣ?wwg GX`e#v_0H:/ɦiuM'%ܯK2w>SsEiKzmR8xVkv1LaMEMP0JMa%e%ԙ2w>SsEiK50dۚt?)jX(Nf|lߨSY58ՖI[}z z9?F:/ Ίaw~ 2^t3HJVi3 U7R>%jF/Khsga2w>SsEiK?,#˳ȹ=!κm1zt})ʶ झʁ10? t+TJPd4xkҽ #'Ktl^h쌑Z ڈrq?Aژtiڛ,J)dMԑ Aˤl͕"մ(Av8~\<ްSO+u\gfqduΒZ{%msTu$SvA(H8 -Z-|&Pl壄C@Vt>vu>sX܀IrHAa<`+ @k/)j"a9ؖ,]ϒ+(&OϺ !I(FSnGJg.t{zrSx,G`/%cneT2?-Oʗ: *SMNYXzBG.2-yAI܈`pdWwTT+H]]kM6[`^c~F(֘bpt/.U^*EDKr t\aL;4U{κm1zt})ʶ झʁ10? t+TJPd4xkҽ #'Ktl^h쌑Z ڈrq?Aژtiڛ,J)dMԑ Aˤl͕"tFN  7xp[#>Y8{'8CI/դkhP.0҆hf0󁆫[^ϸ5F @Tʠso2I[( _|ӐkKe_m:|C&} oKC{dH*}B'&%R@t R<&Oa/~ږLꬔʄ+t5Lws/#elp8p`Y [C8 io TbU5O2ݮ! H!kc5qyU&}cj\=N!?^6OHE惾a㫃_{[FV|aC*SWWeUE]f]l\F\(ɤhZ}`EK?NR]c;MuRz-#Ipspp-1.0.1/tests/data/datasheet-test.at0000644000175000017500000000236313137223525014743 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([datasheet]) m4_define([DATASHEET_TEST], [AT_SETUP([$1x$2, $3 backing rows, backing widths $4]) AT_KEYWORDS([datasheet]) AT_CHECK( [datasheet-test --verbosity=0 --max-rows=$1 --max-columns=$2 \ --backing-rows=$3 --backing-widths=$4], [0], [ignore], [ignore]) AT_CLEANUP]) DATASHEET_TEST([3], [3], [0], []) DATASHEET_TEST([3], [3], [3], [0,0,0]) DATASHEET_TEST([3], [3], [3], [0]) DATASHEET_TEST([3], [3], [3], [5]) DATASHEET_TEST([3], [3], [1], [0,9,0]) pspp-1.0.1/tests/data/CVE-2017-10792.sav0000644000175000017500000000144713137223525013677 00000000000000$FL2@(#) SPSS DATA FILE MS Windows Release 12.0 spssio32.dll  Y@30 Jan 1314:34:58 VAR00001VAR00002VAR00003VAR00004?Male @Female @Student@Employed @ Unemployed     GVAR00001=VAR00001 VAR00002=VAR00002 VAR00003=VAR00003 VAR00004=VAR00004eefffga s gehhfgd f iehjffg h kehlfgj k mefnfhl p pspp-1.0.1/tests/data/num-in.expected.gz0000644000175000017500000002302112470242646015041 0000000000000036Fnum-in.expectedQr㸲3 UnUWmِL1En$5?A[~oe׶|#nt^A9yCcqMނ~7׃S~WqtŭR$9}~nTD}5qTsqw7m-ߢ[7&ccνbxnDy+rZx%h4FtVW4Ch>-W?7Fh4}Ngԩ3-Sh4F[ܧ$}Kh4v>|;F4F|ssq{ĸ}KƠ^!ؽne4@s9h4[#'i݀>soos%q͸&nq| ׌kMʷނFAW`:2-P\|MZ}ؾ}h4Mۺy Z#[%h4FݳFF&4FKh4FGۗ+nh4FmdE=s4F#?Miy,cW?Gh4-nq[*z{ŝ7>N{֑Bȷ|>Sǎx^!nЩ6yսyUڸ&nq[$TZQk:+hsud㚸ϩ\ܸ&nT6)Bh}[h4F~猛_~.nqgٯ(`ƿܸ&n4Fhܾ\8q;]14Fkh4F_AFh4f^rz_h4Fk xh4F}5}۽h4b<~~J[6[?eN~[S9Fݳ\Oh4M[?~>|k5qWۇ=nsﷸMh49I:^d F)6!nqS $Ws=h4F=|,덐F1O Fch4Ft9jFhud:dP{h4Fӊjfh44)Moq{^3h9ݲmܕ}5%oq[3'Bk؈TzMPyz|۸&>BZqѩcihs%G^/ԑZ|[aۇ7~ϭVG~}}w#tm>c>Pk>VujqۿFh4dN7}nlAh4~Nm^Fh4}>>-exqgdt@h4=vFh4~qm^Fh4}Nʷ|[?9o`7n־c#*=woVDk6Sƽ}}2m>F[/qS5q[z 6>s`өM3h4>S[TFhtMZ>w>h4M]O֑>;i1sw=FG.}%#m[Fh4>>W?M7Fh9>⺁9FhTs\} Fh:UchFhss%y;WX70͛u&TqG|LM>rљo:nyuzx.nh4NU?-nF~N[⶿>ߢ;&nq{[Fhtqs:qm|iuq);'i|]C @~~~~k&/ R]>[~Zn4lU]AcJ_Boe{ |6.o[?a<4f#m<0?W?NWO5'U?w>xnn|nYA['yQ߿:?voo_I|ItbxN}_rv^N|B{woKxӱ|A+;kupKPu콥NlxnK7~N}o\oKf޽FLךNw?:pnL穜׍-/-i.q󵰿w-:k?-G1DcЇ]/2NK[ι۽-9n-s>'t˪|-h4>Y[c2G|/5FhuEuE|BFoDw;g1)V+svNFנ[.3|^Ky|\/׍ǛW*E|kNoK:_B*ZTb=4 U>{|q;}_qX_dU(A['[Ovzi{мd;gu4ŅFh>iu|p^ ݟg{=Z>:Z_nQo|݇s'㹹E1hw|hqOO] P1*):7>O?EZW}cZ>S ];VTiyF'%7:}γo_. /ނF\o6|[.]rc St N1gdNB'nЊ c|RPq3|ہvy졼~Ixלm<7wZxɻ;&KKt9]!c1maDK{ p=OOw3=oo;FAns} sWL+v'P%։ڷa]guE롃s 7|{閁uKc-3K?9ǵr7}H}^ɛsAoq։<~)쵿:4+] 4vx=N9sM4F7xߢ~~: ggߤU=hmi|Bh4M\/Yt+h4Fk#oh>^?7e Fh>WFh4^n_ixh4FW'kȷ9F^{ϭ7=ޚ^kTo4FsD#&etnK>"Vq#yMLϫq{}#ӭ=l<7W?[s|]Ǥܖ[^u2비e6}l5E-ч{K.6Fk>_S4E%V,k1`Om |6`.=Fw'-9sFhԞt~Ut1}Nݣh4VO~n>F9| FZCTߧhh4FfjlAh4McҭmYX3Fw+ yk^>q=bos#d[Ƕ+?ֺvFhZށ.pzKE]J*1no4Fgs[kso E4F=c#ߕFh4>K\FSoq?sc F݇>1=}{KGջ_~^):>g;=]V}N=-cVƭ+nz }v,cy'ZSq>];FЩhtPD?E[J>ۛӧ(iظsD։yo3ژ?^+n6VEwj⾪ 4}_8[%t|++km<[(XWOg\Gk^WG^CПUZ> w| ގ޽:FʷZgI_>c }[ѕ>G"nMuBGsЭ޽ so46| 3~q=_fځ~9S 4FV+yy˝~cyٙ/4th/t _h>/rvGUS]#z)^Blx^ZZt~ڭY%}n%Fe]wk[:S:̈́F{Gx['Ͻ%nO#1nyb9Z SoB;RRyTuqݻ;;::GE;7\ss|O>>e3_V{Jss}DcҾЕ=_3"h6@>e|;S#~[ٷF\:V_϶}}3tss-|O|>G9}Cn r *9 |-j;:twko#{7.b}n<+}#Z)h4~nQmy}Ǝ6;F7FYsgFhsqv4H-o4Fѕz-{w@'ߞ9Fw|Ld FEh4FG翜òʿu[zs =ktޚ?oΨX!K---hA3?χא΃s?Z> w|?4=➊>>O[*:|q]ǡfh u7eOu~cgutMZ՚FhHW }>V\!uAMׯiqcޒk1}S"za>W;T{s;T*C"D4F5\Dh4̓–o7Fh>}%h4Φ)l >Gh4]Sa3>Yέbpqgk4[}|q ڭ/nɛ[ϯcۭh߫+n3ӵjoyF}Y]-?yN*=us g_zǸcp|g|_CJFX[!nryc9}ޯҺ9vC ֽ-iCUo[6}zɩG4Fy}.B˷ނFhT-3khFh4Z>h4F5\{\=yN`AnLj4lU4/7gKacsx[޲:AV+W_T\Sc[3EtJ:x^>-[q;/Fh4-7t_z ,&4FmBhu0/K;m2/zh4Pywuuo=cmK4lF~?~[6;ڸJػWOutE}n^ܗ멽)T'Vh|k|xCc<_9]݋UZ> w[Jwl [i?h4FљZlyې*줖S~QqÐjo> ~د(h4> W}ftzy-MWܻoLPO-,E]sD=U<_?}>~Q]|9F鵪[[/K>9T?ύ ~-A5t(qqΖ>_x>)PFh4NRO16X>ĝXncx~wGZ> C?{}v/H˧a㮚o[ h4F^{zkzz|?;_t_;o܏miPBOz=/;FoPiZ}Q늿ޟ7ǣ?o͍KC{mc@~->v]+NHh };=kož-K饭ZSk<hW>o}V?-}Z>9xk߫hc -h4hsYVK 7:pvNҭw ޹9t^ڎ$Z՚B73-+9;}tj'zsZ=Zo#Jk}sJ7ZCEgB;Jn?쬟Gڡ"h4]bD~^kpcqOO]3yuK>^J/me>54_j%/t]]7;]Cu<#Z+}c-ka>vdy8]f(9֙,bsNY]_Խ/;t*ߨ>w|%=/|TЧF[s{[GhtJ_>·v-|~mK˷/k%- Ǟy.}G{[johW^wSѻq[N^ ݧ|>޽9Fw:n#ؽneXZS~>9|k[Vш|V?/7}|SJ|v|ԢeŶ|ѽg*%pUoQAhOpas|kʷs_l--co|Zx[oKTk78sFh4Fo^fjd1g{[]#,c7`4R!n~.=;w3]{j|5.c|k}|z|h|{~ڍi?~~.C!;pґ>x^}NsAh(tsJۡk9ţOoNF=Z\=/=F#M9uFh.F pspp-1.0.1/tests/data/bcd-in.expected.cmp.gz0000644000175000017500000015425212470242646015563 00000000000000DK^GEkc>Ӈ'VɛfRRiT'c\$A@~=!G?z=d!G~\ڻػwwibޥK{{..]]ڻػ)'_W{M{i״kk55{M{^^c,;zuu^^gk׵uu:{}7g`oho77φ{C{`oho77sx|^MM&{S{-7ٛڛMM&{S{9og땛[{7{nnڻٻw󿰵wwkfޭ{%ϲ+boio[[--J{boYvzemm6{[{9+?N^{G{ahww;;~ޙ,;z/ϟ=Cڏ=C֏ի~]_E.w%.߅]¿K]wɿ .wwz¿K]wɿ .w%.߅]¿K]w=]vӾ]\wɿ .w%.߅]¿K]wɿ ǿϲcڷ .w%.߅]¿K]wɿ .wwYvLvr%.߅]¿K]wɿ .w%.<ˎi߮W.߅]¿K]wɿ .w%.߅ߵϲcڷ .w%.߅]¿K]wɿ .wwYvLvr%.߅]¿K]wɿ .w%.>ˎi߮W.߅]¿K]wɿ .w%.߅5g1s/K5ɿM5k_ k_ÿ&5=#ݓ+ k(_p&62`ɿ'ɿƇɿɿw&{_;ҵt_WM5&5ɿM5k_ k_ÿ׎tO^4k_ k_ÿ&5ɿM5k_{kG'_W5ɿM5k_ k_ÿ&5=#ݓ+ k_ÿ&5ɿM5k_ kڑ땆M5k_ k_ÿ&5ɿM5kHJÿ&5ɿM5k_ k_ÿ&ǿv{z_ k_ÿ&5ɿM5k_ _;=zɿM5k_ k_ÿ&5ɿ|}Iǿ.:u˿]u__ǿ.:ǿ~{z__ǿ.:u˿]u__?=z˿]uc9&__s_#_{{G~Οj? ˿]u__ǿ.:ǿ~{z__ǿ.:u˿]u__?=z˿]u__ǿ.:u˿|^_ǿ.:u˿]u__ǿ׏tO^t__ǿ.:u˿]u_G'_W:u˿]u__ǿ.:u?#ݓ+_ǿ.:u˿]u__~ oߐ7! 7oȿC oxG'_W 7oȿC oߐ7! 7o<#ݓ+7! 7oȿC oߐ7Ƒ땁C oߐ{.@L! 77 7tǿqׯ}^|7oo 7oȿC oߐ7Ƒ땁C oߐ7! 7oȿC H! 7oȿC oߐ7!ǿq{zeߐ7! 7oȿC oߐ8=z2oȿC oߐ7! 7oȿo|^7! 7oȿC oߐ77tO^>˿dߔ7Ŀ)&M7oʿSMoߔ<=z2oʿSMoߔ7Ŀ)&M7oʿo|^7Ŀ)&M7oʿSMoߔ7Ŀ7tO^Loߔ7Ŀ)&M7oʿSMo|G'_W&M7oʿSMoД)%)&)&7t\L)|+I7 oǖo_K7oʿSMoߔ<=z2oʿSMoߔ7Ŀ)&M7oʿo|^7Ŀ)&M7oʿSMoߔ7Ŀ7tO^Loߔ7Ŀ)&M7oʿSMo|G'_W&M7oʿSMoߔ7Ŀ)&M7o>#ݓ;//7ƿ[w˿nw-nߍ7ݏnw-nߍ7ƿ[w˿nww|^7ƿ[w˿nw-nߍ7ݏnw-nߍ7ƿ[w˿nww|^7ƿ[w˿nw-nߍ7ݏnw-nߍ7"{[8j˿lw#};^Wn[7`k7 [w˿nw-n#ݓ+7ƿ[w˿nw-nߍ7ƿ>=zr-nߍ7ƿ[w˿nw-n#ݓ+7ƿ[w˿nw-nߍ7ƿ>=z/K-[oߒ [¿%-oɿK-[H¿%-oɿK-[oߒ [¿%ǿu{zeߒ [¿%-oɿK-[oߒ :=zoɿK-[oߒ [¿%-oɿo|^Y¿%-oɿK-[oߒ [¿tO^,[oߒ [¿%-oɿK-[oz[G'_W-oɿK-[oߒ [}%*J=#ݺf/+*J-.,^om/KɿqɿXɿK-[oz[G'_W-oɿK-[oߒ [¿%-o=#ݓ+ [¿%-oɿK-[oߒ [֑_~loߖƿ-6mo˿[mo~G'_W6mo˿[moߖƿ-6mo?#ݓ+ƿ-6mo˿[moߖ땍[moߖƿ-6mo˿[mۏHƿ-6mo˿[moߖƿ-6ǿ}{zeߖƿ-6mo˿[moߖ>=zo˿[moߖƿ-6mo˿o|^ƿ-6mo˿[moߖFWtw\lkk^oȖo-6ߌZm ƿtO^loߖƿ-6mo˿[mo~G'_w~_~_rȿG;ߑ;w#wȿ|^9w#wȿG;ߑ;wwtO^;ߑ;w#wȿG;y;G'_WwȿG;ߑ;w#w<#ݓ+;w#wȿG;ߑ;wΑ땃G;ߑ;w#wȿG;H#wȿG;ߑ;w#ǿs{zߑ;w#wȿG;ߑ9=zrȿG;ߑ;w#w ȿ5-^W;|/7ȿߛ#GE;w0w<#ݓ;/////////////////\?zHC2~?zCr~'_W?K{{..]]ڻػwwibޥK{{׳wekk55{M{^^ci״kkgevzuu:{]{^^gk׵uu2?s}r {C{`oho77 {gY9^${S{dojo77ٛڛMM&{S{ͳ,Ϝ_\6{nnڻٻwwkfޭ[{7{ng>O[[--{K{boio[:mm6{[{fokogoe}z3{G{ahww;;γwβ9s}/_h\?zHC2~?zCr~\z"]¿K]wɿ .w%.߅ztM]¿K]wɿ .w%.߅]ב:}^'¿K]wɿ .w%.߅]¿:]/+W]wɿ .w%.߅]¿K]w=]Gz7Aʿ .w%.߅]¿K]wɿ ǿHw޾\¿K]wɿ .w%.߅]¿:]/+ff]¿K]wɿ .w%.߅ztq+.߅]¿K]wɿ .w%.#uxrEʿ .w%.߅]¿K]wɿ ǿHw޾\>˿ɿM5k_ k_ÿ&5ɿ_>W5k_ k_ÿ&5ɿM5kHo_W_ k_ÿ&5ɿM5k_{kGvxr k_ÿ&5ɿM5k_ _;ҵۗ땿?Z`k_ÿ&5ɿM5k_ kڑ޾\! {_ÿ&5ɿM5k_ k_ÿ׎tz+5ɿM5k_ k_ÿ&ǿvk/+p^ɿM5k_ k_ÿ&5=#];}^#XʿM5k_ k_ÿ&5ɿfW5k_ k_ÿ&5ɿM5kHo_w~_~_ǿ.:u˿]u__ǿ׏tzr__ǿ.:u˿]u_G~xrr9u˿]u__ǿ.:u?#]?}^_ǿ.:u˿]u_޾\\]u__ǿ.:u˿]uHo_W.ǿ.:u˿]u__ǿ.:ǿ~뇷/+__ǿ.:u˿]u__?ۗ˿]u__ǿ.:u˿_ǿ.:u˿]u__ǿ׏tzr__ǿ.:u˿]u_G~xr/! 7oȿC oߐ7!ǿq/+Wߐ7! 7oȿC oߐ8ҍۗ+oȿC oߐ7! 7oȿo7! 7oȿC oߐ77tz oߐ7! 7oȿC oxGqxrr 7oȿC oߐ7! 7o<#8}^7! 7oȿC oߐ7Ƒn޾\\C oߐ7! 7oȿC H7o_W! 7oȿC oߐ7!ǿq/+Wߐ7! 7oȿC oߐ8ҍۗ_~7&M7oʿSMoߔ7Ŀ)&M7o>#<}^7Ŀ)&M7oʿSMoߔ7n޾\\SMoߔ7Ŀ)&M7oʿSMH7o_WĿ)&M7oʿSMoߔ7Ŀ)&ǿy/+Wߔ7Ŀ)&M7oʿSMoߔ<ۗ+oʿSMoߔ7Ŀ)&M7oʿoʕ7Ŀ)&M7oʿSMoߔ7Ŀ7tzJoߔ7Ŀ)&M7oʿSMo|Gyxrr%M7oʿSMoߔ7Ŀ)&M7o>#<}^7Ŀ)&M7oʿSMoߔ7n޾\>˿w-nߍ7ƿ[w˿nw-n#}xrrmߍ7ƿ[w˿nw-nߍ}o_W7ƿ[w˿nw-nߍ~tʵ7ƿ[w˿nw-nߍ7ݏ>}^6ƿ[w˿nw-nߍ7ƿ>݇/+ƿ[w˿nw-nߍ7ƿ[w?Gzw˿nw-nߍ7ƿ[w˿ǿHw޾\\nw-nߍ7ƿ[w˿nwwۗk-nߍ7ƿ[w˿nw-n#}xrrmߍ7ƿ[w˿nw-nߍ}o_w~_~[¿%-oɿK-[oߒ [¿tz*[oߒ [¿%-oɿK-[oz[Guxrr-oɿK-[oߒ [¿%-o=#:}^ [¿%-oɿK-[oߒ [֑n޾\\K-[oߒ [¿%-oɿK-[Ho_W¿%-oɿK-[oߒ [¿%ǿu[/+Wߒ [¿%-oɿK-[oߒ :ҭۗ땫oɿK-[oߒ [¿%-oɿoU¿%-oɿK-[oߒ [¿tz*[oߒ [¿%-oɿK-[oz[Guxr/ƿ-6mo˿[moߖƿ-6ǿ}ۇ/+Wߖƿ-6mo˿[moߖ>ۗ땫o˿[moߖƿ-6mo˿oƿ-6mo˿[moߖƿtzjoߖƿ-6mo˿[mo~G}xrr5mo˿[moߖƿ-6mo?#>}^ƿ-6mo˿[moߖn޾\\[moߖƿ-6mo˿[mۏHo_Wƿ-6mo˿[moߖƿ-6ǿ}ۇ/+Wߖƿ-6mo˿[moߖ>ۗ_~7wȿG;ߑ;w#w<#9}^;w#wȿG;ߑ;wΑ޾\\G;ߑ;w#wȿG;Hwo_W#wȿG;ߑ;w#ǿs;/+ߑ;w#wȿG;ߑ9ҝۗkȿG;ߑ;w#wȿ5w#wȿG;ߑ;wwtz;ߑ;w#wȿG;y;Gsxrr wȿG;ߑ;w#w<#9}^;w#wȿG;ߑ;wΑ޾\>/////////////////OG~=d!G=O^?K{{..]]ڻػwwibޥK{{׳weJc55{M{^^ci״kk55ڳ2;s}8{]{^^gk׵uu:{]{Ϝ_?`oho77 {C{`o<{,3+O77ٛڛMM&{S{dojo77ٛJ3{G{ahww;;γwβ9s}/߅]¿K]wɿ .w%.߅ztJ[wɿ .w%.߅]¿K]wɿ ǿHw޾\]¿K]wɿ .w%.߅ztJ[wɿ .w%.߅]¿K]wɿ ǿHw޾\]¿K]wɿ .w%.߅ztJ[wɿ .w%.߅]¿K]wɿ ǿHw޾\4/_0[^/d'CWK!wۗƗCW !+ebrzHʿ| 4=${#uxr>zHʿ|A=${_/_C^/Yduo_W*v=${_zHʿk5!+C:]/;/oVGi?zHCƏ2GY?zCΏo_WCWpzHʿC^K=${_CJc_ k_ÿ&5ɿM5kHo_Wak_ÿ&5ɿM5k_ kڑ޾\^ɿM5k_ k_ÿ&5=#];}^_ k_ÿ&5ɿM5k_{kGvxr{_ÿ&5ɿM5k_ k_ÿ׎tz k_ÿ&5ɿM5k_ _;ҵۗ땿W5k_ k_ÿ&5ɿM5kHo_W~7^ɿM5k_ k_ÿ&5=#];}}__ǿ.:u˿]u__?ۗ땿c_ǿ.:u˿]u_޾\5#{_ǿ.:u˿]u__ǿ׏tz/l+:u˿]u__ǿ.:ǿ~뇷/+^˿]u__ǿ.:u?#]?}^Cʿ]u__ǿ.:u˿ǰWu__ǿ.:u˿]uHo_W`__ǿ.:u˿]u_G~xrG_ǿ.:u˿]u__?ۗ땿?le_ǿ.:u˿]u_޾\>˿7oȿC oߐ7! 7oȿoJ oߐ7! 7oȿC oxGqxr7! 7oȿC oߐ7Ƒn޾\! 7oȿC oߐ7!ǿq/+-oȿC oߐ7! 7oȿoJ oߐ7! 7oȿC oxGqxr7! 7oȿC oߐ7Ƒn޾\! 7oȿC oߐ7!ǿq/+-oȿC oߐ7! 7oȿoJ oߐ7! 7oȿC oxGqxr/Ŀ)&M7oʿSMoߔ7Ŀ)&ǿy/+-oʿSMoߔ7Ŀ)&M7oʿoJKoߔ7Ŀ)&M7oʿSMo|Gyxr7Ŀ)&M7oʿSMoߔ7n޾\Ŀ)&M7oʿSMoߔ7Ŀ)&ǿy/+-oʿSMoߔ7Ŀ)&M7oʿoJKoߔ7Ŀ)&M7oʿSMo|Gyxr7Ŀ)&M7oʿSMoߔ7n޾\Ŀ)&M7oʿSMoߔ7Ŀ)&ǿy/+-oʿSMoߔ7Ŀ)&M7oʿos/7ƿ[w˿nw-nߍ7ƿ>݇/+m-nߍ7ƿ[w˿nw-n#}xr6ƿ[w˿nw-nߍ7ƿ>݇/+m-nߍ7ƿ[w˿nw-n#}xr6ƿ[w˿nw-nߍ7ƿ>݇/+m-nߍ7ƿ[w˿nw-n#}xr6ƿ[w˿nw-nߍ7ƿ>݇/+m-nߍ7ƿ[w˿nw-n#}xr6ƿ[w˿nw-nߍ7ƿ>݇/+m-nߍ7ƿ[w˿nw-n#}xr/¿%-oɿK-[oߒ [¿%ǿu[/+oɿK-[oߒ [¿%-oɿoJ+[oߒ [¿%-oɿK-[oz[Guxr [¿%-oɿK-[oߒ [֑n޾\¿%-oɿK-[oߒ [¿%ǿu[/+oɿK-[oߒ [¿%-oɿoJ+[oߒ [¿%-oɿK-[oz[Guxr [¿%-oɿK-[oߒ [֑n޾\¿%-oɿK-[oߒ [¿%ǿu[/+oɿK-[oߒ [¿%-oɿos/ƿ-6mo˿[moߖn޾\ƿ-6mo˿[moߖƿ-6ǿ}ۇ/+o˿[moߖƿ-6mo˿oJkoߖƿ-6mo˿[mo~G}xrƿ-6mo˿[moߖn޾\ƿ-6mo˿[moߖƿ-6ǿ}ۇ/+o˿[moߖƿ-6mo˿oJkoߖƿ-6mo˿[mo~G}xrƿ-6mo˿[moߖn޾\ƿ-6mo˿[moߖƿ-6ǿ}ۇ/;/o;ߑ;w#wȿG;y;Gsxr;w#wȿG;ߑ;wΑ޾\#wȿG;ߑ;w#ǿs;/+mȿG;ߑ;w#wȿJ;ߑ;w#wȿG;y;Gsxr;w#wȿG;ߑ;wΑ޾\#wȿG;ߑ;w#ǿs;/+mȿG;ߑ;w#wȿJ;ߑ;w#wȿG;y;Gsxr;w#wȿG;ߑ;wΑ޾\>/////////////////OG~=d!G=O^?K{{..]]ڻػwwibޥK{{׳weJc55{M{^^ci״kk55ڳ2;s}8{]{^^gk׵uu:{]{Ϝ_?`oho77 {C{`o<{,3+O77ٛڛMM&{S{dojo77ٛJ3{G{ahww;;γwβ9s}/߅]¿K]wɿ .w%.߅ztJ_wɿ .w%.߅]¿K]wɿ ǿHw޾\]¿K]wɿ .w%.߅ztJ_wɿ .w%.߅]¿K]wɿ ǿHw޾\]¿K]wɿ .w%.߅ztJ_wɿ .w%.߅]¿K]wɿ ǿHw޾\]¿K]wɿ .w%.߅ztJ_wɿ .w%.߅]¿K]wɿ ǿHw޾\]¿K]wɿ .w%.߅ztJ_wɿ .w%.߅]¿K]wɿ ǿHw޾\>˿ɿM5k_ k_ÿ&5ɿJ7k_ k_ÿ&5ɿM5k_{kGvxr k_ÿ&5ɿM5k_ kڑ޾\tÿ&5ɿM5k_ k_ÿ&ǿvk/+ɿM5k_ k_ÿ&5ɿJ7k_ k_ÿ&5ɿM5k_{kGvxr k_ÿ&5ɿM5k_ kڑ޾\tT/_[^/KdSCWK!׎tz-zHʿ|A=${_/_Mǿvk/+/EdCW˾!+JzH>#];}}/@~=d!G=zSzHʿ/?dO!+SzH>#]?}^]^p!+$=${_>HCJO/=${_ǿ.:u˿]u_G~xr^˿]u__ǿ.:u?#]?}^__ǿ.:u˿]u_G~xr#{_ǿ.:u˿]u__ǿ׏tz76ʿ]u__ǿ.:u˿߿#+:u˿]u__ǿ.:ǿ~뇷/+e_ǿ.:u˿]u_޾\>˿7oȿC oߐ7! 7oȿo_ްW oߐ7! 7oȿC H7o_Woߐ7! 7oȿC oxGqxr7! 7oȿC oߐ8ҍۗ땿e7! 7oȿC oߐ7Ƒn޾\%7{! 7oȿC oߐ77tz + 7oȿC oߐ7!ǿq/+^7oȿC oߐ7! 7o<#8}^#,ʿC oߐ7! 7oȿoW oߐ7! 7oȿC H7o_w~_~7Ŀ)&M7oʿSMoߔ7Ŀ7tz'M7oʿSMoߔ7Ŀ)&M7o>#<}^SMoߔ7Ŀ)&M7oʿSMH7o_Wzߔ7Ŀ)&M7oʿSMoߔ<ۗ땞7Ŀ)&M7oʿSMoߔ7Ŀ7tz'M7oʿSMoߔ7Ŀ)&M7o>#<}^SMoߔ7Ŀ)&M7oʿSMH7o_Wzߔ7Ŀ)&M7oʿSMoߔ<ۗ땞7Ŀ)&M7oʿSMoߔ7Ŀ7tz'M7oʿSMoߔ7Ŀ)&M7o>#<}}ƿ[w˿nw-nߍ7ƿ[w?Gzoߍ7ƿ[w˿nw-nߍ}o_Wƿ[w˿nw-nߍ7ƿ[w?Gzoߍ7ƿ[w˿nw-nߍ}o_Wƿ[w˿nw-nߍ7ƿ[w?Gzoߍ7ƿ[w˿nw-nߍ}o_Wƿ[w˿nw-nߍ7ƿ[w?Gzoߍ7ƿ[w˿nw-nߍ}o_Wƿ[w˿nw-nߍ7ƿ[w?Gzoߍ7ƿ[w˿nw-nߍ}o_w~_~[¿%-oɿK-[oߒ [¿tz-oɿK-[oߒ [¿%-o=#:}^K-[oߒ [¿%-oɿK-[Ho_Wzߒ [¿%-oɿK-[oߒ :ҭۗ^¿%-oɿK-[oߒ [¿tz-oɿK-[oߒ [¿%-o=#:}^K-[oߒ [¿%-oɿK-[Ho_Wzߒ [¿%-oɿK-[oߒ :ҭۗ^¿%-oɿK-[oߒ [¿tz-oɿK-[oߒ [¿%-o=#:}}oߖƿ-6mo˿[moߖ>ۗƿ-6mo˿[moߖƿtz7mo˿[moߖƿ-6mo?#>}^[moߖƿ-6mo˿[mۏHo_Wzߖƿ-6mo˿[moߖ>ۗƿ-6mo˿[moߖƿtz7mo˿[moߖƿ-6mo?#>}^[moߖƿ-6mo˿[mۏHo_Wzߖƿ-6mo˿[moߖ>ۗƿ-6mo˿[moߖƿtz9_ͿG;ߑ;w#wȿG;Hwo_Wߑ;w#wȿG;ߑ9ҝۗ>w#wȿG;ߑ;wwtzwȿG;ߑ;w#w<#9}^G;ߑ;w#wȿG;Hwo_Wߑ;w#wȿG;ߑ9ҝۗ>w#wȿG;ߑ;wwtzwȿG;ߑ;w#w<#9}^G;ߑ;w#wȿG;Hwo_Wߑ;w#wȿG;ߑ9ҝۗ_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~Ɍ?!׏~=d!~=7;gwibޥK{{..]]ڻػwwibzl9^^^ci״kk55{M{^{YfgοWgk׵uu:{]{^^gkן~' {C{`oho77goeqzeI&{S{dojo77ٛڛMM&{ٛgY9^6{nnڻٻwwkfޭ[{7{ng>[[--{K{boio[[goeuzei6{[{fokomm6{gY9^ahww;;{G{yY6gοw~_~]¿K]wɿ .w%.߅]ב:}^ .w%.߅]¿K]wɿ .wwۗ땱]¿K]wɿ .w%.߅]ב:}^ .w%.߅]¿K]wɿ .wwۗ땱]¿K]wɿ .w%.߅]ב:}^ .w%.߅]¿K]wɿ .wwۗ땱]¿K]wɿ .w%.߅]ב:}^ .w%.߅]¿K]wɿ .wwۗ땱]¿K]wɿ .w%.߅]ב:}^ .w%.߅]¿K]wɿ .wwۗ_~75ɿM5k_ k_ÿ&5=#];}^M5k_ k_ÿ&5ɿM5kHo_W_ k_ÿ&5ɿM5k_ _;ҵۗa_ÿ&5ɿM5k_ k_ÿ׎tze5ɿM5k_ k_ÿ&5=#];}^M5k_ k_ÿ&5ɿM5kHo_W_ k_ÿ&5ɿM5k_ _;ҵۗa_ÿ&5ɿM5k_ k_ÿ׎tze5ɿM5k_ k_ÿ&5=#];}^M5k_ k_ÿ&5ɿM5kHo_w~_~_ǿ.:u˿]u__ǿ׏tze8u˿]u__ǿ.:u?#]?}^]u__ǿ.:u˿]uHo_W__ǿ.:u˿]u__?ۗ_ǿ.:u˿]u__ǿ׏tze8u˿]u__ǿ.:u?#]?}^]u__ǿ.:u˿]uHo_W__ǿ.:u˿]u__?ۗvCW !+ezHʿ|b=${޾\ /_@R^/{dCWK!׏tz9_ͿZ=Cڏ=C֏?ۗ/CW!+zHʿ#>=${Ƒn޾\ ~Z^pCW -=${_~JFǿq/+j!+d=${_Xd FCo/@zHʿC oߐ77tzoߐ7! 7oȿC oxGqxr {! 7oȿC oߐ77tz_<ʿC oߐ7! 7oȿooa7! 7oȿC oߐ8ҍۗ땿W oߐ7! 7oȿC H7o_w~_~7Ŀ)&M7oʿSMoߔ7Ŀ7tz/+&M7oʿSMoߔ7Ŀ)&ǿy/+M^7oʿSMoߔ7Ŀ)&M7o>#<}^ /ʿSMoߔ7Ŀ)&M7oʿo_WMoߔ7Ŀ)&M7oʿSMH7o_Woߔ7Ŀ)&M7oʿSMo|Gyxr7Ŀ)&M7oʿSMoߔ<ۗ땿?`7Ŀ)&M7oʿSMoߔ7n޾\ {Ŀ)&M7oʿSMoߔ7Ŀ7tz+&M7oʿSMoߔ7Ŀ)&ǿy/;/ow˿nw-nߍ7ƿ[w˿ǿHw޾\7ƿ[w˿nw-nߍ~tw˿nw-nߍ7ƿ[w˿ǿHw޾\7ƿ[w˿nw-nߍ~tw˿nw-nߍ7ƿ[w˿ǿHw޾\7ƿ[w˿nw-nߍ~tw˿nw-nߍ7ƿ[w˿ǿHw޾\7ƿ[w˿nw-nߍ~tw˿nw-nߍ7ƿ[w˿ǿHw޾\7ƿ[w˿nw-nߍ~ts/ [¿%-oɿK-[oߒ [֑n޾\¿%-oɿK-[oߒ [¿%ǿu[/+oɿK-[oߒ [¿%-oɿo([oߒ [¿%-oɿK-[oz[Guxr2 [¿%-oɿK-[oߒ [֑n޾\¿%-oɿK-[oߒ [¿%ǿu[/+oɿK-[oߒ [¿%-oɿo([oߒ [¿%-oɿK-[oz[Guxr2 [¿%-oɿK-[oߒ [֑n޾\¿%-oɿK-[oߒ [¿%ǿu[/;/omoߖƿ-6mo˿[mo~G}xr2ƿ-6mo˿[moߖn޾\ƿ-6mo˿[moߖƿ-6ǿ}ۇ/+o˿[moߖƿ-6mo˿ohoߖƿ-6mo˿[mo~G}xr2ƿ-6mo˿[moߖn޾\ƿ-6mo˿[moߖƿ-6ǿ}ۇ/+o˿[moߖƿ-6mo˿ohoߖƿ-6mo˿[mo~G}xr2ƿ-6mo˿[moߖn޾\>˿wȿG;ߑ;w#wȿ;ߑ;w#wȿG;y;Gsxr2;w#wȿG;ߑ;wΑ޾\#wȿG;ߑ;w#ǿs;/+cȿG;ߑ;w#wȿ;ߑ;w#wȿG;y;Gsxr2;w#wȿG;ߑ;wΑ޾\#wȿG;ߑ;w#ǿs;/+cȿG;ߑ;w#wȿ;ߑ;w#wȿG;y;Gsxr/////////////////?ϟ=Cڏ=C֏?~=z2,.]]ڻػwwibޥK{{..]]u3+״kk55{M{^^ci״k^;uu:{]{^^gk׵uu2?s}2{C{`oho77 {C{썳,Μ_?dojo77ٛڛMM&{S{do>{,3+fޭ[{7{nnڻٻwwkfg>s}2{K{boio[[--{K{쭳Μ_?fokomm6{[{fo?{,3+ϰww;;{G{ahww;9s/]¿K]wɿ .w%.߅]¿:]/+s%.߅]¿K]wɿ .w%.#uxr2]¿K]wɿ .w%.߅]¿:]/+s%.߅]¿K]wɿ .w%.#uxr2]¿K]wɿ .w%.߅]¿:]/+s%.߅]¿K]wɿ .w%.#uxr2]¿K]wɿ .w%.߅]¿:]/+s%.߅]¿K]wɿ .w%.#uxr2]¿K]wɿ .w%.߅]¿:]/+s%.߅]¿K]wɿ .w%.#uxr/_ÿ&5ɿM5k_ k_ÿ&ǿvk/+ɿM5k_ k_ÿ&5ɿ4k_ k_ÿ&5ɿM5k_{kGvxr2 k_ÿ&5ɿM5k_ kڑ޾\Lÿ&5ɿM5k_ k_ÿ&ǿvk/+ɿM5k_ k_ÿ&5ɿ4k_ k_ÿ&5ɿM5k_{kGvxr2 k_ÿ&5ɿM5k_ kڑ޾\Lÿ&5ɿM5k_ k_ÿ&ǿvk/+ɿM5k_ k_ÿ&5ɿs/_ǿ.:u˿]u_޾\Lǿ.:u˿]u__ǿ.:ǿ~뇷/+˿]u__ǿ.:u˿t__ǿ.:u˿]u_G~xr2_ǿ.:u˿]u_޾\Lǿ.:u˿]u__ǿ.:ǿ~뇷/+˿]u__ǿ.:u˿t__ǿ.:u˿]u_G~xr2_ǿ.:u˿]u_޾\Lǿ.:u˿]u__ǿ.:ǿ~뇷/;/o oߐ7! 7oȿC oxGqxr27! 7oȿC oߐ7Ƒn޾\! 7oȿC oߐ7!ǿq/+3oȿC oߐ7! 7oȿo oߐ7! 7oȿC oxGqxr27! 7oȿC oߐ7Ƒn޾\! 7oȿC oߐ7!ǿq/+3oȿC oߐ7! 7oȿo oߐ7! 7oȿC oxGqxr2RzHʿ|u=${_/_Z^/d8ҍۗ_~7-C=!G?zC=d!G9?zo{<}^R`=${_~/R^_,d/qCon!+ zHʿ]=${_H7o_W&?ծdO!+ӚzHʿd/?d<ۗ/ CWOzHʿ|!7tzeMY^zHʿ7Ŀ)&ǿy/+?7Ŀ)&M7oʿSMoߔ<ۗ땿2+&M7oʿSMoߔ7Ŀ)&ǿy/+WMoߔ7Ŀ)&M7oʿSMH7o_W~b7Ŀ)&M7oʿSMoߔ7n޾\>˿w-nߍ7ƿ[w˿nw-n#}xr㗽ƿ[w˿nw-nߍ7ƿ>݇/+^w-nߍ7ƿ[w˿nwwۗ땿a7ƿ[w˿nw-nߍ~t_mWw˿nw-nߍ7ƿ[w?Gz/ +nߍ7ƿ[w˿nw-n#}xr׭7ƿ[w˿nw-nߍ7ݏ>}^kʿnw-nߍ7ƿ[w˿ǿHw޾\{ߍ7ƿ[w˿nw-nߍ}o_W0ƿ[w˿nw-nߍ7ƿ>݇/;/o-[oߒ [¿%-oɿK-[oz[Guxr2 [¿%-oɿK-[oߒ [֑n޾\¿%-oɿK-[oߒ [¿%ǿu[/+oɿK-[oߒ [¿%-oɿo,[oߒ [¿%-oɿK-[oz[Guxr2 [¿%-oɿK-[oߒ [֑n޾\¿%-oɿK-[oߒ [¿%ǿu[/+oɿK-[oߒ [¿%-oɿo,[oߒ [¿%-oɿK-[oz[Guxr2 [¿%-oɿK-[oߒ [֑n޾\>˿o˿[moߖƿ-6mo˿oloߖƿ-6mo˿[mo~G}xr2ƿ-6mo˿[moߖn޾\ƿ-6mo˿[moߖƿ-6ǿ}ۇ/+o˿[moߖƿ-6mo˿oloߖƿ-6mo˿[mo~G}xr2ƿ-6mo˿[moߖn޾\ƿ-6mo˿[moߖƿ-6ǿ}ۇ/+o˿[moߖƿ-6mo˿oloߖƿ-6mo˿[mo~G}xr/#wȿG;ߑ;w#ǿs;/+sȿG;ߑ;w#wȿ;ߑ;w#wȿG;y;Gsxr2;w#wȿG;ߑ;wΑ޾\#wȿG;ߑ;w#ǿs;/+sȿG;ߑ;w#wȿ;ߑ;w#wȿG;y;Gsxr2;w#wȿG;ߑ;wΑ޾\#wȿG;ߑ;w#ǿs;/+sȿG;ߑ;w#wȿs/////////////////d?!׏~=d!~=7;bޥK{{..]]ڻػwwib]g:s}r1{M{^^ci״kk55{kg9^8{]{^^gk׵uu:{]{Ϝ_`oho77 {C{xYgοW?dojo77ٛڛMM&{S{do>{,3+ޭ[{7{nnڻٻwwkfޭٻϲ}zS--{K{boio[[--ֳβ:s}ri6{[{fokomm6{gY9^ {G{ahww;;{G{읳lΜ_>˿w%.߅]¿K]wɿ .w%.#uxrr/߅]¿K]wɿ .w%.߅uo_W]¿K]wɿ .w%.߅ztʽ]¿K]wɿ .w%.߅]ב:}^]¿K]wɿ .w%.߅]¿:]/+¿K]wɿ .w%.߅]¿K]w=]Gz^wɿ .w%.߅]¿K]wɿ ǿHw޾\ .w%.߅]¿K]wɿ .wwۗ{%.߅]¿K]wɿ .w%.#uxrr/߅]¿K]wɿ .w%.߅uo_w~_~k_ÿ&5ɿM5k_ k_ÿ׎tz6k_ k_ÿ&5ɿM5k_{kGvxrr5ɿM5k_ k_ÿ&5=#];}^ k_ÿ&5ɿM5k_ kڑ޾\܆M5k_ k_ÿ&5ɿM5kHo_Wnÿ&5ɿM5k_ k_ÿ&ǿvk/+_ k_ÿ&5ɿM5k_ _;ҵۗɿM5k_ k_ÿ&5ɿm_ÿ&5ɿM5k_ k_ÿ׎tz6k_ k_ÿ&5ɿM5k_{kGvxr/_ǿ.:u˿]u__ǿ.:ǿ~뇷/+__ǿ.:u˿]u__?ۗ˿]u__ǿ.:u˿_ǿ.:u˿]u__ǿ׏tzv__ǿ.:u˿]u_G~xrr;u˿]u__ǿ.:u?#]?}^_ǿ.:u˿]u_޾\܎]u__ǿ.:u˿]uHo_Wnǿ.:u˿]u__ǿ.:ǿ~뇷/+__ǿ.:u˿]u__?ۗ_~7 7oȿC oߐ7! 7o<#8}^7! 7oȿC oߐ7Ƒn޾\܁C oߐ7! 7oȿC H7o_W! 7oȿC oߐ7!ǿq/+wߐ7! 7oȿC oߐ8ҍۗ;oȿC oߐ7! 7oȿo7! 7oȿC oߐ77tzoߐ7! 7oȿC oxGqxrr 7oȿC oߐ7! 7o<#8}^7! 7oȿC oߐ7Ƒn޾\>˿7oʿSMoߔ7Ŀ)&M7oʿoʝ7Ŀ)&M7oʿSMoߔ7Ŀ7tzNoߔ7Ŀ)&M7oʿSMo|Gyxrr'M7oʿSMoߔ7Ŀ)&M7o>#<}^7Ŀ)&M7oʿSMoߔ7n޾\܉SMoߔ7Ŀ)&M7oʿSMH7o_WĿ)&M7oʿSMoߔ7Ŀ)&ǿy/+wߔ7Ŀ)&M7oʿSMoߔ<ۗ;oʿSMoߔ7Ŀ)&M7oʿoʝ7Ŀ)&M7oʿSMoߔ7Ŀ7tz9_ͿGi?zHCƏ2GY?zCΏk޾\_?p!+;CW,dCǿHw޾\e=${_~/LT^_ܨd/C>݇/+7D^_ d?CWF!+P}t?CW'iX=${_~P^C>݇/+7?CW zHʿY^!+B=${#}xrr/`CWw˿nw-n#}xrƿ[w˿nw-nߍ7ƿ>݇/+ Ww˿nw-nߍ7ƿ[w?Gz_&ʿnw-nߍ7ƿ[w˿ǿHw޾\>˿oɿK-[oߒ [¿%-oɿoߏ3ʿK-[oߒ [¿%-oɿo\ʿK-[oߒ [¿%-oɿo_W-[oߒ [¿%-oɿK-[Ho_Wꅽoߒ [¿%-oɿK-[oz[GuxrX [¿%-oɿK-[oߒ :ҭۗ땿d[¿%-oɿK-[oߒ [֑n޾\*{¿%-oɿK-[oߒ [¿tz寨+-oɿK-[oߒ [¿%ǿu[/+^oɿK-[oߒ [¿%-o=#:}}oߖƿ-6mo˿[moߖ>ۗ땻o˿[moߖƿ-6mo˿oƿ-6mo˿[moߖƿtznoߖƿ-6mo˿[mo~G}xrr7mo˿[moߖƿ-6mo?#>}^ƿ-6mo˿[moߖn޾\܍[moߖƿ-6mo˿[mۏHo_Wƿ-6mo˿[moߖƿ-6ǿ}ۇ/+wߖƿ-6mo˿[moߖ>ۗ땻o˿[moߖƿ-6mo˿os/;w#wȿG;ߑ;wΑ޾\܃G;ߑ;w#wȿG;Hwo_W#wȿG;ߑ;w#ǿs;/+ߑ;w#wȿG;ߑ9ҝۗ{ȿG;ߑ;w#wȿ=w#wȿG;ߑ;wwtz;ߑ;w#wȿG;y;GsxrrwȿG;ߑ;GȶQOr#t$=G=<=W>ȿ#{߃{=G=ȿǿJ\~\_#{߃{=G=ȿ\ۏ;s~rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrd=!G?zC֏GGkk55{M{^^ci״kkgevuu:{]{^^gk׵uu2s}} {C{`oho77 {wY9r&{S{dojo77ٛڛMM&{S{ͻ,__~boio[[--{K{z]Vwο\fokomm6{[{fo?{.;WޥK{{..]]ڻػwwibޥٻuٻwwkfޭ[{7{nnڻٻww?{]__~{=={{haޣG{{gΝ;s~rro5k_ k_ÿ&5ɿM5k_{kWvyq}2k_ k_ÿ&5ɿM5k_{kWvyq}2k_ k_ÿ&5ɿM5k_{kWvyq}2k_ k_ÿ&5ɿM5k_{kWvyq}2k_ k_ÿ&5ɿM5k_{kWvyq}2k_ k_ÿ&5ɿM5k_{kWvyq}2k_ k_ÿ&5ɿM5k_{kWvyq}2k_ k_ÿ&5ɿM5k_{kWvyq}2k_ k_ÿ&5ɿM5k_{kWvyq}2k_ k_ÿ&5ɿM5k_{kWvyq}|ONNͿ]u__ǿ.:u˿]uJ/o?\]u__ǿ.:u˿]uJ/o?\]u__ǿ.:u˿]uJ/o?\]u__ǿ.:u˿]uJ/o?\]u__ǿ.:u˿]uJ/o?\]u__ǿ.:u˿]uJ/o?\]u__ǿ.:u˿]uJ/o?\]u__ǿ.:u˿]uJ/o?\]u__ǿ.:u˿]uJ/o?\]u__ǿ.:u˿]uJ/o?ɿ7oȿC oߐ7! 7oȿo\+oȿC oߐ7! 7oȿo\+oȿC oߐ7! 7oȿo\+oȿC oߐ7! 7oȿo\+oȿC oߐ7! 7oȿo\+oȿC oߐ7! 7oȿo\+oȿC oߐ7! 7oȿo\+oȿC oߐ7! 7oȿo\+oȿC oߐ7! 7oȿo\+oȿC oߐ7! 7oȿo\9?997&M7oʿSMoߔ7Ŀ)&M7o>+ݼr%M7oʿSMoߔ7Ŀ)&M7o>+ݼr%M7oʿSMoߔ7Ŀ)&M7o>+ݼr%M7oʿSMoߔ7Ŀ)&M7o>+ݼr%M7oʿSMoߔ7Ŀ)&M7o>+ݼr%M7oʿSMoߔ7Ŀ)&M7o>+ݼr%M7oʿSMoߔ7Ŀ)&M7o>+ݼr%M7oʿSMoߔ7Ŀ)&M7o>+ݼr%M7oʿSMoߔ7Ŀ)&M7o>+ݼr%M7oʿSMoߔ7Ŀ)&M7o>+ݼs>'''¿%-oɿK-[oߒ [¿%ǿu[W¿%-oɿK-[oߒ [¿%ǿu[W¿%-oɿK-[oߒ [¿%ǿu[W¿%-oɿK-[oߒ [¿%ǿu[W¿%-oɿK-[oߒ [¿%ǿu[W¿%-oɿK-[oߒ [¿%ǿu[W¿%-oɿK-[oߒ [¿%ǿu[W¿%-oɿK-[oߒ [¿%ǿu[W¿%-oɿK-[oߒ [¿%ǿu[W¿%-oɿK-[oߒ [¿%ǿu[wƿ-6mo˿[moߖƿtƿ-6mo˿[moߖƿtƿ-6mo˿[moߖƿtƿ-6mo˿[moߖƿtƿ-6mo˿[moߖƿtƿ-6mo˿[moߖƿtƿ-6mo˿[moߖƿtƿ-6mo˿[moߖƿtƿ-6mo˿[moߖƿtƿ-6mo˿[moߖƿtbzHC2~=d!׏r!Ϗk]~\_QzHʿ=${_^^oCW[}toCW6)=${_G^oIC]W.Z^/CWZbL=${_PǿJw]~\_=${_C^/CCW/+_=${+uyq}2x=${_X^?CW}tz!+&=${_d N!וrK/CW=${_]¿]WWd]¿K]wɿ .w%.߅ztcW]wɿ .w%.߅]¿K]w=]W7ƿ[w˿nw-nߍ7ƿݗWx`7ƿ[w˿nw-nߍ~t>+nߍ7ƿ[w˿nw-n+}yq}Zʿnw-nߍ7ƿ[w˿ǿJw_~\_G7ƿ[w˿nw-nߍ7ݏY+nߍ7ƿ[w˿nw-n+}yq}WWw˿nw-nߍ7ƿ[w?W?c7ƿ[w˿nw-nߍ~t^w-nߍ7ƿ[w˿nww_ۏ+0ƿ[w˿nw-nߍ7ƿݗw{=G=ȿ#{߃{=ϕr{߃{=G=ȿ#{߃s{.o?\#{߃{=G=ȿ\ۏ+G=ȿ#{߃{=G=<=Wu=G=ȿ#{߃{=ϕr{߃{=G=ȿ#{߃s{.o?\#{߃{=G=ȿ\ۏ+G=ȿ#{߃{=G=<=Wu=G=ȿ#{߃{=ϕr{߃{=G=ȿ#{߃s{.o?=d!GY?zC=C=7W_ci״kk55{M{^^ciמvٝ+׵uu:{]{^^gk׵^7 {C{`oho77goeqMM&{S{dojo77ٛڛMM7ﲼs}}-{K{boio[[--{[wY9r6{[{fokomm6{[{__{..]]ڻػwwibޥK{{.g֝+fޭ[{7{nnڻٻwwkfwپs}}=={{haޣG{{=={{.;wοɿɿM5k_ k_ÿ&5ɿ]ɿM5k_ k_ÿ&5ɿ]ɿM5k_ k_ÿ&5ɿ]ɿM5k_ k_ÿ&5ɿ]ɿM5k_ k_ÿ&5ɿ]ɿM5k_ k_ÿ&5ɿ]ɿM5k_ k_ÿ&5ɿ]ɿM5k_ k_ÿ&5ɿ]ɿM5k_ k_ÿ&5ɿ]ɿM5k_ k_ÿ&5ɿ]9?997:u˿]u__ǿ.:u?+]r;u˿]u__ǿ.:u?+]r;u˿]u__ǿ.:u?+]r;u˿]u__ǿ.:u?+]r;u˿]u__ǿ.:u?+]r;u˿]u__ǿ.:u?+]r;u˿]u__ǿ.:u?+]r;u˿]u__ǿ.:u?+]r;u˿]u__ǿ.:u?+]r;u˿]u__ǿ.:u?+]s>'''! 7oȿC oߐ7!ǿqW! 7oȿC oߐ7!ǿqW! 7oȿC oߐ7!ǿqW! 7oȿC oߐ7!ǿqW! 7oȿC oߐ7!ǿqW! 7oȿC oߐ7!ǿqW! 7oȿC oߐ7!ǿqW! 7oȿC oߐ7!ǿqW! 7oȿC oߐ7!ǿqW! 7oȿC oߐ7!ǿqw7Ŀ)&M7oʿSMoߔ7Ŀ7tʝ7Ŀ)&M7oʿSMoߔ7Ŀ7tʝ7Ŀ)&M7oʿSMoߔ7Ŀ7tʝ7Ŀ)&M7oʿSMoߔ7Ŀ7tʝ7Ŀ)&M7oʿSMoߔ7Ŀ7tʝ7Ŀ)&M7oʿSMoߔ7Ŀ7tʝ7Ŀ)&M7oʿSMoߔ7Ŀ7tʝ7Ŀ)&M7oʿSMoߔ7Ŀ7tʝ7Ŀ)&M7oʿSMoߔ7Ŀ7tʝ7Ŀ)&M7oʿSMoߔ7Ŀ7t [¿%-oɿK-[oߒ [֕n]~\_ [¿%-oɿK-[oߒ [֕n]~\_ [¿%-oɿK-[oߒ [֕n]~\_ [¿%-oɿK-[oߒ [֕n]~\_ [¿%-oɿK-[oߒ [֕n]~\_ [¿%-oɿK-[oߒ [֕n]~\_ [¿%-oɿK-[oߒ [֕n]~\_ [¿%-oɿK-[oߒ [֕n]~\_ [¿%-oɿK-[oߒ [֕n]~\_ [¿%-oɿK-[oߒ [֕n]~\9󓓓oߖƿ-6mo˿[moߖ߾ۏ+wߖƿ-6mo˿[moߖ߾ۏ+wߖƿ-6mo˿[moߖ߾ۏ+wߖƿ-6mo˿[moߖ߾ۏ+wߖƿ-6mo˿[moߖ߾ۏ+wߖƿ-6mo˿[moߖ߾ۏ+wߖƿ-6mo˿[moߖ߾ۏ+wߖƿ-6mo˿[moߖ߾ۏ+wߖƿ-6mo˿[moߖ߾ۏ+wߖƿ-6mo˿[moߖ߾ۏ;s~rro]wɿ .w%.߅]¿K]wɿ ǿJw]~\_]¿K]wɿ .w%.߅]¿]W]¿K]wɿ .w%.߅zt{%.߅]¿K]wɿ .w%.+uyq}^wɿ .w%.߅]¿K]wɿ ǿJw]~\_]¿K]wɿ .w%.߅]¿]W]¿K]wɿ .w%.߅zt{%.߅]¿K]wɿ .w%.+uyq}^wɿ .w%.߅]¿K]wɿ ǿJw]~\_]¿K]wɿ .w%.߅]¿]wˏCڏ=d!G~Gy~\͏BCWx!+caIzHʿ=${+}yq}GW!+1zHʿ|s/ߒd}/o?|/ d˷u!+HzHʿ| rzHʿ|A/_d!+%zH>W͗!+(zHʿ|ل/ٯd_Q!w_ۏ+7d_!+zHʿ/d}/o?VY^!+=${_0d }t_?H=${_gdx=${ߍ~te+nߍ7ƿ[w˿nw-n+}yq}|ONNͿ#{߃{=G=ȿ\ۏ+r^#{߃{=G=ȿ\ۏ+|&W=ȿ#{߃{=G=<=W?\=G=ȿ#{߃{=ϕϧ+{߃{=G=ȿ#{߃s{.o?Cʿ#{߃{=G=ȿǿJ\~\_)=G=ȿ#{߃{=ϕ+{߃{=G=ȿ#{+syq}W=ȿ#{߃{=G=<=W?,e{=G=ȿ#{߃{y{t9?99999999999999999999999999999999999999999999999999999999999999999992~=d!G?z?z?sk55{M{^^ci״kk55ڳ2s}}u:{]{^^gk׵uu:{w9{C{`oho77 {C{썻,__y~dojo77ٛڛMM&{S{|]wο'''_ǿ.:u˿]u__ǿ.:ǿ~뗷Wǿ.:u˿]u__ǿ.:ǿ~뗷Wǿ.:u˿]u__ǿ.:ǿ~뗷Wǿ.:u˿]u__ǿ.:ǿ~뗷Wǿ.:u˿]u__ǿ.:ǿ~뗷Wǿ.:u˿]u__ǿ.:ǿ~뗷Wǿ.:u˿]u__ǿ.:ǿ~뗷Wǿ.:u˿]u__ǿ.:ǿ~뗷Wǿ.:u˿]u__ǿ.:ǿ~뗷Wǿ.:u˿]u__ǿ.:ǿ~뗷w7! 7oȿC oߐ77t7! 7oȿC oߐ77t7! 7oȿC oߐ77t7! 7oȿC oߐ77t7! 7oȿC oߐ77t7! 7oȿC oߐ77t7! 7oȿC oߐ77t7! 7oȿC oߐ77t7! 7oȿC oߐ77t7! 7oȿC oߐ77t7Ŀ)&M7oʿSMoߔ7n^~\_y7Ŀ)&M7oʿSMoߔ7n^~\_y7Ŀ)&M7oʿSMoߔ7n^~\_y7Ŀ)&M7oʿSMoߔ7n^~\_y7Ŀ)&M7oʿSMoߔ7n^~\_y7Ŀ)&M7oʿSMoߔ7n^~\_y7Ŀ)&M7oʿSMoߔ7n^~\_y7Ŀ)&M7oʿSMoߔ7n^~\_y7Ŀ)&M7oʿSMoߔ7n^~\_y7Ŀ)&M7oʿSMoߔ7n^~\9󓓓oߒ [¿%-oɿK-[oߒ ߺҭۏ+Oߒ [¿%-oɿK-[oߒ ߺҭۏ+Oߒ [¿%-oɿK-[oߒ ߺҭۏ+Oߒ [¿%-oɿK-[oߒ ߺҭۏ+Oߒ [¿%-oɿK-[oߒ ߺҭۏ+Oߒ [¿%-oɿK-[oߒ ߺҭۏ+Oߒ [¿%-oɿK-[oߒ ߺҭۏ+Oߒ [¿%-oɿK-[oߒ ߺҭۏ+Oߒ [¿%-oɿK-[oߒ ߺҭۏ+Oߒ [¿%-oɿK-[oߒ ߺҭۏ;s~rromoߖƿ-6mo˿[mo~W}yq}ioߖƿ-6mo˿[mo~W}yq}ioߖƿ-6mo˿[mo~W}yq}ioߖƿ-6mo˿[mo~W}yq}ioߖƿ-6mo˿[mo~W}yq}ioߖƿ-6mo˿[mo~W}yq}ioߖƿ-6mo˿[mo~W}yq}ioߖƿ-6mo˿[mo~W}yq}ioߖƿ-6mo˿[mo~W}yq}ioߖƿ-6mo˿[mo~W}yq}|ONNͿ .w%.߅]¿K]wɿ .ww]ۏ+¿K]wɿ .w%.߅]¿K]w=]Wʳ]¿K]wɿ .w%.߅]ו,߅]¿K]wɿ .w%.߅u.o?< .w%.߅]¿K]wɿ .ww]ۏ+¿K]wɿ .w%.߅]¿K]w=]Wʳ]¿K]wɿ .w%.߅]ו,߅]¿K]wɿ .w%.߅u.o?< .w%.߅]¿K]wɿ .ww]ۏ+¿K]wɿ .w%.߅]¿K]w=]W7ƿ[w˿nw-nߍ7ƿݗW7ƿ[w˿nw-nߍ~tg-nߍ7ƿ[w˿nw-n+}yq}w˿nw-nߍ7ƿ[w˿ǿJw_~\_y6ƿ[w˿nw-nߍ7ƿݗW7ƿ[w˿nw-nߍ~tg-nߍ7ƿ[w˿nw-n+}yq}w˿nw-nߍ7ƿ[w˿ǿJw_~\_y6ƿ[w˿nw-nߍ7ƿݗW7ƿ[w˿nw-nߍ~t9?997ZBi?zHCƏ2=C=rۏ+? X^`dˏ]CW凅!+#.}{tݦdCWd!+ÝDzH>=WÏCWD!+c f|=${_\ǿJ\~\_yH=${_O^oCCW囧=${+syq}Kl=${_lX^/vCWK4}{t/=CW f2=${_8A^RC=WH^CWd=${_TǿJ\~\_y/!CWQzHʿ_^!\ۏ+!+ /CW,=${_-}{t9?99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999% pspp-1.0.1/tests/data/v13.sav0000755000175000017500000003701312470242646012631 00000000000000$FL2@(#) SPSS DATA FILE MS Windows Release 13.0 spssio32.dll <Y@08 Mar 0610:29:54 N A255                                A258                                A258001 A2000                                A2000001                               A2000002                               A2000003                               A2000004                               A2000005                               A2000006                               A2000007                               $             #N=N A255=A255 A258=A258 A2000=A2000A258=00258 A2000=02000?a1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA b1BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BBB c1CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC @a2XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX b2YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YYY c2ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ pspp-1.0.1/tests/data/encrypted-file.at0000644000175000017500000000344113137223525014734 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([encrypted files]) AT_SETUP([decrypt an encrypted system file]) AT_KEYWORDS([system file decrypt pspp-convert]) AT_CHECK([pspp-convert $srcdir/data/hotel-encrypted.sav hotel.sav -p pspp]) AT_CHECK([pspp-convert hotel.sav hotel.csv]) AT_CHECK([cat hotel.csv], [0], [dnl v1,v2,v3,v4,v5 4,2,3,4,1 1,1,3,1,1 5,2,2,3,4 3,1,3,1,2 5,3,1,5,3 1,2,5,4,2 3,2,4,3,1 1,4,5,2,1 3,2,3,1,2 2,5,4,2,1 4,2,2,3,5 2,1,4,1,1 1,2,5,5,2 2,3,3,3,1 4,1,1,1,3 1,1,5,1,2 2,5,5,2,2 ]) AT_CLEANUP AT_SETUP([decrypt an encrypted syntax file]) AT_KEYWORDS([syntax file decrypt pspp-convert]) AT_CHECK([pspp-convert $srcdir/data/test-encrypted.sps test.sps -p password]) # The sample file is not ideal: lines end in CRLF and its last line # lacks a new-line, so "sed" and "echo" make it easier to work with. AT_CHECK([tr -d "\r" < test.sps; echo], [0], [dnl * Encoding: windows-1252. DATA LIST LIST /name (a25) quantity (f8). BEGIN DATA. widgets 10345 oojars 2345 dubreys 98 thingumies 518 END DATA. @&t@ LIST. @&t@ DESCRIPTIVES /quantity /statistics ALL. ]) AT_CLEANUP pspp-1.0.1/tests/data/num-out-cmp.pl0000644000175000017500000000245712470242646014224 00000000000000use strict; use warnings 'all'; my (@prev) = (); our ($n) = 0; our ($suffix) = ''; our ($prefix) = ''; while (<>) { s/^ //; if (scalar (my (@line) = /^([A-Z]+)(\d+)([^"]+")( *)([^%"]*)(%?")$/) == 6) { if (defined ($prev[0]) && $line[0] eq $prev[0] && $line[1] == $prev[1] + 1 && $line[2] eq $prev[2] && $line[5] eq $prev[5]) { if ($line[3] eq " $prev[3]" && $line[4] eq $prev[4]) { flush_prefix (); flush_suffix (); $n++; } elsif ($line[3] eq $prev[3] && length ($line[4]) == length ($prev[4]) + 1 && $prev[4] eq substr ($line[4], 0, length ($line[4]) - 1)) { flush_n (); flush_prefix (); $suffix .= substr ($line[4], -1); } elsif ($line[3] eq $prev[3] && $prev[4] eq substr ($line[4], 1)) { flush_n (); flush_suffix (); $prefix .= substr ($line[4], 0, 1); } else { flush (); print $_; } } else { flush (); print $_; } @prev = @line; } else { flush (); print $_; @prev = (); } } flush (); sub flush_suffix { if ($suffix ne '') { print "\$$suffix\n"; $suffix = ''; } } sub flush_prefix { if ($prefix ne '') { print "^$prefix\n"; $prefix = ''; } } sub flush_n { if ($n) { print "*$n\n"; $n = 0; } } sub flush { flush_prefix (); flush_suffix (); flush_n (); } pspp-1.0.1/tests/data/por-file.at0000644000175000017500000001003613137223525013535 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([portable files]) AT_SETUP([overwriting portable file]) AT_DATA([output.por], [abcdef ]) cp output.por output.por.backup AT_DATA([porfile.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. EXPORT OUTFILE='output.por'. ]) AT_CHECK([pspp -O format=csv porfile.sps]) AT_CHECK([cmp output.por output.por.backup], [1], [ignore]) AT_CLEANUP AT_SETUP([overwriting portable file atomically]) AT_DATA([output.por], [abcdef ]) cp output.por output.por.backup AT_DATA([porfile.sps], [[DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. XEXPORT OUTFILE='output.por'. HOST COMMAND=['kill -TERM $PPID']. ]]) AT_CHECK([pspp -O format=csv porfile.sps], [143], [], [ignore]) AT_CHECK([cmp output.por output.por.backup]) AT_CHECK( [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done]) AT_CLEANUP AT_SETUP([write to same portable file being read]) AT_DATA([export.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 2 END DATA. EXPORT OUTFILE='data.por'. ]) AT_CHECK([pspp -O format=csv export.sps]) AT_CHECK([test -s data.por]) AT_CHECK( [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done]) AT_DATA([export2.sps], [dnl IMPORT FILE='data.por'. COMPUTE y = x * 2. EXPORT OUTFILE='data.por'. ]) AT_CHECK([pspp -O format=csv export2.sps]) AT_CHECK( [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done]) AT_DATA([export3.sps], [dnl IMPORT FILE='data.por'. LIST. ]) AT_CHECK([pspp -O format=csv export3.sps], [0], [dnl Table: Data List X,Y 2,4.00 ]) AT_CLEANUP dnl This checks for a bug in the portable file writer that caused an infinite dnl loop in some cases, and other problems in other cases, when a variable dnl had value labels. AT_SETUP([write portable file with value labels]) AT_DATA([export.sps], [dnl DATA LIST NOTABLE/var1 TO var5 1-5. VALUE LABELS /var1 1 'one' /var2 2 'two' /var3 3 'three' /var4 4 'four' /var5 5 'five'. BEGIN DATA. 12345 END DATA. EXPORT OUTFILE='data.por'. ]) AT_CHECK([pspp -O format=csv export.sps]) AT_DATA([import.sps], [dnl IMPORT FILE='data.por'. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -O format=csv import.sps], [0], [dnl Variable,Description,Position VAR1,"Format: F1.0 Value,Label 1,one",1 VAR2,"Format: F1.0 Value,Label 2,two",2 VAR3,"Format: F1.0 Value,Label 3,three",3 VAR4,"Format: F1.0 Value,Label 4,four",4 VAR5,"Format: F1.0 Value,Label 5,five",5 Table: Data List VAR1,VAR2,VAR3,VAR4,VAR5 1,2,3,4,5 ]) AT_DATA([sys-file-info.sps], [SYSFILE INFO FILE='data.por' ]) AT_CHECK([pspp -O format=csv sys-file-info.sps | sed '/Encoding/d /Integer Format/d /Real Format/d /Created/d /Product/d '], [0], [dnl File:,data.por Label:,No label. Variables:,5 Cases:,Unknown Type:,SPSS Portable File Weight:,Not weighted. Compression:,None Variable,Description,Position VAR1,"Format: F1.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8 Value,Label 1,one",1 VAR2,"Format: F1.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8 Value,Label 2,two",2 VAR3,"Format: F1.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8 Value,Label 3,three",3 VAR4,"Format: F1.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8 Value,Label 4,four",4 VAR5,"Format: F1.0 Measure: Scale Role: Input Display Alignment: Right Display Width: 8 Value,Label 5,five",5 ]) AT_CLEANUP pspp-1.0.1/tests/data/dictionary.at0000644000175000017500000000246113137223525014170 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([dictionary]) AT_SETUP([dictionary case-insensitivity]) AT_DATA([dictionary.sps], [dnl DATA LIST LIST /aèiöu aeiou. BEGIN DATA 1 2 END DATA. LIST AÈIÖU RENAME VARIABLE (aèiöu=AÈIÖU). LIST. RENAME VARIABLE (aeiou=aèiöu). ]) AT_CHECK([pspp -O format=csv dictionary.sps],[1], [Table: Reading free-form data from INLINE. Variable,Format aèiöu,F8.0 aeiou,F8.0 Table: Data List aèiöu 1.00 Table: Data List AÈIÖU,aeiou 1.00,2.00 dictionary.sps:8: error: RENAME VARIABLES: Renaming would duplicate variable name aèiöu. ]) AT_CLEANUP pspp-1.0.1/tests/data/test-encrypted.sps0000644000175000017500000000036412601613137015173 00000000000000ENCRYPTEDSPSG4b/Wޟi1iS ;Ў6>cWgJP-d0'p,jRT^bZfb̔ l ށhZ % M`@h={7:_;. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "error.h" #include "minmax.h" #include "progname.h" #include "xalloc.h" /* lazy_casereader callback function to instantiate a casereader from the datasheet. */ static struct casereader * lazy_callback (void *ds_) { struct datasheet *ds = ds_; return datasheet_make_reader (ds); } /* Maximum size of datasheet supported for model checking purposes. */ #define MAX_ROWS 5 #define MAX_COLS 5 #define MAX_WIDTHS 5 /* Test params. */ struct datasheet_test_params { /* Parameters. */ int max_rows; /* Maximum number of rows. */ int max_cols; /* Maximum number of columns. */ int backing_rows; /* Number of rows of backing store. */ int backing_widths[MAX_COLS]; /* Widths of columns of backing store. */ int n_backing_cols; /* Number of columns of backing store. */ int widths[MAX_WIDTHS]; /* Allowed column widths. */ int n_widths; /* State. */ unsigned int next_value; }; static bool check_caseproto (struct mc *mc, const struct caseproto *benchmark, const struct caseproto *test, const char *test_name) { size_t n_columns = caseproto_get_n_widths (benchmark); size_t col; bool ok; if (n_columns != caseproto_get_n_widths (test)) { mc_error (mc, "%s column count (%zu) does not match expected (%zu)", test_name, caseproto_get_n_widths (test), n_columns); return false; } ok = true; for (col = 0; col < n_columns; col++) { int benchmark_width = caseproto_get_width (benchmark, col); int test_width = caseproto_get_width (test, col); if (benchmark_width != test_width) { mc_error (mc, "%s column %zu width (%d) differs from expected (%d)", test_name, col, test_width, benchmark_width); ok = false; } } return ok; } /* Checks that READER contains the N_ROWS rows and N_COLUMNS columns of data in ARRAY, reporting any errors via MC. */ static void check_datasheet_casereader (struct mc *mc, struct casereader *reader, union value array[MAX_ROWS][MAX_COLS], size_t n_rows, const struct caseproto *proto) { size_t n_columns = caseproto_get_n_widths (proto); if (!check_caseproto (mc, proto, casereader_get_proto (reader), "casereader")) return; else if (casereader_get_case_cnt (reader) != n_rows) { if (casereader_get_case_cnt (reader) == CASENUMBER_MAX && casereader_count_cases (reader) == n_rows) mc_error (mc, "datasheet casereader has unknown case count"); else mc_error (mc, "casereader row count (%lu) does not match " "expected (%zu)", (unsigned long int) casereader_get_case_cnt (reader), n_rows); } else { struct ccase *c; size_t row; for (row = 0; row < n_rows; row++) { size_t col; c = casereader_read (reader); if (c == NULL) { mc_error (mc, "casereader_read failed reading row %zu of %zu " "(%zu columns)", row, n_rows, n_columns); return; } for (col = 0; col < n_columns; col++) { int width = caseproto_get_width (proto, col); if (!value_equal (case_data_idx (c, col), &array[row][col], width)) { if (width == 0) mc_error (mc, "element %zu,%zu (of %zu,%zu) differs: " "%.*g != %.*g", row, col, n_rows, n_columns, DBL_DIG + 1, case_num_idx (c, col), DBL_DIG + 1, array[row][col].f); else mc_error (mc, "element %zu,%zu (of %zu,%zu) differs: " "'%.*s' != '%.*s'", row, col, n_rows, n_columns, width, case_str_idx (c, col), width, value_str (&array[row][col], width)); } } case_unref (c); } c = casereader_read (reader); if (c != NULL) mc_error (mc, "casereader has extra cases (expected %zu)", n_rows); } } /* Checks that datasheet DS contains has N_ROWS rows, N_COLUMNS columns, and the same contents as ARRAY, reporting any mismatches via mc_error. Then, adds DS to MC as a new state. */ static void check_datasheet (struct mc *mc, struct datasheet *ds, union value array[MAX_ROWS][MAX_COLS], size_t n_rows, const struct caseproto *proto) { size_t n_columns = caseproto_get_n_widths (proto); struct datasheet *ds2; struct casereader *reader; unsigned long int serial = 0; assert (n_rows < MAX_ROWS); assert (n_columns < MAX_COLS); /* Check contents of datasheet via datasheet functions. */ if (!check_caseproto (mc, proto, datasheet_get_proto (ds), "datasheet")) { /* check_caseproto emitted errors already. */ } else if (n_rows != datasheet_get_n_rows (ds)) mc_error (mc, "row count (%lu) does not match expected (%zu)", (unsigned long int) datasheet_get_n_rows (ds), n_rows); else { size_t row, col; bool difference = false; for (row = 0; row < n_rows; row++) for (col = 0; col < n_columns; col++) { int width = caseproto_get_width (proto, col); union value *av = &array[row][col]; union value v; value_init (&v, width); if (!datasheet_get_value (ds, row, col, &v)) NOT_REACHED (); if (!value_equal (&v, av, width)) { if (width == 0) mc_error (mc, "element %zu,%zu (of %zu,%zu) differs: " "%.*g != %.*g", row, col, n_rows, n_columns, DBL_DIG + 1, v.f, DBL_DIG + 1, av->f); else mc_error (mc, "element %zu,%zu (of %zu,%zu) differs: " "'%.*s' != '%.*s'", row, col, n_rows, n_columns, width, value_str (&v, width), width, value_str (av, width)); difference = true; } value_destroy (&v, width); } if (difference) { struct string s; mc_error (mc, "expected:"); ds_init_empty (&s); for (row = 0; row < n_rows; row++) { ds_clear (&s); ds_put_format (&s, "row %zu:", row); for (col = 0; col < n_columns; col++) { const union value *v = &array[row][col]; int width = caseproto_get_width (proto, col); if (width == 0) ds_put_format (&s, " %g", v->f); else ds_put_format (&s, " '%.*s'", width, value_str (v, width)); } mc_error (mc, "%s", ds_cstr (&s)); } mc_error (mc, "actual:"); ds_init_empty (&s); for (row = 0; row < n_rows; row++) { ds_clear (&s); ds_put_format (&s, "row %zu:", row); for (col = 0; col < n_columns; col++) { int width = caseproto_get_width (proto, col); union value v; value_init (&v, width); if (!datasheet_get_value (ds, row, col, &v)) NOT_REACHED (); if (width == 0) ds_put_format (&s, " %g", v.f); else ds_put_format (&s, " '%.*s'", width, value_str (&v, width)); } mc_error (mc, "%s", ds_cstr (&s)); } ds_destroy (&s); } } /* Check that datasheet contents are correct when read through casereader. */ ds2 = clone_datasheet (ds); reader = datasheet_make_reader (ds2); check_datasheet_casereader (mc, reader, array, n_rows, proto); casereader_destroy (reader); /* Check that datasheet contents are correct when read through casereader with lazy_casereader wrapped around it. This is valuable because otherwise there is no non-GUI code that uses the lazy_casereader. */ ds2 = clone_datasheet (ds); reader = lazy_casereader_create (datasheet_get_proto (ds2), n_rows, lazy_callback, ds2, &serial); check_datasheet_casereader (mc, reader, array, n_rows, proto); if (lazy_casereader_destroy (reader, serial)) { /* Lazy casereader was never instantiated. This will only happen if there are no rows (because in that case casereader_read never gets called). */ datasheet_destroy (ds2); if (n_rows != 0) mc_error (mc, "lazy casereader not instantiated, but should " "have been (size %zu,%zu)", n_rows, n_columns); } else { /* Lazy casereader was instantiated. This is the common case, in which some casereader operation (casereader_read in this case) was performed on the lazy casereader. */ casereader_destroy (reader); if (n_rows == 0) mc_error (mc, "lazy casereader instantiated, but should not " "have been (size %zu,%zu)", n_rows, n_columns); } if (mc_discard_dup_state (mc, hash_datasheet (ds))) datasheet_destroy (ds); else mc_add_state (mc, ds); } /* Extracts the contents of DS into DATA. */ static void extract_data (const struct datasheet *ds, union value data[MAX_ROWS][MAX_COLS]) { const struct caseproto *proto = datasheet_get_proto (ds); size_t n_columns = datasheet_get_n_columns (ds); size_t n_rows = datasheet_get_n_rows (ds); size_t row, col; assert (n_rows < MAX_ROWS); assert (n_columns < MAX_COLS); for (row = 0; row < n_rows; row++) for (col = 0; col < n_columns; col++) { int width = caseproto_get_width (proto, col); union value *v = &data[row][col]; value_init (v, width); if (!datasheet_get_value (ds, row, col, v)) NOT_REACHED (); } } /* Copies the contents of ODATA into DATA. Each of the N_ROWS rows of ODATA and DATA must have prototype PROTO. */ static void clone_data (size_t n_rows, const struct caseproto *proto, union value odata[MAX_ROWS][MAX_COLS], union value data[MAX_ROWS][MAX_COLS]) { size_t n_columns = caseproto_get_n_widths (proto); size_t row, col; assert (n_rows < MAX_ROWS); assert (n_columns < MAX_COLS); for (row = 0; row < n_rows; row++) for (col = 0; col < n_columns; col++) { int width = caseproto_get_width (proto, col); const union value *ov = &odata[row][col]; union value *v = &data[row][col]; value_init (v, width); value_copy (v, ov, width); } } static void release_data (size_t n_rows, const struct caseproto *proto, union value data[MAX_ROWS][MAX_COLS]) { size_t n_columns = caseproto_get_n_widths (proto); size_t row, col; assert (n_rows < MAX_ROWS); assert (n_columns < MAX_COLS); for (col = 0; col < n_columns; col++) { int width = caseproto_get_width (proto, col); if (value_needs_init (width)) for (row = 0; row < n_rows; row++) value_destroy (&data[row][col], width); } } /* Clones the structure and contents of ODS into *DS, and the contents of ODATA into DATA. */ static void clone_model (const struct datasheet *ods, union value odata[MAX_ROWS][MAX_COLS], struct datasheet **ds, union value data[MAX_ROWS][MAX_COLS]) { *ds = clone_datasheet (ods); clone_data (datasheet_get_n_rows (ods), datasheet_get_proto (ods), odata, data); } static void value_from_param (union value *value, int width, unsigned int idx) { if (width == 0) value->f = idx & 0xffff; else { unsigned int hash = hash_int (idx, 0); uint8_t *string = value_str_rw (value, width); int offset; assert (width < 32); for (offset = 0; offset < width; offset++) string[offset] = "ABCDEFGHIJ"[(hash >> offset) % 10]; } } /* "init" function for struct mc_class. */ static void datasheet_mc_init (struct mc *mc) { struct datasheet_test_params *params = mc_get_aux (mc); struct datasheet *ds; if (params->backing_rows == 0 && params->n_backing_cols == 0) { /* Create unbacked datasheet. */ struct caseproto *proto; ds = datasheet_create (NULL); mc_name_operation (mc, "empty datasheet"); proto = caseproto_create (); check_datasheet (mc, ds, NULL, 0, proto); caseproto_unref (proto); } else { /* Create datasheet with backing. */ struct casewriter *writer; struct casereader *reader; union value data[MAX_ROWS][MAX_COLS]; struct caseproto *proto; int row, col; assert (params->backing_rows > 0 && params->backing_rows <= MAX_ROWS); assert (params->n_backing_cols > 0 && params->n_backing_cols <= MAX_COLS); proto = caseproto_create (); for (col = 0; col < params->n_backing_cols; col++) proto = caseproto_add_width (proto, params->backing_widths[col]); writer = mem_writer_create (proto); for (row = 0; row < params->backing_rows; row++) { struct ccase *c; c = case_create (proto); for (col = 0; col < params->n_backing_cols; col++) { int width = params->backing_widths[col]; union value *value = &data[row][col]; value_init (value, width); value_from_param (value, width, params->next_value++); value_copy (case_data_rw_idx (c, col), value, width); } casewriter_write (writer, c); } reader = casewriter_make_reader (writer); assert (reader != NULL); ds = datasheet_create (reader); mc_name_operation (mc, "datasheet with (%d,%d) backing", params->backing_rows, params->n_backing_cols); check_datasheet (mc, ds, data, params->backing_rows, proto); release_data (params->backing_rows, proto, data); caseproto_unref (proto); } } struct resize_cb_aux { int old_width; int new_width; }; static void resize_cb (const union value *old_value, union value *new_value, const void *aux_) { const struct resize_cb_aux *aux = aux_; value_from_param (new_value, aux->new_width, value_hash (old_value, aux->old_width, 0)); } /* "mutate" function for struct mc_class. */ static void datasheet_mc_mutate (struct mc *mc, const void *ods_) { struct datasheet_test_params *params = mc_get_aux (mc); const struct datasheet *ods = ods_; union value odata[MAX_ROWS][MAX_COLS]; union value data[MAX_ROWS][MAX_COLS]; const struct caseproto *oproto = datasheet_get_proto (ods); size_t n_columns = datasheet_get_n_columns (ods); size_t n_rows = datasheet_get_n_rows (ods); size_t pos, new_pos, cnt, width_idx; extract_data (ods, odata); /* Insert a column in each possible position. */ if (n_columns < params->max_cols) for (pos = 0; pos <= n_columns; pos++) for (width_idx = 0; width_idx < params->n_widths; width_idx++) if (mc_include_state (mc)) { int width = params->widths[width_idx]; struct caseproto *proto; struct datasheet *ds; union value new; size_t i; mc_name_operation (mc, "insert column at %zu " "(from %zu to %zu columns)", pos, n_columns, n_columns + 1); clone_model (ods, odata, &ds, data); value_init (&new, width); value_from_param (&new, width, params->next_value++); if (!datasheet_insert_column (ds, &new, width, pos)) mc_error (mc, "datasheet_insert_column failed"); proto = caseproto_insert_width (caseproto_ref (oproto), pos, width); for (i = 0; i < n_rows; i++) { insert_element (&data[i][0], n_columns, sizeof data[i][0], pos); value_init (&data[i][pos], width); value_copy (&data[i][pos], &new, width); } value_destroy (&new, width); check_datasheet (mc, ds, data, n_rows, proto); release_data (n_rows, proto, data); caseproto_unref (proto); } /* Resize each column to each possible new size. */ for (pos = 0; pos < n_columns; pos++) for (width_idx = 0; width_idx < params->n_widths; width_idx++) { int owidth = caseproto_get_width (oproto, pos); int width = params->widths[width_idx]; if (mc_include_state (mc)) { struct resize_cb_aux aux; struct caseproto *proto; struct datasheet *ds; size_t i; mc_name_operation (mc, "resize column %zu (of %zu) " "from width %d to %d", pos, n_columns, owidth, width); clone_model (ods, odata, &ds, data); aux.old_width = owidth; aux.new_width = width; if (!datasheet_resize_column (ds, pos, width, resize_cb, &aux)) NOT_REACHED (); proto = caseproto_set_width (caseproto_ref (oproto), pos, width); for (i = 0; i < n_rows; i++) { union value *old_value = &data[i][pos]; union value new_value; value_init (&new_value, width); resize_cb (old_value, &new_value, &aux); value_swap (old_value, &new_value); value_destroy (&new_value, owidth); } check_datasheet (mc, ds, data, n_rows, proto); release_data (n_rows, proto, data); caseproto_unref (proto); } } /* Delete all possible numbers of columns from all possible positions. */ for (pos = 0; pos < n_columns; pos++) for (cnt = 1; cnt < n_columns - pos; cnt++) if (mc_include_state (mc)) { struct caseproto *proto; struct datasheet *ds; size_t i, j; mc_name_operation (mc, "delete %zu columns at %zu " "(from %zu to %zu columns)", cnt, pos, n_columns, n_columns - cnt); clone_model (ods, odata, &ds, data); datasheet_delete_columns (ds, pos, cnt); proto = caseproto_remove_widths (caseproto_ref (oproto), pos, cnt); for (i = 0; i < n_rows; i++) { for (j = pos; j < pos + cnt; j++) value_destroy (&data[i][j], caseproto_get_width (oproto, j)); remove_range (&data[i], n_columns, sizeof *data[i], pos, cnt); } check_datasheet (mc, ds, data, n_rows, proto); release_data (n_rows, proto, data); caseproto_unref (proto); } /* Move all possible numbers of columns from all possible existing positions to all possible new positions. */ for (pos = 0; pos < n_columns; pos++) for (cnt = 1; cnt < n_columns - pos; cnt++) for (new_pos = 0; new_pos < n_columns - cnt; new_pos++) if (mc_include_state (mc)) { struct caseproto *proto; struct datasheet *ds; size_t i; clone_model (ods, odata, &ds, data); mc_name_operation (mc, "move %zu columns (of %zu) from %zu to %zu", cnt, n_columns, pos, new_pos); datasheet_move_columns (ds, pos, new_pos, cnt); for (i = 0; i < n_rows; i++) move_range (&data[i], n_columns, sizeof data[i][0], pos, new_pos, cnt); proto = caseproto_move_widths (caseproto_ref (oproto), pos, new_pos, cnt); check_datasheet (mc, ds, data, n_rows, proto); release_data (n_rows, proto, data); caseproto_unref (proto); } /* Insert all possible numbers of rows in all possible positions. */ for (pos = 0; pos <= n_rows; pos++) for (cnt = 1; cnt <= params->max_rows - n_rows; cnt++) if (mc_include_state (mc)) { struct datasheet *ds; struct ccase *c[MAX_ROWS]; size_t i, j; clone_model (ods, odata, &ds, data); mc_name_operation (mc, "insert %zu rows at %zu " "(from %zu to %zu rows)", cnt, pos, n_rows, n_rows + cnt); for (i = 0; i < cnt; i++) { c[i] = case_create (oproto); for (j = 0; j < n_columns; j++) value_from_param (case_data_rw_idx (c[i], j), caseproto_get_width (oproto, j), params->next_value++); } insert_range (data, n_rows, sizeof data[pos], pos, cnt); for (i = 0; i < cnt; i++) for (j = 0; j < n_columns; j++) { int width = caseproto_get_width (oproto, j); value_init (&data[i + pos][j], width); value_copy (&data[i + pos][j], case_data_idx (c[i], j), width); } if (!datasheet_insert_rows (ds, pos, c, cnt)) mc_error (mc, "datasheet_insert_rows failed"); check_datasheet (mc, ds, data, n_rows + cnt, oproto); release_data (n_rows + cnt, oproto, data); } /* Delete all possible numbers of rows from all possible positions. */ for (pos = 0; pos < n_rows; pos++) for (cnt = 1; cnt < n_rows - pos; cnt++) if (mc_include_state (mc)) { struct datasheet *ds; clone_model (ods, odata, &ds, data); mc_name_operation (mc, "delete %zu rows at %zu " "(from %zu to %zu rows)", cnt, pos, n_rows, n_rows - cnt); datasheet_delete_rows (ds, pos, cnt); release_data (cnt, oproto, &data[pos]); remove_range (&data[0], n_rows, sizeof data[0], pos, cnt); check_datasheet (mc, ds, data, n_rows - cnt, oproto); release_data (n_rows - cnt, oproto, data); } /* Move all possible numbers of rows from all possible existing positions to all possible new positions. */ for (pos = 0; pos < n_rows; pos++) for (cnt = 1; cnt < n_rows - pos; cnt++) for (new_pos = 0; new_pos < n_rows - cnt; new_pos++) if (mc_include_state (mc)) { struct datasheet *ds; clone_model (ods, odata, &ds, data); mc_name_operation (mc, "move %zu rows (of %zu) from %zu to %zu", cnt, n_rows, pos, new_pos); datasheet_move_rows (ds, pos, new_pos, cnt); move_range (&data[0], n_rows, sizeof data[0], pos, new_pos, cnt); check_datasheet (mc, ds, data, n_rows, oproto); release_data (n_rows, oproto, data); } release_data (n_rows, oproto, odata); } /* "destroy" function for struct mc_class. */ static void datasheet_mc_destroy (const struct mc *mc UNUSED, void *ds_) { struct datasheet *ds = ds_; datasheet_destroy (ds); } enum { OPT_MAX_ROWS, OPT_MAX_COLUMNS, OPT_BACKING_ROWS, OPT_BACKING_WIDTHS, OPT_WIDTHS, OPT_HELP, N_DATASHEET_OPTIONS }; static const struct argv_option datasheet_argv_options[N_DATASHEET_OPTIONS] = { {"max-rows", 0, required_argument, OPT_MAX_ROWS}, {"max-columns", 0, required_argument, OPT_MAX_COLUMNS}, {"backing-rows", 0, required_argument, OPT_BACKING_ROWS}, {"backing-widths", 0, required_argument, OPT_BACKING_WIDTHS}, {"widths", 0, required_argument, OPT_WIDTHS}, {"help", 'h', no_argument, OPT_HELP}, }; static void usage (void); static void datasheet_option_callback (int id, void *params_) { struct datasheet_test_params *params = params_; switch (id) { case OPT_MAX_ROWS: params->max_rows = atoi (optarg); break; case OPT_MAX_COLUMNS: params->max_cols = atoi (optarg); break; case OPT_BACKING_ROWS: params->backing_rows = atoi (optarg); break; case OPT_BACKING_WIDTHS: { char *w; params->n_backing_cols = 0; for (w = strtok (optarg, ", "); w != NULL; w = strtok (NULL, ", ")) { int value = atoi (w); if (params->n_backing_cols >= MAX_COLS) error (1, 0, "Too many widths on --backing-widths " "(only %d are allowed)", MAX_COLS); if (!isdigit (w[0]) || value < 0 || value > 31) error (1, 0, "--backing-widths argument must be a list of 1 to " "%d integers between 0 and 31 in increasing order", MAX_COLS); params->backing_widths[params->n_backing_cols++] = value; } } break; case OPT_WIDTHS: { int last = -1; char *w; params->n_widths = 0; for (w = strtok (optarg, ", "); w != NULL; w = strtok (NULL, ", ")) { int value = atoi (w); if (params->n_widths >= MAX_WIDTHS) error (1, 0, "Too many widths on --widths (only %d are allowed)", MAX_WIDTHS); if (!isdigit (w[0]) || value < 0 || value > 31) error (1, 0, "--widths argument must be a list of 1 to %d " "integers between 0 and 31 in increasing order", MAX_WIDTHS); /* This is an artificial requirement merely to ensure that there are no duplicates. Duplicates aren't a real problem but they would waste time. */ if (value <= last) error (1, 0, "--widths arguments must be in increasing order"); params->widths[params->n_widths++] = value; } if (params->n_widths == 0) error (1, 0, "at least one value must be specified on --widths"); } break; case OPT_HELP: usage (); break; default: NOT_REACHED (); } } static void usage (void) { printf ("%s, for testing the datasheet implementation.\n" "Usage: %s [OPTION]...\n" "\nTest state space parameters (min...max, default):\n" " --max-rows=N Maximum number of rows (0...5, 3)\n" " --max-rows=N Maximum number of columns (0...5, 3)\n" " --backing-rows=N Rows of backing store (0...max_rows, 0)\n" " --backing-widths=W[,W]... Backing store widths to test (0=num)\n" " --widths=W[,W]... Column widths to test, where 0=numeric,\n" " other values are string widths (0,1,11)\n", program_name, program_name); mc_options_usage (); fputs ("\nOther options:\n" " --help Display this help message\n" "\nReport bugs to \n", stdout); exit (0); } int main (int argc, char *argv[]) { static const struct mc_class datasheet_mc_class = { datasheet_mc_init, datasheet_mc_mutate, datasheet_mc_destroy, }; struct datasheet_test_params params; struct mc_options *options; struct mc_results *results; struct argv_parser *parser; int verbosity; bool success; set_program_name (argv[0]); /* Default parameters. */ params.max_rows = 3; params.max_cols = 3; params.backing_rows = 0; params.n_backing_cols = 0; params.widths[0] = 0; params.widths[1] = 1; params.widths[2] = 11; params.n_widths = 3; params.next_value = 1; /* Parse command line. */ parser = argv_parser_create (); options = mc_options_create (); mc_options_register_argv_parser (options, parser); argv_parser_add_options (parser, datasheet_argv_options, N_DATASHEET_OPTIONS, datasheet_option_callback, ¶ms); if (!argv_parser_run (parser, argc, argv)) exit (EXIT_FAILURE); argv_parser_destroy (parser); verbosity = mc_options_get_verbosity (options); /* Force parameters into allowed ranges. */ params.max_rows = MIN (params.max_rows, MAX_ROWS); params.max_cols = MIN (params.max_cols, MAX_COLS); params.backing_rows = MIN (params.backing_rows, params.max_rows); params.n_backing_cols = MIN (params.n_backing_cols, params.max_cols); mc_options_set_aux (options, ¶ms); results = mc_run (&datasheet_mc_class, options); /* Output results. */ success = (mc_results_get_stop_reason (results) != MC_MAX_ERROR_COUNT && mc_results_get_stop_reason (results) != MC_INTERRUPTED); if (verbosity > 0 || !success) { int i; printf ("Parameters: --max-rows=%d --max-columns=%d --backing-rows=%d ", params.max_rows, params.max_cols, params.backing_rows); printf ("--backing-widths="); for (i = 0; i < params.n_backing_cols; i++) { if (i > 0) printf (","); printf ("%d", params.backing_widths[i]); } printf (" "); printf ("--widths="); for (i = 0; i < params.n_widths; i++) { if (i > 0) printf (","); printf ("%d", params.widths[i]); } printf ("\n\n"); mc_results_print (results, stdout); } mc_results_destroy (results); return success ? 0 : EXIT_FAILURE; } pspp-1.0.1/tests/data/CVE-2017-10791.sav0000644000175000017500000000123713137223525013673 00000000000000$FL2@(#) SPSS DATA FILE MS Windows Release 12.0 spssio32.dll  Y@30 Jan 1314:34:58 VAR00001VAR00002VAR00003VAR000   G0001=VAR0000002 VAR00003=VAR00003 VR00004=VAR00004eefffga s gehhfgd f iehjffg h kehlfgj k mefnfhl p pspp-1.0.1/tests/data/data-out.at0000644000175000017500000102572013150617107013543 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([data output (data-out)]) AT_SETUP([numeric format output]) AT_DATA([num-out.pl], [[use strict; use warnings 'all'; my @values = qw(0 2 9.5 27 271 999.95 2718 9999.995 27182 271828 2718281 2**39 2**333 2**-21 -2 -9.5 -27 -271 -999.95 -2718 -9999.995 -27182 -271828 -2718281 -2**39 -2**333 -2**-21 -0 3.125 31.25 314.125 3141.5 31415.875 314159.25 3141592.625 31415926.5 271828182.25 3214567890.5 31415926535.875 -3.125 -31.375 -314.125 -3141.5 -31415.875 -314159.25 -3141592.625 -31415926.5 -271828182.25 -3214567890.5 -31415926535.875); print "SET CCA=',,,'.\n"; print "SET CCB='-,[[[,]]],-'.\n"; print "SET CCC='((,[,],))'.\n"; print "SET CCD=',XXX,,-'.\n"; print "SET CCE=',,YYY,-'.\n"; print "INPUT PROGRAM.\n"; print "STRING EXPR(A16).\n"; print map ("COMPUTE NUM=$_.\nCOMPUTE EXPR='$_'.\nEND CASE.\n", @values); print "END FILE.\n"; print "END INPUT PROGRAM.\n"; print "PRINT OUTFILE='output.txt'/EXPR.\n"; for my $format (qw (F COMMA DOT DOLLAR PCT E CCA CCB CCC CCD CCE N Z)) { for my $d (0...16) { my ($min_w); if ($format ne 'E') { $min_w = $d + 1; $min_w++ if $format eq 'DOLLAR' || $format eq 'PCT'; $min_w = 2 if $min_w == 1 && ($format =~ /^CC/); } else { $min_w = $d + 7; } for my $w ($min_w...40) { my ($f) = "$format$w.$d"; print "PRINT OUTFILE='output.txt'/'$f: \"' NUM($f) '\"'.\n"; } } print "PRINT SPACE OUTFILE='output.txt'.\n"; } print "EXECUTE.\n"; ]]) AT_CHECK([$PERL num-out.pl > num-out.sps]) AT_CHECK([pspp -O format=csv num-out.sps]) AT_CHECK([inexactify < output.txt > output.inexact]) AT_CHECK([gzip -cd < $top_srcdir/tests/data/num-out.expected.cmp.gz > expout.cmp]) AT_DATA([num-out-decmp.pl], [[use strict; use warnings 'all'; my (@line); while (<>) { if (my ($n) = /^\*(\d+)$/) { for (1...$n) { $line[1]++; $line[3] = " $line[3]"; print ' ', join ('', @line), "\n"; } } elsif (my ($suffix) = /^\$(.*)$/) { for my $c (split ('', $suffix)) { $line[1]++; $line[4] .= $c; print ' ', join ('', @line), "\n"; } } elsif (my ($prefix) = /^\^(.*)$/) { for my $c (split ('', $prefix)) { $line[1]++; $line[4] = "$c$line[4]"; print ' ', join ('', @line), "\n"; } } else { @line = /^([A-Z]+)(\d+)([^"]+")( *)([^%"]*)(%?")$/; print " $_"; } } ]]) AT_CHECK([$PERL num-out-decmp.pl < expout.cmp > expout.exact]) AT_CHECK([[inexactify < expout.exact > expout.inexact]]) AT_DATA([num-out-compare.pl], [[#! /usr/bin/perl -w use strict; use warnings 'all'; use Getopt::Long; my $exact = 0; my $spss = 0; my $verbose = 0; Getopt::Long::Configure ("bundling"); GetOptions ("e|exact!" => \$exact, "s|spss!" => \$spss, "v|verbose+" => \$verbose, "h|help" => sub { usage (0) }) or usage (1); sub usage { print "$0: compare expected and actual numeric formatting output\n"; print "usage: $0 [OPTION...] EXPECTED ACTUAL\n"; print "where EXPECTED is the file containing expected output\n"; print "and ACTUAL is the file containing actual output.\n"; print "Options:\n"; print " -e, --exact: Require numbers to be exactly equal.\n"; print " (By default, small differences are permitted.)\n"; print " -s, --spss: Ignore most SPSS formatting bugs in EXPECTED.\n"; print " (A few differences are not compensated)\n"; print " -v, --verbose: Use once to summarize errors and differences.\n"; print " Use twice for details of differences.\n"; exit (@_); } open (EXPECTED, '<', $ARGV[0]) or die "$ARGV[0]: open: $!\n"; open (ACTUAL, '<', $ARGV[1]) or die "$ARGV[1]: open: $!\n"; my ($expr); my ($bad_round) = 0; my ($approximate) = 0; my ($spss_wtf1) = 0; my ($spss_wtf2) = 0; my ($lost_sign) = 0; my ($errors) = 0; while (defined (my $a = ) && defined (my $b = )) { chomp $a; chomp $b; if ($a eq $b) { if ($a !~ /^\s*$/ && $a !~ /:/) { $expr = $a; $expr =~ s/\s*$//; $expr =~ s/^\s*//; } } else { my ($fmt, $a_out) = $a =~ /^ (.*): "(.*)"$/ or die; my ($b_fmt, $b_out) = $b =~ /^ (.*): "(.*)"$/ or die; die if $fmt ne $b_fmt; die if $a_out eq $b_out; if (!$exact) { if (increment ($a_out) eq $b_out || increment ($b_out) eq $a_out) { $approximate++; next; } } if ($spss) { if ($a_out =~ /0.*0/ && $a_out !~ /[1-9]/) { $bad_round++; next; } elsif ($a_out =~ /\*/ && $a_out !~ /^\*+$/) { $spss_wtf1++; next; } elsif ($expr =~ /^-/ && $a_out =~ /^\*+$/ && $b_out =~ /-\d(\.\d*#*)?E[-+]\d\d\d/ && $fmt =~ /^E/) { $spss_wtf2++; next; } elsif ($expr =~ /^-/ && (($a_out !~ /-/ && $a_out =~ /[1-9]/ && $b_out =~ /-/) || ($a_out =~ /^[0-9]+$/ && $b_out =~ /^\*+$/))) { $lost_sign++; next; } } print "$.: $expr in $fmt: expected \"$a_out\", got \"$b_out\"\n" if $verbose > 1; $errors++; } } while () { print "Extra lines in $ARGV[0]\n"; $errors++; last; } while () { print "Extra lines in $ARGV[1]\n"; $errors++; last; } if ($verbose) { print "$errors errors\n"; if (!$exact) { print "$approximate approximate matches\n"; } if ($spss) { print "$bad_round bad rounds\n"; print "$spss_wtf1 SPSS WTF 1\n"; print "$spss_wtf2 SPSS WTF 2\n"; print "$lost_sign lost signs\n"; } } exit ($errors > 0); # Returns the argument value incremented by one unit in its final # decimal place. sub increment { local ($_) = @_; my ($last_digit, $i); for ($i = 0; $i < length $_; $i++) { my ($c) = substr ($_, $i, 1); last if ($c eq 'E'); $last_digit = $i if $c =~ /[0-9]/; } return $_ if !defined $last_digit; for ($i = $last_digit; $i >= 0; $i--) { my ($c) = substr ($_, $i, 1); if ($c eq '9') { substr ($_, $i, 1) = '0'; } elsif ($c =~ /[0-8]/) { substr ($_, $i, 1) = chr (ord ($c) + 1); last; } } $_ = "1$_" if $i < 0; return $_; } ]]) AT_CHECK([$PERL num-out-compare.pl $PSPP_NUM_OUT_COMPARE_FLAGS expout.inexact output.inexact]) AT_CLEANUP AT_SETUP([non-ASCII custom currency formats]) AT_DATA([data-out.sps], [dnl SET CCA='«,¥,€,»'. SHOW CCA. DATA LIST LIST NOTABLE/x. PRINT/x (F8.2) x (CCA10.2). EXECUTE. BEGIN DATA. 1 -1 1.5 -1.5 .75 1.5e10 -1.5e10 END DATA. ]) AT_CHECK([pspp -O format=csv data-out.sps], [0], [dnl "data-out.sps:2: note: SHOW: CCA is «,¥,€,»." 1.00 ¥1.00€ @&t@ -1.00 «¥1.00€» 1.50 ¥1.50€ @&t@ -1.50 «¥1.50€» .75 ¥.75€ @&t@ 1.5E+010 ¥2E+010€ @&t@ -2E+010«¥2E+010€» ]) AT_CLEANUP AT_SETUP([binary and hexadecimal output]) AT_DATA([binhex-out.sps], [dnl SET ERRORS=NONE. SET MXWARNS=10000000. SET WIB=MSBFIRST. DATA LIST NOTABLE/x 1-10. BEGIN DATA. 2 11 123 1234 913 3.14159 777 82 690 -2 -11 -123 -1234 -913 -3.14159 -777 -82 -690 -.1 -.5 -.9 9999.1 9999.5 9999.9 10000 18231237 -9999.1 -9999.5 -9999.9 -10000 -8231237 999.1 999.5 999.9 1000 8231237 -999.1 -999.5 -999.9 -1000 -8231237 99.1 99.5 99.9 100 821237 -99.1 -99.5 -99.9 -100 -831237 9.1 9.5 9.9 10 81237 -9.1 -9.5 -9.9 -10 -81237 1.1 -1.1 1.5 -1.5 1.9 -1.9 END DATA. FILE HANDLE output/NAME='binhex.out'/MODE=IMAGE/LRECL=256. WRITE OUTFILE=output/ x(p1.0) x(p2.0) x(p3.0) x(p4.0) /* 000 x(p2.1) x(p3.1) x(p4.1) /* 00a x(p3.2) x(p4.2) /* 013 x(p4.3) /* 01a x(pk1.0) x(pk2.0) x(pk3.0) x(pk4.0) /* 01e x(pk2.1) x(pk3.1) x(pk4.1) /* 028 x(pk3.2) x(pk4.2) /* 031 x(pk4.3) /* 038 x(ib1.0) x(ib2.0) x(ib3.0) x(ib4.0) /* 03c x(ib1.1) x(ib2.1) x(ib3.1) x(ib4.1) /* 046 x(ib1.2) x(ib2.2) x(ib3.2) x(ib4.2) /* 050 x(ib1.3) x(ib2.3) x(ib3.3) x(ib4.3) /* 05a x(ib2.4) x(ib3.4) x(ib4.4) /* 064 x(ib2.5) x(ib3.5) x(ib4.5) /* 06d x(ib3.6) x(ib4.6) /* 076 x(ib3.7) x(ib4.7) /* 07d x(ib3.8) x(ib4.8) /* 084 x(ib4.9) /* 08b x(ib4.10) /* 08f x(pib1.0) x(pib2.0) x(pib3.0) x(pib4.0) /* 093 x(pib1.1) x(pib2.1) x(pib3.1) x(pib4.1) /* 09d x(pib1.2) x(pib2.2) x(pib3.2) x(pib4.2) /* 0a7 x(pib1.3) x(pib2.3) x(pib3.3) x(pib4.3) /* 0b1 x(pib2.4) x(pib3.4) x(pib4.4) /* 0bb x(pib2.5) x(pib3.5) x(pib4.5) /* 0c4 x(pib3.6) x(pib4.6) /* 0cd x(pib3.7) x(pib4.7) /* 0d4 x(pib3.8) x(pib4.8) /* 0db x(pib4.9) /* 0e2 x(pib4.10) /* 0e6 x(pibhex2) x(pibhex4) /* 0ea x(pibhex6) x(pibhex8). /* 0f0 /* 0fe EXECUTE. ]) AT_CHECK([pspp -O format=csv binhex-out.sps]) AT_CHECK([gzip -cd < $top_srcdir/tests/data/binhex-out.expected.gz > expout]) AT_CHECK([cat binhex.out], [0], [expout]) AT_CLEANUP AT_SETUP([output valid dates]) AT_DATA([date-out.sps], [dnl set epoch=1930. data list notable /x 1-30 (datetime). begin data. 10-6-1648 0:0:0 30-6-1680 4:50:38.12301 24-7-1716 12:31:35.23453 19-6-1768 12:47:53.34505 2-8-1819 1:26:0.45615 27-3-1839 20:58:11.56677 19-4-1903 7:36:5.18964 25-8-1929 15:43:49.83132 29-9-1941 4:25:9.01293 19-4-1943 6:49:27.52375 7-10-1943 2:57:52.01565 17-3-1992 16:45:44.86529 25-2-1996 21:30:57.82047 29-9-41 4:25:9.15395 19-4-43 6:49:27.10533 7-10-43 2:57:52.48229 17-3-92 16:45:44.65827 25-2-96 21:30:57.58219 10-11-2038 22:30:4.18347 18-7-2094 1:56:51.59319 end data. print outfile='date-out.out'/x(date9) ' | ' x(date11). print outfile='date-out.out'/x(adate8) ' | ' x(adate10). print outfile='date-out.out'/x(edate8) ' | ' x(edate10). print outfile='date-out.out'/x(jdate5) ' | ' x(jdate7). print outfile='date-out.out'/x(sdate8) ' | ' x(sdate10). print outfile='date-out.out'/x(qyr6) ' | ' x(qyr8). print outfile='date-out.out'/x(moyr6) ' | ' x(moyr8). print outfile='date-out.out'/x(wkyr8) ' | ' x(wkyr10). print outfile='date-out.out'/x(datetime17). print outfile='date-out.out'/x(datetime18). print outfile='date-out.out'/x(datetime19). print outfile='date-out.out'/x(datetime20). print outfile='date-out.out'/x(datetime21). print outfile='date-out.out'/x(datetime22). print outfile='date-out.out'/x(datetime22.1). print outfile='date-out.out'/x(datetime23.2). print outfile='date-out.out'/x(datetime24.3). print outfile='date-out.out'/x(datetime25.4). print outfile='date-out.out'/x(datetime26.5). execute. ]) AT_CHECK([pspp -O format=csv date-out.sps]) AT_CHECK([cat date-out.out], [0], [dnl ********* | 10-JUN-1648 ******** | 06/10/1648 ******** | 10.06.1648 ***** | 1648162 ******** | 1648/06/10 ****** | 2 Q 1648 ****** | JUN 1648 ******** | 24 WK 1648 10-JUN-1648 00:00 10-JUN-1648 00:00 10-JUN-1648 00:00 10-JUN-1648 00:00:00 10-JUN-1648 00:00:00 10-JUN-1648 00:00:00 10-JUN-1648 00:00:00.0 10-JUN-1648 00:00:00.00 10-JUN-1648 00:00:00.000 10-JUN-1648 00:00:00.0000 10-JUN-1648 00:00:00.00000 ********* | 30-JUN-1680 ******** | 06/30/1680 ******** | 30.06.1680 ***** | 1680182 ******** | 1680/06/30 ****** | 2 Q 1680 ****** | JUN 1680 ******** | 26 WK 1680 30-JUN-1680 04:50 30-JUN-1680 04:50 30-JUN-1680 04:50 30-JUN-1680 04:50:38 30-JUN-1680 04:50:38 30-JUN-1680 04:50:38 30-JUN-1680 04:50:38.1 30-JUN-1680 04:50:38.12 30-JUN-1680 04:50:38.123 30-JUN-1680 04:50:38.1230 30-JUN-1680 04:50:38.12301 ********* | 24-JUL-1716 ******** | 07/24/1716 ******** | 24.07.1716 ***** | 1716206 ******** | 1716/07/24 ****** | 3 Q 1716 ****** | JUL 1716 ******** | 30 WK 1716 24-JUL-1716 12:31 24-JUL-1716 12:31 24-JUL-1716 12:31 24-JUL-1716 12:31:35 24-JUL-1716 12:31:35 24-JUL-1716 12:31:35 24-JUL-1716 12:31:35.2 24-JUL-1716 12:31:35.23 24-JUL-1716 12:31:35.235 24-JUL-1716 12:31:35.2345 24-JUL-1716 12:31:35.23453 ********* | 19-JUN-1768 ******** | 06/19/1768 ******** | 19.06.1768 ***** | 1768171 ******** | 1768/06/19 ****** | 2 Q 1768 ****** | JUN 1768 ******** | 25 WK 1768 19-JUN-1768 12:47 19-JUN-1768 12:47 19-JUN-1768 12:47 19-JUN-1768 12:47:53 19-JUN-1768 12:47:53 19-JUN-1768 12:47:53 19-JUN-1768 12:47:53.3 19-JUN-1768 12:47:53.35 19-JUN-1768 12:47:53.345 19-JUN-1768 12:47:53.3450 19-JUN-1768 12:47:53.34505 ********* | 02-AUG-1819 ******** | 08/02/1819 ******** | 02.08.1819 ***** | 1819214 ******** | 1819/08/02 ****** | 3 Q 1819 ****** | AUG 1819 ******** | 31 WK 1819 02-AUG-1819 01:26 02-AUG-1819 01:26 02-AUG-1819 01:26 02-AUG-1819 01:26:00 02-AUG-1819 01:26:00 02-AUG-1819 01:26:00 02-AUG-1819 01:26:00.5 02-AUG-1819 01:26:00.46 02-AUG-1819 01:26:00.456 02-AUG-1819 01:26:00.4562 02-AUG-1819 01:26:00.45615 ********* | 27-MAR-1839 ******** | 03/27/1839 ******** | 27.03.1839 ***** | 1839086 ******** | 1839/03/27 ****** | 1 Q 1839 ****** | MAR 1839 ******** | 13 WK 1839 27-MAR-1839 20:58 27-MAR-1839 20:58 27-MAR-1839 20:58 27-MAR-1839 20:58:11 27-MAR-1839 20:58:11 27-MAR-1839 20:58:11 27-MAR-1839 20:58:11.6 27-MAR-1839 20:58:11.57 27-MAR-1839 20:58:11.567 27-MAR-1839 20:58:11.5668 27-MAR-1839 20:58:11.56677 ********* | 19-APR-1903 ******** | 04/19/1903 ******** | 19.04.1903 ***** | 1903109 ******** | 1903/04/19 ****** | 2 Q 1903 ****** | APR 1903 ******** | 16 WK 1903 19-APR-1903 07:36 19-APR-1903 07:36 19-APR-1903 07:36 19-APR-1903 07:36:05 19-APR-1903 07:36:05 19-APR-1903 07:36:05 19-APR-1903 07:36:05.2 19-APR-1903 07:36:05.19 19-APR-1903 07:36:05.190 19-APR-1903 07:36:05.1896 19-APR-1903 07:36:05.18964 ********* | 25-AUG-1929 ******** | 08/25/1929 ******** | 25.08.1929 ***** | 1929237 ******** | 1929/08/25 ****** | 3 Q 1929 ****** | AUG 1929 ******** | 34 WK 1929 25-AUG-1929 15:43 25-AUG-1929 15:43 25-AUG-1929 15:43 25-AUG-1929 15:43:49 25-AUG-1929 15:43:49 25-AUG-1929 15:43:49 25-AUG-1929 15:43:49.8 25-AUG-1929 15:43:49.83 25-AUG-1929 15:43:49.831 25-AUG-1929 15:43:49.8313 25-AUG-1929 15:43:49.83132 29-SEP-41 | 29-SEP-1941 09/29/41 | 09/29/1941 29.09.41 | 29.09.1941 41272 | 1941272 41/09/29 | 1941/09/29 3 Q 41 | 3 Q 1941 SEP 41 | SEP 1941 39 WK 41 | 39 WK 1941 29-SEP-1941 04:25 29-SEP-1941 04:25 29-SEP-1941 04:25 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09.0 29-SEP-1941 04:25:09.01 29-SEP-1941 04:25:09.013 29-SEP-1941 04:25:09.0129 29-SEP-1941 04:25:09.01293 19-APR-43 | 19-APR-1943 04/19/43 | 04/19/1943 19.04.43 | 19.04.1943 43109 | 1943109 43/04/19 | 1943/04/19 2 Q 43 | 2 Q 1943 APR 43 | APR 1943 16 WK 43 | 16 WK 1943 19-APR-1943 06:49 19-APR-1943 06:49 19-APR-1943 06:49 19-APR-1943 06:49:27 19-APR-1943 06:49:27 19-APR-1943 06:49:27 19-APR-1943 06:49:27.5 19-APR-1943 06:49:27.52 19-APR-1943 06:49:27.524 19-APR-1943 06:49:27.5238 19-APR-1943 06:49:27.52375 07-OCT-43 | 07-OCT-1943 10/07/43 | 10/07/1943 07.10.43 | 07.10.1943 43280 | 1943280 43/10/07 | 1943/10/07 4 Q 43 | 4 Q 1943 OCT 43 | OCT 1943 40 WK 43 | 40 WK 1943 07-OCT-1943 02:57 07-OCT-1943 02:57 07-OCT-1943 02:57 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52.0 07-OCT-1943 02:57:52.02 07-OCT-1943 02:57:52.016 07-OCT-1943 02:57:52.0156 07-OCT-1943 02:57:52.01565 17-MAR-92 | 17-MAR-1992 03/17/92 | 03/17/1992 17.03.92 | 17.03.1992 92077 | 1992077 92/03/17 | 1992/03/17 1 Q 92 | 1 Q 1992 MAR 92 | MAR 1992 11 WK 92 | 11 WK 1992 17-MAR-1992 16:45 17-MAR-1992 16:45 17-MAR-1992 16:45 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44.9 17-MAR-1992 16:45:44.87 17-MAR-1992 16:45:44.865 17-MAR-1992 16:45:44.8653 17-MAR-1992 16:45:44.86529 25-FEB-96 | 25-FEB-1996 02/25/96 | 02/25/1996 25.02.96 | 25.02.1996 96056 | 1996056 96/02/25 | 1996/02/25 1 Q 96 | 1 Q 1996 FEB 96 | FEB 1996 8 WK 96 | 8 WK 1996 25-FEB-1996 21:30 25-FEB-1996 21:30 25-FEB-1996 21:30 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57.8 25-FEB-1996 21:30:57.82 25-FEB-1996 21:30:57.820 25-FEB-1996 21:30:57.8205 25-FEB-1996 21:30:57.82047 29-SEP-41 | 29-SEP-1941 09/29/41 | 09/29/1941 29.09.41 | 29.09.1941 41272 | 1941272 41/09/29 | 1941/09/29 3 Q 41 | 3 Q 1941 SEP 41 | SEP 1941 39 WK 41 | 39 WK 1941 29-SEP-1941 04:25 29-SEP-1941 04:25 29-SEP-1941 04:25 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09 29-SEP-1941 04:25:09.2 29-SEP-1941 04:25:09.15 29-SEP-1941 04:25:09.154 29-SEP-1941 04:25:09.1539 29-SEP-1941 04:25:09.15395 19-APR-43 | 19-APR-1943 04/19/43 | 04/19/1943 19.04.43 | 19.04.1943 43109 | 1943109 43/04/19 | 1943/04/19 2 Q 43 | 2 Q 1943 APR 43 | APR 1943 16 WK 43 | 16 WK 1943 19-APR-1943 06:49 19-APR-1943 06:49 19-APR-1943 06:49 19-APR-1943 06:49:27 19-APR-1943 06:49:27 19-APR-1943 06:49:27 19-APR-1943 06:49:27.1 19-APR-1943 06:49:27.11 19-APR-1943 06:49:27.105 19-APR-1943 06:49:27.1053 19-APR-1943 06:49:27.10533 07-OCT-43 | 07-OCT-1943 10/07/43 | 10/07/1943 07.10.43 | 07.10.1943 43280 | 1943280 43/10/07 | 1943/10/07 4 Q 43 | 4 Q 1943 OCT 43 | OCT 1943 40 WK 43 | 40 WK 1943 07-OCT-1943 02:57 07-OCT-1943 02:57 07-OCT-1943 02:57 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52 07-OCT-1943 02:57:52.5 07-OCT-1943 02:57:52.48 07-OCT-1943 02:57:52.482 07-OCT-1943 02:57:52.4823 07-OCT-1943 02:57:52.48229 17-MAR-92 | 17-MAR-1992 03/17/92 | 03/17/1992 17.03.92 | 17.03.1992 92077 | 1992077 92/03/17 | 1992/03/17 1 Q 92 | 1 Q 1992 MAR 92 | MAR 1992 11 WK 92 | 11 WK 1992 17-MAR-1992 16:45 17-MAR-1992 16:45 17-MAR-1992 16:45 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44 17-MAR-1992 16:45:44.7 17-MAR-1992 16:45:44.66 17-MAR-1992 16:45:44.658 17-MAR-1992 16:45:44.6583 17-MAR-1992 16:45:44.65827 25-FEB-96 | 25-FEB-1996 02/25/96 | 02/25/1996 25.02.96 | 25.02.1996 96056 | 1996056 96/02/25 | 1996/02/25 1 Q 96 | 1 Q 1996 FEB 96 | FEB 1996 8 WK 96 | 8 WK 1996 25-FEB-1996 21:30 25-FEB-1996 21:30 25-FEB-1996 21:30 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57 25-FEB-1996 21:30:57.6 25-FEB-1996 21:30:57.58 25-FEB-1996 21:30:57.582 25-FEB-1996 21:30:57.5822 25-FEB-1996 21:30:57.58219 ********* | 10-NOV-2038 ******** | 11/10/2038 ******** | 10.11.2038 ***** | 2038314 ******** | 2038/11/10 ****** | 4 Q 2038 ****** | NOV 2038 ******** | 45 WK 2038 10-NOV-2038 22:30 10-NOV-2038 22:30 10-NOV-2038 22:30 10-NOV-2038 22:30:04 10-NOV-2038 22:30:04 10-NOV-2038 22:30:04 10-NOV-2038 22:30:04.2 10-NOV-2038 22:30:04.18 10-NOV-2038 22:30:04.183 10-NOV-2038 22:30:04.1835 10-NOV-2038 22:30:04.18347 ********* | 18-JUL-2094 ******** | 07/18/2094 ******** | 18.07.2094 ***** | 2094199 ******** | 2094/07/18 ****** | 3 Q 2094 ****** | JUL 2094 ******** | 29 WK 2094 18-JUL-2094 01:56 18-JUL-2094 01:56 18-JUL-2094 01:56 18-JUL-2094 01:56:51 18-JUL-2094 01:56:51 18-JUL-2094 01:56:51 18-JUL-2094 01:56:51.6 18-JUL-2094 01:56:51.59 18-JUL-2094 01:56:51.593 18-JUL-2094 01:56:51.5932 18-JUL-2094 01:56:51.59319 ]) AT_CLEANUP AT_SETUP([output invalid dates]) AT_DATA([bad-date.sps], [dnl set epoch=1930. set errors=none. data list list notable/x. begin data. 0 -1 3e11 end data. print outfile='bad-date.out'/x(date9) ' | ' x(date11). print outfile='bad-date.out'/x(adate8) ' | ' x(adate10). print outfile='bad-date.out'/x(edate8) ' | ' x(edate10). print outfile='bad-date.out'/x(jdate5) ' | ' x(jdate7). print outfile='bad-date.out'/x(sdate8) ' | ' x(sdate10). print outfile='bad-date.out'/x(qyr6) ' | ' x(qyr8). print outfile='bad-date.out'/x(moyr6) ' | ' x(moyr8). print outfile='bad-date.out'/x(wkyr8) ' | ' x(wkyr10). print outfile='bad-date.out'/x(datetime17). print outfile='bad-date.out'/x(datetime18). print outfile='bad-date.out'/x(datetime19). print outfile='bad-date.out'/x(datetime20). print outfile='bad-date.out'/x(datetime21). print outfile='bad-date.out'/x(datetime22). print outfile='bad-date.out'/x(datetime22.1). print outfile='bad-date.out'/x(datetime23.2). print outfile='bad-date.out'/x(datetime24.3). print outfile='bad-date.out'/x(datetime25.4). print outfile='bad-date.out'/x(datetime26.5). execute. ]) AT_CHECK([pspp -O format=csv bad-date.sps]) AT_CHECK([cat bad-date.out], [0], [dnl . | . . | . . | . . | . . | . . | . . | . . | . . . . . . . . @&t@ . @&t@ . @&t@ . @&t@ . @&t@ . | . . | . . | . . | . . | . . | . . | . . | . . . . . . . . @&t@ . @&t@ . @&t@ . @&t@ . @&t@ ********* | *********** ******** | ********** ******** | ********** ***** | ******* ******** | ********** ****** | ******** ****** | ******** ******** | ********** 28-MAY-**** 05:20 28-MAY-**** 05:20 28-MAY-**** 05:20 28-MAY-**** 05:20:00 28-MAY-**** 05:20:00 28-MAY-**** 05:20:00 28-MAY-**** 05:20:00.0 28-MAY-**** 05:20:00.00 28-MAY-**** 05:20:00.000 28-MAY-**** 05:20:00.0000 28-MAY-**** 05:20:00.00000 ]) AT_CLEANUP AT_SETUP([time output]) AT_DATA([time-out.sps], [dnl set epoch=1930. data list notable /x 1-30 (dtime). begin data. 0 0:0:0 0 4:50:38.12301 0 12:31:35.23453 0 12:47:53.34505 0 1:26:0.45615 0 20:58:11.56677 0 7:36:5.18964 0 15:43:49.83132 0 4:25:9.01293 0 6:49:27.52375 0 2:57:52.01565 0 16:45:44.86529 0 21:30:57.82047 0 4:25:9.15395 0 6:49:27.10533 0 2:57:52.48229 0 16:45:44.65827 0 21:30:57.58219 0 22:30:4.18347 0 1:56:51.59319 1 0:0:0 1 4:50:38.12301 1 12:31:35.23453 1 12:47:53.34505 1 1:26:0.45615 1 20:58:11.56677 1 7:36:5.18964 1 15:43:49.83132 1 4:25:9.01293 1 6:49:27.52375 1 2:57:52.01565 1 16:45:44.86529 1 21:30:57.82047 1 4:25:9.15395 1 6:49:27.10533 1 2:57:52.48229 1 16:45:44.65827 1 21:30:57.58219 1 22:30:4.18347 1 1:56:51.59319 2 0:0:0 2 4:50:38.12301 2 12:31:35.23453 2 12:47:53.34505 2 1:26:0.45615 2 20:58:11.56677 2 7:36:5.18964 2 15:43:49.83132 2 4:25:9.01293 2 6:49:27.52375 2 2:57:52.01565 2 16:45:44.86529 2 21:30:57.82047 2 4:25:9.15395 2 6:49:27.10533 2 2:57:52.48229 2 16:45:44.65827 2 21:30:57.58219 2 22:30:4.18347 2 1:56:51.59319 54 0:0:0 54 4:50:38.12301 54 12:31:35.23453 54 12:47:53.34505 54 1:26:0.45615 54 20:58:11.56677 54 7:36:5.18964 54 15:43:49.83132 54 4:25:9.01293 54 6:49:27.52375 54 2:57:52.01565 54 16:45:44.86529 54 21:30:57.82047 54 4:25:9.15395 54 6:49:27.10533 54 2:57:52.48229 54 16:45:44.65827 54 21:30:57.58219 54 22:30:4.18347 54 1:56:51.59319 681 0:0:0 681 4:50:38.12301 681 12:31:35.23453 681 12:47:53.34505 681 1:26:0.45615 681 20:58:11.56677 681 7:36:5.18964 681 15:43:49.83132 681 4:25:9.01293 681 6:49:27.52375 681 2:57:52.01565 681 16:45:44.86529 681 21:30:57.82047 681 4:25:9.15395 681 6:49:27.10533 681 2:57:52.48229 681 16:45:44.65827 681 21:30:57.58219 681 22:30:4.18347 681 1:56:51.59319 -0 0:0:0 -0 4:50:38.12301 -0 12:31:35.23453 -0 12:47:53.34505 -0 1:26:0.45615 -0 20:58:11.56677 -0 7:36:5.18964 -0 15:43:49.83132 -0 4:25:9.01293 -0 6:49:27.52375 -0 2:57:52.01565 -0 16:45:44.86529 -0 21:30:57.82047 -0 4:25:9.15395 -0 6:49:27.10533 -0 2:57:52.48229 -0 16:45:44.65827 -0 21:30:57.58219 -0 22:30:4.18347 -0 1:56:51.59319 -1 0:0:0 -1 4:50:38.12301 -1 12:31:35.23453 -1 12:47:53.34505 -1 1:26:0.45615 -1 20:58:11.56677 -1 7:36:5.18964 -1 15:43:49.83132 -1 4:25:9.01293 -1 6:49:27.52375 -1 2:57:52.01565 -1 16:45:44.86529 -1 21:30:57.82047 -1 4:25:9.15395 -1 6:49:27.10533 -1 2:57:52.48229 -1 16:45:44.65827 -1 21:30:57.58219 -1 22:30:4.18347 -1 1:56:51.59319 -2 0:0:0 -2 4:50:38.12301 -2 12:31:35.23453 -2 12:47:53.34505 -2 1:26:0.45615 -2 20:58:11.56677 -2 7:36:5.18964 -2 15:43:49.83132 -2 4:25:9.01293 -2 6:49:27.52375 -2 2:57:52.01565 -2 16:45:44.86529 -2 21:30:57.82047 -2 4:25:9.15395 -2 6:49:27.10533 -2 2:57:52.48229 -2 16:45:44.65827 -2 21:30:57.58219 -2 22:30:4.18347 -2 1:56:51.59319 -54 0:0:0 -54 4:50:38.12301 -54 12:31:35.23453 -54 12:47:53.34505 -54 1:26:0.45615 -54 20:58:11.56677 -54 7:36:5.18964 -54 15:43:49.83132 -54 4:25:9.01293 -54 6:49:27.52375 -54 2:57:52.01565 -54 16:45:44.86529 -54 21:30:57.82047 -54 4:25:9.15395 -54 6:49:27.10533 -54 2:57:52.48229 -54 16:45:44.65827 -54 21:30:57.58219 -54 22:30:4.18347 -54 1:56:51.59319 -681 0:0:0 -681 4:50:38.12301 -681 12:31:35.23453 -681 12:47:53.34505 -681 1:26:0.45615 -681 20:58:11.56677 -681 7:36:5.18964 -681 15:43:49.83132 -681 4:25:9.01293 -681 6:49:27.52375 -681 2:57:52.01565 -681 16:45:44.86529 -681 21:30:57.82047 -681 4:25:9.15395 -681 6:49:27.10533 -681 2:57:52.48229 -681 16:45:44.65827 -681 21:30:57.58219 -681 22:30:4.18347 -681 1:56:51.59319 end data. print outfile='time-out.out'/x(time5). print outfile='time-out.out'/x(time6). print outfile='time-out.out'/x(time7). print outfile='time-out.out'/x(time8). print outfile='time-out.out'/x(time9). print outfile='time-out.out'/x(time10). print outfile='time-out.out'/x(time10.1). print outfile='time-out.out'/x(time11). print outfile='time-out.out'/x(time11.1). print outfile='time-out.out'/x(time11.2). print outfile='time-out.out'/x(time12). print outfile='time-out.out'/x(time12.1). print outfile='time-out.out'/x(time12.2). print outfile='time-out.out'/x(time12.3). print outfile='time-out.out'/x(time13). print outfile='time-out.out'/x(time13.1). print outfile='time-out.out'/x(time13.2). print outfile='time-out.out'/x(time13.3). print outfile='time-out.out'/x(time13.4). print outfile='time-out.out'/x(time14). print outfile='time-out.out'/x(time14.1). print outfile='time-out.out'/x(time14.2). print outfile='time-out.out'/x(time14.3). print outfile='time-out.out'/x(time14.4). print outfile='time-out.out'/x(time14.5). print outfile='time-out.out'/x(time15). print outfile='time-out.out'/x(time15.1). print outfile='time-out.out'/x(time15.2). print outfile='time-out.out'/x(time15.3). print outfile='time-out.out'/x(time15.4). print outfile='time-out.out'/x(time15.5). print outfile='time-out.out'/x(time15.6). print outfile='time-out.out'/x(dtime8). print outfile='time-out.out'/x(dtime9). print outfile='time-out.out'/x(dtime10). print outfile='time-out.out'/x(dtime11). print outfile='time-out.out'/x(dtime12). print outfile='time-out.out'/x(dtime13). print outfile='time-out.out'/x(dtime13.1). print outfile='time-out.out'/x(dtime14). print outfile='time-out.out'/x(dtime14.1). print outfile='time-out.out'/x(dtime14.2). print outfile='time-out.out'/x(dtime15). print outfile='time-out.out'/x(dtime15.1). print outfile='time-out.out'/x(dtime15.2). print outfile='time-out.out'/x(dtime15.3). print outfile='time-out.out'/x(dtime16). print outfile='time-out.out'/x(dtime16.1). print outfile='time-out.out'/x(dtime16.2). print outfile='time-out.out'/x(dtime16.3). print outfile='time-out.out'/x(dtime16.4). print outfile='time-out.out'/x(dtime17). print outfile='time-out.out'/x(dtime17.1). print outfile='time-out.out'/x(dtime17.2). print outfile='time-out.out'/x(dtime17.3). print outfile='time-out.out'/x(dtime17.4). print outfile='time-out.out'/x(dtime17.5). print outfile='time-out.out'/x(dtime18). print outfile='time-out.out'/x(dtime18.1). print outfile='time-out.out'/x(dtime18.2). print outfile='time-out.out'/x(dtime18.3). print outfile='time-out.out'/x(dtime18.4). print outfile='time-out.out'/x(dtime18.5). print outfile='time-out.out'/x(dtime18.6). execute. ]) AT_CHECK([pspp -O format=csv time-out.sps]) AT_CHECK([cat time-out.out], [0], [dnl 0:00 0:00 0:00:00 0:00:00 0:00:00 0:00:00 0:00:00.0 0:00:00 0:00:00.0 0:00:00.00 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00.00000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00.00000 0:00:00.000000 0 00:00 0 00:00 0 00:00:00 0 00:00:00 0 00:00:00 0 00:00:00 0 00:00:00.0 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00.00000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00.00000 0 00:00:00.000000 4:50 4:50 4:50:38 4:50:38 4:50:38 4:50:38 4:50:38.1 4:50:38 4:50:38.1 4:50:38.12 4:50:38 4:50:38.1 4:50:38.12 4:50:38.123 4:50:38 4:50:38.1 4:50:38.12 4:50:38.123 4:50:38.1230 4:50:38 4:50:38.1 4:50:38.12 4:50:38.123 4:50:38.1230 4:50:38.12301 4:50:38 4:50:38.1 4:50:38.12 4:50:38.123 4:50:38.1230 4:50:38.12301 4:50:38.123010 0 04:50 0 04:50 0 04:50:38 0 04:50:38 0 04:50:38 0 04:50:38 0 04:50:38.1 0 04:50:38 0 04:50:38.1 0 04:50:38.12 0 04:50:38 0 04:50:38.1 0 04:50:38.12 0 04:50:38.123 0 04:50:38 0 04:50:38.1 0 04:50:38.12 0 04:50:38.123 0 04:50:38.1230 0 04:50:38 0 04:50:38.1 0 04:50:38.12 0 04:50:38.123 0 04:50:38.1230 0 04:50:38.12301 0 04:50:38 0 04:50:38.1 0 04:50:38.12 0 04:50:38.123 0 04:50:38.1230 0 04:50:38.12301 0 04:50:38.123010 12:31 12:31 12:31 12:31:35 12:31:35 12:31:35 12:31:35.2 12:31:35 12:31:35.2 12:31:35.23 12:31:35 12:31:35.2 12:31:35.23 12:31:35.235 12:31:35 12:31:35.2 12:31:35.23 12:31:35.235 12:31:35.2345 12:31:35 12:31:35.2 12:31:35.23 12:31:35.235 12:31:35.2345 12:31:35.23453 12:31:35 12:31:35.2 12:31:35.23 12:31:35.235 12:31:35.2345 12:31:35.23453 12:31:35.234530 0 12:31 0 12:31 0 12:31:35 0 12:31:35 0 12:31:35 0 12:31:35 0 12:31:35.2 0 12:31:35 0 12:31:35.2 0 12:31:35.23 0 12:31:35 0 12:31:35.2 0 12:31:35.23 0 12:31:35.235 0 12:31:35 0 12:31:35.2 0 12:31:35.23 0 12:31:35.235 0 12:31:35.2345 0 12:31:35 0 12:31:35.2 0 12:31:35.23 0 12:31:35.235 0 12:31:35.2345 0 12:31:35.23453 0 12:31:35 0 12:31:35.2 0 12:31:35.23 0 12:31:35.235 0 12:31:35.2345 0 12:31:35.23453 0 12:31:35.234530 12:47 12:47 12:47 12:47:53 12:47:53 12:47:53 12:47:53.3 12:47:53 12:47:53.3 12:47:53.35 12:47:53 12:47:53.3 12:47:53.35 12:47:53.345 12:47:53 12:47:53.3 12:47:53.35 12:47:53.345 12:47:53.3451 12:47:53 12:47:53.3 12:47:53.35 12:47:53.345 12:47:53.3451 12:47:53.34505 12:47:53 12:47:53.3 12:47:53.35 12:47:53.345 12:47:53.3451 12:47:53.34505 12:47:53.345050 0 12:47 0 12:47 0 12:47:53 0 12:47:53 0 12:47:53 0 12:47:53 0 12:47:53.3 0 12:47:53 0 12:47:53.3 0 12:47:53.35 0 12:47:53 0 12:47:53.3 0 12:47:53.35 0 12:47:53.345 0 12:47:53 0 12:47:53.3 0 12:47:53.35 0 12:47:53.345 0 12:47:53.3451 0 12:47:53 0 12:47:53.3 0 12:47:53.35 0 12:47:53.345 0 12:47:53.3451 0 12:47:53.34505 0 12:47:53 0 12:47:53.3 0 12:47:53.35 0 12:47:53.345 0 12:47:53.3451 0 12:47:53.34505 0 12:47:53.345050 1:26 1:26 1:26:00 1:26:00 1:26:00 1:26:00 1:26:00.5 1:26:00 1:26:00.5 1:26:00.46 1:26:00 1:26:00.5 1:26:00.46 1:26:00.456 1:26:00 1:26:00.5 1:26:00.46 1:26:00.456 1:26:00.4561 1:26:00 1:26:00.5 1:26:00.46 1:26:00.456 1:26:00.4561 1:26:00.45615 1:26:00 1:26:00.5 1:26:00.46 1:26:00.456 1:26:00.4561 1:26:00.45615 1:26:00.456150 0 01:26 0 01:26 0 01:26:00 0 01:26:00 0 01:26:00 0 01:26:00 0 01:26:00.5 0 01:26:00 0 01:26:00.5 0 01:26:00.46 0 01:26:00 0 01:26:00.5 0 01:26:00.46 0 01:26:00.456 0 01:26:00 0 01:26:00.5 0 01:26:00.46 0 01:26:00.456 0 01:26:00.4561 0 01:26:00 0 01:26:00.5 0 01:26:00.46 0 01:26:00.456 0 01:26:00.4561 0 01:26:00.45615 0 01:26:00 0 01:26:00.5 0 01:26:00.46 0 01:26:00.456 0 01:26:00.4561 0 01:26:00.45615 0 01:26:00.456150 20:58 20:58 20:58 20:58:11 20:58:11 20:58:11 20:58:11.6 20:58:11 20:58:11.6 20:58:11.57 20:58:11 20:58:11.6 20:58:11.57 20:58:11.567 20:58:11 20:58:11.6 20:58:11.57 20:58:11.567 20:58:11.5668 20:58:11 20:58:11.6 20:58:11.57 20:58:11.567 20:58:11.5668 20:58:11.56677 20:58:11 20:58:11.6 20:58:11.57 20:58:11.567 20:58:11.5668 20:58:11.56677 20:58:11.566770 0 20:58 0 20:58 0 20:58:11 0 20:58:11 0 20:58:11 0 20:58:11 0 20:58:11.6 0 20:58:11 0 20:58:11.6 0 20:58:11.57 0 20:58:11 0 20:58:11.6 0 20:58:11.57 0 20:58:11.567 0 20:58:11 0 20:58:11.6 0 20:58:11.57 0 20:58:11.567 0 20:58:11.5668 0 20:58:11 0 20:58:11.6 0 20:58:11.57 0 20:58:11.567 0 20:58:11.5668 0 20:58:11.56677 0 20:58:11 0 20:58:11.6 0 20:58:11.57 0 20:58:11.567 0 20:58:11.5668 0 20:58:11.56677 0 20:58:11.566770 7:36 7:36 7:36:05 7:36:05 7:36:05 7:36:05 7:36:05.2 7:36:05 7:36:05.2 7:36:05.19 7:36:05 7:36:05.2 7:36:05.19 7:36:05.190 7:36:05 7:36:05.2 7:36:05.19 7:36:05.190 7:36:05.1896 7:36:05 7:36:05.2 7:36:05.19 7:36:05.190 7:36:05.1896 7:36:05.18964 7:36:05 7:36:05.2 7:36:05.19 7:36:05.190 7:36:05.1896 7:36:05.18964 7:36:05.189640 0 07:36 0 07:36 0 07:36:05 0 07:36:05 0 07:36:05 0 07:36:05 0 07:36:05.2 0 07:36:05 0 07:36:05.2 0 07:36:05.19 0 07:36:05 0 07:36:05.2 0 07:36:05.19 0 07:36:05.190 0 07:36:05 0 07:36:05.2 0 07:36:05.19 0 07:36:05.190 0 07:36:05.1896 0 07:36:05 0 07:36:05.2 0 07:36:05.19 0 07:36:05.190 0 07:36:05.1896 0 07:36:05.18964 0 07:36:05 0 07:36:05.2 0 07:36:05.19 0 07:36:05.190 0 07:36:05.1896 0 07:36:05.18964 0 07:36:05.189640 15:43 15:43 15:43 15:43:49 15:43:49 15:43:49 15:43:49.8 15:43:49 15:43:49.8 15:43:49.83 15:43:49 15:43:49.8 15:43:49.83 15:43:49.831 15:43:49 15:43:49.8 15:43:49.83 15:43:49.831 15:43:49.8313 15:43:49 15:43:49.8 15:43:49.83 15:43:49.831 15:43:49.8313 15:43:49.83132 15:43:49 15:43:49.8 15:43:49.83 15:43:49.831 15:43:49.8313 15:43:49.83132 15:43:49.831320 0 15:43 0 15:43 0 15:43:49 0 15:43:49 0 15:43:49 0 15:43:49 0 15:43:49.8 0 15:43:49 0 15:43:49.8 0 15:43:49.83 0 15:43:49 0 15:43:49.8 0 15:43:49.83 0 15:43:49.831 0 15:43:49 0 15:43:49.8 0 15:43:49.83 0 15:43:49.831 0 15:43:49.8313 0 15:43:49 0 15:43:49.8 0 15:43:49.83 0 15:43:49.831 0 15:43:49.8313 0 15:43:49.83132 0 15:43:49 0 15:43:49.8 0 15:43:49.83 0 15:43:49.831 0 15:43:49.8313 0 15:43:49.83132 0 15:43:49.831320 4:25 4:25 4:25:09 4:25:09 4:25:09 4:25:09 4:25:09.0 4:25:09 4:25:09.0 4:25:09.01 4:25:09 4:25:09.0 4:25:09.01 4:25:09.013 4:25:09 4:25:09.0 4:25:09.01 4:25:09.013 4:25:09.0129 4:25:09 4:25:09.0 4:25:09.01 4:25:09.013 4:25:09.0129 4:25:09.01293 4:25:09 4:25:09.0 4:25:09.01 4:25:09.013 4:25:09.0129 4:25:09.01293 4:25:09.012930 0 04:25 0 04:25 0 04:25:09 0 04:25:09 0 04:25:09 0 04:25:09 0 04:25:09.0 0 04:25:09 0 04:25:09.0 0 04:25:09.01 0 04:25:09 0 04:25:09.0 0 04:25:09.01 0 04:25:09.013 0 04:25:09 0 04:25:09.0 0 04:25:09.01 0 04:25:09.013 0 04:25:09.0129 0 04:25:09 0 04:25:09.0 0 04:25:09.01 0 04:25:09.013 0 04:25:09.0129 0 04:25:09.01293 0 04:25:09 0 04:25:09.0 0 04:25:09.01 0 04:25:09.013 0 04:25:09.0129 0 04:25:09.01293 0 04:25:09.012930 6:49 6:49 6:49:27 6:49:27 6:49:27 6:49:27 6:49:27.5 6:49:27 6:49:27.5 6:49:27.52 6:49:27 6:49:27.5 6:49:27.52 6:49:27.524 6:49:27 6:49:27.5 6:49:27.52 6:49:27.524 6:49:27.5238 6:49:27 6:49:27.5 6:49:27.52 6:49:27.524 6:49:27.5238 6:49:27.52375 6:49:27 6:49:27.5 6:49:27.52 6:49:27.524 6:49:27.5238 6:49:27.52375 6:49:27.523750 0 06:49 0 06:49 0 06:49:27 0 06:49:27 0 06:49:27 0 06:49:27 0 06:49:27.5 0 06:49:27 0 06:49:27.5 0 06:49:27.52 0 06:49:27 0 06:49:27.5 0 06:49:27.52 0 06:49:27.524 0 06:49:27 0 06:49:27.5 0 06:49:27.52 0 06:49:27.524 0 06:49:27.5238 0 06:49:27 0 06:49:27.5 0 06:49:27.52 0 06:49:27.524 0 06:49:27.5238 0 06:49:27.52375 0 06:49:27 0 06:49:27.5 0 06:49:27.52 0 06:49:27.524 0 06:49:27.5238 0 06:49:27.52375 0 06:49:27.523750 2:57 2:57 2:57:52 2:57:52 2:57:52 2:57:52 2:57:52.0 2:57:52 2:57:52.0 2:57:52.02 2:57:52 2:57:52.0 2:57:52.02 2:57:52.016 2:57:52 2:57:52.0 2:57:52.02 2:57:52.016 2:57:52.0156 2:57:52 2:57:52.0 2:57:52.02 2:57:52.016 2:57:52.0156 2:57:52.01565 2:57:52 2:57:52.0 2:57:52.02 2:57:52.016 2:57:52.0156 2:57:52.01565 2:57:52.015650 0 02:57 0 02:57 0 02:57:52 0 02:57:52 0 02:57:52 0 02:57:52 0 02:57:52.0 0 02:57:52 0 02:57:52.0 0 02:57:52.02 0 02:57:52 0 02:57:52.0 0 02:57:52.02 0 02:57:52.016 0 02:57:52 0 02:57:52.0 0 02:57:52.02 0 02:57:52.016 0 02:57:52.0156 0 02:57:52 0 02:57:52.0 0 02:57:52.02 0 02:57:52.016 0 02:57:52.0156 0 02:57:52.01565 0 02:57:52 0 02:57:52.0 0 02:57:52.02 0 02:57:52.016 0 02:57:52.0156 0 02:57:52.01565 0 02:57:52.015650 16:45 16:45 16:45 16:45:44 16:45:44 16:45:44 16:45:44.9 16:45:44 16:45:44.9 16:45:44.87 16:45:44 16:45:44.9 16:45:44.87 16:45:44.865 16:45:44 16:45:44.9 16:45:44.87 16:45:44.865 16:45:44.8653 16:45:44 16:45:44.9 16:45:44.87 16:45:44.865 16:45:44.8653 16:45:44.86529 16:45:44 16:45:44.9 16:45:44.87 16:45:44.865 16:45:44.8653 16:45:44.86529 16:45:44.865290 0 16:45 0 16:45 0 16:45:44 0 16:45:44 0 16:45:44 0 16:45:44 0 16:45:44.9 0 16:45:44 0 16:45:44.9 0 16:45:44.87 0 16:45:44 0 16:45:44.9 0 16:45:44.87 0 16:45:44.865 0 16:45:44 0 16:45:44.9 0 16:45:44.87 0 16:45:44.865 0 16:45:44.8653 0 16:45:44 0 16:45:44.9 0 16:45:44.87 0 16:45:44.865 0 16:45:44.8653 0 16:45:44.86529 0 16:45:44 0 16:45:44.9 0 16:45:44.87 0 16:45:44.865 0 16:45:44.8653 0 16:45:44.86529 0 16:45:44.865290 21:30 21:30 21:30 21:30:57 21:30:57 21:30:57 21:30:57.8 21:30:57 21:30:57.8 21:30:57.82 21:30:57 21:30:57.8 21:30:57.82 21:30:57.820 21:30:57 21:30:57.8 21:30:57.82 21:30:57.820 21:30:57.8205 21:30:57 21:30:57.8 21:30:57.82 21:30:57.820 21:30:57.8205 21:30:57.82047 21:30:57 21:30:57.8 21:30:57.82 21:30:57.820 21:30:57.8205 21:30:57.82047 21:30:57.820470 0 21:30 0 21:30 0 21:30:57 0 21:30:57 0 21:30:57 0 21:30:57 0 21:30:57.8 0 21:30:57 0 21:30:57.8 0 21:30:57.82 0 21:30:57 0 21:30:57.8 0 21:30:57.82 0 21:30:57.820 0 21:30:57 0 21:30:57.8 0 21:30:57.82 0 21:30:57.820 0 21:30:57.8205 0 21:30:57 0 21:30:57.8 0 21:30:57.82 0 21:30:57.820 0 21:30:57.8205 0 21:30:57.82047 0 21:30:57 0 21:30:57.8 0 21:30:57.82 0 21:30:57.820 0 21:30:57.8205 0 21:30:57.82047 0 21:30:57.820470 4:25 4:25 4:25:09 4:25:09 4:25:09 4:25:09 4:25:09.2 4:25:09 4:25:09.2 4:25:09.15 4:25:09 4:25:09.2 4:25:09.15 4:25:09.154 4:25:09 4:25:09.2 4:25:09.15 4:25:09.154 4:25:09.1539 4:25:09 4:25:09.2 4:25:09.15 4:25:09.154 4:25:09.1539 4:25:09.15395 4:25:09 4:25:09.2 4:25:09.15 4:25:09.154 4:25:09.1539 4:25:09.15395 4:25:09.153950 0 04:25 0 04:25 0 04:25:09 0 04:25:09 0 04:25:09 0 04:25:09 0 04:25:09.2 0 04:25:09 0 04:25:09.2 0 04:25:09.15 0 04:25:09 0 04:25:09.2 0 04:25:09.15 0 04:25:09.154 0 04:25:09 0 04:25:09.2 0 04:25:09.15 0 04:25:09.154 0 04:25:09.1539 0 04:25:09 0 04:25:09.2 0 04:25:09.15 0 04:25:09.154 0 04:25:09.1539 0 04:25:09.15395 0 04:25:09 0 04:25:09.2 0 04:25:09.15 0 04:25:09.154 0 04:25:09.1539 0 04:25:09.15395 0 04:25:09.153950 6:49 6:49 6:49:27 6:49:27 6:49:27 6:49:27 6:49:27.1 6:49:27 6:49:27.1 6:49:27.11 6:49:27 6:49:27.1 6:49:27.11 6:49:27.105 6:49:27 6:49:27.1 6:49:27.11 6:49:27.105 6:49:27.1053 6:49:27 6:49:27.1 6:49:27.11 6:49:27.105 6:49:27.1053 6:49:27.10533 6:49:27 6:49:27.1 6:49:27.11 6:49:27.105 6:49:27.1053 6:49:27.10533 6:49:27.105330 0 06:49 0 06:49 0 06:49:27 0 06:49:27 0 06:49:27 0 06:49:27 0 06:49:27.1 0 06:49:27 0 06:49:27.1 0 06:49:27.11 0 06:49:27 0 06:49:27.1 0 06:49:27.11 0 06:49:27.105 0 06:49:27 0 06:49:27.1 0 06:49:27.11 0 06:49:27.105 0 06:49:27.1053 0 06:49:27 0 06:49:27.1 0 06:49:27.11 0 06:49:27.105 0 06:49:27.1053 0 06:49:27.10533 0 06:49:27 0 06:49:27.1 0 06:49:27.11 0 06:49:27.105 0 06:49:27.1053 0 06:49:27.10533 0 06:49:27.105330 2:57 2:57 2:57:52 2:57:52 2:57:52 2:57:52 2:57:52.5 2:57:52 2:57:52.5 2:57:52.48 2:57:52 2:57:52.5 2:57:52.48 2:57:52.482 2:57:52 2:57:52.5 2:57:52.48 2:57:52.482 2:57:52.4823 2:57:52 2:57:52.5 2:57:52.48 2:57:52.482 2:57:52.4823 2:57:52.48229 2:57:52 2:57:52.5 2:57:52.48 2:57:52.482 2:57:52.4823 2:57:52.48229 2:57:52.482290 0 02:57 0 02:57 0 02:57:52 0 02:57:52 0 02:57:52 0 02:57:52 0 02:57:52.5 0 02:57:52 0 02:57:52.5 0 02:57:52.48 0 02:57:52 0 02:57:52.5 0 02:57:52.48 0 02:57:52.482 0 02:57:52 0 02:57:52.5 0 02:57:52.48 0 02:57:52.482 0 02:57:52.4823 0 02:57:52 0 02:57:52.5 0 02:57:52.48 0 02:57:52.482 0 02:57:52.4823 0 02:57:52.48229 0 02:57:52 0 02:57:52.5 0 02:57:52.48 0 02:57:52.482 0 02:57:52.4823 0 02:57:52.48229 0 02:57:52.482290 16:45 16:45 16:45 16:45:44 16:45:44 16:45:44 16:45:44.7 16:45:44 16:45:44.7 16:45:44.66 16:45:44 16:45:44.7 16:45:44.66 16:45:44.658 16:45:44 16:45:44.7 16:45:44.66 16:45:44.658 16:45:44.6583 16:45:44 16:45:44.7 16:45:44.66 16:45:44.658 16:45:44.6583 16:45:44.65827 16:45:44 16:45:44.7 16:45:44.66 16:45:44.658 16:45:44.6583 16:45:44.65827 16:45:44.658270 0 16:45 0 16:45 0 16:45:44 0 16:45:44 0 16:45:44 0 16:45:44 0 16:45:44.7 0 16:45:44 0 16:45:44.7 0 16:45:44.66 0 16:45:44 0 16:45:44.7 0 16:45:44.66 0 16:45:44.658 0 16:45:44 0 16:45:44.7 0 16:45:44.66 0 16:45:44.658 0 16:45:44.6583 0 16:45:44 0 16:45:44.7 0 16:45:44.66 0 16:45:44.658 0 16:45:44.6583 0 16:45:44.65827 0 16:45:44 0 16:45:44.7 0 16:45:44.66 0 16:45:44.658 0 16:45:44.6583 0 16:45:44.65827 0 16:45:44.658270 21:30 21:30 21:30 21:30:57 21:30:57 21:30:57 21:30:57.6 21:30:57 21:30:57.6 21:30:57.58 21:30:57 21:30:57.6 21:30:57.58 21:30:57.582 21:30:57 21:30:57.6 21:30:57.58 21:30:57.582 21:30:57.5822 21:30:57 21:30:57.6 21:30:57.58 21:30:57.582 21:30:57.5822 21:30:57.58219 21:30:57 21:30:57.6 21:30:57.58 21:30:57.582 21:30:57.5822 21:30:57.58219 21:30:57.582190 0 21:30 0 21:30 0 21:30:57 0 21:30:57 0 21:30:57 0 21:30:57 0 21:30:57.6 0 21:30:57 0 21:30:57.6 0 21:30:57.58 0 21:30:57 0 21:30:57.6 0 21:30:57.58 0 21:30:57.582 0 21:30:57 0 21:30:57.6 0 21:30:57.58 0 21:30:57.582 0 21:30:57.5822 0 21:30:57 0 21:30:57.6 0 21:30:57.58 0 21:30:57.582 0 21:30:57.5822 0 21:30:57.58219 0 21:30:57 0 21:30:57.6 0 21:30:57.58 0 21:30:57.582 0 21:30:57.5822 0 21:30:57.58219 0 21:30:57.582190 22:30 22:30 22:30 22:30:04 22:30:04 22:30:04 22:30:04.2 22:30:04 22:30:04.2 22:30:04.18 22:30:04 22:30:04.2 22:30:04.18 22:30:04.183 22:30:04 22:30:04.2 22:30:04.18 22:30:04.183 22:30:04.1835 22:30:04 22:30:04.2 22:30:04.18 22:30:04.183 22:30:04.1835 22:30:04.18347 22:30:04 22:30:04.2 22:30:04.18 22:30:04.183 22:30:04.1835 22:30:04.18347 22:30:04.183470 0 22:30 0 22:30 0 22:30:04 0 22:30:04 0 22:30:04 0 22:30:04 0 22:30:04.2 0 22:30:04 0 22:30:04.2 0 22:30:04.18 0 22:30:04 0 22:30:04.2 0 22:30:04.18 0 22:30:04.183 0 22:30:04 0 22:30:04.2 0 22:30:04.18 0 22:30:04.183 0 22:30:04.1835 0 22:30:04 0 22:30:04.2 0 22:30:04.18 0 22:30:04.183 0 22:30:04.1835 0 22:30:04.18347 0 22:30:04 0 22:30:04.2 0 22:30:04.18 0 22:30:04.183 0 22:30:04.1835 0 22:30:04.18347 0 22:30:04.183470 1:56 1:56 1:56:51 1:56:51 1:56:51 1:56:51 1:56:51.6 1:56:51 1:56:51.6 1:56:51.59 1:56:51 1:56:51.6 1:56:51.59 1:56:51.593 1:56:51 1:56:51.6 1:56:51.59 1:56:51.593 1:56:51.5932 1:56:51 1:56:51.6 1:56:51.59 1:56:51.593 1:56:51.5932 1:56:51.59319 1:56:51 1:56:51.6 1:56:51.59 1:56:51.593 1:56:51.5932 1:56:51.59319 1:56:51.593190 0 01:56 0 01:56 0 01:56:51 0 01:56:51 0 01:56:51 0 01:56:51 0 01:56:51.6 0 01:56:51 0 01:56:51.6 0 01:56:51.59 0 01:56:51 0 01:56:51.6 0 01:56:51.59 0 01:56:51.593 0 01:56:51 0 01:56:51.6 0 01:56:51.59 0 01:56:51.593 0 01:56:51.5932 0 01:56:51 0 01:56:51.6 0 01:56:51.59 0 01:56:51.593 0 01:56:51.5932 0 01:56:51.59319 0 01:56:51 0 01:56:51.6 0 01:56:51.59 0 01:56:51.593 0 01:56:51.5932 0 01:56:51.59319 0 01:56:51.593190 24:00 24:00 24:00 24:00:00 24:00:00 24:00:00 24:00:00.0 24:00:00 24:00:00.0 24:00:00.00 24:00:00 24:00:00.0 24:00:00.00 24:00:00.000 24:00:00 24:00:00.0 24:00:00.00 24:00:00.000 24:00:00.0000 24:00:00 24:00:00.0 24:00:00.00 24:00:00.000 24:00:00.0000 24:00:00.00000 24:00:00 24:00:00.0 24:00:00.00 24:00:00.000 24:00:00.0000 24:00:00.00000 24:00:00.000000 1 00:00 1 00:00 1 00:00:00 1 00:00:00 1 00:00:00 1 00:00:00 1 00:00:00.0 1 00:00:00 1 00:00:00.0 1 00:00:00.00 1 00:00:00 1 00:00:00.0 1 00:00:00.00 1 00:00:00.000 1 00:00:00 1 00:00:00.0 1 00:00:00.00 1 00:00:00.000 1 00:00:00.0000 1 00:00:00 1 00:00:00.0 1 00:00:00.00 1 00:00:00.000 1 00:00:00.0000 1 00:00:00.00000 1 00:00:00 1 00:00:00.0 1 00:00:00.00 1 00:00:00.000 1 00:00:00.0000 1 00:00:00.00000 1 00:00:00.000000 28:50 28:50 28:50 28:50:38 28:50:38 28:50:38 28:50:38.1 28:50:38 28:50:38.1 28:50:38.12 28:50:38 28:50:38.1 28:50:38.12 28:50:38.123 28:50:38 28:50:38.1 28:50:38.12 28:50:38.123 28:50:38.1230 28:50:38 28:50:38.1 28:50:38.12 28:50:38.123 28:50:38.1230 28:50:38.12301 28:50:38 28:50:38.1 28:50:38.12 28:50:38.123 28:50:38.1230 28:50:38.12301 28:50:38.123010 1 04:50 1 04:50 1 04:50:38 1 04:50:38 1 04:50:38 1 04:50:38 1 04:50:38.1 1 04:50:38 1 04:50:38.1 1 04:50:38.12 1 04:50:38 1 04:50:38.1 1 04:50:38.12 1 04:50:38.123 1 04:50:38 1 04:50:38.1 1 04:50:38.12 1 04:50:38.123 1 04:50:38.1230 1 04:50:38 1 04:50:38.1 1 04:50:38.12 1 04:50:38.123 1 04:50:38.1230 1 04:50:38.12301 1 04:50:38 1 04:50:38.1 1 04:50:38.12 1 04:50:38.123 1 04:50:38.1230 1 04:50:38.12301 1 04:50:38.123010 36:31 36:31 36:31 36:31:35 36:31:35 36:31:35 36:31:35.2 36:31:35 36:31:35.2 36:31:35.23 36:31:35 36:31:35.2 36:31:35.23 36:31:35.235 36:31:35 36:31:35.2 36:31:35.23 36:31:35.235 36:31:35.2345 36:31:35 36:31:35.2 36:31:35.23 36:31:35.235 36:31:35.2345 36:31:35.23453 36:31:35 36:31:35.2 36:31:35.23 36:31:35.235 36:31:35.2345 36:31:35.23453 36:31:35.234530 1 12:31 1 12:31 1 12:31:35 1 12:31:35 1 12:31:35 1 12:31:35 1 12:31:35.2 1 12:31:35 1 12:31:35.2 1 12:31:35.23 1 12:31:35 1 12:31:35.2 1 12:31:35.23 1 12:31:35.235 1 12:31:35 1 12:31:35.2 1 12:31:35.23 1 12:31:35.235 1 12:31:35.2345 1 12:31:35 1 12:31:35.2 1 12:31:35.23 1 12:31:35.235 1 12:31:35.2345 1 12:31:35.23453 1 12:31:35 1 12:31:35.2 1 12:31:35.23 1 12:31:35.235 1 12:31:35.2345 1 12:31:35.23453 1 12:31:35.234530 36:47 36:47 36:47 36:47:53 36:47:53 36:47:53 36:47:53.3 36:47:53 36:47:53.3 36:47:53.35 36:47:53 36:47:53.3 36:47:53.35 36:47:53.345 36:47:53 36:47:53.3 36:47:53.35 36:47:53.345 36:47:53.3451 36:47:53 36:47:53.3 36:47:53.35 36:47:53.345 36:47:53.3451 36:47:53.34505 36:47:53 36:47:53.3 36:47:53.35 36:47:53.345 36:47:53.3451 36:47:53.34505 36:47:53.345050 1 12:47 1 12:47 1 12:47:53 1 12:47:53 1 12:47:53 1 12:47:53 1 12:47:53.3 1 12:47:53 1 12:47:53.3 1 12:47:53.35 1 12:47:53 1 12:47:53.3 1 12:47:53.35 1 12:47:53.345 1 12:47:53 1 12:47:53.3 1 12:47:53.35 1 12:47:53.345 1 12:47:53.3451 1 12:47:53 1 12:47:53.3 1 12:47:53.35 1 12:47:53.345 1 12:47:53.3451 1 12:47:53.34505 1 12:47:53 1 12:47:53.3 1 12:47:53.35 1 12:47:53.345 1 12:47:53.3451 1 12:47:53.34505 1 12:47:53.345050 25:26 25:26 25:26 25:26:00 25:26:00 25:26:00 25:26:00.5 25:26:00 25:26:00.5 25:26:00.46 25:26:00 25:26:00.5 25:26:00.46 25:26:00.456 25:26:00 25:26:00.5 25:26:00.46 25:26:00.456 25:26:00.4561 25:26:00 25:26:00.5 25:26:00.46 25:26:00.456 25:26:00.4561 25:26:00.45615 25:26:00 25:26:00.5 25:26:00.46 25:26:00.456 25:26:00.4561 25:26:00.45615 25:26:00.456150 1 01:26 1 01:26 1 01:26:00 1 01:26:00 1 01:26:00 1 01:26:00 1 01:26:00.5 1 01:26:00 1 01:26:00.5 1 01:26:00.46 1 01:26:00 1 01:26:00.5 1 01:26:00.46 1 01:26:00.456 1 01:26:00 1 01:26:00.5 1 01:26:00.46 1 01:26:00.456 1 01:26:00.4561 1 01:26:00 1 01:26:00.5 1 01:26:00.46 1 01:26:00.456 1 01:26:00.4561 1 01:26:00.45615 1 01:26:00 1 01:26:00.5 1 01:26:00.46 1 01:26:00.456 1 01:26:00.4561 1 01:26:00.45615 1 01:26:00.456150 44:58 44:58 44:58 44:58:11 44:58:11 44:58:11 44:58:11.6 44:58:11 44:58:11.6 44:58:11.57 44:58:11 44:58:11.6 44:58:11.57 44:58:11.567 44:58:11 44:58:11.6 44:58:11.57 44:58:11.567 44:58:11.5668 44:58:11 44:58:11.6 44:58:11.57 44:58:11.567 44:58:11.5668 44:58:11.56677 44:58:11 44:58:11.6 44:58:11.57 44:58:11.567 44:58:11.5668 44:58:11.56677 44:58:11.566770 1 20:58 1 20:58 1 20:58:11 1 20:58:11 1 20:58:11 1 20:58:11 1 20:58:11.6 1 20:58:11 1 20:58:11.6 1 20:58:11.57 1 20:58:11 1 20:58:11.6 1 20:58:11.57 1 20:58:11.567 1 20:58:11 1 20:58:11.6 1 20:58:11.57 1 20:58:11.567 1 20:58:11.5668 1 20:58:11 1 20:58:11.6 1 20:58:11.57 1 20:58:11.567 1 20:58:11.5668 1 20:58:11.56677 1 20:58:11 1 20:58:11.6 1 20:58:11.57 1 20:58:11.567 1 20:58:11.5668 1 20:58:11.56677 1 20:58:11.566770 31:36 31:36 31:36 31:36:05 31:36:05 31:36:05 31:36:05.2 31:36:05 31:36:05.2 31:36:05.19 31:36:05 31:36:05.2 31:36:05.19 31:36:05.190 31:36:05 31:36:05.2 31:36:05.19 31:36:05.190 31:36:05.1896 31:36:05 31:36:05.2 31:36:05.19 31:36:05.190 31:36:05.1896 31:36:05.18964 31:36:05 31:36:05.2 31:36:05.19 31:36:05.190 31:36:05.1896 31:36:05.18964 31:36:05.189640 1 07:36 1 07:36 1 07:36:05 1 07:36:05 1 07:36:05 1 07:36:05 1 07:36:05.2 1 07:36:05 1 07:36:05.2 1 07:36:05.19 1 07:36:05 1 07:36:05.2 1 07:36:05.19 1 07:36:05.190 1 07:36:05 1 07:36:05.2 1 07:36:05.19 1 07:36:05.190 1 07:36:05.1896 1 07:36:05 1 07:36:05.2 1 07:36:05.19 1 07:36:05.190 1 07:36:05.1896 1 07:36:05.18964 1 07:36:05 1 07:36:05.2 1 07:36:05.19 1 07:36:05.190 1 07:36:05.1896 1 07:36:05.18964 1 07:36:05.189640 39:43 39:43 39:43 39:43:49 39:43:49 39:43:49 39:43:49.8 39:43:49 39:43:49.8 39:43:49.83 39:43:49 39:43:49.8 39:43:49.83 39:43:49.831 39:43:49 39:43:49.8 39:43:49.83 39:43:49.831 39:43:49.8313 39:43:49 39:43:49.8 39:43:49.83 39:43:49.831 39:43:49.8313 39:43:49.83132 39:43:49 39:43:49.8 39:43:49.83 39:43:49.831 39:43:49.8313 39:43:49.83132 39:43:49.831320 1 15:43 1 15:43 1 15:43:49 1 15:43:49 1 15:43:49 1 15:43:49 1 15:43:49.8 1 15:43:49 1 15:43:49.8 1 15:43:49.83 1 15:43:49 1 15:43:49.8 1 15:43:49.83 1 15:43:49.831 1 15:43:49 1 15:43:49.8 1 15:43:49.83 1 15:43:49.831 1 15:43:49.8313 1 15:43:49 1 15:43:49.8 1 15:43:49.83 1 15:43:49.831 1 15:43:49.8313 1 15:43:49.83132 1 15:43:49 1 15:43:49.8 1 15:43:49.83 1 15:43:49.831 1 15:43:49.8313 1 15:43:49.83132 1 15:43:49.831320 28:25 28:25 28:25 28:25:09 28:25:09 28:25:09 28:25:09.0 28:25:09 28:25:09.0 28:25:09.01 28:25:09 28:25:09.0 28:25:09.01 28:25:09.013 28:25:09 28:25:09.0 28:25:09.01 28:25:09.013 28:25:09.0129 28:25:09 28:25:09.0 28:25:09.01 28:25:09.013 28:25:09.0129 28:25:09.01293 28:25:09 28:25:09.0 28:25:09.01 28:25:09.013 28:25:09.0129 28:25:09.01293 28:25:09.012930 1 04:25 1 04:25 1 04:25:09 1 04:25:09 1 04:25:09 1 04:25:09 1 04:25:09.0 1 04:25:09 1 04:25:09.0 1 04:25:09.01 1 04:25:09 1 04:25:09.0 1 04:25:09.01 1 04:25:09.013 1 04:25:09 1 04:25:09.0 1 04:25:09.01 1 04:25:09.013 1 04:25:09.0129 1 04:25:09 1 04:25:09.0 1 04:25:09.01 1 04:25:09.013 1 04:25:09.0129 1 04:25:09.01293 1 04:25:09 1 04:25:09.0 1 04:25:09.01 1 04:25:09.013 1 04:25:09.0129 1 04:25:09.01293 1 04:25:09.012930 30:49 30:49 30:49 30:49:27 30:49:27 30:49:27 30:49:27.5 30:49:27 30:49:27.5 30:49:27.52 30:49:27 30:49:27.5 30:49:27.52 30:49:27.524 30:49:27 30:49:27.5 30:49:27.52 30:49:27.524 30:49:27.5237 30:49:27 30:49:27.5 30:49:27.52 30:49:27.524 30:49:27.5237 30:49:27.52375 30:49:27 30:49:27.5 30:49:27.52 30:49:27.524 30:49:27.5237 30:49:27.52375 30:49:27.523750 1 06:49 1 06:49 1 06:49:27 1 06:49:27 1 06:49:27 1 06:49:27 1 06:49:27.5 1 06:49:27 1 06:49:27.5 1 06:49:27.52 1 06:49:27 1 06:49:27.5 1 06:49:27.52 1 06:49:27.524 1 06:49:27 1 06:49:27.5 1 06:49:27.52 1 06:49:27.524 1 06:49:27.5237 1 06:49:27 1 06:49:27.5 1 06:49:27.52 1 06:49:27.524 1 06:49:27.5237 1 06:49:27.52375 1 06:49:27 1 06:49:27.5 1 06:49:27.52 1 06:49:27.524 1 06:49:27.5237 1 06:49:27.52375 1 06:49:27.523750 26:57 26:57 26:57 26:57:52 26:57:52 26:57:52 26:57:52.0 26:57:52 26:57:52.0 26:57:52.02 26:57:52 26:57:52.0 26:57:52.02 26:57:52.016 26:57:52 26:57:52.0 26:57:52.02 26:57:52.016 26:57:52.0157 26:57:52 26:57:52.0 26:57:52.02 26:57:52.016 26:57:52.0157 26:57:52.01565 26:57:52 26:57:52.0 26:57:52.02 26:57:52.016 26:57:52.0157 26:57:52.01565 26:57:52.015650 1 02:57 1 02:57 1 02:57:52 1 02:57:52 1 02:57:52 1 02:57:52 1 02:57:52.0 1 02:57:52 1 02:57:52.0 1 02:57:52.02 1 02:57:52 1 02:57:52.0 1 02:57:52.02 1 02:57:52.016 1 02:57:52 1 02:57:52.0 1 02:57:52.02 1 02:57:52.016 1 02:57:52.0157 1 02:57:52 1 02:57:52.0 1 02:57:52.02 1 02:57:52.016 1 02:57:52.0157 1 02:57:52.01565 1 02:57:52 1 02:57:52.0 1 02:57:52.02 1 02:57:52.016 1 02:57:52.0157 1 02:57:52.01565 1 02:57:52.015650 40:45 40:45 40:45 40:45:44 40:45:44 40:45:44 40:45:44.9 40:45:44 40:45:44.9 40:45:44.87 40:45:44 40:45:44.9 40:45:44.87 40:45:44.865 40:45:44 40:45:44.9 40:45:44.87 40:45:44.865 40:45:44.8653 40:45:44 40:45:44.9 40:45:44.87 40:45:44.865 40:45:44.8653 40:45:44.86529 40:45:44 40:45:44.9 40:45:44.87 40:45:44.865 40:45:44.8653 40:45:44.86529 40:45:44.865290 1 16:45 1 16:45 1 16:45:44 1 16:45:44 1 16:45:44 1 16:45:44 1 16:45:44.9 1 16:45:44 1 16:45:44.9 1 16:45:44.87 1 16:45:44 1 16:45:44.9 1 16:45:44.87 1 16:45:44.865 1 16:45:44 1 16:45:44.9 1 16:45:44.87 1 16:45:44.865 1 16:45:44.8653 1 16:45:44 1 16:45:44.9 1 16:45:44.87 1 16:45:44.865 1 16:45:44.8653 1 16:45:44.86529 1 16:45:44 1 16:45:44.9 1 16:45:44.87 1 16:45:44.865 1 16:45:44.8653 1 16:45:44.86529 1 16:45:44.865290 45:30 45:30 45:30 45:30:57 45:30:57 45:30:57 45:30:57.8 45:30:57 45:30:57.8 45:30:57.82 45:30:57 45:30:57.8 45:30:57.82 45:30:57.820 45:30:57 45:30:57.8 45:30:57.82 45:30:57.820 45:30:57.8205 45:30:57 45:30:57.8 45:30:57.82 45:30:57.820 45:30:57.8205 45:30:57.82047 45:30:57 45:30:57.8 45:30:57.82 45:30:57.820 45:30:57.8205 45:30:57.82047 45:30:57.820470 1 21:30 1 21:30 1 21:30:57 1 21:30:57 1 21:30:57 1 21:30:57 1 21:30:57.8 1 21:30:57 1 21:30:57.8 1 21:30:57.82 1 21:30:57 1 21:30:57.8 1 21:30:57.82 1 21:30:57.820 1 21:30:57 1 21:30:57.8 1 21:30:57.82 1 21:30:57.820 1 21:30:57.8205 1 21:30:57 1 21:30:57.8 1 21:30:57.82 1 21:30:57.820 1 21:30:57.8205 1 21:30:57.82047 1 21:30:57 1 21:30:57.8 1 21:30:57.82 1 21:30:57.820 1 21:30:57.8205 1 21:30:57.82047 1 21:30:57.820470 28:25 28:25 28:25 28:25:09 28:25:09 28:25:09 28:25:09.2 28:25:09 28:25:09.2 28:25:09.15 28:25:09 28:25:09.2 28:25:09.15 28:25:09.154 28:25:09 28:25:09.2 28:25:09.15 28:25:09.154 28:25:09.1540 28:25:09 28:25:09.2 28:25:09.15 28:25:09.154 28:25:09.1540 28:25:09.15395 28:25:09 28:25:09.2 28:25:09.15 28:25:09.154 28:25:09.1540 28:25:09.15395 28:25:09.153950 1 04:25 1 04:25 1 04:25:09 1 04:25:09 1 04:25:09 1 04:25:09 1 04:25:09.2 1 04:25:09 1 04:25:09.2 1 04:25:09.15 1 04:25:09 1 04:25:09.2 1 04:25:09.15 1 04:25:09.154 1 04:25:09 1 04:25:09.2 1 04:25:09.15 1 04:25:09.154 1 04:25:09.1540 1 04:25:09 1 04:25:09.2 1 04:25:09.15 1 04:25:09.154 1 04:25:09.1540 1 04:25:09.15395 1 04:25:09 1 04:25:09.2 1 04:25:09.15 1 04:25:09.154 1 04:25:09.1540 1 04:25:09.15395 1 04:25:09.153950 30:49 30:49 30:49 30:49:27 30:49:27 30:49:27 30:49:27.1 30:49:27 30:49:27.1 30:49:27.11 30:49:27 30:49:27.1 30:49:27.11 30:49:27.105 30:49:27 30:49:27.1 30:49:27.11 30:49:27.105 30:49:27.1053 30:49:27 30:49:27.1 30:49:27.11 30:49:27.105 30:49:27.1053 30:49:27.10533 30:49:27 30:49:27.1 30:49:27.11 30:49:27.105 30:49:27.1053 30:49:27.10533 30:49:27.105330 1 06:49 1 06:49 1 06:49:27 1 06:49:27 1 06:49:27 1 06:49:27 1 06:49:27.1 1 06:49:27 1 06:49:27.1 1 06:49:27.11 1 06:49:27 1 06:49:27.1 1 06:49:27.11 1 06:49:27.105 1 06:49:27 1 06:49:27.1 1 06:49:27.11 1 06:49:27.105 1 06:49:27.1053 1 06:49:27 1 06:49:27.1 1 06:49:27.11 1 06:49:27.105 1 06:49:27.1053 1 06:49:27.10533 1 06:49:27 1 06:49:27.1 1 06:49:27.11 1 06:49:27.105 1 06:49:27.1053 1 06:49:27.10533 1 06:49:27.105330 26:57 26:57 26:57 26:57:52 26:57:52 26:57:52 26:57:52.5 26:57:52 26:57:52.5 26:57:52.48 26:57:52 26:57:52.5 26:57:52.48 26:57:52.482 26:57:52 26:57:52.5 26:57:52.48 26:57:52.482 26:57:52.4823 26:57:52 26:57:52.5 26:57:52.48 26:57:52.482 26:57:52.4823 26:57:52.48229 26:57:52 26:57:52.5 26:57:52.48 26:57:52.482 26:57:52.4823 26:57:52.48229 26:57:52.482290 1 02:57 1 02:57 1 02:57:52 1 02:57:52 1 02:57:52 1 02:57:52 1 02:57:52.5 1 02:57:52 1 02:57:52.5 1 02:57:52.48 1 02:57:52 1 02:57:52.5 1 02:57:52.48 1 02:57:52.482 1 02:57:52 1 02:57:52.5 1 02:57:52.48 1 02:57:52.482 1 02:57:52.4823 1 02:57:52 1 02:57:52.5 1 02:57:52.48 1 02:57:52.482 1 02:57:52.4823 1 02:57:52.48229 1 02:57:52 1 02:57:52.5 1 02:57:52.48 1 02:57:52.482 1 02:57:52.4823 1 02:57:52.48229 1 02:57:52.482290 40:45 40:45 40:45 40:45:44 40:45:44 40:45:44 40:45:44.7 40:45:44 40:45:44.7 40:45:44.66 40:45:44 40:45:44.7 40:45:44.66 40:45:44.658 40:45:44 40:45:44.7 40:45:44.66 40:45:44.658 40:45:44.6583 40:45:44 40:45:44.7 40:45:44.66 40:45:44.658 40:45:44.6583 40:45:44.65827 40:45:44 40:45:44.7 40:45:44.66 40:45:44.658 40:45:44.6583 40:45:44.65827 40:45:44.658270 1 16:45 1 16:45 1 16:45:44 1 16:45:44 1 16:45:44 1 16:45:44 1 16:45:44.7 1 16:45:44 1 16:45:44.7 1 16:45:44.66 1 16:45:44 1 16:45:44.7 1 16:45:44.66 1 16:45:44.658 1 16:45:44 1 16:45:44.7 1 16:45:44.66 1 16:45:44.658 1 16:45:44.6583 1 16:45:44 1 16:45:44.7 1 16:45:44.66 1 16:45:44.658 1 16:45:44.6583 1 16:45:44.65827 1 16:45:44 1 16:45:44.7 1 16:45:44.66 1 16:45:44.658 1 16:45:44.6583 1 16:45:44.65827 1 16:45:44.658270 45:30 45:30 45:30 45:30:57 45:30:57 45:30:57 45:30:57.6 45:30:57 45:30:57.6 45:30:57.58 45:30:57 45:30:57.6 45:30:57.58 45:30:57.582 45:30:57 45:30:57.6 45:30:57.58 45:30:57.582 45:30:57.5822 45:30:57 45:30:57.6 45:30:57.58 45:30:57.582 45:30:57.5822 45:30:57.58219 45:30:57 45:30:57.6 45:30:57.58 45:30:57.582 45:30:57.5822 45:30:57.58219 45:30:57.582190 1 21:30 1 21:30 1 21:30:57 1 21:30:57 1 21:30:57 1 21:30:57 1 21:30:57.6 1 21:30:57 1 21:30:57.6 1 21:30:57.58 1 21:30:57 1 21:30:57.6 1 21:30:57.58 1 21:30:57.582 1 21:30:57 1 21:30:57.6 1 21:30:57.58 1 21:30:57.582 1 21:30:57.5822 1 21:30:57 1 21:30:57.6 1 21:30:57.58 1 21:30:57.582 1 21:30:57.5822 1 21:30:57.58219 1 21:30:57 1 21:30:57.6 1 21:30:57.58 1 21:30:57.582 1 21:30:57.5822 1 21:30:57.58219 1 21:30:57.582190 46:30 46:30 46:30 46:30:04 46:30:04 46:30:04 46:30:04.2 46:30:04 46:30:04.2 46:30:04.18 46:30:04 46:30:04.2 46:30:04.18 46:30:04.183 46:30:04 46:30:04.2 46:30:04.18 46:30:04.183 46:30:04.1835 46:30:04 46:30:04.2 46:30:04.18 46:30:04.183 46:30:04.1835 46:30:04.18347 46:30:04 46:30:04.2 46:30:04.18 46:30:04.183 46:30:04.1835 46:30:04.18347 46:30:04.183470 1 22:30 1 22:30 1 22:30:04 1 22:30:04 1 22:30:04 1 22:30:04 1 22:30:04.2 1 22:30:04 1 22:30:04.2 1 22:30:04.18 1 22:30:04 1 22:30:04.2 1 22:30:04.18 1 22:30:04.183 1 22:30:04 1 22:30:04.2 1 22:30:04.18 1 22:30:04.183 1 22:30:04.1835 1 22:30:04 1 22:30:04.2 1 22:30:04.18 1 22:30:04.183 1 22:30:04.1835 1 22:30:04.18347 1 22:30:04 1 22:30:04.2 1 22:30:04.18 1 22:30:04.183 1 22:30:04.1835 1 22:30:04.18347 1 22:30:04.183470 25:56 25:56 25:56 25:56:51 25:56:51 25:56:51 25:56:51.6 25:56:51 25:56:51.6 25:56:51.59 25:56:51 25:56:51.6 25:56:51.59 25:56:51.593 25:56:51 25:56:51.6 25:56:51.59 25:56:51.593 25:56:51.5932 25:56:51 25:56:51.6 25:56:51.59 25:56:51.593 25:56:51.5932 25:56:51.59319 25:56:51 25:56:51.6 25:56:51.59 25:56:51.593 25:56:51.5932 25:56:51.59319 25:56:51.593190 1 01:56 1 01:56 1 01:56:51 1 01:56:51 1 01:56:51 1 01:56:51 1 01:56:51.6 1 01:56:51 1 01:56:51.6 1 01:56:51.59 1 01:56:51 1 01:56:51.6 1 01:56:51.59 1 01:56:51.593 1 01:56:51 1 01:56:51.6 1 01:56:51.59 1 01:56:51.593 1 01:56:51.5932 1 01:56:51 1 01:56:51.6 1 01:56:51.59 1 01:56:51.593 1 01:56:51.5932 1 01:56:51.59319 1 01:56:51 1 01:56:51.6 1 01:56:51.59 1 01:56:51.593 1 01:56:51.5932 1 01:56:51.59319 1 01:56:51.593190 48:00 48:00 48:00 48:00:00 48:00:00 48:00:00 48:00:00.0 48:00:00 48:00:00.0 48:00:00.00 48:00:00 48:00:00.0 48:00:00.00 48:00:00.000 48:00:00 48:00:00.0 48:00:00.00 48:00:00.000 48:00:00.0000 48:00:00 48:00:00.0 48:00:00.00 48:00:00.000 48:00:00.0000 48:00:00.00000 48:00:00 48:00:00.0 48:00:00.00 48:00:00.000 48:00:00.0000 48:00:00.00000 48:00:00.000000 2 00:00 2 00:00 2 00:00:00 2 00:00:00 2 00:00:00 2 00:00:00 2 00:00:00.0 2 00:00:00 2 00:00:00.0 2 00:00:00.00 2 00:00:00 2 00:00:00.0 2 00:00:00.00 2 00:00:00.000 2 00:00:00 2 00:00:00.0 2 00:00:00.00 2 00:00:00.000 2 00:00:00.0000 2 00:00:00 2 00:00:00.0 2 00:00:00.00 2 00:00:00.000 2 00:00:00.0000 2 00:00:00.00000 2 00:00:00 2 00:00:00.0 2 00:00:00.00 2 00:00:00.000 2 00:00:00.0000 2 00:00:00.00000 2 00:00:00.000000 52:50 52:50 52:50 52:50:38 52:50:38 52:50:38 52:50:38.1 52:50:38 52:50:38.1 52:50:38.12 52:50:38 52:50:38.1 52:50:38.12 52:50:38.123 52:50:38 52:50:38.1 52:50:38.12 52:50:38.123 52:50:38.1230 52:50:38 52:50:38.1 52:50:38.12 52:50:38.123 52:50:38.1230 52:50:38.12301 52:50:38 52:50:38.1 52:50:38.12 52:50:38.123 52:50:38.1230 52:50:38.12301 52:50:38.123010 2 04:50 2 04:50 2 04:50:38 2 04:50:38 2 04:50:38 2 04:50:38 2 04:50:38.1 2 04:50:38 2 04:50:38.1 2 04:50:38.12 2 04:50:38 2 04:50:38.1 2 04:50:38.12 2 04:50:38.123 2 04:50:38 2 04:50:38.1 2 04:50:38.12 2 04:50:38.123 2 04:50:38.1230 2 04:50:38 2 04:50:38.1 2 04:50:38.12 2 04:50:38.123 2 04:50:38.1230 2 04:50:38.12301 2 04:50:38 2 04:50:38.1 2 04:50:38.12 2 04:50:38.123 2 04:50:38.1230 2 04:50:38.12301 2 04:50:38.123010 60:31 60:31 60:31 60:31:35 60:31:35 60:31:35 60:31:35.2 60:31:35 60:31:35.2 60:31:35.23 60:31:35 60:31:35.2 60:31:35.23 60:31:35.235 60:31:35 60:31:35.2 60:31:35.23 60:31:35.235 60:31:35.2345 60:31:35 60:31:35.2 60:31:35.23 60:31:35.235 60:31:35.2345 60:31:35.23453 60:31:35 60:31:35.2 60:31:35.23 60:31:35.235 60:31:35.2345 60:31:35.23453 60:31:35.234530 2 12:31 2 12:31 2 12:31:35 2 12:31:35 2 12:31:35 2 12:31:35 2 12:31:35.2 2 12:31:35 2 12:31:35.2 2 12:31:35.23 2 12:31:35 2 12:31:35.2 2 12:31:35.23 2 12:31:35.235 2 12:31:35 2 12:31:35.2 2 12:31:35.23 2 12:31:35.235 2 12:31:35.2345 2 12:31:35 2 12:31:35.2 2 12:31:35.23 2 12:31:35.235 2 12:31:35.2345 2 12:31:35.23453 2 12:31:35 2 12:31:35.2 2 12:31:35.23 2 12:31:35.235 2 12:31:35.2345 2 12:31:35.23453 2 12:31:35.234530 60:47 60:47 60:47 60:47:53 60:47:53 60:47:53 60:47:53.3 60:47:53 60:47:53.3 60:47:53.35 60:47:53 60:47:53.3 60:47:53.35 60:47:53.345 60:47:53 60:47:53.3 60:47:53.35 60:47:53.345 60:47:53.3451 60:47:53 60:47:53.3 60:47:53.35 60:47:53.345 60:47:53.3451 60:47:53.34505 60:47:53 60:47:53.3 60:47:53.35 60:47:53.345 60:47:53.3451 60:47:53.34505 60:47:53.345050 2 12:47 2 12:47 2 12:47:53 2 12:47:53 2 12:47:53 2 12:47:53 2 12:47:53.3 2 12:47:53 2 12:47:53.3 2 12:47:53.35 2 12:47:53 2 12:47:53.3 2 12:47:53.35 2 12:47:53.345 2 12:47:53 2 12:47:53.3 2 12:47:53.35 2 12:47:53.345 2 12:47:53.3451 2 12:47:53 2 12:47:53.3 2 12:47:53.35 2 12:47:53.345 2 12:47:53.3451 2 12:47:53.34505 2 12:47:53 2 12:47:53.3 2 12:47:53.35 2 12:47:53.345 2 12:47:53.3451 2 12:47:53.34505 2 12:47:53.345050 49:26 49:26 49:26 49:26:00 49:26:00 49:26:00 49:26:00.5 49:26:00 49:26:00.5 49:26:00.46 49:26:00 49:26:00.5 49:26:00.46 49:26:00.456 49:26:00 49:26:00.5 49:26:00.46 49:26:00.456 49:26:00.4562 49:26:00 49:26:00.5 49:26:00.46 49:26:00.456 49:26:00.4562 49:26:00.45615 49:26:00 49:26:00.5 49:26:00.46 49:26:00.456 49:26:00.4562 49:26:00.45615 49:26:00.456150 2 01:26 2 01:26 2 01:26:00 2 01:26:00 2 01:26:00 2 01:26:00 2 01:26:00.5 2 01:26:00 2 01:26:00.5 2 01:26:00.46 2 01:26:00 2 01:26:00.5 2 01:26:00.46 2 01:26:00.456 2 01:26:00 2 01:26:00.5 2 01:26:00.46 2 01:26:00.456 2 01:26:00.4562 2 01:26:00 2 01:26:00.5 2 01:26:00.46 2 01:26:00.456 2 01:26:00.4562 2 01:26:00.45615 2 01:26:00 2 01:26:00.5 2 01:26:00.46 2 01:26:00.456 2 01:26:00.4562 2 01:26:00.45615 2 01:26:00.456150 68:58 68:58 68:58 68:58:11 68:58:11 68:58:11 68:58:11.6 68:58:11 68:58:11.6 68:58:11.57 68:58:11 68:58:11.6 68:58:11.57 68:58:11.567 68:58:11 68:58:11.6 68:58:11.57 68:58:11.567 68:58:11.5668 68:58:11 68:58:11.6 68:58:11.57 68:58:11.567 68:58:11.5668 68:58:11.56677 68:58:11 68:58:11.6 68:58:11.57 68:58:11.567 68:58:11.5668 68:58:11.56677 68:58:11.566770 2 20:58 2 20:58 2 20:58:11 2 20:58:11 2 20:58:11 2 20:58:11 2 20:58:11.6 2 20:58:11 2 20:58:11.6 2 20:58:11.57 2 20:58:11 2 20:58:11.6 2 20:58:11.57 2 20:58:11.567 2 20:58:11 2 20:58:11.6 2 20:58:11.57 2 20:58:11.567 2 20:58:11.5668 2 20:58:11 2 20:58:11.6 2 20:58:11.57 2 20:58:11.567 2 20:58:11.5668 2 20:58:11.56677 2 20:58:11 2 20:58:11.6 2 20:58:11.57 2 20:58:11.567 2 20:58:11.5668 2 20:58:11.56677 2 20:58:11.566770 55:36 55:36 55:36 55:36:05 55:36:05 55:36:05 55:36:05.2 55:36:05 55:36:05.2 55:36:05.19 55:36:05 55:36:05.2 55:36:05.19 55:36:05.190 55:36:05 55:36:05.2 55:36:05.19 55:36:05.190 55:36:05.1896 55:36:05 55:36:05.2 55:36:05.19 55:36:05.190 55:36:05.1896 55:36:05.18964 55:36:05 55:36:05.2 55:36:05.19 55:36:05.190 55:36:05.1896 55:36:05.18964 55:36:05.189640 2 07:36 2 07:36 2 07:36:05 2 07:36:05 2 07:36:05 2 07:36:05 2 07:36:05.2 2 07:36:05 2 07:36:05.2 2 07:36:05.19 2 07:36:05 2 07:36:05.2 2 07:36:05.19 2 07:36:05.190 2 07:36:05 2 07:36:05.2 2 07:36:05.19 2 07:36:05.190 2 07:36:05.1896 2 07:36:05 2 07:36:05.2 2 07:36:05.19 2 07:36:05.190 2 07:36:05.1896 2 07:36:05.18964 2 07:36:05 2 07:36:05.2 2 07:36:05.19 2 07:36:05.190 2 07:36:05.1896 2 07:36:05.18964 2 07:36:05.189640 63:43 63:43 63:43 63:43:49 63:43:49 63:43:49 63:43:49.8 63:43:49 63:43:49.8 63:43:49.83 63:43:49 63:43:49.8 63:43:49.83 63:43:49.831 63:43:49 63:43:49.8 63:43:49.83 63:43:49.831 63:43:49.8313 63:43:49 63:43:49.8 63:43:49.83 63:43:49.831 63:43:49.8313 63:43:49.83132 63:43:49 63:43:49.8 63:43:49.83 63:43:49.831 63:43:49.8313 63:43:49.83132 63:43:49.831320 2 15:43 2 15:43 2 15:43:49 2 15:43:49 2 15:43:49 2 15:43:49 2 15:43:49.8 2 15:43:49 2 15:43:49.8 2 15:43:49.83 2 15:43:49 2 15:43:49.8 2 15:43:49.83 2 15:43:49.831 2 15:43:49 2 15:43:49.8 2 15:43:49.83 2 15:43:49.831 2 15:43:49.8313 2 15:43:49 2 15:43:49.8 2 15:43:49.83 2 15:43:49.831 2 15:43:49.8313 2 15:43:49.83132 2 15:43:49 2 15:43:49.8 2 15:43:49.83 2 15:43:49.831 2 15:43:49.8313 2 15:43:49.83132 2 15:43:49.831320 52:25 52:25 52:25 52:25:09 52:25:09 52:25:09 52:25:09.0 52:25:09 52:25:09.0 52:25:09.01 52:25:09 52:25:09.0 52:25:09.01 52:25:09.013 52:25:09 52:25:09.0 52:25:09.01 52:25:09.013 52:25:09.0129 52:25:09 52:25:09.0 52:25:09.01 52:25:09.013 52:25:09.0129 52:25:09.01293 52:25:09 52:25:09.0 52:25:09.01 52:25:09.013 52:25:09.0129 52:25:09.01293 52:25:09.012930 2 04:25 2 04:25 2 04:25:09 2 04:25:09 2 04:25:09 2 04:25:09 2 04:25:09.0 2 04:25:09 2 04:25:09.0 2 04:25:09.01 2 04:25:09 2 04:25:09.0 2 04:25:09.01 2 04:25:09.013 2 04:25:09 2 04:25:09.0 2 04:25:09.01 2 04:25:09.013 2 04:25:09.0129 2 04:25:09 2 04:25:09.0 2 04:25:09.01 2 04:25:09.013 2 04:25:09.0129 2 04:25:09.01293 2 04:25:09 2 04:25:09.0 2 04:25:09.01 2 04:25:09.013 2 04:25:09.0129 2 04:25:09.01293 2 04:25:09.012930 54:49 54:49 54:49 54:49:27 54:49:27 54:49:27 54:49:27.5 54:49:27 54:49:27.5 54:49:27.52 54:49:27 54:49:27.5 54:49:27.52 54:49:27.524 54:49:27 54:49:27.5 54:49:27.52 54:49:27.524 54:49:27.5237 54:49:27 54:49:27.5 54:49:27.52 54:49:27.524 54:49:27.5237 54:49:27.52375 54:49:27 54:49:27.5 54:49:27.52 54:49:27.524 54:49:27.5237 54:49:27.52375 54:49:27.523750 2 06:49 2 06:49 2 06:49:27 2 06:49:27 2 06:49:27 2 06:49:27 2 06:49:27.5 2 06:49:27 2 06:49:27.5 2 06:49:27.52 2 06:49:27 2 06:49:27.5 2 06:49:27.52 2 06:49:27.524 2 06:49:27 2 06:49:27.5 2 06:49:27.52 2 06:49:27.524 2 06:49:27.5237 2 06:49:27 2 06:49:27.5 2 06:49:27.52 2 06:49:27.524 2 06:49:27.5237 2 06:49:27.52375 2 06:49:27 2 06:49:27.5 2 06:49:27.52 2 06:49:27.524 2 06:49:27.5237 2 06:49:27.52375 2 06:49:27.523750 50:57 50:57 50:57 50:57:52 50:57:52 50:57:52 50:57:52.0 50:57:52 50:57:52.0 50:57:52.02 50:57:52 50:57:52.0 50:57:52.02 50:57:52.016 50:57:52 50:57:52.0 50:57:52.02 50:57:52.016 50:57:52.0156 50:57:52 50:57:52.0 50:57:52.02 50:57:52.016 50:57:52.0156 50:57:52.01565 50:57:52 50:57:52.0 50:57:52.02 50:57:52.016 50:57:52.0156 50:57:52.01565 50:57:52.015650 2 02:57 2 02:57 2 02:57:52 2 02:57:52 2 02:57:52 2 02:57:52 2 02:57:52.0 2 02:57:52 2 02:57:52.0 2 02:57:52.02 2 02:57:52 2 02:57:52.0 2 02:57:52.02 2 02:57:52.016 2 02:57:52 2 02:57:52.0 2 02:57:52.02 2 02:57:52.016 2 02:57:52.0156 2 02:57:52 2 02:57:52.0 2 02:57:52.02 2 02:57:52.016 2 02:57:52.0156 2 02:57:52.01565 2 02:57:52 2 02:57:52.0 2 02:57:52.02 2 02:57:52.016 2 02:57:52.0156 2 02:57:52.01565 2 02:57:52.015650 64:45 64:45 64:45 64:45:44 64:45:44 64:45:44 64:45:44.9 64:45:44 64:45:44.9 64:45:44.87 64:45:44 64:45:44.9 64:45:44.87 64:45:44.865 64:45:44 64:45:44.9 64:45:44.87 64:45:44.865 64:45:44.8653 64:45:44 64:45:44.9 64:45:44.87 64:45:44.865 64:45:44.8653 64:45:44.86529 64:45:44 64:45:44.9 64:45:44.87 64:45:44.865 64:45:44.8653 64:45:44.86529 64:45:44.865290 2 16:45 2 16:45 2 16:45:44 2 16:45:44 2 16:45:44 2 16:45:44 2 16:45:44.9 2 16:45:44 2 16:45:44.9 2 16:45:44.87 2 16:45:44 2 16:45:44.9 2 16:45:44.87 2 16:45:44.865 2 16:45:44 2 16:45:44.9 2 16:45:44.87 2 16:45:44.865 2 16:45:44.8653 2 16:45:44 2 16:45:44.9 2 16:45:44.87 2 16:45:44.865 2 16:45:44.8653 2 16:45:44.86529 2 16:45:44 2 16:45:44.9 2 16:45:44.87 2 16:45:44.865 2 16:45:44.8653 2 16:45:44.86529 2 16:45:44.865290 69:30 69:30 69:30 69:30:57 69:30:57 69:30:57 69:30:57.8 69:30:57 69:30:57.8 69:30:57.82 69:30:57 69:30:57.8 69:30:57.82 69:30:57.820 69:30:57 69:30:57.8 69:30:57.82 69:30:57.820 69:30:57.8205 69:30:57 69:30:57.8 69:30:57.82 69:30:57.820 69:30:57.8205 69:30:57.82047 69:30:57 69:30:57.8 69:30:57.82 69:30:57.820 69:30:57.8205 69:30:57.82047 69:30:57.820470 2 21:30 2 21:30 2 21:30:57 2 21:30:57 2 21:30:57 2 21:30:57 2 21:30:57.8 2 21:30:57 2 21:30:57.8 2 21:30:57.82 2 21:30:57 2 21:30:57.8 2 21:30:57.82 2 21:30:57.820 2 21:30:57 2 21:30:57.8 2 21:30:57.82 2 21:30:57.820 2 21:30:57.8205 2 21:30:57 2 21:30:57.8 2 21:30:57.82 2 21:30:57.820 2 21:30:57.8205 2 21:30:57.82047 2 21:30:57 2 21:30:57.8 2 21:30:57.82 2 21:30:57.820 2 21:30:57.8205 2 21:30:57.82047 2 21:30:57.820470 52:25 52:25 52:25 52:25:09 52:25:09 52:25:09 52:25:09.2 52:25:09 52:25:09.2 52:25:09.15 52:25:09 52:25:09.2 52:25:09.15 52:25:09.154 52:25:09 52:25:09.2 52:25:09.15 52:25:09.154 52:25:09.1540 52:25:09 52:25:09.2 52:25:09.15 52:25:09.154 52:25:09.1540 52:25:09.15395 52:25:09 52:25:09.2 52:25:09.15 52:25:09.154 52:25:09.1540 52:25:09.15395 52:25:09.153950 2 04:25 2 04:25 2 04:25:09 2 04:25:09 2 04:25:09 2 04:25:09 2 04:25:09.2 2 04:25:09 2 04:25:09.2 2 04:25:09.15 2 04:25:09 2 04:25:09.2 2 04:25:09.15 2 04:25:09.154 2 04:25:09 2 04:25:09.2 2 04:25:09.15 2 04:25:09.154 2 04:25:09.1540 2 04:25:09 2 04:25:09.2 2 04:25:09.15 2 04:25:09.154 2 04:25:09.1540 2 04:25:09.15395 2 04:25:09 2 04:25:09.2 2 04:25:09.15 2 04:25:09.154 2 04:25:09.1540 2 04:25:09.15395 2 04:25:09.153950 54:49 54:49 54:49 54:49:27 54:49:27 54:49:27 54:49:27.1 54:49:27 54:49:27.1 54:49:27.11 54:49:27 54:49:27.1 54:49:27.11 54:49:27.105 54:49:27 54:49:27.1 54:49:27.11 54:49:27.105 54:49:27.1053 54:49:27 54:49:27.1 54:49:27.11 54:49:27.105 54:49:27.1053 54:49:27.10533 54:49:27 54:49:27.1 54:49:27.11 54:49:27.105 54:49:27.1053 54:49:27.10533 54:49:27.105330 2 06:49 2 06:49 2 06:49:27 2 06:49:27 2 06:49:27 2 06:49:27 2 06:49:27.1 2 06:49:27 2 06:49:27.1 2 06:49:27.11 2 06:49:27 2 06:49:27.1 2 06:49:27.11 2 06:49:27.105 2 06:49:27 2 06:49:27.1 2 06:49:27.11 2 06:49:27.105 2 06:49:27.1053 2 06:49:27 2 06:49:27.1 2 06:49:27.11 2 06:49:27.105 2 06:49:27.1053 2 06:49:27.10533 2 06:49:27 2 06:49:27.1 2 06:49:27.11 2 06:49:27.105 2 06:49:27.1053 2 06:49:27.10533 2 06:49:27.105330 50:57 50:57 50:57 50:57:52 50:57:52 50:57:52 50:57:52.5 50:57:52 50:57:52.5 50:57:52.48 50:57:52 50:57:52.5 50:57:52.48 50:57:52.482 50:57:52 50:57:52.5 50:57:52.48 50:57:52.482 50:57:52.4823 50:57:52 50:57:52.5 50:57:52.48 50:57:52.482 50:57:52.4823 50:57:52.48229 50:57:52 50:57:52.5 50:57:52.48 50:57:52.482 50:57:52.4823 50:57:52.48229 50:57:52.482290 2 02:57 2 02:57 2 02:57:52 2 02:57:52 2 02:57:52 2 02:57:52 2 02:57:52.5 2 02:57:52 2 02:57:52.5 2 02:57:52.48 2 02:57:52 2 02:57:52.5 2 02:57:52.48 2 02:57:52.482 2 02:57:52 2 02:57:52.5 2 02:57:52.48 2 02:57:52.482 2 02:57:52.4823 2 02:57:52 2 02:57:52.5 2 02:57:52.48 2 02:57:52.482 2 02:57:52.4823 2 02:57:52.48229 2 02:57:52 2 02:57:52.5 2 02:57:52.48 2 02:57:52.482 2 02:57:52.4823 2 02:57:52.48229 2 02:57:52.482290 64:45 64:45 64:45 64:45:44 64:45:44 64:45:44 64:45:44.7 64:45:44 64:45:44.7 64:45:44.66 64:45:44 64:45:44.7 64:45:44.66 64:45:44.658 64:45:44 64:45:44.7 64:45:44.66 64:45:44.658 64:45:44.6583 64:45:44 64:45:44.7 64:45:44.66 64:45:44.658 64:45:44.6583 64:45:44.65827 64:45:44 64:45:44.7 64:45:44.66 64:45:44.658 64:45:44.6583 64:45:44.65827 64:45:44.658270 2 16:45 2 16:45 2 16:45:44 2 16:45:44 2 16:45:44 2 16:45:44 2 16:45:44.7 2 16:45:44 2 16:45:44.7 2 16:45:44.66 2 16:45:44 2 16:45:44.7 2 16:45:44.66 2 16:45:44.658 2 16:45:44 2 16:45:44.7 2 16:45:44.66 2 16:45:44.658 2 16:45:44.6583 2 16:45:44 2 16:45:44.7 2 16:45:44.66 2 16:45:44.658 2 16:45:44.6583 2 16:45:44.65827 2 16:45:44 2 16:45:44.7 2 16:45:44.66 2 16:45:44.658 2 16:45:44.6583 2 16:45:44.65827 2 16:45:44.658270 69:30 69:30 69:30 69:30:57 69:30:57 69:30:57 69:30:57.6 69:30:57 69:30:57.6 69:30:57.58 69:30:57 69:30:57.6 69:30:57.58 69:30:57.582 69:30:57 69:30:57.6 69:30:57.58 69:30:57.582 69:30:57.5822 69:30:57 69:30:57.6 69:30:57.58 69:30:57.582 69:30:57.5822 69:30:57.58219 69:30:57 69:30:57.6 69:30:57.58 69:30:57.582 69:30:57.5822 69:30:57.58219 69:30:57.582190 2 21:30 2 21:30 2 21:30:57 2 21:30:57 2 21:30:57 2 21:30:57 2 21:30:57.6 2 21:30:57 2 21:30:57.6 2 21:30:57.58 2 21:30:57 2 21:30:57.6 2 21:30:57.58 2 21:30:57.582 2 21:30:57 2 21:30:57.6 2 21:30:57.58 2 21:30:57.582 2 21:30:57.5822 2 21:30:57 2 21:30:57.6 2 21:30:57.58 2 21:30:57.582 2 21:30:57.5822 2 21:30:57.58219 2 21:30:57 2 21:30:57.6 2 21:30:57.58 2 21:30:57.582 2 21:30:57.5822 2 21:30:57.58219 2 21:30:57.582190 70:30 70:30 70:30 70:30:04 70:30:04 70:30:04 70:30:04.2 70:30:04 70:30:04.2 70:30:04.18 70:30:04 70:30:04.2 70:30:04.18 70:30:04.183 70:30:04 70:30:04.2 70:30:04.18 70:30:04.183 70:30:04.1835 70:30:04 70:30:04.2 70:30:04.18 70:30:04.183 70:30:04.1835 70:30:04.18347 70:30:04 70:30:04.2 70:30:04.18 70:30:04.183 70:30:04.1835 70:30:04.18347 70:30:04.183470 2 22:30 2 22:30 2 22:30:04 2 22:30:04 2 22:30:04 2 22:30:04 2 22:30:04.2 2 22:30:04 2 22:30:04.2 2 22:30:04.18 2 22:30:04 2 22:30:04.2 2 22:30:04.18 2 22:30:04.183 2 22:30:04 2 22:30:04.2 2 22:30:04.18 2 22:30:04.183 2 22:30:04.1835 2 22:30:04 2 22:30:04.2 2 22:30:04.18 2 22:30:04.183 2 22:30:04.1835 2 22:30:04.18347 2 22:30:04 2 22:30:04.2 2 22:30:04.18 2 22:30:04.183 2 22:30:04.1835 2 22:30:04.18347 2 22:30:04.183470 49:56 49:56 49:56 49:56:51 49:56:51 49:56:51 49:56:51.6 49:56:51 49:56:51.6 49:56:51.59 49:56:51 49:56:51.6 49:56:51.59 49:56:51.593 49:56:51 49:56:51.6 49:56:51.59 49:56:51.593 49:56:51.5932 49:56:51 49:56:51.6 49:56:51.59 49:56:51.593 49:56:51.5932 49:56:51.59319 49:56:51 49:56:51.6 49:56:51.59 49:56:51.593 49:56:51.5932 49:56:51.59319 49:56:51.593190 2 01:56 2 01:56 2 01:56:51 2 01:56:51 2 01:56:51 2 01:56:51 2 01:56:51.6 2 01:56:51 2 01:56:51.6 2 01:56:51.59 2 01:56:51 2 01:56:51.6 2 01:56:51.59 2 01:56:51.593 2 01:56:51 2 01:56:51.6 2 01:56:51.59 2 01:56:51.593 2 01:56:51.5932 2 01:56:51 2 01:56:51.6 2 01:56:51.59 2 01:56:51.593 2 01:56:51.5932 2 01:56:51.59319 2 01:56:51 2 01:56:51.6 2 01:56:51.59 2 01:56:51.593 2 01:56:51.5932 2 01:56:51.59319 2 01:56:51.593190 ***** ****** 1296:00 1296:00 1296:00 1296:00:00 1296:00:00 1296:00:00 1296:00:00 1296:00:00 1296:00:00 1296:00:00.0 1296:00:00.0 1296:00:00.0 1296:00:00 1296:00:00.0 1296:00:00.00 1296:00:00.00 1296:00:00.00 1296:00:00 1296:00:00.0 1296:00:00.00 1296:00:00.000 1296:00:00.000 1296:00:00.000 1296:00:00 1296:00:00.0 1296:00:00.00 1296:00:00.000 1296:00:00.0000 1296:00:00.0000 1296:00:00.0000 54 00:00 54 00:00 54 00:00 54 00:00:00 54 00:00:00 54 00:00:00 54 00:00:00.0 54 00:00:00 54 00:00:00.0 54 00:00:00.00 54 00:00:00 54 00:00:00.0 54 00:00:00.00 54 00:00:00.000 54 00:00:00 54 00:00:00.0 54 00:00:00.00 54 00:00:00.000 54 00:00:00.0000 54 00:00:00 54 00:00:00.0 54 00:00:00.00 54 00:00:00.000 54 00:00:00.0000 54 00:00:00.00000 54 00:00:00 54 00:00:00.0 54 00:00:00.00 54 00:00:00.000 54 00:00:00.0000 54 00:00:00.00000 54 00:00:00.000000 ***** ****** 1300:50 1300:50 1300:50 1300:50:38 1300:50:38 1300:50:38 1300:50:38 1300:50:38 1300:50:38 1300:50:38.1 1300:50:38.1 1300:50:38.1 1300:50:38 1300:50:38.1 1300:50:38.12 1300:50:38.12 1300:50:38.12 1300:50:38 1300:50:38.1 1300:50:38.12 1300:50:38.123 1300:50:38.123 1300:50:38.123 1300:50:38 1300:50:38.1 1300:50:38.12 1300:50:38.123 1300:50:38.1230 1300:50:38.1230 1300:50:38.1230 54 04:50 54 04:50 54 04:50 54 04:50:38 54 04:50:38 54 04:50:38 54 04:50:38.1 54 04:50:38 54 04:50:38.1 54 04:50:38.12 54 04:50:38 54 04:50:38.1 54 04:50:38.12 54 04:50:38.123 54 04:50:38 54 04:50:38.1 54 04:50:38.12 54 04:50:38.123 54 04:50:38.1230 54 04:50:38 54 04:50:38.1 54 04:50:38.12 54 04:50:38.123 54 04:50:38.1230 54 04:50:38.12301 54 04:50:38 54 04:50:38.1 54 04:50:38.12 54 04:50:38.123 54 04:50:38.1230 54 04:50:38.12301 54 04:50:38.123010 ***** ****** 1308:31 1308:31 1308:31 1308:31:35 1308:31:35 1308:31:35 1308:31:35 1308:31:35 1308:31:35 1308:31:35.2 1308:31:35.2 1308:31:35.2 1308:31:35 1308:31:35.2 1308:31:35.23 1308:31:35.23 1308:31:35.23 1308:31:35 1308:31:35.2 1308:31:35.23 1308:31:35.235 1308:31:35.235 1308:31:35.235 1308:31:35 1308:31:35.2 1308:31:35.23 1308:31:35.235 1308:31:35.2345 1308:31:35.2345 1308:31:35.2345 54 12:31 54 12:31 54 12:31 54 12:31:35 54 12:31:35 54 12:31:35 54 12:31:35.2 54 12:31:35 54 12:31:35.2 54 12:31:35.23 54 12:31:35 54 12:31:35.2 54 12:31:35.23 54 12:31:35.235 54 12:31:35 54 12:31:35.2 54 12:31:35.23 54 12:31:35.235 54 12:31:35.2345 54 12:31:35 54 12:31:35.2 54 12:31:35.23 54 12:31:35.235 54 12:31:35.2345 54 12:31:35.23453 54 12:31:35 54 12:31:35.2 54 12:31:35.23 54 12:31:35.235 54 12:31:35.2345 54 12:31:35.23453 54 12:31:35.234530 ***** ****** 1308:47 1308:47 1308:47 1308:47:53 1308:47:53 1308:47:53 1308:47:53 1308:47:53 1308:47:53 1308:47:53.3 1308:47:53.3 1308:47:53.3 1308:47:53 1308:47:53.3 1308:47:53.35 1308:47:53.35 1308:47:53.35 1308:47:53 1308:47:53.3 1308:47:53.35 1308:47:53.345 1308:47:53.345 1308:47:53.345 1308:47:53 1308:47:53.3 1308:47:53.35 1308:47:53.345 1308:47:53.3450 1308:47:53.3450 1308:47:53.3450 54 12:47 54 12:47 54 12:47 54 12:47:53 54 12:47:53 54 12:47:53 54 12:47:53.3 54 12:47:53 54 12:47:53.3 54 12:47:53.35 54 12:47:53 54 12:47:53.3 54 12:47:53.35 54 12:47:53.345 54 12:47:53 54 12:47:53.3 54 12:47:53.35 54 12:47:53.345 54 12:47:53.3450 54 12:47:53 54 12:47:53.3 54 12:47:53.35 54 12:47:53.345 54 12:47:53.3450 54 12:47:53.34505 54 12:47:53 54 12:47:53.3 54 12:47:53.35 54 12:47:53.345 54 12:47:53.3450 54 12:47:53.34505 54 12:47:53.345050 ***** ****** 1297:26 1297:26 1297:26 1297:26:00 1297:26:00 1297:26:00 1297:26:00 1297:26:00 1297:26:00 1297:26:00.5 1297:26:00.5 1297:26:00.5 1297:26:00 1297:26:00.5 1297:26:00.46 1297:26:00.46 1297:26:00.46 1297:26:00 1297:26:00.5 1297:26:00.46 1297:26:00.456 1297:26:00.456 1297:26:00.456 1297:26:00 1297:26:00.5 1297:26:00.46 1297:26:00.456 1297:26:00.4561 1297:26:00.4561 1297:26:00.4561 54 01:26 54 01:26 54 01:26 54 01:26:00 54 01:26:00 54 01:26:00 54 01:26:00.5 54 01:26:00 54 01:26:00.5 54 01:26:00.46 54 01:26:00 54 01:26:00.5 54 01:26:00.46 54 01:26:00.456 54 01:26:00 54 01:26:00.5 54 01:26:00.46 54 01:26:00.456 54 01:26:00.4561 54 01:26:00 54 01:26:00.5 54 01:26:00.46 54 01:26:00.456 54 01:26:00.4561 54 01:26:00.45615 54 01:26:00 54 01:26:00.5 54 01:26:00.46 54 01:26:00.456 54 01:26:00.4561 54 01:26:00.45615 54 01:26:00.456150 ***** ****** 1316:58 1316:58 1316:58 1316:58:11 1316:58:11 1316:58:11 1316:58:11 1316:58:11 1316:58:11 1316:58:11.6 1316:58:11.6 1316:58:11.6 1316:58:11 1316:58:11.6 1316:58:11.57 1316:58:11.57 1316:58:11.57 1316:58:11 1316:58:11.6 1316:58:11.57 1316:58:11.567 1316:58:11.567 1316:58:11.567 1316:58:11 1316:58:11.6 1316:58:11.57 1316:58:11.567 1316:58:11.5668 1316:58:11.5668 1316:58:11.5668 54 20:58 54 20:58 54 20:58 54 20:58:11 54 20:58:11 54 20:58:11 54 20:58:11.6 54 20:58:11 54 20:58:11.6 54 20:58:11.57 54 20:58:11 54 20:58:11.6 54 20:58:11.57 54 20:58:11.567 54 20:58:11 54 20:58:11.6 54 20:58:11.57 54 20:58:11.567 54 20:58:11.5668 54 20:58:11 54 20:58:11.6 54 20:58:11.57 54 20:58:11.567 54 20:58:11.5668 54 20:58:11.56677 54 20:58:11 54 20:58:11.6 54 20:58:11.57 54 20:58:11.567 54 20:58:11.5668 54 20:58:11.56677 54 20:58:11.566770 ***** ****** 1303:36 1303:36 1303:36 1303:36:05 1303:36:05 1303:36:05 1303:36:05 1303:36:05 1303:36:05 1303:36:05.2 1303:36:05.2 1303:36:05.2 1303:36:05 1303:36:05.2 1303:36:05.19 1303:36:05.19 1303:36:05.19 1303:36:05 1303:36:05.2 1303:36:05.19 1303:36:05.190 1303:36:05.190 1303:36:05.190 1303:36:05 1303:36:05.2 1303:36:05.19 1303:36:05.190 1303:36:05.1896 1303:36:05.1896 1303:36:05.1896 54 07:36 54 07:36 54 07:36 54 07:36:05 54 07:36:05 54 07:36:05 54 07:36:05.2 54 07:36:05 54 07:36:05.2 54 07:36:05.19 54 07:36:05 54 07:36:05.2 54 07:36:05.19 54 07:36:05.190 54 07:36:05 54 07:36:05.2 54 07:36:05.19 54 07:36:05.190 54 07:36:05.1896 54 07:36:05 54 07:36:05.2 54 07:36:05.19 54 07:36:05.190 54 07:36:05.1896 54 07:36:05.18964 54 07:36:05 54 07:36:05.2 54 07:36:05.19 54 07:36:05.190 54 07:36:05.1896 54 07:36:05.18964 54 07:36:05.189640 ***** ****** 1311:43 1311:43 1311:43 1311:43:49 1311:43:49 1311:43:49 1311:43:49 1311:43:49 1311:43:49 1311:43:49.8 1311:43:49.8 1311:43:49.8 1311:43:49 1311:43:49.8 1311:43:49.83 1311:43:49.83 1311:43:49.83 1311:43:49 1311:43:49.8 1311:43:49.83 1311:43:49.831 1311:43:49.831 1311:43:49.831 1311:43:49 1311:43:49.8 1311:43:49.83 1311:43:49.831 1311:43:49.8313 1311:43:49.8313 1311:43:49.8313 54 15:43 54 15:43 54 15:43 54 15:43:49 54 15:43:49 54 15:43:49 54 15:43:49.8 54 15:43:49 54 15:43:49.8 54 15:43:49.83 54 15:43:49 54 15:43:49.8 54 15:43:49.83 54 15:43:49.831 54 15:43:49 54 15:43:49.8 54 15:43:49.83 54 15:43:49.831 54 15:43:49.8313 54 15:43:49 54 15:43:49.8 54 15:43:49.83 54 15:43:49.831 54 15:43:49.8313 54 15:43:49.83132 54 15:43:49 54 15:43:49.8 54 15:43:49.83 54 15:43:49.831 54 15:43:49.8313 54 15:43:49.83132 54 15:43:49.831320 ***** ****** 1300:25 1300:25 1300:25 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09.0 1300:25:09.0 1300:25:09.0 1300:25:09 1300:25:09.0 1300:25:09.01 1300:25:09.01 1300:25:09.01 1300:25:09 1300:25:09.0 1300:25:09.01 1300:25:09.013 1300:25:09.013 1300:25:09.013 1300:25:09 1300:25:09.0 1300:25:09.01 1300:25:09.013 1300:25:09.0129 1300:25:09.0129 1300:25:09.0129 54 04:25 54 04:25 54 04:25 54 04:25:09 54 04:25:09 54 04:25:09 54 04:25:09.0 54 04:25:09 54 04:25:09.0 54 04:25:09.01 54 04:25:09 54 04:25:09.0 54 04:25:09.01 54 04:25:09.013 54 04:25:09 54 04:25:09.0 54 04:25:09.01 54 04:25:09.013 54 04:25:09.0129 54 04:25:09 54 04:25:09.0 54 04:25:09.01 54 04:25:09.013 54 04:25:09.0129 54 04:25:09.01293 54 04:25:09 54 04:25:09.0 54 04:25:09.01 54 04:25:09.013 54 04:25:09.0129 54 04:25:09.01293 54 04:25:09.012930 ***** ****** 1302:49 1302:49 1302:49 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27.5 1302:49:27.5 1302:49:27.5 1302:49:27 1302:49:27.5 1302:49:27.52 1302:49:27.52 1302:49:27.52 1302:49:27 1302:49:27.5 1302:49:27.52 1302:49:27.524 1302:49:27.524 1302:49:27.524 1302:49:27 1302:49:27.5 1302:49:27.52 1302:49:27.524 1302:49:27.5237 1302:49:27.5237 1302:49:27.5237 54 06:49 54 06:49 54 06:49 54 06:49:27 54 06:49:27 54 06:49:27 54 06:49:27.5 54 06:49:27 54 06:49:27.5 54 06:49:27.52 54 06:49:27 54 06:49:27.5 54 06:49:27.52 54 06:49:27.524 54 06:49:27 54 06:49:27.5 54 06:49:27.52 54 06:49:27.524 54 06:49:27.5237 54 06:49:27 54 06:49:27.5 54 06:49:27.52 54 06:49:27.524 54 06:49:27.5237 54 06:49:27.52375 54 06:49:27 54 06:49:27.5 54 06:49:27.52 54 06:49:27.524 54 06:49:27.5237 54 06:49:27.52375 54 06:49:27.523750 ***** ****** 1298:57 1298:57 1298:57 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52.0 1298:57:52.0 1298:57:52.0 1298:57:52 1298:57:52.0 1298:57:52.02 1298:57:52.02 1298:57:52.02 1298:57:52 1298:57:52.0 1298:57:52.02 1298:57:52.016 1298:57:52.016 1298:57:52.016 1298:57:52 1298:57:52.0 1298:57:52.02 1298:57:52.016 1298:57:52.0157 1298:57:52.0157 1298:57:52.0157 54 02:57 54 02:57 54 02:57 54 02:57:52 54 02:57:52 54 02:57:52 54 02:57:52.0 54 02:57:52 54 02:57:52.0 54 02:57:52.02 54 02:57:52 54 02:57:52.0 54 02:57:52.02 54 02:57:52.016 54 02:57:52 54 02:57:52.0 54 02:57:52.02 54 02:57:52.016 54 02:57:52.0157 54 02:57:52 54 02:57:52.0 54 02:57:52.02 54 02:57:52.016 54 02:57:52.0157 54 02:57:52.01565 54 02:57:52 54 02:57:52.0 54 02:57:52.02 54 02:57:52.016 54 02:57:52.0157 54 02:57:52.01565 54 02:57:52.015650 ***** ****** 1312:45 1312:45 1312:45 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44.9 1312:45:44.9 1312:45:44.9 1312:45:44 1312:45:44.9 1312:45:44.87 1312:45:44.87 1312:45:44.87 1312:45:44 1312:45:44.9 1312:45:44.87 1312:45:44.865 1312:45:44.865 1312:45:44.865 1312:45:44 1312:45:44.9 1312:45:44.87 1312:45:44.865 1312:45:44.8653 1312:45:44.8653 1312:45:44.8653 54 16:45 54 16:45 54 16:45 54 16:45:44 54 16:45:44 54 16:45:44 54 16:45:44.9 54 16:45:44 54 16:45:44.9 54 16:45:44.87 54 16:45:44 54 16:45:44.9 54 16:45:44.87 54 16:45:44.865 54 16:45:44 54 16:45:44.9 54 16:45:44.87 54 16:45:44.865 54 16:45:44.8653 54 16:45:44 54 16:45:44.9 54 16:45:44.87 54 16:45:44.865 54 16:45:44.8653 54 16:45:44.86529 54 16:45:44 54 16:45:44.9 54 16:45:44.87 54 16:45:44.865 54 16:45:44.8653 54 16:45:44.86529 54 16:45:44.865290 ***** ****** 1317:30 1317:30 1317:30 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57.8 1317:30:57.8 1317:30:57.8 1317:30:57 1317:30:57.8 1317:30:57.82 1317:30:57.82 1317:30:57.82 1317:30:57 1317:30:57.8 1317:30:57.82 1317:30:57.820 1317:30:57.820 1317:30:57.820 1317:30:57 1317:30:57.8 1317:30:57.82 1317:30:57.820 1317:30:57.8205 1317:30:57.8205 1317:30:57.8205 54 21:30 54 21:30 54 21:30 54 21:30:57 54 21:30:57 54 21:30:57 54 21:30:57.8 54 21:30:57 54 21:30:57.8 54 21:30:57.82 54 21:30:57 54 21:30:57.8 54 21:30:57.82 54 21:30:57.820 54 21:30:57 54 21:30:57.8 54 21:30:57.82 54 21:30:57.820 54 21:30:57.8205 54 21:30:57 54 21:30:57.8 54 21:30:57.82 54 21:30:57.820 54 21:30:57.8205 54 21:30:57.82047 54 21:30:57 54 21:30:57.8 54 21:30:57.82 54 21:30:57.820 54 21:30:57.8205 54 21:30:57.82047 54 21:30:57.820470 ***** ****** 1300:25 1300:25 1300:25 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09 1300:25:09.2 1300:25:09.2 1300:25:09.2 1300:25:09 1300:25:09.2 1300:25:09.15 1300:25:09.15 1300:25:09.15 1300:25:09 1300:25:09.2 1300:25:09.15 1300:25:09.154 1300:25:09.154 1300:25:09.154 1300:25:09 1300:25:09.2 1300:25:09.15 1300:25:09.154 1300:25:09.1540 1300:25:09.1540 1300:25:09.1540 54 04:25 54 04:25 54 04:25 54 04:25:09 54 04:25:09 54 04:25:09 54 04:25:09.2 54 04:25:09 54 04:25:09.2 54 04:25:09.15 54 04:25:09 54 04:25:09.2 54 04:25:09.15 54 04:25:09.154 54 04:25:09 54 04:25:09.2 54 04:25:09.15 54 04:25:09.154 54 04:25:09.1540 54 04:25:09 54 04:25:09.2 54 04:25:09.15 54 04:25:09.154 54 04:25:09.1540 54 04:25:09.15395 54 04:25:09 54 04:25:09.2 54 04:25:09.15 54 04:25:09.154 54 04:25:09.1540 54 04:25:09.15395 54 04:25:09.153950 ***** ****** 1302:49 1302:49 1302:49 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27 1302:49:27.1 1302:49:27.1 1302:49:27.1 1302:49:27 1302:49:27.1 1302:49:27.11 1302:49:27.11 1302:49:27.11 1302:49:27 1302:49:27.1 1302:49:27.11 1302:49:27.105 1302:49:27.105 1302:49:27.105 1302:49:27 1302:49:27.1 1302:49:27.11 1302:49:27.105 1302:49:27.1053 1302:49:27.1053 1302:49:27.1053 54 06:49 54 06:49 54 06:49 54 06:49:27 54 06:49:27 54 06:49:27 54 06:49:27.1 54 06:49:27 54 06:49:27.1 54 06:49:27.11 54 06:49:27 54 06:49:27.1 54 06:49:27.11 54 06:49:27.105 54 06:49:27 54 06:49:27.1 54 06:49:27.11 54 06:49:27.105 54 06:49:27.1053 54 06:49:27 54 06:49:27.1 54 06:49:27.11 54 06:49:27.105 54 06:49:27.1053 54 06:49:27.10533 54 06:49:27 54 06:49:27.1 54 06:49:27.11 54 06:49:27.105 54 06:49:27.1053 54 06:49:27.10533 54 06:49:27.105330 ***** ****** 1298:57 1298:57 1298:57 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52 1298:57:52.5 1298:57:52.5 1298:57:52.5 1298:57:52 1298:57:52.5 1298:57:52.48 1298:57:52.48 1298:57:52.48 1298:57:52 1298:57:52.5 1298:57:52.48 1298:57:52.482 1298:57:52.482 1298:57:52.482 1298:57:52 1298:57:52.5 1298:57:52.48 1298:57:52.482 1298:57:52.4823 1298:57:52.4823 1298:57:52.4823 54 02:57 54 02:57 54 02:57 54 02:57:52 54 02:57:52 54 02:57:52 54 02:57:52.5 54 02:57:52 54 02:57:52.5 54 02:57:52.48 54 02:57:52 54 02:57:52.5 54 02:57:52.48 54 02:57:52.482 54 02:57:52 54 02:57:52.5 54 02:57:52.48 54 02:57:52.482 54 02:57:52.4823 54 02:57:52 54 02:57:52.5 54 02:57:52.48 54 02:57:52.482 54 02:57:52.4823 54 02:57:52.48229 54 02:57:52 54 02:57:52.5 54 02:57:52.48 54 02:57:52.482 54 02:57:52.4823 54 02:57:52.48229 54 02:57:52.482290 ***** ****** 1312:45 1312:45 1312:45 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44 1312:45:44.7 1312:45:44.7 1312:45:44.7 1312:45:44 1312:45:44.7 1312:45:44.66 1312:45:44.66 1312:45:44.66 1312:45:44 1312:45:44.7 1312:45:44.66 1312:45:44.658 1312:45:44.658 1312:45:44.658 1312:45:44 1312:45:44.7 1312:45:44.66 1312:45:44.658 1312:45:44.6583 1312:45:44.6583 1312:45:44.6583 54 16:45 54 16:45 54 16:45 54 16:45:44 54 16:45:44 54 16:45:44 54 16:45:44.7 54 16:45:44 54 16:45:44.7 54 16:45:44.66 54 16:45:44 54 16:45:44.7 54 16:45:44.66 54 16:45:44.658 54 16:45:44 54 16:45:44.7 54 16:45:44.66 54 16:45:44.658 54 16:45:44.6583 54 16:45:44 54 16:45:44.7 54 16:45:44.66 54 16:45:44.658 54 16:45:44.6583 54 16:45:44.65827 54 16:45:44 54 16:45:44.7 54 16:45:44.66 54 16:45:44.658 54 16:45:44.6583 54 16:45:44.65827 54 16:45:44.658270 ***** ****** 1317:30 1317:30 1317:30 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57 1317:30:57.6 1317:30:57.6 1317:30:57.6 1317:30:57 1317:30:57.6 1317:30:57.58 1317:30:57.58 1317:30:57.58 1317:30:57 1317:30:57.6 1317:30:57.58 1317:30:57.582 1317:30:57.582 1317:30:57.582 1317:30:57 1317:30:57.6 1317:30:57.58 1317:30:57.582 1317:30:57.5822 1317:30:57.5822 1317:30:57.5822 54 21:30 54 21:30 54 21:30 54 21:30:57 54 21:30:57 54 21:30:57 54 21:30:57.6 54 21:30:57 54 21:30:57.6 54 21:30:57.58 54 21:30:57 54 21:30:57.6 54 21:30:57.58 54 21:30:57.582 54 21:30:57 54 21:30:57.6 54 21:30:57.58 54 21:30:57.582 54 21:30:57.5822 54 21:30:57 54 21:30:57.6 54 21:30:57.58 54 21:30:57.582 54 21:30:57.5822 54 21:30:57.58219 54 21:30:57 54 21:30:57.6 54 21:30:57.58 54 21:30:57.582 54 21:30:57.5822 54 21:30:57.58219 54 21:30:57.582190 ***** ****** 1318:30 1318:30 1318:30 1318:30:04 1318:30:04 1318:30:04 1318:30:04 1318:30:04 1318:30:04 1318:30:04.2 1318:30:04.2 1318:30:04.2 1318:30:04 1318:30:04.2 1318:30:04.18 1318:30:04.18 1318:30:04.18 1318:30:04 1318:30:04.2 1318:30:04.18 1318:30:04.183 1318:30:04.183 1318:30:04.183 1318:30:04 1318:30:04.2 1318:30:04.18 1318:30:04.183 1318:30:04.1835 1318:30:04.1835 1318:30:04.1835 54 22:30 54 22:30 54 22:30 54 22:30:04 54 22:30:04 54 22:30:04 54 22:30:04.2 54 22:30:04 54 22:30:04.2 54 22:30:04.18 54 22:30:04 54 22:30:04.2 54 22:30:04.18 54 22:30:04.183 54 22:30:04 54 22:30:04.2 54 22:30:04.18 54 22:30:04.183 54 22:30:04.1835 54 22:30:04 54 22:30:04.2 54 22:30:04.18 54 22:30:04.183 54 22:30:04.1835 54 22:30:04.18347 54 22:30:04 54 22:30:04.2 54 22:30:04.18 54 22:30:04.183 54 22:30:04.1835 54 22:30:04.18347 54 22:30:04.183470 ***** ****** 1297:56 1297:56 1297:56 1297:56:51 1297:56:51 1297:56:51 1297:56:51 1297:56:51 1297:56:51 1297:56:51.6 1297:56:51.6 1297:56:51.6 1297:56:51 1297:56:51.6 1297:56:51.59 1297:56:51.59 1297:56:51.59 1297:56:51 1297:56:51.6 1297:56:51.59 1297:56:51.593 1297:56:51.593 1297:56:51.593 1297:56:51 1297:56:51.6 1297:56:51.59 1297:56:51.593 1297:56:51.5932 1297:56:51.5932 1297:56:51.5932 54 01:56 54 01:56 54 01:56 54 01:56:51 54 01:56:51 54 01:56:51 54 01:56:51.6 54 01:56:51 54 01:56:51.6 54 01:56:51.59 54 01:56:51 54 01:56:51.6 54 01:56:51.59 54 01:56:51.593 54 01:56:51 54 01:56:51.6 54 01:56:51.59 54 01:56:51.593 54 01:56:51.5932 54 01:56:51 54 01:56:51.6 54 01:56:51.59 54 01:56:51.593 54 01:56:51.5932 54 01:56:51.59319 54 01:56:51 54 01:56:51.6 54 01:56:51.59 54 01:56:51.593 54 01:56:51.5932 54 01:56:51.59319 54 01:56:51.593190 ***** ****** ******* 16344:00 16344:00 16344:00 16344:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00 16344:00:00.0 16344:00:00.0 16344:00:00.0 16344:00:00.0 16344:00:00 16344:00:00.0 16344:00:00.00 16344:00:00.00 16344:00:00.00 16344:00:00.00 16344:00:00 16344:00:00.0 16344:00:00.00 16344:00:00.000 16344:00:00.000 16344:00:00.000 16344:00:00.000 ******** 681 00:00 681 00:00 681 00:00 681 00:00:00 681 00:00:00 681 00:00:00 681 00:00:00 681 00:00:00.0 681 00:00:00.0 681 00:00:00 681 00:00:00.0 681 00:00:00.00 681 00:00:00.00 681 00:00:00 681 00:00:00.0 681 00:00:00.00 681 00:00:00.000 681 00:00:00.000 681 00:00:00 681 00:00:00.0 681 00:00:00.00 681 00:00:00.000 681 00:00:00.0000 681 00:00:00.0000 681 00:00:00 681 00:00:00.0 681 00:00:00.00 681 00:00:00.000 681 00:00:00.0000 681 00:00:00.00000 681 00:00:00.00000 ***** ****** ******* 16348:50 16348:50 16348:50 16348:50 16348:50:38 16348:50:38 16348:50:38 16348:50:38 16348:50:38 16348:50:38 16348:50:38 16348:50:38 16348:50:38.1 16348:50:38.1 16348:50:38.1 16348:50:38.1 16348:50:38 16348:50:38.1 16348:50:38.12 16348:50:38.12 16348:50:38.12 16348:50:38.12 16348:50:38 16348:50:38.1 16348:50:38.12 16348:50:38.123 16348:50:38.123 16348:50:38.123 16348:50:38.123 ******** 681 04:50 681 04:50 681 04:50 681 04:50:38 681 04:50:38 681 04:50:38 681 04:50:38 681 04:50:38.1 681 04:50:38.1 681 04:50:38 681 04:50:38.1 681 04:50:38.12 681 04:50:38.12 681 04:50:38 681 04:50:38.1 681 04:50:38.12 681 04:50:38.123 681 04:50:38.123 681 04:50:38 681 04:50:38.1 681 04:50:38.12 681 04:50:38.123 681 04:50:38.1230 681 04:50:38.1230 681 04:50:38 681 04:50:38.1 681 04:50:38.12 681 04:50:38.123 681 04:50:38.1230 681 04:50:38.12301 681 04:50:38.12301 ***** ****** ******* 16356:31 16356:31 16356:31 16356:31 16356:31:35 16356:31:35 16356:31:35 16356:31:35 16356:31:35 16356:31:35 16356:31:35 16356:31:35 16356:31:35.2 16356:31:35.2 16356:31:35.2 16356:31:35.2 16356:31:35 16356:31:35.2 16356:31:35.23 16356:31:35.23 16356:31:35.23 16356:31:35.23 16356:31:35 16356:31:35.2 16356:31:35.23 16356:31:35.235 16356:31:35.235 16356:31:35.235 16356:31:35.235 ******** 681 12:31 681 12:31 681 12:31 681 12:31:35 681 12:31:35 681 12:31:35 681 12:31:35 681 12:31:35.2 681 12:31:35.2 681 12:31:35 681 12:31:35.2 681 12:31:35.23 681 12:31:35.23 681 12:31:35 681 12:31:35.2 681 12:31:35.23 681 12:31:35.235 681 12:31:35.235 681 12:31:35 681 12:31:35.2 681 12:31:35.23 681 12:31:35.235 681 12:31:35.2345 681 12:31:35.2345 681 12:31:35 681 12:31:35.2 681 12:31:35.23 681 12:31:35.235 681 12:31:35.2345 681 12:31:35.23453 681 12:31:35.23453 ***** ****** ******* 16356:47 16356:47 16356:47 16356:47 16356:47:53 16356:47:53 16356:47:53 16356:47:53 16356:47:53 16356:47:53 16356:47:53 16356:47:53 16356:47:53.3 16356:47:53.3 16356:47:53.3 16356:47:53.3 16356:47:53 16356:47:53.3 16356:47:53.35 16356:47:53.35 16356:47:53.35 16356:47:53.35 16356:47:53 16356:47:53.3 16356:47:53.35 16356:47:53.345 16356:47:53.345 16356:47:53.345 16356:47:53.345 ******** 681 12:47 681 12:47 681 12:47 681 12:47:53 681 12:47:53 681 12:47:53 681 12:47:53 681 12:47:53.3 681 12:47:53.3 681 12:47:53 681 12:47:53.3 681 12:47:53.35 681 12:47:53.35 681 12:47:53 681 12:47:53.3 681 12:47:53.35 681 12:47:53.345 681 12:47:53.345 681 12:47:53 681 12:47:53.3 681 12:47:53.35 681 12:47:53.345 681 12:47:53.3450 681 12:47:53.3450 681 12:47:53 681 12:47:53.3 681 12:47:53.35 681 12:47:53.345 681 12:47:53.3450 681 12:47:53.34505 681 12:47:53.34505 ***** ****** ******* 16345:26 16345:26 16345:26 16345:26 16345:26:00 16345:26:00 16345:26:00 16345:26:00 16345:26:00 16345:26:00 16345:26:00 16345:26:00 16345:26:00.5 16345:26:00.5 16345:26:00.5 16345:26:00.5 16345:26:00 16345:26:00.5 16345:26:00.46 16345:26:00.46 16345:26:00.46 16345:26:00.46 16345:26:00 16345:26:00.5 16345:26:00.46 16345:26:00.456 16345:26:00.456 16345:26:00.456 16345:26:00.456 ******** 681 01:26 681 01:26 681 01:26 681 01:26:00 681 01:26:00 681 01:26:00 681 01:26:00 681 01:26:00.5 681 01:26:00.5 681 01:26:00 681 01:26:00.5 681 01:26:00.46 681 01:26:00.46 681 01:26:00 681 01:26:00.5 681 01:26:00.46 681 01:26:00.456 681 01:26:00.456 681 01:26:00 681 01:26:00.5 681 01:26:00.46 681 01:26:00.456 681 01:26:00.4562 681 01:26:00.4562 681 01:26:00 681 01:26:00.5 681 01:26:00.46 681 01:26:00.456 681 01:26:00.4562 681 01:26:00.45615 681 01:26:00.45615 ***** ****** ******* 16364:58 16364:58 16364:58 16364:58 16364:58:11 16364:58:11 16364:58:11 16364:58:11 16364:58:11 16364:58:11 16364:58:11 16364:58:11 16364:58:11.6 16364:58:11.6 16364:58:11.6 16364:58:11.6 16364:58:11 16364:58:11.6 16364:58:11.57 16364:58:11.57 16364:58:11.57 16364:58:11.57 16364:58:11 16364:58:11.6 16364:58:11.57 16364:58:11.567 16364:58:11.567 16364:58:11.567 16364:58:11.567 ******** 681 20:58 681 20:58 681 20:58 681 20:58:11 681 20:58:11 681 20:58:11 681 20:58:11 681 20:58:11.6 681 20:58:11.6 681 20:58:11 681 20:58:11.6 681 20:58:11.57 681 20:58:11.57 681 20:58:11 681 20:58:11.6 681 20:58:11.57 681 20:58:11.567 681 20:58:11.567 681 20:58:11 681 20:58:11.6 681 20:58:11.57 681 20:58:11.567 681 20:58:11.5668 681 20:58:11.5668 681 20:58:11 681 20:58:11.6 681 20:58:11.57 681 20:58:11.567 681 20:58:11.5668 681 20:58:11.56677 681 20:58:11.56677 ***** ****** ******* 16351:36 16351:36 16351:36 16351:36 16351:36:05 16351:36:05 16351:36:05 16351:36:05 16351:36:05 16351:36:05 16351:36:05 16351:36:05 16351:36:05.2 16351:36:05.2 16351:36:05.2 16351:36:05.2 16351:36:05 16351:36:05.2 16351:36:05.19 16351:36:05.19 16351:36:05.19 16351:36:05.19 16351:36:05 16351:36:05.2 16351:36:05.19 16351:36:05.190 16351:36:05.190 16351:36:05.190 16351:36:05.190 ******** 681 07:36 681 07:36 681 07:36 681 07:36:05 681 07:36:05 681 07:36:05 681 07:36:05 681 07:36:05.2 681 07:36:05.2 681 07:36:05 681 07:36:05.2 681 07:36:05.19 681 07:36:05.19 681 07:36:05 681 07:36:05.2 681 07:36:05.19 681 07:36:05.190 681 07:36:05.190 681 07:36:05 681 07:36:05.2 681 07:36:05.19 681 07:36:05.190 681 07:36:05.1896 681 07:36:05.1896 681 07:36:05 681 07:36:05.2 681 07:36:05.19 681 07:36:05.190 681 07:36:05.1896 681 07:36:05.18964 681 07:36:05.18964 ***** ****** ******* 16359:43 16359:43 16359:43 16359:43 16359:43:49 16359:43:49 16359:43:49 16359:43:49 16359:43:49 16359:43:49 16359:43:49 16359:43:49 16359:43:49.8 16359:43:49.8 16359:43:49.8 16359:43:49.8 16359:43:49 16359:43:49.8 16359:43:49.83 16359:43:49.83 16359:43:49.83 16359:43:49.83 16359:43:49 16359:43:49.8 16359:43:49.83 16359:43:49.831 16359:43:49.831 16359:43:49.831 16359:43:49.831 ******** 681 15:43 681 15:43 681 15:43 681 15:43:49 681 15:43:49 681 15:43:49 681 15:43:49 681 15:43:49.8 681 15:43:49.8 681 15:43:49 681 15:43:49.8 681 15:43:49.83 681 15:43:49.83 681 15:43:49 681 15:43:49.8 681 15:43:49.83 681 15:43:49.831 681 15:43:49.831 681 15:43:49 681 15:43:49.8 681 15:43:49.83 681 15:43:49.831 681 15:43:49.8313 681 15:43:49.8313 681 15:43:49 681 15:43:49.8 681 15:43:49.83 681 15:43:49.831 681 15:43:49.8313 681 15:43:49.83132 681 15:43:49.83132 ***** ****** ******* 16348:25 16348:25 16348:25 16348:25 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09.0 16348:25:09.0 16348:25:09.0 16348:25:09.0 16348:25:09 16348:25:09.0 16348:25:09.01 16348:25:09.01 16348:25:09.01 16348:25:09.01 16348:25:09 16348:25:09.0 16348:25:09.01 16348:25:09.013 16348:25:09.013 16348:25:09.013 16348:25:09.013 ******** 681 04:25 681 04:25 681 04:25 681 04:25:09 681 04:25:09 681 04:25:09 681 04:25:09 681 04:25:09.0 681 04:25:09.0 681 04:25:09 681 04:25:09.0 681 04:25:09.01 681 04:25:09.01 681 04:25:09 681 04:25:09.0 681 04:25:09.01 681 04:25:09.013 681 04:25:09.013 681 04:25:09 681 04:25:09.0 681 04:25:09.01 681 04:25:09.013 681 04:25:09.0129 681 04:25:09.0129 681 04:25:09 681 04:25:09.0 681 04:25:09.01 681 04:25:09.013 681 04:25:09.0129 681 04:25:09.01293 681 04:25:09.01293 ***** ****** ******* 16350:49 16350:49 16350:49 16350:49 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27.5 16350:49:27.5 16350:49:27.5 16350:49:27.5 16350:49:27 16350:49:27.5 16350:49:27.52 16350:49:27.52 16350:49:27.52 16350:49:27.52 16350:49:27 16350:49:27.5 16350:49:27.52 16350:49:27.524 16350:49:27.524 16350:49:27.524 16350:49:27.524 ******** 681 06:49 681 06:49 681 06:49 681 06:49:27 681 06:49:27 681 06:49:27 681 06:49:27 681 06:49:27.5 681 06:49:27.5 681 06:49:27 681 06:49:27.5 681 06:49:27.52 681 06:49:27.52 681 06:49:27 681 06:49:27.5 681 06:49:27.52 681 06:49:27.524 681 06:49:27.524 681 06:49:27 681 06:49:27.5 681 06:49:27.52 681 06:49:27.524 681 06:49:27.5237 681 06:49:27.5237 681 06:49:27 681 06:49:27.5 681 06:49:27.52 681 06:49:27.524 681 06:49:27.5237 681 06:49:27.52375 681 06:49:27.52375 ***** ****** ******* 16346:57 16346:57 16346:57 16346:57 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52.0 16346:57:52.0 16346:57:52.0 16346:57:52.0 16346:57:52 16346:57:52.0 16346:57:52.02 16346:57:52.02 16346:57:52.02 16346:57:52.02 16346:57:52 16346:57:52.0 16346:57:52.02 16346:57:52.016 16346:57:52.016 16346:57:52.016 16346:57:52.016 ******** 681 02:57 681 02:57 681 02:57 681 02:57:52 681 02:57:52 681 02:57:52 681 02:57:52 681 02:57:52.0 681 02:57:52.0 681 02:57:52 681 02:57:52.0 681 02:57:52.02 681 02:57:52.02 681 02:57:52 681 02:57:52.0 681 02:57:52.02 681 02:57:52.016 681 02:57:52.016 681 02:57:52 681 02:57:52.0 681 02:57:52.02 681 02:57:52.016 681 02:57:52.0156 681 02:57:52.0156 681 02:57:52 681 02:57:52.0 681 02:57:52.02 681 02:57:52.016 681 02:57:52.0156 681 02:57:52.01565 681 02:57:52.01565 ***** ****** ******* 16360:45 16360:45 16360:45 16360:45 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44.9 16360:45:44.9 16360:45:44.9 16360:45:44.9 16360:45:44 16360:45:44.9 16360:45:44.87 16360:45:44.87 16360:45:44.87 16360:45:44.87 16360:45:44 16360:45:44.9 16360:45:44.87 16360:45:44.865 16360:45:44.865 16360:45:44.865 16360:45:44.865 ******** 681 16:45 681 16:45 681 16:45 681 16:45:44 681 16:45:44 681 16:45:44 681 16:45:44 681 16:45:44.9 681 16:45:44.9 681 16:45:44 681 16:45:44.9 681 16:45:44.87 681 16:45:44.87 681 16:45:44 681 16:45:44.9 681 16:45:44.87 681 16:45:44.865 681 16:45:44.865 681 16:45:44 681 16:45:44.9 681 16:45:44.87 681 16:45:44.865 681 16:45:44.8653 681 16:45:44.8653 681 16:45:44 681 16:45:44.9 681 16:45:44.87 681 16:45:44.865 681 16:45:44.8653 681 16:45:44.86529 681 16:45:44.86529 ***** ****** ******* 16365:30 16365:30 16365:30 16365:30 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57.8 16365:30:57.8 16365:30:57.8 16365:30:57.8 16365:30:57 16365:30:57.8 16365:30:57.82 16365:30:57.82 16365:30:57.82 16365:30:57.82 16365:30:57 16365:30:57.8 16365:30:57.82 16365:30:57.820 16365:30:57.820 16365:30:57.820 16365:30:57.820 ******** 681 21:30 681 21:30 681 21:30 681 21:30:57 681 21:30:57 681 21:30:57 681 21:30:57 681 21:30:57.8 681 21:30:57.8 681 21:30:57 681 21:30:57.8 681 21:30:57.82 681 21:30:57.82 681 21:30:57 681 21:30:57.8 681 21:30:57.82 681 21:30:57.820 681 21:30:57.820 681 21:30:57 681 21:30:57.8 681 21:30:57.82 681 21:30:57.820 681 21:30:57.8205 681 21:30:57.8205 681 21:30:57 681 21:30:57.8 681 21:30:57.82 681 21:30:57.820 681 21:30:57.8205 681 21:30:57.82047 681 21:30:57.82047 ***** ****** ******* 16348:25 16348:25 16348:25 16348:25 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09 16348:25:09.2 16348:25:09.2 16348:25:09.2 16348:25:09.2 16348:25:09 16348:25:09.2 16348:25:09.15 16348:25:09.15 16348:25:09.15 16348:25:09.15 16348:25:09 16348:25:09.2 16348:25:09.15 16348:25:09.154 16348:25:09.154 16348:25:09.154 16348:25:09.154 ******** 681 04:25 681 04:25 681 04:25 681 04:25:09 681 04:25:09 681 04:25:09 681 04:25:09 681 04:25:09.2 681 04:25:09.2 681 04:25:09 681 04:25:09.2 681 04:25:09.15 681 04:25:09.15 681 04:25:09 681 04:25:09.2 681 04:25:09.15 681 04:25:09.154 681 04:25:09.154 681 04:25:09 681 04:25:09.2 681 04:25:09.15 681 04:25:09.154 681 04:25:09.1539 681 04:25:09.1539 681 04:25:09 681 04:25:09.2 681 04:25:09.15 681 04:25:09.154 681 04:25:09.1539 681 04:25:09.15395 681 04:25:09.15395 ***** ****** ******* 16350:49 16350:49 16350:49 16350:49 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27 16350:49:27.1 16350:49:27.1 16350:49:27.1 16350:49:27.1 16350:49:27 16350:49:27.1 16350:49:27.11 16350:49:27.11 16350:49:27.11 16350:49:27.11 16350:49:27 16350:49:27.1 16350:49:27.11 16350:49:27.105 16350:49:27.105 16350:49:27.105 16350:49:27.105 ******** 681 06:49 681 06:49 681 06:49 681 06:49:27 681 06:49:27 681 06:49:27 681 06:49:27 681 06:49:27.1 681 06:49:27.1 681 06:49:27 681 06:49:27.1 681 06:49:27.11 681 06:49:27.11 681 06:49:27 681 06:49:27.1 681 06:49:27.11 681 06:49:27.105 681 06:49:27.105 681 06:49:27 681 06:49:27.1 681 06:49:27.11 681 06:49:27.105 681 06:49:27.1053 681 06:49:27.1053 681 06:49:27 681 06:49:27.1 681 06:49:27.11 681 06:49:27.105 681 06:49:27.1053 681 06:49:27.10533 681 06:49:27.10533 ***** ****** ******* 16346:57 16346:57 16346:57 16346:57 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52 16346:57:52.5 16346:57:52.5 16346:57:52.5 16346:57:52.5 16346:57:52 16346:57:52.5 16346:57:52.48 16346:57:52.48 16346:57:52.48 16346:57:52.48 16346:57:52 16346:57:52.5 16346:57:52.48 16346:57:52.482 16346:57:52.482 16346:57:52.482 16346:57:52.482 ******** 681 02:57 681 02:57 681 02:57 681 02:57:52 681 02:57:52 681 02:57:52 681 02:57:52 681 02:57:52.5 681 02:57:52.5 681 02:57:52 681 02:57:52.5 681 02:57:52.48 681 02:57:52.48 681 02:57:52 681 02:57:52.5 681 02:57:52.48 681 02:57:52.482 681 02:57:52.482 681 02:57:52 681 02:57:52.5 681 02:57:52.48 681 02:57:52.482 681 02:57:52.4823 681 02:57:52.4823 681 02:57:52 681 02:57:52.5 681 02:57:52.48 681 02:57:52.482 681 02:57:52.4823 681 02:57:52.48229 681 02:57:52.48229 ***** ****** ******* 16360:45 16360:45 16360:45 16360:45 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44 16360:45:44.7 16360:45:44.7 16360:45:44.7 16360:45:44.7 16360:45:44 16360:45:44.7 16360:45:44.66 16360:45:44.66 16360:45:44.66 16360:45:44.66 16360:45:44 16360:45:44.7 16360:45:44.66 16360:45:44.658 16360:45:44.658 16360:45:44.658 16360:45:44.658 ******** 681 16:45 681 16:45 681 16:45 681 16:45:44 681 16:45:44 681 16:45:44 681 16:45:44 681 16:45:44.7 681 16:45:44.7 681 16:45:44 681 16:45:44.7 681 16:45:44.66 681 16:45:44.66 681 16:45:44 681 16:45:44.7 681 16:45:44.66 681 16:45:44.658 681 16:45:44.658 681 16:45:44 681 16:45:44.7 681 16:45:44.66 681 16:45:44.658 681 16:45:44.6583 681 16:45:44.6583 681 16:45:44 681 16:45:44.7 681 16:45:44.66 681 16:45:44.658 681 16:45:44.6583 681 16:45:44.65827 681 16:45:44.65827 ***** ****** ******* 16365:30 16365:30 16365:30 16365:30 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57 16365:30:57.6 16365:30:57.6 16365:30:57.6 16365:30:57.6 16365:30:57 16365:30:57.6 16365:30:57.58 16365:30:57.58 16365:30:57.58 16365:30:57.58 16365:30:57 16365:30:57.6 16365:30:57.58 16365:30:57.582 16365:30:57.582 16365:30:57.582 16365:30:57.582 ******** 681 21:30 681 21:30 681 21:30 681 21:30:57 681 21:30:57 681 21:30:57 681 21:30:57 681 21:30:57.6 681 21:30:57.6 681 21:30:57 681 21:30:57.6 681 21:30:57.58 681 21:30:57.58 681 21:30:57 681 21:30:57.6 681 21:30:57.58 681 21:30:57.582 681 21:30:57.582 681 21:30:57 681 21:30:57.6 681 21:30:57.58 681 21:30:57.582 681 21:30:57.5822 681 21:30:57.5822 681 21:30:57 681 21:30:57.6 681 21:30:57.58 681 21:30:57.582 681 21:30:57.5822 681 21:30:57.58219 681 21:30:57.58219 ***** ****** ******* 16366:30 16366:30 16366:30 16366:30 16366:30:04 16366:30:04 16366:30:04 16366:30:04 16366:30:04 16366:30:04 16366:30:04 16366:30:04 16366:30:04.2 16366:30:04.2 16366:30:04.2 16366:30:04.2 16366:30:04 16366:30:04.2 16366:30:04.18 16366:30:04.18 16366:30:04.18 16366:30:04.18 16366:30:04 16366:30:04.2 16366:30:04.18 16366:30:04.183 16366:30:04.183 16366:30:04.183 16366:30:04.183 ******** 681 22:30 681 22:30 681 22:30 681 22:30:04 681 22:30:04 681 22:30:04 681 22:30:04 681 22:30:04.2 681 22:30:04.2 681 22:30:04 681 22:30:04.2 681 22:30:04.18 681 22:30:04.18 681 22:30:04 681 22:30:04.2 681 22:30:04.18 681 22:30:04.183 681 22:30:04.183 681 22:30:04 681 22:30:04.2 681 22:30:04.18 681 22:30:04.183 681 22:30:04.1835 681 22:30:04.1835 681 22:30:04 681 22:30:04.2 681 22:30:04.18 681 22:30:04.183 681 22:30:04.1835 681 22:30:04.18347 681 22:30:04.18347 ***** ****** ******* 16345:56 16345:56 16345:56 16345:56 16345:56:51 16345:56:51 16345:56:51 16345:56:51 16345:56:51 16345:56:51 16345:56:51 16345:56:51 16345:56:51.6 16345:56:51.6 16345:56:51.6 16345:56:51.6 16345:56:51 16345:56:51.6 16345:56:51.59 16345:56:51.59 16345:56:51.59 16345:56:51.59 16345:56:51 16345:56:51.6 16345:56:51.59 16345:56:51.593 16345:56:51.593 16345:56:51.593 16345:56:51.593 ******** 681 01:56 681 01:56 681 01:56 681 01:56:51 681 01:56:51 681 01:56:51 681 01:56:51 681 01:56:51.6 681 01:56:51.6 681 01:56:51 681 01:56:51.6 681 01:56:51.59 681 01:56:51.59 681 01:56:51 681 01:56:51.6 681 01:56:51.59 681 01:56:51.593 681 01:56:51.593 681 01:56:51 681 01:56:51.6 681 01:56:51.59 681 01:56:51.593 681 01:56:51.5932 681 01:56:51.5932 681 01:56:51 681 01:56:51.6 681 01:56:51.59 681 01:56:51.593 681 01:56:51.5932 681 01:56:51.59319 681 01:56:51.59319 0:00 0:00 0:00:00 0:00:00 0:00:00 0:00:00 0:00:00.0 0:00:00 0:00:00.0 0:00:00.00 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00.00000 0:00:00 0:00:00.0 0:00:00.00 0:00:00.000 0:00:00.0000 0:00:00.00000 0:00:00.000000 0 00:00 0 00:00 0 00:00:00 0 00:00:00 0 00:00:00 0 00:00:00 0 00:00:00.0 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00.00000 0 00:00:00 0 00:00:00.0 0 00:00:00.00 0 00:00:00.000 0 00:00:00.0000 0 00:00:00.00000 0 00:00:00.000000 -4:50 -4:50 -4:50 -4:50:38 -4:50:38 -4:50:38 -4:50:38.1 -4:50:38 -4:50:38.1 -4:50:38.12 -4:50:38 -4:50:38.1 -4:50:38.12 -4:50:38.123 -4:50:38 -4:50:38.1 -4:50:38.12 -4:50:38.123 -4:50:38.1230 -4:50:38 -4:50:38.1 -4:50:38.12 -4:50:38.123 -4:50:38.1230 -4:50:38.12301 -4:50:38 -4:50:38.1 -4:50:38.12 -4:50:38.123 -4:50:38.1230 -4:50:38.12301 -4:50:38.123010 -0 04:50 -0 04:50 -0 04:50 -0 04:50:38 -0 04:50:38 -0 04:50:38 -0 04:50:38.1 -0 04:50:38 -0 04:50:38.1 -0 04:50:38.12 -0 04:50:38 -0 04:50:38.1 -0 04:50:38.12 -0 04:50:38.123 -0 04:50:38 -0 04:50:38.1 -0 04:50:38.12 -0 04:50:38.123 -0 04:50:38.1230 -0 04:50:38 -0 04:50:38.1 -0 04:50:38.12 -0 04:50:38.123 -0 04:50:38.1230 -0 04:50:38.12301 -0 04:50:38 -0 04:50:38.1 -0 04:50:38.12 -0 04:50:38.123 -0 04:50:38.1230 -0 04:50:38.12301 -0 04:50:38.123010 ***** -12:31 -12:31 -12:31 -12:31:35 -12:31:35 -12:31:35 -12:31:35 -12:31:35.2 -12:31:35.2 -12:31:35 -12:31:35.2 -12:31:35.23 -12:31:35.23 -12:31:35 -12:31:35.2 -12:31:35.23 -12:31:35.235 -12:31:35.235 -12:31:35 -12:31:35.2 -12:31:35.23 -12:31:35.235 -12:31:35.2345 -12:31:35.2345 -12:31:35 -12:31:35.2 -12:31:35.23 -12:31:35.235 -12:31:35.2345 -12:31:35.23453 -12:31:35.23453 -0 12:31 -0 12:31 -0 12:31 -0 12:31:35 -0 12:31:35 -0 12:31:35 -0 12:31:35.2 -0 12:31:35 -0 12:31:35.2 -0 12:31:35.23 -0 12:31:35 -0 12:31:35.2 -0 12:31:35.23 -0 12:31:35.235 -0 12:31:35 -0 12:31:35.2 -0 12:31:35.23 -0 12:31:35.235 -0 12:31:35.2345 -0 12:31:35 -0 12:31:35.2 -0 12:31:35.23 -0 12:31:35.235 -0 12:31:35.2345 -0 12:31:35.23453 -0 12:31:35 -0 12:31:35.2 -0 12:31:35.23 -0 12:31:35.235 -0 12:31:35.2345 -0 12:31:35.23453 -0 12:31:35.234530 ***** -12:47 -12:47 -12:47 -12:47:53 -12:47:53 -12:47:53 -12:47:53 -12:47:53.3 -12:47:53.3 -12:47:53 -12:47:53.3 -12:47:53.35 -12:47:53.35 -12:47:53 -12:47:53.3 -12:47:53.35 -12:47:53.345 -12:47:53.345 -12:47:53 -12:47:53.3 -12:47:53.35 -12:47:53.345 -12:47:53.3451 -12:47:53.3451 -12:47:53 -12:47:53.3 -12:47:53.35 -12:47:53.345 -12:47:53.3451 -12:47:53.34505 -12:47:53.34505 -0 12:47 -0 12:47 -0 12:47 -0 12:47:53 -0 12:47:53 -0 12:47:53 -0 12:47:53.3 -0 12:47:53 -0 12:47:53.3 -0 12:47:53.35 -0 12:47:53 -0 12:47:53.3 -0 12:47:53.35 -0 12:47:53.345 -0 12:47:53 -0 12:47:53.3 -0 12:47:53.35 -0 12:47:53.345 -0 12:47:53.3451 -0 12:47:53 -0 12:47:53.3 -0 12:47:53.35 -0 12:47:53.345 -0 12:47:53.3451 -0 12:47:53.34505 -0 12:47:53 -0 12:47:53.3 -0 12:47:53.35 -0 12:47:53.345 -0 12:47:53.3451 -0 12:47:53.34505 -0 12:47:53.345050 -1:26 -1:26 -1:26 -1:26:00 -1:26:00 -1:26:00 -1:26:00.5 -1:26:00 -1:26:00.5 -1:26:00.46 -1:26:00 -1:26:00.5 -1:26:00.46 -1:26:00.456 -1:26:00 -1:26:00.5 -1:26:00.46 -1:26:00.456 -1:26:00.4561 -1:26:00 -1:26:00.5 -1:26:00.46 -1:26:00.456 -1:26:00.4561 -1:26:00.45615 -1:26:00 -1:26:00.5 -1:26:00.46 -1:26:00.456 -1:26:00.4561 -1:26:00.45615 -1:26:00.456150 -0 01:26 -0 01:26 -0 01:26 -0 01:26:00 -0 01:26:00 -0 01:26:00 -0 01:26:00.5 -0 01:26:00 -0 01:26:00.5 -0 01:26:00.46 -0 01:26:00 -0 01:26:00.5 -0 01:26:00.46 -0 01:26:00.456 -0 01:26:00 -0 01:26:00.5 -0 01:26:00.46 -0 01:26:00.456 -0 01:26:00.4561 -0 01:26:00 -0 01:26:00.5 -0 01:26:00.46 -0 01:26:00.456 -0 01:26:00.4561 -0 01:26:00.45615 -0 01:26:00 -0 01:26:00.5 -0 01:26:00.46 -0 01:26:00.456 -0 01:26:00.4561 -0 01:26:00.45615 -0 01:26:00.456150 ***** -20:58 -20:58 -20:58 -20:58:11 -20:58:11 -20:58:11 -20:58:11 -20:58:11.6 -20:58:11.6 -20:58:11 -20:58:11.6 -20:58:11.57 -20:58:11.57 -20:58:11 -20:58:11.6 -20:58:11.57 -20:58:11.567 -20:58:11.567 -20:58:11 -20:58:11.6 -20:58:11.57 -20:58:11.567 -20:58:11.5668 -20:58:11.5668 -20:58:11 -20:58:11.6 -20:58:11.57 -20:58:11.567 -20:58:11.5668 -20:58:11.56677 -20:58:11.56677 -0 20:58 -0 20:58 -0 20:58 -0 20:58:11 -0 20:58:11 -0 20:58:11 -0 20:58:11.6 -0 20:58:11 -0 20:58:11.6 -0 20:58:11.57 -0 20:58:11 -0 20:58:11.6 -0 20:58:11.57 -0 20:58:11.567 -0 20:58:11 -0 20:58:11.6 -0 20:58:11.57 -0 20:58:11.567 -0 20:58:11.5668 -0 20:58:11 -0 20:58:11.6 -0 20:58:11.57 -0 20:58:11.567 -0 20:58:11.5668 -0 20:58:11.56677 -0 20:58:11 -0 20:58:11.6 -0 20:58:11.57 -0 20:58:11.567 -0 20:58:11.5668 -0 20:58:11.56677 -0 20:58:11.566770 -7:36 -7:36 -7:36 -7:36:05 -7:36:05 -7:36:05 -7:36:05.2 -7:36:05 -7:36:05.2 -7:36:05.19 -7:36:05 -7:36:05.2 -7:36:05.19 -7:36:05.190 -7:36:05 -7:36:05.2 -7:36:05.19 -7:36:05.190 -7:36:05.1896 -7:36:05 -7:36:05.2 -7:36:05.19 -7:36:05.190 -7:36:05.1896 -7:36:05.18964 -7:36:05 -7:36:05.2 -7:36:05.19 -7:36:05.190 -7:36:05.1896 -7:36:05.18964 -7:36:05.189640 -0 07:36 -0 07:36 -0 07:36 -0 07:36:05 -0 07:36:05 -0 07:36:05 -0 07:36:05.2 -0 07:36:05 -0 07:36:05.2 -0 07:36:05.19 -0 07:36:05 -0 07:36:05.2 -0 07:36:05.19 -0 07:36:05.190 -0 07:36:05 -0 07:36:05.2 -0 07:36:05.19 -0 07:36:05.190 -0 07:36:05.1896 -0 07:36:05 -0 07:36:05.2 -0 07:36:05.19 -0 07:36:05.190 -0 07:36:05.1896 -0 07:36:05.18964 -0 07:36:05 -0 07:36:05.2 -0 07:36:05.19 -0 07:36:05.190 -0 07:36:05.1896 -0 07:36:05.18964 -0 07:36:05.189640 ***** -15:43 -15:43 -15:43 -15:43:49 -15:43:49 -15:43:49 -15:43:49 -15:43:49.8 -15:43:49.8 -15:43:49 -15:43:49.8 -15:43:49.83 -15:43:49.83 -15:43:49 -15:43:49.8 -15:43:49.83 -15:43:49.831 -15:43:49.831 -15:43:49 -15:43:49.8 -15:43:49.83 -15:43:49.831 -15:43:49.8313 -15:43:49.8313 -15:43:49 -15:43:49.8 -15:43:49.83 -15:43:49.831 -15:43:49.8313 -15:43:49.83132 -15:43:49.83132 -0 15:43 -0 15:43 -0 15:43 -0 15:43:49 -0 15:43:49 -0 15:43:49 -0 15:43:49.8 -0 15:43:49 -0 15:43:49.8 -0 15:43:49.83 -0 15:43:49 -0 15:43:49.8 -0 15:43:49.83 -0 15:43:49.831 -0 15:43:49 -0 15:43:49.8 -0 15:43:49.83 -0 15:43:49.831 -0 15:43:49.8313 -0 15:43:49 -0 15:43:49.8 -0 15:43:49.83 -0 15:43:49.831 -0 15:43:49.8313 -0 15:43:49.83132 -0 15:43:49 -0 15:43:49.8 -0 15:43:49.83 -0 15:43:49.831 -0 15:43:49.8313 -0 15:43:49.83132 -0 15:43:49.831320 -4:25 -4:25 -4:25 -4:25:09 -4:25:09 -4:25:09 -4:25:09.0 -4:25:09 -4:25:09.0 -4:25:09.01 -4:25:09 -4:25:09.0 -4:25:09.01 -4:25:09.013 -4:25:09 -4:25:09.0 -4:25:09.01 -4:25:09.013 -4:25:09.0129 -4:25:09 -4:25:09.0 -4:25:09.01 -4:25:09.013 -4:25:09.0129 -4:25:09.01293 -4:25:09 -4:25:09.0 -4:25:09.01 -4:25:09.013 -4:25:09.0129 -4:25:09.01293 -4:25:09.012930 -0 04:25 -0 04:25 -0 04:25 -0 04:25:09 -0 04:25:09 -0 04:25:09 -0 04:25:09.0 -0 04:25:09 -0 04:25:09.0 -0 04:25:09.01 -0 04:25:09 -0 04:25:09.0 -0 04:25:09.01 -0 04:25:09.013 -0 04:25:09 -0 04:25:09.0 -0 04:25:09.01 -0 04:25:09.013 -0 04:25:09.0129 -0 04:25:09 -0 04:25:09.0 -0 04:25:09.01 -0 04:25:09.013 -0 04:25:09.0129 -0 04:25:09.01293 -0 04:25:09 -0 04:25:09.0 -0 04:25:09.01 -0 04:25:09.013 -0 04:25:09.0129 -0 04:25:09.01293 -0 04:25:09.012930 -6:49 -6:49 -6:49 -6:49:27 -6:49:27 -6:49:27 -6:49:27.5 -6:49:27 -6:49:27.5 -6:49:27.52 -6:49:27 -6:49:27.5 -6:49:27.52 -6:49:27.524 -6:49:27 -6:49:27.5 -6:49:27.52 -6:49:27.524 -6:49:27.5238 -6:49:27 -6:49:27.5 -6:49:27.52 -6:49:27.524 -6:49:27.5238 -6:49:27.52375 -6:49:27 -6:49:27.5 -6:49:27.52 -6:49:27.524 -6:49:27.5238 -6:49:27.52375 -6:49:27.523750 -0 06:49 -0 06:49 -0 06:49 -0 06:49:27 -0 06:49:27 -0 06:49:27 -0 06:49:27.5 -0 06:49:27 -0 06:49:27.5 -0 06:49:27.52 -0 06:49:27 -0 06:49:27.5 -0 06:49:27.52 -0 06:49:27.524 -0 06:49:27 -0 06:49:27.5 -0 06:49:27.52 -0 06:49:27.524 -0 06:49:27.5238 -0 06:49:27 -0 06:49:27.5 -0 06:49:27.52 -0 06:49:27.524 -0 06:49:27.5238 -0 06:49:27.52375 -0 06:49:27 -0 06:49:27.5 -0 06:49:27.52 -0 06:49:27.524 -0 06:49:27.5238 -0 06:49:27.52375 -0 06:49:27.523750 -2:57 -2:57 -2:57 -2:57:52 -2:57:52 -2:57:52 -2:57:52.0 -2:57:52 -2:57:52.0 -2:57:52.02 -2:57:52 -2:57:52.0 -2:57:52.02 -2:57:52.016 -2:57:52 -2:57:52.0 -2:57:52.02 -2:57:52.016 -2:57:52.0156 -2:57:52 -2:57:52.0 -2:57:52.02 -2:57:52.016 -2:57:52.0156 -2:57:52.01565 -2:57:52 -2:57:52.0 -2:57:52.02 -2:57:52.016 -2:57:52.0156 -2:57:52.01565 -2:57:52.015650 -0 02:57 -0 02:57 -0 02:57 -0 02:57:52 -0 02:57:52 -0 02:57:52 -0 02:57:52.0 -0 02:57:52 -0 02:57:52.0 -0 02:57:52.02 -0 02:57:52 -0 02:57:52.0 -0 02:57:52.02 -0 02:57:52.016 -0 02:57:52 -0 02:57:52.0 -0 02:57:52.02 -0 02:57:52.016 -0 02:57:52.0156 -0 02:57:52 -0 02:57:52.0 -0 02:57:52.02 -0 02:57:52.016 -0 02:57:52.0156 -0 02:57:52.01565 -0 02:57:52 -0 02:57:52.0 -0 02:57:52.02 -0 02:57:52.016 -0 02:57:52.0156 -0 02:57:52.01565 -0 02:57:52.015650 ***** -16:45 -16:45 -16:45 -16:45:44 -16:45:44 -16:45:44 -16:45:44 -16:45:44.9 -16:45:44.9 -16:45:44 -16:45:44.9 -16:45:44.87 -16:45:44.87 -16:45:44 -16:45:44.9 -16:45:44.87 -16:45:44.865 -16:45:44.865 -16:45:44 -16:45:44.9 -16:45:44.87 -16:45:44.865 -16:45:44.8653 -16:45:44.8653 -16:45:44 -16:45:44.9 -16:45:44.87 -16:45:44.865 -16:45:44.8653 -16:45:44.86529 -16:45:44.86529 -0 16:45 -0 16:45 -0 16:45 -0 16:45:44 -0 16:45:44 -0 16:45:44 -0 16:45:44.9 -0 16:45:44 -0 16:45:44.9 -0 16:45:44.87 -0 16:45:44 -0 16:45:44.9 -0 16:45:44.87 -0 16:45:44.865 -0 16:45:44 -0 16:45:44.9 -0 16:45:44.87 -0 16:45:44.865 -0 16:45:44.8653 -0 16:45:44 -0 16:45:44.9 -0 16:45:44.87 -0 16:45:44.865 -0 16:45:44.8653 -0 16:45:44.86529 -0 16:45:44 -0 16:45:44.9 -0 16:45:44.87 -0 16:45:44.865 -0 16:45:44.8653 -0 16:45:44.86529 -0 16:45:44.865290 ***** -21:30 -21:30 -21:30 -21:30:57 -21:30:57 -21:30:57 -21:30:57 -21:30:57.8 -21:30:57.8 -21:30:57 -21:30:57.8 -21:30:57.82 -21:30:57.82 -21:30:57 -21:30:57.8 -21:30:57.82 -21:30:57.820 -21:30:57.820 -21:30:57 -21:30:57.8 -21:30:57.82 -21:30:57.820 -21:30:57.8205 -21:30:57.8205 -21:30:57 -21:30:57.8 -21:30:57.82 -21:30:57.820 -21:30:57.8205 -21:30:57.82047 -21:30:57.82047 -0 21:30 -0 21:30 -0 21:30 -0 21:30:57 -0 21:30:57 -0 21:30:57 -0 21:30:57.8 -0 21:30:57 -0 21:30:57.8 -0 21:30:57.82 -0 21:30:57 -0 21:30:57.8 -0 21:30:57.82 -0 21:30:57.820 -0 21:30:57 -0 21:30:57.8 -0 21:30:57.82 -0 21:30:57.820 -0 21:30:57.8205 -0 21:30:57 -0 21:30:57.8 -0 21:30:57.82 -0 21:30:57.820 -0 21:30:57.8205 -0 21:30:57.82047 -0 21:30:57 -0 21:30:57.8 -0 21:30:57.82 -0 21:30:57.820 -0 21:30:57.8205 -0 21:30:57.82047 -0 21:30:57.820470 -4:25 -4:25 -4:25 -4:25:09 -4:25:09 -4:25:09 -4:25:09.2 -4:25:09 -4:25:09.2 -4:25:09.15 -4:25:09 -4:25:09.2 -4:25:09.15 -4:25:09.154 -4:25:09 -4:25:09.2 -4:25:09.15 -4:25:09.154 -4:25:09.1539 -4:25:09 -4:25:09.2 -4:25:09.15 -4:25:09.154 -4:25:09.1539 -4:25:09.15395 -4:25:09 -4:25:09.2 -4:25:09.15 -4:25:09.154 -4:25:09.1539 -4:25:09.15395 -4:25:09.153950 -0 04:25 -0 04:25 -0 04:25 -0 04:25:09 -0 04:25:09 -0 04:25:09 -0 04:25:09.2 -0 04:25:09 -0 04:25:09.2 -0 04:25:09.15 -0 04:25:09 -0 04:25:09.2 -0 04:25:09.15 -0 04:25:09.154 -0 04:25:09 -0 04:25:09.2 -0 04:25:09.15 -0 04:25:09.154 -0 04:25:09.1539 -0 04:25:09 -0 04:25:09.2 -0 04:25:09.15 -0 04:25:09.154 -0 04:25:09.1539 -0 04:25:09.15395 -0 04:25:09 -0 04:25:09.2 -0 04:25:09.15 -0 04:25:09.154 -0 04:25:09.1539 -0 04:25:09.15395 -0 04:25:09.153950 -6:49 -6:49 -6:49 -6:49:27 -6:49:27 -6:49:27 -6:49:27.1 -6:49:27 -6:49:27.1 -6:49:27.11 -6:49:27 -6:49:27.1 -6:49:27.11 -6:49:27.105 -6:49:27 -6:49:27.1 -6:49:27.11 -6:49:27.105 -6:49:27.1053 -6:49:27 -6:49:27.1 -6:49:27.11 -6:49:27.105 -6:49:27.1053 -6:49:27.10533 -6:49:27 -6:49:27.1 -6:49:27.11 -6:49:27.105 -6:49:27.1053 -6:49:27.10533 -6:49:27.105330 -0 06:49 -0 06:49 -0 06:49 -0 06:49:27 -0 06:49:27 -0 06:49:27 -0 06:49:27.1 -0 06:49:27 -0 06:49:27.1 -0 06:49:27.11 -0 06:49:27 -0 06:49:27.1 -0 06:49:27.11 -0 06:49:27.105 -0 06:49:27 -0 06:49:27.1 -0 06:49:27.11 -0 06:49:27.105 -0 06:49:27.1053 -0 06:49:27 -0 06:49:27.1 -0 06:49:27.11 -0 06:49:27.105 -0 06:49:27.1053 -0 06:49:27.10533 -0 06:49:27 -0 06:49:27.1 -0 06:49:27.11 -0 06:49:27.105 -0 06:49:27.1053 -0 06:49:27.10533 -0 06:49:27.105330 -2:57 -2:57 -2:57 -2:57:52 -2:57:52 -2:57:52 -2:57:52.5 -2:57:52 -2:57:52.5 -2:57:52.48 -2:57:52 -2:57:52.5 -2:57:52.48 -2:57:52.482 -2:57:52 -2:57:52.5 -2:57:52.48 -2:57:52.482 -2:57:52.4823 -2:57:52 -2:57:52.5 -2:57:52.48 -2:57:52.482 -2:57:52.4823 -2:57:52.48229 -2:57:52 -2:57:52.5 -2:57:52.48 -2:57:52.482 -2:57:52.4823 -2:57:52.48229 -2:57:52.482290 -0 02:57 -0 02:57 -0 02:57 -0 02:57:52 -0 02:57:52 -0 02:57:52 -0 02:57:52.5 -0 02:57:52 -0 02:57:52.5 -0 02:57:52.48 -0 02:57:52 -0 02:57:52.5 -0 02:57:52.48 -0 02:57:52.482 -0 02:57:52 -0 02:57:52.5 -0 02:57:52.48 -0 02:57:52.482 -0 02:57:52.4823 -0 02:57:52 -0 02:57:52.5 -0 02:57:52.48 -0 02:57:52.482 -0 02:57:52.4823 -0 02:57:52.48229 -0 02:57:52 -0 02:57:52.5 -0 02:57:52.48 -0 02:57:52.482 -0 02:57:52.4823 -0 02:57:52.48229 -0 02:57:52.482290 ***** -16:45 -16:45 -16:45 -16:45:44 -16:45:44 -16:45:44 -16:45:44 -16:45:44.7 -16:45:44.7 -16:45:44 -16:45:44.7 -16:45:44.66 -16:45:44.66 -16:45:44 -16:45:44.7 -16:45:44.66 -16:45:44.658 -16:45:44.658 -16:45:44 -16:45:44.7 -16:45:44.66 -16:45:44.658 -16:45:44.6583 -16:45:44.6583 -16:45:44 -16:45:44.7 -16:45:44.66 -16:45:44.658 -16:45:44.6583 -16:45:44.65827 -16:45:44.65827 -0 16:45 -0 16:45 -0 16:45 -0 16:45:44 -0 16:45:44 -0 16:45:44 -0 16:45:44.7 -0 16:45:44 -0 16:45:44.7 -0 16:45:44.66 -0 16:45:44 -0 16:45:44.7 -0 16:45:44.66 -0 16:45:44.658 -0 16:45:44 -0 16:45:44.7 -0 16:45:44.66 -0 16:45:44.658 -0 16:45:44.6583 -0 16:45:44 -0 16:45:44.7 -0 16:45:44.66 -0 16:45:44.658 -0 16:45:44.6583 -0 16:45:44.65827 -0 16:45:44 -0 16:45:44.7 -0 16:45:44.66 -0 16:45:44.658 -0 16:45:44.6583 -0 16:45:44.65827 -0 16:45:44.658270 ***** -21:30 -21:30 -21:30 -21:30:57 -21:30:57 -21:30:57 -21:30:57 -21:30:57.6 -21:30:57.6 -21:30:57 -21:30:57.6 -21:30:57.58 -21:30:57.58 -21:30:57 -21:30:57.6 -21:30:57.58 -21:30:57.582 -21:30:57.582 -21:30:57 -21:30:57.6 -21:30:57.58 -21:30:57.582 -21:30:57.5822 -21:30:57.5822 -21:30:57 -21:30:57.6 -21:30:57.58 -21:30:57.582 -21:30:57.5822 -21:30:57.58219 -21:30:57.58219 -0 21:30 -0 21:30 -0 21:30 -0 21:30:57 -0 21:30:57 -0 21:30:57 -0 21:30:57.6 -0 21:30:57 -0 21:30:57.6 -0 21:30:57.58 -0 21:30:57 -0 21:30:57.6 -0 21:30:57.58 -0 21:30:57.582 -0 21:30:57 -0 21:30:57.6 -0 21:30:57.58 -0 21:30:57.582 -0 21:30:57.5822 -0 21:30:57 -0 21:30:57.6 -0 21:30:57.58 -0 21:30:57.582 -0 21:30:57.5822 -0 21:30:57.58219 -0 21:30:57 -0 21:30:57.6 -0 21:30:57.58 -0 21:30:57.582 -0 21:30:57.5822 -0 21:30:57.58219 -0 21:30:57.582190 ***** -22:30 -22:30 -22:30 -22:30:04 -22:30:04 -22:30:04 -22:30:04 -22:30:04.2 -22:30:04.2 -22:30:04 -22:30:04.2 -22:30:04.18 -22:30:04.18 -22:30:04 -22:30:04.2 -22:30:04.18 -22:30:04.183 -22:30:04.183 -22:30:04 -22:30:04.2 -22:30:04.18 -22:30:04.183 -22:30:04.1835 -22:30:04.1835 -22:30:04 -22:30:04.2 -22:30:04.18 -22:30:04.183 -22:30:04.1835 -22:30:04.18347 -22:30:04.18347 -0 22:30 -0 22:30 -0 22:30 -0 22:30:04 -0 22:30:04 -0 22:30:04 -0 22:30:04.2 -0 22:30:04 -0 22:30:04.2 -0 22:30:04.18 -0 22:30:04 -0 22:30:04.2 -0 22:30:04.18 -0 22:30:04.183 -0 22:30:04 -0 22:30:04.2 -0 22:30:04.18 -0 22:30:04.183 -0 22:30:04.1835 -0 22:30:04 -0 22:30:04.2 -0 22:30:04.18 -0 22:30:04.183 -0 22:30:04.1835 -0 22:30:04.18347 -0 22:30:04 -0 22:30:04.2 -0 22:30:04.18 -0 22:30:04.183 -0 22:30:04.1835 -0 22:30:04.18347 -0 22:30:04.183470 -1:56 -1:56 -1:56 -1:56:51 -1:56:51 -1:56:51 -1:56:51.6 -1:56:51 -1:56:51.6 -1:56:51.59 -1:56:51 -1:56:51.6 -1:56:51.59 -1:56:51.593 -1:56:51 -1:56:51.6 -1:56:51.59 -1:56:51.593 -1:56:51.5932 -1:56:51 -1:56:51.6 -1:56:51.59 -1:56:51.593 -1:56:51.5932 -1:56:51.59319 -1:56:51 -1:56:51.6 -1:56:51.59 -1:56:51.593 -1:56:51.5932 -1:56:51.59319 -1:56:51.593190 -0 01:56 -0 01:56 -0 01:56 -0 01:56:51 -0 01:56:51 -0 01:56:51 -0 01:56:51.6 -0 01:56:51 -0 01:56:51.6 -0 01:56:51.59 -0 01:56:51 -0 01:56:51.6 -0 01:56:51.59 -0 01:56:51.593 -0 01:56:51 -0 01:56:51.6 -0 01:56:51.59 -0 01:56:51.593 -0 01:56:51.5932 -0 01:56:51 -0 01:56:51.6 -0 01:56:51.59 -0 01:56:51.593 -0 01:56:51.5932 -0 01:56:51.59319 -0 01:56:51 -0 01:56:51.6 -0 01:56:51.59 -0 01:56:51.593 -0 01:56:51.5932 -0 01:56:51.59319 -0 01:56:51.593190 ***** -24:00 -24:00 -24:00 -24:00:00 -24:00:00 -24:00:00 -24:00:00 -24:00:00.0 -24:00:00.0 -24:00:00 -24:00:00.0 -24:00:00.00 -24:00:00.00 -24:00:00 -24:00:00.0 -24:00:00.00 -24:00:00.000 -24:00:00.000 -24:00:00 -24:00:00.0 -24:00:00.00 -24:00:00.000 -24:00:00.0000 -24:00:00.0000 -24:00:00 -24:00:00.0 -24:00:00.00 -24:00:00.000 -24:00:00.0000 -24:00:00.00000 -24:00:00.00000 -1 00:00 -1 00:00 -1 00:00 -1 00:00:00 -1 00:00:00 -1 00:00:00 -1 00:00:00.0 -1 00:00:00 -1 00:00:00.0 -1 00:00:00.00 -1 00:00:00 -1 00:00:00.0 -1 00:00:00.00 -1 00:00:00.000 -1 00:00:00 -1 00:00:00.0 -1 00:00:00.00 -1 00:00:00.000 -1 00:00:00.0000 -1 00:00:00 -1 00:00:00.0 -1 00:00:00.00 -1 00:00:00.000 -1 00:00:00.0000 -1 00:00:00.00000 -1 00:00:00 -1 00:00:00.0 -1 00:00:00.00 -1 00:00:00.000 -1 00:00:00.0000 -1 00:00:00.00000 -1 00:00:00.000000 ***** -28:50 -28:50 -28:50 -28:50:38 -28:50:38 -28:50:38 -28:50:38 -28:50:38.1 -28:50:38.1 -28:50:38 -28:50:38.1 -28:50:38.12 -28:50:38.12 -28:50:38 -28:50:38.1 -28:50:38.12 -28:50:38.123 -28:50:38.123 -28:50:38 -28:50:38.1 -28:50:38.12 -28:50:38.123 -28:50:38.1230 -28:50:38.1230 -28:50:38 -28:50:38.1 -28:50:38.12 -28:50:38.123 -28:50:38.1230 -28:50:38.12301 -28:50:38.12301 -1 04:50 -1 04:50 -1 04:50 -1 04:50:38 -1 04:50:38 -1 04:50:38 -1 04:50:38.1 -1 04:50:38 -1 04:50:38.1 -1 04:50:38.12 -1 04:50:38 -1 04:50:38.1 -1 04:50:38.12 -1 04:50:38.123 -1 04:50:38 -1 04:50:38.1 -1 04:50:38.12 -1 04:50:38.123 -1 04:50:38.1230 -1 04:50:38 -1 04:50:38.1 -1 04:50:38.12 -1 04:50:38.123 -1 04:50:38.1230 -1 04:50:38.12301 -1 04:50:38 -1 04:50:38.1 -1 04:50:38.12 -1 04:50:38.123 -1 04:50:38.1230 -1 04:50:38.12301 -1 04:50:38.123010 ***** -36:31 -36:31 -36:31 -36:31:35 -36:31:35 -36:31:35 -36:31:35 -36:31:35.2 -36:31:35.2 -36:31:35 -36:31:35.2 -36:31:35.23 -36:31:35.23 -36:31:35 -36:31:35.2 -36:31:35.23 -36:31:35.235 -36:31:35.235 -36:31:35 -36:31:35.2 -36:31:35.23 -36:31:35.235 -36:31:35.2345 -36:31:35.2345 -36:31:35 -36:31:35.2 -36:31:35.23 -36:31:35.235 -36:31:35.2345 -36:31:35.23453 -36:31:35.23453 -1 12:31 -1 12:31 -1 12:31 -1 12:31:35 -1 12:31:35 -1 12:31:35 -1 12:31:35.2 -1 12:31:35 -1 12:31:35.2 -1 12:31:35.23 -1 12:31:35 -1 12:31:35.2 -1 12:31:35.23 -1 12:31:35.235 -1 12:31:35 -1 12:31:35.2 -1 12:31:35.23 -1 12:31:35.235 -1 12:31:35.2345 -1 12:31:35 -1 12:31:35.2 -1 12:31:35.23 -1 12:31:35.235 -1 12:31:35.2345 -1 12:31:35.23453 -1 12:31:35 -1 12:31:35.2 -1 12:31:35.23 -1 12:31:35.235 -1 12:31:35.2345 -1 12:31:35.23453 -1 12:31:35.234530 ***** -36:47 -36:47 -36:47 -36:47:53 -36:47:53 -36:47:53 -36:47:53 -36:47:53.3 -36:47:53.3 -36:47:53 -36:47:53.3 -36:47:53.35 -36:47:53.35 -36:47:53 -36:47:53.3 -36:47:53.35 -36:47:53.345 -36:47:53.345 -36:47:53 -36:47:53.3 -36:47:53.35 -36:47:53.345 -36:47:53.3451 -36:47:53.3451 -36:47:53 -36:47:53.3 -36:47:53.35 -36:47:53.345 -36:47:53.3451 -36:47:53.34505 -36:47:53.34505 -1 12:47 -1 12:47 -1 12:47 -1 12:47:53 -1 12:47:53 -1 12:47:53 -1 12:47:53.3 -1 12:47:53 -1 12:47:53.3 -1 12:47:53.35 -1 12:47:53 -1 12:47:53.3 -1 12:47:53.35 -1 12:47:53.345 -1 12:47:53 -1 12:47:53.3 -1 12:47:53.35 -1 12:47:53.345 -1 12:47:53.3451 -1 12:47:53 -1 12:47:53.3 -1 12:47:53.35 -1 12:47:53.345 -1 12:47:53.3451 -1 12:47:53.34505 -1 12:47:53 -1 12:47:53.3 -1 12:47:53.35 -1 12:47:53.345 -1 12:47:53.3451 -1 12:47:53.34505 -1 12:47:53.345050 ***** -25:26 -25:26 -25:26 -25:26:00 -25:26:00 -25:26:00 -25:26:00 -25:26:00.5 -25:26:00.5 -25:26:00 -25:26:00.5 -25:26:00.46 -25:26:00.46 -25:26:00 -25:26:00.5 -25:26:00.46 -25:26:00.456 -25:26:00.456 -25:26:00 -25:26:00.5 -25:26:00.46 -25:26:00.456 -25:26:00.4561 -25:26:00.4561 -25:26:00 -25:26:00.5 -25:26:00.46 -25:26:00.456 -25:26:00.4561 -25:26:00.45615 -25:26:00.45615 -1 01:26 -1 01:26 -1 01:26 -1 01:26:00 -1 01:26:00 -1 01:26:00 -1 01:26:00.5 -1 01:26:00 -1 01:26:00.5 -1 01:26:00.46 -1 01:26:00 -1 01:26:00.5 -1 01:26:00.46 -1 01:26:00.456 -1 01:26:00 -1 01:26:00.5 -1 01:26:00.46 -1 01:26:00.456 -1 01:26:00.4561 -1 01:26:00 -1 01:26:00.5 -1 01:26:00.46 -1 01:26:00.456 -1 01:26:00.4561 -1 01:26:00.45615 -1 01:26:00 -1 01:26:00.5 -1 01:26:00.46 -1 01:26:00.456 -1 01:26:00.4561 -1 01:26:00.45615 -1 01:26:00.456150 ***** -44:58 -44:58 -44:58 -44:58:11 -44:58:11 -44:58:11 -44:58:11 -44:58:11.6 -44:58:11.6 -44:58:11 -44:58:11.6 -44:58:11.57 -44:58:11.57 -44:58:11 -44:58:11.6 -44:58:11.57 -44:58:11.567 -44:58:11.567 -44:58:11 -44:58:11.6 -44:58:11.57 -44:58:11.567 -44:58:11.5668 -44:58:11.5668 -44:58:11 -44:58:11.6 -44:58:11.57 -44:58:11.567 -44:58:11.5668 -44:58:11.56677 -44:58:11.56677 -1 20:58 -1 20:58 -1 20:58 -1 20:58:11 -1 20:58:11 -1 20:58:11 -1 20:58:11.6 -1 20:58:11 -1 20:58:11.6 -1 20:58:11.57 -1 20:58:11 -1 20:58:11.6 -1 20:58:11.57 -1 20:58:11.567 -1 20:58:11 -1 20:58:11.6 -1 20:58:11.57 -1 20:58:11.567 -1 20:58:11.5668 -1 20:58:11 -1 20:58:11.6 -1 20:58:11.57 -1 20:58:11.567 -1 20:58:11.5668 -1 20:58:11.56677 -1 20:58:11 -1 20:58:11.6 -1 20:58:11.57 -1 20:58:11.567 -1 20:58:11.5668 -1 20:58:11.56677 -1 20:58:11.566770 ***** -31:36 -31:36 -31:36 -31:36:05 -31:36:05 -31:36:05 -31:36:05 -31:36:05.2 -31:36:05.2 -31:36:05 -31:36:05.2 -31:36:05.19 -31:36:05.19 -31:36:05 -31:36:05.2 -31:36:05.19 -31:36:05.190 -31:36:05.190 -31:36:05 -31:36:05.2 -31:36:05.19 -31:36:05.190 -31:36:05.1896 -31:36:05.1896 -31:36:05 -31:36:05.2 -31:36:05.19 -31:36:05.190 -31:36:05.1896 -31:36:05.18964 -31:36:05.18964 -1 07:36 -1 07:36 -1 07:36 -1 07:36:05 -1 07:36:05 -1 07:36:05 -1 07:36:05.2 -1 07:36:05 -1 07:36:05.2 -1 07:36:05.19 -1 07:36:05 -1 07:36:05.2 -1 07:36:05.19 -1 07:36:05.190 -1 07:36:05 -1 07:36:05.2 -1 07:36:05.19 -1 07:36:05.190 -1 07:36:05.1896 -1 07:36:05 -1 07:36:05.2 -1 07:36:05.19 -1 07:36:05.190 -1 07:36:05.1896 -1 07:36:05.18964 -1 07:36:05 -1 07:36:05.2 -1 07:36:05.19 -1 07:36:05.190 -1 07:36:05.1896 -1 07:36:05.18964 -1 07:36:05.189640 ***** -39:43 -39:43 -39:43 -39:43:49 -39:43:49 -39:43:49 -39:43:49 -39:43:49.8 -39:43:49.8 -39:43:49 -39:43:49.8 -39:43:49.83 -39:43:49.83 -39:43:49 -39:43:49.8 -39:43:49.83 -39:43:49.831 -39:43:49.831 -39:43:49 -39:43:49.8 -39:43:49.83 -39:43:49.831 -39:43:49.8313 -39:43:49.8313 -39:43:49 -39:43:49.8 -39:43:49.83 -39:43:49.831 -39:43:49.8313 -39:43:49.83132 -39:43:49.83132 -1 15:43 -1 15:43 -1 15:43 -1 15:43:49 -1 15:43:49 -1 15:43:49 -1 15:43:49.8 -1 15:43:49 -1 15:43:49.8 -1 15:43:49.83 -1 15:43:49 -1 15:43:49.8 -1 15:43:49.83 -1 15:43:49.831 -1 15:43:49 -1 15:43:49.8 -1 15:43:49.83 -1 15:43:49.831 -1 15:43:49.8313 -1 15:43:49 -1 15:43:49.8 -1 15:43:49.83 -1 15:43:49.831 -1 15:43:49.8313 -1 15:43:49.83132 -1 15:43:49 -1 15:43:49.8 -1 15:43:49.83 -1 15:43:49.831 -1 15:43:49.8313 -1 15:43:49.83132 -1 15:43:49.831320 ***** -28:25 -28:25 -28:25 -28:25:09 -28:25:09 -28:25:09 -28:25:09 -28:25:09.0 -28:25:09.0 -28:25:09 -28:25:09.0 -28:25:09.01 -28:25:09.01 -28:25:09 -28:25:09.0 -28:25:09.01 -28:25:09.013 -28:25:09.013 -28:25:09 -28:25:09.0 -28:25:09.01 -28:25:09.013 -28:25:09.0129 -28:25:09.0129 -28:25:09 -28:25:09.0 -28:25:09.01 -28:25:09.013 -28:25:09.0129 -28:25:09.01293 -28:25:09.01293 -1 04:25 -1 04:25 -1 04:25 -1 04:25:09 -1 04:25:09 -1 04:25:09 -1 04:25:09.0 -1 04:25:09 -1 04:25:09.0 -1 04:25:09.01 -1 04:25:09 -1 04:25:09.0 -1 04:25:09.01 -1 04:25:09.013 -1 04:25:09 -1 04:25:09.0 -1 04:25:09.01 -1 04:25:09.013 -1 04:25:09.0129 -1 04:25:09 -1 04:25:09.0 -1 04:25:09.01 -1 04:25:09.013 -1 04:25:09.0129 -1 04:25:09.01293 -1 04:25:09 -1 04:25:09.0 -1 04:25:09.01 -1 04:25:09.013 -1 04:25:09.0129 -1 04:25:09.01293 -1 04:25:09.012930 ***** -30:49 -30:49 -30:49 -30:49:27 -30:49:27 -30:49:27 -30:49:27 -30:49:27.5 -30:49:27.5 -30:49:27 -30:49:27.5 -30:49:27.52 -30:49:27.52 -30:49:27 -30:49:27.5 -30:49:27.52 -30:49:27.524 -30:49:27.524 -30:49:27 -30:49:27.5 -30:49:27.52 -30:49:27.524 -30:49:27.5237 -30:49:27.5237 -30:49:27 -30:49:27.5 -30:49:27.52 -30:49:27.524 -30:49:27.5237 -30:49:27.52375 -30:49:27.52375 -1 06:49 -1 06:49 -1 06:49 -1 06:49:27 -1 06:49:27 -1 06:49:27 -1 06:49:27.5 -1 06:49:27 -1 06:49:27.5 -1 06:49:27.52 -1 06:49:27 -1 06:49:27.5 -1 06:49:27.52 -1 06:49:27.524 -1 06:49:27 -1 06:49:27.5 -1 06:49:27.52 -1 06:49:27.524 -1 06:49:27.5237 -1 06:49:27 -1 06:49:27.5 -1 06:49:27.52 -1 06:49:27.524 -1 06:49:27.5237 -1 06:49:27.52375 -1 06:49:27 -1 06:49:27.5 -1 06:49:27.52 -1 06:49:27.524 -1 06:49:27.5237 -1 06:49:27.52375 -1 06:49:27.523750 ***** -26:57 -26:57 -26:57 -26:57:52 -26:57:52 -26:57:52 -26:57:52 -26:57:52.0 -26:57:52.0 -26:57:52 -26:57:52.0 -26:57:52.02 -26:57:52.02 -26:57:52 -26:57:52.0 -26:57:52.02 -26:57:52.016 -26:57:52.016 -26:57:52 -26:57:52.0 -26:57:52.02 -26:57:52.016 -26:57:52.0157 -26:57:52.0157 -26:57:52 -26:57:52.0 -26:57:52.02 -26:57:52.016 -26:57:52.0157 -26:57:52.01565 -26:57:52.01565 -1 02:57 -1 02:57 -1 02:57 -1 02:57:52 -1 02:57:52 -1 02:57:52 -1 02:57:52.0 -1 02:57:52 -1 02:57:52.0 -1 02:57:52.02 -1 02:57:52 -1 02:57:52.0 -1 02:57:52.02 -1 02:57:52.016 -1 02:57:52 -1 02:57:52.0 -1 02:57:52.02 -1 02:57:52.016 -1 02:57:52.0157 -1 02:57:52 -1 02:57:52.0 -1 02:57:52.02 -1 02:57:52.016 -1 02:57:52.0157 -1 02:57:52.01565 -1 02:57:52 -1 02:57:52.0 -1 02:57:52.02 -1 02:57:52.016 -1 02:57:52.0157 -1 02:57:52.01565 -1 02:57:52.015650 ***** -40:45 -40:45 -40:45 -40:45:44 -40:45:44 -40:45:44 -40:45:44 -40:45:44.9 -40:45:44.9 -40:45:44 -40:45:44.9 -40:45:44.87 -40:45:44.87 -40:45:44 -40:45:44.9 -40:45:44.87 -40:45:44.865 -40:45:44.865 -40:45:44 -40:45:44.9 -40:45:44.87 -40:45:44.865 -40:45:44.8653 -40:45:44.8653 -40:45:44 -40:45:44.9 -40:45:44.87 -40:45:44.865 -40:45:44.8653 -40:45:44.86529 -40:45:44.86529 -1 16:45 -1 16:45 -1 16:45 -1 16:45:44 -1 16:45:44 -1 16:45:44 -1 16:45:44.9 -1 16:45:44 -1 16:45:44.9 -1 16:45:44.87 -1 16:45:44 -1 16:45:44.9 -1 16:45:44.87 -1 16:45:44.865 -1 16:45:44 -1 16:45:44.9 -1 16:45:44.87 -1 16:45:44.865 -1 16:45:44.8653 -1 16:45:44 -1 16:45:44.9 -1 16:45:44.87 -1 16:45:44.865 -1 16:45:44.8653 -1 16:45:44.86529 -1 16:45:44 -1 16:45:44.9 -1 16:45:44.87 -1 16:45:44.865 -1 16:45:44.8653 -1 16:45:44.86529 -1 16:45:44.865290 ***** -45:30 -45:30 -45:30 -45:30:57 -45:30:57 -45:30:57 -45:30:57 -45:30:57.8 -45:30:57.8 -45:30:57 -45:30:57.8 -45:30:57.82 -45:30:57.82 -45:30:57 -45:30:57.8 -45:30:57.82 -45:30:57.820 -45:30:57.820 -45:30:57 -45:30:57.8 -45:30:57.82 -45:30:57.820 -45:30:57.8205 -45:30:57.8205 -45:30:57 -45:30:57.8 -45:30:57.82 -45:30:57.820 -45:30:57.8205 -45:30:57.82047 -45:30:57.82047 -1 21:30 -1 21:30 -1 21:30 -1 21:30:57 -1 21:30:57 -1 21:30:57 -1 21:30:57.8 -1 21:30:57 -1 21:30:57.8 -1 21:30:57.82 -1 21:30:57 -1 21:30:57.8 -1 21:30:57.82 -1 21:30:57.820 -1 21:30:57 -1 21:30:57.8 -1 21:30:57.82 -1 21:30:57.820 -1 21:30:57.8205 -1 21:30:57 -1 21:30:57.8 -1 21:30:57.82 -1 21:30:57.820 -1 21:30:57.8205 -1 21:30:57.82047 -1 21:30:57 -1 21:30:57.8 -1 21:30:57.82 -1 21:30:57.820 -1 21:30:57.8205 -1 21:30:57.82047 -1 21:30:57.820470 ***** -28:25 -28:25 -28:25 -28:25:09 -28:25:09 -28:25:09 -28:25:09 -28:25:09.2 -28:25:09.2 -28:25:09 -28:25:09.2 -28:25:09.15 -28:25:09.15 -28:25:09 -28:25:09.2 -28:25:09.15 -28:25:09.154 -28:25:09.154 -28:25:09 -28:25:09.2 -28:25:09.15 -28:25:09.154 -28:25:09.1540 -28:25:09.1540 -28:25:09 -28:25:09.2 -28:25:09.15 -28:25:09.154 -28:25:09.1540 -28:25:09.15395 -28:25:09.15395 -1 04:25 -1 04:25 -1 04:25 -1 04:25:09 -1 04:25:09 -1 04:25:09 -1 04:25:09.2 -1 04:25:09 -1 04:25:09.2 -1 04:25:09.15 -1 04:25:09 -1 04:25:09.2 -1 04:25:09.15 -1 04:25:09.154 -1 04:25:09 -1 04:25:09.2 -1 04:25:09.15 -1 04:25:09.154 -1 04:25:09.1540 -1 04:25:09 -1 04:25:09.2 -1 04:25:09.15 -1 04:25:09.154 -1 04:25:09.1540 -1 04:25:09.15395 -1 04:25:09 -1 04:25:09.2 -1 04:25:09.15 -1 04:25:09.154 -1 04:25:09.1540 -1 04:25:09.15395 -1 04:25:09.153950 ***** -30:49 -30:49 -30:49 -30:49:27 -30:49:27 -30:49:27 -30:49:27 -30:49:27.1 -30:49:27.1 -30:49:27 -30:49:27.1 -30:49:27.11 -30:49:27.11 -30:49:27 -30:49:27.1 -30:49:27.11 -30:49:27.105 -30:49:27.105 -30:49:27 -30:49:27.1 -30:49:27.11 -30:49:27.105 -30:49:27.1053 -30:49:27.1053 -30:49:27 -30:49:27.1 -30:49:27.11 -30:49:27.105 -30:49:27.1053 -30:49:27.10533 -30:49:27.10533 -1 06:49 -1 06:49 -1 06:49 -1 06:49:27 -1 06:49:27 -1 06:49:27 -1 06:49:27.1 -1 06:49:27 -1 06:49:27.1 -1 06:49:27.11 -1 06:49:27 -1 06:49:27.1 -1 06:49:27.11 -1 06:49:27.105 -1 06:49:27 -1 06:49:27.1 -1 06:49:27.11 -1 06:49:27.105 -1 06:49:27.1053 -1 06:49:27 -1 06:49:27.1 -1 06:49:27.11 -1 06:49:27.105 -1 06:49:27.1053 -1 06:49:27.10533 -1 06:49:27 -1 06:49:27.1 -1 06:49:27.11 -1 06:49:27.105 -1 06:49:27.1053 -1 06:49:27.10533 -1 06:49:27.105330 ***** -26:57 -26:57 -26:57 -26:57:52 -26:57:52 -26:57:52 -26:57:52 -26:57:52.5 -26:57:52.5 -26:57:52 -26:57:52.5 -26:57:52.48 -26:57:52.48 -26:57:52 -26:57:52.5 -26:57:52.48 -26:57:52.482 -26:57:52.482 -26:57:52 -26:57:52.5 -26:57:52.48 -26:57:52.482 -26:57:52.4823 -26:57:52.4823 -26:57:52 -26:57:52.5 -26:57:52.48 -26:57:52.482 -26:57:52.4823 -26:57:52.48229 -26:57:52.48229 -1 02:57 -1 02:57 -1 02:57 -1 02:57:52 -1 02:57:52 -1 02:57:52 -1 02:57:52.5 -1 02:57:52 -1 02:57:52.5 -1 02:57:52.48 -1 02:57:52 -1 02:57:52.5 -1 02:57:52.48 -1 02:57:52.482 -1 02:57:52 -1 02:57:52.5 -1 02:57:52.48 -1 02:57:52.482 -1 02:57:52.4823 -1 02:57:52 -1 02:57:52.5 -1 02:57:52.48 -1 02:57:52.482 -1 02:57:52.4823 -1 02:57:52.48229 -1 02:57:52 -1 02:57:52.5 -1 02:57:52.48 -1 02:57:52.482 -1 02:57:52.4823 -1 02:57:52.48229 -1 02:57:52.482290 ***** -40:45 -40:45 -40:45 -40:45:44 -40:45:44 -40:45:44 -40:45:44 -40:45:44.7 -40:45:44.7 -40:45:44 -40:45:44.7 -40:45:44.66 -40:45:44.66 -40:45:44 -40:45:44.7 -40:45:44.66 -40:45:44.658 -40:45:44.658 -40:45:44 -40:45:44.7 -40:45:44.66 -40:45:44.658 -40:45:44.6583 -40:45:44.6583 -40:45:44 -40:45:44.7 -40:45:44.66 -40:45:44.658 -40:45:44.6583 -40:45:44.65827 -40:45:44.65827 -1 16:45 -1 16:45 -1 16:45 -1 16:45:44 -1 16:45:44 -1 16:45:44 -1 16:45:44.7 -1 16:45:44 -1 16:45:44.7 -1 16:45:44.66 -1 16:45:44 -1 16:45:44.7 -1 16:45:44.66 -1 16:45:44.658 -1 16:45:44 -1 16:45:44.7 -1 16:45:44.66 -1 16:45:44.658 -1 16:45:44.6583 -1 16:45:44 -1 16:45:44.7 -1 16:45:44.66 -1 16:45:44.658 -1 16:45:44.6583 -1 16:45:44.65827 -1 16:45:44 -1 16:45:44.7 -1 16:45:44.66 -1 16:45:44.658 -1 16:45:44.6583 -1 16:45:44.65827 -1 16:45:44.658270 ***** -45:30 -45:30 -45:30 -45:30:57 -45:30:57 -45:30:57 -45:30:57 -45:30:57.6 -45:30:57.6 -45:30:57 -45:30:57.6 -45:30:57.58 -45:30:57.58 -45:30:57 -45:30:57.6 -45:30:57.58 -45:30:57.582 -45:30:57.582 -45:30:57 -45:30:57.6 -45:30:57.58 -45:30:57.582 -45:30:57.5822 -45:30:57.5822 -45:30:57 -45:30:57.6 -45:30:57.58 -45:30:57.582 -45:30:57.5822 -45:30:57.58219 -45:30:57.58219 -1 21:30 -1 21:30 -1 21:30 -1 21:30:57 -1 21:30:57 -1 21:30:57 -1 21:30:57.6 -1 21:30:57 -1 21:30:57.6 -1 21:30:57.58 -1 21:30:57 -1 21:30:57.6 -1 21:30:57.58 -1 21:30:57.582 -1 21:30:57 -1 21:30:57.6 -1 21:30:57.58 -1 21:30:57.582 -1 21:30:57.5822 -1 21:30:57 -1 21:30:57.6 -1 21:30:57.58 -1 21:30:57.582 -1 21:30:57.5822 -1 21:30:57.58219 -1 21:30:57 -1 21:30:57.6 -1 21:30:57.58 -1 21:30:57.582 -1 21:30:57.5822 -1 21:30:57.58219 -1 21:30:57.582190 ***** -46:30 -46:30 -46:30 -46:30:04 -46:30:04 -46:30:04 -46:30:04 -46:30:04.2 -46:30:04.2 -46:30:04 -46:30:04.2 -46:30:04.18 -46:30:04.18 -46:30:04 -46:30:04.2 -46:30:04.18 -46:30:04.183 -46:30:04.183 -46:30:04 -46:30:04.2 -46:30:04.18 -46:30:04.183 -46:30:04.1835 -46:30:04.1835 -46:30:04 -46:30:04.2 -46:30:04.18 -46:30:04.183 -46:30:04.1835 -46:30:04.18347 -46:30:04.18347 -1 22:30 -1 22:30 -1 22:30 -1 22:30:04 -1 22:30:04 -1 22:30:04 -1 22:30:04.2 -1 22:30:04 -1 22:30:04.2 -1 22:30:04.18 -1 22:30:04 -1 22:30:04.2 -1 22:30:04.18 -1 22:30:04.183 -1 22:30:04 -1 22:30:04.2 -1 22:30:04.18 -1 22:30:04.183 -1 22:30:04.1835 -1 22:30:04 -1 22:30:04.2 -1 22:30:04.18 -1 22:30:04.183 -1 22:30:04.1835 -1 22:30:04.18347 -1 22:30:04 -1 22:30:04.2 -1 22:30:04.18 -1 22:30:04.183 -1 22:30:04.1835 -1 22:30:04.18347 -1 22:30:04.183470 ***** -25:56 -25:56 -25:56 -25:56:51 -25:56:51 -25:56:51 -25:56:51 -25:56:51.6 -25:56:51.6 -25:56:51 -25:56:51.6 -25:56:51.59 -25:56:51.59 -25:56:51 -25:56:51.6 -25:56:51.59 -25:56:51.593 -25:56:51.593 -25:56:51 -25:56:51.6 -25:56:51.59 -25:56:51.593 -25:56:51.5932 -25:56:51.5932 -25:56:51 -25:56:51.6 -25:56:51.59 -25:56:51.593 -25:56:51.5932 -25:56:51.59319 -25:56:51.59319 -1 01:56 -1 01:56 -1 01:56 -1 01:56:51 -1 01:56:51 -1 01:56:51 -1 01:56:51.6 -1 01:56:51 -1 01:56:51.6 -1 01:56:51.59 -1 01:56:51 -1 01:56:51.6 -1 01:56:51.59 -1 01:56:51.593 -1 01:56:51 -1 01:56:51.6 -1 01:56:51.59 -1 01:56:51.593 -1 01:56:51.5932 -1 01:56:51 -1 01:56:51.6 -1 01:56:51.59 -1 01:56:51.593 -1 01:56:51.5932 -1 01:56:51.59319 -1 01:56:51 -1 01:56:51.6 -1 01:56:51.59 -1 01:56:51.593 -1 01:56:51.5932 -1 01:56:51.59319 -1 01:56:51.593190 ***** -48:00 -48:00 -48:00 -48:00:00 -48:00:00 -48:00:00 -48:00:00 -48:00:00.0 -48:00:00.0 -48:00:00 -48:00:00.0 -48:00:00.00 -48:00:00.00 -48:00:00 -48:00:00.0 -48:00:00.00 -48:00:00.000 -48:00:00.000 -48:00:00 -48:00:00.0 -48:00:00.00 -48:00:00.000 -48:00:00.0000 -48:00:00.0000 -48:00:00 -48:00:00.0 -48:00:00.00 -48:00:00.000 -48:00:00.0000 -48:00:00.00000 -48:00:00.00000 -2 00:00 -2 00:00 -2 00:00 -2 00:00:00 -2 00:00:00 -2 00:00:00 -2 00:00:00.0 -2 00:00:00 -2 00:00:00.0 -2 00:00:00.00 -2 00:00:00 -2 00:00:00.0 -2 00:00:00.00 -2 00:00:00.000 -2 00:00:00 -2 00:00:00.0 -2 00:00:00.00 -2 00:00:00.000 -2 00:00:00.0000 -2 00:00:00 -2 00:00:00.0 -2 00:00:00.00 -2 00:00:00.000 -2 00:00:00.0000 -2 00:00:00.00000 -2 00:00:00 -2 00:00:00.0 -2 00:00:00.00 -2 00:00:00.000 -2 00:00:00.0000 -2 00:00:00.00000 -2 00:00:00.000000 ***** -52:50 -52:50 -52:50 -52:50:38 -52:50:38 -52:50:38 -52:50:38 -52:50:38.1 -52:50:38.1 -52:50:38 -52:50:38.1 -52:50:38.12 -52:50:38.12 -52:50:38 -52:50:38.1 -52:50:38.12 -52:50:38.123 -52:50:38.123 -52:50:38 -52:50:38.1 -52:50:38.12 -52:50:38.123 -52:50:38.1230 -52:50:38.1230 -52:50:38 -52:50:38.1 -52:50:38.12 -52:50:38.123 -52:50:38.1230 -52:50:38.12301 -52:50:38.12301 -2 04:50 -2 04:50 -2 04:50 -2 04:50:38 -2 04:50:38 -2 04:50:38 -2 04:50:38.1 -2 04:50:38 -2 04:50:38.1 -2 04:50:38.12 -2 04:50:38 -2 04:50:38.1 -2 04:50:38.12 -2 04:50:38.123 -2 04:50:38 -2 04:50:38.1 -2 04:50:38.12 -2 04:50:38.123 -2 04:50:38.1230 -2 04:50:38 -2 04:50:38.1 -2 04:50:38.12 -2 04:50:38.123 -2 04:50:38.1230 -2 04:50:38.12301 -2 04:50:38 -2 04:50:38.1 -2 04:50:38.12 -2 04:50:38.123 -2 04:50:38.1230 -2 04:50:38.12301 -2 04:50:38.123010 ***** -60:31 -60:31 -60:31 -60:31:35 -60:31:35 -60:31:35 -60:31:35 -60:31:35.2 -60:31:35.2 -60:31:35 -60:31:35.2 -60:31:35.23 -60:31:35.23 -60:31:35 -60:31:35.2 -60:31:35.23 -60:31:35.235 -60:31:35.235 -60:31:35 -60:31:35.2 -60:31:35.23 -60:31:35.235 -60:31:35.2345 -60:31:35.2345 -60:31:35 -60:31:35.2 -60:31:35.23 -60:31:35.235 -60:31:35.2345 -60:31:35.23453 -60:31:35.23453 -2 12:31 -2 12:31 -2 12:31 -2 12:31:35 -2 12:31:35 -2 12:31:35 -2 12:31:35.2 -2 12:31:35 -2 12:31:35.2 -2 12:31:35.23 -2 12:31:35 -2 12:31:35.2 -2 12:31:35.23 -2 12:31:35.235 -2 12:31:35 -2 12:31:35.2 -2 12:31:35.23 -2 12:31:35.235 -2 12:31:35.2345 -2 12:31:35 -2 12:31:35.2 -2 12:31:35.23 -2 12:31:35.235 -2 12:31:35.2345 -2 12:31:35.23453 -2 12:31:35 -2 12:31:35.2 -2 12:31:35.23 -2 12:31:35.235 -2 12:31:35.2345 -2 12:31:35.23453 -2 12:31:35.234530 ***** -60:47 -60:47 -60:47 -60:47:53 -60:47:53 -60:47:53 -60:47:53 -60:47:53.3 -60:47:53.3 -60:47:53 -60:47:53.3 -60:47:53.35 -60:47:53.35 -60:47:53 -60:47:53.3 -60:47:53.35 -60:47:53.345 -60:47:53.345 -60:47:53 -60:47:53.3 -60:47:53.35 -60:47:53.345 -60:47:53.3451 -60:47:53.3451 -60:47:53 -60:47:53.3 -60:47:53.35 -60:47:53.345 -60:47:53.3451 -60:47:53.34505 -60:47:53.34505 -2 12:47 -2 12:47 -2 12:47 -2 12:47:53 -2 12:47:53 -2 12:47:53 -2 12:47:53.3 -2 12:47:53 -2 12:47:53.3 -2 12:47:53.35 -2 12:47:53 -2 12:47:53.3 -2 12:47:53.35 -2 12:47:53.345 -2 12:47:53 -2 12:47:53.3 -2 12:47:53.35 -2 12:47:53.345 -2 12:47:53.3451 -2 12:47:53 -2 12:47:53.3 -2 12:47:53.35 -2 12:47:53.345 -2 12:47:53.3451 -2 12:47:53.34505 -2 12:47:53 -2 12:47:53.3 -2 12:47:53.35 -2 12:47:53.345 -2 12:47:53.3451 -2 12:47:53.34505 -2 12:47:53.345050 ***** -49:26 -49:26 -49:26 -49:26:00 -49:26:00 -49:26:00 -49:26:00 -49:26:00.5 -49:26:00.5 -49:26:00 -49:26:00.5 -49:26:00.46 -49:26:00.46 -49:26:00 -49:26:00.5 -49:26:00.46 -49:26:00.456 -49:26:00.456 -49:26:00 -49:26:00.5 -49:26:00.46 -49:26:00.456 -49:26:00.4562 -49:26:00.4562 -49:26:00 -49:26:00.5 -49:26:00.46 -49:26:00.456 -49:26:00.4562 -49:26:00.45615 -49:26:00.45615 -2 01:26 -2 01:26 -2 01:26 -2 01:26:00 -2 01:26:00 -2 01:26:00 -2 01:26:00.5 -2 01:26:00 -2 01:26:00.5 -2 01:26:00.46 -2 01:26:00 -2 01:26:00.5 -2 01:26:00.46 -2 01:26:00.456 -2 01:26:00 -2 01:26:00.5 -2 01:26:00.46 -2 01:26:00.456 -2 01:26:00.4562 -2 01:26:00 -2 01:26:00.5 -2 01:26:00.46 -2 01:26:00.456 -2 01:26:00.4562 -2 01:26:00.45615 -2 01:26:00 -2 01:26:00.5 -2 01:26:00.46 -2 01:26:00.456 -2 01:26:00.4562 -2 01:26:00.45615 -2 01:26:00.456150 ***** -68:58 -68:58 -68:58 -68:58:11 -68:58:11 -68:58:11 -68:58:11 -68:58:11.6 -68:58:11.6 -68:58:11 -68:58:11.6 -68:58:11.57 -68:58:11.57 -68:58:11 -68:58:11.6 -68:58:11.57 -68:58:11.567 -68:58:11.567 -68:58:11 -68:58:11.6 -68:58:11.57 -68:58:11.567 -68:58:11.5668 -68:58:11.5668 -68:58:11 -68:58:11.6 -68:58:11.57 -68:58:11.567 -68:58:11.5668 -68:58:11.56677 -68:58:11.56677 -2 20:58 -2 20:58 -2 20:58 -2 20:58:11 -2 20:58:11 -2 20:58:11 -2 20:58:11.6 -2 20:58:11 -2 20:58:11.6 -2 20:58:11.57 -2 20:58:11 -2 20:58:11.6 -2 20:58:11.57 -2 20:58:11.567 -2 20:58:11 -2 20:58:11.6 -2 20:58:11.57 -2 20:58:11.567 -2 20:58:11.5668 -2 20:58:11 -2 20:58:11.6 -2 20:58:11.57 -2 20:58:11.567 -2 20:58:11.5668 -2 20:58:11.56677 -2 20:58:11 -2 20:58:11.6 -2 20:58:11.57 -2 20:58:11.567 -2 20:58:11.5668 -2 20:58:11.56677 -2 20:58:11.566770 ***** -55:36 -55:36 -55:36 -55:36:05 -55:36:05 -55:36:05 -55:36:05 -55:36:05.2 -55:36:05.2 -55:36:05 -55:36:05.2 -55:36:05.19 -55:36:05.19 -55:36:05 -55:36:05.2 -55:36:05.19 -55:36:05.190 -55:36:05.190 -55:36:05 -55:36:05.2 -55:36:05.19 -55:36:05.190 -55:36:05.1896 -55:36:05.1896 -55:36:05 -55:36:05.2 -55:36:05.19 -55:36:05.190 -55:36:05.1896 -55:36:05.18964 -55:36:05.18964 -2 07:36 -2 07:36 -2 07:36 -2 07:36:05 -2 07:36:05 -2 07:36:05 -2 07:36:05.2 -2 07:36:05 -2 07:36:05.2 -2 07:36:05.19 -2 07:36:05 -2 07:36:05.2 -2 07:36:05.19 -2 07:36:05.190 -2 07:36:05 -2 07:36:05.2 -2 07:36:05.19 -2 07:36:05.190 -2 07:36:05.1896 -2 07:36:05 -2 07:36:05.2 -2 07:36:05.19 -2 07:36:05.190 -2 07:36:05.1896 -2 07:36:05.18964 -2 07:36:05 -2 07:36:05.2 -2 07:36:05.19 -2 07:36:05.190 -2 07:36:05.1896 -2 07:36:05.18964 -2 07:36:05.189640 ***** -63:43 -63:43 -63:43 -63:43:49 -63:43:49 -63:43:49 -63:43:49 -63:43:49.8 -63:43:49.8 -63:43:49 -63:43:49.8 -63:43:49.83 -63:43:49.83 -63:43:49 -63:43:49.8 -63:43:49.83 -63:43:49.831 -63:43:49.831 -63:43:49 -63:43:49.8 -63:43:49.83 -63:43:49.831 -63:43:49.8313 -63:43:49.8313 -63:43:49 -63:43:49.8 -63:43:49.83 -63:43:49.831 -63:43:49.8313 -63:43:49.83132 -63:43:49.83132 -2 15:43 -2 15:43 -2 15:43 -2 15:43:49 -2 15:43:49 -2 15:43:49 -2 15:43:49.8 -2 15:43:49 -2 15:43:49.8 -2 15:43:49.83 -2 15:43:49 -2 15:43:49.8 -2 15:43:49.83 -2 15:43:49.831 -2 15:43:49 -2 15:43:49.8 -2 15:43:49.83 -2 15:43:49.831 -2 15:43:49.8313 -2 15:43:49 -2 15:43:49.8 -2 15:43:49.83 -2 15:43:49.831 -2 15:43:49.8313 -2 15:43:49.83132 -2 15:43:49 -2 15:43:49.8 -2 15:43:49.83 -2 15:43:49.831 -2 15:43:49.8313 -2 15:43:49.83132 -2 15:43:49.831320 ***** -52:25 -52:25 -52:25 -52:25:09 -52:25:09 -52:25:09 -52:25:09 -52:25:09.0 -52:25:09.0 -52:25:09 -52:25:09.0 -52:25:09.01 -52:25:09.01 -52:25:09 -52:25:09.0 -52:25:09.01 -52:25:09.013 -52:25:09.013 -52:25:09 -52:25:09.0 -52:25:09.01 -52:25:09.013 -52:25:09.0129 -52:25:09.0129 -52:25:09 -52:25:09.0 -52:25:09.01 -52:25:09.013 -52:25:09.0129 -52:25:09.01293 -52:25:09.01293 -2 04:25 -2 04:25 -2 04:25 -2 04:25:09 -2 04:25:09 -2 04:25:09 -2 04:25:09.0 -2 04:25:09 -2 04:25:09.0 -2 04:25:09.01 -2 04:25:09 -2 04:25:09.0 -2 04:25:09.01 -2 04:25:09.013 -2 04:25:09 -2 04:25:09.0 -2 04:25:09.01 -2 04:25:09.013 -2 04:25:09.0129 -2 04:25:09 -2 04:25:09.0 -2 04:25:09.01 -2 04:25:09.013 -2 04:25:09.0129 -2 04:25:09.01293 -2 04:25:09 -2 04:25:09.0 -2 04:25:09.01 -2 04:25:09.013 -2 04:25:09.0129 -2 04:25:09.01293 -2 04:25:09.012930 ***** -54:49 -54:49 -54:49 -54:49:27 -54:49:27 -54:49:27 -54:49:27 -54:49:27.5 -54:49:27.5 -54:49:27 -54:49:27.5 -54:49:27.52 -54:49:27.52 -54:49:27 -54:49:27.5 -54:49:27.52 -54:49:27.524 -54:49:27.524 -54:49:27 -54:49:27.5 -54:49:27.52 -54:49:27.524 -54:49:27.5237 -54:49:27.5237 -54:49:27 -54:49:27.5 -54:49:27.52 -54:49:27.524 -54:49:27.5237 -54:49:27.52375 -54:49:27.52375 -2 06:49 -2 06:49 -2 06:49 -2 06:49:27 -2 06:49:27 -2 06:49:27 -2 06:49:27.5 -2 06:49:27 -2 06:49:27.5 -2 06:49:27.52 -2 06:49:27 -2 06:49:27.5 -2 06:49:27.52 -2 06:49:27.524 -2 06:49:27 -2 06:49:27.5 -2 06:49:27.52 -2 06:49:27.524 -2 06:49:27.5237 -2 06:49:27 -2 06:49:27.5 -2 06:49:27.52 -2 06:49:27.524 -2 06:49:27.5237 -2 06:49:27.52375 -2 06:49:27 -2 06:49:27.5 -2 06:49:27.52 -2 06:49:27.524 -2 06:49:27.5237 -2 06:49:27.52375 -2 06:49:27.523750 ***** -50:57 -50:57 -50:57 -50:57:52 -50:57:52 -50:57:52 -50:57:52 -50:57:52.0 -50:57:52.0 -50:57:52 -50:57:52.0 -50:57:52.02 -50:57:52.02 -50:57:52 -50:57:52.0 -50:57:52.02 -50:57:52.016 -50:57:52.016 -50:57:52 -50:57:52.0 -50:57:52.02 -50:57:52.016 -50:57:52.0156 -50:57:52.0156 -50:57:52 -50:57:52.0 -50:57:52.02 -50:57:52.016 -50:57:52.0156 -50:57:52.01565 -50:57:52.01565 -2 02:57 -2 02:57 -2 02:57 -2 02:57:52 -2 02:57:52 -2 02:57:52 -2 02:57:52.0 -2 02:57:52 -2 02:57:52.0 -2 02:57:52.02 -2 02:57:52 -2 02:57:52.0 -2 02:57:52.02 -2 02:57:52.016 -2 02:57:52 -2 02:57:52.0 -2 02:57:52.02 -2 02:57:52.016 -2 02:57:52.0156 -2 02:57:52 -2 02:57:52.0 -2 02:57:52.02 -2 02:57:52.016 -2 02:57:52.0156 -2 02:57:52.01565 -2 02:57:52 -2 02:57:52.0 -2 02:57:52.02 -2 02:57:52.016 -2 02:57:52.0156 -2 02:57:52.01565 -2 02:57:52.015650 ***** -64:45 -64:45 -64:45 -64:45:44 -64:45:44 -64:45:44 -64:45:44 -64:45:44.9 -64:45:44.9 -64:45:44 -64:45:44.9 -64:45:44.87 -64:45:44.87 -64:45:44 -64:45:44.9 -64:45:44.87 -64:45:44.865 -64:45:44.865 -64:45:44 -64:45:44.9 -64:45:44.87 -64:45:44.865 -64:45:44.8653 -64:45:44.8653 -64:45:44 -64:45:44.9 -64:45:44.87 -64:45:44.865 -64:45:44.8653 -64:45:44.86529 -64:45:44.86529 -2 16:45 -2 16:45 -2 16:45 -2 16:45:44 -2 16:45:44 -2 16:45:44 -2 16:45:44.9 -2 16:45:44 -2 16:45:44.9 -2 16:45:44.87 -2 16:45:44 -2 16:45:44.9 -2 16:45:44.87 -2 16:45:44.865 -2 16:45:44 -2 16:45:44.9 -2 16:45:44.87 -2 16:45:44.865 -2 16:45:44.8653 -2 16:45:44 -2 16:45:44.9 -2 16:45:44.87 -2 16:45:44.865 -2 16:45:44.8653 -2 16:45:44.86529 -2 16:45:44 -2 16:45:44.9 -2 16:45:44.87 -2 16:45:44.865 -2 16:45:44.8653 -2 16:45:44.86529 -2 16:45:44.865290 ***** -69:30 -69:30 -69:30 -69:30:57 -69:30:57 -69:30:57 -69:30:57 -69:30:57.8 -69:30:57.8 -69:30:57 -69:30:57.8 -69:30:57.82 -69:30:57.82 -69:30:57 -69:30:57.8 -69:30:57.82 -69:30:57.820 -69:30:57.820 -69:30:57 -69:30:57.8 -69:30:57.82 -69:30:57.820 -69:30:57.8205 -69:30:57.8205 -69:30:57 -69:30:57.8 -69:30:57.82 -69:30:57.820 -69:30:57.8205 -69:30:57.82047 -69:30:57.82047 -2 21:30 -2 21:30 -2 21:30 -2 21:30:57 -2 21:30:57 -2 21:30:57 -2 21:30:57.8 -2 21:30:57 -2 21:30:57.8 -2 21:30:57.82 -2 21:30:57 -2 21:30:57.8 -2 21:30:57.82 -2 21:30:57.820 -2 21:30:57 -2 21:30:57.8 -2 21:30:57.82 -2 21:30:57.820 -2 21:30:57.8205 -2 21:30:57 -2 21:30:57.8 -2 21:30:57.82 -2 21:30:57.820 -2 21:30:57.8205 -2 21:30:57.82047 -2 21:30:57 -2 21:30:57.8 -2 21:30:57.82 -2 21:30:57.820 -2 21:30:57.8205 -2 21:30:57.82047 -2 21:30:57.820470 ***** -52:25 -52:25 -52:25 -52:25:09 -52:25:09 -52:25:09 -52:25:09 -52:25:09.2 -52:25:09.2 -52:25:09 -52:25:09.2 -52:25:09.15 -52:25:09.15 -52:25:09 -52:25:09.2 -52:25:09.15 -52:25:09.154 -52:25:09.154 -52:25:09 -52:25:09.2 -52:25:09.15 -52:25:09.154 -52:25:09.1540 -52:25:09.1540 -52:25:09 -52:25:09.2 -52:25:09.15 -52:25:09.154 -52:25:09.1540 -52:25:09.15395 -52:25:09.15395 -2 04:25 -2 04:25 -2 04:25 -2 04:25:09 -2 04:25:09 -2 04:25:09 -2 04:25:09.2 -2 04:25:09 -2 04:25:09.2 -2 04:25:09.15 -2 04:25:09 -2 04:25:09.2 -2 04:25:09.15 -2 04:25:09.154 -2 04:25:09 -2 04:25:09.2 -2 04:25:09.15 -2 04:25:09.154 -2 04:25:09.1540 -2 04:25:09 -2 04:25:09.2 -2 04:25:09.15 -2 04:25:09.154 -2 04:25:09.1540 -2 04:25:09.15395 -2 04:25:09 -2 04:25:09.2 -2 04:25:09.15 -2 04:25:09.154 -2 04:25:09.1540 -2 04:25:09.15395 -2 04:25:09.153950 ***** -54:49 -54:49 -54:49 -54:49:27 -54:49:27 -54:49:27 -54:49:27 -54:49:27.1 -54:49:27.1 -54:49:27 -54:49:27.1 -54:49:27.11 -54:49:27.11 -54:49:27 -54:49:27.1 -54:49:27.11 -54:49:27.105 -54:49:27.105 -54:49:27 -54:49:27.1 -54:49:27.11 -54:49:27.105 -54:49:27.1053 -54:49:27.1053 -54:49:27 -54:49:27.1 -54:49:27.11 -54:49:27.105 -54:49:27.1053 -54:49:27.10533 -54:49:27.10533 -2 06:49 -2 06:49 -2 06:49 -2 06:49:27 -2 06:49:27 -2 06:49:27 -2 06:49:27.1 -2 06:49:27 -2 06:49:27.1 -2 06:49:27.11 -2 06:49:27 -2 06:49:27.1 -2 06:49:27.11 -2 06:49:27.105 -2 06:49:27 -2 06:49:27.1 -2 06:49:27.11 -2 06:49:27.105 -2 06:49:27.1053 -2 06:49:27 -2 06:49:27.1 -2 06:49:27.11 -2 06:49:27.105 -2 06:49:27.1053 -2 06:49:27.10533 -2 06:49:27 -2 06:49:27.1 -2 06:49:27.11 -2 06:49:27.105 -2 06:49:27.1053 -2 06:49:27.10533 -2 06:49:27.105330 ***** -50:57 -50:57 -50:57 -50:57:52 -50:57:52 -50:57:52 -50:57:52 -50:57:52.5 -50:57:52.5 -50:57:52 -50:57:52.5 -50:57:52.48 -50:57:52.48 -50:57:52 -50:57:52.5 -50:57:52.48 -50:57:52.482 -50:57:52.482 -50:57:52 -50:57:52.5 -50:57:52.48 -50:57:52.482 -50:57:52.4823 -50:57:52.4823 -50:57:52 -50:57:52.5 -50:57:52.48 -50:57:52.482 -50:57:52.4823 -50:57:52.48229 -50:57:52.48229 -2 02:57 -2 02:57 -2 02:57 -2 02:57:52 -2 02:57:52 -2 02:57:52 -2 02:57:52.5 -2 02:57:52 -2 02:57:52.5 -2 02:57:52.48 -2 02:57:52 -2 02:57:52.5 -2 02:57:52.48 -2 02:57:52.482 -2 02:57:52 -2 02:57:52.5 -2 02:57:52.48 -2 02:57:52.482 -2 02:57:52.4823 -2 02:57:52 -2 02:57:52.5 -2 02:57:52.48 -2 02:57:52.482 -2 02:57:52.4823 -2 02:57:52.48229 -2 02:57:52 -2 02:57:52.5 -2 02:57:52.48 -2 02:57:52.482 -2 02:57:52.4823 -2 02:57:52.48229 -2 02:57:52.482290 ***** -64:45 -64:45 -64:45 -64:45:44 -64:45:44 -64:45:44 -64:45:44 -64:45:44.7 -64:45:44.7 -64:45:44 -64:45:44.7 -64:45:44.66 -64:45:44.66 -64:45:44 -64:45:44.7 -64:45:44.66 -64:45:44.658 -64:45:44.658 -64:45:44 -64:45:44.7 -64:45:44.66 -64:45:44.658 -64:45:44.6583 -64:45:44.6583 -64:45:44 -64:45:44.7 -64:45:44.66 -64:45:44.658 -64:45:44.6583 -64:45:44.65827 -64:45:44.65827 -2 16:45 -2 16:45 -2 16:45 -2 16:45:44 -2 16:45:44 -2 16:45:44 -2 16:45:44.7 -2 16:45:44 -2 16:45:44.7 -2 16:45:44.66 -2 16:45:44 -2 16:45:44.7 -2 16:45:44.66 -2 16:45:44.658 -2 16:45:44 -2 16:45:44.7 -2 16:45:44.66 -2 16:45:44.658 -2 16:45:44.6583 -2 16:45:44 -2 16:45:44.7 -2 16:45:44.66 -2 16:45:44.658 -2 16:45:44.6583 -2 16:45:44.65827 -2 16:45:44 -2 16:45:44.7 -2 16:45:44.66 -2 16:45:44.658 -2 16:45:44.6583 -2 16:45:44.65827 -2 16:45:44.658270 ***** -69:30 -69:30 -69:30 -69:30:57 -69:30:57 -69:30:57 -69:30:57 -69:30:57.6 -69:30:57.6 -69:30:57 -69:30:57.6 -69:30:57.58 -69:30:57.58 -69:30:57 -69:30:57.6 -69:30:57.58 -69:30:57.582 -69:30:57.582 -69:30:57 -69:30:57.6 -69:30:57.58 -69:30:57.582 -69:30:57.5822 -69:30:57.5822 -69:30:57 -69:30:57.6 -69:30:57.58 -69:30:57.582 -69:30:57.5822 -69:30:57.58219 -69:30:57.58219 -2 21:30 -2 21:30 -2 21:30 -2 21:30:57 -2 21:30:57 -2 21:30:57 -2 21:30:57.6 -2 21:30:57 -2 21:30:57.6 -2 21:30:57.58 -2 21:30:57 -2 21:30:57.6 -2 21:30:57.58 -2 21:30:57.582 -2 21:30:57 -2 21:30:57.6 -2 21:30:57.58 -2 21:30:57.582 -2 21:30:57.5822 -2 21:30:57 -2 21:30:57.6 -2 21:30:57.58 -2 21:30:57.582 -2 21:30:57.5822 -2 21:30:57.58219 -2 21:30:57 -2 21:30:57.6 -2 21:30:57.58 -2 21:30:57.582 -2 21:30:57.5822 -2 21:30:57.58219 -2 21:30:57.582190 ***** -70:30 -70:30 -70:30 -70:30:04 -70:30:04 -70:30:04 -70:30:04 -70:30:04.2 -70:30:04.2 -70:30:04 -70:30:04.2 -70:30:04.18 -70:30:04.18 -70:30:04 -70:30:04.2 -70:30:04.18 -70:30:04.183 -70:30:04.183 -70:30:04 -70:30:04.2 -70:30:04.18 -70:30:04.183 -70:30:04.1835 -70:30:04.1835 -70:30:04 -70:30:04.2 -70:30:04.18 -70:30:04.183 -70:30:04.1835 -70:30:04.18347 -70:30:04.18347 -2 22:30 -2 22:30 -2 22:30 -2 22:30:04 -2 22:30:04 -2 22:30:04 -2 22:30:04.2 -2 22:30:04 -2 22:30:04.2 -2 22:30:04.18 -2 22:30:04 -2 22:30:04.2 -2 22:30:04.18 -2 22:30:04.183 -2 22:30:04 -2 22:30:04.2 -2 22:30:04.18 -2 22:30:04.183 -2 22:30:04.1835 -2 22:30:04 -2 22:30:04.2 -2 22:30:04.18 -2 22:30:04.183 -2 22:30:04.1835 -2 22:30:04.18347 -2 22:30:04 -2 22:30:04.2 -2 22:30:04.18 -2 22:30:04.183 -2 22:30:04.1835 -2 22:30:04.18347 -2 22:30:04.183470 ***** -49:56 -49:56 -49:56 -49:56:51 -49:56:51 -49:56:51 -49:56:51 -49:56:51.6 -49:56:51.6 -49:56:51 -49:56:51.6 -49:56:51.59 -49:56:51.59 -49:56:51 -49:56:51.6 -49:56:51.59 -49:56:51.593 -49:56:51.593 -49:56:51 -49:56:51.6 -49:56:51.59 -49:56:51.593 -49:56:51.5932 -49:56:51.5932 -49:56:51 -49:56:51.6 -49:56:51.59 -49:56:51.593 -49:56:51.5932 -49:56:51.59319 -49:56:51.59319 -2 01:56 -2 01:56 -2 01:56 -2 01:56:51 -2 01:56:51 -2 01:56:51 -2 01:56:51.6 -2 01:56:51 -2 01:56:51.6 -2 01:56:51.59 -2 01:56:51 -2 01:56:51.6 -2 01:56:51.59 -2 01:56:51.593 -2 01:56:51 -2 01:56:51.6 -2 01:56:51.59 -2 01:56:51.593 -2 01:56:51.5932 -2 01:56:51 -2 01:56:51.6 -2 01:56:51.59 -2 01:56:51.593 -2 01:56:51.5932 -2 01:56:51.59319 -2 01:56:51 -2 01:56:51.6 -2 01:56:51.59 -2 01:56:51.593 -2 01:56:51.5932 -2 01:56:51.59319 -2 01:56:51.593190 ***** ****** ******* -1296:00 -1296:00 -1296:00 -1296:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00 -1296:00:00.0 -1296:00:00.0 -1296:00:00.0 -1296:00:00.0 -1296:00:00 -1296:00:00.0 -1296:00:00.00 -1296:00:00.00 -1296:00:00.00 -1296:00:00.00 -1296:00:00 -1296:00:00.0 -1296:00:00.00 -1296:00:00.000 -1296:00:00.000 -1296:00:00.000 -1296:00:00.000 ******** -54 00:00 -54 00:00 -54 00:00 -54 00:00:00 -54 00:00:00 -54 00:00:00 -54 00:00:00 -54 00:00:00.0 -54 00:00:00.0 -54 00:00:00 -54 00:00:00.0 -54 00:00:00.00 -54 00:00:00.00 -54 00:00:00 -54 00:00:00.0 -54 00:00:00.00 -54 00:00:00.000 -54 00:00:00.000 -54 00:00:00 -54 00:00:00.0 -54 00:00:00.00 -54 00:00:00.000 -54 00:00:00.0000 -54 00:00:00.0000 -54 00:00:00 -54 00:00:00.0 -54 00:00:00.00 -54 00:00:00.000 -54 00:00:00.0000 -54 00:00:00.00000 -54 00:00:00.00000 ***** ****** ******* -1300:50 -1300:50 -1300:50 -1300:50 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38 -1300:50:38.1 -1300:50:38.1 -1300:50:38.1 -1300:50:38.1 -1300:50:38 -1300:50:38.1 -1300:50:38.12 -1300:50:38.12 -1300:50:38.12 -1300:50:38.12 -1300:50:38 -1300:50:38.1 -1300:50:38.12 -1300:50:38.123 -1300:50:38.123 -1300:50:38.123 -1300:50:38.123 ******** -54 04:50 -54 04:50 -54 04:50 -54 04:50:38 -54 04:50:38 -54 04:50:38 -54 04:50:38 -54 04:50:38.1 -54 04:50:38.1 -54 04:50:38 -54 04:50:38.1 -54 04:50:38.12 -54 04:50:38.12 -54 04:50:38 -54 04:50:38.1 -54 04:50:38.12 -54 04:50:38.123 -54 04:50:38.123 -54 04:50:38 -54 04:50:38.1 -54 04:50:38.12 -54 04:50:38.123 -54 04:50:38.1230 -54 04:50:38.1230 -54 04:50:38 -54 04:50:38.1 -54 04:50:38.12 -54 04:50:38.123 -54 04:50:38.1230 -54 04:50:38.12301 -54 04:50:38.12301 ***** ****** ******* -1308:31 -1308:31 -1308:31 -1308:31 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35 -1308:31:35.2 -1308:31:35.2 -1308:31:35.2 -1308:31:35.2 -1308:31:35 -1308:31:35.2 -1308:31:35.23 -1308:31:35.23 -1308:31:35.23 -1308:31:35.23 -1308:31:35 -1308:31:35.2 -1308:31:35.23 -1308:31:35.235 -1308:31:35.235 -1308:31:35.235 -1308:31:35.235 ******** -54 12:31 -54 12:31 -54 12:31 -54 12:31:35 -54 12:31:35 -54 12:31:35 -54 12:31:35 -54 12:31:35.2 -54 12:31:35.2 -54 12:31:35 -54 12:31:35.2 -54 12:31:35.23 -54 12:31:35.23 -54 12:31:35 -54 12:31:35.2 -54 12:31:35.23 -54 12:31:35.235 -54 12:31:35.235 -54 12:31:35 -54 12:31:35.2 -54 12:31:35.23 -54 12:31:35.235 -54 12:31:35.2345 -54 12:31:35.2345 -54 12:31:35 -54 12:31:35.2 -54 12:31:35.23 -54 12:31:35.235 -54 12:31:35.2345 -54 12:31:35.23453 -54 12:31:35.23453 ***** ****** ******* -1308:47 -1308:47 -1308:47 -1308:47 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53 -1308:47:53.3 -1308:47:53.3 -1308:47:53.3 -1308:47:53.3 -1308:47:53 -1308:47:53.3 -1308:47:53.35 -1308:47:53.35 -1308:47:53.35 -1308:47:53.35 -1308:47:53 -1308:47:53.3 -1308:47:53.35 -1308:47:53.345 -1308:47:53.345 -1308:47:53.345 -1308:47:53.345 ******** -54 12:47 -54 12:47 -54 12:47 -54 12:47:53 -54 12:47:53 -54 12:47:53 -54 12:47:53 -54 12:47:53.3 -54 12:47:53.3 -54 12:47:53 -54 12:47:53.3 -54 12:47:53.35 -54 12:47:53.35 -54 12:47:53 -54 12:47:53.3 -54 12:47:53.35 -54 12:47:53.345 -54 12:47:53.345 -54 12:47:53 -54 12:47:53.3 -54 12:47:53.35 -54 12:47:53.345 -54 12:47:53.3450 -54 12:47:53.3450 -54 12:47:53 -54 12:47:53.3 -54 12:47:53.35 -54 12:47:53.345 -54 12:47:53.3450 -54 12:47:53.34505 -54 12:47:53.34505 ***** ****** ******* -1297:26 -1297:26 -1297:26 -1297:26 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00 -1297:26:00.5 -1297:26:00.5 -1297:26:00.5 -1297:26:00.5 -1297:26:00 -1297:26:00.5 -1297:26:00.46 -1297:26:00.46 -1297:26:00.46 -1297:26:00.46 -1297:26:00 -1297:26:00.5 -1297:26:00.46 -1297:26:00.456 -1297:26:00.456 -1297:26:00.456 -1297:26:00.456 ******** -54 01:26 -54 01:26 -54 01:26 -54 01:26:00 -54 01:26:00 -54 01:26:00 -54 01:26:00 -54 01:26:00.5 -54 01:26:00.5 -54 01:26:00 -54 01:26:00.5 -54 01:26:00.46 -54 01:26:00.46 -54 01:26:00 -54 01:26:00.5 -54 01:26:00.46 -54 01:26:00.456 -54 01:26:00.456 -54 01:26:00 -54 01:26:00.5 -54 01:26:00.46 -54 01:26:00.456 -54 01:26:00.4561 -54 01:26:00.4561 -54 01:26:00 -54 01:26:00.5 -54 01:26:00.46 -54 01:26:00.456 -54 01:26:00.4561 -54 01:26:00.45615 -54 01:26:00.45615 ***** ****** ******* -1316:58 -1316:58 -1316:58 -1316:58 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11 -1316:58:11.6 -1316:58:11.6 -1316:58:11.6 -1316:58:11.6 -1316:58:11 -1316:58:11.6 -1316:58:11.57 -1316:58:11.57 -1316:58:11.57 -1316:58:11.57 -1316:58:11 -1316:58:11.6 -1316:58:11.57 -1316:58:11.567 -1316:58:11.567 -1316:58:11.567 -1316:58:11.567 ******** -54 20:58 -54 20:58 -54 20:58 -54 20:58:11 -54 20:58:11 -54 20:58:11 -54 20:58:11 -54 20:58:11.6 -54 20:58:11.6 -54 20:58:11 -54 20:58:11.6 -54 20:58:11.57 -54 20:58:11.57 -54 20:58:11 -54 20:58:11.6 -54 20:58:11.57 -54 20:58:11.567 -54 20:58:11.567 -54 20:58:11 -54 20:58:11.6 -54 20:58:11.57 -54 20:58:11.567 -54 20:58:11.5668 -54 20:58:11.5668 -54 20:58:11 -54 20:58:11.6 -54 20:58:11.57 -54 20:58:11.567 -54 20:58:11.5668 -54 20:58:11.56677 -54 20:58:11.56677 ***** ****** ******* -1303:36 -1303:36 -1303:36 -1303:36 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05 -1303:36:05.2 -1303:36:05.2 -1303:36:05.2 -1303:36:05.2 -1303:36:05 -1303:36:05.2 -1303:36:05.19 -1303:36:05.19 -1303:36:05.19 -1303:36:05.19 -1303:36:05 -1303:36:05.2 -1303:36:05.19 -1303:36:05.190 -1303:36:05.190 -1303:36:05.190 -1303:36:05.190 ******** -54 07:36 -54 07:36 -54 07:36 -54 07:36:05 -54 07:36:05 -54 07:36:05 -54 07:36:05 -54 07:36:05.2 -54 07:36:05.2 -54 07:36:05 -54 07:36:05.2 -54 07:36:05.19 -54 07:36:05.19 -54 07:36:05 -54 07:36:05.2 -54 07:36:05.19 -54 07:36:05.190 -54 07:36:05.190 -54 07:36:05 -54 07:36:05.2 -54 07:36:05.19 -54 07:36:05.190 -54 07:36:05.1896 -54 07:36:05.1896 -54 07:36:05 -54 07:36:05.2 -54 07:36:05.19 -54 07:36:05.190 -54 07:36:05.1896 -54 07:36:05.18964 -54 07:36:05.18964 ***** ****** ******* -1311:43 -1311:43 -1311:43 -1311:43 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49 -1311:43:49.8 -1311:43:49.8 -1311:43:49.8 -1311:43:49.8 -1311:43:49 -1311:43:49.8 -1311:43:49.83 -1311:43:49.83 -1311:43:49.83 -1311:43:49.83 -1311:43:49 -1311:43:49.8 -1311:43:49.83 -1311:43:49.831 -1311:43:49.831 -1311:43:49.831 -1311:43:49.831 ******** -54 15:43 -54 15:43 -54 15:43 -54 15:43:49 -54 15:43:49 -54 15:43:49 -54 15:43:49 -54 15:43:49.8 -54 15:43:49.8 -54 15:43:49 -54 15:43:49.8 -54 15:43:49.83 -54 15:43:49.83 -54 15:43:49 -54 15:43:49.8 -54 15:43:49.83 -54 15:43:49.831 -54 15:43:49.831 -54 15:43:49 -54 15:43:49.8 -54 15:43:49.83 -54 15:43:49.831 -54 15:43:49.8313 -54 15:43:49.8313 -54 15:43:49 -54 15:43:49.8 -54 15:43:49.83 -54 15:43:49.831 -54 15:43:49.8313 -54 15:43:49.83132 -54 15:43:49.83132 ***** ****** ******* -1300:25 -1300:25 -1300:25 -1300:25 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09.0 -1300:25:09.0 -1300:25:09.0 -1300:25:09.0 -1300:25:09 -1300:25:09.0 -1300:25:09.01 -1300:25:09.01 -1300:25:09.01 -1300:25:09.01 -1300:25:09 -1300:25:09.0 -1300:25:09.01 -1300:25:09.013 -1300:25:09.013 -1300:25:09.013 -1300:25:09.013 ******** -54 04:25 -54 04:25 -54 04:25 -54 04:25:09 -54 04:25:09 -54 04:25:09 -54 04:25:09 -54 04:25:09.0 -54 04:25:09.0 -54 04:25:09 -54 04:25:09.0 -54 04:25:09.01 -54 04:25:09.01 -54 04:25:09 -54 04:25:09.0 -54 04:25:09.01 -54 04:25:09.013 -54 04:25:09.013 -54 04:25:09 -54 04:25:09.0 -54 04:25:09.01 -54 04:25:09.013 -54 04:25:09.0129 -54 04:25:09.0129 -54 04:25:09 -54 04:25:09.0 -54 04:25:09.01 -54 04:25:09.013 -54 04:25:09.0129 -54 04:25:09.01293 -54 04:25:09.01293 ***** ****** ******* -1302:49 -1302:49 -1302:49 -1302:49 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27.5 -1302:49:27.5 -1302:49:27.5 -1302:49:27.5 -1302:49:27 -1302:49:27.5 -1302:49:27.52 -1302:49:27.52 -1302:49:27.52 -1302:49:27.52 -1302:49:27 -1302:49:27.5 -1302:49:27.52 -1302:49:27.524 -1302:49:27.524 -1302:49:27.524 -1302:49:27.524 ******** -54 06:49 -54 06:49 -54 06:49 -54 06:49:27 -54 06:49:27 -54 06:49:27 -54 06:49:27 -54 06:49:27.5 -54 06:49:27.5 -54 06:49:27 -54 06:49:27.5 -54 06:49:27.52 -54 06:49:27.52 -54 06:49:27 -54 06:49:27.5 -54 06:49:27.52 -54 06:49:27.524 -54 06:49:27.524 -54 06:49:27 -54 06:49:27.5 -54 06:49:27.52 -54 06:49:27.524 -54 06:49:27.5237 -54 06:49:27.5237 -54 06:49:27 -54 06:49:27.5 -54 06:49:27.52 -54 06:49:27.524 -54 06:49:27.5237 -54 06:49:27.52375 -54 06:49:27.52375 ***** ****** ******* -1298:57 -1298:57 -1298:57 -1298:57 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52.0 -1298:57:52.0 -1298:57:52.0 -1298:57:52.0 -1298:57:52 -1298:57:52.0 -1298:57:52.02 -1298:57:52.02 -1298:57:52.02 -1298:57:52.02 -1298:57:52 -1298:57:52.0 -1298:57:52.02 -1298:57:52.016 -1298:57:52.016 -1298:57:52.016 -1298:57:52.016 ******** -54 02:57 -54 02:57 -54 02:57 -54 02:57:52 -54 02:57:52 -54 02:57:52 -54 02:57:52 -54 02:57:52.0 -54 02:57:52.0 -54 02:57:52 -54 02:57:52.0 -54 02:57:52.02 -54 02:57:52.02 -54 02:57:52 -54 02:57:52.0 -54 02:57:52.02 -54 02:57:52.016 -54 02:57:52.016 -54 02:57:52 -54 02:57:52.0 -54 02:57:52.02 -54 02:57:52.016 -54 02:57:52.0157 -54 02:57:52.0157 -54 02:57:52 -54 02:57:52.0 -54 02:57:52.02 -54 02:57:52.016 -54 02:57:52.0157 -54 02:57:52.01565 -54 02:57:52.01565 ***** ****** ******* -1312:45 -1312:45 -1312:45 -1312:45 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44.9 -1312:45:44.9 -1312:45:44.9 -1312:45:44.9 -1312:45:44 -1312:45:44.9 -1312:45:44.87 -1312:45:44.87 -1312:45:44.87 -1312:45:44.87 -1312:45:44 -1312:45:44.9 -1312:45:44.87 -1312:45:44.865 -1312:45:44.865 -1312:45:44.865 -1312:45:44.865 ******** -54 16:45 -54 16:45 -54 16:45 -54 16:45:44 -54 16:45:44 -54 16:45:44 -54 16:45:44 -54 16:45:44.9 -54 16:45:44.9 -54 16:45:44 -54 16:45:44.9 -54 16:45:44.87 -54 16:45:44.87 -54 16:45:44 -54 16:45:44.9 -54 16:45:44.87 -54 16:45:44.865 -54 16:45:44.865 -54 16:45:44 -54 16:45:44.9 -54 16:45:44.87 -54 16:45:44.865 -54 16:45:44.8653 -54 16:45:44.8653 -54 16:45:44 -54 16:45:44.9 -54 16:45:44.87 -54 16:45:44.865 -54 16:45:44.8653 -54 16:45:44.86529 -54 16:45:44.86529 ***** ****** ******* -1317:30 -1317:30 -1317:30 -1317:30 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57.8 -1317:30:57.8 -1317:30:57.8 -1317:30:57.8 -1317:30:57 -1317:30:57.8 -1317:30:57.82 -1317:30:57.82 -1317:30:57.82 -1317:30:57.82 -1317:30:57 -1317:30:57.8 -1317:30:57.82 -1317:30:57.820 -1317:30:57.820 -1317:30:57.820 -1317:30:57.820 ******** -54 21:30 -54 21:30 -54 21:30 -54 21:30:57 -54 21:30:57 -54 21:30:57 -54 21:30:57 -54 21:30:57.8 -54 21:30:57.8 -54 21:30:57 -54 21:30:57.8 -54 21:30:57.82 -54 21:30:57.82 -54 21:30:57 -54 21:30:57.8 -54 21:30:57.82 -54 21:30:57.820 -54 21:30:57.820 -54 21:30:57 -54 21:30:57.8 -54 21:30:57.82 -54 21:30:57.820 -54 21:30:57.8205 -54 21:30:57.8205 -54 21:30:57 -54 21:30:57.8 -54 21:30:57.82 -54 21:30:57.820 -54 21:30:57.8205 -54 21:30:57.82047 -54 21:30:57.82047 ***** ****** ******* -1300:25 -1300:25 -1300:25 -1300:25 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09 -1300:25:09.2 -1300:25:09.2 -1300:25:09.2 -1300:25:09.2 -1300:25:09 -1300:25:09.2 -1300:25:09.15 -1300:25:09.15 -1300:25:09.15 -1300:25:09.15 -1300:25:09 -1300:25:09.2 -1300:25:09.15 -1300:25:09.154 -1300:25:09.154 -1300:25:09.154 -1300:25:09.154 ******** -54 04:25 -54 04:25 -54 04:25 -54 04:25:09 -54 04:25:09 -54 04:25:09 -54 04:25:09 -54 04:25:09.2 -54 04:25:09.2 -54 04:25:09 -54 04:25:09.2 -54 04:25:09.15 -54 04:25:09.15 -54 04:25:09 -54 04:25:09.2 -54 04:25:09.15 -54 04:25:09.154 -54 04:25:09.154 -54 04:25:09 -54 04:25:09.2 -54 04:25:09.15 -54 04:25:09.154 -54 04:25:09.1540 -54 04:25:09.1540 -54 04:25:09 -54 04:25:09.2 -54 04:25:09.15 -54 04:25:09.154 -54 04:25:09.1540 -54 04:25:09.15395 -54 04:25:09.15395 ***** ****** ******* -1302:49 -1302:49 -1302:49 -1302:49 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27 -1302:49:27.1 -1302:49:27.1 -1302:49:27.1 -1302:49:27.1 -1302:49:27 -1302:49:27.1 -1302:49:27.11 -1302:49:27.11 -1302:49:27.11 -1302:49:27.11 -1302:49:27 -1302:49:27.1 -1302:49:27.11 -1302:49:27.105 -1302:49:27.105 -1302:49:27.105 -1302:49:27.105 ******** -54 06:49 -54 06:49 -54 06:49 -54 06:49:27 -54 06:49:27 -54 06:49:27 -54 06:49:27 -54 06:49:27.1 -54 06:49:27.1 -54 06:49:27 -54 06:49:27.1 -54 06:49:27.11 -54 06:49:27.11 -54 06:49:27 -54 06:49:27.1 -54 06:49:27.11 -54 06:49:27.105 -54 06:49:27.105 -54 06:49:27 -54 06:49:27.1 -54 06:49:27.11 -54 06:49:27.105 -54 06:49:27.1053 -54 06:49:27.1053 -54 06:49:27 -54 06:49:27.1 -54 06:49:27.11 -54 06:49:27.105 -54 06:49:27.1053 -54 06:49:27.10533 -54 06:49:27.10533 ***** ****** ******* -1298:57 -1298:57 -1298:57 -1298:57 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52 -1298:57:52.5 -1298:57:52.5 -1298:57:52.5 -1298:57:52.5 -1298:57:52 -1298:57:52.5 -1298:57:52.48 -1298:57:52.48 -1298:57:52.48 -1298:57:52.48 -1298:57:52 -1298:57:52.5 -1298:57:52.48 -1298:57:52.482 -1298:57:52.482 -1298:57:52.482 -1298:57:52.482 ******** -54 02:57 -54 02:57 -54 02:57 -54 02:57:52 -54 02:57:52 -54 02:57:52 -54 02:57:52 -54 02:57:52.5 -54 02:57:52.5 -54 02:57:52 -54 02:57:52.5 -54 02:57:52.48 -54 02:57:52.48 -54 02:57:52 -54 02:57:52.5 -54 02:57:52.48 -54 02:57:52.482 -54 02:57:52.482 -54 02:57:52 -54 02:57:52.5 -54 02:57:52.48 -54 02:57:52.482 -54 02:57:52.4823 -54 02:57:52.4823 -54 02:57:52 -54 02:57:52.5 -54 02:57:52.48 -54 02:57:52.482 -54 02:57:52.4823 -54 02:57:52.48229 -54 02:57:52.48229 ***** ****** ******* -1312:45 -1312:45 -1312:45 -1312:45 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44 -1312:45:44.7 -1312:45:44.7 -1312:45:44.7 -1312:45:44.7 -1312:45:44 -1312:45:44.7 -1312:45:44.66 -1312:45:44.66 -1312:45:44.66 -1312:45:44.66 -1312:45:44 -1312:45:44.7 -1312:45:44.66 -1312:45:44.658 -1312:45:44.658 -1312:45:44.658 -1312:45:44.658 ******** -54 16:45 -54 16:45 -54 16:45 -54 16:45:44 -54 16:45:44 -54 16:45:44 -54 16:45:44 -54 16:45:44.7 -54 16:45:44.7 -54 16:45:44 -54 16:45:44.7 -54 16:45:44.66 -54 16:45:44.66 -54 16:45:44 -54 16:45:44.7 -54 16:45:44.66 -54 16:45:44.658 -54 16:45:44.658 -54 16:45:44 -54 16:45:44.7 -54 16:45:44.66 -54 16:45:44.658 -54 16:45:44.6583 -54 16:45:44.6583 -54 16:45:44 -54 16:45:44.7 -54 16:45:44.66 -54 16:45:44.658 -54 16:45:44.6583 -54 16:45:44.65827 -54 16:45:44.65827 ***** ****** ******* -1317:30 -1317:30 -1317:30 -1317:30 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57 -1317:30:57.6 -1317:30:57.6 -1317:30:57.6 -1317:30:57.6 -1317:30:57 -1317:30:57.6 -1317:30:57.58 -1317:30:57.58 -1317:30:57.58 -1317:30:57.58 -1317:30:57 -1317:30:57.6 -1317:30:57.58 -1317:30:57.582 -1317:30:57.582 -1317:30:57.582 -1317:30:57.582 ******** -54 21:30 -54 21:30 -54 21:30 -54 21:30:57 -54 21:30:57 -54 21:30:57 -54 21:30:57 -54 21:30:57.6 -54 21:30:57.6 -54 21:30:57 -54 21:30:57.6 -54 21:30:57.58 -54 21:30:57.58 -54 21:30:57 -54 21:30:57.6 -54 21:30:57.58 -54 21:30:57.582 -54 21:30:57.582 -54 21:30:57 -54 21:30:57.6 -54 21:30:57.58 -54 21:30:57.582 -54 21:30:57.5822 -54 21:30:57.5822 -54 21:30:57 -54 21:30:57.6 -54 21:30:57.58 -54 21:30:57.582 -54 21:30:57.5822 -54 21:30:57.58219 -54 21:30:57.58219 ***** ****** ******* -1318:30 -1318:30 -1318:30 -1318:30 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04 -1318:30:04.2 -1318:30:04.2 -1318:30:04.2 -1318:30:04.2 -1318:30:04 -1318:30:04.2 -1318:30:04.18 -1318:30:04.18 -1318:30:04.18 -1318:30:04.18 -1318:30:04 -1318:30:04.2 -1318:30:04.18 -1318:30:04.183 -1318:30:04.183 -1318:30:04.183 -1318:30:04.183 ******** -54 22:30 -54 22:30 -54 22:30 -54 22:30:04 -54 22:30:04 -54 22:30:04 -54 22:30:04 -54 22:30:04.2 -54 22:30:04.2 -54 22:30:04 -54 22:30:04.2 -54 22:30:04.18 -54 22:30:04.18 -54 22:30:04 -54 22:30:04.2 -54 22:30:04.18 -54 22:30:04.183 -54 22:30:04.183 -54 22:30:04 -54 22:30:04.2 -54 22:30:04.18 -54 22:30:04.183 -54 22:30:04.1835 -54 22:30:04.1835 -54 22:30:04 -54 22:30:04.2 -54 22:30:04.18 -54 22:30:04.183 -54 22:30:04.1835 -54 22:30:04.18347 -54 22:30:04.18347 ***** ****** ******* -1297:56 -1297:56 -1297:56 -1297:56 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51 -1297:56:51.6 -1297:56:51.6 -1297:56:51.6 -1297:56:51.6 -1297:56:51 -1297:56:51.6 -1297:56:51.59 -1297:56:51.59 -1297:56:51.59 -1297:56:51.59 -1297:56:51 -1297:56:51.6 -1297:56:51.59 -1297:56:51.593 -1297:56:51.593 -1297:56:51.593 -1297:56:51.593 ******** -54 01:56 -54 01:56 -54 01:56 -54 01:56:51 -54 01:56:51 -54 01:56:51 -54 01:56:51 -54 01:56:51.6 -54 01:56:51.6 -54 01:56:51 -54 01:56:51.6 -54 01:56:51.59 -54 01:56:51.59 -54 01:56:51 -54 01:56:51.6 -54 01:56:51.59 -54 01:56:51.593 -54 01:56:51.593 -54 01:56:51 -54 01:56:51.6 -54 01:56:51.59 -54 01:56:51.593 -54 01:56:51.5932 -54 01:56:51.5932 -54 01:56:51 -54 01:56:51.6 -54 01:56:51.59 -54 01:56:51.593 -54 01:56:51.5932 -54 01:56:51.59319 -54 01:56:51.59319 ***** ****** ******* ******** -16344:00 -16344:00 -16344:00 -16344:00 -16344:00 -16344:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00 -16344:00:00.0 -16344:00:00.0 -16344:00:00.0 -16344:00:00.0 -16344:00:00.0 -16344:00:00 -16344:00:00.0 -16344:00:00.00 -16344:00:00.00 -16344:00:00.00 -16344:00:00.00 -16344:00:00.00 ******** ********* -681 00:00 -681 00:00 -681 00:00 -681 00:00:00 -681 00:00:00 -681 00:00:00 -681 00:00:00 -681 00:00:00 -681 00:00:00 -681 00:00:00.0 -681 00:00:00.0 -681 00:00:00.0 -681 00:00:00 -681 00:00:00.0 -681 00:00:00.00 -681 00:00:00.00 -681 00:00:00.00 -681 00:00:00 -681 00:00:00.0 -681 00:00:00.00 -681 00:00:00.000 -681 00:00:00.000 -681 00:00:00.000 -681 00:00:00 -681 00:00:00.0 -681 00:00:00.00 -681 00:00:00.000 -681 00:00:00.0000 -681 00:00:00.0000 -681 00:00:00.0000 ***** ****** ******* ******** -16348:50 -16348:50 -16348:50 -16348:50 -16348:50 -16348:50 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38 -16348:50:38.1 -16348:50:38.1 -16348:50:38.1 -16348:50:38.1 -16348:50:38.1 -16348:50:38 -16348:50:38.1 -16348:50:38.12 -16348:50:38.12 -16348:50:38.12 -16348:50:38.12 -16348:50:38.12 ******** ********* -681 04:50 -681 04:50 -681 04:50 -681 04:50:38 -681 04:50:38 -681 04:50:38 -681 04:50:38 -681 04:50:38 -681 04:50:38 -681 04:50:38.1 -681 04:50:38.1 -681 04:50:38.1 -681 04:50:38 -681 04:50:38.1 -681 04:50:38.12 -681 04:50:38.12 -681 04:50:38.12 -681 04:50:38 -681 04:50:38.1 -681 04:50:38.12 -681 04:50:38.123 -681 04:50:38.123 -681 04:50:38.123 -681 04:50:38 -681 04:50:38.1 -681 04:50:38.12 -681 04:50:38.123 -681 04:50:38.1230 -681 04:50:38.1230 -681 04:50:38.1230 ***** ****** ******* ******** -16356:31 -16356:31 -16356:31 -16356:31 -16356:31 -16356:31 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35 -16356:31:35.2 -16356:31:35.2 -16356:31:35.2 -16356:31:35.2 -16356:31:35.2 -16356:31:35 -16356:31:35.2 -16356:31:35.23 -16356:31:35.23 -16356:31:35.23 -16356:31:35.23 -16356:31:35.23 ******** ********* -681 12:31 -681 12:31 -681 12:31 -681 12:31:35 -681 12:31:35 -681 12:31:35 -681 12:31:35 -681 12:31:35 -681 12:31:35 -681 12:31:35.2 -681 12:31:35.2 -681 12:31:35.2 -681 12:31:35 -681 12:31:35.2 -681 12:31:35.23 -681 12:31:35.23 -681 12:31:35.23 -681 12:31:35 -681 12:31:35.2 -681 12:31:35.23 -681 12:31:35.235 -681 12:31:35.235 -681 12:31:35.235 -681 12:31:35 -681 12:31:35.2 -681 12:31:35.23 -681 12:31:35.235 -681 12:31:35.2345 -681 12:31:35.2345 -681 12:31:35.2345 ***** ****** ******* ******** -16356:47 -16356:47 -16356:47 -16356:47 -16356:47 -16356:47 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53 -16356:47:53.3 -16356:47:53.3 -16356:47:53.3 -16356:47:53.3 -16356:47:53.3 -16356:47:53 -16356:47:53.3 -16356:47:53.35 -16356:47:53.35 -16356:47:53.35 -16356:47:53.35 -16356:47:53.35 ******** ********* -681 12:47 -681 12:47 -681 12:47 -681 12:47:53 -681 12:47:53 -681 12:47:53 -681 12:47:53 -681 12:47:53 -681 12:47:53 -681 12:47:53.3 -681 12:47:53.3 -681 12:47:53.3 -681 12:47:53 -681 12:47:53.3 -681 12:47:53.35 -681 12:47:53.35 -681 12:47:53.35 -681 12:47:53 -681 12:47:53.3 -681 12:47:53.35 -681 12:47:53.345 -681 12:47:53.345 -681 12:47:53.345 -681 12:47:53 -681 12:47:53.3 -681 12:47:53.35 -681 12:47:53.345 -681 12:47:53.3450 -681 12:47:53.3450 -681 12:47:53.3450 ***** ****** ******* ******** -16345:26 -16345:26 -16345:26 -16345:26 -16345:26 -16345:26 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00 -16345:26:00.5 -16345:26:00.5 -16345:26:00.5 -16345:26:00.5 -16345:26:00.5 -16345:26:00 -16345:26:00.5 -16345:26:00.46 -16345:26:00.46 -16345:26:00.46 -16345:26:00.46 -16345:26:00.46 ******** ********* -681 01:26 -681 01:26 -681 01:26 -681 01:26:00 -681 01:26:00 -681 01:26:00 -681 01:26:00 -681 01:26:00 -681 01:26:00 -681 01:26:00.5 -681 01:26:00.5 -681 01:26:00.5 -681 01:26:00 -681 01:26:00.5 -681 01:26:00.46 -681 01:26:00.46 -681 01:26:00.46 -681 01:26:00 -681 01:26:00.5 -681 01:26:00.46 -681 01:26:00.456 -681 01:26:00.456 -681 01:26:00.456 -681 01:26:00 -681 01:26:00.5 -681 01:26:00.46 -681 01:26:00.456 -681 01:26:00.4562 -681 01:26:00.4562 -681 01:26:00.4562 ***** ****** ******* ******** -16364:58 -16364:58 -16364:58 -16364:58 -16364:58 -16364:58 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11 -16364:58:11.6 -16364:58:11.6 -16364:58:11.6 -16364:58:11.6 -16364:58:11.6 -16364:58:11 -16364:58:11.6 -16364:58:11.57 -16364:58:11.57 -16364:58:11.57 -16364:58:11.57 -16364:58:11.57 ******** ********* -681 20:58 -681 20:58 -681 20:58 -681 20:58:11 -681 20:58:11 -681 20:58:11 -681 20:58:11 -681 20:58:11 -681 20:58:11 -681 20:58:11.6 -681 20:58:11.6 -681 20:58:11.6 -681 20:58:11 -681 20:58:11.6 -681 20:58:11.57 -681 20:58:11.57 -681 20:58:11.57 -681 20:58:11 -681 20:58:11.6 -681 20:58:11.57 -681 20:58:11.567 -681 20:58:11.567 -681 20:58:11.567 -681 20:58:11 -681 20:58:11.6 -681 20:58:11.57 -681 20:58:11.567 -681 20:58:11.5668 -681 20:58:11.5668 -681 20:58:11.5668 ***** ****** ******* ******** -16351:36 -16351:36 -16351:36 -16351:36 -16351:36 -16351:36 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05 -16351:36:05.2 -16351:36:05.2 -16351:36:05.2 -16351:36:05.2 -16351:36:05.2 -16351:36:05 -16351:36:05.2 -16351:36:05.19 -16351:36:05.19 -16351:36:05.19 -16351:36:05.19 -16351:36:05.19 ******** ********* -681 07:36 -681 07:36 -681 07:36 -681 07:36:05 -681 07:36:05 -681 07:36:05 -681 07:36:05 -681 07:36:05 -681 07:36:05 -681 07:36:05.2 -681 07:36:05.2 -681 07:36:05.2 -681 07:36:05 -681 07:36:05.2 -681 07:36:05.19 -681 07:36:05.19 -681 07:36:05.19 -681 07:36:05 -681 07:36:05.2 -681 07:36:05.19 -681 07:36:05.190 -681 07:36:05.190 -681 07:36:05.190 -681 07:36:05 -681 07:36:05.2 -681 07:36:05.19 -681 07:36:05.190 -681 07:36:05.1896 -681 07:36:05.1896 -681 07:36:05.1896 ***** ****** ******* ******** -16359:43 -16359:43 -16359:43 -16359:43 -16359:43 -16359:43 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49 -16359:43:49.8 -16359:43:49.8 -16359:43:49.8 -16359:43:49.8 -16359:43:49.8 -16359:43:49 -16359:43:49.8 -16359:43:49.83 -16359:43:49.83 -16359:43:49.83 -16359:43:49.83 -16359:43:49.83 ******** ********* -681 15:43 -681 15:43 -681 15:43 -681 15:43:49 -681 15:43:49 -681 15:43:49 -681 15:43:49 -681 15:43:49 -681 15:43:49 -681 15:43:49.8 -681 15:43:49.8 -681 15:43:49.8 -681 15:43:49 -681 15:43:49.8 -681 15:43:49.83 -681 15:43:49.83 -681 15:43:49.83 -681 15:43:49 -681 15:43:49.8 -681 15:43:49.83 -681 15:43:49.831 -681 15:43:49.831 -681 15:43:49.831 -681 15:43:49 -681 15:43:49.8 -681 15:43:49.83 -681 15:43:49.831 -681 15:43:49.8313 -681 15:43:49.8313 -681 15:43:49.8313 ***** ****** ******* ******** -16348:25 -16348:25 -16348:25 -16348:25 -16348:25 -16348:25 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09.0 -16348:25:09.0 -16348:25:09.0 -16348:25:09.0 -16348:25:09.0 -16348:25:09 -16348:25:09.0 -16348:25:09.01 -16348:25:09.01 -16348:25:09.01 -16348:25:09.01 -16348:25:09.01 ******** ********* -681 04:25 -681 04:25 -681 04:25 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09.0 -681 04:25:09.0 -681 04:25:09.0 -681 04:25:09 -681 04:25:09.0 -681 04:25:09.01 -681 04:25:09.01 -681 04:25:09.01 -681 04:25:09 -681 04:25:09.0 -681 04:25:09.01 -681 04:25:09.013 -681 04:25:09.013 -681 04:25:09.013 -681 04:25:09 -681 04:25:09.0 -681 04:25:09.01 -681 04:25:09.013 -681 04:25:09.0129 -681 04:25:09.0129 -681 04:25:09.0129 ***** ****** ******* ******** -16350:49 -16350:49 -16350:49 -16350:49 -16350:49 -16350:49 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27.5 -16350:49:27.5 -16350:49:27.5 -16350:49:27.5 -16350:49:27.5 -16350:49:27 -16350:49:27.5 -16350:49:27.52 -16350:49:27.52 -16350:49:27.52 -16350:49:27.52 -16350:49:27.52 ******** ********* -681 06:49 -681 06:49 -681 06:49 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27.5 -681 06:49:27.5 -681 06:49:27.5 -681 06:49:27 -681 06:49:27.5 -681 06:49:27.52 -681 06:49:27.52 -681 06:49:27.52 -681 06:49:27 -681 06:49:27.5 -681 06:49:27.52 -681 06:49:27.524 -681 06:49:27.524 -681 06:49:27.524 -681 06:49:27 -681 06:49:27.5 -681 06:49:27.52 -681 06:49:27.524 -681 06:49:27.5237 -681 06:49:27.5237 -681 06:49:27.5237 ***** ****** ******* ******** -16346:57 -16346:57 -16346:57 -16346:57 -16346:57 -16346:57 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52.0 -16346:57:52.0 -16346:57:52.0 -16346:57:52.0 -16346:57:52.0 -16346:57:52 -16346:57:52.0 -16346:57:52.02 -16346:57:52.02 -16346:57:52.02 -16346:57:52.02 -16346:57:52.02 ******** ********* -681 02:57 -681 02:57 -681 02:57 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52.0 -681 02:57:52.0 -681 02:57:52.0 -681 02:57:52 -681 02:57:52.0 -681 02:57:52.02 -681 02:57:52.02 -681 02:57:52.02 -681 02:57:52 -681 02:57:52.0 -681 02:57:52.02 -681 02:57:52.016 -681 02:57:52.016 -681 02:57:52.016 -681 02:57:52 -681 02:57:52.0 -681 02:57:52.02 -681 02:57:52.016 -681 02:57:52.0156 -681 02:57:52.0156 -681 02:57:52.0156 ***** ****** ******* ******** -16360:45 -16360:45 -16360:45 -16360:45 -16360:45 -16360:45 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44.9 -16360:45:44.9 -16360:45:44.9 -16360:45:44.9 -16360:45:44.9 -16360:45:44 -16360:45:44.9 -16360:45:44.87 -16360:45:44.87 -16360:45:44.87 -16360:45:44.87 -16360:45:44.87 ******** ********* -681 16:45 -681 16:45 -681 16:45 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44.9 -681 16:45:44.9 -681 16:45:44.9 -681 16:45:44 -681 16:45:44.9 -681 16:45:44.87 -681 16:45:44.87 -681 16:45:44.87 -681 16:45:44 -681 16:45:44.9 -681 16:45:44.87 -681 16:45:44.865 -681 16:45:44.865 -681 16:45:44.865 -681 16:45:44 -681 16:45:44.9 -681 16:45:44.87 -681 16:45:44.865 -681 16:45:44.8653 -681 16:45:44.8653 -681 16:45:44.8653 ***** ****** ******* ******** -16365:30 -16365:30 -16365:30 -16365:30 -16365:30 -16365:30 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57.8 -16365:30:57.8 -16365:30:57.8 -16365:30:57.8 -16365:30:57.8 -16365:30:57 -16365:30:57.8 -16365:30:57.82 -16365:30:57.82 -16365:30:57.82 -16365:30:57.82 -16365:30:57.82 ******** ********* -681 21:30 -681 21:30 -681 21:30 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57.8 -681 21:30:57.8 -681 21:30:57.8 -681 21:30:57 -681 21:30:57.8 -681 21:30:57.82 -681 21:30:57.82 -681 21:30:57.82 -681 21:30:57 -681 21:30:57.8 -681 21:30:57.82 -681 21:30:57.820 -681 21:30:57.820 -681 21:30:57.820 -681 21:30:57 -681 21:30:57.8 -681 21:30:57.82 -681 21:30:57.820 -681 21:30:57.8205 -681 21:30:57.8205 -681 21:30:57.8205 ***** ****** ******* ******** -16348:25 -16348:25 -16348:25 -16348:25 -16348:25 -16348:25 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09 -16348:25:09.2 -16348:25:09.2 -16348:25:09.2 -16348:25:09.2 -16348:25:09.2 -16348:25:09 -16348:25:09.2 -16348:25:09.15 -16348:25:09.15 -16348:25:09.15 -16348:25:09.15 -16348:25:09.15 ******** ********* -681 04:25 -681 04:25 -681 04:25 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09 -681 04:25:09.2 -681 04:25:09.2 -681 04:25:09.2 -681 04:25:09 -681 04:25:09.2 -681 04:25:09.15 -681 04:25:09.15 -681 04:25:09.15 -681 04:25:09 -681 04:25:09.2 -681 04:25:09.15 -681 04:25:09.154 -681 04:25:09.154 -681 04:25:09.154 -681 04:25:09 -681 04:25:09.2 -681 04:25:09.15 -681 04:25:09.154 -681 04:25:09.1539 -681 04:25:09.1539 -681 04:25:09.1539 ***** ****** ******* ******** -16350:49 -16350:49 -16350:49 -16350:49 -16350:49 -16350:49 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27 -16350:49:27.1 -16350:49:27.1 -16350:49:27.1 -16350:49:27.1 -16350:49:27.1 -16350:49:27 -16350:49:27.1 -16350:49:27.11 -16350:49:27.11 -16350:49:27.11 -16350:49:27.11 -16350:49:27.11 ******** ********* -681 06:49 -681 06:49 -681 06:49 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27 -681 06:49:27.1 -681 06:49:27.1 -681 06:49:27.1 -681 06:49:27 -681 06:49:27.1 -681 06:49:27.11 -681 06:49:27.11 -681 06:49:27.11 -681 06:49:27 -681 06:49:27.1 -681 06:49:27.11 -681 06:49:27.105 -681 06:49:27.105 -681 06:49:27.105 -681 06:49:27 -681 06:49:27.1 -681 06:49:27.11 -681 06:49:27.105 -681 06:49:27.1053 -681 06:49:27.1053 -681 06:49:27.1053 ***** ****** ******* ******** -16346:57 -16346:57 -16346:57 -16346:57 -16346:57 -16346:57 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52 -16346:57:52.5 -16346:57:52.5 -16346:57:52.5 -16346:57:52.5 -16346:57:52.5 -16346:57:52 -16346:57:52.5 -16346:57:52.48 -16346:57:52.48 -16346:57:52.48 -16346:57:52.48 -16346:57:52.48 ******** ********* -681 02:57 -681 02:57 -681 02:57 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52 -681 02:57:52.5 -681 02:57:52.5 -681 02:57:52.5 -681 02:57:52 -681 02:57:52.5 -681 02:57:52.48 -681 02:57:52.48 -681 02:57:52.48 -681 02:57:52 -681 02:57:52.5 -681 02:57:52.48 -681 02:57:52.482 -681 02:57:52.482 -681 02:57:52.482 -681 02:57:52 -681 02:57:52.5 -681 02:57:52.48 -681 02:57:52.482 -681 02:57:52.4823 -681 02:57:52.4823 -681 02:57:52.4823 ***** ****** ******* ******** -16360:45 -16360:45 -16360:45 -16360:45 -16360:45 -16360:45 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44 -16360:45:44.7 -16360:45:44.7 -16360:45:44.7 -16360:45:44.7 -16360:45:44.7 -16360:45:44 -16360:45:44.7 -16360:45:44.66 -16360:45:44.66 -16360:45:44.66 -16360:45:44.66 -16360:45:44.66 ******** ********* -681 16:45 -681 16:45 -681 16:45 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44 -681 16:45:44.7 -681 16:45:44.7 -681 16:45:44.7 -681 16:45:44 -681 16:45:44.7 -681 16:45:44.66 -681 16:45:44.66 -681 16:45:44.66 -681 16:45:44 -681 16:45:44.7 -681 16:45:44.66 -681 16:45:44.658 -681 16:45:44.658 -681 16:45:44.658 -681 16:45:44 -681 16:45:44.7 -681 16:45:44.66 -681 16:45:44.658 -681 16:45:44.6583 -681 16:45:44.6583 -681 16:45:44.6583 ***** ****** ******* ******** -16365:30 -16365:30 -16365:30 -16365:30 -16365:30 -16365:30 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57 -16365:30:57.6 -16365:30:57.6 -16365:30:57.6 -16365:30:57.6 -16365:30:57.6 -16365:30:57 -16365:30:57.6 -16365:30:57.58 -16365:30:57.58 -16365:30:57.58 -16365:30:57.58 -16365:30:57.58 ******** ********* -681 21:30 -681 21:30 -681 21:30 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57 -681 21:30:57.6 -681 21:30:57.6 -681 21:30:57.6 -681 21:30:57 -681 21:30:57.6 -681 21:30:57.58 -681 21:30:57.58 -681 21:30:57.58 -681 21:30:57 -681 21:30:57.6 -681 21:30:57.58 -681 21:30:57.582 -681 21:30:57.582 -681 21:30:57.582 -681 21:30:57 -681 21:30:57.6 -681 21:30:57.58 -681 21:30:57.582 -681 21:30:57.5822 -681 21:30:57.5822 -681 21:30:57.5822 ***** ****** ******* ******** -16366:30 -16366:30 -16366:30 -16366:30 -16366:30 -16366:30 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04 -16366:30:04.2 -16366:30:04.2 -16366:30:04.2 -16366:30:04.2 -16366:30:04.2 -16366:30:04 -16366:30:04.2 -16366:30:04.18 -16366:30:04.18 -16366:30:04.18 -16366:30:04.18 -16366:30:04.18 ******** ********* -681 22:30 -681 22:30 -681 22:30 -681 22:30:04 -681 22:30:04 -681 22:30:04 -681 22:30:04 -681 22:30:04 -681 22:30:04 -681 22:30:04.2 -681 22:30:04.2 -681 22:30:04.2 -681 22:30:04 -681 22:30:04.2 -681 22:30:04.18 -681 22:30:04.18 -681 22:30:04.18 -681 22:30:04 -681 22:30:04.2 -681 22:30:04.18 -681 22:30:04.183 -681 22:30:04.183 -681 22:30:04.183 -681 22:30:04 -681 22:30:04.2 -681 22:30:04.18 -681 22:30:04.183 -681 22:30:04.1835 -681 22:30:04.1835 -681 22:30:04.1835 ***** ****** ******* ******** -16345:56 -16345:56 -16345:56 -16345:56 -16345:56 -16345:56 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51 -16345:56:51.6 -16345:56:51.6 -16345:56:51.6 -16345:56:51.6 -16345:56:51.6 -16345:56:51 -16345:56:51.6 -16345:56:51.59 -16345:56:51.59 -16345:56:51.59 -16345:56:51.59 -16345:56:51.59 ******** ********* -681 01:56 -681 01:56 -681 01:56 -681 01:56:51 -681 01:56:51 -681 01:56:51 -681 01:56:51 -681 01:56:51 -681 01:56:51 -681 01:56:51.6 -681 01:56:51.6 -681 01:56:51.6 -681 01:56:51 -681 01:56:51.6 -681 01:56:51.59 -681 01:56:51.59 -681 01:56:51.59 -681 01:56:51 -681 01:56:51.6 -681 01:56:51.59 -681 01:56:51.593 -681 01:56:51.593 -681 01:56:51.593 -681 01:56:51 -681 01:56:51.6 -681 01:56:51.59 -681 01:56:51.593 -681 01:56:51.5932 -681 01:56:51.5932 -681 01:56:51.5932 ]) AT_CLEANUP AT_SETUP([MONTH output]) AT_DATA([month-out.sps], [dnl set mxerr=1000000. set mxwarns=10000000. data list notable/x 1-10. begin data. 0 0.5 0.9 1 2 3 4 4.1 4.5 4.9 5 6 7 7.1 7.5 7.9 8 9 10 11 12 13 end data. print outfile='month-out.out'/x(month3). print outfile='month-out.out'/x(month4). print outfile='month-out.out'/x(month5). print outfile='month-out.out'/x(month6). print outfile='month-out.out'/x(month7). print outfile='month-out.out'/x(month8). print outfile='month-out.out'/x(month9). print outfile='month-out.out'/x(month10). print outfile='month-out.out'/x(month11). print outfile='month-out.out'/x(month12). print outfile='month-out.out'/x(month13). print outfile='month-out.out'/x(month14). print outfile='month-out.out'/x(month15). print outfile='month-out.out'/x(month16). print outfile='month-out.out'/x(month17). print outfile='month-out.out'/x(month18). print outfile='month-out.out'/x(month19). print outfile='month-out.out'/x(month20). print outfile='month-out.out'/x(month21). print outfile='month-out.out'/x(month22). print outfile='month-out.out'/x(month23). print outfile='month-out.out'/x(month24). print outfile='month-out.out'/x(month25). print outfile='month-out.out'/x(month26). print outfile='month-out.out'/x(month27). print outfile='month-out.out'/x(month28). print outfile='month-out.out'/x(month29). print outfile='month-out.out'/x(month30). print outfile='month-out.out'/x(month31). print outfile='month-out.out'/x(month32). print outfile='month-out.out'/x(month33). print outfile='month-out.out'/x(month34). print outfile='month-out.out'/x(month35). print outfile='month-out.out'/x(month36). print outfile='month-out.out'/x(month37). print outfile='month-out.out'/x(month38). print outfile='month-out.out'/x(month39). print outfile='month-out.out'/x(month40). execute. ]) AT_CHECK([pspp -O format=csv month-out.sps], [1], [stdout]) AT_CHECK([[sed '/^ * *$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0], [dnl 38 error: Month number 0.000000 is not between 1 and 12. 38 error: Month number 0.500000 is not between 1 and 12. 38 error: Month number 0.900000 is not between 1 and 12. 38 error: Month number 13.000000 is not between 1 and 12. ]) AT_CHECK([cat month-out.out], [0], [dnl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . JAN JANU JANUA JANUAR JANUARY JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ JANUARY @&t@ FEB FEBR FEBRU FEBRUA FEBRUAR FEBRUARY FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ FEBRUARY @&t@ MAR MARC MARCH MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ MARCH @&t@ APR APRI APRIL APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APR APRI APRIL APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APR APRI APRIL APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APR APRI APRIL APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ APRIL @&t@ MAY MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ MAY @&t@ JUN JUNE JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUNE @&t@ JUL JULY JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JUL JULY JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JUL JULY JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JUL JULY JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ JULY @&t@ AUG AUGU AUGUS AUGUST AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ AUGUST @&t@ SEP SEPT SEPTE SEPTEM SEPTEMB SEPTEMBE SEPTEMBER SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ SEPTEMBER @&t@ OCT OCTO OCTOB OCTOBE OCTOBER OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ OCTOBER @&t@ NOV NOVE NOVEM NOVEMB NOVEMBE NOVEMBER NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ NOVEMBER @&t@ DEC DECE DECEM DECEMB DECEMBE DECEMBER DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ DECEMBER @&t@ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ]) AT_CLEANUP AT_SETUP([WKDAY output]) AT_DATA([wkday-out.sps], [dnl set mxwarns=10000000. set mxerrs=10000000. data list notable/x 1-10. begin data. 0 0.5 0.9 1 2 3 4 4.1 4.5 4.9 5 6 7 7.1 7.5 7.9 8 end data. do repeat format=wkday2 to wkday40. print outfile='wkday-out.out'/x(format). end repeat. execute. ]) AT_CHECK([pspp -O format=csv wkday-out.sps], [1], [stdout]) AT_CHECK([[sed '/^ * *$/d' stdout | sort | uniq -c | sed 's/^[ ]*//']], [0], [dnl 39 error: Weekday number 0.000000 is not between 1 and 7. 39 error: Weekday number 0.500000 is not between 1 and 7. 39 error: Weekday number 0.900000 is not between 1 and 7. 39 error: Weekday number 8.000000 is not between 1 and 7. ]) AT_CHECK([cat wkday-out.out], [0], [dnl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SU SUN SUND SUNDA SUNDAY SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ SUNDAY @&t@ MO MON MOND MONDA MONDAY MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ MONDAY @&t@ TU TUE TUES TUESD TUESDA TUESDAY TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ TUESDAY @&t@ WE WED WEDN WEDNE WEDNES WEDNESD WEDNESDA WEDNESDAY WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WE WED WEDN WEDNE WEDNES WEDNESD WEDNESDA WEDNESDAY WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WE WED WEDN WEDNE WEDNES WEDNESD WEDNESDA WEDNESDAY WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WE WED WEDN WEDNE WEDNES WEDNESD WEDNESDA WEDNESDAY WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ WEDNESDAY @&t@ TH THU THUR THURS THURSD THURSDA THURSDAY THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ THURSDAY @&t@ FR FRI FRID FRIDA FRIDAY FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ FRIDAY @&t@ SA SAT SATU SATUR SATURD SATURDA SATURDAY SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SA SAT SATU SATUR SATURD SATURDA SATURDAY SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SA SAT SATU SATUR SATURD SATURDA SATURDAY SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SA SAT SATU SATUR SATURD SATURDA SATURDAY SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ SATURDAY @&t@ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ]) AT_CLEANUP dnl This checks for a regression where AHEX output would crash due to dnl dereferencing string data as a pointer, for string widths between dnl 5 and 8, inclusive. AT_SETUP([AHEX output bug]) AT_DATA([ahex.sps], [ DATA LIST NOTABLE /s (a8). BEGIN DATA. abcdefgh END DATA. FORMATS s (AHEX16). LIST. ]) AT_CHECK([pspp -O format=csv ahex.sps], [0], [dnl Table: Data List s 6162636465666768 ]) AT_CLEANUP pspp-1.0.1/tests/data/format-guesser.at0000644000175000017500000001061513137223525014766 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([format guesser]) AT_SETUP([format guesser]) AT_DATA([format-guesser.txt], [dnl # No data. => F8.2 "" => F8.2 "." => F8.2 # Numeric formats. "1.2" => F3.1 "$1.2" => DOLLAR4.1 "1.2%" => PCT4.1 "$1.2%" => A5 "1e5" => E3.0 "1e+5" => E4.0 "1+5" => E3.0 "1-5" => E3.0 "1.2e5" => E5.1 "1.3e+5" => E6.1 "1.4+5" => E5.1 "1e" => A2 "1e+" => A3 "1+" => A2 "1-" => A2 "1.5-5" => E5.1 "1,123" => COMMA5.0 # Is , is grouping or decimal? Assume grouping. "1.123" => F5.3 # Ditto. "1,12" => F4.2 # Not a group of 3, so last delim must be decimal. "1.12" => F4.2 # Ditto. "1,1234" => F6.4 # Not a group of 3, so last delim must be decimal. "1.1234" => F6.4 # Ditto. "$1.234" => DOLLAR6.3 # Dollar sign means decimal has to be '.'. "$1,234" => DOLLAR6.0 # Ditto. "1.234%" => PCT6.3 # Percent sign means decimal has to be '.'. "1,234%" => PCT6.0 # Ditto. "1,123.456" => COMMA9.3 # Both '.' and ',', so last delim must be decimal. "1.123,456" => DOT9.3 # Ditto. "1,123,456.45" => COMMA12.2 # Ditto. "1.123.456,45" => DOT12.2 # Ditto. "1,123,456" => COMMA9.0 # Ditto. "1.123.456" => DOT9.0 # Ditto. # Date and time formats. "01-OCT-1978" => DATE11 "01-x-1978" => EDATE9 # Roman numeral for month. "01-13-99" => ADATE8 "1-13-99" => ADATE7 (ADATE8) "13-01-99" => EDATE8 "13-1-99" => EDATE7 (EDATE8) "32-1-1" => SDATE6 (SDATE8) "1q01" => QYR4 "1Q01" => QYR4 "1 q 01" => QYR6 "1 Q 01" => QYR6 "1q2001" => QYR6 "1Q2001" => QYR6 "1 q 2001" => QYR8 "1 Q 2001" => QYR8 "oct 05" => MOYR6 "oct 2005" => MOYR8 "1-1-01 1:2" => A10 # Minute needs at least two digits. "1-1-01 1:02" => DATETIME11.0 (DATETIME17.0) "1-1-01 1:02:3" => A13 # Second needs at least two digits. "1-1-01 1:02:03" => DATETIME20.0 "1-1-01 1:02:03.1" => DATETIME20.1 (DATETIME22.1) "1-1-01 +1:02:03.1" => DATETIME20.1 (DATETIME22.1) "1-1-01 -1:02:03.1" => DATETIME20.1 (DATETIME22.1) "1:30" => TIME4.0 (TIME5.0) "1:30:05" => TIME8.0 "-1:30" => TIME5.0 "+1:30" => TIME5.0 "-1:30:15" => TIME8.0 "+1:30:15" => TIME8.0 "-1:30:15.5" => TIME10.1 "+1:30:15.75" => TIME11.2 "1 1:30" => DTIME6.0 (DTIME8.0) "+1 1:30" => DTIME7.0 (DTIME8.0) "-1 1:30" => DTIME7.0 (DTIME8.0) "-1-13-99" => A8 "+1-13-99" => A8 "1+13+99" => A7 "1:00:01.03" => TIME10.2 (TIME11.2) "12 1:00:01.3" => DTIME12.1 (DTIME13.1) "jan" => MONTH3 "Feb" => MONTH3 "MAR" => MONTH3 "i" => A1 # Not detected as MONTH format. "v" => A1 "ix" => A2 "x" => A1 "january" => MONTH7 "janaury" => MONTH7 # Only first three letters are significant. "february" => MONTH8 "febraury" => MONTH8 "march" => MONTH5 "marhc" => MONTH5 "april" => MONTH5 "may" => MONTH3 "june" => MONTH4 "july" => MONTH4 "august" => MONTH6 "september" => MONTH9 "october" => MONTH7 "november" => MONTH8 "decmeber" => MONTH8 "december" => MONTH8 "monady" => WKDAY6 "tuseday" => WKDAY7 "wedensday" => WKDAY9 "thurdsay" => WKDAY8 "fridya" => WKDAY6 "saturady" => WKDAY8 "sudnay" => WKDAY6 # Ambiguous; bias in favor of more sensible DD/MM/YY format: "1/1/1978" => EDATE8 "01/01/01" => EDATE8 # Several ambiguous dates can be clarified by one unambiguous example: "1/1/1978" "1/2/1978" "1/3/1978" "1/13/1978" => ADATE9 # MM/DD/YY "01/01/01" "02/01/01" "03/01/01" "13/01/01" => EDATE8 # DD/MM/YY "01/01/01" "02/01/01" "03/01/01" "2013/01/01" => SDATE10 # YY/MM/DD ]) AT_CHECK([[(echo "SET DECIMAL=DOT." sed -e 's/#.*// s/[ ]*$// /^$/d s,^\(.*\)=> \(.*\)$,DEBUG FORMAT GUESSER \1.,') \ < format-guesser.txt > format-guesser.sps]]) AT_CHECK([pspp --testing-mode -O format=csv format-guesser.sps], [0], [], [stderr]) AT_CHECK([[sed -e 's/#.*// s/[ ]*$// /^$/d' < format-guesser.txt > expout]]) AT_CHECK([cat stderr], [0], [expout]) AT_CLEANUP pspp-1.0.1/tests/data/sack.c0000644000175000017500000004214113137223525012561 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include #include #include #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/float-format.h" #include "libpspp/hash-functions.h" #include "libpspp/hmap.h" #include "libpspp/integer-format.h" #include "gl/c-ctype.h" #include "gl/error.h" #include "gl/intprops.h" #include "gl/progname.h" #include "gl/xalloc.h" struct buffer { uint8_t *data; size_t size; size_t allocated; }; static void buffer_put (struct buffer *, const void *, size_t); static void *buffer_put_uninit (struct buffer *, size_t); enum token_type { T_EOF, T_INTEGER, T_FLOAT, T_PCSYSMIS, T_STRING, T_SEMICOLON, T_ASTERISK, T_LPAREN, T_RPAREN, T_I8, T_I16, T_I64, T_S, T_COUNT, T_COUNT8, T_HEX, T_LABEL, T_AT, T_MINUS, T_PLUS, }; static enum token_type token; static unsigned long long int tok_integer; static double tok_float; static char *tok_string; static size_t tok_strlen, tok_allocated; /* Symbol table. */ struct symbol { struct hmap_node hmap_node; const char *name; unsigned int offset; }; static struct hmap symbol_table = HMAP_INITIALIZER (symbol_table); /* --be, --le: Integer and floating-point formats. */ static enum float_format float_format = FLOAT_IEEE_DOUBLE_BE; static enum integer_format integer_format = INTEGER_MSB_FIRST; /* Input file and current position. */ static FILE *input; static const char *input_file_name; static int line_number; static void PRINTF_FORMAT (1, 2) fatal (const char *message, ...) { va_list args; fprintf (stderr, "%s:%d: ", input_file_name, line_number); va_start (args, message); vfprintf (stderr, message, args); va_end (args); putc ('\n', stderr); exit (EXIT_FAILURE); } static void add_char__ (int c) { if (tok_strlen >= tok_allocated) tok_string = x2realloc (tok_string, &tok_allocated); tok_string[tok_strlen] = c; } static void add_char (int c) { add_char__ (c); tok_strlen++; } static void get_token (void) { int c; do { c = getc (input); if (c == '#') { while ((c = getc (input)) != '\n' && c != EOF) continue; } if (c == '\n') line_number++; } while (isspace (c) || c == '<' || c == '>'); tok_strlen = 0; if (c == EOF) { if (token == T_EOF) fatal ("unexpected end of input"); token = T_EOF; } else if (isdigit (c) || c == '-') { do { add_char (c); c = getc (input); } while (isdigit (c) || isalpha (c) || c == '.'); add_char__ ('\0'); ungetc (c, input); if (!strcmp (tok_string, "-")) token = T_MINUS; else { char *tail; errno = 0; if (strchr (tok_string, '.') == NULL) { token = T_INTEGER; tok_integer = strtoull (tok_string, &tail, 0); } else { token = T_FLOAT; tok_float = strtod (tok_string, &tail); } if (errno || *tail) fatal ("invalid numeric syntax \"%s\"", tok_string); } } else if (c == '"') { token = T_STRING; while ((c = getc (input)) != '"') { if (c == '\n') fatal ("new-line inside string"); add_char (c); } add_char__ ('\0'); } else if (c == ';') token = T_SEMICOLON; else if (c == '*') token = T_ASTERISK; else if (c == '+') token = T_PLUS; else if (c == '(') token = T_LPAREN; else if (c == ')') token = T_RPAREN; else if (isalpha (c) || c == '@' || c == '_') { do { add_char (c); c = getc (input); } while (isdigit (c) || isalpha (c) || c == '.' || c == '_'); add_char ('\0'); if (c == ':') { token = T_LABEL; return; } ungetc (c, input); if (tok_string[0] == '@') { token = T_AT; return; } if (!strcmp (tok_string, "i8")) token = T_I8; else if (!strcmp (tok_string, "i16")) token = T_I16; else if (!strcmp (tok_string, "i64")) token = T_I64; else if (tok_string[0] == 's') { token = T_S; tok_integer = atoi (tok_string + 1); } else if (!strcmp (tok_string, "SYSMIS")) { token = T_FLOAT; tok_float = -DBL_MAX; } else if (!strcmp (tok_string, "PCSYSMIS")) token = T_PCSYSMIS; else if (!strcmp (tok_string, "LOWEST")) { token = T_FLOAT; tok_float = float_get_lowest (); } else if (!strcmp (tok_string, "HIGHEST")) { token = T_FLOAT; tok_float = DBL_MAX; } else if (!strcmp (tok_string, "ENDIAN")) { token = T_INTEGER; tok_integer = integer_format == INTEGER_MSB_FIRST ? 1 : 2; } else if (!strcmp (tok_string, "COUNT")) token = T_COUNT; else if (!strcmp (tok_string, "COUNT8")) token = T_COUNT8; else if (!strcmp (tok_string, "hex")) token = T_HEX; else fatal ("invalid token `%s'", tok_string); } else fatal ("invalid input byte `%c'", c); } static void buffer_put (struct buffer *buffer, const void *data, size_t n) { memcpy (buffer_put_uninit (buffer, n), data, n); } static void * buffer_put_uninit (struct buffer *buffer, size_t n) { buffer->size += n; if (buffer->size > buffer->allocated) { buffer->allocated = buffer->size * 2; buffer->data = xrealloc (buffer->data, buffer->allocated); } return &buffer->data[buffer->size - n]; } /* Returns the integer value of hex digit C. */ static int hexit_value (int c) { const char s[] = "0123456789abcdef"; const char *cp = strchr (s, c_tolower ((unsigned char) c)); assert (cp != NULL); return cp - s; } static void usage (void) { printf ("\ %s, SAv Construction Kit\n\ usage: %s [OPTIONS] INPUT\n\ \nOptions:\n\ --be big-endian output format (default)\n\ --le little-endian output format\n\ --help print this help message and exit\n\ \n\ The input is a sequence of data items, each followed by a semicolon.\n\ Each data item is converted to the output format and written on\n\ stdout. A data item is one of the following\n\ \n\ - An integer in decimal, in hexadecimal prefixed by 0x, or in octal\n\ prefixed by 0. Output as a 32-bit binary integer.\n\ \n\ - A floating-point number. Output in 64-bit IEEE 754 format.\n\ \n\ - A string enclosed in double quotes. Output literally. There is\n\ no syntax for \"escapes\". Strings may not contain new-lines.\n\ \n\ - A literal of the form s followed by a quoted string as\n\ above. Output as the string's contents followed by enough spaces\n\ to fill up bytes. For example, s8 \"foo\" is output as\n\ the \"foo\" followed by 5 spaces.\n\ \n\ - The literal \"i8\", \"i16\", or \"i64\" followed by an integer. Output\n\ as a binary integer with the specified number of bits.\n\ \n\ - One of the literals SYSMIS, LOWEST, or HIGHEST. Output as a\n\ 64-bit IEEE 754 float of the appropriate PSPP value.\n\ \n\ - PCSYSMIS. Output as SPSS/PC+ system-missing value.\n\ \n\ - The literal ENDIAN. Output as a 32-bit binary integer, either\n\ with value 1 if --be is in effect or 2 if --le is in effect.\n\ \n\ - A pair of parentheses enclosing a sequence of data items, each\n\ followed by a semicolon (the last semicolon is optional).\n\ Output as the enclosed data items in sequence.\n\ \n\ - The literal COUNT or COUNT8 followed by a sequence of parenthesized\n\ data items, as above. Output as a 32-bit or 8-bit binary integer whose\n\ value is the number of bytes enclosed within the parentheses, followed\n\ by the enclosed data items themselves.\n\ \n\ optionally followed by an asterisk and a positive integer, which\n\ specifies a repeat count for the data item.\n", program_name, program_name); exit (EXIT_SUCCESS); } static const char * parse_options (int argc, char **argv) { for (;;) { enum { OPT_BE = UCHAR_MAX + 1, OPT_LE, OPT_HELP }; static const struct option options[] = { {"be", no_argument, NULL, OPT_BE}, {"le", no_argument, NULL, OPT_LE}, {"help", no_argument, NULL, OPT_HELP}, {NULL, 0, NULL, 0}, }; int c = getopt_long (argc, argv, "", options, NULL); if (c == -1) break; switch (c) { case OPT_BE: float_format = FLOAT_IEEE_DOUBLE_BE; integer_format = INTEGER_MSB_FIRST; break; case OPT_LE: float_format = FLOAT_IEEE_DOUBLE_LE; integer_format = INTEGER_LSB_FIRST; break; case OPT_HELP: usage (); case 0: break; case '?': exit (EXIT_FAILURE); break; default: NOT_REACHED (); } } if (optind + 1 != argc) error (1, 0, "exactly one non-option argument required; " "use --help for help"); return argv[optind]; } static struct symbol * symbol_find (const char *name) { struct symbol *symbol; unsigned int hash; if (name[0] == '@') name++; hash = hash_string (name, 0); HMAP_FOR_EACH_WITH_HASH (symbol, struct symbol, hmap_node, hash, &symbol_table) if (!strcmp (name, symbol->name)) return symbol; symbol = xmalloc (sizeof *symbol); hmap_insert (&symbol_table, &symbol->hmap_node, hash); symbol->name = xstrdup (name); symbol->offset = UINT_MAX; return symbol; } static void parse_data_item (struct buffer *output) { size_t old_size = output->size; if (token == T_INTEGER) { integer_put (tok_integer, integer_format, buffer_put_uninit (output, 4), 4); get_token (); } else if (token == T_FLOAT) { float_convert (FLOAT_NATIVE_DOUBLE, &tok_float, float_format, buffer_put_uninit (output, 8)); get_token (); } else if (token == T_PCSYSMIS) { static const uint8_t pcsysmis[] = { 0xf5, 0x1e, 0x26, 0x02, 0x8a, 0x8c, 0xed, 0xff, }; buffer_put (output, pcsysmis, sizeof pcsysmis); get_token (); } else if (token == T_I8) { uint8_t byte; get_token (); do { if (token != T_INTEGER) fatal ("integer expected after `i8'"); byte = tok_integer; buffer_put (output, &byte, 1); get_token (); } while (token == T_INTEGER); } else if (token == T_I16) { get_token (); do { if (token != T_INTEGER) fatal ("integer expected after `i16'"); integer_put (tok_integer, integer_format, buffer_put_uninit (output, 2), 2); get_token (); } while (token == T_INTEGER); } else if (token == T_I64) { get_token (); do { if (token != T_INTEGER) fatal ("integer expected after `i64'"); integer_put (tok_integer, integer_format, buffer_put_uninit (output, 8), 8); get_token (); } while (token == T_INTEGER); } else if (token == T_STRING) { buffer_put (output, tok_string, tok_strlen); get_token (); } else if (token == T_S) { int n; n = tok_integer; get_token (); if (token != T_STRING) fatal ("string expected"); if (tok_strlen > n) fatal ("%zu-byte string is longer than pad length %d", tok_strlen, n); buffer_put (output, tok_string, tok_strlen); memset (buffer_put_uninit (output, n - tok_strlen), ' ', n - tok_strlen); get_token (); } else if (token == T_LPAREN) { get_token (); while (token != T_RPAREN) parse_data_item (output); get_token (); } else if (token == T_COUNT) { buffer_put_uninit (output, 4); get_token (); if (token != T_LPAREN) fatal ("`(' expected after COUNT"); get_token (); while (token != T_RPAREN) parse_data_item (output); get_token (); integer_put (output->size - old_size - 4, integer_format, output->data + old_size, 4); } else if (token == T_COUNT8) { buffer_put_uninit (output, 1); get_token (); if (token != T_LPAREN) fatal ("`(' expected after COUNT8"); get_token (); while (token != T_RPAREN) parse_data_item (output); get_token (); integer_put (output->size - old_size - 1, integer_format, output->data + old_size, 1); } else if (token == T_HEX) { const char *p; get_token (); if (token != T_STRING) fatal ("string expected"); for (p = tok_string; *p; p++) { if (isspace ((unsigned char) *p)) continue; else if (isxdigit ((unsigned char) p[0]) && isxdigit ((unsigned char) p[1])) { int high = hexit_value (p[0]); int low = hexit_value (p[1]); uint8_t byte = high * 16 + low; buffer_put (output, &byte, 1); p++; } else fatal ("invalid format in hex string"); } get_token (); } else if (token == T_LABEL) { struct symbol *sym = symbol_find (tok_string); if (sym->offset == UINT_MAX) sym->offset = output->size; else if (sym->offset != output->size) fatal ("%s: can't redefine label for offset %u with offset %zu", tok_string, sym->offset, output->size); get_token (); return; } else if (token == T_AT) { unsigned int value = symbol_find (tok_string)->offset; get_token (); while (token == T_MINUS || token == T_PLUS) { enum token_type op = token; unsigned int operand; get_token (); if (token == T_AT) operand = symbol_find (tok_string)->offset; else if (token == T_INTEGER) operand = tok_integer; else fatal ("expecting @label"); get_token (); if (op == T_PLUS) value += operand; else value -= operand; } integer_put (value, integer_format, buffer_put_uninit (output, 4), 4); } else fatal ("syntax error"); if (token == T_ASTERISK) { size_t n = output->size - old_size; char *p; get_token (); if (token != T_INTEGER || tok_integer < 1) fatal ("positive integer expected after `*'"); p = buffer_put_uninit (output, (tok_integer - 1) * n); while (--tok_integer > 0) { memcpy (p, output->data + old_size, n); p += n; } get_token (); } if (token == T_SEMICOLON) get_token (); else if (token != T_RPAREN) fatal ("`;' expected"); } int main (int argc, char **argv) { struct buffer output; set_program_name (argv[0]); input_file_name = parse_options (argc, argv); if (!strcmp (input_file_name, "-")) input = stdin; else { input = fopen (input_file_name, "r"); if (input == NULL) error (1, errno, "%s: open failed", input_file_name); } if (isatty (STDOUT_FILENO)) error (1, 0, "not writing binary data to a terminal; redirect to a file"); output.data = NULL; output.size = 0; output.allocated = 0; line_number = 1; get_token (); while (token != T_EOF) parse_data_item (&output); if (!hmap_is_empty (&symbol_table)) { struct symbol *symbol; HMAP_FOR_EACH (symbol, struct symbol, hmap_node, &symbol_table) if (symbol->offset == UINT_MAX) error (1, 0, "label %s used but never defined", symbol->name); output.size = 0; if (fseek (input, 0, SEEK_SET) != 0) error (1, 0, "failed to rewind stdin for second pass"); line_number = 1; get_token (); while (token != T_EOF) parse_data_item (&output); } if (input != stdin) fclose (input); fwrite (output.data, output.size, 1, stdout); free (output.data); return 0; } pspp-1.0.1/tests/data/v14.sav0000644000175000017500000005026412470242646012632 00000000000000$FL2@(#) SPSS DATA FILE MS Windows Release 14.0.0 Y@10 Feb 0613:41:57 VL255                                VL256                                VL256001VL1335                                VL133001                               VL133002                               VL133003                               VL133004                               KKKVL133005         VL2000                                VL200001                               VL200002                               VL200003                               VL200004                               VL200005                               VL200006                               VL200007                              3 3VL255=vl255 VL256=vl256 VL1335=vl1335 VL2000=vl2000%VL256=256 VL1335=1335 VL2000=2000 MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM M MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM pspp-1.0.1/tests/data/file.at0000644000175000017500000000476013137223525012746 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([files handling]) AT_SETUP([Write error - directory exists]) mkdir foobar.sav AT_DATA([file.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. SAVE OUTFILE='foobar.sav'. ]) AT_CHECK([pspp -O format=csv file.sps], [1], [dnl error: Opening foobar.sav for writing: Is a directory. error: Error opening `foobar.sav' for writing as a system file: Is a directory. ]) AT_CLEANUP AT_SETUP([Write error - no permission]) mkdir directory touch directory/foobar.sav chmod 000 directory AT_DATA([file.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. SAVE OUTFILE='directory/foobar.sav'. ]) AT_CHECK([pspp -O format=csv file.sps], [1], [dnl error: Creating temporary file to replace directory/foobar.sav: Permission denied. error: Error opening `directory/foobar.sav' for writing as a system file: Permission denied. ]) chmod 700 directory AT_CLEANUP AT_SETUP([Write error - temp file disappeared]) AT_DATA([file.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. XSAVE OUTFILE='foobar.sav'. HOST COMMAND=[['rm foobar.savtmp*']]. EXECUTE. ]) AT_CHECK([pspp -O format=csv file.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([Write fifo]) dnl The Fifo feature is not available in w32 builds AT_SKIP_IF([case $host in *-*-mingw*) true ;; *) false ;; esac]) AT_DATA([file.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. SAVE OUTFILE='foobar.sav'. ]) mkfifo foobar.sav cat foobar.sav > /dev/null & pid=$! AT_CHECK([pspp -O format=csv file.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([Reading from pipe]) AT_DATA([pipe.sps], [dnl data list file='printf "1 2\n 3 4\n 5 6\n" |' notable list /x * y *. list. ]) AT_CHECK([pspp -O format=csv pipe.sps], [0], [dnl Table: Data List x,y 1.00,2.00 3.00,4.00 5.00,6.00 ]) AT_CLEANUP pspp-1.0.1/tests/data/binhex-in.expected.cmp.gz0000644000175000017500000121622312470242646016306 00000000000000vDLձ8Q( . @;UI>>on|~won~~won~~-wᎠ#t;pG:AG#wᎤ#ݑt;tGґH:IG#Hw$鎤#ݑt;Cqǡqq88tw:;㎢Qt;rGQ(:EG(w厢Qt;vGh:MGhw4펦t;vGt\w\:;.Kuǥqqt\w\:;q1:CǸcw ㎡c1t;q1xt@>||cǞ= {>@>||cǞ= {>@>||cǞ= {>@>||cǞ= {>@>||cǞ= {>@>||cǞ= {>@>||cǞ= {>@>||cǞ= {>@>||cǞ= {>@>||cǞ= {>@>||cǞ= {>@>||cǞ= {Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ? ȟ=@g?{Ϟ?  kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _{@|| kמ/=_ _y{w|{;|o֟|om>;~w :AG#wᎠ#t;pG:AG#Hw$&` @`Mo,C (ܸ#wᎠ#t;pG:AG#Hw$鎤#ݑt;tGґH:IG#Hw$鎢Qt;rGQ(:EG(w厢Qt;vGh:MGhw4펦t;vG:CǸcw ㎡c1t;q1:CǸcXw,뎥cݱt;uұX:KǺcXw,뎣qt;sq8:Gǹ8w玣qt;>:>w|t|sG玏;>:>w|tp>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} =`g=pه{p>{0ܳ} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å} p .0\؇ `pa.>\Å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}Kp .%0\ڇK`pi.>\å}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}+p W 0\ه+`Wpe>\Õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}kp 50\ۇk`pm>\õ}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}p 7n 0؇`7pcn>Í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í}[p n-0ڇ[`pkn>í};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0g}p}}>`> ه>p0gg^rrnKh~oqkQzDS w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p w0ه;`wpg>Ý};p wp??w~]3~wgޟ3w##|GpG;;wwߑܑ##}GrG;;w$wHHߑܑ##}GqG;;ww((QQ|GqG;;w4whhѾ}GsG;;w w11cc|p;;w wܱ߱cc}r;;w,wXXܱ߱cc};w<ww||LJ;>ᎏpww88qq|q;;ww8pσ{<=|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zu==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞?C?=zq?={C?=zq?={C?=zq?={C?=zq?={C?=zq?={C?=zq?={C?=zq?={C?=zq?={C?=zq?={C?=zq?={C?=zq?={C?=zq?={C?=zqϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pq=;y~wAϋ=pq=;~wAwq=;s|pi.>\å}ćKp'ϔs|>SzgJL9>\|)=pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.p?=LJy9>G~?zn.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.b;xwy|;;Ow~Ɵ.>\å}ćKp.%>\ڇK|8Ɵ1_qǿ}w;.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>p?=LJy9>G%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>Owz^|Sqǿ|wwy;>wywz_;;p>\å}ćKp.%>\ڇK|8Ɵ>SzgJL9>\)=LJ3p}>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćcs|}?|8y?>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇ+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|8Ɵ|wg3ޟg&3Lpwwz>qǿ=LJ+pW >\ه+|WpeL9>|)=LJ3p}nϔspW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW G~?zs| >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW =LJrs|*=LJrs|*=LJr>\Õ}‡+pW >\ه+|Wpwpwpwpe;;|=qǿ=_;w;>\ه+|Wpe>\Õ}‡+pW })=LJ{gJs|}})=LJ{gJ>\ه+|8;s|8;s|8;z^9>\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wp1~?|8y?>\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|8;s|8;s|8;s|8;s|8.]3~wgퟟ{~goG=LJc=LJc=LJ+pwz;w>qǿ=wzywqǿ>\ه+|Wpe>\Õ}‡c3p}ϔs|>SzwgJ>\ه+|8;s|8;s|8;s|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpep?=LJy9>G~?zn>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe;p;p;p;p;p>\Õ}‡+pW >\ه+|WpwpwpvÕ}‡c_}w_;7;w|;w9>\ه+|Wpe>\Õ}‡+p>Szsϔ3}gJ}>\Õ}‡c=LJc3~wg??w~ϟ??=Wpe>\Õ}‡+pW >\ه+|Wpe>\}Ç;>w|?|pe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm3~wgޟ3p;p;p>\õ}Ƈkp5>\ۇk|8;s|8;s|8;s|pqǿŎ3;7b;7>ƇOᾃn|;>ƇO>\õ}Ƈkp5>\ۇk|pߑgJ}gJ5w|6=׬}wõ}Ƈc=LJc=LJc=LJkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp;~?zy9;_qk־;p>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm;p;p;p;p;p>\õ}Ƈkp5>\ۇk|pwpvs|8;s|pߑ;_qkY;2w|;L;zew;q{5>\ۇk|pm>\}mpw7>w~G|www~G}w|ypwpwpm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\}GϿL}w|?z5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkpq{q{q{gw߬ww0ww;>ƇOᾃn|pm>\õ}Ƈkp5>ws|)=gs|)=gs|)=pm;p;ppm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\}G?=gsG?=pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇ >LJkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇs5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pwpwpwpwpwpm>\õ}Ƈkp5>\ۇk`8;zqρ;pρ;p>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}c=c=c=LJkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkppm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p? >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n 0w90w90w90w90w9>؇|7pcn>Í}p7<1~w1~wÍ}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}c=c1~wÍ}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}/pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}pS?Ts>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}c=c=c=c=c=LJp7n >؇|7pcn>1~wg??w~?Hu>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>1~w1~w1~wÍ}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p?Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7sn >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn ɸpcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇B29>؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇`8;s`8;s`8;/ [ í{=LJp7n >؇|7pcn>|auϿ0ܺ?0{=pau>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}pau`8 í{=pÍ}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}y_=LJp7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>ܼ/Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇nw>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7_Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcnE,9>؇|7pcn>Í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ňkqwwߏݿ;q7w|wqq;p>í}Ň[pn->ڇ[|xw7^~w?Wo<)>w=LJ[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[p?=gsG?=g>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[p}C>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[p=LJ[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>};;7ww>{O~wo|w=LJ[pn->ڇ[|pkn}>Sz|)=g|ϔ3L9ϔۇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|psG?=g3~?zn=pه{p>Ç{>ܳ]=p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pwA}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=p/q=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}ýǹ{=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç.7߸?n7}wq_7ϟɎ_X;#}=|g=pه{p>Ç{>c3oGw;;>0v=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}ý"{=|g=pه{p>Ç{>ܳ}=|8=7{G?zoۇ{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}W_lp>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=p=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{^P=LJ{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{C5ه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|8q;;~Ǝ;l!;;~Ǝ;㎿l!;p}=|g=pه{p>Çcww|)=7~ǎ;㎿~;p}=|g=pه{pgrJv,N|'?FRWEj $Dz>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|8>Ç>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>ܛp>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}ýj9>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=`8ο7vpopρ8q={c{=|g=pه{p>Ç{>ܳ~ap={ ={/ s|gq~$;~ϗxco?~~jpyo}7v>\op/Ǝ?߇}c{=|g=pه{p>Ç{> k5Qv? k|a7v/ه{0sap={ ={9>ܳ}~x=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|8>珞9??zG}}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{B29>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ~asasasp90;s`8ο7vpop}=|g=pه{p>Ç{0;s`8ο7vpop}#o9??rF9Ǝ#Gs~~;|;|;|ه{p>Ç{>ܳ}=|8.yc%o9???=s~~p;s|gq={c{ ه[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pq~?->pq~?n->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[p~Wpn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇs|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn8⿿[{om{}=Ͽv={n->ڇ[|pkn>í}Ň{c{=O9>ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pXs|8ο7vpop>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkní}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pnmRs|pkn>q=LJ{c{9>;s|pkn>í}Ň[pn->;s|8ο7vpop>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň{{o{F=LJ[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pv~9>ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[p9>;s|8ο7vpop>í}Ň[pn->ڇ[|pq=LJ{c{n->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->;s|8ο7vpop>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>q=LJ{c{9>;s|pkn>í}Ň[pn->;s|8ο7vps>í}Ň[pn->ڇ[|pkn>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç{cGxG##ّޑHHvw$;;ɎdGzG##ّޑH(vw;;ŎbGyGQQ((vw;;͎fG{Ghhvw4;;͎axǰcc11vw ;;Îaxǰcc;>yǎ;>v|w|c;>xxycǎ;;wÝ}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý|?0=[{o{Ͽ[##vw;;`GxG##ޑHHvw$;;ɎdGzG##ّޑHHvw;;ŎbGyGQQ((vw;;͎fG{Ghhvw4;;͎fG{ǰcc11vw ;;Îaxǰcc1w|c;>yǎ;>v|w|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|s?z=G?{=s?z=G?{=s?z=G?{=s?z=G?{=s?z=G?{=s?z=G?{=s?z=G?{=s?z=G?{=s?z=G?{=s?z=G?{=s?z=G?{=s?z=G?{=s?z==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞??zGϟ{s==珞?/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zsϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW >\ه+|Wpe>\Õ}‡+pW5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp#Bs~~D;~Ϗyc!o9??"?G7vƎ#Bs~~D獞ۇk|pm>\õ}ƇkpFs~~;~8??h-{~~[߂5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}ƇkpÇG}=s5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkpn >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7`ƎW߯7z X X X X X X=LJp7n >؇|7pcn8? o?;~LrƎrƎrƎrn >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >?zG}=s>>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>q~;~_ycK:o9?I?/鼱npǿ=߷-{nÇp7n >؇|7pcn~g{~_}cǟ;{op>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>?z眿?z眿?zn >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7?ω}cǟƎ?'N;7v9ωn >؇|7pcn>Í}=gJ9gJ9gJ9gJ9gJ9gJ >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|G9?Ç=?|Ç=?|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n?SY@x+J^1խxJ81MZ!:Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳX~=LJccw9s|8=pX~=LJ{>ܳ}=|g=pه{p,{ñÇc݋.{w}ooI=}1so1sp>Ç{>ܳ}=|g}~M9K}_SzR߯)=gהkJ=|gñۣñ1{9>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}]~s=gGY~s>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\ñ1{9>sp,{ñ1{5>\ۇk|pm>\õ}Ƈccw9s|8=p>\}w9`0c1kп{6k־{_Ɲ=zn>\õ}Ƈkp5>\ۇk|_Sz1Ǘaהההۇk|p,{ñ1{o{5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>w~}>\e{ee{=cﱵspm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|p,{ñ1{9>sp,{w/߽߽w߽w]{ 90spm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\ñ1{ 90spm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pmX~=ccw9s`8=pρX~=LJkp5>\ۇk|pm>\ñ1{ 90˿=z9>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|p,{ñc݋.{w}.{wo߽oۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|p,{￿^wݛ.{wۣñ1{ 9>\ۇk|pm>\õ}Ƈkp 90sp,{õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp 90sp,{õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}Ƈkp5>\ۇk|pm>\õ}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}ccw9s`8=pρX~=ccn >؇|7pcn>Í}p 90˿=z90spcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>ñۣñ1{ 9>؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ[|pkn>í}Ň[pn->ڇ;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ه;|wpg>Ý}Ç;pw>ɇpw/߽߽]~˿`99ss##xs|<LJ9>ax|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zuϗ{|/=_|K=_zsϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~=?G=?z~sϏ{~.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.>\؇ |pa.>\Å} p.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp>ܟ_?w߿~?sy_~y<s|]>X~YZ[>]~^_h=y9s|8rsܟ?}?׏_Ͽpׇ[>ܟ}_/}?_ϿNpׇ>ܟpƯ%>ܟpЯM>ܟ_pگu>ܟp>ܟpſ>ܟ?p>ܟp¯>ܟp̯=>ܟp֯e>ܟpߍ>ܟ_pߵ>ܟp>_w߿=>X`suϿ#=>X|csuϿK=>WYesuϿs=>Y|hsuϿϛ=>ZjsuϿ=>7[|msuϿ=>[osuϿ=>w\|ssϿ;=>=ssϿc=>=|ssϿϋ=>W>ssϿϳ=>>|ssϿ=>?ssϿ{ ?8yŹ5=~qssϿ{3?9yϹυ=~~tssϿG{[?;yٹ=~vssϿ{?Gy=~~~ssϿǟ{8 =p=sϿ3{}ߣ8Ź2=q=sϿ{}o%C9ʹZ=r=sϿӜ{}99Ϲ=qyϨ~sG=qy~sޗ=qyO~s=qy~s7=qyϭ~sއ=qy~s׫=qyO~s'=qy~sw"=qyϲ~sǬ6=qy~sJ=qyO~sg^=qy~s޷r=qyϷ~s=qy~sW=qyO~sާ=qy~s=qyϼ~sG=qy~sޗ=qyO~s=|@#s.~s/ԏ{9q9Q?9&=|Eès~sԏ{9q9OR?9N=|Jc.s.~sԏ{9q9S?9v=|O{9 B9*sUSp9Ts=|T{9 V9*soUp9Vsn=|Y{9 j9*sοU眓p9OWs=|^{9 ~9+sV3p9Xsn=|c{9 9*+s_VӬp9Ys=|h{9 9R+sίVsp9[sn=|m{9 9z+sVp9O\s=|r{9 9+sOW眳p9]sn=|w{9 9+sΟWSp9^s=||{9 9+sWp*s܀ _=!p *s\ =Ip*s܅ =qp*s\ ?=Ǚp(*s܊ ߢ=p2*s\ =t<*s܏J=tF*s\J=9tP*sܔJ_=atZ*s\J=ljtd*sܙJ=DZtn*s\J?=٩tx*sܞJߧ=t*s\J=)t*sܣJ=Qt*s\J=yt*sܨJ_=ǡt*s\J=ɪt*sܭJ=t*s\J?=t*sܲJ߬=At*s\J=it*sܷJ=Ǒt*s\J=ǹt*sܼJ_=t*s\J= t+sJ=1t+s\J?=Yt+sJ߱=ǁt"+s\J=ǩt,+sJ=Ѭr6s\*=r@s*_=!rJs\*=IrTs*=qr^s\*?=Ǚrhs*߶=rrs\*=r|s*=rs\*=9rs*_=ars\*=ljrs*=DZrs\*?=ٮrs*߻=r«s\*=)r̫s*=Qr֫s\*=yrs*_=ǡrs\*=ɯrs*=rsrϹ?=瞁*s-rϹߠ=*sUrϹ=瞆*s}rϹ=*&srϹ>9\=>ܛQ5sG}s먏{νqϹ>9=>;RIsI}s;{ν(qϹ?>9=>R]sL}s{ν2qϹ>9=>{SqsN}s۩{ν9=>TsQ}s+{νFqϹ>9$=>ܻTsS}s{{νPqϹ?>9L=>[UsV}s˪{νZqϹ>9t=>UsX}s{νdqϹ>9=>ܛVs[}sk{νnqϹ>9=>;Ws]}s{νxqϹ?>9=>Ws`}s {νqϹ>9=>{Xsb}s[{νqϹ>9<=>Y%CY=z9ZsϹ{=sӬsf=9Y=z9sϹ?{=s#soi=M܃Z=z9sϹ{=sssk=a#[=z9sϹ{=síson=u[=z9sϹz'zOzwzzǸz︞zz?zgzs}<=A=A=A=A=A=A_{zsמ==9kA_{zs7o<=9Axzs7o==9[Azzs󷞃o==9;Ayzsw<=9;As<=As<=AssA;<=sA;<=sA;==sNA;==sNA;==s.Aϻ<=s.A=_zvϗ{/=o|yK=_zvϗ{/=o|yK=_zvϗ{/=o|yK=_zvϗ{/=o|yK=_zvϗ{/=o|yK=_zvϗ{/=o|yK=_zvϗ{/=o|yK=_zvϗ{/=o|yK=_z>qϗ{|/=|K=_z>qϗ{|/=|K=_z>qϗ{|/=|K=_z>qϗ{|/=|K=_z>qϗ{|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχ{>|=|C=z>qχۇ |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |}؇ |}؇ |}؇ |}؇ |}؇ |}؇ |}؇ |}؇ |}؇ |}؇ |}؇ |1u/َ6DD$>nTLy|lJ!e>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ˇ>\ˇ========>|(ˇ>|hˇ>|hˇ>|ˇ>|ˇ>|ˇ}sp5qz.>A>|=[c}sp5=[c}sp5=[c}sp5z.>A>|x=[c~k[kּz.y\>o-X>||ڲ}sp5=[c}sp5=[c}sp5=[cA}sp5y\>o}|=[cAGz\>o}AGz\>o}p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{p=9>\{up}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>n{7=LJqpss|99>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>|9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵp>]pw->ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵ }8ڇ0}8ڇcy$}8?>ڇ_l^pk?(y*}8м>ڇ/F^pkhy2}8_ k`kkkȼ kܼ`kk G8ڇ#0yV^p-}8>kGxڇ#y~^p|1k/yE#}8>_ڇ S^p|k/`yE-}8>_$ڇ g^p|1k/yE7}8>_ڇ {^p|kyC!}8~P>?dڇO^p0kPyC+}8~>?ڇc^pkyC5}8~߼>?ڇw^p0kyC?}8ǃx>"ڇE^prڇO^p<kHy)}8Hǃx>ڇY^pڇc^pbڇm^pڇw^p<ky=}8ǃx>/ڇA^pXky"}8^hNjxA>/RڇK^pk8y'}8^Njx>/ڇU^pk`y,}8^NjxA>/ڇ_^pky1}8^HNj˼x>/Bڇi^pXky6}8^Nj߼xA>/ڇs^pky;}8^Njx>/ڇ}^pkyqP }88>ڇC^pkyq"}8d8>AڇH^p,k(yqP%}88 >iڇM^pk@}8\p@ rڇHȵkp!>0C}8\p@!rGڇȵDk">E}8\p@5roڇȵk#>0H}8\p@#Irڇ8ɵk0%>J}8\p@-]rڇɵ$kp&>0M}8\p@7qrڇɵēk'>O}8\p@Arڇ(ʵdk(>0R}8\p@Kr7ڇxʵk0*>T}8\p@Ur_ڇʵkp+>0W}8\p@_rڇ˵Dk,>Y}8\p@irڇh˵k->0\}8\p@srڇ˵k0/>^}8\p@}rڇ̵$kp0>0a}8\p@s'ڇX̵Ęk1>c}8\p@%sOڇ̵dk2>0f}8\p@9swڇ̵k04>h}8\p@MsڇH͵kp5>0k}8\p@asڇ͵Dk6>m}8\p@usڇ͵k7>0p}8\p@ùsڇ8εk09>r}8\p@͹s?ڇε$kp:>0u}8\p@׹sgڇεĝk;>w}8\p@sڇ(ϵdk<>0z}8\p@sڇxϵk0>>|}8\p@sڇϵkp?>0}8\p@k0kAXkkA k АkAk kAHkpkAkkAkkA"8k$`kA'k)kA,ؒk.kA1(k3PkA6xk8kA;ȓk=kA@kB@kAEhkGkAJkLkAOkQ0kATXkVkAYk[ЕkA^k` kAcHkepkAhkjkAmkokAr8kt`kAwkykA|ؗk~kA(kPkAxkkAȘkkAk@kAhkkAkkAk0kAXkkAkКkAk kAHkpkAkkAkkA¹8kĹ`kAǹkɹkA̹؜kιkAѹ(kӹPkAֹxkعkA۹ȝkݹkAk@kAhkkAkkAk0kAXkn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7pkn>í}[pn >ڇ|7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>=p >ܳ7p>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳp>\=p5>ܳ؇F5A[>~5[>~5A[>~Aypּ_`~k>_5cߚ@o؇{w}pּ`ߚ=;[>}kGo8=;[>pDּ>5o8=;[^c߁pk=;[Ko>5cه{w},p ּeߚ=;[>}ke߁ߚqه{w}\y}ke߁ߚ1=;[>}kǰoy> 5ه{w!}4p.8ּf߅ߚ=[>}:~kGo(]8y> ,5؇{w!}p.ּd߅ߚAusp]>\=Eusp]>\=Eusp]>\=Eusp]>\=Eusp]>\=Eusp]>\=Eusp]>\=Eusp]>\=Eusp]>\=Eusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=Iusp>\'=IGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGusp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Ausp>\=Asp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKsp>\-=WKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\ =WCsp5>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp>\5=WMUsp .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>pهK|>\}p}ć%>g.>p1u/َFD I|1؆ >ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p>ܳp>\=p=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}=|g=pه{p>Ç{>ܳ}g|gcñ|h>pgp8}8Eǿ|>هJ>pg?x4}8 |>ه/Z>pg<}8>ه#}8>Xه(}8>ه-}8>ه2}8>Hه7}8>ه<}8>ه#|L>p(}8>agG(ه#|t>p<}8>_ ه D>p|g/$%}8|”>_ه X>p|Qg/t/}8 |™>_Lه l>p|g/9}8`|ž>_ه@>pPg#}8~|>?هT>pgd-}8~|>?,هh>pPg7}8~ |>?ه|>pg }80ǃ|x`>6هH>p<(g*%}8ǃ|x>هR>pه\>p&هf>pvهp>p<(g9}8Pǃ|x>هz>p}8Nj|xa>/هD>pg#}8^Nj|x>/fهN>pgB(}8^0Nj|xa>/هX>p(gj-}8^Nj|x>/هb>phg2}8^pNj|xa>/Vهl>pg7}8^Nj|x>/هv>pg<}8^Nj|xa>/ه@>pgq }8(A|8>#هE>pgqp#}8xA|80>KهJ>pTg-q%}8A|8p>sهO>pgAqp(>2q)>2q)>2qP*>2q*>2q+>2q0,>2q,>2qp->2q.>2q.>2qP/>2q/>3q0>3q01>3q1>"3qp2>,3q3>63q3>@3qP4>J3q4>T3q5>^3q06>h3q6>r3qp7>|3q8>3q8>3qP9>3q9>3q:>3q0;>3q;>3qp<>3q=>3q=>3qP>>3q>>3q?>3q1 >2q >2qq!>2q">&2q">02qQ#>:2q#>D2q$>N2q1%>X2q%>b2qq&>l2q'>v2q'>2qQ(>2q(>2q)>2q1*>2q*>2qq+>2q,>2q,>2qQ->2q->2q.>2q1/>2q/>3qq0> 3q1>3q1> 3qQ2>*3q2>43q3>>3q14>H3q4>R3qq5>\3q6>f3q6>p3qQ7>z3q7>3q8>3q19>3q9>3qq:>3q;>3q;>3qQ<>3q<>3q=>3q1>>3q>>3qq?>3d؇ Ȱ,a >PA}8@ p2)d؇\Ȱ̐a!>C}8@ p&2Qd؇Ȱla#>PF}8@ p:2yd؇Ȱ a@$>H}8@ p%N2d؇Lɰa%>PK}8@ p/b2d؇ɰLa&>M}8@ p9v2d؇ɰa(>PP}8@ pC2e؇<ʰa@)>R}8@ pM2Ae؇ʰ,a*>PU}8@ pW2ie؇ʰ̕a+>W}8@ pa2e؇,˰la->PZ}8@ pk2e؇|˰ a@.>\}8@ pu2e؇˰a/>P_}8@ p3 f؇̰La0>a}8@ p31f؇l̰a2>Pd}8@ p*3Yf؇̰a@3>f}8@ p>3f؇ Ͱ,a4>Pi}8@ pR3f؇\Ͱ̚a5>k}8@ pf3f؇Ͱla7>Pn}8@ pz3f؇Ͱ a@8>p}8@ p3!g؇Lΰa9>Ps}8@ p3Ig؇ΰLa:>u}8@ p3qg؇ΰa<>Px}8@ p3g؇<ϰa@=>z}8@ p3g؇ϰ,a>>P}}8@ p3g؇ϰ̟a?>}8d؇cp@}8 d؇cA}8d؇cA}8 d؇cPB}8*d؇cB}84d؇cC}8>d؇c0D}8Hd؇cD}8Rd؇cpE}8\d؇cF}8fd؇cF}8pd؇cPG}8zd؇cG}8d؇cH}8d؇c0I}8d؇cI}8d؇cpJ}8d؇cK}8d؇cK}8d؇cPL}8d؇cL}8d؇cM}8d؇c0N}8d؇cN}8d؇cpO}8d؇cP}8e؇cP}8e؇cPQ}8e؇cQ}8$e؇cR}8.e؇c0S}88e؇cS}8Be؇cpT}8Le؇cU}8Ve؇cU}8`e؇cPV}8je؇cV}8te؇cW}8~e؇c0X}8e؇cX}8e؇cpY}8e؇cZ}8e؇cZ}8e؇cP[}8e؇c[}8e؇c\}8e؇c0]}8e؇c]}8e؇cp^}8e؇c_}8e؇c_}8f؇cP`}8 f؇c`}8f؇ca}8f؇c0b}8(f؇cb}82f؇cpc}8\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paÅ}.>\؇paå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}.>\ڇpiå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piå}>\ڇ;piÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ|sp555555555=[c}sp5Q=[c}sp5Q=[c}sp5Q=[c}sp5=[c}sp5=[c}sp51=[c}sp51=[c}sp51=[c}sp5=[c}sp5=[c}sp5y\>o}|=[cA}sp5y\>oo~kŚAւ5ˇ]ּz.5z.y\>o}\ˇ}sp5qz.>A>|x=[c~ky\>o}<ˇ}sp5=[c}sp5=[c9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp9>\{WUp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp59>\{Wոp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպp9>\{Wպppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJqp}s|>9>\{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJup}s|9>\_{=LJups|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up9>\{up]9>\{up]9>\{up]9>\{up]9>\{up]9>\{up]9>\{up]9>\{up]9>\{up]9>\{->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp->\ۇ[|pmn>õ}Ňkp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7؇(>9?c ؇c9cp9c9c9c?(9c?x9c?9c9 ch9 c9 cp|`؇%>@9ʱZ}8>rcp|؇9>9ϱGrp&>!ʱGrp0>̱GPsp:>!ϱGs >_ rE#>_Hr%>_prE(>_r*>_rE->_r/>_sE2>_8s4>_`sE7>_s9>_sE<>_s>>?rC!>?(r#>?PrC&>?xr(>?rC+>?r->?rC0>?s2>?@sC5>?hs7>?sC:>?s<>?sC?>r >r ">,r`#>@r$>Tr%>hr '>|r`(>r)>r*>r ,>r`->r.>r/>s 1>s`2>0s3>Ds4>Xs 6>ls`7>s8>s9>s ;>s`<>s=>s>>s" >/ rb!>/ r">/4r#>/Hr"%>/\rb&>/pr'>/r(>/r"*>/rb+>/r,>/r->/r"/>/rb0>/s1>/$s2>/8s"4>/Lsb5>/`s6>/ts7>/s"9>/sb:>/s;>/s<>/s">>/sb?>rqP > rq >rq!>rq0">(rq">2rqp#>Frq$>PrqP%>Zrq%>drq&>nrq0'>xrq'>rqp(>rq)>rq)>rqP*>rq*>rq+>rq0,>rq,>rqp->rq.>rq.>rqP/>rq/>sq0>sq01>sq1>"sqp2>,sq3>6sq3>@sqP4>Jsq4>Tsq5>^sq06>hsq6>rsqp7>|sq8>sq8>sqP9>sq9>sq:>sq0;>sq;>sqp<>sq=>sq=>sqP>>sq>>sq?>sq1 >rq >rqq!>rq">&rq">0rqQ#>:rq#>Drq$>Nrq1%>Xrq%>brqq&>lrq'>vrq'>rqQ(>rq(>rq)>rq1*>rq*>rqq+>rq,>rq,>rqQ->rq->rq.>rq1/>rq/>sqq0> sq1>sq1> sqQ2>*sq2>4sq3>>sq14>Hsq4>Rsqq5>\sq6>fsq6>psqQ7>zsq7>sq8>sq19>sq9>sqq:>sq;>sq;>sqQ<>sq<>sq=>sq1>>sq>>sqq?>sڇ ȵ,k >PA}8@\pr)ڇ\ȵ̐k!>C}8@\p&rQڇȵlk#>PF}8@\p:ryڇȵ k@$>H}8@\p%NrڇLɵk%>PK}8@\p/brڇɵLk&>M}8@\p9vrڇɵk(>PP}8@\pCrڇ<ʵk@)>R}8@\pMrAڇʵ,k*>PU}8@\pWriڇʵ̕k+>W}8@\parڇ,˵lk->PZ}8@\pkrڇ|˵ k@.>\}8@\purڇ˵k/>P_}8@\ps ڇ̵Lk0>a}8@\ps1ڇl̵k2>Pd}8@\p*sYڇ̵k@3>f}8@\p>sڇ ͵,k4>Pi}8@\pRsڇ\͵̚k5>k}8@\pfsڇ͵lk7>Pn}8@\pzsڇ͵ k@8>p}8@\pŹs!ڇLεk9>Ps}8@\pϹsIڇεLk:>u}8@\pٹsqڇεk<>Px}8@\psڇ<ϵk@=>z}8@\psڇϵ,k>>P}}8@\psڇϵ̟k?>}8ڇcp@}8 ڇcA}8ڇcA}8 ڇcPB}8*ڇcB}84ڇcC}8>ڇc0D}8HڇcD}8RڇcpE}8\ڇcF}8fڇcF}8pڇcPG}8zڇcG}8ڇcH}8ڇc0I}8ڇcI}8ڇcpJ}8ڇcK}8ڇcK}8ڇcPL}8ڇcL}8ڇcM}8ڇc0N}8ڇcN}8ڇcpO}8ڇcP}8ڇcP}8ڇcPQ}8ڇcQ}8$ڇcR}8.ڇc0S}88ڇcS}8BڇcpT}8LڇcU}8VڇcU}8`ڇcPV}8jڇcV}8tڇcW}8~ڇc0X}8ڇcX}8ڇcpY}8ڇcZ}8ڇcZ}8ڇcP[}8ڇc[}8ڇc\}8ڇc0]}8ڇc]}8ڇcp^}8ڇc_}8ڇc_}8ڇcP`}8 ڇc`}8ڇca}8ڇc0b}8(ڇcb}82ڇcpc}8<ڇcd}8Fڇcd}8PڇcPe}8Zڇce}8dڇcf}8nڇc0g}8xڇcg}8ڇcph}8ڇci}8ڇci}8ڇcPj}8ڇcj}8ڇck}8ڇc0l}8ڇcl}8ڇcpm}8ڇcn}8ڇcn}8ڇcPo}8ڇco}8ڇcp}8ڇc0q}8ڇcq}8"ڇcpr}8,ڇcs}86ڇcs}8@ڇcPt}8Jڇct}8Tڇcu}8^ڇc0v}8hڇcv}8rڇcpw}8|ڇcx}8ڇcx}8ڇcPy}8ڇcy}8ڇcz}8ڇc0{}8ڇc{}8ڇcp|}8ڇc}}8ڇc}}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>ڇk|pk>\í}Ƈ[pn5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pهk|>\}p}Ƈ5>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡>g>pه+|>\} Wp}‡:o}ּo}0ּo}ּ_~k/5ߚ؇{w}< y}~kcߚqه{w`}\y}~keߚqه{w}`y}"kaߚq؇{w`}؇{wy}Tkk=;[ o>5cه{w},p ּeߚ=;[>}kǰoy>5c؇{w} pּfߚ=;P[>}kGoh] y> 5؇{w}p.LּbߚQ=[>}D~kGoH]`y> 15#ه{w}p.ּznۇ*}Jznۇ*}Jznۇ*}Jznۇ*}Jznۇ*}Jznۇ*}Jznۇ*}Jznۇ*}Jznۇ*}Jznۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} znۇ*} zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn.=WۇKեspu}>\]zn=WۇCաspu}:>\zn=WۇCաspu}:>\zn=WۇCաspu}:>\zn=WۇCաspu}:>\zn=WۇCաspu}:>\zn=WۇCաspu}:>\zn=WۇCաspu}:>\zn=WۇCաspu}:>\zn=WۇCաW4dłL$[3>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}>>\zn=ׇۇCsp}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}Zznۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}znۇj}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=WۇGգsp}z>\=zn=Wۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jznۇ}jzn>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.>\Å}ć p.%>\؇K|pa.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}ćڇK|k.}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}w]|k]pڇp>Ň.>ܵw}8}_>}}8n}8n}8@ڇ}8ڇ/}8ڇ/}8~ڇ}8~ڇ}8~@ڇ}8~ڇF_pkh}}8?E>0ڇK_pk_T} }8~/ȾE>pڇs_pk_}G_p}8B>kGڇ#}Ծo_p}8B>k}}8>h>pڇP_p|`kV}}8>>ڇd_p|k}}8>>ڇx_p|`k}}8(>_PڇL_p|k/F}}8h>_ڇ`_p|ak/}}8ھ>_ڇt_p|k/}}8xp>ڇAD_phڇAN_pڇAX_p<0kk}}8x>ڇAb_pXڇAl_pڇAv_pڇE@_p0k }}8^T x>/HڇEJ_ppk3}}8^ xq>/ڇET_pk[}}8^ x>/ڇE^_pk}}8^4 ɾxq>/8ڇEh_p0k}}8^ ݾx>/ڇEr_ppk}}8^t xq>/ڇE|_pk}1>}1P>}1> }1>}1@>}1>}1> }10>%}1>*}1>/}1 >4}1p>9}1>>}1>C0 R}8:1iNp Juڇc>W W}8:1iNp uڇc >kp \}8:1XiNp uڇc> a}8;1iNp :vڇc > f}86;1iNp vڇc>P k}8^;1iNp vڇc > p}8;1XiNp *wڇc>ϝ u}8;1iNp zwڇc >0 z}8;1iNp wڇc> }8;q0>:qР>:qp>:q>&:q>0:qP>::q>D:q>N:q0>X:qХ>b:qp>l:q>v:q>:qP>:q>:q>:q0>:qЪ>:qp>:q>:q>:qP>:q>:q>:q0>:qЯ>;qp> ;q>;q> ;qP>*;q>4;q>>;q0>H;qд>R;qp>\;q>f;q>p;qP>z;q>;q>;q0>;qй>;qp>;q>;q>;qP>;q>;q>;q0>;qо>;qp>;tڇ ,i>PA}8@Np:)tڇ\i>C}8@Np&:Qtڇli>PF}8@Np::ytڇ i@>H}8@Np%N:tڇLi>PK}8@Np/b:tڇLi>M}8@Np9v:tڇi>PP}8@NpC:uڇ<i@>R}8@NpM:Auڇ,i>PU}8@NpW:iuڇi>W}8@Npa:uڇ,li>PZ}8@Npk:uڇ| i@>\}8@Npu:uڇi>P_}8@Np; vڇLi>a}8@Np;1vڇli>Pd}8@Np*;Yvڇi@>f}8@Np>;vڇ ,i>Pi}8@NpR;vڇ\i>k}8@Npf;vڇli>Pn}8@Npz;vڇ i@>p}8@Npŝ;!wڇLi>Ps}8@Npϝ;IwڇLi>u}8@Npٝ;qwڇi>Px}8@Np;wڇ<i@>z}8@Np;wڇ,i>P}}8@Np;wڇi>}8tڇcq@}8 tڇcA}8tڇcA}8 tڇcQB}8*tڇcB}84tڇcC}8>tڇc1D}8HtڇcD}8RtڇcqE}8\tڇcF}8ftڇcF}8ptڇcQG}8ztڇcG}8tڇcH}8tڇc1I}8tڇcI}8tڇcqJ}8tڇcK}8tڇcK}8tڇcQL}8tڇcL}8tڇcM}8tڇc1N}8tڇcN}8tڇcqO}8tڇcP}8uڇcP}8uڇcQQ}8uڇcQ}8$uڇcR}8.uڇc1S}88uڇcS}8BuڇcqT}8LuڇcU}8VuڇcU}8`uڇcQV}8juڇcV}8tuڇcW}8~uڇc1X}8uڇcX}8uڇcqY}8uڇcZ}8uڇcZ}8uڇcQ[}8uڇc[}8uڇc\}8uڇc1]}8uڇc]}8uڇcq^}8uڇc_}8uڇc_}8vڇcQ`}8 vڇc`}8vڇca}8vڇc1b}8(vڇcb}82vڇcqc}8\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ڇ |pi.>\å}Kp.>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ه;peÕ}W>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\ۇ;pmõ}>\p>kǿqz}kǿqz}Qzq>Ѿzq>Ѿzq>ѾzqA|5>}<=~׸>|χ]>A|5c|χ]>A|5c|χ]>A|5c}χ]>A|5c}χ]>A|5c}χ]>>=~׸A|5}?w|χ]>>=~~5|χ]K>\}?\}?w=~׸}?w=~׸}?w=~׸>q}χ]>pk}?wzq>zq>sps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJqzs|=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJuzs|^=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|9> {=LJ{ýp^p/s|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|ws|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýt^p/s|9>K{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|W9>+{=LJ{ýr^ps|9>k{=LJ{ýv^ps|9>k{=LJ{ýv^ps|9>k{=LJ{ýv^ps|9>k{=LJ{ýv^ps|9>k{=LJ{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ň{ه[|gn}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n->؇[|pcn>Í}Ňp7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}p7n >؇|7pcn>Í}pz_cp ؇F{c?p؇/>a=@}8~Pzcp؇>?=c@=c=c=Ec_=c_@=Ec_h=c_=Ec_=c_=Ec ؇#=L}8Bc`؇#l=`}8Bc؇#=t}8Bc؇A}8>@؇F}8>؇K}8>؇P}8>0؇U}8>؇Z}8>؇_}8> ؇d}8>p؇i}8>؇n}8>؇s}8>`؇x}8>؇}}8؇B}8P؇G}8؇L}8؇Q}8@؇V}8؇[}8؇`}80؇e}8؇j}8؇o}8 ؇t}8p؇y}8؇~}8؇A}80؇AD}8X؇F}8؇AI}8؇K}8؇AN}8؇P}8 ؇AS}8H؇U}8p؇AX}8؇Z}8؇A]}8؇_}8؇Ab}88؇d}8`؇Ag}8؇i}8؇Al}8؇n}8؇Aq}8(؇s}8P؇Av}8x؇x}8؇A{}8؇}}8؇E@}8^؇B}8^@؇EE}8^h؇G}8^؇EJ}8^؇L}8^؇EO}8^؇Q}8^0؇ET}8^X؇V}8^؇EY}8^؇[}8^؇E^}8^؇`}8^ ؇Ec}8^H؇e}8^p؇Eh}8^؇j}8^؇Em}8^؇o}8^؇Er}8^8؇t}8^`؇Ew}8^؇y}8^؇E|}8^؇~}8z1(cp ؇c@> =x`D}8(z1hcp n؇c> =`I}8Pz1cp ؇c@>4=`N}8xz1cp ڇc>HX`S}8z1(k^p ^ڇc@>\`X}8z1hk^p ڇc>p`]}8z1k^p ڇc@>8`b}8{1k^p Nڇc>`g}8@{1(k^p ڇc@>x`l}8h{1hk^p ڇc>`q}8{1k^p >ڇc@>Խ`v}8{1k^p ڇc>X`{}8{1(k^p ڇc@>^p A^pH^ppA^p^pA^p^pA^p8^p`A^p^pA^p^pA^p(^pPA^px^pA^p^pA^p^p@A^ph^pA^p^pA^p^p0A^pX^pA^p^pA^p^p A^pH^ppA^p^pA^p^pA^p8^p`A^p^pA^p^pA^p(^pPA^px^pA^p^pk0>@}8^p@ zڇHkp>0C}8^p@!zGڇDk>E}8^p@5zoڇk>0H}8^p@#Izڇ8k0>J}8^p@-]zڇ$kp>0M}8^p@7qzڇk>O}8^p@Azڇ(dk>0R}8^p@Kz7ڇxk0>T}8^p@Uz_ڇkp>0W}8^p@_zڇDk>Y}8^p@izڇhk>0\}8^p@szڇk0>^}8^p@}zڇ$kp>0a}8^p@{'ڇXk>c}8^p@%{Oڇdk>0f}8^p@9{wڇk0>h}8^p@M{ڇHkp>0k}8^p@a{ڇDk>m}8^p@u{ڇk>0p}8^p@ý{ڇ8k0>r}8^p@ͽ{?ڇ$kp>0u}8^p@׽{gڇk>w}8^p@{ڇ(dk>0z}8^p@{ڇxk0>|}8^p@{ڇkp>0}8^p@XkX0kEXXkXkE Xk XkEXkX kEXHkXpkEXkXkEXkXkE"X8k$X`kE'Xk)XkE,Xk.XkE1X(k3XPkE6Xxk8XkE;Xk=XkE@XkBX@kEEXhkGXkEJXkLXkEOXkQX0kETXXkVXkEYXk[XkE^Xk`X kEcXHkeXpkEhXkjXkEmXkoXkErX8ktX`kEwXkyXkE|Xk~XkEX(kŃXPkEXxkňXkEXkōXkEXkŒX@kEXhkŗXkEXkŜXkEXkšX0kEXXkŦXkEXkūXkEXkŰX kEXHkŵXpkEXkźXkEXkſXkE½X8kĽX`kEǽXkɽXkE̽XkνXkEѽX(kӽXPkEֽXxkؽXkE۽XkݽXkEXkX@kEXhkXkEXkXkEXkX0kEXXk>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ{pkí}>ڇ_SXn,@t*wO1?1_QKJ!M..>ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>=p->ܳp>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý}Ň;pw->ه[|pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>Ý};pw >ه|7pgn>m"ߚ}<9~̿5yos[pmys@k_1{v^coo-߆Zy9 srk1{9sk1{9sk1{A9my/sk߆ߚ2{9mXyeoos,skc=۠[߆ߚXp<0{w 9951yaos s:~k=; [߁ߚhp>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}spC͇ۇ=7znn>>|}sp}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇ}>znۇsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn=׏ۇGsp}~>\?zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spKۇ/=_zn>\}spz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}^znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇz}znۇk|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|pa>\Å}Ƈ p.5>\؇k|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpa>\Å}‡ p .>\؇+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|Wpi>\å}‡Kp .>\ڇ+|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|pi.>\å}ćKp.%>\ڇK|`>EܴMp iA7d>6x>"6/l>b7`>P6j>6t>7~>16h>6r>q7|>ش˦}8>6AiMp|mڇr>ݴ}8>7Ai lڇ#̦}8Bi`mڇ#l}8Binڇ#}8Bioڇ}8@lڇƦ}8lڇ˦}8lڇЦ}80mڇզ}8mڇڦ}8mڇߦ}8 nڇ}8pnڇ}8nڇ}8oڇ}8`oڇ}8oڇ}8~lڇ¦}8~PlڇǦ}8~lڇ̦}8~lڇѦ}8~@mڇ֦}8~mڇۦ}8~mڇ}8~0nڇ}8~nڇ}8~nڇ}8~ oڇ}8~poڇ}8~oڇ}8lڇ}80lڇAĦ}8XlڇƦ}8lڇAɦ}8lڇ˦}8lڇAΦ}8lڇЦ}8 mڇAӦ}8Hmڇզ}8pmڇAئ}8mڇڦ}8mڇAݦ}8mڇߦ}8nڇA}88nڇ}8`nڇA}8nڇ}8nڇA}8nڇ}8oڇA}8(oڇ}8PoڇA}8xoڇ}8oڇA}8oڇ}8oڇE}8^lڇ¦}8^@lڇEŦ}8^hlڇǦ}8^lڇEʦ}8^lڇ̦}8^lڇEϦ}8^mڇѦ}8^0mڇEԦ}8^Xmڇ֦}8^mڇE٦}8^mڇۦ}8^mڇEަ}8^mڇ}8^ nڇE}8^Hnڇ}8^pnڇE}8^nڇ}8^nڇE}8^nڇ}8^oڇE}8^8oڇ}8^`oڇE}8^oڇ}8^oڇE}8^oڇ}86lڇc}86lڇc}86(lڇc#æ}86}8-p[$lهRزea>Ö}8-p[#LlهزXeb>Ɩ}8-p[7tlهزed>Ȗ}8-p$[KlهBٲeXe>˖}8-p.[_lهٲ8ef>͖}8-p8[slهٲسeg>Ж}8-pB[ဇmه2ڲxei>Җ}8-pL[ရՖ}8-pV[ုdmهڲek>ז}8-p`[ömه"۲Xel>ږ}8-pj[׶mهr۲en>ܖ}8-pt[mه۲eXo>ߖ}8-p~[nهܲ8ep>}8-p[,nهbܲظeq>}8-p['Tnهܲxes>}8-p[;|nهݲeXt>}8-p[OnهRݲeu>}8-p[cnهݲXev>}8-p[wnهݲex>}8-p[ဋoهB޲eXy>}8-p[ဟDoه޲8ez>}8-p[ဳloه޲ؽe{>}8-p[Ƿoه2߲xe}>}8-p[۷oه߲eX~>}8-p[oه߲e>}8-p\eq}8."زDž[`> lه㢄-p\eqAÖ}8.rزDž[b>Hlه㢉-p\He+qŖ}8.زDž[Xc>plه㢎-p\e?qAȖ}8.ٲDž#[Ḙd>lه㢓-p\eSqʖ}8.bٲDž-[e>lه㢘-p\(egqA͖}8.ٲDž7[g>lه㢝-p\ȳe{qϖ}8.ڲDžA[Xh>mه㢢-p\heqAҖ}8.RڲDžK[Ḙi>8mه㢧-p\eqԖ}8.ڲDžU[j>`mه㢬-p\eqAז}8.ڲDž_[l>mه㢱-p\He˶qٖ}8.B۲Dži[Xm>mه㢶-p\e߶qAܖ}8.۲Džs[Ḙn>mه㢻-p\eqޖ}8.۲Dž}[o>nه-p\(eqA}8.2ܲDž[q>(nه-p\ȸeq}8.ܲDž[Xr>Pnه-p\he/qA}8.ܲDž[Ḙs>xnه-p\eCq}8."ݲDž[t>nه-p\eWqA}8.rݲDž[v>nه-p\Hekq}8.ݲDž[Xw>nه-p\eqA}8.޲Dž[Ḙx>oه-p\eq}8.b޲Dž[y>@oه-p\(eqA}8.޲Dž[{>hoه-p\Ƚeq}8.߲Dž[X|>oه-p\heϷqA}8.R߲Dž[Ḙ}>oه-p\eq}8.߲Dž[~>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ه |pe.>\Õ}+pW>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kp>\ۇ |pm.>\õ}kpZ>o9z[c=1ǿ֘_k5so9ssp5hA֘c<=[c\>o9ssp5A֘c<=[c\>o9ssp5XA֘c==[c\>o9ˇ1ssp5zz._A֘9|so9ssp58A֘<=[c\>o9ssp9ֆ5A֊5Aւ5A=[{yz.9|s~kˇ1Gxz.9|s~k̑ˇ1Gzz.9|s~kQˇ1Gyz.9|sp9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{p9>\{=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\s|pu=LJ{_9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJsps|~9>\?{=LJp}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{p}9>\{=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>|s|pq=LJ{7n>9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>܄{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܤ{7Mp9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܔ{7MpS9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ܴ{7Mp9>ȇYXz9y9fZx9Zy9kўˇ;͚IJ9|yz.!kˇ;ƚ\9|*yz.kˇϚ6}==5AmesspFY\>FF<=oyz.okˇېĚ6ʰ9| yz.ocyz.7kˇ{˚^9|Wyz.oM> <=М5A=esspY\>/<=P5A=,`ssp?bY\>ߏ+<=5A}essp_X\>_Y\>_TXz9߇k5P Y 1zZy9i7ɥgKpspp-1.0.1/tests/data/sys-file.at0000644000175000017500000025274213137223525013567 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([system files]) # Also tests that long variable names are preserved by SAVE and GET. AT_SETUP([write and read numeric data]) AT_KEYWORDS([SAVE GET system file]) for variant in 'UNCOMPRESSED $FL2' 'ZCOMPRESSED $FL3'; do set $variant compression=$1 magic=$2 cat >sysfile.sps <sysfile.sps < /dev/null > com.sav.subset]) od com.sav.subset AT_CHECK( [(printf '\000\000\000\001' | cmp -l com.sav.subset -) || (printf '\001\000\000\000' | cmp -l com.sav.subset -)], [0], [ignore]) AT_CLEANUP AT_SETUP([overwriting system file]) AT_DATA([output.sav], [abcdef ]) cp output.sav output.sav.backup AT_DATA([sysfile.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. SAVE OUTFILE='output.sav'. ]) AT_CHECK([pspp -O format=csv sysfile.sps]) AT_CHECK([cmp output.sav output.sav.backup], [1], [ignore]) AT_CLEANUP AT_SETUP([overwriting system file atomically]) AT_DATA([output.sav], [abcdef ]) cp output.sav output.sav.backup AT_DATA([sysfile.sps], [[DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. XSAVE OUTFILE='output.sav'. HOST COMMAND=['kill -TERM $PPID']. ]]) AT_CHECK([pspp -O format=csv sysfile.sps], [143], [], [ignore]) AT_CHECK([cmp output.sav output.sav.backup]) AT_CHECK( [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done]) AT_CLEANUP AT_SETUP([write to same system file being read]) AT_DATA([save.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 3 END DATA. SAVE OUTFILE='data.sav'. ]) AT_CHECK([pspp -O format=csv save.sps]) AT_CHECK([test -s data.sav]) AT_CHECK( [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done]) AT_DATA([save2.sps], [dnl GET FILE='data.sav'. COMPUTE y = x * 3. SAVE OUTFILE='data.sav'. ]) AT_CHECK([pspp -O format=csv save2.sps]) AT_CHECK( [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done]) AT_DATA([save3.sps], [dnl GET FILE='data.sav'. LIST. ]) AT_CHECK([pspp -O format=csv save3.sps], [0], [dnl Table: Data List x,y 3,9.00 ]) AT_CLEANUP AT_SETUP([nonempty case_map doesn't crash]) AT_KEYWORDS([SAVE system file]) AT_DATA([save.sps], [dnl INPUT PROGRAM. COMPUTE #I = 1. COMPUTE X = #I + 1. END CASE. END FILE. END INPUT PROGRAM. SAVE OUTFILE='tiny.sav'. ]) AT_CHECK([pspp -O format=csv save.sps]) AT_DATA([get.sps], [dnl GET FILE='tiny.sav'. LIST. ]) AT_CHECK([pspp -O format=csv get.sps], [0], [dnl Table: Data List X 2.00 ]) AT_CLEANUP # Test that system files can be read properly, even when the case_size # header value is -1 (Some 3rd party products do this). AT_SETUP([system files with -1 case_size]) AT_KEYWORDS([SAVE GET]) AT_DATA([save.sps], [dnl DATA LIST LIST NOTABLE /cont (A32) size pop count. VAR LABEL cont 'continents of the world' size 'sq km' pop 'population' count 'number of countries'. SAVE OUTFILE='cont.sav'. BEGIN DATA. Asia, 44579000, 3.7E+009, 44.00 Africa, 30065000, 7.8E+008, 53.00 "North America", 24256000, 4.8E+008, 23.00 "South America", 17819000, 3.4E+008, 12.00 Antarctica, 13209000, .00, .00 Europe, 9938000, 7.3E+008, 46.00 Australia/Oceania, 7687000, 31000000, 14.00 END DATA. ]) AT_CHECK([pspp -O format=csv save.sps]) AT_CHECK([test -f cont.sav]) dnl case_size is a 4-byte field at offset 68. dnl Make a new copy with its value changed to -1. AT_CHECK( [(dd if=cont.sav bs=1 count=68; printf '\377\377\377\377'; dd if=cont.sav bs=1 skip=72) > cont2.sav], [0], [], [ignore]) AT_CHECK([cmp cont.sav cont2.sav], [1], [cont.sav cont2.sav differ: char 69, line 1 ]) AT_DATA([get.sps], [dnl GET FILE='cont2.sav'. DISPLAY LABELS. LIST. ]) AT_CHECK([pspp -o pspp.csv get.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Label,Position cont,continents of the world,1 size,sq km,2 pop,population,3 count,number of countries,4 Table: Data List cont,size,pop,count Asia ,44579000,3.7E+009,44.00 Africa ,30065000,7.8E+008,53.00 North America ,24256000,4.8E+008,23.00 South America ,17819000,3.4E+008,12.00 Antarctica ,13209000,.00,.00 Europe ,9938000,7.3E+008,46.00 Australia/Oceania ,7687000,31000000,14.00 ]) AT_CLEANUP AT_SETUP([write v2 system file]) AT_KEYWORDS([SAVE]) AT_DATA([sysfile.sps], [dnl DATA LIST LIST NOTABLE / X * variable001 * variable002 * variable003 * . BEGIN DATA. 1.00 1.00 1.0 2.00 1.00 1.00 2.0 30.00 1.00 2.00 1.0 8.00 1.00 2.00 2.0 20.00 2.00 1.00 1.0 2.00 2.00 1.00 2.0 22.00 2.00 2.00 1.0 1.00 2.00 2.00 2.0 3.00 END DATA. SAVE /OUTFILE='foo.sav' /VERSION=2 . GET /FILE='foo.sav'. LIST. ]) AT_CHECK([pspp -O format=csv sysfile.sps], [0], [dnl Table: Data List x,variable,variab_a,variab_b 1.00,1.00,1.00,2.00 1.00,1.00,2.00,30.00 1.00,2.00,1.00,8.00 1.00,2.00,2.00,20.00 2.00,1.00,1.00,2.00 2.00,1.00,2.00,22.00 2.00,2.00,1.00,1.00 2.00,2.00,2.00,3.00 ]) dnl Ensure that the written file has no long name table AT_CHECK([grep 'X=X' foo.sav], [1], [ignore-nolog]) AT_CLEANUP AT_BANNER([system files -- very long strings]) AT_SETUP([read very long strings written by SPSS 13]) AT_CHECK([cp $top_srcdir/tests/data/v13.sav .]) AT_DATA([sys-file.sps], [dnl GET FILE='v13.sav' ENCODING='utf-8'. DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position N,"Format: F8.2 Display Width: 10",1 A255,"Format: A255 Display Width: 32",2 A258,"Format: A258 Display Width: 32",3 A2000,"Format: A2000 Display Width: 32",4 Table: Data List N,A255,A258,A2000 1.00,a1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,b1BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,c1CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 2.00,a2XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,b2YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY,c2ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ]) AT_CLEANUP AT_SETUP([read very long strings written by SPSS 14]) AT_CHECK([cp $top_srcdir/tests/data/v14.sav .]) AT_DATA([sys-file.sps], [dnl GET FILE='v14.sav' ENCODING='utf-8'. DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position vl255,"Format: A255 Display Width: 26",1 vl256,"Format: A256 Display Width: 26",2 vl1335,"Format: A1335 Display Width: 26",3 vl2000,"Format: A2000 Display Width: 26",4 Table: Data List vl255,vl256,vl1335,vl2000 MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM ]) AT_CLEANUP m4_divert_push([PREPARE_TESTS]) vls_gen_data () { cat > data.txt <)/' pspp.csv]], [0], [dnl File label: clientèle confrère cortège crèche Documents in the active dataset: DOCUMENT coördinate smörgåsbord épée séance soufflé soirée jalapeño vicuña. (Entered ) Variable,Description,Position àéîöçxyzabc,"Format: F8.2 Value,Label 1.00,éclair élan Attribute,Value Atatürk,Düsseldorf Gewürztraminer",1 roué,"Label: Provençal soupçon Format: A9 Value,Label abcdefghi,sauté précis",2 croûton,Format: A1000,3 Table: Custom data file attributes. Attribute,Value Furtwängler,kindergärtner ]) AT_CLEANUP pspp-1.0.1/tests/data/sys-file-reader.at0000644000175000017500000033037713150617240015024 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([system file reader - positive]) AT_SETUP([variable labels and missing values]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 28; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 1; dnl 1 case. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; "PSPP synthetic test file: "; i8 244; i8 245; i8 246; i8 248; s34 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Numeric variable, variable label. 2; 0; 1; 0; 0x050800 *2; s8 "NUM2"; 32; "Numeric variable 2's label ("; i8 249; i8 250; i8 251; ")"; dnl Numeric variable, one missing value. 2; 0; 0; 1; 0x050800 *2; s8 "NUM3"; 1.0; dnl Numeric variable, variable label and missing value. 2; 0; 1; 1; 0x050800 *2; s8 "NUM4"; 30; "Another numeric variable label"; i8 0 * 2; 1.0; dnl Numeric variable, two missing values. 2; 0; 0; 2; 0x050800 *2; s8 "NUM5"; 1.0; 2.0; dnl Numeric variable, three missing values. 2; 0; 0; 3; 0x050800 *2; s8 "NUM6"; 1.0; 2.0; 3.0; dnl Numeric variable, range of missing values. 2; 0; 0; -2; 0x050800 *2; s8 "NUM7"; 1.0; 3.0; dnl Numeric variables, range of missing values plus discrete value. 2; 0; 0; -3; 0x050800 *2; s8 "NUM8"; 1.0; 3.0; 5.0; 2; 0; 0; -3; 0x050800 *2; s8 "NUM9"; 1.0; HIGHEST; -5.0; 2; 0; 0; -3; 0x050800 *2; "NUM"; i8 192; i8 200; i8 204; i8 209; i8 210; LOWEST; 1.0; 5.0; dnl String variable, no label or missing values. 2; 4; 0; 0; 0x010400 *2; s8 "STR1"; dnl String variable, variable label. 2; 4; 1; 0; 0x010400 *2; s8 "STR2"; 25; "String variable 2's label"; i8 0 * 3; dnl String variable, one missing value. 2; 4; 0; 1; 0x010400 *2; s8 "STR3"; s8 "MISS"; dnl String variable, variable label and missing value. 2; 4; 1; 1; 0x010400 *2; s8 "STR4"; 29; "Another string variable label"; i8 0 * 3; s8 "OTHR"; dnl String variable, two missing values. 2; 4; 0; 2; 0x010400 *2; s8 "STR5"; s8 "MISS"; s8 "OTHR"; dnl String variable, three missing values. 2; 4; 0; 3; 0x010400 *2; s8 "STR6"; s8 "MISS"; s8 "OTHR"; s8 "MORE"; dnl Long string variable, one missing value. dnl (This is not how SPSS represents missing values for long strings--it dnl uses a separate record as shown later below--but old versions of PSPP dnl did use this representation so we continue supporting it for backward dnl compatibility. 2; 11; 0; 1; 0x010b00 *2; s8 "STR7"; "first8by"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Long string variables that will have missing values added with a dnl later record. 2; 9; 0; 0; 0x010900 *2; s8 "STR8"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 10; 0; 0; 0x010a00 *2; s8 "STR9"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 11; 0; 0; 0x010b00 *2; s8 "STR10"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Long string variable, value label. 2; 25; 1; 0; 0x011900 *2; s8 "STR11"; 14; "25-byte string"; i8 0 * 2; ( 2; -1; 0; 0; 0; 0; s8 ""; ) * 2; dnl Variable label fields on continuation records have been spotted in system dnl files created by "SPSS Power Macintosh Release 6.1". 2; -1; 1; 0; 0; 0; s8 ""; 20; "dummy variable label"; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; dnl Machine floating-point info record. 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST; dnl Long string variable missing values record. 7; 22; 1; COUNT ( dnl One missing value for STR8. COUNT("STR8"); i8 1; 8; "abcdefgh"; dnl Two missing values for STR9. COUNT("STR9"); i8 2; 8; "abcdefgh"; 8; "01234567"; dnl Three missing values for STR9. COUNT("STR10"); i8 3; 8; "abcdefgh"; 8; "01234567"; 8; "0 "; ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl Data. 1.0; 2.0; 3.0; 4.0; 5.0; 6.0; 7.0; 8.0; 9.0; 10.0; s8 "abcd"; s8 "efgh"; s8 "ijkl"; s8 "mnop"; s8 "qrst"; s8 "uvwx"; s16 "yzABCDEFGHI"; s16 "JKLMNOPQR"; s16 "STUVWXYZ01"; s16 "23456789abc"; s32 "defghijklmnopqstuvwxyzABC"; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY FILE LABEL. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl File label: PSPP synthetic test file: ôõöø Variable,Description,Position num1,Format: F8.0,1 num2,"Label: Numeric variable 2's label (ùúû) Format: F8.0",2 num3,"Format: F8.0 Missing Values: 1",3 num4,"Label: Another numeric variable label Format: F8.0 Missing Values: 1",4 num5,"Format: F8.0 Missing Values: 1; 2",5 num6,"Format: F8.0 Missing Values: 1; 2; 3",6 num7,"Format: F8.0 Missing Values: 1 THRU 3",7 num8,"Format: F8.0 Missing Values: 1 THRU 3; 5",8 num9,"Format: F8.0 Missing Values: 1 THRU HIGHEST; -5",9 numàèìñò,"Format: F8.0 Missing Values: LOWEST THRU 1; 5",10 str1,Format: A4,11 str2,"Label: String variable 2's label Format: A4",12 str3,"Format: A4 Missing Values: ""MISS""",13 str4,"Label: Another string variable label Format: A4 Missing Values: ""OTHR""",14 str5,"Format: A4 Missing Values: ""MISS""; ""OTHR""",15 str6,"Format: A4 Missing Values: ""MISS""; ""OTHR""; ""MORE""",16 str7,"Format: A11 Missing Values: ""first8by""",17 str8,"Format: A9 Missing Values: ""abcdefgh""",18 str9,"Format: A10 Missing Values: ""abcdefgh""; ""01234567""",19 str10,"Format: A11 Missing Values: ""abcdefgh""; ""01234567""; ""0 """,20 str11,"Label: 25-byte string Format: A25",21 Table: Data List num1,num2,num3,num4,num5,num6,num7,num8,num9,numàèìñò,str1,str2,str3,str4,str5,str6,str7,str8,str9,str10,str11 1,2,3,4,5,6,7,8,9,10,abcd,efgh,ijkl,mnop,qrst,uvwx,yzABCDEFGHI,JKLMNOPQR,STUVWXYZ01,23456789abc,defghijklmnopqstuvwxyzABC ]) done AT_CLEANUP AT_SETUP([unspecified number of variable positions]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code -1; dnl Nominal case size (unspecified) 0; dnl Not compressed 0; dnl Not weighted 1; dnl 1 case. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Numeric variable, variable label. 2; 0; 1; 0; 0x050800 *2; s8 "NUM2"; 26; "Numeric variable 2's label"; i8 0 *2; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl Data. 1.0; 2.0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position num1,Format: F8.0,1 num2,"Label: Numeric variable 2's label Format: F8.0",2 Table: Data List num1,num2 1,2 ]) done AT_CLEANUP AT_SETUP([wrong number of variable positions but version 13]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code -1; dnl Nominal case size (unspecified) 0; dnl Not compressed 0; dnl Not weighted 1; dnl 1 case. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Numeric variable, variable label. 2; 0; 1; 0; 0x050800 *2; s8 "NUM2"; 26; "Numeric variable 2's label"; i8 0 *2; dnl Machine integer info record (SPSS 13). 7; 3; 4; 8; 13; 2; 3; -1; 1; 1; ENDIAN; 1252; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl Data. 1.0; 2.0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position num1,Format: F8.0,1 num2,"Label: Numeric variable 2's label Format: F8.0",2 Table: Data List num1,num2 1,2 ]) done AT_CLEANUP AT_SETUP([value labels]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 22; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 1; dnl 1 case. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM3"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM4"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM5"; dnl String variables. 2; 1; 0; 0; 0x010100 *2; s8 "STR1"; dnl index 6 2; 2; 0; 0; 0x010200 *2; s8 "STR2"; dnl index 7 2; 3; 0; 0; 0x010300 *2; s8 "STR3"; dnl index 8 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; dnl index 9 2; 4; 0; 0; 0x010400 *2; s8 "STR5"; dnl index 10 2; 6; 0; 0; 0x010600 *2; s8 "STR6"; dnl index 11 2; 7; 0; 0; 0x010700 *2; s8 "STR7"; dnl index 12 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; dnl index 13 2; 9; 0; 0; 0x010900 *2; "STR9"; i8 230; s3 ""; dnl index 14 2; -1; 0; 0; 0; 0; s8 ""; 2; 12; 0; 0; 0x010c00 *2; s8 "STR12"; dnl index 16 2; -1; 0; 0; 0; 0; s8 ""; 2; 16; 0; 0; 0x011000 *2; s8 "STR16"; dnl index 18 2; -1; 0; 0; 0; 0; s8 ""; 2; 17; 0; 0; 0x011100 *2; s8 "STR17"; dnl index 20 ( 2; -1; 0; 0; 0; 0; s8 ""; ) * 2; dnl One value label for NUM1. 3; 1; 1.0; i8 17; i8 238; i8 228; i8 232; i8 237; s19 " (in Russian)"; 4; 1; 1; dnl Two value labels for NUM2, as a single pair of type 3 and type 4 records. 3; 2; 1.0; i8 3; s7 "one"; 2.0; i8 3; s7 "two"; 4; 1; 2; dnl Two value labels for NUM3, as two pairs of type 3 and type 4 records. 3; 1; 3.0; i8 5; s7 "three"; 4; 1; 3; 3; 1; 4.0; i8 4; s7 "four"; 4; 1; 3; dnl Two common value labels for NUM4 and NUM5, plus two different ones for each. 3; 1; 5.0; i8 4; s7 "five"; 4; 1; 4; 3; 1; 6.0; i8 3; s7 "six"; 4; 1; 5; 3; 2; 7.0; i8 5; s7 "seven"; 8.0; i8 5; s7 "eight"; 4; 2; 4; 5; 3; 1; 9.0; i8 4; s7 "nine"; 4; 1; 4; 3; 1; 10.0; i8 3; s7 "ten"; 4; 1; 5; dnl One value label for STR1. 3; 1; s8 "a"; i8 19; s23 "value label for `a'"; 4; 1; 6; dnl Two value labels for STR2, as a single pair of type 3 and type 4 records. 3; 2; s8 "bc"; i8 20; s23 "value label for `bc'"; s8 "de"; i8 20; s23 "value label for `de'"; 4; 1; 7; dnl Two value labels for STR3, as two pairs of type 3 and type 4 records. 3; 1; s8 "fgh"; i8 21; s23 "value label for `fgh'"; 4; 1; 8; 3; 1; s8 "ijk"; i8 21; s23 "value label for `ijk'"; 4; 1; 8; dnl Two common value labels for STR4 and STR5, plus two different ones for each. 3; 1; s8 "lmno"; i8 22; s23 "value label for `lmno'"; 4; 1; 9; 3; 1; s8 "pqrs"; i8 22; s23 "value label for `pqrs'"; 4; 1; 10; 3; 2; s8 "tuvw"; i8 22; s23 "value label for `tuvw'"; s8 "xyzA"; i8 22; s23 "value label for `xyzA'"; 4; 2; 9; 10; 3; 1; s8 "BCDE"; i8 22; s23 "value label for `BCDE'"; 4; 1; 9; 3; 1; s8 "FGHI"; i8 22; s23 "value label for `FGHI'"; 4; 1; 10; dnl One value label for STR6, STR7, STR8. 3; 1; s8 "JKLMNO"; i8 24; s31 "value label for `JKLMNO'"; 4; 1; 11; 3; 1; s8 "JKLMNOP"; i8 25; s31 "value label for `JKLMNOP'"; 4; 1; 12; 3; 1; s8 "JKLMNOPQ"; i8 26; s31 "value label for `JKLMNOPQ'"; 4; 1; 13; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1251; dnl Character encoding record. 7; 20; 1; 12; "windows-1251"; 7; 21; 1; COUNT ( dnl One value label for STR9ж, COUNT("STR9"; i8 230); 9; 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'"); dnl Two value labels for STR12. COUNT("STR12"); 12; 2; COUNT("0123456789ab"); COUNT("value label for `0123456789ab'"); COUNT("cdefghijklmn"); COUNT("value label for `cdefghijklmn'"); dnl Three value labels for STR16. COUNT("STR16"); 16; 3; COUNT("opqrstuvwxyzABCD"); COUNT("value label for `opqrstuvwxyzABCD'"); COUNT("EFGHIJKLMNOPQRST"); COUNT("value label for `EFGHIJKLMNOPQRST'"); COUNT("UVWXYZ0123456789"); COUNT("value label for `UVWXYZ0123456789' with Cyrillic letters: `"; i8 244; i8 245; i8 246; "'"); dnl One value label for STR17. COUNT("STR17"); 17; 1; COUNT("abcdefghijklmnopq"); COUNT("value label for `abcdefghijklmnopq'"); ); dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position num1,"Format: F8.0 Value,Label 1,один (in Russian)",1 num2,"Format: F8.0 Value,Label 1,one 2,two",2 num3,"Format: F8.0 Value,Label 3,three 4,four",3 num4,"Format: F8.0 Value,Label 5,five 7,seven 8,eight 9,nine",4 num5,"Format: F8.0 Value,Label 6,six 7,seven 8,eight 10,ten",5 str1,"Format: A1 Value,Label a,value label for `a'",6 str2,"Format: A2 Value,Label bc,value label for `bc' de,value label for `de'",7 str3,"Format: A3 Value,Label fgh,value label for `fgh' ijk,value label for `ijk'",8 str4,"Format: A4 Value,Label BCDE,value label for `BCDE' lmno,value label for `lmno' tuvw,value label for `tuvw' xyzA,value label for `xyzA'",9 str5,"Format: A4 Value,Label FGHI,value label for `FGHI' pqrs,value label for `pqrs' tuvw,value label for `tuvw' xyzA,value label for `xyzA'",10 str6,"Format: A6 Value,Label JKLMNO,value label for `JKLMNO'",11 str7,"Format: A7 Value,Label JKLMNOP,value label for `JKLMNOP'",12 str8,"Format: A8 Value,Label JKLMNOPQ,value label for `JKLMNOPQ'",13 str9ж,"Format: A9 Value,Label RSTUVWXYZ,value label for `RSTUVWXYZ'",14 str12,"Format: A12 Value,Label 0123456789ab,value label for `0123456789ab' cdefghijklmn,value label for `cdefghijklmn'",15 str16,"Format: A16 Value,Label EFGHIJKLMNOPQRST,value label for `EFGHIJKLMNOPQRST' UVWXYZ0123456789,value label for `UVWXYZ0123456789' with Cyrillic letters: `фхц' opqrstuvwxyzABCD,value label for `opqrstuvwxyzABCD'",16 str17,"Format: A17 Value,Label abcdefghijklmnopq,value label for `abcdefghijklmnopq'",17 ]) done AT_CLEANUP AT_SETUP([documents]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 1; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 1; dnl 1 case. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; dnl Document record. 6; 5; s80 "First line of documents"; s80 "Second line of documents"; "abb"; i8 233; " appliqu"; i8 233; " attach"; i8 233; " blas"; i8 233; " caf"; i8 233; " canap"; i8 233; " clich"; i8 233; " consomm"; i8 233; s25 ""; s80 ""; s80 "Last line of documents"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl Data. 1.0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DOCUMENTS. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Documents in the active dataset: First line of documents Second line of documents abbé appliqué attaché blasé café canapé cliché consommé Last line of documents Table: Data List num1 1 ]) done AT_CLEANUP AT_SETUP([empty document record]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 1; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 1; dnl 1 case. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; dnl Document record. 6; 0; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl Data. 1.0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List num1 1 ]) done AT_CLEANUP AT_SETUP([multiple response sets]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 16; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 0; dnl No cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl $a 2; 0; 0; 0; 0x050800 *2; i8 0x82; i8 0xa0; s6 ""; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; dnl $b 2; 0; 0; 0; 0x050800 *2; s8 "D"; 2; 0; 0; 0; 0x050800 *2; s8 "E"; 2; 0; 0; 0; 0x050800 *2; s8 "F"; 2; 0; 0; 0; 0x050800 *2; s8 "G"; dnl $c 2; 4; 0; 0; 0x010400 *2; s8 "H"; 2; 4; 0; 0; 0x010400 *2; s8 "I"; 2; 4; 0; 0; 0x010400 *2; s8 "J"; dnl $d 2; 0; 0; 0; 0x050800 *2; s8 "K"; 2; 0; 0; 0; 0x050800 *2; s8 "L"; 2; 0; 0; 0; 0x050800 *2; s8 "M"; dnl $e 2; 6; 0; 0; 0x010600 *2; s8 "N"; 2; 6; 0; 0; 0x010600 *2; s8 "O"; 2; 6; 0; 0; 0x010600 *2; s8 "P"; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 932; 7; 7; 1; COUNT( "$a=C 10 my mcgroup "; i8 0x82; i8 0xa0; " b c"; i8 10; "$b=D2 55 0 g e f d"; i8 10; i8 10; "$c=D4 "; i8 0x82; i8 0xcd; i8 0x82; i8 0xa2; " 10 mdgroup #2 h i j"; i8 10); 7; 19; 1; COUNT( i8 10; "$d=E 1 2 34 13 third mdgroup k l m"; i8 10; "$e=E 11 6 choice 0 n o p"; i8 10; i8 10; i8 10; i8 10); dnl Character encoding record. 7; 20; 1; 9; "shift_jis"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. MRSETS /DISPLAY NAME=ALL. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Multiple Response Sets Name,Variables,Details $a,"あ b c ","Multiple category set Label: my mcgroup " $b,"g e f d ","Multiple dichotomy set Counted value: 55 Category label source: Variable labels " $c,"h i j ","Multiple dichotomy set Label: mdgroup #2 Label source: Provided by user Counted value: `はい' Category label source: Variable labels " $d,"k l m ","Multiple dichotomy set Label: third mdgroup Label source: Provided by user Counted value: 34 Category label source: Value labels of counted value " $e,"n o p ","Multiple dichotomy set Label source: First variable label among variables Counted value: `choice' Category label source: Value labels of counted value " ]) done AT_CLEANUP dnl Also checks for handling of CR-only line ends in file label and dnl extra product info. AT_SETUP([extra product info]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 4; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 0; dnl No cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; "PSPP synthetic"; i8 13; s49 "test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "A"; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; 2; 0; 0; 0; 0x050800 *2; s8 "D"; dnl Extra product info. 7; 10; 1; COUNT ("Extra product info"; i8 13; "another line"; i8 13; "blah"); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl SYSFILE INFO FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([sed 7q pspp.csv], [0], [dnl File:,sys-file.sav Label:,"PSPP synthetic test file" Created:,01 Jan 11 20:53:52 by $(@%:@) SPSS DATA FILE PSPP synthetic test file Product:,"Extra product info another line blah" ]) done AT_CLEANUP AT_SETUP([variable display parameters, without width]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 19; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 0; dnl No cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "A"; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; 2; 0; 0; 0; 0x050800 *2; s8 "D"; dnl Short string variables. 2; 3; 0; 0; 0x010300 *2; s8 "H"; 2; 3; 0; 0; 0x010300 *2; s8 "I"; 2; 3; 0; 0; 0x010300 *2; s8 "J"; 2; 3; 0; 0; 0x010300 *2; s8 "K"; dnl Long string variables. 2; 9; 0; 0; 0x010900 *2; s8 "L"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 10; 0; 0; 0x010a00 *2; s8 "M"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 17; 0; 0; 0x011100 *2; s8 "N"; ( 2; -1; 0; 0; 0; 0; s8 "" ) * 2; 2; 25; 0; 0; 0x011900 *2; s8 "O"; ( 2; -1; 0; 0; 0; 0; s8 "" ) * 3; dnl Variable display parameters 7; 11; 4; 24; 1; 0; 2; 0; 3; 0; 1; 1; 2; 1; 3; 1; 1; 2; 2; 2; 3; 2; 0; 0; 0; 1; 0; 2; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position a,"Format: F8.0 Measure: Nominal Display Alignment: Left",1 b,"Format: F8.0 Measure: Ordinal Display Alignment: Left",2 c,"Format: F8.0 Measure: Scale Display Alignment: Left",3 d,"Format: F8.0 Measure: Nominal Display Alignment: Right",4 h,"Format: A3 Measure: Ordinal Display Alignment: Right",5 i,"Format: A3 Measure: Scale Display Alignment: Right",6 j,"Format: A3 Measure: Nominal Display Alignment: Center",7 k,"Format: A3 Measure: Ordinal Display Alignment: Center",8 l,"Format: A9 Measure: Scale Display Alignment: Center",9 m,"Format: A10 Measure: Nominal Display Alignment: Left",10 n,"Format: A17 Measure: Nominal Display Alignment: Right",11 o,"Format: A25 Measure: Nominal Display Alignment: Center",12 ]) done AT_CLEANUP AT_SETUP([variable display parameters, with width]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 19; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 0; dnl No cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "A"; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; 2; 0; 0; 0; 0x050800 *2; s8 "D"; dnl Short string variables. 2; 3; 0; 0; 0x010300 *2; s8 "H"; 2; 3; 0; 0; 0x010300 *2; s8 "I"; 2; 3; 0; 0; 0x010300 *2; s8 "J"; 2; 3; 0; 0; 0x010300 *2; s8 "K"; dnl Long string variables. 2; 9; 0; 0; 0x010900 *2; s8 "L"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 10; 0; 0; 0x010a00 *2; s8 "M"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 17; 0; 0; 0x011100 *2; s8 "N"; ( 2; -1; 0; 0; 0; 0; s8 "" ) * 2; 2; 25; 0; 0; 0x011900 *2; s8 "O"; ( 2; -1; 0; 0; 0; 0; s8 "" ) * 3; dnl Variable display parameters 7; 11; 4; 36; 1; 1; 0; 2; 2; 0; 3; 3; 0; 1; 4; 1; 2; 5; 1; 3; 6; 1; 1; 7; 2; 2; 8; 2; 3; 9; 2; 0; 10; 0; 0; 11; 1; 0; 12; 2; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position a,"Format: F8.0 Measure: Nominal Display Alignment: Left Display Width: 1",1 b,"Format: F8.0 Measure: Ordinal Display Alignment: Left Display Width: 2",2 c,"Format: F8.0 Measure: Scale Display Alignment: Left Display Width: 3",3 d,"Format: F8.0 Measure: Nominal Display Alignment: Right Display Width: 4",4 h,"Format: A3 Measure: Ordinal Display Alignment: Right Display Width: 5",5 i,"Format: A3 Measure: Scale Display Alignment: Right Display Width: 6",6 j,"Format: A3 Measure: Nominal Display Alignment: Center Display Width: 7",7 k,"Format: A3 Measure: Ordinal Display Alignment: Center Display Width: 8",8 l,"Format: A9 Measure: Scale Display Alignment: Center Display Width: 9",9 m,"Format: A10 Measure: Nominal Display Alignment: Left Display Width: 10",10 n,"Format: A17 Measure: Nominal Display Alignment: Right Display Width: 11",11 o,"Format: A25 Measure: Nominal Display Alignment: Center Display Width: 12",12 ]) done AT_CLEANUP AT_SETUP([long variable names]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 7; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 0; dnl No cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_A"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_B"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_C"; 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDINA"; 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDI_A"; 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDI_B"; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; dnl Machine floating-point info record. 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST; dnl Long variable names. 7; 13; 1; COUNT ( "LONGVARI=LongVariableName1"; i8 9; "LONGVA_A=LongVariableName2"; i8 9; "LONGVA_B=LongVariableName3"; i8 9; "LONGVA_C=LongVariableName4"; i8 9; "CO"; i8 214; "RDINA=Co"; i8 246; "rdinate_X"; i8 9; "CO"; i8 214; "RDI_A=Co"; i8 246; "rdinate_Y"; i8 9; "CO"; i8 214; "RDI_B=Co"; i8 246; "rdinate_Z"; ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position LongVariableName1,Format: F8.0,1 LongVariableName2,Format: F8.0,2 LongVariableName3,Format: F8.0,3 LongVariableName4,Format: F8.0,4 Coördinate_X,Format: F8.0,5 Coördinate_Y,Format: F8.0,6 Coördinate_Z,Format: F8.0,7 ]) done AT_CLEANUP AT_SETUP([very long strings]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 109; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 1; dnl No cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl 256-byte string. 2; 255; 0; 0; 0x01FF00 *2; "S"; i8 201; s6 "Q256"; (2; -1; 0; 0; 0; 0; s8 "") * 31; 2; 4; 0; 0; 0x010400 *2; "S"; i8 201; "Q256_1"; dnl 600-byte string. 2; 255; 0; 0; 0x01FF00 *2; s8 "STR600"; (2; -1; 0; 0; 0; 0; s8 "") * 31; 2; 255; 0; 0; 0x01FF00 *2; s8 "STR600_1"; (2; -1; 0; 0; 0; 0; s8 "") * 31; 2; 96; 0; 0; 0x016000 *2; s8 "STR600_2"; (2; -1; 0; 0; 0; 0; s8 "") * 11; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; dnl Very long string record. 7; 14; 1; COUNT ( "S"; i8 201; "Q256=00256"; i8 0; i8 9; "STR600=00600"; i8 0; i8 9; ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl Data. "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#" * 4; "abcdefgh"; "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#" * 9; "abcdefghijklmnopqrstuvwxyzABCDEF"; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position séq256,Format: A256,1 str600,Format: A600,2 Table: Data List séq256,str600 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@a,abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyz ]) done AT_CLEANUP AT_SETUP([data file and variable attributes]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 3; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 0; dnl 1 case. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Variables. 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR"; 2; 0; 0; 0; 0x050800 *2; s8 "SECONDVA"; 2; 0; 0; 0; 0x050800 *2; s8 "THIRDVAR"; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; dnl Long variable names. 7; 13; 1; COUNT ( "FIRSTVAR=FirstVariable"; i8 9; "SECONDVA=S"; i8 233; "condVariable"; i8 9; "THIRDVAR=ThirdVariable"; i8 9 ); dnl Data file attributes record. 7; 17; 1; COUNT ( "Attr1('Value1'"; i8 10; "''d"; i8 233; "claration''"; i8 10; ")"; "S"; i8 233; "condAttr('123'"; i8 10; "'456'"; i8 10; ")"; ); dnl Variable attributes record. 7; 18; 1; COUNT ( "FirstVariable:"; "ad"; i8 232; "le('23'"; i8 10; "'34'"; i8 10; ")"; "bert('123'"; i8 10; ")"; "$@Role('1'"; i8 10; ")"; "/S"; i8 233; "condVariable:"; "xyzzy('quux'"; i8 10; ")"; ); dnl Another variable attributes record. dnl Only system files written by "Stata 14.1/-savespss- 1.77 by S.Radyakin" dnl include multiple variable attributes records. 7; 18; 1; COUNT ("ThirdVariable:fizz('buzz'"; i8 10; ")";); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY @ATTRIBUTES. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [[Variable,Description FirstVariable,"Attribute,Value $@Role,1 adèle[1],23 adèle[2],34 bert,123" SécondVariable,"Attribute,Value xyzzy,quux" ThirdVariable,"Attribute,Value fizz,buzz" Table: Custom data file attributes. Attribute,Value Attr1[1],Value1 Attr1[2],'déclaration' SécondAttr[1],123 SécondAttr[2],456 ]]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [[Variable,Description,Position FirstVariable,"Format: F8.0 Role: Output Attribute,Value adèle[1],23 adèle[2],34 bert,123",1 SécondVariable,"Format: F8.0 Role: Input Attribute,Value xyzzy,quux",2 ThirdVariable,"Format: F8.0 Role: Input Attribute,Value fizz,buzz",3 Table: Custom data file attributes. Attribute,Value Attr1[1],Value1 Attr1[2],'déclaration' SécondAttr[1],123 SécondAttr[2],456 ]]) done AT_CLEANUP AT_SETUP([variable roles]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 7; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 0; dnl 1 case. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Variables. 2; 0; 0; 0; 0x050800 *2; s8 "I"; 2; 0; 0; 0; 0x050800 *2; s8 "O"; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "N"; 2; 0; 0; 0; 0x050800 *2; s8 "P"; 2; 0; 0; 0; 0x050800 *2; s8 "S"; 2; 0; 0; 0; 0x050800 *2; s8 "X"; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; dnl Variable attributes record. 7; 18; 1; COUNT ( "I:$@Role('0'"; i8 10; ")"; "/O:$@Role('1'"; i8 10; ")"; "/B:$@Role('2'"; i8 10; ")"; "/N:$@Role('3'"; i8 10; ")"; "/P:$@Role('4'"; i8 10; ")"; "/S:$@Role('5'"; i8 10; ")"; "/X:$@Role('6'"; i8 10; ")"; ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [dnl warning: `sys-file.sav': Invalid role for variable x. ]) AT_CHECK([cat pspp.csv], [0], [dnl warning: `sys-file.sav': Invalid role for variable x. Variable,Description,Position i,"Format: F8.0 Role: Input",1 o,"Format: F8.0 Role: Output",2 b,"Format: F8.0 Role: Both",3 n,"Format: F8.0 Role: None",4 p,"Format: F8.0 Role: Partition",5 s,"Format: F8.0 Role: Split",6 x,"Format: F8.0 Role: Input",7 ]) done AT_CLEANUP AT_SETUP([compressed data]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 6; dnl Nominal case size 1; dnl Simple compression 0; dnl Not weighted -1; dnl Unspecified number of cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; dnl String variable. 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl Compressed data. i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123"; i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu"; s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO"; i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW"; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position num1,Format: F8.0,1 num2,Format: F8.0,2 str4,Format: A4,3 str8,Format: A8,4 str15,Format: A15,5 Table: Data List num1,num2,str4,str8,str15 -99,0,,abcdefgh,0123 @&t@ .,151,jklm,nopqrstu,vwxyzABC @&t@ 1,2,DEFG,HIJKLMNO,PQRSTUV ]) done AT_CLEANUP AT_SETUP([compressed data, zero bias]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 6; dnl Nominal case size 1; dnl Simple compression. 0; dnl Not weighted -1; dnl Unspecified number of cases. 0.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; dnl String variable. 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl Compressed data. i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123"; i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu"; s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO"; i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW"; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [0]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position num1,Format: F8.0,1 num2,Format: F8.0,2 str4,Format: A4,3 str8,Format: A8,4 str15,Format: A15,5 Table: Data List num1,num2,str4,str8,str15 1,100,,abcdefgh,0123 @&t@ .,251,jklm,nopqrstu,vwxyzABC @&t@ 101,102,DEFG,HIJKLMNO,PQRSTUV ]) done AT_CLEANUP AT_SETUP([compressed data, other bias]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 6; dnl Nominal case size 1; dnl Simple compression. 0; dnl Not weighted -1; dnl Unspecified number of cases. 50.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; dnl String variable. 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl Compressed data. i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123"; i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu"; s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO"; i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW"; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x54: Compression bias is not the usual value of 100, or system file uses unrecognized floating-point format. ]) AT_CHECK([cat pspp.csv], [0], [dnl "warning: `sys-file.sav' near offset 0x54: Compression bias is not the usual value of 100, or system file uses unrecognized floating-point format." Variable,Description,Position num1,Format: F8.0,1 num2,Format: F8.0,2 str4,Format: A4,3 str8,Format: A8,4 str15,Format: A15,5 Table: Data List num1,num2,str4,str8,str15 -49,50,,abcdefgh,0123 @&t@ .,201,jklm,nopqrstu,vwxyzABC @&t@ 51,52,DEFG,HIJKLMNO,PQRSTUV ]) done AT_CLEANUP m4_divert_push([PREPARE_TESTS]) zcompressed_sack () { cat <<'EOF' dnl File header. "$FL3"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 6; dnl Nominal case size 2; dnl zlib compressed 0; dnl Not weighted -1; dnl Unspecified number of cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; dnl String variable. 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl ZLIB data header. i64 0x194; # zheader_ofs i64 0x205; # ztrailer_ofs i64 48; # ztrailer_len dnl ZLIB data block. dnl dnl This is the compressed form of: dnl dnl 01 64 fe fd fe fd ff fb 61 62 63 64 65 66 67 68 |.d......abcdefgh| dnl 30 31 32 33 20 20 20 20 fd fd fd fe 65 66 fd fd |0123 ....ef..| dnl 6a 6b 6c 6d 20 20 20 20 6e 6f 70 71 72 73 74 75 |jklm nopqrstu| dnl 76 77 78 79 7a 41 42 43 44 45 46 47 20 20 20 20 |vwxyzABCDEFG | dnl 48 49 4a 4b 4c 4d 4e 4f fe fd fc 00 00 00 00 00 |HIJKLMNO........| dnl 50 51 52 53 54 55 56 57 |PQRSTUVW| dnl dnl which is the data from the "compressed data" test. hex "78 01 63 4c f9 f7 f7 df df ff bf 13 93 92 53 52"; hex "d3 d2 33 0c 0c 8d 8c 15 80 e0 ef df bf ff 52 d3"; hex "fe fe cd ca ce c9 05 f1 f3 f2 0b 0a 8b 8a 4b 4a"; hex "cb ca 2b 2a ab 1c 9d 9c 5d 5c dd dc 41 e2 1e 9e"; hex "5e de 3e be 7e fe ff fe fe 61 00 81 80 c0 a0 e0"; hex "90 d0 b0 70 00 0f 3f 23 d7"; dnl ZLIB data trailer fixed header: i64 -100; # ztrailer_bias i64 0; # ztrailer_zero 0x3ff000; # block_size 1; # n_blocks dnl ZLIB block descriptor: i64 0x194; # uncompressed_ofs i64 0x1ac; # compressed_ofs 88; # uncompressed_size 89; # compressed_size EOF } m4_divert_pop([PREPARE_TESTS]) AT_SETUP([zcompressed data]) AT_KEYWORDS([sack synthetic system file positive zlib]) zcompressed_sack > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position num1,Format: F8.0,1 num2,Format: F8.0,2 str4,Format: A4,3 str8,Format: A8,4 str15,Format: A15,5 Table: Data List num1,num2,str4,str8,str15 -99,0,,abcdefgh,0123 @&t@ .,151,jklm,nopqrstu,vwxyzABC @&t@ 1,2,DEFG,HIJKLMNO,PQRSTUV ]) done AT_CLEANUP AT_BANNER([system file reader - negative]) AT_SETUP([no variables]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 0; dnl Nominal case size (empty) 0; dnl Not compressed 0; dnl Not weighted 0; dnl 0 cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl sys-file.sps:1: error: GET: `sys-file.sav': Data file dictionary has no variables. ]) dnl At one point pspp-convert would hang forever if there were no variables, dnl so check against regression. AT_CHECK([pspp-convert sys-file.sav sys-file.txt]) AT_CHECK([cat sys-file.txt], [0], [ ]) done AT_CLEANUP AT_SETUP([unspecified character encoding]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 4; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 0; dnl No cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; "PSPP synthetic test file: "; i8 244; i8 245; i8 246; i8 248; s34 ""; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "A"; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; 2; 0; 0; 0; 0x050800 *2; s8 "D"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET 'sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [stdout]) AT_CHECK([sed 's/default encoding.*For/default encoding. For/' stdout], [0], [dnl "warning: `sys-file.sav': This system file does not indicate its own character encoding. Using default encoding. For best results, specify an encoding explicitly. Use SYSFILE INFO with ENCODING=""DETECT"" to analyze the possible encodings." ]) done AT_CLEANUP AT_SETUP([misplaced type 4 record]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Type 4 record. >>4<<; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0xd4: Misplaced type 4 record. ]) done AT_CLEANUP AT_SETUP([bad record type]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Type 8 record (not a valid type). >>8<<; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0xd4: Unrecognized record type 8. ]) done AT_CLEANUP AT_SETUP([wrong number of variable positions]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; >>2<<; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [warning: `sys-file.sav': File header claims 2 variable positions but 1 were read from file. ]) done AT_CLEANUP AT_SETUP([variable name may not begin with `#']) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 >>"$UM1"<<; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0xb4: Invalid variable name `$UM1'. ]) done AT_CLEANUP AT_SETUP([variable name may not be reserved word]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 >>"TO"<<; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0xb4: Invalid variable name `TO'. ]) done AT_CLEANUP AT_SETUP([variable width must be between 0 and 255]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl String variable with invalid width 256. 2; 256; 0; 0; 0x050800 *2; s8 "VAR1"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0xb4: Bad width 256 for variable VAR1. ]) done AT_CLEANUP dnl SPSS-generated system file can contain duplicate variable names dnl (see bug #41475). AT_SETUP([duplicate variable name]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "VAR1"; 2; 0; 0; 0; 0x050800 *2; s8 "VAR1"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0xd4: Renaming variable with duplicate name `VAR1' to `VAR001'. Variable,Description,Position var1,Format: F8.0,1 var001,Format: F8.0,2 ]) done AT_CLEANUP AT_SETUP([variable label indicator not 0 or 1]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; >>2<<; 0; 0x050800 *2; s8 "VAR1"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0xb4: Variable label indicator field is not 0 or 1. ]) done AT_CLEANUP AT_SETUP([invalid numeric missing value indicator]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; >>-1<<; 0x050800 *2; s8 "VAR1"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], ["error: `sys-file.sav' near offset 0xb4: Numeric missing value indicator field is not -3, -2, 0, 1, 2, or 3." ]) done AT_CLEANUP AT_SETUP([invalid string missing value indicator]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl String variable. 2; 8; 0; >>4<<; 0x010800 *2; s8 "VAR1"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], ["error: `sys-file.sav' near offset 0xb4: String missing value indicator field is not 0, 1, 2, or 3." ]) done AT_CLEANUP AT_SETUP([missing string continuation record]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl String variable. 2; 10; 0; 0; 0x010a00 *2; s8 "VAR1"; >>2; 0; 0; 0; 0x050800 *2; s8 "VAR2";<< dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0xb4: Missing string continuation record. ]) done AT_CLEANUP AT_SETUP([invalid variable format]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 4; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, invalid format types. dnl No warning is issued for type 0 because it has been observed in real dnl system files. 2; 0; 0; 0; >>0xff0800; 0<<; s8 "NUM1"; dnl Numeric variable, string formats. 2; 0; 0; 0; >>0x010800<<; >>0x021000<<; s8 "VAR1"; dnl String variable, numeric formats. 2; 4; 0; 0; >>0x050800<<; >>0x110a01<<; s8 "STR1"; dnl String variable, wrong width formats. 2; 4; 0; 0; >>0x010800<<; >>0x020400<<; s8 "STR2"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xc0: Variable NUM1 with width 0 has invalid print format 0xff0800. warning: `sys-file.sav' near offset 0xe0: Variable VAR1 with width 0 has invalid print format 0x10800. warning: `sys-file.sav' near offset 0xe4: Variable VAR1 with width 0 has invalid write format 0x21000. warning: `sys-file.sav' near offset 0x100: Variable STR1 with width 4 has invalid print format 0x50800. warning: `sys-file.sav' near offset 0x104: Variable STR1 with width 4 has invalid write format 0x110a01. warning: `sys-file.sav' near offset 0x120: Variable STR2 with width 4 has invalid print format 0x10800. warning: `sys-file.sav' near offset 0x124: Variable STR2 with width 4 has invalid write format 0x20400. ]) done AT_CLEANUP AT_SETUP([invalid long string missing values]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 7; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 1; dnl 1 case. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; "PSPP synthetic test file: "; i8 244; i8 245; i8 246; i8 248; s34 ""; i8 0 *3; dnl One numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Long string variables that will have missing values added with a dnl later record. 2; 9; 0; 0; 0x010900 *2; s8 "STR1"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 10; 0; 0; 0x010a00 *2; s8 "STR2"; 2; -1; 0; 0; 0; 0; s8 ""; 2; 11; 0; 0; 0x010b00 *2; s8 "STR3"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; dnl Machine floating-point info record. 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST; dnl Long string variable missing values record. 7; 22; 1; COUNT ( dnl Zero missing values (not allowed) for STR1 . COUNT("STR1"); i8 >>0<<; dnl Four missing values (not allowed) for STR2. COUNT("STR2"); i8 4; 8; "abcdefgh"; 8; "ijklmnop"; 8; "qrstuvwx"; 8; "yz012345"; dnl Missing values for unknown variable COUNT(>>"Nonexistent"<<); i8 1; 8; "abcdefgh"; dnl Missing values for numeric variable COUNT(>>"NUM1"<<); i8 1; 8; "abcdefgh"; dnl Too long missing value COUNT("STR3"); i8 1; >>COUNT("abcdefghijkl")<<; ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; s8 "abcd"; s8 "efgh"; s8 "ijkl"; s8 "mnop"; s8 "qrst"; s8 "uvwx"; s16 "yzABCDEFGHI"; s16 "JKLMNOPQR"; s16 "STUVWXYZ01"; s16 "23456789abc"; s32 "defghijklmnopqstuvwxyzABC"; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], ["warning: `sys-file.sav' near offset 0x1f8: Long string missing values record says variable STR1 has 0 missing values, but only 1 to 3 missing values are allowed." "warning: `sys-file.sav' near offset 0x201: Long string missing values record says variable STR2 has 4 missing values, but only 1 to 3 missing values are allowed." warning: `sys-file.sav' near offset 0x242: Ignoring long string missing value record for unknown variable Nonexistent. warning: `sys-file.sav' near offset 0x257: Ignoring long string missing value record for numeric variable NUM1. "warning: `sys-file.sav' near offset 0x270: Ignoring long string missing value 0 for variable str3, with width 11, that has bad value width 12." Variable,Description,Position num1,Format: F8.0,1 str1,Format: A9,2 str2,"Format: A10 Missing Values: ""abcdefgh""; ""ijklmnop""; ""qrstuvwx""",3 str3,Format: A11,4 ]) done AT_CLEANUP AT_SETUP([weighting variable must be numeric]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; >>2<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl String variable. 2; 4; 0; 0; 0x010400 *2; s8 "STR1"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [warning: `sys-file.sav': Ignoring string variable `STR1' set as weighting variable. Variable,Description,Position num1,Format: F8.0,1 str1,Format: A4,2 ]) done AT_CLEANUP AT_SETUP([bad weighting variable index]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; >>3<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl String variable. 2; 4; 0; 0; 0x010400 *2; s8 "STR1"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x4c: Variable index 3 not in valid range 1...2. ]) done AT_CLEANUP AT_SETUP([variable index is long string contination]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 3; 1; >>3<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Long string variable. 2; 9; 0; 0; 0x010900 *2; s8 "STR1"; (2; -1; 0; 0; 0; 0; s8 ""); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x4c: Variable index 3 refers to long string continuation. ]) done AT_CLEANUP AT_SETUP([multiple documents records]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Two document records. (6; 1; s80 "One line of documents") >>* 2<<; dnl Dictionary termination record. 999; 0; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Data. 1.0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl error: `sys-file.sav' near offset 0x12c: Duplicate type 6 (document) record. ]) done AT_CLEANUP AT_SETUP([extension record too large]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Too-large extension record. 7; 3; >>0xfffff000 * 2<<; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl error: `sys-file.sav' near offset 0xd8: Record type 7 subtype 3 too large. ]) done AT_CLEANUP AT_SETUP([unknown extension record]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Unknown extension record type. 7; 30; 1; 1; i8 0; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK_UNQUOTED([pspp -O format=csv sys-file.sps], [0], [dnl "warning: \`sys-file.sav' near offset 0xd8: Unrecognized record type 7, subtype 30. For help, please send this file to ${PACKAGE_BUGREPORT} and mention that you were using ${PACKAGE_STRING}." ]) done AT_CLEANUP AT_SETUP([bad machine integer info size]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Machine integer info record. 7; 3; 4; >>9<<; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; >>1234<<; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl "warning: `sys-file.sav' near offset 0xd8: Record type 7, subtype 3 has bad count 9 (expected 8)." ]) done AT_CLEANUP AT_SETUP([bad machine integer info float format]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; >>2<<; 1; ENDIAN; 1252; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl error: `sys-file.sav' near offset 0xd8: Floating-point representation indicated by system file (2) differs from expected (1). ]) done AT_CLEANUP AT_SETUP([bad machine integer info endianness]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; >>3<<; 1252; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in "be 1" "le 2"; do set $variant AT_CHECK([sack --$[1] sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. DISPLAY DICTIONARY. ]) AT_CHECK_UNQUOTED([pspp -O format=csv sys-file.sps], [0], [dnl warning: \`sys-file.sav' near offset 0xd8: Integer format indicated by system file (3) differs from expected ($[2]). Variable,Description,Position num1,Format: F8.0,1 ]) done AT_CLEANUP AT_SETUP([bad machine floating-point info size]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Machine floating-point info record. 7; 4; 8; >>4<<; SYSMIS; HIGHEST; LOWEST; 0.0; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl "warning: `sys-file.sav' near offset 0xd8: Record type 7, subtype 4 has bad count 4 (expected 3)." ]) done AT_CLEANUP AT_SETUP([wrong special floating point values]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Machine floating-point info record. 7; 4; 8; 3; >>0.0<<; >>1.0<<; >>2.0<<; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps | sed 's/ [(].*/.../'], [0], [dnl "warning: `sys-file.sav' near offset 0xd8: File specifies unexpected value 0... "warning: `sys-file.sav' near offset 0xd8: File specifies unexpected value 1... "warning: `sys-file.sav' near offset 0xd8: File specifies unexpected value 2... ]) done AT_CLEANUP AT_SETUP([bad mrsets name]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 16; dnl Nominal case size 0; dnl Not compressed 0; dnl Not weighted 0; dnl No cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl $a 2; 0; 0; 0; 0x050800 *2; i8 0x82; i8 0xa0; s6 ""; 2; 0; 0; 0; 0x050800 *2; s8 "B"; 2; 0; 0; 0; 0x050800 *2; s8 "C"; dnl $b 2; 0; 0; 0; 0x050800 *2; s8 "D"; 2; 0; 0; 0; 0x050800 *2; s8 "E"; 2; 0; 0; 0; 0x050800 *2; s8 "F"; 2; 0; 0; 0; 0x050800 *2; s8 "G"; dnl $c 2; 4; 0; 0; 0x010400 *2; s8 "H"; 2; 4; 0; 0; 0x010400 *2; s8 "I"; 2; 4; 0; 0; 0x010400 *2; s8 "J"; dnl $d 2; 0; 0; 0; 0x050800 *2; s8 "K"; 2; 0; 0; 0; 0x050800 *2; s8 "L"; 2; 0; 0; 0; 0x050800 *2; s8 "M"; dnl $e 2; 6; 0; 0; 0x010600 *2; s8 "N"; 2; 6; 0; 0; 0x010600 *2; s8 "O"; 2; 6; 0; 0; 0x010600 *2; s8 "P"; dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 932; 7; 7; 1; COUNT( "$a=C 10 my mcgroup "; i8 0x82; i8 0xa0; " b c"; i8 10; "b=D2 55 0 g e f d"; i8 10; "$c=D4 "; i8 0x82; i8 0xcd; i8 0x82; i8 0xa2; " 10 mdgroup #2 h i j"; i8 10); 7; 19; 1; COUNT( "$d=E 1 2 34 13 third mdgroup k l m"; i8 10; "e=E 11 6 choice 0 n o p"; i8 10); dnl Character encoding record. 7; 20; 1; 9; "shift_jis"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. MRSETS /DISPLAY NAME=ALL. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav': Invalid multiple response set name `b'. warning: `sys-file.sav': Invalid multiple response set name `e'. Table: Multiple Response Sets Name,Variables,Details $a,"あ b c ","Multiple category set Label: my mcgroup " $c,"h i j ","Multiple dichotomy set Label: mdgroup #2 Label source: Provided by user Counted value: `はい' Category label source: Variable labels " $d,"k l m ","Multiple dichotomy set Label: third mdgroup Label source: Provided by user Counted value: 34 Category label source: Value labels of counted value " ]) done AT_CLEANUP AT_SETUP([missing space after C in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=Cx"); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: Missing space following `C' at offset 4 in MRSETS record. ]) done AT_CLEANUP AT_SETUP([missing space after E in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=Ex"); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: Missing space following `E' at offset 4 in MRSETS record. ]) done AT_CLEANUP AT_SETUP([unexpected label source in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=E 2"); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: Unexpected label source value following `E' at offset 7 in MRSETS record. warning: `sys-file.sav' near offset 0xd8: Expecting digit at offset 7 in MRSETS record. ]) done AT_CLEANUP AT_SETUP([bad type character in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a="); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl "warning: `sys-file.sav' near offset 0xd8: Missing `C', `D', or `E' at offset 3 in MRSETS record." ]) done AT_CLEANUP AT_SETUP([bad counted string length in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=Dx"); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: Expecting digit at offset 4 in MRSETS record. ]) done AT_CLEANUP AT_SETUP([missing space in counted string in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=D1x"); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: Expecting space at offset 5 in MRSETS record. ]) done AT_CLEANUP AT_SETUP([counted string too long in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=D4 abc"); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: 4-byte string starting at offset 6 exceeds record length 9. ]) done AT_CLEANUP AT_SETUP([missing space after counted string in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=D3 abcx"); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: Expecting space at offset 9 following 3-byte string. ]) done AT_CLEANUP AT_SETUP([missing newline after variable name in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=C 0 NUM1"); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: Missing new-line parsing variable names at offset 13 in MRSETS record. warning: `sys-file.sav': MRSET $a has only one variable. ]) done AT_CLEANUP AT_SETUP([duplicate variable name in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=C 0 NUM1 NUM1"; i8 10); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav': MRSET $a contains duplicate variable name NUM1. warning: `sys-file.sav': MRSET $a has only one variable. ]) done AT_CLEANUP AT_SETUP([mixed variable types in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 8; 0; 0; 0x010800 *2; s8 "STR1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=C 0 NUM1 STR1"; i8 10); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav': MRSET $a contains both string and numeric variables. warning: `sys-file.sav': MRSET $a has only one variable. ]) done AT_CLEANUP AT_SETUP([missing newline after variable name in mrsets]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=C 0 NUM1"; i8 10); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav': MRSET $a has only one variable. ]) done AT_CLEANUP AT_SETUP([zero or one variable in mrset]) AT_KEYWORDS([sack synthetic system file negative multiple response]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Multiple response sets. 7; 7; 1; COUNT("$a=C 0 NUM1"; i8 10; "$b=C 0 "; i8 10); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav': MRSET $a has only one variable. warning: `sys-file.sav': MRSET $b has no variables. ]) done AT_CLEANUP AT_SETUP([wrong display parameter size]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Display parameters record. 7; 11; >>8<<; 2; 1.0; 1.0; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl "warning: `sys-file.sav' near offset 0xd8: Record type 7, subtype 11 has bad size 8 (expected 4)." ]) done AT_CLEANUP AT_SETUP([wrong display parameter count]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Display parameters record. 7; 11; 4; >>4<<; 1; 1; 2; 2; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: Extension 11 has bad count 4 (for 1 variables). ]) done AT_CLEANUP AT_SETUP([wrong display measurement level]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Display parameters record. 7; 11; 4; 2; >>4<<; 0; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: Invalid variable display parameters for variable 0 (NUM1). Default parameters substituted. ]) done AT_CLEANUP AT_SETUP([wrong display alignment]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable, no label or missing values. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Display parameters record. 7; 11; 4; 2; 1; >>-1<<; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xd8: Invalid variable display parameters for variable 0 (NUM1). Default parameters substituted. ]) done AT_CLEANUP AT_SETUP([bad variable name in variable/value pair]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI"; dnl Long variable names. 7; 13; 1; COUNT (>>"xyzzy"<<); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xde: Dictionary record refers to unknown variable xyzzy. ]) done AT_CLEANUP AT_SETUP([duplicate long variable name]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 4; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_A"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_B"; 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_C"; dnl Long variable names. 7; 13; 1; COUNT ( "LONGVARI=_Invalid"; i8 9; "LONGVARI=$Invalid"; i8 9; "LONGVARI=#Invalid"; i8 9; "LONGVA_A=LongVariableName"; i8 9; "LONGVA_B=LONGVARIABLENAME"; i8 9; ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name `_Invalid'. warning: `sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name `$Invalid'. warning: `sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name `#Invalid'. warning: `sys-file.sav' near offset 0x138: Duplicate long variable name `LONGVARIABLENAME'. ]) done AT_CLEANUP AT_SETUP([bad very long string length]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Very long string map. 7; 14; 1; COUNT ( "NUM1=00000"; i8 0; i8 9; "NUM1=00255"; i8 0; i8 9; "NUM1=00256"; i8 0; i8 9; ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl warning: `sys-file.sav' near offset 0xd8: NUM1 listed as string of invalid length 00000 in very long string record. "warning: `sys-file.sav' near offset 0xd8: NUM1 listed in very long string record with width 00255, which requires only one segment." error: `sys-file.sav' near offset 0xd8: Very long string NUM1 overflows dictionary. ]) done AT_CLEANUP AT_SETUP([bad very long string segment width]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Variables. 2; 255; 0; 0; 0x01ff00 *2; s8 "STR1"; (2; -1; 0; 0; 0; 0; s8 "") * 31; 2; >>9<<; 0; 0; 0x010900 *2; s8 "STR1_A"; >>2; -1; 0; 0; 0; 0; s8 "";<< dnl Very long string map. 7; 14; 1; COUNT ( "STR1=00256"; i8 0; i8 9; ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl error: `sys-file.sav' near offset 0x4f8: Very long string with width 256 has segment 1 of width 9 (expected 4). ]) done AT_CLEANUP AT_SETUP([too many value labels]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 3; >>0x7fffffff<<; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl error: `sys-file.sav' near offset 0xd4: Invalid number of labels 2147483647. ]) done AT_CLEANUP AT_SETUP([missing type 4 record]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Value label with missing type 4 record. 3; 1; 1.0; i8 3; s7 "one"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. >>999; 0<<; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl error: `sys-file.sav' near offset 0xe8: Variable index record (type 4) does not immediately follow value label record (type 3) as it should. ]) done AT_CLEANUP AT_SETUP([value label with no associated variables]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Value label with no variables. 3; 1; 1.0; i8 3; s7 "one"; 4; >>0<<; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl error: `sys-file.sav' near offset 0xec: Number of variables associated with a value label (0) is not between 1 and the number of variables (1). ]) done AT_CLEANUP AT_SETUP([type 4 record names long string variable]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Long string variable. 2; 9; 0; 0; 0x010900 *2; s8 "STR1"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Value label that names long string variable. 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 1; >>1<<; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl error: `sys-file.sav' near offset 0xf4: Value labels may not be added to long string variables (e.g. STR1) using records types 3 and 4. ]) done AT_CLEANUP AT_SETUP([variables for value label must all be same type]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Variables. 2; 6; 0; 0; 0x010600 *2; s8 "STR1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Value label that names numeric and string variables. 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 2<<; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl "error: `sys-file.sav' near offset 0xf4: Variables associated with value label are not all of identical type. Variable STR1 is string, but variable NUM1 is numeric." ]) done AT_CLEANUP AT_SETUP([duplicate value labels type]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Variables. 2; 6; 0; 0; 0x010600 *2; s8 "STR1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; dnl Duplicate value labels. 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 1<<; 3; 1; 1.0; i8 3; s7 "one"; 4; 2; >>2; 2<<; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl End of dictionary. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xf4: Duplicate value label for `xyzzy ' on STR1. warning: `sys-file.sav' near offset 0x11c: Duplicate value label for 1 on NUM1. ]) done AT_CLEANUP AT_SETUP([missing attribute value]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Variables. 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR"; dnl Data file attributes record. 7; 17; 1; COUNT ( "Attr1(" ); dnl Variable attributes record. 7; 18; 1; COUNT ( "FIRSTVAR:"; "fred('23'"; i8 10 ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xde: Error parsing attribute value Attr1[[1]]. warning: `sys-file.sav' near offset 0x101: Error parsing attribute value fred[[2]]. ]) done AT_CLEANUP AT_SETUP([unquoted attribute value]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Variables. 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR"; dnl Data file attributes record. 7; 17; 1; COUNT ( "Attr1(value"; i8 10; ")" ); dnl Variable attributes record. 7; 18; 1; COUNT ( "FIRSTVAR:"; "fred(23"; i8 10; ")" ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xe4: Attribute value Attr1[[1]] is not quoted: value. warning: `sys-file.sav' near offset 0x106: Attribute value fred[[1]] is not quoted: 23. ]) done AT_CLEANUP AT_SETUP([duplicate attribute name]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Variables. 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR"; dnl Data file attributes record. 7; 17; 1; COUNT ( "Attr1('value'"; i8 10; ")"; "Attr1('value'"; i8 10; ")"; ); dnl Variable attributes record. 7; 18; 1; COUNT ( "FIRSTVAR:"; "fred('23'"; i8 10; ")"; "fred('23'"; i8 10; ")"; ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0xf6: Duplicate attribute Attr1. warning: `sys-file.sav' near offset 0x125: Duplicate attribute fred. ]) done AT_CLEANUP AT_SETUP([bad variable name in long string value label]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 3; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 14; 0; 0; 0x010e00 *2; s8 "STR14"; 2; -1; 0; 0; 0; 0; s8 ""; 7; 21; 1; COUNT ( dnl No variable named STR9. COUNT(>>"STR9"<<); 9; 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'"); dnl NUM1 is numeric. COUNT(>>"NUM1"<<); 0; 1; COUNT("xyz"); COUNT("value label for 1.0"); dnl Wrong width for STR14. COUNT("STR14"); >>9<<; 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'"); dnl Wrong width for value. COUNT("STR14"); 14; 1; COUNT(>>"RSTUVWXYZ"<<); COUNT("value label for `RSTUVWXYZ'"); dnl Duplicate value label. COUNT("STR14"); 14; 2; COUNT("abcdefghijklmn"); COUNT("value label for `abcdefghijklmn'"); >>COUNT("abcdefghijklmn"); COUNT("another value label for `abcdefghijklmn'")<<; ); dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0x128: Ignoring long string value label record for unknown variable STR9. warning: `sys-file.sav' near offset 0x164: Ignoring long string value label record for numeric variable NUM1. warning: `sys-file.sav' near offset 0x193: Ignoring long string value label record for variable STR14 because the record's width (9) does not match the variable's width (14). "warning: `sys-file.sav' near offset 0x1d4: Ignoring long string value label 0 for variable str14, with width 14, that has bad value width 9." warning: `sys-file.sav' near offset 0x259: Duplicate value label for `abcdefghijklmn' on str14. ]) done AT_CLEANUP AT_SETUP([fewer data records than indicated by file header]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 0; 0; >>5<<; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Data. 999; 0; 1.0; 2.0; 3.0; 4.0; 5.0; 6.0; 7.0; 8.0; dnl Missing record here. ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. LIST. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: Error reading case from file `sys-file.sav'. Table: Data List num1,num2 1,2 3,4 5,6 7,8 ]) done AT_CLEANUP AT_SETUP([partial data record between variables]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 0; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Data. 999; 0; 1.0; 2.0; 3.0; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. LIST. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x12c: File ends in partial case. Table: Data List num1,num2 1,2 ]) done AT_CLEANUP AT_SETUP([partial data record within long string]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; 2; 0; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3; dnl Numeric variables. 2; 14; 0; 0; 0x010e00 *2; s8 "STR14"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Data. 999; 0; s14 "one data item"; s8 "partial"; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. LIST. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x12a: Unexpected end of file. Table: Data List str14 one data item @&t@ ]) done AT_CLEANUP AT_SETUP([partial compressed data record]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 6; dnl Nominal case size 1; dnl Compressed 0; dnl Not weighted -1; dnl Unspecified number of cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; dnl String variable. 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl Compressed data. i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123"; ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. LIST. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x1ac: File ends in partial case. Table: Data List num1,num2,str4,str8,str15 -99,0,,abcdefgh,0123 @&t@ ]) done AT_CLEANUP AT_SETUP([zcompressed data - bad zheader_ofs]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*zheader_ofs.*/>>i64 0<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x194: Wrong ZLIB data header offset 0 (expected 0x194). ]) done AT_CLEANUP AT_SETUP([zcompressed data - bad ztrailer_ofs]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*ztrailer_ofs.*/>>i64 0<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x194: Impossible ZLIB trailer offset 0x0. ]) done AT_CLEANUP # ztrailer_len must be a multiple of 24 and at least 48, # so a value of 12 is impossible. AT_SETUP([zcompressed data - invalid ztrailer_len]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*ztrailer_len.*/>>i64 12<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x194: Invalid ZLIB trailer length 12. ]) done AT_CLEANUP # ztrailer_ofs + ztrailer_len must be the file size. AT_SETUP([zcompressed data - wrong ztrailer_len]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*ztrailer_len.*/>>i64 72<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [warning: `sys-file.sav' near offset 0x1ac: End of ZLIB trailer (0x24d) is not file size (0x235). error: `sys-file.sav' near offset 0x21d: 72-byte ZLIB trailer specifies 1 data blocks (expected 2). ]) done AT_CLEANUP AT_SETUP([zcompressed data - wrong ztrailer_bias]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*ztrailer_bias.*/>>i64 0<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x20d: ZLIB trailer bias (0) differs from file header bias (100.00). ]) done AT_CLEANUP AT_SETUP([zcompressed data - wrong ztrailer_zero]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*ztrailer_zero.*/>>i64 100<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x215: ZLIB trailer "zero" field has nonzero value 100. ]) done AT_CLEANUP AT_SETUP([zcompressed data - wrong block_size]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*block_size.*/>>0x1000<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x219: ZLIB trailer specifies unexpected 4096-byte block size. ]) done AT_CLEANUP AT_SETUP([zcompressed data - wrong n_blocks]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*n_blocks.*/>>2<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: 48-byte ZLIB trailer specifies 2 data blocks (expected 1). ]) done AT_CLEANUP AT_SETUP([zcompressed data - wrong uncompressed_ofs]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*uncompressed_ofs.*/i64 >>0x177<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported uncompressed data offset 0x177, when 0x194 was expected. ]) done AT_CLEANUP AT_SETUP([zcompressed data - wrong compressed_ofs]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*@%:@ compressed_ofs.*/i64 >>0x191<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported compressed data offset 0x191, when 0x1ac was expected. ]) done AT_CLEANUP AT_SETUP([zcompressed data - compressed sizes don't add up]) AT_KEYWORDS([sack synthetic system file negative zlib]) AT_DATA([sys-file.sack], [dnl dnl File header. "$FL3"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; 2; dnl Layout code 6; dnl Nominal case size 2; dnl zlib compressed 0; dnl Not weighted -1; dnl Unspecified number of cases. 100.0; dnl Bias. "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; i8 0 *3; dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; dnl String variable. 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; dnl Character encoding record. 7; 20; 1; 12; "windows-1252"; dnl Dictionary termination record. 999; 0; dnl ZLIB data header. i64 0x194; # zheader_ofs i64 0x1ac; # ztrailer_ofs i64 72; # ztrailer_len dnl This is where the ZLIB data blocks would go, but we don't need any to dnl provoke this message so we omit them. dnl ZLIB data trailer fixed header: i64 -100; # ztrailer_bias i64 0; # ztrailer_zero 0x3ff000; # block_size 2; # n_blocks dnl ZLIB block descriptor 1: i64 0x194; # uncompressed_ofs i64 0x1ac; # compressed_ofs 0x100000; # uncompressed_size 0x12345; # compressed_size dnl ZLIB block descriptor 2: i64 0x100194; # uncompressed_ofs i64 0x12421; # compressed_ofs 0x100000; # uncompressed_size 0x12345; # compressed_size ]) for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [warning: `sys-file.sav' near offset 0x1c4: ZLIB block descriptor 0 reported block size 0x100000, when 0x3ff000 was expected. error: `sys-file.sav' near offset 0x1dc: ZLIB block descriptor 1 reported compressed data offset 0x12421, when 0x124f1 was expected. ]) done AT_CLEANUP AT_SETUP([zcompressed data - uncompressed_size > block_size]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*uncompressed_size.*/>>0x400000<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported block size 0x400000, when at most 0x3ff000 was expected. ]) done AT_CLEANUP AT_SETUP([zcompressed data - compression expands data too much]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*uncompressed_size.*/>>50<<;/ s/.*@%:@ compressed_size.*/>>100<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reports compressed size 100 and uncompressed size 50. ]) done AT_CLEANUP AT_SETUP([zcompressed data - compressed sizes don't add up]) AT_KEYWORDS([sack synthetic system file negative zlib]) zcompressed_sack | sed 's/.*@%:@ compressed_size.*/>>88<<;/' > sys-file.sack for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x235: ZLIB trailer is at offset 0x205 but 0x204 would be expected from block descriptors. ]) done AT_CLEANUP # CVE-2017-10791. # See also https://bugzilla.redhat.com/show_bug.cgi?id=1467004. # See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866890. # See also https://security-tracker.debian.org/tracker/CVE-2017-10791. # Found by team OWL337, using the collAFL fuzzer. AT_SETUP([integer overflows in long string missing values]) AT_KEYWORDS([system file negative]) cp $top_srcdir/tests/data/CVE-2017-10791.sav . AT_CHECK([pspp-convert -O csv -e ASCII CVE-2017-10791.sav -], [0], [], [dnl `CVE-2017-10791.sav' near offset 0x217: Extension record subtype 21 ends unexpectedly. ]) AT_CLEANUP # CVE-2017-10792. # See also https://bugzilla.redhat.com/show_bug.cgi?id=1467005. # See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866890. # See also https://security-tracker.debian.org/tracker/CVE-2017-10792. # Reported by team OWL337, with fuzzer collAFL. AT_SETUP([null dereference skipping bad extension record 18]) AT_KEYWORDS([system file negative]) cp $top_srcdir/tests/data/CVE-2017-10792.sav . AT_CHECK([pspp-convert -O csv -e ASCII CVE-2017-10792.sav -], [0], [], [dnl `CVE-2017-10792.sav' near offset 0x1c0: Record type 7, subtype 18 has bad size 4 (expected 1). ]) AT_CLEANUP pspp-1.0.1/tests/data/inexactify.c0000644000175000017500000000354712470242646014016 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include /* Replaces insignificant digits by # to facilitate textual comparisons. Not a perfect solution to the general-purpose comparison problem, because rounding that affects earlier digits can still cause differences. */ int main (void) { bool in_quotes = false; bool in_exponent = false; int digits = 0; for (;;) { int c = getchar (); if (c == EOF) break; else if (c == '\n') in_quotes = false; else if (c == '"') { in_quotes = !in_quotes; in_exponent = false; digits = 0; } else if (in_quotes && !in_exponent) { if (strchr ("+dDeE", c) != NULL || (c == '-' && digits)) in_exponent = true; else if (strchr ("0123456789}JKLMNOPQR", c) != NULL) { if (digits || c >= '1') digits++; if (digits > 13) c = isdigit (c) ? '#' : '@'; } } putchar (c); } return EXIT_SUCCESS; } pspp-1.0.1/tests/data/binhex-out.expected.gz0000644000175000017500000001001212470242646015714 00000000000000CEbinhex-out.expectedtTߛL"P L (H9jκ"x*-AVBWue[j'TYXtEغ-*Jj٭h@wwfBd&!9{vf{|s%(H,_3p")J0^@DP["C"M`6 \T"eeYPQͧ_62.1x N@ 7(pBA!%Nۄت- %n[L1G(FCB <~czp;%D_%STqWdH)`^$()R /mx[[܉ J`y!yM=@} _V}ӳG/G  (`AMPU ,6[[v)r!N}.2?^0;萔#e ~_9E@ `( c[kCs(Cʨ! @{Ti.m*[o}}K@$xV,(^5*!ު3|eXb | jHa:j[lgñT_ϔE P姀*+ c0^@:OT'Rz}}_)}_B)#O"7)}g[:4 dܞc:x0 r'a=^˔eriWB.*<׍f}r^ο)M`և@^$t@I~_)_Sk܂% DO*ҩMG7>X{f }$9i˱Kګ ?K/nTپird} m?=?)O mU+oio[p/v܋vi?a /A.B;՘yT(o]?og`E8r!.?3Ϣ"eO}j!6ko_>Po dpdi<_ 2SᳮpQ}yaWyK[[FkS眏E~\?sPBG@}ÛΛ-fPg:iY̸,|=^<+6̀~\P|GckXB"QyV~g|?9L˲deWo;~k?#Z<'E#NX7L,qAЋCAiI]b$e\ lJwO/'vXhx;z7O04^9aǔ"d?n7}k(l&|3s m"\7k`'?#at/q`KvVe?4>v0 OslO`Fwfl7 @?f?mlx סs>򟻆3 .Aä/4&ُ`@.\2Ĺw!a=*㧤 Q%ӕ-ٕ?e?e!<7fω ,݌ dȅP8=iHg o#l&^uwv,K+[V%_r;,b&#Yyi: Bj,_o:aYLW6Dc LOA'ymC;lyeA0um翺vGZKaep7K䣡9]zҊi+?jG;E#ij]֑ y g»*DؼO7~xoro໕:dut"/ySZ Z2F~$mk?'pT!`I I;cGq?b>?mw;g<vr޼@WGc [IpУ~:څ}9<- 7t AE rP A. h7T]ʏE٤{Wt,K,kW={W>O&yu qy.Y!C@F\02;r- *eZDC_%SL){I;GX[lMCFw(rᓔ=cH܈zЉY;ղ,l: ?6&.uS4/~Ņ5[ 6yKL6C%~ j[6g~گ'Zge?n@ُ_^)]/+d|&G(9Ui[04rmmN͝.A#nmSJI ysBS r`qHss3/uA#n,cmW*e nS`1Mt!$A<10e[9^(x L?ڠK |U/;?>%no=NHFm\J[vOcۀ7vٓo'ҧb+n{gF 6 G:Fo{: P?pm*p0{mnTo{J迓[%uy ԞBػӲogYC;*+eYԲ͙.~N4tl!=b?^RC{D_X.p6u#y̥YEȈBPiŵMyO}˦w2_)/ZVɑ _lVoS'+5?nIAS<Dpspp-1.0.1/tests/language/0000755000175000017500000000000013150620333012415 500000000000000pspp-1.0.1/tests/language/stats/0000755000175000017500000000000013150620333013553 500000000000000pspp-1.0.1/tests/language/stats/t-test.at0000644000175000017500000004630713137223525015262 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([T-TEST]) AT_SETUP([T-TEST /PAIRS]) AT_DATA([t-test.sps], [dnl data list list /ID * A * B *. begin data. 1 2.0 3.0 2 1.0 2.0 3 2.0 4.5 4 2.0 4.5 5 3.0 6.0 end data. t-test /PAIRS a with b (PAIRED). ]) AT_CHECK([pspp -O format=csv t-test.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format ID,F8.0 A,F8.0 B,F8.0 Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,A,2.00,5,.71,.32 ,B,4.00,5,1.54,.69 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,A & B,5,.92,.028 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.009 ]) AT_CLEANUP AT_SETUP([T-TEST /PAIRS with per-analysis missing values]) AT_DATA([ref.sps], [dnl data list list /id * a * b * c * d *. begin data. 1 2.0 3.0 4.0 4.0 2 1.0 2.0 5.1 3.9 3 2.0 4.5 5.2 3.8 4 2.0 4.5 5.3 3.7 56 3.0 6.0 5.9 3.6 end data. t-test /PAIRS a c with b d (PAIRED). ]) AT_DATA([expout], [dnl Table: Reading free-form data from INLINE. Variable,Format id,F8.0 a,F8.0 b,F8.0 c,F8.0 d,F8.0 Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,a,2.00,5,.71,.32 ,b,4.00,5,1.54,.69 Pair 2,c,5.10,5,.69,.31 ,d,3.80,5,.16,.07 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,a & b,5,.92,.028 Pair 2,c & d,5,-.92,.028 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,a - b,-2.00,.94,.42,-3.16,-.84,-4.78,4,.009 Pair 2,c - d,1.30,.84,.37,.26,2.34,3.47,4,.025 ]) AT_CHECK([pspp -o ref.csv ref.sps]) AT_CHECK([cat ref.csv], [0], [expout]) AT_DATA([missing.sps], [dnl data list list /id * a * b * c * d *. begin data. 1 2.0 3.0 4.0 4.0 2 1.0 2.0 5.1 3.9 3 2.0 4.5 5.2 3.8 4 2.0 4.5 5.3 3.7 5 3.0 6.0 5.9 . 6 3.0 . 5.9 3.6 end data. t-test /MISSING=analysis /PAIRS a c with b d (PAIRED) /CRITERIA=CI(0.95). ]) AT_CHECK([pspp -o missing.csv missing.sps]) AT_CHECK([cat missing.csv], [0], [expout]) AT_CLEANUP AT_SETUP([T-TEST /PAIRS with listwise missing values]) AT_DATA([ref.sps], [dnl data list list /id * a * b * c * d *. begin data. 1 2.0 3.0 4.0 4.0 2 1.0 2.0 5.1 3.9 3 2.0 4.5 5.2 3.8 4 2.0 4.5 5.3 3.7 5 3.0 6.0 5.9 3.6 end data. t-test /PAIRS a b with c d (PAIRED). ]) AT_DATA([expout], [dnl Table: Reading free-form data from INLINE. Variable,Format id,F8.0 a,F8.0 b,F8.0 c,F8.0 d,F8.0 Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,a,2.00,5,.71,.32 ,c,5.10,5,.69,.31 Pair 2,b,4.00,5,1.54,.69 ,d,3.80,5,.16,.07 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,a & c,5,.41,.493 Pair 2,b & d,5,-.87,.054 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,a - c,-3.10,.76,.34,-4.04,-2.16,-9.14,4,.001 Pair 2,b - d,.20,1.68,.75,-1.89,2.29,.27,4,.803 ]) AT_CHECK([pspp -o ref.csv ref.sps]) AT_CHECK([cat ref.csv], [0], [expout]) AT_DATA([missing.sps], [dnl data list list /id * a * b * c * d *. begin data. 1 2.0 3.0 4.0 4.0 2 1.0 2.0 5.1 3.9 3 2.0 4.5 5.2 3.8 4 2.0 4.5 5.3 3.7 5 3.0 6.0 5.9 3.6 6 3.0 6.0 5.9 . end data. t-test /MISSING=listwise /PAIRS a b with c d (PAIRED). ]) AT_CHECK([pspp -o missing.csv missing.sps]) AT_CHECK([cat missing.csv], [0], [expout]) AT_CLEANUP dnl Tests for a bug in the paired samples T test when weighted dnl Thanks to Douglas Bonett for reporting this. AT_SETUP([T-TEST weighted paired bug]) AT_DATA([t-test.sps], [dnl DATA LIST notable LIST /x y w *. BEGIN DATA. 1 1 255 1 2 43 1 3 216 2 1 3 2 2 1 2 3 12 END DATA. WEIGHT BY w. T-TEST PAIRS = y WITH x (PAIRED) /MISSING=ANALYSIS /CRITERIA=CI(0.95). ]) AT_CHECK([pspp -O format=csv t-test.sps], [0], [dnl Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,y,1.94,530.00,.96,.04 ,x,1.03,530.00,.17,.01 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,y & x,530.00,.11,.008 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,y - x,.91,.95,.04,.83,.99,22.07,529.00,.000 ]) AT_CLEANUP dnl Tests for a bug in the paired samples T test. dnl Thanks to Mike Griffiths for reporting this problem. AT_SETUP([T-TEST /PAIRS bug]) AT_DATA([t-test.sps], [dnl set format f8.3. data list list /A * B *. begin data. 11 2 1 1 1 1 end data. t-test pairs = a with b (paired). ]) AT_CHECK([pspp -o pspp.csv t-test.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format A,F8.0 B,F8.0 Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,A,4.333,3,5.774,3.333 ,B,1.333,3,.577,.333 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,A & B,3,1.000,.000 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,A - B,3.000,5.196,3.000,-9.908,15.908,1.000,2,.423 ]) AT_CLEANUP AT_SETUP([T-TEST /GROUPS]) AT_DATA([t-test.sps], [dnl data list list /ID * INDEP * DEP1 * DEP2 *. begin data. 1 1.1 1 3 2 1.1 2 4 3 1.1 2 4 4 1.1 2 4 5 1.1 3 5 6 2.1 3 1 7 2.1 4 2 8 2.1 4 2 9 2.1 4 2 10 2.1 5 3 11 3.1 2 2 end data. * Note that the last case should be IGNORED since it doesn't have a dependent variable of either 1.1 or 2.1. t-test /GROUPS=indep(1.1,2.1) /var=dep1 dep2. ]) AT_CHECK([pspp -O format=csv t-test.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format ID,F8.0 INDEP,F8.0 DEP1,F8.0 DEP2,F8.0 Table: Group Statistics ,INDEP,N,Mean,Std. Deviation,S.E. Mean DEP1,1.10,5,2.00,.71,.32 ,2.10,5,4.00,.71,.32 DEP2,1.10,5,4.00,.71,.32 ,2.10,5,2.00,.71,.32 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper DEP1,Equal variances assumed,.00,1.000,-4.47,8.00,.002,-2.00,.45,-3.03,-.97 ,Equal variances not assumed,,,-4.47,8.00,.002,-2.00,.45,-3.03,-.97 DEP2,Equal variances assumed,.00,1.000,4.47,8.00,.002,2.00,.45,.97,3.03 ,Equal variances not assumed,,,4.47,8.00,.002,2.00,.45,.97,3.03 ]) AT_CLEANUP AT_SETUP([T-TEST /GROUPS with one value for independent variable]) AT_DATA([t-test.sps], [dnl data list list /INDEP * DEP *. begin data. 1 6 1 6 1 7 1 6 1 13 1 4 1 7 1 9 1 7 1 12 1 11 2 11 2 9 2 8 2 4 2 16 2 9 2 9 2 5 2 4 2 10 2 14 end data. t-test /groups=indep(1.514) /var=dep. ]) AT_CHECK([pspp -O format=csv t-test.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format INDEP,F8.0 DEP,F8.0 Table: Group Statistics ,INDEP,N,Mean,Std. Deviation,S.E. Mean DEP,≥ 1.51,11,9.00,3.82,1.15 ,< 1.51,11,8.00,2.86,.86 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper DEP,Equal variances assumed,.17,.683,.69,20.00,.495,1.00,1.44,-2.00,4.00 ,Equal variances not assumed,,,.69,18.54,.496,1.00,1.44,-2.02,4.02 ]) AT_CLEANUP AT_SETUP([T-TEST /GROUPS with per-analysis missing values]) AT_DATA([ref.sps], [dnl data list list /id * indep * dep1 * dep2 *. begin data. 1 1.0 3.5 6 2 1.0 2.0 5 3 1.0 2.0 4 4 2.0 3.5 3 56 2.0 3.0 1 end data. t-test /group=indep /var=dep1, dep2. ]) AT_DATA([expout], [dnl Table: Reading free-form data from INLINE. Variable,Format id,F8.0 indep,F8.0 dep1,F8.0 dep2,F8.0 Table: Group Statistics ,indep,N,Mean,Std. Deviation,S.E. Mean dep1,1.00,3,2.50,.87,.50 ,2.00,2,3.25,.35,.25 dep2,1.00,3,5.00,1.00,.58 ,2.00,2,2.00,1.41,1.00 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper dep1,Equal variances assumed,3.75,.148,-1.12,3.00,.346,-.75,.67,-2.89,1.39 ,Equal variances not assumed,,,-1.34,2.78,.279,-.75,.56,-2.61,1.11 dep2,Equal variances assumed,.60,.495,2.85,3.00,.065,3.00,1.05,-.35,6.35 ,Equal variances not assumed,,,2.60,1.68,.144,3.00,1.15,-2.98,8.98 ]) AT_CHECK([pspp -o ref.csv ref.sps]) AT_CHECK([cat ref.csv], [0], [expout]) AT_DATA([missing.sps], [dnl data list list /id * indep * dep1 * dep2. begin data. 1 1.0 3.5 6 2 1.0 2.0 5 3 1.0 2.0 4 4 2.0 3.5 3 5 2.0 3.0 . 6 2.0 . 1 7 . 3.1 5 end data. * Note that if the independent variable is missing, then it's implicitly * listwise missing. t-test /missing=analysis /group=indep /var=dep1 dep2. ]) AT_CHECK([pspp -o missing.csv missing.sps]) AT_CHECK([cat missing.csv], [0], [expout]) AT_CLEANUP AT_SETUP([T-TEST /GROUPS with listwise missing values]) AT_DATA([ref.sps], [dnl data list list /id * indep * dep1 * dep2. begin data. 1 1.0 3.5 6 2 1.0 2.0 5 3 1.0 2.0 4 4 2.0 3.5 3 5 2.0 3.0 2 6 2.0 4.0 1 end data. t-test /group=indep /var=dep1 dep2. ]) AT_DATA([expout], [dnl Table: Reading free-form data from INLINE. Variable,Format id,F8.0 indep,F8.0 dep1,F8.0 dep2,F8.0 Table: Group Statistics ,indep,N,Mean,Std. Deviation,S.E. Mean dep1,1.00,3,2.50,.87,.50 ,2.00,3,3.50,.50,.29 dep2,1.00,3,5.00,1.00,.58 ,2.00,3,2.00,1.00,.58 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper dep1,Equal variances assumed,2.00,.230,-1.73,4.00,.158,-1.00,.58,-2.60,.60 ,Equal variances not assumed,,,-1.73,3.20,.176,-1.00,.58,-2.77,.77 dep2,Equal variances assumed,.00,1.000,3.67,4.00,.021,3.00,.82,.73,5.27 ,Equal variances not assumed,,,3.67,4.00,.021,3.00,.82,.73,5.27 ]) AT_CHECK([pspp -o ref.csv ref.sps]) AT_CHECK([cat ref.csv], [0], [expout]) AT_DATA([missing.sps], [dnl data list list /id * indep * dep1 * dep2 *. begin data. 1 1.0 3.5 6 2 1.0 2.0 5 3 1.0 2.0 4 4 2.0 3.5 3 5 2.0 3.0 2 6 2.0 4.0 1 7 2.0 . 0 end data. t-test /missing=listwise,exclude /group=indep /var=dep1, dep2. ]) AT_CHECK([pspp -o missing.csv missing.sps]) AT_CHECK([cat missing.csv], [0], [expout]) AT_CLEANUP AT_SETUP([T-TEST /TESTVAL]) AT_DATA([t-test.sps], [dnl data list list /ID * ABC *. begin data. 1 3.5 2 2.0 3 2.0 4 3.5 5 3.0 6 4.0 end data. t-test /testval=2.0 /var=abc. ]) AT_CHECK([pspp -O format=csv t-test.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format ID,F8.0 ABC,F8.0 Table: One-Sample Statistics ,N,Mean,Std. Deviation,S.E. Mean ABC,6,3.00,.84,.34 Table: One-Sample Test ,Test Value = 2.000000,,,,, ,,,,,95% Confidence Interval of the Difference, ,t,df,Sig. (2-tailed),Mean Difference,Lower,Upper ABC,2.93,5,.033,1.00,.12,1.88 ]) AT_CLEANUP AT_SETUP([T-TEST /TESTVAL with per-analysis missing values]) AT_DATA([ref.sps], [dnl data list list /id * x1 * x2. begin data. 1 3.5 34 2 2.0 10 3 2.0 23 4 3.5 98 5 3.0 23 67 4.0 8 end data. t-test /testval=3.0 /var=x1 x2. ]) AT_DATA([expout], [dnl Table: Reading free-form data from INLINE. Variable,Format id,F8.0 x1,F8.0 x2,F8.0 Table: One-Sample Statistics ,N,Mean,Std. Deviation,S.E. Mean x1,6,3.00,.84,.34 x2,6,32.67,33.40,13.64 Table: One-Sample Test ,Test Value = 3.000000,,,,, ,,,,,95% Confidence Interval of the Difference, ,t,df,Sig. (2-tailed),Mean Difference,Lower,Upper x1,.00,5,1.000,.00,-.88,.88 x2,2.18,5,.082,29.67,-5.39,64.72 ]) AT_CHECK([pspp -o ref.csv ref.sps]) AT_CHECK([cat ref.csv], [0], [expout]) AT_DATA([missing.sps], [dnl data list list /id * x1 * x2. begin data. 1 3.5 34 2 2.0 10 3 2.0 23 4 3.5 98 5 3.0 23 6 4.0 . 7 . 8 end data. t-test /missing=analysis /testval=3.0 /var=x1 x2. ]) AT_CHECK([pspp -o missing.csv missing.sps]) AT_CHECK([cat missing.csv], [0], [expout]) AT_CLEANUP AT_SETUP([T-TEST /TESTVAL with listwise missing values]) AT_DATA([ref.sps], [dnl data list list /id * x1 * x2. begin data. 1 3.5 34 2 2.0 10 3 2.0 23 4 3.5 98 5 3.0 23 end data. t-test /testval=3.0 /var=x1 x2. ]) AT_DATA([expout], [dnl Table: Reading free-form data from INLINE. Variable,Format id,F8.0 x1,F8.0 x2,F8.0 Table: One-Sample Statistics ,N,Mean,Std. Deviation,S.E. Mean x1,5,2.80,.76,.34 x2,5,37.60,34.82,15.57 Table: One-Sample Test ,Test Value = 3.000000,,,,, ,,,,,95% Confidence Interval of the Difference, ,t,df,Sig. (2-tailed),Mean Difference,Lower,Upper x1,-.59,4,.587,-.20,-1.14,.74 x2,2.22,4,.090,34.60,-8.63,77.83 ]) AT_CHECK([pspp -o ref.csv ref.sps]) AT_CHECK([cat ref.csv], [0], [expout]) AT_DATA([missing.sps], [dnl data list list /id * x1 * x2. begin data. 1 3.5 34 2 2.0 10 3 2.0 23 4 3.5 98 5 3.0 23 6 4.0 99 end data. MISSING VALUES x2(99). t-test /missing=listwise /testval=3.0 /var=x1 x2. ]) AT_CHECK([pspp -o missing.csv missing.sps]) AT_CHECK([cat missing.csv], [0], [expout]) AT_CLEANUP AT_SETUP([T-TEST wih TEMPORARY transformation]) AT_DATA([ref.sps], [dnl data list list /ind * x * . begin data. 1 3.5 1 2.0 1 2.0 2 3.5 2 3.0 2 4.0 end data. t-test /groups=ind(1,2) /var x. ]) AT_DATA([expout], [dnl Table: Reading free-form data from INLINE. Variable,Format ind,F8.0 x,F8.0 Table: Group Statistics ,ind,N,Mean,Std. Deviation,S.E. Mean x,1.00,3,2.50,.87,.50 ,2.00,3,3.50,.50,.29 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper x,Equal variances assumed,2.00,.230,-1.73,4.00,.158,-1.00,.58,-2.60,.60 ,Equal variances not assumed,,,-1.73,3.20,.176,-1.00,.58,-2.77,.77 ]) AT_CHECK([pspp -o ref.csv ref.sps]) AT_CHECK([cat ref.csv], [0], [expout]) AT_DATA([temporary.sps], [dnl data list list /ind * x * . begin data. 1 3.5 1 2.0 1 2.0 2 3.5 2 3.0 2 4.0 2 9.0 end data. TEMPORARY. SELECT IF x < 7. t-test /groups=ind(1 2) /var x. ]) AT_CHECK([pspp -o temporary.csv temporary.sps]) AT_CHECK([cat temporary.csv], [0], [expout]) AT_CLEANUP dnl Tests for a bug which caused T-TEST to crash when given invalid syntax. AT_SETUP([T-TEST invalid syntax]) AT_DATA([t-test.sps], [dnl DATA LIST LIST NOTABLE /id * a * . BEGIN DATA. 1 3.5 2 2.0 3 2.0 4 3.5 5 3.0 6 4.0 END DATA. T-TEST /testval=2.0 . T-TEST /groups=id(3) . ]) AT_CHECK([pspp -O format=csv t-test.sps], [1], [dnl t-test.sps:11: error: T-TEST: Required subcommand VARIABLES was not specified. t-test.sps:12: error: T-TEST: Required subcommand VARIABLES was not specified. ]) AT_CLEANUP dnl Tests for bug #11227, exhibited when the independent variable is a string. AT_SETUP([T-TEST string variable]) AT_DATA([t-test.sps], [dnl data list list /ID * INDEP (a1) DEP1 * DEP2 *. begin data. 1 'a' 1 3 2 'a' 2 4 3 'a' 2 4 4 'a' 2 4 5 'a' 3 5 6 'b' 3 1 7 'b' 4 2 8 'b' 4 2 9 'b' 4 2 10 'b' 5 3 11 'c' 2 2 end data. t-test /GROUPS=indep('a','b') /var=dep1 dep2. ]) AT_CHECK([pspp -O format=csv t-test.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format ID,F8.0 INDEP,A1 DEP1,F8.0 DEP2,F8.0 Table: Group Statistics ,INDEP,N,Mean,Std. Deviation,S.E. Mean DEP1,a,5,2.00,.71,.32 ,b,5,4.00,.71,.32 DEP2,a,5,4.00,.71,.32 ,b,5,2.00,.71,.32 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper DEP1,Equal variances assumed,.00,1.000,-4.47,8.00,.002,-2.00,.45,-3.03,-.97 ,Equal variances not assumed,,,-4.47,8.00,.002,-2.00,.45,-3.03,-.97 DEP2,Equal variances assumed,.00,1.000,4.47,8.00,.002,2.00,.45,.97,3.03 ,Equal variances not assumed,,,4.47,8.00,.002,2.00,.45,.97,3.03 ]) AT_CLEANUP AT_SETUP([T-TEST string variable, only one value]) AT_DATA([t-test.sps], [dnl data list list notable /id * indep (a1) dep1 * dep2 *. begin data. 1 'a' 1 3 2 'a' 2 4 3 'a' 2 4 4 'a' 2 4 5 'a' 3 5 6 'b' 3 1 7 'b' 4 2 8 'b' 4 2 9 'b' 4 2 10 'b' 5 3 11 'c' 2 2 end data. t-test /GROUPS=indep('a') /var=dep1 dep2. ]) AT_CHECK([pspp -O format=csv t-test.sps], [1], [dnl "t-test.sps:17: error: T-TEST: When applying GROUPS to a string variable, two values must be specified." ]) AT_CLEANUP dnl Tests for a bug which didn't properly compare string values. AT_SETUP([T-TEST string variable comparison bug]) AT_DATA([t-test.sps], [dnl data list list /x * gv (a8). begin data. 3 One 2 One 3 One 2 One 3 One 4 Two 3.5 Two 3.0 Two end data. t-test group=gv('One', 'Two') /variables = x. ]) AT_CHECK([pspp -O format=csv t-test.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format x,F8.0 gv,A8 Table: Group Statistics ,gv,N,Mean,Std. Deviation,S.E. Mean x,One ,5,2.60,.55,.24 ,Two ,3,3.50,.50,.29 Table: Independent Samples Test ,,Levene's Test for Equality of Variances,,t-test for Equality of Means,,,,,, ,,,,,,,,,95% Confidence Interval of the Difference, ,,F,Sig.,t,df,Sig. (2-tailed),Mean Difference,Std. Error Difference,Lower,Upper x,Equal variances assumed,1.13,.329,-2.32,6.00,.060,-.90,.39,-1.85,.05 ,Equal variances not assumed,,,-2.38,4.70,.067,-.90,.38,-1.89,.09 ]) AT_CLEANUP dnl Tests for a bug assert failed when the group variables were not of either class AT_SETUP([T-TEST wrong group]) AT_DATA([t-test-crs.sps], [dnl data list list /x * g *. begin data. 1 2 2 2 3 2 4 2 5 2 end data. t-test /variables = x group=g(1,3). ]) AT_CHECK([pspp t-test-crs.sps], [0],[ignore], [ignore]) AT_CLEANUP dnl Tests for a bug assert failed when a non-number was passes as the p value AT_SETUP([T-TEST non number p value]) AT_DATA([t.sps], [dnl data list list /age d_frage_1 weight height *. begin data. 1 2 3 1 4 5 6 2 end data. T-TEST /VARIABLES=age weight height /GROUPS=d_frage_1(1,0) /MISSING=ANALYSIS /CRITERIA=CIN(p.95). ]) AT_CHECK([pspp t.sps], [1],[ignore], [ignore]) AT_CLEANUP dnl Another crash on invalid input AT_SETUP([T-TEST unterminated string - paired]) AT_DATA([t.sps], [dnl data list list /id * a * b * c * d *. begin data. 5 2.0 3.0 4.0 4.0 3 1.0 2.0 5.1 3.9 3 2.0 4.5 5.2(3.8 4 2.0 4.5 5n3 3.7 5 3.0 6.0 5.9 3.6 6 3.4 6.0 5.9 . end data. t-test /MISSING=listwise /PAIRS a"b with c d (PA RED). ]) AT_CHECK([pspp t.sps],[1],[ignore],[ignore]) AT_CLEANUP pspp-1.0.1/tests/language/stats/examine.at0000644000175000017500000004725013137223525015466 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([EXAMINE]) AT_SETUP([EXAMINE]) AT_DATA([examine.sps], [ DATA LIST LIST /QUALITY * W * BRAND * . BEGIN DATA 3 1 1 2 2 1 1 2 1 1 1 1 4 1 1 4 1 1 5 1 2 2 1 2 4 4 2 2 1 2 3 1 2 7 1 3 4 2 3 5 3 3 3 1 3 6 1 3 END DATA WEIGHT BY w. VARIABLE LABELS brand 'Manufacturer'. VARIABLE LABELS quality 'Breaking Strain'. VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'. LIST /FORMAT=NUMBERED. EXAMINE quality BY brand /STATISTICS descriptives extreme(3) . ]) dnl In the following data, only the extreme values have been checked. dnl The descriptives have been blindly pasted. AT_CHECK([pspp -O format=csv examine.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format QUALITY,F8.0 W,F8.0 BRAND,F8.0 Table: Data List Case Number,QUALITY,W,BRAND 1,3.00,1.00,1.00 2,2.00,2.00,1.00 3,1.00,2.00,1.00 4,1.00,1.00,1.00 5,4.00,1.00,1.00 6,4.00,1.00,1.00 7,5.00,1.00,2.00 8,2.00,1.00,2.00 9,4.00,4.00,2.00 10,2.00,1.00,2.00 11,3.00,1.00,2.00 12,7.00,1.00,3.00 13,4.00,2.00,3.00 14,5.00,3.00,3.00 15,3.00,1.00,3.00 16,6.00,1.00,3.00 Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent Breaking Strain,24.00,100%,.00,0%,24.00,100% Table: Extreme Values ,,,Case Number,Value Breaking Strain,Highest,1,12,7.00 ,,2,16,6.00 ,,3,14,5.00 ,Lowest,1,3,1.00 ,,2,4,1.00 ,,3,2,2.00 Table: Descriptives ,,,Statistic,Std. Error Breaking Strain,Mean,,3.54,.32 ,95% Confidence Interval for Mean,Lower Bound,2.87, ,,Upper Bound,4.21, ,5% Trimmed Mean,,3.50, ,Median,,4.00, ,Variance,,2.52, ,Std. Deviation,,1.59, ,Minimum,,1.00, ,Maximum,,7.00, ,Range,,6.00, ,Interquartile Range,,2.75, ,Skewness,,.06,.47 ,Kurtosis,,-.36,.92 Table: Case Processing Summary ,,Cases,,,,, ,,Valid,,Missing,,Total, ,Manufacturer,N,Percent,N,Percent,N,Percent Breaking Strain,Aspeger,8.00,100%,.00,0%,8.00,100% ,Bloggs,8.00,100%,.00,0%,8.00,100% ,Charlies,8.00,100%,.00,0%,8.00,100% Table: Extreme Values ,Manufacturer,,,Case Number,Value Breaking Strain,Aspeger,Highest,1,6,4.00 ,,,2,5,4.00 ,,,3,1,3.00 ,,Lowest,1,3,1.00 ,,,2,4,1.00 ,,,3,2,2.00 ,Bloggs,Highest,1,7,5.00 ,,,2,9,4.00 ,,,3,11,3.00 ,,Lowest,1,8,2.00 ,,,2,10,2.00 ,,,3,11,3.00 ,Charlies,Highest,1,12,7.00 ,,,2,16,6.00 ,,,3,14,5.00 ,,Lowest,1,15,3.00 ,,,2,13,4.00 ,,,3,14,5.00 Table: Descriptives ,Manufacturer,,,Statistic,Std. Error Breaking Strain,Aspeger,Mean,,2.25,.45 ,,95% Confidence Interval for Mean,Lower Bound,1.18, ,,,Upper Bound,3.32, ,,5% Trimmed Mean,,2.22, ,,Median,,2.00, ,,Variance,,1.64, ,,Std. Deviation,,1.28, ,,Minimum,,1.00, ,,Maximum,,4.00, ,,Range,,3.00, ,,Interquartile Range,,2.75, ,,Skewness,,.47,.75 ,,Kurtosis,,-1.55,1.48 ,Bloggs,Mean,,3.50,.38 ,,95% Confidence Interval for Mean,Lower Bound,2.61, ,,,Upper Bound,4.39, ,,5% Trimmed Mean,,3.50, ,,Median,,4.00, ,,Variance,,1.14, ,,Std. Deviation,,1.07, ,,Minimum,,2.00, ,,Maximum,,5.00, ,,Range,,3.00, ,,Interquartile Range,,1.75, ,,Skewness,,-.47,.75 ,,Kurtosis,,-.83,1.48 ,Charlies,Mean,,4.88,.44 ,,95% Confidence Interval for Mean,Lower Bound,3.83, ,,,Upper Bound,5.92, ,,5% Trimmed Mean,,4.86, ,,Median,,5.00, ,,Variance,,1.55, ,,Std. Deviation,,1.25, ,,Minimum,,3.00, ,,Maximum,,7.00, ,,Range,,4.00, ,,Interquartile Range,,1.75, ,,Skewness,,.30,.75 ,,Kurtosis,,.15,1.48 ]) AT_CLEANUP AT_SETUP([EXAMINE -- extremes]) AT_DATA([examine.sps], [dnl data list free /V1 W begin data. 1 1 2 1 3 2 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 2 19 1 20 1 end data. weight by w. examine v1 /statistics=extreme(6) . ]) AT_CHECK([pspp -O format=csv examine.sps], [0],[dnl Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent V1,23.00,100%,.00,0%,23.00,100% Table: Extreme Values ,,,Case Number,Value V1,Highest,1,21,20.00 ,,2,20,19.00 ,,3,19,18.00 ,,4,18,17.00 ,,5,17,16.00 ,,6,16,15.00 ,Lowest,1,1,1.00 ,,2,2,2.00 ,,3,3,3.00 ,,4,4,3.00 ,,5,5,4.00 ,,6,6,5.00 ]) AT_CLEANUP AT_SETUP([EXAMINE -- extremes with fractional weights]) AT_DATA([extreme.sps], [dnl set format=F20.3. data list notable list /w * x *. begin data. 0.88 300000 0.86 320000 0.98 480000 0.93 960000 1.35 960000 1.31 960000 0.88 960000 0.88 1080000 0.88 1080000 0.95 1200000 1.47 1200000 0.93 1200000 0.98 1320000 1.31 1380000 0.93 1440000 0.88 1560000 1.56 1560000 1.47 1560000 end data. weight by w. EXAMINE x /STATISTICS = DESCRIPTIVES EXTREME (5) . ]) AT_CHECK([pspp -O format=csv extreme.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x,19.430,100%,.000,0%,19.430,100% Table: Extreme Values ,,,Case Number,Value x,Highest,1,18,1560000.000 ,,2,17,1560000.000 ,,3,16,1560000.000 ,,4,15,1440000.000 ,,5,14,1380000.000 ,Lowest,1,1,300000.000 ,,2,2,320000.000 ,,3,3,480000.000 ,,4,4,960000.000 ,,5,5,960000.000 Table: Descriptives ,,,Statistic,Std. Error x,Mean,,1120010.293,86222.178 ,95% Confidence Interval for Mean,Lower Bound,939166.693, ,,Upper Bound,1300853.894, ,5% Trimmed Mean,,1141017.899, ,Median,,1200000.000, ,Variance,,144447748124.869, ,Std. Deviation,,380062.821, ,Minimum,,300000.000, ,Maximum,,1560000.000, ,Range,,1260000.000, ,Interquartile Range,,467258.065, ,Skewness,,-.887,.519 ,Kurtosis,,.340,1.005 ]) AT_CLEANUP dnl Test the PERCENTILES subcommand of the EXAMINE command. dnl In particular test that it behaves properly when there are only dnl a few cases. AT_SETUP([EXAMINE -- percentiles]) AT_DATA([examine.sps], [dnl DATA LIST LIST /X *. BEGIN DATA. 2.00 8.00 5.00 END DATA. EXAMINE /x /PERCENTILES=HAVERAGE. EXAMINE /x /PERCENTILES=WAVERAGE. EXAMINE /x /PERCENTILES=ROUND. EXAMINE /x /PERCENTILES=EMPIRICAL. EXAMINE /x /PERCENTILES=AEMPIRICAL. ]) AT_CHECK([pspp -o pspp.csv examine.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format X,F8.0 Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,3,100%,0,0%,3,100% Table: Percentiles ,,Percentiles,,,,,, ,,5,10,25,50,75,90,95 X,HAverage,.40,.80,2.00,5.00,8.00,8.00,8.00 ,Tukey's Hinges,,,3.50,5.00,6.50,, Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,3,100%,0,0%,3,100% Table: Percentiles ,,Percentiles,,,,,, ,,5,10,25,50,75,90,95 X,Weighted Average,.30,.60,1.50,3.50,5.75,7.10,7.55 ,Tukey's Hinges,,,3.50,5.00,6.50,, Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,3,100%,0,0%,3,100% Table: Percentiles ,,Percentiles,,,,,, ,,5,10,25,50,75,90,95 X,Rounded,.00,.00,2.00,5.00,5.00,8.00,8.00 ,Tukey's Hinges,,,3.50,5.00,6.50,, Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,3,100%,0,0%,3,100% Table: Percentiles ,,Percentiles,,,,,, ,,5,10,25,50,75,90,95 X,Empirical,2.00,2.00,2.00,5.00,8.00,8.00,8.00 ,Tukey's Hinges,,,3.50,5.00,6.50,, Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,3,100%,0,0%,3,100% Table: Percentiles ,,Percentiles,,,,,, ,,5,10,25,50,75,90,95 X,Empirical with averaging,2.00,2.00,2.00,5.00,8.00,8.00,8.00 ,Tukey's Hinges,,,3.50,5.00,6.50,, ]) AT_CLEANUP AT_SETUP([EXAMINE -- missing values]) AT_DATA([examine.sps], [dnl DATA LIST LIST /x * y *. BEGIN DATA. 1 1 2 1 3 1 4 1 5 2 6 2 . 2 END DATA EXAMINE /x by y /MISSING = PAIRWISE . ]) AT_CHECK([pspp -o pspp.csv examine.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,F8.0 Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x,6,85.7143%,1,14.2857%,7,100% Table: Case Processing Summary ,,Cases,,,,, ,,Valid,,Missing,,Total, ,y,N,Percent,N,Percent,N,Percent x,1.00,4,100%,0,0%,4,100% ,2.00,2,66.6667%,1,33.3333%,3,100% ]) AT_CLEANUP AT_SETUP([EXAMINE -- user missing values]) AT_DATA([examine-m.sps], [dnl DATA LIST notable LIST /x * y *. BEGIN DATA. 1 2 9999999999 2 9999999999 99 END DATA. MISSING VALUES x (9999999999). MISSING VALUES y (99). EXAMINE /VARIABLES= x y /MISSING=PAIRWISE. ]) AT_CHECK([pspp -O format=csv examine-m.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x,1,33.3333%,2,66.6667%,3,100% y,2,66.6667%,1,33.3333%,3,100% ]) AT_CLEANUP AT_SETUP([EXAMINE -- missing values and percentiles]) AT_DATA([examine.sps], [dnl DATA LIST LIST /X *. BEGIN DATA. 99 99 5.00 END DATA. MISSING VALUE X (99). EXAMINE /x /PERCENTILES=HAVERAGE. ]) AT_CHECK([pspp -o pspp.csv examine.sps]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP dnl Tests the trimmed mean calculation in the case dnl where the data is weighted towards the centre. AT_SETUP([EXAMINE -- trimmed mean]) AT_DATA([examine.sps], [dnl DATA LIST LIST /X * C *. BEGIN DATA. 1 1 2 49 3 2 END DATA. WEIGHT BY c. EXAMINE x /STATISTICS=DESCRIPTIVES . ]) AT_CHECK([pspp -o pspp.csv examine.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format X,F8.0 C,F8.0 Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,52.00,100%,.00,0%,52.00,100% Table: Descriptives ,,,Statistic,Std. Error X,Mean,,2.02,.03 ,95% Confidence Interval for Mean,Lower Bound,1.95, ,,Upper Bound,2.09, ,5% Trimmed Mean,,2.00, ,Median,,2.00, ,Variance,,.06, ,Std. Deviation,,.24, ,Minimum,,1.00, ,Maximum,,3.00, ,Range,,2.00, ,Interquartile Range,,.00, ,Skewness,,1.19,.33 ,Kurtosis,,15.73,.65 ]) AT_CLEANUP AT_SETUP([EXAMINE -- crash bug]) AT_DATA([examine.sps], [dnl data list list /a * x * y *. begin data. 3 1 3 5 1 4 7 2 3 end data. examine a by x by y /statistics=DESCRIPTIVES . ]) AT_CHECK([pspp -o pspp.csv examine.sps]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP dnl Test that two consecutive EXAMINE commands don't crash PSPP. AT_SETUP([EXAMINE -- consecutive runs don't crash]) AT_DATA([examine.sps], [dnl data list list /y * z *. begin data. 6 4 5 3 7 6 end data. EXAMINE /VARIABLES= z BY y. EXAMINE /VARIABLES= z. ]) AT_CHECK([pspp -o pspp.csv examine.sps]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP dnl Test that /DESCRIPTIVES does not crash in presence of missing values. AT_SETUP([EXAMINE -- missing values don't crash]) AT_DATA([examine.sps], [dnl data list list /x * y *. begin data. 1 0 2 0 . 0 3 1 4 1 end data. examine x by y /statistics=descriptives. ]) AT_CHECK([pspp -o pspp.csv examine.sps]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP dnl Test that having only a single case doesn't crash. AT_SETUP([EXAMINE -- single case doesn't crash]) AT_DATA([examine.sps], [dnl DATA LIST LIST /quality * . BEGIN DATA 3 END DATA EXAMINE quality /STATISTICS descriptives /PLOT = histogram . ]) AT_CHECK([pspp -o pspp.csv examine.sps], [0], [ignore]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP dnl Test that all-missing data doesn't crash. AT_SETUP([EXAMINE -- all-missing data doesn't crash]) AT_DATA([examine.sps], [dnl DATA LIST LIST /x *. BEGIN DATA. . . . . END DATA. EXAMINE /x PLOT=HISTOGRAM BOXPLOT NPPLOT SPREADLEVEL(1) ALL /ID=x /STATISTICS = DESCRIPTIVES EXTREME (5) ALL /PERCENTILE=AEMPIRICAL . ]) AT_CHECK([pspp -o pspp.csv examine.sps], [0], [ignore]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP dnl Test that big input doesn't crash (bug 11307). AT_SETUP([EXAMINE -- big input doesn't crash]) AT_DATA([examine.sps], [dnl INPUT PROGRAM. LOOP #I=1 TO 50000. COMPUTE X=NORMAL(10). END CASE. END LOOP. END FILE. END INPUT PROGRAM. EXAMINE /x /STATISTICS=DESCRIPTIVES. ]) AT_CHECK([pspp -o pspp.csv examine.sps]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP dnl Another test that big input doesn't crash. dnl The actual bug that this checks for has been lost. AT_SETUP([EXAMINE -- big input doesn't crash 2]) AT_DATA([make-big-input.pl], [for ($i=0; $i<100000; $i++) { print "AB12\n" }; for ($i=0; $i<100000; $i++) { print "AB04\n" }; ]) AT_CHECK([$PERL make-big-input.pl > large.txt]) AT_DATA([examine.sps], [dnl DATA LIST FILE='large.txt' /S 1-2 (A) X 3 . AGGREGATE OUTFILE=* /BREAK=X /A=N. EXAMINE /A BY X. ]) AT_CHECK([pspp -o pspp.csv examine.sps]) dnl Ignore output -- this is just a no-crash check. AT_DATA([more-big-input.pl], [for ($i=0; $i<25000; $i++) { print "AB04\nAB12\n" }; ]) AT_CHECK([$PERL more-big-input.pl >> large.txt]) AT_CHECK([pspp -o pspp.csv examine.sps]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP dnl Test that the ID command works with non-numberic variables AT_SETUP([EXAMINE -- non-numeric ID]) AT_DATA([examine-id.sps], [dnl data list notable list /x * y (a12). begin data. 1 one 2 two 3 three 4 four 5 five 6 six 7 seven 8 eight 9 nine 10 ten 11 eleven 12 twelve 30 thirty 300 threehundred end data. examine x /statistics = extreme /id = y /plot = boxplot . ]) AT_CHECK([pspp -O format=csv examine-id.sps], [0], [Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x,14,100%,0,0%,14,100% Table: Extreme Values ,,,y,Value x,Highest,1,threehundred,300.00 ,,2,thirty ,30.00 ,,3,twelve ,12.00 ,,4,eleven ,11.00 ,,5,ten ,10.00 ,Lowest,1,one ,1.00 ,,2,two ,2.00 ,,3,three ,3.00 ,,4,four ,4.00 ,,5,five ,5.00 ]) AT_CLEANUP dnl Test for a crash which happened on cleanup from a bad input syntax AT_SETUP([EXAMINE -- Bad Input]) AT_DATA([examine-bad.sps], [dnl data list list /h * g *. begin data. 1 1 2 1 3 1 4 1 5 2 6 2 7 2 8 2 9 2 end data. EXAMINE /VARIABLES= h BY g /STATISTICS = DESCRIPTIVES EXTREME /PLOT = lkajsdas . ]) AT_CHECK([pspp -o pspp.csv examine-bad.sps], [1], [ignore]) AT_CLEANUP dnl Check the MISSING=REPORT option AT_SETUP([EXAMINE -- MISSING=REPORT]) AT_DATA([examine-report.sps], [dnl set format = F22.0. data list list /x * g *. begin data. 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 2 20 2 30 2 40 2 50 2 60 2 70 2 80 2 90 2 101 9 201 9 301 9 401 9 501 99 601 99 701 99 801 99 901 99 1001 . 2002 . 3003 . 4004 . end data. MISSING VALUES g (9, 99, 999). EXAMINE /VARIABLES = x BY g /STATISTICS = EXTREME /NOTOTAL /MISSING = REPORT. ]) AT_CHECK([pspp -O format=csv examine-report.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format x,F8.0 g,F8.0 Table: Case Processing Summary ,,Cases,,,,, ,,Valid,,Missing,,Total, ,g,N,Percent,N,Percent,N,Percent x,. (missing),4,100%,0,0%,4,100% ,1,9,100%,0,0%,9,100% ,2,9,100%,0,0%,9,100% ,9 (missing),4,100%,0,0%,4,100% ,99 (missing),5,100%,0,0%,5,100% Table: Extreme Values ,g,,,Case Number,Value x,. (missing),Highest,1,31,4004 ,,,2,30,3003 ,,,3,29,2002 ,,,4,28,1001 ,,,5,0,0 ,,Lowest,1,28,1001 ,,,2,29,2002 ,,,3,30,3003 ,,,4,31,4004 ,,,5,31,4004 ,1,Highest,1,9,9 ,,,2,8,8 ,,,3,7,7 ,,,4,6,6 ,,,5,5,5 ,,Lowest,1,1,1 ,,,2,2,2 ,,,3,3,3 ,,,4,4,4 ,,,5,5,5 ,2,Highest,1,18,90 ,,,2,17,80 ,,,3,16,70 ,,,4,15,60 ,,,5,14,50 ,,Lowest,1,10,10 ,,,2,11,20 ,,,3,12,30 ,,,4,13,40 ,,,5,14,50 ,9 (missing),Highest,1,22,401 ,,,2,21,301 ,,,3,20,201 ,,,4,19,101 ,,,5,0,0 ,,Lowest,1,19,101 ,,,2,20,201 ,,,3,21,301 ,,,4,22,401 ,,,5,22,401 ,99 (missing),Highest,1,27,901 ,,,2,26,801 ,,,3,25,701 ,,,4,24,601 ,,,5,23,501 ,,Lowest,1,23,501 ,,,2,24,601 ,,,3,25,701 ,,,4,26,801 ,,,5,27,901 ]) AT_CLEANUP dnl Run a test of the basic STATISTICS using a "real" dnl dataset and comparing with "real" results kindly dnl provided by Olaf Nöhring AT_SETUP([EXAMINE -- sample unweighted]) AT_DATA([sample.sps], [dnl set format = F22.4. DATA LIST notable LIST /X * BEGIN DATA. 461.19000000 466.38000000 479.46000000 480.10000000 483.43000000 488.30000000 489.00000000 491.62000000 505.62000000 511.30000000 521.53000000 526.70000000 528.25000000 538.70000000 540.22000000 540.58000000 546.10000000 548.17000000 553.99000000 566.21000000 575.90000000 584.38000000 593.40000000 357.05000000 359.73000000 360.48000000 373.98000000 374.13000000 381.45000000 383.72000000 390.00000000 400.34000000 415.32000000 415.91000000 418.30000000 421.03000000 422.43000000 426.93000000 433.25000000 436.89000000 445.33000000 446.33000000 446.55000000 456.44000000 689.49000000 691.92000000 695.00000000 695.36000000 698.21000000 699.46000000 706.61000000 710.69000000 715.82000000 715.82000000 741.39000000 752.27000000 756.73000000 757.74000000 759.57000000 796.07000000 813.78000000 817.25000000 825.48000000 831.28000000 849.24000000 890.00000000 894.78000000 935.65000000 935.90000000 945.90000000 1012.8600000 1022.6000000 1061.8100000 1063.5000000 1077.2300000 1151.6300000 1355.2800000 598.88000000 606.91000000 621.60000000 624.80000000 636.13000000 637.38000000 640.32000000 649.35000000 656.51000000 662.55000000 664.69000000 106.22000000 132.24000000 174.76000000 204.85000000 264.93000000 264.99000000 269.84000000 325.12000000 331.67000000 337.26000000 347.68000000 354.91000000 END DATA. EXAMINE x /STATISTICS=DESCRIPTIVES . ]) AT_CHECK([pspp -O format=csv sample.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X,100,100%,0,0%,100,100% Table: Descriptives ,,,Statistic,Std. Error X,Mean,,587.6603,23.2665 ,95% Confidence Interval for Mean,Lower Bound,541.4946, ,,Upper Bound,633.8260, ,5% Trimmed Mean,,579.7064, ,Median,,547.1350, ,Variance,,54132.8466, ,Std. Deviation,,232.6647, ,Minimum,,106.2200, ,Maximum,,1355.2800, ,Range,,1249.0600, ,Interquartile Range,,293.1575, ,Skewness,,.6331,.2414 ,Kurtosis,,.5300,.4783 ]) AT_CLEANUP dnl Test for a crash which happened on bad input syntax AT_SETUP([EXAMINE -- Empty Parentheses]) AT_DATA([examine-empty-parens.sps], [dnl DATA LIST notable LIST /X * BEGIN DATA. 2 3 END DATA. EXAMINE x /PLOT = SPREADLEVEL() . ]) AT_CHECK([pspp -o pspp.csv examine-empty-parens.sps], [1], [ignore]) AT_CLEANUP dnl Test for another crash which happened on bad input syntax AT_SETUP([EXAMINE -- Bad variable]) AT_DATA([examine-bad-variable.sps], [dnl data list list /h * g *. begin data. 3 1 4 1 5 2 end data. EXAMINE /VARIABLES/ h BY g . ]) AT_CHECK([pspp -o pspp.csv examine-bad-variable.sps], [1], [ignore]) AT_CLEANUP dnl Test for yet another crash. This time for extremes vs. missing weight values. AT_SETUP([EXAMINE -- Extremes vs. Missing Weights]) AT_DATA([examine-missing-weights.sps], [dnl data list notable list /h * g *. begin data. 3 1 4 . 5 1 2 1 end data. WEIGHT BY g. EXAMINE h /STATISTICS extreme(3) . ]) AT_CHECK([pspp -O format=csv examine-missing-weights.sps], [0], [dnl "examine-missing-weights.sps:13: warning: EXAMINE: At least one case in the data file had a weight value that was user-missing, system-missing, zero, or negative. These case(s) were ignored." Table: Case Processing Summary ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent h,3.00,100%,.00,0%,3.00,100% Table: Extreme Values ,,,Case Number,Value h,Highest,1,3,5.00 ,,2,2,4.00 ,,3,1,3.00 ,Lowest,1,4,2.00 ,,2,1,3.00 ,,3,2,4.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/frequencies.at0000644000175000017500000003420413137223525016344 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([FREQUENCIES procedure]) AT_SETUP([FREQUENCIES string variable]) AT_DATA([frequencies.sps], [DATA LIST FREE/ name (A8) value * quantity . BEGIN DATA. foo 1 5 bar 2 6 baz 1 9 quux 3 1 bar 1 2 baz 4 3 baz 1 4 baz 1 1 foo 6 0 quux 5 8 END DATA. EXECUTE. FREQUENCIES /VAR = name/ORDER=ANALYSIS. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [dnl Table: name Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,bar ,2,20.00,20.00,20.00 ,baz ,4,40.00,40.00,60.00 ,foo ,2,20.00,20.00,80.00 ,quux ,2,20.00,20.00,100.00 Total,,10,100.0,100.0, ]) AT_CLEANUP # Tests for a bug where pspp would crash if two FREQUENCIES commands # existed in a input file. AT_SETUP([FREQUENCIES two runs crash]) AT_DATA([frequencies.sps], [data list free /v1 v2. begin data. 0 1 2 3 4 5 3 4 end data. frequencies v1 v2/statistics=none/ORDER=VARIABLE. frequencies v1 v2/statistics=none. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [Table: v1 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,.00,1,25.00,25.00,25.00 ,2.00,1,25.00,25.00,50.00 ,3.00,1,25.00,25.00,75.00 ,4.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, Table: v2 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,25.00,25.00,25.00 ,3.00,1,25.00,25.00,50.00 ,4.00,1,25.00,25.00,75.00 ,5.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, Table: v1 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,.00,1,25.00,25.00,25.00 ,2.00,1,25.00,25.00,50.00 ,3.00,1,25.00,25.00,75.00 ,4.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, Table: v2 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,25.00,25.00,25.00 ,3.00,1,25.00,25.00,50.00 ,4.00,1,25.00,25.00,75.00 ,5.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, ]) AT_CLEANUP # Test that the LIMIT specification works. AT_SETUP([FREQUENCIES with LIMIT]) AT_DATA([frequencies.sps], [data list free /v1 v2. begin data. 0 1 2 5 4 3 3 5 end data. frequencies v1 v2/statistics=none/FORMAT=LIMIT(3). ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [dnl Table: v2 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,25.00,25.00,25.00 ,3.00,1,25.00,25.00,50.00 ,5.00,2,50.00,50.00,100.00 Total,,4,100.0,100.0, ]) AT_CLEANUP # Tests for a bug where PSPP would crash when a FREQUENCIES command # was used with the HTML output driver. AT_SETUP([FREQUENCIES HTML output crash]) AT_DATA([frequencies.sps], [data list free /v1 v2. begin data. 0 1 2 3 4 5 3 4 end data. list. frequencies v1/statistics=none. ]) AT_CHECK([pspp -o - -O format=csv -o pspp.html frequencies.sps], [0], [Table: Data List v1,v2 .00,1.00 2.00,3.00 4.00,5.00 3.00,4.00 Table: v1 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,.00,1,25.00,25.00,25.00 ,2.00,1,25.00,25.00,50.00 ,3.00,1,25.00,25.00,75.00 ,4.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, ]) AT_CHECK([test -s pspp.html]) AT_CLEANUP # Tests for a bug which crashed PSPP when a piechart with too many # segments was requested. AT_SETUP([FREQUENCIES pie chart crash]) AT_DATA([frequencies.sps], [data list list /x * w *. begin data. 1 4 34 10 -9 15 232 6 11 4 134 1 9 5 32 16 -2 6 2 16 20 6 end data. weight by w. frequencies /x /format=notable /statistics=none /piechart. ]) # Cannot use the CSV driver for this because it does not output charts # at all. AT_CHECK([pspp frequencies.sps], [0], [dnl Reading free-form data from INLINE. +--------+------+ |Variable|Format| #========#======# |x |F8.0 | |w |F8.0 | +--------+------+ ]) AT_CLEANUP dnl Check that histogram subcommand runs wihout crashing AT_SETUP([FREQUENCIES histogram crash]) AT_DATA([frequencies.sps], [data list notable list /x * w *. begin data. 1 4 34 10 -9 15 232 6 11 4 134 1 9 5 32 16 -2 6 2 16 20 6 end data. weight by w. frequencies /x /format=notable /statistics=none /histogram=minimum(0) maximum(50) percent(5) normal. ]) # Cannot use the CSV driver for this because it does not output charts # at all. AT_CHECK([pspp -O format=pdf frequencies.sps], [0], [ignore]) AT_CLEANUP # Tests for a bug which crashed PSPP when the median and a histogram # were both requested. AT_SETUP([FREQUENCIES median with histogram crash]) AT_DATA([frequencies.sps], [dnl data list list notable /x. begin data. 1 end data. frequencies /x /histogram /STATISTICS=median. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [ignore]) dnl Ignore output - No crash test. AT_CLEANUP # Tests for a bug which caused FREQUENCIES following TEMPORARY to # crash (bug #11492). AT_SETUP([FREQUENCIES crash after TEMPORARY]) AT_DATA([frequencies.sps], [DATA LIST LIST /SEX (A1) X *. BEGIN DATA. M 31 F 21 M 41 F 31 M 13 F 12 M 14 F 13 END DATA. TEMPORARY SELECT IF SEX EQ 'F' FREQUENCIES /X . FINISH ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [Table: Reading free-form data from INLINE. Variable,Format SEX,A1 X,F8.0 Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,12.00,1,25.00,25.00,25.00 ,13.00,1,25.00,25.00,50.00 ,21.00,1,25.00,25.00,75.00 ,31.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, Table: X N,Valid,4 ,Missing,0 Mean,,19.25 Std Dev,,8.81 Minimum,,12.00 Maximum,,31.00 ]) AT_CLEANUP m4_define([FREQUENCIES_NTILES_OUTPUT], [Table: x N,Valid,5 ,Missing,0 Mean,,3.00 Std Dev,,1.58 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,2.00 ,33,2.33 ,50 (Median),3.00 ,67,3.67 ,75,4.00 ,100,5.00 ]) AT_SETUP([FREQUENCIES basic percentiles]) AT_DATA([frequencies.sps], [DATA LIST LIST notable /x * . BEGIN DATA. 1 2 3 4 5 END DATA. FREQUENCIES VAR=x /FORMAT=NOTABLE /PERCENTILES = 0 25 33.333 50 66.666 75 100. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [FREQUENCIES_NTILES_OUTPUT]) AT_CLEANUP AT_SETUP([FREQUENCIES basic n-tiles]) AT_DATA([frequencies.sps], [DATA LIST LIST notable /x * . BEGIN DATA. 1 2 3 4 5 END DATA. FREQUENCIES VAR=x /FORMAT=NOTABLE /NTILES = 3 /NTILES = 4. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [FREQUENCIES_NTILES_OUTPUT]) AT_CLEANUP AT_SETUP([FREQUENCIES compatibility percentiles]) AT_DATA([frequencies.sps], [DATA LIST LIST notable /X * . BEGIN DATA. 1 2 3 4 5 END DATA. FREQUENCIES VAR=x /ALGORITHM=COMPATIBLE /PERCENTILES = 0 25 50 75 100. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,20.00,20.00,20.00 ,2.00,1,20.00,20.00,40.00 ,3.00,1,20.00,20.00,60.00 ,4.00,1,20.00,20.00,80.00 ,5.00,1,20.00,20.00,100.00 Total,,5,100.0,100.0, Table: X N,Valid,5 ,Missing,0 Mean,,3.00 Std Dev,,1.58 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,1.50 ,50 (Median),3.00 ,75,4.50 ,100,5.00 ]) AT_CLEANUP AT_SETUP([FREQUENCIES enhanced percentiles]) AT_DATA([frequencies.sps], [DATA LIST LIST notable /X * . BEGIN DATA. 1 2 3 4 5 END DATA. FREQUENCIES VAR=x /PERCENTILES = 0 25 50 75 100. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,20.00,20.00,20.00 ,2.00,1,20.00,20.00,40.00 ,3.00,1,20.00,20.00,60.00 ,4.00,1,20.00,20.00,80.00 ,5.00,1,20.00,20.00,100.00 Total,,5,100.0,100.0, Table: X N,Valid,5 ,Missing,0 Mean,,3.00 Std Dev,,1.58 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,2.00 ,50 (Median),3.00 ,75,4.00 ,100,5.00 ]) AT_CLEANUP AT_SETUP([FREQUENCIES enhanced percentiles, weighted]) AT_DATA([frequencies.sps], [DATA LIST LIST notable /X * F *. BEGIN DATA. 1 2 2 2 3 2 4 1 4 1 5 1 5 1 END DATA. WEIGHT BY f. FREQUENCIES VAR=x /PERCENTILES = 0 25 50 75 100. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,2.00,20.00,20.00,20.00 ,2.00,2.00,20.00,20.00,40.00 ,3.00,2.00,20.00,20.00,60.00 ,4.00,2.00,20.00,20.00,80.00 ,5.00,2.00,20.00,20.00,100.00 Total,,10.00,100.0,100.0, Table: X N,Valid,10.00 ,Missing,.00 Mean,,3.00 Std Dev,,1.49 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,2.00 ,50 (Median),3.00 ,75,4.00 ,100,5.00 ]) AT_CLEANUP AT_SETUP([FREQUENCIES enhanced percentiles, weighted (2)]) AT_DATA([frequencies.sps], [DATA LIST LIST notable /X * F *. BEGIN DATA. 1 1 3 2 4 1 5 1 5 1 END DATA. WEIGHT BY f. FREQUENCIES VAR=x /PERCENTILES = 0 25 50 75 100. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1.00,16.67,16.67,16.67 ,3.00,2.00,33.33,33.33,50.00 ,4.00,1.00,16.67,16.67,66.67 ,5.00,2.00,33.33,33.33,100.00 Total,,6.00,100.0,100.0, Table: X N,Valid,6.00 ,Missing,.00 Mean,,3.50 Std Dev,,1.52 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,3.00 ,50 (Median),3.50 ,75,4.75 ,100,5.00 ]) AT_CLEANUP dnl Data for this test case from Fabio Bordignon . AT_SETUP([FREQUENCIES enhanced percentiles, weighted (3)]) AT_DATA([frequencies.sps], [DATA LIST LIST notable /X * F *. BEGIN DATA. 1 7 2 16 3 12 4 5 END DATA. WEIGHT BY f. FREQUENCIES VAR=x /PERCENTILES = 0 25 50 75 100. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [dnl Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,7.00,17.50,17.50,17.50 ,2.00,16.00,40.00,40.00,57.50 ,3.00,12.00,30.00,30.00,87.50 ,4.00,5.00,12.50,12.50,100.00 Total,,40.00,100.0,100.0, Table: X N,Valid,40.00 ,Missing,.00 Mean,,2.38 Std Dev,,.93 Minimum,,1.00 Maximum,,4.00 Percentiles,0,1.00 ,25,2.00 ,50 (Median),2.00 ,75,3.00 ,100,4.00 ]) AT_CLEANUP AT_SETUP([FREQUENCIES enhanced percentiles, weighted, missing values]) AT_DATA([frequencies.sps], [DATA LIST LIST notable /X * F *. BEGIN DATA. 1 1 3 2 4 1 5 1 5 1 99 4 END DATA. MISSING VALUE x (99.0) . WEIGHT BY f. FREQUENCIES VAR=x /PERCENTILES = 0 25 50 75 100. ]) AT_CHECK([pspp -O format=csv frequencies.sps], [0], [Table: X Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1.00,10.00,16.67,16.67 ,3.00,2.00,20.00,33.33,50.00 ,4.00,1.00,10.00,16.67,66.67 ,5.00,2.00,20.00,33.33,100.00 ,99.00,4.00,40.00,Missing, Total,,10.00,100.0,100.0, Table: X N,Valid,6.00 ,Missing,4.00 Mean,,3.50 Std Dev,,1.52 Minimum,,1.00 Maximum,,5.00 Percentiles,0,1.00 ,25,3.00 ,50 (Median),3.50 ,75,4.75 ,100,5.00 ]) AT_CLEANUP AT_SETUP([FREQUENCIES dichotomous histogram]) AT_DATA([frequencies.sps], [dnl data list notable list /d4 *. begin data. 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 2 0 end data. FREQUENCIES /VARIABLES = d4 /FORMAT=AVALUE TABLE /HISTOGRAM=NORMAL . ]) AT_CHECK([pspp frequencies.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([FREQUENCIES median]) AT_DATA([median.sps], [dnl data list notable list /x *. begin data. 1 2 3000000 end data. FREQUENCIES /VARIABLES = x /STATISTICS = MEDIAN . ]) AT_CHECK([pspp median.sps -O format=csv], [0], [dnl Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,1.00,1,33.33,33.33,33.33 ,2.00,1,33.33,33.33,66.67 ,3000000.00,1,33.33,33.33,100.00 Total,,3,100.0,100.0, Table: x N,Valid,3 ,Missing,0 Percentiles,50 (Median),2.00 ]) AT_CLEANUP AT_SETUP([FREQUENCIES variance]) AT_DATA([variance.sps], [dnl data list notable list /forename (A12) height. begin data. Ahmed 188 bertram 167 Catherine 134 David 109 end data. FREQUENCIES /VARIABLES = height /STATISTICS = VARIANCE. ]) AT_CHECK([pspp variance.sps -O format=csv], [0], [dnl Table: height Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,109.00,1,25.00,25.00,25.00 ,134.00,1,25.00,25.00,50.00 ,167.00,1,25.00,25.00,75.00 ,188.00,1,25.00,25.00,100.00 Total,,4,100.0,100.0, Table: height N,Valid,4 ,Missing,0 Variance,,1223.00 ]) AT_CLEANUP AT_SETUP([FREQUENCIES default statistics]) AT_DATA([median.sps], [dnl data list notable list /x *. begin data. 10 20 3000000 end data. FREQUENCIES /VARIABLES = x /STATISTICS . FREQUENCIES /VARIABLES = x /STATISTICS = DEFAULT . ]) AT_CHECK([pspp median.sps -O format=csv], [0], [dnl Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,10.00,1,33.33,33.33,33.33 ,20.00,1,33.33,33.33,66.67 ,3000000.00,1,33.33,33.33,100.00 Total,,3,100.0,100.0, Table: x N,Valid,3 ,Missing,0 Mean,,1000010.00 Std Dev,,1732042.15 Minimum,,10.00 Maximum,,3000000.00 Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,10.00,1,33.33,33.33,33.33 ,20.00,1,33.33,33.33,66.67 ,3000000.00,1,33.33,33.33,100.00 Total,,3,100.0,100.0, Table: x N,Valid,3 ,Missing,0 Mean,,1000010.00 Std Dev,,1732042.15 Minimum,,10.00 Maximum,,3000000.00 ]) AT_CLEANUP AT_SETUP([FREQUENCIES no valid data]) AT_DATA([empty.sps], [dnl data list notable list /x *. begin data. . . . end data. FREQUENCIES /VARIABLES = x /STATISTICS = ALL . ]) AT_CHECK([pspp empty.sps -O format=csv], [0], [dnl Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,. ,3,100.00,Missing, Total,,3,100.0,100.0, Table: x N,Valid,0 ,Missing,3 Mean,,. S.E. Mean,,. Mode,,. Std Dev,,. Variance,,. Kurtosis,,. S.E. Kurt,,. Skewness,,. S.E. Skew,,. Range,,. Minimum,,. Maximum,,. Sum,,. Percentiles,,. ]) AT_CLEANUP AT_SETUP([FREQUENCIES histogram no valid cases]) AT_DATA([empty.sps], [dnl data list notable list /x w *. begin data. 1 . 2 . 3 . end data. weight by w. FREQUENCIES /VARIABLES = x /histogram . ]) AT_CHECK([pspp empty.sps -O format=csv], [0], [ignore]) AT_CLEANUP AT_SETUP([FREQUENCIES percentiles + histogram bug#48128]) AT_DATA([bug.sps], [dnl SET FORMAT=F8.0. INPUT PROGRAM. LOOP I=1 TO 10. COMPUTE SCORE=EXP(NORMAL(1)). END CASE. END LOOP. END FILE. END INPUT PROGRAM. FREQUENCIES VARIABLES=SCORE /FORMAT=NOTABLE /STATISTICS=ALL /PERCENTILES=1 10 20 30 40 50 60 70 80 90 99 /HISTOGRAM. ]) AT_CHECK([pspp bug.sps], [0], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/stats/npar.at0000644000175000017500000007056413137223525015004 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([NPAR TESTS]) AT_SETUP([NPAR TESTS BINOMIAL P < 0.5; N1/N2 < 1]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x * w *. BEGIN DATA. 1 6 2 15 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.3) = x . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1.000,6.000,.286,.300,.551 ,Group2,2.000,15.000,.714,, ,Total,,21.000,1.000,, ]) AT_CLEANUP AT_SETUP([NPAR TESTS BINOMIAL P < 0.5; N1/N2 > 1]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 7 2 6 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.4) = x . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1,7,.538,.400,.229 ,Group2,2,6,.462,, ,Total,,13,1.000,, ]) AT_CLEANUP AT_SETUP([NPAR TESTS BINOMIAL P < 0.5; N1/N2 = 1]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 8 2 8 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.4) = x . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1,8,.500,.400,.284 ,Group2,2,8,.500,, ,Total,,16,1.000,, ]) AT_CLEANUP AT_SETUP([NPAR TESTS BINOMIAL P > 0.5; N1/N2 < 1]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 11 2 12 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.6) = x . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1,11,.478,.600,.164 ,Group2,2,12,.522,, ,Total,,23,1.000,, ]) AT_CLEANUP AT_SETUP([NPAR TESTS BINOMIAL P > 0.5; N1/N2 > 1]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 11 2 9 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.6) = x. ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1,11,.550,.600,.404 ,Group2,2,9,.450,, ,Total,,20,1.000,, ]) AT_CLEANUP AT_SETUP([NPAR TESTS BINOMIAL P > 0.5; N1/N2 = 1]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 11 2 11 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.6) = x. ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (1-tailed) x,Group1,1,11,.500,.600,.228 ,Group2,2,11,.500,, ,Total,,22,1.000,, ]) AT_CLEANUP AT_SETUP([NPAR TESTS BINOMIAL P = 0.5; N1/N2 < 1]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 8 2 15 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL = x . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed) x,Group1,1,8,.348,.500,.210 ,Group2,2,15,.652,, ,Total,,23,1.000,, ]) AT_CLEANUP AT_SETUP([NPAR TESTS BINOMIAL P = 0.5; N1/N2 > 1]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 12 2 6 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.5) = x. ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed) x,Group1,1,12,.667,.500,.238 ,Group2,2,6,.333,, ,Total,,18,1.000,, ]) AT_CLEANUP AT_SETUP([NPAR TESTS BINOMIAL P = 0.5; N1/N2 = 1]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x (F8.0) w (F8.0). BEGIN DATA. 1 10 2 10 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.5) = x . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed) x,Group1,1,10,.500,.500,1.000 ,Group2,2,10,.500,, ,Total,,20,1.000,, ]) AT_CLEANUP AT_SETUP([NPAR TESTS BINOMIAL P = 0.5; N1/N2 = 1 Cutpoint]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x * w *. BEGIN DATA. 9 3 10 7 11 16 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.5) = x (10) . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed) x,Group1,<= 10,10.000,.385,.500,.327 ,Group2,,16.000,.615,, ,Total,,26.000,1.000,, ]) AT_CLEANUP AT_SETUP([NPAR TESTS BINOMIAL P = 0.5; N1/N2 = 1 Named values]) AT_DATA([npar.sps], [dnl SET FORMAT F8.3. DATA LIST LIST NOTABLE /x * w *. BEGIN DATA. 10 10 15 45 20 13 END DATA. WEIGHT BY w. NPAR TESTS /BINOMIAL(0.5) = x (10, 20) . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Binomial Test ,,Category,N,Observed Prop.,Test Prop.,Exact Sig. (2-tailed) x,Group1,10.000,10.000,.435,.500,.678 ,Group2,20.000,13.000,.565,, ,Total,,23.000,1.000,, ]) AT_CLEANUP dnl Test for a bug which caused binomial to crash. AT_SETUP([NPAR TESTS BINOMIAL - crash]) AT_DATA([nparX.sps], [dnl data list list /range *. begin data. 0 1 end data. * This is invalid syntax NPAR TEST /BINOMIAL(0.5) = Range(). ]) AT_CHECK([pspp -O format=csv nparX.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([NPAR TESTS CHISQUARE]) AT_DATA([npar.sps], [dnl DATA LIST NOTABLE LIST /x * y * w *. BEGIN DATA. 1 2 1 2 1 3 3.1 1 4 3.2 2 1 4 2 2 5 3 1 1 4 2 END DATA. WEIGHT BY w. NPAR TESTS CHISQUARE=x y . NPAR TESTS CHISQUARE=y /EXPECTED=3 4 5 4 . NPAR TESTS CHISQUARE=x y(2, 4) /EXPECTED = 6 10 3 . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: x ,Observed N,Expected N,Residual 1.00,3.00,2.33,.67 2.00,3.00,2.33,.67 3.10,4.00,2.33,1.67 3.20,1.00,2.33,-1.33 4.00,2.00,2.33,-.33 5.00,1.00,2.33,-1.33 Total,14.00,, Table: y ,Observed N,Expected N,Residual 1.00,7.00,3.50,3.50 2.00,4.00,3.50,.50 3.00,1.00,3.50,-2.50 4.00,2.00,3.50,-1.50 Total,14.00,, Table: Test Statistics ,x,y Chi-Square,3.14,6.00 df,5,3 Asymp. Sig.,.678,.112 Table: y ,Observed N,Expected N,Residual 1.00,7.00,2.63,4.38 2.00,4.00,3.50,.50 3.00,1.00,4.38,-3.38 4.00,2.00,3.50,-1.50 Total,14.00,, Table: Test Statistics ,y Chi-Square,10.61 df,3 Asymp. Sig.,.014 Table: Frequencies ,x,,,,y,,, ,Category,Observed N,Expected N,Residual,Category,Observed N,Expected N,Residual 1,2.00,3.00,3.16,-.16,2.00,4.00,2.21,1.79 2,3.00,5.00,5.26,-.26,3.00,1.00,3.68,-2.68 3,4.00,2.00,1.58,.42,4.00,2.00,1.11,.89 Total,,10.00,,,,7.00,, Table: Test Statistics ,x,y Chi-Square,.13,4.13 df,2,2 Asymp. Sig.,.936,.127 ]) AT_CLEANUP AT_SETUP([NPAR TESTS CHISQUARE expected values missing]) AT_DATA([npar.sps], [dnl DATA LIST NOTABLE LIST /x * y * w *. BEGIN DATA. 1 2 1 2 1 3 3.1 1 4 3.2 2 1 4 2 2 5 3 1 1 4 2 END DATA. WEIGHT BY w. NPAR TESTS CHISQUARE=y /EXPECTED = 3 4 5 4 3 1 . ]) AT_CHECK([pspp -O format=csv npar.sps], [1], [dnl "error: CHISQUARE test specified 6 expected values, but 4 distinct values were encountered in variable y." Table: Test Statistics ,y Chi-Square,.00 df,0 Asymp. Sig.,1.000 ]) AT_CLEANUP AT_SETUP([NPAR TESTS CHISQUARE with DESCRIPTIVES]) AT_DATA([npar.sps], [dnl DATA LIST NOTABLE LIST /x * y * w * . BEGIN DATA. 1 2 1 2 1 3 3.1 1 4 3.2 2 1 4 2 2 5 3 1 1 4 2 . 5 1 END DATA. WEIGHT BY w. MISSING VALUES x (4). NPAR TESTS CHISQUARE=x y(-2,5) /MISSING=ANALYSIS /STATISTICS=DESCRIPTIVES . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Frequencies ,x,,,,y,,, ,Category,Observed N,Expected N,Residual,Category,Observed N,Expected N,Residual 1,-2.00,.00,1.50,-1.50,-2.00,.00,1.88,-1.88 2,-1.00,.00,1.50,-1.50,-1.00,.00,1.88,-1.88 3,.00,.00,1.50,-1.50,.00,.00,1.88,-1.88 4,1.00,3.00,1.50,1.50,1.00,7.00,1.88,5.13 5,2.00,3.00,1.50,1.50,2.00,4.00,1.88,2.13 6,3.00,5.00,1.50,3.50,3.00,1.00,1.88,-.88 7,4.00,.00,1.50,-1.50,4.00,2.00,1.88,.13 8,5.00,1.00,1.50,-.50,5.00,1.00,1.88,-.88 Total,,12.00,,,,15.00,, Table: Test Statistics ,x,y Chi-Square,17.33,22.87 df,7,7 Asymp. Sig.,.015,.002 Table: Descriptive Statistics ,N,Mean,Std. Deviation,Minimum,Maximum ,,,,, x,12.00,2.47,1.19,1.00,5.00 y,15.00,2.07,1.33,1.00,5.00 ]) AT_CLEANUP AT_SETUP([NPAR TESTS CHISQUARE, listwise missing]) AT_DATA([npar.sps], [dnl DATA LIST NOTABLE LIST /x * y * w * . BEGIN DATA. 1 2 1 2 1 3 3.1 1 4 3.2 2 1 4 2 2 5 3 1 1 4 2 . 5 1 END DATA. WEIGHT BY w. * MISSING VALUES x (4). NPAR TESTS CHISQUARE=x y(-2,5) /MISSING=LISTWISE /STATISTICS=DESCRIPTIVES . ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Frequencies ,x,,,,y,,, ,Category,Observed N,Expected N,Residual,Category,Observed N,Expected N,Residual 1,-2.00,.00,1.75,-1.75,-2.00,.00,1.75,-1.75 2,-1.00,.00,1.75,-1.75,-1.00,.00,1.75,-1.75 3,.00,.00,1.75,-1.75,.00,.00,1.75,-1.75 4,1.00,3.00,1.75,1.25,1.00,7.00,1.75,5.25 5,2.00,3.00,1.75,1.25,2.00,4.00,1.75,2.25 6,3.00,5.00,1.75,3.25,3.00,1.00,1.75,-.75 7,4.00,2.00,1.75,.25,4.00,2.00,1.75,.25 8,5.00,1.00,1.75,-.75,5.00,.00,1.75,-1.75 Total,,14.00,,,,14.00,, Table: Test Statistics ,x,y Chi-Square,13.43,26.00 df,7,7 Asymp. Sig.,.062,.001 Table: Descriptive Statistics ,N,Mean,Std. Deviation,Minimum,Maximum ,,,,, x,14.00,2.69,1.23,1.00,5.00 y,14.00,1.86,1.10,1.00,4.00 ]) AT_CLEANUP AT_SETUP([NPAR TESTS WILCOXON]) AT_DATA([npar.sps], [dnl data list notable list /foo * bar * w (f8.0). begin data. 1.00 1.00 1 1.00 2.00 1 2.00 1.00 1 1.00 4.00 1 2.00 5.00 1 1.00 19.00 1 2.00 7.00 1 4.00 5.00 1 1.00 12.00 1 2.00 13.00 1 2.00 2.00 1 12.00 .00 2 12.00 1.00 1 13.00 1.00 1 end data variable labels foo "first" bar "second". weight by w. npar test /wilcoxon=foo with bar (paired) /missing analysis /method=exact. ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Ranks ,,N,Mean Rank,Sum of Ranks first - second,Negative Ranks,8,6.00,48.00 ,Positive Ranks,5,8.60,43.00 ,Ties,2,, ,Total,15,, Table: Test Statistics ,first - second Z,-.18 Asymp. Sig. (2-tailed),.861 Exact Sig. (2-tailed),.893 Exact Sig. (1-tailed),.446 ]) AT_CLEANUP AT_SETUP([NPAR TESTS WILCOXON with missing values]) AT_DATA([npar.sps], [dnl data list notable list /foo * bar * dummy *. begin data. 1.00 1.00 1 1.00 2.00 1 2.00 1.00 1 1.00 4.00 . 2.00 5.00 . 1.00 19.00 . 2.00 7.00 1 4.00 5.00 1 1.00 12.00 1 2.00 13.00 1 2.00 2.00 1 12.00 .00 1 12.00 .00 1 34.2 . 1 12.00 1.00 1 13.00 1.00 1 end data variable labels foo "first" bar "second". npar test /wilcoxon=foo with bar (paired) /missing analysis /method=exact. ]) dnl This is the same output as the previous test. AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Ranks ,,N,Mean Rank,Sum of Ranks first - second,Negative Ranks,8,6.00,48.00 ,Positive Ranks,5,8.60,43.00 ,Ties,2,, ,Total,15,, Table: Test Statistics ,first - second Z,-.18 Asymp. Sig. (2-tailed),.861 Exact Sig. (2-tailed),.893 Exact Sig. (1-tailed),.446 ]) AT_CLEANUP AT_SETUP([NPAR TESTS SIGN]) AT_DATA([npar.sps], [dnl set format = F9.3. data list notable list /age * height rank *. begin data. 10 12 11 12 13 13 13 14 12 12 12 10 9 9 10 10.3 10.2 12 end data. npar tests /sign=age height WITH height rank (PAIRED) /MISSING ANALYSIS /METHOD=EXACT . ]) AT_CHECK([pspp -o pspp.csv npar.sps]) dnl Some machines return .313 instead of .312 dnl (see bug #31611). AT_CHECK([sed -e 's/\.313$/.312/' -e 's/^Exact Sig\. (1-tailed),\.313/Exact Sig. (1-tailed),.312/' pspp.csv], [0], [dnl Table: Frequencies ,,N age - height,Negative Differences,3 ,Positive Differences,1 ,Ties,2 ,Total,6 height - rank,Negative Differences,2 ,Positive Differences,3 ,Ties,1 ,Total,6 Table: Test Statistics ,age - height,height - rank Exact Sig. (2-tailed),.625,1.000 Exact Sig. (1-tailed),.312,.500 Point Probability,.250,.312 ]) AT_CLEANUP AT_SETUP([NPAR Kruskal-Wallis test]) dnl Simple case AT_DATA([kw-simple.sps], [dnl set format = F9.3. data list notable list /gv * xscore *. begin data 1 96 1 128 1 83 2 132 2 135 2 109 3 115 1 61 1 101 2 82 2 124 3 149 3 166 3 147 end data. value label /gv 1 "timed out" 2 "hit wicket" 3 "handled the ball". npar tests /kruskal-wallis xscore by gv (1, 3) . ]) AT_CHECK([pspp -o pspp.csv kw-simple.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Ranks ,gv,N,Mean Rank xscore,timed out,5,4.400 ,hit wicket,5,7.400 ,handled the ball,4,11.500 ,Total,14, Table: Test Statistics ,,xscore Chi-Square,,6.406 df,,2 Asymp. Sig.,,.041 ]) dnl Now try a missing value in the group variable AT_DATA([kw-missing-group.sps], [dnl set format = F9.3. data list notable list /gv * xscore *. begin data 1 96 1 128 1 83 1 61 1 101 2 82 2 124 2 132 2 135 2 109 3 115 3 149 3 166 3 147 2.5 344 end data. missing values gv (2.5). value label /gv 1 "timed out" 2 "hit wicket" 3 "handled the ball". npar tests /kruskal-wallis xscore by gv (1, 3) /missing=exclude . ]) AT_CHECK([pspp -o pspp2.csv kw-missing-group.sps]) dnl The result should be the same as before AT_CHECK([diff pspp.csv pspp2.csv], [0]) AT_CLEANUP AT_SETUP([NPAR Kruskal-Wallis multiple-variables]) AT_DATA([kw-multi.sps], [dnl set format = F9.3. data list notable list /gv * xscore * yscore. begin data 1 96 . 1 128 . 1 83 . 2 132 132 2 135 135 2 109 109 3 115 115 1 61 . 1 101 . 2 82 82 2 124 124 3 149 149 3 166 166 3 147 147 4 . 96 4 . 128 4 . 83 4 . 61 4 . 101 end data. value label /gv 1 "timed out" 2 "hit wicket" 3 "handled the ball" 4 "bowled" 5 "lbw" . npar tests /k-w xscore yscore by gv (1, 5) . ]) AT_CHECK([pspp -o pspp.csv kw-multi.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Ranks ,gv,N,Mean Rank xscore,timed out,5,4.400 ,hit wicket,5,7.400 ,handled the ball,4,11.500 ,Total,14, yscore,hit wicket,5,7.400 ,handled the ball,4,11.500 ,bowled,5,4.400 ,Total,14, Table: Test Statistics ,,xscore,yscore, Chi-Square,,6.406,6.406, df,,2,2, Asymp. Sig.,,.041,.041, ]) AT_CLEANUP AT_SETUP([NPAR TESTS Runs]) AT_DATA([npar-runs.sps], [dnl set format F11.4. data list notable list /score * w *. begin data 4 6 . 4 4 3 3 20 2 29 1 42 6 18 5 7 6 78 5 10 6 46 5 5 6 17 5 1 6 11 4 2 3 7 2 6 1 10 4 13 3 22 3 11 2 24 1 18 4 4 3 12 2 10 1 25 4 4 3 7 2 3 1 4 4 2 3 3 2 2 1 4 end data. weight by w. npar tests /runs (MEDIAN) = score /runs (MEAN) = score /runs (MODE) = score . ]) AT_CHECK([pspp -O format=csv npar-runs.sps], [0], [Table: Runs Test ,score Test Value (median),3.0000 Cases < Test Value,177.0000 Cases ≥ Test Value,309.0000 Total Cases,486.0000 Number of Runs,12 Z,-20.9931 Asymp. Sig. (2-tailed),2.000 Table: Runs Test ,score Test Value (mean),3.6379 Cases < Test Value,259.0000 Cases ≥ Test Value,227.0000 Total Cases,486.0000 Number of Runs,12 Z,-21.0650 Asymp. Sig. (2-tailed),2.000 Table: Runs Test ,score Test Value (mode),6.0000 Cases < Test Value,316.0000 Cases ≥ Test Value,170.0000 Total Cases,486.0000 Number of Runs,11 Z,-21.0742 Asymp. Sig. (2-tailed),2.000 ]) AT_CLEANUP dnl Thanks to Douglas Bonett for providing this test case. AT_SETUP([NPAR TESTS Runs (2)]) AT_DATA([npar-runs.sps], [dnl data list notable free /y. begin data 1 1 2 1 2 1 1 2 1 1 1 2 1 2 end data. NPAR TEST /RUNS(1.5) = y. ]) AT_CHECK([pspp -O format=csv npar-runs.sps], [0], [dnl Table: Runs Test ,y Test Value,1.50 Cases < Test Value,9 Cases ≥ Test Value,5 Total Cases,14 Number of Runs,10 Z,1.26 Asymp. Sig. (2-tailed),.206 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Friedman]) AT_DATA([npar-friedman.sps], [dnl set format F15.4. data list notable list /x * y * z. begin data 9.5 6.5 8.1 8.0 6.0 6.0 7.0 6.5 4.2 9.5 5.0 7.3 9.0 7.0 6.2 8.5 6.9 6.5 7.5 8.0 6.5 6.0 8.0 3.1 5.0 6.0 4.9 7.5 7.5 6.2 end data. npar tests /friedman = x y z. ]) AT_CHECK([pspp -O format=csv npar-friedman.sps], [0], [dnl Table: Ranks ,Mean Rank x,2.6500 y,2.1000 z,1.2500 Table: Test Statistics N,10 Chi-Square,10.4737 df,2 Asymp. Sig.,.005 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Mann-Whitney]) AT_DATA([npar-mann-whitney.sps], [dnl SET FORMAT = F11.4 data list notable list /height * sex (f1.0). begin data. 201 1 84 1 83 1 94 1 88 0 99 0 55 0 69 0 86 1 79 1 91 0 201 0 88 1 85 1 82 1 88 0 75 0 99 0 81 0 72 1 89 1 92 1 80 0 82 0 76 0 65 0 85 0 76 1 145 1 24 1 1 4 -4 5 34 5 21 4 end data. NPAR TESTS /M-W = height BY sex (0,1). ]) AT_CHECK([pspp -O format=csv npar-mann-whitney.sps], [0], [dnl Table: Ranks ,N,,,Mean Rank,,Sum of Ranks, ,0,1,Total,0,1,0,1 height,15.0000,15.0000,30.0000,14.5333,16.4667,218.0000,247.0000 Table: Test Statistics ,Mann-Whitney U,Wilcoxon W,Z,Asymp. Sig. (2-tailed) height,98.0000,218.0000,-.6020,.547 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Mann-Whitney Multiple]) dnl Check for a bug where the ranks were inappropriately allocated, when dnl multiple variables were tested and MISSING=ANALYSIS chosen. cp $abs_srcdir/language/mann-whitney.txt . AT_DATA([npar-mann-whitney.sps], [dnl SET FORMAT = F11.3 DATA LIST NOTABLE FILE='mann-whitney.txt' LIST /I002_01 I002_02 I002_03 I002_04 sum_HL *. VARIABLE LABELS I002_01 'IOS: Familie' I002_02 'IOS: Freunde' I002_03 'IOS: Partner*in' I002_04 'IOS: Bekannte'. MISSING VALUES I002_01 I002_02 I002_03 I002_04 (-9 -1). NPAR TESTS /MISSING=ANALYSIS /M-W=I002_01 I002_02 I002_03 I002_04 BY sum_HL (0 1). ]) AT_CHECK([pspp -O format=csv npar-mann-whitney.sps], [0], [dnl Table: Ranks ,N,,,Mean Rank,,Sum of Ranks, ,.000,1.000,Total,.000,1.000,.000,1.000 IOS: Familie,114.000,115.000,229.000,110.018,119.939,12542.000,13793.000 IOS: Freunde,115.000,115.000,230.000,108.339,122.661,12459.000,14106.000 IOS: Partner*in,97.000,91.000,188.000,95.351,93.593,9249.000,8517.000 IOS: Bekannte,115.000,115.000,230.000,111.065,119.935,12772.500,13792.500 Table: Test Statistics ,Mann-Whitney U,Wilcoxon W,Z,Asymp. Sig. (2-tailed) IOS: Familie,5987.000,12542.000,-1.167,.243 IOS: Freunde,5789.000,12459.000,-1.674,.094 IOS: Partner*in,4331.000,8517.000,-.245,.807 IOS: Bekannte,6102.500,12772.500,-1.046,.296 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Cochran]) AT_DATA([npar-cochran.sps], [dnl set format f11.3. data list notable list /v1 * v2 * v3 * v4 * v5 * v6 * v7 *. begin data. 2 1 1 2 1 1 2 2 2 2 2 1 1 1 1 1 2 2 1 1 2 2 2 2 2 1 1 2 2 1 2 1 1 2 1 1 2 2 1 1 1 1 1 2 2 2 2 2 2 2 2 1 2 1 1 1 1 2 1 2 1 1 2 end data. npar tests /cochran = v1 to v7 . ]) AT_CHECK([pspp -o pspp.csv npar-cochran.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Frequencies ,Value, ,Success (2),Failure (1) v1,5,4 v2,6,3 v3,6,3 v4,7,2 v5,1,8 v6,2,7 v7,5,4 Table: Test Statistics N,9 Cochran's Q,12.735 df,6 Asymp. Sig.,.047 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Kendall]) AT_DATA([npar-kendall.sps], [dnl SET FORMAT F14.3. data list notable list /v1 * v2 * v3 begin data. 7 7 2 5 6 5 8 6 4 5 7 4 5 4 4 8 6 5 6 3 5 7 6 5 8 5 5 . 2 2 5 4 5 3 4 4 5 1 2 5 2 1 7 6 5 6 3 4 6 6 6 5 4 5 4 3 4 9 1 1 6 2 1 3 7 8 6 3 4 4 4 4 5 4 3 6 5 2 4 4 8 4 6 4 6 5 5 7 8 6 5 3 5 end data. npar tests /kendall = all . ]) AT_CHECK([pspp -o pspp.csv npar-kendall.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Ranks ,Mean Rank v1,2.500 v2,1.817 v3,1.683 Table: Test Statistics N,30 Kendall's W,.233 Chi-Square,13.960 df,2 Asymp. Sig.,.001 ]) AT_CLEANUP AT_SETUP([NPAR TESTS McNemar]) AT_DATA([mcnemar.sps], [dnl set format = F12.3. data list notable list /v1 * v2 * junk *. begin data. 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 end data. npar tests /mcnemar = v1 WITH v2 junk. ]) AT_CHECK([pspp -O format=csv mcnemar.sps], [0], [dnl Table: v1 & v2 v1,v2, ,.000,1.000 .000,4,9 1.000,2,5 Table: v1 & junk v1,junk, ,.000,1.000 .000,8,5 1.000,2,5 Table: Test Statistics ,N,Exact Sig. (2-tailed),Exact Sig. (1-tailed),Point Probability v1 & v2,20,.065,.033,.027 v1 & junk,20,.453,.227,.164 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Kolmogorov-Smirnov Uniform parameters given]) AT_DATA([ks-uniform.sps], [dnl set format F12.3. data list notable list /x *. begin data .554 .382 .329 .480 .711 .503 .203 .477 .621 .581 end data. npar tests k-s (uniform 0 1) = x. ]) AT_CHECK([pspp -O format=csv ks-uniform.sps], [0], [dnl Table: One-Sample Kolmogorov-Smirnov Test ,,x N,,10 Uniform Parameters,Minimum,.000 ,Maximum,1.000 Most Extreme Differences,Absolute,.289 ,Positive,.289 ,Negative,-.229 Kolmogorov-Smirnov Z,,.914 Asymp. Sig. (2-tailed),,.374 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Kolmogorov-Smirnov Normal parameters imputed]) AT_DATA([ks-normal.sps], [dnl set format = F12.3. data list notable list /foo * bar *. begin data. 65 12.5 59 14.2 43 12.6 57 68 79 51 62 57 73 58 58 68 75 47 70 59 71 52 48 13.0 58 14.1 37 15.0 39 13.1 58 13.2 43 14.5 58 13.5 86 14.0 63 12.5 80 12.8 70 63 53 53 48 49 51 47 81 66 78 65 69 70 12.1 63 12.5 64 12.4 39 13.8 51 13.2 68 14.0 76 12.6 53 12.1 71 13.5 47 13.8 87 14.1 72 12.9 48 12.1 75 12.8 51 13.4 63 13.9 61 12.5 61 12.4 66 12.8 82 12.9 81 13.6 46 52 71 73 58 57 46 58 52 13.5 71 13.2 57 12.8 78 14.1 73 12.1 50 12.6 71 51 51 68 84 64 66 65 52 56 70 68 66 78 65 71 53 81 53 57 64 61 43 56 37 74 66 81 67 80 68 76 70 80 42 74 80 70 60 39 72 69 63 72 63 49 53 13.2 43 13.8 51 12.5 63 12.6 64 12.9 65 13.0 64 12.5 66 12.0 55 62 58 48 67 46 36 61 55 77 74 60 70 69 57 49 63 69 63 76 53 54 42 64 66 61 62 73 73 60 79 40 48 76 60 76 54 69 65 69 51 54 82 end data. npar tests /k-s (normal) = foo bar. ]) AT_CHECK([pspp -O format=csv ks-normal.sps], [0], [dnl Table: One-Sample Kolmogorov-Smirnov Test ,,foo,bar N,,174,48 Normal Parameters,Mean,62.109,13.108 ,Std. Deviation,11.548,.718 Most Extreme Differences,Absolute,.059,.115 ,Positive,.055,.115 ,Negative,-.059,-.082 Kolmogorov-Smirnov Z,,.785,.795 Asymp. Sig. (2-tailed),,.569,.552 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Median Test (median imputed)]) AT_DATA([median1.sps], [dnl set format F12.3. data list notable list /ignore * animal * years * w *. begin data 99 1 10 1 99 4 1 1 99 5 11 1 99 5 10 1 99 3 7 1 99 6 10 1 99 0 7 1 99 3 14 1 99 2 3 1 99 1 1 1 99 4 7 1 99 5 12 1 99 3 6 1 99 4 1 1 99 3 5 1 99 5 7 1 99 4 6 1 99 3 14 1 99 4 8 1 99 5 13 1 99 2 0 1 99 4 7 1 99 4 7 1 99 1 0 1 99 2 8 1 99 4 10 1 99 2 3 1 99 2 0 1 99 4 8 1 99 1 8 1 end data. variable label years 'Years expected'. variable label animal 'Animal Genus'. add value labels animal 1 'Animal 1' 2 'Animal 2' 3 'Animal 3' 4 'Animal 4' 5 'Animal 5'. npar tests /median = years by animal (1, 5) . ]) AT_CHECK([pspp -O format=csv median1.sps], [0], [dnl Table: Frequencies ,,Animal Genus,,,, ,,Animal 1,Animal 2,Animal 3,Animal 4,Animal 5 Years expected,> Median,2,1,2,3,4 ,≤ Median,2,4,3,6,1 Table: Test Statistics ,N,Median,Chi-Square,df,Asymp. Sig. Years expected,28,7.000,4.317,4,.365 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Median Test (median given)]) AT_DATA([median2.sps], [dnl set format F12.3. data list notable list /ignore * animal * years * w *. begin data 99 1 10 1 99 4 1 1 99 5 11 1 99 5 10 1 99 3 7 1 99 3 14 1 99 2 3 1 99 1 1 1 99 4 7 1 99 5 12 1 99 3 6 1 99 4 1 1 99 3 5 1 99 5 7 1 99 4 6 1 99 3 14 1 99 4 8 1 99 5 13 1 99 2 0 1 99 4 7 1 99 4 7 1 99 1 0 1 99 2 8 1 99 4 10 1 99 2 3 1 99 2 0 1 99 4 8 1 99 1 8 1 end data. variable label years 'Years expected'. variable label animal 'Animal Genus'. add value labels animal 1 'Animal 1' 2 'Animal 2' 3 'Animal 3' 4 'Animal 4' 5 'Animal 5'. npar tests /median (7) = years by animal (1, 5) . ]) AT_CHECK([pspp -O format=csv median2.sps], [0], [dnl Table: Frequencies ,,Animal Genus,,,, ,,Animal 1,Animal 2,Animal 3,Animal 4,Animal 5 Years expected,> Median,2,1,2,3,4 ,≤ Median,2,4,3,6,1 Table: Test Statistics ,N,Median,Chi-Square,df,Asymp. Sig. Years expected,28,7.000,4.317,4,.365 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Median Test (two sample)]) AT_DATA([median3.sps], [dnl set format F12.3. data list notable list /xx * animal * years * w *. begin data 99 1 10 1 99 4 1 1 99 5 11 1 99 5 10 1 99 3 7 1 99 3 14 1 99 2 3 1 99 1 1 1 99 4 7 1 99 5 12 1 99 3 6 1 99 4 1 1 99 3 5 1 99 5 7 1 99 4 6 1 99 3 14 1 99 4 8 1 99 5 13 1 99 2 0 1 99 4 7 1 99 4 7 1 99 1 0 1 99 2 8 1 99 4 10 1 99 2 3 1 99 2 0 1 99 4 8 1 99 1 8 1 end data. variable label years 'Years expected'. variable label animal 'Animal Genus'. add value labels animal 1 'Animal 1' 2 'Animal 2' 3 'Animal 3' 4 'Animal 4' 5 'Animal 5'. npar tests /median (7) = xx years by animal (5, 1) . ]) AT_CHECK([pspp -O format=csv median3.sps], [0], [dnl Table: Frequencies ,,Animal Genus, ,,Animal 1,Animal 5 xx,> Median,4,5 ,≤ Median,0,0 Years expected,> Median,2,4 ,≤ Median,2,1 Table: Test Statistics ,N,Median,Chi-Square,df,Asymp. Sig. xx,9,7.000,NaN,1,NaN Years expected,9,7.000,.900,1,.343 ]) AT_CLEANUP AT_SETUP([NPAR TESTS Jonckheere-Terpstra]) AT_DATA([jt.sps], [dnl set format = F12.3. data list notable list /x * g * w *. begin data. 52 2 2 58 2 1 60 2 1 62 2 1 58 0 1 44 2 1 46 2 1 14 3 1 32 2 1 16 3 1 56 2 1 26 3 1 40 3 2 50 4 1 6 5 1 34 2 3 36 2 2 40 2 2 50 2 1 end data. weight by w. npar test /jonckheere-terpstra = x by g (5, 2). ]) AT_CHECK([pspp -O format=csv jt.sps], [0], [dnl Table: Jonckheere-Terpstra Test ,Number of levels in g,N,Observed J-T Statistic,Mean J-T Statistic,Std. Deviation of J-T Statistic,Std. J-T Statistic,Asymp. Sig. (2-tailed) x,4,24.000,29.500,65.000,15.902,-2.232,.026 ]) AT_CLEANUP dnl Checks that (PAIRED) can have lists where the same dnl variable appears more than once. AT_SETUP([NPAR TESTS (PAIRED)]) AT_DATA([npar.sps], [dnl set format = F12.3. data list notable list /a * b * c *. begin data. 1 2 4 4 5 3 1 2 2 4 5 1 end data. npar tests /wilcoxon a b with c c (paired). ]) AT_CHECK([pspp -O format=csv npar.sps], [0], [dnl Table: Ranks ,,N,Mean Rank,Sum of Ranks a - c,Negative Ranks,2,2.500,5.000 ,Positive Ranks,2,2.500,5.000 ,Ties,0,, ,Total,4,, b - c,Negative Ranks,1,1.500,1.500 ,Positive Ranks,2,2.250,4.500 ,Ties,1,, ,Total,4,, Table: Test Statistics ,a - c,b - c Z,.000,-.816 Asymp. Sig. (2-tailed),1.000,.414 ]) AT_CLEANUP AT_SETUP([NPAR TESTS CHISQUARE crash]) dnl This syntax had been observed to crash pspp AT_DATA([npar.sps], [dnl data list list /x *. begin data. 1 2 3 4 5 6 7 8 9 10 end data. * This happens to be invalid syntax. But should not crash. NPAR TEST /CHISQUARE= x(0.098, 99.098) /EXPECTED = 1.2. ]) AT_CHECK([pspp -O format=csv npar.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([NPAR TESTS - crash on invalid syntax]) AT_DATA([npar.sps], [dnl data list notable list /ev * xscore *. begin data. 2 109 3 115 1 61 1 101 3 147 end data. npar tests /kruskal-wallis xscore by(gv (1, 3). ]) AT_CHECK([pspp -O format=csv npar.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([NPAR TESTS - crash on unterminated string]) AT_DATA([npar.sps], [dnl DATA LIST NOTABLE LIST /x * y * w * . BEGIN DATA. 3.1 1 4 3.2 2 1 4 2 6 END DATA. NPAR TESTS " CHISQUARE=x y(-2,5) /STATISTICS=DESCRIPTIVES . ]) AT_CHECK([pspp -O format=csv npar.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/stats/crosstabs.at0000644000175000017500000012434513137223525016044 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([CROSSTABS procedure]) AT_SETUP([CROSSTABS integer mode crash]) AT_DATA([crosstabs.sps], [DATA LIST LIST /A * B * X * Y * . BEGIN DATA. 2 3 4 5 END DATA. CROSSTABS VARIABLES X (1,7) Y (1,7) /TABLES X BY Y. ]) AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [[Table: Reading free-form data from INLINE. Variable,Format A,F8.0 B,F8.0 X,F8.0 Y,F8.0 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X * Y,1,100.0%,0,0.0%,1,100.0% Table: X * Y [count]. ,Y,,,,,,, X,1.00,2.00,3.00,4.00,5.00,6.00,7.00,Total 1.00,.00,.00,.00,.00,.00,.00,.00,.00 2.00,.00,.00,.00,.00,.00,.00,.00,.00 3.00,.00,.00,.00,.00,.00,.00,.00,.00 4.00,.00,.00,.00,.00,1.00,.00,.00,1.00 5.00,.00,.00,.00,.00,.00,.00,.00,.00 6.00,.00,.00,.00,.00,.00,.00,.00,.00 7.00,.00,.00,.00,.00,.00,.00,.00,.00 Total,.00,.00,.00,.00,1.00,.00,.00,1.00 ]]) AT_CLEANUP # Bug #47600. AT_SETUP([CROSSTABS integer mode crash 2]) AT_DATA([crosstabs.sps], [dnl DATA LIST lIST /x y. BEGIN DATA. 4 5 END DATA. CROSSTABS VARIABLES x (1,3) y (1,7) /TABLES x BY y. ]) AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [[Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,F8.0 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,0,0.0%,1,100.0%,1,100.0% ]]) AT_CLEANUP # Bug #22037. AT_SETUP([CROSSTABS long string crash]) AT_DATA([crosstabs.sps], [data list list /x * y (a18). begin data. 1. 'zero none' 1 'one unity' 2 'two duality' 3 'three lots' end data. CROSSTABS /TABLES = x BY y. ]) AT_CHECK([pspp -o - -O format=csv crosstabs.sps], [0], [[Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,A18 "crosstabs.sps:4: warning: Missing value(s) for all variables from x onward. These will be filled with the system-missing value or blanks, as appropriate." "crosstabs.sps:6: warning: Missing value(s) for all variables from x onward. These will be filled with the system-missing value or blanks, as appropriate." Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,4,66.7%,2,33.3%,6,100.0% Table: x * y [count]. ,y,,,, x,one unity ,three lots ,two duality ,zero none ,Total 1.00,1.00,.00,.00,1.00,2.00 2.00,.00,.00,1.00,.00,1.00 3.00,.00,1.00,.00,.00,1.00 Total,1.00,1.00,1.00,1.00,4.00 ]]) AT_CLEANUP AT_SETUP([CROSSTABS crash]) AT_DATA([crosstabs.sps], [[DATA LIST FIXED / x 1-2 y 3 z 4. BEGIN DATA. 0111 0222 0311 0412 0521 0612 0711 0811 0912 END DATA. LIST. CROSSTABS TABLES y by z. ]]) AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [[Table: Reading 1 record from INLINE. Variable,Record,Columns,Format x,1,1- 2,F2.0 y,1,3- 3,F1.0 z,1,4- 4,F1.0 Table: Data List x,y,z 1,1,1 2,2,2 3,1,1 4,1,2 5,2,1 6,1,2 7,1,1 8,1,1 9,1,2 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent y * z,9,100.0%,0,0.0%,9,100.0% Table: y * z [count]. ,z,, y,1,2,Total 1,4.00,3.00,7.00 2,1.00,1.00,2.00 Total,5.00,4.00,9.00 ]]) AT_CLEANUP # Bug #26739, which caused CROSSTABS to crash or to fail to output # chi-square results. AT_SETUP([CROSSTABS chi-square crash]) AT_DATA([crosstabs.sps], [[DATA LIST LIST /x * y *. BEGIN DATA. 2 2 3 1 4 2 4 1 END DATA. CROSSTABS /TABLES= x BY y /STATISTICS=CHISQ. ]]) AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [[Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,F8.0 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,4,100.0%,0,0.0%,4,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 2.00,.00,1.00,1.00 3.00,1.00,.00,1.00 4.00,1.00,1.00,2.00 Total,2.00,2.00,4.00 Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed) Pearson Chi-Square,2.00,2,.368 Likelihood Ratio,2.77,2,.250 Linear-by-Linear Association,.27,1,.602 N of Valid Cases,4,, ]]) AT_CLEANUP # Bug #27883. AT_SETUP([CROSSTABS crash with SPLIT FILE]) AT_DATA([crosstabs.sps], [data list notable / v0 to v2 1-6 (A) begin data. a c e a c e a c e a d e a d f b d f b d f b c f b d e a c f end data. SORT CASES BY v0. SPLIT FILE SEPARATE BY v0. CROSSTABS /TABLES= v1 BY v2 /FORMAT=AVALUE TABLES PIVOT /STATISTICS=CHISQ /CELLS=COUNT ROW COLUMN TOTAL. ]) AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [[Variable,Value,Label v0,a , Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent v1 * v2,6,100.0%,0,0.0%,6,100.0% "Table: v1 * v2 [count, row %, column %, total %]." ,v2,, v1,e ,f ,Total c ,3.00,1.00,4.00 ,75.00%,25.00%,100.00% ,75.00%,50.00%,66.67% ,50.00%,16.67%,66.67% d ,1.00,1.00,2.00 ,50.00%,50.00%,100.00% ,25.00%,50.00%,33.33% ,16.67%,16.67%,33.33% Total,4.00,2.00,6.00 ,66.67%,33.33%,100.00% ,100.00%,100.00%,100.00% ,66.67%,33.33%,100.00% Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed) Pearson Chi-Square,.38,1,.540,, Likelihood Ratio,.37,1,.545,, Fisher's Exact Test,,,,1.000,.600 Continuity Correction,.00,1,1.000,, N of Valid Cases,6,,,, Variable,Value,Label v0,b , Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent v1 * v2,4,100.0%,0,0.0%,4,100.0% "Table: v1 * v2 [count, row %, column %, total %]." ,v2,, v1,e ,f ,Total c ,.00,1.00,1.00 ,.00%,100.00%,100.00% ,.00%,33.33%,25.00% ,.00%,25.00%,25.00% d ,1.00,2.00,3.00 ,33.33%,66.67%,100.00% ,100.00%,66.67%,75.00% ,25.00%,50.00%,75.00% Total,1.00,3.00,4.00 ,25.00%,75.00%,100.00% ,100.00%,100.00%,100.00% ,25.00%,75.00%,100.00% Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed) Pearson Chi-Square,.44,1,.505,, Likelihood Ratio,.68,1,.410,, Fisher's Exact Test,,,,1.000,.750 Continuity Correction,.00,1,1.000,, N of Valid Cases,4,,,, ]]) AT_CLEANUP # Bug #24752. AT_SETUP([3-way CROSSTABS]) AT_DATA([crosstabs.sps], [[DATA LIST FIXED / x 1-2 y 3 z 4. BEGIN DATA. 0111 0222 0311 0412 0521 0612 0711 0811 0912 END DATA. LIST. CROSSTABS TABLES x BY y BY z/STATISTICS=ALL. ]]) AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [[Table: Reading 1 record from INLINE. Variable,Record,Columns,Format x,1,1- 2,F2.0 y,1,3- 3,F1.0 z,1,4- 4,F1.0 Table: Data List x,y,z 1,1,1 2,2,2 3,1,1 4,1,2 5,2,1 6,1,2 7,1,1 8,1,1 9,1,2 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y * z,9,100.0%,0,0.0%,9,100.0% Table: x * y * z [count]. z,,y,, ,x,1,2,Total 1,1,1.00,.00,1.00 ,3,1.00,.00,1.00 ,5,.00,1.00,1.00 ,7,1.00,.00,1.00 ,8,1.00,.00,1.00 Total,,4.00,1.00,5.00 2,2,.00,1.00,1.00 ,4,1.00,.00,1.00 ,6,1.00,.00,1.00 ,9,1.00,.00,1.00 Total,,3.00,1.00,4.00 Table: Chi-square tests. z,Statistic,Value,df,Asymp. Sig. (2-tailed) 1,Pearson Chi-Square,5.00,4,.287 ,Likelihood Ratio,5.00,4,.287 ,Linear-by-Linear Association,.01,1,.938 ,N of Valid Cases,5,, 2,Pearson Chi-Square,4.00,3,.261 ,Likelihood Ratio,4.50,3,.212 ,Linear-by-Linear Association,1.58,1,.209 ,N of Valid Cases,4,, Table: Symmetric measures. z,Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. 1,Nominal by Nominal,Phi,1.00,,, ,,Cramer's V,1.00,,, ,,Contingency Coefficient,.71,,, ,Ordinal by Ordinal,Kendall's tau-b,.00,.32,.00, ,,Kendall's tau-c,.00,.32,.00, ,,Gamma,.00,.50,.00, ,,Spearman Correlation,.00,.22,.00, ,Interval by Interval,Pearson's R,.04,.22,.07, ,N of Valid Cases,,5,,, 2,Nominal by Nominal,Phi,1.00,,, ,,Cramer's V,1.00,,, ,,Contingency Coefficient,.71,,, ,Ordinal by Ordinal,Kendall's tau-b,-.71,.20,-1.73, ,,Kendall's tau-c,-.75,.43,-1.73, ,,Gamma,-1.00,.00,-1.73, ,,Spearman Correlation,-.77,.17,-1.73, ,Interval by Interval,Pearson's R,-.73,.18,-1.49, ,N of Valid Cases,,4,,, Table: Directional measures. z,Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. 1,Nominal by Nominal,Lambda,Symmetric,.40,.28,1.12,.264 ,,,x Dependent,.25,.22,1.12,.264 ,,,y Dependent,1.00,.00,1.12,.264 ,,Goodman and Kruskal tau,x Dependent,.25,,,. @&t@ ,,,y Dependent,1.00,,,. @&t@ ,,Uncertainty Coefficient,Symmetric,.47,.18,,. @&t@ ,,,x Dependent,.31,.15,2.02,. @&t@ ,,,y Dependent,1.00,.00,2.02,. @&t@ ,Ordinal by Ordinal,Somers' d,Symmetric,.00,,.00,1.000 ,,,x Dependent,.00,.50,.00,1.000 ,,,y Dependent,.00,.20,.00,1.000 ,Nominal by Interval,Eta,x Dependent,.04,,,. @&t@ ,,,y Dependent,1.00,,,. @&t@ 2,Nominal by Nominal,Lambda,Symmetric,.50,.25,2.00,.046 ,,,x Dependent,.33,.27,1.15,.248 ,,,y Dependent,1.00,.00,1.15,.248 ,,Goodman and Kruskal tau,x Dependent,.33,,,. @&t@ ,,,y Dependent,1.00,,,. @&t@ ,,Uncertainty Coefficient,Symmetric,.58,.17,,. @&t@ ,,,x Dependent,.41,.17,2.36,. @&t@ ,,,y Dependent,1.00,.00,2.36,. @&t@ ,Ordinal by Ordinal,Somers' d,Symmetric,-.67,,-1.73,.083 ,,,x Dependent,-1.00,.00,-1.73,.083 ,,,y Dependent,-.50,.29,-1.73,.083 ,Nominal by Interval,Eta,x Dependent,.73,,,. @&t@ ,,,y Dependent,1.00,,,. @&t@ ]]) AT_CLEANUP AT_SETUP([CROSSTABS rounding weights with COUNT]) AT_DATA([crosstabs.sps], [[DATA LIST NOTABLE LIST /x y w. BEGIN DATA. 1 1 1.4 1 1 1.4 1 2 1.6 1 2 1.6 2 1 1 2 2 2 END DATA. WEIGHT BY w. * These should have the same effect (no rounding). CROSSTABS /TABLES x BY y. CROSSTABS /TABLES x BY y /COUNT ASIS. * Round input weights. CROSSTABS /TABLES x BY y /COUNT CASE ROUND. CROSSTABS /TABLES x BY y /COUNT CASE TRUNCATE. * Round cell weights. CROSSTABS /TABLES x BY y /COUNT. CROSSTABS /TABLES x BY y /COUNT TRUNCATE. ]]) AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [[Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,9.00,100.0%,.00,0.0%,9.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,2.80,3.20,6.00 2.00,1.00,2.00,3.00 Total,3.80,5.20,9.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,9.00,100.0%,.00,0.0%,9.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,2.80,3.20,6.00 2.00,1.00,2.00,3.00 Total,3.80,5.20,9.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,9.00,100.0%,.00,0.0%,9.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,2.00,4.00,6.00 2.00,1.00,2.00,3.00 Total,3.00,6.00,9.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,7.00,100.0%,.00,0.0%,7.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,2.00,2.00,4.00 2.00,1.00,2.00,3.00 Total,3.00,4.00,7.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,9.00,100.0%,.00,0.0%,9.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,3.00,3.00,6.00 2.00,1.00,2.00,3.00 Total,4.00,5.00,9.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,8.00,100.0%,.00,0.0%,8.00,100.0% Table: x * y [count]. ,y,, x,1.00,2.00,Total 1.00,2.00,3.00,5.00 2.00,1.00,2.00,3.00 Total,3.00,5.00,8.00 ]]) AT_CLEANUP AT_SETUP([CROSSTABS descending sort order]) AT_DATA([crosstabs-descending.sps], [[DATA LIST NOTABLE LIST /x * y *. BEGIN DATA. 2 2 2 2 3 1 4 1 3 2 3 2 END DATA. CROSSTABS /TABLES= x BY y /FORMAT = DVALUE. ]]) AT_CHECK([pspp -O format=csv crosstabs-descending.sps], [0], [[Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,6,100.0%,0,0.0%,6,100.0% Table: x * y [count]. ,y,, x,2.00,1.00,Total 4.00,.00,1.00,1.00 3.00,2.00,1.00,3.00 2.00,2.00,.00,2.00 Total,4.00,2.00,6.00 ]]) AT_CLEANUP # Bug #31260. AT_SETUP([CROSSTABS crash when all cases missing]) AT_DATA([crosstabs.sps], [dnl DATA LIST LIST NOTABLE /X1 X2. BEGIN DATA. 1 1 END DATA. MISSING VALUES x2 (1). CROSSTABS /TABLES= X1 by X2. ]) AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X1 * X2,0,0.0%,1,100.0%,1,100.0% crosstabs.sps:8: warning: CROSSTABS: Crosstabulation X1 * X2 contained no non-missing cases. ]) AT_CLEANUP dnl This example comes from http://www.ats.ucla.edu/stat/spss/whatstat/whatstat.htm#chisq AT_SETUP([CROSSTABS Fisher Exact Test]) AT_DATA([fisher-exact.sps], [dnl SET FORMAT F12.3. SET DECIMAL DOT. DATA LIST notable LIST /schtyp (F9.2) female (F9.2) ses (F9.2) . begin data. 1.00 .00 1.00 1.00 1.00 2.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 1.00 1.00 .00 1.00 1.00 .00 3.00 2.00 .00 2.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 2.00 .00 2.00 2.00 .00 3.00 1.00 .00 1.00 1.00 .00 2.00 1.00 .00 3.00 2.00 .00 3.00 1.00 .00 2.00 2.00 .00 3.00 1.00 .00 3.00 2.00 .00 2.00 1.00 .00 3.00 1.00 .00 1.00 1.00 .00 2.00 2.00 .00 2.00 2.00 .00 2.00 1.00 .00 2.00 1.00 .00 1.00 1.00 .00 3.00 1.00 .00 1.00 1.00 .00 3.00 1.00 .00 2.00 2.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 2.00 2.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 1.00 1.00 .00 2.00 2.00 .00 2.00 1.00 .00 2.00 2.00 .00 2.00 1.00 .00 3.00 1.00 .00 1.00 1.00 .00 2.00 2.00 .00 3.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 1.00 1.00 .00 1.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 2.00 1.00 .00 1.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 1.00 2.00 .00 2.00 1.00 .00 1.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 3.00 1.00 .00 2.00 1.00 .00 1.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 2.00 1.00 3.00 1.00 1.00 3.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 3.00 1.00 1.00 1.00 2.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 3.00 2.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 2.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 2.00 1.00 3.00 1.00 1.00 2.00 2.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 2.00 2.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 1.00 2.00 1.00 2.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 2.00 2.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 2.00 1.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 1.00 2.00 2.00 1.00 3.00 1.00 1.00 1.00 1.00 1.00 1.00 2.00 1.00 3.00 2.00 1.00 2.00 1.00 1.00 3.00 2.00 1.00 2.00 2.00 1.00 2.00 1.00 1.00 2.00 2.00 1.00 2.00 1.00 1.00 2.00 1.00 1.00 3.00 end data. VARIABLE LABEL schtyp 'type of school'. ADD VALUE LABELS female 0 male 1 female. ADD VALUE LABELS ses 1 low 2 middle 3 high. ADD VALUE LABELS schtyp 1 public 2 private. crosstabs /tables = schtyp by female /statistic = chisq. crosstabs /tables = female by ses /statistic = chisq. ]) AT_CHECK([pspp -O format=csv fisher-exact.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent type of school * female,200,100.0%,0,0.0%,200,100.0% Table: type of school * female [[count]]. ,female,, type of school,male,female,Total public,77.000,91.000,168.000 private,14.000,18.000,32.000 Total,91.000,109.000,200.000 Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed),Exact Sig. (2-tailed),Exact Sig. (1-tailed) Pearson Chi-Square,.047,1,.828,, Likelihood Ratio,.047,1,.828,, Fisher's Exact Test,,,,.849,.492 Continuity Correction,.001,1,.981,, Linear-by-Linear Association,.047,1,.829,, N of Valid Cases,200,,,, Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent female * ses,200,100.0%,0,0.0%,200,100.0% Table: female * ses [[count]]. ,ses,,, female,low,middle,high,Total male,15.000,47.000,29.000,91.000 female,32.000,48.000,29.000,109.000 Total,47.000,95.000,58.000,200.000 Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed) Pearson Chi-Square,4.577,2,.101 Likelihood Ratio,4.679,2,.096 Linear-by-Linear Association,3.110,1,.078 N of Valid Cases,200,, ]) AT_CLEANUP AT_SETUP([CROSSTABS Pearson's R]) # Test 1. AT_DATA([pearson.sps], [dnl SET FORMAT F8.3. * From http://www.statisticslectures.com/topics/pearsonr/. DATA LIST FREE/x y. BEGIN DATA. 1 4 3 6 5 10 5 12 6 13 END DATA. CROSSTABS x BY y/STATISTICS=CORR. ]) AT_CHECK([pspp -O format=csv pearson.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,5,100.0%,0,0.0%,5,100.0% Table: x * y [[count]]. ,y,,,,, x,4.000,6.000,10.000,12.000,13.000,Total 1.000,1.000,.000,.000,.000,.000,1.000 3.000,.000,1.000,.000,.000,.000,1.000 5.000,.000,.000,1.000,1.000,.000,2.000 6.000,.000,.000,.000,.000,1.000,1.000 Total,1.000,1.000,1.000,1.000,1.000,5.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Spearman Correlation,.975,.022,7.550, Interval by Interval,Pearson's R,.968,.017,6.708, N of Valid Cases,,5,,, ]) # Test 2. AT_DATA([pearson2.sps], [dnl SET FORMAT F8.3. * Checked with http://www.socscistatistics.com/tests/pearson/Default2.aspx. DATA LIST FREE/x y. BEGIN DATA. 1 1.5 2 1.5 3 4 4 6 5 5 6 7 7 6.5 8 9 9 10.5 10 11 END DATA. CROSSTABS x BY y/STATISTICS=CORR. ]) AT_CHECK([pspp -O format=csv pearson2.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,10,100.0%,0,0.0%,10,100.0% Table: x * y [[count]]. ,y,,,,,,,,, x,1.500,4.000,5.000,6.000,6.500,7.000,9.000,10.500,11.000,Total 1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 2.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 3.000,.000,1.000,.000,.000,.000,.000,.000,.000,.000,1.000 4.000,.000,.000,.000,1.000,.000,.000,.000,.000,.000,1.000 5.000,.000,.000,1.000,.000,.000,.000,.000,.000,.000,1.000 6.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,1.000 7.000,.000,.000,.000,.000,1.000,.000,.000,.000,.000,1.000 8.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,1.000 9.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,1.000 10.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000 Total,2.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,10.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Spearman Correlation,.973,.015,11.844, Interval by Interval,Pearson's R,.971,.017,11.580, N of Valid Cases,,10,,, ]) # Test 3. AT_DATA([pearson3.sps], [dnl SET FORMAT F8.3. * From http://learntech.uwe.ac.uk/da/Default.aspx?pageid=1442. DATA LIST FREE/x y. BEGIN DATA. 56 87 56 91 65 85 65 91 50 75 25 28 87 122 44 66 35 58 END DATA. CROSSTABS x BY y/STATISTICS=CORR. ]) AT_CHECK([pspp -O format=csv pearson3.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,9,100.0%,0,0.0%,9,100.0% Table: x * y [[count]]. ,y,,,,,,,, x,28.000,58.000,66.000,75.000,85.000,87.000,91.000,122.000,Total 25.000,1.000,.000,.000,.000,.000,.000,.000,.000,1.000 35.000,.000,1.000,.000,.000,.000,.000,.000,.000,1.000 44.000,.000,.000,1.000,.000,.000,.000,.000,.000,1.000 50.000,.000,.000,.000,1.000,.000,.000,.000,.000,1.000 56.000,.000,.000,.000,.000,.000,1.000,1.000,.000,2.000 65.000,.000,.000,.000,.000,1.000,.000,1.000,.000,2.000 87.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000 Total,1.000,1.000,1.000,1.000,1.000,1.000,2.000,1.000,9.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Spearman Correlation,.911,.068,5.860, Interval by Interval,Pearson's R,.966,.017,9.915, N of Valid Cases,,9,,, ]) # Test 4. AT_DATA([pearson4.sps], [dnl SET FORMAT F8.3. * From http://psychology.ucdavis.edu/faculty_sites/sommerb/sommerdemo/correlation/hand/pearson_hand.htm. DATA LIST FREE/x y. BEGIN DATA. 5 5 10 20 6 4 8 15 4 11 4 9 3 12 10 18 2 7 6 2 7 14 9 17 END DATA. CROSSTABS x BY y/STATISTICS=CORR. ]) AT_CHECK([pspp -O format=csv pearson4.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,12,100.0%,0,0.0%,12,100.0% Table: x * y [[count]]. ,y,,,,,,,,,,,, x,2.000,4.000,5.000,7.000,9.000,11.000,12.000,14.000,15.000,17.000,18.000,20.000,Total 2.000,.000,.000,.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 3.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,.000,.000,1.000 4.000,.000,.000,.000,.000,1.000,1.000,.000,.000,.000,.000,.000,.000,2.000 5.000,.000,.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 6.000,1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,2.000 7.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,.000,1.000 8.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,1.000 9.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,1.000 10.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,2.000 Total,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,12.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Spearman Correlation,.657,.140,2.758, Interval by Interval,Pearson's R,.667,.132,2.830, N of Valid Cases,,12,,, ]) # Test 5. AT_DATA([pearson5.sps], [dnl SET FORMAT F8.3. * From http://www.statisticslectures.com/topics/pearsonr/. DATA LIST FREE/x y. BEGIN DATA. 18 15000 25 29000 57 68000 45 52000 26 32000 64 80000 37 41000 40 45000 24 26000 33 33000 END DATA. CROSSTABS x BY y/STATISTICS=CORR. ]) AT_CHECK([pspp -O format=csv pearson5.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,10,100.0%,0,0.0%,10,100.0% Table: x * y [[count]]. ,y,,,,,,,,,, x,15000.000,26000.000,29000.000,32000.000,33000.000,41000.000,45000.000,52000.000,68000.000,80000.000,Total 18.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 24.000,.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000 25.000,.000,.000,1.000,.000,.000,.000,.000,.000,.000,.000,1.000 26.000,.000,.000,.000,1.000,.000,.000,.000,.000,.000,.000,1.000 33.000,.000,.000,.000,.000,1.000,.000,.000,.000,.000,.000,1.000 37.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,.000,1.000 40.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,.000,1.000 45.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,.000,1.000 57.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,.000,1.000 64.000,.000,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000 Total,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,10.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Spearman Correlation,1.000,.000,+Infinity, Interval by Interval,Pearson's R,.992,.004,22.638, N of Valid Cases,,10,,, ]) AT_CLEANUP AT_SETUP([CROSSTABS Goodman and Kruskal's lambda]) AT_DATA([lambda.sps], [dnl SET FORMAT F8.3. * From http://www.csupomona.edu/~jlkorey/POWERMUTT/Topics/contingency_tables.html. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 424 1 2 213 1 3 59 3 1 55 3 2 188 3 3 357 END DATA. CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA. * From http://vassarstats.net. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 19 1 2 26 1 3 8 2 1 21 2 2 13 2 3 5 3 1 6 3 2 12 3 3 27 END DATA. CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA. * From Goodman, L.A., Kruskal, W.H. (1954) "Measures of association for cross classifications". Part I. Journal of the American Statistical Association, 49, 732-764. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 1768 1 2 807 1 3 189 1 4 47 2 1 946 2 2 1387 2 3 746 2 4 53 3 1 115 3 2 438 3 3 288 3 4 16 END DATA. CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA. ]) AT_CHECK([pspp -O format=csv lambda.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,1296.000,100.0%,.000,0.0%,1296.000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.423,.021,16.875,.000 ,,x Dependent,.497,.024,15.986,.000 ,,y Dependent,.370,.020,16.339,.000 ,Goodman and Kruskal tau,x Dependent,.382,,,. @&t@ ,,y Dependent,.198,,,. @&t@ Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,137.000,100.0%,.000,0.0%,137.000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.259,.081,2.902,.004 ,,x Dependent,.250,.089,2.479,.013 ,,y Dependent,.267,.085,2.766,.006 ,Goodman and Kruskal tau,x Dependent,.129,,,. @&t@ ,,y Dependent,.123,,,. @&t@ Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,6800.000,100.0%,.000,0.0%,6800.000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.208,.010,18.793,.000 ,,x Dependent,.224,.013,16.076,.000 ,,y Dependent,.192,.012,14.438,.000 ,Goodman and Kruskal tau,x Dependent,.089,,,. @&t@ ,,y Dependent,.081,,,. @&t@ ]) AT_CLEANUP AT_SETUP([CROSSTABS Goodman and Kruskal's lambda - treatment of ties]) AT_DATA([lambda.sps], [dnl SET FORMAT F8.3. * From Douglas Bonett. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 225 1 2 43 1 3 216 2 1 3 2 2 1 2 3 12 END DATA. CROSSTABS x BY y/CELLS=NONE/STATISTICS=LAMBDA. ]) AT_CHECK([pspp -O format=csv lambda.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,500.000,100.0%,.000,0.0%,500.000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.031,.013,2.336,.019 ,,x Dependent,.000,.000,NaN,NaN ,,y Dependent,.033,.014,2.336,.019 ,Goodman and Kruskal tau,x Dependent,.012,,,. @&t@ ,,y Dependent,.009,,,. @&t@ ]) AT_CLEANUP AT_SETUP([CROSSTABS Somers' D, Tau-B, Tau-C, Gamma]) AT_DATA([somersd.sps], [dnl SET FORMAT F8.3. * From http://stats.stackexchange.com/questions/72203/problem-with-calculating-asymptotic-standard-error-for-somers-d. DATA LIST LIST NOTABLE/x y * w (F10.6). WEIGHT BY w. BEGIN DATA. 1 1 0.000025 1 2 0.0001 1 3 0.001 1 4 0.0025 1 5 0.004 1 6 0.0075 1 7 0.0125 2 1 0.049975 2 2 0.0999 2 3 0.199 2 4 0.2475 2 5 0.196 2 6 0.1425 2 7 0.0375 END DATA. CROSSTABS x BY y/STATISTICS=D/CELLS=NONE. * From http://uregina.ca/~gingrich/gamma.pdf. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 34 1 2 24 1 3 15 2 1 42 2 2 74 2 3 67 3 1 28 3 2 111 3 3 292 END DATA. CROSSTABS x BY y/STATISTICS=BTAU CTAU GAMMA D/CELLS=NONE. ]) AT_CHECK([pspp -O format=csv somersd.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,1.000000,100.0%,.000000,0.0%,1.000000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,-.084,,-.149,.882 ,,x Dependent,-.045,.300,-.149,.882 ,,y Dependent,-.684,2.378,-.149,.882 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,687.000,100.0%,.000,0.0%,687.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,.372,.033,10.669, ,Kendall's tau-c,.310,.029,10.669, ,Gamma,.591,.043,10.669, N of Valid Cases,,687.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,.371,,10.669,.000 ,,x Dependent,.351,.032,10.669,.000 ,,y Dependent,.394,.035,10.669,.000 ]) AT_DATA([ordinal.sps], [dnl SET FORMAT F8.3. * From https://www.iup.edu/WorkArea/DownloadAsset.aspx?id=9829, "Case 1". DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 2 40 2 3 80 3 4 30 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 2. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 1 40 2 3 80 3 4 30 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 3. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 4 40 2 3 80 3 2 30 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 4. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 1 20 1 2 20 2 3 80 3 4 30 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 5. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 2 40 2 2 80 3 2 29 3 3 1 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 6. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 1 3 1 2 6 1 3 28 1 4 61 2 1 4 2 2 5 2 3 21 2 4 20 END DATA. CROSSTABS x BY y/STATISTICS=GAMMA D BTAU/CELLS=NONE. * Same site, case 7. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 1 38 1 2 6 1 3 3 1 4 51 2 1 4 2 2 20 2 3 21 2 4 5 END DATA. CROSSTABS x BY y/STATISTICS=LAMBDA D PHI GAMMA/CELLS=NONE. * Same site, case 8. DATA LIST LIST NOTABLE /x y w. WEIGHT BY w. BEGIN DATA. 1 1 2 1 2 3 1 3 5 1 4 1 2 1 2 2 2 16 2 3 3 2 4 6 3 1 3 3 2 10 3 3 35 3 4 27 4 1 6 4 2 15 4 3 33 4 4 45 END DATA. CROSSTABS x BY y/STATISTICS=LAMBDA D PHI BTAU/CELLS=NONE. ]) AT_CHECK([pspp -O format=csv ordinal.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,150.000,100.0%,.000,0.0%,150.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,1.000,.000,24.841, ,Gamma,1.000,.000,24.841, N of Valid Cases,,150.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,1.000,,24.841,.000 ,,x Dependent,1.000,.000,24.841,.000 ,,y Dependent,1.000,.000,24.841,.000 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,150.000,100.0%,.000,0.0%,150.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,1.000,.000,24.841, ,Gamma,1.000,.000,24.841, N of Valid Cases,,150.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,1.000,,24.841,.000 ,,x Dependent,1.000,.000,24.841,.000 ,,y Dependent,1.000,.000,24.841,.000 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,150.000,100.0%,.000,0.0%,150.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,-1.000,.000,-24.841, ,Gamma,-1.000,.000,-24.841, N of Valid Cases,,150.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,-1.000,,-24.841,.000 ,,x Dependent,-1.000,.000,-24.841,.000 ,,y Dependent,-1.000,.000,-24.841,.000 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,150.000,100.0%,.000,0.0%,150.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,.972,.007,24.841, ,Gamma,1.000,.000,24.841, N of Valid Cases,,150.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,.971,,24.841,.000 ,,x Dependent,.944,.013,24.841,.000 ,,y Dependent,1.000,.000,24.841,.000 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,150.000,100.0%,.000,0.0%,150.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,.119,.059,1.009, ,Gamma,1.000,.000,1.009, N of Valid Cases,,150.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,.035,,1.009,.313 ,,x Dependent,.805,.032,1.009,.313 ,,y Dependent,.018,.017,1.009,.313 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,148.000,100.0%,.000,0.0%,148.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Kendall's tau-b,-.208,.078,-2.641, ,Gamma,-.381,.130,-2.641, N of Valid Cases,,148.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Ordinal by Ordinal,Somers' d,Symmetric,-.206,,-2.641,.008 ,,x Dependent,-.182,.069,-2.641,.008 ,,y Dependent,-.237,.089,-2.641,.008 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,148.000,100.0%,.000,0.0%,148.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Phi,.731,,, ,Cramer's V,.731,,, Ordinal by Ordinal,Gamma,-.110,.107,-1.022, N of Valid Cases,,148.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.338,.059,4.743,.000 ,,x Dependent,.640,.085,4.875,.000 ,,y Dependent,.174,.050,3.248,.001 ,Goodman and Kruskal tau,x Dependent,.534,,,. @&t@ ,,y Dependent,.167,,,. @&t@ Ordinal by Ordinal,Somers' d,Symmetric,-.074,,-1.022,.307 ,,x Dependent,-.060,.059,-1.022,.307 ,,y Dependent,-.096,.094,-1.022,.307 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,212.000,100.0%,.000,0.0%,212.000,100.0% Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Phi,.432,,, ,Cramer's V,.249,,, Ordinal by Ordinal,Kendall's tau-b,.209,.062,3.338, N of Valid Cases,,212.000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.102,.067,1.473,.141 ,,x Dependent,.027,.087,.302,.763 ,,y Dependent,.165,.065,2.349,.019 ,Goodman and Kruskal tau,x Dependent,.051,,,. @&t@ ,,y Dependent,.068,,,. @&t@ Ordinal by Ordinal,Somers' d,Symmetric,.209,,3.338,.001 ,,x Dependent,.202,.060,3.338,.001 ,,y Dependent,.217,.064,3.338,.001 ]) AT_CLEANUP AT_SETUP([CROSSTABS Cohens Kappa]) dnl Example from Wood J. M. dnl "Understanding and Computing Cohen's Kappa: A Tutorial" dnl WebPsychEmpiricist. Oct 3 2007 AT_DATA([kappa.sps], [dnl SET FORMAT=F8.3. data list notable list /p1 * p2 * w *. begin data. 0 0 18 1 0 1 0 1 1 end data. weight by w. crosstabs /table = p1 by p2 statistics = kappa . ]) AT_CHECK([pspp -O format=csv kappa.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent p1 * p2,20.000,100.0%,.000,0.0%,20.000,100.0% Table: p1 * p2 [[count]]. ,p2,, p1,.000,1.000,Total .000,18.000,1.000,19.000 1.000,1.000,.000,1.000 Total,19.000,1.000,20.000 Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Measure of Agreement,Kappa,-.053,.037,-.235, N of Valid Cases,,20.000,,, ]) AT_CLEANUP AT_SETUP([CROSSTABS many statistics]) AT_DATA([crosstabs.sps], [dnl SET FORMAT=F8.4. * From http://www4.stat.ncsu.edu/~dzhang2/st744/table3.9.lst.txt. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 25 1 2 25 1 3 12 2 2 1 2 3 3 END DATA. CROSSTABS x BY y/STATISTICS=CHISQ PHI CC LAMBDA UC BTAU CTAU GAMMA D CORR/CELLS=NONE. ]) AT_CHECK([pspp -O format=csv crosstabs.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,66.0000,100.0%,.0000,0.0%,66.0000,100.0% Table: Chi-square tests. Statistic,Value,df,Asymp. Sig. (2-tailed) Pearson Chi-Square,6.9562,2.0000,.031 Likelihood Ratio,6.6901,2.0000,.035 Linear-by-Linear Association,5.8450,1.0000,.016 N of Valid Cases,66.0000,, Table: Symmetric measures. Category,Statistic,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Phi,.3246,,, ,Cramer's V,.3246,,, ,Contingency Coefficient,.3088,,, Ordinal by Ordinal,Kendall's tau-b,.2752,.0856,1.9920, ,Kendall's tau-c,.1497,.0751,1.9920, ,Gamma,.8717,.1250,1.9920, ,Spearman Correlation,.2908,.0906,2.4311, Interval by Interval,Pearson's R,.2999,.0973,2.5147, N of Valid Cases,,66.0000,,, Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.0455,.1629,.2723,.785 ,,x Dependent,.0000,.0000,NaN,NaN ,,y Dependent,.0500,.1791,.2723,.785 ,Goodman and Kruskal tau,x Dependent,.1054,,,. @&t@ ,,y Dependent,.0434,,,. @&t@ ,Uncertainty Coefficient,Symmetric,.0780,.0474,,. @&t@ ,,x Dependent,.2217,.1062,1.5373,. @&t@ ,,y Dependent,.0473,.0306,1.5373,. @&t@ Ordinal by Ordinal,Somers' d,Symmetric,.1960,,1.9920,.046 ,,x Dependent,.1152,.0572,1.9920,.046 ,,y Dependent,.6573,.1417,1.9920,.046 ]) AT_CLEANUP AT_SETUP([CROSSTABS uncertainy coefficient]) AT_DATA([uc.sps], [dnl * From http://groups.chass.utoronto.ca/pol242/5bMeasuringAssociation.htm. SET FORMAT=F8.3. DATA LIST LIST NOTABLE/x y w. WEIGHT BY w. BEGIN DATA. 1 1 416 1 2 121 2 1 335 2 2 2 3 1 112 3 2 1 END DATA. CROSSTABS x BY y/STATISTICS=LAMBDA UC/CELLS=NONE. ]) AT_CHECK([pspp -O format=csv uc.sps], [0], [dnl Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent x * y,987.000,100.0%,.000,0.0%,987.000,100.0% Table: Directional measures. Category,Statistic,Type,Value,Asymp. Std. Error,Approx. T,Approx. Sig. Nominal by Nominal,Lambda,Symmetric,.000,.000,NaN,NaN ,,x Dependent,.000,.000,NaN,NaN ,,y Dependent,.000,.000,NaN,NaN ,Goodman and Kruskal tau,x Dependent,.076,,,. @&t@ ,,y Dependent,.108,,,. @&t@ ,Uncertainty Coefficient,Symmetric,.105,.012,,. @&t@ ,,x Dependent,.073,.009,7.890,. @&t@ ,,y Dependent,.184,.019,7.890,. @&t@ ]) AT_CLEANUP AT_SETUP([CROSSTABS barchart]) AT_DATA([bc.sps], [dnl SET FORMAT=F8.3. DATA LIST LIST NOTABLE /x (a20) y (f8) z (f8) w (f8) . BEGIN DATA. This 1 0 416 That 2 0 121 Other 2 0 335 This 2 0 231 That 3 0 112 Other 4 0 130 This 1 1 160 That 2 1 211 Other 2 1 352 This 2 1 212 That 3 1 121 Other 4 1 101 END DATA. WEIGHT BY w. CROSSTABS /table x BY y BY z /table x BY y /barchart. ]) AT_CHECK([pspp -O format=txt -o xxx bc.sps], [0], [ignore]) AT_CHECK([test -e xxx-1.png], [0], [ignore]) AT_CHECK([test -e xxx-2.png], [0], [ignore]) AT_CHECK([diff xxx-1.png xxx-2.png], [0], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/stats/logistic.at0000644000175000017500000012370413137223525015654 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([LOGISTIC REGRESSION]) dnl These examples are adapted from dnl http://www.uvm.edu/~dhowell/gradstat/psych341/lectures/Logistic%20Regression/LogisticReg1.html m4_define([LOGIT_TEST_DATA], [AT_DATA([lr-data.txt], dnl 105.00 1.00 33.00 3.00 2.00 .35 17.00 20.00 .50110 -2.00440 1 106.00 1.00 50.00 2.00 3.00 .38 7.00 15.00 .20168 -1.25264 1 107.00 1.00 91.00 3.00 2.00 .28 15.00 7.00 .00897 -1.00905 1 108.00 1.00 90.00 3.00 2.00 .20 2.00 2.00 .00972 -1.00982 1 109.00 1.00 70.00 3.00 3.00 .38 23.00 27.00 .04745 -1.04981 1 111.00 2.00 31.00 2.00 2.00 .00 19.00 10.00 .54159 1.84640 1 112.00 1.00 91.00 2.00 3.00 .18 6.00 16.00 .00897 -1.00905 1 113.00 1.00 81.00 3.00 2.00 .00 3.00 9.00 .01998 -1.02039 1 114.00 2.00 15.00 1.00 2.00 .13 19.00 13.00 .81241 1.23090 1 116.00 2.00 1.00 1.00 2.00 .88 15.00 7.00 .93102 1.07410 1 117.00 1.00 93.00 3.00 2.00 .18 9.00 15.00 .00764 -1.00770 1 118.00 2.00 14.00 1.00 3.00 .15 23.00 18.00 .82447 1.21289 1 120.00 1.00 91.00 2.00 2.00 .43 17.00 14.00 .00897 -1.00905 1 121.00 1.00 55.00 3.00 2.00 .69 20.00 14.00 .14409 -1.16834 1 122.00 1.00 70.00 2.00 3.00 .03 .00 6.00 .04745 -1.04981 1 123.00 1.00 25.00 2.00 2.00 .45 4.00 10.00 .65789 -2.92301 1 125.00 1.00 91.00 2.00 2.00 .13 .00 3.00 .00897 -1.00905 1 126.00 1.00 91.00 3.00 3.00 .23 4.00 6.00 .00897 -1.00905 1 127.00 1.00 91.00 3.00 2.00 .00 8.00 8.00 .00897 -1.00905 1 128.00 2.00 13.00 2.00 2.00 .65 16.00 14.00 .83592 1.19629 1 129.00 1.00 50.00 2.00 2.00 .25 20.00 23.00 .20168 -1.25264 1 135.00 1.00 90.00 3.00 3.00 .03 5.00 12.00 .00972 -1.00982 1 138.00 1.00 70.00 3.00 3.00 .10 1.00 6.00 .04745 -1.04981 1 139.00 2.00 19.00 3.00 3.00 .10 11.00 12.00 .75787 1.31949 1 149.00 2.00 50.00 3.00 2.00 .03 .00 .00 .20168 4.95826 1 204.00 1.00 50.00 3.00 1.00 .13 .00 1.00 .20168 -1.25264 1 205.00 1.00 91.00 3.00 3.00 .72 16.00 18.00 .00897 -1.00905 1 206.00 2.00 24.00 1.00 1.00 .10 5.00 21.00 .67592 1.47947 1 207.00 1.00 80.00 3.00 3.00 .13 6.00 7.00 .02164 -1.02212 1 208.00 1.00 87.00 2.00 2.00 .18 9.00 20.00 .01237 -1.01253 1 209.00 1.00 70.00 2.00 2.00 .53 15.00 12.00 .04745 -1.04981 1 211.00 1.00 55.00 2.00 1.00 .33 8.00 5.00 .14409 -1.16834 1 212.00 1.00 56.00 3.00 1.00 .30 6.00 20.00 .13436 -1.15522 1 214.00 1.00 54.00 2.00 2.00 .15 .00 16.00 .15439 -1.18258 1 215.00 1.00 71.00 3.00 3.00 .35 12.00 12.00 .04391 -1.04592 1 217.00 2.00 36.00 1.00 1.00 .10 12.00 8.00 .44049 2.27020 1 218.00 1.00 91.00 2.00 2.00 .05 11.00 25.00 .00897 -1.00905 1 219.00 1.00 91.00 2.00 2.00 1.23 11.00 24.00 .00897 -1.00905 1 220.00 1.00 91.00 2.00 3.00 .08 8.00 11.00 .00897 -1.00905 1 221.00 1.00 91.00 2.00 2.00 .33 5.00 11.00 .00897 -1.00905 1 222.00 2.00 36.00 2.00 1.00 .18 5.00 3.00 .44049 2.27020 1 223.00 1.00 70.00 2.00 3.00 .18 14.00 3.00 .04745 -1.04981 1 224.00 1.00 91.00 2.00 2.00 .43 2.00 10.00 .00897 -1.00905 1 225.00 1.00 55.00 2.00 1.00 .18 6.00 11.00 .14409 -1.16834 1 229.00 2.00 75.00 2.00 2.00 .40 30.00 25.00 .03212 31.12941 1 232.00 1.00 91.00 3.00 2.00 .15 6.00 3.00 .00897 -1.00905 1 233.00 1.00 70.00 2.00 1.00 .00 11.00 8.00 .04745 -1.04981 1 234.00 1.00 54.00 3.00 2.00 .10 .00 .00 .15439 -1.18258 1 237.00 1.00 70.00 3.00 2.00 .18 5.00 25.00 .04745 -1.04981 1 241.00 1.00 19.00 2.00 3.00 .33 13.00 9.00 .75787 -4.12995 1 304.00 2.00 18.00 2.00 2.00 .26 25.00 6.00 .77245 1.29458 1 305.00 1.00 88.00 3.00 2.00 1.35 17.00 29.00 .01142 -1.01155 1 306.00 1.00 70.00 2.00 3.00 .63 14.00 33.00 .04745 -1.04981 1 307.00 1.00 85.00 2.00 2.00 2.65 18.00 14.00 .01452 -1.01474 1 308.00 1.00 13.00 2.00 2.00 .23 5.00 5.00 .83592 -6.09442 1 309.00 2.00 13.00 2.00 2.00 .23 7.00 17.00 .83592 1.19629 1 311.00 2.00 1.00 2.00 2.00 .50 20.00 14.00 .93102 1.07410 1 315.00 1.00 19.00 2.00 3.00 .18 1.00 11.00 .75787 -4.12995 1 316.00 1.00 88.00 2.00 2.00 .38 12.00 11.00 .01142 -1.01155 2 318.00 1.00 88.00 3.00 2.00 .03 5.00 5.00 .01142 -1.01155 3 319.00 2.00 18.00 2.00 3.00 .30 15.00 16.00 .77245 1.29458 1 321.00 2.00 15.00 2.00 2.00 .63 15.00 18.00 .81241 1.23090 1 322.00 1.00 88.00 3.00 2.00 .40 18.00 15.00 .01142 -1.01155 1 325.00 2.00 18.00 2.00 3.00 1.00 28.00 18.00 .77245 1.29458 1 329.00 1.00 88.00 3.00 2.00 .03 7.00 11.00 .01142 -1.01155 4 332.00 2.00 2.00 2.00 2.00 .05 8.00 9.00 .92562 1.08036 1 )]) dnl Note: In the above data cases 305, 316 318 and 329 have identical values dnl of the 2nd and 3rd variables. We use this for weight testing. AT_SETUP([LOGISTIC REGRESSION basic test]) LOGIT_TEST_DATA AT_DATA([lr-data.sps], [dnl set format = F12.3. set decimal dot. data list notable file='lr-data.txt' list /id outcome survrate prognos amttreat gsi avoid intrus pre_1 lre_1 w *. logistic regression variables = outcome with survrate . ]) AT_CHECK([pspp -O format=csv lr-data.sps], [0], [dnl Table: Dependent Variable Encoding Original Value,Internal Value 1.000,0 2.000,1 Table: Case Processing Summary Unweighted Cases,N,Percent Included in Analysis,66,100.000 Missing Cases,0,.000 Total,66,100.000 note: Estimation terminated at iteration number 6 because parameter estimates changed by less than 0.001 Table: Model Summary Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square ,37.323,.455,.659 Table: Classification Table ,,,Predicted,, ,,,outcome,,"Percentage Correct" ,Observed,,1.000,2.000, Step 1,outcome,1.000,43,5,89.583 ,,2.000,4,14,77.778 ,Overall Percentage,,,,86.364 Table: Variables in the Equation ,,B,S.E.,Wald,df,Sig.,Exp(B) Step 1,survrate,-.081,.019,17.756,1,.000,.922 ,Constant,2.684,.811,10.941,1,.001,14.639 ]) AT_CLEANUP AT_SETUP([LOGISTIC REGRESSION missing values]) LOGIT_TEST_DATA AT_DATA([lr-data.sps], [dnl set format = F12.3. set decimal dot. data list notable file='lr-data.txt' list /id outcome survrate prognos amttreat gsi avoid intrus pre_1 lre_1 w *. missing values survrate (999) avoid (44444) outcome (99). logistic regression variables = outcome with survrate avoid . ]) AT_CHECK([pspp -O format=csv lr-data.sps > run0], [0], [ignore]) dnl Append some cases with missing values into the data. cat >> lr-data.txt << HERE 105.00 1.00 999.00 3.00 2.00 .35 17.00 20.00 .50110 -2.00440 1 106.00 1.00 999.00 2.00 3.00 .38 7.00 15.00 .20168 -1.25264 1 107.00 1.00 5.00 3.00 2.00 .28 44444 34 .00897 -1.00905 1 108.00 99 5.00 3.00 2.00 .28 4 34 .00897 -1.00905 1 HERE AT_CHECK([pspp -O format=csv lr-data.sps > run1], [0], [ignore]) dnl Only the summary information should be different AT_CHECK([diff run0 run1], [1], [dnl 8,10c8,10 < Included in Analysis,66,100.000 < Missing Cases,0,.000 < Total,66,100.000 --- > Included in Analysis,66,94.286 > Missing Cases,4,5.714 > Total,70,100.000 ]) AT_CLEANUP dnl Check that a weighted dataset is interpreted correctly dnl To do this, the same data set is used, one weighted, one not. dnl The weighted dataset omits certain cases which are identical AT_SETUP([LOGISTIC REGRESSION weights]) LOGIT_TEST_DATA AT_DATA([lr-data-unweighted.sps], [dnl set format = F12.3. set decimal dot. data list notable file='lr-data.txt' list /id outcome survrate prognos amttreat gsi avoid intrus pre_1 lre_1 w *. logistic regression variables = outcome with survrate . ]) AT_DATA([lr-data-weighted.sps], [dnl set format = F12.3. set decimal dot. data list notable file='lr-data.txt' list /id outcome survrate prognos amttreat gsi avoid intrus pre_1 lre_1 w *. weight by w. * Omit duplicate cases. select if id <> 305 and id <> 316 and id <> 318. logistic regression variables = outcome with survrate . ]) AT_CHECK([pspp -O format=csv lr-data-unweighted.sps > unweighted-result], [0], [ignore]) AT_CHECK([pspp -O format=csv lr-data-weighted.sps > weighted-result], [0], [ignore]) dnl The only difference should be the summary information, since dnl this displays the unweighted totals. AT_CHECK([diff unweighted-result weighted-result], [1], [dnl 8c8 < Included in Analysis,66,100.000 --- > Included in Analysis,63,100.000 10c10 < Total,66,100.000 --- > Total,63,100.000 23,24c23,24 < Step 1,outcome,1.000,43,5,89.583 < ,,2.000,4,14,77.778 --- > Step 1,outcome,1.000,43.000,5.000,89.583 > ,,2.000,4.000,14.000,77.778 ]) AT_CLEANUP dnl Check that the /NOCONST option works as intended. dnl The results this produces are very similar to those dnl at the example in http://www.ats.ucla.edu/stat/SPSS/faq/logregconst.htm AT_SETUP([LOGISTIC REGRESSION without constant]) AT_DATA([non-const.sps], [dnl set format=F20.3. input program. loop #i = 1 to 200. compute female = (#i > 91). end case. end loop. end file. end input program. compute constant = 1. logistic regression female with constant /noconst. ]) AT_CHECK([pspp -O format=csv non-const.sps], [0], [dnl Table: Dependent Variable Encoding Original Value,Internal Value .00,0 1.00,1 Table: Case Processing Summary Unweighted Cases,N,Percent Included in Analysis,200,100.000 Missing Cases,0,.000 Total,200,100.000 note: Estimation terminated at iteration number 2 because parameter estimates changed by less than 0.001 Table: Model Summary Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square ,275.637,.008,.011 Table: Classification Table ,,,Predicted,, ,,,female,,"Percentage Correct" ,Observed,,.00,1.00, Step 1,female,.00,0,91,.000 ,,1.00,0,109,100.000 ,Overall Percentage,,,,54.500 Table: Variables in the Equation ,,B,S.E.,Wald,df,Sig.,Exp(B) Step 1,constant,.180,.142,1.616,1,.204,1.198 ]) AT_CLEANUP dnl Check that if somebody passes a dependent variable which is not dichtomous, dnl then an error is raised. AT_SETUP([LOGISTIC REGRESSION non-dichotomous dep var]) AT_DATA([non-dich.sps], [dnl data list notable list /y x1 x2 x3 x4. begin data. 1 2 3 4 5 0 2 3 4 8 2 3 4 5 6 end data. logistic regression y with x1 x2 x3 x4. ]) AT_CHECK([pspp -O format=csv non-dich.sps], [1], [dnl error: Dependent variable's values are not dichotomous. ]) AT_CLEANUP dnl An example to check the behaviour of LOGISTIC REGRESSION with a categorical dnl variable. This examṕle was inspired from that at: dnl http://www.ats.ucla.edu/stat/spss/dae/logit.htm AT_SETUP([LOGISTIC REGRESSION with categorical]) AT_DATA([lr-cat.data], [dnl 620 3.07 2 4 800 4.00 3 9 580 3.40 2 4 600 3.13 2 4 540 2.70 2 4 660 3.31 4 4 480 3.58 1 9 620 4.00 1 9 680 3.98 2 9 580 3.40 4 4 760 3.35 3 4 700 3.72 2 4 460 3.64 1 9 540 3.28 3 4 680 3.48 3 4 740 3.31 1 4 460 3.77 3 4 740 3.54 1 4 600 3.63 3 4 620 3.05 2 4 560 3.04 3 4 520 2.70 3 4 640 3.35 3 4 620 3.58 2 4 660 3.70 4 9 500 2.86 4 4 640 3.50 2 4 720 4.00 3 4 720 3.94 3 4 400 3.65 2 4 800 2.90 2 4 520 2.90 3 4 440 3.24 4 4 580 3.51 2 4 500 3.31 3 4 440 3.22 1 4 540 3.17 1 9 420 3.02 1 4 780 3.22 2 9 440 3.13 4 4 800 3.66 1 9 580 3.32 2 9 480 2.67 2 9 700 4.00 1 9 740 2.97 2 9 700 3.83 2 4 640 3.93 2 4 800 3.90 2 4 400 3.38 2 4 700 3.52 2 4 680 3.00 4 9 540 3.20 1 4 580 4.00 2 4 780 4.00 2 9 220 2.83 3 4 580 3.20 2 9 580 3.50 2 4 620 3.30 1 4 520 3.65 4 9 600 3.38 3 9 660 3.77 3 4 580 2.86 4 9 580 3.46 2 9 560 3.36 3 4 740 4.00 3 9 480 3.44 3 4 640 3.19 4 9 600 3.54 1 9 540 3.38 4 4 500 2.81 3 4 360 2.56 3 4 460 3.15 4 4 460 2.63 2 4 440 2.76 2 4 740 3.62 4 4 380 3.38 2 4 640 3.63 1 9 800 3.73 1 4 660 3.67 2 4 760 3.00 2 9 420 2.96 1 4 740 3.74 4 4 800 3.75 2 4 620 3.40 2 4 660 3.67 3 9 400 3.35 3 4 680 3.14 2 4 660 3.47 3 9 660 3.63 2 9 420 3.41 4 4 660 4.00 1 4 680 3.70 2 4 620 3.23 3 9 520 3.35 3 4 500 4.00 3 4 400 3.36 2 4 700 3.56 1 9 540 3.81 1 9 520 2.68 3 9 540 3.50 2 4 700 4.00 2 4 600 3.64 3 9 800 3.31 3 4 520 3.29 1 4 580 3.69 1 4 380 3.43 3 4 560 3.19 3 4 760 2.81 1 9 540 3.13 2 4 660 3.14 2 9 520 3.81 1 9 680 3.19 4 4 540 3.78 4 4 500 3.57 3 4 660 3.49 2 4 340 3.00 2 9 400 3.15 2 9 420 3.92 4 4 760 3.35 2 9 700 2.94 2 4 540 3.04 1 4 780 3.87 4 4 560 3.78 2 4 700 3.82 3 4 400 2.93 3 4 440 3.45 2 9 800 3.47 3 4 340 3.15 3 4 520 4.00 1 9 520 3.15 3 4 600 2.98 2 9 420 2.69 2 4 460 3.44 2 4 620 3.71 1 9 480 3.13 2 4 580 3.40 3 4 540 3.39 3 9 540 3.94 3 4 440 2.98 3 4 380 3.59 4 4 500 2.97 4 4 340 2.92 3 4 440 3.15 2 4 600 3.48 2 4 420 2.67 3 4 460 3.07 2 4 460 3.45 3 9 480 3.39 4 4 480 2.78 3 4 720 3.42 2 9 680 3.67 2 9 800 3.89 2 4 360 3.00 3 4 620 3.17 2 9 700 3.52 4 9 540 3.19 2 4 580 3.30 2 4 800 4.00 3 9 660 3.33 2 4 380 3.34 3 4 720 3.84 3 4 600 3.59 2 4 500 3.03 3 4 640 3.81 2 4 540 3.49 1 9 680 3.85 3 9 540 3.84 2 9 460 2.93 3 4 380 2.94 3 4 620 3.22 2 4 740 3.37 4 4 620 4.00 2 4 800 3.74 1 9 400 3.31 3 4 540 3.46 4 4 620 3.18 2 9 480 2.91 1 9 300 2.84 2 9 440 2.48 4 4 640 2.79 2 4 400 3.23 4 9 680 3.46 2 9 620 3.37 1 9 700 3.92 2 4 620 3.37 2 9 620 3.63 2 4 620 3.95 3 9 560 2.52 2 4 520 2.62 2 4 600 3.35 2 4 700 4.00 1 4 640 3.67 3 4 640 4.00 3 4 520 2.93 4 4 620 3.21 4 4 680 3.99 3 4 660 3.34 3 4 700 3.45 3 4 560 3.36 1 9 800 2.78 2 4 500 3.88 4 4 700 3.65 2 4 680 3.76 3 9 660 3.07 3 4 580 3.46 4 4 460 2.87 2 4 600 3.31 4 4 620 3.94 4 4 400 3.05 2 4 800 3.43 2 9 600 3.58 1 9 580 3.36 2 4 540 3.16 3 4 500 2.71 2 4 600 3.28 3 4 600 2.82 4 4 460 3.58 2 4 520 2.85 3 4 740 3.52 4 9 500 3.95 4 4 560 3.61 3 4 620 3.45 2 9 640 3.51 2 4 660 3.44 2 9 660 2.91 3 9 540 3.28 1 4 560 2.98 1 9 800 3.97 1 4 720 3.77 3 4 720 3.64 1 9 480 3.71 4 9 680 3.34 2 4 680 3.11 2 4 540 2.81 3 4 620 3.75 2 9 540 3.12 1 4 560 3.48 2 9 720 3.40 3 4 680 3.90 1 4 640 3.76 3 4 560 3.16 1 4 520 3.30 2 9 640 3.12 3 4 580 3.57 3 4 540 3.55 4 9 780 3.63 4 9 600 3.89 1 9 800 4.00 1 9 580 3.29 4 4 360 3.27 3 4 800 4.00 2 9 640 3.52 4 4 720 3.45 4 4 580 3.06 2 4 580 3.02 2 4 500 3.60 3 9 580 3.12 3 9 600 2.82 4 4 620 3.99 3 4 700 4.00 3 4 480 4.00 2 4 560 2.95 2 4 560 4.00 3 4 560 2.65 3 9 400 3.08 2 4 480 2.62 2 9 640 3.86 3 4 480 3.57 2 4 540 3.51 2 4 380 3.33 4 4 680 3.64 3 4 400 3.51 3 4 340 2.90 1 4 700 3.08 2 4 480 3.02 1 9 600 3.15 2 9 780 3.80 3 9 520 3.74 2 9 520 3.51 2 4 640 3.73 3 4 560 3.32 4 4 620 2.85 2 4 700 3.28 1 4 760 4.00 1 9 800 3.60 2 4 580 3.34 2 4 540 3.77 2 9 640 3.17 2 4 540 3.02 4 4 680 3.08 4 4 680 3.31 2 4 680 2.96 3 9 700 2.88 2 4 580 3.77 4 4 540 3.49 2 9 700 3.56 2 9 600 3.56 2 9 560 3.59 2 4 640 2.94 2 9 560 3.33 4 4 620 3.69 3 4 680 3.27 2 9 460 3.14 3 4 500 3.53 4 4 620 3.33 3 4 600 3.62 3 4 500 3.01 4 4 740 3.34 4 4 560 3.69 3 9 620 3.95 3 9 740 3.86 2 9 800 3.53 1 9 620 3.78 3 4 700 3.27 2 4 540 3.78 2 9 700 3.65 2 4 800 3.22 1 9 560 3.59 2 9 800 3.15 4 4 520 3.90 3 9 520 3.74 4 9 480 2.55 1 4 800 4.00 4 4 620 3.09 4 4 560 3.49 4 4 500 3.17 3 4 480 3.40 2 4 460 2.98 1 4 580 3.58 1 9 640 3.30 2 4 480 3.45 2 4 440 3.17 2 4 660 3.32 1 4 500 3.08 3 4 660 3.94 2 4 720 3.31 1 4 460 3.64 3 9 500 2.93 4 4 800 3.54 3 4 580 2.93 2 4 620 3.61 1 9 500 2.98 3 4 660 4.00 2 9 560 3.24 4 4 560 2.42 2 4 580 3.80 2 4 500 3.23 4 4 680 2.42 1 9 580 3.46 3 4 800 3.91 3 4 700 2.90 4 4 520 3.12 2 4 300 2.92 4 4 560 3.43 3 4 620 3.63 3 4 500 2.79 4 4 360 3.14 1 4 640 3.94 2 9 460 3.99 3 9 300 3.01 3 4 520 2.73 2 4 600 3.47 2 9 580 3.25 1 4 520 3.10 4 4 620 3.43 3 4 380 2.91 4 4 660 3.59 3 4 660 3.95 2 9 540 3.33 3 4 740 4.00 3 4 640 3.38 3 4 600 3.89 3 4 720 3.88 3 4 580 4.00 3 4 420 2.26 4 4 520 4.00 2 9 800 3.70 1 9 700 4.00 1 9 480 3.43 2 4 660 3.45 4 4 520 3.25 3 4 560 2.71 3 4 600 3.32 2 4 580 2.88 2 4 660 3.88 2 9 600 3.22 1 4 580 4.00 1 4 660 3.60 3 9 500 3.35 2 4 520 2.98 2 4 660 3.49 2 9 560 3.07 2 4 500 3.13 2 9 720 3.50 3 9 440 3.39 2 9 640 3.95 2 9 380 3.61 3 4 800 3.05 2 9 520 3.19 3 9 600 3.40 3 4 ]) AT_DATA([lr-cat.sps], [dnl set format=F20.3. data list notable list file='lr-cat.data' /b1 b2 bcat y. logistic regression y with b1 b2 bcat /categorical = bcat . ]) AT_CHECK([pspp -O format=csv lr-cat.sps], [0], [dnl Table: Dependent Variable Encoding Original Value,Internal Value 4.000,0 9.000,1 Table: Case Processing Summary Unweighted Cases,N,Percent Included in Analysis,400,100.000 Missing Cases,0,.000 Total,400,100.000 note: Estimation terminated at iteration number 4 because parameter estimates changed by less than 0.001 Table: Model Summary Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square ,458.517,.098,.138 Table: Categorical Variables' Codings ,,,Parameter coding,, ,,Frequency,(1),(2),(3) bcat,1.000,61,1,0,0 ,2.000,151,0,1,0 ,3.000,121,0,0,1 ,4.000,67,0,0,0 Table: Classification Table ,,,Predicted,, ,,,y,,"Percentage Correct" ,Observed,,4.000,9.000, Step 1,y,4.000,254,19,93.040 ,,9.000,97,30,23.622 ,Overall Percentage,,,,71.000 Table: Variables in the Equation ,,B,S.E.,Wald,df,Sig.,Exp(B) Step 1,b1,.002,.001,4.284,1,.038,1.002 ,b2,.804,.332,5.872,1,.015,2.235 ,bcat,,,20.895,3,.000, ,bcat(1),1.551,.418,13.788,1,.000,4.718 ,bcat(2),.876,.367,5.706,1,.017,2.401 ,bcat(3),.211,.393,.289,1,.591,1.235 ,Constant,-5.541,1.138,23.709,1,.000,.004 ]) AT_CLEANUP dnl This example is inspired by http://www.ats.ucla.edu/stat/spss/output/logistic.htm AT_SETUP([LOGISTIC REGRESSION with cat var 2]) AT_DATA([lr-cat2.data], [dnl 60.00 1.00 8.00 50.00 47.00 .00 9.00 42.00 57.00 1.00 7.00 53.00 60.00 .00 8.00 53.00 68.00 .00 8.00 66.00 63.00 .00 8.00 55.00 65.00 .00 8.00 63.00 52.00 .00 8.00 61.00 34.00 .00 9.00 42.00 37.00 .00 8.00 39.00 68.00 1.00 9.00 69.00 60.00 .00 9.00 61.00 44.00 .00 9.00 58.00 42.00 .00 8.00 47.00 57.00 1.00 7.00 61.00 55.00 1.00 8.00 50.00 55.00 .00 9.00 58.00 44.00 .00 8.00 63.00 50.00 1.00 9.00 66.00 44.00 .00 8.00 39.00 55.00 .00 8.00 58.00 44.00 .00 8.00 50.00 47.00 1.00 7.00 34.00 48.00 .00 8.00 44.00 45.00 .00 7.00 31.00 43.00 .00 8.00 50.00 39.00 .00 8.00 42.00 63.00 .00 9.00 50.00 47.00 .00 8.00 58.00 42.00 .00 7.00 50.00 50.00 .00 9.00 36.00 47.00 .00 7.00 33.00 60.00 .00 9.00 61.00 47.00 .00 7.00 42.00 68.00 1.00 9.00 69.00 52.00 .00 8.00 54.00 63.00 1.00 9.00 61.00 65.00 1.00 9.00 61.00 63.00 1.00 9.00 53.00 57.00 .00 8.00 51.00 34.00 .00 8.00 36.00 50.00 .00 8.00 39.00 52.00 1.00 7.00 56.00 45.00 .00 7.00 34.00 47.00 1.00 7.00 53.00 34.00 .00 7.00 39.00 50.00 1.00 8.00 55.00 60.00 .00 9.00 58.00 63.00 .00 8.00 58.00 35.00 .00 7.00 51.00 50.00 .00 8.00 58.00 68.00 .00 8.00 63.00 41.00 .00 9.00 34.00 47.00 .00 8.00 47.00 76.00 .00 9.00 64.00 44.00 .00 8.00 44.00 36.00 .00 9.00 50.00 68.00 1.00 9.00 55.00 47.00 1.00 8.00 50.00 50.00 .00 7.00 53.00 68.00 .00 8.00 74.00 39.00 .00 7.00 44.00 50.00 .00 8.00 55.00 52.00 .00 9.00 61.00 47.00 .00 8.00 53.00 39.00 .00 7.00 47.00 55.00 1.00 9.00 49.00 68.00 1.00 8.00 50.00 52.00 1.00 9.00 63.00 55.00 .00 8.00 58.00 57.00 .00 8.00 55.00 66.00 1.00 9.00 61.00 65.00 1.00 7.00 58.00 42.00 .00 7.00 42.00 68.00 1.00 7.00 59.00 60.00 1.00 9.00 61.00 52.00 .00 8.00 55.00 57.00 1.00 7.00 54.00 42.00 .00 9.00 50.00 42.00 .00 8.00 47.00 57.00 .00 8.00 50.00 47.00 .00 7.00 45.00 44.00 .00 7.00 40.00 43.00 .00 9.00 55.00 31.00 .00 8.00 39.00 37.00 .00 7.00 33.00 63.00 1.00 7.00 63.00 47.00 .00 8.00 39.00 57.00 1.00 8.00 63.00 52.00 .00 8.00 44.00 44.00 .00 7.00 35.00 52.00 .00 7.00 55.00 55.00 .00 7.00 69.00 52.00 .00 8.00 53.00 55.00 .00 9.00 61.00 65.00 1.00 9.00 63.00 55.00 .00 8.00 44.00 63.00 .00 7.00 65.00 44.00 .00 7.00 39.00 47.00 .00 7.00 36.00 63.00 1.00 9.00 55.00 68.00 .00 8.00 66.00 34.00 .00 8.00 39.00 47.00 .00 9.00 50.00 50.00 .00 9.00 58.00 63.00 .00 8.00 66.00 44.00 .00 7.00 34.00 44.00 .00 8.00 50.00 50.00 .00 8.00 53.00 47.00 1.00 9.00 69.00 65.00 .00 9.00 58.00 57.00 .00 8.00 47.00 39.00 .00 8.00 39.00 47.00 .00 8.00 53.00 50.00 1.00 7.00 63.00 50.00 .00 8.00 50.00 63.00 .00 9.00 53.00 73.00 1.00 9.00 61.00 44.00 .00 7.00 47.00 47.00 .00 8.00 42.00 47.00 .00 8.00 58.00 36.00 .00 7.00 61.00 57.00 1.00 8.00 55.00 53.00 1.00 8.00 57.00 63.00 .00 7.00 66.00 50.00 .00 8.00 34.00 47.00 .00 9.00 48.00 57.00 1.00 8.00 58.00 39.00 .00 8.00 53.00 42.00 .00 8.00 42.00 42.00 .00 9.00 31.00 42.00 .00 8.00 72.00 46.00 .00 8.00 44.00 55.00 .00 8.00 42.00 42.00 .00 8.00 47.00 50.00 .00 8.00 44.00 44.00 .00 9.00 39.00 73.00 1.00 8.00 69.00 71.00 1.00 9.00 58.00 50.00 .00 9.00 49.00 63.00 1.00 7.00 54.00 42.00 .00 8.00 36.00 47.00 .00 7.00 42.00 39.00 .00 9.00 26.00 63.00 .00 8.00 58.00 50.00 .00 8.00 55.00 65.00 1.00 8.00 55.00 76.00 1.00 9.00 67.00 71.00 1.00 8.00 66.00 39.00 .00 9.00 47.00 47.00 1.00 9.00 63.00 60.00 .00 7.00 50.00 63.00 .00 9.00 55.00 54.00 1.00 9.00 55.00 55.00 1.00 8.00 58.00 57.00 .00 8.00 61.00 55.00 1.00 9.00 63.00 42.00 .00 7.00 50.00 50.00 .00 8.00 44.00 55.00 .00 8.00 42.00 42.00 .00 7.00 50.00 34.00 .00 8.00 39.00 65.00 .00 9.00 46.00 52.00 .00 7.00 58.00 44.00 .00 8.00 39.00 65.00 1.00 9.00 66.00 47.00 .00 8.00 42.00 41.00 .00 7.00 39.00 68.00 .00 9.00 63.00 63.00 1.00 8.00 72.00 52.00 .00 8.00 53.00 57.00 .00 8.00 50.00 68.00 .00 8.00 55.00 42.00 .00 8.00 56.00 47.00 .00 8.00 48.00 73.00 1.00 9.00 58.00 39.00 .00 8.00 50.00 63.00 1.00 9.00 69.00 60.00 .00 8.00 55.00 65.00 1.00 9.00 66.00 73.00 1.00 8.00 63.00 52.00 .00 8.00 55.00 36.00 .00 8.00 42.00 28.00 .00 7.00 44.00 47.00 .00 8.00 44.00 57.00 .00 7.00 47.00 34.00 .00 7.00 29.00 47.00 .00 9.00 66.00 57.00 .00 8.00 58.00 60.00 1.00 9.00 50.00 50.00 .00 9.00 47.00 73.00 1.00 9.00 55.00 52.00 1.00 8.00 47.00 55.00 .00 8.00 53.00 47.00 .00 8.00 53.00 50.00 .00 8.00 61.00 61.00 .00 7.00 44.00 52.00 .00 9.00 53.00 47.00 .00 7.00 40.00 47.00 .00 7.00 50.00 ]) AT_DATA([stringcat.sps], [dnl set format=F20.3. data list notable file='lr-cat2.data' list /read honcomp wiz science *. string ses(a1). recode wiz (7 = "a") (8 = "b") (9 = "c") into ses. logistic regression honcomp with read science ses /categorical = ses. ]) AT_CHECK([pspp -O format=csv stringcat.sps], [0], [dnl Table: Dependent Variable Encoding Original Value,Internal Value .000,0 1.000,1 Table: Case Processing Summary Unweighted Cases,N,Percent Included in Analysis,200,100.000 Missing Cases,0,.000 Total,200,100.000 note: Estimation terminated at iteration number 5 because parameter estimates changed by less than 0.001 Table: Model Summary Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square ,165.701,.280,.408 Table: Categorical Variables' Codings ,,,Parameter coding, ,,Frequency,(1),(2) ses,a,47,1,0 ,b,95,0,1 ,c,58,0,0 Table: Classification Table ,,,Predicted,, ,,,honcomp,,"Percentage Correct" ,Observed,,.000,1.000, Step 1,honcomp,.000,132,15,89.796 ,,1.000,26,27,50.943 ,Overall Percentage,,,,79.500 Table: Variables in the Equation ,,B,S.E.,Wald,df,Sig.,Exp(B) Step 1,read,.098,.025,15.199,1,.000,1.103 ,science,.066,.027,5.867,1,.015,1.068 ,ses,,,6.690,2,.035, ,ses(1),.058,.532,.012,1,.913,1.060 ,ses(2),-1.013,.444,5.212,1,.022,.363 ,Constant,-9.561,1.662,33.113,1,.000,.000 ]) AT_CLEANUP dnl Check that it doesn't crash if a categorical variable dnl has only one distinct value AT_SETUP([LOGISTIC REGRESSION identical categories]) AT_DATA([crash.sps], [dnl data list notable list /y x1 x2*. begin data 0 1 1 1 2 1 end data. logistic regression y with x1 x2 /categorical = x2. ]) AT_CHECK([pspp -O format=csv crash.sps], [1], [ignore]) AT_CLEANUP dnl Test that missing values on the categorical predictors are treated dnl properly. AT_SETUP([LOGISTIC REGRESSION missing categoricals]) AT_DATA([data.txt], [dnl .00 3.69 .00 .00 1.16 1.00 1.00 -12.99 .00 .00 2.97 1.00 .00 20.48 .00 .00 4.90 .00 1.00 -4.38 .00 .00 -1.69 1.00 1.00 -5.71 .00 1.00 -14.28 .00 .00 9.00 .00 .00 2.89 1.00 .00 13.51 1.00 .00 23.32 1.00 .00 2.31 1.00 .00 -2.07 1.00 1.00 -4.52 1.00 1.00 -5.83 .00 1.00 -1.91 .00 1.00 -11.12 1.00 .00 -1.51 .00 .00 6.59 1.00 .00 19.28 1.00 .00 5.94 .00 .00 8.21 1.00 .00 8.11 1.00 .00 2.49 .00 .00 9.62 .00 1.00 -20.74 1.00 .00 -1.41 1.00 .00 15.15 1.00 .00 9.39 .00 1.00 -15.14 1.00 1.00 -5.86 .00 1.00 -11.64 1.00 1.00 -14.36 .00 1.00 -8.95 1.00 1.00 -16.42 1.00 1.00 -1.04 1.00 .00 12.89 1.00 .00 -7.08 1.00 .00 4.87 1.00 .00 11.53 1.00 1.00 -6.24 1.00 .00 1.25 1.00 .00 4.39 1.00 .00 3.17 .00 .00 19.39 1.00 .00 13.03 1.00 .00 2.43 .00 1.00 -14.73 1.00 .00 8.25 1.00 1.00 -13.28 1.00 .00 5.27 1.00 1.00 -3.46 1.00 .00 13.81 1.00 .00 1.35 1.00 1.00 -3.94 1.00 .00 20.73 1.00 1.00 -15.40 .00 1.00 -11.01 1.00 .00 4.56 .00 1.00 -15.35 1.00 .00 15.21 .00 .00 5.34 1.00 1.00 -21.55 1.00 .00 10.12 1.00 .00 -.73 1.00 .00 15.28 1.00 .00 11.08 1.00 1.00 -8.24 .00 .00 2.46 .00 .00 9.60 .00 .00 11.24 .00 .00 14.13 1.00 .00 19.72 1.00 .00 5.58 .00 .00 26.23 1.00 .00 7.25 .00 1.00 -.79 .00 .00 6.24 .00 1.00 1.16 .00 1.00 -7.89 1.00 1.00 -1.86 1.00 1.00 -10.80 1.00 1.00 -5.51 .00 .00 7.51 .00 .00 11.18 .00 .00 8.73 .00 1.00 -11.21 1.00 1.00 -13.24 .00 .00 19.34 .00 .00 9.32 1.00 .00 17.97 1.00 1.00 -1.56 1.00 1.00 -3.13 .00 .00 3.98 .00 .00 -1.21 1.00 .00 2.37 .00 1.00 -18.03 1.00 ]) AT_DATA([miss.sps], [dnl data list notable file='data.txt' list /y x1 cat0*. logistic regression y with x1 cat0 /categorical = cat0. ]) AT_CHECK([pspp -O format=csv miss.sps > file1], [0], [ignore]) dnl Append a case with a missing categorical. AT_CHECK([echo '1 34 .' >> data.txt], [0], [ignore]) AT_CHECK([pspp -O format=csv miss.sps > file2], [0], [ignore]) AT_CHECK([diff file1 file2], [1], [dnl 8,10c8,10 < Included in Analysis,100,100.00 < Missing Cases,0,.00 < Total,100,100.00 --- > Included in Analysis,100,99.01 > Missing Cases,1,.99 > Total,101,100.00 ]) AT_CLEANUP dnl Check that the confidence intervals are properly reported. dnl Use an example with categoricals, because that was buggy at dnl one point. The data in this example comes from: dnl http://people.ysu.edu/~gchang/SPSSE/SPSS_lab2Regression.pdf AT_SETUP([LOGISTIC REGRESSION confidence interval]) AT_DATA([ci.sps], [dnl set FORMAT=F20.3 data list notable list /disease age sciostat sector savings *. begin data. 0 33 1 1 1 0 35 1 1 1 0 6 1 1 0 0 60 1 1 1 1 18 3 1 0 0 26 3 1 0 0 6 3 1 0 1 31 2 1 1 1 26 2 1 0 0 37 2 1 0 0 23 1 1 0 0 23 1 1 0 0 27 1 1 1 1 9 1 1 1 1 37 1 2 1 1 22 1 2 1 1 67 1 2 1 0 8 1 2 1 1 6 1 2 1 1 15 1 2 1 1 21 2 2 1 1 32 2 2 1 1 16 1 2 1 0 11 2 2 0 0 14 3 2 0 0 9 2 2 0 0 18 2 2 0 0 2 3 1 0 0 61 3 1 1 0 20 3 1 0 0 16 3 1 0 0 9 2 1 0 0 35 2 1 1 0 4 1 1 1 0 44 3 2 0 1 11 3 2 0 0 3 2 2 1 0 6 3 2 0 1 17 2 2 0 0 1 3 2 1 1 53 2 2 1 1 13 1 2 0 0 24 1 2 0 1 70 1 2 1 1 16 3 2 1 0 12 2 2 1 1 20 3 2 1 0 65 3 2 1 1 40 2 2 0 1 38 2 2 1 1 68 2 2 1 1 74 1 2 1 1 14 1 2 1 1 27 1 2 1 0 31 1 2 1 0 18 1 2 1 0 39 1 2 0 0 50 1 2 1 0 31 1 2 1 0 61 1 2 1 0 18 3 1 0 0 5 3 1 0 0 2 3 1 1 0 16 3 1 0 1 59 3 1 1 0 22 3 1 0 0 24 1 1 1 0 30 1 1 1 0 46 1 1 1 0 28 1 1 0 0 27 1 1 1 1 27 1 1 0 0 28 1 1 1 1 52 1 1 1 0 11 3 1 1 0 6 2 1 1 0 46 3 1 0 1 20 2 1 1 0 3 1 1 1 0 18 2 1 0 0 25 2 1 0 0 6 3 1 1 1 65 3 1 1 0 51 3 1 1 0 39 2 1 1 0 8 1 1 1 0 8 2 1 0 0 14 3 1 0 0 6 3 1 0 0 6 3 1 1 0 7 3 1 0 0 4 3 1 0 0 8 3 1 0 0 9 2 1 0 1 32 3 1 0 0 19 3 1 0 0 11 3 1 0 0 35 3 1 0 0 16 1 1 0 0 1 1 1 1 0 6 1 1 1 0 27 1 1 1 0 25 1 1 1 0 18 1 1 0 0 37 3 1 0 1 33 3 1 0 0 27 2 1 0 0 2 1 1 0 0 8 2 1 0 0 5 1 1 0 0 1 1 1 1 0 32 1 1 0 1 25 1 1 1 0 15 1 2 0 0 15 1 2 1 0 26 1 2 1 1 42 1 2 1 0 7 1 2 1 0 2 1 2 0 1 65 1 2 1 0 33 2 2 1 1 8 2 2 0 0 30 2 2 0 0 5 3 2 0 0 15 3 2 0 1 60 3 2 1 1 13 3 2 1 0 70 3 1 1 0 5 3 1 0 0 3 3 1 1 0 50 2 1 1 0 6 2 1 0 0 12 2 1 1 1 39 3 2 0 0 15 2 2 1 1 35 2 2 0 0 2 2 2 1 0 17 3 2 0 1 43 3 2 1 0 30 2 2 1 0 11 1 2 1 1 39 1 2 1 0 32 1 2 1 0 17 1 2 1 0 3 3 2 1 0 7 3 2 0 0 2 2 2 0 1 64 2 2 1 1 13 1 2 2 1 15 2 2 1 0 48 2 2 1 0 23 1 2 1 1 48 1 2 0 0 25 1 2 1 0 12 1 2 1 1 46 1 2 1 0 79 1 2 1 0 56 1 2 1 0 8 1 2 1 1 29 3 1 0 1 35 3 1 0 1 11 3 1 0 0 69 3 1 1 1 21 3 1 0 0 13 3 1 0 0 21 1 1 1 1 32 1 1 1 1 24 1 1 0 0 24 1 1 1 0 73 1 1 1 0 42 1 1 1 1 34 1 1 1 0 30 2 1 0 0 7 2 1 0 1 29 3 1 0 1 22 3 1 0 0 38 2 1 1 0 13 2 1 1 0 12 2 1 1 0 42 3 1 0 1 17 3 1 0 0 21 3 1 1 0 34 1 1 1 0 1 3 1 0 0 14 2 1 0 0 16 2 1 0 0 9 3 1 0 0 53 3 1 0 0 27 3 1 0 0 15 3 1 0 0 9 3 1 0 0 4 2 1 1 0 10 3 1 1 0 31 3 1 0 0 85 3 1 1 0 24 2 1 0 end data. logistic regression disease WITH age sciostat sector savings /categorical = sciostat sector /print = ci(95). ]) AT_CHECK([pspp -O format=csv ci.sps], [0], [dnl Table: Dependent Variable Encoding Original Value,Internal Value .000,0 1.000,1 Table: Case Processing Summary Unweighted Cases,N,Percent Included in Analysis,196,100.000 Missing Cases,0,.000 Total,196,100.000 note: Estimation terminated at iteration number 4 because parameter estimates changed by less than 0.001 Table: Model Summary Step 1,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square ,211.195,.120,.172 Table: Categorical Variables' Codings ,,,Parameter coding, ,,Frequency,(1),(2) sciostat,1.000,77,1,0 ,2.000,49,0,1 ,3.000,70,0,0 sector,1.000,117,1, ,2.000,79,0, Table: Classification Table ,,,Predicted,, ,,,disease,,"Percentage Correct" ,Observed,,.000,1.000, Step 1,disease,.000,131,8,94.245 ,,1.000,41,16,28.070 ,Overall Percentage,,,,75.000 Table: Variables in the Equation ,,,,,,,,95% CI for Exp(B), ,,B,S.E.,Wald,df,Sig.,Exp(B),Lower,Upper Step 1,age,.027,.009,8.647,1,.003,1.027,1.009,1.045 ,savings,.061,.386,.025,1,.874,1.063,.499,2.264 ,sciostat,,,.440,2,.803,,, ,sciostat(1),-.278,.434,.409,1,.522,.757,.323,1.775 ,sciostat(2),-.219,.459,.227,1,.634,.803,.327,1.976 ,sector,,,11.974,1,.001,,, ,sector(1),-1.235,.357,11.974,1,.001,.291,.145,.586 ,Constant,-.814,.452,3.246,1,.072,.443,, ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/sort-cases.at0000644000175000017500000000664713137223525016130 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([SORT CASES]) m4_divert_push([PREPARE_TESTS]) [sort_cases_gen_data () { cat > gen-data.pl <<'EOF' use strict; use warnings; # Generate shuffled data. my (@data); for my $i (0...$ARGV[0] - 1) { push (@data, ($i) x $ARGV[1]); } fisher_yates_shuffle (\@data); # Output shuffled data. my (@shuffled) = map ([$data[$_], $_], 0...$#data); open (SHUFFLED, ">data.txt"); print SHUFFLED "$data[$_] $_\n" foreach 0...$#data; # Output sorted data. my (@sorted) = sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] } @shuffled; open (SORTED, ">expout"); printf SORTED " %8d %8d \n", $_->[0], $_->[1] foreach @sorted; # From perlfaq4. sub fisher_yates_shuffle { my $deck = shift; # $deck is a reference to an array my $i = @$deck; while ($i--) { my $j = int rand ($i+1); @$deck[$i,$j] = @$deck[$j,$i]; } } EOF $PERL gen-data.pl "$@"] } m4_divert_pop([PREPARE_TESTS]) m4_define([SORT_CASES_TEST], [AT_SETUP([sort m4_eval([$1 * $2]) cases[]m4_if([$2], [1], [], [ ($1 unique)])[]m4_if([$3], [], [], [ with $3 buffers])]) AT_KEYWORDS([SORT CASES]) AT_CHECK([sort_cases_gen_data $1 $2 $3]) AT_CAPTURE_FILE([data.txt]) AT_CAPTURE_FILE([output.txt]) AT_CAPTURE_FILE([sort-cases.sps]) AT_DATA([sort-cases.sps], [dnl DATA LIST LIST NOTABLE FILE='data.txt'/x y (F8). SORT CASES BY x[]m4_if([$3], [], [], [/BUFFERS=$3]). PRINT OUTFILE='output.txt'/x y. EXECUTE. ]) AT_CHECK([pspp --testing-mode -o pspp.csv sort-cases.sps]) AT_CHECK([cat output.txt], [0], [expout]) AT_CLEANUP]) SORT_CASES_TEST(100, 5, 2) SORT_CASES_TEST(100, 5, 3) SORT_CASES_TEST(100, 5, 4) SORT_CASES_TEST(100, 5, 5) SORT_CASES_TEST(100, 5, 10) SORT_CASES_TEST(100, 5, 50) SORT_CASES_TEST(100, 5, 100) SORT_CASES_TEST(100, 5) SORT_CASES_TEST(100, 10, 2) SORT_CASES_TEST(100, 10, 3) SORT_CASES_TEST(100, 10, 5) SORT_CASES_TEST(100, 10) SORT_CASES_TEST(1000, 5, 5) SORT_CASES_TEST(1000, 5, 50) SORT_CASES_TEST(1000, 5) SORT_CASES_TEST(100, 100, 3) SORT_CASES_TEST(100, 100, 5) SORT_CASES_TEST(100, 100) SORT_CASES_TEST(10000, 5, 500) SORT_CASES_TEST(50000, 1) dnl Bug #33089 caused SORT CASES to delete filtered cases permanently. AT_SETUP([SORT CASES preserves filtered cases]) AT_DATA([sort-cases.sps], [dnl DATA LIST FREE /x. BEGIN DATA. 5 4 3 2 1 0 END DATA. COMPUTE mod2 = MOD(x, 2). LIST. FILTER BY mod2. LIST. SORT CASES BY x. LIST. FILTER OFF. LIST. ]) AT_CHECK([pspp -O format=csv sort-cases.sps], [0], [dnl Table: Data List x,mod2 5.00,1.00 4.00,.00 3.00,1.00 2.00,.00 1.00,1.00 .00,.00 Table: Data List x,mod2 5.00,1.00 3.00,1.00 1.00,1.00 Table: Data List x,mod2 1.00,1.00 3.00,1.00 5.00,1.00 Table: Data List x,mod2 .00,.00 1.00,1.00 2.00,.00 3.00,1.00 4.00,.00 5.00,1.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/flip.at0000644000175000017500000000554213137223525014770 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([FLIP command]) AT_SETUP([FLIP with NEWNAMES]) AT_DATA([flip.sps], [dnl data list notable /N 1 (a) a b c d 2-9. list. begin data. v 1 2 3 4 5 w 6 7 8 910 x1112131415 y1617181920 z2122232425 end data. temporary. compute e = a. flip newnames=n. list. flip. list. ]) AT_CHECK([pspp -O format=csv flip.sps], [0], [dnl Table: Data List N,a,b,c,d v,1,2,3,4 w,6,7,8,9 x,11,12,13,14 y,16,17,18,19 z,21,22,23,24 flip.sps:12: warning: FLIP: FLIP ignores TEMPORARY. Temporary transformations will be made permanent. Table: Data List CASE_LBL,v,w,x,y,z a ,1.00,6.00,11.00,16.00,21.00 b ,2.00,7.00,12.00,17.00,22.00 c ,3.00,8.00,13.00,18.00,23.00 d ,4.00,9.00,14.00,19.00,24.00 e ,1.00,6.00,11.00,16.00,21.00 Table: Data List CASE_LBL,a,b,c,d,e v ,1.00,2.00,3.00,4.00,1.00 w ,6.00,7.00,8.00,9.00,6.00 x ,11.00,12.00,13.00,14.00,11.00 y ,16.00,17.00,18.00,19.00,16.00 z ,21.00,22.00,23.00,24.00,21.00 ]) AT_CLEANUP AT_SETUP([FLIP without NEWNAMES]) AT_DATA([flip.sps], [dnl data list list notable /v1 to v10. format all(f2). begin data. 1 2 3 4 5 6 7 8 9 10 4 5 6 7 8 9 10 11 12 13 end data. list. flip. list. ]) AT_CHECK([pspp -O format=csv flip.sps], [0], [dnl Table: Data List v1,v2,v3,v4,v5,v6,v7,v8,v9,v10 1,2,3,4,5,6,7,8,9,10 4,5,6,7,8,9,10,11,12,13 Table: Data List CASE_LBL,VAR000,VAR001 v1 ,1.00,4.00 v2 ,2.00,5.00 v3 ,3.00,6.00 v4 ,4.00,7.00 v5 ,5.00,8.00 v6 ,6.00,9.00 v7 ,7.00,10.00 v8 ,8.00,11.00 v9 ,9.00,12.00 v10 ,10.00,13.00 ]) AT_CLEANUP AT_SETUP([FLIP badly formed]) AT_DATA([flip.sps], [dnl data list notable /N 1 (a) a b c d 2-9. flip newnames=n. list. flip. ]) AT_CHECK([pspp -O format=csv flip.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([FLIP with invalid variable names]) AT_DATA([flip.sps], [dnl data list notable list /N (a3) a b c d *. begin data. "" 1 2 3 4 BY 1 2 3 4 end data. flip newnames=n. list. ]) AT_CHECK([pspp -O format=csv flip.sps], [0], [dnl Table: Data List CASE_LBL,v,BY1 a ,1.00,1.00 b ,2.00,2.00 c ,3.00,3.00 d ,4.00,4.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/means.at0000644000175000017500000002326313137223525015141 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([MEANS procedure]) AT_SETUP([MEANS simple example]) AT_DATA([means-simple.sps], [dnl SET FORMAT=F12.5. data list notable list /score * factor *. BEGIN DATA. 22 01 22 01 29 01 16 01 24 02 21 02 22 01 24 01 19 01 17 01 22 01 17 02 23 02 25 02 20 01 15 01 18 01 26 01 23 02 35 02 20 01 16 01 19 01 14 01 14 01 21 01 END DATA. MEANS TABLES = score BY factor. ]) AT_CHECK([pspp -O format=csv means-simple.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent score: factor,26,100%,0,0%,26,100% score: ,26,100%,0,0%,26,100% Table: Report ,factor,Mean,N,Std. Deviation score,1.00000,19.78947,19.00000,4.03566 ,2.00000,24.00000,7.00000,5.50757 Table: Report ,Mean,N,Std. Deviation score,20.92308,26.00000,4.75750 ]) AT_CLEANUP AT_SETUP([MEANS very simple example]) AT_DATA([means-vsimple.sps], [dnl SET FORMAT=F12.5. data list notable list /score. begin data. 1 1 2 2 end data. means tables = score. ]) AT_CHECK([pspp -O format=csv means-vsimple.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent score: ,4,100%,0,0%,4,100% Table: Report ,Mean,N,Std. Deviation score,1.50000,4.00000,.57735 ]) AT_CLEANUP AT_SETUP([MEANS default missing]) AT_DATA([means-dmiss.sps], [dnl SET FORMAT=F12.2. data list notable list /a * g1 * g2 *. begin data. 3 1 . 4 1 11 3 1 21 6 2 21 2 2 31 . 2 31 8 2 31 7 2 31 end data. MEANS TABLES = a BY g1 g2 BY g2 /cells = MEAN COUNT . ]) AT_CHECK([pspp -O format=csv means-dmiss.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1 * g2,6,75%,2,25%,8,100% a: g2,6,75%,2,25%,8,100% a: ,7,87.5%,1,12.5%,8,100% Table: Report ,g1,g2,Mean,N a,1.00,11.00,4.00,1.00 ,1.00,21.00,3.00,1.00 ,2.00,21.00,6.00,1.00 ,2.00,31.00,5.67,3.00 Table: Report ,g2,Mean,N a,11.00,4.00,1.00 ,21.00,4.50,2.00 ,31.00,5.67,3.00 Table: Report ,Mean,N a,5.00,6.00 ]) AT_CLEANUP AT_SETUP([MEANS linear stats]) dnl Slightly more involved example to test the linear statistics AT_DATA([means-linear.sps], [dnl set format F12.4. data list notable list /id * group * test1 * begin data. 1 1 85 2 1 90 3 1 82 4 1 75 5 1 99 6 2 70 7 2 66 8 2 52 9 2 71 10 2 50 end data. add value labels /group 1 "experimental group" 2 "control group". means test1 by group /cells = mean count stddev sum min max range variance kurt skew . ]) AT_CHECK([pspp -O format=csv means-linear.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent test1: group,10,100%,0,0%,10,100% test1: ,10,100%,0,0%,10,100% Table: Report ,group,Mean,N,Std. Deviation,Sum,Min,Max,Range,Variance,Kurtosis,Skewness test1,experimental group,86.2000,5.0000,8.9833,431.0000,75.0000,99.0000,24.0000,80.7000,.2727,.3858 ,control group,61.8000,5.0000,10.0598,309.0000,50.0000,71.0000,21.0000,101.2000,-3.0437,-.4830 Table: Report ,Mean,N,Std. Deviation,Sum,Min,Max,Range,Variance,Kurtosis,Skewness test1,74.0000,10.0000,15.6915,740.0000,50.0000,99.0000,49.0000,246.2222,-.5759,-.1262 ]) AT_CLEANUP AT_SETUP([MEANS standard errors]) AT_DATA([means-stderr.sps], [dnl set format F12.4. data list notable list /id * group * test1 * begin data. 1 1 85 2 1 90 3 1 82 4 1 75 5 1 99 6 1 70 7 2 66 8 2 52 9 2 71 10 2 50 end data. means test1 by group /cells = mean count semean seskew sekurt. ]) AT_CHECK([pspp -O format=csv means-stderr.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent test1: group,10,100%,0,0%,10,100% test1: ,10,100%,0,0%,10,100% Table: Report ,group,Mean,N,S.E. Mean,S.E. Skew,S.E. Kurt test1,1.0000,83.5000,6.0000,4.2485,.8452,1.7408 ,2.0000,59.7500,4.0000,5.1700,1.0142,2.6186 Table: Report ,Mean,N,S.E. Mean,S.E. Skew,S.E. Kurt test1,74.0000,10.0000,4.9621,.6870,1.3342 ]) AT_CLEANUP AT_SETUP([MEANS harmonic and geometric means]) AT_DATA([means-hg.sps], [dnl set format F12.4. data list notable list /x * y *. begin data. 1 3 2 3 3 3 4 3 5 3 end data. means x y /cells = mean harmonic geometric . ]) AT_CHECK([pspp -O format=csv means-hg.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent x: ,5,100%,0,0%,5,100% y: ,5,100%,0,0%,5,100% Table: Report ,Mean,Harmonic Mean,Geom. Mean x,3.0000,2.1898,2.6052 y,3.0000,3.0000,3.0000 ]) AT_CLEANUP AT_SETUP([MEANS all/none/default]) dnl Make sure that /CELLS = {ALL,NONE,DEFAULT} work properly AT_DATA([means-stat-keywords.sps], [dnl SET FORMAT=F12.2. SET DECIMAL=DOT. DATA LIST NOTABLE LIST /score *. BEGIN DATA. 22 22 29 16 23 END DATA. MEANS score /CELLS = ALL. MEANS score /CELLS = DEFAULT. MEANS score /CELLS = NONE. ]) AT_CHECK([pspp -O format=csv means-stat-keywords.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent score: ,5,100%,0,0%,5,100% Table: Report ,Mean,N,Std. Deviation,S.E. Mean,Sum,Min,Max,Range,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,First,Last,Harmonic Mean,Geom. Mean score,22.40,5.00,4.62,2.06,112.00,16.00,29.00,13.00,21.30,1.85,2.00,.11,.91,22.00,23.00,21.61,22.01 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent score: ,5,100%,0,0%,5,100% Table: Report ,Mean,N,Std. Deviation score,22.40,5.00,4.62 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent score: ,5,100%,0,0%,5,100% Table: Report score ]) AT_CLEANUP AT_SETUP([MEANS missing=table ]) AT_DATA([means-miss-table.sps], [dnl data list notable list /a * b * g1. begin data. 1 9 1 2 9 1 3 9 1 4 9 2 5 9 2 6 9 2 7 . 2 end data. MEANS a b BY g1 /a BY g1 /cells = COUNT /missing = TABLE . MEANS a b BY g1 /a BY g1 /cells = COUNT . ]) AT_CHECK([pspp -O format=csv means-miss-table.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% b: g1,6,85.7143%,1,14.2857%,7,100% b: ,6,85.7143%,1,14.2857%,7,100% Table: Report ,g1,N a,1.00,3.00 ,2.00,3.00 b,1.00,3.00 ,2.00,3.00 Table: Report ,N a,6.00 b,6.00 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% Table: Report ,g1,N a,1.00,3.00 ,2.00,4.00 Table: Report ,N a,7.00 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% b: g1,6,85.7143%,1,14.2857%,7,100% b: ,6,85.7143%,1,14.2857%,7,100% Table: Report ,g1,N a,1.00,3.00 ,2.00,4.00 b,1.00,3.00 ,2.00,3.00 Table: Report ,N a,7.00 b,6.00 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% Table: Report ,g1,N a,1.00,3.00 ,2.00,4.00 Table: Report ,N a,7.00 ]) AT_CLEANUP AT_SETUP([MEANS user missing values]) AT_DATA([means-missing.sps], [dnl data list notable list /a * b * g1. begin data. 1 2 9 2 2 1 3 2 1 4 2 2 5 2 2 6 2 2 7 9 2 end data. MISSING VALUES a b g1 (9). MEANS a b BY g1 /cells = COUNT . MEANS a b BY g1 /cells = COUNT /missing = include . MEANS a b BY g1 /cells = COUNT /missing = dependent . ]) AT_CHECK([pspp -O format=csv means-missing.sps], [0], [dnl Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,6,85.7143%,1,14.2857%,7,100% a: ,7,100%,0,0%,7,100% b: g1,5,71.4286%,2,28.5714%,7,100% b: ,6,85.7143%,1,14.2857%,7,100% Table: Report ,g1,N a,1.00,2.00 ,2.00,4.00 b,1.00,2.00 ,2.00,3.00 Table: Report ,N a,6.00 b,5.00 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% b: g1,7,100%,0,0%,7,100% b: ,7,100%,0,0%,7,100% Table: Report ,g1,N a,1.00,2.00 ,2.00,4.00 ,9.00,1.00 b,1.00,2.00 ,2.00,4.00 ,9.00,1.00 Table: Report ,N a,7.00 b,7.00 Table: Case Processing Summary ,Cases,,,,, ,Included,,Excluded,,Total, ,N,Percent,N,Percent,N,Percent a: g1,7,100%,0,0%,7,100% a: ,7,100%,0,0%,7,100% b: g1,6,85.7143%,1,14.2857%,7,100% b: ,6,85.7143%,1,14.2857%,7,100% Table: Report ,g1,N a,1.00,2.00 ,2.00,4.00 ,9.00,1.00 b,1.00,2.00 ,2.00,3.00 ,9.00,1.00 Table: Report ,N a,7.00 b,6.00 ]) AT_CLEANUP AT_SETUP([MEANS empty factor spec]) AT_DATA([means-bad.sps], [dnl data list list /outcome *. begin data. 1 2 3 end data. MEANS TABLES = outcome BY. ]) AT_CHECK([pspp -O format=csv means-bad.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([MEANS parser bug]) dnl This bug caused an infinite loop AT_DATA([means-bad.sps], [dnl DATA LIST notable LIST /a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 fylo *. begin data. 1 2 3 4 5 6 7 8 9 0 11 end data. MEANS TABLES = a1 a2 a3 a4 a5 a6 a7 a8 a9 a10a BY fylo. ]) AT_CHECK([pspp -O format=csv means-bad.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/stats/glm.at0000644000175000017500000002277213137223525014621 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([GLM procedure]) AT_SETUP([GLM latin square design]) dnl This example comes from : dnl http://ssnds.uwo.ca/statsexamples/spssanova/latinsquareresults.html AT_DATA([latin.sps], [dnl set format = F20.3. data list notable fixed /a 1 b 3 c 5 y 7-10(2). begin data. 1 1 6 3.5 1 2 2 8.9 1 3 3 9.6 1 4 4 10.5 1 5 5 3.1 1 6 1 5.9 2 1 2 4.2 2 2 6 1.9 2 3 5 3.7 2 4 3 10.2 2 5 1 7.2 2 6 4 7.6 3 1 1 6.7 3 2 4 5.8 3 3 6 -2.7 3 4 2 4.6 3 5 3 4.0 3 6 5 -0.7 4 1 4 6.6 4 2 1 4.5 4 3 2 3.7 4 4 5 3.7 4 5 6 -3.3 4 6 3 3.0 5 1 3 4.1 5 2 5 2.4 5 3 4 6.0 5 4 1 5.1 5 5 2 3.5 5 6 6 4.0 6 1 5 3.8 6 2 3 5.8 6 3 1 7.0 6 4 6 3.8 6 5 4 5.0 6 6 2 8.6 end data. variable labels a 'Factor A' b 'Factor B' c 'Factor C' y 'Criterion'. glm y by b a c /intercept=include /criteria=alpha(.05) /design = a b c . ]) AT_CHECK([pspp -O format=csv latin.sps | sed 's/329.62[[678]]/329.62/'], [0], [dnl Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,263.064,15,17.538,5.269,.000 Intercept,815.103,1,815.103,244.910,.000 Factor A,78.869,5,15.774,4.739,.005 Factor B,28.599,5,5.720,1.719,.176 Factor C,155.596,5,31.119,9.350,.000 Error,66.563,20,3.328,, Total,1144.730,36,,, Corrected Total,329.62,35,,, ]) AT_CLEANUP AT_SETUP([GLM 2 by 2 factorial design]) AT_DATA([2by2.sps], [dnl set format = F20.3. data list notable list /Factor0 * Factor1 * points (F10). begin data. 1 4 332 1 4 380 1 4 371 1 4 366 1 4 354 1 0 259.5 1 0 302.5 1 0 296 1 0 349 1 0 309 2 4 354.67 2 4 353.5 2 4 304 2 4 365 2 4 339 2 0 306 2 0 339 2 0 353 2 0 351 2 0 333 end data. glm points by Factor0 Factor1 /intercept=include /criteria=alpha(.05) . ]) AT_CHECK([pspp -O format=csv 2by2.sps ], [0], [dnl Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,8667.053,3,2889.018,5.043,.012 Intercept,2256018.640,1,2256018.640,3937.693,.000 Factor0,313.394,1,313.394,.547,.470 Factor1,5157.508,1,5157.508,9.002,.008 Factor0 * Factor1,3196.150,1,3196.150,5.579,.031 Error,9166.865,16,572.929,, Total,2273852.559,20,,, Corrected Total,17833.918,19,,, ]) AT_CLEANUP AT_SETUP([GLM Type I and II Sums of Squares]) dnl The following example comes from dnl http://www.uvm.edu/~dhowell/StatPages/More_Stuff/Type1-3.pdf AT_DATA([data-inc.sps], [dnl set decimal = dot. set format=F20.3. data list notable list /dv * Agrp * B0 * B1 * B2 * i0 * i1 * i2 * sss *. begin data. 5 1 1 0 0 1 0 0 1.00 7 1 1 0 0 1 0 0 1.00 9 1 1 0 0 1 0 0 1.00 8 1 1 0 0 1 0 0 1.00 2 1 0 1 0 0 1 0 1.00 5 1 0 1 0 0 1 0 1.00 7 1 0 1 0 0 1 0 1.00 3 1 0 1 0 0 1 0 1.00 9 1 0 1 0 0 1 0 1.00 8 1 0 0 1 0 0 1 1.00 11 1 0 0 1 0 0 1 1.00 12 1 0 0 1 0 0 1 1.00 14 1 0 0 1 0 0 1 1.00 11 1 -1 -1 -1 -1 -1 -1 1.00 15 1 -1 -1 -1 -1 -1 -1 1.00 16 1 -1 -1 -1 -1 -1 -1 1.00 10 1 -1 -1 -1 -1 -1 -1 1.00 9 1 -1 -1 -1 -1 -1 -1 1.00 7 -1 1 0 0 -1 0 0 2.00 9 -1 1 0 0 -1 0 0 2.00 10 -1 1 0 0 -1 0 0 2.00 9 -1 1 0 0 -1 0 0 2.00 3 -1 0 1 0 0 -1 0 2.00 8 -1 0 1 0 0 -1 0 2.00 9 -1 0 1 0 0 -1 0 2.00 11 -1 0 1 0 0 -1 0 2.00 9 -1 0 0 1 0 0 -1 2.00 12 -1 0 0 1 0 0 -1 2.00 14 -1 0 0 1 0 0 -1 2.00 8 -1 0 0 1 0 0 -1 2.00 7 -1 0 0 1 0 0 -1 2.00 11 -1 -1 -1 -1 1 1 1 2.00 14 -1 -1 -1 -1 1 1 1 2.00 10 -1 -1 -1 -1 1 1 1 2.00 12 -1 -1 -1 -1 1 1 1 2.00 13 -1 -1 -1 -1 1 1 1 2.00 11 -1 -1 -1 -1 1 1 1 2.00 12 -1 -1 -1 -1 1 1 1 2.00 end data. do if B0 = -1 AND B1 = -1 AND B2 = -1. compute Bgrp = 4. end if. do if B0 = 0 AND B1 = 0 AND B2 = 1. compute Bgrp = 3. end if. do if B0 = 0 AND B1 = 1 AND B2 = 0. compute Bgrp = 2. end if. do if B0 = 1 AND B1 = 0 AND B2 = 0. compute Bgrp = 1. end if. ]) AT_DATA([type1.sps], [dnl include 'data-inc.sps'. glm dv by Agrp Bgrp /method = sstype (1) . glm dv by Agrp Bgrp /method = sstype (1) /design Bgrp Agrp Bgrp * Agrp . ]) AT_CHECK([pspp -O format=csv type1.sps], [0], [dnl Table: Tests of Between-Subjects Effects Source,Type I Sum of Squares,df,Mean Square,F,Sig. Corrected Model,216.017,7,30.860,5.046,.001 Intercept,,,,, Agrp,9.579,1,9.579,1.566,.220 Bgrp,186.225,3,62.075,10.151,.000 Agrp * Bgrp,20.212,3,6.737,1.102,.364 Error,183.457,30,6.115,, Total,3810.000,38,,, Corrected Total,399.474,37,,, Table: Tests of Between-Subjects Effects Source,Type I Sum of Squares,df,Mean Square,F,Sig. Corrected Model,216.017,7,30.860,5.046,.001 Intercept,,,,, Bgrp,193.251,3,64.417,10.534,.000 Agrp,2.553,1,2.553,.418,.523 Bgrp * Agrp,20.212,3,6.737,1.102,.364 Error,183.457,30,6.115,, Total,3810.000,38,,, Corrected Total,399.474,37,,, ]) AT_DATA([type2.sps], [dnl include 'data-inc.sps'. glm dv by Agrp Bgrp /method = sstype (2) . ]) AT_CHECK([pspp -O format=csv type2.sps], [0], [dnl Table: Tests of Between-Subjects Effects Source,Type II Sum of Squares,df,Mean Square,F,Sig. Corrected Model,216.017,7,30.860,5.046,.001 Intercept,,,,, Agrp,2.553,1,2.553,.418,.523 Bgrp,186.225,3,62.075,10.151,.000 Agrp * Bgrp,20.212,3,6.737,1.102,.364 Error,183.457,30,6.115,, Total,3810.000,38,,, Corrected Total,399.474,37,,, ]) AT_CLEANUP AT_SETUP([GLM excluded intercept]) dnl The following example comes from dnl dnl Rudolf N. Cardinal dnl Graduate-level statistics for psychology and neuroscience dnl ANOVA in practice, and complex ANOVA designs dnl Version of 2 May 2004 dnl dnl Downloaded from: http://egret.psychol.cam.ac.uk/psychology/graduate/Guide_to_ANOVA.pdf AT_DATA([intercept-exclude.sps], [dnl set format = F20.3. data list notable list /depvar * A *. begin data. 10 1 14 1 8 1 7 1 2 1 10 1 1 1 3 1 2 1 8.5 1 14.29 2 18.49 2 12.46 2 11.63 2 6.66 2 14.02 2 5.66 2 7.06 2 6.37 2 13.26 2 end data. GLM depvar by A /intercept = exclude . GLM depvar by A /intercept = include . ]) AT_CHECK([pspp -O format=csv intercept-exclude.sps], [0], [dnl Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Model,1636.826,2,818.413,43.556,.000 A,1636.826,2,818.413,43.556,.000 Error,338.216,18,18.790,, Total,1975.042,20,,, Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,98.568,1,98.568,5.246,.034 Intercept,1538.258,1,1538.258,81.867,.000 A,98.568,1,98.568,5.246,.034 Error,338.216,18,18.790,, Total,1975.042,20,,, Corrected Total,436.784,19,,, ]) AT_CLEANUP AT_SETUP([GLM missing values]) AT_DATA([glm.data], [dnl 1 1 6 3.5 1 2 2 8.9 1 3 3 9.6 1 4 4 10.5 1 5 5 3.1 1 6 1 5.9 2 1 2 4.2 2 2 6 1.9 2 3 5 3.7 2 4 3 10.2 2 5 1 7.2 2 6 4 7.6 3 1 1 6.7 3 2 4 5.8 3 3 6 -2.7 3 4 2 4.6 3 5 3 4.0 3 6 5 -0.7 4 1 4 6.6 4 2 1 4.5 4 3 2 3.7 4 4 5 3.7 4 5 6 -3.3 4 6 3 3.0 5 1 3 4.1 5 2 5 2.4 5 3 4 6.0 5 4 1 5.1 5 5 2 3.5 5 6 6 4.0 6 1 5 3.8 6 2 3 5.8 6 3 1 7.0 6 4 6 3.8 6 5 4 5.0 6 6 2 8.6 ]) AT_DATA([glm-miss.sps], [dnl set format = F20.3. data list file='glm.data' notable fixed /a 1 b 3 c 5 y 7-10(2). do if a=6. recode y (else=SYSMIS). end if. glm y by b a c /criteria=alpha(.05) /design = a b c . ]) AT_CHECK([pspp -O format=csv glm-miss.sps], [0], [dnl Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,251.621,14,17.973,4.969,.002 Intercept,628.376,1,628.376,173.737,.000 a,72.929,4,18.232,5.041,.009 b,20.703,5,4.141,1.145,.380 c,135.179,5,27.036,7.475,.001 Error,54.253,15,3.617,, Total,934.250,30,,, Corrected Total,305.874,29,,, ]) AT_DATA([glm-miss2.sps], [dnl set format = F20.3. data list file='glm.data' notable fixed /a 1 b 3 c 5 y 7-10(2). select if a <> 6. glm y by b a c /criteria=alpha(.05) /design = a b c . ]) AT_CHECK([pspp -O format=csv glm-miss2.sps], [0], [dnl Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,251.621,14,17.973,4.969,.002 Intercept,628.376,1,628.376,173.737,.000 a,72.929,4,18.232,5.041,.009 b,20.703,5,4.141,1.145,.380 c,135.179,5,27.036,7.475,.001 Error,54.253,15,3.617,, Total,934.250,30,,, Corrected Total,305.874,29,,, ]) dnl Now for some missing values in the factor variables. AT_DATA([glm-miss3.sps], [dnl set format = F20.3. data list file=glm.data notable fixed /a 1 b 3 c 5 y 7-10(2). do if a=6. recode a (else=SYSMIS). end if. glm y by b a c /criteria=alpha(.05) /design = a b c . ]) AT_CHECK([pspp -O format=csv glm-miss3.sps], [0], [dnl Table: Tests of Between-Subjects Effects Source,Type III Sum of Squares,df,Mean Square,F,Sig. Corrected Model,251.621,14,17.973,4.969,.002 Intercept,628.376,1,628.376,173.737,.000 a,72.929,4,18.232,5.041,.009 b,20.703,5,4.141,1.145,.380 c,135.179,5,27.036,7.475,.001 Error,54.253,15,3.617,, Total,934.250,30,,, Corrected Total,305.874,29,,, ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/aggregate.at0000644000175000017500000002547713137223525015775 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([AGGREGATE procedure]) dnl CHECK_AGGREGATE(OUTFILE, SORT, MISSING) dnl dnl Checks the AGGREGATE procedure with the specified combination of: dnl dnl - OUTFILE: One of "dataset", "active", or "external" according to dnl where AGGREGATE's output should be directed. dnl dnl - SORT: Either "presorted" or "unsorted" according to whether dnl AGGREGATE should received presorted input. dnl dnl - MISSING: Either "itemwise" or "columnwise" according to the basis dnl on which missing values should be eliminated. dnl m4_define([CHECK_AGGREGATE], [ AT_SETUP([AGGREGATE $2 data to $1 file, $3 missing]) AT_DATA([aggregate.data], [2 42 1001 4 41 3112 1112 2661 1221 2771 1331 1441 2881 1551 ]) AT_DATA([aggregate.sps], [DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4. WEIGHT BY w. MISSING VALUES n(4) s('4'). m4_if([$1], [dataset], [DATASET DECLARE aggregate.]) m4_if([$2], [presorted], [SORT CASES BY g.]) AGGREGATE dnl m4_if([$1], [active], [OUTFILE=*], [$1], [external], [OUTFILE='aggregate.sys'], [outfile=aggregate]) dnl m4_if([$2], [presorted], [/PRESORTED]) dnl m4_if([$3], [columnwise], [/MISSING=COLUMNWISE]) /DOCUMENT /BREAK=g /N = n /NI = n./ NU = nu /NUI = nu./ NFGT2 = fgt(n, 2) /NFGT2I = fgt.(n, 2) /SFGT2 = fgt(s, '2') /SFGT2I = fgt.(s, '2') /NFIN23 = fin(n, 2, 3) /NFIN23I = fin.(n, 2, 3) /SFIN23 = fin(s, '2', '3') /SFIN23I = fin.(s, '2', '3') /NFLT2 = flt(n, 2) /NFLT2I = flt.(n, 2) /SFLT2 = flt(s, '2') /SFLT2I = flt.(s, '2') /NFIRST = first(n) /NFIRSTI = first.(n) /SFIRST = first(s) /SFIRSTI = first.(s) /NFOUT23 = fout(n, 3, 2) /NFOUT23I = fout.(n, 3, 2) /SFOUT23 = fout(s, '3', '2') /SFOUT23I = fout.(s, '3', '2') /NLAST = last(n) /NLASTI = last.(n) /SLAST = last(s) /SLASTI = last.(s) /NMAX = max(n) /NMAXI = max.(n) /SMAX = max(s) /SMAXI = max.(s) /NMEAN = mean(n) /NMEANI = mean.(n) /NMIN = min(n) /NMINI = min.(n) /SMIN = min(s) /SMINI = min.(s) /NN = n(n) /NNI = n.(n) /SN = n(s) /SNI = n.(s) /NNMISS = nmiss(n) /NNMISSI = nmiss.(n) /SNMISS = nmiss(s) /SNMISSI = nmiss.(s) /NNU = nu(n) /NNUI = nu.(n) /SNU = nu(s) /SNUI = nu.(s) /NNUMISS = numiss(n) /NNUMISSI = numiss.(n) /SNUMISS = numiss(s) /SNUMISSI = numiss.(s) /NPGT2 = pgt(n, 2) /NPGT2I = pgt.(n, 2) /SPGT2 = pgt(s, '2') /SPGT2I = pgt.(s, '2') /NPIN23 = pin(n, 2, 3) /NPIN23I = pin.(n, 2, 3) /SPIN23 = pin(s, '2', '3') /SPIN23I = pin.(s, '2', '3') /NPLT2 = plt(n, 2) /NPLT2I = plt.(n, 2) /SPLT2 = plt(s, '2') /SPLT2I = plt.(s, '2') /NPOUT23 = pout(n, 2, 3) /NPOUT23I = pout.(n, 2, 3) /SPOUT23 = pout(s, '2', '3') /SPOUT23I = pout.(s, '2', '3') /NMEDIAN = median(n) /NMEDIANI = median.(n) /NSD = sd(n) /NSDI = sd.(n) /NSUM = sum(n) /NSUMI = sum.(n). m4_if([$1], [external], [GET FILE='aggregate.sys'.], [$1], [dataset], [DATASET ACTIVATE aggregate.]) LIST. ]) AT_CHECK([pspp -O format=csv aggregate.sps], [0], [stdout]) AT_CHECK([[sed 's/^[^:]*:[0-9]*: //' < stdout]], [0], [m4_if([$3], [itemwise], [warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,.333,.429,.333,.429,.333,.286,.333,.286,.500,.429,.500,.429,0,0,0,0,.667,.714,.667,.714,5,5,5,5,5,5,5,5,2.00,2.29,0,0,0,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,33.3,42.9,33.3,42.9,33.3,28.6,33.3,28.6,50.0,42.9,50.0,42.9,66.7,71.4,66.7,71.4,1.50,2.00,1.79,1.80,12.00,16.00 2,5.00,5.00,4,4,1.000,1.000,1.000,1.000,.000,.000,.000,.000,.000,.000,.000,.000,6,6,6,4,1.000,1.000,1.000,1.000,8,8,8,8,8,8,8,8,7.00,7.00,6,6,6,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,100.0,100.0,100.0,100.0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,7.00,7.00,1.00,1.00,21.00,21.00 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,NaN,NaN,. ,. ,. ,. @&t@ ], [warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. warning: AGGREGATE: The value arguments passed to the FOUT function are out-of-order. They will be treated as if they had been specified in the correct order. Table: Data List G,N,NI,NU,NUI,NFGT2,NFGT2I,SFGT2,SFGT2I,NFIN23,NFIN23I,SFIN23,SFIN23I,NFLT2,NFLT2I,SFLT2,SFLT2I,NFIRST,NFIRSTI,SFIRST,SFIRSTI,NFOUT23,NFOUT23I,SFOUT23,SFOUT23I,NLAST,NLASTI,SLAST,SLASTI,NMAX,NMAXI,SMAX,SMAXI,NMEAN,NMEANI,NMIN,NMINI,SMIN,SMINI,NN,NNI,SN,SNI,NNMISS,NNMISSI,SNMISS,SNMISSI,NNU,NNUI,SNU,SNUI,NNUMISS,NNUMISSI,SNUMISS,SNUMISSI,NPGT2,NPGT2I,SPGT2,SPGT2I,NPIN23,NPIN23I,SPIN23,SPIN23I,NPLT2,NPLT2I,SPLT2,SPLT2I,NPOUT23,NPOUT23I,SPOUT23,SPOUT23I,NMEDIAN,NMEDIANI,NSD,NSDI,NSUM,NSUMI 1,7.00,7.00,6,6,. ,.429,. ,.429,. ,.286,. ,.286,. ,.429,. ,.429,.,0,,0,. ,.714,. ,.714,.,5,,5,.,5,,5,. ,2.29,.,0,,0,6.00,7.00,6.00,7.00,1.00,.00,1.00,.00,5,6,5,6,1,0,1,0,. ,42.9,. ,42.9,. ,28.6,. ,28.6,. ,42.9,. ,42.9,. ,71.4,. ,71.4,. ,2.00,. ,1.80,. ,16.00 2,5.00,5.00,4,4,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,8,.,.,,8,. ,. ,.,.,,4,3.00,3.00,3.00,5.00,2.00,2.00,2.00,.00,3,3,3,4,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. @&t@ 3,2.00,2.00,1,1,.000,.000,.000,.000,.000,.000,.000,.000,1.000,1.000,1.000,1.000,1,1,1,1,1.000,1.000,1.000,1.000,1,1,1,1,1,1,1,1,1.00,1.00,1,1,1,1,2.00,2.00,2.00,2.00,.00,.00,.00,.00,1,1,1,1,0,0,0,0,.0,.0,.0,.0,.0,.0,.0,.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,1.00,1.00,.00,.00,2.00,2.00 4,1.00,1.00,1,1,. ,. ,. ,1.000,. ,. ,. ,.000,. ,. ,. ,.000,.,.,,4,. ,. ,. ,1.000,.,.,,4,.,.,,4,. ,. ,.,.,,4,.00,.00,.00,1.00,1.00,1.00,1.00,.00,0,0,0,1,1,1,1,0,. ,. ,. ,100.0,. ,. ,. ,.0,. ,. ,. ,.0,. ,. ,. ,100.0,. ,. ,. ,. ,. ,. @&t@ ])]) AT_CLEANUP]) CHECK_AGGREGATE([dataset], [presorted], [itemwise]) CHECK_AGGREGATE([dataset], [presorted], [columnwise]) CHECK_AGGREGATE([dataset], [unsorted], [itemwise]) CHECK_AGGREGATE([dataset], [unsorted], [columnwise]) CHECK_AGGREGATE([active], [presorted], [itemwise]) CHECK_AGGREGATE([active], [presorted], [columnwise]) CHECK_AGGREGATE([active], [unsorted], [itemwise]) CHECK_AGGREGATE([active], [unsorted], [columnwise]) CHECK_AGGREGATE([external], [presorted], [itemwise]) CHECK_AGGREGATE([external], [presorted], [columnwise]) CHECK_AGGREGATE([external], [unsorted], [itemwise]) CHECK_AGGREGATE([external], [unsorted], [columnwise]) AT_SETUP([AGGREGATE crash with MAX function]) AT_DATA([aggregate.sps], [DATA LIST LIST /X (F8.2) Y (a25). BEGIN DATA. 87.50 foo 87.34 bar 1 bar END DATA. AGGREGATE OUTFILE=* /BREAK=y /X=MAX(x). LIST /x y. ]) AT_CHECK([pspp -O format=csv aggregate.sps], [0], [Table: Reading free-form data from INLINE. Variable,Format X,F8.2 Y,A25 Table: Data List X,Y 87.34,bar @&t@ 87.50,foo @&t@ ]) AT_CLEANUP AT_SETUP([AGGREGATE crash with invalid syntax]) AT_DATA([aggregate.sps], [INPUT PROGRAM. LOOP c=1 TO 20. COMPUTE x=UNIFORM(10) END CASE. END LOOP. END FILE. END INPUT PROGRAM. AGGREGATE /BREAK=x . ]) AT_CHECK([pspp -O format=csv aggregate.sps], [1], [ignore], []) AT_CLEANUP AT_SETUP([AGGREGATE mode=addvariables]) AT_DATA([addvariables.sps], [data list notable list /x * cn * y *. begin data. 1 1 2 3 2 3 3 3 4 5 4 6 7 5 8 7 6 9 7 7 20 9 8 11 end data. aggregate outfile=* mode=addvariables /break = x /sum = sum(y) /mean = mean (y) /median = median (y). list. ]) AT_CHECK([pspp -O format=csv addvariables.sps], [0], [Table: Data List x,cn,y,sum,mean,median 1.00,1.00,2.00,2.00,2.00,2.00 3.00,2.00,3.00,7.00,3.50,3.50 3.00,3.00,4.00,7.00,3.50,3.50 5.00,4.00,6.00,6.00,6.00,6.00 7.00,5.00,8.00,37.00,12.33,9.00 7.00,6.00,9.00,37.00,12.33,9.00 7.00,7.00,20.00,37.00,12.33,9.00 9.00,8.00,11.00,11.00,11.00,11.00 ]) AT_CLEANUP AT_SETUP([AGGREGATE buggy duplicate variables]) dnl Test for a bug which crashed when duplicated dnl variables were attempted. AT_DATA([dup-variables.sps], [DATA LIST NOTABLE LIST /x * . begin data 1 1 1 1 2 2 2 3 3 3 3 3 3 end data. AGGREGATE OUTFILE=* MODE=ADDVARIABLES /BREAK= x /N_BREAK = N. AGGREGATE OUTFILE=* MODE=ADDVARIABLES /BREAK= x /N_BREAK = N. ]) AT_CHECK([pspp -O format=csv dup-variables.sps], [1], ["dup-variables.sps:24: error: AGGREGATE: Variable name N_BREAK is not unique within the aggregate file dictionary, which contains the aggregate variables and the break variables." ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/oneway.at0000644000175000017500000005267113137223525015345 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([ONEWAY procedure]) AT_SETUP([ONEWAY basic operation]) AT_DATA([oneway.sps], [DATA LIST NOTABLE LIST /QUALITY * BRAND * . BEGIN DATA 7 3 4 3 3 1 2 1 1 1 4 2 2 2 3 2 5 3 1 1 4 1 5 2 2 2 3 3 6 3 END DATA VARIABLE LABELS brand 'Manufacturer'. VARIABLE LABELS quality 'Breaking Strain'. VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'. ONEWAY quality BY brand /STATISTICS descriptives homogeneity /CONTRAST = -2 1 1 /CONTRAST = 0 -1 1 . ]) AT_CHECK([pspp -O format=csv oneway.sps], [0], [dnl Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum Breaking Strain,Aspeger,5,2.20,1.30,.58,.58,3.82,1.00,4.00 ,Bloggs,5,3.20,1.30,.58,1.58,4.82,2.00,5.00 ,Charlies,5,5.00,1.58,.71,3.04,6.96,3.00,7.00 ,Total,15,3.47,1.77,.46,2.49,4.45,1.00,7.00 Table: Test of Homogeneity of Variances ,Levene Statistic,df1,df2,Sig. Breaking Strain,.09,2,12,.913 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. Breaking Strain,Between Groups,20.13,2,10.07,5.12,.025 ,Within Groups,23.60,12,1.97,, ,Total,43.73,14,,, Table: Contrast Coefficients ,,Manufacturer,, ,,Aspeger,Bloggs,Charlies Contrast,1,-2,1,1 ,2,0,-1,1 Table: Contrast Tests ,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed) Breaking Strain,Assume equal variances,1,3.80,1.54,2.47,12,.029 ,,2,1.80,.89,2.03,12,.065 ,Does not assume equal,1,3.80,1.48,2.56,8.74,.031 ,,2,1.80,.92,1.96,7.72,.086 ]) AT_CLEANUP AT_SETUP([ONEWAY with splits]) AT_DATA([oneway-splits.sps], [DATA LIST NOTABLE LIST /QUALITY * BRAND * S *. BEGIN DATA 3 1 1 2 1 1 1 1 1 1 1 1 4 1 1 5 2 1 2 2 1 4 2 2 2 2 2 3 2 2 7 3 2 4 3 2 5 3 2 3 3 2 6 3 2 END DATA VARIABLE LABELS brand 'Manufacturer'. VARIABLE LABELS quality 'Breaking Strain'. VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'. SPLIT FILE by s. ONEWAY quality BY brand /STATISTICS descriptives homogeneity /CONTRAST = -2 2 /CONTRAST = -1 1 . ]) AT_CHECK([pspp -O format=csv oneway-splits.sps], [0], [Variable,Value,Label S,1.00, Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum Breaking Strain,Aspeger,5,2.20,1.30,.58,.58,3.82,1.00,4.00 ,Bloggs,2,3.50,2.12,1.50,-15.56,22.56,2.00,5.00 ,Total,7,2.57,1.51,.57,1.17,3.97,1.00,5.00 Table: Test of Homogeneity of Variances ,Levene Statistic,df1,df2,Sig. Breaking Strain,1.09,1,5,.345 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. Breaking Strain,Between Groups,2.41,1,2.41,1.07,.349 ,Within Groups,11.30,5,2.26,, ,Total,13.71,6,,, Table: Contrast Coefficients ,,Manufacturer, ,,Aspeger,Bloggs Contrast,1,-2,2 ,2,-1,1 Table: Contrast Tests ,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed) Breaking Strain,Assume equal variances,1,2.60,2.52,1.03,5,.349 ,,2,1.30,1.26,1.03,5,.349 ,Does not assume equal,1,2.60,3.22,.81,1.32,.539 ,,2,1.30,1.61,.81,1.32,.539 Variable,Value,Label S,2.00, Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum Breaking Strain,Bloggs,3,3.00,1.00,.58,.52,5.48,2.00,4.00 ,Charlies,5,5.00,1.58,.71,3.04,6.96,3.00,7.00 ,Total,8,4.25,1.67,.59,2.85,5.65,2.00,7.00 Table: Test of Homogeneity of Variances ,Levene Statistic,df1,df2,Sig. Breaking Strain,.92,1,6,.374 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. Breaking Strain,Between Groups,7.50,1,7.50,3.75,.101 ,Within Groups,12.00,6,2.00,, ,Total,19.50,7,,, Table: Contrast Coefficients ,,Manufacturer, ,,Bloggs,Charlies Contrast,1,-2,2 ,2,-1,1 Table: Contrast Tests ,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed) Breaking Strain,Assume equal variances,1,4.00,2.07,1.94,6,.101 ,,2,2.00,1.03,1.94,6,.101 ,Does not assume equal,1,4.00,1.83,2.19,5.88,.072 ,,2,2.00,.91,2.19,5.88,.072 ]) AT_CLEANUP AT_SETUP([ONEWAY with missing values]) dnl Check that missing are treated properly AT_DATA([oneway-missing1.sps], [DATA LIST NOTABLE LIST /v1 * v2 * dep * vn *. BEGIN DATA . . 1 4 3 3 1 2 2 2 1 2 1 1 1 2 1 1 1 2 4 4 1 2 5 5 2 2 2 2 2 2 4 4 2 2 2 2 2 2 3 3 2 2 7 7 3 2 4 4 3 2 5 5 3 2 3 3 3 2 6 6 3 2 END DATA ONEWAY v1 v2 BY dep /STATISTICS descriptives homogeneity /MISSING ANALYSIS . ]) AT_DATA([oneway-missing2.sps], [DATA LIST NOTABLE LIST /v1 * v2 * dep * vn * . BEGIN DATA 4 . 1 2 3 3 1 2 2 2 1 2 1 1 1 2 1 1 1 2 4 4 1 2 5 5 2 2 2 2 2 2 4 4 2 2 2 2 2 2 3 3 2 2 7 7 3 2 4 4 3 2 5 5 3 2 3 3 3 2 6 6 3 2 END DATA ONEWAY v1 v2 BY dep /STATISTICS descriptives homogeneity /MISSING LISTWISE . ]) AT_CHECK([pspp -O format=csv oneway-missing1.sps > first.out], [0]) AT_CHECK([pspp -O format=csv oneway-missing2.sps > second.out], [0]) AT_CHECK([diff first.out second.out], [0], []) dnl Now a test with missing values in the independent variable AT_DATA([oneway-missing3.sps], [DATA LIST NOTABLE LIST /v1 * v2 * dep * vn * . BEGIN DATA 4 2 . 2 3 3 1 2 2 2 1 2 1 1 1 2 1 1 1 2 4 4 1 2 5 5 2 2 2 2 2 2 4 4 2 2 2 2 2 2 3 3 2 2 7 7 3 2 4 4 3 2 5 5 3 4 3 3 3 2 6 6 3 2 END DATA ONEWAY v1 v2 BY dep /STATISTICS descriptives homogeneity /MISSING ANALYSIS . ]) AT_CHECK([pspp -O format=csv oneway-missing3.sps > third.out], [0]) AT_CHECK([diff first.out third.out], [0], []) AT_CLEANUP AT_SETUP([ONEWAY descriptives subcommand]) AT_DATA([oneway-descriptives.sps], [DATA LIST NOTABLE LIST /QUALITY * BRAND * . BEGIN DATA 13 11 12 11 11 11 11 11 14 11 15 25 12 25 14 25 12 25 13 25 17 301 14 301 15 301 13 301 16 301 END DATA ONEWAY quality BY brand /STATISTICS descriptives . ]) AT_CHECK([pspp -O format=csv oneway-descriptives.sps], [0], [Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum QUALITY,11.00,5,12.20,1.30,.58,10.58,13.82,11.00,14.00 ,25.00,5,13.20,1.30,.58,11.58,14.82,12.00,15.00 ,301.00,5,15.00,1.58,.71,13.04,16.96,13.00,17.00 ,Total,15,13.47,1.77,.46,12.49,14.45,11.00,17.00 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. QUALITY,Between Groups,20.13,2,10.07,5.12,.025 ,Within Groups,23.60,12,1.97,, ,Total,43.73,14,,, ]) AT_CLEANUP AT_SETUP([ONEWAY homogeneity subcommand]) AT_DATA([oneway-homogeneity.sps], [DATA LIST NOTABLE LIST /QUALITY * BRAND * . BEGIN DATA 13 11 12 11 11 11 11 11 14 11 15 25 12 25 14 25 12 25 13 25 17 301 14 301 15 301 13 301 16 301 END DATA ONEWAY quality BY brand /STATISTICS homogeneity . ]) AT_CHECK([pspp -O format=csv oneway-homogeneity.sps], [0], [Table: Test of Homogeneity of Variances ,Levene Statistic,df1,df2,Sig. QUALITY,.09,2,12,.913 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. QUALITY,Between Groups,20.13,2,10.07,5.12,.025 ,Within Groups,23.60,12,1.97,, ,Total,43.73,14,,, ]) AT_CLEANUP AT_SETUP([ONEWAY multiple variables]) dnl check that everything works ok when several different dependent variables are specified. dnl This of course does not mean that we're doing a multivariate analysis. It's just like dnl running several tests at once. AT_DATA([multivar.sps], [DATA LIST notable LIST /x * y * z * g *. begin data. 1 1 0 10 1 1 9 10 9 1 2 10 1 1 3 20 1 1 8 20 1 1 1 20 1 1 2 20 0 1 3 20 1 1 4 30 0 1 5 30 1 1 6 30 0 1 7 30 1 2 8 30 2 2 9 30 1 2 1 30 1 2 0 30 1 2 2 40 8 2 3 40 1 2 4 40 1 2 9 40 9 2 8 40 7 3 7 40 2 3 6 40 3 3 5 40 end data. ONEWAY x y z by g /STATISTICS = DESCRIPTIVES HOMOGENEITY /CONTRAST 3 2 0 -5 /CONTRAST 2 -9 7 0 . ]) AT_CHECK([pspp -o pspp.csv multivar.sps]) dnl Some machines return 3.88 instead of 3.87 below (see bug #31611). AT_CHECK([sed 's/^,Within Groups,3.88/,Within Groups,3.87/' pspp.csv], [0], [dnl Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum x,10.00,3,3.67,4.62,2.67,-7.81,15.14,1.00,9.00 ,20.00,5,.80,.45,.20,.24,1.36,.00,1.00 ,30.00,8,.88,.64,.23,.34,1.41,.00,2.00 ,40.00,8,4.00,3.42,1.21,1.14,6.86,1.00,9.00 ,Total,24,2.25,2.83,.58,1.05,3.45,.00,9.00 y,10.00,3,1.00,.00,.00,1.00,1.00,1.00,1.00 ,20.00,5,1.00,.00,.00,1.00,1.00,1.00,1.00 ,30.00,8,1.50,.53,.19,1.05,1.95,1.00,2.00 ,40.00,8,2.38,.52,.18,1.94,2.81,2.00,3.00 ,Total,24,1.63,.71,.15,1.32,1.93,1.00,3.00 z,10.00,3,3.67,4.73,2.73,-8.07,15.41,.00,9.00 ,20.00,5,3.40,2.70,1.21,.05,6.75,1.00,8.00 ,30.00,8,5.00,3.21,1.13,2.32,7.68,.00,9.00 ,40.00,8,5.50,2.45,.87,3.45,7.55,2.00,9.00 ,Total,24,4.67,2.99,.61,3.40,5.93,.00,9.00 Table: Test of Homogeneity of Variances ,Levene Statistic,df1,df2,Sig. x,18.76,3,20,.000 y,71.41,3,20,.000 z,.89,3,20,.463 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. x,Between Groups,56.16,3,18.72,2.92,.059 ,Within Groups,128.34,20,6.42,, ,Total,184.50,23,,, y,Between Groups,7.75,3,2.58,13.33,.000 ,Within Groups,3.87,20,.19,, ,Total,11.63,23,,, z,Between Groups,17.47,3,5.82,.62,.610 ,Within Groups,187.87,20,9.39,, ,Total,205.33,23,,, Table: Contrast Coefficients ,,g,,, ,,10.00,20.00,30.00,40.00 Contrast,1,3,2,0,-5 ,2,2,-9,7,0 Table: Contrast Tests ,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed) x,Assume equal variances,1,-7.40,6.67,1.11,20,.280 ,,2,6.26,12.32,.51,20,.617 ,Does not assume equal,1,-7.40,10.04,-.74,4.53,.497 ,,2,6.26,5.85,1.07,2.87,.366 y,Assume equal variances,1,-6.88,1.16,5.94,20,.000 ,,2,3.50,2.14,1.63,20,.118 ,Does not assume equal,1,-6.88,.91,-7.51,7.00,.000 ,,2,3.50,1.32,2.65,7.00,.033 z,Assume equal variances,1,-9.70,8.07,1.20,20,.243 ,,2,11.73,14.91,.79,20,.440 ,Does not assume equal,1,-9.70,9.57,-1.01,3.64,.373 ,,2,11.73,14.53,.81,9.88,.438 ]) AT_CLEANUP dnl Tests that everything treats weights properly AT_SETUP([ONEWAY vs. weights]) AT_DATA([oneway-unweighted.sps], [DATA LIST NOTABLE LIST /QUALITY * BRAND * W *. BEGIN DATA 3 1 1 2 1 1 1 1 1 1 1 1 4 1 1 5 2 1 2 2 1 4 2 1 4 2 1 4 2 1 2 2 1 2 2 1 3 2 1 7 3 1 4 3 1 5 3 1 5 3 1 3 3 1 6 3 1 END DATA. WEIGHT BY W. ONEWAY quality BY brand /STATISTICS descriptives homogeneity . ]) AT_CHECK([pspp -o pspp-unweighted.csv oneway-unweighted.sps], [0], [ignore], [ignore]) AT_DATA([oneway-weighted.sps], [DATA LIST NOTABLE LIST /QUALITY * BRAND * W *. BEGIN DATA 3 1 1 2 1 1 1 1 2 4 1 1 5 2 1 2 2 1 4 2 3 2 2 2 3 2 1 7 3 1 4 3 1 5 3 2 3 3 1 6 3 1 END DATA. WEIGHT BY W. ONEWAY quality BY brand /STATISTICS descriptives homogeneity . ]) AT_CHECK([pspp -o pspp-weighted.csv oneway-weighted.sps], [0], [ignore], [ignore]) AT_CHECK([diff pspp-weighted.csv pspp-unweighted.csv], [0]) AT_CLEANUP AT_SETUP([ONEWAY posthoc LSD and BONFERRONI]) AT_DATA([oneway-pig.sps],[dnl SET FORMAT F12.3. data list notable list /pigmentation * family *. begin data. 36 1 39 1 43 1 38 1 37 1 46 2 47 2 47 2 47 2 43 2 40 3 50 3 44 3 48 3 50 3 45 4 53 4 56 4 52 4 56 4 end data. oneway pigmentation by family /statistics = descriptives /posthoc = lsd bonferroni alpha (0.05) . ]) AT_CHECK([pspp -O format=csv oneway-pig.sps], [0], [Table: Descriptives ,,,,,,95% Confidence Interval for Mean,,, ,,N,Mean,Std. Deviation,Std. Error,Lower Bound,Upper Bound,Minimum,Maximum pigmentation,1.000,5,38.600,2.702,1.208,35.245,41.955,36.000,43.000 ,2.000,5,46.000,1.732,.775,43.849,48.151,43.000,47.000 ,3.000,5,46.400,4.336,1.939,41.016,51.784,40.000,50.000 ,4.000,5,52.400,4.506,2.015,46.806,57.994,45.000,56.000 ,Total,20,45.850,5.967,1.334,43.057,48.643,36.000,56.000 Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. pigmentation,Between Groups,478.950,3,159.650,12.927,.000 ,Within Groups,197.600,16,12.350,, ,Total,676.550,19,,, Table: Multiple Comparisons (pigmentation) ,,,Mean Difference,,,95% Confidence Interval, ,(I) family,(J) family,(I - J),Std. Error,Sig.,Lower Bound,Upper Bound LSD,1.000,2.000,-7.400,2.223,.004,-12.112,-2.688 ,,3.000,-7.800,2.223,.003,-12.512,-3.088 ,,4.000,-13.800,2.223,.000,-18.512,-9.088 ,2.000,1.000,7.400,2.223,.004,2.688,12.112 ,,3.000,-.400,2.223,.859,-5.112,4.312 ,,4.000,-6.400,2.223,.011,-11.112,-1.688 ,3.000,1.000,7.800,2.223,.003,3.088,12.512 ,,2.000,.400,2.223,.859,-4.312,5.112 ,,4.000,-6.000,2.223,.016,-10.712,-1.288 ,4.000,1.000,13.800,2.223,.000,9.088,18.512 ,,2.000,6.400,2.223,.011,1.688,11.112 ,,3.000,6.000,2.223,.016,1.288,10.712 Bonferroni,1.000,2.000,-7.400,2.223,.025,-14.086,-.714 ,,3.000,-7.800,2.223,.017,-14.486,-1.114 ,,4.000,-13.800,2.223,.000,-20.486,-7.114 ,2.000,1.000,7.400,2.223,.025,.714,14.086 ,,3.000,-.400,2.223,1.000,-7.086,6.286 ,,4.000,-6.400,2.223,.065,-13.086,.286 ,3.000,1.000,7.800,2.223,.017,1.114,14.486 ,,2.000,.400,2.223,1.000,-6.286,7.086 ,,4.000,-6.000,2.223,.095,-12.686,.686 ,4.000,1.000,13.800,2.223,.000,7.114,20.486 ,,2.000,6.400,2.223,.065,-.286,13.086 ,,3.000,6.000,2.223,.095,-.686,12.686 ]) AT_CLEANUP AT_SETUP([ONEWAY posthoc Tukey HSD and Games-Howell]) AT_DATA([oneway-tukey.sps],[dnl set format = f11.3. data list notable list /libido * dose *. begin data. 3 0 2 0 1 0 1 0 4 0 5 1 2 1 4 1 2 1 3 1 7 2 4 2 5 2 3 2 6 2 end data. variable label dose 'Dose of Viagra'. add value labels dose 0 'Placebo' 1 '1 Dose' 2 '2 Doses'. oneway libido by dose /posthoc tukey gh. ]) AT_CHECK([pspp -O format=csv oneway-tukey.sps], [0], [Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. libido,Between Groups,20.133,2,10.067,5.119,.025 ,Within Groups,23.600,12,1.967,, ,Total,43.733,14,,, Table: Multiple Comparisons (libido) ,,,Mean Difference,,,95% Confidence Interval, ,(I) Dose of Viagra,(J) Dose of Viagra,(I - J),Std. Error,Sig.,Lower Bound,Upper Bound Tukey HSD,Placebo,1 Dose,-1.000,.887,.516,-3.366,1.366 ,,2 Doses,-2.800,.887,.021,-5.166,-.434 ,1 Dose,Placebo,1.000,.887,.516,-1.366,3.366 ,,2 Doses,-1.800,.887,.147,-4.166,.566 ,2 Doses,Placebo,2.800,.887,.021,.434,5.166 ,,1 Dose,1.800,.887,.147,-.566,4.166 Games-Howell,Placebo,1 Dose,-1.000,.887,.479,-3.356,1.356 ,,2 Doses,-2.800,.887,.039,-5.439,-.161 ,1 Dose,Placebo,1.000,.887,.479,-1.356,3.356 ,,2 Doses,-1.800,.887,.185,-4.439,.839 ,2 Doses,Placebo,2.800,.887,.039,.161,5.439 ,,1 Dose,1.800,.887,.185,-.839,4.439 ]) AT_CLEANUP AT_SETUP([ONEWAY posthoc Sidak]) AT_DATA([oneway-sidak.sps],[dnl SET FORMAT F20.4. DATA LIST notable LIST /program score. BEGIN DATA. 1 9 1 12 1 14 1 11 1 13 2 10 2 6 2 9 2 9 2 10 3 12 3 14 3 11 3 13 3 11 4 9 4 8 4 11 4 7 4 8 END DATA. ONEWAY score BY program /MISSING ANALYSIS /POSTHOC = SIDAK. ]) AT_CHECK([pspp -O format=csv oneway-sidak.sps], [0], [Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. score,Between Groups,54.9500,3,18.3167,7.0449,.003 ,Within Groups,41.6000,16,2.6000,, ,Total,96.5500,19,,, Table: Multiple Comparisons (score) ,,,Mean Difference,,,95% Confidence Interval, ,(I) program,(J) program,(I - J),Std. Error,Sig.,Lower Bound,Upper Bound Šidák,1.0000,2.0000,3.0000,1.0198,.056,-.0575,6.0575 ,,3.0000,-.4000,1.0198,.999,-3.4575,2.6575 ,,4.0000,3.2000,1.0198,.038,.1425,6.2575 ,2.0000,1.0000,-3.0000,1.0198,.056,-6.0575,.0575 ,,3.0000,-3.4000,1.0198,.025,-6.4575,-.3425 ,,4.0000,.2000,1.0198,1.000,-2.8575,3.2575 ,3.0000,1.0000,.4000,1.0198,.999,-2.6575,3.4575 ,,2.0000,3.4000,1.0198,.025,.3425,6.4575 ,,4.0000,3.6000,1.0198,.017,.5425,6.6575 ,4.0000,1.0000,-3.2000,1.0198,.038,-6.2575,-.1425 ,,2.0000,-.2000,1.0198,1.000,-3.2575,2.8575 ,,3.0000,-3.6000,1.0198,.017,-6.6575,-.5425 ]) AT_CLEANUP AT_SETUP([ONEWAY posthoc Scheffe]) AT_DATA([oneway-scheffe.sps],[dnl set format = f11.3. data list notable list /usage * group *. begin data. 21.00 1 19.00 1 18.00 1 25.00 1 14.00 1 13.00 1 24.00 1 19.00 1 20.00 1 21.00 1 15.00 2 10.00 2 13.00 2 16.00 2 14.00 2 24.00 2 16.00 2 14.00 2 18.00 2 16.00 2 10.00 3 7.00 3 13.00 3 20.00 3 .00 3 8.00 3 6.00 3 1.00 3 12.00 3 14.00 3 18.00 4 15.00 4 3.00 4 27.00 4 6.00 4 14.00 4 13.00 4 11.00 4 9.00 4 18.00 4 end data. variable label usage 'Days of Use'. add value labels group 0 'none' 1 'one' 2 'two' 3 'three' 4 'four'. oneway usage by group /posthoc scheffe. ]) AT_CHECK([pspp -O format=csv oneway-scheffe.sps], [0], [Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. Days of Use,Between Groups,555.275,3,185.092,6.663,.001 ,Within Groups,1000.100,36,27.781,, ,Total,1555.375,39,,, Table: Multiple Comparisons (Days of Use) ,,,Mean Difference,,,95% Confidence Interval, ,(I) group,(J) group,(I - J),Std. Error,Sig.,Lower Bound,Upper Bound Scheffé,one,two,3.800,2.357,.467,-3.112,10.712 ,,three,10.300,2.357,.001,3.388,17.212 ,,four,6.000,2.357,.110,-.912,12.912 ,two,one,-3.800,2.357,.467,-10.712,3.112 ,,three,6.500,2.357,.072,-.412,13.412 ,,four,2.200,2.357,.832,-4.712,9.112 ,three,one,-10.300,2.357,.001,-17.212,-3.388 ,,two,-6.500,2.357,.072,-13.412,.412 ,,four,-4.300,2.357,.358,-11.212,2.612 ,four,one,-6.000,2.357,.110,-12.912,.912 ,,two,-2.200,2.357,.832,-9.112,4.712 ,,three,4.300,2.357,.358,-2.612,11.212 ]) AT_CLEANUP AT_SETUP([ONEWAY bad contrast count]) AT_DATA([oneway-bad-contrast.sps],[dnl DATA LIST NOTABLE LIST /height * weight * temperature * sex *. BEGIN DATA. 1884 88.6 39.97 0 1801 90.9 39.03 0 1801 91.7 38.98 0 1607 56.3 36.26 1 1608 46.3 46.26 1 1607 55.9 37.84 1 1604 56.6 36.81 1 1606 56.1 34.56 1 END DATA. ONEWAY /VARIABLES= height weight temperature BY sex /CONTRAST = -1 1 /CONTRAST = -3 3 /CONTRAST = 2 -2 1 /CONTRAST = -9 9 . ]) AT_CHECK([pspp -O format=csv oneway-bad-contrast.sps], [0], [dnl "oneway-bad-contrast.sps:18: warning: ONEWAY: In contrast list 3, the number of coefficients (3) does not equal the number of groups (2). This contrast list will be ignored." Table: ANOVA ,,Sum of Squares,df,Mean Square,F,Sig. height,Between Groups,92629.63,1,92629.63,120.77,.000 ,Within Groups,4601.87,6,766.98,, ,Total,97231.50,7,,, weight,Between Groups,2451.65,1,2451.65,174.59,.000 ,Within Groups,84.25,6,14.04,, ,Total,2535.90,7,,, temperature,Between Groups,1.80,1,1.80,.13,.733 ,Within Groups,84.55,6,14.09,, ,Total,86.36,7,,, Table: Contrast Coefficients ,,sex, ,,.00,1.00 Contrast,1,-1,1 ,2,-3,3 ,3,-9,9 Table: Contrast Tests ,,Contrast,Value of Contrast,Std. Error,t,df,Sig. (2-tailed) height,Assume equal variances,1,-222.27,20.23,10.99,6,.000 ,,2,-666.80,60.68,10.99,6,.000 ,,3,-2000.40,182.03,10.99,6,.000 ,Does not assume equal,1,-222.27,27.67,-8.03,2.00,.015 ,,2,-666.80,83.02,-8.03,2.00,.015 ,,3,-2000.40,249.07,-8.03,2.00,.015 weight,Assume equal variances,1,-36.16,2.74,13.21,6,.000 ,,2,-108.48,8.21,13.21,6,.000 ,,3,-325.44,24.63,13.21,6,.000 ,Does not assume equal,1,-36.16,2.19,-16.48,5.42,.000 ,,2,-108.48,6.58,-16.48,5.42,.000 ,,3,-325.44,19.75,-16.48,5.42,.000 temperature,Assume equal variances,1,-.98,2.74,.36,6,.733 ,,2,-2.94,8.22,.36,6,.733 ,,3,-8.83,24.67,.36,6,.733 ,Does not assume equal,1,-.98,2.07,-.47,4.19,.660 ,,2,-2.94,6.22,-.47,4.19,.660 ,,3,-8.83,18.66,-.47,4.19,.660 ]) AT_CLEANUP AT_SETUP([ONEWAY crash on single category independent variable]) AT_DATA([crash.sps],[ input program. loop #i = 1 to 10. compute test = #i. end case. end loop. end file. end input program. compute x = 1. oneway test by x. ]) AT_CHECK([pspp -O format=csv crash.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([ONEWAY crash on missing dependent variable]) AT_DATA([crash2.sps],[dnl data list notable list /dv1 * dv2 * y * . begin data. 2 . 2 1 . 2 1 . 1 2 . 4 3 . 4 4 . 4 5 . 4 end data. ONEWAY /VARIABLES= dv1 dv2 BY y /STATISTICS = DESCRIPTIVES /POSTHOC = BONFERRONI LSD SCHEFFE SIDAK TUKEY /MISSING = ANALYSIS . ]) AT_CHECK([pspp -O format=csv crash2.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([ONEWAY Games-Howell test with few cases]) AT_DATA([crash3.sps],[dnl data list notable list /dv * y * . begin data. 2 2 1 2 1 1 2 4 3 4 end data. ONEWAY /VARIABLES= dv BY y /POSTHOC = GH . ]) AT_CHECK([pspp -O format=csv crash3.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([ONEWAY Crash on empty data]) AT_DATA([crash4.sps],[dnl DATA LIST NOTABLE LIST /height * weight * temperature * sex *. BEGIN DATA. 1801 . . 0 1606 . . 1 END DATA. ONEWAY /VARIABLES= height weight temperature BY sex /CONTRAST = -1 1 /CONTRAST = -3 3 /CONTRAST = 2 -2 1 /CONTRAST = -9 9 . ]) AT_CHECK([pspp -O format=csv crash4.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([ONEWAY Crash on invalid dependent variable]) AT_DATA([crash5.sps],[dnl data list notable list /a * b *. begin data. 3 0 2 0 6 2 end data. oneway a"by b. ]) AT_CHECK([pspp -O format=csv crash5.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([ONEWAY Crash on unterminated string]) AT_DATA([crash6.sps], [dnl DATA LIST NOTABLE LIST /height * weight * temperature * sex *. BEGIN DATA. 1801 . . 0 1606 . 0 . 1 END DATA. ONEWAY /VARIABLES= height weight temperature BY sex /CONTRAST =" 2 -2 1 . ]) AT_CHECK([pspp -O format=csv crash6.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/stats/quick-cluster.at0000644000175000017500000001545113146355723016637 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([QUICK CLUSTER]) AT_SETUP([QUICK CLUSTER with small data set]) AT_DATA([quick-cluster.sps], [dnl DATA LIST LIST /x y z. BEGIN DATA. 22,2930,4099 17,3350,4749 22,2640,3799 20, 3250,4816 15,4080,7827 4,5,4 5,6,5 6,7,6 7,8,7 8,9,8 9,10,9 END DATA. QUICK CLUSTER x y z /CRITERIA=CLUSTER(2) MXITER(20). ]) AT_CHECK([pspp -o pspp.csv quick-cluster.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,F8.0 z,F8.0 Table: Final Cluster Centers ,Cluster, ,, ,1,2 ,, x,6.50,19.20 y,7.50,3250.00 z,6.50,5058.00 Table: Number of Cases in each Cluster Cluster,1,6 ,2,5 Valid,,11 ]) AT_CLEANUP AT_SETUP([QUICK CLUSTER with large data set]) AT_DATA([quick-cluster.sps], [dnl input program. loop #i = 1 to 50000. compute x = 3. end case. end loop. end file. end input program. QUICK CLUSTER x /CRITERIA = CLUSTER(4) NOINITIAL. ]) AT_CHECK([pspp -o pspp.csv quick-cluster.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Final Cluster Centers ,Cluster,,, ,,,, ,1,2,3,4 ,,,, x,NaN,NaN,NaN,3.00 Table: Number of Cases in each Cluster Cluster,1,0 ,2,0 ,3,0 ,4,50000 Valid,,50000 ]) AT_CLEANUP AT_SETUP([QUICK CLUSTER with weights]) AT_DATA([qc-weighted.sps], [dnl input program. loop #i = 1 to 400. compute x = mod (#i, 4). compute w = 5. end case. end loop. loop #i = 1 to 400. compute x = mod (#i, 4). compute w = 3. end case. end loop. end file. end input program. weight by w. QUICK CLUSTER x /CRITERIA = CLUSTER(4) MXITER (10). ]) AT_CHECK([pspp -o pspp-w.csv qc-weighted.sps]) AT_DATA([qc-unweighted.sps], [dnl input program. loop #i = 1 to 3200. compute x = mod (#i, 4). end case. end loop. end file. end input program. QUICK CLUSTER x /CRITERIA = CLUSTER(4) MXITER (10). ]) AT_CHECK([pspp -o pspp-unw.csv qc-unweighted.sps]) AT_CHECK([diff pspp-w.csv pspp-unw.csv], [0]) AT_CLEANUP AT_SETUP([QUICK CLUSTER with listwise missing]) AT_DATA([quick-miss.sps], [dnl data list notable list /x *. begin data. 1 1 2 3 4 . 2 end data. QUICK CLUSTER x /CRITERIA = CLUSTER(4) MXITER (10). ]) AT_CHECK([pspp -o pspp-m.csv quick-miss.sps]) AT_DATA([quick-nmiss.sps], [dnl data list notable list /x *. begin data. 1 1 2 3 4 2 end data. QUICK CLUSTER x /CRITERIA = CLUSTER(4) MXITER (10). ]) AT_CHECK([pspp -o pspp-nm.csv quick-nmiss.sps]) AT_CHECK([diff pspp-m.csv pspp-nm.csv], [0]) AT_CLEANUP AT_SETUP([QUICK CLUSTER with pairwise missing]) dnl This test runs two programs, which are identical except that one dnl has an extra case with one missing value. Because the syntax uses dnl NOINITIAL and NOUPDATE, the results should be identical except for dnl the final classification. AT_DATA([quick-s.sps], [dnl data list notable list /x * y *. begin data. 1 2 1 2.2 1.1 1.9 1 9 1 10 1.3 9.5 0.9 8.9 3.5 2 3.4 3 3.5 2.5 3.1 2.0 end data. QUICK CLUSTER x y /PRINT = INITIAL /CRITERIA = CLUSTER(3) NOINITIAL NOUPDATE . ]) AT_CHECK([pspp -O format=csv quick-s.sps > pspp-s.csv]) AT_DATA([quick-pw.sps], [dnl data list notable list /x * y *. begin data. 1 2 1 2.2 1.1 1.9 1 9 1 10 1.3 9.5 0.9 8.9 3.5 2 3.4 3 3.5 2.5 3.1 2.0 . 2.3 end data. QUICK CLUSTER x y /CRITERIA = CLUSTER(3) NOINITIAL NOUPDATE /PRINT = INITIAL /MISSING = PAIRWISE . ]) AT_CHECK([pspp -O format=csv quick-pw.sps > pspp-pw.csv]) AT_CHECK([head -n 18 pspp-s.csv > top-s.csv]) AT_CHECK([head -n 18 pspp-pw.csv > top-pw.csv]) AT_CHECK([diff top-s.csv top-pw.csv]) AT_CHECK([grep Valid pspp-s.csv], [0], [Valid,,11 ]) AT_CHECK([grep Valid pspp-pw.csv], [0], [Valid,,12 ]) AT_CLEANUP AT_SETUP([QUICK CLUSTER crash on bad cluster quantity]) AT_DATA([badn.sps], [dnl data list notable list /x * y *. begin data. 1 2 1 2.2 end data. QUICK CLUSTER x y /CRITERIA = CLUSTER(0) . ]) AT_CHECK([pspp -O format=csv badn.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([QUICK CLUSTER infinite loop on bad command name]) AT_DATA([quick-cluster.sps], [dnl data list notable list /x y. begin data. 1 2 1 2.2 end data. QUICK CLUSTER x y /UNSUPPORTED. ]) AT_CHECK([pspp -O format=csv quick-cluster.sps], [1], [dnl quick-cluster.sps:7.20-7.30: error: QUICK CLUSTER: Syntax error at `UNSUPPORTED'. ]) AT_CLEANUP AT_SETUP([QUICK CLUSTER /PRINT subcommand]) AT_DATA([quick-cluster.sps], [dnl data list notable list /cluster (A8) x (F) y (F). begin data. A 10.45 9.38 A 10.67 9.17 A 10.86 9.63 A 8.77 8.45 A 8.04 11.77 A 10.34 9.83 A 10.37 10.54 A 11.49 8.18 A 10.17 11.10 A 11.37 9.16 A 10.25 8.83 A 8.69 9.92 A 10.36 10.39 A 10.89 10.51 A 9.9 11.39 A 11.1 10.91 A 11.77 8.47 A 9.5 10.46 B -11.01 -9.21 B -10.8 -11.76 B -10.03 -10.29 B -9.54 -9.17 B -10.16 -9.82 B -10.01 -8.63 B -9.6 -10.22 B -11.36 -10.93 B -10.63 -10.97 B -9.53 -10.78 B -9.40 -10.26 B -10.76 -9.76 B -9.9 -10.11 B -10.16 -9.75 B -8.65 -11.31 B -10.10 -10.90 B -11.67 -9.89 B -11.11 -9.23 B -8.7 -8.43 B -11.35 -8.68 C -10.20 9.00 C -10.12 9.92 C -10.41 10.16 C -9.86 10.12 C -10.31 10.12 C -9.57 10.16 C -9.69 9.93 C -9.14 10.84 C -9.8 10.19 C -9.97 10.22 C -11.65 10.81 C -9.80 11.39 C -10.31 10.74 C -10.26 10.38 C -11.57 10.02 C -10.50 9.75 C -9.06 9.63 C -10.17 10.82 C -10.22 9.99 end data. QUICK CLUSTER x y /CRITERIA=CLUSTERS(3) /PRINT=INITIAL CLUSTER. ]) AT_CHECK([pspp -O format=csv quick-cluster.sps], [0], [dnl Table: Initial Cluster Centers ,Cluster,, ,,, ,1,2,3 ,,, x,-11,-12,11 y,-12,11,11 Table: Final Cluster Centers ,Cluster,, ,,, ,1,2,3 ,,, x,-10,-10,10 y,-10,10,10 Table: Number of Cases in each Cluster Cluster,1,20 ,2,19 ,3,18 Valid,,57 Table: Cluster Membership Case Number,Cluster 1,3 2,3 3,3 4,3 5,3 6,3 7,3 8,3 9,3 10,3 11,3 12,3 13,3 14,3 15,3 16,3 17,3 18,3 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,2 40,2 41,2 42,2 43,2 44,2 45,2 46,2 47,2 48,2 49,2 50,2 51,2 52,2 53,2 54,2 55,2 56,2 57,2 ]) AT_CLEANUP dnl Test for a crash which happened on bad input syntax AT_SETUP([QUICK CLUSTER -- Empty Parentheses]) AT_DATA([empty-parens.sps], [dnl data list notable list /x * y *. begin data. 1 2 1 2.2 end data. QUICK CLUSTER x y /CRITERIA = CONVERGE() . ]) AT_CHECK([pspp -o pspp.csv empty-parens.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/stats/rank.at0000644000175000017500000002575513137223525015001 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([RANK]) AT_SETUP([RANK simple case with defaults]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /x (f8). BEGIN DATA. -1 0 1 2 2 4 5 END DATA. RANK x. LIST. ]) AT_CHECK([pspp -o pspp.csv rank.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variables Created By RANK x into Rx(RANK of x) Table: Data List x,Rx -1,1.000 0,2.000 1,3.000 2,4.500 2,4.500 4,6.000 5,7.000 ]) AT_CLEANUP # This checks for regression against a crash reported as bug #38482 # that occurred when multiple variables were specified without any # rank specifications. AT_SETUP([RANK multiple variables with defaults]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /x * y * z *. BEGIN DATA. 1.00 2.00 3.00 4.00 5.00 6.00 END DATA. RANK ALL. LIST. ]) AT_CHECK([pspp -o pspp.csv rank.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variables Created By RANK x into Rx(RANK of x) y into Ry(RANK of y) z into Rz(RANK of z) Table: Data List x,y,z,Rx,Ry,Rz 1.00,2.00,3.00,1.000,1.000,1.000 4.00,5.00,6.00,2.000,2.000,2.000 ]) AT_CLEANUP AT_SETUP([RANK with RANK, RFRACTION, N]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /a * b *. BEGIN DATA. 0 24 1 32 2 31 2 32 4 30 5 29 6 1 7 43 8 . 9 45 END DATA. RANK a b (D) /PRINT=YES /RANK /TIES=HIGH /RFRACTION /N INTO count . DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv rank.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variables Created By RANK a into Ra(RANK of a) b into Rb(RANK of b) a into RFR001(RFRACTION of a) b into RFR002(RFRACTION of b) a into count(N of a) b into Nb(N of b) Variable,Description,Position a,Format: F8.2,1 b,Format: F8.2,2 Ra,"Label: RANK of a Format: F9.3",3 RFR001,"Label: RFRACTION of a Format: F6.4",4 count,"Label: N of a Format: F6.0",5 Rb,"Label: RANK of b Format: F9.3",6 RFR002,"Label: RFRACTION of b Format: F6.4",7 Nb,"Label: N of b Format: F6.0",8 Table: Data List a,b,Ra,RFR001,count,Rb,RFR002,Nb .00,24.00,10.000,1.0000,10,8.000,.8889,9 1.00,32.00,9.000,.9000,10,4.000,.4444,9 2.00,31.00,8.000,.8000,10,5.000,.5556,9 2.00,32.00,8.000,.8000,10,4.000,.4444,9 4.00,30.00,6.000,.6000,10,6.000,.6667,9 5.00,29.00,5.000,.5000,10,7.000,.7778,9 6.00,1.00,4.000,.4000,10,9.000,1.0000,9 7.00,43.00,3.000,.3000,10,2.000,.2222,9 8.00,. ,2.000,.2000,10,. ,. ,. 9.00,45.00,1.000,.1000,10,1.000,.1111,9 ]) AT_CLEANUP AT_SETUP([RANK with SAVAGE, PERCENT, PROPORTION, NTILES]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /a * b *. BEGIN DATA. 0 24 1 32 2 31 2 32 4 30 5 29 6 1 7 43 8 8 9 45 END DATA. RANK a /PRINT=YES /TIES=CONDENSE /SAVAGE /PERCENT /PROPORTION /NTILES(4) /NORMAL . LIST. ]) AT_CHECK([pspp -o pspp.csv rank.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variables Created By RANK a into Sa(SAVAGE of a) a into Pa(PERCENT of a) a into PRO001(PROPORTION of a using BLOM) a into Na(NTILES of a) a into NOR001(NORMAL of a using BLOM) Table: Data List a,b,Sa,Pa,PRO001,Na,NOR001 .00,24.00,-.9000,10.00,.0610,1,-1.547 1.00,32.00,-.7889,20.00,.1585,1,-1.000 2.00,31.00,-.5925,30.00,.2561,2,-.6554 2.00,32.00,-.5925,30.00,.2561,2,-.6554 4.00,30.00,-.3544,40.00,.3537,2,-.3755 5.00,29.00,-.1544,50.00,.4512,2,-.1226 6.00,1.00,.0956,60.00,.5488,3,.1226 7.00,43.00,.4290,70.00,.6463,3,.3755 8.00,8.00,.9290,80.00,.7439,3,.6554 9.00,45.00,1.9290,90.00,.8415,4,1.0005 ]) AT_CLEANUP AT_SETUP([RANK with SPLIT FILE]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /a * g1 g2 *. BEGIN DATA. 2 1 2 2 1 2 3 1 2 4 1 2 5 1 2 1 0 2 2 0 2 3 0 2 4 0 2 5 0 2 6 0 2 7 0 2 8 0 2 6 1 2 7 1 2 7 1 2 8 1 2 9 1 1 END DATA. RANK a (D) BY g2 g1 /PRINT=YES /TIES=LOW /MISSING=INCLUDE /FRACTION=RANKIT /RANK /NORMAL . SPLIT FILE BY g1. RANK a (D) BY g2 /PRINT=YES /TIES=LOW /MISSING=INCLUDE /FRACTION=RANKIT /RANK /NORMAL . SPLIT FILE OFF. LIST. ]) AT_CHECK([pspp -o pspp.csv rank.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variables Created By RANK a into Ra(RANK of a BY g2 g1) a into Na(NORMAL of a using RANKIT BY g2 g1) Variables Created By RANK a into RAN001(RANK of a BY g2) a into NOR001(NORMAL of a using RANKIT BY g2) Table: Data List a,g1,g2,Ra,Na,RAN001,NOR001 2.00,1.00,2.00,8.000,.9674,4.000,.5244 2.00,1.00,2.00,8.000,.9674,4.000,.5244 3.00,1.00,2.00,7.000,.5895,3.000,.0000 4.00,1.00,2.00,6.000,.2822,2.000,-.5244 5.00,1.00,2.00,5.000,.0000,1.000,-1.282 1.00,.00,2.00,8.000,1.5341,8.000,1.5341 2.00,.00,2.00,7.000,.8871,7.000,.8871 3.00,.00,2.00,6.000,.4888,6.000,.4888 4.00,.00,2.00,5.000,.1573,5.000,.1573 5.00,.00,2.00,4.000,-.1573,4.000,-.1573 6.00,.00,2.00,3.000,-.4888,3.000,-.4888 7.00,.00,2.00,2.000,-.8871,2.000,-.8871 8.00,.00,2.00,1.000,-1.534,1.000,-1.534 6.00,1.00,2.00,4.000,-.2822,4.000,1.1503 7.00,1.00,2.00,2.000,-.9674,2.000,-.3186 7.00,1.00,2.00,2.000,-.9674,2.000,-.3186 8.00,1.00,2.00,1.000,-1.593,1.000,-1.150 9.00,1.00,1.00,1.000,.0000,1.000,.0000 ]) AT_CLEANUP # Also tests small ranks for special case of SAVAGE ranks. AT_SETUP([RANK with fractional ranks]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /a * w * . BEGIN DATA. 1 1.5 2 0.2 3 0.1 4 1 5 1 6 1 7 1 8 1 END DATA. WEIGHT BY w. RANK a /FRACTION=TUKEY /PROPORTION /SAVAGE . LIST. ]) AT_CHECK([pspp -o pspp.csv rank.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variables Created By RANK a into Pa(PROPORTION of a using TUKEY) a into Sa(SAVAGE of a) Table: Data List a,w,Pa,Sa 1.00,1.50,.1285,-.8016 2.00,.20,.1776,-.6905 3.00,.10,.1986,-.6905 4.00,1.00,.3458,-.5305 5.00,1.00,.4860,-.2905 6.00,1.00,.6262,.0262 7.00,1.00,.7664,.4929 8.00,1.00,.9065,1.3929 ]) AT_CLEANUP AT_SETUP([RANK all-ties due to tiny weights]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /x * w *. BEGIN DATA. 1 0.1 2 0.1 3 0.1 4 0.2 5 0.1 6 0.1 7 0.1 8 0.1 END DATA. WEIGHT BY w. RANK x /TIES=low /RANK into xl. RANK x /TIES=high /RANK into xh. RANK x /TIES=condense /RANK into xc. * Test VW fraction RANK x /FRACTION=VW /NORMAL. LIST. ]) AT_CHECK([pspp -o pspp.csv rank.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variables Created By RANK x into xl(RANK of x) Variables Created By RANK x into xh(RANK of x) Variables Created By RANK x into xc(RANK of x) Variables Created By RANK x into Nx(NORMAL of x using VW) Table: Data List x,w,xl,xh,xc,Nx 1.00,.10,.000,.100,1.000,-1.938 2.00,.10,.100,.200,2.000,-1.412 3.00,.10,.200,.300,3.000,-1.119 4.00,.20,.300,.500,4.000,-.8046 5.00,.10,.500,.600,5.000,-.5549 6.00,.10,.600,.700,6.000,-.4067 7.00,.10,.700,.800,7.000,-.2670 8.00,.10,.800,.900,8.000,-.1323 ]) AT_CLEANUP AT_SETUP([RANK and TEMPORARY]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /age (f2) gender (a1). BEGIN DATA. 44 m 32 f 43 m 49 m 33 f 35 f 29 f 50 m 42 m 33 f 48 m END DATA. TEMPORARY. SELECT IF gender = 'm'. RANK age /RANK INTO Rm. TEMPORARY. SELECT IF gender = 'f'. RANK age /RANK INTO Rf. LIST. ]) AT_CHECK([pspp -O format=csv rank.sps], [0], [dnl Variables Created By RANK age into Rm(RANK of age) Variables Created By RANK age into Rf(RANK of age) Table: Data List age,gender,Rm,Rf 44,m,3.000,. @&t@ 32,f,. ,2.000 43,m,2.000,. @&t@ 49,m,5.000,. @&t@ 33,f,. ,3.500 35,f,. ,5.000 29,f,. ,1.000 50,m,6.000,. @&t@ 42,m,1.000,. @&t@ 33,f,. ,3.500 48,m,4.000,. @&t@ ]) AT_CLEANUP AT_SETUP([RANK variable name fallback]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /foo * rfoo * ran003 *. BEGIN DATA. 0 3 2 1 3 2 2 3 2 2 3 2 4 3 2 5 3 2 6 3 2 7 3 2 8 3 2 9 3 2 END DATA. RANK foo. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -o pspp.csv rank.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variables Created By RANK foo into RAN001(RANK of foo) Variable,Description,Position foo,Format: F8.2,1 rfoo,Format: F8.2,2 ran003,Format: F8.2,3 RAN001,"Label: RANK of foo Format: F9.3",4 ]) AT_CLEANUP AT_SETUP([RANK robust variable name creation]) AT_DATA([rank.sps], [dnl DATA LIST LIST notable /x * rx * ran001 TO ran999. BEGIN DATA. 1 2 3 4 5 6 7 END DATA. RANK x. DELETE VAR ran001 TO ran999. LIST. ]) AT_CHECK([pspp -O format=csv rank.sps], [0], [dnl "rank.sps:3: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate." "rank.sps:4: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate." "rank.sps:5: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate." "rank.sps:6: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate." "rank.sps:7: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate." "rank.sps:8: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate." "rank.sps:9: warning: Missing value(s) for all variables from rx onward. These will be filled with the system-missing value or blanks, as appropriate." Variables Created By RANK x into RNKRA01(RANK of x) Table: Data List x,rx,RNKRA01 1.00,. ,1.000 2.00,. ,2.000 3.00,. ,3.000 4.00,. ,4.000 5.00,. ,5.000 6.00,. ,6.000 7.00,. ,7.000 ]) AT_CLEANUP dnl Test for proper behaviour in the face of invalid input. AT_SETUP([RANK handling of invalid input]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /x * a (a2). BEGIN DATA. -1 s 0 s 1 s 2 s 2 s 4 s 5 s END DATA. DEBUG XFORM FAIL. RANK x. ]) AT_CHECK([pspp -O format=csv --testing-mode rank.sps], [1], [dnl Variables Created By RANK x into Rx(RANK of x) rank.sps:14: error: RANK: DEBUG XFORM FAIL transformation executed ]) AT_CLEANUP AT_SETUP([RANK handling of invalid syntax]) AT_DATA([rank.sps], [dnl DATA LIST LIST NOTABLE /x * a (a2). BEGIN DATA. -1 s 0 s 1 s 2 s 2 s 4 s 5 s END DATA. * invalid NTILES (no parameter) RANK x /NTILES . * invalid NTILES (not an integer) RANK x /NTILES(d) . * destination variable already exists RANK x /RANK INTO x. * Too many variables in INTO RANK x /RANK INTO foo bar wiz. ]) AT_CHECK([pspp -O format=csv rank.sps], [1], [dnl rank.sps:15.1: error: RANK: Syntax error at end of command: expecting `@{:@'. rank.sps:19.11: error: RANK: Syntax error at `d': expecting integer. rank.sps:25: error: RANK: Variable x already exists. rank.sps:30: error: RANK: Too many variables in INTO clause. ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/regression.at0000644000175000017500000017177313137223525016230 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([LINEAR REGRESSION]) AT_SETUP([LINEAR REGRESSION - basic]) AT_DATA([regression.sps], [dnl set format = F22.3. data list notable list / v0 to v2. filter by v0. begin data 0.65377128 7.735648 -23.97588 -0.13087553 6.142625 -19.63854 0.34880368 7.651430 -25.26557 0.69249021 6.125125 -16.57090 -0.07368178 8.245789 -25.80001 -0.34404919 6.031540 -17.56743 0.75981559 9.832291 -28.35977 -0.46958313 5.343832 -16.79548 -0.06108490 8.838262 -29.25689 0.56154863 6.200189 -18.58219 end data regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=pred resid. list. ]) AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl regression.sps:16: warning: REGRESSION: REGRESSION with SAVE ignores FILTER. All cases will be processed. Table: Model Summary (v2) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.971,.942,.925,1.337 Table: ANOVA (v2) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,202.753,2,101.376,56.754,.000 ,Residual,12.504,7,1.786,, ,Total,215.256,9,,, Table: Coefficients (v2) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),2.191,2.357,.000,.930,.380 ,v0,1.813,1.053,.171,1.722,.129 ,v1,-3.427,.332,-1.026,-10.334,.000 Table: Data List v0,v1,v2,RES1,PRED1 .654,7.736,-23.976,-.84,-23.13 -.131,6.143,-19.639,-.54,-19.10 .349,7.651,-25.266,-1.87,-23.40 .692,6.125,-16.571,.97,-17.54 -.074,8.246,-25.800,.40,-26.20 -.344,6.032,-17.567,1.53,-19.10 .760,9.832,-28.360,1.77,-30.13 -.470,5.344,-16.795,.18,-16.97 -.061,8.838,-29.257,-1.05,-28.21 .562,6.200,-18.582,-.54,-18.04 ]) AT_CLEANUP AT_SETUP([LINEAR REGRESSION - one save]) AT_DATA([regression.sps], [dnl set format = F22.3. data list notable list / v0 to v2. begin data 0.65377128 7.735648 -23.97588 -0.13087553 6.142625 -19.63854 0.34880368 7.651430 -25.26557 0.69249021 6.125125 -16.57090 -0.07368178 8.245789 -25.80001 -0.34404919 6.031540 -17.56743 0.75981559 9.832291 -28.35977 -0.46958313 5.343832 -16.79548 -0.06108490 8.838262 -29.25689 0.56154863 6.200189 -18.58219 end data regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=resid. regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=pred. list. ]) AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl Table: Model Summary (v2) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.971,.942,.925,1.337 Table: ANOVA (v2) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,202.753,2,101.376,56.754,.000 ,Residual,12.504,7,1.786,, ,Total,215.256,9,,, Table: Coefficients (v2) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),2.191,2.357,.000,.930,.380 ,v0,1.813,1.053,.171,1.722,.129 ,v1,-3.427,.332,-1.026,-10.334,.000 Table: Model Summary (v2) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.971,.942,.925,1.337 Table: ANOVA (v2) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,202.753,2,101.376,56.754,.000 ,Residual,12.504,7,1.786,, ,Total,215.256,9,,, Table: Coefficients (v2) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),2.191,2.357,.000,.930,.380 ,v0,1.813,1.053,.171,1.722,.129 ,v1,-3.427,.332,-1.026,-10.334,.000 Table: Data List v0,v1,v2,RES1,PRED1 .654,7.736,-23.976,-.84,-23.13 -.131,6.143,-19.639,-.54,-19.10 .349,7.651,-25.266,-1.87,-23.40 .692,6.125,-16.571,.97,-17.54 -.074,8.246,-25.800,.40,-26.20 -.344,6.032,-17.567,1.53,-19.10 .760,9.832,-28.360,1.77,-30.13 -.470,5.344,-16.795,.18,-16.97 -.061,8.838,-29.257,-1.05,-28.21 .562,6.200,-18.582,-.54,-18.04 ]) AT_CLEANUP # Test to ensure that the /SAVE subcommand works properly when SPLIT is active AT_SETUP([LINEAR REGRESSION - SAVE vs SPLITS]) # Generate some test data based on a linear model AT_DATA([gen-data.sps], [dnl set seed = 1. input program. loop #c = 1 to 20. compute x0 = rv.normal (0,1). compute x1 = rv.normal (0,2). compute err = rv.normal (0,0.1). compute y = 4 - 2 * x0 + 3 * x1 + err. compute g = (#c > 10). end case. end loop. end file. end input program. print outfile='regdata.txt' /g x0 x1 y err *. execute. ]) AT_CHECK([pspp -O format=csv gen-data.sps], [0], [ignore]) # Use our test data to create a predictor and a residual variable # for G == 0 AT_DATA([regression0.sps], [dnl data list notable file='regdata.txt' list /g x0 x1 y err *. select if (g = 0). regression /variables = x0 x1 /dependent = y /statistics = all /save = pred resid. . print outfile='outdata-g0.txt' /g x0 x1 y err res1 pred1 *. execute. ]) AT_CHECK([pspp -O format=csv regression0.sps], [0], [ignore]) # Use our test data to create a predictor and a residual variable # for G == 1 AT_DATA([regression1.sps], [dnl data list notable file='regdata.txt' list /g x0 x1 y err *. select if (g = 1). regression /variables = x0 x1 /dependent = y /statistics = all /save = pred resid. . print outfile='outdata-g1.txt' /g x0 x1 y err res1 pred1 *. execute. ]) AT_CHECK([pspp -O format=csv regression1.sps], [0], [ignore]) # Use our test data to create a predictor and a residual variable # The data is split on G AT_DATA([regression-split.sps], [dnl data list notable file='regdata.txt' list /g x0 x1 y err *. split file by g. regression /variables = x0 x1 /dependent = y /statistics = all /save = pred resid. . print outfile='outdata-split.txt' /g x0 x1 y err res1 pred1 *. execute. ]) AT_CHECK([pspp -O format=csv regression-split.sps], [0], [ignore]) # The concatenation of G==0 and G==1 should be identical to the SPLIT data AT_CHECK([cat outdata-g0.txt outdata-g1.txt | diff outdata-split.txt - ], [0], []) AT_CLEANUP # Test that the procedure behaves sensibly when presented with # multiple dependent variables AT_SETUP([LINEAR REGRESSION multiple dependent variables]) AT_DATA([regression.sps], [dnl set seed = 2. input program. loop #c = 1 to 200. compute x0 = rv.normal (0, 1). compute x1 = rv.normal (0, 2). compute err = rv.normal (0, 0.8). compute y = 2 - 1.5 * x0 + 8.4 * x1 + err. compute ycopy = y. end case. end loop. end file. end input program. regression /variables = x0 x1 /dependent = y ycopy /statistics = default. ]) AT_CHECK([pspp -O format=csv regression.sps > output], [0], [ignore]) AT_CHECK([head -16 output > first], [0], []) AT_CHECK([tail -16 output > second], [0], []) AT_CHECK([sed -e 's/ycopy/y/g' second | diff first -], [0], []) AT_CLEANUP # Tests the QR decomposition used by the REGRESSION command. AT_SETUP([LINEAR REGRESSION test of QR decomposition]) AT_DATA([regression.sps], [dnl data list list / v0 to v1. begin data -12.84099361 0.873270778 16.64932538 0.371315664 -1.88061907 0.505503722 -6.20952354 0.734698282 0.33272576 0.891224610 -5.54912717 0.052318165 6.11832417 0.448853404 11.78124974 0.470447593 0.75960353 0.565082303 6.06432768 0.149316743 -2.64919436 0.752532411 -10.32250712 0.798263603 2.06355038 0.469129797 -9.71851742 0.927162270 4.65582553 0.250629262 9.54574474 0.847032310 7.35544368 0.197028541 -2.09609740 0.400584261 10.30101161 0.671546480 -5.24501039 0.929962876 1.73412473 0.758161354 -3.12732732 0.569785505 12.66261501 0.630640223 -2.90956805 0.576067804 4.89649177 0.624483995 13.64613114 0.591089881 14.03198397 0.544587572 2.23566810 0.967898139 5.37367760 0.916246929 9.01346888 0.451702743 0.75378683 0.235544137 -3.47470624 0.742668194 -1.02063266 0.860311687 -2.67132813 0.082460702 23.67661680 0.932553932 7.95061359 0.430161125 2.05300558 0.066331375 -2.01332644 0.163705417 20.00663784 0.587292630 3.06099417 0.161411889 -3.46115358 0.216684625 -6.85287183 0.548714855 -4.27923809 0.630997663 -0.94863395 0.880612945 4.47481747 0.359885215 -12.80962955 0.886070341 9.35753086 0.187176558 2.81002235 0.063035095 0.01532424 0.964327101 0.29867732 0.866408063 -2.89035649 0.812135868 4.17352811 0.608884061 18.15502183 0.920568258 -2.92662792 0.550792959 -6.08090449 0.965036595 -1.09135397 0.862548019 7.02816784 0.042277017 -21.20245068 0.430673493 -8.83397584 0.724976162 -0.89055843 0.017934904 7.03871587 0.308829557 3.84286316 0.685105924 4.50280692 0.447635420 11.39207346 0.875177896 10.86673874 0.518530912 7.09853081 0.588367569 -12.82864915 0.184667098 13.74888760 0.610891139 0.37379146 0.557720134 -9.79020267 0.942839981 0.71574466 0.564570338 -17.56040637 0.182061777 2.52620466 0.306875011 5.37718673 0.366807049 -1.83964300 0.465772898 6.04848363 0.644501799 4.57402403 0.121419591 8.55606848 0.373011464 -8.46827907 0.491176571 -1.77989798 0.734722847 -0.68661121 0.540984182 1.55798880 0.822587656 5.22810831 0.333747878 9.50280477 0.068100934 -3.74521465 0.248537644 1.36045068 0.851827791 4.41604088 0.197207162 -3.72568327 0.726916693 -5.36123334 0.906513529 3.61594583 0.414340595 -10.01952852 0.140372658 25.48681482 0.354309660 -3.34529093 0.090075388 -18.00437582 0.461438059 -5.29782460 0.004362856 2.79608522 0.861294398 -1.64076209 0.345775481 6.82802334 0.137933862 -0.45416818 0.404379208 -1.66868582 0.797685201 -10.02820292 0.075876582 5.68232031 0.404815042 8.25113850 0.769173748 -2.83544237 0.076583474 0.87659945 0.092751009 6.60270870 0.530444351 -12.63924989 0.362099960 -6.24451253 0.641993458 3.53339015 0.461991892 -0.74012232 0.437409755 15.37311996 0.974913038 -8.09464797 0.543308711 -9.61320222 0.221564578 0.21843662 0.856512540 -1.56958954 0.610709221 6.44977372 0.200382138 -13.29136274 0.093222309 6.46257214 0.024135196 -3.82727990 0.601335801 0.43081953 0.268230667 19.06654416 0.219972815 17.02906651 0.996849502 -10.18073139 0.012543080 12.72088788 0.910600764 10.45328185 0.331285901 7.14370922 0.896312020 -2.81754334 0.048741266 6.40217095 0.075796756 -3.18030478 0.666325307 8.64585957 0.120549153 1.37952764 0.899991932 -11.81143886 0.601949630 0.03899706 0.363808260 -10.63828243 0.031092967 -6.66940972 0.246204205 -5.07374962 0.951272057 4.82281566 0.063928187 -21.93693564 0.050972680 -4.54569883 0.225839693 -0.92422779 0.437796785 -1.11683029 0.740215139 16.77765554 0.851072372 9.73614597 0.388180586 14.05345168 0.063760129 1.20512012 0.665964184 8.00307080 0.102447114 8.01252623 0.580929209 -13.54924183 0.438420739 9.87164361 0.970859344 17.63437095 0.250501797 -3.42503574 0.873290220 -2.45873197 0.847756049 17.29212092 0.411683187 1.15496098 0.530658504 -2.14438907 0.592255367 -1.79942021 0.517773009 -1.30677990 0.830860762 1.70233874 0.291826660 -3.05532536 0.801767829 -4.06732625 0.092294501 6.34665476 0.270426235 9.46946411 0.196915311 14.50919907 0.480357167 8.93767237 0.778228613 1.90298854 0.903146151 18.50500507 0.598561307 4.45123027 0.555898218 11.37344114 0.616557707 -12.14693218 0.409187285 18.27198688 0.141619222 -5.75939569 0.056989619 -4.05515382 0.369281201 16.69882098 0.946885257 6.39050536 0.679704228 4.04213339 0.662792380 6.89608366 0.419877433 1.56496633 0.358227958 5.16679947 0.095144366 -3.06280456 0.883265975 2.76279175 0.866571973 1.84969249 0.264869828 21.79840498 0.702650979 1.42450528 0.719308635 0.96797046 0.111937435 18.26840323 0.075621738 13.38288377 0.573399086 2.41101500 0.766238677 3.83866337 0.499888953 -1.56577367 0.695244089 -0.90342790 0.671654151 10.83775583 0.026041124 -9.89767935 0.745297991 11.74840150 0.309144074 1.73069359 0.814063985 -5.27966183 0.591005828 3.33030043 0.559401806 1.31427975 0.520950237 -10.04588558 0.507008362 10.41228345 0.425867272 1.71961097 0.595783108 -17.54904427 0.328788939 -2.23545419 0.223377350 -8.68774333 0.980964240 -3.48048220 0.008877675 -3.69635326 0.090236718 9.76114237 0.769375983 -10.25662038 0.508137553 0.11155446 0.468504431 -8.06824580 0.414098962 3.10031660 0.327130207 -3.33393146 0.756896774 -3.96276749 0.530956360 14.53610268 0.846474699 1.70505918 0.754662464 -1.93495001 0.656650411 5.01974522 0.745337633 13.41249973 0.489362476 11.49288744 0.335924476 12.59019763 0.155560469 -10.17947298 0.677318449 0.05556115 0.655090105 3.82092860 0.051838719 8.23041456 0.918272190 -0.50314649 0.772015826 20.05162157 0.880265258 8.98816884 0.666646668 -6.28312120 0.138534416 3.68589909 0.274559458 0.59699510 0.253180863 -2.74783135 0.983525221 0.32515065 0.839969577 -3.60606166 0.330646732 -0.82037740 0.129591173 6.12444860 0.098536516 10.95671074 0.033546728 -2.84911174 0.720288722 6.04597572 0.577061422 -0.60147150 0.674096868 -5.30458364 0.291468008 2.68044943 0.379853840 0.85986585 0.984214339 -12.77906359 0.882390290 7.21420144 0.550884826 2.31817022 0.231021556 11.60161950 0.888496654 -0.19346228 0.242609713 5.07478120 0.759161318 14.54155003 0.040387654 3.81039636 0.874572741 2.23233049 0.448317248 0.19481869 0.201906051 2.81530451 0.132131690 12.39893259 0.674693704 0.47054642 0.632959494 2.16152913 0.734480632 0.33398836 0.315024718 7.35509037 0.304570986 -2.92336559 0.539062343 5.79622573 0.392393310 -2.37607425 0.403380474 0.04498550 0.756875541 -1.63674414 0.613789514 11.80310547 0.832651469 6.30630243 0.850689403 1.48394652 0.096243229 4.03361865 0.799660045 3.54707273 0.408520520 2.00327040 0.702944912 17.30761707 0.380542812 5.72738968 0.105447516 -13.64604891 0.328506659 8.35976334 0.702173924 -7.41197443 0.134396488 -15.95683040 0.618526462 8.76889573 0.950243069 -1.13482624 0.113477080 -0.60311407 0.090444247 4.95508365 0.612511543 5.36934491 0.979213258 -0.03554882 0.807185690 -11.58131144 0.183341373 4.46809041 0.796330582 12.49741067 0.346860912 8.63824488 0.073684997 0.49990913 0.732519306 12.82688360 0.109400213 13.20375065 0.850369092 -8.41110869 0.177717087 16.31959963 0.727704840 17.59203613 0.235311681 0.32148420 0.842195936 5.43148331 0.670904647 7.14649727 0.028190029 0.25410683 0.421535783 -12.41047826 0.086404379 -10.64180909 0.229659236 -6.40185653 0.876365242 15.63063324 0.667672536 1.94280423 0.799266628 -5.76507450 0.367344192 8.60895533 0.154109357 9.38306751 0.788742770 3.43573528 0.284535277 4.81848966 0.872283177 11.65839314 0.234109111 -5.57884822 0.030363060 -3.94238060 0.325320686 9.38133340 0.201141788 -7.65003459 0.647734396 11.23091019 0.084927159 -6.07705432 0.037273791 7.46380750 0.506897136 7.42034855 0.869351148 -4.43031973 0.231191152 -1.07351537 0.480234836 -1.40653281 0.690620421 -3.82710168 0.990191328 5.04583490 0.543427375 -11.54265099 0.270542185 0.49059479 0.991447248 -1.40871469 0.555998766 3.64241437 0.743840673 -18.30031589 0.357478210 4.27487959 0.770619738 1.28805821 0.654787106 -3.19542768 0.218110139 12.53375654 0.011857644 11.78889419 0.054127726 -5.38392310 0.839309080 16.38024181 0.228801038 -0.59622631 0.134381782 -0.74107258 0.258146632 -12.31429450 0.020524447 -0.79785028 0.968028764 6.39899711 0.038162566 7.42024044 0.716163692 -3.62470664 0.018201813 -2.55049724 0.162446610 -10.79888854 0.683070478 10.18490144 0.546461234 -2.76979044 0.198830067 4.85164813 0.094100357 0.96477200 0.381801756 8.13344336 0.639730450 9.04684412 0.786084368 10.41746272 0.828304181 0.94334368 0.798419831 10.13116556 0.191715972 -4.12728628 0.575178239 -9.59222379 0.876405375 1.64680258 0.391003085 -4.58897613 0.039176486 0.38394379 0.511577564 -4.80428215 0.222785463 0.35363661 0.681658725 -9.63685708 0.183035382 3.54363414 0.766127414 6.89610808 0.967514568 -2.03781105 0.464416752 8.67956196 0.421424078 -1.09959038 0.061231448 7.12587456 0.028601318 -6.93064672 0.402561175 8.57989199 0.925089270 -9.55071810 0.454993099 -8.11914736 0.509644286 -5.41909698 0.077813151 -17.03336572 0.875713545 -1.27438609 0.602163625 3.09834374 0.105599007 -1.59865741 0.439939102 11.82272089 0.754984309 4.30969696 0.483834579 -10.76886192 0.222486992 7.05419803 0.903020271 7.36096847 0.440357053 -2.05864869 0.581170147 -9.08366913 0.318677911 8.57119930 0.605668919 7.87702340 0.570206991 5.22035786 0.542344385 2.37238850 0.595969470 -4.29809941 0.634313781 4.51647479 0.796663089 -0.62478780 0.562099444 8.50866078 0.490014249 3.46694991 0.122890089 -7.31956453 0.885170890 2.20259268 0.167180856 -1.81003626 0.702563515 8.44526939 0.973495019 8.19767069 0.881261264 -5.92422578 0.686557351 -0.11826129 0.712798344 5.66132869 0.922826429 -5.40845018 0.642183516 6.67839036 0.680978989 11.88962825 0.487904896 3.32266332 0.931709581 0.24234019 0.405641313 -12.79023339 0.361005489 -13.57875491 0.266289733 1.81304596 0.775093821 0.36755600 0.400225605 -9.15574205 0.518040748 -3.90436548 0.396869908 9.24764042 0.669374848 0.74869385 0.609881390 -3.62958907 0.928867495 -0.02527232 0.557679930 0.04433418 0.152565816 11.76152632 0.865663501 -4.62181124 0.007000650 5.82271403 0.389678502 0.33289002 0.532940826 -7.65647076 0.681574524 11.81023732 0.107165912 11.42121999 0.989580324 -5.47120641 0.762285550 3.82311561 0.388755074 16.91059711 0.461236022 4.14012105 0.802420151 -1.35278659 0.036646959 -12.81733350 0.179096148 -0.94395134 0.450959878 -5.39002376 0.264783062 4.16227017 0.780743762 7.26179625 0.821382454 15.10062276 0.469253936 1.45877225 0.685434405 -9.87966760 0.767201511 7.03156071 0.195142483 -11.71327419 0.774014869 -4.55518706 0.973103604 -1.75221406 0.175172193 10.35631400 0.080670414 4.97650495 0.597478189 2.25703939 0.585949751 10.72500409 0.339720931 -5.02901029 0.997874377 6.24398637 0.655067479 -5.83880059 0.184948259 2.17256077 0.746741866 -5.59809380 0.277523381 8.19384177 0.334565607 3.35250431 0.952057263 16.20874892 0.901400446 1.63205839 0.235388475 -1.07921163 0.608376332 0.24315118 0.862639830 15.61923078 0.050955422 1.99639207 0.358905687 8.14825538 0.190069662 4.55210835 0.784025901 13.51582298 0.973572910 15.42415796 0.969080992 2.23978124 0.551857514 1.00858991 0.919566804 -2.77293574 0.906998180 7.10750420 0.934792213 -8.01377290 0.682306063 9.67873875 0.239576806 7.54867950 0.065860266 13.85701962 0.733823443 8.48212853 0.285731085 3.55278843 0.998255904 21.94592206 0.205463912 -2.07957143 0.948665109 1.54169997 0.200109744 -11.36934275 0.447122472 3.07094572 0.815147945 6.45818709 0.007849948 1.85594578 0.818796540 -2.43799564 0.962013689 -17.96539549 0.654190963 -0.93433746 0.454930236 -11.06904368 0.898560975 14.89733742 0.479152492 -5.72390675 0.136197255 9.46781102 0.669006610 5.35954546 0.259381138 3.78388994 0.933778797 1.95373423 0.517555994 10.96772341 0.666138826 9.40585102 0.779906833 0.75347502 0.142656741 7.64803672 0.734297119 -0.40051164 0.362230232 10.00747057 0.660820381 -12.86024975 0.072988046 1.43515528 0.229672223 -6.75981709 0.658534537 -5.61355474 0.795897133 -4.40596595 0.038787666 -1.37033650 0.371835229 6.66666573 0.560963737 8.18430044 0.284787698 -0.55742330 0.622783662 -0.39757686 0.673551753 -12.68628005 0.373038561 4.06416215 0.760546238 4.65859855 0.516761886 3.55304076 0.266856843 -7.35294817 0.615783196 1.01222898 0.158266779 9.91052610 0.285619547 -6.42966726 0.573689954 10.97425098 0.985095061 5.79394599 0.404333309 10.09106608 0.441037857 -1.47295537 0.577661077 -2.07959719 0.547176133 -8.76910940 0.498979558 -11.15658312 0.135862745 -0.88456783 0.326480064 9.71607440 0.998076370 -8.76072622 0.386244511 -19.26823092 0.461833959 -0.11280313 0.064155908 0.64625887 0.172078148 -5.35323428 0.331153163 -1.71034509 0.330955888 4.27104744 0.590544244 7.33843789 0.263171531 -5.38121637 0.539675802 -6.87566548 0.127313096 -2.50161298 0.269417630 10.99076986 0.097362729 6.34017269 0.318528587 -4.63672382 0.451038055 -11.55122495 0.987073278 4.78618612 0.297342215 2.97547390 0.197312152 -5.54495280 0.499701114 17.67606173 0.810316588 16.01578815 0.643667608 -0.16258467 0.228284761 7.92123340 0.784289369 -2.26303900 0.270764770 5.84136933 0.437763291 4.96955217 0.389720490 -8.09516710 0.829068548 14.59207207 0.513593803 2.80954688 0.650799867 4.53653552 0.672326278 4.49116737 0.807447691 18.87549709 0.647303378 9.80118464 0.932576117 -13.02124969 0.038651904 -6.15189291 0.697593318 15.81920283 0.249825051 10.81503188 0.152372300 -23.58738366 0.593560367 8.15716338 0.411680007 3.45349379 0.351061414 -6.39345334 0.374926213 8.72924585 0.165759028 22.17948804 0.003736780 -4.73053410 0.582425257 16.88289626 0.484899167 -1.78826142 0.663273340 -0.78106025 0.337039969 -2.92461669 0.810174719 -13.89224399 0.177428986 4.56809819 0.025010350 -1.07452825 0.649632933 0.58148751 0.829606422 12.13329525 0.354819526 17.35605568 0.284862590 -12.43678107 0.827661083 -1.89492796 0.574929572 2.18520382 0.846299917 18.11449649 0.603173531 4.34508582 0.484049042 17.49394569 0.094811656 10.67752350 0.166176400 17.13374502 0.547208197 4.42138123 0.768691494 5.38445574 0.788597361 0.79946671 0.851883720 -4.67547904 0.995621191 -5.61496422 0.523793593 -20.52093126 0.881207308 -8.95996814 0.851078124 -7.63483710 0.739657373 11.02131097 0.678060014 -10.56228517 0.202393048 6.48841788 0.143946271 3.44853632 0.913249620 -0.02080024 0.070765134 2.08654297 0.032468089 8.13415912 0.439470874 11.19028936 0.944954026 0.26670866 0.492724593 -9.33692734 0.982611921 17.23967092 0.313428994 0.36906670 0.660669528 7.89735684 0.977628886 -4.00171487 0.379327632 5.01615432 0.735627296 0.42214214 0.092461754 13.60634772 0.218359635 6.57431413 0.067653525 -1.77668341 0.717799276 5.16227422 0.325502093 -15.29091550 0.332815338 3.33602480 0.594168551 13.80131443 0.817724470 5.92111679 0.947854666 3.59747624 0.330860216 -6.79722403 0.093518715 -1.86606213 0.824179728 17.05226458 0.466573672 10.39712467 0.409067778 -4.78536386 0.891470739 11.92963128 0.719633060 -1.44230992 0.232628002 -12.31860616 0.834134222 2.93439660 0.957842480 14.27963295 0.546264646 2.17488820 0.701170328 10.78772417 0.612332448 -0.47049341 0.378564293 -0.35140634 0.034337429 5.04887868 0.211697132 -3.51562580 0.663243607 -0.82013387 0.602497174 2.78954743 0.325294790 8.67905777 0.820296625 -12.70343389 0.315467361 -2.59373236 0.015571904 -4.60369241 0.293737716 1.58669084 0.671091860 -10.44245103 0.501340276 4.85215578 0.141572007 10.46303284 0.801814632 1.27898298 0.236929983 -1.72225479 0.608500539 20.18685735 0.827124630 3.27308817 0.542065179 1.01596956 0.254672115 -8.88872881 0.460876757 -11.31397349 0.636168639 0.85294367 0.816417328 3.54262337 0.944147626 -10.53603202 0.675775741 4.34832198 0.121988381 11.56451662 0.283063133 -7.36454369 0.500596540 -8.23701113 0.379483261 -8.36081323 0.219730782 -6.39158860 0.739171315 -1.40518544 0.478709398 -4.01314821 0.460476388 -7.34814047 0.406242873 -7.80836711 0.730648091 -0.57729135 0.152336258 4.98352832 0.026424939 -3.78181635 0.453598432 20.16821827 0.845273124 5.20758271 0.573569671 -3.05534245 0.286828574 -5.31306254 0.961990401 1.09307567 0.006478724 -3.75412572 0.598277695 -2.38444245 0.777900122 2.46837742 0.280363751 9.72195519 0.041094463 3.96271247 0.604775284 2.14105354 0.400315328 7.88645912 0.404573389 -4.03565076 0.798377309 10.80180959 0.932152434 -10.89359212 0.446813857 1.43144578 0.310194540 4.79825196 0.504826858 10.73201365 0.384306369 -4.07526187 0.893893643 -2.84330198 0.390202663 5.81825057 0.830581384 -2.77842745 0.382966910 -7.70333673 0.157692966 -3.25753058 0.726303603 8.50032387 0.556524444 2.35027236 0.857076526 -1.70740565 0.194760923 -3.40693880 0.696420946 -8.03983352 0.514393263 -1.85105344 0.609459979 -9.01148029 0.526019631 18.37344635 0.690793045 16.46079416 0.811535334 4.10224315 0.043403618 7.06657672 0.831274577 15.31421824 0.434558881 -12.36760970 0.004215634 1.95473415 0.277788662 -0.93207006 0.368433415 15.39919341 0.843189783 5.23452387 0.626226925 11.40805770 0.002417288 -1.30282837 0.072493756 3.92130690 0.675355182 2.53148399 0.027222295 4.92705318 0.934429364 5.54978818 0.042268708 -2.19608977 0.246743834 -0.62565550 0.858214200 -8.98329365 0.646827226 12.78468146 0.533966352 2.01061290 0.418710227 1.03689579 0.019241741 8.01166696 0.992268130 -4.49786437 0.694127903 -8.15387184 0.066275002 2.22256207 0.083301613 -12.27145086 0.535369809 9.95709112 0.227692557 14.58198717 0.667298058 5.98046083 0.922503625 1.25640725 0.632933575 9.77623752 0.136171032 5.57068426 0.374916651 -10.07048336 0.470411379 3.69267954 0.897278365 2.22185354 0.212539549 7.96155623 0.720525208 -6.21272358 0.771491819 2.63054735 0.474989115 -2.81488890 0.675381020 4.52747191 0.118615879 -3.22975936 0.783991133 11.42834761 0.423344824 0.26512464 0.617515445 -5.84322807 0.210915613 9.61073028 0.988117333 -6.11878012 0.492318959 5.30581443 0.339379499 -6.40132703 0.903540026 1.22921808 0.122161655 8.08547837 0.197296588 -0.77943801 0.935963718 11.43194858 0.828270943 -5.41689395 0.556863468 15.14667847 0.565186375 -5.15327419 0.542802437 -3.95903082 0.643379366 5.78847793 0.391369361 11.54430873 0.158789330 1.90340148 0.841316129 14.69680285 0.532022770 0.68552840 0.367073827 -8.72287967 0.250127491 9.35401445 0.836083158 5.32139524 0.996712598 -14.53387897 0.825434481 -2.93925146 0.513153861 12.54386493 0.713306793 2.04842442 0.993893406 2.87461954 0.049843312 4.89765230 0.376710062 -6.23945314 0.321108142 -3.45840168 0.854710947 9.05807160 0.199992188 3.33815006 0.787302467 4.22244242 0.351841910 15.75879160 0.268699469 2.78549859 0.920299974 -4.46643118 0.727283862 0.48021298 0.428672083 2.55814938 0.130915212 5.00692968 0.062266047 4.78801127 0.325124688 6.39524485 0.693406744 -10.46792584 0.458128441 10.14111908 0.353412759 -10.56424183 0.821588957 7.60967746 0.267669137 -2.34956688 0.434855697 23.82269027 0.802311880 8.37170447 0.445185000 10.05024769 0.778687843 -9.15753018 0.957292819 12.17438228 0.774769426 1.57960028 0.783591989 0.06719501 0.849073924 16.21114558 0.243444943 -3.79808298 0.842994720 8.98927715 0.020537113 7.72362992 0.984168340 11.25158442 0.152385348 -21.23936903 0.909204114 7.34995949 0.987249305 -7.99435203 0.335456401 -2.78218185 0.768517548 11.59547596 0.466617637 15.90870706 0.071892573 5.58160897 0.554485703 16.05253351 0.815206562 -3.23103465 0.280495460 -4.61108636 0.035757819 5.41596511 0.746146856 2.92445613 0.136743821 11.23628254 0.681316365 -12.93714705 0.838791576 9.94668264 0.084457395 -4.56061529 0.983605894 -4.24795688 0.601732731 -2.83740044 0.375102341 -0.43078317 0.403870303 15.19689584 0.114826374 -10.29920266 0.731582141 6.01686515 0.641655876 6.69431335 0.496723697 4.62223602 0.328118236 -1.74309026 0.072604771 14.31971261 0.827101483 -1.86629155 0.613346722 8.30971428 0.274948560 8.50080711 0.059822908 -7.94061422 0.121069240 -2.72096492 0.710791774 3.33259421 0.398621625 1.73248470 0.488581205 9.56008489 0.011104565 12.71499762 0.038568985 4.11512127 0.219846314 -0.96707584 0.822646857 4.98621667 0.633779997 4.69384821 0.295708955 10.16008645 0.778287787 -7.72973800 0.097096969 2.87264210 0.796538177 4.56095440 0.862952770 5.02621658 0.934628629 3.18138681 0.805600816 -1.02245780 0.317640678 18.16001652 0.992503640 4.13729026 0.941910149 1.61211303 0.377271914 1.71520009 0.735196094 3.26325421 0.514432564 12.94663819 0.591190711 10.53239931 0.005877708 8.06705056 0.340779884 -5.09007267 0.332516161 12.31973355 0.323119296 -2.69957650 0.633232996 12.51207803 0.377641090 8.02081444 0.859293157 -0.13098726 0.099370804 -0.97757546 0.852873609 16.73605399 0.595854575 3.63219184 0.329310613 -4.79105630 0.247760146 -4.77209495 0.708235587 0.92107647 0.924567254 12.12724271 0.433550712 -5.07731478 0.200109463 9.16019579 0.897456586 18.33260560 0.649877409 1.93596773 0.584401505 8.51254631 0.283154523 11.41092928 0.698703314 10.85035748 0.351078210 12.62749979 0.570101319 -2.32028296 0.313842122 -2.45778301 0.007943144 6.93102526 0.108737491 -0.67304654 0.245399613 9.27294774 0.204010286 14.29292826 0.396294626 14.05843185 0.864613328 -3.73515954 0.305862948 0.36606339 0.116802407 -5.79235478 0.457308058 8.70346900 0.858244380 -8.91321043 0.077001581 0.58499566 0.503209780 0.39160153 0.324883353 7.46715326 0.343451039 12.36256009 0.679483638 8.84283689 0.687359177 -6.39396909 0.113065562 -3.67844896 0.667335667 9.36904962 0.009815419 -3.25244888 0.213105120 19.09389976 0.593130536 7.28826611 0.829483570 -5.44565944 0.956490203 7.96993416 0.770961635 0.20683778 0.006497153 -3.73273760 0.037042812 -10.64745846 0.813594448 5.70578906 0.157678242 4.05282218 0.224663656 14.77711159 0.577586777 0.89685942 0.297213941 3.92600687 0.672347849 -12.29347477 0.367072171 -9.33603480 0.456544225 -0.86683190 0.088696811 4.65685745 0.779783359 1.24438030 0.712958633 11.43533814 0.920345548 -10.18380242 0.044456697 -1.20684029 0.992051648 -9.78059038 0.611477837 3.05588762 0.581933667 3.47419279 0.769325101 0.87528245 0.455214184 -3.13185655 0.805887381 -0.82283965 0.707668384 -1.86717272 0.984060013 16.56357048 0.217369677 -2.11052646 0.474156371 -1.39795364 0.958554209 4.87468692 0.328779186 2.69163553 0.401633221 6.08640626 0.599963560 7.41420081 0.240202007 5.73729928 0.696034193 7.31747120 0.569520861 -6.20465547 0.214005920 17.52477873 0.667125450 12.97855692 0.796977778 -3.35883428 0.379721403 -2.90306972 0.552454626 5.31617371 0.401625473 -3.86414389 0.830986352 -14.94107832 0.702705123 -5.74060402 0.833328045 -8.10116203 0.078855027 23.48247017 0.568666620 20.22005082 0.357069809 -2.53387193 0.637455425 15.72048831 0.845354124 -4.41494567 0.934471473 -8.02254420 0.378467959 -0.13398716 0.489382793 0.95967155 0.813667919 0.14835664 0.215786848 14.31875579 0.675145039 -6.36589196 0.822037848 8.25942906 0.156787526 -7.33597529 0.051076292 12.58936771 0.666507807 2.34653798 0.626196518 -0.69351398 0.050664564 7.08738260 0.808776877 5.19653521 0.779008623 3.20900427 0.197212774 7.81171331 0.744975548 6.49008186 0.991318119 7.27471854 0.839642650 -7.68367290 0.880500743 12.04846713 0.797754890 14.93435279 0.190527791 -3.83641079 0.075995951 2.15090497 0.426560973 -3.61166623 0.777188818 8.49333248 0.891445999 -7.46936100 0.148607446 13.85406193 0.983656455 12.20477754 0.499345090 10.09415710 0.638127733 5.37134772 0.110929011 8.17660840 0.879411588 -4.38804367 0.608933700 -11.78145902 0.265134740 6.18940186 0.970982743 -16.24831477 0.844983635 9.52790402 0.578152651 16.44372225 0.264144422 -2.48286428 0.893865621 5.33297280 0.512990215 -2.68912507 0.851636020 9.94607707 0.644483197 -1.93526852 0.550759844 2.34310539 0.787853650 11.79131608 0.983668283 3.16689104 0.605394987 10.47759320 0.919442774 2.86973133 0.557835916 10.30674302 0.442504870 10.92820575 0.976183635 7.98050212 0.139334994 -0.64719705 0.981199028 -2.63625596 0.341524563 11.38799583 0.858987904 1.37321916 0.202373294 12.66698520 0.142127091 5.83599540 0.864497670 4.88659560 0.472598564 13.00108599 0.961629827 5.79514791 0.408377170 -1.47807631 0.536772872 -3.38142805 0.288956265 6.25154986 0.828695103 2.40919373 0.478123848 3.72990486 0.056539500 -9.90915815 0.603356617 0.21737084 0.737251896 5.36929388 0.026920178 -1.05027354 0.034992509 -4.97887624 0.506301429 -6.40058435 0.014061876 -0.14610837 0.619699963 3.78483619 0.653952701 3.84143365 0.162122572 2.66030676 0.196542503 -10.56809462 0.386200215 -5.01140125 0.711703654 -3.09809005 0.118120179 -2.76110171 0.118809515 2.85825107 0.129646974 2.75993661 0.171779333 11.55931169 0.372165133 9.21211486 0.969079819 6.02207148 0.498965865 -3.52883224 0.954619249 -2.60190803 0.069405278 1.34183694 0.569402487 -11.35155228 0.766344735 1.04661568 0.023673810 -1.90461932 0.179728300 13.72465582 0.467775796 19.14882438 0.476924297 -1.07480326 0.944407858 -8.44289331 0.059804028 1.89732882 0.743225795 -7.87832463 0.672539050 -12.24163608 0.916803014 -12.77212790 0.648129714 6.39197262 0.622954436 5.26261666 0.494421400 -10.65239640 0.695527931 4.63841458 0.499519163 -2.94276544 0.429201572 4.68788953 0.639613685 -1.03031400 0.349342009 -2.69946354 0.221796918 -15.32237714 0.631289988 -8.31962698 0.925363812 -5.80897714 0.833536878 7.16070989 0.832098478 -10.99679727 0.794048223 0.84514458 0.748014415 2.23308495 0.111176288 3.56351018 0.599805508 0.88336430 0.746908710 -14.63461670 0.314391808 4.39039715 0.079604833 -7.07001439 0.633705345 2.11252583 0.461468123 7.60219364 0.497389476 -4.87713428 0.039952736 2.17515292 0.421830084 0.64302362 0.267982804 -22.29371533 0.646257366 0.31652779 0.060548371 7.93445046 0.343570449 0.28292029 0.651909785 2.77775640 0.637679287 6.22941586 0.291132945 23.68567532 0.708513840 9.49503014 0.645200206 0.87405420 0.063154289 -4.04931224 0.110797498 8.91607239 0.732917195 -5.77728018 0.635435595 -16.37296319 0.343727613 9.87409940 0.774177478 -8.11360210 0.377765616 14.54242540 0.204343527 0.36239636 0.115528352 19.51009176 0.181365423 1.23592729 0.011676577 -15.81877035 0.767155028 -0.05911251 0.737944231 -6.55395965 0.214062137 -7.85591487 0.539865054 -9.73010882 0.730924287 11.79433862 0.267116856 -8.84308360 0.088069165 -5.56689174 0.405987947 7.59010135 0.655631611 10.07629305 0.031106157 -6.19331485 0.052350502 -4.58626710 0.326901540 -5.19431549 0.125740555 -2.08129025 0.034657174 -10.48798034 0.153632237 13.04657686 0.317295703 1.94142067 0.731437668 -1.62470735 0.701070475 -12.27046912 0.505781742 -2.96095228 0.122808075 -2.91847765 0.372668438 -14.83230131 0.100749725 16.57350659 0.707854947 10.05473238 0.244046174 5.50858969 0.070691273 7.65309196 0.245393047 7.16359996 0.056261015 4.33026356 0.318855549 -4.65721575 0.271249938 2.85909691 0.309377566 3.02736080 0.553944209 6.22796768 0.763945813 -4.47036396 0.197721195 2.78901176 0.441166128 -9.94574794 0.964660659 1.86451969 0.704635530 -10.38926659 0.772304221 -5.36565800 0.029527218 1.99230152 0.578448308 13.65547415 0.936050102 -2.05229879 0.851521142 0.99504588 0.974891334 -1.46027404 0.320227281 -8.45614275 0.727910071 -0.95201934 0.199101032 -2.46642929 0.462252060 -6.44060430 0.703637604 -2.58115910 0.084948525 0.76248197 0.125769097 12.00603845 0.675927328 1.97538215 0.782502470 2.23331320 0.870228155 -3.10226060 0.485056198 12.59337170 0.584729095 -2.42247402 0.387588168 9.41981063 0.374604221 6.26806243 0.727453335 -5.30630356 0.427294265 13.81542647 0.394246994 1.05647858 0.646684666 -12.25005208 0.010531726 -4.58162076 0.077133994 0.58094190 0.400275636 5.79443858 0.641731247 8.87635216 0.913593476 9.71048520 0.955285711 13.10563373 0.908471848 4.99194220 0.967014095 15.88178853 0.041518216 9.35962068 0.864770023 -7.53095731 0.300106124 12.18427585 0.248876997 9.22034502 0.450149366 -1.02861237 0.684246939 -2.98140404 0.326901490 -4.64316598 0.425381055 15.35233259 0.630774937 -1.85655250 0.226889991 15.43748330 0.584219351 10.39060893 0.387854461 2.80705696 0.564024865 3.48201221 0.787103673 7.03787977 0.112019552 8.41853061 0.798376796 15.63925527 0.873984550 -4.05742183 0.699131238 6.56954685 0.720018710 2.44007265 0.232697343 3.75597926 0.975133449 2.92362149 0.290975435 -4.74372257 0.003738451 1.28365940 0.987536495 15.65288265 0.179629701 -11.76385004 0.850614822 1.56331228 0.592017435 -9.64774741 0.024951969 -9.44879860 0.993960270 29.33340056 0.913358233 7.97233120 0.021820585 -12.10837953 0.401535846 -1.20729618 0.984977268 3.63219301 0.491142613 2.79853507 0.663823888 3.19584583 0.612511282 -0.81790885 0.908769330 -1.67795944 0.611690031 2.55137163 0.109447998 4.36572889 0.382049700 -6.35667866 0.162787163 -0.76239101 0.892383562 -3.99558996 0.466572017 -0.47513018 0.457760464 -10.69568261 0.544872910 4.30943512 0.982456072 2.91825703 0.823403368 0.10753188 0.945676881 -8.38623073 0.923085521 4.95690232 0.188128654 5.39956649 0.331692462 -1.47421789 0.327711090 -1.81689665 0.713285385 5.15137860 0.414906436 5.68897151 0.110799415 0.78825159 0.396824099 -1.78376652 0.929264595 0.76991060 0.950124414 15.81469073 0.951245195 -4.33820920 0.009896093 1.67174323 0.821983745 0.38997945 0.928857784 1.97848484 0.175680230 -5.81067801 0.772580245 -10.45208478 0.418845035 13.34024524 0.905645046 -8.79585122 0.906516178 2.89093397 0.113010960 2.22324289 0.799940482 8.95497981 0.984663669 0.93288527 0.277914575 -17.35306978 0.455587022 -3.26914604 0.406757639 8.75871227 0.067059659 1.79914932 0.784879863 -0.67305388 0.006393497 1.66805704 0.039614073 9.03868439 0.601066847 4.29458670 0.015772820 -8.15564320 0.939633197 12.50538902 0.766347628 -0.45547258 0.464314122 -9.47180656 0.640114882 -13.25567198 0.125841930 2.87660101 0.381931128 7.37834152 0.648958712 -0.45874073 0.303139498 4.87941450 0.500090729 4.50344891 0.311329309 -6.14257896 0.061368838 5.98243271 0.873804882 -2.64694079 0.080493398 -17.79727796 0.188420116 -13.52552336 0.798403568 2.29086373 0.518700767 5.21493652 0.788828533 -8.09641615 0.775041349 5.87005782 0.079447757 10.74795720 0.955691540 -8.01115709 0.004508053 -7.53735064 0.054195934 -6.79130165 0.877193354 -1.26419539 0.837772170 8.31082852 0.967509866 21.83090247 0.261529880 11.20453234 0.913858875 7.19128396 0.541942489 -2.93623595 0.860095891 -3.61446403 0.022418065 -6.59997709 0.532998307 3.71486934 0.522669434 18.03420874 0.295064126 -8.75452291 0.390175021 -7.83680812 0.263760724 -1.10263921 0.501819826 2.05633484 0.338684642 5.25636848 0.558667384 -7.33260497 0.457327559 3.86721296 0.612182242 -15.94331373 0.478329365 3.71501899 0.264241588 18.26175822 0.023212661 -5.21093378 0.184378036 -2.44074986 0.297114134 -11.88339919 0.875956945 7.52127093 0.927322099 5.31597834 0.416344968 11.42012314 0.952491078 13.64950955 0.794183413 12.50861255 0.390723282 -3.48142207 0.538708662 14.32910902 0.085221990 5.76196699 0.313860477 2.63751452 0.917424732 2.99975231 0.208662214 7.09852825 0.798246964 -1.95742636 0.352166210 7.80534904 0.386523123 -4.47229047 0.290188493 -4.35535158 0.761527294 1.47083860 0.447897289 3.09504296 0.048513534 3.50446804 0.925072429 12.00487617 0.574499971 10.35171466 0.934193962 -5.63256003 0.968833982 7.15625220 0.467160468 -7.81378393 0.790220187 4.52101003 0.014459969 12.90773453 0.990835752 7.70737851 0.785329264 -3.37196794 0.066025357 -5.12793918 0.347459322 -7.96083724 0.216608294 12.81247279 0.287880308 4.63872463 0.426881173 -3.85439309 0.336532356 4.55633320 0.108001536 -2.40824634 0.135247519 1.65932541 0.005108006 3.26129578 0.093163961 -3.52114597 0.544041275 -9.08479260 0.111212700 7.75150456 0.942726234 7.44829768 0.396996218 14.44430576 0.525470762 -2.13457508 0.207577358 9.74871681 0.537177845 -4.53338693 0.625854028 16.15962824 0.947933141 -0.17711664 0.480940902 -7.21470818 0.006952612 -6.27644212 0.737909602 -0.81648165 0.230003567 -2.10429152 0.209671398 7.69291241 0.987903443 -0.32284504 0.183904658 -0.90833921 0.782169770 10.35542238 0.201758865 10.40788689 0.540802365 10.80011849 0.298263948 7.39943598 0.785716539 -12.71674257 0.154135834 16.67139866 0.116794235 12.47832985 0.998179468 3.24041348 0.653080096 -5.50381593 0.995396942 -10.41952811 0.576472768 4.33514092 0.146434686 4.41294276 0.507165968 -0.14746982 0.698144836 -1.33323051 0.466481571 -7.01201350 0.797150114 6.58669848 0.942287809 7.19444974 0.053569397 -5.66046997 0.435728340 -5.07828702 0.497727572 13.72045272 0.324222944 9.99111984 0.355713969 -4.42363728 0.071790181 -2.34300923 0.618434528 4.98594041 0.605667438 -2.45307721 0.894546647 -3.52276424 0.760086779 -3.69489441 0.960758209 13.04792817 0.511273320 21.61433486 0.236270637 -9.57303968 0.964235539 11.70400744 0.391045695 4.25170422 0.411577090 7.87516537 0.952858161 9.89202673 0.971106687 7.51554467 0.505791978 2.17944879 0.893835908 0.82420351 0.213912155 2.47121932 0.688019842 -14.88503628 0.640950883 8.16032283 0.277742858 -4.65776244 0.129415853 7.48274838 0.074213153 7.70537066 0.476778957 5.88202944 0.351838898 1.95618325 0.106331699 7.22064623 0.511434587 -18.64632081 0.009314188 -6.16794611 0.526204245 2.14042033 0.675800465 -1.89535048 0.916845690 -7.77156605 0.069742819 -6.84078801 0.865082345 8.17539904 0.095895629 10.75170309 0.821383078 14.31498805 0.117893208 -2.82264467 0.809086411 0.11117380 0.400587471 6.43898314 0.333163663 9.48110784 0.465173316 5.39395511 0.695273081 -2.05636570 0.508060862 0.68666117 0.647109494 -6.41880322 0.267530762 -0.12096589 0.986901165 6.46062643 0.588580914 -4.20926136 0.550783675 4.07354300 0.907963701 10.84045143 0.900920521 2.64504664 0.767700269 10.34578229 0.197810342 -0.19222273 0.281932395 3.47400952 0.977555902 11.04549389 0.694010579 6.79729856 0.056652433 9.28300628 0.598930531 -3.53453282 0.183412212 8.04028248 0.250746943 5.75964045 0.424692336 -4.98252741 0.867446071 12.00352175 0.289615080 7.53497791 0.350915526 2.54579776 0.655113837 -9.29572208 0.900136667 6.41659249 0.100570650 7.37095646 0.907179211 -12.78417775 0.262214556 0.87962107 0.624657444 -5.96939907 0.296725805 -2.56857339 0.604065931 4.27131811 0.962952479 21.72603838 0.442485270 6.10056565 0.418383130 10.48099521 0.333593221 19.28363092 0.382408442 2.12080726 0.601206970 -6.82450704 0.740158518 11.32395692 0.627015570 5.00040701 0.476274658 -11.64750733 0.105099095 5.77442654 0.576560214 0.31340364 0.516479036 -2.09881449 0.146089191 5.12411327 0.368130477 1.70530391 0.621828438 -12.95649749 0.355726301 8.43735652 0.275383759 -15.56161079 0.413160084 5.28942694 0.069125495 5.96040877 0.438716686 -2.59318107 0.571116303 6.95988992 0.650760909 14.00074797 0.623645969 1.66101456 0.558763985 -2.57968349 0.648185379 -5.47584253 0.716901151 6.37222581 0.060563130 2.83664864 0.842419730 1.48926558 0.620280308 0.33471689 0.170312461 5.21648412 0.317639631 0.51733642 0.843867329 9.86005834 0.306036746 -5.81145791 0.975655452 -5.43219061 0.303385368 5.87157118 0.677369776 2.08889926 0.310200439 -2.53433085 0.194730908 7.01359575 0.674259533 -2.00936260 0.682056466 -2.98240739 0.787899917 -7.43289210 0.357483044 -12.58905988 0.981387385 5.78095517 0.533526274 -1.23065889 0.687266774 -6.82309960 0.293249774 8.47000829 0.842056399 -5.81624772 0.303700280 -14.83571031 0.311387926 4.66808472 0.091222946 -2.90144463 0.438301785 10.62458662 0.828335698 7.88002491 0.990156110 10.27680283 0.251087079 -9.42498970 0.292462244 6.73027640 0.213065205 1.28169895 0.353152789 -14.29203733 0.264563048 20.35772711 0.265208837 3.55095071 0.242905653 -17.97067670 0.373951756 10.53141139 0.247520698 0.05293205 0.579940423 12.79674707 0.288031751 -5.44235185 0.075899079 14.29464811 0.960707538 -1.36753291 0.124265178 -4.25946974 0.521720352 -12.46519252 0.385503339 -6.65343143 0.540942219 5.55949184 0.143194404 -1.20480594 0.515905644 -4.13839908 0.164461445 -2.21345425 0.812969725 3.94223380 0.229238952 -10.78661097 0.395049514 3.06997341 0.791234255 24.82205477 0.110859039 6.28791249 0.867125744 -2.80296119 0.703583849 13.24274039 0.425951975 -0.19577471 0.361568727 -2.34894781 0.954814545 19.76339577 0.635462177 -1.87591480 0.149121567 -7.70962391 0.711708342 -2.46291902 0.390902746 end data regression /variables=v0 v1 /statistics defaults /dependent=v0 /method=enter. ]) AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format v0,F8.0 v1,F8.0 Table: Model Summary (v0) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.05,.00,.00,8.11 Table: ANOVA (v0) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,235.23,1,235.23,3.58,.059 ,Residual,98438.40,1498,65.71,, ,Total,98673.63,1499,,, Table: Coefficients (v0) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),1.24,.42,.00,2.95,.003 ,v1,1.37,.72,.05,1.89,.059 ]) AT_CLEANUP AT_SETUP([LINEAR REGRESSION no crash on all missing]) AT_DATA([regcrash.sps], [dnl data list list /x * y. begin data. . . . . . . . . . . . . . . . . . . . . end data. regression /variables=x y /dependent=y. ]) AT_CHECK([pspp -o pspp.csv regcrash.sps], [1], [ignore], [ignore]) AT_CLEANUP AT_SETUP([LINEAR REGRESSION missing dependent variable]) dnl Test for a bug where missing values in the dependent variable were not being dnl ignored like they should have been. AT_DATA([reg-mdv-ref.sps], [dnl data list notable list / v0 to v2. begin data 0.65377128 7.735648 -23.97588 -0.13087553 6.142625 -19.63854 0.34880368 7.651430 -25.26557 0.69249021 6.125125 -16.57090 -0.07368178 8.245789 -25.80001 -0.34404919 6.031540 -17.56743 0.75981559 9.832291 -28.35977 -0.46958313 5.343832 -16.79548 -0.06108490 8.838262 -29.25689 0.56154863 6.200189 -18.58219 end data regression /variables=v0 v1 /statistics defaults /dependent=v2 /method=enter. ]) AT_CHECK([pspp -o pspp-ref.csv reg-mdv-ref.sps]) AT_DATA([reg-mdv.sps], [dnl data list notable list / v0 to v2. begin data 0.65377128 7.735648 -23.97588 -0.13087553 6.142625 -19.63854 0.34880368 7.651430 -25.26557 0.69249021 6.125125 -16.57090 -0.07368178 8.245789 -25.80001 -0.34404919 6.031540 -17.56743 0.75981559 9.832291 -28.35977 -0.46958313 5.343832 -16.79548 -0.06108490 8.838262 -29.25689 0.56154863 6.200189 -18.58219 0.5 8 9 end data missing values v2 (9). regression /variables=v0 v1 /statistics defaults /dependent=v2 /method=enter. ]) AT_CHECK([pspp -o pspp.csv reg-mdv.sps]) AT_CHECK([diff pspp.csv pspp-ref.csv]) AT_CLEANUP AT_SETUP([LINEAR REGRESSION with invalid syntax (and empty dataset)]) AT_DATA([ss.sps], [dnl data list notable list / v0 to v2. begin data end data. regression /variables=v0 v1 /statistics r coeff anova /dependent=v2 /method=enter v2. ]) AT_CHECK([pspp ss.sps], [1], [ignore]) AT_CLEANUP dnl The following example comes from dnl http://www.ats.ucla.edu/stat/spss/output/reg_spss%28long%29.htm AT_SETUP([LINEAR REGRESSION coefficient confidence interval]) AT_DATA([conf.sps], [dnl set format = F22.3. data list notable list /math female socst read science * begin data. 41.00 .00 57.00 57.00 47.00 53.00 1.00 61.00 68.00 63.00 54.00 .00 31.00 44.00 58.00 47.00 .00 56.00 63.00 53.00 57.00 .00 61.00 47.00 53.00 51.00 .00 61.00 44.00 63.00 42.00 .00 61.00 50.00 53.00 45.00 .00 36.00 34.00 39.00 54.00 .00 51.00 63.00 58.00 52.00 .00 51.00 57.00 50.00 51.00 .00 61.00 60.00 53.00 51.00 .00 61.00 57.00 63.00 71.00 .00 71.00 73.00 61.00 57.00 .00 46.00 54.00 55.00 50.00 .00 56.00 45.00 31.00 43.00 .00 56.00 42.00 50.00 51.00 .00 56.00 47.00 50.00 60.00 .00 56.00 57.00 58.00 62.00 .00 61.00 68.00 55.00 57.00 .00 46.00 55.00 53.00 35.00 .00 41.00 63.00 66.00 75.00 .00 66.00 63.00 72.00 45.00 .00 56.00 50.00 55.00 57.00 .00 61.00 60.00 61.00 45.00 .00 46.00 37.00 39.00 46.00 .00 31.00 34.00 39.00 66.00 .00 66.00 65.00 61.00 57.00 .00 46.00 47.00 58.00 49.00 .00 46.00 44.00 39.00 49.00 .00 41.00 52.00 55.00 57.00 .00 51.00 42.00 47.00 64.00 .00 61.00 76.00 64.00 63.00 .00 71.00 65.00 66.00 57.00 .00 31.00 42.00 72.00 50.00 .00 61.00 52.00 61.00 58.00 .00 66.00 60.00 61.00 75.00 .00 66.00 68.00 66.00 68.00 .00 66.00 65.00 66.00 44.00 .00 36.00 47.00 36.00 40.00 .00 51.00 39.00 39.00 41.00 .00 51.00 47.00 42.00 62.00 .00 51.00 55.00 58.00 57.00 .00 51.00 52.00 55.00 43.00 .00 41.00 42.00 50.00 48.00 .00 66.00 65.00 63.00 63.00 .00 46.00 55.00 69.00 39.00 .00 47.00 50.00 49.00 70.00 .00 51.00 65.00 63.00 63.00 .00 46.00 47.00 53.00 59.00 .00 51.00 57.00 47.00 61.00 .00 56.00 53.00 57.00 38.00 .00 41.00 39.00 47.00 61.00 .00 46.00 44.00 50.00 49.00 .00 71.00 63.00 55.00 73.00 .00 66.00 73.00 69.00 44.00 .00 42.00 39.00 26.00 42.00 .00 32.00 37.00 33.00 39.00 .00 46.00 42.00 56.00 55.00 .00 41.00 63.00 58.00 52.00 .00 51.00 48.00 44.00 45.00 .00 61.00 50.00 58.00 61.00 .00 66.00 47.00 69.00 39.00 .00 46.00 44.00 34.00 41.00 .00 36.00 34.00 36.00 50.00 .00 61.00 50.00 36.00 40.00 .00 26.00 44.00 50.00 60.00 .00 66.00 60.00 55.00 47.00 .00 26.00 47.00 42.00 59.00 .00 44.00 63.00 65.00 49.00 .00 36.00 50.00 44.00 46.00 .00 51.00 44.00 39.00 58.00 .00 61.00 60.00 58.00 71.00 .00 66.00 73.00 63.00 58.00 .00 66.00 68.00 74.00 46.00 .00 51.00 55.00 58.00 43.00 .00 31.00 47.00 45.00 54.00 .00 61.00 55.00 49.00 56.00 .00 66.00 68.00 63.00 46.00 .00 46.00 31.00 39.00 54.00 .00 56.00 47.00 42.00 57.00 .00 56.00 63.00 55.00 54.00 .00 36.00 36.00 61.00 71.00 .00 56.00 68.00 66.00 48.00 .00 56.00 63.00 63.00 40.00 .00 41.00 55.00 44.00 64.00 .00 66.00 55.00 63.00 51.00 .00 56.00 52.00 53.00 39.00 .00 56.00 34.00 42.00 40.00 .00 31.00 50.00 34.00 61.00 .00 56.00 55.00 61.00 66.00 .00 46.00 52.00 47.00 49.00 .00 46.00 63.00 66.00 65.00 1.00 61.00 68.00 69.00 52.00 1.00 48.00 39.00 44.00 46.00 1.00 51.00 44.00 47.00 61.00 1.00 51.00 50.00 63.00 72.00 1.00 56.00 71.00 66.00 71.00 1.00 71.00 63.00 69.00 40.00 1.00 41.00 34.00 39.00 69.00 1.00 61.00 63.00 61.00 64.00 1.00 66.00 68.00 69.00 56.00 1.00 61.00 47.00 66.00 49.00 1.00 41.00 47.00 33.00 54.00 1.00 51.00 63.00 50.00 53.00 1.00 51.00 52.00 61.00 66.00 1.00 56.00 55.00 42.00 67.00 1.00 56.00 60.00 50.00 40.00 1.00 33.00 35.00 51.00 46.00 1.00 56.00 47.00 50.00 69.00 1.00 71.00 71.00 58.00 40.00 1.00 56.00 57.00 61.00 41.00 1.00 51.00 44.00 39.00 57.00 1.00 66.00 65.00 46.00 58.00 1.00 56.00 68.00 59.00 57.00 1.00 66.00 73.00 55.00 37.00 1.00 41.00 36.00 42.00 55.00 1.00 46.00 43.00 55.00 62.00 1.00 66.00 73.00 58.00 64.00 1.00 56.00 52.00 58.00 40.00 1.00 51.00 41.00 39.00 50.00 1.00 51.00 60.00 50.00 46.00 1.00 56.00 50.00 50.00 53.00 1.00 56.00 50.00 39.00 52.00 1.00 46.00 47.00 48.00 45.00 1.00 46.00 47.00 34.00 56.00 1.00 61.00 55.00 58.00 45.00 1.00 56.00 50.00 44.00 54.00 1.00 41.00 39.00 50.00 56.00 1.00 46.00 50.00 47.00 41.00 1.00 26.00 34.00 29.00 54.00 1.00 56.00 57.00 50.00 72.00 1.00 56.00 57.00 54.00 56.00 1.00 51.00 68.00 50.00 47.00 1.00 46.00 42.00 47.00 49.00 1.00 66.00 61.00 44.00 60.00 1.00 66.00 76.00 67.00 54.00 1.00 46.00 47.00 58.00 55.00 1.00 56.00 46.00 44.00 33.00 1.00 41.00 39.00 42.00 49.00 1.00 61.00 52.00 44.00 43.00 1.00 51.00 28.00 44.00 50.00 1.00 52.00 42.00 50.00 52.00 1.00 51.00 47.00 39.00 48.00 1.00 41.00 47.00 44.00 58.00 1.00 66.00 52.00 53.00 43.00 1.00 61.00 47.00 48.00 41.00 1.00 31.00 50.00 55.00 43.00 1.00 51.00 44.00 44.00 46.00 1.00 41.00 47.00 40.00 44.00 1.00 41.00 45.00 34.00 43.00 1.00 46.00 47.00 42.00 61.00 1.00 56.00 65.00 58.00 40.00 1.00 51.00 43.00 50.00 49.00 1.00 61.00 47.00 53.00 56.00 1.00 66.00 57.00 58.00 61.00 1.00 71.00 68.00 55.00 50.00 1.00 61.00 52.00 54.00 51.00 1.00 61.00 42.00 47.00 42.00 1.00 41.00 42.00 42.00 67.00 1.00 66.00 66.00 61.00 53.00 1.00 61.00 47.00 53.00 50.00 1.00 58.00 57.00 51.00 51.00 1.00 31.00 47.00 63.00 72.00 1.00 61.00 57.00 61.00 48.00 1.00 61.00 52.00 55.00 40.00 1.00 31.00 44.00 40.00 53.00 1.00 61.00 50.00 61.00 39.00 1.00 36.00 39.00 47.00 63.00 1.00 41.00 57.00 55.00 51.00 1.00 37.00 57.00 53.00 45.00 1.00 43.00 42.00 50.00 39.00 1.00 61.00 47.00 47.00 42.00 1.00 39.00 42.00 31.00 62.00 1.00 51.00 60.00 61.00 44.00 1.00 51.00 44.00 35.00 65.00 1.00 66.00 63.00 54.00 63.00 1.00 71.00 65.00 55.00 54.00 1.00 41.00 39.00 53.00 45.00 1.00 36.00 50.00 58.00 60.00 1.00 51.00 52.00 56.00 49.00 1.00 51.00 60.00 50.00 48.00 1.00 51.00 44.00 39.00 57.00 1.00 61.00 52.00 63.00 55.00 1.00 61.00 55.00 50.00 66.00 1.00 56.00 50.00 66.00 64.00 1.00 71.00 65.00 58.00 55.00 1.00 51.00 52.00 53.00 42.00 1.00 36.00 47.00 42.00 56.00 1.00 61.00 63.00 55.00 53.00 1.00 66.00 50.00 53.00 41.00 1.00 41.00 42.00 42.00 42.00 1.00 41.00 36.00 50.00 53.00 1.00 56.00 50.00 55.00 42.00 1.00 51.00 41.00 34.00 60.00 1.00 56.00 47.00 50.00 52.00 1.00 56.00 55.00 42.00 38.00 1.00 46.00 42.00 36.00 57.00 1.00 52.00 57.00 55.00 58.00 1.00 61.00 55.00 58.00 65.00 1.00 61.00 63.00 53.00 end data. regression /variables = math female socst read /statistics = coeff r anova ci (95) /dependent = science /method = enter ]) AT_CHECK([pspp -O format=csv conf.sps], [0], [dnl Table: Model Summary (science) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.699,.489,.479,7.148 Table: ANOVA (science) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,9543.721,4,2385.930,46.695,.000 ,Residual,9963.779,195,51.096,, ,Total,19507.500,199,,, Table: Coefficients (science) ,,Unstandardized Coefficients,,Standardized Coefficients,,,95% Confidence Interval for B, ,,B,Std. Error,Beta,t,Sig.,Lower Bound,Upper Bound ,(Constant),12.325,3.194,.000,3.859,.000,6.027,18.624 ,math,.389,.074,.368,5.252,.000,.243,.535 ,female,-2.010,1.023,-.101,-1.965,.051,-4.027,.007 ,socst,.050,.062,.054,.801,.424,-.073,.173 ,read,.335,.073,.347,4.607,.000,.192,.479 ]) AT_CLEANUP dnl Checks for regression against bug #44877. AT_SETUP([LINEAR REGRESSION crash with long string variables]) AT_DATA([regression.sps], [dnl SET DECIMAL=DOT. DATA LIST notable LIST /text (A24) Y * X1 * BEGIN DATA. V00276601 0.00 90.00 V00292909 10.00 30.00 V00291204 20.00 20.00 V00300070 0.00 90.00 END DATA. REGRESSION /VARIABLES= Y /DEPENDENT= X1 /METHOD=ENTER /STATISTICS=COEFF R ANOVA /SAVE= RESID. LIST. ]) AT_CHECK([pspp -o pspp.csv regression.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Model Summary (X1) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.95,.89,.84,15.08 Table: ANOVA (X1) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,3820.45,1,3820.45,16.81,.055 ,Residual,454.55,2,227.27,, ,Total,4275.00,3,,, Table: Coefficients (X1) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),85.45,10.16,.00,8.41,.004 ,Y,-3.73,.91,-.95,-4.10,.055 Table: Data List text,Y,X1,RES1 V00276601 ,.00,90.00,4.55 V00292909 ,10.00,30.00,-18.18 V00291204 ,20.00,20.00,9.09 V00300070 ,.00,90.00,4.55 ]) AT_CLEANUP dnl Test for a crash which happened on bad input syntax AT_SETUP([LINEAR REGRESSION -- Empty Parentheses]) AT_DATA([empty-parens.sps], [dnl set format = F22.3. data list notable list /math female socst read science * begin data. 58.00 1.00 61.00 55.00 58.00 65.00 1.00 61.00 63.00 53.00 end data. regression /variables = math female socst read /statistics = coeff r anova ci () /dependent = science /method = enter ]) AT_CHECK([pspp -o pspp.csv empty-parens.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([LINEAR REGRESSION varibles on ENTER subcommand]) AT_DATA([regression.sps], [dnl SET FORMAT=F10.3. DATA LIST notable LIST /number * value *. BEGIN DATA 16 7.25 0 .00 1 .10 9 27.9 0 .00 7 3.65 14 16.8 24 9.15 0 .00 24 19.0 7 4.05 12 7.90 6 .75 11 1.40 0 .00 3 2.30 12 7.60 11 6.80 16 8.65 END DATA. REGRESSION /STATISTICS COEFF R ANOVA /DEPENDENT value /METHOD=ENTER number. ]) AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl Table: Model Summary (value) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.612,.374,.338,6.176 Table: ANOVA (value) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,388.065,1,388.065,10.173,.005 ,Residual,648.498,17,38.147,, ,Total,1036.563,18,,, Table: Coefficients (value) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,(Constant),.927,2.247,.000,.413,.685 ,number,.611,.192,.612,3.189,.005 ]) AT_CLEANUP AT_SETUP([LINEAR REGRESSION /ORIGIN]) AT_DATA([regression-origin.sps], [dnl SET FORMAT=F10.3. DATA LIST notable LIST /number * value *. BEGIN DATA 16 7.25 0 .00 1 .10 9 27.9 0 .00 7 3.65 14 16.8 24 9.15 0 .00 24 19.0 7 4.05 12 7.90 6 .75 11 1.40 0 .00 3 2.30 12 7.60 11 6.80 16 8.65 END DATA. REGRESSION /STATISTICS COEFF R ANOVA /DEPENDENT value /ORIGIN /METHOD=ENTER number. ]) AT_CHECK([pspp -O format=csv regression-origin.sps], [0], [dnl Table: Model Summary (value) ,R,R Square,Adjusted R Square,Std. Error of the Estimate ,.802,.643,.622,6.032 Table: ANOVA (value) ,,Sum of Squares,df,Mean Square,F,Sig. ,Regression,1181.726,1,1181.726,32.475,.000 ,Residual,654.989,18,36.388,, ,Total,1836.715,19,,, Table: Coefficients (value) ,,Unstandardized Coefficients,,Standardized Coefficients,, ,,B,Std. Error,Beta,t,Sig. ,number,.672,.118,.802,5.699,.000 ,,,,,, ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/correlations.at0000644000175000017500000001727213137223525016545 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([CORRELATIONS]) AT_SETUP([CORRELATIONS -- unweighted]) AT_DATA([correlations.sps], [dnl set format = F11.3. data list notable list /foo * bar * wiz * bang *. begin data. 1 0 3 1 3 9 -50 5 3 4 3 203 4 -9 0 -4 98 78 104 2 3 50 -49 200 . 4 4 4 5 3 0 . end data. correlations variables = foo bar wiz bang /print nosig /missing = listwise . correlations variables = bar wiz /print nosig /missing = listwise . correlations variables = foo bar wiz bang /print nosig /missing = pairwise . ]) AT_CHECK([pspp -o pspp.csv correlations.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Correlations ,,foo,bar,wiz,bang foo,Pearson Correlation,1.000,.802,.890,-.308 ,Sig. (2-tailed),,.055,.017,.553 bar,Pearson Correlation,.802,1.000,.519,.118 ,Sig. (2-tailed),.055,,.291,.824 wiz,Pearson Correlation,.890,.519,1.000,-.344 ,Sig. (2-tailed),.017,.291,,.505 bang,Pearson Correlation,-.308,.118,-.344,1.000 ,Sig. (2-tailed),.553,.824,.505, Table: Correlations ,,bar,wiz bar,Pearson Correlation,1.000,.497 ,Sig. (2-tailed),,.210 wiz,Pearson Correlation,.497,1.000 ,Sig. (2-tailed),.210, Table: Correlations ,,foo,bar,wiz,bang foo,Pearson Correlation,1.000,.805,.883,-.308 ,Sig. (2-tailed),,.029,.008,.553 ,N,7,7,7,6 bar,Pearson Correlation,.805,1.000,.497,.164 ,Sig. (2-tailed),.029,,.210,.725 ,N,7,8,8,7 wiz,Pearson Correlation,.883,.497,1.000,-.337 ,Sig. (2-tailed),.008,.210,,.460 ,N,7,8,8,7 bang,Pearson Correlation,-.308,.164,-.337,1.000 ,Sig. (2-tailed),.553,.725,.460, ,N,6,7,7,7 ]) AT_CLEANUP AT_SETUP([CORRELATIONS -- weighted]) AT_DATA([correlations1.sps], [dnl set format = F11.3. data list notable list /foo * bar * wiz * bang * w *. begin data. 1 0 3 1 1 3 9 -50 5 2 3 4 3 203 1 4 -9 0 -4 1 98 78 104 2 3 3 50 -49 200 1 end data. weight by w. correlations variables = foo bar wiz bang /statistics=descriptives xprod . ]) AT_DATA([correlations2.sps], [dnl set format = F11.3. data list notable list /foo * bar * wiz * bang * w *. begin data. 1 0 3 1 1 3 9 -50 5 1 3 9 -50 5 1 3 4 3 203 1 4 -9 0 -4 1 98 78 104 2 1 98 78 104 2 1 98 78 104 2 1 3 50 -49 200 1 end data. weight by w. correlations variables = foo bar wiz bang /statistics=descriptives xprod . ]) AT_CHECK([pspp -O format=csv correlations1.sps], [0], [stdout]) mv stdout expout AT_CHECK([pspp -O format=csv correlations2.sps], [0], [expout]) AT_CLEANUP AT_SETUP([CORRELATIONS -- non-square]) AT_DATA([corr-ns.sps], [dnl set format = F11.3. data list notable list /foo * bar * wiz *. begin data. 1 1 6 2 2 5 3 3 4 4 4 3 5 5 2 6 6 1 end data. correlations variables = foo with bar wiz . ]) AT_CHECK([pspp -O format=csv corr-ns.sps], [0], [dnl Table: Correlations ,,bar,wiz foo,Pearson Correlation,1.000,-1.000 ,Sig. (2-tailed),.000,.000 ,N,6,6 ]) AT_CLEANUP dnl Checks for bug #38661. AT_SETUP([CORRELATIONS -- crash with WITH keyword]) AT_DATA([correlations.sps], [dnl DATA LIST LIST NOTABLE /a b c d e f g h i. . BEGIN DATA. 20 21 17 28 23 4.35 24 19 25 28 18 29 30 23 4.55 17 23 28 47 18 30 30 29 4.35 26 31 31 20 7 19 22 22 4.80 24 16 27 19 12 17 27 22 . 22 14 25 22 9 19 30 33 5 29 30 27 41 16 22 32 23 3.90 26 27 23 18 18 20 26 22 5.80 17 20 39 18 24 25 25 31 5.15 27 27 34 19 22 26 23 37 6 41 32 27 23 12 15 29 25 4.10 21 27 20 21 4 28 37 31 5.65 27 18 42 19 5 17 17 29 3.10 19 16 19 21 17 20 35 31 . 28 30 22 END DATA. CORRELATIONS VARIABLE=a f b WITH c g h i e d/STATISTICS=DESCRIPTIVES. ]) AT_CHECK([pspp -o pspp.csv correlations.sps]) # Check the output, ignoring the actual correlations values since # they look pretty nonsensical to me for this input (they include NaNs). AT_CHECK([sed '/a,Pearson/,$s/,\([[^,]]*\),.*/,\1,.../' pspp.csv], [0], [dnl Table: Descriptive Statistics ,Mean,Std. Deviation,N a,24.00,8.93,14.00 f,4.73,.85,12.00 b,14.50,6.41,14.00 c,21.71,4.98,14.00 g,24.86,6.09,14.00 h,23.57,6.30,14.00 i,27.79,6.73,14.00 e,27.21,4.95,14.00 d,27.93,5.23,14.00 Table: Correlations ,,c,g,h,i,e,d a,Pearson Correlation,... ,Sig. (2-tailed),... ,N,... f,Pearson Correlation,... ,Sig. (2-tailed),... ,N,... b,Pearson Correlation,... ,Sig. (2-tailed),... ,N,... ]) AT_CLEANUP dnl Checks for bug #40661 AT_SETUP([CORRELATIONS -- incorrect subtable selection]) AT_DATA([correlations.sps], [dnl set format = F12.4. set decimal = dot. data list notable list /var1 var2 var3 var4 var5 *. begin data. 7,6,9,2,3 9,12,8,5,8 8,9,7,8,6 8,8,9,10,8 7,6,4,5,3 7,9,8,2,1 9,8,11,,10 8,7,6,,5 6,7,6,,8 6,,3,,4 6,,7,3,3 5,4,2,7,8 9,8,6,11,10 5,6,2,2,4 8,7,6,8,7 10,13,8,12,10 7,8,7,11,2 8,7,7,9,6 10,11,11,8,1 5,8,6,9,9 8,7,5,5,6 5,7,2,1,8 9,8,8,13,6 5,8,5,6,4 ,7,5,4,5 ,8,4,4,3 ,6,4,9,5 8,11,9,12,3 9,11,8,10,6 10,10,7,8,1 6,6,3,8,9 10,9,7,12,2 6,8,,7,4 6,8,3,2,9 7,8,8,2,9 5,6,5,5,5 9,9,7,7,5 9,10,11,7,8 8,11,9,3,3 5,4,4,0,5 9,9,11,14,2 5,6,2,4,4 8,8,7,4,1 9,9,8,14, 6,8,7,2, 10,9,9,6, 8,8,10,9, 7,8,4,12, 6,6,6,7,1 5,7,7,4,10 9,10,10,13,4 9,11,9,8,7 10,13,12,6,8 8,11,6,8,5 7,8,7,12,2 6,7,4,1,10 5,4,5,6,10 7,8,6,12,10 6,5,3,9,2 7,8,8,7,2 5,4,4,9,8 5,7,6,3,9 10,10,9,13,1 8,10,9,5,4 8,9,8,8,7 7,9,9,6,7 10,9,7,12,6 10,13,12,12,4 7,10,9,7,2 6,8,7,11,6 8,11,5,13,2 7,10,6,12,8 10,10,9,7,9 9,12,6,7,10 6,6,8,2,9 10,9,12,13,10 8,9,8,3,6 8,7,6,4,10 8,7,10,12,2 7,6,8,2,7 8,11,6,9,4 6,6,7,8,2 6,7,3,11,4 5,6,3,0,5 10,10,11,15,6 5,4,7,6,8 5,4,4,1,3 6,9,8,1,6 10,11,10,15,8 7,10,4,11,7 9,12,8,6,3 10,10,11,15,2 10,9,9,15,3 6,6,8,5,1 5,7,7,0,3 9,8,10,6,8 9,8,11,11,4 8,10,7,3,4 7,8,7,3,3 8,9,10,13,8 end data. CORRELATION /VARIABLES = var1 var2 var3 WITH var4 var5 /PRINT = TWOTAIL NOSIG. CORRELATION /VARIABLES = var3 var4 var5 WITH var1 var2 /PRINT = TWOTAIL NOSIG. ]) AT_CHECK([pspp -O format=csv correlations.sps], [0], [Table: Correlations ,,var4,var5 var1,Pearson Correlation,.5693,-.0519 ,Sig. (2-tailed),.000,.623 ,N,93,92 var2,Pearson Correlation,.3792,-.0407 ,Sig. (2-tailed),.000,.698 ,N,95,93 var3,Pearson Correlation,.3699,-.0543 ,Sig. (2-tailed),.000,.603 ,N,95,94 Table: Correlations ,,var1,var2 var3,Pearson Correlation,.6964,.5615 ,Sig. (2-tailed),.000,.000 ,N,96,97 var4,Pearson Correlation,.5693,.3792 ,Sig. (2-tailed),.000,.000 ,N,93,95 var5,Pearson Correlation,-.0519,-.0407 ,Sig. (2-tailed),.623,.698 ,N,92,93 ]) AT_CLEANUP dnl Crash found by zzuf AT_SETUP([CORRELATIONS -- empty dataset]) AT_DATA([correlations.sps], [dnl data list list /a b c q g *. CORRELATIONS 'VARIABLES = a b.] ) AT_CHECK([pspp -o pspp.csv correlations.sps], [1], [ignore]) AT_CLEANUP dnl Another Crash found by zzuf AT_SETUP([CORRELATIONS -- empty dataset 2]) AT_DATA([correlations.sps], [dnl data list notable list /foo * bar * wiz bang *. begin data. 1 00 3 . 3 9 -50 . 98 78 104 . . 4 4 . 5 3 0 . end data. correlations variables = foo bar wiz bang /missing = listwise . ]) AT_CHECK([pspp -O format=csv correlations.sps], [1], [dnl correlations.sps:13: error: CORRELATIONS: The data for the chosen variables are all missing or empty. ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/reliability.at0000644000175000017500000001746613137223525016357 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([RELIABILITY]) AT_SETUP([RELIABILITY]) AT_DATA([reliability.sps], [dnl data list notable list /var1 * var2 * var6 * var7 * var8 * var9 * var11 * var12 * var15 * var16 * var17 * var19 * . begin data. 6 7 7 5 7 7 7 7 7 7 6 6 6 7 7 6 7 6 7 5 6 5 7 7 6 6 7 6 5 3 6 4 5 6 4 5 4 6 5 6 6 5 4 3 5 6 5 6 5 6 5 5 6 5 4 4 6 6 5 5 6 6 7 6 6 5 6 5 6 6 5 6 5 6 6 5 6 5 5 4 6 5 5 5 5 7 7 7 7 7 6 5 7 7 7 7 6 6 6 5 5 7 6 5 6 6 5 6 . . . . . . . . . . . . 6 6 5 5 5 6 6 4 6 5 5 5 7 7 7 6 7 6 7 6 6 6 7 6 4 7 6 6 6 5 5 4 4 5 5 6 5 6 3 5 4 1 4 6 2 3 3 2 3 6 6 5 6 2 4 2 2 4 4 5 6 6 7 5 6 5 7 6 5 6 6 5 6 5 6 6 5 6 6 6 6 4 5 5 5 7 7 . 6 6 6 5 6 6 6 6 5 7 5 5 4 6 7 6 5 4 6 5 7 7 7 6 7 7 7 6 7 7 7 6 3 6 5 6 5 7 7 3 4 7 5 7 6 7 7 6 5 6 5 5 6 6 6 6 5 5 6 5 5 5 5 4 5 5 5 6 6 6 7 4 5 6 6 6 6 5 5 6 6 5 6 6 4 4 5 4 5 6 4 5 5 6 7 6 6 7 7 5 6 6 6 5 5 6 5 7 4 6 6 5 7 7 5 6 . . . . . . . . . . . . 7 6 6 5 6 6 7 6 6 5 5 6 6 6 7 7 7 7 7 6 7 6 6 7 7 5 5 . 5 . 7 3 5 4 5 3 7 6 7 5 4 5 7 5 7 5 5 6 6 5 6 6 6 5 5 5 5 6 5 6 7 7 7 7 7 7 7 7 5 6 7 7 . . . . . . . . . . . . 5 5 6 7 5 6 6 4 6 6 6 5 6 6 5 7 5 6 7 5 6 5 4 6 7 6 7 6 7 5 6 7 7 6 6 6 5 6 5 6 5 6 7 2 5 7 3 7 6 6 5 6 5 6 6 6 6 6 5 6 7 6 7 6 6 6 6 6 6 7 6 7 7 7 6 5 6 6 7 7 7 4 6 5 3 7 7 6 6 7 7 7 6 6 6 4 3 5 3 4 3 3 3 3 3 3 3 5 5 7 7 7 5 7 6 2 6 7 6 7 7 7 7 7 7 7 7 6 7 7 7 6 6 5 7 4 4 4 5 6 5 5 4 5 4 7 7 4 4 3 6 3 5 3 4 5 7 7 7 7 7 7 7 7 7 7 7 5 3 6 5 5 4 5 4 4 5 5 3 5 6 7 6 6 6 7 7 6 6 6 7 6 2 5 4 6 3 2 2 2 2 7 2 2 4 6 6 5 5 5 6 5 5 6 6 5 5 7 4 5 6 6 6 5 6 6 5 6 5 7 7 5 6 5 6 5 5 4 5 4 4 5 6 5 6 4 5 5 5 4 5 5 7 6 6 5 5 6 7 5 6 5 7 6 5 6 6 5 4 5 5 3 4 5 5 5 5 7 6 4 4 5 6 5 6 4 4 6 6 6 6 6 5 7 7 6 5 5 6 6 6 6 7 6 7 6 6 5 6 7 6 5 7 6 7 6 7 6 7 7 5 5 6 6 5 6 6 5 5 5 6 5 6 7 7 5 5 6 6 5 6 5 6 6 6 6 6 6 5 5 5 5 6 4 5 3 4 7 6 5 5 7 7 6 6 6 6 5 6 7 6 7 6 6 7 7 7 5 6 5 5 5 5 4 2 7 5 4 6 5 5 2 5 6 4 6 6 7 7 5 6 6 7 6 6 7 5 7 5 6 7 6 6 3 5 7 6 6 5 6 6 6 6 3 5 5 5 6 6 6 4 5 4 7 7 4 7 4 5 5 5 7 4 4 . . . . . . . . . . . . 6 6 7 6 7 6 7 7 6 7 7 6 . . . . . . . . . . . . 5 6 5 7 6 5 6 6 5 6 4 6 5 5 5 5 4 5 5 5 7 5 5 5 6 6 6 4 5 4 6 6 6 4 5 4 6 5 7 4 6 4 6 5 6 6 6 3 5 7 6 5 5 5 5 5 6 7 6 6 5 5 7 7 5 5 6 6 5 5 5 7 5 6 7 6 7 5 6 4 6 7 6 7 4 5 5 5 6 5 6 5 6 6 5 6 6 5 5 5 6 3 4 5 5 4 5 3 6 6 6 5 5 5 4 3 4 5 5 5 6 7 7 6 2 3 6 6 6 5 7 7 6 7 5 5 6 6 6 5 6 6 6 6 6 7 7 6 7 7 7 5 5 6 6 6 6 6 6 6 7 6 6 7 6 6 6 6 5 6 6 6 3 5 6 6 5 5 4 6 4 6 5 6 6 5 6 5 6 6 5 5 6 4 6 5 4 6 7 4 5 6 5 5 6 7 6 4 6 5 7 6 7 7 6 5 6 7 7 6 7 6 7 7 7 6 6 6 6 6 6 4 5 6 7 7 5 6 4 4 3 3 5 3 3 1 5 6 3 2 3 3 7 7 5 6 6 7 7 6 7 7 7 7 5 6 6 6 7 5 4 5 4 7 6 7 3 6 5 4 3 3 3 5 5 6 3 4 5 7 6 4 6 5 5 6 6 7 5 6 5 7 6 6 6 6 6 5 6 7 7 6 7 7 5 6 7 7 7 7 6 5 7 7 6 7 6 6 5 6 7 7 6 5 6 6 6 7 7 7 7 6 6 7 6 7 7 7 4 6 4 7 3 6 5 5 4 3 5 6 5 5 7 5 4 6 7 5 4 6 6 5 5 5 6 4 6 5 7 6 5 5 5 6 . . . . . . . . . . . . . . . . . . . . . . . . 5 7 7 5 6 6 7 7 6 6 6 7 6 7 7 1 2 1 7 7 5 5 5 2 . . . . . . . . . . . . 3 7 4 6 4 7 4 6 4 7 4 7 5 7 3 5 5 6 7 5 4 7 7 4 4 7 7 5 4 6 7 7 6 5 4 4 6 6 2 2 6 4 6 5 5 1 5 2 5 5 6 4 5 4 6 5 5 6 5 5 . . . . . . . . . . . . 5 7 6 6 6 6 6 6 5 6 6 6 6 6 6 5 6 6 6 6 7 5 6 7 3 6 3 3 5 3 3 5 3 5 7 4 4 4 6 3 3 3 4 3 4 2 3 6 5 7 7 6 5 4 7 5 7 7 3 7 4 5 4 4 4 4 3 3 3 4 3 3 6 7 7 5 6 6 7 5 4 5 5 5 3 5 3 3 1 3 4 3 4 7 6 7 4 5 4 4 4 3 4 5 6 6 4 5 5 6 3 4 5 3 5 3 4 5 6 4 5 5 5 6 6 6 6 4 5 6 6 5 6 7 7 2 2 6 7 7 7 7 5 7 5 7 7 4 6 5 7 5 5 5 6 6 6 6 7 7 5 5 5 7 6 7 7 7 6 5 7 3 6 5 6 5 5 6 5 4 5 7 6 5 6 6 6 5 6 5 5 6 4 5 5 5 6 3 5 3 3 6 5 5 . . . . . . . . . . . . 5 6 6 4 4 4 5 3 5 5 2 6 5 6 7 5 5 6 6 5 5 6 6 6 6 7 7 6 4 7 7 6 7 5 6 7 6 6 5 4 5 2 7 6 6 5 6 6 2 2 2 2 2 2 3 2 3 1 1 2 end data. RELIABILITY /VARIABLES=var2 var8 var15 var17 var6 /SCALE('Everything') var6 var8 var15 var17 /MODEL=ALPHA. RELIABILITY /VARIABLES=var6 var8 var15 var17 /SCALE('Nothing') ALL /MODEL=SPLIT(2) . RELIABILITY /VARIABLES=var2 var6 var8 var15 var17 var19 /SCALE('Totals') var6 var8 var15 var17 /SUMMARY = total /STATISTICS = DESCRIPTIVES COVARIANCES . RELIABILITY /VARIABLES=var6 var8 var15 var17 . ]) AT_CHECK([pspp -o pspp.csv reliability.sps], [0], [reliability.sps:174: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented. No statistics will be produced. ]) AT_CHECK([cat pspp.csv], [0], [dnl Scale: Everything Table: Case Processing Summary ,,N,% Cases,Valid,131,92.91 ,Excluded,10,7.09 ,Total,141,100.00 Table: Reliability Statistics Cronbach's Alpha,N of Items .75,4 Scale: Nothing Table: Case Processing Summary ,,N,% Cases,Valid,131,92.91 ,Excluded,10,7.09 ,Total,141,100.00 Table: Reliability Statistics Cronbach's Alpha,Part 1,Value,.55 ,,N of Items,2 ,Part 2,Value,.63 ,,N of Items,2 ,Total N of Items,,4 Correlation Between Forms,,,.61 Spearman-Brown Coefficient,Equal Length,,.75 ,Unequal Length,,.75 Guttman Split-Half Coefficient,,,.75 reliability.sps:174: warning: RELIABILITY: The STATISTICS subcommand is not yet implemented. No statistics will be produced. Scale: Totals Table: Case Processing Summary ,,N,% Cases,Valid,131,92.91 ,Excluded,10,7.09 ,Total,141,100.00 Table: Reliability Statistics Cronbach's Alpha,N of Items .75,4 Table: Item-Total Statistics ,Scale Mean if Item Deleted,Scale Variance if Item Deleted,Corrected Item-Total Correlation,Cronbach's Alpha if Item Deleted var6,15.97,8.43,.51,.71 var8,16.56,7.86,.53,.70 var15,16.47,8.45,.56,.68 var17,16.60,8.00,.57,.67 Scale: ANY Table: Case Processing Summary ,,N,% Cases,Valid,131,92.91 ,Excluded,10,7.09 ,Total,141,100.00 Table: Reliability Statistics Cronbach's Alpha,N of Items .75,4 ]) AT_CLEANUP dnl This was causing a AT. AT_SETUP([RELIABILITY bad syntax]) AT_DATA([bad-syntax.sps], [dnl data list notable list /x * y *. begin data. 1 10 2 20 3 30 4 50 5 50 end data. * This syntax is incorrect reliability x y. ]) AT_CHECK([pspp -O format=csv bad-syntax.sps], [1], [ignore]) AT_CLEANUP dnl Checks for a crash when bad syntax followed scale specification. AT_SETUP([RELIABILITY bad syntax 2]) AT_DATA([bad-syntax.sps], [dnl new file. data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *. begin data. end data. * This syntax is incorrect reliability variables=f01 to f10/asdfj. ]) AT_CHECK([pspp -O format=csv bad-syntax.sps], [1], [ignore]) AT_CLEANUP dnl Checks for a crash when the active file was empty. Bug #38660. AT_SETUP([RELIABILITY crash with no data]) AT_DATA([reliability.sps], [dnl new file. data list notable list /f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 *. begin data. end data. reliability variables=f01 to f10. ]) AT_CHECK([pspp -O format=csv reliability.sps], [0], []) AT_CLEANUP dnl This is an example from doc/tutorial.texi dnl So if the results of this have to be changed in any way, dnl make sure to update that file. AT_SETUP([RELIABILITY tutorial example]) AT_DATA([tut-example.sps], [dnl get file='hotel.sav'. compute v3 = 6 - v3. compute v5 = 6 - v5. reliability variables = v1 v3 v4. ]) AT_CHECK([ln -s $top_srcdir/examples/hotel.sav .], [0]) AT_CHECK([pspp -O format=csv tut-example.sps], [0], [dnl Scale: ANY Table: Case Processing Summary ,,N,% Cases,Valid,17,100.00 ,Excluded,0,.00 ,Total,17,100.00 Table: Reliability Statistics Cronbach's Alpha,N of Items .81,3 ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/autorecode.at0000644000175000017500000001255713137223525016174 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([AUTORECODE procedure]) AT_SETUP([AUTORECODE numbers and short strings]) AT_DATA([autorecode.sps], [data list /X 1-5(a) Y 7. begin data. lasdj 1 asdfk 0 asdfj 2 asdfj 1 asdfk 2 asdfj 9 lajks 9 asdfk 0 asdfk 1 end data. autorecode x y into A B/descend. list. compute Z=trunc(y/2). autorecode z into W. list. ]) AT_CHECK([pspp -O format=csv autorecode.sps], [0], [Table: Reading 1 record from INLINE. Variable,Record,Columns,Format X,1,1- 5,A5 Y,1,7- 7,F1.0 Table: Data List X,Y,A,B lasdj,1,1.00,3.00 asdfk,0,3.00,4.00 asdfj,2,4.00,2.00 asdfj,1,4.00,3.00 asdfk,2,3.00,2.00 asdfj,9,4.00,1.00 lajks,9,2.00,1.00 asdfk,0,3.00,4.00 asdfk,1,3.00,3.00 Table: Data List X,Y,A,B,Z,W lasdj,1,1.00,3.00,.00,1.00 asdfk,0,3.00,4.00,.00,1.00 asdfj,2,4.00,2.00,1.00,2.00 asdfj,1,4.00,3.00,.00,1.00 asdfk,2,3.00,2.00,1.00,2.00 asdfj,9,4.00,1.00,4.00,3.00 lajks,9,2.00,1.00,4.00,3.00 asdfk,0,3.00,4.00,.00,1.00 asdfk,1,3.00,3.00,.00,1.00 ]) AT_CLEANUP AT_SETUP([AUTORECODE long strings and check the value labels]) AT_DATA([ar.sps], [data list notable list /s (a16) x *. begin data. widgets 1 thingummies 2 oojars 3 widgets 4 oojars 5 thingummies 6 oojimiflips 7 end data. autorecode s into new. list. display dictionary. ]) AT_CHECK([pspp -O format=csv ar.sps], [0], [Table: Data List s,x,new widgets ,1.00,4.00 thingummies ,2.00,3.00 oojars ,3.00,1.00 widgets ,4.00,4.00 oojars ,5.00,1.00 thingummies ,6.00,3.00 oojimiflips ,7.00,2.00 Variable,Description,Position s,Format: A16,1 x,Format: F8.2,2 new,"Format: F8.2 Value,Label 1.00,oojars 2.00,oojimiflips 3.00,thingummies 4.00,widgets",3 ]) AT_CLEANUP AT_SETUP([AUTORECODE group subcommand]) AT_DATA([ar-group.sps], [data list notable list /x * y *. begin data. 11 10 12 12 13 15 14 11 15 12 16 18 end data. autorecode x y into a b /group. list. ]) AT_CHECK([pspp -O format=csv ar-group.sps], [0], [Table: Data List x,y,a,b 11.00,10.00,2.00,1.00 12.00,12.00,3.00,3.00 13.00,15.00,4.00,6.00 14.00,11.00,5.00,2.00 15.00,12.00,6.00,3.00 16.00,18.00,7.00,8.00 ]) AT_CLEANUP AT_SETUP([AUTORECODE group - string variables]) AT_DATA([strings.sps], [data list notable list /x (a8) y (a16). begin data. fred bert charlie " " delta echo " " windows " " nothing end data. autorecode x y into a b /group. delete variables x y. list. ]) AT_CHECK([pspp -O format=csv strings.sps], [0], [Table: Data List a,b 7.00,3.00 4.00,1.00 5.00,6.00 2.00,9.00 2.00,8.00 ]) AT_CLEANUP dnl Tests for a crash which happened when the /GROUP subcommand dnl appeared with string variables of different widths. AT_SETUP([AUTORECODE group vs. strings]) AT_DATA([ar-strings.sps], [data list notable list /a (a12) b (a6). begin data. one nine two ten three eleven four nought end data. autorecode a b into x y /group. list. ]) AT_CHECK([pspp -O format=csv ar-strings.sps], [0], [dnl Table: Data List a,b,x,y one ,nine ,5.00,3.00 two ,ten ,8.00,6.00 three ,eleven,7.00,1.00 four ,nought,2.00,4.00 ]) AT_CLEANUP AT_SETUP([AUTORECODE /blank]) AT_DATA([auto-blank.sps], [dnl data list notable list /x (a8) y * z (a16). begin data. one 2 fred two 4 "" "" 4 fred "" 2 charliebrown three 2 charliebrown end data. autorecode variables x y z into a b c /blank=missing. list a b c y. ]) AT_CHECK([pspp -O format=csv auto-blank.sps], [0], [dnl Table: Data List a,b,c,y 1.00,1.00,2.00,2.00 3.00,2.00,. ,4.00 . ,2.00,2.00,4.00 . ,1.00,1.00,2.00 2.00,1.00,1.00,2.00 ]) AT_CLEANUP dnl AUTORECODE had a use-after-free error when TEMPORARY was in use. dnl Bug #32757. AT_SETUP([AUTORECODE with TEMPORARY]) AT_DATA([autorecode.sps], [data list /X 1-5(a) Y 7. begin data. lasdj 1 asdfk 0 asdfj 2 asdfj 1 asdfk 2 asdfj 9 lajks 9 asdfk 0 asdfk 1 end data. temporary. select if y > 1. autorecode x y into A B/descend. list. ]) AT_CHECK([pspp -O format=csv autorecode.sps], [0], [Table: Reading 1 record from INLINE. Variable,Record,Columns,Format X,1,1- 5,A5 Y,1,7- 7,F1.0 Table: Data List X,Y,A,B lasdj,1,. ,. @&t@ asdfk,0,2.00,. @&t@ asdfj,2,3.00,2.00 asdfj,1,3.00,. @&t@ asdfk,2,2.00,2.00 asdfj,9,3.00,1.00 lajks,9,1.00,1.00 asdfk,0,2.00,. @&t@ asdfk,1,2.00,. @&t@ ]) AT_CLEANUP dnl For compatibility, make sure that /INTO (with leading slash) is accepted dnl (bug #48762) AT_SETUP([AUTORECODE with /INTO]) AT_DATA([autorecode.sps], [data list list notable /x . begin data. 1 8 -901 4 1 99 8 end data. autorecode x /into y. list. ]) AT_CHECK([pspp -O format=csv autorecode.sps], [0], [Table: Data List x,y 1.00,2.00 8.00,4.00 -901.00,1.00 4.00,3.00 1.00,2.00 99.00,5.00 8.00,4.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/graph.at0000644000175000017500000001366513137223525015144 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([GRAPH]) AT_SETUP([GRAPH simple scatterplot]) AT_DATA([scatterplot.sps],[ * Simple Scatterplot test NEW FILE. INPUT PROGRAM. LOOP #i = 1 to 100. COMPUTE Age = RV.NORMAL(40,10). END CASE. END LOOP. END FILE. END INPUT PROGRAM. COMPUTE Size = Age * 3 + 50. GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH Size. ]) AT_CHECK([pspp -O format=csv scatterplot.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([GRAPH Scatter and Histogram]) AT_DATA([scatterlong.sps],[ NEW FILE. INPUT PROGRAM. LOOP #i = 1 to 10000. COMPUTE Age = RV.NORMAL(40,10). COMPUTE CityNum = TRUNC(UNIFORM(2.95)). END CASE. END LOOP. END FILE. END INPUT PROGRAM. COMPUTE Size = Age * 3 + 50 + 50*CityNum. STRING City (a20). Recode CityNum (0 = "Madrid") (1 = "Paris") (ELSE = "Stockholm") into City. GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH Size GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH CityNum GRAPH /SCATTERPLOT = CityNum WITH Age GRAPH /SCATTERPLOT = CityNum WITH Size GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH Size BY City GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH Size BY CityNum ADD VALUE LABELS /CityNum 1 'Rio' 2 'Tokyo' 0 'Mumbai'. GRAPH /SCATTERPLOT(BIVARIATE) = Age WITH Size BY CityNum GRAPH /HISTOGRAM = Age. ]) AT_CHECK([pspp -O format=pdf scatterlong.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([GRAPH missing values don't crash]) AT_DATA([scatter.sps], [dnl data list list /x * y *. begin data. 1 0 2 0 . 0 3 1 4 1 5 . 6 1 end data. graph /scatterplot = x with y. graph /histogram = x. ]) AT_CHECK([pspp -o pspp.pdf scatter.sps]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP AT_SETUP([GRAPH missing=VARIABLE no crash]) AT_DATA([scatter.sps], [dnl data list list /x * y *. begin data. 1 0 2 0 . 0 3 1 4 1 5 . 6 1 end data. graph /scatterplot = x with y /missing = VARIABLE. graph /histogram = x /missing = VARIABLE. ]) AT_CHECK([pspp -o pspp.pdf scatter.sps]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP AT_SETUP([GRAPH missing value in by variable]) AT_DATA([scatter.sps], [dnl data list list /x * y * z *. begin data. 1 0 9 2 0 9 . 0 9 3 1 . 4 1 8 5 . 8 6 1 8 end data. graph /scatterplot = x with y by z /missing = VARIABLE. graph /scatterplot = x with y by z. ]) AT_CHECK([pspp -o pspp.pdf scatter.sps]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP AT_SETUP([GRAPH histogram with null data]) AT_DATA([null-hist.sps], [dnl data list list /x *. begin data. 1109 . end data. graph /histogram = x. ]) AT_CHECK([pspp -o pspp.pdf null-hist.sps], [0], [ignore]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP AT_SETUP([GRAPH histogram all missing]) AT_DATA([null-hist.sps], [dnl data list list /x *. begin data. . end data. graph /histogram = x. ]) AT_CHECK([pspp null-hist.sps], [0], [ignore]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP AT_SETUP([GRAPH barcharts]) AT_CHECK([ln -s $top_srcdir/examples/physiology.sav .], [0]) AT_CHECK([ln -s $top_srcdir/examples/repairs.sav .], [0]) AT_DATA([barchart.sps], [dnl GET FILE="physiology.sav". GRAPH /BAR = COUNT BY SEX. GRAPH /BAR = MEAN(height) BY SEX. NEW FILE. GET FILE="repairs.sav". GRAPH /BAR = MEAN (mtbf) BY factory. COMPUTE R = TRUNC(RV.UNIFORM(1,5)). GRAPH /BAR = MEAN (mtbf) BY factory BY R. ]) AT_CHECK([pspp -o pspp.pdf barchart.sps], [0], [ignore]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP AT_SETUP([GRAPH barchart arity]) AT_DATA([barchart.sps], [dnl data list notable list /x y z*. begin data 1 1 3 2 1 4 3 1 3 4 1 4 5 . 3 6 2 4 7 2 3 8 2 4 9 2 3 10 2 4 end data. * This line is invalid GRAPH /BAR = COUNT(x) BY y. ]) AT_CHECK([pspp -o pspp.pdf barchart.sps], [1], [ignore]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP AT_SETUP([GRAPH barchart bad syntax]) AT_DATA([barchart.sps], [dnl data list notable list /x y z*. begin data 1 1 3 2 1 4 3 1 3 4 1 4 5 . 3 6 2 4 7 2 3 8 2 4 9 2 3 10 2 4 end data. * This line is invalid GRAPH /BAR = SCROD BY y. ]) AT_CHECK([pspp -o pspp.pdf barchart.sps], [1], [ignore]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP AT_SETUP([GRAPH barchart full]) AT_DATA([barchart.sps], [dnl data list notable list /x y z*. begin data 1 1 3 2 1 4 3 1 3 4 1 4 5 . 3 6 2 4 7 2 3 8 2 4 9 2 3 10 2 4 end data. * This line is invalid GRAPH /BAR = COUNT by z. GRAPH /BAR = CUFREQ by z. GRAPH /BAR = PCT by z. GRAPH /BAR = CUPCT by z. GRAPH /BAR = MEAN(y) BY z. GRAPH /BAR = SUM(y) BY z. GRAPH /BAR = MAXIMUM(y) BY z. GRAPH /BAR = MINIMUM(y) BY z. GRAPH /BAR = MEAN(y) BY z BY y. GRAPH /BAR = SUM(y) BY z BY y. GRAPH /BAR = MAXIMUM(y) BY z BY y. GRAPH /BAR = MINIMUM(y) BY z BY y. ]) AT_CHECK([pspp -o pspp.pdf barchart.sps], [0], [ignore]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUP AT_SETUP([GRAPH buggy syntax]) AT_DATA([barchart.sps], [dnl data list notable list /x y z*. begin data 1 1 3 2 1 4 10 2 4 end data. GRAPH /BAR = MINIMUM({) BY z BY y. ]) AT_CHECK([pspp -o pspp.pdf barchart.sps], [1], [ignore]) dnl Ignore output -- this is just a no-crash check. AT_CLEANUPpspp-1.0.1/tests/language/stats/roc.at0000644000175000017500000001004313146355723014617 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([ROC]) AT_SETUP([ROC, free distribution]) AT_DATA([roc.sps], [dnl set format F10.3. data list notable list /x * y * w * a *. begin data. 1 1 2 1 1 2 28 0 2 3 4 1 2 4 14 0 3 5 10 1 . . 1 0 3 1 5 0 4 2 14 1 4 3 2 0 5 4 20 1 5 4 20 . 5 5 1 0 end data. weight by w. roc x by a (1) /plot = none /print = se coordinates /criteria = testpos(large) distribution(free) ci(99) /missing = exclude . ]) AT_CHECK([pspp -o pspp.csv roc.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Case Summary ,Valid N (listwise), a,Unweighted,Weighted Positive,5,50.000 Negative,5,50.000 Table: Area Under the Curve (x) ,,,Asymp. 99% Confidence Interval, Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound .910,.030,.000,.839,.981 Table: Coordinates of the Curve (x) Positive if greater than or equal to,Sensitivity,1 - Specificity .000,1.000,1.000 1.500,.960,.440 2.500,.880,.160 3.500,.680,.060 4.500,.400,.020 6.000,.000,.000 ]) AT_CLEANUP AT_SETUP([ROC, negative exponential distribution]) AT_DATA([roc.sps], [dnl set format F10.3. data list notable list /x * y * w * a *. begin data. 1 1 2 1 1 2 28 0 2 3 4 1 2 4 14 0 3 5 10 1 . . 1 0 3 1 5 0 4 2 14 1 4 3 2 0 5 4 20 1 5 4 20 . 5 5 1 0 end data. weight by w. roc x y by a (1) /plot = curve(reference) /print = se coordinates /criteria = testpos(large) distribution(negexpo) ci(95) /missing = exclude . ]) AT_CHECK([pspp -o pspp.csv roc.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Case Summary ,Valid N (listwise), a,Unweighted,Weighted Positive,5,50.000 Negative,5,50.000 Table: Area Under the Curve ,,,,Asymp. 95% Confidence Interval, Variable under test,Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound x,.910,.030,.000,.860,.960 y,.697,.052,.001,.611,.783 Table: Coordinates of the Curve Test variable,Positive if greater than or equal to,Sensitivity,1 - Specificity x,.000,1.000,1.000 ,1.500,.960,.440 ,2.500,.880,.160 ,3.500,.680,.060 ,4.500,.400,.020 ,6.000,.000,.000 y,.000,1.000,1.000 ,1.500,.960,.900 ,2.500,.680,.340 ,3.000,.600,.340 ,3.500,.600,.300 ,4.500,.200,.020 ,6.000,.000,.000 ]) AT_CLEANUP AT_SETUP([ROC, with anomaly]) AT_DATA([roc.sps], [dnl set format F10.3. data list notable list /x * a * comment (a20). begin data. 0 1 "" 0 0 "" 1 1 "" 1 0 "" 2 1 "" 2 0 "" 5 1 "" 5 0 "" 10 1 "" 10 0 "" 15 1 "" 15 0 "" 20 1 "" 20 1 "" 22 0 "here and" 22 0 "here is the anomaly" 25 1 "" 25 0 "" 30 1 "" 30 0 "" 35 1 "" 35 0 "" 38 1 "" 38 0 "" 39 1 "" 39 0 "" 40 1 "" 40 0 "" end data. roc x by a (1) /plot = none print = se . ]) AT_CHECK([pspp -o pspp.csv roc.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Case Summary ,Valid N (listwise), a,Unweighted,Weighted Positive,14,14.000 Negative,14,14.000 Table: Area Under the Curve (x) ,,,Asymp. 95% Confidence Interval, Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound .490,.111,.927,.307,.673 ]) AT_CLEANUP AT_SETUP([ROC crash on no state variable]) AT_DATA([roc.sps], [dnl data list notable list /x * y * w * a *. begin data. 5 5 1 0 end data. roc x y By(a (1) . ]) AT_CHECK([pspp -o pspp.csv roc.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([ROC crash on invalid syntax]) AT_DATA([roc.sps], [dnl data list notable list /x * y * a *. bggin data. 1 1 2 1 2 28 end data. roc x y by a (1) /criteria = ci(y5) ]) AT_CHECK([pspp -O format=csv roc.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/stats/descriptives.at0000644000175000017500000002427213137223525016543 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([DESCRIPTIVES procedure]) AT_SETUP([DESCRIPTIVES basics]) AT_DATA([descriptives.sps], [title 'Test DESCRIPTIVES procedure'. data list / V0 to V16 1-17. begin data. 12128989012389023 34128080123890128 56127781237893217 78127378123793112 90913781237892318 37978547878935789 52878237892378279 12377912789378932 26787654347894348 29137178947891888 end data. descript all/stat=all/format=serial. ]) AT_CHECK([pspp -O format=csv descriptives.sps], [0], [Title: Test DESCRIPTIVES procedure Table: Reading 1 record from INLINE. Variable,Record,Columns,Format V0,1,1- 1,F1.0 V1,1,2- 2,F1.0 V2,1,3- 3,F1.0 V3,1,4- 4,F1.0 V4,1,5- 5,F1.0 V5,1,6- 6,F1.0 V6,1,7- 7,F1.0 V7,1,8- 8,F1.0 V8,1,9- 9,F1.0 V9,1,10- 10,F1.0 V10,1,11- 11,F1.0 V11,1,12- 12,F1.0 V12,1,13- 13,F1.0 V13,1,14- 14,F1.0 V14,1,15- 15,F1.0 V15,1,16- 16,F1.0 V16,1,17- 17,F1.0 Table: Valid cases = 10; cases with missing value(s) = 0. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum V0,10,0,3.80,.84,2.66,7.07,-.03,1.33,.89,.69,8.00,1.00,9.00,38.00 V1,10,0,4.60,.96,3.03,9.16,-1.39,1.33,-.03,.69,9.00,.00,9.00,46.00 V2,10,0,4.10,1.16,3.67,13.43,-2.02,1.33,.48,.69,8.00,1.00,9.00,41.00 V3,10,0,4.10,.87,2.77,7.66,-2.05,1.33,.42,.69,7.00,1.00,8.00,41.00 V4,10,0,7.00,.47,1.49,2.22,7.15,1.33,-2.52,.69,5.00,3.00,8.00,70.00 V5,10,0,4.90,1.03,3.25,10.54,-1.40,1.33,-.20,.69,9.00,.00,9.00,49.00 V6,10,0,5.90,.80,2.51,6.32,-.29,1.33,-.96,.69,7.00,1.00,8.00,59.00 V7,10,0,4.70,1.10,3.47,12.01,-1.99,1.33,-.16,.69,9.00,.00,9.00,47.00 V8,10,0,4.10,1.10,3.48,12.10,-1.93,1.33,.37,.69,9.00,.00,9.00,41.00 V9,10,0,4.30,.87,2.75,7.57,-.87,1.33,.73,.69,8.00,1.00,9.00,43.00 V10,10,0,5.50,.85,2.68,7.17,-1.84,1.33,-.33,.69,7.00,2.00,9.00,55.00 V11,10,0,6.50,.78,2.46,6.06,-1.28,1.33,-.89,.69,6.00,3.00,9.00,65.00 V12,10,0,7.90,.60,1.91,3.66,5.24,1.33,-2.21,.69,6.00,3.00,9.00,79.00 V13,10,0,4.30,.99,3.13,9.79,-1.25,1.33,.33,.69,9.00,.00,9.00,43.00 V14,10,0,3.60,1.01,3.20,10.27,-.96,1.33,.81,.69,9.00,.00,9.00,36.00 V15,10,0,3.70,.92,2.91,8.46,-1.35,1.33,.71,.69,7.00,1.00,8.00,37.00 V16,10,0,6.40,.91,2.88,8.27,-1.14,1.33,-.92,.69,7.00,2.00,9.00,64.00 ]) AT_CLEANUP m4_define([DESCRIPTIVES_MISSING_DATA], [data list notable / V1 TO V3 1-3. mis val v1 to v3 (1). begin data. 111 1 1 1 112 123 234 end data. ]) AT_SETUP([DESCRIPTIVES -- excluding missing data]) AT_DATA([descriptives.sps], [DESCRIPTIVES_MISSING_DATA descript all/stat=all/format=serial. ]) AT_CHECK([pspp -O format=csv descriptives.sps], [0], [Table: Valid cases = 7; cases with missing value(s) = 6. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum V1,1,6,2.00,. ,. ,. ,. ,. ,. ,. ,.00,2.00,2.00,2.00 V2,2,5,2.50,.50,.71,.50,. ,. ,. ,. ,1.00,2.00,3.00,5.00 V3,3,4,3.00,.58,1.00,1.00,. ,. ,.00,1.22,2.00,2.00,4.00,9.00 ]) AT_CLEANUP AT_SETUP([DESCRIPTIVES -- including missing data]) AT_DATA([descriptives.sps], [DESCRIPTIVES_MISSING_DATA descript all/stat=all/format=serial/missing=include. ]) AT_CHECK([pspp -O format=csv descriptives.sps], [0], [Table: Valid cases = 7; cases with missing value(s) = 3. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum V1,5,2,1.20,.20,.45,.20,5.00,2.00,2.24,.91,1.00,1.00,2.00,6.00 V2,5,2,1.60,.40,.89,.80,.31,2.00,1.26,.91,2.00,1.00,3.00,8.00 V3,5,2,2.20,.58,1.30,1.70,-1.49,2.00,.54,.91,3.00,1.00,4.00,11.00 ]) AT_CLEANUP AT_SETUP([DESCRIPTIVES -- excluding missing data listwise]) AT_DATA([descriptives.sps], [DESCRIPTIVES_MISSING_DATA descript all/stat=all/format=serial/missing=listwise. ]) AT_CHECK([pspp -O format=csv descriptives.sps], [0], [Table: Valid cases = 1; cases with missing value(s) = 6. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum V1,1,0,2.00,. ,. ,. ,. ,. ,. ,. ,.00,2.00,2.00,2.00 V2,1,0,3.00,. ,. ,. ,. ,. ,. ,. ,.00,3.00,3.00,3.00 V3,1,0,4.00,. ,. ,. ,. ,. ,. ,. ,.00,4.00,4.00,4.00 ]) AT_CLEANUP AT_SETUP([DESCRIPTIVES -- including missing data listwise]) AT_DATA([descriptives.sps], [DESCRIPTIVES_MISSING_DATA descript all/stat=all/format=serial/missing=listwise include. ]) AT_CHECK([pspp -O format=csv descriptives.sps], [0], [Table: Valid cases = 4; cases with missing value(s) = 3. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum V1,4,0,1.25,.25,.50,.25,4.00,2.62,2.00,1.01,1.00,1.00,2.00,5.00 V2,4,0,1.75,.48,.96,.92,-1.29,2.62,.85,1.01,2.00,1.00,3.00,7.00 V3,4,0,2.50,.65,1.29,1.67,-1.20,2.62,.00,1.01,3.00,1.00,4.00,10.00 ]) AT_CLEANUP AT_SETUP([DESCRIPTIVES bug calculating mean only]) AT_DATA([descriptives.sps], [SET FORMAT F8.3. data list notable / X 1. begin data. 0 1 2 3 4 5 end data. descript all/stat=mean. ]) AT_CHECK([pspp -O format=csv descriptives.sps], [0], [Table: Valid cases = 6; cases with missing value(s) = 0. Variable,N,Mean X,6,2.500 ]) AT_CLEANUP dnl Git history shows that this was probably a bug in the PSPP dnl core regarding multipass procedures, not anything specific dnl to DESCRIPTIVES. AT_SETUP([DESCRIPTIVES bug with TEMPORARY]) AT_DATA([descriptives.sps], [dnl DATA LIST LIST NOTABLE /id * abc *. BEGIN DATA. 1 3.5 2 2.0 3 2.0 4 3.5 5 3.0 6 4.0 7 5.0 END DATA. TEMPORARY. SELECT IF id < 7 . DESCRIPTIVES /VAR=abc. ]) AT_CHECK([pspp -O format=csv descriptives.sps], [0], [dnl Table: Valid cases = 6; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum abc,6,3.00,.84,2.00,4.00 ]) AT_CLEANUP AT_SETUP([DESCRIPTIVES -- Z scores]) AT_DATA([descriptives.sps], [dnl DATA LIST LIST NOTABLE /a b. BEGIN DATA. 1 50 2 60 3 70 END DATA. DESCRIPTIVES /VAR=a b /SAVE. LIST. ]) AT_CHECK([pspp -O format=csv descriptives.sps], [0], [dnl Table: Mapping of variables to corresponding Z-scores. Source,Target a,Za b,Zb Table: Valid cases = 3; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum a,3,2.00,1.00,1.00,3.00 b,3,60.00,10.00,50.00,70.00 Table: Data List a,b,Za,Zb 1.00,50.00,-1.00,-1.00 2.00,60.00,.00,.00 3.00,70.00,1.00,1.00 ]) AT_CLEANUP AT_SETUP([DESCRIPTIVES -- Z scores with SPLIT FILE]) AT_DATA([descriptives.sps], [dnl DATA LIST LIST NOTABLE /group a b. BEGIN DATA. 1 1 50 1 2 60 1 3 70 2 100 6000 2 200 7000 2 400 9000 2 500 10000 END DATA. SPLIT FILE BY group. DESCRIPTIVES /VAR=a b /SAVE. LIST. ]) AT_CHECK([pspp -O format=csv descriptives.sps], [0], [dnl Table: Mapping of variables to corresponding Z-scores. Source,Target a,Za b,Zb Variable,Value,Label group,1.00, Table: Valid cases = 3; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum a,3,2.00,1.00,1.00,3.00 b,3,60.00,10.00,50.00,70.00 Variable,Value,Label group,2.00, Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum a,4,300.00,182.57,100.00,500.00 b,4,8000.00,1825.74,6000.00,10000.00 Variable,Value,Label group,1.00, Table: Data List group,a,b,Za,Zb 1.00,1.00,50.00,-1.00,-1.00 1.00,2.00,60.00,.00,.00 1.00,3.00,70.00,1.00,1.00 Variable,Value,Label group,2.00, Table: Data List group,a,b,Za,Zb 2.00,100.00,6000.00,-1.10,-1.10 2.00,200.00,7000.00,-.55,-.55 2.00,400.00,9000.00,.55,.55 2.00,500.00,10000.00,1.10,1.10 ]) AT_CLEANUP dnl Ideally DESCRIPTIVES would not make temporary transformations permanent dnl as it does now (bug #38786), so these results are imperfect. However, dnl this test does verify that DESCRIPTIVES does not crash in this situation dnl (as it once did). AT_SETUP([DESCRIPTIVES -- Z scores bug with TEMPORARY]) AT_DATA([descriptives.sps], [dnl DATA LIST LIST NOTABLE /id abc. BEGIN DATA. 1 3.5 2 2.0 3 2.0 4 3.5 5 3.0 6 4.0 7 5.0 END DATA. TEMPORARY. SELECT IF id < 7 . DESCRIPTIVES /VAR=abc/SAVE. LIST. ]) AT_CHECK([pspp -O format=csv descriptives.sps], [0], [dnl descriptives.sps:15: warning: DESCRIPTIVES: DESCRIPTIVES with Z scores ignores TEMPORARY. Temporary transformations will be made permanent. Table: Mapping of variables to corresponding Z-scores. Source,Target abc,Zabc Table: Valid cases = 6; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum abc,6,3.00,.84,2.00,4.00 Table: Data List id,abc,Zabc 1.00,3.50,.60 2.00,2.00,-1.20 3.00,2.00,-1.20 4.00,3.50,.60 5.00,3.00,.00 6.00,4.00,1.20 ]) AT_CLEANUP dnl This test was supplied by Mindaugus as part of the report for bug #42012. AT_SETUP([DESCRIPTIVES -- Z scores with FILTER]) AT_DATA([descriptives.sps], [dnl DATA LIST LIST/filter1 filter2 x. BEGIN DATA. 0,0,300 0,1,200 0,1,100 1,0,5 1,0,4 1,1,3 1,1,2 1,1,1 END DATA. FILTER OFF. SPLIT FILE OFF. DESCRIPTIVES /VARIABLES=X /SAVE. FILTER BY filter1. SPLIT FILE OFF. DESCRIPTIVES /VARIABLES=X /SAVE. FILTER OFF. SORT CASES BY filter1. SPLIT FILE BY filter1. DESCRIPTIVES /VARIABLES=X /SAVE. FILTER BY filter2. SPLIT FILE BY filter1. DESCRIPTIVES /VARIABLES=X /SAVE. FILTER OFF. SORT CASES BY filter1 filter2. SPLIT FILE BY filter1 filter2. DESCRIPTIVES /VARIABLES=X /SAVE. EXECUTE. SPLIT FILE OFF. LIST. ]) AT_CHECK([pspp -o pspp.csv descriptives.sps]) AT_CHECK([sed -n '/Table: Data List/,$p' < pspp.csv], [0], [dnl Table: Data List filter1,filter2,x,Zx,ZSC001,ZSC002,ZSC003,ZSC004 .00,.00,300.00,1.94,. ,1.00,. ,. @&t@ .00,1.00,200.00,1.07,. ,.00,.71,.71 .00,1.00,100.00,.20,. ,-1.00,-.71,-.71 1.00,.00,5.00,-.62,1.26,1.26,. ,.71 1.00,.00,4.00,-.63,.63,.63,. ,-.71 1.00,1.00,3.00,-.64,.00,.00,1.00,1.00 1.00,1.00,2.00,-.65,-.63,-.63,.00,.00 1.00,1.00,1.00,-.66,-1.26,-1.26,-1.00,-1.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/factor.at0000644000175000017500000016474013137223525015322 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([FACTOR procedure]) AT_SETUP([FACTOR extraction=paf method=correlation]) dnl This example is based on data from http://www.ats.ucla.edu/stat/Spss/output/factor1.htm AT_DATA([factor.sps], [set format = F11.3. data list notable fixed /question13 to question24 1-12. begin data. 555555535543 544453434443 545555544444 444442444433 554545554554 554455454455 555554555244 554455544443 555554434344 544454544344 555545555555 555454544455 555445544455 455544443343 544454344344 555555555455 555554454455 555555554445 555555554555 545534553343 555555535554 555544444445 545544334433 554555434443 555555544454 555445545453 555554434244 444444433233 545555454443 554443434243 444534334333 454534444332 555455353444 555544443243 555554543243 555544444343 445444434443 555555555544 444444434340 455044434334 555555533433 554554535040 434533334232 443232444432 555555555555 555555554544 555544444445 444224343344 444554454355 444434332433 555555555555 043243432433 444443334333 453443433434 443342332232 554434434533 444344434443 444444434443 554552434133 453334332432 444445554444 431232332223 555555555544 544445543443 444455535543 444444444433 444444543243 555431443333 444443433433 444433433443 454334444433 111111111544 444423442433 555443333353 555543334344 055454400000 555454444355 555555555555 055544533333 555554555554 555555535554 555555545355 555555555455 555544545543 555554404455 555454435454 555555535554 555555555555 555443433544 555554435454 555555545344 555555535454 555445535453 444444333544 555554434444 455454434454 555555535555 554545534455 555555555443 454443434444 555553334444 555554545454 555555555555 555554554454 555555555555 544545534544 555555534454 555555555455 555554535544 555555535555 555451234443 555444444544 555544434354 555545533444 555554534443 545554434554 554433444433 544432233524 411111111111 445423442233 555543433344 444443342233 555555534455 545442434223 554553352333 544554554445 555555435455 444334304234 455453444434 444443443245 555552232132 555434324345 544444434344 534344344444 445555555344 444343442132 444444434344 444444554334 444545444333 434442343224 443443433233 555551555554 544544434444 454544434433 555555535434 555555555555 455544444444 454444434233 555555544344 454445544445 444444554434 555455455443 555454425444 444454434443 544443433233 444543434433 555553545354 544444444433 444445434433 555533353333 555434234333 444314222411 555555555555 455545534443 455045534433 555545444444 455544243543 444421113343 554444534444 555555544554 555334434452 555544543455 555554434554 555445554454 555555545344 555555555555 554543334245 554441233333 555554334545 555555535544 555555554554 555445444543 444424544432 444425544333 555434344443 555533233223 544433442343 555555555555 555445452234 555444555444 555444544455 555544354554 545445555555 555555555555 455443342232 555555544454 455534443455 555555555055 444554333244 444445434543 555554544455 444443444434 444444434445 334231314323 444444434433 555554444443 444444434443 555455434444 444444444444 555455435455 444444434344 444543433232 544443334454 555544433244 534443324224 555555544444 444443434444 555553444344 443434443333 444444434333 554445444343 444443344434 445555544543 555554443443 322232403322 444444444433 444445444443 444454534445 544344444344 554445534544 555555555554 555544432333 444444444443 555555555554 455555555554 555555555543 555555555544 555554445555 444335544455 555555555555 555454444454 555455544454 444445444444 555555555555 555455454554 555454544554 555555555455 555555554444 444444544434 334334443333 422224222211 121512011111 443444432332 434335533344 444443543433 554454443453 555555545454 555555555344 555555555554 555555334555 454445554444 454545534444 555554555444 455444534455 555544554544 444444444444 555424423133 222433443224 544544532344 545554544544 555532544144 444432343433 434545554545 444344505443 555555555544 555554555344 444531113112 555554333133 455433233233 354354434345 454534433433 433112332321 555445433333 454343434143 555554445555 455423334322 443333332222 444443444443 553432224134 444223432233 454324425444 344434514443 555552415255 354332543353 444531333233 443433334133 444444444433 444444445533 445133212223 343433432213 442333333332 345455535244 443211121122 555445444444 555555544344 453243332232 443543422533 554444434344 554444333444 555555335343 444231121133 454433332233 455524434244 554433224354 555455555444 454444424444 554242232134 555553315443 555553333454 455421434211 111111151111 454443203123 454243334132 355332213144 554534334134 555543434355 555543433255 444441223334 555443143255 444444444454 444442323544 454443434343 445453434444 454455554433 554532342234 444442243233 444442343334 555443433444 555543253444 554554444455 555543355344 555444445444 434443204222 444432444234 222142441111 111111141111 334334454433 555354552543 433411122112 455534504444 543211224233 344333332532 344443233333 444424432434 555555544454 555555554544 555444444444 555443533443 555554544344 555554444444 544543433343 444445434444 555555555555 555443333233 545444534454 555454434343 555453434544 544334444333 555443443444 555555534544 444444444433 555543433343 555444445334 555543442433 455444334443 554443434443 555254500544 555444433344 555555535544 444443532232 544443433433 555555535544 555455454444 555455445544 544444534433 555555555554 555553533444 555555555554 555554434343 555455544443 555554444443 555454444445 333222333223 444443544233 543443534433 555545454533 444444404033 455454504543 455555555454 454443344343 555553435244 555543544444 555553343044 444443444433 445543434434 555554433545 555554455445 455553333234 555552344243 444141212213 444443504234 445544253444 555554354555 534552234543 555554544544 444233404224 555554534444 444443444344 422442434324 554434434344 444444434334 443433432444 555454435344 252423332214 454544434434 444444444244 555554544445 443222432333 555544444332 545555543445 554544334444 555445555544 554343434433 555555535554 444554444333 553544343534 555553254433 555555554554 544443443344 555443444344 544432144123 555555555555 555555555354 555555535545 455454434444 455455534445 455555554455 555553545445 445545544444 545345553555 444445444433 443435433433 555554545353 444443232223 444444434433 555555545454 555554444343 555554444443 434544333422 444443434343 555555455443 555544434343 455545534444 555555555553 444443343434 555555555445 433444444434 344221512132 333421132223 333444443444 435544545533 444335544443 333323223323 334434332333 444422323213 324433443423 555555554555 555452424444 555544434444 555544443343 555445545453 555555344453 555544545550 454443434334 444332233344 555554332344 554444433444 555554555554 555555543544 444442443132 555555545555 544553435533 044044444444 444443434533 555454433434 555555555454 555555555555 454544434444 444444434333 554555455554 555555543444 423331124132 445445534455 555555555554 444535554434 555555555554 354443422232 555545535443 555555555555 555455444453 455434443333 455444443233 343322434411 555555555534 453442432333 445554434544 345444443333 454554554355 444434453434 555555454443 555443343341 545553343433 222343222201 444433434443 535555555544 552541442423 545433343334 455445433443 444444433433 455543343433 434444432333 444545444444 555554534444 452444434433 454443432533 555453334433 444442233432 555555553433 545555545445 335543222333 554554344445 243424442212 133222432411 343434534233 222222212211 445455554434 455554453344 223334424434 555355555544 455544554434 544455555444 444444444444 444444444344 444334444444 444444444434 555455534243 555555545555 555555555555 444443534343 555554544444 555555555454 444434433433 455445544444 555544544455 444333433333 455443445343 444432442444 443334451543 555554455555 555444444444 555555555455 555555555554 555454345154 555555555555 555555555455 555554454544 454444454544 554443334544 455555402535 555554531534 455545544554 444423444223 555444334533 455554445243 453444334344 555555555554 555555555455 555555555554 455443334344 555555253555 555554433454 555444344455 550030034433 555444233343 555343222133 555555555554 555555243243 555555555355 555554345555 555443434454 545543133133 555443334154 444444344454 555555242254 555554444344 545443334454 554444132454 555455143154 555554453044 555555555455 555534335454 555555245555 545543333444 555555355454 555353145133 555553043454 555555354554 555543434454 555444324454 444444203443 555552233355 555555445455 555500034354 555354354444 555555555555 555543334144 555555005254 454444344254 555555555554 555555555255 555555555455 444444242243 555554445154 444444234333 555555553455 444422224243 555545443344 545552133143 555455044344 555555455555 555555545454 454433343144 555555555555 555455255155 555555454455 555555424455 555555355555 555444444455 555555454455 544411211314 223322441123 444223434233 444441121232 555555535555 454445533444 434442434433 545355554454 555542544333 445545555444 321000001011 444444444444 333223321322 444232433233 425432523122 455555555544 555555545555 555555534354 554554444243 555554343443 444443434333 555224252443 555544433433 344544434423 555554434344 555542134233 444344434444 445443433233 455343333434 455443333445 355344434433 234234433333 445444444445 455535535545 443423234443 455544334544 345441333323 445444533433 455554443355 445444433243 455454453444 444244444444 554244544154 555555555555 454343444444 555444444344 545455534454 555555555555 555554534454 555254555444 544354544453 553454534445 555454445355 545253554454 433342322233 544444444443 555455445544 424322433233 444424222233 555355555544 000000000000 555455345344 000055505450 434333444333 444445444444 555555555545 555554455545 555455435533 544544444243 444331232323 555555554444 443332323233 444224342433 555555555544 433443342333 555445504554 555545555544 555555535555 555555535345 454443433333 555444444555 444443232435 555433444443 555443434543 555555535555 555555533544 555543234444 433432332221 443433544233 443443333334 444424433444 552444333123 233332232211 223422221122 434433414133 332323333102 552544223222 542423343232 555552534132 455554544134 433523533132 433333433433 435434543333 434553433444 555544434345 443543443433 555555542344 544444553144 555544544243 535443441342 344555444333 444444443333 443443433432 545554534544 443533433433 333443432223 333333433123 322432122213 555555555555 554555444433 444543443234 444444433433 452555534433 244444444233 433442422232 555555535555 555555554455 555554545244 555555355455 555555555555 555555555555 444433323233 555455455455 434445444433 555554444455 454444543445 555555535455 555545554455 555555555555 555555555555 555443344353 455543304132 444443444433 555555555355 434433443333 444434444433 444444444433 555555555555 445553443323 445444444444 555554444054 455555554543 555555535555 555554445454 555444444443 555555555454 555554344455 555555454454 554444444454 555555555353 555545544454 553545332223 444424444332 545555543433 555444433444 555555444445 444444424433 444444543434 124113531311 555554534543 555343333333 545444544344 555444534444 555544543444 555455544443 444324402121 555554534544 555455544444 555555544454 444334404433 555443534444 555545554444 555555555555 455333233433 455444433433 455444444444 444235442443 555443343433 444445453444 454345453432 555555453444 344433322323 444443444244 444442343133 554445432233 555555544444 555555534444 555554455554 454443334244 544443333233 444445534445 444432134121 555555332243 555555544433 555554434444 454543534233 454432432343 444424432433 545553335344 555443434344 454443433333 555553534444 554544434355 552532421235 454543433434 544544343234 555552334125 555543455555 443442334222 554443444344 555554543334 555552342444 554443433333 443444434445 555554533344 442412242121 454543343244 445554433344 444443333433 444443433333 444433333334 444444334444 432321102223 444444434443 444444434343 454531432331 445543433434 554554434554 334253232333 444443434244 444433443234 444433334334 444443433333 553434303222 454443434244 444445544444 443441133433 444432232133 444444404344 444444333243 455543124243 555544532344 444432333132 554553434244 454443443333 433111121111 555555555544 444432433222 444443433233 443332332133 445344453243 444444405434 554554434343 455344534443 444444400434 444444344344 544554533443 555554443455 555555544544 555554534444 323123232311 444344344443 555554555544 343323332333 444443434444 444442214340 555434434444 455543343444 445432434433 455553434455 243321332322 444422332332 555533454444 555544443433 354422431422 333322421211 444443432434 344422431322 333342222321 444443454433 443443444433 553434531334 554434552343 545455553544 554455554443 555555555533 555555554543 454454544433 555444532143 554545544443 444233442434 544444434234 554344432233 555345533355 554554544433 455444444344 555554554554 555554545555 444433534434 444444421134 334333333333 334443443343 122333441413 434444333333 444344433233 444333332143 555154344133 324344333223 244444402233 454443433543 444344433344 455555445555 555555544433 454544434443 344535554533 333435443433 444444554544 343434443333 544553544455 555444444455 244333332222 333441232233 544433433433 555544343344 344211142124 442442232113 433432332223 333424322222 444443333233 344321232223 442434342422 545555535555 455454434454 455355544444 454444444445 555554432430 555444344144 455534342234 555555554354 213332443111 555545434433 555554424444 443434443433 555555554443 555555555544 435535554433 555455545443 555555554533 554545443455 555553333233 434432232323 443443333433 443544231534 434533334334 555555535544 555544444445 555555555555 555555555555 555555555555 555555555555 544555544544 555555545555 545555534354 445444344344 555555555555 444443343334 555444440000 555555555554 555555545455 454434444345 555445544443 555554535433 454445555555 555444444355 555555555555 555555555555 555555555555 555555554555 555455554455 454435544255 545543342243 555544355345 555555455354 435553244333 555555443454 444444433445 121422433111 555554543244 555444554444 444203444433 344342553322 554445554344 545445454454 444245504233 334335555533 554355544444 444445545444 555555555344 454544543233 444455532434 555544354243 535444554433 444444444444 455555553243 244442343235 554544504043 444435553433 455553434354 555444343314 555553344453 555555555544 544444444433 434434550033 555455544444 455445534344 454445444554 555555555555 555555555555 555555555454 555455545412 334433343132 555454455455 555554454443 555555555555 555555553433 555555555555 555555445555 555545445455 555555545554 555555555555 445455554443 555445554433 555555554445 555553333144 555554455143 554454445444 555555554533 334422433422 555554434444 433531133222 443432342224 555544554433 553434333333 555543334443 444443344323 555555555555 555554545344 555555545554 555342434333 444443333233 444544435444 555555555555 555455554354 555555405054 555555555555 554555545545 555555555544 555545454344 555555455555 433444444343 454555554444 453555554544 444445554444 544455555455 555343434343 555553444454 555444434443 555555555444 555555545443 555444534455 555555555555 444443443434 555445533543 555555555444 555544444354 445444544243 555554555455 555555455444 555555555544 555555555454 554445545454 555555555543 344444434443 555555454453 455444443433 344244434433 355234452132 555445545455 444444444444 455444454433 555555555555 344233341155 333334433233 444433434333 444233443334 454344544444 555554245253 444444333344 554544434333 555444443343 555554555445 005555555544 554444445244 555455555555 555555555444 444444444433 555555555444 555555544454 555555555544 444444434444 555555535553 545534543334 554554534533 555555555554 554554544544 454541231221 555555535544 445344334432 444444344333 555555534444 555555545555 443434544232 545544433343 343234434333 444444443233 555454444455 555455535455 554433442243 444444544454 554545554544 454444444444 554455534455 555555544355 555445555555 555444534444 455454534444 555555555544 444444444455 454455554344 443244442233 350554554434 455444535343 344233443433 454444535545 244222232232 245345554344 355344444443 555455555444 444434444233 334323444322 333234443233 455455554454 555554544434 555355555444 444444544443 555554555544 344231224131 444443434433 454344444431 555554555553 454544444443 444443443532 334323423222 455555545554 555542434443 554444444443 554444534344 555443454555 555555534554 444434443343 444234432233 334323311333 444443443233 355424552242 233335323322 234233443333 123353532334 444345555244 332222433422 545445555443 555555555555 555554444443 455445554455 455455555455 555555555555 444443433445 555455555544 355453434232 555555554344 444433433433 434322242112 444444433433 444445444544 555444535444 544444444443 454544344334 454444334333 434433433332 334434423423 444455552233 442442342233 445433433343 555555444355 555555555555 455554555545 555445544444 544444434443 555555535333 554444444344 555554554445 345433334121 555555555554 545444444233 555555544455 555554545555 555555455555 555555545555 555554544455 444444444333 544544544445 555445544544 555455444455 555455555454 554455535444 453423442244 444443444444 454444333333 555555555542 555555555543 555555555544 555555535534 555555555444 444443423333 555444444444 555445544453 444444444443 555555443444 444443444333 554554154344 555543353333 554445443333 555555553455 554534444243 554555554545 555544443443 555554555555 555425552422 555555555555 454421121321 555454453433 555555554443 244224431223 455444453444 454345544455 344235545044 555555555544 555553325554 554554444244 555545544544 454555554545 444444545444 545544444455 454344445443 545555554453 444444444443 545554554453 555453434444 005434434454 455555455544 555555555554 455542444433 545543444555 445545445444 555553325454 555554555554 444544444443 555555444454 443332443222 454444443444 344333433332 555455444455 555555555445 555555534454 445433432343 555554434444 555555545444 544545434455 454435543444 555555555555 555455554555 555555544554 555553554455 555555555555 545454545444 555555445555 554534343444 555545443343 545454334444 554445544544 555455354344 555555555355 554445544354 455554444444 555555553543 555554444444 555543233444 555554344433 333334441223 543554344434 055541243244 555555555544 555555533444 555445444544 444335343433 544434344333 544435533333 444444443333 555555555554 555552343233 444444444433 544444434444 555555545555 555555555554 445244434444 445444434444 445555554521 443444543343 444433343434 355444433442 555543444455 555444334544 555555555555 554555545555 555555554555 555555555555 454444343445 444444433444 354445443444 555334242132 455445555543 254153343433 354244443333 554455444344 343255535444 455454555553 555455545555 444343433343 343323443323 455444444424 555544444455 343434543444 555555555544 555554534243 555554543344 555455555544 555443344343 444445533133 555543534555 444554444444 444002323320 444232322222 244344424441 555443344334 555555555555 555444534443 555555555555 555555555550 455555554555 555555555555 end data. missing values question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24 (0). factor /variables question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24 /analysis all /print univariate det correlation /format blank(.30) /plot eigen /criteria factors(3) /extraction paf /method = correlation. ]) AT_CHECK([pspp -O format=csv factor.sps], [0], [Table: Descriptive Statistics ,Mean,Std. Deviation,Analysis N question13,4.462,.729,1365 question14,4.525,.700,1365 question15,4.445,.732,1365 question16,4.281,.829,1365 question17,4.166,.895,1365 question18,3.930,1.034,1365 question19,4.077,.963,1365 question20,3.777,.909,1365 question21,3.774,.984,1365 question22,3.607,1.116,1365 question23,3.813,.957,1365 question24,3.666,.926,1365 Table: Correlation Matrix ,,question13,question14,question15,question16,question17,question18,question19,question20,question21,question22,question23,question24 Correlations,question13,1.000,.661,.600,.566,.577,.409,.286,.304,.476,.333,.564,.454 ,question14,.661,1.000,.635,.500,.552,.433,.320,.315,.449,.333,.565,.443 ,question15,.600,.635,1.000,.505,.587,.457,.359,.356,.509,.369,.582,.435 ,question16,.566,.500,.505,1.000,.586,.405,.335,.317,.452,.363,.459,.430 ,question17,.577,.552,.587,.586,1.000,.555,.449,.417,.595,.450,.613,.521 ,question18,.409,.433,.457,.405,.555,1.000,.627,.521,.554,.536,.569,.474 ,question19,.286,.320,.359,.335,.449,.627,1.000,.446,.499,.484,.444,.374 ,question20,.304,.315,.356,.317,.417,.521,.446,1.000,.425,.383,.410,.357 ,question21,.476,.449,.509,.452,.595,.554,.499,.425,1.000,.507,.598,.500 ,question22,.333,.333,.369,.363,.450,.536,.484,.383,.507,1.000,.493,.444 ,question23,.564,.565,.582,.459,.613,.569,.444,.410,.598,.493,1.000,.705 ,question24,.454,.443,.435,.430,.521,.474,.374,.357,.500,.444,.705,1.000 Determinant,.002,,,,,,,,,,,, Table: Factor Matrix ,Factor,, ,1,2,3 question13,.713,.398, question14,.703,.339, question15,.721,, question16,.648,, question17,.783,, question18,.740,-.345, question19,.616,-.415, question20,.550,, question21,.732,, question22,.613,, question23,.819,,.345 question24,.695,,.386 Table: Rotated Factor Matrix ,Factor,, ,1,2,3 question13,.771,, question14,.726,, question15,.676,, question16,.591,, question17,.587,.446, question18,,.739, question19,,.727, question20,,.540, question21,.402,.533,.321 question22,,.559, question23,.449,.377,.668 question24,.324,.321,.652 ]) AT_CLEANUP AT_SETUP([FACTOR extraction=pc method=correlation]) dnl This example is from http://www.ats.ucla.edu/stat/spss/whatstat/whatstat.htm AT_DATA([factor2.sps], [set format = F11.3. data list notable list /id female race ses schtyp prog read write math science socst. begin data. 70.00 .00 4.00 1.00 1.00 1.00 57.00 52.00 41.00 47.00 57.00 121.00 1.00 4.00 2.00 1.00 3.00 68.00 59.00 53.00 63.00 61.00 86.00 .00 4.00 3.00 1.00 1.00 44.00 33.00 54.00 58.00 31.00 141.00 .00 4.00 3.00 1.00 3.00 63.00 44.00 47.00 53.00 56.00 172.00 .00 4.00 2.00 1.00 2.00 47.00 52.00 57.00 53.00 61.00 113.00 .00 4.00 2.00 1.00 2.00 44.00 52.00 51.00 63.00 61.00 50.00 .00 3.00 2.00 1.00 1.00 50.00 59.00 42.00 53.00 61.00 11.00 .00 1.00 2.00 1.00 2.00 34.00 46.00 45.00 39.00 36.00 84.00 .00 4.00 2.00 1.00 1.00 63.00 57.00 54.00 58.00 51.00 48.00 .00 3.00 2.00 1.00 2.00 57.00 55.00 52.00 50.00 51.00 75.00 .00 4.00 2.00 1.00 3.00 60.00 46.00 51.00 53.00 61.00 60.00 .00 4.00 2.00 1.00 2.00 57.00 65.00 51.00 63.00 61.00 95.00 .00 4.00 3.00 1.00 2.00 73.00 60.00 71.00 61.00 71.00 104.00 .00 4.00 3.00 1.00 2.00 54.00 63.00 57.00 55.00 46.00 38.00 .00 3.00 1.00 1.00 2.00 45.00 57.00 50.00 31.00 56.00 115.00 .00 4.00 1.00 1.00 1.00 42.00 49.00 43.00 50.00 56.00 76.00 .00 4.00 3.00 1.00 2.00 47.00 52.00 51.00 50.00 56.00 195.00 .00 4.00 2.00 2.00 1.00 57.00 57.00 60.00 58.00 56.00 114.00 .00 4.00 3.00 1.00 2.00 68.00 65.00 62.00 55.00 61.00 85.00 .00 4.00 2.00 1.00 1.00 55.00 39.00 57.00 53.00 46.00 167.00 .00 4.00 2.00 1.00 1.00 63.00 49.00 35.00 66.00 41.00 143.00 .00 4.00 2.00 1.00 3.00 63.00 63.00 75.00 72.00 66.00 41.00 .00 3.00 2.00 1.00 2.00 50.00 40.00 45.00 55.00 56.00 20.00 .00 1.00 3.00 1.00 2.00 60.00 52.00 57.00 61.00 61.00 12.00 .00 1.00 2.00 1.00 3.00 37.00 44.00 45.00 39.00 46.00 53.00 .00 3.00 2.00 1.00 3.00 34.00 37.00 46.00 39.00 31.00 154.00 .00 4.00 3.00 1.00 2.00 65.00 65.00 66.00 61.00 66.00 178.00 .00 4.00 2.00 2.00 3.00 47.00 57.00 57.00 58.00 46.00 196.00 .00 4.00 3.00 2.00 2.00 44.00 38.00 49.00 39.00 46.00 29.00 .00 2.00 1.00 1.00 1.00 52.00 44.00 49.00 55.00 41.00 126.00 .00 4.00 2.00 1.00 1.00 42.00 31.00 57.00 47.00 51.00 103.00 .00 4.00 3.00 1.00 2.00 76.00 52.00 64.00 64.00 61.00 192.00 .00 4.00 3.00 2.00 2.00 65.00 67.00 63.00 66.00 71.00 150.00 .00 4.00 2.00 1.00 3.00 42.00 41.00 57.00 72.00 31.00 199.00 .00 4.00 3.00 2.00 2.00 52.00 59.00 50.00 61.00 61.00 144.00 .00 4.00 3.00 1.00 1.00 60.00 65.00 58.00 61.00 66.00 200.00 .00 4.00 2.00 2.00 2.00 68.00 54.00 75.00 66.00 66.00 80.00 .00 4.00 3.00 1.00 2.00 65.00 62.00 68.00 66.00 66.00 16.00 .00 1.00 1.00 1.00 3.00 47.00 31.00 44.00 36.00 36.00 153.00 .00 4.00 2.00 1.00 3.00 39.00 31.00 40.00 39.00 51.00 176.00 .00 4.00 2.00 2.00 2.00 47.00 47.00 41.00 42.00 51.00 177.00 .00 4.00 2.00 2.00 2.00 55.00 59.00 62.00 58.00 51.00 168.00 .00 4.00 2.00 1.00 2.00 52.00 54.00 57.00 55.00 51.00 40.00 .00 3.00 1.00 1.00 1.00 42.00 41.00 43.00 50.00 41.00 62.00 .00 4.00 3.00 1.00 1.00 65.00 65.00 48.00 63.00 66.00 169.00 .00 4.00 1.00 1.00 1.00 55.00 59.00 63.00 69.00 46.00 49.00 .00 3.00 3.00 1.00 3.00 50.00 40.00 39.00 49.00 47.00 136.00 .00 4.00 2.00 1.00 2.00 65.00 59.00 70.00 63.00 51.00 189.00 .00 4.00 2.00 2.00 2.00 47.00 59.00 63.00 53.00 46.00 7.00 .00 1.00 2.00 1.00 2.00 57.00 54.00 59.00 47.00 51.00 27.00 .00 2.00 2.00 1.00 2.00 53.00 61.00 61.00 57.00 56.00 128.00 .00 4.00 3.00 1.00 2.00 39.00 33.00 38.00 47.00 41.00 21.00 .00 1.00 2.00 1.00 1.00 44.00 44.00 61.00 50.00 46.00 183.00 .00 4.00 2.00 2.00 2.00 63.00 59.00 49.00 55.00 71.00 132.00 .00 4.00 2.00 1.00 2.00 73.00 62.00 73.00 69.00 66.00 15.00 .00 1.00 3.00 1.00 3.00 39.00 39.00 44.00 26.00 42.00 67.00 .00 4.00 1.00 1.00 3.00 37.00 37.00 42.00 33.00 32.00 22.00 .00 1.00 2.00 1.00 3.00 42.00 39.00 39.00 56.00 46.00 185.00 .00 4.00 2.00 2.00 2.00 63.00 57.00 55.00 58.00 41.00 9.00 .00 1.00 2.00 1.00 3.00 48.00 49.00 52.00 44.00 51.00 181.00 .00 4.00 2.00 2.00 2.00 50.00 46.00 45.00 58.00 61.00 170.00 .00 4.00 3.00 1.00 2.00 47.00 62.00 61.00 69.00 66.00 134.00 .00 4.00 1.00 1.00 1.00 44.00 44.00 39.00 34.00 46.00 108.00 .00 4.00 2.00 1.00 1.00 34.00 33.00 41.00 36.00 36.00 197.00 .00 4.00 3.00 2.00 2.00 50.00 42.00 50.00 36.00 61.00 140.00 .00 4.00 2.00 1.00 3.00 44.00 41.00 40.00 50.00 26.00 171.00 .00 4.00 2.00 1.00 2.00 60.00 54.00 60.00 55.00 66.00 107.00 .00 4.00 1.00 1.00 3.00 47.00 39.00 47.00 42.00 26.00 81.00 .00 4.00 1.00 1.00 2.00 63.00 43.00 59.00 65.00 44.00 18.00 .00 1.00 2.00 1.00 3.00 50.00 33.00 49.00 44.00 36.00 155.00 .00 4.00 2.00 1.00 1.00 44.00 44.00 46.00 39.00 51.00 97.00 .00 4.00 3.00 1.00 2.00 60.00 54.00 58.00 58.00 61.00 68.00 .00 4.00 2.00 1.00 2.00 73.00 67.00 71.00 63.00 66.00 157.00 .00 4.00 2.00 1.00 1.00 68.00 59.00 58.00 74.00 66.00 56.00 .00 4.00 2.00 1.00 3.00 55.00 45.00 46.00 58.00 51.00 5.00 .00 1.00 1.00 1.00 2.00 47.00 40.00 43.00 45.00 31.00 159.00 .00 4.00 3.00 1.00 2.00 55.00 61.00 54.00 49.00 61.00 123.00 .00 4.00 3.00 1.00 1.00 68.00 59.00 56.00 63.00 66.00 164.00 .00 4.00 2.00 1.00 3.00 31.00 36.00 46.00 39.00 46.00 14.00 .00 1.00 3.00 1.00 2.00 47.00 41.00 54.00 42.00 56.00 127.00 .00 4.00 3.00 1.00 2.00 63.00 59.00 57.00 55.00 56.00 165.00 .00 4.00 1.00 1.00 3.00 36.00 49.00 54.00 61.00 36.00 174.00 .00 4.00 2.00 2.00 2.00 68.00 59.00 71.00 66.00 56.00 3.00 .00 1.00 1.00 1.00 2.00 63.00 65.00 48.00 63.00 56.00 58.00 .00 4.00 2.00 1.00 3.00 55.00 41.00 40.00 44.00 41.00 146.00 .00 4.00 3.00 1.00 2.00 55.00 62.00 64.00 63.00 66.00 102.00 .00 4.00 3.00 1.00 2.00 52.00 41.00 51.00 53.00 56.00 117.00 .00 4.00 3.00 1.00 3.00 34.00 49.00 39.00 42.00 56.00 133.00 .00 4.00 2.00 1.00 3.00 50.00 31.00 40.00 34.00 31.00 94.00 .00 4.00 3.00 1.00 2.00 55.00 49.00 61.00 61.00 56.00 24.00 .00 2.00 2.00 1.00 2.00 52.00 62.00 66.00 47.00 46.00 149.00 .00 4.00 1.00 1.00 1.00 63.00 49.00 49.00 66.00 46.00 82.00 1.00 4.00 3.00 1.00 2.00 68.00 62.00 65.00 69.00 61.00 8.00 1.00 1.00 1.00 1.00 2.00 39.00 44.00 52.00 44.00 48.00 129.00 1.00 4.00 1.00 1.00 1.00 44.00 44.00 46.00 47.00 51.00 173.00 1.00 4.00 1.00 1.00 1.00 50.00 62.00 61.00 63.00 51.00 57.00 1.00 4.00 2.00 1.00 2.00 71.00 65.00 72.00 66.00 56.00 100.00 1.00 4.00 3.00 1.00 2.00 63.00 65.00 71.00 69.00 71.00 1.00 1.00 1.00 1.00 1.00 3.00 34.00 44.00 40.00 39.00 41.00 194.00 1.00 4.00 3.00 2.00 2.00 63.00 63.00 69.00 61.00 61.00 88.00 1.00 4.00 3.00 1.00 2.00 68.00 60.00 64.00 69.00 66.00 99.00 1.00 4.00 3.00 1.00 1.00 47.00 59.00 56.00 66.00 61.00 47.00 1.00 3.00 1.00 1.00 2.00 47.00 46.00 49.00 33.00 41.00 120.00 1.00 4.00 3.00 1.00 2.00 63.00 52.00 54.00 50.00 51.00 166.00 1.00 4.00 2.00 1.00 2.00 52.00 59.00 53.00 61.00 51.00 65.00 1.00 4.00 2.00 1.00 2.00 55.00 54.00 66.00 42.00 56.00 101.00 1.00 4.00 3.00 1.00 2.00 60.00 62.00 67.00 50.00 56.00 89.00 1.00 4.00 1.00 1.00 3.00 35.00 35.00 40.00 51.00 33.00 54.00 1.00 3.00 1.00 2.00 1.00 47.00 54.00 46.00 50.00 56.00 180.00 1.00 4.00 3.00 2.00 2.00 71.00 65.00 69.00 58.00 71.00 162.00 1.00 4.00 2.00 1.00 3.00 57.00 52.00 40.00 61.00 56.00 4.00 1.00 1.00 1.00 1.00 2.00 44.00 50.00 41.00 39.00 51.00 131.00 1.00 4.00 3.00 1.00 2.00 65.00 59.00 57.00 46.00 66.00 125.00 1.00 4.00 1.00 1.00 2.00 68.00 65.00 58.00 59.00 56.00 34.00 1.00 1.00 3.00 2.00 2.00 73.00 61.00 57.00 55.00 66.00 106.00 1.00 4.00 2.00 1.00 3.00 36.00 44.00 37.00 42.00 41.00 130.00 1.00 4.00 3.00 1.00 1.00 43.00 54.00 55.00 55.00 46.00 93.00 1.00 4.00 3.00 1.00 2.00 73.00 67.00 62.00 58.00 66.00 163.00 1.00 4.00 1.00 1.00 2.00 52.00 57.00 64.00 58.00 56.00 37.00 1.00 3.00 1.00 1.00 3.00 41.00 47.00 40.00 39.00 51.00 35.00 1.00 1.00 1.00 2.00 1.00 60.00 54.00 50.00 50.00 51.00 87.00 1.00 4.00 2.00 1.00 1.00 50.00 52.00 46.00 50.00 56.00 73.00 1.00 4.00 2.00 1.00 2.00 50.00 52.00 53.00 39.00 56.00 151.00 1.00 4.00 2.00 1.00 3.00 47.00 46.00 52.00 48.00 46.00 44.00 1.00 3.00 1.00 1.00 3.00 47.00 62.00 45.00 34.00 46.00 152.00 1.00 4.00 3.00 1.00 2.00 55.00 57.00 56.00 58.00 61.00 105.00 1.00 4.00 2.00 1.00 2.00 50.00 41.00 45.00 44.00 56.00 28.00 1.00 2.00 2.00 1.00 1.00 39.00 53.00 54.00 50.00 41.00 91.00 1.00 4.00 3.00 1.00 3.00 50.00 49.00 56.00 47.00 46.00 45.00 1.00 3.00 1.00 1.00 3.00 34.00 35.00 41.00 29.00 26.00 116.00 1.00 4.00 2.00 1.00 2.00 57.00 59.00 54.00 50.00 56.00 33.00 1.00 2.00 1.00 1.00 2.00 57.00 65.00 72.00 54.00 56.00 66.00 1.00 4.00 2.00 1.00 3.00 68.00 62.00 56.00 50.00 51.00 72.00 1.00 4.00 2.00 1.00 3.00 42.00 54.00 47.00 47.00 46.00 77.00 1.00 4.00 1.00 1.00 2.00 61.00 59.00 49.00 44.00 66.00 61.00 1.00 4.00 3.00 1.00 2.00 76.00 63.00 60.00 67.00 66.00 190.00 1.00 4.00 2.00 2.00 2.00 47.00 59.00 54.00 58.00 46.00 42.00 1.00 3.00 2.00 1.00 3.00 46.00 52.00 55.00 44.00 56.00 2.00 1.00 1.00 2.00 1.00 3.00 39.00 41.00 33.00 42.00 41.00 55.00 1.00 3.00 2.00 2.00 2.00 52.00 49.00 49.00 44.00 61.00 19.00 1.00 1.00 1.00 1.00 1.00 28.00 46.00 43.00 44.00 51.00 90.00 1.00 4.00 3.00 1.00 2.00 42.00 54.00 50.00 50.00 52.00 142.00 1.00 4.00 2.00 1.00 3.00 47.00 42.00 52.00 39.00 51.00 17.00 1.00 1.00 2.00 1.00 2.00 47.00 57.00 48.00 44.00 41.00 122.00 1.00 4.00 2.00 1.00 2.00 52.00 59.00 58.00 53.00 66.00 191.00 1.00 4.00 3.00 2.00 2.00 47.00 52.00 43.00 48.00 61.00 83.00 1.00 4.00 2.00 1.00 3.00 50.00 62.00 41.00 55.00 31.00 182.00 1.00 4.00 2.00 2.00 2.00 44.00 52.00 43.00 44.00 51.00 6.00 1.00 1.00 1.00 1.00 2.00 47.00 41.00 46.00 40.00 41.00 46.00 1.00 3.00 1.00 1.00 2.00 45.00 55.00 44.00 34.00 41.00 43.00 1.00 3.00 1.00 1.00 2.00 47.00 37.00 43.00 42.00 46.00 96.00 1.00 4.00 3.00 1.00 2.00 65.00 54.00 61.00 58.00 56.00 138.00 1.00 4.00 2.00 1.00 3.00 43.00 57.00 40.00 50.00 51.00 10.00 1.00 1.00 2.00 1.00 1.00 47.00 54.00 49.00 53.00 61.00 71.00 1.00 4.00 2.00 1.00 1.00 57.00 62.00 56.00 58.00 66.00 139.00 1.00 4.00 2.00 1.00 2.00 68.00 59.00 61.00 55.00 71.00 110.00 1.00 4.00 2.00 1.00 3.00 52.00 55.00 50.00 54.00 61.00 148.00 1.00 4.00 2.00 1.00 3.00 42.00 57.00 51.00 47.00 61.00 109.00 1.00 4.00 2.00 1.00 1.00 42.00 39.00 42.00 42.00 41.00 39.00 1.00 3.00 3.00 1.00 2.00 66.00 67.00 67.00 61.00 66.00 147.00 1.00 4.00 1.00 1.00 2.00 47.00 62.00 53.00 53.00 61.00 74.00 1.00 4.00 2.00 1.00 2.00 57.00 50.00 50.00 51.00 58.00 198.00 1.00 4.00 3.00 2.00 2.00 47.00 61.00 51.00 63.00 31.00 161.00 1.00 4.00 1.00 1.00 2.00 57.00 62.00 72.00 61.00 61.00 112.00 1.00 4.00 2.00 1.00 2.00 52.00 59.00 48.00 55.00 61.00 69.00 1.00 4.00 1.00 1.00 3.00 44.00 44.00 40.00 40.00 31.00 156.00 1.00 4.00 2.00 1.00 2.00 50.00 59.00 53.00 61.00 61.00 111.00 1.00 4.00 1.00 1.00 1.00 39.00 54.00 39.00 47.00 36.00 186.00 1.00 4.00 2.00 2.00 2.00 57.00 62.00 63.00 55.00 41.00 98.00 1.00 4.00 1.00 1.00 3.00 57.00 60.00 51.00 53.00 37.00 119.00 1.00 4.00 1.00 1.00 1.00 42.00 57.00 45.00 50.00 43.00 13.00 1.00 1.00 2.00 1.00 3.00 47.00 46.00 39.00 47.00 61.00 51.00 1.00 3.00 3.00 1.00 1.00 42.00 36.00 42.00 31.00 39.00 26.00 1.00 2.00 3.00 1.00 2.00 60.00 59.00 62.00 61.00 51.00 36.00 1.00 3.00 1.00 1.00 1.00 44.00 49.00 44.00 35.00 51.00 135.00 1.00 4.00 1.00 1.00 2.00 63.00 60.00 65.00 54.00 66.00 59.00 1.00 4.00 2.00 1.00 2.00 65.00 67.00 63.00 55.00 71.00 78.00 1.00 4.00 2.00 1.00 2.00 39.00 54.00 54.00 53.00 41.00 64.00 1.00 4.00 3.00 1.00 3.00 50.00 52.00 45.00 58.00 36.00 63.00 1.00 4.00 1.00 1.00 1.00 52.00 65.00 60.00 56.00 51.00 79.00 1.00 4.00 2.00 1.00 2.00 60.00 62.00 49.00 50.00 51.00 193.00 1.00 4.00 2.00 2.00 2.00 44.00 49.00 48.00 39.00 51.00 92.00 1.00 4.00 3.00 1.00 1.00 52.00 67.00 57.00 63.00 61.00 160.00 1.00 4.00 2.00 1.00 2.00 55.00 65.00 55.00 50.00 61.00 32.00 1.00 2.00 3.00 1.00 3.00 50.00 67.00 66.00 66.00 56.00 23.00 1.00 2.00 1.00 1.00 2.00 65.00 65.00 64.00 58.00 71.00 158.00 1.00 4.00 2.00 1.00 1.00 52.00 54.00 55.00 53.00 51.00 25.00 1.00 2.00 2.00 1.00 1.00 47.00 44.00 42.00 42.00 36.00 188.00 1.00 4.00 3.00 2.00 2.00 63.00 62.00 56.00 55.00 61.00 52.00 1.00 3.00 1.00 1.00 2.00 50.00 46.00 53.00 53.00 66.00 124.00 1.00 4.00 1.00 1.00 3.00 42.00 54.00 41.00 42.00 41.00 175.00 1.00 4.00 3.00 2.00 1.00 36.00 57.00 42.00 50.00 41.00 184.00 1.00 4.00 2.00 2.00 3.00 50.00 52.00 53.00 55.00 56.00 30.00 1.00 2.00 3.00 1.00 2.00 41.00 59.00 42.00 34.00 51.00 179.00 1.00 4.00 2.00 2.00 2.00 47.00 65.00 60.00 50.00 56.00 31.00 1.00 2.00 2.00 2.00 1.00 55.00 59.00 52.00 42.00 56.00 145.00 1.00 4.00 2.00 1.00 3.00 42.00 46.00 38.00 36.00 46.00 187.00 1.00 4.00 2.00 2.00 1.00 57.00 41.00 57.00 55.00 52.00 118.00 1.00 4.00 2.00 1.00 1.00 55.00 62.00 58.00 58.00 61.00 137.00 1.00 4.00 3.00 1.00 2.00 63.00 65.00 65.00 53.00 61.00 end data. factor /variables read write math science socst /analysis read write math science socst /extraction pc /plot eigen /criteria mineigen (.557) . ]) AT_CHECK([pspp -O format=csv factor2.sps], [0], [Table: Communalities ,Initial,Extraction read,1.000,.736 write,1.000,.704 math,1.000,.750 science,1.000,.849 socst,1.000,.900 Table: Total Variance Explained ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,,Rotation Sums of Squared Loadings,, Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative % 1,3.381,67.616,67.616,3.381,67.616,67.616,2.113,42.267,42.267 2,.557,11.148,78.764,.557,11.148,78.764,1.825,36.497,78.764 3,.407,8.136,86.900,,,,,, 4,.356,7.123,94.023,,,,,, 5,.299,5.977,100.000,,,,,, Table: Component Matrix ,Component, ,1,2 read,.858,.020 write,.824,-.155 math,.844,.195 science,.801,.456 socst,.783,-.536 Table: Rotated Component Matrix ,Component, ,1,2 read,.650,.559 write,.508,.667 math,.757,.421 science,.900,.198 socst,.222,.922 ]) AT_CLEANUP AT_SETUP([FACTOR empty dataset]) dnl Test that something sane happens when the dataset contains no complete observations AT_DATA([factor-empty.sps], [data list notable list /x * y * z *. begin data. 3.4 . 92.9 . 32.09 34.2 1.00 19.80 . 2.00 . 3.6 end data. factor /variables = ALL. ]) AT_CHECK([pspp -O format=csv factor-empty.sps], [0], [ignore]) AT_CLEANUP dnl Fixes a crash reported at dnl http://lists.gnu.org/archive/html/bug-gnu-pspp/2012-04/msg00001.html AT_SETUP([FACTOR /ROTATION=NOROTATE]) AT_DATA([factor-norotate.sps], [dnl DATA LIST FREE / TRAIT1 TO TRAIT5 (F8.2). BEGIN DATA 1 5 5 1 1 8 9 7 9 8 9 8 9 9 8 9 9 9 9 9 1 9 1 1 9 9 7 7 9 9 9 7 9 9 7 END DATA FACTOR /VARIABLES=TRAIT1 TO TRAIT5 /ROTATION=NOROTATE /* NOROTATE may have caused the problem. */ /EXTRACTION=PC /PRINT=DEFAULT DET UNIVARIATE ROTATION SIG CORRELATION. ]) AT_CHECK([pspp -O format=csv factor-norotate.sps], [0], [dnl Table: Descriptive Statistics ,Mean,Std. Deviation,Analysis N TRAIT1,6.57,3.54,7 TRAIT2,7.71,1.39,7 TRAIT3,6.71,2.71,7 TRAIT4,6.71,3.61,7 TRAIT5,7.29,2.66,7 Table: Correlation Matrix ,,TRAIT1,TRAIT2,TRAIT3,TRAIT4,TRAIT5 Correlations,TRAIT1,1.00,.30,.88,1.00,.54 ,TRAIT2,.30,1.00,-.02,.33,.84 ,TRAIT3,.88,-.02,1.00,.87,.13 ,TRAIT4,1.00,.33,.87,1.00,.54 ,TRAIT5,.54,.84,.13,.54,1.00 Sig. (1-tailed),TRAIT1,,.260,.004,.000,.103 ,TRAIT2,.260,,.482,.238,.009 ,TRAIT3,.004,.482,,.006,.390 ,TRAIT4,.000,.238,.006,,.103 ,TRAIT5,.103,.009,.390,.103, Determinant,.00,,,,, Table: Communalities ,Initial,Extraction TRAIT1,1.00,1.00 TRAIT2,1.00,1.00 TRAIT3,1.00,.99 TRAIT4,1.00,.99 TRAIT5,1.00,.99 Table: Total Variance Explained ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,, Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative % 1,3.26,65.26,65.26,3.26,65.26,65.26 2,1.54,30.77,96.03,1.54,30.77,96.03 3,.17,3.36,99.39,.17,3.36,99.39 4,.03,.61,100.00,.03,.61,100.00 5,.00,.00,100.00,,, Table: Component Matrix ,Component,,, ,1,2,3,4 TRAIT1,.97,.23,-.08,.00 TRAIT2,.52,-.81,.28,.00 TRAIT3,.78,.59,.17,.00 TRAIT4,.97,.21,-.04,.00 TRAIT5,.70,-.67,-.23,.00 ]) AT_CLEANUP dnl Fixes a bug in the way that the /CRITERIA = ITERATE option was interpreted. dnl http://lists.gnu.org/archive/html/bug-gnu-pspp/2013-09/msg00036.html AT_SETUP([FACTOR /CRITERIA=ITERATE]) AT_DATA([factor-iterate.sps], [dnl set format = F20.3. data list notable list /x y z *. begin data. 1.00 5.00 3.00 2.00 2.00 2.00 3.00 1.00 1.00 4.00 4.00 5.00 5.00 3.00 9.00 6.00 6.00 4.00 7.00 7.00 6.00 8.00 8.00 8.00 9.00 9.00 7.00 end data. FACTOR /VARIABLES= x y z /CRITERIA = MINEIGEN (1) ITERATE (25) /EXTRACTION =PAF /METHOD = CORRELATION /PRINT = INITIAL EXTRACTION /CRITERIA = ITERATE (0) /ROTATION = NOROTATE. ]) AT_CHECK([pspp -O format=csv factor-iterate.sps], [0], [dnl Table: Communalities ,Initial,Extraction x,.735,.979 y,.640,.653 z,.514,.523 Table: Total Variance Explained ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,, Factor,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative % 1,2.404,80.124,80.124,2.155,71.847,71.847 2,.425,14.166,94.290,,, 3,.171,5.710,100.000,,, Table: Factor Matrix ,Factor ,1 x,.990 y,.808 z,.723 ]) AT_CLEANUP AT_SETUP([FACTOR promax]) AT_DATA([factor-promax.sps], [dnl set decimal=dot. set format=F22.3. get file='llz.zsav'. factor /variables pz pn ps nz nn ns tz tn ts oz on os sz sn ss zz zn zs /missing listwise /print initial extraction rotation /criteria mineigen(1) iterate(25) /extraction paf /method correlation /rotation promax (5). ]) AT_CHECK([ln -s $top_srcdir/tests/language/stats/llz.zsav .], [0], [ignore]) AT_CHECK([pspp -O format=csv factor-promax.sps], [0], [dnl Table: Communalities ,Initial,Extraction PZ,.191,.375 PN,.042,.102 PS,.458,.623 NZ,.100,.163 NN,.065,.079 NS,.129,.148 TZ,.181,.344 TN,.102,.142 TS,.310,.372 OZ,.097,.158 ON,.323,.410 OS,.469,.617 SZ,.104,.170 SN,.154,.267 SS,.081,.180 ZZ,.123,.192 ZN,.208,.412 ZS,.130,.158 Table: Total Variance Explained ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,,Rotation Sums of Squared Loadings Factor,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total 1,2.968,16.491,16.491,2.411,13.393,13.393,2.355 2,2.026,11.253,27.744,1.271,7.059,20.452,1.209 3,1.622,9.011,36.756,.948,5.264,25.716,1.231 4,1.086,6.032,42.788,.283,1.574,27.290,.770 5,.996,5.533,48.321,,,, 6,.923,5.130,53.451,,,, 7,.873,4.852,58.303,,,, 8,.856,4.756,63.060,,,, 9,.836,4.644,67.703,,,, 10,.816,4.534,72.237,,,, 11,.785,4.359,76.596,,,, 12,.740,4.110,80.706,,,, 13,.713,3.964,84.670,,,, 14,.653,3.626,88.296,,,, 15,.633,3.519,91.815,,,, 16,.604,3.356,95.171,,,, 17,.484,2.687,97.858,,,, 18,.386,2.142,100.000,,,, Table: Factor Matrix ,Factor,,, ,1,2,3,4 PZ,-.276,.154,.510,.124 PN,.096,.129,-.091,.261 PS,.746,-.085,.234,.063 NZ,-.111,.323,.206,-.058 NN,.007,.260,-.083,-.069 NS,.366,.096,.046,.051 TZ,-.228,.172,.509,.059 TN,.131,.345,-.074,.029 TS,.601,-.005,.098,.030 OZ,-.145,.166,.322,-.081 ON,.607,.082,.073,-.173 OS,.757,-.059,.171,-.104 SZ,-.142,.307,.226,-.066 SN,.175,.436,-.183,.115 SS,.199,.206,-.083,.302 ZZ,-.074,.411,-.080,-.104 ZN,.015,.580,-.252,-.114 ZS,.365,.156,-.004,.015 Table: Pattern Matrix ,Factor,,, ,1,2,3,4 PZ,-.063,-.126,.599,.085 PN,-.035,.000,-.033,.325 PS,.762,-.175,.058,.081 NZ,.027,.230,.327,-.044 NN,.008,.289,.008,-.026 NS,.344,.044,.015,.091 TZ,.004,-.074,.589,.020 TN,.097,.307,.033,.103 TS,.585,-.043,-.017,.062 OZ,.046,.067,.382,-.109 ON,.654,.151,-.029,-.145 OS,.803,-.037,-.009,-.092 SZ,.009,.213,.345,-.060 SN,.065,.376,-.036,.227 SS,.054,.042,-.013,.388 ZZ,-.044,.434,.078,-.046 ZN,-.025,.646,-.041,-.006 ZS,.337,.133,-.013,.067 Table: Structure Matrix ,Factor,,, ,1,2,3,4 PZ,-.177,-.058,.598,-.022 PN,.068,.110,-.049,.317 PS,.771,-.138,-.136,.240 NZ,-.060,.236,.339,.019 NN,.000,.281,.027,.076 NS,.368,.080,-.068,.207 TZ,-.127,-.028,.582,-.049 TN,.122,.345,.023,.235 TS,.607,-.018,-.160,.221 OZ,-.074,.055,.384,-.101 ON,.619,.104,-.160,.102 OS,.778,-.064,-.190,.132 SZ,-.086,.215,.361,-.009 SN,.143,.453,-.044,.380 SS,.171,.176,-.052,.420 ZZ,-.073,.422,.120,.085 ZN,-.013,.641,.008,.214 ZS,.361,.158,-.088,.213 Table: Factor Correlation Matrix Factor,1,2,3,4 1,1.000,.008,-.232,.294 2,.008,1.000,.065,.347 3,-.232,.065,1.000,-.076 4,.294,.347,-.076,1.000 ]) AT_CLEANUP AT_SETUP([FACTOR covariance matrix]) AT_DATA([covariance-matrix.sps], [dnl set format = F10.3. matrix data variables = rowtype_ var01 var02 var03 var04 var05 var06 var07 var08 / format = lower diagonal . begin data mean 24.3 5.4 69.7 20.1 13.4 2.7 27.9 3.7 sd 5.7 1.5 23.5 5.8 2.8 4.5 5.4 1.5 n 92 92 92 92 92 92 92 92 cov 32.490000 cov 1.539000 2.250000 cov -29.469000 -5.992500 552.250000 cov 11.901600 2.697000 -19.082000 33.640000 cov 4.309200 0.672000 -7.896000 3.572800 7.840000 cov 8.464500 1.012500 -17.977500 6.264000 2.646000 20.250000 cov 15.390000 2.349000 -25.380000 10.022400 1.814400 9.234000 29.160000 cov 1.453500 0.652500 -1.762500 1.740000 1.134000 1.350000 0.324000 2.250000 end data. factor matrix in (cov = *) / method = covariance / print = initial covariance / extraction = pc / rotation = norotate. ]) AT_CHECK([pspp -O format=csv covariance-matrix.sps], [0], [dnl Table: Covariance Matrix ,var01,var02,var03,var04,var05,var06,var07,var08 var01,32.490,1.539,-29.469,11.902,4.309,8.464,15.390,1.454 var02,1.539,2.250,-5.992,2.697,.672,1.013,2.349,.653 var03,-29.469,-5.992,552.250,-19.082,-7.896,-17.977,-25.380,-1.763 var04,11.902,2.697,-19.082,33.640,3.573,6.264,10.022,1.740 var05,4.309,.672,-7.896,3.573,7.840,2.646,1.814,1.134 var06,8.464,1.013,-17.977,6.264,2.646,20.250,9.234,1.350 var07,15.390,2.349,-25.380,10.022,1.814,9.234,29.160,.324 var08,1.454,.653,-1.763,1.740,1.134,1.350,.324,2.250 Table: Communalities ,Initial var01,32.490 var02,2.250 var03,552.250 var04,33.640 var05,7.840 var06,20.250 var07,29.160 var08,2.250 Table: Total Variance Explained ,Initial Eigenvalues,, Component,Total,% of Variance,Cumulative % 1,556.895,81.881,81.881 2,57.963,8.522,90.403 3,23.576,3.466,93.869 4,16.446,2.418,96.288 5,14.603,2.147,98.435 6,6.831,1.004,99.439 7,2.375,.349,99.788 8,1.440,.212,100.000 Table: Component Matrix ,Component,,,,,, ,1,2,3,4,5,6,7 var01,1.394,4.388,1.513,-2.851,.849,.396,.033 var02,.269,.460,-.173,.147,-.146,-.213,.872 var03,-23.489,.725,.058,.003,.022,-.012,.006 var04,.926,4.007,-4.068,.241,-.253,.218,-.026 var05,.363,.829,-.172,-.255,.805,-2.492,.058 var06,.843,2.354,.971,2.425,2.649,.392,.046 var07,1.205,3.948,1.926,1.515,-2.450,-.317,-.087 var08,.085,.319,-.157,-.011,.353,-.341,-.816 ]) AT_CLEANUP dnl A more realistic example of factor analysis usage. AT_SETUP([FACTOR correlation matrix]) AT_DATA([correlation-matrix.sps], [dnl set format = F10.3. matrix data variables = rowtype_ cdi_actws_16 cdi_maxzin_16 rdls_passws_16 rdls_actws_16 cdi_actws_20 cdi_maxzin_20 cdi_actws_26 cdi_maxzin_26 rdls_passws_26 rdls_actws_26 nepsy_passws_36 morf_verv_36 bnt_actws_36 klankgr_id_36 snelnoe_36 letters_36 ppvt_passws_50 morf_verv_50 nepsy_passws_56 bnt_actws_56 klank_gr_weg_56 snelnoe_56 letters_56 leesacc_wo_owo_811 leesacc_tekst_811 leesacc_otekst_811 leessne_wo_owo_811 leesvl_tekst_811 leesvl_otekst_811 leessne_wo_811 spel_wo_owo_811 / format = upper diagonal . begin data mean 64.44 1.74 15.30 11.50 269.03 5.37 441.90 8.57 36.59 33.99 11.68 14.74 18.67 6.70 71.57 2.28 70.45 51.82 18.82 34.57 11.68 45.63 12.94 35.08 92.60 79.28 2.78 61.71 29.44 9.46 13.17 sd 74.93 1.36 5.51 4.17 159.26 2.76 128.77 3.50 6.20 6.50 3.55 8.37 5.90 3.01 24.81 4.09 24.44 18.55 2.90 6.46 3.01 14.06 7.69 4.36 7.10 17.57 1.27 25.68 11.75 3.36 4.13 n 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 corr 1.00 .784 .397 .862 .692 .625 .490 .374 .406 .371 .260 .257 .306 .118 -.148 .072 .202 .234 .198 .241 .205 -.054 .246 .166 .143 .155 -.122 .144 -.010 .135 .241 corr 1.00 .333 .751 .549 .553 .447 .313 .304 .377 .204 .249 .258 .193 -.158 .119 .150 .216 .127 .209 .242 .046 .233 .120 .155 .107 -.126 .147 -.009 .134 .208 corr 1.00 .469 .433 .381 .442 .307 .462 .391 .378 .293 .369 .191 -.306 .238 .204 .215 .295 .285 .157 .069 .241 .029 .060 .054 -.043 .124 -.069 .054 .136 corr 1.00 .708 .663 .509 .419 .434 .432 .267 .255 .342 .132 -.192 .142 .228 .203 .248 .260 .200 -.051 .254 .136 .156 .109 -.126 .172 -.004 .157 .268 corr 1.00 .787 .710 .567 .402 .511 .274 .285 .332 .154 -.096 .247 .253 .235 .245 .257 .261 -.048 .243 .119 .194 .164 -.108 .184 .011 .157 .235 corr 1.00 .590 .646 .449 .505 .313 .322 .405 .148 -.117 .152 .294 .322 .252 .321 .267 -.055 .255 .118 .178 .137 -.110 .182 .004 .146 .216 corr 1.00 .548 .343 .619 .296 .260 .456 .149 -.098 .252 .279 .267 .342 .361 .186 -.066 .215 .107 .148 .059 -.114 .156 -.035 .095 .220 corr 1.00 .406 .509 .397 .236 .416 .037 -.179 .192 .334 .293 .277 .367 .162 -.150 .306 .171 .307 .173 -.128 .255 .075 .224 .315 corr 1.00 .410 .497 .560 .574 .240 -.301 .204 .508 .351 .457 .428 .242 -.117 .367 .136 .191 .191 -.102 .215 .053 .185 .273 corr 1.00 .328 .258 .534 .236 -.202 .200 .333 .209 .352 .375 .302 -.119 .272 .062 .203 .042 -.092 .220 .020 .158 .227 corr 1.00 .439 .488 .323 -.213 .287 .507 .427 .493 .522 .298 -.142 .371 .109 .215 .213 -.048 .228 .009 .133 .267 corr 1.00 .437 .381 -.158 .153 .403 .430 .383 .379 .150 -.141 .303 .115 .131 .155 -.170 .206 .039 .193 .254 corr 1.00 .247 -.143 .182 .521 .364 .415 .688 .304 -.185 .327 .188 .211 .202 -.111 .272 .122 .226 .301 corr 1.00 -.150 .229 .296 .249 .329 .255 .210 -.036 .252 .141 .230 .112 -.195 .309 .135 .250 .195 corr 1.00 -.132 -.204 -.162 -.284 -.166 -.189 .294 -.339 -.094 -.218 -.144 .153 -.246 -.128 -.192 -.239 corr 1.00 .151 .132 .166 .195 .387 -.214 .476 .154 .187 .167 -.236 .410 .316 .370 .245 corr 1.00 .388 .479 .591 .294 -.171 .351 .102 .245 .180 .003 .274 .059 .178 .236 corr 1.00 .408 .437 .276 -.153 .353 .251 .318 .229 -.111 .263 .042 .203 .349 corr 1.00 .467 .234 -.249 .382 .199 .313 .197 -.117 .263 .047 .215 .318 corr 1.00 .368 -.199 .441 .198 .224 .197 -.099 .329 .105 .256 .322 corr 1.00 -.211 .473 .233 .253 .268 -.198 .397 .229 .309 .277 corr 1.00 -.310 -.217 -.312 -.203 .227 -.296 -.260 -.276 -.321 corr 1.00 .368 .350 .311 -.313 .578 .338 .521 .458 corr 1.00 .415 .580 -.588 .545 .497 .635 .683 corr 1.00 .570 -.386 .494 .340 .538 .524 corr 1.00 -.366 .427 .299 .498 .506 corr 1.00 -.684 -.620 -.746 -.568 corr 1.00 .759 .900 .555 corr 1.00 .814 .400 corr 1.00 .621 corr 1.00 end data . factor matrix in (cor = *) / analysis = cdi_actws_16 rdls_actws_16 cdi_actws_20 cdi_actws_26 rdls_actws_26 bnt_actws_36 bnt_actws_56 / format = default / criteria = factors (1) / extraction = pc / rotation = norotate / print = initial extraction . ]) AT_CHECK([pspp -O format=csv correlation-matrix.sps], [0], [dnl Table: Communalities ,Initial,Extraction cdi_actws_16,1.000,.614 rdls_actws_16,1.000,.660 cdi_actws_20,1.000,.695 cdi_actws_26,1.000,.650 rdls_actws_26,1.000,.536 bnt_actws_36,1.000,.443 bnt_actws_56,1.000,.316 Table: Total Variance Explained ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,, Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative % 1,3.914,55.908,55.908,3.914,55.908,55.908 2,1.320,18.852,74.760,,, 3,.716,10.223,84.983,,, 4,.422,6.030,91.012,,, 5,.278,3.977,94.989,,, 6,.216,3.088,98.077,,, 7,.135,1.923,100.000,,, Table: Component Matrix ,Component ,1 cdi_actws_16,.784 rdls_actws_16,.812 cdi_actws_20,.834 cdi_actws_26,.806 rdls_actws_26,.732 bnt_actws_36,.666 bnt_actws_56,.562 ]) AT_CLEANUP AT_SETUP([FACTOR bad input]) dnl Test for a crash AT_DATA([bad-input.sps], [dnl set format = F10.3. MATRIX DATA VARIABLES S1 ROWTYPE_ V1 TO V3 /SPLIT=S1. BEGIN DATA 0 MEAN 2 4 3 0 SD 1 2 3 0 N 9 9 9 0 KORR 1 0 CORV .6 1 0 CORR .7 .8 1 1 MEAN 9 8 7 1 SD 5 6 7 1 N 9 9 9 1 CORR 1 X CORR .4 1 1 CORR .3 .2 1 END DATA. EXECUTE. FACTOR MATRIX IN (CORR =!*) /PRINT = CORRELATION . ]) AT_CHECK([pspp -O format=csv bad-input.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([FACTOR anti-image matrix]) AT_DATA([anti-image-matrix.sps], [dnl SET FORMAT=F20.3 . matrix data variables = rowtype_ viq piq pa ran piatwr piatc / n = 476 / format = lower diagonal . begin data mean 96.88 100.51 -1.73 -0.94 -2.52 -1.85 sd 10.97 11.19 1.19 0.88 0.85 0.97 corr 1.00 corr 0.38 1.00 corr 0.26 0.24 1.00 corr 0.16 0.17 0.34 1.00 corr 0.25 0.07 0.46 0.38 1.00 corr 0.37 0.22 0.39 0.30 0.59 1.00 end data. factor matrix = in (cor = *) / analysis = viq piq pa ran piatwr piatc / format = sort / extraction = pc / rotation = norotate / print = aic ]) AT_CHECK([pspp -O format=csv anti-image-matrix.sps], [0], [dnl Table: Anti-Image Matrices ,,viq,piq,pa,ran,piatwr,piatc Anti-image Covariance,viq,.762,-.248,-.048,.008,-.031,-.143 ,piq,-.248,.807,-.117,-.081,.108,-.071 ,pa,-.048,-.117,.711,-.125,-.173,-.060 ,ran,.008,-.081,-.125,.808,-.143,-.035 ,piatwr,-.031,.108,-.173,-.143,.551,-.265 ,piatc,-.143,-.071,-.060,-.035,-.265,.581 Anti-image Correlation,viq,.741,-.316,-.066,.011,-.048,-.215 ,piq,-.316,.624,-.154,-.100,.163,-.103 ,pa,-.066,-.154,.811,-.165,-.277,-.093 ,ran,.011,-.100,-.165,.825,-.214,-.051 ,piatwr,-.048,.163,-.277,-.214,.675,-.469 ,piatc,-.215,-.103,-.093,-.051,-.469,.729 Table: Component Matrix ,Component,,,, ,1,2,3,4,5 piatc,.774,.122,-.368,.365,-.322 piatwr,.754,.418,.442,.219,-.115 pa,.707,.124,-.117,-.161,.256 piq,.456,-.733,.122,-.289,-.377 viq,.589,-.539,.033,.298,.457 ran,.592,.262,-.069,-.638,.096 ]) AT_CLEANUP AT_SETUP([FACTOR Kaiser-Meyer-Olkin]) AT_DATA([kmo.sps], [dnl SET FORMAT=F20.3 . matrix data variables = rowtype_ viq piq pa ran piatwr piatc / n = 476 / format = lower diagonal . begin data mean 96.88 100.51 -1.73 -0.94 -2.52 -1.85 sd 10.97 11.19 1.19 0.88 0.85 0.97 corr 1.00 corr 0.38 1.00 corr 0.26 0.24 1.00 corr 0.16 0.17 0.34 1.00 corr 0.25 0.07 0.46 0.38 1.00 corr 0.37 0.22 0.39 0.30 0.59 1.00 end data. factor matrix = in (cor = *) / analysis = viq piq pa ran piatwr piatc / extraction = pc / rotation = norotate / print = kmo ]) AT_CHECK([pspp -O format=csv kmo.sps], [0], [dnl Table: KMO and Bartlett's Test Kaiser-Meyer-Olkin Measure of Sampling Adequacy,,.730 Bartlett's Test of Sphericity,Approx. Chi-Square,602.673 ,df,15 ,Sig.,.000 Table: Component Matrix ,Component,,,, ,1,2,3,4,5 viq,.589,-.539,.033,.298,.457 piq,.456,-.733,.122,-.289,-.377 pa,.707,.124,-.117,-.161,.256 ran,.592,.262,-.069,-.638,.096 piatwr,.754,.418,.442,.219,-.115 piatc,.774,.122,-.368,.365,-.322 ]) AT_CLEANUP pspp-1.0.1/tests/language/stats/llz.zsav0000644000175000017500000005726512523704223015224 00000000000000$FL3@(#) SPSS DATA FILE GNU pspp 0.8.4 - mips64el-unknown-linux->Y@18 Dec 1417:30:21   PZ   PN   PS   NZ   NN   NS   TZ   TN   TS   OZ   ON   OS   SZ   SN   SS   ZZ   ZN   ZS  6                   kPZ=PZ PN=PN PS=PS NZ=NZ NN=NN NS=NS TZ=TZ TN=TN TS=TS OZ=OZ ON=ON OS=OS SZ=SZ SN=SN SS=SS ZZ=ZZ ZN=ZN ZS=ZSPZ:$@Role('0' )/PN:$@Role('0' )/PS:$@Role('0' )/NZ:$@Role('0' )/NN:$@Role('0' )/NS:$@Role('0' )/TZ:$@Role('0' )/TN:$@Role('0' )/TS:$@Role('0' )/OZ:$@Role('0' )/ON:$@Role('0' )/OS:$@Role('0' )/SZ:$@Role('0' )/SN:$@Role('0' )/SS:$@Role('0' )/ZZ:$@Role('0' )/ZN:$@Role('0' )/ZS:$@Role('0' ) WINDOWS-1252^0x:Υ9]^; @xힱ1D )J.~_̚n.n3"Aj}X՝$&5j#$ηP[Z呸S!X p[ervHQ xvƒ: y2OK6wz6ʵɈVܴ%wgdHi%m% 67N3c'Ol+F- I"`1ؘ:dVg;QUfaYhcWe?2r?̹Gm;Uoeb8v??)SouK %MmPi/ fH?ybӇ)@3'ݹfzie`8+ %?`з[6+[~@y`hX?teca@W"+a+~kYe#Z"eD>]BuX!["/x1$1w!ԋK}N5du#Z5T{b~sYb:m`kFQS`Eیm"BELw,1OM$fMh600XBbr24M~> U|\OuCۢ:u.qڝEI:dnʅ}j)sB v4mزff([F1-iyV'qVYi#F& ڕ;VDiK47DfQz/ DLb3 d3hŬBl4WreWW2ts=B<ԧi96T*ˮB*G^] `U\ɧmy&nj)K$ry"Jsw/f,ԘVc H؃ZcYlxrVsP?(@ivo{i9+8c*#Ġy18s^ejnj}tЭpeUʣH0`F\$+.وWus:γྗYעI5 uA$UlC!¹j0-O1-6k uiw*ȓEm8tQxgƽ8o|V1٬yRʷqLW Z?+NZuP{es.Yh77|aB>#&ixJnm5 Wĵ4,4oUyjO Nfꝙ#0jp}RUh fI"gz|ɭH2c1SEƭq(}{6K9˱)?Y~$wҖozB41NVnLYes)~`v&*IC! `8-;wl[8]/z&_9W٧H,|5ͣ]wj灲+z6 tS+7@nit2λ:1xQ oi>cGއL>y_qIHyu`OS Jej)h92chzEd+j tմѣ{zR=(YZ1飶AyK5&4ډTʃCID$~ 3 Z㻷B]y OQ;ֻ*yi0XBKhdKTz΢o'r} ]7( ;RONKV@نJa^G-H\|/%Av(P\asA0ZzsV3QQ\f~_:u9*FǓ􏞰hA?󟤐4: j:ԗu.Ef&8xf&HӀʗ &ˡ(-0K!9o<[%i̖{'i|0dWAI3:=q#wl]QcƱ|*)F\$ &gHڏѱR>CPE]0fG6ij>')_0G[pqpøfJKݙa]mOa_dodqmh}پlyt-d@OcG'qQu6;o/{J3}I 9Y mpR:+01vo$ǻ08aY6n$v;Fj~LX _Q΍s,Bvt/Vpt7/K3 iNj"cq帇aQ v%cPx1#'Yޝ牐Hd5T'¯sc]k5ũbc6zFLb0[86YUn,!r*@4r=*t{"wHI,pՎ`77ڈF#,ż4Np6 <|4Mb۠ =-b^q[J>z"g7L-}bfVd7Xx?"ɔJhS0gWw?~[g,휯'?AM,[9~R8|U4Ty7\rЪv"T- @ hT$ *j1@x:?A#Ps$NG~oF0шkeMMTw: -/<ϟ_J4I$ :Ut6M#>)rSZ軎ul8}+$@Jm09-عTUcT˖.ZP{ؓdOh#Rs3_zڊQ1Im3Uߝ#f*&,s*H ;=sdz'#_lXc.R#إFX !UBܐO6Kh曖1;. wkb 'R΋ JOD)LVOEN|4ItY_&(WCys'Б4l]:Ko"[l~Y+es+ 4d/;!B7@cb)?DU0u`Ho2[Wo_jlB9^T3Q~/dKl$3i#xy4E15& 6n E歧g\%;m382%ixH58vfu[*t&;ziGmo F,Dyoq8ǡRb \`|O A}Le q^#JBǣ57YDڠMDP#uqa=i M6sz`ۿ}ϔy6x;h$|:E-.QCLu\O£ŗ^WIz#wǭ%J/ nنvf) |C8H!o)E[+ӛ8c64b.nK"x|xO B!˧BFw7<ǜMTϨ#Z x ` YE~etDd/{z|CcE1[?HTP^U<<*ݺ19nǖ5iX8I#p"V,{E+H[;+('H(r^BMQۈwVc!\ z_l7}6h4}H}H1k%ߒҕs~ #ahVS "$YȞzVu?=R[!2;O)j%9IsQr@cMgbu0'toe4h v('4Q6NL(qN& zD#$OU4Ȋ2Tu~!Tra ɪ#SF\A\B%O]v*Dawѣ|<' Io[iSrzMCף "άO>GHY)lrΆ 6\f!YZiJ6{I&w2-S@?0+vMsI6"'6@fR ]4sU6}n 1x6w0U|0].J[xo{ ǟb,x0vOM{y|f &kX_F~c*πl၇xrͥ>U CU@ЍF$ãpT!K}$4dR.lO}t&0*X:hr_A~d-{+ӹΠ~z_AA<mUհ#O SRf]©)smyѫIq=uo-I)g{ mr?2CK&\p4ic(#!o$P&׈X9vfq{NZ>zU6IhGrf"߃Ewnz[ _gαJl׆;˂D@1dlQcj*/= *d,.yfEu\ad686T?)TA5ˏj9ݒy,GNa.hxt̵ /]bqp*2|ۼk3bvjhz<>>'uϗ p,f5[@BPjZ4oiP11ђ=9fAsbnjJgv9gVA0QXEK^U:!ZoKՓ٥}e7"#j_6o ]n@mfNF[^G҂M|O`vWDz2d7e#q&3]['xvjsm,&[!q./D^"Oc/Z 㓱*>|jG\ c6DNݷo#ǖsbsǗ C7A/~۹G >=K` stYᲜJ4Kvwr;BJSL!x)U_)Yl`sm-SzGQ.ȳn"p /,v7 qBzrZѩ- 0S5zٗ[TTD7QJ+p0]+&D5ѝ*8qf Ũrz D-!I:@ kn--@I}g]@?sYR ކҟˁ*8WM;idfE~!w^uyg9]b*sq KgV6cP+aLQ;dOMeCsI_ۑqO{}jj//@_${JV#$&G x6Y'>0"鶂C#OGz rGljhɸta鍋9~8-h?W)xV|n}hujóJ(Z$r;gf?c&?Fhh4r>Aetn=wWgP\mrQCxt3n"ɤffpba.Iͅa(I*|Lhȼ9N6B$kMۋC\=jVik/r=6k6(;lҶ]SMۧf^t:5(vZy]ח<$ܗ]@PU"p+<1h+- D= ݿ$/̾AgɴDTYa[wXQo:AHTWK]ki$Ȅfx &˻ A0Wє>@ש&@ ۡbQ[k1fB ْL}V 8I織YC{56YwY׃/@cdۚ*H*炡`ɪi(;CyLw' G4w$^2(⡖Ӗ'Ppqn+9i/nOXN.F&>dF1EMcSp,~8G,3H }#pۏnL|Tɺ[y[}0? N3Fz\mS?#&'{dnszxw\]-[0w0Y_KY|٪u K|ph;qLDG]/, #S*2J;pʬ!1Swb MY7I&%5#!W(Ř@r`qʍ3dbre/ŀ,Ds4hFPd\{P"JyK \ʫC1]K4@+8&tS \C|!T.D 9<Ij8z#%nuS  apXW AgG@M ݞsTVH-Be:;@T&6`vt纬csa7p"1F*D+c^ FhxKm#MRa븋<k.}CA:8zǣX᥁D:H7i=T\M>JDŦ Wv"ўjOݾ a|yk}r696<<*EkW{0 JҶ\a8pU46b'{s$AbBx$ ωPG",ݼsIL }0j&ꦱTE, cF:ODV3sѬ d z bFY'`zW(_詒.w6?*O5N=WD>*4UèߨDny}:\I | F46NoCsz,/`И'$#DjL[64Ǖ{[OxYq%۴QsK[bM4e'2̎fO[X\kw}|U^ n;$[mKG0# 4VZ%s{-us|<Tl SlWQ811\YxmCljĐ-V\QR#٩3EܳZViT!q%T G/*O0ɓyB dwemu2/Q%Ceois_iУAa$?`!`6X * l}E~$ sw׃7F8E>@!1U̺*Pڰ׋_d]$^~C{MǯIsٚ#ayդE//3u̅LrXg(H;f?a+Ox&2P5{</$`W \yxxֈ/coyB!G^&W~\eD ;cd!֑Q;pxu\4VW<^b2Y"hSX+RxIdxԌLlД6T}m`^/aEW0C>4&RH2bkɁK|Qup3&|CceFa`6Ԅ/].H}ʸndrAT I^Z]%c eƥI noHJ2D'D~dmWq?ѿU >y6A/u-PaJF+i*^Q^PY.(Ս> PYݱGBH)=fJ653c`KVw"Vq XuBv{DT6G佧.#9ot hYA]~&(<]p@sە3~鸟d;Laq2(aa"* &UN9e M& /WFP*ժm%{Swg2-h`:bPwC^ ER0.w1ĥ!17-E&Ks1Ba-ȳטM}w[8xhIv1GKayFx&NEYc+joBv2KB*S~d!ŭvp@)@BQ-_1HkVPbf %}tMΗ;^20MتB=M5uڳ|K~~Zjo֨)Kf߂/ 1|L%B#F*dɚ`i<ɚWLDx`t%#P|Y0 i5V/()je3gt:0ϲb]ZrWYh1Lr __ 1zv$]cuaOVmUݑ`'$ތN6s˒kib'^AVsHk#C}}D_7mA/`&83ýJW.cK҉P5 P-PX?׍,ql3JLTI Iȩc;h+;ci;|S^ѾN.>/d$ 3gO&Cy$,3Q q^\׿{lKZ3E?f|m,2ńx%mfˎ4h)4Ӽ%#HUy*ә3R櫐+z#_jLEB _;H~Ql9ce2jLHnƫ>^ 1mAq124HםsS~_(nmQ`8FQt9U! y33J|pu !9RIY-[~:*iJ:e4F&I\M͉4XF 2`S kW/.E)Ha]D3f*W" ss7QXtҌNNyycW7L^w PJaO+TZ#0QU"Z2͓9Byg`J)V٤[05M#䏂сK(tCbs`N6 i{3m\Z]=hAy85L2iRܤp? '\ߘ-;Bs7៱8.``ۈ$=6aΐYL@cFW$Zu[r+8l!"j{c-gVxlbaʯzxϥe CrRCb(VlqVW`X_N]ż/mGj.e)7>YCFby/}c.>_[oŗ,<9"˜#!R?,b FOҕ+[)333m9bS?Zf]*I?¿QE%%f3D_ PUڌq{,?95<mBʤџӽ24t5WZR$gM^c!(i#gT>fTA`/ ^!ݩ`g$>`nFD>F?`~}T@dBΞ[!n J] ajvht/.7XOv{d~)=<.Ɠy1%dﷄ/=)\;}11Hb2F룿 \_c.>,-/<7n F7ǯ.hB bNwjX(sI(.愭9Mzka6x/]\ NpYSb9^,4]2pxao]6CUA$|T׿?2T[+_w]fݻF4| ( {dUlk5V w#͙0 SC\U#% ,usy=m<һX3. Pa7T Ar%EQ<U +[vv#>9/4:[Հm&ص WNyۀ D,?뎊{nDU}j$h3_km DN-8(6%|5f*wНBF|0ZXI}5!vuɗB[pGlRD'0PğS^s#chŮJ͑$rJ6QlcF@bni@ Or4yB`ľg/Be*{;y:lu!Ԥ`/ʘ$$lN轗q[("{]<7qh8©ZҶH0QB0d5dhF#= cQ, c}@QHqV^bBgQ -W75RX=貏aànR|=GF :,MTf']d6m^9L 'l@MXliV1P8%esjWiIߦ.M _(K 7Nxl3V2R6 i41EM#] S(HRGmĚ".iгBtOGc+њ2F9QyvEN-klNd[yT| fLkavO_i*A(n=֠Q 6v3O~RJU2ZC6  dDMQG=-RO,6ӛ~å 0q7%2`˳MN8q$ WDe7T_ $yP4?>}ȍIS4;7IKk!t؏V|~QiN'{J` 2O! [Gfݞ>L᝼MhfV: Ⱦ#p(s2\!'R-h٪|Vj!m76t!HUWeY8E)UDH^D*Ez(t \,'FUvl7uV߹"w7G%!/c(jTgðfI>La+Vt o?8"+G, 4.4ܓD|;Cmm|쁆3+%aba~(k|O=O+/Ydn7THǓnz%%ے>*H4OapCV BM L;* d&m!WP,f^`NTx<-x/Y/ G(U` S3e{Ѿ[#RFYx*zyҊXif[$n}J5qdX"LjWQeGA~mȽ-77-@{maզNO0} . dnl AT_BANNER([lexer]) AT_SETUP([lexer ignores initial @%:@! line]) AT_DATA([lexer.sps], [dnl #! /usr/local/bin/pspp DATA LIST LIST NOTABLE /a. BEGIN DATA. 1 2 END DATA. LIST. ]) AT_CHECK([pspp -o pspp.csv lexer.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List a 1.00 2.00 ]) AT_CLEANUP AT_SETUP([lexer properly reports scan errors]) AT_DATA([lexer.sps], [dnl x'123' x'1x' u'' u'012345678' u'd800' u'110000' 'foo 'very long unterminated string that be ellipsized in its error message 1e .x ` � ]) AT_CHECK([pspp -O format=csv lexer.sps], [1], [dnl "lexer.sps:1.1-1.6: error: Syntax error at `x'123'': String of hex digits has 3 characters, which is not a multiple of 2." lexer.sps:2.1-2.5: error: Syntax error at `x'1x'': `x' is not a valid hex digit. "lexer.sps:3.1-3.3: error: Syntax error at `u''': Unicode string contains 0 bytes, which is not in the valid range of 1 to 8 bytes." "lexer.sps:4.1-4.12: error: Syntax error at `u'012345678'': Unicode string contains 9 bytes, which is not in the valid range of 1 to 8 bytes." lexer.sps:5.1-5.7: error: Syntax error at `u'd800'': U+D800 is not a valid Unicode code point. lexer.sps:6.1-6.9: error: Syntax error at `u'110000'': U+110000 is not a valid Unicode code point. lexer.sps:7.1-7.4: error: Syntax error at `'foo': Unterminated string constant. lexer.sps:8.1-8.70: error: Syntax error at `'very long unterminated string that be ellipsized in its err...': Unterminated string constant. lexer.sps:9.1-9.2: error: Syntax error at `1e': Missing exponent following `1e'. lexer.sps:9.4: error: Syntax error at `.': Unexpected `.' in middle of command. lexer.sps:9: error: Unknown command `x'. lexer.sps:10.1: error: Syntax error at ``': Bad character ``' in input. lexer.sps:11.1: error: Syntax error at `�': Bad character U+FFFD in input. ]) AT_CLEANUP # Bug #47602. AT_SETUP([lexer crash due to null byte]) # Intentionally leave out the new-line and add a null byte: printf "datA dist list notable file='input.txt'/a b c. lis|.\0" > lexer.sps # We sort the output into a predictable order because the lexer finds # and reports null bytes as soon as it reads them into its input # buffer, as opposed to when it encounters them during tokenization. # This also means that null bytes might be reported as part of one # command or another or none, hence removing the LIST: prefix. AT_CHECK([pspp -O format=csv lexer.sps > lexer.csv], [1]) AT_CHECK([sed '/^$/d s/LIST: //' lexer.csv | sort], [0], [dnl lexer.sps: error: Bad character U+0000 in input. lexer.sps:1: error: Unknown command `datA dist'. lexer.sps:2: error: LIST is allowed only after the active dataset has been defined. ]) AT_CLEANUP pspp-1.0.1/tests/language/lexer/q2c.at0000644000175000017500000000235413137223525014502 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([q2c]) AT_SETUP([q2c enforces mandatory subcommands]) AT_DATA([q2c.sps], [dnl DATA LIST LIST NOTABLE /x *. BEGIN DATA. 1 2 3 END DATA. EXAMINE. ONEWAY. CROSSTABS. ]) AT_CHECK([pspp -O format=csv q2c.sps], [1], [dnl q2c.sps:8.8: error: EXAMINE: Syntax error at end of command: expecting variable name. q2c.sps:9.7: error: ONEWAY: Syntax error at end of command: expecting variable name. q2c.sps:10: error: CROSSTABS: Required subcommand TABLES was not specified. ]) AT_CLEANUP pspp-1.0.1/tests/language/lexer/scan.at0000644000175000017500000002161213137223525014737 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([syntax scanning]) m4_define([PSPP_CHECK_SCAN], [AT_CHECK([scan-test $1 input], [0], [expout])]) AT_SETUP([identifiers]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl a aB i5 $x @efg @@. #.# .x _z. abcd. abcd. QRSTUV./* end of line comment */ QrStUv./* end of line comment */ @&t@ WXYZ. /* unterminated end of line comment �. /* U+FFFD is not valid in an identifier ]) AT_DATA([expout], [dnl ID "a" SKIP ID "aB" SKIP ID "i5" SKIP ID "$x" SKIP ID "@efg" SKIP ID "@@." SKIP ID "#.#" SKIP UNEXPECTED_DOT ID "x" SKIP UNEXPECTED_CHAR 95 ID "z" ENDCMD SKIP ID "abcd." SKIP ID "abcd" ENDCMD SKIP ID "QRSTUV" ENDCMD SKIP SKIP ID "QrStUv" ENDCMD SKIP SKIP SKIP ID "WXYZ" ENDCMD SKIP SKIP SKIP UNEXPECTED_CHAR 65533 ENDCMD SKIP SKIP SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([reserved words]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl and or not eq ge gt le lt ne all by to with AND OR NOT EQ GE GT LE LT NE ALL BY TO WITH andx orx notx eqx gex gtx lex ltx nex allx byx tox withx and. with. ]) AT_DATA([expout], [dnl AND SKIP OR SKIP NOT SKIP EQ SKIP GE SKIP GT SKIP LE SKIP LT SKIP NE SKIP ALL SKIP BY SKIP TO SKIP WITH SKIP AND SKIP OR SKIP NOT SKIP EQ SKIP GE SKIP GT SKIP LE SKIP LT SKIP NE SKIP ALL SKIP BY SKIP TO SKIP WITH SKIP ID "andx" SKIP ID "orx" SKIP ID "notx" SKIP ID "eqx" SKIP ID "gex" SKIP ID "gtx" SKIP ID "lex" SKIP ID "ltx" SKIP ID "nex" SKIP ID "allx" SKIP ID "byx" SKIP ID "tox" SKIP ID "withx" SKIP ID "and." SKIP WITH ENDCMD SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([punctuation]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl ~ & | = >= > <= < ~= <> ( ) , - + * / [[ ]] ** ~&|=>=><=<~=<>(),-+*/[[]]** ]) AT_DATA([expout], [dnl NOT SKIP AND SKIP OR SKIP EQUALS SKIP GE SKIP GT SKIP LE SKIP LT SKIP NE SKIP NE SKIP LPAREN SKIP RPAREN SKIP COMMA SKIP DASH SKIP PLUS SKIP ASTERISK SKIP SLASH SKIP LBRACK SKIP RBRACK SKIP EXP SKIP NOT AND OR EQUALS GE GT LE LT NE NE LPAREN RPAREN COMMA DASH PLUS ASTERISK SLASH LBRACK RBRACK EXP SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([numbers]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl 0 1 01 001. 1. 123. /* comment 1 */ /* comment 2 */ .1 0.1 00.1 00.10 5e1 6E-1 7e+1 6E+01 6e-03 .3E1 .4e-1 .5E+1 .6e+01 .7E-03 1.23e1 45.6E-1 78.9e+1 99.9E+01 11.2e-03 . 1e e1 1e+ 1e- ]) AT_DATA([expout], [dnl POS_NUM SKIP POS_NUM 1 SKIP POS_NUM 1 SKIP POS_NUM 1 SKIP POS_NUM 1 ENDCMD SKIP POS_NUM 123 ENDCMD SKIP SKIP SKIP SKIP SKIP ENDCMD POS_NUM 1 SKIP POS_NUM 0.1 SKIP POS_NUM 0.1 SKIP POS_NUM 0.1 SKIP POS_NUM 50 SKIP POS_NUM 0.6 SKIP POS_NUM 70 SKIP POS_NUM 60 SKIP POS_NUM 0.006 SKIP ENDCMD POS_NUM 30 SKIP POS_NUM 0.04 SKIP POS_NUM 5 SKIP POS_NUM 6 SKIP POS_NUM 0.0007 SKIP POS_NUM 12.3 SKIP POS_NUM 4.56 SKIP POS_NUM 789 SKIP POS_NUM 999 SKIP POS_NUM 0.0112 SKIP ENDCMD SKIP EXPECTED_EXPONENT "1e" SKIP ID "e1" SKIP EXPECTED_EXPONENT "1e+" SKIP EXPECTED_EXPONENT "1e-" SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([strings]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl 'x' "y" 'abc' 'Don''t' "Can't" 'Won''t' """quoted""" '"quoted"' '' "" '''' """" 'missing end quote "missing double quote 'x' + "y" + 'z' + 'a' /* abc */ + "b" /* + 'c' +/* */"d"/* */+'e' 'foo' + /* special case: + in column 0 would ordinarily start a new command 'bar' 'foo' + 'bar' 'foo' + 'bar' + x"4142"+'5152' "4142"+ x'5152' x"4142" +u'304a' "�あいうえお" "abc"+U"FFFD"+u'3048'+"xyz" ]) AT_DATA([expout], [dnl STRING "x" SKIP STRING "y" SKIP STRING "abc" SKIP STRING "Don't" SKIP STRING "Can't" SKIP STRING "Won't" SKIP STRING ""quoted"" SKIP STRING ""quoted"" SKIP STRING "" SKIP STRING "" SKIP STRING "'" SKIP STRING """ SKIP EXPECTED_QUOTE SKIP EXPECTED_QUOTE SKIP STRING "xyzabcde" SKIP STRING "foobar" SKIP STRING "foobar" SKIP STRING "foo" SKIP PLUS SKIP ENDCMD SKIP STRING "bar" SKIP ENDCMD SKIP PLUS SKIP STRING "AB5152" SKIP STRING "4142QR" SKIP STRING "ABお" SKIP STRING "�あいうえお" SKIP STRING "abc�えxyz" SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([@%:@! construct]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl #! /usr/bin/pspp #! /usr/bin/pspp ]) AT_DATA([expout], [dnl SKIP SKIP ID "#" UNEXPECTED_CHAR 33 SKIP SLASH ID "usr" SLASH ID "bin" SLASH ID "pspp" SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([* and COMMENT commands]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl * Comment commands "don't have to contain valid tokens. ** Check ambiguity with ** token. ****************. comment keyword works too. COMM also. com is ambiguous with COMPUTE. * Comment need not start at left margin. * Comment ends with blank line next command. ]) AT_DATA([expout], [dnl SKIP SKIP SKIP ENDCMD SKIP ENDCMD SKIP SKIP ENDCMD SKIP SKIP ENDCMD SKIP ENDCMD SKIP SKIP ENDCMD SKIP SKIP ENDCMD SKIP ID "com" SKIP ID "is" SKIP ID "ambiguous" SKIP WITH SKIP ID "COMPUTE" ENDCMD SKIP ENDCMD SKIP SKIP SKIP ENDCMD SKIP ENDCMD SKIP SKIP SKIP ENDCMD SKIP ID "next" SKIP ID "command" ENDCMD SKIP ENDCMD SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([DOCUMENT command]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl DOCUMENT one line. DOC more than one line. docu first.paragraph isn't parsed as tokens second paragraph. ]) AT_DATA([expout], [dnl ID "DOCUMENT" STRING "DOCUMENT one line." ENDCMD ENDCMD SKIP ID "DOCUMENT" STRING "DOC more" SKIP STRING " than" SKIP STRING " one" SKIP STRING " line." ENDCMD ENDCMD SKIP ID "DOCUMENT" STRING "docu" SKIP STRING "first.paragraph" SKIP STRING "isn't parsed as tokens" SKIP STRING "" SKIP STRING "second paragraph." ENDCMD ENDCMD SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([TITLE, SUBTITLE, FILE LABEL commands]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl title/**/'Quoted string title'. tit /* "Quoted string on second line". sub "Quoted string subtitle" . TITL /* Not a */ quoted string title. SUBT Not a quoted string /* subtitle FIL label isn't quoted. FILE lab 'is quoted'. FILE /* /**/ lab not quoted here either ]) AT_DATA([expout], [dnl ID "title" SKIP STRING "Quoted string title" ENDCMD SKIP ID "tit" SKIP SKIP SKIP STRING "Quoted string on second line" ENDCMD SKIP ID "sub" SKIP STRING "Quoted string subtitle" SKIP SKIP ENDCMD SKIP ENDCMD SKIP ID "TITL" SKIP STRING "/* Not a */ quoted string title" ENDCMD SKIP ID "SUBT" SKIP STRING "Not a quoted string /* subtitle" SKIP ENDCMD SKIP ID "FIL" SKIP ID "label" SKIP STRING "isn't quoted" ENDCMD SKIP ID "FILE" SKIP SKIP ID "lab" SKIP STRING "is quoted" ENDCMD SKIP ID "FILE" SKIP SKIP SKIP SKIP SKIP ID "lab" SKIP STRING "not quoted here either" SKIP ENDCMD SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([BEGIN DATA command]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl begin data. 123 xxx end data. BEG /**/ DAT /* 5 6 7 /* x end data end data . ]) AT_DATA([expout], [dnl ID "begin" SKIP ID "data" ENDCMD SKIP STRING "123" SKIP STRING "xxx" SKIP ID "end" SKIP ID "data" ENDCMD SKIP ENDCMD SKIP ID "BEG" SKIP SKIP SKIP ID "DAT" SKIP SKIP SKIP STRING "5 6 7 /* x" SKIP STRING "" SKIP STRING "end data" SKIP ID "end" SKIP ID "data" SKIP ENDCMD SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([DO REPEAT command]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl do repeat x=a b c y=d e f. do repeat a=1 thru 5. another command. second command + third command. end /* x */ /* y */ repeat print. end repeat. ]) AT_DATA([expout], [dnl ID "do" SKIP ID "repeat" SKIP ID "x" EQUALS ID "a" SKIP ID "b" SKIP ID "c" SKIP SKIP ID "y" EQUALS ID "d" SKIP ID "e" SKIP ID "f" ENDCMD SKIP STRING " do repeat a=1 thru 5." SKIP STRING "another command." SKIP STRING "second command" SKIP STRING "+ third command." SKIP STRING "end /* x */ /* y */ repeat print." SKIP ID "end" SKIP SKIP ID "repeat" ENDCMD SKIP STOP ]) PSPP_CHECK_SCAN([-i]) AT_CLEANUP AT_SETUP([batch mode]) AT_KEYWORDS([scan]) AT_DATA([input], [dnl first command another line of first command + second command third command fourth command. fifth command. ]) AT_DATA([expout], [dnl ID "first" SKIP ID "command" SKIP SKIP ID "another" SKIP ID "line" SKIP ID "of" SKIP ID "first" SKIP ID "command" SKIP ENDCMD SKIP ID "second" SKIP ID "command" SKIP ENDCMD ID "third" SKIP ID "command" SKIP ENDCMD SKIP ID "fourth" SKIP ID "command" ENDCMD SKIP SKIP ID "fifth" SKIP ID "command" ENDCMD SKIP STOP ]) PSPP_CHECK_SCAN([-b]) AT_CLEANUP pspp-1.0.1/tests/language/lexer/segment-test.c0000644000175000017500000002214112470434666016257 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include #include #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/misc.h" #include "language/lexer/segment.h" #include "gl/error.h" #include "gl/minmax.h" #include "gl/progname.h" #include "gl/read-file.h" #include "gl/xalloc.h" #include "gl/xmemdup0.h" /* -a/--auto, -b/--batch, -i/--interactive: syntax mode. */ static enum segmenter_mode mode = SEG_MODE_AUTO; /* -v, --verbose: Print row and column information. */ static bool verbose; /* -1, --one-byte: Feed in one byte at a time? */ static bool one_byte; /* -0, --truncations: Check that every truncation of input yields a result. */ static bool check_truncations; static const char *parse_options (int argc, char **argv); static void usage (void) NO_RETURN; static void check_segmentation (const char *input, size_t length, bool print_segments); int main (int argc, char *argv[]) { const char *file_name; size_t length; char *input; set_program_name (argv[0]); file_name = parse_options (argc, argv); /* Read from stdin into 'input'. Ensure that 'input' ends in a new-line followed by a null byte. */ input = (!strcmp (file_name, "-") ? fread_file (stdin, &length) : read_file (file_name, &length)); if (input == NULL) error (EXIT_FAILURE, errno, "reading %s failed", file_name); if (!check_truncations) { input = xrealloc (input, length + 3); if (length == 0 || input[length - 1] != '\n') input[length++] = '\n'; input[length++] = '\0'; check_segmentation (input, length, true); } else { size_t test_len; for (test_len = 0; test_len <= length; test_len++) { char *copy = xmemdup0 (input, test_len); check_segmentation (copy, test_len + 1, false); free (copy); } } free (input); return 0; } static void check_segmentation (const char *input, size_t length, bool print_segments) { size_t offset, line_number, line_offset; struct segmenter s; int prev_type; segmenter_init (&s, mode); line_number = 1; line_offset = 0; prev_type = -1; for (offset = 0; offset < length; ) { enum segment_type type; const char *type_name, *p; int n; if (one_byte) { int n_newlines = 0; int i; for (i = 0; i <= length - offset; i++) { /* Make a copy to ensure that segmenter_push() isn't actually looking ahead. */ char *copy; if (i > 0 && input[offset + i - 1] == '\n') n_newlines++; copy = xmemdup (input + offset, i); n = segmenter_push (&s, copy, i, &type); free (copy); if (n >= 0) break; } assert (n_newlines <= 2); } else n = segmenter_push (&s, input + offset, length - offset, &type); if (n < 0) error (EXIT_FAILURE, 0, "segmenter_push returned -1 at offset %zu", offset); assert (offset + n <= length); if (type == SEG_NEWLINE) assert ((n == 1 && input[offset] == '\n') || (n == 2 && input[offset] == '\r' && input[offset + 1] == '\n')); else assert (memchr (&input[offset], '\n', n) == NULL); if (!print_segments) { offset += n; continue; } if (!verbose) { if (prev_type != SEG_SPACES && prev_type != -1 && type == SEG_SPACES && n == 1 && input[offset] == ' ') { printf (" space\n"); offset++; prev_type = -1; continue; } } if (prev_type != -1) putchar ('\n'); prev_type = type; if (verbose) printf ("%2zu:%2zu: ", line_number, offset - line_offset); type_name = segment_type_to_string (type); for (p = type_name; *p != '\0'; p++) putchar (tolower ((unsigned char) *p)); if (n > 0) { int i; for (i = MIN (15, strlen (type_name)); i < 16; i++) putchar (' '); for (i = 0; i < n; ) { const uint8_t *u_input = CHAR_CAST (const uint8_t *, input); ucs4_t uc; int mblen; mblen = u8_mbtoucr (&uc, u_input + (offset + i), n - i); if (mblen < 0) { int j; mblen = u8_mbtouc (&uc, u_input + (offset + i), n - i); putchar ('<'); for (j = 0; j < mblen; j++) { if (j > 0) putchar (' '); printf ("%02x", input[offset + i + j]); } putchar ('>'); } else { switch (uc) { case ' ': printf ("_"); break; case '_': printf ("\\_"); break; case '\\': printf ("\\\\"); break; case '\t': printf ("\\t"); break; case '\r': printf ("\\r"); break; case '\n': printf ("\\n"); break; case '\v': printf ("\\v"); break; default: if (uc < 0x20 || uc == 0x00a0) printf ("", uc); else fwrite (input + offset + i, 1, mblen, stdout); break; } } i += mblen; } } offset += n; if (type == SEG_NEWLINE) { enum prompt_style prompt; line_number++; line_offset = offset; prompt = segmenter_get_prompt (&s); printf (" (%s)\n", prompt_style_to_string (prompt)); } } if (print_segments) putchar ('\n'); } static const char * parse_options (int argc, char **argv) { for (;;) { static const struct option options[] = { {"one-byte", no_argument, NULL, '1'}, {"truncations", no_argument, NULL, '0'}, {"auto", no_argument, NULL, 'a'}, {"batch", no_argument, NULL, 'b'}, {"interactive", no_argument, NULL, 'i'}, {"verbose", no_argument, NULL, 'v'}, {"help", no_argument, NULL, 'h'}, {NULL, 0, NULL, 0}, }; int c = getopt_long (argc, argv, "01abivh", options, NULL); if (c == -1) break; switch (c) { case '1': one_byte = true; break; case '0': check_truncations = true; break; case 'a': mode = SEG_MODE_AUTO; break; case 'b': mode = SEG_MODE_BATCH; break; case 'i': mode = SEG_MODE_INTERACTIVE; break; case 'v': verbose = true; break; case 'h': usage (); case 0: break; case '?': exit (EXIT_FAILURE); break; default: NOT_REACHED (); } } if (optind + 1 != argc) error (1, 0, "exactly one non-option argument required; " "use --help for help"); return argv[optind]; } static void usage (void) { printf ("\ %s, to test breaking PSPP syntax into lexical segments\n\ usage: %s [OPTIONS] INPUT\n\ \n\ Options:\n\ -1, --one-byte feed one byte at a time\n\ -0, --truncations check null truncation of each prefix of input\n\ -a, --auto use \"auto\" syntax mode\n\ -b, --batch use \"batch\" syntax mode\n\ -i, --interactive use \"interactive\" syntax mode (default)\n\ -v, --verbose include rows and column numbers in output\n\ -h, --help print this help message\n", program_name, program_name); exit (EXIT_SUCCESS); } pspp-1.0.1/tests/language/lexer/command-name-test.c0000644000175000017500000000732412470242646017152 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "language/lexer/command-name.h" #include "gl/error.h" #include "gl/progname.h" static char **commands, **strings; static size_t n_commands, n_strings; static void parse_options (int argc, char **argv); static void usage (void) NO_RETURN; int main (int argc, char *argv[]) { size_t i; set_program_name (argv[0]); parse_options (argc, argv); for (i = 0; i < n_strings; i++) { const char *string = strings[i]; struct command_matcher cm; const char *best; size_t j; if (i > 0) putchar ('\n'); printf ("string=\"%s\":\n", string); for (j = 0; j < n_commands; j++) { const char *command = commands[j]; int missing_words; bool match, exact; match = command_match (ss_cstr (command), ss_cstr (string), &exact, &missing_words); printf ("\tcommand=\"%s\" match=%s", command, match ? "yes" : "no"); if (match) printf (" exact=%s missing_words=%d", exact ? "yes" : "no", missing_words); putchar ('\n'); } command_matcher_init (&cm, ss_cstr (string)); for (j = 0; j < n_commands; j++) command_matcher_add (&cm, ss_cstr (commands[j]), commands[j]); best = command_matcher_get_match (&cm); printf ("match: %s, missing_words=%d\n", best ? best : "none", command_matcher_get_missing_words (&cm)); command_matcher_destroy (&cm); } return 0; } static void parse_options (int argc, char **argv) { int breakpoint; for (;;) { static const struct option options[] = { {"help", no_argument, NULL, 'h'}, {NULL, 0, NULL, 0}, }; int c = getopt_long (argc, argv, "h", options, NULL); if (c == -1) break; switch (c) { case 'h': usage (); case 0: break; case '?': exit (EXIT_FAILURE); break; default: NOT_REACHED (); } } for (breakpoint = optind; ; breakpoint++) if (breakpoint >= argc) error (1, 0, "missing ',' on command line; use --help for help"); else if (!strcmp (argv[breakpoint], ",")) break; commands = &argv[optind]; n_commands = breakpoint - optind; strings = &argv[breakpoint + 1]; n_strings = argc - (breakpoint + 1); if (n_commands == 0 || n_strings == 0) error (1, 0, "must specify at least one command and one string; " "use --help for help"); } static void usage (void) { printf ("\ %s, to match PSPP command names\n\ usage: %s [OPTIONS] COMMAND... , STRING...\n\ \n\ Options:\n\ -h, --help print this help message\n", program_name, program_name); exit (EXIT_SUCCESS); } pspp-1.0.1/tests/language/lexer/segment.at0000644000175000017500000005325413137223525015464 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([syntax segmentation]) m4_define([PSPP_CHECK_SEGMENT], [AT_CHECK([segment-test $1 input], [0], [expout]) AT_CHECK([segment-test -1 $1 input], [0], [expout]) AT_CHECK([segment-test -0 $1 input]) AT_CHECK([segment-test -01 $1 input])]) AT_SETUP([identifiers]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl a ab abc abcd A AB ABC ABCD aB aBC aBcD $x $y $z grève@<00A0>@Ângstrom@<00A0>@poté #a #b #c ## #d @efg @ @@. @#@ @&t@ ## # #12345 #.# f@#_.#6 GhIjK .x 1y _z ]) AT_DATA([expout], [dnl identifier a space identifier ab space identifier abc space identifier abcd newline \n (later) identifier A space identifier AB space identifier ABC space identifier ABCD newline \n (later) identifier aB space identifier aBC space identifier aBcD newline \n (later) identifier $x space identifier $y space identifier $z newline \n (later) identifier grève spaces identifier Ângstrom spaces identifier poté newline \n (later) identifier #a space identifier #b space identifier #c space identifier ## space identifier #d newline \n (later) identifier @efg space identifier @ space identifier @@. space identifier @#@ space newline \n (later) identifier ## space identifier # space identifier #12345 space identifier #.# newline \n (later) identifier f@#\_.#6 newline \n (later) identifier GhIjK newline \n (later) start_command . identifier x space number 1 identifier y space unexpected_char \_ identifier z newline \n (later) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([identifiers that end in '.']) AT_KEYWORDS([segment]) AT_DATA([input], [dnl abcd. abcd. ABCD. ABCD. aBcD. aBcD. @&t@ $y. $z. あいうえお. #c. #d.. @@. @@.... #.#. #abcd. . . @&t@ LMNOP. @&t@ QRSTUV./* end of line comment */ qrstuv. /* end of line comment */ QrStUv./* end of line comment */ @&t@ wxyz./* unterminated end of line comment WXYZ. /* unterminated end of line comment WxYz./* unterminated end of line comment @&t@ ]) AT_DATA([expout], [dnl identifier abcd. space identifier abcd end_command . newline \n (first) identifier ABCD. space identifier ABCD end_command . newline \n (first) identifier aBcD. space identifier aBcD end_command . space newline \n (first) identifier $y. space identifier $z. space identifier あいうえお end_command . newline \n (first) identifier #c. space identifier #d. end_command . newline \n (first) identifier @@. space identifier @@... end_command . newline \n (first) identifier #.# end_command . newline \n (first) identifier #abcd end_command . newline \n (first) start_command . newline \n (first) start_command . space newline \n (first) identifier LMNOP end_command . space newline \n (first) identifier QRSTUV end_command . comment /*_end_of_line_comment_*/ newline \n (first) identifier qrstuv end_command . space comment /*_end_of_line_comment_*/ newline \n (first) identifier QrStUv end_command . comment /*_end_of_line_comment_*/ space newline \n (first) identifier wxyz end_command . comment /*_unterminated_end_of_line_comment newline \n (first) identifier WXYZ end_command . space comment /*_unterminated_end_of_line_comment newline \n (first) identifier WxYz end_command . comment /*_unterminated_end_of_line_comment_ newline \n (first) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([reserved words]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl and or not eq ge gt le lt ne all by to with AND OR NOT EQ GE GT LE LT NE ALL BY TO WITH andx orx notx eqx gex gtx lex ltx nex allx byx tox withx and. with. ]) AT_DATA([expout], [dnl reserved_word and space reserved_word or space reserved_word not space reserved_word eq space reserved_word ge space reserved_word gt space reserved_word le space reserved_word lt space reserved_word ne space reserved_word all space reserved_word by space reserved_word to space reserved_word with newline \n (later) reserved_word AND space reserved_word OR space reserved_word NOT space reserved_word EQ space reserved_word GE space reserved_word GT space reserved_word LE space reserved_word LT space reserved_word NE space reserved_word ALL space reserved_word BY space reserved_word TO space reserved_word WITH newline \n (later) identifier andx space identifier orx space identifier notx space identifier eqx space identifier gex space identifier gtx space identifier lex space identifier ltx space identifier nex space identifier allx space identifier byx space identifier tox space identifier withx newline \n (later) identifier and. space reserved_word with end_command . newline \n (first) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([punctuation]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl ~ & | = >= > <= < ~= <> ( ) , - + * / [[ ]] ** ~&|=>=><=<~=<>(),-+*/[[]]** ]) AT_DATA([expout], [dnl punct ~ space punct & space punct | space punct = space punct >= space punct > space punct <= space punct < space punct ~= space punct <> space punct ( space punct ) space punct , space punct - space punct + space punct * space punct / space punct [[ space punct ]] space punct ** newline \n (later) punct ~ punct & punct | punct = punct >= punct > punct <= punct < punct ~= punct <> punct ( punct ) punct , punct - punct + punct * punct / punct [[ punct ]] punct ** newline \n (later) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([numbers]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl 0 1 01 001. 1. 123. /* comment 1 */ /* comment 2 */ .1 0.1 00.1 00.10 5e1 6E-1 7e+1 6E+01 6e-03 .3E1 .4e-1 .5E+1 .6e+01 .7E-03 1.23e1 45.6E-1 78.9e+1 99.9E+01 11.2e-03 . 1e e1 1e+ 1e- ]) AT_DATA([expout], [dnl number 0 space number 1 space number 01 space number 001. space number 1 end_command . newline \n (first) number 123 end_command . space comment /*_comment_1_*/ space comment /*_comment_2_*/ newline \n (first) start_command . number 1 space number 0.1 space number 00.1 space number 00.10 newline \n (later) number 5e1 space number 6E-1 space number 7e+1 space number 6E+01 space number 6e-03 newline \n (later) start_command . number 3E1 space number .4e-1 space number .5E+1 space number .6e+01 space number .7E-03 newline \n (later) number 1.23e1 space number 45.6E-1 space number 78.9e+1 space number 99.9E+01 space number 11.2e-03 newline \n (later) start_command . space expected_exponent 1e space identifier e1 space expected_exponent 1e+ space expected_exponent 1e- newline \n (later) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([strings]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl 'x' "y" 'abc' 'Don''t' "Can't" 'Won''t' """quoted""" '"quoted"' '' "" 'missing end quote "missing double quote x"4142" X'5152' u'fffd' U"041" + new command + /* comment */ 'string continuation' + /* also a punctuator on blank line - 'new command' ]) AT_DATA([expout], [dnl quoted_string 'x' space quoted_string "y" space quoted_string 'abc' newline \n (later) quoted_string 'Don''t' space quoted_string "Can't" space quoted_string 'Won''t' newline \n (later) quoted_string """quoted""" space quoted_string '"quoted"' newline \n (later) quoted_string '' space quoted_string "" newline \n (later) expected_quote 'missing_end_quote newline \n (later) expected_quote "missing_double_quote newline \n (later) hex_string x"4142" space hex_string X'5152' newline \n (later) unicode_string u'fffd' space unicode_string U"041" newline \n (later) start_command + space identifier new space identifier command newline \n (later) punct + space comment /*_comment_*/ space quoted_string 'string_continuation' newline \n (later) punct + space comment /*_also_a_punctuator_on_blank_line newline \n (later) start_command - space quoted_string 'new_command' newline \n (later) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([@%:@! construct]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl #! /usr/bin/pspp title my title. #! /usr/bin/pspp ]) AT_DATA([expout], [dnl shbang #!_/usr/bin/pspp newline \n (first) identifier title space unquoted_string my_title end_command . newline \n (first) identifier # unexpected_char ! space punct / identifier usr punct / identifier bin punct / identifier pspp newline \n (later) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([* and COMMENT commands]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl * Comment commands "don't have to contain valid tokens. ** Check ambiguity with ** token. ****************. comment keyword works too. COMM also. com is ambiguous with COMPUTE. * Comment need not start at left margin. * Comment ends with blank line next command. ]) AT_DATA([expout], [dnl comment_command *_Comment_commands_"don't newline \n (COMMENT) comment_command have_to_contain_valid_tokens end_command . newline \n (first) separate_commands newline \n (first) comment_command **_Check_ambiguity_with_**_token end_command . newline \n (first) comment_command **************** end_command . newline \n (first) separate_commands newline \n (first) comment_command comment_keyword_works_too end_command . newline \n (first) comment_command COMM_also end_command . newline \n (first) identifier com space identifier is space identifier ambiguous space reserved_word with space identifier COMPUTE end_command . newline \n (first) separate_commands newline \n (first) spaces ___ comment_command *_Comment_need_not_start_at_left_margin end_command . newline \n (first) separate_commands newline \n (first) comment_command *_Comment_ends_with_blank_line newline \n (COMMENT) separate_commands newline \n (first) identifier next space identifier command end_command . newline \n (first) separate_commands newline \n (first) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([DOCUMENT command]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl DOCUMENT one line. DOC more than one line. docu first.paragraph isn't parsed as tokens second paragraph. ]) AT_DATA([expout], [dnl start_document document DOCUMENT_one_line. end_command separate_commands newline \n (first) start_document document DOC_more newline \n (DOCUMENT) document ____than newline \n (DOCUMENT) document ________one newline \n (DOCUMENT) document ____________line. end_command separate_commands newline \n (first) start_document document docu newline \n (DOCUMENT) document first.paragraph newline \n (DOCUMENT) document isn't_parsed_as_tokens newline \n (DOCUMENT) document newline \n (DOCUMENT) document second_paragraph. end_command separate_commands newline \n (first) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([TITLE, SUBTITLE, FILE LABEL commands]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl title/**/'Quoted string title'. tit /* "Quoted string on second line". sub "Quoted string subtitle" . TITL /* Not a */ quoted string title. SUBT Not a quoted string /* subtitle FIL label isn't quoted. FILE lab 'is quoted'. FILE /* /**/ lab not quoted here either ]) AT_DATA([expout], [dnl identifier title comment /**/ quoted_string 'Quoted_string_title' end_command . newline \n (first) identifier tit space comment /* newline \n (later) quoted_string "Quoted_string_on_second_line" end_command . newline \n (first) identifier sub space quoted_string "Quoted_string_subtitle" newline \n (later) space end_command . newline \n (first) separate_commands newline \n (first) identifier TITL space unquoted_string /*_Not_a_*/_quoted_string_title end_command . newline \n (first) identifier SUBT space unquoted_string Not_a_quoted_string_/*_subtitle newline \n (later) separate_commands newline \n (first) identifier FIL space identifier label space unquoted_string isn't_quoted end_command . newline \n (first) identifier FILE newline \n (later) spaces __ identifier lab space quoted_string 'is_quoted' end_command . newline \n (first) identifier FILE space comment /* newline \n (later) comment /**/ spaces __ identifier lab space unquoted_string not_quoted_here_either newline \n (later) separate_commands newline \n (first) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([BEGIN DATA command]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl begin data. end data. begin data. /* 123 xxx end data. BEG /**/ DAT /* 5 6 7 /* x end data end data . begin data. data end data. begin data "xxx". begin data 123. not data ]) AT_DATA([expout], [dnl identifier begin space identifier data end_command . newline \n (data) identifier end space identifier data end_command . newline \n (first) separate_commands newline \n (first) identifier begin space identifier data end_command . space comment /* newline \n (data) inline_data 123 newline \n (data) inline_data xxx newline \n (data) identifier end space identifier data end_command . newline \n (first) separate_commands newline \n (first) identifier BEG space comment /**/ space identifier DAT space comment /* newline \n (data) inline_data 5_6_7_/*_x newline \n (data) inline_data newline \n (data) inline_data end__data newline \n (data) identifier end space identifier data newline \n (later) start_command . newline \n (first) separate_commands newline \n (first) identifier begin newline \n (later) space identifier data end_command . newline \n (data) inline_data data newline \n (data) identifier end space identifier data end_command . newline \n (first) separate_commands newline \n (first) identifier begin space identifier data space quoted_string "xxx" end_command . newline \n (first) identifier begin space identifier data space number 123 end_command . newline \n (first) reserved_word not space identifier data newline \n (later) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([DO REPEAT command]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl do repeat x=a b c y=d e f. do repeat a=1 thru 5. another command. second command + third command. end /* x */ /* y */ repeat print. end repeat. do repeat #a=1. inner command. end repeat. ]) AT_DATA([expout], [dnl identifier do space identifier repeat space identifier x punct = identifier a space identifier b space identifier c newline \n (later) spaces __________ identifier y punct = identifier d space identifier e space identifier f end_command . newline \n (DO REPEAT) do_repeat_command __do_repeat_a=1_thru_5. newline \n (DO REPEAT) do_repeat_command another_command. newline \n (DO REPEAT) do_repeat_command second_command newline \n (DO REPEAT) do_repeat_command +_third_command. newline \n (DO REPEAT) do_repeat_command end_/*_x_*/_/*_y_*/_repeat_print. newline \n (DO REPEAT) identifier end newline \n (later) space identifier repeat end_command . newline \n (first) identifier do newline \n (later) spaces __ identifier repeat space identifier #a punct = number 1 end_command . newline \n (DO REPEAT) do_repeat_command __inner_command. newline \n (DO REPEAT) identifier end space identifier repeat end_command . newline \n (first) end ]) PSPP_CHECK_SEGMENT([-i]) AT_CLEANUP AT_SETUP([batch mode]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl first command another line of first command + second command third command fourth command. fifth command. ]) AT_DATA([expout], [dnl identifier first space identifier command newline \n (later) spaces _____ identifier another space identifier line space identifier of space identifier first space identifier command newline \n (later) start_command + spaces __ identifier second space identifier command newline \n (later) start_command identifier third space identifier command newline \n (later) separate_commands newline \n (first) identifier fourth space identifier command end_command . newline \n (first) spaces ___ identifier fifth space identifier command end_command . newline \n (first) end ]) PSPP_CHECK_SEGMENT([-b]) AT_CLEANUP AT_SETUP([auto mode]) AT_KEYWORDS([segment]) AT_DATA([input], [dnl command another line of command 2sls + another command another line of second command data list /x 1 aggregate. print eject. twostep cluster fourth command. fifth command. ]) AT_DATA([expout], [dnl identifier command newline \n (later) spaces _____ identifier another space identifier line space identifier of space identifier command newline \n (later) start_command number 2 identifier sls newline \n (later) start_command + spaces __ identifier another space identifier command newline \n (later) identifier another space identifier line space identifier of space identifier second space identifier command newline \n (later) start_command identifier data space identifier list space punct / identifier x space number 1 newline \n (later) start_command identifier aggregate end_command . newline \n (first) identifier print space identifier eject end_command . newline \n (first) identifier twostep space identifier cluster newline \n (later) separate_commands newline \n (first) separate_commands newline \n (first) identifier fourth space identifier command end_command . newline \n (first) spaces ___ identifier fifth space identifier command end_command . newline \n (first) end ]) PSPP_CHECK_SEGMENT([-a]) AT_CLEANUP pspp-1.0.1/tests/language/lexer/command-name.at0000644000175000017500000001657013137223525016356 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([command name matching]) AT_SETUP([single words]) AT_KEYWORDS([command name matching]) AT_CHECK([command-name-test DESCRIPTIVES , DESCRIPTIVESX DESCRIPTIVES descr Des DEX DE '' 'DESCRIPTIVES MORE' 'DESCRIPTIVES@<00A0>@MORE'], [0], [dnl string="DESCRIPTIVESX": command="DESCRIPTIVES" match=no match: none, missing_words=0 string="DESCRIPTIVES": command="DESCRIPTIVES" match=yes exact=yes missing_words=0 match: DESCRIPTIVES, missing_words=0 string="descr": command="DESCRIPTIVES" match=yes exact=no missing_words=0 match: DESCRIPTIVES, missing_words=0 string="Des": command="DESCRIPTIVES" match=yes exact=no missing_words=0 match: DESCRIPTIVES, missing_words=0 string="DEX": command="DESCRIPTIVES" match=no match: none, missing_words=0 string="DE": command="DESCRIPTIVES" match=no match: none, missing_words=0 string="": command="DESCRIPTIVES" match=yes exact=yes missing_words=1 match: none, missing_words=1 string="DESCRIPTIVES MORE": command="DESCRIPTIVES" match=yes exact=yes missing_words=-1 match: DESCRIPTIVES, missing_words=-1 string="DESCRIPTIVES@<00A0>@MORE": command="DESCRIPTIVES" match=yes exact=yes missing_words=-1 match: DESCRIPTIVES, missing_words=-1 ]) AT_CLEANUP AT_SETUP([two words without prefix match]) AT_KEYWORDS([command name matching]) AT_CHECK([command-name-test 'DO IF' 'DO REPEAT' , 'DO@<00A0>@IF' 'DO REPEAT' 'DO REP' 'DO OTHER' 'D IF' 'DO I' DO], [0], [dnl string="DO@<00A0>@IF": command="DO IF" match=yes exact=yes missing_words=0 command="DO REPEAT" match=no match: DO IF, missing_words=0 string="DO REPEAT": command="DO IF" match=no command="DO REPEAT" match=yes exact=yes missing_words=0 match: DO REPEAT, missing_words=0 string="DO REP": command="DO IF" match=no command="DO REPEAT" match=yes exact=no missing_words=0 match: DO REPEAT, missing_words=0 string="DO OTHER": command="DO IF" match=no command="DO REPEAT" match=no match: none, missing_words=0 string="D IF": command="DO IF" match=no command="DO REPEAT" match=no match: none, missing_words=0 string="DO I": command="DO IF" match=no command="DO REPEAT" match=no match: none, missing_words=0 string="DO": command="DO IF" match=yes exact=yes missing_words=1 command="DO REPEAT" match=yes exact=yes missing_words=1 match: none, missing_words=1 ]) AT_CLEANUP AT_SETUP([two words with prefix match]) AT_KEYWORDS([command name matching]) AT_CHECK([command-name-test GET 'GET DATA' , GET 'GET TYPE' 'GET DAT' 'GET DATA'], [0], [dnl string="GET": command="GET" match=yes exact=yes missing_words=0 command="GET DATA" match=yes exact=yes missing_words=1 match: none, missing_words=1 string="GET TYPE": command="GET" match=yes exact=yes missing_words=-1 command="GET DATA" match=no match: GET, missing_words=-1 string="GET DAT": command="GET" match=yes exact=yes missing_words=-1 command="GET DATA" match=yes exact=no missing_words=0 match: GET DATA, missing_words=0 string="GET DATA": command="GET" match=yes exact=yes missing_words=-1 command="GET DATA" match=yes exact=yes missing_words=0 match: GET DATA, missing_words=0 ]) AT_CLEANUP AT_SETUP([ambiguous single-word names]) AT_KEYWORDS([command name matching]) AT_CHECK([command-name-test CASEPLOT CASESTOVARS , CAS Case CaseP CaseS], [0], [dnl string="CAS": command="CASEPLOT" match=yes exact=no missing_words=0 command="CASESTOVARS" match=yes exact=no missing_words=0 match: none, missing_words=0 string="Case": command="CASEPLOT" match=yes exact=no missing_words=0 command="CASESTOVARS" match=yes exact=no missing_words=0 match: none, missing_words=0 string="CaseP": command="CASEPLOT" match=yes exact=no missing_words=0 command="CASESTOVARS" match=no match: CASEPLOT, missing_words=0 string="CaseS": command="CASEPLOT" match=no command="CASESTOVARS" match=yes exact=no missing_words=0 match: CASESTOVARS, missing_words=0 ]) AT_CLEANUP AT_SETUP([ambiguous two-word names]) AT_KEYWORDS([command name matching]) AT_CHECK([command-name-test VARCOMP VARSTOCASES 'VARIABLE ATTRIBUTE' , VAR VARC VARS VARI 'VAR@<00A0>@ATT'], [0], [dnl string="VAR": command="VARCOMP" match=yes exact=no missing_words=0 command="VARSTOCASES" match=yes exact=no missing_words=0 command="VARIABLE ATTRIBUTE" match=yes exact=no missing_words=1 match: none, missing_words=1 string="VARC": command="VARCOMP" match=yes exact=no missing_words=0 command="VARSTOCASES" match=no command="VARIABLE ATTRIBUTE" match=no match: VARCOMP, missing_words=0 string="VARS": command="VARCOMP" match=no command="VARSTOCASES" match=yes exact=no missing_words=0 command="VARIABLE ATTRIBUTE" match=no match: VARSTOCASES, missing_words=0 string="VARI": command="VARCOMP" match=no command="VARSTOCASES" match=no command="VARIABLE ATTRIBUTE" match=yes exact=no missing_words=1 match: none, missing_words=1 string="VAR@<00A0>@ATT": command="VARCOMP" match=yes exact=no missing_words=-1 command="VARSTOCASES" match=yes exact=no missing_words=-1 command="VARIABLE ATTRIBUTE" match=yes exact=no missing_words=0 match: VARIABLE ATTRIBUTE, missing_words=0 ]) AT_CLEANUP AT_SETUP([numbers and punctuation]) AT_KEYWORDS([command name matching]) AT_CHECK([command-name-test T-TEST 2SLS LIST , T-TEST 'T - Test' 2SLS '2 SLS' List], [0], [dnl string="T-TEST": command="T-TEST" match=yes exact=yes missing_words=0 command="2SLS" match=no command="LIST" match=no match: T-TEST, missing_words=0 string="T - Test": command="T-TEST" match=yes exact=yes missing_words=0 command="2SLS" match=no command="LIST" match=no match: T-TEST, missing_words=0 string="2SLS": command="T-TEST" match=no command="2SLS" match=yes exact=yes missing_words=0 command="LIST" match=no match: 2SLS, missing_words=0 string="2 SLS": command="T-TEST" match=no command="2SLS" match=yes exact=yes missing_words=0 command="LIST" match=no match: 2SLS, missing_words=0 string="List": command="T-TEST" match=no command="2SLS" match=no command="LIST" match=yes exact=yes missing_words=0 match: LIST, missing_words=0 ]) AT_CLEANUP AT_SETUP([off by more than one word]) AT_KEYWORDS([command name matching]) AT_CHECK([command-name-test 'a@<00A0>@b c' , a 'a b' 'a b c' 'a@<00A0>@b c d' 'a b c@<00A0>@d e'], [0], [dnl string="a": command="a@<00A0>@b c" match=yes exact=yes missing_words=2 match: none, missing_words=1 string="a b": command="a@<00A0>@b c" match=yes exact=yes missing_words=1 match: none, missing_words=1 string="a b c": command="a@<00A0>@b c" match=yes exact=yes missing_words=0 match: a@<00A0>@b c, missing_words=0 string="a@<00A0>@b c d": command="a@<00A0>@b c" match=yes exact=yes missing_words=-1 match: a@<00A0>@b c, missing_words=-1 string="a b c@<00A0>@d e": command="a@<00A0>@b c" match=yes exact=yes missing_words=-2 match: a@<00A0>@b c, missing_words=-2 ]) AT_CLEANUP pspp-1.0.1/tests/language/lexer/variable-parser.at0000644000175000017500000000373713137223525017102 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([Variable parser]) dnl This program tests that both long and short variable names are parsed OK. dnl It use CROSSTABS, since its TABLES subcommand exercises the array var set dnl feature. AT_SETUP([Long variable names]) AT_DATA([longvars.sps], [dnl DATA LIST LIST /AlphaBetaGamma * B * X * Yabbadabbadoo * . BEGIN DATA. 2 3 4 5 END DATA. LIST. CROSSTABS VARIABLES X (1,7) Yabbadabbadoo (1,7) /TABLES X BY Yabbadabbadoo. ]) AT_CHECK([pspp -o pspp.csv longvars.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format AlphaBetaGamma,F8.0 B,F8.0 X,F8.0 Yabbadabbadoo,F8.0 Table: Data List AlphaBetaGamma,B,X,Yabbadabbadoo 2.00,3.00,4.00,5.00 Table: Summary. ,Cases,,,,, ,Valid,,Missing,,Total, ,N,Percent,N,Percent,N,Percent X * Yabbadabbadoo,1,100.0%,0,0.0%,1,100.0% Table: X * Yabbadabbadoo [[count]]. ,Yabbadabbadoo,,,,,,, X,1.00,2.00,3.00,4.00,5.00,6.00,7.00,Total 1.00,.00,.00,.00,.00,.00,.00,.00,.00 2.00,.00,.00,.00,.00,.00,.00,.00,.00 3.00,.00,.00,.00,.00,.00,.00,.00,.00 4.00,.00,.00,.00,.00,1.00,.00,.00,1.00 5.00,.00,.00,.00,.00,.00,.00,.00,.00 6.00,.00,.00,.00,.00,.00,.00,.00,.00 7.00,.00,.00,.00,.00,.00,.00,.00,.00 Total,.00,.00,.00,.00,1.00,.00,.00,1.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/lexer/scan-test.c0000644000175000017500000001034212470434666015541 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/misc.h" #include "language/lexer/scan.h" #include "language/lexer/token.h" #include "gl/error.h" #include "gl/ftoastr.h" #include "gl/progname.h" #include "gl/read-file.h" #include "gl/xalloc.h" /* -a/--auto, -b/--batch, -i/--interactive: syntax mode. */ static enum segmenter_mode mode = SEG_MODE_AUTO; static const char *parse_options (int argc, char **argv); static void usage (void) NO_RETURN; int main (int argc, char *argv[]) { const char *file_name; size_t length; char *input; struct string_lexer slex; bool more; set_program_name (argv[0]); file_name = parse_options (argc, argv); /* Read from stdin into 'input'. Ensure that 'input' ends in a new-line followed by a null byte. */ input = (!strcmp (file_name, "-") ? fread_file (stdin, &length) : read_file (file_name, &length)); if (input == NULL) error (EXIT_FAILURE, errno, "reading %s failed", file_name); input = xrealloc (input, length + 3); if (length == 0 || input[length - 1] != '\n') input[length++] = '\n'; input[length++] = '\0'; string_lexer_init (&slex, input, mode); do { struct token token; more = string_lexer_next (&slex, &token); printf ("%s", scan_type_to_string (token.type)); if (token.number != 0.0) { double x = token.number; if (x > LONG_MIN && x <= LONG_MAX && floor (x) == x) printf (" %ld", (long int) x); else printf (" %.3g", x); } if (token.string.string != NULL || token.string.length > 0) printf (" \"%.*s\"", (int) token.string.length, token.string.string); printf ("\n"); token_destroy (&token); } while (more); free (input); return 0; } static const char * parse_options (int argc, char **argv) { for (;;) { static const struct option options[] = { {"auto", no_argument, NULL, 'a'}, {"batch", no_argument, NULL, 'b'}, {"interactive", no_argument, NULL, 'i'}, {"help", no_argument, NULL, 'h'}, {NULL, 0, NULL, 0}, }; int c = getopt_long (argc, argv, "abih", options, NULL); if (c == -1) break; switch (c) { case 'a': mode = SEG_MODE_AUTO; break; case 'b': mode = SEG_MODE_BATCH; break; case 'i': mode = SEG_MODE_INTERACTIVE; break; case 'h': usage (); case 0: break; case '?': exit (EXIT_FAILURE); break; default: NOT_REACHED (); } } if (optind + 1 != argc) error (1, 0, "exactly one non-option argument required; " "use --help for help"); return argv[optind]; } static void usage (void) { printf ("\ %s, to test breaking PSPP syntax into tokens\n\ usage: %s [OPTIONS] INPUT\n\ \n\ Options:\n\ -1, --one-segment feed one segment at a time\n\ -a, --auto use \"auto\" syntax mode\n\ -b, --batch use \"batch\" syntax mode\n\ -i, --interactive use \"interactive\" syntax mode (default)\n\ -v, --verbose include rows and column numbers in output\n\ -h, --help print this help message\n", program_name, program_name); exit (EXIT_SUCCESS); } pspp-1.0.1/tests/language/expressions/0000755000175000017500000000000013150620333014777 500000000000000pspp-1.0.1/tests/language/expressions/parse.at0000644000175000017500000000324413137223525016371 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([expression parsing]) AT_SETUP([parse expression with unknown variable crash]) AT_DATA([parse.sps], [dnl INPUT PROGRAM. LOOP c=1 to 10. COMPUTE var1=NORMAL(100). END CASE. END LOOP. END FILE. END INPUT PROGRAM. IF ( y > 0 ) . COMPUTE x=y. END IF. ]) AT_CHECK([pspp -O format=csv parse.sps], [1], [dnl parse.sps:10: error: IF: Unknown identifier y. parse.sps:11: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. ]) AT_CLEANUP AT_SETUP([parse expression with invalid logical expression]) AT_DATA([parse.sps], [dnl INPUT PROGRAM. LOOP c=1 to 10. COMPUTE var1=NORMAL(100). END CASE. END LOOP. END FILE. END INPUT PROGRAM. SELECT IF 2. ]) AT_CHECK([pspp -O format=csv parse.sps], [1], [dnl "parse.sps:9: error: SELECT IF: A logical expression was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0." ]) AT_CLEANUP pspp-1.0.1/tests/language/expressions/evaluate.at0000644000175000017500000032345713137223525017100 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl m4_define([CHECK_EXPR_EVAL], [AT_SETUP([expressions - $1]) AT_DATA([evaluate.sps], [set mxwarn 1000. set mxerr 1000. set epoch 1940. m4_foreach([check], [m4_shift($@)], [DEBUG EVALUATE NOOPT m4_argn(4, check)/[]m4_car(check). DEBUG EVALUATE m4_argn(4, check)/[]m4_car(check). ])]) AT_CAPTURE_FILE([evaluate.sps]) m4_pushdef([i], [3]) AT_CHECK([pspp --testing-mode --error-file=- --no-output evaluate.sps], [m4_if(m4_bregexp([m4_foreach([check], [m4_shift($@)], [m4_argn(3, check)])], [error:]), [-1], [0], [1])], [stdout]) # Use sed to transform "file:line.column:" into plain "file:line:", # because column numbers change between opt and noopt versions. AT_CHECK([[sed 's/\(evaluate.sps:[0-9]\{1,\}\)\.[0-9]\{1,\}:/\1:/' stdout]], [0], [m4_foreach([check], [m4_shift($@)], [m4_define([i], m4_incr(i))dnl m4_if(m4_argn(3, check), [], [], [evaluate.sps:[]i[]: m4_argn(3, check) ])dnl m4_argn(2, check) m4_define([i], m4_incr(i))dnl m4_if(m4_argn(3, check), [], [], [evaluate.sps:[]i[]: m4_argn(3, check) ])dnl m4_argn(2, check) ])], []) m4_popdef([i]) AT_CLEANUP]) AT_BANNER([expressions]) CHECK_EXPR_EVAL([numeric syntax], [[1e2], [100.00]], [[1e+2], [100.00]], [[1e-2], [0.01]], [[1e-99], [0.00]]) CHECK_EXPR_EVAL([coercion to/from Boolean], [[0 AND 1], [false]], [[$true AND 1], [true]], [[1 OR $false], [true]], [[1 OR $sysmis], [true]], [[2 OR $sysmis], [sysmis], [error: DEBUG EVALUATE: An operand of the logical disjunction (`OR') operator was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0.]], [[2 AND $sysmis], [false], [error: DEBUG EVALUATE: An operand of the logical conjunction (`AND') operator was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0.]], [['string' AND $sysmis], [error], [error: DEBUG EVALUATE: Type mismatch while applying logical conjunction (`AND') operator: cannot convert string to boolean.]], [[0 AND $sysmis], [false]], [[(1>2) + 1], [1.00]], [[$true + $false], [1.00]]) CHECK_EXPR_EVAL([addition and subtraction], [[1 + 2], [3.00]], [[1 + $true], [2.00]], [[$sysmis + 1], [sysmis]], [[7676 + $sysmis], [sysmis]], [[('foo') + 5], [error], [error: DEBUG EVALUATE: Type mismatch while applying addition (`+') operator: cannot convert string to number.]], dnl Arithmetic concatenation requires CONCAT: [[('foo') + ('bar')], [error], [error: DEBUG EVALUATE: Type mismatch while applying addition (`+') operator: cannot convert string to number.]], dnl Lexical concatenation succeeds: [['foo' + 'bar'], ["foobar"]], [[1 +3 - 2 +4 -5], [1.00]], [[1 - $true], [0.00]], [[$true - 4/3], [-0.33]], [['string' - 1e10], [error], [error: DEBUG EVALUATE: Type mismatch while applying subtraction (`-') operator: cannot convert string to number.]], [[9.5 - ''], [error], [error: DEBUG EVALUATE: Type mismatch while applying subtraction (`-') operator: cannot convert string to number.]], [[1 - 2], [-1.00]], [[52 -23], [29.00]]) CHECK_EXPR_EVAL([multiplication and division], [[5 * 10], [50.00]], [[10 * $true], [10.00]], [[$true * 5], [5.00]], [[1.5 * $true], [1.50]], [[5 * $sysmis], [sysmis]], [[$sysmis * 15], [sysmis]], [[2 * 5 / 10], [1.00]], [[1 / 2], [0.50]], [[2 / 5], [0.40]], [[12 / 3 / 2], [2.00]]) CHECK_EXPR_EVAL([exponentiation], [[2**8], [256.00]], [[(2**3)**4], [4096.00]], [[2**3**4], [4096.00], [warning: DEBUG EVALUATE: The exponentiation operator (`**') is left-associative, even though right-associative semantics are more useful. That is, `a**b**c' equals `(a**b)**c', not as `a**(b**c)'. To disable this warning, insert parentheses.]]) CHECK_EXPR_EVAL([unary minus], [[2+-3], [-1.00]], [[2*-3], [-6.00]], [[-3**2], [-9.00]], [[(-3)**2], [9.00]], [[2**-1], [0.50]], [[0**0], [sysmis]], [[0**-1], [sysmis]], [[(-3)**1.5], [sysmis]]) CHECK_EXPR_EVAL([AND truth table], [[$false AND $false], [false]], [[$false AND $true], [false]], [[$false AND $sysmis], [false]], [[$true AND $false], [false]], [[$true AND $true], [true]], [[$true AND $sysmis], [sysmis]], [[$sysmis AND $false], [false]], [[$sysmis AND $true], [sysmis]], [[$sysmis AND $sysmis], [sysmis]], [[$false & $false], [false]], [[$false & $true], [false]], [[$false & $sysmis], [false]], [[$true & $false], [false]], [[$true & $true], [true]], [[$true & $sysmis], [sysmis]], [[$sysmis & $false], [false]], [[$sysmis & $true], [sysmis]], [[$sysmis & $sysmis], [sysmis]]) CHECK_EXPR_EVAL([OR truth table], [[$false OR $false], [false]], [[$false OR $true], [true]], [[$false OR $sysmis], [sysmis]], [[$true OR $false], [true]], [[$true OR $true], [true]], [[$true OR $sysmis], [true]], [[$sysmis OR $false], [sysmis]], [[$sysmis OR $true], [true]], [[$sysmis OR $sysmis], [sysmis]], [[$false | $false], [false]], [[$false | $true], [true]], [[$false | $sysmis], [sysmis]], [[$true | $false], [true]], [[$true | $true], [true]], [[$true | $sysmis], [true]], [[$sysmis | $false], [sysmis]], [[$sysmis | $true], [true]], [[$sysmis | $sysmis], [sysmis]]) CHECK_EXPR_EVAL([NOT truth table], [[not $false], [true]], [[not 0], [true]], [[not 2.5], [true], [error: DEBUG EVALUATE: An operand of the logical negation (`NOT') operator was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0.]], [[not $true], [false]], [[not 1], [false]], [[not $sysmis], [sysmis]], [[~ $false], [true]], [[~ 0], [true]], [[~ 2.5], [true], [error: DEBUG EVALUATE: An operand of the logical negation (`NOT') operator was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0.]], [[~ $true], [false]], [[~ 1], [false]], [[~ $sysmis], [sysmis]]) CHECK_EXPR_EVAL([= <= <], [[1 eq 1], [true]], [[1 = 1], [true]], [[1 eq 2], [false]], [[2 = 3], [false]], [[1 eq 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric equality (`EQ') operator: cannot convert string to number.]], [[5 eq 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric equality (`EQ') operator: cannot convert string to number.]], [['baz' = 10], [error], [error: DEBUG EVALUATE: Type mismatch while applying string equality (`=') operator: cannot convert number to string.]], [['quux' = 5.55], [error], [error: DEBUG EVALUATE: Type mismatch while applying string equality (`=') operator: cannot convert number to string.]], [['foobar' = 'foobar'], [true]], [['quux' = 'bar'], [false]], [['bar ' = 'bar'], [true]], [['asdf ' = 'asdf '], [true]], [['asdfj ' = 'asdf'], [false]], dnl Check precedence: [[1 + 2 = 3], [true]], [[1 >= 2 = 2 ge 3], [false], [warning: DEBUG EVALUATE: Chaining relational operators (e.g. `a < b < c') will not produce the mathematically expected result. Use the AND logical operator to fix the problem (e.g. `a < b AND b < c'). If chaining is really intended, parentheses will disable this warning (e.g. `(a < b) < c'.)]], dnl Mathematically true: [[3 ne 2 ~= 1], [false], [warning: DEBUG EVALUATE: Chaining relational operators (e.g. `a < b < c') will not produce the mathematically expected result. Use the AND logical operator to fix the problem (e.g. `a < b AND b < c'). If chaining is really intended, parentheses will disable this warning (e.g. `(a < b) < c'.)]], [[3 > 2 > 1], [false], [warning: DEBUG EVALUATE: Chaining relational operators (e.g. `a < b < c') will not produce the mathematically expected result. Use the AND logical operator to fix the problem (e.g. `a < b AND b < c'). If chaining is really intended, parentheses will disable this warning (e.g. `(a < b) < c'.)]], [[1 <= 2], [true]], [[2.5 <= 1.5], [false]], [[1 le 2], [true]], [[2 <= 2], [true]], [[2 le 2], [true]], dnl Make sure <= token can't be split: [[2 < = 2], [error], [error: DEBUG EVALUATE: Syntax error at `='.]], [[1 <= 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric less-than-or-equal-to (`<=') operator: cannot convert string to number.]], [[5 <= 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric less-than-or-equal-to (`<=') operator: cannot convert string to number.]], [['baz' <= 10], [error], [error: DEBUG EVALUATE: Type mismatch while applying string less-than-or-equal-to (`<=') operator: cannot convert number to string.]], [['quux' <= 5.55], [error], [error: DEBUG EVALUATE: Type mismatch while applying string less-than-or-equal-to (`<=') operator: cannot convert number to string.]], [['0123' <= '0123'], [true]], [['0123' <= '0124'], [true]], [['0124' le '0123'], [false]], [['0123 ' <= '0123'], [true]], [['0123' le '0123 '], [true]], [[1 < 2], [true]], [[2.5 < 1.5], [false]], [[3.5 lt 4], [true]], [[4 lt 3.5], [false]], [[1 lt 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric less than (`<') operator: cannot convert string to number.]], [[5 lt 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric less than (`<') operator: cannot convert string to number.]], [['baz' < 10], [error], [error: DEBUG EVALUATE: Type mismatch while applying string less than (`<') operator: cannot convert number to string.]], [['quux' < 5.55], [error], [error: DEBUG EVALUATE: Type mismatch while applying string less than (`<') operator: cannot convert number to string.]], [['0123' lt '0123'], [false]], [['0123' < '0124'], [true]], [['0124' lt '0123'], [false]], [['0123 ' < '0123'], [false]], [['0123' lt '0123 '], [false]]) CHECK_EXPR_EVAL([>= > <>], [[1 >= 2], [false]], [[2.5 >= 1.5], [true]], [[1 ge 2], [false]], [[2 >= 2], [true]], [[2 ge 2], [true]], dnl Make sure >= token can't be split: [[2 > = 2], [error], [error: DEBUG EVALUATE: Syntax error at `='.]], [[1 >= 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric greater-than-or-equal-to (`>=') operator: cannot convert string to number.]], [[5 ge 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric greater-than-or-equal-to (`>=') operator: cannot convert string to number.]], [['baz' ge 10], [error], [error: DEBUG EVALUATE: Type mismatch while applying string greater-than-or-equal-to (`>=') operator: cannot convert number to string.]], [['quux' >= 5.55], [error], [error: DEBUG EVALUATE: Type mismatch while applying string greater-than-or-equal-to (`>=') operator: cannot convert number to string.]], [['0123' ge '0123'], [true]], [['0123' >= '0124'], [false]], [['0124' >= '0123'], [true]], [['0123 ' ge '0123'], [true]], [['0123' >= '0123 '], [true]], [[1 > 2], [false]], [[2.5 > 1.5], [true]], [[3.5 gt 4], [false]], [[4 gt 3.5], [true]], [[1 gt 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric greater than (`>') operator: cannot convert string to number.]], [[5 gt 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric greater than (`>') operator: cannot convert string to number.]], [['baz' > 10], [error], [error: DEBUG EVALUATE: Type mismatch while applying string greater than (`>') operator: cannot convert number to string.]], [['quux' > 5.55], [error], [error: DEBUG EVALUATE: Type mismatch while applying string greater than (`>') operator: cannot convert number to string.]], [['0123' gt '0123'], [false]], [['0123' > '0124'], [false]], [['0124' gt '0123'], [true]], [['0123 ' > '0123'], [false]], [['0123' gt '0123 '], [false]], [[1 ne 1], [false]], [[1 ~= 1], [false]], [[1 <> 2], [true]], [[2 ne 3], [true]], [[1 ~= 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric inequality (`<>') operator: cannot convert string to number.]], [[5 <> 'foobar'], [error], [error: DEBUG EVALUATE: Type mismatch while applying numeric inequality (`<>') operator: cannot convert string to number.]], [['baz' ne 10], [error], [error: DEBUG EVALUATE: Type mismatch while applying string inequality (`<>') operator: cannot convert number to string.]], [['quux' ~= 5.55], [error], [error: DEBUG EVALUATE: Type mismatch while applying string inequality (`<>') operator: cannot convert number to string.]], [['foobar' <> 'foobar'], [false]], [['quux' ne 'bar'], [true]], [['bar ' <> 'bar'], [false]], [['asdf ' ~= 'asdf '], [false]], [['asdfj ' ne 'asdf'], [true]], dnl <> token can't be split: [[1 < > 1], [error], [error: DEBUG EVALUATE: Syntax error at `>'.]], dnl # ~= token can't be split: [[1 ~ = 1], [error], [error: DEBUG EVALUATE: Syntax error at `~': expecting end of command.]]) CHECK_EXPR_EVAL([exp lg10 ln sqrt abs mod mod10 rnd trunc], [[exp(10)], [22026.47]], [[exp('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking EXP(number) as exp(string).]], [[lg10(500)], [2.70]], [[lg10('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking LG10(number) as lg10(string).]], [[ln(10)], [2.30]], [[ln('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking LN(number) as ln(string).]], [[sqrt(500)], [22.36]], [[sqrt('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking SQRT(number) as sqrt(string).]], [[abs(-10.5)], [10.50]], [[abs(-55.79)], [55.79]], [[abs(22)], [22.00]], [[abs(0)], [0.00]], [[mod(55.5, 2)], [1.50]], [[mod(-55.5, 2)], [-1.50]], [[mod(55.5, -2)], [1.50]], [[mod(-55.5, -2)], [-1.50]], [[mod('a', 2)], [error], [error: DEBUG EVALUATE: Type mismatch invoking MOD(number, number) as mod(string, number).]], [[mod(2, 'a')], [error], [error: DEBUG EVALUATE: Type mismatch invoking MOD(number, number) as mod(number, string).]], [[mod('a', 'b')], [error], [error: DEBUG EVALUATE: Type mismatch invoking MOD(number, number) as mod(string, string).]], [[mod10(55.5)], [5.50]], [[mod10(-55.5)], [-5.50]], [[mod10('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking MOD10(number) as mod10(string).]], [[rnd(5.4)], [5.00]], [[rnd(5.6)], [6.00]], [[rnd(-5.4)], [-5.00]], [[rnd(-5.6)], [-6.00]], [[rnd(5.56, .1)], [5.60]], [[rnd(-5.56, .1)], [-5.60]], [[rnd(.5)], [1.00]], [[rnd(.5 - 2**-53)], [1.00]], [[rnd(.5 - 2**-52)], [1.00]], [[rnd(.5 - 2**-51)], [1.00]], [[rnd(.5 - 2**-45)], [0.00]], [[rnd(.5 - 2**-45, 1, 10)], [1.00]], [[rnd('x')], [error], [error: DEBUG EVALUATE: Function invocation rnd(string) does not match any known function. Candidates are: RND(number) RND(number, number) RND(number, number, number).]], [[trunc(1.2)], [1.00]], [[trunc(1.9)], [1.00]], [[trunc(-1.2)], [-1.00]], [[trunc(-1.9)], [-1.00]], [[trunc(5.06, .1)], [5.00]], [[trunc(-5.06, .1)], [-5.00]], [[trunc(1)], [1.00]], [[trunc(1 - 2**-53)], [1.00]], [[trunc(1 - 2**-52)], [1.00]], [[trunc(1 - 2**-51)], [1.00]], [[trunc(1 - 2**-45)], [0.00]], [[trunc(1 - 2**-45, 1, 10)], [1.00]], [[trunc('x')], [error], [error: DEBUG EVALUATE: Function invocation trunc(string) does not match any known function. Candidates are: TRUNC(number) TRUNC(number, number) TRUNC(number, number, number).]]) CHECK_EXPR_EVAL([acos arsin artan cos sin tan], [[acos(.5) / 3.14159 * 180], [60.00]], [[arcos(.75) / 3.14159 * 180], [41.41]], [[arcos(-.5) / 3.14159 * 180], [120.00]], [[acos(-.75) / 3.14159 * 180], [138.59]], [[acos(-1) / 3.14159 * 180], [180.00]], [[arcos(1) / 3.14159 * 180], [0.00]], [[acos(-1.01)], [sysmis]], [[arcos(1.01)], [sysmis]], [[acos('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking ACOS(number) as acos(string).]], [[arsin(.5) / 3.14159 * 180], [30.00]], [[asin(.25) / 3.14159 * 180], [14.48]], [[arsin(-.5) / 3.14159 * 180], [-30.00]], [[asin(-.25) / 3.14159 * 180], [-14.48]], [[arsin(-1.01)], [sysmis]], [[asin(1.01)], [sysmis]], [[arsin('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking ARSIN(number) as arsin(string).]], [[artan(1) / 3.14159 * 180], [45.00]], [[atan(10) / 3.14159 * 180], [84.29]], [[artan(-1) / 3.14159 * 180], [-45.00]], [[atan(-10) / 3.14159 * 180], [-84.29]], [[artan('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking ARTAN(number) as artan(string).]], [[cos(60 / 180 * 3.14159)], [0.50]], [[cos(45 / 180 * 3.14159)], [0.71]], [[cos(30 / 180 * 3.14159)], [0.87]], [[cos(15 / 180 * 3.14159)], [0.97]], [[cos(-60 / 180 * 3.14159)], [0.50]], [[cos(-45 / 180 * 3.14159)], [0.71]], [[cos(-30 / 180 * 3.14159)], [0.87]], [[cos(-15 / 180 * 3.14159)], [0.97]], [[cos(123 / 180 * 3.14159)], [-0.54]], [[cos(321 / 180 * 3.14159)], [0.78]], [[cos('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking COS(number) as cos(string).]], [[sin(60 / 180 * 3.14159)], [0.87]], [[sin(45 / 180 * 3.14159)], [0.71]], [[sin(30 / 180 * 3.14159)], [0.50]], [[sin(15 / 180 * 3.14159)], [0.26]], [[sin(-60 / 180 * 3.14159)], [-0.87]], [[sin(-45 / 180 * 3.14159)], [-0.71]], [[sin(-30 / 180 * 3.14159)], [-0.50]], [[sin(-15 / 180 * 3.14159)], [-0.26]], [[sin(123 / 180 * 3.14159)], [0.84]], [[sin(321 / 180 * 3.14159)], [-0.63]], [[sin('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking SIN(number) as sin(string).]], [[tan(60 / 180 * 3.14159)], [1.73]], [[tan(45 / 180 * 3.14159)], [1.00]], [[tan(30 / 180 * 3.14159)], [0.58]], [[tan(15 / 180 * 3.14159)], [0.27]], [[tan(-60 / 180 * 3.14159)], [-1.73]], [[tan(-45 / 180 * 3.14159)], [-1.00]], [[tan(-30 / 180 * 3.14159)], [-0.58]], [[tan(-15 / 180 * 3.14159)], [-0.27]], [[tan(123 / 180 * 3.14159)], [-1.54]], [[tan(321 / 180 * 3.14159)], [-0.81]], [[tan('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking TAN(number) as tan(string).]]) # FIXME: a variable name as the argument to SYSMIS is a special case # that we don't yet test. We also can't test VALUE this way. CHECK_EXPR_EVAL([missing nmiss nvalid sysmis any range max min], [[missing(10)], [false]], [[missing($sysmis)], [true]], [[missing(asin(1.01))], [true]], [[missing(asin(.5))], [false]], [[missing(' ')], [error], [error: DEBUG EVALUATE: Type mismatch invoking MISSING(number) as missing(string).]], [[nmiss($sysmis)], [1.00]], [[nmiss(0)], [0.00]], [[nmiss($sysmis, $sysmis, $sysmis)], [3.00]], [[nmiss(1, 2, 3, 4)], [0.00]], [[nmiss(1, $sysmis, $sysmis, 2, 2, $sysmis, $sysmis, 3, 4)], [4.00]], [[nvalid($sysmis)], [0.00]], [[nvalid(0)], [1.00]], [[nvalid($sysmis, $sysmis, $sysmis)], [0.00]], [[nvalid(1, 2, 3, 4)], [4.00]], [[nvalid(1, $sysmis, $sysmis, 2, 2, $sysmis, $sysmis, 3, 4)], [5.00]], [[sysmis(10)], [false]], [[sysmis($sysmis)], [true]], [[sysmis(asin(1.01))], [true]], [[sysmis(asin(.5))], [false]], [[sysmis(' ')], [error], [error: DEBUG EVALUATE: Function invocation sysmis(string) does not match any known function. Candidates are: SYSMIS(num_variable) SYSMIS(number).]], [[any($sysmis, 1, $sysmis, 3)], [sysmis]], [[any(1, 1, 2, 3)], [true]], [[any(1, $true, 2, 3)], [true]], [[any(1, $false, 2, 3)], [false]], [[any(2, 1, 2, 3)], [true]], [[any(3, 1, 2, 3)], [true]], [[any(5, 1, 2, 3)], [false]], [[any(1, 1, 1, 1)], [true]], [[any($sysmis, 1, 1, 1)], [sysmis]], [[any(1, $sysmis, $sysmis, $sysmis)], [sysmis]], [[any($sysmis, $sysmis, $sysmis, $sysmis)], [sysmis]], [[any(1)], [error], [error: DEBUG EVALUATE: Function invocation any(number) does not match any known function. Candidates are: ANY(number, number[, number]...) ANY(string, string[, string]...).]], [[any('1', 2, 3, 4)], [error], [error: DEBUG EVALUATE: Function invocation any(string, number, number, number) does not match any known function. Candidates are: ANY(number, number[, number]...) ANY(string, string[, string]...).]], [[any(1, '2', 3, 4)], [error], [error: DEBUG EVALUATE: Function invocation any(number, string, number, number) does not match any known function. Candidates are: ANY(number, number[, number]...) ANY(string, string[, string]...).]], [[any(1, 2, '3', 4)], [error], [error: DEBUG EVALUATE: Function invocation any(number, number, string, number) does not match any known function. Candidates are: ANY(number, number[, number]...) ANY(string, string[, string]...).]], [[any(1, 2, 3, '4')], [error], [error: DEBUG EVALUATE: Function invocation any(number, number, number, string) does not match any known function. Candidates are: ANY(number, number[, number]...) ANY(string, string[, string]...).]], [[any('', 'a', '', 'c')], [true]], [[any('a', 'a', 'b', 'c')], [true]], [[any('b', 'a', 'b', 'c')], [true]], [[any('c', 'a', 'b', 'c')], [true]], [[any('e', 'a', 'b', 'c')], [false]], [[any('a', 'a', 'a', 'a')], [true]], [[any('', 'a', 'a', 'a')], [false]], [[any('a', '', '', '')], [false]], [[any('a')], [error], [error: DEBUG EVALUATE: Function invocation any(string) does not match any known function. Candidates are: ANY(number, number[, number]...) ANY(string, string[, string]...).]], [[any('a', 'a ', 'b', 'c')], [true]], [[any('b ', 'a', 'b', 'c')], [true]], [[any('c ', 'a', 'b', 'c ')], [true]], [[any(a10, 'b', 'c', 'd')], [error], [error: DEBUG EVALUATE: Function invocation any(format, string, string, string) does not match any known function. Candidates are: ANY(number, number[, number]...) ANY(string, string[, string]...).]], [[any('a', b, 'c', 'd')], [error], [error: DEBUG EVALUATE: Unknown identifier b.]], [[any('a', 'b', c, 'd')], [error], [error: DEBUG EVALUATE: Unknown identifier c.]], [[any('a', 'b', 'c', d)], [error], [error: DEBUG EVALUATE: Unknown identifier d.]], [[range(5, 1, 10)], [true]], [[range(1, 1, 10)], [true]], [[range(10, 1, 10)], [true]], [[range(-1, 1, 10)], [false]], [[range(12, 1, 10)], [false]], [[range($sysmis, 1, 10)], [sysmis]], [[range(5, 1, $sysmis)], [sysmis]], [[range(5, $sysmis, 10)], [sysmis]], [[range($sysmis, $sysmis, 10)], [sysmis ]], [[range($sysmis, 1, $sysmis)], [sysmis]], [[range($sysmis, $sysmis, $sysmis)], [sysmis]], [[range(0, 1, 8, 10, 18)], [false]], [[range(1, 1, 8, 10, 18)], [true]], [[range(6, 1, 8, 10, 18)], [true]], [[range(8, 1, 8, 10, 18)], [true]], [[range(9, 1, 8, 10, 18)], [false]], [[range(10, 1, 8, 10, 18)], [true]], [[range(13, 1, 8, 10, 18)], [true]], [[range(16, 1, 8, 10, 18)], [true]], [[range(18, 1, 8, 10, 18)], [true]], [[range(20, 1, 8, 10, 18)], [false]], [[range(1)], [error], [error: DEBUG EVALUATE: Function invocation range(number) does not match any known function. Candidates are: RANGE(number, number, number[, number, number]...) RANGE(string, string, string[, string, string]...).]], [[range(1, 2)], [error], [error: DEBUG EVALUATE: RANGE(number, number, number[, number, number]...) must have an even number of arguments in list.]], [[range(1, 2, 3, 4)], [error], [error: DEBUG EVALUATE: RANGE(number, number, number[, number, number]...) must have an even number of arguments in list.]], [[range(1, 2, 3, 4, 5, 6)], [error], [error: DEBUG EVALUATE: RANGE(number, number, number[, number, number]...) must have an even number of arguments in list.]], [[range('1', 2, 3)], [error], [error: DEBUG EVALUATE: Function invocation range(string, number, number) does not match any known function. Candidates are: RANGE(number, number, number[, number, number]...) RANGE(string, string, string[, string, string]...).]], [[range(1, '2', 3)], [error], [error: DEBUG EVALUATE: Function invocation range(number, string, number) does not match any known function. Candidates are: RANGE(number, number, number[, number, number]...) RANGE(string, string, string[, string, string]...).]], [[range(1, 2, '3')], [error], [error: DEBUG EVALUATE: Function invocation range(number, number, string) does not match any known function. Candidates are: RANGE(number, number, number[, number, number]...) RANGE(string, string, string[, string, string]...).]], [[range('123', '111', '888')], [true]], [[range('111', '111', '888')], [true]], [[range('888', '111', '888')], [true]], [[range('110', '111', '888')], [false]], [[range('889', '111', '888')], [false]], [[range('000', '111', '888')], [false]], [[range('999', '111', '888')], [false]], [[range('123 ', '111', '888')], [true]], [[range('123', '111 ', '888')], [true]], [[range('123', '111', '888 ')], [true]], [[range('123', '111 ', '888 ')], [true]], [[range('00', '01', '08', '10', '18')], [false]], [[range('01', '01', '08', '10', '18')], [true]], [[range('06', '01', '08', '10', '18')], [true]], [[range('08', '01', '08', '10', '18')], [true]], [[range('09', '01', '08', '10', '18')], [false]], [[range('10', '01', '08', '10', '18')], [true]], [[range('15', '01', '08', '10', '18')], [true]], [[range('18', '01', '08', '10', '18')], [true]], [[range('19', '01', '08', '10', '18')], [false]], [[range('1')], [error], [error: DEBUG EVALUATE: Function invocation range(string) does not match any known function. Candidates are: RANGE(number, number, number[, number, number]...) RANGE(string, string, string[, string, string]...).]], [[range('1', '2')], [error], [error: DEBUG EVALUATE: RANGE(string, string, string[, string, string]...) must have an even number of arguments in list.]], [[range('1', '2', '3', '4')], [error], [error: DEBUG EVALUATE: RANGE(string, string, string[, string, string]...) must have an even number of arguments in list.]], [[range('1', '2', '3', '4', '5', '6')], [error], [error: DEBUG EVALUATE: RANGE(string, string, string[, string, string]...) must have an even number of arguments in list.]], [[range(1, '2', '3')], [error], [error: DEBUG EVALUATE: Function invocation range(number, string, string) does not match any known function. Candidates are: RANGE(number, number, number[, number, number]...) RANGE(string, string, string[, string, string]...).]], [[range('1', 2, '3')], [error], [error: DEBUG EVALUATE: Function invocation range(string, number, string) does not match any known function. Candidates are: RANGE(number, number, number[, number, number]...) RANGE(string, string, string[, string, string]...).]], [[range('1', '2', 3)], [error], [error: DEBUG EVALUATE: Function invocation range(string, string, number) does not match any known function. Candidates are: RANGE(number, number, number[, number, number]...) RANGE(string, string, string[, string, string]...).]], [[max(1, 2, 3, 4, 5)], [5.00]], [[max(1, $sysmis, 2, 3, $sysmis, 4, 5)], [5.00]], [[max(1, 2)], [2.00]], [[max()], [error], [error: DEBUG EVALUATE: Function invocation max() does not match any known function. Candidates are: MAX(number[, number]...) MAX(string[, string]...).]], [[max(1)], [1.00]], [[max(1, $sysmis)], [1.00]], [[max(1, 2, 3, $sysmis)], [3.00]], [[max.4(1, 2, 3, $sysmis)], [sysmis]], [[max.4(1, 2, 3)], [error], [error: DEBUG EVALUATE: With MAX(number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]], [[max("2", "3", "5", "1", "4")], ["5"]], [[max("1", "2")], ["2"]], [[max("1")], ["1"]], [[min(1, 2, 3, 4, 5)], [1.00]], [[min(1, $sysmis, 2, 3, $sysmis, 4, 5)], [1.00]], [[min(1, 2)], [1.00]], [[min()], [error], [error: DEBUG EVALUATE: Function invocation min() does not match any known function. Candidates are: MIN(number[, number]...) MIN(string[, string]...).]], [[min(1)], [1.00]], [[min(1, $sysmis)], [1.00]], [[min(1, 2, 3, $sysmis)], [1.00]], [[min.4(1, 2, 3, $sysmis)], [sysmis]], [[min.4(1, 2, 3)], [error], [error: DEBUG EVALUATE: With MIN(number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]], [[min("2", "3", "5", "1", "4")], ["1"]], [[min("1", "2")], ["1"]], [[min("1")], ["1"]]) CHECK_EXPR_EVAL([cfvar mean median sd sum variance], [[cfvar(1, 2, 3, 4, 5)], [0.53]], [[cfvar(1, $sysmis, 2, 3, $sysmis, 4, 5)], [0.53]], [[cfvar(1, 2)], [0.47]], [[cfvar(1)], [error], [error: DEBUG EVALUATE: Type mismatch invoking CFVAR(number, number[, number]...) as cfvar(number).]], [[cfvar(1, $sysmis)], [sysmis]], [[cfvar(1, 2, 3, $sysmis)], [0.50]], [[cfvar.4(1, 2, 3, $sysmis)], [sysmis]], [[cfvar.4(1, 2, 3)], [error], [error: DEBUG EVALUATE: With CFVAR(number, number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]], [[cfvar('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking CFVAR(number, number[, number]...) as cfvar(string).]], [[cfvar('x', 1, 2, 3)], [error], [error: DEBUG EVALUATE: Type mismatch invoking CFVAR(number, number[, number]...) as cfvar(string, number, number, number).]], [[mean(1, 2, 3, 4, 5)], [3.00]], [[mean(1, $sysmis, 2, 3, $sysmis, 4, 5)], [3.00]], [[mean(1, 2)], [1.50]], [[mean()], [error], [error: DEBUG EVALUATE: Type mismatch invoking MEAN(number[, number]...) as mean().]], [[mean(1)], [1.00]], [[mean(1, $sysmis)], [1.00]], [[mean(1, 2, 3, $sysmis)], [2.00]], [[mean.4(1, 2, 3, $sysmis)], [sysmis]], [[mean.4(1, 2, 3)], [error], [error: DEBUG EVALUATE: With MEAN(number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]], [[median(1, 2, 3, 4, 5)], [3.00]], [[median(2, 3, 4, 5, 1)], [3.00]], [[median(2, 3, 4, 1, 5)], [3.00]], [[median(2, 1, 4, 5, 3)], [3.00]], [[median(1, 2, 3, 4)], [2.50]], [[median(2, 3, 1, 4)], [2.50]], [[median(2, 3, 4, 1)], [2.50]], [[median(2, 1, 4, 3)], [2.50]], [[median(1, $sysmis, 3, 4, 5)], [3.50]], [[median(2, 3, 4, 5, $sysmis, 1)], [3.00]], [[median($sysmis, $sysmis, $sysmis, 2, 3, 4, 1, 5)], [3.00]], [[median(1, 2, 3)], [2.00]], [[median(1)], [1.00]], [[median(1, 2)], [1.50]], [[median(1, 2, $sysmis)], [1.50]], [[median(1, $sysmis, $sysmis)], [1.00]], [[median($sysmis, $sysmis, $sysmis)], [sysmis]], [[median.3(1, 2, $sysmis)], [sysmis]], [[median.2(1, $sysmis)], [sysmis]], [[sd(1, 2, 3, 4, 5)], [1.58]], [[sd(1, $sysmis, 2, 3, $sysmis, 4, 5)], [1.58]], [[sd(1, 2)], [0.71]], [[sd(1)], [error], [error: DEBUG EVALUATE: Type mismatch invoking SD(number, number[, number]...) as sd(number).]], [[sd(1, $sysmis)], [sysmis]], [[sd(1, 2, 3, $sysmis)], [1.00]], [[sd.4(1, 2, 3, $sysmis)], [sysmis]], [[sd.4(1, 2, 3)], [error], [error: DEBUG EVALUATE: With SD(number, number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]], [[sd('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking SD(number, number[, number]...) as sd(string).]], [[sd('x', 1, 2, 3)], [error], [error: DEBUG EVALUATE: Type mismatch invoking SD(number, number[, number]...) as sd(string, number, number, number).]], [[sum(1, 2, 3, 4, 5)], [15.00]], [[sum(1, $sysmis, 2, 3, $sysmis, 4, 5)], [15.00]], [[sum(1, 2)], [3.00]], [[sum()], [error], [error: DEBUG EVALUATE: Type mismatch invoking SUM(number[, number]...) as sum().]], [[sum(1)], [1.00]], [[sum(1, $sysmis)], [1.00]], [[sum(1, 2, 3, $sysmis)], [6.00]], [[sum.4(1, 2, 3, $sysmis)], [sysmis]], [[sum.4(1, 2, 3)], [error], [error: DEBUG EVALUATE: With SUM(number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]], [[variance(1, 2, 3, 4, 5)], [2.50]], [[variance(1, $sysmis, 2, 3, $sysmis, 4, 5)], [2.50]], [[variance(1, 2)], [0.50]], [[variance(1)], [error], [error: DEBUG EVALUATE: Type mismatch invoking VARIANCE(number, number[, number]...) as variance(number).]], [[variance(1, $sysmis)], [sysmis]], [[variance(1, 2, 3, $sysmis)], [1.00]], [[variance.4(1, 2, 3, $sysmis)], [sysmis]], [[variance.4(1, 2, 3)], [error], [error: DEBUG EVALUATE: With VARIANCE(number, number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]], [[variance('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking VARIANCE(number, number[, number]...) as variance(string).]], [[variance('x', 1, 2, 3)], [error], [error: DEBUG EVALUATE: Type mismatch invoking VARIANCE(number, number[, number]...) as variance(string, number, number, number).]]) CHECK_EXPR_EVAL([concat index rindex length lower], [[concat('')], [""]], [[concat('a', 'b')], ["ab"]], [[concat('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h')], ["abcdefgh"]], [[concat('abcdefgh', 'ijklmnopq')], ["abcdefghijklmnopq"]], [[concat('a', 1)], [error], [error: DEBUG EVALUATE: Type mismatch invoking CONCAT(string[, string]...) as concat(string, number).]], [[concat(1, 2)], [error], [error: DEBUG EVALUATE: Type mismatch invoking CONCAT(string[, string]...) as concat(number, number).]], [[index('abcbcde', 'bc')], [2.00]], [[index('abcbcde', 'bcd')], [4.00]], [[index('abcbcde', 'bcbc')], [2.00]], [[index('abcdefgh', 'abc')], [1.00]], [[index('abcdefgh', 'bcd')], [2.00]], [[index('abcdefgh', 'cde')], [3.00]], [[index('abcdefgh', 'def')], [4.00]], [[index('abcdefgh', 'efg')], [5.00]], [[index('abcdefgh', 'fgh')], [6.00]], [[index('abcdefgh', 'fghi')], [0.00]], [[index('abcdefgh', 'x')], [0.00]], [[index('abcdefgh', 'abch')], [0.00]], [[index('banana', 'na')], [3.00]], [[index('banana', 'ana')], [2.00]], [[index('', 'x')], [0.00]], [[index('', '')], [sysmis]], [[index('abcdefgh', '')], [sysmis]], [[index('abcdefgh', 'alkjsfdjlskalkjfa')], [0.00]], [[index('abcbcde', 'bc', 1)], [2.00]], [[index('abcbcde', 'dc', 1)], [3.00]], [[index('abcbcde', 'abc', 1)], [1.00]], [[index('abcbcde', 'bc', 2)], [2.00]], [[index('abcbcde', 'dc', 2)], [0.00]], [[index('abcbcde', 'abc', 1)], [1.00]], [[index('abcbcde', 'bccb', 2)], [2.00]], [[index('abcbcde', 'bcbc', 2)], [2.00]], [[index('abcbcde', 'bcbc', $sysmis)], [sysmis]], [[rindex('abcbcde', 'bc')], [4.00]], [[rindex('abcbcde', 'bcd')], [4.00]], [[rindex('abcbcde', 'bcbc')], [2.00]], [[rindex('abcdefgh', 'abc')], [1.00]], [[rindex('abcdefgh', 'bcd')], [2.00]], [[rindex('abcdefgh', 'cde')], [3.00]], [[rindex('abcdefgh', 'def')], [4.00]], [[rindex('abcdefgh', 'efg')], [5.00]], [[rindex('abcdefgh', 'fgh')], [6.00]], [[rindex('abcdefgh', 'fghi')], [0.00]], [[rindex('abcdefgh', 'x')], [0.00]], [[rindex('abcdefgh', 'abch')], [0.00]], [[rindex('banana', 'na')], [5.00]], [[rindex('banana', 'ana')], [4.00]], [[rindex('', 'x')], [0.00]], [[rindex('', '')], [sysmis]], [[rindex('abcdefgh', '')], [sysmis]], [[rindex('abcdefgh', 'alkjsfdjlskalkjfa')], [0.00]], [[rindex('abcbcde', 'bc', 1)], [5.00]], [[rindex('abcbcde', 'dc', 1)], [6.00]], [[rindex('abcbcde', 'abc', 1)], [5.00]], [[rindex('abcbcde', 'bc', 2)], [4.00]], [[rindex('abcbcde', 'dc', 2)], [0.00]], [[rindex('abcbcde', 'abc', 1)], [5.00]], [[rindex('abcbcde', 'bccb', 2)], [4.00]], [[rindex('abcbcde', 'bcbc', 2)], [4.00]], [[rindex('abcbcde', 'bcbc', 0)], [sysmis]], [[rindex('abcbcde', 'bcbc', $sysmis)], [sysmis]], [[rindex('abcbcde', 'bcbcg', 2)], [sysmis]], [[rindex('abcbcde', 'bcbcg', $sysmis)], [sysmis]], [[rindex('abcbcde', 'bcbcg', 'x')], [error], [error: DEBUG EVALUATE: Function invocation rindex(string, string, string) does not match any known function. Candidates are: RINDEX(string, string) RINDEX(string, string, number).]], [[rindex(1, 'bcdfkjl', 2)], [error], [error: DEBUG EVALUATE: Function invocation rindex(number, string, number) does not match any known function. Candidates are: RINDEX(string, string) RINDEX(string, string, number).]], [[rindex('aksj', 2, 2)], [error], [error: DEBUG EVALUATE: Function invocation rindex(string, number, number) does not match any known function. Candidates are: RINDEX(string, string) RINDEX(string, string, number).]], [[rindex(1, 2, 3)], [error], [error: DEBUG EVALUATE: Function invocation rindex(number, number, number) does not match any known function. Candidates are: RINDEX(string, string) RINDEX(string, string, number).]], [[rindex(1, 2, '3')], [error], [error: DEBUG EVALUATE: Function invocation rindex(number, number, string) does not match any known function. Candidates are: RINDEX(string, string) RINDEX(string, string, number).]], [[length('')], [0.00]], [[length('a')], [1.00]], [[length('xy')], [2.00]], [[length('adsf ')], [8.00]], [[length('abcdefghijkl')], [12.00]], [[length(0)], [error], [error: DEBUG EVALUATE: Type mismatch invoking LENGTH(string) as length(number).]], [[length($sysmis)], [error], [error: DEBUG EVALUATE: Type mismatch invoking LENGTH(string) as length(number).]], [[lower('ABCDEFGHIJKLMNOPQRSTUVWXYZ!@%&*089')], ["abcdefghijklmnopqrstuvwxyz!@%&*089"]], [[lower('')], [""]], [[lower(1)], [error], [error: DEBUG EVALUATE: Type mismatch invoking LOWER(string) as lower(number).]]) CHECK_EXPR_EVAL([replace], [[replace('banana', 'an', 'AN')], ["bANANa"]], [[replace('banana', 'an', 'a')], ["baaa"]], [[replace('banana', 'an', '')], ["ba"]], [[replace('banana', 'na', '')], ["ba"]], [[replace('banana', 'ba', 'BA')], ["BAnana"]], [[replace('banana', 'na', 'xyzzy')], ["baxyzzyxyzzy"]], [[replace('banana', 'an', 'xyzzy', 1)], ["bxyzzyana"]], [[replace('banana', 'an', 'xyzzy', 1.5)], ["bxyzzyana"]], [[replace('banana', 'bananana', 'xyzzy')], ["banana"]], [[replace('banana', '', 'xyzzy')], ["banana"]], [[replace('banana', 'ba', '', 0)], ["banana"]], [[replace('banana', 'ba', '', -1)], ["banana"]], [[replace('banana', 'ba', '', $sysmis)], ["banana"]]) CHECK_EXPR_EVAL([lpad number ltrim lpad rtrim rpad string strunc substr upcase], [[lpad('abc', -1)], [""]], [[lpad('abc', 0)], ["abc"]], [[lpad('abc', 2)], ["abc"]], [[lpad('abc', 3)], ["abc"]], [[lpad('abc', 10)], [" abc"]], [[lpad('abc', 32768)], [""]], [[lpad('abc', $sysmis)], [""]], [[lpad('abc', -1, '*')], [""]], [[lpad('abc', 0, '*')], ["abc"]], [[lpad('abc', 2, '*')], ["abc"]], [[lpad('abc', 3, '*')], ["abc"]], [[lpad('abc', 10, '*')], ["*******abc"]], [[lpad('abc', 32768, '*')], [""]], [[lpad('abc', $sysmis, '*')], [""]], [[lpad('abc', $sysmis, '')], [""]], [[lpad('abc', $sysmis, 'xy')], [""]], [[lpad(0, 10)], [error], [error: DEBUG EVALUATE: Function invocation lpad(number, number) does not match any known function. Candidates are: LPAD(string, number) LPAD(string, number, string).]], [[lpad('abc', 'def')], [error], [error: DEBUG EVALUATE: Function invocation lpad(string, string) does not match any known function. Candidates are: LPAD(string, number) LPAD(string, number, string).]], [[lpad(0, 10, ' ')], [error], [error: DEBUG EVALUATE: Function invocation lpad(number, number, string) does not match any known function. Candidates are: LPAD(string, number) LPAD(string, number, string).]], [[lpad('abc', 'def', ' ')], [error], [error: DEBUG EVALUATE: Function invocation lpad(string, string, string) does not match any known function. Candidates are: LPAD(string, number) LPAD(string, number, string).]], [[lpad('x', 5, 0)], [error], [error: DEBUG EVALUATE: Function invocation lpad(string, number, number) does not match any known function. Candidates are: LPAD(string, number) LPAD(string, number, string).]], [[lpad('x', 5, 2)], [error], [error: DEBUG EVALUATE: Function invocation lpad(string, number, number) does not match any known function. Candidates are: LPAD(string, number) LPAD(string, number, string).]], [[number("123", f3.0)], [123.00]], [[number(" 123", f3.0)], [12.00]], [[number("123", f3.1)], [12.30]], [[number(" ", f3.1)], [sysmis]], [[number("123", a8)], [error], [error: DEBUG EVALUATE: Type mismatch invoking NUMBER(string, num_input_format) as number(string, format).]], dnl CCA is not an input format: [[number("123", cca1.2)], [error], [error: DEBUG EVALUATE: Type mismatch invoking NUMBER(string, num_input_format) as number(string, format).]], [[ltrim(' abc')], ["abc"]], [[rtrim(' abc ')], [" abc"]], [[ltrim('abc')], ["abc"]], [[ltrim(' abc')], [" abc"]], [[ltrim(' ')], [""]], [[ltrim('')], [""]], [[ltrim(8)], [error], [error: DEBUG EVALUATE: Function invocation ltrim(number) does not match any known function. Candidates are: LTRIM(string) LTRIM(string, string).]], [[ltrim('***abc', '*')], ["abc"]], [[ltrim('abc', '*')], ["abc"]], [[ltrim('*abc', '*')], ["abc"]], [[ltrim('', '*')], [""]], [[ltrim(8, '*')], [error], [error: DEBUG EVALUATE: Function invocation ltrim(number, string) does not match any known function. Candidates are: LTRIM(string) LTRIM(string, string).]], [[ltrim(' x', 8)], [error], [error: DEBUG EVALUATE: Function invocation ltrim(string, number) does not match any known function. Candidates are: LTRIM(string) LTRIM(string, string).]], [[ltrim(8, 9)], [error], [error: DEBUG EVALUATE: Function invocation ltrim(number, number) does not match any known function. Candidates are: LTRIM(string) LTRIM(string, string).]], [[rpad('abc', -1)], [""]], [[rpad('abc', 0)], ["abc"]], [[rpad('abc', 2)], ["abc"]], [[rpad('abc', 3)], ["abc"]], [[rpad('abc', 10)], ["abc "]], [[rpad('abc', 32768)], [""]], [[rpad('abc', $sysmis)], [""]], [[rpad('abc', -1, '*')], [""]], [[rpad('abc', 0, '*')], ["abc"]], [[rpad('abc', 2, '*')], ["abc"]], [[rpad('abc', 3, '*')], ["abc"]], [[rpad('abc', 10, '*')], ["abc*******"]], [[rpad('abc', 32768, '*')], [""]], [[rpad('abc', $sysmis, '*')], [""]], [[rpad('abc', $sysmis, '')], [""]], [[rpad('abc', $sysmis, 'xy')], [""]], [[rpad(0, 10)], [error], [error: DEBUG EVALUATE: Function invocation rpad(number, number) does not match any known function. Candidates are: RPAD(string, number) RPAD(string, number, string).]], [[rpad('abc', 'def')], [error], [error: DEBUG EVALUATE: Function invocation rpad(string, string) does not match any known function. Candidates are: RPAD(string, number) RPAD(string, number, string).]], [[rpad(0, 10, ' ')], [error], [error: DEBUG EVALUATE: Function invocation rpad(number, number, string) does not match any known function. Candidates are: RPAD(string, number) RPAD(string, number, string).]], [[rpad('abc', 'def', ' ')], [error], [error: DEBUG EVALUATE: Function invocation rpad(string, string, string) does not match any known function. Candidates are: RPAD(string, number) RPAD(string, number, string).]], [[rpad('x', 5, 0)], [error], [error: DEBUG EVALUATE: Function invocation rpad(string, number, number) does not match any known function. Candidates are: RPAD(string, number) RPAD(string, number, string).]], [[rpad('x', 5, 2)], [error], [error: DEBUG EVALUATE: Function invocation rpad(string, number, number) does not match any known function. Candidates are: RPAD(string, number) RPAD(string, number, string).]], [[rtrim('abc ')], ["abc"]], [[rtrim(' abc ')], [" abc"]], [[rtrim('abc')], ["abc"]], [[rtrim('abc ')], ["abc "]], [[rtrim(' ')], [""]], [[rtrim('')], [""]], [[rtrim(8)], [error], [error: DEBUG EVALUATE: Function invocation rtrim(number) does not match any known function. Candidates are: RTRIM(string) RTRIM(string, string).]], [[rtrim('abc***', '*')], ["abc"]], [[rtrim('abc', '*')], ["abc"]], [[rtrim('abc*', '*')], ["abc"]], [[rtrim('', '*')], [""]], [[rtrim(8, '*')], [error], [error: DEBUG EVALUATE: Function invocation rtrim(number, string) does not match any known function. Candidates are: RTRIM(string) RTRIM(string, string).]], [[rtrim(' x', 8)], [error], [error: DEBUG EVALUATE: Function invocation rtrim(string, number) does not match any known function. Candidates are: RTRIM(string) RTRIM(string, string).]], [[rtrim(8, 9)], [error], [error: DEBUG EVALUATE: Function invocation rtrim(number, number) does not match any known function. Candidates are: RTRIM(string) RTRIM(string, string).]], [[string(123.56, f5.1)], ["123.6"]], [[string($sysmis, f5.1)], [" . "]], [[string("abc", A5)], [error], [error: DEBUG EVALUATE: Type mismatch invoking STRING(number, num_output_format) as string(string, format).]], dnl E has a minimum width of 6 on output: [[string(123, e1)], [error], [error: DEBUG EVALUATE: Type mismatch invoking STRING(number, num_output_format) as string(number, format).]], [[string(123, e6.0)], ["1E+002"]], [[strunc('a c ', 9)], ["a c"]], [[strunc('a c ', 7)], ["a c"]], [[strunc('a c ', 6)], ["a c"]], [[strunc('a c ', 5)], ["a c"]], [[strunc('a c ', 4)], ["a c"]], [[strunc('a c ', 3)], ["a c"]], [[strunc('a c ', 2)], ["a"]], [[strunc('a c ', 1)], ["a"]], [[strunc('a c ', 0)], [""]], [[strunc('a c ', -1)], [""]], [[strunc('a c ', $sysmis)], [""]], [[strunc(' abc ', 9)], [" abc"]], [[strunc(' abc ', 8)], [" abc"]], [[strunc(' abc ', 7)], [" abc"]], [[strunc(' abc ', 6)], [" abc"]], [[strunc(' abc ', 5)], [" abc"]], [[strunc(' abc ', 4)], [" ab"]], [[strunc(' abc ', 3)], [" a"]], [[strunc(' abc ', 2)], [""]], [[strunc(' abc ', 1)], [""]], [[strunc(' abc ', -1)], [""]], [[strunc(' abc ', $sysmis)], [""]], [[substr('abcdefgh', -5)], [""]], [[substr('abcdefgh', 0)], [""]], [[substr('abcdefgh', 1)], ["abcdefgh"]], [[substr('abcdefgh', 3)], ["cdefgh"]], [[substr('abcdefgh', 5)], ["efgh"]], [[substr('abcdefgh', 6)], ["fgh"]], [[substr('abcdefgh', 7)], ["gh"]], [[substr('abcdefgh', 8)], ["h"]], [[substr('abcdefgh', 9)], [""]], [[substr('abcdefgh', 10)], [""]], [[substr('abcdefgh', 20)], [""]], [[substr('abcdefgh', $sysmis)], [""]], [[substr(0, 10)], [error], [error: DEBUG EVALUATE: Function invocation substr(number, number) does not match any known function. Candidates are: SUBSTR(string, number) SUBSTR(string, number, number).]], [[substr('abcd', 'abc')], [error], [error: DEBUG EVALUATE: Function invocation substr(string, string) does not match any known function. Candidates are: SUBSTR(string, number) SUBSTR(string, number, number).]], [[substr(0, 'abc')], [error], [error: DEBUG EVALUATE: Function invocation substr(number, string) does not match any known function. Candidates are: SUBSTR(string, number) SUBSTR(string, number, number).]], [[substr('abcdefgh', 0, 0)], [""]], [[substr('abcdefgh', 3, 0)], [""]], [[substr('abcdefgh', 5, 0)], [""]], [[substr('abcdefgh', 9, 0)], [""]], [[substr('abcdefgh', 0, 1)], [""]], [[substr('abcdefgh', 0, 5)], [""]], [[substr('abcdefgh', 1, 8)], ["abcdefgh"]], [[substr('abcdefgh', 1, 10)], ["abcdefgh"]], [[substr('abcdefgh', 1, 20)], ["abcdefgh"]], [[substr('abcdefgh', 3, 4)], ["cdef"]], [[substr('abcdefgh', 5, 2)], ["ef"]], [[substr('abcdefgh', 6, 1)], ["f"]], [[substr('abcdefgh', 7, 10)], ["gh"]], [[substr('abcdefgh', 8, 1)], ["h"]], [[substr('abcdefgh', 8, 2)], ["h"]], [[substr('abcdefgh', 9, 11)], [""]], [[substr('abcdefgh', 10, 52)], [""]], [[substr('abcdefgh', 20, 1)], [""]], [[substr('abcdefgh', $sysmis, 2)], [""]], [[substr('abcdefgh', 9, $sysmis)], [""]], [[substr('abcdefgh', $sysmis, $sysmis)], [""]], [[substr('abc', 1, 'x')], [error], [error: DEBUG EVALUATE: Function invocation substr(string, number, string) does not match any known function. Candidates are: SUBSTR(string, number) SUBSTR(string, number, number).]], [[substr(0, 10, 1)], [error], [error: DEBUG EVALUATE: Function invocation substr(number, number, number) does not match any known function. Candidates are: SUBSTR(string, number) SUBSTR(string, number, number).]], [[substr(0, 10, 'x')], [error], [error: DEBUG EVALUATE: Function invocation substr(number, number, string) does not match any known function. Candidates are: SUBSTR(string, number) SUBSTR(string, number, number).]], [[substr('abcd', 'abc', 0)], [error], [error: DEBUG EVALUATE: Function invocation substr(string, string, number) does not match any known function. Candidates are: SUBSTR(string, number) SUBSTR(string, number, number).]], [[substr('abcd', 'abc', 'j')], [error], [error: DEBUG EVALUATE: Function invocation substr(string, string, string) does not match any known function. Candidates are: SUBSTR(string, number) SUBSTR(string, number, number).]], [[substr(0, 'abc', 4)], [error], [error: DEBUG EVALUATE: Function invocation substr(number, string, number) does not match any known function. Candidates are: SUBSTR(string, number) SUBSTR(string, number, number).]], [[substr(0, 'abc', 'k')], [error], [error: DEBUG EVALUATE: Function invocation substr(number, string, string) does not match any known function. Candidates are: SUBSTR(string, number) SUBSTR(string, number, number).]], [[upcase('abcdefghijklmnopqrstuvwxyz!@%&*089')], ["ABCDEFGHIJKLMNOPQRSTUVWXYZ!@%&*089"]], [[upcase('')], [""]], [[upcase(1)], [error], [error: DEBUG EVALUATE: Type mismatch invoking UPCASE(string) as upcase(number).]]) CHECK_EXPR_EVAL([time ctime date yrmoda], [[time.days(1)], [86400.00]], [[time.days(-1)], [-86400.00]], [[time.days(0.5)], [43200.00]], [[time.days('x')], [error], [error: DEBUG EVALUATE: Type mismatch invoking TIME.DAYS(number) as time.days(string).]], [[time.days($sysmis)], [sysmis]], [[time.hms(4,50,38)], [17438.00]], [[time.hms(12,31,35)], [45095.00]], [[time.hms(12,47,53)], [46073.00]], [[time.hms(1,26,0)], [5160.00]], [[time.hms(20,58,11)], [75491.00]], [[time.hms(7,36,5)], [27365.00]], [[time.hms(15,43,49)], [56629.00]], [[time.hms(4,25,9)], [15909.00]], [[time.hms(6,49,27)], [24567.00]], [[time.hms(2,57,52)], [10672.00]], [[time.hms(16,45,44)], [60344.00]], [[time.hms(21,30,57)], [77457.00]], [[time.hms(22,30,4)], [81004.00]], [[time.hms(1,56,51)], [7011.00]], [[time.hms(5, 6, 7)], [18367.00]], [[time.hms(5, 6, 0)], [18360.00]], [[time.hms(5, 0, 7)], [18007.00]], [[time.hms(0, 6, 7)], [367.00]], [[time.hms(-5, 6, -7)], [sysmis], [warning: DEBUG EVALUATE: TIME.HMS cannot mix positive and negative arguments.]], [[time.hms(-5, 5, -7)], [sysmis], [warning: DEBUG EVALUATE: TIME.HMS cannot mix positive and negative arguments.]], [[time.hms($sysmis, 6, 7)], [sysmis]], [[time.hms(5, $sysmis, 7)], [sysmis]], [[time.hms(5, $sysmis, 7)], [sysmis]], [[time.hms($sysmis, $sysmis, 7)], [sysmis]], [[time.hms(5, $sysmis, $sysmis)], [sysmis]], [[time.hms($sysmis, $sysmis, 7)], [sysmis]], [[time.hms($sysmis, $sysmis, $sysmis)], [sysmis]], [[ctime.days(106272)], [1.23]], [[ctime.hours(106272)], [29.52]], [[ctime.minutes(106272)], [1771.20]], [[ctime.seconds(106272)], [106272.00]], [[ctime.days(-106272)], [-1.23]], [[ctime.hours(-106272)], [-29.52]], [[ctime.minutes(-106272)], [-1771.20]], [[ctime.seconds(-106272)], [-106272.00]], [[ctime.days($sysmis)], [sysmis]], [[ctime.hours($sysmis)], [sysmis]], [[ctime.minutes($sysmis)], [sysmis]], [[ctime.seconds($sysmis)], [sysmis]], [[ctime.days('a')], [error], [error: DEBUG EVALUATE: Type mismatch invoking CTIME.DAYS(number) as ctime.days(string).]], [[ctime.hours('b')], [error], [error: DEBUG EVALUATE: Type mismatch invoking CTIME.HOURS(number) as ctime.hours(string).]], [[ctime.minutes('c')], [error], [error: DEBUG EVALUATE: Type mismatch invoking CTIME.MINUTES(number) as ctime.minutes(string).]], [[ctime.seconds('d')], [error], [error: DEBUG EVALUATE: Type mismatch invoking CTIME.SECONDS(number) as ctime.seconds(string).]], [[ctime.days(date.dmy(15,10,1582))], [1.00]], [[ctime.days(date.dmy(6,9,1719))], [50000.00]], [[ctime.days(date.dmy(24,1,1583))], [102.00]], [[ctime.days(date.dmy(14,12,1585))], [1157.00]], [[ctime.days(date.dmy(26,11,1621))], [14288.00]], [[ctime.days(date.dmy(25,12,1821))], [87365.00]], [[ctime.days(date.dmy(3,12,1882))], [109623.00]], [[ctime.days(date.dmy(6,4,2002))], [153211.00]], [[ctime.days(date.dmy(19,12,1999))], [152372.00]], [[ctime.days(date.dmy(1,10,1978))], [144623.00]], [[ctime.days(date.dmy(0,10,1978))], [144622.00]], [[ctime.days(date.dmy(32,10,1978))], [sysmis], [error: DEBUG EVALUATE: Day 32 is not in acceptable range of 0 to 31.]], [[ctime.days(date.dmy(31,0,1978))], [144349.00]], [[ctime.days(date.dmy(31,13,1978))], [144745.00]], [[ctime.days(date.dmy($sysmis,10,1978))], [sysmis]], [[ctime.days(date.dmy(31,$sysmis,1978))], [sysmis]], [[ctime.days(date.dmy(31,10,$sysmis))], [sysmis]], [[ctime.days(date.dmy($sysmis,$sysmis,1978))], [sysmis]], [[ctime.days(date.dmy(31,$sysmis,$sysmis))], [sysmis]], [[ctime.days(date.dmy($sysmis,10,$sysmis))], [sysmis]], [[ctime.days(date.dmy($sysmis,$sysmis,$sysmis))], [sysmis]], [[date.dmy('a',1,2)], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.DMY(number, number, number) as date.dmy(string, number, number).]], [[date.dmy(1,'a',2)], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.DMY(number, number, number) as date.dmy(number, string, number).]], [[date.dmy(1,2,'a')], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.DMY(number, number, number) as date.dmy(number, number, string).]], dnl FIXME: check out-of-range and nearly out-of-range values dnl [[yrmoda(1582,10,15)], [1.00]], [[yrmoda(1719,9,6)], [50000.00]], [[yrmoda(1583,1,24)], [102.00]], [[yrmoda(1585,12,14)], [1157.00]], [[yrmoda(1621,11,26)], [14288.00]], [[yrmoda(1821,12,25)], [87365.00]], [[yrmoda(1882,12,3)], [109623.00]], [[yrmoda(2002,4,6)], [153211.00]], [[yrmoda(1999,12,19)], [152372.00]], [[yrmoda(1978,10,1)], [144623.00]], [[yrmoda(1978,10,0)], [144622.00]], [[yrmoda(1978,10,32)], [sysmis], [error: DEBUG EVALUATE: Day 32 is not in acceptable range of 0 to 31.]], [[yrmoda(1978,0,31)], [144349.00]], [[yrmoda(1978,13,31)], [144745.00]], [[yrmoda(1978,10,$sysmis)], [sysmis]], [[yrmoda(1978,$sysmis,31)], [sysmis]], [[yrmoda($sysmis,10,31)], [sysmis]], [[yrmoda(1978,$sysmis,$sysmis)], [sysmis]], [[yrmoda($sysmis,$sysmis,31)], [sysmis]], [[yrmoda($sysmis,10,$sysmis)], [sysmis]], [[yrmoda($sysmis,$sysmis,$sysmis)], [sysmis]], [[yrmoda('a',1,2)], [error], [error: DEBUG EVALUATE: Type mismatch invoking YRMODA(number, number, number) as yrmoda(string, number, number).]], [[yrmoda(1,'a',2)], [error], [error: DEBUG EVALUATE: Type mismatch invoking YRMODA(number, number, number) as yrmoda(number, string, number).]], [[yrmoda(1,2,'a')], [error], [error: DEBUG EVALUATE: Type mismatch invoking YRMODA(number, number, number) as yrmoda(number, number, string).]], dnl FIXME: check out-of-range and nearly out-of-range values dnl [[ctime.days(date.mdy(6,10,1648)) + 577735], [601716.00]], [[ctime.days(date.mdy(6,30,1680)) + 577735], [613424.00]], [[ctime.days(date.mdy(7,24,1716)) + 577735], [626596.00]], [[ctime.days(date.mdy(6,19,1768)) + 577735], [645554.00]], [[ctime.days(date.mdy(8,2,1819)) + 577735], [664224.00]], [[ctime.days(date.mdy(3,27,1839)) + 577735], [671401.00]], [[ctime.days(date.mdy(4,19,1903)) + 577735], [694799.00]], [[ctime.days(date.mdy(8,25,1929)) + 577735], [704424.00]], [[ctime.days(date.mdy(9,29,1941)) + 577735], [708842.00]], [[ctime.days(date.mdy(4,19,1943)) + 577735], [709409.00]], [[ctime.days(date.mdy(10,7,1943)) + 577735], [709580.00]], [[ctime.days(date.mdy(3,17,1992)) + 577735], [727274.00]], [[ctime.days(date.mdy(2,25,1996)) + 577735], [728714.00]], [[ctime.days(date.mdy(11,10,2038)) + 577735], [744313.00]], [[ctime.days(date.mdy(7,18,2094)) + 577735], [764652.00]], dnl FIXME: check out-of-range and nearly out-of-range values dnl [[ctime.days(date.mdy(10,15,1582))], [1.00]], [[ctime.days(date.mdy(9,6,1719))], [50000.00]], [[ctime.days(date.mdy(1,24,1583))], [102.00]], [[ctime.days(date.mdy(12,14,1585))], [1157.00]], [[ctime.days(date.mdy(11,26,1621))], [14288.00]], [[ctime.days(date.mdy(12,25,1821))], [87365.00]], [[ctime.days(date.mdy(12,3,1882))], [109623.00]], [[ctime.days(date.mdy(4,6,2002))], [153211.00]], [[ctime.days(date.mdy(12,19,1999))], [152372.00]], [[ctime.days(date.mdy(10,1,1978))], [144623.00]], [[ctime.days(date.mdy(10,0,1978))], [144622.00]], [[ctime.days(date.mdy(10,32,1978))], [sysmis], [error: DEBUG EVALUATE: Day 32 is not in acceptable range of 0 to 31.]], [[ctime.days(date.mdy(0,31,1978))], [144349.00]], [[ctime.days(date.mdy(13,31,1978))], [144745.00]], [[ctime.days(date.mdy(10,$sysmis,1978))], [sysmis]], [[ctime.days(date.mdy($sysmis,31,1978))], [sysmis]], [[ctime.days(date.mdy(10,31,$sysmis))], [sysmis]], [[ctime.days(date.mdy($sysmis,$sysmis,1978))], [sysmis]], [[ctime.days(date.mdy($sysmis,31,$sysmis))], [sysmis]], [[ctime.days(date.mdy(10,$sysmis,$sysmis))], [sysmis]], [[ctime.days(date.mdy($sysmis,$sysmis,$sysmis))], [sysmis]], [[date.mdy('a',1,2)], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.MDY(number, number, number) as date.mdy(string, number, number).]], [[date.mdy(1,'a',2)], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.MDY(number, number, number) as date.mdy(number, string, number).]], [[date.mdy(1,2,'a')], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.MDY(number, number, number) as date.mdy(number, number, string).]], [[ctime.days(date.mdy(0,0,0))], [152353.00]], [[ctime.days(date.mdy(0,0,999))], [sysmis], [error: DEBUG EVALUATE: Date 0998-12-0 is before the earliest acceptable date of 1582-10-15.]], [[date.mdy(1,1,1582)], [sysmis], [error: DEBUG EVALUATE: Date 1582-1-1 is before the earliest acceptable date of 1582-10-15.]], [[date.mdy(10,14,1582)], [sysmis], [error: DEBUG EVALUATE: Date 1582-10-14 is before the earliest acceptable date of 1582-10-15.]], [[date.mdy(10,15,1582)], [86400.00]], [[ctime.days(date.moyr(1,2000))], [152385.00]], [[ctime.days(date.moyr(2,2000))], [152416.00]], [[ctime.days(date.moyr(3,2000))], [152445.00]], [[ctime.days(date.moyr(4,2000))], [152476.00]], [[ctime.days(date.moyr(5,2000))], [152506.00]], [[ctime.days(date.moyr(13,2000))], [152751.00]], [[ctime.days(date.moyr(14,2000))], [sysmis], [error: DEBUG EVALUATE: Month 14 is not in acceptable range of 0 to 13.]], [[ctime.days(date.moyr($sysmis,2000))], [sysmis]], [[ctime.days(date.moyr(1,$sysmis))], [sysmis]], [[ctime.days(date.moyr($sysmis,$sysmis))], [sysmis]], [[date.moyr('a',2000)], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.MOYR(number, number) as date.moyr(string, number).]], [[date.moyr(5,'a')], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.MOYR(number, number) as date.moyr(number, string).]], [[date.moyr('a','b')], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.MOYR(number, number) as date.moyr(string, string).]], [[ctime.days(date.qyr(1,2000))], [152385.00]], [[ctime.days(date.qyr(2,2000))], [152476.00]], [[ctime.days(date.qyr(5,2000))], [sysmis], [warning: DEBUG EVALUATE: The first argument to DATE.QYR must be 1, 2, 3, or 4.]], [[ctime.days(date.qyr(6,2000))], [sysmis], [warning: DEBUG EVALUATE: The first argument to DATE.QYR must be 1, 2, 3, or 4.]], [[ctime.days(date.qyr($sysmis,2000))], [sysmis]], [[ctime.days(date.qyr(1,$sysmis))], [sysmis]], [[ctime.days(date.qyr($sysmis,$sysmis))], [sysmis]], [[date.qyr('a',2000)], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.QYR(number, number) as date.qyr(string, number).]], [[date.qyr(5,'a')], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.QYR(number, number) as date.qyr(number, string).]], [[date.qyr('a','b')], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.QYR(number, number) as date.qyr(string, string).]], [[ctime.days(date.wkyr(1,2000))], [152385.00]], [[ctime.days(date.wkyr(15,1999))], [152118.00]], [[ctime.days(date.wkyr(36,1999))], [152265.00]], [[ctime.days(date.wkyr(54,1999))], [sysmis], [error: DEBUG EVALUATE: The week argument to DATE.WKYR is outside the acceptable range of 1 to 53. The result will be system-missing.]], [[ctime.days(date.wkyr($sysmis,1999))], [sysmis]], [[ctime.days(date.wkyr(1,$sysmis))], [sysmis]], [[ctime.days(date.wkyr($sysmis,$sysmis))], [sysmis]], [[date.wkyr('a',1999)], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.WKYR(number, number) as date.wkyr(string, number).]], [[date.wkyr(5,'a')], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.WKYR(number, number) as date.wkyr(number, string).]], [[date.wkyr('a','b')], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.WKYR(number, number) as date.wkyr(string, string).]], [[ctime.days(date.yrday(2000,1))], [152385.00]], [[ctime.days(date.yrday(2000,100))], [152484.00]], [[ctime.days(date.yrday(2000,253))], [152637.00]], [[ctime.days(date.yrday(2000,500))], [sysmis], [error: DEBUG EVALUATE: The day argument to DATE.YRDAY is outside the acceptable range of 1 to 366. The result will be system-missing.]], [[ctime.days(date.yrday(2000,-100))], [sysmis], [error: DEBUG EVALUATE: The day argument to DATE.YRDAY is outside the acceptable range of 1 to 366. The result will be system-missing.]], [[ctime.days(date.yrday(1999,$sysmis))], [sysmis]], [[ctime.days(date.yrday($sysmis,1))], [sysmis]], [[ctime.days(date.yrday($sysmis,$sysmis))], [sysmis]], [[date.yrday(1999,'a')], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.YRDAY(number, number) as date.yrday(number, string).]], [[date.yrday('a',5)], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.YRDAY(number, number) as date.yrday(string, number).]], [[date.yrday('a','b')], [error], [error: DEBUG EVALUATE: Type mismatch invoking DATE.YRDAY(number, number) as date.yrday(string, string).]]) CHECK_EXPR_EVAL([xdate], [[xdate.date(date.mdy(6,10,1648) + time.hms(0,0,0)) / 86400], [23981.00]], [[xdate.date(date.mdy(6,30,1680) + time.hms(4,50,38)) / 86400], [35689.00]], [[xdate.date(date.mdy(7,24,1716) + time.hms(12,31,35)) / 86400], [48861.00]], [[xdate.date(date.mdy(6,19,1768) + time.hms(12,47,53)) / 86400], [67819.00]], [[xdate.date(date.mdy(8,2,1819) + time.hms(1,26,0)) / 86400], [86489.00]], [[xdate.date(date.mdy(3,27,1839) + time.hms(20,58,11)) / 86400], [93666.00]], [[xdate.date(date.mdy(4,19,1903) + time.hms(7,36,5)) / 86400], [117064.00]], [[xdate.date(date.mdy(8,25,1929) + time.hms(15,43,49)) / 86400], [126689.00]], [[xdate.date(date.mdy(9,29,1941) + time.hms(4,25,9)) / 86400], [131107.00]], [[xdate.date(date.mdy(4,19,1943) + time.hms(6,49,27)) / 86400], [131674.00]], [[xdate.date(date.mdy(10,7,1943) + time.hms(2,57,52)) / 86400], [131845.00]], [[xdate.date(date.mdy(3,17,1992) + time.hms(16,45,44)) / 86400], [149539.00]], [[xdate.date(date.mdy(2,25,1996) + time.hms(21,30,57)) / 86400], [150979.00]], [[xdate.date(date.mdy(9,29,1941) + time.hms(4,25,9)) / 86400], [131107.00]], [[xdate.date(date.mdy(4,19,43) + time.hms(6,49,27)) / 86400], [131674.00]], [[xdate.date(date.mdy(10,7,43) + time.hms(2,57,52)) / 86400], [131845.00]], [[xdate.date(date.mdy(3,17,92) + time.hms(16,45,44)) / 86400], [149539.00]], [[xdate.date(date.mdy(2,25,96) + time.hms(21,30,57)) / 86400], [150979.00]], [[xdate.date(date.mdy(11,10,2038) + time.hms(22,30,4)) / 86400], [166578.00]], [[xdate.date(date.mdy(7,18,2094) + time.hms(1,56,51)) / 86400], [186917.00]], [[xdate.date(123.4)], [0.00]], [[xdate.date('')], [error], [error: DEBUG EVALUATE: Type mismatch invoking XDATE.DATE(number) as xdate.date(string).]], [[xdate.hour(date.mdy(6,10,1648) + time.hms(0,0,0))], [0.00]], [[xdate.hour(date.mdy(6,30,1680) + time.hms(4,50,38))], [4.00]], [[xdate.hour(date.mdy(7,24,1716) + time.hms(12,31,35))], [12.00]], [[xdate.hour(date.mdy(6,19,1768) + time.hms(12,47,53))], [12.00]], [[xdate.hour(date.mdy(8,2,1819) + time.hms(1,26,0))], [1.00]], [[xdate.hour(date.mdy(3,27,1839) + time.hms(20,58,11))], [20.00]], [[xdate.hour(date.mdy(4,19,1903) + time.hms(7,36,5))], [7.00]], [[xdate.hour(date.mdy(8,25,1929) + time.hms(15,43,49))], [15.00]], [[xdate.hour(date.mdy(9,29,1941) + time.hms(4,25,9))], [4.00]], [[xdate.hour(date.mdy(4,19,1943) + time.hms(6,49,27))], [6.00]], [[xdate.hour(date.mdy(10,7,1943) + time.hms(2,57,52))], [2.00]], [[xdate.hour(date.mdy(3,17,1992) + time.hms(16,45,44))], [16.00]], [[xdate.hour(date.mdy(2,25,1996) + time.hms(21,30,57))], [21.00]], [[xdate.hour(date.mdy(9,29,1941) + time.hms(4,25,9))], [4.00]], [[xdate.hour(date.mdy(4,19,43) + time.hms(6,49,27))], [6.00]], [[xdate.hour(date.mdy(10,7,43) + time.hms(2,57,52))], [2.00]], [[xdate.hour(date.mdy(3,17,92) + time.hms(16,45,44))], [16.00]], [[xdate.hour(date.mdy(2,25,96) + time.hms(21,30,57))], [21.00]], [[xdate.hour(date.mdy(11,10,2038) + time.hms(22,30,4))], [22.00]], [[xdate.hour(date.mdy(7,18,2094) + time.hms(1,56,51))], [1.00]], [[xdate.hour(-1)], [-1.00]], [[xdate.hour(1)], [0.00]], [[xdate.hour($sysmis)], [sysmis]], [[xdate.hour('')], [error], [error: DEBUG EVALUATE: Type mismatch invoking XDATE.HOUR(number) as xdate.hour(string).]], [[xdate.jday(date.mdy(6,10,1648) + time.hms(0,0,0))], [162.00]], [[xdate.jday(date.mdy(6,30,1680) + time.hms(4,50,38))], [182.00]], [[xdate.jday(date.mdy(7,24,1716) + time.hms(12,31,35))], [206.00]], [[xdate.jday(date.mdy(6,19,1768) + time.hms(12,47,53))], [171.00]], [[xdate.jday(date.mdy(8,2,1819) + time.hms(1,26,0))], [214.00]], [[xdate.jday(date.mdy(3,27,1839) + time.hms(20,58,11))], [86.00]], [[xdate.jday(date.mdy(4,19,1903) + time.hms(7,36,5))], [109.00]], [[xdate.jday(date.mdy(8,25,1929) + time.hms(15,43,49))], [237.00]], [[xdate.jday(date.mdy(9,29,1941) + time.hms(4,25,9))], [272.00]], [[xdate.jday(date.mdy(4,19,1943) + time.hms(6,49,27))], [109.00]], [[xdate.jday(date.mdy(10,7,1943) + time.hms(2,57,52))], [280.00]], [[xdate.jday(date.mdy(3,17,1992) + time.hms(16,45,44))], [77.00]], [[xdate.jday(date.mdy(2,25,1996) + time.hms(21,30,57))], [56.00]], [[xdate.jday(date.mdy(9,29,1941) + time.hms(4,25,9))], [272.00]], [[xdate.jday(date.mdy(4,19,43) + time.hms(6,49,27))], [109.00]], [[xdate.jday(date.mdy(10,7,43) + time.hms(2,57,52))], [280.00]], [[xdate.jday(date.mdy(3,17,92) + time.hms(16,45,44))], [77.00]], [[xdate.jday(date.mdy(2,25,96) + time.hms(21,30,57))], [56.00]], [[xdate.jday(date.mdy(11,10,2038) + time.hms(22,30,4))], [314.00]], [[xdate.jday(date.mdy(7,18,2094) + time.hms(1,56,51))], [199.00]], [[xdate.jday(0)], [sysmis]], [[xdate.jday(1)], [sysmis]], [[xdate.jday(86400)], [288.00]], [[xdate.mday(date.mdy(6,10,1648) + time.hms(0,0,0))], [10.00]], [[xdate.mday(date.mdy(6,30,1680) + time.hms(4,50,38))], [30.00]], [[xdate.mday(date.mdy(7,24,1716) + time.hms(12,31,35))], [24.00]], [[xdate.mday(date.mdy(6,19,1768) + time.hms(12,47,53))], [19.00]], [[xdate.mday(date.mdy(8,2,1819) + time.hms(1,26,0))], [2.00]], [[xdate.mday(date.mdy(3,27,1839) + time.hms(20,58,11))], [27.00]], [[xdate.mday(date.mdy(4,19,1903) + time.hms(7,36,5))], [19.00]], [[xdate.mday(date.mdy(8,25,1929) + time.hms(15,43,49))], [25.00]], [[xdate.mday(date.mdy(9,29,1941) + time.hms(4,25,9))], [29.00]], [[xdate.mday(date.mdy(4,19,1943) + time.hms(6,49,27))], [19.00]], [[xdate.mday(date.mdy(10,7,1943) + time.hms(2,57,52))], [7.00]], [[xdate.mday(date.mdy(3,17,1992) + time.hms(16,45,44))], [17.00]], [[xdate.mday(date.mdy(2,25,1996) + time.hms(21,30,57))], [25.00]], [[xdate.mday(date.mdy(9,29,1941) + time.hms(4,25,9))], [29.00]], [[xdate.mday(date.mdy(4,19,43) + time.hms(6,49,27))], [19.00]], [[xdate.mday(date.mdy(10,7,43) + time.hms(2,57,52))], [7.00]], [[xdate.mday(date.mdy(3,17,92) + time.hms(16,45,44))], [17.00]], [[xdate.mday(date.mdy(2,25,96) + time.hms(21,30,57))], [25.00]], [[xdate.mday(date.mdy(11,10,2038) + time.hms(22,30,4))], [10.00]], [[xdate.mday(date.mdy(7,18,2094) + time.hms(1,56,51))], [18.00]], [[xdate.minute(date.mdy(6,10,1648) + time.hms(0,0,0))], [0.00]], [[xdate.minute(date.mdy(6,30,1680) + time.hms(4,50,38))], [50.00]], [[xdate.minute(date.mdy(7,24,1716) + time.hms(12,31,35))], [31.00]], [[xdate.minute(date.mdy(6,19,1768) + time.hms(12,47,53))], [47.00]], [[xdate.minute(date.mdy(8,2,1819) + time.hms(1,26,0))], [26.00]], [[xdate.minute(date.mdy(3,27,1839) + time.hms(20,58,11))], [58.00]], [[xdate.minute(date.mdy(4,19,1903) + time.hms(7,36,5))], [36.00]], [[xdate.minute(date.mdy(8,25,1929) + time.hms(15,43,49))], [43.00]], [[xdate.minute(date.mdy(9,29,1941) + time.hms(4,25,9))], [25.00]], [[xdate.minute(date.mdy(4,19,1943) + time.hms(6,49,27))], [49.00]], [[xdate.minute(date.mdy(10,7,1943) + time.hms(2,57,52))], [57.00]], [[xdate.minute(date.mdy(3,17,1992) + time.hms(16,45,44))], [45.00]], [[xdate.minute(date.mdy(2,25,1996) + time.hms(21,30,57))], [30.00]], [[xdate.minute(date.mdy(9,29,1941) + time.hms(4,25,9))], [25.00]], [[xdate.minute(date.mdy(4,19,43) + time.hms(6,49,27))], [49.00]], [[xdate.minute(date.mdy(10,7,43) + time.hms(2,57,52))], [57.00]], [[xdate.minute(date.mdy(3,17,92) + time.hms(16,45,44))], [45.00]], [[xdate.minute(date.mdy(2,25,96) + time.hms(21,30,57))], [30.00]], [[xdate.minute(date.mdy(11,10,2038) + time.hms(22,30,4))], [30.00]], [[xdate.minute(date.mdy(7,18,2094) + time.hms(1,56,51))], [56.00]], [[xdate.month(date.mdy(6,10,1648) + time.hms(0,0,0))], [6.00]], [[xdate.month(date.mdy(6,30,1680) + time.hms(4,50,38))], [6.00]], [[xdate.month(date.mdy(7,24,1716) + time.hms(12,31,35))], [7.00]], [[xdate.month(date.mdy(6,19,1768) + time.hms(12,47,53))], [6.00]], [[xdate.month(date.mdy(8,2,1819) + time.hms(1,26,0))], [8.00]], [[xdate.month(date.mdy(3,27,1839) + time.hms(20,58,11))], [3.00]], [[xdate.month(date.mdy(4,19,1903) + time.hms(7,36,5))], [4.00]], [[xdate.month(date.mdy(8,25,1929) + time.hms(15,43,49))], [8.00]], [[xdate.month(date.mdy(9,29,1941) + time.hms(4,25,9))], [9.00]], [[xdate.month(date.mdy(4,19,1943) + time.hms(6,49,27))], [4.00]], [[xdate.month(date.mdy(10,7,1943) + time.hms(2,57,52))], [10.00]], [[xdate.month(date.mdy(3,17,1992) + time.hms(16,45,44))], [3.00]], [[xdate.month(date.mdy(2,25,1996) + time.hms(21,30,57))], [2.00]], [[xdate.month(date.mdy(9,29,1941) + time.hms(4,25,9))], [9.00]], [[xdate.month(date.mdy(4,19,43) + time.hms(6,49,27))], [4.00]], [[xdate.month(date.mdy(10,7,43) + time.hms(2,57,52))], [10.00]], [[xdate.month(date.mdy(3,17,92) + time.hms(16,45,44))], [3.00]], [[xdate.month(date.mdy(2,25,96) + time.hms(21,30,57))], [2.00]], [[xdate.month(date.mdy(11,10,2038) + time.hms(22,30,4))], [11.00]], [[xdate.month(date.mdy(7,18,2094) + time.hms(1,56,51))], [7.00]], [[xdate.quarter(date.mdy(6,10,1648) + time.hms(0,0,0))], [2.00]], [[xdate.quarter(date.mdy(6,30,1680) + time.hms(4,50,38))], [2.00]], [[xdate.quarter(date.mdy(7,24,1716) + time.hms(12,31,35))], [3.00]], [[xdate.quarter(date.mdy(6,19,1768) + time.hms(12,47,53))], [2.00]], [[xdate.quarter(date.mdy(8,2,1819) + time.hms(1,26,0))], [3.00]], [[xdate.quarter(date.mdy(3,27,1839) + time.hms(20,58,11))], [1.00]], [[xdate.quarter(date.mdy(4,19,1903) + time.hms(7,36,5))], [2.00]], [[xdate.quarter(date.mdy(8,25,1929) + time.hms(15,43,49))], [3.00]], [[xdate.quarter(date.mdy(9,29,1941) + time.hms(4,25,9))], [3.00]], [[xdate.quarter(date.mdy(4,19,1943) + time.hms(6,49,27))], [2.00]], [[xdate.quarter(date.mdy(10,7,1943) + time.hms(2,57,52))], [4.00]], [[xdate.quarter(date.mdy(3,17,1992) + time.hms(16,45,44))], [1.00]], [[xdate.quarter(date.mdy(2,25,1996) + time.hms(21,30,57))], [1.00]], [[xdate.quarter(date.mdy(9,29,1941) + time.hms(4,25,9))], [3.00]], [[xdate.quarter(date.mdy(4,19,43) + time.hms(6,49,27))], [2.00]], [[xdate.quarter(date.mdy(10,7,43) + time.hms(2,57,52))], [4.00]], [[xdate.quarter(date.mdy(3,17,92) + time.hms(16,45,44))], [1.00]], [[xdate.quarter(date.mdy(2,25,96) + time.hms(21,30,57))], [1.00]], [[xdate.quarter(date.mdy(11,10,2038) + time.hms(22,30,4))], [4.00]], [[xdate.quarter(date.mdy(7,18,2094) + time.hms(1,56,51))], [3.00]], [[xdate.second(date.mdy(6,10,1648) + time.hms(0,0,0))], [0.00]], [[xdate.second(date.mdy(6,30,1680) + time.hms(4,50,38))], [38.00]], [[xdate.second(date.mdy(7,24,1716) + time.hms(12,31,35))], [35.00]], [[xdate.second(date.mdy(6,19,1768) + time.hms(12,47,53))], [53.00]], [[xdate.second(date.mdy(8,2,1819) + time.hms(1,26,0))], [0.00]], [[xdate.second(date.mdy(3,27,1839) + time.hms(20,58,11))], [11.00]], [[xdate.second(date.mdy(4,19,1903) + time.hms(7,36,5))], [5.00]], [[xdate.second(date.mdy(8,25,1929) + time.hms(15,43,49))], [49.00]], [[xdate.second(date.mdy(9,29,1941) + time.hms(4,25,9))], [9.00]], [[xdate.second(date.mdy(4,19,1943) + time.hms(6,49,27))], [27.00]], [[xdate.second(date.mdy(10,7,1943) + time.hms(2,57,52))], [52.00]], [[xdate.second(date.mdy(3,17,1992) + time.hms(16,45,44))], [44.00]], [[xdate.second(date.mdy(2,25,1996) + time.hms(21,30,57))], [57.00]], [[xdate.second(date.mdy(9,29,1941) + time.hms(4,25,9))], [9.00]], [[xdate.second(date.mdy(4,19,43) + time.hms(6,49,27))], [27.00]], [[xdate.second(date.mdy(10,7,43) + time.hms(2,57,52))], [52.00]], [[xdate.second(date.mdy(3,17,92) + time.hms(16,45,44))], [44.00]], [[xdate.second(date.mdy(2,25,96) + time.hms(21,30,57))], [57.00]], [[xdate.second(date.mdy(11,10,2038) + time.hms(22,30,4))], [4.00]], [[xdate.second(date.mdy(7,18,2094) + time.hms(1,56,51))], [51.00]], [[xdate.tday(date.mdy(6,10,1648) + time.hms(0,0,0))], [23981.00]], [[xdate.tday(date.mdy(6,30,1680) + time.hms(4,50,38))], [35689.00]], [[xdate.tday(date.mdy(7,24,1716) + time.hms(12,31,35))], [48861.00]], [[xdate.tday(date.mdy(6,19,1768) + time.hms(12,47,53))], [67819.00]], [[xdate.tday(date.mdy(8,2,1819) + time.hms(1,26,0))], [86489.00]], [[xdate.tday(date.mdy(3,27,1839) + time.hms(20,58,11))], [93666.00]], [[xdate.tday(date.mdy(4,19,1903) + time.hms(7,36,5))], [117064.00]], [[xdate.tday(date.mdy(8,25,1929) + time.hms(15,43,49))], [126689.00]], [[xdate.tday(date.mdy(9,29,1941) + time.hms(4,25,9))], [131107.00]], [[xdate.tday(date.mdy(4,19,1943) + time.hms(6,49,27))], [131674.00]], [[xdate.tday(date.mdy(10,7,1943) + time.hms(2,57,52))], [131845.00]], [[xdate.tday(date.mdy(3,17,1992) + time.hms(16,45,44))], [149539.00]], [[xdate.tday(date.mdy(2,25,1996) + time.hms(21,30,57))], [150979.00]], [[xdate.tday(date.mdy(9,29,1941) + time.hms(4,25,9))], [131107.00]], [[xdate.tday(date.mdy(4,19,43) + time.hms(6,49,27))], [131674.00]], [[xdate.tday(date.mdy(10,7,43) + time.hms(2,57,52))], [131845.00]], [[xdate.tday(date.mdy(3,17,92) + time.hms(16,45,44))], [149539.00]], [[xdate.tday(date.mdy(2,25,96) + time.hms(21,30,57))], [150979.00]], [[xdate.tday(date.mdy(11,10,2038) + time.hms(22,30,4))], [166578.00]], [[xdate.tday(date.mdy(7,18,2094) + time.hms(1,56,51))], [186917.00]], [[xdate.time(date.mdy(6,10,1648) + time.hms(0,0,0))], [0.00]], [[xdate.time(date.mdy(6,30,1680) + time.hms(4,50,38))], [17438.00]], [[xdate.time(date.mdy(7,24,1716) + time.hms(12,31,35))], [45095.00]], [[xdate.time(date.mdy(6,19,1768) + time.hms(12,47,53))], [46073.00]], [[xdate.time(date.mdy(8,2,1819) + time.hms(1,26,0))], [5160.00]], [[xdate.time(date.mdy(3,27,1839) + time.hms(20,58,11))], [75491.00]], [[xdate.time(date.mdy(4,19,1903) + time.hms(7,36,5))], [27365.00]], [[xdate.time(date.mdy(8,25,1929) + time.hms(15,43,49))], [56629.00]], [[xdate.time(date.mdy(9,29,1941) + time.hms(4,25,9))], [15909.00]], [[xdate.time(date.mdy(4,19,1943) + time.hms(6,49,27))], [24567.00]], [[xdate.time(date.mdy(10,7,1943) + time.hms(2,57,52))], [10672.00]], [[xdate.time(date.mdy(3,17,1992) + time.hms(16,45,44))], [60344.00]], [[xdate.time(date.mdy(2,25,1996) + time.hms(21,30,57))], [77457.00]], [[xdate.time(date.mdy(9,29,1941) + time.hms(4,25,9))], [15909.00]], [[xdate.time(date.mdy(4,19,43) + time.hms(6,49,27))], [24567.00]], [[xdate.time(date.mdy(10,7,43) + time.hms(2,57,52))], [10672.00]], [[xdate.time(date.mdy(3,17,92) + time.hms(16,45,44))], [60344.00]], [[xdate.time(date.mdy(2,25,96) + time.hms(21,30,57))], [77457.00]], [[xdate.time(date.mdy(11,10,2038) + time.hms(22,30,4))], [81004.00]], [[xdate.time(date.mdy(7,18,2094) + time.hms(1,56,51))], [7011.00]], [[xdate.week(date.mdy(6,10,1648) + time.hms(0,0,0))], [24.00]], [[xdate.week(date.mdy(6,30,1680) + time.hms(4,50,38))], [26.00]], [[xdate.week(date.mdy(7,24,1716) + time.hms(12,31,35))], [30.00]], [[xdate.week(date.mdy(6,19,1768) + time.hms(12,47,53))], [25.00]], [[xdate.week(date.mdy(8,2,1819) + time.hms(1,26,0))], [31.00]], [[xdate.week(date.mdy(3,27,1839) + time.hms(20,58,11))], [13.00]], [[xdate.week(date.mdy(4,19,1903) + time.hms(7,36,5))], [16.00]], [[xdate.week(date.mdy(8,25,1929) + time.hms(15,43,49))], [34.00]], [[xdate.week(date.mdy(9,29,1941) + time.hms(4,25,9))], [39.00]], [[xdate.week(date.mdy(4,19,1943) + time.hms(6,49,27))], [16.00]], [[xdate.week(date.mdy(10,7,1943) + time.hms(2,57,52))], [40.00]], [[xdate.week(date.mdy(3,17,1992) + time.hms(16,45,44))], [11.00]], [[xdate.week(date.mdy(2,25,1996) + time.hms(21,30,57))], [8.00]], [[xdate.week(date.mdy(9,29,1941) + time.hms(4,25,9))], [39.00]], [[xdate.week(date.mdy(4,19,43) + time.hms(6,49,27))], [16.00]], [[xdate.week(date.mdy(10,7,43) + time.hms(2,57,52))], [40.00]], [[xdate.week(date.mdy(3,17,92) + time.hms(16,45,44))], [11.00]], [[xdate.week(date.mdy(2,25,96) + time.hms(21,30,57))], [8.00]], [[xdate.week(date.mdy(11,10,2038) + time.hms(22,30,4))], [45.00]], [[xdate.week(date.mdy(7,18,2094) + time.hms(1,56,51))], [29.00]], [[xdate.wkday(date.mdy(6,10,1648))], [4.00]], [[xdate.wkday(date.mdy(6,30,1680))], [1.00]], [[xdate.wkday(date.mdy(7,24,1716))], [6.00]], [[xdate.wkday(date.mdy(6,19,1768))], [1.00]], [[xdate.wkday(date.mdy(8,2,1819))], [2.00]], [[xdate.wkday(date.mdy(3,27,1839))], [4.00]], [[xdate.wkday(date.mdy(4,19,1903))], [1.00]], [[xdate.wkday(date.mdy(8,25,1929))], [1.00]], [[xdate.wkday(date.mdy(9,29,1941))], [2.00]], [[xdate.wkday(date.mdy(4,19,1943))], [2.00]], [[xdate.wkday(date.mdy(10,7,1943))], [5.00]], [[xdate.wkday(date.mdy(3,17,1992))], [3.00]], [[xdate.wkday(date.mdy(2,25,1996))], [1.00]], [[xdate.wkday(date.mdy(9,29,1941))], [2.00]], [[xdate.wkday(date.mdy(4,19,43))], [2.00]], [[xdate.wkday(date.mdy(10,7,43))], [5.00]], [[xdate.wkday(date.mdy(3,17,92))], [3.00]], [[xdate.wkday(date.mdy(2,25,96))], [1.00]], [[xdate.wkday(date.mdy(11,10,2038))], [4.00]], [[xdate.wkday(date.mdy(7,18,2094))], [1.00]], [[xdate.year(date.mdy(6,10,1648) + time.hms(0,0,0))], [1648.00]], [[xdate.year(date.mdy(6,30,1680) + time.hms(4,50,38))], [1680.00]], [[xdate.year(date.mdy(7,24,1716) + time.hms(12,31,35))], [1716.00]], [[xdate.year(date.mdy(6,19,1768) + time.hms(12,47,53))], [1768.00]], [[xdate.year(date.mdy(8,2,1819) + time.hms(1,26,0))], [1819.00]], [[xdate.year(date.mdy(3,27,1839) + time.hms(20,58,11))], [1839.00]], [[xdate.year(date.mdy(4,19,1903) + time.hms(7,36,5))], [1903.00]], [[xdate.year(date.mdy(8,25,1929) + time.hms(15,43,49))], [1929.00]], [[xdate.year(date.mdy(9,29,1941) + time.hms(4,25,9))], [1941.00]], [[xdate.year(date.mdy(4,19,1943) + time.hms(6,49,27))], [1943.00]], [[xdate.year(date.mdy(10,7,1943) + time.hms(2,57,52))], [1943.00]], [[xdate.year(date.mdy(3,17,1992) + time.hms(16,45,44))], [1992.00]], [[xdate.year(date.mdy(2,25,1996) + time.hms(21,30,57))], [1996.00]], [[xdate.year(date.mdy(9,29,1941) + time.hms(4,25,9))], [1941.00]], [[xdate.year(date.mdy(4,19,43) + time.hms(6,49,27))], [1943.00]], [[xdate.year(date.mdy(10,7,43) + time.hms(2,57,52))], [1943.00]], [[xdate.year(date.mdy(3,17,92) + time.hms(16,45,44))], [1992.00]], [[xdate.year(date.mdy(2,25,96) + time.hms(21,30,57))], [1996.00]], [[xdate.year(date.mdy(11,10,2038) + time.hms(22,30,4))], [2038.00]], [[xdate.year(date.mdy(7,18,2094) + time.hms(1,56,51))], [2094.00]]) CHECK_EXPR_EVAL([datediff], [[datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'years')], [-32.00]], [[datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'years')], [-36.00]], [[datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'years')], [-51.00]], [[datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'years')], [-51.00]], [[datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'years')], [-19.00]], [[datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'years')], [-64.00]], [[datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'years')], [-26.00]], [[datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'years')], [-12.00]], [[datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'years')], [-1.00]], [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'years')], [0.00]], [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'years')], [-48.00]], [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'years')], [-3.00]], [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'years')], [-54.00]], [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'years')], [-1.00]], [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'years')], [0.00]], [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'years')], [-48.00]], [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'years')], [-3.00]], [[datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'years')], [-42.00]], [[datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'years')], [-55.00]], [[datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'years')], [-3.00]], [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'years')], [-4.00]], [[datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'years')], [-2.00]], [[datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'quarters')], [-128.00]], [[datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'quarters')], [-144.00]], [[datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'quarters')], [-207.00]], [[datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'quarters')], [-204.00]], [[datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'quarters')], [-78.00]], [[datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'quarters')], [-256.00]], [[datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'quarters')], [-105.00]], [[datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'quarters')], [-48.00]], [[datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'quarters')], [-6.00]], [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'quarters')], [-1.00]], [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'quarters')], [-193.00]], [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'quarters')], [-15.00]], [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'quarters')], [-217.00]], [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'quarters')], [-6.00]], [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'quarters')], [-1.00]], [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'quarters')], [-193.00]], [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'quarters')], [-15.00]], [[datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'quarters')], [-170.00]], [[datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'quarters')], [-222.00]], [[datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'quarters')], [-15.00]], [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'quarters')], [-16.00]], [[datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'quarters')], [-11.00]], [[datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'months')], [-384.00]], [[datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'months')], [-432.00]], [[datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'months')], [-622.00]], [[datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'months')], [-613.00]], [[datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'months')], [-235.00]], [[datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'months')], [-768.00]], [[datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'months')], [-316.00]], [[datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'months')], [-145.00]], [[datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'months')], [-18.00]], [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'months')], [-5.00]], [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'months')], [-581.00]], [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'months')], [-47.00]], [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'months')], [-652.00]], [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'months')], [-18.00]], [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'months')], [-5.00]], [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'months')], [-581.00]], [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'months')], [-47.00]], [[datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'months')], [-512.00]], [[datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'months')], [-668.00]], [[datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'months')], [-47.00]], [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'months')], [-48.00]], [[datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'months')], [-35.00]], [[datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'weeks')], [-1672.00]], [[datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'weeks')], [-1881.00]], [[datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'weeks')], [-2708.00]], [[datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'weeks')], [-2667.00]], [[datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'weeks')], [-1025.00]], [[datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'weeks')], [-3342.00]], [[datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'weeks')], [-1375.00]], [[datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'weeks')], [-631.00]], [[datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'weeks')], [-81.00]], [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'weeks')], [-24.00]], [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'weeks')], [-2527.00]], [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'weeks')], [-205.00]], [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'weeks')], [-2838.00]], [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'weeks')], [-81.00]], [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'weeks')], [-24.00]], [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'weeks')], [-2527.00]], [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'weeks')], [-205.00]], [[datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'weeks')], [-2228.00]], [[datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'weeks')], [-2905.00]], [[datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'weeks')], [-208.00]], [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'weeks')], [-208.00]], [[datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'weeks')], [-156.00]], [[datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'days')], [-11708.00]], [[datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'days')], [-13172.00]], [[datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'days')], [-18958.00]], [[datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'days')], [-18670.00]], [[datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'days')], [-7177.00]], [[datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'days')], [-23398.00]], [[datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'days')], [-9625.00]], [[datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'days')], [-4418.00]], [[datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'days')], [-567.00]], [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'days')], [-171.00]], [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'days')], [-17694.00]], [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'days')], [-1440.00]], [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'days')], [-19872.00]], [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'days')], [-567.00]], [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'days')], [-171.00]], [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'days')], [-17694.00]], [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'days')], [-1440.00]], [[datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'days')], [-15599.00]], [[datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'days')], [-20339.00]], [[datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'days')], [-1460.00]], [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'days')], [-1461.00]], [[datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'days')], [-1094.00]], [[datediff(date.mdy(6,30,1680), date.mdy(6,10,1648), 'years')], [32.00]], [[datediff(date.mdy(7,24,1716), date.mdy(6,30,1680), 'years')], [36.00]], [[datediff(date.mdy(6,19,1768), date.mdy(7,24,1716), 'years')], [51.00]], [[datediff(date.mdy(8,2,1819), date.mdy(6,19,1768), 'years')], [51.00]], [[datediff(date.mdy(3,27,1839), date.mdy(8,2,1819), 'years')], [19.00]], [[datediff(date.mdy(4,19,1903), date.mdy(3,27,1839), 'years')], [64.00]], [[datediff(date.mdy(8,25,1929), date.mdy(4,19,1903), 'years')], [26.00]], [[datediff(date.mdy(9,29,1941), date.mdy(8,25,1929), 'years')], [12.00]], [[datediff(date.mdy(4,19,1943), date.mdy(9,29,1941), 'years')], [1.00]], [[datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'years')], [0.00]], [[datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'years')], [48.00]], [[datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'years')], [3.00]], [[datediff(date.mdy(2,25,1996), date.mdy(9,29,1941), 'years')], [54.00]], [[datediff(date.mdy(4,19,43), date.mdy(9,29,1941), 'years')], [1.00]], [[datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'years')], [0.00]], [[datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'years')], [48.00]], [[datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'years')], [3.00]], [[datediff(date.mdy(11,10,2038), date.mdy(2,25,96), 'years')], [42.00]], [[datediff(date.mdy(7,18,2094), date.mdy(11,10,2038), 'years')], [55.00]], [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1900), 'years')], [3.00]], [[datediff(date.mdy(2,29,1908), date.mdy(2,29,1904), 'years')], [4.00]], [[datediff(date.mdy(2,28,1903), date.mdy(2,29,1900), 'years')], [2.00]], [[datediff(date.mdy(6,30,1680), date.mdy(6,10,1648), 'months')], [384.00]], [[datediff(date.mdy(7,24,1716), date.mdy(6,30,1680), 'months')], [432.00]], [[datediff(date.mdy(6,19,1768), date.mdy(7,24,1716), 'months')], [622.00]], [[datediff(date.mdy(8,2,1819), date.mdy(6,19,1768), 'months')], [613.00]], [[datediff(date.mdy(3,27,1839), date.mdy(8,2,1819), 'months')], [235.00]], [[datediff(date.mdy(4,19,1903), date.mdy(3,27,1839), 'months')], [768.00]], [[datediff(date.mdy(8,25,1929), date.mdy(4,19,1903), 'months')], [316.00]], [[datediff(date.mdy(9,29,1941), date.mdy(8,25,1929), 'months')], [145.00]], [[datediff(date.mdy(4,19,1943), date.mdy(9,29,1941), 'months')], [18.00]], [[datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'months')], [5.00]], [[datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'months')], [581.00]], [[datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'months')], [47.00]], [[datediff(date.mdy(2,25,1996), date.mdy(9,29,1941), 'months')], [652.00]], [[datediff(date.mdy(4,19,43), date.mdy(9,29,1941), 'months')], [18.00]], [[datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'months')], [5.00]], [[datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'months')], [581.00]], [[datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'months')], [47.00]], [[datediff(date.mdy(11,10,2038), date.mdy(2,25,96), 'months')], [512.00]], [[datediff(date.mdy(7,18,2094), date.mdy(11,10,2038), 'months')], [668.00]], [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1900), 'months')], [47.00]], [[datediff(date.mdy(2,29,1908), date.mdy(2,29,1904), 'months')], [48.00]], [[datediff(date.mdy(2,28,1903), date.mdy(2,29,1900), 'months')], [35.00]], [[datediff(date.mdy(6,30,1680), date.mdy(6,10,1648), 'quarters')], [128.00]], [[datediff(date.mdy(7,24,1716), date.mdy(6,30,1680), 'quarters')], [144.00]], [[datediff(date.mdy(6,19,1768), date.mdy(7,24,1716), 'quarters')], [207.00]], [[datediff(date.mdy(8,2,1819), date.mdy(6,19,1768), 'quarters')], [204.00]], [[datediff(date.mdy(3,27,1839), date.mdy(8,2,1819), 'quarters')], [78.00]], [[datediff(date.mdy(4,19,1903), date.mdy(3,27,1839), 'quarters')], [256.00]], [[datediff(date.mdy(8,25,1929), date.mdy(4,19,1903), 'quarters')], [105.00]], [[datediff(date.mdy(9,29,1941), date.mdy(8,25,1929), 'quarters')], [48.00]], [[datediff(date.mdy(4,19,1943), date.mdy(9,29,1941), 'quarters')], [6.00]], [[datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'quarters')], [1.00]], [[datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'quarters')], [193.00]], [[datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'quarters')], [15.00]], [[datediff(date.mdy(2,25,1996), date.mdy(9,29,1941), 'quarters')], [217.00]], [[datediff(date.mdy(4,19,43), date.mdy(9,29,1941), 'quarters')], [6.00]], [[datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'quarters')], [1.00]], [[datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'quarters')], [193.00]], [[datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'quarters')], [15.00]], [[datediff(date.mdy(11,10,2038), date.mdy(2,25,96), 'quarters')], [170.00]], [[datediff(date.mdy(7,18,2094), date.mdy(11,10,2038), 'quarters')], [222.00]], [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1900), 'quarters')], [15.00]], [[datediff(date.mdy(2,29,1908), date.mdy(2,29,1904), 'quarters')], [16.00]], [[datediff(date.mdy(2,28,1903), date.mdy(2,29,1900), 'quarters')], [11.00]], dnl time of day is significant for DATEDIFF [[datediff(date.mdy(10,15,1910) + 234, date.mdy(10,10,1910) + 123, 'days')], [5.00]], [[datediff(date.mdy(10,15,1910) + 123, date.mdy(10,10,1910) + 234, 'days')], [4.00]], [[datediff(date.mdy(10,24,1910) + 234, date.mdy(10,10,1910) + 123, 'weeks')], [2.00]], [[datediff(date.mdy(10,24,1910) + 123, date.mdy(10,10,1910) + 234, 'weeks')], [1.00]], [[datediff(date.mdy(10,10,1910) + 234, date.mdy(5,10,1910) + 123, 'months')], [5.00]], [[datediff(date.mdy(10,10,1910) + 123, date.mdy(5,10,1910) + 234, 'months')], [4.00]], [[datediff(date.mdy(5,10,1919) + 234, date.mdy(5,10,1910) + 123, 'years')], [9.00]], [[datediff(date.mdy(5,10,1919) + 123, date.mdy(5,10,1910) + 234, 'years')], [8.00]], [[datediff(date.mdy(10,10,1910) + 123, date.mdy(10,15,1910) + 234, 'days')], [-5.00]], [[datediff(date.mdy(10,10,1910) + 234, date.mdy(10,15,1910) + 123, 'days')], [-4.00]], [[datediff(date.mdy(10,10,1910) + 123, date.mdy(10,24,1910) + 234, 'weeks')], [-2.00]], [[datediff(date.mdy(10,10,1910) + 234, date.mdy(10,24,1910) + 123, 'weeks')], [-1.00]], [[datediff(date.mdy(5,10,1910) + 123, date.mdy(10,10,1910) + 234, 'months')], [-5.00]], [[datediff(date.mdy(5,10,1910) + 234, date.mdy(10,10,1910) + 123, 'months')], [-4.00]], [[datediff(date.mdy(5,10,1910) + 123, date.mdy(5,10,1919) + 234, 'years')], [-9.00]], [[datediff(date.mdy(5,10,1910) + 234, date.mdy(5,10,1919) + 123, 'years')], [-8.00]]) CHECK_EXPR_EVAL([datesum], dnl DATESUM with non-leap year [[ctime.days(datesum(date.mdy(1,31,1900), 1, 'months') - date.mdy(1,1,1900))], [58.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 2, 'months') - date.mdy(1,1,1900))], [89.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 3, 'months') - date.mdy(1,1,1900))], [119.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 4, 'months') - date.mdy(1,1,1900))], [150.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 5.4, 'months') - date.mdy(1,1,1900))], [180.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 6, 'months') - date.mdy(1,1,1900))], [211.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 7, 'months') - date.mdy(1,1,1900))], [242.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 8, 'months') - date.mdy(1,1,1900))], [272.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 9, 'months') - date.mdy(1,1,1900))], [303.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 10, 'months') - date.mdy(1,1,1900))], [333.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 11, 'months') - date.mdy(1,1,1900))], [364.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 12, 'months') - date.mdy(1,1,1900))], [395.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 13.9, 'months') - date.mdy(1,1,1900))], [423.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 1, 'months', 'rollover') - date.mdy(1,1,1900))], [61.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 2, 'months', 'rollover') - date.mdy(1,1,1900))], [89.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 3.2, 'months', 'rollover') - date.mdy(1,1,1900))], [120.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 4, 'months', 'rollover') - date.mdy(1,1,1900))], [150.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 5, 'months', 'rollover') - date.mdy(1,1,1900))], [181.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 6, 'months', 'rollover') - date.mdy(1,1,1900))], [211.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 7, 'months', 'rollover') - date.mdy(1,1,1900))], [242.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 8, 'months', 'rollover') - date.mdy(1,1,1900))], [273.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 9, 'months', 'rollover') - date.mdy(1,1,1900))], [303.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 10, 'months', 'rollover') - date.mdy(1,1,1900))], [334.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 11, 'months', 'rollover') - date.mdy(1,1,1900))], [364.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 12, 'months', 'rollover') - date.mdy(1,1,1900))], [395.00]], [[ctime.days(datesum(date.mdy(1,31,1900), 13, 'months', 'rollover') - date.mdy(1,1,1900))], [426.00]], dnl DATESUM with leap year [[ctime.days(datesum(date.mdy(1,31,1904), 1, 'months') - date.mdy(1,1,1904))], [59.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 2.5, 'months') - date.mdy(1,1,1904))], [90.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 3, 'months') - date.mdy(1,1,1904))], [120.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 4.9, 'months') - date.mdy(1,1,1904))], [151.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 5.1, 'months') - date.mdy(1,1,1904))], [181.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 6, 'months') - date.mdy(1,1,1904))], [212.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 7, 'months') - date.mdy(1,1,1904))], [243.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 8, 'months') - date.mdy(1,1,1904))], [273.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 9, 'months') - date.mdy(1,1,1904))], [304.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 10, 'months') - date.mdy(1,1,1904))], [334.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 11, 'months') - date.mdy(1,1,1904))], [365.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 12, 'months') - date.mdy(1,1,1904))], [396.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 13, 'months') - date.mdy(1,1,1904))], [424.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 1, 'months', 'rollover') - date.mdy(1,1,1904))], [61.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 2, 'months', 'rollover') - date.mdy(1,1,1904))], [90.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 3, 'months', 'rollover') - date.mdy(1,1,1904))], [121.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 4, 'months', 'rollover') - date.mdy(1,1,1904))], [151.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 5, 'months', 'rollover') - date.mdy(1,1,1904))], [182.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 6, 'months', 'rollover') - date.mdy(1,1,1904))], [212.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 7, 'months', 'rollover') - date.mdy(1,1,1904))], [243.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 8, 'months', 'rollover') - date.mdy(1,1,1904))], [274.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 9, 'months', 'rollover') - date.mdy(1,1,1904))], [304.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 10, 'months', 'rollover') - date.mdy(1,1,1904))], [335.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 11, 'months', 'rollover') - date.mdy(1,1,1904))], [365.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 12, 'months', 'rollover') - date.mdy(1,1,1904))], [396.00]], [[ctime.days(datesum(date.mdy(1,31,1904), 13, 'months', 'rollover') - date.mdy(1,1,1904))], [427.00]], [[ctime.days(datesum(date.mdy(6,10,1648), 1, 'weeks') - date.mdy(6,10,1648))], [7.00]], [[ctime.days(datesum(date.mdy(6,30,1680), 2.5, 'weeks') - date.mdy(6,30,1680))], [17.50]], [[ctime.days(datesum(date.mdy(7,24,1716), -3, 'weeks') - date.mdy(7,24,1716))], [-21.00]], [[ctime.days(datesum(date.mdy(6,19,1768), 4, 'weeks') - date.mdy(6,19,1768))], [28.00]], [[ctime.days(datesum(date.mdy(8,2,1819), 5, 'weeks') - date.mdy(8,2,1819))], [35.00]], [[ctime.days(datesum(date.mdy(6,10,1648), 1, 'days') - date.mdy(6,10,1648))], [1.00]], [[ctime.days(datesum(date.mdy(6,30,1680), 2.5, 'days') - date.mdy(6,30,1680))], [2.50]], [[ctime.days(datesum(date.mdy(7,24,1716), -3, 'days') - date.mdy(7,24,1716))], [-3.00]], [[ctime.days(datesum(date.mdy(6,19,1768), 4, 'days') - date.mdy(6,19,1768))], [4.00]], [[ctime.days(datesum(date.mdy(8,2,1819), 5, 'days') - date.mdy(8,2,1819))], [5.00]], [[ctime.days(datesum(date.mdy(6,10,1648), 1, 'hours') - date.mdy(6,10,1648))], [0.04]], [[ctime.days(datesum(date.mdy(6,30,1680), 2.5, 'hours') - date.mdy(6,30,1680))], [0.10]], [[ctime.days(datesum(date.mdy(6,19,1768), -4, 'hours') - date.mdy(6,19,1768))], [-0.17]], [[ctime.days(datesum(date.mdy(8,2,1819), 5, 'hours') - date.mdy(8,2,1819))], [0.21]], dnl DATESUM preserves time-of-day for units of days and longer. [[ctime.days(datesum(date.mdy(8,2,1819) + time.hms(1,2,3), 5, 'days') - (date.mdy(8,2,1819) + time.hms(1,2,3)))], [5.00]], [[ctime.days(datesum(date.mdy(8,2,1819) + time.hms(1,2,3), 5, 'weeks') - (date.mdy(8,2,1819) + time.hms(1,2,3)))], [35.00]], [[ctime.days(datesum(date.mdy(8,2,1819) + time.hms(1,2,3), 5, 'months') - (date.mdy(8,2,1819) + time.hms(1,2,3)))], [153.00]], [[ctime.days(datesum(date.mdy(8,2,1819) + time.hms(1,2,3), 5, 'years') - (date.mdy(8,2,1819) + time.hms(1,2,3)))], [1827.00]]) CHECK_EXPR_EVAL([miscellaneous], dnl These test values are from Applied Statistics, Algorithm AS 310. [[1000 * ncdf.beta(.868,10,20,150)], [937.66]], [[1000 * ncdf.beta(.9,10,10,120)], [730.68]], [[1000 * ncdf.beta(.88,15,5,80)], [160.43]], [[1000 * ncdf.beta(.85,20,10,110)], [186.75]], [[1000 * ncdf.beta(.66,20,30,65)], [655.94]], [[1000 * ncdf.beta(.72,20,50,130)], [979.69]], [[1000 * ncdf.beta(.72,30,20,80)], [116.24]], [[1000 * ncdf.beta(.8,30,40,130)], [993.04]], dnl FIXME: LAG dnl [[X], [1.00], [], [(X = 1.00)]], [[SYSMIS(1)], [false]], [[SYSMIS($SYSMIS)], [true]], [[SYSMIS(1 + $SYSMIS)], [true]], dnl FIXME: out-of-range and nearly out-of-range values on dates dnl dnl Tests correctness of generic optimizations in optimize_tree(). [[x + 0], [10.00], [], [(X = 10.00)]], [[x - 0], [-3.00], [], [(X = -3.00)]], [[0 + x], [5.00], [], [(X = 5.00)]], [[x * 1], [10.00], [], [(X = 10.00)]], [[1 * x], [-3.00], [], [(X = -3.00)]], [[x / 1], [5.00], [], [(X = 5.00)]], [[0 * x], [0.00], [], [(X = 10.00)]], [[x * 0], [0.00], [], [(X = -3.00)]], [[0 / x], [0.00], [], [(X = 5.00)]], [[mod(0, x)], [0.00], [], [(X = 5.00)]], [[x ** 1], [5.00], [], [(X = 5.00)]], [[x ** 2], [25.00], [], [(X = 5.00)]]) AT_SETUP([LAG function]) AT_DATA([lag.sps], [dnl data list /W 1. begin data. 1 2 3 4 5 end data. compute X=lag(w,1). compute Y=lag(x). compute Z=lag(w,2). list. ]) AT_CHECK([pspp -o pspp.csv lag.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading 1 record from INLINE. Variable,Record,Columns,Format W,1,1- 1,F1.0 Table: Data List W,X,Y,Z 1,. ,. ,. @&t@ 2,1.00,. ,. @&t@ 3,2.00,1.00,1.00 4,3.00,2.00,2.00 5,4.00,3.00,3.00 ]) AT_CLEANUP AT_SETUP([LAG crash bug]) AT_DATA([lag.sps], [dnl DATA LIST LIST /x. BEGIN DATA 1 2 END DATA. DO IF (x <> LAG(x) ). ECHO 'hello'. END IF. EXECUTE. ]) AT_CHECK([pspp -o pspp.csv lag.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format x,F8.0 hello ]) AT_CLEANUP dnl Tests for a bug which caused UNIFORM(x) to always return zero. AT_SETUP([UNIFORM function]) AT_DATA([uniform.sps], [dnl set seed=10. input program. + loop #i = 1 to 20. + do repeat response=R1. + compute response = uniform(10). + end repeat. + end case. + end loop. + end file. end input program. list. ]) AT_CHECK([pspp -o pspp.csv uniform.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List R1 7.71 2.99 .21 4.95 6.34 4.43 7.49 8.32 4.99 5.83 2.25 .25 1.98 7.09 7.61 2.66 1.69 2.64 .88 1.50 ]) AT_CLEANUP AT_SETUP([VALUELABEL function]) AT_DATA([valuelabel.sps], [dnl DATA LIST notable /n 1 s 2(a). VALUE LABELS /n 0 'Very dissatisfied' 1 'Dissatisfied' 1.5 'Slightly Peeved' 2 'Neutral' 3 'Satisfied' 4 'Very satisfied'. VALUE LABELS /s 'a' 'Wouldn''t buy again' 'b' 'Unhappy' 'c' 'Bored' 'd' 'Satiated' 'e' 'Elated'. STRING nlabel slabel(a10). COMPUTE nlabel = VALUELABEL(n). COMPUTE slabel = VALUELABEL(s). LIST. BEGIN DATA. 0a 1b 2c 3d 4e 5f 6g END DATA. ]) AT_CHECK([pspp -o pspp.csv valuelabel.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List n,s,nlabel,slabel .,,, 0,a,Very dissa,Wouldn't b 1,b,Dissatisfi,Unhappy @&t@ 2,c,Neutral ,Bored @&t@ 3,d,Satisfied ,Satiated @&t@ 4,e,Very satis,Elated @&t@ 5,f,, 6,g,, ]) AT_CLEANUP AT_SETUP([variables in expressions]) AT_DATA([variables.sps], [dnl DATA LIST NOTABLE/N1 TO N5 1-5. MISSING VALUES N1 TO N5 (3 THRU 5, 1). BEGIN DATA. 12345 6789 END DATA. COMPUTE P1=N1. COMPUTE P2=N2. COMPUTE P3=N3. COMPUTE P4=N4. COMPUTE P5=N5. COMPUTE MC=NMISS(N1 TO N5). COMPUTE VC=NVALID(N1 TO N5). COMPUTE S1=SYSMIS(N1). COMPUTE S2=SYSMIS(N2). COMPUTE S3=SYSMIS(N3). COMPUTE S4=SYSMIS(N4). COMPUTE S5=SYSMIS(N5). COMPUTE M1=MISSING(N1). COMPUTE M2=MISSING(N2). COMPUTE M3=MISSING(N3). COMPUTE M4=MISSING(N4). COMPUTE M5=MISSING(N5). COMPUTE V1=VALUE(N1). COMPUTE V2=VALUE(N2). COMPUTE V3=VALUE(N3). COMPUTE V4=VALUE(N4). COMPUTE V5=VALUE(N5). FORMATS ALL (F1). LIST. ]) AT_CHECK([pspp -o pspp.csv variables.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List N1,N2,N3,N4,N5,P1,P2,P3,P4,P5,MC,VC,S1,S2,S3,S4,S5,M1,M2,M3,M4,M5,V1,V2,V3,V4,V5 1,2,3,4,5,.,2,.,.,.,4,1,0,0,0,0,0,1,0,1,1,1,1,2,3,4,5 6,7,8,9,.,6,7,8,9,.,1,4,0,0,0,0,1,0,0,0,0,1,6,7,8,9,. ]) AT_CLEANUP AT_SETUP([vectors in expressions]) AT_DATA([vectors.sps], [dnl DATA LIST NOTABLE /N1 TO N5 1-5. MISSING VALUES N1 TO N5 (3 THRU 5, 1). BEGIN DATA. 12345 6789 END DATA. VECTOR N=N1 TO N5. VECTOR X(5). LOOP I=1 TO 5. COMPUTE X(I)=N(I) + 1. END LOOP. FORMATS ALL (F2). LIST. ]) AT_CHECK([pspp -o pspp.csv vectors.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List N1,N2,N3,N4,N5,X1,X2,X3,X4,X5,I 1,2,3,4,5,.,3,.,.,.,5 6,7,8,9,.,7,8,9,10,.,5 ]) AT_CLEANUP pspp-1.0.1/tests/language/xforms/0000755000175000017500000000000013150620333013733 500000000000000pspp-1.0.1/tests/language/xforms/sample.at0000644000175000017500000000235013137223525015471 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([SAMPLE]) AT_SETUP([SAMPLE]) AT_DATA([sample.sps], [dnl set seed=3 data list notable /A 1-2. begin data. 1 2 3 4 5 6 7 8 9 10 end data. sample .5. list. ]) AT_CHECK([pspp -o pspp.csv sample.sps]) AT_CAPTURE_FILE([pspp.csv]) AT_CHECK( [n=0 while read line; do n=`expr $n + 1` case $line in # ( "Table: Data List" | A | [[0-9]] | 10) ;; # ( *) echo $line; exit 1; esac done < pspp.csv if test $n -ge 11; then exit 1; fi ]) AT_CLEANUP pspp-1.0.1/tests/language/xforms/compute.at0000644000175000017500000000522513137223525015670 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([COMPUTE transformation]) AT_SETUP([COMPUTE crash with SAVE]) AT_DATA([compute.sps], [INPUT PROGRAM. COMPUTE num = 3. END FILE. END INPUT PROGRAM. EXECUTE. SAVE outfile='temp.sav'. ]) AT_CHECK([pspp -O format=csv compute.sps]) AT_DATA([list.sps], [GET FILE='temp.sav'. LIST. ]) AT_CHECK([pspp -O format=csv list.sps], [0], []) AT_CLEANUP AT_SETUP([COMPUTE bug in long string UPCASE]) AT_DATA([compute.sps], [DATA LIST LIST /A (A161) B (A3). BEGIN DATA abc def ghi jkl END DATA. COMPUTE A=upcase(A). EXECUTE. LIST. ]) AT_CHECK([pspp -O format=csv compute.sps], [0], [Table: Reading free-form data from INLINE. Variable,Format A,A161 B,A3 Table: Data List A,B ABC ,def GHI ,jkl ]) AT_CLEANUP AT_SETUP([COMPUTE bug with long variable names]) AT_DATA([compute.sps], [DATA LIST LIST /longVariablename * x *. BEGIN DATA. 1 2 3 4 END DATA. COMPUTE longvariableName=100-longvariablename. LIST. ]) AT_CHECK([pspp -O format=csv compute.sps], [0], [Table: Reading free-form data from INLINE. Variable,Format longVariablename,F8.0 x,F8.0 Table: Data List longVariablename,x 99.00,2.00 97.00,4.00 ]) AT_CLEANUP AT_SETUP([COMPUTE self-reference to new variable]) AT_DATA([compute.sps], [DATA LIST /ITEM 1-3. COMPUTE SUM=SUM+ITEM. PRINT OUTFILE='compute-sum.out' /ITEM SUM. LEAVE SUM BEGIN DATA. 123 404 555 999 END DATA. ]) AT_CHECK([pspp -O format=csv compute.sps], [0], [Table: Reading 1 record from INLINE. Variable,Record,Columns,Format ITEM,1,1- 3,F3.0 ]) AT_CHECK([cat compute-sum.out], [0], [ 123 123.00 @&t@ 404 527.00 @&t@ 555 1082.00 @&t@ 999 2081.00 @&t@ ]) AT_CLEANUP pspp-1.0.1/tests/language/xforms/recode.at0000644000175000017500000002235613137223525015461 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([RECODE transformation]) m4_define([RECODE_SAMPLE_DATA], [DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10). MISSING VALUES x(9)/s('xxx'). BEGIN DATA. 0, '', '' 1, a, a 2, ab, ab 3, abc, abc 4, abcd, abcd 5, 123, 123 6, ' 123', ' 123' 7, +1, +1 8, 1x, 1x 9, abcd, abcdefghi , xxx, abcdefghij END DATA. ]) AT_SETUP([RECODE numeric to numeric, without INTO]) AT_DATA([recode.sps], [RECODE_SAMPLE_DATA NUMERIC x0 TO x8 (F3). MISSING VALUES x0 to x8 (9). COMPUTE x0=value(x). RECODE x0 (1=9). COMPUTE x1=value(x). RECODE x1 (1=9)(3=8)(5=7). COMPUTE x2=value(x). RECODE x2 (1=8)(2,3,4,5,6,8=9)(9=1). COMPUTE x3=value(x). RECODE x3 (1 THRU 9=10)(MISSING=11). COMPUTE x4=value(x). RECODE x4 (MISSING=11)(1 THRU 9=10). COMPUTE x5=value(x). RECODE x5 (LOWEST THRU 5=1). COMPUTE x6=value(x). RECODE x6 (4 THRU HIGHEST=2). COMPUTE x7=value(x). RECODE x7 (LO THRU HI=3). COMPUTE x8=value(x). RECODE x8 (SYSMIS=4). LIST x x0 TO x8. ]) AT_CHECK([pspp -O format=csv recode.sps], [0], [Table: Data List x,x0,x1,x2,x3,x4,x5,x6,x7,x8 0,0,0,0,0,0,1,0,3,0 1,9,9,8,10,10,1,1,3,1 2,2,2,9,10,10,1,2,3,2 3,3,8,9,10,10,1,3,3,3 4,4,4,9,10,10,1,2,3,4 5,5,7,9,10,10,1,2,3,5 6,6,6,9,10,10,6,2,3,6 7,7,7,7,10,10,7,2,3,7 8,8,8,9,10,10,8,2,3,8 9,9,9,1,10,11,9,2,3,9 .,.,.,.,11,11,.,.,.,4 ]) AT_CLEANUP AT_SETUP([RECODE numeric to numeric, with INTO, without COPY]) AT_DATA([recode.sps], [RECODE_SAMPLE_DATA NUMERIC ix0 TO ix8 (F3). RECODE x (1=9) INTO ix0. RECODE x (1=9)(3=8)(5=7) INTO ix1. RECODE x (1=8)(2,3,4,5,6,8=9)(9=1) INTO ix2. RECODE x (1 THRU 9=10)(MISSING=11) INTO ix3. RECODE x (MISSING=11)(1 THRU 9=10) INTO ix4. RECODE x (LOWEST THRU 5=1) INTO ix5. RECODE x (4 THRU HIGHEST=2) INTO ix6. RECODE x (LO THRU HI=3) INTO ix7. RECODE x (SYSMIS=4) INTO ix8. LIST x ix0 TO ix8. ]) AT_CHECK([pspp -O format=csv recode.sps], [0], [Table: Data List x,ix0,ix1,ix2,ix3,ix4,ix5,ix6,ix7,ix8 0,.,.,.,.,.,1,.,3,. 1,9,9,8,10,10,1,.,3,. 2,.,.,9,10,10,1,.,3,. 3,.,8,9,10,10,1,.,3,. 4,.,.,9,10,10,1,2,3,. 5,.,7,9,10,10,1,2,3,. 6,.,.,9,10,10,.,2,3,. 7,.,.,.,10,10,.,2,3,. 8,.,.,9,10,10,.,2,3,. 9,.,.,1,10,11,.,2,3,. .,.,.,.,11,11,.,.,.,4 ]) AT_CLEANUP AT_SETUP([RECODE numeric to numeric, with INTO, with COPY]) AT_DATA([recode.sps], [RECODE_SAMPLE_DATA NUMERIC cx0 TO cx8 (F3). RECODE x (1=9)(ELSE=COPY) INTO cx0. RECODE x (1=9)(3=8)(5=7)(ELSE=COPY) INTO cx1. RECODE x (1=8)(2,3,4,5,6,8=9)(9=1)(ELSE=COPY) INTO cx2. RECODE x (1 THRU 9=10)(MISSING=11)(ELSE=COPY) INTO cx3. RECODE x (MISSING=11)(1 THRU 9=10)(ELSE=COPY) INTO cx4. RECODE x (LOWEST THRU 5=1)(ELSE=COPY) INTO cx5. RECODE x (4 THRU HIGHEST=2)(ELSE=COPY) INTO cx6. RECODE x (LO THRU HI=3)(ELSE=COPY) INTO cx7. RECODE x (SYSMIS=4)(ELSE=COPY) INTO cx8. RECODE x (5=COPY)(ELSE=22) INTO cx9. LIST x cx0 TO cx9. ]) AT_CHECK([pspp -O format=csv recode.sps], [0], [Table: Data List x,cx0,cx1,cx2,cx3,cx4,cx5,cx6,cx7,cx8,cx9 0,0,0,0,0,0,1,0,3,0,22.00 1,9,9,8,10,10,1,1,3,1,22.00 2,2,2,9,10,10,1,2,3,2,22.00 3,3,8,9,10,10,1,3,3,3,22.00 4,4,4,9,10,10,1,2,3,4,22.00 5,5,7,9,10,10,1,2,3,5,5.00 6,6,6,9,10,10,6,2,3,6,22.00 7,7,7,7,10,10,7,2,3,7,22.00 8,8,8,9,10,10,8,2,3,8,22.00 9,9,9,1,10,11,9,2,3,9,22.00 .,.,.,.,11,11,.,.,.,4,22.00 ]) AT_CLEANUP AT_SETUP([RECODE string to string, with INTO, without COPY]) AT_DATA([recode.sps], [RECODE_SAMPLE_DATA STRING s0 TO s3 (A4)/t0 TO t3 (A10). RECODE s t ('a'='b')('ab'='bc') INTO s0 t0. RECODE s t ('abcd'='xyzw') INTO s1 t1. RECODE s t ('abc'='def')(ELSE='xyz') INTO s2 t2. RECODE t ('a'='b')('abcdefghi'='xyz')('abcdefghij'='jklmnopqr') INTO t3. RECODE s (MISSING='gone') INTO s3. LIST s t s0 TO s3 t0 TO t3. ]) AT_CHECK([pspp -O format=csv recode.sps], [0], [Table: Data List s,t,s0,s1,s2,s3,t0,t1,t2,t3 ,,,,xyz ,,,,xyz , a ,a ,b ,,xyz ,,b ,,xyz ,b @&t@ ab ,ab ,bc ,,xyz ,,bc ,,xyz , abc ,abc ,,,def ,,,,def , abcd,abcd ,,xyzw,xyz ,,,xyzw ,xyz , 123 ,123 ,,,xyz ,,,,xyz , 123,123 ,,,xyz ,,,,xyz , +1 ,+1 ,,,xyz ,,,,xyz , 1x ,1x ,,,xyz ,,,,xyz , abcd,abcdefghi ,,xyzw,xyz ,,,,xyz ,xyz @&t@ xxx ,abcdefghij,,,xyz ,gone,,,xyz ,jklmnopqr @&t@ ]) AT_CLEANUP AT_SETUP(RECODE string to string, with INTO, with COPY]) AT_DATA([recode.sps], [RECODE_SAMPLE_DATA STRING cs0 TO cs2 (A4)/ct0 TO ct3 (A10). RECODE s t ('a'='b')('ab'='bc')(ELSE=COPY) INTO cs0 ct0. RECODE s t ('abcd'='xyzw')(ELSE=COPY) INTO cs1 ct1. RECODE s t ('abc'='def')(ELSE='xyz')(ELSE=COPY) INTO cs2 ct2. RECODE t ('a'='b')('abcdefghi'='xyz')('abcdefghij'='jklmnopqr')(ELSE=COPY) INTO ct3. LIST s t cs0 TO cs2 ct0 TO ct3. ]) AT_CHECK([pspp -O format=csv recode.sps], [0], [Table: Data List s,t,cs0,cs1,cs2,ct0,ct1,ct2,ct3 ,,,,xyz ,,,xyz , a ,a ,b ,a ,xyz ,b ,a ,xyz ,b @&t@ ab ,ab ,bc ,ab ,xyz ,bc ,ab ,xyz ,ab @&t@ abc ,abc ,abc ,abc ,def ,abc ,abc ,def ,abc @&t@ abcd,abcd ,abcd,xyzw,xyz ,abcd ,xyzw ,xyz ,abcd @&t@ 123 ,123 ,123 ,123 ,xyz ,123 ,123 ,xyz ,123 @&t@ 123,123 ,123,123,xyz ,123 ,123 ,xyz ,123 @&t@ +1 ,+1 ,+1 ,+1 ,xyz ,+1 ,+1 ,xyz ,+1 @&t@ 1x ,1x ,1x ,1x ,xyz ,1x ,1x ,xyz ,1x @&t@ abcd,abcdefghi ,abcd,xyzw,xyz ,abcdefghi ,abcdefghi ,xyz ,xyz @&t@ xxx ,abcdefghij,xxx ,xxx ,xyz ,abcdefghij,abcdefghij,xyz ,jklmnopqr @&t@ ]) AT_CLEANUP AT_SETUP([RECODE string to numeric]) AT_DATA([recode.sps], [RECODE_SAMPLE_DATA NUMERIC ns0 TO ns2 (F3)/nt0 TO nt2 (F3). RECODE s t (CONVERT)(' '=0)('abcd'=1) INTO ns0 nt0. RECODE s t (' '=0)(CONVERT)('abcd'=1) INTO ns1 nt1. RECODE s t ('1x'=1)('abcd'=2)(ELSE=3) INTO ns2 nt2. LIST s t ns0 TO ns2 nt0 TO nt2. ]) AT_CHECK([pspp -O format=csv recode.sps], [0], [Table: Data List s,t,ns0,ns1,ns2,nt0,nt1,nt2 ,,.,0,3,.,0,3 a ,a ,.,.,3,.,.,3 ab ,ab ,.,.,3,.,.,3 abc ,abc ,.,.,3,.,.,3 abcd,abcd ,1,1,2,1,1,2 123 ,123 ,123,123,3,123,123,3 123,123 ,123,123,3,123,123,3 +1 ,+1 ,1,1,3,1,1,3 1x ,1x ,.,.,1,.,.,1 abcd,abcdefghi ,1,1,2,.,.,3 xxx ,abcdefghij,.,.,3,.,.,3 ]) AT_CLEANUP AT_SETUP([RECODE numeric to string]) AT_DATA([recode.sps], [RECODE_SAMPLE_DATA STRING sx0 TO sx2 (a10). RECODE x (1 THRU 9='abcdefghij') INTO sx0. RECODE x (0,1,3,5,7,MISSING='xxx') INTO sx1. RECODE x (2 THRU 6,SYSMIS='xyz')(ELSE='foobar') INTO sx2. LIST x sx0 TO sx2. ]) AT_CHECK([pspp -O format=csv recode.sps], [0], [Table: Data List x,sx0,sx1,sx2 0,,xxx ,foobar @&t@ 1,abcdefghij,xxx ,foobar @&t@ 2,abcdefghij,,xyz @&t@ 3,abcdefghij,xxx ,xyz @&t@ 4,abcdefghij,,xyz @&t@ 5,abcdefghij,xxx ,xyz @&t@ 6,abcdefghij,,xyz @&t@ 7,abcdefghij,xxx ,foobar @&t@ 8,abcdefghij,,foobar @&t@ 9,abcdefghij,xxx ,foobar @&t@ .,,xxx ,xyz @&t@ ]) AT_CLEANUP AT_SETUP([RECODE bug in COPY]) AT_DATA([recode.sps], [DATA LIST LIST /A (A1) B (A1). BEGIN DATA 1 2 2 3 3 4 END DATA. ** Clearly, the else=copy is superfluous here RECODE A ("1"="3") ("3"="1") (ELSE=COPY). EXECUTE. LIST. ]) AT_CHECK([pspp -O format=csv recode.sps], [0], [Table: Reading free-form data from INLINE. Variable,Format A,A1 B,A1 Table: Data List A,B 3,2 2,3 1,4 ]) AT_CLEANUP AT_SETUP([RECODE bug in COPY with INTO]) AT_DATA([recode.sps], [DATA LIST LIST /A (A1) B (A1). BEGIN DATA 1 2 2 3 3 4 END DATA. STRING A1 (A1). RECODE A ("1"="3") ("3"="1") (ELSE=COPY) INTO a1. EXECUTE. LIST. ]) AT_CHECK([pspp -O format=csv recode.sps], [0], [Table: Reading free-form data from INLINE. Variable,Format A,A1 B,A1 Table: Data List A,B,A1 1,2,3 2,3,2 3,4,1 ]) AT_CLEANUP AT_SETUP([RECODE increased string widths]) AT_DATA([recode.sps],[dnl data list notable list /x (a1) y (a8) z *. begin data. a a 2 a two 2 b three 2 c b 2 end data. recode x y ("a" = "first") . list. ]) AT_CHECK([pspp -O format=csv recode.sps], [1], [dnl "error: Cannot recode because the variable x would require a width of 5 bytes or greater, but it has a width of only 1 bytes." Table: Data List x,y,z a,a ,2.00 a,two ,2.00 b,three ,2.00 c,b ,2.00 ]) AT_CLEANUP AT_SETUP([RECODE crash on invalid dest variable]) AT_DATA([recode.sps],[dnl DATA LIST LIST NOTABLE/x (f1) s (a4) t (a10). MISSING VALUES x(9)/s('xxx'). BEGIN DATA. 0, '', '' 1, a, a 2, ab, ab 3, abc, abc END DATA. RECODE x (1=9) INTO ". EXECUTE. ]) AT_CHECK([pspp -O format=csv recode.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/xforms/count.at0000644000175000017500000000340713137223525015344 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([COUNT]) AT_SETUP([COUNT -- numeric data]) AT_DATA([count.sps], [dnl DATA LIST LIST /x y. BEGIN DATA. 1 2 2 3 4 5 2 2 5 6 7 2 . 2 END DATA. MISSING VALUES x(7)/y(3). COUNT c=x y (2)/d=x y(7)/e=x y(missing)/f=x y(sysmis). FORMATS ALL(F1). LIST. ]) AT_CHECK([pspp -O format=csv count.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format x,F8.0 y,F8.0 Table: Data List x,y,c,d,e,f 1,2,1,0,0,0 2,3,1,0,1,0 4,5,0,0,0,0 2,2,2,0,0,0 5,6,0,0,0,0 7,2,1,1,1,0 .,2,1,0,1,1 ]) AT_CLEANUP AT_SETUP([COUNT -- string data]) AT_DATA([count.sps], [dnl TITLE 'Test COUNT transformation'. DATA LIST /v1 to v2 1-4(a). BEGIN DATA. 1234 321 2 13 4121 1104 03 4 0193 END DATA. COUNT c=v1 to v2('2',' 4','1'). LIST. ]) AT_CHECK([pspp -O format=csv count.sps], [0], [dnl Title: Test COUNT transformation Table: Reading 1 record from INLINE. Variable,Record,Columns,Format v1,1,1- 2,A2 v2,1,3- 4,A2 Table: Data List v1,v2,c 12,34,.00 32,1 ,1.00 2 ,13,1.00 41,21,.00 11,04,.00 03,4,1.00 01,93,.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/xforms/select-if.at0000644000175000017500000000251213137223525016063 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([FILTER]) AT_SETUP([FILTER]) AT_DATA([filter.sps], [dnl data list notable /X 1-2. begin data. 1 2 3 4 5 6 7 8 9 10 end data. compute FILTER_$ = mod(x,2). filter by filter_$. list. filter off. list. compute filter_$ = 1 - filter_$. filter by filter_$. list. ]) AT_CHECK([pspp -o pspp.csv filter.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List X,FILTER_$ 1,1.00 3,1.00 5,1.00 7,1.00 9,1.00 Table: Data List X,FILTER_$ 1,1.00 2,.00 3,1.00 4,.00 5,1.00 6,.00 7,1.00 8,.00 9,1.00 10,.00 Table: Data List X,FILTER_$ 2,1.00 4,1.00 6,1.00 8,1.00 10,1.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/mann-whitney.txt0000644000175000017500000001413513137223525015527 00000000000000 7 5 7 2 1.00 5 3 6 2 1.00 5 4 7 2 1.00 5 5 7 3 1.00 7 5 -1 4 1.00 6 4 7 2 1.00 7 5 7 2 1.00 6 5 -1 3 1.00 7 6 7 6 1.00 7 4 7 1 .00 7 5 7 3 .00 6 5 7 3 1.00 6 4 6 2 .00 4 3 6 2 .00 5 7 -1 4 1.00 5 4 6 2 1.00 6 4 7 2 1.00 6 4 7 2 1.00 7 5 6 1 .00 7 5 6 2 1.00 7 7 3 4 1.00 3 5 7 4 .00 5 2 2 1 1.00 5 5 5 5 .00 6 6 6 4 1.00 3 5 4 2 1.00 6 4 6 3 .00 5 3 7 2 .00 5 4 7 1 .00 4 3 7 2 1.00 3 2 7 1 1.00 7 3 1 2 1.00 5 7 7 3 1.00 5 4 7 3 1.00 6 5 7 2 .00 6 5 7 4 .00 7 5 7 4 1.00 7 4 6 1 .00 4 3 6 1 1.00 3 4 5 2 .00 5 3 5 1 .00 3 4 5 1 1.00 7 5 7 4 1.00 7 4 4 2 .00 7 6 7 6 1.00 5 4 7 4 .00 7 5 7 3 1.00 7 6 7 5 1.00 7 5 7 4 .00 3 4 6 2 .00 7 6 7 5 .00 5 5 6 2 .00 7 4 7 6 .00 5 5 7 3 .00 7 6 6 3 1.00 6 5 6 2 .00 7 6 1 3 .00 3 4 5 2 .00 6 6 7 3 .00 7 7 7 7 .00 7 2 7 1 1.00 6 6 7 5 1.00 7 6 7 2 .00 4 2 7 1 .00 3 5 5 1 1.00 6 5 7 4 .00 7 4 -1 3 1.00 7 6 -1 3 1.00 6 4 7 2 1.00 5 5 6 3 .00 3 2 4 1 1.00 7 5 5 3 1.00 6 5 7 4 .00 6 6 7 3 1.00 7 4 7 2 1.00 4 2 7 4 1.00 4 6 -1 4 .00 7 4 7 2 1.00 3 2 7 1 .00 6 7 -1 3 .00 5 3 6 5 1.00 7 5 -1 3 .00 5 6 6 1 1.00 7 6 7 2 1.00 4 5 7 3 .00 3 5 5 2 1.00 7 7 7 4 .00 6 5 -1 4 .00 6 5 6 1 .00 3 3 7 1 1.00 2 3 6 2 .00 6 6 7 2 .00 2 1 3 1 .00 4 2 1 1 .00 6 3 7 2 1.00 7 5 7 3 .00 4 3 5 2 .00 6 4 7 2 .00 5 4 6 3 .00 1 2 7 1 .00 7 6 7 4 1.00 5 3 7 2 .00 7 5 6 2 1.00 6 5 6 3 1.00 6 3 6 2 .00 4 4 6 4 1.00 2 1 -1 1 .00 5 4 7 2 1.00 5 6 7 3 1.00 7 6 7 4 1.00 2 5 7 3 .00 6 6 6 3 1.00 4 5 -1 2 1.00 7 4 -1 2 .00 6 7 6 1 1.00 7 4 7 3 .00 5 3 7 2 1.00 5 4 6 3 .00 5 4 6 2 1.00 5 6 6 3 .00 7 5 6 2 1.00 3 4 -1 2 1.00 4 6 -1 2 .00 6 5 7 3 1.00 2 4 -1 1 1.00 7 7 -1 2 1.00 4 6 -1 3 1.00 7 3 7 4 1.00 3 5 6 1 .00 6 7 7 4 1.00 6 6 6 2 1.00 7 6 -1 4 1.00 7 6 7 4 .00 4 2 6 1 .00 6 6 6 2 .00 6 5 -1 2 1.00 6 3 5 3 1.00 6 5 6 3 1.00 5 1 5 2 .00 6 5 7 2 .00 4 6 7 2 .00 5 6 -1 5 1.00 3 2 -1 1 .00 6 6 -1 3 .00 7 5 6 4 .00 7 4 5 1 1.00 4 1 1 3 1.00 3 4 7 1 .00 7 4 7 2 .00 4 3 6 1 1.00 6 7 -1 4 1.00 7 5 7 4 .00 7 4 6 3 .00 6 4 7 2 .00 5 5 7 2 1.00 6 5 6 4 .00 6 4 -1 2 .00 5 4 7 2 .00 3 3 4 1 .00 6 5 7 4 .00 4 4 -1 1 .00 6 4 5 3 .00 7 6 7 3 1.00 6 5 7 2 1.00 7 5 -1 3 .00 6 6 -1 4 1.00 6 5 7 3 .00 6 5 7 3 .00 -1 5 7 5 .00 7 4 3 3 1.00 7 3 7 2 .00 4 5 7 2 .00 5 5 2 1 1.00 5 4 6 3 .00 7 5 6 3 .00 7 6 7 2 .00 7 5 7 4 1.00 7 7 7 3 .00 7 6 7 4 1.00 4 4 5 3 1.00 3 2 5 1 1.00 1 3 1 5 1.00 6 4 7 2 1.00 4 5 -1 2 1.00 6 5 -1 4 1.00 5 3 7 1 .00 5 4 7 2 1.00 6 5 -1 3 1.00 6 3 7 2 1.00 3 2 6 1 .00 6 3 7 2 .00 1 3 1 6 .00 6 4 7 2 .00 7 4 6 2 1.00 7 6 7 1 .00 4 6 -1 3 1.00 7 5 -1 3 1.00 6 2 3 1 .00 7 5 6 3 .00 -1 -1 -1 -1 .00 6 5 6 3 .00 5 4 7 2 1.00 4 6 7 4 1.00 4 2 4 2 1.00 7 6 -1 3 1.00 6 6 6 2 1.00 4 3 5 1 1.00 7 3 7 1 .00 6 7 -1 3 1.00 6 3 -1 2 .00 6 5 5 2 1.00 4 6 -1 3 .00 2 4 7 2 .00 6 6 7 6 .00 6 6 -1 3 .00 6 5 -1 2 .00 4 4 6 2 1.00 6 5 7 4 1.00 6 5 -1 5 .00 6 5 6 3 .00 6 6 7 3 .00 6 2 -1 1 1.00 5 4 7 3 1.00 7 7 -1 2 1.00 7 7 7 5 1.00 6 4 7 2 .00 5 5 -1 3 .00 7 5 7 3 1.00 6 3 1 2 .00 4 2 2 1 .00 2 4 6 1 .00 pspp-1.0.1/tests/language/data-io/0000755000175000017500000000000013150620333013733 500000000000000pspp-1.0.1/tests/language/data-io/get-data-txt.at0000644000175000017500000002436613137223525016526 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([GET DATA /TYPE=TXT]) dnl These tests exercise features of GET DATA /TYPE=TXT that dnl it has in common with DATA LIST, using tests drawn from dnl DATA LIST. AT_SETUP([GET DATA /TYPE=TXT with explicit delimiters]) AT_DATA([get-data.sps], [dnl get data /type=txt /file=inline /delimiters="|X" /variables=A f7.2 B f7.2 C f7.2 D f7.2. begin data. 1|23X45|2.03 2X22|34|23| 3|34|34X34 end data. list. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List A,B,C,D 1.00,23.00,45.00,2.03 2.00,22.00,34.00,23.00 3.00,34.00,34.00,34.00 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=TXT with FIRSTCASE]) AT_DATA([get-data.sps], [dnl get data /type=txt /file=inline /delimiters=', ' /delcase=variables 4 /firstcase=2 /variables=A f7.2 B f7.2 C f7.2 D f7.2. begin data. # This record is ignored. ,1,2,3 ,4,,5 6 7, 8 9 0,1,,, ,,,, 2 3 4 5 end data. list. ]) AT_CHECK([pspp -o pspp.csv get-data.sps], [0], [ignore]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List A,B,C,D . ,1.00,2.00,3.00 . ,4.00,. ,5.00 6.00,7.00,. ,8.00 9.00,.00,1.00,. @&t@ . ,. ,. ,. @&t@ . ,. ,. ,2.00 . ,3.00,4.00,5.00 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=TXT with FIRSTCASE and tab delimiter]) AT_DATA([get-data.sps], [dnl get data /type=txt /file=inline /delimiters='\t' /delcase=variables 4 /firstcase=3 /variables=A f7.2 B f7.2 C f7.2 D f7.2. begin data. # These records # are skipped. 1 2 3 4 1 2 3 4 @&t@ 1 2 4 1 2 4 @&t@ 1 3 4 1 3 4 @&t@ 1 4 1 4 @&t@ 2 3 4 2 3 4 @&t@ 2 4 2 4 @&t@ 3 4 3 4 @&t@ 4 4 @&t@ end data. list. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List A,B,C,D 1.00,2.00,3.00,4.00 1.00,2.00,3.00,4.00 1.00,2.00,. ,4.00 1.00,2.00,. ,4.00 1.00,. ,3.00,4.00 1.00,. ,3.00,4.00 1.00,. ,. ,4.00 1.00,. ,. ,4.00 . ,2.00,3.00,4.00 . ,2.00,3.00,4.00 . ,2.00,. ,4.00 . ,2.00,. ,4.00 . ,. ,3.00,4.00 . ,. ,3.00,4.00 . ,. ,. ,4.00 . ,. ,. ,4.00 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=TXT with multiple records per case]) AT_DATA([get-data.sps], [dnl get data /type=txt /file=inline /arrangement=fixed /fixcase=3 /variables= /1 start 0-19 adate8 /2 end 0-19 adate /3 count 0-2 f. begin data. 07-22-2007 10-06-2007 321 07-14-1789 08-26-1789 4 01-01-1972 12-31-1999 682 end data. list. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List start,end,count 07/22/07,10/06/2007,321 ********,08/26/1789,4 01/01/72,12/31/1999,682 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=TXT with empty trailing record]) AT_DATA([get-data.sps], [dnl get data /type=txt /file=inline /arrangement=fixed /fixcase=2 /variables= /1 x 0 f y 1 f. begin data. 12 34 56 78 90 end data. list. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List x,y 1,2 3,4 5,6 7,8 9,0 ]) AT_CLEANUP dnl This test is a copy of an example given in the manual dnl in doc/files.texi. AT_SETUP([GET DATA /TYPE=TXT password example]) AT_DATA([passwd.data], [dnl root:$1$nyeSP5gD$pDq/:0:0:,,,:/root:/bin/bash blp:$1$BrP/pFg4$g7OG:1000:1000:Ben Pfaff,,,:/home/blp:/bin/bash john:$1$JBuq/Fioq$g4A:1001:1001:John Darrington,,,:/home/john:/bin/bash jhs:$1$D3li4hPL$88X1:1002:1002:Jason Stover,,,:/home/jhs:/bin/csh ]) AT_DATA([passwd.sps], [dnl GET DATA /TYPE=TXT /FILE='passwd.data' /DELIMITERS=':' /VARIABLES=username A20 password A40 uid F10 gid F10 gecos A40 home A40 shell A40. LIST. ]) AT_CHECK([pspp -o pspp.csv passwd.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List username,password,uid,gid,gecos,home,shell root ,$1$nyeSP5gD$pDq/ ,0,0,",,, ",/root ,/bin/bash @&t@ blp ,$1$BrP/pFg4$g7OG ,1000,1000,"Ben Pfaff,,, ",/home/blp ,/bin/bash @&t@ john ,$1$JBuq/Fioq$g4A ,1001,1001,"John Darrington,,, ",/home/john ,/bin/bash @&t@ jhs ,$1$D3li4hPL$88X1 ,1002,1002,"Jason Stover,,, ",/home/jhs ,/bin/csh @&t@ ]) AT_CLEANUP dnl This test is a copy of an example given in the manual dnl in doc/files.texi. AT_SETUP([GET DATA /TYPE=TXT cars example]) AT_DATA([cars.data], [dnl model year mileage price type age Civic 2002 29883 15900 Si 2 Civic 2003 13415 15900 EX 1 Civic 1992 107000 3800 n/a 12 Accord 2002 26613 17900 EX 1 ]) AT_DATA([cars.sps], [dnl GET DATA /TYPE=TXT /FILE='cars.data' /DELIMITERS=' ' /FIRSTCASE=2 /VARIABLES=model A8 year F4 mileage F6 price F5 type A4 age F2. LIST. GET DATA /TYPE=TXT /FILE='cars.data' /ARRANGEMENT=FIXED /FIRSTCASE=2 /VARIABLES=model 0-7 A year 8-15 F mileage 16-23 F price 24-31 F type 32-39 A age 40-47 F. LIST. ]) AT_CHECK([pspp -o pspp.csv cars.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List model,year,mileage,price,type,age Civic ,2002,29883,15900,Si ,2 Civic ,2003,13415,15900,EX ,1 Civic ,1992,107000,3800,n/a ,12 Accord ,2002,26613,17900,EX ,1 Table: Data List model,year,mileage,price,type,age Civic ,2002,29883,15900,Si ,2 Civic ,2003,13415,15900,EX ,1 Civic ,1992,107000,3800,n/a ,12 Accord ,2002,26613,17900,EX ,1 ]) AT_CLEANUP dnl This test is a copy of an example given in the manual dnl in doc/files.texi. AT_SETUP([GET DATA /TYPE=TXT pets example]) AT_DATA([pets.data], [dnl 'Pet''s Name', "Age", "Color", "Date Received", "Price", "Height", "Type" , (Years), , , (Dollars), , "Rover", 4.5, Brown, "12 Feb 2004", 80, '1''4"', "Dog" "Charlie", , Gold, "5 Apr 2007", 12.3, "3""", "Fish" "Molly", 2, Black, "12 Dec 2006", 25, '5"', "Cat" "Gilly", , White, "10 Apr 2007", 10, "3""", "Guinea Pig" ]) AT_DATA([pets.sps], [dnl GET DATA /TYPE=TXT /FILE='pets.data' /DELIMITERS=', ' /QUALIFIER='''"' /FIRSTCASE=3 /VARIABLES=name A10 age F3.1 color A5 received EDATE10 price F5.2 height a5 type a10. LIST. ]) AT_CHECK([pspp -o pspp.csv pets.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List name,age,color,received,price,height,type Rover ,4.5,Brown,12.02.2004,80.00,"1'4"" ",Dog @&t@ Charlie ,. ,Gold ,05.04.2007,12.30,"3"" ",Fish @&t@ Molly ,2.0,Black,12.12.2006,25.00,"5"" ",Cat @&t@ Gilly ,. ,White,10.04.2007,10.00,"3"" ",Guinea Pig ]) AT_CLEANUP dnl " (fixes Emacs highlighting) AT_SETUP([GET DATA /TYPE=TXT with IMPORTCASE]) AT_CHECK([$PERL > test.data <<'EOF' for ($i = 1; $i <= 100; $i++) { printf "%02d\n", $i; } EOF ]) AT_DATA([get-data.sps], [dnl get data /type=txt /file='test.data' /importcase=first 10 /variables x f8.0. get data /type=txt /file='test.data' /importcase=percent 1 /variables x f8.0. get data /type=txt /file='test.data' /importcase=percent 35 /variables x f8.0. get data /type=txt /file='test.data' /importcase=percent 95 /variables x f8.0. get data /type=txt /file='test.data' /importcase=percent 100 /variables x f8.0. ]) AT_CHECK([pspp -O format=csv get-data.sps], [0], [dnl get-data.sps:1: warning: GET DATA: Ignoring obsolete IMPORTCASES subcommand. (N OF CASES or SAMPLE may be used to substitute.) get-data.sps:2: warning: GET DATA: Ignoring obsolete IMPORTCASES subcommand. (N OF CASES or SAMPLE may be used to substitute.) get-data.sps:3: warning: GET DATA: Ignoring obsolete IMPORTCASES subcommand. (N OF CASES or SAMPLE may be used to substitute.) get-data.sps:4: warning: GET DATA: Ignoring obsolete IMPORTCASES subcommand. (N OF CASES or SAMPLE may be used to substitute.) get-data.sps:5: warning: GET DATA: Ignoring obsolete IMPORTCASES subcommand. (N OF CASES or SAMPLE may be used to substitute.) ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=TXT with ENCODING subcommand]) AT_CHECK([i18n-test supports_encodings UTF-8 ISO-8859-1]) AT_DATA([get-data.sps], [dnl set locale='utf-8' get data /type=txt /file='data.txt' /encoding='iso-8859-1' /delimiters="," /variables=s a8. list. ]) printf '\351' > data.txt # é in ISO-8859-1. AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List s é @&t@ ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE= truncated]) AT_DATA([x.sps], [dnl GET DATA /TYPE= . ]) AT_CHECK([pspp -o pspp.csv x.sps], [1], [ignore]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=txt bug]) AT_DATA([thing.txt], [dnl foo, title, last 1, this, 1 2, that, 2 3, other, 3 ]) AT_DATA([x.sps], [dnl GET DATA /TYPE=TXT /FILE="thing.txt" /ARRANGEMENT=DELIMITED /DELCASE=LINE /FIRSTCASE=2 /DELIMITERS="," /VARIABLES=foo F1.0 title A8 last F2.0. list. ]) AT_CHECK([pspp -O format=csv x.sps], [0], [dnl Table: Data List foo,title,last 1,this ,1 2,that ,2 3,other ,3 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=txt another bug]) AT_DATA([crash.sps], [dnl get data /type=txt /file=inline /variables=C f7.2 D f7>2. begin data. 3 2 4 2 5 2 end data. ]) AT_CHECK([pspp -O format=csv crash.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/file-handle.at0000644000175000017500000000220713137223525016361 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([FILE HANDLE]) AT_SETUP([FILE HANDLE]) AT_DATA([wiggle.txt], [dnl 1 2 5 109 ]) AT_DATA([file-handle.sps], [dnl FILE HANDLE myhandle /NAME='wiggle.txt'. DATA LIST LIST FILE=myhandle /x *. LIST. ]) AT_CHECK([pspp -O format=csv file-handle.sps], [0], [dnl Table: Reading free-form data from myhandle. Variable,Format x,F8.0 Table: Data List x 1.00 2.00 5.00 109.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/list.at0000644000175000017500000001606613137223525015174 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([LIST]) AT_SETUP([LIST plain cases]) AT_DATA([data.txt], [dnl 18 1 19 7 20 26 21 76 22 57 23 58 24 38 25 38 26 30 27 21 28 23 ]) AT_DATA([list.sps], [dnl DATA LIST FILE='data.txt'/avar 1-5 bvar 6-10. WEIGHT BY bvar. LIST. ]) AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading 1 record from `data.txt'. Variable,Record,Columns,Format avar,1,1- 5,F5.0 bvar,1,6- 10,F5.0 Table: Data List avar,bvar 18,1 19,7 20,26 21,76 22,57 23,58 24,38 25,38 26,30 27,21 28,23 ]) AT_CLEANUP AT_SETUP([LIST numbered cases]) AT_DATA([data.txt], [dnl 18 1 19 7 20 26 21 76 22 57 23 58 24 38 25 38 26 30 27 21 28 23 ]) AT_DATA([list.sps], [dnl DATA LIST FILE='data.txt'/avar 1-5 bvar 6-10. WEIGHT BY bvar. LIST/FORMAT NUMBERED. ]) AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading 1 record from `data.txt'. Variable,Record,Columns,Format avar,1,1- 5,F5.0 bvar,1,6- 10,F5.0 Table: Data List Case Number,avar,bvar 1,18,1 2,19,7 3,20,26 4,21,76 5,22,57 6,23,58 7,24,38 8,25,38 9,26,30 10,27,21 11,28,23 ]) AT_CLEANUP # Checks for a crash when LIST did not include the variables from SPLIT # FILE in the same positions (bug #30684). AT_SETUP([LIST with split file]) AT_DATA([data.txt], [dnl a 1 a 2 a 3 b 1 c 4 c 5 ]) AT_DATA([list.sps], [dnl DATA LIST LIST NOTABLE FILE='data.txt'/s (a1) n. SPLIT FILE BY s. LIST n. ]) AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Value,Label s,a, Table: Data List n 1.00 2.00 3.00 Variable,Value,Label s,b, Table: Data List n 1.00 Variable,Value,Label s,c, Table: Data List n 4.00 5.00 ]) AT_CLEANUP AT_SETUP([LIST lots of variables]) AT_DATA([data.txt], [dnl 767532466348513789073483106409 888693089424177542378334186760 492611507909187152726427852242 819848892023195875879332001491 452777898709563729845541516650 239961967077732760663525115073 ]) AT_DATA([list.sps], [dnl DATA LIST FILE='data.txt' NOTABLE/x01 to x30 1-30. LIST. ]) AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List x01,x02,x03,x04,x05,x06,x07,x08,x09,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30 7,6,7,5,3,2,4,6,6,3,4,8,5,1,3,7,8,9,0,7,3,4,8,3,1,0,6,4,0,9 8,8,8,6,9,3,0,8,9,4,2,4,1,7,7,5,4,2,3,7,8,3,3,4,1,8,6,7,6,0 4,9,2,6,1,1,5,0,7,9,0,9,1,8,7,1,5,2,7,2,6,4,2,7,8,5,2,2,4,2 8,1,9,8,4,8,8,9,2,0,2,3,1,9,5,8,7,5,8,7,9,3,3,2,0,0,1,4,9,1 4,5,2,7,7,7,8,9,8,7,0,9,5,6,3,7,2,9,8,4,5,5,4,1,5,1,6,6,5,0 2,3,9,9,6,1,9,6,7,0,7,7,7,3,2,7,6,0,6,6,3,5,2,5,1,1,5,0,7,3 ]) AT_CLEANUP AT_SETUP([LIST selected cases]) AT_DATA([data.txt], [dnl 7675324663 8886930894 4926115079 8198488920 4527778987 2399619670 1667799691 1623914684 3681393233 6418731145 2284534083 6617637452 9865713582 1163234537 9981663637 6821567746 0952774952 1641790193 3763182871 2046820753 7970620091 4841176017 6949973797 1396285996 0700489524 ]) AT_DATA([list.sps], [dnl DATA LIST FILE='data.txt' NOTABLE/x0 to x9 1-10. LIST /CASES=FROM 6 TO 20 BY 5. LIST /CASES=4. LIST /CASES=BY 10. LIST /CASES=FROM 25. LIST /CASES=FROM 26. ]) AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 2,3,9,9,6,1,9,6,7,0 2,2,8,4,5,3,4,0,8,3 6,8,2,1,5,6,7,7,4,6 Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 7,6,7,5,3,2,4,6,6,3 8,8,8,6,9,3,0,8,9,4 4,9,2,6,1,1,5,0,7,9 8,1,9,8,4,8,8,9,2,0 Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 7,6,7,5,3,2,4,6,6,3 2,2,8,4,5,3,4,0,8,3 7,9,7,0,6,2,0,0,9,1 Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 0,7,0,0,4,8,9,5,2,4 Table: Data List x0,x1,x2,x3,x4,x5,x6,x7,x8,x9 ]) AT_CLEANUP dnl This program tests for a bug which caused a buffer overflow dnl when the list command attempted to write very long strings. AT_SETUP([LIST very long string]) AT_DATA([list.sps], [dnl INPUT PROGRAM. STRING foo (a2000). + COMPUTE foo=CONCAT(RPAD('A',1999, 'x'), 'Z'). END CASE. END FILE. END INPUT PROGRAM. EXECUTE. DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position foo,Format: A2000,1 Table: Data List foo AxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxZ ]) AT_CLEANUP AT_SETUP([LIST crash on invalid input]) AT_DATA([list.sps], [dnl DATA LIST LIST /`$b. BEGIN DATA. 1 3 4 6 7 9 END DATA. LIST. ]) AT_CHECK([pspp -o pspp.csv list.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/update.at0000644000175000017500000000413013137223525015470 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl m4_define([CHECK_UPDATE], [AT_SETUP([UPDATE $1 with $2]) AT_DATA([a.data], [dnl 1aB 8aM 3aE 5aG 0aA 5aH 6aI 7aJ 2aD 7aK 1aC 7aL 4aF ]) AT_DATA([b.data], [dnl 1bN 3 O 4bP 6bQ 7bR 9bS ]) m4_if([$1], [sav], [AT_DATA([save-a.sps], [dnl DATA LIST NOTABLE FILE='a.data' /a b c 1-3 (A). SAVE OUTFILE='a.sav'. ]) AT_CHECK([pspp -O format=csv save-a.sps])]) m4_if([$2], [sav], [AT_DATA([save-b.sps], [dnl DATA LIST NOTABLE FILE='b.data' /a b c 1-3 (A). SAVE OUTFILE='b.sav'. ]) AT_CHECK([pspp -O format=csv save-b.sps])]) AT_DATA([update.sps], [dnl m4_if([$1], [sav], [], [DATA LIST NOTABLE FILE='a.data' /a b c 1-3 (A).]) m4_if([$2], [sav], [], [DATA LIST NOTABLE FILE='b.data' /a b c 1-3 (A).]) UPDATE m4_if([$1], [sav], [FILE='a.sav'], [FILE=*]) /IN=InA /SORT m4_if([$2], [sav], [FILE='b.sav'], [FILE=*]) /IN=InB /RENAME c=d BY a. LIST. ]) cat update.sps AT_CHECK([pspp -O format=csv update.sps], [0], [dnl update.sps:6: warning: UPDATE: Encountered 3 sets of duplicate cases in the master file. Table: Data List a,b,c,d,InA,InB 0,a,A,,1,0 1,b,B,N,1,1 1,a,C,,1,0 2,a,D,,1,0 3,a,E,O,1,1 4,b,F,P,1,1 5,a,G,,1,0 5,a,H,,1,0 6,b,I,Q,1,1 7,b,J,R,1,1 7,a,K,,1,0 7,a,L,,1,0 8,a,M,,1,0 9,b,,S,0,1 ]) AT_CLEANUP ]) AT_BANNER([UPDATE]) CHECK_UPDATE([sav], [sav]) CHECK_UPDATE([sav], [inline]) CHECK_UPDATE([inline], [sav]) pspp-1.0.1/tests/language/data-io/matrix-data.at0000644000175000017500000002706313146355723016441 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([MATRIX DATA]) AT_SETUP([Matrix data (lower file)]) AT_DATA([matrix-data.pspp], [dnl matrix data variables = rowtype_ var01 TO var08 /format = lower diagonal /file = 'matrix.dat' . list. ]) AT_DATA([matrix.dat], [dnl mean 24.3 5.4 69.7 20.1 13.4 2.7 27.9 3.7 sd 5.7 1.5 23.5 5.8 2.8 4.5 5.4 1.5 n 92 92 92 92 92 92 92 92 corr 1.00 corr .18 1.00 corr -.22 -.17 1.00 corr .36 .31 -.14 1.00 corr .27 .16 -.12 .22 1.00 corr .33 .15 -.17 .24 .21 1.00 corr .50 .29 -.20 .32 .12 .38 1.00 corr .17 .29 -.05 .20 .27 .20 .04 1.00 ]) AT_CHECK([pspp -O format=csv matrix-data.pspp], [0], [dnl Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04,var05,var06,var07,var08 mean ,,24.3000,5.4000,69.7000,20.1000,13.4000,2.7000,27.9000,3.7000 STDDEV ,,5.7000,1.5000,23.5000,5.8000,2.8000,4.5000,5.4000,1.5000 n ,,92.0000,92.0000,92.0000,92.0000,92.0000,92.0000,92.0000,92.0000 corr ,var01,1.0000,.1800,-.2200,.3600,.2700,.3300,.5000,.1700 corr ,var02,.1800,1.0000,-.1700,.3100,.1600,.1500,.2900,.2900 corr ,var03,-.2200,-.1700,1.0000,-.1400,-.1200,-.1700,-.2000,-.0500 corr ,var04,.3600,.3100,-.1400,1.0000,.2200,.2400,.3200,.2000 corr ,var05,.2700,.1600,-.1200,.2200,1.0000,.2100,.1200,.2700 corr ,var06,.3300,.1500,-.1700,.2400,.2100,1.0000,.3800,.2000 corr ,var07,.5000,.2900,-.2000,.3200,.1200,.3800,1.0000,.0400 corr ,var08,.1700,.2900,-.0500,.2000,.2700,.2000,.0400,1.0000 ]) AT_CLEANUP AT_SETUP([Matrix data (upper)]) AT_DATA([matrix-data.pspp], [dnl matrix data variables = rowtype_ var01 var02 var03 var04 /format = upper diagonal. begin data mean 34 35 36 37 sd 22 11 55 66 n_vector 100 101 102 103 corr 1 9 8 7 corr 1 6 5 corr 1 4 corr 1 end data. list. ]) AT_CHECK([pspp -O format=csv matrix-data.pspp], [0], [dnl Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04 mean ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 N ,,100.0000,101.0000,102.0000,103.0000 corr ,var01,1.0000,9.0000,8.0000,7.0000 corr ,var02,9.0000,1.0000,6.0000,5.0000 corr ,var03,8.0000,6.0000,1.0000,4.0000 corr ,var04,7.0000,5.0000,4.0000,1.0000 ]) AT_CLEANUP AT_SETUP([Matrix data (full)]) dnl Just for fun, this one is in a different case. AT_DATA([matrix-data.pspp], [dnl matrix data variables = ROWTYPE_ var01 var02 var03 var04 /format = full diagonal. begin data MEAN 34 35 36 37 SD 22 11 55 66 N 100 101 102 103 CORR 1 9 8 7 CORR 9 1 6 5 CORR 8 6 1 4 CORR 7 5 4 1 end data. list. ]) AT_CHECK([pspp -O format=csv matrix-data.pspp], [0], [dnl Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04 MEAN ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 N ,,100.0000,101.0000,102.0000,103.0000 CORR ,var01,1.0000,9.0000,8.0000,7.0000 CORR ,var02,9.0000,1.0000,6.0000,5.0000 CORR ,var03,8.0000,6.0000,1.0000,4.0000 CORR ,var04,7.0000,5.0000,4.0000,1.0000 ]) AT_CLEANUP AT_SETUP([Matrix data (upper nodiagonal)]) AT_DATA([matrix-data.pspp], [dnl matrix data variables = rowtype_ var01 var02 var03 var04 /format = upper nodiagonal. begin data mean 34 35 36 37 sd 22 11 55 66 n 100 101 102 103 corr 9 8 7 corr 6 5 corr 4 end data. list. ]) AT_CHECK([pspp -O format=csv matrix-data.pspp], [0], [dnl Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04 mean ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 n ,,100.0000,101.0000,102.0000,103.0000 corr ,var01,1.0000,9.0000,8.0000,7.0000 corr ,var02,9.0000,1.0000,6.0000,5.0000 corr ,var03,8.0000,6.0000,1.0000,4.0000 corr ,var04,7.0000,5.0000,4.0000,1.0000 ]) AT_CLEANUP AT_SETUP([Matrix data (lower nodiagonal)]) AT_DATA([matrix-data.pspp], [dnl matrix data variables = rowtype_ var01 var02 var03 var04 /format = lower nodiagonal. begin data mean 34 35 36 37 sd 22 11 55 66 n 100 101 102 103 corr 9 corr 8 6 corr 7 5 4 end data. list. ]) AT_CHECK([pspp -O format=csv matrix-data.pspp], [0], [dnl Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04 mean ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 n ,,100.0000,101.0000,102.0000,103.0000 corr ,var01,1.0000,9.0000,8.0000,7.0000 corr ,var02,9.0000,1.0000,6.0000,5.0000 corr ,var03,8.0000,6.0000,1.0000,4.0000 corr ,var04,7.0000,5.0000,4.0000,1.0000 ]) AT_CLEANUP AT_SETUP([Matrix data split data]) AT_DATA([matrix-data.pspp], [dnl matrix data variables = s1 s2 rowtype_ var01 var02 var03 /split=s1 s2. begin data 8 0 mean 21.4 5.0 72.9 8 0 sd 6.5 1.6 22.8 8 0 n 106 106 106 8 0 corr 1 8 0 corr .41 1 8 0 corr -.16 -.22 1 8 1 mean 11.4 1.0 52.9 8 1 sd 9.5 8.6 12.8 8 1 n 10 11 12 8 1 corr 1 8 1 corr .51 1 8 1 corr .36 -.41 1 end data. display dictionary. list. ]) AT_CHECK([pspp -O format=csv matrix-data.pspp], [0], [dnl Variable,Description,Position s1,Format: F4.0,1 s2,Format: F4.0,2 ROWTYPE_,Format: A8,3 VARNAME_,Format: A8,4 var01,Format: F10.4,5 var02,Format: F10.4,6 var03,Format: F10.4,7 Table: Data List s1,s2,ROWTYPE_,VARNAME_,var01,var02,var03 8,0,mean ,,21.4000,5.0000,72.9000 8,0,STDDEV ,,6.5000,1.6000,22.8000 8,0,n ,,106.0000,106.0000,106.0000 8,0,corr ,var01,1.0000,.4100,-.1600 8,0,corr ,var02,.4100,1.0000,-.2200 8,0,corr ,var03,-.1600,-.2200,1.0000 8,1,mean ,,11.4000,1.0000,52.9000 8,1,STDDEV ,,9.5000,8.6000,12.8000 8,1,n ,,10.0000,11.0000,12.0000 8,1,corr ,var01,1.0000,.5100,.3600 8,1,corr ,var02,.5100,1.0000,-.4100 8,1,corr ,var03,.3600,-.4100,1.0000 ]) AT_CLEANUP AT_SETUP([Matrix data duplicate variable]) dnl Negative test to check for sane behaviour in the face of bad syntax AT_DATA([matrix-data.pspp], [dnl set decimal = dot . matrix data variables = s1 s1 rowtype_ var01 var02 var03 /split=s1. begin data 0 mean 21.4 5.0 72.9 0 sd 6.5 1.6 22.8 0 n 106 106 106 0 corr 1 0 corr .41 1 0 corr -.16 -.22 1 end data . list. ]) AT_CHECK([pspp -O format=csv matrix-data.pspp], [1], [dnl matrix-data.pspp:3: error: MATRIX DATA: Variable s1 appears twice in variable list. matrix-data.pspp:6: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. ]) AT_CLEANUP AT_SETUP([Matrix data - long variable names]) AT_DATA([matrix-data.pspp], [dnl matrix data variables = rowtype_ var01 var_two variable_number_three variableFour /format = upper diagonal. begin data mean 34 35 36 37 sd 22 11 55 66 n_vector 100 101 102 103 corr 1 9 8 7 corr 1 6 5 corr 1 4 corr 1 end data. list. ]) AT_CHECK([pspp -O format=csv matrix-data.pspp], [0], [dnl Table: Data List ROWTYPE_,VARNAME_,var01,var_two,variable_number_three,variableFour mean ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 N ,,100.0000,101.0000,102.0000,103.0000 corr ,var01,1.0000,9.0000,8.0000,7.0000 corr ,var_two,9.0000,1.0000,6.0000,5.0000 corr ,variable_number_three,8.0000,6.0000,1.0000,4.0000 corr ,variableFour,7.0000,5.0000,4.0000,1.0000 ]) AT_CLEANUP AT_SETUP([Matrix reader - read integrity]) dnl Check that matrices presented are read correctly. dnl The example below is an unlikely one since all dnl covariance/correlation matrices must be symmetrical dnl but it serves a purpose for this test. AT_DATA([matrix-reader.pspp], [dnl matrix data variables = rowtype_ var01 to var9 /format = full. begin data n 1 2 3 4 5 6 7 8 9 sd 100 200 300 400 500 600 700 800 900 corr 11 12 13 14 15 16 17 18 19 corr 21 22 23 24 25 26 27 28 29 corr 31 32 33 34 35 36 37 38 39 corr 41 42 43 44 45 46 47 48 49 corr 51 52 53 54 55 56 57 58 59 corr 61 62 63 64 65 66 67 68 69 corr 71 72 73 74 75 76 77 78 79 corr 81 82 83 84 85 86 87 88 89 corr 91 92 93 94 95 96 97 98 99 end data. factor /matrix = in (corr = *) /analysis var02 var04 var06 /method = correlation /rotation = norotate /print correlation. ]) AT_CHECK([pspp -O format=csv matrix-reader.pspp], [0], [dnl Table: Correlation Matrix ,,var02,var04,var06 Correlations,var02,22.00,24.00,26.00 ,var04,42.00,44.00,46.00 ,var06,62.00,64.00,66.00 Table: Component Matrix ,Component, ,1,2 var02,6.73,-2.23 var04,6.95,2.15 var06,9.22,.01 ]) AT_CLEANUP AT_SETUP([Matrix data - too many rows]) dnl Test for a crash which occurred when the matrix had more rows declared dnl than variables to hold them. AT_DATA([matrix-data.pspp], [dnl matrix data variables = rowtype_ var01 var02 var03 var04 / format = upper diagonal . begin data mean 21.4 5.0 72.9 17.4 sd 6.5 1.6 22.8 5.7 n 106 106 106 106 corr 1.00 .32 .48 .28 corr 1.00 .72 .54 .44 corr 1.00 .50 .59 .64 corr 1.00 .62 .49 -.30 corr 1.00 .56 -.38 .52 corr 1.00 -.73 .91 .80 corr 1.00 -.65 -.60 corr 1.00 .70 corr 1.00 end data . execute. ]) AT_CHECK([pspp -O format=csv matrix-data.pspp], [1], [dnl matrix-data.pspp:13: error: MATRIX DATA: There are 4 variable declared but the data has at least 5 matrix rows. matrix-data.pspp:20: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined. ]) AT_CLEANUP AT_SETUP([Matrix data (badly formed)]) AT_DATA([data.pspp], [dnl data list list /ROWTYPE_ (a8) VARNAME_(a4) v1 v2 v3 v4xxxxxxxxxxxxxxxxxxxxxzzzzzzzzzzzzzxxxxxxxxx. begin data mean "" 1 2 3 4 sd "" 5 6 7 8 n "" 2 3 4 5 corr v1 11 22 33 44 corr v2 55 66 77 88 corr v3 111 222 333 444 corr v4 4 3 21 1 end data. list. factor matrix=in(corr = *) . ]) AT_CHECK([pspp -O format=csv data.pspp], [1], [ignore]) AT_CLEANUP AT_SETUP([Matrix data (N subcommand)]) AT_DATA([matrix-data.pspp], [dnl matrix data variables = rowtype_ var01 var02 var03 var04 /n = 99 /format = upper nodiagonal. begin data mean 34 35 36 37 sd 22 11 55 66 n_vector 1 2 3 4 corr 9 8 7 corr 6 5 corr 4 end data. list. ]) AT_CHECK([pspp -O format=csv matrix-data.pspp], [0], [dnl "matrix-data.pspp:12: warning: MATRIX DATA: The N subcommand was specified, but a N record was also found in the data. The N record will be ignored." Table: Data List ROWTYPE_,VARNAME_,var01,var02,var03,var04 N ,,99.0000,99.0000,99.0000,99.0000 mean ,,34.0000,35.0000,36.0000,37.0000 STDDEV ,,22.0000,11.0000,55.0000,66.0000 corr ,var01,1.0000,9.0000,8.0000,7.0000 corr ,var02,9.0000,1.0000,6.0000,5.0000 corr ,var03,8.0000,6.0000,1.0000,4.0000 corr ,var04,7.0000,5.0000,4.0000,1.0000 ]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/get.at0000644000175000017500000000647713137223525015005 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([GET]) dnl Tests for a bug which caused the second procedure dnl after GET to have corrupt input. AT_SETUP([GET data works in multiple procedures]) AT_DATA([get.sps], [dnl DATA LIST LIST NOTABLE /LOCATION * EDITOR * SHELL * FREQ * . BEGIN DATA. 1.00 1.00 1.0 2.00 1.00 1.00 2.0 30.00 1.00 2.00 1.0 8.00 1.00 2.00 2.0 20.00 2.00 1.00 1.0 2.00 2.00 1.00 2.0 22.00 2.00 2.00 1.0 1.00 2.00 2.00 2.0 3.00 END DATA. SAVE /OUTFILE='foo.sav'. GET /FILE='foo.sav'. * This one's ok LIST. * But this one get rubbish LIST. ]) AT_CHECK([pspp -o pspp.csv get.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List LOCATION,EDITOR,SHELL,FREQ 1.00,1.00,1.00,2.00 1.00,1.00,2.00,30.00 1.00,2.00,1.00,8.00 1.00,2.00,2.00,20.00 2.00,1.00,1.00,2.00 2.00,1.00,2.00,22.00 2.00,2.00,1.00,1.00 2.00,2.00,2.00,3.00 Table: Data List LOCATION,EDITOR,SHELL,FREQ 1.00,1.00,1.00,2.00 1.00,1.00,2.00,30.00 1.00,2.00,1.00,8.00 1.00,2.00,2.00,20.00 2.00,1.00,1.00,2.00 2.00,1.00,2.00,22.00 2.00,2.00,1.00,1.00 2.00,2.00,2.00,3.00 ]) AT_CLEANUP dnl Tests for a bug that crashed when GET specified a nonexistent file. AT_SETUP([GET nonexistent file doesn't crash]) dnl We use stdin here, because the bug seems to manifest itself only in dnl interactive mode. AT_CHECK([echo "GET /FILE='nonexistent.sav'." | pspp -O format=csv], [1], [dnl error: An error occurred while opening `nonexistent.sav': No such file or directory. ]) AT_CLEANUP dnl Tests for bug #15766 (/KEEP subcommand on SAVE doesn't dnl fully support ALL) and underlying problems. m4_define([GET_KEEP_ALL], [AT_SETUP([GET with /KEEP=ALL crashes -- $1]) AT_DATA([get.sps], [dnl DATA LIST LIST NOTABLE /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 (F2.0). BEGIN DATA. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 END DATA. LIST. SAVE OUTFILE='test.sav'/$1. GET FILE='test.sav'/KEEP=x y z all. LIST. ]) AT_CHECK([pspp -o pspp.csv get.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 Table: Data List x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w 24,25,26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 ]) AT_CLEANUP]) GET_KEEP_ALL([uncompressed]) GET_KEEP_ALL([compressed]) dnl Test for a crash when no /TYPE was provided AT_SETUP([GET data no type]) AT_DATA([get.sps], [dnl get data /file='anything'. ]) AT_CHECK([pspp get.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/inpt-pgm.at0000644000175000017500000000557613137223525015760 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([INPUT PROGRAM]) dnl Tests for a bug which caused a crash when dnl reading invalid INPUT PROGRAM syntax. AT_SETUP([INPUT PROGRAM invalid syntax crash]) AT_DATA([input-program.sps], [dnl INPUT PROGRAM. DATA LIST NOTABLE /a 1-9. BEGIN DATA 123456789 END DATA. END INPUT PROGRAM. ]) AT_CHECK([pspp -O format=csv input-program.sps], [1], [dnl input-program.sps:3: error: BEGIN DATA: BEGIN DATA is not allowed inside INPUT PROGRAM. ]) AT_CLEANUP dnl Tests for bug #21108, a crash when dnl reading invalid INPUT PROGRAM syntax. AT_SETUP([INPUT PROGRAM invalid syntax crash]) AT_DATA([input-program.sps], [dnl INPUT PROGRAM. DATA LIST LIST NOTABLE /x. END FILE. END INPUT PROGRAM. DESCRIPTIVES x. ]) AT_CHECK([pspp -O format=csv input-program.sps], [1], [dnl error: DESCRIPTIVES: Syntax error at end of input: expecting BEGIN. ]) AT_CLEANUP dnl Tests for bug #38782, an infinite loop processing an empty input program. AT_SETUP([INPUT PROGRAM infinite loop]) AT_DATA([input-program.sps], [dnl INPUT PROGRAM. STRING firstname lastname (a24) / address (a80). END INPUT PROGRAM. EXECUTE. ]) AT_CHECK([pspp -O format=csv input-program.sps], [1], [dnl input-program.sps:3: error: Input program must contain DATA LIST or END FILE. input-program.sps:4: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined. ]) AT_CLEANUP dnl Tests for bug #39097, a bug when an INPUT PROGRAM used VECTOR, was dnl followed immediately by a call to proc_execute() (here via DATASET dnl COPY), and then the input was actually used. AT_SETUP([INPUT PROGRAM with VECTOR and EXECUTE]) AT_DATA([input-program.sps], [dnl INPUT PROGRAM. VECTOR vec(5). LOOP #c = 1 to 10. LOOP #v = 1 to 5. COMPUTE vec(#v) = #v. END LOOP. END CASE. END LOOP. END FILE. END INPUT PROGRAM. DATASET COPY x. LIST. ]) AT_CHECK([pspp -O format=csv input-program.sps], [0], [dnl Table: Data List vec1,vec2,vec3,vec4,vec5 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 1.00,2.00,3.00,4.00,5.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/save-translate.at0000644000175000017500000000676413137223525017156 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([SAVE TRANSLATE /TYPE=CSV]) m4_define([PREPARE_SAVE_TRANSLATE_CSV], [dnl AT_KEYWORDS([SAVE TRANSLATE]) AT_DATA([data.txt], [dnl 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1 1.625,'0 12:00',,,xyzzy,1 ]) AT_DATA([save-translate.pspp], [dnl SET DECIMAL=DOT. DATA LIST LIST NOTABLE FILE="data.txt" /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8) filter(F1.0). MISSING VALUES number(0) time('0 12:00') string('xyzzy'). FILTER BY filter. SAVE TRANSLATE /OUTFILE="data.csv" /TYPE=m4_if([$2], [], [CSV], [$2]) $1. ]) AT_CHECK([pspp -O format=csv save-translate.pspp], [0]) ]) AT_SETUP([CSV output -- defaults]) PREPARE_SAVE_TRANSLATE_CSV AT_CHECK([cat data.csv], [0], [dnl 0,33:30:05,01/02/2003,08/25/1995 15:30:00,"'a,b,c'",0 ,-05:17:00,10/31/2010,04/09/2008 09:29:00, xxx,1 1.625,12:00:00, , ,xyzzy,1 ]) AT_CLEANUP AT_SETUP([CSV output -- recode missing, delete unselected]) PREPARE_SAVE_TRANSLATE_CSV([/MISSING=RECODE /UNSELECTED=DELETE]) AT_CHECK([cat data.csv], [0], [dnl ,-05:17:00,10/31/2010,04/09/2008 09:29:00, xxx,1 1.625, , , ,,1 ]) AT_CLEANUP AT_SETUP([CSV output -- var names, formats]) PREPARE_SAVE_TRANSLATE_CSV( [/FIELDNAMES /TEXTOPTIONS FORMAT=VARIABLE /UNSELECTED=RETAIN]) AT_CHECK([cat data.csv], [0], [dnl number,time,date,datetime,string,filter .000,1 09:30:05,01/02/2003,25-AUG-1995 15:30:00,"'a,b,c'",0 ,-0 05:17,10/31/2010,09-APR-2008 09:29:00, xxx,1 1.625,0 12:00:00, , ,xyzzy,1 ]) AT_CLEANUP AT_SETUP([CSV output -- comma as decimal point]) PREPARE_SAVE_TRANSLATE_CSV([/FIELDNAMES /TEXTOPTIONS DECIMAL=COMMA]) AT_CHECK([cat data.csv], [0], [dnl number;time;date;datetime;string;filter 0;33:30:05;01/02/2003;08/25/1995 15:30:00;'a,b,c';0 ;-05:17:00;10/31/2010;04/09/2008 09:29:00; xxx;1 1,625;12:00:00; ; ;xyzzy;1 ]) AT_CLEANUP AT_SETUP([CSV output -- custom delimiter, qualifier]) PREPARE_SAVE_TRANSLATE_CSV( [/FIELDNAMES /TEXTOPTIONS DELIMITER=':' QUALIFIER="'"]) AT_CHECK([cat data.csv], [0], [dnl number:time:date:datetime:string:filter 0:'33:30:05':01/02/2003:'08/25/1995 15:30:00':'''a,b,c''':0 :'-05:17:00':10/31/2010:'04/09/2008 09:29:00': xxx:1 1.625:'12:00:00': : :xyzzy:1 ]) AT_CLEANUP AT_SETUP([CSV output -- KEEP, RENAME]) PREPARE_SAVE_TRANSLATE_CSV( [/FIELDNAMES /KEEP=time string /RENAME string=name /UNSELECTED=DELETE]) AT_CHECK([cat data.csv], [0], [dnl time,name -05:17:00, xxx 12:00:00,xyzzy ]) AT_CLEANUP AT_BANNER([SAVE TRANSLATE /TYPE=TAB]) AT_SETUP([TAB output]) PREPARE_SAVE_TRANSLATE_CSV([/FIELDNAMES], [TAB]) AT_CHECK([cat data.csv], [0], [dnl number time date datetime string filter 0 33:30:05 01/02/2003 08/25/1995 15:30:00 'a,b,c' 0 -05:17:00 10/31/2010 04/09/2008 09:29:00 xxx 1 1.625 12:00:00 xyzzy 1 ]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/get-data-psql.at0000644000175000017500000001563213137223525016662 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([GET DATA /TYPE=PSQL]) m4_define([INIT_PSQL], [AT_SKIP_IF([test "$PSQL_SUPPORT" = no]) PATH=$PG_PATH:$PATH export PATH PGDATA=`pwd`/cluster export PGDATA PGPORT=$PG_PORT export PGPORT socket_dir=`mktemp -d` PGHOST="$socket_dir" export PGHOST AT_CHECK([initdb -A trust], [0], [ignore]) AT_CHECK([pg_ctl start -w -o "-k $socket_dir -h ''"], [0], [ignore]) trap 'CLEANUP_PSQL' 0 AT_CHECK([createdb -h "$socket_dir" -p $PG_PORT $PG_DBASE], [0], [ignore], [ignore]) AT_DATA([populate.sql], [CREATE TABLE empty (a int, b date, c numeric(23, 4)); -- a largeish table to check big queries work ok. CREATE TABLE large (x int); INSERT INTO large (select * from generate_series(1, 1000)); CREATE TABLE thing ( bool bool , bytea bytea , char char , int8 int8 , int2 int2 , int4 int4 , numeric numeric(50,6) , text text , oid oid , float4 float4 , float8 float8 , money money , pbchar bpchar , varchar varchar , date date , time time , timestamp timestamp , timestamptz timestamptz , interval interval , timetz timetz ); INSERT INTO thing VALUES ( false, '0', 'a', '0', 0, 0, -256.098, 'this-long-text', 0, 0, 0, '0.01', 'a', 'A', '1-Jan-2000', '00:00', 'January 8 04:05:06 1999', 'January 8 04:05:06 1999 PST', '1 minutes', '10:09 UTC+4' ); INSERT INTO thing VALUES ( null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ); INSERT INTO thing VALUES ( true, '1', 'b', '1', 1, 1, 65535.00001, 'that-long-text', 1, 1, 1, '1.23', 'b', 'B', '10-Jan-1963', '01:05:02', '10-Jan-1963 23:58:00', '10-Jan-1963 23:58:00 CET', '2 year 1 month 12 days 1 hours 3 minutes 4 seconds', '01:05:02 UTC-7' ); ]) AT_CHECK([psql -h "$socket_dir" -p $PG_PORT $PG_DBASE < populate.sql], [0], [ignore])]) m4_define([CLEANUP_PSQL], [pg_ctl stop -W -o "-k $socket_dir -h ''"]) AT_SETUP([GET DATA /TYPE=PSQL]) INIT_PSQL dnl Test with an ordinary query. AT_CHECK([cat > ordinary-query.sps < empty-result.sps < large-result.sps < 1). LIST. TEMPORARY. N OF CASES 6. LIST. SORT CASES BY x (D). TEMPORARY. N OF CASES 6. LIST. EOF ]) AT_CHECK([pspp -o pspp.csv large-result.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List x,diff 1.00,. @&t@ 2.00,1.00 3.00,1.00 4.00,1.00 5.00,1.00 6.00,1.00 Table: Data List x,diff 1000.00,1.00 999.00,1.00 998.00,1.00 997.00,1.00 996.00,1.00 995.00,1.00 ]) dnl Check for a bug caused by having string variables in the database, dnl all of which are null. AT_DATA([all-null-string.sql], [-- a table which has a text field containing only null, or zero -- length entries. CREATE TABLE foo (int4 int4, text text); INSERT INTO foo VALUES ('12', ''); INSERT INTO foo VALUES (null, ''); ]) AT_CHECK([psql -h "$socket_dir" -p $PG_PORT $PG_DBASE < all-null-string.sql], [0], [ignore]) AT_CAPTURE_FILE([get-data.sps]) AT_CHECK([cat > get-data.sps <. dnl AT_BANNER([BEGIN DATA]) # BEGIN DATA can run as a command in itself, or it can appear as part # of the first procedure. First, test it after a procedure. AT_SETUP([BEGIN DATA as part of a procedure]) AT_DATA([begin-data.sps], [dnl TITLE 'Test BEGIN DATA ... END DATA'. DATA LIST /a b 1-2. LIST. BEGIN DATA. 12 34 56 78 90 END DATA. ]) AT_CHECK([pspp -O format=csv begin-data.sps], [0], [dnl Title: Test BEGIN DATA ... END DATA Table: Reading 1 record from INLINE. Variable,Record,Columns,Format a,1,1- 1,F1.0 b,1,2- 2,F1.0 Table: Data List a,b 1,2 3,4 5,6 7,8 9,0 ]) AT_CLEANUP # Also test BEGIN DATA as an independent command. AT_SETUP([BEGIN DATA as an independent command]) AT_DATA([begin-data.sps], [dnl data list /A B 1-2. begin data. 09 87 65 43 21 end data. list. ]) AT_CHECK([pspp -O format=csv begin-data.sps], [0], [dnl Table: Reading 1 record from INLINE. Variable,Record,Columns,Format A,1,1- 1,F1.0 B,1,2- 2,F1.0 Table: Data List A,B 0,9 8,7 6,5 4,3 2,1 ]) AT_CLEANUP m4_define([DATA_READER_BINARY], [AT_SETUP([read and write files with $1]) $3 AT_DATA([input.txt], [dnl 07-22-2007 10-06-2007 321 07-14-1789 08-26-1789 4 01-01-1972 12-31-1999 682 ]) AT_DATA([make-binary.pl], [dnl use strict; use warnings; # ASCII to EBCDIC translation table our ($ascii2ebcdic) = "" . "\x00\x01\x02\x03\x37\x2d\x2e\x2f" . "\x16\x05\x25\x0b\x0c\x0d\x0e\x0f" . "\x10\x11\x12\x13\x3c\x3d\x32\x26" . "\x18\x19\x3f\x27\x1c\x1d\x1e\x1f" . "\x40\x5a\x7f\x7b\x5b\x6c\x50\x7d" . "\x4d\x5d\x5c\x4e\x6b\x60\x4b\x61" . "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" . "\xf8\xf9\x7a\x5e\x4c\x7e\x6e\x6f" . "\x7c\xc1\xc2\xc3\xc4\xc5\xc6\xc7" . "\xc8\xc9\xd1\xd2\xd3\xd4\xd5\xd6" . "\xd7\xd8\xd9\xe2\xe3\xe4\xe5\xe6" . "\xe7\xe8\xe9\xad\xe0\xbd\x9a\x6d" . "\x79\x81\x82\x83\x84\x85\x86\x87" . "\x88\x89\x91\x92\x93\x94\x95\x96" . "\x97\x98\x99\xa2\xa3\xa4\xa5\xa6" . "\xa7\xa8\xa9\xc0\x4f\xd0\x5f\x07" . "\x20\x21\x22\x23\x24\x15\x06\x17" . "\x28\x29\x2a\x2b\x2c\x09\x0a\x1b" . "\x30\x31\x1a\x33\x34\x35\x36\x08" . "\x38\x39\x3a\x3b\x04\x14\x3e\xe1" . "\x41\x42\x43\x44\x45\x46\x47\x48" . "\x49\x51\x52\x53\x54\x55\x56\x57" . "\x58\x59\x62\x63\x64\x65\x66\x67" . "\x68\x69\x70\x71\x72\x73\x74\x75" . "\x76\x77\x78\x80\x8a\x8b\x8c\x8d" . "\x8e\x8f\x90\x6a\x9b\x9c\x9d\x9e" . "\x9f\xa0\xaa\xab\xac\x4a\xae\xaf" . "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" . "\xb8\xb9\xba\xbb\xbc\xa1\xbe\xbf" . "\xca\xcb\xcc\xcd\xce\xcf\xda\xdb" . "\xdc\xdd\xde\xdf\xea\xeb\xec\xed" . "\xee\xef\xfa\xfb\xfc\xfd\xfe\xff"; length ($ascii2ebcdic) == 256 || die; open (INPUT, '<', 'input.txt') or die "input.txt: open: $!\n"; my (@data) = or die; close (INPUT) or die; chomp $_ foreach @data; our @records; $2 sub a2e { local ($_) = @_; my ($s) = ""; foreach (split (//)) { $s .= substr ($ascii2ebcdic, ord, 1); } return $s; } sub min { my ($a, $b) = @_; return $a < $b ? $a : $b } sub dump_records { while (@records) { my ($n) = min (int (rand (5)) + 1, scalar (@records)); my (@r) = splice (@records, 0, $n); my ($len) = 0; $len += length foreach @r; print pack ("n xx", $len + 4); print foreach @r; } } ]) AT_CHECK([$PERL make-binary.pl < input.txt > input.bin]) AT_DATA([data-reader.sps], [dnl FILE HANDLE input/NAME='input.bin'/$1. DATA LIST FIXED FILE=input NOTABLE /1 start 1-10 (ADATE) /2 end 1-10 (ADATE) /3 count 1-3. LIST. * Output the data to a new file in the same format. FILE HANDLE OUTPUT/NAME='output.bin'/$1. COMPUTE count=count + 1. PRINT OUTFILE=output/start end count. EXECUTE. ]) AT_CHECK([pspp -O format=csv data-reader.sps], [0], [dnl Table: Data List start,end,count 07/22/2007,10/06/2007,321 07/14/1789,08/26/1789,4 01/01/1972,12/31/1999,682 ]) AT_CHECK([test -s output.bin]) AT_DATA([data-reader-2.sps], [dnl * Re-read the new data and list it, to verify that it was written correctly. FILE HANDLE OUTPUT/NAME='output.bin'/$1. DATA LIST FIXED FILE=output NOTABLE/ start 2-11 (ADATE) end 13-22 (ADATE) count 24-26. LIST. ]) AT_CHECK([pspp -O format=csv data-reader-2.sps], [0], [dnl Table: Data List start,end,count 07/22/2007,10/06/2007,322 07/14/1789,08/26/1789,5 01/01/1972,12/31/1999,683 ]) AT_CLEANUP]) DATA_READER_BINARY([MODE=BINARY], [for $_ (@data) { my ($reclen) = pack ("V", length); print $reclen, $_, $reclen; }]) DATA_READER_BINARY([MODE=360 /RECFORM=FIXED /LRECL=32], [my ($lrecl) = 32; for $_ (@data) { my ($out) = substr ($_, 0, $lrecl); $out .= ' ' x ($lrecl - length ($out)); length ($out) == 32 or die; print +a2e ($out); }], [AT_CHECK([i18n-test supports_encodings EBCDIC-US])]) DATA_READER_BINARY([MODE=360 /RECFORM=VARIABLE], [for $_ (@data) { push (@records, pack ("n xx", length ($_) + 4) . a2e ($_)); } dump_records ();], [AT_CHECK([i18n-test supports_encodings EBCDIC-US])]) DATA_READER_BINARY([MODE=360 /RECFORM=SPANNED], [[for my $line (@data) { local ($_) = $line; my (@r); while (length) { my ($n) = min (int (rand (5)), length); push (@r, substr ($_, 0, $n, '')); } foreach my $i (0...$#r) { my $scc = ($#r == 0 ? 0 : $i == 0 ? 1 : $i == $#r ? 2 : 3); push (@records, pack ("nCx", length ($r[$i]) + 4, $scc) . a2e ($r[$i])); } } dump_records ();]], [AT_CHECK([i18n-test supports_encodings EBCDIC-US])]) pspp-1.0.1/tests/language/data-io/get-data-spreadsheet.at0000644000175000017500000003241413137223525020207 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl m4_define([SPREADSHEET_TEST_PREP],[dnl m4_if($1,[GNM],[dnl AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric])dnl m4_define([testsheet],[Book1.gnumeric])dnl AT_SKIP_IF([test n$GNM_READ_SUPPORT != nyes])dnl ]) dnl m4_if($1,[ODS],[dnl AT_CHECK([cp $top_srcdir/tests/language/data-io/test.ods test.ods])dnl m4_define([testsheet],[test.ods])dnl AT_SKIP_IF([test n$ODF_READ_SUPPORT != nyes])dnl ])dnl ]) m4_define([CHECK_SPREADSHEET_READER], [dnl AT_SETUP([GET DATA /TYPE=$1 with CELLRANGE]) SPREADSHEET_TEST_PREP($1) AT_DATA([get-data.sps], [dnl GET DATA /TYPE=$1 /FILE='testsheet' /READNAMES=off /SHEET=name 'This' /CELLRANGE=range 'g9:i13' . DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position VAR001,Format: F8.2,1 VAR002,Format: A8,2 VAR003,Format: F8.2,3 Table: Data List VAR001,VAR002,VAR003 .00,fred ,20.00 1.00,11 ,21.00 2.00,twelve ,22.00 3.00,13 ,23.00 4.00,14 ,24.00 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=$1 with CELLRANGE and READNAMES]) SPREADSHEET_TEST_PREP($1) AT_DATA([get-data.sps], [dnl GET DATA /TYPE=$1 /FILE='testsheet' /READNAMES=on /SHEET=name 'This' /CELLRANGE=range 'g8:i13' . DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position V1,Format: F8.2,1 V2,Format: A8,2 VAR001,Format: F8.2,3 Table: Data List V1,V2,VAR001 .00,fred ,20.00 1.00,11 ,21.00 2.00,twelve ,22.00 3.00,13 ,23.00 4.00,14 ,24.00 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=$1 without CELLRANGE]) SPREADSHEET_TEST_PREP($1) AT_DATA([get-data.sps], [dnl GET DATA /TYPE=$1 /FILE='testsheet' /SHEET=index 3. DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -O format=csv get-data.sps], [0], [dnl Variable,Description,Position name,Format: A8,1 id,Format: F8.2,2 height,Format: F8.2,3 warning: Cannot convert the value in the spreadsheet cell C4 to format (F8.2): Field contents are not numeric. Table: Data List name,id,height fred ,.00,23.40 bert ,1.00,.56 charlie ,2.00,. @&t@ dick ,3.00,-34.09 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=$1 with missing data]) SPREADSHEET_TEST_PREP($1) AT_DATA([get-data.sps], [dnl * This sheet has no data in one of its variables GET DATA /TYPE=$1 /FILE='testsheet' /READNAMES=on /SHEET=index 5. DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position vone,Format: F8.2,1 vtwo,Format: F8.2,2 vthree,Format: A8,3 v4,Format: F8.2,4 Table: Data List vone,vtwo,vthree,v4 1.00,3.00,,5.00 2.00,4.00,,6.00 ]) AT_CLEANUP dnl This syntax doesn't do anything particularly useful. dnl It has been seen to cause a few crashes, so we check here that it dnl doesn't do anthing bad. AT_SETUP([GET DATA /TYPE=$1 with no options]) SPREADSHEET_TEST_PREP($1) AT_DATA([get-data.sps], [dnl * This sheet is empty GET DATA /TYPE=$1 /FILE='testsheet'. DISPLAY DICTIONARY. LIST. ]) AT_CHECK([pspp -o pspp.csv get-data.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=$1 with empty sheet]) SPREADSHEET_TEST_PREP($1) AT_DATA([get-data.sps], [dnl * This sheet is empty GET DATA /TYPE=$1 /FILE='testsheet' /SHEET=name 'Empty'. ]) AT_CHECK([pspp -o pspp.csv get-data.sps], [0], [dnl warning: Selected sheet or range of spreadsheet `testsheet' is empty. ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=$1 with nonexistent sheet]) SPREADSHEET_TEST_PREP($1) AT_DATA([get-data.sps], [dnl * This sheet doesnt exist. GET DATA /TYPE=$1 /FILE='testsheet' /SHEET=name 'foobarxx'. ]) AT_CHECK([pspp -o pspp.csv get-data.sps], [0], [dnl warning: Selected sheet or range of spreadsheet `testsheet' is empty. ]) AT_CLEANUP ]) AT_BANNER([GET DATA Spreadsheet /TYPE=GNM]) CHECK_SPREADSHEET_READER([GNM]) dnl Check for a bug where gnumeric files were interpreted incorrectly AT_SETUP([GET DATA /TYPE=GNM sheet index bug]) AT_SKIP_IF([test n$GNM_READ_SUPPORT != nyes]) AT_DATA([minimal3.gnumeric],[dnl Sheet1 Sheet2 Sheet3 Sheet1 2 3 Print_Area #REF! A1 Sheet_Title "Sheet1" A1 Name x y Sheet One 1 2 foo 3 4 bar 5 6 Sheet2 2 2 Print_Area #REF! A1 Sheet_Title "Sheet2" A1 Comment DOB wealth Sheet Two 24/5/1966 0.02 wee 37145 3000 Sheet3 2 2 Print_Area #REF! A1 Sheet_Title "Sheet3" A1 3 4 5 6 7 8 9 10 11 ]) AT_DATA([gnum.sps], [dnl GET DATA /TYPE=GNM /FILE='minimal3.gnumeric' /SHEET=index 3 /READNAMES=off . LIST. ]) AT_CHECK([pspp -O format=csv gnum.sps], [0], [dnl Table: Data List VAR001,VAR002,VAR003 3 ,4.00,5.00 6 ,7.00,8.00 9 ,10.00,11.00 ]) AT_CLEANUP dnl Check for a bug where certain gnumeric files failed an assertion AT_SETUP([GET DATA /TYPE=GNM assert-fail]) AT_SKIP_IF([test n$GNM_READ_SUPPORT != nyes]) AT_DATA([read.sps],[dnl GET DATA /TYPE=GNM /FILE='crash.gnumeric' . list. ]) AT_DATA([crash.gnumeric],[dnl Sheet1 Sheet1 2 4 one two 1 2 1 2 1 2 ]) AT_CHECK([pspp -O format=csv read.sps], [0], [ignore]) AT_CLEANUP AT_BANNER([GET DATA Spreadsheet /TYPE=ODS]) CHECK_SPREADSHEET_READER([ODS]) AT_SETUP([GET DATA /TYPE=ODS crash]) AT_SKIP_IF([test n$ODF_READ_SUPPORT != nyes]) AT_CHECK([cp $top_srcdir/tests/language/data-io/newone.ods this.ods])dnl AT_DATA([crash.sps],[dnl GET DATA /TYPE=ODS /FILE='this.ods' /CELLRANGE=RANGE 'A1:C8' /READNAMES=ON LIST. ]) AT_CHECK([pspp -O format=csv crash.sps], [0], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/newone.ods0000644000175000017500000003135612523704223015671 00000000000000PKșQDl9..mimetypeapplication/vnd.oasis.opendocument.spreadsheetPKșQD 7IIThumbnails/thumbnail.pngPNG  IHDRIIDATx{lU H"1EHxXh#j HA."&\lͫH1#1D+"TP/Q1 "FJ y3v;sfev93ٝgfSVW'էO $ҍXw38 @W3n|o̚5kժUOR'v;Oo裏nذѣW^y;nQ92tP(k֬9|=!Ip;jjj;_wҥq7 S/RYumT7@g1se˖a~f>sysٳ /\|Fzo}…Ϗ9ky3cZ=+W_ޛoٝ!B ޲et_4s=/rEEESS 9s~'XhQ`;w<묳dXvivy_G_}رcWquוڽނwˇ㍏}:ycdTدiiiN픧ݮ]lWry'5}uga j/_79޼X'QqQo/7o^uu;3tE=2s;#1c85bf/GW_}5eʔVy:TVVuՠܥM6y/¤I|ﲇ|뭷[ȑ#Fg׺p+N*k?sbŊ &:ȼ7ݵkĉe{ssy֭SYA|<p+^=c=\JN^ [{t٩'NOx_5yb"= (..޻wo|MK {do yKƌo߾3l R]A ݄D"P@5J!>v!CްCV^myꩧ̙d"eM+od, vB !555~馛L .$]vWؕ,T!R߇~䭍쮰+#sHWP\\lje,}ҥKMu1eOw+#ח;n X1bĶmd^tE?٥TUUUH.]^W455ٕ,`!iӦ ~饗J!";fhƌ[Rq1@ߔ +#[Y":eߘtI2svYP!T"蓨X 1lذe˖M2%R"Y|MW 6k֬M6I^,[0B~]DO-n;6zȑ;v >!C;6)O^0sL'N+Cvu=p?LSo> ,oI Qkղڼys/HWm8v8EKKK%%%/"T(?Ɇ[6Y\!KBH"?;ӻNL\sI%{El-ןG;M/bJtk{El! Ri L.No8]"PRDOV)DGv#?)^=ڜb8v;l`*++koowgvœSYŒ%K:::"ip  ω9rdCCèQqs-Iߑ`zyJ| @GvO_xld5)ʩ OuuuX[[6έGv=h~Oz]oB#>\l @Ȯ'“O>Jҟ L}$X޽{j @~NJoB#wuW([@T8!T"蓨U q! N K!̙sԩL  os+2znT!x,J*{ϭyժUuuu^,]?pR|/\cǏ @]^?]IE^r+8 . y!xBIVdٳ?dIV;Gt@5(H$$*nBxuРA?s*7W\$H}U$NlX aPCCݻ{.iU!2/p\^E"BV:\Ͼׁ"U!sM+**|#*D`Hfsv ȹEEE^" :/qF,Y=GxU .ׁ}I}U\.GxUdrnFڅC8D‡ FDDoHЌ] FjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjFjh9fIENDB`PKșQD settings.xmlY[s8~_ijabwwn/d۾plk"tILP2}']qtq1`IYЧ|3Zo&\zM=p|JPJ=K'[IIQ!|s]ԅ$R#ES/R:G! /J&I<_4-\>nTF"!QܢJRg7[ȧ_ZDAA!W!Pt BQz}6w1SO 74Z9JRNmWskT "KjD'EEԔhd'!/ABd@5Q"rӢ;[+%S؊#|oK \LV@ Tۚ0You|)x)f9u Eap0h>YW^!RS+#FR!Jc}.?EJWs2BmňI ʀP׻2P9nJ-o:JwϽ@Ner|U!kI%7s>ۈ{*"%UBA~D;B +}%:NN01"3c@E:eE$ί)'boٿ,~Ipmƴ=yLGhaQ*9tjD0zVd'>c(M(\*1DՌp#aw[,v%iuZeviˮ7PK<PKșQD content.xml\s_QھQ(QUۙin2=_nξ}@$H!YK -*C_'a~X. 믟bjm0%7p4pⳀ$wb_Y/g1NDH'bYPoO " XJRTRK{*F9.-+xhrάKm +^p.O!)≒`-etv;NGɩ5`K3Nsw0ʘpñSX)]$z)X`*0)ezG&pFwPCe1]8@ܿR WYp(=FSqoo9kQvQ89 pxBN"!:fAܿ}8F{f6ID3\-BL=qY;&_|aZƴt(j 8 p&Hb{CFm=WNT.ʒ~J1'j&@cN`RnW?Sa[c+9|!&?8f hiIVm9#z T^ Qd`AXbBw:EW4; LRGl Hqs[u=JG)h7F [ڌ}K}A?fǝtpj#wb0Gff?R^jJre I۹?X}6(2 dPIv e sIB\q>+ *ӕƒ}KtCo~9~ 1l)lԛmb 7tOtԜfymf byӰ͹mq坆ma x8`]Սm  \cS g1?8f$1."*);JYQ>\S%:*``cv"lモ??1 =)EJ5j\JȎPn هoL+E\]_쪇 QFe;;AE,- aI I 4`f4Ri FI`}5 ) AUE@qb$JJuǥNE5Z2II`Ijܖkβh]x9jX>,`x&>c%r/(`k}¡M15$6šsknzjW5jܥ\]q25Jʶ$X?Iuؼ.Δ9eF$TjuN쵛Ľ$M SQgk#PmPB;\|R/꠭=ⱊ[x R4;;B5lEpBytj~]‹+Rv}M.oza}ޅ.o~a}J_J*P o|0gV}e ;O]Ts@H#C޾%ɵS~vڊ/jҔo䴗G\%rg+Bg/75든gW)7ϷV_oRd;nr6^[;2elܛ2Baݝ)[?~I@sPZQ?250!ܷ)[*Q%%>ٔ9@i8Owb4 %p޼ܖׯ4-T9)0Q~'tVJ«b?qbD401'Sƾ7&[w*> 6֛̈́l.˄otW;ޘ̵ś c |#;3V!%=\7_s)#jyp)zi7vnt3䓩wzo#3w!3Ϻ8˸r~k*.F;QrÚMGHTz@A+`F+nPKh,PBPKșQD styles.xml]ے}WnU((m%^'qg˵0$D!& f_k"/ ^Ļ %l hݧO7.?aaz&g? }r7=^ 6.W apK% paЋ-K1TX":m.ӭ)|l-xY[[dsYi6~ e>(ŋJvn2VbDa3RBUj,B di44W}&弔(&ïg[]vi ,U&&ʞ @(Ov q:աkcQXV(SgeA<#{e/T!P:&lU^tBSx5fP0A08艠Y,"5]nz ` ##jx F,-0DsraiU3s<^8xR[^PF׀Bv??d΢#lTr/pJ8b`l JtI*ڎV{T.c--['Z&=G*q 7OX"eXŤY/W,Pe&K?!YP(ZktIf&z0a ye.N7qM[\çb|> TI}bO|҆9AE< mB6] Tg҇%m^ˆҵ/Zl3v3-t>a'&X6h@F]GFdfxXoz\kHhB$k,&* >:-߬NJ+%Y|fC\'$,.gw"@ :t]?LPu hVsWέyni:n4  &-mP0nͭg-0;̀޳|^aB 6|~.t][͞S]KI/o/ŋv.O˾i9[أKϜOdX֣FaS>^_B0O,,pW\W'O5)I,zB0ϽG? QAy#ʅ%mW9-2E漣Ȝ̉`#*9!ve n"{ Ga9b8{qϹFootFGo ~\Xd꜕oKaS> y'.ˉ@zUjA e=P`Oϐ~%r ޒ@NK<Ψ euifW=0 EFR:1{B=u^kG7oT-ŭM S pe41$dhyb*2qsiy9c*y0,$ރ.giamGE_颳m Ib31ie!{}gHvwvFoGFwGFGGFhC(QIt4JOWsmvmtwmttm>Gݲw;n!eov\QdvsCv9<1%_v-ٙvsiO‹m JSlU{ ~3kI3 &-Y }+yү^ɝyDKn΅,g-g-g-gs -6szqW͞vv>|yCIֿxtxtɂG>8\_Iz,T8b9ϭ?+|e%~2t}ѵUl]6T8ި2yoëq#{k's^U|rt!5Q <5t5NsDߜ39V±}U .B1|3y}Qnïn&oql:R5ie&,;+u7MK^, `y/%։h&Ϝ3 aj|@/2P.A2T/d 53Oo= y0 `KqD71v0dkXpƍ+ϮŞš's7)"0`$}XVڥ3> MxKЌ9!74v |\VTRͽ}vYcS+bl8oiƦGՇ%B%;#b.fe%06{QqYbI(i `ϔ1fol6ќ@-Y׼<[H"l7.X=c5T @ũHԂ 1A_6B B39YRIwJjSj`6MPjK#}<.g_& ~1rdU+ڨAE2G}K%St/~`a(ý/J/rs& |Cab %'JKTʀ^Z/Av\@6^|:P"E @dF F;g$B8Tei_ӧ6VEZp՟L{M[ejZP`X ___8='^ fJ:zAJx򼨖PK!s3 $qPKșQDٛ8meta.xml Guest2013-03-15T09:17:02John Darrington2014-02-17T20:14:16LibreOffice/3.5$Linux_x86 LibreOffice_project/350m1$Build-2P0D16PKșQDConfigurations2/statusbar/PKșQDConfigurations2/images/Bitmaps/PKșQDConfigurations2/popupmenu/PKșQD'Configurations2/accelerator/current.xmlPKPKșQDConfigurations2/floater/PKșQDConfigurations2/toolbar/PKșQDConfigurations2/progressbar/PKșQDConfigurations2/toolpanel/PKșQDConfigurations2/menubar/PKșQDMETA-INF/manifest.xmlSn +" 5ҾF ¦j~I6L֛{ٝNElī|þM춫M0: ַi#JF 9hfcl-w*ݳخIs?_&tWc#tuKF:a+ܧt`r8yR| e~ 5R!`ކ0f3K|| 4 WorkbookView::show_horizontal_scrollbar TRUE 4 WorkbookView::show_vertical_scrollbar TRUE 4 WorkbookView::show_notebook_tabs TRUE 4 WorkbookView::do_auto_completion TRUE 4 WorkbookView::is_protected FALSE application gnumeric author John Darrington This vars That Empty Blank This 9 17 1 d_then_r portrait numeral eng_name xxx 1 One Eins 2 Two Zwei 3 Three Drei Vier XY xxx xxxx xxxx yyy V1 V2 yyy 0 fred 20 $$$$ yyy 1 11 21 $$$$ yyyy 2 twelve 22 $$$$ yyyy 3 13 23 $$$$ Eleven yyyy 4 14 24 $$$$ zzz zzz zzz zzz zzz Seventeen vars 4 8 1 d_then_r portrait 1v12 var&x@ a(43) varx varx 1 2 23 2 4 3 4 23 3 4 That 3 4 1 d_then_r portrait name id height fred 0 23.4 bert 1 0.56 charlie 2 n/a dick 3 -34.09 Empty -1 -1 1 d_then_r portrait Blank 3 2 1 d_then_r portrait vone vtwo vthree v4 1 3 5 2 4 6 pspp-1.0.1/tests/language/data-io/save.at0000644000175000017500000000400613137223525015146 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([IMPORT and EXPORT]) AT_SETUP([IMPORT and EXPORT]) AT_DATA([import-export.sps], [dnl DATA LIST LIST NOTABLE /X Y. BEGIN DATA. 1 2 3 . 5 6 END DATA. EXPORT /OUTFILE='wiz.por'. IMPORT /FILE='wiz.por'. LIST. ]) AT_CHECK([pspp -o pspp.csv import-export.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List X,Y 1.00,2.00 3.00,. @&t@ 5.00,6.00 ]) AT_CLEANUP AT_BANNER([SAVE]) # UNSELECTED=DELETE used to cause a crash if there was actually a # filter variable. AT_SETUP([SAVE -- delete unselected]) AT_DATA([data.txt], [dnl 0 '1 9:30:05' 1/2/2003 "25/8/1995 15:30:00" "'a,b,c'",0 , '-0 5:17' 10/31/2010 "9/4/2008 9:29:00" " xxx ",1 1.625,'0 12:00',,,xyzzy,1 ]) AT_DATA([save.pspp], [dnl SET DECIMAL=DOT. DATA LIST LIST NOTABLE FILE="data.txt" /number(F8.3) time(DTIME10) date(ADATE10) datetime(DATETIME20) string(A8) filter(F1.0). MISSING VALUES number(0) time('0 12:00') string('xyzzy'). FILTER BY filter. SAVE /OUTFILE="data.sav" /UNSELECTED=DELETE. ]) AT_DATA([get.pspp], [dnl GET FILE='data.sav'. LIST. ]) AT_CHECK([pspp -O format=csv save.pspp]) AT_CHECK([pspp -O format=csv get.pspp], [0], [dnl Table: Data List number,time,date,datetime,string,filter . ,-0 05:17,10/31/2010,09-APR-2008 09:29:00,xxx ,1 1.625,0 12:00:00,.,.,xyzzy ,1 ]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/print.at0000644000175000017500000001664413137223525015357 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([PRINT and WRITE]) dnl These tests check unusual aspects of the PRINT and WRITE dnl transformations: dnl dnl - PRINT puts spaces between variables, unless a format dnl is specified explicitly. dnl dnl - WRITE doesn't put space between variables. dnl dnl - PRINT to an external file prefixes each line with a space. dnl dnl - PRINT EJECT to an external file indicates a formfeed by a "1" dnl in the first column. dnl dnl - WRITE writes out spaces for system-missing values, not a period. dnl dnl - When no output is specified, an empty record is output. AT_SETUP([PRINT numeric variables]) AT_DATA([print.sps], [dnl data list notable /x y 1-2. begin data. 12 34 6 7 90 end data. print /x y. print eject /x y 1-2. print /x '-' y. print. execute. ]) AT_CHECK([pspp -O format=csv print.sps], [0], [dnl 1 2 @&t@ 12 1 -2 @&t@ 3 4 @&t@ 34 3 -4 @&t@ . 6 @&t@ .6 . -6 @&t@ 7 . @&t@ 7. 7 -. @&t@ 9 0 @&t@ 90 9 -0 @&t@ ]) AT_CLEANUP AT_SETUP([PRINT string variables]) AT_DATA([print.sps], [dnl DATA LIST FREE /s8 (a8) s10 (a10) vl255 (a255) vl258 (a258). BEGIN DATA. 12345678 AaaaaaaaaZ AbbbbMaryHadALittleLambbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbZ AccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccZ 87654321 AnnnnnnnnZ AmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmZ AoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooWhyIsItSoZ END DATA. print outfile='print.txt' /s10 * vl255 * vl258 *. EXECUTE. ]) AT_CHECK([pspp -O format=csv print.sps]) AT_CHECK([cat print.txt], [0], [dnl AaaaaaaaaZ AbbbbMaryHadALittleLambbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbZ AccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccZ @&t@ AnnnnnnnnZ AmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmZ AoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooWhyIsItSoZ @&t@ ]) AT_CLEANUP AT_SETUP([PRINT to file]) AT_DATA([print.sps], [dnl data list notable /x y 1-2. begin data. 12 34 6 7 90 end data. print outfile='print.out' /x y. print eject outfile='print.out' /x y (f1,f1). print outfile='print.out' /x '-' y. print outfile='print.out'. execute. ]) AT_CHECK([pspp -O format=csv print.sps]) AT_CHECK([cat print.out], [0], [dnl 1 2 @&t@ 112 1 -2 @&t@ @&t@ 3 4 @&t@ 134 3 -4 @&t@ @&t@ . 6 @&t@ 1.6 . -6 @&t@ @&t@ 7 . @&t@ 17. 7 -. @&t@ @&t@ 9 0 @&t@ 190 9 -0 @&t@ @&t@ ]) AT_CLEANUP dnl Tests for a bug which crashed when deallocating after a bad PRINT dnl command. AT_SETUP([PRINT crash bug]) AT_DATA([print.sps], [dnl DATA LIST LIST NOTABLE /a * b *. BEGIN DATA. 1 2 3 4 END DATA. PRINT F8.2 LIST. ]) AT_CHECK([pspp -O format=csv print.sps], [1], [dnl print.sps:7.7-7.10: error: PRINT: Syntax error at `F8.2': expecting a valid subcommand. Table: Data List a,b 1.00,2.00 3.00,4.00 ]) AT_CLEANUP AT_SETUP([WRITE to file]) AT_DATA([write.sps], [dnl data list notable /x y 1-2. begin data. 12 34 6 7 90 end data. write outfile='write.out' /x y. write outfile='write.out' /x y (2(f1)). write outfile='write.out' /x '-' y. write outfile='write.out'. execute. ]) AT_CHECK([pspp -O format=csv write.sps]) AT_CHECK([cat write.out], [0], [dnl 12 12 1-2 34 34 3-4 6 6 -6 7 @&t@ 7 @&t@ 7- @&t@ 90 90 9-0 ]) AT_CLEANUP AT_SETUP([PRINT overwrites file]) AT_DATA([output.txt], [abcdef ]) AT_DATA([print.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. PRINT OUTFILE='output.txt'/x. EXECUTE. ]) AT_CHECK([pspp -O format=csv print.sps]) AT_CHECK([cat output.txt], [0], [ 5 @&t@ ]) AT_CLEANUP AT_SETUP([PRINT overwrites file atomically]) AT_DATA([output.txt], [abcdef ]) AT_DATA([print.sps], [[DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. PRINT OUTFILE='output.txt'/x. HOST COMMAND=['kill -TERM $PPID']. ]]) AT_CHECK([pspp -O format=csv print.sps], [143], [], [ignore]) AT_CHECK([cat output.txt], [0], [abcdef ]) AT_CHECK( [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done]) AT_CLEANUP AT_SETUP([PRINT to same file being read]) AT_DATA([data.txt], [5 ]) AT_DATA([print.sps], [dnl DATA LIST FILE='data.txt' NOTABLE/x 1. COMPUTE y = x + 1. PRINT OUTFILE='data.txt'/y. EXECUTE. ]) AT_CHECK([pspp -O format=csv print.sps]) AT_CHECK([cat data.txt], [0], [ 6.00 @&t@ ]) AT_CHECK( [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done]) AT_CLEANUP AT_SETUP([PRINT to special file]) AT_SKIP_IF([test ! -c /dev/null]) AT_CHECK([ln -s /dev/null foo.out || exit 77]) AT_SKIP_IF([test ! -c foo.out]) AT_DATA([print.sps], [dnl DATA LIST NOTABLE /x 1. BEGIN DATA. 1 2 3 4 5 END DATA. PRINT OUTFILE='foo.out'/x. PRINT OUTFILE='foo2.out'/x. EXECUTE. ]) AT_CHECK([pspp -O format=csv print.sps]) AT_CHECK([cat foo2.out], [0], [dnl 1 @&t@ 2 @&t@ 3 @&t@ 4 @&t@ 5 @&t@ ]) ls -l foo.out foo2.out AT_CHECK([test -c foo.out]) AT_CLEANUP AT_SETUP([PRINT with special line ends]) AT_DATA([print.sps], [dnl FILE HANDLE lf /NAME='lf.txt' /ENDS=LF. FILE HANDLE crlf /NAME='crlf.txt' /ENDS=CRLF. DATA LIST NOTABLE /x 1. BEGIN DATA. 1 2 3 4 5 END DATA. PRINT OUTFILE=lf/x. PRINT OUTFILE=crlf/x. EXECUTE. ]) AT_CHECK([pspp -O format=csv print.sps]) AT_CHECK([cat lf.txt], [0], [dnl 1 @&t@ 2 @&t@ 3 @&t@ 4 @&t@ 5 @&t@ ]) AT_CHECK([tr '\r' R < crlf.txt], [0], [dnl 1 R 2 R 3 R 4 R 5 R ]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/dataset.at0000644000175000017500000001141513137223525015637 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([DATASET commands]) AT_SETUP([DATASET COPY]) AT_DATA([dataset.pspp], [dnl DATASET NAME initial. DATA LIST NOTABLE /x 1. COMPUTE x = x + 1. DATASET COPY clone. BEGIN DATA. 1 2 3 4 5 END DATA. NEW FILE. DATA LIST NOTABLE /y 1. BEGIN DATA. 6 7 8 END DATA. LIST. DATASET DISPLAY. DATASET ACTIVATE clone. DATASET DISPLAY. LIST. DATASET ACTIVATE initial. DATASET DISPLAY. LIST. COMPUTE z=y. DATASET COPY clone. DATASET ACTIVATE clone. LIST. DATASET COPY clone. DATASET DISPLAY. DATASET CLOSE initial. DATASET DISPLAY. ]) AT_CHECK([pspp -O format=csv dataset.pspp], [0], [dnl Table: Data List y 6 7 8 Table: Open datasets. Dataset clone initial (active dataset) Table: Open datasets. Dataset clone (active dataset) initial Table: Data List x 2 3 4 5 6 Table: Open datasets. Dataset clone initial (active dataset) Table: Data List y 6 7 8 Table: Data List y,z 6,6.00 7,7.00 8,8.00 Table: Open datasets. Dataset unnamed dataset (active dataset) initial Table: Open datasets. Dataset unnamed dataset (active dataset) ]) AT_CLEANUP AT_SETUP([DATASET DECLARE]) AT_DATA([dataset.pspp], [dnl DATASET DECLARE second. DATASET DISPLAY. DATA LIST NOTABLE/x 1. BEGIN DATA. 1 END DATA. LIST. DATASET ACTIVATE second. DATASET DISPLAY. LIST. ]) AT_CHECK([pspp -O format=csv dataset.pspp], [1], [dnl Table: Open datasets. Dataset unnamed dataset (active dataset) second Table: Data List x 1 Table: Open datasets. Dataset second (active dataset) dataset.pspp:10: error: LIST: LIST is allowed only after the active dataset has been defined. ]) AT_CLEANUP AT_SETUP([DATASET NAME deletes duplicate name]) AT_DATA([dataset.pspp], [dnl DATASET NAME a. DATASET DECLARE b. DATASET DECLARE c. DATASET DISPLAY. DATASET NAME b. DATASET NAME c. DATASET DISPLAY. ]) AT_CHECK([pspp -O format=csv dataset.pspp], [0], [dnl Table: Open datasets. Dataset a (active dataset) b c Table: Open datasets. Dataset c (active dataset) ]) AT_CLEANUP AT_SETUP([DATASET ACTIVATE deletes unnamed dataset]) AT_DATA([dataset.pspp], [dnl DATASET DECLARE x. DATASET DISPLAY. DATASET ACTIVATE x. DATASET DISPLAY. ]) AT_CHECK([pspp -O format=csv dataset.pspp], [0], [dnl Table: Open datasets. Dataset unnamed dataset (active dataset) x Table: Open datasets. Dataset x (active dataset) ]) AT_CLEANUP AT_SETUP([DATASET ACTIVATE executes pending transformations]) AT_DATA([dataset.pspp], [dnl DATASET NAME one. DATASET DECLARE another. DATASET DISPLAY. DATA LIST NOTABLE /x 1. PRINT/x. DATASET ACTIVATE another. BEGIN DATA. 1 2 3 4 5 END DATA. LIST. DATASET ACTIVATE one. LIST. ]) AT_CHECK([pspp -O format=csv dataset.pspp], [1], [dnl Table: Open datasets. Dataset another one (active dataset) 1 @&t@ 2 @&t@ 3 @&t@ 4 @&t@ 5 @&t@ dataset.pspp:16: error: LIST: LIST is allowed only after the active dataset has been defined. Table: Data List x 1 2 3 4 5 ]) AT_CLEANUP AT_SETUP([DATASET CLOSE]) AT_DATA([dataset.pspp], [dnl DATASET DISPLAY DATASET CLOSE *. DATASET DISPLAY. DATASET NAME this. DATASET DISPLAY. DATASET CLOSE this. DATASET DISPLAY. DATASET NAME this. DATASET DISPLAY. DATASET CLOSE *. DATASET DISPLAY. DATASET DECLARE that. DATASET DECLARE theother. DATASET DECLARE yetanother. DATASET DISPLAY. DATASET CLOSE ALL. DATASET DISPLAY. DATASET NAME this. DATASET DECLARE that. DATASET DECLARE theother. DATASET DECLARE yetanother. DATASET DISPLAY. DATASET CLOSE ALL. DATASET DISPLAY. ]) AT_CHECK([pspp -O format=csv dataset.pspp], [0], [dnl Table: Open datasets. Dataset unnamed dataset (active dataset) Table: Open datasets. Dataset unnamed dataset (active dataset) Table: Open datasets. Dataset this (active dataset) Table: Open datasets. Dataset unnamed dataset (active dataset) Table: Open datasets. Dataset this (active dataset) Table: Open datasets. Dataset unnamed dataset (active dataset) Table: Open datasets. Dataset unnamed dataset (active dataset) that theother yetanother Table: Open datasets. Dataset unnamed dataset (active dataset) Table: Open datasets. Dataset that theother this (active dataset) yetanother Table: Open datasets. Dataset unnamed dataset (active dataset) ]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/match-files.at0000644000175000017500000001301113137223525016400 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([MATCH FILES]) m4_define([PREPARE_MATCH_FILES], [AT_DATA([data1.txt], [dnl 1aB 8aM 3aE 5aG 0aA 5aH 6aI 7aJ 2aD 7aK 1aC 7aL 4aF ]) AT_DATA([data2.txt], [dnl 1bN 3bO 4bP 6bQ 7bR 9bS ]) AT_DATA([prepare.sps], [dnl DATA LIST NOTABLE FILE='data1.txt' /a b c 1-3 (A). SAVE OUTFILE='data1.sav'. DATA LIST NOTABLE FILE='data2.txt' /a b c 1-3 (A). SAVE OUTFILE='data2.sav'. ]) AT_CHECK([pspp -O format=csv prepare.sps]) AT_CHECK([test -f data1.sav && test -f data2.sav])]) dnl CHECK_MATCH_FILES(TYPE2, SOURCE1, SOURCE2) dnl dnl Checks the MATCH FILES procedure with the specified combination of: dnl dnl - TYPE2: Either "file" or "table" for the type of matching used for dnl the second data source. (The first data source is always "file"). dnl dnl - SOURCE1: Either "system" or "active" for the source of data for dnl the first data source. dnl dnl - SOURCE2: Either "system" or "active" for the source of data for dnl the second data source. (SOURCE1 and SOURCE2 may not both be dnl "active".) m4_define([CHECK_MATCH_FILES], [AT_SETUP([MATCH FILES -- $2 file and $3 $1]) PREPARE_MATCH_FILES AT_DATA([expout], [m4_if([$1], [file], [dnl Table: Data List a,b,c,d,ina,inb,first,last 0,a,A,,1,0,1,1 1,a,B,N,1,1,1,0 1,a,C,,1,0,0,1 2,a,D,,1,0,1,1 3,a,E,O,1,1,1,1 4,a,F,P,1,1,1,1 5,a,G,,1,0,1,0 5,a,H,,1,0,0,1 6,a,I,Q,1,1,1,1 7,a,J,R,1,1,1,0 7,a,K,,1,0,0,0 7,a,L,,1,0,0,1 8,a,M,,1,0,1,1 9,b,,S,0,1,1,1 ], [dnl Table: Data List a,b,c,d,ina,inb,first,last 0,a,A,,1,0,1,1 1,a,B,N,1,1,1,0 1,a,C,N,1,1,0,1 2,a,D,,1,0,1,1 3,a,E,O,1,1,1,1 4,a,F,P,1,1,1,1 5,a,G,,1,0,1,0 5,a,H,,1,0,0,1 6,a,I,Q,1,1,1,1 7,a,J,R,1,1,1,0 7,a,K,R,1,1,0,0 7,a,L,R,1,1,0,1 8,a,M,,1,0,1,1 ])]) AT_DATA([match-files.sps], [dnl m4_if([$2], [active], [GET FILE='data1.sav'.], [$3], [active], [GET FILE='data2.sav'.], []) MATCH FILES FILE=m4_if([$2], [active], [*], ['data1.sav']) /IN=ina /SORT $1=m4_if([$3], [active], [*], ['data2.sav']) /in=inb /rename c=d /BY a /FIRST=first /LAST=last. LIST. ]) AT_CHECK([pspp -o pspp.csv match-files.sps]) AT_CHECK([cat pspp.csv], [0], [expout]) AT_CLEANUP]) CHECK_MATCH_FILES([file], [system], [system]) CHECK_MATCH_FILES([file], [system], [active]) CHECK_MATCH_FILES([file], [active], [system]) CHECK_MATCH_FILES([table], [system], [system]) CHECK_MATCH_FILES([table], [system], [active]) CHECK_MATCH_FILES([table], [active], [system]) AT_SETUP([MATCH FILES parallel match]) PREPARE_MATCH_FILES AT_DATA([match-files.sps], [dnl MATCH FILES FILE='data1.sav' /FILE='data2.sav' /RENAME (a b c=d e f). LIST. ]) AT_CHECK([pspp -o pspp.csv match-files.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List a,b,c,d,e,f 1,a,B,1,b,N 8,a,M,3,b,O 3,a,E,4,b,P 5,a,G,6,b,Q 0,a,A,7,b,R 5,a,H,9,b,S 6,a,I,,, 7,a,J,,, 2,a,D,,, 7,a,K,,, 1,a,C,,, 7,a,L,,, 4,a,F,,, ]) AT_CLEANUP dnl Test bug handling TABLE from active dataset found by John Darrington. AT_SETUP([MATCH FILES bug with TABLE from active dataset]) AT_DATA([match-files.sps], [dnl DATA LIST LIST NOTABLE /x * y *. BEGIN DATA 3 30 2 21 1 22 END DATA. SAVE OUTFILE='bar.sav'. DATA LIST LIST NOTABLE /x * z *. BEGIN DATA 3 8 2 9 END DATA. MATCH FILES TABLE=* /FILE='bar.sav' /BY=x. LIST. ]) AT_CHECK([pspp -o pspp.csv match-files.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List x,z,y 3.00,8.00,30.00 2.00,. ,21.00 1.00,. ,22.00 ]) AT_CLEANUP dnl Tests for a bug which caused MATCH FILES to crash dnl when used with scratch variables. AT_SETUP([MATCH FILES bug with scratch variables]) AT_DATA([match-files.sps], [dnl DATA LIST LIST /w * x * y * . BEGIN DATA 4 5 6 1 2 3 END DATA. COMPUTE j=0. LOOP #k = 1 to 10. COMPUTE j=#k + j. END LOOP. MATCH FILES FILE=* /DROP=w. LIST. FINISH. ]) AT_CHECK([pspp -o pspp.csv match-files.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format w,F8.0 x,F8.0 y,F8.0 Table: Data List x,y,j 5.00,6.00,55.00 2.00,3.00,55.00 ]) AT_CLEANUP dnl Tests for a bug that caused MATCH FILES to crash dnl with incompatible variables, especially but not dnl exclusively when one variable came from the active dnl file. AT_SETUP([MATCH FILES with incompatible variable types]) AT_DATA([match-files.sps], [dnl DATA LIST LIST NOTABLE/name (A6) x. BEGIN DATA. al,7 brad,8 carl,9 END DATA. SAVE OUTFILE='x.sav'. DATA LIST LIST NOTABLE/name (A7) y. BEGIN DATA. al,1 carl,2 dan,3 END DATA. MATCH FILES/FILE='x.sav'/FILE=*/BY name. LIST. ]) AT_CHECK([pspp -O format=csv match-files.sps], [1], [dnl "match-files.sps:15: error: MATCH FILES: Variable name in file * has different type or width from the same variable in earlier file. In file *, name is a string variable with width 7. In an earlier file, name was a string variable with width 6." match-files.sps:16: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. ]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/test.ods0000644000175000017500000002201712470243701015347 00000000000000PKZA>l9..mimetypeapplication/vnd.oasis.opendocument.spreadsheetPKZA>Configurations2/statusbar/PKZA>'Configurations2/accelerator/current.xmlPKPKZA>Configurations2/floater/PKZA>Configurations2/popupmenu/PKZA>Configurations2/progressbar/PKZA>Configurations2/menubar/PKZA>Configurations2/toolbar/PKZA>Configurations2/images/Bitmaps/PKZA> content.xmln_aŢ}eědvf3]}Y0eCI!ul#'6d=<I)?b:X`.Kx8~y7, g'Y"`'b 3Dc18)f&LG\Ėx%"+.zYG˾ j/JP'd`8ElH$z7Lg\.G;ql%_*]Lb&h▰1| )G{IՔc ~LF|-潣k10!;4p3TAP&ndw'?>q㾼lT>'io5sh1Vdz?˝KN$Gԯ,6/TWI !:<7EIO?Q L DHԖ ^0a *"ҡfK9VPgB$v/ب@UL,` u*Ŝ(MUҙݬ<^#&ō6'z7|dNV>ڈZH4 Y$WzS 5"$׸ޘR㎌8SlpFwUaY q*E<|%0JfaP-S=%Z܆%e %V</IL40Xde5JlVFYO&,瞢hi[g΁bi J;jgAbWPWGl ?8N#VsL [br}K4mZ6}2/R.TTK-ԂK-x嵠k~5qo~H8l?{Wıxd>N9F09[0~=1 >UˇSNURqDقO: >ZNkÁ $ȫg^/d5s,9[S6\yUhyN:-犆NAj(-oMeo jVA놟if!eH6g jM'LKb{H"޲ZUϖM7UZs_ı{_;y `U~9ᙬΗ׫zm˰___).skc[9*ZzlgUvatq>jzZSaW.k`Y;T}rN}}e7m =wg6ӓ-+^Xss,?=Hȷ -R$MYc3Y{Fz7Nwim\/?uWQuxPPbp8g#_%.R;?j#/ճvM^ F|9A<;s3s[H1=f˴!~e@,KmJ/:={?S?azEiu:V'DtF}1ک %{֌4=[Egdǀ_ϭ'֯܈fLFZ(Ç8uK{=WQ152.hÓCwiQw i%v?xvMo;fz}n&?CmKGybr04|PKi/*WPKZA> styles.xmlYn6S PdJNn\:)=#Q2WJHʎ{SIvH~ЭnTw?~Ƚ˙'BR^lh)b")x_oiJcNx\PTGFƅ\ɍ_bͱr]ȵ׼$3Zk1pZ;5Xc;vܶN>5Xдmw)bX;FTFp8, .2V+dfq++ *aD/&QD4M["fKDDrM'g2;,fwS<*I6j7&͏y%kilGXr6-m9oj{ e^ BN*"Z$<,nh )Boz%B5DY6Gur6}Tf"IF@C)9ujiWȀ\s.Pݺ%`GZ \HDA} ra 4 zDPII. ^ {YK_S2fa"h{p|6}smdd9.: jDDɁFn5yR~ w[uV 3Q*? MM㞐Wn5皣I &L*.(P;h RB*bhq/:Д. g03PS,j7f;hW XIN=gYt5W?ܧ`1޴$RzCJ`V0zmN7~ ЅO^MЏvTT|Y0kEϒԅc۷J $Qkurn8LoaR=ݔy䏀l yvL>&;%K9BX.A3d&`TtErVW/lOYtSGiv)A,fpPrq`)-$˨.ʺn ך&b{-NQd Dgΐ9Gա"}to (08`Qr(D鑚na`k{lHOW)fZv_=4~mPKO4BPKZA>,Bmeta.xml 2011-05-17T12:04:37Tables2011-05-21T10:10:52PT00H51M15S6OpenOffice.org/3.2$Linux OpenOffice.org_project/320m19$Build-9505PKZA>Thumbnails/thumbnail.pngS)V]u,63:c]4"5 P"-2LQ@`MEM+ь 0MA\PPkob>?w7/[! xkzpPKCy N?[@r|@6Y!ƫ4|/P*kOP_}Ml;8gM#q)P#OBl_ ͣq.rf70FI@,gjQΎlfEZ7Wq`/,VM;F*@I+B%,2.n™t@"~UI`c[[{8wa'j#HmOW*֢&A l{XdٟGml]۸y|Үj 6gff<5Qb?MQƀ+`0Xooo"Є@ 7kj.JIcWRq8\W"̖w iafKo0X5˵_#s.<tUS:a OOϹ]/z.F^iO;gQ3cu|i_QWr޹cW~?ɡ#`cA\466V&JY:{vW_ֆ(rf}cbK4qMP(ht!А*6 ?e={ O!Յ]_PK4„$RmTX 4;bWtyqÁ#'rh4͢xVJc-fpAGϷTUX8f` 8b+Nܩ#R9qlj. -,JɅ% y~!wjnhӃ zgBkPՏ25yԙӆXP-qV:0SSSV%2}U"8(:A<-uN<_ -6i,u{,6ޗjZ)3& A@MҞB"_y^YZ^p*Km;fh,}<QP(bVCH,snZK;Ly(<<\sc Ĭ۸kS;q ]]]N3 -F+]T*hN|hT3FHv/%y+yھQQseZUNs榀'p&J6v#}Yi{1G"MzE <Em&rX[=U2!qs#|@dS?r8r2 lmcH <3dvvMcߓ !w_\M#>PcPO=,?PK FWPKZA> settings.xmls8`N̏4=<%״I{}5Iп2NڍV^>Z髻5 $EwG-ǀE߹mu9 O")A)}l\zYsIH*=N"=y6Ʋ#w۾*{ZV# MT.ξo J;dluZc74N Mⰻ@Ӥ 46ԵMzK Qs=sC%1 S]ZǺr Z"O2*,ρ.B^UfD&A7{飳K8 TB'3HO49%: 9#z(=(Jt1K*W9 "l3c(osT6c%sY;qQԭ;3T  FSRkF7%yՌԭ}c@'{OB\#h3D;%(V.8ɢoX-----ABOC#_X@[@[@[@UUKc>$&@G]ּyXuhm^:L _ c3"J!w^;8Rg핀toBY %V_>=@eJz!r:B"'0@IyqR}5s"IǸ:0cd(c0YG3dr #N)TuLBn0wi'd%$^靖 +<_-U|U}[v $Ov!߁CI JRF# c.)|d 7&ŏ|P1="O>ߍ'G_cT_͈3ʉX;K$XWdKJհiil}-A&^EZxwAonE3 oQ,@W*Yϲ8& G ՀkxbKy-s@:f[x(.p˾=|PKK#2PKZA>META-INF/manifest.xmlAn E9ަͪDj =$ őmT5ف=S0vՓ(*j7c^zˠHYN€TG:\]_;mL éɰPc#{p)ήj,n斓]4FH!rli)# Rh0M]*0 8+33ѧ$f|_z Ιlp=@$_5)AӄRS2<(g<{.<;df0agA|Vs-,2Zڕq[?PKATCIhPKZA>l9..mimetypePKZA>TConfigurations2/statusbar/PKZA>'Configurations2/accelerator/current.xmlPKZA>Configurations2/floater/PKZA>Configurations2/popupmenu/PKZA>QConfigurations2/progressbar/PKZA>Configurations2/menubar/PKZA>Configurations2/toolbar/PKZA>Configurations2/images/Bitmaps/PKZA>i/*W 4content.xmlPKZA>O4B styles.xmlPKZA>,Bmeta.xmlPKZA> FWThumbnails/thumbnail.pngPKZA>K#2 4settings.xmlPKZA>ATCIhMETA-INF/manifest.xmlPK pspp-1.0.1/tests/language/data-io/data-list.at0000644000175000017500000002024313137223525016073 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([DATA LIST]) AT_SETUP([DATA LIST LIST with empty fields]) AT_DATA([data-list.pspp], [dnl DATA LIST LIST NOTABLE /A B C (F1.0). BEGIN DATA. ,, ,,3 ,2, ,2,3 1,, 1,,3 1,2, 1,2,3 END DATA. LIST. ]) AT_CHECK([pspp -O format=csv data-list.pspp], [0], [dnl Table: Data List A,B,C .,.,. .,.,3 .,2,. .,2,3 1,.,. 1,.,3 1,2,. 1,2,3 ]) AT_CLEANUP AT_SETUP([DATA LIST LIST with explicit delimiters]) AT_DATA([data-list.pspp], [dnl data list list ('|','X') /A B C D. begin data. 1|23X45|2.03x 2X22|34|23| 3|34|34X34 end data. list. ]) AT_CHECK([pspp -O format=csv data-list.pspp], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format A,F8.0 B,F8.0 C,F8.0 D,F8.0 data-list.pspp:3.9-3.13: warning: Data for variable D is not valid as format F: Number followed by garbage. Table: Data List A,B,C,D 1.00,23.00,45.00,. @&t@ 2.00,22.00,34.00,23.00 3.00,34.00,34.00,34.00 ]) AT_CLEANUP AT_SETUP([DATA LIST FREE with SKIP]) AT_DATA([data-list.pspp], [dnl data list free skip=1/A B C D. begin data. # This record is ignored. ,1,2,x ,4,,5 6 7, 8 9 0,1 ,,, ,,,, 2 3 4 5 end data. list. ]) AT_CHECK([pspp -O format=csv data-list.pspp], [0], [dnl data-list.pspp:4.6: warning: Data for variable D is not valid as format F: Field contents are not numeric. Table: Data List A,B,C,D . ,1.00,2.00,. @&t@ . ,4.00,. ,5.00 6.00,7.00,8.00,9.00 .00,1.00,. ,. @&t@ . ,. ,. ,. @&t@ 2.00,3.00,4.00,5.00 ]) AT_CLEANUP AT_SETUP([DATA LIST LIST with SKIP and tab delimiter]) AT_DATA([data-list.pspp], [dnl data list list (tab) notable skip=2/A B C D. begin data. # These records # are skipped. 1 2 3 4 1 2 3 @&t@ 1 2 4 1 2 @&t@ 1 3 4 1 3 @&t@ 1 4 1 @&t@ 2 3 4 2 3 @&t@ 2 4 2 @&t@ 3 4 3 @&t@ 4 @&t@ end data. list. ]) AT_CHECK([pspp -O format=csv data-list.pspp], [0], [dnl Table: Data List A,B,C,D 1.00,2.00,3.00,4.00 1.00,2.00,3.00,. @&t@ 1.00,2.00,. ,4.00 1.00,2.00,. ,. @&t@ 1.00,. ,3.00,4.00 1.00,. ,3.00,. @&t@ 1.00,. ,. ,4.00 1.00,. ,. ,. @&t@ . ,2.00,3.00,4.00 . ,2.00,3.00,. @&t@ . ,2.00,. ,4.00 . ,2.00,. ,. @&t@ . ,. ,3.00,4.00 . ,. ,3.00,. @&t@ . ,. ,. ,4.00 . ,. ,. ,. @&t@ ]) AT_CLEANUP dnl Results of this test were confirmed with SPSS 21: dnl http://lists.gnu.org/archive/html/pspp-dev/2013-09/msg00003.html AT_SETUP([DATA LIST FREE with explicit delimiter at end of line]) AT_DATA([data-list.pspp], [dnl DATA LIST FREE(',')/x y z. BEGIN DATA. 1,2,3 4,5,6 7,8,9 END DATA. LIST. DATA LIST FREE(',')/x y z. BEGIN DATA. 11,12,13, 14,15,16, 17,18,19, END DATA. LIST. DATA LIST FREE(TAB)/x y z. BEGIN DATA. 21 22 23 24 25 26 27 28 29 END DATA. LIST. DATA LIST FREE(TAB)/x y z. BEGIN DATA. 31 32 33 @&t@ 34 35 36 @&t@ 37 38 39 @&t@ END DATA. LIST. ]) AT_CHECK([pspp -O format=csv data-list.pspp], [0], [dnl Table: Data List x,y,z 1.00,2.00,3.00 4.00,5.00,6.00 7.00,8.00,9.00 Table: Data List x,y,z 11.00,12.00,13.00 14.00,15.00,16.00 17.00,18.00,19.00 Table: Data List x,y,z 21.00,22.00,23.00 24.00,25.00,26.00 27.00,28.00,29.00 Table: Data List x,y,z 31.00,32.00,33.00 34.00,35.00,36.00 37.00,38.00,39.00 ]) AT_CLEANUP AT_SETUP([DATA LIST FIXED with multiple records per case]) AT_DATA([data-list.pspp], [dnl data list fixed notable /1 start 1-20 (adate) /2 end 1-20 (adate) /3 count 1-3. begin data. 07-22-2007 10-06-2007 x 07-14-1789 08-26-1789 xy 01-01-1972 12-31-1999 682 end data. list. ]) AT_CHECK([pspp -O format=csv data-list.pspp], [0], [dnl data-list.pspp:8.1-8.3: warning: Data for variable count is not valid as format F: Field contents are not numeric. data-list.pspp:11.1-11.3: warning: Data for variable count is not valid as format F: Field contents are not numeric. Table: Data List start,end,count 07/22/2007,10/06/2007,. 07/14/1789,08/26/1789,. 01/01/1972,12/31/1999,682 ]) AT_CLEANUP AT_SETUP([DATA LIST FIXED with empty trailing record]) AT_DATA([data-list.pspp], [dnl data list fixed notable records=2/x 1 y 2. begin data. 12 34 56 78 90 end data. list. ]) AT_CHECK([pspp -O format=csv data-list.pspp], [0], [dnl Table: Data List x,y 1,2 3,4 5,6 7,8 9,0 ]) AT_CLEANUP dnl Test that PSPP accepts LF and CR LF as line ends, but dnl treats isolated CR as linear whitespace. AT_SETUP([DATA LIST with various line-ends]) AT_DATA([data-list.sps], [dnl data list list notable file='input.txt'/a b c. list. ]) printf '1 2 3\n4 5 6\r\n7\r8\r9\r\n10 11 12\n13 14 15 \r\n16\r\r17\r18\n' > input.txt dnl Make sure that input.txt actually received the data that we expect. dnl It might not have, if we're running on a system that translates \n dnl into some other sequence. AT_CHECK([cksum input.txt], [0], [1732021750 50 input.txt ]) AT_CHECK([pspp -o pspp.csv data-list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List a,b,c 1.00,2.00,3.00 4.00,5.00,6.00 7.00,8.00,9.00 10.00,11.00,12.00 13.00,14.00,15.00 16.00,17.00,18.00 ]) AT_CLEANUP AT_SETUP([DATA LIST properly expands tabs in input]) AT_DATA([data-list.sps], [dnl data list notable /X 1-50 (a). begin data. 1 12 123 1234 12345 . end data. print /x. print outfile='print.txt' /x. write outfile='write.txt' /x. execute. ]) AT_CHECK([sed -n '/12345/l' data-list.sps], [0], [dnl \t1\t12\t123\t1234\t12345 .$ ]) AT_CHECK([pspp -o pspp.csv data-list.sps]) dnl The CSV driver drops leading spaces so they don't appear here: AT_CHECK([cat pspp.csv], [0], [dnl 1 12 123 1234 12345 . @&t@ ]) dnl But they do appear in print.txt. The PRINT command also puts a space dnl at the beginning of the line and after the variable: AT_CHECK([cat print.txt], [0], [dnl 1 12 123 1234 12345 . @&t@ ]) dnl WRITE doesn't add spaces at the beginning or end of lines: AT_CHECK([cat write.txt], [0], [dnl 1 12 123 1234 12345 . ]) AT_CLEANUP AT_SETUP([DATA LIST FREE and LIST report missing delimiters]) AT_DATA([data-list.sps], [dnl DATA LIST FREE NOTABLE/s (a10). LIST. BEGIN DATA. 'y'z END DATA. ]) AT_CHECK([pspp -O format=csv data-list.sps], [0], [dnl data-list.sps:4: warning: Missing delimiter following quoted string. Table: Data List s y @&t@ z @&t@ ]) AT_CLEANUP AT_SETUP([DATA LIST FREE and LIST assume a width if omitted]) AT_DATA([data-list.sps], [dnl DATA LIST FREE TABLE/s (a) d (datetime) f (f). ]) AT_CHECK([pspp -O format=csv data-list.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format s,A1 d,DATETIME17.0 f,F1.0 ]) AT_CLEANUP AT_SETUP([DATA LIST Decimal comma]) AT_DATA([data-list.sps], [dnl SET DECIMAL=COMMA. DATA LIST NOTABLE LIST /A *. BEGIN DATA 1 2 3 3,5 4 4,5 5 6 END DATA LIST /FORMAT=NUMBERED. ]) AT_CHECK([pspp -O format=csv data-list.sps], [0], [dnl Table: Data List Case Number,A 1,"1,00" 2,"2,00" 3,"3,00" 4,"3,50" 5,"4,00" 6,"4,50" 7,"5,00" 8,"6,00" ]) AT_CLEANUP AT_SETUP([DATA LIST - Negative SKIP]) AT_DATA([data-list.sps], [dnl DATA LIST LIST FILE='f.in' NOTABLE SKIP=-1 /a b c d. EXECUTE. ]) AT_CHECK([pspp -O format=csv data-list.sps], [1], [dnl data-list.sps:1: error: DATA LIST: The SKIP value must be nonnegative. data-list.sps:3: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. ]) AT_CLEANUP AT_SETUP([DATA LIST - Negative RECORDS]) AT_DATA([data-list.sps], [dnl DATA LIST LIST FILE='f.in' NOTABLE RECORDS=-1 /a b c d. EXECUTE. ]) AT_CHECK([pspp -O format=csv data-list.sps], [1], [dnl data-list.sps:1: error: DATA LIST: The RECORDS value must be nonnegative. data-list.sps:3: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. ]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/print-space.at0000644000175000017500000000373113137223525016441 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([PRINT SPACE]) AT_SETUP([PRINT SPACE without arguments]) AT_DATA([print-space.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 1 2 END DATA. PRINT/x. PRINT SPACE. EXECUTE. ]) AT_CHECK([pspp -O format=csv print-space.sps], [0], [dnl 1 @&t@ 2 @&t@ ]) AT_CLEANUP AT_SETUP([PRINT SPACE with number]) AT_DATA([print-space.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 1 2 END DATA. PRINT/x. PRINT SPACE 2. EXECUTE. ]) AT_CHECK([pspp -O format=csv print-space.sps], [0], [dnl 1 @&t@ 2 @&t@ ]) AT_CLEANUP AT_SETUP([PRINT SPACE to file]) AT_CAPTURE_FILE([output.txt]) AT_DATA([print-space.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 1 2 END DATA. PRINT OUTFILE='output.txt'/x. PRINT SPACE OUTFILE='output.txt'. EXECUTE. ]) AT_CHECK([pspp -O format=csv print-space.sps]) AT_CHECK([cat output.txt], [0], [dnl 1 @&t@ @&t@ 2 @&t@ @&t@ ]) AT_CLEANUP AT_SETUP([PRINT SPACE to file with number]) AT_CAPTURE_FILE([output.txt]) AT_DATA([print-space.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 1 2 END DATA. PRINT OUTFILE='output.txt'/x. PRINT SPACE OUTFILE='output.txt' 2. EXECUTE. ]) AT_CHECK([pspp -O format=csv print-space.sps]) AT_CHECK([cat output.txt], [0], [dnl 1 @&t@ @&t@ @&t@ 2 @&t@ @&t@ @&t@ ]) AT_CLEANUP pspp-1.0.1/tests/language/data-io/add-files.at0000644000175000017500000000550113137223525016041 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl m4_define([CHECK_ADD_FILES], [AT_SETUP([ADD FILES -- $1 $2 with $3]) AT_DATA([a.data], [dnl 1aB 8aM 3aE 5aG 0aA 5aH 6aI 7aJ 2aD 7aK 1aC 7aL 4aF ]) AT_DATA([b.data], [dnl 1bN 3bO 4bP 6bQ 7bR 9bS ]) m4_if([$2], [sav], [AT_DATA([save-a.sps], [dnl DATA LIST NOTABLE FILE='a.data' /a b c 1-3 (A). SAVE OUTFILE='a.sav'. ]) AT_CHECK([pspp -O format=csv save-a.sps])]) m4_if([$3], [sav], [AT_DATA([save-b.sps], [dnl DATA LIST NOTABLE FILE='b.data' /a b c 1-3 (A). SAVE OUTFILE='b.sav'. ]) AT_CHECK([pspp -O format=csv save-b.sps])]) m4_if([$1], [interleave], [m4_pushdef([BY], [[/BY a /FIRST=first /LAST=last]]) m4_pushdef([SORT], [[/SORT]])], [m4_pushdef([BY], []) m4_pushdef([SORT], [])]) AT_DATA([add-files.sps], [dnl m4_if([$2], [sav], [], [DATA LIST NOTABLE FILE='a.data' /a b c 1-3 (A).]) m4_if([$3], [sav], [], [DATA LIST NOTABLE FILE='b.data' /a b c 1-3 (A).]) ADD FILES m4_if([$2], [sav], [FILE='a.sav'], [FILE=*]) /IN=InA SORT m4_if([$3], [sav], [FILE='b.sav'], [FILE=*]) /IN=InB /RENAME c=d BY[]. LIST. ]) m4_popdef([BY]) m4_popdef([SORT]) AT_CHECK([pspp -O format=csv add-files.sps], [0], [m4_if([$1], [interleave], [dnl Table: Data List a,b,c,d,InA,InB,first,last 0,a,A,,1,0,1,1 1,a,B,,1,0,1,0 1,a,C,,1,0,0,0 1,b,,N,0,1,0,1 2,a,D,,1,0,1,1 3,a,E,,1,0,1,0 3,b,,O,0,1,0,1 4,a,F,,1,0,1,0 4,b,,P,0,1,0,1 5,a,G,,1,0,1,0 5,a,H,,1,0,0,1 6,a,I,,1,0,1,0 6,b,,Q,0,1,0,1 7,a,J,,1,0,1,0 7,a,K,,1,0,0,0 7,a,L,,1,0,0,0 7,b,,R,0,1,0,1 8,a,M,,1,0,1,1 9,b,,S,0,1,1,1 ], [dnl Table: Data List a,b,c,d,InA,InB 1,a,B,,1,0 8,a,M,,1,0 3,a,E,,1,0 5,a,G,,1,0 0,a,A,,1,0 5,a,H,,1,0 6,a,I,,1,0 7,a,J,,1,0 2,a,D,,1,0 7,a,K,,1,0 1,a,C,,1,0 7,a,L,,1,0 4,a,F,,1,0 1,b,,N,0,1 3,b,,O,0,1 4,b,,P,0,1 6,b,,Q,0,1 7,b,,R,0,1 9,b,,S,0,1 ])]) AT_CLEANUP ]) AT_BANNER([ADD FILES]) CHECK_ADD_FILES([interleave], [sav], [sav]) CHECK_ADD_FILES([interleave], [sav], [inline]) CHECK_ADD_FILES([interleave], [inline], [sav]) CHECK_ADD_FILES([concatenate], [sav], [sav]) CHECK_ADD_FILES([concatenate], [sav], [inline]) CHECK_ADD_FILES([concatenate], [inline], [sav]) pspp-1.0.1/tests/language/command.at0000644000175000017500000000523113137223525014311 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([command parser]) dnl Tests for a bug which crashed pspp when given certain invalid input. AT_SETUP([command parser crash bug]) AT_DATA([command.sps], [dnl DATA rubbish. EXECUTE. ]) AT_CHECK([pspp -O format=csv command.sps], [1], [dnl command.sps:1: error: Unknown command `DATA rubbish'. command.sps:2: error: EXECUTE: EXECUTE is allowed only after the active dataset has been defined. ]) AT_CLEANUP dnl Tests for a bug where FINISH or EXIT wasn't executed until the lexer dnl read the first token of the next command. dnl dnl (If this reecurs, the the test will run forever.) AT_SETUP([FINISH executes immediately]) AT_CHECK([(echo "FINISH."; while echo ; do true; done) | pspp], [0], [ignore], [ignore]) AT_CLEANUP AT_BANNER([ERASE]) AT_SETUP([ERASE -- safer mode]) AT_DATA([foobar], [contents ]) AT_DATA([erase.sps], [dnl set safer on erase FILE='foobar'. ]) AT_CHECK([pspp -O format=csv erase.sps], [1], [dnl erase.sps:3: error: ERASE: This command not allowed when the SAFER option is set. ]) AT_CHECK([cat foobar], [0], [contents ]) AT_CLEANUP AT_SETUP([ERASE -- not safer mode]) AT_DATA([foobar], [contents ]) AT_CHECK([test -e foobar]) AT_DATA([erase.sps], [dnl erase FILE='foobar'. ]) AT_CHECK([pspp -O format=csv erase.sps]) AT_CHECK([test ! -e foobar]) AT_CLEANUP AT_BANNER([N OF CASES]) AT_SETUP([N OF CASES]) AT_DATA([n-of-cases.sps], [dnl INPUT PROGRAM. LOOP #i = 1 TO 100. COMPUTE x=#i. END CASE. END LOOP. END FILE. END INPUT PROGRAM. N OF CASES 15. LIST. ]) AT_CHECK([pspp -O format=csv n-of-cases.sps], [0], [dnl Table: Data List x 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 ]) AT_CLEANUP AT_BANNER([COMMENT]) dnl Tests for a bug wherein a comment just before end-of-file caused an dnl infinite loop. AT_SETUP([COMMENT at end of file]) AT_DATA([comment.sps], [dnl COMMENT this is a comment at end of file. ]) AT_CHECK([pspp -O format=csv comment.sps]) AT_CLEANUP pspp-1.0.1/tests/language/control/0000755000175000017500000000000013150620333014075 500000000000000pspp-1.0.1/tests/language/control/temporary.at0000644000175000017500000000235113137223525016375 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([TEMPORARY]) dnl Tests for a bug that manifested when all transformations are temporary. AT_SETUP([TEMPORARY as first transformation]) AT_DATA([temporary.sps], [dnl DATA LIST LIST NOTABLE /X *. BEGIN DATA. 1 2 3 4 5 6 7 8 9 END DATA. TEMPORARY. SELECT IF x > 5 . LIST. LIST. ]) AT_CHECK([pspp -o pspp.csv temporary.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List X 6.00 7.00 8.00 9.00 Table: Data List X 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/control/do-if.at0000644000175000017500000000463713137223525015362 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([DO IF]) AT_SETUP([DO IF]) (for a in 0 1 ' '; do for b in 0 1 ' '; do for c in 0 1 ' '; do for d in 0 1 ' '; do abcd=$a$b$c$d echo "$abcd" 1>&3 if test "$a" = "1"; then echo " $abcd A" elif test "$a" = " "; then : elif test "$b" = "1"; then echo " $abcd B" elif test "$b" = " "; then : elif test "$c" = "1"; then echo " $abcd C" elif test "$c" = " "; then : elif test "$d" = "1"; then echo " $abcd D" elif test "$d" = " "; then : else echo " $abcd E" fi done done done done) >expout 3>do-if.txt || exit 99 AT_DATA([do-if.sps], [dnl DATA LIST FILE="do-if.txt"/A B C D 1-4 ABCD 1-4 (A). DO IF A. PRINT OUTFILE="do-if.out"/ABCD 'A'. ELSE IF B. PRINT OUTFILE="do-if.out"/ABCD 'B'. ELSE IF C. PRINT OUTFILE="do-if.out"/ABCD 'C'. ELSE IF D. PRINT OUTFILE="do-if.out"/ABCD 'D'. ELSE. PRINT OUTFILE="do-if.out"/ABCD 'E'. END IF. EXECUTE. ]) AT_CHECK([pspp do-if.sps], [0], [ignore]) AT_CHECK([cat do-if.out], [0], [expout]) AT_CLEANUP AT_SETUP([unpaired END IF crash]) AT_DATA([do-if.sps], [dnl DATA LIST LIST NOTABLE/a b c. END IF. ]) AT_CHECK([pspp -O format=csv do-if.sps], [1], [dnl do-if.sps:2: error: END IF: This command cannot appear outside DO IF...END IF. ]) AT_CLEANUP AT_SETUP([ELSE without DO IF]) AT_DATA([do-if.sps], [dnl DATA lIST NOTABLE LIST /QUA BRA *. BEGIN DATA 4 1 6 3 END DATA ELSE QUA 'A string'. EXECUTE. ]) AT_CHECK([pspp -O format=csv do-if.sps], [1], [dnl do-if.sps:7: error: ELSE: This command cannot appear outside DO IF...END IF. do-if.sps:9: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. ]) AT_CLEANUP pspp-1.0.1/tests/language/control/do-repeat.at0000644000175000017500000000672113137223525016240 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([DO REPEAT]) AT_SETUP([DO REPEAT -- simple]) AT_DATA([do-repeat.sps], [dnl INPUT PROGRAM. STRING y(A1). DO REPEAT xval = 1 2 3 / yval = 'a' 'b' 'c' / var = a b c. COMPUTE x=xval. COMPUTE y=yval. COMPUTE var=xval. END CASE. END REPEAT. END FILE. END INPUT PROGRAM. LIST. ]) AT_CHECK([pspp -o pspp.csv do-repeat.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List y,x,a,b,c a,1.00,1.00,. ,. @&t@ b,2.00,. ,2.00,. @&t@ c,3.00,. ,. ,3.00 ]) AT_CLEANUP AT_SETUP([DO REPEAT -- containing BEGIN DATA]) AT_DATA([do-repeat.sps], [dnl DO REPEAT offset = 1 2 3. DATA LIST NOTABLE /x 1-2. BEGIN DATA. 10 20 30 END DATA. COMPUTE x = x + offset. LIST. END REPEAT. ]) AT_CHECK([pspp -o pspp.csv do-repeat.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List x 11 21 31 Table: Data List x 12 22 32 Table: Data List x 13 23 33 ]) AT_CLEANUP AT_SETUP([DO REPEAT -- dummy vars not expanded in include files]) AT_DATA([include.sps], [dnl COMPUTE y = y + x + 10. ]) AT_DATA([do-repeat.sps], [dnl INPUT PROGRAM. COMPUTE x = 0. COMPUTE y = 0. END CASE. END FILE. END INPUT PROGRAM. DO REPEAT x = 1 2 3. INCLUDE 'include.sps'. END REPEAT. LIST. ]) AT_CHECK([pspp -o pspp.csv do-repeat.sps], [0], [dnl do-repeat.sps:8: warning: DO REPEAT: Dummy variable name `x' hides dictionary variable `x'. ]) AT_CHECK([cat pspp.csv], [0], [dnl do-repeat.sps:8: warning: DO REPEAT: Dummy variable name `x' hides dictionary variable `x'. Table: Data List x,y .00,30.00 ]) AT_CLEANUP AT_SETUP([DO REPEAT -- nested]) AT_DATA([do-repeat.sps], [dnl DATA LIST NOTABLE /a 1. BEGIN DATA. 0 END DATA. DO REPEAT h = h0 TO h3 / x = 0 TO 3 / y = 8, 7.5, 6, 5. COMPUTE h = x + y. END REPEAT. VECTOR v(6). COMPUTE #idx = 0. DO REPEAT i = 1 TO 2. DO REPEAT j = 3 TO 5. COMPUTE #x = i + j. COMPUTE #idx = #idx + 1. COMPUTE v(#idx) = #x. END REPEAT. END REPEAT. LIST. ]) AT_CHECK([pspp -o pspp.csv do-repeat.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List a,h0,h1,h2,h3,v1,v2,v3,v4,v5,v6 0,8.00,8.50,8.00,8.00,4.00,5.00,6.00,5.00,6.00,7.00 ]) AT_CLEANUP dnl This program tests for a bug that crashed PSPP given an empty DO dnl REPEAT...END REPEAT block. See bug #18407. AT_SETUP([DO REPEAT -- empty]) AT_DATA([do-repeat.sps], [dnl DATA LIST NOTABLE /a 1. BEGIN DATA. 0 END DATA. DO REPEAT h = a. END REPEAT. ]) AT_CHECK([pspp -o pspp.csv do-repeat.sps]) AT_CHECK([cat pspp.csv], [0], [dnl ]) AT_CLEANUP dnl This program tests for a bug that crashed PSPP when END REPEAT dnl was missing. See bug #31016. AT_SETUP([DO REPEAT -- missing END REPEAT]) AT_DATA([do-repeat.sps], [dnl DATA LIST NOTABLE /x 1. DO REPEAT y = 1 TO 10. ]) AT_CHECK([pspp -O format=csv do-repeat.sps], [1], [dnl error: DO REPEAT: Syntax error at end of input: expecting END. ]) AT_CLEANUP pspp-1.0.1/tests/language/control/loop.at0000644000175000017500000000750113137223525015326 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([LOOP]) m4_define([LOOP_DATA], [dnl data list notable /x 1 y 2 z 3. begin data. 121 252 393 404 end data. ]) AT_SETUP([LOOP with index]) AT_DATA([loop.sps], [dnl LOOP_DATA loop #i=x to y by z. print /#i. end loop. print/'--------'. execute. ]) AT_CHECK([pspp -o pspp.csv loop.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 1.00 @&t@ 2.00 @&t@ -------- 2.00 @&t@ 4.00 @&t@ -------- 3.00 @&t@ 6.00 @&t@ 9.00 @&t@ -------- -------- ]) AT_CLEANUP AT_SETUP([LOOP with IF condition]) AT_DATA([loop.sps], [dnl LOOP_DATA compute #j=x. loop if #j <= y. print /#j. compute #j = #j + z. end loop. print/'--------'. execute. ]) AT_CHECK([pspp -o pspp.csv loop.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 1.00 @&t@ 2.00 @&t@ -------- 2.00 @&t@ 4.00 @&t@ -------- 3.00 @&t@ 6.00 @&t@ 9.00 @&t@ -------- -------- ]) AT_CLEANUP AT_SETUP([LOOP with END IF condition]) AT_DATA([loop.sps], [dnl LOOP_DATA compute #k=x. loop. print /#k. compute #k = #k + z. end loop if #k > y. print/'--------'. execute. ]) AT_CHECK([pspp -o pspp.csv loop.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 1.00 @&t@ 2.00 @&t@ -------- 2.00 @&t@ 4.00 @&t@ -------- 3.00 @&t@ 6.00 @&t@ 9.00 @&t@ -------- 4.00 @&t@ -------- ]) AT_CLEANUP AT_SETUP([LOOP with index and IF based on index]) AT_DATA([loop.sps], [dnl LOOP_DATA loop #m=x to y by z if #m < 4. print /#m. end loop. print/'--------'. execute. ]) AT_CHECK([pspp -o pspp.csv loop.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 1.00 @&t@ 2.00 @&t@ -------- 2.00 @&t@ -------- 3.00 @&t@ -------- -------- ]) AT_CLEANUP AT_SETUP([LOOP with index and END IF based on index]) AT_DATA([loop.sps], [dnl LOOP_DATA loop #n=x to y by z. print /#n. end loop if #n >= 4. print/'--------'. execute. ]) AT_CHECK([pspp -o pspp.csv loop.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 1.00 @&t@ 2.00 @&t@ -------- 2.00 @&t@ 4.00 @&t@ -------- 3.00 @&t@ 6.00 @&t@ -------- -------- ]) AT_CLEANUP AT_SETUP([LOOP with index and IF and END IF based on index]) AT_DATA([loop.sps], [dnl LOOP_DATA loop #o=x to y by z if mod(#o,2) = 0. print /#o. end loop if #o >= 4. print/'--------'. execute. ]) AT_CHECK([pspp -o pspp.csv loop.sps]) AT_CHECK([cat pspp.csv], [0], [dnl -------- 2.00 @&t@ 4.00 @&t@ -------- -------- -------- ]) AT_CLEANUP AT_SETUP([LOOP with no conditions containing BREAK]) AT_DATA([loop.sps], [dnl LOOP_DATA compute #p = x. loop. print /#p. compute #p = #p + z. do if #p >= y. break. end if. end loop. print/'--------'. execute. ]) AT_CHECK([pspp -o pspp.csv loop.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 1.00 @&t@ -------- 2.00 @&t@ 4.00 @&t@ -------- 3.00 @&t@ 6.00 @&t@ -------- 4.00 @&t@ -------- ]) AT_CLEANUP AT_SETUP([LOOP with no conditions that ends due to MXLOOPS]) AT_DATA([loop.sps], [dnl LOOP_DATA set mxloops=2. loop. compute #p = #p + 1. print /x #p. end loop. print/'--------'. execute. ]) AT_CHECK([pspp -o pspp.csv loop.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 1 1.00 @&t@ 1 2.00 @&t@ -------- 2 3.00 @&t@ 2 4.00 @&t@ -------- 3 5.00 @&t@ 3 6.00 @&t@ -------- 4 7.00 @&t@ 4 8.00 @&t@ -------- ]) AT_CLEANUP pspp-1.0.1/tests/language/dictionary/0000755000175000017500000000000013150620333014562 500000000000000pspp-1.0.1/tests/language/dictionary/mrsets.at0000644000175000017500000002305213137223525016356 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([MRSETS]) m4_define([DEFINE_MRSETS_DATA], [DATA LIST NOTABLE /w x y z 1-4 a b c d 5-8 (a). BEGIN DATA. 1234acbd 5678efgh END DATA.]) m4_define([DEFINE_MRSETS], [DEFINE_MRSETS_DATA [VARIABLE LABEL w 'duplicate variable label' x 'Variable x' z 'Duplicate variable label'. VALUE LABELS /w 1 'w value 1' /y 1 'duplicate Value label' /z 1 'duplicate value Label' /a b c d 'a' 'burger' 'b' 'fries' 'c' 'shake' 'd' 'taco'. ADD VALUE LABELS /b 'b' 'Fries' /c 'b' 'XXX'. MRSETS /MDGROUP NAME=$a LABEL='First multiple dichotomy group' CATEGORYLABELS=VARLABELS VARIABLES=w x y z VALUE=5 /MDGROUP NAME=$b CATEGORYLABELS=COUNTEDVALUES VARIABLES=z y VALUE=123 /MDGROUP NAME=$c LABELSOURCE=VARLABEL CATEGORYLABELS=COUNTEDVALUES VARIABLES=w x y z VALUE=1 /MDGROUP NAME=$d LABELSOURCE=VARLABEL VARIABLES=a b c d VALUE='c' /MCGROUP NAME=$e LABEL='First multiple category group' VARIABLES=w x y z /MCGROUP NAME=$f VARIABLES=a b c d. ]]) m4_define([DEFINE_MRSETS_OUTPUT], [mrsets.sps:25: warning: MRSETS: Variables w and z specified as part of multiple dichotomy group $a have the same variable label. Categories represented by these variables will not be distinguishable in output. mrsets.sps:29: warning: MRSETS: Variable z specified as part of multiple dichotomy group $b (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value. This category will not be distinguishable in output. mrsets.sps:29: warning: MRSETS: Variable y specified as part of multiple dichotomy group $b (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value. This category will not be distinguishable in output. mrsets.sps:34: warning: MRSETS: Variable x specified as part of multiple dichotomy group $c (which has CATEGORYLABELS=COUNTEDVALUES) has no value label for its counted value. This category will not be distinguishable in output. mrsets.sps:34: warning: MRSETS: Variables y and z specified as part of multiple dichotomy group $c (which has CATEGORYLABELS=COUNTEDVALUES) have the same value label for the group's counted value. These categories will not be distinguishable in output. mrsets.sps:38: warning: MRSETS: MDGROUP subcommand for group $d specifies LABELSOURCE=VARLABEL but not CATEGORYLABELS=COUNTEDVALUES. Ignoring LABELSOURCE. "mrsets.sps:41: warning: MRSETS: Variables specified on MCGROUP should have the same categories, but w and y (and possibly others) in multiple category group $e have different value labels for value 1." "mrsets.sps:42: warning: MRSETS: Variables specified on MCGROUP should have the same categories, but a and c (and possibly others) in multiple category group $f have different value labels for value b." ]) m4_define([MRSETS_DISPLAY_OUTPUT], [Table: Multiple Response Sets Name,Variables,Details $a,"w x y z ","Multiple dichotomy set Label: First multiple dichotomy group Label source: Provided by user Counted value: 5 Category label source: Variable labels " $b,"z y ","Multiple dichotomy set Counted value: 123 Category label source: Value labels of counted value " $c,"w x y z ","Multiple dichotomy set Label: duplicate variable label Label source: First variable label among variables Counted value: 1 Category label source: Value labels of counted value " $d,"a b c d ","Multiple dichotomy set Counted value: `c' Category label source: Variable labels " $e,"w x y z ","Multiple category set Label: First multiple category group " $f,"a b c d ","Multiple category set " ]) AT_SETUP([MRSETS add, display, delete]) AT_DATA([mrsets.sps], [DEFINE_MRSETS [MRSETS /DISPLAY NAME=[$a] /DISPLAY NAME=ALL /DELETE NAME=[$c] /DISPLAY NAME=ALL /DELETE NAME=ALL /DISPLAY NAME=ALL. ]]) AT_CHECK([pspp -O format=csv mrsets.sps], [0], [DEFINE_MRSETS_OUTPUT Table: Multiple Response Sets Name,Variables,Details $a,"w x y z ","Multiple dichotomy set Label: First multiple dichotomy group Label source: Provided by user Counted value: 5 Category label source: Variable labels " MRSETS_DISPLAY_OUTPUT Table: Multiple Response Sets Name,Variables,Details $a,"w x y z ","Multiple dichotomy set Label: First multiple dichotomy group Label source: Provided by user Counted value: 5 Category label source: Variable labels " $b,"z y ","Multiple dichotomy set Counted value: 123 Category label source: Value labels of counted value " $d,"a b c d ","Multiple dichotomy set Counted value: `c' Category label source: Variable labels " $e,"w x y z ","Multiple category set Label: First multiple category group " $f,"a b c d ","Multiple category set " mrsets.sps:50: note: MRSETS: The active dataset dictionary does not contain any multiple response sets. ]) AT_CLEANUP AT_SETUP([MRSETS read and write]) AT_DATA([mrsets.sps], [DEFINE_MRSETS SAVE OUTFILE='mrsets.sav'. ]) AT_CHECK([pspp -O format=csv mrsets.sps], [0], [DEFINE_MRSETS_OUTPUT]) AT_DATA([mrsets2.sps], [GET FILE='mrsets.sav'. MRSETS /DISPLAY NAME=ALL. ]) AT_CHECK([pspp -O format=csv mrsets2.sps], [0], [MRSETS_DISPLAY_OUTPUT], [], [hd mrsets.sav]) AT_CLEANUP AT_SETUP([MRSETS names must begin with $]) AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MCGROUP NAME=x. ]) AT_CHECK([pspp -O format=csv mrsets.sps], [1], [mrsets.sps:6: error: MRSETS: x is not a valid name for a multiple response set. Multiple response set names must begin with `$'. ]) AT_CLEANUP AT_SETUP([MRSETS must have at least 2 variables]) AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MCGROUP NAME=$x VARIABLES=a. ]) AT_CHECK([pspp -O format=csv mrsets.sps], [1], ["mrsets.sps:6: error: MRSETS: VARIABLES specified only variable a on MCGROUP, but at least two variables are required." ]) AT_CLEANUP AT_SETUP([MRSETS does not allow noninteger VALUE]) AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MDGROUP VALUE=1.5. ]) AT_CHECK([pspp -O format=csv mrsets.sps], [1], [mrsets.sps:6: error: MRSETS: Numeric VALUE must be an integer. ]) AT_CLEANUP AT_SETUP([MRSETS requires NAME to define a group]) AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MCGROUP VARIABLES=a b c. ]) AT_CHECK([pspp -O format=csv mrsets.sps], [1], [mrsets.sps:6.32: error: MRSETS: Syntax error at end of command: Required MCGROUP specification missing from NAME subcommand. ]) AT_CLEANUP AT_SETUP([MRSETS requires VARIABLES to define a group]) AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MCGROUP NAME=$Mcgroup. ]) AT_CHECK([pspp -O format=csv mrsets.sps], [1], [mrsets.sps:6.30: error: MRSETS: Syntax error at end of command: Required MCGROUP specification missing from VARIABLES subcommand. ]) AT_CLEANUP AT_SETUP([MRSETS variables must be same type]) AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MCGROUP NAME=$mygroup VARIABLES=a b x y. ]) AT_CHECK([pspp -O format=csv mrsets.sps], [1], [mrsets.sps:6: error: MRSETS: a and x are not the same type. All variables in this variable list must be of the same type. x will be omitted from the list. mrsets.sps:6: error: MRSETS: a and y are not the same type. All variables in this variable list must be of the same type. y will be omitted from the list. ]) AT_CLEANUP AT_SETUP([MRSETS variables and VALUE must be same type]) AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MDGROUP NAME=$group1 VARIABLES=a b VALUE=1. MRSETS /MDGROUP NAME=$group2 VARIABLES=x y VALUE='abc'. ]) AT_CHECK([pspp -O format=csv mrsets.sps], [1], ["mrsets.sps:6: error: MRSETS: MDGROUP subcommand for group $group1 specifies a string VALUE, but the variables specified for this group are numeric." "mrsets.sps:7: error: MRSETS: MDGROUP subcommand for group $group2 specifies a string VALUE, but the variables specified for this group are numeric." ]) AT_CLEANUP AT_SETUP([MRSETS VALUE must not be too wide]) AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MDGROUP NAME=$group1 VARIABLES=a b VALUE='abc'. ]) AT_CHECK([pspp -O format=csv mrsets.sps], [1], ["mrsets.sps:6: error: MRSETS: VALUE string on MDGROUP subcommand for group $group1 is 3 bytes long, but it must be no longer than the narrowest variable in the group, which is a with a width of 1 bytes." ]) AT_CLEANUP AT_SETUP([MRSETS LABEL and LABELSOURCE are exclusive]) AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA MRSETS /MDGROUP NAME=$group1 VARIABLES=a b VALUE='a' LABEL='label' LABELSOURCE=VARLABEL. ]) AT_CHECK([pspp -O format=csv mrsets.sps], [0], [mrsets.sps:7: warning: MRSETS: MDGROUP subcommand for group $group1 specifies LABELSOURCE=VARLABEL but not CATEGORYLABELS=COUNTEDVALUES. Ignoring LABELSOURCE. ]) AT_CLEANUP AT_SETUP([MRSETS DISPLAY or DELETE unknown group]) AT_DATA([mrsets.sps], [DEFINE_MRSETS_DATA [MRSETS /DISPLAY NAME=[$x]. MRSETS /DELETE NAME=[$y]. ]]) AT_CHECK([pspp -O format=csv mrsets.sps], [1], [mrsets.sps:6: error: MRSETS: No multiple response set named $x. mrsets.sps:7: error: MRSETS: No multiple response set named $y. ]) AT_CLEANUP pspp-1.0.1/tests/language/dictionary/sys-file-info.at0000644000175000017500000000634013137223525017526 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([SYSFILE INFO]) AT_SETUP([SYSFILE INFO]) AT_DATA([sysfile-info.sps], [dnl DATA LIST LIST /x * name (a10) . BEGIN DATA 1 one 2 two 3 three END DATA. SAVE OUTFILE='pro.sav'. sysfile info file='pro.sav'. ]) AT_CHECK([pspp -o pspp.csv sysfile-info.sps]) AT_CHECK( [sed -e '/^Created:,/d' \ -e '/^Endian:,/d' \ -e '/^Integer Format:,/d' \ -e '/^Real Format:,/d' \ -e '/^Encoding:,/d' pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format x,F8.0 name,A10 File:,pro.sav Label:,No label. Variables:,2 Cases:,3 Type:,SPSS System File Weight:,Not weighted. Compression:,SAV Variable,Description,Position x,"Format: F8.2 Measure: Scale Role: Input Display Alignment: Right Display Width: 8",1 name,"Format: A10 Measure: Nominal Role: Input Display Alignment: Left Display Width: 10",2 ]) AT_CLEANUP AT_BANNER([DISPLAY]) dnl DISPLAY DOCUMENTS is tested with commands for documents. AT_SETUP([DISPLAY FILE LABEL]) AT_DATA([display.sps], [dnl DATA LIST LIST NOTABLE /x * name (a10) . DISPLAY FILE LABEL. FILE LABEL 'foo bar baz quux'. DISPLAY FILE LABEL. ]) AT_CHECK([pspp -O format=csv display.sps], [0], [dnl The active dataset does not have a file label. File label: foo bar baz quux ]) AT_CLEANUP dnl DISPLAY VECTORS is tested with commands for vectors. dnl DISPLAY ATTRIBUTES and @ATTRIBUTES are tested with commands for attributes. AT_SETUP([DISPLAY SCRATCH]) AT_DATA([sysfile-info.sps], [dnl DATA LIST LIST NOTABLE /x * name (a10) . DISPLAY SCRATCH. COMPUTE #x=0. DISPLAY SCRATCH. ]) AT_CHECK([pspp -O format=csv sysfile-info.sps], [0], [dnl sysfile-info.sps:2: warning: DISPLAY: No variables to display. Variable #x ]) AT_CLEANUP AT_SETUP([DISPLAY INDEX]) AT_DATA([sysfile-info.sps], [dnl DATA LIST LIST NOTABLE /x * name (a10) . DISPLAY INDEX. ]) AT_CHECK([pspp -O format=csv sysfile-info.sps], [0], [dnl Variable,Position x,1 name,2 ]) AT_CLEANUP AT_SETUP([DISPLAY NAMES]) AT_DATA([sysfile-info.sps], [dnl DATA LIST LIST NOTABLE /x * name (a10) . DISPLAY NAMES. ]) AT_CHECK([pspp -O format=csv sysfile-info.sps], [0], [dnl Variable x name ]) AT_CLEANUP AT_SETUP([DISPLAY LABELS]) AT_DATA([sysfile-info.sps], [dnl DATA LIST LIST NOTABLE /x * name (a10) . VARIABLE LABEL x 'variable one' name 'variable two'. VALUE LABEL x 1 'asdf' 2 'jkl;'. DISPLAY LABELS. ]) AT_CHECK([pspp -O format=csv sysfile-info.sps], [0], [dnl Variable,Label,Position x,variable one,1 name,variable two,2 ]) AT_CLEANUP dnl DISPLAY VARIABLES Is tested in multiple places. pspp-1.0.1/tests/language/dictionary/split-file.at0000644000175000017500000000501113137223525017104 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([SPLIT FILE]) AT_SETUP([SPLIT FILE - basic test]) AT_DATA([split-file.sps], [dnl title 'Test SPLIT FILE utility'. data list notable /X 1 Y 2. begin data. 12 16 17 19 15 14 27 20 26 25 28 29 24 end data. split file by x. list. ]) AT_CHECK([pspp -o pspp.csv split-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Title: Test SPLIT FILE utility Variable,Value,Label X,1, Table: Data List X,Y 1,2 1,6 1,7 1,9 1,5 1,4 Variable,Value,Label X,2, Table: Data List X,Y 2,7 2,0 2,6 2,5 2,8 2,9 2,4 ]) AT_CLEANUP AT_SETUP([SPLIT FILE - vs procedures]) AT_DATA([split-file.sps], [dnl * This test is a compendium of those procedures which might * have problems when run in conjunction with SPLITS. data list list /a b c q g *. begin data. 1 2 3 1 0 4 5 6 0 0 7 8 9 1 0 10 11 12 0 1 13 14 15 1 1 end data. split file by g. * The commented out lines are ones which currently fail. AGGREGATE outfile='foo' /break=c /X=sum(a). AUTORECODE variables = c into d . COUNT e = c (1 2 3 4 5 6 7). CROSSTABS a by b. CORRELATIONS /VARIABLES = a b. DELETE VARIABLES a. DESCRIPTIVES e . EXAMINE c by b. EXPORT outfile='xxx'. FACTOR /VARIABLES = b c d. FILTER BY c. FREQUENCIES b. GLM c BY b. GRAPH /HISTOGRAM = b . GRAPH /SCATTERPLOT(BIVARIATE) = b with c by e . GRAPH /BAR (GROUPED) = MEAN(b) by c by e. GRAPH /BAR = COUNT BY b. LIST. LOGISTIC REGRESSION q WITH b. MEANS c b. NPAR TESTS /MCNEMAR q. ONEWAY c BY b. QUICK CLUSTER b c. RANK b c. REGRESSION /VARIABLES = c /DEPENDENT = q. RELIABILITY /VARIABLES = c b d. RENAME VARIABLES (b = bb). ROC bb by q(1). SAMPLE 0.9 . SAVE outfile='xx.sav'. SORT CASES by bb. T-TEST /GROUP=q(0,1) /VARIABLES=bb. USE ALL. FLIP /VARIABLES = bb, c . execute. finish. ]) AT_CHECK([pspp -O format=csv split-file.sps], [0],[ignore]) AT_CLEANUPpspp-1.0.1/tests/language/dictionary/delete-variables.at0000644000175000017500000000231413137223525020247 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([DELETE VARIABLES]) dnl Checks for regressions against a crash reported in bug #38843. AT_SETUP([DELETE VARIABLES with FILTER]) AT_DATA([delete-variables.sps], [dnl DATA LIST LIST /a b. BEGIN DATA. 1 3 4 6 7 9 END DATA. FILTER BY b. DELETE VARIABLES a. LIST. ]) AT_CHECK([pspp -O format=csv delete-variables.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format a,F8.0 b,F8.0 Table: Data List b 3.00 6.00 9.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/dictionary/sort-variables.at0000644000175000017500000000453613137223525020004 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([SORT VARIABLES]) AT_SETUP([SORT VARIABLES]) # This reverses the order of its input lines. # From the GNU sed manual. tac () { sed -n '1! G $ p h' } test_sort () { cat > sort-variables.sps <. dnl AT_BANNER([FORMATS]) AT_SETUP([FORMATS positive tests]) AT_DATA([formats.sps], [dnl DATA LIST LIST /a b c * x (A1) y (A2) z (A3). DISPLAY VARIABLES. FORMATS /a (COMMA10) b (N4). DISPLAY VARIABLES. FORMATS c (E8.1) x (A1) /y (AHEX4) z (A3). DISPLAY VARIABLES. ]) AT_CHECK([pspp -o pspp.csv formats.sps]) AT_CHECK([grep -E -v 'Measure|Display' pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format a,F8.0 b,F8.0 c,F8.0 x,A1 y,A2 z,A3 Variable,Description,Position a,Format: F8.2,1 b,Format: F8.2,2 c,Format: F8.2,3 x,Format: A1,4 y,Format: A2,5 z,Format: A3,6 Variable,Description,Position a,Format: COMMA10.0,1 b,Format: N4.0,2 c,Format: F8.2,3 x,Format: A1,4 y,Format: A2,5 z,Format: A3,6 Variable,Description,Position a,Format: COMMA10.0,1 b,Format: N4.0,2 c,Format: E8.1,3 x,Format: A1,4 y,Format: AHEX4,5 z,Format: A3,6 ]) AT_CLEANUP AT_SETUP([FORMATS negative tests]) AT_DATA([formats.sps], [dnl DATA LIST LIST /a b c * x (A1) y (A2) z (A3). FORMATS a (E6.1). FORMATS a y (F4). FORMATS x (A2). FORMATS y (AHEX2). FORMATS x y (A2). ]) AT_CHECK([pspp -O format=csv formats.sps], [1], [dnl Table: Reading free-form data from INLINE. Variable,Format a,F8.0 b,F8.0 c,F8.0 x,A1 y,A2 z,A3 "formats.sps:2: error: FORMATS: Output format E6.1 specifies 1 decimal place, but the given width does not allow for any decimals." formats.sps:3: error: FORMATS: a and y are not the same type. All variables in this variable list must be of the same type. y will be omitted from the list. formats.sps:4: error: FORMATS: String variable with width 1 is not compatible with format A2. formats.sps:5: error: FORMATS: String variable with width 2 is not compatible with format AHEX2. formats.sps:6: error: FORMATS: x and y are string variables with different widths. All variables in this variable list must have the same width. y will be omitted from the list. formats.sps:6: error: FORMATS: String variable with width 1 is not compatible with format A2. ]) AT_CLEANUP pspp-1.0.1/tests/language/dictionary/variable-display.at0000644000175000017500000000612713137223525020275 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([variable display attributes]) AT_SETUP([variable display attribute commands]) AT_DATA([var-display.sps], [dnl DATA LIST FREE /x y z. VARIABLE ALIGNMENT x (LEFT)/y (RIGHT)/z (CENTER). VARIABLE WIDTH x (10)/y (12)/z (14). VARIABLE LEVEL x (SCALE)/y (ORDINAL)/z (NOMINAL). VARIABLE ROLE /TARGET x /BOTH y /NONE z. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -o pspp.csv var-display.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,Position x,"Format: F8.2 Measure: Scale Role: Output Display Alignment: Left Display Width: 10",1 y,"Format: F8.2 Measure: Ordinal Role: Both Display Alignment: Right Display Width: 12",2 z,"Format: F8.2 Measure: Nominal Role: None Display Alignment: Center Display Width: 14",3 ]) AT_CLEANUP AT_BANNER([VARIABLE LABELS]) AT_SETUP([variable labels]) dnl The following test is to make sure the TVARS command works and that dnl variables are displayed accordingly. AT_DATA([var-labels.sps], [dnl DATA LIST LIST NOTABLE /x * y *. BEGIN DATA. 1 100 2 200 3 300 4 400 END DATA. * While no labels have been set, the TVARS is irrelevant. SET TVARS=NAMES. DESCRIPTIVES ALL. SET TVARS=LABELS. DESCRIPTIVES ALL. SET TVARS=BOTH. DESCRIPTIVES ALL. VARIABLE LABEL x 'foo' y 'bar'. * Now, the TVARS setting should have effect SET TVARS=NAMES. DESCRIPTIVES ALL. SET TVARS=LABELS. DESCRIPTIVES ALL. SET TVARS=BOTH. DESCRIPTIVES ALL. ]) AT_CHECK([pspp -O format=csv var-labels.sps], [0],[dnl Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum x,4,2.50,1.29,1.00,4.00 y,4,250.00,129.10,100.00,400.00 Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum x,4,2.50,1.29,1.00,4.00 y,4,250.00,129.10,100.00,400.00 Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum x,4,2.50,1.29,1.00,4.00 y,4,250.00,129.10,100.00,400.00 Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum x,4,2.50,1.29,1.00,4.00 y,4,250.00,129.10,100.00,400.00 Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum foo,4,2.50,1.29,1.00,4.00 bar,4,250.00,129.10,100.00,400.00 Table: Valid cases = 4; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum foo (x),4,2.50,1.29,1.00,4.00 bar (y),4,250.00,129.10,100.00,400.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/dictionary/value-labels.at0000644000175000017500000000706113137223525017417 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([VALUE LABELS]) AT_SETUP([VALUE LABELS date formats]) AT_DATA([value-labels.sps], [dnl DATA LIST LIST NOTABLE /ad (adate10) dt (datetime20). VALUE LABELS ad 'july 10, 1982' 'label 1' '1-2-93' 'label 2' '5-4-2003' 'label 3' /dt '12 Apr 2011 06:09:56' 'label 4'. DISPLAY DICTIONARY. ]) AT_CHECK([pspp -O format=csv value-labels.sps], [0], [dnl Variable,Description,Position ad,"Format: ADATE10 Value,Label 07/10/1982,label 1 01/02/1993,label 2 05/04/2003,label 3",1 dt,"Format: DATETIME20.0 Value,Label 12-APR-2011 06:09:56,label 4",2 ]) AT_CLEANUP AT_SETUP([VALUE LABELS with new-line]) AT_DATA([value-labels.sps], [dnl DATA LIST LIST NOTABLE /x. VALUE LABELS x 1 'one' 2 'first line\nsecond line' 3 'three'. BEGIN DATA. 1 2 3 END DATA. DISPLAY DICTIONARY. FREQUENCIES x/STAT=NONE. ]) AT_CHECK([pspp -O format=csv value-labels.sps], [0], [dnl Variable,Description,Position x,"Format: F8.2 Value,Label 1.00,one 2.00,first line\nsecond line 3.00,three",1 Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent one,1.00,1,33.33,33.33,33.33 "first line second line",2.00,1,33.33,33.33,66.67 three,3.00,1,33.33,33.33,100.00 Total,,3,100.0,100.0, ]) AT_CLEANUP AT_SETUP([VALUE LABELS with new-line in system file]) AT_DATA([save.sps], [dnl DATA LIST LIST NOTABLE /x. VALUE LABELS x 1 'one' 2 'first line\nsecond line' 3 'three'. BEGIN DATA. 1 2 3 END DATA. SAVE OUTFILE='value-labels.sav'. ]) AT_CHECK([pspp -O format=csv save.sps]) AT_DATA([get.sps], [dnl GET FILE='value-labels.sav'. DISPLAY DICTIONARY. FREQUENCIES x/STAT=NONE. ]) AT_CHECK([pspp -O format=csv get.sps], [0], [dnl Variable,Description,Position x,"Format: F8.2 Value,Label 1.00,one 2.00,first line\nsecond line 3.00,three",1 Table: x Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent one,1.00,1,33.33,33.33,33.33 "first line second line",2.00,1,33.33,33.33,66.67 three,3.00,1,33.33,33.33,100.00 Total,,3,100.0,100.0, ]) AT_CLEANUP dnl Tests for a bug which caused VALUE LABELS to dnl crash when given invalid syntax. AT_SETUP([VALUE LABELS invalid syntax bug]) AT_DATA([value-labels.sps], [dnl DATA LIST LIST NOTABLE /a * pref * . BEGIN DATA. 1.00 1.00 1.00 2.00 2.00 1.00 2.00 2.00 END DATA. VALUE LABELS /var=a 'label for a'. ]) AT_CHECK([pspp -O format=csv value-labels.sps], [1], [dnl value-labels.sps:9: error: VALUE LABELS: var is not a variable name. ]) AT_CLEANUP # Tests for a bug which caused a crash if VALUE LABELS had a trailing /. AT_SETUP([VALUE LABELS trailing `/' bug]) AT_DATA([value-labels.sps], [dnl DATA LIST LIST NOTABLE /X * . BEGIN DATA. 1 2 3 4 END DATA. VALUE LABELS X 1 'one' 2 'two' 3 'three'/ LIST VARIABLES=X. ]) AT_CHECK([pspp -O format=csv value-labels.sps], [0], [dnl Table: Data List X 1.00 2.00 3.00 4.00 ]) AT_CLEANUP pspp-1.0.1/tests/language/dictionary/weight.at0000644000175000017500000000721513137223525016333 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([WEIGHT]) AT_SETUP([WEIGHT]) AT_DATA([weight.txt], [dnl 18 1 19 7 20 26 21 76 22 57 23 58 24 38 25 38 26 30 27 21 28 23 29 24 30 23 31 14 32 21 33 21 34 14 35 14 36 17 37 11 38 16 39 14 40 15 41 14 42 14 43 8 44 15 45 10 46 12 47 13 48 13 49 5 50 5 51 3 52 7 53 6 54 2 55 2 56 2 57 3 58 1 59 3 61 1 62 3 63 1 64 1 65 2 70 1 78 1 79 1 80 1 94 1 ]) AT_DATA([weight.sps], [dnl SET FORMAT F8.3. data list file='weight.txt'/AVAR 1-5 BVAR 6-10. weight by BVAR. descriptives AVAR /statistics all /format serial. frequencies AVAR /statistics all. ]) AT_CHECK([pspp -o pspp.csv weight.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading 1 record from `weight.txt'. Variable,Record,Columns,Format AVAR,1,1- 5,F5.0 BVAR,1,6- 10,F5.0 Table: Valid cases = 730; cases with missing value(s) = 0. Variable,Valid N,Missing N,Mean,S.E. Mean,Std Dev,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,Range,Minimum,Maximum,Sum AVAR,730,0,31.515,.405,10.937,119.608,2.411,.181,1.345,.090,76.000,18.000,94.000,23006.000 Table: AVAR Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent ,18,1,.137,.137,.137 ,19,7,.959,.959,1.096 ,20,26,3.562,3.562,4.658 ,21,76,10.411,10.411,15.068 ,22,57,7.808,7.808,22.877 ,23,58,7.945,7.945,30.822 ,24,38,5.205,5.205,36.027 ,25,38,5.205,5.205,41.233 ,26,30,4.110,4.110,45.342 ,27,21,2.877,2.877,48.219 ,28,23,3.151,3.151,51.370 ,29,24,3.288,3.288,54.658 ,30,23,3.151,3.151,57.808 ,31,14,1.918,1.918,59.726 ,32,21,2.877,2.877,62.603 ,33,21,2.877,2.877,65.479 ,34,14,1.918,1.918,67.397 ,35,14,1.918,1.918,69.315 ,36,17,2.329,2.329,71.644 ,37,11,1.507,1.507,73.151 ,38,16,2.192,2.192,75.342 ,39,14,1.918,1.918,77.260 ,40,15,2.055,2.055,79.315 ,41,14,1.918,1.918,81.233 ,42,14,1.918,1.918,83.151 ,43,8,1.096,1.096,84.247 ,44,15,2.055,2.055,86.301 ,45,10,1.370,1.370,87.671 ,46,12,1.644,1.644,89.315 ,47,13,1.781,1.781,91.096 ,48,13,1.781,1.781,92.877 ,49,5,.685,.685,93.562 ,50,5,.685,.685,94.247 ,51,3,.411,.411,94.658 ,52,7,.959,.959,95.616 ,53,6,.822,.822,96.438 ,54,2,.274,.274,96.712 ,55,2,.274,.274,96.986 ,56,2,.274,.274,97.260 ,57,3,.411,.411,97.671 ,58,1,.137,.137,97.808 ,59,3,.411,.411,98.219 ,61,1,.137,.137,98.356 ,62,3,.411,.411,98.767 ,63,1,.137,.137,98.904 ,64,1,.137,.137,99.041 ,65,2,.274,.274,99.315 ,70,1,.137,.137,99.452 ,78,1,.137,.137,99.589 ,79,1,.137,.137,99.726 ,80,1,.137,.137,99.863 ,94,1,.137,.137,100.000 Total,,730,100.0,100.0, Table: AVAR N,Valid,730 ,Missing,0 Mean,,31.515 S.E. Mean,,.405 Mode,,21.000 Std Dev,,10.937 Variance,,119.608 Kurtosis,,2.411 S.E. Kurt,,.181 Skewness,,1.345 S.E. Skew,,.090 Range,,76.000 Minimum,,18.000 Maximum,,94.000 Sum,,23006.000 Percentiles,50 (Median),28 ]) AT_CLEANUP pspp-1.0.1/tests/language/dictionary/vector.at0000644000175000017500000000433413137223525016345 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([VECTOR]) AT_SETUP([VECTOR short form]) AT_DATA([vector.sps], [dnl data list notable/x 1. vector v(4). display vector. ]) AT_CHECK([pspp -o pspp.csv vector.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Vector,Position,Variable,Print Format v,1,v1,F8.2 ,2,v2,F8.2 ,3,v3,F8.2 ,4,v4,F8.2 ]) AT_CLEANUP AT_SETUP([VECTOR short form with format specification]) AT_DATA([vector.sps], [dnl data list notable/x 1. vector #vec(4, comma10.2) /#svec(3, a8). display vector. ]) AT_CHECK([pspp -o pspp.csv vector.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Vector,Position,Variable,Print Format #vec,1,#vec1,COMMA10.2 ,2,#vec2,COMMA10.2 ,3,#vec3,COMMA10.2 ,4,#vec4,COMMA10.2 #svec,1,#svec1,A8 ,2,#svec2,A8 ,3,#svec3,A8 ]) AT_CLEANUP AT_SETUP([VECTOR short form in INPUT PROGRAM]) AT_DATA([vector.sps], [dnl input program. vector x(5). data list notable/x5 x2 x3 x1 x4 1-5. end input program. display vector. ]) AT_CHECK([pspp -o pspp.csv vector.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Vector,Position,Variable,Print Format x,1,x1,F8.2 ,2,x2,F8.2 ,3,x3,F8.2 ,4,x4,F8.2 ,5,x5,F8.2 ]) AT_CLEANUP AT_SETUP([VECTOR long form]) AT_DATA([vector.sps], [dnl data list notable/u w x y z 1-5. vector a=u to y. vector b=x to z. vector c=all. display vector. ]) AT_CHECK([pspp -o pspp.csv vector.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Vector,Position,Variable,Print Format a,1,u,F1.0 ,2,w,F1.0 ,3,x,F1.0 ,4,y,F1.0 b,1,x,F1.0 ,2,y,F1.0 ,3,z,F1.0 c,1,u,F1.0 ,2,w,F1.0 ,3,x,F1.0 ,4,y,F1.0 ,5,z,F1.0 ]) AT_CLEANUP pspp-1.0.1/tests/language/dictionary/rename-variables.at0000644000175000017500000000574313137223525020265 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([RENAME VARIABLES]) AT_SETUP([RENAME VARIABLES]) AT_DATA([rename-variables.sps], [dnl DATA LIST LIST /brakeFluid y auxiliary warp (F2.0). BEGIN DATA. 1 3 5 9 2 3 6 10 3 3 7 11 4 3 8 11 END DATA. LIST. RENAME VARIABLES brakeFluid=applecarts y=bananamobiles. RENAME VARIABLES (warp auxiliary=foobar xyzzy). LIST. SAVE /OUTFILE='rename.sav'. ]) AT_CHECK([pspp -O format=csv rename-variables.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format brakeFluid,F2.0 y,F2.0 auxiliary,F2.0 warp,F2.0 Table: Data List brakeFluid,y,auxiliary,warp 1,3,5,9 2,3,6,10 3,3,7,11 4,3,8,11 Table: Data List applecarts,bananamobiles,xyzzy,foobar 1,3,5,9 2,3,6,10 3,3,7,11 4,3,8,11 ]) AT_CHECK([grep '[bB][rR][aA][kK][eE]' rename.sav], [1], [ignore-nolog]) AT_CLEANUP AT_SETUP([RENAME VARIABLES -- multiple sets]) AT_DATA([rename-variables.sps], [dnl data list list /a b c d e *. begin data. 1 2 3 4 5 end data. rename variables (a b=x y) (c d e=z zz zzz). list. ]) AT_CHECK([pspp -O format=csv rename-variables.sps], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format a,F8.0 b,F8.0 c,F8.0 d,F8.0 e,F8.0 Table: Data List x,y,z,zz,zzz 1.00,2.00,3.00,4.00,5.00 ]) AT_CLEANUP AT_SETUP([RENAME VARIABLES -- invalid syntax 1]) AT_DATA([rename-variables.sps], [dnl DATA LIST LIST /brakeFluid y auxiliary warp (F2.0). RENAME VARIABLES warp auxiliary=foobar xyzzy. ]) AT_CHECK([pspp -o pspp.csv rename-variables.sps], [1], [dnl rename-variables.sps:2.23-2.31: error: RENAME VARIABLES: Syntax error at `auxiliary': expecting `='. ]) AT_CLEANUP AT_SETUP([RENAME VARIABLES -- invalid syntax 2]) AT_DATA([rename-variables.sps], [dnl DATA LIST LIST /brakeFluid y auxiliary warp (F2.0). RENAME VARIABLES (brakeFluid=applecarts y=bananamobiles). ]) AT_CHECK([pspp -o pspp.csv rename-variables.sps], [1], [dnl rename-variables.sps:2: error: RENAME VARIABLES: Differing number of variables in old name list (1) and in new name list (2). ]) AT_CLEANUP AT_SETUP([RENAME VARIABLES -- invalid syntax 3]) AT_DATA([rename-variables.sps], [dnl DATA LIST NOTABLE LIST /z y p q (F2.0). BEGIN DATA. 4 3 8 11 END DATA. RENAME VARIABLES z=a y}bqnanamobiles. LIST. ]) AT_CHECK([pspp -O format=csv rename-variables.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/dictionary/attributes.at0000644000175000017500000000435213137223525017231 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([VARIABLE ATTRIBUTES and DATAFILE ATTRIBUTES]) AT_SETUP([VARIABLE ATTRIBUTES and DATAFILE ATTRIBUTES]) AT_DATA([save-attrs.pspp], [[DATA LIST FREE/a b c. BEGIN DATA. 1 2 3 END DATA. DATAFILE ATTRIBUTE ATTRIBUTE=key('value') array('array element 1') Array[2]('array element 2'). VARIABLE ATTRIBUTE VARIABLES=a b ATTRIBUTE=ValidationRule[2]("a + b > 2") ValidationRule[1]('a * b > 3') /VARIABLES=c ATTRIBUTE=QuestionWording('X or Y?'). DISPLAY ATTRIBUTES. SAVE OUTFILE='attributes.sav'. ]]) AT_DATA([get-attrs.pspp], [[GET FILE='attributes.sav'. DATAFILE ATTRIBUTE DELETE=Array[1] Array[2]. VARIABLE ATTRIBUTE VARIABLES=a DELETE=ValidationRule /VARIABLE=b DELETE=validationrule[2]. DISPLAY ATTRIBUTES. ]]) AT_CHECK([pspp -O format=csv save-attrs.pspp], [0], [[Variable,Description a,"Attribute,Value ValidationRule[1],a * b > 3 ValidationRule[2],a + b > 2" b,"Attribute,Value ValidationRule[1],a * b > 3 ValidationRule[2],a + b > 2" c,"Attribute,Value QuestionWording,X or Y?" Table: Custom data file attributes. Attribute,Value array[1],array element 1 array[2],array element 2 key,value ]]) AT_CHECK([pspp -O format=csv get-attrs.pspp], [0], [dnl Variable,Description a, b,"Attribute,Value ValidationRule,a * b > 3" c,"Attribute,Value QuestionWording,X or Y?" Table: Custom data file attributes. Attribute,Value array,array element 2 key,value ]) AT_CLEANUP pspp-1.0.1/tests/language/dictionary/missing-values.at0000644000175000017500000001331613137223525020011 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([MISSING VALUES]) AT_SETUP([MISSING VALUES valid cases]) AT_DATA([missing-values.sps], [dnl DATA LIST NOTABLE/str1 1-5 (A) str2 6-8 (A) date1 9-19 (DATE) num1 20-25 longstr 26-36 (A). * Numeric missing values. MISSING VALUES date1 num1 (1). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 (1, 2). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 (1, 2, 3). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 (9999998, 9999984, 3). DISPLAY DICTIONARY date1 num1. * Numeric missing values using the first variable's format. MISSING VALUES num1 date1 ('1'). DISPLAY DICTIONARY date1 num1. MISSING VALUES num1 date1 ('1', '2'). DISPLAY DICTIONARY date1 num1. MISSING VALUES num1 date1 ('1', '2', '3'). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 ('06-AUG-05'). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 ('06-AUG-05', '01-OCT-78'). DISPLAY DICTIONARY date1 num1. MISSING VALUES date1 num1 ('06-AUG-05', '01-OCT-78', '14-FEB-81'). DISPLAY DICTIONARY date1 num1. * Ranges of numeric missing values. MISSING VALUES num1 (1 THRU 2). DISPLAY DICTIONARY num1. MISSING VALUES num1 (LO THRU 2). DISPLAY DICTIONARY num1. MISSING VALUES num1 (LOWEST THRU 2). DISPLAY DICTIONARY num1. MISSING VALUES num1 (1 THRU HI). DISPLAY DICTIONARY num1. MISSING VALUES num1 (1 THRU HIGHEST). DISPLAY DICTIONARY num1. * A range of numeric missing values, plus an individual value. MISSING VALUES num1 (1 THRU 2, 3). DISPLAY DICTIONARY num1. MISSING VALUES num1 (LO THRU 2, 3). DISPLAY DICTIONARY num1. MISSING VALUES num1 (LOWEST THRU 2, 3). DISPLAY DICTIONARY num1. MISSING VALUES num1 (1 THRU HI, -1). DISPLAY DICTIONARY num1. MISSING VALUES num1 (1 THRU HIGHEST, -1). DISPLAY DICTIONARY num1. * String missing values. MISSING VALUES str1 str2 longstr ('abc ','def'). DISPLAY DICTIONARY str1 str2 longstr. * May mix variable types when clearing missing values. MISSING VALUES ALL (). DISPLAY DICTIONARY ]) AT_CHECK([pspp -o pspp.csv missing-values.sps]) AT_CHECK([sed -n '/^$/p; /^@<:@^"@:>@*"@<:@^"@:>@*$/N; s/^\(@<:@a-z0-9@:>@*\),".*Missing Values: \(.*\)",@<:@0-9@:>@*$/\1: \2/p; s/^\(@<:@a-z0-9@:>@*\),Format: @<:@A-Z0-9.@:>@*,@<:@0-9@:>@*$/\1: none/p' pspp.csv ], [0], [dnl date1: 1 num1: 1 date1: 1; 2 num1: 1; 2 date1: 1; 2; 3 num1: 1; 2; 3 date1: 9999998; 9999984; 3 num1: 9999998; 9999984; 3 date1: 1 num1: 1 date1: 1; 2 num1: 1; 2 date1: 1; 2; 3 num1: 1; 2; 3 date1: 13342665600 num1: 13342665600 date1: 13342665600; 12495427200 num1: 13342665600; 12495427200 date1: 13342665600; 12495427200; 12570336000 num1: 13342665600; 12495427200; 12570336000 num1: 1 THRU 2 num1: LOWEST THRU 2 num1: LOWEST THRU 2 num1: 1 THRU HIGHEST num1: 1 THRU HIGHEST num1: 1 THRU 2; 3 num1: LOWEST THRU 2; 3 num1: LOWEST THRU 2; 3 num1: 1 THRU HIGHEST; -1 num1: 1 THRU HIGHEST; -1 str1: ""abc ""; ""def "" str2: ""abc""; ""def"" longstr: ""abc ""; ""def "" str1: none str2: none date1: none num1: none longstr: none ]) AT_CLEANUP AT_SETUP([MISSING VALUES invalid cases]) AT_DATA([missing-values.sps], [dnl DATA LIST NOTABLE/str1 1-5 (A) str2 6-8 (A) date1 9-19 (DATE) num1 20-25 longstr 26-36 (A). * Too long for str2. MISSING VALUES str1 str2 longstr ('abcde'). * Long string missing value longer than 8 bytes. MISSING VALUES longstr ('abcdefghijk'). * No string ranges. MISSING VALUES str1 ('a' THRU 'z'). * Mixing string and numeric variables. MISSING VALUES str1 num1 ('123'). * Too many values. MISSING VALUES num1 (1, 2, 3, 4). MISSING VALUES num1 (1 THRU 2, 3 THRU 4). MISSING VALUES num1 (1, 2 THRU 3, 4). MISSING VALUES str1 ('abc', 'def', 'ghi', 'jkl'). * Bad range. MISSING VALUES num1 (2 THRU 1). ]) AT_CHECK([pspp -O format=csv missing-values.sps], [1], [dnl missing-values.sps:5: error: MISSING VALUES: Missing values provided are too long to assign to variable of width 3. missing-values.sps:8: error: MISSING VALUES: Truncating missing value to maximum acceptable length (8 bytes). missing-values.sps:11.26-11.29: error: MISSING VALUES: Syntax error at `THRU': expecting string. missing-values.sps:11: error: MISSING VALUES: THRU is not a variable name. missing-values.sps:14: error: MISSING VALUES: Cannot mix numeric variables (e.g. num1) and string variables (e.g. str1) within a single list. missing-values.sps:17: error: MISSING VALUES: Too many numeric missing values. At most three individual values or one value and one range are allowed. missing-values.sps:18: error: MISSING VALUES: Too many numeric missing values. At most three individual values or one value and one range are allowed. missing-values.sps:19: error: MISSING VALUES: Too many numeric missing values. At most three individual values or one value and one range are allowed. missing-values.sps:20: error: MISSING VALUES: Too many string missing values. At most three individual values are allowed. missing-values.sps:23: warning: MISSING VALUES: The high end of the range (1) is below the low end (2). The range will be treated as if reversed. ]) AT_CLEANUP pspp-1.0.1/tests/language/utilities/0000755000175000017500000000000013150620333014430 500000000000000pspp-1.0.1/tests/language/utilities/insert.at0000644000175000017500000001127313137223525016215 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([INSERT]) dnl Create a file "batch.sps" that is valid syntax only in batch mode. m4_define([CREATE_BATCH_SPS], [AT_DATA([batch.sps], [dnl input program loop #i = 1 to 5 + compute z = #i + end case end loop end file end input program ])]) AT_SETUP([INSERT SYNTAX=INTERACTIVE]) CREATE_BATCH_SPS AT_DATA([insert.sps], [dnl INSERT FILE='batch.sps' SYNTAX=interactive. LIST. ]) AT_CHECK([pspp -o pspp.csv insert.sps], [1], [dnl batch.sps:2.1-2.4: error: INPUT PROGRAM: Syntax error at `loop': expecting end of command. batch.sps:3: error: COMPUTE: COMPUTE is allowed only after the active dataset has been defined or inside INPUT PROGRAM. batch.sps:4: error: END CASE: END CASE is allowed only inside INPUT PROGRAM. insert.sps:4: error: LIST: LIST is allowed only after the active dataset has been defined. ]) AT_CLEANUP AT_SETUP([INSERT SYNTAX=BATCH]) CREATE_BATCH_SPS AT_DATA([insert.sps], [dnl INSERT FILE='batch.sps' SYNTAX=BATCH. LIST. ]) AT_CHECK([pspp -o pspp.csv insert.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List z 1.00 2.00 3.00 4.00 5.00 ]) AT_CLEANUP AT_SETUP([INSERT CD=NO]) AT_DATA([insert.sps], [INSERT FILE='Dir1/foo.sps'. LIST. ]) mkdir Dir1 AT_DATA([Dir1/foo.sps], [INSERT FILE='bar.sps' CD=NO. ]) AT_DATA([Dir1/bar.sps], [DATA LIST LIST /x *. BEGIN DATA. 1 2 3 END DATA. ]) AT_CHECK([pspp -o pspp.csv insert.sps], [1], [dnl Dir1/foo.sps:1: error: INSERT: Can't find `bar.sps' in include file search path. insert.sps:2: error: LIST: LIST is allowed only after the active dataset has been defined. ]) AT_CLEANUP AT_SETUP([INSERT CD=YES]) AT_DATA([insert.sps], [INSERT FILE='Dir1/foo.sps' CD=YES. LIST. ]) mkdir Dir1 AT_DATA([Dir1/foo.sps], [INSERT FILE='bar.sps'. ]) AT_DATA([Dir1/bar.sps], [DATA LIST LIST /x *. BEGIN DATA. 1 2 3 END DATA. ]) AT_CHECK([pspp -o pspp.csv insert.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading free-form data from INLINE. Variable,Format x,F8.0 Table: Data List x 1.00 2.00 3.00 ]) AT_CLEANUP m4_define([CREATE_ERROR_SPS], [AT_DATA([error.sps], [dnl DATA LIST NOTABLE LIST /x *. BEGIN DATA. 1 2 3 END DATA. * The following line is erroneous DISPLAY AKSDJ. LIST. ])]) AT_SETUP([INSERT ERROR=STOP]) CREATE_ERROR_SPS AT_DATA([insert.sps], [INSERT FILE='error.sps' ERROR=STOP. ]) AT_CHECK([pspp -o pspp.csv insert.sps], [1], [dnl error.sps:10: error: DISPLAY: AKSDJ is not a variable name. warning: Error encountered while ERROR=STOP is effective. ]) AT_CLEANUP AT_SETUP([INSERT ERROR=CONTINUE]) CREATE_ERROR_SPS AT_DATA([insert.sps], [INSERT FILE='error.sps' ERROR=CONTINUE. ]) AT_CHECK([pspp -o pspp.csv insert.sps], [1], [dnl error.sps:10: error: DISPLAY: AKSDJ is not a variable name. ]) AT_CHECK([cat pspp.csv], [0], [dnl error.sps:10: error: DISPLAY: AKSDJ is not a variable name. Table: Data List x 1.00 2.00 3.00 ]) AT_CLEANUP dnl Test for regression against bug #24569 in which PSPP crashed dnl upon attempt to insert a nonexistent file. AT_SETUP([INSERT nonexistent file]) AT_DATA([insert.sps], [dnl INSERT FILE='nonexistent' ERROR=CONTINUE. . LIST. ]) AT_CHECK([pspp -O format=csv insert.sps], [1], [dnl insert.sps:2: error: INSERT: Can't find `nonexistent' in include file search path. insert.sps:6: error: LIST: LIST is allowed only after the active dataset has been defined. ]) AT_CLEANUP dnl A test to check the INCLUDE command complete with the dnl syntax and function of the ENCODING subcommand. AT_SETUP([INCLUDE full check]) AT_DATA([two-utf8.sps], [dnl echo 'Äpfelfölfaß'. ]) AT_DATA([include.sps], [dnl echo 'ONE'. include FILE='two-latin1.sps' ENCODING='ISO_8859-1'. ]) AT_CHECK([iconv -f UTF-8 -t iso-8859-1 two-utf8.sps > two-latin1.sps], [0], []) AT_CHECK([pspp -O format=csv include.sps], [0], [dnl ONE Äpfelfölfaß ]) AT_CLEANUP dnl Test for a bug where insert crashed on an unterminated string input AT_SETUP([INSERT unterminated string]) AT_DATA([insert.sps], [INSERT FILE=7bar.sps' CD=NO. ]) AT_CHECK([pspp -O format=csv insert.sps], [1], [ignore]) AT_CLEANUP pspp-1.0.1/tests/language/utilities/date.at0000644000175000017500000000202513137223525015621 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([USE]) AT_SETUP([USE ALL]) AT_DATA([use.sps], [dnl data list notable /X 1-2. begin data. 1 2 3 4 5 6 7 8 9 10 end data. use all. list. ]) AT_CHECK([pspp -o pspp.csv use.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Data List X 1 2 3 4 5 6 7 8 9 10 ]) AT_CLEANUP pspp-1.0.1/tests/language/utilities/cache.at0000644000175000017500000000160013137223525015745 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([CACHE]) AT_SETUP([CACHE]) AT_DATA([cache.sps], [dnl CACHE. ]) AT_CHECK([pspp -O format=csv cache.sps]) AT_CLEANUP pspp-1.0.1/tests/language/utilities/permissions.at0000644000175000017500000000325513137223525017265 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([PERMISSIONS]) AT_SETUP([PERMISSIONS]) AT_DATA([foobar], [Hello ]) chmod 666 foobar AT_CHECK([ls -l foobar], [0], [stdout]) AT_CHECK([sed 's/^\(..........\).*/\1/' stdout], [0], [-rw-rw-rw- ]) AT_DATA([permissions.sps], [PERMISSIONS /FILE='foobar' PERMISSIONS=READONLY. ]) AT_CHECK([pspp -O format=csv permissions.sps]) AT_CHECK([ls -l foobar], [0], [stdout]) AT_CHECK([sed 's/^\(..........\).*/\1/' stdout], [0], [-r--r--r-- ]) AT_DATA([permissions.sps], [PERMISSIONS /FILE='foobar' PERMISSIONS=WRITEABLE. ]) AT_CHECK([pspp -O format=csv permissions.sps]) AT_CHECK([ls -l foobar], [0], [stdout]) AT_CHECK([sed 's/^\(..........\).*/\1/' stdout], [0], [-rw-r--r-- ]) AT_CLEANUP AT_SETUP([PERMISSIONS - bad syntax]) AT_DATA([pe.sps], [[PERMI|SIONS /FILE='foobar' PERMISSIONS=WRITEABLE. ]]) AT_CHECK([pspp -O format=csv pe.sps], [1], [dnl pe.sps:1.6: error: PERMISSIONS: Syntax error at `|': expecting STRING. ]) AT_CLEANUP pspp-1.0.1/tests/language/utilities/set.at0000644000175000017500000000625613137223525015511 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([SET]) # This crashed older versions of PSPP (bug #30682). AT_SETUP([SET FORMAT to invalid output format]) AT_DATA([set.pspp], [dnl DATA LIST LIST NOTABLE /x. BEGIN DATA. 1 2 3 END DATA. SET FORMAT F41. DESCRIPTIVES /x. ]) AT_CHECK([pspp -O format=csv set.pspp], [1], [dnl "set.pspp:7: error: SET: Output format F41.0 specifies width 41, but F requires a width between 1 and 40." Table: Valid cases = 3; cases with missing value(s) = 0. Variable,N,Mean,Std Dev,Minimum,Maximum x,3,2.00,1.00,1.00,3.00 ]) AT_CLEANUP dnl This scenario was observed to erroneously free things twice AT_SETUP([SET crash on invalid cc]) AT_DATA([set.pspp], [dnl SET CCA='xxxx'.SHGW CCA. ]) AT_CHECK([pspp -O format=csv set.pspp], [1], [ignore]) AT_CLEANUP AT_SETUP([SET MXWARNS]) dnl Make sure that syntax processing stops and that dnl a warning is issued when the MXWARNS figure is dnl exceeded. AT_DATA([set.pspp], [dnl set mxwarns=2. data list notable list /x (f8.2) y (f8.2). begin data 1 2 3 r 5 x q 8 9 9 3 x w w end data. comment The following line should not be executed. list. ]) AT_CHECK([pspp -O format=csv set.pspp], [0], [dnl set.pspp:5.3: warning: Data for variable y is not valid as format F: Field contents are not numeric. set.pspp:6.3: warning: Data for variable y is not valid as format F: Field contents are not numeric. set.pspp:7.1: warning: Data for variable x is not valid as format F: Field contents are not numeric. note: Warnings (3) exceed limit (2). Syntax processing will be halted. ]) AT_CLEANUP AT_SETUP([SET MXWARNS special case zero]) dnl Make sure that MXWARNS interprets zero as infinity. AT_DATA([mxwarns.pspp], [dnl set mxwarns=0. data list notable list /x (f8.2) y (f8.2) z *. begin data 1 2 3 3 r 3 5 x 3 q 8 4 9 9 4 3 x 4 w w 4 end data. list. ]) AT_CHECK([pspp -O format=csv mxwarns.pspp], [0], [warning: MXWARNS set to zero. No further warnings will be given even when potentially problematic situations are encountered. Table: Data List x,y,z 1.00,2.00,3.00 3.00,. ,3.00 5.00,. ,3.00 . ,8.00,4.00 9.00,9.00,4.00 3.00,. ,4.00 . ,. ,4.00 ]) AT_CLEANUP AT_BANNER([PRESERVE and RESTORE]) AT_SETUP([PRESERVE of SET FORMAT]) AT_DATA([set.pspp], [dnl SHOW FORMAT. PRESERVE. SET FORMAT F10.0. SHOW FORMAT RESTORE. SHOW FORMAT. ]) AT_CHECK([pspp -O format=csv set.pspp], [0], [dnl set.pspp:1: note: SHOW: FORMAT is F8.2. set.pspp:5: note: SHOW: FORMAT is F10.0. set.pspp:6: note: SHOW: FORMAT is F8.2. ]) AT_CLEANUP pspp-1.0.1/tests/language/utilities/cd.at0000644000175000017500000000177613137223525015306 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([CD]) AT_SETUP([CD]) mkdir subdir AT_DATA([cd.sps], [dnl cd 'subdir'. host command=[['pwd > mydir']]. ]) AT_CHECK([pspp -O format=csv cd.sps]) AT_CAPTURE_FILE([subdir/mydir]) AT_CHECK([sed 's,.*/,,' subdir/mydir], [0], [subdir ]) AT_CLEANUP pspp-1.0.1/tests/language/utilities/title.at0000644000175000017500000000672413137223525016037 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([TITLE and related commands]) AT_SETUP([FILE LABEL and (ADD) DOCUMENT]) AT_DATA([file-label.sps], [dnl /* Set up a dummy active dataset in memory. data list /X 1 Y 2. begin data. 16 27 38 49 50 end data. /* Add value labels for some further testing of value labels. value labels x y 1 'first label' 2 'second label' 3 'third label'. add value labels x 1 'first label mark two'. /* Add a file label and a few documents. file label This is a test file label. document First line of a document Second line of a document The last line should end with a period: . /* Display the documents. display documents. display file label. ADD DOCUMENT 'Line one' 'Line two'. /* Save the active dataset then get it and display the documents again. save /OUTFILE='foo.save'. get /FILE='foo.save'. display documents. display file label. /* There is an interesting interaction that occurs if the 'execute' /* command below. What happens is that an error message is output /* at the next 'save' command that 'foo.save' is already open for /* input. This is because the 'get' hasn't been executed yet and /* therefore PSPP would be reading from and writing to the same /* file at once, which is obviously a Bad Thing. But 'execute' /* here clears up that potential problem. execute. /* Add another (shorter) document and try again. document There should be another document now. display documents. /* Save and get. save /OUTFILE='foo.save'. get /FILE='foo.save'. display documents. display file label. /* Done. ]) AT_CHECK([pspp -o pspp.csv file-label.sps]) dnl Filter out the dates/times AT_CHECK([[sed 's/(Entered [^)]*)/(Entered )/' pspp.csv]], [0], [dnl Table: Reading 1 record from INLINE. Variable,Record,Columns,Format X,1,1- 1,F1.0 Y,1,2- 2,F1.0 Documents in the active dataset: document First line of a document Second line of a document The last line should end with a period: . (Entered ) File label: This is a test file label Documents in the active dataset: document First line of a document Second line of a document The last line should end with a period: . (Entered ) Line one Line two (Entered ) File label: This is a test file label Documents in the active dataset: document First line of a document Second line of a document The last line should end with a period: . (Entered ) Line one Line two (Entered ) document There should be another document now. (Entered ) Documents in the active dataset: document First line of a document Second line of a document The last line should end with a period: . (Entered ) Line one Line two (Entered ) document There should be another document now. (Entered ) File label: This is a test file label ]) AT_CLEANUP pspp-1.0.1/tests/language/utilities/show.at0000644000175000017500000000224513137223525015670 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([SHOW]) AT_SETUP([SHOW N]) AT_DATA([show.sps], [dnl DATA LIST LIST NOTABLE /x. BEGIN DATA. 1 2 3 END DATA. SHOW N. ]) AT_CHECK([pspp -O format=csv show.sps], [0], [dnl show.sps:8: note: SHOW: N is 3. ]) AT_CLEANUP AT_SETUP([SHOW N empty]) AT_DATA([shown-empty.sps], [dnl SHOW N. ]) AT_CHECK([pspp -O format=csv shown-empty.sps], [0], [dnl shown-empty.sps:1: note: SHOW: N is Unknown. ]) AT_CLEANUP pspp-1.0.1/tests/ui/0000755000175000017500000000000013150620333011247 500000000000000pspp-1.0.1/tests/ui/syntax-gen.at0000644000175000017500000000257713137223525013634 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([SYNTAX GENERATOR]) AT_SETUP([Syntax Generation - printf like]) AT_CHECK([$abs_top_builddir/tests/ui/syntax-gen-test],[0],[dnl A simple string: Hello worldEND A syntax string: "Hello world"END A syntax string containing ": 'here"is the quote'END A syntax string containing non-printables: X'41204374726C4C0C63686172'END An integer: 98765END A floating point number: 3.142END A floating point number with default precision: 1.234000END A floating point number with given precision: 1.23399999999999998579END A literal % and finally a "concatination" of 6 different 20.309000 examples 23.09 of 100% conversions. ]) AT_CLEANUP pspp-1.0.1/tests/ui/syntax-gen-test.c0000644000175000017500000000342313137223525014416 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "ui/syntax-gen.h" #include static void test_runner (const char *format, ...) { struct string syntax; va_list args; va_start (args, format); ds_init_empty (&syntax); syntax_gen_pspp_valist (&syntax, format, args); va_end (args); puts (ds_cstr (&syntax)); ds_destroy (&syntax); } int main (void) { test_runner ("A simple string: %ssEND", "Hello world"); test_runner ("A syntax string: %sqEND", "Hello world"); test_runner ("A syntax string containing \": %sqEND", "here\"is the quote"); test_runner ("A syntax string containing non-printables: %sqEND", "A CtrlL char"); test_runner ("An integer: %dEND", 98765); test_runner ("A floating point number: %gEND", 3.142); test_runner ("A floating point number with default precision: %fEND", 1.234); test_runner ("A floating point number with given precision: %.20fEND", 1.234); test_runner ("A literal %%"); test_runner ("and %ss a %sq of %d different %f examples %g of 100%% conversions.", "finally", "concatination", 6, 20.309, 23.09); return 0; } pspp-1.0.1/tests/ui/terminal/0000755000175000017500000000000013150620333013062 500000000000000pspp-1.0.1/tests/ui/terminal/main.at0000644000175000017500000000404413137223525014265 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([PSPP terminal UI]) AT_SETUP([nonexistent syntax file crash]) AT_CHECK([pspp nonexistent], [1], [error: Opening `nonexistent': No such file or directory. ]) AT_CLEANUP AT_SETUP([SIGTERM yields clean shutdown]) AT_DATA([main.sps], [dnl INPUT PROGRAM. COMPUTE x = x + 1. DO IF x = 10000. END CASE. ELSE IF x < 0. END FILE. END IF. END INPUT PROGRAM. EXECUTE. ]) AT_CHECK([pspp main.sps & sleep 1; kill $!; wait $!], [143], [], [ignore]) AT_CLEANUP AT_SETUP([SIGSEGV yields error report]) AT_CHECK([[echo 'host command=["kill -SEGV $PPID"].' | pspp -O format=csv]], [139], [], [stderr]) cat > expout <. dnl AT_BANNER([output -- tables]) AT_SETUP([OUTPUT precision]) AT_DATA([prec.sps], [[ data list notable list /A * B *. begin data. 2.0 3.0 1.0 2.0 2.0 4.5 2.0 4.5 3.0 6.0 end data. OUTPUT MODIFY /SELECT TABLES /TABLECELLS SELECT = [ SIGNIFICANCE ] FORMAT = F.3. t-test /PAIRS a with b (PAIRED). OUTPUT MODIFY /SELECT TABLES /TABLECELLS SELECT = [ SIGNIFICANCE ] FORMAT = F12.5. t-test /PAIRS a with b (PAIRED). ]]) AT_CHECK([pspp -O format=csv prec.sps], [0], [dnl Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,A,2.00,5,.71,.32 ,B,4.00,5,1.54,.69 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,A & B,5,.92,.028 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.009 Table: Paired Sample Statistics ,,Mean,N,Std. Deviation,S.E. Mean Pair 1,A,2.00,5,.71,.32 ,B,4.00,5,1.54,.69 Table: Paired Samples Correlations ,,N,Correlation,Sig. Pair 1,A & B,5,.92,.02801 Table: Paired Samples Test ,,Paired Differences,,,,,,, ,,,,,95% Confidence Interval of the Difference,,,, ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed) Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.00877 ]) AT_CLEANUP AT_SETUP([OUTPUT crash]) AT_DATA([prec.sps], [[ data list notable list /A * B *. begin data. 2.0 3.0 1.0 2.0 end data. OUTPUT MODIFY /SELECT TABLES /TABLECELLS SELECT = [ SIGNIFICANCE ] "FORMAT = F/1. t-test /PAIRS a with b (PAIRED). ]]) AT_CHECK([pspp -O format=csv prec.sps], [1], [ignore]) AT_CLEANUPpspp-1.0.1/tests/output/charts.at0000644000175000017500000001260013137223525013732 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([CHARTS Rudimentary run tests]) dnl Check that the charts work dnl Currently, "work" means that the commands which dnl should generate them, run without crashing. dnl Better tests will come later (hopefully) AT_SETUP([Examine]) AT_DATA([charts.sps],[ input program. loop #i = 1 to 1000. compute x = rv.normal (56, 3) + rv.uniform (1, 1). compute y = rv.normal (6, 2) + rv.uniform (1, 2). compute A = rv.uniform (-1, 1). compute A = (A > 0). end case. end loop. end file. end input program. examine x y by a /plot = histogram, npplot spreadlevel(1) . examine x y by a /compare = groups /plot = boxplot . examine x y by a /compare = variables /plot = boxplot . ]) AT_CHECK([pspp -o pspp.txt charts.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([Roc]) AT_DATA([roc.sps],[ data list list /fred * group * w *. begin data. 99 0 1000 99 1 3 97 0 908 97 1 2 95 0 904 96 1 7 94 1 9 93 0 823 93 1 12 90 0 723 90 1 42 84 0 523 84 1 98 73 0 500 75 1 180 63 0 520 69 1 320 60 0 510 60 1 418 50 0 488 54 1 432 46 0 428 43 1 528 36 0 324 36 1 612 26 0 294 28 1 682 20 0 119 20 1 719 10 0 97 10 1 809 end data. weight by w. compute bert = fred + (group < 0.5) * 45. compute charlie = fred + (group > 0.5) * 15. ROC /fred bert charlie by group (0) /plot = curve (reference). ]) AT_CHECK([pspp -o pspp.txt roc.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([Scree]) AT_DATA([scree.sps],[ input program. vector vec(10). loop #i = 1 to 100. loop #v = 1 to 3. compute vec(#v) = rv.normal (0, 45). end loop. loop #v = 4 to 10. compute vec(#v) = vec (#v - 3) + rv.normal (0, 30). end loop. end case. end loop. end file. end input program. factor /variables = all /print initial /plot = eigen. ]) AT_CHECK([pspp -o pspp.txt scree.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([Histogram]) AT_DATA([histogram.sps],[ * This test is designed to "torture" the code which generates histograms. It is no-crash test. However the code is rich in assertions, so any problems we hope will be caught there. input program. loop #i = 1 to 1000. compute pos = rv.normal (56, 3) + rv.uniform (1, 1). compute neg = rv.normal (-86, 2) + rv.uniform (1, 1). compute pn = rv.normal (0, 2) + rv.uniform (1, 2). compute A = rv.uniform (-1, 1). compute A = (A > 0). end case. end loop. end file. end input program. examine pos neg pn by a /plot = histogram . frequencies pos neg pn /format=notable /histogram=normal. ]) dnl The --testing-mode flag is important!! AT_CHECK([pspp --testing-mode -o pspp.txt histogram.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([FREQUENCIES charts]) AT_DATA([xxx.sps],[ DATA LIST LIST /nationality (A10) religion (A20) gender (A8). BEGIN DATA. Australian Sikh Male Australian Sikh Male Australian Sikh Male Australian Sikh Male British Zoroastrian Female British Buddist Female British Buddist Female British Zoroastrian Female German Muslim Male German Christian Male German Christian Female German Christian Male German Zoroastrian Female German Sikh Female German Muslim Female German Pastafarian Female German "Jedi Knight" Female Belgian Sikh Male French Muslim Male French Muslim Male French Christian Male END DATA. FREQUENCIES /VARIABLES=religion nationality /BARCHART /PIECHART. ]) AT_CHECK([pspp -o pspp.txt xxx.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([CROSSTABS charts]) AT_DATA([xxx.sps],[ DATA LIST LIST /nationality (A10) religion (A20) gender (A8). BEGIN DATA. Australian Sikh Male Australian Sikh Male Australian Sikh Male Australian Sikh Male British Zoroastrian Female British Buddist Female British Buddist Female British Zoroastrian Female German Muslim Male German Christian Male German Christian Female German Christian Male German Zoroastrian Female German Sikh Female German Muslim Female German Pastafarian Female German "Jedi Knight" Female Belgian Sikh Male French Muslim Male French Muslim Male French Christian Male END DATA. CROSSTABS /tables = nationality by religion by gender /tables = nationality by religion /tables = religion by gender /tables = nationality by religion by gender /barchart. ]) AT_CHECK([pspp -o pspp.txt xxx.sps], [0], [ignore]) AT_CLEANUP AT_SETUP([BOXPLOT Empty]) AT_DATA([bp.sps],[ DATA LIST LIST /X * Y * . BEGIN DATA 1 2 2 2 3 END DATA EXAMINE /VARIABLES = Y /PLOT = BOXPLOT. ]) AT_CHECK([pspp -o pspp.txt bp.sps], [0], [ignore]) AT_CLEANUP pspp-1.0.1/tests/output/paper-size.at0000644000175000017500000000326513137223525014534 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([output -- paper sizes]) AT_SETUP([letter default paper size]) AT_DATA([paper-size.sps], [dnl debug paper size ''. ]) AT_CHECK([PAPERSIZE=letter pspp --testing-mode -O format=csv paper-size.sps], [0], ["" => 8.5 x 11.0 in, 216 x 279 mm ]) AT_CLEANUP AT_SETUP([a4 default paper size]) AT_DATA([paper-size.sps], [dnl debug paper size ''. ]) AT_CHECK([PAPERSIZE=a4 pspp --testing-mode -O format=csv paper-size.sps], [0], ["" => 8.3 x 11.7 in, 210 x 297 mm ]) AT_CLEANUP AT_SETUP([specific paper sizes]) AT_KEYWORDS([paper size]) AT_DATA([paper-size.sps], [dnl debug paper size 'a4'. debug paper size 'letter'. debug paper size '10x14in'. debug paper size '210x297mm'. ]) AT_CHECK([PAPERSIZE=a4 pspp --testing-mode -O format=csv paper-size.sps], [0], [dnl "a4" => 8.3 x 11.7 in, 210 x 297 mm "letter" => 8.5 x 11.0 in, 216 x 279 mm "10x14in" => 10.0 x 14.0 in, 254 x 356 mm "210x297mm" => 8.3 x 11.7 in, 210 x 297 mm ]) AT_CLEANUP pspp-1.0.1/tests/output/output.at0000644000175000017500000000262413137223525014013 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([output drivers]) m4_define([OUTPUT_UNWRITABLE_DIR], [AT_SETUP([output $1 to unwritable directory]) mkdir unwritable chmod u-w unwritable AT_SKIP_IF([: > unwritable/test]) AT_DATA([unwritable.sps], [dnl data list /x 1. begin data. 1 2 3 end data. frequencies x/histogram. ]) dnl PSPP will fail to create the output file. Thus, the exit status is dnl non zero AT_CHECK([cd unwritable && pspp -o pspp.$1 ../unwritable.sps], [1], [ignore], [ignore]) AT_CLEANUP]) OUTPUT_UNWRITABLE_DIR([csv]) OUTPUT_UNWRITABLE_DIR([html]) OUTPUT_UNWRITABLE_DIR([odt]) OUTPUT_UNWRITABLE_DIR([pdf]) OUTPUT_UNWRITABLE_DIR([txt]) pspp-1.0.1/tests/output/render-test.c0000644000175000017500000003346313106474125014532 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/string-map.h" #include "output/ascii.h" #include "output/driver.h" #include "output/tab.h" #include "output/table-item.h" #include "gl/error.h" #include "gl/progname.h" #include "gl/xalloc.h" #include "gl/xvasprintf.h" /* --transpose: Transpose the table before outputting? */ static int transpose; /* --emphasis: ASCII driver emphasis option. */ static char *emphasis; /* --box: ASCII driver box option. */ static char *box; /* --draw-mode: special ASCII driver test mode. */ static int draw_mode; /* --no-txt: Whether to render to .txt. */ static int render_txt = true; /* --no-stdout: Whether to render to stdout. */ static int render_stdout = true; /* --pdf: Also render PDF output. */ static int render_pdf; /* --csv: Also render CSV output. */ static int render_csv; /* ASCII driver, for ASCII driver test mode. */ static struct output_driver *ascii_driver; /* -o, --output: Base name for output files. */ static const char *output_base = "render"; static const char *parse_options (int argc, char **argv); static void usage (void) NO_RETURN; static struct table *read_table (FILE *, struct table **tables, size_t n_tables); static void draw (FILE *); int main (int argc, char **argv) { const char *input_file_name; FILE *input; set_program_name (argv[0]); output_engine_push (); input_file_name = parse_options (argc, argv); if (!strcmp (input_file_name, "-")) input = stdin; else { input = fopen (input_file_name, "r"); if (input == NULL) error (1, errno, "%s: open failed", input_file_name); } if (!draw_mode) { struct table **tables = NULL; size_t allocated_tables = 0; size_t n_tables = 0; struct table *table; for (;;) { int ch; if (n_tables >= allocated_tables) tables = x2nrealloc (tables, &allocated_tables, sizeof *tables); tables[n_tables] = read_table (input, tables, n_tables); n_tables++; ch = getc (input); if (ch == EOF) break; ungetc (ch, input); } table = tables[n_tables - 1]; if (transpose) table = table_transpose (table); table_item_submit (table_item_create (table, NULL, NULL)); free (tables); } else draw (input); if (input != stdin) fclose (input); output_engine_pop (); return 0; } static void configure_drivers (int width, int length, int min_break) { struct string_map options, tmp; struct output_driver *driver; string_map_init (&options); string_map_insert (&options, "format", "txt"); string_map_insert (&options, "output-file", "-"); string_map_insert_nocopy (&options, xstrdup ("width"), xasprintf ("%d", width)); string_map_insert_nocopy (&options, xstrdup ("length"), xasprintf ("%d", length)); if (min_break >= 0) { string_map_insert_nocopy (&options, xstrdup ("min-hbreak"), xasprintf ("%d", min_break)); string_map_insert_nocopy (&options, xstrdup ("min-vbreak"), xasprintf ("%d", min_break)); } if (emphasis != NULL) string_map_insert (&options, "emphasis", emphasis); if (box != NULL) string_map_insert (&options, "box", box); /* Render to stdout. */ if (render_stdout) { string_map_clone (&tmp, &options); ascii_driver = driver = output_driver_create (&tmp); if (driver == NULL) exit (EXIT_FAILURE); output_driver_register (driver); string_map_destroy (&tmp); } if (draw_mode) { string_map_destroy (&options); return; } /* Render to .txt. */ if (render_txt) { string_map_clear (&options); string_map_insert_nocopy (&options, xstrdup ("output-file"), xasprintf ("%s.txt", output_base)); driver = output_driver_create (&options); if (driver == NULL) exit (EXIT_FAILURE); output_driver_register (driver); } #ifdef HAVE_CAIRO /* Render to .pdf. */ if (render_pdf) { string_map_clear (&options); string_map_insert_nocopy (&options, xstrdup ("output-file"), xasprintf ("%s.pdf", output_base)); string_map_insert (&options, "top-margin", "0"); string_map_insert (&options, "bottom-margin", "0"); string_map_insert (&options, "left-margin", "0"); string_map_insert (&options, "right-margin", "0"); string_map_insert_nocopy (&options, xstrdup ("paper-size"), xasprintf ("%dx%dpt", width * 5, length * 8)); if (min_break >= 0) { string_map_insert_nocopy (&options, xstrdup ("min-hbreak"), xasprintf ("%d", min_break * 5)); string_map_insert_nocopy (&options, xstrdup ("min-vbreak"), xasprintf ("%d", min_break * 8)); } driver = output_driver_create (&options); if (driver == NULL) exit (EXIT_FAILURE); output_driver_register (driver); } #endif /* Render to .csv. */ if (render_csv) { string_map_clear (&options); string_map_insert_nocopy (&options, xstrdup ("output-file"), xasprintf ("%s.csv", output_base)); driver = output_driver_create (&options); if (driver == NULL) exit (EXIT_FAILURE); output_driver_register (driver); } /* Render to .odt. */ string_map_replace_nocopy (&options, xstrdup ("output-file"), xasprintf ("%s.odt", output_base)); driver = output_driver_create (&options); if (driver == NULL) exit (EXIT_FAILURE); output_driver_register (driver); string_map_destroy (&options); } static const char * parse_options (int argc, char **argv) { int width = 79; int length = 66; int min_break = -1; for (;;) { enum { OPT_WIDTH = UCHAR_MAX + 1, OPT_LENGTH, OPT_MIN_BREAK, OPT_EMPHASIS, OPT_BOX, OPT_HELP }; static const struct option options[] = { {"width", required_argument, NULL, OPT_WIDTH}, {"length", required_argument, NULL, OPT_LENGTH}, {"min-break", required_argument, NULL, OPT_MIN_BREAK}, {"transpose", no_argument, &transpose, 1}, {"emphasis", required_argument, NULL, OPT_EMPHASIS}, {"box", required_argument, NULL, OPT_BOX}, {"draw-mode", no_argument, &draw_mode, 1}, {"no-txt", no_argument, &render_txt, 0}, {"no-stdout", no_argument, &render_stdout, 0}, {"pdf", no_argument, &render_pdf, 1}, {"csv", no_argument, &render_csv, 1}, {"output", required_argument, NULL, 'o'}, {"help", no_argument, NULL, OPT_HELP}, {NULL, 0, NULL, 0}, }; int c = getopt_long (argc, argv, "o:", options, NULL); if (c == -1) break; switch (c) { case OPT_WIDTH: width = atoi (optarg); break; case OPT_LENGTH: length = atoi (optarg); break; case OPT_MIN_BREAK: min_break = atoi (optarg); break; case OPT_EMPHASIS: emphasis = optarg; break; case OPT_BOX: box = optarg; break; case 'o': output_base = optarg; break; case OPT_HELP: usage (); case 0: break; case '?': exit(EXIT_FAILURE); break; default: NOT_REACHED (); } } configure_drivers (width, length, min_break); if (optind + 1 != argc) error (1, 0, "exactly one non-option argument required; " "use --help for help"); return argv[optind]; } static void usage (void) { printf ("%s, to test rendering of PSPP tables\n" "usage: %s [OPTIONS] INPUT\n" "\nOptions:\n" " --width=WIDTH set page width in characters\n" " --length=LINE set page length in lines\n", program_name, program_name); exit (EXIT_SUCCESS); } static void replace_newlines (char *p) { char *q; for (q = p; *p != '\0'; ) if (*p == '\\' && p[1] == 'n') { *q++ = '\n'; p += 2; } else *q++ = *p++; *q = '\0'; } static struct table * read_table (FILE *stream, struct table **tables, size_t n_tables) { struct tab_table *tab; char buffer[1024]; int input[6]; int n_input = 0; int nr, nc, hl, hr, ht, hb; int r, c; if (fgets (buffer, sizeof buffer, stream) == NULL || (n_input = sscanf (buffer, "%d %d %d %d %d %d", &input[0], &input[1], &input[2], &input[3], &input[4], &input[5])) < 2) error (1, 0, "syntax error reading row and column count"); nr = input[0]; nc = input[1]; hl = n_input >= 3 ? input[2] : 0; hr = n_input >= 4 ? input[3] : 0; ht = n_input >= 5 ? input[4] : 0; hb = n_input >= 6 ? input[5] : 0; tab = tab_create (nc, nr); tab_headers (tab, hl, hr, ht, hb); for (r = 0; r < nr; r++) for (c = 0; c < nc; c++) if (tab_cell_is_empty (tab, c, r)) { unsigned int opt; char *new_line; unsigned int i; char *text; int rs, cs; if (fgets (buffer, sizeof buffer, stream) == NULL) error (1, 0, "unexpected end of input reading row %d, column %d", r, c); new_line = strchr (buffer, '\n'); if (new_line != NULL) *new_line = '\0'; text = buffer; if (sscanf (text, "%d*%d", &rs, &cs) == 2) { while (*text != ' ' && *text != '\0') text++; if (*text == ' ') text++; } else { rs = 1; cs = 1; } opt = 0; while (*text && strchr ("<>^,@()|", *text)) switch (*text++) { case '<': tab_vline (tab, TAL_1, c, r, r + rs - 1); break; case '>': tab_vline (tab, TAL_1, c + cs, r, r + rs - 1); break; case '^': tab_hline (tab, TAL_1, c, c + cs - 1, r); break; case ',': tab_hline (tab, TAL_1, c, c + cs - 1, r + rs); break; case '@': tab_box (tab, TAL_1, TAL_1, -1, -1, c, r, c + cs - 1, r + rs - 1); break; case '(': opt &= ~TAB_ALIGNMENT; opt |= TAB_LEFT; break; case ')': opt &= ~TAB_ALIGNMENT; opt |= TAB_RIGHT; break; case '|': opt &= ~TAB_ALIGNMENT; opt |= TAB_CENTER; break; default: NOT_REACHED (); } replace_newlines (text); if (sscanf (text, "{%u}", &i) == 1) { struct table *table; if (i >= n_tables) error (1, 0, "bad table number %u", i); table = table_ref (tables[i]); text = strchr (text, '}') + 1; while (*text) switch (*text++) { case 's': table = table_stomp (table); break; case 't': table = table_transpose (table); break; default: error (1, 0, "unexpected subtable modifier \"%c\"", *text); } tab_subtable (tab, c, r, c + cs - 1, r + rs - 1, opt, table_item_create (table, NULL, NULL)); } else { char *pos = text; char *content; int i; for (i = 0; (content = strsep (&pos, "#")) != NULL; i++) if (!i) tab_joint_text (tab, c, r, c + cs - 1, r + rs - 1, opt, content); else tab_footnote (tab, c, r, "%s", content); } } return &tab->table; } static void draw (FILE *stream) { char buffer[1024]; int line = 0; while (fgets (buffer, sizeof buffer, stream)) { char text[sizeof buffer]; int length; int emph; int x, y; line++; if (strchr ("#\r\n", buffer[0])) continue; if (sscanf (buffer, "%d %d %d %[^\n]", &x, &y, &emph, text) == 4) ascii_test_write (ascii_driver, text, x, y, emph ? TAB_EMPH : 0); else if (sscanf (buffer, "set-length %d %d", &y, &length) == 2) ascii_test_set_length (ascii_driver, y, length); else error (1, 0, "line %d has invalid format", line); } } pspp-1.0.1/tests/output/render.at0000644000175000017500000016621613137223525013742 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl # +-+---+-+-+-+ # |a|bcd|e|f|i| # +-+-+-+-+g+-+ # |j|m|nop|h|q| # |k+-+-+-+-+r| # |l|t|w|xyz|s| # +-+u+-+-+-+-+ # |A|v|B|E|FGH| # +-+-+C+-+-+-+ # |IJK|D|L|O|P| # +-+-+-+M+-+-+ # |Q|RST|N|U|V| # +-+---+-+-+-+ m4_define([WEAVE_6X6], [6 6 $1 @a 1*2 @bcd @e 2*1 @f\ng\nh @i 2*1 @j\nk\nl @m 1*2 @nop 2*1 @q\nr\ns 2*1 @t\nu\nv @w 1*2 @xyz @A 2*1 @B\nC\nD @E 1*2 @FGH 1*2 @IJK 2*1 @L\nM\nN @O @P @Q 1*2 @RST @U @V ]) # +-+-+-+-+-+-+-+-+ # |a|b|c|d|e|f|g|h| # +-+-+-+-+-+-+-+-+ # |i|jkl|m|nop|q|t| # +-+-+-+-+-+-+r+-+ # |u|v|wxy|z|A|s|D| # +-+-+-+-+-+B+-+-+ # |E|F|I|JKL|C|M|P| # +-+G+-+---+-+N+-+ # |Q|H|R|UVW|X|O|Y| # +-+-+S+-+-+-+-+-+ # |Z|0|T|3|456|7|8| # +-+1+-+-+-+-+-+-+ # |9|2|abc|d|efg|h| # +-+-+-+-+-+-+-+-+ # |i|j|k|l|m|n|o|p| # +-+-+-+-+-+-+-+-+ m4_define([WEAVE_8X8], [8 8 $1 @a @b @c @d @e @f @g @h @i 1*2 @jkl @m 1*2 @nop 2*1 @q\nr\ns @t @u @v 1*2 @wxy @z 2*1 @A\nB\nC @D @E 2*1 @F\nG\nH @I 1*2 @JKL 2*1 @M\nN\nO @P @Q 2*1 @R\nS\nT 1*2 @UVW @X @Y @Z 2*1 @0\n1\n2 @3 1*2 @456 @7 @8 @9 1*2 @abc @d 1*2 @efg @h @i @j @k @l @m @n @o @p ]) # This input is something of a counterexample, in that it could render # compactly as this if the algorithm for choosing cell widths and # heights were smarter: # # +---+---+---+-+-+ # |abc|jkl|mno|v|x| # |def+---+pqr+-+-+ # |ghi|yzA|stu|HIJ| # +-+-+BCD+-+-+KLM| # |Q|V|EFG|W|Z|NOP| # |R+-+-+-+X+-+-+-+ # |S|012|9|Y|abc|j| # |T|345+-+-+def|k| # |U|678|opq|ghi|l| # +-+-+-+rst+---+m| # |xyz|G|uvw|JKL|n| # |ABC|H+---+-+-+-+ # |DEF|I|MNOPQ|123| # +---+-+RSTUV|456| # |abcde|WXYZ0|789| # +-----+-----+---+ m4_define([WEAVE_8X8_2], [8 8 $1 2*2 @abc\ndef\nghi 1*2 @jkl 2*2 @mno\npqr\nstu 1*2 @vwx 2*2 @yzA\nBCD\nEFG 2*2 @HIJ\nKLM\nNOP 3*1 @Q\nR\nS\nT\nU @V 2*1 @W\nX\nY @Z 2*2 @012\n345\n678 @9 2*2 @abc\ndef\nghi 3*1 @j\nk\nl\nm\nn 2*2 @opq\nrst\nuvw 2*2 @xyz\nABC\nDEF 2*1 @G\nH\nI 1*2 @JKL 2*3 @MNOPQ\nRSTUV\nWXYZ0 2*2 @123\n456\n789 1*3 @abcde ]) AT_BANNER([output rendering -- no page breaking]) AT_SETUP([single cell]) AT_KEYWORDS([render rendering]) AT_DATA([input], [1 1 abc ]) AT_CHECK([render-test input], [0], [abc ]) AT_CLEANUP AT_SETUP([nested single cell]) AT_KEYWORDS([render rendering]) AT_DATA([input], [1 1 abc 1 1 {0} ]) AT_CHECK([render-test input], [0], [abc ]) AT_CLEANUP AT_SETUP([single cell with border]) AT_KEYWORDS([render rendering]) AT_DATA([input], [1 1 @abc ]) AT_CHECK([render-test input], [0], [dnl +---+ |abc| +---+ ]) AT_CLEANUP AT_SETUP([nested single cell with border]) AT_KEYWORDS([render rendering]) AT_DATA([input], [1 1 @abc 1 1 @{0} ]) AT_CHECK([render-test input], [0], [dnl +-----+ |+---+| ||abc|| |+---+| +-----+ ]) AT_CLEANUP AT_SETUP([joined columns]) AT_KEYWORDS([render rendering]) AT_DATA([input], [2 2 1*2 @abcdefg @hij @klm ]) AT_CHECK([render-test input], [0], [dnl +-------+ |abcdefg| +---+---+ |hij|klm| +---+---+ ]) AT_CLEANUP AT_SETUP([3x3, joined rows and columns]) AT_KEYWORDS([render rendering]) AT_DATA([input], [3 3 1*2 @abc 2*1 @d\ne\nf 2*1 @g\nh\ni @j 1*2 @klm ]) AT_CHECK([render-test input], [0], [dnl +---+-+ |abc|d| +-+-+e| |g|j|f| |h+-+-+ |i|klm| +-+---+ ]) AT_CLEANUP AT_SETUP([joined rows and columns (with footnotes)]) AT_KEYWORDS([render rendering footnote]) AT_DATA([input], [3 3 1*2 @abc#Approximation. 2*1 @d\ne\nf#This is a very long footnote that will have to wrap from one line to the next. Let's see if the rendering engine does it acceptably. 2*1 @g\nh\ni#One#Two#Three @j 1*2 @klm ]) AT_CHECK([render-test --csv input], [0], [[+------------+----+ | abc[a]| d| +----------+-+ e| | g|j|f[b]| | h+-+----+ |i[c][d][e]| klm| +----------+------+ [a] Approximation. [b] This is a very long footnote that will have to wrap from one line to the next. Let's see if the rendering engine does it acceptably. [c] One [d] Two [e] Three ]]) AT_CHECK([cat render.csv], [0], [[abc[a],,"d e f[b]" "g h i[c][d][e]",j, ,klm, Footnotes: a,Approximation. b,This is a very long footnote that will have to wrap from one line to the next. Let's see if the rendering engine does it acceptably. c,One d,Two e,Three ]]) AT_CLEANUP AT_SETUP([6x6, joined rows and columns]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_6X6]) AT_CHECK([render-test input], [0], [dnl +-+---+-+-+-+ |a|bcd|e|f|i| +-+-+-+-+g+-+ |j|m|nop|h|q| |k+-+-+-+-+r| |l|t|w|xyz|s| +-+u+-+-+-+-+ |A|v|B|E|FGH| +-+-+C+-+-+-+ |IJK|D|L|O|P| +-+-+-+M+-+-+ |Q|RST|N|U|V| +-+---+-+-+-+ ]) AT_CLEANUP AT_SETUP([3 rows with many joined cells]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [3 19 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x ])@1 m4_for([x], [2], [19], [1], [1*2 @x ])@20 ]) AT_CHECK([render-test input], [0], [dnl a b c d e f g h i j k l m n o p q r s +-+---+---+---+---+---+---+---+---+----+ |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+ | 11| 12| 13| 14| 15| 16| 17| 18| 19|20| +---+---+---+---+---+---+---+---+---+--+ ]) AT_CLEANUP AT_SETUP([3 columns with many joined cells]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [3 19 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x ])@1 m4_for([x], [2], [19], [1], [1*2 @x\nab\ncd ])@20 ]) AT_CHECK([render-test --transpose input], [0], [dnl +--+--+ a| 1|11| +--+ab| b| 2|cd| |ab+--+ c|cd|12| +--+ab| d| 3|cd| |ab+--+ e|cd|13| +--+ab| f| 4|cd| |ab+--+ g|cd|14| +--+ab| h| 5|cd| |ab+--+ i|cd|15| +--+ab| j| 6|cd| |ab+--+ k|cd|16| +--+ab| l| 7|cd| |ab+--+ m|cd|17| +--+ab| n| 8|cd| |ab+--+ o|cd|18| +--+ab| p| 9|cd| |ab+--+ q|cd|19| +--+ab| r|10|cd| |ab+--+ s|cd|20| +--+--+ ]) AT_CLEANUP AT_SETUP([joined rows]) AT_KEYWORDS([render rendering]) AT_DATA([input], [2 2 2*1 @ab\ncd\nef @hij @klm ]) AT_CHECK([render-test input], [0], [dnl +--+---+ |ab|hij| |cd+---+ |ef|klm| +--+---+ ]) AT_CLEANUP AT_SETUP([nested joined rows]) AT_KEYWORDS([render rendering]) AT_DATA([input], [2 2 2*1 @ab\ncd\nef @hij @klm 1 1 @{0} ]) AT_CHECK([render-test input], [0], [dnl +--------+ |+--+---+| ||ab|hij|| ||cd+---+| ||ef|klm|| |+--+---+| +--------+ ]) AT_CLEANUP dnl This checks for bug #31346, a segmentation fault that surfaced dnl when two or more rows had no unspanned cells and no rules. AT_SETUP([joined rows only, no rules]) AT_KEYWORDS([render rendering]) AT_DATA([input], [2 2 2*1 ab\ncd\nef 2*1 hij\nklm\nnop ]) AT_CHECK([render-test input], [0], [dnl ab hij cd klm ef nop ]) AT_CLEANUP AT_SETUP([joined columns only, no rules]) AT_KEYWORDS([render rendering]) AT_DATA([input], [2 2 1*2 abc\ndef 1*2 hij\nklm\nnop ]) AT_CHECK([render-test input], [0], [dnl abc def hij klm nop ]) AT_CLEANUP AT_SETUP([5 big narrow cells]) AT_KEYWORDS([render rendering]) AT_DATA([input], [1 5 @This cell has a lot of text but its minimum width is pretty narrow. @This cell also has a lot of text but its minimum width is pretty narrow. @A third cell with a lot of text but a pretty narrow minimum width. @A fourth cell with a lot of text but a pretty narrow minimum width. @A fifth cell with a lot of text but a pretty narrow minimum width. ]) AT_CHECK([render-test input], [0], [dnl +---------------+---------------+--------------+---------------+--------------+ |This cell has a| This cell also| A third cell| A fourth cell| A fifth cell| |lot of text but| has a lot of| with a lot of| with a lot of| with a lot of| | its minimum| text but its| text but a| text but a| text but a| |width is pretty| minimum width| pretty narrow| pretty narrow| pretty narrow| | narrow.| is pretty|minimum width.| minimum width.|minimum width.| | | narrow.| | | | +---------------+---------------+--------------+---------------+--------------+ ]) AT_CLEANUP AT_SETUP([9 big narrow cells]) AT_KEYWORDS([render rendering]) AT_DATA([input], [1 9 @This cell has a lot of text but its minimum width is pretty narrow. @This cell also has a lot of text but its minimum width is pretty narrow. @A third cell with a lot of text but a pretty narrow minimum width. @A fourth cell with a lot of text but a pretty narrow minimum width. @A fifth cell with a lot of text but a pretty narrow minimum width. @A sixth cell with a lot of text but a pretty narrow minimum width. @A seventh cell with a lot of text but a pretty narrow minimum width. @A eighth cell with a lot of text but a pretty narrow minimum width. @A ninth cell with a lot of text but a pretty narrow minimum width. ]) AT_CHECK([render-test input], [0], [dnl +--------+-------+--------+--------+-------+--------+--------+-------+--------+ | This| This| A third|A fourth|A fifth| A sixth| A| A| A ninth| |cell has| cell| cell| cell| cell| cell| seventh| eighth| cell| |a lot of| also| with a| with a| with a| with a| cell| cell| with a| |text but| has a| lot of| lot of| lot of| lot of| with a| with a| lot of| | its| lot of|text but|text but| text|text but| lot of| lot of|text but| | minimum| text|a pretty|a pretty| but a|a pretty|text but| text|a pretty| |width is|but its| narrow| narrow| pretty| narrow|a pretty| but a| narrow| | pretty|minimum| minimum| minimum| narrow| minimum| narrow| pretty| minimum| | narrow.| width| width.| width.|minimum| width.| minimum| narrow| width.| | | is| | | width.| | width.|minimum| | | | pretty| | | | | | width.| | | |narrow.| | | | | | | | +--------+-------+--------+--------+-------+--------+--------+-------+--------+ ]) AT_CLEANUP AT_SETUP([2 big cells with new-lines]) AT_KEYWORDS([render rendering]) AT_DATA([input], [1 2 @PSPP does not place many restrictions on ordering of commands. The main restriction is that variables must be defined before they are otherwise referenced. This section describes the details of command ordering, but most users will have no need to refer to them. PSPP possesses five internal states, called initial, INPUT PROGRAM, FILE TYPE, transformation, and procedure states. @PSPP includes special support\nfor unknown numeric data values.\nMissing observations are assigned\na special value, called the\n``system‑missing value''. This\n``value'' actually indicates the\nabsence of a value; it\nmeans that the actual\nvalue is unknown. ]) AT_CHECK([render-test input], [0], [dnl +----------------------------------------------------------+------------------+ | PSPP does not place many restrictions on ordering of| PSPP includes| | commands. The main restriction is that variables must be| special support| | defined before they are otherwise referenced. This| for unknown| | section describes the details of command ordering, but| numeric data| | most users will have no need to refer to them. PSPP| values.| | possesses five internal states, called initial, INPUT| Missing| | PROGRAM, FILE TYPE, transformation, and procedure states.| observations are| | | assigned| | | a special value,| | | called the| | | ``system‑missing| | | value''. This| | |``value'' actually| | | indicates the| | | absence of a| | | value; it| | | means that the| | | actual| | | value is unknown.| +----------------------------------------------------------+------------------+ ]) AT_CLEANUP AT_SETUP([8x8 with many 2x2 joins]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_8X8_2]) AT_CHECK([render-test input], [0],[dnl +---+---+----+----+ |abc|jkl| mno| vwx| |def| | pqr| | |ghi+---+ stu+----+ | |yzA| | HIJ| +-+-+BCD+-+--+ KLM| |Q|V|EFG|W| Z| NOP| |R| | |X| | | |S+-+-+-+Y+--+-+--+ |T|012|9| | abc| j| |U|345| | | def| k| | |678+-+-+ ghi| l| | | |opq| | m| +-+-+-+rst+----+ n| |xyz|G|uvw| JKL| | |ABC|H| | | | |DEF|I+---+--+-+--+ | | | MNOPQ| 123| +---+-+ RSTUV| 456| |abcde| WXYZ0| 789| | | | | +-----+------+----+ ]) AT_CLEANUP AT_SETUP([nested 8x8]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_8X8[]dnl 1 1 @{0} ]) AT_CHECK([render-test input], [0], [dnl +-----------------+ |+-+-+-+-+-+-+-+-+| ||a|b|c|d|e|f|g|h|| |+-+-+-+-+-+-+-+-+| ||i|jkl|m|nop|q|t|| |+-+-+-+-+-+-+r+-+| ||u|v|wxy|z|A|s|D|| |+-+-+-+-+-+B+-+-+| ||E|F|I|JKL|C|M|P|| |+-+G+-+---+-+N+-+| ||Q|H|R|UVW|X|O|Y|| |+-+-+S+-+-+-+-+-+| ||Z|0|T|3|456|7|8|| |+-+1+-+-+-+-+-+-+| ||9|2|abc|d|efg|h|| |+-+-+-+-+-+-+-+-+| ||i|j|k|l|m|n|o|p|| |+-+-+-+-+-+-+-+-+| +-----------------+ ]) AT_CLEANUP AT_SETUP([nested 8x8s and 6x6s]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_8X8[]WEAVE_6X6[]dnl 4 2 @{0} @{1} @{1} @|{1} @|{1} @({1} @({1} @{0} ]) AT_CHECK([render-test input], [0], [dnl +-----------------+-----------------+ |+-+-+-+-+-+-+-+-+| +-+---+-+-+-+| ||a|b|c|d|e|f|g|h|| |a|bcd|e|f|i|| |+-+-+-+-+-+-+-+-+| +-+-+-+-+g+-+| ||i|jkl|m|nop|q|t|| |j|m|nop|h|q|| |+-+-+-+-+-+-+r+-+| |k+-+-+-+-+r|| ||u|v|wxy|z|A|s|D|| |l|t|w|xyz|s|| |+-+-+-+-+-+B+-+-+| +-+u+-+-+-+-+| ||E|F|I|JKL|C|M|P|| |A|v|B|E|FGH|| |+-+G+-+---+-+N+-+| +-+-+C+-+-+-+| ||Q|H|R|UVW|X|O|Y|| |IJK|D|L|O|P|| |+-+-+S+-+-+-+-+-+| +-+-+-+M+-+-+| ||Z|0|T|3|456|7|8|| |Q|RST|N|U|V|| |+-+1+-+-+-+-+-+-+| +-+---+-+-+-+| ||9|2|abc|d|efg|h|| | |+-+-+-+-+-+-+-+-+| | ||i|j|k|l|m|n|o|p|| | |+-+-+-+-+-+-+-+-+| | +-----------------+-----------------+ | +-+---+-+-+-+| +-+---+-+-+-+ | | |a|bcd|e|f|i|| |a|bcd|e|f|i| | | +-+-+-+-+g+-+| +-+-+-+-+g+-+ | | |j|m|nop|h|q|| |j|m|nop|h|q| | | |k+-+-+-+-+r|| |k+-+-+-+-+r| | | |l|t|w|xyz|s|| |l|t|w|xyz|s| | | +-+u+-+-+-+-+| +-+u+-+-+-+-+ | | |A|v|B|E|FGH|| |A|v|B|E|FGH| | | +-+-+C+-+-+-+| +-+-+C+-+-+-+ | | |IJK|D|L|O|P|| |IJK|D|L|O|P| | | +-+-+-+M+-+-+| +-+-+-+M+-+-+ | | |Q|RST|N|U|V|| |Q|RST|N|U|V| | | +-+---+-+-+-+| +-+---+-+-+-+ | +-----------------+-----------------+ | +-+---+-+-+-+ |+-+---+-+-+-+ | | |a|bcd|e|f|i| ||a|bcd|e|f|i| | | +-+-+-+-+g+-+ |+-+-+-+-+g+-+ | | |j|m|nop|h|q| ||j|m|nop|h|q| | | |k+-+-+-+-+r| ||k+-+-+-+-+r| | | |l|t|w|xyz|s| ||l|t|w|xyz|s| | | +-+u+-+-+-+-+ |+-+u+-+-+-+-+ | | |A|v|B|E|FGH| ||A|v|B|E|FGH| | | +-+-+C+-+-+-+ |+-+-+C+-+-+-+ | | |IJK|D|L|O|P| ||IJK|D|L|O|P| | | +-+-+-+M+-+-+ |+-+-+-+M+-+-+ | | |Q|RST|N|U|V| ||Q|RST|N|U|V| | | +-+---+-+-+-+ |+-+---+-+-+-+ | +-----------------+-----------------+ |+-+---+-+-+-+ |+-+-+-+-+-+-+-+-+| ||a|bcd|e|f|i| ||a|b|c|d|e|f|g|h|| |+-+-+-+-+g+-+ |+-+-+-+-+-+-+-+-+| ||j|m|nop|h|q| ||i|jkl|m|nop|q|t|| ||k+-+-+-+-+r| |+-+-+-+-+-+-+r+-+| ||l|t|w|xyz|s| ||u|v|wxy|z|A|s|D|| |+-+u+-+-+-+-+ |+-+-+-+-+-+B+-+-+| ||A|v|B|E|FGH| ||E|F|I|JKL|C|M|P|| |+-+-+C+-+-+-+ |+-+G+-+---+-+N+-+| ||IJK|D|L|O|P| ||Q|H|R|UVW|X|O|Y|| |+-+-+-+M+-+-+ |+-+-+S+-+-+-+-+-+| ||Q|RST|N|U|V| ||Z|0|T|3|456|7|8|| |+-+---+-+-+-+ |+-+1+-+-+-+-+-+-+| | ||9|2|abc|d|efg|h|| | |+-+-+-+-+-+-+-+-+| | ||i|j|k|l|m|n|o|p|| | |+-+-+-+-+-+-+-+-+| +-----------------+-----------------+ ]) AT_CLEANUP AT_SETUP([doubly nested cells]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_8X8[]WEAVE_6X6[]dnl 4 2 @{0} @{1} @{1} @|{1} @|{1} @({1} @({1} @{0} 1 1 @{2} ]) AT_CHECK([render-test input --length=70], [0], [dnl +-------------------------------------+ |+-----------------+-----------------+| ||+-+-+-+-+-+-+-+-+| +-+---+-+-+-+|| |||a|b|c|d|e|f|g|h|| |a|bcd|e|f|i||| ||+-+-+-+-+-+-+-+-+| +-+-+-+-+g+-+|| |||i|jkl|m|nop|q|t|| |j|m|nop|h|q||| ||+-+-+-+-+-+-+r+-+| |k+-+-+-+-+r||| |||u|v|wxy|z|A|s|D|| |l|t|w|xyz|s||| ||+-+-+-+-+-+B+-+-+| +-+u+-+-+-+-+|| |||E|F|I|JKL|C|M|P|| |A|v|B|E|FGH||| ||+-+G+-+---+-+N+-+| +-+-+C+-+-+-+|| |||Q|H|R|UVW|X|O|Y|| |IJK|D|L|O|P||| ||+-+-+S+-+-+-+-+-+| +-+-+-+M+-+-+|| |||Z|0|T|3|456|7|8|| |Q|RST|N|U|V||| ||+-+1+-+-+-+-+-+-+| +-+---+-+-+-+|| |||9|2|abc|d|efg|h|| || ||+-+-+-+-+-+-+-+-+| || |||i|j|k|l|m|n|o|p|| || ||+-+-+-+-+-+-+-+-+| || |+-----------------+-----------------+| || +-+---+-+-+-+| +-+---+-+-+-+ || || |a|bcd|e|f|i|| |a|bcd|e|f|i| || || +-+-+-+-+g+-+| +-+-+-+-+g+-+ || || |j|m|nop|h|q|| |j|m|nop|h|q| || || |k+-+-+-+-+r|| |k+-+-+-+-+r| || || |l|t|w|xyz|s|| |l|t|w|xyz|s| || || +-+u+-+-+-+-+| +-+u+-+-+-+-+ || || |A|v|B|E|FGH|| |A|v|B|E|FGH| || || +-+-+C+-+-+-+| +-+-+C+-+-+-+ || || |IJK|D|L|O|P|| |IJK|D|L|O|P| || || +-+-+-+M+-+-+| +-+-+-+M+-+-+ || || |Q|RST|N|U|V|| |Q|RST|N|U|V| || || +-+---+-+-+-+| +-+---+-+-+-+ || |+-----------------+-----------------+| || +-+---+-+-+-+ |+-+---+-+-+-+ || || |a|bcd|e|f|i| ||a|bcd|e|f|i| || || +-+-+-+-+g+-+ |+-+-+-+-+g+-+ || || |j|m|nop|h|q| ||j|m|nop|h|q| || || |k+-+-+-+-+r| ||k+-+-+-+-+r| || || |l|t|w|xyz|s| ||l|t|w|xyz|s| || || +-+u+-+-+-+-+ |+-+u+-+-+-+-+ || || |A|v|B|E|FGH| ||A|v|B|E|FGH| || || +-+-+C+-+-+-+ |+-+-+C+-+-+-+ || || |IJK|D|L|O|P| ||IJK|D|L|O|P| || || +-+-+-+M+-+-+ |+-+-+-+M+-+-+ || || |Q|RST|N|U|V| ||Q|RST|N|U|V| || || +-+---+-+-+-+ |+-+---+-+-+-+ || |+-----------------+-----------------+| ||+-+---+-+-+-+ |+-+-+-+-+-+-+-+-+|| |||a|bcd|e|f|i| ||a|b|c|d|e|f|g|h||| ||+-+-+-+-+g+-+ |+-+-+-+-+-+-+-+-+|| |||j|m|nop|h|q| ||i|jkl|m|nop|q|t||| |||k+-+-+-+-+r| |+-+-+-+-+-+-+r+-+|| |||l|t|w|xyz|s| ||u|v|wxy|z|A|s|D||| ||+-+u+-+-+-+-+ |+-+-+-+-+-+B+-+-+|| |||A|v|B|E|FGH| ||E|F|I|JKL|C|M|P||| ||+-+-+C+-+-+-+ |+-+G+-+---+-+N+-+|| |||IJK|D|L|O|P| ||Q|H|R|UVW|X|O|Y||| ||+-+-+-+M+-+-+ |+-+-+S+-+-+-+-+-+|| |||Q|RST|N|U|V| ||Z|0|T|3|456|7|8||| ||+-+---+-+-+-+ |+-+1+-+-+-+-+-+-+|| || ||9|2|abc|d|efg|h||| || |+-+-+-+-+-+-+-+-+|| || ||i|j|k|l|m|n|o|p||| || |+-+-+-+-+-+-+-+-+|| |+-----------------+-----------------+| +-------------------------------------+ ]) AT_CLEANUP AT_BANNER([output rendering -- horizontal page breaks]) AT_SETUP([breaking row of many small cells]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [1 50 m4_for([x], [1], [50], [1], [@x ])]) AT_CHECK([render-test input], [0], [dnl +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29| +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ ]) AT_CHECK([render-test input -o mb0 --min-break=0], [0], [dnl +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29| +-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ ]) AT_CLEANUP AT_SETUP([breaking row of many small cells, with headers]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [1 54 2 2 @ha @hb m4_for([x], [1], [50], [1], [@x ])dnl @hc @hd ]) AT_CHECK([render-test input], [0], [dnl +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |ha|hb|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|hc|hd| +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |ha|hb|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|hc|hd| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+ |ha|hb|48|49|50|hc|hd| +--+--+--+--+--+--+--+ ]) AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |ha|hb|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|hc|hd| +--+--+-+-+-+-+-+-+-+-+-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |ha|hb|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|hc|hd| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+ |ha|hb|48|49|50|hc|hd| +--+--+--+--+--+--+--+ ]) AT_CLEANUP AT_SETUP([breaking row of many medium-size cells]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [1 50 m4_for([x], [1], [50], [1], [@cell x ])]) AT_CHECK([render-test input], [0], [dnl +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell| | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell| | 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell| | 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45| +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+ |cell|cell|cell|cell|cell| | 46| 47| 48| 49| 50| +----+----+----+----+----+ ]) AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- |cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cel | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 1 +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-- l|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce 6| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30| 31| -+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-- --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+- ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|c 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47| --+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+- ---+----+----+ ell|cell|cell| 48| 49| 50| ---+----+----+ ]) AT_CLEANUP AT_SETUP([breaking row of many medium-size cells, with headers]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [1 52 1 1 header1 m4_for([x], [1], [50], [1], [@cell x ])dnl header2 ]) AT_CHECK([render-test input], [0], [dnl +----+----+----+----+----+----+----+----+----+----+----+----+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| +----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 | 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| +----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 | 25| 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| +----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 | 37| 38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48| +----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+ header1|cell|cell|header2 | 49| 50| +----+----+ ]) AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl +----+----+----+----+----+----+----+----+----+----+----+----+--+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2 | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| | +----+----+----+----+----+----+----+----+----+----+----+----+--+ +--+----+----+----+----+----+----+----+----+----+----+----+----+ header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 |13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| +--+----+----+----+----+----+----+----+----+----+----+----+----+ +----+----+----+----+----+----+----+----+----+----+----+----+--+ header1|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|ce|header2 | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| | +----+----+----+----+----+----+----+----+----+----+----+----+--+ +--+----+----+----+----+----+----+----+----+----+----+----+----+ header1|ll|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|cell|header2 |38| 39| 40| 41| 42| 43| 44| 45| 46| 47| 48| 49| 50| +--+----+----+----+----+----+----+----+----+----+----+----+----+ ]) AT_CLEANUP AT_SETUP([breaking row of many big narrow cells]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [1 50 m4_for([x], [1], [50], [1], [@This is cell x in a series of 50. ])]) AT_CHECK([render-test input], [0], [dnl +------+------+------+------+------+------+------+------+------+------+------+ | This| This| This| This| This| This| This| This| This| This| This| | is| is| is| is| is| is| is| is| is| is| is| |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9| cell| cell| | in a| in a| in a| in a| in a| in a| in a| in a| in a| 10 in| 11 in| |series|series|series|series|series|series|series|series|series| a| a| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series| | | | | | | | | | |of 50.|of 50.| +------+------+------+------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+------+------+------+------+ | This| This| This| This| This| This| This| This| This| This| This| | is| is| is| is| is| is| is| is| is| is| is| | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| | 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in| | a| a| a| a| a| a| a| a| a| a| a| |series|series|series|series|series|series|series|series|series|series|series| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.| +------+------+------+------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+------+------+------+------+ | This| This| This| This| This| This| This| This| This| This| This| | is| is| is| is| is| is| is| is| is| is| is| | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| | 23 in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in| | a| a| a| a| a| a| a| a| a| a| a| |series|series|series|series|series|series|series|series|series|series|series| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.| +------+------+------+------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+------+------+------+------+ | This| This| This| This| This| This| This| This| This| This| This| | is| is| is| is| is| is| is| is| is| is| is| | cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| | 34 in| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in| | a| a| a| a| a| a| a| a| a| a| a| |series|series|series|series|series|series|series|series|series|series|series| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.| +------+------+------+------+------+------+------+------+------+------+------+ +------+------+------+------+------+------+ | This| This| This| This| This| This| | is| is| is| is| is| is| | cell| cell| cell| cell| cell| cell| | 45 in| 46 in| 47 in| 48 in| 49 in| 50 in| | a| a| a| a| a| a| |series|series|series|series|series|series| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.| +------+------+------+------+------+------+ ]) AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl +------+------+------+------+------+------+------+------+------+------+------+- | This| This| This| This| This| This| This| This| This| This| This| | is| is| is| is| is| is| is| is| is| is| is| |cell 1|cell 2|cell 3|cell 4|cell 5|cell 6|cell 7|cell 8|cell 9| cell| cell| | in a| in a| in a| in a| in a| in a| in a| in a| in a| 10 in| 11 in| |series|series|series|series|series|series|series|series|series| a| a| |of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|series|series|s | | | | | | | | | |of 50.|of 50.|o +------+------+------+------+------+------+------+------+------+------+------+- -----+------+------+------+------+------+------+------+------+------+------+--- This| This| This| This| This| This| This| This| This| This| This| T is| is| is| is| is| is| is| is| is| is| is| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| c 12 in| 13 in| 14 in| 15 in| 16 in| 17 in| 18 in| 19 in| 20 in| 21 in| 22 in| 23 a| a| a| a| a| a| a| a| a| a| a| eries|series|series|series|series|series|series|series|series|series|series|ser f 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of -----+------+------+------+------+------+------+------+------+------+------+--- ---+------+------+------+------+------+------+------+------+------+------+----- his| This| This| This| This| This| This| This| This| This| This| Thi is| is| is| is| is| is| is| is| is| is| is| i ell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cel in| 24 in| 25 in| 26 in| 27 in| 28 in| 29 in| 30 in| 31 in| 32 in| 33 in| 34 i a| a| a| a| a| a| a| a| a| a| a| ies|series|series|series|series|series|series|series|series|series|series|serie 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50 ---+------+------+------+------+------+------+------+------+------+------+----- -+------+------+------+------+------+------+------+------+------+------+------+ s| This| This| This| This| This| This| This| This| This| This| This| s| is| is| is| is| is| is| is| is| is| is| is| l| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| cell| n| 35 in| 36 in| 37 in| 38 in| 39 in| 40 in| 41 in| 42 in| 43 in| 44 in| 45 in| a| a| a| a| a| a| a| a| a| a| a| a| s|series|series|series|series|series|series|series|series|series|series|series| .|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.|of 50.| -+------+------+------+------+------+------+------+------+------+------+------+ +------+------+------+------+------+ | This| This| This| This| This| | is| is| is| is| is| | cell| cell| cell| cell| cell| | 46 in| 47 in| 48 in| 49 in| 50 in| | a| a| a| a| a| |series|series|series|series|series| |of 50.|of 50.|of 50.|of 50.|of 50.| +------+------+------+------+------+ ]) AT_CLEANUP AT_SETUP([breaking 2 rows of many small cells]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [2 50 m4_for([x], [1], [100], [1], [@x ])]) AT_CHECK([render-test input], [0], [dnl +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ ]) AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ |27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49| 50| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ |77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100| +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+ ]) AT_CLEANUP AT_SETUP([breaking 3 rows with many joined cells]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [3 49 m4_foreach([var], [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,dnl A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W], [var ])@1 m4_for([x], [2], [49], [1], [1*2 @x ])@50 ]) AT_CHECK([render-test input], [0], [dnl a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-- N O P Q R S T U V W +---+---+---+---+----+ | 21| 22| 23| 24| 25| +-+-+-+-+-+-+-+-+-+--+ 45| 46| 47| 48| 49|50| --+---+---+---+---+--+ ]) AT_CHECK([render-test -o mb0 --min-break=0 input], [0], [dnl a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M +-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ |1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 26| 27| 28| 29| 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 40| 41| 42| 43| 44| 4 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-- N O P Q R S T U V W +---+---+---+---+----+ | 21| 22| 23| 24| 25| +-+-+-+-+-+-+-+-+-+--+ 45| 46| 47| 48| 49|50| --+---+---+---+---+--+ ]) AT_CLEANUP AT_SETUP([horz break 6x6, joined rows and columns]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_6X6]) AT_DATA([expout], [dnl +-+-- |a|bc +-+-+ |j|m| |k+-+ |l|t| +-+u| |A|v| +-+-+ |IJK| +-+-+ |Q|RS +-+-- --+-+ cd|e| +-+-+ |nop| +-+-+ |w|xy +-+-+ |B|E| |C+-+ |D|L| +-+M| ST|N| --+-+ +-+-+ |f|i| |g+-+ |h|q| +-+r| yz|s| +-+-+ |FGH| +-+-+ |O|P| +-+-+ |U|V| +-+-+ ]) AT_CHECK([render-test --width=6 input], [0], [expout]) AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [expout]) AT_CLEANUP AT_SETUP([horz break 6x6, joined rows and columns, left header]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_6X6([1 0 0 0])]) AT_DATA([expout], [dnl +-+---+-+ |a|bcd|e| +-+-+-+-+ |j|m|nop| |k+-+-+-+ |l|t|w|xy +-+u+-+-+ |A|v|B|E| +-+-+C+-+ |IJK|D|L| +-+-+-+M| |Q|RST|N| +-+---+-+ +-+-+-+ |a|f|i| +-+g+-+ |j|h|q| |k+-+r| |l|z|s| +-+-+-+ |A|FGH| +-+-+-+ |K|O|P| +-+-+-+ |Q|U|V| +-+-+-+ ]) AT_CHECK([render-test --width=10 input], [0], [expout]) AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [expout]) AT_CLEANUP AT_SETUP([horz break 6x6, joined rows and columns, right header]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_6X6([0 1 0 0])]) AT_DATA([expout], [dnl +-+---+-+ |a|bcd|i| +-+-+-+-+ |j|m|n|q| |k+-+-+r| |l|t|w|s| +-+u+-+-+ |A|v|B|H| +-+-+C+-+ |IJK|D|P| +-+-+-+-+ |Q|RST|V| +-+---+-+ +-+-+-+ |e|f|i| +-+g+-+ op|h|q| +-+-+r| |xyz|s| +-+-+-+ |E|FGH| +-+-+-+ |L|O|P| |M+-+-+ |N|U|V| +-+-+-+ ]) AT_CHECK([render-test --width=10 input], [0], [expout]) AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [expout]) AT_CLEANUP AT_SETUP([breaking joined cells too wide for page]) AT_KEYWORDS([render rendering]) AT_DATA([input], [4 6 1*6 @abc def ghi jkl 1*3 @mno pqr 1*3 @stu vwx 1*2 @yzA 1*2 @BCD 1*2 @EFG @H @I @J @K @L @M ]) AT_CHECK([render-test --width=10 input], [0], [dnl +-------- |abc def | +-----+-- | mno| | pqr| +---+-+-+ |yzA|BCD| +-+-+-+-+ |H|I|J|K| +-+-+-+-+ ----+ ghi| jkl| ----+ stu| vwx| +---+ |EFG| +-+-+ |L|M| +-+-+ ]) AT_CHECK([render-test -o mb0 --min-break=0 --width=10 input], [0], [dnl +-------- |abc def | +-----+-- | mno| | pqr| +---+-+-+ |yzA|BCD| +-+-+-+-+ |H|I|J|K| +-+-+-+-+ ----+ ghi| jkl| ----+ stu| vwx| +---+ |EFG| +-+-+ |L|M| +-+-+ ]) AT_CLEANUP AT_SETUP([breaking joined cells much too wide for page]) AT_KEYWORDS([render rendering]) AT_DATA([input], [4 6 1*6 @abc def ghi jkl 1*3 @mno pqr 1*3 @stu vwx 1*2 @yzA 1*2 @BCD 1*2 @EFG @H @I @J @K @L @M ]) AT_CHECK([render-test --width=6 input], [0], [dnl +---- |abc | +---- | mn | pq +---+ |yzA| +-+-+ |H|I| +-+-+ ----- def --+-- no| qr| +-+-+ |BCD| +-+-+ |J|K| +-+-+ ----+ ghi| jkl| ----+ stu| vwx| +---+ |EFG| +-+-+ |L|M| +-+-+ ]) AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [dnl +---- |abc | +---- | mn | pq +---+ |yzA| +-+-+ |H|I| +-+-+ ----- def --+-- no| qr| +-+-+ |BCD| +-+-+ |J|K| +-+-+ ----+ ghi| jkl| ----+ stu| vwx| +---+ |EFG| +-+-+ |L|M| +-+-+ ]) AT_CLEANUP AT_SETUP([breaking cell too wide for page, no border]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [1 1 abcdefghijklmnopqrstuvwxyz ]) AT_CHECK([render-test --width=6 input], [0], [dnl abcdef ghijkl mnopqr stuvwx yz ]) AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [dnl abcdef ghijkl mnopqr stuvwx yz ]) AT_CLEANUP AT_SETUP([breaking cell too wide for page, with border]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [1 1 @abcdefghijklmnopqrstuvwxyz ]) AT_DATA([expout], [dnl +----- |abcde +----- ------ fghijk ------ ------ lmnopq ------ ------ rstuvw ------ ---+ xyz| ---+ ]) AT_CHECK([render-test --width=6 input], [0], [expout]) AT_CHECK([render-test -o mb0 --min-break=0 --width=6 input], [0], [expout]) AT_CLEANUP AT_SETUP([horz break 8x8 with many 2x2 joins]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_8X8_2]) AT_CHECK([render-test --width=8 input], [0],[dnl +---+-- |abc|jk |def| |ghi+-- | |yz +-+-+BC |Q|V|EF |R| | |S+-+-+ |T|012| |U|345| | |678| | | | +-+-+-+ |xyz|G| |ABC|H| |DEF|I| | | | +---+-+ |abcde| | | +-----+ --+----+ kl| mno| | pqr| --+ stu| zA| | CD+-+--+ FG|W| Z| |X| | +-+Y+--+ |9| | ab | | | de +-+-+ gh |opq| |rst+--- |uvw| JK | | +---+--+ | MNOPQ| | RSTUV| | WXYZ0| | | +------+ +----+ | vwx| | | +----+ | HIJ| | KLM| | NOP| | | +-+--+ bc| j| ef| k| hi| l| | m| --+ n| KL| | | | +-+--+ | 123| | 456| | 456| | 789| | | +----+ ]) AT_CHECK([render-test -o mb0 --min-break=0 --width=8 input], [0],[dnl +---+-- |abc|jk |def| |ghi+-- | |yz +-+-+BC |Q|V|EF |R| | |S+-+-+ |T|012| |U|345| | |678| | | | +-+-+-+ |xyz|G| |ABC|H| |DEF|I| | | | +---+-+ |abcde| | | +-----+ --+----+ kl| mno| | pqr| --+ stu| zA| | CD+-+--+ FG|W| Z| |X| | +-+Y+--+ |9| | ab | | | de +-+-+ gh |opq| |rst+--- |uvw| JK | | +---+--+ | MNOPQ| | RSTUV| | WXYZ0| | | +------+ +----+ | vwx| | | +----+ | HIJ| | KLM| | NOP| | | +-+--+ bc| j| ef| k| hi| l| | m| --+ n| KL| | | | +-+--+ | 123| | 456| | 789| | | +----+ ]) AT_CLEANUP AT_BANNER([output rendering -- vertical page breaks]) AT_SETUP([breaking column of many small cells]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [20 1 m4_for([x], [1], [20], [1], [@x ])]) AT_CHECK([render-test --length=10 input], [0], [dnl +--+ | 1| +--+ | 2| +--+ | 3| +--+ | 4| +--+ +--+ | 5| +--+ | 6| +--+ | 7| +--+ | 8| +--+ +--+ | 9| +--+ |10| +--+ |11| +--+ |12| +--+ +--+ |13| +--+ |14| +--+ |15| +--+ |16| +--+ +--+ |17| +--+ |18| +--+ |19| +--+ |20| +--+ ]) AT_CHECK([render-test -o mb0 --min-break=0 --length=10 input], [0], [dnl +--+ | 1| +--+ | 2| +--+ | 3| +--+ | 4| +--+ +--+ | 5| +--+ | 6| +--+ | 7| +--+ | 8| +--+ +--+ | 9| +--+ |10| +--+ |11| +--+ |12| +--+ +--+ |13| +--+ |14| +--+ |15| +--+ |16| +--+ +--+ |17| +--+ |18| +--+ |19| +--+ |20| +--+ ]) AT_CLEANUP AT_SETUP([breaking column of many small cells, with headers]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [17 1 0 0 1 1 @a m4_for([x], [1], [15], [1], [@x ])@b ]) AT_CHECK([render-test --length=13 input], [0], [dnl +--+ | a| +--+ | 1| +--+ | 2| +--+ | 3| +--+ | 4| +--+ | b| +--+ +--+ | a| +--+ | 5| +--+ | 6| +--+ | 7| +--+ | 8| +--+ | b| +--+ +--+ | a| +--+ | 9| +--+ |10| +--+ |11| +--+ |12| +--+ | b| +--+ +--+ | a| +--+ |13| +--+ |14| +--+ |15| +--+ | b| +--+ ]) AT_CHECK([render-test -o mb0 --min-break=0 --length=13 input], [0], [dnl +--+ | a| +--+ | 1| +--+ | 2| +--+ | 3| +--+ | 4| +--+ | b| +--+ +--+ | a| +--+ | 5| +--+ | 6| +--+ | 7| +--+ | 8| +--+ | b| +--+ +--+ | a| +--+ | 9| +--+ |10| +--+ |11| +--+ |12| +--+ | b| +--+ +--+ | a| +--+ |13| +--+ |14| +--+ |15| +--+ | b| +--+ ]) AT_CLEANUP AT_SETUP([disabling too-big headers]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [17 1 0 0 1 1 @a m4_for([x], [1], [15], [1], [@x ])@b ]) AT_DATA([expout], [dnl +--+ | a| +--+ | 1| +--+ | 2| +--+ | 3| +--+ +--+ | 4| +--+ | 5| +--+ | 6| +--+ | 7| +--+ +--+ | 8| +--+ | 9| +--+ |10| +--+ |11| +--+ +--+ |12| +--+ |13| +--+ |14| +--+ |15| +--+ +--+ | b| +--+ ]) AT_CHECK([render-test --length=10 input], [0], [expout]) AT_CHECK([render-test -o mb0 --min-break=0 --length=10 input], [0], [expout]) AT_CLEANUP AT_SETUP([breaking column of many medium-size cells]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [20 1 m4_for([x], [1], [20], [1], [@top x\ncell x\nbottom x ])]) AT_CHECK([render-test --length 10 input], [0], [dnl +---------+ | top 1| | cell 1| | bottom 1| +---------+ | top 2| | cell 2| | bottom 2| +---------+ +---------+ | top 3| | cell 3| | bottom 3| +---------+ | top 4| | cell 4| | bottom 4| +---------+ +---------+ | top 5| | cell 5| | bottom 5| +---------+ | top 6| | cell 6| | bottom 6| +---------+ +---------+ | top 7| | cell 7| | bottom 7| +---------+ | top 8| | cell 8| | bottom 8| +---------+ +---------+ | top 9| | cell 9| | bottom 9| +---------+ | top 10| | cell 10| |bottom 10| +---------+ +---------+ | top 11| | cell 11| |bottom 11| +---------+ | top 12| | cell 12| |bottom 12| +---------+ +---------+ | top 13| | cell 13| |bottom 13| +---------+ | top 14| | cell 14| |bottom 14| +---------+ +---------+ | top 15| | cell 15| |bottom 15| +---------+ | top 16| | cell 16| |bottom 16| +---------+ +---------+ | top 17| | cell 17| |bottom 17| +---------+ | top 18| | cell 18| |bottom 18| +---------+ +---------+ | top 19| | cell 19| |bottom 19| +---------+ | top 20| | cell 20| |bottom 20| +---------+ ]) AT_CHECK([render-test -o mb0 --min-break=0 --length 10 input], [0], [dnl +---------+ | top 1| | cell 1| | bottom 1| +---------+ | top 2| | cell 2| | bottom 2| +---------+ | top 3| | cell 3| | bottom 3| +---------+ | top 4| | cell 4| | bottom 4| +---------+ | top 5| | cell 5| | bottom 5| +---------+ | top 6| | cell 6| | bottom 6| +---------+ | top 7| | cell 7| | bottom 7| +---------+ +---------+ | top 8| | cell 8| | bottom 8| +---------+ | top 9| | cell 9| | bottom 9| +---------+ | top 10| | cell 10| |bottom 10| +---------+ | top 11| | cell 11| |bottom 11| +---------+ | top 12| | cell 12| |bottom 12| +---------+ | top 13| | cell 13| |bottom 13| +---------+ | top 14| | cell 14| |bottom 14| +---------+ +---------+ | top 15| | cell 15| |bottom 15| +---------+ | top 16| | cell 16| |bottom 16| +---------+ | top 17| | cell 17| |bottom 17| +---------+ | top 18| | cell 18| |bottom 18| +---------+ | top 19| | cell 19| |bottom 19| +---------+ | top 20| | cell 20| |bottom 20| +---------+ ]) AT_CLEANUP AT_SETUP([breaking 3 columns with many joined cells]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) # +--+--+ # a| 1|11| # +--+ab| # b| 2|cd| # |ab+--+ # c|cd|12| # +--+ab| # d| 3|cd| # |ab+--+ # e|cd|13| # +--+ab| # f| 4|cd| # |ab+--+ # g|cd|14| # +--+ab| # h| 5|cd| # |ab+--+ # i|cd|15| # +--+ab| # j| 6|cd| # |ab+--+ # k|cd|16| # +--+ab| # l| 7|cd| # |ab+--+ # m|cd|17| # +--+ab| # n| 8|cd| # |ab+--+ # o|cd|18| # +--+ab| # p| 9|cd| # |ab+--+ # q|cd|19| # +--+ab| # r|10|cd| # |ab+--+ # s|cd|20| # +--+--+ AT_DATA([input], [3 19 m4_foreach([x], [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s], [x ])@1 m4_for([x], [2], [19], [1], [1*2 @x\nab\ncd ])@20 ]) AT_DATA([expout], [dnl +--+--+ a| 1|11| +--+ab| b| 2|cd| |ab+--+ |ab+--+ c|cd|12| +--+ab| d| 3|cd| |ab+--+ |ab+--+ e|cd|13| +--+ab| f| 4|cd| |ab+--+ |ab+--+ g|cd|14| +--+ab| h| 5|cd| |ab+--+ |ab+--+ i|cd|15| +--+ab| j| 6|cd| |ab+--+ |ab+--+ k|cd|16| +--+ab| l| 7|cd| |ab+--+ |ab+--+ m|cd|17| +--+ab| n| 8|cd| |ab+--+ |ab+--+ o|cd|18| +--+ab| p| 9|cd| |ab+--+ |ab+--+ q|cd|19| +--+ab| r|10|cd| |ab+--+ |ab+--+ s|cd|20| +--+--+ ]) AT_CHECK([render-test --length=6 --transpose input], [0], [expout]) AT_CHECK([render-test -o mb0 --min-break=0 --length=6 --transpose input], [0], [expout]) AT_CLEANUP AT_SETUP([vert break 6x6, joined rows and columns]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_6X6]) AT_CHECK([render-test --length=6 input], [0], [dnl +-+---+-+-+-+ |a|bcd|e|f|i| +-+-+-+-+g+-+ |j|m|nop|h|q| |k+-+---+-+r| |k+-+-+---+r| |l|t|w|xyz|s| +-+u+-+-+-+-+ |A|v|B|E|FGH| +-+-+C+-+---+ +---+C+-+-+-+ |IJK|D|L|O|P| +-+-+-+M+-+-+ |Q|RST|N|U|V| +-+---+-+-+-+ ]) AT_CHECK([render-test -o mb0 --min-break=0 --length=6 input], [0], [dnl +-+---+-+-+-+ |a|bcd|e|f|i| +-+-+-+-+g+-+ |j|m|nop|h|q| |k+-+---+-+r| |k+-+-+---+r| |l|t|w|xyz|s| +-+u+-+-+-+-+ |A|v|B|E|FGH| +-+-+C+-+---+ +---+C+-+-+-+ |IJK|D|L|O|P| +-+-+-+M+-+-+ |Q|RST|N|U|V| +-+---+-+-+-+ ]) AT_CLEANUP AT_SETUP([breaking joined cells too tall for page]) AT_KEYWORDS([render rendering]) AT_DATA([input], [4 6 1*6 @abc\ndef\nghi\njkl\nmno\npqr\nstu\nvwx\nyzA\nBCD\nEFG 1*3 @HIJ\nKLM\nOPQ\nRST\nUVW 1*3 @XYZ\n012\n345\n678\n90a 1*2 @bcd\nefg\nhij 1*2 @klm\nnop\nqrs 1*2 @tuv\nwxy\nzAB @C @D @E @F @G @H ]) AT_CHECK([render-test --transpose --length=6 input], [0], [dnl +---+---+---+-+ |abc|HIJ|bcd|C| |def|KLM|efg+-+ |ghi|OPQ|hij|D| |jkl|RST+---+-+ |jkl|RST+---+-+ |mno|UVW|klm|E| |pqr+---+nop+-+ |stu|XYZ|qrs|F| |vwx|012+---+-+ |vwx|012+---+-+ |yzA|345|tuv|G| |BCD|678|wxy+-+ |EFG|90a|zAB|H| +---+---+---+-+ ]) AT_CHECK([render-test -o mb0 --min-break=0 --transpose --length=6 input], [0], [dnl +---+---+---+-+ |abc|HIJ|bcd|C| |def|KLM|efg+-+ |ghi|OPQ|hij|D| |jkl|RST+---+-+ |jkl|RST+---+-+ |mno|UVW|klm|E| |pqr+---+nop+-+ |stu|XYZ|qrs|F| |vwx|012+---+-+ |vwx|012+---+-+ |yzA|345|tuv|G| |BCD|678|wxy+-+ |EFG|90a|zAB|H| +---+---+---+-+ ]) AT_CLEANUP AT_SETUP([breaking cell too tall for page, no border]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [1 1 abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ ]) AT_CHECK([render-test --width=6 --length=6 input], [0], [dnl abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ ]) AT_CHECK([render-test -o mb0 --min-break=0 --width=6 --length=6 input], [0], [dnl abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ ]) AT_CLEANUP AT_SETUP([breaking cell too tall for page, with border]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [1 1 @abc defg hij klmn opq rstu vwx yz ABCDE FGH I JK LMNOP QR STU VWXYZ ]) AT_DATA([expout], [dnl +-----+ | abc| | defg| | hij| | klmn| | opq| | rstu| | vwx| | yz| |ABCDE| |FGH I| | JK| |LMNOP| | QR| | STU| |VWXYZ| +-----+ ]) AT_CHECK([render-test --width=7 --length=6 input], [0], [expout]) AT_CHECK([render-test -o mb0 --min-break=0 --width=7 --length=6 input], [0], [expout]) AT_CLEANUP AT_SETUP([breaking nested cell too tall for page]) AT_KEYWORDS([render rendering]) AT_CAPTURE_FILE([input]) AT_DATA([input], [WEAVE_8X8[]WEAVE_6X6[]dnl 1 2 @{0} @{1} ]) AT_CHECK([render-test input --length=10], [0], [dnl +-----------------+-------------+ |+-+-+-+-+-+-+-+-+|+-+---+-+-+-+| ||a|b|c|d|e|f|g|h|||a|bcd|e|f|i|| |+-+-+-+-+-+-+-+-+|+-+-+-+-+g+-+| ||i|jkl|m|nop|q|t|||j|m|nop|h|q|| |+-+-+-+-+-+-+r+-+||k+-+-+-+-+r|| ||u|v|wxy|z|A|s|D|||l|t|w|xyz|s|| |+-+-+-+-+-+B+-+-+|+-+u+-+-+-+-+| ||E|F|I|JKL|C|M|P|||A|v|B|E|FGH|| |+-+G+-+---+-+N+-+|+-+-+C+-+-+-+| ||Q|H|R|UVW|X|O|Y|||IJK|D|L|O|P|| |+-+-+S+-+-+-+-+-+|+-+-+-+M+-+-+| ||Z|0|T|3|456|7|8|||Q|RST|N|U|V|| |+-+1+-+-+-+-+-+-+|+-+---+-+-+-+| ||9|2|abc|d|efg|h|| | |+-+-+-+-+-+-+-+-+| | ||i|j|k|l|m|n|o|p|| | |+-+-+-+-+-+-+-+-+| | +-----------------+-------------+ ]) AT_CLEANUP AT_BANNER([output rendering -- double page breaks]) AT_SETUP([double break 6x6, joined rows and columns]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_6X6]) AT_CHECK([render-test --width=6 --length=6 input], [0], [dnl +-+-- |a|bc +-+-+ |j|m| |k+-+ |k+-+ |l|t| +-+u| |A|v| +-+-+ +---+ |IJK| +-+-+ |Q|RS +-+-- --+-+ cd|e| +-+-+ |nop| +---+ +-+-- |w|xy +-+-+ |B|E| |C+-+ |C+-+ |D|L| +-+M| ST|N| --+-+ +-+-+ |f|i| |g+-+ |h|q| +-+r| --+r| yz|s| +-+-+ |FGH| +---+ +-+-+ |O|P| +-+-+ |U|V| +-+-+ ]) AT_CHECK([render-test -o mb0 --min-break=0 --width=6 --length=6 input], [0], [dnl +-+-- |a|bc +-+-+ |j|m| |k+-+ |k+-+ |l|t| +-+u| |A|v| +-+-+ +---+ |IJK| +-+-+ |Q|RS +-+-- --+-+ cd|e| +-+-+ |nop| +---+ +-+-- |w|xy +-+-+ |B|E| |C+-+ |C+-+ |D|L| +-+M| ST|N| --+-+ +-+-+ |f|i| |g+-+ |h|q| +-+r| --+r| yz|s| +-+-+ |FGH| +---+ +-+-+ |O|P| +-+-+ |U|V| +-+-+ ]) AT_CLEANUP AT_SETUP([double break 8x8, with joins, left and right headers]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_8X8([1 1 0 0])]) AT_CHECK([render-test input --width=14 --length=14], [0], [dnl +-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |i|jkl|m|n|t| +-+-+-+-+-+-+ |u|v|wxy|z|D| +-+-+-+-+-+-+ |E|F|I|JKL|P| +-+G+-+---+-+ |Q|H|R|UVW|Y| +-+-+S+-+-+-+ |Z|0|T|3|4|8| +-+1+-+-+-+-+ +-+1+---+-+-+ |9|2|abc|d|h| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |i|op|q|t| +-+--+r+-+ |u| A|s|D| +-+ B+-+-+ +-+ B+-+-+ |E| C|M|P| +-+--+N+-+ |Q| X|O|Y| +-+--+-+-+ |Z|56|7|8| +-+--+-+-+ |9| efg|h| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ ]) AT_CHECK([render-test -o mb0 --min-break=0 input --width=14 --length=14], [0], [dnl +-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |i|jkl|m|n|t| +-+-+-+-+-+-+ |u|v|wxy|z|D| +-+-+-+-+-+-+ |E|F|I|JKL|P| +-+G+-+---+-+ |Q|H|R|UVW|Y| +-+-+S+-+-+-+ |Z|0|T|3|4|8| +-+1+-+-+-+-+ +-+1+---+-+-+ |9|2|abc|d|h| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |i|op|q|t| +-+--+r+-+ |u| A|s|D| +-+ B+-+-+ +-+ B+-+-+ |E| C|M|P| +-+--+N+-+ |Q| X|O|Y| +-+--+-+-+ |Z|56|7|8| +-+--+-+-+ |9| efg|h| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ ]) AT_CLEANUP AT_SETUP([double break 8x8, with joins, top and bottom headers]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_8X8([0 0 1 1])]) AT_CHECK([render-test input --width=14 --length=14], [0], [dnl +-+-+-+-+-+-+ |a|b|c|d|e|f| +-+-+-+-+-+-+ |i|jkl|m|nop| +-+-+-+-+-+-+ |u|v|wxy|z|A| +-+-+-+-+-+B| |E|F|I|JKL|C| +-+G+-+---+-+ |Q|H|R|UVW|X| +-+-+-+-+-+-+ |i|j|k|l|m|n| +-+-+-+-+-+-+ +-+-+-+-+-+-+ |a|b|c|d|e|f| +-+-+-+-+-+-+ |Z|0|S|3|456| | |1|T| | | +-+2+-+-+-+-+ |9| |abc|d|ef +-+-+-+-+-+-+ |i|j|k|l|m|n| +-+-+-+-+-+-+ +-+-+ |g|h| +-+-+ |q|t| |r+-+ |s|D| +-+-+ |M|P| |N+-+ |O|Y| +-+-+ |o|p| +-+-+ +-+-+ |g|h| +-+-+ |7|8| | | | +-+-+ fg|h| +-+-+ |o|p| +-+-+ ]) AT_CHECK([render-test -o mb0 --min-break=0 input --width=14 --length=14], [0], [dnl +-+-+-+-+-+-+ |a|b|c|d|e|f| +-+-+-+-+-+-+ |i|jkl|m|nop| +-+-+-+-+-+-+ |u|v|wxy|z|A| +-+-+-+-+-+B| |E|F|I|JKL|C| +-+G+-+---+-+ |Q|H|R|UVW|X| +-+-+-+-+-+-+ |i|j|k|l|m|n| +-+-+-+-+-+-+ +-+-+-+-+-+-+ |a|b|c|d|e|f| +-+-+-+-+-+-+ |Z|0|S|3|456| | |1|T| | | +-+2+-+-+-+-+ |9| |abc|d|ef +-+-+-+-+-+-+ |i|j|k|l|m|n| +-+-+-+-+-+-+ +-+-+ |g|h| +-+-+ |q|t| |r+-+ |s|D| +-+-+ |M|P| |N+-+ |O|Y| +-+-+ |o|p| +-+-+ +-+-+ |g|h| +-+-+ |7|8| | | | +-+-+ fg|h| +-+-+ |o|p| +-+-+ ]) AT_CLEANUP AT_SETUP([double break 8x8, with joins, all headers]) AT_KEYWORDS([render rendering]) AT_DATA([input], [WEAVE_8X8([1 1 1 1])]) AT_CHECK([render-test input --width=14 --length=14], [0], [dnl +-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |i|jkl|m|n|t| +-+-+-+-+-+-+ |u|v|wxy|z|D| +-+-+-+-+-+-+ |E|F|I|JKL|P| +-+G+-+---+-+ |Q|H|R|UVW|Y| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |Z|0|S|3|4|8| | |1|T| | | | +-+2+-+-+-+-+ |9| |abc|d|h| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |i|op|q|t| +-+--+r+-+ |u| A|s|D| +-+ B+-+-+ |E| C|M|P| +-+--+N+-+ |Q| X|O|Y| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |Z|56|7|8| | | | | | +-+--+-+-+ |9| efg|h| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ ]) AT_CHECK([render-test -o mb0 --min-break=0 input --width=14 --length=14], [0], [dnl +-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |i|jkl|m|n|t| +-+-+-+-+-+-+ |u|v|wxy|z|D| +-+-+-+-+-+-+ |E|F|I|JKL|P| +-+G+-+---+-+ |Q|H|R|UVW|Y| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+-+-+-+-+-+ |a|b|c|d|e|h| +-+-+-+-+-+-+ |Z|0|S|3|4|8| | |1|T| | | | +-+2+-+-+-+-+ |9| |abc|d|h| +-+-+-+-+-+-+ |i|j|k|l|m|p| +-+-+-+-+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |i|op|q|t| +-+--+r+-+ |u| A|s|D| +-+ B+-+-+ |E| C|M|P| +-+--+N+-+ |Q| X|O|Y| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ +-+--+-+-+ |a| f|g|h| +-+--+-+-+ |Z|56|7|8| | | | | | +-+--+-+-+ |9| efg|h| +-+--+-+-+ |i| n|o|p| +-+--+-+-+ ]) AT_CLEANUP AT_SETUP([double break joined cells too big for page]) AT_KEYWORDS([render rendering]) AT_DATA([input], [7 7 @a @b @c @d @e @f @g @h 6*6 @The MISSING subcommand determines the handling of missing variables. If INCLUDE is set, then user‑missing values are included in the calculations. If NOINCLUDE is set, which is the default, user‑missing values are excluded. @i @j @k @l @m ]) AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl +-+--+--+---+ |a| b| c| d| +-+--+--+---+ |h| The | | su +-+ determ |i| han | |missing va | |If INCLUDE +-+ then user |j| va | | include | | calculati +-+ NOINCLUDE +-+ NOINCLUDE |k| whic | | | | user +-+ va |l| e | | | | +-+ |m| | | +-+---------- +--+--+--+ | e| f| g| +--+--+--+ e MISSING| ubcommand| mines the| ndling of| ariables.| E is set,| r‑missing| alues are| ed in the| ions. If| E is set,| E is set,| ch is the| default,| r‑missing| alues are| excluded.| | | | | | ---------+ ]) AT_CHECK([render-test -o mb0 --min-break=0 --width=15 --length=15 input], [0], [dnl +-+--+--+---+- |a| b| c| d| +-+--+--+---+- |h| The | | sub +-+ determi |i| hand | |missing var | |If INCLUDE +-+ then user‑ |j| val | | included | | calculatio +-+ NOINCLUDE |k| which | | d | | user‑ +-+ val |l| ex | | | | +-+ |m| | | +-+----------- -+--+--+ e| f| g| -+--+--+ MISSING| command| nes the| ling of| iables.| is set,| missing| ues are| in the| ns. If| is set,| is the| efault,| missing| ues are| cluded.| | | | | | -------+ ]) AT_CLEANUP AT_BANNER([output rendering -- problematic procedures]) dnl LIST used to put columns right up next to each other without any dnl intervening space, so this checks for regression. AT_SETUP([LIST puts space between columns]) AT_KEYWORDS([render rendering]) AT_DATA([list.sps], [dnl DATA LIST LIST NOTABLE /x y z (F1.0). BEGIN DATA. 1 2 3 4 5 6 7 8 9 END DATA. LIST. ]) AT_CHECK([pspp list.sps], [0], [dnl Data List x y z ----- 1 2 3 4 5 6 7 8 9 ]) AT_CLEANUP # Long string variables tend to end in lots of spaces. The ASCII # driver didn't handle this very well: it would essentially produce # one blank line in a cell for each trailing space. This test # checks for regression. See bug #38672. AT_SETUP([ASCII driver renders end of line spaces reasonably]) AT_KEYWORDS([render rendering]) AT_DATA([input], [dnl 3 3 @a @b @xyzzy @&t@ @d @e @f @g @h @i ]) AT_CHECK([render-test --width=15 --length=15 input], [0], [dnl +-+-+-----+ |a|b|xyzzy| +-+-+-----+ |d|e| f| +-+-+-----+ |g|h| i| +-+-+-----+ ]) AT_CLEANUP # There was a bug that, when multiple cells spanned a single column # (or row), only the dimensions of the cell nearest the bottom of the # table were actually considered. This checks for regression. (This # problem was most easily observed with SYSFILE INFO, which uses lots # of spanned cells). # # Without the fix, the output looks like this: # +-------+ # | A long| # | text| # |string.| # +-------+ # |shorter| AT_SETUP([multiple spanned cells all contribute to dimensions]) AT_KEYWORDS([render rendering]) AT_DATA([input], [dnl 2 2 1*2 @A long text string. 1*2 @shorter ]) AT_CHECK([render-test --width=30 --length=15 input], [0], [dnl +-------------------+ |A long text string.| +-------------------+ | shorter| +-------------------+ ]) AT_CLEANUP pspp-1.0.1/tests/output/ascii.at0000644000175000017500000002766013137223525013552 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([ASCII driver -- rendering corner cases]) AT_SETUP([ASCII driver overwriting single-width text]) AT_KEYWORDS([render rendering]) AT_DATA([input], [dnl ## overwriting rest of line # plain 0 0 0 abc 1 0 0 BCD # emphasized over plain 0 1 0 efg 1 1 1 FGH # plain over emphasized 0 2 1 ijk 1 2 0 JKL # emphasized over emphasized 0 3 1 mno 1 3 1 NOP ## overwriting partial line # plain 0 5 0 abcdef 0 5 0 A 2 5 0 CDE # emphasized over plain 0 6 0 ghijkl 0 6 1 G 2 6 1 IJK # plain over emphasized 0 7 1 mnopqr 0 7 0 M 2 7 0 OPQ # emphasized over emphasized 0 8 1 stuvwx 0 8 1 S 2 8 1 UVW ## overwriting rest of line with double-width characters # plain 0 10 0 kakiku 2 10 0 きくけ # emphasized over plain 0 11 0 kakiku 2 11 1 きくけ # plain over emphasized 0 12 1 kakiku 2 12 0 きくけ # emphasized over emphasized 0 13 1 kakiku 2 13 1 きくけ ## overwriting partial line with double-width characters # plain 0 15 0 kakikukeko 0 15 0 か 4 15 0 くけ # emphasized over plain 0 16 0 kakikukeko 0 16 1 か 4 16 1 くけ # plain over emphasized 0 17 1 kakikukeko 0 17 0 か 4 17 0 くけ # emphasized over emphasized 0 18 1 kakikukeko 0 18 1 か 4 18 1 くけ ]) AT_CHECK([render-test --draw-mode --emph=none input], [0], [dnl aBCD eFGH iJKL mNOP AbCDEf GhIJKl MnOPQr StUVWx kaきくけ kaきくけ kaきくけ kaきくけ かkiくけko かkiくけko かkiくけko かkiくけko ]) AT_CHECK([render-test --draw-mode --emph=bold input], [0], [dnl aBCD eFFGGHH iiJKL mmNNOOPP AbCDEf GGhIIJJKKl MnnOPQrr SSttUUVVWWxx kaきくけ kaききくくけけ kkaaきくけ kkaaききくくけけ かkiくけko かかkiくくけけko かkkiiくけkkoo かかkkiiくくけけkkoo ]) AT_CHECK([render-test --draw-mode --emph=underline input], [0], [dnl aBCD e_F_G_H _iJKL _m_N_O_P AbCDEf _Gh_I_J_Kl M_nOPQ_r _S_t_U_V_W_x kaきくけ ka_き_く_け _k_aきくけ _k_a_き_く_け かkiくけko _かki_く_けko か_k_iくけ_k_o _か_k_i_く_け_k_o ]) AT_CLEANUP AT_SETUP([ASCII driver overwriting double-width text]) AT_KEYWORDS([render rendering]) AT_DATA([input], [dnl ## overwrite rest of line, aligned double-width over double-width # plain 0 0 0 あいう 2 0 0 きくけ # emphasized over plain 0 1 0 あいう 2 1 1 きくけ # plain over emphasized 0 2 1 あいう 2 2 0 きくけ # emphasized over emphasized 0 3 1 あいう 2 3 1 きくけ ## overwrite rest of line, misaligned double-width over double-width # plain 0 5 0 あいう 3 5 0 きくけ # emphasized over plain 0 6 0 あいう 3 6 1 きくけ # plain over emphasized 0 7 1 あいう 3 7 0 きくけ # emphasized over emphasized 0 8 1 あいう 3 8 1 きくけ ## overwrite partial line, aligned double-width over double-width # plain 0 10 0 あいうえお 0 10 0 か 4 10 0 くけ # emphasized over plain 0 11 0 あいうえお 0 11 1 か 4 11 1 くけ # plain over emphasized 0 12 1 あいうえお 0 12 0 か 4 12 0 くけ # emphasized over emphasized 0 13 1 あいうえお 0 13 1 か 4 13 1 くけ ## overwrite partial line, misaligned double-width over double-width # plain 0 15 0 あいうえおさ 1 15 0 か 5 15 0 くけ # emphasized over plain 0 16 0 あいうえおさ 1 16 1 か 5 16 1 くけ # plain over emphasized 0 17 1 あいうえおさ 1 17 0 か 5 17 0 くけ # emphasized over emphasized 0 18 1 あいうえおさ 1 18 1 か 5 18 1 くけ ## overwrite rest of line, aligned single-width over double-width # plain 0 20 0 あいう 2 20 0 kikuko # emphasized over plain 0 21 0 あいう 2 21 1 kikuko # plain over emphasized 0 22 1 あいう 2 22 0 kikuko # emphasized over emphasized 0 23 1 あいう 2 23 1 kikuko ## overwrite rest of line, misaligned single-width over double-width # plain 0 25 0 あいう 3 25 0 kikuko # emphasized over plain 0 26 0 あいう 3 26 1 kikuko # plain over emphasized 0 27 1 あいう 3 27 0 kikuko # emphasized over emphasized 0 28 1 あいう 3 28 1 kikuko ## overwrite partial line, aligned single-width over double-width # plain 0 30 0 あいうえお 0 30 0 ka 4 30 0 kuke # emphasized over plain 0 31 0 あいうえお 0 31 1 ka 4 31 1 kuke # plain over emphasized 0 32 1 あいうえお 0 32 0 ka 4 32 0 kuke # emphasized over emphasized 0 33 1 あいうえお 0 33 1 ka 4 33 1 kuke ## overwrite partial line, misaligned single-width over double-width # plain 0 35 0 あいうえおさ 1 35 0 a 5 35 0 kuke # emphasized over plain 0 36 0 あいうえおさ 1 36 1 a 5 36 1 kuke # plain over emphasized 0 37 1 あいうえおさ 1 37 0 a 5 37 0 kuke # emphasized over emphasized 0 38 1 あいうえおさ 1 38 1 a 5 38 1 kuke ]) AT_CHECK([render-test --draw-mode --emph=none input], [0], [dnl あきくけ あきくけ あきくけ あきくけ あ?きくけ あ?きくけ あ?きくけ あ?きくけ かいくけお かいくけお かいくけお かいくけお ?か??くけ?さ ?か??くけ?さ ?か??くけ?さ ?か??くけ?さ あkikuko あkikuko あkikuko あkikuko あ?kikuko あ?kikuko あ?kikuko あ?kikuko kaいkukeお kaいkukeお kaいkukeお kaいkukeお ?aい?kuke?さ ?aい?kuke?さ ?aい?kuke?さ ?aい?kuke?さ ]) AT_CHECK([render-test --draw-mode --emph=bold input], [0], [dnl あきくけ あききくくけけ ああきくけ ああききくくけけ あ?きくけ あ?ききくくけけ ああ?きくけ ああ?ききくくけけ かいくけお かかいくくけけお かいいくけおお かかいいくくけけおお ?か??くけ?さ ?かか??くくけけ?さ ?か??くけ?ささ ?かか??くくけけ?ささ あkikuko あkkiikkuukkoo ああkikuko ああkkiikkuukkoo あ?kikuko あ?kkiikkuukkoo ああ?kikuko ああ?kkiikkuukkoo kaいkukeお kkaaいkkuukkeeお kaいいkukeおお kkaaいいkkuukkeeおお ?aい?kuke?さ ?aaい?kkuukkee?さ ?aいい?kuke?ささ ?aaいい?kkuukkee?ささ ]) AT_CHECK([render-test --draw-mode --emph=underline input], [0], [dnl あきくけ あ_き_く_け _あきくけ _あ_き_く_け あ?きくけ あ?_き_く_け _あ?きくけ _あ?_き_く_け かいくけお _かい_く_けお か_いくけ_お _か_い_く_け_お ?か??くけ?さ ?_か??_く_け?さ ?か??くけ?_さ ?_か??_く_け?_さ あkikuko あ_k_i_k_u_k_o _あkikuko _あ_k_i_k_u_k_o あ?kikuko あ?_k_i_k_u_k_o _あ?kikuko _あ?_k_i_k_u_k_o kaいkukeお _k_aい_k_u_k_eお ka_いkuke_お _k_a_い_k_u_k_e_お ?aい?kuke?さ ?_aい?_k_u_k_e?さ ?a_い?kuke?_さ ?_a_い?_k_u_k_e?_さ ]) AT_CLEANUP AT_SETUP([ASCII driver overwriting combining characters]) AT_KEYWORDS([render rendering]) AT_DATA([input], [dnl ## overwriting rest of line, ordinary over combining # plain 0 0 0 àéî 1 0 0 xyz # emphasized over plain 0 1 0 àéî 1 1 1 xyz # plain over emphasized 0 2 1 àéî 1 2 0 xyz # emphasized over emphasized 0 3 1 àéî 1 3 1 xyz ## overwriting rest of line, combining over ordinary # plain 0 5 0 xyz 1 5 0 àéî # emphasized over plain 0 6 0 xyz 1 6 1 àéî # plain over emphasized 0 7 1 xyz 1 7 0 àéî # emphasized over emphasized 0 8 1 xyz 1 8 1 àéî ## overwriting partial line, ordinary over combining # plain 0 10 0 àéîo̧ũẙ 0 10 0 a 2 10 0 iou # emphasized over plain 0 11 0 àéîo̧ũẙ 0 11 1 a 2 11 1 iou # plain over emphasized 0 12 1 àéîo̧ũẙ 0 12 0 a 2 12 0 iou # emphasized over emphasized 0 13 1 àéîo̧ũẙ 0 13 1 a 2 13 1 iou ## overwriting partial line, combining over ordinary # plain 0 15 0 aeiouy 0 15 0 à 2 15 0 îo̧ũ # emphasized over plain 0 16 0 aeiouy 0 16 1 à 2 16 1 îo̧ũ # plain over emphasized 0 17 1 aeiouy 0 17 0 à 2 17 0 îo̧ũ # emphasized over emphasized 0 18 1 aeiouy 0 18 1 à 2 18 1 îo̧ũ ]) AT_CHECK([render-test --draw-mode --emph=none input], [0], [dnl àxyz àxyz àxyz àxyz xàéî xàéî xàéî xàéî aéiouẙ aéiouẙ aéiouẙ aéiouẙ àeîo̧ũy àeîo̧ũy àeîo̧ũy àeîo̧ũy ]) AT_CHECK([render-test --draw-mode --emph=bold input], [0], [dnl àxyz àxxyyzz aàxyz aàxxyyzz xàéî xaàeéiî xxàéî xxaàeéiî aéiouẙ aaéiioouuẙ aeéiouyẙ aaeéiioouuyẙ àeîo̧ũy aàeiîoo̧uũy àeeîo̧ũyy aàeeiîoo̧uũyy ]) AT_CHECK([render-test --draw-mode --emph=underline input], [0], [dnl àxyz à_x_y_z _àxyz _à_x_y_z xàéî x_à_é_î _xàéî _x_à_é_î aéiouẙ _aé_i_o_uẙ a_éiou_ẙ _a_é_i_o_u_ẙ àeîo̧ũy _àe_î_o̧_ũy à_eîo̧ũ_y _à_e_î_o̧_ũ_y ]) AT_CLEANUP AT_SETUP([ASCII driver u8_line_set_length]) AT_KEYWORDS([render rendering]) AT_DATA([input], [dnl 0 0 0 àéî 0 1 0 àéî 0 2 0 àéî 0 3 0 àéî 0 4 0 àéî set-length 0 4 set-length 1 3 set-length 2 2 set-length 3 1 set-length 4 0 0 6 0 あい 0 7 0 あい 0 8 0 あい 0 9 0 あい 0 10 0 あい 0 11 0 あい set-length 6 5 set-length 7 4 set-length 8 3 set-length 9 2 set-length 10 1 set-length 11 0 ]) AT_CHECK([render-test --draw-mode input], [0], [dnl àéî àéî àé à あい あい あ? あ ? ]) AT_CLEANUP AT_SETUP([ASCII driver Unicode box characters]) AT_KEYWORDS([render rendering]) AT_DATA([input], [3 3 1*2 @abc 2*1 @d\ne\nf 2*1 @g\nh\ni @j 1*2 @klm ]) AT_CHECK([render-test --box=unicode input], [0], [dnl ╭───┬─╮ │abc│d│ ├─┬─┤e│ │g│j│f│ │h├─┴─┤ │i│klm│ ╰─┴───╯ ]) AT_CLEANUP AT_SETUP([ASCII driver syntax printback]) AT_DATA([ascii.sps], [dnl SET PRINTBACK=ON. DATA LIST LIST /x * y * a (a23). BEGIN DATA. 1 11 One 2 22 Two 3 33 Three END DATA. REGRESSION /VARIABLES= a /DEPENDENT= x y /STATISTICS=COEFF R ANOVA. ]) AT_CHECK([pspp ascii.sps], [0], [dnl SET PRINTBACK=ON. DATA LIST LIST /x * y * a (a23). Reading free-form data from INLINE. +--------+------+ |Variable|Format| #========#======# |x |F8.0 | |y |F8.0 | |a |A23 | +--------+------+ BEGIN DATA. 1 11 One 2 22 Two 3 33 Three END DATA. REGRESSION /VARIABLES= a ascii.sps:11: warning: REGRESSION: a is not a numeric variable. It will not be included in the variable list. /DEPENDENT= x y /STATISTICS=COEFF R ANOVA. ]) AT_CLEANUP AT_SETUP([ASCII unicode box chars]) AT_DATA([uc.sps], [dnl SET FORMAT=F8.4. DATA LIST NOTABLE LIST /x * . BEGIN DATA. 1 2 3 END DATA. DESCRIPTIVES X. ]) AT_CHECK([pspp -O box=unicode uc.sps], [0], [dnl Valid cases = 3; cases with missing value(s) = 0. ╭────────╥─┬──────┬───────┬───────┬───────╮ │Variable║N│ Mean │Std Dev│Minimum│Maximum│ ╞════════╬═╪══════╪═══════╪═══════╪═══════╡ │x ║3│2.0000│ 1.0000│ 1.0000│ 3.0000│ ╰────────╨─┴──────┴───────┴───────┴───────╯ ]) AT_CLEANUP AT_SETUP([ASCII crash on empty line]) AT_DATA([print.sps], [dnl data list notable /x y 1-2. begin data. 12 end data. print. execute. ]) AT_CHECK([pspp print.sps], [0], [ignore]) AT_CLEANUP pspp-1.0.1/tests/output/html.at0000644000175000017500000000235413137223525013417 00000000000000dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_BANNER([HTML driver]) AT_SETUP([HTML bug]) dnl Checks for a bug which caused the html driver to go into a tight loop. AT_DATA([foo.sps], [data list notable list /w l96_r l99_r l102_r *. begin data. 15 0 0 0 1 1 1 1 2 1 1 2 1 1 2 1 1 1 2 2 1 2 1 1 4 2 2 1 2 2 2 2 end data. weight by w. crosstabs /tables=l96_r by l99_r by l102_r /format=avalue table pivot /statistics=none /cell=count. ]) AT_CHECK([pspp -O format=html foo.sps], [0], [ignore]) AT_CLEANUPpspp-1.0.1/tests/testsuite.at0000644000175000017500000001712313150401674013142 00000000000000# Generated automatically -- do not modify! -*- buffer-read-only: t -*- dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl AT_INIT # Define SKIP_IF for compatibility with Autotest before 2.64 m4_ifndef([AT_SKIP_IF], [m4_define([AT_SKIP_IF], [AT_CHECK([($1) \ && exit 77 || exit 0], [0], [ignore], [ignore])])]) m4_divert_text([PREPARE_TESTS], [dnl if test X"$RUNNER" != X; then wrapper_dir=`pwd`/wrappers rm -f "$wrapper_dir"/* test -d "$wrapper_dir" || mkdir "$wrapper_dir" wrap_dir () { test -d "$1" || return for file in "$1"/*; do if test -x "$file" && test -f "$file"; then base=`basename $file $EXEEXT` wrapper=$wrapper_dir/$base if test ! -e "$wrapper"; then echo "exec $RUNNER $file \"\$@\"" > $wrapper chmod +x $wrapper fi fi done } save_IFS=$IFS; IFS=$PATH_SEPARATOR for dir in $AUTOTEST_PATH; do IFS=$save_IFS test X"$dir" = X && dir=. case $dir in [\\/]* | ?:[\\/]*) wrap_dir "$dir" ;; *) wrap_dir "$abs_top_builddir/$dir" wrap_dir "$abs_top_srcdir/$dir" ;; esac done IFS=$save_IFS PATH=$wrapper_dir:$PATH fi ]) m4_include([tests/data/calendar.at]) m4_include([tests/data/data-in.at]) m4_include([tests/data/data-out.at]) m4_include([tests/data/datasheet-test.at]) m4_include([tests/data/dictionary.at]) m4_include([tests/data/file.at]) m4_include([tests/data/format-guesser.at]) m4_include([tests/data/pc+-file-reader.at]) m4_include([tests/data/por-file.at]) m4_include([tests/data/sys-file-reader.at]) m4_include([tests/data/sys-file.at]) m4_include([tests/data/encrypted-file.at]) m4_include([tests/language/command.at]) m4_include([tests/language/control/do-if.at]) m4_include([tests/language/control/do-repeat.at]) m4_include([tests/language/control/loop.at]) m4_include([tests/language/control/temporary.at]) m4_include([tests/language/data-io/add-files.at]) m4_include([tests/language/data-io/data-list.at]) m4_include([tests/language/data-io/data-reader.at]) m4_include([tests/language/data-io/dataset.at]) m4_include([tests/language/data-io/file-handle.at]) m4_include([tests/language/data-io/get-data-spreadsheet.at]) m4_include([tests/language/data-io/get-data-psql.at]) m4_include([tests/language/data-io/get-data-txt.at]) m4_include([tests/language/data-io/get.at]) m4_include([tests/language/data-io/inpt-pgm.at]) m4_include([tests/language/data-io/list.at]) m4_include([tests/language/data-io/match-files.at]) m4_include([tests/language/data-io/matrix-data.at]) m4_include([tests/language/data-io/print-space.at]) m4_include([tests/language/data-io/print.at]) m4_include([tests/language/data-io/save.at]) m4_include([tests/language/data-io/save-translate.at]) m4_include([tests/language/data-io/update.at]) m4_include([tests/language/dictionary/attributes.at]) m4_include([tests/language/dictionary/delete-variables.at]) m4_include([tests/language/dictionary/formats.at]) m4_include([tests/language/dictionary/missing-values.at]) m4_include([tests/language/dictionary/mrsets.at]) m4_include([tests/language/dictionary/rename-variables.at]) m4_include([tests/language/dictionary/sort-variables.at]) m4_include([tests/language/dictionary/split-file.at]) m4_include([tests/language/dictionary/sys-file-info.at]) m4_include([tests/language/dictionary/value-labels.at]) m4_include([tests/language/dictionary/variable-display.at]) m4_include([tests/language/dictionary/vector.at]) m4_include([tests/language/dictionary/weight.at]) m4_include([tests/language/expressions/evaluate.at]) m4_include([tests/language/expressions/parse.at]) m4_include([tests/language/lexer/command-name.at]) m4_include([tests/language/lexer/lexer.at]) m4_include([tests/language/lexer/q2c.at]) m4_include([tests/language/lexer/scan.at]) m4_include([tests/language/lexer/segment.at]) m4_include([tests/language/lexer/variable-parser.at]) m4_include([tests/language/stats/aggregate.at]) m4_include([tests/language/stats/autorecode.at]) m4_include([tests/language/stats/correlations.at]) m4_include([tests/language/stats/crosstabs.at]) m4_include([tests/language/stats/descriptives.at]) m4_include([tests/language/stats/examine.at]) m4_include([tests/language/stats/graph.at]) m4_include([tests/language/stats/factor.at]) m4_include([tests/language/stats/flip.at]) m4_include([tests/language/stats/frequencies.at]) m4_include([tests/language/stats/glm.at]) m4_include([tests/language/stats/logistic.at]) m4_include([tests/language/stats/means.at]) m4_include([tests/language/stats/npar.at]) m4_include([tests/language/stats/oneway.at]) m4_include([tests/language/stats/quick-cluster.at]) m4_include([tests/language/stats/rank.at]) m4_include([tests/language/stats/regression.at]) m4_include([tests/language/stats/reliability.at]) m4_include([tests/language/stats/roc.at]) m4_include([tests/language/stats/sort-cases.at]) m4_include([tests/language/stats/t-test.at]) m4_include([tests/language/utilities/cache.at]) m4_include([tests/language/utilities/cd.at]) m4_include([tests/language/utilities/date.at]) m4_include([tests/language/utilities/insert.at]) m4_include([tests/language/utilities/permissions.at]) m4_include([tests/language/utilities/set.at]) m4_include([tests/language/utilities/show.at]) m4_include([tests/language/utilities/title.at]) m4_include([tests/language/xforms/compute.at]) m4_include([tests/language/xforms/count.at]) m4_include([tests/language/xforms/recode.at]) m4_include([tests/language/xforms/sample.at]) m4_include([tests/language/xforms/select-if.at]) m4_include([tests/libpspp/abt.at]) m4_include([tests/libpspp/bt.at]) m4_include([tests/libpspp/encoding-guesser.at]) m4_include([tests/libpspp/float-format.at]) m4_include([tests/libpspp/heap.at]) m4_include([tests/libpspp/hmap.at]) m4_include([tests/libpspp/hmapx.at]) m4_include([tests/libpspp/i18n.at]) m4_include([tests/libpspp/line-reader.at]) m4_include([tests/libpspp/ll.at]) m4_include([tests/libpspp/llx.at]) m4_include([tests/libpspp/range-map.at]) m4_include([tests/libpspp/range-set.at]) m4_include([tests/libpspp/range-tower.at]) m4_include([tests/libpspp/sparse-array.at]) m4_include([tests/libpspp/sparse-xarray-test.at]) m4_include([tests/libpspp/str.at]) m4_include([tests/libpspp/string-map.at]) m4_include([tests/libpspp/stringi-map.at]) m4_include([tests/libpspp/string-set.at]) m4_include([tests/libpspp/stringi-set.at]) m4_include([tests/libpspp/tower.at]) m4_include([tests/libpspp/u8-istream.at]) m4_include([tests/libpspp/zip.at]) m4_include([tests/math/chart-geometry.at]) m4_include([tests/math/moments.at]) m4_include([tests/math/randist.at]) m4_include([tests/output/ascii.at]) m4_include([tests/output/charts.at]) m4_include([tests/output/html.at]) m4_include([tests/output/output.at]) m4_include([tests/output/paper-size.at]) m4_include([tests/output/render.at]) m4_include([tests/output/tables.at]) m4_include([tests/ui/terminal/main.at]) m4_include([tests/ui/syntax-gen.at]) m4_include([tests/utilities/pspp-convert.at]) m4_include([tests/perl-module.at]) pspp-1.0.1/tests/automake.mk0000644000175000017500000003777213150401670012732 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- check_PROGRAMS += \ tests/data/datasheet-test \ tests/data/sack \ tests/data/inexactify \ tests/language/lexer/command-name-test \ tests/language/lexer/scan-test \ tests/language/lexer/segment-test \ tests/libpspp/abt-test \ tests/libpspp/bt-test \ tests/libpspp/cmac-aes256-test \ tests/libpspp/encoding-guesser-test \ tests/libpspp/heap-test \ tests/libpspp/hmap-test \ tests/libpspp/hmapx-test \ tests/libpspp/i18n-test \ tests/libpspp/line-reader-test \ tests/libpspp/ll-test \ tests/libpspp/llx-test \ tests/libpspp/range-map-test \ tests/libpspp/range-set-test \ tests/libpspp/range-tower-test \ tests/libpspp/sparse-array-test \ tests/libpspp/sparse-xarray-test \ tests/libpspp/str-test \ tests/libpspp/string-map-test \ tests/libpspp/stringi-map-test \ tests/libpspp/string-set-test \ tests/libpspp/stringi-set-test \ tests/libpspp/tower-test \ tests/libpspp/u8-istream-test \ tests/libpspp/zip-test \ tests/math/chart-get-ticks-format-test \ tests/math/chart-get-scale-test \ tests/output/render-test \ tests/ui/syntax-gen-test check-programs: $(check_PROGRAMS) tests_data_datasheet_test_SOURCES = \ tests/data/datasheet-test.c tests_data_datasheet_test_LDADD = src/libpspp-core.la tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS) tests_data_sack_SOURCES = \ tests/data/sack.c tests_data_sack_LDADD = src/libpspp-core.la tests_data_sack_CFLAGS = $(AM_CFLAGS) tests_libpspp_line_reader_test_SOURCES = tests/libpspp/line-reader-test.c tests_libpspp_line_reader_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_ll_test_SOURCES = \ src/libpspp/ll.c \ tests/libpspp/ll-test.c tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS) tests_libpspp_llx_test_SOURCES = \ src/libpspp/ll.c \ src/libpspp/llx.c \ tests/libpspp/llx-test.c tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS) tests_libpspp_encoding_guesser_test_SOURCES = \ tests/libpspp/encoding-guesser-test.c tests_libpspp_encoding_guesser_test_LDADD = \ src/libpspp/liblibpspp.la \ gl/libgl.la tests_libpspp_heap_test_SOURCES = \ tests/libpspp/heap-test.c tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_heap_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_hmap_test_SOURCES = \ src/libpspp/hmap.c \ tests/libpspp/hmap-test.c tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_hmapx_test_SOURCES = \ src/libpspp/hmap.c \ src/libpspp/hmapx.c \ tests/libpspp/hmapx-test.c tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_i18n_test_SOURCES = tests/libpspp/i18n-test.c tests_libpspp_i18n_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_abt_test_SOURCES = \ src/libpspp/abt.c \ tests/libpspp/abt-test.c tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_bt_test_SOURCES = \ src/libpspp/bt.c \ tests/libpspp/bt-test.c tests_libpspp_bt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_cmac_aes256_test_SOURCES = \ src/libpspp/cmac-aes256.c \ tests/libpspp/cmac-aes256-test.c tests_libpspp_cmac_aes256_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_range_map_test_SOURCES = \ src/libpspp/bt.c \ src/libpspp/range-map.c \ tests/libpspp/range-map-test.c tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_range_set_test_SOURCES = \ tests/libpspp/range-set-test.c tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_range_set_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_range_tower_test_SOURCES = \ tests/libpspp/range-tower-test.c tests_libpspp_range_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_range_tower_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_str_test_SOURCES = \ tests/libpspp/str-test.c tests_libpspp_str_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_string_map_test_SOURCES = \ tests/libpspp/string-map-test.c tests_libpspp_string_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_string_map_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_stringi_map_test_SOURCES = \ tests/libpspp/stringi-map-test.c tests_libpspp_stringi_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_stringi_map_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_string_set_test_SOURCES = \ src/libpspp/hash-functions.c \ src/libpspp/hmap.c \ src/libpspp/string-set.c \ tests/libpspp/string-set-test.c tests_libpspp_string_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_stringi_set_test_SOURCES = \ tests/libpspp/stringi-set-test.c tests_libpspp_stringi_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_stringi_set_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_tower_test_SOURCES = \ tests/libpspp/tower-test.c tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_tower_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_u8_istream_test_SOURCES = tests/libpspp/u8-istream-test.c tests_libpspp_u8_istream_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_sparse_array_test_SOURCES = \ tests/libpspp/sparse-array-test.c tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_sparse_array_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_sparse_xarray_test_SOURCES = \ tests/libpspp/sparse-xarray-test.c tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_sparse_xarray_test_LDADD = src/libpspp/liblibpspp.la \ src/libpspp-core.la \ gl/libgl.la tests_data_inexactify_SOURCES = tests/data/inexactify.c check_PROGRAMS += tests/language/lexer/command-name-test tests_language_lexer_command_name_test_SOURCES = \ src/data/identifier.c \ src/language/lexer/command-name.c \ tests/language/lexer/command-name-test.c tests_language_lexer_command_name_test_LDADD = \ src/libpspp/liblibpspp.la \ gl/libgl.la tests_language_lexer_command_name_test_CFLAGS = $(AM_CFLAGS) check_PROGRAMS += tests/language/lexer/scan-test tests_language_lexer_scan_test_SOURCES = \ src/data/identifier.c \ src/language/lexer/command-name.c \ src/language/lexer/scan.c \ src/language/lexer/segment.c \ src/language/lexer/token.c \ tests/language/lexer/scan-test.c tests_language_lexer_scan_test_CFLAGS = $(AM_CFLAGS) tests_language_lexer_scan_test_LDADD = \ src/libpspp/liblibpspp.la \ gl/libgl.la check_PROGRAMS += tests/language/lexer/segment-test tests_language_lexer_segment_test_SOURCES = \ src/data/identifier.c \ src/language/lexer/command-name.c \ src/language/lexer/segment.c \ tests/language/lexer/segment-test.c tests_language_lexer_segment_test_CFLAGS = $(AM_CFLAGS) tests_language_lexer_segment_test_LDADD = \ src/libpspp/liblibpspp.la \ gl/libgl.la check_PROGRAMS += tests/libpspp/zip-test tests_libpspp_zip_test_SOURCES = \ tests/libpspp/zip-test.c tests_libpspp_zip_test_CFLAGS = $(AM_CFLAGS) tests_libpspp_zip_test_LDADD = \ src/libpspp/liblibpspp.la \ src/libpspp-core.la \ gl/libgl.la check_PROGRAMS += tests/math/chart-get-scale-test tests_math_chart_get_scale_test_SOURCES = tests/math/chart-get-scale-test.c tests_math_chart_get_scale_test_LDADD = \ src/math/libpspp-math.la \ src/libpspp/liblibpspp.la \ src/libpspp-core.la \ gl/libgl.la check_PROGRAMS += tests/math/chart-get-ticks-format-test tests_math_chart_get_ticks_format_test_SOURCES = tests/math/chart-get-ticks-format-test.c tests_math_chart_get_ticks_format_test_LDADD = \ src/math/libpspp-math.la \ src/libpspp/liblibpspp.la \ src/libpspp-core.la \ gl/libgl.la check_PROGRAMS += tests/output/render-test tests_output_render_test_SOURCES = tests/output/render-test.c tests_output_render_test_LDADD = \ src/libpspp.la \ src/libpspp-core.la \ $(CAIRO_LIBS) check_PROGRAMS += tests/ui/syntax-gen-test tests_ui_syntax_gen_test_SOURCES = tests/ui/syntax-gen-test.c tests_ui_syntax_gen_test_LDADD = \ src/ui/libuicommon.la \ src/libpspp-core.la \ $(CAIRO_LIBS) EXTRA_DIST += \ tests/coverage.sh \ tests/data/CVE-2017-10791.sav \ tests/data/CVE-2017-10792.sav \ tests/data/bcd-in.expected.cmp.gz \ tests/data/binhex-in.expected.cmp.gz \ tests/data/binhex-out.expected.gz \ tests/data/hotel-encrypted.sav \ tests/data/legacy-in.expected.cmp.gz \ tests/data/num-in.expected.gz \ tests/data/num-out-cmp.pl \ tests/data/num-out.expected.cmp.gz \ tests/data/v13.sav \ tests/data/v14.sav \ tests/data/test-encrypted.sps \ tests/language/mann-whitney.txt \ tests/language/data-io/Book1.gnm.unzipped \ tests/language/data-io/test.ods \ tests/language/data-io/newone.ods \ tests/language/stats/llz.zsav CLEANFILES += *.save pspp.* foo* # Autotest testsuite EXTRA_DIST += \ tests/testsuite.in \ $(TESTSUITE_AT) \ $(TESTSUITE) \ tests/atlocal.in \ $(srcdir)/package.m4 \ $(TESTSUITE) TESTSUITE_AT = \ tests/data/calendar.at \ tests/data/data-in.at \ tests/data/data-out.at \ tests/data/datasheet-test.at \ tests/data/dictionary.at \ tests/data/file.at \ tests/data/format-guesser.at \ tests/data/pc+-file-reader.at \ tests/data/por-file.at \ tests/data/sys-file-reader.at \ tests/data/sys-file.at \ tests/data/encrypted-file.at \ tests/language/command.at \ tests/language/control/do-if.at \ tests/language/control/do-repeat.at \ tests/language/control/loop.at \ tests/language/control/temporary.at \ tests/language/data-io/add-files.at \ tests/language/data-io/data-list.at \ tests/language/data-io/data-reader.at \ tests/language/data-io/dataset.at \ tests/language/data-io/file-handle.at \ tests/language/data-io/get-data-spreadsheet.at \ tests/language/data-io/get-data-psql.at \ tests/language/data-io/get-data-txt.at \ tests/language/data-io/get.at \ tests/language/data-io/inpt-pgm.at \ tests/language/data-io/list.at \ tests/language/data-io/match-files.at \ tests/language/data-io/matrix-data.at \ tests/language/data-io/print-space.at \ tests/language/data-io/print.at \ tests/language/data-io/save.at \ tests/language/data-io/save-translate.at \ tests/language/data-io/update.at \ tests/language/dictionary/attributes.at \ tests/language/dictionary/delete-variables.at \ tests/language/dictionary/formats.at \ tests/language/dictionary/missing-values.at \ tests/language/dictionary/mrsets.at \ tests/language/dictionary/rename-variables.at \ tests/language/dictionary/sort-variables.at \ tests/language/dictionary/split-file.at \ tests/language/dictionary/sys-file-info.at \ tests/language/dictionary/value-labels.at \ tests/language/dictionary/variable-display.at \ tests/language/dictionary/vector.at \ tests/language/dictionary/weight.at \ tests/language/expressions/evaluate.at \ tests/language/expressions/parse.at \ tests/language/lexer/command-name.at \ tests/language/lexer/lexer.at \ tests/language/lexer/q2c.at \ tests/language/lexer/scan.at \ tests/language/lexer/segment.at \ tests/language/lexer/variable-parser.at \ tests/language/stats/aggregate.at \ tests/language/stats/autorecode.at \ tests/language/stats/correlations.at \ tests/language/stats/crosstabs.at \ tests/language/stats/descriptives.at \ tests/language/stats/examine.at \ tests/language/stats/graph.at \ tests/language/stats/factor.at \ tests/language/stats/flip.at \ tests/language/stats/frequencies.at \ tests/language/stats/glm.at \ tests/language/stats/logistic.at \ tests/language/stats/means.at \ tests/language/stats/npar.at \ tests/language/stats/oneway.at \ tests/language/stats/quick-cluster.at \ tests/language/stats/rank.at \ tests/language/stats/regression.at \ tests/language/stats/reliability.at \ tests/language/stats/roc.at \ tests/language/stats/sort-cases.at \ tests/language/stats/t-test.at \ tests/language/utilities/cache.at \ tests/language/utilities/cd.at \ tests/language/utilities/date.at \ tests/language/utilities/insert.at \ tests/language/utilities/permissions.at \ tests/language/utilities/set.at \ tests/language/utilities/show.at \ tests/language/utilities/title.at \ tests/language/xforms/compute.at \ tests/language/xforms/count.at \ tests/language/xforms/recode.at \ tests/language/xforms/sample.at \ tests/language/xforms/select-if.at \ tests/libpspp/abt.at \ tests/libpspp/bt.at \ tests/libpspp/encoding-guesser.at \ tests/libpspp/float-format.at \ tests/libpspp/heap.at \ tests/libpspp/hmap.at \ tests/libpspp/hmapx.at \ tests/libpspp/i18n.at \ tests/libpspp/line-reader.at \ tests/libpspp/ll.at \ tests/libpspp/llx.at \ tests/libpspp/range-map.at \ tests/libpspp/range-set.at \ tests/libpspp/range-tower.at \ tests/libpspp/sparse-array.at \ tests/libpspp/sparse-xarray-test.at \ tests/libpspp/str.at \ tests/libpspp/string-map.at \ tests/libpspp/stringi-map.at \ tests/libpspp/string-set.at \ tests/libpspp/stringi-set.at \ tests/libpspp/tower.at \ tests/libpspp/u8-istream.at \ tests/libpspp/zip.at \ tests/math/chart-geometry.at \ tests/math/moments.at \ tests/math/randist.at \ tests/output/ascii.at \ tests/output/charts.at \ tests/output/html.at \ tests/output/output.at \ tests/output/paper-size.at \ tests/output/render.at \ tests/output/tables.at \ tests/ui/terminal/main.at \ tests/ui/syntax-gen.at \ tests/utilities/pspp-convert.at \ tests/perl-module.at TESTSUITE = $(srcdir)/tests/testsuite DISTCLEANFILES += tests/atconfig tests/atlocal AUTOTEST_PATH = tests/data:tests/language/lexer:tests/libpspp:tests/output:src/ui/terminal:utilities $(srcdir)/tests/testsuite.at: tests/testsuite.in tests/automake.mk $(AM_V_GEN)printf '\043 Generated automatically -- do not modify! -*- buffer-read-only: t -*-\n' > $@,tmp $(AM_V_at)cat $< >> $@,tmp $(AM_V_at)for t in $(TESTSUITE_AT); do \ echo "m4_include([$$t])" >> $@,tmp ;\ done mv $@,tmp $@ EXTRA_DIST += tests/testsuite.at CHECK_LOCAL += tests_check tests_check: tests/atconfig tests/atlocal $(TESTSUITE) $(check_PROGRAMS) XTERM_LOCALE='' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) RUNNER='$(RUNNER)' $(TESTSUITEFLAGS) CLEAN_LOCAL += tests_clean tests_clean: test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te AUTOTEST = $(AUTOM4TE) --language=autotest $(TESTSUITE): package.m4 $(srcdir)/tests/testsuite.at $(TESTSUITE_AT) $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' $@.at | $(SED) 's/@<00A0>@/ /g' > $@.tmp test -s $@.tmp $(AM_V_at)mv $@.tmp $@ # The `:;' works around a Bash 3.2 bug when the output is not writeable. $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(AM_V_GEN):;{ \ echo '# Signature of the current package.' && \ echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \ echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \ echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \ echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \ echo 'm4_define([AT_PACKAGE_URL], [$(PACKAGE_URL)])'; \ } >'$(srcdir)/package.m4' check-valgrind: $(MAKE) check RUNNER='$(SHELL) $(abs_top_builddir)/libtool --mode=execute valgrind --log-file=valgrind.%p --leak-check=full --num-callers=20' TESTSUITEFLAGS='$(TESTSUITEFLAGS) -d' @echo @echo '--------------------------------' @echo 'Valgrind output is in:' @echo 'tests/testsuite.dir/*/valgrind.*' @echo '--------------------------------' pspp-1.0.1/tests/atlocal.in0000644000175000017500000000411213137223525012526 00000000000000# -*- shell-script -*- # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # Variables used internally by the testsuite. EXEEXT='@EXEEXT@' GNM_READ_SUPPORT='@GNM_READ_SUPPORT@' ODF_READ_SUPPORT='@ODF_READ_SUPPORT@' PERL='@PERL@' WITH_PERL_MODULE='@WITH_PERL_MODULE@' host='@host@' PACKAGE_STRING='@PACKAGE_STRING@' PACKAGE_BUGREPORT='@PACKAGE_BUGREPORT@' PSQL_SUPPORT='@PSQL_SUPPORT@' if test "$PSQL_SUPPORT" = yes; then : ${PG_CONFIG:='@PG_CONFIG@'} : ${PG_DBASE:=pspptest} : ${PG_PORT:=6543} : ${PG_PATH:=`$PG_CONFIG --bindir`} # PSQL_SUPPORT indicates that PSPP was built against the PostgreSQL client # library, but it does not mean that the PostgreSQL utilities are # installed. So check for them and turn off PSQL_SUPPORT if they are not # available. if (PATH=$PG_PATH:$PATH; export PATH; initdb --version) >/dev/null 2>&1 then : else PSQL_SUPPORT=no fi fi # Variables used by programs invoked by the testsuite. CHARSETALIASDIR="$abs_top_builddir/gl" export CHARSETALIASDIR GZIP= export GZIP WINEPREFIX=$HOME/.wine # Work around the following kludge to keep wine happy export WINEPREFIX HOME=/nonexistent # Kluge to make PSPP ignore $HOME/.pspprc. export HOME # Avoids error messages during tests if $TERM is set to an unknown terminal. TERM=; unset TERM pspp_diff=`which diff` if test X"$RUNNER" = Xwine; then diff () { $pspp_diff -w "$@" } fi pspp-1.0.1/tests/utilities/0000755000175000017500000000000013150620333012645 500000000000000pspp-1.0.1/tests/utilities/pspp-convert.at0000644000175000017500000000107113150402323015547 00000000000000AT_BANNER([pspp-convert]) AT_SETUP([pspp-convert crash when output cannot be opened]) dnl Create a small .sav file. AT_DATA([sysfile.sps], [dnl DATA LIST NOTABLE/x 1. BEGIN DATA. 5 END DATA. SAVE OUTFILE='data.sav'. ]) AT_CHECK([pspp -O format=csv sysfile.sps]) AT_CHECK([pspp-convert data.sav nonexistent/output.sav], [1], [], [stderr]) AT_CHECK([grep '[[eE]]rror opening' stderr], [0], [dnl Error opening `nonexistent/output.sav' for writing as a system file: No such file or directory. pspp-convert: nonexistent/output.sav: error opening output file ]) AT_CLEANUP pspp-1.0.1/NEWS0000644000175000017500000012234713150617672010134 00000000000000PSPP NEWS -- history of user-visible changes. Copyright (C) 1996-2000, 2008-2016, 2017 Free Software Foundation, Inc. See the end for copying conditions. Please send PSPP bug reports to bug-gnu-pspp@gnu.org. Changes from 1.0.0 to 1.0.1: * Bug fixes, including fixes for CVE-2017-12958, CVE-2017-12959, CVE-2017-12960, and CVE-2017-12961. Changes from 0.11.0 to 1.0.0: * Translation updates. Changes from 0.10.2 to 0.11.0: * The REGRESSION command now has a /ORIGIN subcommand to perform regression through the origin. * The FACTOR command can now analyse matrix files prepared with MATRIX DATA. * The FACTOR command can now print the anti-image matrices. * The MATRIX DATA command has been added. * Some inappropriate properties in selection dialogs have been corrected. * A bug which could cause the HTML driver to go into a tight loop has been fixed. * An error in the FREQUENCIES procedure, where the word "Mean" was printed when "Variance" was appropriate has been fixed. * The ncurses library is no longer required or used. * A bug where the Mann-Whitney test would give misleading results if run on multiple variables and MISSING=ANALAYSIS was specified has been fixed. * Gtk+3.14.5 or later must now be used when building. * Graphical user interface changes: ** There is a new menu: Edit|Options ** The Non Parametric Statistics Menu has a new item: "K Independent Samples". ** Dialog boxes can now be canceled using the key. * The AUTORECODE command now accepts an optional / before INTO. * The short form of the VECTOR command can now create string variables. * Bug fixes, including fixes for CVE-2017-10791 and CVE-2017-10792. Changes from 0.10.1 to 0.10.2: * CROSSTABS implements a new COUNT subcommand to round case or cell weights. * Help will be opened as HTML in default browser if yelp is not available. * When plotting scatterplots with only one dataset (the simple case) the colour used for the dataset is now black. The previous default from the Tango palette was too faint to see easily. * The varible info dialog could previously only paste a single variable. Now it can paste multiple variables. * Bug fixes, including the following: - T-test with independent samples GUI crashed with string type variable as group variable. - The variable info dialog showed the previous selected variable superimposed with the currently selected one. - The GLM command did not properly deal with missing values. This has been fixed. Changes from 0.10.0 to 0.10.1: * Bug fixes, including the following: - A bug where certain dialog boxes could not be properly populated has been fixed. - Various commands have been hardened against errors when called with invalid syntax. * Translation updates. Thanks to our translators! Changes from 0.8.5 to 0.10.0: * The QUICK CLUSTER command has a /PRINT subcommand which shows the initial cluster centres and the final cluster membership of each case. The clustering algorithm has also been updated, so as to produce better separated clusters. * A Russian localisation has been contributed. * The GRAPH command now has a /BAR subcommand to draw barcharts. * If the DECIMAL character is set to COMMA then the ',' character will not be treated as a separator by DATA LIST. * The graphical user interface (psppire) has been changed as follows: - It now uses Gtk+ version 3 instead of version 2. Accordingly, it has a somewhat different look and feel. - There is now a Graphs menu to access the GRAPH command. - The status of dialog box widgets are now preserved between calls to the same dialog box for the same dataset. - The dialog box for the Logistic Regression command will now infer that string variables or any varible with a "measure" of Nominal or Ordinal are to be treated as categorical variables and will generate syntax accordingly. * The pspp-convert utility can now decrypt encrypted syntax files. The encrypted syntax file format is unacceptably insecure, so to discourage its use PSPP and PSPPIRE do not directly read or write this format. * New commands: - SORT VARIABLES. * The following functions for transformation expressions are new: - REPLACE, for search-and-replace of one string with another. - STRUNC, to truncate a string and trim trailing spaces. - MEDIAN, to compute the median of its arguments. - The TRUNC function in expressions now supports additional arguments for truncating to values other than integers and to indicate a level of rounding fuzz. The default rounding fuzz may now be controlled and displayed with SET FUZZBITS and SHOW FUZZBITS, respectively. * Bug fixes, including the following notable ones: - The correlation coefficient in the paired samples t-test procedure is now correctly calculated when presented with weighted data. - The ESCAPE subcommand has been removed from GET DATA /TYPE=TXT. For compatibility, the behavior that ESCAPE enabled is now the default and only supported behavior. - Rendering of the variable and data sheets in right-to-left locales now works properly. - The Mann-Whitney test, when run on a dataset containing values of the group variable, other than those defining the test groups, would incorrectly calculate the ranks. This has been corrected. * The IMPORTCASES subcommand on GET DATA is now ignored, for compatibility. Changes from 0.8.4 to 0.8.5: * The FREQUENCIES and CROSSTABS commands can now generate barcharts. * The FACTOR command can now perform PROMAX rotations. * SPSS/PC+ system files are now supported on GET and other commands that read SPSS system files. The pspp-convert program can now read SPSS/PC+ system files. Writing the obsolete SPSS/PC+ system file format is not supported. * SYSFILE INFO can now read SPSS/PC+ system files and SPSS portable files. * FREQUENCIES: A bug was fixed where an assertion failure occurred when an empty dataset was presented. * The GRAPH command is now available. Initially it supports scatterplots and histograms. * The RND operator in expressions now supports additional operands for rounding to values other than integers and to indicate a level of rounding fuzz. The default rounding fuzz may now be controlled and displayed with SET FUZZBITS and SHOW FUZZBITS, respectively. Changes from 0.8.3 to 0.8.4: * Formatting of SYSFILE INFO output was made easier to read. * Bug fixes, including the following notable ones: - FREQUENCIES works properly for string variables. (This bug was introduced in 0.8.2.) - CROSSTABS now correctly computes all of the measures that it offers. Some measures have been removed because they were not computed correctly. - The NPAR TESTS calculation of significance for the RUNS subcommand has been corrected. - Planned comparisons in ONEWAY ANOVA now correctly handle negative T-values. - The COUNT command now correctly treats missing values as documented. - Conformance fixes to Open Document output format. Changes from 0.8.2 to 0.8.3: * Independent T-Tests displayed the standard error of the difference and the confidence interval for the unequal variances case, where the equal variances case should have been. This has been fixed. * REGRESSION now recognises /STATISTICS=CI(x) which causes confidence intervals for the coefficients to be printed. * When DESCRIPTIVES calculates Z scores, it now omits cases filtered by the current FILTER settings. * PSPPIRE graphical user interface improvements: - Dialog boxes with source variable lists can now choose the sort order; right click and select from the popup menu. - File|Open now allows an encoding to be selected for opening system files. - File|Display Data File Information|External File... now allows an encoding to be selected. - A problem with the Means dialog has been resolved (bug #41433). - Several problems related to the input of spreadsheets have been fixed (bug #41657, #41620 * System file related improvements: - With ENCODING="DETECT", SYSFILE INFO can now help the user to pick an encoding for reading a system file that does not identify its own encoding - SYSFILE INFO now accepts an ENCODING subcommand to specify the character encoding of string data in the system file. - Variable labels over 255 bytes long are now accepted without truncation (bug #41863). - System files that contain duplicate variable names may now be read successfully (bug #41475). Changes from 0.8.1 to 0.8.2: * Charts are now rendered with colours from the Tango palette instead of fully saturated primaries. * Support for new system file variants: - PSPP can now read and write ZCOMPRESSED system files, which compress data much more effectively than older "compressed" files. (The older format is still supported.) - PSPP can now decrypt encrypted system files, using the new pspp-convert utility. The encrypted system file format is unacceptably insecure, so to discourage its use PSPP and PSPPIRE do not directly read or write this format. * Missing values for long string variables are now read from and written to system files in an SPSS-compatible fashion. (Earlier versions of PSPP that supported missing values for long string variables wrote them to system files in an SPSS-incompatible way. To fix the problem, read the system file with this version of PSPP and then save a new copy of it.) * pspp-convert, a new standalone utility for converting SPSS system and portable files to other formats, is now included. The initial version supports comma-separated value files as output format. pspp-convert can also decrypt encrypted system files. * Build changes: - zlib is now a required dependency. (Previously it was optional.) Changes from 0.8.0 to 0.8.1: * New commands: - VARIABLE ROLE. * Changes to existing commands: - CROSSTABS: The requirement that one expected count must be less than five before Fishers Exact Test will be reported has been removed. * PSPPIRE graphical user interface improvements: - A new set of icons has been contributed. - Syntax windows now parse syntax in "auto" mode, which in practice should mean that both "batch" and "interactive" syntax now works, instead of just "interactive" syntax. - The variable pane of data windows now include a Role column. * Notable bug fixes: - System files written by IBM SPSS 21 are now read without warnings. - System files written by "VOXCO INTERVIEWER 4.3" are now read without warnings. - PSPPIRE should now more gracefully handle syntax files that contain errors. Changes from 0.6.2 to 0.8.0: * New commands: - ADD FILES - CORRELATIONS - DATAFILE ATTRIBUTES - DATASET ACTIVATE - DATASET CLOSE - DATASET COPY - DATASET DECLARE - DATASET DISPLAY - DATASET NAME - LOGISTIC REGRESSION - MATCH FILES - MEANS - MRSETS - PRESERVE and RESTORE - QUICK CLUSTER - RELIABILITY - ROC - SAVE TRANSLATE to CSV and tab-delimited files - UPDATE - VARIABLE ATTRIBUTES * Changes to existing commands: - AUTORECODE has a new GROUP subcommand. - CROSSTABS has been re-implemented to fix numerous bugs. - EXAMINE: /MISSING=LISTWISE is now the default. - DO REPEAT command has been reimplemented. Now, when DO REPEAT contains an INCLUDE or INSERT command, substitutions are not applied to the included file. - FILE HANDLE has a new ENDS subcommand to select CR or CRLF new-lines. - HOST has been updated to use more modern syntax. - Most commands that work with data files now support a new ENCODING subcommand. - MISSING VALUES can now assign missing values to long string variables. - ONEWAY: the POSTHOC subcommand is now implemented. - The following new subcommands to NPAR TESTS have been implemented: COCHRAN, FRIEDMAN, JONCKHEERE-TERPSTRA, KENDALL, KRUSKAL-WALLIS, MANN-WHITNEY, MCNEMAR, SIGN, WILCOXON, and RUNS - SET and SHOW no longer have ENDCMD, NULLINE, PROMPT, CPROMPT, and DPROMPT subcommands. The defaults are now fixed values. - SHOW now has a JOURNAL subcommand, to show the location of the journal file. - VALUE LABELS can now assign value labels to long string variables. * Other language changes: - The new DATASET commands replace the "scratch file" PSPP extension, which is no longer supported. - Strings may now include arbitrary Unicode code points specified in hexadecimal, using the syntax U'hhhh'. For example, Unicode code point U+1D11E, the musical G clef character, may be expressed as U'1D11E'. See the "Tokens" section in the PSPP manual for more information. - In previous versions of PSPP, in a string expressed in hexadecimal with X'hh' syntax, the hexadecimal digits expressed bytes in the locale encoding. In this version of PSPP, X'hh' syntax always expresses bytes in UTF-8 encoding. See the "Tokens" section in the PSPP manual for more information. * PSPPIRE graphical user interface improvements: - Added support for non-ASCII characters in strings, labels and variable names. - A "Split Window" function is available, which makes it easier to see different parts of a large data file. - Data files can now be opened by specifing their name as the first argument. This means that on a properly configured desktop, double clicking on an icon will open the file. - Foreign formats, such as Gnumeric, OpenDocument and CSV can be imported via using an "intelligent" application assistant dialog. * Output changes: - The new "cairo" output driver supports output in PostScript, PDF, and SVG formats. Its functionality is a superset of that of the "postscript" driver, which has been removed. You must have Cairo and Pango installed to build the "cairo" driver. - Charts are now produced with Cairo and Pango, instead of libplot. Without them, the new graphing features will not work. If you do not have Cairo and Pango installed, you must run `configure' with --without-cairo. - The plain text output driver now properly supports multibyte UTF-8 characters, including double-width characters and combining accents. - Output to OpenDocument format is now supported. - The HTML output is much improved. * The "pspp" program has a new option --batch (or -b) that selects "batch" syntax mode. In previous versions of PSPP this syntax mode was the default. Now a new "auto" syntax mode is the default. In "auto" mode, PSPP interprets most syntax files correctly regardless of their intended syntax mode. See the "Syntax Variants" section in the PSPP manual for more information. * The "pspp" program has a new option --syntax-encoding that specifies the encoding for syntax files listed on the command line, as well as the default encoding for syntax files included with INCLUDE or INSERT. The default is to accept the system locale encoding, UTF-8, UTF-16, or UTF-32, automatically detecting which one the system file uses. See the documentation for the INSERT command in the PSPP manual for more information. * Text data files that PRINT and WRITE creates now use the system native line ends by default (CRLF on Windows, LF only elsewhere). Use the new ENDS subcommand on FILE HANDLE to override the default. * A new Perl module allows Perl programs to read and write PSPP system files. * A tutorial chapter has been added to the user manual. Changes from 0.6.1 to 0.6.2: * New translations: - Dutch, thanks to Harry Thijssen. - Brazilian Portuguese, thanks to Michel Boaventura. Thanks for translations are also due to the coordinators at translationproject.org. * Statistical bug fixes: - REGRESSION: Report correct standard error of the estimate (bug #25677). - T-TEST: Report correct significance of paired sample T-test in the common case (bug #26936) and corner cases. Thanks to Mike Griffiths and Matej Cepl for reporting these bugs. * Build fixes and changes: - Fix build with GTK+ 2.17.4 and later. - Make running "make" after running "configure" with different settings reliably rebuild version.c. - Cygwin and MinGW build fixes. - Fixes for building with recent gnulib. - The Makefile now honors two new variables, PSPP_LDFLAGS and PSPPIRE_LDFLAGS, that affect linking of the PSPP and PSPPIRE binaries, respectively. This makes building easier for some packagers. - Fixes for "configure --enable-relocatable" (bug #25508). * Data file bug fixes and changes: - Fix reading text data files that contain a mix of white space and commas. Now "a ,b" is treated as two fields containing "a" and "b"; previously it was treated as three, with an empty field in the middle. - Fix writing corrupted .sav files on Windows. - Fix writing variable labels longer than 252 bytes to save files. Thanks to Robert Westlund for reporting this bug. - Fix writing corrupted .por files (bug #26034). - Fix reading .por files whose initial lines are not padded out with spaces as expected. - PSPP will no longer issue warnings about some .sav file records or values that it does not understand. These warnings were harmless, but needlessly alarmed some users. - Fix crash reading empty string fields from PostgreSQL databases. * Bug fixes that affect PSPP and PSPPIRE: - Users may now control precision of output statistics. Instead of hard coding the width and decimals of output numbers, respect the default format in most instances. Counts are now normally displayed with the format of the weight variable, if any. - Fix crash when an INSERT command specifies the name of a file that does not exist (bug #24569). - Fix crash when CROSSTABS specifies a long-string variable (bugs #24557 and #26131). - Fix crash drawing pie charts with many segments. - Fix crash when NUMERIC specifies an invalid format. * PSPPIRE bug fixes and changes: - On Windows, write the output file to the user's home directory instead of the current directory, to better match user expectations. - Some data editor fixes. * Documentation: - Fix typo in BINOMIAL section of user manual (bug #25892). Changes from 0.6.0 to 0.6.1: * Statistical bug fixes: - Report correct standardized regression coefficients in linear regression output (bug #23567). * Bug fixes that affect PSPP and PSPPIRE: - Avoid crash with pie charts (bug #24014). - Don't append % to count totals (bug #24003). - Don't crash on bad input (bug #24031). - Don't crash if "end data." is not left aligned (bug #24115). - Change default workspace value to 64 MB, to avoid unnecessary disk accesses on modern machines. * PSPPIRE bug fixes: - Add ".sav" or ".por" suffix to filename when saving with Save_As (bug #23137). - Make it possible to reopen the output window on Windows (bug #24033). - A POSIX regular expression library is now included and used automatically if the host does not have one or has one that is inadequate. * Build fixes and changes: - Work around bug in GSL that prevented build with recent GCC versions without manually adding -fgnu89-inline to CFLAGS. - Also warn about missing prerequisites as we encounter them (bug #24445). - Distribute necessary files to allow users working from the distributed tarball to configure with --enable-gui-tools. - Append $(EXEEXT_FOR_BUILD) to output file name when building q2c, fixing build problems on Windows. - GSL 1.8 or later is now required. - Build errors with --enable-relocatable were fixed. * The German translations were removed, since native German speakers found them too poor to be useful. Changes from 0.4.0 to 0.6.0: * The PSPP license is now version 3 or later of the GNU General Public License. Previously, it was version 2 or later. * PSPP now has a graphical interface, called PSPPIRE. This interface allows you to enter data and variable definitions interactively. Commands may be executed in syntax form, or by using the interactive dialog boxes available from the dropdown menus. * A few sample syntax files are now included in the `examples' directory. * Numerous major and minor bugs have been fixed. Build changes: * The INSTALL file now reflects the details of how to install PSPP. It is a tailored version of the generic installation instructions, instead of a verbatim copy. * iconv, which is ordinarily installed as part of a Unix-like system, is now required. If you don't have it already, you can install GNU libiconv (http://www.gnu.org/software/libiconv/). * libxml2 and zlib are new optional dependencies. They are required to use PSPP's support for reading Gnumeric files. Statistical procedure changes: * REGRESSION is a new procedure for fitting linear models to data via least-squares estimation. * NPAR TESTS is a new procedure for non-parametric tests. In this release, it supports binomial and chi-square tests. * RANK is a new procedure to rank variables. It supports numerous forms of ranking. * FREQUENCIES can now output histograms and pie charts. These features were present in earlier releases, but not documented. User interface changes: * In many situations where PSPP once terminated with a fatal error, PSPP now recovers and continues execution. * PSPP is now able to start up and run even if it cannot find its configuration files. * Journaling of interactive commands to a disk file is now implemented. By default, journaling is enabled, to a file named `pspp.jnl' in the current directory. SET JOURNAL may be used to control journaling. * The use of `+' between syntax file names on the command line to prevent the dictionary from being cleared between their executions is no longer supported. All syntax files are now executed as if `+' had been specified. * The -d/--define and -u/--undef command line options are no longer supported. Instead, use /usr/bin/env or shell primitives to define or clear environment variables before invoking PSPP. * If a syntax file named named `rc' is found in a configuration directory (such as $HOME/.pspp), it is executed before any syntax file specified on the command line. The -r or --no-statrc command line option may be used to disable this behavior. Output changes: * Output configuration options have changed. Please refer to the manual for a full description of the available options. In consequence, you will need to reinstall your "devices" file. "make install" will do this for you. * Most error messages are now written to PSPP output files by default. SET ERROR can be used to disable this behavior. * When invoked interactively, PSPP now by default produces output on the terminal, piping it through the "more" program. Previously, by default output was written only to file pspp.list. On most terminals, the page length used for output automatically adapts to the terminal size, even if the terminal is resized. * ASCII driver: - This driver now supports charts in output. Charts are written as separate files that the main output file refers to. By default, charts are written in PNG format to files named pspp-1.png, pspp-2.png, and so on. - Configurations are provided that use VT100 (and xterm) line-drawing characters in tables. The option "-o list-vt100" requests use of this device for output to pspp.list. * PostScript driver: - The default paper size is now determined using the PAPERSIZE environment variable, or the LC_PAPER locale category on systems that support it. If these are not set, the default is now A4, instead of US letter. To make US letter the default, set PAPERSIZE to "letter" in your environment. - Font metrics are now read from AFM files, instead of Groff-format metrics files. PostScript fonts can now be embedded in output. In consequence, you will need to install an AFM file for each font used in PostScript output. "make install" will install AFM files for the standard PostScript fonts, including the ones that the PostScript driver uses by default. - Standard paper sizes no longer need to be specified through a configuration file. The "papersize" configuration file is no longer needed, or supported. - The PostScript prologue is no longer obtained from the "ps-prologue" configuration file. This configuration file is no longer needed, or supported. * HTML driver: - The HTML prologue is no longer obtained from the "html-prologue" configuration file. This configuration file is no longer needed, or supported. Command language changes: * The following commands are new: - GET DATA, which currently supports reading Gnumeric files and text data files. It will be extended later to read other types of foreign data. - CD, to change the current directory. - INSERT, to execute a syntax file. - DELETE VARIABLES, to remove variables from the active file dictionary. - ADD DOCUMENT, to add text to active file documents. - CLOSE FILE HANDLE (a PSPP extension; see below). - XEXPORT, a PSPP extension that is a transformation equivalent to EXPORT. * The following functions for transformation expressions are new: - DATEDIFF, for computing the difference of two dates. - DATESUM, for advancing a date by a specified duration. - VALUELABEL, to obtain the value label for a value. * PSPP now supports very long string variables (over 255 bytes long). * MATCH FILES now supports the FIRST and LAST subcommands. * Previous versions of PSPP prohibited using commands to both read and write a single file at the same time. Now, PSPP allows this, and the new version of the file atomically replaces the old version. * The following commands are no longer available. They will be re-implemented in a later release: - CLEAR TRANSFORMATIONS - MATRIX DATA - REPEATING DATA * The PROCESS IF command, which was deprecated, has been removed. You may replace any usage of it by SELECT IF following TEMPORARY, which has the same effect. * The output format for variables created by VECTOR may now be specified as part of the VECTOR syntax. "Scratch files", a new PSPP extension: A scratch file, like a system file, consists of a dictionary and any number of cases. Small scratch files are stored in memory; one that grows too large is written to disk. By default, any file handle whose name begins with # is assumed to refer to a scratch file. Scratch files can be used just about anywhere a system or portable file can be used. Also, portable files are now allowed in most places that system files were allowed in previous PSPP version. A new CLOSE FILE HANDLE command allows the storage associated with scratch files to be freed. It also allows file handles to be reassigned to new files. For more information on scratch files, refer to the "File Handles" section in the PSPP manual. For specifics of what commands now allow what kinds of files to be specified, refer to the documentation on those particular commands. Data access changes: * Binary formats and IBM/360 formats, including ASCII/EBCDIC translation, are now supported. Use FILE HANDLE to specify the format of these files. * Little-endian, big-endian, and VAX-endian formats are now supported for integer binary formats when reading and writing data files. The new RIB and WIB subcommands on the SET command control endianness of integer data. The default is the host's native endianness. * IEEE 754, VAX, and IBM hexadecimal formats are now supported for floating point binary formats when reading and writing data files. The new RRB and WRB subcommands on the SET command control the floating point format. The default is the host's native floating point format. * DATA LIST now supports the SKIP subcommand, to skip records at the beginning of a file. For compatibility, DATA LIST now treats N format as F format for FREE and LIST format input. * The SAVE and XSAVE commands now support the UNSELECTED, PERMISSIONS, NAMES, and MAP subcommands. * The EXPORT command has been re-implemented to obtain better results. Support for the UNSELECTED, DIGITS, and TYPE subcommands has been added. * For compatibility, PRINT now inserts a space at the beginning of every output line, even lines that would otherwise be blank, when OUTFILE is specified. (The behavior of WRITE is unchanged.) * For compatibility, PRINT EJECT now inserts the digit `1' at the beginning of each line that should begin a new page. * For compatibility, WRITE now outputs the system-missing value as a field filled with spaces. Binary formats are an exception. (The behavior of PRINT is unchanged.) Documentation: * Input and output format descriptions have been rewritten. They now precisely describe what is accepted on input and written on output. * The descriptions of the PSPP system and portable file formats have been extensively revised and improved. For developers, the build system now requires Autoconf 2.60 and Automake 1.10. Changes from 0.3.0 to 0.4.0: Changes in build dependencies: * The GNU Scientific Library (libgsl), version 1.6 or later, is now required. * libplot from GNU plotutils is optional. Without it, the new graphing features will not work. If you do not have it installed, you must run `configure' with --without-libplot. * libgmp2 is no longer a dependency. Newly implemented commands and statistical features: * EXAMINE, including its graphing features. * FREQUENCIES now supports percentiles. * ONEWAY. * PERMISSIONS. * SHOW. * SORT CASES now sorts stably, that is, two cases with equal sort criteria will be in the same relative order before and after the sort. * T-TEST (re-written). * DATE and USE. These commands are parsed but otherwise ignored, to enhance compatibility with certain command files that invoke them unnecessarily. * VARIABLE WIDTH, VARIABLE ALIGNMENT, and VARIABLE LEVEL. These currently have no effect on PSPP output, but their values are written to and read from system files and thus may affect third-party software. * SET EPOCH implemented. * DATA LIST FREE and DATA LIST LIST now support arbitrary field delimiters. * FILE HANDLE now supports custom tab widths. Long variable names (and other identifiers) are now supported. Up to the first 64 bytes of each identifier is significant. PSPP now reads and writes system files compatible with SPSS version 12. New --algorithm and --syntax command line options allow SPSS-compatible or enhanced modes to be selected. Support for transformation expressions has been rewritten and significantly improved. Refer to the manual for details. Calculation of moments (mean, standard deviation, kurtosis, skewness) has been rewritten and should now be more accurate. In --algorithm=enhanced mode moments may be more accurate than SPSS in some cases. Numerous bugs have been fixed, too many to mention here. Many new tests have been added, leading to the discovery and fixing of many of these bugs. The ASCII output driver can now squeeze multiple blank lines into single blank lines. Much of the code has been rewritten and refactored. It is now much cleaner. The FILE TYPE and REPEATING DATA commands have been disabled for this release because their implementations were deemed too buggy to be useful. They will be fixed and replaced in a future release. New pspp-mode for Emacs (in pspp-mode.el). Added rudimentary command-line completion for interactive input. lib/julcal and lib/dcdflib are no longer used, so they have been removed. For developers, the build system now requires Autoconf 2.58 and Automake 1.7. The included gettext has been updated to version 0.12.1. Some reports state that Texinfo 4.8, the latest version, may be necessary to successfully format the documentation on some systems. Version 0.3.0 changes since 0.2.3: Bugs fixed: * Using alphanumeric variables in functions under AGGREGATE segfaulted. Fixed. * Under certain circumstances, the final case would be omitted from the results of an AGGREGATE operation. Fixed. * Undefined behavior was invoked by referencing a freed pointer under certain circumstances. Fixed. * A wrong record size was displayed when paging the active file to disk. Fixed. * Not having enough temporary space for sorting caused a core dump. Fixed. * Syntax errors in function descriptions on AGGREGATE caused core dumps. Fixed. * A null pointer was dereferenced, causing a core dump, when PERCENTILES was specified on FREQUENCIES. This fixes the problem, but PSPP still doesn't calculate percentiles. * SORT always sorted in ascending order. Fixed. * Some minor memory leaks in the expression parser were removed. * Many assertions fixed for strict ANSI C compliance. New features: * SET ECHO ON now implemented, but turned off by default. * PRINT specifier supported on END REPEAT. Other: * System libgmp2 library is used if installed instead of unconditionally using the included libgmp2 subset. * Extensive code cleanup, which continues. * Added CORRELATIONS command parser, but not implemented. Version 0.2.3 changes since 0.2.2: Bugs fixed: * SPLIT FILE with a string variable caused a core dump. Fixed. * Nested INCLUDEs didn't work. Fixed. * The MATCH FILES procedure set the values of variables not present to 0. It should have been SYSMIS. This is now fixed. * The REMARK command was too aggressive about skipping lines. It didn't like being the last command in a file. * Comment parsing wasn't consistent with the rest of the code in its idea of where one command ends and another starts. This meant that sometimes commands would be mysteriously ignored. Thanks to Dr. Dirk Melcher for reporting this bug. * The TABLE subcommand on MATCH FILES worked only erratically at best. This fixes it. Thanks to Dr. Dirk Melcher for reporting this bug. * VARIABLE LABELS rejected a slash before the first variable specification, contradicting the documentation. Thanks to Walter M. Gray for reporting this bug. * Because of an incorrect optimization in memory allocation, CROSSTABS sometimes segfaulted when asked to output multiple tables. Thanks to Walter M. Gray for reporting this bug. * CROSSTABS didn't display value labels for column and row variables. Thanks to Walter M. Gray for reporting this bug. * WRITE didn't write line ends. Fixed. Thanks to Dr. Dirk Melcher for reporting this bug. * The TABLE subcommand on MATCH FILES worked only erratically at best. This fixes it. Thanks to Dr. Dirk Melcher for reporting this bug. * VARIABLE LABELS rejected a slash before the first variable specification, contradicting the documentation. Thanks to Walter M. Gray for reporting this bug. * Because of an incorrect optimization in memory allocation, CROSSTABS sometimes segfaulted when asked to output multiple tables. Thanks to Walter M. Gray for reporting this bug. * CROSSTABS didn't display value labels for column and row variables. Thanks to Walter M. Gray for reporting this bug. * WRITE didn't write line ends. Fixed. Thanks to Dr. Dirk Melcher for reporting this bug. * MATCH FILES corrupted memory and dumped core on some syntax errors. Fixed. * MATCH FILES should set numeric values not available to the system-missing value, not to 0. Thanks to Dr. Dirk Melcher for reporting this bug. * KEEP didn't work properly on the SAVE procedure. Fixed. Thanks to Ralf Geschke for reporting this bug. * Memory leak fix. * Some systems didn't like the way open_file was coded. Thanks to Hankin for pointing this out. * The SAVE procedure didn't save long string variables properly. Fixed by this patch. Thanks to Hankin for this patch. * Minor documentation fixes for MATCH FILES. Version 0.2.2 changes since 0.2.1: Bugs fixed: * Fix behavior of PRINT SPACE for negative arguments. * Fix reading some unusual system files. * Fix LIST problems with very long variables. Thanks to Hankin for this bug report. * Fix problems with some string format specifiers. * Fix use of $CASENUM in expressions. Thanks to Dirk Melcher for reporting this bug. * Additional DATA LIST FREE and DATA LIST LIST fixes. Thanks to Hankin again on this one. * Sometimes you may encounter a PSPP script that has to be interpreted in interactive mode. Now you can use the -i flag to do this. * Warnings for egcs 1.1.1 cleaned up. (However you'll get lots of `unused variable' warnings under gcc 2.7.2.3, fixing this will take more effort.) * Tests fixed. * The files in gmp need the internationalization directory in their include path. Thanks to OKUJI Yoshinori for pointing this out. Version 0.2.1 changes since 0.2.0: Bugs fixed: * Remember to include examples/ directory in distribution :-) * Fixed gmp compile problems for some non-i386 architectures. Thanks to Hans Olav Eggestad and others for reporting this. * DATA LIST FREE and DATA LIST LIST parsing of input files is now matches the documented behavior exactly, and error messages are more helpful. Thanks to Mark H. Wood . Version 0.2.0 changes since 0.1.0: Procedures now implemented: * CROSSTABS. Please see documentation for caveats. Transformations and utilities now implemented: * AGGREGATE * APPLY DICTIONARY * CLEAR TRANSFORMATIONS * DISPLAY (all subcommands). * ERASE * FLIP * EXPORT * HOST * IMPORT * MATCH FILES * MATRIX DATA * NEW FILE * REPEATING DATA Support for input and output through pipes: "|command" and "command|" filenames; support for special filenames "-", "stdin", "stdout", "stderr". New command-line features: * New option --testing-mode: Invoke heuristics to assist testing. * New option --safer, -s: Don't allow certain unsafe operations. * New option --command=CMD, -c CMD: Perform literal command CMD. * rc file ~/.pspp/rc is executed before any other files. * Now multiple syntax files can be specified. Operator LAG is now implemented. Added missing FILE subcommand to REREAD. Table output manager completely rewritten. Device configuration file syntax changed. You will need to reinstall your `devices' file. New output driver for HTML. PostScript driver and prologue simplified. Many bugs fixed. General source-code cleanup. Added Texinfo documentation for: * PSPP system file format * PSPP portable file format * How to write input for q2c parser generator * HTML driver PSPP language is now fully documented. Please report any inaccuracies or omissions in the documentation. Changes for version 0.1.0: First public release. For changes from unreleased development versions, please see ONEWS. ---------------------------------------------------------------------- Copyright information: Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the copyright notice and this permission notice are preserved, thus giving the recipient permission to redistribute in turn. Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions, provided also that they carry prominent notices stating who last changed them. Local variables: version-control: never mode: indented-text end: pspp-1.0.1/README0000644000175000017500000001011012470434665010300 00000000000000PSPP is a program for statistical analysis of sampled data. It is a free replacement for the proprietary program SPSS. PSPP supports T-tests, ANOVA and GLM analyses, factor analysis, non-parametric tests, linear and logistic regression, clustering, and other statistical features. PSPP produces statistical reports in plain text, PDF, PostScript, CSV, HTML, SVG, and OpenDocument formats. It can import data from OpenDocument, Gnumeric, text and SPSS formats. PSPP has both text-based and graphical user interfaces. The PSPP user interface has been translated into a number of languages. Instructions for PSPP installation are in INSTALL, including a list of prerequisite packages and other PSPP-specific information. Full documentation on PSPP's language is also included. For information on differences from previous versions, please see file NEWS. Source code for the latest release of PSPP is available at ftp://ftp.gnu.org/pub/gnu/pspp/. Test releases are at ftp://alpha.gnu.org/gnu/pspp/. Development sources are available at http://savannah.gnu.org/projects/pspp The following miscellaneous notes apply to this release: * On a few operating systems, such as OpenBSD, some of the tests may fail with messages similar to: 'Warning: cannot create a converter for "646" to "UTF-8"'. These test failures may safely be ignored. Questions and comments about using PSPP may be sent to pspp-users@gnu.org. Bug reports may be filed at http://savannah.gnu.org/bugs/?group=pspp or emailed to bug-gnu-pspp@gnu.org. We prefer the web-based system because it makes it more difficult for us to lose track of bugs, but we are happy to hear from users through any means. The long term goals for PSPP are ambitious. We wish to provide the following support to users: * All of the SPSS transformation language. PSPP already supports a large subset of it. * All the statistical procedures that someone is willing to implement, whether they exist in SPSS or not. * Compatibility with SPSS syntax, including compatibility with known bugs and warts, where it makes sense. We also provide an "enhanced" mode in certain cases where PSPP can output better results that may surprise SPSS users. * Friendly textual and graphical interfaces. * Good documentation. Currently the PSPP manual describes its language completely, but we would like to add information on how to select statistical procedures and interpret their results. * Efficient support for very large data sets. For procedures where it is practical, we wish to efficiently support data sets many times larger than physical memory. The framework for this feature is already in place. It has not been tuned or extensively tested, however initial experience has given impressive results. Over the long term, we also wish to provide support to developers who wish to extend PSPP with new statistical procedures, by supplying the following: * Easy-to-use support for parsing language syntax. Currently, parsing is done by writing "recursive descent" code by hand, with some support for automated parsing of the most common constructs. We wish to improve the situation by supplying a more complete and flexible parser generator. * Easy-to-use support for producing attractive output. Currently, output is done by writing code to explicitly fill in table cells with data. We should be able to supply a more convenient interface that also allows for providing machine-readable output. * Eventually, a plug-in interface for procedures. Over the short term, the interface between the PSPP core and statistical procedures is evolving quickly enough that a plug-in model does not make sense. Over the long term, it may make sense to introduce plug-ins. For any copyright year range specified as YYYY-ZZZZ in this package note that the range specifies every single year in that closed interval. pspp-1.0.1/acinclude.m40000644000175000017500000003074612646647703011636 00000000000000dnl Copyright (C) 2005, 2006, 2007, 2009, 2014, 2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Prerequisites. dnl Summarize all the missing prerequisites at the end of the run to dnl increase user-friendliness. AC_DEFUN([PSPP_REQUIRED_PREREQ], [AC_MSG_WARN([You must install $1 before building PSPP.]) pspp_required_prereqs="$pspp_required_prereqs $1"]) AC_DEFUN([PSPP_OPTIONAL_PREREQ], [pspp_optional_prereqs="$pspp_optional_prereqs $1"]) AC_DEFUN([PSPP_CHECK_PREREQS], [ if test "$pspp_optional_prereqs" != ""; then AC_MSG_WARN([The following optional prerequisites are not installed. You may wish to install them to obtain additional functionality:$pspp_optional_prereqs]) fi if test "$pspp_required_prereqs" != ""; then AC_MSG_ERROR([The following required prerequisites are not installed. You must install them before PSPP can be built:$pspp_required_prereqs]) fi ]) dnl Check that a new enough version of Perl is available. AC_DEFUN([PSPP_PERL], [ AC_PATH_PROG([PERL], perl, no) AC_SUBST([PERL])dnl if test "$PERL" != no && $PERL -e 'require 5.005_03;'; then :; else PSPP_REQUIRED_PREREQ([Perl 5.005_03 (or later)]) fi # The PSPP autobuilder appends a build number to the PSPP version number, # e.g. "0.7.2-build40". But Perl won't parse version numbers that contain # anything other than digits and periods, so "-build" causes an error. So we # define $(VERSION_FOR_PERL) that drops everything from the hyphen onward. VERSION_FOR_PERL=`echo "$VERSION" | sed 's/-.*//'` AC_SUBST([VERSION_FOR_PERL]) ]) dnl PSPP_CHECK_CC_OPTION([OPTION], [ACTION-IF-ACCEPTED], [ACTION-IF-REJECTED]) dnl Check whether the given C compiler OPTION is accepted. dnl If so, execute ACTION-IF-ACCEPTED, otherwise ACTION-IF-REJECTED. AC_DEFUN([PSPP_CHECK_CC_OPTION], [ m4_define([pspp_cv_name], [pspp_cv_[]m4_translit([$1], [-], [_])])dnl AC_CACHE_CHECK([whether $CC accepts $1], [pspp_cv_name], [pspp_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,)], [pspp_cv_name[]=yes], [pspp_cv_name[]=no]) CFLAGS="$pspp_save_CFLAGS"]) if test $pspp_cv_name = yes; then m4_if([$2], [], [;], [$2]) else m4_if([$3], [], [:], [$3]) fi ]) dnl Check for readline and history libraries. dnl Modified for PSPP, based on readline.m4 serial 3 from dnl gnulib, which was written by Simon Josefsson, with help from Bruno dnl Haible and Oskar Liljeblad. AC_DEFUN([PSPP_READLINE], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libreadline and define LIBREADLINE, LTLIBREADLINE and dnl INCREADLINE accordingly. AC_LIB_LINKFLAGS_BODY([readline]) AC_LIB_LINKFLAGS_BODY([history]) dnl Add $INCREADLINE to CPPFLAGS before performing the following checks, dnl because if the user has installed libreadline and not disabled its use dnl via --without-libreadline-prefix, he wants to use it. The AC_LINK_IFELSE dnl will then succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCREADLINE $INCHISTORY]) AC_CACHE_CHECK(for readline, gl_cv_lib_readline, [ gl_cv_lib_readline=no am_save_LIBS="$LIBS" dnl On some systems, -lreadline doesn't link without an additional dnl -lncurses or -ltermcap. dnl Try -lncurses before -ltermcap, because libtermcap is unsecure dnl by design and obsolete since 1994. Try -lcurses last, because dnl libcurses is unusable on some old Unices. for extra_lib in "" ncurses termcap curses; do LIBS="$am_save_LIBS $LIBREADLINE $LIBHISTORY" if test -n "$extra_lib"; then LIBS="$LIBS -l$extra_lib" fi AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include #include #include ]], [[readline((char*)0); add_history((char*)0);]])],[gl_cv_lib_readline=yes],[]) if test "$gl_cv_lib_readline" = yes; then if test -n "$extra_lib"; then LIBREADLINE="$LIBREADLINE $LIBHISTORY -l$extra_lib" LTLIBREADLINE="$LTLIBREADLINE $LTLIBHISTORY -l$extra_lib" fi break fi done LIBS="$am_save_LIBS" ]) if test "$gl_cv_lib_readline" = yes; then AC_DEFINE(HAVE_READLINE, 1, [Define if you have the readline library.]) AC_MSG_CHECKING([how to link with libreadline]) AC_MSG_RESULT([$LIBREADLINE]) AC_SEARCH_LIBS([rl_echo_signal_char], [readline], AC_DEFINE(HAVE_RL_ECHO_SIGNAL_CHAR, 1, [Define if the readline library provides rl_echo_signal_char.]),[],[$LIBREADLINE]) AC_SEARCH_LIBS([rl_outstream], [readline], AC_DEFINE(HAVE_RL_OUTSTREAM, 1, [Define if the readline library provides rl_outstream.]),[],[$LIBREADLINE]) else dnl If $LIBREADLINE didn't lead to a usable library, we don't dnl need $INCREADLINE either. CPPFLAGS="$am_save_CPPFLAGS" LIBREADLINE= LTLIBREADLINE= LIBHISTORY= LTLIBHISTORY= PSPP_OPTIONAL_PREREQ([libreadline (which may itself require libncurses or libtermcap)]) fi AC_SUBST(LIBREADLINE) AC_SUBST(LTLIBREADLINE) ]) dnl Check for build tools. Adapted from bfd library. AC_DEFUN([PSPP_CC_FOR_BUILD], [# Put a plausible default for CC_FOR_BUILD in Makefile. if test -z "$CC_FOR_BUILD"; then if test "x$cross_compiling" = "xno"; then CC_FOR_BUILD='$(CC)' else CC_FOR_BUILD=cc fi fi AC_SUBST(CC_FOR_BUILD) # Also set EXEEXT_FOR_BUILD. if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else AC_CACHE_CHECK([for build system executable suffix], pspp_cv_build_exeext, [rm -f conftest* echo 'int main () { return 0; }' > conftest.c pspp_cv_build_exeext= ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 for file in conftest.*; do case $file in # ( *.c | *.o | *.obj | *.ilk | *.pdb) ;; # ( *) pspp_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; esac done rm -f conftest* test x"${pspp_cv_build_exeext}" = x && pspp_cv_build_exeext=no]) EXEEXT_FOR_BUILD="" test x"${pspp_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${pspp_cv_build_exeex t} fi AC_SUBST(EXEEXT_FOR_BUILD)]) dnl Check for LC_PAPER, _NL_PAPER_WIDTH, _NL_PAPER_HEIGHT. AC_DEFUN([PSPP_LC_PAPER], [AC_CACHE_CHECK(for LC_PAPER, pspp_cv_lc_paper, [ pspp_cv_lc_paper=no AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [#include #include ], [(void) LC_PAPER; (void) _NL_PAPER_WIDTH; (void) _NL_PAPER_HEIGHT])], [pspp_cv_lc_paper=yes]) ]) if test "$pspp_cv_lc_paper" = yes; then AC_DEFINE(HAVE_LC_PAPER, 1, [Define if you have LC_PAPER.]) fi ]) # PSPP_LINK2_IFELSE(SOURCE1, SOURCE2, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------------------- # Based on AC_LINK_IFELSE, but tries to link both SOURCE1 and SOURCE2 # into a program. # # Test that resulting file is executable; see the problem reported by mwoehlke # in . # But skip the test when cross-compiling, to prevent problems like the one # reported by Chris Johns in # . # m4_define([PSPP_LINK2_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl mv conftest.$ac_ext conftest1.$ac_ext m4_ifvaln([$2], [AC_LANG_CONFTEST([$2])])dnl mv conftest.$ac_ext conftest2.$ac_ext rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext pspp_link2='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest1.$ac_ext conftest2.$ac_ext $LIBS >&5' AS_IF([_AC_DO_STDERR($pspp_link2) && { test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || AS_TEST_X([conftest$ac_exeext]) }], [$3], [echo "$as_me: failed source file 1 of 2 was:" >&5 sed 's/^/| /' conftest1.$ac_ext >&5 echo "$as_me: failed source file 2 of 2 was:" >&5 sed 's/^/| /' conftest2.$ac_ext >&5 $4]) dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization) dnl information created by the PGI compiler (conftest_ipa8_conftest.oo), dnl as it would interfere with the next link command. rm -rf conftest.dSYM conftest1.dSYM conftest2.dSYM rm -f core conftest.err conftest1.err conftest2.err rm -f conftest1.$ac_objext conftest2.$ac_objext conftest*_ipa8_conftest*.oo rm -f conftest$ac_exeext rm -f m4_ifval([$1], [conftest1.$ac_ext]) m4_ifval([$2], [conftest1.$ac_ext])[]dnl ])# PSPP_LINK2_IFELSE # GSL uses "extern inline" without determining whether the compiler uses # GCC inline rules or C99 inline rules. If it uses the latter then GSL # will be broken without passing -fgnu89-inline to GCC. AC_DEFUN([PSPP_GSL_NEEDS_FGNU89_INLINE], [# GSL only uses "inline" at all if HAVE_INLINE is defined as a macro. # In turn, gnulib's gl_INLINE is one macro that does that. We need to # make sure that it has run by the time we run this test, otherwise we'll # get a false result. AC_REQUIRE([gl_INLINE]) PSPP_CHECK_CC_OPTION( [-fgnu89-inline], [AC_CACHE_CHECK([whether GSL needs -fgnu89-inline to link], pspp_cv_gsl_needs_fgnu89_inline, [ PSPP_LINK2_IFELSE( [AC_LANG_PROGRAM([#include ], [GSL_MAX_INT(1,2);])], [AC_LANG_SOURCE([#include void x (void) {}])], [pspp_cv_gsl_needs_fgnu89_inline=no], [pspp_cv_gsl_needs_fgnu89_inline=yes])]) if test "$pspp_cv_gsl_needs_fgnu89_inline" = "yes"; then CFLAGS="$CFLAGS -fgnu89-inline" fi]) ]) AC_DEFUN([PSPP_CHECK_CLICKSEQUENCE], [AC_REQUIRE([AM_INIT_AUTOMAKE]) # Defines MAKEINFO AC_CACHE_CHECK([whether makeinfo supports @clicksequence], [pspp_cv_have_clicksequence], [cat > conftest.texi <&AS_MESSAGE_LOG_FD" >&AS_MESSAGE_LOG_FD eval "$MAKEINFO conftest.texi >&AS_MESSAGE_LOG_FD 2>&1" retval=$? echo "configure:__oline__: \$? = $retval" >&AS_MESSAGE_LOG_FD if test $retval = 0; then pspp_cv_have_clicksequence=yes else pspp_cv_have_clicksequence=no fi rm -f conftest.texi conftest.info]) if test $pspp_cv_have_clicksequence = no; then AM_MAKEINFOFLAGS="$AM_MAKEINFOFLAGS -DMISSING_CLICKSEQUENCE" AC_SUBST([AM_MAKEINFOFLAGS]) fi]) # The following comes from Open vSwitch: # ---------------------------------------------------------------------- # Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # 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. dnl PSPP_ENABLE_WERROR AC_DEFUN([PSPP_ENABLE_WERROR], [AC_ARG_ENABLE( [Werror], [AC_HELP_STRING([--enable-Werror], [Add -Werror to CFLAGS])], [], [enable_Werror=no]) AC_CONFIG_COMMANDS_PRE( [if test "X$enable_Werror" = Xyes; then CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" fi])]) # The following comes from Open vSwitch: # ---------------------------------------------------------------------- # Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # 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. dnl Checks for dot. AC_DEFUN([PSPP_CHECK_DOT], [AC_CACHE_CHECK( [for dot], [pspp_cv_dot], [dnl "dot" writes -V output to stderr: if (dot -V) 2>&1 | grep '^dot - [[gG]]raphviz version' >/dev/null 2>&1; then pspp_cv_dot=yes else pspp_cv_dot=no fi]) AM_CONDITIONAL([HAVE_DOT], [test "$pspp_cv_dot" = yes])]) pspp-1.0.1/src/0000755000175000017500000000000013150620333010257 500000000000000pspp-1.0.1/src/math/0000755000175000017500000000000013150620333011210 500000000000000pspp-1.0.1/src/math/moments.h0000644000175000017500000000551112470243701012771 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef HEADER_MOMENTS #define HEADER_MOMENTS #include #include "data/value.h" /* Moments of the mean. Higher-order moments have higher values. */ enum moment { MOMENT_NONE, /* No moments. */ MOMENT_MEAN, /* First-order moment. */ MOMENT_VARIANCE, /* Second-order moment. */ MOMENT_SKEWNESS, /* Third-order moment. */ MOMENT_KURTOSIS /* Fourth-order moment. */ }; struct moments; /* Two-pass moments. */ struct moments *moments_create (enum moment max_moment); void moments_clear (struct moments *); void moments_pass_one (struct moments *, double value, double weight); void moments_pass_two (struct moments *, double value, double weight); void moments_calculate (const struct moments *, double *weight, double *mean, double *variance, double *skewness, double *kurtosis); void moments_destroy (struct moments *); /* Convenience functions for two-pass moments. */ void moments_of_doubles (const double *array, size_t cnt, double *weight, double *mean, double *variance, double *skewness, double *kurtosis); void moments_of_values (const union value *array, size_t cnt, double *weight, double *mean, double *variance, double *skewness, double *kurtosis); /* One-pass moments. Use only if two passes are impractical. */ struct moments1 *moments1_create (enum moment max_moment); void moments1_clear (struct moments1 *); void moments1_add (struct moments1 *, double value, double weight); void moments1_calculate (const struct moments1 *, double *weight, double *mean, double *variance, double *skewness, double *kurtosis); void moments1_destroy (struct moments1 *); /* Standard errors. */ double calc_semean (double var, double weight); double calc_seskew (double weight); double calc_sekurt (double weight); #endif /* moments.h */ pspp-1.0.1/src/math/sort.c0000644000175000017500000002117012470243701012270 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/sort.h" #include #include "data/case.h" #include "data/casereader.h" #include "data/casewriter-provider.h" #include "data/casewriter.h" #include "data/settings.h" #include "data/subcase.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "math/merge.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* These should only be changed for testing purposes. */ int min_buffers = 64; int max_buffers = INT_MAX; struct sort_writer { struct caseproto *proto; struct subcase ordering; struct merge *merge; struct pqueue *pqueue; struct casewriter *run; casenumber run_id; struct ccase *run_end; }; static struct casewriter_class sort_casewriter_class; static struct pqueue *pqueue_create (const struct subcase *, const struct caseproto *); static void pqueue_destroy (struct pqueue *); static bool pqueue_is_full (const struct pqueue *); static bool pqueue_is_empty (const struct pqueue *); static void pqueue_push (struct pqueue *, struct ccase *, casenumber); static struct ccase *pqueue_pop (struct pqueue *, casenumber *); static void output_record (struct sort_writer *); struct casewriter * sort_create_writer (const struct subcase *ordering, const struct caseproto *proto) { struct sort_writer *sort; sort = xmalloc (sizeof *sort); sort->proto = caseproto_ref (proto); subcase_clone (&sort->ordering, ordering); sort->merge = merge_create (ordering, proto); sort->pqueue = pqueue_create (ordering, proto); sort->run = NULL; sort->run_id = 0; sort->run_end = NULL; return casewriter_create (proto, &sort_casewriter_class, sort); } static void sort_casewriter_write (struct casewriter *writer UNUSED, void *sort_, struct ccase *c) { struct sort_writer *sort = sort_; bool next_run; if (pqueue_is_full (sort->pqueue)) output_record (sort); next_run = (sort->run_end == NULL || subcase_compare_3way (&sort->ordering, c, &sort->ordering, sort->run_end) < 0); pqueue_push (sort->pqueue, c, sort->run_id + (next_run ? 1 : 0)); } static void sort_casewriter_destroy (struct casewriter *writer UNUSED, void *sort_) { struct sort_writer *sort = sort_; subcase_destroy (&sort->ordering); merge_destroy (sort->merge); pqueue_destroy (sort->pqueue); casewriter_destroy (sort->run); case_unref (sort->run_end); caseproto_unref (sort->proto); free (sort); } static struct casereader * sort_casewriter_convert_to_reader (struct casewriter *writer, void *sort_) { struct sort_writer *sort = sort_; struct casereader *output; if (sort->run == NULL && sort->run_id == 0) { /* In-core sort. */ sort->run = mem_writer_create (sort->proto); sort->run_id = 1; } while (!pqueue_is_empty (sort->pqueue)) output_record (sort); merge_append (sort->merge, casewriter_make_reader (sort->run)); sort->run = NULL; output = merge_make_reader (sort->merge); sort_casewriter_destroy (writer, sort); return output; } static void output_record (struct sort_writer *sort) { struct ccase *min_case; casenumber min_run_id; min_case = pqueue_pop (sort->pqueue, &min_run_id); #if 0 printf ("\toutput: %f to run %d\n", case_num_idx (min_case, 0), min_run_id); #endif if (sort->run_id != min_run_id && sort->run != NULL) { merge_append (sort->merge, casewriter_make_reader (sort->run)); sort->run = NULL; } if (sort->run == NULL) { sort->run = tmpfile_writer_create (sort->proto); sort->run_id = min_run_id; } case_unref (sort->run_end); sort->run_end = case_ref (min_case); casewriter_write (sort->run, min_case); } static struct casewriter_class sort_casewriter_class = { sort_casewriter_write, sort_casewriter_destroy, sort_casewriter_convert_to_reader, }; /* Reads all the cases from INPUT. Sorts the cases according to ORDERING. Returns the sorted cases in a new casereader. INPUT is destroyed by this function. */ struct casereader * sort_execute (struct casereader *input, const struct subcase *ordering) { struct casewriter *output = sort_create_writer (ordering, casereader_get_proto (input)); casereader_transfer (input, output); return casewriter_make_reader (output); } /* Reads all the cases from INPUT. Sorts the cases in ascending order according to VARIABLE. Returns the sorted cases in a new casereader. INPUT is destroyed by this function. */ struct casereader * sort_execute_1var (struct casereader *input, const struct variable *var) { struct subcase sc; struct casereader *reader; subcase_init_var (&sc, var, SC_ASCEND); reader = sort_execute (input, &sc); subcase_destroy (&sc); return reader; } struct pqueue { struct subcase ordering; struct pqueue_record *records; size_t record_cnt; /* Current number of records. */ size_t record_cap; /* Space currently allocated for records. */ size_t record_max; /* Max space we are willing to allocate. */ casenumber idx; }; struct pqueue_record { casenumber id; struct ccase *c; casenumber idx; }; static int compare_pqueue_records_minheap (const void *a, const void *b, const void *pq_); static struct pqueue * pqueue_create (const struct subcase *ordering, const struct caseproto *proto) { struct pqueue *pq; pq = xmalloc (sizeof *pq); subcase_clone (&pq->ordering, ordering); pq->record_max = settings_get_workspace_cases (proto); if (pq->record_max > max_buffers) pq->record_max = max_buffers; else if (pq->record_max < min_buffers) pq->record_max = min_buffers; pq->record_cnt = 0; pq->record_cap = 0; pq->records = NULL; pq->idx = 0; return pq; } static void pqueue_destroy (struct pqueue *pq) { if (pq != NULL) { while (!pqueue_is_empty (pq)) { casenumber id; struct ccase *c = pqueue_pop (pq, &id); case_unref (c); } subcase_destroy (&pq->ordering); free (pq->records); free (pq); } } static bool pqueue_is_full (const struct pqueue *pq) { return pq->record_cnt >= pq->record_max; } static bool pqueue_is_empty (const struct pqueue *pq) { return pq->record_cnt == 0; } static void pqueue_push (struct pqueue *pq, struct ccase *c, casenumber id) { struct pqueue_record *r; assert (!pqueue_is_full (pq)); if (pq->record_cnt >= pq->record_cap) { pq->record_cap = pq->record_cap * 2; if (pq->record_cap < 16) pq->record_cap = 16; else if (pq->record_cap > pq->record_max) pq->record_cap = pq->record_max; pq->records = xrealloc (pq->records, pq->record_cap * sizeof *pq->records); } r = &pq->records[pq->record_cnt++]; r->id = id; r->c = c; r->idx = pq->idx++; push_heap (pq->records, pq->record_cnt, sizeof *pq->records, compare_pqueue_records_minheap, pq); } static struct ccase * pqueue_pop (struct pqueue *pq, casenumber *id) { struct pqueue_record *r; assert (!pqueue_is_empty (pq)); pop_heap (pq->records, pq->record_cnt--, sizeof *pq->records, compare_pqueue_records_minheap, pq); r = &pq->records[pq->record_cnt]; *id = r->id; return r->c; } /* Compares record-run tuples A and B on id, then on case data, then on insertion order, in descending order. */ static int compare_pqueue_records_minheap (const void *a_, const void *b_, const void *pq_) { const struct pqueue_record *a = a_; const struct pqueue_record *b = b_; const struct pqueue *pq = pq_; int result = a->id < b->id ? -1 : a->id > b->id; if (result == 0) result = subcase_compare_3way (&pq->ordering, a->c, &pq->ordering, b->c); if (result == 0) result = a->idx < b->idx ? -1 : a->idx > b->idx; return -result; } pspp-1.0.1/src/math/tukey-hinges.h0000644000175000017500000000205312470242642013724 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef __TUKEY_HINGES_H__ #define __TUKEY_HINGES_H__ #include #include "order-stats.h" struct tukey_hinges { struct order_stats parent; }; struct tukey_hinges * tukey_hinges_create (double W, double c_min); void tukey_hinges_calculate (const struct tukey_hinges *h, double hinge[3]); #endif pspp-1.0.1/src/math/linreg.c0000644000175000017500000003075113137223530012565 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005, 2010, 2011, 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/linreg.h" #include #include #include #include #include #include #include "data/value.h" #include "data/variable.h" #include "linreg/sweep.h" #include "gl/xalloc.h" /* Find the least-squares estimate of b for the linear model: Y = Xb + Z where Y is an n-by-1 column vector, X is an n-by-p matrix of independent variables, b is a p-by-1 vector of regression coefficients, and Z is an n-by-1 normally-distributed random vector with independent identically distributed components with mean 0. This estimate is found via the sweep operator or singular-value decomposition with gsl. References: 1. Matrix Computations, third edition. GH Golub and CF Van Loan. The Johns Hopkins University Press. 1996. ISBN 0-8018-5414-8. 2. Numerical Analysis for Statisticians. K Lange. Springer. 1999. ISBN 0-387-94979-8. 3. Numerical Linear Algebra for Applications in Statistics. JE Gentle. Springer. 1998. ISBN 0-387-98542-5. */ struct linreg { double n_obs; /* Number of observations. */ int n_indeps; /* Number of independent variables. */ int n_coeffs; /* The intercept is not considered a coefficient here. */ /* Pointers to the variables. */ const struct variable *depvar; const struct variable **indep_vars; double *coeff; double intercept; /* Means and standard deviations of the variables. If these pointers are null when pspp_linreg() is called, pspp_linreg() will compute their values. Entry i of indep_means is the mean of independent variable i, whose observations are stored in the ith column of the design matrix. */ double depvar_mean; gsl_vector *indep_means; gsl_vector *indep_std; /* Sums of squares. */ double ssm; /* Sums of squares for the overall model. */ double sst; /* Sum of squares total. */ double sse; /* Sum of squares error. */ double mse; /* Mean squared error. This is just sse / dfe, but since it is the best unbiased estimate of the population variance, it has its own entry here. */ /* Covariance matrix of the parameter estimates. */ gsl_matrix *cov; /* Degrees of freedom. */ double dft; double dfe; double dfm; int dependent_column; /* Column containing the dependent variable. Defaults to last column. */ int refcnt; bool origin; }; const struct variable ** linreg_get_vars (const struct linreg *c) { return c->indep_vars; } /* Allocate a linreg and return a pointer to it. n is the number of cases, p is the number of independent variables. */ struct linreg * linreg_alloc (const struct variable *depvar, const struct variable **indep_vars, double n, size_t p, bool origin) { struct linreg *c; size_t i; c = xmalloc (sizeof (*c)); c->depvar = depvar; c->indep_vars = xnmalloc (p, sizeof (*indep_vars)); c->dependent_column = p; for (i = 0; i < p; i++) { c->indep_vars[i] = indep_vars[i]; } c->indep_means = gsl_vector_alloc (p); c->indep_std = gsl_vector_alloc (p); c->n_obs = n; c->n_indeps = p; c->n_coeffs = p; c->coeff = xnmalloc (p, sizeof (*c->coeff)); c->cov = gsl_matrix_calloc (c->n_coeffs + 1, c->n_coeffs + 1); c->dft = n; if (!origin) c->dft--; c->dfm = p; c->dfe = c->dft - c->dfm; c->intercept = 0.0; c->depvar_mean = 0.0; /* Default settings. */ c->refcnt = 1; c->origin = origin; return c; } void linreg_ref (struct linreg *c) { c->refcnt++; } void linreg_unref (struct linreg *c) { if (--c->refcnt == 0) { gsl_vector_free (c->indep_means); gsl_vector_free (c->indep_std); gsl_matrix_free (c->cov); free (c->indep_vars); free (c->coeff); free (c); } } static void post_sweep_computations (struct linreg *l, gsl_matrix *sw) { double m; size_t i; size_t j; int rc; assert (sw != NULL); assert (l != NULL); l->sse = gsl_matrix_get (sw, l->n_indeps, l->n_indeps); l->mse = l->sse / l->dfe; /* Get the intercept. */ m = l->depvar_mean; for (i = 0; i < l->n_indeps; i++) { double tmp = gsl_matrix_get (sw, i, l->n_indeps); l->coeff[i] = tmp; m -= tmp * linreg_get_indep_variable_mean (l, i); } /* Get the covariance matrix of the parameter estimates. Only the upper triangle is necessary. */ /* The loops below do not compute the entries related to the estimated intercept. */ for (i = 0; i < l->n_indeps; i++) for (j = i; j < l->n_indeps; j++) { double tmp = -1.0 * l->mse * gsl_matrix_get (sw, i, j); gsl_matrix_set (l->cov, i + 1, j + 1, tmp); } if (! l->origin) { gsl_matrix *xm; gsl_matrix_view xtx; gsl_matrix_view xmxtx; /* Get the covariances related to the intercept. */ xtx = gsl_matrix_submatrix (sw, 0, 0, l->n_indeps, l->n_indeps); xmxtx = gsl_matrix_submatrix (l->cov, 0, 1, 1, l->n_indeps); xm = gsl_matrix_calloc (1, l->n_indeps); for (i = 0; i < xm->size2; i++) { gsl_matrix_set (xm, 0, i, linreg_get_indep_variable_mean (l, i)); } rc = gsl_blas_dsymm (CblasRight, CblasUpper, l->mse, &xtx.matrix, xm, 0.0, &xmxtx.matrix); gsl_matrix_free (xm); if (rc == GSL_SUCCESS) { double tmp = l->mse / l->n_obs; for (i = 1; i < 1 + l->n_indeps; i++) { tmp -= gsl_matrix_get (l->cov, 0, i) * linreg_get_indep_variable_mean (l, i - 1); } gsl_matrix_set (l->cov, 0, 0, tmp); l->intercept = m; } else { fprintf (stderr, "%s:%d:gsl_blas_dsymm: %s\n", __FILE__, __LINE__, gsl_strerror (rc)); exit (rc); } } } /* Predict the value of the dependent variable with the new set of predictors. VALS are assumed to be in the order corresponding to the order of the coefficients in the linreg struct. */ double linreg_predict (const struct linreg *c, const double *vals, size_t n_vals) { size_t j; double result; assert (n_vals == c->n_coeffs); if (vals == NULL || c == NULL) { return GSL_NAN; } if (c->coeff == NULL) { /* The stupid model: just guess the mean. */ return c->depvar_mean; } result = c->intercept; for (j = 0; j < n_vals; j++) { result += linreg_coeff (c, j) * vals[j]; } return result; } double linreg_residual (const struct linreg *c, double obs, const double *vals, size_t n_vals) { if (vals == NULL || c == NULL) { return GSL_NAN; } return (obs - linreg_predict (c, vals, n_vals)); } /* Mean of the independent variable. */ double linreg_get_indep_variable_mean (const struct linreg *c, size_t j) { assert (c != NULL); return gsl_vector_get (c->indep_means, j); } void linreg_set_indep_variable_mean (struct linreg *c, size_t j, double m) { assert (c != NULL); gsl_vector_set (c->indep_means, j, m); } #if 0 static void linreg_fit_qr (const gsl_matrix *cov, struct linreg *l) { double intcpt_coef = 0.0; double intercept_variance = 0.0; gsl_matrix *xtx; gsl_matrix *q; gsl_matrix *r; gsl_vector *xty; gsl_vector *tau; gsl_vector *params; size_t i; size_t j; xtx = gsl_matrix_alloc (cov->size1 - 1, cov->size2 - 1); xty = gsl_vector_alloc (cov->size1 - 1); tau = gsl_vector_alloc (cov->size1 - 1); params = gsl_vector_alloc (cov->size1 - 1); for (i = 0; i < xtx->size1; i++) { gsl_vector_set (xty, i, gsl_matrix_get (cov, cov->size2 - 1, i)); for (j = 0; j < xtx->size2; j++) { gsl_matrix_set (xtx, i, j, gsl_matrix_get (cov, i, j)); } } gsl_linalg_QR_decomp (xtx, tau); q = gsl_matrix_alloc (xtx->size1, xtx->size2); r = gsl_matrix_alloc (xtx->size1, xtx->size2); gsl_linalg_QR_unpack (xtx, tau, q, r); gsl_linalg_QR_solve (xtx, tau, xty, params); for (i = 0; i < params->size; i++) { l->coeff[i] = gsl_vector_get (params, i); } l->sst = gsl_matrix_get (cov, cov->size1 - 1, cov->size2 - 1); l->ssm = 0.0; for (i = 0; i < l->n_indeps; i++) { l->ssm += gsl_vector_get (xty, i) * l->coeff[i]; } l->sse = l->sst - l->ssm; gsl_blas_dtrsm (CblasLeft, CblasLower, CblasNoTrans, CblasNonUnit, linreg_mse (l), r, q); /* Copy the lower triangle into the upper triangle. */ for (i = 0; i < q->size1; i++) { gsl_matrix_set (l->cov, i + 1, i + 1, gsl_matrix_get (q, i, i)); for (j = i + 1; j < q->size2; j++) { intercept_variance -= 2.0 * gsl_matrix_get (q, i, j) * linreg_get_indep_variable_mean (l, i) * linreg_get_indep_variable_mean (l, j); gsl_matrix_set (q, i, j, gsl_matrix_get (q, j, i)); } } if (!l->origin) { l->intercept = linreg_get_depvar_mean (l); for (i = 0; i < l->n_indeps; i++) { double tmp = linreg_get_indep_variable_mean (l, i); l->intercept -= l->coeff[i] * tmp; intercept_variance += tmp * tmp * gsl_matrix_get (q, i, i); } /* Covariances related to the intercept. */ intercept_variance += linreg_mse (l) / linreg_n_obs (l); gsl_matrix_set (l->cov, 0, 0, intercept_variance); for (i = 0; i < q->size1; i++) { for (j = 0; j < q->size2; j++) { intcpt_coef -= gsl_matrix_get (q, i, j) * linreg_get_indep_variable_mean (l, j); } gsl_matrix_set (l->cov, 0, i + 1, intcpt_coef); gsl_matrix_set (l->cov, i + 1, 0, intcpt_coef); intcpt_coef = 0.0; } } gsl_matrix_free (q); gsl_matrix_free (r); gsl_vector_free (xty); gsl_vector_free (tau); gsl_matrix_free (xtx); gsl_vector_free (params); } #endif #define REG_LARGE_DATA 1000 /* Estimate the model parameters from the covariance matrix. This function assumes the covariance entries corresponding to the dependent variable are in the final row and column of the covariance matrix. */ void linreg_fit (const gsl_matrix *cov, struct linreg *l) { assert (l != NULL); assert (cov != NULL); l->sst = gsl_matrix_get (cov, cov->size1 - 1, cov->size2 - 1); #if 0 /* This QR decomposition path seems to produce the incorrect values. See https://savannah.gnu.org/bugs/?51373 */ if ((l->n_obs * l->n_obs > l->n_indeps) && (l->n_obs > REG_LARGE_DATA)) { /* For large data sets, use QR decomposition. */ linreg_fit_qr (cov, l); } else #endif { gsl_matrix *params = gsl_matrix_calloc (cov->size1, cov->size2); gsl_matrix_memcpy (params, cov); reg_sweep (params, l->dependent_column); post_sweep_computations (l, params); gsl_matrix_free (params); } } double linreg_mse (const struct linreg *c) { assert (c != NULL); return (c->sse / c->dfe); } double linreg_intercept (const struct linreg *c) { return c->intercept; } const gsl_matrix * linreg_cov (const struct linreg *c) { return c->cov; } double linreg_coeff (const struct linreg *c, size_t i) { return (c->coeff[i]); } const struct variable * linreg_indep_var (const struct linreg *c, size_t i) { return (c->indep_vars[i]); } int linreg_n_indeps (const struct linreg *c) { return c->n_indeps; } const struct variable * linreg_dep_var (const struct linreg *c) { return c->depvar; } size_t linreg_n_coeffs (const struct linreg *c) { return c->n_coeffs; } double linreg_n_obs (const struct linreg *c) { return c->n_obs; } double linreg_sse (const struct linreg *c) { return c->sse; } double linreg_ssreg (const struct linreg *c) { return (c->sst - c->sse); } double linreg_sst (const struct linreg *c) { return c->sst; } double linreg_dfmodel ( const struct linreg *c) { return c->dfm; } double linreg_dferror ( const struct linreg *c) { return c->dfe; } double linreg_dftotal ( const struct linreg *c) { return c->dft; } void linreg_set_depvar_mean (struct linreg *c, double x) { c->depvar_mean = x; } double linreg_get_depvar_mean (const struct linreg *c) { return c->depvar_mean; } pspp-1.0.1/src/math/wilcoxon-sig.h0000644000175000017500000000145713137223525013741 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef WX_MP_SR #define WX_MP_SR 1 double LevelOfSignificanceWXMPSR(double w, long int n); #endif pspp-1.0.1/src/math/levene.c0000644000175000017500000001313713137223525012566 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "levene.h" #include #include "libpspp/misc.h" #include "libpspp/hmap.h" #include "data/value.h" #include "data/val-type.h" #include #include struct lev { struct hmap_node node; union value group; double t_bar; double z_mean; double n; }; typedef unsigned int hash_func (const struct levene *, const union value *v); typedef bool cmp_func (const struct levene *, const union value *v0, const union value *v1); struct levene { /* Width of the categorical variable */ int gvw ; /* The value dividing the groups. Valid only for dichotomous categorical variable.*/ const union value *cutpoint; /* A hashtable of struct lev objects indexed by union value */ struct hmap hmap; hash_func *hash; cmp_func *cmp; /* A state variable indicating how many passes have been done */ int pass; double grand_n; double z_grand_mean; double denominator; }; static unsigned int unique_hash (const struct levene *nl, const union value *val) { return value_hash (val, nl->gvw, 0); } static bool unique_cmp (const struct levene *nl, const union value *val0, const union value *val1) { return value_equal (val0, val1, nl->gvw); } static unsigned int cutpoint_hash (const struct levene *nl, const union value *val) { int x = value_compare_3way (val, nl->cutpoint, nl->gvw); return (x < 0); } static bool cutpoint_cmp (const struct levene *nl, const union value *val0, const union value *val1) { int x = value_compare_3way (val0, nl->cutpoint, nl->gvw); int y = value_compare_3way (val1, nl->cutpoint, nl->gvw); if ( x == 0) x = 1; if ( y == 0) y = 1; return ( x == y); } static struct lev * find_group (const struct levene *nl, const union value *target) { struct lev *l = NULL; HMAP_FOR_EACH_WITH_HASH (l, struct lev, node, nl->hash (nl, target), &nl->hmap) { if (nl->cmp (nl, &l->group, target)) break; l = NULL; } return l; } struct levene * levene_create (int indep_width, const union value *cutpoint) { struct levene *nl = xzalloc (sizeof *nl); hmap_init (&nl->hmap); nl->gvw = indep_width; nl->cutpoint = cutpoint; nl->hash = cutpoint ? cutpoint_hash : unique_hash; nl->cmp = cutpoint ? cutpoint_cmp : unique_cmp; return nl; } /* Data accumulation. First pass */ void levene_pass_one (struct levene *nl, double value, double weight, const union value *gv) { struct lev *lev = find_group (nl, gv); if ( nl->pass == 0 ) { nl->pass = 1; } assert (nl->pass == 1); if ( NULL == lev) { struct lev *l = xzalloc (sizeof *l); value_clone (&l->group, gv, nl->gvw); hmap_insert (&nl->hmap, &l->node, nl->hash (nl, &l->group)); lev = l; } lev->n += weight; lev->t_bar += value * weight; nl->grand_n += weight; } /* Data accumulation. Second pass */ void levene_pass_two (struct levene *nl, double value, double weight, const union value *gv) { struct lev *lev = NULL; if ( nl->pass == 1 ) { struct lev *next; struct lev *l; nl->pass = 2; HMAP_FOR_EACH_SAFE (l, next, struct lev, node, &nl->hmap) { l->t_bar /= l->n; } } assert (nl->pass == 2); lev = find_group (nl, gv); lev->z_mean += fabs (value - lev->t_bar) * weight; nl->z_grand_mean += fabs (value - lev->t_bar) * weight; } /* Data accumulation. Third pass */ void levene_pass_three (struct levene *nl, double value, double weight, const union value *gv) { double z; struct lev *lev = NULL; if ( nl->pass == 2 ) { struct lev *next; struct lev *l; nl->pass = 3; HMAP_FOR_EACH_SAFE (l, next, struct lev, node, &nl->hmap) { l->z_mean /= l->n; } nl->z_grand_mean /= nl->grand_n; } assert (nl->pass == 3); lev = find_group (nl, gv); z = fabs (value - lev->t_bar); nl->denominator += pow2 (z - lev->z_mean) * weight; } /* Return the value of the levene statistic */ double levene_calculate (struct levene *nl) { struct lev *next; struct lev *l; double numerator = 0.0; double nn = 0.0; /* The Levene calculation requires three passes. Normally this should have been done prior to calling this function. However, in abnormal circumstances (eg. the dataset is empty) there will have been no passes. */ assert (nl->pass == 0 || nl->pass == 3); if ( nl->pass == 0 ) return SYSMIS; nl->denominator *= hmap_count (&nl->hmap) - 1; HMAP_FOR_EACH_SAFE (l, next, struct lev, node, &nl->hmap) { numerator += l->n * pow2 (l->z_mean - nl->z_grand_mean); nn += l->n; } numerator *= nn - hmap_count (&nl->hmap); return numerator / nl->denominator; } void levene_destroy (struct levene *nl) { struct lev *next; struct lev *l; HMAP_FOR_EACH_SAFE (l, next, struct lev, node, &nl->hmap) { value_destroy (&l->group, nl->gvw); free (l); } hmap_destroy (&nl->hmap); free (nl); } pspp-1.0.1/src/math/random.c0000644000175000017500000000246312470242642012570 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2005 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "random.h" #include #include "xalloc.h" static gsl_rng *rng; void random_init (void) { } void random_done (void) { if (rng != NULL) gsl_rng_free (rng); } /* Returns the current random number generator. */ gsl_rng * get_rng (void) { if (rng == NULL) set_rng (time (0)); return rng; } /* Initializes or reinitializes the random number generator with the given SEED. */ void set_rng (unsigned long seed) { rng = gsl_rng_alloc (gsl_rng_mt19937); if (rng == NULL) xalloc_die (); gsl_rng_set (rng, seed); } pspp-1.0.1/src/math/percentiles.h0000644000175000017500000000301112470242642013620 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef __PERCENTILES_H__ #define __PERCENTILES_H__ #include #include "order-stats.h" /* The algorithm used to calculate percentiles */ enum pc_alg { PC_NONE=0, PC_HAVERAGE, PC_WAVERAGE, PC_ROUND, PC_EMPIRICAL, PC_AEMPIRICAL } ; extern const char *const ptile_alg_desc[]; struct percentile { struct order_stats parent; double ptile; double w; /* Mutable */ double g1; double g1_star; double g2; double g2_star; }; /* Create the Pth percentile. W is the total sum of weights in the data set */ struct percentile *percentile_create (double p, double W); /* Return the value of the percentile */ double percentile_calculate (const struct percentile *ptl, enum pc_alg alg); void percentile_dump (const struct percentile *ptl); #endif pspp-1.0.1/src/math/correlation.h0000644000175000017500000000207013137223525013630 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SRC_MATH_CORRELATION_H #define SRC_MATH_CORRELATION_H #include gsl_matrix *correlation_from_covariance (const gsl_matrix *cv, const gsl_matrix *v); gsl_matrix *covariance_from_correlation (const gsl_matrix *corr, const gsl_matrix *v); double significance_of_correlation (double rho, double w); #endif pspp-1.0.1/src/math/extrema.c0000644000175000017500000000620312470243701012746 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/extrema.h" #include #include "data/case.h" #include "data/val-type.h" #include "libpspp/compiler.h" #include "libpspp/ll.h" #include "gl/xalloc.h" struct extrema { size_t capacity; size_t n; struct ll_list list; ll_compare_func *cmp_func; }; static int cmp_descending (const struct ll *a_, const struct ll *b_, void *aux UNUSED) { const struct extremum *a = ll_data (a_, struct extremum, ll); const struct extremum *b = ll_data (b_, struct extremum, ll); if ( a->value > b->value) return -1; return (a->value < b->value); } static int cmp_ascending (const struct ll *a_, const struct ll *b_, void *aux UNUSED) { const struct extremum *a = ll_data (a_, struct extremum, ll); const struct extremum *b = ll_data (b_, struct extremum, ll); if ( a->value < b->value) return -1; return (a->value > b->value); } struct extrema * extrema_create (size_t n, enum extreme_end end) { struct extrema *extrema = xzalloc (sizeof *extrema); extrema->capacity = n; if ( end == EXTREME_MAXIMA ) extrema->cmp_func = cmp_descending; else extrema->cmp_func = cmp_ascending; ll_init (&extrema->list); return extrema; } void extrema_destroy (struct extrema *extrema) { struct ll *ll = ll_head (&extrema->list); while (ll != ll_null (&extrema->list)) { struct extremum *e = ll_data (ll, struct extremum, ll); ll = ll_next (ll); free (e); } free (extrema); } void extrema_add (struct extrema *extrema, double val, double weight, casenumber location) { struct extremum *e = xzalloc (sizeof *e) ; e->value = val; e->location = location; e->weight = weight; if ( val == SYSMIS) { free (e); return; } ll_insert_ordered (ll_head (&extrema->list), ll_null (&extrema->list), &e->ll, extrema->cmp_func, NULL); if ( extrema->n++ > extrema->capacity) { struct ll *tail = ll_tail (&extrema->list); struct extremum *et = ll_data (tail, struct extremum, ll); ll_remove (tail); free (et); } } const struct ll_list * extrema_list (const struct extrema *ex) { return &ex->list; } bool extrema_top (const struct extrema *ex, double *v) { const struct extremum *top; if ( ll_is_empty (&ex->list)) return false; top = (const struct extremum *) ll_data (ll_head(&ex->list), struct extremum, ll); *v = top->value; return true; } pspp-1.0.1/src/math/histogram.c0000644000175000017500000001241212661775510013307 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/histogram.h" #include #include #include "data/settings.h" #include "libpspp/message.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "math/chart-geometry.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid #include "gl/xalloc.h" void histogram_add (struct histogram *h, double y, double c) { struct statistic *stat = &h->parent; stat->accumulate (stat, NULL, c, 0, y); } static void acc (struct statistic *s, const struct ccase *cx UNUSED, double c, double cc UNUSED, double y) { struct histogram *hist = UP_CAST (s, struct histogram, parent); gsl_histogram_accumulate (hist->gsl_hist, y, c); } static void destroy (struct statistic *s) { struct histogram *h = UP_CAST (s, struct histogram, parent); gsl_histogram_free (h->gsl_hist); free (s); } /* Find a bin width which is adapted to the scaling of the x axis In the example here, the binwidth is half of the tick interval. binwidth > < |....+....+....+. .+....| LOWER 1 2 3 N_TICKS ^LOWDBL ^HIGHDBL This only works, when the min and max value for the histogram are adapted such that (max-min) is a multiple of the binwidth. Then the location of the first bin has to be aligned to the ticks. */ static int hist_find_pretty_no_of_bins(double bin_width_in, double min, double max, double *adjusted_min, double *adjusted_max) { double lower, interval; int n_ticks; double binwidth; int nbins; chart_get_scale (max, min, &lower, &interval, &n_ticks); if (bin_width_in >= 2 * interval) { binwidth = floor(bin_width_in/interval) * interval; *adjusted_min = lower; } else if (bin_width_in >= 1.5 * interval) { binwidth = 1.5 * interval; if (min < (lower + 0.5 * interval)) *adjusted_min = lower; else *adjusted_min = lower + 0.5 * interval; } else if (bin_width_in >= interval) { binwidth = interval; *adjusted_min = lower; } else if (bin_width_in >= (2.0/3.0 * interval)) { binwidth = (2.0/3.0 * interval); if (min >= lower + binwidth) *adjusted_min = lower + binwidth; else *adjusted_min = lower; } else { int i; for(i = 2; bin_width_in < interval/i; i++); binwidth = interval/i; *adjusted_min = floor((min - lower)/binwidth)*binwidth + lower; } nbins = ceil((max-*adjusted_min)/binwidth); *adjusted_max = nbins*binwidth + *adjusted_min; /* adjusted_max should never be smaller than max but if it is equal then the gsl_histogram will not add the cases which have max value */ if (*adjusted_max <= max) { *adjusted_max += binwidth; nbins++; } assert (*adjusted_min <= min); return nbins; } struct histogram * histogram_create (double bin_width_in, double min, double max) { struct histogram *h; struct statistic *stat; int bins; double adjusted_min, adjusted_max; if (max == min) { msg (MW, _("Not creating histogram because the data contains less than 2 distinct values")); return NULL; } assert (bin_width_in > 0); bins = hist_find_pretty_no_of_bins(bin_width_in, min, max, &adjusted_min, &adjusted_max); h = xmalloc (sizeof *h); h->gsl_hist = gsl_histogram_alloc (bins); /* The bin ranges could be computed with gsl_histogram_set_ranges_uniform, but the number of bins is adapted to the ticks of the axis such that for example data ranging from 1.0 to 7.0 with 6 bins will have bin limits at 2.0,3.0,4.0 and 5.0. Due to numerical accuracy the computed bin limits might be 4.99999999 for a value which is expected to be 5.0. But the limits of the histogram bins should be that what is expected from the displayed ticks. Therefore the bin limits are computed from the rounded values which is similar to the procedure at the chart_get_ticks_format. Actual bin limits should be exactly what is displayed at the ticks. But... I cannot reproduce the problem that I see with gsl_histogram_set_ranges_uniform with the code below without rounding... */ { double *ranges = xmalloc (sizeof (double) * (bins + 1)); double interval = (adjusted_max - adjusted_min) / bins; for (int i = 0; i < bins; i++) ranges[i] = adjusted_min + interval * i; ranges[bins] = adjusted_max; gsl_histogram_set_ranges (h->gsl_hist, ranges, bins + 1); free (ranges); } stat = &h->parent; stat->accumulate = acc; stat->destroy = destroy; return h; } pspp-1.0.1/src/math/order-stats.h0000644000175000017500000000316412470243701013560 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2008, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef __ORDER_STATS_H__ #define __ORDER_STATS_H__ #include #include "data/missing-values.h" #include "math/statistic.h" struct casereader; struct variable; /* cc <= tc < cc_p1 */ struct k { double tc; double cc; double cc_p1; double c; double c_p1; double y; double y_p1; }; struct order_stats { struct statistic parent; int n_k; struct k *k; double cc; }; enum mv_class; void order_stats_dump (const struct order_stats *os); void order_stats_accumulate_idx (struct order_stats **os, size_t nos, struct casereader *reader, int wt_idx, int val_idx); void order_stats_accumulate (struct order_stats **ptl, size_t nos, struct casereader *reader, const struct variable *wv, const struct variable *var, enum mv_class exclude); #endif pspp-1.0.1/src/math/linreg.h0000644000175000017500000000624113137223525012573 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005, 2011 Free Software Foundation, Inc. Written by Jason H. Stover. 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 . */ #ifndef LINREG_H #define LINREG_H #include #include /* Find the least-squares estimate of b for the linear model: Y = Xb + Z where Y is an n-by-1 column vector, X is an n-by-p matrix of independent variables, b is a p-by-1 vector of regression coefficients, and Z is an n-by-1 normally-distributed random vector with independent identically distributed components with mean 0. This estimate is found via the sweep operator or singular-value decomposition with gsl. References: 1. Matrix Computations, third edition. GH Golub and CF Van Loan. The Johns Hopkins University Press. 1996. ISBN 0-8018-5414-8. 2. Numerical Analysis for Statisticians. K Lange. Springer. 1999. ISBN 0-387-94979-8. 3. Numerical Linear Algebra for Applications in Statistics. JE Gentle. Springer. 1998. ISBN 0-387-98542-5. */ struct variable; struct linreg *linreg_alloc (const struct variable *, const struct variable **, double, size_t, bool); void linreg_unref (struct linreg *); void linreg_ref (struct linreg *); int linreg_n_indeps (const struct linreg *c); /* Fit the linear model via least squares. */ void linreg_fit (const gsl_matrix *, struct linreg *); double linreg_predict (const struct linreg *, const double *, size_t); double linreg_residual (const struct linreg *, double, const double *, size_t); const struct variable ** linreg_get_vars (const struct linreg *); /* Mean of the independent variable. */ double linreg_get_indep_variable_mean (const struct linreg *, size_t); void linreg_set_indep_variable_mean (struct linreg *, size_t, double); double linreg_mse (const struct linreg *); double linreg_intercept (const struct linreg *); const gsl_matrix * linreg_cov (const struct linreg *); double linreg_coeff (const struct linreg *, size_t); const struct variable * linreg_indep_var (const struct linreg *, size_t); const struct variable * linreg_dep_var (const struct linreg *); size_t linreg_n_coeffs (const struct linreg *); double linreg_n_obs (const struct linreg *); double linreg_sse (const struct linreg *); double linreg_ssreg (const struct linreg *); double linreg_dfmodel (const struct linreg *); double linreg_dferror (const struct linreg *); double linreg_dftotal (const struct linreg *); double linreg_sst (const struct linreg *); void linreg_set_depvar_mean (struct linreg *, double); double linreg_get_depvar_mean (const struct linreg *); #endif pspp-1.0.1/src/math/merge.h0000644000175000017500000000212212470242642012404 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef MATH_MERGE_H #define MATH_MERGE_H 1 struct caseproto; struct casereader; struct subcase; struct merge *merge_create (const struct subcase *, const struct caseproto *); void merge_destroy (struct merge *); void merge_append (struct merge *, struct casereader *); struct casereader *merge_make_reader (struct merge *); #endif /* math/merge.h */ pspp-1.0.1/src/math/box-whisker.c0000644000175000017500000000764413137223525013560 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "box-whisker.h" #include #include #include "data/case.h" #include "data/data-out.h" #include "data/val-type.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/str.h" #include "math/order-stats.h" #include "math/tukey-hinges.h" #include "gl/xalloc.h" static void destroy (struct statistic *s) { struct box_whisker *bw = UP_CAST (s, struct box_whisker, parent.parent); struct order_stats *os = &bw->parent; struct ll *ll; for (ll = ll_head (&bw->outliers); ll != ll_null (&bw->outliers); ) { struct outlier *e = ll_data (ll, struct outlier, ll); ll = ll_next (ll); ds_destroy (&e->label); free (e); } free (os->k); free (s); }; static void acc (struct statistic *s, const struct ccase *cx, double c UNUSED, double cc UNUSED, double y) { struct box_whisker *bw = UP_CAST (s, struct box_whisker, parent.parent); bool extreme; struct outlier *o; if ( y > bw->hinges[2] + bw->step) /* Upper outlier */ { extreme = (y > bw->hinges[2] + 2 * bw->step) ; } else if (y < bw->hinges[0] - bw->step) /* Lower outlier */ { extreme = (y < bw->hinges[0] - 2 * bw->step) ; } else /* Not an outlier */ { if (bw->whiskers[0] == SYSMIS) bw->whiskers[0] = y; if (y > bw->whiskers[1]) bw->whiskers[1] = y; return; } /* y is an outlier */ o = xzalloc (sizeof *o) ; o->value = y; o->extreme = extreme; ds_init_empty (&o->label); if (bw->id_var) { char *s = data_out (case_data_idx (cx, bw->id_idx), var_get_encoding (bw->id_var), var_get_print_format (bw->id_var)); ds_put_cstr (&o->label, s); free (s); } else { ds_put_format (&o->label, "%ld", (casenumber) case_data_idx (cx, bw->id_idx)->f); } ll_push_head (&bw->outliers, &o->ll); } void box_whisker_whiskers (const struct box_whisker *bw, double whiskers[2]) { whiskers[0] = bw->whiskers[0]; whiskers[1] = bw->whiskers[1]; } void box_whisker_hinges (const struct box_whisker *bw, double hinges[3]) { hinges[0] = bw->hinges[0]; hinges[1] = bw->hinges[1]; hinges[2] = bw->hinges[2]; } const struct ll_list * box_whisker_outliers (const struct box_whisker *bw) { return &bw->outliers; } /* Create a box_whisker struct, suitable for generating a boxplot. TH are the tukey hinges of the dataset. id_idx is the index into the casereader which will be used to label outliers. id_var is the variable from which that label came, or NULL */ struct box_whisker * box_whisker_create (const struct tukey_hinges *th, size_t id_idx, const struct variable *id_var) { struct box_whisker *w = xzalloc (sizeof (*w)); struct order_stats *os = &w->parent; struct statistic *stat = &os->parent; os->n_k = 0; stat->destroy = destroy; stat->accumulate = acc; tukey_hinges_calculate (th, w->hinges); w->id_idx = id_idx; w->id_var = id_var; w->step = (w->hinges[2] - w->hinges[0]) * 1.5; w->whiskers[1] = w->hinges[2]; w->whiskers[0] = SYSMIS; ll_init (&w->outliers); return w; } pspp-1.0.1/src/math/moments.c0000644000175000017500000003510712470413451012771 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/moments.h" #include #include #include #include "data/val-type.h" #include "data/value.h" #include "libpspp/misc.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Calculates variance, skewness, and kurtosis into *VARIANCE, *SKEWNESS, and *KURTOSIS if they are non-null and not greater moments than MAX_MOMENT. Accepts W as the total weight, D1 as the total deviation from the estimated mean, and D2, D3, and D4 as the sum of the squares, cubes, and 4th powers, respectively, of the deviation from the estimated mean. */ static void calc_moments (enum moment max_moment, double w, double d1, double d2, double d3, double d4, double *variance, double *skewness, double *kurtosis) { assert (w > 0.); if (max_moment >= MOMENT_VARIANCE && w > 1.) { double s2 = (d2 - pow2 (d1) / w) / (w - 1.); if (variance != NULL) *variance = s2; /* From _SPSS Statistical Algorithms, 2nd ed., 0-918469-89-9, section "DESCRIPTIVES". */ if (fabs (s2) >= 1e-20) { if (max_moment >= MOMENT_SKEWNESS && skewness != NULL && w > 2.) { double s3 = s2 * sqrt (s2); double g1 = (w * d3) / ((w - 1.0) * (w - 2.0) * s3); if (isfinite (g1)) *skewness = g1; } if (max_moment >= MOMENT_KURTOSIS && kurtosis != NULL && w > 3.) { double den = (w - 2.) * (w - 3.) * pow2 (s2); double g2 = (w * (w + 1) * d4 / (w - 1.) / den - 3. * pow2 (d2) / den); if (isfinite (g2)) *kurtosis = g2; } } } } /* Two-pass moments. */ /* A set of two-pass moments. */ struct moments { enum moment max_moment; /* Highest-order moment we're computing. */ int pass; /* Current pass (1 or 2). */ /* Pass one. */ double w1; /* Total weight for pass 1, so far. */ double sum; /* Sum of values so far. */ double mean; /* Mean = sum / w1. */ /* Pass two. */ double w2; /* Total weight for pass 2, so far. */ double d1; /* Sum of deviations from the mean. */ double d2; /* Sum of squared deviations from the mean. */ double d3; /* Sum of cubed deviations from the mean. */ double d4; /* Sum of (deviations from the mean)**4. */ }; /* Initializes moments M for calculating moment MAX_MOMENT and lower moments. */ static void init_moments (struct moments *m, enum moment max_moment) { assert (m != NULL); assert (max_moment == MOMENT_MEAN || max_moment == MOMENT_VARIANCE || max_moment == MOMENT_SKEWNESS || max_moment == MOMENT_KURTOSIS); m->max_moment = max_moment; moments_clear (m); } /* Clears out a set of moments so that it can be reused for a new set of values. The moments to be calculated are not changed. */ void moments_clear (struct moments *m) { m->pass = 1; m->w1 = m->w2 = 0.; m->sum = 0.; } /* Creates and returns a data structure for calculating moment MAX_MOMENT and lower moments on a data series. The user should call moments_pass_one() for each value in the series, then call moments_pass_two() for the same set of values in the same order, then call moments_calculate() to obtain the moments. The user may ask for the mean at any time during the first pass (using moments_calculate()), but otherwise no statistics may be requested until the end of the second pass. Call moments_destroy() when the moments are no longer needed. */ struct moments * moments_create (enum moment max_moment) { struct moments *m = xmalloc (sizeof *m); init_moments (m, max_moment); return m; } /* Adds VALUE with the given WEIGHT to the calculation of moments for the first pass. */ void moments_pass_one (struct moments *m, double value, double weight) { assert (m != NULL); assert (m->pass == 1); if (value != SYSMIS && weight > 0.) { m->sum += value * weight; m->w1 += weight; } } /* Adds VALUE with the given WEIGHT to the calculation of moments for the second pass. */ void moments_pass_two (struct moments *m, double value, double weight) { assert (m != NULL); if (m->pass == 1) { m->pass = 2; m->mean = m->w1 != 0. ? m->sum / m->w1 : 0.; m->d1 = m->d2 = m->d3 = m->d4 = 0.; } if (value != SYSMIS && weight >= 0.) { double d = value - m->mean; double d1_delta = d * weight; m->d1 += d1_delta; if (m->max_moment >= MOMENT_VARIANCE) { double d2_delta = d1_delta * d; m->d2 += d2_delta; if (m->max_moment >= MOMENT_SKEWNESS) { double d3_delta = d2_delta * d; m->d3 += d3_delta; if (m->max_moment >= MOMENT_KURTOSIS) { double d4_delta = d3_delta * d; m->d4 += d4_delta; } } } m->w2 += weight; } } /* Calculates moments based on the input data. Stores the total weight in *WEIGHT, the mean in *MEAN, the variance in *VARIANCE, the skewness in *SKEWNESS, and the kurtosis in *KURTOSIS. Any of these result parameters may be null pointers, in which case the values are not calculated. If any result cannot be calculated, either because they are undefined based on the input data or because their moments are higher than the maximum requested on moments_create(), then SYSMIS is stored into that result. */ void moments_calculate (const struct moments *m, double *weight, double *mean, double *variance, double *skewness, double *kurtosis) { assert (m != NULL); if (mean != NULL) *mean = SYSMIS; if (variance != NULL) *variance = SYSMIS; if (skewness != NULL) *skewness = SYSMIS; if (kurtosis != NULL) *kurtosis = SYSMIS; if (weight != NULL) *weight = m->w1; /* How many passes so far? */ if (m->pass == 1) { /* In the first pass we can only calculate the mean. */ if (mean != NULL && m->w1 > 0.) *mean = m->sum / m->w1; } else { /* After the second pass we can calculate any stat. */ assert (m->pass == 2); if (m->w2 > 0.) { if (mean != NULL) *mean = m->mean; calc_moments (m->max_moment, m->w2, m->d1, m->d2, m->d3, m->d4, variance, skewness, kurtosis); } } } /* Destroys a set of moments. */ void moments_destroy (struct moments *m) { free (m); } /* Calculates the requested moments on the CNT values in ARRAY. Each value is given a weight of 1. The total weight is stored into *WEIGHT (trivially) and the mean, variance, skewness, and kurtosis are stored into *MEAN, *VARIANCE, *SKEWNESS, and *KURTOSIS, respectively. Any of the result pointers may be null, in which case no value is stored. */ void moments_of_doubles (const double *array, size_t cnt, double *weight, double *mean, double *variance, double *skewness, double *kurtosis) { enum moment max_moment; struct moments m; size_t idx; if (kurtosis != NULL) max_moment = MOMENT_KURTOSIS; else if (skewness != NULL) max_moment = MOMENT_SKEWNESS; else if (variance != NULL) max_moment = MOMENT_VARIANCE; else max_moment = MOMENT_MEAN; init_moments (&m, max_moment); for (idx = 0; idx < cnt; idx++) moments_pass_one (&m, array[idx], 1.); for (idx = 0; idx < cnt; idx++) moments_pass_two (&m, array[idx], 1.); moments_calculate (&m, weight, mean, variance, skewness, kurtosis); } /* Calculates the requested moments on the CNT numeric values in ARRAY. Each value is given a weight of 1. The total weight is stored into *WEIGHT (trivially) and the mean, variance, skewness, and kurtosis are stored into *MEAN, *VARIANCE, *SKEWNESS, and *KURTOSIS, respectively. Any of the result pointers may be null, in which case no value is stored. */ void moments_of_values (const union value *array, size_t cnt, double *weight, double *mean, double *variance, double *skewness, double *kurtosis) { enum moment max_moment; struct moments m; size_t idx; if (kurtosis != NULL) max_moment = MOMENT_KURTOSIS; else if (skewness != NULL) max_moment = MOMENT_SKEWNESS; else if (variance != NULL) max_moment = MOMENT_VARIANCE; else max_moment = MOMENT_MEAN; init_moments (&m, max_moment); for (idx = 0; idx < cnt; idx++) moments_pass_one (&m, array[idx].f, 1.); for (idx = 0; idx < cnt; idx++) moments_pass_two (&m, array[idx].f, 1.); moments_calculate (&m, weight, mean, variance, skewness, kurtosis); } /* One-pass moments. */ /* A set of one-pass moments. */ struct moments1 { enum moment max_moment; /* Highest-order moment we're computing. */ double w; /* Total weight so far. */ double d1; /* Sum of deviations from the mean. */ double d2; /* Sum of squared deviations from the mean. */ double d3; /* Sum of cubed deviations from the mean. */ double d4; /* Sum of (deviations from the mean)**4. */ }; /* Initializes one-pass moments M for calculating moment MAX_MOMENT and lower moments. */ static void init_moments1 (struct moments1 *m, enum moment max_moment) { assert (m != NULL); assert (max_moment == MOMENT_MEAN || max_moment == MOMENT_VARIANCE || max_moment == MOMENT_SKEWNESS || max_moment == MOMENT_KURTOSIS); m->max_moment = max_moment; moments1_clear (m); } /* Clears out a set of one-pass moments so that it can be reused for a new set of values. The moments to be calculated are not changed. */ void moments1_clear (struct moments1 *m) { m->w = 0.; m->d1 = m->d2 = m->d3 = m->d4 = 0.; } /* Creates and returns a data structure for calculating moment MAX_MOMENT and lower moments on a data series in a single pass. The user should call moments1_add() for each value in the series. The user may call moments1_calculate() to obtain the current moments at any time. Call moments1_destroy() when the moments are no longer needed. One-pass moments should only be used when two passes over the data are impractical. */ struct moments1 * moments1_create (enum moment max_moment) { struct moments1 *m = xmalloc (sizeof *m); init_moments1 (m, max_moment); return m; } /* Adds VALUE with the given WEIGHT to the calculation of one-pass moments. */ void moments1_add (struct moments1 *m, double value, double weight) { assert (m != NULL); if (value != SYSMIS && weight > 0.) { double prev_w, v1; prev_w = m->w; m->w += weight; v1 = (weight / m->w) * (value - m->d1); m->d1 += v1; if (m->max_moment >= MOMENT_VARIANCE) { double v2 = v1 * v1; double w_prev_w = m->w * prev_w; double prev_m2 = m->d2; m->d2 += w_prev_w / weight * v2; if (m->max_moment >= MOMENT_SKEWNESS) { double w2 = weight * weight; double v3 = v2 * v1; double prev_m3 = m->d3; m->d3 += (-3. * v1 * prev_m2 + w_prev_w / w2 * (m->w - 2. * weight) * v3); if (m->max_moment >= MOMENT_KURTOSIS) { double w3 = w2 * weight; double v4 = v2 * v2; m->d4 += (-4. * v1 * prev_m3 + 6. * v2 * prev_m2 + ((pow2 (m->w) - 3. * weight * prev_w) * v4 * w_prev_w / w3)); } } } } } /* Calculates one-pass moments based on the input data. Stores the total weight in *WEIGHT, the mean in *MEAN, the variance in *VARIANCE, the skewness in *SKEWNESS, and the kurtosis in *KURTOSIS. Any of these result parameters may be null pointers, in which case the values are not calculated. If any result cannot be calculated, either because they are undefined based on the input data or because their moments are higher than the maximum requested on moments_create(), then SYSMIS is stored into that result. */ void moments1_calculate (const struct moments1 *m, double *weight, double *mean, double *variance, double *skewness, double *kurtosis) { assert (m != NULL); if (mean != NULL) *mean = SYSMIS; if (variance != NULL) *variance = SYSMIS; if (skewness != NULL) *skewness = SYSMIS; if (kurtosis != NULL) *kurtosis = SYSMIS; if (weight != NULL) *weight = m->w; if (m->w > 0.) { if (mean != NULL) *mean = m->d1; calc_moments (m->max_moment, m->w, 0., m->d2, m->d3, m->d4, variance, skewness, kurtosis); } } /* Destroy one-pass moments M. */ void moments1_destroy (struct moments1 *m) { free (m); } double calc_semean (double var, double W) { return sqrt (var / W); } /* Returns the standard error of the skewness for the given total weight W. From _SPSS Statistical Algorithms, 2nd ed., 0-918469-89-9, section "DESCRIPTIVES". */ double calc_seskew (double W) { return sqrt ((6. * W * (W - 1.)) / ((W - 2.) * (W + 1.) * (W + 3.))); } /* Returns the standard error of the kurtosis for the given total weight W. From _SPSS Statistical Algorithms, 2nd ed., 0-918469-89-9, section "DESCRIPTIVES", except that the sqrt symbol is omitted there. */ double calc_sekurt (double W) { return sqrt ((4. * (pow2 (W) - 1.) * pow2 (calc_seskew (W))) / ((W - 3.) * (W + 5.))); } pspp-1.0.1/src/math/tukey-hinges.c0000644000175000017500000000453712470243701013725 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/tukey-hinges.h" #include #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "math/order-stats.h" #include "gl/xalloc.h" void tukey_hinges_calculate (const struct tukey_hinges *th, double hinge[3]) { double a[3]; double a_star[3]; int i; const struct order_stats *os = &th->parent; for (i = 0 ; i < 3 ; ++i) { a_star[i] = os->k[i].tc - os->k[i].cc; a[i] = a_star[i] / os->k[i].c_p1; if (a_star[i] < 1) { if (os->k[i].c_p1 >= 1 ) { hinge[i] = (1 - a_star[i]) * os->k[i].y + a_star[i] * os->k[i].y_p1; } else { hinge[i] = (1 - a[i]) * os->k[i].y + a[i] * os->k[i].y_p1; } } else { hinge[i] = os->k[i].y_p1; } } } static void destroy (struct statistic *s) { struct tukey_hinges *th = UP_CAST (s, struct tukey_hinges, parent.parent); struct order_stats *os = &th->parent; free (os->k); free (s); }; struct tukey_hinges * tukey_hinges_create (double W, double c_min) { double d; struct tukey_hinges *th = xzalloc (sizeof (*th)); struct order_stats *os = &th->parent; struct statistic *stat = &os->parent; assert (c_min >= 0); os->n_k = 3; os->k = xcalloc (3, sizeof (*os->k)); if ( c_min >= 1.0) { d = floor ((W + 3) / 2.0) / 2.0; os->k[0].tc = d; os->k[1].tc = W/2.0 + 0.5; os->k[2].tc = W + 1 - d; } else { d = floor ((W/c_min + 3.0)/ 2.0) / 2.0 ; os->k[0].tc = d * c_min; os->k[1].tc = (W + c_min) / 2.0; os->k[2].tc = W + c_min * (1 - d); } stat->destroy = destroy; return th; } pspp-1.0.1/src/math/box-whisker.h0000644000175000017500000000337612470243700013557 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef __MATH_BOX_WHISKER_H__ #define __MATH_BOX_WHISKER_H__ #include #include "libpspp/ll.h" #include "libpspp/str.h" #include "math/order-stats.h" /* This module calculates the statistics typically displayed by box-plots. However, there's no reason not to use it for other purposes too. */ struct tukey_hinges; struct variable; struct outlier { double value; struct string label; bool extreme; struct ll ll; }; struct box_whisker { struct order_stats parent; double hinges[3]; double whiskers[2]; struct ll_list outliers; double step; size_t id_idx; const struct variable *id_var; }; struct box_whisker * box_whisker_create (const struct tukey_hinges *, size_t id_idx, const struct variable *id_var); void box_whisker_whiskers (const struct box_whisker *bw, double whiskers[2]); void box_whisker_hinges (const struct box_whisker *bw, double hinges[2]); const struct ll_list * box_whisker_outliers (const struct box_whisker *bw); #endif pspp-1.0.1/src/math/trimmed-mean.c0000644000175000017500000000444712470434665013703 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/trimmed-mean.h" #include #include "data/val-type.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "math/order-stats.h" #include "gl/xalloc.h" static void acc (struct statistic *s, const struct ccase *cx UNUSED, double c, double cc, double y) { struct trimmed_mean *tm = UP_CAST (s, struct trimmed_mean, parent.parent); struct order_stats *os = &tm->parent; if ( cc > os->k[0].tc && cc <= os->k[1].tc) tm->sum += c * y; if ( tm->cyk1p1 == SYSMIS && cc > os->k[0].tc) tm->cyk1p1 = c * y; } static void destroy (struct statistic *s) { struct trimmed_mean *tm = UP_CAST (s, struct trimmed_mean, parent.parent); struct order_stats *os = &tm->parent; free (os->k); free (tm); } struct trimmed_mean * trimmed_mean_create (double W, double tail) { struct trimmed_mean *tm = xzalloc (sizeof (*tm)); struct order_stats *os = &tm->parent; struct statistic *stat = &os->parent; os->n_k = 2; os->k = xcalloc (2, sizeof (*os->k)); assert (tail >= 0); assert (tail <= 1); os->k[0].tc = tail * W; os->k[1].tc = W * (1 - tail); stat->accumulate = acc; stat->destroy = destroy; tm->cyk1p1 = SYSMIS; tm->w = W; tm->tail = tail; return tm; } double trimmed_mean_calculate (const struct trimmed_mean *tm) { const struct order_stats *os = (const struct order_stats *) tm; return ( (os->k[0].cc - os->k[0].tc) * os->k[0].y_p1 + (tm->w - os->k[1].cc - os->k[0].tc) * os->k[1].y_p1 + tm->sum ) / ((1.0 - tm->tail * 2) * tm->w); } pspp-1.0.1/src/math/categoricals.c0000644000175000017500000005452013146355723013757 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/categoricals.h" #include "math/interaction.h" #include #include #include "data/case.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/array.h" #include "libpspp/hmap.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "libpspp/hash-functions.h" #include "gl/xalloc.h" #define CATEGORICALS_DEBUG 0 struct value_node { struct hmap_node node; /* Node in hash map. */ union value val; /* The value */ int index; /* A zero based unique index for this value */ }; struct interaction_value { struct hmap_node node; /* Node in hash map */ struct ccase *ccase; /* A case (probably the first in the dataset) which matches this value */ double cc; /* Total of the weights of cases matching this interaction */ void *user_data; /* A pointer to data which the caller can store stuff */ }; static struct value_node * lookup_value (const struct hmap *map, const union value *val, unsigned int hash, int width) { struct value_node *vn = NULL; HMAP_FOR_EACH_WITH_HASH (vn, struct value_node, node, hash, map) { if (value_equal (&vn->val, val, width)) break; } return vn; } struct variable_node { struct hmap_node node; /* Node in hash map. */ const struct variable *var; /* The variable */ struct hmap valmap; /* A map of value nodes */ int n_vals; /* Number of values for this variable */ }; /* Comparison function to sort value_nodes in ascending order */ static int compare_value_node_3way (const void *vn1_, const void *vn2_, const void *aux) { const struct value_node *const *vn1p = vn1_; const struct value_node *const *vn2p = vn2_; const struct variable_node *vn = aux; return value_compare_3way (&(*vn1p)->val, &(*vn2p)->val, var_get_width (vn->var)); } static struct variable_node * lookup_variable (const struct hmap *map, const struct variable *var, unsigned int hash) { struct variable_node *vn = NULL; HMAP_FOR_EACH_WITH_HASH (vn, struct variable_node, node, hash, map) { if (vn->var == var) break; fprintf (stderr, "%s:%d Warning: Hash table collision\n", __FILE__, __LINE__); } return vn; } struct interact_params { /* A map of cases indexed by a interaction_value */ struct hmap ivmap; const struct interaction *iact; int base_subscript_short; int base_subscript_long; /* The number of distinct values of this interaction */ int n_cats; /* An array of integers df_n * df_{n-1} * df_{n-2} ... These are the products of the degrees of freedom for the current variable and all preceding variables */ int *df_prod; double *enc_sum; /* A map of interaction_values indexed by subscript */ struct interaction_value **reverse_interaction_value_map; double cc; }; /* Comparison function to sort the reverse_value_map in ascending order */ static int compare_interaction_value_3way (const void *vn1_, const void *vn2_, const void *aux) { const struct interaction_value *const *vn1p = vn1_; const struct interaction_value *const *vn2p = vn2_; const struct interact_params *iap = aux; return interaction_case_cmp_3way (iap->iact, (*vn1p)->ccase, (*vn2p)->ccase); } struct categoricals { /* The weight variable */ const struct variable *wv; /* An array of interact_params */ struct interact_params *iap; /* Map whose members are the union of the variables which comprise IAP */ struct hmap varmap; /* The size of IAP. (ie, the number of interactions involved.) */ size_t n_iap; /* The number of categorical variables which contain entries. In the absence of missing values, this will be equal to N_IAP */ size_t n_vars; size_t df_sum; /* A map to enable the lookup of variables indexed by subscript. This map considers only the N - 1 of the N variables. */ int *reverse_variable_map_short; /* Like the above, but uses all N variables */ int *reverse_variable_map_long; size_t n_cats_total; struct pool *pool; /* Missing values in the dependent varirable to be excluded */ enum mv_class dep_excl; /* Missing values in the factor variables to be excluded */ enum mv_class fctr_excl; const void *aux1; void *aux2; bool sane; const struct payload *payload; }; bool categoricals_isbalanced (const struct categoricals *cat) { int i; for (i = 0 ; i < cat->n_iap; ++i) { int v; const struct interact_params *iap = &cat->iap[i]; double oval = -1.0; for (v = 0; v < hmap_count (&iap->ivmap); ++v) { const struct interaction_value *iv = iap->reverse_interaction_value_map[v]; if (oval == -1.0) oval = iv->cc; if (oval != iv->cc) return false; } } return true; } static void categoricals_dump (const struct categoricals *cat) { if (CATEGORICALS_DEBUG) { int i; printf ("Reverse Variable Map (short):\n"); for (i = 0; i < cat->df_sum; ++i) { printf (" %d", cat->reverse_variable_map_short[i]); } printf ("\n"); printf ("Reverse Variable Map (long):\n"); for (i = 0; i < cat->n_cats_total; ++i) { printf (" %d", cat->reverse_variable_map_long[i]); } printf ("\n"); printf ("Number of interactions %zu\n", cat->n_iap); for (i = 0 ; i < cat->n_iap; ++i) { int v; struct string str; const struct interact_params *iap = &cat->iap[i]; const struct interaction *iact = iap->iact; ds_init_empty (&str); interaction_to_string (iact, &str); printf ("\nInteraction: \"%s\" (number of categories: %d); ", ds_cstr (&str), iap->n_cats); ds_destroy (&str); printf ("Base index (short/long): %d/%d\n", iap->base_subscript_short, iap->base_subscript_long); printf ("\t("); for (v = 0; v < hmap_count (&iap->ivmap); ++v) { int vv; const struct interaction_value *iv = iap->reverse_interaction_value_map[v]; if (v > 0) printf (" "); printf ("{"); for (vv = 0; vv < iact->n_vars; ++vv) { const struct variable *var = iact->vars[vv]; const union value *val = case_data (iv->ccase, var); unsigned int varhash = hash_pointer (var, 0); struct variable_node *vn = lookup_variable (&cat->varmap, var, varhash); const int width = var_get_width (var); unsigned int valhash = value_hash (val, width, 0); struct value_node *valn = lookup_value (&vn->valmap, val, valhash, width); assert (vn->var == var); printf ("%.*g(%d)", DBL_DIG + 1, val->f, valn->index); if (vv < iact->n_vars - 1) printf (", "); } printf ("}"); } printf (")\n"); } } } void categoricals_destroy (struct categoricals *cat) { struct variable_node *vn = NULL; int i; if (NULL == cat) return; for (i = 0; i < cat->n_iap; ++i) { struct interaction_value *iv = NULL; /* Interate over each interaction value, and unref any cases that we reffed */ HMAP_FOR_EACH (iv, struct interaction_value, node, &cat->iap[i].ivmap) { if (cat->payload && cat->payload->destroy) cat->payload->destroy (cat->aux1, cat->aux2, iv->user_data); case_unref (iv->ccase); } free (cat->iap[i].enc_sum); free (cat->iap[i].df_prod); hmap_destroy (&cat->iap[i].ivmap); } /* Interate over each variable and delete its value map */ HMAP_FOR_EACH (vn, struct variable_node, node, &cat->varmap) { hmap_destroy (&vn->valmap); } hmap_destroy (&cat->varmap); pool_destroy (cat->pool); free (cat); } static struct interaction_value * lookup_case (const struct hmap *map, const struct interaction *iact, const struct ccase *c) { struct interaction_value *iv = NULL; size_t hash = interaction_case_hash (iact, c, 0); HMAP_FOR_EACH_WITH_HASH (iv, struct interaction_value, node, hash, map) { if (interaction_case_equal (iact, c, iv->ccase)) break; fprintf (stderr, "Warning: Hash table collision\n"); } return iv; } bool categoricals_sane (const struct categoricals *cat) { return cat->sane; } struct categoricals * categoricals_create (struct interaction *const*inter, size_t n_inter, const struct variable *wv, enum mv_class dep_excl, enum mv_class fctr_excl) { size_t i; struct categoricals *cat = xmalloc (sizeof *cat); cat->n_iap = n_inter; cat->wv = wv; cat->n_cats_total = 0; cat->n_vars = 0; cat->reverse_variable_map_short = NULL; cat->reverse_variable_map_long = NULL; cat->pool = pool_create (); cat->dep_excl = dep_excl; cat->fctr_excl = fctr_excl; cat->payload = NULL; cat->aux2 = NULL; cat->sane = false; cat->iap = pool_calloc (cat->pool, cat->n_iap, sizeof *cat->iap); hmap_init (&cat->varmap); for (i = 0 ; i < cat->n_iap; ++i) { int v; hmap_init (&cat->iap[i].ivmap); cat->iap[i].iact = inter[i]; cat->iap[i].cc = 0.0; for (v = 0; v < inter[i]->n_vars; ++v) { const struct variable *var = inter[i]->vars[v]; unsigned int hash = hash_pointer (var, 0); struct variable_node *vn = lookup_variable (&cat->varmap, var, hash); if (vn == NULL) { vn = pool_malloc (cat->pool, sizeof *vn); vn->var = var; vn->n_vals = 0; hmap_init (&vn->valmap); hmap_insert (&cat->varmap, &vn->node, hash); } } } return cat; } void categoricals_update (struct categoricals *cat, const struct ccase *c) { int i; struct variable_node *vn = NULL; double weight; if (NULL == cat) return; weight = cat->wv ? case_data (c, cat->wv)->f : 1.0; weight = var_force_valid_weight (cat->wv, weight, NULL); assert (NULL == cat->reverse_variable_map_short); assert (NULL == cat->reverse_variable_map_long); /* Interate over each variable, and add the value of that variable to the appropriate map, if it's not already present. */ HMAP_FOR_EACH (vn, struct variable_node, node, &cat->varmap) { const int width = var_get_width (vn->var); const union value *val = case_data (c, vn->var); unsigned int hash = value_hash (val, width, 0); struct value_node *valn = lookup_value (&vn->valmap, val, hash, width); if (valn == NULL) { valn = pool_malloc (cat->pool, sizeof *valn); valn->index = -1; vn->n_vals++; value_init (&valn->val, width); value_copy (&valn->val, val, width); hmap_insert (&vn->valmap, &valn->node, hash); } } for (i = 0 ; i < cat->n_iap; ++i) { const struct interaction *iact = cat->iap[i].iact; size_t hash; struct interaction_value *node; if ( interaction_case_is_missing (iact, c, cat->fctr_excl)) continue; hash = interaction_case_hash (iact, c, 0); node = lookup_case (&cat->iap[i].ivmap, iact, c); if ( NULL == node) { node = pool_malloc (cat->pool, sizeof *node); node->ccase = case_ref (c); node->cc = weight; hmap_insert (&cat->iap[i].ivmap, &node->node, hash); if (cat->payload) { node->user_data = cat->payload->create (cat->aux1, cat->aux2); } } else { node->cc += weight; } cat->iap[i].cc += weight; if (cat->payload) { cat->payload->update (cat->aux1, cat->aux2, node->user_data, c, weight); } } } /* Return the number of categories (distinct values) for interction N */ size_t categoricals_n_count (const struct categoricals *cat, size_t n) { return hmap_count (&cat->iap[n].ivmap); } size_t categoricals_df (const struct categoricals *cat, size_t n) { const struct interact_params *iap = &cat->iap[n]; return iap->df_prod[iap->iact->n_vars - 1]; } /* Return the total number of categories */ size_t categoricals_n_total (const struct categoricals *cat) { if (!categoricals_is_complete (cat)) return 0; return cat->n_cats_total; } size_t categoricals_df_total (const struct categoricals *cat) { if (NULL == cat) return 0; return cat->df_sum; } bool categoricals_is_complete (const struct categoricals *cat) { return (NULL != cat->reverse_variable_map_short); } /* This function must be called *before* any call to categoricals_get_*_by subscript and *after* all calls to categoricals_update */ void categoricals_done (const struct categoricals *cat_) { /* Implementation Note: Whilst this function is O(n) in cat->n_cats_total, in most uses it will be more efficient that using a tree based structure, since it is called only once, and means that subsequent lookups will be O(1). 1 call of O(n) + 10^9 calls of O(1) is better than 10^9 calls of O(log n). */ struct categoricals *cat = CONST_CAST (struct categoricals *, cat_); int v; int i; int idx_short = 0; int idx_long = 0; if (NULL == cat) return; cat->df_sum = 0; cat->n_cats_total = 0; /* Calculate the degrees of freedom, and the number of categories */ for (i = 0 ; i < cat->n_iap; ++i) { int df = 1; const struct interaction *iact = cat->iap[i].iact; cat->iap[i].df_prod = iact->n_vars ? xcalloc (iact->n_vars, sizeof (int)) : NULL; cat->iap[i].n_cats = 1; for (v = 0 ; v < iact->n_vars; ++v) { int x; const struct variable *var = iact->vars[v]; struct variable_node *vn = lookup_variable (&cat->varmap, var, hash_pointer (var, 0)); struct value_node *valnd = NULL; struct value_node **array ; assert (vn->n_vals == hmap_count (&vn->valmap)); if (vn->n_vals == 0) { cat->sane = false; return; } /* Sort the VALMAP here */ array = xcalloc (sizeof *array, vn->n_vals); x = 0; HMAP_FOR_EACH (valnd, struct value_node, node, &vn->valmap) { /* Note: This loop is probably superfluous, it could be done in the update stage (at the expense of a realloc) */ array[x++] = valnd; } sort (array, vn->n_vals, sizeof (*array), compare_value_node_3way, vn); for (x = 0; x < vn->n_vals; ++x) { struct value_node *vvv = array[x]; vvv->index = x; } free (array); cat->iap[i].df_prod[v] = df * (vn->n_vals - 1); df = cat->iap[i].df_prod[v]; cat->iap[i].n_cats *= vn->n_vals; } if (v > 0) cat->df_sum += cat->iap[i].df_prod [v - 1]; cat->n_cats_total += cat->iap[i].n_cats; } cat->reverse_variable_map_short = pool_calloc (cat->pool, cat->df_sum, sizeof *cat->reverse_variable_map_short); cat->reverse_variable_map_long = pool_calloc (cat->pool, cat->n_cats_total, sizeof *cat->reverse_variable_map_long); for (i = 0 ; i < cat->n_iap; ++i) { struct interaction_value *ivn = NULL; int x = 0; int ii; struct interact_params *iap = &cat->iap[i]; iap->base_subscript_short = idx_short; iap->base_subscript_long = idx_long; iap->reverse_interaction_value_map = pool_calloc (cat->pool, iap->n_cats, sizeof *iap->reverse_interaction_value_map); HMAP_FOR_EACH (ivn, struct interaction_value, node, &iap->ivmap) { iap->reverse_interaction_value_map[x++] = ivn; } assert (x <= iap->n_cats); /* For some purposes (eg CONTRASTS in ONEWAY) the values need to be sorted */ sort (iap->reverse_interaction_value_map, x, sizeof (*iap->reverse_interaction_value_map), compare_interaction_value_3way, iap); /* Fill the remaining values with null */ for (ii = x ; ii < iap->n_cats; ++ii) iap->reverse_interaction_value_map[ii] = NULL; /* Populate the reverse variable maps. */ if (iap->df_prod) { for (ii = 0; ii < iap->df_prod [iap->iact->n_vars - 1]; ++ii) cat->reverse_variable_map_short[idx_short++] = i; } for (ii = 0; ii < iap->n_cats; ++ii) cat->reverse_variable_map_long[idx_long++] = i; } assert (cat->n_vars <= cat->n_iap); categoricals_dump (cat); /* Tally up the sums for all the encodings */ for (i = 0 ; i < cat->n_iap; ++i) { int x, y; struct interact_params *iap = &cat->iap[i]; const struct interaction *iact = iap->iact; const int df = iap->df_prod ? iap->df_prod [iact->n_vars - 1] : 0; iap->enc_sum = xcalloc (df, sizeof (*(iap->enc_sum))); for (y = 0; y < hmap_count (&iap->ivmap); ++y) { struct interaction_value *iv = iap->reverse_interaction_value_map[y]; for (x = iap->base_subscript_short; x < iap->base_subscript_short + df ;++x) { const double bin = categoricals_get_effects_code_for_case (cat, x, iv->ccase); iap->enc_sum [x - iap->base_subscript_short] += bin * iv->cc; } if (cat->payload && cat->payload->calculate) cat->payload->calculate (cat->aux1, cat->aux2, iv->user_data); } } cat->sane = true; } static int reverse_variable_lookup_short (const struct categoricals *cat, int subscript) { assert (cat->reverse_variable_map_short); assert (subscript >= 0); assert (subscript < cat->df_sum); return cat->reverse_variable_map_short[subscript]; } static int reverse_variable_lookup_long (const struct categoricals *cat, int subscript) { assert (cat->reverse_variable_map_long); assert (subscript >= 0); assert (subscript < cat->n_cats_total); return cat->reverse_variable_map_long[subscript]; } /* Return the interaction corresponding to SUBSCRIPT */ const struct interaction * categoricals_get_interaction_by_subscript (const struct categoricals *cat, int subscript) { int index = reverse_variable_lookup_short (cat, subscript); return cat->iap[index].iact; } double categoricals_get_weight_by_subscript (const struct categoricals *cat, int subscript) { int vindex = reverse_variable_lookup_short (cat, subscript); const struct interact_params *vp = &cat->iap[vindex]; return vp->cc; } double categoricals_get_sum_by_subscript (const struct categoricals *cat, int subscript) { int vindex = reverse_variable_lookup_short (cat, subscript); const struct interact_params *vp = &cat->iap[vindex]; return vp->enc_sum[subscript - vp->base_subscript_short]; } /* Returns unity if the value in case C at SUBSCRIPT is equal to the category for that subscript */ static double categoricals_get_code_for_case (const struct categoricals *cat, int subscript, const struct ccase *c, bool effects_coding) { const struct interaction *iact = categoricals_get_interaction_by_subscript (cat, subscript); const int i = reverse_variable_lookup_short (cat, subscript); const int base_index = cat->iap[i].base_subscript_short; int v; double result = 1.0; const struct interact_params *iap = &cat->iap[i]; double dfp = 1.0; for (v = 0; v < iact->n_vars; ++v) { const struct variable *var = iact->vars[v]; const union value *val = case_data (c, var); const int width = var_get_width (var); const struct variable_node *vn = lookup_variable (&cat->varmap, var, hash_pointer (var, 0)); const unsigned int hash = value_hash (val, width, 0); const struct value_node *valn = lookup_value (&vn->valmap, val, hash, width); double bin = 1.0; const double df = iap->df_prod[v] / dfp; /* Translate the subscript into an index for the individual variable */ const int index = ((subscript - base_index) % iap->df_prod[v] ) / dfp; dfp = iap->df_prod [v]; if (effects_coding && valn->index == df ) bin = -1.0; else if ( valn->index != index ) bin = 0; result *= bin; } return result; } /* Returns unity if the value in case C at SUBSCRIPT is equal to the category for that subscript */ double categoricals_get_dummy_code_for_case (const struct categoricals *cat, int subscript, const struct ccase *c) { return categoricals_get_code_for_case (cat, subscript, c, false); } /* Returns unity if the value in case C at SUBSCRIPT is equal to the category for that subscript. Else if it is the last category, return -1. Otherwise return 0. */ double categoricals_get_effects_code_for_case (const struct categoricals *cat, int subscript, const struct ccase *c) { return categoricals_get_code_for_case (cat, subscript, c, true); } size_t categoricals_get_n_variables (const struct categoricals *cat) { printf ("%s\n", __FUNCTION__); return cat->n_vars; } /* Return a case containing the set of values corresponding to the Nth Category of the IACTth interaction */ const struct ccase * categoricals_get_case_by_category_real (const struct categoricals *cat, int iact, int n) { const struct interaction_value *vn; const struct interact_params *vp = &cat->iap[iact]; if ( n >= hmap_count (&vp->ivmap)) return NULL; vn = vp->reverse_interaction_value_map [n]; return vn->ccase; } /* Return a the user data corresponding to the Nth Category of the IACTth interaction. */ void * categoricals_get_user_data_by_category_real (const struct categoricals *cat, int iact, int n) { const struct interact_params *vp = &cat->iap[iact]; const struct interaction_value *iv ; if ( n >= hmap_count (&vp->ivmap)) return NULL; iv = vp->reverse_interaction_value_map [n]; return iv->user_data; } /* Return a case containing the set of values corresponding to SUBSCRIPT */ const struct ccase * categoricals_get_case_by_category (const struct categoricals *cat, int subscript) { int vindex = reverse_variable_lookup_long (cat, subscript); const struct interact_params *vp = &cat->iap[vindex]; const struct interaction_value *vn = vp->reverse_interaction_value_map [subscript - vp->base_subscript_long]; return vn->ccase; } void * categoricals_get_user_data_by_category (const struct categoricals *cat, int subscript) { int vindex = reverse_variable_lookup_long (cat, subscript); const struct interact_params *vp = &cat->iap[vindex]; const struct interaction_value *iv = vp->reverse_interaction_value_map [subscript - vp->base_subscript_long]; return iv->user_data; } void categoricals_set_payload (struct categoricals *cat, const struct payload *p, const void *aux1, void *aux2) { cat->payload = p; cat->aux1 = aux1; cat->aux2 = aux2; } pspp-1.0.1/src/math/np.c0000644000175000017500000000511212470243701011714 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/np.h" #include #include #include #include "data/case.h" #include "data/casewriter.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/misc.h" #include "math/moments.h" #include "gl/xalloc.h" static void destroy (struct statistic *stat) { struct np *np = UP_CAST (stat, struct np, parent.parent); free (np); } static void acc (struct statistic *s, const struct ccase *cx UNUSED, double c, double cc, double y) { struct ccase *cp; struct np *np = UP_CAST (s, struct np, parent.parent); double rank = np->prev_cc + (c + 1) / 2.0; double ns = gsl_cdf_ugaussian_Pinv (rank / ( np->n + 1 )); double z = (y - np->mean) / np->stddev; double dns = z - ns; maximize (&np->ns_max, ns); minimize (&np->ns_min, ns); maximize (&np->dns_max, dns); minimize (&np->dns_min, dns); maximize (&np->y_max, y); minimize (&np->y_min, y); cp = case_create (casewriter_get_proto (np->writer)); case_data_rw_idx (cp, NP_IDX_Y)->f = y; case_data_rw_idx (cp, NP_IDX_NS)->f = ns; case_data_rw_idx (cp, NP_IDX_DNS)->f = dns; casewriter_write (np->writer, cp); np->prev_cc = cc; } struct np * np_create (double n, double mean, double var) { struct np *np = xzalloc (sizeof (*np)); struct order_stats *os = &np->parent; struct statistic *stat = &os->parent; struct caseproto *proto; int i; np->prev_cc = 0; np->n = n; np->mean = mean; np->stddev = sqrt (var); np->y_min = np->ns_min = np->dns_min = DBL_MAX; np->y_max = np->ns_max = np->dns_max = -DBL_MAX; proto = caseproto_create (); for (i = 0; i < n_NP_IDX; i++) proto = caseproto_add_width (proto, 0); np->writer = autopaging_writer_create (proto); caseproto_unref (proto); os->k = 0; stat->destroy = destroy; stat->accumulate = acc; return np; } pspp-1.0.1/src/math/merge.c0000644000175000017500000000716412470243701012407 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* FIXME: error checking. */ /* FIXME: merge pattern should be improved, this one causes a performance regression. */ #include #include "math/merge.h" #include "data/case.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/subcase.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/taint.h" #include "gl/xalloc.h" #define MAX_MERGE_ORDER 7 struct merge_input { struct casereader *reader; struct ccase *c; }; struct merge { struct subcase ordering; struct merge_input inputs[MAX_MERGE_ORDER]; size_t input_cnt; struct caseproto *proto; }; static void do_merge (struct merge *m); struct merge * merge_create (const struct subcase *ordering, const struct caseproto *proto) { struct merge *m = xmalloc (sizeof *m); subcase_clone (&m->ordering, ordering); m->input_cnt = 0; m->proto = caseproto_ref (proto); return m; } void merge_destroy (struct merge *m) { if (m != NULL) { size_t i; subcase_destroy (&m->ordering); for (i = 0; i < m->input_cnt; i++) casereader_destroy (m->inputs[i].reader); caseproto_unref (m->proto); free (m); } } void merge_append (struct merge *m, struct casereader *r) { r = casereader_rename (r); m->inputs[m->input_cnt++].reader = r; if (m->input_cnt >= MAX_MERGE_ORDER) do_merge (m); } struct casereader * merge_make_reader (struct merge *m) { struct casereader *r; if (m->input_cnt > 1) do_merge (m); if (m->input_cnt == 1) { r = m->inputs[0].reader; m->input_cnt = 0; } else if (m->input_cnt == 0) { struct casewriter *writer = mem_writer_create (m->proto); r = casewriter_make_reader (writer); } else NOT_REACHED (); return r; } static bool read_input_case (struct merge *m, size_t idx) { struct merge_input *i = &m->inputs[idx]; i->c = casereader_read (i->reader); if (i->c) return true; else { casereader_destroy (i->reader); remove_element (m->inputs, m->input_cnt, sizeof *m->inputs, idx); m->input_cnt--; return false; } } static void do_merge (struct merge *m) { struct casewriter *w; size_t i; assert (m->input_cnt > 1); w = tmpfile_writer_create (m->proto); for (i = 0; i < m->input_cnt; i++) taint_propagate (casereader_get_taint (m->inputs[i].reader), casewriter_get_taint (w)); for (i = 0; i < m->input_cnt; ) if (read_input_case (m, i)) i++; while (m->input_cnt > 0) { size_t min; min = 0; for (i = 1; i < m->input_cnt; i++) if (subcase_compare_3way (&m->ordering, m->inputs[i].c, &m->ordering, m->inputs[min].c) < 0) min = i; casewriter_write (w, m->inputs[min].c); read_input_case (m, min); } m->input_cnt = 1; m->inputs[0].reader = casewriter_make_reader (w); } pspp-1.0.1/src/math/percentiles.c0000644000175000017500000001017512470413451013622 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/percentiles.h" #include "data/casereader.h" #include "data/val-type.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "math/order-stats.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid const char *const ptile_alg_desc[] = { "", N_("HAverage"), N_("Weighted Average"), N_("Rounded"), N_("Empirical"), N_("Empirical with averaging") }; double percentile_calculate (const struct percentile *ptl, enum pc_alg alg) { struct percentile *mutable = CONST_CAST (struct percentile *, ptl); const struct order_stats *os = &ptl->parent; if ( ptl->g1 == SYSMIS) mutable->g1 = (os->k[0].tc - os->k[0].cc) / os->k[0].c_p1; if ( ptl->g1_star == SYSMIS) mutable->g1_star = os->k[0].tc - os->k[0].cc; if ( ptl->g2 == SYSMIS) { if ( os->k[1].c == 0 ) mutable->g2 = os->k[1].tc / os->k[1].c_p1; else if ( os->k[1].c_p1 == 0 ) mutable->g2 = 0; else mutable->g2 = (os->k[1].tc - os->k[1].cc) / os->k[1].c_p1; } if ( ptl->g2_star == SYSMIS) { if ( os->k[1].c == 0 ) mutable->g2_star = os->k[1].tc; else if ( os->k[1].c_p1 == 0 ) mutable->g2_star = 0; else mutable->g2_star = os->k[1].tc - os->k[1].cc; } switch (alg) { case PC_WAVERAGE: if ( ptl->g1_star >= 1.0) return os->k[0].y_p1; else { double a = ( os->k[0].y == SYSMIS ) ? 0 : os->k[0].y; if (os->k[0].c_p1 >= 1.0) return (1 - ptl->g1_star) * a + ptl->g1_star * os->k[0].y_p1; else return (1 - ptl->g1) * a + ptl->g1 * os->k[0].y_p1; } break; case PC_ROUND: { double a = ( os->k[0].y == SYSMIS ) ? 0 : os->k[0].y; if (os->k[0].c_p1 >= 1.0) return (ptl->g1_star < 0.5) ? a : os->k[0].y_p1; else return (ptl->g1 < 0.5) ? a : os->k[0].y_p1; } break; case PC_EMPIRICAL: if ( ptl->g1_star == 0 ) return os->k[0].y; else return os->k[0].y_p1; break; case PC_HAVERAGE: if ( ptl->g2_star >= 1.0) { return os->k[1].y_p1; } else { double a = ( os->k[1].y == SYSMIS ) ? 0 : os->k[1].y; if ( os->k[1].c_p1 >= 1.0) { if ( ptl->g2_star == 0) return os->k[1].y; return (1 - ptl->g2_star) * a + ptl->g2_star * os->k[1].y_p1; } else { return (1 - ptl->g2) * a + ptl->g2 * os->k[1].y_p1; } } break; case PC_AEMPIRICAL: if ( ptl->g1_star == 0 ) return (os->k[0].y + os->k[0].y_p1)/ 2.0; else return os->k[0].y_p1; break; default: NOT_REACHED (); break; } NOT_REACHED (); return SYSMIS; } static void destroy (struct statistic *stat) { struct percentile *ptl = UP_CAST (stat, struct percentile, parent.parent); struct order_stats *os = &ptl->parent; free (os->k); free (ptl); } struct percentile * percentile_create (double p, double W) { struct percentile *ptl = xzalloc (sizeof (*ptl)); struct order_stats *os = &ptl->parent; struct statistic *stat = &os->parent; assert (p >= 0); assert (p <= 1.0); ptl->ptile = p; ptl->w = W; os->n_k = 2; os->k = xcalloc (2, sizeof (*os->k)); os->k[0].tc = W * p; os->k[1].tc = (W + 1.0) * p; ptl->g1 = ptl->g1_star = SYSMIS; ptl->g2 = ptl->g2_star = SYSMIS; os->k[1].y_p1 = os->k[1].y = SYSMIS; os->k[0].y_p1 = os->k[0].y = SYSMIS; stat->destroy = destroy; return ptl; } pspp-1.0.1/src/math/interaction.h0000644000175000017500000000374112470243701013631 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef _INTERACTION_H__ #define _INTERACTION_H__ 1 #include #include "data/missing-values.h" struct interaction; struct variable; struct string; #include struct interaction { size_t n_vars; const struct variable **vars; }; struct interaction * interaction_create (const struct variable *); struct interaction * interaction_clone (const struct interaction *); void interaction_destroy (struct interaction *); void interaction_add_variable (struct interaction *, const struct variable *); void interaction_dump (const struct interaction *); void interaction_to_string (const struct interaction *iact, struct string *str); bool interaction_is_proper_subset (const struct interaction *x, const struct interaction *y); bool interaction_is_subset (const struct interaction *x, const struct interaction *y); struct ccase; unsigned int interaction_case_hash (const struct interaction *, const struct ccase *, unsigned int base); bool interaction_case_equal (const struct interaction *, const struct ccase *, const struct ccase *); bool interaction_case_is_missing (const struct interaction *, const struct ccase *, enum mv_class); int interaction_case_cmp_3way (const struct interaction *, const struct ccase *, const struct ccase *); #endif pspp-1.0.1/src/math/sort.h0000644000175000017500000000236512470242642012305 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef MATH_SORT_H #define MATH_SORT_H 1 struct subcase; struct caseproto; struct variable; extern int min_buffers ; extern int max_buffers ; struct casewriter *sort_create_writer (const struct subcase *, const struct caseproto *); struct casereader *sort_execute (struct casereader *, const struct subcase *); struct casereader *sort_execute_1var (struct casereader *, const struct variable *); #endif /* math/sort.h */ pspp-1.0.1/src/math/categoricals.h0000644000175000017500000001055213137223525013753 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef _CATEGORICALS__ #define _CATEGORICALS__ #include #include "data/missing-values.h" struct categoricals; struct variable; struct ccase; struct interaction; union value ; struct categoricals *categoricals_create (struct interaction *const*, size_t n_int, const struct variable *wv, enum mv_class dep_excl, enum mv_class fctr_excl); void categoricals_destroy (struct categoricals *); void categoricals_update (struct categoricals *cat, const struct ccase *c); /* Return the number of categories (distinct values) for variable N */ size_t categoricals_n_count (const struct categoricals *cat, size_t n); size_t categoricals_df (const struct categoricals *cat, size_t n); /* Return the total number of categories */ size_t categoricals_n_total (const struct categoricals *cat); /* Return the total degrees of freedom */ size_t categoricals_df_total (const struct categoricals *cat); /* Return the total number of variables which participated in these categoricals. Due to the possibility of missing values, this is NOT necessarily equal to the number of variables passed in when the object was created. */ size_t categoricals_get_n_variables (const struct categoricals *cat); bool categoricals_is_complete (const struct categoricals *cat); /* Must be called (once) before any call to the *_by_subscript or *_by_category functions, but AFTER any calls to categoricals_update. If this function returns false, then no calls to _by_subscript or *_by_category are allowed. */ void categoricals_done (const struct categoricals *cat); bool categoricals_sane (const struct categoricals *cat); /* The *_by_subscript functions use the short map. Their intended use is by covariance matrix routines, where normally 1 less than the total number of distinct values of each categorical variable should be considered. */ double categoricals_get_weight_by_subscript (const struct categoricals *cat, int subscript); const struct interaction *categoricals_get_interaction_by_subscript (const struct categoricals *cat, int subscript); double categoricals_get_sum_by_subscript (const struct categoricals *cat, int subscript); /* Returns unity if the value in case C at SUBSCRIPT is equal to the category for that subscript */ double categoricals_get_dummy_code_for_case (const struct categoricals *cat, int subscript, const struct ccase *c); /* Returns unity if the value in case C at SUBSCRIPT is equal to the category for that subscript. Else if it is the last category, return -1. Otherwise return 0. */ double categoricals_get_effects_code_for_case (const struct categoricals *cat, int subscript, const struct ccase *c); /* These use the long map. Useful for descriptive statistics. */ const struct ccase * categoricals_get_case_by_category_real (const struct categoricals *cat, int iact, int n); void * categoricals_get_user_data_by_category_real (const struct categoricals *cat, int iact, int n); void * categoricals_get_user_data_by_category (const struct categoricals *cat, int category); const struct ccase * categoricals_get_case_by_category (const struct categoricals *cat, int subscript); struct payload { void* (*create) (const void *aux1, void *aux2); void (*update) (const void *aux1, void *aux2, void *user_data, const struct ccase *, double weight); void (*calculate) (const void *aux1, void *aux2, void *user_data); void (*destroy) (const void *aux1, void *aux2, void *user_data); }; void categoricals_set_payload (struct categoricals *cats, const struct payload *p, const void *aux1, void *aux2); bool categoricals_isbalanced (const struct categoricals *cat); #endif pspp-1.0.1/src/math/chart-geometry.h0000644000175000017500000000201412537363615014247 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef CHART_GEOMETRY_H #define CHART_GEOMETRY_H void chart_get_scale (double high, double low, double *lower, double *interval, int *n_ticks); char * chart_get_ticks_format (const double lower, const double interval, const unsigned int nticks, double *scale); #endif pspp-1.0.1/src/math/order-stats.c0000644000175000017500000000772412470243701013561 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/order-stats.h" #include #include "data/casereader.h" #include "data/val-type.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "gl/xalloc.h" #if 0 #include static void order_stats_dump_k1 (const struct order_stats *os) { struct k *k = &os->k[0]; printf ("K1: tc %g; c %g cc %g ccp %g\n", k->tc, k->c, k->cc, k->cc_p1); } static void order_stats_dump_k2 (const struct order_stats *os) { struct k *k = &os->k[1]; printf ("K2: tc %g; c %g cc %g ccp %g\n", k->tc, k->c, k->cc, k->cc_p1); } void order_stats_dump (const struct order_stats *os) { order_stats_dump_k1 (os); order_stats_dump_k2 (os); } #endif static void update_k_lower (struct k *kk, double y_i, double c_i, double cc_i) { if ( cc_i <= kk->tc ) { kk->cc = cc_i; kk->c = c_i; kk->y = y_i; } } static void update_k_upper (struct k *kk, double y_i, double c_i, double cc_i) { if ( cc_i > kk->tc && kk->c_p1 == 0) { kk->cc_p1 = cc_i; kk->c_p1 = c_i; kk->y_p1 = y_i; } } static void update_k_values (const struct ccase *cx, double y_i, double c_i, double cc_i, struct order_stats **os, size_t n_os) { int j; for (j = 0 ; j < n_os ; ++j) { int k; struct order_stats *tos = os[j]; struct statistic *stat = &tos->parent; for (k = 0 ; k < tos->n_k; ++k) { struct k *myk = &tos->k[k]; update_k_lower (myk, y_i, c_i, cc_i); update_k_upper (myk, y_i, c_i, cc_i); } if ( stat->accumulate ) stat->accumulate (stat, cx, c_i, cc_i, y_i); tos->cc = cc_i; } } void order_stats_accumulate_idx (struct order_stats **os, size_t nos, struct casereader *reader, int wt_idx, int val_idx) { struct ccase *cx; struct ccase *prev_cx = NULL; double prev_value = -DBL_MAX; double cc_i = 0; double c_i = 0; for (; (cx = casereader_read (reader)) != NULL; case_unref (cx)) { const double weight = (wt_idx == -1) ? 1.0 : case_data_idx (cx, wt_idx)->f; const double this_value = case_data_idx (cx, val_idx)->f; /* The casereader MUST be sorted */ assert (this_value >= prev_value); if ( prev_value == -DBL_MAX || prev_value == this_value) c_i += weight; if ( prev_value > -DBL_MAX && this_value > prev_value) { update_k_values (prev_cx, prev_value, c_i, cc_i, os, nos); c_i = weight; } case_unref (prev_cx); cc_i += weight; prev_value = this_value; prev_cx = case_ref (cx); } update_k_values (prev_cx, prev_value, c_i, cc_i, os, nos); case_unref (prev_cx); casereader_destroy (reader); } void order_stats_accumulate (struct order_stats **os, size_t nos, struct casereader *reader, const struct variable *wv, const struct variable *var, enum mv_class exclude) { /* Filter out missing cases */ reader = casereader_create_filter_missing (reader, &var, 1, exclude, NULL, NULL); order_stats_accumulate_idx (os, nos, reader, wv ? var_get_case_index (wv) : -1, var_get_case_index (var)); } pspp-1.0.1/src/math/random.h0000644000175000017500000000167512470242642012601 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2005 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef RANDOM_H #define RANDOM_H 1 #include void random_init (void); void random_done (void); gsl_rng *get_rng (void); void set_rng (unsigned long seed); #endif /* random.h */ pspp-1.0.1/src/math/covariance.c0000644000175000017500000004470413137223525013426 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "math/covariance.h" #include #include "data/case.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/misc.h" #include "math/categoricals.h" #include "math/interaction.h" #include "math/moments.h" #include "gl/xalloc.h" #define n_MOMENTS (MOMENT_VARIANCE + 1) /* Create a new matrix of NEW_SIZE x NEW_SIZE and copy the elements of matrix IN into it. IN must be a square matrix, and in normal usage it will be smaller than NEW_SIZE. IN is destroyed by this function. The return value must be destroyed when no longer required. */ static gsl_matrix * resize_matrix (gsl_matrix *in, size_t new_size) { size_t i, j; gsl_matrix *out = NULL; assert (in->size1 == in->size2); if (new_size <= in->size1) return in; out = gsl_matrix_calloc (new_size, new_size); for (i = 0; i < in->size1; ++i) { for (j = 0; j < in->size2; ++j) { double x = gsl_matrix_get (in, i, j); gsl_matrix_set (out, i, j, x); } } gsl_matrix_free (in); return out; } struct covariance { /* True if the covariances are centerered. (ie Real covariances) */ bool centered; /* The variables for which the covariance matrix is to be calculated. */ size_t n_vars; const struct variable *const *vars; /* Categorical variables. */ struct categoricals *categoricals; /* Array containing number of categories per categorical variable. */ size_t *n_categories; /* Dimension of the covariance matrix. */ size_t dim; /* The weight variable (or NULL if none) */ const struct variable *wv; /* A set of matrices containing the 0th, 1st and 2nd moments */ gsl_matrix **moments; /* The class of missing values to exclude */ enum mv_class exclude; /* An array of doubles representing the covariance matrix. Only the top triangle is included, and no diagonals */ double *cm; int n_cm; /* 1 for single pass algorithm; 2 for double pass algorithm */ short passes; /* 0 : No pass has been made 1 : First pass has been started 2 : Second pass has been IE: How many passes have been (partially) made. */ short state; /* Flags indicating that the first case has been seen */ bool pass_one_first_case_seen; bool pass_two_first_case_seen; gsl_matrix *unnormalised; }; /* Return a matrix containing the M th moments. The matrix is of size NxN where N is the number of variables. Each row represents the moments of a variable. In the absence of missing values, the columns of this matrix will be identical. If missing values are involved, then element (i,j) is the moment of the i th variable, when paired with the j th variable. */ const gsl_matrix * covariance_moments (const struct covariance *cov, int m) { return cov->moments[m]; } /* Create a covariance struct. */ struct covariance * covariance_1pass_create (size_t n_vars, const struct variable *const *vars, const struct variable *weight, enum mv_class exclude, bool centered) { size_t i; struct covariance *cov = xzalloc (sizeof *cov); cov->centered = centered; cov->passes = 1; cov->state = 0; cov->pass_one_first_case_seen = cov->pass_two_first_case_seen = false; cov->vars = vars; cov->wv = weight; cov->n_vars = n_vars; cov->dim = n_vars; cov->moments = xmalloc (sizeof *cov->moments * n_MOMENTS); for (i = 0; i < n_MOMENTS; ++i) cov->moments[i] = gsl_matrix_calloc (n_vars, n_vars); cov->exclude = exclude; cov->n_cm = (n_vars * (n_vars - 1) ) / 2; cov->cm = xcalloc (cov->n_cm, sizeof *cov->cm); cov->categoricals = NULL; return cov; } /* Create a covariance struct for a two-pass algorithm. If categorical variables are involed, the dimension cannot be know until after the first data pass, so the actual covariances will not be allocated until then. */ struct covariance * covariance_2pass_create (size_t n_vars, const struct variable *const *vars, struct categoricals *cats, const struct variable *wv, enum mv_class exclude, bool centered) { size_t i; struct covariance *cov = xmalloc (sizeof *cov); cov->centered = centered; cov->passes = 2; cov->state = 0; cov->pass_one_first_case_seen = cov->pass_two_first_case_seen = false; cov->vars = vars; cov->wv = wv; cov->n_vars = n_vars; cov->dim = n_vars; cov->moments = xmalloc (sizeof *cov->moments * n_MOMENTS); for (i = 0; i < n_MOMENTS; ++i) cov->moments[i] = gsl_matrix_calloc (n_vars, n_vars); cov->exclude = exclude; cov->n_cm = -1; cov->cm = NULL; cov->categoricals = cats; cov->unnormalised = NULL; return cov; } /* Return an integer, which can be used to index into COV->cm, to obtain the I, J th element of the covariance matrix. If COV->cm does not contain that element, then a negative value will be returned. */ static int cm_idx (const struct covariance *cov, int i, int j) { int as; const int n2j = cov->dim - 2 - j; const int nj = cov->dim - 2 ; assert (i >= 0); assert (j < cov->dim); if ( i == 0) return -1; if (j >= cov->dim - 1) return -1; if ( i <= j) return -1 ; as = nj * (nj + 1) ; as -= n2j * (n2j + 1) ; as /= 2; return i - 1 + as; } /* Returns true iff the variable corresponding to the Ith element of the covariance matrix has a missing value for case C */ static bool is_missing (const struct covariance *cov, int i, const struct ccase *c) { const struct variable *var = i < cov->n_vars ? cov->vars[i] : categoricals_get_interaction_by_subscript (cov->categoricals, i - cov->n_vars)->vars[0]; const union value *val = case_data (c, var); return var_is_value_missing (var, val, cov->exclude); } static double get_val (const struct covariance *cov, int i, const struct ccase *c) { if ( i < cov->n_vars) { const struct variable *var = cov->vars[i]; const union value *val = case_data (c, var); return val->f; } return categoricals_get_effects_code_for_case (cov->categoricals, i - cov->n_vars, c); } #if 0 void dump_matrix (const gsl_matrix *m) { size_t i, j; for (i = 0 ; i < m->size1; ++i) { for (j = 0 ; j < m->size2; ++j) printf ("%02f ", gsl_matrix_get (m, i, j)); printf ("\n"); } } #endif /* Call this function for every case in the data set */ void covariance_accumulate_pass1 (struct covariance *cov, const struct ccase *c) { size_t i, j, m; const double weight = cov->wv ? case_data (c, cov->wv)->f : 1.0; assert (cov->passes == 2); if (!cov->pass_one_first_case_seen) { assert (cov->state == 0); cov->state = 1; } if (cov->categoricals) categoricals_update (cov->categoricals, c); for (i = 0 ; i < cov->dim; ++i) { double v1 = get_val (cov, i, c); if ( is_missing (cov, i, c)) continue; for (j = 0 ; j < cov->dim; ++j) { double pwr = 1.0; if ( is_missing (cov, j, c)) continue; for (m = 0 ; m <= MOMENT_MEAN; ++m) { double *x = gsl_matrix_ptr (cov->moments[m], i, j); *x += pwr * weight; pwr *= v1; } } } cov->pass_one_first_case_seen = true; } /* Call this function for every case in the data set */ void covariance_accumulate_pass2 (struct covariance *cov, const struct ccase *c) { size_t i, j; const double weight = cov->wv ? case_data (c, cov->wv)->f : 1.0; assert (cov->passes == 2); assert (cov->state >= 1); if (! cov->pass_two_first_case_seen) { size_t m; assert (cov->state == 1); cov->state = 2; if (cov->categoricals) categoricals_done (cov->categoricals); cov->dim = cov->n_vars; if (cov->categoricals) cov->dim += categoricals_df_total (cov->categoricals); cov->n_cm = (cov->dim * (cov->dim - 1) ) / 2; cov->cm = xcalloc (cov->n_cm, sizeof *cov->cm); /* Grow the moment matrices so that they're large enough to accommodate the categorical elements */ for (i = 0; i < n_MOMENTS; ++i) { cov->moments[i] = resize_matrix (cov->moments[i], cov->dim); } /* Populate the moments matrices with the categorical value elements */ for (i = cov->n_vars; i < cov->dim; ++i) { for (j = 0 ; j < cov->dim ; ++j) /* FIXME: This is WRONG !!! */ { double w = categoricals_get_weight_by_subscript (cov->categoricals, i - cov->n_vars); gsl_matrix_set (cov->moments[MOMENT_NONE], i, j, w); w = categoricals_get_sum_by_subscript (cov->categoricals, i - cov->n_vars); gsl_matrix_set (cov->moments[MOMENT_MEAN], i, j, w); } } /* FIXME: This is WRONG!! It must be fixed to properly handle missing values. For now it assumes there are none */ for (m = 0 ; m < n_MOMENTS; ++m) { for (i = 0 ; i < cov->dim ; ++i) { double x = gsl_matrix_get (cov->moments[m], i, cov->n_vars -1); for (j = cov->n_vars; j < cov->dim; ++j) { gsl_matrix_set (cov->moments[m], i, j, x); } } } /* Divide the means by the number of samples */ for (i = 0; i < cov->dim; ++i) { for (j = 0; j < cov->dim; ++j) { double *x = gsl_matrix_ptr (cov->moments[MOMENT_MEAN], i, j); *x /= gsl_matrix_get (cov->moments[MOMENT_NONE], i, j); } } } for (i = 0 ; i < cov->dim; ++i) { double v1 = get_val (cov, i, c); if ( is_missing (cov, i, c)) continue; for (j = 0 ; j < cov->dim; ++j) { int idx; double ss ; double v2 = get_val (cov, j, c); const double s = pow2 (v1 - gsl_matrix_get (cov->moments[MOMENT_MEAN], i, j)) * weight; if ( is_missing (cov, j, c)) continue; { double *x = gsl_matrix_ptr (cov->moments[MOMENT_VARIANCE], i, j); *x += s; } ss = (v1 - gsl_matrix_get (cov->moments[MOMENT_MEAN], i, j)) * (v2 - gsl_matrix_get (cov->moments[MOMENT_MEAN], i, j)) * weight ; idx = cm_idx (cov, i, j); if (idx >= 0) { cov->cm [idx] += ss; } } } cov->pass_two_first_case_seen = true; } /* Call this function for every case in the data set. After all cases have been passed, call covariance_calculate */ void covariance_accumulate (struct covariance *cov, const struct ccase *c) { size_t i, j, m; const double weight = cov->wv ? case_data (c, cov->wv)->f : 1.0; assert (cov->passes == 1); if ( !cov->pass_one_first_case_seen) { assert ( cov->state == 0); cov->state = 1; } for (i = 0 ; i < cov->dim; ++i) { const union value *val1 = case_data (c, cov->vars[i]); if ( is_missing (cov, i, c)) continue; for (j = 0 ; j < cov->dim; ++j) { double pwr = 1.0; int idx; const union value *val2 = case_data (c, cov->vars[j]); if ( is_missing (cov, j, c)) continue; idx = cm_idx (cov, i, j); if (idx >= 0) { cov->cm [idx] += val1->f * val2->f * weight; } for (m = 0 ; m < n_MOMENTS; ++m) { double *x = gsl_matrix_ptr (cov->moments[m], i, j); *x += pwr * weight; pwr *= val1->f; } } } cov->pass_one_first_case_seen = true; } /* Allocate and return a gsl_matrix containing the covariances of the data. */ static gsl_matrix * cm_to_gsl (struct covariance *cov) { int i, j; gsl_matrix *m = gsl_matrix_calloc (cov->dim, cov->dim); /* Copy the non-diagonal elements from cov->cm */ for ( j = 0 ; j < cov->dim - 1; ++j) { for (i = j+1 ; i < cov->dim; ++i) { double x = cov->cm [cm_idx (cov, i, j)]; gsl_matrix_set (m, i, j, x); gsl_matrix_set (m, j, i, x); } } /* Copy the diagonal elements from cov->moments[2] */ for (j = 0 ; j < cov->dim ; ++j) { double sigma = gsl_matrix_get (cov->moments[2], j, j); gsl_matrix_set (m, j, j, sigma); } return m; } static gsl_matrix * covariance_calculate_double_pass (struct covariance *cov) { size_t i, j; for (i = 0 ; i < cov->dim; ++i) { for (j = 0 ; j < cov->dim; ++j) { int idx; double *x = gsl_matrix_ptr (cov->moments[MOMENT_VARIANCE], i, j); *x /= gsl_matrix_get (cov->moments[MOMENT_NONE], i, j); idx = cm_idx (cov, i, j); if ( idx >= 0) { x = &cov->cm [idx]; *x /= gsl_matrix_get (cov->moments[MOMENT_NONE], i, j); } } } return cm_to_gsl (cov); } static gsl_matrix * covariance_calculate_single_pass (struct covariance *cov) { size_t i, j; size_t m; for (m = 0; m < n_MOMENTS; ++m) { /* Divide the moments by the number of samples */ if ( m > 0) { for (i = 0 ; i < cov->dim; ++i) { for (j = 0 ; j < cov->dim; ++j) { double *x = gsl_matrix_ptr (cov->moments[m], i, j); *x /= gsl_matrix_get (cov->moments[0], i, j); if ( m == MOMENT_VARIANCE) *x -= pow2 (gsl_matrix_get (cov->moments[1], i, j)); } } } } if (cov->centered) { /* Centre the moments */ for ( j = 0 ; j < cov->dim - 1; ++j) { for (i = j + 1 ; i < cov->dim; ++i) { double *x = &cov->cm [cm_idx (cov, i, j)]; *x /= gsl_matrix_get (cov->moments[0], i, j); *x -= gsl_matrix_get (cov->moments[MOMENT_MEAN], i, j) * gsl_matrix_get (cov->moments[MOMENT_MEAN], j, i); } } } return cm_to_gsl (cov); } /* Return a pointer to gsl_matrix containing the pairwise covariances. The caller owns the returned matrix and must free it when it is no longer needed. Call this function only after all data have been accumulated. */ gsl_matrix * covariance_calculate (struct covariance *cov) { if ( cov->state <= 0 ) return NULL; switch (cov->passes) { case 1: return covariance_calculate_single_pass (cov); break; case 2: return covariance_calculate_double_pass (cov); break; default: NOT_REACHED (); } } /* Covariance computed without dividing by the sample size. */ static gsl_matrix * covariance_calculate_double_pass_unnormalized (struct covariance *cov) { return cm_to_gsl (cov); } static gsl_matrix * covariance_calculate_single_pass_unnormalized (struct covariance *cov) { size_t i, j; if (cov->centered) { for (i = 0 ; i < cov->dim; ++i) { for (j = 0 ; j < cov->dim; ++j) { double *x = gsl_matrix_ptr (cov->moments[MOMENT_VARIANCE], i, j); *x -= pow2 (gsl_matrix_get (cov->moments[MOMENT_MEAN], i, j)) / gsl_matrix_get (cov->moments[MOMENT_NONE], i, j); } } for ( j = 0 ; j < cov->dim - 1; ++j) { for (i = j + 1 ; i < cov->dim; ++i) { double *x = &cov->cm [cm_idx (cov, i, j)]; *x -= gsl_matrix_get (cov->moments[MOMENT_MEAN], i, j) * gsl_matrix_get (cov->moments[MOMENT_MEAN], j, i) / gsl_matrix_get (cov->moments[MOMENT_NONE], i, j); } } } return cm_to_gsl (cov); } /* Return a pointer to gsl_matrix containing the pairwise covariances. The returned matrix is owned by the structure, and must not be freed. Call this function only after all data have been accumulated. */ const gsl_matrix * covariance_calculate_unnormalized (struct covariance *cov) { if ( cov->state <= 0 ) return NULL; if (cov->unnormalised != NULL) return cov->unnormalised; switch (cov->passes) { case 1: cov->unnormalised = covariance_calculate_single_pass_unnormalized (cov); break; case 2: cov->unnormalised = covariance_calculate_double_pass_unnormalized (cov); break; default: NOT_REACHED (); } return cov->unnormalised; } /* Function to access the categoricals used by COV The return value is owned by the COV */ const struct categoricals * covariance_get_categoricals (const struct covariance *cov) { return cov->categoricals; } /* Destroy the COV object */ void covariance_destroy (struct covariance *cov) { size_t i; categoricals_destroy (cov->categoricals); for (i = 0; i < n_MOMENTS; ++i) gsl_matrix_free (cov->moments[i]); gsl_matrix_free (cov->unnormalised); free (cov->moments); free (cov->cm); free (cov); } size_t covariance_dim (const struct covariance * cov) { return (cov->dim); } /* Routines to assist debugging. The following are not thoroughly tested and in certain respects unreliable. They should only be used for aids to development. Not as user accessible code. */ #include "libpspp/str.h" #include "output/tab.h" #include "data/format.h" /* Create a table which can be populated with the encodings for the covariance matrix COV */ struct tab_table * covariance_dump_enc_header (const struct covariance *cov, int length) { struct tab_table *t = tab_create (cov->dim, length); int n; int i; tab_title (t, "Covariance Encoding"); tab_box (t, TAL_2, TAL_2, 0, 0, 0, 0, tab_nc (t) - 1, tab_nr (t) - 1); tab_hline (t, TAL_2, 0, tab_nc (t) - 1, 1); for (i = 0 ; i < cov->n_vars; ++i) { tab_text (t, i, 0, TAT_TITLE, var_get_name (cov->vars[i])); tab_vline (t, TAL_1, i + 1, 0, tab_nr (t) - 1); } n = 0; while (i < cov->dim) { struct string str; int idx = i - cov->n_vars; const struct interaction *iact = categoricals_get_interaction_by_subscript (cov->categoricals, idx); int df; ds_init_empty (&str); interaction_to_string (iact, &str); df = categoricals_df (cov->categoricals, n); tab_joint_text (t, i, 0, i + df - 1, 0, TAT_TITLE, ds_cstr (&str)); if (i + df < tab_nr (t) - 1) tab_vline (t, TAL_1, i + df, 0, tab_nr (t) - 1); i += df; n++; ds_destroy (&str); } return t; } /* Append table T, which should have been returned by covariance_dump_enc_header with an entry corresponding to case C for the covariance matrix COV */ void covariance_dump_enc (const struct covariance *cov, const struct ccase *c, struct tab_table *t) { static int row = 0; int i; ++row; for (i = 0 ; i < cov->dim; ++i) { double v = get_val (cov, i, c); tab_double (t, i, row, 0, v, i < cov->n_vars ? NULL : &F_8_0, RC_OTHER); } } pspp-1.0.1/src/math/interaction.c0000644000175000017500000001271313137223525013626 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/case.h" #include "interaction.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include /* An interaction is a structure containing a "product" of other variables. The variables can be either string or numeric. Interaction is commutative. That means, that from a mathematical point of view, the order of the variables is irrelevant. However, for display purposes, and for matching with an interaction's value the order is pertinent. Therefore, when using these functions, make sure the orders of variables and values match when appropriate. */ struct interaction * interaction_create (const struct variable *v) { struct interaction *i = xmalloc (sizeof *i); i->vars = xmalloc (sizeof *i->vars); i->n_vars = 0; if ( v ) { i->vars[0] = v; i->n_vars = 1; } return i; } /* Deep copy an interaction */ struct interaction * interaction_clone (const struct interaction *iact) { int v; struct interaction *i = xmalloc (sizeof *i); i->vars = xcalloc (iact->n_vars, sizeof *i->vars); i->n_vars = iact->n_vars; for (v = 0; v < iact->n_vars; ++v) { i->vars[v] = iact->vars[v]; } return i; } void interaction_destroy (struct interaction *i) { if (NULL == i) return; free (i->vars); free (i); } void interaction_add_variable (struct interaction *i, const struct variable *v) { i->vars = xrealloc (i->vars, sizeof (*i->vars) * ++i->n_vars); i->vars[i->n_vars - 1] = v; } /* Do the variables in X->VARS constitute a proper subset of the variables in Y->VARS? */ bool interaction_is_proper_subset (const struct interaction *x, const struct interaction *y) { if (x->n_vars >= y->n_vars) return false; return interaction_is_subset (x, y); } /* Do the variables in X->VARS constitute a subset (proper or otherwise) of the variables in Y->VARS? */ bool interaction_is_subset (const struct interaction *x, const struct interaction *y) { size_t i; size_t j; size_t n = 0; /* By definition, a subset cannot have more members than its superset */ if (x->n_vars > y->n_vars) return false; /* Count the number of values which are members of both sets */ for (i = 0; i < x->n_vars; i++) { for (j = 0; j < y->n_vars; j++) { if (x->vars [i] == y->vars [j]) { n++; } } } /* If ALL the members of X were also found in Y, then this must be a subset */ if (n >= x->n_vars) return true; return false; } void interaction_dump (const struct interaction *i) { int v = 0; if ( i->n_vars == 0) { printf ("(empty)\n"); return; } printf ("%s", var_get_name (i->vars[v])); for (v = 1; v < i->n_vars; ++v) printf (" * %s", var_get_name (i->vars[v])); printf ("\n"); } /* Appends STR with a representation of the interaction, suitable for user display. STR must have been initialised prior to calling this function. */ void interaction_to_string (const struct interaction *iact, struct string *str) { int v = 0; if ( iact->n_vars == 0) return; ds_put_cstr (str, var_to_string (iact->vars[v])); for (v = 1; v < iact->n_vars; ++v) { ds_put_cstr (str, " * "); ds_put_cstr (str, var_to_string (iact->vars[v])); } } unsigned int interaction_case_hash (const struct interaction *iact, const struct ccase *c, unsigned int base) { int i; size_t hash = base; for (i = 0; i < iact->n_vars; ++i) { const struct variable *var = iact->vars[i]; const union value *val = case_data (c, var); hash = value_hash (val, var_get_width (var), hash); } return hash; } bool interaction_case_equal (const struct interaction *iact, const struct ccase *c1, const struct ccase *c2) { int i; bool same = true; for (i = 0; i < iact->n_vars; ++i) { const struct variable *var = iact->vars[i]; if ( ! value_equal (case_data (c1, var), case_data (c2, var), var_get_width (var))) { same = false; break; } } return same; } int interaction_case_cmp_3way (const struct interaction *iact, const struct ccase *c1, const struct ccase *c2) { int i; int result = 0; for (i = 0; i < iact->n_vars; ++i) { const struct variable *var = iact->vars[i]; result = value_compare_3way (case_data (c1, var), case_data (c2, var), var_get_width (var)); if (result != 0) break; } return result; } bool interaction_case_is_missing (const struct interaction *iact, const struct ccase *c, enum mv_class exclude) { int i; bool missing = false; for (i = 0; i < iact->n_vars; ++i) { if ( var_is_value_missing (iact->vars[i], case_data (c, iact->vars[i]), exclude)) { missing = true; break; } } return missing; } pspp-1.0.1/src/math/trimmed-mean.h0000644000175000017500000000221012470243701013657 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef __TRIMMED_MEAN_H__ #define __TRIMMED_MEAN_H__ #include "order-stats.h" struct trimmed_mean { struct order_stats parent; /* The partial sum */ double sum; /* The product of c_{k_1+1} and y_{k_1 + 1} */ double cyk1p1; double w; double tail; }; struct trimmed_mean * trimmed_mean_create (double W, double c_min); double trimmed_mean_calculate (const struct trimmed_mean *); #endif pspp-1.0.1/src/math/np.h0000644000175000017500000000230612470243701011723 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef __NP_H__ #define __NP_H__ #include "order-stats.h" struct casewriter; enum { NP_IDX_Y = 0, NP_IDX_NS, NP_IDX_DNS, n_NP_IDX }; struct np { struct order_stats parent; double n; double mean; double stddev; double prev_cc; double ns_min; double ns_max; double dns_min; double dns_max; double y_min; double y_max; struct casewriter *writer; }; struct np * np_create (double n, double mean, double var); #endif pspp-1.0.1/src/math/wilcoxon-sig.c0000644000175000017500000001152312470243701013724 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Thanks to Rob van Son for writing the original version of this file. This version has been completely rewritten; only the name of the function has been retained. In the process of rewriting, it was sped up from O(2**N) to O(N**3). */ #include #include "wilcoxon-sig.h" #include #include #include #include #include "xalloc.h" /* For integers N and W, with 0 <= N < CHAR_BIT*sizeof(long), calculates and returns the value of the function S(N,W), defined as the number of subsets of 1, 2, 3, ..., N that sum to at least W. There are 2**N subsets of N items, so S(N,W) is in the range 0...2**N. There are a few trivial cases: * For W <= 0, S(N,W) = 2**N. * For W > N*(N+1)/2, S(N,W) = 0. * S(1,1) = 1. Notably, these trivial cases include all values of W for N = 1. Now consider the remaining, nontrivial cases, that is, N > 1 and 1 <= W <= N*(N+1)/2. In this case, apply the following identity: S(N,W) = S(N-1, W) + S(N-1, W-N). The first term on the right hand is the number of subsets that do not include N that sum to at least W; the second term is the number of subsets that do include N that sum to at least W. Then we repeatedly apply the identity to the result, reducing the value of N by 1 each time until we reach N=1. Some expansions yield trivial cases, e.g. if W - N <= 0 (in which case we add a 2**N term to the final result) or if W is greater than the new N. Here is an example: S(7,7) = S(6,7) + S(6,0) = S(6,7) + 64 = (S(5,7) + S(5,1)) + 64 = (S(4,7) + S(4,2)) + (S(4,1) + S(4,0)) + 64 = S(4,7) + S(4,2) + S(4,1) + 80 = (S(3,7) + S(3,3)) + (S(3,2) + S(3,2)) + (S(3,1) + S(3,0)) + 80 = S(3,3) + 2*S(3,2) + S(3,1) + 88 = (S(2,3) + S(2,0)) + 2*(S(2,2) + S(2,0)) + (S(2,1) + S(2,0)) + 88 = S(2,3) + 2*S(2,2) + S(2,1) + 104 = (S(1,3) + S(1,1)) + 2*(S(1,2) + S(1,0)) + (S(1,1) + S(2,0)) + 104 = 2*S(1,1) + 112 = 114 This function runs in O(N*W) = O(N**3) time. It seems very likely that it can be made to run in O(N**2) time or perhaps even better, but N is, practically speaking, quite small. Plus, the return value may be as large as N**2, so N must not be larger than 31 on 32-bit systems anyhow, and even 63**3 is only 250,047. */ static unsigned long int count_sums_to_W (unsigned long int n, unsigned long int w) { /* The array contain ints even though everything else is long, but no element in the array can have a value bigger than N, and using int will save some memory on 64-bit systems. */ unsigned long int total; unsigned long int max; int *array; assert (n < CHAR_BIT * sizeof (unsigned long int)); if (n == 0) return 0; else if (w <= 0) return 1 << n; else if (w > n * (n + 1) / 2) return 0; else if (n == 1) return 1; array = xcalloc (w + 1, sizeof *array); array[w] = 1; max = w; total = 0; for (; n > 1; n--) { unsigned long int max_sum = n * (n + 1) / 2; int i; if (max_sum < max) max = max_sum; for (i = 1; i <= max; i++) if (array[i] != 0) { int new_w = i - n; if (new_w <= 0) total += array[i] * (1 << (n - 1)); else array[new_w] += array[i]; } } total += array[1]; free (array); return total; } /* Returns the exact, two-tailed level of significance for the Wilcoxon Matched-Pairs Signed-Ranks test, given sum of ranks of positive (or negative samples) W and sample size N. Returns -1 if the exact significance level cannot be calculated because W is out of the supported range. */ double LevelOfSignificanceWXMPSR (double w, long int n) { unsigned long int max_w; /* Limit N to valid range that won't cause integer overflow. */ if (n < 0 || n >= CHAR_BIT * sizeof (unsigned long int)) return -1; max_w = n * (n + 1) / 2; if (w < max_w / 2) w = max_w - w; return count_sums_to_W (n, ceil (w)) / (double) (1 << n) * 2; } pspp-1.0.1/src/math/statistic.h0000644000175000017500000000220012470242642013311 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef __STATISTIC_H__ #define __STATISTIC_H__ #include struct ccase ; struct statistic { void (*accumulate) (struct statistic *, const struct ccase *cx, double c, double cc, double y); void (*destroy) (struct statistic *); }; static inline void statistic_destroy (struct statistic *s); static inline void statistic_destroy (struct statistic *s) { if (s) s->destroy (s); } #endif pspp-1.0.1/src/math/extrema.h0000644000175000017500000000266512470243701012763 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef __EXTREMA_H__ #define __EXTREMA_H__ 1 #include #include "data/case.h" #include "libpspp/ll.h" struct extremum { double value; casenumber location; double weight; /* Internal use only */ struct ll ll; }; enum extreme_end { EXTREME_MAXIMA, EXTREME_MINIMA }; struct extrema; struct extrema *extrema_create (size_t n, enum extreme_end); void extrema_destroy (struct extrema *extrema); void extrema_add (struct extrema *extrema, double val, double weight, casenumber location); void extrema_show (const struct extrema *extrema); const struct ll_list * extrema_list (const struct extrema *); bool extrema_top (const struct extrema *, double *); #endif pspp-1.0.1/src/math/histogram.h0000644000175000017500000000251713137223525013312 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef __HISTOGRAM_H__ #define __HISTOGRAM_H__ #include #include "math/statistic.h" #include struct histogram { struct statistic parent; gsl_histogram *gsl_hist; }; /* Prepare a histogram for data which lies in the range [min, max) bin_width is a nominal figure only. It is a hint about what might be an good approximate bin width, but the implementation will adjust it as it thinks fit. */ struct histogram * histogram_create (double bin_width, double min, double max); void histogram_add (struct histogram *h, double y, double c); #endif pspp-1.0.1/src/math/correlation.c0000644000175000017500000000446013137223525013630 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "math/correlation.h" #include #include #include #include "libpspp/misc.h" #include "gl/minmax.h" double significance_of_correlation (double rho, double w) { double t = w - 2; /* |rho| will mathematically always be in the range [0, 1.0]. Inaccurate calculations sometimes cause it to be slightly greater than 1.0, so force it into the correct range to avoid NaN from sqrt(). */ t /= 1 - MIN (1, pow2 (rho)); t = sqrt (t); t *= rho; if (t > 0) return gsl_cdf_tdist_Q (t, w - 2); else return gsl_cdf_tdist_P (t, w - 2); } gsl_matrix * correlation_from_covariance (const gsl_matrix *cv, const gsl_matrix *v) { size_t i, j; gsl_matrix *corr = gsl_matrix_calloc (cv->size1, cv->size2); for (i = 0 ; i < cv->size1; ++i) { for (j = 0 ; j < cv->size2; ++j) { double rho = gsl_matrix_get (cv, i, j); rho /= sqrt (gsl_matrix_get (v, i, j)) * sqrt (gsl_matrix_get (v, j, i)); gsl_matrix_set (corr, i, j, rho); } } return corr; } gsl_matrix * covariance_from_correlation (const gsl_matrix *corr, const gsl_matrix *v) { size_t i, j; assert (corr->size1 == corr->size2); gsl_matrix *output = gsl_matrix_calloc (corr->size1, corr->size2); for (i = 0 ; i < corr->size1; ++i) { for (j = 0 ; j < corr->size2; ++j) { double r = gsl_matrix_get (corr, i, j); r *= sqrt (gsl_matrix_get (v, i, j)) * sqrt (gsl_matrix_get (v, j, i)); gsl_matrix_set (output, i, j, r); } } return output; } pspp-1.0.1/src/math/automake.mk0000644000175000017500000000361213137223525013300 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- noinst_LTLIBRARIES += src/math/libpspp-math.la src_math_libpspp_math_la_LIBADD = \ lib/linreg/liblinreg.la \ lib/tukey/libtukey.la src_math_libpspp_math_la_SOURCES = \ src/math/chart-geometry.c \ src/math/chart-geometry.h \ src/math/box-whisker.c src/math/box-whisker.h \ src/math/categoricals.h \ src/math/categoricals.c \ src/math/covariance.c \ src/math/covariance.h \ src/math/correlation.c \ src/math/correlation.h \ src/math/extrema.c src/math/extrema.h \ src/math/histogram.c src/math/histogram.h \ src/math/interaction.c src/math/interaction.h \ src/math/levene.c src/math/levene.h \ src/math/linreg.c src/math/linreg.h \ src/math/merge.c src/math/merge.h \ src/math/moments.c src/math/moments.h \ src/math/np.c src/math/np.h \ src/math/order-stats.c src/math/order-stats.h \ src/math/percentiles.c src/math/percentiles.h \ src/math/random.c src/math/random.h \ src/math/statistic.h \ src/math/sort.c src/math/sort.h \ src/math/trimmed-mean.c src/math/trimmed-mean.h \ src/math/tukey-hinges.c src/math/tukey-hinges.h \ src/math/wilcoxon-sig.c src/math/wilcoxon-sig.h pspp-1.0.1/src/math/covariance.h0000644000175000017500000000421113137223525013420 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef COVARIANCE_H #define COVARIANCE_H #include #include #include "data/missing-values.h" struct covariance; struct variable; struct ccase ; struct categoricals; struct covariance * covariance_1pass_create (size_t n_vars, const struct variable *const *vars, const struct variable *wv, enum mv_class excl, bool centered); struct covariance * covariance_2pass_create (size_t n_vars, const struct variable *const *vars, struct categoricals *cats, const struct variable *wv, enum mv_class excl, bool centered); void covariance_accumulate (struct covariance *, const struct ccase *); void covariance_accumulate_pass1 (struct covariance *, const struct ccase *); void covariance_accumulate_pass2 (struct covariance *, const struct ccase *); gsl_matrix * covariance_calculate (struct covariance *); const gsl_matrix * covariance_calculate_unnormalized (struct covariance *); void covariance_destroy (struct covariance *cov); const gsl_matrix *covariance_moments (const struct covariance *cov, int m); const struct categoricals * covariance_get_categoricals (const struct covariance *cov); size_t covariance_dim (const struct covariance * cov); struct tab_table ; void covariance_dump_enc (const struct covariance *cov, const struct ccase *c, struct tab_table *t); struct tab_table * covariance_dump_enc_header (const struct covariance *cov, int length); #endif pspp-1.0.1/src/math/chart-geometry.c0000644000175000017500000001342113137223525014236 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include "chart-geometry.h" #include #include "gl/xalloc.h" #include "gl/minmax.h" #include "gl/xvasprintf.h" #include "gettext.h" #define _(msgid) gettext (msgid) static const double standard_tick[] = {1, 2, 5, 10}; /* Find a set {LOWER, INTERVAL, N_TICKS} such that: LOWER <= LOWDBL, LOWER + INTERVAL > LOWDBL, LOWER + N_TICKS * INTERVAL < HIGHDBL LOWER + (N_TICKS + 1) * INTERVAL >= HIGHDBL INTERVAL = X * 10^N where: N is integer and X is an element of {1, 2, 5} In other words: INTERVAL > < |....+....+....+. .+....| LOWER 1 2 3 N_TICKS ^LOWDBL ^HIGHDBL */ void chart_get_scale (double high, double low, double *lower, double *interval, int *n_ticks) { int i; double fitness = DBL_MAX; double logrange; *n_ticks = 0; assert (high >= low); if ((high - low) < 10 * DBL_MIN) { *n_ticks = 0; *lower = low; *interval = 0.0; return; } logrange = floor(log10(high-low)); /* Find the most pleasing interval */ for (i = 1; i < 4; ++i) { double cinterval = standard_tick[i] * pow(10.0,logrange-1); double clower = floor(low/cinterval) * cinterval; int cnticks = ceil((high - clower) / cinterval)-1; double cfitness = fabs(7.5 - cnticks); if (cfitness < fitness) { fitness = cfitness; *lower = clower; *interval = cinterval; *n_ticks = cnticks; } } } /* Generate a format string which can be passed to printf like functions, which will produce a string in scientific notation representing a real number. N_DECIMALS is the number of decimal places EXPONENT is the value of the exponent. */ static inline char * gen_pango_markup_scientific_format_string (int n_decimals, int exponent) { /* TRANSLATORS: This is a format string which, when presented to printf like functions, will create a pango markup string to display real number in scientific notation. In its untranslated form, it will display similar to "1.23 x 10^4". You can leave it untranslated if this is how scientific notation is usually presented in your language. Some locales (such as German) prefer the centered dot rather than the multiplication sign between the mantissa an exponent. In which case, you can change "#215;" to "#8901;" or other unicode code point as appropriate. The . in this string does not and should not be changed, since that is taken care of by the stdc library. For information on Pango markup, see http://developer.gnome.org/pango/stable/PangoMarkupFormat.html For tables of unicode code points, see http://unicode.org/charts */ return xasprintf(_("%%.%dlf×10%d"), n_decimals, exponent); } /* * Compute the optimum format string and the scaling * for the tick drawing on a chart axis * Input: lower: the lowest tick * interval:the interval between the ticks * nticks: the number of tick intervals (bins) on the axis * Return: fs: format string for printf to print the tick value * scale: scaling factor for the tick value * The format string has to be freed after usage. * An example format string and scalefactor: * Non Scientific: "%.3lf", scale=1.00 * Scientific: "%.2lfe3", scale = 0.001 * Usage example: * fs = chart_get_ticks_format(-0.7,0.1,8,&scale); * printf(fs,value*scale); * free(fs); */ char * chart_get_ticks_format (const double lower, const double interval, const unsigned int nticks, double *scale) { double logmax = log10(fmax(fabs(lower + (nticks+1)*interval),fabs(lower))); double logintv = log10(interval); int logshift = 0; char *format_string = NULL; int nrdecs = 0; if (logmax > 0.0 && logintv < 0.0) { nrdecs = MIN(6,(int)(ceil(fabs(logintv)))); logshift = 0; if (logmax < 12.0) format_string = xasprintf("%%.%dlf",nrdecs); else format_string = xasprintf("%%lg"); } else if (logmax > 0.0) /*logintv is > 0*/ { if (logintv < 5.0 && logmax < 10.0) { logshift = 0; /* No scientific format */ nrdecs = 0; format_string = xstrdup("%.0lf"); } else { logshift = (int)logmax; /* Possible intervals are 0.2Ex, 0.5Ex, 1.0Ex */ /* log10(0.2E9) = 8.30, log10(0.5E9) = 8.69, log10(1.0E9) = 9 */ /* 0.2 and 0.5 need one decimal more. For stability subtract 0.1 */ nrdecs = MIN(8,(int)(ceil(logshift-logintv-0.1))); format_string = gen_pango_markup_scientific_format_string (nrdecs, logshift); } } else /* logmax and logintv are < 0 */ { if (logmax > -3.0) { logshift = 0; /* No scientific format */ nrdecs = MIN(8,(int)(ceil(-logintv))); format_string = xasprintf("%%.%dlf",nrdecs); } else { logshift = (int)logmax-1; nrdecs = MIN(8,(int)(ceil(logshift-logintv-0.1))); format_string = gen_pango_markup_scientific_format_string (nrdecs, logshift); } } *scale = pow(10.0,-(double)logshift); return format_string; } pspp-1.0.1/src/math/levene.h0000644000175000017500000000235212470243701012565 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !levene_h #define levene_h 1 struct nl; union value; struct levene *levene_create (int indep_width, const union value *cutpoint); void levene_pass_one (struct levene *, double value, double weight, const union value *gv); void levene_pass_two (struct levene *, double value, double weight, const union value *gv); void levene_pass_three (struct levene *, double value, double weight, const union value *gv); double levene_calculate (struct levene*); void levene_destroy (struct levene*); #endif pspp-1.0.1/src/libpspp/0000755000175000017500000000000013150620333011730 500000000000000pspp-1.0.1/src/libpspp/range-tower.h0000644000175000017500000002332612470243700014264 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Bitmap, implemented as an augmented binary tree. Beyond the usual features of a bitmap, a range tower can efficiently implement a "splice" operation that shifts ranges of bits left or right. This feature does cost memory and time, so use a range tower only if this feature is actually needed. Otherwise, use a range set (see range-set.h), which can do everything that a range tower can do except the "splice" operation. Each operation has O(lg N) cost, where N is the number of contiguous regions of 1-bits in the bitmap. Also, a cache reduces the second and subsequent containment tests within a single contiguous region to O(1). */ #ifndef LIBPSPP_RANGE_TOWER_H #define LIBPSPP_RANGE_TOWER_H #include #include #include "libpspp/abt.h" #include "libpspp/cast.h" /* A tower of ranges. */ struct range_tower { struct pool *pool; /* Pool for freeing range_tower. */ struct abt abt; /* Tree of range_tower_nodes. */ /* Cache. */ unsigned long int cache_start; /* Start of region. */ unsigned long int cache_end; /* One past end of region. */ bool cache_value; /* Is the region in the tower? */ }; /* A node in the range tower. */ struct range_tower_node { struct abt_node abt_node; /* Augmented binary tree node. */ unsigned long int n_zeros; /* Number of leading zeros. */ unsigned long int n_ones; /* Number of ones following the zeros. */ unsigned long int subtree_width; /* n_zeros + n_ones + sum of descendants. */ }; struct range_tower *range_tower_create (void); struct range_tower *range_tower_create_pool (struct pool *); struct range_tower *range_tower_clone (const struct range_tower *, struct pool *); void range_tower_destroy (struct range_tower *); void range_tower_splice (struct range_tower *, unsigned long int start, unsigned long int old_width, unsigned long int new_width); void range_tower_set1 (struct range_tower *, unsigned long int start, unsigned long int width); void range_tower_set0 (struct range_tower *, unsigned long int start, unsigned long int width); void range_tower_insert1 (struct range_tower *, unsigned long int start, unsigned long int width); void range_tower_insert0 (struct range_tower *, unsigned long int start, unsigned long int width); void range_tower_delete (struct range_tower *, unsigned long int start, unsigned long int width); void range_tower_move (struct range_tower *, unsigned long int old_start, unsigned long int new_start, unsigned long int width); bool range_tower_contains (const struct range_tower *, unsigned long int position); unsigned long int range_tower_scan (const struct range_tower *, unsigned long int start); static inline bool range_tower_is_empty (const struct range_tower *); #define RANGE_TOWER_FOR_EACH(NODE, START, RANGE_TOWER) \ for ((NODE) = range_tower_first (RANGE_TOWER), (START) = 0; \ (NODE) && ((START) += (NODE)->n_zeros, true); \ (START) += (NODE)->n_ones, \ (NODE) = range_tower_next (RANGE_TOWER, NODE)) static inline const struct range_tower_node *range_tower_first ( const struct range_tower *); static inline const struct range_tower_node *range_tower_next ( const struct range_tower *, const struct range_tower_node *); static inline const struct range_tower_node *range_tower_last ( const struct range_tower *); static inline const struct range_tower_node *range_tower_prev ( const struct range_tower *, const struct range_tower_node *); unsigned long int range_tower_node_get_start (const struct range_tower_node *); unsigned long int range_tower_node_get_end (const struct range_tower_node *); static inline unsigned long int range_tower_node_get_width ( const struct range_tower_node *); /* Inline functions. */ static inline struct range_tower_node *range_tower_node_from_abt__ ( const struct abt_node *); static inline struct range_tower_node *range_tower_next__ ( const struct range_tower *, const struct range_tower_node *); static inline struct range_tower_node *range_tower_first__ ( const struct range_tower *); static inline struct range_tower_node *range_tower_prev__ ( const struct range_tower *, const struct range_tower_node *); static inline struct range_tower_node *range_tower_last__ ( const struct range_tower *); /* Returns true if RS contains no 1-bits, false otherwise. */ static inline bool range_tower_is_empty (const struct range_tower *rs) { const struct range_tower_node *node = abt_data (rs->abt.root, struct range_tower_node, abt_node); return node->n_zeros == ULONG_MAX; } /* Returns the node representing the first contiguous region of 1-bits in RS, or a null pointer if RS is empty. Any call to range_tower_set1, range_tower_set0, or range_tower_allocate invalidates the returned node. */ static inline const struct range_tower_node * range_tower_first (const struct range_tower *rs) { const struct range_tower_node *node = range_tower_first__ (rs); return node->n_ones ? node : NULL; } /* If NODE is nonnull, returns the node representing the next contiguous region of 1-bits in RS following NODE, or a null pointer if NODE is the last region in RS. If NODE is null, returns the first region in RS, as for range_tower_first. Any call to range_tower_set1, range_tower_set0, or range_tower_allocate invalidates the returned node. */ static inline const struct range_tower_node * range_tower_next (const struct range_tower *rs, const struct range_tower_node *node) { if (node != NULL) { const struct range_tower_node *next = range_tower_next__ (rs, node); return next != NULL && next->n_ones ? next : NULL; } else return range_tower_first (rs); } /* Returns the node representing the last contiguous region of 1-bits in RS, or a null pointer if RS is empty. Any call to range_tower_set1, range_tower_set0, or range_tower_allocate invalidates the returned node. */ static inline const struct range_tower_node * range_tower_last (const struct range_tower *rs) { const struct range_tower_node *node = range_tower_last__ (rs); return node->n_ones ? node : range_tower_prev__(rs, node); } /* If NODE is nonnull, returns the node representing the previous contiguous region of 1-bits in RS following NODE, or a null pointer if NODE is the first region in RS. If NODE is null, returns the last region in RS, as for range_tower_last. Any call to range_tower_set1, range_tower_set0, or range_tower_allocate invalidates the returned node. */ static inline const struct range_tower_node * range_tower_prev (const struct range_tower *rs, const struct range_tower_node *node) { return node != NULL ? range_tower_prev__ (rs, node) : range_tower_last (rs); } /* Returns the number of contiguous 1-bits in NODE. */ static inline unsigned long int range_tower_node_get_width (const struct range_tower_node *node) { return node->n_ones; } /* Internal helper functions. */ /* Returns the range_tower_node corresponding to the given ABT_NODE. Returns a null pointer if ABT_NODE is null. */ static inline struct range_tower_node * range_tower_node_from_abt__ (const struct abt_node *abt_node) { return (abt_node ? abt_data (abt_node, struct range_tower_node, abt_node) : NULL); } /* Returns the next range_tower_node in RS after NODE, or a null pointer if NODE is the last node in RS. */ static inline struct range_tower_node * range_tower_next__ (const struct range_tower *rs, const struct range_tower_node *node) { return range_tower_node_from_abt__ (abt_next (&rs->abt, &node->abt_node)); } /* Returns the first range_tower_node in RS, or a null pointer if RS is empty. */ static inline struct range_tower_node * range_tower_first__ (const struct range_tower *rs) { return range_tower_node_from_abt__ (abt_first (&rs->abt)); } /* Returns the previous range_tower_node in RS after NODE, or a null pointer if NODE is the first node in RS. */ static inline struct range_tower_node * range_tower_prev__ (const struct range_tower *rs, const struct range_tower_node *node) { return range_tower_node_from_abt__ (abt_prev (&rs->abt, &node->abt_node)); } /* Returns the last range_tower_node in RS, or a null pointer if RS is empty. */ static inline struct range_tower_node * range_tower_last__ (const struct range_tower *rs) { return range_tower_node_from_abt__ (abt_last (&rs->abt)); } struct range_tower_node *range_tower_lookup ( const struct range_tower *, unsigned long int position, unsigned long int *node_start); #endif /* libpspp/range-tower.h */ pspp-1.0.1/src/libpspp/str.c0000644000175000017500000012221413143642441012634 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "str.h" #include #include #include #include #include #include "libpspp/cast.h" #include "libpspp/message.h" #include "libpspp/pool.h" #include "gl/c-ctype.h" #include "gl/c-vasnprintf.h" #include "gl/relocatable.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gl/xmemdup0.h" #include "gl/xsize.h" /* Reverses the order of NBYTES bytes at address P, thus converting between little- and big-endian byte orders. */ void buf_reverse (char *p, size_t nbytes) { char *h = p, *t = &h[nbytes - 1]; char temp; nbytes /= 2; while (nbytes--) { temp = *h; *h++ = *t; *t-- = temp; } } /* Compares the SIZE bytes in A to those in B, disregarding case, and returns a strcmp()-type result. */ int buf_compare_case (const char *a_, const char *b_, size_t size) { const unsigned char *a = (unsigned char *) a_; const unsigned char *b = (unsigned char *) b_; while (size-- > 0) { unsigned char ac = toupper (*a++); unsigned char bc = toupper (*b++); if (ac != bc) return ac > bc ? 1 : -1; } return 0; } /* Compares A of length A_LEN to B of length B_LEN. The shorter string is considered to be padded with spaces to the length of the longer. */ int buf_compare_rpad (const char *a, size_t a_len, const char *b, size_t b_len) { size_t min_len; int result; min_len = a_len < b_len ? a_len : b_len; result = memcmp (a, b, min_len); if (result != 0) return result; else { size_t idx; if (a_len < b_len) { for (idx = min_len; idx < b_len; idx++) if (' ' != b[idx]) return ' ' > b[idx] ? 1 : -1; } else { for (idx = min_len; idx < a_len; idx++) if (a[idx] != ' ') return a[idx] > ' ' ? 1 : -1; } return 0; } } /* Compares strin A to string B. The shorter string is considered to be padded with spaces to the length of the longer. */ int str_compare_rpad (const char *a, const char *b) { return buf_compare_rpad (a, strlen (a), b, strlen (b)); } /* Copies string SRC to buffer DST, of size DST_SIZE bytes. DST is truncated to DST_SIZE bytes or padded on the right with copies of PAD as needed. */ void buf_copy_str_rpad (char *dst, size_t dst_size, const char *src, char pad) { size_t src_len = strlen (src); if (src_len >= dst_size) memcpy (dst, src, dst_size); else { memcpy (dst, src, src_len); memset (&dst[src_len], pad, dst_size - src_len); } } /* Copies string SRC to buffer DST, of size DST_SIZE bytes. DST is truncated to DST_SIZE bytes or padded on the left with copies of PAD as needed. */ void buf_copy_str_lpad (char *dst, size_t dst_size, const char *src, char pad) { size_t src_len = strlen (src); if (src_len >= dst_size) memcpy (dst, src, dst_size); else { size_t pad_cnt = dst_size - src_len; memset (&dst[0], pad, pad_cnt); memcpy (dst + pad_cnt, src, src_len); } } /* Copies buffer SRC, of SRC_SIZE bytes, to DST, of DST_SIZE bytes. DST is truncated to DST_SIZE bytes or padded on the left with copies of PAD as needed. */ void buf_copy_lpad (char *dst, size_t dst_size, const char *src, size_t src_size, char pad) { if (src_size >= dst_size) memmove (dst, src, dst_size); else { memset (dst, pad, dst_size - src_size); memmove (&dst[dst_size - src_size], src, src_size); } } /* Copies buffer SRC, of SRC_SIZE bytes, to DST, of DST_SIZE bytes. DST is truncated to DST_SIZE bytes or padded on the right with copies of PAD as needed. */ void buf_copy_rpad (char *dst, size_t dst_size, const char *src, size_t src_size, char pad) { if (src_size >= dst_size) memmove (dst, src, dst_size); else { memmove (dst, src, src_size); memset (&dst[src_size], pad, dst_size - src_size); } } /* Copies string SRC to string DST, which is in a buffer DST_SIZE bytes long. Truncates DST to DST_SIZE - 1 bytes or right-pads with spaces to DST_SIZE - 1 bytes if necessary. */ void str_copy_rpad (char *dst, size_t dst_size, const char *src) { if (dst_size > 0) { size_t src_len = strlen (src); if (src_len < dst_size - 1) { memcpy (dst, src, src_len); memset (&dst[src_len], ' ', dst_size - 1 - src_len); } else memcpy (dst, src, dst_size - 1); dst[dst_size - 1] = 0; } } /* Copies SRC to DST, which is in a buffer DST_SIZE bytes long. Truncates DST to DST_SIZE - 1 bytes, if necessary. */ void str_copy_trunc (char *dst, size_t dst_size, const char *src) { size_t src_len = strlen (src); assert (dst_size > 0); if (src_len + 1 < dst_size) memcpy (dst, src, src_len + 1); else { memcpy (dst, src, dst_size - 1); dst[dst_size - 1] = '\0'; } } /* Copies buffer SRC, of SRC_LEN bytes, to DST, which is in a buffer DST_SIZE bytes long. Truncates DST to DST_SIZE - 1 bytes, if necessary. */ void str_copy_buf_trunc (char *dst, size_t dst_size, const char *src, size_t src_size) { size_t dst_len; assert (dst_size > 0); dst_len = src_size < dst_size ? src_size : dst_size - 1; memcpy (dst, src, dst_len); dst[dst_len] = '\0'; } /* Converts each byte in S to uppercase. This is suitable only for ASCII strings. Use utf8_to_upper() for UTF-8 strings.*/ void str_uppercase (char *s) { for (; *s != '\0'; s++) *s = c_toupper ((unsigned char) *s); } /* Converts each byte in S to lowercase. This is suitable only for ASCII strings. Use utf8_to_lower() for UTF-8 strings.*/ void str_lowercase (char *s) { for (; *s != '\0'; s++) *s = c_tolower ((unsigned char) *s); } /* Converts NUMBER into a string in 26-adic notation in BUFFER, which has room for SIZE bytes. Uses uppercase if UPPERCASE is true, otherwise lowercase, Returns true if successful, false if NUMBER, plus a trailing null, is too large to fit in the available space. 26-adic notation is "spreadsheet column numbering": 1 = A, 2 = B, 3 = C, ... 26 = Z, 27 = AA, 28 = AB, 29 = AC, ... 26-adic notation is the special case of a k-adic numeration system (aka bijective base-k numeration) with k=26. In k-adic numeration, the digits are {1, 2, 3, ..., k} (there is no digit 0), and integer 0 is represented by the empty string. For more information, see http://en.wikipedia.org/wiki/Bijective_numeration. */ bool str_format_26adic (unsigned long int number, bool uppercase, char buffer[], size_t size) { const char *alphabet = uppercase ? "ABCDEFGHIJKLMNOPQRSTUVWXYZ" : "abcdefghijklmnopqrstuvwxyz"; size_t length = 0; while (number-- > 0) { if (length >= size) goto overflow; buffer[length++] = alphabet[number % 26]; number /= 26; } if (length >= size) goto overflow; buffer[length] = '\0'; buf_reverse (buffer, length); return true; overflow: if (length > 0) buffer[0] = '\0'; return false; } /* Sets the SIZE bytes starting at BLOCK to C, and returns the byte following BLOCK. */ void * mempset (void *block, int c, size_t size) { memset (block, c, size); return (char *) block + size; } /* Substrings. */ /* Returns a substring whose contents are the CNT bytes starting at the (0-based) position START in SS. */ struct substring ss_substr (struct substring ss, size_t start, size_t cnt) { if (start < ss.length) return ss_buffer (ss.string + start, MIN (cnt, ss.length - start)); else return ss_buffer (ss.string + ss.length, 0); } /* Returns a substring whose contents are the first CNT bytes in SS. */ struct substring ss_head (struct substring ss, size_t cnt) { return ss_buffer (ss.string, MIN (cnt, ss.length)); } /* Returns a substring whose contents are the last CNT bytes in SS. */ struct substring ss_tail (struct substring ss, size_t cnt) { if (cnt < ss.length) return ss_buffer (ss.string + (ss.length - cnt), cnt); else return ss; } /* Makes a malloc()'d, null-terminated copy of the contents of OLD and stores it in NEW. */ void ss_alloc_substring (struct substring *new, struct substring old) { new->string = xmemdup0 (old.string, old.length); new->length = old.length; } /* Allocates room for a CNT-byte string in NEW. */ void ss_alloc_uninit (struct substring *new, size_t cnt) { new->string = xmalloc (cnt); new->length = cnt; } void ss_realloc (struct substring *ss, size_t size) { ss->string = xrealloc (ss->string, size); } /* Makes a pool_alloc_unaligned()'d, null-terminated copy of the contents of OLD in POOL, and stores it in NEW. */ void ss_alloc_substring_pool (struct substring *new, struct substring old, struct pool *pool) { new->string = pool_alloc_unaligned (pool, old.length + 1); new->length = old.length; memcpy (new->string, old.string, old.length); new->string[old.length] = '\0'; } /* Allocates room for a CNT-byte string in NEW in POOL. */ void ss_alloc_uninit_pool (struct substring *new, size_t cnt, struct pool *pool) { new->string = pool_alloc_unaligned (pool, cnt); new->length = cnt; } /* Frees the string that SS points to. */ void ss_dealloc (struct substring *ss) { free (ss->string); } /* Truncates SS to at most CNT bytes in length. */ void ss_truncate (struct substring *ss, size_t cnt) { if (ss->length > cnt) ss->length = cnt; } /* Removes trailing bytes in TRIM_SET from SS. Returns number of bytes removed. */ size_t ss_rtrim (struct substring *ss, struct substring trim_set) { size_t cnt = 0; while (cnt < ss->length && ss_find_byte (trim_set, ss->string[ss->length - cnt - 1]) != SIZE_MAX) cnt++; ss->length -= cnt; return cnt; } /* Removes leading bytes in TRIM_SET from SS. Returns number of bytes removed. */ size_t ss_ltrim (struct substring *ss, struct substring trim_set) { size_t cnt = ss_span (*ss, trim_set); ss_advance (ss, cnt); return cnt; } /* Trims leading and trailing bytes in TRIM_SET from SS. */ void ss_trim (struct substring *ss, struct substring trim_set) { ss_ltrim (ss, trim_set); ss_rtrim (ss, trim_set); } /* If the last byte in SS is C, removes it and returns true. Otherwise, returns false without changing the string. */ bool ss_chomp_byte (struct substring *ss, char c) { if (ss_last (*ss) == c) { ss->length--; return true; } else return false; } /* If SS ends with SUFFIX, removes it and returns true. Otherwise, returns false without changing the string. */ bool ss_chomp (struct substring *ss, struct substring suffix) { if (ss_ends_with (*ss, suffix)) { ss->length -= suffix.length; return true; } else return false; } /* Divides SS into tokens separated by any of the DELIMITERS. Each call replaces TOKEN by the next token in SS, or by an empty string if no tokens remain. Returns true if a token was obtained, false otherwise. Before the first call, initialize *SAVE_IDX to 0. Do not modify *SAVE_IDX between calls. SS divides into exactly one more tokens than it contains delimiters. That is, a delimiter at the start or end of SS or a pair of adjacent delimiters yields an empty token, and the empty string contains a single token. */ bool ss_separate (struct substring ss, struct substring delimiters, size_t *save_idx, struct substring *token) { if (*save_idx <= ss_length (ss)) { struct substring tmp = ss_substr (ss, *save_idx, SIZE_MAX); size_t length = ss_cspan (tmp, delimiters); *token = ss_head (tmp, length); *save_idx += length + 1; return true; } else { *token = ss_empty (); return false; } } /* Divides SS into tokens separated by any of the DELIMITERS, merging adjacent delimiters so that the empty string is never produced as a token. Each call replaces TOKEN by the next token in SS, or by an empty string if no tokens remain, and then skips past the first delimiter following the token. Returns true if a token was obtained, false otherwise. Before the first call, initialize *SAVE_IDX to 0. Do not modify *SAVE_IDX between calls. */ bool ss_tokenize (struct substring ss, struct substring delimiters, size_t *save_idx, struct substring *token) { bool found_token; ss_advance (&ss, *save_idx); *save_idx += ss_ltrim (&ss, delimiters); ss_get_bytes (&ss, ss_cspan (ss, delimiters), token); found_token = ss_length (*token) > 0; *save_idx += ss_length (*token) + found_token; return found_token; } /* Removes the first CNT bytes from SS. */ void ss_advance (struct substring *ss, size_t cnt) { if (cnt > ss->length) cnt = ss->length; ss->string += cnt; ss->length -= cnt; } /* If the first byte in SS is C, removes it and returns true. Otherwise, returns false without changing the string. */ bool ss_match_byte (struct substring *ss, char c) { if (ss_first (*ss) == c) { ss->string++; ss->length--; return true; } else return false; } /* If the first byte in SS is in MATCH, removes it and returns the byte that was removed. Otherwise, returns EOF without changing the string. */ int ss_match_byte_in (struct substring *ss, struct substring match) { int c = EOF; if (ss->length > 0 && memchr (match.string, ss->string[0], match.length) != NULL) { c = ss->string[0]; ss->string++; ss->length--; } return c; } /* If SS begins with TARGET, removes it and returns true. Otherwise, returns false without changing SS. */ bool ss_match_string (struct substring *ss, const struct substring target) { size_t length = ss_length (target); if (ss_equals (ss_head (*ss, length), target)) { ss_advance (ss, length); return true; } else return false; } /* Removes the first byte from SS and returns it. If SS is empty, returns EOF without modifying SS. */ int ss_get_byte (struct substring *ss) { int c = ss_first (*ss); if (c != EOF) { ss->string++; ss->length--; } return c; } /* Stores the prefix of SS up to the first DELIMITER in OUT (if any). Trims those same bytes from SS. DELIMITER is removed from SS but not made part of OUT. Returns true if DELIMITER was found (and removed), false otherwise. */ bool ss_get_until (struct substring *ss, char delimiter, struct substring *out) { ss_get_bytes (ss, ss_cspan (*ss, ss_buffer (&delimiter, 1)), out); return ss_match_byte (ss, delimiter); } /* Stores the first CNT bytes in SS in OUT (or fewer, if SS is shorter than CNT bytes). Trims the same bytes from the beginning of SS. Returns CNT. */ size_t ss_get_bytes (struct substring *ss, size_t cnt, struct substring *out) { *out = ss_head (*ss, cnt); ss_advance (ss, cnt); return cnt; } /* Parses and removes an optionally signed decimal integer from the beginning of SS. Returns 0 if an error occurred, otherwise the number of bytes removed from SS. Stores the integer's value into *VALUE. */ size_t ss_get_long (struct substring *ss, long *value) { char tmp[64]; size_t length; length = ss_span (*ss, ss_cstr ("+-")); length += ss_span (ss_substr (*ss, length, SIZE_MAX), ss_cstr (CC_DIGITS)); if (length > 0 && length < sizeof tmp) { char *tail; memcpy (tmp, ss_data (*ss), length); tmp[length] = '\0'; *value = strtol (tmp, &tail, 10); if (tail - tmp == length) { ss_advance (ss, length); return length; } } *value = 0; return 0; } /* Returns true if SS is empty (has length 0 bytes), false otherwise. */ bool ss_is_empty (struct substring ss) { return ss.length == 0; } /* Returns the number of bytes in SS. */ size_t ss_length (struct substring ss) { return ss.length; } /* Returns a pointer to the bytes in SS. */ char * ss_data (struct substring ss) { return ss.string; } /* Returns a pointer just past the last byte in SS. */ char * ss_end (struct substring ss) { return ss.string + ss.length; } /* Returns the byte in position IDX in SS, as a value in the range of unsigned char. Returns EOF if IDX is out of the range of indexes for SS. */ int ss_at (struct substring ss, size_t idx) { return idx < ss.length ? (unsigned char) ss.string[idx] : EOF; } /* Returns the first byte in SS as a value in the range of unsigned char. Returns EOF if SS is the empty string. */ int ss_first (struct substring ss) { return ss_at (ss, 0); } /* Returns the last byte in SS as a value in the range of unsigned char. Returns EOF if SS is the empty string. */ int ss_last (struct substring ss) { return ss.length > 0 ? (unsigned char) ss.string[ss.length - 1] : EOF; } /* Returns true if SS ends with SUFFIX, false otherwise. */ bool ss_ends_with (struct substring ss, struct substring suffix) { return (ss.length >= suffix.length && !memcmp (&ss.string[ss.length - suffix.length], suffix.string, suffix.length)); } /* Returns the number of contiguous bytes at the beginning of SS that are in SKIP_SET. */ size_t ss_span (struct substring ss, struct substring skip_set) { size_t i; for (i = 0; i < ss.length; i++) if (ss_find_byte (skip_set, ss.string[i]) == SIZE_MAX) break; return i; } /* Returns the number of contiguous bytes at the beginning of SS that are not in SKIP_SET. */ size_t ss_cspan (struct substring ss, struct substring stop_set) { size_t i; for (i = 0; i < ss.length; i++) if (ss_find_byte (stop_set, ss.string[i]) != SIZE_MAX) break; return i; } /* Returns the offset in SS of the first instance of C, or SIZE_MAX if C does not occur in SS. */ size_t ss_find_byte (struct substring ss, char c) { const char *p = memchr (ss.string, c, ss.length); return p != NULL ? p - ss.string : SIZE_MAX; } /* Compares A and B and returns a strcmp()-type comparison result. */ int ss_compare (struct substring a, struct substring b) { int retval = memcmp (a.string, b.string, MIN (a.length, b.length)); if (retval == 0) retval = a.length < b.length ? -1 : a.length > b.length; return retval; } /* Compares A and B case-insensitively and returns a strcmp()-type comparison result. */ int ss_compare_case (struct substring a, struct substring b) { int retval = memcasecmp (a.string, b.string, MIN (a.length, b.length)); if (retval == 0) retval = a.length < b.length ? -1 : a.length > b.length; return retval; } /* Compares A and B and returns true if their contents are identical, false otherwise. */ int ss_equals (struct substring a, struct substring b) { return a.length == b.length && !memcmp (a.string, b.string, a.length); } /* Compares A and B and returns true if their contents are identical except possibly for case differences, false otherwise. */ int ss_equals_case (struct substring a, struct substring b) { return a.length == b.length && !memcasecmp (a.string, b.string, a.length); } /* Returns the position in SS that the byte at P occupies. P must point within SS or one past its end. */ size_t ss_pointer_to_position (struct substring ss, const char *p) { size_t pos = p - ss.string; assert (pos <= ss.length); return pos; } /* Allocates and returns a null-terminated string that contains SS. */ char * ss_xstrdup (struct substring ss) { char *s = xmalloc (ss.length + 1); memcpy (s, ss.string, ss.length); s[ss.length] = '\0'; return s; } /* UTF-8. */ /* Returns the character represented by the UTF-8 sequence at the start of S. The return value is either a Unicode code point in the range 0 to 0x10ffff, or UINT32_MAX if S is empty. */ ucs4_t ss_first_mb (struct substring s) { return ss_at_mb (s, 0); } /* Returns the number of bytes in the UTF-8 character at the beginning of S. The return value is 0 if S is empty, otherwise between 1 and 4. */ int ss_first_mblen (struct substring s) { return ss_at_mblen (s, 0); } /* Advances S past the UTF-8 character at its beginning. Returns the Unicode code point that was skipped (in the range 0 to 0x10ffff), or UINT32_MAX if S was not modified because it was initially empty. */ ucs4_t ss_get_mb (struct substring *s) { if (s->length > 0) { ucs4_t uc; int n; n = u8_mbtouc (&uc, CHAR_CAST (const uint8_t *, s->string), s->length); s->string += n; s->length -= n; return uc; } else return UINT32_MAX; } /* Returns the character represented by the UTF-8 sequence starting OFS bytes into S. The return value is either a Unicode code point in the range 0 to 0x10ffff, or UINT32_MAX if OFS is past the last byte in S. (Returns 0xfffd if OFS points into the middle, not the beginning, of a UTF-8 sequence.) */ ucs4_t ss_at_mb (struct substring s, size_t ofs) { if (s.length > ofs) { ucs4_t uc; u8_mbtouc (&uc, CHAR_CAST (const uint8_t *, s.string + ofs), s.length - ofs); return uc; } else return UINT32_MAX; } /* Returns the number of bytes represented by the UTF-8 sequence starting OFS bytes into S. The return value is 0 if OFS is past the last byte in S, otherwise between 1 and 4. */ int ss_at_mblen (struct substring s, size_t ofs) { if (s.length > ofs) { ucs4_t uc; return u8_mbtouc (&uc, CHAR_CAST (const uint8_t *, s.string + ofs), s.length - ofs); } else return 0; } /* Initializes ST as an empty string. */ void ds_init_empty (struct string *st) { st->ss = ss_empty (); st->capacity = 0; } /* Initializes ST with initial contents S. */ void ds_init_string (struct string *st, const struct string *s) { ds_init_substring (st, ds_ss (s)); } /* Initializes ST with initial contents SS. */ void ds_init_substring (struct string *st, struct substring ss) { st->capacity = MAX (8, ss.length * 2); st->ss.string = xmalloc (st->capacity + 1); memcpy (st->ss.string, ss.string, ss.length); st->ss.length = ss.length; } /* Initializes ST with initial contents S. */ void ds_init_cstr (struct string *st, const char *s) { ds_init_substring (st, ss_cstr (s)); } /* Frees ST. */ void ds_destroy (struct string *st) { if (st != NULL) { ss_dealloc (&st->ss); st->ss.string = NULL; st->ss.length = 0; st->capacity = 0; } } /* Swaps the contents of strings A and B. */ void ds_swap (struct string *a, struct string *b) { struct string tmp = *a; *a = *b; *b = tmp; } /* Helper function for ds_register_pool. */ static void free_string (void *st_) { struct string *st = st_; ds_destroy (st); } /* Arranges for ST to be destroyed automatically as part of POOL. */ void ds_register_pool (struct string *st, struct pool *pool) { pool_register (pool, free_string, st); } /* Cancels the arrangement for ST to be destroyed automatically as part of POOL. */ void ds_unregister_pool (struct string *st, struct pool *pool) { pool_unregister (pool, st); } /* Copies SRC into DST. DST and SRC may be the same string. */ void ds_assign_string (struct string *dst, const struct string *src) { ds_assign_substring (dst, ds_ss (src)); } /* Replaces DST by SS. SS may be a substring of DST. */ void ds_assign_substring (struct string *dst, struct substring ss) { dst->ss.length = ss.length; ds_extend (dst, ss.length); memmove (dst->ss.string, ss.string, ss.length); } /* Replaces DST by null-terminated string SRC. SRC may overlap with DST. */ void ds_assign_cstr (struct string *dst, const char *src) { ds_assign_substring (dst, ss_cstr (src)); } /* Truncates ST to zero length. */ void ds_clear (struct string *st) { st->ss.length = 0; } /* Returns a substring that contains ST. */ struct substring ds_ss (const struct string *st) { return st->ss; } /* Returns a substring that contains CNT bytes from ST starting at position START. If START is greater than or equal to the length of ST, then the substring will be the empty string. If START + CNT exceeds the length of ST, then the substring will only be ds_length(ST) - START bytes long. */ struct substring ds_substr (const struct string *st, size_t start, size_t cnt) { return ss_substr (ds_ss (st), start, cnt); } /* Returns a substring that contains the first CNT bytes in ST. If CNT exceeds the length of ST, then the substring will contain all of ST. */ struct substring ds_head (const struct string *st, size_t cnt) { return ss_head (ds_ss (st), cnt); } /* Returns a substring that contains the last CNT bytes in ST. If CNT exceeds the length of ST, then the substring will contain all of ST. */ struct substring ds_tail (const struct string *st, size_t cnt) { return ss_tail (ds_ss (st), cnt); } /* Ensures that ST can hold at least MIN_CAPACITY bytes plus a null terminator. */ void ds_extend (struct string *st, size_t min_capacity) { if (min_capacity > st->capacity) { st->capacity *= 2; if (st->capacity < min_capacity) st->capacity = 2 * min_capacity; st->ss.string = xrealloc (st->ss.string, st->capacity + 1); } } /* Shrink ST to the minimum capacity need to contain its content. */ void ds_shrink (struct string *st) { if (st->capacity != st->ss.length) { st->capacity = st->ss.length; st->ss.string = xrealloc (st->ss.string, st->capacity + 1); } } /* Truncates ST to at most LENGTH bytes long. */ void ds_truncate (struct string *st, size_t length) { ss_truncate (&st->ss, length); } /* Removes trailing bytes in TRIM_SET from ST. Returns number of bytes removed. */ size_t ds_rtrim (struct string *st, struct substring trim_set) { return ss_rtrim (&st->ss, trim_set); } /* Removes leading bytes in TRIM_SET from ST. Returns number of bytes removed. */ size_t ds_ltrim (struct string *st, struct substring trim_set) { size_t cnt = ds_span (st, trim_set); if (cnt > 0) ds_assign_substring (st, ds_substr (st, cnt, SIZE_MAX)); return cnt; } /* Trims leading and trailing bytes in TRIM_SET from ST. Returns number of bytes removed. */ size_t ds_trim (struct string *st, struct substring trim_set) { size_t cnt = ds_rtrim (st, trim_set); return cnt + ds_ltrim (st, trim_set); } /* If the last byte in ST is C, removes it and returns true. Otherwise, returns false without modifying ST. */ bool ds_chomp_byte (struct string *st, char c) { return ss_chomp_byte (&st->ss, c); } /* If ST ends with SUFFIX, removes it and returns true. Otherwise, returns false without modifying ST. */ bool ds_chomp (struct string *st, struct substring suffix) { return ss_chomp (&st->ss, suffix); } /* Divides ST into tokens separated by any of the DELIMITERS. Each call replaces TOKEN by the next token in ST, or by an empty string if no tokens remain. Returns true if a token was obtained, false otherwise. Before the first call, initialize *SAVE_IDX to 0. Do not modify *SAVE_IDX between calls. ST divides into exactly one more tokens than it contains delimiters. That is, a delimiter at the start or end of ST or a pair of adjacent delimiters yields an empty token, and the empty string contains a single token. */ bool ds_separate (const struct string *st, struct substring delimiters, size_t *save_idx, struct substring *token) { return ss_separate (ds_ss (st), delimiters, save_idx, token); } /* Divides ST into tokens separated by any of the DELIMITERS, merging adjacent delimiters so that the empty string is never produced as a token. Each call replaces TOKEN by the next token in ST, or by an empty string if no tokens remain. Returns true if a token was obtained, false otherwise. Before the first call, initialize *SAVE_IDX to 0. Do not modify *SAVE_IDX between calls. */ bool ds_tokenize (const struct string *st, struct substring delimiters, size_t *save_idx, struct substring *token) { return ss_tokenize (ds_ss (st), delimiters, save_idx, token); } /* Pad ST on the right with copies of PAD until ST is at least LENGTH bytes in size. If ST is initially LENGTH bytes or longer, this is a no-op. */ void ds_rpad (struct string *st, size_t length, char pad) { if (length > st->ss.length) ds_put_byte_multiple (st, pad, length - st->ss.length); } /* Sets the length of ST to exactly NEW_LENGTH, either by truncating bytes from the end, or by padding on the right with PAD. */ void ds_set_length (struct string *st, size_t new_length, char pad) { if (st->ss.length < new_length) ds_rpad (st, new_length, pad); else st->ss.length = new_length; } /* Removes N bytes from ST starting at offset START. */ void ds_remove (struct string *st, size_t start, size_t n) { if (n > 0 && start < st->ss.length) { if (st->ss.length - start <= n) { /* All bytes at or beyond START are deleted. */ st->ss.length = start; } else { /* Some bytes remain and must be shifted into position. */ memmove (st->ss.string + st->ss.length, st->ss.string + st->ss.length + n, st->ss.length - start - n); st->ss.length -= n; } } else { /* There are no bytes to delete or no bytes at or beyond START, hence deletion is a no-op. */ } } /* Returns true if ST is empty, false otherwise. */ bool ds_is_empty (const struct string *st) { return ss_is_empty (st->ss); } /* Returns the length of ST. */ size_t ds_length (const struct string *st) { return ss_length (ds_ss (st)); } /* Returns the string data inside ST. */ char * ds_data (const struct string *st) { return ss_data (ds_ss (st)); } /* Returns a pointer to the null terminator ST. This might not be an actual null byte unless ds_c_str() has been called since the last modification to ST. */ char * ds_end (const struct string *st) { return ss_end (ds_ss (st)); } /* Returns the byte in position IDX in ST, as a value in the range of unsigned char. Returns EOF if IDX is out of the range of indexes for ST. */ int ds_at (const struct string *st, size_t idx) { return ss_at (ds_ss (st), idx); } /* Returns the first byte in ST as a value in the range of unsigned char. Returns EOF if ST is the empty string. */ int ds_first (const struct string *st) { return ss_first (ds_ss (st)); } /* Returns the last byte in ST as a value in the range of unsigned char. Returns EOF if ST is the empty string. */ int ds_last (const struct string *st) { return ss_last (ds_ss (st)); } /* Returns true if ST ends with SUFFIX, false otherwise. */ bool ds_ends_with (const struct string *st, struct substring suffix) { return ss_ends_with (st->ss, suffix); } /* Returns the number of consecutive bytes at the beginning of ST that are in SKIP_SET. */ size_t ds_span (const struct string *st, struct substring skip_set) { return ss_span (ds_ss (st), skip_set); } /* Returns the number of consecutive bytes at the beginning of ST that are not in STOP_SET. */ size_t ds_cspan (const struct string *st, struct substring stop_set) { return ss_cspan (ds_ss (st), stop_set); } /* Returns the position of the first occurrence of byte C in ST at or after position OFS, or SIZE_MAX if there is no such occurrence. */ size_t ds_find_byte (const struct string *st, char c) { return ss_find_byte (ds_ss (st), c); } /* Compares A and B and returns a strcmp()-type comparison result. */ int ds_compare (const struct string *a, const struct string *b) { return ss_compare (ds_ss (a), ds_ss (b)); } /* Returns the position in ST that the byte at P occupies. P must point within ST or one past its end. */ size_t ds_pointer_to_position (const struct string *st, const char *p) { return ss_pointer_to_position (ds_ss (st), p); } /* Allocates and returns a null-terminated string that contains ST. */ char * ds_xstrdup (const struct string *st) { return ss_xstrdup (ds_ss (st)); } /* Returns the allocation size of ST. */ size_t ds_capacity (const struct string *st) { return st->capacity; } /* Returns the value of ST as a null-terminated string. */ char * ds_cstr (const struct string *st_) { struct string *st = CONST_CAST (struct string *, st_); if (st->ss.string == NULL) ds_extend (st, 1); st->ss.string[st->ss.length] = '\0'; return st->ss.string; } /* Returns the value of ST as a null-terminated string and then reinitialized ST as an empty string. The caller must free the returned string with free(). */ char * ds_steal_cstr (struct string *st) { char *s = ds_cstr (st); ds_init_empty (st); return s; } /* Reads bytes from STREAM and appends them to ST, stopping after MAX_LENGTH bytes, after appending a newline, or after an I/O error or end of file was encountered, whichever comes first. Returns true if at least one byte was added to ST, false if no bytes were read before an I/O error or end of file (or if MAX_LENGTH was 0). This function treats LF and CR LF sequences as new-line, translating each of them to a single '\n' in ST. */ bool ds_read_line (struct string *st, FILE *stream, size_t max_length) { size_t length; for (length = 0; length < max_length; length++) { int c = getc (stream); switch (c) { case EOF: return length > 0; case '\n': ds_put_byte (st, c); return true; case '\r': c = getc (stream); if (c == '\n') { /* CR followed by LF is special: translate to \n. */ ds_put_byte (st, '\n'); return true; } else { /* CR followed by anything else is just CR. */ ds_put_byte (st, '\r'); if (c == EOF) return true; ungetc (c, stream); } break; default: ds_put_byte (st, c); } } return length > 0; } /* Removes a comment introduced by `#' from ST, ignoring occurrences inside quoted strings. */ static void remove_comment (struct string *st) { char *cp; int quote = 0; for (cp = ds_data (st); cp < ds_end (st); cp++) if (quote) { if (*cp == quote) quote = 0; else if (*cp == '\\') cp++; } else if (*cp == '\'' || *cp == '"') quote = *cp; else if (*cp == '#') { ds_truncate (st, cp - ds_cstr (st)); break; } } /* Reads a line from STREAM into ST, then preprocesses as follows: - Splices lines terminated with `\'. - Deletes comments introduced by `#' outside of single or double quotes. - Deletes trailing white space. Returns true if a line was successfully read, false on failure. If LINE_NUMBER is non-null, then *LINE_NUMBER is incremented by the number of lines read. */ bool ds_read_config_line (struct string *st, int *line_number, FILE *stream) { ds_clear (st); do { if (!ds_read_line (st, stream, SIZE_MAX)) return false; (*line_number)++; ds_rtrim (st, ss_cstr (CC_SPACES)); } while (ds_chomp_byte (st, '\\')); remove_comment (st); return true; } /* Attempts to read SIZE * CNT bytes from STREAM and append them to ST. Returns true if all the requested data was read, false otherwise. */ bool ds_read_stream (struct string *st, size_t size, size_t cnt, FILE *stream) { if (size != 0) { size_t try_bytes = xtimes (cnt, size); if (size_in_bounds_p (xsum (ds_length (st), try_bytes))) { char *buffer = ds_put_uninit (st, try_bytes); size_t got_bytes = fread (buffer, 1, try_bytes, stream); ds_truncate (st, ds_length (st) - (try_bytes - got_bytes)); return got_bytes == try_bytes; } else { errno = ENOMEM; return false; } } else return true; } /* Concatenates S onto ST. */ void ds_put_cstr (struct string *st, const char *s) { if (s != NULL) ds_put_substring (st, ss_cstr (s)); } /* Concatenates SS to ST. */ void ds_put_substring (struct string *st, struct substring ss) { memcpy (ds_put_uninit (st, ss_length (ss)), ss_data (ss), ss_length (ss)); } /* Returns ds_end(ST) and THEN increases the length by INCR. */ char * ds_put_uninit (struct string *st, size_t incr) { char *end; ds_extend (st, ds_length (st) + incr); end = ds_end (st); st->ss.length += incr; return end; } /* Moves the bytes in ST following offset OFS + OLD_LEN in ST to offset OFS + NEW_LEN and returns the byte at offset OFS. The first min(OLD_LEN, NEW_LEN) bytes at the returned position are unchanged; if NEW_LEN > OLD_LEN then the following NEW_LEN - OLD_LEN bytes are initially indeterminate. The intention is that the caller should write NEW_LEN bytes at the returned position, to effectively replace the OLD_LEN bytes previously at that position. */ char * ds_splice_uninit (struct string *st, size_t ofs, size_t old_len, size_t new_len) { if (new_len != old_len) { if (new_len > old_len) ds_extend (st, ds_length (st) + (new_len - old_len)); memmove (ds_data (st) + (ofs + new_len), ds_data (st) + (ofs + old_len), ds_length (st) - (ofs + old_len)); st->ss.length += new_len - old_len; } return ds_data (st) + ofs; } /* Formats FORMAT as a printf string and appends the result to ST. */ void ds_put_format (struct string *st, const char *format, ...) { va_list args; va_start (args, format); ds_put_vformat (st, format, args); va_end (args); } /* Formats FORMAT as a printf string as if in the C locale and appends the result to ST. */ void ds_put_c_format (struct string *st, const char *format, ...) { va_list args; va_start (args, format); ds_put_c_vformat (st, format, args); va_end (args); } /* Formats FORMAT as a printf string, using fmt_func (a snprintf like function) and appends the result to ST. */ static void ds_put_vformat_int (struct string *st, const char *format, va_list args_, int (*fmt_func) (char *, size_t, const char *, va_list)) { int avail, needed; va_list args; va_copy (args, args_); avail = st->ss.string != NULL ? st->capacity - st->ss.length + 1 : 0; needed = fmt_func (st->ss.string + st->ss.length, avail, format, args); va_end (args); if (needed >= avail) { va_copy (args, args_); fmt_func (ds_put_uninit (st, needed), needed + 1, format, args); va_end (args); } else { /* Some old libc's returned -1 when the destination string was too short. */ while (needed == -1) { ds_extend (st, (st->capacity + 1) * 2); avail = st->capacity - st->ss.length + 1; va_copy (args, args_); needed = fmt_func (ds_end (st), avail, format, args); va_end (args); } st->ss.length += needed; } } static int vasnwrapper (char *str, size_t size, const char *format, va_list ap) { c_vasnprintf (str, &size, format, ap); return size; } /* Formats FORMAT as a printf string and appends the result to ST. */ void ds_put_vformat (struct string *st, const char *format, va_list args_) { ds_put_vformat_int (st, format, args_, vsnprintf); } /* Formats FORMAT as a printf string, as if in the C locale, and appends the result to ST. */ void ds_put_c_vformat (struct string *st, const char *format, va_list args_) { ds_put_vformat_int (st, format, args_, vasnwrapper); } /* Appends byte CH to ST. */ void ds_put_byte (struct string *st, int ch) { ds_put_uninit (st, 1)[0] = ch; } /* Appends CNT copies of byte CH to ST. */ void ds_put_byte_multiple (struct string *st, int ch, size_t cnt) { memset (ds_put_uninit (st, cnt), ch, cnt); } /* Appends Unicode code point UC to ST in UTF-8 encoding. */ void ds_put_unichar (struct string *st, ucs4_t uc) { ds_extend (st, ds_length (st) + 6); st->ss.length += u8_uctomb (CHAR_CAST (uint8_t *, ds_end (st)), uc, 6); } /* If relocation has been enabled, replace ST, with its relocated version */ void ds_relocate (struct string *st) { const char *orig = ds_cstr (st); const char *rel = relocate (orig); if ( orig != rel) { ds_clear (st); ds_put_cstr (st, rel); /* The documentation for relocate says that casting away const and then freeing is appropriate ... */ free (CONST_CAST (char *, rel)); } } /* Operations on uint8_t "strings" */ /* Copies buffer SRC, of SRC_SIZE bytes, to DST, of DST_SIZE bytes. DST is truncated to DST_SIZE bytes or padded on the right with copies of PAD as needed. */ void u8_buf_copy_rpad (uint8_t *dst, size_t dst_size, const uint8_t *src, size_t src_size, char pad) { if (src_size >= dst_size) memmove (dst, src, dst_size); else { memmove (dst, src, src_size); memset (&dst[src_size], pad, dst_size - src_size); } } pspp-1.0.1/src/libpspp/bt.c0000644000175000017500000004302212470243700012425 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Balanced tree (BT) data structure. The client should not need to be aware of the form of balancing applied to the balanced tree, as its operation is fully encapsulated. The current implementation is a scapegoat tree. Scapegoat trees have the advantage over many other forms of balanced trees that they do not store any additional information in each node; thus, they are slightly more space-efficient than, say, red-black or AVL trees. Compared to splay trees, scapegoat trees provide guaranteed logarithmic worst-case search time and do not restructure the tree during a search. For information on scapegoat trees, see Galperin and Rivest, "Scapegoat Trees", Proc. 4th ACM-SIAM Symposium on Discrete Algorithms, or , which includes source code and links to other resources, such as the Galperin and Rivest paper. One potentially tricky part of scapegoat tree design is the choice of alpha, which is a real constant that must be greater than 0.5 and less than 1. We must be able to efficiently calculate h_alpha = floor(log(n)/log(1/alpha)) for integer n > 0. One way to do so would be to maintain a table relating h_alpha to the minimum value of n that yields that h_alpha. Then, we can track the value of h_alpha(n) in the number of nodes in the tree n as nodes are inserted and deleted. This implementation uses a different approach. We choose alpha = sqrt(2)/2 = 1/sqrt(2) ~= .707. Then, computing h_alpha is a matter of computing a logarithm in base sqrt(2). This is easy: we simply compute twice the base-2 logarithm, then adjust upward by 1 if necessary. See calculate_h_alpha for details. */ /* These library routines have no external dependencies other than the standard C library. If you add routines in this file, please add a corresponding test to bt-test.c. This test program should achieve 100% coverage of lines and branches in this code, as reported by "gcov -b". */ #ifdef HAVE_CONFIG_H #include #endif #include "libpspp/bt.h" #include #include #include #include "libpspp/cast.h" static void rebalance_subtree (struct bt *, struct bt_node *, size_t); static struct bt_node **down_link (struct bt *, struct bt_node *); static inline struct bt_node *sibling (struct bt_node *p); static size_t count_nodes_in_subtree (const struct bt_node *); static inline int floor_log2 (size_t); static inline int calculate_h_alpha (size_t); /* Initializes BT as an empty BT that uses the given COMPARE function, passing in AUX as auxiliary data. */ void bt_init (struct bt *bt, bt_compare_func *compare, const void *aux) { bt->root = NULL; bt->compare = compare; bt->aux = aux; bt->size = 0; bt->max_size = 0; } /* Inserts the given NODE into BT. Returns a null pointer if successful. Returns the existing node already in BT equal to NODE, on failure. */ struct bt_node * bt_insert (struct bt *bt, struct bt_node *node) { int depth = 0; node->down[0] = NULL; node->down[1] = NULL; if (bt->root == NULL) { bt->root = node; node->up = NULL; } else { struct bt_node *p = bt->root; for (;;) { int cmp, dir; cmp = bt->compare (node, p, bt->aux); if (cmp == 0) return p; depth++; dir = cmp > 0; if (p->down[dir] == NULL) { p->down[dir] = node; node->up = p; break; } p = p->down[dir]; } } bt->size++; if (bt->size > bt->max_size) bt->max_size = bt->size; if (depth > calculate_h_alpha (bt->size)) { /* We use the "alternative" method of finding a scapegoat node described by Galperin and Rivest. */ struct bt_node *s = node; size_t size = 1; int i; for (i = 1; ; i++) if (i < depth) { size += 1 + count_nodes_in_subtree (sibling (s)); s = s->up; if (i > calculate_h_alpha (size)) { rebalance_subtree (bt, s, size); break; } } else { rebalance_subtree (bt, bt->root, bt->size); bt->max_size = bt->size; break; } } return NULL; } /* Deletes P from BT. */ void bt_delete (struct bt *bt, struct bt_node *p) { struct bt_node **q = down_link (bt, p); struct bt_node *r = p->down[1]; if (r == NULL) { *q = p->down[0]; if (*q) (*q)->up = p->up; } else if (r->down[0] == NULL) { r->down[0] = p->down[0]; *q = r; r->up = p->up; if (r->down[0] != NULL) r->down[0]->up = r; } else { struct bt_node *s = r->down[0]; while (s->down[0] != NULL) s = s->down[0]; r = s->up; r->down[0] = s->down[1]; s->down[0] = p->down[0]; s->down[1] = p->down[1]; *q = s; if (s->down[0] != NULL) s->down[0]->up = s; s->down[1]->up = s; s->up = p->up; if (r->down[0] != NULL) r->down[0]->up = r; } bt->size--; /* We approximate .707 as .75 here. This is conservative: it will cause us to do a little more rebalancing than strictly necessary to maintain the scapegoat tree's height invariant. */ if (bt->size < bt->max_size * 3 / 4 && bt->size > 0) { rebalance_subtree (bt, bt->root, bt->size); bt->max_size = bt->size; } } /* Returns the node with minimum value in BT, or a null pointer if BT is empty. */ struct bt_node * bt_first (const struct bt *bt) { struct bt_node *p = bt->root; if (p != NULL) while (p->down[0] != NULL) p = p->down[0]; return p; } /* Returns the node with maximum value in BT, or a null pointer if BT is empty. */ struct bt_node * bt_last (const struct bt *bt) { struct bt_node *p = bt->root; if (p != NULL) while (p->down[1] != NULL) p = p->down[1]; return p; } /* Searches BT for a node equal to TARGET. Returns the node if found, or a null pointer otherwise. */ struct bt_node * bt_find (const struct bt *bt, const struct bt_node *target) { const struct bt_node *p; int cmp; for (p = bt->root; p != NULL; p = p->down[cmp > 0]) { cmp = bt->compare (target, p, bt->aux); if (cmp == 0) return CONST_CAST (struct bt_node *, p); } return NULL; } /* Searches BT for, and returns, the first node in in-order whose value is greater than or equal to TARGET. Returns a null pointer if all nodes in BT are less than TARGET. Another way to look at the return value is that it is the node that would be returned by "bt_next (BT, TARGET)" if TARGET were inserted in BT (assuming that TARGET would not be a duplicate). */ struct bt_node * bt_find_ge (const struct bt *bt, const struct bt_node *target) { const struct bt_node *p = bt->root; const struct bt_node *q = NULL; while (p != NULL) { int cmp = bt->compare (target, p, bt->aux); if (cmp > 0) p = p->down[1]; else { q = p; if (cmp < 0) p = p->down[0]; else break; } } return CONST_CAST (struct bt_node *, q); } /* Searches BT for, and returns, the last node in in-order whose value is less than or equal to TARGET, which should not be in BT. Returns a null pointer if all nodes in BT are greater than TARGET. Another way to look at the return value is that it is the node that would be returned by "bt_prev (BT, TARGET)" if TARGET were inserted in BT (assuming that TARGET would not be a duplicate). */ struct bt_node * bt_find_le (const struct bt *bt, const struct bt_node *target) { const struct bt_node *p = bt->root; const struct bt_node *q = NULL; while (p != NULL) { int cmp = bt->compare (target, p, bt->aux); if (cmp < 0) p = p->down[0]; else { q = p; if (cmp > 0) p = p->down[1]; else break; } } return CONST_CAST (struct bt_node *, q); } /* Returns the node in BT following P in in-order. If P is null, returns the minimum node in BT. Returns a null pointer if P is the maximum node in BT or if P is null and BT is empty. */ struct bt_node * bt_next (const struct bt *bt, const struct bt_node *p) { if (p == NULL) return bt_first (bt); else if (p->down[1] == NULL) { struct bt_node *q; for (q = p->up; ; p = q, q = q->up) if (q == NULL || p == q->down[0]) return q; } else { p = p->down[1]; while (p->down[0] != NULL) p = p->down[0]; return CONST_CAST (struct bt_node *, p); } } /* Returns the node in BT preceding P in in-order. If P is null, returns the maximum node in BT. Returns a null pointer if P is the minimum node in BT or if P is null and BT is empty. */ struct bt_node * bt_prev (const struct bt *bt, const struct bt_node *p) { if (p == NULL) return bt_last (bt); else if (p->down[0] == NULL) { struct bt_node *q; for (q = p->up; ; p = q, q = q->up) if (q == NULL || p == q->down[1]) return q; } else { p = p->down[0]; while (p->down[1] != NULL) p = p->down[1]; return CONST_CAST (struct bt_node *, p); } } /* Moves P around in BT to compensate for its key having changed. Returns a null pointer if successful. If P's new value is equal to that of some other node in BT, returns the other node after removing P from BT. This function is an optimization only if it is likely that P can actually retain its relative position in BT, e.g. its key has only been adjusted slightly. Otherwise, it is more efficient to simply remove P from BT, change its key, and re-insert P. It is not safe to update more than one node's key, then to call this function for each node. Instead, update a single node's key, call this function, update another node's key, and so on. Alternatively, remove all affected nodes from the tree, update their keys, then re-insert all of them. */ struct bt_node * bt_changed (struct bt *bt, struct bt_node *p) { struct bt_node *prev = bt_prev (bt, p); struct bt_node *next = bt_next (bt, p); if ((prev != NULL && bt->compare (prev, p, bt->aux) >= 0) || (next != NULL && bt->compare (p, next, bt->aux) >= 0)) { bt_delete (bt, p); return bt_insert (bt, p); } return NULL; } /* BT nodes may be moved around in memory as necessary, e.g. as the result of an realloc operation on a block that contains a node. Once this is done, call this function passing node P that was moved and its BT before attempting any other operation on BT. It is not safe to move more than one node, then to call this function for each node. Instead, move a single node, call this function, move another node, and so on. Alternatively, remove all affected nodes from the tree, move them, then re-insert all of them. */ void bt_moved (struct bt *bt, struct bt_node *p) { if (p->up != NULL) { int d = p->up->down[0] == NULL || bt->compare (p, p->up, bt->aux) > 0; p->up->down[d] = p; } else bt->root = p; if (p->down[0] != NULL) p->down[0]->up = p; if (p->down[1] != NULL) p->down[1]->up = p; } /* Tree rebalancing. This algorithm is from Q. F. Stout and B. L. Warren, "Tree Rebalancing in Optimal Time and Space", CACM 29(1986):9, pp. 902-908. It uses O(N) time and O(1) space to rebalance a subtree that contains N nodes. */ static void tree_to_vine (struct bt_node **); static void vine_to_tree (struct bt_node **, size_t count); /* Rebalances the subtree in BT rooted at SUBTREE, which contains exactly COUNT nodes. */ static void rebalance_subtree (struct bt *bt, struct bt_node *subtree, size_t count) { struct bt_node *up = subtree->up; struct bt_node **q = down_link (bt, subtree); tree_to_vine (q); vine_to_tree (q, count); (*q)->up = up; } /* Converts the subtree rooted at *Q into a vine (a binary search tree in which all the right links are null), and updates *Q to point to the new root of the subtree. */ static void tree_to_vine (struct bt_node **q) { struct bt_node *p = *q; while (p != NULL) if (p->down[1] == NULL) { q = &p->down[0]; p = *q; } else { struct bt_node *r = p->down[1]; p->down[1] = r->down[0]; r->down[0] = p; p = r; *q = r; } } /* Performs a compression transformation COUNT times, starting at *Q, and updates *Q to point to the new root of the subtree. */ static void compress (struct bt_node **q, unsigned long count) { while (count--) { struct bt_node *red = *q; struct bt_node *black = red->down[0]; *q = black; red->down[0] = black->down[1]; black->down[1] = red; red->up = black; if (red->down[0] != NULL) red->down[0]->up = red; q = &black->down[0]; } } /* Converts the vine rooted at *Q, which contains exactly COUNT nodes, into a balanced tree, and updates *Q to point to the new root of the balanced tree. */ static void vine_to_tree (struct bt_node **q, size_t count) { size_t leaf_nodes = count + 1 - ((size_t) 1 << floor_log2 (count + 1)); size_t vine_nodes = count - leaf_nodes; compress (q, leaf_nodes); while (vine_nodes > 1) { vine_nodes /= 2; compress (q, vine_nodes); } while ((*q)->down[0] != NULL) { (*q)->down[0]->up = *q; q = &(*q)->down[0]; } } /* Other binary tree helper functions. */ /* Returns the address of the pointer that points down to P within BT. */ static struct bt_node ** down_link (struct bt *bt, struct bt_node *p) { struct bt_node *q = p->up; return q != NULL ? &q->down[q->down[0] != p] : &bt->root; } /* Returns node P's sibling; that is, the other child of its parent. P must not be the root. */ static inline struct bt_node * sibling (struct bt_node *p) { struct bt_node *q = p->up; return q->down[q->down[0] == p]; } /* Returns the number of nodes in the given SUBTREE. */ static size_t count_nodes_in_subtree (const struct bt_node *subtree) { /* This is an in-order traversal modified to iterate only the nodes in SUBTREE. */ size_t count = 0; if (subtree != NULL) { const struct bt_node *p = subtree; while (p->down[0] != NULL) p = p->down[0]; for (;;) { count++; if (p->down[1] != NULL) { p = p->down[1]; while (p->down[0] != NULL) p = p->down[0]; } else { for (;;) { const struct bt_node *q; if (p == subtree) goto done; q = p; p = p->up; if (p->down[0] == q) break; } } } } done: return count; } /* Arithmetic. */ /* Returns the number of high-order 0-bits in X. Undefined if X is zero. */ static inline int count_leading_zeros (size_t x) { #if __GNUC__ >= 4 #if SIZE_MAX > ULONG_MAX return __builtin_clzll (x); #elif SIZE_MAX > UINT_MAX return __builtin_clzl (x); #else return __builtin_clz (x); #endif #else /* This algorithm is from _Hacker's Delight_ section 5.3. */ size_t y; int n; #define COUNT_STEP(BITS) \ y = x >> BITS; \ if (y != 0) \ { \ n -= BITS; \ x = y; \ } n = sizeof (size_t) * CHAR_BIT; #if SIZE_MAX >> 31 >> 31 >> 2 COUNT_STEP (64); #endif #if SIZE_MAX >> 31 >> 1 COUNT_STEP (32); #endif COUNT_STEP (16); COUNT_STEP (8); COUNT_STEP (4); COUNT_STEP (2); y = x >> 1; return y != 0 ? n - 2 : n - x; #endif } /* Returns floor(log2(x)). Undefined if X is zero. */ static inline int floor_log2 (size_t x) { return sizeof (size_t) * CHAR_BIT - 1 - count_leading_zeros (x); } /* Returns floor(pow(sqrt(2), x * 2 + 1)). Defined for X from 0 up to the number of bits in size_t minus 1. */ static inline size_t pow_sqrt2 (int x) { /* These constants are sqrt(2) multiplied by 2**63 or 2**31, respectively, and then rounded to nearest. */ #if SIZE_MAX >> 31 >> 1 return (UINT64_C(0xb504f333f9de6484) >> (63 - x)) + 1; #else return (0xb504f334 >> (31 - x)) + 1; #endif } /* Returns floor(log(n)/log(sqrt(2))). Undefined if N is 0. */ static inline int calculate_h_alpha (size_t n) { int log2 = floor_log2 (n); /* The correct answer is either 2 * log2 or one more. So we see if n >= pow(sqrt(2), 2 * log2 + 1) and if so, add 1. */ return (2 * log2) + (n >= pow_sqrt2 (log2)); } pspp-1.0.1/src/libpspp/u8-line.c0000644000175000017500000001316212470413451013305 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/u8-line.h" #include #include #include "libpspp/cast.h" #include "libpspp/str.h" /* Initializes LINE as an empty u8_line. */ void u8_line_init (struct u8_line *line) { ds_init_empty (&line->s); line->width = 0; } /* Frees data owned by LINE. */ void u8_line_destroy (struct u8_line *line) { ds_destroy (&line->s); } /* Clears LINE to zero length. */ void u8_line_clear (struct u8_line *line) { ds_clear (&line->s); line->width = 0; } static int u8_mb_to_display (int *wp, const uint8_t *s, size_t n) { size_t ofs; ucs4_t uc; int w; ofs = u8_mbtouc (&uc, s, n); if (ofs < n && s[ofs] == '\b') { ofs++; ofs += u8_mbtouc (&uc, s + ofs, n - ofs); } w = uc_width (uc, "UTF-8"); if (w <= 0) { *wp = 0; return ofs; } while (ofs < n) { int mblen = u8_mbtouc (&uc, s + ofs, n - ofs); if (uc_width (uc, "UTF-8") > 0) break; ofs += mblen; } *wp = w; return ofs; } /* Position of a character within a u8_line. */ struct u8_pos { /* 0-based display columns. For a single-width character, x1 == x0 + 1. For a double-width character, x1 == x0 + 2. */ int x0; int x1; /* Byte offsets. For an ordinary ASCII character, ofs1 == ofs0 + 1. For Unicode code point 0x80 or higher, 2 <= ofs1 - ofs0 <= 4. */ size_t ofs0; size_t ofs1; }; static void u8_line_find_pos (struct u8_line *line, int target_x, struct u8_pos *c) { const uint8_t *s = CHAR_CAST (const uint8_t *, ds_cstr (&line->s)); size_t length = ds_length (&line->s); size_t ofs; int mblen; int x; x = 0; for (ofs = 0; ; ofs += mblen) { int w; mblen = u8_mb_to_display (&w, s + ofs, length - ofs); if (x + w > target_x) { c->x0 = x; c->x1 = x + w; c->ofs0 = ofs; c->ofs1 = ofs + mblen; return; } x += w; } } /* Prepares LINE to write N bytes of characters that comprise X1-X0 column widths starting at 0-based column X0. Returns the first byte of the N for the caller to fill in. */ char * u8_line_reserve (struct u8_line *line, int x0, int x1, int n) { if (x0 >= line->width) { /* The common case: adding new characters at the end of a line. */ ds_put_byte_multiple (&line->s, ' ', x0 - line->width); line->width = x1; return ds_put_uninit (&line->s, n); } else if (x0 == x1) return NULL; else { /* An unusual case: overwriting characters in the middle of a line. We don't keep any kind of mapping from bytes to display positions, so we have to iterate over the whole line starting from the beginning. */ struct u8_pos p0, p1; char *s; /* Find the positions of the first and last character. We must find both characters' positions before changing the line, because that would prevent finding the other character's position. */ u8_line_find_pos (line, x0, &p0); if (x1 < line->width) u8_line_find_pos (line, x1, &p1); /* If a double-width character occupies both x0 - 1 and x0, then replace its first character width by '?'. */ s = ds_data (&line->s); while (p0.x0 < x0) { s[p0.ofs0++] = '?'; p0.x0++; } if (x1 >= line->width) { ds_truncate (&line->s, p0.ofs0); line->width = x1; return ds_put_uninit (&line->s, n); } /* If a double-width character occupies both x1 - 1 and x1, then replace its second character width by '?'. */ if (p1.x0 < x1) { do { s[--p1.ofs1] = '?'; p1.x0++; } while (p1.x0 < x1); return ds_splice_uninit (&line->s, p0.ofs0, p1.ofs1 - p0.ofs0, n); } return ds_splice_uninit (&line->s, p0.ofs0, p1.ofs0 - p0.ofs0, n); } } /* Writes the N bytes of characters that comprise X1-X0 column widths into LINE starting at 0-based column X0. */ void u8_line_put (struct u8_line *line, int x0, int x1, const char *s, int n) { memcpy (u8_line_reserve (line, x0, x1, n), s, n); } /* Changes the width of LINE to X column widths. If X is longer than LINE's previous width, LINE is extended by appending spaces. If X is shorter than LINE's previous width, LINE is shortened by removing trailing characters. */ void u8_line_set_length (struct u8_line *line, int x) { if (x > line->width) { ds_put_byte_multiple (&line->s, ' ', x - line->width); line->width = x; } else if (x < line->width) { struct u8_pos pos; u8_line_find_pos (line, x, &pos); ds_truncate (&line->s, pos.ofs0); line->width = pos.x0; if (x > line->width) { ds_put_byte_multiple (&line->s, '?', x - line->width); line->width = x; } } } pspp-1.0.1/src/libpspp/range-map.c0000644000175000017500000001213112470243700013664 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/range-map.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" static struct range_map_node *bt_to_range_map_node (const struct bt_node *); static int compare_range_map_nodes (const struct bt_node *, const struct bt_node *, const void *aux); static struct range_map_node *first_node (const struct range_map *); static struct range_map_node *next_node (const struct range_map *, const struct range_map_node *); static struct range_map_node *prev_node (const struct range_map *, const struct range_map_node *) UNUSED; /* Initializes RM as an empty range map. */ void range_map_init (struct range_map *rm) { bt_init (&rm->bt, compare_range_map_nodes, NULL); } /* Returns true if RM contains no mappings, false if it contains at least one. */ bool range_map_is_empty (const struct range_map *rm) { return bt_count (&rm->bt) == 0; } /* Inserts node NEW into RM, covering the range beginning at START and ending at START + WIDTH (exclusive). WIDTH must be at least 1. The new range must not overlap any existing range already in RM. */ void range_map_insert (struct range_map *rm, unsigned long int start, unsigned long int width, struct range_map_node *new) { unsigned long int end = start + width; struct range_map_node *dup; assert (width > 0); assert (end - 1 >= start); new->start = start; new->end = end; dup = bt_to_range_map_node (bt_insert (&rm->bt, &new->bt_node)); /* Make sure NEW doesn't overlap any other node. */ assert (dup == NULL); assert (prev_node (rm, new) == NULL || start >= prev_node (rm, new)->end); assert (next_node (rm, new) == NULL || next_node (rm, new)->start >= end); } /* Deletes NODE from RM. */ void range_map_delete (struct range_map *rm, struct range_map_node *node) { bt_delete (&rm->bt, &node->bt_node); } /* Returns the node in RM that contains the given POSITION, or a null pointer if no node contains POSITION. */ struct range_map_node * range_map_lookup (const struct range_map *rm, unsigned long int position) { struct range_map_node tmp, *node; tmp.start = position; node = bt_to_range_map_node (bt_find_le (&rm->bt, &tmp.bt_node)); return node != NULL && position < node->end ? node : NULL; } /* Returns the first node in RM, or a null pointer if RM is empty. */ struct range_map_node * range_map_first (const struct range_map *rm) { return first_node (rm); } /* If NODE is nonnull, returns the node in RM following NODE, or a null pointer if NODE is the last node in RM. If NODE is null, behaves like range_map_first. */ struct range_map_node * range_map_next (const struct range_map *rm, const struct range_map_node *node) { return node != NULL ? next_node (rm, node) : first_node (rm); } /* Returns the range_map_node containing BT_NODE. */ static struct range_map_node * bt_to_range_map_node (const struct bt_node *bt_node) { return (bt_node != NULL ? bt_data (bt_node, struct range_map_node, bt_node) : NULL); } /* Compares range map nodes A and B and returns a strcmp()-type result. */ static int compare_range_map_nodes (const struct bt_node *a_, const struct bt_node *b_, const void *aux UNUSED) { const struct range_map_node *a = bt_to_range_map_node (a_); const struct range_map_node *b = bt_to_range_map_node (b_); return a->start < b->start ? -1 : a->start > b->start; } /* Returns the first range map node in RM, or a null pointer if RM is empty. */ static struct range_map_node * first_node (const struct range_map *rm) { return bt_to_range_map_node (bt_first (&rm->bt)); } /* Returns the next range map node in RM following NODE, or a null pointer if NODE is the last node in RM. */ static struct range_map_node * next_node (const struct range_map *rm, const struct range_map_node *node) { return bt_to_range_map_node (bt_next (&rm->bt, &node->bt_node)); } /* Returns the previous range map node in RM preceding NODE, or a null pointer if NODE is the first node in RM. */ static struct range_map_node * prev_node (const struct range_map *rm, const struct range_map_node *node) { return bt_to_range_map_node (bt_prev (&rm->bt, &node->bt_node)); } pspp-1.0.1/src/libpspp/zip-private.h0000644000175000017500000000206213132517537014306 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef ZIP_PRIVATE_H #define ZIP_PRIVATE_H 1 #define MAGIC_EOCD ( (uint32_t) 0x06054b50) /* End of directory */ #define MAGIC_SOCD ( (uint32_t) 0x02014b50) /* Start of directory */ #define MAGIC_LHDR ( (uint32_t) 0x04034b50) /* Local Header */ #define MAGIC_DDHD ( (uint32_t) 0x08074b50) /* Data Descriptor Header */ #endif pspp-1.0.1/src/libpspp/abt.c0000644000175000017500000003210712470243700012570 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Augmented binary tree (ABT) data structure. */ /* These library routines have no external dependencies other than the standard C library. If you add routines in this file, please add a corresponding test to abt-test.c. This test program should achieve 100% coverage of lines and branches in this code, as reported by "gcov -b". */ #ifdef HAVE_CONFIG_H #include #endif #include "libpspp/abt.h" #include #include "libpspp/cast.h" #include "libpspp/assertion.h" static struct abt_node **down_link (struct abt *, struct abt_node *); static struct abt_node *skew (struct abt *, struct abt_node *); static struct abt_node *split (struct abt *, struct abt_node *); /* Initializes ABT as an empty ABT that uses COMPARE and REAUGMENT functions, passing in AUX as auxiliary data. The comparison function is optional. If it is null, this indicates that the tree is being used for its augmentations only. ABT functions that compare nodes may not be used with trees that lack comparison functions; contrariwise, other functions that could disrupt the ordering of a tree may not be used if a comparison function is specified. Refer to individual function descriptions for details. */ void abt_init (struct abt *abt, abt_compare_func *compare, abt_reaugment_func *reaugment, const void *aux) { assert (reaugment != NULL); abt->root = NULL; abt->compare = compare; abt->reaugment = reaugment; abt->aux = aux; } /* Inserts the given NODE into ABT. Returns a null pointer if successful. Returns the existing node already in ABT equal to NODE, on failure. This function may be used only if ABT has a comparison function. */ struct abt_node * abt_insert (struct abt *abt, struct abt_node *node) { node->down[0] = NULL; node->down[1] = NULL; node->level = 1; if (abt->root == NULL) { abt->root = node; node->up = NULL; abt_reaugmented (abt, node); } else { struct abt_node *p = abt->root; for (;;) { int cmp, dir; cmp = abt->compare (node, p, abt->aux); if (cmp == 0) return p; dir = cmp > 0; if (p->down[dir] == NULL) { p->down[dir] = node; node->up = p; abt_reaugmented (abt, node); break; } p = p->down[dir]; } } while ((node = node->up) != NULL) { node = skew (abt, node); node = split (abt, node); } return NULL; } /* Inserts NODE before or after node P in ABT, depending on the value of AFTER. If P is null, then the node is inserted as the first node in the tree, if AFTER is true, or the last node, if AFTER is false. */ static inline void insert_relative (struct abt *abt, const struct abt_node *p, bool after, struct abt_node *node) { node->down[0] = NULL; node->down[1] = NULL; node->level = 1; if (abt->root == NULL) { assert (p == NULL); abt->root = node; node->up = NULL; abt_reaugmented (abt, node); } else { int dir = after; if (p == NULL) { p = abt->root; dir = !after; } while (p->down[dir] != NULL) { p = p->down[dir]; dir = !after; } CONST_CAST (struct abt_node *, p)->down[dir] = node; node->up = CONST_CAST (struct abt_node *, p); abt_reaugmented (abt, node); } while ((node = node->up) != NULL) { node = skew (abt, node); node = split (abt, node); } } /* Inserts NODE after node P in ABT. If P is null, then the node is inserted as the first node in the tree. This function may be used only if ABT lacks a comparison function. */ void abt_insert_after (struct abt *abt, const struct abt_node *p, struct abt_node *node) { assert (abt->compare == NULL); insert_relative (abt, p, true, node); } /* Inserts NODE before node P in ABT. If P is null, then the node is inserted as the last node in the tree. This function may be used only if ABT lacks a comparison function. */ void abt_insert_before (struct abt *abt, const struct abt_node *p, struct abt_node *node) { assert (abt->compare == NULL); insert_relative (abt, p, false, node); } /* Deletes P from ABT. */ void abt_delete (struct abt *abt, struct abt_node *p) { struct abt_node **q = down_link (abt, p); struct abt_node *r = p->down[1]; if (r == NULL) { *q = NULL; p = p->up; } else if (r->down[0] == NULL) { r->down[0] = p->down[0]; *q = r; r->up = p->up; if (r->down[0] != NULL) r->down[0]->up = r; r->level = p->level; p = r; } else { struct abt_node *s = r->down[0]; while (s->down[0] != NULL) s = s->down[0]; r = s->up; r->down[0] = s->down[1]; s->down[0] = p->down[0]; s->down[1] = p->down[1]; *q = s; s->down[0]->up = s; s->down[1]->up = s; s->up = p->up; s->level = p->level; if (r->down[0] != NULL) r->down[0]->up = r; p = r; } abt_reaugmented (abt, p); for (; p != NULL; p = p->up) if ((p->down[0] != NULL ? p->down[0]->level : 0) < p->level - 1 || (p->down[1] != NULL ? p->down[1]->level : 0) < p->level - 1) { p->level--; if (p->down[1] != NULL && p->down[1]->level > p->level) p->down[1]->level = p->level; p = skew (abt, p); skew (abt, p->down[1]); if (p->down[1]->down[1] != NULL) skew (abt, p->down[1]->down[1]); p = split (abt, p); split (abt, p->down[1]); } } /* Returns the node with minimum value in ABT, or a null pointer if ABT is empty. */ struct abt_node * abt_first (const struct abt *abt) { struct abt_node *p = abt->root; if (p != NULL) while (p->down[0] != NULL) p = p->down[0]; return p; } /* Returns the node with maximum value in ABT, or a null pointer if ABT is empty. */ struct abt_node * abt_last (const struct abt *abt) { struct abt_node *p = abt->root; if (p != NULL) while (p->down[1] != NULL) p = p->down[1]; return p; } /* Searches ABT for a node equal to TARGET. Returns the node if found, or a null pointer otherwise. This function may be used only if ABT has a comparison function. */ struct abt_node * abt_find (const struct abt *abt, const struct abt_node *target) { const struct abt_node *p; int cmp; for (p = abt->root; p != NULL; p = p->down[cmp > 0]) { cmp = abt->compare (target, p, abt->aux); if (cmp == 0) return CONST_CAST (struct abt_node *, p); } return NULL; } /* Returns the node in ABT following P in in-order. If P is null, returns the minimum node in ABT. Returns a null pointer if P is the maximum node in ABT or if P is null and ABT is empty. */ struct abt_node * abt_next (const struct abt *abt, const struct abt_node *p) { if (p == NULL) return abt_first (abt); else if (p->down[1] == NULL) { struct abt_node *q; for (q = p->up; ; p = q, q = q->up) if (q == NULL || p == q->down[0]) return q; } else { p = p->down[1]; while (p->down[0] != NULL) p = p->down[0]; return CONST_CAST (struct abt_node *, p); } } /* Returns the node in ABT preceding P in in-order. If P is null, returns the maximum node in ABT. Returns a null pointer if P is the minimum node in ABT or if P is null and ABT is empty. */ struct abt_node * abt_prev (const struct abt *abt, const struct abt_node *p) { if (p == NULL) return abt_last (abt); else if (p->down[0] == NULL) { struct abt_node *q; for (q = p->up; ; p = q, q = q->up) if (q == NULL || p == q->down[1]) return q; } else { p = p->down[0]; while (p->down[1] != NULL) p = p->down[1]; return CONST_CAST (struct abt_node *, p); } } /* Calls ABT's reaugmentation function to compensate for augmentation data in P having been modified. Use abt_changed, instead, if the key data in P has changed. It is not safe to update more than one node's augmentation data, then to call this function for each node. Instead, update a single node's data, call this function, update another node's data, and so on. Alternatively, remove all affected nodes from the tree, update their values, then re-insert all of them. */ void abt_reaugmented (const struct abt *abt, struct abt_node *p) { for (; p != NULL; p = p->up) abt->reaugment (p, abt->aux); } /* Moves P around in ABT to compensate for its key having changed. Returns a null pointer if successful. If P's new value is equal to that of some other node in ABT, returns the other node after removing P from ABT. This function is an optimization only if it is likely that P can actually retain its relative position in ABT, e.g. its key has only been adjusted slightly. Otherwise, it is more efficient to simply remove P from ABT, change its key, and re-insert P. It is not safe to update more than one node's key, then to call this function for each node. Instead, update a single node's key, call this function, update another node's key, and so on. Alternatively, remove all affected nodes from the tree, update their keys, then re-insert all of them. This function may be used only if ABT has a comparison function. If it doesn't, then you probably just want abt_reaugmented. */ struct abt_node * abt_changed (struct abt *abt, struct abt_node *p) { struct abt_node *prev = abt_prev (abt, p); struct abt_node *next = abt_next (abt, p); if ((prev != NULL && abt->compare (prev, p, abt->aux) >= 0) || (next != NULL && abt->compare (p, next, abt->aux) >= 0)) { abt_delete (abt, p); return abt_insert (abt, p); } else { abt_reaugmented (abt, p); return NULL; } } /* ABT nodes may be moved around in memory as necessary, e.g. as the result of an realloc operation on a block that contains a node. Once this is done, call this function passing node P that was moved and its ABT before attempting any other operation on ABT. It is not safe to move more than one node, then to call this function for each node. Instead, move a single node, call this function, move another node, and so on. Alternatively, remove all affected nodes from the tree, move them, then re-insert all of them. This function may be used only if ABT has a comparison function. */ void abt_moved (struct abt *abt, struct abt_node *p) { if (p->up != NULL) { int d = p->up->down[0] == NULL || abt->compare (p, p->up, abt->aux) > 0; p->up->down[d] = p; } else abt->root = p; if (p->down[0] != NULL) p->down[0]->up = p; if (p->down[1] != NULL) p->down[1]->up = p; } /* Returns the address of the pointer that points down to P within ABT. */ static struct abt_node ** down_link (struct abt *abt, struct abt_node *p) { return (p->up != NULL ? &p->up->down[p->up->down[0] != p] : &abt->root); } /* Remove a left "horizontal link" at A, if present. Returns the node that occupies the position previously occupied by A. */ static struct abt_node * skew (struct abt *abt, struct abt_node *a) { struct abt_node *b = a->down[0]; if (b != NULL && b->level == a->level) { /* Rotate right. */ a->down[0] = b->down[1]; b->down[1] = a; *down_link (abt, a) = b; if (a->down[0] != NULL) a->down[0]->up = a; b->up = a->up; a->up = b; abt->reaugment (a, abt->aux); abt->reaugment (b, abt->aux); return b; } else return a; } /* Removes a pair of consecutive right "horizontal links" at A, if present. Returns the node that occupies the position previously occupied by A. */ static struct abt_node * split (struct abt *abt, struct abt_node *a) { struct abt_node *b = a->down[1]; if (b != NULL && b->down[1] != NULL && b->down[1]->level == a->level) { /* Rotate left. */ a->down[1] = b->down[0]; b->down[0] = a; *down_link (abt, a) = b; if (a->down[1] != NULL) a->down[1]->up = a; b->up = a->up; a->up = b; b->level++; abt->reaugment (a, abt->aux); abt->reaugment (b, abt->aux); return b; } else return a; } pspp-1.0.1/src/libpspp/integer-format.h0000644000175000017500000000340712476227410014761 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_INTEGER_FORMAT_H #define LIBPSPP_INTEGER_FORMAT_H 1 #include #include #include "libpspp/str.h" /* An integer format. */ enum integer_format { INTEGER_MSB_FIRST, /* Big-endian: MSB at lowest address. */ INTEGER_LSB_FIRST, /* Little-endian: LSB at lowest address. */ INTEGER_VAX, /* VAX-endian: little-endian 16-bit words in big-endian order. */ /* Native endianness. */ #ifdef WORDS_BIGENDIAN INTEGER_NATIVE = INTEGER_MSB_FIRST #else INTEGER_NATIVE = INTEGER_LSB_FIRST #endif }; void integer_convert (enum integer_format, const void *, enum integer_format, void *, size_t); uint64_t integer_get (enum integer_format, const void *, size_t); void integer_put (uint64_t, enum integer_format, void *, size_t); bool integer_identify (uint64_t expected_value, const void *, size_t, enum integer_format *); #endif /* libpspp/integer-format.h */ pspp-1.0.1/src/libpspp/sparse-array.h0000644000175000017500000000504312470242642014443 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Sparse array data structure. Implements a dictionary that associates a "unsigned long int" key with fixed-size values (elements). The implementation allocates elements in groups of moderate size, so it achieves maximum space efficiency when elements are clustered into groups of consecutive keys. For the same reason, elements should be kept relatively small, perhaps a few pointer elements in size. The implementation is slightly more efficient both in time and space when indexes are kept small. Thus, for example, if the indexes in use start from some fixed base value, consider using the offset from that base as the index value. */ #ifndef LIBPSPP_SPARSE_ARRAY_H #define LIBPSPP_SPARSE_ARRAY_H 1 #include #include struct pool; struct sparse_array *sparse_array_create (size_t elem_size); struct sparse_array *sparse_array_create_pool (struct pool *, size_t elem_size); void sparse_array_destroy (struct sparse_array *); unsigned long int sparse_array_count (const struct sparse_array *); void *sparse_array_insert (struct sparse_array *, unsigned long int key); void *sparse_array_get (const struct sparse_array *, unsigned long int key); bool sparse_array_remove (struct sparse_array *, unsigned long int key); void *sparse_array_first (const struct sparse_array *, unsigned long int *idxp); void *sparse_array_next (const struct sparse_array *, unsigned long int skip, unsigned long int *idxp); void *sparse_array_last (const struct sparse_array *, unsigned long int *idxp); void *sparse_array_prev (const struct sparse_array *, unsigned long int skip, unsigned long int *idxp); #endif /* libpspp/sparse-array.h */ pspp-1.0.1/src/libpspp/deque.h0000644000175000017500000001344312470243700013134 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Deque data structure. This code slightly simplifies the implementation of a deque as a circular queue. To use it, declare a "struct deque" and a pointer to the element type. For example, for a deque of "int"s: struct deque deque; int *data; To initialize the deque with a initial capacity of 0: deque_init_null (&deque); data = NULL; Alternatively, to initialize the deque with an initial minimum capacity of, e.g., 4: data = deque_init (&deque, 4, sizeof *data); Functions that access elements in the deque return array indexes. This is fairly convenient: // Push X at the back of the deque. data[deque_push_back (&deque)] = x; // Pop off the front of the deque into X. x = data[deque_pop_front (&deque)]; // Obtain the element just past the back of the deque as X. x = data[deque_back (&deque, 1)]; The push functions will not expand the deque on their own. Use the deque_expand function if necessary, as in: // Push X at the back of the deque, first expanding the // deque if necessary. if (deque_is_full (&deque)) data = deque_expand (&deque, data, sizeof *data); data[deque_push_back (&deque)] = x; Expanding a deque will copy its elements from one memory region to another using memcpy. Thus, your deque elements must tolerate copying if their deque is to be expanded. */ #ifndef LIBPSPP_DEQUE_H #define LIBPSPP_DEQUE_H 1 #include #include #include #include "libpspp/assertion.h" /* A deque implemented as a circular buffer. */ struct deque { size_t capacity; /* Capacity, which must be a power of 2. */ size_t front; /* One past the front of the queue. */ size_t back; /* The back of the queue. */ }; void deque_init_null (struct deque *); void *deque_init (struct deque *, size_t capacity, size_t elem_size); void *deque_expand (struct deque *, void *, size_t elem_size); /* Returns the number of elements currently in DEQUE. */ static inline size_t deque_count (const struct deque *deque) { return deque->front - deque->back; } /* Returns the maximum number of elements that DEQUE can hold at any time. (Use deque_expand to increase a deque's capacity.) */ static inline size_t deque_capacity (const struct deque *deque) { return deque->capacity; } /* Returns true if DEQUE is currently empty (contains no elements), false otherwise. */ static inline bool deque_is_empty (const struct deque *deque) { return deque_count (deque) == 0; } /* Returns true if DEQUE is currently full (cannot take any more elements), false otherwise. */ static inline bool deque_is_full (const struct deque *deque) { return deque_count (deque) >= deque_capacity (deque); } /* Returns the index of the element in DEQUE that is OFFSET elements from its front. A value 0 for OFFSET requests the element at the front, a value of 1 the element just behind the front, and so on. OFFSET must be less than the current number of elements in DEQUE. */ static inline size_t deque_front (const struct deque *deque, size_t offset) { assert (deque_count (deque) > offset); return (deque->front - offset - 1) & (deque->capacity - 1); } /* Returns the index of the element in DEQUE that is OFFSET elements from its back. A value 0 for OFFSET requests the element at the back, a value of 1 the element just ahead of the back, and so on. OFFSET must be less than the current number of elements in DEQUE. */ static inline size_t deque_back (const struct deque *deque, size_t offset) { assert (deque_count (deque) > offset); return (deque->back + offset) & (deque->capacity - 1); } /* Adds a new element at the front of DEQUE, which must not be full, and returns the index of the new element. The caller is responsible for assigning a value to the returned element. */ static inline size_t deque_push_front (struct deque *deque) { assert (!deque_is_full (deque)); return deque->front++ & (deque->capacity - 1); } /* Adds a new element at the back of DEQUE, which must not be full, and returns the index of the new element. The caller is responsible for assigning a value to the returned element. */ static inline size_t deque_push_back (struct deque *deque) { assert (!deque_is_full (deque)); return --deque->back & (deque->capacity - 1); } /* Pops the front element off DEQUE (which must not be empty) and returns its index. The element may be reused the next time an element is pushed into DEQUE or when DEQUE is expanded. */ static inline size_t deque_pop_front (struct deque *deque) { assert (!deque_is_empty (deque)); return --deque->front & (deque->capacity - 1); } /* Pops the back element off DEQUE (which must not be empty) and returns its index. The element may be reused the next time an element is pushed into DEQUE or when DEQUE is expanded. */ static inline size_t deque_pop_back (struct deque *deque) { assert (!deque_is_empty (deque)); return deque->back++ & (deque->capacity - 1); } #endif /* libpspp/deque.h */ pspp-1.0.1/src/libpspp/message.c0000644000175000017500000002325313137223525013454 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/message.h" #include #include #include #include #include #include #include "libpspp/cast.h" #include "libpspp/str.h" #include "libpspp/version.h" #include "data/settings.h" #include "gl/minmax.h" #include "gl/progname.h" #include "gl/xalloc.h" #include "gl/xvasprintf.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Message handler as set by msg_set_handler(). */ static void (*msg_handler) (const struct msg *, void *aux); static void *msg_aux; /* Disables emitting messages if positive. */ static int messages_disabled; /* Public functions. */ void vmsg (enum msg_class class, const char *format, va_list args) { struct msg m; m.category = msg_class_to_category (class); m.severity = msg_class_to_severity (class); m.text = xvasprintf (format, args); m.file_name = NULL; m.first_line = m.last_line = 0; m.first_column = m.last_column = 0; msg_emit (&m); } /* Writes error message in CLASS, with text FORMAT, formatted with printf, to the standard places. */ void msg (enum msg_class class, const char *format, ...) { va_list args; va_start (args, format); vmsg (class, format, args); va_end (args); } void msg_error (int errnum, const char *format, ...) { va_list args; char *e; struct msg m; m.category = MSG_C_GENERAL; m.severity = MSG_S_ERROR; va_start (args, format); e = xvasprintf (format, args); va_end (args); m.file_name = NULL; m.first_line = m.last_line = 0; m.first_column = m.last_column = 0; m.text = xasprintf (_("%s: %s"), e, strerror (errnum)); free (e); msg_emit (&m); } void msg_set_handler (void (*handler) (const struct msg *, void *aux), void *aux) { msg_handler = handler; msg_aux = aux; } /* Working with messages. */ const char * msg_severity_to_string (enum msg_severity severity) { switch (severity) { case MSG_S_ERROR: return _("error"); case MSG_S_WARNING: return _("warning"); case MSG_S_NOTE: default: return _("note"); } } /* Duplicate a message */ struct msg * msg_dup (const struct msg *m) { struct msg *new_msg; new_msg = xmemdup (m, sizeof *m); if (m->file_name != NULL) new_msg->file_name = xstrdup (m->file_name); new_msg->text = xstrdup (m->text); return new_msg; } /* Frees a message created by msg_dup(). (Messages not created by msg_dup(), as well as their file_name members, are typically not dynamically allocated, so this function should not be used to destroy them.) */ void msg_destroy (struct msg *m) { free (m->file_name); free (m->text); free (m); } char * msg_to_string (const struct msg *m, const char *command_name) { struct string s; ds_init_empty (&s); if (m->category != MSG_C_GENERAL && (m->file_name || m->first_line > 0 || m->first_column > 0)) { int l1 = m->first_line; int l2 = MAX (m->first_line, m->last_line - 1); int c1 = m->first_column; int c2 = MAX (m->first_column, m->last_column - 1); if (m->file_name) ds_put_format (&s, "%s", m->file_name); if (l1 > 0) { if (!ds_is_empty (&s)) ds_put_byte (&s, ':'); if (l2 > l1) { if (c1 > 0) ds_put_format (&s, "%d.%d-%d.%d", l1, c1, l2, c2); else ds_put_format (&s, "%d-%d", l1, l2); } else { if (c1 > 0) { if (c2 > c1) { /* The GNU coding standards say to use LINENO-1.COLUMN-1-COLUMN-2 for this case, but GNU Emacs interprets COLUMN-2 as LINENO-2 if I do that. I've submitted an Emacs bug report: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7725. For now, let's be compatible. */ ds_put_format (&s, "%d.%d-%d.%d", l1, c1, l1, c2); } else ds_put_format (&s, "%d.%d", l1, c1); } else ds_put_format (&s, "%d", l1); } } else if (c1 > 0) { if (c2 > c1) ds_put_format (&s, ".%d-%d", c1, c2); else ds_put_format (&s, ".%d", c1); } ds_put_cstr (&s, ": "); } ds_put_format (&s, "%s: ", msg_severity_to_string (m->severity)); if (m->category == MSG_C_SYNTAX && command_name != NULL) ds_put_format (&s, "%s: ", command_name); ds_put_cstr (&s, m->text); return ds_cstr (&s); } /* Number of messages reported, by severity level. */ static int counts[MSG_N_SEVERITIES]; /* True after the maximum number of errors or warnings has been exceeded. */ static bool too_many_errors; /* True after the maximum number of notes has been exceeded. */ static bool too_many_notes; /* True iff warnings have been explicitly disabled (MXWARNS = 0) */ static bool warnings_off = false; /* Checks whether we've had so many errors that it's time to quit processing this syntax file. */ bool msg_ui_too_many_errors (void) { return too_many_errors; } void msg_ui_disable_warnings (bool x) { warnings_off = x; } void msg_ui_reset_counts (void) { int i; for (i = 0; i < MSG_N_SEVERITIES; i++) counts[i] = 0; too_many_errors = false; too_many_notes = false; } bool msg_ui_any_errors (void) { return counts[MSG_S_ERROR] > 0; } static int entrances = 0; static void ship_message (struct msg *m) { entrances++; if ( ! m->shipped ) { if (msg_handler && entrances <= 1) msg_handler (m, msg_aux); else { fwrite (m->text, 1, strlen (m->text), stderr); fwrite ("\n", 1, 1, stderr); } } m->shipped = true; entrances--; } static void submit_note (char *s) { struct msg m; m.category = MSG_C_GENERAL; m.severity = MSG_S_NOTE; m.file_name = NULL; m.first_line = 0; m.last_line = 0; m.first_column = 0; m.last_column = 0; m.text = s; m.shipped = false; ship_message (&m); free (s); } static void process_msg (struct msg *m) { int n_msgs, max_msgs; if (too_many_errors || (too_many_notes && m->severity == MSG_S_NOTE) || (warnings_off && m->severity == MSG_S_WARNING) ) return; ship_message (m); counts[m->severity]++; max_msgs = settings_get_max_messages (m->severity); n_msgs = counts[m->severity]; if (m->severity == MSG_S_WARNING) n_msgs += counts[MSG_S_ERROR]; if (n_msgs > max_msgs) { if (m->severity == MSG_S_NOTE) { too_many_notes = true; submit_note (xasprintf (_("Notes (%d) exceed limit (%d). " "Suppressing further notes."), n_msgs, max_msgs)); } else { too_many_errors = true; if (m->severity == MSG_S_WARNING) submit_note (xasprintf (_("Warnings (%d) exceed limit (%d). Syntax processing will be halted."), n_msgs, max_msgs)); else submit_note (xasprintf (_("Errors (%d) exceed limit (%d). Syntax processing will be halted."), n_msgs, max_msgs)); } } } /* Emits M as an error message. Frees allocated data in M. */ void msg_emit (struct msg *m) { m->shipped = false; if (!messages_disabled) process_msg (m); free (m->text); } /* Disables message output until the next call to msg_enable. If this function is called multiple times, msg_enable must be called an equal number of times before messages are actually re-enabled. */ void msg_disable (void) { messages_disabled++; } /* Enables message output that was disabled by msg_disable. */ void msg_enable (void) { assert (messages_disabled > 0); messages_disabled--; } /* Private functions. */ void request_bug_report (const char *msg) { fprintf (stderr, "******************************************************\n"); fprintf (stderr, "You have discovered a bug in PSPP. Please report this\n"); fprintf (stderr, "to " PACKAGE_BUGREPORT ". Please include this entire\n"); fprintf (stderr, "message, *plus* several lines of output just above it.\n"); fprintf (stderr, "For the best chance at having the bug fixed, also\n"); fprintf (stderr, "include the syntax file that triggered it and a sample\n"); fprintf (stderr, "of any data file used for input.\n"); fprintf (stderr, "proximate cause: %s\n", msg); fprintf (stderr, "version: %s\n", version); fprintf (stderr, "host_system: %s\n", host_system); fprintf (stderr, "build_system: %s\n", build_system); fprintf (stderr, "locale_dir: %s\n", locale_dir); fprintf (stderr, "compiler version: %s\n", #ifdef __VERSION__ __VERSION__ #else "Unknown" #endif ); fprintf (stderr, "******************************************************\n"); } pspp-1.0.1/src/libpspp/float-format.h0000644000175000017500000000505612476227410014433 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_FLOAT_FORMAT_H #define LIBPSPP_FLOAT_FORMAT_H 1 #include #include #include "libpspp/compiler.h" /* A floating-point format. */ enum float_format { /* IEEE 754 formats. */ FLOAT_IEEE_SINGLE_LE, /* 32 bit, little endian. */ FLOAT_IEEE_SINGLE_BE, /* 32 bit, big endian. */ FLOAT_IEEE_DOUBLE_LE, /* 64 bit, little endian. */ FLOAT_IEEE_DOUBLE_BE, /* 64 bit, big endian. */ /* VAX formats. */ FLOAT_VAX_F, /* 32 bit VAX F format. */ FLOAT_VAX_D, /* 64 bit VAX D format. */ FLOAT_VAX_G, /* 64 bit VAX G format. */ /* IBM z architecture (390) hexadecimal formats. */ FLOAT_Z_SHORT, /* 32 bit format. */ FLOAT_Z_LONG, /* 64 bit format. */ /* Formats useful for testing. */ FLOAT_FP, /* Neutral intermediate format. */ FLOAT_HEX, /* C99 hexadecimal floating constant. */ #ifdef WORDS_BIGENDIAN FLOAT_NATIVE_FLOAT = FLOAT_IEEE_SINGLE_BE, FLOAT_NATIVE_DOUBLE = FLOAT_IEEE_DOUBLE_BE, FLOAT_NATIVE_32_BIT = FLOAT_IEEE_SINGLE_BE, FLOAT_NATIVE_64_BIT = FLOAT_IEEE_DOUBLE_BE #else FLOAT_NATIVE_FLOAT = FLOAT_IEEE_SINGLE_LE, FLOAT_NATIVE_DOUBLE = FLOAT_IEEE_DOUBLE_LE, FLOAT_NATIVE_32_BIT = FLOAT_IEEE_SINGLE_LE, FLOAT_NATIVE_64_BIT = FLOAT_IEEE_DOUBLE_LE #endif }; void float_convert (enum float_format, const void *, enum float_format, void *); double float_get_double (enum float_format, const void *); size_t float_get_size (enum float_format) PURE_FUNCTION; int float_identify (double expected_value, const void *, size_t, enum float_format *best_guess); double float_get_lowest (void); #endif /* float-format.h */ pspp-1.0.1/src/libpspp/i18n.c0000644000175000017500000010225113146355723012611 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/i18n.h" #include #include #include #include #include #include #include #include #include #include #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/hmapx.h" #include "libpspp/hash-functions.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "libpspp/version.h" #include "gl/c-ctype.h" #include "gl/c-strcase.h" #include "gl/localcharset.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gl/relocatable.h" #include "gl/xstrndup.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct converter { char *tocode; char *fromcode; iconv_t conv; int null_char_width; }; static char *default_encoding; static struct hmapx map; /* A wrapper around iconv_open */ static struct converter * create_iconv (const char* tocode, const char* fromcode) { size_t hash; struct hmapx_node *node; struct converter *converter; assert (fromcode); hash = hash_string (tocode, hash_string (fromcode, 0)); HMAPX_FOR_EACH_WITH_HASH (converter, node, hash, &map) { if (!converter) return NULL; if (!strcmp (tocode, converter->tocode) && !strcmp (fromcode, converter->fromcode)) return converter; } converter = xmalloc (sizeof *converter); converter->tocode = xstrdup (tocode); converter->fromcode = xstrdup (fromcode); converter->conv = iconv_open (tocode, fromcode); int error = converter->conv == (iconv_t) ~0 ? errno : 0; /* I don't think it's safe to translate this string or to use messaging as the converters have not yet been set up */ if (error && strcmp (tocode, fromcode)) { fprintf (stderr, "Warning: " "cannot create a converter for `%s' to `%s': %s\n", fromcode, tocode, strerror (error)); free (converter->tocode); free (converter->fromcode); free (converter); hmapx_insert (&map, NULL, hash); return NULL; } /* Find out how many bytes there are in a null char in the target encoding */ iconv_t bconv = iconv_open (tocode, "ASCII"); if (bconv != (iconv_t) -1) { ICONV_CONST char *nullstr = strdup (""); ICONV_CONST char *outbuf = strdup ("XXXXXXXX"); ICONV_CONST char *snullstr = nullstr; ICONV_CONST char *soutbuf = outbuf; size_t inbytes = 1; const size_t bytes = 8; size_t outbytes = bytes; if (-1 != iconv (bconv, &nullstr, &inbytes, &outbuf, &outbytes)) converter->null_char_width = bytes - outbytes; free (snullstr); free (soutbuf); iconv_close (bconv); } hmapx_insert (&map, converter, hash); return converter; } /* Converts the single byte C from encoding FROM to TO, returning the first byte of the result. This function probably shouldn't be used at all, but some code still does use it. */ char recode_byte (const char *to, const char *from, char c) { char x; char *s = recode_string (to, from, &c, 1); x = s[0]; free (s); return x; } /* Similar to recode_string_pool, but allocates the returned value on the heap instead of in a pool. It is the caller's responsibility to free the returned value. */ char * recode_string (const char *to, const char *from, const char *text, int length) { return recode_string_pool (to, from, text, length, NULL); } /* Returns the length, in bytes, of the string that a similar recode_string() call would return. */ size_t recode_string_len (const char *to, const char *from, const char *text, int length) { char *s = recode_string (to, from, text, length); size_t len = strlen (s); free (s); return len; } /* Uses CONV to convert the INBYTES starting at IP into the OUTBYTES starting at OP, and appends a null terminator to the output. Returns the output length if successful, -1 if the output buffer is too small. */ static ssize_t try_recode (struct converter *cvtr, char fallbackchar, const char *in, size_t inbytes, char *out_, size_t outbytes) { char *out = out_; int i, j; int null_bytes = cvtr->null_char_width; /* Put the converter into the initial shift state, in case there was any state information left over from its last usage. */ iconv (cvtr->conv, NULL, 0, NULL, 0); /* Do two rounds of iconv() calls: - The first round does the bulk of the conversion using the caller-supplied input data.. - The second round flushes any leftover output. This has a real effect with input encodings that use combining diacritics, e.g. without the second round the last character tends to gets dropped when converting from windows-1258 to other encodings. */ for (i = 0; i < 2; i++) { ICONV_CONST char **inp = i ? NULL : (ICONV_CONST char **) ∈ size_t *inbytesp = i ? NULL : &inbytes; while (iconv (cvtr->conv, inp, inbytesp, &out, &outbytes) == -1) switch (errno) { case EINVAL: if (outbytes < null_bytes + 1) return -E2BIG; if (!fallbackchar) return -EINVAL; *out++ = fallbackchar; for (j = 0 ; j < null_bytes ; ++j) *out++ = '\0'; return out - 1 - out_; case EILSEQ: if (outbytes == 0) return -E2BIG; if (!fallbackchar) return -EILSEQ; *out++ = fallbackchar; outbytes--; if (inp) { in++; inbytes--; } break; case E2BIG: return -E2BIG; default: /* should never happen */ fprintf (stderr, "Character conversion error: %s\n", strerror (errno)); NOT_REACHED (); break; } } if (outbytes <= null_bytes - 1) return -E2BIG; for (i = 0 ; i < null_bytes ; ++i) *out++ = '\0'; return out - 1 - out_; } /* Converts the string TEXT, which should be encoded in FROM-encoding, to a dynamically allocated string in TO-encoding. Any characters which cannot be converted will be represented by '?'. LENGTH should be the length of the string or -1, if null terminated. The returned string will be allocated on POOL. This function's behaviour differs from that of g_convert_with_fallback provided by GLib. The GLib function will fail (returns NULL) if any part of the input string is not valid in the declared input encoding. This function however perseveres even in the presence of badly encoded input. */ char * recode_string_pool (const char *to, const char *from, const char *text, int length, struct pool *pool) { struct substring out; if ( text == NULL ) return NULL; if ( length == -1 ) length = strlen (text); out = recode_substring_pool (to, from, ss_buffer (text, length), pool); return out.string; } /* Returns the name of the encoding that should be used for file names. This is meant to be the same encoding used by g_filename_from_uri() and g_filename_to_uri() in GLib. */ static const char * filename_encoding (void) { #if defined _WIN32 || defined __WIN32__ return "UTF-8"; #else return locale_charset (); #endif } static char * xconcat2 (const char *a, size_t a_len, const char *b, size_t b_len) { char *s = xmalloc (a_len + b_len + 1); memcpy (s, a, a_len); memcpy (s + a_len, b, b_len); s[a_len + b_len] = '\0'; return s; } /* Conceptually, this function concatenates HEAD_LEN-byte string HEAD and TAIL_LEN-byte string TAIL, both encoded in UTF-8, then converts them to ENCODING. If the re-encoded result is no more than MAX_LEN bytes long, then it returns HEAD_LEN. Otherwise, it drops one character[*] from the end of HEAD and tries again, repeating as necessary until the concatenated result fits or until HEAD_LEN reaches 0. [*] Actually this function drops grapheme clusters instead of characters, so that, e.g. a Unicode character followed by a combining accent character is either completely included or completely excluded from HEAD_LEN. See UAX #29 at http://unicode.org/reports/tr29/ for more information on grapheme clusters. A null ENCODING is treated as UTF-8. Sometimes this function has to actually construct the concatenated string to measure its length. When this happens, it sets *RESULTP to that null-terminated string, allocated with malloc(), for the caller to use if it needs it. Otherwise, it sets *RESULTP to NULL. Simple examples for encoding="UTF-8", max_len=6: head="abc", tail="xyz" => 3 head="abcd", tail="xyz" => 3 ("d" dropped). head="abc", tail="uvwxyz" => 0 ("abc" dropped). head="abc", tail="tuvwxyz" => 0 ("abc" dropped). Examples for encoding="ISO-8859-1", max_len=6: head="éèä", tail="xyz" => 6 (each letter in head is only 1 byte in ISO-8859-1 even though they each take 2 bytes in UTF-8 encoding) */ static size_t utf8_encoding_concat__ (const char *head, size_t head_len, const char *tail, size_t tail_len, const char *encoding, size_t max_len, char **resultp) { *resultp = NULL; if (head_len == 0) return 0; else if (encoding == NULL || !c_strcasecmp (encoding, "UTF-8")) { if (head_len + tail_len <= max_len) return head_len; else if (tail_len >= max_len) return 0; else { size_t copy_len; ucs4_t prev; size_t ofs; int mblen; copy_len = 0; for (ofs = u8_mbtouc (&prev, CHAR_CAST (const uint8_t *, head), head_len); ofs <= max_len - tail_len; ofs += mblen) { ucs4_t next; mblen = u8_mbtouc (&next, CHAR_CAST (const uint8_t *, head + ofs), head_len - ofs); if (uc_is_grapheme_break (prev, next)) copy_len = ofs; prev = next; } return copy_len; } } else { char *result; result = (tail_len > 0 ? xconcat2 (head, head_len, tail, tail_len) : CONST_CAST (char *, head)); if (recode_string_len (encoding, "UTF-8", result, head_len + tail_len) <= max_len) { *resultp = result != head ? result : NULL; return head_len; } else { bool correct_result = false; size_t copy_len; ucs4_t prev; size_t ofs; int mblen; copy_len = 0; for (ofs = u8_mbtouc (&prev, CHAR_CAST (const uint8_t *, head), head_len); ofs <= head_len; ofs += mblen) { ucs4_t next; mblen = u8_mbtouc (&next, CHAR_CAST (const uint8_t *, head + ofs), head_len - ofs); if (uc_is_grapheme_break (prev, next)) { if (result != head) { memcpy (result, head, ofs); memcpy (result + ofs, tail, tail_len); result[ofs + tail_len] = '\0'; } if (recode_string_len (encoding, "UTF-8", result, ofs + tail_len) <= max_len) { correct_result = true; copy_len = ofs; } else correct_result = false; } prev = next; } if (result != head) { if (correct_result) *resultp = result; else free (result); } return copy_len; } } } /* Concatenates a prefix of HEAD with all of TAIL and returns the result as a null-terminated string owned by the caller. HEAD, TAIL, and the returned string are all encoded in UTF-8. As many characters[*] from the beginning of HEAD are included as will fit within MAX_LEN bytes supposing that the resulting string were to be re-encoded in ENCODING. All of TAIL is always included, even if TAIL by itself is longer than MAX_LEN in ENCODING. [*] Actually this function drops grapheme clusters instead of characters, so that, e.g. a Unicode character followed by a combining accent character is either completely included or completely excluded from the returned string. See UAX #29 at http://unicode.org/reports/tr29/ for more information on grapheme clusters. A null ENCODING is treated as UTF-8. Simple examples for encoding="UTF-8", max_len=6: head="abc", tail="xyz" => "abcxyz" head="abcd", tail="xyz" => "abcxyz" head="abc", tail="uvwxyz" => "uvwxyz" head="abc", tail="tuvwxyz" => "tuvwxyz" Examples for encoding="ISO-8859-1", max_len=6: head="éèä", tail="xyz" => "éèäxyz" (each letter in HEAD is only 1 byte in ISO-8859-1 even though they each take 2 bytes in UTF-8 encoding) */ char * utf8_encoding_concat (const char *head, const char *tail, const char *encoding, size_t max_len) { size_t tail_len = strlen (tail); size_t prefix_len; char *result; prefix_len = utf8_encoding_concat__ (head, strlen (head), tail, tail_len, encoding, max_len, &result); return (result != NULL ? result : xconcat2 (head, prefix_len, tail, tail_len)); } /* Returns the length, in bytes, of the string that would be returned by utf8_encoding_concat() if passed the same arguments, but the implementation is often more efficient. */ size_t utf8_encoding_concat_len (const char *head, const char *tail, const char *encoding, size_t max_len) { size_t tail_len = strlen (tail); size_t prefix_len; char *result; prefix_len = utf8_encoding_concat__ (head, strlen (head), tail, tail_len, encoding, max_len, &result); free (result); return prefix_len + tail_len; } /* Returns an allocated, null-terminated string, owned by the caller, containing as many characters[*] from the beginning of S that would fit within MAX_LEN bytes if the returned string were to be re-encoded in ENCODING. Both S and the returned string are encoded in UTF-8. [*] Actually this function drops grapheme clusters instead of characters, so that, e.g. a Unicode character followed by a combining accent character is either completely included or completely excluded from the returned string. See UAX #29 at http://unicode.org/reports/tr29/ for more information on grapheme clusters. A null ENCODING is treated as UTF-8. */ char * utf8_encoding_trunc (const char *s, const char *encoding, size_t max_len) { return utf8_encoding_concat (s, "", encoding, max_len); } /* Returns the length, in bytes, of the string that would be returned by utf8_encoding_trunc() if passed the same arguments, but the implementation is often more efficient. */ size_t utf8_encoding_trunc_len (const char *s, const char *encoding, size_t max_len) { return utf8_encoding_concat_len (s, "", encoding, max_len); } /* Returns FILENAME converted from UTF-8 to the filename encoding. On Windows the filename encoding is UTF-8; elsewhere it is based on the current locale. */ char * utf8_to_filename (const char *filename) { return recode_string (filename_encoding (), "UTF-8", filename, -1); } /* Returns FILENAME converted from the filename encoding to UTF-8. On Windows the filename encoding is UTF-8; elsewhere it is based on the current locale. */ char * filename_to_utf8 (const char *filename) { return recode_string ("UTF-8", filename_encoding (), filename, -1); } static int recode_substring_pool__ (const char *to, const char *from, struct substring text, char fallbackchar, struct pool *pool, struct substring *out) { size_t bufsize; struct converter *conv; if (to == NULL) to = default_encoding; if (from == NULL) from = default_encoding; conv = create_iconv (to, from); if ( NULL == conv ) { if (fallbackchar) { out->string = pool_malloc (pool, text.length + 1); out->length = text.length; memcpy (out->string, text.string, text.length); out->string[out->length] = '\0'; return 0; } else return EPROTO; } for (bufsize = text.length + 1; bufsize > text.length; bufsize *= 2) { char *output = pool_malloc (pool, bufsize); ssize_t retval; retval = try_recode (conv, fallbackchar, text.string, text.length, output, bufsize); if (retval >= 0) { *out = ss_buffer (output, retval); return 0; } pool_free (pool, output); if (retval != -E2BIG) return -retval; } NOT_REACHED (); } /* Converts the string TEXT, which should be encoded in FROM-encoding, to a dynamically allocated string in TO-encoding. Any characters which cannot be converted will be represented by '?'. The returned string will be null-terminated and allocated on POOL with pool_malloc(). This function's behaviour differs from that of g_convert_with_fallback provided by GLib. The GLib function will fail (returns NULL) if any part of the input string is not valid in the declared input encoding. This function however perseveres even in the presence of badly encoded input. */ struct substring recode_substring_pool (const char *to, const char *from, struct substring text, struct pool *pool) { struct substring out; recode_substring_pool__ (to, from, text, '?', pool, &out); return out; } /* Converts the string TEXT, which should be encoded in FROM-encoding, to a dynamically allocated string in TO-encoding. On success, returns 0, and the converted null-terminated string, allocated from POOL with pool_malloc(), is stored in *OUT. On failure, returns a positive errno value. The function fails with an error if any part of the input string is not valid in the declared input encoding. */ int recode_pedantically (const char *to, const char *from, struct substring text, struct pool *pool, struct substring *out) { int error; error = recode_substring_pool__ (to, from, text, 0, pool, out); if (error) *out = ss_empty (); return error; } void i18n_init (void) { setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, relocate(locale_dir)); textdomain (PACKAGE); assert (default_encoding == NULL); default_encoding = xstrdup (locale_charset ()); hmapx_init (&map); } const char * get_default_encoding (void) { return default_encoding; } void set_default_encoding (const char *enc) { free (default_encoding); default_encoding = xstrdup (enc); } /* Attempts to set the encoding from a locale name returns true if successful. This function does not (should not!) alter the current locale. */ bool set_encoding_from_locale (const char *loc) { bool ok = true; char *c_encoding; char *loc_encoding; char *tmp = xstrdup (setlocale (LC_CTYPE, NULL)); setlocale (LC_CTYPE, "C"); c_encoding = xstrdup (locale_charset ()); setlocale (LC_CTYPE, loc); loc_encoding = xstrdup (locale_charset ()); if ( 0 == strcmp (loc_encoding, c_encoding)) { ok = false; } setlocale (LC_CTYPE, tmp); free (tmp); if (ok) { free (default_encoding); default_encoding = loc_encoding; } else free (loc_encoding); free (c_encoding); return ok; } void i18n_done (void) { struct hmapx_node *node; struct converter *cvtr; HMAPX_FOR_EACH (cvtr, node, &map) { if (cvtr == NULL) continue; free (cvtr->tocode); free (cvtr->fromcode); if (cvtr->conv != (iconv_t) -1) iconv_close (cvtr->conv); free (cvtr); } hmapx_destroy (&map); free (default_encoding); default_encoding = NULL; } bool valid_encoding (const char *enc) { iconv_t conv = iconv_open (UTF8, enc); if ( conv == (iconv_t) -1) return false; iconv_close (conv); return true; } /* Return the system local's idea of the decimal separator character */ char get_system_decimal (void) { char radix_char; #if HAVE_NL_LANGINFO radix_char = nl_langinfo (RADIXCHAR)[0]; #else { char buf[10]; snprintf (buf, sizeof buf, "%f", 2.5); radix_char = buf[1]; } #endif return radix_char; } const char * uc_name (ucs4_t uc, char buffer[16]) { if (uc >= 0x20 && uc < 0x7f) snprintf (buffer, 16, "`%c'", uc); else snprintf (buffer, 16, "U+%04X", uc); return buffer; } /* UTF-8 functions that deal with uppercase/lowercase distinctions. */ /* Returns a hash value for the N bytes of UTF-8 encoded data starting at S, with lowercase and uppercase letters treated as equal, starting from BASIS. */ unsigned int utf8_hash_case_bytes (const char *s, size_t n, unsigned int basis) { uint8_t folded_buf[2048]; size_t folded_len = sizeof folded_buf; uint8_t *folded_s; unsigned int hash; folded_s = u8_casefold (CHAR_CAST (const uint8_t *, s), n, NULL, UNINORM_NFKD, folded_buf, &folded_len); if (folded_s != NULL) { hash = hash_bytes (folded_s, folded_len, basis); if (folded_s != folded_buf) free (folded_s); } else { if (errno == ENOMEM) xalloc_die (); hash = hash_bytes (s, n, basis); } return hash; } /* Returns a hash value for null-terminated UTF-8 string S, with lowercase and uppercase letters treated as equal, starting from BASIS. */ unsigned int utf8_hash_case_string (const char *s, unsigned int basis) { return utf8_hash_case_bytes (s, strlen (s), basis); } /* Compares UTF-8 strings A and B case-insensitively. Returns a negative value if A < B, zero if A == B, positive if A > B. */ int utf8_strcasecmp (const char *a, const char *b) { return utf8_strncasecmp (a, strlen (a), b, strlen (b)); } /* Compares UTF-8 strings A (with length AN) and B (with length BN) case-insensitively. Returns a negative value if A < B, zero if A == B, positive if A > B. */ int utf8_strncasecmp (const char *a, size_t an, const char *b, size_t bn) { int result; if (u8_casecmp (CHAR_CAST (const uint8_t *, a), an, CHAR_CAST (const uint8_t *, b), bn, NULL, UNINORM_NFKD, &result)) { if (errno == ENOMEM) xalloc_die (); result = memcmp (a, b, MIN (an, bn)); if (result == 0) result = an < bn ? -1 : an > bn; } return result; } static bool is_all_digits (const uint8_t *s, size_t len) { for (size_t i = 0; i < len; i++) if (!c_isdigit (s[i])) return false; return true; } /* Compares UTF-8 strings A and B case-insensitively. If the strings end in a number, then they are compared numerically. Returns a negative value if A < B, zero if A == B, positive if A > B. */ int utf8_strverscasecmp (const char *a, const char *b) { /* Normalize A. */ uint8_t a_stub[64]; size_t a_len = sizeof a_stub; uint8_t *a_norm = u8_casefold (CHAR_CAST (uint8_t *, a), strlen (a), NULL, UNINORM_NFKD, a_stub, &a_len); /* Normalize B. */ uint8_t b_stub[64]; size_t b_len = sizeof b_stub; uint8_t *b_norm = u8_casefold (CHAR_CAST (uint8_t *, b), strlen (b), NULL, UNINORM_NFKD, b_stub, &b_len); int result; if (!a_norm || !b_norm) { result = strcmp (a, b); goto exit; } size_t len = MIN (a_len, b_len); for (size_t i = 0; i < len; i++) if (a_norm[i] != b_norm[i]) { /* If both strings end in digits, compare them numerically. */ if (is_all_digits (&a_norm[i], a_len - i) && is_all_digits (&b_norm[i], b_len - i)) { /* Start by stripping leading zeros, since those don't matter for numerical comparison. */ size_t ap, bp; for (ap = i; ap < a_len; ap++) if (a_norm[ap] != '0') break; for (bp = i; bp < b_len; bp++) if (b_norm[bp] != '0') break; /* The number with more digits, if there is one, is larger. */ size_t a_digits = a_len - ap; size_t b_digits = b_len - bp; if (a_digits != b_digits) result = a_digits > b_digits ? 1 : -1; else result = memcmp (&a_norm[ap], &b_norm[bp], a_digits); } else result = a_norm[i] > b_norm[i] ? 1 : -1; goto exit; } result = a_len < b_len ? -1 : a_len > b_len; exit: if (a_norm != a_stub) free (a_norm); if (b_norm != b_stub) free (b_norm); return result; } static char * utf8_casemap (const char *s, uint8_t *(*f) (const uint8_t *, size_t, const char *, uninorm_t, uint8_t *, size_t *)) { char *result; size_t size; result = CHAR_CAST (char *, f (CHAR_CAST (const uint8_t *, s), strlen (s) + 1, NULL, NULL, NULL, &size)); if (result == NULL) { if (errno == ENOMEM) xalloc_die (); result = xstrdup (s); } return result; } char * utf8_to_upper (const char *s) { return utf8_casemap (s, u8_toupper); } char * utf8_to_lower (const char *s) { return utf8_casemap (s, u8_tolower); } bool get_encoding_info (struct encoding_info *e, const char *name) { const struct substring in = SS_LITERAL_INITIALIZER ( "\t\n\v\f\r " "!\"#$%&'()*+,-./0123456789:;<=>?@" "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`" "abcdefghijklmnopqrstuvwxyz{|}~"); struct substring out, cr, lf, space; bool ok; memset (e, 0, sizeof *e); cr = recode_substring_pool (name, "UTF-8", ss_cstr ("\r"), NULL); lf = recode_substring_pool (name, "UTF-8", ss_cstr ("\n"), NULL); space = recode_substring_pool (name, "UTF-8", ss_cstr (" "), NULL); ok = (cr.length >= 1 && cr.length <= MAX_UNIT && cr.length == lf.length && cr.length == space.length); if (!ok) { fprintf (stderr, "warning: encoding `%s' is not supported.\n", name); ss_dealloc (&cr); ss_dealloc (&lf); ss_dealloc (&space); ss_alloc_substring (&cr, ss_cstr ("\r")); ss_alloc_substring (&lf, ss_cstr ("\n")); ss_alloc_substring (&space, ss_cstr (" ")); } e->unit = cr.length; memcpy (e->cr, cr.string, e->unit); memcpy (e->lf, lf.string, e->unit); memcpy (e->space, space.string, e->unit); ss_dealloc (&cr); ss_dealloc (&lf); ss_dealloc (&space); out = recode_substring_pool ("UTF-8", name, in, NULL); e->is_ascii_compatible = ss_equals (in, out); ss_dealloc (&out); if (!e->is_ascii_compatible && e->unit == 1) { out = recode_substring_pool ("UTF-8", name, ss_cstr ("A"), NULL); e->is_ebcdic_compatible = (out.length == 1 && (uint8_t) out.string[0] == 0xc1); ss_dealloc (&out); } else e->is_ebcdic_compatible = false; return ok; } bool is_encoding_ascii_compatible (const char *encoding) { struct encoding_info e; get_encoding_info (&e, encoding); return e.is_ascii_compatible; } bool is_encoding_ebcdic_compatible (const char *encoding) { struct encoding_info e; get_encoding_info (&e, encoding); return e.is_ebcdic_compatible; } /* Returns true if iconv can convert ENCODING to and from UTF-8, otherwise false. */ bool is_encoding_supported (const char *encoding) { return (create_iconv ("UTF-8", encoding) && create_iconv (encoding, "UTF-8")); } /* Returns true if E is the name of a UTF-8 encoding. XXX Possibly we should test not E as a string but its properties via iconv. */ bool is_encoding_utf8 (const char *e) { return ((e[0] == 'u' || e[0] == 'U') && (e[1] == 't' || e[1] == 'T') && (e[2] == 'f' || e[2] == 'F') && ((e[3] == '8' && e[4] == '\0') || (e[3] == '-' && e[4] == '8' && e[5] == '\0'))); } static struct encoding_category *categories; static int n_categories; static void SENTINEL (0) add_category (size_t *allocated_categories, const char *category, ...) { struct encoding_category *c; const char *encodings[16]; va_list args; int i, n; /* Count encoding arguments. */ va_start (args, category); n = 0; while ((encodings[n] = va_arg (args, const char *)) != NULL) { const char *encoding = encodings[n]; if (!strcmp (encoding, "Auto") || is_encoding_supported (encoding)) n++; } assert (n < sizeof encodings / sizeof *encodings); va_end (args); if (n == 0) return; if (n_categories >= *allocated_categories) categories = x2nrealloc (categories, allocated_categories, sizeof *categories); c = &categories[n_categories++]; c->category = category; c->encodings = xmalloc (n * sizeof *c->encodings); for (i = 0; i < n; i++) c->encodings[i] = encodings[i]; c->n_encodings = n; } static void init_encoding_categories (void) { static bool inited; size_t alloc; if (inited) return; inited = true; alloc = 0; add_category (&alloc, "Unicode", "UTF-8", "UTF-16", "UTF-16BE", "UTF-16LE", "UTF-32", "UTF-32BE", "UTF-32LE", NULL_SENTINEL); add_category (&alloc, _("Arabic"), "IBM864", "ISO-8859-6", "Windows-1256", NULL_SENTINEL); add_category (&alloc, _("Armenian"), "ARMSCII-8", NULL_SENTINEL); add_category (&alloc, _("Baltic"), "ISO-8859-13", "ISO-8859-4", "Windows-1257", NULL_SENTINEL); add_category (&alloc, _("Celtic"), "ISO-8859-14", NULL_SENTINEL); add_category (&alloc, _("Central European"), "IBM852", "ISO-8859-2", "Mac-CentralEurope", "Windows-1250", NULL_SENTINEL); add_category (&alloc, _("Chinese Simplified"), "GB18030", "GB2312", "GBK", "HZ-GB-2312", "ISO-2022-CN", NULL_SENTINEL); add_category (&alloc, _("Chinese Traditional"), "Big5", "Big5-HKSCS", "EUC-TW", NULL_SENTINEL); add_category (&alloc, _("Croatian"), "MacCroatian", NULL_SENTINEL); add_category (&alloc, _("Cyrillic"), "IBM855", "ISO-8859-5", "ISO-IR-111", "KOI8-R", "MacCyrillic", NULL_SENTINEL); add_category (&alloc, _("Cyrillic/Russian"), "IBM866", NULL_SENTINEL); add_category (&alloc, _("Cyrillic/Ukrainian"), "KOI8-U", "MacUkrainian", NULL_SENTINEL); add_category (&alloc, _("Georgian"), "GEOSTD8", NULL_SENTINEL); add_category (&alloc, _("Greek"), "ISO-8859-7", "MacGreek", NULL_SENTINEL); add_category (&alloc, _("Gujarati"), "MacGujarati", NULL_SENTINEL); add_category (&alloc, _("Gurmukhi"), "MacGurmukhi", NULL_SENTINEL); add_category (&alloc, _("Hebrew"), "IBM862", "ISO-8859-8-I", "Windows-1255", NULL_SENTINEL); add_category (&alloc, _("Hebrew Visual"), "ISO-8859-8", NULL_SENTINEL); add_category (&alloc, _("Hindi"), "MacDevangari", NULL_SENTINEL); add_category (&alloc, _("Icelandic"), "MacIcelandic", NULL_SENTINEL); add_category (&alloc, _("Japanese"), "EUC-JP", "ISO-2022-JP", "Shift_JIS", NULL_SENTINEL); add_category (&alloc, _("Korean"), "EUC-KR", "ISO-2022-KR", "JOHAB", "UHC", NULL_SENTINEL); add_category (&alloc, _("Nordic"), "ISO-8859-10", NULL_SENTINEL); add_category (&alloc, _("Romanian"), "ISO-8859-16", "MacRomanian", NULL_SENTINEL); add_category (&alloc, _("South European"), "ISO-8859-3", NULL_SENTINEL); add_category (&alloc, _("Thai"), "ISO-8859-11", "TIS-620", "Windows-874", NULL_SENTINEL); add_category (&alloc, _("Turkish"), "IBM857", "ISO-8859-9", "Windows-1254", NULL_SENTINEL); add_category (&alloc, _("Vietnamese"), "TVCN", "VISCII", "VPS", "Windows-1258", NULL_SENTINEL); add_category (&alloc, _("Western European"), "ISO-8859-1", "ISO-8859-15", "Windows-1252", "IBM850", "MacRoman", NULL_SENTINEL); } /* Returns an array of "struct encoding_category" that contains only the categories and encodings that the system supports. */ struct encoding_category * get_encoding_categories (void) { init_encoding_categories (); return categories; } /* Returns the number of elements in the array returned by get_encoding_categories(). */ size_t get_n_encoding_categories (void) { init_encoding_categories (); return n_categories; } pspp-1.0.1/src/libpspp/hash-functions.c0000644000175000017500000001031412470413451014751 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/hash-functions.h" #include #include #include #include #include /* Based on http://burtleburtle.net/bob/c/lookup3.c, by Bob Jenkins , as retrieved on April 8, 2009. The license information there says the following: "You can use this free for any purpose. It's in the public domain. It has no warranty." and "You may use this code any way you wish, private, educational, or commercial. It's free." */ #define HASH_ROT(x, k) (((x) << (k)) | ((x) >> (32 - (k)))) #define HASH_MIX(a, b, c) \ do \ { \ a -= c; a ^= HASH_ROT (c, 4); c += b; \ b -= a; b ^= HASH_ROT (a, 6); a += c; \ c -= b; c ^= HASH_ROT (b, 8); b += a; \ a -= c; a ^= HASH_ROT (c, 16); c += b; \ b -= a; b ^= HASH_ROT (a, 19); a += c; \ c -= b; c ^= HASH_ROT (b, 4); b += a; \ } \ while (0) #define HASH_FINAL(a, b, c) \ do \ { \ c ^= b; c -= HASH_ROT (b, 14); \ a ^= c; a -= HASH_ROT (c, 11); \ b ^= a; b -= HASH_ROT (a, 25); \ c ^= b; c -= HASH_ROT (b, 16); \ a ^= c; a -= HASH_ROT (c, 4); \ b ^= a; b -= HASH_ROT (a, 14); \ c ^= b; c -= HASH_ROT (b, 24); \ } \ while (0) /* Returns a hash value for the N bytes starting at P, starting from BASIS. */ unsigned int hash_bytes (const void *p_, size_t n, unsigned int basis) { const uint8_t *p = p_; uint32_t a, b, c; uint32_t tmp[3]; a = b = c = 0xdeadbeef + n + basis; while (n >= 12) { memcpy (tmp, p, 12); a += tmp[0]; b += tmp[1]; c += tmp[2]; HASH_MIX (a, b, c); n -= 12; p += 12; } if (n > 0) { memset (tmp, 0, 12); memcpy (tmp, p, n); a += tmp[0]; b += tmp[1]; c += tmp[2]; } HASH_FINAL (a, b, c); return c; } /* Returns a hash value for null-terminated string S, starting from BASIS. */ unsigned int hash_string (const char *s, unsigned int basis) { return hash_bytes (s, strlen (s), basis); } /* Returns a hash value for integer X, starting from BASIS. */ unsigned int hash_int (int x, unsigned int basis) { x -= x << 6; x ^= x >> 17; x -= x << 9; x ^= x << 4; x -= x << 3; x ^= x << 10; x ^= x >> 15; return x + basis; } /* Returns a hash value for double D, starting from BASIS. */ unsigned int hash_double (double d, unsigned int basis) { if (sizeof (double) == 8) { uint32_t tmp[2]; uint32_t a, b, c; a = b = c = 0xdeadbeef + 8 + basis; memcpy (tmp, &d, 8); a += tmp[0]; b += tmp[1]; HASH_FINAL (a, b, c); return c; } else return hash_bytes (&d, sizeof d, basis); } /* Returns a hash value for pointer P, starting from BASIS. */ unsigned int hash_pointer (const void *p, unsigned int basis) { /* Casting to uintptr_t before casting to int suppresses a GCC warning about on 64-bit platforms. */ return hash_int ((int) (uintptr_t) p, basis); } pspp-1.0.1/src/libpspp/ll.h0000644000175000017500000004501012470243700012433 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Circular doubly linked lists. This header (ll.h) supplies "embedded" circular doubly linked lists. Its companion header (llx.h) supplies "external" circular doubly linked lists. The two variants are described briefly here. The embedded variant, for which this is the header, is described in slightly more detail below. Each function also has a detailed usage comment at its point of definition. The "ll" embedded linked list implementation puts the linked list node within the data structure that the list contains. This makes allocation efficient, in space and time. It also makes it easy to find the list node associated with a given object. However, it's difficult to include a given object in an arbitrary number of lists, or to include a single object in a single list in multiple positions. The "llx" external linked list implementation allocates linked list nodes separately from the objects in the list. Adding and removing linked list nodes requires dynamic allocation, so it is normally slower and takes more memory than the embedded implementation. It also requires searching the list to find the list node associated with a given object. However, it's easy to include a given object in an arbitrary number of lists, or to include a single object more than once within a single list. It's also possible to create an external linked list without adding a member to the data structure that the list contains. */ #ifndef LL_H #define LL_H #include #include #include #include "libpspp/cast.h" /* Embedded, circular doubly linked list. Each list contains a single "null" element that separates the head and the tail of the list. The null element is both before the head and after the tail of the list. An empty list contains just the null element. An embedded linked list is represented as `struct ll_list'. Each node in the list, presumably a structure type, must include a `struct ll' member. Many list functions take ranges of nodes as arguments. Ranges are "half-open"; that is, R0...R1 includes R0 but not R1. A range whose endpoints are the same (e.g. R0...R0) contains no nodes at all. Here's an example of a structure type that includes a `struct ll': struct ll_list list; struct foo { struct ll ll; // List member. int x; // Another member. }; Here's an example of iteration from head to tail: struct ll *ll; for (ll = ll_head (&list); ll != ll_null (&list); ll = ll_next (ll)) { struct foo *foo = ll_data (ll, struct foo, ll); ...do something with foo->x... } Here's another way to do it: struct ll *ll = ll_null (&list); while ((ll = ll_next (ll)) != ll_null (&list)) { struct foo *foo = ll_data (ll, struct foo, ll); ...do something with foo->x... } Here's a third way: struct foo *foo; ll_for_each (foo, struct foo, ll, &list) { ...do something with foo->x... } */ /* Returns the data structure corresponding to the given node LL, assuming that LL is embedded as the given MEMBER name in data type STRUCT. */ #define ll_data(LL, STRUCT, MEMBER) \ (CHECK_POINTER_HAS_TYPE(LL, struct ll *), \ UP_CAST(LL, STRUCT, MEMBER)) /* Linked list node. */ struct ll { struct ll *next; /* Next node. */ struct ll *prev; /* Previous node. */ }; /* Linked list. */ struct ll_list { struct ll null; /* Null node. */ }; /* Returns negative if A < B, zero if A == B, positive if A > B. */ typedef int ll_compare_func (const struct ll *a, const struct ll *b, void *aux); /* Returns true or false depending on properties of LL. */ typedef bool ll_predicate_func (const struct ll *ll, void *aux); /* Takes some action on LL. */ typedef void ll_action_func (struct ll *ll, void *aux); /* Suitable for use as the initializer for a `struct ll_list' named LIST. Typical usage: struct ll_list list = LL_INITIALIZER (list); LL_INITIALIZER() is an alternative to ll_init(). */ #define LL_INITIALIZER(LIST) { { &(LIST).null, &(LIST).null } } /* Basics. */ static inline void ll_init (struct ll_list *); static inline bool ll_is_empty (const struct ll_list *); size_t ll_count (const struct ll_list *); /* Iteration. */ static inline struct ll *ll_head (const struct ll_list *); static inline struct ll *ll_tail (const struct ll_list *); static inline struct ll *ll_null (const struct ll_list *); static inline struct ll *ll_next (const struct ll *); static inline struct ll *ll_prev (const struct ll *); /* Stack- and queue-like behavior. */ static inline void ll_push_head (struct ll_list *, struct ll *); static inline void ll_push_tail (struct ll_list *, struct ll *); static inline struct ll *ll_pop_head (struct ll_list *); static inline struct ll *ll_pop_tail (struct ll_list *); /* Insertion. */ static inline void ll_insert (struct ll *before, struct ll *new); void ll_splice (struct ll *before, struct ll *r0, struct ll *r1); void ll_swap (struct ll *a, struct ll *b); void ll_swap_range (struct ll *a0, struct ll *a1, struct ll *b0, struct ll *b1); /* Removal. */ static inline struct ll *ll_remove (struct ll *); static inline void ll_remove_range (struct ll *r0, struct ll *r1); size_t ll_remove_equal (struct ll *r0, struct ll *r1, struct ll *target, ll_compare_func *, void *aux); size_t ll_remove_if (struct ll *r0, struct ll *r1, ll_predicate_func *, void *aux); static inline void ll_moved (struct ll *); /* Non-mutating algorithms. */ struct ll *ll_find_equal (const struct ll *r0, const struct ll *r1, const struct ll *target, ll_compare_func *, void *aux); struct ll *ll_find_if (const struct ll *r0, const struct ll *r1, ll_predicate_func *, void *aux); struct ll *ll_find_adjacent_equal (const struct ll *r0, const struct ll *r1, ll_compare_func *, void *aux); size_t ll_count_range (const struct ll *r0, const struct ll *r1); size_t ll_count_equal (const struct ll *r0, const struct ll *r1, const struct ll *target, ll_compare_func *, void *aux); size_t ll_count_if (const struct ll *r0, const struct ll *r1, ll_predicate_func *, void *aux); struct ll *ll_max (const struct ll *r0, const struct ll *r1, ll_compare_func *, void *aux); struct ll *ll_min (const struct ll *r0, const struct ll *r1, ll_compare_func *, void *aux); int ll_lexicographical_compare_3way (const struct ll *a0, const struct ll *a1, const struct ll *b0, const struct ll *b1, ll_compare_func *, void *aux); /* Mutating algorithms. */ void ll_apply (struct ll *r0, struct ll *r1, ll_action_func *, void *aux); void ll_reverse (struct ll *r0, struct ll *r1); bool ll_next_permutation (struct ll *r0, struct ll *r1, ll_compare_func *, void *aux); bool ll_prev_permutation (struct ll *r0, struct ll *r1, ll_compare_func *, void *aux); /* Sorted list functions. */ void ll_sort (struct ll *r0, struct ll *r1, ll_compare_func *, void *aux); struct ll *ll_find_run (const struct ll *r0, const struct ll *r1, ll_compare_func *, void *aux); struct ll *ll_merge (struct ll *a0, struct ll *a1, struct ll *b0, struct ll *b1, ll_compare_func *, void *aux); bool ll_is_sorted (const struct ll *r0, const struct ll *r1, ll_compare_func *, void *aux); size_t ll_unique (struct ll *r0, struct ll *r1, struct ll *dups, ll_compare_func *, void *aux); void ll_sort_unique (struct ll *r0, struct ll *r1, struct ll *dups, ll_compare_func *, void *aux); void ll_insert_ordered (struct ll *r0, struct ll *r1, struct ll *new_elem, ll_compare_func *, void *aux); struct ll *ll_partition (struct ll *r0, struct ll *r1, ll_predicate_func *, void *aux); struct ll *ll_find_partition (const struct ll *r0, const struct ll *r1, ll_predicate_func *, void *aux); /* Iteration helper macros. */ /* Sets DATA to each object in LIST in turn, in forward or reverse order, assuming that each `struct ll' in LIST is embedded as the given MEMBER name in data type STRUCT. Behavior is undefined if DATA is removed from the list between loop iterations. */ #define ll_for_each(DATA, STRUCT, MEMBER, LIST) \ for (DATA = ll_head__ (STRUCT, MEMBER, LIST); \ DATA != NULL; \ DATA = ll_next__ (DATA, STRUCT, MEMBER, LIST)) #define ll_for_each_reverse(DATA, STRUCT, MEMBER, LIST) \ for (DATA = ll_tail__ (STRUCT, MEMBER, LIST); \ DATA != NULL; \ DATA = ll_prev__ (DATA, STRUCT, MEMBER, LIST)) /* Continues a iteration of LIST, starting from the object currently in DATA and continuing, in forward or reverse order, through the remainder of the list, assuming that each `struct ll' in LIST is embedded as the given MEMBER name in data type STRUCT. Behavior is undefined if DATA is removed from the list between loop iterations. */ #define ll_for_each_continue(DATA, STRUCT, MEMBER, LIST) \ for (; \ DATA != NULL; \ DATA = ll_next__ (DATA, STRUCT, MEMBER, LIST)) #define ll_for_each_reverse_continue(DATA, STRUCT, MEMBER, LIST) \ for (; \ DATA != NULL; \ DATA = ll_prev__ (DATA, STRUCT, MEMBER, LIST)) /* Sets DATA to each object in LIST in turn, in forward or reverse order, assuming that each `struct ll' in LIST is embedded as the given MEMBER name in data type STRUCT. NEXT (or PREV) must be another variable of the same type as DATA. Behavior is well-defined even if DATA is removed from the list between iterations. */ #define ll_for_each_safe(DATA, NEXT, STRUCT, MEMBER, LIST) \ for (DATA = ll_head__ (STRUCT, MEMBER, LIST); \ (DATA != NULL \ ? (NEXT = ll_next__ (DATA, STRUCT, MEMBER, LIST), 1) \ : 0); \ DATA = NEXT) #define ll_for_each_reverse_safe(DATA, PREV, STRUCT, MEMBER, LIST) \ for (DATA = ll_tail__ (STRUCT, MEMBER, LIST); \ (DATA != NULL \ ? (PREV = ll_prev__ (DATA, STRUCT, MEMBER, LIST), 1) \ : 0); \ DATA = PREV) /* Continues a iteration of LIST, in forward or reverse order, starting from the object currently in DATA and continuing forward through the remainder of the list, assuming that each `struct ll' in LIST is embedded as the given MEMBER name in data type STRUCT. NEXT (or PREV) must be another variable of the same type as DATA. Behavior is well-defined even if DATA is removed from the list between iterations. */ #define ll_for_each_safe_continue(DATA, NEXT, STRUCT, MEMBER, LIST) \ for (; \ (DATA != NULL \ ? (NEXT = ll_next__ (DATA, STRUCT, MEMBER, LIST), 1) \ : 0); \ DATA = NEXT) #define ll_for_each_safe_reverse_continue(DATA, PREV, STRUCT, MEMBER, LIST) \ for (; \ (DATA != NULL \ ? (PREV = ll_prev__ (DATA, STRUCT, MEMBER, LIST), 1) \ : 0); \ DATA = PREV) /* Sets DATA to each object in LIST in turn, in forward or reverse order, assuming that each `struct ll' in LIST is embedded as the given MEMBER name in data type STRUCT. Each object is removed from LIST before its loop iteration. */ #define ll_for_each_preremove(DATA, STRUCT, MEMBER, LIST) \ while (!ll_is_empty (LIST) \ ? (DATA = ll_data (ll_pop_head (LIST), STRUCT, MEMBER), 1) \ : 0) #define ll_for_each_reverse_preremove(DATA, STRUCT, MEMBER, LIST) \ while (!ll_is_empty (LIST) \ ? (DATA = ll_data (ll_pop_tail (LIST), STRUCT, MEMBER), 1) \ : 0) /* Sets DATA to each object in LIST in turn, in forward or reverse order, assuming that each `struct ll' in LIST is embedded as the given MEMBER name in data type STRUCT. At the end of each loop iteration, DATA is removed from the list. */ #define ll_for_each_postremove(DATA, STRUCT, MEMBER, LIST) \ for (; \ (DATA = ll_head__ (STRUCT, MEMBER, LIST)) != NULL; \ ll_remove (&DATA->MEMBER)) #define ll_for_each_reverse_postremove(DATA, STRUCT, MEMBER, LIST) \ for (; \ (DATA = ll_tail__ (STRUCT, MEMBER, LIST)) != NULL; \ ll_remove (&DATA->MEMBER)) /* Macros for internal use only. */ #define ll_data__(LL, STRUCT, MEMBER, LIST) \ ((LL) != ll_null (LIST) ? ll_data (LL, STRUCT, MEMBER) : NULL) #define ll_head__(STRUCT, MEMBER, LIST) \ ll_data__ (ll_head (LIST), STRUCT, MEMBER, LIST) #define ll_tail__(STRUCT, MEMBER, LIST) \ ll_data__ (ll_tail (LIST), STRUCT, MEMBER, LIST) #define ll_next__(DATA, STRUCT, MEMBER, LIST) \ ll_data__ (ll_next (&(DATA)->MEMBER), STRUCT, MEMBER, LIST) #define ll_prev__(DATA, STRUCT, MEMBER, LIST) \ ll_data__ (ll_prev (&(DATA)->MEMBER), STRUCT, MEMBER, LIST) /* Inline functions. */ /* Initializes LIST as an empty list. */ static inline void ll_init (struct ll_list *list) { list->null.next = list->null.prev = &list->null; } /* Returns true if LIST is empty (contains just the null node), false if LIST is not empty (has at least one other node). Executes in O(1) time. */ static inline bool ll_is_empty (const struct ll_list *list) { return ll_head (list) == ll_null (list); } /* Returns the first node in LIST, or the null node if LIST is empty. */ static inline struct ll * ll_head (const struct ll_list *list) { return ll_next (ll_null (list)); } /* Returns the last node in LIST, or the null node if LIST is empty. */ static inline struct ll * ll_tail (const struct ll_list *list) { return ll_prev (ll_null (list)); } /* Returns LIST's null node. */ static inline struct ll * ll_null (const struct ll_list *list) { return CONST_CAST (struct ll *, &list->null); } /* Returns the node following LL in its list, or the null node if LL is at the end of its list. (In an empty list, the null node follows itself.) */ static inline struct ll * ll_next (const struct ll *ll) { return ll->next; } /* Returns the node preceding LL in its list, or the null node if LL is the first node in its list. (In an empty list, the null node precedes itself.) */ static inline struct ll * ll_prev (const struct ll *ll) { return ll->prev; } /* Inserts LL at the head of LIST. */ static inline void ll_push_head (struct ll_list *list, struct ll *ll) { ll_insert (ll_head (list), ll); } /* Inserts LL at the tail of LIST. */ static inline void ll_push_tail (struct ll_list *list, struct ll *ll) { ll_insert (ll_null (list), ll); } /* Removes and returns the first node in LIST, which must not be empty. */ static inline struct ll * ll_pop_head (struct ll_list *list) { struct ll *head; assert (!ll_is_empty (list)); head = ll_head (list); ll_remove (head); return head; } /* Removes and returns the last node in LIST, which must not be empty. */ static inline struct ll * ll_pop_tail (struct ll_list *list) { struct ll *tail; assert (!ll_is_empty (list)); tail = ll_tail (list); ll_remove (tail); return tail; } /* Inserts NEW_ELEM just before BEFORE. (NEW_ELEM must not already be in a list.) */ static inline void ll_insert (struct ll *before, struct ll *new_elem) { struct ll *before_prev = ll_prev (before); new_elem->next = before; new_elem->prev = before_prev; before_prev->next = before->prev = new_elem; } /* Removes LL from its list and returns the node that formerly followed it. */ static inline struct ll * ll_remove (struct ll *ll) { struct ll *next = ll_next (ll); ll->prev->next = next; ll->next->prev = ll->prev; return next; } /* Removes R0...R1 from their list. */ static inline void ll_remove_range (struct ll *r0, struct ll *r1) { if (r0 != r1) { r1 = r1->prev; r0->prev->next = r1->next; r1->next->prev = r0->prev; } } /* Adjusts the nodes around LL to compensate for LL having changed address, e.g. due to LL being inside a block of memory that was realloc()'d. Equivalent to calling ll_remove() before moving LL, then ll_insert() afterward, but more efficient. */ static inline void ll_moved (struct ll *ll) { ll->prev->next = ll->next->prev = ll; } #endif /* ll.h */ pspp-1.0.1/src/libpspp/float-format.c0000644000175000017500000007164512470434665014443 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/float-format.h" #include #include #include #include #include #include "libpspp/assertion.h" #include "libpspp/integer-format.h" /* Neutral intermediate representation for binary floating-point numbers. */ struct fp { enum { FINITE, /* Finite number (normalized or denormalized). */ INFINITE, /* Positive or negative infinity. */ NAN, /* Not a number. */ ZERO, /* Positive or negative zero. */ MISSING, /* System missing. */ LOWEST, /* LOWEST on e.g. missing values. */ HIGHEST, /* HIGHEST on e.g. missing values. */ RESERVED /* Special Vax representation. */ } class; enum { POSITIVE, NEGATIVE } sign; /* class == FINITE: The number has value "fraction * 2**exponent", considering bit 63 in fraction to be just right of the decimal point. class == NAN: The fraction holds the significand, with its leftmost bit in bit 63, so that signaling and quiet NaN values can be preserved. Unused for other classes. */ uint64_t fraction; int exponent; }; static void extract_number (enum float_format, const void *, struct fp *); static void assemble_number (enum float_format, struct fp *, void *); static inline uint16_t get_uint16 (const void *); static inline uint32_t get_uint32 (const void *); static inline uint64_t get_uint64 (const void *); static inline void put_uint16 (uint16_t, void *); static inline void put_uint32 (uint32_t, void *); static inline void put_uint64 (uint64_t, void *); /* Converts SRC from format FROM to format TO, storing the converted value into DST. SRC and DST are permitted to arbitrarily overlap. */ void float_convert (enum float_format from, const void *src, enum float_format to, void *dst) { if (from != to) { if ((from == FLOAT_IEEE_SINGLE_LE || from == FLOAT_IEEE_SINGLE_BE) && (to == FLOAT_IEEE_SINGLE_LE || to == FLOAT_IEEE_SINGLE_BE)) put_uint32 (bswap_32 (get_uint32 (src)), dst); else if ((from == FLOAT_IEEE_DOUBLE_LE || from == FLOAT_IEEE_DOUBLE_BE) && (to == FLOAT_IEEE_DOUBLE_LE || to == FLOAT_IEEE_DOUBLE_BE)) put_uint64 (bswap_64 (get_uint64 (src)), dst); else { struct fp fp; extract_number (from, src, &fp); assemble_number (to, &fp, dst); } } else { if (src != dst) memmove (dst, src, float_get_size (from)); } } /* Converts SRC from format FROM to a native double and returns the double. */ double float_get_double (enum float_format from, const void *src) { double dst; float_convert (from, src, FLOAT_NATIVE_DOUBLE, &dst); return dst; } /* Returns the number of bytes in a number in the given FORMAT. */ size_t float_get_size (enum float_format format) { switch (format) { case FLOAT_IEEE_SINGLE_LE: case FLOAT_IEEE_SINGLE_BE: case FLOAT_VAX_F: case FLOAT_Z_SHORT: return 4; case FLOAT_IEEE_DOUBLE_LE: case FLOAT_IEEE_DOUBLE_BE: case FLOAT_VAX_D: case FLOAT_VAX_G: case FLOAT_Z_LONG: return 8; case FLOAT_FP: return sizeof (struct fp); case FLOAT_HEX: return 32; } NOT_REACHED (); } /* Attempts to identify the floating point format(s) in which the LENGTH bytes in NUMBER represent the given EXPECTED_VALUE. Returns the number of matches, which may be zero, one, or greater than one. If a positive value is returned, then the most likely candidate format (based on how common the formats are in practice) is stored in *BEST_GUESS. */ int float_identify (double expected_value, const void *number, size_t length, enum float_format *best_guess) { /* Candidates for identification in order of decreasing preference. */ enum float_format candidates[] = { FLOAT_IEEE_SINGLE_LE, FLOAT_IEEE_SINGLE_BE, FLOAT_IEEE_DOUBLE_LE, FLOAT_IEEE_DOUBLE_BE, FLOAT_VAX_F, FLOAT_VAX_D, FLOAT_VAX_G, FLOAT_Z_SHORT, FLOAT_Z_LONG, }; const size_t candidate_cnt = sizeof candidates / sizeof *candidates; enum float_format *p; int match_cnt; match_cnt = 0; for (p = candidates; p < candidates + candidate_cnt; p++) if (float_get_size (*p) == length) { char tmp[8]; assert (sizeof tmp >= float_get_size (*p)); float_convert (FLOAT_NATIVE_DOUBLE, &expected_value, *p, tmp); if (!memcmp (tmp, number, length) && match_cnt++ == 0) *best_guess = *p; } return match_cnt; } /* Returns the double value that is just greater than -DBL_MAX, which in PSPP syntax files is called LOWEST and used as the low end of numeric ranges that are supposed to be unbounded on the low end, as in the missing value set created by, e.g. MISSING VALUES X(LOWEST THRU 5). (-DBL_MAX is used for SYSMIS so it is not available for LOWEST.) */ double float_get_lowest (void) { struct fp fp; double x; fp.class = LOWEST; fp.sign = POSITIVE; assemble_number (FLOAT_NATIVE_DOUBLE, &fp, &x); return x; } /* Returns CNT bits in X starting from the given bit OFS. */ static inline uint64_t get_bits (uint64_t x, int ofs, int cnt) { assert (ofs >= 0 && ofs < 64); assert (cnt > 0 && cnt < 64); assert (ofs + cnt <= 64); return (x >> ofs) & ((UINT64_C(1) << cnt) - 1); } /* Returns the 16-bit unsigned integer at P, which need not be aligned. */ static inline uint16_t get_uint16 (const void *p) { uint16_t x; memcpy (&x, p, sizeof x); return x; } /* Returns the 32-bit unsigned integer at P, which need not be aligned. */ static inline uint32_t get_uint32 (const void *p) { uint32_t x; memcpy (&x, p, sizeof x); return x; } /* Returns the 64-bit unsigned integer at P, which need not be aligned. */ static inline uint64_t get_uint64 (const void *p) { uint64_t x; memcpy (&x, p, sizeof x); return x; } /* Stores 16-bit unsigned integer X at P, which need not be aligned. */ static inline void put_uint16 (uint16_t x, void *p) { memcpy (p, &x, sizeof x); } /* Stores 32-bit unsigned integer X at P, which need not be aligned. */ static inline void put_uint32 (uint32_t x, void *p) { memcpy (p, &x, sizeof x); } /* Stores 64-bit unsigned integer X at P, which need not be aligned. */ static inline void put_uint64 (uint64_t x, void *p) { memcpy (p, &x, sizeof x); } /* Returns NATIVE converted to a form that, when stored in memory, will be in little-endian byte order. */ static inline uint16_t native_to_le16 (uint16_t native) { return INTEGER_NATIVE == INTEGER_LSB_FIRST ? native : bswap_16 (native); } /* Returns NATIVE converted to a form that, when stored in memory, will be in big-endian byte order. */ static inline uint16_t native_to_be16 (uint16_t native) { return INTEGER_NATIVE == INTEGER_MSB_FIRST ? native : bswap_16 (native); } /* Returns NATIVE converted to a form that, when stored in memory, will be in VAX-endian byte order. */ static inline uint16_t native_to_vax16 (uint16_t native) { return native_to_le16 (native); } /* Returns NATIVE converted to a form that, when stored in memory, will be in little-endian byte order. */ static inline uint32_t native_to_le32 (uint32_t native) { return INTEGER_NATIVE == INTEGER_LSB_FIRST ? native : bswap_32 (native); } /* Returns NATIVE converted to a form that, when stored in memory, will be in big-endian byte order. */ static inline uint32_t native_to_be32 (uint32_t native) { return INTEGER_NATIVE == INTEGER_MSB_FIRST ? native : bswap_32 (native); } /* Returns NATIVE converted to a form that, when stored in memory, will be in VAX-endian byte order. */ static inline uint32_t native_to_vax32 (uint32_t native) { return native_to_be32 (((native & 0xff00ff00) >> 8) | ((native & 0x00ff00ff) << 8)); } /* Returns NATIVE converted to a form that, when stored in memory, will be in little-endian byte order. */ static inline uint64_t native_to_le64 (uint64_t native) { return INTEGER_NATIVE == INTEGER_LSB_FIRST ? native : bswap_64 (native); } /* Returns NATIVE converted to a form that, when stored in memory, will be in big-endian byte order. */ static inline uint64_t native_to_be64 (uint64_t native) { return INTEGER_NATIVE == INTEGER_MSB_FIRST ? native : bswap_64 (native); } /* Returns NATIVE converted to a form that, when stored in memory, will be in VAX-endian byte order. */ static inline uint64_t native_to_vax64 (uint64_t native) { return native_to_be64 (((native & UINT64_C(0xff00ff0000000000)) >> 40) | ((native & UINT64_C(0x00ff00ff00000000)) >> 24) | ((native & UINT64_C(0x00000000ff00ff00)) << 24) | ((native & UINT64_C(0x0000000000ff00ff)) << 40)); } /* Given LE, obtained from memory in little-endian format, returns its value. */ static inline uint16_t le_to_native16 (uint16_t le) { return INTEGER_NATIVE == INTEGER_LSB_FIRST ? le : bswap_16 (le); } /* Given BE, obtained from memory in big-endian format, returns its value. */ static inline uint16_t be_to_native16 (uint16_t be) { return INTEGER_NATIVE == INTEGER_MSB_FIRST ? be : bswap_16 (be); } /* Given VAX, obtained from memory in VAX-endian format, returns its value. */ static inline uint16_t vax_to_native16 (uint16_t vax) { return le_to_native16 (vax); } /* Given LE, obtained from memory in little-endian format, returns its value. */ static inline uint32_t le_to_native32 (uint32_t le) { return INTEGER_NATIVE == INTEGER_LSB_FIRST ? le : bswap_32 (le); } /* Given BE, obtained from memory in big-endian format, returns its value. */ static inline uint32_t be_to_native32 (uint32_t be) { return INTEGER_NATIVE == INTEGER_MSB_FIRST ? be : bswap_32 (be); } /* Given VAX, obtained from memory in VAX-endian format, returns its value. */ static inline uint32_t vax_to_native32 (uint32_t vax) { uint32_t be = be_to_native32 (vax); return ((be & 0xff00ff00) >> 8) | ((be & 0x00ff00ff) << 8); } /* Given LE, obtained from memory in little-endian format, returns its value. */ static inline uint64_t le_to_native64 (uint64_t le) { return INTEGER_NATIVE == INTEGER_LSB_FIRST ? le : bswap_64 (le); } /* Given BE, obtained from memory in big-endian format, returns its value. */ static inline uint64_t be_to_native64 (uint64_t be) { return INTEGER_NATIVE == INTEGER_MSB_FIRST ? be : bswap_64 (be); } /* Given VAX, obtained from memory in VAX-endian format, returns its value. */ static inline uint64_t vax_to_native64 (uint64_t vax) { uint64_t be = be_to_native64 (vax); return (((be & UINT64_C(0xff00ff0000000000)) >> 40) | ((be & UINT64_C(0x00ff00ff00000000)) >> 24) | ((be & UINT64_C(0x00000000ff00ff00)) << 24) | ((be & UINT64_C(0x0000000000ff00ff)) << 40)); } static void extract_ieee (uint64_t, int exp_bits, int frac_bits, struct fp *); static void extract_vax (uint64_t, int exp_bits, int frac_bits, struct fp *); static void extract_z (uint64_t, int exp_bits, int frac_bits, struct fp *); static void extract_hex (const char *, struct fp *); /* Converts the number at BITS from format TYPE into neutral format at FP. */ static void extract_number (enum float_format type, const void *bits, struct fp *fp) { switch (type) { case FLOAT_IEEE_SINGLE_LE: extract_ieee (le_to_native32 (get_uint32 (bits)), 8, 23, fp); break; case FLOAT_IEEE_SINGLE_BE: extract_ieee (be_to_native32 (get_uint32 (bits)), 8, 23, fp); break; case FLOAT_IEEE_DOUBLE_LE: extract_ieee (le_to_native64 (get_uint64 (bits)), 11, 52, fp); break; case FLOAT_IEEE_DOUBLE_BE: extract_ieee (be_to_native64 (get_uint64 (bits)), 11, 52, fp); break; case FLOAT_VAX_F: extract_vax (vax_to_native32 (get_uint32 (bits)), 8, 23, fp); break; case FLOAT_VAX_D: extract_vax (vax_to_native64 (get_uint64 (bits)), 8, 55, fp); break; case FLOAT_VAX_G: extract_vax (vax_to_native64 (get_uint64 (bits)), 11, 52, fp); break; case FLOAT_Z_SHORT: extract_z (be_to_native32 (get_uint32 (bits)), 7, 24, fp); break; case FLOAT_Z_LONG: extract_z (be_to_native64 (get_uint64 (bits)), 7, 56, fp); break; case FLOAT_FP: memcpy (fp, bits, sizeof *fp); break; case FLOAT_HEX: extract_hex (bits, fp); break; } assert (!(fp->class == FINITE && fp->fraction == 0)); } /* Converts the IEEE format number in BITS, which has EXP_BITS of exponent and FRAC_BITS of fraction, into neutral format at FP. */ static void extract_ieee (uint64_t bits, int exp_bits, int frac_bits, struct fp *fp) { const int bias = (1 << (exp_bits - 1)) - 1; const uint64_t max_raw_frac = (UINT64_C(1) << frac_bits) - 1; const int max_raw_exp = (1 << exp_bits) - 1; const uint64_t raw_frac = get_bits (bits, 0, frac_bits); const int raw_exp = get_bits (bits, frac_bits, exp_bits); const bool raw_sign = get_bits (bits, frac_bits + exp_bits, 1); if (raw_sign && raw_exp == max_raw_exp - 1 && raw_frac == max_raw_frac - 1) fp->class = LOWEST; else if (raw_exp == max_raw_exp - 1 && raw_frac == max_raw_frac) fp->class = raw_sign ? MISSING : HIGHEST; else if (raw_exp == max_raw_exp) { if (raw_frac == 0) fp->class = INFINITE; else { fp->class = NAN; fp->fraction = raw_frac << (64 - frac_bits); } } else if (raw_exp == 0) { if (raw_frac != 0) { fp->class = FINITE; fp->exponent = 1 - bias; fp->fraction = raw_frac << (64 - frac_bits); } else fp->class = ZERO; } else { fp->class = FINITE; fp->exponent = raw_exp - bias + 1; fp->fraction = (raw_frac << (64 - frac_bits - 1)) | (UINT64_C(1) << 63); } fp->sign = raw_sign ? NEGATIVE : POSITIVE; } /* Converts the VAX format number in BITS, which has EXP_BITS of exponent and FRAC_BITS of fraction, into neutral format at FP. */ static void extract_vax (uint64_t bits, int exp_bits, int frac_bits, struct fp *fp) { const int bias = 1 << (exp_bits - 1); const uint64_t max_raw_frac = (UINT64_C(1) << frac_bits) - 1; const int max_raw_exp = (1 << exp_bits) - 1; const uint64_t raw_frac = get_bits (bits, 0, frac_bits); const int raw_exp = get_bits (bits, frac_bits, exp_bits); const bool raw_sign = get_bits (bits, frac_bits + exp_bits, 1); if (raw_sign && raw_exp == max_raw_exp && raw_frac == max_raw_frac - 1) fp->class = LOWEST; else if (raw_exp == max_raw_exp && raw_frac == max_raw_frac) fp->class = raw_sign ? MISSING : HIGHEST; else if (raw_exp == 0) fp->class = raw_sign == 0 ? ZERO : RESERVED; else { fp->class = FINITE; fp->fraction = (raw_frac << (64 - frac_bits - 1)) | (UINT64_C(1) << 63); fp->exponent = raw_exp - bias; } fp->sign = raw_sign ? NEGATIVE : POSITIVE; } /* Converts the Z architecture format number in BITS, which has EXP_BITS of exponent and FRAC_BITS of fraction, into neutral format at FP. */ static void extract_z (uint64_t bits, int exp_bits, int frac_bits, struct fp *fp) { const int bias = 1 << (exp_bits - 1); const uint64_t max_raw_frac = (UINT64_C(1) << frac_bits) - 1; const int max_raw_exp = (1 << exp_bits) - 1; uint64_t raw_frac = get_bits (bits, 0, frac_bits); int raw_exp = get_bits (bits, frac_bits, exp_bits); int raw_sign = get_bits (bits, frac_bits + exp_bits, 1); fp->sign = raw_sign ? NEGATIVE : POSITIVE; if (raw_exp == max_raw_exp && raw_frac == max_raw_frac) fp->class = raw_sign ? MISSING : HIGHEST; else if (raw_sign && raw_exp == max_raw_exp && raw_frac == max_raw_frac - 1) fp->class = LOWEST; else if (raw_frac != 0) { fp->class = FINITE; fp->fraction = raw_frac << (64 - frac_bits); fp->exponent = (raw_exp - bias) * 4; } else fp->class = ZERO; } /* Returns the integer value of hex digit C. */ static int hexit_value (int c) { const char s[] = "0123456789abcdef"; const char *cp = strchr (s, tolower ((unsigned char) c)); assert (cp != NULL); return cp - s; } /* Parses a hexadecimal floating point number string at S (useful for testing) into neutral format at FP. */ static void extract_hex (const char *s, struct fp *fp) { if (*s == '-') { fp->sign = NEGATIVE; s++; } else fp->sign = POSITIVE; if (!strcmp (s, "Infinity")) fp->class = INFINITE; else if (!strcmp (s, "Missing")) fp->class = MISSING; else if (!strcmp (s, "Lowest")) fp->class = LOWEST; else if (!strcmp (s, "Highest")) fp->class = HIGHEST; else if (!strcmp (s, "Reserved")) fp->class = RESERVED; else { int offset; if (!memcmp (s, "NaN:", 4)) { fp->class = NAN; s += 4; } else fp->class = FINITE; if (*s == '.') s++; fp->exponent = 0; fp->fraction = 0; offset = 60; for (; isxdigit ((unsigned char) *s); s++) if (offset >= 0) { uint64_t digit = hexit_value (*s); fp->fraction += digit << offset; offset -= 4; } if (fp->class == FINITE) { if (fp->fraction == 0) fp->class = ZERO; else if (*s == 'p') { char *tail; fp->exponent += strtol (s + 1, &tail, 10); s = tail; } } } } static uint64_t assemble_ieee (struct fp *, int exp_bits, int frac_bits); static uint64_t assemble_vax (struct fp *, int exp_bits, int frac_bits); static uint64_t assemble_z (struct fp *, int exp_bits, int frac_bits); static void assemble_hex (struct fp *, void *); /* Converts the neutral format floating point number in FP into format TYPE at NUMBER. May modify FP as part of the process. */ static void assemble_number (enum float_format type, struct fp *fp, void *number) { switch (type) { case FLOAT_IEEE_SINGLE_LE: put_uint32 (native_to_le32 (assemble_ieee (fp, 8, 23)), number); break; case FLOAT_IEEE_SINGLE_BE: put_uint32 (native_to_be32 (assemble_ieee (fp, 8, 23)), number); break; case FLOAT_IEEE_DOUBLE_LE: put_uint64 (native_to_le64 (assemble_ieee (fp, 11, 52)), number); break; case FLOAT_IEEE_DOUBLE_BE: put_uint64 (native_to_be64 (assemble_ieee (fp, 11, 52)), number); break; case FLOAT_VAX_F: put_uint32 (native_to_vax32 (assemble_vax (fp, 8, 23)), number); break; case FLOAT_VAX_D: put_uint64 (native_to_vax64 (assemble_vax (fp, 8, 55)), number); break; case FLOAT_VAX_G: put_uint64 (native_to_vax64 (assemble_vax (fp, 11, 52)), number); break; case FLOAT_Z_SHORT: put_uint32 (native_to_be32 (assemble_z (fp, 7, 24)), number); break; case FLOAT_Z_LONG: put_uint64 (native_to_be64 (assemble_z (fp, 7, 56)), number); break; case FLOAT_FP: memcpy (number, fp, sizeof *fp); break; case FLOAT_HEX: assemble_hex (fp, number); break; } } /* Rounds off FP's fraction to FRAC_BITS bits of precision. Halfway values are rounded to even. */ static void normalize_and_round_fp (struct fp *fp, int frac_bits) { assert (fp->class == FINITE); assert (fp->fraction != 0); /* Make sure that the leading fraction bit is 1. */ while (!(fp->fraction & (UINT64_C(1) << 63))) { fp->fraction <<= 1; fp->exponent--; } if (frac_bits < 64) { uint64_t last_frac_bit = UINT64_C(1) << (64 - frac_bits); uint64_t decision_bit = last_frac_bit >> 1; if (fp->fraction & decision_bit && (fp->fraction & (decision_bit - 1) || fp->fraction & last_frac_bit)) { fp->fraction += last_frac_bit; if ((fp->fraction >> 63) == 0) { fp->fraction = UINT64_C(1) << 63; fp->exponent++; } } /* Mask off all but FRAC_BITS high-order bits. If we rounded up, then these bits no longer have meaningful values. */ fp->fraction &= ~(last_frac_bit - 1); } } /* Converts the neutral format floating point number in FP into IEEE format with EXP_BITS exponent bits and FRAC_BITS fraction bits, and returns the value. */ static uint64_t assemble_ieee (struct fp *fp, int exp_bits, int frac_bits) { const uint64_t max_raw_frac = (UINT64_C(1) << frac_bits) - 1; const int bias = (1 << (exp_bits - 1)) - 1; const int max_raw_exp = (1 << exp_bits) - 1; const int min_norm_exp = 1 - bias; const int min_denorm_exp = min_norm_exp - frac_bits; const int max_norm_exp = max_raw_exp - 1 - bias; uint64_t raw_frac; int raw_exp; bool raw_sign; raw_sign = fp->sign != POSITIVE; switch (fp->class) { case FINITE: normalize_and_round_fp (fp, frac_bits + 1); if (fp->exponent - 1 > max_norm_exp) { /* Overflow to infinity. */ raw_exp = max_raw_exp; raw_frac = 0; } else if (fp->exponent - 1 >= min_norm_exp) { /* Normal. */ raw_frac = (fp->fraction << 1) >> (64 - frac_bits); raw_exp = (fp->exponent - 1) + bias; } else if (fp->exponent - 1 >= min_denorm_exp) { /* Denormal. */ const int denorm_shift = min_norm_exp - fp->exponent; raw_frac = (fp->fraction >> (64 - frac_bits)) >> denorm_shift; raw_exp = 0; } else { /* Underflow to zero. */ raw_frac = 0; raw_exp = 0; } break; case INFINITE: raw_frac = 0; raw_exp = max_raw_exp; break; case NAN: raw_frac = fp->fraction >> (64 - frac_bits); if (raw_frac == 0) raw_frac = 1; raw_exp = max_raw_exp; break; case ZERO: raw_frac = 0; raw_exp = 0; break; case MISSING: raw_sign = 1; raw_exp = max_raw_exp - 1; raw_frac = max_raw_frac; break; case LOWEST: raw_sign = 1; raw_exp = max_raw_exp - 1; raw_frac = max_raw_frac - 1; break; case HIGHEST: raw_sign = 0; raw_exp = max_raw_exp - 1; raw_frac = max_raw_frac; break; case RESERVED: /* Convert to what processors commonly treat as signaling NAN. */ raw_frac = (UINT64_C(1) << frac_bits) - 1; raw_exp = max_raw_exp; break; default: NOT_REACHED (); } return (((uint64_t) raw_sign << (frac_bits + exp_bits)) | ((uint64_t) raw_exp << frac_bits) | raw_frac); } /* Converts the neutral format floating point number in FP into VAX format with EXP_BITS exponent bits and FRAC_BITS fraction bits, and returns the value. */ static uint64_t assemble_vax (struct fp *fp, int exp_bits, int frac_bits) { const int max_raw_exp = (1 << exp_bits) - 1; const int bias = 1 << (exp_bits - 1); const int min_finite_exp = 1 - bias; const int max_finite_exp = max_raw_exp - bias; const uint64_t max_raw_frac = (UINT64_C(1) << frac_bits) - 1; uint64_t raw_frac; int raw_exp; bool raw_sign; raw_sign = fp->sign != POSITIVE; switch (fp->class) { case FINITE: normalize_and_round_fp (fp, frac_bits + 1); if (fp->exponent > max_finite_exp) { /* Overflow to reserved operand. */ raw_sign = 1; raw_exp = 0; raw_frac = 0; } else if (fp->exponent >= min_finite_exp) { /* Finite. */ raw_frac = (fp->fraction << 1) >> (64 - frac_bits); raw_exp = fp->exponent + bias; } else { /* Underflow to zero. */ raw_sign = 0; raw_frac = 0; raw_exp = 0; } break; case INFINITE: case NAN: case RESERVED: raw_sign = 1; raw_exp = 0; raw_frac = 0; break; case ZERO: raw_sign = 0; raw_frac = 0; raw_exp = 0; break; case MISSING: raw_sign = 1; raw_exp = max_finite_exp + bias; raw_frac = max_raw_frac; break; case LOWEST: raw_sign = 1; raw_exp = max_finite_exp + bias; raw_frac = max_raw_frac - 1; break; case HIGHEST: raw_sign = 0; raw_exp = max_finite_exp + bias; raw_frac = max_raw_frac; break; default: NOT_REACHED (); } return (((uint64_t) raw_sign << (frac_bits + exp_bits)) | ((uint64_t) raw_exp << frac_bits) | raw_frac); } /* Shift right until the exponent is a multiple of 4. Rounding is not needed, because none of the formats we support has more than 53 bits of precision. That is, we never shift a 1-bit off the right end of the fraction. */ static void normalize_hex_fp (struct fp *fp) { while (fp->exponent % 4) { fp->fraction >>= 1; fp->exponent++; } } /* Converts the neutral format floating point number in FP into Z architecture format with EXP_BITS exponent bits and FRAC_BITS fraction bits, and returns the value. */ static uint64_t assemble_z (struct fp *fp, int exp_bits, int frac_bits) { const int max_raw_exp = (1 << exp_bits) - 1; const int bias = 1 << (exp_bits - 1); const int max_norm_exp = (max_raw_exp - bias) * 4; const int min_norm_exp = -bias * 4; const int min_denorm_exp = min_norm_exp - (frac_bits - 1); const uint64_t max_raw_frac = (UINT64_C(1) << frac_bits) - 1; uint64_t raw_frac; int raw_exp; int raw_sign; raw_sign = fp->sign != POSITIVE; switch (fp->class) { case FINITE: normalize_and_round_fp (fp, frac_bits); normalize_hex_fp (fp); if (fp->exponent > max_norm_exp) { /* Overflow to largest value. */ raw_exp = max_raw_exp; raw_frac = max_raw_frac; } else if (fp->exponent >= min_norm_exp) { /* Normal. */ raw_frac = fp->fraction >> (64 - frac_bits); raw_exp = (fp->exponent / 4) + bias; } else if (fp->exponent >= min_denorm_exp) { /* Denormal. */ const int denorm_shift = min_norm_exp - fp->exponent; raw_frac = (fp->fraction >> (64 - frac_bits)) >> denorm_shift; raw_exp = 0; } else { /* Underflow to zero. */ raw_frac = 0; raw_exp = 0; } break; case INFINITE: /* Overflow to largest value. */ raw_exp = max_raw_exp; raw_frac = max_raw_frac; break; case NAN: case RESERVED: case ZERO: /* Treat all of these as zero, because Z architecture doesn't have any reserved values. */ raw_exp = 0; raw_frac = 0; break; case MISSING: raw_sign = 1; raw_exp = max_raw_exp; raw_frac = max_raw_frac; break; case LOWEST: raw_sign = 1; raw_exp = max_raw_exp; raw_frac = max_raw_frac - 1; break; case HIGHEST: raw_sign = 0; raw_exp = max_raw_exp; raw_frac = max_raw_frac; break; default: NOT_REACHED (); } return (((uint64_t) raw_sign << (frac_bits + exp_bits)) | ((uint64_t) raw_exp << frac_bits) | raw_frac); } /* Converts the neutral format floating point number in FP into a null-terminated human-readable hex string in OUTPUT. */ static void assemble_hex (struct fp *fp, void *output) { char buffer[32]; char *s = buffer; if (fp->sign == NEGATIVE) *s++ = '-'; switch (fp->class) { case FINITE: normalize_and_round_fp (fp, 64); normalize_hex_fp (fp); assert (fp->fraction != 0); *s++ = '.'; while (fp->fraction != 0) { *s++ = (fp->fraction >> 60)["0123456789abcdef"]; fp->fraction <<= 4; } if (fp->exponent != 0) sprintf (s, "p%d", fp->exponent); break; case INFINITE: strcpy (s, "Infinity"); break; case NAN: sprintf (s, "NaN:%016"PRIx64, fp->fraction); break; case ZERO: strcpy (s, "0"); break; case MISSING: strcpy (buffer, "Missing"); break; case LOWEST: strcpy (buffer, "Lowest"); break; case HIGHEST: strcpy (buffer, "Highest"); break; case RESERVED: strcpy (s, "Reserved"); break; } strncpy (output, buffer, float_get_size (FLOAT_HEX)); } pspp-1.0.1/src/libpspp/range-map.h0000644000175000017500000000631512470243700013700 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_RANGE_MAP_H #define LIBPSPP_RANGE_MAP_H /* Range map data structure, implemented as a balanced binary tree. This is a dictionary data structure that maps from contiguous ranges of "unsigned long int" keys to arbitrary data values. The implementation is not robust against ranges that include ULONG_MAX in their ranges. Such ranges are difficult to deal with in C anyhow, because a range that includes 0 through ULONG_MAX inclusive has a width of ULONG_MAX + 1, which equals 0. */ #include #include "libpspp/bt.h" #include "libpspp/cast.h" /* Returns the data structure corresponding to the given NODE, assuming that NODE is embedded as the given MEMBER name in data type STRUCT. */ #define range_map_data(NODE, STRUCT, MEMBER) \ (CHECK_POINTER_HAS_TYPE (NODE, struct range_map_node *), \ UP_CAST (NODE, STRUCT, MEMBER)) /* A range map node, to be embedded in the data value. */ struct range_map_node { struct bt_node bt_node; /* Balanced tree node. */ unsigned long int start; /* Start of range. */ unsigned long int end; /* End of range, plus one. */ }; /* Returns the start of the range in the given NODE. */ static inline unsigned long int range_map_node_get_start (const struct range_map_node *node) { return node->start; } /* Returns the end of the range in the given NODE, plus one. */ static inline unsigned long int range_map_node_get_end (const struct range_map_node *node) { return node->end; } /* Returns the width of the range in the given NODE. */ static inline unsigned long int range_map_node_get_width (const struct range_map_node *node) { return node->end - node->start; } /* Range map. */ struct range_map { struct bt bt; }; void range_map_init (struct range_map *); bool range_map_is_empty (const struct range_map *); void range_map_insert (struct range_map *, unsigned long int start, unsigned long int width, struct range_map_node *new); void range_map_delete (struct range_map *, struct range_map_node *); struct range_map_node *range_map_lookup (const struct range_map *, unsigned long int position); struct range_map_node *range_map_first (const struct range_map *); struct range_map_node *range_map_next (const struct range_map *, const struct range_map_node *); #endif /* libpspp/range-map.h */ pspp-1.0.1/src/libpspp/misc.h0000644000175000017500000000453012470413451012763 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !libpspp_misc_h #define libpspp_misc_h 1 #include #include #include #define EPSILON (10 * DBL_EPSILON) /* Divides nonnegative X by positive Y, rounding up. */ #define DIV_RND_UP(X, Y) (((X) + ((Y) - 1)) / (Y)) /* Returns nonnegative difference between {nonnegative X} and {the least multiple of positive Y greater than or equal to X}. */ #define REM_RND_UP(X, Y) ((X) % (Y) ? (Y) - (X) % (Y) : 0) /* Rounds X up to the next multiple of Y. */ #define ROUND_UP(X, Y) (((X) + ((Y) - 1)) / (Y) * (Y)) /* Rounds X down to the previous multiple of Y. */ #define ROUND_DOWN(X, Y) ((X) / (Y) * (Y)) int intlog10 (unsigned); /* Returns the square of X. */ static inline double pow2 (double x) { return x * x; } /* Returns the cube of X. */ static inline double pow3 (double x) { return x * x * x; } /* Returns the fourth power of X. */ static inline double pow4 (double x) { double y = x * x; y *= y; return y; } /* Set *DEST to the lower of *DEST and SRC */ static inline void minimize (double *dest, double src) { if (src < *dest) *dest = src; } /* Set *DEST to the greater of *DEST and SRC */ static inline void maximize (double *dest, double src) { if (src > *dest) *dest = src; } /* Set *DEST to the lower of *DEST and SRC */ static inline void minimize_int (int *dest, int src) { if (src < *dest) *dest = src; } /* Set *DEST to the greater of *DEST and SRC */ static inline void maximize_int (int *dest, int src) { if (src > *dest) *dest = src; } int c_dtoastr (char *buf, size_t bufsize, int flags, int width, double x); #endif /* libpspp/misc.h */ pspp-1.0.1/src/libpspp/taint.c0000644000175000017500000002175312470243700013146 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/taint.h" #include #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "gl/xalloc.h" /* This code maintains two invariants: 1. If a node is tainted, then all of its successors are tainted. 2. If a node is tainted, then it and all of its predecessors are successor-tainted. */ /* A list of pointers to taint structures. */ struct taint_list { size_t cnt; struct taint **taints; }; static void taint_list_init (struct taint_list *); static void taint_list_destroy (struct taint_list *); static void taint_list_add (struct taint_list *, struct taint *); static void taint_list_remove (struct taint_list *, const struct taint *); /* A taint. */ struct taint { size_t ref_cnt; /* Number of owners. */ struct taint_list successors; /* Successors in graph. */ struct taint_list predecessors; /* Predecessors in graph. */ bool tainted; /* Is this node tainted? */ bool tainted_successor; /* Is/was any derived taint tainted? */ }; static void recursively_set_taint (struct taint *); static void recursively_set_tainted_successor (struct taint *); /* Creates and returns a new taint object. */ struct taint * taint_create (void) { struct taint *taint = xmalloc (sizeof *taint); taint->ref_cnt = 1; taint_list_init (&taint->successors); taint_list_init (&taint->predecessors); taint->tainted = false; taint->tainted_successor = false; return taint; } /* Returns a clone of the given TAINT. The new and old taint objects are logically indistinguishable, as if they were the same object. (In this implementation, they are in fact the same object, but this is not a guarantee made by the interface.) */ struct taint * taint_clone (const struct taint *taint_) { struct taint *taint = CONST_CAST (struct taint *, taint_); assert (taint->ref_cnt > 0); taint->ref_cnt++; return taint; } /* Destroys the given TAINT. Returns false if TAINT was tainted, true otherwise. Any propagation relationships through TAINT are preserved. That is, if A taints B and B taints C, then destroying B will preserve the transitive relationship, so that tainting A will still taint C. */ bool taint_destroy (struct taint *taint) { if ( taint ) { bool was_tainted = taint_is_tainted (taint); if (--taint->ref_cnt == 0) { size_t i, j; for (i = 0; i < taint->predecessors.cnt; i++) for (j = 0; j < taint->successors.cnt; j++) taint_propagate (taint->predecessors.taints[i], taint->successors.taints[j]); for (i = 0; i < taint->predecessors.cnt; i++) taint_list_remove (&taint->predecessors.taints[i]->successors, taint); for (i = 0; i < taint->successors.cnt; i++) taint_list_remove (&taint->successors.taints[i]->predecessors, taint); taint_list_destroy (&taint->successors); taint_list_destroy (&taint->predecessors); free (taint); } return !was_tainted; } return true; } /* Adds a propagation relationship from FROM to TO. This means that, should FROM ever become tainted, then TO will automatically be marked tainted as well. This takes effect immediately: if FROM is currently tainted, then TO will be tainted after the call completes. Taint propagation is transitive: if A propagates to B and B propagates to C, then tainting A taints both B and C. Taint propagation is not commutative: propagation from A to B does not imply propagation from B to A. Taint propagation is robust against loops, so that if A propagates to B and vice versa, whether directly or indirectly, then tainting either A or B will cause the other to be tainted, without producing an infinite loop. */ void taint_propagate (const struct taint *from_, const struct taint *to_) { struct taint *from = CONST_CAST (struct taint *, from_); struct taint *to = CONST_CAST (struct taint *, to_); if (from != to) { taint_list_add (&from->successors, to); taint_list_add (&to->predecessors, from); if (from->tainted && !to->tainted) recursively_set_taint (to); else if (to->tainted_successor && !from->tainted_successor) recursively_set_tainted_successor (from); } } /* Returns true if TAINT is tainted, false otherwise. */ bool taint_is_tainted (const struct taint *taint) { return taint->tainted; } /* Marks TAINT tainted and propagates the taint to all of its successors. */ void taint_set_taint (const struct taint *taint_) { struct taint *taint = CONST_CAST (struct taint *, taint_); if (!taint->tainted) recursively_set_taint (taint); } /* Returns true if TAINT is successor-tainted, that is, if it or any of its successors is or ever has been tainted. (A "successor" of a taint object X is any taint object that can be reached by following propagation relationships starting from X.) */ bool taint_has_tainted_successor (const struct taint *taint) { return taint->tainted_successor; } /* Attempts to reset the successor-taint on TAINT. This is successful only if TAINT currently has no tainted successor. */ void taint_reset_successor_taint (const struct taint *taint_) { struct taint *taint = CONST_CAST (struct taint *, taint_); if (taint->tainted_successor) { size_t i; for (i = 0; i < taint->successors.cnt; i++) if (taint->successors.taints[i]->tainted_successor) return; taint->tainted_successor = false; } } /* Initializes LIST as an empty list of taints. */ static void taint_list_init (struct taint_list *list) { list->cnt = 0; list->taints = NULL; } /* Destroys LIST. */ static void taint_list_destroy (struct taint_list *list) { free (list->taints); } /* Returns true if TAINT is in LIST, false otherwise. */ static bool taint_list_contains (const struct taint_list *list, const struct taint *taint) { size_t i; for (i = 0; i < list->cnt; i++) if (list->taints[i] == taint) return true; return false; } /* Returns true if X is zero or a power of 2, false otherwise. */ static bool is_zero_or_power_of_2 (size_t x) { return (x & (x - 1)) == 0; } /* Adds TAINT to LIST, if it isn't already in the list. */ static void taint_list_add (struct taint_list *list, struct taint *taint) { if (!taint_list_contains (list, taint)) { /* To save a few bytes of memory per list, we don't store the list capacity as a separate member. Instead, the list capacity is always zero or a power of 2. Thus, if the list count is one of these threshold values, we need to allocate more memory. */ if (is_zero_or_power_of_2 (list->cnt)) list->taints = xnrealloc (list->taints, list->cnt == 0 ? 1 : 2 * list->cnt, sizeof *list->taints); list->taints[list->cnt++] = taint; } } /* Removes TAINT from LIST (which must contain it). */ static void taint_list_remove (struct taint_list *list, const struct taint *taint) { size_t i; for (i = 0; i < list->cnt; i++) if (list->taints[i] == taint) { remove_element (list->taints, list->cnt, sizeof *list->taints, i); list->cnt--; return; } NOT_REACHED (); } /* Marks TAINT as tainted, as well as all of its successors recursively. Also marks TAINT's predecessors as successor-tainted, recursively. */ static void recursively_set_taint (struct taint *taint) { size_t i; taint->tainted = taint->tainted_successor = true; for (i = 0; i < taint->successors.cnt; i++) { struct taint *s = taint->successors.taints[i]; if (!s->tainted) recursively_set_taint (s); } for (i = 0; i < taint->predecessors.cnt; i++) { struct taint *p = taint->predecessors.taints[i]; if (!p->tainted_successor) recursively_set_tainted_successor (p); } } /* Marks TAINT as successor-tainted, as well as all of its predecessors recursively. */ static void recursively_set_tainted_successor (struct taint *taint) { size_t i; taint->tainted_successor = true; for (i = 0; i < taint->predecessors.cnt; i++) { struct taint *p = taint->predecessors.taints[i]; if (!p->tainted_successor) recursively_set_tainted_successor (p); } } pspp-1.0.1/src/libpspp/u8-line.h0000644000175000017500000000305712470413451013314 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_U8_LINE_H #define LIBPSPP_U8_LINE_H 1 #include "libpspp/str.h" struct pool; /* A line of text, encoded in UTF-8, with support functions that properly handle double-width characters and backspaces. Designed to make appending text fast, and access and modification of other column positions possible. */ struct u8_line { struct string s; /* Content, in UTF-8. */ size_t width; /* Display width, in character positions. */ }; void u8_line_init (struct u8_line *); void u8_line_destroy (struct u8_line *); void u8_line_clear (struct u8_line *); char *u8_line_reserve (struct u8_line *, int x0, int x1, int n); void u8_line_put (struct u8_line *, int x0, int x1, const char *s, int n); void u8_line_set_length (struct u8_line *, int x); #endif /* libpspp/u8-line.h */ pspp-1.0.1/src/libpspp/heap.c0000644000175000017500000001616312470243700012743 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifdef HAVE_CONFIG_H #include #endif #include "libpspp/heap.h" #include "libpspp/pool.h" #include "libpspp/assertion.h" #include "gl/xalloc.h" /* A heap. */ struct heap { /* Comparison function and auxiliary data. */ heap_compare_func *compare; const void *aux; /* Contents. */ struct heap_node **nodes; /* Element 0 unused, 1...CNT are the heap. */ size_t cnt; /* Number of elements in heap. */ size_t cap; /* Max CNT without allocating more memory. */ }; static inline void set_node (struct heap *, size_t idx, struct heap_node *); static inline bool less (const struct heap *, size_t a, size_t b); static bool UNUSED is_heap (const struct heap *); static inline void propagate_down (struct heap *, size_t idx); static inline bool propagate_up (struct heap *, size_t idx); /* Creates and return a new min-heap. COMPARE is used as comparison function and passed AUX as auxiliary data. To obtain a max-heap, negate the return value of the comparison function. */ struct heap * heap_create (heap_compare_func *compare, const void *aux) { struct heap *h = xmalloc (sizeof *h); h->compare = compare; h->aux = aux; h->nodes = NULL; h->cap = 0; h->cnt = 0; return h; } /* Destroys H (callback for pool). */ static void destroy_callback (void *h) { heap_destroy (h); } /* Creates and return a new min-heap and registers for its destruction with POOL. COMPARE is used as comparison function and passed AUX as auxiliary data. To obtain a max-heap, negate the return value of the comparison function. */ struct heap * heap_create_pool (struct pool *pool, heap_compare_func *compare, const void *aux) { struct heap *h = heap_create (compare, aux); pool_register (pool, destroy_callback, h); return h; } /* Destroys heap H. */ void heap_destroy (struct heap *h) { if (h != NULL) { free (h->nodes); free (h); } } /* Returns true if H is empty, false if it contains at least one element. */ bool heap_is_empty (const struct heap *h) { return h->cnt == 0; } /* Returns the number of elements in H. */ size_t heap_count (const struct heap *h) { return h->cnt; } /* Heap nodes may be moved around in memory as necessary, e.g. as the result of an realloc operation on a block that contains a heap node. Once this is done, call this function passing the NODE that was moved and its heap H before attempting any other operation on H. */ void heap_moved (struct heap *h, struct heap_node *node) { assert (node->idx <= h->cnt); h->nodes[node->idx] = node; } /* Returns the node with the minimum value in H, which must not be empty. */ struct heap_node * heap_minimum (const struct heap *h) { assert (!heap_is_empty (h)); return h->nodes[1]; } /* Inserts the given NODE into H. */ void heap_insert (struct heap *h, struct heap_node *node) { if (h->cnt >= h->cap) { h->cap = 2 * (h->cap + 8); h->nodes = xnrealloc (h->nodes, h->cap + 1, sizeof *h->nodes); } h->cnt++; set_node (h, h->cnt, node); propagate_up (h, h->cnt); expensive_assert (is_heap (h)); } /* Deletes the given NODE from H. */ void heap_delete (struct heap *h, struct heap_node *node) { assert (node->idx <= h->cnt); assert (h->nodes[node->idx] == node); if (node->idx < h->cnt) { set_node (h, node->idx, h->nodes[h->cnt--]); heap_changed (h, h->nodes[node->idx]); } else h->cnt--; } /* After client code changes the value represented by a heap node, it must use this function to update the heap structure. It is also safe (but not useful) to call this function if NODE's value has not changed. It is not safe to update more than one node's value in the heap, then to call this function for each node. Instead, update a single node's value, call this function, update another node's value, and so on. Alternatively, remove all the nodes from the heap, update their values, then re-insert all of them. */ void heap_changed (struct heap *h, struct heap_node *node) { assert (node->idx <= h->cnt); assert (h->nodes[node->idx] == node); if (!propagate_up (h, node->idx)) propagate_down (h, node->idx); expensive_assert (is_heap (h)); } static inline size_t lesser_node (const struct heap *, size_t a, size_t b); static inline void swap_nodes (struct heap *, size_t a, size_t b); /* Sets h->nodes[IDX] and updates NODE's 'idx' field accordingly. */ static void set_node (struct heap *h, size_t idx, struct heap_node *node) { h->nodes[idx] = node; h->nodes[idx]->idx = idx; } /* Moves the node with the given IDX down the heap as necessary to restore the heap property. */ static void propagate_down (struct heap *h, size_t idx) { for (;;) { size_t least; least = lesser_node (h, idx, 2 * idx); least = lesser_node (h, least, 2 * idx + 1); if (least == idx) break; swap_nodes (h, least, idx); idx = least; } } /* Moves the node with the given IDX up the heap as necessary to restore the heap property. Returns true if the node was moved, false otherwise.*/ static bool propagate_up (struct heap *h, size_t idx) { bool moved = false; for (; idx > 1 && less (h, idx, idx / 2); idx /= 2) { swap_nodes (h, idx, idx / 2); moved = true; } return moved; } /* Returns true if, in H, the node with index A has value less than the node with index B. */ static bool less (const struct heap *h, size_t a, size_t b) { return h->compare (h->nodes[a], h->nodes[b], h->aux) < 0; } /* Returns A or B according to which is the index of the node with the lesser value. B is allowed to be out of the range of valid node indexes, in which case A is returned. */ static size_t lesser_node (const struct heap *h, size_t a, size_t b) { assert (a <= h->cnt); return b > h->cnt || less (h, a, b) ? a : b; } /* Swaps, in H, the nodes with indexes A and B. */ static void swap_nodes (struct heap *h, size_t a, size_t b) { struct heap_node *t; assert (a <= h->cnt); assert (b <= h->cnt); t = h->nodes[a]; set_node (h, a, h->nodes[b]); set_node (h, b, t); } /* Returns true if H is a valid heap, false otherwise. */ static bool UNUSED is_heap (const struct heap *h) { size_t i; for (i = 2; i <= h->cnt; i++) if (less (h, i, i / 2)) return false; for (i = 1; i <= h->cnt; i++) if (h->nodes[i]->idx != i) return false; return true; } pspp-1.0.1/src/libpspp/model-checker.c0000644000175000017500000015612312470434665014545 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/model-checker.h" #include #include #include #include #include #include #include #include "libpspp/argv-parser.h" #include "libpspp/bit-vector.h" #include "libpspp/compiler.h" #include "libpspp/deque.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "gl/error.h" #include "gl/minmax.h" #include "gl/xalloc.h" /* Initializes PATH as an empty path. */ void mc_path_init (struct mc_path *path) { path->ops = NULL; path->length = 0; path->capacity = 0; } /* Copies the contents of OLD into NEW. */ void mc_path_copy (struct mc_path *new, const struct mc_path *old) { if (old->length > new->capacity) { new->capacity = old->length; free (new->ops); new->ops = xnmalloc (new->capacity, sizeof *new->ops); } new->length = old->length; memcpy (new->ops, old->ops, old->length * sizeof *new->ops); } /* Adds OP to the end of PATH. */ void mc_path_push (struct mc_path *path, int op) { if (path->length >= path->capacity) path->ops = xnrealloc (path->ops, ++path->capacity, sizeof *path->ops); path->ops[path->length++] = op; } /* Removes and returns the operation at the end of PATH. */ int mc_path_pop (struct mc_path *path) { int back = mc_path_back (path); path->length--; return back; } /* Returns the operation at the end of PATH. */ int mc_path_back (const struct mc_path *path) { assert (path->length > 0); return path->ops[path->length - 1]; } /* Destroys PATH. */ void mc_path_destroy (struct mc_path *path) { free (path->ops); path->ops = NULL; } /* Returns the operation in position INDEX in PATH. INDEX must be less than the length of PATH. */ int mc_path_get_operation (const struct mc_path *path, size_t index) { assert (index < path->length); return path->ops[index]; } /* Returns the number of operations in PATH. */ size_t mc_path_get_length (const struct mc_path *path) { return path->length; } /* Appends the operations in PATH to STRING, separating each one with a single space. */ void mc_path_to_string (const struct mc_path *path, struct string *string) { size_t i; for (i = 0; i < mc_path_get_length (path); i++) { if (i > 0) ds_put_byte (string, ' '); ds_put_format (string, "%d", mc_path_get_operation (path, i)); } } /* Search options. */ struct mc_options { /* Search strategy. */ enum mc_strategy strategy; /* Type of strategy. */ int max_depth; /* Limit on depth (or INT_MAX). */ int hash_bits; /* Number of bits to hash (or 0). */ unsigned int seed; /* Random seed for MC_RANDOM or MC_DROP_RANDOM. */ struct mc_path follow_path; /* Path for MC_PATH. */ /* Queue configuration. */ int queue_limit; /* Maximum length of queue. */ enum mc_queue_limit_strategy queue_limit_strategy; /* How to choose state to drop from queue. */ /* Stop conditions. */ int max_unique_states; /* Maximum unique states to process. */ int max_errors; /* Maximum errors to detect. */ double time_limit; /* Maximum time in seconds. */ /* Output configuration. */ int verbosity; /* 0=low, 1=normal, 2+=high. */ int failure_verbosity; /* If greater than verbosity, verbosity of error replays. */ FILE *output_file; /* File to receive output. */ /* How to report intermediate progress. */ int progress_usec; /* Microseconds between reports. */ mc_progress_func *progress_func; /* Function to call on each report. */ /* Client data. */ void *aux; }; /* Default progress function. */ bool mc_progress_dots (struct mc *mc) { if (mc_results_get_stop_reason (mc_get_results (mc)) == MC_CONTINUING) putc ('.', stderr); else putc ('\n', stderr); return true; } /* Progress function that prints a one-line summary of the current state on stderr. */ bool mc_progress_fancy (struct mc *mc) { const struct mc_results *results = mc_get_results (mc); if (mc_results_get_stop_reason (results) == MC_CONTINUING) fprintf (stderr, "Processed %d unique states, max depth %d, " "dropped %d duplicates...\r", mc_results_get_unique_state_count (results), mc_results_get_max_depth_reached (results), mc_results_get_duplicate_dropped_states (results)); else putc ('\n', stderr); return true; } /* Progress function that displays a detailed summary of the current state on stderr. */ bool mc_progress_verbose (struct mc *mc) { const struct mc_results *results = mc_get_results (mc); /* VT100 clear screen and home cursor. */ fprintf (stderr, "\033[H\033[2J"); if (mc_results_get_stop_reason (results) == MC_CONTINUING) mc_results_print (results, stderr); return true; } /* Do-nothing progress function. */ static bool null_progress (struct mc *mc UNUSED) { return true; } /* Creates and returns a set of options initialized to the defaults. */ struct mc_options * mc_options_create (void) { struct mc_options *options = xmalloc (sizeof *options); options->strategy = MC_BROAD; options->max_depth = INT_MAX; options->hash_bits = 20; options->seed = 0; mc_path_init (&options->follow_path); options->queue_limit = 10000; options->queue_limit_strategy = MC_DROP_RANDOM; options->max_unique_states = INT_MAX; options->max_errors = 1; options->time_limit = 0.0; options->verbosity = 1; options->failure_verbosity = 2; options->output_file = stdout; options->progress_usec = 250000; options->progress_func = mc_progress_dots; options->aux = NULL; return options; } /* Returns a copy of the given OPTIONS. */ struct mc_options * mc_options_clone (const struct mc_options *options) { return xmemdup (options, sizeof *options); } /* Destroys OPTIONS. */ void mc_options_destroy (struct mc_options *options) { mc_path_destroy (&options->follow_path); free (options); } /* Returns the search strategy used for OPTIONS. The choices are: - MC_BROAD (the default): Breadth-first search. First tries all the operations with depth 1, then those with depth 2, then those with depth 3, and so on. This search algorithm finds the least number of operations needed to trigger a given bug. - MC_DEEP: Depth-first search. Searches downward in the tree of states as fast as possible. Good for finding bugs that require long sequences of operations to trigger. - MC_RANDOM: Random-first search. Searches through the tree of states in random order. The standard C library's rand function selects the search path; you can control the seed passed to srand using mc_options_set_seed. - MC_PATH: Explicit path. Applies an explicitly specified sequence of operations. */ enum mc_strategy mc_options_get_strategy (const struct mc_options *options) { return options->strategy; } /* Sets the search strategy used for OPTIONS to STRATEGY. This function cannot be used to set MC_PATH as the search strategy. Use mc_options_set_follow_path instead. */ void mc_options_set_strategy (struct mc_options *options, enum mc_strategy strategy) { assert (strategy == MC_BROAD || strategy == MC_DEEP || strategy == MC_RANDOM); options->strategy = strategy; } /* Returns OPTION's random seed used by MC_RANDOM and MC_DROP_RANDOM. */ unsigned int mc_options_get_seed (const struct mc_options *options) { return options->seed; } /* Set OPTION's random seed used by MC_RANDOM and MC_DROP_RANDOM to SEED. */ void mc_options_set_seed (struct mc_options *options, unsigned int seed) { options->seed = seed; } /* Returns the maximum depth to which OPTIONS's search will descend. The initial states are at depth 1, states produced as their mutations are at depth 2, and so on. */ int mc_options_get_max_depth (const struct mc_options *options) { return options->max_depth; } /* Sets the maximum depth to which OPTIONS's search will descend to MAX_DEPTH. The initial states are at depth 1, states produced as their mutations are at depth 2, and so on. */ void mc_options_set_max_depth (struct mc_options *options, int max_depth) { options->max_depth = max_depth; } /* Returns the base-2 log of the number of bits in OPTIONS's hash table. The hash table is used for dropping states that are probably duplicates: any state with a given hash value, as will only be processed once. A return value of 0 indicates that the model checker will not discard duplicate states based on their hashes. The hash table is a power of 2 bits long, by default 2**20 bits (128 kB). Depending on how many states you expect the model checker to check, how much memory you're willing to let the hash table take up, and how worried you are about missing states due to hash collisions, you could make it larger or smaller. The "birthday paradox" points to a reasonable way to size your hash table. If you expect the model checker to check about 2**N states, then, assuming a perfect hash, you need a hash table of 2**(N+1) bits to have a 50% chance of seeing a hash collision, 2**(N+2) bits to have a 25% chance, and so on. */ int mc_options_get_hash_bits (const struct mc_options *options) { return options->hash_bits; } /* Sets the base-2 log of the number of bits in OPTIONS's hash table to HASH_BITS. A HASH_BITS value of 0 requests that the model checker not discard duplicate states based on their hashes. (This causes the model checker to never terminate in many cases.) */ void mc_options_set_hash_bits (struct mc_options *options, int hash_bits) { assert (hash_bits >= 0); options->hash_bits = MIN (hash_bits, CHAR_BIT * sizeof (unsigned int) - 1); } /* Returns the path set in OPTIONS by mc_options_set_follow_path. May be used only if the search strategy is MC_PATH. */ const struct mc_path * mc_options_get_follow_path (const struct mc_options *options) { assert (options->strategy == MC_PATH); return &options->follow_path; } /* Sets, in OPTIONS, the search algorithm to MC_PATH and the path to be the explicit path specified in FOLLOW_PATH. */ void mc_options_set_follow_path (struct mc_options *options, const struct mc_path *follow_path) { assert (mc_path_get_length (follow_path) > 0); options->strategy = MC_PATH; mc_path_copy (&options->follow_path, follow_path); } /* Returns the maximum number of queued states in OPTIONS. The default value is 10,000. The primary reason to limit the number of queued states is to conserve memory, so if you can afford the memory and your model needs more room in the queue, you can raise the limit. Conversely, if your models are large or memory is constrained, you can reduce the limit. Following the execution of the model checker, you can find out the maximum queue length during the run by calling mc_results_get_max_queue_length. */ int mc_options_get_queue_limit (const struct mc_options *options) { return options->queue_limit; } /* Sets the maximum number of queued states in OPTIONS to QUEUE_LIMIT. */ void mc_options_set_queue_limit (struct mc_options *options, int queue_limit) { assert (queue_limit > 0); options->queue_limit = queue_limit; } /* Returns the queue limit strategy used by OPTIONS, that is, when a new state must be inserted into a full state queue is full, how the state to be dropped is chosen. The choices are: - MC_DROP_NEWEST: Drop the newest state; that is, do not insert the new state into the queue at all. - MC_DROP_OLDEST: Drop the state that has been enqueued for the longest. - MC_DROP_RANDOM (the default): Drop a randomly selected state from the queue. The standard C library's rand function selects the state to drop; you can control the seed passed to srand using mc_options_set_seed. */ enum mc_queue_limit_strategy mc_options_get_queue_limit_strategy (const struct mc_options *options) { return options->queue_limit_strategy; } /* Sets the queue limit strategy used by OPTIONS to STRATEGY. This setting has no effect unless the model being checked causes the state queue to overflow (see mc_options_get_queue_limit). */ void mc_options_set_queue_limit_strategy (struct mc_options *options, enum mc_queue_limit_strategy strategy) { assert (strategy == MC_DROP_NEWEST || strategy == MC_DROP_OLDEST || strategy == MC_DROP_RANDOM); options->queue_limit_strategy = strategy; } /* Returns OPTIONS's maximum number of unique states that the model checker will examine before terminating. The default is INT_MAX. */ int mc_options_get_max_unique_states (const struct mc_options *options) { return options->max_unique_states; } /* Sets OPTIONS's maximum number of unique states that the model checker will examine before terminating to MAX_UNIQUE_STATE. */ void mc_options_set_max_unique_states (struct mc_options *options, int max_unique_states) { options->max_unique_states = max_unique_states; } /* Returns the maximum number of errors that OPTIONS will allow the model checker to encounter before terminating. The default is 1. */ int mc_options_get_max_errors (const struct mc_options *options) { return options->max_errors; } /* Sets the maximum number of errors that OPTIONS will allow the model checker to encounter before terminating to MAX_ERRORS. */ void mc_options_set_max_errors (struct mc_options *options, int max_errors) { options->max_errors = max_errors; } /* Returns the maximum amount of time, in seconds, that OPTIONS will allow the model checker to consume before terminating. The default of 0.0 means that time consumption is unlimited. */ double mc_options_get_time_limit (const struct mc_options *options) { return options->time_limit; } /* Sets the maximum amount of time, in seconds, that OPTIONS will allow the model checker to consume before terminating to TIME_LIMIT. A value of 0.0 means that time consumption is unlimited; otherwise, the return value will be positive. */ void mc_options_set_time_limit (struct mc_options *options, double time_limit) { assert (time_limit >= 0.0); options->time_limit = time_limit; } /* Returns the level of verbosity for output messages specified by OPTIONS. The default verbosity level is 1. A verbosity level of 0 inhibits all messages except for errors; a verbosity level of 1 also allows warnings; a verbosity level of 2 also causes a description of each state added to be output; a verbosity level of 3 also causes a description of each duplicate state to be output. Verbosity levels less than 0 or greater than 3 are allowed but currently have no additional effect. */ int mc_options_get_verbosity (const struct mc_options *options) { return options->verbosity; } /* Sets the level of verbosity for output messages specified by OPTIONS to VERBOSITY. */ void mc_options_set_verbosity (struct mc_options *options, int verbosity) { options->verbosity = verbosity; } /* Returns the level of verbosity for failures specified by OPTIONS. The default failure verbosity level is 2. The failure verbosity level has an effect only when an error is reported, and only when the failure verbosity level is higher than the regular verbosity level. When this is the case, the model checker replays the error path at the higher verbosity level specified. This has the effect of outputting an explicit, human-readable description of the sequence of operations that caused the error. */ int mc_options_get_failure_verbosity (const struct mc_options *options) { return options->failure_verbosity; } /* Sets the level of verbosity for failures specified by OPTIONS to FAILURE_VERBOSITY. */ void mc_options_set_failure_verbosity (struct mc_options *options, int failure_verbosity) { options->failure_verbosity = failure_verbosity; } /* Returns the output file used for messages printed by the model checker specified by OPTIONS. The default is stdout. */ FILE * mc_options_get_output_file (const struct mc_options *options) { return options->output_file; } /* Sets the output file used for messages printed by the model checker specified by OPTIONS to OUTPUT_FILE. The model checker does not automatically close the specified output file. If this is desired, the model checker's client must do so. */ void mc_options_set_output_file (struct mc_options *options, FILE *output_file) { options->output_file = output_file; } /* Returns the number of microseconds between calls to the progress function specified by OPTIONS. The default is 250,000 (1/4 second). A value of 0 disables progress reporting. */ int mc_options_get_progress_usec (const struct mc_options *options) { return options->progress_usec; } /* Sets the number of microseconds between calls to the progress function specified by OPTIONS to PROGRESS_USEC. A value of 0 disables progress reporting. */ void mc_options_set_progress_usec (struct mc_options *options, int progress_usec) { assert (progress_usec >= 0); options->progress_usec = progress_usec; } /* Returns the function called to report progress specified by OPTIONS. The function used by default prints '.' to stderr. */ mc_progress_func * mc_options_get_progress_func (const struct mc_options *options) { return options->progress_func; } /* Sets the function called to report progress specified by OPTIONS to PROGRESS_FUNC. A non-null function must be specified; to disable progress reporting, set the progress reporting interval to 0. PROGRESS_FUNC will be called zero or more times while the model checker's run is ongoing. For these calls to the progress function, mc_results_get_stop_reason will return MC_CONTINUING. It will also be called exactly once soon before mc_run returns, in which case mc_results_get_stop_reason will return a different value. */ void mc_options_set_progress_func (struct mc_options *options, mc_progress_func *progress_func) { assert (options->progress_func != NULL); options->progress_func = progress_func; } /* Returns the auxiliary data set in OPTIONS by the client. The default is a null pointer. This auxiliary data value can be retrieved by the client-specified functions in struct mc_class during a model checking run using mc_get_aux. */ void * mc_options_get_aux (const struct mc_options *options) { return options->aux; } /* Sets the auxiliary data in OPTIONS to AUX. */ void mc_options_set_aux (struct mc_options *options, void *aux) { options->aux = aux; } /* Options command-line parser. */ enum { /* Search strategies. */ OPT_STRATEGY, OPT_PATH, OPT_MAX_DEPTH, OPT_HASH_BITS, OPT_SEED, /* Queuing. */ OPT_QUEUE_LIMIT, OPT_QUEUE_DROP, /* Stop conditions. */ OPT_MAX_STATES, OPT_MAX_ERRORS, OPT_TIME_LIMIT, /* User interface. */ OPT_PROGRESS, OPT_VERBOSITY, OPT_FAILURE_VERBOSITY, }; static const struct argv_option mc_argv_options[] = { {"strategy", 0, required_argument, OPT_STRATEGY}, {"max-depth", 0, required_argument, OPT_MAX_DEPTH}, {"hash-bits", 0, required_argument, OPT_HASH_BITS}, {"path", 0, required_argument, OPT_PATH}, {"queue-limit", 0, required_argument, OPT_QUEUE_LIMIT}, {"queue-drop", 0, required_argument, OPT_QUEUE_DROP}, {"seed", 0, required_argument, OPT_SEED}, {"max-states", 0, required_argument, OPT_MAX_STATES}, {"max-errors", 0, required_argument, OPT_MAX_ERRORS}, {"time-limit", 0, required_argument, OPT_TIME_LIMIT}, {"progress", 0, required_argument, OPT_PROGRESS}, {"verbosity", 0, required_argument, OPT_VERBOSITY}, {"failure-verbosity", 0, required_argument, OPT_FAILURE_VERBOSITY}, }; enum { N_MC_ARGV_OPTIONS = sizeof mc_argv_options / sizeof *mc_argv_options }; /* Called by argv_parser_run to indicate that option ID has been parsed. */ static void mc_parser_option_callback (int id, void *mc_options_) { struct mc_options *options = mc_options_; switch (id) { case OPT_STRATEGY: if (mc_options_get_strategy (options) == MC_PATH) error (1, 0, "--strategy and --path are mutually exclusive"); if (!strcmp (optarg, "broad")) mc_options_set_strategy (options, MC_BROAD); else if (!strcmp (optarg, "deep")) mc_options_set_strategy (options, MC_DEEP); else if (!strcmp (optarg, "random")) mc_options_set_strategy (options, MC_RANDOM); else error (1, 0, "strategy must be `broad', `deep', or `random'"); break; case OPT_MAX_DEPTH: mc_options_set_max_depth (options, atoi (optarg)); break; case OPT_HASH_BITS: { int requested_hash_bits = atoi (optarg); int hash_bits; mc_options_set_hash_bits (options, requested_hash_bits); hash_bits = mc_options_get_hash_bits (options); if (hash_bits != requested_hash_bits) error (0, 0, "hash bits adjusted to %d.", hash_bits); } break; case OPT_PATH: { struct mc_path path; char *op; if (mc_options_get_strategy (options) != MC_BROAD) error (1, 0, "--strategy and --path are mutually exclusive"); mc_path_init (&path); for (op = strtok (optarg, ":, \t"); op != NULL; op = strtok (NULL, ":, \t")) mc_path_push (&path, atoi (op)); if (mc_path_get_length (&path) == 0) error (1, 0, "at least one value must be specified on --path"); mc_options_set_follow_path (options, &path); mc_path_destroy (&path); } break; case OPT_QUEUE_LIMIT: mc_options_set_queue_limit (options, atoi (optarg)); break; case OPT_QUEUE_DROP: if (!strcmp (optarg, "newest")) mc_options_set_queue_limit_strategy (options, MC_DROP_NEWEST); else if (!strcmp (optarg, "oldest")) mc_options_set_queue_limit_strategy (options, MC_DROP_OLDEST); else if (!strcmp (optarg, "random")) mc_options_set_queue_limit_strategy (options, MC_DROP_RANDOM); else error (1, 0, "--queue-drop argument must be `newest' " "`oldest' or `random'"); break; case OPT_SEED: mc_options_set_seed (options, atoi (optarg)); break; case OPT_MAX_STATES: mc_options_set_max_unique_states (options, atoi (optarg)); break; case OPT_MAX_ERRORS: mc_options_set_max_errors (options, atoi (optarg)); break; case OPT_TIME_LIMIT: mc_options_set_time_limit (options, atof (optarg)); break; case OPT_PROGRESS: if (!strcmp (optarg, "none")) mc_options_set_progress_usec (options, 0); else if (!strcmp (optarg, "dots")) mc_options_set_progress_func (options, mc_progress_dots); else if (!strcmp (optarg, "fancy")) mc_options_set_progress_func (options, mc_progress_fancy); else if (!strcmp (optarg, "verbose")) mc_options_set_progress_func (options, mc_progress_verbose); break; case OPT_VERBOSITY: mc_options_set_verbosity (options, atoi (optarg)); break; case OPT_FAILURE_VERBOSITY: mc_options_set_failure_verbosity (options, atoi (optarg)); break; default: NOT_REACHED (); } } /* Adds the model checker command line options to the specified command line PARSER. Model checker options parsed from the command line will be applied to OPTIONS. */ void mc_options_register_argv_parser (struct mc_options *options, struct argv_parser *parser) { argv_parser_add_options (parser, mc_argv_options, N_MC_ARGV_OPTIONS, mc_parser_option_callback, options); } /* Prints a reference for the model checker command line options to stdout. */ void mc_options_usage (void) { fputs ( "\nModel checker search algorithm options:\n" " --strategy=STRATEGY Basic search strategy. One of:\n" " broad: breadth-first search (default)\n" " deep: depth-first search\n" " random: randomly ordered search\n" " --path=#[,#]... Fixes the exact search path to follow;\n" " mutually exclusive with --strategy\n" " --max-depth=MAX Limits search depth to MAX. The initial\n" " states are at depth 1.\n" " --hash-bits=BITS Use 2**BITS size hash table to avoid\n" " duplicate states (0 will disable hashing)\n" " --seed=SEED Sets the random number seed\n" "\nModel checker queuing options:\n" " --queue-limit=N Limit queue to N states (default: 10000)\n" " --queue-drop=TYPE How to drop states when queue overflows:\n" " newest: drop most recently added state\n" " oldest: drop least recently added state\n" " random (default): drop a random state\n" "\nModel checker stop condition options:\n" " --max-states=N Stop after visiting N unique states\n" " --max-errors=N Stop after N errors (default: 1)\n" " --time-limit=SECS Stop after SECS seconds\n" "\nModel checker user interface options:\n" " --progress=TYPE Show progress according to TYPE. One of:\n" " none: Do not output progress message\n" " dots (default): Output lines of dots\n" " fancy: Show a few stats\n" " verbose: Show all available stats\n" " --verbosity=LEVEL Verbosity level before an error (default: 1)\n" " --failure-verbosity=LEVEL Verbosity level for replaying failure\n" " cases (default: 2)\n", stdout); } /* Results of a model checking run. */ struct mc_results { /* Overall results. */ enum mc_stop_reason stop_reason; /* Why the run ended. */ int unique_state_count; /* Number of unique states checked. */ int error_count; /* Number of errors found. */ /* Depth statistics. */ int max_depth_reached; /* Max depth state examined. */ unsigned long int depth_sum; /* Sum of depths. */ int n_depths; /* Number of depths in depth_sum. */ /* If error_count > 0, path to the last error reported. */ struct mc_path error_path; /* States dropped... */ int duplicate_dropped_states; /* ...as duplicates. */ int off_path_dropped_states; /* ...as off-path (MC_PATH only). */ int depth_dropped_states; /* ...due to excessive depth. */ int queue_dropped_states; /* ...due to queue overflow. */ /* Queue statistics. */ int queued_unprocessed_states; /* Enqueued but never dequeued. */ int max_queue_length; /* Maximum queue length observed. */ /* Timing. */ struct timeval start; /* Start of model checking run. */ struct timeval end; /* End of model checking run. */ }; /* Creates, initializes, and returns a new set of results. */ static struct mc_results * mc_results_create (void) { struct mc_results *results = xcalloc (1, sizeof (struct mc_results)); results->stop_reason = MC_CONTINUING; gettimeofday (&results->start, NULL); return results; } /* Destroys RESULTS. */ void mc_results_destroy (struct mc_results *results) { if (results != NULL) { mc_path_destroy (&results->error_path); free (results); } } /* Returns RESULTS's reason that the model checking run terminated. The possible reasons are: - MC_CONTINUING: The run is not actually yet complete. This can only be returned before mc_run has returned, e.g. when the progress function set by mc_options_set_progress_func examines the run's results. - MC_SUCCESS: The run completed because the queue emptied. The entire state space might not have been explored due to a requested limit on maximum depth, hash collisions, etc. - MC_MAX_UNIQUE_STATES: The run completed because as many unique states have been checked as were requested (using mc_options_set_max_unique_states). - MC_MAX_ERROR_COUNT: The run completed because the maximum requested number of errors (by default, 1 error) was reached. - MC_END_OF_PATH: The run completed because the path specified with mc_options_set_follow_path was fully traversed. - MC_TIMEOUT: The run completed because the time limit set with mc_options_set_time_limit was exceeded. - MC_INTERRUPTED: The run completed because SIGINT was caught (typically, due to the user typing Ctrl+C). */ enum mc_stop_reason mc_results_get_stop_reason (const struct mc_results *results) { return results->stop_reason; } /* Returns the number of unique states checked specified by RESULTS. */ int mc_results_get_unique_state_count (const struct mc_results *results) { return results->unique_state_count; } /* Returns the number of errors found specified by RESULTS. */ int mc_results_get_error_count (const struct mc_results *results) { return results->error_count; } /* Returns the maximum depth reached during the model checker run represented by RESULTS. The initial states are at depth 1, their child states at depth 2, and so on. */ int mc_results_get_max_depth_reached (const struct mc_results *results) { return results->max_depth_reached; } /* Returns the mean depth reached during the model checker run represented by RESULTS. */ double mc_results_get_mean_depth_reached (const struct mc_results *results) { return (results->n_depths == 0 ? 0 : (double) results->depth_sum / results->n_depths); } /* Returns the path traversed to obtain the last error encountered during the model checker run represented by RESULTS. Returns a null pointer if the run did not report any errors. */ const struct mc_path * mc_results_get_error_path (const struct mc_results *results) { return results->error_count > 0 ? &results->error_path : NULL; } /* Returns the number of states dropped as duplicates (based on hash value) during the model checker run represented by RESULTS. */ int mc_results_get_duplicate_dropped_states (const struct mc_results *results) { return results->duplicate_dropped_states; } /* Returns the number of states dropped because they were off the path specified by mc_options_set_follow_path during the model checker run represented by RESULTS. A nonzero value here indicates a missing call to mc_include_state in the client-supplied mutation function. */ int mc_results_get_off_path_dropped_states (const struct mc_results *results) { return results->off_path_dropped_states; } /* Returns the number of states dropped because their depth exceeded the maximum specified with mc_options_set_max_depth during the model checker run represented by RESULTS. */ int mc_results_get_depth_dropped_states (const struct mc_results *results) { return results->depth_dropped_states; } /* Returns the number of states dropped from the queue due to queue overflow during the model checker run represented by RESULTS. */ int mc_results_get_queue_dropped_states (const struct mc_results *results) { return results->queue_dropped_states; } /* Returns the number of states that were checked and enqueued but never dequeued and processed during the model checker run represented by RESULTS. This is zero if the stop reason is MC_CONTINUING or MC_SUCCESS; otherwise, it is the number of states in the queue at the time that the checking run stopped. */ int mc_results_get_queued_unprocessed_states (const struct mc_results *results) { return results->queued_unprocessed_states; } /* Returns the maximum length of the queue during the model checker run represented by RESULTS. If this is equal to the maximum queue length, then the queue (probably) overflowed during the run; otherwise, it did not overflow. */ int mc_results_get_max_queue_length (const struct mc_results *results) { return results->max_queue_length; } /* Returns the time at which the model checker run represented by RESULTS started. */ struct timeval mc_results_get_start (const struct mc_results *results) { return results->start; } /* Returns the time at which the model checker run represented by RESULTS ended. (This function may not be called while the run is still ongoing.) */ struct timeval mc_results_get_end (const struct mc_results *results) { assert (results->stop_reason != MC_CONTINUING); return results->end; } /* Returns the number of seconds obtained by subtracting time Y from time X. */ static double timeval_subtract (struct timeval x, struct timeval y) { /* From libc.info. */ double difference; /* Perform the carry for the later subtraction by updating Y. */ if (x.tv_usec < y.tv_usec) { int nsec = (y.tv_usec - x.tv_usec) / 1000000 + 1; y.tv_usec -= 1000000 * nsec; y.tv_sec += nsec; } if (x.tv_usec - y.tv_usec > 1000000) { int nsec = (x.tv_usec - y.tv_usec) / 1000000; y.tv_usec += 1000000 * nsec; y.tv_sec -= nsec; } /* Compute the time remaining to wait. `tv_usec' is certainly positive. */ difference = (x.tv_sec - y.tv_sec) + (x.tv_usec - y.tv_usec) / 1000000.0; if (x.tv_sec < y.tv_sec) difference = -difference; return difference; } /* Returns the duration, in seconds, of the model checker run represented by RESULTS. (This function may not be called while the run is still ongoing.) */ double mc_results_get_duration (const struct mc_results *results) { assert (results->stop_reason != MC_CONTINUING); return timeval_subtract (results->end, results->start); } /* Prints a description of RESULTS to stream F. */ void mc_results_print (const struct mc_results *results, FILE *f) { enum mc_stop_reason reason = mc_results_get_stop_reason (results); if (reason != MC_CONTINUING) fprintf (f, "Stopped by: %s\n", reason == MC_SUCCESS ? "state space exhaustion" : reason == MC_MAX_UNIQUE_STATES ? "reaching max unique states" : reason == MC_MAX_ERROR_COUNT ? "reaching max error count" : reason == MC_END_OF_PATH ? "reached end of specified path" : reason == MC_TIMEOUT ? "reaching time limit" : reason == MC_INTERRUPTED ? "user interruption" : "unknown reason"); fprintf (f, "Errors found: %d\n\n", mc_results_get_error_count (results)); fprintf (f, "Unique states checked: %d\n", mc_results_get_unique_state_count (results)); fprintf (f, "Maximum depth reached: %d\n", mc_results_get_max_depth_reached (results)); fprintf (f, "Mean depth reached: %.2f\n\n", mc_results_get_mean_depth_reached (results)); fprintf (f, "Dropped duplicate states: %d\n", mc_results_get_duplicate_dropped_states (results)); fprintf (f, "Dropped off-path states: %d\n", mc_results_get_off_path_dropped_states (results)); fprintf (f, "Dropped too-deep states: %d\n", mc_results_get_depth_dropped_states (results)); fprintf (f, "Dropped queue-overflow states: %d\n", mc_results_get_queue_dropped_states (results)); fprintf (f, "Checked states still queued when stopped: %d\n", mc_results_get_queued_unprocessed_states (results)); fprintf (f, "Maximum queue length reached: %d\n", mc_results_get_max_queue_length (results)); if (reason != MC_CONTINUING) fprintf (f, "\nRuntime: %.2f seconds\n", mc_results_get_duration (results)); } /* An active model checking run. */ struct mc { /* Related data structures. */ const struct mc_class *class; struct mc_options *options; struct mc_results *results; /* Array of 2**(options->hash_bits) bits representing states already visited. */ unsigned char *hash; /* State queue. */ struct mc_state **queue; /* Array of pointers to states. */ struct deque queue_deque; /* Deque. */ /* State currently being built by "init" or "mutate". */ struct mc_path path; /* Path to current state. */ struct string path_string; /* Buffer for path_string function. */ bool state_named; /* mc_name_operation called? */ bool state_error; /* mc_error called? */ /* Statistics for calling the progress function. */ unsigned int progress; /* Current progress value. */ unsigned int next_progress; /* Next value to call progress func. */ unsigned int prev_progress; /* Last value progress func called. */ struct timeval prev_progress_time; /* Last time progress func called. */ /* Information for handling and restoring SIGINT. */ bool interrupted; /* SIGINT received? */ bool *saved_interrupted_ptr; /* Saved value of interrupted_ptr. */ void (*saved_sigint) (int); /* Saved SIGINT handler. */ }; /* A state in the queue. */ struct mc_state { struct mc_path path; /* Path to this state. */ void *data; /* Client-supplied data. */ }; /* Points to the current struct mc's "interrupted" member. */ static bool *interrupted_ptr = NULL; static const char *path_string (struct mc *); static void free_state (const struct mc *, struct mc_state *); static void stop (struct mc *, enum mc_stop_reason); static struct mc_state *make_state (const struct mc *, void *); static size_t random_queue_index (struct mc *); static void enqueue_state (struct mc *, struct mc_state *); static void do_error_state (struct mc *); static void next_operation (struct mc *); static bool is_off_path (const struct mc *); static void sigint_handler (int signum); static void init_mc (struct mc *, const struct mc_class *, struct mc_options *); static void finish_mc (struct mc *); /* Runs the model checker on the client-specified CLASS with the client-specified OPTIONS. OPTIONS may be a null pointer if the defaults are acceptable. Destroys OPTIONS; use mc_options_clone if a copy is needed. Returns the results of the model checking run, which must be destroyed by the client with mc_results_destroy. To pass auxiliary data to the functions in CLASS, use mc_options_set_aux on OPTIONS, which may be retrieved from the CLASS functions using mc_get_aux. */ struct mc_results * mc_run (const struct mc_class *class, struct mc_options *options) { struct mc mc; init_mc (&mc, class, options); while (!deque_is_empty (&mc.queue_deque) && mc.results->stop_reason == MC_CONTINUING) { struct mc_state *state = mc.queue[deque_pop_front (&mc.queue_deque)]; mc_path_copy (&mc.path, &state->path); mc_path_push (&mc.path, 0); class->mutate (&mc, state->data); free_state (&mc, state); if (mc.interrupted) stop (&mc, MC_INTERRUPTED); } finish_mc (&mc); return mc.results; } /* Tests whether the current operation is one that should be performed, checked, and enqueued. If so, returns true. Otherwise, returns false and, unless checking is stopped, advances to the next state. The caller should then advance to the next operation. This function should be called from the client-provided "mutate" function, according to the pattern explained in the big comment at the top of model-checker.h. */ bool mc_include_state (struct mc *mc) { if (mc->results->stop_reason != MC_CONTINUING) return false; else if (is_off_path (mc)) { next_operation (mc); return false; } else return true; } /* Tests whether HASH represents a state that has (probably) already been enqueued. If not, returns false and marks HASH so that it will be treated as a duplicate in the future. If so, returns true and advances to the next state. The caller should then advance to the next operation. This function should be called from the client-provided "mutate" function, according to the pattern explained in the big comment at the top of model-checker.h. */ bool mc_discard_dup_state (struct mc *mc, unsigned int hash) { if (!mc->state_error && mc->options->hash_bits > 0) { hash &= (1u << mc->options->hash_bits) - 1; if (TEST_BIT (mc->hash, hash)) { if (mc->options->verbosity > 2) fprintf (mc->options->output_file, " [%s] discard duplicate state\n", path_string (mc)); mc->results->duplicate_dropped_states++; next_operation (mc); return true; } SET_BIT (mc->hash, hash); } return false; } /* Names the current state NAME, which may contain printf-style format specifications. NAME should be a human-readable name for the current operation. This function should be called from the client-provided "mutate" function, according to the pattern explained in the big comment at the top of model-checker.h. */ void mc_name_operation (struct mc *mc, const char *name, ...) { va_list args; va_start (args, name); mc_vname_operation (mc, name, args); va_end (args); } /* Names the current state NAME, which may contain printf-style format specifications, for which the corresponding arguments must be given in ARGS. NAME should be a human-readable name for the current operation. This function should be called from the client-provided "mutate" function, according to the pattern explained in the big comment at the top of model-checker.h. */ void mc_vname_operation (struct mc *mc, const char *name, va_list args) { if (mc->state_named && mc->options->verbosity > 0) fprintf (mc->options->output_file, " [%s] warning: duplicate call " "to mc_name_operation (missing call to mc_add_state?)\n", path_string (mc)); mc->state_named = true; if (mc->options->verbosity > 1) { fprintf (mc->options->output_file, " [%s] ", path_string (mc)); vfprintf (mc->options->output_file, name, args); putc ('\n', mc->options->output_file); } } /* Reports the given error MESSAGE for the current operation. The resulting state should still be passed to mc_add_state when all relevant error messages have been issued. The state will not, however, be enqueued for later mutation of its own. By default, model checking stops after the first error encountered. This function should be called from the client-provided "mutate" function, according to the pattern explained in the big comment at the top of model-checker.h. */ void mc_error (struct mc *mc, const char *message, ...) { va_list args; if (mc->results->stop_reason != MC_CONTINUING) return; if (mc->options->verbosity > 1) fputs (" ", mc->options->output_file); fprintf (mc->options->output_file, "[%s] error: ", path_string (mc)); va_start (args, message); vfprintf (mc->options->output_file, message, args); va_end (args); putc ('\n', mc->options->output_file); mc->state_error = true; } /* Enqueues DATA as the state corresponding to the current operation. The operation should have been named with a call to mc_name_operation, and it should have been checked by the caller (who should have reported any errors with mc_error). This function should be called from the client-provided "mutate" function, according to the pattern explained in the big comment at the top of model-checker.h. */ void mc_add_state (struct mc *mc, void *data) { if (!mc->state_named && mc->options->verbosity > 0) fprintf (mc->options->output_file, " [%s] warning: unnamed state\n", path_string (mc)); if (mc->results->stop_reason != MC_CONTINUING) { /* Nothing to do. */ } else if (mc->state_error) do_error_state (mc); else if (is_off_path (mc)) mc->results->off_path_dropped_states++; else if (mc->path.length + 1 > mc->options->max_depth) mc->results->depth_dropped_states++; else { /* This is the common case. */ mc->results->unique_state_count++; if (mc->results->unique_state_count >= mc->options->max_unique_states) stop (mc, MC_MAX_UNIQUE_STATES); enqueue_state (mc, make_state (mc, data)); next_operation (mc); return; } mc->class->destroy (mc, data); next_operation (mc); } /* Returns the options that were passed to mc_run for model checker MC. */ const struct mc_options * mc_get_options (const struct mc *mc) { return mc->options; } /* Returns the current state of the results for model checker MC. This function is appropriate for use from the progress function set by mc_options_set_progress_func. Not all of the results are meaningful before model checking completes. */ const struct mc_results * mc_get_results (const struct mc *mc) { return mc->results; } /* Returns the auxiliary data set on the options passed to mc_run with mc_options_set_aux. */ void * mc_get_aux (const struct mc *mc) { return mc_options_get_aux (mc_get_options (mc)); } /* Expresses MC->path as a string and returns the string. */ static const char * path_string (struct mc *mc) { ds_clear (&mc->path_string); mc_path_to_string (&mc->path, &mc->path_string); return ds_cstr (&mc->path_string); } /* Frees STATE, including client data. */ static void free_state (const struct mc *mc, struct mc_state *state) { mc->class->destroy (mc, state->data); mc_path_destroy (&state->path); free (state); } /* Sets STOP_REASON as the reason that MC's processing stopped, unless MC is already stopped. */ static void stop (struct mc *mc, enum mc_stop_reason stop_reason) { if (mc->results->stop_reason == MC_CONTINUING) mc->results->stop_reason = stop_reason; } /* Creates and returns a new state whose path is copied from MC->path and whose data is specified by DATA. */ static struct mc_state * make_state (const struct mc *mc, void *data) { struct mc_state *new = xmalloc (sizeof *new); mc_path_init (&new->path); mc_path_copy (&new->path, &mc->path); new->data = data; return new; } /* Returns the index in MC->queue of a random element in the queue. */ static size_t random_queue_index (struct mc *mc) { assert (!deque_is_empty (&mc->queue_deque)); return deque_front (&mc->queue_deque, rand () % deque_count (&mc->queue_deque)); } /* Adds NEW to MC's state queue, dropping a state if necessary due to overflow. */ static void enqueue_state (struct mc *mc, struct mc_state *new) { size_t idx; if (new->path.length > mc->results->max_depth_reached) mc->results->max_depth_reached = new->path.length; mc->results->depth_sum += new->path.length; mc->results->n_depths++; if (deque_count (&mc->queue_deque) < mc->options->queue_limit) { /* Add new state to queue. */ if (deque_is_full (&mc->queue_deque)) mc->queue = deque_expand (&mc->queue_deque, mc->queue, sizeof *mc->queue); switch (mc->options->strategy) { case MC_BROAD: idx = deque_push_back (&mc->queue_deque); break; case MC_DEEP: idx = deque_push_front (&mc->queue_deque); break; case MC_RANDOM: if (!deque_is_empty (&mc->queue_deque)) { idx = random_queue_index (mc); mc->queue[deque_push_front (&mc->queue_deque)] = mc->queue[idx]; } else idx = deque_push_front (&mc->queue_deque); break; case MC_PATH: assert (deque_is_empty (&mc->queue_deque)); assert (!is_off_path (mc)); idx = deque_push_back (&mc->queue_deque); if (mc->path.length >= mc_path_get_length (&mc->options->follow_path)) stop (mc, MC_END_OF_PATH); break; default: NOT_REACHED (); } if (deque_count (&mc->queue_deque) > mc->results->max_queue_length) mc->results->max_queue_length = deque_count (&mc->queue_deque); } else { /* Queue has reached limit, so replace an existing state. */ assert (mc->options->strategy != MC_PATH); assert (!deque_is_empty (&mc->queue_deque)); mc->results->queue_dropped_states++; switch (mc->options->queue_limit_strategy) { case MC_DROP_NEWEST: free_state (mc, new); return; case MC_DROP_OLDEST: switch (mc->options->strategy) { case MC_BROAD: idx = deque_front (&mc->queue_deque, 0); break; case MC_DEEP: idx = deque_back (&mc->queue_deque, 0); break; case MC_RANDOM: case MC_PATH: default: NOT_REACHED (); } break; case MC_DROP_RANDOM: idx = random_queue_index (mc); break; default: NOT_REACHED (); } free_state (mc, mc->queue[idx]); } mc->queue[idx] = new; } /* Process an error state being added to MC. */ static void do_error_state (struct mc *mc) { mc->results->error_count++; if (mc->results->error_count >= mc->options->max_errors) stop (mc, MC_MAX_ERROR_COUNT); mc_path_copy (&mc->results->error_path, &mc->path); if (mc->options->failure_verbosity > mc->options->verbosity) { struct mc_options *path_options; fprintf (mc->options->output_file, "[%s] retracing error path:\n", path_string (mc)); path_options = mc_options_clone (mc->options); mc_options_set_verbosity (path_options, mc->options->failure_verbosity); mc_options_set_failure_verbosity (path_options, 0); mc_options_set_follow_path (path_options, &mc->path); mc_results_destroy (mc_run (mc->class, path_options)); putc ('\n', mc->options->output_file); } } /* Advances MC to start processing the operation following the current one. */ static void next_operation (struct mc *mc) { mc_path_push (&mc->path, mc_path_pop (&mc->path) + 1); mc->state_error = false; mc->state_named = false; if (++mc->progress >= mc->next_progress) { struct timeval now; double elapsed, delta; if (mc->results->stop_reason == MC_CONTINUING && !mc->options->progress_func (mc)) stop (mc, MC_INTERRUPTED); gettimeofday (&now, NULL); if (mc->options->time_limit > 0.0 && (timeval_subtract (now, mc->results->start) > mc->options->time_limit)) stop (mc, MC_TIMEOUT); elapsed = timeval_subtract (now, mc->prev_progress_time); if (elapsed > 0.0) { /* Re-estimate the amount of progress to take progress_usec microseconds. */ unsigned int progress = mc->progress - mc->prev_progress; double progress_sec = mc->options->progress_usec / 1000000.0; delta = progress / elapsed * progress_sec; } else { /* No measurable time at all elapsed during that amount of progress. Try doubling the amount of progress required. */ delta = (mc->progress - mc->prev_progress) * 2; } if (delta > 0.0 && delta + mc->progress + 1.0 < UINT_MAX) mc->next_progress = mc->progress + delta + 1.0; else mc->next_progress = mc->progress + (mc->progress - mc->prev_progress); mc->prev_progress = mc->progress; mc->prev_progress_time = now; } } /* Returns true if we're tracing an explicit path but the current operation produces a state off that path, false otherwise. */ static bool is_off_path (const struct mc *mc) { return (mc->options->strategy == MC_PATH && (mc_path_back (&mc->path) != mc_path_get_operation (&mc->options->follow_path, mc->path.length - 1))); } /* Handler for SIGINT. */ static void sigint_handler (int signum UNUSED) { /* Just mark the model checker as interrupted. */ *interrupted_ptr = true; } /* Initializes MC as a model checker with the given CLASS and OPTIONS. OPTIONS may be null to use the default options. */ static void init_mc (struct mc *mc, const struct mc_class *class, struct mc_options *options) { /* Validate and adjust OPTIONS. */ if (options == NULL) options = mc_options_create (); assert (options->queue_limit_strategy != MC_DROP_OLDEST || options->strategy != MC_RANDOM); if (options->strategy == MC_PATH) { options->max_depth = INT_MAX; options->hash_bits = 0; } if (options->progress_usec == 0) { options->progress_func = null_progress; if (options->time_limit > 0.0) options->progress_usec = 250000; } /* Initialize MC. */ mc->class = class; mc->options = options; mc->results = mc_results_create (); mc->hash = (mc->options->hash_bits > 0 ? xcalloc (1, DIV_RND_UP (1 << mc->options->hash_bits, CHAR_BIT)) : NULL); mc->queue = NULL; deque_init_null (&mc->queue_deque); mc_path_init (&mc->path); mc_path_push (&mc->path, 0); ds_init_empty (&mc->path_string); mc->state_named = false; mc->state_error = false; mc->progress = 0; mc->next_progress = mc->options->progress_usec != 0 ? 100 : UINT_MAX; mc->prev_progress = 0; mc->prev_progress_time = mc->results->start; if (mc->options->strategy == MC_RANDOM || options->queue_limit_strategy == MC_DROP_RANDOM) srand (mc->options->seed); mc->interrupted = false; mc->saved_interrupted_ptr = interrupted_ptr; interrupted_ptr = &mc->interrupted; mc->saved_sigint = signal (SIGINT, sigint_handler); class->init (mc); } /* Complete the model checker run for MC. */ static void finish_mc (struct mc *mc) { /* Restore signal handlers. */ signal (SIGINT, mc->saved_sigint); interrupted_ptr = mc->saved_interrupted_ptr; /* Mark the run complete. */ stop (mc, MC_SUCCESS); gettimeofday (&mc->results->end, NULL); /* Empty the queue. */ mc->results->queued_unprocessed_states = deque_count (&mc->queue_deque); while (!deque_is_empty (&mc->queue_deque)) { struct mc_state *state = mc->queue[deque_pop_front (&mc->queue_deque)]; free_state (mc, state); } /* Notify the progress function of completion. */ mc->options->progress_func (mc); /* Free memory. */ mc_path_destroy (&mc->path); ds_destroy (&mc->path_string); mc_options_destroy (mc->options); free (mc->queue); free (mc->hash); } pspp-1.0.1/src/libpspp/copyleft.h0000644000175000017500000000157712470242642013667 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !copyleft_h #define copyleft_h 1 extern const char lack_of_warranty[]; extern const char copyleft[]; extern const char legal[]; #endif pspp-1.0.1/src/libpspp/cast.h0000644000175000017500000001230112470243700012753 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_CAST_H #define LIBPSPP_CAST_H 1 #include #include "gl/verify.h" /* Expands to a void expression that checks that POINTER is an expression whose type is a qualified or unqualified version of a type compatible with TYPE (a pointer type) and, if not, causes a compiler warning to be issued (on typical compilers). Examples: int *ip; const int *cip; const int **cipp; int ***ippp; double *dp; // None of these causes a warning: CHECK_POINTER_HAS_TYPE (ip, int *); CHECK_POINTER_HAS_TYPE (ip, const int *); CHECK_POINTER_HAS_TYPE (cip, int *); CHECK_POINTER_HAS_TYPE (cip, const int *); CHECK_POINTER_HAS_TYPE (dp, double *); CHECK_POINTER_HAS_TYPE (dp, const double *); CHECK_POINTER_HAS_TYPE (cipp, const int **); CHECK_POINTER_HAS_TYPE (cipp, const int *const *); CHECK_POINTER_HAS_TYPE (ippp, int ***); CHECK_POINTER_HAS_TYPE (ippp, int **const *); // None of these causes a warning either, although it is unusual to // const-qualify a pointer like this (it's like declaring a "const int", // for example). CHECK_POINTER_HAS_TYPE (ip, int *const); CHECK_POINTER_HAS_TYPE (ip, const int *const); CHECK_POINTER_HAS_TYPE (cip, int *const); CHECK_POINTER_HAS_TYPE (cip, const int *const); CHECK_POINTER_HAS_TYPE (cipp, const int **const); CHECK_POINTER_HAS_TYPE (cipp, const int *const *const); CHECK_POINTER_HAS_TYPE (ippp, int ***const); CHECK_POINTER_HAS_TYPE (ippp, int **const *const); // Provokes a warning because "int" is not compatible with "double": CHECK_POINTER_HAS_TYPE (dp, int *); // Provoke warnings because C's type compatibility rules only allow // adding a "const" qualifier to the outermost pointer: CHECK_POINTER_HAS_TYPE (ippp, const int ***); CHECK_POINTER_HAS_TYPE (ippp, int *const**); */ #define CHECK_POINTER_HAS_TYPE(POINTER, TYPE) \ ((void) sizeof ((TYPE) (POINTER) == (POINTER))) /* Given expressions A and B, both of which have pointer type, expands to a void expression that causes a compiler warning if A and B are not pointers to qualified or unqualified versions of compatible types. Examples similar to those given for CHECK_POINTER_HAS_TYPE, above, can easily be devised. */ #define CHECK_POINTER_COMPATIBILITY(A, B) ((void) sizeof ((A) == (B))) /* Equivalent to casting POINTER to TYPE, but also issues a warning if the cast changes anything other than an outermost "const" or "volatile" qualifier. */ #define CONST_CAST(TYPE, POINTER) \ (CHECK_POINTER_HAS_TYPE (POINTER, TYPE), \ (TYPE) (POINTER)) /* Casts POINTER to TYPE. Yields a compiler diagnostic if either TYPE or POINTER is not a pointer to character type. PSPP uses "unsigned char" (actually uint8_t) in "union value" and "char" elsewhere to emphasize that data in union value usually requires reencoding when transferred to and from other string types. These macros suppress the warning when implicitly converting between pointers to different character types, so their use normally marks a bug that should eventually be fixed. However, until these bugs are fixed, suppressing the warnings is much less annoying. Use CHAR_CAST_BUG if you think there is a bug to be fixed, or if you have not yet carefully examined the situation, or if you are not sure. Use CHAR_CAST if you are convinced that this is actually a correct cast. */ #define CHAR_CAST(TYPE, POINTER) \ ((void) verify_expr (sizeof (*(POINTER)) == 1, 1), \ (void) (sizeof (*(POINTER) + 1)), \ (void) verify_expr (sizeof (*(TYPE) NULL) == 1, 1), \ (void) (sizeof (*(TYPE) NULL + 1)), \ (TYPE) (POINTER)) #define CHAR_CAST_BUG(TYPE, POINTER) CHAR_CAST(TYPE, POINTER) /* Given POINTER, a pointer to the given MEMBER within structure STRUCT, returns the address of the STRUCT. */ #define UP_CAST(POINTER, STRUCT, MEMBER) \ (CHECK_POINTER_COMPATIBILITY (&((STRUCT *) 0)->MEMBER, POINTER), \ (STRUCT *) ((char *) (POINTER) - offsetof (STRUCT, MEMBER))) /* A null pointer constant suitable for use in a varargs parameter list. This is useful because a literal 0 may not have the same width as a null pointer. NULL by itself is also insufficient because in C it may expand to simply 0. */ #define NULL_SENTINEL ((void *) NULL) #endif /* libpspp/cast.h */ pspp-1.0.1/src/libpspp/freaderror.h0000644000175000017500000000161412470242642014165 00000000000000/* Detect read error on a stream. Copyright (C) 2003-2005, 2006 Free Software Foundation, Inc. Written by Bruno Haible , 2003. Modified by Ben Pfaff for PSPP. 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 . */ #include extern int freaderror (FILE *fp); pspp-1.0.1/src/libpspp/pool.h0000644000175000017500000000776312470242642013016 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2000, 2006, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !pool_h #define pool_h 1 #include #include #include #include "compiler.h" /* Maximum size of a suballocated block. Larger blocks are allocated directly with malloc() to avoid memory wastage at the end of a suballocation block. */ #ifndef MAX_SUBALLOC #define MAX_SUBALLOC 64 #endif /* Records the state of a pool for later restoration. */ struct pool_mark { /* Current block and offset into it. */ struct pool_block *block; size_t ofs; /* Current serial number to allow freeing of gizmos. */ long serial; }; /* General routines. */ struct pool *pool_create (void); void pool_destroy (struct pool *); void pool_clear (struct pool *); /* Creates a pool, allocates an instance of the given STRUCT within it, sets the struct's MEMBER to the pool's address, and returns the allocated structure. */ #define pool_create_container(STRUCT, MEMBER) \ ((STRUCT *) pool_create_at_offset (sizeof (STRUCT), \ offsetof (STRUCT, MEMBER))) void *pool_create_at_offset (size_t struct_size, size_t pool_member_offset); /* Suballocation routines. */ void *pool_alloc (struct pool *, size_t) MALLOC_LIKE; void *pool_nalloc (struct pool *, size_t n, size_t s) MALLOC_LIKE; void *pool_clone (struct pool *, const void *, size_t) MALLOC_LIKE; void *pool_alloc_unaligned (struct pool *, size_t) MALLOC_LIKE; void *pool_clone_unaligned (struct pool *, const void *, size_t) MALLOC_LIKE; char *pool_strdup (struct pool *, const char *) MALLOC_LIKE; char *pool_strdup0 (struct pool *, const char *, size_t) MALLOC_LIKE; char *pool_vasprintf (struct pool *, const char *, va_list) MALLOC_LIKE PRINTF_FORMAT (2, 0); char *pool_asprintf (struct pool *, const char *, ...) MALLOC_LIKE PRINTF_FORMAT (2, 3); /* Standard allocation routines. */ void *pool_malloc (struct pool *, size_t) MALLOC_LIKE; void *pool_nmalloc (struct pool *, size_t n, size_t s) MALLOC_LIKE; void *pool_zalloc (struct pool *, size_t) MALLOC_LIKE; void *pool_calloc (struct pool *, size_t n, size_t s) MALLOC_LIKE; void *pool_realloc (struct pool *, void *, size_t); void *pool_nrealloc (struct pool *, void *, size_t n, size_t s); void *pool_2nrealloc (struct pool *, void *, size_t *pn, size_t s); void pool_free (struct pool *, void *); /* Subpools. */ struct pool *pool_create_subpool (struct pool *); void pool_add_subpool (struct pool *, struct pool *subpool); /* Files. */ FILE *pool_fopen (struct pool *, const char *, const char *); int pool_fclose (struct pool *, FILE *) WARN_UNUSED_RESULT; void pool_attach_file (struct pool *, FILE *); void pool_detach_file (struct pool *, FILE *); /* Temporary files. */ FILE *pool_create_temp_file (struct pool *); void pool_fclose_temp_file (struct pool *, FILE *); void pool_attach_temp_file (struct pool *, FILE *); void pool_detach_temp_file (struct pool *, FILE *); /* Custom allocations. */ void pool_register (struct pool *, void (*free) (void *), void *p); bool pool_unregister (struct pool *, void *); /* Partial freeing. */ void pool_mark (struct pool *, struct pool_mark *); void pool_release (struct pool *, const struct pool_mark *); #if DEBUGGING void pool_dump (const struct pool *, const char *title); #endif #endif /* pool.h */ pspp-1.0.1/src/libpspp/tower.h0000644000175000017500000001140712470243700013167 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* "Tower" data structure, implemented as an augmented binary tree. Imagine a tall stack of books on a table; actually, call it a "tower" of books because "stack" is already taken. If you're careful enough and strong enough, you can pull individual books out of the stack, as well as insert new books between existing ones or at the bottom or top of the stack. At any given time, you can refer to a book in the tower by measuring the book's height above the tower in some unit, e.g. mm. This isn't necessarily equivalent to the number of books in the tower below the book in question, like an array index, because the books in the stack aren't necessarily all the same thickness: some might be as thin as K&R and others as thick as _Introduction to Algorithms_. This is the analogy behind this data structure. Each node in the data structure has a "thickness", which is actually called the node's "size" because "thickness" is just too awkward a name. The primary way to look up nodes is by a height from the bottom of the tower; any height within a node retrieves that node, not just the distance to the bottom of the node. You can insert a new node between any two existing nodes, or at either end, which shifts up the height of all the nodes above it. You can also delete any node, which shifts down the height of all the nodes above it. The tower data structure also implements efficient access to nodes by index, i.e. by 0-based count of nodes from the bottom of the tower. */ #ifndef LIBPSPP_TOWER_H #define LIBPSPP_TOWER_H #include #include "libpspp/abt.h" #include "libpspp/cast.h" /* Returns the data structure corresponding to the given NODE, assuming that NODE is embedded as the given MEMBER name in data type STRUCT. */ #define tower_data(NODE, STRUCT, MEMBER) \ (CHECK_POINTER_HAS_TYPE (NODE, struct tower_node *), \ UP_CAST (NODE, STRUCT, MEMBER)) /* A node within a tower. */ struct tower_node { struct abt_node abt_node; /* ABT node. */ unsigned long int subtree_size; /* Node size plus descendants' sizes. */ unsigned long int size; /* Size. */ unsigned long int subtree_count; /* Number of descendants, plus 1. */ }; /* Returns the size of a tower node. */ static inline unsigned long tower_node_get_size (const struct tower_node *node) { return node->size; } unsigned long int tower_node_get_level (const struct tower_node *); unsigned long int tower_node_get_index (const struct tower_node *); /* A tower. */ struct tower { struct abt abt; /* Tree. */ struct tower_node *cache; /* Cache node. */ unsigned long int cache_bottom; /* Height of cache's bottom. */ }; void tower_init (struct tower *); bool tower_is_empty (const struct tower *); unsigned long int tower_count (const struct tower *); unsigned long int tower_height (const struct tower *); void tower_insert (struct tower *, unsigned long int size, struct tower_node *new, struct tower_node *under); struct tower_node *tower_delete (struct tower *, struct tower_node *); void tower_resize (struct tower *, struct tower_node *, unsigned long int new_size); void tower_splice (struct tower *dst, struct tower_node *under, struct tower *src, struct tower_node *first, struct tower_node *last); struct tower_node *tower_lookup (const struct tower *, unsigned long int level, unsigned long int *node_start); struct tower_node *tower_get (const struct tower *, unsigned long int index); struct tower_node *tower_first (const struct tower *); struct tower_node *tower_last (const struct tower *); struct tower_node *tower_next (const struct tower *, const struct tower_node *); struct tower_node *tower_prev (const struct tower *, const struct tower_node *); #endif /* libpspp/tower.h */ pspp-1.0.1/src/libpspp/zip-reader.h0000644000175000017500000000530313146355723014101 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef ZIP_READER_H #define ZIP_READER_H 1 #include struct zip_reader; struct string; enum compression { COMPRESSION_STORED = 0, COMPRESSION_INFLATE, n_COMPRESSION }; struct zip_member { FILE *fp; /* The stream from which the data is read */ uint32_t offset; /* Starting offset in file. */ uint32_t comp_size; /* Length of member file data, in bytes. */ uint32_t ucomp_size; /* Uncompressed length of member file data, in bytes. */ uint32_t expected_crc; /* CRC-32 of member file data.. */ char *name; /* Name of member file. */ uint32_t crc; enum compression compression; size_t bytes_unread; /* Number of bytes left in the member available for reading */ int ref_cnt; struct string *errmsgs; /* A string to hold error messages. This string is NOT owned by this object. */ void *aux; }; struct decompressor { bool (*init) (struct zip_member *); int (*read) (struct zip_member *, void *, size_t); void (*finish) (struct zip_member *); }; void zm_dump (const struct zip_member *zm); /* Create zip reader to read the file called FILENAME. If ERRS is non-null if will be used to contain any error messages which the reader wishes to report. */ struct zip_reader *zip_reader_create (const char *filename, struct string *errs); /* Destroy the zip reader */ void zip_reader_destroy (struct zip_reader *zr); /* Return the zip member in the reader ZR, called MEMBER */ struct zip_member *zip_member_open (struct zip_reader *zr, const char *member); /* Read up to N bytes from ZM, storing them in BUF. Returns the number of bytes read, or -1 on error */ int zip_member_read (struct zip_member *zm, void *buf, size_t n); /* Unref (and possibly destroy) the zip member ZM */ void zip_member_unref (struct zip_member *zm); /* Ref the zip member */ void zip_member_ref (struct zip_member *zm); void zip_member_finish (struct zip_member *zm); #endif pspp-1.0.1/src/libpspp/array.h0000644000175000017500000002652313137223525013156 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef ALGORITHM_H #define ALGORITHM_H 1 #include #include /* Compares A and B, given auxiliary data AUX, and returns a strcmp()-type result. */ typedef int algo_compare_func (const void *a, const void *b, const void *aux); /* Tests a predicate on DATA, given auxiliary data AUX */ typedef bool algo_predicate_func (const void *data, const void *aux); /* Returns a random number in the range 0 through MAX exclusive, given auxiliary data AUX. */ typedef unsigned algo_random_func (unsigned max, const void *aux); /* A generally suitable random function. */ algo_random_func algo_default_random; /* Finds an element in ARRAY, which contains COUNT elements of SIZE bytes each, using COMPARE for comparisons. Returns the first element in ARRAY that matches TARGET, or a null pointer on failure. AUX is passed to each comparison as auxiliary data. */ void *find (const void *array, size_t count, size_t size, const void *target, algo_compare_func *compare, const void *aux); /* Counts and return the number of elements in ARRAY, which contains COUNT elements of SIZE bytes each, which are equal to ELEMENT as compared with COMPARE. AUX is passed as auxiliary data to COMPARE. */ size_t count_equal (const void *array, size_t count, size_t size, const void *element, algo_compare_func *compare, const void *aux); /* Counts and return the number of elements in ARRAY, which contains COUNT elements of SIZE bytes each, for which PREDICATE returns true. AUX is passed as auxiliary data to PREDICATE. */ size_t count_if (const void *array, size_t count, size_t size, algo_predicate_func *predicate, const void *aux); /* Sorts ARRAY, which contains COUNT elements of SIZE bytes each, using COMPARE for comparisons. AUX is passed to each comparison as auxiliary data. */ void sort (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux); /* Tests whether ARRAY, which contains COUNT elements of SIZE bytes each, is sorted in order according to COMPARE. AUX is passed to COMPARE as auxiliary data. */ bool is_sorted (const void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux); /* Makes the elements in ARRAY unique, by moving up duplicates, and returns the new number of elements in the array. Sorted arrays only. Arguments same as for sort() above. */ size_t unique (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux); /* Helper function that calls sort(), then unique(). */ size_t sort_unique (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux); /* Reorders ARRAY, which contains COUNT elements of SIZE bytes each, so that the elements for which PREDICATE returns true precede those for which PREDICATE returns false. AUX is passed as auxiliary data to PREDICATE. Returns the number of elements for which PREDICATE returns true. Not stable. */ size_t partition (void *array, size_t count, size_t size, algo_predicate_func *predicate, const void *aux); /* Checks whether ARRAY, which contains COUNT elements of SIZE bytes each, is partitioned such that PREDICATE returns true for the first TRUE_CNT elements and zero for the remaining elements. AUX is passed as auxiliary data to PREDICATE. */ bool is_partitioned (const void *array, size_t count, size_t size, size_t true_cnt, algo_predicate_func *predicate, const void *aux); /* Randomly reorders ARRAY, which contains COUNT elements of SIZE bytes each. Uses RANDOM as a source of random data, passing AUX as the auxiliary data. RANDOM may be null to use a default random source. */ void random_shuffle (void *array, size_t count, size_t size, algo_random_func *random, const void *aux); /* Copies the COUNT elements of SIZE bytes each from ARRAY to RESULT, except that elements for which PREDICATE is false are not copied. Returns the number of elements copied. AUX is passed to PREDICATE as auxiliary data. */ size_t copy_if (const void *array, size_t count, size_t size, void *result, algo_predicate_func *predicate, const void *aux); /* Removes N elements starting at IDX from ARRAY, which consists of COUNT elements of SIZE bytes each, by shifting the elements following them, if any, into its position. */ void remove_range (void *array, size_t count, size_t size, size_t idx, size_t n); /* Removes element IDX from ARRAY, which consists of COUNT elements of SIZE bytes each, by shifting the elements following it, if any, into its position. */ void remove_element (void *array, size_t count, size_t size, size_t idx); /* Makes room for N elements starting at IDX in ARRAY, which initially consists of COUNT elements of SIZE bytes each, by shifting elements IDX...COUNT (exclusive) to the right by N positions. */ void insert_range (void *array, size_t count, size_t size, size_t idx, size_t n); /* Makes room for a new element at IDX in ARRAY, which initially consists of COUNT elements of SIZE bytes each, by shifting elements IDX...COUNT (exclusive) to the right by one position. */ void insert_element (void *array, size_t count, size_t size, size_t idx); /* Moves an element in ARRAY, which consists of COUNT elements of SIZE bytes each, from OLD_IDX to NEW_IDX, shifting around other elements as needed. Runs in O(abs(OLD_IDX - NEW_IDX)) time. */ void move_element (void *array, size_t count, size_t size, size_t old_idx, size_t new_idx); /* Moves N elements in ARRAY starting at OLD_IDX, which consists of COUNT elements of SIZE bytes each, so that they now start at NEW_IDX, shifting around other elements as needed. */ void move_range (void *array, size_t count, size_t size, size_t old_idx, size_t new_idx, size_t n); /* Removes elements equal to ELEMENT from ARRAY, which consists of COUNT elements of SIZE bytes each. Returns the number of remaining elements. AUX is passed to COMPARE as auxiliary data. */ size_t remove_equal (void *array, size_t count, size_t size, void *element, algo_compare_func *compare, const void *aux); /* Copies the COUNT elements of SIZE bytes each from ARRAY to RESULT, except that elements for which PREDICATE is true are not copied. Returns the number of elements copied. AUX is passed to PREDICATE as auxiliary data. */ size_t remove_copy_if (const void *array, size_t count, size_t size, void *result, algo_predicate_func *predicate, const void *aux); /* Searches ARRAY, which contains COUNT elements of SIZE bytes each, for VALUE, using a binary search. ARRAY must ordered according to COMPARE. AUX is passed to COMPARE as auxiliary data. */ void *binary_search (const void *array, size_t count, size_t size, void *value, algo_compare_func *compare, const void *aux); /* Lexicographically compares ARRAY1, which contains COUNT1 elements of SIZE bytes each, to ARRAY2, which contains COUNT2 elements of SIZE bytes, according to COMPARE. Returns a strcmp()-type result. AUX is passed to COMPARE as auxiliary data. */ int lexicographical_compare_3way (const void *array1, size_t count1, const void *array2, size_t count2, size_t size, algo_compare_func *compare, const void *aux); /* Computes the generalized set difference, ARRAY1 minus ARRAY2, into RESULT, and returns the number of elements written to RESULT. If a value appears M times in ARRAY1 and N times in ARRAY2, then it will appear max(M - N, 0) in RESULT. ARRAY1 and ARRAY2 must be sorted, and RESULT is sorted and stable. ARRAY1 consists of COUNT1 elements, ARRAY2 of COUNT2 elements, each SIZE bytes. AUX is passed to COMPARE as auxiliary data. */ size_t set_difference (const void *array1, size_t count1, const void *array2, size_t count2, size_t size, void *result, algo_compare_func *compare, const void *aux); /* Finds the first pair of adjacent equal elements in ARRAY, which has COUNT elements of SIZE bytes. Returns the first element in ARRAY such that COMPARE returns true when it and its successor element are compared. AUX is passed to COMPARE as auxiliary data. */ void *adjacent_find_equal (const void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux); /* ARRAY contains COUNT elements of SIZE bytes each. Initially the first COUNT - 1 elements of these form a heap, followed by a single element not part of the heap. This function adds the final element, forming a heap of COUNT elements in ARRAY. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ void push_heap (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux); /* ARRAY contains COUNT elements of SIZE bytes each. Initially all COUNT elements form a heap. This function moves the largest element in the heap to the final position in ARRAY and reforms a heap of the remaining COUNT - 1 elements at the beginning of ARRAY. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ void pop_heap (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux); /* Turns ARRAY, which contains COUNT elements of SIZE bytes, into a heap. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ void make_heap (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux); /* ARRAY contains COUNT elements of SIZE bytes each. Initially all COUNT elements form a heap. This function turns the heap into a fully sorted array. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ void sort_heap (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux); /* ARRAY contains COUNT elements of SIZE bytes each. This function tests whether ARRAY is a heap and returns true if so, false otherwise. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ bool is_heap (const void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux); #endif /* algorithm.h */ pspp-1.0.1/src/libpspp/stringi-set.h0000644000175000017500000001371512470243700014303 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_STRINGI_SET_H #define LIBPSPP_STRINGI_SET_H /* Set of unique, case-insensitive strings. This is a convenient wrapper around a "struct hmap" for storing strings. */ #include #include "libpspp/hmap.h" /* A node in the string set. */ struct stringi_set_node { struct hmap_node hmap_node; char *string; }; /* Returns the string within NODE. The caller must not modify or free the returned string. */ static inline const char * stringi_set_node_get_string (const struct stringi_set_node *node) { return node->string; } /* An unordered set of unique strings. */ struct stringi_set { struct hmap hmap; }; /* Suitable for use as the initializer for a stringi_set named SET. Typical usage: struct stringi_set set = STRINGI_SET_INITIALIZER (set); STRINGI_SET_INITIALIZER is an alternative to calling stringi_set_init. */ #define STRINGI_SET_INITIALIZER(SET) { HMAP_INITIALIZER ((SET).hmap) } void stringi_set_init (struct stringi_set *); void stringi_set_clone (struct stringi_set *, const struct stringi_set *); void stringi_set_swap (struct stringi_set *, struct stringi_set *); void stringi_set_destroy (struct stringi_set *); static inline size_t stringi_set_count (const struct stringi_set *); static inline bool stringi_set_is_empty (const struct stringi_set *); bool stringi_set_contains (const struct stringi_set *, const char *); struct stringi_set_node *stringi_set_find_node (const struct stringi_set *, const char *); bool stringi_set_insert (struct stringi_set *, const char *); bool stringi_set_insert_nocopy (struct stringi_set *, char *); bool stringi_set_delete (struct stringi_set *, const char *); void stringi_set_delete_node (struct stringi_set *, struct stringi_set_node *); char *stringi_set_delete_nofree (struct stringi_set *, struct stringi_set_node *); void stringi_set_clear (struct stringi_set *); void stringi_set_union (struct stringi_set *, const struct stringi_set *); void stringi_set_union_and_intersection (struct stringi_set *, struct stringi_set *); void stringi_set_intersect (struct stringi_set *, const struct stringi_set *); void stringi_set_subtract (struct stringi_set *, const struct stringi_set *); char **stringi_set_get_array (const struct stringi_set *); char **stringi_set_get_sorted_array (const struct stringi_set *); static inline const struct stringi_set_node *stringi_set_first ( const struct stringi_set *); static inline const struct stringi_set_node *stringi_set_next ( const struct stringi_set *, const struct stringi_set_node *); /* Macros for conveniently iterating through a stringi_set, e.g. to print all of the strings in "my_set": struct stringi_set_node *node; const char *string; STRINGI_SET_FOR_EACH (string, node, &my_set) puts (string); */ #define STRINGI_SET_FOR_EACH(STRING, NODE, SET) \ for ((NODE) = stringi_set_first (SET); \ ((NODE) != NULL \ ? ((STRING) = stringi_set_node_get_string (NODE), \ 1) \ : 0); \ (NODE) = stringi_set_next (SET, NODE)) #define STRINGI_SET_FOR_EACH_SAFE(STRING, NODE, NEXT, SET) \ for ((NODE) = stringi_set_first (SET); \ ((NODE) != NULL \ ? ((STRING) = stringi_set_node_get_string (NODE), \ (NEXT) = stringi_set_next (SET, NODE), \ 1) \ : 0); \ (NODE) = (NEXT)) /* Returns the number of strings currently in SET. */ static inline size_t stringi_set_count (const struct stringi_set *set) { return hmap_count (&set->hmap); } /* Returns true if SET currently contains no strings, false otherwise. */ static inline bool stringi_set_is_empty (const struct stringi_set *set) { return hmap_is_empty (&set->hmap); } /* Returns the first node in SET, or a null pointer if SET is empty. See the hmap_first function for information about complexity (O(1) amortized) and ordering (arbitrary). The STRINGI_SET_FOR_EACH and STRINGI_SET_FOR_EACH_SAFE macros provide convenient ways to iterate over all the nodes in a string set. */ static inline const struct stringi_set_node * stringi_set_first (const struct stringi_set *set) { return HMAP_FIRST (struct stringi_set_node, hmap_node, &set->hmap); } /* Returns the next node in SET following NODE, or a null pointer if NODE is the last node in SET. See the hmap_next function for information about complexity (O(1) amortized) and ordering (arbitrary). The STRINGI_SET_FOR_EACH and STRINGI_SET_FOR_EACH_SAFE macros provide convenient ways to iterate over all the nodes in a string set. */ static inline const struct stringi_set_node * stringi_set_next (const struct stringi_set *set, const struct stringi_set_node *node) { return HMAP_NEXT (node, struct stringi_set_node, hmap_node, &set->hmap); } #endif /* libpspp/string-set.h */ pspp-1.0.1/src/libpspp/llx.h0000644000175000017500000002745112470243700012634 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Circular doubly linked lists. This header (llx.h) supplies "external" circular doubly linked lists. Its companion header (ll.h) supplies "embedded" circular doubly linked lists. The two variants are described briefly here. The external variant, for which this is the header, is described in slightly more detail below. Each function also has a detailed usage comment at its point of definition. The "ll" embedded linked list implementation puts the linked list node within the data structure that the list contains. This makes allocation efficient, in space and time. It also makes it easy to find the list node associated with a given object. However, it's difficult to include a given object in an arbitrary number of lists, or to include a single object in a single list in multiple positions. The "llx" external linked list implementation allocates linked list nodes separately from the objects in the list. Adding and removing linked list nodes requires dynamic allocation, so it is normally slower and takes more memory than the embedded implementation. It also requires searching the list to find the list node associated with a given object. However, it's easy to include a given object in an arbitrary number of lists, or to include a single object more than once within a single list. It's also possible to create an external linked list without adding a member to the data structure that the list contains. */ #ifndef LLX_H #define LLX_H 1 #include #include #include "libpspp/ll.h" /* External, circular doubly linked list. Each list contains a single "null" element that separates the head and the tail of the list. The null element is both before the head and after the tail of the list. An empty list contains just the null element. An external linked list is represented as `struct llx_list'. Each node in the list consists of a `struct llx' that contains a `void *' pointer to the node's data. Use the llx_data() function to extract the data pointer from a node. Many list functions take ranges of nodes as arguments. Ranges are "half-open"; that is, R0...R1 includes R0 but not R1. A range whose endpoints are the same (e.g. R0...R0) contains no nodes at all. Consider the following declarations: struct llx_list list; struct foo { int x; // Data member. }; Here's an example of iteration from head to tail: struct llx *llx; for (llx = llx_head (&list); llx != llx_null (&list); llx = llx_next (llx)) { struct foo *foo = llx_data (llx); ...do something with foo->x... } Here's another way to do it: struct llx *llx = llx_null (&list); while ((llx = llx_next (llx)) != llx_null (&list)) { struct foo *foo = llx_data (llx); ...do something with foo->x... } */ /* External linked list node. */ struct llx { struct ll ll; /* Node. */ void *data; /* Member data. */ }; /* Linked list. */ struct llx_list { struct ll_list ll_list; /* The list. */ }; /* Suitable for use as the initializer for a `struct llx_list' named LIST. Typical usage: struct llx_list list = LLX_INITIALIZER (list); LLX_INITIALIZER() is an alternative to llx_init(). */ #define LLX_INITIALIZER(LIST) { LL_INITIALIZER ((LIST).ll_list) } /* Memory manager. */ struct llx_manager { /* Allocates and returns memory for a new struct llx. If space is unavailable, returns a null pointer. */ struct llx *(*allocate) (void *aux); /* Releases a previously allocated struct llx. */ void (*release) (struct llx *, void *aux); /* Auxiliary data passed to allocate and release functions. */ void *aux; }; /* Manager that uses the standard malloc and free routines. */ extern const struct llx_manager llx_malloc_mgr; /* Returns negative if A < B, zero if A == B, positive if A > B. */ typedef int llx_compare_func (const void *a, const void *b, void *aux); /* Returns true or false depending on properties of DATA. */ typedef bool llx_predicate_func (const void *data, void *aux); /* Takes some action on DATA. */ typedef void llx_action_func (void *data, void *aux); /* Basics. */ static inline void llx_init (struct llx_list *); void llx_destroy (struct llx_list *, llx_action_func *destructor, void *aux, const struct llx_manager *manager); static inline bool llx_is_empty (const struct llx_list *); size_t llx_count (const struct llx_list *); /* Iteration. */ static inline struct llx *llx_head (const struct llx_list *); static inline struct llx *llx_tail (const struct llx_list *); static inline struct llx *llx_null (const struct llx_list *); static inline struct llx *llx_next (const struct llx *); static inline struct llx *llx_prev (const struct llx *); static inline void *llx_data (const struct llx *); /* Stack- and queue-like behavior. */ struct llx *llx_push_head (struct llx_list *, void *, const struct llx_manager *); struct llx *llx_push_tail (struct llx_list *, void *, const struct llx_manager *); void *llx_pop_head (struct llx_list *, const struct llx_manager *); void *llx_pop_tail (struct llx_list *, const struct llx_manager *); /* Insertion. */ struct llx *llx_insert (struct llx *before, void *, const struct llx_manager *); void llx_splice (struct llx *before, struct llx *r0, struct llx *r1); void llx_swap (struct llx *a, struct llx *b); void llx_swap_range (struct llx *a0, struct llx *a1, struct llx *b0, struct llx *b1); /* Removal. */ struct llx *llx_remove (struct llx *, const struct llx_manager *); void llx_remove_range (struct llx *r0, struct llx *r1, const struct llx_manager *); size_t llx_remove_equal (struct llx *r0, struct llx *r1, const void *target, llx_compare_func *, void *aux, const struct llx_manager *); size_t llx_remove_if (struct llx *r0, struct llx *r1, llx_predicate_func *, void *aux, const struct llx_manager *); /* Non-mutating algorithms. */ struct llx *llx_find (const struct llx *r0, const struct llx *r1, const void *target); struct llx *llx_find_equal (const struct llx *r0, const struct llx *r1, const void *target, llx_compare_func *, void *aux); struct llx *llx_find_if (const struct llx *r0, const struct llx *r1, llx_predicate_func *, void *aux); struct llx *llx_find_adjacent_equal (const struct llx *r0, const struct llx *r1, llx_compare_func *, void *aux); size_t llx_count_range (const struct llx *r0, const struct llx *r1); size_t llx_count_equal (const struct llx *r0, const struct llx *r1, const void *target, llx_compare_func *, void *aux); size_t llx_count_if (const struct llx *r0, const struct llx *r1, llx_predicate_func *, void *aux); struct llx *llx_max (const struct llx *r0, const struct llx *r1, llx_compare_func *, void *aux); struct llx *llx_min (const struct llx *r0, const struct llx *r1, llx_compare_func *, void *aux); int llx_lexicographical_compare_3way (const struct llx *a0, const struct llx *a1, const struct llx *b0, const struct llx *b1, llx_compare_func *, void *aux); /* Mutating algorithms. */ void llx_apply (struct llx *r0, struct llx *r1, llx_action_func *, void *aux); void llx_reverse (struct llx *r0, struct llx *r1); bool llx_next_permutation (struct llx *r0, struct llx *r1, llx_compare_func *, void *aux); bool llx_prev_permutation (struct llx *r0, struct llx *r1, llx_compare_func *, void *aux); /* Sorted list functions. */ void llx_sort (struct llx *r0, struct llx *r1, llx_compare_func *, void *aux); struct llx *llx_find_run (const struct llx *r0, const struct llx *r1, llx_compare_func *, void *aux); bool llx_is_sorted (const struct llx *r0, const struct llx *r1, llx_compare_func *, void *aux); struct llx *llx_merge (struct llx *a0, struct llx *a1, struct llx *b0, struct llx *b1, llx_compare_func *, void *aux); size_t llx_unique (struct llx *r0, struct llx *r1, struct llx *dups, llx_compare_func *, void *aux, const struct llx_manager *); void llx_sort_unique (struct llx *r0, struct llx *r1, struct llx *dups, llx_compare_func *, void *aux, const struct llx_manager *); struct llx *llx_insert_ordered (struct llx *r0, struct llx *r1, void *data, llx_compare_func *, void *aux, const struct llx_manager *); struct llx *llx_partition (struct llx *r0, struct llx *r1, llx_predicate_func *, void *aux); struct llx *llx_find_partition (const struct llx *r0, const struct llx *r1, llx_predicate_func *, void *aux); /* Returns the llx within which LL is embedded. */ static struct llx * llx_from_ll (struct ll *ll) { return ll_data (ll, struct llx, ll); } /* Initializes LIST as an empty list. */ static inline void llx_init (struct llx_list *list) { ll_init (&list->ll_list); } /* Returns true if LIST is empty (contains just the null node), false if LIST is not empty (has at least one other node). Executes in O(1) time. */ static inline bool llx_is_empty (const struct llx_list *list) { return ll_is_empty (&list->ll_list); } /* Returns the first node in LIST, or the null node if LIST is empty. */ static inline struct llx * llx_head (const struct llx_list *list) { return llx_from_ll (ll_head (&list->ll_list)); } /* Returns the last node in LIST, or the null node if LIST is empty. */ static inline struct llx * llx_tail (const struct llx_list *list) { return llx_from_ll (ll_tail (&list->ll_list)); } /* Returns LIST's null node. */ static inline struct llx * llx_null (const struct llx_list *list) { return llx_from_ll (ll_null (&list->ll_list)); } /* Returns the node following LLX in its list, or the null node if LLX is at the end of its list. (In an empty list, the null node follows itself.) */ static inline struct llx * llx_next (const struct llx *llx) { return llx_from_ll (ll_next (&llx->ll)); } /* Returns the node preceding LLX in its list, or the null node if LLX is the first node in its list. (In an empty list, the null node precedes itself.) */ static inline struct llx * llx_prev (const struct llx *llx) { return llx_from_ll (ll_prev (&llx->ll)); } /* Returns the data in node LLX. */ static inline void * llx_data (const struct llx *llx) { return llx->data; } #endif /* llx.h */ pspp-1.0.1/src/libpspp/string-set.c0000644000175000017500000001662712470243700014132 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* If you add routines in this file, please add a corresponding test to string-set-test.c. */ #include #include "libpspp/string-set.h" #include #include #include "libpspp/hash-functions.h" #include "gl/xalloc.h" static struct string_set_node *string_set_find_node__ ( const struct string_set *, const char *, unsigned int hash); static void string_set_insert__ (struct string_set *, char *, unsigned int hash); static bool string_set_delete__ (struct string_set *, const char *, unsigned int hash); /* Initializes SET as a new string set that is initially empty. */ void string_set_init (struct string_set *set) { hmap_init (&set->hmap); } /* Initializes SET as a new string set that initially contains the same strings as OLD. */ void string_set_clone (struct string_set *set, const struct string_set *old) { const struct string_set_node *node; const char *s; string_set_init (set); hmap_reserve (&set->hmap, string_set_count (old)); STRING_SET_FOR_EACH (s, node, old) string_set_insert__ (set, xstrdup (s), node->hmap_node.hash); } /* Exchanges the contents of string sets A and B. */ void string_set_swap (struct string_set *a, struct string_set *b) { hmap_swap (&a->hmap, &b->hmap); } /* Frees SET and its nodes and strings. */ void string_set_destroy (struct string_set *set) { if (set != NULL) { string_set_clear (set); hmap_destroy (&set->hmap); } } /* Returns true if SET contains S, false otherwise. */ bool string_set_contains (const struct string_set *set, const char *s) { return string_set_find_node (set, s) != NULL; } /* Returns the node in SET that contains S, or a null pointer if SET does not contain S. */ struct string_set_node * string_set_find_node (const struct string_set *set, const char *s) { return string_set_find_node__ (set, s, hash_string (s, 0)); } /* Inserts a copy of S into SET. Returns true if successful, false if SET is unchanged because it already contained S. */ bool string_set_insert (struct string_set *set, const char *s) { unsigned int hash = hash_string (s, 0); if (!string_set_find_node__ (set, s, hash)) { string_set_insert__ (set, xstrdup (s), hash); return true; } else return false; } /* Inserts S, which must be a malloc'd string, into SET, transferring ownership of S to SET. Returns true if successful, false if SET is unchanged because it already contained a copy of S. (In the latter case, S is freed.) */ bool string_set_insert_nocopy (struct string_set *set, char *s) { unsigned int hash = hash_string (s, 0); if (!string_set_find_node__ (set, s, hash)) { string_set_insert__ (set, s, hash); return true; } else { free (s); return false; } } /* Deletes S from SET. Returns true if successful, false if SET is unchanged because it did not contain a copy of S. */ bool string_set_delete (struct string_set *set, const char *s) { return string_set_delete__ (set, s, hash_string (s, 0)); } /* Deletes NODE from SET, and frees NODE and its string. */ void string_set_delete_node (struct string_set *set, struct string_set_node *node) { free (string_set_delete_nofree (set, node)); } /* Deletes NODE from SET and frees NODE. Returns the string that NODE contained, transferring ownership to the caller. */ char * string_set_delete_nofree (struct string_set *set, struct string_set_node *node) { char *string = node->string; hmap_delete (&set->hmap, &node->hmap_node); free (node); return string; } /* Removes all nodes from SET. */ void string_set_clear (struct string_set *set) { struct string_set_node *node, *next; HMAP_FOR_EACH_SAFE (node, next, struct string_set_node, hmap_node, &set->hmap) string_set_delete_node (set, node); } /* Calculates A = union(A, B). If B may be modified, string_set_union_and_intersection() is faster than this function. */ void string_set_union (struct string_set *a, const struct string_set *b) { struct string_set_node *node; HMAP_FOR_EACH (node, struct string_set_node, hmap_node, &b->hmap) if (!string_set_find_node__ (a, node->string, node->hmap_node.hash)) string_set_insert__ (a, xstrdup (node->string), node->hmap_node.hash); } /* Calculates A = union(A, B) and B = intersect(A, B). If only the intersection is needed, string_set_intersect() is faster. */ void string_set_union_and_intersection (struct string_set *a, struct string_set *b) { struct string_set_node *node, *next; HMAP_FOR_EACH_SAFE (node, next, struct string_set_node, hmap_node, &b->hmap) if (!string_set_find_node__ (a, node->string, node->hmap_node.hash)) { hmap_delete (&b->hmap, &node->hmap_node); hmap_insert (&a->hmap, &node->hmap_node, node->hmap_node.hash); } } /* Calculates A = intersect(A, B). */ void string_set_intersect (struct string_set *a, const struct string_set *b) { struct string_set_node *node, *next; HMAP_FOR_EACH_SAFE (node, next, struct string_set_node, hmap_node, &a->hmap) if (!string_set_find_node__ (b, node->string, node->hmap_node.hash)) string_set_delete_node (a, node); } /* Removes from A all of the strings in B. */ void string_set_subtract (struct string_set *a, const struct string_set *b) { struct string_set_node *node, *next; if (string_set_count (a) < string_set_count (b)) { HMAP_FOR_EACH_SAFE (node, next, struct string_set_node, hmap_node, &a->hmap) if (string_set_find_node__ (b, node->string, node->hmap_node.hash)) string_set_delete_node (a, node); } else { HMAP_FOR_EACH (node, struct string_set_node, hmap_node, &b->hmap) string_set_delete__ (a, node->string, node->hmap_node.hash); } } /* Internal functions. */ static struct string_set_node * string_set_find_node__ (const struct string_set *set, const char *s, unsigned int hash) { struct string_set_node *node; HMAP_FOR_EACH_WITH_HASH (node, struct string_set_node, hmap_node, hash, &set->hmap) if (!strcmp (s, node->string)) return node; return NULL; } static void string_set_insert__ (struct string_set *set, char *s, unsigned int hash) { struct string_set_node *node = xmalloc (sizeof *node); node->string = s; hmap_insert (&set->hmap, &node->hmap_node, hash); } static bool string_set_delete__ (struct string_set *set, const char *s, unsigned int hash) { struct string_set_node *node = string_set_find_node__ (set, s, hash); if (node != NULL) { string_set_delete_node (set, node); return true; } else return false; } pspp-1.0.1/src/libpspp/line-reader.c0000644000175000017500000002144112523704223014211 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "line-reader.h" #include #include #include #include #include #include #include "libpspp/assertion.h" #include "libpspp/encoding-guesser.h" #include "libpspp/i18n.h" #include "libpspp/str.h" #include "gl/minmax.h" #include "gl/xalloc.h" enum line_reader_state { S_UNIBYTE, /* Known stream encoding, 1-byte unit. */ S_MULTIBYTE, /* Known stream encoding, multibyte unit. */ S_AUTO /* Encoding autodetection in progress. */ }; struct line_reader { int fd; enum line_reader_state state; struct encoding_info encoding_info; char *encoding; /* Current encoding. */ char *auto_encoding; /* In S_AUTO mode, user-specified encoding. */ char *buffer; char *head; size_t length; int error; bool eof; }; static ssize_t fill_buffer (struct line_reader *); /* Opens FILENAME, which is encoded in ENCODING, for reading line by line, passing FLAGS to the open() function. Returns a new line_reader if successful, otherwise returns NULL and sets errno to an appropriate value. The accepted forms for ENCODING are listed at the top of encoding-guesser.h. */ struct line_reader * line_reader_for_file (const char *encoding, const char *filename, int flags) { struct line_reader *r; int fd; assert (!(flags & O_CREAT)); fd = open (filename, flags); if (fd < 0) return NULL; r = line_reader_for_fd (encoding, fd); if (r == NULL) { int save_errno = errno; close (fd); errno = save_errno; } return r; } /* Creates and returns a new line_reader that reads its input from FD. Returns a new line_reader if successful, otherwise returns NULL and sets errno to an appropriate value. The accepted forms for ENCODING are listed at the top of encoding-guesser.h. */ struct line_reader * line_reader_for_fd (const char *encoding, int fd) { struct line_reader *r; r = calloc (1, sizeof *r); if (r == NULL) return NULL; r->fd = fd; r->buffer = malloc (LINE_READER_BUFFER_SIZE); if (r->buffer == NULL) goto error; r->head = r->buffer; r->length = 0; if (fill_buffer (r) < 0) goto error; r->encoding = xstrdup (encoding_guess_head_encoding ( encoding, r->buffer, r->length)); if (!get_encoding_info (&r->encoding_info, r->encoding)) { errno = EINVAL; goto error; } if (encoding_guess_encoding_is_auto (encoding) && !strcmp (r->encoding, "ASCII")) { r->state = S_AUTO; r->auto_encoding = encoding ? xstrdup (encoding) : NULL; } else r->state = r->encoding_info.unit == 1 ? S_UNIBYTE : S_MULTIBYTE; return r; error: line_reader_free (r); return NULL; } /* Closes R and its underlying file descriptor and frees all associated resources. Returns the return value from close(). */ int line_reader_close (struct line_reader *r) { if (r != NULL) { int fd = r->fd; line_reader_free (r); return close (fd); } return 0; } /* Frees R and associated resources, but does not close the underlying file descriptor. (Thus, the client must close the file descriptor when it is no longer needed.) */ void line_reader_free (struct line_reader *r) { if (r != NULL) { free (r->buffer); free (r->encoding); free (r->auto_encoding); free (r); } } static ssize_t fill_buffer (struct line_reader *r) { ssize_t n; /* Move any unused bytes to the beginning of the input buffer. */ if (r->length > 0 && r->buffer != r->head) memmove (r->buffer, r->head, r->length); r->head = r->buffer; /* Read more input. */ do { n = read (r->fd, r->buffer + r->length, LINE_READER_BUFFER_SIZE - r->length); } while (n < 0 && errno == EINTR); if (n > 0) r->length += n; else if (n < 0) r->error = errno; else r->eof = true; return n; } static void output_bytes (struct line_reader *r, struct string *s, size_t n) { ds_put_substring (s, ss_buffer (r->head, n)); r->head += n; r->length -= n; } static void output_line (struct line_reader *r, struct string *s, size_t n) { int unit = r->encoding_info.unit; output_bytes (r, s, n); r->head += unit; r->length -= unit; ds_chomp (s, ss_buffer (r->encoding_info.cr, unit)); } /* Reads a line of text, but no more than MAX_LENGTH bytes, from R and appends it to S, omitting the final new-line and the carriage return that immediately precedes it, if one is present. The line is left in its original encoding. Returns true if anything was successfully read from the file. (If an empty line was read, then nothing is appended to S.) Returns false if end of file was reached or a read error occurred before any text could be read. */ bool line_reader_read (struct line_reader *r, struct string *s, size_t max_length) { size_t original_length = ds_length (s); int unit = r->encoding_info.unit; do { size_t max_out = max_length - (ds_length (s) - original_length); size_t max_in = r->length; size_t max = MIN (max_in, max_out); size_t n; char *p; if (max_out < unit) break; switch (r->state) { case S_UNIBYTE: p = memchr (r->head, r->encoding_info.lf[0], max); if (p != NULL) { output_line (r, s, p - r->head); return true; } n = max; break; case S_MULTIBYTE: for (n = 0; n + unit <= max; n += unit) if (!memcmp (r->head + n, r->encoding_info.lf, unit)) { output_line (r, s, n); return true; } break; case S_AUTO: for (n = 0; n < max; n++) if (!encoding_guess_is_ascii_text (r->head[n])) { char *encoding; output_bytes (r, s, n); fill_buffer (r); r->state = S_UNIBYTE; encoding = xstrdup (encoding_guess_tail_encoding ( r->auto_encoding, r->head, r->length)); free (r->encoding); r->encoding = encoding; free (r->auto_encoding); r->auto_encoding = NULL; n = 0; break; } else if (r->head[n] == '\n') { output_line (r, s, n); return true; } break; default: NOT_REACHED (); } output_bytes (r, s, n); } while (r->length >= unit || fill_buffer (r) > 0); return ds_length (s) > original_length; } /* Returns the file descriptor underlying R. */ int line_reader_fileno (const struct line_reader *r) { return r->fd; } /* Returns the offset in the file of the next byte to be read from R, or -1 on error (e.g. if the file is not seekable). */ off_t line_reader_tell (const struct line_reader *r) { off_t pos = lseek (r->fd, 0, SEEK_CUR); return (pos < 0 ? pos : pos >= r->length ? pos - r->length : 0); } /* Returns true if end of file has been encountered reading R. */ bool line_reader_eof (const struct line_reader *r) { return r->eof && !r->length; } /* Returns an nonzero errno value if an error has been encountered reading R, zero otherwise. */ int line_reader_error (const struct line_reader *r) { return !r->length ? r->error : 0; } /* Returns the encoding of R. If line_reader_is_auto(R) returns true, the encoding might change as more lines are read. */ const char * line_reader_get_encoding (const struct line_reader *r) { return r->encoding; } /* Returns true if the encoding of the file being read by R is not yet completely known. If this function returns true, then the encoding returned by line_reader_get_encoding() might change as more lines are read (and after the change, this function will return false). */ bool line_reader_is_auto (const struct line_reader *r) { return r->state == S_AUTO; } pspp-1.0.1/src/libpspp/stringi-map.c0000644000175000017500000003032212470413451014253 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/stringi-map.h" #include #include #include "libpspp/hash-functions.h" #include "libpspp/i18n.h" #include "libpspp/string-set.h" #include "libpspp/stringi-set.h" #include "gl/xalloc.h" static struct stringi_map_node *stringi_map_find_node__ ( const struct stringi_map *, const char *key, unsigned int hash); static bool stringi_map_delete__ (struct stringi_map *, const char *key, unsigned int hash); static struct stringi_map_node *stringi_map_insert__ (struct stringi_map *, char *key, char *value, unsigned int hash); /* Sets NODE's value to a copy of NEW_VALUE and returns the node's previous value. The caller is responsible for freeing the returned string (with free()). */ char * stringi_map_node_swap_value (struct stringi_map_node *node, const char *new_value) { return stringi_map_node_swap_value_nocopy (node, xstrdup (new_value)); } /* Sets NODE's value to NEW_VALUE, which must be a malloc()'d string, transferring ownership of NEW_VALUE to the node. Returns the node's previous value, which the caller is responsible for freeing (with free()). */ char * stringi_map_node_swap_value_nocopy (struct stringi_map_node *node, char *new_value) { char *old_value = node->value; node->value = new_value; return old_value; } /* Replaces NODE's value by a copy of VALUE. */ void stringi_map_node_set_value (struct stringi_map_node *node, const char *value) { stringi_map_node_set_value_nocopy (node, xstrdup (value)); } /* Replaces NODE's value by VALUE, which must be a malloc()'d string, transferring ownership of VALUE to the node.. */ void stringi_map_node_set_value_nocopy (struct stringi_map_node *node, char *value) { free (node->value); node->value = value; } /* Frees NODE and and its key and value. Ordinarily nodes are owned by stringi_maps, but this function should only be used by a caller that owns NODE, such as one that has called stringi_map_delete_nofree() for the node. */ void stringi_map_node_destroy (struct stringi_map_node *node) { free (node->key); free (node->value); free (node); } /* Initializes MAP as an initially empty case-insensitive string map. */ void stringi_map_init (struct stringi_map *map) { hmap_init (&map->hmap); } /* Initializes MAP as a new string map that initially contains the same pairs as OLD. */ void stringi_map_clone (struct stringi_map *map, const struct stringi_map *old) { const struct stringi_map_node *node; const char *key, *value; stringi_map_init (map); hmap_reserve (&map->hmap, stringi_map_count (old)); STRINGI_MAP_FOR_EACH_KEY_VALUE (key, value, node, old) stringi_map_insert__ (map, xstrdup (key), xstrdup (value), node->hmap_node.hash); } /* Exchanges the contents of string maps A and B. */ void stringi_map_swap (struct stringi_map *a, struct stringi_map *b) { hmap_swap (&a->hmap, &b->hmap); } /* Frees MAP and its nodes and key-value pairs. */ void stringi_map_destroy (struct stringi_map *map) { if (map != NULL) { stringi_map_clear (map); hmap_destroy (&map->hmap); } } /* Returns true if MAP contains KEY (or an equivalent with different case) as a key, otherwise false. */ bool stringi_map_contains (const struct stringi_map *map, const char *key) { return stringi_map_find_node (map, key) != NULL; } /* If MAP contains KEY (or an equivalent with different case) as a key, returns the corresponding value. Otherwise, returns a null pointer. */ const char * stringi_map_find (const struct stringi_map *map, const char *key) { const struct stringi_map_node *node = stringi_map_find_node (map, key); return node != NULL ? node->value : NULL; } /* If MAP contains KEY (or an equivalent with different case) as a key, returns the corresponding node. Otherwise, returns a null pointer. */ struct stringi_map_node * stringi_map_find_node (const struct stringi_map *map, const char *key) { return stringi_map_find_node__ (map, key, utf8_hash_case_string (key, 0)); } /* If MAP contains KEY (or an equivalent with different case) as a key, deletes that key's node and returns its value, which the caller is responsible for freeing (using free()). Otherwise, returns a null pointer. */ char * stringi_map_find_and_delete (struct stringi_map *map, const char *key) { struct stringi_map_node *node = stringi_map_find_node (map, key); char *value = NULL; if (node != NULL) { value = node->value; node->value = NULL; stringi_map_delete_node (map, node); } return value; } /* If MAP does not contain KEY (or an equivalent with different case) as a key, inserts a new node containing copies of KEY and VALUE and returns the new node. Otherwise, returns the existing node that contains KEY. */ struct stringi_map_node * stringi_map_insert (struct stringi_map *map, const char *key, const char *value) { unsigned int hash = utf8_hash_case_string (key, 0); struct stringi_map_node *node = stringi_map_find_node__ (map, key, hash); if (node == NULL) node = stringi_map_insert__ (map, xstrdup (key), xstrdup (value), hash); return node; } /* If MAP does not contain KEY (or an equivalent with different case) as a key, inserts a new node containing KEY and VALUE and returns the new node. Otherwise, returns the existing node that contains KEY. Either way, ownership of KEY and VALUE is transferred to MAP. */ struct stringi_map_node * stringi_map_insert_nocopy (struct stringi_map *map, char *key, char *value) { unsigned int hash = utf8_hash_case_string (key, 0); struct stringi_map_node *node = stringi_map_find_node__ (map, key, hash); if (node == NULL) node = stringi_map_insert__ (map, key, value, hash); else { free (key); free (value); } return node; } /* If MAP does not contain KEY (or an equivalent with different case) as a key, inserts a new node containing copies of KEY and VALUE. Otherwise, replaces the existing node's value by a copy of VALUE. Returns the node. */ struct stringi_map_node * stringi_map_replace (struct stringi_map *map, const char *key, const char *value) { unsigned int hash = utf8_hash_case_string (key, 0); struct stringi_map_node *node = stringi_map_find_node__ (map, key, hash); if (node == NULL) node = stringi_map_insert__ (map, xstrdup (key), xstrdup (value), hash); else stringi_map_node_set_value (node, value); return node; } /* If MAP does not contain KEY (or an equivalent with different case) as a key, inserts a new node containing KEY and VALUE. Otherwise, replaces the existing node's value by VALUE. Either way, ownership of KEY and VALUE is transferred to MAP. Returns the node. */ struct stringi_map_node * stringi_map_replace_nocopy (struct stringi_map *map, char *key, char *value) { unsigned int hash = utf8_hash_case_string (key, 0); struct stringi_map_node *node = stringi_map_find_node__ (map, key, hash); if (node == NULL) node = stringi_map_insert__ (map, key, value, hash); else { free (key); stringi_map_node_set_value_nocopy (node, value); } return node; } /* Searches MAP for a node with KEY (or an equivalent with different case) as its key. If found, deletes the node and its key and value and returns true. Otherwise, returns false without modifying MAP. */ bool stringi_map_delete (struct stringi_map *map, const char *key) { return stringi_map_delete__ (map, key, utf8_hash_case_string (key, 0)); } /* Deletes NODE from MAP and destroys the node and its key and value. */ void stringi_map_delete_node (struct stringi_map *map, struct stringi_map_node *node) { stringi_map_delete_nofree (map, node); stringi_map_node_destroy (node); } /* Deletes NODE from MAP. Transfers ownership of NODE to the caller, which becomes responsible for destroying it. */ void stringi_map_delete_nofree (struct stringi_map *map, struct stringi_map_node *node) { hmap_delete (&map->hmap, &node->hmap_node); } /* Removes all nodes from MAP and frees them and their keys and values. */ void stringi_map_clear (struct stringi_map *map) { struct stringi_map_node *node, *next; STRINGI_MAP_FOR_EACH_NODE_SAFE (node, next, map) stringi_map_delete_node (map, node); } /* Inserts a copy of each of the nodes in SRC into DST. When SRC and DST both have a particular key (or keys that differ only in case), the value in DST's node is left unchanged. */ void stringi_map_insert_map (struct stringi_map *dst, const struct stringi_map *src) { const struct stringi_map_node *node; STRINGI_MAP_FOR_EACH_NODE (node, src) { if (!stringi_map_find_node__ (dst, node->key, node->hmap_node.hash)) stringi_map_insert__ (dst, xstrdup (node->key), xstrdup (node->value), node->hmap_node.hash); } } /* Inserts a copy of each of the nodes in SRC into DST. When SRC and DST both have a particular key (or keys that differ only in case), the value in DST's node is replaced by a copy of the value in SRC's node. */ void stringi_map_replace_map (struct stringi_map *dst, const struct stringi_map *src) { const struct stringi_map_node *snode; STRINGI_MAP_FOR_EACH_NODE (snode, src) { struct stringi_map_node *dnode; dnode = stringi_map_find_node__ (dst, snode->key, snode->hmap_node.hash); if (dnode != NULL) stringi_map_node_set_value (dnode, snode->value); else stringi_map_insert__ (dst, xstrdup (snode->key), xstrdup (snode->value), snode->hmap_node.hash); } } /* Inserts each of the keys in MAP into KEYS. KEYS must already have been initialized (using stringi_set_init()). */ void stringi_map_get_keys (const struct stringi_map *map, struct stringi_set *keys) { const struct stringi_map_node *node; const char *key; STRINGI_MAP_FOR_EACH_KEY (key, node, map) stringi_set_insert (keys, key); } /* Inserts each of the values in MAP into VALUES. VALUES must already have been initialized (using string_set_init()). */ void stringi_map_get_values (const struct stringi_map *map, struct string_set *values) { const struct stringi_map_node *node; const char *value; STRINGI_MAP_FOR_EACH_VALUE (value, node, map) string_set_insert (values, value); } static struct stringi_map_node * stringi_map_find_node__ (const struct stringi_map *map, const char *key, unsigned int hash) { struct stringi_map_node *node; HMAP_FOR_EACH_WITH_HASH (node, struct stringi_map_node, hmap_node, hash, &map->hmap) if (!utf8_strcasecmp (key, node->key)) return node; return NULL; } static bool stringi_map_delete__ (struct stringi_map *map, const char *key, unsigned int hash) { struct stringi_map_node *node = stringi_map_find_node__ (map, key, hash); if (node != NULL) { stringi_map_delete_node (map, node); return true; } else return false; } static struct stringi_map_node * stringi_map_insert__ (struct stringi_map *map, char *key, char *value, unsigned int hash) { struct stringi_map_node *node = xmalloc (sizeof *node); node->key = key; node->value = value; hmap_insert (&map->hmap, &node->hmap_node, hash); return node; } pspp-1.0.1/src/libpspp/string-array.c0000644000175000017500000001605512470242642014454 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/string-array.h" #include #include #include #include "libpspp/array.h" #include "libpspp/str.h" #include "gl/xalloc.h" /* Initializes SA as an initially empty array of strings. */ void string_array_init (struct string_array *sa) { sa->strings = NULL; sa->n = 0; sa->allocated = 0; } /* Initializes DST as an array of strings whose contents are initially copies of the strings in SRC. */ void string_array_clone (struct string_array *dst, const struct string_array *src) { size_t i; dst->strings = xmalloc (sizeof *dst->strings * src->n); for (i = 0; i < src->n; i++) dst->strings[i] = xstrdup (src->strings[i]); dst->n = src->n; dst->allocated = src->n; } /* Exchanges the contents of A and B. */ void string_array_swap (struct string_array *a, struct string_array *b) { struct string_array tmp = *a; *a = *b; *b = tmp; } /* Frees the strings in SA. SA must be reinitialized (with string_array_init()) before it is used again. */ void string_array_destroy (struct string_array *sa) { if (sa != NULL) { string_array_clear (sa); free (sa->strings); } } /* Returns true if SA contains at least one copy of STRING, otherwise false. This function runs in O(n) time in the number of strings in SA. */ bool string_array_contains (const struct string_array *sa, const char *string) { return string_array_find (sa, string) != SIZE_MAX; } /* If SA contains at least one copy of STRING, returns the smallest index of any of those copies. If SA does not contain STRING, returns SIZE_MAX. This function runs in O(n) time in the number of strings in SA. */ size_t string_array_find (const struct string_array *sa, const char *string) { size_t i; for (i = 0; i < sa->n; i++) if (!strcmp (sa->strings[i], string)) return i; return SIZE_MAX; } /* Appends a copy of STRING to SA. The caller retains ownership of STRING. */ void string_array_append (struct string_array *sa, const char *string) { string_array_insert (sa, string, sa->n); } /* Appends STRING to SA. Ownership of STRING transfers to SA. */ void string_array_append_nocopy (struct string_array *sa, char *string) { string_array_insert_nocopy (sa, string, sa->n); } /* Inserts a copy of STRING in SA just before the string with index BEFORE, which must be less than or equal to the number of strings in SA. The caller retains ownership of STRING. In general, this function runs in O(n) time in the number of strings that must be shifted to higher indexes; if BEFORE is the number of strings in SA, it runs in amortized constant time. */ void string_array_insert (struct string_array *sa, const char *string, size_t before) { string_array_insert_nocopy (sa, xstrdup (string), before); } static void string_array_expand__ (struct string_array *sa) { if (sa->n >= sa->allocated) sa->strings = x2nrealloc (sa->strings, &sa->allocated, sizeof *sa->strings); } /* Inserts STRING in SA just before the string with index BEFORE, which must be less than or equal to the number of strings in SA. Ownership of STRING transfers to SA. In general, this function runs in O(n) time in the number of strings that must be shifted to higher indexes; if BEFORE is the number of strings in SA, it runs in amortized constant time. */ void string_array_insert_nocopy (struct string_array *sa, char *string, size_t before) { string_array_expand__ (sa); if (before < sa->n) insert_element (sa->strings, sa->n, sizeof *sa->strings, before); sa->strings[before] = string; sa->n++; } /* Deletes from SA the string with index IDX, which must be less than the number of strings in SA, and shifts down the strings with higher indexes. Frees the string. In general, this function runs in O(n) time in the number of strings that must be shifted to lower indexes. If IDX is the last string in SA, it runs in amortized constant time. */ void string_array_delete (struct string_array *sa, size_t idx) { free (string_array_delete_nofree (sa, idx)); } /* Deletes from SA the string with index IDX, which must be less than the number of strings in SA. Returns the string, which the caller is responsible for freeing with free(). In general, this function runs in O(n) time in the number of strings that must be shifted to lower indexes. If IDX is the last string in SA, it runs in amortized constant time. */ char * string_array_delete_nofree (struct string_array *sa, size_t idx) { char *s = sa->strings[idx]; if (idx != sa->n - 1) remove_element (sa->strings, sa->n, sizeof *sa->strings, idx); sa->n--; return s; } /* Deletes all of the strings from SA and frees them. */ void string_array_clear (struct string_array *sa) { size_t i; for (i = 0; i < sa->n; i++) free (sa->strings[i]); sa->n = 0; } /* Ensures that 'sa->strings[sa->n]' is a null pointer (until SA is modified further). */ void string_array_terminate_null (struct string_array *sa) { string_array_expand__ (sa); sa->strings[sa->n] = NULL; } /* Reduces the amount of memory allocated for SA's strings to the minimum necessary. */ void string_array_shrink (struct string_array *sa) { if (sa->allocated > sa->n) { if (sa->n > 0) sa->strings = xrealloc (sa->strings, sa->n * sizeof *sa->strings); else { free (sa->strings); sa->strings = NULL; } sa->allocated = sa->n; } } static int compare_strings (const void *a_, const void *b_) { const void *const *a = a_; const void *const *b = b_; return strcmp (*a, *b); } /* Sorts the strings in SA into order according to strcmp(). */ void string_array_sort (struct string_array *sa) { qsort (sa->strings, sa->n, sizeof *sa->strings, compare_strings); } /* Returns a single string that consists of each of the strings in SA concatenated, separated from each other with SEPARATOR. The caller is responsible for freeing the returned string with free(). */ char * string_array_join (const struct string_array *sa, const char *separator) { struct string dst; const char *s; size_t i; ds_init_empty (&dst); STRING_ARRAY_FOR_EACH (s, i, sa) { if (i > 0) ds_put_cstr (&dst, separator); ds_put_cstr (&dst, s); } return ds_steal_cstr (&dst); } pspp-1.0.1/src/libpspp/argv-parser.h0000644000175000017500000000441612470242642014266 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_ARGV_PARSER_H #define LIBPSPP_ARGV_PARSER_H 1 /* Simple, modular command-line argument parser. glibc has two option parsers, but neither one of them feels quite right: - getopt_long is simple, but not modular, in that there is no easy way to make it accept multiple collections of options supported by different modules. - argp is more sophisticated and more complete, and hence more complex. It still lacks one important feature for modularity: there is no straightforward way for option groups that are implemented independently to have separate auxiliary data. The parser implemented in this file is meant to be simple and modular. It is based internally on getopt_long. */ #include #include #include struct argv_option { const char *long_name; /* Long option name, NULL if none. */ int short_name; /* Short option character, 0 if none. */ int has_arg; /* no_argument, required_argument, or optional_argument. */ int id; /* Value passed to callback. */ }; struct argv_parser *argv_parser_create (void); void argv_parser_destroy (struct argv_parser *); void argv_parser_add_options (struct argv_parser *, const struct argv_option *options, size_t n, void (*cb) (int id, void *aux), void *aux); bool argv_parser_run (struct argv_parser *, int argc, char **argv); #endif /* libpspp/argv-parser.h */ pspp-1.0.1/src/libpspp/bit-vector.h0000644000175000017500000000270712470242642014114 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !bitvector_h #define bitvector_h 1 #include /* Sets bit Y starting at address X. */ #define SET_BIT(X, Y) \ (((unsigned char *) X)[(Y) / CHAR_BIT] |= 1 << ((Y) % CHAR_BIT)) /* Clears bit Y starting at address X. */ #define CLEAR_BIT(X, Y) \ (((unsigned char *) X)[(Y) / CHAR_BIT] &= ~(1 << ((Y) % CHAR_BIT))) /* Sets bit Y starting at address X to Z, which is zero/nonzero */ #define SET_BIT_TO(X, Y, Z) \ ((Z) ? SET_BIT(X, Y) : CLEAR_BIT(X, Y)) /* Nonzero if bit Y starting at address X is set. */ #define TEST_BIT(X, Y) \ (((unsigned char *) X)[(Y) / CHAR_BIT] & (1 << ((Y) % CHAR_BIT))) /* Returns 2**X, 0 <= X < 32. */ #define BIT_INDEX(X) (1ul << (X)) #endif /* bitvector.h */ pspp-1.0.1/src/libpspp/message.h0000644000175000017500000000705012523704223013453 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef MESSAGE_H #define MESSAGE_H 1 #include #include #include "libpspp/compiler.h" /* What kind of message is this? */ enum msg_category { MSG_C_GENERAL, /* General info. */ MSG_C_SYNTAX, /* Messages that relate to syntax files. */ MSG_C_DATA, /* Messages that relate to data files. */ MSG_N_CATEGORIES }; /* How important a condition is it? */ enum msg_severity { MSG_S_ERROR, MSG_S_WARNING, MSG_S_NOTE, MSG_N_SEVERITIES }; const char *msg_severity_to_string (enum msg_severity); /* Combination of a category and a severity for convenience. */ enum msg_class { ME, MW, MN, /* General error/warning/note. */ SE, SW, SN, /* Script error/warning/note. */ DE, DW, DN, /* Data-file error/note. */ MSG_CLASS_CNT, }; static inline enum msg_category msg_class_to_category (enum msg_class class) { return class / 3; } static inline enum msg_severity msg_class_to_severity (enum msg_class class) { return class % 3; } static inline enum msg_class msg_class_from_category_and_severity (enum msg_category category, enum msg_severity severity) { return category * 3 + severity; } /* A message. */ struct msg { enum msg_category category; /* Message category. */ enum msg_severity severity; /* Message severity. */ char *file_name; /* Name of file containing error, or NULL. */ int first_line; /* 1-based line number, or 0 if none. */ int last_line; /* 1-based exclusive last line (0=none). */ int first_column; /* 1-based first column, or 0 if none. */ int last_column; /* 1-based exclusive last column (0=none). */ char *text; /* Error text. */ bool shipped; /* True if this message has been emitted */ }; /* Initialization. */ void msg_set_handler (void (*handler) (const struct msg *, void *lexer), void *aux); /* Working with messages. */ struct msg *msg_dup (const struct msg *); void msg_destroy(struct msg *); char *msg_to_string (const struct msg *, const char *command_name); /* Emitting messages. */ void vmsg (enum msg_class class, const char *format, va_list args) PRINTF_FORMAT (2, 0); void msg (enum msg_class, const char *format, ...) PRINTF_FORMAT (2, 3); void msg_emit (struct msg *); void msg_error (int errnum, const char *format, ...); /* Enable and disable messages. */ void msg_enable (void); void msg_disable (void); /* Error context. */ bool msg_ui_too_many_errors (void); void msg_ui_reset_counts (void); bool msg_ui_any_errors (void); void msg_ui_disable_warnings (bool); /* Used in panic situations only. */ void request_bug_report (const char *msg); #endif /* message.h */ pspp-1.0.1/src/libpspp/start-date.c0000644000175000017500000000271112470242642014074 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "start-date.h" #include #include "str.h" #include "strftime.h" /* Writes the current date into CUR_DATE in the format DD MMM YYYY. */ static void get_cur_date (char cur_date[12]) { time_t now = time (NULL); if (now != (time_t) -1) { struct tm *tm = localtime (&now); if (tm != NULL) { strftime (cur_date, 12, "%d %b %Y", tm); return; } } strcpy (cur_date, "?? ??? 2???"); } /* Returns the date at which PSPP was started, as a string in the format DD MMM YYYY. */ const char * get_start_date (void) { static char start_date[12]; if (start_date[0] == '\0') get_cur_date (start_date); return start_date; } pspp-1.0.1/src/libpspp/cmac-aes256.h0000644000175000017500000000174212523704223013737 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef CMAC_AES256_H #define CMAC_AES256_H 1 #include #include void cmac_aes256(const uint8_t key[32], const void *data, size_t size, uint8_t cmac[16]); #endif /* libpspp/cmac-aes256.h */ pspp-1.0.1/src/libpspp/model-checker.h0000644000175000017500000004623712470243700014542 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Implementation-level model checker. A model checker is a tool for software testing and verification that works by exploring all the possible states in a system and verifying their internal consistency. A conventional model checker requires that the code in a system be translated into a specification language. The model checker then verifies the specification, rather than the code. This is instead an implementation-level model checker, which does not require a separate specification. Instead, the model checker requires writing a second implementation of the system being checked. The second implementation can usually be made almost trivial in comparison to the one being checked, because it's usually acceptable for its performance to be comparatively poor, e.g. O(N^2) instead of O(lg N), and thus to use much simpler algorithms. For introduction to the implementation-level model checking approach used here, please refer to the following papers: Musuvathi, Park, Chou, Engler, Dill, "CMC: A Pragmatic Approach to Model Checking Real Code", Proceedings of the Fifth Symposium on Operating Systems Design and Implementation (OSDI), Dec 2002. http://sprout.stanford.edu/PAPERS/CMC-OSDI-2002/CMC-OSDI-2002.pdf Yang, Twohey, Engler, Musuvathi, "Using Model Checking to Find Serious File System Errors", Proceedings of the Sixth Symposium on Operating System Design and Implementation (OSDI), Dec 2004. http://www.stanford.edu/~engler/osdi04-fisc.pdf Yang, Twohey, Pfaff, Sar, Engler, "EXPLODE: A Lightweight, General Approach to Finding Serious Errors in Storage Systems", First Workshop on the Evaluation of Software Defect Detection Tools (BUGS), June 2005. http://benpfaff.org/papers/explode.pdf Use of a model checker is appropriate when the system being checked is difficult to test using handwritten tests. This can be the case, for example, when the system has a complicated internal state that is difficult to reason about over a long series of operations. The implementation model checker works by putting a set of one of more initial states in a queue (and checking them for consistency). Then the model checker removes a state from the queue and applies all possible operations of interest to it ("mutates" it), obtaining a set of zero or more child states (and checking each of them for consistency). Each of these states is itself added to the queue. The model checker continues dequeuing states and mutating and checking them until the queue is empty. In pseudo-code, the process looks like this: Q = { initial states } while Q is not empty: S = dequeue(Q) for each operation applicable to S do: T = operation(S) check(T) enqueue(Q, T) In many cases this process will never terminate, because every state has one or more child states. For some systems this is unavoidable, but in others we can make the process finite by pursuing a few stratagems: 1. Limit the maximum size of the system; for example, limit the number of rows and columns in the implementation of a table being checked. The client of the model checker is responsible for implementing such limits. 2. Avoid checking a single state more than one time. This model checker provides assistance for this function by allowing the client to provide a hash of the system state. States with identical hashes will only be checked once during a single run. When a system cannot be made finite, or when a finite system is too large to check in a practical amount of time, the model checker provides multiple ways to limit the checking run: based on maximum depth, maximum unique states checked, maximum errors found (by default, 1), or maximum time used for checking. The client of the model checker must provide three functions via function pointers embedded into a "struct mc_class": 1. void init (struct mc *mc); This function is called once at the beginning of a checking run. It checks one or more initial states and adds them to the model checker's queue. (If it does not add any states to the queue, then there is nothing to check.) Here's an outline for writing the init function: void init_foo (struct mc *mc) { struct foo *foo; mc_name_operation (mc, "initial state"); foo = generate_initial_foo (); if (!state_is_consistent (foo)) mc_error (mc, "inconsistent state"); mc_add_state (mc, foo); } 2. void mutate (struct mc *mc, const void *data); This function is called when a dequeued state is ready to be mutated. For each operation that can be applied to the client-specified DATA, it applies that operation to a clone of the DATA, checks that the clone is consistent, and adds the clone to the model checker's queue. Here's an outline for writing the mutate function: void mutate_foo (struct mc *mc, void *state_) { struct foo *state = state_; for (...each operation...) if (mc_include_state (mc)) { struct foo *clone; mc_name_operation (mc, "do operation %s", ...); clone = clone_foo (state); do_operation (clone); if (!state_is_consistent (clone)) mc_error (mc, "inconsistent state"); if (mc_discard_dup_state (mc, hash_foo (clone))) destroy_foo (clone); else mc_add_state (mc, clone); } } Notes on the above outline: - The call to mc_include_state allows currently uninteresting operations to be skipped. It is not essential. - The call to mc_name_operation should give the current operation a human-readable name. The name may include printf-style format specifications. When an error occurs, the model checker (by default) replays the sequence of operations performed to reach the error, printing the name of the operation at each step, which is often sufficient information in itself to debug the error. At higher levels of verbosity, the name is printed for each operation. - Operations should be performed on a copy of the data provided. The data provided should not be destroyed or modified. - The call to mc_discard_dup_state is needed to discard (probably) duplicate states. It is otherwise optional. To reduce the probability of collisions, use a high-quality hash function. MD4 is a reasonable choice: it is fast but high-quality. In one test, switching to MD4 from MD5 increased overall speed of model checking by 8% and actually reduced (!) the number of collisions. The hash value needs to include enough of the state to ensure that interesting states are not excluded, but it need not include the entire state. For example, in many cases, the structure of complex data (metadata) is often much more important than the contents (data), so it may be reasonable to hash only the metadata. mc_discard_dup_state may be called before or after checking for consistency. Calling it after checking may make checking a given number of unique states take longer, but it also ensures that all paths to a given state produce correct results. - The mc_error function reports errors. It may be called as many times as desired to report each kind of inconsistency in a state. - The mc_add_state function adds the new state to the queue. It should be called regardless of whether an error was reported, to indicate to the model checker that state processing has finished. - The mutation function should be deterministic, to make it possible to reliably reproduce errors. 3. void destroy (struct mc *mc, void *data); This function is called to discard the client-specified DATA associated with a state. Numerous options are available for configuring the model checker. The most important of these are: - Search algorithm: * Breadth-first search (the default): First try all the operations with depth 1, then those with depth 2, then those with depth 3, and so on. This search algorithm finds the least number of operations needed to trigger a given bug. * Depth-first search: Searches downward in the tree of states as fast as possible. Good for finding bugs that require long sequences of operations to trigger. * Random-first search: Searches through the tree of states in random order. * Explicit path: Applies an explicitly specified sequence of operations. - Verbosity: By default, messages are printed only when an error is encountered, but you can cause the checker to print a message on every state transition. This is most useful when the errors in your code cause segfaults or some other kind of sudden termination. - Treatment of errors: By default, when an error is encountered, the model checker recursively invokes itself with an increased verbosity level and configured to follow only the error path. As long as the mutation function is deterministic, this quickly and concisely replays the error and describes the path followed to reach it in an easily human-readable manner. - Limits: * Maximum depth: You can limit the depth of the operations performed. Most often useful with depth-first search. By default, depth is unlimited. * Maximum queue length: You can limit the number of states kept in the queue at any given time. The main reason to do so is to limit memory consumption. The default limit is 10,000 states. Several strategies are available for choosing which state to drop when the queue overflows. - Stop conditions: based on maximum unique states checked, maximum errors found (by default, 1), or maximum time used for checking. - Progress: by default, the checker prints a '.' on stderr every .25 seconds, but you can substitute another progress function or disable progress printing. This model checker does not (yet) include two features described in the papers cited above: utility scoring heuristics to guide the search strategy and "choice points" to explore alternative cases. The former feature is less interesting for this model checker, because the data structures we are thus far using it to model are much smaller than those discussed in the paper. The latter feature we should implement at some point. */ #ifndef LIBPSPP_MODEL_CHECKER_H #define LIBPSPP_MODEL_CHECKER_H 1 #include #include #include #include #include "libpspp/compiler.h" /* An active model checking run. */ struct mc; /* Provided by each client of the model checker. */ struct mc_class { void (*init) (struct mc *); void (*mutate) (struct mc *, const void *); void (*destroy) (const struct mc *, void *); }; /* Results of a model checking run. */ struct mc_results; /* Configuration for running the model checker. */ struct mc_options; /* Primary external interface to model checker. */ struct mc_results *mc_run (const struct mc_class *, struct mc_options *); /* Functions for use from client-supplied "init" and "mutate" functions. */ bool mc_include_state (struct mc *); bool mc_discard_dup_state (struct mc *, unsigned int hash); void mc_name_operation (struct mc *, const char *, ...) PRINTF_FORMAT (2, 3); void mc_vname_operation (struct mc *, const char *, va_list) PRINTF_FORMAT (2, 0); void mc_error (struct mc *, const char *, ...) PRINTF_FORMAT (2, 3); void mc_add_state (struct mc *, void *data); /* Functions for use from client-supplied "init", "mutate", and "destroy" functions. */ const struct mc_options *mc_get_options (const struct mc *); const struct mc_results *mc_get_results (const struct mc *); void *mc_get_aux (const struct mc *); /* A path of operations through a model to arrive at some particular state. */ struct mc_path { int *ops; /* Sequence of operations. */ size_t length; /* Number of operations. */ size_t capacity; /* Number of operations for which room is allocated. */ }; void mc_path_init (struct mc_path *); void mc_path_copy (struct mc_path *, const struct mc_path *); void mc_path_push (struct mc_path *, int new_state); int mc_path_pop (struct mc_path *); int mc_path_back (const struct mc_path *); void mc_path_destroy (struct mc_path *); int mc_path_get_operation (const struct mc_path *, size_t index); size_t mc_path_get_length (const struct mc_path *); struct string; void mc_path_to_string (const struct mc_path *, struct string *); struct mc_options *mc_options_create (void); struct mc_options *mc_options_clone (const struct mc_options *); void mc_options_destroy (struct mc_options *); /* Search strategy. */ enum mc_strategy { MC_BROAD, /* Breadth-first search. */ MC_DEEP, /* Depth-first search. */ MC_RANDOM, /* Randomly ordered search. */ MC_PATH /* Follow one explicit path. */ }; enum mc_strategy mc_options_get_strategy (const struct mc_options *); void mc_options_set_strategy (struct mc_options *, enum mc_strategy); unsigned int mc_options_get_seed (const struct mc_options *); void mc_options_set_seed (struct mc_options *, unsigned int seed); int mc_options_get_max_depth (const struct mc_options *); void mc_options_set_max_depth (struct mc_options *, int max_depth); int mc_options_get_hash_bits (const struct mc_options *); void mc_options_set_hash_bits (struct mc_options *, int hash_bits); const struct mc_path *mc_options_get_follow_path (const struct mc_options *); void mc_options_set_follow_path (struct mc_options *, const struct mc_path *); /* Strategy for dropped states from the queue when it overflows. */ enum mc_queue_limit_strategy { MC_DROP_NEWEST, /* Don't enqueue the new state at all. */ MC_DROP_OLDEST, /* Drop the oldest state in the queue. */ MC_DROP_RANDOM /* Drop a random state from the queue. */ }; int mc_options_get_queue_limit (const struct mc_options *); void mc_options_set_queue_limit (struct mc_options *, int queue_limit); enum mc_queue_limit_strategy mc_options_get_queue_limit_strategy ( const struct mc_options *); void mc_options_set_queue_limit_strategy (struct mc_options *, enum mc_queue_limit_strategy); int mc_options_get_max_unique_states (const struct mc_options *); void mc_options_set_max_unique_states (struct mc_options *, int max_unique_states); int mc_options_get_max_errors (const struct mc_options *); void mc_options_set_max_errors (struct mc_options *, int max_errors); double mc_options_get_time_limit (const struct mc_options *); void mc_options_set_time_limit (struct mc_options *, double time_limit); int mc_options_get_verbosity (const struct mc_options *); void mc_options_set_verbosity (struct mc_options *, int verbosity); int mc_options_get_failure_verbosity (const struct mc_options *); void mc_options_set_failure_verbosity (struct mc_options *, int failure_verbosity); FILE *mc_options_get_output_file (const struct mc_options *); void mc_options_set_output_file (struct mc_options *, FILE *); typedef bool mc_progress_func (struct mc *); mc_progress_func mc_progress_dots; mc_progress_func mc_progress_fancy; mc_progress_func mc_progress_verbose; int mc_options_get_progress_usec (const struct mc_options *); void mc_options_set_progress_usec (struct mc_options *, int progress_usec); mc_progress_func *mc_options_get_progress_func (const struct mc_options *); void mc_options_set_progress_func (struct mc_options *, mc_progress_func *); void *mc_options_get_aux (const struct mc_options *); void mc_options_set_aux (struct mc_options *, void *aux); struct argv_parser; void mc_options_register_argv_parser (struct mc_options *, struct argv_parser *); void mc_options_usage (void); /* Reason that a model checking run terminated. */ enum mc_stop_reason { MC_CONTINUING, /* Run has not yet terminated. */ MC_SUCCESS, /* Queue emptied (ran out of states). */ MC_MAX_UNIQUE_STATES, /* Did requested number of unique states. */ MC_MAX_ERROR_COUNT, /* Too many errors. */ MC_END_OF_PATH, /* Processed requested path (MC_PATH only). */ MC_TIMEOUT, /* Timeout. */ MC_INTERRUPTED /* Received SIGINT (Ctrl+C). */ }; void mc_results_destroy (struct mc_results *); enum mc_stop_reason mc_results_get_stop_reason (const struct mc_results *); int mc_results_get_unique_state_count (const struct mc_results *); int mc_results_get_error_count (const struct mc_results *); int mc_results_get_max_depth_reached (const struct mc_results *); double mc_results_get_mean_depth_reached (const struct mc_results *); const struct mc_path *mc_results_get_error_path (const struct mc_results *); int mc_results_get_duplicate_dropped_states (const struct mc_results *); int mc_results_get_off_path_dropped_states (const struct mc_results *); int mc_results_get_depth_dropped_states (const struct mc_results *); int mc_results_get_queue_dropped_states (const struct mc_results *); int mc_results_get_queued_unprocessed_states (const struct mc_results *); int mc_results_get_max_queue_length (const struct mc_results *); struct timeval mc_results_get_start (const struct mc_results *); struct timeval mc_results_get_end (const struct mc_results *); double mc_results_get_duration (const struct mc_results *); void mc_results_print (const struct mc_results *, FILE *); #endif /* libpspp/model-checker.h */ pspp-1.0.1/src/libpspp/inflate.h0000644000175000017500000000176213143642441013457 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef INFLATE_H #define INFLATE_H 1 #include #include struct zip_member ; bool inflate_init (struct zip_member *zm); int inflate_read (struct zip_member *zm, void *buf, size_t n); void inflate_finish (struct zip_member *zm); #endif pspp-1.0.1/src/libpspp/range-set.h0000644000175000017500000002032712470243700013715 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Bitmap, implemented as a balanced binary tree. Each operation has O(lg N) cost, where N is the number of contiguous regions of 1-bits in the bitmap. Also, a cache reduces the second and subsequent containment tests within a single contiguous region to O(1). */ #ifndef LIBPSPP_RANGE_SET_H #define LIBPSPP_RANGE_SET_H #include #include "libpspp/bt.h" #include "libpspp/cast.h" /* A set of ranges. */ struct range_set { struct pool *pool; /* Pool for freeing range_set. */ struct bt bt; /* Tree of range_set_nodes. */ /* Cache. */ unsigned long int cache_start; /* Start of region. */ unsigned long int cache_end; /* One past end of region. */ bool cache_value; /* Is the region in the set? */ }; /* A node in the range set. */ struct range_set_node { struct bt_node bt_node; /* Binary tree node. */ unsigned long int start; /* Start of region. */ unsigned long int end; /* One past end of region. */ }; struct range_set *range_set_create (void); struct range_set *range_set_create_pool (struct pool *); struct range_set *range_set_clone (const struct range_set *, struct pool *); void range_set_destroy (struct range_set *); void range_set_set1 (struct range_set *, unsigned long int start, unsigned long int width); void range_set_set0 (struct range_set *, unsigned long int start, unsigned long int width); bool range_set_allocate (struct range_set *, unsigned long int request, unsigned long int *start, unsigned long int *width); bool range_set_allocate_fully (struct range_set *, unsigned long int request, unsigned long int *start); bool range_set_contains (const struct range_set *, unsigned long int position); unsigned long int range_set_scan (const struct range_set *, unsigned long int start); static inline bool range_set_is_empty (const struct range_set *); #define RANGE_SET_FOR_EACH(NODE, RANGE_SET) \ for ((NODE) = range_set_first (RANGE_SET); \ (NODE) != NULL; \ (NODE) = range_set_next (RANGE_SET, NODE)) static inline const struct range_set_node *range_set_first ( const struct range_set *); static inline const struct range_set_node *range_set_next ( const struct range_set *, const struct range_set_node *); static inline const struct range_set_node *range_set_last ( const struct range_set *); static inline const struct range_set_node *range_set_prev ( const struct range_set *, const struct range_set_node *); static inline unsigned long int range_set_node_get_start ( const struct range_set_node *); static inline unsigned long int range_set_node_get_end ( const struct range_set_node *); static inline unsigned long int range_set_node_get_width ( const struct range_set_node *); /* Inline functions. */ static inline struct range_set_node *range_set_node_from_bt__ ( const struct bt_node *); static inline struct range_set_node *range_set_next__ ( const struct range_set *, const struct range_set_node *); static inline struct range_set_node *range_set_first__ ( const struct range_set *); static inline struct range_set_node *range_set_prev__ ( const struct range_set *, const struct range_set_node *); static inline struct range_set_node *range_set_last__ ( const struct range_set *); /* Returns true if RS contains no 1-bits, false otherwise. */ static inline bool range_set_is_empty (const struct range_set *rs) { return bt_count (&rs->bt) == 0; } /* Returns the node representing the first contiguous region of 1-bits in RS, or a null pointer if RS is empty. Any call to range_set_set1, range_set_set0, or range_set_allocate invalidates the returned node. */ static inline const struct range_set_node * range_set_first (const struct range_set *rs) { return range_set_first__ (rs); } /* If NODE is nonnull, returns the node representing the next contiguous region of 1-bits in RS following NODE, or a null pointer if NODE is the last region in RS. If NODE is null, returns the first region in RS, as for range_set_first. Any call to range_set_set1, range_set_set0, or range_set_allocate invalidates the returned node. */ static inline const struct range_set_node * range_set_next (const struct range_set *rs, const struct range_set_node *node) { return (node != NULL ? range_set_next__ (rs, CONST_CAST (struct range_set_node *, node)) : range_set_first__ (rs)); } /* Returns the node representing the last contiguous region of 1-bits in RS, or a null pointer if RS is empty. Any call to range_set_set1, range_set_set0, or range_set_allocate invalidates the returned node. */ static inline const struct range_set_node * range_set_last (const struct range_set *rs) { return range_set_last__ (rs); } /* If NODE is nonnull, returns the node representing the previous contiguous region of 1-bits in RS following NODE, or a null pointer if NODE is the first region in RS. If NODE is null, returns the last region in RS, as for range_set_last. Any call to range_set_set1, range_set_set0, or range_set_allocate invalidates the returned node. */ static inline const struct range_set_node * range_set_prev (const struct range_set *rs, const struct range_set_node *node) { return (node != NULL ? range_set_prev__ (rs, CONST_CAST (struct range_set_node *, node)) : range_set_last__ (rs)); } /* Returns the position of the first 1-bit in NODE. */ static inline unsigned long int range_set_node_get_start (const struct range_set_node *node) { return node->start; } /* Returns one past the position of the last 1-bit in NODE. */ static inline unsigned long int range_set_node_get_end (const struct range_set_node *node) { return node->end; } /* Returns the number of contiguous 1-bits in NODE. */ static inline unsigned long int range_set_node_get_width (const struct range_set_node *node) { return node->end - node->start; } /* Internal helper functions. */ /* Returns the range_set_node corresponding to the given BT_NODE. Returns a null pointer if BT_NODE is null. */ static inline struct range_set_node * range_set_node_from_bt__ (const struct bt_node *bt_node) { return bt_node ? bt_data (bt_node, struct range_set_node, bt_node) : NULL; } /* Returns the next range_set_node in RS after NODE, or a null pointer if NODE is the last node in RS. */ static inline struct range_set_node * range_set_next__ (const struct range_set *rs, const struct range_set_node *node) { return range_set_node_from_bt__ (bt_next (&rs->bt, &node->bt_node)); } /* Returns the first range_set_node in RS, or a null pointer if RS is empty. */ static inline struct range_set_node * range_set_first__ (const struct range_set *rs) { return range_set_node_from_bt__ (bt_first (&rs->bt)); } /* Returns the previous range_set_node in RS after NODE, or a null pointer if NODE is the first node in RS. */ static inline struct range_set_node * range_set_prev__ (const struct range_set *rs, const struct range_set_node *node) { return range_set_node_from_bt__ (bt_prev (&rs->bt, &node->bt_node)); } /* Returns the last range_set_node in RS, or a null pointer if RS is empty. */ static inline struct range_set_node * range_set_last__ (const struct range_set *rs) { return range_set_node_from_bt__ (bt_last (&rs->bt)); } #endif /* libpspp/range-set.h */ pspp-1.0.1/src/libpspp/assertion.h0000644000175000017500000000231112470413451014032 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef __PSPP_ASSERT_H #define __PSPP_ASSERT_H #include #include "compiler.h" #define NOT_REACHED() do { assert (0); abort (); } while (0) #endif #include #ifndef ASSERT_LEVEL #define ASSERT_LEVEL 2 #endif #undef expensive_assert #if ASSERT_LEVEL >= 5 #define expensive_assert(EXPR) assert (EXPR) #else #define expensive_assert(EXPR) ((void) 0) #endif #define testing_assert(EXPR) do {if (settings_get_testing_mode ()) assert (EXPR); } while (0); pspp-1.0.1/src/libpspp/heap.h0000644000175000017500000000740512470243700012747 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Embedded priority queue, implemented as a heap. Operations have the following cost, where N is the number of nodes already in the heap: - Insert: O(lg N). - Find minimum: O(1). - Delete any node in the heap: O(lg N). - Change value of an node: O(lg N) in general; O(1) in the typically common case where the node does not change its position relative to other nodes. - Search for a node: O(N). (Not implemented; if you need such a routine, use a different data structure or maintain a separate index.) A heap data structure is structured as a packed array. If an array is a natural data structure for your application, then use the push_heap, pop_heap, make_heap, sort_heap, and is_heap functions declared in libpspp/array.h. Otherwise, if your data structure is more dynamic, this implementation may be easier to use. An embedded heap is represented as `struct heap'. Each node in the heap, presumably a structure type, must include a `struct heap_node' member. Here's an example of a structure type that includes a `struct heap_node': struct foo { struct heap_node node; // Heap node member. int x; // Another member. }; Here's an example of how to find the minimum value in such a heap and delete it: struct heap *h = ...; if (!heap_is_empty (h)) { struct foo *foo = heap_data (heap_minimum (h), struct foo, node); printf ("Minimum is %d.\n", foo->x); heap_delete (h, &foo->node); } else printf ("Heap is empty.\n"); */ #ifndef LIBPSPP_HEAP_H #define LIBPSPP_HEAP_H 1 #include "libpspp/cast.h" #include #include struct pool; /* Returns the data structure corresponding to the given heap NODE, assuming that NODE is embedded as the given MEMBER name in data type STRUCT. */ #define heap_data(NODE, STRUCT, MEMBER) \ (CHECK_POINTER_HAS_TYPE (NODE, struct heap_node *), \ UP_CAST (NODE, STRUCT, MEMBER)) /* A node in a heap. Opaque. One of these structures must be embedded in your heap node. */ struct heap_node { size_t idx; }; /* Returns negative if A < B, zero if A == B, positive if A > B. */ typedef int heap_compare_func (const struct heap_node *a, const struct heap_node *b, const void *aux); struct heap *heap_create (heap_compare_func *, const void *aux); struct heap *heap_create_pool (struct pool *, heap_compare_func *, const void *aux); void heap_destroy (struct heap *); bool heap_is_empty (const struct heap *); size_t heap_count (const struct heap *); void heap_moved (struct heap *, struct heap_node *); struct heap_node *heap_minimum (const struct heap *); void heap_insert (struct heap *, struct heap_node *); void heap_delete (struct heap *, struct heap_node *); void heap_changed (struct heap *, struct heap_node *); #endif /* libpspp/heap.h */ pspp-1.0.1/src/libpspp/range-set.c0000644000175000017500000003321612470243700013711 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Bitmap, implemented as a balanced binary tree. */ /* If you add routines in this file, please add a corresponding test to range-set-test.c. This test program should achieve 100% coverage of lines and branches in this code, as reported by "gcov -b". */ #include #include "libpspp/range-set.h" #include #include #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/pool.h" #include "gl/minmax.h" #include "gl/xalloc.h" static int compare_range_set_nodes (const struct bt_node *, const struct bt_node *, const void *aux); static void delete_node (struct range_set *, struct range_set_node *); static struct range_set_node *delete_node_get_next (struct range_set *, struct range_set_node *); static struct range_set_node *find_node_le (const struct range_set *, unsigned long int position); static struct range_set_node *insert_node (struct range_set *, unsigned long int start, unsigned long int end); static void insert_just_before (struct range_set *, unsigned long int start, unsigned long int end, struct range_set_node *); static void merge_node_with_successors (struct range_set *, struct range_set_node *); static void destroy_pool (void *); /* Creates and returns a new, empty range set. */ struct range_set * range_set_create (void) { return range_set_create_pool (NULL); } /* Creates and returns a new, empty range set in the given POOL. */ struct range_set * range_set_create_pool (struct pool *pool) { struct range_set *rs = xmalloc (sizeof *rs); rs->pool = pool; if (pool != NULL) pool_register (pool, destroy_pool, rs); bt_init (&rs->bt, compare_range_set_nodes, NULL); rs->cache_end = 0; return rs; } /* Creates and returns a clone of OLD range set in the given POOL (which may be null). */ struct range_set * range_set_clone (const struct range_set *old, struct pool *pool) { struct range_set *new; struct range_set_node *node; new = range_set_create_pool (pool); for (node = range_set_first__ (old); node != NULL; node = range_set_next__ (old, node)) insert_node (new, node->start, node->end); return new; } /* Destroys range set RS. */ void range_set_destroy (struct range_set *rs) { if (rs != NULL) { if (rs->pool != NULL) pool_unregister (rs->pool, rs); while (!range_set_is_empty (rs)) delete_node (rs, range_set_first__ (rs)); free (rs); } } /* Inserts the region starting at START and extending for WIDTH into RS. */ void range_set_set1 (struct range_set *rs, unsigned long int start, unsigned long int width) { unsigned long int end = start + width; struct range_set_node *node; assert (width == 0 || start + width - 1 >= start); if (width == 0) return; /* Invalidate cache. */ rs->cache_end = 0; node = find_node_le (rs, start); if (node != NULL) { if (start > node->end) { /* New region does not overlap NODE, but it might overlap the next node. */ insert_just_before (rs, start, end, range_set_next__ (rs, node)); } else if (end > node->end) { /* New region starts in the middle of NODE and continues past its end, so extend NODE, then merge it with any following node that it now potentially overlaps. */ node->end = end; merge_node_with_successors (rs, node); } else { /* New region is completely contained by NODE, so there's nothing to do. */ } } else { /* New region starts before any existing region, but it might overlap the first region. */ insert_just_before (rs, start, end, range_set_first__ (rs)); } } /* Deletes the region starting at START and extending for WIDTH from RS. */ void range_set_set0 (struct range_set *rs, unsigned long int start, unsigned long int width) { unsigned long int end = start + width; struct range_set_node *node; assert (width == 0 || start + width - 1 >= start); if (width == 0) return; /* Invalidate cache. */ rs->cache_end = 0; node = find_node_le (rs, start); if (node == NULL) node = range_set_first__ (rs); while (node != NULL && end > node->start) { if (start <= node->start) { if (end >= node->end) { /* Region to delete covers entire node. */ node = delete_node_get_next (rs, node); } else { /* Region to delete covers only left part of node. */ node->start = end; break; } } else if (start < node->end) { if (end < node->end) { /* Region to delete covers middle of the node, so we have to split the node into two pieces. */ unsigned long int old_node_end = node->end; node->end = start; insert_node (rs, end, old_node_end); break; } else { /* Region to delete covers only right part of node. */ node->end = start; node = range_set_next__ (rs, node); } } else node = range_set_next__ (rs, node); } } /* Scans RS for its first 1-bit and deletes up to REQUEST contiguous 1-bits starting at that position. Unless RS is completely empty, sets *START to the position of the first 1-bit deleted and *WIDTH to the number actually deleted, which may be less than REQUEST if fewer contiguous 1-bits were present, and returns true. If RS is completely empty, returns false. */ bool range_set_allocate (struct range_set *rs, unsigned long int request, unsigned long int *start, unsigned long int *width) { struct range_set_node *node; unsigned long int node_width; assert (request > 0); node = range_set_first__ (rs); if (node == NULL) return false; node_width = node->end - node->start; *start = node->start; if (request < node_width) { *width = request; node->start += request; } else { *width = node_width; delete_node (rs, node); } rs->cache_end = 0; return true; } /* Scans RS for and deletes the first contiguous run of REQUEST 1-bits. If successful, sets *START to the position of the first 1-bit deleted and returns true If RS does not contain a run of REQUEST or more contiguous 1-bits, returns false and does not modify RS. */ bool range_set_allocate_fully (struct range_set *rs, unsigned long int request, unsigned long int *start) { struct range_set_node *node; assert (request > 0); for (node = range_set_first__ (rs); node != NULL; node = range_set_next__ (rs, node)) { unsigned long int node_width = node->end - node->start; if (node_width >= request) { *start = node->start; if (node_width > request) node->start += request; else delete_node (rs, node); rs->cache_end = 0; return true; } } return false; } /* Returns true if there is a 1-bit at the given POSITION in RS, false otherwise. */ bool range_set_contains (const struct range_set *rs_, unsigned long int position) { struct range_set *rs = CONST_CAST (struct range_set *, rs_); if (position < rs->cache_end && position >= rs->cache_start) return rs->cache_value; else { struct range_set_node *node = find_node_le (rs, position); if (node != NULL) { if (position < node->end) { rs->cache_start = node->start; rs->cache_end = node->end; rs->cache_value = true; return true; } else { struct range_set_node *next = range_set_next__ (rs, node); rs->cache_start = node->end; rs->cache_end = next != NULL ? next->start : ULONG_MAX; rs->cache_value = false; return false; } } else { node = range_set_first__ (rs); rs->cache_start = 0; rs->cache_end = node != NULL ? node->start : ULONG_MAX; rs->cache_value = false; return false; } } } /* Returns the smallest position of a 1-bit greater than or equal to START. Returns ULONG_MAX if there is no 1-bit with position greater than or equal to START. */ unsigned long int range_set_scan (const struct range_set *rs_, unsigned long int start) { struct range_set *rs = CONST_CAST (struct range_set *, rs_); unsigned long int retval = ULONG_MAX; struct bt_node *bt_node; if (start < rs->cache_end && start >= rs->cache_start && rs->cache_value) return start; bt_node = rs->bt.root; while (bt_node != NULL) { struct range_set_node *node = range_set_node_from_bt__ (bt_node); if (start < node->start) { retval = node->start; bt_node = node->bt_node.down[0]; } else if (start >= node->end) bt_node = node->bt_node.down[1]; else { rs->cache_start = node->start; rs->cache_end = node->end; rs->cache_value = true; return start; } } return retval; } /* Compares `range_set_node's A and B and returns a strcmp-like return value. */ static int compare_range_set_nodes (const struct bt_node *a_, const struct bt_node *b_, const void *aux UNUSED) { const struct range_set_node *a = range_set_node_from_bt__ (a_); const struct range_set_node *b = range_set_node_from_bt__ (b_); return a->start < b->start ? -1 : a->start > b->start; } /* Deletes NODE from RS and frees it. */ static void delete_node (struct range_set *rs, struct range_set_node *node) { bt_delete (&rs->bt, &node->bt_node); free (node); } /* Deletes NODE from RS, frees it, and returns the following node. */ static struct range_set_node * delete_node_get_next (struct range_set *rs, struct range_set_node *node) { struct range_set_node *next = range_set_next__ (rs, node); delete_node (rs, node); return next; } /* Returns the node in RS that would be just before POSITION if a range_set_node with `start' as POSITION were inserted. Returns a null pointer if POSITION is before any existing node in RS. If POSITION would duplicate an existing region's start, returns that region. */ static struct range_set_node * find_node_le (const struct range_set *rs, unsigned long int position) { struct range_set_node tmp; tmp.start = position; return range_set_node_from_bt__ (bt_find_le (&rs->bt, &tmp.bt_node)); } /* Creates a new region with the given START and END, inserts the region into RS, and returns the new region. */ static struct range_set_node * insert_node (struct range_set *rs, unsigned long int start, unsigned long int end) { struct range_set_node *node = xmalloc (sizeof *node); struct bt_node *dummy; node->start = start; node->end = end; dummy = bt_insert (&rs->bt, &node->bt_node); assert (dummy == NULL); return node; } /* Inserts the region START...END (exclusive) into RS given that the new region is "just before" NODE, that is, if NODE is nonnull, the new region is known not to overlap any node preceding NODE, and START precedes NODE's start; if NODE is null, then the new region is known to follow any and all regions already in RS. */ static void insert_just_before (struct range_set *rs, unsigned long int start, unsigned long int end, struct range_set_node *node) { assert (node == NULL || start < node->start); if (node != NULL && end >= node->start) { /* New region overlaps NODE, so just extend NODE. */ node->start = start; if (end > node->end) { node->end = end; merge_node_with_successors (rs, node); } } else { /* New region does not overlap NODE. */ insert_node (rs, start, end); } } /* Merges NODE in RS with its successors. */ static void merge_node_with_successors (struct range_set *rs, struct range_set_node *node) { struct range_set_node *next; while ((next = range_set_next__ (rs, node)) != NULL && node->end >= next->start) { if (next->end > node->end) node->end = next->end; delete_node (rs, next); } } /* Destroys range set RS. Helper function for range_set_create_pool. */ static void destroy_pool (void *rs_) { struct range_set *rs = rs_; rs->pool = NULL; range_set_destroy (rs); } pspp-1.0.1/src/libpspp/inflate.c0000644000175000017500000000611213143642441013444 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "inflate.h" #include #include #include #include #include "zip-reader.h" #include "str.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) #define UCOMPSIZE 4096 struct inflator { z_stream zss; int state; unsigned char ucomp[UCOMPSIZE]; size_t bytes_uncomp; size_t ucomp_bytes_read; /* Two bitfields as defined by RFC1950 */ uint16_t cmf_flg ; }; void inflate_finish (struct zip_member *zm) { struct inflator *inf = zm->aux; inflateEnd (&inf->zss); free (inf); } bool inflate_init (struct zip_member *zm) { int r; struct inflator *inf = xzalloc (sizeof *inf); uint16_t flg = 0 ; uint16_t cmf = 0x8; /* Always 8 for inflate */ const uint16_t cinfo = 7; /* log_2(Window size) - 8 */ cmf |= cinfo << 4; /* Put cinfo into the high nibble */ /* make these into a 16 bit word */ inf->cmf_flg = (cmf << 8 ) | flg; /* Set the check bits */ inf->cmf_flg += 31 - (inf->cmf_flg % 31); assert (inf->cmf_flg % 31 == 0); inf->zss.next_in = Z_NULL; inf->zss.avail_in = 0; inf->zss.zalloc = Z_NULL; inf->zss.zfree = Z_NULL; inf->zss.opaque = Z_NULL; r = inflateInit (&inf->zss); if ( Z_OK != r) { ds_put_format (zm->errmsgs, _("Cannot initialize inflator: %s"), zError (r)); return false; } zm->aux = inf; return true; } int inflate_read (struct zip_member *zm, void *buf, size_t n) { int r; struct inflator *inf = zm->aux; if (inf->zss.avail_in == 0) { int bytes_read; int bytes_to_read; int pad = 0; if ( inf->state == 0) { inf->ucomp[1] = inf->cmf_flg ; inf->ucomp[0] = inf->cmf_flg >> 8 ; pad = 2; inf->state++; } bytes_to_read = zm->comp_size - inf->ucomp_bytes_read; if (bytes_to_read == 0) return 0; if (bytes_to_read > UCOMPSIZE) bytes_to_read = UCOMPSIZE; bytes_read = fread (inf->ucomp + pad, 1, bytes_to_read - pad, zm->fp); inf->ucomp_bytes_read += bytes_read; inf->zss.avail_in = bytes_read + pad; inf->zss.next_in = inf->ucomp; } inf->zss.avail_out = n; inf->zss.next_out = buf; r = inflate (&inf->zss, Z_NO_FLUSH); if ( Z_OK == r) { return n - inf->zss.avail_out; } ds_put_format (zm->errmsgs, _("Error inflating: %s"), zError (r)); return -1; } pspp-1.0.1/src/libpspp/compiler.h0000644000175000017500000000653113137223525013647 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2010, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef COMPILER_H #define COMPILER_H 1 /* GNU C allows the programmer to declare that certain functions take printf-like arguments, never return, etc. Conditionalize these declarations on whether gcc is in use. */ #if __GNUC__ > 1 #define ATTRIBUTE(X) __attribute__ (X) /* Only necessary because of a wart in gnulib's xalloc.h. */ #define __attribute__(X) __attribute__ (X) #else #define ATTRIBUTE(X) #endif /* Marks a function argument as possibly not used. */ #define UNUSED ATTRIBUTE ((unused)) /* Marks a function that will never return. */ #define NO_RETURN ATTRIBUTE ((noreturn)) /* Mark a function as taking a printf- or scanf-like format string as its FMT'th argument and that the FIRST'th argument is the first one to be checked against the format string. */ #define PRINTF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (__printf__, FMT, FIRST))) #define SCANF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (__scanf__, FMT, FIRST))) /* Tells the compiler that a function may be treated as if any non-`NULL' pointer it returns cannot alias any other pointer valid when the function returns. */ #if __GNUC__ > 2 #define MALLOC_LIKE ATTRIBUTE ((__malloc__)) #else #define MALLOC_LIKE #endif /* This attribute was added in GCC 4.0. */ #if __GNUC__ >= 4 #define WARN_UNUSED_RESULT ATTRIBUTE ((warn_unused_result)) #else #define WARN_UNUSED_RESULT #endif /* This attribute indicates that the function does not examine any values except its arguments, and has no effects except the return value. A function that has pointer arguments and examines the data pointed to must _not_ be declared `const'. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5) #define CONST_FUNCTION ATTRIBUTE ((const)) #else #define CONST_FUNCTION #endif /* This attribute indicates that the function has no effects except the return value and its return value depends only on the parameters and/or global variables. */ #if __GNUC__ > 2 #define PURE_FUNCTION ATTRIBUTE ((pure)) #else #define PURE_FUNCTION #endif /* This attribute indicates that the argument with the given IDX must be a null pointer. IDX counts backward in the argument list, so that 0 is the last argument, 1 is the second-from-last argument, and so on. */ #if __GNUC__ > 3 #define SENTINEL(IDX) ATTRIBUTE ((sentinel(IDX))) #else #define SENTINEL(IDX) #endif /* This attribute indicates that the function should be compiled with the specified LEVEL, regardless of what has been specified on the command line */ #if __GNUC__ > 3 #define OPTIMIZE(LEVEL) ATTRIBUTE ((optimize(LEVEL))) #else #define OPTIMIZE(LEVEL) #endif #endif /* compiler.h */ pspp-1.0.1/src/libpspp/hmapx.h0000644000175000017500000004505613137223525013157 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Hash table with separate chaining. This header (hmapx.h) supplies an "external" implementation of a hash table that uses linked lists to resolve collisions ("separate chaining"). Its companion header (hmap.h) supplies a "embedded" implementation that is otherwise similar. The two variants are described briefly here. The external variant, for which this is the header, is described in slightly more detail below. Each function also has a detailed usage comment at its point of definition. (Many of those definitions are inline in this file, because they are so simple. Others are in hmapx.c.) The "hmap" embedded hash table implementation puts the hash table node (which includes the linked list used for resolving collisions) within the data structure that the hash table contains. This makes allocation efficient, in space and time, because no additional call into an allocator is needed to obtain memory for the hash table node. It also makes it easy to find the hash table node associated with a given object. However, it's difficult to include a given object in an arbitrary number of hash tables. The "hmapx" external hash table implementation allocates hash table nodes separately from the objects in the hash table. Inserting and removing hash table elements requires dynamic allocation, so it is normally slower and takes more memory than the embedded implementation. It also requires searching the table to find the node associated with a given object. However, it's easy to include a given object in an arbitrary number of hash tables. It's also possible to create an external hash table without adding a member to the data structure that the hash table contains. */ #ifndef LIBPSPP_HMAPX_H #define LIBPSPP_HMAPX_H 1 /* External hash table with separate chaining. To create an external hash table, declare an instance of struct hmapx, then initialize it with hmapx_init(): struct hmapx map; hmapx_init (&map); or, alternatively: struct hmapx map = HMAPX_INITIALIZER (map); An hmapx data structure contains data represented as void *. The hmapx_insert() function inserts such a datum and returns the address of a newly created struct hmapx_node that represents the new element: struct foo { const char *key; const char *value; }; struct foo foo = {"key", "value"}; struct hmapx_node *node; node = hmapx_insert (&map, &foo, hsh_hash_string (foo.key)); The element's hash value must be passed as one of hmapx_insert()'s arguments. The hash table saves this hash value for use later to speed searches and to rehash as the hash table grows. hmapx_insert() does not check whether the newly inserted element duplicates an element already in the hash table. The client is responsible for doing so, if this is desirable. Use hmapx_delete() to delete an element from the hash table, passing in its hmapx_node: hmapx_delete (&map, node); Deleting an element frees its node. The hash table does not provide a direct way to search for an existing element. Instead, it provides the means to iterate over all the elements in the hash table with a given hash value. It is easy to compose a search function from such a building block. For example: struct hmapx_node * find_node (const struct hmapx *map, const char *target) { struct hmapx_node *node; struct foo *foo; HMAPX_FOR_EACH_WITH_HASH (foo, node, hsh_hash_string (target), map) if (!strcmp (foo->key, target)) break; return node; } This function's client can extract the data item from the returned hmapx_node using the hmapx_node_data() function. The hmapx_node can also be useful directly as an argument to other hmapx functions, such as hmapx_delete(). Here is how to iterate through the elements currently in the hash table: struct hmapx_node *node; const char *string; HMAPX_FOR_EACH (data, node, &map) { ...do something with string... } */ #include "libpspp/hmap.h" #include /* Hash table node. */ struct hmapx_node { struct hmap_node hmap_node; /* Underlying hash node. */ void *data; /* User data. */ }; static inline void *hmapx_node_data (const struct hmapx_node *); static inline size_t hmapx_node_hash (const struct hmapx_node *); /* Hash table. */ struct hmapx { struct hmap hmap; }; /* Suitable for use as the initializer for a struct hmapx named MAP. Typical usage: struct hmap map = HMAPX_INITIALIZER (map); HMAPX_INITIALIZER() is an alternative to hmapx_init(). */ #define HMAPX_INITIALIZER(MAP) { HMAP_INITIALIZER (MAP.hmap) } /* Creation and destruction. */ static inline void hmapx_init (struct hmapx *); static inline void hmapx_swap (struct hmapx *, struct hmapx *); void hmapx_clear (struct hmapx *); void hmapx_destroy (struct hmapx *); /* Storage management. */ static inline void hmapx_reserve (struct hmapx *, size_t capacity); static inline void hmapx_shrink (struct hmapx *); /* Search. */ static inline struct hmapx_node *hmapx_first_with_hash (struct hmapx *, size_t hash); static inline struct hmapx_node *hmapx_next_with_hash (struct hmapx_node *); /* Insertion and deletion. */ struct hmapx_node *hmapx_insert (struct hmapx *, void *, size_t hash); struct hmapx_node *hmapx_insert_fast (struct hmapx *, void *, size_t hash); static inline void hmapx_delete (struct hmapx *, struct hmapx_node *); /* Iteration. */ static inline struct hmapx_node *hmapx_first (const struct hmapx *); static inline struct hmapx_node *hmapx_next (const struct hmapx *, const struct hmapx_node *); /* Counting. */ static inline bool hmapx_is_empty (const struct hmapx *); static inline size_t hmapx_count (const struct hmapx *); static inline size_t hmapx_capacity (const struct hmapx *); /* Updating data elements. */ static inline void hmapx_change (struct hmapx *, struct hmapx_node *, void *, size_t new_hash); static inline void hmapx_changed (struct hmapx *, struct hmapx_node *, size_t new_hash); static inline void hmapx_move (struct hmapx_node *, void *); /* Convenience macros for search. These macros automatically use hmapx_node_data() to obtain the data elements that encapsulate hmap nodes, which often saves typing and can make code easier to read. Refer to the large comment near the top of this file for an example. These macros evaluate HASH only once. They evaluate their other arguments many times. */ #define HMAPX_FOR_EACH_WITH_HASH(DATA, NODE, HASH, HMAPX) \ for ((NODE) = hmapx_first_with_hash (HMAPX, HASH); \ (NODE) != NULL ? ((DATA) = hmapx_node_data (NODE), 1) : 0; \ (NODE) = hmapx_next_with_hash (NODE)) #define HMAPX_FOR_EACH_WITH_HASH_SAFE(DATA, NODE, NEXT, HASH, HMAPX) \ for ((NODE) = hmapx_first_with_hash (HMAPX, HASH); \ ((NODE) != NULL \ ? ((DATA) = hmapx_node_data (NODE), \ (NEXT) = hmapx_next_with_hash (NODE), \ 1) \ : 0); \ (NODE) = (NEXT)) /* Convenience macros for iteration. These macros automatically use hmapx_node_data() to obtain the data elements that encapsulate hmap nodes, which often saves typing and can make code easier to read. Refer to the large comment near the top of this file for an example. These macros evaluate their arguments many times. */ #define HMAPX_FOR_EACH(DATA, NODE, HMAPX) \ for ((NODE) = hmapx_first (HMAPX); \ (NODE) != NULL ? ((DATA) = hmapx_node_data (NODE), 1) : 0; \ (NODE) = hmapx_next (HMAPX, NODE)) #define HMAPX_FOR_EACH_SAFE(DATA, NODE, NEXT, HMAPX) \ for ((NODE) = hmapx_first (HMAPX); \ ((NODE) != NULL \ ? ((DATA) = hmapx_node_data (NODE), \ (NEXT) = hmapx_next (HMAPX, NODE), \ 1) \ : 0); \ (NODE) = (NEXT)) /* Inline definitions. */ /* Returns the data stored in NODE. */ static inline void * hmapx_node_data (const struct hmapx_node *node) { return node->data; } /* Returns the hash value stored in NODE */ static inline size_t hmapx_node_hash (const struct hmapx_node *node) { return hmap_node_hash (&node->hmap_node); } /* Initializes MAP as a new hash map that is initially empty. */ static inline void hmapx_init (struct hmapx *map) { hmap_init (&map->hmap); } /* Exchanges the contents of hash maps A and B. */ static inline void hmapx_swap (struct hmapx *a, struct hmapx *b) { hmap_swap (&a->hmap, &b->hmap); } /* Ensures that MAP has sufficient space to store at least CAPACITY data elements, allocating a new set of buckets and rehashing if necessary. */ static inline void hmapx_reserve (struct hmapx *map, size_t capacity) { hmap_reserve (&map->hmap, capacity); } /* Shrinks MAP's set of buckets to the minimum number needed to store its current number of elements, allocating a new set of buckets and rehashing if that would save space. */ static inline void hmapx_shrink (struct hmapx *map) { hmap_shrink (&map->hmap); } /* Returns the first node in MAP that has hash value HASH, or a null pointer if MAP does not contain any node with that hash value. Assuming uniform hashing and no duplicate data items in MAP, this function runs in constant time. (Amortized over an iteration over all data items with a given HASH, its runtime is proportional to the length of the hash chain for HASH, so given a pathological hash function, e.g. one that returns a constant value, its runtime degenerates to linear in the length of NODE's hash chain.) Nodes are returned in arbitrary order that may change whenever the hash table's current capacity changes, as reported by hmapx_capacity(). Calls to hmapx_insert(), hmapx_reserve(), and hmapx_shrink() can change the capacity of a hash map. Inserting a node with hmapx_insert_fast() or deleting one with hmapx_delete() will not change the relative ordering of nodes. The HMAPX_FOR_EACH_WITH_HASH and HMAPX_FOR_EACH_WITH_HASH_SAFE macros provide convenient ways to iterate over all the nodes with a given hash. */ static inline struct hmapx_node * hmapx_first_with_hash (struct hmapx *map, size_t hash) { return HMAP_FIRST_WITH_HASH (struct hmapx_node, hmap_node, &map->hmap, hash); } /* Returns the next node in MAP after NODE that has the same hash value as NODE, or a null pointer if MAP does not contain any more nodes with that hash value. Assuming uniform hashing and no duplicate data items in MAP, this function runs in constant time. (Amortized over an iteration over all data items with a given HASH, its runtime is proportional to the length of the hash chain for HASH, so given a pathological hash function, e.g. one that returns a constant value, its runtime degenerates to linear in the length of NODE's hash chain.) Nodes are returned in arbitrary order that may change whenever the hash table's current capacity changes, as reported by hmapx_capacity(). Calls to hmapx_insert(), hmapx_reserve(), and hmapx_shrink() can change the capacity of a hash map. Inserting a node with hmapx_insert_fast() or deleting one with hmapx_delete() will not change the relative ordering of nodes. The HMAPX_FOR_EACH_WITH_HASH and HMAPX_FOR_EACH_WITH_HASH_SAFE macros provide convenient ways to iterate over all the nodes with a given hash. */ static inline struct hmapx_node * hmapx_next_with_hash (struct hmapx_node *node) { return HMAP_NEXT_WITH_HASH (node, struct hmapx_node, hmap_node); } /* Removes NODE from MAP and frees NODE. The client is responsible for freeing the user data associated with NODE, if appropriate. Assuming uniform hashing, this function runs in constant time. (Its runtime is proportional to the position of NODE in its hash chain, so given a pathological hash function, e.g. one that returns a constant value, its runtime degenerates to linear in the length of NODE's hash chain.) This function never reduces the number of buckets in MAP. When one deletes a large number of nodes from a hash table, calling hmapx_shrink() afterward may therefore save a small amount of memory. It is also more expensive to iterate through a very sparse hash table than a denser one, so shrinking the hash table could also save some time. However, rehashing has an immediate cost that must be weighed against these benefits. hmapx_delete() does not change NODE's hash value reported by hmapx_node_hash(). */ static inline void hmapx_delete (struct hmapx *map, struct hmapx_node *node) { hmap_delete (&map->hmap, &node->hmap_node); free (node); } /* Returns the first node in MAP, or a null pointer if MAP is empty. Amortized over iterating through every data element in MAP, this function runs in constant time. However, this assumes that MAP is not excessively sparse, that is, that hmapx_capacity(MAP) is at most a constant factor greater than hmapx_count(MAP). This will always be true unless many nodes have been inserted into MAP and then most or all of them deleted; in such a case, calling hmapx_shrink() is advised. Nodes are returned in arbitrary order that may change whenever the hash table's current capacity changes, as reported by hmapx_capacity(). Calls to hmapx_insert(), hmapx_reserve(), and hmapx_shrink() can change the capacity of a hash map. Inserting a node with hmapx_insert_fast() or deleting one with hmapx_delete() will not change the relative ordering of nodes. The HMAPX_FOR_EACH and HMAPX_FOR_EACH_SAFE macros provide convenient ways to iterate over all the nodes in a hash map. */ static inline struct hmapx_node * hmapx_first (const struct hmapx *map) { return HMAP_FIRST (struct hmapx_node, hmap_node, &map->hmap); } /* Returns the next node in MAP following NODE, or a null pointer if NODE is the last node in MAP. Amortized over iterating through every data element in MAP, this function runs in constant time. However, this assumes that MAP is not excessively sparse, that is, that hmapx_capacity(MAP) is at most a constant factor greater than hmapx_count(MAP). This will always be true unless many nodes have been inserted into MAP and then most or all of them deleted; in such a case, calling hmapx_shrink() is advised. Nodes are returned in arbitrary order that may change whenever the hash table's current capacity changes, as reported by hmapx_capacity(). Calls to hmapx_insert(), hmapx_reserve(), and hmapx_shrink() can change the capacity of a hash map. Inserting a node with hmapx_insert_fast() or deleting one with hmapx_delete() will not change the relative ordering of nodes. The HMAPX_FOR_EACH and HMAPX_FOR_EACH_SAFE macros provide convenient ways to iterate over all the nodes in a hash map. */ static inline struct hmapx_node * hmapx_next (const struct hmapx *map, const struct hmapx_node *node) { return HMAP_NEXT (node, struct hmapx_node, hmap_node, &map->hmap); } /* Returns true if MAP currently contains no data items, false otherwise. */ static inline bool hmapx_is_empty (const struct hmapx *map) { return hmap_is_empty (&map->hmap); } /* Returns the number of data items currently in MAP. */ static inline size_t hmapx_count (const struct hmapx *map) { return hmap_count (&map->hmap); } /* Returns the current capacity of MAP, that is, the maximum number of data elements that MAP may hold before it becomes advisable to rehash. The capacity is advisory only: it is possible to insert any number of data elements into a hash map regardless of its capacity. However, inserting many more elements than the map's capacity will degrade search performance. */ static inline size_t hmapx_capacity (const struct hmapx *map) { return hmap_capacity (&map->hmap); } /* Changes NODE's data to DATA and its hash value to NEW_HASH. NODE must reside in MAP. This function does not verify that MAP does not already contain a data item that duplicates DATA. If duplicates should be disallowed (which is the usual case), then the client must check for duplicates before changing NODE's value. */ static inline void hmapx_change (struct hmapx *map, struct hmapx_node *node, void *data, size_t new_hash) { hmapx_move (node, data); hmapx_changed (map, node, new_hash); } /* Moves NODE around in MAP to compensate for its hash value having changed to NEW_HASH. This function does not verify that MAP does not already contain a data item that duplicates the new value of NODE's data. If duplicates should be disallowed (which is the usual case), then the client must check for duplicates before changing NODE's value. */ static inline void hmapx_changed (struct hmapx *map, struct hmapx_node *node, size_t new_hash) { hmap_changed (&map->hmap, &node->hmap_node, new_hash); } /* Updates NODE to compensate for its data item having moved around in memory to new location DATA. The data item's value and hash value should not have changed. (If they have changed, call hmapx_change() instead.) */ static inline void hmapx_move (struct hmapx_node *node, void *data) { node->data = data; } #endif /* libpspp/hmapx.h */ pspp-1.0.1/src/libpspp/llx.c0000644000175000017500000005320712470243700012625 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* External, circular doubly linked list. */ /* These library routines have no external dependencies, other than ll.c and the standard C library. If you add routines in this file, please add a corresponding test to llx-test.c. This test program should achieve 100% coverage of lines and branches in this code, as reported by "gcov -b". */ #ifdef HAVE_CONFIG_H #include #endif #include "libpspp/llx.h" #include "libpspp/compiler.h" #include #include /* Destroys LIST and frees all of its nodes using MANAGER. If DESTRUCTOR is non-null, each node in the list will be passed to it in list order, with AUX as auxiliary data, before that node is destroyed. */ void llx_destroy (struct llx_list *list, llx_action_func *destructor, void *aux, const struct llx_manager *manager) { struct llx *llx, *next; for (llx = llx_head (list); llx != llx_null (list); llx = next) { next = llx_next (llx); if (destructor != NULL) destructor (llx_data (llx), aux); manager->release (llx, manager->aux); } } /* Returns the number of nodes in LIST (not counting the null node). Executes in O(n) time in the length of the list. */ size_t llx_count (const struct llx_list *list) { return llx_count_range (llx_head (list), llx_null (list)); } /* Inserts DATA at the head of LIST. Returns the new node (allocated with MANAGER), or a null pointer if memory allocation failed. */ struct llx * llx_push_head (struct llx_list *list, void *data, const struct llx_manager *manager) { return llx_insert (llx_head (list), data, manager); } /* Inserts DATA at the tail of LIST. Returns the new node (allocated with MANAGER), or a null pointer if memory allocation failed. */ struct llx * llx_push_tail (struct llx_list *list, void *data, const struct llx_manager *manager) { return llx_insert (llx_null (list), data, manager); } /* Removes the first node in LIST, which must not be empty, and returns the data that the node contained. Frees the node removed with MANAGER. */ void * llx_pop_head (struct llx_list *list, const struct llx_manager *manager) { struct llx *llx = llx_from_ll (ll_head (&list->ll_list)); void *data = llx_data (llx); llx_remove (llx, manager); return data; } /* Removes the last node in LIST, which must not be empty, and returns the data that the node contained. Frees the node removed with MANAGER. */ void * llx_pop_tail (struct llx_list *list, const struct llx_manager *manager) { struct llx *llx = llx_from_ll (ll_tail (&list->ll_list)); void *data = llx_data (llx); llx_remove (llx, manager); return data; } /* Inserts DATA before BEFORE. Returns the new node (allocated with MANAGER), or a null pointer if memory allocation failed. */ struct llx * llx_insert (struct llx *before, void *data, const struct llx_manager *manager) { struct llx *llx = manager->allocate (manager->aux); if (llx != NULL) { llx->data = data; ll_insert (&before->ll, &llx->ll); } return llx; } /* Removes R0...R1 from their current list and inserts them just before BEFORE. */ void llx_splice (struct llx *before, struct llx *r0, struct llx *r1) { ll_splice (&before->ll, &r0->ll, &r1->ll); } /* Exchanges the positions of A and B, which may be in the same list or different lists. */ void llx_swap (struct llx *a, struct llx *b) { ll_swap (&a->ll, &b->ll); } /* Exchanges the positions of A0...A1 and B0...B1, which may be in the same list or different lists but must not overlap. */ void llx_swap_range (struct llx *a0, struct llx *a1, struct llx *b0, struct llx *b1) { ll_swap_range (&a0->ll, &a1->ll, &b0->ll, &b1->ll); } /* Removes LLX from its list and returns the node that formerly followed it. Frees the node removed with MANAGER. */ struct llx * llx_remove (struct llx *llx, const struct llx_manager *manager) { struct llx *next = llx_next (llx); ll_remove (&llx->ll); manager->release (llx, manager->aux); return next; } /* Removes R0...R1 from their list. Frees the removed nodes with MANAGER. */ void llx_remove_range (struct llx *r0, struct llx *r1, const struct llx_manager *manager) { struct llx *llx; for (llx = r0; llx != r1; ) llx = llx_remove (llx, manager); } /* Removes from R0...R1 all the nodes that equal TARGET according to COMPARE given auxiliary data AUX. Frees the removed nodes with MANAGER. Returns the number of nodes removed. */ size_t llx_remove_equal (struct llx *r0, struct llx *r1, const void *target, llx_compare_func *compare, void *aux, const struct llx_manager *manager) { struct llx *x; size_t count; count = 0; for (x = r0; x != r1; ) if (compare (llx_data (x), target, aux) == 0) { x = llx_remove (x, manager); count++; } else x = llx_next (x); return count; } /* Removes from R0...R1 all the nodes for which PREDICATE returns true given auxiliary data AUX. Frees the removed nodes with MANAGER. Returns the number of nodes removed. */ size_t llx_remove_if (struct llx *r0, struct llx *r1, llx_predicate_func *predicate, void *aux, const struct llx_manager *manager) { struct llx *x; size_t count; count = 0; for (x = r0; x != r1; ) if (predicate (llx_data (x), aux)) { x = llx_remove (x, manager); count++; } else x = llx_next (x); return count; } /* Returns the first node in R0...R1 that has data TARGET. Returns NULL if no node in R0...R1 equals TARGET. */ struct llx * llx_find (const struct llx *r0, const struct llx *r1, const void *target) { const struct llx *x; for (x = r0; x != r1; x = llx_next (x)) if (llx_data (x) == target) return CONST_CAST (struct llx *, x); return NULL; } /* Returns the first node in R0...R1 that equals TARGET according to COMPARE given auxiliary data AUX. Returns R1 if no node in R0...R1 equals TARGET. */ struct llx * llx_find_equal (const struct llx *r0, const struct llx *r1, const void *target, llx_compare_func *compare, void *aux) { const struct llx *x; for (x = r0; x != r1; x = llx_next (x)) if (compare (llx_data (x), target, aux) == 0) break; return CONST_CAST (struct llx *, x); } /* Returns the first node in R0...R1 for which PREDICATE returns true given auxiliary data AUX. Returns R1 if PREDICATE does not return true for any node in R0...R1 . */ struct llx * llx_find_if (const struct llx *r0, const struct llx *r1, llx_predicate_func *predicate, void *aux) { const struct llx *x; for (x = r0; x != r1; x = llx_next (x)) if (predicate (llx_data (x), aux)) break; return CONST_CAST (struct llx *, x); } /* Compares each pair of adjacent nodes in R0...R1 using COMPARE with auxiliary data AUX and returns the first node of the first pair that compares equal. Returns R1 if no pair compares equal. */ struct llx * llx_find_adjacent_equal (const struct llx *r0, const struct llx *r1, llx_compare_func *compare, void *aux) { if (r0 != r1) { const struct llx *x, *y; for (x = r0, y = llx_next (x); y != r1; x = y, y = llx_next (y)) if (compare (llx_data (x), llx_data (y), aux) == 0) return CONST_CAST (struct llx *, x); } return CONST_CAST (struct llx *, r1); } /* Returns the number of nodes in R0...R1. Executes in O(n) time in the return value. */ size_t llx_count_range (const struct llx *r0, const struct llx *r1) { return ll_count_range (&r0->ll, &r1->ll); } /* Counts and returns the number of nodes in R0...R1 that equal TARGET according to COMPARE given auxiliary data AUX. */ size_t llx_count_equal (const struct llx *r0, const struct llx *r1, const void *target, llx_compare_func *compare, void *aux) { const struct llx *x; size_t count; count = 0; for (x = r0; x != r1; x = llx_next (x)) if (compare (llx_data (x), target, aux) == 0) count++; return count; } /* Counts and returns the number of nodes in R0...R1 for which PREDICATE returns true given auxiliary data AUX. */ size_t llx_count_if (const struct llx *r0, const struct llx *r1, llx_predicate_func *predicate, void *aux) { const struct llx *x; size_t count; count = 0; for (x = r0; x != r1; x = llx_next (x)) if (predicate (llx_data (x), aux)) count++; return count; } /* Returns the greatest node in R0...R1 according to COMPARE given auxiliary data AUX. Returns the first of multiple, equal maxima. */ struct llx * llx_max (const struct llx *r0, const struct llx *r1, llx_compare_func *compare, void *aux) { const struct llx *max = r0; if (r0 != r1) { struct llx *x; for (x = llx_next (r0); x != r1; x = llx_next (x)) if (compare (llx_data (x), llx_data (max), aux) > 0) max = x; } return CONST_CAST (struct llx *, max); } /* Returns the least node in R0...R1 according to COMPARE given auxiliary data AUX. Returns the first of multiple, equal minima. */ struct llx * llx_min (const struct llx *r0, const struct llx *r1, llx_compare_func *compare, void *aux) { const struct llx *min = r0; if (r0 != r1) { struct llx *x; for (x = llx_next (r0); x != r1; x = llx_next (x)) if (compare (llx_data (x), llx_data (min), aux) < 0) min = x; } return CONST_CAST (struct llx *, min); } /* Lexicographically compares A0...A1 to B0...B1. Returns negative if A0...A1 < B0...B1, zero if A0...A1 == B0...B1, and positive if A0...A1 > B0...B1 according to COMPARE given auxiliary data AUX. */ int llx_lexicographical_compare_3way (const struct llx *a0, const struct llx *a1, const struct llx *b0, const struct llx *b1, llx_compare_func *compare, void *aux) { for (;;) if (b0 == b1) return a0 != a1; else if (a0 == a1) return -1; else { int cmp = compare (llx_data (a0), llx_data (b0), aux); if (cmp != 0) return cmp; a0 = llx_next (a0); b0 = llx_next (b0); } } /* Calls ACTION with auxiliary data AUX for every node in R0...R1 in order. */ void llx_apply (struct llx *r0, struct llx *r1, llx_action_func *action, void *aux) { struct llx *llx; for (llx = r0; llx != r1; llx = llx_next (llx)) action (llx_data (llx), aux); } /* Reverses the order of nodes R0...R1. */ void llx_reverse (struct llx *r0, struct llx *r1) { ll_reverse (&r0->ll, &r1->ll); } /* Arranges R0...R1 into the lexicographically next greater permutation. Returns true if successful. If R0...R1 is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. COMPARE with auxiliary data AUX is used to compare nodes. */ bool llx_next_permutation (struct llx *r0, struct llx *r1, llx_compare_func *compare, void *aux) { if (r0 != r1) { struct llx *i = llx_prev (r1); while (i != r0) { i = llx_prev (i); if (compare (llx_data (i), llx_data (llx_next (i)), aux) < 0) { struct llx *j; for (j = llx_prev (r1); compare (llx_data (i), llx_data (j), aux) >= 0; j = llx_prev (j)) continue; llx_swap (i, j); llx_reverse (llx_next (j), r1); return true; } } llx_reverse (r0, r1); } return false; } /* Arranges R0...R1 into the lexicographically next lesser permutation. Returns true if successful. If R0...R1 is already the lexicographically least permutation of its elements (i.e. ordered from smallest to greatest), arranges them into the lexicographically greatest permutation (i.e. ordered from largest to smallest) and returns false. COMPARE with auxiliary data AUX is used to compare nodes. */ bool llx_prev_permutation (struct llx *r0, struct llx *r1, llx_compare_func *compare, void *aux) { if (r0 != r1) { struct llx *i = llx_prev (r1); while (i != r0) { i = llx_prev (i); if (compare (llx_data (i), llx_data (llx_next (i)), aux) > 0) { struct llx *j; for (j = llx_prev (r1); compare (llx_data (i), llx_data (j), aux) <= 0; j = llx_prev (j)) continue; llx_swap (i, j); llx_reverse (llx_next (j), r1); return true; } } llx_reverse (r0, r1); } return false; } /* Sorts R0...R1 into ascending order according to COMPARE given auxiliary data AUX. In use, keep in mind that R0 may move during the sort, so that afterward R0...R1 may denote a different range. (On the other hand, R1 is fixed in place.) Runs in O(n lg n) time in the number of nodes in the range. */ void llx_sort (struct llx *r0, struct llx *r1, llx_compare_func *compare, void *aux) { struct llx *pre_r0; size_t output_run_cnt; if (r0 == r1 || llx_next (r0) == r1) return; pre_r0 = llx_prev (r0); do { struct llx *a0 = llx_next (pre_r0); for (output_run_cnt = 1; ; output_run_cnt++) { struct llx *a1 = llx_find_run (a0, r1, compare, aux); struct llx *a2 = llx_find_run (a1, r1, compare, aux); if (a1 == a2) break; a0 = llx_merge (a0, a1, a1, a2, compare, aux); } } while (output_run_cnt > 1); } /* Finds the extent of a run of nodes of increasing value starting at R0 and extending no farther than R1. Returns the first node in R0...R1 that is less than the preceding node, or R1 if R0...R1 are arranged in nondecreasing order. */ struct llx * llx_find_run (const struct llx *r0, const struct llx *r1, llx_compare_func *compare, void *aux) { if (r0 != r1) { do { r0 = llx_next (r0); } while (r0 != r1 && compare (llx_data (llx_prev (r0)), llx_data (r0), aux) <= 0); } return CONST_CAST (struct llx *, r0); } /* Merges B0...B1 into A0...A1 according to COMPARE given auxiliary data AUX. The ranges may be in the same list or different lists, but must not overlap. The merge is "stable" if A0...A1 is considered to precede B0...B1, regardless of their actual ordering. Runs in O(n) time in the total number of nodes in the ranges. */ struct llx * llx_merge (struct llx *a0, struct llx *a1, struct llx *b0, struct llx *b1, llx_compare_func *compare, void *aux) { if (a0 != a1 && b0 != b1) { a1 = llx_prev (a1); b1 = llx_prev (b1); for (;;) if (compare (llx_data (a0), llx_data (b0), aux) <= 0) { if (a0 == a1) { llx_splice (llx_next (a0), b0, llx_next (b1)); return llx_next (b1); } a0 = llx_next (a0); } else { if (b0 != b1) { struct llx *x = b0; b0 = llx_next (b0); llx_splice (a0, x, b0); } else { llx_splice (a0, b0, llx_next (b0)); return llx_next (a1); } } } else { llx_splice (a0, b0, b1); return b1; } } /* Returns true if R0...R1 is sorted in ascending order according to COMPARE given auxiliary data AUX, false otherwise. */ bool llx_is_sorted (const struct llx *r0, const struct llx *r1, llx_compare_func *compare, void *aux) { return llx_find_run (r0, r1, compare, aux) == r1; } /* Removes all but the first in each group of sequential duplicates in R0...R1. Duplicates are determined using COMPARE given auxiliary data AUX. Removed duplicates are inserted before DUPS if it is nonnull; otherwise, the removed duplicates are freed with MANAGER. Only sequential duplicates are removed. llx_sort() may be used to bring duplicates together, or llx_sort_unique() can do both at once. */ size_t llx_unique (struct llx *r0, struct llx *r1, struct llx *dups, llx_compare_func *compare, void *aux, const struct llx_manager *manager) { size_t count = 0; if (r0 != r1) { struct llx *x = r0; for (;;) { struct llx *y = llx_next (x); if (y == r1) { count++; break; } if (compare (llx_data (x), llx_data (y), aux) == 0) { if (dups != NULL) llx_splice (dups, y, llx_next (y)); else llx_remove (y, manager); } else { x = y; count++; } } } return count; } /* Sorts R0...R1 and removes duplicates. Removed duplicates are inserted before DUPS if it is nonnull; otherwise, the removed duplicates are freed with MANAGER. Comparisons are made with COMPARE given auxiliary data AUX. In use, keep in mind that R0 may move during the sort, so that afterward R0...R1 may denote a different range. (On the other hand, R1 is fixed in place.) Runs in O(n lg n) time in the number of nodes in the range. */ void llx_sort_unique (struct llx *r0, struct llx *r1, struct llx *dups, llx_compare_func *compare, void *aux, const struct llx_manager *manager) { struct llx *pre_r0 = llx_prev (r0); llx_sort (r0, r1, compare, aux); llx_unique (llx_next (pre_r0), r1, dups, compare, aux, manager); } /* Inserts DATA in the proper position in R0...R1, which must be sorted according to COMPARE given auxiliary data AUX. If DATA is equal to one or more existing nodes in R0...R1, then it is inserted after the existing nodes it equals. Returns the new node (allocated with MANAGER), or a null pointer if memory allocation failed. Runs in O(n) time in the number of nodes in the range. */ struct llx * llx_insert_ordered (struct llx *r0, struct llx *r1, void *data, llx_compare_func *compare, void *aux, const struct llx_manager *manager) { struct llx *x; for (x = r0; x != r1; x = llx_next (x)) if (compare (llx_data (x), data, aux) > 0) break; return llx_insert (x, data, manager); } /* Partitions R0...R1 into those nodes for which PREDICATE given auxiliary data AUX returns true, followed by those for which PREDICATE returns false. Returns the first node in the "false" group, or R1 if PREDICATE is true for every node in R0...R1. The partition is "stable" in that the nodes in each group retain their original relative order. Runs in O(n) time in the number of nodes in the range. */ struct llx * llx_partition (struct llx *r0, struct llx *r1, llx_predicate_func *predicate, void *aux) { struct llx *t0, *t1; for (;;) { if (r0 == r1) return r0; else if (!predicate (llx_data (r0), aux)) break; r0 = llx_next (r0); } for (t0 = r0;; t0 = t1) { do { t0 = llx_next (t0); if (t0 == r1) return r0; } while (!predicate (llx_data (t0), aux)); t1 = t0; do { t1 = llx_next (t1); if (t1 == r1) { llx_splice (r0, t0, t1); return r0; } } while (predicate (llx_data (t1), aux)); llx_splice (r0, t0, t1); } } /* Verifies that R0...R1 is parititioned into a sequence of nodes for which PREDICATE given auxiliary data AUX returns true, followed by those for which PREDICATE returns false. Returns a null pointer if R0...R1 is not partitioned this way. Otherwise, returns the first node in the "false" group, or R1 if PREDICATE is true for every node in R0...R1. */ struct llx * llx_find_partition (const struct llx *r0, const struct llx *r1, llx_predicate_func *predicate, void *aux) { const struct llx *partition, *x; for (partition = r0; partition != r1; partition = llx_next (partition)) if (!predicate (llx_data (partition), aux)) break; for (x = partition; x != r1; x = llx_next (x)) if (predicate (llx_data (x), aux)) return NULL; return CONST_CAST (struct llx *, partition); } /* Allocates and returns a node using malloc. */ static struct llx * malloc_allocate_node (void *aux UNUSED) { return malloc (sizeof (struct llx)); } /* Releases node LLX with free. */ static void malloc_release_node (struct llx *llx, void *aux UNUSED) { free (llx); } /* Manager that uses the standard malloc and free routines. */ const struct llx_manager llx_malloc_mgr = { malloc_allocate_node, malloc_release_node, NULL, }; pspp-1.0.1/src/libpspp/start-date.h0000644000175000017500000000154312470242642014103 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef START_DATE_H #define START_DATE_H 1 const char *get_start_date (void); #endif /* start-date.h */ pspp-1.0.1/src/libpspp/range-tower.c0000644000175000017500000007514712470434665014303 00000000000000/* pspp - a program for statistical analysis. Copyright (C) 2007, 2009, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Bitmap, implemented as a balanced binary tree. */ /* If you add routines in this file, please add a corresponding test to range-tower-test.c. This test program should achieve 100% coverage of lines and branches in this code, as reported by "gcov -b". */ #include #include "libpspp/range-tower.h" #include #include #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/pool.h" #include "gl/minmax.h" #include "gl/xalloc.h" static void reaugment_range_tower_node (struct abt_node *, const void *aux); static void delete_node (struct range_tower *, struct range_tower_node *); static void destroy_pool (void *); static void print_structure (const struct abt_node *node_) { struct range_tower_node *node; if (node_ == NULL) return; node = abt_data (node_, struct range_tower_node, abt_node); printf ("%lu+%lu/%d", node->n_zeros, node->n_ones, node->abt_node.level); if (node->abt_node.down[0] || node->abt_node.down[1]) { printf ("("); print_structure (node->abt_node.down[0]); printf (","); print_structure (node->abt_node.down[1]); printf (")"); } } /* Prints the regions in RT to stdout. */ static void UNUSED print_regions (const char *title, const struct range_tower *rt) { const struct range_tower_node *node; printf ("%s:", title); for (node = range_tower_first__ (rt); node != NULL; node = range_tower_next__ (rt, node)) printf (" (%lu,%lu)", node->n_zeros, node->n_ones); printf ("\n"); printf ("structure:"); print_structure (rt->abt.root); printf ("\n"); } static struct range_tower_node * range_tower_node_from_abt_node (const struct abt_node *abt_node) { return abt_data (abt_node, struct range_tower_node, abt_node); } /* Returns the total width (zeros and ones) of the nodes in the subtree rooted at P, or 0 if P is null. */ static unsigned long int subtree_width (const struct abt_node *p) { return p != NULL ? range_tower_node_from_abt_node (p)->subtree_width : 0; } /* Returns the position of the first 1-bit in NODE. The performance of this function is O(lg n) in the number of nodes in the range tower. It is often possible to avoid calling this function, either by taking advantage of the NODE_START parameter to tower_lookup or by incrementally keeping track of height while iterating through a tower. In the former case the asymptotic performance is no different, since tower_lookup is also O(lg n), but in the latter case performance improves from O(lg n) to O(1). */ unsigned long int range_tower_node_get_start (const struct range_tower_node *node) { const struct abt_node *p = &node->abt_node; unsigned long start = subtree_width (p->down[0]) + range_tower_node_from_abt_node (p)->n_zeros; while (p->up != NULL) { if (p == p->up->down[1]) { const struct range_tower_node *up = range_tower_node_from_abt_node (p->up); start += subtree_width (p->up->down[0]) + up->n_zeros + up->n_ones; } p = p->up; } return start; } /* Returns one past the position of the last 1-bit in NODE. Like range_tower_node_get_start(), the performance of this function is O(lg n) in the number of nodes in the range tower. */ unsigned long int range_tower_node_get_end (const struct range_tower_node *node) { return range_tower_node_get_start (node) + node->n_ones; } /* Creates and returns a new, empty range tower. */ struct range_tower * range_tower_create (void) { return range_tower_create_pool (NULL); } static struct range_tower * range_tower_create_pool__ (struct pool *pool) { struct range_tower *rt = xmalloc (sizeof *rt); rt->pool = pool; if (pool != NULL) pool_register (pool, destroy_pool, rt); abt_init (&rt->abt, NULL, reaugment_range_tower_node, NULL); rt->cache_end = 0; return rt; } /* Creates and returns a new, empty range tower in the given POOL. */ struct range_tower * range_tower_create_pool (struct pool *pool) { struct range_tower_node *node; struct range_tower *rt; rt = range_tower_create_pool__ (pool); node = xmalloc (sizeof *node); node->n_zeros = ULONG_MAX; node->n_ones = 0; abt_insert_after (&rt->abt, NULL, &node->abt_node); return rt; } /* Creates and returns a clone of OLD range tower in the given POOL (which may be null). */ struct range_tower * range_tower_clone (const struct range_tower *old, struct pool *pool) { const struct range_tower_node *old_node; struct abt_node *prev_node; struct range_tower *new; new = range_tower_create_pool__ (pool); prev_node = NULL; for (old_node = range_tower_first__ (old); old_node != NULL; old_node = range_tower_next__ (old, old_node)) { struct range_tower_node *new_node; new_node = xmalloc (sizeof *new_node); new_node->n_zeros = old_node->n_zeros; new_node->n_ones = old_node->n_ones; abt_insert_after (&new->abt, prev_node, &new_node->abt_node); prev_node = &new_node->abt_node; } return new; } /* Destroys range tower RT. */ void range_tower_destroy (struct range_tower *rt) { if (rt != NULL) { if (rt->pool != NULL) pool_unregister (rt->pool, rt); while (!abt_is_empty (&rt->abt)) delete_node (rt, range_tower_first__ (rt)); free (rt); } } /* Sets the WIDTH bits starting at START in RT to 1-bits. */ void range_tower_set1 (struct range_tower *rt, unsigned long int start, unsigned long int width) { struct range_tower_node *node; unsigned long int node_start; assert (width == 0 || start + width - 1 >= start); node = range_tower_lookup (rt, start, &node_start); while (width > 0) { unsigned long int node_ofs = start - node_start; if (node_ofs >= node->n_zeros) { /* There are already some 1-bits here, so skip them. */ unsigned long ones_left = (node->n_zeros + node->n_ones) - node_ofs; if (width <= ones_left) return; start += ones_left; width -= ones_left; node_start += node->n_zeros + node->n_ones; node_ofs = 0; node = range_tower_next__ (rt, node); } /* Invalidate cache. */ rt->cache_end = 0; if (node_ofs == 0) { if (node_start > 0) { struct range_tower_node *prev = range_tower_prev__ (rt, node); if (width >= node->n_zeros) { /* All zeros in NODE are replaced by ones. Change NODE's entire width into PREV's trailing ones, e.g. 00001111 00001111 becomes 0000111111111111. */ int node_width = node->n_zeros + node->n_ones; delete_node (rt, node); prev->n_ones += node_width; abt_reaugmented (&rt->abt, &prev->abt_node); if (width <= node_width) return; /* Go around again with NODE replaced by PREV's new successor. */ width -= node_width; start += node_width; node = range_tower_next__ (rt, prev); node_start += node_width; } else { /* Leading zeros in NODE change into trailing ones in PREV, but trailing zeros in NODE remain, e.g. 00001111 00001111 becomes 0000111111 001111. */ node->n_zeros -= width; abt_reaugmented (&rt->abt, &node->abt_node); prev->n_ones += width; abt_reaugmented (&rt->abt, &prev->abt_node); return; } } else { if (width >= node->n_zeros) { /* All zeros in NODE are replaced by ones, e.g. 00001111 becomes 11111111. */ node->n_ones += node->n_zeros; node->n_zeros = 0; if (width <= node->n_ones) return; start += node->n_ones; node_start += node->n_ones; width -= node->n_ones; node = range_tower_next__ (rt, node); } else { /* Leading zeros in NODE (which starts at offset 0) are replaced by ones, but some zeros remain. This requires a node split, e.g. 00001111 becomes 11 001111. */ struct range_tower_node *new_node; node->n_zeros -= width; abt_reaugmented (&rt->abt, &node->abt_node); new_node = xmalloc (sizeof *new_node); new_node->n_zeros = 0; new_node->n_ones = width; abt_insert_before (&rt->abt, &node->abt_node, &new_node->abt_node); return; } } } else { unsigned long int zeros_left = node->n_zeros - node_ofs; if (width >= zeros_left) { /* Trailing zeros in NODE are replaced by ones, but leading zeros remain, e.g. 00001111 becomes 00111111. */ node->n_zeros -= zeros_left; node->n_ones += zeros_left; if (width <= node->n_ones) return; start += node->n_ones; width -= node->n_ones; node_start += node->n_zeros + node->n_ones; node = range_tower_next__ (rt, node); } else { /* Zeros that are neither leading or trailing turn into ones. Split the node into two nodes, e.g. 00001111 becomes 011 01111. */ struct range_tower_node *new_node; new_node = xmalloc (sizeof *new_node); new_node->n_ones = node->n_ones; new_node->n_zeros = zeros_left - width; node->n_zeros = node_ofs; node->n_ones = width; abt_reaugmented (&rt->abt, &node->abt_node); abt_insert_after (&rt->abt, &node->abt_node, &new_node->abt_node); return; } } } } /* Sets the WIDTH bits starting at START in RT to 0-bits. */ void range_tower_set0 (struct range_tower *rt, unsigned long int start, unsigned long int width) { struct range_tower_node *node; unsigned long int node_start; assert (width == 0 || start + width - 1 >= start); node = range_tower_lookup (rt, start, &node_start); while (width > 0) { unsigned long int node_ofs = start - node_start; if (node_ofs < node->n_zeros) { /* Deleting zeros is a no-op, so skip them. */ unsigned long zeros_left = node->n_zeros - node_ofs; if (zeros_left >= width) { /* We are deleting only existing zeros. Nothing to do. */ return; } width -= zeros_left; start += zeros_left; node_ofs = node->n_zeros; } rt->cache_end = 0; if (node_ofs == node->n_zeros) { if (node->n_ones > width) { /* DELTA leading ones within NODE turn into zeros, but some ones remain, e.g. 00001111 becomes 00111111. No reaugmentation because n_zeros + n_ones doesn't change. */ node->n_zeros += width; node->n_ones -= width; return; } else { /* All ones in NODE turn into zeros, so merge NODE with the following node, e.g. 00001111 00001111 becomes 0000000000001111, and then do it again with the merged node. */ unsigned long int next_zeros, next_ones; struct range_tower_node *next; next = range_tower_next__ (rt, node); if (next == NULL) { node->n_zeros += node->n_ones; node->n_ones = 0; return; } next_zeros = next->n_zeros; next_ones = next->n_ones; delete_node (rt, next); node->n_zeros += node->n_ones + next_zeros; node->n_ones = next_ones; abt_reaugmented (&rt->abt, &node->abt_node); } } else if (node_ofs + width >= node->n_zeros + node->n_ones) { /* Trailing ones in NODE turn into zeros, but leading ones remain, e.g. 000011{11} 00001111 becomes 000011 {00}00001111. Give the trailing ones to the next node as zeros and go around again with the next node. */ struct range_tower_node *next; unsigned long int delta; delta = node->n_ones - (node_ofs - node->n_zeros); node->n_ones -= delta; abt_reaugmented (&rt->abt, &node->abt_node); next = range_tower_next__ (rt, node); if (next == NULL) { struct range_tower_node *new_node; new_node = xmalloc (sizeof *new_node); new_node->n_zeros = delta; new_node->n_ones = 0; abt_insert_before (&rt->abt, NULL, &new_node->abt_node); return; } next->n_zeros += delta; abt_reaugmented (&rt->abt, &next->abt_node); node_start += node->n_zeros + node->n_ones; start = node_start; node = next; } else { /* Ones that are neither leading or trailing turn into zeros, e.g. 00001111 becomes 00001 001. Split the node into two nodes and we're done. */ unsigned long int end = start + width; struct range_tower_node *new_node; new_node = xmalloc (sizeof *new_node); new_node->n_zeros = width; new_node->n_ones = (node_start + node->n_zeros + node->n_ones) - end; node->n_ones = node_ofs - node->n_zeros; abt_reaugmented (&rt->abt, &node->abt_node); abt_insert_after (&rt->abt, &node->abt_node, &new_node->abt_node); return; } } } static void range_tower_delete__ (struct range_tower *rt, unsigned long int start, unsigned long int width) { struct range_tower_node *node; unsigned long int node_start; rt->cache_end = 0; node = range_tower_lookup (rt, start, &node_start); for (;;) { unsigned long int node_ofs = start - node_start; if (node_ofs < node->n_zeros) { if (node_ofs + width < node->n_zeros) { node->n_zeros -= width; abt_reaugmented (&rt->abt, &node->abt_node); break; } else if (node_ofs > 0) { width -= node->n_zeros - node_ofs; node->n_zeros = node_ofs; abt_reaugmented (&rt->abt, &node->abt_node); if (width == 0) break; /* Continue with 1-bits. */ } else if (width < node->n_zeros + node->n_ones) { struct range_tower_node *prev = range_tower_prev__ (rt, node); unsigned long int ones_left; ones_left = (node->n_zeros + node->n_ones) - width; if (prev != NULL) { delete_node (rt, node); prev->n_ones += ones_left; abt_reaugmented (&rt->abt, &prev->abt_node); } else { node->n_zeros = 0; node->n_ones = ones_left; abt_reaugmented (&rt->abt, &node->abt_node); } break; } else { /* Delete entire node. */ struct range_tower_node *next = range_tower_next__ (rt, node); width -= node->n_zeros + node->n_ones; delete_node (rt, node); if (next == NULL) break; node = next; continue; } } if (node_ofs + width < node->n_zeros + node->n_ones) { node->n_ones -= width; abt_reaugmented (&rt->abt, &node->abt_node); break; } else if (node_ofs > node->n_zeros) { unsigned long int ones_ofs = node_ofs - node->n_zeros; width -= node->n_ones - ones_ofs; node->n_ones = ones_ofs; abt_reaugmented (&rt->abt, &node->abt_node); if (width == 0) break; /* continue with next node */ node_start += node->n_zeros + node->n_ones; node = range_tower_next__ (rt, node); } else { /* Merge with next node */ struct range_tower_node *next = range_tower_next__ (rt, node); if (next != NULL) { unsigned long int next_zeros = next->n_zeros; unsigned long int next_ones = next->n_ones; delete_node (rt, next); width -= node->n_ones; node->n_zeros += next_zeros; node->n_ones = next_ones; abt_reaugmented (&rt->abt, &node->abt_node); if (width == 0) break; } else { node->n_ones = 0; abt_reaugmented (&rt->abt, &node->abt_node); break; } } } } void range_tower_delete (struct range_tower *rt, unsigned long int start, unsigned long int width) { struct range_tower_node *node; if (width == 0) return; assert (start + width - 1 >= start); range_tower_delete__ (rt, start, width); node = range_tower_last__ (rt); if (node != NULL && node->n_ones == 0) { node->n_zeros += width; abt_reaugmented (&rt->abt, &node->abt_node); } else { struct range_tower_node *new_node; new_node = xmalloc (sizeof *new_node); new_node->n_zeros = width; new_node->n_ones = 0; abt_insert_before (&rt->abt, NULL, &new_node->abt_node); } } static struct range_tower_node * range_tower_insert0__ (struct range_tower *rt, struct range_tower_node *node, unsigned long int *node_startp, unsigned long int start, unsigned long int width) { unsigned long int node_ofs = start - *node_startp; if (node_ofs <= node->n_zeros) { /* 00+00+001111 => 0000001111. */ node->n_zeros += width; abt_reaugmented (&rt->abt, &node->abt_node); return node; } else { /* 000011+00+11 => 000011 0011. */ struct range_tower_node *new_node; new_node = xmalloc (sizeof *new_node); new_node->n_zeros = width; new_node->n_ones = node->n_zeros + node->n_ones - node_ofs; node->n_ones -= new_node->n_ones; abt_reaugmented (&rt->abt, &node->abt_node); abt_insert_after (&rt->abt, &node->abt_node, &new_node->abt_node); *node_startp += node->n_zeros + node->n_ones; return new_node; } } void range_tower_insert0 (struct range_tower *rt, unsigned long int start, unsigned long int width) { if (width == 0) return; assert (width == 0 || start + width - 1 >= start); if (start + width == ULONG_MAX) range_tower_set0 (rt, start, width); else { struct range_tower_node *node; unsigned long int node_start; range_tower_delete__ (rt, ULONG_MAX - width, width); node = range_tower_lookup (rt, start, &node_start); range_tower_insert0__ (rt, node, &node_start, start, width); } } static struct range_tower_node * range_tower_insert1__ (struct range_tower *rt, struct range_tower_node *node, unsigned long int *node_startp, unsigned long int start, unsigned long int width) { unsigned long int node_start = *node_startp; unsigned long int node_ofs = start - node_start; if (node_ofs >= node->n_zeros) { node->n_ones += width; abt_reaugmented (&rt->abt, &node->abt_node); return node; } else if (node_ofs == 0 && node_start > 0) { struct range_tower_node *prev = range_tower_prev__ (rt, node); prev->n_ones += width; abt_reaugmented (&rt->abt, &prev->abt_node); *node_startp += width; return node; } else { /* 00001111 => 0+11+0001111 => 011 0001111 */ struct range_tower_node *new_node; new_node = xmalloc (sizeof *new_node); new_node->n_zeros = node->n_zeros - node_ofs; new_node->n_ones = node->n_ones; node->n_zeros = node_ofs; node->n_ones = width; abt_reaugmented (&rt->abt, &node->abt_node); abt_insert_after (&rt->abt, &node->abt_node, &new_node->abt_node); *node_startp += node->n_zeros + node->n_ones; return new_node; } } void range_tower_insert1 (struct range_tower *rt, unsigned long int start, unsigned long int width) { struct range_tower_node *node; unsigned long int node_start; if (width == 0) return; range_tower_delete__ (rt, ULONG_MAX - width, width); assert (width == 0 || start + width - 1 >= start); node = range_tower_lookup (rt, start, &node_start); range_tower_insert1__ (rt, node, &node_start, start, width); } void range_tower_move (struct range_tower *rt, unsigned long int old_start, unsigned long int new_start, unsigned long int width) { unsigned long int node_start; if (width == 0 || old_start == new_start) return; assert (old_start + width - 1 >= old_start); assert (new_start + width - 1 >= new_start); do { struct range_tower_node *node; unsigned long int node_ofs; unsigned long int zeros, ones; node = range_tower_lookup (rt, old_start, &node_start); node_ofs = old_start - node_start; if (node_ofs >= node->n_zeros) { unsigned long int max_ones; zeros = 0; max_ones = (node->n_zeros + node->n_ones) - node_ofs; ones = MIN (width, max_ones); } else { unsigned long int max_zeros; max_zeros = node->n_zeros - node_ofs; zeros = MIN (width, max_zeros); if (zeros < width) ones = MIN (width - zeros, node->n_ones); else ones = 0; } node->n_zeros -= zeros; node->n_ones -= ones; abt_reaugmented (&rt->abt, &node->abt_node); if (node->n_zeros == 0) { if (node->n_ones == 0) delete_node (rt, node); else if (node_start > 0) { /* Merge with previous. */ unsigned long int n_ones = node->n_ones; struct range_tower_node *prev = range_tower_prev__ (rt, node); delete_node (rt, node); prev->n_ones += n_ones; abt_reaugmented (&rt->abt, &prev->abt_node); } } else if (node->n_ones == 0) { struct range_tower_node *next = range_tower_next__ (rt, node); if (next != NULL) { /* Merge with next. */ unsigned long int n_zeros = node->n_zeros; delete_node (rt, node); next->n_zeros += n_zeros; abt_reaugmented (&rt->abt, &next->abt_node); } } if (new_start < old_start) { node = range_tower_lookup (rt, new_start, &node_start); if (zeros) { node = range_tower_insert0__ (rt, node, &node_start, new_start, zeros); old_start += zeros; new_start += zeros; } if (ones) { node = range_tower_insert1__ (rt, node, &node_start, new_start, ones); old_start += ones; new_start += ones; } } else { unsigned long int remaining = width - (zeros + ones); if (new_start + remaining < ULONG_MAX - (zeros + ones)) { node = range_tower_lookup (rt, new_start + remaining, &node_start); if (zeros) { node = range_tower_insert0__ (rt, node, &node_start, new_start + remaining, zeros); new_start += zeros; } if (ones) { node = range_tower_insert1__ (rt, node, &node_start, new_start + remaining, ones); new_start += ones; } } else { node = range_tower_last__ (rt); if (zeros) { if (node->n_ones) { struct range_tower_node *new_node; new_node = xmalloc (sizeof *new_node); new_node->n_zeros = zeros; new_node->n_ones = 0; abt_insert_after (&rt->abt, &node->abt_node, &new_node->abt_node); node_start += node->n_zeros + node->n_ones; node = new_node; } else { node->n_zeros += zeros; abt_reaugmented (&rt->abt, &node->abt_node); } } if (ones) { node->n_ones += ones; abt_reaugmented (&rt->abt, &node->abt_node); } new_start += zeros + ones; } } width -= zeros + ones; } while (width > 0); } /* Returns true if there is a 1-bit at the given POSITION in RT, false otherwise. */ bool range_tower_contains (const struct range_tower *rt_, unsigned long int position) { struct range_tower *rt = CONST_CAST (struct range_tower *, rt_); if (position >= rt->cache_end || position < rt->cache_start) { struct range_tower_node *node; unsigned long int node_start; node = range_tower_lookup (rt, position, &node_start); if (position < node_start + node->n_zeros) { rt->cache_start = node_start; rt->cache_end = node_start + node->n_zeros; rt->cache_value = false; } else { rt->cache_start = node_start + node->n_zeros; rt->cache_end = rt->cache_start + node->n_ones; rt->cache_value = true; } } return rt->cache_value; } /* Returns the smallest position of a 1-bit greater than or equal to START. Returns ULONG_MAX if there is no 1-bit with position greater than or equal to START. */ unsigned long int range_tower_scan (const struct range_tower *rt_, unsigned long int start) { struct range_tower *rt = CONST_CAST (struct range_tower *, rt_); if (start < rt->cache_end && start >= rt->cache_start && rt->cache_value) return start; if (start != ULONG_MAX) { struct range_tower_node *node; unsigned long int node_start; node = range_tower_lookup (rt, start, &node_start); if (node->n_ones) { rt->cache_start = node_start + node->n_zeros; rt->cache_end = rt->cache_start + node->n_ones; rt->cache_value = true; return MAX (start, rt->cache_start); } else { rt->cache_start = node_start; rt->cache_end = ULONG_MAX; rt->cache_value = false; } } return ULONG_MAX; } /* Recalculates the subtree_width of NODE based on its LEFT and RIGHT children's "subtree_width"s. */ static void reaugment_range_tower_node (struct abt_node *node_, const void *aux UNUSED) { struct range_tower_node *node = range_tower_node_from_abt_node (node_); node->subtree_width = node->n_zeros + node->n_ones; if (node->abt_node.down[0] != NULL) { struct range_tower_node *left; left = range_tower_node_from_abt_node (node->abt_node.down[0]); node->subtree_width += left->subtree_width; } if (node->abt_node.down[1] != NULL) { struct range_tower_node *right; right = range_tower_node_from_abt_node (node->abt_node.down[1]); node->subtree_width += right->subtree_width; } } /* Deletes NODE from RT and frees it. */ static void delete_node (struct range_tower *rt, struct range_tower_node *node) { abt_delete (&rt->abt, &node->abt_node); free (node); } struct range_tower_node * range_tower_lookup (const struct range_tower *rt, unsigned long int position, unsigned long int *node_start) { const struct range_tower_node *node; const struct abt_node *abt_node; abt_node = rt->abt.root; node = range_tower_node_from_abt_node (abt_node); *node_start = subtree_width (abt_node->down[0]); for (;;) { unsigned long int left_width = subtree_width (abt_node->down[0]); if (position < left_width) { abt_node = abt_node->down[0]; *node_start -= left_width - subtree_width (abt_node->down[0]); } else { unsigned long int node_width = node->n_zeros + node->n_ones; position -= left_width; if (position < node_width) return CONST_CAST (struct range_tower_node *, node); position -= node_width; abt_node = abt_node->down[1]; left_width = subtree_width (abt_node->down[0]); *node_start += node_width + left_width; } node = range_tower_node_from_abt_node (abt_node); } } /* Destroys range tower RT. Helper function for range_tower_create_pool. */ static void destroy_pool (void *rt_) { struct range_tower *rt = rt_; rt->pool = NULL; range_tower_destroy (rt); } pspp-1.0.1/src/libpspp/taint.h0000644000175000017500000001455112470243700013151 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_TAINT_H #define LIBPSPP_TAINT_H 1 /* Tainting and taint propagation. Properly handling I/O errors and other hard errors in data handling is important. At a minimum, we must notify the user that an error occurred and refrain from presenting possibly corrupted output. It is unacceptable, however, to simply terminate PSPP when an I/O error occurs, because of the unfriendliness of that approach, especially in a GUI environment. We should also propagate the error to the top level of command execution; that is, ensure that the command procedure returns CMD_CASCADING_FAILURE to its caller. Usually in C we propagate errors via return values, or by maintaining an error state on an object (e.g. the error state that the ferror function tests on C streams). But neither approach is ideal for PSPP. Using return values requires the programmer to pay more attention to error handling than one would like, especially given how difficult it can be to test error paths. Maintaining error states on important PSPP objects (e.g. casereaders, casewriters) is a step up, but it still requires more attention than one would like, because quite often there are many such objects in use at any given time, and an I/O error encountered by any of them indicates that the final result of any computation that depends on that object is incorrect. The solution implemented here is an attempt to automate as much as possible of PSPP's error-detection problem. It is based on use of "taint" objects, created with taint_create or taint_clone. Each taint object represents a state of correctness or corruption (taint) in an associated object whose correctness must be established. The taint_set_taint function is used to mark a taint object as tainted. The taint status of a taint object can be queried with taint_is_tainted. The benefit of taint objects lies in the ability to connect them together in propagation relationships, using taint_propagate. The existence of a propagation relationship from taint object A to taint object B means that, should object A ever become tainted, then object B will automatically be marked tainted as well. This models the situation where the data represented by B are derived from data obtained from A. This is a common situation in PSPP; for example, the data in one casereader or casewriter are often derived from data in another casereader or casewriter. Taint propagation is transitive: if A propagates to B and B propagates to C, then tainting A taints both B and C. Taint propagation is not commutative: propagation from A to B does not imply propagation from B to A. However, taint propagation is robust against loops, so that if A propagates to B and vice versa, whether directly or indirectly, then tainting either A or B will cause the other to be tainted, without producing an infinite loop. The implementation is robust against destruction of taints in propagation relationships. When this happens, taint propagation through the destroyed taint object is preserved, that is, if A taints B and B taints C, then destroying B will preserve the transitive relationship, so that tainting A will still taint C. Taint objects actually propagate two different types of taints across the taint graph. The first type of taint is the one already described, which indicates that an associated object has corrupted state. The second type of taint, called a "successor-taint" does not necessarily indicate that the associated object is corrupted. Rather, it indicates some successor of the associated object is corrupted, or was corrupted some time in the past before it was destroyed. (A "successor" of a taint object X is any taint object that can be reached by following propagation relationships starting from X.) Stated another way, when a taint object is marked tainted, all the taint objects that are reachable by following propagation relationships *backward* are marked with a successor-taint. In addition, any object that is marked tainted is also marked successor-tainted. The value of a successor-taint is in summarizing the history of the taint objects derived from a common parent. For example, consider a casereader that represents the active dataset. A statistical procedure can clone this casereader any number of times and pass it to analysis functions, which may themselves in turn clone it themselves, pass it to sort or merge functions, etc. Conventionally, all of these functions would have to carefully check for I/O errors and propagate them upward, which is error-prone and inconvenient. However, given the successor-taint feature, the statistical procedure may simply check the successor-taint on the top-level casereader after calling the analysis functions and, if a successor-taint is present, skip displaying the procedure's output. Thus, error checking is centralized, simplified, and made convenient. This feature is now used in a number of the PSPP statistical procedures; search the source tree for "taint_has_tainted_successor" for details. */ #include struct taint *taint_create (void); struct taint *taint_clone (const struct taint *); bool taint_destroy (struct taint *); void taint_propagate (const struct taint *from, const struct taint *to); bool taint_is_tainted (const struct taint *); void taint_set_taint (const struct taint *); bool taint_has_tainted_successor (const struct taint *); void taint_reset_successor_taint (const struct taint *); #endif /* libpspp/taint.h */ pspp-1.0.1/src/libpspp/u8-istream.h0000644000175000017500000000304612470243700014025 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_U8_ISTREAM_H #define LIBPSPP_U8_ISTREAM_H 1 #include #include /* u8_istream. Reads a text file and reencodes its contents into UTF-8, with optional automatic encoding detection. */ #define U8_ISTREAM_BUFFER_SIZE 4096 struct u8_istream *u8_istream_for_fd (const char *fromcode, int fd); struct u8_istream *u8_istream_for_file (const char *fromcode, const char *filename, int flags); int u8_istream_close (struct u8_istream *); void u8_istream_free (struct u8_istream *); ssize_t u8_istream_read (struct u8_istream *, char *, size_t); int u8_istream_fileno (const struct u8_istream *); bool u8_istream_is_auto (const struct u8_istream *); bool u8_istream_is_utf8 (const struct u8_istream *); #endif /* libpspp/u8-istream.h */ pspp-1.0.1/src/libpspp/zip-writer.c0000644000175000017500000002002212523704223014130 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/zip-writer.h" #include "libpspp/zip-private.h" #include #include #include #include #include "gl/crc.h" #include "gl/fwriteerror.h" #include "gl/xalloc.h" #include "libpspp/message.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct zip_writer { char *file_name; /* File name, for use in error mesages. */ FILE *file; /* Output stream. */ uint16_t date, time; /* Date and time in MS-DOS format. */ bool ok; /* Members already added to the file, so that we can summarize them to the central directory at the end of the ZIP file. */ struct zip_member *members; size_t n_members, allocated_members; }; struct zip_member { uint32_t offset; /* Starting offset in file. */ uint32_t size; /* Length of member file data, in bytes. */ uint32_t crc; /* CRC-32 of member file data.. */ char *name; /* Name of member file. */ }; static void put_bytes (struct zip_writer *zw, const void *p, size_t n) { fwrite (p, 1, n, zw->file); } static void put_u16 (struct zip_writer *zw, uint16_t x) { #ifdef WORDS_BIGENDIAN x = bswap_16 (x); #endif put_bytes (zw, &x, sizeof x); } static void put_u32 (struct zip_writer *zw, uint32_t x) { #ifdef WORDS_BIGENDIAN x = bswap_32 (x); #endif put_bytes (zw, &x, sizeof x); } /* Starts writing a new ZIP file named FILE_NAME. Returns a new zip_writer if successful, otherwise a null pointer. */ struct zip_writer * zip_writer_create (const char *file_name) { struct zip_writer *zw; struct tm *tm; time_t now; FILE *file; file = fopen (file_name, "wb"); if (file == NULL) { msg_error (errno, _("%s: error opening output file"), file_name); return NULL; } zw = xmalloc (sizeof *zw); zw->file_name = xstrdup (file_name); zw->file = file; zw->ok = true; now = time (NULL); tm = localtime (&now); zw->date = tm->tm_mday + ((tm->tm_mon + 1) << 5) + ((tm->tm_year - 80) << 9); zw->time = tm->tm_sec / 2 + (tm->tm_min << 5) + (tm->tm_hour << 11); zw->members = NULL; zw->n_members = 0; zw->allocated_members = 0; return zw; } static void put_local_header (struct zip_writer *zw, const char *member_name, uint32_t crc, uint32_t size, int flag) { put_u32 (zw, MAGIC_LHDR); /* local file header signature */ put_u16 (zw, 10); /* version needed to extract */ put_u16 (zw, flag); /* general purpose bit flag */ put_u16 (zw, 0); /* compression method */ put_u16 (zw, zw->time); /* last mod file time */ put_u16 (zw, zw->date); /* last mod file date */ put_u32 (zw, crc); /* crc-32 */ put_u32 (zw, size); /* compressed size */ put_u32 (zw, size); /* uncompressed size */ put_u16 (zw, strlen (member_name)); /* file name length */ put_u16 (zw, 0); /* extra field length */ put_bytes (zw, member_name, strlen (member_name)); } /* Adds the contents of FILE, with name MEMBER_NAME, to ZW. */ void zip_writer_add (struct zip_writer *zw, FILE *file, const char *member_name) { struct zip_member *member; uint32_t offset, size; size_t bytes_read; uint32_t crc; char buf[4096]; /* Local file header. */ offset = ftello (zw->file); put_local_header (zw, member_name, 0, 0, 1 << 3); /* File data. */ size = crc = 0; fseeko (file, 0, SEEK_SET); while ((bytes_read = fread (buf, 1, sizeof buf, file)) > 0) { put_bytes (zw, buf, bytes_read); size += bytes_read; crc = crc32_update (crc, buf, bytes_read); } /* Try to seek back to the local file header. If successful, overwrite it with the correct file size and CRC. Otherwise, write data descriptor. */ if (fseeko (zw->file, offset, SEEK_SET) == 0) { put_local_header (zw, member_name, crc, size, 0); if (fseeko (zw->file, size, SEEK_CUR) && zw->ok) { msg_error (errno, _("%s: error seeking in output file"), zw->file_name); zw->ok = false; } } else { put_u32 (zw, MAGIC_DDHD); put_u32 (zw, crc); put_u32 (zw, size); put_u32 (zw, size); } /* Add to set of members. */ if (zw->n_members >= zw->allocated_members) zw->members = x2nrealloc (zw->members, &zw->allocated_members, sizeof *zw->members); member = &zw->members[zw->n_members++]; member->offset = offset; member->size = size; member->crc = crc; member->name = xstrdup (member_name); } /* Finalizes the contents of ZW and closes it. Returns true if successful, false if a write error occurred while finalizing the file or at any earlier time. */ bool zip_writer_close (struct zip_writer *zw) { uint32_t dir_start, dir_end; size_t i; bool ok; if (zw == NULL) return true; dir_start = ftello (zw->file); for (i = 0; i < zw->n_members; i++) { struct zip_member *m = &zw->members[i]; /* Central directory file header. */ put_u32 (zw, MAGIC_SOCD); /* central file header signature */ put_u16 (zw, 63); /* version made by */ put_u16 (zw, 10); /* version needed to extract */ put_u16 (zw, 1 << 3); /* general purpose bit flag */ put_u16 (zw, 0); /* compression method */ put_u16 (zw, zw->time); /* last mod file time */ put_u16 (zw, zw->date); /* last mod file date */ put_u32 (zw, m->crc); /* crc-32 */ put_u32 (zw, m->size); /* compressed size */ put_u32 (zw, m->size); /* uncompressed size */ put_u16 (zw, strlen (m->name)); /* file name length */ put_u16 (zw, 0); /* extra field length */ put_u16 (zw, 0); /* file comment length */ put_u16 (zw, 0); /* disk number start */ put_u16 (zw, 0); /* internal file attributes */ put_u32 (zw, 0); /* external file attributes */ put_u32 (zw, m->offset); /* relative offset of local header */ put_bytes (zw, m->name, strlen (m->name)); free (m->name); } free (zw->members); dir_end = ftello (zw->file); /* End of central directory record. */ put_u32 (zw, MAGIC_EOCD); /* end of central dir signature */ put_u16 (zw, 0); /* number of this disk */ put_u16 (zw, 0); /* number of the disk with the start of the central directory */ put_u16 (zw, zw->n_members); /* total number of entries in the central directory on this disk */ put_u16 (zw, zw->n_members); /* total number of entries in the central directory */ put_u32 (zw, dir_end - dir_start); /* size of the central directory */ put_u32 (zw, dir_start); /* offset of start of central directory with respect to the starting disk number */ put_u16 (zw, 0); /* .ZIP file comment length */ ok = zw->ok; if (ok && fwriteerror (zw->file)) { msg_error (errno, _("%s: write failed"), zw->file_name); ok = false; } free (zw->file_name); free (zw); return ok; } pspp-1.0.1/src/libpspp/freaderror.c0000644000175000017500000000365412470242642014166 00000000000000/* Detect read error on a stream. Copyright (C) 2003-2005, 2006 Free Software Foundation, Inc. Written by Bruno Haible , 2003. Modified by Ben Pfaff for PSPP. 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 . */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include "freaderror.h" #include #include /* Close the stream FP, and test whether some error occurred on the stream FP. FP must be a stream opened for reading. Return 0 if no error occurred and fclose (fp) succeeded. Return -1 and set errno if there was an error. The errno value will be 0 if the cause of the error cannot be determined. */ int freaderror (FILE *fp) { /* Need to 1. test the error indicator of the stream, 2. flush the buffers both in userland and in the kernel, through fclose, testing for error again. */ /* Clear errno, so that on non-POSIX systems the caller doesn't see a wrong value of errno when we return -1. */ errno = 0; if (ferror (fp)) { /* The stream had an error earlier, but its errno was lost. If the error was not temporary, we can get the same errno by reading one more byte. */ getc (fp); fclose (fp); return -1; } if (fclose (fp)) return -1; /* errno is set here */ return 0; } pspp-1.0.1/src/libpspp/string-map.c0000644000175000017500000002651412470243700014110 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/string-map.h" #include #include #include "libpspp/hash-functions.h" #include "libpspp/string-set.h" #include "gl/xalloc.h" static struct string_map_node *string_map_find_node__ ( const struct string_map *, const char *key, unsigned int hash); static bool string_map_delete__ (struct string_map *, const char *key, unsigned int hash); static struct string_map_node *string_map_insert__ (struct string_map *, char *key, char *value, unsigned int hash); /* Sets NODE's value to a copy of NEW_VALUE and returns the node's previous value. The caller is responsible for freeing the returned string (with free()). */ char * string_map_node_swap_value (struct string_map_node *node, const char *new_value) { return string_map_node_swap_value_nocopy (node, xstrdup (new_value)); } /* Sets NODE's value to NEW_VALUE, which must be a malloc()'d string, transferring ownership of NEW_VALUE to the node. Returns the node's previous value, which the caller is responsible for freeing (with free()). */ char * string_map_node_swap_value_nocopy (struct string_map_node *node, char *new_value) { char *old_value = node->value; node->value = new_value; return old_value; } /* Replaces NODE's value by a copy of VALUE. */ void string_map_node_set_value (struct string_map_node *node, const char *value) { string_map_node_set_value_nocopy (node, xstrdup (value)); } /* Replaces NODE's value by VALUE, which must be a malloc()'d string, transferring ownership of VALUE to the node.. */ void string_map_node_set_value_nocopy (struct string_map_node *node, char *value) { free (node->value); node->value = value; } /* Frees NODE and and its key and value. Ordinarily nodes are owned by string_maps, but this function should only be used by a caller that owns NODE, such as one that has called string_map_delete_nofree() for the node. */ void string_map_node_destroy (struct string_map_node *node) { free (node->key); free (node->value); free (node); } /* Initializes MAP as an initially empty string map. */ void string_map_init (struct string_map *map) { hmap_init (&map->hmap); } /* Initializes MAP as a new string map that initially contains the same pairs as OLD. */ void string_map_clone (struct string_map *map, const struct string_map *old) { const struct string_map_node *node; const char *key, *value; string_map_init (map); hmap_reserve (&map->hmap, string_map_count (old)); STRING_MAP_FOR_EACH_KEY_VALUE (key, value, node, old) string_map_insert__ (map, xstrdup (key), xstrdup (value), node->hmap_node.hash); } /* Exchanges the contents of string maps A and B. */ void string_map_swap (struct string_map *a, struct string_map *b) { hmap_swap (&a->hmap, &b->hmap); } /* Frees MAP and its nodes and key-value pairs. */ void string_map_destroy (struct string_map *map) { if (map != NULL) { string_map_clear (map); hmap_destroy (&map->hmap); } } /* Returns true if MAP contains KEY as a key, otherwise false. */ bool string_map_contains (const struct string_map *map, const char *key) { return string_map_find_node (map, key) != NULL; } /* If MAP contains KEY as a key, returns the corresponding value. Otherwise, returns a null pointer. */ const char * string_map_find (const struct string_map *map, const char *key) { const struct string_map_node *node = string_map_find_node (map, key); return node != NULL ? node->value : NULL; } /* If MAP contains KEY as a key, returns the corresponding node. Otherwise, returns a null pointer. */ struct string_map_node * string_map_find_node (const struct string_map *map, const char *key) { return string_map_find_node__ (map, key, hash_string (key, 0)); } /* If MAP contains KEY as a key, deletes that key's node and returns its value, which the caller is responsible for freeing (using free()). Otherwise, returns a null pointer. */ char * string_map_find_and_delete (struct string_map *map, const char *key) { struct string_map_node *node = string_map_find_node (map, key); char *value = NULL; if (node != NULL) { value = node->value; node->value = NULL; string_map_delete_node (map, node); } return value; } /* If MAP does not contain KEY as a key, inserts a new node containing copies of KEY and VALUE and returns the new node. Otherwise, returns the existing node that contains KEY. */ struct string_map_node * string_map_insert (struct string_map *map, const char *key, const char *value) { unsigned int hash = hash_string (key, 0); struct string_map_node *node = string_map_find_node__ (map, key, hash); if (node == NULL) node = string_map_insert__ (map, xstrdup (key), xstrdup (value), hash); return node; } /* If MAP does not contain KEY as a key, inserts a new node containing KEY and VALUE and returns the new node. Otherwise, returns the existing node that contains KEY. Either way, ownership of KEY and VALUE is transferred to MAP. */ struct string_map_node * string_map_insert_nocopy (struct string_map *map, char *key, char *value) { unsigned int hash = hash_string (key, 0); struct string_map_node *node = string_map_find_node__ (map, key, hash); if (node == NULL) node = string_map_insert__ (map, key, value, hash); else { free (key); free (value); } return node; } /* If MAP does not contain KEY as a key, inserts a new node containing copies of KEY and VALUE. Otherwise, replaces the existing node's value by a copy of VALUE. Returns the node. */ struct string_map_node * string_map_replace (struct string_map *map, const char *key, const char *value) { unsigned int hash = hash_string (key, 0); struct string_map_node *node = string_map_find_node__ (map, key, hash); if (node == NULL) node = string_map_insert__ (map, xstrdup (key), xstrdup (value), hash); else string_map_node_set_value (node, value); return node; } /* If MAP does not contain KEY as a key, inserts a new node containing KEY and VALUE. Otherwise, replaces the existing node's value by VALUE. Either way, ownership of KEY and VALUE is transferred to MAP. Returns the node. */ struct string_map_node * string_map_replace_nocopy (struct string_map *map, char *key, char *value) { unsigned int hash = hash_string (key, 0); struct string_map_node *node = string_map_find_node__ (map, key, hash); if (node == NULL) node = string_map_insert__ (map, key, value, hash); else { free (key); string_map_node_set_value_nocopy (node, value); } return node; } /* Searches MAP for a node with KEY as its key. If found, deletes the node and its key and value and returns true. Otherwise, returns false without modifying MAP. */ bool string_map_delete (struct string_map *map, const char *key) { return string_map_delete__ (map, key, hash_string (key, 0)); } /* Deletes NODE from MAP and destroys the node and its key and value. */ void string_map_delete_node (struct string_map *map, struct string_map_node *node) { string_map_delete_nofree (map, node); string_map_node_destroy (node); } /* Deletes NODE from MAP. Transfers ownership of NODE to the caller, which becomes responsible for destroying it. */ void string_map_delete_nofree (struct string_map *map, struct string_map_node *node) { hmap_delete (&map->hmap, &node->hmap_node); } /* Removes all nodes from MAP and frees them and their keys and values. */ void string_map_clear (struct string_map *map) { struct string_map_node *node, *next; STRING_MAP_FOR_EACH_NODE_SAFE (node, next, map) string_map_delete_node (map, node); } /* Inserts a copy of each of the nodes in SRC into DST. When SRC and DST both have a particular key, the value in DST's node is left unchanged. */ void string_map_insert_map (struct string_map *dst, const struct string_map *src) { const struct string_map_node *node; STRING_MAP_FOR_EACH_NODE (node, src) { if (!string_map_find_node__ (dst, node->key, node->hmap_node.hash)) string_map_insert__ (dst, xstrdup (node->key), xstrdup (node->value), node->hmap_node.hash); } } /* Inserts a copy of each of the nodes in SRC into DST. When SRC and DST both have a particular key, the value in DST's node is replaced by a copy of the value in SRC's node. */ void string_map_replace_map (struct string_map *dst, const struct string_map *src) { const struct string_map_node *snode; STRING_MAP_FOR_EACH_NODE (snode, src) { struct string_map_node *dnode; dnode = string_map_find_node__ (dst, snode->key, snode->hmap_node.hash); if (dnode != NULL) string_map_node_set_value (dnode, snode->value); else string_map_insert__ (dst, xstrdup (snode->key), xstrdup (snode->value), snode->hmap_node.hash); } } /* Inserts each of the keys in MAP into KEYS. KEYS must already have been initialized (using string_set_init()). */ void string_map_get_keys (const struct string_map *map, struct string_set *keys) { const struct string_map_node *node; const char *key; STRING_MAP_FOR_EACH_KEY (key, node, map) string_set_insert (keys, key); } /* Inserts each of the values in MAP into VALUES. VALUES must already have been initialized (using string_set_init()). */ void string_map_get_values (const struct string_map *map, struct string_set *values) { const struct string_map_node *node; const char *value; STRING_MAP_FOR_EACH_VALUE (value, node, map) string_set_insert (values, value); } static struct string_map_node * string_map_find_node__ (const struct string_map *map, const char *key, unsigned int hash) { struct string_map_node *node; HMAP_FOR_EACH_WITH_HASH (node, struct string_map_node, hmap_node, hash, &map->hmap) if (!strcmp (key, node->key)) return node; return NULL; } static bool string_map_delete__ (struct string_map *map, const char *key, unsigned int hash) { struct string_map_node *node = string_map_find_node__ (map, key, hash); if (node != NULL) { string_map_delete_node (map, node); return true; } else return false; } static struct string_map_node * string_map_insert__ (struct string_map *map, char *key, char *value, unsigned int hash) { struct string_map_node *node = xmalloc (sizeof *node); node->key = key; node->value = value; hmap_insert (&map->hmap, &node->hmap_node, hash); return node; } pspp-1.0.1/src/libpspp/stringi-map.h0000644000175000017500000002215012470243700014256 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_STRINGI_MAP_H #define LIBPSPP_STRINGI_MAP_H /* Map from a unique, case-insensitve string key to a string value. This is a convenient wrapper around a "struct hmap" for storing string key-value pairs. */ #include #include "libpspp/hmap.h" struct string_set; struct stringi_set; /* A node within a string map. */ struct stringi_map_node { struct hmap_node hmap_node; char *key; char *value; }; /* Returns the string key within NODE. The caller must not modify or free the returned string. */ static inline const char * stringi_map_node_get_key (const struct stringi_map_node *node) { return node->key; } /* Returns the string key within NODE. The caller must not free the returned string. */ static inline const char * stringi_map_node_get_value (const struct stringi_map_node *node) { return node->value; } /* Returns the string key within NODE. The caller must not free the returned string. */ static inline char * stringi_map_node_get_value_rw (struct stringi_map_node *node) { return node->value; } char *stringi_map_node_swap_value (struct stringi_map_node *, const char *new_value); char *stringi_map_node_swap_value_nocopy (struct stringi_map_node *, char *new_value); void stringi_map_node_set_value (struct stringi_map_node *, const char *value); void stringi_map_node_set_value_nocopy (struct stringi_map_node *, char *value); void stringi_map_node_destroy (struct stringi_map_node *); /* Unordered map from unique, case-insensitive string keys to string values. */ struct stringi_map { struct hmap hmap; }; /* Suitable for use as the initializer for a stringi_map named MAP. Typical usage: struct stringi_map map = STRINGI_MAP_INITIALIZER (map); STRINGI_MAP_INITIALIZER is an alternative to calling stringi_map_init. */ #define STRINGI_MAP_INITIALIZER(MAP) { HMAP_INITIALIZER ((MAP).hmap) } void stringi_map_init (struct stringi_map *); void stringi_map_clone (struct stringi_map *, const struct stringi_map *); void stringi_map_swap (struct stringi_map *, struct stringi_map *); void stringi_map_destroy (struct stringi_map *); static inline size_t stringi_map_count (const struct stringi_map *); static inline bool stringi_map_is_empty (const struct stringi_map *); bool stringi_map_contains (const struct stringi_map *, const char *); const char *stringi_map_find (const struct stringi_map *, const char *); struct stringi_map_node *stringi_map_find_node (const struct stringi_map *, const char *); char *stringi_map_find_and_delete (struct stringi_map *, const char *key); struct stringi_map_node *stringi_map_insert (struct stringi_map *, const char *key, const char *value); struct stringi_map_node *stringi_map_insert_nocopy (struct stringi_map *, char *key, char *value); struct stringi_map_node *stringi_map_replace (struct stringi_map *, const char *key, const char *value); struct stringi_map_node *stringi_map_replace_nocopy (struct stringi_map *, char *key, char *value); bool stringi_map_delete (struct stringi_map *, const char *); void stringi_map_delete_node (struct stringi_map *, struct stringi_map_node *); void stringi_map_delete_nofree (struct stringi_map *, struct stringi_map_node *); void stringi_map_clear (struct stringi_map *); void stringi_map_insert_map (struct stringi_map *, const struct stringi_map *); void stringi_map_replace_map (struct stringi_map *, const struct stringi_map *); void stringi_map_get_keys (const struct stringi_map *, struct stringi_set *); void stringi_map_get_values (const struct stringi_map *, struct string_set *); static inline struct stringi_map_node *stringi_map_first ( const struct stringi_map *); static inline struct stringi_map_node *stringi_map_next ( const struct stringi_map *, const struct stringi_map_node *); /* Macros for conveniently iterating through a stringi_map, e.g. to print all of the key-value pairs in "my_map": struct stringi_map_node *node; const char *key, *value; STRINGI_MAP_FOR_EACH_KEY_VALUE (key, value, node, &my_map) printf ("%s=%s\n", key, value); */ #define STRINGI_MAP_FOR_EACH_NODE(NODE, MAP) \ for ((NODE) = stringi_map_first (MAP); (NODE) != NULL; \ (NODE) = stringi_map_next (MAP, NODE)) #define STRINGI_MAP_FOR_EACH_NODE_SAFE(NODE, NEXT, MAP) \ for ((NODE) = stringi_map_first (MAP); \ ((NODE) != NULL \ && ((NEXT) = stringi_map_next (MAP, NODE), 1)); \ (NODE) = (NEXT)) #define STRINGI_MAP_FOR_EACH_KEY(KEY, NODE, MAP) \ for ((NODE) = stringi_map_first (MAP); \ ((NODE) != NULL \ && ((KEY) = stringi_map_node_get_key (NODE), 1)); \ (NODE) = stringi_map_next (MAP, NODE)) #define STRINGI_MAP_FOR_EACH_KEY_SAFE(KEY, NODE, NEXT, MAP) \ for ((NODE) = stringi_map_first (MAP); \ ((NODE) != NULL \ && ((KEY) = stringi_map_node_get_key (NODE), 1) \ && ((NEXT) = stringi_map_next (MAP, NODE), 1)); \ (NODE) = (NEXT)) #define STRINGI_MAP_FOR_EACH_VALUE(VALUE, NODE, MAP) \ for ((NODE) = stringi_map_first (MAP); \ ((NODE) != NULL \ && ((VALUE) = (NODE)->value, 1)); \ (NODE) = stringi_map_next (MAP, NODE)) #define STRINGI_MAP_FOR_EACH_VALUE_SAFE(VALUE, NODE, NEXT, MAP) \ for ((NODE) = stringi_map_first (MAP); \ ((NODE) != NULL \ && ((VALUE) = (NODE)->value, 1) \ && ((NEXT) = stringi_map_next (MAP, NODE), 1)); \ (NODE) = (NEXT)) #define STRINGI_MAP_FOR_EACH_KEY_VALUE(KEY, VALUE, NODE, MAP) \ for ((NODE) = stringi_map_first (MAP); \ ((NODE) != NULL \ && ((KEY) = stringi_map_node_get_key (NODE), 1) \ && ((VALUE) = (NODE)->value, 1)); \ (NODE) = stringi_map_next (MAP, NODE)) #define STRINGI_MAP_FOR_EACH_KEY_VALUE_SAFE(KEY, VALUE, NODE, NEXT, MAP) \ for ((NODE) = stringi_map_first (MAP); \ ((NODE) != NULL \ && ((KEY) = stringi_map_node_get_key (NODE), 1) \ && ((VALUE) = (NODE)->value, 1) \ && ((NEXT) = stringi_map_next (MAP, NODE), 1)); \ (NODE) = (NEXT)) /* Returns the number of key-value pairs currently in MAP. */ static inline size_t stringi_map_count (const struct stringi_map *map) { return hmap_count (&map->hmap); } /* Returns true if MAP currently contains no key-value pairs, false otherwise. */ static inline bool stringi_map_is_empty (const struct stringi_map *map) { return hmap_is_empty (&map->hmap); } /* Returns the first node in MAP, or a null pointer if MAP is empty. See the hmap_first function for information about complexity (O(1) amortized) and ordering (arbitrary). The STRINGI_MAP_FOR_EACH family of macros provide convenient ways to iterate over all the nodes in a string map. */ static inline struct stringi_map_node * stringi_map_first (const struct stringi_map *map) { return HMAP_FIRST (struct stringi_map_node, hmap_node, &map->hmap); } /* Returns the next node in MAP following NODE, or a null pointer if NODE is the last node in MAP. See the hmap_next function for information about complexity (O(1) amortized) and ordering (arbitrary). The STRINGI_MAP_FOR_EACH family of macros provide convenient ways to iterate over all the nodes in a string map. */ static inline struct stringi_map_node * stringi_map_next (const struct stringi_map *map, const struct stringi_map_node *node) { return HMAP_NEXT (node, struct stringi_map_node, hmap_node, &map->hmap); } #endif /* libpspp/string-map.h */ pspp-1.0.1/src/libpspp/sparse-array.c0000644000175000017500000005772312470243700014446 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/sparse-array.h" #include #include #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "gl/count-one-bits.h" #include "gl/minmax.h" /* Sparse array data structure. The sparse array is implemented in terms of a "radix tree", a multiway tree in which a set of bits drawn from the key determine the child chosen at each level during a search. The most-significant bits determine a child of the root, the next bits determine a child of that child, and so on, until the least-significant bits determine a leaf node. In this implementation, the branching factor at each level is held constant at 2**BITS_PER_LEVEL. The tree is only made as tall as need be for the currently largest key, and nodes that would be entirely empty are not allocated at all. The elements are stored in the leaf nodes. */ /* Number of bits from the key used as the index at each level. */ #define BITS_PER_LEVEL 5 /* Branching factor. */ #define PTRS_PER_LEVEL (1u << BITS_PER_LEVEL) /* Maximum height. */ #define LONG_BITS (sizeof (unsigned long int) * CHAR_BIT) #define LONG_MASK ((unsigned long int) LONG_BITS - 1) #define MAX_HEIGHT DIV_RND_UP (LONG_BITS, BITS_PER_LEVEL) /* Bit-mask for index. */ #define LEVEL_MASK ((1ul << BITS_PER_LEVEL) - 1) /* Pointer to an internal node or a leaf node. Pointers in internal nodes at level 1 point to leaf nodes; other pointers point to internal nodes. */ union pointer { struct internal_node *internal; struct leaf_node *leaf; }; /* A sparse array. */ struct sparse_array { struct pool *pool; /* Pool used for allocations. */ size_t elem_size; /* Element size, rounded for alignment. */ unsigned long count; /* Number of elements in tree. */ /* Radix tree. */ union pointer root; /* Root of tree. */ int height; /* 0=empty tree; 1=root points to leaf, 2=root points to internal node that points to leaves, and so on. */ /* Cache for speeding up access. */ unsigned long int cache_ofs; /* Group of keys that cache points to, shifted right BITS_PER_LEVEL bits; ULONG_MAX for empty cache. */ struct leaf_node *cache; /* Cached leaf node, or a null pointer for a negative cache. */ }; /* An internal node in the radix tree. */ struct internal_node { int count; /* Number of nonnull children. */ union pointer down[PTRS_PER_LEVEL]; /* Children. */ }; /* A leaf node in the radix tree. */ struct leaf_node { /* Bit-vector of elements that are in use. */ unsigned long int in_use[DIV_RND_UP (PTRS_PER_LEVEL, LONG_BITS)]; /* element_type elements[PTRS_PER_LEVEL]; */ }; /* Returns SIZE rounded up to a safe alignment. */ #define ALIGN_SIZE(SIZE) ROUND_UP (SIZE, sizeof (long int)) /* Returns the size of EXPR_OR_TYPE rounded up to a safe alignment. */ #define SIZEOF_ALIGNED(EXPR_OR_TYPE) ALIGN_SIZE (sizeof (EXPR_OR_TYPE)) static inline bool index_in_range (const struct sparse_array *, unsigned long int); static inline bool is_in_use (const struct leaf_node *, unsigned int); static inline bool any_in_use (const struct leaf_node *); static inline void set_in_use (struct leaf_node *, unsigned int); static inline void unset_in_use (struct leaf_node *, unsigned int); static inline void *leaf_element (const struct sparse_array *, struct leaf_node *, unsigned int); static inline size_t leaf_size (const struct sparse_array *); static struct leaf_node *find_leaf_node (const struct sparse_array *, unsigned long int); static void decrease_height (struct sparse_array *); static int scan_in_use_forward (struct leaf_node *, unsigned int); static void *do_scan_forward (struct sparse_array *, union pointer *, int, unsigned long int, unsigned long int *); static void *scan_forward (const struct sparse_array *, unsigned long int start, unsigned long int *found); static int scan_in_use_reverse (struct leaf_node *, unsigned int); static void *do_scan_reverse (struct sparse_array *, union pointer *, int, unsigned long int, unsigned long int *); static void *scan_reverse (const struct sparse_array *, unsigned long int start, unsigned long int *found); /* Creates and returns a new sparse array that will contain elements that are ELEM_SIZE bytes in size. */ struct sparse_array * sparse_array_create (size_t elem_size) { return sparse_array_create_pool (NULL, elem_size); } /* Creates and returns a new sparse array that will contain elements that are ELEM_SIZE bytes in size. Data in the sparse array will be allocated from POOL, which may be null. */ struct sparse_array * sparse_array_create_pool (struct pool *pool, size_t elem_size) { struct sparse_array *spar = pool_malloc (pool, sizeof *spar); spar->pool = pool; spar->elem_size = ALIGN_SIZE (elem_size); spar->height = 0; spar->root.leaf = NULL; spar->count = 0; spar->cache_ofs = ULONG_MAX; return spar; } /* Destroys SPAR node pointed to by P at the given LEVEL. */ static void do_destroy (struct sparse_array *spar, union pointer *p, int level) { if (level > 0) { struct internal_node *node = p->internal; int count = node->count; int i; for (i = 0; ; i++) { union pointer *q = &p->internal->down[i]; if (level > 1 ? q->internal != NULL : q->leaf != NULL) { do_destroy (spar, q, level - 1); if (--count == 0) break; } } pool_free (spar->pool, p->internal); } else if (level == 0) pool_free (spar->pool, p->leaf); } /* Destroys SPAR. Any elements in SPAR are deallocated. Thus, if per-element destruction is necessary, it should be done before destroying the sparse array. */ void sparse_array_destroy (struct sparse_array *spar) { do_destroy (spar, &spar->root, spar->height - 1); pool_free (spar->pool, spar); } /* Returns the number of elements in SPAR. */ unsigned long int sparse_array_count (const struct sparse_array *spar) { return spar->count; } /* Increases SPAR's height by 1, allowing it to hold PTRS_PER_LEVEL times more elements. */ static void increase_height (struct sparse_array *spar) { assert (spar->height < MAX_HEIGHT); spar->height++; if (spar->height == 1) spar->root.leaf = pool_zalloc (spar->pool, leaf_size (spar)); else { struct internal_node *new_root; new_root = pool_zalloc (spar->pool, sizeof *new_root); new_root->count = 1; new_root->down[0] = spar->root; spar->root.internal = new_root; } } /* Finds the leaf node in SPAR that contains the element for KEY. SPAR must be tall enough to hold KEY. Creates the leaf if it doesn't already exist. */ static struct leaf_node * create_leaf_node (struct sparse_array *spar, unsigned long int key) { union pointer *p; int *count = NULL; int level; assert (index_in_range (spar, key)); /* Short-circuit everything if KEY is in the leaf cache. */ if (key >> BITS_PER_LEVEL == spar->cache_ofs && spar->cache != NULL) return spar->cache; /* Descend through internal nodes. */ p = &spar->root; for (level = spar->height - 1; level > 0; level--) { if (p->internal == NULL) { p->internal = pool_zalloc (spar->pool, sizeof *p->internal); ++*count; } count = &p->internal->count; p = &p->internal->down[(key >> (level * BITS_PER_LEVEL)) & LEVEL_MASK]; } /* Create leaf if necessary. */ if (p->leaf == NULL) { p->leaf = pool_zalloc (spar->pool, leaf_size (spar)); ++*count; } /* Update cache. */ spar->cache = p->leaf; spar->cache_ofs = key >> BITS_PER_LEVEL; return p->leaf; } /* Inserts into SPAR an element with the given KEY, which must not already exist in SPAR. Returns the new element for the caller to initialize. */ void * sparse_array_insert (struct sparse_array *spar, unsigned long int key) { struct leaf_node *leaf; while (!index_in_range (spar, key)) increase_height (spar); spar->count++; leaf = create_leaf_node (spar, key); assert (!is_in_use (leaf, key)); set_in_use (leaf, key); return leaf_element (spar, leaf, key); } /* Finds and returns the element in SPAR with the given KEY. Returns a null pointer if KEY does not exist in SPAR. */ void * sparse_array_get (const struct sparse_array *spar, unsigned long int key) { struct leaf_node *leaf = find_leaf_node (spar, key); if (leaf != NULL && is_in_use (leaf, key)) return leaf_element (spar, leaf, key); return NULL; } /* Removes the element with the given KEY from SPAR. Returns true if an element was removed, false if SPAR hadn't contained an element with the given KEY. If elements need to be destructed, then the caller should have already taken care of it before calling this function; the element's content must be considered freed and of indeterminate value after it is removed. */ bool sparse_array_remove (struct sparse_array *spar, unsigned long int key) { union pointer *path[MAX_HEIGHT], **last; struct leaf_node *leaf; union pointer *p; int level; /* Find and free element in leaf. */ leaf = find_leaf_node (spar, key); if (leaf == NULL || !is_in_use (leaf, key)) return false; #if ASSERT_LEVEL >= 10 memset (leaf_element (spar, leaf, key), 0xcc, spar->elem_size); #endif unset_in_use (leaf, key); spar->count--; if (any_in_use (leaf)) return true; /* The leaf node is empty. Retrace the path of internal nodes traversed to the leaf. */ p = &spar->root; last = path; for (level = spar->height - 1; level > 0; level--) { *last++ = p; p = &p->internal->down[(key >> (level * BITS_PER_LEVEL)) & LEVEL_MASK]; } /* Free the leaf node and prune it from the tree. */ spar->cache_ofs = ULONG_MAX; pool_free (spar->pool, leaf); p->leaf = NULL; /* Update counts in the internal nodes above the leaf. Free any internal nodes that become empty. */ while (last > path) { p = *--last; if (--p->internal->count > 0) { if (p == &spar->root) decrease_height (spar); return true; } pool_free (spar->pool, p->internal); p->internal = NULL; } spar->height = 0; return true; } /* Returns a pointer to the in-use element with the smallest index and sets *IDXP to its index or, if SPAR has no in-use elements, returns NULL without modifying *IDXP. */ void * sparse_array_first (const struct sparse_array *spar, unsigned long int *idxp) { return scan_forward (spar, 0, idxp); } /* Returns a pointer to the in-use element with the smallest index greater than SKIP and sets *IDXP to its index or, if SPAR has no in-use elements with index greater than SKIP, returns NULL without modifying *IDXP. */ void * sparse_array_next (const struct sparse_array *spar, unsigned long int skip, unsigned long int *idxp) { return skip < ULONG_MAX ? scan_forward (spar, skip + 1, idxp) : NULL; } /* Returns a pointer to the in-use element with the greatest index and sets *IDXP to its index or, if SPAR has no in-use elements, returns NULL without modifying *IDXP. */ void * sparse_array_last (const struct sparse_array *spar, unsigned long int *idxp) { return scan_reverse (spar, ULONG_MAX, idxp); } /* Returns a pointer to the in-use element with the greatest index less than SKIP and sets *IDXP to its index or, if SPAR has no in-use elements with index less than SKIP, returns NULL without modifying *IDXP. */ void * sparse_array_prev (const struct sparse_array *spar, unsigned long int skip, unsigned long int *idxp) { return skip > 0 ? scan_reverse (spar, skip - 1, idxp) : NULL; } /* Returns true iff KEY is in the range of keys currently represented by SPAR. */ static inline bool index_in_range (const struct sparse_array *spar, unsigned long int key) { return (spar->height == 0 ? false : spar->height >= MAX_HEIGHT ? true : key < (1ul << (spar->height * BITS_PER_LEVEL))); } /* Returns true iff LEAF contains an in-use element with the given KEY. */ static inline bool is_in_use (const struct leaf_node *leaf, unsigned int key) { key &= LEVEL_MASK; return (leaf->in_use[key / LONG_BITS] & (1ul << (key % LONG_BITS))) != 0; } /* Returns true iff LEAF contains any in-use elements. */ static inline bool any_in_use (const struct leaf_node *leaf) { size_t i; for (i = 0; i < sizeof leaf->in_use / sizeof *leaf->in_use; i++) if (leaf->in_use[i]) return true; return false; } /* Marks element KEY in LEAF as in-use. */ static inline void set_in_use (struct leaf_node *leaf, unsigned int key) { key &= LEVEL_MASK; leaf->in_use[key / LONG_BITS] |= 1ul << (key % LONG_BITS); } /* Marks element KEY in LEAF as not in-use. */ static inline void unset_in_use (struct leaf_node *leaf, unsigned int key) { key &= LEVEL_MASK; leaf->in_use[key / LONG_BITS] &= ~(1ul << (key % LONG_BITS)); } /* Returns the number of trailing 0-bits in X. Undefined if X is zero. */ static inline int count_trailing_zeros (unsigned long int x) { #if __GNUC__ >= 4 return __builtin_ctzl (x); #else /* not GCC 4+ */ /* This algorithm is from _Hacker's Delight_ section 5.4. */ int n = 1; #define COUNT_STEP(BITS) \ if (!(x & ((1ul << (BITS)) - 1))) \ { \ n += BITS; \ x >>= BITS; \ } #if ULONG_MAX >> 31 >> 31 >> 2 COUNT_STEP (64); #endif #if ULONG_MAX >> 31 >> 1 COUNT_STEP (32); #endif COUNT_STEP (16); COUNT_STEP (8); COUNT_STEP (4); COUNT_STEP (2); return n - (x & 1); #endif /* not GCC 4+ */ } /* Returns the least index of the in-use element in LEAF greater than or equal to IDX. Bits in IDX not in LEVEL_MASK are considered to have value 0. */ static int scan_in_use_forward (struct leaf_node *leaf, unsigned int idx) { idx &= LEVEL_MASK; for (; idx < PTRS_PER_LEVEL; idx = (idx & ~LONG_MASK) + LONG_BITS) { int ofs = idx % LONG_BITS; unsigned long int in_use = leaf->in_use[idx / LONG_BITS] >> ofs; if (!in_use) continue; return idx + count_trailing_zeros (in_use); } return -1; } /* Returns the number of leading 0-bits in X. Undefined if X is zero. */ static inline int count_leading_zeros (unsigned long int x) { #if __GNUC__ >= 4 return __builtin_clzl (x); #else x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; #if ULONG_MAX >> 31 >> 1 x |= x >> 32; #endif #if ULONG_MAX >> 31 >> 31 >> 2 x |= x >> 64; #endif return LONG_BITS - count_one_bits_l (x); #endif } /* Returns the greatest index of the in-use element in LEAF less than or equal to IDX. Bits in IDX not in LEVEL_MASK are considered to have value 0. */ static int scan_in_use_reverse (struct leaf_node *leaf, unsigned int idx) { idx &= LEVEL_MASK; for (;;) { int ofs = idx % LONG_BITS; unsigned long int in_use; in_use = leaf->in_use[idx / LONG_BITS] << (LONG_BITS - 1 - ofs); if (in_use) return idx - count_leading_zeros (in_use); if (idx < LONG_BITS) return -1; idx = (idx | LONG_MASK) - LONG_BITS; } } /* Returns the address of element with the given KEY in LEAF, which is a node in SPAR. */ static inline void * leaf_element (const struct sparse_array *spar, struct leaf_node *leaf, unsigned int key) { key &= LEVEL_MASK; return (char *) leaf + SIZEOF_ALIGNED (*leaf) + (spar->elem_size * key); } /* As leaf_element, returns the address of element with the given KEY in LEAF, which is a node in SPAR. Also, updates SPAR's cache to contain LEAF. */ static void * cache_leaf_element (struct sparse_array *spar, struct leaf_node *leaf, unsigned long int key) { spar->cache = leaf; spar->cache_ofs = key >> BITS_PER_LEVEL; return leaf_element (spar, leaf, key); } /* Returns the size of a leaf node in SPAR. */ static inline size_t leaf_size (const struct sparse_array *spar) { return SIZEOF_ALIGNED (struct leaf_node) + spar->elem_size * PTRS_PER_LEVEL; } /* Finds and returns the leaf node in SPAR that contains KEY. Returns null if SPAR does not have a leaf node that contains KEY. */ static struct leaf_node * find_leaf_node (const struct sparse_array *spar_, unsigned long int key) { struct sparse_array *spar = CONST_CAST (struct sparse_array *, spar_); const union pointer *p; int level; /* Check the cache first. */ if (key >> BITS_PER_LEVEL == spar->cache_ofs) return spar->cache; if (!index_in_range (spar, key)) return NULL; /* Descend through internal nodes. */ p = &spar->root; for (level = spar->height - 1; level > 0; level--) { if (p->internal == NULL) return NULL; p = &p->internal->down[(key >> (level * BITS_PER_LEVEL)) & LEVEL_MASK]; } /* Update cache. */ spar->cache = p->leaf; spar->cache_ofs = key >> BITS_PER_LEVEL; return p->leaf; } /* Reduces SPAR's height to the minimum needed value by eliminating levels that contain only a single entry for all 0-bits. */ static void decrease_height (struct sparse_array *spar) { while (spar->height > 1 && spar->root.internal->count == 1 && spar->root.internal->down[0].internal) { struct internal_node *p = spar->root.internal; spar->height--; spar->root = p->down[0]; pool_free (spar->pool, p); } } /* Scans P, which is at LEVEL and within SPAR, and its subnodes, for the in-use element with the least key greater than or equal to START. If such an element is found, returns a pointer to it and stores its key in *FOUND; otherwise, returns a null pointer and does not modify *FOUND. */ static inline void * scan_internal_node_forward (struct sparse_array *spar, struct internal_node *node, int level, unsigned long int start, unsigned long int *found) { int shift = level * BITS_PER_LEVEL; int count = node->count; int i; for (i = (start >> shift) & LEVEL_MASK; i < PTRS_PER_LEVEL; i++) { union pointer *q = &node->down[i]; if (level > 1 ? q->internal != NULL : q->leaf != NULL) { void *element = do_scan_forward (spar, q, level - 1, start, found); if (element) return element; if (--count == 0) return NULL; } start &= ~((1ul << shift) - 1); start += 1ul << shift; } return NULL; } /* Scans P, which is at LEVEL and within SPAR, and its subnodes, for the in-use element with the least key greater than or equal to START. If such an element is found, returns a pointer to it and stores its key in *FOUND; otherwise, returns a null pointer and does not modify *FOUND. */ static void * do_scan_forward (struct sparse_array *spar, union pointer *p, int level, unsigned long int start, unsigned long int *found) { if (level == 0) { int idx = scan_in_use_forward (p->leaf, start); if (idx >= 0) { unsigned long int key = *found = (start & ~LEVEL_MASK) | idx; return cache_leaf_element (spar, p->leaf, key); } } return scan_internal_node_forward (spar, p->internal, level, start, found); } static void * scan_forward (const struct sparse_array *spar_, unsigned long int start, unsigned long int *found) { struct sparse_array *spar = CONST_CAST (struct sparse_array *, spar_); /* Check the cache. */ if (start >> BITS_PER_LEVEL == spar->cache_ofs) { int idx = scan_in_use_forward (spar->cache, start); if (idx >= 0) { *found = (start & ~LEVEL_MASK) | idx; return leaf_element (spar, spar->cache, idx); } start = (start & ~LEVEL_MASK) + PTRS_PER_LEVEL; if (start == 0) return NULL; } /* Do the scan. */ if (!index_in_range (spar, start)) return NULL; return do_scan_forward (spar, &spar->root, spar->height - 1, start, found); } /* Scans P, which is at LEVEL and within SPAR, and its subnodes, for the in-use element with the greatest key less than or equal to START. If such an element is found, returns a pointer to it and stores its key in *FOUND; otherwise, returns a null pointer and does not modify *FOUND. */ static inline void * scan_internal_node_reverse (struct sparse_array *spar, struct internal_node *node, int level, unsigned long int start, unsigned long int *found) { int shift = level * BITS_PER_LEVEL; int count = node->count; int i; for (i = (start >> shift) & LEVEL_MASK; i >= 0; i--) { union pointer *q = &node->down[i]; if (level > 1 ? q->internal != NULL : q->leaf != NULL) { void *element = do_scan_reverse (spar, q, level - 1, start, found); if (element) return element; if (--count == 0) return NULL; } start |= (1ul << shift) - 1; start -= 1ul << shift; } return NULL; } /* Scans P, which is at LEVEL and within SPAR, and its subnodes, for the in-use element with the greatest key less than or equal to START. If such an element is found, returns a pointer to it and stores its key in *FOUND; otherwise, returns a null pointer and does not modify *FOUND. */ static void * do_scan_reverse (struct sparse_array *spar, union pointer *p, int level, unsigned long int start, unsigned long int *found) { if (level == 0) { int idx = scan_in_use_reverse (p->leaf, start); if (idx >= 0) { unsigned long int key = *found = (start & ~LEVEL_MASK) | idx; return cache_leaf_element (spar, p->leaf, key); } else return NULL; } return scan_internal_node_reverse (spar, p->internal, level, start, found); } static void * scan_reverse (const struct sparse_array *spar_, unsigned long int start, unsigned long int *found) { struct sparse_array *spar = CONST_CAST (struct sparse_array *, spar_); /* Check the cache. */ if (start >> BITS_PER_LEVEL == spar->cache_ofs) { int idx = scan_in_use_reverse (spar->cache, start); if (idx >= 0) { *found = (start & ~LEVEL_MASK) | idx; return leaf_element (spar, spar->cache, idx); } start |= LEVEL_MASK; if (start < PTRS_PER_LEVEL) return NULL; start -= PTRS_PER_LEVEL; } else { if (spar->height == 0) return NULL; else if (spar->height < MAX_HEIGHT) { unsigned long int max_key; max_key = (1ul << (spar->height * BITS_PER_LEVEL)) - 1; start = MIN (start, max_key); } } return do_scan_reverse (spar, &spar->root, spar->height - 1, start, found); } pspp-1.0.1/src/libpspp/i18n.h0000644000175000017500000001466613137223525012624 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010, 2011, 2012, 2014, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef I18N_H #define I18N_H #include #include void i18n_done (void); void i18n_init (void); #define UTF8 "UTF-8" /* The encoding of literal strings in PSPP source code, as seen at execution time. In fact this is likely to be some extended ASCII encoding, such as UTF-8 or ISO-8859-1, but ASCII is adequate for our purposes. */ #define C_ENCODING "ASCII" struct pool; char recode_byte (const char *to, const char *from, char); char *recode_string (const char *to, const char *from, const char *text, int len); char *recode_string_pool (const char *to, const char *from, const char *text, int length, struct pool *); struct substring recode_substring_pool (const char *to, const char *from, struct substring text, struct pool *); int recode_pedantically (const char *to, const char *from, struct substring text, struct pool *, struct substring *out); size_t recode_string_len (const char *to, const char *from, const char *text, int len); char *utf8_encoding_trunc (const char *, const char *encoding, size_t max_len); size_t utf8_encoding_trunc_len (const char *, const char *encoding, size_t max_len); char *utf8_encoding_concat (const char *head, const char *tail, const char *encoding, size_t max_len); size_t utf8_encoding_concat_len (const char *head, const char *tail, const char *encoding, size_t max_len); char *utf8_to_filename (const char *filename); char *filename_to_utf8 (const char *filename); bool valid_encoding (const char *enc); char get_system_decimal (void); const char * get_default_encoding (void); void set_default_encoding (const char *enc); bool set_encoding_from_locale (const char *loc); const char *uc_name (ucs4_t uc, char buffer[16]); unsigned int utf8_hash_case_bytes (const char *, size_t n, unsigned int basis); unsigned int utf8_hash_case_string (const char *, unsigned int basis); int utf8_strcasecmp (const char *, const char *); int utf8_strncasecmp (const char *, size_t, const char *, size_t); int utf8_strverscasecmp (const char *, const char *); char *utf8_to_upper (const char *); char *utf8_to_lower (const char *); /* Information about character encodings. */ /* ISO C defines a set of characters that a C implementation must support at runtime, called the C basic execution character set, which consists of the following characters: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 ! " # % & ' ( ) * + , - . / : ; < = > ? [ \ ] ^ _ { | } ~ space \a \b \r \n \t \v \f \0 The following is true of every member of the C basic execution character set in all "reasonable" encodings: 1. Every member of the C basic character set is encoded. 2. Every member of the C basic character set has the same width in bytes, called the "unit width". Most encodings have a unit width of 1 byte, but UCS-2 and UTF-16 have a unit width of 2 bytes and UCS-4 and UTF-32 have a unit width of 4 bytes. 3. In a stateful encoding, the encoding of members of the C basic character set does not vary with shift state. 4. When a string is read unit-by-unit, a unit that has the encoded value of a member of the C basic character set, EXCEPT FOR THE DECIMAL DIGITS, always represents that member. That is, if the encoding has multi-unit characters, the units that encode the C basic character set are never part of a multi-unit character. The exception for decimal digits is due to GB18030, which uses decimal digits as part of multi-byte encodings. All 8-bit and wider encodings that I have been able to find follow these rules. 7-bit and narrower encodings (e.g. UTF-7) do not. I'm not too concerned about that. */ #include /* Maximum width of a unit, in bytes. UTF-32 with 4-byte units is the widest that I am aware of. */ #define MAX_UNIT 4 /* Information about an encoding. */ struct encoding_info { /* Encoding name. IANA says character set names may be up to 40 US-ASCII characters. */ char name[41]; /* True if this encoding has a unit width of 1 byte, and every character used in ASCII text files has the same value in this encoding. */ bool is_ascii_compatible; /* True if this encoding has a unit width of 1 byte and appears to be EBCDIC-based. */ bool is_ebcdic_compatible; /* Character information. */ int unit; /* Unit width, in bytes. */ char cr[MAX_UNIT]; /* \r in encoding, 'unit' bytes long. */ char lf[MAX_UNIT]; /* \n in encoding, 'unit' bytes long. */ char space[MAX_UNIT]; /* ' ' in encoding, 'unit' bytes long. */ }; bool get_encoding_info (struct encoding_info *, const char *name); bool is_encoding_ascii_compatible (const char *encoding); bool is_encoding_ebcdic_compatible (const char *encoding); bool is_encoding_supported (const char *encoding); bool is_encoding_utf8 (const char *encoding); /* Database of encodings, by language or region. */ struct encoding_category { const char *category; /* e.g. "Arabic" or "Western European". */ const char **encodings; /* Encodings within the category. */ size_t n_encodings; /* Number of encodings in category. */ }; struct encoding_category *get_encoding_categories (void); size_t get_n_encoding_categories (void); #endif /* i18n.h */ pspp-1.0.1/src/libpspp/ext-array.c0000644000175000017500000001177312470434665013760 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* An interface to an array of octets that is stored on disk as a temporary file. */ #include #include "libpspp/ext-array.h" #include "libpspp/message.h" #include #include #include #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/temp-file.h" #include "gl/unlocked-io.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) enum op { OP_WRITE, /* writing */ OP_READ /* reading */ }; struct ext_array { FILE *file; /* Underlying file. */ /* Current byte offset in file. We track this manually, instead of using ftello, because in glibc ftello flushes the stream buffer, making the common case of sequential access to cases unreasonably slow. */ off_t position; /* The most recent operation performed */ enum op op; }; /* Creates and returns a new external array. */ struct ext_array * ext_array_create (void) { struct ext_array *ea = xmalloc (sizeof *ea); ea->file = create_temp_file (); if (ea->file == NULL) msg_error (errno, _("failed to create temporary file")); ea->position = 0; ea->op = OP_WRITE; return ea; } /* Closes and destroys external array EA. Returns true if I/O on EA always succeeded, false if an I/O error occurred at some point. */ bool ext_array_destroy (struct ext_array *ea) { bool ok = true; if (ea != NULL) { ok = !ext_array_error (ea); if (ea->file != NULL) close_temp_file (ea->file); free (ea); } return ok; } /* Seeks EA's underlying file to the start of `union value' VALUE_IDX within case CASE_IDX. Returns true if the seek is successful and EA is not otherwise tainted, false otherwise. */ static bool do_seek (const struct ext_array *ea_, off_t offset, enum op op) { struct ext_array *ea = CONST_CAST (struct ext_array *, ea_); if (!ext_array_error (ea)) { if (ea->position == offset && ea->op == op) return true; else if (fseeko (ea->file, offset, SEEK_SET) == 0) { ea->position = offset; return true; } else msg_error (errno, _("seeking in temporary file")); } return false; } /* Reads BYTES bytes from EA's underlying file into BUFFER. EA must not be tainted upon entry into this function. Returns true if successful, false upon an I/O error (in which case EA is marked tainted). */ static bool do_read (const struct ext_array *ea_, void *buffer, size_t bytes) { struct ext_array *ea = CONST_CAST (struct ext_array *, ea_); assert (!ext_array_error (ea)); if (bytes > 0 && fread (buffer, bytes, 1, ea->file) != 1) { if (ferror (ea->file)) msg_error (errno, _("reading temporary file")); else if (feof (ea->file)) msg_error ( 0, _("unexpected end of file reading temporary file")); else NOT_REACHED (); return false; } ea->position += bytes; ea->op = OP_READ; return true; } /* Writes BYTES bytes from BUFFER into EA's underlying file. EA must not be tainted upon entry into this function. Returns true if successful, false upon an I/O error (in which case EA is marked tainted). */ static bool do_write (struct ext_array *ea, const void *buffer, size_t bytes) { assert (!ext_array_error (ea)); if (bytes > 0 && fwrite (buffer, bytes, 1, ea->file) != 1) { msg_error (errno, _("writing to temporary file")); return false; } ea->position += bytes; ea->op = OP_WRITE; return true; } /* Reads N bytes from EA at byte offset OFFSET into DATA. Returns true if successful, false on failure. */ bool ext_array_read (const struct ext_array *ea, off_t offset, size_t n, void *data) { return do_seek (ea, offset, OP_READ) && do_read (ea, data, n); } /* Writes the N bytes in DATA to EA at byte offset OFFSET. Returns true if successful, false on failure. */ bool ext_array_write (struct ext_array *ea, off_t offset, size_t n, const void *data) { return do_seek (ea, offset, OP_WRITE) && do_write (ea, data, n); } /* Returns true if an error has occurred in I/O on EA, false if no error has been detected. */ bool ext_array_error (const struct ext_array *ea) { return ea->file == NULL || ferror (ea->file) || feof (ea->file); } pspp-1.0.1/src/libpspp/zip-writer.h0000644000175000017500000000205212470242642014143 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_ZIP_WRITER_H #define LIBPSPP_ZIP_WRITER_H 1 #include #include struct zip_writer *zip_writer_create (const char *file_name); void zip_writer_add (struct zip_writer *, FILE *, const char *member_name); bool zip_writer_close (struct zip_writer *); #endif /* libpspp/zip-writer.h */ pspp-1.0.1/src/libpspp/u8-istream.c0000644000175000017500000003025012523704223014016 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "u8-istream.h" #include #include #include #include #include #include #include #include #include #include #include #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/encoding-guesser.h" #include "libpspp/i18n.h" #include "gl/c-strcase.h" #include "gl/localcharset.h" #include "gl/minmax.h" enum u8_istream_state { S_AUTO, /* Stream encoding not yet known. */ S_UTF8, /* Stream encoding is known to be UTF-8. */ S_CONVERT /* Stream encoding is known but not UTF-8. */ }; struct u8_istream { int fd; iconv_t converter; enum u8_istream_state state; char *buffer; char *head; size_t length; char outbuf[4]; size_t outlen; }; static ssize_t fill_buffer (struct u8_istream *); /* Opens FILENAME, which is encoded in FROMCODE, for reading as an UTF-8 stream, passing FLAGS to the open() function. Returns a new u8_istream if successful, otherwise returns NULL and sets errno to an appropriate value. The accepted forms for FROMCODE are listed at the top of encoding-guesser.h. */ struct u8_istream * u8_istream_for_file (const char *fromcode, const char *filename, int flags) { struct u8_istream *is; int fd; assert (!(flags & O_CREAT)); fd = open (filename, flags); if (fd < 0) return NULL; is = u8_istream_for_fd (fromcode, fd); if (is == NULL) { int save_errno = errno; close (fd); errno = save_errno; } return is; } /* Creates and returns a new u8_istream that reads its input from FD. Returns a new u8_istream if successful, otherwise returns NULL and sets errno to an appropriate value. The accepted forms for FROMCODE are listed at the top of encoding-guesser.h. */ struct u8_istream * u8_istream_for_fd (const char *fromcode, int fd) { struct u8_istream *is; const char *encoding; is = malloc (sizeof *is); if (is == NULL) return NULL; is->fd = fd; is->converter = (iconv_t) -1; is->buffer = malloc (U8_ISTREAM_BUFFER_SIZE); if (is->buffer == NULL) goto error; is->head = is->buffer; is->length = 0; is->outlen = 0; if (fill_buffer (is) < 0) goto error; encoding = encoding_guess_head_encoding (fromcode, is->buffer, is->length); if (is_encoding_utf8 (encoding)) { unsigned int bom_len; is->state = S_UTF8; bom_len = encoding_guess_bom_length (encoding, is->buffer, is->length); is->head += bom_len; is->length -= bom_len; } else { if (encoding_guess_encoding_is_auto (fromcode) && !strcmp (encoding, "ASCII")) { is->state = S_AUTO; encoding = encoding_guess_parse_encoding (fromcode); } else is->state = S_CONVERT; is->converter = iconv_open ("UTF-8", encoding); if (is->converter == (iconv_t) -1) goto error; } return is; error: u8_istream_free (is); return NULL; } /* Closes IS and its underlying file descriptor and frees all associated resources. Returns the return value from close(). */ int u8_istream_close (struct u8_istream *is) { if (is != NULL) { int fd = is->fd; u8_istream_free (is); return close (fd); } return 0; } /* Frees IS and associated resources, but does not close the underlying file descriptor. (Thus, the client must close the file descriptor when it is no longer needed.) */ void u8_istream_free (struct u8_istream *is) { if (is != NULL) { if (is->converter != (iconv_t) -1) iconv_close (is->converter); free (is->buffer); free (is); } } static void substitute_invalid_input_byte (struct u8_istream *is) { assert (is->outlen == 0); is->head++; is->length--; is->outlen = u8_uctomb (CHAR_CAST (uint8_t *, is->outbuf), 0xfffd, sizeof is->outbuf); } static ssize_t fill_buffer (struct u8_istream *is) { ssize_t n; /* Move any unused bytes to the beginning of the input buffer. */ if (is->length > 0 && is->buffer != is->head) memmove (is->buffer, is->head, is->length); is->head = is->buffer; /* Read more input. */ n = 0; do { ssize_t retval = read (is->fd, is->buffer + is->length, U8_ISTREAM_BUFFER_SIZE - is->length); if (retval > 0) { n += retval; is->length += retval; } else if (retval == 0) return n; else if (errno != EINTR) return n > 0 ? n : -1; } while (is->length < U8_ISTREAM_BUFFER_SIZE); return n; } static ssize_t read_auto (struct u8_istream *is, char *buffer, size_t size) { size_t original_size = size; int retval = 0; while (size > 0) { if (is->length > 0) { size_t n_ascii; n_ascii = encoding_guess_count_ascii (is->head, MIN (is->length, size)); memcpy (buffer, is->head, n_ascii); buffer += n_ascii; size -= n_ascii; is->head += n_ascii; is->length -= n_ascii; if (size == 0) break; } if (is->length == 0) { retval = fill_buffer (is); if (retval > 0) continue; else break; } /* is->head points to a byte that isn't a printable ASCII character. Fill up the buffer and check for UTF-8. */ fill_buffer (is); is->state = (encoding_guess_tail_is_utf8 (is->head, is->length) ? S_UTF8 : S_CONVERT); if (size == original_size) return u8_istream_read (is, buffer, size); break; } return original_size - size; } static int convert_iconv (iconv_t converter, char **inbufp, size_t *inbytesleft, char **outbufp, size_t *outbytesleft) { size_t n = iconv (converter, (ICONV_CONST char **) inbufp, inbytesleft, outbufp, outbytesleft); return n == SIZE_MAX ? errno : 0; } static int convert_utf8 (iconv_t converter UNUSED, char **inbufp, size_t *inbytesleft, char **outbufp, size_t *outbytesleft) { const uint8_t *in = CHAR_CAST (const uint8_t *, *inbufp); size_t n = MIN (*inbytesleft, *outbytesleft); size_t ofs = 0; int error; for (;;) { ucs4_t uc; int mblen; if (ofs >= n) { error = ofs < *inbytesleft ? E2BIG : 0; break; } mblen = u8_mbtouc (&uc, in + ofs, n - ofs); if (uc == 0xfffd) { int retval = u8_mbtoucr (&uc, in + ofs, *inbytesleft - ofs); if (retval == mblen) { /* There's an actual U+FFFD in the input stream. Carry on. */ } else { error = (retval == -1 ? EILSEQ : retval == -2 ? EINVAL : E2BIG); break; } } ofs += mblen; } if (ofs > 0) { memcpy (*outbufp, *inbufp, ofs); *inbufp += ofs; *inbytesleft -= ofs; *outbufp += ofs; *outbytesleft -= ofs; } return error; } static ssize_t read_convert (struct u8_istream *is, int (*convert) (iconv_t converter, char **inbufp, size_t *inbytesleft, char **outbufp, size_t *outbytesleft), char *buffer, size_t size) { size_t original_size = size; while (size > 0) { ssize_t n_read; if (is->outlen > 0) { size_t n = MIN (size, is->outlen); memcpy (buffer, is->outbuf, n); is->outlen -= n; if (is->outlen > 0) memmove (is->outbuf, is->outbuf + n, is->outlen); buffer += n; size -= n; if (size == 0) break; } if (is->length) { int error = convert (is->converter, &is->head, &is->length, &buffer, &size); if (size == 0) break; switch (error) { case 0: /* Converted all of the input into output, possibly with space for output left over. Read more input. */ break; case EILSEQ: substitute_invalid_input_byte (is); continue; case EINVAL: /* Incomplete byte sequence at end of input. Read more input. */ break; default: /* A real error of some kind (ENOMEM?). */ return -1; case E2BIG: /* Ran out of room for output. Convert into outbuf and copy from there instead. */ { char *outptr = is->outbuf; size_t outleft = sizeof is->outbuf; error = convert (is->converter, &is->head, &is->length, &outptr, &outleft); is->outlen = outptr - is->outbuf; if (is->outlen > 0) continue; switch (error) { case EILSEQ: substitute_invalid_input_byte (is); continue; case E2BIG: case EINVAL: continue; default: /* A real error of some kind (ENOMEM?). */ return -1; } } } } assert (is->length <= MB_LEN_MAX); n_read = fill_buffer (is); if (n_read <= 0) { if (original_size != size) { /* We produced some output so don't report EOF or error yet. */ break; } else if (n_read == 0 && is->length != 0) { /* Incomplete byte sequence at end of file. */ substitute_invalid_input_byte (is); } else { /* Propagate end-of-file or error to caller. */ return n_read; } } } return original_size - size; } /* Reads up to SIZE bytes of UTF-8 text from IS into BUFFER. Returns the number of bytes read if successful, 0 at end of file, or -1 if an error occurred before any data could be read. Upon error, sets errno to an appropriate value. */ ssize_t u8_istream_read (struct u8_istream *is, char *buffer, size_t size) { switch (is->state) { case S_CONVERT: return read_convert (is, convert_iconv, buffer, size); case S_AUTO: return read_auto (is, buffer, size); case S_UTF8: return read_convert (is, convert_utf8, buffer, size); } NOT_REACHED (); } /* Returns the file descriptor underlying IS. */ int u8_istream_fileno (const struct u8_istream *is) { return is->fd; } /* Test functions. These functions are probably useful only for white-box testing. */ /* Returns true if the encoding of the file being read by IS is not yet known. */ bool u8_istream_is_auto (const struct u8_istream *is) { return is->state == S_AUTO; } /* Returns true if the encoding of the file being read by IS has been determined to be UTF-8. */ bool u8_istream_is_utf8 (const struct u8_istream *is) { return is->state == S_UTF8; } pspp-1.0.1/src/libpspp/line-reader.h0000644000175000017500000000347112470243700014220 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_LINE_READER_H #define LIBPSPP_LINE_READER_H 1 #include #include #include /* line_reader. Reads a text file in an arbitrary encoding one line at a time, with optional automatic encoding detection. */ #define LINE_READER_BUFFER_SIZE 4096 struct string; struct line_reader *line_reader_for_fd (const char *encoding, int fd); struct line_reader *line_reader_for_file (const char *encoding, const char *filename, int flags); int line_reader_close (struct line_reader *); void line_reader_free (struct line_reader *); bool line_reader_read (struct line_reader *, struct string *, size_t max_length); int line_reader_fileno (const struct line_reader *); off_t line_reader_tell (const struct line_reader *); bool line_reader_eof (const struct line_reader *); int line_reader_error (const struct line_reader *); const char *line_reader_get_encoding (const struct line_reader *); bool line_reader_is_auto (const struct line_reader *); #endif /* libpspp/line-reader.h */ pspp-1.0.1/src/libpspp/abt.h0000644000175000017500000002100412470243700012567 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_ABT_H #define LIBPSPP_ABT_H 1 /* Augmented binary tree (ABT) data structure. A data structure can be "augmented" by defining new information for it to maintain. One commonly useful way to augment a binary search tree-based data structure is to define part of its data as a function of its immediate children's data. Furthermore, augmented data defined in this way can be efficiently maintained as the tree changes over time. For example, suppose we define the "size" of a node as the sum of the "size" of its immediate children, plus 1. In such an annotated BST with height H, we can find the node that would be Kth in in-order traversal in O(H) time, instead of O(K) time, which is a significant saving for balanced trees. The ABT data structure partially abstracts augmentation. The client passes in a "reaugmentation" function that accepts a node. This function must recalculate the node's augmentation data based on its own contents and the contents of its children, and store the new augmentation data in the node. The ABT automatically calls the reaugmentation function whenever it can tell that a node's augmentation data might need to be updated: when the node is inserted or when a node's descendants change due to insertion or deletion. The ABT does not know to call the reaugmentation function if a node's data is updated while it is in the ABT. In such a case, call the abt_reaugmented or abt_changed function to update the augmentation. Augmentation is only partially abstracted: we do not provide any way to search an ABT based on its augmentations. The tree structure is thus exposed to the client to allow it to implement search. To allow for optimization, the ABT implementation assumes that the augmentation function in use is unaffected by the shape of a binary search tree. That is, if a given subtree within a larger tree is rearranged, e.g. via a series of rotations, then the implementation will not call the reaugmentation function outside of the subtree, because the overall augmentation data for the subtree is assumed not to change. This optimization is valid for the forms of augmentation described in CLR and Knuth (see below), and it is possible that it is valid for every efficient binary search tree augmentation. The client should not need to be aware of the form of balancing applied to the ABT, as its operation should be fully encapsulated by the reaugmentation function. The current implementation uses an AA (Arne Andersson) tree, but this is subject to change. The following example illustrates how to use an ABT to build a tree that can be searched either by a data value or in-order position: // Test data element. struct element { struct abt_node node; // Embedded binary tree element. int data; // Primary value. int count; // Number of nodes in subtree, // including this node. }; // Returns the `struct element' that NODE is embedded within. static struct element * node_to_element (const struct abt_node *node) { return abt_data (node, struct element, node); } // Compares the DATA values in A and B and returns a // strcmp-type return value. static int compare_elements (const struct abt_node *a_, const struct abt_node *b_, const void *aux) { const struct element *a = node_to_element (a_); const struct element *b = node_to_element (b_); return a->data < b->data ? -1 : a->data > b->data; } // Recalculates the count for NODE's subtree by adding up the // counts for its left and right child subtrees. static void reaugment_elements (struct abt_node *node_, const void *aux) { struct element *node = node_to_element (node_); node->count = 1; if (node->node.down[0] != NULL) node->count += node_to_element (node->node.down[0])->count; if (node->node.down[1] != NULL) node->count += node_to_element (node->node.down[1])->count; } // Finds and returns the element in ABT that is in the given // 0-based POSITION in in-order. static struct element * find_by_position (struct abt *abt, int position) { struct abt_node *p; for (p = abt->root; p != NULL; ) { int p_pos = p->down[0] ? node_to_element (p->down[0])->count : 0; if (position == p_pos) return node_to_element (p); else if (position < p_pos) p = p->down[0]; else { p = p->down[1]; position -= p_pos + 1; } } return NULL; } For more information on augmenting binary search tree-based data structures, see Cormen-Leiserson-Rivest, chapter 15, or Knuth vol. 3, section 6.2.3, under "Linear list representation." For more information on AA trees, see , which includes source code and links to other resources, such as the original AA tree paper. */ #include #include #include "libpspp/cast.h" /* Returns the data structure corresponding to the given NODE, assuming that NODE is embedded as the given MEMBER name in data type STRUCT. */ #define abt_data(NODE, STRUCT, MEMBER) \ (CHECK_POINTER_HAS_TYPE (NODE, struct abt_node *), \ UP_CAST (NODE, STRUCT, MEMBER)) /* Node in an augmented binary tree. */ struct abt_node { struct abt_node *up; /* Parent (NULL for root). */ struct abt_node *down[2]; /* Left child, right child. */ int level; /* AA tree level (not ordinary BST level). */ }; /* Compares nodes A and B, with the tree's AUX. Returns a strcmp-like result. */ typedef int abt_compare_func (const struct abt_node *a, const struct abt_node *b, const void *aux); /* Recalculates NODE's augmentation based on NODE's data and that of its left and right children NODE->down[0] and NODE[1], respectively, with the tree's AUX. */ typedef void abt_reaugment_func (struct abt_node *node, const void *aux); /* An augmented binary tree. */ struct abt { struct abt_node *root; /* Tree's root, NULL if empty. */ abt_compare_func *compare; /* To compare nodes. */ abt_reaugment_func *reaugment; /* To augment a node using its children. */ const void *aux; /* Auxiliary data. */ }; void abt_init (struct abt *, abt_compare_func *, abt_reaugment_func *, const void *aux); static inline bool abt_is_empty (const struct abt *); struct abt_node *abt_insert (struct abt *, struct abt_node *); void abt_insert_after (struct abt *, const struct abt_node *, struct abt_node *); void abt_insert_before (struct abt *, const struct abt_node *, struct abt_node *); void abt_delete (struct abt *, struct abt_node *); struct abt_node *abt_first (const struct abt *); struct abt_node *abt_last (const struct abt *); struct abt_node *abt_find (const struct abt *, const struct abt_node *); struct abt_node *abt_next (const struct abt *, const struct abt_node *); struct abt_node *abt_prev (const struct abt *, const struct abt_node *); void abt_reaugmented (const struct abt *, struct abt_node *); struct abt_node *abt_changed (struct abt *, struct abt_node *); void abt_moved (struct abt *, struct abt_node *); /* Returns true if ABT contains no nodes, false if ABT contains at least one node. */ static inline bool abt_is_empty (const struct abt *abt) { return abt->root == NULL; } #endif /* libpspp/abt.h */ pspp-1.0.1/src/libpspp/string-map.h0000644000175000017500000002155512470243700014115 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_STRING_MAP_H #define LIBPSPP_STRING_MAP_H /* Map from a unique string key to a string value. This is a convenient wrapper around a "struct hmap" for storing string key-value pairs. */ #include #include "libpspp/hmap.h" struct string_set; /* A node within a string map. */ struct string_map_node { struct hmap_node hmap_node; char *key; char *value; }; /* Returns the string key within NODE. The caller must not modify or free the returned string. */ static inline const char * string_map_node_get_key (const struct string_map_node *node) { return node->key; } /* Returns the string key within NODE. The caller must not free the returned string. */ static inline const char * string_map_node_get_value (const struct string_map_node *node) { return node->value; } /* Returns the string key within NODE. The caller must not free the returned string. */ static inline char * string_map_node_get_value_rw (struct string_map_node *node) { return node->value; } char *string_map_node_swap_value (struct string_map_node *, const char *new_value); char *string_map_node_swap_value_nocopy (struct string_map_node *, char *new_value); void string_map_node_set_value (struct string_map_node *, const char *value); void string_map_node_set_value_nocopy (struct string_map_node *, char *value); void string_map_node_destroy (struct string_map_node *); /* Unordered map from unique string keys to string values. */ struct string_map { struct hmap hmap; }; /* Suitable for use as the initializer for a string_map named MAP. Typical usage: struct string_map map = STRING_MAP_INITIALIZER (map); STRING_MAP_INITIALIZER is an alternative to calling string_map_init. */ #define STRING_MAP_INITIALIZER(MAP) { HMAP_INITIALIZER ((MAP).hmap) } void string_map_init (struct string_map *); void string_map_clone (struct string_map *, const struct string_map *); void string_map_swap (struct string_map *, struct string_map *); void string_map_destroy (struct string_map *); static inline size_t string_map_count (const struct string_map *); static inline bool string_map_is_empty (const struct string_map *); bool string_map_contains (const struct string_map *, const char *); const char *string_map_find (const struct string_map *, const char *); struct string_map_node *string_map_find_node (const struct string_map *, const char *); char *string_map_find_and_delete (struct string_map *, const char *key); struct string_map_node *string_map_insert (struct string_map *, const char *key, const char *value); struct string_map_node *string_map_insert_nocopy (struct string_map *, char *key, char *value); struct string_map_node *string_map_replace (struct string_map *, const char *key, const char *value); struct string_map_node *string_map_replace_nocopy (struct string_map *, char *key, char *value); bool string_map_delete (struct string_map *, const char *); void string_map_delete_node (struct string_map *, struct string_map_node *); void string_map_delete_nofree (struct string_map *, struct string_map_node *); void string_map_clear (struct string_map *); void string_map_insert_map (struct string_map *, const struct string_map *); void string_map_replace_map (struct string_map *, const struct string_map *); void string_map_get_keys (const struct string_map *, struct string_set *); void string_map_get_values (const struct string_map *, struct string_set *); static inline struct string_map_node *string_map_first ( const struct string_map *); static inline struct string_map_node *string_map_next ( const struct string_map *, const struct string_map_node *); /* Macros for conveniently iterating through a string_map, e.g. to print all of the key-value pairs in "my_map": struct string_map_node *node; const char *key, *value; STRING_MAP_FOR_EACH_KEY_VALUE (key, value, node, &my_map) printf ("%s=%s\n", key, value); */ #define STRING_MAP_FOR_EACH_NODE(NODE, MAP) \ for ((NODE) = string_map_first (MAP); (NODE) != NULL; \ (NODE) = string_map_next (MAP, NODE)) #define STRING_MAP_FOR_EACH_NODE_SAFE(NODE, NEXT, MAP) \ for ((NODE) = string_map_first (MAP); \ ((NODE) != NULL \ && ((NEXT) = string_map_next (MAP, NODE), 1)); \ (NODE) = (NEXT)) #define STRING_MAP_FOR_EACH_KEY(KEY, NODE, MAP) \ for ((NODE) = string_map_first (MAP); \ ((NODE) != NULL \ && ((KEY) = string_map_node_get_key (NODE), 1)); \ (NODE) = string_map_next (MAP, NODE)) #define STRING_MAP_FOR_EACH_KEY_SAFE(KEY, NODE, NEXT, MAP) \ for ((NODE) = string_map_first (MAP); \ ((NODE) != NULL \ && ((KEY) = string_map_node_get_key (NODE), 1) \ && ((NEXT) = string_map_next (MAP, NODE), 1)); \ (NODE) = (NEXT)) #define STRING_MAP_FOR_EACH_VALUE(VALUE, NODE, MAP) \ for ((NODE) = string_map_first (MAP); \ ((NODE) != NULL \ && ((VALUE) = (NODE)->value, 1)); \ (NODE) = string_map_next (MAP, NODE)) #define STRING_MAP_FOR_EACH_VALUE_SAFE(VALUE, NODE, NEXT, MAP) \ for ((NODE) = string_map_first (MAP); \ ((NODE) != NULL \ && ((VALUE) = (NODE)->value, 1) \ && ((NEXT) = string_map_next (MAP, NODE), 1)); \ (NODE) = (NEXT)) #define STRING_MAP_FOR_EACH_KEY_VALUE(KEY, VALUE, NODE, MAP) \ for ((NODE) = string_map_first (MAP); \ ((NODE) != NULL \ && ((KEY) = string_map_node_get_key (NODE), 1) \ && ((VALUE) = (NODE)->value, 1)); \ (NODE) = string_map_next (MAP, NODE)) #define STRING_MAP_FOR_EACH_KEY_VALUE_SAFE(KEY, VALUE, NODE, NEXT, MAP) \ for ((NODE) = string_map_first (MAP); \ ((NODE) != NULL \ && ((KEY) = string_map_node_get_key (NODE), 1) \ && ((VALUE) = (NODE)->value, 1) \ && ((NEXT) = string_map_next (MAP, NODE), 1)); \ (NODE) = (NEXT)) /* Returns the number of key-value pairs currently in MAP. */ static inline size_t string_map_count (const struct string_map *map) { return hmap_count (&map->hmap); } /* Returns true if MAP currently contains no key-value pairs, false otherwise. */ static inline bool string_map_is_empty (const struct string_map *map) { return hmap_is_empty (&map->hmap); } /* Returns the first node in MAP, or a null pointer if MAP is empty. See the hmap_first function for information about complexity (O(1) amortized) and ordering (arbitrary). The STRING_MAP_FOR_EACH family of macros provide convenient ways to iterate over all the nodes in a string map. */ static inline struct string_map_node * string_map_first (const struct string_map *map) { return HMAP_FIRST (struct string_map_node, hmap_node, &map->hmap); } /* Returns the next node in MAP following NODE, or a null pointer if NODE is the last node in MAP. See the hmap_next function for information about complexity (O(1) amortized) and ordering (arbitrary). The STRING_MAP_FOR_EACH family of macros provide convenient ways to iterate over all the nodes in a string map. */ static inline struct string_map_node * string_map_next (const struct string_map *map, const struct string_map_node *node) { return HMAP_NEXT (node, struct string_map_node, hmap_node, &map->hmap); } #endif /* libpspp/string-map.h */ pspp-1.0.1/src/libpspp/sparse-xarray.h0000644000175000017500000000636212470242642014640 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Sparse 2-d array. Implements a sparse array, in particular a sparse array of byte arrays. Each row is either present or absent, and each row that is present consists of a fixed number of bytes (columns). Data in the array may be accessed randomly by column and row. When the number of rows stored in the array is small, the data is stored in memory; when it is large, the data is stored in a temporary file. The sparse_xarray_write_columns function provides a somewhat unusual ability: to write a given value to every row in a column or set of columns. This overwrites any values previously written into those columns. For rows that have never been written, this function sets "default" values that later writes can override. The default values are initially all zero bytes. The array keeps track of which row have been written. Reading from a row that has never been written yields the default values. It is permissible to write to only some columns in a row and leave the rest of the row's data at the default values. */ #ifndef LIBPSPP_SPARSE_XARRAY_H #define LIBPSPP_SPARSE_XARRAY_H 1 #include #include struct sparse_xarray *sparse_xarray_create (size_t n_columns, size_t max_memory_rows); struct sparse_xarray *sparse_xarray_clone (const struct sparse_xarray *); void sparse_xarray_destroy (struct sparse_xarray *); size_t sparse_xarray_get_n_columns (const struct sparse_xarray *); size_t sparse_xarray_get_n_rows (const struct sparse_xarray *); bool sparse_xarray_contains_row (const struct sparse_xarray *, unsigned long int row); bool sparse_xarray_read (const struct sparse_xarray *, unsigned long int row, size_t start, size_t n, void *); bool sparse_xarray_write (struct sparse_xarray *, unsigned long int row, size_t start, size_t n, const void *); bool sparse_xarray_write_columns (struct sparse_xarray *, size_t start, size_t n, const void *); bool sparse_xarray_copy (const struct sparse_xarray *src, struct sparse_xarray *dst, bool (*cb) (const void *src, void *dst, void *aux), void *aux); /* For testing purposes only. */ unsigned int sparse_xarray_model_checker_hash (const struct sparse_xarray *, unsigned int basis); #endif /* libpspp/sparse-libpspp.h */ pspp-1.0.1/src/libpspp/encoding-guesser.c0000644000175000017500000002722112470434665015300 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/encoding-guesser.h" #include #include #include #include #include #include #include #include "libpspp/cast.h" #include "libpspp/i18n.h" #include "gl/localcharset.h" #include "gl/c-strcase.h" /* http://www.w3.org/TR/REC-xml/#sec-guessing-no-ext-info is a useful source of information about encoding detection. */ /* Returns the encoding specified by ENCODING, which must be in one of the forms described at the top of encoding-guesser.h. The returned string might be ENCODING itself or a suffix of it, or it might be a statically allocated string. */ const char * encoding_guess_parse_encoding (const char *encoding) { if (encoding == NULL || !c_strcasecmp (encoding, "auto") || !c_strcasecmp (encoding, "auto,locale") || !c_strcasecmp (encoding, "locale")) return locale_charset (); else if (!c_strncasecmp (encoding, "auto,", 5)) return encoding + 5; else return encoding; } /* Returns true if ENCODING, which must be in one of the forms described at the top of encoding-guesser.h, is one that performs encoding autodetection, false otherwise. */ bool encoding_guess_encoding_is_auto (const char *encoding) { return (encoding == NULL || (!c_strncasecmp (encoding, "auto", 4) && (encoding[4] == ',' || encoding[4] == '\0'))); } static uint16_t get_be16 (const uint8_t *data) { return (data[0] << 8) | data[1]; } static uint16_t get_le16 (const uint8_t *data) { return (data[1] << 8) | data[0]; } static uint32_t get_be32 (const uint8_t *data) { return (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3]; } static uint32_t get_le32 (const uint8_t *data) { return (data[3] << 24) | (data[2] << 16) | (data[1] << 8) | data[0]; } static const char * guess_utf16 (const uint8_t *data, size_t n) { size_t even_nulls, odd_nulls; if (n < ENCODING_GUESS_MIN && n % 2 != 0) return NULL; even_nulls = odd_nulls = 0; while (n >= 2) { even_nulls += data[0] == 0; odd_nulls += data[1] == 0; if (data[0] == 0 && data[1] == 0) return NULL; data += 2; n -= 2; } if (odd_nulls > even_nulls) return "UTF-16LE"; else if (even_nulls > 0) return "UTF-16BE"; else return NULL; } static bool is_utf32 (const uint8_t *data, size_t n, uint32_t (*get_u32) (const uint8_t *)) { if (n < ENCODING_GUESS_MIN && n % 4 != 0) return false; while (n >= 4) { uint32_t uc = get_u32 (data); if (uc < 0x09 || uc > 0x10ffff) return false; data += 4; n -= 4; } return true; } /* Counts and returns the number of bytes, but no more than N, starting at S that are ASCII text characters. */ size_t encoding_guess_count_ascii (const void *s_, size_t n) { const uint8_t *s = s_; size_t ofs; for (ofs = 0; ofs < n; ofs++) if (!encoding_guess_is_ascii_text (s[ofs])) break; return ofs; } static bool is_all_utf8_text (const void *s_, size_t n) { const uint8_t *s = s_; size_t ofs; ofs = 0; while (ofs < n) { uint8_t c = s[ofs]; if (c < 0x80) { if (!encoding_guess_is_ascii_text (c)) return false; ofs++; } else { ucs4_t uc; int mblen; mblen = u8_mbtoucr (&uc, s + ofs, n - ofs); if (mblen < 0) return mblen == -2; ofs += mblen; } } return true; } static bool is_utf8_bom (const uint8_t *data, size_t n) { return n >= 3 && data[0] == 0xef && data[1] == 0xbb && data[2] == 0xbf; } static bool is_utf16le_bom (const uint8_t *data, size_t n) { return (n >= ENCODING_GUESS_MIN || n % 2 == 0) && get_le16 (data) == 0xfeff; } static bool is_utf16be_bom (const uint8_t *data, size_t n) { return (n >= ENCODING_GUESS_MIN || n % 2 == 0) && get_be16 (data) == 0xfeff; } static bool is_utf32le_bom (const uint8_t *data, size_t n) { return (n >= ENCODING_GUESS_MIN || n % 4 == 0) && get_le32 (data) == 0xfeff; } static bool is_utf32be_bom (const uint8_t *data, size_t n) { return (n >= ENCODING_GUESS_MIN || n % 4 == 0) && get_be32 (data) == 0xfeff; } /* Attempts to guess the encoding of a text file based on ENCODING, an encoding name in one of the forms described at the top of encoding-guesser.h, and DATA, which contains the first N bytes of the file. Returns the guessed encoding, which might be ENCODING itself or a suffix of it or a statically allocated string. Encoding autodetection only takes place if ENCODING actually specifies autodetection. See encoding-guesser.h for details. UTF-8 cannot be distinguished from other ASCII-based encodings until a non-ASCII text character is encountered. If ENCODING specifies autodetection and this function returns "ASCII", then the client should process the input until it encounters an non-ASCII character (as returned by encoding_guess_is_ascii_text()) and then use encoding_guess_tail_encoding() to make a final encoding guess. See encoding-guesser.h for details. N must be at least ENCODING_GUESS_MIN, unless the file is shorter than that. */ const char * encoding_guess_head_encoding (const char *encoding, const void *data_, size_t n) { const uint8_t *data = data_; const char *fallback_encoding; const char *guess; fallback_encoding = encoding_guess_parse_encoding (encoding); if (!encoding_guess_encoding_is_auto (encoding)) return fallback_encoding; if (n == 0) return fallback_encoding; if (is_utf32be_bom (data, n) || is_utf32le_bom (data, n)) return "UTF-32"; if (n >= 4) { uint32_t x = get_be32 (data); if (x == 0x84319533) return "GB-18030"; else if (x == 0xdd736673) return "UTF-EBCDIC"; } if (is_utf16be_bom (data, n) || is_utf16le_bom (data, n)) return "UTF-16"; if (is_utf8_bom (data, n)) return "UTF-8"; guess = guess_utf16 (data, n); if (guess != NULL) return guess; if (is_utf32 (data, n, get_be32)) return "UTF-32BE"; if (is_utf32 (data, n, get_le32)) return "UTF-32LE"; /* We've tried all the "giveaways" that make the encoding obvious. That rules out, incidentally, all the encodings with multibyte units (e.g. UTF-16, UTF-32). Our remaining goal is to try to distinguish UTF-8 from some ASCII-based fallback encoding. */ /* If the fallback encoding isn't ASCII compatible, give up. */ if (!is_encoding_ascii_compatible (fallback_encoding)) return fallback_encoding; /* If the data we have clearly is not UTF-8, give up. */ if (!encoding_guess_tail_is_utf8 (data, n)) { /* If the fallback encoding is UTF-8, fall back on something else.*/ if (is_encoding_utf8 (fallback_encoding)) return "windows-1252"; return fallback_encoding; } return "ASCII"; } static bool is_encoding_utf16 (const char *encoding) { return (!c_strcasecmp (encoding, "utf-16") || !c_strcasecmp (encoding, "utf16")); } static bool is_encoding_utf32 (const char *encoding) { return (!c_strcasecmp (encoding, "utf-32") || !c_strcasecmp (encoding, "utf32")); } /* If ENCODING is the name of an encoding that could begin with a byte-order mark, and in fact the N bytes in DATA do begin with a byte-order mark, returns the number of bytes in the byte-order mark. Otherwise, returns 0. N must be at least ENCODING_GUESS_MIN, unless the file is shorter than that. */ size_t encoding_guess_bom_length (const char *encoding, const void *data_, size_t n) { const uint8_t *data = data_; return (is_utf8_bom (data, n) && is_encoding_utf8 (encoding) ? 3 : is_utf16le_bom (data, n) && is_encoding_utf16 (encoding) ? 2 : is_utf16be_bom (data, n) && is_encoding_utf16 (encoding) ? 2 : is_utf32le_bom (data, n) && is_encoding_utf32 (encoding) ? 4 : is_utf32be_bom (data, n) && is_encoding_utf32 (encoding) ? 4 : 0); } /* Returns an encoding guess based on ENCODING and the N bytes of text starting at DATA. DATA should start with the first non-ASCII text character (as determined by encoding_guess_is_ascii_text()) found in the input. The return value will either be "UTF-8" or the fallback encoding for ENCODING. See encoding-guesser.h for intended use of this function. N must be at least ENCODING_GUESS_MIN, unless the file has fewer bytes than that starting with the first non-ASCII text character. */ const char * encoding_guess_tail_encoding (const char *encoding, const void *data, size_t n) { if (encoding_guess_tail_is_utf8 (data, n) != 0) return "UTF-8"; else { /* The data is not UTF-8. */ const char *fallback_encoding = encoding_guess_parse_encoding (encoding); /* If the fallback encoding is UTF-8, fall back on something else.*/ if (is_encoding_utf8 (fallback_encoding)) return "windows-1252"; return fallback_encoding; } } /* Returns an encoding guess based on ENCODING and the N bytes of text starting at DATA. DATA should start with the first non-ASCII text character (as determined by encoding_guess_is_ascii_text()) found in the input. The return value is: 0, if the encoding is definitely not UTF-8 (because the input contains byte sequences that are not valid in UTF-8). 1, if the encoding appears to be UTF-8 (because the input contains valid UTF-8 multibyte sequences). -1, if the input contains only ASCII characters. (This means that the input may be treated as UTF-8, since ASCII is a subset of UTF-8.) See encoding-guesser.h for intended use of this function. N must be at least ENCODING_GUESS_MIN, unless the file has fewer bytes than that starting with the first non-ASCII text character. */ int encoding_guess_tail_is_utf8 (const void *data, size_t n) { /* If all the bytes are in the ASCII range, it's just ASCII. */ if (encoding_guess_count_ascii (data, n) == n) return -1; return (n < ENCODING_GUESS_MIN ? u8_check (data, n) == NULL : is_all_utf8_text (data, n)); } /* Attempts to guess the encoding of a text file based on ENCODING, an encoding name in one of the forms described at the top of encoding-guesser.h, and the SIZE byts in DATA, which contains the entire contents of the file. Returns the guessed encoding, which might be ENCODING itself or a suffix of it or a statically allocated string. Encoding autodetection only takes place if ENCODING actually specifies autodetection. See encoding-guesser.h for details. */ const char * encoding_guess_whole_file (const char *encoding, const void *text, size_t size) { const char *guess; guess = encoding_guess_head_encoding (encoding, text, size); if (!strcmp (guess, "ASCII") && encoding_guess_encoding_is_auto (encoding)) return encoding_guess_tail_encoding (encoding, text, size); else return guess; } pspp-1.0.1/src/libpspp/hmap.c0000644000175000017500000001374013146355723012763 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifdef HAVE_CONFIG_H #include #endif #include "libpspp/hmap.h" #include #include #include "gl/xalloc.h" static size_t capacity_to_mask (size_t capacity); /* Initializes MAP as a new hash map that is initially empty. */ void hmap_init (struct hmap *map) { map->count = 0; map->mask = 0; map->buckets = &map->one; map->one = NULL; } /* Exchanges the contents of hash maps A and B. */ void hmap_swap (struct hmap *a, struct hmap *b) { struct hmap tmp = *a; *a = *b; *b = tmp; if (!a->mask) a->buckets = &a->one; if (!b->mask) b->buckets = &b->one; } /* Removes all of the elements from MAP, without destroying MAP itself and without accessing the existing elements (if any). */ void hmap_clear (struct hmap *map) { size_t i; for (i = 0; i <= map->mask; i++) map->buckets[i] = NULL; map->count = 0; } /* Frees the memory, if any, allocated by hash map MAP. This has no effect on the actual data items in MAP, if any, because the client is responsible for allocating and freeing them. It could, however, render them inaccessible if the only pointers to them were from MAP itself, so in such a situation one should iterate through the map and free the data items before destroying it. */ void hmap_destroy (struct hmap *map) { if (map != NULL && map->buckets != &map->one) free (map->buckets); } /* Reallocates MAP's hash buckets so that NEW_MASK becomes the hash value bit-mask used to choose a hash bucket, then rehashes any data elements in MAP into the new hash buckets. NEW_MASK must be a power of 2 minus 1 (including 0), that is, its value in binary must be all 1-bits. */ static void hmap_rehash (struct hmap *map, size_t new_mask) { struct hmap_node **new_buckets; struct hmap_node *node, *next; assert ((new_mask & (new_mask + 1)) == 0); if (new_mask) new_buckets = xcalloc (new_mask + 1, sizeof *new_buckets); else { new_buckets = &map->one; new_buckets[0] = NULL; } if (map->count > 0) { for (node = hmap_first (map); node != NULL; node = next) { size_t new_idx = node->hash & new_mask; struct hmap_node **new_bucket = &new_buckets[new_idx]; next = hmap_next (map, node); node->next = *new_bucket; *new_bucket = node; } } if (map->buckets != &map->one) free (map->buckets); map->buckets = new_buckets; map->mask = new_mask; } /* Ensures that MAP has sufficient space to store at least CAPACITY data elements, allocating a new set of buckets and rehashing if necessary. */ void hmap_reserve (struct hmap *map, size_t capacity) { if (capacity > hmap_capacity (map)) hmap_rehash (map, capacity_to_mask (capacity)); } /* Shrinks MAP's set of buckets to the minimum number needed to store its current number of elements, allocating a new set of buckets and rehashing if that would save space. */ void hmap_shrink (struct hmap *map) { size_t new_mask = capacity_to_mask (map->count); if (new_mask < map->mask) hmap_rehash (map, new_mask); } /* Moves NODE around in MAP to compensate for its hash value having changed to NEW_HASH. This function does not verify that MAP does not already contain a data item that duplicates NODE's new value. If duplicates should be disallowed (which is the usual case), then the client must check for duplicates before changing NODE's value. */ void hmap_changed (struct hmap *map, struct hmap_node *node, size_t new_hash) { if ((new_hash ^ node->hash) & map->mask) { hmap_delete (map, node); hmap_insert_fast (map, node, new_hash); } else node->hash = new_hash; } /* Hash map nodes may be moved around in memory as necessary, e.g. as the result of an realloc operation on a block that contains a node. Once this is done, call this function passing NODE that was moved, its former location in memory OLD, and its hash map MAP before attempting any other operation on MAP, NODE, or any other node in MAP. It is not safe to move more than one node, then to call this function for each node. Instead, move a single node, call this function, move another node, and so on. Alternatively, remove all affected nodes from the hash map, move them, then re-insert all of them. Assuming uniform hashing and no duplicate data items in MAP, this function runs in constant time. */ void hmap_moved (struct hmap *map, struct hmap_node *node, const struct hmap_node *old) { struct hmap_node **p = &map->buckets[node->hash & map->mask]; while (*p != old) p = &(*p)->next; *p = node; } /* Returns the minimum-value mask required to allow for a hash table capacity of at least CAPACITY. The return value will be a bit-mask suitable for use as the "mask" member of struct hmap, that is, a power of 2 minus 1 (including 0). */ static size_t capacity_to_mask (size_t capacity) { /* Calculate the minimum mask necessary to support the given capacity. */ size_t mask = 0; while (hmap_mask_to_capacity__ (mask) < capacity) mask = (mask << 1) | 1; /* If the mask is nonzero, make it at least 3, because there is little point in allocating an array of just 2 pointers. */ mask |= (mask & 1) << 1; return mask; } pspp-1.0.1/src/libpspp/pool.c0000644000175000017500000006435212470243700013002 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2000, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/pool.h" #include #include #include "libpspp/assertion.h" #include "libpspp/message.h" #include "libpspp/temp-file.h" #include "libpspp/str.h" #include "gl/xalloc.h" /* Fast, low-overhead memory block suballocator. */ struct pool { struct pool *parent; /* Pool of which this pool is a subpool. */ struct pool_block *blocks; /* Blocks owned by the pool. */ struct pool_gizmo *gizmos; /* Other stuff owned by the pool. */ }; /* Pool block. */ struct pool_block { struct pool_block *prev; struct pool_block *next; size_t ofs; }; /* Gizmo types. */ enum { POOL_GIZMO_MALLOC, POOL_GIZMO_FILE, POOL_GIZMO_TEMP_FILE, POOL_GIZMO_SUBPOOL, POOL_GIZMO_REGISTERED, }; /* Pool routines can maintain objects (`gizmos') as well as doing suballocation. This structure is used to keep track of them. */ struct pool_gizmo { struct pool *pool; struct pool_gizmo *prev; struct pool_gizmo *next; long serial; /* Serial number. */ int type; /* Type of this gizmo. */ /* Type-dependent info. */ union { FILE *file; /* POOL_GIZMO_FILE, POOL_GIZMO_TEMP_FILE. */ struct pool *subpool; /* POOL_GIZMO_SUBPOOL. */ /* POOL_GIZMO_REGISTERED. */ struct { void (*free) (void *p); void *p; } registered; } p; }; /* Rounds X up to the next multiple of Y. */ #ifndef ROUND_UP #define ROUND_UP(X, Y) \ (((X) + ((Y) - 1)) / (Y) * (Y)) #endif /* Types that provide typically useful alignment sizes. */ union align { void *op; void (*fp) (void); long l; double d; /* glibc jmp_buf on ia64 requires 16-byte alignment. This ensures it. */ size_t s[2]; }; /* This should be the alignment size used by malloc(). The size of the union above is correct, if not optimal, in all known cases. This is normally 8 bytes for 32-bit architectures and 16 bytes for 64-bit architectures. */ #define ALIGN_SIZE sizeof (union align) /* DISCRETE_BLOCKS may be declared as nonzero to prevent suballocation of blocks. This is useful under memory debuggers like valgrind because it allows the source location of bugs to be more accurately pinpointed. On the other hand, if we're testing the library, then we want to test the library's real functionality, not its crippled, slow, simplified functionality. */ /*#define DISCRETE_BLOCKS 1*/ /* Size of each block allocated in the pool, in bytes. Should be at least 1k. */ #ifndef BLOCK_SIZE #define BLOCK_SIZE 1024 #endif /* Sizes of some structures with alignment padding included. */ #define POOL_BLOCK_SIZE ROUND_UP (sizeof (struct pool_block), ALIGN_SIZE) #define POOL_GIZMO_SIZE ROUND_UP (sizeof (struct pool_gizmo), ALIGN_SIZE) #define POOL_SIZE ROUND_UP (sizeof (struct pool), ALIGN_SIZE) /* Serial number used to keep track of gizmos for mark/release. */ static long serial = 0; /* Prototypes. */ static void add_gizmo (struct pool *, struct pool_gizmo *); static void free_gizmo (struct pool_gizmo *); static void free_all_gizmos (struct pool *pool); static void delete_gizmo (struct pool *, struct pool_gizmo *); static void check_gizmo (struct pool *, struct pool_gizmo *); /* General routines. */ /* Creates and returns a new memory pool, which allows malloc()'d blocks to be suballocated in a time- and space-efficient manner. The entire contents of the memory pool are freed at once. In addition, other objects can be associated with a memory pool. These are released when the pool is destroyed. */ struct pool * pool_create (void) { struct pool_block *block; struct pool *pool; block = xmalloc (BLOCK_SIZE); block->prev = block->next = block; block->ofs = POOL_BLOCK_SIZE + POOL_SIZE; pool = (struct pool *) (((char *) block) + POOL_BLOCK_SIZE); pool->parent = NULL; pool->blocks = block; pool->gizmos = NULL; return pool; } /* Creates a pool, allocates a block STRUCT_SIZE bytes in length from it, stores the pool's address at offset POOL_MEMBER_OFFSET within the block, and returns the allocated block. Meant for use indirectly via pool_create_container(). */ void * pool_create_at_offset (size_t struct_size, size_t pool_member_offset) { struct pool *pool; char *struct_; assert (struct_size >= sizeof pool); assert (pool_member_offset <= struct_size - sizeof pool); pool = pool_create (); struct_ = pool_alloc (pool, struct_size); *(struct pool **) (struct_ + pool_member_offset) = pool; return struct_; } /* Destroy the specified pool, including all subpools. */ void pool_destroy (struct pool *pool) { if (pool == NULL) return; /* Remove this pool from its parent's list of gizmos. */ if (pool->parent) delete_gizmo (pool->parent, (void *) (((char *) pool) + POOL_SIZE)); free_all_gizmos (pool); /* Free all the memory. */ { struct pool_block *cur, *next; pool->blocks->prev->next = NULL; for (cur = pool->blocks; cur; cur = next) { next = cur->next; free (cur); } } } /* Release all the memory and gizmos in POOL. Blocks are not given back with free() but kept for later allocations. To give back memory, use a subpool instead. */ void pool_clear (struct pool *pool) { free_all_gizmos (pool); /* Zero out block sizes. */ { struct pool_block *cur; cur = pool->blocks; do { cur->ofs = POOL_BLOCK_SIZE; if ((char *) cur + POOL_BLOCK_SIZE == (char *) pool) { cur->ofs += POOL_SIZE; if (pool->parent != NULL) cur->ofs += POOL_GIZMO_SIZE; } cur = cur->next; } while (cur != pool->blocks); } } /* Suballocation routines. */ /* Allocates a memory region AMT bytes in size from POOL and returns a pointer to the region's start. The region is properly aligned for storing any object. */ void * pool_alloc (struct pool *pool, size_t amt) { assert (pool != NULL); if (amt == 0) return NULL; #ifndef DISCRETE_BLOCKS if (amt <= MAX_SUBALLOC) { /* If there is space in this block, take it. */ struct pool_block *b = pool->blocks; b->ofs = ROUND_UP (b->ofs, ALIGN_SIZE); if (b->ofs + amt <= BLOCK_SIZE) { void *const p = ((char *) b) + b->ofs; b->ofs += amt; return p; } /* No space in this block, so we must make other arrangements. */ if (b->next->ofs == 0) { /* The next block is empty. Use it. */ b = b->next; b->ofs = POOL_BLOCK_SIZE; if ((char *) b + POOL_BLOCK_SIZE == (char *) pool) b->ofs += POOL_SIZE; } else { /* Create a new block at the start of the list. */ b = xmalloc (BLOCK_SIZE); b->next = pool->blocks; b->prev = pool->blocks->prev; b->ofs = POOL_BLOCK_SIZE; pool->blocks->prev->next = b; pool->blocks->prev = b; } pool->blocks = b; /* Allocate space from B. */ b->ofs += amt; return ((char *) b) + b->ofs - amt; } else #endif return pool_malloc (pool, amt); } /* Allocates a memory region AMT bytes in size from POOL and returns a pointer to the region's start. The region is not necessarily aligned, so it is most suitable for storing strings. */ void * pool_alloc_unaligned (struct pool *pool, size_t amt) { if (pool == NULL) return xmalloc (amt); #ifndef DISCRETE_BLOCKS /* Strings need not be aligned on any boundary, but some operations may be more efficient when they are. However, that's only going to help with reasonably long strings. */ if (amt < ALIGN_SIZE) { if (amt == 0) return NULL; else { struct pool_block *const b = pool->blocks; if (b->ofs + amt <= BLOCK_SIZE) { void *p = ((char *) b) + b->ofs; b->ofs += amt; return p; } } } #endif return pool_alloc (pool, amt); } /* Allocates a memory region N * S bytes in size from POOL and returns a pointer to the region's start. N must be nonnegative, S must be positive. Terminates the program if the memory cannot be obtained, including the case where N * S overflows the range of size_t. */ void * pool_nalloc (struct pool *pool, size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return pool_alloc (pool, n * s); } /* Allocates SIZE bytes in POOL, copies BUFFER into it, and returns the new copy. */ void * pool_clone (struct pool *pool, const void *buffer, size_t size) { void *block = pool_alloc (pool, size); memcpy (block, buffer, size); return block; } /* Allocates SIZE bytes of unaligned data in POOL, copies BUFFER into it, and returns the new copy. */ void * pool_clone_unaligned (struct pool *pool, const void *buffer, size_t size) { void *block = pool_alloc_unaligned (pool, size); memcpy (block, buffer, size); return block; } /* Duplicates null-terminated STRING, within POOL, and returns a pointer to the duplicate. For use only with strings, because the returned pointere may not be aligned properly for other types. */ char * pool_strdup (struct pool *pool, const char *string) { return pool_clone_unaligned (pool, string, strlen (string) + 1); } /* Duplicates the SIZE bytes of STRING, plus a trailing 0 byte, and returns a pointer to the duplicate. For use only with strings, because the returned pointere may not be aligned properly for other types. */ char * pool_strdup0 (struct pool *pool, const char *string, size_t size) { char *new_string = pool_alloc_unaligned (pool, size + 1); memcpy (new_string, string, size); new_string[size] = '\0'; return new_string; } /* Formats FORMAT with the given ARGS in memory allocated from POOL and returns the formatted string. */ char * pool_vasprintf (struct pool *pool, const char *format, va_list args_) { struct pool_block *b; va_list args; int needed, avail; char *s; va_copy (args, args_); b = pool->blocks; avail = BLOCK_SIZE - b->ofs; s = ((char *) b) + b->ofs; needed = vsnprintf (s, avail, format, args); va_end (args); if (needed >= 0) { if (needed < avail) { /* Success. Reserve the space that was actually used. */ b->ofs += needed + 1; } else { /* Failure, but now we know how much space is needed. Allocate that much and reformat. */ s = pool_alloc (pool, needed + 1); va_copy (args, args_); vsprintf (s, format, args); va_end (args); } } else { /* Some old libc's returned -1 when the destination string was too short. This should be uncommon these days and it's a rare case anyhow. Use the easiest solution: punt to dynamic allocation. */ va_copy (args, args_); s = xvasprintf (format, args); va_end (args); pool_register (pool, free, s); } return s; } /* Formats FORMAT in memory allocated from POOL and returns the formatted string. */ char * pool_asprintf (struct pool *pool, const char *format, ...) { va_list args; char *string; va_start (args, format); string = pool_vasprintf (pool, format, args); va_end (args); return string; } /* Standard allocation routines. */ /* Allocates AMT bytes using malloc(), to be managed by POOL, and returns a pointer to the beginning of the block. If POOL is a null pointer, then allocates a normal memory block with xmalloc(). */ void * pool_malloc (struct pool *pool, size_t amt) { if (pool != NULL) { if (amt != 0) { struct pool_gizmo *g = xmalloc (amt + POOL_GIZMO_SIZE); g->type = POOL_GIZMO_MALLOC; add_gizmo (pool, g); return ((char *) g) + POOL_GIZMO_SIZE; } else return NULL; } else return xmalloc (amt); } /* Allocates and returns N elements of S bytes each, to be managed by POOL. If POOL is a null pointer, then allocates a normal memory block with malloc(). N must be nonnegative, S must be positive. Terminates the program if the memory cannot be obtained, including the case where N * S overflows the range of size_t. */ void * pool_nmalloc (struct pool *pool, size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return pool_malloc (pool, n * s); } /* Allocates AMT bytes using malloc(), to be managed by POOL, zeros the block, and returns a pointer to the beginning of the block. If POOL is a null pointer, then allocates a normal memory block with xmalloc(). */ void * pool_zalloc (struct pool *pool, size_t amt) { void *p = pool_malloc (pool, amt); memset (p, 0, amt); return p; } /* Allocates and returns N elements of S bytes each, to be managed by POOL, and zeros the block. If POOL is a null pointer, then allocates a normal memory block with malloc(). N must be nonnegative, S must be positive. Terminates the program if the memory cannot be obtained, including the case where N * S overflows the range of size_t. */ void * pool_calloc (struct pool *pool, size_t n, size_t s) { void *p = pool_nmalloc (pool, n, s); memset (p, 0, n * s); return p; } /* Changes the allocation size of the specified memory block P managed by POOL to AMT bytes and returns a pointer to the beginning of the block. If POOL is a null pointer, then the block is reallocated in the usual way with realloc(). */ void * pool_realloc (struct pool *pool, void *p, size_t amt) { if (pool != NULL) { if (p != NULL) { if (amt != 0) { struct pool_gizmo *g = (void *) (((char *) p) - POOL_GIZMO_SIZE); check_gizmo (pool, g); g = xrealloc (g, amt + POOL_GIZMO_SIZE); if (g->next) g->next->prev = g; if (g->prev) g->prev->next = g; else pool->gizmos = g; check_gizmo (pool, g); return ((char *) g) + POOL_GIZMO_SIZE; } else { pool_free (pool, p); return NULL; } } else return pool_malloc (pool, amt); } else return xrealloc (p, amt); } /* Changes the allocation size of the specified memory block P managed by POOL to N * S bytes and returns a pointer to the beginning of the block. N must be nonnegative, S must be positive. If POOL is a null pointer, then the block is reallocated in the usual way with xrealloc(). Terminates the program if the memory cannot be obtained, including the case where N * S overflows the range of size_t. */ void * pool_nrealloc (struct pool *pool, void *p, size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return pool_realloc (pool, p, n * s); } /* If P is null, allocate a block of at least *PN such objects; otherwise, reallocate P so that it contains more than *PN objects each of S bytes. *PN must be nonzero unless P is null, and S must be nonzero. Set *PN to the new number of objects, and return the pointer to the new block. *PN is never set to zero, and the returned pointer is never null. The block returned is managed by POOL. If POOL is a null pointer, then the block is reallocated in the usual way with x2nrealloc(). Terminates the program if the memory cannot be obtained, including the case where the memory required overflows the range of size_t. Repeated reallocations are guaranteed to make progress, either by allocating an initial block with a nonzero size, or by allocating a larger block. In the following implementation, nonzero sizes are doubled so that repeated reallocations have O(N log N) overall cost rather than O(N**2) cost, but the specification for this function does not guarantee that sizes are doubled. Here is an example of use: int *p = NULL; struct pool *pool; size_t used = 0; size_t allocated = 0; void append_int (int value) { if (used == allocated) p = pool_2nrealloc (pool, p, &allocated, sizeof *p); p[used++] = value; } This causes x2nrealloc to allocate a block of some nonzero size the first time it is called. To have finer-grained control over the initial size, set *PN to a nonzero value before calling this function with P == NULL. For example: int *p = NULL; struct pool *pool; size_t used = 0; size_t allocated = 0; size_t allocated1 = 1000; void append_int (int value) { if (used == allocated) { p = pool_2nrealloc (pool, p, &allocated1, sizeof *p); allocated = allocated1; } p[used++] = value; } This function implementation is from gnulib. */ void * pool_2nrealloc (struct pool *pool, void *p, size_t *pn, size_t s) { size_t n = *pn; if (p == NULL) { if (n == 0) { /* The approximate size to use for initial small allocation requests, when the invoking code specifies an old size of zero. 64 bytes is the largest "small" request for the GNU C library malloc. */ enum { DEFAULT_MXFAST = 64 }; n = DEFAULT_MXFAST / s; n += !n; } } else { if (SIZE_MAX / 2 / s < n) xalloc_die (); n *= 2; } *pn = n; return pool_realloc (pool, p, n * s); } /* Frees block P managed by POOL. If POOL is a null pointer, then the block is freed as usual with free(). */ void pool_free (struct pool *pool, void *p) { if (pool != NULL && p != NULL) { struct pool_gizmo *g = (void *) (((char *) p) - POOL_GIZMO_SIZE); check_gizmo (pool, g); delete_gizmo (pool, g); free (g); } else free (p); } /* Gizmo allocations. */ /* Creates and returns a pool as a subpool of POOL. The subpool will be destroyed automatically when POOL is destroyed. It may also be destroyed explicitly in advance. */ struct pool * pool_create_subpool (struct pool *pool) { struct pool *subpool; struct pool_gizmo *g; assert (pool != NULL); subpool = pool_create (); subpool->parent = pool; g = (void *) (((char *) subpool->blocks) + subpool->blocks->ofs); subpool->blocks->ofs += POOL_GIZMO_SIZE; g->type = POOL_GIZMO_SUBPOOL; g->p.subpool = subpool; add_gizmo (pool, g); return subpool; } /* Makes SUBPOOL a subpool of POOL. SUBPOOL must not already have a parent pool. The subpool will be destroyed automatically when POOL is destroyed. It may also be destroyed explicitly in advance. */ void pool_add_subpool (struct pool *pool, struct pool *subpool) { struct pool_gizmo *g; assert (pool != NULL); assert (subpool != NULL); assert (subpool->parent == NULL); g = pool_alloc (subpool, sizeof *g); g->type = POOL_GIZMO_SUBPOOL; g->p.subpool = subpool; add_gizmo (pool, g); subpool->parent = pool; } /* Opens file FILE_NAME with mode MODE and returns a handle to it if successful or a null pointer if not. The file will be closed automatically when POOL is destroyed, or it may be closed explicitly in advance using pool_fclose(), or detached from the pool with pool_detach_file(). */ FILE * pool_fopen (struct pool *pool, const char *file_name, const char *mode) { FILE *f; assert (pool && file_name && mode); f = fopen (file_name, mode); if (f != NULL) pool_attach_file (pool, f); return f; } /* Closes file FILE managed by POOL. Returns 0 if successful, EOF if an I/O error occurred. */ int pool_fclose (struct pool *pool, FILE *file) { assert (pool && file); pool_detach_file (pool, file); return fclose (file); } /* Attaches FILE to POOL. The file will be closed automatically when POOL is destroyed, or it may be closed explicitly in advance using pool_fclose(), or detached from the pool with pool_detach_file(). */ void pool_attach_file (struct pool *pool, FILE *file) { struct pool_gizmo *g = pool_alloc (pool, sizeof *g); g->type = POOL_GIZMO_FILE; g->p.file = file; add_gizmo (pool, g); } /* Detaches FILE from POOL. */ void pool_detach_file (struct pool *pool, FILE *file) { struct pool_gizmo *g; for (g = pool->gizmos; g; g = g->next) if (g->type == POOL_GIZMO_FILE && g->p.file == file) { delete_gizmo (pool, g); return; } } /* Creates a temporary file with create_temp_file() and returns a handle to it if successful or a null pointer if not. The file will be closed automatically when POOL is destroyed, or it may be closed explicitly in advance using pool_fclose_temp_file(), or detached from the pool with pool_detach_temp_file(). */ FILE * pool_create_temp_file (struct pool *pool) { FILE *file = create_temp_file (); if (file != NULL) pool_attach_temp_file (pool, file); return file; } /* Closes file FILE managed by POOL. FILE must have been opened with create_temp_file(). */ void pool_fclose_temp_file (struct pool *pool, FILE *file) { assert (pool && file); pool_detach_temp_file (pool, file); close_temp_file (file); } /* Attaches FILE, which must have been opened with create_temp_file(), to POOL. The file will be closed automatically when POOL is destroyed, or it may be closed explicitly in advance using pool_fclose_temp_file(), or detached from the pool with pool_detach_temp_file(). */ void pool_attach_temp_file (struct pool *pool, FILE *file) { struct pool_gizmo *g = pool_alloc (pool, sizeof *g); g->type = POOL_GIZMO_TEMP_FILE; g->p.file = file; add_gizmo (pool, g); } /* Detaches FILE that was opened with create_temp_file() from POOL. */ void pool_detach_temp_file (struct pool *pool, FILE *file) { struct pool_gizmo *g; for (g = pool->gizmos; g; g = g->next) if (g->type == POOL_GIZMO_TEMP_FILE && g->p.file == file) { delete_gizmo (pool, g); return; } } /* Registers FREE to be called with argument P. P should be unique among those registered in POOL so that it can be uniquely identified by pool_unregister(). If not unregistered, FREE will be called with argument P when POOL is destroyed. */ void pool_register (struct pool *pool, void (*free) (void *), void *p) { assert (pool && free && p); { struct pool_gizmo *g = pool_alloc (pool, sizeof *g); g->type = POOL_GIZMO_REGISTERED; g->p.registered.free = free; g->p.registered.p = p; add_gizmo (pool, g); } } /* Unregisters previously registered P from POOL. Returns true only if P was found to be registered in POOL. */ bool pool_unregister (struct pool *pool, void *p) { assert (pool && p); { struct pool_gizmo *g; for (g = pool->gizmos; g; g = g->next) if (g->type == POOL_GIZMO_REGISTERED && g->p.registered.p == p) { delete_gizmo (pool, g); return true; } } return false; } /* Partial freeing. */ /* Notes the state of POOL into MARK so that it may be restored by a call to pool_release(). */ void pool_mark (struct pool *pool, struct pool_mark *mark) { assert (pool && mark); mark->block = pool->blocks; mark->ofs = pool->blocks->ofs; mark->serial = serial; } /* Restores to POOL the state recorded in MARK. Emptied blocks are not given back with free() but kept for later allocations. To get that behavior, use a subpool instead. */ void pool_release (struct pool *pool, const struct pool_mark *mark) { assert (pool && mark); { struct pool_gizmo *cur, *next; for (cur = pool->gizmos; cur && cur->serial >= mark->serial; cur = next) { next = cur->next; free_gizmo (cur); } if (cur != NULL) { cur->prev = NULL; pool->gizmos = cur; } else pool->gizmos = NULL; } { struct pool_block *cur; for (cur = pool->blocks; cur != mark->block; cur = cur->next) { cur->ofs = POOL_BLOCK_SIZE; if ((char *) cur + POOL_BLOCK_SIZE == (char *) pool) { cur->ofs += POOL_SIZE; if (pool->parent != NULL) cur->ofs += POOL_GIZMO_SIZE; } } pool->blocks = mark->block; pool->blocks->ofs = mark->ofs; } } /* Private functions. */ /* Adds GIZMO at the beginning of POOL's gizmo list. */ static void add_gizmo (struct pool *pool, struct pool_gizmo *gizmo) { assert (pool && gizmo); gizmo->pool = pool; gizmo->next = pool->gizmos; gizmo->prev = NULL; if (pool->gizmos) pool->gizmos->prev = gizmo; pool->gizmos = gizmo; gizmo->serial = serial++; check_gizmo (pool, gizmo); } /* Removes GIZMO from POOL's gizmo list. */ static void delete_gizmo (struct pool *pool, struct pool_gizmo *gizmo) { assert (pool && gizmo); check_gizmo (pool, gizmo); if (gizmo->prev) gizmo->prev->next = gizmo->next; else pool->gizmos = gizmo->next; if (gizmo->next) gizmo->next->prev = gizmo->prev; } /* Frees any of GIZMO's internal state. GIZMO's data must not be referenced after calling this function. */ static void free_gizmo (struct pool_gizmo *gizmo) { assert (gizmo != NULL); switch (gizmo->type) { case POOL_GIZMO_MALLOC: free (gizmo); break; case POOL_GIZMO_FILE: fclose (gizmo->p.file); /* Ignore errors. */ break; case POOL_GIZMO_TEMP_FILE: close_temp_file (gizmo->p.file); /* Ignore errors. */ break; case POOL_GIZMO_SUBPOOL: gizmo->p.subpool->parent = NULL; pool_destroy (gizmo->p.subpool); break; case POOL_GIZMO_REGISTERED: gizmo->p.registered.free (gizmo->p.registered.p); break; default: NOT_REACHED (); } } /* Free all the gizmos in POOL. */ static void free_all_gizmos (struct pool *pool) { struct pool_gizmo *cur, *next; for (cur = pool->gizmos; cur; cur = next) { next = cur->next; free_gizmo (cur); } pool->gizmos = NULL; } static void check_gizmo (struct pool *p, struct pool_gizmo *g) { assert (g->pool == p); assert (g->next == NULL || g->next->prev == g); assert ((g->prev != NULL && g->prev->next == g) || (g->prev == NULL && p->gizmos == g)); } pspp-1.0.1/src/libpspp/tower.c0000644000175000017500000002613613137223525013173 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/tower.h" #include #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" static struct tower_node *abt_to_tower_node (const struct abt_node *); static struct tower_node *first_node (const struct tower *); static struct tower_node *last_node (const struct tower *); static struct tower_node *next_node (const struct tower *, const struct tower_node *); static struct tower_node *prev_node (const struct tower *, const struct tower_node *); static unsigned long int get_subtree_size (const struct abt_node *); static unsigned long int get_subtree_count (const struct abt_node *); static void reaugment_tower_node (struct abt_node *, const void *aux); /* Returns the height of the bottom of the given tower NODE. The performance of this function is O(lg n) in the number of nodes in the tower. It is often possible to avoid calling this function, either by taking advantage of the NODE_START parameter to tower_lookup or by incrementally keeping track of height while iterating through a tower. In the former case the asymptotic performance is no different, since tower_lookup is also O(lg n), but in the latter case performance improves from O(lg n) to O(1). */ unsigned long int tower_node_get_level (const struct tower_node *node) { const struct abt_node *p = &node->abt_node; unsigned long level = get_subtree_size (p->down[0]); while (p->up != NULL) { if (p == p->up->down[1]) level += (get_subtree_size (p->up->down[0]) + abt_to_tower_node (p->up)->size); p = p->up; } return level; } /* Returns the index of the given tower NODE. The performance of this function is O(lg n) in the number of nodes in the tower. It is often possible to avoid calling this function by keeping track of the index while iterating through a tower. Doing so when possible will improve performance from O(lg n) to O(1). */ unsigned long int tower_node_get_index (const struct tower_node *node) { const struct abt_node *p = &node->abt_node; unsigned long index = get_subtree_count (p->down[0]); while (p->up != NULL) { if (p == p->up->down[1]) index += get_subtree_count (p->up->down[0]) + 1; p = p->up; } return index; } /* Initializes T as an empty tower. */ void tower_init (struct tower *t) { abt_init (&t->abt, NULL, reaugment_tower_node, NULL); t->cache_bottom = ULONG_MAX; } /* Returns true if T contains no nodes, false otherwise. */ bool tower_is_empty (const struct tower *t) { return t->abt.root == NULL; } /* Returns the number of nodes in tower T. */ unsigned long int tower_count (const struct tower *t) { return get_subtree_count (t->abt.root); } /* Returns the total height of tower T. */ unsigned long tower_height (const struct tower *t) { return get_subtree_size (t->abt.root); } /* Inserts node NEW with the specified SIZE into T just below node UNDER, or at the top of T if UNDER is a null pointer. */ void tower_insert (struct tower *t, unsigned long size, struct tower_node *new, struct tower_node *under) { assert (size > 0); new->size = size; abt_insert_before (&t->abt, under ? &under->abt_node : NULL, &new->abt_node); t->cache_bottom = ULONG_MAX; } /* Deletes NODE from tower T. */ struct tower_node * tower_delete (struct tower *t, struct tower_node *node) { struct tower_node *next = next_node (t, node); abt_delete (&t->abt, &node->abt_node); t->cache_bottom = ULONG_MAX; return next; } /* Changes the size of NODE in tower T to NEW_SIZE. */ void tower_resize (struct tower *t, struct tower_node *node, unsigned long new_size) { assert (new_size > 0); node->size = new_size; abt_reaugmented (&t->abt, &node->abt_node); t->cache_bottom = ULONG_MAX; } /* Removes nodes FIRST through LAST (exclusive) from tower SRC and splices them into tower DST just below node UNDER, or at the top of DST if UNDER is a null pointer. It might be better to implement an abt_splice function and turn this into a wrapper, but the asymptotic performance would be the same. */ void tower_splice (struct tower *dst, struct tower_node *under, struct tower *src, struct tower_node *first, struct tower_node *last) { struct tower_node *next; /* Conceptually, DST == SRC is valid. Practically, it's more difficult to get it right, and our client code doesn't need it. */ assert (dst != src); for (; first != last; first = next) { next = tower_delete (src, first); abt_insert_before (&dst->abt, under ? &under->abt_node : NULL, &first->abt_node); } dst->cache_bottom = src->cache_bottom = ULONG_MAX; } /* Returns the node at the given HEIGHT from the bottom of tower T. HEIGHT must be less than T's height (as returned by tower_height). Stores in *NODE_START the height of the bottom of the returned node, which may be less than HEIGHT if HEIGHT refers to the middle of a node instead of its bottom. */ struct tower_node * tower_lookup (const struct tower *t_, unsigned long height, unsigned long *node_start) { struct tower *t = CONST_CAST (struct tower *, t_); struct abt_node *p; assert (height < tower_height (t)); if (height >= t->cache_bottom && height - t->cache_bottom < t->cache->size) { *node_start = t->cache_bottom; return t->cache; } *node_start = 0; p = t->abt.root; for (;;) { unsigned long left_size = get_subtree_size (p->down[0]); if (height < left_size) { /* Our goal height must lie within the left subtree. */ p = p->down[0]; } else { /* Our goal height cannot be in the left subtree. */ struct tower_node *node = abt_to_tower_node (p); unsigned long int node_size = node->size; height -= left_size; *node_start += left_size; if (height < node_size) { /* Our goal height is in P. */ t->cache = node; t->cache_bottom = *node_start; return node; } else { /* Our goal height is in the right subtree. */ p = p->down[1]; height -= node_size; *node_start += node_size; } } } } /* Returns the node with the given 0-based INDEX, which must be less than the number of nodes in T (as returned by tower_count). */ struct tower_node * tower_get (const struct tower *t_, unsigned long int index) { struct tower *t = CONST_CAST (struct tower *, t_); struct abt_node *p; assert (index < tower_count (t)); p = t->abt.root; for (;;) { unsigned long left_count = get_subtree_count (p->down[0]); if (index < left_count) p = p->down[0]; else if (index == left_count) return abt_to_tower_node (p); else { p = p->down[1]; index -= left_count + 1; } } } /* Returns the node at height 0 in tower T, or a null pointer if T is empty. */ struct tower_node * tower_first (const struct tower *t) { return first_node (t); } /* Returns the node at the top of tower T, or a null pointer if T is empty. */ struct tower_node * tower_last (const struct tower *t) { return last_node (t); } /* If NODE is nonnull, returns the node just above NODE in tower T, or a null pointer if NODE is the topmost node in T. If NODE is null, acts like tower_first. */ struct tower_node * tower_next (const struct tower *t, const struct tower_node *node) { return node != NULL ? next_node (t, node) : first_node (t); } /* If NODE is nonnull, returns the node just below NODE in tower T, or a null pointer if NODE is the bottommost node in T. If NODE is null, acts like tower_last. */ struct tower_node * tower_prev (const struct tower *t, const struct tower_node *node) { return node != NULL ? prev_node (t, node) : last_node (t); } /* Returns the tower node corresponding to the given ABT_NODE. */ static struct tower_node * abt_to_tower_node (const struct abt_node *abt_node) { return abt_data (abt_node, struct tower_node, abt_node); } /* Returns the tower node corresponding to the given ABT_NODE. */ static struct tower_node * abt_to_tower_node_null (const struct abt_node *abt_node) { return abt_node != NULL ? abt_to_tower_node (abt_node) : NULL; } /* Returns the first node in TOWER. */ static struct tower_node * first_node (const struct tower *t) { return abt_to_tower_node_null (abt_first (&t->abt)); } /* Returns the first node in TOWER. */ static struct tower_node * last_node (const struct tower *t) { return abt_to_tower_node_null (abt_last (&t->abt)); } /* Returns the next node in TOWER after NODE. */ static struct tower_node * next_node (const struct tower *t, const struct tower_node *node) { return abt_to_tower_node_null (abt_next (&t->abt, &node->abt_node)); } /* Returns the previous node in TOWER before NODE. */ static struct tower_node * prev_node (const struct tower *t, const struct tower_node *node) { return abt_to_tower_node_null (abt_prev (&t->abt, &node->abt_node)); } /* Returns the total size of the nodes in the subtree rooted at P, or 0 if P is null. */ static unsigned long int get_subtree_size (const struct abt_node *p) { return p != NULL ? abt_to_tower_node (p)->subtree_size : 0; } /* Returns the total number of nodes in the subtree rooted at P, or 0 if P is null. */ static unsigned long int get_subtree_count (const struct abt_node *p) { return p != NULL ? abt_to_tower_node (p)->subtree_count : 0; } /* Recalculates the subtree_size of NODE based on the subtree_sizes of its children. */ static void reaugment_tower_node (struct abt_node *node_, const void *aux UNUSED) { struct tower_node *node = abt_to_tower_node (node_); node->subtree_size = node->size; node->subtree_count = 1; if (node->abt_node.down[0] != NULL) { struct tower_node *left = abt_to_tower_node (node->abt_node.down[0]); node->subtree_size += left->subtree_size; node->subtree_count += left->subtree_count; } if (node->abt_node.down[1] != NULL) { struct tower_node *right = abt_to_tower_node (node->abt_node.down[1]); node->subtree_size += right->subtree_size; node->subtree_count += right->subtree_count; } } pspp-1.0.1/src/libpspp/misc.c0000644000175000017500000000251712470413451012761 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "misc.h" #include /* Returns the number of digits in X. */ int intlog10 (unsigned x) { int digits = 0; do { digits++; x /= 10; } while (x > 0); return digits; } /* A locale independent version of dtoastr (from gnulib) */ int c_dtoastr (char *buf, size_t bufsize, int flags, int width, double x) { int i; int result = dtoastr (buf, bufsize, flags, width, x); /* Replace the first , (if any) by a . */ for (i = 0; i < result; ++i) { if (buf[i] == ',') { buf[i] = '.'; break; } } return result; } pspp-1.0.1/src/libpspp/stringi-set.c0000644000175000017500000002237112470413451014276 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* If you add routines in this file, please add a corresponding test to stringi-set-test.c. */ #include #include "libpspp/stringi-set.h" #include #include #include "libpspp/cast.h" #include "libpspp/hash-functions.h" #include "libpspp/i18n.h" #include "gl/xalloc.h" static struct stringi_set_node *stringi_set_find_node__ ( const struct stringi_set *, const char *, unsigned int hash); static void stringi_set_insert__ (struct stringi_set *, char *, unsigned int hash); static bool stringi_set_delete__ (struct stringi_set *, const char *, unsigned int hash); /* Initializes SET as a new string set that is initially empty. */ void stringi_set_init (struct stringi_set *set) { hmap_init (&set->hmap); } /* Initializes SET as a new string set that initially contains the same strings as OLD. */ void stringi_set_clone (struct stringi_set *set, const struct stringi_set *old) { const struct stringi_set_node *node; const char *s; stringi_set_init (set); hmap_reserve (&set->hmap, stringi_set_count (old)); STRINGI_SET_FOR_EACH (s, node, old) stringi_set_insert__ (set, xstrdup (s), node->hmap_node.hash); } /* Exchanges the contents of string sets A and B. */ void stringi_set_swap (struct stringi_set *a, struct stringi_set *b) { hmap_swap (&a->hmap, &b->hmap); } /* Frees SET and its nodes and strings. */ void stringi_set_destroy (struct stringi_set *set) { if (set != NULL) { stringi_set_clear (set); hmap_destroy (&set->hmap); } } /* Returns true if SET contains S (or a similar string with different case), false otherwise. */ bool stringi_set_contains (const struct stringi_set *set, const char *s) { return stringi_set_find_node (set, s) != NULL; } /* Returns the node in SET that contains S, or a null pointer if SET does not contain S. */ struct stringi_set_node * stringi_set_find_node (const struct stringi_set *set, const char *s) { return stringi_set_find_node__ (set, s, utf8_hash_case_string (s, 0)); } /* Inserts a copy of S into SET. Returns true if successful, false if SET is unchanged because it already contained S. */ bool stringi_set_insert (struct stringi_set *set, const char *s) { unsigned int hash = utf8_hash_case_string (s, 0); if (!stringi_set_find_node__ (set, s, hash)) { stringi_set_insert__ (set, xstrdup (s), hash); return true; } else return false; } /* Inserts S, which must be a malloc'd string, into SET, transferring ownership of S to SET. Returns true if successful, false if SET is unchanged because it already contained a copy of S. (In the latter case, S is freed.) */ bool stringi_set_insert_nocopy (struct stringi_set *set, char *s) { unsigned int hash = utf8_hash_case_string (s, 0); if (!stringi_set_find_node__ (set, s, hash)) { stringi_set_insert__ (set, s, hash); return true; } else { free (s); return false; } } /* Deletes S from SET. Returns true if successful, false if SET is unchanged because it did not contain a copy of S. */ bool stringi_set_delete (struct stringi_set *set, const char *s) { return stringi_set_delete__ (set, s, utf8_hash_case_string (s, 0)); } /* Deletes NODE from SET, and frees NODE and its string. */ void stringi_set_delete_node (struct stringi_set *set, struct stringi_set_node *node) { free (stringi_set_delete_nofree (set, node)); } /* Deletes NODE from SET and frees NODE. Returns the string that NODE contained, transferring ownership to the caller. */ char * stringi_set_delete_nofree (struct stringi_set *set, struct stringi_set_node *node) { char *string = node->string; hmap_delete (&set->hmap, &node->hmap_node); free (node); return string; } /* Removes all nodes from SET. */ void stringi_set_clear (struct stringi_set *set) { struct stringi_set_node *node, *next; HMAP_FOR_EACH_SAFE (node, next, struct stringi_set_node, hmap_node, &set->hmap) stringi_set_delete_node (set, node); } /* Calculates A = union(A, B). If B may be modified, stringi_set_union_and_intersection() is faster than this function. */ void stringi_set_union (struct stringi_set *a, const struct stringi_set *b) { struct stringi_set_node *node; HMAP_FOR_EACH (node, struct stringi_set_node, hmap_node, &b->hmap) if (!stringi_set_find_node__ (a, node->string, node->hmap_node.hash)) stringi_set_insert__ (a, xstrdup (node->string), node->hmap_node.hash); } /* Calculates A = union(A, B) and B = intersect(A, B). If only the intersection is needed, stringi_set_intersect() is faster. */ void stringi_set_union_and_intersection (struct stringi_set *a, struct stringi_set *b) { struct stringi_set_node *node, *next; HMAP_FOR_EACH_SAFE (node, next, struct stringi_set_node, hmap_node, &b->hmap) if (!stringi_set_find_node__ (a, node->string, node->hmap_node.hash)) { hmap_delete (&b->hmap, &node->hmap_node); hmap_insert (&a->hmap, &node->hmap_node, node->hmap_node.hash); } } /* Calculates A = intersect(A, B). */ void stringi_set_intersect (struct stringi_set *a, const struct stringi_set *b) { struct stringi_set_node *node, *next; HMAP_FOR_EACH_SAFE (node, next, struct stringi_set_node, hmap_node, &a->hmap) if (!stringi_set_find_node__ (b, node->string, node->hmap_node.hash)) stringi_set_delete_node (a, node); } /* Removes from A all of the strings in B. */ void stringi_set_subtract (struct stringi_set *a, const struct stringi_set *b) { struct stringi_set_node *node, *next; if (stringi_set_count (a) < stringi_set_count (b)) { HMAP_FOR_EACH_SAFE (node, next, struct stringi_set_node, hmap_node, &a->hmap) if (stringi_set_find_node__ (b, node->string, node->hmap_node.hash)) stringi_set_delete_node (a, node); } else { HMAP_FOR_EACH (node, struct stringi_set_node, hmap_node, &b->hmap) stringi_set_delete__ (a, node->string, node->hmap_node.hash); } } /* Allocates and returns an array that points to each of the strings in SET. The caller must not free or modify any of the strings. Removing a string from SET invalidates the corresponding element of the returned array. The caller it is responsible for freeing the returned array itself (with free()). The returned array is in the same order as observed by stringi_set_first() and stringi_set_next(), that is, no particular order. */ char ** stringi_set_get_array (const struct stringi_set *set) { const struct stringi_set_node *node; const char *s; char **array; size_t i; array = xnmalloc (stringi_set_count (set), sizeof *array); i = 0; STRINGI_SET_FOR_EACH (s, node, set) array[i++] = CONST_CAST (char *, s); return array; } static int compare_strings (const void *a_, const void *b_) { const char *const *a = a_; const char *const *b = b_; return utf8_strcasecmp (*a, *b); } /* Allocates and returns an array that points to each of the strings in SET. The caller must not free or modify any of the strings. Removing a string from SET invalidates the corresponding element of the returned array. The caller it is responsible for freeing the returned array itself (with free()). The returned array is ordered according to utf8_strcasecmp(). */ char ** stringi_set_get_sorted_array (const struct stringi_set *set) { char **array = stringi_set_get_array (set); qsort (array, stringi_set_count (set), sizeof *array, compare_strings); return array; } /* Internal functions. */ static struct stringi_set_node * stringi_set_find_node__ (const struct stringi_set *set, const char *s, unsigned int hash) { struct stringi_set_node *node; HMAP_FOR_EACH_WITH_HASH (node, struct stringi_set_node, hmap_node, hash, &set->hmap) if (!utf8_strcasecmp (s, node->string)) return node; return NULL; } static void stringi_set_insert__ (struct stringi_set *set, char *s, unsigned int hash) { struct stringi_set_node *node = xmalloc (sizeof *node); node->string = s; hmap_insert (&set->hmap, &node->hmap_node, hash); } static bool stringi_set_delete__ (struct stringi_set *set, const char *s, unsigned int hash) { struct stringi_set_node *node = stringi_set_find_node__ (set, s, hash); if (node != NULL) { stringi_set_delete_node (set, node); return true; } else return false; } pspp-1.0.1/src/libpspp/ll.c0000644000175000017500000004415012470243700012432 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Embedded, circular doubly linked list. */ /* These library routines have no external dependencies other than the standard C library. If you add routines in this file, please add a corresponding test to ll-test.c. This test program should achieve 100% coverage of lines and branches in this code, as reported by "gcov -b". */ #ifdef HAVE_CONFIG_H #include #endif #include "libpspp/ll.h" #include /* Returns the number of nodes in LIST (not counting the null node). Executes in O(n) time in the length of the list. */ size_t ll_count (const struct ll_list *list) { return ll_count_range (ll_head (list), ll_null (list)); } /* Removes R0...R1 from their current list and inserts them just before BEFORE. */ void ll_splice (struct ll *before, struct ll *r0, struct ll *r1) { if (before != r0 && r0 != r1) { /* Change exclusive range to inclusive. */ r1 = ll_prev (r1); /* Remove R0...R1 from its list. */ r0->prev->next = r1->next; r1->next->prev = r0->prev; /* Insert R0...R1 before BEFORE. */ r0->prev = before->prev; r1->next = before; before->prev->next = r0; before->prev = r1; } } /* Exchanges the positions of A and B, which may be in the same list or different lists. */ void ll_swap (struct ll *a, struct ll *b) { if (a != b) { if (ll_next (a) != b) { struct ll *a_next = ll_remove (a); struct ll *b_next = ll_remove (b); ll_insert (b_next, a); ll_insert (a_next, b); } else { ll_remove (b); ll_insert (a, b); } } } /* Exchanges the positions of A0...A1 and B0...B1, which may be in the same list or different lists but must not overlap. */ void ll_swap_range (struct ll *a0, struct ll *a1, struct ll *b0, struct ll *b1) { if (a0 == a1 || a1 == b0) ll_splice (a0, b0, b1); else if (b0 == b1 || b1 == a0) ll_splice (b0, a0, a1); else { struct ll *x0 = ll_prev (a0), *x1 = a1; struct ll *y0 = ll_prev (b0), *y1 = b1; a1 = ll_prev (a1); b1 = ll_prev (b1); x0->next = b0; b0->prev = x0; b1->next = x1; x1->prev = b1; y0->next = a0; a0->prev = y0; a1->next = y1; y1->prev = a1; } } /* Removes from R0...R1 all the nodes that equal TARGET according to COMPARE given auxiliary data AUX. Returns the number of nodes removed. */ size_t ll_remove_equal (struct ll *r0, struct ll *r1, struct ll *target, ll_compare_func *compare, void *aux) { struct ll *x; size_t count; count = 0; for (x = r0; x != r1; ) if (compare (x, target, aux) == 0) { x = ll_remove (x); count++; } else x = ll_next (x); return count; } /* Removes from R0...R1 all the nodes for which PREDICATE returns true given auxiliary data AUX. Returns the number of nodes removed. */ size_t ll_remove_if (struct ll *r0, struct ll *r1, ll_predicate_func *predicate, void *aux) { struct ll *x; size_t count; count = 0; for (x = r0; x != r1; ) if (predicate (x, aux)) { x = ll_remove (x); count++; } else x = ll_next (x); return count; } /* Returns the first node in R0...R1 that equals TARGET according to COMPARE given auxiliary data AUX. Returns R1 if no node in R0...R1 equals TARGET. */ struct ll * ll_find_equal (const struct ll *r0, const struct ll *r1, const struct ll *target, ll_compare_func *compare, void *aux) { const struct ll *x; for (x = r0; x != r1; x = ll_next (x)) if (compare (x, target, aux) == 0) break; return CONST_CAST (struct ll *, x); } /* Returns the first node in R0...R1 for which PREDICATE returns true given auxiliary data AUX. Returns R1 if PREDICATE does not return true for any node in R0...R1. */ struct ll * ll_find_if (const struct ll *r0, const struct ll *r1, ll_predicate_func *predicate, void *aux) { const struct ll *x; for (x = r0; x != r1; x = ll_next (x)) if (predicate (x, aux)) break; return CONST_CAST (struct ll *, x); } /* Compares each pair of adjacent nodes in R0...R1 using COMPARE with auxiliary data AUX and returns the first node of the first pair that compares equal. Returns R1 if no pair compares equal. */ struct ll * ll_find_adjacent_equal (const struct ll *r0, const struct ll *r1, ll_compare_func *compare, void *aux) { if (r0 != r1) { const struct ll *x, *y; for (x = r0, y = ll_next (x); y != r1; x = y, y = ll_next (y)) if (compare (x, y, aux) == 0) return CONST_CAST (struct ll *, x); } return CONST_CAST (struct ll *, r1); } /* Returns the number of nodes in R0...R1. Executes in O(n) time in the return value. */ size_t ll_count_range (const struct ll *r0, const struct ll *r1) { const struct ll *x; size_t count; count = 0; for (x = r0; x != r1; x = ll_next (x)) count++; return count; } /* Counts and returns the number of nodes in R0...R1 that equal TARGET according to COMPARE given auxiliary data AUX. */ size_t ll_count_equal (const struct ll *r0, const struct ll *r1, const struct ll *target, ll_compare_func *compare, void *aux) { const struct ll *x; size_t count; count = 0; for (x = r0; x != r1; x = ll_next (x)) if (compare (x, target, aux) == 0) count++; return count; } /* Counts and returns the number of nodes in R0...R1 for which PREDICATE returns true given auxiliary data AUX. */ size_t ll_count_if (const struct ll *r0, const struct ll *r1, ll_predicate_func *predicate, void *aux) { const struct ll *x; size_t count; count = 0; for (x = r0; x != r1; x = ll_next (x)) if (predicate (x, aux)) count++; return count; } /* Returns the greatest node in R0...R1 according to COMPARE given auxiliary data AUX. Returns the first of multiple, equal maxima. */ struct ll * ll_max (const struct ll *r0, const struct ll *r1, ll_compare_func *compare, void *aux) { const struct ll *max = r0; if (r0 != r1) { const struct ll *x; for (x = ll_next (r0); x != r1; x = ll_next (x)) if (compare (x, max, aux) > 0) max = x; } return CONST_CAST (struct ll *, max); } /* Returns the least node in R0...R1 according to COMPARE given auxiliary data AUX. Returns the first of multiple, equal minima. */ struct ll * ll_min (const struct ll *r0, const struct ll *r1, ll_compare_func *compare, void *aux) { const struct ll *min = r0; if (r0 != r1) { const struct ll *x; for (x = ll_next (r0); x != r1; x = ll_next (x)) if (compare (x, min, aux) < 0) min = x; } return CONST_CAST (struct ll *, min); } /* Lexicographically compares A0...A1 to B0...B1. Returns negative if A0...A1 < B0...B1, zero if A0...A1 == B0...B1, and positive if A0...A1 > B0...B1 according to COMPARE given auxiliary data AUX. */ int ll_lexicographical_compare_3way (const struct ll *a0, const struct ll *a1, const struct ll *b0, const struct ll *b1, ll_compare_func *compare, void *aux) { for (;;) if (b0 == b1) return a0 != a1; else if (a0 == a1) return -1; else { int cmp = compare (a0, b0, aux); if (cmp != 0) return cmp; a0 = ll_next (a0); b0 = ll_next (b0); } } /* Calls ACTION with auxiliary data AUX for every node in R0...R1 in order. */ void ll_apply (struct ll *r0, struct ll *r1, ll_action_func *action, void *aux) { struct ll *ll; for (ll = r0; ll != r1; ll = ll_next (ll)) action (ll, aux); } /* Reverses the order of nodes R0...R1. */ void ll_reverse (struct ll *r0, struct ll *r1) { if (r0 != r1 && ll_next (r0) != r1) { struct ll *ll; for (ll = r0; ll != r1; ll = ll->prev) { struct ll *tmp = ll->next; ll->next = ll->prev; ll->prev = tmp; } r0->next->next = r1->prev; r1->prev->prev = r0->next; r0->next = r1; r1->prev = r0; } } /* Arranges R0...R1 into the lexicographically next greater permutation. Returns true if successful. If R0...R1 is already the lexicographically greatest permutation of its elements (i.e. ordered from greatest to smallest), arranges them into the lexicographically least permutation (i.e. ordered from smallest to largest) and returns false. COMPARE with auxiliary data AUX is used to compare nodes. */ bool ll_next_permutation (struct ll *r0, struct ll *r1, ll_compare_func *compare, void *aux) { if (r0 != r1) { struct ll *i = ll_prev (r1); while (i != r0) { i = ll_prev (i); if (compare (i, ll_next (i), aux) < 0) { struct ll *j; for (j = ll_prev (r1); compare (i, j, aux) >= 0; j = ll_prev (j)) continue; ll_swap (i, j); ll_reverse (ll_next (j), r1); return true; } } ll_reverse (r0, r1); } return false; } /* Arranges R0...R1 into the lexicographically next lesser permutation. Returns true if successful. If R0...R1 is already the lexicographically least permutation of its elements (i.e. ordered from smallest to greatest), arranges them into the lexicographically greatest permutation (i.e. ordered from largest to smallest) and returns false. COMPARE with auxiliary data AUX is used to compare nodes. */ bool ll_prev_permutation (struct ll *r0, struct ll *r1, ll_compare_func *compare, void *aux) { if (r0 != r1) { struct ll *i = ll_prev (r1); while (i != r0) { i = ll_prev (i); if (compare (i, ll_next (i), aux) > 0) { struct ll *j; for (j = ll_prev (r1); compare (i, j, aux) <= 0; j = ll_prev (j)) continue; ll_swap (i, j); ll_reverse (ll_next (j), r1); return true; } } ll_reverse (r0, r1); } return false; } /* Sorts R0...R1 into ascending order according to COMPARE given auxiliary data AUX. In use, keep in mind that R0 may move during the sort, so that afterward R0...R1 may denote a different range. (On the other hand, R1 is fixed in place.) The sort is stable; that is, it will not change the relative order of nodes that compare equal. Runs in O(n lg n) time in the number of nodes in the range. */ void ll_sort (struct ll *r0, struct ll *r1, ll_compare_func *compare, void *aux) { struct ll *pre_r0; size_t output_run_cnt; if (r0 == r1 || ll_next (r0) == r1) return; pre_r0 = ll_prev (r0); do { struct ll *a0 = ll_next (pre_r0); for (output_run_cnt = 1; ; output_run_cnt++) { struct ll *a1 = ll_find_run (a0, r1, compare, aux); struct ll *a2 = ll_find_run (a1, r1, compare, aux); if (a1 == a2) break; a0 = ll_merge (a0, a1, a1, a2, compare, aux); } } while (output_run_cnt > 1); } /* Finds the extent of a run of nodes of increasing value starting at R0 and extending no farther than R1. Returns the first node in R0...R1 that is less than the preceding node, or R1 if R0...R1 are arranged in nondecreasing order. */ struct ll * ll_find_run (const struct ll *r0, const struct ll *r1, ll_compare_func *compare, void *aux) { if (r0 != r1) { do { r0 = ll_next (r0); } while (r0 != r1 && compare (ll_prev (r0), r0, aux) <= 0); } return CONST_CAST (struct ll *, r0); } /* Merges B0...B1 into A0...A1 according to COMPARE given auxiliary data AUX. The ranges may be in the same list or different lists, but must not overlap. Returns the end of the merged range. The merge is "stable" if A0...A1 is considered to precede B0...B1, regardless of their actual ordering. Runs in O(n) time in the total number of nodes in the ranges. */ struct ll * ll_merge (struct ll *a0, struct ll *a1, struct ll *b0, struct ll *b1, ll_compare_func *compare, void *aux) { if (a0 != a1 && b0 != b1) { a1 = ll_prev (a1); b1 = ll_prev (b1); for (;;) if (compare (a0, b0, aux) <= 0) { if (a0 == a1) { ll_splice (ll_next (a0), b0, ll_next (b1)); return ll_next (b1); } a0 = ll_next (a0); } else { if (b0 != b1) { struct ll *x = b0; b0 = ll_remove (b0); ll_insert (a0, x); } else { ll_splice (a0, b0, ll_next (b0)); return ll_next (a1); } } } else { ll_splice (a0, b0, b1); return b1; } } /* Returns true if R0...R1 is sorted in ascending order according to COMPARE given auxiliary data AUX, false otherwise. */ bool ll_is_sorted (const struct ll *r0, const struct ll *r1, ll_compare_func *compare, void *aux) { return ll_find_run (r0, r1, compare, aux) == r1; } /* Removes all but the first in each group of sequential duplicates in R0...R1. Duplicates are determined using COMPARE given auxiliary data AUX. Removed duplicates are inserted before DUPS if it is nonnull; otherwise, their identities are lost. Only sequential duplicates are removed. ll_sort() may be used to bring duplicates together, or ll_sort_unique() can do both at once. */ size_t ll_unique (struct ll *r0, struct ll *r1, struct ll *dups, ll_compare_func *compare, void *aux) { size_t count = 0; if (r0 != r1) { struct ll *x = r0; for (;;) { struct ll *y = ll_next (x); if (y == r1) { count++; break; } if (compare (x, y, aux) == 0) { ll_remove (y); if (dups != NULL) ll_insert (dups, y); } else { x = y; count++; } } } return count; } /* Sorts R0...R1 and removes duplicates. Removed duplicates are inserted before DUPS if it is nonnull; otherwise, their identities are lost. Comparisons are made with COMPARE given auxiliary data AUX. In use, keep in mind that R0 may move during the sort, so that afterward R0...R1 may denote a different range. (On the other hand, R1 is fixed in place.) Runs in O(n lg n) time in the number of nodes in the range. */ void ll_sort_unique (struct ll *r0, struct ll *r1, struct ll *dups, ll_compare_func *compare, void *aux) { struct ll *pre_r0 = ll_prev (r0); ll_sort (r0, r1, compare, aux); ll_unique (ll_next (pre_r0), r1, dups, compare, aux); } /* Inserts NEW_ELEM in the proper position in R0...R1, which must be sorted according to COMPARE given auxiliary data AUX. If NEW_ELEM is equal to one or more existing nodes in R0...R1, then it is inserted after the existing nodes it equals. Runs in O(n) time in the number of nodes in the range. */ void ll_insert_ordered (struct ll *r0, struct ll *r1, struct ll *new_elem, ll_compare_func *compare, void *aux) { struct ll *x; for (x = r0; x != r1; x = ll_next (x)) if (compare (x, new_elem, aux) > 0) break; ll_insert (x, new_elem); } /* Partitions R0...R1 into those nodes for which PREDICATE given auxiliary data AUX returns true, followed by those for which PREDICATE returns false. Returns the first node in the "false" group, or R1 if PREDICATE is true for every node in R0...R1. The partition is "stable" in that the nodes in each group retain their original relative order. Runs in O(n) time in the number of nodes in the range. */ struct ll * ll_partition (struct ll *r0, struct ll *r1, ll_predicate_func *predicate, void *aux) { struct ll *t0, *t1; for (;;) { if (r0 == r1) return r0; else if (!predicate (r0, aux)) break; r0 = ll_next (r0); } for (t0 = r0;; t0 = t1) { do { t0 = ll_next (t0); if (t0 == r1) return r0; } while (!predicate (t0, aux)); t1 = t0; do { t1 = ll_next (t1); if (t1 == r1) { ll_splice (r0, t0, t1); return r0; } } while (predicate (t1, aux)); ll_splice (r0, t0, t1); } } /* Verifies that R0...R1 is parititioned into a sequence of nodes for which PREDICATE given auxiliary data AUX returns true, followed by those for which PREDICATE returns false. Returns a null pointer if R0...R1 is not partitioned this way. Otherwise, returns the first node in the "false" group, or R1 if PREDICATE is true for every node in R0...R1. */ struct ll * ll_find_partition (const struct ll *r0, const struct ll *r1, ll_predicate_func *predicate, void *aux) { const struct ll *partition, *x; for (partition = r0; partition != r1; partition = ll_next (partition)) if (!predicate (partition, aux)) break; for (x = partition; x != r1; x = ll_next (x)) if (predicate (x, aux)) return NULL; return CONST_CAST (struct ll *, partition); } pspp-1.0.1/src/libpspp/prompt.c0000644000175000017500000000230612470243700013341 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/prompt.h" const char * prompt_style_to_string (enum prompt_style style) { switch (style) { case PROMPT_FIRST: return "first"; case PROMPT_LATER: return "later"; case PROMPT_DATA: return "data"; case PROMPT_COMMENT: return "COMMENT"; case PROMPT_DOCUMENT: return "DOCUMENT"; case PROMPT_DO_REPEAT: return "DO REPEAT"; default: return "unknown prompt"; } } pspp-1.0.1/src/libpspp/string-array.h0000644000175000017500000000665512470242642014466 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_STRING_ARRAY_H #define LIBPSPP_STRING_ARRAY_H #include #include /* An unordered array of strings. Not opaque by any means. */ struct string_array { char **strings; size_t n; size_t allocated; }; /* Suitable for use as the initializer for a string_array named ARRAY. Typical usage: struct string_array array = STRING_ARRAY_INITIALIZER (array); STRING_ARRAY_INITIALIZER is an alternative to calling string_array_init. */ #define STRING_ARRAY_INITIALIZER(ARRAY) { NULL, 0, 0 } void string_array_init (struct string_array *); void string_array_clone (struct string_array *, const struct string_array *); void string_array_swap (struct string_array *, struct string_array *); void string_array_destroy (struct string_array *); static inline size_t string_array_count (const struct string_array *); static inline bool string_array_is_empty (const struct string_array *); bool string_array_contains (const struct string_array *, const char *); size_t string_array_find (const struct string_array *, const char *); void string_array_append (struct string_array *, const char *); void string_array_append_nocopy (struct string_array *, char *); void string_array_insert (struct string_array *, const char *, size_t before); void string_array_insert_nocopy (struct string_array *, char *, size_t before); void string_array_delete (struct string_array *, size_t idx); char *string_array_delete_nofree (struct string_array *, size_t idx); void string_array_clear (struct string_array *); void string_array_terminate_null (struct string_array *); void string_array_shrink (struct string_array *); void string_array_sort (struct string_array *); char *string_array_join (const struct string_array *, const char *separator); /* Macros for conveniently iterating through a string_array, e.g. to print all of the strings in "my_array": const char *string; size_t idx; STRING_ARRAY_FOR_EACH (string, idx, &my_array) puts (string); */ #define STRING_ARRAY_FOR_EACH(STRING, IDX, ARRAY) \ for ((IDX) = 0; \ ((IDX) < (ARRAY)->n \ ? ((STRING) = (ARRAY)->strings[IDX], true) \ : false); \ (IDX)++) /* Returns the number of strings currently in ARRAY. */ static inline size_t string_array_count (const struct string_array *array) { return array->n; } /* Returns true if ARRAY currently contains no strings, false otherwise. */ static inline bool string_array_is_empty (const struct string_array *array) { return array->n == 0; } #endif /* libpspp/string-array.h */ pspp-1.0.1/src/libpspp/deque.c0000644000175000017500000000456212470243700013131 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/deque.h" #include #include "gl/minmax.h" #include "gl/xalloc.h" /* Initializes DEQUE as an empty deque with an initial capacity of zero. */ void deque_init_null (struct deque *deque) { deque->capacity = 0; deque->front = 0; deque->back = 0; } /* Initializes DEQUE as an empty deque of elements ELEM_SIZE bytes in size, with an initial capacity of at least CAPACITY. Returns the initial deque data array. */ void * deque_init (struct deque *deque, size_t capacity, size_t elem_size) { void *data = NULL; deque_init_null (deque); if (capacity > 0) { deque->capacity = 1; while (deque->capacity < capacity) deque->capacity <<= 1; data = xnmalloc (deque->capacity, elem_size); } return data; } /* Increases the capacity of DEQUE and returns a new deque data array that replaces the old data array. */ void * deque_expand (struct deque *deque, void *old_data_, size_t elem_size) { size_t old_capacity = deque->capacity; size_t new_capacity = MAX (4, old_capacity * 2); char *old_data = old_data_; char *new_data = xnmalloc (new_capacity, elem_size); size_t idx, copy_cnt; for (idx = deque->back; idx != deque->front; idx += copy_cnt) { size_t can_copy = old_capacity - (idx & (old_capacity - 1)); size_t want_copy = deque->front - idx; copy_cnt = MIN (can_copy, want_copy); memcpy (new_data + (idx & (new_capacity - 1)) * elem_size, old_data + (idx & (old_capacity - 1)) * elem_size, copy_cnt * elem_size); } deque->capacity = new_capacity; free (old_data); return new_data; } pspp-1.0.1/src/libpspp/cmac-aes256.c0000644000175000017500000000452412523704223013733 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "libpspp/cmac-aes256.h" #include "libpspp/cast.h" #include "gl/rijndael-alg-fst.h" static void gen_subkey (const uint8_t in[16], uint8_t out[16]) { size_t i; for (i = 0; i < 15; i++) out[i] = (in[i] << 1) | (in[i + 1] >> 7); out[15] = in[15] << 1; if (in[0] & 0x80) out[15] ^= 0x87; } /* Computes CMAC-AES-256 of the SIZE bytes in DATA, using the 256-bit AES key KEY. Stores the result in the 128-bit CMAC. */ void cmac_aes256(const uint8_t key[32], const void *data_, size_t size, uint8_t cmac[16]) { const char zeros[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; uint32_t rk[4 * (RIJNDAEL_MAXNR + 1)]; uint8_t k1[16], k2[16], L[16]; const uint8_t *data = data_; uint8_t c[16], tmp[16]; int Nr; int i; Nr = rijndaelKeySetupEnc (rk, CHAR_CAST (const char *, key), 256); rijndaelEncrypt (rk, Nr, zeros, CHAR_CAST (char *, L)); gen_subkey (L, k1); gen_subkey (k1, k2); memset (c, 0, 16); while (size > 16) { for (i = 0; i < 16; i++) tmp[i] = c[i] ^ data[i]; rijndaelEncrypt (rk, Nr, CHAR_CAST (const char *, tmp), CHAR_CAST (char *, c)); size -= 16; data += 16; } if (size == 16) { for (i = 0; i < 16; i++) tmp[i] = c[i] ^ data[i] ^ k1[i]; } else { for (i = 0; i < 16; i++) tmp[i] = c[i] ^ k2[i]; for (i = 0; i < size; i++) tmp[i] ^= data[i]; tmp[size] ^= 0x80; } rijndaelEncrypt (rk, Nr, CHAR_CAST (const char *, tmp), CHAR_CAST (char *, cmac)); } pspp-1.0.1/src/libpspp/sparse-xarray.c0000644000175000017500000004435312470434665014645 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/sparse-xarray.h" #include #include #include #include #include "libpspp/assertion.h" #include "libpspp/ext-array.h" #include "libpspp/misc.h" #include "libpspp/range-set.h" #include "libpspp/sparse-array.h" #include "gl/md4.h" #include "gl/minmax.h" #include "gl/xalloc.h" /* A sparse array of arrays of bytes. */ struct sparse_xarray { size_t n_bytes; /* Number of bytes per row. */ uint8_t *default_row; /* Defaults for unwritten rows. */ unsigned long int max_memory_rows; /* Max rows before dumping to disk. */ struct sparse_array *memory; /* Backing, if stored in memory. */ struct ext_array *disk; /* Backing, if stored on disk. */ struct range_set *disk_rows; /* Allocated rows, if on disk. */ }; static bool UNUSED range_is_valid (const struct sparse_xarray *sx, size_t ofs, size_t n) { return n <= sx->n_bytes && ofs <= sx->n_bytes && ofs + n <= sx->n_bytes; } /* Creates and returns a new sparse array of arrays of bytes. Each row in the sparse array will consist of N_BYTES bytes. If fewer than MAX_MEMORY_ROWS rows are added to the array, then it will be kept in memory; if more than that are added, then it will be stored on disk. */ struct sparse_xarray * sparse_xarray_create (size_t n_bytes, size_t max_memory_rows) { struct sparse_xarray *sx = xmalloc (sizeof *sx); sx->n_bytes = n_bytes; sx->default_row = xzalloc (n_bytes); sx->max_memory_rows = max_memory_rows; sx->memory = sparse_array_create (sizeof (uint8_t *)); sx->disk = NULL; sx->disk_rows = NULL; return sx; } /* Creates and returns a new sparse array of rows that contains the same data as OLD. Returns a null pointer if cloning fails. */ struct sparse_xarray * sparse_xarray_clone (const struct sparse_xarray *old) { struct sparse_xarray *new = xmalloc (sizeof *new); new->n_bytes = old->n_bytes; new->default_row = xmemdup (old->default_row, old->n_bytes); new->max_memory_rows = old->max_memory_rows; if (old->memory != NULL) { unsigned long int idx; uint8_t **old_row; new->memory = sparse_array_create (sizeof (uint8_t *)); for (old_row = sparse_array_first (old->memory, &idx); old_row != NULL; old_row = sparse_array_next (old->memory, idx, &idx)) { uint8_t **new_row = sparse_array_insert (new->memory, idx); *new_row = xmemdup (*old_row, new->n_bytes); } } else new->memory = NULL; if (old->disk != NULL) { const struct range_set_node *node; void *tmp = xmalloc (old->n_bytes); new->disk = ext_array_create (); new->disk_rows = range_set_clone (old->disk_rows, NULL); RANGE_SET_FOR_EACH (node, old->disk_rows) { unsigned long int start = range_set_node_get_start (node); unsigned long int end = range_set_node_get_end (node); unsigned long int idx; for (idx = start; idx < end; idx++) { off_t offset = (off_t) idx * old->n_bytes; if (!ext_array_read (old->disk, offset, old->n_bytes, tmp) || !ext_array_write (new->disk, offset, old->n_bytes, tmp)) { free (tmp); sparse_xarray_destroy (new); return NULL; } } } free (tmp); } else { new->disk = NULL; new->disk_rows = NULL; } return new; } static void free_memory_rows (struct sparse_xarray *sx) { if (sx->memory != NULL) { unsigned long int idx; uint8_t **row; for (row = sparse_array_first (sx->memory, &idx); row != NULL; row = sparse_array_next (sx->memory, idx, &idx)) free (*row); sparse_array_destroy (sx->memory); sx->memory = NULL; } } /* Destroys sparse array of rows SX. */ void sparse_xarray_destroy (struct sparse_xarray *sx) { if (sx != NULL) { free (sx->default_row); free_memory_rows (sx); ext_array_destroy (sx->disk); range_set_destroy (sx->disk_rows); free (sx); } } /* Returns the number of bytes in each row in SX. */ size_t sparse_xarray_get_n_columns (const struct sparse_xarray *sx) { return sx->n_bytes; } /* Returns the number of rows in SX. */ size_t sparse_xarray_get_n_rows (const struct sparse_xarray *sx) { if (sx->memory) { unsigned long int idx; return sparse_array_last (sx->memory, &idx) != NULL ? idx + 1 : 0; } else { const struct range_set_node *last = range_set_last (sx->disk_rows); return last != NULL ? range_set_node_get_end (last) : 0; } } /* Dumps the rows in SX, which must currently be stored in memory, to disk. Returns true if successful, false on I/O error. */ static bool dump_sparse_xarray_to_disk (struct sparse_xarray *sx) { unsigned long int idx; uint8_t **row; assert (sx->memory != NULL); assert (sx->disk == NULL); sx->disk = ext_array_create (); sx->disk_rows = range_set_create (); for (row = sparse_array_first (sx->memory, &idx); row != NULL; row = sparse_array_next (sx->memory, idx, &idx)) { if (!ext_array_write (sx->disk, (off_t) idx * sx->n_bytes, sx->n_bytes, *row)) { ext_array_destroy (sx->disk); sx->disk = NULL; range_set_destroy (sx->disk_rows); sx->disk_rows = NULL; return false; } range_set_set1 (sx->disk_rows, idx, 1); } free_memory_rows (sx); return true; } /* Returns true if any data has ever been written to ROW in SX, false otherwise. */ bool sparse_xarray_contains_row (const struct sparse_xarray *sx, unsigned long int row) { return (sx->memory != NULL ? sparse_array_get (sx->memory, row) != NULL : range_set_contains (sx->disk_rows, row)); } /* Reads columns COLUMNS...(COLUMNS + VALUE_CNT), exclusive, in the given ROW in SX, into the VALUE_CNT values in VALUES. Returns true if successful, false on I/O error. */ bool sparse_xarray_read (const struct sparse_xarray *sx, unsigned long int row, size_t start, size_t n, void *data) { assert (range_is_valid (sx, start, n)); if (sx->memory != NULL) { uint8_t **p = sparse_array_get (sx->memory, row); if (p != NULL) { memcpy (data, *p + start, n); return true; } } else { if (range_set_contains (sx->disk_rows, row)) return ext_array_read (sx->disk, (off_t) row * sx->n_bytes + start, n, data); } memcpy (data, sx->default_row + start, n); return true; } /* Implements sparse_xarray_write for an on-disk sparse_xarray. */ static bool write_disk_row (struct sparse_xarray *sx, unsigned long int row, size_t start, size_t n, const void *data) { off_t ofs = (off_t) row * sx->n_bytes; if (range_set_contains (sx->disk_rows, row)) return ext_array_write (sx->disk, ofs + start, n, data); else { range_set_set1 (sx->disk_rows, row, 1); return (ext_array_write (sx->disk, ofs, start, sx->default_row) && ext_array_write (sx->disk, ofs + start, n, data) && ext_array_write (sx->disk, ofs + start + n, sx->n_bytes - start - n, sx->default_row + start + n)); } } /* Writes the VALUE_CNT values in VALUES into columns COLUMNS...(COLUMNS + VALUE_CNT), exclusive, in the given ROW in SX. Returns true if successful, false on I/O error. */ bool sparse_xarray_write (struct sparse_xarray *sx, unsigned long int row, size_t start, size_t n, const void *data) { assert (range_is_valid (sx, start, n)); if (sx->memory != NULL) { uint8_t **p = sparse_array_get (sx->memory, row); if (p == NULL) { if (sparse_array_count (sx->memory) < sx->max_memory_rows) { p = sparse_array_insert (sx->memory, row); *p = xmemdup (sx->default_row, sx->n_bytes); } else { if (!dump_sparse_xarray_to_disk (sx)) return false; return write_disk_row (sx, row, start, n, data); } } memcpy (*p + start, data, n); return true; } else return write_disk_row (sx, row, start, n, data); } /* Writes the VALUE_CNT values in VALUES to columns START_COLUMN...(START_COLUMN + VALUE_CNT), exclusive, in every row in SX, even those rows that have not yet been written. Returns true if successful, false on I/O error. The runtime of this function is linear in the number of rows in SX that have already been written. */ bool sparse_xarray_write_columns (struct sparse_xarray *sx, size_t start, size_t n, const void *data) { assert (range_is_valid (sx, start, n)); /* Set defaults. */ memcpy (sx->default_row + start, data, n); /* Set individual rows. */ if (sx->memory != NULL) { unsigned long int idx; uint8_t **p; for (p = sparse_array_first (sx->memory, &idx); p != NULL; p = sparse_array_next (sx->memory, idx, &idx)) memcpy (*p + start, data, n); } else { const struct range_set_node *node; RANGE_SET_FOR_EACH (node, sx->disk_rows) { unsigned long int start_row = range_set_node_get_start (node); unsigned long int end_row = range_set_node_get_end (node); unsigned long int row; for (row = start_row; row < end_row; row++) { off_t offset = (off_t) row * sx->n_bytes; if (!ext_array_write (sx->disk, offset + start, n, data)) break; } } if (ext_array_error (sx->disk)) return false; } return true; } static unsigned long int scan_first (const struct sparse_xarray *sx) { if (sx->memory) { unsigned long int idx; return sparse_array_first (sx->memory, &idx) ? idx : ULONG_MAX; } else return range_set_scan (sx->disk_rows, 0); } static unsigned long int scan_next (const struct sparse_xarray *sx, unsigned long int start) { if (sx->memory) { unsigned long int idx; return sparse_array_next (sx->memory, start, &idx) ? idx : ULONG_MAX; } else return range_set_scan (sx->disk_rows, start + 1); } /* Only works for rows for which sparse_xarray_contains_row() would return true. */ static uint8_t * get_row (const struct sparse_xarray *sx, unsigned long int idx, uint8_t *buffer) { if (sx->memory) { uint8_t **p = sparse_array_get (sx->memory, idx); return *p; } else if (ext_array_read (sx->disk, (off_t) idx * sx->n_bytes, sx->n_bytes, buffer)) return buffer; else return NULL; } /* Iterates over all the rows in SX and DX, passing each pair of rows with equal indexes to CB. CB's modifications, if any, to destination rows are written back to DX. All rows that are actually in use in SX or in DX or both are passed to CB. If a row is in use in SX but not in DX, or vice versa, then the "default" row (as set by sparse_xarray_write_columns) is passed as the contents of the other row. CB is also called once with the default row from SX and the default row from DX. Modifying the data passed as the default row from DX will change DX's default row. Returns true if successful, false if I/O on SX or DX fails or if CB returns false. On failure, the contents of DX are undefined. */ bool sparse_xarray_copy (const struct sparse_xarray *sx, struct sparse_xarray *dx, bool (*cb) (const void *src, void *dst, void *aux), void *aux) { bool success = true; if (!cb (sx->default_row, dx->default_row, aux)) return false; if (sx == dx) { if (sx->memory) { unsigned long int idx; uint8_t **row; for (row = sparse_array_first (sx->memory, &idx); row != NULL; row = sparse_array_next (sx->memory, idx, &idx)) { success = cb (*row, *row, aux); if (!success) break; } } else if (sx->disk) { const struct range_set_node *node; void *tmp = xmalloc (sx->n_bytes); RANGE_SET_FOR_EACH (node, sx->disk_rows) { unsigned long int start = range_set_node_get_start (node); unsigned long int end = range_set_node_get_end (node); unsigned long int row; for (row = start; row < end; row++) { off_t offset = (off_t) row * sx->n_bytes; success = (ext_array_read (sx->disk, offset, sx->n_bytes, tmp) && cb (tmp, tmp, aux) && ext_array_write (dx->disk, offset, dx->n_bytes, tmp)); if (!success) break; } } free (tmp); } } else { unsigned long int src_idx = scan_first (sx); unsigned long int dst_idx = scan_first (dx); uint8_t *tmp_src_row = xmalloc (sx->n_bytes); uint8_t *tmp_dst_row = xmalloc (dx->n_bytes); for (;;) { unsigned long int idx; const uint8_t *src_row; uint8_t *dst_row; /* Determine the index of the row to process. If src_idx == dst_idx, then the row has been written in both SX and DX. Otherwise, it has been written in only the sparse_xarray corresponding to the smaller index, and has the default contents in the other. */ idx = MIN (src_idx, dst_idx); if (idx == ULONG_MAX) break; /* Obtain a copy of the source row as src_row. */ if (idx == src_idx) src_row = get_row (sx, idx, tmp_src_row); else src_row = sx->default_row; /* Obtain the destination row as dst_row. */ if (idx == dst_idx) dst_row = get_row (dx, idx, tmp_dst_row); else if (dx->memory && sparse_array_count (dx->memory) < dx->max_memory_rows) { uint8_t **p = sparse_array_insert (dx->memory, idx); dst_row = *p = xmemdup (dx->default_row, dx->n_bytes); } else { memcpy (tmp_dst_row, dx->default_row, dx->n_bytes); dst_row = tmp_dst_row; } /* Run the callback. */ success = cb (src_row, dst_row, aux); if (!success) break; /* Write back the destination row, if necessary. */ if (dst_row == tmp_dst_row) { success = sparse_xarray_write (dx, idx, 0, dx->n_bytes, dst_row); if (!success) break; } else { /* Nothing to do: we modified the destination row in-place. */ } /* Advance to the next row. */ if (src_idx == idx) src_idx = scan_next (sx, src_idx); if (dst_idx == idx) dst_idx = scan_next (dx, dst_idx); } free (tmp_src_row); free (tmp_dst_row); } return success; } /* Returns a hash value for SX suitable for use with the model checker. The value in BASIS is folded into the hash. The returned hash value is *not* suitable for storage and retrieval of sparse_xarrays that have identical contents, because it will return different hash values for sparse_xarrays that have the same contents (and it's slow). We use MD4 because it is much faster than MD5 or SHA-1 but its collision resistance is just as good. */ unsigned int sparse_xarray_model_checker_hash (const struct sparse_xarray *sx, unsigned int basis) { unsigned int hash[DIV_RND_UP (20, sizeof (unsigned int))]; struct md4_ctx ctx; md4_init_ctx (&ctx); md4_process_bytes (&basis, sizeof basis, &ctx); md4_process_bytes (&sx->n_bytes, sizeof sx->n_bytes, &ctx); md4_process_bytes (sx->default_row, sx->n_bytes, &ctx); if (sx->memory) { unsigned long int idx; uint8_t **row; md4_process_bytes ("m", 1, &ctx); md4_process_bytes (&sx->max_memory_rows, sizeof sx->max_memory_rows, &ctx); for (row = sparse_array_first (sx->memory, &idx); row != NULL; row = sparse_array_next (sx->memory, idx, &idx)) { md4_process_bytes (&idx, sizeof idx, &ctx); md4_process_bytes (*row, sx->n_bytes, &ctx); } } else { const struct range_set_node *node; void *tmp = xmalloc (sx->n_bytes); md4_process_bytes ("d", 1, &ctx); RANGE_SET_FOR_EACH (node, sx->disk_rows) { unsigned long int start = range_set_node_get_start (node); unsigned long int end = range_set_node_get_end (node); unsigned long int idx; for (idx = start; idx < end; idx++) { off_t offset = (off_t) idx * sx->n_bytes; if (!ext_array_read (sx->disk, offset, sx->n_bytes, tmp)) NOT_REACHED (); md4_process_bytes (&idx, sizeof idx, &ctx); md4_process_bytes (tmp, sx->n_bytes, &ctx); } } free (tmp); } md4_finish_ctx (&ctx, hash); return hash[0]; } pspp-1.0.1/src/libpspp/argv-parser.c0000644000175000017500000001254212470434665014270 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/argv-parser.h" #include #include "libpspp/assertion.h" #include "libpspp/str.h" #include "gl/xalloc.h" struct argv_option_plus { struct argv_option base; void (*cb) (int id, void *aux); void *aux; }; struct argv_parser { struct argv_option_plus *options; size_t n_options, allocated_options; }; /* Creates and returns a new argv_parser that initially is not configured to parse any command-line options. */ struct argv_parser * argv_parser_create (void) { struct argv_parser *ap = xzalloc (sizeof *ap); return ap; } /* Destroys AP. */ void argv_parser_destroy (struct argv_parser *ap) { if (ap != NULL) { free (ap->options); free (ap); } } /* Adds the N options in OPTIONS to AP. When argv_parser_run is later called for AP, each of the options in OPTIONS will be handled by passing the option's 'id' member to CB along with AUX. For an option that has an argument, the 'optarg' global variable will be set to point to it before calling CB; otherwise 'optarg' will be set to NULL. */ void argv_parser_add_options (struct argv_parser *ap, const struct argv_option *options, size_t n, void (*cb) (int id, void *aux), void *aux) { const struct argv_option *src; for (src = options; src < &options[n]; src++) { struct argv_option_plus *dst; if (ap->n_options >= ap->allocated_options) ap->options = x2nrealloc (ap->options, &ap->allocated_options, sizeof *ap->options); assert (src->long_name != NULL || src->short_name != 0); dst = &ap->options[ap->n_options++]; dst->base = *src; dst->cb = cb; dst->aux = aux; } } /* Parses all ARGC command-line arguments in ARGV according to the options configured in AP with argv_parser_add_options. Returns true if all the command-line arguments were parsed successfully, false if there was an error. Upon failure return, if the external variable 'opterr' is nonzero (which is the default), an error message will also be printed. Upon successful return, external variable 'optind' will be set to the index of the first non-option argument. */ bool argv_parser_run (struct argv_parser *ap, int argc, char **argv) { enum { LONGOPT_VAL_BASE = UCHAR_MAX + 1 }; const struct argv_option_plus *shortopt_ptrs[UCHAR_MAX + 1]; struct string shortopts; struct option *longopts; size_t n_longopts; bool retval; size_t i; memset (shortopt_ptrs, 0, sizeof shortopt_ptrs); ds_init_empty (&shortopts); longopts = xmalloc ((ap->n_options + 1) * sizeof *longopts); n_longopts = 0; for (i = 0; i < ap->n_options; i++) { const struct argv_option_plus *aop = &ap->options[i]; if (aop->base.long_name != NULL) { struct option *o = &longopts[n_longopts++]; o->name = aop->base.long_name; o->has_arg = aop->base.has_arg; o->flag = NULL; o->val = i + LONGOPT_VAL_BASE; } if (aop->base.short_name != 0) { unsigned char c = aop->base.short_name; if (shortopt_ptrs[c] == NULL) { shortopt_ptrs[c] = aop; ds_put_byte (&shortopts, aop->base.short_name); if (aop->base.has_arg != no_argument) ds_put_byte (&shortopts, ':'); if (aop->base.has_arg == optional_argument) ds_put_byte (&shortopts, ':'); } else { if (opterr) fprintf (stderr, "option -%c multiply defined", aop->base.short_name); retval = false; goto exit; } } } memset (&longopts[n_longopts], 0, sizeof *longopts); for (;;) { int indexptr; int c = getopt_long (argc, argv, ds_cstr (&shortopts), longopts, &indexptr); if (c == -1) { retval = true; break; } else if (c == '?') { retval = false; break; } else if (c >= LONGOPT_VAL_BASE && c < LONGOPT_VAL_BASE + n_longopts + 1) { struct argv_option_plus *aop = &ap->options[c - LONGOPT_VAL_BASE]; aop->cb (aop->base.id, aop->aux); } else if (c >= SCHAR_MIN && c <= UCHAR_MAX) { const struct argv_option_plus *aop = shortopt_ptrs[(unsigned char) c]; aop->cb (aop->base.id, aop->aux); } else NOT_REACHED (); } exit: ds_destroy (&shortopts); free (longopts); return retval; } pspp-1.0.1/src/libpspp/str.h0000644000175000017500000002432713143642441012647 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !str_h #define str_h 1 #include #include #include #include #include #include #include #include "compiler.h" #include "memcasecmp.h" #include "xstrndup.h" #include "xvasprintf.h" /* Miscellaneous. */ void buf_reverse (char *, size_t); int buf_compare_case (const char *, const char *, size_t); int buf_compare_rpad (const char *, size_t, const char *, size_t); void buf_copy_lpad (char *, size_t, const char *, size_t, char pad); void buf_copy_rpad (char *, size_t, const char *, size_t, char pad); void buf_copy_str_lpad (char *, size_t, const char *, char pad); void buf_copy_str_rpad (char *, size_t, const char *, char pad); int str_compare_rpad (const char *, const char *); void str_copy_rpad (char *, size_t, const char *); void str_copy_trunc (char *, size_t, const char *); void str_copy_buf_trunc (char *, size_t, const char *, size_t); void str_uppercase (char *); void str_lowercase (char *); bool str_format_26adic (unsigned long int number, bool uppercase, char buffer[], size_t); void *mempset (void *, int, size_t); /* Common character classes for use with substring and string functions. */ #define CC_SPACES " \t\v\r\n" #define CC_DIGITS "0123456789" #define CC_XDIGITS "0123456789abcdefABCDEF" #define CC_LETTERS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" #define CC_ALNUM CC_LETTERS CC_DIGITS /* Substrings. */ struct substring { char *string; size_t length; }; #define SS_EMPTY_INITIALIZER {NULL, 0} #define SS_LITERAL_INITIALIZER(LITERAL) \ {(char *) LITERAL, (sizeof LITERAL) - 1} /* Constructors. These functions do not allocate any memory, so the substrings they create should not normally be destroyed. */ static inline struct substring ss_empty (void); static inline struct substring ss_cstr (const char *); static inline struct substring ss_buffer (const char *, size_t); struct substring ss_substr (struct substring, size_t start, size_t); struct substring ss_head (struct substring, size_t); struct substring ss_tail (struct substring, size_t); /* Constructors and destructor that allocate and deallocate memory. */ struct pool; void ss_alloc_substring (struct substring *, struct substring); void ss_alloc_uninit (struct substring *, size_t); void ss_realloc (struct substring *, size_t); void ss_alloc_substring_pool (struct substring *, struct substring, struct pool *); void ss_alloc_uninit_pool (struct substring *, size_t, struct pool *); void ss_dealloc (struct substring *); /* Mutators. Functions that advance the beginning of a string should not be used if a substring is to be deallocated. */ void ss_truncate (struct substring *, size_t); size_t ss_rtrim (struct substring *, struct substring trim_set); size_t ss_ltrim (struct substring *, struct substring trim_set); void ss_trim (struct substring *, struct substring trim_set); bool ss_chomp_byte (struct substring *, char); bool ss_chomp (struct substring *, struct substring); bool ss_separate (struct substring src, struct substring delimiters, size_t *save_idx, struct substring *token); bool ss_tokenize (struct substring src, struct substring delimiters, size_t *save_idx, struct substring *token); void ss_advance (struct substring *, size_t); bool ss_match_byte (struct substring *, char); int ss_match_byte_in (struct substring *, struct substring); bool ss_match_string (struct substring *, const struct substring); int ss_get_byte (struct substring *); size_t ss_get_bytes (struct substring *, size_t cnt, struct substring *); bool ss_get_until (struct substring *, char delimiter, struct substring *); size_t ss_get_long (struct substring *, long *); /* Inspectors. */ bool ss_is_empty (struct substring); size_t ss_length (struct substring); char *ss_data (struct substring); char *ss_end (struct substring); int ss_at (struct substring, size_t idx); int ss_first (struct substring); int ss_last (struct substring); bool ss_ends_with (struct substring, struct substring suffix); size_t ss_span (struct substring, struct substring skip_set); size_t ss_cspan (struct substring, struct substring stop_set); size_t ss_find_byte (struct substring, char); int ss_compare (struct substring, struct substring); int ss_compare_case (struct substring, struct substring); int ss_equals (struct substring, struct substring); int ss_equals_case (struct substring, struct substring); size_t ss_pointer_to_position (struct substring, const char *); char *ss_xstrdup (struct substring); /* UTF-8. */ ucs4_t ss_first_mb (struct substring); int ss_first_mblen (struct substring); ucs4_t ss_get_mb (struct substring *); ucs4_t ss_at_mb (struct substring, size_t ofs); int ss_at_mblen (struct substring, size_t ofs); /* Variable length strings. */ struct string { struct substring ss; size_t capacity; /* Allocated capacity, not including one extra byte allocated for null terminator. */ }; #define DS_EMPTY_INITIALIZER {SS_EMPTY_INITIALIZER, 0} /* Constructors, destructors. */ void ds_init_empty (struct string *); void ds_init_string (struct string *, const struct string *); void ds_init_substring (struct string *, struct substring); void ds_init_cstr (struct string *, const char *); void ds_destroy (struct string *); void ds_swap (struct string *, struct string *); /* Pools. */ struct pool; void ds_register_pool (struct string *, struct pool *); void ds_unregister_pool (struct string *, struct pool *); /* Replacement. */ void ds_assign_string (struct string *, const struct string *); void ds_assign_substring (struct string *, struct substring); void ds_assign_cstr (struct string *, const char *); /* Shrink, extend. */ void ds_clear (struct string *); void ds_extend (struct string *, size_t); void ds_shrink (struct string *); void ds_truncate (struct string *, size_t); /* Padding, trimming. */ size_t ds_rtrim (struct string *, struct substring trim_set); size_t ds_ltrim (struct string *, struct substring trim_set); size_t ds_trim (struct string *, struct substring trim_set); bool ds_chomp_byte (struct string *, char); bool ds_chomp (struct string *, struct substring); bool ds_separate (const struct string *src, struct substring delimiters, size_t *save_idx, struct substring *token); bool ds_tokenize (const struct string *src, struct substring delimiters, size_t *save_idx, struct substring *token); void ds_rpad (struct string *, size_t length, char pad); void ds_set_length (struct string *, size_t new_length, char pad); void ds_remove (struct string *, size_t start, size_t n); /* Extracting substrings. */ struct substring ds_ss (const struct string *); struct substring ds_substr (const struct string *, size_t start, size_t); struct substring ds_head (const struct string *, size_t); struct substring ds_tail (const struct string *, size_t); /* Inspectors. */ bool ds_is_empty (const struct string *); size_t ds_length (const struct string *); char *ds_data (const struct string *); char *ds_end (const struct string *); int ds_at (const struct string *, size_t idx); int ds_first (const struct string *); int ds_last (const struct string *); bool ds_ends_with (const struct string *, struct substring suffix); size_t ds_span (const struct string *, struct substring skip_set); size_t ds_cspan (const struct string *, struct substring stop_set); size_t ds_find_byte (const struct string *, char); int ds_compare (const struct string *, const struct string *); size_t ds_pointer_to_position (const struct string *, const char *); char *ds_xstrdup (const struct string *); size_t ds_capacity (const struct string *); char *ds_cstr (const struct string *); char *ds_steal_cstr (struct string *); /* File input. */ bool ds_read_line (struct string *, FILE *, size_t max_length); bool ds_read_config_line (struct string *, int *line_number, FILE *); bool ds_read_stream (struct string *, size_t size, size_t cnt, FILE *stream); /* Append. */ void ds_put_byte (struct string *, int ch); void ds_put_byte_multiple (struct string *, int ch, size_t); void ds_put_unichar (struct string *, ucs4_t uc); void ds_put_cstr (struct string *, const char *); void ds_put_substring (struct string *, struct substring); void ds_put_vformat (struct string *st, const char *, va_list) PRINTF_FORMAT (2, 0); void ds_put_c_vformat (struct string *st, const char *, va_list) PRINTF_FORMAT (2, 0); void ds_put_format (struct string *, const char *, ...) PRINTF_FORMAT (2, 3); void ds_put_c_format (struct string *, const char *, ...) PRINTF_FORMAT (2, 3); char *ds_put_uninit (struct string *st, size_t incr); char *ds_splice_uninit (struct string *, size_t ofs, size_t old_len, size_t new_len); /* Other */ /* calls relocate from gnulib on ST */ void ds_relocate (struct string *st); void u8_buf_copy_rpad (uint8_t *dst, size_t dst_size, const uint8_t *src, size_t src_size, char pad); static inline struct substring ss_empty (void) { struct substring ss; ss.string = NULL; ss.length = 0; return ss; } /* Returns a substring whose contents are the given C-style string CSTR. */ static inline struct substring ss_cstr (const char *cstr) { return ss_buffer (cstr, strlen (cstr)); } /* Returns a substring whose contents are the CNT characters in BUFFER. */ static inline struct substring ss_buffer (const char *buffer, size_t cnt) { struct substring ss; ss.string = (char *) buffer; ss.length = cnt; return ss; } #endif /* str_h */ pspp-1.0.1/src/libpspp/hmapx.c0000644000175000017500000000724013137223525013143 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2010, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifdef HAVE_CONFIG_H #include #endif #include "libpspp/hmapx.h" #include #include "gl/xalloc.h" /* Frees the memory, if any, allocated by hash map MAP, including all hmapx_nodes that it contains. The user-defined data items that the hmapx_nodes point to are not affected. If those items should be freed, then it should be done by iterating through MAP's contents before destroying MAP. */ void hmapx_destroy (struct hmapx *map) { if (map != NULL) { if (!(hmapx_is_empty (map))) { struct hmapx_node *node, *next; for (node = hmapx_first (map); node != NULL; node = next) { next = hmapx_next (map, node); free (node); } } hmap_destroy (&map->hmap); } } /* Removes all hmapx_nodes from MAP and frees them. The user-defined data items that the hmapx_nodes point to are not affected. */ void hmapx_clear (struct hmapx *map) { struct hmapx_node *node, *next; for (node = hmapx_first (map); node; node = next) { next = hmapx_next (map, node); hmapx_delete (map, node); } } /* Allocates and returns a new hmapx_node with DATA as its data item. */ static struct hmapx_node * make_hmapx_node (void *data) { struct hmapx_node *node = xmalloc (sizeof *node); node->data = data; return node; } /* Inserts DATA into MAP with hash value HASH and returns the new hmapx_node created to contain DATA. If the insertion causes MAP's current capacity, as reported by hmapx_capacity(), to be exceeded, rehashes MAP with an increased number of hash buckets. This function runs in constant time amortized over all the insertions into MAP. This function does not verify that MAP does not already contain a data item with the same value as DATA. If duplicates should be disallowed (which is the usual case), then the client must check for duplicates itself before inserting the new item. */ struct hmapx_node * hmapx_insert (struct hmapx *map, void *data, size_t hash) { struct hmapx_node *node = make_hmapx_node (data); hmap_insert (&map->hmap, &node->hmap_node, hash); return node; } /* Inserts DATA into MAP with hash value HASH and returns the new hmapx_node created to contain DATA. Does not check whether this causes MAP's current capacity to be exceeded. The caller must take responsibility for that (or use hmapx_insert() instead). This function runs in constant time. This function does not verify that MAP does not already contain a data item with the same value as DATA. If duplicates should be disallowed (which is the usual case), then the client must check for duplicates itself before inserting the new node. */ struct hmapx_node * hmapx_insert_fast (struct hmapx *map, void *data, size_t hash) { struct hmapx_node *node = make_hmapx_node (data); hmap_insert_fast (&map->hmap, &node->hmap_node, hash); return node; } pspp-1.0.1/src/libpspp/temp-file.h0000644000175000017500000000176512470243700013717 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Functions for temporary files that honor $TMPDIR. */ #ifndef LIBPSPP_TEMP_FILE_H #define LIBPSPP_TEMP_FILE_H 1 #include FILE *create_temp_file (void); void close_temp_file (FILE *); const char *temp_dir_name (void); #endif /* libpspp/ext-array.h */ pspp-1.0.1/src/libpspp/intern.c0000644000175000017500000000731412476227410013331 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/intern.h" #include #include #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/hash-functions.h" #include "libpspp/hmap.h" #include "gl/xalloc.h" /* A single interned string. */ struct interned_string { struct hmap_node node; /* Node in hash table. */ size_t ref_cnt; /* Reference count. */ size_t length; /* strlen(string). */ char string[1]; /* Null-terminated string. */ }; /* All interned strings. */ static struct hmap interns = HMAP_INITIALIZER (interns); /* Searches the table of interned strings for one equal to S, which has length LENGTH and hash value HASH. */ static struct interned_string * intern_lookup__ (const char *s, size_t length, unsigned int hash) { struct interned_string *is; HMAP_FOR_EACH_WITH_HASH (is, struct interned_string, node, hash, &interns) if (is->length == length && !memcmp (s, is->string, length)) return is; return NULL; } /* Returns an interned version of string S. Pass the returned string to intern_unref() to release it. */ const char * intern_new (const char *s) { size_t length = strlen (s); unsigned int hash = hash_bytes (s, length, 0); struct interned_string *is; is = intern_lookup__ (s, length, hash); if (is != NULL) is->ref_cnt++; else { is = xmalloc (length + sizeof *is); hmap_insert (&interns, &is->node, hash); is->ref_cnt = 1; is->length = length; memcpy (is->string, s, length + 1); } return is->string; } static struct interned_string * interned_string_from_string (const char *s_) { char (*s)[1] = (char (*)[1]) s_; struct interned_string *is = UP_CAST (s, struct interned_string, string); assert (is->ref_cnt > 0); return is; } /* Increases the reference count on S, which must be an interned string returned by intern_new(). */ const char * intern_ref (const char *s) { struct interned_string *is = interned_string_from_string (s); is->ref_cnt++; return s; } /* Decreases the reference count on S, which must be an interned string returned by intern_new(). If the reference count reaches 0, frees the interned string. */ void intern_unref (const char *s) { struct interned_string *is = interned_string_from_string (s); if (--is->ref_cnt == 0) { hmap_delete (&interns, &is->node); free (is); } } /* Given null-terminated string S, returns true if S is an interned string returned by intern_string_new(), false otherwise. This is appropriate for use in debug assertions, e.g.: assert (is_interned_string (s)); */ bool is_interned_string (const char *s) { size_t length = strlen (s); unsigned int hash = hash_bytes (s, length, 0); return intern_lookup__ (s, length, hash) != NULL; } /* Returns the length of S, which must be an interned string returned by intern_new(). */ size_t intern_strlen (const char *s) { return interned_string_from_string (s)->length; } pspp-1.0.1/src/libpspp/hash-functions.h0000644000175000017500000000225412470413451014762 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_HASH_FUNCTIONS_H #define LIBPSPP_HASH_FUNCTIONS_H 1 #include unsigned int hash_bytes (const void *, size_t, unsigned int basis); unsigned int hash_string (const char *, unsigned int basis); unsigned int hash_int (int, unsigned int basis); unsigned int hash_double (double, unsigned int basis); unsigned int hash_pointer (const void *, unsigned int basis); #endif /* libpspp/hash-functions.h */ pspp-1.0.1/src/libpspp/bt.h0000644000175000017500000000633112470243700012434 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_BT_H #define LIBPSPP_BT_H 1 /* Balanced tree (BT) data structure. The client should not need to be aware of the form of balancing applied to the balanced tree, as its operation is fully encapsulated. */ #include #include #include "libpspp/cast.h" /* Returns the data structure corresponding to the given NODE, assuming that NODE is embedded as the given MEMBER name in data type STRUCT. */ #define bt_data(NODE, STRUCT, MEMBER) \ (CHECK_POINTER_HAS_TYPE (NODE, struct bt_node *), \ UP_CAST (NODE, STRUCT, MEMBER)) /* Node in a balanced binary tree. */ struct bt_node { struct bt_node *up; /* Parent (NULL for root). */ struct bt_node *down[2]; /* Left child, right child. */ }; /* Compares nodes A and B, with the tree's AUX. Returns a strcmp-like result. */ typedef int bt_compare_func (const struct bt_node *a, const struct bt_node *b, const void *aux); /* A balanced binary tree. */ struct bt { struct bt_node *root; /* Tree's root, NULL if empty. */ bt_compare_func *compare; /* To compare nodes. */ const void *aux; /* Auxiliary data. */ size_t size; /* Current node count. */ size_t max_size; /* Max size since last complete rebalance. */ }; void bt_init (struct bt *, bt_compare_func *, const void *aux); struct bt_node *bt_insert (struct bt *, struct bt_node *); void bt_delete (struct bt *, struct bt_node *); struct bt_node *bt_find (const struct bt *, const struct bt_node *); struct bt_node *bt_find_ge (const struct bt *, const struct bt_node *); struct bt_node *bt_find_le (const struct bt *, const struct bt_node *); struct bt_node *bt_first (const struct bt *); struct bt_node *bt_last (const struct bt *); struct bt_node *bt_find (const struct bt *, const struct bt_node *); struct bt_node *bt_next (const struct bt *, const struct bt_node *); struct bt_node *bt_prev (const struct bt *, const struct bt_node *); struct bt_node *bt_changed (struct bt *, struct bt_node *); void bt_moved (struct bt *, struct bt_node *); /* Returns the number of nodes currently in BT. */ static inline size_t bt_count (const struct bt *bt) { return bt->size; } /* Return true if BT contains no nodes, false if BT contains at least one node. */ static inline bool bt_is_empty (const struct bt *bt) { return bt->size == 0; } #endif /* libpspp/bt.h */ pspp-1.0.1/src/libpspp/array.c0000644000175000017500000007605513137223525013156 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* 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 program. If not, see . 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. */ /* * * 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. */ /* Copyright (C) 1991, 1992, 1996, 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Douglas C. Schmidt (schmidt@ics.uci.edu). 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, see . */ #include #include "array.h" #include #include #include #include "libpspp/assertion.h" #include "gl/xalloc.h" #include "gl/minmax.h" /* Finds an element in ARRAY, which contains COUNT elements of SIZE bytes each, using COMPARE for comparisons. Returns the first element in ARRAY that matches TARGET, or a null pointer on failure. AUX is passed to each comparison as auxiliary data. */ void * find (const void *array, size_t count, size_t size, const void *target, algo_compare_func *compare, const void *aux) { const char *element = array; while (count-- > 0) { if (compare (target, element, aux) == 0) return (void *) element; element += size; } return NULL; } /* Counts and return the number of elements in ARRAY, which contains COUNT elements of SIZE bytes each, which are equal to ELEMENT as compared with COMPARE. AUX is passed as auxiliary data to COMPARE. */ size_t count_equal (const void *array, size_t count, size_t size, const void *element, algo_compare_func *compare, const void *aux) { const char *first = array; size_t equal_cnt = 0; while (count-- > 0) { if (compare (element, first, aux) == 0) equal_cnt++; first += size; } return equal_cnt; } /* Counts and return the number of elements in ARRAY, which contains COUNT elements of SIZE bytes each, for which PREDICATE returns true. AUX is passed as auxiliary data to PREDICATE. */ size_t count_if (const void *array, size_t count, size_t size, algo_predicate_func *predicate, const void *aux) { const char *first = array; size_t true_cnt = 0; while (count-- > 0) { if (predicate (first, aux) != 0) true_cnt++; first += size; } return true_cnt; } /* Byte-wise swap two items of size SIZE. */ #define SWAP(a, b, size) \ do \ { \ register size_t __size = (size); \ register char *__a = (a), *__b = (b); \ do \ { \ char __tmp = *__a; \ *__a++ = *__b; \ *__b++ = __tmp; \ } while (--__size > 0); \ } while (0) /* Makes the elements in ARRAY unique, by moving up duplicates, and returns the new number of elements in the array. Sorted arrays only. Arguments same as for sort() above. */ size_t unique (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux) { char *first = array; char *last = first + size * count; char *result = array; for (;;) { first += size; if (first >= last) { assert (adjacent_find_equal (array, count, size, compare, aux) == NULL); return count; } if (compare (result, first, aux)) { result += size; if (result != first) memcpy (result, first, size); } else count--; } } /* Helper function that calls sort(), then unique(). */ size_t sort_unique (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux) { sort (array, count, size, compare, aux); return unique (array, count, size, compare, aux); } /* Reorders ARRAY, which contains COUNT elements of SIZE bytes each, so that the elements for which PREDICATE returns true precede those for which PREDICATE returns zero. AUX is passed to each predicate as auxiliary data. Returns the number of elements for which PREDICATE returns true. Not stable. */ size_t partition (void *array, size_t count, size_t size, algo_predicate_func *predicate, const void *aux) { size_t true_cnt = count; char *first = array; char *last = first + true_cnt * size; for (;;) { /* Move FIRST forward to point to first element that fails PREDICATE. */ for (;;) { if (first == last) goto done; else if (!predicate (first, aux)) break; first += size; } true_cnt--; /* Move LAST backward to point to last element that passes PREDICATE. */ for (;;) { last -= size; if (first == last) goto done; else if (predicate (last, aux)) break; else true_cnt--; } /* By swapping FIRST and LAST we extend the starting and ending sequences that pass and fail, respectively, PREDICATE. */ SWAP (first, last, size); first += size; } done: assert (is_partitioned (array, count, size, true_cnt, predicate, aux)); return true_cnt; } /* Checks whether ARRAY, which contains COUNT elements of SIZE bytes each, is partitioned such that PREDICATE returns true for the first TRUE_CNT elements and zero for the remaining elements. AUX is passed as auxiliary data to PREDICATE. */ bool is_partitioned (const void *array, size_t count, size_t size, size_t true_cnt, algo_predicate_func *predicate, const void *aux) { const char *first = array; size_t idx; assert (true_cnt <= count); for (idx = 0; idx < true_cnt; idx++) if (predicate (first + idx * size, aux) == 0) return false; for (idx = true_cnt; idx < count; idx++) if (predicate (first + idx * size, aux) != 0) return false; return true; } /* Copies the COUNT elements of SIZE bytes each from ARRAY to RESULT, except that elements for which PREDICATE is false are not copied. Returns the number of elements copied. AUX is passed to PREDICATE as auxiliary data. */ size_t copy_if (const void *array, size_t count, size_t size, void *result, algo_predicate_func *predicate, const void *aux) { const char *input = array; const char *last = input + size * count; char *output = result; size_t nonzero_cnt = 0; while (input < last) { if (predicate (input, aux)) { memcpy (output, input, size); output += size; nonzero_cnt++; } input += size; } assert (nonzero_cnt == count_if (array, count, size, predicate, aux)); assert (nonzero_cnt == count_if (result, nonzero_cnt, size, predicate, aux)); return nonzero_cnt; } /* Removes N elements starting at IDX from ARRAY, which consists of COUNT elements of SIZE bytes each, by shifting the elements following them, if any, into its position. */ void remove_range (void *array_, size_t count, size_t size, size_t idx, size_t n) { char *array = array_; assert (array != NULL); assert (idx <= count); assert (idx + n <= count); if (idx + n < count) memmove (array + idx * size, array + (idx + n) * size, size * (count - idx - n)); } /* Removes element IDX from ARRAY, which consists of COUNT elements of SIZE bytes each, by shifting the elements following it, if any, into its position. */ void remove_element (void *array, size_t count, size_t size, size_t idx) { remove_range (array, count, size, idx, 1); } /* Makes room for N elements starting at IDX in ARRAY, which initially consists of COUNT elements of SIZE bytes each, by shifting elements IDX...COUNT (exclusive) to the right by N positions. */ void insert_range (void *array_, size_t count, size_t size, size_t idx, size_t n) { char *array = array_; assert (idx <= count); memmove (array + (idx + n) * size, array + idx * size, (count - idx) * size); } /* Makes room for a new element at IDX in ARRAY, which initially consists of COUNT elements of SIZE bytes each, by shifting elements IDX...COUNT (exclusive) to the right by one position. */ void insert_element (void *array, size_t count, size_t size, size_t idx) { insert_range (array, count, size, idx, 1); } /* Moves an element in ARRAY, which consists of COUNT elements of SIZE bytes each, from OLD_IDX to NEW_IDX, shifting around other elements as needed. Runs in O(abs(OLD_IDX - NEW_IDX)) time. */ void move_element (void *array_, size_t count, size_t size, size_t old_idx, size_t new_idx) { assert (array_ != NULL || count == 0); assert (old_idx < count); assert (new_idx < count); if (old_idx != new_idx) { char *array = array_; char *element = xmalloc (size); char *new = array + new_idx * size; char *old = array + old_idx * size; memcpy (element, old, size); if (new < old) memmove (new + size, new, (old_idx - new_idx) * size); else memmove (old, old + size, (new_idx - old_idx) * size); memcpy (new, element, size); free (element); } } /* Moves N elements in ARRAY starting at OLD_IDX, which consists of COUNT elements of SIZE bytes each, so that they now start at NEW_IDX, shifting around other elements as needed. */ void move_range (void *array_, size_t count, size_t size, size_t old_idx, size_t new_idx, size_t n) { assert (array_ != NULL || count == 0); assert (n <= count); assert (old_idx + n <= count); assert (new_idx + n <= count); if (old_idx != new_idx && n > 0) { char *array = array_; char *range = xmalloc (size * n); char *new = array + new_idx * size; char *old = array + old_idx * size; memcpy (range, old, size * n); if (new < old) memmove (new + size * n, new, (old_idx - new_idx) * size); else memmove (old, old + size * n, (new_idx - old_idx) * size); memcpy (new, range, size * n); free (range); } } /* A predicate and its auxiliary data. */ struct pred_aux { algo_predicate_func *predicate; const void *aux; }; static bool not (const void *data, const void *pred_aux_) { const struct pred_aux *pred_aux = pred_aux_; return !pred_aux->predicate (data, pred_aux->aux); } /* Removes elements equal to ELEMENT from ARRAY, which consists of COUNT elements of SIZE bytes each. Returns the number of remaining elements. AUX is passed to COMPARE as auxiliary data. */ size_t remove_equal (void *array, size_t count, size_t size, void *element, algo_compare_func *compare, const void *aux) { char *first = array; char *last = first + count * size; char *result; for (;;) { if (first >= last) goto done; if (compare (first, element, aux) == 0) break; first += size; } result = first; count--; for (;;) { first += size; if (first >= last) goto done; if (compare (first, element, aux) == 0) { count--; continue; } memcpy (result, first, size); result += size; } done: assert (count_equal (array, count, size, element, compare, aux) == 0); return count; } /* Copies the COUNT elements of SIZE bytes each from ARRAY to RESULT, except that elements for which PREDICATE is true are not copied. Returns the number of elements copied. AUX is passed to PREDICATE as auxiliary data. */ size_t remove_copy_if (const void *array, size_t count, size_t size, void *result, algo_predicate_func *predicate, const void *aux) { struct pred_aux pred_aux; pred_aux.predicate = predicate; pred_aux.aux = aux; return copy_if (array, count, size, result, not, &pred_aux); } /* Searches ARRAY, which contains COUNT of SIZE bytes each, using a binary search. Returns any element that equals VALUE, if one exists, or a null pointer otherwise. ARRAY must ordered according to COMPARE. AUX is passed to COMPARE as auxiliary data. */ void * binary_search (const void *array, size_t count, size_t size, void *value, algo_compare_func *compare, const void *aux) { assert (array != NULL || count == 0); assert (count <= INT_MAX); assert (compare != NULL); if (count != 0) { const char *first = array; int low = 0; int high = count - 1; while (low <= high) { int middle = (low + high) / 2; const char *element = first + middle * size; int cmp = compare (value, element, aux); if (cmp > 0) low = middle + 1; else if (cmp < 0) high = middle - 1; else return (void *) element; } } expensive_assert (find (array, count, size, value, compare, aux) == NULL); return NULL; } /* Lexicographically compares ARRAY1, which contains COUNT1 elements of SIZE bytes each, to ARRAY2, which contains COUNT2 elements of SIZE bytes, according to COMPARE. Returns a strcmp()-type result. AUX is passed to COMPARE as auxiliary data. */ int lexicographical_compare_3way (const void *array1, size_t count1, const void *array2, size_t count2, size_t size, algo_compare_func *compare, const void *aux) { const char *first1 = array1; const char *first2 = array2; size_t min_count = count1 < count2 ? count1 : count2; while (min_count > 0) { int cmp = compare (first1, first2, aux); if (cmp != 0) return cmp; first1 += size; first2 += size; min_count--; } return count1 < count2 ? -1 : count1 > count2; } /* If you consider tuning this algorithm, you should consult first: Engineering a sort function; Jon Bentley and M. Douglas McIlroy; Software - Practice and Experience; Vol. 23 (11), 1249-1265, 1993. */ #include #include #include /* Discontinue quicksort algorithm when partition gets below this size. This particular magic number was chosen to work best on a Sun 4/260. */ #define MAX_THRESH 4 /* Stack node declarations used to store unfulfilled partition obligations. */ typedef struct { char *lo; char *hi; } stack_node; /* The next 4 #defines implement a very fast in-line stack abstraction. */ /* The stack needs log (total_elements) entries (we could even subtract log(MAX_THRESH)). Since total_elements has type size_t, we get as upper bound for log (total_elements): bits per byte (CHAR_BIT) * sizeof(size_t). */ #define STACK_SIZE (CHAR_BIT * sizeof(size_t)) #define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) #define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) #define STACK_NOT_EMPTY (stack < top) /* Order size using quicksort. This implementation incorporates four optimizations discussed in Sedgewick: 1. Non-recursive, using an explicit stack of pointer that store the next array partition to sort. To save time, this maximum amount of space required to store an array of SIZE_MAX is allocated on the stack. Assuming a 32-bit (64 bit) integer for size_t, this needs only 32 * sizeof(stack_node) == 256 bytes (for 64 bit: 1024 bytes). Pretty cheap, actually. 2. Chose the pivot element using a median-of-three decision tree. This reduces the probability of selecting a bad pivot value and eliminates certain extraneous comparisons. 3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving insertion sort to order the MAX_THRESH items within each partition. This is a big win, since insertion sort is faster for small, mostly sorted array segments. 4. The larger of the two sub-partitions is always pushed onto the stack first, with the algorithm then concentrating on the smaller partition. This *guarantees* no more than log (total_elems) stack size is needed (actually O(1) in this case)! */ void sort (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux) { char *const first = array; const size_t max_thresh = MAX_THRESH * size; if (count == 0) /* Avoid lossage with unsigned arithmetic below. */ return; if (count > MAX_THRESH) { char *lo = first; char *hi = &lo[size * (count - 1)]; stack_node stack[STACK_SIZE]; stack_node *top = stack + 1; while (STACK_NOT_EMPTY) { char *left_ptr; char *right_ptr; /* Select median value from among LO, MID, and HI. Rearrange LO and HI so the three values are sorted. This lowers the probability of picking a pathological pivot value and skips a comparison for both the LEFT_PTR and RIGHT_PTR in the while loops. */ char *mid = lo + size * ((hi - lo) / size >> 1); if (compare (mid, lo, aux) < 0) SWAP (mid, lo, size); if (compare (hi, mid, aux) < 0) SWAP (mid, hi, size); else goto jump_over; if (compare (mid, lo, aux) < 0) SWAP (mid, lo, size); jump_over:; left_ptr = lo + size; right_ptr = hi - size; /* Here's the famous ``collapse the walls'' section of quicksort. Gotta like those tight inner loops! They are the main reason that this algorithm runs much faster than others. */ do { while (compare (left_ptr, mid, aux) < 0) left_ptr += size; while (compare (mid, right_ptr, aux) < 0) right_ptr -= size; if (left_ptr < right_ptr) { SWAP (left_ptr, right_ptr, size); if (mid == left_ptr) mid = right_ptr; else if (mid == right_ptr) mid = left_ptr; left_ptr += size; right_ptr -= size; } else if (left_ptr == right_ptr) { left_ptr += size; right_ptr -= size; break; } } while (left_ptr <= right_ptr); /* Set up pointers for next iteration. First determine whether left and right partitions are below the threshold size. If so, ignore one or both. Otherwise, push the larger partition's bounds on the stack and continue sorting the smaller one. */ if ((size_t) (right_ptr - lo) <= max_thresh) { if ((size_t) (hi - left_ptr) <= max_thresh) /* Ignore both small partitions. */ POP (lo, hi); else /* Ignore small left partition. */ lo = left_ptr; } else if ((size_t) (hi - left_ptr) <= max_thresh) /* Ignore small right partition. */ hi = right_ptr; else if ((right_ptr - lo) > (hi - left_ptr)) { /* Push larger left partition indices. */ PUSH (lo, right_ptr); lo = left_ptr; } else { /* Push larger right partition indices. */ PUSH (left_ptr, hi); hi = right_ptr; } } } /* Once the FIRST array is partially sorted by quicksort the rest is completely sorted using insertion sort, since this is efficient for partitions below MAX_THRESH size. FIRST points to the beginning of the array to sort, and END_PTR points at the very last element in the array (*not* one beyond it!). */ { char *const end_ptr = &first[size * (count - 1)]; char *tmp_ptr = first; char *thresh = MIN (end_ptr, first + max_thresh); register char *run_ptr; /* Find smallest element in first threshold and place it at the array's beginning. This is the smallest array element, and the operation speeds up insertion sort's inner loop. */ for (run_ptr = tmp_ptr + size; run_ptr <= thresh; run_ptr += size) if (compare (run_ptr, tmp_ptr, aux) < 0) tmp_ptr = run_ptr; if (tmp_ptr != first) SWAP (tmp_ptr, first, size); /* Insertion sort, running from left-hand-side up to right-hand-side. */ run_ptr = first + size; while ((run_ptr += size) <= end_ptr) { tmp_ptr = run_ptr - size; while (compare (run_ptr, tmp_ptr, aux) < 0) tmp_ptr -= size; tmp_ptr += size; if (tmp_ptr != run_ptr) { char *trav; trav = run_ptr + size; while (--trav >= run_ptr) { char c = *trav; char *hi, *lo; for (hi = lo = trav; (lo -= size) >= tmp_ptr; hi = lo) *hi = *lo; *hi = c; } } } } assert (is_sorted (array, count, size, compare, aux)); } /* Tests whether ARRAY, which contains COUNT elements of SIZE bytes each, is sorted in order according to COMPARE. AUX is passed to COMPARE as auxiliary data. */ bool is_sorted (const void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux) { const char *first = array; size_t idx; for (idx = 0; idx + 1 < count; idx++) if (compare (first + idx * size, first + (idx + 1) * size, aux) > 0) return false; return true; } /* Computes the generalized set difference, ARRAY1 minus ARRAY2, into RESULT, and returns the number of elements written to RESULT. If a value appears M times in ARRAY1 and N times in ARRAY2, then it will appear max(M - N, 0) in RESULT. ARRAY1 and ARRAY2 must be sorted, and RESULT is sorted and stable. ARRAY1 consists of COUNT1 elements, ARRAY2 of COUNT2 elements, each SIZE bytes. AUX is passed to COMPARE as auxiliary data. */ size_t set_difference (const void *array1, size_t count1, const void *array2, size_t count2, size_t size, void *result_, algo_compare_func *compare, const void *aux) { const char *first1 = array1; const char *last1 = first1 + count1 * size; const char *first2 = array2; const char *last2 = first2 + count2 * size; char *result = result_; size_t result_count = 0; while (first1 != last1 && first2 != last2) { int cmp = compare (first1, first2, aux); if (cmp < 0) { memcpy (result, first1, size); first1 += size; result += size; result_count++; } else if (cmp > 0) first2 += size; else { first1 += size; first2 += size; } } while (first1 != last1) { memcpy (result, first1, size); first1 += size; result += size; result_count++; } return result_count; } /* Finds the first pair of adjacent equal elements in ARRAY, which has COUNT elements of SIZE bytes. Returns the first element in ARRAY such that COMPARE returns zero when it and its successor element are compared, or a null pointer if no such element exists. AUX is passed to COMPARE as auxiliary data. */ void * adjacent_find_equal (const void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux) { const char *first = array; const char *last = first + count * size; while (first < last && first + size < last) { if (compare (first, first + size, aux) == 0) return (void *) first; first += size; } return NULL; } /* ARRAY contains COUNT elements of SIZE bytes each. Initially the first COUNT - 1 elements of these form a heap, followed by a single element not part of the heap. This function adds the final element, forming a heap of COUNT elements in ARRAY. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ void push_heap (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux) { char *first = array; size_t i; expensive_assert (count < 1 || is_heap (array, count - 1, size, compare, aux)); for (i = count; i > 1; i /= 2) { char *parent = first + (i / 2 - 1) * size; char *element = first + (i - 1) * size; if (compare (parent, element, aux) < 0) SWAP (parent, element, size); else break; } expensive_assert (is_heap (array, count, size, compare, aux)); } /* ARRAY contains COUNT elements of SIZE bytes each. Initially the children of ARRAY[idx - 1] are heaps, but ARRAY[idx - 1] may be smaller than its children. This function fixes that, so that ARRAY[idx - 1] itself is a heap. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ static void heapify (void *array, size_t count, size_t size, size_t idx, algo_compare_func *compare, const void *aux) { char *first = array; for (;;) { size_t left = 2 * idx; size_t right = left + 1; size_t largest = idx; if (left <= count && compare (first + size * (left - 1), first + size * (idx - 1), aux) > 0) largest = left; if (right <= count && compare (first + size * (right - 1), first + size * (largest - 1), aux) > 0) largest = right; if (largest == idx) break; SWAP (first + size * (idx - 1), first + size * (largest - 1), size); idx = largest; } } /* ARRAY contains COUNT elements of SIZE bytes each. Initially all COUNT elements form a heap. This function moves the largest element in the heap to the final position in ARRAY and reforms a heap of the remaining COUNT - 1 elements at the beginning of ARRAY. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ void pop_heap (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux) { char *first = array; expensive_assert (is_heap (array, count, size, compare, aux)); SWAP (first, first + (count - 1) * size, size); heapify (first, count - 1, size, 1, compare, aux); expensive_assert (count < 1 || is_heap (array, count - 1, size, compare, aux)); } /* Turns ARRAY, which contains COUNT elements of SIZE bytes, into a heap. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ void make_heap (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux) { size_t idx; for (idx = count / 2; idx >= 1; idx--) heapify (array, count, size, idx, compare, aux); expensive_assert (count < 1 || is_heap (array, count, size, compare, aux)); } /* ARRAY contains COUNT elements of SIZE bytes each. Initially all COUNT elements form a heap. This function turns the heap into a fully sorted array. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ void sort_heap (void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux) { char *first = array; size_t idx; expensive_assert (is_heap (array, count, size, compare, aux)); for (idx = count; idx >= 2; idx--) { SWAP (first, first + (idx - 1) * size, size); heapify (array, idx - 1, size, 1, compare, aux); } expensive_assert (is_sorted (array, count, size, compare, aux)); } /* ARRAY contains COUNT elements of SIZE bytes each. This function tests whether ARRAY is a heap and returns true if so, false otherwise. Uses COMPARE to compare elements, passing AUX as auxiliary data. */ bool is_heap (const void *array, size_t count, size_t size, algo_compare_func *compare, const void *aux) { const char *first = array; size_t child; for (child = 2; child <= count; child++) { size_t parent = child / 2; if (compare (first + (parent - 1) * size, first + (child - 1) * size, aux) < 0) return false; } return true; } pspp-1.0.1/src/libpspp/zip-reader.c0000644000175000017500000003122513143642441014067 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include "inflate.h" #include "str.h" #include "zip-reader.h" #include "zip-private.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) static bool find_eocd (FILE *fp, off_t *off); static int stored_read (struct zip_member *zm, void *buf, size_t n) { return fread (buf, 1, n, zm->fp); } static bool stored_init (struct zip_member *zm UNUSED) { return true; } static void stored_finish (struct zip_member *zm UNUSED) { /* Nothing required */ } static struct decompressor decompressors[n_COMPRESSION] = { {stored_init, stored_read, stored_finish}, {inflate_init, inflate_read, inflate_finish} }; static enum compression comp_code (struct zip_member *zm, uint16_t c) { enum compression which; assert (zm->errmsgs); switch (c) { case 0: which = COMPRESSION_STORED; break; case 8: which = COMPRESSION_INFLATE; break; default: ds_put_format (zm->errmsgs, _("Unsupported compression type (%d)"), c); which = n_COMPRESSION; break; } return which; } struct zip_reader { char *filename; /* The name of the file from which the data is read */ FILE *fr; /* The stream from which the meta data is read */ uint16_t n_members; /* The number of members in this archive */ struct zip_member **members; /* The members (may be null pointers until the headers have been read */ int nm; struct string *errs; }; void zip_member_finish (struct zip_member *zm) { ds_clear (zm->errmsgs); /* Probably not useful, because we would have to read right to the end of the member if (zm->expected_crc != zm->crc) { ds_put_cstr (zm->errs, _("CRC error reading zip")); } */ zip_member_unref (zm); } /* Destroy the zip reader */ void zip_reader_destroy (struct zip_reader *zr) { int i; if (zr == NULL) return; fclose (zr->fr); free (zr->filename); for (i = 0; i < zr->n_members; ++i) { zip_member_unref (zr->members[i]); } free (zr->members); free (zr); } void zm_dump (const struct zip_member *zm) { printf ("%d\t%08x\t %s\n", zm->ucomp_size, zm->expected_crc, zm->name); } /* Skip N bytes in F */ static void skip_bytes (FILE *f, size_t n) { fseeko (f, n, SEEK_CUR); } static bool get_bytes (FILE *f, void *x, size_t n) WARN_UNUSED_RESULT; /* Read N bytes from F, storing the result in X */ static bool get_bytes (FILE *f, void *x, size_t n) { return (n == fread (x, 1, n, f)); } static bool get_u32 (FILE *f, uint32_t *v) WARN_UNUSED_RESULT; /* Read a 32 bit value from F */ static bool get_u32 (FILE *f, uint32_t *v) { uint32_t x; if (!get_bytes (f, &x, sizeof x)) return false; #ifdef WORDS_BIGENDIAN *v = bswap_32 (x); #else *v = x; #endif return true; } static bool get_u16 (FILE *f, uint16_t *v) WARN_UNUSED_RESULT; /* Read a 16 bit value from F */ static bool get_u16 (FILE *f, uint16_t *v) { uint16_t x; if (!get_bytes (f, &x, sizeof x)) return false; #ifdef WORDS_BIGENDIAN *v = bswap_16 (x); #else *v = x; #endif return true; } /* Read 32 bit integer and compare it with EXPECTED. place an error string in ERR if necessary. */ static bool check_magic (FILE *f, uint32_t expected, struct string *err) { uint32_t magic; if (! get_u32 (f, &magic)) return false; if ((expected != magic)) { ds_put_format (err, _("Corrupt file at 0x%llx: Expected %"PRIx32"; got %"PRIx32), (long long int) ftello (f) - sizeof (uint32_t), expected, magic); return false; } return true; } /* Reads upto BYTES bytes from ZM and puts them in BUF. Returns the number of bytes read, or -1 on error */ int zip_member_read (struct zip_member *zm, void *buf, size_t bytes) { int bytes_read = 0; ds_clear (zm->errmsgs); if ( bytes > zm->bytes_unread) bytes = zm->bytes_unread; bytes_read = decompressors[zm->compression].read (zm, buf, bytes); if ( bytes_read < 0) return bytes_read; zm->crc = crc32_update (zm->crc, buf, bytes_read); zm->bytes_unread -= bytes_read; return bytes_read; } /* Read a local file header from ZR and add it to ZR's internal array. Returns a pointer to the member read. This pointer belongs to ZR. If the caller wishes to control it, she should ref it with zip_member_ref. */ static struct zip_member * zip_header_read_next (struct zip_reader *zr) { struct zip_member *zm = xzalloc (sizeof *zm); uint16_t v, nlen, extralen; uint16_t gp, time, date; uint16_t clen, diskstart, iattr; uint32_t eattr; uint16_t comp_type; ds_clear (zr->errs); zm->errmsgs = zr->errs; if ( ! check_magic (zr->fr, MAGIC_SOCD, zr->errs)) return NULL; if (! get_u16 (zr->fr, &v)) return NULL; if (! get_u16 (zr->fr, &v)) return NULL; if (! get_u16 (zr->fr, &gp)) return NULL; if (! get_u16 (zr->fr, &comp_type)) return NULL; zm->compression = comp_code (zm, comp_type); if (! get_u16 (zr->fr, &time)) return NULL; if (! get_u16 (zr->fr, &date)) return NULL; if (! get_u32 (zr->fr, &zm->expected_crc)) return NULL; if (! get_u32 (zr->fr, &zm->comp_size)) return NULL; if (! get_u32 (zr->fr, &zm->ucomp_size)) return NULL; if (! get_u16 (zr->fr, &nlen)) return NULL; if (! get_u16 (zr->fr, &extralen)) return NULL; if (! get_u16 (zr->fr, &clen)) return NULL; if (! get_u16 (zr->fr, &diskstart)) return NULL; if (! get_u16 (zr->fr, &iattr)) return NULL; if (! get_u32 (zr->fr, &eattr)) return NULL; if (! get_u32 (zr->fr, &zm->offset)) return NULL; zm->name = xzalloc (nlen + 1); if (! get_bytes (zr->fr, zm->name, nlen)) return NULL; skip_bytes (zr->fr, extralen); zr->members[zr->nm++] = zm; zm->fp = fopen (zr->filename, "rb"); zm->ref_cnt = 1; return zm; } /* Create a reader from the zip called FILENAME */ struct zip_reader * zip_reader_create (const char *filename, struct string *errs) { uint16_t disknum, total_members; off_t offset = 0; uint32_t central_dir_start, central_dir_length; struct zip_reader *zr = xzalloc (sizeof *zr); zr->errs = errs; if ( zr->errs) ds_init_empty (zr->errs); zr->nm = 0; zr->fr = fopen (filename, "rb"); if (NULL == zr->fr) { ds_put_cstr (zr->errs, strerror (errno)); free (zr); return NULL; } if ( ! check_magic (zr->fr, MAGIC_LHDR, zr->errs)) { fclose (zr->fr); free (zr); return NULL; } if ( ! find_eocd (zr->fr, &offset)) { ds_put_format (zr->errs, _("Cannot find central directory")); fclose (zr->fr); free (zr); return NULL; } if ( 0 != fseeko (zr->fr, offset, SEEK_SET)) { const char *mm = strerror (errno); ds_put_format (zr->errs, _("Failed to seek to end of central directory record: %s"), mm); fclose (zr->fr); free (zr); return NULL; } if ( ! check_magic (zr->fr, MAGIC_EOCD, zr->errs)) { fclose (zr->fr); free (zr); return NULL; } if (! get_u16 (zr->fr, &disknum)) return NULL; if (! get_u16 (zr->fr, &disknum)) return NULL; if (! get_u16 (zr->fr, &zr->n_members)) return NULL; if (! get_u16 (zr->fr, &total_members)) return NULL; if (! get_u32 (zr->fr, ¢ral_dir_length)) return NULL; if (! get_u32 (zr->fr, ¢ral_dir_start)) return NULL; if ( 0 != fseeko (zr->fr, central_dir_start, SEEK_SET)) { const char *mm = strerror (errno); ds_put_format (zr->errs, _("Failed to seek to central directory: %s"), mm); fclose (zr->fr); free (zr); return NULL; } zr->members = xcalloc (zr->n_members, sizeof (*zr->members)); memset (zr->members, 0, zr->n_members * sizeof (*zr->members)); zr->filename = xstrdup (filename); return zr; } /* Return the member called MEMBER from the reader ZR */ struct zip_member * zip_member_open (struct zip_reader *zr, const char *member) { uint16_t v, nlen, extra_len; uint16_t gp, comp_type, time, date; uint32_t ucomp_size, comp_size; uint32_t crc; bool new_member = false; char *name = NULL; int i; struct zip_member *zm = NULL; if ( zr == NULL) return NULL; for (i = 0; i < zr->n_members; ++i) { zm = zr->members[i]; if (zm == NULL) { zm = zr->members[i] = zip_header_read_next (zr); new_member = true; } if (zm && 0 == strcmp (zm->name, member)) break; else zm = NULL; } if ( zm == NULL) return NULL; if ( 0 != fseeko (zm->fp, zm->offset, SEEK_SET)) { const char *mm = strerror (errno); ds_put_format (zm->errmsgs, _("Failed to seek to start of member `%s': %s"), zm->name, mm); return NULL; } if ( ! check_magic (zm->fp, MAGIC_LHDR, zr->errs)) { return NULL; } if (! get_u16 (zm->fp, &v)) return NULL; if (! get_u16 (zm->fp, &gp)) return NULL; if (! get_u16 (zm->fp, &comp_type)) return NULL; zm->compression = comp_code (zm, comp_type); if (! get_u16 (zm->fp, &time)) return NULL; if (! get_u16 (zm->fp, &date)) return NULL; if (! get_u32 (zm->fp, &crc)) return NULL; if (! get_u32 (zm->fp, &comp_size)) return NULL; if (! get_u32 (zm->fp, &ucomp_size)) return NULL; if (! get_u16 (zm->fp, &nlen)) return NULL; if (! get_u16 (zm->fp, &extra_len)) return NULL; name = xzalloc (nlen + 1); if (! get_bytes (zm->fp, name, nlen)) return NULL; skip_bytes (zm->fp, extra_len); if (strcmp (name, zm->name) != 0) { ds_put_format (zm->errmsgs, _("Name mismatch in zip archive. Central directory says `%s'; local file header says `%s'"), zm->name, name); free (name); free (zm); return NULL; } free (name); zm->bytes_unread = zm->ucomp_size; if ( !new_member) decompressors[zm->compression].finish (zm); if (!decompressors[zm->compression].init (zm) ) return NULL; return zm; } void zip_member_ref (struct zip_member *zm) { zm->ref_cnt++; } void zip_member_unref (struct zip_member *zm) { if ( zm == NULL) return; if (--zm->ref_cnt == 0) { decompressors[zm->compression].finish (zm); if (zm->fp) fclose (zm->fp); free (zm->name); free (zm); } } static bool probe_magic (FILE *fp, uint32_t magic, off_t start, off_t stop, off_t *off); /* Search for something that looks like the End Of Central Directory in FP. If found, the offset of the record will be placed in OFF. Returns true if found false otherwise. */ static bool find_eocd (FILE *fp, off_t *off) { off_t start, stop; const uint32_t magic = MAGIC_EOCD; bool found = false; /* The magic cannot be more than 22 bytes from the end of the file, because that is the minimum length of the EndOfCentralDirectory record. */ if ( 0 > fseeko (fp, -22, SEEK_END)) { return false; } start = ftello (fp); stop = start + sizeof (magic); do { found = probe_magic (fp, magic, start, stop, off); /* FIXME: For extra confidence lookup the directory start record here*/ if ( start == 0) break; stop = start + sizeof (magic); start >>= 1; } while (!found ); return found; } /* Search FP for MAGIC starting at START and reaching until STOP. Returns true iff MAGIC is found. False otherwise. OFF receives the location of the magic. */ static bool probe_magic (FILE *fp, uint32_t magic, off_t start, off_t stop, off_t *off) { int i; int state = 0; unsigned char seq[4]; unsigned char byte; if ( 0 > fseeko (fp, start, SEEK_SET)) { return -1; } for (i = 0; i < 4 ; ++i) { seq[i] = (magic >> i * 8) & 0xFF; } do { if (1 != fread (&byte, 1, 1, fp)) break; if ( byte == seq[state]) state++; else state = 0; if ( state == 4) { *off = ftello (fp) - 4; return true; } start++; if ( start >= stop) break; } while (!feof (fp)); return false; } pspp-1.0.1/src/libpspp/encoding-guesser.h0000644000175000017500000001346012470434665015305 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_ENCODING_GUESSER_H #define LIBPSPP_ENCODING_GUESSER_H 1 #include #include #include /* A library for autodetecting the encoding of a text file. Naming Encodings ---------------- The encoding guesser starts with an encoding name in one of various different forms. Some of the forms do not actually do any autodetection. The encoding guesser will return the specified encoding without looking at any file data: - A valid IANA or system encoding name: These are returned as-is. - "Locale": Translated to the encoding used by the system locale, as returned by locale_charset(). The remaining forms that do perform autodetection are: - "Auto," followed by a valid IANA or system encoding name (the "fallback encoding"): Requests detection whether the input is encoded in UTF-8, UTF-16, UTF-32, or a few other easily identifiable charsets. When a particular character set cannot be recognized, the guesser falls back to the encoding following the comma. When the fallback encoding is UTF-8, but the input is invalid UTF-8, then the windows-1252 encoding (closely related to ISO 8859-1) is used instead. UTF-8 detection works only for ASCII-compatible character sets. - NULL or "Auto": As above, with the encoding used by the system locale as the fallback encoding. The above are suggested capitalizations but encoding names are not case-sensitive. The encoding_guess_parse_encoding() and encoding_guess_encoding_is_auto() functions work with encoding names in these forms. Usage ----- 1. Call encoding_guess_head_encoding() with several bytes from the start of the text file. Feed in at least ENCODING_GUESS_MIN bytes, unless the file is shorter than that, but as many more as are conveniently available. ENCODING_GUESS_SUGGESTED is a reasonable amount. encoding_guess_head_encoding() returns its best guess at the file's encoding. Ordinarily it returns a final guess that the client can use to interpret the file, and you're all done. However, if it returns "ASCII" and the original encoding name requests autodetection (which you can find out by calling encoding_guess_encoding_is_auto()), then proceed to the next step. 2. The encoding guesser is confident that the stream uses an ASCII compatible encoding, either UTF-8 or the fallback encoding. The client may safely read and process the stream up to the first non-ASCII character. If the stream continues to be ASCII all the way to its end, then we're done. The encoding guesser provides a pair of functions to detect non-ASCII characters: encoding_guess_is_ascii_text() for single characters and encoding_guess_count_ascii() as a convenient wrapper for whole buffers. 3. Otherwise, the stream contains some non-ASCII data at some point. Now the client should gather several bytes starting at this point, at least ENCODING_GUESS_MIN, unless the file ends before that, but as many more as are conveniently available. ENCODING_GUESS_SUGGESTED is a reasonable amount. The client should pass these bytes to encoding_guess_tail_encoding(), which returns a best and final guess at the file's encoding, which is either UTF-8 or the fallback encoding. Another alternative is encoding_guess_tail_is_utf8(), which guesses the same way but has a different form of return value. */ /* Minimum number of bytes for use in autodetection. You should only pass fewer bytes to the autodetection routines if the file is actually shorter than this. */ #define ENCODING_GUESS_MIN 16 /* Suggested minimum buffer size to use for autodetection. */ #define ENCODING_GUESS_SUGGESTED 1024 /* Parsing encoding names. */ const char *encoding_guess_parse_encoding (const char *encoding); bool encoding_guess_encoding_is_auto (const char *encoding); /* Making an initial coding guess based on the start of a file. */ const char *encoding_guess_head_encoding (const char *encoding, const void *, size_t); size_t encoding_guess_bom_length (const char *encoding, const void *, size_t n); /* Refining an initial ASCII coding guess using later non-ASCII bytes. */ static inline bool encoding_guess_is_ascii_text (uint8_t c); size_t encoding_guess_count_ascii (const void *, size_t); int encoding_guess_tail_is_utf8 (const void *, size_t); const char *encoding_guess_tail_encoding (const char *encoding, const void *, size_t); /* Guessing from entire file contents. */ const char *encoding_guess_whole_file (const char *encoding, const void *, size_t); /* Returns true if C is a byte that might appear in an ASCII text file, false otherwise. */ static inline bool encoding_guess_is_ascii_text (uint8_t c) { return (c >= 0x20 && c < 0x7f) || (c >= 0x09 && c < 0x0e); } #endif /* libpspp/encoding-guesser.h */ pspp-1.0.1/src/libpspp/intern.h0000644000175000017500000000304012476227410013326 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_INTERN_H #define LIBPSPP_INTERN_H 1 /* Interned strings. An "interned" string is stored in a global hash table. Only one copy of any given string is kept in the hash table, which reduces memory usage in cases where there might otherwise be many duplicates of a given string. Interned strings can be compared for equality by comparing pointers, which can also be a significant advantage in some cases. Interned strings are immutable. See http://en.wikipedia.org/wiki/String_interning for more information. */ #include #include const char *intern_new (const char *); const char *intern_ref (const char *); void intern_unref (const char *); size_t intern_strlen (const char *); bool is_interned_string (const char *); #endif /* libpspp/intern.h */ pspp-1.0.1/src/libpspp/temp-file.c0000644000175000017500000000556613137223525013721 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Functions for temporary files that honor $TMPDIR. */ #include #include "libpspp/temp-file.h" #include "libpspp/hmapx.h" #include "libpspp/hash-functions.h" #include #include "gl/clean-temp.h" #include "gl/xvasprintf.h" /* Creates and returns a new temporary file that will be removed automatically when the process exits. The file is opened in mode "wb+". To close the file before the process exits, use close_temp_file() to ensure that it gets deleted early. Returns NULL if creating the temporary file fails. This is similar to tmpfile(), except: - It honors the $TMPDIR environment variable. */ static void cleanup (void); static struct temp_dir *temp_dir; struct hmapx map; static void setup (void) { hmapx_init (&map); temp_dir = create_temp_dir ("pspp", NULL, true); } static void initialise (void) { if (temp_dir == NULL) { setup (); if (temp_dir == NULL) return ; atexit (cleanup); } } const char * temp_dir_name (void) { initialise (); if (temp_dir) return temp_dir->dir_name; return NULL; } static void cleanup (void) { struct hmapx_node *node; char *fn; cleanup_temp_dir (temp_dir); HMAPX_FOR_EACH (fn, node, &map) { free (fn); } hmapx_destroy (&map); } FILE * create_temp_file (void) { static int idx = 0; char *file_name; FILE *stream; initialise (); if (temp_dir == NULL) return NULL; file_name = xasprintf ("%s/%d", temp_dir->dir_name, idx++); register_temp_file (temp_dir, file_name); stream = fopen_temp (file_name, "wb+"); if (stream == NULL) unregister_temp_file (temp_dir, file_name); else setvbuf (stream, NULL, _IOFBF, 65536); hmapx_insert (&map, file_name, hash_pointer (stream, 0)); return stream; } /* Closes and removes a temporary file created by create_temp_file(). */ void close_temp_file (FILE *file) { if (file != NULL) { struct hmapx_node *node = hmapx_first_with_hash (&map, hash_pointer (file, 0)); char *fn = node->data; fclose_temp (file); cleanup_temp_file (temp_dir, fn); hmapx_delete (&map, node); free (fn); } } pspp-1.0.1/src/libpspp/ext-array.h0000644000175000017500000000243112470242642013744 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* An interface to an array of octets that is stored on disk as a temporary file. */ #ifndef LIBPSPP_EXT_ARRAY_H #define LIBPSPP_EXT_ARRAY_H 1 #include #include struct ext_array *ext_array_create (void); bool ext_array_destroy (struct ext_array *); bool ext_array_read (const struct ext_array *, off_t offset, size_t n, void *); bool ext_array_write (struct ext_array *, off_t offset, size_t n, const void *); bool ext_array_error (const struct ext_array *); #endif /* libpspp/ext-array.h */ pspp-1.0.1/src/libpspp/automake.mk0000644000175000017500000001207713143642441014024 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- noinst_LTLIBRARIES += src/libpspp/liblibpspp.la src_libpspp_liblibpspp_la_SOURCES = \ src/libpspp/abt.c \ src/libpspp/abt.h \ src/libpspp/argv-parser.c \ src/libpspp/argv-parser.h \ src/libpspp/array.c \ src/libpspp/array.h \ src/libpspp/assertion.h \ src/libpspp/bit-vector.h \ src/libpspp/bt.c \ src/libpspp/bt.h \ src/libpspp/cast.h \ src/libpspp/cmac-aes256.c \ src/libpspp/cmac-aes256.h \ src/libpspp/compiler.h \ src/libpspp/copyleft.c \ src/libpspp/copyleft.h \ src/libpspp/deque.c \ src/libpspp/deque.h \ src/libpspp/encoding-guesser.c \ src/libpspp/encoding-guesser.h \ src/libpspp/ext-array.c \ src/libpspp/ext-array.h \ src/libpspp/float-format.c \ src/libpspp/float-format.h \ src/libpspp/freaderror.c \ src/libpspp/freaderror.h \ src/libpspp/hash-functions.c \ src/libpspp/hash-functions.h \ src/libpspp/inflate.c \ src/libpspp/inflate.h \ src/libpspp/heap.c \ src/libpspp/heap.h \ src/libpspp/hmap.c \ src/libpspp/hmap.h \ src/libpspp/hmapx.c \ src/libpspp/hmapx.h \ src/libpspp/i18n.c \ src/libpspp/i18n.h \ src/libpspp/integer-format.c \ src/libpspp/integer-format.h \ src/libpspp/intern.c \ src/libpspp/intern.h \ src/libpspp/line-reader.c \ src/libpspp/line-reader.h \ src/libpspp/ll.c \ src/libpspp/ll.h \ src/libpspp/llx.c \ src/libpspp/llx.h \ src/libpspp/message.c \ src/libpspp/message.h \ src/libpspp/misc.c \ src/libpspp/misc.h \ src/libpspp/model-checker.c \ src/libpspp/model-checker.h \ src/libpspp/pool.c \ src/libpspp/pool.h \ src/libpspp/prompt.c \ src/libpspp/prompt.h \ src/libpspp/range-map.c \ src/libpspp/range-map.h \ src/libpspp/range-set.c \ src/libpspp/range-set.h \ src/libpspp/range-tower.c \ src/libpspp/range-tower.h \ src/libpspp/sparse-array.c \ src/libpspp/sparse-array.h \ src/libpspp/sparse-xarray.c \ src/libpspp/sparse-xarray.h \ src/libpspp/start-date.c \ src/libpspp/start-date.h \ src/libpspp/string-array.c \ src/libpspp/string-array.h \ src/libpspp/string-map.c \ src/libpspp/string-map.h \ src/libpspp/string-set.c \ src/libpspp/string-set.h \ src/libpspp/stringi-map.c \ src/libpspp/stringi-map.h \ src/libpspp/stringi-set.c \ src/libpspp/stringi-set.h \ src/libpspp/str.c \ src/libpspp/str.h \ src/libpspp/taint.c \ src/libpspp/taint.h \ src/libpspp/temp-file.c \ src/libpspp/temp-file.h \ src/libpspp/tower.c \ src/libpspp/tower.h \ src/libpspp/u8-istream.c \ src/libpspp/u8-istream.h \ src/libpspp/u8-line.c \ src/libpspp/u8-line.h \ src/libpspp/version.h \ src/libpspp/zip-private.h \ src/libpspp/zip-reader.c \ src/libpspp/zip-reader.h \ src/libpspp/zip-writer.c \ src/libpspp/zip-writer.h DISTCLEANFILES+=src/libpspp/version.c src_libpspp_liblibpspp_la_CPPFLAGS = \ -I $(top_srcdir)/src/libpspp \ $(AM_CPPFLAGS) nodist_src_libpspp_liblibpspp_la_SOURCES = src/libpspp/version.c src/libpspp/version.c: $(top_srcdir)/AUTHORS Makefile @$(MKDIR_P) src/libpspp $(AM_V_GEN)echo "/* -*- mode: c; buffer-read-only: t -*-" > $@,tmp $(AM_V_at)echo " Generated by src/libpspp/automake.mk --- Do not edit.">> $@,tmp $(AM_V_at)echo "" >> $@,tmp $(AM_V_at)echo " The following line is for the benefit of the perl module" >>$@,tmp $(AM_V_at)echo "\$$VERSION='$(VERSION_FOR_PERL)';" >> $@,tmp $(AM_V_at)echo "*/" >> $@,tmp $(AM_V_at)echo "#include \"version.h\"" >> $@,tmp $(AM_V_at)echo "const char bare_version[] = \"$(VERSION)\";" >> $@,tmp $(AM_V_at)echo "const char version[] = \"GNU $(PACKAGE) $(VERSION)\";" >> $@,tmp $(AM_V_at)printf "const char announced_version[] = \"GNU $(PACKAGE) $(VERSION)\"" >> $@,tmp @case `echo $(VERSION) | $(SED) -e 's/[0-9][0-9]*\.[0-9]*\([0-9]\)\.[0-9][0-9]*/\1/'` in \ [13579]) printf "\"\\\nThis is an unreleased test version. It is not recommended for production use. Use at your own risk\"" >> $@,tmp \ ;;\ esac $(AM_V_at)printf ";\n" >> $@,tmp $(AM_V_at)echo "const char host_system[] = \"$(host_triplet)\";" >> $@,tmp $(AM_V_at)echo "const char build_system[] = \"$(build_triplet)\";" >> $@,tmp $(AM_V_at)echo "const char locale_dir[] = \"$(datadir)/locale\";" >> $@,tmp $(AM_V_at)echo "const char examples_dir[] = \"$(examplesdir)\";" >> $@,tmp $(AM_V_at)echo "const char *const authors[] = {" >> $@,tmp $(AM_V_at)$(SED) -e 's/^/ \"/' -e 's/$$/\",/' $(top_srcdir)/AUTHORS >> $@,tmp $(AM_V_at)echo "0 };" >> $@,tmp $(AM_V_at)mv $@,tmp $@ pspp-1.0.1/src/libpspp/prompt.h0000644000175000017500000000232712470243700013351 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef PROMPT_H #define PROMPT_H 1 enum prompt_style { PROMPT_FIRST, /* First line of command. */ PROMPT_LATER, /* Second or later line of command. */ PROMPT_DATA, /* Between BEGIN DATA and END DATA. */ PROMPT_COMMENT, /* COMMENT or * command. */ PROMPT_DOCUMENT, /* DOCUMENT command. */ PROMPT_DO_REPEAT /* DO REPEAT command. */ }; const char *prompt_style_to_string (enum prompt_style); #endif /* prompt.h */ pspp-1.0.1/src/libpspp/string-set.h0000644000175000017500000001330112470243700014121 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LIBPSPP_STRING_SET_H #define LIBPSPP_STRING_SET_H /* Set of unique strings. This is a convenient wrapper around a "struct hmap" for storing strings. */ #include #include "libpspp/hmap.h" /* A node in the string set. */ struct string_set_node { struct hmap_node hmap_node; char *string; }; /* Returns the string within NODE. The caller must not modify or free the returned string. */ static inline const char * string_set_node_get_string (const struct string_set_node *node) { return node->string; } /* An unordered set of unique strings. */ struct string_set { struct hmap hmap; }; /* Suitable for use as the initializer for a string_set named SET. Typical usage: struct string_set set = STRING_SET_INITIALIZER (set); STRING_SET_INITIALIZER is an alternative to calling string_set_init. */ #define STRING_SET_INITIALIZER(SET) { HMAP_INITIALIZER ((SET).hmap) } void string_set_init (struct string_set *); void string_set_clone (struct string_set *, const struct string_set *); void string_set_swap (struct string_set *, struct string_set *); void string_set_destroy (struct string_set *); static inline size_t string_set_count (const struct string_set *); static inline bool string_set_is_empty (const struct string_set *); bool string_set_contains (const struct string_set *, const char *); struct string_set_node *string_set_find_node (const struct string_set *, const char *); bool string_set_insert (struct string_set *, const char *); bool string_set_insert_nocopy (struct string_set *, char *); bool string_set_delete (struct string_set *, const char *); void string_set_delete_node (struct string_set *, struct string_set_node *); char *string_set_delete_nofree (struct string_set *, struct string_set_node *); void string_set_clear (struct string_set *); void string_set_union (struct string_set *, const struct string_set *); void string_set_union_and_intersection (struct string_set *, struct string_set *); void string_set_intersect (struct string_set *, const struct string_set *); void string_set_subtract (struct string_set *, const struct string_set *); static inline const struct string_set_node *string_set_first ( const struct string_set *); static inline const struct string_set_node *string_set_next ( const struct string_set *, const struct string_set_node *); /* Macros for conveniently iterating through a string_set, e.g. to print all of the strings in "my_set": struct string_set_node *node; const char *string; STRING_SET_FOR_EACH (string, node, &my_set) puts (string); */ #define STRING_SET_FOR_EACH(STRING, NODE, SET) \ for ((NODE) = string_set_first (SET); \ ((NODE) != NULL \ ? ((STRING) = string_set_node_get_string (NODE), \ 1) \ : 0); \ (NODE) = string_set_next (SET, NODE)) #define STRING_SET_FOR_EACH_SAFE(STRING, NODE, NEXT, SET) \ for ((NODE) = string_set_first (SET); \ ((NODE) != NULL \ ? ((STRING) = string_set_node_get_string (NODE), \ (NEXT) = string_set_next (SET, NODE), \ 1) \ : 0); \ (NODE) = (NEXT)) /* Returns the number of strings currently in SET. */ static inline size_t string_set_count (const struct string_set *set) { return hmap_count (&set->hmap); } /* Returns true if SET currently contains no strings, false otherwise. */ static inline bool string_set_is_empty (const struct string_set *set) { return hmap_is_empty (&set->hmap); } /* Returns the first node in SET, or a null pointer if SET is empty. See the hmap_first function for information about complexity (O(1) amortized) and ordering (arbitrary). The STRING_SET_FOR_EACH and STRING_SET_FOR_EACH_SAFE macros provide convenient ways to iterate over all the nodes in a string set. */ static inline const struct string_set_node * string_set_first (const struct string_set *set) { return HMAP_FIRST (struct string_set_node, hmap_node, &set->hmap); } /* Returns the next node in SET following NODE, or a null pointer if NODE is the last node in SET. See the hmap_next function for information about complexity (O(1) amortized) and ordering (arbitrary). The STRING_SET_FOR_EACH and STRING_SET_FOR_EACH_SAFE macros provide convenient ways to iterate over all the nodes in a string set. */ static inline const struct string_set_node * string_set_next (const struct string_set *set, const struct string_set_node *node) { return HMAP_NEXT (node, struct string_set_node, hmap_node, &set->hmap); } #endif /* libpspp/string-set.h */ pspp-1.0.1/src/libpspp/hmap.h0000644000175000017500000005732113137223525012765 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Hash table with separate chaining. This header (hmap.h) supplies an "embedded" implementation of a hash table that uses linked lists to resolve collisions ("separate chaining"). Its companion header (hmapx.h) supplies a "external" implementation that is otherwise similar. The two variants are described briefly here. The embedded variant, for which this is the header, is described in slightly more detail below. Each function also has a detailed usage comment at its point of definition. (Many of those definitions are inline in this file, because they are so simple. Others are in hmap.c.) The "hmap" embedded hash table implementation puts the hash table node (which includes the linked list used for resolving collisions) within the data structure that the hash table contains. This makes allocation efficient, in space and time, because no additional call into an allocator is needed to obtain memory for the hash table node. It also makes it easy to find the hash table node associated with a given object. However, it's difficult to include a given object in an arbitrary number of hash tables. The "hmapx" external hash table implementation allocates hash table nodes separately from the objects in the hash table. Inserting and removing hash table elements requires dynamic allocation, so it is normally slower and takes more memory than the embedded implementation. It also requires searching the table to find the node associated with a given object. However, it's easy to include a given object in an arbitrary number of hash tables. It's also possible to create an external hash table without adding a member to the data structure that the hash table contains. */ #ifndef LIBPSPP_HMAP_H #define LIBPSPP_HMAP_H 1 /* Embedded hash table with separate chaining. To create an embedded hash table, declare an instance of struct hmap, then initialize it with hmap_init(): struct hmap map; hmap_init (&map); or, alternatively: struct hmap map = HMAP_INITIALIZER (map); Each node in the hash table, presumably a structure type, must include a struct hmap_node member. Here's an example: struct foo { struct hmap_node node; // hmap_node member. const char *string; // Another member. }; The hash table functions work with pointers to struct hmap_node. To obtain a pointer to your structure type given a pointer to struct hmap_node, use the HMAP_DATA macro. Inserting and deleting elements is straightforward. Use hmap_insert() to insert an element and hmap_delete() to delete an element, e.g.: struct foo my_foo; my_foo.string = "My string"; hmap_insert (&map, &my_foo.node, hsh_hash_string (my_foo.string)); ... hmap_delete (&map, &my_foo.node); You must pass the element's hash value as one of hmap_insert()'s arguments. The hash table saves this hash value for use later to speed searches and to rehash as the hash table grows. hmap_insert() does not check whether the newly inserted element duplicates an element already in the hash table. The client is responsible for doing so, if this is desirable. The hash table does not provide a direct way to search for an existing element. Instead, it provides the means to iterate over all the elements in the hash table with a given hash value. It is easy to compose a search function from such a building block. For example: const struct foo * find_foo (const struct hmap *map, const char *name) { const struct foo *foo; size_t hash; hash = hsh_hash_string (name); HMAP_FOR_EACH_WITH_HASH (foo, struct foo, node, hash, map) if (!strcmp (foo->name, name)) break; return foo; } Here is how to iterate through the elements currently in the hash table: struct foo *foo; HMAP_FOR_EACH (foo, struct foo, node, &map) { ...do something with foo... } */ #include #include #include "libpspp/cast.h" /* Returns the data structure corresponding to the given NODE, assuming that NODE is embedded as the given MEMBER name in data type STRUCT. NODE must not be a null pointer. */ #define HMAP_DATA(NODE, STRUCT, MEMBER) \ (CHECK_POINTER_HAS_TYPE (NODE, struct hmap_node *), \ UP_CAST (NODE, STRUCT, MEMBER)) /* Like HMAP_DATA, except that a null NODE yields a null pointer result. */ #define HMAP_NULLABLE_DATA(NODE, STRUCT, MEMBER) \ hmap_nullable_data__ (NODE, offsetof (STRUCT, MEMBER)) /* Hash table node. */ struct hmap_node { struct hmap_node *next; /* Next in chain. */ size_t hash; /* Hash value. */ }; static inline size_t hmap_node_hash (const struct hmap_node *); /* Hash table. */ struct hmap { size_t count; /* Number of inserted nodes. */ size_t mask; /* Number of buckets (power of 2), minus 1. */ struct hmap_node **buckets; /* Array of buckets. */ struct hmap_node *one; /* One bucket, to eliminate corner cases. */ }; /* Suitable for use as the initializer for a struct hmap named MAP. Typical usage: struct hmap map = HMAP_INITIALIZER (map); HMAP_INITIALIZER() is an alternative to hmap_init(). */ #define HMAP_INITIALIZER(MAP) { 0, 0, &(MAP).one, NULL } /* Creation and destruction. */ void hmap_init (struct hmap *); void hmap_swap (struct hmap *, struct hmap *); void hmap_clear (struct hmap *); void hmap_destroy (struct hmap *); /* Storage management. */ void hmap_reserve (struct hmap *, size_t capacity); void hmap_shrink (struct hmap *); /* Search. Refer to the large comment near the top of this file for an example.*/ static inline struct hmap_node *hmap_first_with_hash (const struct hmap *, size_t hash); static inline struct hmap_node *hmap_next_with_hash (const struct hmap_node *); /* Insertion and deletion. */ static inline void hmap_insert (struct hmap *, struct hmap_node *, size_t hash); static inline void hmap_insert_fast (struct hmap *, struct hmap_node *, size_t hash); static inline void hmap_delete (struct hmap *, struct hmap_node *); /* Iteration. */ static inline struct hmap_node *hmap_first (const struct hmap *); static inline struct hmap_node *hmap_next (const struct hmap *, const struct hmap_node *); /* Counting. */ static bool hmap_is_empty (const struct hmap *); static inline size_t hmap_count (const struct hmap *); static inline size_t hmap_capacity (const struct hmap *); /* Updating data elements. */ void hmap_changed (struct hmap *, struct hmap_node *, size_t new_hash); void hmap_moved (struct hmap *, struct hmap_node *, const struct hmap_node *old); /* Convenience macros for search. These macros automatically use HMAP_DATA to obtain the data elements that encapsulate hmap nodes, which often saves typing and can make code easier to read. Refer to the large comment near the top of this file for an example. These macros evaluate HASH only once. They evaluate their other arguments many times. */ #define HMAP_FIRST_WITH_HASH(STRUCT, MEMBER, HMAP, HASH) \ HMAP_NULLABLE_DATA (hmap_first_with_hash (HMAP, HASH), STRUCT, MEMBER) #define HMAP_NEXT_WITH_HASH(DATA, STRUCT, MEMBER) \ HMAP_NULLABLE_DATA (hmap_next_with_hash (&(DATA)->MEMBER), STRUCT, MEMBER) #define HMAP_FOR_EACH_WITH_HASH(DATA, STRUCT, MEMBER, HASH, HMAP) \ for ((DATA) = HMAP_FIRST_WITH_HASH (STRUCT, MEMBER, HMAP, HASH); \ (DATA) != NULL; \ (DATA) = HMAP_NEXT_WITH_HASH (DATA, STRUCT, MEMBER)) #define HMAP_FOR_EACH_WITH_HASH_SAFE(DATA, NEXT, STRUCT, MEMBER, HASH, HMAP) \ for ((DATA) = HMAP_FIRST_WITH_HASH (STRUCT, MEMBER, HMAP, HASH); \ ((DATA) != NULL \ ? ((NEXT) = HMAP_NEXT_WITH_HASH (DATA, STRUCT, MEMBER), 1) \ : 0); \ (DATA) = (NEXT)) /* These macros are like the *_WITH_HASH macros above, except that they don't skip data elements that are in the same hash bucket but have different hash values. This is a small optimization in code where comparing keys is just as fast as comparing hashes (e.g. the key is an "int") or comparing keys would duplicate comparing the hashes (e.g. the hash is the first word of a multi-word random key). These macros evaluate HASH only once. They evaluate their other arguments many times. */ #define HMAP_FIRST_IN_BUCKET(STRUCT, MEMBER, HMAP, HASH) \ HMAP_NULLABLE_DATA (hmap_first_in_bucket (HMAP, HASH), STRUCT, MEMBER) #define HMAP_NEXT_IN_BUCKET(DATA, STRUCT, MEMBER) \ HMAP_NULLABLE_DATA (hmap_next_in_bucket (&(DATA)->MEMBER), STRUCT, MEMBER) #define HMAP_FOR_EACH_IN_BUCKET(DATA, STRUCT, MEMBER, HASH, HMAP) \ for ((DATA) = HMAP_FIRST_IN_BUCKET (STRUCT, MEMBER, HMAP, HASH); \ (DATA) != NULL; \ (DATA) = HMAP_NEXT_IN_BUCKET (DATA, STRUCT, MEMBER)) #define HMAP_FOR_EACH_IN_BUCKET_SAFE(DATA, NEXT, STRUCT, MEMBER, HASH, HMAP) \ for ((DATA) = HMAP_FIRST_IN_BUCKET (STRUCT, MEMBER, HMAP, HASH); \ ((DATA) != NULL \ ? ((NEXT) = HMAP_NEXT_IN_BUCKET (DATA, STRUCT, MEMBER), 1) \ : 0); \ (DATA) = (NEXT)) /* Convenience macros for iteration. These macros automatically use HMAP_DATA to obtain the data elements that encapsulate hmap nodes, which often saves typing and can make code easier to read. Refer to the large comment near the top of this file for an example. These macros evaluate their arguments many times. */ #define HMAP_FIRST(STRUCT, MEMBER, HMAP) \ HMAP_NULLABLE_DATA (hmap_first (HMAP), STRUCT, MEMBER) #define HMAP_NEXT(DATA, STRUCT, MEMBER, HMAP) \ HMAP_NULLABLE_DATA (hmap_next (HMAP, &(DATA)->MEMBER), STRUCT, MEMBER) #define HMAP_FOR_EACH(DATA, STRUCT, MEMBER, HMAP) \ for ((DATA) = HMAP_FIRST (STRUCT, MEMBER, HMAP); \ (DATA) != NULL; \ (DATA) = HMAP_NEXT (DATA, STRUCT, MEMBER, HMAP)) #define HMAP_FOR_EACH_SAFE(DATA, NEXT, STRUCT, MEMBER, HMAP) \ for ((DATA) = HMAP_FIRST (STRUCT, MEMBER, HMAP); \ ((DATA) != NULL \ ? ((NEXT) = HMAP_NEXT (DATA, STRUCT, MEMBER, HMAP), 1) \ : 0); \ (DATA) = (NEXT)) /* Inline definitions. */ static inline struct hmap_node *hmap_find_hash__ (struct hmap_node *, size_t); static inline struct hmap_node *hmap_first_nonempty_bucket__ ( const struct hmap *, size_t start); static inline size_t hmap_mask_to_capacity__ (size_t mask); /* Returns the hash value associated with NODE. */ static inline size_t hmap_node_hash (const struct hmap_node *node) { return node->hash; } /* Returns the first node in MAP that has hash value HASH, or a null pointer if MAP does not contain any node with that hash value. Assuming uniform hashing and no duplicate data items in MAP, this function runs in constant time. (Amortized over an iteration over all data items with a given HASH, its runtime is proportional to the length of the hash chain for HASH, so given a pathological hash function, e.g. one that returns a constant value, its runtime degenerates to linear in the length of NODE's hash chain.) Nodes are returned in arbitrary order that may change whenever the hash table's current capacity changes, as reported by hmap_capacity(). Calls to hmap_insert(), hmap_reserve(), and hmap_shrink() can change the capacity of a hash map. Inserting a node with hmap_insert_fast() or deleting one with hmap_delete() will not change the relative ordering of nodes. The HMAP_FOR_EACH_WITH_HASH and HMAP_FOR_EACH_WITH_HASH_SAFE macros provide convenient ways to iterate over all the nodes with a given hash. The HMAP_FIRST_WITH_HASH macro is an interface to this particular function that is often more convenient. */ static inline struct hmap_node * hmap_first_with_hash (const struct hmap *map, size_t hash) { return hmap_find_hash__ (map->buckets[hash & map->mask], hash); } /* Returns the next node in MAP after NODE that has the same hash value as NODE, or a null pointer if MAP does not contain any more nodes with that hash value. Assuming uniform hashing and no duplicate data items in MAP, this function runs in constant time. (Amortized over an iteration over all data items with a given HASH, its runtime is proportional to the length of the hash chain for HASH, so given a pathological hash function, e.g. one that returns a constant value, its runtime degenerates to linear in the length of NODE's hash chain.) Nodes are returned in arbitrary order that may change whenever the hash table's current capacity changes, as reported by hmap_capacity(). Calls to hmap_insert(), hmap_reserve(), and hmap_shrink() can change the capacity of a hash map. Inserting a node with hmap_insert_fast() or deleting one with hmap_delete() will not change the relative ordering of nodes. The HMAP_FOR_EACH_WITH_HASH and HMAP_FOR_EACH_WITH_HASH_SAFE macros provide convenient ways to iterate over all the nodes with a given hash. The HMAP_NEXT_WITH_HASH macro is an interface to this particular function that is often more convenient. */ static inline struct hmap_node * hmap_next_with_hash (const struct hmap_node *node) { return hmap_find_hash__ (node->next, node->hash); } /* Inserts NODE into MAP with hash value HASH. If the insertion causes MAP's current capacity, as reported by hmap_capacity(), to be exceeded, rehashes MAP with an increased number of hash buckets. This function runs in constant time amortized over all the insertions into MAP. This function does not verify that MAP does not already contain a data item with the same value as NODE. If duplicates should be disallowed (which is the usual case), then the client must check for duplicates itself before inserting the new node. */ static inline void hmap_insert (struct hmap *map, struct hmap_node *node, size_t hash) { hmap_insert_fast (map, node, hash); if (map->count > hmap_capacity (map)) hmap_reserve (map, map->count); } /* Inserts NODE into MAP with hash value HASH. Does not check whether this causes MAP's current capacity to be exceeded. The caller must take responsibility for that (or use hmap_insert() instead). This function runs in constant time. This function does not verify that MAP does not already contain a data item with the same value as NODE. If duplicates should be disallowed (which is the usual case), then the client must check for duplicates itself before inserting the new node. */ static inline void hmap_insert_fast (struct hmap *map, struct hmap_node *node, size_t hash) { struct hmap_node **bucket = &map->buckets[hash & map->mask]; node->hash = hash; node->next = *bucket; *bucket = node; map->count++; } /* Returns the first node in MAP in the bucket for HASH, or a null pointer if that bucket in HASH is empty. This function runs in constant time. Nodes are returned in arbitrary order that may change whenever the hash table's current capacity changes, as reported by hmap_capacity(). Calls to hmap_insert(), hmap_reserve(), and hmap_shrink() can change the capacity of a hash map. Inserting a node with hmap_insert_fast() or deleting one with hmap_delete() will not change the relative ordering of nodes. The HMAP_FOR_EACH_IN_BUCKET and HMAP_FOR_EACH_IN_BUCKET_SAFE macros provide convenient ways to iterate over all the nodes with a given hash. The HMAP_FIRST_IN_BUCKET macro is an interface to this particular function that is often more convenient. */ static inline struct hmap_node * hmap_first_in_bucket (const struct hmap *map, size_t hash) { return map->buckets[hash & map->mask]; } /* Returns the next node following NODE within the same bucket, or a null pointer if NODE is the last node in its bucket. This function runs in constant time. Nodes are returned in arbitrary order that may change whenever the hash table's current capacity changes, as reported by hmap_capacity(). Calls to hmap_insert(), hmap_reserve(), and hmap_shrink() can change the capacity of a hash map. Inserting a node with hmap_insert_fast() or deleting one with hmap_delete() will not change the relative ordering of nodes. The HMAP_FOR_EACH_IN_BUCKET and HMAP_FOR_EACH_IN_BUCKET_SAFE macros provide convenient ways to iterate over all the nodes with a given hash. The HMAP_NEXT_IN_BUCKET macro is an interface to this particular function that is often more convenient. */ static inline struct hmap_node * hmap_next_in_bucket (const struct hmap_node *node) { return node->next; } /* Removes NODE from MAP. The client is responsible for freeing any data associated with NODE, if necessary. Assuming uniform hashing, this function runs in constant time. (Its runtime is proportional to the position of NODE in its hash chain, so given a pathological hash function, e.g. one that returns a constant value, its runtime degenerates to linear in the length of NODE's hash chain.) This function never reduces the number of buckets in MAP. When one deletes a large number of nodes from a hash table, calling hmap_shrink() afterward may therefore save a small amount of memory. It is also more expensive to iterate through a very sparse hash table than a denser one, so shrinking the hash table could also save some time. However, rehashing has an immediate cost that must be weighed against these benefits. hmap_delete() does not change NODE's hash value reported by hmap_node_hash(). */ static inline void hmap_delete (struct hmap *map, struct hmap_node *node) { struct hmap_node **bucket = &map->buckets[node->hash & map->mask]; while (*bucket != node) bucket = &(*bucket)->next; *bucket = (*bucket)->next; map->count--; } /* Returns the first node in MAP, or a null pointer if MAP is empty. Amortized over iterating through every data element in MAP, this function runs in constant time. However, this assumes that MAP is not excessively sparse, that is, that hmap_capacity(MAP) is at most a constant factor greater than hmap_count(MAP). This will always be true unless many nodes have been inserted into MAP and then most or all of them deleted; in such a case, calling hmap_shrink() is advised. Nodes are returned in arbitrary order that may change whenever the hash table's current capacity changes, as reported by hmap_capacity(). Calls to hmap_insert(), hmap_reserve(), and hmap_shrink() can change the capacity of a hash map. Inserting a node with hmap_insert_fast() or deleting one with hmap_delete() will not change the relative ordering of nodes. The HMAP_FOR_EACH and HMAP_FOR_EACH_SAFE macros provide convenient ways to iterate over all the nodes in a hash map. The HMAP_FIRST macro is an interface to this particular function that is often more convenient. */ static inline struct hmap_node * hmap_first (const struct hmap *map) { return hmap_first_nonempty_bucket__ (map, 0); } /* Returns the next node in MAP following NODE, or a null pointer if NODE is the last node in MAP. Amortized over iterating through every data element in MAP, this function runs in constant time. However, this assumes that MAP is not excessively sparse, that is, that hmap_capacity(MAP) is at most a constant factor greater than hmap_count(MAP). This will always be true unless many nodes have been inserted into MAP and then most or all of them deleted; in such a case, calling hmap_shrink() is advised. Nodes are returned in arbitrary order that may change whenever the hash table's current capacity changes, as reported by hmap_capacity(). Calls to hmap_insert(), hmap_reserve(), and hmap_shrink() can change the capacity of a hash map. Inserting a node with hmap_insert_fast() or deleting one with hmap_delete() will not change the relative ordering of nodes. The HMAP_FOR_EACH and HMAP_FOR_EACH_SAFE macros provide convenient ways to iterate over all the nodes in a hash map. The HMAP_NEXT macro is an interface to this particular function that is often more convenient. */ static inline struct hmap_node * hmap_next (const struct hmap *map, const struct hmap_node *node) { return (node->next != NULL ? node->next : hmap_first_nonempty_bucket__ (map, (node->hash & map->mask) + 1)); } /* Returns true if MAP currently contains no data items, false otherwise. */ static inline bool hmap_is_empty (const struct hmap *map) { return map->count == 0; } /* Returns the number of data items currently in MAP. */ static inline size_t hmap_count (const struct hmap *map) { return map->count; } /* Returns the current capacity of MAP, that is, the maximum number of data elements that MAP may hold before it becomes advisable to rehash. The capacity is advisory only: it is possible to insert any number of data elements into a hash map regardless of its capacity. However, inserting many more elements than the map's capacity will degrade search performance. */ static inline size_t hmap_capacity (const struct hmap *map) { return hmap_mask_to_capacity__ (map->mask); } /* Implementation details. */ /* Returns the first node at or after NODE in NODE's chain that has hash value HASH. */ static inline struct hmap_node * hmap_find_hash__ (struct hmap_node *node, size_t hash) { for (; node != NULL; node = node->next) if (node->hash == hash) break; return node; } /* Returns the first node in the lowest-numbered nonempty bucket in MAP whose index is START or higher, or a null pointer if all such buckets are empty. */ static inline struct hmap_node * hmap_first_nonempty_bucket__ (const struct hmap *map, size_t start) { size_t i; for (i = start; i <= map->mask; i++) if (map->buckets[i] != NULL) return map->buckets[i]; return NULL; } /* Returns the hash table capacity associated with a given MASK, which should be a value for the "mask" member of struct hmap. MASK must be a power of 2 minus 1 (including 0), that is, its value in binary must be all 1-bits. */ static inline size_t hmap_mask_to_capacity__ (size_t mask) { return (mask + 1) * 2; } /* Helper for HMAP_NULLABLE_DATA (to avoid evaluating its NODE argument more than once). */ static inline void * hmap_nullable_data__ (struct hmap_node *node, size_t member_offset) { return node != NULL ? (char *) node - member_offset : NULL; } #endif /* libpspp/hmap.h */ pspp-1.0.1/src/libpspp/version.h0000644000175000017500000000250112653467236013526 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !version_h #define version_h 1 /* "A.B.C" */ extern const char bare_version[]; /* "GNU PSPP A.B.C" */ extern const char version[]; /* Human readable version string */ extern const char announced_version[]; /* Canonical name of host system type. */ extern const char host_system[]; /* Canonical name of build system type. */ extern const char build_system[]; /* Locale directory. */ extern const char locale_dir[]; /* The Examples directory */ extern const char const examples_dir[]; /* From the AUTHORS file */ extern const char *const authors[]; #endif /* !version_h */ pspp-1.0.1/src/libpspp/copyleft.c0000644000175000017500000011511212470242642013651 00000000000000#include const char legal[]="" "Copyright (C) 1997-9, 2000, 2005, 2006, 2007 Free Software Foundation, Inc.\n" "License GPLv3+: GNU GPL version 3 or later \n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n"; const char lack_of_warranty[]="" "\n" " THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\n" "APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\n" "HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\n" "OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\n" "THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n" "PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\n" "IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\n" "ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n" "\n" " IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n" "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\n" "THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\n" "GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\n" "USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\n" "DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\n" "PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\n" "EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\n" "SUCH DAMAGES.\n" "\n" ""; const char copyleft[]="" "\n" " GNU GENERAL PUBLIC LICENSE\n" " Version 3, 29 June 2007\n" "\n" " Copyright (C) 2007 Free Software Foundation, Inc. \n" " Everyone is permitted to copy and distribute verbatim copies\n" " of this license document, but changing it is not allowed.\n" "\n" " Preamble\n" "\n" " The GNU General Public License is a free, copyleft license for\n" "software and other kinds of works.\n" "\n" " The licenses for most software and other practical works are designed\n" "to take away your freedom to share and change the works. By contrast,\n" "the GNU General Public License is intended to guarantee your freedom to\n" "share and change all versions of a program--to make sure it remains free\n" "software for all its users. We, the Free Software Foundation, use the\n" "GNU General Public License for most of our software; it applies also to\n" "any other work released this way by its authors. You can apply it to\n" "your programs, too.\n" "\n" " When we speak of free software, we are referring to freedom, not\n" "price. Our General Public Licenses are designed to make sure that you\n" "have the freedom to distribute copies of free software (and charge for\n" "them if you wish), that you receive source code or can get it if you\n" "want it, that you can change the software or use pieces of it in new\n" "free programs, and that you know you can do these things.\n" "\n" " To protect your rights, we need to prevent others from denying you\n" "these rights or asking you to surrender the rights. Therefore, you have\n" "certain responsibilities if you distribute copies of the software, or if\n" "you modify it: responsibilities to respect the freedom of others.\n" "\n" " For example, if you distribute copies of such a program, whether\n" "gratis or for a fee, you must pass on to the recipients the same\n" "freedoms that you received. You must make sure that they, too, receive\n" "or can get the source code. And you must show them these terms so they\n" "know their rights.\n" "\n" " Developers that use the GNU GPL protect your rights with two steps:\n" "(1) assert copyright on the software, and (2) offer you this License\n" "giving you legal permission to copy, distribute and/or modify it.\n" "\n" " For the developers' and authors' protection, the GPL clearly explains\n" "that there is no warranty for this free software. For both users' and\n" "authors' sake, the GPL requires that modified versions be marked as\n" "changed, so that their problems will not be attributed erroneously to\n" "authors of previous versions.\n" "\n" " Some devices are designed to deny users access to install or run\n" "modified versions of the software inside them, although the manufacturer\n" "can do so. This is fundamentally incompatible with the aim of\n" "protecting users' freedom to change the software. The systematic\n" "pattern of such abuse occurs in the area of products for individuals to\n" "use, which is precisely where it is most unacceptable. Therefore, we\n" "have designed this version of the GPL to prohibit the practice for those\n" "products. If such problems arise substantially in other domains, we\n" "stand ready to extend this provision to those domains in future versions\n" "of the GPL, as needed to protect the freedom of users.\n" "\n" " Finally, every program is threatened constantly by software patents.\n" "States should not allow patents to restrict development and use of\n" "software on general-purpose computers, but in those that do, we wish to\n" "avoid the special danger that patents applied to a free program could\n" "make it effectively proprietary. To prevent this, the GPL assures that\n" "patents cannot be used to render the program non-free.\n" "\n" " The precise terms and conditions for copying, distribution and\n" "modification follow.\n" "\n" " TERMS AND CONDITIONS\n" "\n" " 0. Definitions.\n" "\n" " \"This License\" refers to version 3 of the GNU General Public License.\n" "\n" " \"Copyright\" also means copyright-like laws that apply to other kinds of\n" "works, such as semiconductor masks.\n" " \n" " \"The Program\" refers to any copyrightable work licensed under this\n" "License. Each licensee is addressed as \"you\". \"Licensees\" and\n" "\"recipients\" may be individuals or organizations.\n" "\n" " To \"modify\" a work means to copy from or adapt all or part of the work\n" "in a fashion requiring copyright permission, other than the making of an\n" "exact copy. The resulting work is called a \"modified version\" of the\n" "earlier work or a work \"based on\" the earlier work.\n" "\n" " A \"covered work\" means either the unmodified Program or a work based\n" "on the Program.\n" "\n" " To \"propagate\" a work means to do anything with it that, without\n" "permission, would make you directly or secondarily liable for\n" "infringement under applicable copyright law, except executing it on a\n" "computer or modifying a private copy. Propagation includes copying,\n" "distribution (with or without modification), making available to the\n" "public, and in some countries other activities as well.\n" "\n" " To \"convey\" a work means any kind of propagation that enables other\n" "parties to make or receive copies. Mere interaction with a user through\n" "a computer network, with no transfer of a copy, is not conveying.\n" "\n" " An interactive user interface displays \"Appropriate Legal Notices\"\n" "to the extent that it includes a convenient and prominently visible\n" "feature that (1) displays an appropriate copyright notice, and (2)\n" "tells the user that there is no warranty for the work (except to the\n" "extent that warranties are provided), that licensees may convey the\n" "work under this License, and how to view a copy of this License. If\n" "the interface presents a list of user commands or options, such as a\n" "menu, a prominent item in the list meets this criterion.\n" "\n" " 1. Source Code.\n" "\n" " The \"source code\" for a work means the preferred form of the work\n" "for making modifications to it. \"Object code\" means any non-source\n" "form of a work.\n" "\n" " A \"Standard Interface\" means an interface that either is an official\n" "standard defined by a recognized standards body, or, in the case of\n" "interfaces specified for a particular programming language, one that\n" "is widely used among developers working in that language.\n" "\n" " The \"System Libraries\" of an executable work include anything, other\n" "than the work as a whole, that (a) is included in the normal form of\n" "packaging a Major Component, but which is not part of that Major\n" "Component, and (b) serves only to enable use of the work with that\n" "Major Component, or to implement a Standard Interface for which an\n" "implementation is available to the public in source code form. A\n" "\"Major Component\", in this context, means a major essential component\n" "(kernel, window system, and so on) of the specific operating system\n" "(if any) on which the executable work runs, or a compiler used to\n" "produce the work, or an object code interpreter used to run it.\n" "\n" " The \"Corresponding Source\" for a work in object code form means all\n" "the source code needed to generate, install, and (for an executable\n" "work) run the object code and to modify the work, including scripts to\n" "control those activities. However, it does not include the work's\n" "System Libraries, or general-purpose tools or generally available free\n" "programs which are used unmodified in performing those activities but\n" "which are not part of the work. For example, Corresponding Source\n" "includes interface definition files associated with source files for\n" "the work, and the source code for shared libraries and dynamically\n" "linked subprograms that the work is specifically designed to require,\n" "such as by intimate data communication or control flow between those\n" "subprograms and other parts of the work.\n" "\n" " The Corresponding Source need not include anything that users\n" "can regenerate automatically from other parts of the Corresponding\n" "Source.\n" "\n" " The Corresponding Source for a work in source code form is that\n" "same work.\n" "\n" " 2. Basic Permissions.\n" "\n" " All rights granted under this License are granted for the term of\n" "copyright on the Program, and are irrevocable provided the stated\n" "conditions are met. This License explicitly affirms your unlimited\n" "permission to run the unmodified Program. The output from running a\n" "covered work is covered by this License only if the output, given its\n" "content, constitutes a covered work. This License acknowledges your\n" "rights of fair use or other equivalent, as provided by copyright law.\n" "\n" " You may make, run and propagate covered works that you do not\n" "convey, without conditions so long as your license otherwise remains\n" "in force. You may convey covered works to others for the sole purpose\n" "of having them make modifications exclusively for you, or provide you\n" "with facilities for running those works, provided that you comply with\n" "the terms of this License in conveying all material for which you do\n" "not control copyright. Those thus making or running the covered works\n" "for you must do so exclusively on your behalf, under your direction\n" "and control, on terms that prohibit them from making any copies of\n" "your copyrighted material outside their relationship with you.\n" "\n" " Conveying under any other circumstances is permitted solely under\n" "the conditions stated below. Sublicensing is not allowed; section 10\n" "makes it unnecessary.\n" "\n" " 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n" "\n" " No covered work shall be deemed part of an effective technological\n" "measure under any applicable law fulfilling obligations under article\n" "11 of the WIPO copyright treaty adopted on 20 December 1996, or\n" "similar laws prohibiting or restricting circumvention of such\n" "measures.\n" "\n" " When you convey a covered work, you waive any legal power to forbid\n" "circumvention of technological measures to the extent such circumvention\n" "is effected by exercising rights under this License with respect to\n" "the covered work, and you disclaim any intention to limit operation or\n" "modification of the work as a means of enforcing, against the work's\n" "users, your or third parties' legal rights to forbid circumvention of\n" "technological measures.\n" "\n" " 4. Conveying Verbatim Copies.\n" "\n" " You may convey verbatim copies of the Program's source code as you\n" "receive it, in any medium, provided that you conspicuously and\n" "appropriately publish on each copy an appropriate copyright notice;\n" "keep intact all notices stating that this License and any\n" "non-permissive terms added in accord with section 7 apply to the code;\n" "keep intact all notices of the absence of any warranty; and give all\n" "recipients a copy of this License along with the Program.\n" "\n" " You may charge any price or no price for each copy that you convey,\n" "and you may offer support or warranty protection for a fee.\n" "\n" " 5. Conveying Modified Source Versions.\n" "\n" " You may convey a work based on the Program, or the modifications to\n" "produce it from the Program, in the form of source code under the\n" "terms of section 4, provided that you also meet all of these conditions:\n" "\n" " a) The work must carry prominent notices stating that you modified\n" " it, and giving a relevant date.\n" "\n" " b) The work must carry prominent notices stating that it is\n" " released under this License and any conditions added under section\n" " 7. This requirement modifies the requirement in section 4 to\n" " \"keep intact all notices\".\n" "\n" " c) You must license the entire work, as a whole, under this\n" " License to anyone who comes into possession of a copy. This\n" " License will therefore apply, along with any applicable section 7\n" " additional terms, to the whole of the work, and all its parts,\n" " regardless of how they are packaged. This License gives no\n" " permission to license the work in any other way, but it does not\n" " invalidate such permission if you have separately received it.\n" "\n" " d) If the work has interactive user interfaces, each must display\n" " Appropriate Legal Notices; however, if the Program has interactive\n" " interfaces that do not display Appropriate Legal Notices, your\n" " work need not make them do so.\n" "\n" " A compilation of a covered work with other separate and independent\n" "works, which are not by their nature extensions of the covered work,\n" "and which are not combined with it such as to form a larger program,\n" "in or on a volume of a storage or distribution medium, is called an\n" "\"aggregate\" if the compilation and its resulting copyright are not\n" "used to limit the access or legal rights of the compilation's users\n" "beyond what the individual works permit. Inclusion of a covered work\n" "in an aggregate does not cause this License to apply to the other\n" "parts of the aggregate.\n" "\n" " 6. Conveying Non-Source Forms.\n" "\n" " You may convey a covered work in object code form under the terms\n" "of sections 4 and 5, provided that you also convey the\n" "machine-readable Corresponding Source under the terms of this License,\n" "in one of these ways:\n" "\n" " a) Convey the object code in, or embodied in, a physical product\n" " (including a physical distribution medium), accompanied by the\n" " Corresponding Source fixed on a durable physical medium\n" " customarily used for software interchange.\n" "\n" " b) Convey the object code in, or embodied in, a physical product\n" " (including a physical distribution medium), accompanied by a\n" " written offer, valid for at least three years and valid for as\n" " long as you offer spare parts or customer support for that product\n" " model, to give anyone who possesses the object code either (1) a\n" " copy of the Corresponding Source for all the software in the\n" " product that is covered by this License, on a durable physical\n" " medium customarily used for software interchange, for a price no\n" " more than your reasonable cost of physically performing this\n" " conveying of source, or (2) access to copy the\n" " Corresponding Source from a network server at no charge.\n" "\n" " c) Convey individual copies of the object code with a copy of the\n" " written offer to provide the Corresponding Source. This\n" " alternative is allowed only occasionally and noncommercially, and\n" " only if you received the object code with such an offer, in accord\n" " with subsection 6b.\n" "\n" " d) Convey the object code by offering access from a designated\n" " place (gratis or for a charge), and offer equivalent access to the\n" " Corresponding Source in the same way through the same place at no\n" " further charge. You need not require recipients to copy the\n" " Corresponding Source along with the object code. If the place to\n" " copy the object code is a network server, the Corresponding Source\n" " may be on a different server (operated by you or a third party)\n" " that supports equivalent copying facilities, provided you maintain\n" " clear directions next to the object code saying where to find the\n" " Corresponding Source. Regardless of what server hosts the\n" " Corresponding Source, you remain obligated to ensure that it is\n" " available for as long as needed to satisfy these requirements.\n" "\n" " e) Convey the object code using peer-to-peer transmission, provided\n" " you inform other peers where the object code and Corresponding\n" " Source of the work are being offered to the general public at no\n" " charge under subsection 6d.\n" "\n" " A separable portion of the object code, whose source code is excluded\n" "from the Corresponding Source as a System Library, need not be\n" "included in conveying the object code work.\n" "\n" " A \"User Product\" is either (1) a \"consumer product\", which means any\n" "tangible personal property which is normally used for personal, family,\n" "or household purposes, or (2) anything designed or sold for incorporation\n" "into a dwelling. In determining whether a product is a consumer product,\n" "doubtful cases shall be resolved in favor of coverage. For a particular\n" "product received by a particular user, \"normally used\" refers to a\n" "typical or common use of that class of product, regardless of the status\n" "of the particular user or of the way in which the particular user\n" "actually uses, or expects or is expected to use, the product. A product\n" "is a consumer product regardless of whether the product has substantial\n" "commercial, industrial or non-consumer uses, unless such uses represent\n" "the only significant mode of use of the product.\n" "\n" " \"Installation Information\" for a User Product means any methods,\n" "procedures, authorization keys, or other information required to install\n" "and execute modified versions of a covered work in that User Product from\n" "a modified version of its Corresponding Source. The information must\n" "suffice to ensure that the continued functioning of the modified object\n" "code is in no case prevented or interfered with solely because\n" "modification has been made.\n" "\n" " If you convey an object code work under this section in, or with, or\n" "specifically for use in, a User Product, and the conveying occurs as\n" "part of a transaction in which the right of possession and use of the\n" "User Product is transferred to the recipient in perpetuity or for a\n" "fixed term (regardless of how the transaction is characterized), the\n" "Corresponding Source conveyed under this section must be accompanied\n" "by the Installation Information. But this requirement does not apply\n" "if neither you nor any third party retains the ability to install\n" "modified object code on the User Product (for example, the work has\n" "been installed in ROM).\n" "\n" " The requirement to provide Installation Information does not include a\n" "requirement to continue to provide support service, warranty, or updates\n" "for a work that has been modified or installed by the recipient, or for\n" "the User Product in which it has been modified or installed. Access to a\n" "network may be denied when the modification itself materially and\n" "adversely affects the operation of the network or violates the rules and\n" "protocols for communication across the network.\n" "\n" " Corresponding Source conveyed, and Installation Information provided,\n" "in accord with this section must be in a format that is publicly\n" "documented (and with an implementation available to the public in\n" "source code form), and must require no special password or key for\n" "unpacking, reading or copying.\n" "\n" " 7. Additional Terms.\n" "\n" " \"Additional permissions\" are terms that supplement the terms of this\n" "License by making exceptions from one or more of its conditions.\n" "Additional permissions that are applicable to the entire Program shall\n" "be treated as though they were included in this License, to the extent\n" "that they are valid under applicable law. If additional permissions\n" "apply only to part of the Program, that part may be used separately\n" "under those permissions, but the entire Program remains governed by\n" "this License without regard to the additional permissions.\n" "\n" " When you convey a copy of a covered work, you may at your option\n" "remove any additional permissions from that copy, or from any part of\n" "it. (Additional permissions may be written to require their own\n" "removal in certain cases when you modify the work.) You may place\n" "additional permissions on material, added by you to a covered work,\n" "for which you have or can give appropriate copyright permission.\n" "\n" " Notwithstanding any other provision of this License, for material you\n" "add to a covered work, you may (if authorized by the copyright holders of\n" "that material) supplement the terms of this License with terms:\n" "\n" " a) Disclaiming warranty or limiting liability differently from the\n" " terms of sections 15 and 16 of this License; or\n" "\n" " b) Requiring preservation of specified reasonable legal notices or\n" " author attributions in that material or in the Appropriate Legal\n" " Notices displayed by works containing it; or\n" "\n" " c) Prohibiting misrepresentation of the origin of that material, or\n" " requiring that modified versions of such material be marked in\n" " reasonable ways as different from the original version; or\n" "\n" " d) Limiting the use for publicity purposes of names of licensors or\n" " authors of the material; or\n" "\n" " e) Declining to grant rights under trademark law for use of some\n" " trade names, trademarks, or service marks; or\n" "\n" " f) Requiring indemnification of licensors and authors of that\n" " material by anyone who conveys the material (or modified versions of\n" " it) with contractual assumptions of liability to the recipient, for\n" " any liability that these contractual assumptions directly impose on\n" " those licensors and authors.\n" "\n" " All other non-permissive additional terms are considered \"further\n" "restrictions\" within the meaning of section 10. If the Program as you\n" "received it, or any part of it, contains a notice stating that it is\n" "governed by this License along with a term that is a further\n" "restriction, you may remove that term. If a license document contains\n" "a further restriction but permits relicensing or conveying under this\n" "License, you may add to a covered work material governed by the terms\n" "of that license document, provided that the further restriction does\n" "not survive such relicensing or conveying.\n" "\n" " If you add terms to a covered work in accord with this section, you\n" "must place, in the relevant source files, a statement of the\n" "additional terms that apply to those files, or a notice indicating\n" "where to find the applicable terms.\n" "\n" " Additional terms, permissive or non-permissive, may be stated in the\n" "form of a separately written license, or stated as exceptions;\n" "the above requirements apply either way.\n" "\n" " 8. Termination.\n" "\n" " You may not propagate or modify a covered work except as expressly\n" "provided under this License. Any attempt otherwise to propagate or\n" "modify it is void, and will automatically terminate your rights under\n" "this License (including any patent licenses granted under the third\n" "paragraph of section 11).\n" "\n" " However, if you cease all violation of this License, then your\n" "license from a particular copyright holder is reinstated (a)\n" "provisionally, unless and until the copyright holder explicitly and\n" "finally terminates your license, and (b) permanently, if the copyright\n" "holder fails to notify you of the violation by some reasonable means\n" "prior to 60 days after the cessation.\n" "\n" " Moreover, your license from a particular copyright holder is\n" "reinstated permanently if the copyright holder notifies you of the\n" "violation by some reasonable means, this is the first time you have\n" "received notice of violation of this License (for any work) from that\n" "copyright holder, and you cure the violation prior to 30 days after\n" "your receipt of the notice.\n" "\n" " Termination of your rights under this section does not terminate the\n" "licenses of parties who have received copies or rights from you under\n" "this License. If your rights have been terminated and not permanently\n" "reinstated, you do not qualify to receive new licenses for the same\n" "material under section 10.\n" "\n" " 9. Acceptance Not Required for Having Copies.\n" "\n" " You are not required to accept this License in order to receive or\n" "run a copy of the Program. Ancillary propagation of a covered work\n" "occurring solely as a consequence of using peer-to-peer transmission\n" "to receive a copy likewise does not require acceptance. However,\n" "nothing other than this License grants you permission to propagate or\n" "modify any covered work. These actions infringe copyright if you do\n" "not accept this License. Therefore, by modifying or propagating a\n" "covered work, you indicate your acceptance of this License to do so.\n" "\n" " 10. Automatic Licensing of Downstream Recipients.\n" "\n" " Each time you convey a covered work, the recipient automatically\n" "receives a license from the original licensors, to run, modify and\n" "propagate that work, subject to this License. You are not responsible\n" "for enforcing compliance by third parties with this License.\n" "\n" " An \"entity transaction\" is a transaction transferring control of an\n" "organization, or substantially all assets of one, or subdividing an\n" "organization, or merging organizations. If propagation of a covered\n" "work results from an entity transaction, each party to that\n" "transaction who receives a copy of the work also receives whatever\n" "licenses to the work the party's predecessor in interest had or could\n" "give under the previous paragraph, plus a right to possession of the\n" "Corresponding Source of the work from the predecessor in interest, if\n" "the predecessor has it or can get it with reasonable efforts.\n" "\n" " You may not impose any further restrictions on the exercise of the\n" "rights granted or affirmed under this License. For example, you may\n" "not impose a license fee, royalty, or other charge for exercise of\n" "rights granted under this License, and you may not initiate litigation\n" "(including a cross-claim or counterclaim in a lawsuit) alleging that\n" "any patent claim is infringed by making, using, selling, offering for\n" "sale, or importing the Program or any portion of it.\n" "\n" " 11. Patents.\n" "\n" " A \"contributor\" is a copyright holder who authorizes use under this\n" "License of the Program or a work on which the Program is based. The\n" "work thus licensed is called the contributor's \"contributor version\".\n" "\n" " A contributor's \"essential patent claims\" are all patent claims\n" "owned or controlled by the contributor, whether already acquired or\n" "hereafter acquired, that would be infringed by some manner, permitted\n" "by this License, of making, using, or selling its contributor version,\n" "but do not include claims that would be infringed only as a\n" "consequence of further modification of the contributor version. For\n" "purposes of this definition, \"control\" includes the right to grant\n" "patent sublicenses in a manner consistent with the requirements of\n" "this License.\n" "\n" " Each contributor grants you a non-exclusive, worldwide, royalty-free\n" "patent license under the contributor's essential patent claims, to\n" "make, use, sell, offer for sale, import and otherwise run, modify and\n" "propagate the contents of its contributor version.\n" "\n" " In the following three paragraphs, a \"patent license\" is any express\n" "agreement or commitment, however denominated, not to enforce a patent\n" "(such as an express permission to practice a patent or covenant not to\n" "sue for patent infringement). To \"grant\" such a patent license to a\n" "party means to make such an agreement or commitment not to enforce a\n" "patent against the party.\n" "\n" " If you convey a covered work, knowingly relying on a patent license,\n" "and the Corresponding Source of the work is not available for anyone\n" "to copy, free of charge and under the terms of this License, through a\n" "publicly available network server or other readily accessible means,\n" "then you must either (1) cause the Corresponding Source to be so\n" "available, or (2) arrange to deprive yourself of the benefit of the\n" "patent license for this particular work, or (3) arrange, in a manner\n" "consistent with the requirements of this License, to extend the patent\n" "license to downstream recipients. \"Knowingly relying\" means you have\n" "actual knowledge that, but for the patent license, your conveying the\n" "covered work in a country, or your recipient's use of the covered work\n" "in a country, would infringe one or more identifiable patents in that\n" "country that you have reason to believe are valid.\n" " \n" " If, pursuant to or in connection with a single transaction or\n" "arrangement, you convey, or propagate by procuring conveyance of, a\n" "covered work, and grant a patent license to some of the parties\n" "receiving the covered work authorizing them to use, propagate, modify\n" "or convey a specific copy of the covered work, then the patent license\n" "you grant is automatically extended to all recipients of the covered\n" "work and works based on it.\n" "\n" " A patent license is \"discriminatory\" if it does not include within\n" "the scope of its coverage, prohibits the exercise of, or is\n" "conditioned on the non-exercise of one or more of the rights that are\n" "specifically granted under this License. You may not convey a covered\n" "work if you are a party to an arrangement with a third party that is\n" "in the business of distributing software, under which you make payment\n" "to the third party based on the extent of your activity of conveying\n" "the work, and under which the third party grants, to any of the\n" "parties who would receive the covered work from you, a discriminatory\n" "patent license (a) in connection with copies of the covered work\n" "conveyed by you (or copies made from those copies), or (b) primarily\n" "for and in connection with specific products or compilations that\n" "contain the covered work, unless you entered into that arrangement,\n" "or that patent license was granted, prior to 28 March 2007.\n" "\n" " Nothing in this License shall be construed as excluding or limiting\n" "any implied license or other defenses to infringement that may\n" "otherwise be available to you under applicable patent law.\n" "\n" " 12. No Surrender of Others' Freedom.\n" "\n" " If conditions are imposed on you (whether by court order, agreement or\n" "otherwise) that contradict the conditions of this License, they do not\n" "excuse you from the conditions of this License. If you cannot convey a\n" "covered work so as to satisfy simultaneously your obligations under this\n" "License and any other pertinent obligations, then as a consequence you may\n" "not convey it at all. For example, if you agree to terms that obligate you\n" "to collect a royalty for further conveying from those to whom you convey\n" "the Program, the only way you could satisfy both those terms and this\n" "License would be to refrain entirely from conveying the Program.\n" "\n" " 13. Use with the GNU Affero General Public License.\n" "\n" " Notwithstanding any other provision of this License, you have\n" "permission to link or combine any covered work with a work licensed\n" "under version 3 of the GNU Affero General Public License into a single\n" "combined work, and to convey the resulting work. The terms of this\n" "License will continue to apply to the part which is the covered work,\n" "but the special requirements of the GNU Affero General Public License,\n" "section 13, concerning interaction through a network will apply to the\n" "combination as such.\n" "\n" " 14. Revised Versions of this License.\n" "\n" " The Free Software Foundation may publish revised and/or new versions of\n" "the GNU General Public License from time to time. Such new versions will\n" "be similar in spirit to the present version, but may differ in detail to\n" "address new problems or concerns.\n" "\n" " Each version is given a distinguishing version number. If the\n" "Program specifies that a certain numbered version of the GNU General\n" "Public License \"or any later version\" applies to it, you have the\n" "option of following the terms and conditions either of that numbered\n" "version or of any later version published by the Free Software\n" "Foundation. If the Program does not specify a version number of the\n" "GNU General Public License, you may choose any version ever published\n" "by the Free Software Foundation.\n" "\n" " If the Program specifies that a proxy can decide which future\n" "versions of the GNU General Public License can be used, that proxy's\n" "public statement of acceptance of a version permanently authorizes you\n" "to choose that version for the Program.\n" "\n" " Later license versions may give you additional or different\n" "permissions. However, no additional obligations are imposed on any\n" "author or copyright holder as a result of your choosing to follow a\n" "later version.\n" "\n" " 15. Disclaimer of Warranty.\n" "\n" " THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\n" "APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\n" "HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\n" "OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\n" "THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n" "PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\n" "IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\n" "ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n" "\n" " 16. Limitation of Liability.\n" "\n" " IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n" "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\n" "THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\n" "GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\n" "USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\n" "DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\n" "PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\n" "EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\n" "SUCH DAMAGES.\n" "\n" " 17. Interpretation of Sections 15 and 16.\n" "\n" " If the disclaimer of warranty and limitation of liability provided\n" "above cannot be given local legal effect according to their terms,\n" "reviewing courts shall apply local law that most closely approximates\n" "an absolute waiver of all civil liability in connection with the\n" "Program, unless a warranty or assumption of liability accompanies a\n" "copy of the Program in return for a fee.\n" "\n" " END OF TERMS AND CONDITIONS\n" "\n" " How to Apply These Terms to Your New Programs\n" "\n" " If you develop a new program, and you want it to be of the greatest\n" "possible use to the public, the best way to achieve this is to make it\n" "free software which everyone can redistribute and change under these terms.\n" "\n" " To do so, attach the following notices to the program. It is safest\n" "to attach them to the start of each source file to most effectively\n" "state the exclusion of warranty; and each file should have at least\n" "the \"copyright\" line and a pointer to where the full notice is found.\n" "\n" " \n" " Copyright (C) \n" "\n" " This program is free software: you can redistribute it and/or modify\n" " it under the terms of the GNU General Public License as published by\n" " the Free Software Foundation, either version 3 of the License, or\n" " (at your option) any later version.\n" "\n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" " GNU General Public License for more details.\n" "\n" " You should have received a copy of the GNU General Public License\n" " along with this program. If not, see .\n" "\n" "Also add information on how to contact you by electronic and paper mail.\n" "\n" " If the program does terminal interaction, make it output a short\n" "notice like this when it starts in an interactive mode:\n" "\n" " Copyright (C) \n" " This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n" " This is free software, and you are welcome to redistribute it\n" " under certain conditions; type `show c' for details.\n" "\n" "The hypothetical commands `show w' and `show c' should show the appropriate\n" "parts of the General Public License. Of course, your program's commands\n" "might be different; for a GUI interface, you would use an \"about box\".\n" "\n" " You should also get your employer (if you work as a programmer) or school,\n" "if any, to sign a \"copyright disclaimer\" for the program, if necessary.\n" "For more information on this, and how to apply and follow the GNU GPL, see\n" ".\n" "\n" " The GNU General Public License does not permit incorporating your program\n" "into proprietary programs. If your program is a subroutine library, you\n" "may consider it more useful to permit linking proprietary applications with\n" "the library. If this is what you want to do, use the GNU Lesser General\n" "Public License instead of this License. But first, please read\n" ".\n" "\n" ""; pspp-1.0.1/src/libpspp/integer-format.c0000644000175000017500000001125712470434665014764 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/integer-format.h" #include /* Returns true if FORMAT is a valid integer format. */ static inline bool is_integer_format (enum integer_format format) { return (format == INTEGER_MSB_FIRST || format == INTEGER_LSB_FIRST || format == INTEGER_VAX); } /* Converts the CNT bytes in INTEGER from SRC integer_format to DST integer_format. */ void integer_convert (enum integer_format src, const void *from, enum integer_format dst, void *to, size_t cnt) { if (src != dst) integer_put (integer_get (src, from, cnt), dst, to, cnt); else if (from != to) memcpy (to, from, cnt); } /* Returns the value of the CNT-byte integer at FROM, which is in the given FORMAT. */ uint64_t integer_get (enum integer_format format, const void *from_, size_t cnt) { const uint8_t *from = from_; uint64_t value = 0; size_t i; assert (is_integer_format (format)); assert (cnt <= 8); switch (format) { case INTEGER_MSB_FIRST: for (i = 0; i < cnt; i++) value = (value << 8) | from[i]; break; case INTEGER_LSB_FIRST: for (i = 0; i < cnt; i++) value = (value << 8) | from[cnt - i - 1]; break; case INTEGER_VAX: for (i = 0; i < (cnt & ~1); i++) value = (value << 8) | from[i ^ 1]; if (cnt & 1) value = (value << 8) | from[cnt - 1]; break; } return value; } /* Stores VALUE as a CNT-byte integer at TO, in the given FORMAT. */ void integer_put (uint64_t value, enum integer_format format, void *to_, size_t cnt) { uint8_t *to = to_; size_t i; assert (is_integer_format (format)); assert (cnt <= 8); value <<= 8 * (8 - cnt); switch (format) { case INTEGER_MSB_FIRST: for (i = 0; i < cnt; i++) { to[i] = value >> 56; value <<= 8; } break; case INTEGER_LSB_FIRST: for (i = 0; i < cnt; i++) { to[cnt - i - 1] = value >> 56; value <<= 8; } break; case INTEGER_VAX: for (i = 0; i < (cnt & ~1); i++) { to[i ^ 1] = value >> 56; value <<= 8; } if (cnt & 1) to[cnt - 1] = value >> 56; break; } } /* Returns true if bytes with index IDX1 and IDX2 in VALUE differ in value. */ static inline bool bytes_differ (uint64_t value, unsigned int idx1, unsigned int idx2) { uint8_t byte1 = value >> (idx1 * 8); uint8_t byte2 = value >> (idx2 * 8); return byte1 != byte2; } /* Attempts to identify the integer format in which the LENGTH bytes in INTEGER represent the given EXPECTED_VALUE. Returns true if successful, false otherwise. On success, stores the format in *FORMAT. */ bool integer_identify (uint64_t expected_value, const void *integer, size_t length, enum integer_format *format) { /* Odd-length integers are confusing. */ assert (length % 2 == 0); /* LENGTH must be greater than 2 because VAX format is equivalent to little-endian for 2-byte integers. */ assert (length > 2); /* EXPECTED_VALUE must contain different byte values, because otherwise all formats are identical. */ assert (bytes_differ (expected_value, 0, 1) || bytes_differ (expected_value, 0, 2) || bytes_differ (expected_value, 0, 3) || (length > 4 && (bytes_differ (expected_value, 0, 4) || bytes_differ (expected_value, 0, 5))) || (length > 6 && (bytes_differ (expected_value, 0, 6) || bytes_differ (expected_value, 0, 7)))); if (integer_get (INTEGER_MSB_FIRST, integer, length) == expected_value) *format = INTEGER_MSB_FIRST; else if (integer_get (INTEGER_LSB_FIRST, integer, length) == expected_value) *format = INTEGER_LSB_FIRST; else if (integer_get (INTEGER_VAX, integer, length) == expected_value) *format = INTEGER_VAX; else return false; return true; } pspp-1.0.1/src/data/0000755000175000017500000000000013150620333011170 500000000000000pspp-1.0.1/src/data/dict-class.c0000644000175000017500000000313112470243700013303 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/dict-class.h" #include "libpspp/assertion.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Returns the dictionary class corresponding to a variable named NAME. */ enum dict_class dict_class_from_id (const char *name) { switch (name[0]) { default: return DC_ORDINARY; case '$': return DC_SYSTEM; case '#': return DC_SCRATCH; } } /* Returns the name of dictionary class DICT_CLASS. This function should probably not be used in new code as it can lead to difficulties for internationalization. */ const char * dict_class_to_name (enum dict_class dict_class) { switch (dict_class) { case DC_ORDINARY: return _("ordinary"); case DC_SYSTEM: return _("system"); case DC_SCRATCH: return _("scratch"); default: NOT_REACHED (); } } pspp-1.0.1/src/data/ods-reader.c0000644000175000017500000005634113143642441013320 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2012, 2013, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/assertion.h" #include "data/data-in.h" #include "gl/c-strtod.h" #include "gl/minmax.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) #include "ods-reader.h" #include "spreadsheet-reader.h" #if !ODF_READ_SUPPORT struct spreadsheet * ods_probe (const char *filename, bool report_errors) { if (report_errors) msg (ME, _("Support for %s files was not compiled into this installation of PSPP"), "OpenDocument"); return NULL; } const char * ods_get_sheet_name (struct spreadsheet *s, int n) { return NULL; } char * ods_get_sheet_range (struct spreadsheet *s, int n) { return NULL; } struct casereader * ods_make_reader (struct spreadsheet *spreadsheet, const struct spreadsheet_read_options *opts) { return NULL; } void ods_unref (struct spreadsheet *r) { } #else #include "libpspp/zip-reader.h" #include #include #include #include #include #include "data/format.h" #include "data/case.h" #include "data/casereader-provider.h" #include "data/dictionary.h" #include "data/identifier.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/i18n.h" #include "libpspp/str.h" #include "gl/xalloc.h" static void ods_file_casereader_destroy (struct casereader *, void *); static struct ccase *ods_file_casereader_read (struct casereader *, void *); static const struct casereader_class ods_file_casereader_class = { ods_file_casereader_read, ods_file_casereader_destroy, NULL, NULL, }; struct sheet_detail { /* The name of the sheet (utf8 encoding) */ char *name; int start_col; int stop_col; int start_row; int stop_row; }; enum reader_state { STATE_INIT = 0, /* Initial state */ STATE_SPREADSHEET, /* Found the start of the spreadsheet doc */ STATE_TABLE, /* Found the sheet that we actually want */ STATE_ROW, /* Found the start of the cell array */ STATE_CELL, /* Found a cell */ STATE_CELL_CONTENT /* Found a the text within a cell */ }; struct state_data { xmlTextReaderPtr xtr; int node_type; enum reader_state state; int row; int col; int current_sheet; xmlChar *current_sheet_name; int col_span; }; static void state_data_destroy (struct state_data *sd) { xmlFree (sd->current_sheet_name); sd->current_sheet_name = NULL; xmlFreeTextReader (sd->xtr); sd->xtr = NULL; } struct ods_reader { struct spreadsheet spreadsheet; struct zip_reader *zreader; int target_sheet_index; xmlChar *target_sheet_name; /* State data for the meta data */ struct state_data msd; /* State data for the reader */ struct state_data rsd; int start_row; int start_col; int stop_row; int stop_col; struct sheet_detail *sheets; int n_allocated_sheets; struct caseproto *proto; struct dictionary *dict; struct ccase *first_case; bool used_first_case; bool read_names; struct string ods_errs; struct string zip_errs; }; void ods_unref (struct spreadsheet *s) { struct ods_reader *r = (struct ods_reader *) s; if (--s->ref_cnt == 0) { int i; state_data_destroy (&r->msd); for (i = 0; i < r->n_allocated_sheets; ++i) { xmlFree (r->sheets[i].name); } dict_destroy (r->dict); zip_reader_destroy (r->zreader); free (r->sheets); free (s->file_name); free (r); } } static bool reading_target_sheet (const struct ods_reader *r, const struct state_data *msd) { if (r->target_sheet_name != NULL) { if ( 0 == xmlStrcmp (r->target_sheet_name, msd->current_sheet_name)) return true; } if (r->target_sheet_index == msd->current_sheet + 1) return true; return false; } static void process_node (struct ods_reader *or, struct state_data *r); const char * ods_get_sheet_name (struct spreadsheet *s, int n) { struct ods_reader *r = (struct ods_reader *) s; struct state_data *or = &r->msd; assert (n < s->n_sheets); while ( (r->n_allocated_sheets <= n) || or->state != STATE_SPREADSHEET ) { int ret = xmlTextReaderRead (or->xtr); if ( ret != 1) break; process_node (r, or); } return r->sheets[n].name; } char * ods_get_sheet_range (struct spreadsheet *s, int n) { struct ods_reader *r = (struct ods_reader *) s; struct state_data *or = &r->msd; assert (n < s->n_sheets); while ( (r->n_allocated_sheets <= n) || (r->sheets[n].stop_row == -1) || or->state != STATE_SPREADSHEET ) { int ret = xmlTextReaderRead (or->xtr); if ( ret != 1) break; process_node (r, or); } return create_cell_range ( r->sheets[n].start_col, r->sheets[n].start_row, r->sheets[n].stop_col, r->sheets[n].stop_row); } static void ods_file_casereader_destroy (struct casereader *reader UNUSED, void *r_) { struct ods_reader *r = r_; if ( r == NULL) return ; state_data_destroy (&r->rsd); if ( ! ds_is_empty (&r->ods_errs)) msg (ME, "%s", ds_cstr (&r->ods_errs)); ds_destroy (&r->ods_errs); if ( r->first_case && ! r->used_first_case ) case_unref (r->first_case); caseproto_unref (r->proto); r->proto = NULL; xmlFree (r->target_sheet_name); r->target_sheet_name = NULL; ods_unref (&r->spreadsheet); } static void process_node (struct ods_reader *or, struct state_data *r) { xmlChar *name = xmlTextReaderName (r->xtr); if (name == NULL) name = xmlStrdup (_xml ("--")); r->node_type = xmlTextReaderNodeType (r->xtr); switch (r->state) { case STATE_INIT: if (0 == xmlStrcasecmp (name, _xml("office:spreadsheet")) && XML_READER_TYPE_ELEMENT == r->node_type) { r->state = STATE_SPREADSHEET; r->current_sheet = -1; r->current_sheet_name = NULL; } break; case STATE_SPREADSHEET: if (0 == xmlStrcasecmp (name, _xml("table:table")) && (XML_READER_TYPE_ELEMENT == r->node_type)) { xmlFree (r->current_sheet_name); r->current_sheet_name = xmlTextReaderGetAttribute (r->xtr, _xml ("table:name")); ++r->current_sheet; if (r->current_sheet >= or->n_allocated_sheets) { assert (r->current_sheet == or->n_allocated_sheets); or->sheets = xrealloc (or->sheets, sizeof (*or->sheets) * ++or->n_allocated_sheets); or->sheets[or->n_allocated_sheets - 1].start_col = -1; or->sheets[or->n_allocated_sheets - 1].stop_col = -1; or->sheets[or->n_allocated_sheets - 1].start_row = -1; or->sheets[or->n_allocated_sheets - 1].stop_row = -1; or->sheets[or->n_allocated_sheets - 1].name = CHAR_CAST (char *, xmlStrdup (r->current_sheet_name)); } r->col = 0; r->row = 0; r->state = STATE_TABLE; } else if (0 == xmlStrcasecmp (name, _xml("office:spreadsheet")) && XML_READER_TYPE_ELEMENT == r->node_type) { r->state = STATE_INIT; } break; case STATE_TABLE: if (0 == xmlStrcasecmp (name, _xml("table:table-row")) && (XML_READER_TYPE_ELEMENT == r->node_type)) { xmlChar *value = xmlTextReaderGetAttribute (r->xtr, _xml ("table:number-rows-repeated")); int row_span = value ? _xmlchar_to_int (value) : 1; r->row += row_span; r->col = 0; if (! xmlTextReaderIsEmptyElement (r->xtr)) r->state = STATE_ROW; xmlFree (value); } else if (0 == xmlStrcasecmp (name, _xml("table:table")) && (XML_READER_TYPE_END_ELEMENT == r->node_type)) { r->state = STATE_SPREADSHEET; } break; case STATE_ROW: if ( (0 == xmlStrcasecmp (name, _xml ("table:table-cell"))) && (XML_READER_TYPE_ELEMENT == r->node_type)) { xmlChar *value = xmlTextReaderGetAttribute (r->xtr, _xml ("table:number-columns-repeated")); r->col_span = value ? _xmlchar_to_int (value) : 1; r->col += r->col_span; if (! xmlTextReaderIsEmptyElement (r->xtr)) r->state = STATE_CELL; xmlFree (value); } else if ( (0 == xmlStrcasecmp (name, _xml ("table:table-row"))) && (XML_READER_TYPE_END_ELEMENT == r->node_type)) { r->state = STATE_TABLE; } break; case STATE_CELL: if ( (0 == xmlStrcasecmp (name, _xml("text:p"))) && ( XML_READER_TYPE_ELEMENT == r->node_type)) { if (! xmlTextReaderIsEmptyElement (r->xtr)) r->state = STATE_CELL_CONTENT; } else if ( (0 == xmlStrcasecmp (name, _xml("table:table-cell"))) && (XML_READER_TYPE_END_ELEMENT == r->node_type) ) { r->state = STATE_ROW; } break; case STATE_CELL_CONTENT: assert (r->current_sheet >= 0); assert (r->current_sheet < or->n_allocated_sheets); if (or->sheets[r->current_sheet].start_row == -1) or->sheets[r->current_sheet].start_row = r->row - 1; if ( (or->sheets[r->current_sheet].start_col == -1) || (or->sheets[r->current_sheet].start_col >= r->col - 1) ) or->sheets[r->current_sheet].start_col = r->col - 1; or->sheets[r->current_sheet].stop_row = r->row - 1; if ( or->sheets[r->current_sheet].stop_col < r->col - 1) or->sheets[r->current_sheet].stop_col = r->col - 1; if (XML_READER_TYPE_END_ELEMENT == r->node_type) r->state = STATE_CELL; break; default: NOT_REACHED (); break; }; xmlFree (name); } /* A struct containing the parameters of a cell's value parsed from the xml */ struct xml_value { xmlChar *type; xmlChar *value; xmlChar *text; }; struct var_spec { char *name; struct xml_value firstval; }; /* Determine the width that a xmv should probably have */ static int xmv_to_width (const struct xml_value *xmv, int fallback) { int width = SPREADSHEET_DEFAULT_WIDTH; /* Non-strings always have zero width */ if (xmv->type != NULL && 0 != xmlStrcmp (xmv->type, _xml("string"))) return 0; if ( fallback != -1) return fallback; if ( xmv->value ) width = ROUND_UP (xmlStrlen (xmv->value), SPREADSHEET_DEFAULT_WIDTH); else if ( xmv->text) width = ROUND_UP (xmlStrlen (xmv->text), SPREADSHEET_DEFAULT_WIDTH); return width; } /* Sets the VAR of case C, to the value corresponding to the xml data */ static void convert_xml_to_value (struct ccase *c, const struct variable *var, const struct xml_value *xmv, int col, int row) { union value *v = case_data_rw (c, var); if (xmv->value == NULL && xmv->text == NULL) value_set_missing (v, var_get_width (var)); else if ( var_is_alpha (var)) /* Use the text field, because it seems that there is no value field for strings */ value_copy_str_rpad (v, var_get_width (var), xmv->text, ' '); else { const struct fmt_spec *fmt = var_get_write_format (var); enum fmt_category fc = fmt_get_category (fmt->type); assert ( fc != FMT_CAT_STRING); if ( 0 == xmlStrcmp (xmv->type, _xml("float"))) { v->f = c_strtod (CHAR_CAST (const char *, xmv->value), NULL); } else { const char *text = xmv->value ? CHAR_CAST (const char *, xmv->value) : CHAR_CAST (const char *, xmv->text); char *m = data_in (ss_cstr (text), "UTF-8", fmt->type, v, var_get_width (var), "UTF-8"); if (m) { char buf [FMT_STRING_LEN_MAX + 1]; char *cell = create_cell_ref (col, row); msg (MW, _("Cannot convert the value in the spreadsheet cell %s to format (%s): %s"), cell, fmt_to_string (fmt, buf), m); free (cell); } free (m); } } } /* Try to find out how many sheets there are in the "workbook" */ static int get_sheet_count (struct zip_reader *zreader) { xmlTextReaderPtr mxtr; struct zip_member *meta = NULL; meta = zip_member_open (zreader, "meta.xml"); if ( meta == NULL) return -1; mxtr = xmlReaderForIO ((xmlInputReadCallback) zip_member_read, (xmlInputCloseCallback) NULL, meta, NULL, NULL, 0); while (1 == xmlTextReaderRead (mxtr)) { xmlChar *name = xmlTextReaderName (mxtr); if ( 0 == xmlStrcmp (name, _xml("meta:document-statistic"))) { xmlChar *attr = xmlTextReaderGetAttribute (mxtr, _xml ("meta:table-count")); if ( attr != NULL) { int s = _xmlchar_to_int (attr); xmlFreeTextReader (mxtr); xmlFree (name); xmlFree (attr); return s; } xmlFree (attr); } xmlFree (name); } xmlFreeTextReader (mxtr); return -1; } static void ods_error_handler (void *ctx, const char *mesg, UNUSED xmlParserSeverities sev, xmlTextReaderLocatorPtr loc) { struct ods_reader *r = ctx; msg (MW, _("There was a problem whilst reading the %s file `%s' (near line %d): `%s'"), "ODF", r->spreadsheet.file_name, xmlTextReaderLocatorLineNumber (loc), mesg); } static xmlTextReaderPtr init_reader (struct ods_reader *r, bool report_errors) { struct zip_member *content = zip_member_open (r->zreader, "content.xml"); xmlTextReaderPtr xtr; if ( content == NULL) return NULL; xtr = xmlReaderForIO ((xmlInputReadCallback) zip_member_read, (xmlInputCloseCallback) NULL, content, NULL, NULL, report_errors ? 0 : (XML_PARSE_NOERROR | XML_PARSE_NOWARNING) ); if ( xtr == NULL) return false; r->spreadsheet.type = SPREADSHEET_ODS; if (report_errors) xmlTextReaderSetErrorHandler (xtr, ods_error_handler, r); return xtr; } struct spreadsheet * ods_probe (const char *filename, bool report_errors) { int sheet_count; struct ods_reader *r = xzalloc (sizeof *r); xmlTextReaderPtr xtr; struct zip_reader *zr; ds_init_empty (&r->zip_errs); zr = zip_reader_create (filename, &r->zip_errs); if (zr == NULL) { if (report_errors) { msg (ME, _("Cannot open %s as a OpenDocument file: %s"), filename, ds_cstr (&r->zip_errs)); } ds_destroy (&r->zip_errs); free (r); return NULL; } sheet_count = get_sheet_count (zr); r->zreader = zr; r->spreadsheet.ref_cnt = 1; xtr = init_reader (r, report_errors); if (xtr == NULL) { goto error; } r->msd.xtr = xtr; r->msd.row = 0; r->msd.col = 0; r->msd.current_sheet = 0; r->msd.state = STATE_INIT; r->spreadsheet.n_sheets = sheet_count; r->n_allocated_sheets = 0; r->sheets = NULL; r->spreadsheet.file_name = strdup (filename); return &r->spreadsheet; error: ds_destroy (&r->zip_errs); zip_reader_destroy (r->zreader); free (r); return NULL; } struct casereader * ods_make_reader (struct spreadsheet *spreadsheet, const struct spreadsheet_read_options *opts) { intf ret = 0; xmlChar *type = NULL; unsigned long int vstart = 0; casenumber n_cases = CASENUMBER_MAX; int i; struct var_spec *var_spec = NULL; int n_var_specs = 0; xmlTextReaderPtr xtr; struct ods_reader *r = (struct ods_reader *) spreadsheet; xmlChar *val_string = NULL; assert (r); r->read_names = opts->read_names; ds_init_empty (&r->ods_errs); ++r->spreadsheet.ref_cnt; xtr = init_reader (r, true); if ( xtr == NULL) goto error; r->rsd.xtr = xtr; r->rsd.row = 0; r->rsd.col = 0; r->rsd.current_sheet = 0; r->rsd.state = STATE_INIT; r->used_first_case = false; r->first_case = NULL; if (opts->cell_range) { if ( ! convert_cell_ref (opts->cell_range, &r->start_col, &r->start_row, &r->stop_col, &r->stop_row)) { msg (SE, _("Invalid cell range `%s'"), opts->cell_range); goto error; } } else { r->start_col = 0; r->start_row = 0; r->stop_col = -1; r->stop_row = -1; } r->target_sheet_name = xmlStrdup (BAD_CAST opts->sheet_name); r->target_sheet_index = opts->sheet_index; /* Advance to the start of the cells for the target sheet */ while ( ! reading_target_sheet (r, &r->rsd) || r->rsd.state != STATE_ROW || r->rsd.row <= r->start_row ) { if (1 != (ret = xmlTextReaderRead (r->rsd.xtr))) break; process_node (r, &r->rsd); } if (ret < 1) { msg (MW, _("Selected sheet or range of spreadsheet `%s' is empty."), spreadsheet->file_name); goto error; } if ( opts->read_names) { while (1 == xmlTextReaderRead (r->rsd.xtr)) { int idx; process_node (r, &r->rsd); /* If the row is finished then stop for now */ if (r->rsd.state == STATE_TABLE && r->rsd.row > r->start_row) break; idx = r->rsd.col - r->start_col -1 ; if ( idx < 0) continue; if (r->stop_col != -1 && idx > r->stop_col - r->start_col) continue; if (r->rsd.state == STATE_CELL_CONTENT && XML_READER_TYPE_TEXT == r->rsd.node_type) { xmlChar *value = xmlTextReaderValue (r->rsd.xtr); if ( idx >= n_var_specs) { var_spec = xrealloc (var_spec, sizeof (*var_spec) * (idx + 1)); /* xrealloc (unlike realloc) doesn't initialise its memory to 0 */ memset (var_spec + n_var_specs, 0, (idx - n_var_specs + 1) * sizeof (*var_spec)); n_var_specs = idx + 1; } var_spec[idx].firstval.text = 0; var_spec[idx].firstval.value = 0; var_spec[idx].firstval.type = 0; var_spec [idx].name = strdup (CHAR_CAST (const char *, value)); xmlFree (value); } } } /* Read in the first row of data */ while (1 == xmlTextReaderRead (r->rsd.xtr)) { int idx; process_node (r, &r->rsd); if ( ! reading_target_sheet (r, &r->rsd) ) break; /* If the row is finished then stop for now */ if (r->rsd.state == STATE_TABLE && r->rsd.row > r->start_row + (opts->read_names ? 1 : 0)) break; idx = r->rsd.col - r->start_col - 1; if (idx < 0) continue; if (r->stop_col != -1 && idx > r->stop_col - r->start_col) continue; if ( r->rsd.state == STATE_CELL && XML_READER_TYPE_ELEMENT == r->rsd.node_type) { type = xmlTextReaderGetAttribute (r->rsd.xtr, _xml ("office:value-type")); val_string = xmlTextReaderGetAttribute (r->rsd.xtr, _xml ("office:value")); } if ( r->rsd.state == STATE_CELL_CONTENT && XML_READER_TYPE_TEXT == r->rsd.node_type) { if (idx >= n_var_specs) { var_spec = xrealloc (var_spec, sizeof (*var_spec) * (idx + 1)); memset (var_spec + n_var_specs, 0, (idx - n_var_specs + 1) * sizeof (*var_spec)); var_spec [idx].name = NULL; n_var_specs = idx + 1; } var_spec [idx].firstval.type = type; var_spec [idx].firstval.text = xmlTextReaderValue (r->rsd.xtr); var_spec [idx].firstval.value = val_string; val_string = NULL; type = NULL; } } /* Create the dictionary and populate it */ r->spreadsheet.dict = r->dict = dict_create ( CHAR_CAST (const char *, xmlTextReaderConstEncoding (r->rsd.xtr))); for (i = 0; i < n_var_specs ; ++i ) { struct fmt_spec fmt; struct variable *var = NULL; char *name = dict_make_unique_var_name (r->dict, var_spec[i].name, &vstart); int width = xmv_to_width (&var_spec[i].firstval, opts->asw); dict_create_var (r->dict, name, width); free (name); var = dict_get_var (r->dict, i); if ( 0 == xmlStrcmp (var_spec[i].firstval.type, _xml("date"))) { fmt.type = FMT_DATE; fmt.d = 0; fmt.w = 20; } else fmt = fmt_default_for_width (width); var_set_both_formats (var, &fmt); } if ( n_var_specs == 0 ) { msg (MW, _("Selected sheet or range of spreadsheet `%s' is empty."), spreadsheet->file_name); goto error; } /* Create the first case, and cache it */ r->proto = caseproto_ref (dict_get_proto (r->dict)); r->first_case = case_create (r->proto); case_set_missing (r->first_case); for (i = 0 ; i < n_var_specs; ++i) { const struct variable *var = dict_get_var (r->dict, i); convert_xml_to_value (r->first_case, var, &var_spec[i].firstval, r->rsd.col - n_var_specs + i, r->rsd.row - 1); } /* Read in the first row of data */ while (1 == xmlTextReaderRead (r->rsd.xtr)) { process_node (r, &r->rsd); if (r->rsd.state == STATE_ROW) break; } for ( i = 0 ; i < n_var_specs ; ++i ) { free (var_spec[i].firstval.type); free (var_spec[i].firstval.value); free (var_spec[i].firstval.text); free (var_spec[i].name); } free (var_spec); return casereader_create_sequential (NULL, r->proto, n_cases, &ods_file_casereader_class, r); error: for ( i = 0 ; i < n_var_specs ; ++i ) { free (var_spec[i].firstval.type); free (var_spec[i].firstval.value); free (var_spec[i].firstval.text); free (var_spec[i].name); } free (var_spec); ods_file_casereader_destroy (NULL, r); return NULL; } /* Reads and returns one case from READER's file. Returns a null pointer on failure. */ static struct ccase * ods_file_casereader_read (struct casereader *reader UNUSED, void *r_) { struct ccase *c = NULL; struct ods_reader *r = r_; xmlChar *val_string = NULL; xmlChar *type = NULL; if (!r->used_first_case) { r->used_first_case = true; return r->first_case; } /* Advance to the start of a row. (If there is one) */ while (r->rsd.state != STATE_ROW && 1 == xmlTextReaderRead (r->rsd.xtr) ) { process_node (r, &r->rsd); } if ( ! reading_target_sheet (r, &r->rsd) || r->rsd.state < STATE_TABLE || (r->stop_row != -1 && r->rsd.row > r->stop_row + 1) ) { return NULL; } c = case_create (r->proto); case_set_missing (c); while (1 == xmlTextReaderRead (r->rsd.xtr)) { process_node (r, &r->rsd); if ( r->stop_row != -1 && r->rsd.row > r->stop_row + 1) break; if (r->rsd.state == STATE_CELL && r->rsd.node_type == XML_READER_TYPE_ELEMENT) { type = xmlTextReaderGetAttribute (r->rsd.xtr, _xml ("office:value-type")); val_string = xmlTextReaderGetAttribute (r->rsd.xtr, _xml ("office:value")); } if (r->rsd.state == STATE_CELL_CONTENT && r->rsd.node_type == XML_READER_TYPE_TEXT) { int col; struct xml_value *xmv = xzalloc (sizeof *xmv); xmv->text = xmlTextReaderValue (r->rsd.xtr); xmv->value = val_string; val_string = NULL; xmv->type = type; type = NULL; for (col = 0; col < r->rsd.col_span; ++col) { const struct variable *var; const int idx = r->rsd.col - col - r->start_col - 1; if (idx < 0) continue; if (r->stop_col != -1 && idx > r->stop_col - r->start_col ) break; if (idx >= dict_get_var_cnt (r->dict)) break; var = dict_get_var (r->dict, idx); convert_xml_to_value (c, var, xmv, idx + r->start_col, r->rsd.row - 1); } xmlFree (xmv->text); xmlFree (xmv->value); xmlFree (xmv->type); free (xmv); } if ( r->rsd.state <= STATE_TABLE) break; } xmlFree (type); xmlFree (val_string); return c; } #endif pspp-1.0.1/src/data/any-writer.c0000644000175000017500000000416112642117700013363 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/any-writer.h" #include #include #include #include #include #include "data/dataset-writer.h" #include "data/file-handle-def.h" #include "data/file-name.h" #include "data/por-file-writer.h" #include "data/sys-file-writer.h" #include "libpspp/assertion.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Creates and returns a writer for HANDLE with the given DICT. */ struct casewriter * any_writer_open (struct file_handle *handle, struct dictionary *dict) { switch (fh_get_referent (handle)) { case FH_REF_FILE: { struct casewriter *writer; char *extension; extension = fn_extension (handle); str_lowercase (extension); if (!strcmp (extension, ".por")) writer = pfm_open_writer (handle, dict, pfm_writer_default_options ()); else writer = sfm_open_writer (handle, dict, sfm_writer_default_options ()); free (extension); return writer; } case FH_REF_INLINE: msg (ME, _("The inline file is not allowed here.")); return NULL; case FH_REF_DATASET: return dataset_writer_open (handle, dict); } NOT_REACHED (); } pspp-1.0.1/src/data/sys-file-writer.h0000644000175000017500000000262612523704223014340 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SFM_WRITE_H #define SFM_WRITE_H 1 #include #include "any-reader.h" /* Writing system files. */ /* Options for creating a system file. */ struct sfm_write_options { enum any_compression compression; bool create_writeable; /* File perms: writeable or read/only? */ int version; /* System file version (currently 2 or 3). */ }; struct file_handle; struct dictionary; struct casewriter *sfm_open_writer (struct file_handle *, struct dictionary *, struct sfm_write_options); struct sfm_write_options sfm_writer_default_options (void); #endif /* sys-file-writer.h */ pspp-1.0.1/src/data/val-type.h0000644000175000017500000000336512470243700013034 00000000000000/* PSPP - computes sample statistics. Copyright (C) 2007, 2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef DATA_VAL_TYPE_H #define DATA_VAL_TYPE_H 1 #include #include #include "libpspp/float-format.h" /* Special numeric values. */ #define SYSMIS (-DBL_MAX) /* System-missing value. */ #define LOWEST (float_get_lowest ()) /* Smallest nonmissing finite value. */ #define HIGHEST DBL_MAX /* Largest finite value. */ /* Maximum length of a string variable. */ #define MAX_STRING 32767 /* Value type. */ enum val_type { VAL_NUMERIC, /* A numeric value. */ VAL_STRING /* A string value. */ }; /* Returns true if VAL_TYPE is a valid value type. */ static inline bool val_type_is_valid (enum val_type val_type) { return val_type == VAL_NUMERIC || val_type == VAL_STRING; } /* Returns the value type for the given WIDTH. */ static inline enum val_type val_type_from_width (int width) { return width != 0 ? VAL_STRING : VAL_NUMERIC; } #endif /* data/val-type.h */ pspp-1.0.1/src/data/por-file-writer.c0000644000175000017500000005725713137223525014332 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/por-file-writer.h" #include #include #include #include #include #include #include #include #include "data/case.h" #include "data/casewriter-provider.h" #include "data/casewriter.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/format.h" #include "data/make-file.h" #include "data/missing-values.h" #include "data/short-names.h" #include "data/value-labels.h" #include "data/variable.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "libpspp/version.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) /* Maximum width of a variable in a portable file. */ #define MAX_POR_WIDTH 255 /* Portable file writer. */ struct pfm_writer { struct file_handle *fh; /* File handle. */ struct fh_lock *lock; /* Lock on file handle. */ FILE *file; /* File stream. */ struct replace_file *rf; /* Ticket for replacing output file. */ int lc; /* Number of characters on this line so far. */ size_t var_cnt; /* Number of variables. */ struct pfm_var *vars; /* Variables. */ int digits; /* Digits of precision. */ }; /* A variable to write to the portable file. */ struct pfm_var { int width; /* 0=numeric, otherwise string var width. */ int case_index; /* Index in case. */ }; static const struct casewriter_class por_file_casewriter_class; static bool close_writer (struct pfm_writer *); static void buf_write (struct pfm_writer *, const void *, size_t); static void write_header (struct pfm_writer *); static void write_version_data (struct pfm_writer *); static void write_variables (struct pfm_writer *, struct dictionary *); static void write_value_labels (struct pfm_writer *, const struct dictionary *); static void write_documents (struct pfm_writer *, const struct dictionary *); static void format_trig_double (long double, int base_10_precision, char[]); static char *format_trig_int (int, bool force_sign, char[]); /* Returns default options for writing a portable file. */ struct pfm_write_options pfm_writer_default_options (void) { struct pfm_write_options opts; opts.create_writeable = true; opts.type = PFM_COMM; opts.digits = DBL_DIG; return opts; } /* Writes the dictionary DICT to portable file HANDLE according to the given OPTS. Returns nonzero only if successful. DICT will not be modified, except to assign short names. */ struct casewriter * pfm_open_writer (struct file_handle *fh, struct dictionary *dict, struct pfm_write_options opts) { struct pfm_writer *w = NULL; mode_t mode; size_t i; /* Initialize data structures. */ w = xmalloc (sizeof *w); w->fh = fh_ref (fh); w->lock = NULL; w->file = NULL; w->rf = NULL; w->lc = 0; w->var_cnt = 0; w->vars = NULL; w->var_cnt = dict_get_var_cnt (dict); w->vars = xnmalloc (w->var_cnt, sizeof *w->vars); for (i = 0; i < w->var_cnt; i++) { const struct variable *dv = dict_get_var (dict, i); struct pfm_var *pv = &w->vars[i]; pv->width = MIN (var_get_width (dv), MAX_POR_WIDTH); pv->case_index = var_get_case_index (dv); } w->digits = opts.digits; if (w->digits < 1) { msg (ME, _("Invalid decimal digits count %d. Treating as %d."), w->digits, DBL_DIG); w->digits = DBL_DIG; } /* Lock file. */ /* TRANSLATORS: this fragment will be interpolated into messages in fh_lock() that identify types of files. */ w->lock = fh_lock (fh, FH_REF_FILE, N_("portable file"), FH_ACC_WRITE, true); if (w->lock == NULL) goto error; /* Create file. */ mode = 0444; if (opts.create_writeable) mode |= 0222; w->rf = replace_file_start (fh, "w", mode, &w->file); if (w->rf == NULL) { msg (ME, _("Error opening `%s' for writing as a portable file: %s."), fh_get_file_name (fh), strerror (errno)); goto error; } /* Write file header. */ write_header (w); write_version_data (w); write_variables (w, dict); write_value_labels (w, dict); if (dict_get_document_line_cnt (dict) > 0) write_documents (w, dict); buf_write (w, "F", 1); if (ferror (w->file)) goto error; return casewriter_create (dict_get_proto (dict), &por_file_casewriter_class, w); error: close_writer (w); return NULL; } /* Write NBYTES starting at BUF to the portable file represented by H. Break lines properly every 80 characters. */ static void buf_write (struct pfm_writer *w, const void *buf_, size_t nbytes) { const char *buf = buf_; if (ferror (w->file)) return; assert (buf != NULL); while (nbytes + w->lc >= 80) { size_t n = 80 - w->lc; if (n) fwrite (buf, n, 1, w->file); fwrite ("\r\n", 2, 1, w->file); nbytes -= n; buf += n; w->lc = 0; } fwrite (buf, nbytes, 1, w->file); w->lc += nbytes; } /* Write D to the portable file as a floating-point field. */ static void write_float (struct pfm_writer *w, double d) { char buffer[64]; format_trig_double (d, floor (d) == d ? DBL_DIG : w->digits, buffer); buf_write (w, buffer, strlen (buffer)); if (d != SYSMIS) buf_write (w, "/", 1); } /* Write N to the portable file as an integer field. */ static void write_int (struct pfm_writer *w, int n) { char buffer[64]; format_trig_int (n, false, buffer); buf_write (w, buffer, strlen (buffer)); buf_write (w, "/", 1); } /* Write S to the portable file as a string field. */ static void write_string (struct pfm_writer *w, const char *s) { size_t n = strlen (s); write_int (w, (int) n); buf_write (w, s, n); } /* Write file header. */ static void write_header (struct pfm_writer *w) { static const char spss2ascii[256] = { "0000000000000000000000000000000000000000000000000000000000000000" "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ." "<(+|&[]!$*);^-/|,%_>?`:$@'=\"000000~-0000123456789000-()0{}\\00000" "0000000000000000000000000000000000000000000000000000000000000000" }; int i; for (i = 0; i < 5; i++) buf_write (w, "ASCII SPSS PORT FILE ", 40); buf_write (w, spss2ascii, 256); buf_write (w, "SPSSPORT", 8); } /* Writes version, date, and identification records. */ static void write_version_data (struct pfm_writer *w) { char date_str[9]; char time_str[7]; time_t t; struct tm tm; struct tm *tmp; if ((time_t) -1 == time (&t)) { tm.tm_sec = tm.tm_min = tm.tm_hour = tm.tm_mon = tm.tm_year = 0; tm.tm_mday = 1; tmp = &tm; } else tmp = localtime (&t); sprintf (date_str, "%04d%02d%02d", tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday); sprintf (time_str, "%02d%02d%02d", tmp->tm_hour, tmp->tm_min, tmp->tm_sec); buf_write (w, "A", 1); write_string (w, date_str); write_string (w, time_str); /* Product identification. */ buf_write (w, "1", 1); write_string (w, version); /* Subproduct identification. */ buf_write (w, "3", 1); write_string (w, host_system); } /* Write format F to file H. The format is first resized to fit a value of the given WIDTH, which is handy in case F represents a string longer than 255 bytes and thus WIDTH is truncated to 255 bytes. */ static void write_format (struct pfm_writer *w, struct fmt_spec f, int width) { fmt_resize (&f, width); write_int (w, fmt_to_io (f.type)); write_int (w, f.w); write_int (w, f.d); } /* Write value V with width WIDTH to file H. */ static void write_value (struct pfm_writer *w, const union value *v, int width) { if (width == 0) write_float (w, v->f); else { width = MIN (width, MAX_POR_WIDTH); write_int (w, width); buf_write (w, value_str (v, width), width); } } /* Write variable records. */ static void write_variables (struct pfm_writer *w, struct dictionary *dict) { int i; short_names_assign (dict); if (dict_get_weight (dict) != NULL) { buf_write (w, "6", 1); write_string (w, var_get_short_name (dict_get_weight (dict), 0)); } buf_write (w, "4", 1); write_int (w, dict_get_var_cnt (dict)); buf_write (w, "5", 1); write_int (w, ceil (w->digits * (log (10) / log (30)))); for (i = 0; i < dict_get_var_cnt (dict); i++) { struct variable *v = dict_get_var (dict, i); struct missing_values mv; int width = MIN (var_get_width (v), MAX_POR_WIDTH); int j; buf_write (w, "7", 1); write_int (w, width); write_string (w, var_get_short_name (v, 0)); write_format (w, *var_get_print_format (v), width); write_format (w, *var_get_write_format (v), width); /* Write missing values. */ mv_copy (&mv, var_get_missing_values (v)); if (var_get_width (v) > 8) mv_resize (&mv, 8); if (mv_has_range (&mv)) { double x, y; mv_get_range (&mv, &x, &y); if (x == LOWEST) { buf_write (w, "9", 1); write_float (w, y); } else if (y == HIGHEST) { buf_write (w, "A", 1); write_float (w, y); } else { buf_write (w, "B", 1); write_float (w, x); write_float (w, y); } } for (j = 0; j < mv_n_values (&mv); j++) { buf_write (w, "8", 1); write_value (w, mv_get_value (&mv, j), mv_get_width (&mv)); } mv_destroy (&mv); /* Write variable label. */ if (var_get_label (v) != NULL) { buf_write (w, "C", 1); write_string (w, var_get_label (v)); } } } /* Write value labels to disk. FIXME: Inefficient. */ static void write_value_labels (struct pfm_writer *w, const struct dictionary *dict) { int i; for (i = 0; i < dict_get_var_cnt (dict); i++) { struct variable *v = dict_get_var (dict, i); const struct val_labs *val_labs = var_get_value_labels (v); size_t n_labels = val_labs_count (val_labs); const struct val_lab **labels; int j; if (n_labels == 0) continue; buf_write (w, "D", 1); write_int (w, 1); write_string (w, var_get_short_name (v, 0)); write_int (w, val_labs_count (val_labs)); n_labels = val_labs_count (val_labs); labels = val_labs_sorted (val_labs); for (j = 0; j < n_labels; j++) { const struct val_lab *vl = labels[j]; write_value (w, val_lab_get_value (vl), var_get_width (v)); write_string (w, val_lab_get_escaped_label (vl)); } free (labels); } } /* Write documents in DICT to portable file W. */ static void write_documents (struct pfm_writer *w, const struct dictionary *dict) { size_t line_cnt = dict_get_document_line_cnt (dict); struct string line = DS_EMPTY_INITIALIZER; int i; buf_write (w, "E", 1); write_int (w, line_cnt); for (i = 0; i < line_cnt; i++) write_string (w, dict_get_document_line (dict, i)); ds_destroy (&line); } /* Writes case C to the portable file represented by WRITER. */ static void por_file_casewriter_write (struct casewriter *writer, void *w_, struct ccase *c) { struct pfm_writer *w = w_; int i; if (!ferror (w->file)) { for (i = 0; i < w->var_cnt; i++) { struct pfm_var *v = &w->vars[i]; if (v->width == 0) write_float (w, case_num_idx (c, v->case_index)); else { write_int (w, v->width); buf_write (w, case_str_idx (c, v->case_index), v->width); } } } else casewriter_force_error (writer); case_unref (c); } static void por_file_casewriter_destroy (struct casewriter *writer, void *w_) { struct pfm_writer *w = w_; if (!close_writer (w)) casewriter_force_error (writer); } /* Closes a portable file after we're done with it. Returns true if successful, false if an I/O error occurred. */ static bool close_writer (struct pfm_writer *w) { bool ok; if (w == NULL) return true; ok = true; if (w->file != NULL) { char buf[80]; memset (buf, 'Z', sizeof buf); buf_write (w, buf, w->lc >= 80 ? 80 : 80 - w->lc); ok = !ferror (w->file); if (fclose (w->file) == EOF) ok = false; if (!ok) msg (ME, _("An I/O error occurred writing portable file `%s'."), fh_get_file_name (w->fh)); if (ok ? !replace_file_commit (w->rf) : !replace_file_abort (w->rf)) ok = false; } fh_unlock (w->lock); fh_unref (w->fh); free (w->vars); free (w); return ok; } /* Base-30 conversion. Portable files represent numbers in base-30 format, so we need to be able to convert real and integer number to that base. Older versions of PSPP used libgmp to do so, but this added a big library dependency to do just one thing. Now we do it ourselves internally. Important fact: base 30 is called "trigesimal". */ /* Conversion base. */ #define BASE 30 /* As an integer. */ #define LDBASE ((long double) BASE) /* As a long double. */ /* This is floor(log30(2**31)), the minimum number of trigesimal digits that a `long int' can hold. */ #define CHUNK_SIZE 6 /* pow_tab[i] = pow (30, pow (2, i)) */ static long double pow_tab[16]; /* Initializes pow_tab[]. */ static void init_pow_tab (void) { static bool did_init = false; long double power; size_t i; /* Only initialize once. */ if (did_init) return; did_init = true; /* Set each element of pow_tab[] until we run out of numerical range. */ i = 0; for (power = 30.0L; power < DBL_MAX; power *= power) { assert (i < sizeof pow_tab / sizeof *pow_tab); pow_tab[i++] = power; } } /* Returns 30**EXPONENT, for 0 <= EXPONENT <= log30(DBL_MAX). */ static long double pow30_nonnegative (int exponent) { long double power; int i; assert (exponent >= 0); assert (exponent < 1L << (sizeof pow_tab / sizeof *pow_tab)); power = 1.L; for (i = 0; exponent > 0; exponent >>= 1, i++) if (exponent & 1) power *= pow_tab[i]; return power; } /* Returns 30**EXPONENT, for log30(DBL_MIN) <= EXPONENT <= log30(DBL_MAX). */ static long double pow30 (int exponent) { if (exponent >= 0) return pow30_nonnegative (exponent); else return 1.L / pow30_nonnegative (-exponent); } /* Returns the character corresponding to TRIG. */ static int trig_to_char (int trig) { assert (trig >= 0 && trig < 30); return "0123456789ABCDEFGHIJKLMNOPQRST"[trig]; } /* Formats the TRIG_CNT trigs in TRIGS[], writing them as null-terminated STRING. The trigesimal point is inserted after TRIG_PLACES characters have been printed, if necessary adding extra zeros at either end for correctness. Returns the character after the formatted number. */ static char * format_trig_digits (char *string, const char trigs[], int trig_cnt, int trig_places) { if (trig_places < 0) { *string++ = '.'; while (trig_places++ < 0) *string++ = '0'; trig_places = -1; } while (trig_cnt-- > 0) { if (trig_places-- == 0) *string++ = '.'; *string++ = trig_to_char (*trigs++); } while (trig_places-- > 0) *string++ = '0'; *string = '\0'; return string; } /* Helper function for format_trig_int() that formats VALUE as a trigesimal integer at CP. VALUE must be nonnegative. Returns the character following the formatted integer. */ static char * recurse_format_trig_int (char *cp, int value) { int trig = value % BASE; value /= BASE; if (value > 0) cp = recurse_format_trig_int (cp, value); *cp++ = trig_to_char (trig); return cp; } /* Formats VALUE as a trigesimal integer in null-terminated STRING[]. VALUE must be in the range -DBL_MAX...DBL_MAX. If FORCE_SIGN is true, a sign is always inserted; otherwise, a sign is only inserted if VALUE is negative. */ static char * format_trig_int (int value, bool force_sign, char string[]) { /* Insert sign. */ if (value < 0) { *string++ = '-'; value = -value; } else if (force_sign) *string++ = '+'; /* Format integer. */ string = recurse_format_trig_int (string, value); *string = '\0'; return string; } /* Determines whether the TRIG_CNT trigesimals in TRIGS[] warrant rounding up or down. Returns true if TRIGS[] represents a value greater than half, false if less than half. If TRIGS[] is exactly half, examines TRIGS[-1] and returns true if odd, false if even ("round to even"). */ static bool should_round_up (const char trigs[], int trig_cnt) { assert (trig_cnt > 0); if (*trigs < BASE / 2) { /* Less than half: round down. */ return false; } else if (*trigs > BASE / 2) { /* Greater than half: round up. */ return true; } else { /* Approximately half: look more closely. */ int i; for (i = 1; i < trig_cnt; i++) if (trigs[i] > 0) { /* Slightly greater than half: round up. */ return true; } /* Exactly half: round to even. */ return trigs[-1] % 2; } } /* Rounds up the rightmost trig in the TRIG_CNT trigs in TRIGS[], carrying to the left as necessary. Returns true if successful, false on failure (due to a carry out of the leftmost position). */ static bool try_round_up (char *trigs, int trig_cnt) { while (trig_cnt > 0) { char *round_trig = trigs + --trig_cnt; if (*round_trig != BASE - 1) { /* Round this trig up to the next value. */ ++*round_trig; return true; } /* Carry over to the next trig to the left. */ *round_trig = 0; } /* Ran out of trigs to carry. */ return false; } /* Converts VALUE to trigesimal format in string OUTPUT[] with the equivalent of at least BASE_10_PRECISION decimal digits of precision. The output format may use conventional or scientific notation. Missing, infinite, and extreme values are represented with "*.". */ static void format_trig_double (long double value, int base_10_precision, char output[]) { /* Original VALUE was negative? */ bool negative; /* Number of significant trigesimals. */ int base_30_precision; /* Base-2 significand and exponent for original VALUE. */ double base_2_sig; int base_2_exp; /* VALUE as a set of trigesimals. */ char buffer[DBL_DIG + 16]; char *trigs; int trig_cnt; /* Number of trigesimal places for trigs. trigs[0] has coefficient 30**(trig_places - 1), trigs[1] has coefficient 30**(trig_places - 2), and so on. In other words, the trigesimal point is just before trigs[0]. */ int trig_places; /* Number of trigesimal places left to write into BUFFER. */ int trigs_to_output; init_pow_tab (); /* Handle special cases. */ if (value == SYSMIS) goto missing_value; if (value == 0.) goto zero; /* Make VALUE positive. */ if (value < 0) { value = -value; negative = true; } else negative = false; /* Adjust VALUE to roughly 30**3, by shifting the trigesimal point left or right as necessary. We approximate the base-30 exponent by obtaining the base-2 exponent, then multiplying by log30(2). This approximation is sufficient to ensure that the adjusted VALUE is always in the range 0...30**6, an invariant of the loop below. */ errno = 0; base_2_sig = frexp (value, &base_2_exp); if (errno != 0 || !isfinite (base_2_sig)) goto missing_value; if (base_2_exp == 0 && base_2_sig == 0.) goto zero; if (base_2_exp <= INT_MIN / 20379L || base_2_exp >= INT_MAX / 20379L) goto missing_value; trig_places = (base_2_exp * 20379L / 100000L) + CHUNK_SIZE / 2; value *= pow30 (CHUNK_SIZE - trig_places); /* Dump all the trigs to buffer[], CHUNK_SIZE at a time. */ trigs = buffer; trig_cnt = 0; for (trigs_to_output = DIV_RND_UP (DBL_DIG * 2, 3) + 1 + (CHUNK_SIZE / 2); trigs_to_output > 0; trigs_to_output -= CHUNK_SIZE) { long chunk; int trigs_left; /* The current chunk is just the integer part of VALUE, truncated to the nearest integer. The chunk fits in a long. */ chunk = value; assert (pow30 (CHUNK_SIZE) <= LONG_MAX); assert (chunk >= 0 && chunk < pow30 (CHUNK_SIZE)); value -= chunk; /* Append the chunk, in base 30, to trigs[]. */ for (trigs_left = CHUNK_SIZE; chunk > 0 && trigs_left > 0; ) { trigs[trig_cnt + --trigs_left] = chunk % 30; chunk /= 30; } while (trigs_left > 0) trigs[trig_cnt + --trigs_left] = 0; trig_cnt += CHUNK_SIZE; /* Proceed to the next chunk. */ if (value == 0.) break; value *= pow (LDBASE, CHUNK_SIZE); } /* Strip leading zeros. */ while (trig_cnt > 1 && *trigs == 0) { trigs++; trig_cnt--; trig_places--; } /* Round to requested precision, conservatively estimating the required base-30 precision as 2/3 of the base-10 precision (log30(10) = .68). */ assert (base_10_precision > 0); if (base_10_precision > LDBL_DIG) base_10_precision = LDBL_DIG; base_30_precision = DIV_RND_UP (base_10_precision * 2, 3); if (trig_cnt > base_30_precision) { if (should_round_up (trigs + base_30_precision, trig_cnt - base_30_precision)) { /* Try to round up. */ if (try_round_up (trigs, base_30_precision)) { /* Rounding up worked. */ trig_cnt = base_30_precision; } else { /* Couldn't round up because we ran out of trigs to carry into. Do the carry here instead. */ *trigs = 1; trig_cnt = 1; trig_places++; } } else { /* Round down. */ trig_cnt = base_30_precision; } } else { /* No rounding required: fewer digits available than requested. */ } /* Strip trailing zeros. */ while (trig_cnt > 1 && trigs[trig_cnt - 1] == 0) trig_cnt--; /* Write output. */ if (negative) *output++ = '-'; if (trig_places >= -1 && trig_places < trig_cnt + 3) { /* Use conventional notation. */ format_trig_digits (output, trigs, trig_cnt, trig_places); } else { /* Use scientific notation. */ char *op; op = format_trig_digits (output, trigs, trig_cnt, trig_cnt); op = format_trig_int (trig_places - trig_cnt, true, op); } return; zero: strcpy (output, "0"); return; missing_value: strcpy (output, "*."); return; } static const struct casewriter_class por_file_casewriter_class = { por_file_casewriter_write, por_file_casewriter_destroy, NULL, }; pspp-1.0.1/src/data/transformations.c0000644000175000017500000001347112470445540014524 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/transformations.h" #include #include #include "libpspp/str.h" #include "gl/xalloc.h" /* A single transformation. */ struct transformation { /* Offset to add to EXECUTE's return value, if it returns a transformation index. Normally 0 but set to the starting index of a spliced chain after splicing. */ int idx_ofs; trns_finalize_func *finalize; /* Finalize proc. */ trns_proc_func *execute; /* Executes the transformation. */ trns_free_func *free; /* Garbage collector proc. */ void *aux; /* Auxiliary data. */ }; /* A chain of transformations. */ struct trns_chain { struct transformation *trns; /* Array of transformations. */ size_t trns_cnt; /* Number of transformations. */ size_t trns_cap; /* Allocated capacity. */ bool finalized; /* Finalize functions called? */ }; /* Allocates and returns a new transformation chain. */ struct trns_chain * trns_chain_create (void) { struct trns_chain *chain = xmalloc (sizeof *chain); chain->trns = NULL; chain->trns_cnt = 0; chain->trns_cap = 0; chain->finalized = false; return chain; } /* Finalizes all the un-finalized transformations in CHAIN. Any given transformation is only finalized once. */ void trns_chain_finalize (struct trns_chain *chain) { while (!chain->finalized) { size_t i; chain->finalized = true; for (i = 0; i < chain->trns_cnt; i++) { struct transformation *trns = &chain->trns[i]; trns_finalize_func *finalize = trns->finalize; trns->finalize = NULL; if (finalize != NULL) finalize (trns->aux); } } } /* Destroys CHAIN, finalizing it in the process if it has not already been finalized. */ bool trns_chain_destroy (struct trns_chain *chain) { bool ok = true; if (chain != NULL) { size_t i; /* Needed to ensure that the control stack gets cleared. */ trns_chain_finalize (chain); for (i = 0; i < chain->trns_cnt; i++) { struct transformation *trns = &chain->trns[i]; if (trns->free != NULL) ok = trns->free (trns->aux) && ok; } free (chain->trns); free (chain); } return ok; } /* Returns true if CHAIN contains any transformations, false otherwise. */ bool trns_chain_is_empty (const struct trns_chain *chain) { return chain->trns_cnt == 0; } /* Adds a transformation to CHAIN with finalize function FINALIZE, execute function EXECUTE, free function FREE, and auxiliary data AUX. */ void trns_chain_append (struct trns_chain *chain, trns_finalize_func *finalize, trns_proc_func *execute, trns_free_func *free, void *aux) { struct transformation *trns; chain->finalized = false; if (chain->trns_cnt == chain->trns_cap) chain->trns = x2nrealloc (chain->trns, &chain->trns_cap, sizeof *chain->trns); trns = &chain->trns[chain->trns_cnt++]; trns->idx_ofs = 0; trns->finalize = finalize; trns->execute = execute; trns->free = free; trns->aux = aux; } /* Appends the transformations in SRC to those in DST, and destroys SRC. Both DST and SRC must already be finalized. */ void trns_chain_splice (struct trns_chain *dst, struct trns_chain *src) { size_t i; assert (dst->finalized); assert (src->finalized); if (dst->trns_cnt + src->trns_cnt > dst->trns_cap) { dst->trns_cap = dst->trns_cnt + src->trns_cnt; dst->trns = xnrealloc (dst->trns, dst->trns_cap, sizeof *dst->trns); } for (i = 0; i < src->trns_cnt; i++) { struct transformation *d = &dst->trns[i + dst->trns_cnt]; const struct transformation *s = &src->trns[i]; *d = *s; d->idx_ofs += src->trns_cnt; } dst->trns_cnt += src->trns_cnt; src->trns_cnt = 0; trns_chain_destroy (src); } /* Returns the index that a transformation execution function may return to "jump" to the next transformation to be added. */ size_t trns_chain_next (struct trns_chain *chain) { return chain->trns_cnt; } /* Executes the given CHAIN of transformations on *C, passing CASE_NR as the case number. *C may be replaced by a new case. Returns the result code that caused the transformations to terminate, or TRNS_CONTINUE if the transformations finished due to "falling off the end" of the set of transformations. */ enum trns_result trns_chain_execute (const struct trns_chain *chain, enum trns_result start, struct ccase **c, casenumber case_nr) { size_t i; assert (chain->finalized); for (i = start < 0 ? 0 : start; i < chain->trns_cnt; ) { struct transformation *trns = &chain->trns[i]; int retval = trns->execute (trns->aux, c, case_nr); if (retval == TRNS_CONTINUE) i++; else if (retval >= 0) i = retval + trns->idx_ofs; else return retval == TRNS_END_CASE ? i + 1 : retval; } return TRNS_CONTINUE; } pspp-1.0.1/src/data/file-name.h0000644000175000017500000000274312642117700013130 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef FILE_NAME_H #define FILE_NAME_H 1 #include #include #include struct file_handle ; char *fn_search_path (const char *base_name, char **path); char *fn_extension (const struct file_handle *); bool fn_exists (const struct file_handle *); FILE *fn_open (const struct file_handle *fn, const char *mode); int fn_close (const struct file_handle *fn, FILE *file); const char * default_output_path (void); #if defined _WIN32 || defined __WIN32__ #define WIN32_LEAN_AND_MEAN /* avoid including junk */ #define UNICODE 1 #include #else typedef char TCHAR; #endif TCHAR * convert_to_filename_encoding (const char *s, size_t len, const char *current_encoding); #endif /* file-name.h */ pspp-1.0.1/src/data/format-guesser.h0000644000175000017500000000220012470243700014221 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef FORMAT_GUESSER_H #define FORMAT_GUESSER_H 1 #include "libpspp/str.h" struct fmt_spec; struct fmt_guesser *fmt_guesser_create (void); void fmt_guesser_destroy (struct fmt_guesser *); void fmt_guesser_clear (struct fmt_guesser *); void fmt_guesser_add (struct fmt_guesser *, struct substring); void fmt_guesser_guess (struct fmt_guesser *, struct fmt_spec *); #endif /* format-guesser.h */ pspp-1.0.1/src/data/ods-reader.h0000644000175000017500000000234613137223525013322 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef ODS_READ_H #define ODS_READ_H 1 struct casereader; struct dictionary; struct spreadsheet_read_options; struct spreadsheet; const char * ods_get_sheet_name (struct spreadsheet *s, int n); char * ods_get_sheet_range (struct spreadsheet *s, int n); struct spreadsheet *ods_probe (const char *filename, bool report_errors); struct casereader * ods_make_reader (struct spreadsheet *spreadsheet, const struct spreadsheet_read_options *opts); void ods_unref (struct spreadsheet *s); #endif pspp-1.0.1/src/data/file-handle-def.h0000644000175000017500000001101112615456173014175 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2005, 2006, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef FILE_HANDLE_DEF_H #define FILE_HANDLE_DEF_H #include #include struct dataset; /* What a file handle refers to. (Ordinarily only a single value is allowed, but fh_open() and fh_parse() take a mask.) */ enum fh_referent { FH_REF_FILE = 001, /* Ordinary file (the most common case). */ FH_REF_INLINE = 002, /* The inline file. */ FH_REF_DATASET = 004 /* Dataset. */ }; /* File modes. */ enum fh_mode { FH_MODE_TEXT, /* New-line delimited lines. */ FH_MODE_FIXED, /* Fixed-length records. */ FH_MODE_VARIABLE, /* Binary variable-length records. */ FH_MODE_360_VARIABLE, /* IBM 360 variable-length records. */ FH_MODE_360_SPANNED, /* IBM 360 variable-length, spanned records. */ }; /* Ways to access a file. */ enum fh_access { FH_ACC_READ, /* Read from it. */ FH_ACC_WRITE /* Write to it. */ }; /* How a line ends. This affects only writing FH_MODE_TEXT files. Writing in other modes does not use line ends, and reading in FH_MODE_TEXT mode accepts all forms of line ends. */ enum fh_line_ends { FH_END_LF, /* Unix line ends (\n). */ FH_END_CRLF /* MS-DOS line ends (\r\n). */ }; /* Properties of a file handle. */ struct fh_properties { enum fh_mode mode; /* File mode. */ enum fh_line_ends line_ends; /* Line ends for text files. */ size_t record_width; /* Length of fixed-format records. */ size_t tab_width; /* Tab width, 0=do not expand tabs. */ const char *encoding; /* Charset for contents. */ }; void fh_init (void); void fh_done (void); /* Creating file handles. */ struct file_handle *fh_create_file (const char *handle_name, const char *file_name, const char *file_name_encoding, const struct fh_properties *); struct file_handle *fh_create_dataset (struct dataset *); const struct fh_properties *fh_default_properties (void); /* Reference management. */ struct file_handle *fh_ref (struct file_handle *); void fh_unref (struct file_handle *); void fh_unname (struct file_handle *); /* Finding file handles. */ struct file_handle *fh_from_id (const char *handle_name); struct file_handle *fh_inline_file (void); /* Generic properties of file handles. */ const char *fh_get_id (const struct file_handle *); const char *fh_get_name (const struct file_handle *); enum fh_referent fh_get_referent (const struct file_handle *); const char *fh_get_encoding (const struct file_handle *); /* Properties of FH_REF_FILE file handles. */ const char *fh_get_file_name (const struct file_handle *); const char *fh_get_file_name_encoding (const struct file_handle *handle); enum fh_mode fh_get_mode (const struct file_handle *) ; enum fh_line_ends fh_get_line_ends (const struct file_handle *); /* Properties of FH_REF_FILE and FH_REF_INLINE file handles. */ size_t fh_get_record_width (const struct file_handle *); size_t fh_get_tab_width (const struct file_handle *); /* Properties of FH_REF_DATASET file handles. */ struct dataset *fh_get_dataset (const struct file_handle *); /* Mutual exclusion for access . */ struct fh_lock *fh_lock (struct file_handle *, enum fh_referent mask, const char *type, enum fh_access, bool exclusive); bool fh_unlock (struct fh_lock *); void *fh_lock_get_aux (const struct fh_lock *); void fh_lock_set_aux (struct fh_lock *, void *aux); bool fh_is_locked (const struct file_handle *, enum fh_access); /* Default file handle for DATA LIST, REREAD, REPEATING DATA commands. */ struct file_handle *fh_get_default_handle (void); void fh_set_default_handle (struct file_handle *); #endif pspp-1.0.1/src/data/dictionary.h0000644000175000017500000002116213150617234013436 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2007, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_DICTIONARY_H #define DATA_DICTIONARY_H 1 #include #include #include "data/case.h" #include "data/dict-class.h" struct string; struct ccase; /* Creating dictionaries. */ struct dictionary *dict_create (const char *encoding); struct dictionary *dict_clone (const struct dictionary *); /* Clearing and destroying dictionaries. */ void dict_clear (struct dictionary *); void dict_destroy (struct dictionary *); /* Common ways to access variables. */ struct variable *dict_lookup_var (const struct dictionary *, const char *); struct variable *dict_lookup_var_assert (const struct dictionary *, const char *); struct variable *dict_get_var (const struct dictionary *, size_t position); size_t dict_get_var_cnt (const struct dictionary *); /* Other access to variables. */ bool dict_contains_var (const struct dictionary *, const struct variable *); void dict_get_vars (const struct dictionary *, const struct variable ***vars, size_t *cnt, enum dict_class exclude); void dict_get_vars_mutable (const struct dictionary *, struct variable ***vars, size_t *cnt, enum dict_class exclude); /* Creating variables. */ struct variable *dict_create_var (struct dictionary *, const char *, int width); struct variable *dict_create_var_assert (struct dictionary *, const char *, int width); struct variable *dict_clone_var (struct dictionary *, const struct variable *); struct variable *dict_clone_var_assert (struct dictionary *, const struct variable *); struct variable *dict_clone_var_as (struct dictionary *, const struct variable *, const char *); struct variable *dict_clone_var_as_assert (struct dictionary *, const struct variable *, const char *); struct variable *dict_clone_var_in_place_assert (struct dictionary *, const struct variable *); /* Deleting variables. */ void dict_delete_var (struct dictionary *, struct variable *); void dict_delete_vars (struct dictionary *, struct variable *const *, size_t count); void dict_delete_consecutive_vars (struct dictionary *, size_t idx, size_t count); void dict_delete_scratch_vars (struct dictionary *); /* Changing the order of variables. */ void dict_reorder_var (struct dictionary *, struct variable *, size_t new_index); void dict_reorder_vars (struct dictionary *, struct variable *const *, size_t count); /* Variable names. */ bool dict_try_rename_var (struct dictionary *, struct variable *, const char *); void dict_rename_var (struct dictionary *, struct variable *, const char *); bool dict_rename_vars (struct dictionary *, struct variable **, char **new_names, size_t count, char **err_name); char *dict_make_unique_var_name (const struct dictionary *, const char *hint, unsigned long int *num_start); /* Weight variable. */ double dict_get_case_weight (const struct dictionary *, const struct ccase *, bool *); struct variable *dict_get_weight (const struct dictionary *); void dict_set_weight (struct dictionary *, struct variable *); /* Filter variable. */ struct variable *dict_get_filter (const struct dictionary *); void dict_set_filter (struct dictionary *, struct variable *); /* Case limit (N OF CASES). */ casenumber dict_get_case_limit (const struct dictionary *); void dict_set_case_limit (struct dictionary *, casenumber); /* Size of cases for this dictionary. */ const struct caseproto *dict_get_proto (const struct dictionary *); int dict_get_next_value_idx (const struct dictionary *); size_t dict_get_case_size (const struct dictionary *); /* Making this dictionary's cases smaller (if some variables were deleted). */ size_t dict_count_values (const struct dictionary *, unsigned int exclude_classes); void dict_compact_values (struct dictionary *); struct caseproto *dict_get_compacted_proto (const struct dictionary *, unsigned int exclude_classes); /* SPLIT FILE variables. */ const struct variable *const *dict_get_split_vars (const struct dictionary *); size_t dict_get_split_cnt (const struct dictionary *); void dict_set_split_vars (struct dictionary *, struct variable *const *, size_t cnt); /* File label. */ const char *dict_get_label (const struct dictionary *); void dict_set_label (struct dictionary *, const char *); /* Documents. */ #define DOC_LINE_LENGTH 80 /* Fixed length of document lines. */ const struct string_array *dict_get_documents (const struct dictionary *); void dict_set_documents (struct dictionary *, const struct string_array *); void dict_set_documents_string (struct dictionary *, const char *); void dict_clear_documents (struct dictionary *); bool dict_add_document_line (struct dictionary *, const char *, bool issue_warning); size_t dict_get_document_line_cnt (const struct dictionary *); const char *dict_get_document_line (const struct dictionary *, size_t); /* Vectors. */ bool dict_create_vector (struct dictionary *, const char *name, struct variable **, size_t cnt); void dict_create_vector_assert (struct dictionary *, const char *name, struct variable **, size_t cnt); const struct vector *dict_get_vector (const struct dictionary *, size_t idx); size_t dict_get_vector_cnt (const struct dictionary *); const struct vector *dict_lookup_vector (const struct dictionary *, const char *name); void dict_clear_vectors (struct dictionary *); /* Multiple response sets. */ const struct mrset *dict_get_mrset (const struct dictionary *, size_t idx); size_t dict_get_n_mrsets (const struct dictionary *); const struct mrset *dict_lookup_mrset (const struct dictionary *, const char *name); bool dict_add_mrset (struct dictionary *, struct mrset *); bool dict_delete_mrset (struct dictionary *, const char *name); void dict_clear_mrsets (struct dictionary *); /* Attributes. */ struct attrset *dict_get_attributes (const struct dictionary *); void dict_set_attributes (struct dictionary *, const struct attrset *); bool dict_has_attributes (const struct dictionary *); /* Data encoding. */ const char *dict_get_encoding (const struct dictionary *d); bool dict_id_is_valid (const struct dictionary *, const char *id, bool issue_error); /* Internal variables. */ struct variable *dict_create_internal_var (int case_idx, int width); void dict_destroy_internal_var (struct variable *); /* Functions to be called upon dictionary changes. */ struct dict_callbacks { void (*var_added) (struct dictionary *, int, void *); void (*var_deleted) (struct dictionary *, const struct variable *, int dict_index, int case_index, void *); void (*var_changed) (struct dictionary *, int, unsigned int, const struct variable *, void *); void (*weight_changed) (struct dictionary *, int, void *); void (*filter_changed) (struct dictionary *, int, void *); void (*split_changed) (struct dictionary *, void *); }; void dict_set_callbacks (struct dictionary *, const struct dict_callbacks *, void *); void dict_copy_callbacks (struct dictionary *, const struct dictionary *); void dict_set_change_callback (struct dictionary *d, void (*changed) (struct dictionary *, void*), void *data); /* Debug use only. */ void dict_dump (const struct dictionary *); #endif /* data/dictionary.h */ pspp-1.0.1/src/data/data-out.c0000644000175000017500000010467013150617107013007 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/data-out.h" #include #include #include #include #include #include #include #include "data/calendar.h" #include "data/format.h" #include "data/settings.h" #include "data/value.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/float-format.h" #include "libpspp/i18n.h" #include "libpspp/integer-format.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/minmax.h" #include "gl/c-snprintf.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* A representation of a number that can be quickly rounded to any desired number of decimal places (up to a specified maximum). */ struct rounder { char string[64]; /* Magnitude of number with excess precision. */ int integer_digits; /* Number of digits before decimal point. */ int leading_nines; /* Number of `9's or `.'s at start of string. */ int leading_zeros; /* Number of `0's or `.'s at start of string. */ bool negative; /* Is the number negative? */ }; static void rounder_init (struct rounder *, double number, int max_decimals); static int rounder_width (const struct rounder *, int decimals, int *integer_digits, bool *negative); static void rounder_format (const struct rounder *, int decimals, char *output); typedef void data_out_converter_func (const union value *, const struct fmt_spec *, char *); #define FMT(NAME, METHOD, IMIN, OMIN, IO, CATEGORY) \ static data_out_converter_func output_##METHOD; #include "format.def" static bool output_decimal (const struct rounder *, const struct fmt_spec *, bool require_affixes, char *); static bool output_scientific (double, const struct fmt_spec *, bool require_affixes, char *); static double power10 (int) PURE_FUNCTION; static double power256 (int) PURE_FUNCTION; static void output_infinite (double, const struct fmt_spec *, char *); static void output_missing (const struct fmt_spec *, char *); static void output_overflow (const struct fmt_spec *, char *); static bool output_bcd_integer (double, int digits, char *); static void output_binary_integer (uint64_t, int bytes, enum integer_format, char *); static void output_hex (const void *, size_t bytes, char *); static data_out_converter_func *const converters[FMT_NUMBER_OF_FORMATS] = { #define FMT(NAME, METHOD, IMIN, OMIN, IO, CATEGORY) output_##METHOD, #include "format.def" }; /* Converts the INPUT value, encoded in INPUT_ENCODING, according to format specification FORMAT, appending the output to OUTPUT in OUTPUT_ENCODING. However, binary formats (FMT_P, FMT_PK, FMT_IB, FMT_PIB, FMT_RB) yield the binary results, which may not be properly encoded for OUTPUT_ENCODING. VALUE must be the correct width for FORMAT, that is, its width must be fmt_var_width(FORMAT). INPUT_ENCODING can normally be obtained by calling dict_get_encoding() on the dictionary with which INPUT is associated. ENCODING is only important when FORMAT's type is FMT_A. */ void data_out_recode (const union value *input, const char *input_encoding, const struct fmt_spec *format, struct string *output, const char *output_encoding) { assert (fmt_check_output (format)); if (format->type == FMT_A) { char *in = CHAR_CAST (char *, value_str (input, format->w)); char *out = recode_string (output_encoding, input_encoding, in, format->w); ds_put_cstr (output, out); free (out); } else if (fmt_get_category (format->type) == FMT_CAT_BINARY) converters[format->type] (input, format, ds_put_uninit (output, format->w)); else { char *utf8_encoded = data_out (input, input_encoding, format); char *output_encoded = recode_string (output_encoding, UTF8, utf8_encoded, -1); ds_put_cstr (output, output_encoded); free (output_encoded); free (utf8_encoded); } } static char * binary_to_utf8 (const char *in, struct pool *pool) { uint8_t *out = pool_alloc_unaligned (pool, strlen (in) * 2 + 1); uint8_t *p = out; while (*in != '\0') { uint8_t byte = *in++; int mblen = u8_uctomb (p, byte, 2); assert (mblen > 0); p += mblen; } *p = '\0'; return CHAR_CAST (char *, out); } /* Converts the INPUT value into a UTF-8 encoded string, according to format specification FORMAT. VALUE must be the correct width for FORMAT, that is, its width must be fmt_var_width(FORMAT). ENCODING must be the encoding of INPUT. Normally this can be obtained by calling dict_get_encoding() on the dictionary with which INPUT is associated. ENCODING is only important when FORMAT's type is FMT_A. The return value is dynamically allocated, and must be freed by the caller. If POOL is non-null, then the return value is allocated on that pool. */ char * data_out_pool (const union value *input, const char *encoding, const struct fmt_spec *format, struct pool *pool) { assert (fmt_check_output (format)); if (format->type == FMT_A) { char *in = CHAR_CAST (char *, value_str (input, format->w)); return recode_string_pool (UTF8, encoding, in, format->w, pool); } else if (fmt_get_category (format->type) == FMT_CAT_BINARY) { char tmp[16]; assert (format->w + 1 <= sizeof tmp); converters[format->type] (input, format, tmp); return binary_to_utf8 (tmp, pool); } else { const struct fmt_number_style *style = settings_get_style (format->type); size_t size = format->w + style->extra_bytes + 1; char *output; output = pool_alloc_unaligned (pool, size); converters[format->type] (input, format, output); return output; } } /* Like data_out_pool(), except that for basic numeric formats (F, COMMA, DOT, COLLAR, PCT, E) and custom currency formats are formatted as wide as necessary to fully display the selected number of decimal places. */ char * data_out_stretchy (const union value *input, const char *encoding, const struct fmt_spec *format, struct pool *pool) { if (fmt_get_category (format->type) & (FMT_CAT_BASIC | FMT_CAT_CUSTOM)) { const struct fmt_number_style *style = settings_get_style (format->type); struct fmt_spec wide_format; char tmp[128]; size_t size; wide_format.type = format->type; wide_format.w = 40; wide_format.d = format->d; size = format->w + style->extra_bytes + 1; if (size <= sizeof tmp) { output_number (input, &wide_format, tmp); return pool_strdup (pool, tmp + strspn (tmp, " ")); } } return data_out_pool (input, encoding, format, pool); } char * data_out (const union value *input, const char *encoding, const struct fmt_spec *format) { return data_out_pool (input, encoding, format, NULL); } /* Main conversion functions. */ /* Outputs F, COMMA, DOT, DOLLAR, PCT, E, CCA, CCB, CCC, CCD, and CCE formats. */ static void output_number (const union value *input, const struct fmt_spec *format, char *output) { double number = input->f; if (number == SYSMIS) output_missing (format, output); else if (!isfinite (number)) output_infinite (number, format, output); else { if (format->type != FMT_E && fabs (number) < 1.5 * power10 (format->w)) { struct rounder r; rounder_init (&r, number, format->d); if (output_decimal (&r, format, true, output) || output_scientific (number, format, true, output) || output_decimal (&r, format, false, output)) return; } if (!output_scientific (number, format, false, output)) output_overflow (format, output); } } /* Outputs N format. */ static void output_N (const union value *input, const struct fmt_spec *format, char *output) { double number = input->f * power10 (format->d); if (input->f == SYSMIS || number < 0) output_missing (format, output); else { char buf[128]; number = fabs (round (number)); if (number < power10 (format->w) && c_snprintf (buf, 128, "%0*.0f", format->w, number) == format->w) memcpy (output, buf, format->w); else output_overflow (format, output); } output[format->w] = '\0'; } /* Outputs Z format. */ static void output_Z (const union value *input, const struct fmt_spec *format, char *output) { double number = input->f * power10 (format->d); char buf[128]; if (input->f == SYSMIS) output_missing (format, output); else if (fabs (number) < power10 (format->w) && c_snprintf (buf, 128, "%0*.0f", format->w, fabs (round (number))) == format->w) { if (number < 0 && strspn (buf, "0") < format->w) { char *p = &buf[format->w - 1]; *p = "}JKLMNOPQR"[*p - '0']; } memcpy (output, buf, format->w); output[format->w] = '\0'; } else output_overflow (format, output); } /* Outputs P format. */ static void output_P (const union value *input, const struct fmt_spec *format, char *output) { if (output_bcd_integer (fabs (input->f * power10 (format->d)), format->w * 2 - 1, output) && input->f < 0.0) output[format->w - 1] |= 0xd; else output[format->w - 1] |= 0xf; } /* Outputs PK format. */ static void output_PK (const union value *input, const struct fmt_spec *format, char *output) { output_bcd_integer (input->f * power10 (format->d), format->w * 2, output); } /* Outputs IB format. */ static void output_IB (const union value *input, const struct fmt_spec *format, char *output) { double number = round (input->f * power10 (format->d)); if (input->f == SYSMIS || number >= power256 (format->w) / 2 - 1 || number < -power256 (format->w) / 2) memset (output, 0, format->w); else { uint64_t integer = fabs (number); if (number < 0) integer = -integer; output_binary_integer (integer, format->w, settings_get_output_integer_format (), output); } output[format->w] = '\0'; } /* Outputs PIB format. */ static void output_PIB (const union value *input, const struct fmt_spec *format, char *output) { double number = round (input->f * power10 (format->d)); if (input->f == SYSMIS || number < 0 || number >= power256 (format->w)) memset (output, 0, format->w); else output_binary_integer (number, format->w, settings_get_output_integer_format (), output); output[format->w] = '\0'; } /* Outputs PIBHEX format. */ static void output_PIBHEX (const union value *input, const struct fmt_spec *format, char *output) { double number = round (input->f); if (input->f == SYSMIS) output_missing (format, output); else if (input->f < 0 || number >= power256 (format->w / 2)) output_overflow (format, output); else { char tmp[8]; output_binary_integer (number, format->w / 2, INTEGER_MSB_FIRST, tmp); output_hex (tmp, format->w / 2, output); } } /* Outputs RB format. */ static void output_RB (const union value *input, const struct fmt_spec *format, char *output) { double d = input->f; memcpy (output, &d, format->w); output[format->w] = '\0'; } /* Outputs RBHEX format. */ static void output_RBHEX (const union value *input, const struct fmt_spec *format, char *output) { double d = input->f; output_hex (&d, format->w / 2, output); } /* Outputs DATE, ADATE, EDATE, JDATE, SDATE, QYR, MOYR, WKYR, DATETIME, TIME, and DTIME formats. */ static void output_date (const union value *input, const struct fmt_spec *format, char *output) { double number = input->f; int year, month, day, yday; const char *template = fmt_date_template (format->type, format->w); char tmp[64]; char *p = tmp; if (number == SYSMIS) goto missing; if (fmt_get_category (format->type) == FMT_CAT_DATE) { if (number <= 0) goto missing; calendar_offset_to_gregorian (number / 60. / 60. / 24., &year, &month, &day, &yday); number = fmod (number, 60. * 60. * 24.); } else year = month = day = yday = 0; while (*template != '\0') { int excess_width; int ch = *template; int count = 1; while (template[count] == ch) count++; template += count; switch (ch) { case 'd': if (count < 3) p += sprintf (p, "%02d", day); else p += sprintf (p, "%03d", yday); break; case 'm': if (count < 3) p += sprintf (p, "%02d", month); else { static const char *const months[12] = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC", }; p = stpcpy (p, months[month - 1]); } break; case 'y': if (count >= 4) { if (year <= 9999) p += sprintf (p, "%04d", year); else if (format->type == FMT_DATETIME) p = stpcpy (p, "****"); else goto overflow; } else { int epoch = settings_get_epoch (); int offset = year - epoch; if (offset < 0 || offset > 99) goto overflow; p += sprintf (p, "%02d", abs (year) % 100); } break; case 'q': p += sprintf (p, "%d", (month - 1) / 3 + 1); break; case 'w': p += sprintf (p, "%2d", (yday - 1) / 7 + 1); break; case 'D': if (number < 0) *p++ = '-'; number = fabs (number); p += c_snprintf (p, 64, "%*.0f", count, floor (number / 60. / 60. / 24.)); number = fmod (number, 60. * 60. * 24.); break; case 'H': if (number < 0) *p++ = '-'; number = fabs (number); p += c_snprintf (p, 64, "%0*.0f", count, floor (number / 60. / 60.)); number = fmod (number, 60. * 60.); break; case 'M': p += sprintf (p, "%02d", (int) floor (number / 60.)); number = fmod (number, 60.); excess_width = format->w - (p - tmp); if (excess_width < 0) goto overflow; if (excess_width == 3 || excess_width == 4 || (excess_width >= 5 && format->d == 0)) p += sprintf (p, ":%02d", (int) number); else if (excess_width >= 5) { int d = MIN (format->d, excess_width - 4); int w = d + 3; c_snprintf (p, 64, ":%0*.*f", w, d, number); if (settings_get_decimal_char (FMT_F) != '.') { char *cp = strchr (p, '.'); if (cp != NULL) *cp = settings_get_decimal_char (FMT_F); } p += strlen (p); } goto done; default: assert (count == 1); *p++ = ch; break; } } done: buf_copy_lpad (output, format->w, tmp, p - tmp, ' '); output[format->w] = '\0'; return; overflow: output_overflow (format, output); return; missing: output_missing (format, output); return; } /* Outputs WKDAY format. */ static void output_WKDAY (const union value *input, const struct fmt_spec *format, char *output) { static const char *const weekdays[7] = { "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", }; if (input->f >= 1 && input->f < 8) { buf_copy_str_rpad (output, format->w, weekdays[(int) input->f - 1], ' '); output[format->w] = '\0'; } else { if (input->f != SYSMIS) msg (ME, _("Weekday number %f is not between 1 and 7."), input->f); output_missing (format, output); } } /* Outputs MONTH format. */ static void output_MONTH (const union value *input, const struct fmt_spec *format, char *output) { static const char *const months[12] = { "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER", }; if (input->f >= 1 && input->f < 13) { buf_copy_str_rpad (output, format->w, months[(int) input->f - 1], ' '); output[format->w] = '\0'; } else { if (input->f != SYSMIS) msg (ME, _("Month number %f is not between 1 and 12."), input->f); output_missing (format, output); } } /* Outputs A format. */ static void output_A (const union value *input UNUSED, const struct fmt_spec *format UNUSED, char *output UNUSED) { NOT_REACHED (); } /* Outputs AHEX format. */ static void output_AHEX (const union value *input, const struct fmt_spec *format, char *output) { output_hex (value_str (input, format->w / 2), format->w / 2, output); } /* Decimal and scientific formatting. */ /* If REQUEST plus the current *WIDTH fits within MAX_WIDTH, increments *WIDTH by REQUEST and return true. Otherwise returns false without changing *WIDTH. */ static bool allocate_space (int request, int max_width, int *width) { assert (*width <= max_width); if (request + *width <= max_width) { *width += request; return true; } else return false; } /* Tries to compose the number represented by R, in the style of FORMAT, into OUTPUT. Returns true if successful, false on failure, which occurs if FORMAT's width is too narrow. If REQUIRE_AFFIXES is true, then the prefix and suffix specified by FORMAT's style must be included; otherwise, they may be omitted to make the number fit. */ static bool output_decimal (const struct rounder *r, const struct fmt_spec *format, bool require_affixes, char *output) { const struct fmt_number_style *style = settings_get_style (format->type); int decimals; for (decimals = format->d; decimals >= 0; decimals--) { /* Formatted version of magnitude of NUMBER. */ char magnitude[64]; /* Number of digits in MAGNITUDE's integer and fractional parts. */ int integer_digits; /* Amount of space within the field width already claimed. Initially this is the width of MAGNITUDE, then it is reduced in stages as space is allocated to prefixes and suffixes and grouping characters. */ int width; /* Include various decorations? */ bool add_neg_prefix; bool add_affixes; bool add_grouping; /* Position in output. */ char *p; /* Make sure there's room for the number's magnitude, plus the negative suffix, plus (if negative) the negative prefix. */ width = rounder_width (r, decimals, &integer_digits, &add_neg_prefix); width += style->neg_suffix.width; if (add_neg_prefix) width += style->neg_prefix.width; if (width > format->w) continue; /* If there's room for the prefix and suffix, allocate space. If the affixes are required, but there's no space, give up. */ add_affixes = allocate_space (fmt_affix_width (style), format->w, &width); if (!add_affixes && require_affixes) continue; /* Check whether we should include grouping characters. We need room for a complete set or we don't insert any at all. We don't include grouping characters if decimal places were requested but they were all dropped. */ add_grouping = (style->grouping != 0 && integer_digits > 3 && (format->d == 0 || decimals > 0) && allocate_space ((integer_digits - 1) / 3, format->w, &width)); /* Format the number's magnitude. */ rounder_format (r, decimals, magnitude); /* Assemble number. */ p = output; if (format->w > width) p = mempset (p, ' ', format->w - width); if (add_neg_prefix) p = stpcpy (p, style->neg_prefix.s); if (add_affixes) p = stpcpy (p, style->prefix.s); if (!add_grouping) p = mempcpy (p, magnitude, integer_digits); else { int i; for (i = 0; i < integer_digits; i++) { if (i > 0 && (integer_digits - i) % 3 == 0) *p++ = style->grouping; *p++ = magnitude[i]; } } if (decimals > 0) { *p++ = style->decimal; p = mempcpy (p, &magnitude[integer_digits + 1], decimals); } if (add_affixes) p = stpcpy (p, style->suffix.s); if (add_neg_prefix) p = stpcpy (p, style->neg_suffix.s); else p = mempset (p, ' ', style->neg_suffix.width); assert (p >= output + format->w); assert (p <= output + format->w + style->extra_bytes); *p = '\0'; return true; } return false; } /* Formats NUMBER into OUTPUT in scientific notation according to the style of the format specified in FORMAT. */ static bool output_scientific (double number, const struct fmt_spec *format, bool require_affixes, char *output) { const struct fmt_number_style *style = settings_get_style (format->type); int width; int fraction_width; bool add_affixes; char *p; /* Allocate minimum required space. */ width = 6 + style->neg_suffix.width; if (number < 0) width += style->neg_prefix.width; if (width > format->w) return false; /* Check for room for prefix and suffix. */ add_affixes = allocate_space (fmt_affix_width (style), format->w, &width); if (require_affixes && !add_affixes) return false; /* Figure out number of characters we can use for the fraction, if any. (If that turns out to be 1, then we'll output a decimal point without any digits following; that's what the # flag does in the call to c_snprintf, below.) */ fraction_width = MIN (MIN (format->d + 1, format->w - width), 16); if (format->type != FMT_E && fraction_width == 1) fraction_width = 0; width += fraction_width; /* Format (except suffix). */ p = output; if (width < format->w) p = mempset (p, ' ', format->w - width); if (number < 0) p = stpcpy (p, style->neg_prefix.s); if (add_affixes) p = stpcpy (p, style->prefix.s); if (fraction_width > 0) c_snprintf (p, 64, "%#.*E", fraction_width - 1, fabs (number)); else c_snprintf (p, 64, "%.0E", fabs (number)); /* The C locale always uses a period `.' as a decimal point. Translate to comma if necessary. */ if (style->decimal != '.') { char *cp = strchr (p, '.'); if (cp != NULL) *cp = style->decimal; } /* Make exponent have exactly three digits, plus sign. */ { char *cp = strchr (p, 'E') + 1; long int exponent = strtol (cp, NULL, 10); if (abs (exponent) > 999) return false; sprintf (cp, "%+04ld", exponent); } /* Add suffixes. */ p = strchr (p, '\0'); if (add_affixes) p = stpcpy (p, style->suffix.s); if (number < 0) p = stpcpy (p, style->neg_suffix.s); else p = mempset (p, ' ', style->neg_suffix.width); assert (p >= output + format->w); assert (p <= output + format->w + style->extra_bytes); *p = '\0'; return true; } /* Returns true if the magnitude represented by R should be rounded up when chopped off at DECIMALS decimal places, false if it should be rounded down. */ static bool should_round_up (const struct rounder *r, int decimals) { int digit = r->string[r->integer_digits + decimals + 1]; assert (digit >= '0' && digit <= '9'); return digit >= '5'; } /* Initializes R for formatting the magnitude of NUMBER to no more than MAX_DECIMAL decimal places. */ static void rounder_init (struct rounder *r, double number, int max_decimals) { assert (fabs (number) < 1e41); assert (max_decimals >= 0 && max_decimals <= 16); if (max_decimals == 0) { /* Fast path. No rounding needed. We append ".00" to the integer representation because round_up assumes that fractional digits are present. */ c_snprintf (r->string, 64, "%.0f.00", fabs (round (number))); } else { /* Slow path. This is more difficult than it really should be because we have to make sure that numbers that are exactly halfway between two representations are always rounded away from zero. This is not what sprintf normally does (usually it rounds to even), so we have to fake it as best we can, by formatting with extra precision and then doing the rounding ourselves. We take up to two rounds to format numbers. In the first round, we obtain 2 digits of precision beyond those requested by the user. If those digits are exactly "50", then in a second round we format with as many digits as are significant in a "double". It might be better to directly implement our own floating-point formatting routine instead of relying on the system's sprintf implementation. But the classic Steele and White paper on printing floating-point numbers does not hint how to do what we want, and it's not obvious how to change their algorithms to do so. It would also be a lot of work. */ c_snprintf (r->string, 64, "%.*f", max_decimals + 2, fabs (number)); if (!strcmp (r->string + strlen (r->string) - 2, "50")) { int binary_exponent, decimal_exponent, format_decimals; frexp (number, &binary_exponent); decimal_exponent = binary_exponent * 3 / 10; format_decimals = (DBL_DIG + 1) - decimal_exponent; if (format_decimals > max_decimals + 2) c_snprintf (r->string, 64, "%.*f", format_decimals, fabs (number)); } } if (r->string[0] == '0') memmove (r->string, &r->string[1], strlen (r->string)); r->leading_zeros = strspn (r->string, "0."); r->leading_nines = strspn (r->string, "9."); r->integer_digits = strchr (r->string, '.') - r->string; assert (r->integer_digits < 64); assert (r->integer_digits >= 0); r->negative = number < 0; } /* Returns the number of characters required to format the magnitude represented by R to DECIMALS decimal places. The return value includes integer digits and a decimal point and fractional digits, if any, but it does not include any negative prefix or suffix or other affixes. *INTEGER_DIGITS is set to the number of digits before the decimal point in the output, between 0 and 40. If R represents a negative number and its rounded representation would include at least one nonzero digit, *NEGATIVE is set to true; otherwise, it is set to false. */ static int rounder_width (const struct rounder *r, int decimals, int *integer_digits, bool *negative) { /* Calculate base measures. */ int width = r->integer_digits; if (decimals > 0) width += decimals + 1; *integer_digits = r->integer_digits; *negative = r->negative; /* Rounding can cause adjustments. */ if (should_round_up (r, decimals)) { /* Rounding up leading 9s adds a new digit (a 1). */ if (r->leading_nines >= width) { width++; ++*integer_digits; } } else { /* Rounding down. */ if (r->leading_zeros >= width) { /* All digits that remain after rounding are zeros. Therefore we drop the negative sign. */ *negative = false; if (r->integer_digits == 0 && decimals == 0) { /* No digits at all are left. We need to display at least a single digit (a zero). */ assert (width == 0); width++; *integer_digits = 1; } } } return width; } /* Formats the magnitude represented by R into OUTPUT, rounding to DECIMALS decimal places. Exactly as many characters as indicated by rounder_width are written. No terminating null is appended. */ static void rounder_format (const struct rounder *r, int decimals, char *output) { int base_width = r->integer_digits + (decimals > 0 ? decimals + 1 : 0); if (should_round_up (r, decimals)) { if (r->leading_nines < base_width) { /* Rounding up. This is the common case where rounding up doesn't add an extra digit. */ char *p; memcpy (output, r->string, base_width); for (p = output + base_width - 1; ; p--) { assert (p >= output); if (*p == '9') *p = '0'; else if (*p >= '0' && *p <= '8') { (*p)++; break; } else assert (*p == '.'); } } else { /* Rounding up leading 9s causes the result to be a 1 followed by a number of 0s, plus a decimal point. */ char *p = output; *p++ = '1'; p = mempset (p, '0', r->integer_digits); if (decimals > 0) { *p++ = '.'; p = mempset (p, '0', decimals); } assert (p == output + base_width + 1); } } else { /* Rounding down. */ if (r->integer_digits != 0 || decimals != 0) { /* Common case: just copy the digits. */ memcpy (output, r->string, base_width); } else { /* No digits remain. The output is just a zero. */ output[0] = '0'; } } } /* Helper functions. */ /* Returns 10**X. */ static double PURE_FUNCTION power10 (int x) { static const double p[] = { 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22, 1e23, 1e24, 1e25, 1e26, 1e27, 1e28, 1e29, 1e30, 1e31, 1e32, 1e33, 1e34, 1e35, 1e36, 1e37, 1e38, 1e39, 1e40, }; return x >= 0 && x < sizeof p / sizeof *p ? p[x] : pow (10.0, x); } /* Returns 256**X. */ static double PURE_FUNCTION power256 (int x) { static const double p[] = { 1.0, 256.0, 65536.0, 16777216.0, 4294967296.0, 1099511627776.0, 281474976710656.0, 72057594037927936.0, 18446744073709551616.0 }; return x >= 0 && x < sizeof p / sizeof *p ? p[x] : pow (256.0, x); } /* Formats non-finite NUMBER into OUTPUT according to the width given in FORMAT. */ static void output_infinite (double number, const struct fmt_spec *format, char *output) { assert (!isfinite (number)); if (format->w >= 3) { const char *s; if (isnan (number)) s = "NaN"; else if (isinf (number)) s = number > 0 ? "+Infinity" : "-Infinity"; else s = "Unknown"; buf_copy_str_lpad (output, format->w, s, ' '); } else output_overflow (format, output); output[format->w] = '\0'; } /* Formats OUTPUT as a missing value for the given FORMAT. */ static void output_missing (const struct fmt_spec *format, char *output) { memset (output, ' ', format->w); if (format->type != FMT_N) { int dot_ofs = (format->type == FMT_PCT ? 2 : format->type == FMT_E ? 5 : 1); output[MAX (0, format->w - format->d - dot_ofs)] = '.'; } else output[format->w - 1] = '.'; output[format->w] = '\0'; } /* Formats OUTPUT for overflow given FORMAT. */ static void output_overflow (const struct fmt_spec *format, char *output) { memset (output, '*', format->w); output[format->w] = '\0'; } /* Converts the integer part of NUMBER to a packed BCD number with the given number of DIGITS in OUTPUT. If DIGITS is odd, the least significant nibble of the final byte in OUTPUT is set to 0. Returns true if successful, false if NUMBER is not representable. On failure, OUTPUT is cleared to all zero bytes. */ static bool output_bcd_integer (double number, int digits, char *output) { char decimal[64]; assert (digits < sizeof decimal); output[DIV_RND_UP (digits, 2)] = '\0'; if (number != SYSMIS && number >= 0. && number < power10 (digits) && c_snprintf (decimal, 64, "%0*.0f", digits, round (number)) == digits) { const char *src = decimal; int i; for (i = 0; i < digits / 2; i++) { int d0 = *src++ - '0'; int d1 = *src++ - '0'; *output++ = (d0 << 4) + d1; } if (digits % 2) *output = (*src - '0') << 4; return true; } else { memset (output, 0, DIV_RND_UP (digits, 2)); return false; } } /* Writes VALUE to OUTPUT as a BYTES-byte binary integer of the given INTEGER_FORMAT. */ static void output_binary_integer (uint64_t value, int bytes, enum integer_format integer_format, char *output) { integer_put (value, integer_format, output, bytes); } /* Converts the BYTES bytes in DATA to twice as many hexadecimal digits in OUTPUT. */ static void output_hex (const void *data_, size_t bytes, char *output) { const uint8_t *data = data_; size_t i; for (i = 0; i < bytes; i++) { static const char hex_digits[] = "0123456789ABCDEF"; *output++ = hex_digits[data[i] >> 4]; *output++ = hex_digits[data[i] & 15]; } *output = '\0'; } pspp-1.0.1/src/data/vector.h0000644000175000017500000000310412476227410012572 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_VECTOR_H #define DATA_VECTOR_H 1 #include #include "data/variable.h" struct dictionary; struct vector *vector_create (const char *name, struct variable **var, size_t var_cnt); struct vector *vector_clone (const struct vector *old, const struct dictionary *old_dict, const struct dictionary *new_dict); void vector_destroy (struct vector *); const char *vector_get_name (const struct vector *); enum val_type vector_get_type (const struct vector *); struct variable *vector_get_var (const struct vector *, size_t idx); size_t vector_get_var_cnt (const struct vector *); bool vector_is_valid_name (const char *name, bool issue_error); int compare_vector_ptrs_by_name (const void *a_, const void *b_); #endif /* data/vector.h */ pspp-1.0.1/src/data/casereader-shim.c0000644000175000017500000001072512470242642014324 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/casereader-shim.h" #include #include "data/casereader.h" #include "data/casereader-provider.h" #include "data/casewindow.h" #include "data/settings.h" #include "libpspp/taint.h" #include "gl/xalloc.h" /* A buffering shim casereader. */ struct casereader_shim { struct casewindow *window; /* Window of buffered cases. */ struct casereader *subreader; /* Subordinate casereader. */ }; static const struct casereader_random_class shim_class; static bool buffer_case (struct casereader_shim *s); /* Interposes a buffering shim on READER. Returns the new shim. The only legitimate use of the returned casereader_shim is for calling casereader_shim_slurp(). If READER has no clones already (which the caller should ensure, if it plans to use the return value), then the returned casreader_shim is valid for that purpose until, and only until, the READER's 'destroy' function is called. */ struct casereader_shim * casereader_shim_insert (struct casereader *reader) { const struct caseproto *proto = casereader_get_proto (reader); casenumber case_cnt = casereader_get_case_cnt (reader); struct casereader_shim *s = xmalloc (sizeof *s); s->window = casewindow_create (proto, settings_get_workspace_cases (proto)); s->subreader = casereader_create_random (proto, case_cnt, &shim_class, s); casereader_swap (reader, s->subreader); taint_propagate (casewindow_get_taint (s->window), casereader_get_taint (reader)); taint_propagate (casereader_get_taint (s->subreader), casereader_get_taint (reader)); return s; } /* Reads all of the cases from S's subreader into S's buffer and destroys S's subreader. (This is a no-op if the subreader has already been destroyed.) Refer to the comment on casereader_shim_insert() for information on when this function may be used. */ void casereader_shim_slurp (struct casereader_shim *s) { while (buffer_case (s)) continue; } /* Reads a case from S's subreader and appends it to S's window. Returns true if successful, false at the end of S's subreader or upon an I/O error. */ static bool buffer_case (struct casereader_shim *s) { struct ccase *tmp; if (s->subreader == NULL) return false; tmp = casereader_read (s->subreader); if (tmp == NULL) { casereader_destroy (s->subreader); s->subreader = NULL; return false; } casewindow_push_head (s->window, tmp); return true; } /* Reads the case at the given 0-based OFFSET from the front of the window into C. Returns the case if successful, or a null pointer if OFFSET is beyond the end of file or upon I/O error. The caller must call case_unref() on the returned case when it is no longer needed. */ static struct ccase * casereader_shim_read (struct casereader *reader UNUSED, void *s_, casenumber offset) { struct casereader_shim *s = s_; while (casewindow_get_case_cnt (s->window) <= offset) if (!buffer_case (s)) return false; return casewindow_get_case (s->window, offset); } /* Destroys S. */ static void casereader_shim_destroy (struct casereader *reader UNUSED, void *s_) { struct casereader_shim *s = s_; casewindow_destroy (s->window); casereader_destroy (s->subreader); free (s); } /* Discards CNT cases from the front of S's window. */ static void casereader_shim_advance (struct casereader *reader UNUSED, void *s_, casenumber case_cnt) { struct casereader_shim *s = s_; casewindow_pop_tail (s->window, case_cnt); } /* Class for the buffered reader. */ static const struct casereader_random_class shim_class = { casereader_shim_read, casereader_shim_destroy, casereader_shim_advance, }; pspp-1.0.1/src/data/any-writer.h0000644000175000017500000000170012470242642013367 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef ANY_WRITER_H #define ANY_WRITER_H 1 #include struct file_handle; struct dictionary; struct casewriter *any_writer_open (struct file_handle *, struct dictionary *); #endif /* any-writer.h */ pspp-1.0.1/src/data/short-names.c0000644000175000017500000001210412523704223013516 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/short-names.h" #include "data/dictionary.h" #include "data/sys-file-private.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "libpspp/stringi-set.h" #include "gettext.h" #define _(msgid) gettext (msgid) static void claim_short_name (struct variable *v, size_t i, struct stringi_set *short_names) { const char *short_name = var_get_short_name (v, i); if (short_name != NULL && !stringi_set_insert (short_names, short_name)) var_set_short_name (v, i, NULL); } /* Form initial short_name from the variable name, then try _A, _B, ... _AA, _AB, etc., if needed. */ static void assign_short_name (struct variable *v, size_t i, struct stringi_set *short_names) { int trial; if (var_get_short_name (v, i) != NULL) return; for (trial = 0; ; trial++) { char suffix[SHORT_NAME_LEN + 1]; char *short_name; /* Compose suffix. */ if (trial == 0) suffix[0] = '\0'; else { suffix[0] = '_'; str_format_26adic (trial, true, &suffix[1], sizeof suffix - 1); } /* Set name. */ short_name = utf8_encoding_concat (var_get_name (v), suffix, var_get_encoding (v), SHORT_NAME_LEN); if (stringi_set_insert (short_names, short_name)) { var_set_short_name (v, i, short_name); free (short_name); return; } free (short_name); } } /* Assigns a valid, unique short_name[] to each variable in D. Each variable whose actual name is short has highest priority for that short name. Otherwise, variables with an existing short_name[] have the next highest priority for a given short name; if it is already taken, then the variable is treated as if short_name[] had been empty. Otherwise, long names are truncated to form short names. If that causes conflicts, variables are renamed as PREFIX_A, PREFIX_B, and so on. */ void short_names_assign (struct dictionary *d) { size_t var_cnt = dict_get_var_cnt (d); struct stringi_set short_names; size_t i, j; stringi_set_init (&short_names); /* Clear short names that conflict with a variable name. */ for (i = 0; i < var_cnt; i++) { struct variable *v = dict_get_var (d, i); int segment_cnt = sfm_width_to_segments (var_get_width (v)); for (j = 0; j < segment_cnt; j++) { const char *name = var_get_short_name (v, j); if (name != NULL) { struct variable *ov = dict_lookup_var (d, name); if (ov != NULL && (ov != v || j > 0)) var_set_short_name (v, j, NULL); } } } /* Give variables whose names are short the corresponding short name. */ for (i = 0; i < var_cnt; i++) { struct variable *v = dict_get_var (d, i); const char *name = var_get_name (v); int len = recode_string_len (var_get_encoding (v), "UTF-8", name, -1); if (len <= SHORT_NAME_LEN) var_set_short_name (v, 0, name); } /* Each variable with an assigned short name for its first segment now gets it unless there is a conflict. In case of conflict, the claimant earlier in dictionary order wins. Then similarly for additional segments of very long strings. */ for (i = 0; i < var_cnt; i++) { struct variable *v = dict_get_var (d, i); claim_short_name (v, 0, &short_names); } for (i = 0; i < var_cnt; i++) { struct variable *v = dict_get_var (d, i); int segment_cnt = sfm_width_to_segments (var_get_width (v)); for (j = 1; j < segment_cnt; j++) claim_short_name (v, j, &short_names); } /* Assign short names to first segment of remaining variables, then similarly for additional segments. */ for (i = 0; i < var_cnt; i++) { struct variable *v = dict_get_var (d, i); assign_short_name (v, 0, &short_names); } for (i = 0; i < var_cnt; i++) { struct variable *v = dict_get_var (d, i); int segment_cnt = sfm_width_to_segments (var_get_width (v)); for (j = 1; j < segment_cnt; j++) assign_short_name (v, j, &short_names); } stringi_set_destroy (&short_names); } pspp-1.0.1/src/data/settings.c0000644000175000017500000004205513137223525013131 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/settings.h" #include #include #include #include "data/case.h" #include "data/format.h" #include "data/value.h" #include "libpspp/i18n.h" #include "libpspp/integer-format.h" #include "libpspp/message.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct settings { /* Integer format used for IB and PIB input. */ enum integer_format input_integer_format; /* Floating-point format used for RB and RBHEX input. */ enum float_format input_float_format; /* Format of integers in output (SET WIB). */ enum integer_format output_integer_format; /* Format of reals in output (SET WRB). */ enum float_format output_float_format; int viewlength; int viewwidth; bool safer_mode; bool include; int epoch; bool route_errors_to_terminal; bool route_errors_to_listing; bool scompress; bool undefined; double blanks; int max_messages[MSG_N_SEVERITIES]; bool printback; bool mprint; int mxloops; size_t workspace; struct fmt_spec default_format; bool testing_mode; int fuzzbits; int cmd_algorithm; int global_algorithm; int syntax; struct fmt_settings *styles; enum settings_output_devices output_routing[SETTINGS_N_OUTPUT_TYPES]; enum settings_var_style var_output_style; enum settings_value_style value_output_style; }; static struct settings the_settings = { INTEGER_NATIVE, /* input_integer_format */ FLOAT_NATIVE_DOUBLE, /* input_float_format */ INTEGER_NATIVE, /* output_integer_format */ FLOAT_NATIVE_DOUBLE, /* output_float_format */ 24, /* viewlength */ 79, /* viewwidth */ false, /* safer_mode */ true, /* include */ -1, /* epoch */ true, /* route_errors_to_terminal */ true, /* route_errors_to_listing */ true, /* scompress */ true, /* undefined */ SYSMIS, /* blanks */ /* max_messages */ { 100, /* MSG_S_ERROR */ 100, /* MSG_S_WARNING */ 100 /* MSG_S_NOTE */ }, true, /* printback */ true, /* mprint */ 40, /* mxloops */ 64L * 1024 * 1024, /* workspace */ {FMT_F, 8, 2}, /* default_format */ false, /* testing_mode */ 6, /* fuzzbits */ ENHANCED, /* cmd_algorithm */ ENHANCED, /* global_algorithm */ ENHANCED, /* syntax */ NULL, /* styles */ /* output_routing */ {SETTINGS_DEVICE_LISTING | SETTINGS_DEVICE_TERMINAL, SETTINGS_DEVICE_LISTING | SETTINGS_DEVICE_TERMINAL, 0, SETTINGS_DEVICE_LISTING | SETTINGS_DEVICE_TERMINAL}, SETTINGS_VAR_STYLE_LABELS, SETTINGS_VAL_STYLE_LABELS }; /* Initializes the settings module. */ void settings_init (void) { settings_set_epoch (-1); the_settings.styles = fmt_settings_create (); settings_set_decimal_char (get_system_decimal ()); } /* Cleans up the settings module. */ void settings_done (void) { settings_destroy (&the_settings); } static void settings_copy (struct settings *dst, const struct settings *src) { *dst = *src; dst->styles = fmt_settings_clone (src->styles); } /* Returns a copy of the current settings. */ struct settings * settings_get (void) { struct settings *s = xmalloc (sizeof *s); settings_copy (s, &the_settings); return s; } /* Replaces the current settings by those in S. The caller retains ownership of S. */ void settings_set (const struct settings *s) { settings_destroy (&the_settings); settings_copy (&the_settings, s); } /* Destroys S. */ void settings_destroy (struct settings *s) { if (s != NULL) { fmt_settings_destroy (s->styles); if (s != &the_settings) free (s); } } /* Returns the floating-point format used for RB and RBHEX input. */ enum float_format settings_get_input_float_format (void) { return the_settings.input_float_format; } /* Sets the floating-point format used for RB and RBHEX input to FORMAT. */ void settings_set_input_float_format ( enum float_format format) { the_settings.input_float_format = format; } /* Returns the integer format used for IB and PIB input. */ enum integer_format settings_get_input_integer_format (void) { return the_settings.input_integer_format; } /* Sets the integer format used for IB and PIB input to FORMAT. */ void settings_set_input_integer_format ( enum integer_format format) { the_settings.input_integer_format = format; } /* Returns the current output integer format. */ enum integer_format settings_get_output_integer_format (void) { return the_settings.output_integer_format; } /* Sets the output integer format to INTEGER_FORMAT. */ void settings_set_output_integer_format ( enum integer_format integer_format) { the_settings.output_integer_format = integer_format; } /* Returns the current output float format. */ enum float_format settings_get_output_float_format (void) { return the_settings.output_float_format; } /* Sets the output float format to FLOAT_FORMAT. */ void settings_set_output_float_format ( enum float_format float_format) { the_settings.output_float_format = float_format; } /* Screen length in lines. */ int settings_get_viewlength (void) { return the_settings.viewlength; } /* Sets the view length. */ void settings_set_viewlength ( int viewlength_) { the_settings.viewlength = viewlength_; } /* Screen width. */ int settings_get_viewwidth(void) { return the_settings.viewwidth; } /* Sets the screen width. */ void settings_set_viewwidth ( int viewwidth_) { the_settings.viewwidth = viewwidth_; } /* Whether PSPP can erase and overwrite files. */ bool settings_get_safer_mode (void) { return the_settings.safer_mode; } /* Set safer mode. */ void settings_set_safer_mode (void) { the_settings.safer_mode = true; } /* If echo is on, whether commands from include files are echoed. */ bool settings_get_include (void) { return the_settings.include; } /* Set include file echo. */ void settings_set_include ( bool include) { the_settings.include = include; } /* What year to use as the start of the epoch. */ int settings_get_epoch (void) { assert (the_settings.epoch >= 0); return the_settings.epoch; } /* Sets the year that starts the epoch. */ void settings_set_epoch ( int epoch) { if (epoch < 0) { time_t t = time (0); struct tm *tm = localtime (&t); epoch = (tm != NULL ? tm->tm_year + 1900 : 2000) - 69; } the_settings.epoch = epoch; assert (the_settings.epoch >= 0); } /* Compress system files by default? */ bool settings_get_scompression (void) { return the_settings.scompress; } /* Set system file default compression. */ void settings_set_scompression ( bool scompress) { the_settings.scompress = scompress; } /* Whether to warn on undefined values in numeric data. */ bool settings_get_undefined (void) { return the_settings.undefined; } /* Set whether to warn on undefined values. */ void settings_set_undefined ( bool undefined) { the_settings.undefined = undefined; } /* The value that blank numeric fields are set to when read in. */ double settings_get_blanks (void) { return the_settings.blanks; } /* Set the value that blank numeric fields are set to when read in. */ void settings_set_blanks ( double blanks) { the_settings.blanks = blanks; } /* Returns the maximum number of messages to show of the given SEVERITY before aborting. (The value for MSG_S_WARNING is interpreted as maximum number of warnings and errors combined.) */ int settings_get_max_messages (enum msg_severity severity) { assert (severity < MSG_N_SEVERITIES); return the_settings.max_messages[severity]; } /* Sets the maximum number of messages to show of the given SEVERITY before aborting to MAX. (The value for MSG_S_WARNING is interpreted as maximum number of warnings and errors combined.) In addition, in the case of warnings the special value of zero indicates that no warnings are to be issued. */ void settings_set_max_messages (enum msg_severity severity, int max) { assert (severity < MSG_N_SEVERITIES); if (severity == MSG_S_WARNING) { if ( max == 0) { msg (MW, _("MXWARNS set to zero. No further warnings will be given even when potentially problematic situations are encountered.")); msg_ui_disable_warnings (true); } else if ( the_settings.max_messages [MSG_S_WARNING] == 0) { msg_ui_disable_warnings (false); the_settings.max_messages[MSG_S_WARNING] = max; msg (MW, _("Warnings re-enabled. %d warnings will be issued before aborting syntax processing."), max); } } the_settings.max_messages[severity] = max; } /* Independent of get_printback, controls whether the commands generated by macro invocations are displayed. */ bool settings_get_mprint (void) { return the_settings.mprint; } /* Sets whether the commands generated by macro invocations are displayed. */ void settings_set_mprint ( bool mprint) { the_settings.mprint = mprint; } /* Implied limit of unbounded loop. */ int settings_get_mxloops (void) { return the_settings.mxloops; } /* Set implied limit of unbounded loop. */ void settings_set_mxloops ( int mxloops) { the_settings.mxloops = mxloops; } /* Approximate maximum amount of memory to use for cases, in bytes. */ size_t settings_get_workspace (void) { return the_settings.workspace; } /* Approximate maximum number of cases to allocate in-core, given that each case has the format given in PROTO. */ size_t settings_get_workspace_cases (const struct caseproto *proto) { size_t n_cases = settings_get_workspace () / case_get_cost (proto); return MAX (n_cases, 4); } /* Set approximate maximum amount of memory to use for cases, in bytes. */ void settings_set_workspace (size_t workspace) { the_settings.workspace = workspace; } /* Default format for variables created by transformations and by DATA LIST {FREE,LIST}. */ const struct fmt_spec * settings_get_format (void) { return &the_settings.default_format; } /* Set default format for variables created by transformations and by DATA LIST {FREE,LIST}. */ void settings_set_format ( const struct fmt_spec *default_format) { the_settings.default_format = *default_format; } /* Are we in testing mode? (e.g. --testing-mode command line option) */ bool settings_get_testing_mode (void) { return the_settings.testing_mode; } /* Set testing mode. */ void settings_set_testing_mode ( bool testing_mode) { the_settings.testing_mode = testing_mode; } int settings_get_fuzzbits (void) { return the_settings.fuzzbits; } void settings_set_fuzzbits (int fuzzbits) { the_settings.fuzzbits = fuzzbits; } /* Return the current algorithm setting */ enum behavior_mode settings_get_algorithm (void) { return the_settings.cmd_algorithm; } /* Set the algorithm option globally. */ void settings_set_algorithm (enum behavior_mode mode) { the_settings.global_algorithm = the_settings.cmd_algorithm = mode; } /* Set the algorithm option for this command only */ void settings_set_cmd_algorithm ( enum behavior_mode mode) { the_settings.cmd_algorithm = mode; } /* Unset the algorithm option for this command */ void unset_cmd_algorithm (void) { the_settings.cmd_algorithm = the_settings.global_algorithm; } /* Get the current syntax setting */ enum behavior_mode settings_get_syntax (void) { return the_settings.syntax; } /* Set the syntax option */ void settings_set_syntax ( enum behavior_mode mode) { the_settings.syntax = mode; } /* Find the grouping characters in CC_STRING and sets *GROUPING and *DECIMAL appropriately. Returns true if successful, false otherwise. */ static bool find_cc_separators (const char *cc_string, char *decimal, char *grouping) { const char *sp; int comma_cnt, dot_cnt; /* Count commas and periods. There must be exactly three of one or the other, except that an apostrophe escapes a following comma or period. */ comma_cnt = dot_cnt = 0; for (sp = cc_string; *sp; sp++) if (*sp == ',') comma_cnt++; else if (*sp == '.') dot_cnt++; else if (*sp == '\'' && (sp[1] == '.' || sp[1] == ',' || sp[1] == '\'')) sp++; if ((comma_cnt == 3) == (dot_cnt == 3)) return false; if (comma_cnt == 3) { *decimal = '.'; *grouping = ','; } else { *decimal = ','; *grouping = '.'; } return true; } /* Extracts a token from IN into a newly allocated string AFFIXP. Tokens are delimited by GROUPING. Returns the first character following the token. */ static const char * extract_cc_token (const char *in, int grouping, char **affixp) { char *out; out = *affixp = xmalloc (strlen (in) + 1); for (; *in != '\0' && *in != grouping; in++) { if (*in == '\'' && in[1] == grouping) in++; *out++ = *in; } *out = '\0'; if (*in == grouping) in++; return in; } /* Sets custom currency specifier CC having name CC_NAME ('A' through 'E') to correspond to the settings in CC_STRING. */ bool settings_set_cc (const char *cc_string, enum fmt_type type) { char *neg_prefix, *prefix, *suffix, *neg_suffix; char decimal, grouping; assert (fmt_get_category (type) == FMT_CAT_CUSTOM); /* Determine separators. */ if (!find_cc_separators (cc_string, &decimal, &grouping)) { msg (SE, _("%s: Custom currency string `%s' does not contain " "exactly three periods or commas (or it contains both)."), fmt_name (type), cc_string); return false; } cc_string = extract_cc_token (cc_string, grouping, &neg_prefix); cc_string = extract_cc_token (cc_string, grouping, &prefix); cc_string = extract_cc_token (cc_string, grouping, &suffix); cc_string = extract_cc_token (cc_string, grouping, &neg_suffix); fmt_settings_set_style (the_settings.styles, type, decimal, grouping, neg_prefix, prefix, suffix, neg_suffix); free (neg_suffix); free (suffix); free (prefix); free (neg_prefix); return true; } /* Returns the decimal point character for TYPE. */ int settings_get_decimal_char (enum fmt_type type) { return fmt_settings_get_style (the_settings.styles, type)->decimal; } void settings_set_decimal_char (char decimal) { fmt_settings_set_decimal (the_settings.styles, decimal); } /* Returns the number formatting style associated with the given format TYPE. */ const struct fmt_number_style * settings_get_style (enum fmt_type type) { assert (is_fmt_type (type)); return fmt_settings_get_style (the_settings.styles, type); } /* Returns a string of the form "$#,###.##" according to FMT, which must be of type FMT_DOLLAR. The caller must free the string. */ char * settings_dollar_template (const struct fmt_spec *fmt) { struct string str = DS_EMPTY_INITIALIZER; int c; const struct fmt_number_style *fns ; assert (fmt->type == FMT_DOLLAR); fns = fmt_settings_get_style (the_settings.styles, fmt->type); ds_put_byte (&str, '$'); for (c = MAX (fmt->w - fmt->d - 1, 0); c > 0; ) { ds_put_byte (&str, '#'); if (--c % 4 == 0 && c > 0) { ds_put_byte (&str, fns->grouping); --c; } } if (fmt->d > 0) { ds_put_byte (&str, fns->decimal); ds_put_byte_multiple (&str, '#', fmt->d); } return ds_cstr (&str); } void settings_set_output_routing (enum settings_output_type type, enum settings_output_devices devices) { assert (type < SETTINGS_N_OUTPUT_TYPES); the_settings.output_routing[type] = devices; } enum settings_output_devices settings_get_output_routing (enum settings_output_type type) { assert (type < SETTINGS_N_OUTPUT_TYPES); return the_settings.output_routing[type] | SETTINGS_DEVICE_UNFILTERED; } enum settings_value_style settings_get_value_style (void) { return the_settings.value_output_style; } void settings_set_value_style (enum settings_value_style s) { the_settings.value_output_style = s; } enum settings_var_style settings_get_var_style (void) { return the_settings.var_output_style; } void settings_set_var_style (enum settings_var_style s) { the_settings.var_output_style = s; } pspp-1.0.1/src/data/data-out.h0000644000175000017500000000271212470434665013020 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_OUT_H #define DATA_OUT_H 1 #include #include "libpspp/float-format.h" #include "libpspp/integer-format.h" struct fmt_spec; struct string; union value; char * data_out (const union value *, const char *encoding, const struct fmt_spec *); char * data_out_pool (const union value *, const char *encoding, const struct fmt_spec *, struct pool *pool); char *data_out_stretchy (const union value *, const char *encoding, const struct fmt_spec *, struct pool *); void data_out_recode (const union value *input, const char *input_encoding, const struct fmt_spec *, struct string *output, const char *output_encoding); #endif /* data-out.h */ pspp-1.0.1/src/data/lazy-casereader.c0000644000175000017500000001204112470243700014330 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/lazy-casereader.h" #include #include "data/case.h" #include "data/casereader.h" #include "data/casereader-provider.h" #include "libpspp/assertion.h" #include "gl/xalloc.h" /* A lazy casereader's auxiliary data. */ struct lazy_casereader { unsigned long int serial; struct casereader *(*callback) (void *aux); void *aux; }; static const struct casereader_class lazy_casereader_class; /* Creates and returns a new lazy casereader that will instantiate its underlying casereader, if necessary, by calling CALLBACK, passing AUX as its argument. *SERIAL is set to a "serial number" that uniquely identifies the new lazy casereader, for use with lazy_casereader_destroy. PROTO must be the format of the cases to be read from the casereader. CASE_CNT is an upper limit on the number of cases that casereader_read will return from the casereader in successive calls. Ordinarily, this is the actual number of cases in the data source or CASENUMBER_MAX if the number of cases cannot be predicted in advance. */ struct casereader * lazy_casereader_create (const struct caseproto *proto, casenumber case_cnt, struct casereader *(*callback) (void *aux), void *aux, unsigned long int *serial) { static unsigned long int next_serial = 0; struct lazy_casereader *lc; assert (callback != NULL); lc = xmalloc (sizeof *lc); *serial = lc->serial = next_serial++; lc->callback = callback; lc->aux = aux; return casereader_create_sequential (NULL, proto, case_cnt, &lazy_casereader_class, lc); } /* If READER is the lazy casereader that was returned by lazy_casereader_create along with SERIAL, and READER was never instantiated by any use of a casereader function, then this function destroys READER without instantiating it, and returns true. Returns false in any other case; that is, if READER is not a lazy casereader, or if READER is a lazy casereader with a serial number different from SERIAL, or if READER is a lazy casereader that was instantiated. When this function returns true, it necessarily indicates that the lazy casereader was never cloned and never destroyed. */ bool lazy_casereader_destroy (struct casereader *reader, unsigned long int serial) { struct lazy_casereader *lc; if (reader == NULL) return false; lc = casereader_dynamic_cast (reader, &lazy_casereader_class); if (lc == NULL || lc->serial != serial) return false; lc->callback = NULL; casereader_destroy (reader); return true; } /* Instantiates lazy casereader READER, which is associated with LC. */ static void instantiate_lazy_casereader (struct casereader *reader, struct lazy_casereader *lc) { struct casereader *subreader; /* Call the client-provided callback to obtain the real casereader, then swap READER with that casereader. */ subreader = lc->callback (lc->aux); casereader_swap (reader, subreader); /* Now destroy the lazy casereader, which is no longer needed since we already swapped it out. Set the callback to null to prevent lazy_casereader_do_destroy from trying to instantiate it again. */ lc->callback = NULL; casereader_destroy (subreader); } static struct ccase * lazy_casereader_read (struct casereader *reader, void *lc_) { struct lazy_casereader *lc = lc_; instantiate_lazy_casereader (reader, lc); return casereader_read (reader); } static void lazy_casereader_do_destroy (struct casereader *reader UNUSED, void *lc_) { struct lazy_casereader *lc = lc_; if (lc->callback != NULL) casereader_destroy (lc->callback (lc->aux)); free (lc); } static struct casereader * lazy_casereader_clone (struct casereader *reader, void *lc_) { struct lazy_casereader *lc = lc_; instantiate_lazy_casereader (reader, lc); return casereader_clone (reader); } static struct ccase * lazy_casereader_peek (struct casereader *reader, void *lc_, casenumber idx) { struct lazy_casereader *lc = lc_; instantiate_lazy_casereader (reader, lc); return casereader_peek (reader, idx); } static const struct casereader_class lazy_casereader_class = { lazy_casereader_read, lazy_casereader_do_destroy, lazy_casereader_clone, lazy_casereader_peek, }; pspp-1.0.1/src/data/lazy-casereader.h0000644000175000017500000000322612470243700014342 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Lazy casereader. A "lazy casereader" is a casereader that saves an underlying casereader from the need to be instantiated in the case where it is never used. If any casereader operation is ever performed on a lazy casereader, it invokes a callback function (provided by the lazy casereader's creator) to instantiate the underlying reader. */ #ifndef DATA_LAZY_CASEREADER_H #define DATA_LAZY_CASEREADER_H 1 #include #include "data/case.h" struct casereader *lazy_casereader_create (const struct caseproto *, casenumber case_cnt, struct casereader *(*) (void *aux), void *aux, unsigned long int *serial); bool lazy_casereader_destroy (struct casereader *, unsigned long int serial); #endif /* data/lazy-casereader.h */ pspp-1.0.1/src/data/casereader-filter.c0000644000175000017500000003126213137223525014650 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/casereader.h" #include #include "data/casereader-provider.h" #include "data/casewriter.h" #include "data/variable.h" #include "data/dictionary.h" #include "libpspp/taint.h" #include "libpspp/message.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* A casereader that filters data coming from another casereader. */ struct casereader_filter { struct casereader *subreader; /* The reader to filter. */ bool (*include) (const struct ccase *, void *aux); bool (*destroy) (void *aux); void *aux; struct casewriter *exclude; /* Writer that gets filtered cases, or NULL. */ }; static const struct casereader_class casereader_filter_class; /* Creates and returns a casereader whose content is a filtered version of the data in SUBREADER. Only the cases for which INCLUDE returns true will appear in the returned casereader, in the original order. If EXCLUDE is non-null, then cases for which INCLUDE returns false are written to EXCLUDE. These cases will not necessarily be fully written to EXCLUDE until the filtering casereader's cases have been fully read or, if that never occurs, until the filtering casereader is destroyed. When the filtering casereader is destroyed, DESTROY will be called to allow any state maintained by INCLUDE to be freed. After this function is called, SUBREADER must not ever again be referenced directly. It will be destroyed automatically when the filtering casereader is destroyed. */ struct casereader * casereader_create_filter_func (struct casereader *subreader, bool (*include) (const struct ccase *, void *aux), bool (*destroy) (void *aux), void *aux, struct casewriter *exclude) { struct casereader_filter *filter = xmalloc (sizeof *filter); struct casereader *reader; filter->subreader = casereader_rename (subreader); filter->include = include; filter->destroy = destroy; filter->aux = aux; filter->exclude = exclude; reader = casereader_create_sequential ( NULL, casereader_get_proto (filter->subreader), CASENUMBER_MAX, &casereader_filter_class, filter); taint_propagate (casereader_get_taint (filter->subreader), casereader_get_taint (reader)); return reader; } /* Internal read function for filtering casereader. */ static struct ccase * casereader_filter_read (struct casereader *reader UNUSED, void *filter_) { struct casereader_filter *filter = filter_; for (;;) { struct ccase *c = casereader_read (filter->subreader); if (c == NULL) return NULL; else if (filter->include (c, filter->aux)) return c; else if (filter->exclude != NULL) casewriter_write (filter->exclude, c); else case_unref (c); } } /* Internal destruction function for filtering casereader. */ static void casereader_filter_destroy (struct casereader *reader, void *filter_) { struct casereader_filter *filter = filter_; /* Make sure we've written everything to the excluded cases casewriter, if there is one. */ if (filter->exclude != NULL) { struct ccase *c; while ((c = casereader_read (filter->subreader)) != NULL) if (filter->include (c, filter->aux)) case_unref (c); else casewriter_write (filter->exclude, c); } casereader_destroy (filter->subreader); if (filter->destroy != NULL && !filter->destroy (filter->aux)) casereader_force_error (reader); free (filter); } /* Filtering casereader class. */ static const struct casereader_class casereader_filter_class = { casereader_filter_read, casereader_filter_destroy, /* We could in fact delegate clone to the subreader, if the filter function is required to have no memory and if we added reference counting. But it might be useful to have filter functions with memory and in any case this would require a little extra work. */ NULL, NULL, }; /* Casereader for filtering valid weights. */ /* Weight-filtering data. */ struct casereader_filter_weight { const struct variable *weight_var; /* Weight variable. */ bool *warn_on_invalid; /* Have we already issued an error? */ bool local_warn_on_invalid; /* warn_on_invalid might point here. */ }; static bool casereader_filter_weight_include (const struct ccase *, void *); static bool casereader_filter_weight_destroy (void *); /* Creates and returns a casereader that filters cases from READER by valid weights, that is, any cases with user- or system-missing, zero, or negative weights are dropped. The weight variable's information is taken from DICT. If DICT does not have a weight variable, then no cases are filtered out. When a case with an invalid weight is encountered, *WARN_ON_INVALID is checked. If it is true, then an error message is issued and *WARN_ON_INVALID is set false. If WARN_ON_INVALID is a null pointer, then an internal bool that is initially true is used instead of a caller-supplied bool. If EXCLUDE is non-null, then dropped cases are written to EXCLUDE. These cases will not necessarily be fully written to EXCLUDE until the filtering casereader's cases have been fully read or, if that never occurs, until the filtering casereader is destroyed. After this function is called, READER must not ever again be referenced directly. It will be destroyed automatically when the filtering casereader is destroyed. */ struct casereader * casereader_create_filter_weight (struct casereader *reader, const struct dictionary *dict, bool *warn_on_invalid, struct casewriter *exclude) { struct variable *weight_var = dict_get_weight (dict); if (weight_var != NULL) { struct casereader_filter_weight *cfw = xmalloc (sizeof *cfw); cfw->weight_var = weight_var; cfw->warn_on_invalid = (warn_on_invalid ? warn_on_invalid : &cfw->local_warn_on_invalid); cfw->local_warn_on_invalid = true; reader = casereader_create_filter_func (reader, casereader_filter_weight_include, casereader_filter_weight_destroy, cfw, exclude); } else reader = casereader_rename (reader); return reader; } /* Internal "include" function for weight-filtering casereader. */ static bool casereader_filter_weight_include (const struct ccase *c, void *cfw_) { struct casereader_filter_weight *cfw = cfw_; double value = case_num (c, cfw->weight_var); if (value >= 0.0 && !var_is_num_missing (cfw->weight_var, value, MV_ANY)) return true; else { if (*cfw->warn_on_invalid) { msg (SW, _("At least one case in the data read had a weight value " "that was user-missing, system-missing, zero, or " "negative. These case(s) were ignored.")); *cfw->warn_on_invalid = false; } return false; } } /* Internal "destroy" function for weight-filtering casereader. */ static bool casereader_filter_weight_destroy (void *cfw_) { struct casereader_filter_weight *cfw = cfw_; free (cfw); return true; } /* Casereader for filtering missing values. */ /* Missing-value filtering data. */ struct casereader_filter_missing { struct variable **vars; /* Variables whose values to filter. */ size_t var_cnt; /* Number of variables. */ enum mv_class class; /* Types of missing values to filter. */ casenumber *n_missing; }; static bool casereader_filter_missing_include (const struct ccase *, void *); static bool casereader_filter_missing_destroy (void *); /* Creates and returns a casereader that filters out cases from READER that have a missing value in the given CLASS for any of the VAR_CNT variables in VARS. Only cases that have non-missing values for all of these variables are passed through. Ownership of VARS is retained by the caller. If EXCLUDE is non-null, then dropped cases are written to EXCLUDE. These cases will not necessarily be fully written to EXCLUDE until the filtering casereader's cases have been fully read or, if that never occurs, until the filtering casereader is destroyed. If N_MISSING is non-null, then after reading, it will be filled with the total number of dropped cases. After this function is called, READER must not ever again be referenced directly. It will be destroyed automatically when the filtering casereader is destroyed. */ struct casereader * casereader_create_filter_missing (struct casereader *reader, const struct variable *const*vars, size_t var_cnt, enum mv_class class, casenumber *n_missing, struct casewriter *exclude) { if (var_cnt > 0 && class != MV_NEVER) { struct casereader_filter_missing *cfm = xmalloc (sizeof *cfm); cfm->vars = xmemdup (vars, sizeof *vars * var_cnt); cfm->var_cnt = var_cnt; cfm->class = class; cfm->n_missing = n_missing; if (n_missing) *n_missing = 0; return casereader_create_filter_func (reader, casereader_filter_missing_include, casereader_filter_missing_destroy, cfm, exclude); } else return casereader_rename (reader); } /* Internal "include" function for missing value-filtering casereader. */ static bool casereader_filter_missing_include (const struct ccase *c, void *cfm_) { const struct casereader_filter_missing *cfm = cfm_; size_t i; for (i = 0; i < cfm->var_cnt; i++) { struct variable *var = cfm->vars[i]; const union value *value = case_data (c, var); if (var_is_value_missing (var, value, cfm->class)) { if ( cfm->n_missing ) (*cfm->n_missing)++; return false; } } return true; } /* Internal "destroy" function for missing value-filtering casereader. */ static bool casereader_filter_missing_destroy (void *cfm_) { struct casereader_filter_missing *cfm = cfm_; free (cfm->vars); free (cfm); return true; } /* Case-counting casereader. */ static bool casereader_counter_include (const struct ccase *, void *); /* Creates and returns a new casereader that counts the number of cases that have been read from it. *COUNTER is initially set to INITIAL_VALUE, then incremented by 1 each time a case is read. Counting casereaders must be used very cautiously: if a counting casereader is cloned or if the casereader_peek function is used on it, then the counter's value can be higher than expected because of the buffering that goes on behind the scenes. The counter is only incremented as cases are actually read from the casereader. In particular, if the casereader is destroyed before all cases have been read from the casereader, cases never read will not be included in the count. After this function is called, READER must not ever again be referenced directly. It will be destroyed automatically when the filtering casereader is destroyed. */ struct casereader * casereader_create_counter (struct casereader *reader, casenumber *counter, casenumber initial_value) { *counter = initial_value; return casereader_create_filter_func (reader, casereader_counter_include, NULL, counter, NULL); } /* Internal "include" function for counting casereader. */ static bool casereader_counter_include (const struct ccase *c UNUSED, void *counter_) { casenumber *counter = counter_; ++*counter; return true; } pspp-1.0.1/src/data/casereader-select.c0000644000175000017500000000453712470243700014643 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/casereader-provider.h" #include "gl/xalloc.h" struct casereader_select { casenumber by; casenumber i; }; static bool casereader_select_include (const struct ccase *c UNUSED, void *cs_) { struct casereader_select *cs = cs_; if (++cs->i >= cs->by) { cs->i = 0; return true; } else return false; } static bool casereader_select_destroy (void *cs_) { struct casereader_select *cs = cs_; free (cs); return true; } /* Returns a casereader that contains cases FIRST though LAST, exclusive, of those within SUBREADER. (The first case in SUBREADER is number 0.) If BY is greater than 1, then it specifies a step between cases, e.g. a BY value of 2 causes the cases numbered FIRST + 1, FIRST + 3, FIRST + 5, and so on to be omitted. The caller gives up ownership of SUBREADER, transferring it into this function. */ struct casereader * casereader_select (struct casereader *subreader, casenumber first, casenumber last, casenumber by) { if (by == 0) by = 1; casereader_advance (subreader, first); if (last >= first) casereader_truncate (subreader, (last - first) / by * by); if (by == 1) return casereader_rename (subreader); else { struct casereader_select *cs = xmalloc (sizeof *cs); cs->by = by; cs->i = by - 1; return casereader_create_filter_func (subreader, casereader_select_include, casereader_select_destroy, cs, NULL); } } pspp-1.0.1/src/data/subcase.c0000644000175000017500000003220312470434665012720 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/subcase.h" #include #include "data/case.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "gl/xalloc.h" static void invalidate_proto (struct subcase *sc); /* Initializes SC as a subcase that contains no fields. */ void subcase_init_empty (struct subcase *sc) { sc->fields = NULL; sc->n_fields = 0; sc->proto = NULL; } /* Initializes SC as a subcase with fields extracted from the N_VARS variables in VARS, with ascending sort order. */ void subcase_init_vars (struct subcase *sc, const struct variable *const *vars, size_t n_vars) { subcase_init_empty (sc); subcase_add_vars_always (sc, vars, n_vars); } /* Initializes SC as a subcase with a single field extracted from VAR, with the sort order specified by DIRECTION. */ void subcase_init_var (struct subcase *sc, const struct variable *var, enum subcase_direction direction) { subcase_init_empty (sc); subcase_add_var (sc, var, direction); } void subcase_init (struct subcase *sc, int index, int width, enum subcase_direction direction) { subcase_init_empty (sc); subcase_add (sc, index, width, direction); } /* Removes all the fields from SC. */ void subcase_clear (struct subcase *sc) { sc->n_fields = 0; invalidate_proto (sc); } /* Initializes SC with the same fields as ORIG. */ void subcase_clone (struct subcase *sc, const struct subcase *orig) { sc->fields = xmemdup (orig->fields, orig->n_fields * sizeof *orig->fields); sc->n_fields = orig->n_fields; sc->proto = orig->proto ? caseproto_ref (orig->proto) : NULL; } /* Frees the memory owned by SC (but not SC itself). */ void subcase_destroy (struct subcase *sc) { free (sc->fields); caseproto_unref (sc->proto); } /* Returns true if VAR already has a field in SC, false otherwise. */ bool subcase_contains_var (const struct subcase *sc, const struct variable *var) { return subcase_contains (sc, var_get_case_index (var)); } /* Returns true if CASE_INDEX already has a field in SC, false otherwise. */ bool subcase_contains (const struct subcase *sc, int case_index) { size_t i; for (i = 0; i < sc->n_fields; i++) if (sc->fields[i].case_index == case_index) return true; return false; } /* Add a field for VAR to SC, with DIRECTION as the sort order. Returns true if successful, false if VAR already has a field in SC. */ bool subcase_add_var (struct subcase *sc, const struct variable *var, enum subcase_direction direction) { if (!subcase_contains_var (sc, var)) { subcase_add_var_always (sc, var, direction); return true; } else return false; } /* Add a field for CASE_INDEX, WIDTH to SC, with DIRECTION as the sort order. Returns true if successful, false if CASE_INDEX already has a field in SC. */ bool subcase_add (struct subcase *sc, int case_index, int width, enum subcase_direction direction) { if (!subcase_contains (sc, case_index)) { subcase_add_always (sc, case_index, width, direction); return true; } else return false; } /* Add a field for VAR to SC, with DIRECTION as the sort order, regardless of whether VAR already has a field in SC. */ void subcase_add_var_always (struct subcase *sc, const struct variable *var, enum subcase_direction direction) { return subcase_add_always (sc, var_get_case_index (var), var_get_width (var), direction); } /* Add a field for each of the N_VARS variables in VAR to SC, regardless of whether each variable already has a field in SC. The fields are added with ascending direction. */ void subcase_add_vars_always (struct subcase *sc, const struct variable *const *vars, size_t n_vars) { size_t i; sc->fields = xnrealloc (sc->fields, sc->n_fields + n_vars, sizeof *sc->fields); for (i = 0; i < n_vars; i++) { struct subcase_field *field = &sc->fields[sc->n_fields++]; field->case_index = var_get_case_index (vars[i]); field->width = var_get_width (vars[i]); field->direction = SC_ASCEND; } invalidate_proto (sc); } /* Add a field for CASE_INDEX, WIDTH to SC, with DIRECTION as the sort order, regardless of whether CASE_INDEX already has a field in SC. */ void subcase_add_always (struct subcase *sc, int case_index, int width, enum subcase_direction direction) { struct subcase_field *field; sc->fields = xnrealloc (sc->fields, sc->n_fields + 1, sizeof *sc->fields); field = &sc->fields[sc->n_fields++]; field->case_index = case_index; field->width = width; field->direction = direction; invalidate_proto (sc); } /* Adds a field to SC for each column in PROTO, so that SC contains all of the columns in PROTO in the same order as a case conforming to PROTO. The fields are added with ascending direction. */ void subcase_add_proto_always (struct subcase *sc, const struct caseproto *proto) { size_t n = caseproto_get_n_widths (proto); size_t i; sc->fields = xnrealloc (sc->fields, sc->n_fields + n, sizeof *sc->fields); for (i = 0; i < n; i++) { struct subcase_field *field = &sc->fields[sc->n_fields++]; field->case_index = i; field->width = caseproto_get_width (proto, i); field->direction = SC_ASCEND; } invalidate_proto (sc); } /* Obtains a caseproto for a case described by SC. The caller must not modify or unref the returned case prototype. */ const struct caseproto * subcase_get_proto (const struct subcase *sc_) { struct subcase *sc = CONST_CAST (struct subcase *, sc_); if (sc->proto == NULL) { size_t i; sc->proto = caseproto_create (); for (i = 0; i < sc->n_fields; i++) sc->proto = caseproto_add_width (sc->proto, sc->fields[i].width); } return sc->proto; } /* Returns true if and only if A and B are conformable, which means that they have the same number of fields and that each corresponding field in A and B have the same width. */ bool subcase_conformable (const struct subcase *a, const struct subcase *b) { size_t i; if (a == b) return true; if (a->n_fields != b->n_fields) return false; for (i = 0; i < a->n_fields; i++) if (a->fields[i].width != b->fields[i].width) return false; return true; } /* Copies the fields represented by SC from C into VALUES. VALUES must have space for at least subcase_get_n_fields(SC) array elements. */ void subcase_extract (const struct subcase *sc, const struct ccase *c, union value values[]) { size_t i; for (i = 0; i < sc->n_fields; i++) { const struct subcase_field *field = &sc->fields[i]; union value *value = &values[i]; value_copy (value, case_data_idx (c, field->case_index), field->width); } } /* Copies the data in VALUES into the fields in C represented by SC. VALUES must have at least subcase_get_n_fields(SC) array elements, and C must be large enough to contain all the fields in SC. */ void subcase_inject (const struct subcase *sc, const union value values[], struct ccase *c) { size_t i; for (i = 0; i < sc->n_fields; i++) { const struct subcase_field *field = &sc->fields[i]; const union value *value = &values[i]; value_copy (case_data_rw_idx (c, field->case_index), value, field->width); } } /* Copies the fields in SRC represented by SRC_SC into the corresponding fields in DST respresented by DST_SC. SRC_SC and DST_SC must be conformable (as tested by subcase_conformable()). DST must not be shared. */ void subcase_copy (const struct subcase *src_sc, const struct ccase *src, const struct subcase *dst_sc, struct ccase *dst) { size_t i; expensive_assert (subcase_conformable (src_sc, dst_sc)); for (i = 0; i < src_sc->n_fields; i++) { const struct subcase_field *src_field = &src_sc->fields[i]; const struct subcase_field *dst_field = &dst_sc->fields[i]; value_copy (case_data_rw_idx (dst, dst_field->case_index), case_data_idx (src, src_field->case_index), src_field->width); } } /* Compares the fields in A specified in A_SC against the fields in B specified in B_SC. Returns -1, 0, or 1 if A's fields are lexicographically less than, equal to, or greater than B's fields, respectively. A_SC and B_SC must be conformable (as tested by subcase_conformable()). */ int subcase_compare_3way (const struct subcase *a_sc, const struct ccase *a, const struct subcase *b_sc, const struct ccase *b) { size_t i; expensive_assert (subcase_conformable (a_sc, b_sc)); for (i = 0; i < a_sc->n_fields; i++) { const struct subcase_field *a_field = &a_sc->fields[i]; const struct subcase_field *b_field = &b_sc->fields[i]; int cmp = value_compare_3way (case_data_idx (a, a_field->case_index), case_data_idx (b, b_field->case_index), a_field->width); if (cmp != 0) return a_field->direction == SC_ASCEND ? cmp : -cmp; } return 0; } /* Compares the values in A against the values in B specified by SC's fields. Returns -1, 0, or 1 if A's values are lexicographically less than, equal to, or greater than B's values, respectively. */ int subcase_compare_3way_xc (const struct subcase *sc, const union value a[], const struct ccase *b) { size_t i; for (i = 0; i < sc->n_fields; i++) { const struct subcase_field *field = &sc->fields[i]; int cmp = value_compare_3way (&a[i], case_data_idx (b, field->case_index), field->width); if (cmp != 0) return field->direction == SC_ASCEND ? cmp : -cmp; } return 0; } /* Compares the values in A specified by SC's fields against the values in B. Returns -1, 0, or 1 if A's values are lexicographically less than, equal to, or greater than B's values, respectively. */ int subcase_compare_3way_cx (const struct subcase *sc, const struct ccase *a, const union value b[]) { return -subcase_compare_3way_xc (sc, b, a); } /* Compares the values in A against the values in B, using SC to obtain the number and width of each value. Returns -1, 0, or 1 if A's values are lexicographically less than, equal to, or greater than B's values, respectively. */ int subcase_compare_3way_xx (const struct subcase *sc, const union value a[], const union value b[]) { size_t i; for (i = 0; i < sc->n_fields; i++) { const struct subcase_field *field = &sc->fields[i]; int cmp = value_compare_3way (a++, b++, field->width); if (cmp != 0) return field->direction == SC_ASCEND ? cmp : -cmp; } return 0; } /* Compares the fields in A specified in A_SC against the fields in B specified in B_SC. Returns true if the fields' values are equal, false otherwise. A_SC and B_SC must be conformable (as tested by subcase_conformable()). */ bool subcase_equal (const struct subcase *a_sc, const struct ccase *a, const struct subcase *b_sc, const struct ccase *b) { return subcase_compare_3way (a_sc, a, b_sc, b) == 0; } /* Compares the values in A against the values in B specified by SC's fields. Returns true if A's values are equal to B's values, otherwise false. */ bool subcase_equal_xc (const struct subcase *sc, const union value a[], const struct ccase *b) { return subcase_compare_3way_xc (sc, a, b) == 0; } /* Compares the values in A specified by SC's fields against the values in B. Returns true if A's values are equal to B's values, otherwise false. */ bool subcase_equal_cx (const struct subcase *sc, const struct ccase *a, const union value b[]) { return subcase_compare_3way_cx (sc, a, b) == 0; } /* Compares the values in A against the values in B, using SC to obtain the number and width of each value. Returns true if A's values are equal to B's values, otherwise false. */ bool subcase_equal_xx (const struct subcase *sc, const union value a[], const union value b[]) { return subcase_compare_3way_xx (sc, a, b) == 0; } /* Discards SC's case prototype. (It will be recreated if needed again later.) */ static void invalidate_proto (struct subcase *sc) { caseproto_unref (sc->proto); sc->proto = NULL; } pspp-1.0.1/src/data/settings.h0000644000175000017500000001225712523704223013134 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !settings_h #define settings_h 1 #include #include #include "data/format.h" #include "libpspp/float-format.h" #include "libpspp/integer-format.h" #include "libpspp/message.h" struct caseproto; struct settings; void settings_init (void); void settings_done (void); struct settings *settings_get (void); void settings_set (const struct settings *); void settings_destroy (struct settings *); enum float_format settings_get_input_float_format (void); void settings_set_input_float_format ( enum float_format); /* Returns the integer format used for IB and PIB input. */ enum integer_format settings_get_input_integer_format (void); /* Sets the integer format used for IB and PIB input to FORMAT. */ void settings_set_input_integer_format ( enum integer_format); /* Returns the current output integer format. */ enum integer_format settings_get_output_integer_format (void); /* Sets the output integer format to INTEGER_FORMAT. */ void settings_set_output_integer_format (enum integer_format integer_format); /* Returns the current output float format. */ enum float_format settings_get_output_float_format (void); /* Sets the output float format to FLOAT_FORMAT. */ void settings_set_output_float_format (enum float_format float_format); int settings_get_viewlength (void); void settings_set_viewlength ( int); int settings_get_viewwidth (void); void settings_set_viewwidth ( int); bool settings_get_safer_mode (void); void settings_set_safer_mode (void); bool settings_get_include (void); void settings_set_include ( bool); int settings_get_epoch (void); void settings_set_epoch ( int); bool settings_get_scompression (void); void settings_set_scompression (bool); bool settings_get_undefined (void); void settings_set_undefined (bool); double settings_get_blanks (void); void settings_set_blanks (double); int settings_get_max_messages (enum msg_severity); void settings_set_max_messages (enum msg_severity, int max); bool settings_get_mprint (void); void settings_set_mprint (bool); int settings_get_mxloops (void); void settings_set_mxloops ( int); size_t settings_get_workspace (void); size_t settings_get_workspace_cases (const struct caseproto *); void settings_set_workspace (size_t); const struct fmt_spec *settings_get_format (void); void settings_set_format ( const struct fmt_spec *); bool settings_get_testing_mode (void); void settings_set_testing_mode (bool); int settings_get_fuzzbits (void); void settings_set_fuzzbits (int); enum settings_var_style { SETTINGS_VAR_STYLE_NAMES, SETTINGS_VAR_STYLE_LABELS, SETTINGS_VAR_STYLE_BOTH }; enum settings_value_style { SETTINGS_VAL_STYLE_VALUES, SETTINGS_VAL_STYLE_LABELS, SETTINGS_VAL_STYLE_BOTH }; enum settings_value_style settings_get_value_style (void); enum settings_var_style settings_get_var_style (void); void settings_set_value_style (enum settings_value_style s); void settings_set_var_style (enum settings_var_style s); enum behavior_mode { ENHANCED, /* Use improved PSPP behavior. */ COMPATIBLE /* Be as compatible as possible. */ }; enum behavior_mode settings_get_algorithm (void); void settings_set_algorithm (enum behavior_mode); enum behavior_mode settings_get_syntax (void); void settings_set_syntax (enum behavior_mode); void settings_set_cmd_algorithm (enum behavior_mode); void unset_cmd_algorithm (void); enum fmt_type; bool settings_set_cc (const char *cc_string, enum fmt_type type); int settings_get_decimal_char (enum fmt_type type); void settings_set_decimal_char (char decimal); const struct fmt_number_style * settings_get_style (enum fmt_type type); char * settings_dollar_template (const struct fmt_spec *fmt); /* Routing of different kinds of output. */ enum settings_output_devices { SETTINGS_DEVICE_LISTING = 1 << 0, /* File or device. */ SETTINGS_DEVICE_TERMINAL = 1 << 1, /* Screen. */ SETTINGS_DEVICE_UNFILTERED = 1 << 2 /* Gets all output, no filtering. */ }; enum settings_output_type { SETTINGS_OUTPUT_ERROR, /* Errors and warnings. */ SETTINGS_OUTPUT_NOTE, /* Notes. */ SETTINGS_OUTPUT_SYNTAX, /* Syntax. */ SETTINGS_OUTPUT_RESULT, /* Everything else. */ SETTINGS_N_OUTPUT_TYPES }; void settings_set_output_routing (enum settings_output_type, enum settings_output_devices); enum settings_output_devices settings_get_output_routing ( enum settings_output_type); #endif /* !settings_h */ pspp-1.0.1/src/data/variable.h0000644000175000017500000001655413137223525013070 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_VARIABLE_H #define DATA_VARIABLE_H 1 #include #include #include "data/dict-class.h" #include "data/missing-values.h" #include "data/val-type.h" /* Bitfields to identify traits of a variable */ #define VAR_TRAIT_NAME 0x0001 #define VAR_TRAIT_WIDTH 0x0002 #define VAR_TRAIT_ROLE 0x0004 #define VAR_TRAIT_LABEL 0x0008 #define VAR_TRAIT_VALUE_LABELS 0x0010 #define VAR_TRAIT_MISSING_VALUES 0x0020 #define VAR_TRAIT_ALIGNMENT 0x0040 #define VAR_TRAIT_MEASURE 0x0080 #define VAR_TRAIT_DISPLAY_WIDTH 0x0100 #define VAR_TRAIT_LEAVE 0x0200 #define VAR_TRAIT_POSITION 0x0400 #define VAR_TRAIT_ATTRIBUTES 0x0800 #define VAR_TRAIT_PRINT_FORMAT 0x1000 #define VAR_TRAIT_WRITE_FORMAT 0x2000 union value; /* Variables. These functions should rarely be called directly: use dict_create_var, dict_clone_var, or dict_delete_var instead. */ struct variable *var_create (const char *name, int width); struct variable *var_clone (const struct variable *); void var_destroy (struct variable *); /* Variable names. */ const char *var_get_name (const struct variable *); void var_set_name (struct variable *, const char *); enum dict_class var_get_dict_class (const struct variable *); int compare_vars_by_name (const void *, const void *, const void *); unsigned hash_var_by_name (const void *, const void *); int compare_var_ptrs_by_name (const void *, const void *, const void *); unsigned hash_var_ptr_by_name (const void *, const void *); int compare_var_ptrs_by_dict_index (const void *, const void *, const void *); struct fmt_spec; /* Types and widths of values associated with a variable. */ enum val_type var_get_type (const struct variable *); int var_get_width (const struct variable *); void var_set_width (struct variable *, int width); void var_set_width_and_formats (struct variable *v, int new_width, const struct fmt_spec *print, const struct fmt_spec *write); bool var_is_numeric (const struct variable *); bool var_is_alpha (const struct variable *); /* Variables' missing values. */ const struct missing_values *var_get_missing_values (const struct variable *); void var_set_missing_values (struct variable *, const struct missing_values *); void var_clear_missing_values (struct variable *); bool var_has_missing_values (const struct variable *); bool var_is_value_missing (const struct variable *, const union value *, enum mv_class); bool var_is_num_missing (const struct variable *, double, enum mv_class); bool var_is_str_missing (const struct variable *, const uint8_t[], enum mv_class); /* Value labels. */ const char *var_lookup_value_label (const struct variable *, const union value *); struct string; void var_append_value_name (const struct variable *, const union value *, struct string *); bool var_has_value_labels (const struct variable *); const struct val_labs *var_get_value_labels (const struct variable *); void var_set_value_labels (struct variable *, const struct val_labs *); bool var_add_value_label (struct variable *, const union value *, const char *); void var_replace_value_label (struct variable *, const union value *, const char *); void var_clear_value_labels (struct variable *); /* Print and write formats. */ const struct fmt_spec *var_get_print_format (const struct variable *); void var_set_print_format (struct variable *, const struct fmt_spec *); const struct fmt_spec *var_get_write_format (const struct variable *); void var_set_write_format (struct variable *, const struct fmt_spec *); void var_set_both_formats (struct variable *, const struct fmt_spec *); struct fmt_spec var_default_formats (int width); /* Variable labels. */ const char *var_to_string (const struct variable *); const char *var_get_label (const struct variable *); void var_set_label (struct variable *, const char *label); void var_clear_label (struct variable *); bool var_has_label (const struct variable *); /* How data is measured. */ enum measure { MEASURE_NOMINAL = 0, MEASURE_ORDINAL = 1, MEASURE_SCALE = 2, n_MEASURES }; bool measure_is_valid (enum measure); const char *measure_to_string (enum measure); const char *measure_to_syntax (enum measure); enum measure var_get_measure (const struct variable *); void var_set_measure (struct variable *, enum measure); enum measure var_default_measure (enum val_type); /* Intended usage of a variable, for populating dialogs. */ enum var_role { ROLE_INPUT, ROLE_TARGET, ROLE_BOTH, ROLE_NONE, ROLE_PARTITION, ROLE_SPLIT }; bool var_role_is_valid (enum var_role); const char *var_role_to_string (enum var_role); const char *var_role_to_syntax (enum var_role); enum var_role var_get_role (const struct variable *); void var_set_role (struct variable *, enum var_role); /* GUI display width. */ int var_get_display_width (const struct variable *); void var_set_display_width (struct variable *, int display_width); int var_default_display_width (int width); /* Alignment of data for display. */ enum alignment { ALIGN_LEFT = 0, ALIGN_RIGHT = 1, ALIGN_CENTRE = 2 }; bool alignment_is_valid (enum alignment); const char *alignment_to_string (enum alignment); const char *alignment_to_syntax (enum alignment); enum alignment var_get_alignment (const struct variable *); void var_set_alignment (struct variable *, enum alignment); enum alignment var_default_alignment (enum val_type); /* Whether variables' values should be preserved from case to case. */ bool var_get_leave (const struct variable *); void var_set_leave (struct variable *, bool leave); bool var_must_leave (const struct variable *); /* Short names. */ size_t var_get_short_name_cnt (const struct variable *); const char *var_get_short_name (const struct variable *, size_t idx); void var_set_short_name (struct variable *, size_t, const char *); void var_clear_short_names (struct variable *); /* Relationship with dictionary. */ size_t var_get_dict_index (const struct variable *); size_t var_get_case_index (const struct variable *); /* Custom attributes. */ struct attrset *var_get_attributes (const struct variable *); void var_set_attributes (struct variable *, const struct attrset *); bool var_has_attributes (const struct variable *); /* Encoding. */ const char *var_get_encoding (const struct variable *); /* Function types. */ typedef bool var_predicate_func (const struct variable *); double var_force_valid_weight (const struct variable *wv, double w, bool *warn_on_invalid); #endif /* data/variable.h */ pspp-1.0.1/src/data/variable.c0000644000175000017500000010400313137223525013046 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/variable.h" #include #include "data/attributes.h" #include "data/data-out.h" #include "data/dictionary.h" #include "data/format.h" #include "data/identifier.h" #include "data/missing-values.h" #include "data/settings.h" #include "data/value-labels.h" #include "data/vardict.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/hash-functions.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* A variable. */ struct variable { /* Dictionary information. */ char *name; /* Variable name. Mixed case. */ int width; /* 0 for numeric, otherwise string width. */ struct missing_values miss; /* Missing values. */ struct fmt_spec print; /* Default format for PRINT. */ struct fmt_spec write; /* Default format for WRITE. */ struct val_labs *val_labs; /* Value labels. */ char *label; /* Variable label. */ struct string name_and_label; /* The name and label in the same string */ /* GUI information. */ enum measure measure; /* Nominal, ordinal, or continuous. */ enum var_role role; /* Intended use. */ int display_width; /* Width of data editor column. */ enum alignment alignment; /* Alignment of data in GUI. */ /* Case information. */ bool leave; /* Leave value from case to case? */ /* Data for use by containing dictionary. */ struct vardict_info *vardict; /* Used only for system and portable file input and output. See short-names.h. */ char **short_names; size_t short_name_cnt; /* Custom attributes. */ struct attrset attributes; }; static void var_set_print_format_quiet (struct variable *v, const struct fmt_spec *print); static void var_set_write_format_quiet (struct variable *v, const struct fmt_spec *write); static void var_set_label_quiet (struct variable *v, const char *label); static void var_set_name_quiet (struct variable *v, const char *name); /* Creates and returns a new variable with the given NAME and WIDTH and other fields initialized to default values. The variable is not added to a dictionary; for that, use dict_create_var instead. */ struct variable * var_create (const char *name, int width) { struct variable *v; enum val_type type; assert (width >= 0 && width <= MAX_STRING); v = xzalloc (sizeof *v); var_set_name_quiet (v, name); v->width = width; mv_init (&v->miss, width); v->leave = var_must_leave (v); type = val_type_from_width (width); v->alignment = var_default_alignment (type); v->measure = var_default_measure (type); v->role = ROLE_INPUT; v->display_width = var_default_display_width (width); v->print = v->write = var_default_formats (width); attrset_init (&v->attributes); ds_init_empty (&v->name_and_label); return v; } /* Destroys variable V. V must not belong to a dictionary. If it does, use dict_delete_var instead. */ void var_destroy (struct variable *v) { if (v != NULL) { assert (!var_has_vardict (v)); mv_destroy (&v->miss); var_clear_short_names (v); val_labs_destroy (v->val_labs); var_set_label_quiet (v, NULL); attrset_destroy (var_get_attributes (v)); free (v->name); ds_destroy (&v->name_and_label); free (v); } } /* Variable names. */ /* Return variable V's name, as a UTF-8 encoded string. */ const char * var_get_name (const struct variable *v) { return v->name; } /* Sets V's name to NAME, a UTF-8 encoded string. Do not use this function for a variable in a dictionary. Use dict_rename_var instead. */ static void var_set_name_quiet (struct variable *v, const char *name) { assert (!var_has_vardict (v)); assert (id_is_plausible (name, false)); free (v->name); v->name = xstrdup (name); ds_destroy (&v->name_and_label); ds_init_empty (&v->name_and_label); } /* Sets V's name to NAME, a UTF-8 encoded string. Do not use this function for a variable in a dictionary. Use dict_rename_var instead. */ void var_set_name (struct variable *v, const char *name) { struct variable *ov = var_clone (v); var_set_name_quiet (v, name); dict_var_changed (v, VAR_TRAIT_NAME, ov); } /* Returns VAR's dictionary class. */ enum dict_class var_get_dict_class (const struct variable *var) { return dict_class_from_id (var->name); } /* A hsh_compare_func that orders variables A and B by their names. */ int compare_vars_by_name (const void *a_, const void *b_, const void *aux UNUSED) { const struct variable *a = a_; const struct variable *b = b_; return utf8_strcasecmp (a->name, b->name); } /* A hsh_hash_func that hashes variable V based on its name. */ unsigned hash_var_by_name (const void *v_, const void *aux UNUSED) { const struct variable *v = v_; return utf8_hash_case_string (v->name, 0); } /* A hsh_compare_func that orders pointers to variables A and B by their names. */ int compare_var_ptrs_by_name (const void *a_, const void *b_, const void *aux UNUSED) { struct variable *const *a = a_; struct variable *const *b = b_; return utf8_strcasecmp (var_get_name (*a), var_get_name (*b)); } /* A hsh_compare_func that orders pointers to variables A and B by their dictionary indexes. */ int compare_var_ptrs_by_dict_index (const void *a_, const void *b_, const void *aux UNUSED) { struct variable *const *a = a_; struct variable *const *b = b_; size_t a_index = var_get_dict_index (*a); size_t b_index = var_get_dict_index (*b); return a_index < b_index ? -1 : a_index > b_index; } /* A hsh_hash_func that hashes pointer to variable V based on its name. */ unsigned hash_var_ptr_by_name (const void *v_, const void *aux UNUSED) { struct variable *const *v = v_; return utf8_hash_case_string (var_get_name (*v), 0); } /* Returns the type of variable V. */ enum val_type var_get_type (const struct variable *v) { return val_type_from_width (v->width); } /* Returns the width of variable V. */ int var_get_width (const struct variable *v) { return v->width; } void var_set_width_and_formats (struct variable *v, int new_width, const struct fmt_spec *print, const struct fmt_spec *write) { struct variable *ov; unsigned int traits = 0; ov = var_clone (v); if (var_has_missing_values (v)) { if (mv_is_resizable (&v->miss, new_width)) mv_resize (&v->miss, new_width); else { mv_destroy (&v->miss); mv_init (&v->miss, new_width); } traits |= VAR_TRAIT_MISSING_VALUES; } if (v->val_labs != NULL) { if (val_labs_can_set_width (v->val_labs, new_width)) val_labs_set_width (v->val_labs, new_width); else { val_labs_destroy (v->val_labs); v->val_labs = NULL; } traits |= VAR_TRAIT_VALUE_LABELS; } if (fmt_resize (&v->print, new_width)) traits |= VAR_TRAIT_PRINT_FORMAT; if (fmt_resize (&v->write, new_width)) traits |= VAR_TRAIT_WRITE_FORMAT; if (v->width != new_width) { v->width = new_width; traits |= VAR_TRAIT_WIDTH; } if (print) { var_set_print_format_quiet (v, print); traits |= VAR_TRAIT_PRINT_FORMAT; } if (write) { var_set_write_format_quiet (v, write); traits |= VAR_TRAIT_WRITE_FORMAT; } if (traits != 0) dict_var_changed (v, traits, ov); } /* Changes the width of V to NEW_WIDTH. This function should be used cautiously. */ void var_set_width (struct variable *v, int new_width) { const int old_width = v->width; if (old_width == new_width) return; var_set_width_and_formats (v, new_width, NULL, NULL); } /* Returns true if variable V is numeric, false otherwise. */ bool var_is_numeric (const struct variable *v) { return var_get_type (v) == VAL_NUMERIC; } /* Returns true if variable V is a string variable, false otherwise. */ bool var_is_alpha (const struct variable *v) { return var_get_type (v) == VAL_STRING; } /* Returns variable V's missing values. */ const struct missing_values * var_get_missing_values (const struct variable *v) { return &v->miss; } /* Sets variable V's missing values to MISS, which must be of V's width or at least resizable to V's width. If MISS is null, then V's missing values, if any, are cleared. */ static void var_set_missing_values_quiet (struct variable *v, const struct missing_values *miss) { if (miss != NULL) { assert (mv_is_resizable (miss, v->width)); mv_destroy (&v->miss); mv_copy (&v->miss, miss); mv_resize (&v->miss, v->width); } else mv_clear (&v->miss); } /* Sets variable V's missing values to MISS, which must be of V's width or at least resizable to V's width. If MISS is null, then V's missing values, if any, are cleared. */ void var_set_missing_values (struct variable *v, const struct missing_values *miss) { struct variable *ov = var_clone (v); var_set_missing_values_quiet (v, miss); dict_var_changed (v, VAR_TRAIT_MISSING_VALUES, ov); } /* Sets variable V to have no user-missing values. */ void var_clear_missing_values (struct variable *v) { var_set_missing_values (v, NULL); } /* Returns true if V has any user-missing values, false otherwise. */ bool var_has_missing_values (const struct variable *v) { return !mv_is_empty (&v->miss); } /* Returns true if VALUE is in the given CLASS of missing values in V, false otherwise. */ bool var_is_value_missing (const struct variable *v, const union value *value, enum mv_class class) { return mv_is_value_missing (&v->miss, value, class); } /* Returns true if D is in the given CLASS of missing values in V, false otherwise. V must be a numeric variable. */ bool var_is_num_missing (const struct variable *v, double d, enum mv_class class) { return mv_is_num_missing (&v->miss, d, class); } /* Returns true if S[] is a missing value for V, false otherwise. S[] must contain exactly as many characters as V's width. V must be a string variable. */ bool var_is_str_missing (const struct variable *v, const uint8_t s[], enum mv_class class) { return mv_is_str_missing (&v->miss, s, class); } /* Returns variable V's value labels, possibly a null pointer if it has none. */ const struct val_labs * var_get_value_labels (const struct variable *v) { return v->val_labs; } /* Returns true if variable V has at least one value label. */ bool var_has_value_labels (const struct variable *v) { return val_labs_count (v->val_labs) > 0; } /* Sets variable V's value labels to a copy of VLS, which must have a width equal to V's width or one that can be changed to V's width. If VLS is null, then V's value labels, if any, are removed. */ static void var_set_value_labels_quiet (struct variable *v, const struct val_labs *vls) { val_labs_destroy (v->val_labs); v->val_labs = NULL; if (vls != NULL) { assert (val_labs_can_set_width (vls, v->width)); v->val_labs = val_labs_clone (vls); val_labs_set_width (v->val_labs, v->width); } } /* Sets variable V's value labels to a copy of VLS, which must have a width equal to V's width or one that can be changed to V's width. If VLS is null, then V's value labels, if any, are removed. */ void var_set_value_labels (struct variable *v, const struct val_labs *vls) { struct variable *ov = var_clone (v); var_set_value_labels_quiet (v, vls); dict_var_changed (v, VAR_TRAIT_LABEL, ov); } /* Makes sure that V has a set of value labels, by assigning one to it if necessary. */ static void alloc_value_labels (struct variable *v) { if (v->val_labs == NULL) v->val_labs = val_labs_create (v->width); } /* Attempts to add a value label with the given VALUE and UTF-8 encoded LABEL to V. Returns true if successful, false otherwise (probably due to an existing label). In LABEL, the two-byte sequence "\\n" is interpreted as a new-line. */ bool var_add_value_label (struct variable *v, const union value *value, const char *label) { alloc_value_labels (v); return val_labs_add (v->val_labs, value, label); } /* Adds or replaces a value label with the given VALUE and UTF-8 encoded LABEL to V. In LABEL, the two-byte sequence "\\n" is interpreted as a new-line. */ void var_replace_value_label (struct variable *v, const union value *value, const char *label) { alloc_value_labels (v); val_labs_replace (v->val_labs, value, label); } /* Removes V's value labels, if any. */ void var_clear_value_labels (struct variable *v) { var_set_value_labels (v, NULL); } /* Returns the label associated with VALUE for variable V, as a UTF-8 string in a format suitable for output, or a null pointer if none. */ const char * var_lookup_value_label (const struct variable *v, const union value *value) { return val_labs_find (v->val_labs, value); } /* Append to STR the string representation of VALUE for variable V. STR must be a pointer to an initialised struct string. */ static void append_value (const struct variable *v, const union value *value, struct string *str) { char *s = data_out (value, var_get_encoding (v), &v->print); ds_put_cstr (str, s); free (s); } /* Append STR with a string representing VALUE for variable V. That is, if VALUE has a label, append that label, otherwise format VALUE and append the formatted string. STR must be a pointer to an initialised struct string. */ void var_append_value_name (const struct variable *v, const union value *value, struct string *str) { enum settings_value_style style = settings_get_value_style (); const char *name = var_lookup_value_label (v, value); switch (style) { case SETTINGS_VAL_STYLE_VALUES: append_value (v, value, str); break; case SETTINGS_VAL_STYLE_LABELS: if (name == NULL) append_value (v, value, str); else ds_put_cstr (str, name); break; case SETTINGS_VAL_STYLE_BOTH: default: append_value (v, value, str); if (name != NULL) { ds_put_cstr (str, " ("); ds_put_cstr (str, name); ds_put_cstr (str, ")"); } break; }; } /* Print and write formats. */ /* Returns V's print format specification. */ const struct fmt_spec * var_get_print_format (const struct variable *v) { return &v->print; } /* Sets V's print format specification to PRINT, which must be a valid format specification for a variable of V's width (ordinarily an output format, but input formats are not rejected). */ static void var_set_print_format_quiet (struct variable *v, const struct fmt_spec *print) { if (!fmt_equal (&v->print, print)) { assert (fmt_check_width_compat (print, v->width)); v->print = *print; } } /* Sets V's print format specification to PRINT, which must be a valid format specification for a variable of V's width (ordinarily an output format, but input formats are not rejected). */ void var_set_print_format (struct variable *v, const struct fmt_spec *print) { struct variable *ov = var_clone (v); var_set_print_format_quiet (v, print); dict_var_changed (v, VAR_TRAIT_PRINT_FORMAT, ov); } /* Returns V's write format specification. */ const struct fmt_spec * var_get_write_format (const struct variable *v) { return &v->write; } /* Sets V's write format specification to WRITE, which must be a valid format specification for a variable of V's width (ordinarily an output format, but input formats are not rejected). */ static void var_set_write_format_quiet (struct variable *v, const struct fmt_spec *write) { if (!fmt_equal (&v->write, write)) { assert (fmt_check_width_compat (write, v->width)); v->write = *write; } } /* Sets V's write format specification to WRITE, which must be a valid format specification for a variable of V's width (ordinarily an output format, but input formats are not rejected). */ void var_set_write_format (struct variable *v, const struct fmt_spec *write) { struct variable *ov = var_clone (v); var_set_write_format_quiet (v, write); dict_var_changed (v, VAR_TRAIT_WRITE_FORMAT, ov); } /* Sets V's print and write format specifications to FORMAT, which must be a valid format specification for a variable of V's width (ordinarily an output format, but input formats are not rejected). */ void var_set_both_formats (struct variable *v, const struct fmt_spec *format) { struct variable *ov = var_clone (v); var_set_print_format_quiet (v, format); var_set_write_format_quiet (v, format); dict_var_changed (v, VAR_TRAIT_PRINT_FORMAT | VAR_TRAIT_WRITE_FORMAT, ov); } /* Returns the default print and write format for a variable of the given TYPE, as set by var_create. The return value can be used to reset a variable's print and write formats to the default. */ struct fmt_spec var_default_formats (int width) { return (width == 0 ? fmt_for_output (FMT_F, 8, 2) : fmt_for_output (FMT_A, width, 0)); } /* Update the combined name and label string if necessary */ static void update_vl_string (const struct variable *v) { /* Cast away const! */ struct string *str = (struct string *) &v->name_and_label; if (ds_is_empty (str)) { if (v->label) ds_put_format (str, _("%s (%s)"), v->label, v->name); else ds_put_cstr (str, v->name); } } /* Return a string representing this variable, in the form most appropriate from a human factors perspective, that is, its variable label if it has one, otherwise its name. */ const char * var_to_string (const struct variable *v) { enum settings_var_style style = settings_get_var_style (); switch (style) { case SETTINGS_VAR_STYLE_NAMES: return v->name; break; case SETTINGS_VAR_STYLE_LABELS: return v->label != NULL ? v->label : v->name; break; case SETTINGS_VAR_STYLE_BOTH: update_vl_string (v); return ds_cstr (&v->name_and_label); break; default: NOT_REACHED (); break; }; } /* Returns V's variable label, or a null pointer if it has none. */ const char * var_get_label (const struct variable *v) { return v->label; } /* Sets V's variable label to UTF-8 encoded string LABEL, stripping off leading and trailing white space. If LABEL is a null pointer or if LABEL is an empty string (after stripping white space), then V's variable label (if any) is removed. */ static void var_set_label_quiet (struct variable *v, const char *label) { free (v->label); v->label = NULL; if (label != NULL && label[strspn (label, CC_SPACES)]) v->label = xstrdup (label); ds_destroy (&v->name_and_label); ds_init_empty (&v->name_and_label); } /* Sets V's variable label to UTF-8 encoded string LABEL, stripping off leading and trailing white space. If LABEL is a null pointer or if LABEL is an empty string (after stripping white space), then V's variable label (if any) is removed. */ void var_set_label (struct variable *v, const char *label) { struct variable *ov = var_clone (v); var_set_label_quiet (v, label); dict_var_changed (v, VAR_TRAIT_LABEL, ov); } /* Removes any variable label from V. */ void var_clear_label (struct variable *v) { var_set_label (v, NULL); } /* Returns true if V has a variable V, false otherwise. */ bool var_has_label (const struct variable *v) { return v->label != NULL; } /* Returns true if M is a valid variable measurement level, false otherwise. */ bool measure_is_valid (enum measure m) { return m == MEASURE_NOMINAL || m == MEASURE_ORDINAL || m == MEASURE_SCALE; } /* Returns a string version of measurement level M, for display to a user. */ const char * measure_to_string (enum measure m) { switch (m) { case MEASURE_NOMINAL: return _("Nominal"); case MEASURE_ORDINAL: return _("Ordinal"); case MEASURE_SCALE: return _("Scale"); default: return "Invalid"; } } /* Returns a string version of measurement level M, for use in PSPP command syntax. */ const char * measure_to_syntax (enum measure m) { switch (m) { case MEASURE_NOMINAL: return "NOMINAL"; case MEASURE_ORDINAL: return "ORDINAL"; case MEASURE_SCALE: return "SCALE"; default: return "Invalid"; } } /* Returns V's measurement level. */ enum measure var_get_measure (const struct variable *v) { return v->measure; } /* Sets V's measurement level to MEASURE. */ static void var_set_measure_quiet (struct variable *v, enum measure measure) { assert (measure_is_valid (measure)); v->measure = measure; } /* Sets V's measurement level to MEASURE. */ void var_set_measure (struct variable *v, enum measure measure) { struct variable *ov = var_clone (v); var_set_measure_quiet (v, measure); dict_var_changed (v, VAR_TRAIT_MEASURE, ov); } /* Returns the default measurement level for a variable of the given TYPE, as set by var_create. The return value can be used to reset a variable's measurement level to the default. */ enum measure var_default_measure (enum val_type type) { return type == VAL_NUMERIC ? MEASURE_SCALE : MEASURE_NOMINAL; } /* Returns true if M is a valid variable role, false otherwise. */ bool var_role_is_valid (enum var_role role) { switch (role) { case ROLE_NONE: case ROLE_INPUT: case ROLE_TARGET: case ROLE_BOTH: case ROLE_PARTITION: case ROLE_SPLIT: return true; default: return false; } } /* Returns a string version of ROLE, for display to a user. */ const char * var_role_to_string (enum var_role role) { switch (role) { case ROLE_INPUT: return _("Input"); case ROLE_TARGET: return _("Output"); case ROLE_BOTH: return _("Both"); case ROLE_NONE: return _("None"); case ROLE_PARTITION: return _("Partition"); case ROLE_SPLIT: return _("Split"); default: return "Invalid"; } } /* Returns a string version of ROLE, for use in PSPP comamnd syntax. */ const char * var_role_to_syntax (enum var_role role) { switch (role) { case ROLE_INPUT: return "INPUT"; case ROLE_TARGET: return "TARGET"; case ROLE_BOTH: return "BOTH"; case ROLE_NONE: return "NONE"; case ROLE_PARTITION: return "PARTITION"; case ROLE_SPLIT: return "SPLIT"; default: return ""; } } /* Returns V's role. */ enum var_role var_get_role (const struct variable *v) { return v->role; } /* Sets V's role to ROLE. */ static void var_set_role_quiet (struct variable *v, enum var_role role) { assert (var_role_is_valid (role)); v->role = role; } /* Sets V's role to ROLE. */ void var_set_role (struct variable *v, enum var_role role) { struct variable *ov = var_clone (v); var_set_role_quiet (v, role); dict_var_changed (v, VAR_TRAIT_ROLE, ov); } /* Returns V's display width, which applies only to GUIs. */ int var_get_display_width (const struct variable *v) { return v->display_width; } /* Sets V's display width to DISPLAY_WIDTH. */ static void var_set_display_width_quiet (struct variable *v, int new_width) { if (v->display_width != new_width) { v->display_width = new_width; } } void var_set_display_width (struct variable *v, int new_width) { if (v->display_width != new_width) { struct variable *ov = var_clone (v); var_set_display_width_quiet (v, new_width); dict_var_changed (v, VAR_TRAIT_DISPLAY_WIDTH, ov); } } /* Returns the default display width for a variable of the given WIDTH, as set by var_create. The return value can be used to reset a variable's display width to the default. */ int var_default_display_width (int width) { return width == 0 ? 8 : MIN (width, 32); } /* Returns true if A is a valid alignment, false otherwise. */ bool alignment_is_valid (enum alignment a) { return a == ALIGN_LEFT || a == ALIGN_RIGHT || a == ALIGN_CENTRE; } /* Returns a string version of alignment A, for display to a user. */ const char * alignment_to_string (enum alignment a) { switch (a) { case ALIGN_LEFT: return _("Left"); case ALIGN_RIGHT: return _("Right"); case ALIGN_CENTRE: return _("Center"); default: return "Invalid"; } } /* Returns a string version of alignment A, for use in PSPP command syntax. */ const char * alignment_to_syntax (enum alignment a) { switch (a) { case ALIGN_LEFT: return "LEFT"; case ALIGN_RIGHT: return "RIGHT"; case ALIGN_CENTRE: return "CENTER"; default: return "Invalid"; } } /* Returns V's display alignment, which applies only to GUIs. */ enum alignment var_get_alignment (const struct variable *v) { return v->alignment; } /* Sets V's display alignment to ALIGNMENT. */ static void var_set_alignment_quiet (struct variable *v, enum alignment alignment) { assert (alignment_is_valid (alignment)); v->alignment = alignment; } /* Sets V's display alignment to ALIGNMENT. */ void var_set_alignment (struct variable *v, enum alignment alignment) { struct variable *ov = var_clone (v); var_set_alignment_quiet (v, alignment); dict_var_changed (v, VAR_TRAIT_ALIGNMENT, ov); } /* Returns the default display alignment for a variable of the given TYPE, as set by var_create. The return value can be used to reset a variable's display alignment to the default. */ enum alignment var_default_alignment (enum val_type type) { return type == VAL_NUMERIC ? ALIGN_RIGHT : ALIGN_LEFT; } /* Whether variables' values should be preserved from case to case. */ /* Returns true if variable V's value should be left from case to case, instead of being reset to system-missing or blanks. */ bool var_get_leave (const struct variable *v) { return v->leave; } /* Sets V's leave setting to LEAVE. */ static void var_set_leave_quiet (struct variable *v, bool leave) { assert (leave || !var_must_leave (v)); v->leave = leave; } /* Sets V's leave setting to LEAVE. */ void var_set_leave (struct variable *v, bool leave) { struct variable *ov = var_clone (v); var_set_leave_quiet (v, leave); dict_var_changed (v, VAR_TRAIT_LEAVE, ov); } /* Returns true if V must be left from case to case, false if it can be set either way. */ bool var_must_leave (const struct variable *v) { return var_get_dict_class (v) == DC_SCRATCH; } /* Returns the number of short names stored in VAR. Short names are used only for system and portable file input and output. They are upper-case only, not necessarily unique, and limited to SHORT_NAME_LEN characters (plus a null terminator). Ordinarily a variable has at most one short name, but very long string variables (longer than 255 bytes) may have more. A variable might not have any short name at all if it hasn't been saved to or read from a system or portable file. */ size_t var_get_short_name_cnt (const struct variable *var) { return var->short_name_cnt; } /* Returns VAR's short name with the given IDX, if it has one with that index, or a null pointer otherwise. Short names may be sparse: even if IDX is less than the number of short names in VAR, this function may return a null pointer. */ const char * var_get_short_name (const struct variable *var, size_t idx) { return idx < var->short_name_cnt ? var->short_names[idx] : NULL; } /* Sets VAR's short name with the given IDX to the UTF-8 string SHORT_NAME. The caller must already have checked that, in the dictionary encoding, SHORT_NAME is no more than SHORT_NAME_LEN bytes long. The new short name will be converted to uppercase. Specifying a null pointer for SHORT_NAME clears the specified short name. */ void var_set_short_name (struct variable *var, size_t idx, const char *short_name) { struct variable *ov = var_clone (var); assert (short_name == NULL || id_is_plausible (short_name, false)); /* Clear old short name numbered IDX, if any. */ if (idx < var->short_name_cnt) { free (var->short_names[idx]); var->short_names[idx] = NULL; } /* Install new short name for IDX. */ if (short_name != NULL) { if (idx >= var->short_name_cnt) { size_t old_cnt = var->short_name_cnt; size_t i; var->short_name_cnt = MAX (idx * 2, 1); var->short_names = xnrealloc (var->short_names, var->short_name_cnt, sizeof *var->short_names); for (i = old_cnt; i < var->short_name_cnt; i++) var->short_names[i] = NULL; } var->short_names[idx] = utf8_to_upper (short_name); } dict_var_changed (var, VAR_TRAIT_NAME, ov); } /* Clears V's short names. */ void var_clear_short_names (struct variable *v) { size_t i; for (i = 0; i < v->short_name_cnt; i++) free (v->short_names[i]); free (v->short_names); v->short_names = NULL; v->short_name_cnt = 0; } /* Relationship with dictionary. */ /* Returns V's index within its dictionary, the value for which "dict_get_var (dict, index)" will return V. V must be in a dictionary. */ size_t var_get_dict_index (const struct variable *v) { assert (var_has_vardict (v)); return vardict_get_dict_index (v->vardict); } /* Returns V's index within the case represented by its dictionary, that is, the value for which "case_data_idx (case, index)" will return the data for V in that case. V must be in a dictionary. */ size_t var_get_case_index (const struct variable *v) { assert (var_has_vardict (v)); return vardict_get_case_index (v->vardict); } /* Returns variable V's attribute set. The caller may examine or modify the attribute set, but must not destroy it. Destroying V, or calling var_set_attributes() on V, will also destroy its attribute set. */ struct attrset * var_get_attributes (const struct variable *v) { return CONST_CAST (struct attrset *, &v->attributes); } /* Replaces variable V's attributes set by a copy of ATTRS. */ static void var_set_attributes_quiet (struct variable *v, const struct attrset *attrs) { attrset_destroy (&v->attributes); attrset_clone (&v->attributes, attrs); } /* Replaces variable V's attributes set by a copy of ATTRS. */ void var_set_attributes (struct variable *v, const struct attrset *attrs) { struct variable *ov = var_clone (v); var_set_attributes_quiet (v, attrs); dict_var_changed (v, VAR_TRAIT_ATTRIBUTES, ov); } /* Returns true if V has any custom attributes, false if it has none. */ bool var_has_attributes (const struct variable *v) { return attrset_count (&v->attributes) > 0; } /* Creates and returns a clone of OLD_VAR. Most properties of the new variable are copied from OLD_VAR, except: - The variable's short name is not copied, because there is no reason to give a new variable with potentially a new name the same short name. - The new variable is not added to OLD_VAR's dictionary by default. Use dict_clone_var, instead, to do that. */ struct variable * var_clone (const struct variable *old_var) { struct variable *new_var = var_create (var_get_name (old_var), var_get_width (old_var)); var_set_missing_values_quiet (new_var, var_get_missing_values (old_var)); var_set_print_format_quiet (new_var, var_get_print_format (old_var)); var_set_write_format_quiet (new_var, var_get_write_format (old_var)); var_set_value_labels_quiet (new_var, var_get_value_labels (old_var)); var_set_label_quiet (new_var, var_get_label (old_var)); var_set_measure_quiet (new_var, var_get_measure (old_var)); var_set_role_quiet (new_var, var_get_role (old_var)); var_set_display_width_quiet (new_var, var_get_display_width (old_var)); var_set_alignment_quiet (new_var, var_get_alignment (old_var)); var_set_leave_quiet (new_var, var_get_leave (old_var)); var_set_attributes_quiet (new_var, var_get_attributes (old_var)); return new_var; } /* Returns the encoding of values of variable VAR. (This is actually a property of the dictionary.) Returns null if no specific encoding has been set. */ const char * var_get_encoding (const struct variable *var) { return (var_has_vardict (var) ? dict_get_encoding (vardict_get_dictionary (var->vardict)) : NULL); } /* Returns V's vardict structure. */ struct vardict_info * var_get_vardict (const struct variable *v) { return CONST_CAST (struct vardict_info *, v->vardict); } /* Sets V's vardict data to VARDICT. */ void var_set_vardict (struct variable *v, struct vardict_info *vardict) { v->vardict = vardict; } /* Returns true if V has vardict data. */ bool var_has_vardict (const struct variable *v) { return v->vardict != NULL; } /* Clears V's vardict data. */ void var_clear_vardict (struct variable *v) { v->vardict = NULL; } /* Returns zero, if W is a missing value for WV or if it is less than zero. Typically used to force a numerical value into a valid weight. As a side effect, this function will emit a warning if the value WARN_ON_INVALID points to a bool which is TRUE. That bool will be then set to FALSE. */ double var_force_valid_weight (const struct variable *wv, double w, bool *warn_on_invalid) { if (w < 0.0 || (wv && var_is_num_missing (wv, w, MV_ANY))) w = 0.0; if (w == 0.0 && warn_on_invalid != NULL && *warn_on_invalid) { *warn_on_invalid = false; msg (SW, _("At least one case in the data file had a weight value " "that was user-missing, system-missing, zero, or " "negative. These case(s) were ignored.")); } return w; } pspp-1.0.1/src/data/format-guesser.c0000644000175000017500000006243312470243700014232 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/format-guesser.h" #include #include #include "data/format.h" #include "data/settings.h" #include "libpspp/assertion.h" #include "libpspp/str.h" #include "gl/c-ctype.h" #include "gl/minmax.h" #include "gl/xalloc.h" /* A token in which potential date or time fields are broken. The token type is actually a bit-map. This allows a single token to represent multiple roles, as often happens in parsing adate or a time. For example, the number "1" can be a quarter of the year, month, hour, day of the month, week of the year, or a count of days. Such ambiguities are resolved on the higher-level bases of multiple tokens and multiple full dates. */ enum date_token { DT_DAY = 1 << 0, /* dd: Day of the month. */ DT_MONTH = 1 << 1, /* mm: Month. */ DT_ENGLISH_MONTH = 1 << 2, /* mmm: Spelled-out month, e.g. "jan". */ DT_YEAR = 1 << 3, /* yy: Year. */ DT_HOUR = 1 << 4, /* HH: Hour. */ DT_MINUTE = 1 << 5, /* MM: Minute. */ DT_SECOND = 1 << 6, /* SS: Second. */ DT_WEEKDAY = 1 << 7, /* www: Day of the week. */ DT_DAY_COUNT = 1 << 8, /* D: Number of days. */ DT_WEEK = 1 << 9, /* ww: Week of the year. */ DT_QUARTER = 1 << 10, /* q: Quarter of the year. */ DT_Q = 1 << 11, /* Literal "Q". */ DT_WK = 1 << 12, /* Literal "WK". */ DT_DELIM = 1 << 13, /* One of -/., or white space. */ DT_SPACE = 1 << 14, /* Any white space. */ DT_COLON = 1 << 15, /* : */ }; /* Syntax of a date format, in terms of the date tokens that compose it.*/ struct date_syntax { enum fmt_type format; /* Format type. */ #define MAX_TOKENS 11 size_t token_cnt; /* Number of tokens. */ enum date_token tokens[MAX_TOKENS]; /* Tokens. */ }; /* Syntax of all the data formats that we can parse. The order in the array can make a difference in the final choice of formats: in the case of a tie between the number of times each format is seen, the syntax earlier in the array takes precedence. The most important cases are the ordering of DATE before EDATE, so that spelled-out months in input yield DATE format (that produces spelled-out months in output, and the ordering of EDATE before ADATE, so that ambiguous dates such as "1/1/99" yield the more sensible European date format instead of American format. When a given date format has more than one syntax, they must be in adjacent array elements. */ static struct date_syntax syntax[] = { /* dd-mmm-yy */ { FMT_DATE, 5, {DT_DAY, DT_DELIM, DT_ENGLISH_MONTH, DT_DELIM, DT_YEAR} }, /* dd.mm.yy */ { FMT_EDATE, 5, {DT_DAY, DT_DELIM, DT_MONTH, DT_DELIM, DT_YEAR} }, /* mm/dd/yy */ { FMT_ADATE, 5, {DT_MONTH, DT_DELIM, DT_DAY, DT_DELIM, DT_YEAR} }, /* yy/mm/dd */ { FMT_SDATE, 5, {DT_YEAR, DT_DELIM, DT_MONTH, DT_DELIM, DT_DAY} }, /* mmm yy */ { FMT_MOYR, 3, {DT_MONTH, DT_DELIM, DT_YEAR} }, /* q Q yy */ { FMT_QYR, 3, {DT_QUARTER, DT_Q, DT_YEAR} }, /* ww WK yy */ { FMT_WKYR, 3, {DT_WEEK, DT_WK, DT_YEAR} }, /* dd-mmm-yyyy HH:MM */ { FMT_DATETIME, 9, {DT_DAY, DT_DELIM, DT_MONTH, DT_DELIM, DT_YEAR, DT_SPACE, DT_HOUR, DT_COLON, DT_MINUTE} }, /* dd-mmm-yyyy HH:MM:SS */ { FMT_DATETIME, 11, {DT_DAY, DT_DELIM, DT_MONTH, DT_DELIM, DT_YEAR, DT_SPACE, DT_HOUR, DT_COLON, DT_MINUTE, DT_COLON, DT_SECOND} }, /* HH:MM */ { FMT_TIME, 3, {DT_HOUR, DT_COLON, DT_MINUTE} }, /* HH:MM:SS */ { FMT_TIME, 5, {DT_HOUR, DT_COLON, DT_MINUTE, DT_COLON, DT_SECOND} }, /* D HH:MM */ { FMT_DTIME, 5, {DT_DAY_COUNT, DT_SPACE, DT_HOUR, DT_COLON, DT_MINUTE} }, /* D HH:MM:SS */ { FMT_DTIME, 7, {DT_DAY_COUNT, DT_SPACE, DT_HOUR, DT_COLON, DT_MINUTE, DT_COLON, DT_SECOND} }, /* www */ { FMT_WKDAY, 1, {DT_WEEKDAY} }, /* mmm We require a spelled-out English month so that single-character Roman numerals like "i" and "x" don't get detected as months. The latter is particularly common in the password field of /etc/passwd-like files. */ { FMT_MONTH, 1, {DT_ENGLISH_MONTH} }, }; /* Number of recognized date syntax formats. */ #define DATE_SYNTAX_CNT (sizeof syntax / sizeof *syntax) /* A format guesser. */ struct fmt_guesser { /* Maximum observed input width. */ unsigned int width; /* Sum of the digits after the decimal point in each input (divide by count to obtain average decimal positions). */ unsigned int decimals; /* Number of non-empty, non-missing input values. count is the sum of any_numeric, any_date, and the number of inputs that were not in any recognized format (hence, treated as A format). */ unsigned int count; /* Numeric input formats. */ unsigned int any_numeric; /* Sum of following counts. */ unsigned int f; /* Number of inputs in F format. */ unsigned int comma; /* Number of inputs in COMMA format. */ unsigned int dot; /* Number of inputs in DOT format. */ unsigned int dollar; /* Number of inputs in DOLLAR format. */ unsigned int pct; /* Number of inputs in PCT format. */ unsigned int e; /* Number of inputs in E format. */ /* Date or time input formats. The sum of the values in the date array is at least any_date, often higher because many example dates match more than one date format. */ unsigned int any_date; /* Number of inputs in any date format. */ unsigned int date[DATE_SYNTAX_CNT]; /* Number of inputs in each date format. */ }; static bool add_numeric (struct fmt_guesser *, struct substring); static void guess_numeric (struct fmt_guesser *, struct fmt_spec *); static void add_date_time (struct fmt_guesser *, struct substring); static bool match_date_syntax (const enum date_token a[], size_t a_len, const enum date_token b[], size_t b_len); static void guess_date_time (struct fmt_guesser *, struct fmt_spec *); static enum date_token parse_date_token (struct substring *, enum date_token tokens_seen, int *decimals); static enum date_token parse_date_number (struct substring *, enum date_token tokens_seen, int *decimals); static enum date_token recognize_identifier_token (struct substring *); static enum date_token recognize_id2 (int s0, int s1, bool more); static enum date_token recognize_id3 (int s0, int s1, int s2, bool more); /* Creates and returns a new format guesser. */ struct fmt_guesser * fmt_guesser_create (void) { struct fmt_guesser *g = xmalloc (sizeof *g); fmt_guesser_clear (g); return g; } /* Destroys format guesser G. */ void fmt_guesser_destroy (struct fmt_guesser *g) { free (g); } /* Clears the state of format guesser G, making it available for guessing the format of a new input stream. */ void fmt_guesser_clear (struct fmt_guesser *g) { memset (g, 0, sizeof *g); } /* Appends S to the stream of data items whose format G is guessing. */ void fmt_guesser_add (struct fmt_guesser *g, struct substring s) { if (ss_length (s) > g->width) g->width = ss_length (s); ss_trim (&s, ss_cstr (CC_SPACES)); if (ss_is_empty (s) || ss_equals (s, ss_cstr ("."))) { /* Can't guess anything from an empty string or a missing value. */ return; } g->count++; if (!add_numeric (g, s)) add_date_time (g, s); } /* Guesses the format of the input previously added to G using fmt_guesser_add, storing the guess into *F. The guessed format may not actually a valid input or output format, in that its width and number of decimal places may be outside the valid range for the guessed format type. The caller must therefore adjust the format to make it valid, e.g. by calling fmt_fix. */ void fmt_guesser_guess (struct fmt_guesser *g, struct fmt_spec *f) { if (g->count > 0) { /* Set defaults. The guesser functions typically override the width and type. */ f->type = FMT_A; f->w = g->width; f->d = 0; if (g->any_numeric > g->count / 2) guess_numeric (g, f); else if (g->any_date > g->count / 2) guess_date_time (g, f); } else { /* No data at all. Use fallback default. */ *f = fmt_default_for_width (0); } } /* Numeric formats. */ /* Tries to parse S as a numeric (F, COMMA, DOT, DOLLAR, PCT, or E) format. If successful, increments G's any_numeric counter and the counter for the specific format S that S matches and returns true. On failure, returns false without modifying G. This function is intended to match exactly the same set of strings that the actual numeric value parsers used by the data_in function would match. */ static bool add_numeric (struct fmt_guesser *g, struct substring s) { bool has_dollar; /* '$' appeared at start of S? */ bool has_percent; /* '%' appeared at end of S? */ int digits; /* Number of digits in S (before exponent). */ int dots; /* Number of '.' in S. */ int commas; /* Number of ',' in S. */ bool has_exp; /* [eEdD] appeared introducing exponent? */ bool has_exp_sign; /* '+' or '-' appeared in exponent? */ int exp_digits; /* Number of digits in exponent. */ int prev_delim; /* Initially 0, then ',' or '.' as delimiters seen. */ int delim_digits; /* Number of digits since last delimiter. */ int decimal; /* Decimal point character: '.', ',', or 0 if unknown or no decimal point in S. */ int precision; /* Digits of precision after decimal point. */ int c; /* Skip leading "$" and optional following white space. */ has_dollar = ss_match_byte (&s, '$'); if (has_dollar) ss_ltrim (&s, ss_cstr (CC_SPACES)); /* Skip optional sign. */ ss_match_byte_in (&s, ss_cstr ("+-")); /* Skip digits punctuated by commas and dots. We don't know whether the decimal point is a comma or a dot, so for now we just count them. */ digits = dots = commas = 0; delim_digits = 0; prev_delim = 0; for (; (c = ss_first (s)) != -1; ss_advance (&s, 1)) { if (c >= '0' && c <= '9') { digits++; if (dots || commas) delim_digits++; } else if (c == '.' ) { dots++; prev_delim = c; delim_digits = 0; } else if (c == ',') { commas++; prev_delim = c; delim_digits = 0; } else break; } if (digits == 0 || (dots > 1 && commas > 1)) { /* A valid number has at least one digit and can't have more than one decimal point. */ return false; } /* Skip the optional exponent. */ has_exp = ss_match_byte_in (&s, ss_cstr ("eEdD")) != EOF; has_exp_sign = ss_match_byte_in (&s, ss_cstr ("-+")) != EOF; if (has_exp_sign) ss_match_byte (&s, ' '); exp_digits = ss_ltrim (&s, ss_cstr (CC_DIGITS)); if ((has_exp || has_exp_sign) && !exp_digits) { /* Can't have the E or sign that leads in the exponent without actually having an exponent. */ return false; } /* Skip optional '%'. */ has_percent = ss_match_byte (&s, '%'); if (has_dollar && has_percent) { /* A valid number cannot have both '$' and '%'. */ return false; } /* Make sure there's no trailing garbage. */ if (!ss_is_empty (s)) return false; /* Figure out the decimal point (and therefore grouping) character and the number of digits following the decimal point. Sometimes the answer is ambiguous. */ if (dots > 1 && prev_delim == '.') { /* Can't have multiple decimal points, so '.' must really be the grouping character, with a precision of 0. */ decimal = ','; precision = 0; } else if (commas > 1 && prev_delim == ',') { /* Can't have multiple decimal points, so ',' must really be the grouping character, with a precision of 0. */ decimal = '.'; precision = 0; } else if (delim_digits == 3 && (!dots || !commas)) { /* The input is something like "1.234" or "1,234" where we can't tell whether the ',' or '.' is a grouping or decimal character. Assume that the decimal character from the settings is in use. */ if (prev_delim == settings_get_decimal_char (FMT_F)) { decimal = prev_delim; precision = delim_digits; } else { decimal = prev_delim == '.' ? ',' : '.'; precision = 0; } } else { /* The final delimiter is a decimal point, and the digits following it are decimals. */ decimal = prev_delim; precision = delim_digits; } /* Decide the most likely format. */ g->any_numeric++; g->decimals += precision; if (has_dollar) g->dollar++; else if (has_percent) g->pct++; else if (commas && decimal == '.') g->comma++; else if (dots && decimal == ',') g->dot++; else if (has_exp || has_exp_sign) g->e++; else g->f++; return true; } /* Guess which numeric format is most likely represented by G, and store it in F's type and d members. (f->w is already initialized.) */ static void guess_numeric (struct fmt_guesser *g, struct fmt_spec *f) { int decimal_char = settings_get_decimal_char (FMT_COMMA); f->d = g->decimals / g->count; if (g->pct) f->type = FMT_PCT; else if (g->dollar) f->type = FMT_DOLLAR; else if (g->comma > g->dot) f->type = decimal_char == '.' ? FMT_COMMA : FMT_DOT; else if (g->dot > g->comma) f->type = decimal_char == '.' ? FMT_DOT : FMT_COMMA; else if (g->e > g->any_numeric / 2) f->type = FMT_E; else f->type = FMT_F; } /* Tries to parse S as a date (DATE, ADATE, EDATE, SDATE, QYR, MOYR, WKYR, or DATETIME), time (TIME or DTIME), or date component (WKDAY or MONTH) format. If successful, increments G's any_date counter and the counter or counters for the specific format(s) that S matches. On failure, does not modify G. Does not attempt to recognize JDATE format: it looks just like F format and will thus be caught by the numeric parser. This function is intended to match a set of strings close to those that actual date and time parsers used by the data_in function would match, but somewhat pickier. In particular, minutes and seconds are only recognized when they have exactly two digits: "1:02:03" is a valid time, but "1:2:3" is rejected. */ static void add_date_time (struct fmt_guesser *g, struct substring s) { enum date_token token; enum date_token tokens[MAX_TOKENS]; enum date_token tokens_seen; size_t token_cnt; int decimals; bool is_date; int i; /* Break S into tokens. */ token_cnt = 0; tokens_seen = 0; decimals = 0; while (!ss_is_empty (s)) { if (token_cnt >= MAX_TOKENS) return; token = parse_date_token (&s, tokens_seen, &decimals); if (token == 0) return; tokens[token_cnt++] = token; tokens_seen |= token; } if (token_cnt == 0) return; /* Find matching date formats, if any, and increment the counter for each one of them. */ is_date = false; for (i = 0; i < DATE_SYNTAX_CNT; i++) { struct date_syntax *s = &syntax[i]; if (match_date_syntax (tokens, token_cnt, s->tokens, s->token_cnt)) { is_date = true; g->date[i]++; } } if (is_date) { g->any_date++; g->decimals += decimals; } } /* Returns true if the A_LEN tokens in A[] match the B_LEN tokens in B[], false otherwise. */ static bool match_date_syntax (const enum date_token a[], size_t a_len, const enum date_token b[], size_t b_len) { size_t i; if (a_len != b_len) return false; for (i = 0; i < a_len; i++) if (!(a[i] & b[i])) return false; return true; } /* Guess which date or time format is most likely represented by G, and store it in F's type and d members. (f->w is already initialized.) */ static void guess_date_time (struct fmt_guesser *g, struct fmt_spec *f) { unsigned int max = 0; int i, j; /* Choose the date format matched by the most inputs. Break ties by choosing the earliest in the array. */ for (i = 0; i < DATE_SYNTAX_CNT; i = j) { unsigned int sum = g->date[i]; for (j = i + 1; j < DATE_SYNTAX_CNT; j++) { if (syntax[i].format != syntax[j].format) break; sum += g->date[j]; } if (sum > max) { f->type = syntax[i].format; max = sum; } } /* Formats that include a time have an optional seconds field. If we saw a seconds field in any of the inputs, make sure that the field width is large enough to include for them. (We use the minimum input width, but an output width would be equally appropriate, since all the time formats have the same minimum widths for input and output.) */ if (f->type == FMT_DATETIME || f->type == FMT_TIME || f->type == FMT_DTIME) { for (i = 0; i < DATE_SYNTAX_CNT; i++) if (g->date[i] && syntax[i].tokens[syntax[i].token_cnt - 1] == DT_SECOND) { f->d = g->decimals / g->count; f->w = MAX (f->w, fmt_min_input_width (f->type) + 3); } } } /* Extracts the next date token from the string represented by S, which must not be an empty string, and advances *S past the end of the token. Returns the parsed token, or 0 if no valid token was found. TOKENS_SEEN should be a bitmap representing all the tokens already seen in this input; this is used to resolve some otherwise ambiguous parsing situation. If a count of seconds is parsed, *DECIMALS is set to the number of digits after the decimal point. */ static enum date_token parse_date_token (struct substring *s, enum date_token tokens_seen, int *decimals) { int c = ss_first (*s); switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return parse_date_number (s, tokens_seen, decimals); case '+': case '-': /* '+' or '-' at the start of a string, or following a space, could be the sign that optionally introduces a time, e.g. "-1:00" in TIME format, "-1 1:00" in DTIME format, or "1/1/1978 +1:00" in DATETIME format. */ if ((!tokens_seen || s->string[-1] == ' ') && c_isdigit (ss_at (*s, 1))) { ss_advance (s, 1); ss_ltrim (s, ss_cstr (CC_DIGITS)); return DT_DAY_COUNT | DT_HOUR; } else if (c == '+') return 0; /* Fall through. */ case '/': case '.': case ',': ss_advance (s, 1); return DT_DELIM; case ':': ss_advance (s, 1); return DT_COLON; case ' ': case '\t': case '\v': case '\r': case '\n': { enum date_token token; ss_advance (s, 1); token = recognize_identifier_token (s); if (token) ss_match_byte_in (s, ss_cstr (CC_SPACES)); else token = DT_DELIM | DT_SPACE; return token; } default: return recognize_identifier_token (s); case EOF: NOT_REACHED (); } } /* Parses a digit sequence found in a date token. Advances *S past the end of the token. Returns the parsed token, or 0 if no valid token was found. TOKENS_SEEN should be a bitmap representing all the tokens already seen in this input; this is used to resolve some otherwise ambiguous parsing situation. If a count of seconds is parsed, *DECIMALS is set to the number of digits after the decimal point.*/ static enum date_token parse_date_number (struct substring *s, enum date_token tokens_seen, int *decimals) { long int value; size_t digit_cnt = ss_get_long (s, &value); enum date_token token = 0; if (ss_match_byte (s, settings_get_decimal_char (FMT_F)) && tokens_seen & DT_COLON && value <= 59) { /* Parse digits after the decimal point. */ token = DT_SECOND; *decimals = ss_ltrim (s, ss_cstr (CC_DIGITS)); } else { if (value <= 4) token = (DT_QUARTER | DT_MONTH | DT_HOUR | DT_DAY | DT_WEEK | DT_DAY_COUNT); else if (value <= 12) token = DT_MONTH | DT_HOUR | DT_DAY | DT_WEEK | DT_DAY_COUNT; else if (value <= 23) token = DT_HOUR | DT_DAY | DT_WEEK | DT_DAY_COUNT; else if (value <= 31) token = DT_DAY | DT_WEEK | DT_DAY_COUNT; else if (value <= 52) token = DT_WEEK | DT_DAY_COUNT; else token = DT_DAY_COUNT; if (digit_cnt == 2) { token |= DT_YEAR; if (value <= 59) token |= DT_MINUTE | DT_SECOND; } else if (digit_cnt == 4) token |= DT_YEAR; } return token; } /* Attempts to parse an identifier found in a date at the beginning of S. Advances *S past the end of the token. Returns the parsed token, or 0 if no valid token was found. */ static enum date_token recognize_identifier_token (struct substring *s) { size_t length = ss_span (*s, ss_cstr (CC_LETTERS)); enum date_token token = 0; switch (length) { case 0: break; case 1: switch (c_tolower (s->string[0])) { case 'i': case 'v': case 'x': token = DT_MONTH; break; case 'q': token = DT_Q; break; } break; case 2: { int s0 = c_tolower ((unsigned char) s->string[0]); int s1 = c_tolower ((unsigned char) s->string[1]); token = recognize_id2 (s0, s1, false); if (!token && s0 == 'w' && s1 == 'k') token = DT_WK; } break; default: { int s0 = c_tolower ((unsigned char) s->string[0]); int s1 = c_tolower ((unsigned char) s->string[1]); int s2 = c_tolower ((unsigned char) s->string[2]); token = recognize_id2 (s0, s1, true); if (!token) token = recognize_id3 (s0, s1, s2, length > 3); if (!token && length == 4) { int s3 = c_tolower ((unsigned char) s->string[3]); if (s0 == 'v' && s1 == 'i' && s2 == 'i' && s3 == 'i') token = DT_MONTH; } } break; } if (token) ss_advance (s, length); return token; } static enum date_token recognize_id2 (int s0, int s1, bool more) { bool weekday; switch (s0) { case 's': weekday = s1 == 'a' || s1 == 'u'; break; case 'm': weekday = s1 == 'o'; break; case 't': weekday = s1 == 'u' || s1 == 'h'; break; case 'w': weekday = s1 == 'e'; break; case 'f': weekday = s1 == 'r'; break; default: weekday = false; break; } if (weekday) return DT_WEEKDAY; if (!more) { bool month; switch (s0) { case 'i': month = s1 == 'i' || s1 == 'v' || s1 == 'x'; break; case 'v': month = s1 == 'i'; break; case 'x': month = s1 == 'i'; break; default: month = false; break; } if (month) return DT_MONTH; } return 0; } static enum date_token recognize_id3 (int s0, int s1, int s2, bool more) { bool month; switch (s0) { case 'j': month = ((s1 == 'a' && s2 == 'n') || (s1 == 'u' && (s2 == 'n' || s2 == 'l'))); break; case 'f': month = s1 == 'e' && s2 == 'b'; break; case 'm': month = (s1 == 'a' && (s2 == 'r' || s2 == 'y')); break; case 'a': month = (s1 == 'p' && s2 == 'r') || (s1 == 'u' && s2 == 'g'); break; case 's': month = s1 == 'e' && s2 == 'p'; break; case 'o': month = s1 == 'c' && s2 == 't'; break; case 'n': month = s1 == 'o' && s2 == 'v'; break; case 'd': month = s1 == 'e' && s2 == 'c'; break; default: month = false; } if (month) return DT_MONTH | DT_ENGLISH_MONTH; if (!more) { bool roman_month = false; switch (s0) { case 'i': case 'x': roman_month = s1 == 'i' && s2 == 'i'; break; case 'v': roman_month = s1 == 'i' && s2 == 'i'; break; } if (roman_month) return DT_MONTH; } return 0; } pspp-1.0.1/src/data/data-in.c0000644000175000017500000007643313137223525012615 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data-in.h" #include #include #include #include #include #include #include #include #include #include #include "calendar.h" #include "dictionary.h" #include "format.h" #include "identifier.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/integer-format.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "settings.h" #include "value.h" #include "gl/c-ctype.h" #include "gl/c-strtod.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Information about parsing one data field. */ struct data_in { struct substring input; /* Source. */ enum fmt_type format; /* Input format. */ union value *output; /* Destination. */ int width; /* Output width. */ }; typedef char *data_in_parser_func (struct data_in *); #define FMT(NAME, METHOD, IMIN, OMIN, IO, CATEGORY) \ static data_in_parser_func parse_##METHOD; #include "format.def" static void default_result (struct data_in *); static bool trim_spaces_and_check_missing (struct data_in *); static int hexit_value (int c); /* Parses the characters in INPUT, which are encoded in the given INPUT_ENCODING, according to FORMAT. Stores the parsed representation in OUTPUT, which the caller must have initialized with the given WIDTH (0 for a numeric field, otherwise the string width). If FORMAT is FMT_A, then OUTPUT_ENCODING must specify the correct encoding for OUTPUT (normally obtained via dict_get_encoding()). If successful NULL is the return value. Otherwise a string describing the problem is returned. The caller must free this string. */ char * data_in (struct substring input, const char *input_encoding, enum fmt_type format, union value *output, int width, const char *output_encoding) { static data_in_parser_func *const handlers[FMT_NUMBER_OF_FORMATS] = { #define FMT(NAME, METHOD, IMIN, OMIN, IO, CATEGORY) parse_##METHOD, #include "format.def" }; struct data_in i; enum fmt_category cat; const char *dest_encoding; char *s; char *error; assert ((width != 0) == fmt_is_string (format)); i.format = format; i.output = output; i.width = width; if (ss_is_empty (input)) { default_result (&i); return NULL; } cat = fmt_get_category (format); if (cat & (FMT_CAT_BASIC | FMT_CAT_HEXADECIMAL | FMT_CAT_DATE | FMT_CAT_TIME | FMT_CAT_DATE_COMPONENT)) { /* We're going to parse these into numbers. For this purpose we want to deal with them in the local "C" encoding. Any character not in that encoding wouldn't be valid anyhow. */ dest_encoding = C_ENCODING; } else if (cat & (FMT_CAT_BINARY | FMT_CAT_LEGACY)) { /* Don't recode these binary formats at all, since they are not text. */ dest_encoding = NULL; } else { assert (cat == FMT_CAT_STRING); if (format == FMT_AHEX) { /* We want the hex digits in the local "C" encoding, even though the result may not be in that encoding. */ dest_encoding = C_ENCODING; } else { /* Use the final output encoding. */ dest_encoding = output_encoding; } } if (dest_encoding != NULL) { i.input = recode_substring_pool (dest_encoding, input_encoding, input, NULL); s = i.input.string; } else { i.input = input; s = NULL; } error = handlers[i.format] (&i); if (error != NULL) default_result (&i); free (s); return error; } bool data_in_msg (struct substring input, const char *input_encoding, enum fmt_type format, union value *output, int width, const char *output_encoding) { char *error = data_in (input, input_encoding, format, output, width, output_encoding); if (error != NULL) { msg (SW,_("Data is not valid as format %s: %s"), fmt_name (format), error); free (error); return false; } else return true; } static bool number_has_implied_decimals (const char *s, enum fmt_type type) { int decimal = settings_get_style (type)->decimal; bool got_digit = false; for (;;) { switch (*s) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': got_digit = true; break; case '+': case '-': if (got_digit) return false; break; case 'e': case 'E': case 'd': case 'D': return false; case '.': case ',': if (*s == decimal) return false; break; case '\0': return true; default: break; } s++; } } static bool has_implied_decimals (struct substring input, const char *input_encoding, enum fmt_type format) { bool retval; char *s; switch (format) { case FMT_F: case FMT_COMMA: case FMT_DOT: case FMT_DOLLAR: case FMT_PCT: case FMT_E: case FMT_Z: break; case FMT_N: case FMT_IB: case FMT_PIB: case FMT_P: case FMT_PK: return true; default: return false; } s = recode_string (C_ENCODING, input_encoding, ss_data (input), ss_length (input)); retval = (format == FMT_Z ? strchr (s, '.') == NULL : number_has_implied_decimals (s, format)); free (s); return retval; } /* In some cases, when no decimal point is explicitly included in numeric input, its position is implied by the number of decimal places in the input format. In such a case, this function may be called just after data_in(). Its arguments are a subset of that function's arguments plus D, the number of decimal places associated with FORMAT. If it is appropriate, this function modifies the numeric value in OUTPUT. */ void data_in_imply_decimals (struct substring input, const char *input_encoding, enum fmt_type format, int d, union value *output) { if (d > 0 && output->f != SYSMIS && has_implied_decimals (input, input_encoding, format)) output->f /= pow (10., d); } /* Format parsers. */ /* Parses F, COMMA, DOT, DOLLAR, PCT, and E input formats. */ static char * parse_number (struct data_in *i) { const struct fmt_number_style *style = settings_get_style (i->format); struct string tmp; int save_errno; char *tail; if (fmt_get_category (i->format) == FMT_CAT_CUSTOM) { style = settings_get_style (FMT_F); } /* Trim spaces and check for missing value representation. */ if (trim_spaces_and_check_missing (i)) return NULL; ds_init_empty (&tmp); ds_extend (&tmp, 64); /* Prefix character may precede sign. */ if (style->prefix.s[0] != '\0') { ss_match_byte (&i->input, style->prefix.s[0]); ss_ltrim (&i->input, ss_cstr (CC_SPACES)); } /* Sign. */ if (ss_match_byte (&i->input, '-')) { ds_put_byte (&tmp, '-'); ss_ltrim (&i->input, ss_cstr (CC_SPACES)); } else { ss_match_byte (&i->input, '+'); ss_ltrim (&i->input, ss_cstr (CC_SPACES)); } /* Prefix character may follow sign. */ if (style->prefix.s[0] != '\0') { ss_match_byte (&i->input, style->prefix.s[0]); ss_ltrim (&i->input, ss_cstr (CC_SPACES)); } /* Digits before decimal point. */ while (c_isdigit (ss_first (i->input))) { ds_put_byte (&tmp, ss_get_byte (&i->input)); if (style->grouping != 0) ss_match_byte (&i->input, style->grouping); } /* Decimal point and following digits. */ if (ss_match_byte (&i->input, style->decimal)) { ds_put_byte (&tmp, '.'); while (c_isdigit (ss_first (i->input))) ds_put_byte (&tmp, ss_get_byte (&i->input)); } /* Exponent. */ if (!ds_is_empty (&tmp) && !ss_is_empty (i->input) && strchr ("eEdD-+", ss_first (i->input))) { ds_put_byte (&tmp, 'e'); if (strchr ("eEdD", ss_first (i->input))) { ss_advance (&i->input, 1); ss_match_byte (&i->input, ' '); } if (ss_first (i->input) == '-' || ss_first (i->input) == '+') { if (ss_get_byte (&i->input) == '-') ds_put_byte (&tmp, '-'); ss_match_byte (&i->input, ' '); } while (c_isdigit (ss_first (i->input))) ds_put_byte (&tmp, ss_get_byte (&i->input)); } /* Suffix character. */ if (style->suffix.s[0] != '\0') ss_match_byte (&i->input, style->suffix.s[0]); if (!ss_is_empty (i->input)) { char *error; if (ds_is_empty (&tmp)) error = xstrdup (_("Field contents are not numeric.")); else error = xstrdup (_("Number followed by garbage.")); ds_destroy (&tmp); return error; } /* Let c_strtod() do the conversion. */ save_errno = errno; errno = 0; i->output->f = c_strtod (ds_cstr (&tmp), &tail); if (*tail != '\0') { errno = save_errno; ds_destroy (&tmp); return xstrdup (_("Invalid numeric syntax.")); } else if (errno == ERANGE) { if (fabs (i->output->f) > 1) { i->output->f = SYSMIS; ds_destroy (&tmp); return xstrdup (_("Too-large number set to system-missing.")); } else { i->output->f = 0.0; ds_destroy (&tmp); return xstrdup (_("Too-small number set to zero.")); } } else errno = save_errno; ds_destroy (&tmp); return NULL; } /* Parses N format. */ static char * parse_N (struct data_in *i) { int c; i->output->f = 0; while ((c = ss_get_byte (&i->input)) != EOF) { if (!c_isdigit (c)) return xstrdup (_("All characters in field must be digits.")); i->output->f = i->output->f * 10.0 + (c - '0'); } return NULL; } /* Parses PIBHEX format. */ static char * parse_PIBHEX (struct data_in *i) { double n; int c; n = 0.0; while ((c = ss_get_byte (&i->input)) != EOF) { if (!c_isxdigit (c)) return xstrdup (_("Unrecognized character in field.")); n = n * 16.0 + hexit_value (c); } i->output->f = n; return NULL; } /* Parses RBHEX format. */ static char * parse_RBHEX (struct data_in *i) { double d; size_t j; memset (&d, 0, sizeof d); for (j = 0; !ss_is_empty (i->input) && j < sizeof d; j++) { int hi = ss_get_byte (&i->input); int lo = ss_get_byte (&i->input); if (lo == EOF) return xstrdup (_("Field must have even length.")); else if (!c_isxdigit (hi) || !c_isxdigit (lo)) return xstrdup (_("Field must contain only hex digits.")); ((unsigned char *) &d)[j] = 16 * hexit_value (hi) + hexit_value (lo); } i->output->f = d; return NULL; } /* Digits for Z format. */ static const char z_digits[] = "0123456789{ABCDEFGHI}JKLMNOPQR"; /* Returns true if C is a Z format digit, false otherwise. */ static bool is_z_digit (int c) { return c > 0 && strchr (z_digits, c) != NULL; } /* Returns the (absolute value of the) value of C as a Z format digit. */ static int z_digit_value (int c) { assert (is_z_digit (c)); return (strchr (z_digits, c) - z_digits) % 10; } /* Returns true if Z format digit C represents a negative value, false otherwise. */ static bool is_negative_z_digit (int c) { assert (is_z_digit (c)); return (strchr (z_digits, c) - z_digits) >= 20; } /* Parses Z format. */ static char * parse_Z (struct data_in *i) { struct string tmp; int save_errno; bool got_dot = false; bool got_final_digit = false; /* Trim spaces and check for missing value representation. */ if (trim_spaces_and_check_missing (i)) return NULL; ds_init_empty (&tmp); ds_extend (&tmp, 64); ds_put_byte (&tmp, '+'); while (!ss_is_empty (i->input)) { int c = ss_get_byte (&i->input); if (c_isdigit (c) && !got_final_digit) ds_put_byte (&tmp, c); else if (is_z_digit (c) && !got_final_digit) { ds_put_byte (&tmp, z_digit_value (c) + '0'); if (is_negative_z_digit (c)) ds_data (&tmp)[0] = '-'; got_final_digit = true; } else if (c == '.' && !got_dot) { ds_put_byte (&tmp, '.'); got_dot = true; } else { ds_destroy (&tmp); return xstrdup (_("Invalid zoned decimal syntax.")); } } if (!ss_is_empty (i->input)) { char *error; if (ds_length (&tmp) == 1) error = xstrdup (_("Field contents are not numeric.")); else error = xstrdup (_("Number followed by garbage.")); ds_destroy (&tmp); return error; } /* Let c_strtod() do the conversion. */ save_errno = errno; errno = 0; i->output->f = c_strtod (ds_cstr (&tmp), NULL); if (errno == ERANGE) { if (fabs (i->output->f) > 1) { i->output->f = SYSMIS; ds_destroy (&tmp); return xstrdup (_("Too-large number set to system-missing.")); } else { i->output->f = 0.0; ds_destroy (&tmp); return xstrdup (_("Too-small number set to zero.")); } } else errno = save_errno; ds_destroy (&tmp); return NULL; } /* Parses IB format. */ static char * parse_IB (struct data_in *i) { size_t bytes; uint64_t value; uint64_t sign_bit; bytes = MIN (8, ss_length (i->input)); value = integer_get (settings_get_input_integer_format (), ss_data (i->input), bytes); sign_bit = UINT64_C(1) << (8 * bytes - 1); if (!(value & sign_bit)) i->output->f = value; else { /* Sign-extend to full 64 bits. */ value -= sign_bit << 1; i->output->f = -(double) -value; } return NULL; } /* Parses PIB format. */ static char * parse_PIB (struct data_in *i) { i->output->f = integer_get (settings_get_input_integer_format (), ss_data (i->input), MIN (8, ss_length (i->input))); return NULL; } /* Consumes the first character of S. Stores its high 4 bits in HIGH_NIBBLE and its low 4 bits in LOW_NIBBLE. */ static void get_nibbles (struct substring *s, int *high_nibble, int *low_nibble) { int c = ss_get_byte (s); assert (c != EOF); *high_nibble = (c >> 4) & 15; *low_nibble = c & 15; } /* Parses P format. */ static char * parse_P (struct data_in *i) { int high_nibble, low_nibble; i->output->f = 0.0; while (ss_length (i->input) > 1) { get_nibbles (&i->input, &high_nibble, &low_nibble); if (high_nibble > 9 || low_nibble > 9) return xstrdup (_("Invalid syntax for P field.")); i->output->f = (100 * i->output->f) + (10 * high_nibble) + low_nibble; } get_nibbles (&i->input, &high_nibble, &low_nibble); if (high_nibble > 9) return xstrdup (_("Invalid syntax for P field.")); i->output->f = (10 * i->output->f) + high_nibble; if (low_nibble < 10) i->output->f = (10 * i->output->f) + low_nibble; else if (low_nibble == 0xb || low_nibble == 0xd) i->output->f = -i->output->f; return NULL; } /* Parses PK format. */ static char * parse_PK (struct data_in *i) { i->output->f = 0.0; while (!ss_is_empty (i->input)) { int high_nibble, low_nibble; get_nibbles (&i->input, &high_nibble, &low_nibble); if (high_nibble > 9 || low_nibble > 9) { i->output->f = SYSMIS; return NULL; } i->output->f = (100 * i->output->f) + (10 * high_nibble) + low_nibble; } return NULL; } /* Parses RB format. */ static char * parse_RB (struct data_in *i) { enum float_format ff = settings_get_input_float_format (); size_t size = float_get_size (ff); if (ss_length (i->input) >= size) float_convert (ff, ss_data (i->input), FLOAT_NATIVE_DOUBLE, &i->output->f); else i->output->f = SYSMIS; return NULL; } /* Parses A format. */ static char * parse_A (struct data_in *i) { /* This is equivalent to buf_copy_rpad, except that we posibly do a character set recoding in the middle. */ uint8_t *dst = value_str_rw (i->output, i->width); size_t dst_size = i->width; const char *src = ss_data (i->input); size_t src_size = ss_length (i->input); memcpy (dst, src, MIN (src_size, dst_size)); if (dst_size > src_size) memset (&dst[src_size], ' ', dst_size - src_size); return NULL; } /* Parses AHEX format. */ static char * parse_AHEX (struct data_in *i) { uint8_t *s = value_str_rw (i->output, i->width); size_t j; for (j = 0; ; j++) { int hi = ss_get_byte (&i->input); int lo = ss_get_byte (&i->input); if (hi == EOF) break; else if (lo == EOF) return xstrdup (_("Field must have even length.")); if (!c_isxdigit (hi) || !c_isxdigit (lo)) return xstrdup (_("Field must contain only hex digits.")); if (j < i->width) s[j] = hexit_value (hi) * 16 + hexit_value (lo); } memset (&s[j], ' ', i->width - j); return NULL; } /* Date & time format components. */ /* Sign of a time value. */ enum time_sign { SIGN_NO_TIME, /* No time yet encountered. */ SIGN_POSITIVE, /* Positive time. */ SIGN_NEGATIVE /* Negative time. */ }; /* Parses a signed decimal integer from at most the first MAX_DIGITS characters in I, storing the result into *RESULT. Returns true if successful, false if no integer was present. */ static char * WARN_UNUSED_RESULT parse_int (struct data_in *i, long *result, size_t max_digits) { struct substring head = ss_head (i->input, max_digits); size_t n = ss_get_long (&head, result); if (n) { ss_advance (&i->input, n); return NULL; } else return xstrdup (_("Syntax error in date field.")); } /* Parses a date integer between 1 and 31 from I, storing it into *DAY. Returns true if successful, false if no date was present. */ static char * parse_day (struct data_in *i, long *day) { char *error = parse_int (i, day, SIZE_MAX); if (error != NULL) return error; if (*day >= 1 && *day <= 31) return NULL; return xasprintf (_("Day (%ld) must be between 1 and 31."), *day); } /* Parses an integer from the beginning of I. Adds SECONDS_PER_UNIT times the absolute value of the integer to *TIME. If *TIME_SIGN is SIGN_NO_TIME, allows a sign to precede the time and sets *TIME_SIGN. Otherwise, does not allow a sign. Returns true if successful, false if no integer was present. */ static char * parse_time_units (struct data_in *i, double seconds_per_unit, enum time_sign *time_sign, double *time) { char *error; long units; if (*time_sign == SIGN_NO_TIME) { if (ss_match_byte (&i->input, '-')) *time_sign = SIGN_NEGATIVE; else { ss_match_byte (&i->input, '+'); *time_sign = SIGN_POSITIVE; } } error = parse_int (i, &units, SIZE_MAX); if (error != NULL) return error; if (units < 0) return xstrdup (_("Syntax error in date field.")); *time += units * seconds_per_unit; return NULL; } /* Parses a data delimiter from the beginning of I. Returns true if successful, false if no delimiter was present. */ static char * parse_date_delimiter (struct data_in *i) { if (ss_ltrim (&i->input, ss_cstr ("-/.," CC_SPACES))) return NULL; return xstrdup (_("Delimiter expected between fields in date.")); } /* Parses spaces at the beginning of I. */ static void parse_spaces (struct data_in *i) { ss_ltrim (&i->input, ss_cstr (CC_SPACES)); } static struct substring parse_name_token (struct data_in *i) { struct substring token; ss_get_bytes (&i->input, ss_span (i->input, ss_cstr (CC_LETTERS)), &token); return token; } /* Reads a name from I and sets *OUTPUT to the value associated with that name. If ALLOW_SUFFIXES is true, then names that begin with one of the names are accepted; otherwise, only exact matches (except for case) are allowed. Returns true if successful, false otherwise. */ static bool match_name (struct substring token, const char *const *names, long *output) { int i; for (i = 1; *names != NULL; i++) if (ss_equals_case (ss_cstr (*names++), token)) { *output = i; return true; } return false; } /* Parses a month name or number from the beginning of I, storing the month (in range 1...12) into *MONTH. Returns true if successful, false if no month was present. */ static char * parse_month (struct data_in *i, long *month) { if (c_isdigit (ss_first (i->input))) { char *error = parse_int (i, month, SIZE_MAX); if (error != NULL) return error; if (*month >= 1 && *month <= 12) return NULL; } else { static const char *const english_names[] = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec", NULL, }; static const char *const roman_names[] = { "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix", "x", "xi", "xii", NULL, }; struct substring token = parse_name_token (i); if (match_name (ss_head (token, 3), english_names, month) || match_name (ss_head (token, 4), roman_names, month)) return NULL; } return xstrdup (_("Unrecognized month format. Months may be specified " "as Arabic or Roman numerals or as at least 3 letters " "of their English names.")); } /* Parses a year of at most MAX_DIGITS from the beginning of I, storing a "4-digit" year into *YEAR. */ static char * parse_year (struct data_in *i, long *year, size_t max_digits) { char *error = parse_int (i, year, max_digits); if (error != NULL) return error; if (*year >= 0 && *year <= 99) { int epoch = settings_get_epoch (); int epoch_century = ROUND_DOWN (epoch, 100); int epoch_offset = epoch - epoch_century; if (*year >= epoch_offset) *year += epoch_century; else *year += epoch_century + 100; } if (*year >= 1582 && *year <= 19999) return NULL; return xasprintf (_("Year (%ld) must be between 1582 and 19999."), *year); } /* Returns true if input in I has been exhausted, false otherwise. */ static char * parse_trailer (struct data_in *i) { if (ss_is_empty (i->input)) return NULL; return xasprintf (_("Trailing garbage `%.*s' following date."), (int) ss_length (i->input), ss_data (i->input)); } /* Parses a 3-digit Julian day-of-year value from I into *YDAY. Returns true if successful, false on failure. */ static char * parse_yday (struct data_in *i, long *yday) { struct substring num_s; long num; ss_get_bytes (&i->input, 3, &num_s); if (ss_span (num_s, ss_cstr (CC_DIGITS)) != 3) return xstrdup (_("Julian day must have exactly three digits.")); else if (!ss_get_long (&num_s, &num) || num < 1 || num > 366) return xasprintf (_("Julian day (%ld) must be between 1 and 366."), num); *yday = num; return NULL; } /* Parses a quarter-of-year integer between 1 and 4 from I. Stores the corresponding month into *MONTH. Returns true if successful, false if no quarter was present. */ static char * parse_quarter (struct data_in *i, long int *month) { long quarter; char *error; error = parse_int (i, &quarter, SIZE_MAX); if (error != NULL) return error; if (quarter >= 1 && quarter <= 4) { *month = (quarter - 1) * 3 + 1; return NULL; } return xasprintf (_("Quarter (%ld) must be between 1 and 4."), quarter); } /* Parses a week-of-year integer between 1 and 53 from I, Stores the corresponding year-of-day into *YDAY. Returns true if successful, false if no week was present. */ static char * parse_week (struct data_in *i, long int *yday) { char *error; long week; error = parse_int (i, &week, SIZE_MAX); if (error != NULL) return error; if (week >= 1 && week <= 53) { *yday = (week - 1) * 7 + 1; return NULL; } return xasprintf (_("Week (%ld) must be between 1 and 53."), week); } /* Parses a time delimiter from the beginning of I. Returns true if successful, false if no delimiter was present. */ static char * parse_time_delimiter (struct data_in *i) { if (ss_ltrim (&i->input, ss_cstr (":" CC_SPACES)) > 0) return NULL; return xstrdup (_("Delimiter expected between fields in time.")); } /* Parses minutes and optional seconds from the beginning of I. The time is converted into seconds, which are added to *TIME. Returns true if successful, false if an error was found. */ static char * parse_minute_second (struct data_in *i, double *time) { long minute; char buf[64]; char *error; char *cp; /* Parse minutes. */ error = parse_int (i, &minute, SIZE_MAX); if (error != NULL) return error; if (minute < 0 || minute > 59) return xasprintf (_("Minute (%ld) must be between 0 and 59."), minute); *time += 60. * minute; /* Check for seconds. */ if (ss_ltrim (&i->input, ss_cstr (":" CC_SPACES)) == 0 || !c_isdigit (ss_first (i->input))) return NULL; /* Parse seconds. */ cp = buf; while (c_isdigit (ss_first (i->input))) *cp++ = ss_get_byte (&i->input); if (ss_match_byte (&i->input, settings_get_decimal_char (FMT_F))) *cp++ = '.'; while (c_isdigit (ss_first (i->input))) *cp++ = ss_get_byte (&i->input); *cp = '\0'; *time += c_strtod (buf, NULL); return NULL; } /* Parses a weekday name from the beginning of I, storing a value of 1=Sunday...7=Saturday into *WEEKDAY. Returns true if successful, false if an error was found. */ static char * parse_weekday (struct data_in *i, long *weekday) { static const char *const weekday_names[] = { "su", "mo", "tu", "we", "th", "fr", "sa", NULL, }; struct substring token = parse_name_token (i); bool ok = match_name (ss_head (token, 2), weekday_names, weekday); if (!ok) return xstrdup (_("Unrecognized weekday name. At least the first two " "letters of an English weekday name must be " "specified.")); return NULL; } /* Date & time formats. */ /* Parses WKDAY format. */ static char * parse_WKDAY (struct data_in *i) { long weekday; char *error; if (trim_spaces_and_check_missing (i)) return NULL; error = parse_weekday (i, &weekday); if (error == NULL) error = parse_trailer (i); i->output->f = weekday; return error; } /* Parses MONTH format. */ static char * parse_MONTH (struct data_in *i) { long month; char *error; if (trim_spaces_and_check_missing (i)) return NULL; error = parse_month (i, &month); if (error == NULL) error = parse_trailer (i); i->output->f = month; return error; } /* Parses DATE, ADATE, EDATE, JDATE, SDATE, QYR, MOYR, KWYR, DATETIME, TIME and DTIME formats. */ static char * parse_date (struct data_in *i) { long int year = INT_MIN; long int month = 1; long int day = 1; long int yday = 1; double time = 0, date = 0; enum time_sign time_sign = SIGN_NO_TIME; const char *template = fmt_date_template (i->format, 0); size_t template_width = strlen (template); char *error; if (trim_spaces_and_check_missing (i)) return NULL; while (*template != '\0') { unsigned char ch = *template; int count = 1; while (template[count] == ch) count++; template += count; switch (ch) { case 'd': error = count < 3 ? parse_day (i, &day) : parse_yday (i, &yday); break; case 'm': error = parse_month (i, &month); break; case 'y': { size_t max_digits; if (!c_isalpha (*template)) max_digits = SIZE_MAX; else { if (ss_length (i->input) >= template_width + 2) max_digits = 4; else max_digits = 2; } error = parse_year (i, &year, max_digits); } break; case 'q': error = parse_quarter (i, &month); break; case 'w': error = parse_week (i, &yday); break; case 'D': error = parse_time_units (i, 60. * 60. * 24., &time_sign, &time); break; case 'H': error = parse_time_units (i, 60. * 60., &time_sign, &time); break; case 'M': error = parse_minute_second (i, &time); break; case '-': case '/': case '.': error = parse_date_delimiter (i); break; case ':': error = parse_time_delimiter (i); case ' ': if (i->format != FMT_MOYR) { parse_spaces (i); error = NULL; } else error = parse_date_delimiter (i); break; default: assert (count == 1); if (!ss_match_byte (&i->input, c_toupper (ch)) && !ss_match_byte (&i->input, c_tolower (ch))) error = xasprintf (_("`%c' expected in date field."), ch); else error = NULL; break; } if (error != NULL) return error; } error = parse_trailer (i); if (error != NULL) return error; if (year != INT_MIN) { char *error; double ofs; ofs = calendar_gregorian_to_offset (year, month, day, &error); if (ofs == SYSMIS) return error; date = (yday - 1 + ofs) * 60. * 60. * 24.; } else date = 0.; i->output->f = date + (time_sign == SIGN_NEGATIVE ? -time : time); return NULL; } /* Utility functions. */ /* Sets the default result for I. For a numeric format, this is the value set on SET BLANKS (typically system-missing); for a string format, it is all spaces. */ static void default_result (struct data_in *i) { if (fmt_is_string (i->format)) memset (value_str_rw (i->output, i->width), ' ', i->width); else i->output->f = settings_get_blanks (); } /* Trims leading and trailing spaces from I. If the result is empty, or a single period character, then sets the default result and returns true; otherwise, returns false. */ static bool trim_spaces_and_check_missing (struct data_in *i) { ss_trim (&i->input, ss_cstr (" ")); if (ss_is_empty (i->input) || ss_equals (i->input, ss_cstr ("."))) { default_result (i); return true; } return false; } /* Returns the integer value of hex digit C. */ static int hexit_value (int c) { const char s[] = "0123456789abcdef"; const char *cp = strchr (s, c_tolower ((unsigned char) c)); assert (cp != NULL); return cp - s; } pspp-1.0.1/src/data/missing-values.h0000644000175000017500000001021312476227410014235 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005, 2009, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* User-missing values. struct missing_values is an opaque type that represents a set of user-missing values associated with a variable. Valid sets of missing values depend on variable width: - Numeric variables may have up to 3 discrete numeric user-missing values, or a range of numeric values, or a range plus one discrete value. - String variables may have up to 3 discrete string user-missing values. (However, for long string variables all bytes after the first MV_MAX_STRING must be spaces.) */ #ifndef DATA_MISSING_VALUES_H #define DATA_MISSING_VALUES_H 1 #include #include "data/value.h" struct pool; /* Missing values for long string variables after the first MV_MAX_STRING bytes must be all spaces. */ #define MV_MAX_STRING 8 /* Missing values. Opaque--use access functions defined below. */ struct missing_values { int type; /* Types of missing values, one of MVT_*. */ int width; /* 0=numeric, otherwise string width. */ union value values[3]; /* Missing values. [1], [2] are the range. */ }; /* Classes of missing values. */ enum mv_class { MV_NEVER = 0, /* Never considered missing. */ MV_USER = 1, /* Missing if value is user-missing. */ MV_SYSTEM = 2, /* Missing if value is system-missing. */ MV_ANY = MV_USER | MV_SYSTEM /* Missing if it is user or system-missing. */ }; /* Is a value missing? */ bool mv_is_value_missing (const struct missing_values *, const union value *, enum mv_class); bool mv_is_num_missing (const struct missing_values *, double, enum mv_class); bool mv_is_str_missing (const struct missing_values *, const uint8_t[], enum mv_class); /* Initializing missing value sets. */ void mv_init (struct missing_values *, int width); void mv_init_pool (struct pool *pool, struct missing_values *, int width); void mv_destroy (struct missing_values *); void mv_copy (struct missing_values *, const struct missing_values *); void mv_clear (struct missing_values *); /* Changing width of a missing value set. */ bool mv_is_resizable (const struct missing_values *, int width); void mv_resize (struct missing_values *, int width); /* Basic property inspection. */ bool mv_is_acceptable (const union value *, int width); bool mv_is_empty (const struct missing_values *); int mv_get_width (const struct missing_values *); /* Inspecting discrete values. */ int mv_n_values (const struct missing_values *); bool mv_has_value (const struct missing_values *); const union value *mv_get_value (const struct missing_values *, int idx); /* Inspecting ranges. */ bool mv_has_range (const struct missing_values *); void mv_get_range (const struct missing_values *, double *low, double *high); /* Adding and modifying discrete values. */ bool mv_add_value (struct missing_values *, const union value *); bool mv_add_str (struct missing_values *, const uint8_t[], size_t len); bool mv_add_num (struct missing_values *, double); void mv_pop_value (struct missing_values *, union value *); bool mv_replace_value (struct missing_values *, const union value *, int idx); /* Adding and modifying ranges. */ bool mv_add_range (struct missing_values *, double low, double high); void mv_pop_range (struct missing_values *, double *low, double *high); #endif /* data/missing-values.h */ pspp-1.0.1/src/data/casereader-shim.h0000644000175000017500000000461612470242642014333 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_CASEREADER_SHIM_H #define DATA_CASEREADER_SHIM_H 1 /* Buffering shim for implementing clone and peek operations. The "clone" and "peek" operations aren't implemented by all types of casereaders, but we have to expose a uniform interface anyhow. The casereader buffering shim can do this by interposing a buffer on top of an existing casereader. The shim maintains a window of cases that spans the positions of the original casereader and all of its clones (the "clone set"), from the position of the casereader that has read the fewest cases to the position of the casereader that has read the most. Thus, if all of the casereaders in the clone set are at approximately the same position, only a few cases are buffered and there is little inefficiency. If, on the other hand, one casereader is not used to read any cases at all, but another one is used to read all of the cases, the entire contents of the casereader is copied into the buffer. This still might not be so inefficient, given that case data in memory is shared across multiple identical copies, but in the worst case the window implementation will write cases to disk instead of maintaining them in-memory. Casereader buffering shims are inserted automatically on the first call to casereader_clone() or casereader_peek() for a casereader that does not support those operations natively. Thus, there is ordinarily little reason to intentionally insert a shim. */ struct casereader; struct casereader_shim *casereader_shim_insert (struct casereader *); void casereader_shim_slurp (struct casereader_shim *); #endif /* data/casereader-shim.h */ pspp-1.0.1/src/data/casewindow.h0000644000175000017500000000403112470243700013425 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Sliding window over a set of cases. A casewindow is a queue of cases: cases may be added at the head of the queue and deleted from the tail. A casewindow is initially maintained in memory and then, should it grow too large, is dumped to disk. Any case in the casewindow may be accessed, not just the case at the head. Cases are numbered relative to the tail: the least recently added case is number 0, and so on. */ #ifndef DATA_CASEWINDOW_H #define DATA_CASEWINDOW_H 1 #include "data/case.h" struct caseproto; struct casewindow *casewindow_create (const struct caseproto *, casenumber max_in_core_cases); bool casewindow_destroy (struct casewindow *); void casewindow_push_head (struct casewindow *, struct ccase *); void casewindow_pop_tail (struct casewindow *, casenumber cnt); struct ccase *casewindow_get_case (const struct casewindow *, casenumber case_idx); const struct caseproto *casewindow_get_proto (const struct casewindow *); casenumber casewindow_get_case_cnt (const struct casewindow *); bool casewindow_error (const struct casewindow *); void casewindow_force_error (struct casewindow *); const struct taint *casewindow_get_taint (const struct casewindow *); #endif /* data/casewindow.h */ pspp-1.0.1/src/data/csv-file-writer.h0000644000175000017500000000331412470242642014313 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef CSV_FILE_WRITER_H #define CSV_FILE_WRITER_H 1 #include /* Writing comma-separated value (CSV) files. */ /* Options for creating CSV files. */ struct csv_writer_options { bool recode_user_missing; /* Recode user-missing to system-missing? */ bool include_var_names; /* Add header row with variable names? */ bool use_value_labels; /* Write value labels where available? */ bool use_print_formats; /* Honor variables' print formats? */ char decimal; /* Decimal point character. */ char delimiter; /* Field separator. */ char qualifier; /* Quote character. */ }; void csv_writer_options_init (struct csv_writer_options *); struct file_handle; struct dictionary; struct casewriter *csv_writer_open (struct file_handle *, const struct dictionary *, const struct csv_writer_options *); #endif /* csv-file-writer.h */ pspp-1.0.1/src/data/gnumeric-reader.h0000644000175000017500000000245412576202615014351 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef GNUMERIC_READ_H #define GNUMERIC_READ_H 1 #include struct casereader; struct dictionary; struct spreadsheet_read_info; struct spreadsheet_read_options; struct spreadsheet *gnumeric_probe (const char *filename, bool report_errors); const char * gnumeric_get_sheet_name (struct spreadsheet *s, int n); char * gnumeric_get_sheet_range (struct spreadsheet *s, int n); struct casereader * gnumeric_make_reader (struct spreadsheet *spreadsheet, const struct spreadsheet_read_options *opts); void gnumeric_unref (struct spreadsheet *r); #endif pspp-1.0.1/src/data/datasheet.h0000644000175000017500000000653412470434665013252 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_DATASHEET_H #define DATA_DATASHEET_H 1 #include "data/case.h" #include "data/value.h" struct caseproto; struct casereader; /* A datasheet is a 2-d array of "union value"s that may be stored in memory or on disk. It efficiently supports data storage and retrieval, as well as adding, removing, and rearranging both rows and columns. */ struct datasheet *datasheet_create (struct casereader *); void datasheet_destroy (struct datasheet *); struct datasheet *datasheet_rename (struct datasheet *); const struct caseproto *datasheet_get_proto (const struct datasheet *); int datasheet_get_column_width (const struct datasheet *, size_t column); bool datasheet_error (const struct datasheet *); void datasheet_force_error (struct datasheet *); const struct taint *datasheet_get_taint (const struct datasheet *); struct casereader *datasheet_make_reader (struct datasheet *); /* Columns. */ size_t datasheet_get_n_columns (const struct datasheet *); bool datasheet_insert_column (struct datasheet *, const union value *, int width, size_t before); void datasheet_delete_columns (struct datasheet *, size_t start, size_t cnt); void datasheet_move_columns (struct datasheet *, size_t old_start, size_t new_start, size_t cnt); bool datasheet_resize_column (struct datasheet *, size_t column, int new_width, void (*resize_cb) (const union value *, union value *, const void *aux), const void *aux); /* Rows. */ casenumber datasheet_get_n_rows (const struct datasheet *); bool datasheet_insert_rows (struct datasheet *, casenumber before, struct ccase *[], casenumber cnt); void datasheet_delete_rows (struct datasheet *, casenumber first, casenumber cnt); void datasheet_move_rows (struct datasheet *, size_t old_start, size_t new_start, size_t cnt); /* Data. */ struct ccase *datasheet_get_row (const struct datasheet *, casenumber); bool datasheet_put_row (struct datasheet *, casenumber, struct ccase *); bool datasheet_get_value (const struct datasheet *, casenumber, size_t column, union value *); bool datasheet_put_value (struct datasheet *, casenumber, size_t column, const union value *); unsigned int hash_datasheet (const struct datasheet *ds); struct datasheet *clone_datasheet (const struct datasheet *ds); #endif /* data/datasheet.h */ pspp-1.0.1/src/data/any-reader.h0000644000175000017500000001027712642117700013323 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010, 2012, 2014, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef ANY_READER_H #define ANY_READER_H 1 #include #include #include "data/case.h" #include "libpspp/float-format.h" #include "libpspp/integer-format.h" struct any_read_info; struct dictionary; struct file_handle; struct any_reader { const struct any_reader_class *klass; }; struct any_reader_class { /* The name of this kind of data file, e.g. "SPSS System File". */ const char *name; /* Detects whether FILE contains this type of file. Returns 1 if so, 0 if not, and a negative errno value if there is an error reading FILE. */ int (*detect) (FILE *file); struct any_reader *(*open) (struct file_handle *); bool (*close) (struct any_reader *); struct casereader *(*decode) (struct any_reader *, const char *encoding, struct dictionary **, struct any_read_info *); size_t (*get_strings) (const struct any_reader *, struct pool *pool, char ***labels, bool **ids, char ***values); }; extern const struct any_reader_class sys_file_reader_class; extern const struct any_reader_class por_file_reader_class; extern const struct any_reader_class pcp_file_reader_class; enum any_type { ANY_SYS, /* SPSS System File. */ ANY_PCP, /* SPSS/PC+ System File. */ ANY_POR, /* SPSS Portable File. */ }; enum any_compression { ANY_COMP_NONE, /* No compression. */ ANY_COMP_SIMPLE, /* Bytecode compression of integer values. */ ANY_COMP_ZLIB /* ZLIB "deflate" compression. */ }; /* Data file info that doesn't fit in struct dictionary. The strings in this structure are encoded in UTF-8. (They are normally in the ASCII subset of UTF-8.) */ struct any_read_info { const struct any_reader_class *klass; char *creation_date; char *creation_time; enum integer_format integer_format; enum float_format float_format; enum any_compression compression; casenumber case_cnt; /* -1 if unknown. */ char *product; /* Product name. */ char *product_ext; /* Extra product info. */ /* Writer's version number in X.Y.Z format. The version number is not always present; if not, then all of these are set to 0. */ int version_major; /* X. */ int version_minor; /* Y. */ int version_revision; /* Z. */ }; void any_read_info_destroy (struct any_read_info *); struct file_handle; struct dictionary; int any_reader_detect (const struct file_handle *file_name, const struct any_reader_class **); struct any_reader *any_reader_open (struct file_handle *); bool any_reader_close (struct any_reader *); struct casereader *any_reader_decode (struct any_reader *, const char *encoding, struct dictionary **, struct any_read_info *); size_t any_reader_get_strings (const struct any_reader *, struct pool *pool, char ***labels, bool **ids, char ***values); struct casereader *any_reader_open_and_decode (struct file_handle *, const char *encoding, struct dictionary **, struct any_read_info *); #endif /* any-reader.h */ pspp-1.0.1/src/data/casereader-provider.h0000644000175000017500000001527712470243700015226 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Definitions needed to implement a new type of casereader. Code that only uses casereaders does not need this header. Two functions to create casereaders are supplied: - casereader_create_sequential, to create a casereader for a data source that is naturally sequential. The casereader layer will automatically, as needed, simulate the ability to access cases randomly. - casereader_create_random, to create a casereader for a data source that supports random access to cases. (This function is in fact implemented as a set of wrappers around casereader_create_sequential.) Which function is used has no effect on the set of operations that may be performed on the resulting casereader, only on how the casereader is implemented internally. */ #ifndef DATA_CASEREADER_PROVIDER_H #define DATA_CASEREADER_PROVIDER_H 1 #include "data/casereader.h" /* Casereader class for sequential data sources. */ struct casereader_class { /* Mandatory. Reads the next case from READER. If successful, returns the case and advances READER, so that the next call to this function will read the following case. The case just read will never be read again by a call to this function for READER. If a case is successfully returned, the client is responsible for calling case_unref upon it when it is no longer needed. At end of file or upon an I/O error, returns a null pointer. After null is returned once, this function will not be called again for the given READER. If an I/O error occurs, this function should call casereader_force_error on READER. */ struct ccase *(*read) (struct casereader *reader, void *aux); /* Mandatory. Destroys READER. If an I/O error is detected during destruction, this function should call casereader_force_error on READER. */ void (*destroy) (struct casereader *reader, void *aux); /* Optional: if convenient and efficiently implementable, supply this function as an optimization for use by casereader_clone. (But it might be easier to use the random-access casereader wrapper instead.) Creates and returns a clone of READER. The clone must read the same case data in the same sequence as READER, starting from the same position. The only allowable exception to this rule is that I/O errors may force the clone or the original casereader to stop reading after differing numbers of cases. The clone should have a clone of READER's taint object, accomplished by passing casereader_get_taint (READER) to casereader_create. */ struct casereader *(*clone) (struct casereader *reader, void *aux); /* Optional: if convenient and efficiently implementable, supply as an optimization for use by casereader_peek. (But it might be easier to use the random-access casereader wrapper instead.) Reads and returns the case at 0-based offset IDX from the beginning of READER. If a case is successfully returned, the client is responsible for calling case_unref upon it when it is no longer needed. At end of file or upon an I/O error, returns a null pointer. If this function returns null, then it will never be called again for an equal or greater value of IDX, and the "read" member function will never be called to advance as far as IDX cases further into the casereader. That is, returning null indicates that the casereader has fewer than IDX cases left. If an I/O error occurs, this function should call casereader_force_error on READER. */ struct ccase *(*peek) (struct casereader *reader, void *aux, casenumber idx); }; struct casereader * casereader_create_sequential (const struct taint *, const struct caseproto *, casenumber case_cnt, const struct casereader_class *, void *); void *casereader_dynamic_cast (struct casereader *, const struct casereader_class *); /* Casereader class for random-access data sources. */ struct casereader_random_class { /* Mandatory. Reads the case at 0-based offset IDX from the beginning of READER. If a case is successfully returned, the client is responsible for calling case_unref upon it when it is no longer needed. At end of file or upon an I/O error, returns a null pointer. If this function returns null, then it will never be called again for an equal or greater value of IDX, and the "read" member function will never be called to advance as far as IDX cases further into the casereader. That is, returning null indicates that the casereader has fewer than IDX cases. If an I/O error occurs, this function should call casereader_force_error on READER. */ struct ccase *(*read) (struct casereader *reader, void *aux, casenumber idx); /* Mandatory. Destroys READER. If an I/O error is detected during destruction, this function should call casereader_force_error on READER. */ void (*destroy) (struct casereader *reader, void *aux); /* Mandatory. A call to this function tells the callee that the CNT cases at the beginning of READER will never be read again. The casereader implementation should free any resources associated with those cases. After this function returns, the IDX argument in future calls to the "read" function will be relative to remaining cases. */ void (*advance) (struct casereader *reader, void *aux, casenumber cnt); }; struct casereader * casereader_create_random (const struct caseproto *, casenumber case_cnt, const struct casereader_random_class *, void *aux); #endif /* data/casereader-provider.h */ pspp-1.0.1/src/data/case-tmpfile.c0000644000175000017500000001525212470434665013651 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/case-tmpfile.h" #include #include #include #include "libpspp/assertion.h" #include "libpspp/taint.h" #include "libpspp/ext-array.h" #include "gl/xalloc.h" /* A temporary file that stores an array of cases. */ struct case_tmpfile { struct taint *taint; /* Taint. */ struct caseproto *proto; /* Format of cases in the tmpfile. */ size_t case_size; /* Number of bytes per case. */ size_t *offsets; /* Offset to each value. */ struct ext_array *ext_array; /* Temporary file. */ }; /* Returns the number of bytes needed to store a value with the given WIDTH on disk. */ static size_t width_to_n_bytes (int width) { return width == 0 ? sizeof (double) : width; } /* Returns the address of the data in VALUE (for reading or writing to/from disk). VALUE must have the given WIDTH. */ static void * value_to_data (const union value *value_, int width) { union value *value = CONST_CAST (union value *, value_); assert (sizeof value->f == sizeof (double)); if (width == 0) return &value->f; else return value_str_rw (value, width); } /* Creates and returns a new case_tmpfile that will store cases that match case prototype PROTO. The caller retains ownership of PROTO. */ struct case_tmpfile * case_tmpfile_create (const struct caseproto *proto) { struct case_tmpfile *ctf; size_t n_values; size_t i; ctf = xmalloc (sizeof *ctf); ctf->taint = taint_create (); ctf->ext_array = ext_array_create (); ctf->proto = caseproto_ref (proto); ctf->case_size = 0; n_values = caseproto_get_n_widths (proto); ctf->offsets = xmalloc (n_values * sizeof *ctf->offsets); for (i = 0; i < n_values; i++) { size_t width = caseproto_get_width (proto, i); ctf->offsets[i] = ctf->case_size; ctf->case_size += width == -1 ? 0 : width == 0 ? sizeof (double) : width; } return ctf; } /* Destroys case_tmpfile CTF. Returns true if CTF was tainted, which is caused by an I/O error on case_tmpfile access or by taint propagation to the case_tmpfile. */ bool case_tmpfile_destroy (struct case_tmpfile *ctf) { bool ok = true; if (ctf != NULL) { struct taint *taint = ctf->taint; ext_array_destroy (ctf->ext_array); caseproto_unref (ctf->proto); free (ctf->offsets); free (ctf); ok = taint_destroy (taint); } return ok; } /* Returns true if CTF is tainted, which is caused by an I/O error on case_tmpfile access or by taint propagation to the case_tmpfile. */ bool case_tmpfile_error (const struct case_tmpfile *ctf) { return taint_is_tainted (ctf->taint); } /* Marks CTF as tainted. */ void case_tmpfile_force_error (struct case_tmpfile *ctf) { taint_set_taint (ctf->taint); } /* Returns CTF's taint object. */ const struct taint * case_tmpfile_get_taint (const struct case_tmpfile *ctf) { return ctf->taint; } /* Reads N_VALUES values into VALUES, from the case numbered CASE_IDX starting START_VALUE values into that case. Returns true if successful, false if CTF is tainted or an I/O error occurs during the operation. The results of this function are undefined if any of the values read have not been previously written to CTF. */ bool case_tmpfile_get_values (const struct case_tmpfile *ctf, casenumber case_idx, size_t start_value, union value values[], size_t n_values) { off_t case_offset = (off_t) ctf->case_size * case_idx; size_t i; assert (caseproto_range_is_valid (ctf->proto, start_value, n_values)); for (i = start_value; i < start_value + n_values; i++) { int width = caseproto_get_width (ctf->proto, i); if (width != -1 && !ext_array_read (ctf->ext_array, case_offset + ctf->offsets[i], width_to_n_bytes (width), value_to_data (&values[i], width))) return false; } return true; } /* Reads the case numbered CASE_IDX from CTF. Returns the case if successful or a null pointer if CTF is tainted or an I/O error occurs during the operation. The results of this function are undefined if the case read from CTF had not previously been written. */ struct ccase * case_tmpfile_get_case (const struct case_tmpfile *ctf, casenumber case_idx) { struct ccase *c = case_create (ctf->proto); if (case_tmpfile_get_values (ctf, case_idx, 0, case_data_all_rw (c), caseproto_get_n_widths (ctf->proto))) return c; else { case_unref (c); return NULL; } } /* Writes N_VALUES values from VALUES, into the case numbered CASE_IDX starting START_VALUE values into that case. Returns true if successful, false if CTF is tainted or an I/O error occurs during the operation. */ bool case_tmpfile_put_values (struct case_tmpfile *ctf, casenumber case_idx, size_t start_value, const union value values[], size_t n_values) { off_t case_offset = (off_t) ctf->case_size * case_idx; size_t i; assert (caseproto_range_is_valid (ctf->proto, start_value, n_values)); for (i = start_value; i < start_value + n_values; i++) { int width = caseproto_get_width (ctf->proto, i); if (width != -1 && !ext_array_write (ctf->ext_array, case_offset + ctf->offsets[i], width_to_n_bytes (width), value_to_data (values++, width))) return false; } return true; } /* Writes C to CTF as the case numbered CASE_IDX. Returns true if successful, false if CTF is tainted or an I/O error occurs during the operation. */ bool case_tmpfile_put_case (struct case_tmpfile *ctf, casenumber case_idx, struct ccase *c) { bool ok = case_tmpfile_put_values (ctf, case_idx, 0, case_data_all (c), caseproto_get_n_widths (ctf->proto)); case_unref (c); return ok; } pspp-1.0.1/src/data/mrset.c0000644000175000017500000000754012476227410012425 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/mrset.h" #include #include "data/dictionary.h" #include "data/identifier.h" #include "data/val-type.h" #include "data/variable.h" #include "libpspp/message.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Creates and returns a clone of OLD. The caller is responsible for freeing the new multiple response set (using mrset_destroy()). */ struct mrset * mrset_clone (const struct mrset *old) { struct mrset *new; new = xmalloc (sizeof *new); new->name = xstrdup (old->name); new->label = old->label != NULL ? xstrdup (old->label) : NULL; new->type = old->type; new->vars = xmemdup (old->vars, old->n_vars * sizeof *old->vars); new->n_vars = old->n_vars; new->cat_source = old->cat_source; new->label_from_var_label = old->label_from_var_label; value_clone (&new->counted, &old->counted, old->width); new->width = old->width; return new; } /* Frees MRSET and the data that it contains. */ void mrset_destroy (struct mrset *mrset) { if (mrset != NULL) { free (mrset->name); free (mrset->label); free (mrset->vars); value_destroy (&mrset->counted, mrset->width); free (mrset); } } /* Returns true if the UTF-8 encoded NAME is a valid name for a multiple response set in a dictionary encoded in DICT_ENCODING, false otherwise. If ISSUE_ERROR is true, issues an explanatory error message on failure. */ bool mrset_is_valid_name (const char *name, const char *dict_encoding, bool issue_error) { if (!id_is_valid (name, dict_encoding, issue_error)) return false; if (name[0] != '$') { if (issue_error) msg (SE, _("%s is not a valid name for a multiple response " "set. Multiple response set names must begin with " "`$'."), name); return false; } return true; } /* Checks various constraints on MRSET: - MRSET's name begins with '$' and is valid as an identifier in DICT. - MRSET has a valid type. - MRSET has at least 2 variables. - All of MRSET's variables are in DICT. - All of MRSET's variables are the same type (numeric or string). - If MRSET is a multiple dichotomy set, its counted value has the same type as and is no wider than its narrowest variable. Returns true if all the constraints are satisfied, otherwise false. */ bool mrset_ok (const struct mrset *mrset, const struct dictionary *dict) { enum val_type type; size_t i; if (mrset->name == NULL || !mrset_is_valid_name (mrset->name, dict_get_encoding (dict), false) || (mrset->type != MRSET_MD && mrset->type != MRSET_MC) || mrset->vars == NULL || mrset->n_vars < 2) return false; type = var_get_type (mrset->vars[0]); if (mrset->type == MRSET_MD && type != val_type_from_width (mrset->width)) return false; for (i = 0; i < mrset->n_vars; i++) if (!dict_contains_var (dict, mrset->vars[i]) || type != var_get_type (mrset->vars[i]) || (mrset->type == MRSET_MD && mrset->width > var_get_width (mrset->vars[i]))) return false; return true; } pspp-1.0.1/src/data/casereader-translator.c0000644000175000017500000004236513146355723015570 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/casereader-provider.h" #include "data/casereader.h" #include "data/val-type.h" #include "data/variable.h" #include "libpspp/taint.h" #include "gl/xalloc.h" /* Casereader that applies a user-supplied function to translate each case into another in an arbitrary fashion. */ /* A translating casereader. */ struct casereader_translator { struct casereader *subreader; /* Source of input cases. */ struct ccase *(*translate) (struct ccase *input, void *aux); bool (*destroy) (void *aux); void *aux; }; static const struct casereader_class casereader_translator_class; /* Creates and returns a new casereader whose cases are produced by reading from SUBREADER and passing through TRANSLATE, which must return the translated case, and populate it based on INPUT and auxiliary data AUX. TRANSLATE must destroy its input case. TRANSLATE may be stateful, that is, the output for a given case may depend on previous cases. If TRANSLATE is stateless, then you may want to use casereader_translate_stateless instead, since it sometimes performs better. The cases returned by TRANSLATE must match OUTPUT_PROTO. When the translating casereader is destroyed, DESTROY will be called to allow any state maintained by TRANSLATE to be freed. After this function is called, SUBREADER must not ever again be referenced directly. It will be destroyed automatically when the translating casereader is destroyed. */ struct casereader * casereader_create_translator (struct casereader *subreader, const struct caseproto *output_proto, struct ccase *(*translate) (struct ccase *input, void *aux), bool (*destroy) (void *aux), void *aux) { struct casereader_translator *ct = xmalloc (sizeof *ct); struct casereader *reader; ct->subreader = casereader_rename (subreader); ct->translate = translate; ct->destroy = destroy; ct->aux = aux; reader = casereader_create_sequential ( NULL, output_proto, casereader_get_case_cnt (ct->subreader), &casereader_translator_class, ct); taint_propagate (casereader_get_taint (ct->subreader), casereader_get_taint (reader)); return reader; } /* Internal read function for translating casereader. */ static struct ccase * casereader_translator_read (struct casereader *reader UNUSED, void *ct_) { struct casereader_translator *ct = ct_; struct ccase *tmp = casereader_read (ct->subreader); if (tmp) tmp = ct->translate (tmp, ct->aux); return tmp; } /* Internal destroy function for translating casereader. */ static void casereader_translator_destroy (struct casereader *reader UNUSED, void *ct_) { struct casereader_translator *ct = ct_; casereader_destroy (ct->subreader); ct->destroy (ct->aux); free (ct); } /* Casereader class for translating casereader. */ static const struct casereader_class casereader_translator_class = { casereader_translator_read, casereader_translator_destroy, NULL, NULL, }; /* Casereader that applies a user-supplied function to translate each case into another in a stateless fashion. */ /* A statelessly translating casereader. */ struct casereader_stateless_translator { struct casereader *subreader; /* Source of input cases. */ casenumber case_offset; struct ccase *(*translate) (struct ccase *input, casenumber, const void *aux); bool (*destroy) (void *aux); void *aux; }; static const struct casereader_random_class casereader_stateless_translator_class; /* Creates and returns a new casereader whose cases are produced by reading from SUBREADER and passing through the TRANSLATE function. TRANSLATE must takes ownership of its input case and returns a translated case, populating the translated case based on INPUT and auxiliary data AUX. TRANSLATE must be stateless, that is, the output for a given case must not depend on previous cases. This is because cases may be retrieved in arbitrary order, and some cases may be retrieved multiple times, and some cases may be skipped and never retrieved at all. If TRANSLATE is stateful, use casereader_create_translator instead. The casenumber argument to the TRANSLATE function is the absolute case number in SUBREADER, that is, 0 when the first case in SUBREADER is being translated, 1 when the second case is being translated, and so on. The cases returned by TRANSLATE must match OUTPUT_PROTO. When the stateless translating casereader is destroyed, DESTROY will be called to allow any auxiliary data maintained by TRANSLATE to be freed. After this function is called, SUBREADER must not ever again be referenced directly. It will be destroyed automatically when the translating casereader is destroyed. */ struct casereader * casereader_translate_stateless ( struct casereader *subreader, const struct caseproto *output_proto, struct ccase *(*translate) (struct ccase *input, casenumber, const void *aux), bool (*destroy) (void *aux), void *aux) { struct casereader_stateless_translator *cst = xmalloc (sizeof *cst); struct casereader *reader; cst->subreader = casereader_rename (subreader); cst->translate = translate; cst->destroy = destroy; cst->aux = aux; reader = casereader_create_random ( output_proto, casereader_get_case_cnt (cst->subreader), &casereader_stateless_translator_class, cst); taint_propagate (casereader_get_taint (cst->subreader), casereader_get_taint (reader)); return reader; } /* Internal read function for stateless translating casereader. */ static struct ccase * casereader_stateless_translator_read (struct casereader *reader UNUSED, void *cst_, casenumber idx) { struct casereader_stateless_translator *cst = cst_; struct ccase *tmp = casereader_peek (cst->subreader, idx); if (tmp != NULL) tmp = cst->translate (tmp, cst->case_offset + idx, cst->aux); return tmp; } /* Internal destroy function for translating casereader. */ static void casereader_stateless_translator_destroy (struct casereader *reader UNUSED, void *cst_) { struct casereader_stateless_translator *cst = cst_; casereader_destroy (cst->subreader); cst->destroy (cst->aux); free (cst); } static void casereader_stateless_translator_advance (struct casereader *reader UNUSED, void *cst_, casenumber cnt) { struct casereader_stateless_translator *cst = cst_; cst->case_offset += casereader_advance (cst->subreader, cnt); } /* Casereader class for stateless translating casereader. */ static const struct casereader_random_class casereader_stateless_translator_class = { casereader_stateless_translator_read, casereader_stateless_translator_destroy, casereader_stateless_translator_advance, }; struct casereader_append_numeric { struct caseproto *proto; casenumber n; new_value_func *func; void *aux; void (*destroy) (void *aux); }; static bool can_destroy (void *can_); static struct ccase *can_translate (struct ccase *, void *can_); /* Creates and returns a new casereader whose cases are produced by reading from SUBREADER and appending an additional value, generated by FUNC. AUX is an optional parameter which gets passed to FUNC. FUNC will also receive N as it, which is the ordinal number of the case in the reader. DESTROY is an optional parameter used to destroy AUX. After this function is called, SUBREADER must not ever again be referenced directly. It will be destroyed automatically when the translating casereader is destroyed. */ struct casereader * casereader_create_append_numeric (struct casereader *subreader, new_value_func func, void *aux, void (*destroy) (void *aux)) { struct casereader_append_numeric *can = xmalloc (sizeof *can); can->proto = caseproto_ref (casereader_get_proto (subreader)); can->proto = caseproto_add_width (can->proto, 0); can->n = 0; can->aux = aux; can->func = func; can->destroy = destroy; return casereader_create_translator (subreader, can->proto, can_translate, can_destroy, can); } static struct ccase * can_translate (struct ccase *c, void *can_) { struct casereader_append_numeric *can = can_; double new_value = can->func (c, can->n++, can->aux); c = case_unshare_and_resize (c, can->proto); case_data_rw_idx (c, caseproto_get_n_widths (can->proto) - 1)->f = new_value; return c; } static bool can_destroy (void *can_) { struct casereader_append_numeric *can = can_; if (can->destroy) can->destroy (can->aux); caseproto_unref (can->proto); free (can); return true; } struct arithmetic_sequence { double first; double increment; }; static double next_arithmetic (const struct ccase *c UNUSED, casenumber n, void *aux) { struct arithmetic_sequence *as = aux; return n * as->increment + as->first; } /* Creates and returns a new casereader whose cases are produced by reading from SUBREADER and appending an additional value, which takes the value FIRST in the first case, FIRST + INCREMENT in the second case, FIRST + INCREMENT * 2 in the third case, and so on. After this function is called, SUBREADER must not ever again be referenced directly. It will be destroyed automatically when the translating casereader is destroyed. */ struct casereader * casereader_create_arithmetic_sequence (struct casereader *subreader, double first, double increment) { struct arithmetic_sequence *as = xzalloc (sizeof *as); as->first = first; as->increment = increment; return casereader_create_append_numeric (subreader, next_arithmetic, as, free); } struct casereader_append_rank { struct casereader *clone; casenumber n; const struct variable *var; const struct variable *weight; struct caseproto *proto; casenumber n_common; double mean_rank; double cc; distinct_func *distinct; void *aux; enum rank_error *err; double prev_value; }; static bool car_destroy (void *car_); static struct ccase *car_translate (struct ccase *input, void *car_); /* Creates and returns a new casereader whose cases are produced by reading from SUBREADER and appending an additional value, which is the rank of the observation. W is the weight variable of the dictionary containing V, or NULL if there is no weight variable. The following preconditions must be met: 1. SUBREADER must be sorted on V. 2. The weight variables, must be non-negative. If either of these preconditions are not satisfied, then the rank variables may not be correct. In this case, if ERR is non-null, it will be set according to the erroneous conditions encountered. If DISTINCT_CALLBACK is non-null, then it will be called exactly once for every case containing a distinct value of V. AUX is an auxiliary pointer passed to DISTINCT_CALLBACK. After this function is called, SUBREADER must not ever again be referenced directly. It will be destroyed automatically when the translating casereader is destroyed. */ struct casereader * casereader_create_append_rank (struct casereader *subreader, const struct variable *v, const struct variable *w, enum rank_error *err, distinct_func *distinct_callback, void *aux ) { struct casereader_append_rank *car = xmalloc (sizeof *car); car->proto = caseproto_ref (casereader_get_proto (subreader)); car->proto = caseproto_add_width (car->proto, 0); car->weight = w; car->var = v; car->n = 0; car->n_common = 1; car->cc = 0.0; car->clone = casereader_clone (subreader); car->distinct = distinct_callback; car->aux = aux; car->err = err; car->prev_value = SYSMIS; return casereader_create_translator (subreader, car->proto, car_translate, car_destroy, car); } static bool car_destroy (void *car_) { struct casereader_append_rank *car = car_; casereader_destroy (car->clone); caseproto_unref (car->proto); free (car); return true; } static struct ccase * car_translate (struct ccase *input, void *car_) { struct casereader_append_rank *car = car_; const double value = case_data (input, car->var)->f; if ( car->prev_value != SYSMIS) { if (car->err && value < car->prev_value) *car->err |= RANK_ERR_UNSORTED; } if ( car->n_common == 1) { double vxx = SYSMIS; casenumber k = 0; double weight = 1.0; if (car->weight) { weight = case_data (input, car->weight)->f; if ( car->err && weight < 0 ) *car->err |= RANK_ERR_NEGATIVE_WEIGHT; } do { struct ccase *c = casereader_peek (car->clone, car->n + ++k); if (c == NULL) break; vxx = case_data (c, car->var)->f; if ( vxx == value) { if (car->weight) { double w = case_data (c, car->weight)->f; if ( car->err && w < 0 ) *car->err |= RANK_ERR_NEGATIVE_WEIGHT; weight += w; } else weight += 1.0; car->n_common++; } case_unref (c); } while (vxx == value); car->mean_rank = car->cc + (weight + 1) / 2.0; car->cc += weight; if (car->distinct) car->distinct (value, car->n_common, weight, car->aux); } else car->n_common--; car->n++; input = case_unshare_and_resize (input, car->proto); case_data_rw_idx (input, caseproto_get_n_widths (car->proto) - 1)->f = car->mean_rank; car->prev_value = value; return input; } struct consolidator { const struct variable *key; const struct variable *weight; double cc; double prev_cc; casenumber n; struct casereader *clone; struct caseproto *proto; int direction; }; static bool uniquify (const struct ccase *c, void *aux) { struct consolidator *cdr = aux; const union value *current_value = case_data (c, cdr->key); const int key_width = var_get_width (cdr->key); const double weight = cdr->weight ? case_data (c, cdr->weight)->f : 1.0; struct ccase *next_case = casereader_peek (cdr->clone, cdr->n + 1); int dir = 0; cdr->n ++; cdr->cc += weight; if ( NULL == next_case) goto end; dir = value_compare_3way (case_data (next_case, cdr->key), current_value, key_width); case_unref (next_case); if ( dir != 0 ) { /* Insist that the data are sorted */ assert (cdr->direction == 0 || dir == cdr->direction); cdr->direction = dir; goto end; } return false; end: cdr->prev_cc = cdr->cc; cdr->cc = 0; return true; } static struct ccase * consolodate_weight (struct ccase *input, void *aux) { struct consolidator *cdr = aux; struct ccase *c; if (cdr->weight) { c = case_unshare (input); case_data_rw (c, cdr->weight)->f = cdr->prev_cc; } else { c = case_unshare_and_resize (input, cdr->proto); case_data_rw_idx (c, caseproto_get_n_widths (cdr->proto) - 1)->f = cdr->prev_cc; } return c; } static bool uniquify_destroy (void *aux) { struct consolidator *cdr = aux; casereader_destroy (cdr->clone); caseproto_unref (cdr->proto); free (cdr); return true; } /* Returns a new casereader which is based upon INPUT, but which contains a maximum of one case for each distinct value of KEY. If WEIGHT is non-null, then the new casereader's values for this variable will be the sum of all values matching KEY. IF WEIGHT is null, then the new casereader will have an additional numeric value appended, which will contain the total number of cases containing KEY. INPUT must be sorted on KEY */ struct casereader * casereader_create_distinct (struct casereader *input, const struct variable *key, const struct variable *weight) { struct casereader *u ; struct casereader *ud ; struct caseproto *output_proto = caseproto_ref (casereader_get_proto (input)); struct consolidator *cdr = xmalloc (sizeof (*cdr)); cdr->n = 0; cdr->key = key; cdr->weight = weight; cdr->cc = 0; cdr->clone = casereader_clone (input); cdr->direction = 0; if ( NULL == cdr->weight ) output_proto = caseproto_add_width (output_proto, 0); cdr->proto = output_proto; u = casereader_create_filter_func (input, uniquify, NULL, cdr, NULL); ud = casereader_create_translator (u, output_proto, consolodate_weight, uniquify_destroy, cdr); return ud; } pspp-1.0.1/src/data/data-in.h0000644000175000017500000000267513137223525012617 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_DATA_IN_H #define DATA_DATA_IN_H 1 #include #include "data/format.h" #include "libpspp/str.h" union value; struct dictionary; char *data_in (struct substring input, const char *input_encoding, enum fmt_type, union value *output, int width, const char *output_encoding); bool data_in_msg (struct substring input, const char *input_encoding, enum fmt_type, union value *output, int width, const char *output_encoding); void data_in_imply_decimals (struct substring input, const char *encoding, enum fmt_type format, int d, union value *output); #endif /* data/data-in.h */ pspp-1.0.1/src/data/sys-file-reader.c0000644000175000017500000034550513150617240014266 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-2000, 2006-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/sys-file-private.h" #include #include #include #include #include #include #include "data/any-reader.h" #include "data/attributes.h" #include "data/case.h" #include "data/casereader-provider.h" #include "data/casereader.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/file-name.h" #include "data/format.h" #include "data/identifier.h" #include "data/missing-values.h" #include "data/mrset.h" #include "data/short-names.h" #include "data/value-labels.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/ll.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "libpspp/stringi-set.h" #include "gl/c-strtod.h" #include "gl/c-ctype.h" #include "gl/inttostr.h" #include "gl/localcharset.h" #include "gl/minmax.h" #include "gl/unlocked-io.h" #include "gl/xalloc.h" #include "gl/xalloc-oversized.h" #include "gl/xsize.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) enum { /* subtypes 0-2 unknown */ EXT_INTEGER = 3, /* Machine integer info. */ EXT_FLOAT = 4, /* Machine floating-point info. */ EXT_VAR_SETS = 5, /* Variable sets. */ EXT_DATE = 6, /* DATE. */ EXT_MRSETS = 7, /* Multiple response sets. */ EXT_DATA_ENTRY = 8, /* SPSS Data Entry. */ /* subtype 9 unknown */ EXT_PRODUCT_INFO = 10, /* Extra product info text. */ EXT_DISPLAY = 11, /* Variable display parameters. */ /* subtype 12 unknown */ EXT_LONG_NAMES = 13, /* Long variable names. */ EXT_LONG_STRINGS = 14, /* Long strings. */ /* subtype 15 unknown */ EXT_NCASES = 16, /* Extended number of cases. */ EXT_FILE_ATTRS = 17, /* Data file attributes. */ EXT_VAR_ATTRS = 18, /* Variable attributes. */ EXT_MRSETS2 = 19, /* Multiple response sets (extended). */ EXT_ENCODING = 20, /* Character encoding. */ EXT_LONG_LABELS = 21, /* Value labels for long strings. */ EXT_LONG_MISSING = 22, /* Missing values for long strings. */ EXT_DATAVIEW = 24 /* "Format properties in dataview table". */ }; /* Fields from the top-level header record. */ struct sfm_header_record { char magic[5]; /* First 4 bytes of file, then null. */ int weight_idx; /* 0 if unweighted, otherwise a var index. */ int nominal_case_size; /* Number of var positions. */ /* These correspond to the members of struct any_file_info or a dictionary but in the system file's encoding rather than ASCII. */ char creation_date[10]; /* "dd mmm yy". */ char creation_time[9]; /* "hh:mm:ss". */ char eye_catcher[61]; /* Eye-catcher string, then product name. */ char file_label[65]; /* File label. */ }; struct sfm_var_record { off_t pos; int width; char name[9]; int print_format; int write_format; int missing_value_code; uint8_t missing[24]; char *label; struct variable *var; }; struct sfm_value_label { uint8_t value[8]; char *label; }; struct sfm_value_label_record { off_t pos; struct sfm_value_label *labels; unsigned int n_labels; int *vars; unsigned int n_vars; }; struct sfm_document_record { off_t pos; char *documents; size_t n_lines; }; struct sfm_mrset { const char *name; /* Name. */ const char *label; /* Human-readable label for group. */ enum mrset_type type; /* Group type. */ const char **vars; /* Constituent variables' names. */ size_t n_vars; /* Number of constituent variables. */ /* MRSET_MD only. */ enum mrset_md_cat_source cat_source; /* Source of category labels. */ bool label_from_var_label; /* 'label' taken from variable label? */ const char *counted; /* Counted value, as string. */ }; struct sfm_extension_record { struct ll ll; /* In struct sfm_reader 'var_attrs' list. */ int subtype; /* Record subtype. */ off_t pos; /* Starting offset in file. */ unsigned int size; /* Size of data elements. */ unsigned int count; /* Number of data elements. */ void *data; /* Contents. */ }; /* System file reader. */ struct sfm_reader { struct any_reader any_reader; /* Resource tracking. */ struct pool *pool; /* All system file state. */ /* File data. */ struct any_read_info info; struct sfm_header_record header; struct sfm_var_record *vars; size_t n_vars; struct sfm_value_label_record *labels; size_t n_labels; struct sfm_document_record *document; struct sfm_mrset *mrsets; size_t n_mrsets; struct sfm_extension_record *extensions[32]; struct ll_list var_attrs; /* Contains "struct sfm_extension_record"s. */ /* File state. */ struct file_handle *fh; /* File handle. */ struct fh_lock *lock; /* Mutual exclusion for file handle. */ FILE *file; /* File stream. */ off_t pos; /* Position in file. */ bool error; /* I/O or corruption error? */ struct caseproto *proto; /* Format of output cases. */ /* File format. */ enum integer_format integer_format; /* On-disk integer format. */ enum float_format float_format; /* On-disk floating point format. */ struct sfm_var *sfm_vars; /* Variables. */ size_t sfm_var_cnt; /* Number of variables. */ int case_cnt; /* Number of cases */ const char *encoding; /* String encoding. */ bool written_by_readstat; /* From https://github.com/WizardMac/ReadStat? */ /* Decompression. */ enum any_compression compression; double bias; /* Compression bias, usually 100.0. */ uint8_t opcodes[8]; /* Current block of opcodes. */ size_t opcode_idx; /* Next opcode to interpret, 8 if none left. */ bool corruption_warning; /* Warned about possible corruption? */ /* ZLIB decompression. */ long long int ztrailer_ofs; /* Offset of ZLIB trailer at end of file. */ #define ZIN_BUF_SIZE 4096 uint8_t *zin_buf; /* Inflation input buffer. */ #define ZOUT_BUF_SIZE 16384 uint8_t *zout_buf; /* Inflation output buffer. */ unsigned int zout_end; /* Number of bytes of data in zout_buf. */ unsigned int zout_pos; /* First unconsumed byte in zout_buf. */ z_stream zstream; /* ZLIB inflater. */ }; static const struct casereader_class sys_file_casereader_class; static struct sfm_reader * sfm_reader_cast (const struct any_reader *r_) { assert (r_->klass == &sys_file_reader_class); return UP_CAST (r_, struct sfm_reader, any_reader); } static bool sfm_close (struct any_reader *); static struct variable *lookup_var_by_index (struct sfm_reader *, off_t, const struct sfm_var_record *, size_t n, int idx); static void sys_msg (struct sfm_reader *r, off_t, int class, const char *format, va_list args) PRINTF_FORMAT (4, 0); static void sys_warn (struct sfm_reader *, off_t, const char *, ...) PRINTF_FORMAT (3, 4); static void sys_error (struct sfm_reader *, off_t, const char *, ...) PRINTF_FORMAT (3, 4); static bool read_bytes (struct sfm_reader *, void *, size_t) WARN_UNUSED_RESULT; static int try_read_bytes (struct sfm_reader *, void *, size_t) WARN_UNUSED_RESULT; static bool read_int (struct sfm_reader *, int *) WARN_UNUSED_RESULT; static bool read_uint (struct sfm_reader *, unsigned int *) WARN_UNUSED_RESULT; static bool read_int64 (struct sfm_reader *, long long int *) WARN_UNUSED_RESULT; static bool read_uint64 (struct sfm_reader *, unsigned long long int *) WARN_UNUSED_RESULT; static bool read_string (struct sfm_reader *, char *, size_t) WARN_UNUSED_RESULT; static bool skip_bytes (struct sfm_reader *, size_t) WARN_UNUSED_RESULT; /* ZLIB compressed data handling. */ static bool read_zheader (struct sfm_reader *) WARN_UNUSED_RESULT; static bool open_zstream (struct sfm_reader *) WARN_UNUSED_RESULT; static bool close_zstream (struct sfm_reader *) WARN_UNUSED_RESULT; static int read_bytes_zlib (struct sfm_reader *, void *, size_t) WARN_UNUSED_RESULT; static int read_compressed_bytes (struct sfm_reader *, void *, size_t) WARN_UNUSED_RESULT; static int try_read_compressed_bytes (struct sfm_reader *, void *, size_t) WARN_UNUSED_RESULT; static bool read_compressed_float (struct sfm_reader *, double *) WARN_UNUSED_RESULT; static char *fix_line_ends (const char *); static int parse_int (const struct sfm_reader *, const void *data, size_t ofs); static double parse_float (const struct sfm_reader *, const void *data, size_t ofs); static bool read_variable_record (struct sfm_reader *, struct sfm_var_record *); static bool read_value_label_record (struct sfm_reader *, struct sfm_value_label_record *); static bool read_document_record (struct sfm_reader *); static bool read_extension_record (struct sfm_reader *, int subtype, struct sfm_extension_record **); static bool skip_extension_record (struct sfm_reader *, int subtype); static struct text_record *open_text_record ( struct sfm_reader *, const struct sfm_extension_record *, bool recode_to_utf8); static void close_text_record (struct sfm_reader *, struct text_record *); static bool read_variable_to_value_pair (struct sfm_reader *, struct dictionary *, struct text_record *, struct variable **var, char **value); static void text_warn (struct sfm_reader *r, struct text_record *text, const char *format, ...) PRINTF_FORMAT (3, 4); static char *text_get_token (struct text_record *, struct substring delimiters, char *delimiter); static bool text_match (struct text_record *, char c); static bool text_read_variable_name (struct sfm_reader *, struct dictionary *, struct text_record *, struct substring delimiters, struct variable **); static bool text_read_short_name (struct sfm_reader *, struct dictionary *, struct text_record *, struct substring delimiters, struct variable **); static const char *text_parse_counted_string (struct sfm_reader *, struct text_record *); static size_t text_pos (const struct text_record *); static const char *text_get_all (const struct text_record *); /* Dictionary reader. */ enum which_format { PRINT_FORMAT, WRITE_FORMAT }; static bool read_dictionary (struct sfm_reader *); static bool read_record (struct sfm_reader *, int type, size_t *allocated_vars, size_t *allocated_labels); static bool read_header (struct sfm_reader *, struct any_read_info *, struct sfm_header_record *); static void parse_header (struct sfm_reader *, const struct sfm_header_record *, struct any_read_info *, struct dictionary *); static bool parse_variable_records (struct sfm_reader *, struct dictionary *, struct sfm_var_record *, size_t n); static void parse_format_spec (struct sfm_reader *, off_t pos, unsigned int format, enum which_format, struct variable *, int *format_warning_cnt); static void parse_document (struct dictionary *, struct sfm_document_record *); static void parse_display_parameters (struct sfm_reader *, const struct sfm_extension_record *, struct dictionary *); static bool parse_machine_integer_info (struct sfm_reader *, const struct sfm_extension_record *, struct any_read_info *); static void parse_machine_float_info (struct sfm_reader *, const struct sfm_extension_record *); static void parse_extra_product_info (struct sfm_reader *, const struct sfm_extension_record *, struct any_read_info *); static void parse_mrsets (struct sfm_reader *, const struct sfm_extension_record *, size_t *allocated_mrsets); static void decode_mrsets (struct sfm_reader *, struct dictionary *); static void parse_long_var_name_map (struct sfm_reader *, const struct sfm_extension_record *, struct dictionary *); static bool parse_long_string_map (struct sfm_reader *, const struct sfm_extension_record *, struct dictionary *); static bool parse_value_labels (struct sfm_reader *, struct dictionary *, const struct sfm_var_record *, size_t n_var_recs, const struct sfm_value_label_record *); static void parse_data_file_attributes (struct sfm_reader *, const struct sfm_extension_record *, struct dictionary *); static void parse_variable_attributes (struct sfm_reader *, const struct sfm_extension_record *, struct dictionary *); static void assign_variable_roles (struct sfm_reader *, struct dictionary *); static void parse_long_string_value_labels (struct sfm_reader *, const struct sfm_extension_record *, struct dictionary *); static void parse_long_string_missing_values ( struct sfm_reader *, const struct sfm_extension_record *, struct dictionary *); /* Frees the strings inside INFO. */ void any_read_info_destroy (struct any_read_info *info) { if (info) { free (info->creation_date); free (info->creation_time); free (info->product); free (info->product_ext); } } /* Tries to open FH for reading as a system file. Returns an sfm_reader if successful, otherwise NULL. */ static struct any_reader * sfm_open (struct file_handle *fh) { size_t allocated_mrsets = 0; struct sfm_reader *r; /* Create and initialize reader. */ r = xzalloc (sizeof *r); r->any_reader.klass = &sys_file_reader_class; r->pool = pool_create (); pool_register (r->pool, free, r); r->fh = fh_ref (fh); r->opcode_idx = sizeof r->opcodes; ll_init (&r->var_attrs); /* TRANSLATORS: this fragment will be interpolated into messages in fh_lock() that identify types of files. */ r->lock = fh_lock (fh, FH_REF_FILE, N_("system file"), FH_ACC_READ, false); if (r->lock == NULL) goto error; r->file = fn_open (fh, "rb"); if (r->file == NULL) { msg (ME, _("Error opening `%s' for reading as a system file: %s."), fh_get_file_name (r->fh), strerror (errno)); goto error; } if (!read_dictionary (r)) goto error; if (r->extensions[EXT_MRSETS] != NULL) parse_mrsets (r, r->extensions[EXT_MRSETS], &allocated_mrsets); if (r->extensions[EXT_MRSETS2] != NULL) parse_mrsets (r, r->extensions[EXT_MRSETS2], &allocated_mrsets); return &r->any_reader; error: if (r) sfm_close (&r->any_reader); return NULL; } static bool read_dictionary (struct sfm_reader *r) { size_t allocated_vars; size_t allocated_labels; if (!read_header (r, &r->info, &r->header)) return false; allocated_vars = 0; allocated_labels = 0; for (;;) { int type; if (!read_int (r, &type)) return false; if (type == 999) break; if (!read_record (r, type, &allocated_vars, &allocated_labels)) return false; } if (!skip_bytes (r, 4)) return false; if (r->compression == ANY_COMP_ZLIB && !read_zheader (r)) return false; return true; } static bool read_record (struct sfm_reader *r, int type, size_t *allocated_vars, size_t *allocated_labels) { int subtype; switch (type) { case 2: if (r->n_vars >= *allocated_vars) r->vars = pool_2nrealloc (r->pool, r->vars, allocated_vars, sizeof *r->vars); return read_variable_record (r, &r->vars[r->n_vars++]); case 3: if (r->n_labels >= *allocated_labels) r->labels = pool_2nrealloc (r->pool, r->labels, allocated_labels, sizeof *r->labels); return read_value_label_record (r, &r->labels[r->n_labels++]); case 4: /* A Type 4 record is always immediately after a type 3 record, so the code for type 3 records reads the type 4 record too. */ sys_error (r, r->pos, _("Misplaced type 4 record.")); return false; case 6: if (r->document != NULL) { sys_error (r, r->pos, _("Duplicate type 6 (document) record.")); return false; } return read_document_record (r); case 7: if (!read_int (r, &subtype)) return false; else if (subtype < 0 || subtype >= sizeof r->extensions / sizeof *r->extensions) { sys_warn (r, r->pos, _("Unrecognized record type 7, subtype %d. For help, " "please send this file to %s and mention that you were " "using %s."), subtype, PACKAGE_BUGREPORT, PACKAGE_STRING); return skip_extension_record (r, subtype); } else if (subtype == 18) { /* System files written by "Stata 14.1/-savespss- 1.77 by S.Radyakin" put each variable attribute into a separate record with subtype 18. I'm surprised that SPSS puts up with this. */ struct sfm_extension_record *ext; bool ok = read_extension_record (r, subtype, &ext); if (ok && ext) ll_push_tail (&r->var_attrs, &ext->ll); return ok; } else if (r->extensions[subtype] != NULL) { sys_warn (r, r->pos, _("Record type 7, subtype %d found here has the same " "type as the record found near offset 0x%llx. For " "help, please send this file to %s and mention that " "you were using %s."), subtype, (long long int) r->extensions[subtype]->pos, PACKAGE_BUGREPORT, PACKAGE_STRING); return skip_extension_record (r, subtype); } else return read_extension_record (r, subtype, &r->extensions[subtype]); default: sys_error (r, r->pos, _("Unrecognized record type %d."), type); return false; } NOT_REACHED (); } /* Returns the character encoding obtained from R, or a null pointer if R doesn't have an indication of its character encoding. */ static const char * sfm_get_encoding (const struct sfm_reader *r) { /* The EXT_ENCODING record is the best way to determine dictionary encoding. */ if (r->extensions[EXT_ENCODING]) return r->extensions[EXT_ENCODING]->data; /* But EXT_INTEGER is better than nothing as a fallback. */ if (r->extensions[EXT_INTEGER]) { int codepage = parse_int (r, r->extensions[EXT_INTEGER]->data, 7 * 4); const char *encoding; switch (codepage) { case 1: return "EBCDIC-US"; case 2: case 3: /* These ostensibly mean "7-bit ASCII" and "8-bit ASCII"[sic] respectively. However, many files have character code 2 but data which are clearly not ASCII. Therefore, ignore these values. */ break; case 4: return "MS_KANJI"; default: encoding = sys_get_encoding_from_codepage (codepage); if (encoding != NULL) return encoding; break; } } /* If the file magic number is EBCDIC then its character data is too. */ if (!strcmp (r->header.magic, EBCDIC_MAGIC)) return "EBCDIC-US"; return NULL; } struct get_strings_aux { struct pool *pool; char **titles; char **strings; bool *ids; size_t allocated; size_t n; }; static void add_string__ (struct get_strings_aux *aux, const char *string, bool id, char *title) { if (aux->n >= aux->allocated) { aux->allocated = 2 * (aux->allocated + 1); aux->titles = pool_realloc (aux->pool, aux->titles, aux->allocated * sizeof *aux->titles); aux->strings = pool_realloc (aux->pool, aux->strings, aux->allocated * sizeof *aux->strings); aux->ids = pool_realloc (aux->pool, aux->ids, aux->allocated * sizeof *aux->ids); } aux->titles[aux->n] = title; aux->strings[aux->n] = pool_strdup (aux->pool, string); aux->ids[aux->n] = id; aux->n++; } static void PRINTF_FORMAT (3, 4) add_string (struct get_strings_aux *aux, const char *string, const char *title, ...) { va_list args; va_start (args, title); add_string__ (aux, string, false, pool_vasprintf (aux->pool, title, args)); va_end (args); } static void PRINTF_FORMAT (3, 4) add_id (struct get_strings_aux *aux, const char *id, const char *title, ...) { va_list args; va_start (args, title); add_string__ (aux, id, true, pool_vasprintf (aux->pool, title, args)); va_end (args); } /* Retrieves significant string data from R in its raw format, to allow the caller to try to detect the encoding in use. Returns the number of strings retrieved N. Sets each of *TITLESP, *IDSP, and *STRINGSP to an array of N elements allocated from POOL. For each I in 0...N-1, UTF-8 string *TITLESP[I] describes *STRINGSP[I], which is in whatever encoding system file R uses. *IDS[I] is true if *STRINGSP[I] must be a valid PSPP language identifier, false if *STRINGSP[I] is free-form text. */ static size_t sfm_get_strings (const struct any_reader *r_, struct pool *pool, char ***titlesp, bool **idsp, char ***stringsp) { struct sfm_reader *r = sfm_reader_cast (r_); const struct sfm_mrset *mrset; struct get_strings_aux aux; size_t var_idx; size_t i, j, k; aux.pool = pool; aux.titles = NULL; aux.strings = NULL; aux.ids = NULL; aux.allocated = 0; aux.n = 0; var_idx = 0; for (i = 0; i < r->n_vars; i++) if (r->vars[i].width != -1) add_id (&aux, r->vars[i].name, _("Variable %zu"), ++var_idx); var_idx = 0; for (i = 0; i < r->n_vars; i++) if (r->vars[i].width != -1) { var_idx++; if (r->vars[i].label) add_string (&aux, r->vars[i].label, _("Variable %zu Label"), var_idx); } k = 0; for (i = 0; i < r->n_labels; i++) for (j = 0; j < r->labels[i].n_labels; j++) add_string (&aux, r->labels[i].labels[j].label, _("Value Label %zu"), k++); add_string (&aux, r->header.creation_date, _("Creation Date")); add_string (&aux, r->header.creation_time, _("Creation Time")); add_string (&aux, r->header.eye_catcher, _("Product")); add_string (&aux, r->header.file_label, _("File Label")); if (r->extensions[EXT_PRODUCT_INFO]) add_string (&aux, r->extensions[EXT_PRODUCT_INFO]->data, _("Extra Product Info")); if (r->document) { size_t i; for (i = 0; i < r->document->n_lines; i++) { char line[81]; memcpy (line, r->document->documents + i * 80, 80); line[80] = '\0'; add_string (&aux, line, _("Document Line %zu"), i + 1); } } for (mrset = r->mrsets; mrset < &r->mrsets[r->n_mrsets]; mrset++) { size_t mrset_idx = mrset - r->mrsets + 1; add_id (&aux, mrset->name, _("MRSET %zu"), mrset_idx); if (mrset->label[0]) add_string (&aux, mrset->label, _("MRSET %zu Label"), mrset_idx); /* Skip the variables because they ought to be duplicates. */ if (mrset->counted) add_string (&aux, mrset->counted, _("MRSET %zu Counted Value"), mrset_idx); } /* data file attributes */ /* variable attributes */ /* long var map */ /* long string value labels */ /* long string missing values */ *titlesp = aux.titles; *idsp = aux.ids; *stringsp = aux.strings; return aux.n; } /* Decodes the dictionary read from R, saving it into into *DICT. Character strings in R are decoded using ENCODING, or an encoding obtained from R if ENCODING is null, or the locale encoding if R specifies no encoding. If INFOP is non-null, then it receives additional info about the system file, which the caller must eventually free with any_read_info_destroy() when it is no longer needed. This function consumes R. The caller must use it again later, even to destroy it with sfm_close(). */ static struct casereader * sfm_decode (struct any_reader *r_, const char *encoding, struct dictionary **dictp, struct any_read_info *infop) { struct sfm_reader *r = sfm_reader_cast (r_); struct dictionary *dict; size_t i; if (encoding == NULL) { encoding = sfm_get_encoding (r); if (encoding == NULL) { sys_warn (r, -1, _("This system file does not indicate its own " "character encoding. Using default encoding " "%s. For best results, specify an encoding " "explicitly. Use SYSFILE INFO with " "ENCODING=\"DETECT\" to analyze the possible " "encodings."), locale_charset ()); encoding = locale_charset (); } } dict = dict_create (encoding); r->encoding = dict_get_encoding (dict); /* These records don't use variables at all. */ if (r->document != NULL) parse_document (dict, r->document); if (r->extensions[EXT_INTEGER] != NULL && !parse_machine_integer_info (r, r->extensions[EXT_INTEGER], &r->info)) goto error; if (r->extensions[EXT_FLOAT] != NULL) parse_machine_float_info (r, r->extensions[EXT_FLOAT]); if (r->extensions[EXT_PRODUCT_INFO] != NULL) parse_extra_product_info (r, r->extensions[EXT_PRODUCT_INFO], &r->info); if (r->extensions[EXT_FILE_ATTRS] != NULL) parse_data_file_attributes (r, r->extensions[EXT_FILE_ATTRS], dict); parse_header (r, &r->header, &r->info, dict); /* Parse the variable records, the basis of almost everything else. */ if (!parse_variable_records (r, dict, r->vars, r->n_vars)) goto error; /* Parse value labels and the weight variable immediately after the variable records. These records use indexes into var_recs[], so we must parse them before those indexes become invalidated by very long string variables. */ for (i = 0; i < r->n_labels; i++) if (!parse_value_labels (r, dict, r->vars, r->n_vars, &r->labels[i])) goto error; if (r->header.weight_idx != 0) { struct variable *weight_var; weight_var = lookup_var_by_index (r, 76, r->vars, r->n_vars, r->header.weight_idx); if (weight_var != NULL) { if (var_is_numeric (weight_var)) dict_set_weight (dict, weight_var); else sys_warn (r, -1, _("Ignoring string variable `%s' set " "as weighting variable."), var_get_name (weight_var)); } } if (r->extensions[EXT_DISPLAY] != NULL) parse_display_parameters (r, r->extensions[EXT_DISPLAY], dict); /* The following records use short names, so they need to be parsed before parse_long_var_name_map() changes short names to long names. */ decode_mrsets (r, dict); if (r->extensions[EXT_LONG_STRINGS] != NULL && !parse_long_string_map (r, r->extensions[EXT_LONG_STRINGS], dict)) goto error; /* Now rename variables to their long names. */ parse_long_var_name_map (r, r->extensions[EXT_LONG_NAMES], dict); /* The following records use long names, so they need to follow renaming. */ if (!ll_is_empty (&r->var_attrs)) { struct sfm_extension_record *ext; ll_for_each (ext, struct sfm_extension_record, ll, &r->var_attrs) parse_variable_attributes (r, ext, dict); /* Roles use the $@Role attribute. */ assign_variable_roles (r, dict); } if (r->extensions[EXT_LONG_LABELS] != NULL) parse_long_string_value_labels (r, r->extensions[EXT_LONG_LABELS], dict); if (r->extensions[EXT_LONG_MISSING] != NULL) parse_long_string_missing_values (r, r->extensions[EXT_LONG_MISSING], dict); /* Warn if the actual amount of data per case differs from the amount that the header claims. SPSS version 13 gets this wrong when very long strings are involved, so don't warn in that case. */ if (r->header.nominal_case_size > 0 && r->header.nominal_case_size != r->n_vars && r->info.version_major != 13) sys_warn (r, -1, _("File header claims %d variable positions but " "%zu were read from file."), r->header.nominal_case_size, r->n_vars); /* Create an index of dictionary variable widths for sfm_read_case to use. We cannot use the `struct variable's from the dictionary we created, because the caller owns the dictionary and may destroy or modify its variables. */ sfm_dictionary_to_sfm_vars (dict, &r->sfm_vars, &r->sfm_var_cnt); pool_register (r->pool, free, r->sfm_vars); r->proto = caseproto_ref_pool (dict_get_proto (dict), r->pool); *dictp = dict; if (infop) { *infop = r->info; memset (&r->info, 0, sizeof r->info); } return casereader_create_sequential (NULL, r->proto, r->case_cnt == -1 ? CASENUMBER_MAX: r->case_cnt, &sys_file_casereader_class, r); error: sfm_close (r_); dict_destroy (dict); *dictp = NULL; return NULL; } /* Closes R, which should have been returned by sfm_open() but not already closed with sfm_decode() or this function. Returns true if an I/O error has occurred on READER, false otherwise. */ static bool sfm_close (struct any_reader *r_) { struct sfm_reader *r = sfm_reader_cast (r_); bool error; if (r->file) { if (fn_close (r->fh, r->file) == EOF) { msg (ME, _("Error closing system file `%s': %s."), fh_get_file_name (r->fh), strerror (errno)); r->error = true; } r->file = NULL; } any_read_info_destroy (&r->info); fh_unlock (r->lock); fh_unref (r->fh); error = r->error; pool_destroy (r->pool); return !error; } /* Destroys READER. */ static void sys_file_casereader_destroy (struct casereader *reader UNUSED, void *r_) { struct sfm_reader *r = r_; sfm_close (&r->any_reader); } /* Detects whether FILE is an SPSS system file. Returns 1 if so, 0 if not, and a negative errno value if there is an error reading FILE. */ static int sfm_detect (FILE *file) { char magic[5]; if (fseek (file, 0, SEEK_SET) != 0) return -errno; if (fread (magic, 4, 1, file) != 1) return ferror (file) ? -errno : 0; magic[4] = '\0'; return (!strcmp (ASCII_MAGIC, magic) || !strcmp (ASCII_ZMAGIC, magic) || !strcmp (EBCDIC_MAGIC, magic)); } /* Reads the global header of the system file. Initializes *HEADER and *INFO, except for the string fields in *INFO, which parse_header() will initialize later once the file's encoding is known. */ static bool read_header (struct sfm_reader *r, struct any_read_info *info, struct sfm_header_record *header) { uint8_t raw_layout_code[4]; uint8_t raw_bias[8]; int compressed; bool zmagic; if (!read_string (r, header->magic, sizeof header->magic) || !read_string (r, header->eye_catcher, sizeof header->eye_catcher)) return false; r->written_by_readstat = strstr (header->eye_catcher, "https://github.com/WizardMac/ReadStat"); if (!strcmp (ASCII_MAGIC, header->magic) || !strcmp (EBCDIC_MAGIC, header->magic)) zmagic = false; else if (!strcmp (ASCII_ZMAGIC, header->magic)) zmagic = true; else { sys_error (r, 0, _("This is not an SPSS system file.")); return false; } /* Identify integer format. */ if (!read_bytes (r, raw_layout_code, sizeof raw_layout_code)) return false; if ((!integer_identify (2, raw_layout_code, sizeof raw_layout_code, &r->integer_format) && !integer_identify (3, raw_layout_code, sizeof raw_layout_code, &r->integer_format)) || (r->integer_format != INTEGER_MSB_FIRST && r->integer_format != INTEGER_LSB_FIRST)) { sys_error (r, 64, _("This is not an SPSS system file.")); return false; } if (!read_int (r, &header->nominal_case_size)) return false; if (header->nominal_case_size < 0 || header->nominal_case_size > INT_MAX / 16) header->nominal_case_size = -1; if (!read_int (r, &compressed)) return false; if (!zmagic) { if (compressed == 0) r->compression = ANY_COMP_NONE; else if (compressed == 1) r->compression = ANY_COMP_SIMPLE; else if (compressed != 0) { sys_error (r, 0, "System file header has invalid compression " "value %d.", compressed); return false; } } else { if (compressed == 2) r->compression = ANY_COMP_ZLIB; else { sys_error (r, 0, "ZLIB-compressed system file header has invalid " "compression value %d.", compressed); return false; } } if (!read_int (r, &header->weight_idx)) return false; if (!read_int (r, &r->case_cnt)) return false; if ( r->case_cnt > INT_MAX / 2) r->case_cnt = -1; /* Identify floating-point format and obtain compression bias. */ if (!read_bytes (r, raw_bias, sizeof raw_bias)) return false; if (float_identify (100.0, raw_bias, sizeof raw_bias, &r->float_format) == 0) { uint8_t zero_bias[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; if (memcmp (raw_bias, zero_bias, 8)) sys_warn (r, r->pos - 8, _("Compression bias is not the usual " "value of 100, or system file uses unrecognized " "floating-point format.")); else { /* Some software is known to write all-zeros to this field. Such software also writes floating-point numbers in the format that we expect by default (it seems that all software most likely does, in reality), so don't warn in this case. */ } if (r->integer_format == INTEGER_MSB_FIRST) r->float_format = FLOAT_IEEE_DOUBLE_BE; else r->float_format = FLOAT_IEEE_DOUBLE_LE; } float_convert (r->float_format, raw_bias, FLOAT_NATIVE_DOUBLE, &r->bias); if (!read_string (r, header->creation_date, sizeof header->creation_date) || !read_string (r, header->creation_time, sizeof header->creation_time) || !read_string (r, header->file_label, sizeof header->file_label) || !skip_bytes (r, 3)) return false; info->integer_format = r->integer_format; info->float_format = r->float_format; info->compression = r->compression; info->case_cnt = r->case_cnt; return true; } /* Reads a variable (type 2) record from R into RECORD. */ static bool read_variable_record (struct sfm_reader *r, struct sfm_var_record *record) { int has_variable_label; memset (record, 0, sizeof *record); record->pos = r->pos; if (!read_int (r, &record->width) || !read_int (r, &has_variable_label) || !read_int (r, &record->missing_value_code) || !read_int (r, &record->print_format) || !read_int (r, &record->write_format) || !read_string (r, record->name, sizeof record->name)) return false; if (has_variable_label == 1) { enum { MAX_LABEL_LEN = 65536 }; unsigned int len, read_len; if (!read_uint (r, &len)) return false; /* Read up to MAX_LABEL_LEN bytes of label. */ read_len = MIN (MAX_LABEL_LEN, len); record->label = pool_malloc (r->pool, read_len + 1); if (!read_string (r, record->label, read_len + 1)) return false; /* Skip unread label bytes. */ if (!skip_bytes (r, len - read_len)) return false; /* Skip label padding up to multiple of 4 bytes. */ if (!skip_bytes (r, ROUND_UP (len, 4) - len)) return false; } else if (has_variable_label != 0) { sys_error (r, record->pos, _("Variable label indicator field is not 0 or 1.")); return false; } /* Set missing values. */ if (record->missing_value_code != 0) { int code = record->missing_value_code; if (record->width == 0) { if (code < -3 || code > 3 || code == -1) { sys_error (r, record->pos, _("Numeric missing value indicator field is not " "-3, -2, 0, 1, 2, or 3.")); return false; } } else { if (code < 1 || code > 3) { sys_error (r, record->pos, _("String missing value indicator field is not " "0, 1, 2, or 3.")); return false; } } if (!read_bytes (r, record->missing, 8 * abs (code))) return false; } return true; } /* Reads value labels from R into RECORD. */ static bool read_value_label_record (struct sfm_reader *r, struct sfm_value_label_record *record) { size_t i; int type; /* Read type 3 record. */ record->pos = r->pos; if (!read_uint (r, &record->n_labels)) return false; if (record->n_labels > UINT_MAX / sizeof *record->labels) { sys_error (r, r->pos - 4, _("Invalid number of labels %u."), record->n_labels); return false; } record->labels = pool_nmalloc (r->pool, record->n_labels, sizeof *record->labels); for (i = 0; i < record->n_labels; i++) { struct sfm_value_label *label = &record->labels[i]; unsigned char label_len; size_t padded_len; if (!read_bytes (r, label->value, sizeof label->value)) return false; /* Read label length. */ if (!read_bytes (r, &label_len, sizeof label_len)) return false; padded_len = ROUND_UP (label_len + 1, 8); /* Read label, padding. */ label->label = pool_malloc (r->pool, padded_len + 1); if (!read_bytes (r, label->label, padded_len - 1)) return false; label->label[label_len] = '\0'; } /* Read record type of type 4 record. */ if (!read_int (r, &type)) return false; if (type != 4) { sys_error (r, r->pos - 4, _("Variable index record (type 4) does not immediately " "follow value label record (type 3) as it should.")); return false; } /* Read number of variables associated with value label from type 4 record. */ if (!read_uint (r, &record->n_vars)) return false; if (record->n_vars < 1 || record->n_vars > r->n_vars) { sys_error (r, r->pos - 4, _("Number of variables associated with a value label (%u) " "is not between 1 and the number of variables (%zu)."), record->n_vars, r->n_vars); return false; } record->vars = pool_nmalloc (r->pool, record->n_vars, sizeof *record->vars); for (i = 0; i < record->n_vars; i++) if (!read_int (r, &record->vars[i])) return false; return true; } /* Reads a document record from R. Returns true if successful, false on error. */ static bool read_document_record (struct sfm_reader *r) { int n_lines; if (!read_int (r, &n_lines)) return false; else if (n_lines == 0) return true; else if (n_lines < 0 || n_lines >= INT_MAX / DOC_LINE_LENGTH) { sys_error (r, r->pos, _("Number of document lines (%d) " "must be greater than 0 and less than %d."), n_lines, INT_MAX / DOC_LINE_LENGTH); return false; } struct sfm_document_record *record; record = pool_malloc (r->pool, sizeof *record); record->pos = r->pos; record->n_lines = n_lines; record->documents = pool_malloc (r->pool, DOC_LINE_LENGTH * n_lines); if (!read_bytes (r, record->documents, DOC_LINE_LENGTH * n_lines)) return false; r->document = record; return true; } static bool read_extension_record_header (struct sfm_reader *r, int subtype, struct sfm_extension_record *record) { record->subtype = subtype; record->pos = r->pos; if (!read_uint (r, &record->size) || !read_uint (r, &record->count)) return false; /* Check that SIZE * COUNT + 1 doesn't overflow. Adding 1 allows an extra byte for a null terminator, used by some extension processing routines. */ if (record->size != 0 && xsum (1, xtimes (record->count, record->size)) >= UINT_MAX) { sys_error (r, record->pos, "Record type 7 subtype %d too large.", subtype); return false; } return true; } /* Reads an extension record from R into RECORD. */ static bool read_extension_record (struct sfm_reader *r, int subtype, struct sfm_extension_record **recordp) { struct extension_record_type { int subtype; int size; int count; }; static const struct extension_record_type types[] = { /* Implemented record types. */ { EXT_INTEGER, 4, 8 }, { EXT_FLOAT, 8, 3 }, { EXT_MRSETS, 1, 0 }, { EXT_PRODUCT_INFO, 1, 0 }, { EXT_DISPLAY, 4, 0 }, { EXT_LONG_NAMES, 1, 0 }, { EXT_LONG_STRINGS, 1, 0 }, { EXT_NCASES, 8, 2 }, { EXT_FILE_ATTRS, 1, 0 }, { EXT_VAR_ATTRS, 1, 0 }, { EXT_MRSETS2, 1, 0 }, { EXT_ENCODING, 1, 0 }, { EXT_LONG_LABELS, 1, 0 }, { EXT_LONG_MISSING, 1, 0 }, /* Ignored record types. */ { EXT_VAR_SETS, 0, 0 }, { EXT_DATE, 0, 0 }, { EXT_DATA_ENTRY, 0, 0 }, { EXT_DATAVIEW, 0, 0 }, }; const struct extension_record_type *type; struct sfm_extension_record *record; size_t n_bytes; *recordp = NULL; record = pool_malloc (r->pool, sizeof *record); if (!read_extension_record_header (r, subtype, record)) return false; n_bytes = record->count * record->size; for (type = types; type < &types[sizeof types / sizeof *types]; type++) if (subtype == type->subtype) { if (type->size > 0 && record->size != type->size) sys_warn (r, record->pos, _("Record type 7, subtype %d has bad size %u " "(expected %d)."), subtype, record->size, type->size); else if (type->count > 0 && record->count != type->count) sys_warn (r, record->pos, _("Record type 7, subtype %d has bad count %u " "(expected %d)."), subtype, record->count, type->count); else if (type->count == 0 && type->size == 0) { /* Ignore this record. */ } else { char *data = pool_malloc (r->pool, n_bytes + 1); data[n_bytes] = '\0'; record->data = data; if (!read_bytes (r, record->data, n_bytes)) return false; *recordp = record; return true; } goto skip; } sys_warn (r, record->pos, _("Unrecognized record type 7, subtype %d. For help, please " "send this file to %s and mention that you were using %s."), subtype, PACKAGE_BUGREPORT, PACKAGE_STRING); skip: return skip_bytes (r, n_bytes); } static bool skip_extension_record (struct sfm_reader *r, int subtype) { struct sfm_extension_record record; return (read_extension_record_header (r, subtype, &record) && skip_bytes (r, record.count * record.size)); } static void parse_header (struct sfm_reader *r, const struct sfm_header_record *header, struct any_read_info *info, struct dictionary *dict) { const char *dict_encoding = dict_get_encoding (dict); struct substring product; struct substring label; char *fixed_label; /* Convert file label to UTF-8 and put it into DICT. */ label = recode_substring_pool ("UTF-8", dict_encoding, ss_cstr (header->file_label), r->pool); ss_trim (&label, ss_cstr (" ")); label.string[label.length] = '\0'; fixed_label = fix_line_ends (label.string); dict_set_label (dict, fixed_label); free (fixed_label); /* Put creation date and time in UTF-8 into INFO. */ info->creation_date = recode_string ("UTF-8", dict_encoding, header->creation_date, -1); info->creation_time = recode_string ("UTF-8", dict_encoding, header->creation_time, -1); /* Put product name into INFO, dropping eye-catcher string if present. */ product = recode_substring_pool ("UTF-8", dict_encoding, ss_cstr (header->eye_catcher), r->pool); ss_match_string (&product, ss_cstr ("@(#) SPSS DATA FILE")); ss_trim (&product, ss_cstr (" ")); info->product = ss_xstrdup (product); } /* Reads a variable (type 2) record from R and adds the corresponding variable to DICT. Also skips past additional variable records for long string variables. */ static bool parse_variable_records (struct sfm_reader *r, struct dictionary *dict, struct sfm_var_record *var_recs, size_t n_var_recs) { const char *dict_encoding = dict_get_encoding (dict); struct sfm_var_record *rec; int n_warnings = 0; for (rec = var_recs; rec < &var_recs[n_var_recs]; ) { struct variable *var; size_t n_values; char *name; size_t i; name = recode_string_pool ("UTF-8", dict_encoding, rec->name, -1, r->pool); name[strcspn (name, " ")] = '\0'; if (!dict_id_is_valid (dict, name, false) || name[0] == '$' || name[0] == '#') { sys_error (r, rec->pos, _("Invalid variable name `%s'."), name); return false; } if (rec->width < 0 || rec->width > 255) { sys_error (r, rec->pos, _("Bad width %d for variable %s."), rec->width, name); return false; } var = rec->var = dict_create_var (dict, name, rec->width); if (var == NULL) { char *new_name = dict_make_unique_var_name (dict, NULL, NULL); sys_warn (r, rec->pos, _("Renaming variable with duplicate name " "`%s' to `%s'."), name, new_name); var = rec->var = dict_create_var_assert (dict, new_name, rec->width); var_set_short_name (var, 0, new_name); free (new_name); } /* Set the short name the same as the long name (even if we renamed it). */ var_set_short_name (var, 0, var_get_name (var)); /* Get variable label, if any. */ if (rec->label) { char *utf8_label; utf8_label = recode_string_pool ("UTF-8", dict_encoding, rec->label, -1, r->pool); var_set_label (var, utf8_label); } /* Set missing values. */ if (rec->missing_value_code != 0) { int width = var_get_width (var); struct missing_values mv; mv_init_pool (r->pool, &mv, width); if (var_is_numeric (var)) { bool has_range = rec->missing_value_code < 0; int n_discrete = (has_range ? rec->missing_value_code == -3 : rec->missing_value_code); int ofs = 0; if (has_range) { double low = parse_float (r, rec->missing, 0); double high = parse_float (r, rec->missing, 8); /* Deal with SPSS 21 change in representation. */ if (low == SYSMIS) low = LOWEST; mv_add_range (&mv, low, high); ofs += 16; } for (i = 0; i < n_discrete; i++) { mv_add_num (&mv, parse_float (r, rec->missing, ofs)); ofs += 8; } } else for (i = 0; i < rec->missing_value_code; i++) mv_add_str (&mv, rec->missing + 8 * i, MIN (width, 8)); var_set_missing_values (var, &mv); } /* Set formats. */ parse_format_spec (r, rec->pos + 12, rec->print_format, PRINT_FORMAT, var, &n_warnings); parse_format_spec (r, rec->pos + 16, rec->write_format, WRITE_FORMAT, var, &n_warnings); /* Account for values. Skip long string continuation records, if any. */ n_values = rec->width == 0 ? 1 : DIV_RND_UP (rec->width, 8); for (i = 1; i < n_values; i++) if (i + (rec - var_recs) >= n_var_recs || rec[i].width != -1) { sys_error (r, rec->pos, _("Missing string continuation record.")); return false; } rec += n_values; } return true; } /* Translates the format spec from sysfile format to internal format. */ static void parse_format_spec (struct sfm_reader *r, off_t pos, unsigned int format, enum which_format which, struct variable *v, int *n_warnings) { const int max_warnings = 8; uint8_t raw_type = format >> 16; uint8_t w = format >> 8; uint8_t d = format; struct fmt_spec f; bool ok; f.w = w; f.d = d; msg_disable (); ok = (fmt_from_io (raw_type, &f.type) && fmt_check_output (&f) && fmt_check_width_compat (&f, var_get_width (v))); msg_enable (); if (ok) { if (which == PRINT_FORMAT) var_set_print_format (v, &f); else var_set_write_format (v, &f); } else if (format == 0) { /* Actually observed in the wild. No point in warning about it. */ } else if (++*n_warnings <= max_warnings) { if (which == PRINT_FORMAT) sys_warn (r, pos, _("Variable %s with width %d has invalid print " "format 0x%x."), var_get_name (v), var_get_width (v), format); else sys_warn (r, pos, _("Variable %s with width %d has invalid write " "format 0x%x."), var_get_name (v), var_get_width (v), format); if (*n_warnings == max_warnings) sys_warn (r, -1, _("Suppressing further invalid format warnings.")); } } static void parse_document (struct dictionary *dict, struct sfm_document_record *record) { const char *p; for (p = record->documents; p < record->documents + DOC_LINE_LENGTH * record->n_lines; p += DOC_LINE_LENGTH) { struct substring line; line = recode_substring_pool ("UTF-8", dict_get_encoding (dict), ss_buffer (p, DOC_LINE_LENGTH), NULL); ss_rtrim (&line, ss_cstr (" ")); line.string[line.length] = '\0'; dict_add_document_line (dict, line.string, false); ss_dealloc (&line); } } /* Parses record type 7, subtype 3. */ static bool parse_machine_integer_info (struct sfm_reader *r, const struct sfm_extension_record *record, struct any_read_info *info) { int float_representation, expected_float_format; int integer_representation, expected_integer_format; /* Save version info. */ info->version_major = parse_int (r, record->data, 0); info->version_minor = parse_int (r, record->data, 4); info->version_revision = parse_int (r, record->data, 8); /* Check floating point format. */ float_representation = parse_int (r, record->data, 16); if (r->float_format == FLOAT_IEEE_DOUBLE_BE || r->float_format == FLOAT_IEEE_DOUBLE_LE) expected_float_format = 1; else if (r->float_format == FLOAT_Z_LONG) expected_float_format = 2; else if (r->float_format == FLOAT_VAX_G || r->float_format == FLOAT_VAX_D) expected_float_format = 3; else NOT_REACHED (); if (float_representation != expected_float_format) { sys_error (r, record->pos, _("Floating-point representation indicated by " "system file (%d) differs from expected (%d)."), float_representation, expected_float_format); return false; } /* Check integer format. */ integer_representation = parse_int (r, record->data, 24); if (r->integer_format == INTEGER_MSB_FIRST) expected_integer_format = 1; else if (r->integer_format == INTEGER_LSB_FIRST) expected_integer_format = 2; else NOT_REACHED (); if (integer_representation != expected_integer_format) sys_warn (r, record->pos, _("Integer format indicated by system file (%d) " "differs from expected (%d)."), integer_representation, expected_integer_format); return true; } /* Parses record type 7, subtype 4. */ static void parse_machine_float_info (struct sfm_reader *r, const struct sfm_extension_record *record) { double sysmis = parse_float (r, record->data, 0); double highest = parse_float (r, record->data, 8); double lowest = parse_float (r, record->data, 16); if (sysmis != SYSMIS) sys_warn (r, record->pos, _("File specifies unexpected value %g (%a) as %s, " "instead of %g (%a)."), sysmis, sysmis, "SYSMIS", SYSMIS, SYSMIS); if (highest != HIGHEST) sys_warn (r, record->pos, _("File specifies unexpected value %g (%a) as %s, " "instead of %g (%a)."), highest, highest, "HIGHEST", HIGHEST, HIGHEST); /* SPSS before version 21 used a unique value just bigger than SYSMIS as LOWEST. SPSS 21 uses SYSMIS for LOWEST, which is OK because LOWEST only appears in a context (missing values) where SYSMIS cannot. */ if (lowest != LOWEST && lowest != SYSMIS) sys_warn (r, record->pos, _("File specifies unexpected value %g (%a) as %s, " "instead of %g (%a) or %g (%a)."), lowest, lowest, "LOWEST", LOWEST, LOWEST, SYSMIS, SYSMIS); } /* Parses record type 7, subtype 10. */ static void parse_extra_product_info (struct sfm_reader *r, const struct sfm_extension_record *record, struct any_read_info *info) { struct text_record *text; text = open_text_record (r, record, true); info->product_ext = fix_line_ends (text_get_all (text)); close_text_record (r, text); } /* Parses record type 7, subtype 7 or 19. */ static void parse_mrsets (struct sfm_reader *r, const struct sfm_extension_record *record, size_t *allocated_mrsets) { struct text_record *text; text = open_text_record (r, record, false); for (;;) { struct sfm_mrset *mrset; size_t allocated_vars; char delimiter; /* Skip extra line feeds if present. */ while (text_match (text, '\n')) continue; if (r->n_mrsets >= *allocated_mrsets) r->mrsets = pool_2nrealloc (r->pool, r->mrsets, allocated_mrsets, sizeof *r->mrsets); mrset = &r->mrsets[r->n_mrsets]; memset(mrset, 0, sizeof *mrset); mrset->name = text_get_token (text, ss_cstr ("="), NULL); if (mrset->name == NULL) break; if (text_match (text, 'C')) { mrset->type = MRSET_MC; if (!text_match (text, ' ')) { sys_warn (r, record->pos, _("Missing space following `%c' at offset %zu " "in MRSETS record."), 'C', text_pos (text)); break; } } else if (text_match (text, 'D')) { mrset->type = MRSET_MD; mrset->cat_source = MRSET_VARLABELS; } else if (text_match (text, 'E')) { char *number; mrset->type = MRSET_MD; mrset->cat_source = MRSET_COUNTEDVALUES; if (!text_match (text, ' ')) { sys_warn (r, record->pos, _("Missing space following `%c' at offset %zu " "in MRSETS record."), 'E', text_pos (text)); break; } number = text_get_token (text, ss_cstr (" "), NULL); if (!strcmp (number, "11")) mrset->label_from_var_label = true; else if (strcmp (number, "1")) sys_warn (r, record->pos, _("Unexpected label source value following `E' " "at offset %zu in MRSETS record."), text_pos (text)); } else { sys_warn (r, record->pos, _("Missing `C', `D', or `E' at offset %zu " "in MRSETS record."), text_pos (text)); break; } if (mrset->type == MRSET_MD) { mrset->counted = text_parse_counted_string (r, text); if (mrset->counted == NULL) break; } mrset->label = text_parse_counted_string (r, text); if (mrset->label == NULL) break; allocated_vars = 0; do { const char *var; var = text_get_token (text, ss_cstr (" \n"), &delimiter); if (var == NULL) { if (delimiter != '\n') sys_warn (r, record->pos, _("Missing new-line parsing variable names " "at offset %zu in MRSETS record."), text_pos (text)); break; } if (mrset->n_vars >= allocated_vars) mrset->vars = pool_2nrealloc (r->pool, mrset->vars, &allocated_vars, sizeof *mrset->vars); mrset->vars[mrset->n_vars++] = var; } while (delimiter != '\n'); r->n_mrsets++; } close_text_record (r, text); } static void decode_mrsets (struct sfm_reader *r, struct dictionary *dict) { const struct sfm_mrset *s; for (s = r->mrsets; s < &r->mrsets[r->n_mrsets]; s++) { struct stringi_set var_names; struct mrset *mrset; char *name; int width; size_t i; name = recode_string ("UTF-8", r->encoding, s->name, -1); if (!mrset_is_valid_name (name, dict_get_encoding (dict), false)) { sys_warn (r, -1, _("Invalid multiple response set name `%s'."), name); free (name); continue; } mrset = xzalloc (sizeof *mrset); mrset->name = name; mrset->type = s->type; mrset->cat_source = s->cat_source; mrset->label_from_var_label = s->label_from_var_label; if (s->label[0] != '\0') mrset->label = recode_string ("UTF-8", r->encoding, s->label, -1); stringi_set_init (&var_names); mrset->vars = xmalloc (s->n_vars * sizeof *mrset->vars); width = INT_MAX; for (i = 0; i < s->n_vars; i++) { struct variable *var; char *var_name; var_name = recode_string ("UTF-8", r->encoding, s->vars[i], -1); var = dict_lookup_var (dict, var_name); if (var == NULL) { free (var_name); continue; } if (!stringi_set_insert (&var_names, var_name)) { sys_warn (r, -1, _("MRSET %s contains duplicate variable name %s."), mrset->name, var_name); free (var_name); continue; } free (var_name); if (mrset->label == NULL && mrset->label_from_var_label && var_has_label (var)) mrset->label = xstrdup (var_get_label (var)); if (mrset->n_vars && var_get_type (var) != var_get_type (mrset->vars[0])) { sys_warn (r, -1, _("MRSET %s contains both string and " "numeric variables."), mrset->name); continue; } width = MIN (width, var_get_width (var)); mrset->vars[mrset->n_vars++] = var; } if (mrset->n_vars < 2) { if (mrset->n_vars == 0) sys_warn (r, -1, _("MRSET %s has no variables."), mrset->name); else sys_warn (r, -1, _("MRSET %s has only one variable."), mrset->name); mrset_destroy (mrset); stringi_set_destroy (&var_names); continue; } if (mrset->type == MRSET_MD) { mrset->width = width; value_init (&mrset->counted, width); if (width == 0) mrset->counted.f = c_strtod (s->counted, NULL); else value_copy_str_rpad (&mrset->counted, width, (const uint8_t *) s->counted, ' '); } dict_add_mrset (dict, mrset); stringi_set_destroy (&var_names); } } /* Read record type 7, subtype 11, which specifies how variables should be displayed in GUI environments. */ static void parse_display_parameters (struct sfm_reader *r, const struct sfm_extension_record *record, struct dictionary *dict) { bool includes_width; bool warned = false; size_t n_vars; size_t ofs; size_t i; n_vars = dict_get_var_cnt (dict); if (record->count == 3 * n_vars) includes_width = true; else if (record->count == 2 * n_vars) includes_width = false; else { sys_warn (r, record->pos, _("Extension 11 has bad count %u (for %zu variables)."), record->count, n_vars); return; } ofs = 0; for (i = 0; i < n_vars; ++i) { struct variable *v = dict_get_var (dict, i); int measure, width, align; measure = parse_int (r, record->data, ofs); ofs += 4; if (includes_width) { width = parse_int (r, record->data, ofs); ofs += 4; } else width = 0; align = parse_int (r, record->data, ofs); ofs += 4; /* SPSS sometimes seems to set variables' measure to zero. */ if (0 == measure) measure = 1; if (measure < 1 || measure > 3 || align < 0 || align > 2) { if (!warned) sys_warn (r, record->pos, _("Invalid variable display parameters for variable " "%zu (%s). Default parameters substituted."), i, var_get_name (v)); warned = true; continue; } var_set_measure (v, (measure == 1 ? MEASURE_NOMINAL : measure == 2 ? MEASURE_ORDINAL : MEASURE_SCALE)); var_set_alignment (v, (align == 0 ? ALIGN_LEFT : align == 1 ? ALIGN_RIGHT : ALIGN_CENTRE)); /* Older versions (SPSS 9.0) sometimes set the display width to zero. This causes confusion in the GUI, so only set the width if it is nonzero. */ if (width > 0) var_set_display_width (v, width); } } static void rename_var_and_save_short_names (struct sfm_reader *r, off_t pos, struct dictionary *dict, struct variable *var, const char *new_name) { size_t n_short_names; char **short_names; size_t i; /* Renaming a variable may clear its short names, but we want to retain them, so we save them and re-set them afterward. */ n_short_names = var_get_short_name_cnt (var); short_names = xnmalloc (n_short_names, sizeof *short_names); for (i = 0; i < n_short_names; i++) { const char *s = var_get_short_name (var, i); short_names[i] = s != NULL ? xstrdup (s) : NULL; } /* Set long name. */ if (!dict_try_rename_var (dict, var, new_name)) sys_warn (r, pos, _("Duplicate long variable name `%s'."), new_name); /* Restore short names. */ for (i = 0; i < n_short_names; i++) { var_set_short_name (var, i, short_names[i]); free (short_names[i]); } free (short_names); } /* Parses record type 7, subtype 13, which gives the long name that corresponds to each short name. Modifies variable names in DICT accordingly. */ static void parse_long_var_name_map (struct sfm_reader *r, const struct sfm_extension_record *record, struct dictionary *dict) { struct text_record *text; struct variable *var; char *long_name; if (record == NULL) { /* There are no long variable names. Use the short variable names, converted to lowercase, as the long variable names. */ size_t i; for (i = 0; i < dict_get_var_cnt (dict); i++) { struct variable *var = dict_get_var (dict, i); char *new_name; new_name = utf8_to_lower (var_get_name (var)); rename_var_and_save_short_names (r, -1, dict, var, new_name); free (new_name); } return; } /* Rename each of the variables, one by one. (In a correctly constructed system file, this cannot create any intermediate duplicate variable names, because all of the new variable names are longer than any of the old variable names and thus there cannot be any overlaps.) */ text = open_text_record (r, record, true); while (read_variable_to_value_pair (r, dict, text, &var, &long_name)) { /* Validate long name. */ if (!dict_id_is_valid (dict, long_name, false) || long_name[0] == '$' || long_name[0] == '#') { sys_warn (r, record->pos, _("Long variable mapping from %s to invalid " "variable name `%s'."), var_get_name (var), long_name); continue; } rename_var_and_save_short_names (r, record->pos, dict, var, long_name); } close_text_record (r, text); } /* Reads record type 7, subtype 14, which gives the real length of each very long string. Rearranges DICT accordingly. */ static bool parse_long_string_map (struct sfm_reader *r, const struct sfm_extension_record *record, struct dictionary *dict) { struct text_record *text; struct variable *var; char *length_s; text = open_text_record (r, record, true); while (read_variable_to_value_pair (r, dict, text, &var, &length_s)) { size_t idx = var_get_dict_index (var); long int length; int segment_cnt; int i; /* Get length. */ length = strtol (length_s, NULL, 10); if (length < 1 || length > MAX_STRING) { sys_warn (r, record->pos, _("%s listed as string of invalid length %s " "in very long string record."), var_get_name (var), length_s); continue; } /* Check segments. */ segment_cnt = sfm_width_to_segments (length); if (segment_cnt == 1) { sys_warn (r, record->pos, _("%s listed in very long string record with width %s, " "which requires only one segment."), var_get_name (var), length_s); continue; } if (idx + segment_cnt > dict_get_var_cnt (dict)) { sys_error (r, record->pos, _("Very long string %s overflows dictionary."), var_get_name (var)); return false; } /* Get the short names from the segments and check their lengths. */ for (i = 0; i < segment_cnt; i++) { struct variable *seg = dict_get_var (dict, idx + i); int alloc_width = sfm_segment_alloc_width (length, i); int width = var_get_width (seg); if (i > 0) var_set_short_name (var, i, var_get_short_name (seg, 0)); if (ROUND_UP (width, 8) != ROUND_UP (alloc_width, 8)) { sys_error (r, record->pos, _("Very long string with width %ld has segment %d " "of width %d (expected %d)."), length, i, width, alloc_width); return false; } } dict_delete_consecutive_vars (dict, idx + 1, segment_cnt - 1); var_set_width (var, length); } close_text_record (r, text); dict_compact_values (dict); return true; } static bool parse_value_labels (struct sfm_reader *r, struct dictionary *dict, const struct sfm_var_record *var_recs, size_t n_var_recs, const struct sfm_value_label_record *record) { struct variable **vars; char **utf8_labels; size_t i; utf8_labels = pool_nmalloc (r->pool, record->n_labels, sizeof *utf8_labels); for (i = 0; i < record->n_labels; i++) utf8_labels[i] = recode_string_pool ("UTF-8", dict_get_encoding (dict), record->labels[i].label, -1, r->pool); vars = pool_nmalloc (r->pool, record->n_vars, sizeof *vars); for (i = 0; i < record->n_vars; i++) { vars[i] = lookup_var_by_index (r, record->pos, var_recs, n_var_recs, record->vars[i]); if (vars[i] == NULL) return false; } for (i = 1; i < record->n_vars; i++) if (var_get_type (vars[i]) != var_get_type (vars[0])) { sys_error (r, record->pos, _("Variables associated with value label are not all of " "identical type. Variable %s is %s, but variable " "%s is %s."), var_get_name (vars[0]), var_is_numeric (vars[0]) ? _("numeric") : _("string"), var_get_name (vars[i]), var_is_numeric (vars[i]) ? _("numeric") : _("string")); return false; } for (i = 0; i < record->n_vars; i++) { struct variable *var = vars[i]; int width; size_t j; width = var_get_width (var); if (width > 8) { sys_error (r, record->pos, _("Value labels may not be added to long string " "variables (e.g. %s) using records types 3 and 4."), var_get_name (var)); return false; } for (j = 0; j < record->n_labels; j++) { struct sfm_value_label *label = &record->labels[j]; union value value; value_init (&value, width); if (width == 0) value.f = parse_float (r, label->value, 0); else memcpy (value_str_rw (&value, width), label->value, width); if (!var_add_value_label (var, &value, utf8_labels[j])) { if (r->written_by_readstat) { /* Ignore the problem. ReadStat is buggy and emits value labels whose values are longer than string variables' widths, that are identical in the actual width of the variable, e.g. both values "ABC123" and "ABC456" for a string variable with width 3. */ } else if (var_is_numeric (var)) sys_warn (r, record->pos, _("Duplicate value label for %g on %s."), value.f, var_get_name (var)); else sys_warn (r, record->pos, _("Duplicate value label for `%.*s' on %s."), width, value_str (&value, width), var_get_name (var)); } value_destroy (&value, width); } } pool_free (r->pool, vars); for (i = 0; i < record->n_labels; i++) pool_free (r->pool, utf8_labels[i]); pool_free (r->pool, utf8_labels); return true; } static struct variable * lookup_var_by_index (struct sfm_reader *r, off_t offset, const struct sfm_var_record *var_recs, size_t n_var_recs, int idx) { const struct sfm_var_record *rec; if (idx < 1 || idx > n_var_recs) { sys_error (r, offset, _("Variable index %d not in valid range 1...%zu."), idx, n_var_recs); return NULL; } rec = &var_recs[idx - 1]; if (rec->var == NULL) { sys_error (r, offset, _("Variable index %d refers to long string continuation."), idx); return NULL; } return rec->var; } /* Parses a set of custom attributes from TEXT into ATTRS. ATTRS may be a null pointer, in which case the attributes are read but discarded. */ static void parse_attributes (struct sfm_reader *r, struct text_record *text, struct attrset *attrs) { do { struct attribute *attr; char *key; int index; /* Parse the key. */ key = text_get_token (text, ss_cstr ("("), NULL); if (key == NULL) return; attr = attribute_create (key); for (index = 1; ; index++) { /* Parse the value. */ char *value; size_t length; value = text_get_token (text, ss_cstr ("\n"), NULL); if (value == NULL) { text_warn (r, text, _("Error parsing attribute value %s[%d]."), key, index); break; } length = strlen (value); if (length >= 2 && value[0] == '\'' && value[length - 1] == '\'') { value[length - 1] = '\0'; attribute_add_value (attr, value + 1); } else { text_warn (r, text, _("Attribute value %s[%d] is not quoted: %s."), key, index, value); attribute_add_value (attr, value); } /* Was this the last value for this attribute? */ if (text_match (text, ')')) break; } if (attrs != NULL) { if (!attrset_try_add (attrs, attr)) { text_warn (r, text, _("Duplicate attribute %s."), attribute_get_name (attr)); attribute_destroy (attr); } } else attribute_destroy (attr); } while (!text_match (text, '/')); } /* Reads record type 7, subtype 17, which lists custom attributes on the data file. */ static void parse_data_file_attributes (struct sfm_reader *r, const struct sfm_extension_record *record, struct dictionary *dict) { struct text_record *text = open_text_record (r, record, true); parse_attributes (r, text, dict_get_attributes (dict)); close_text_record (r, text); } /* Parses record type 7, subtype 18, which lists custom attributes on individual variables. */ static void parse_variable_attributes (struct sfm_reader *r, const struct sfm_extension_record *record, struct dictionary *dict) { struct text_record *text; struct variable *var; text = open_text_record (r, record, true); while (text_read_variable_name (r, dict, text, ss_cstr (":"), &var)) parse_attributes (r, text, var != NULL ? var_get_attributes (var) : NULL); close_text_record (r, text); } static void assign_variable_roles (struct sfm_reader *r, struct dictionary *dict) { size_t n_warnings = 0; size_t i; for (i = 0; i < dict_get_var_cnt (dict); i++) { struct variable *var = dict_get_var (dict, i); struct attrset *attrs = var_get_attributes (var); const struct attribute *attr = attrset_lookup (attrs, "$@Role"); if (attr != NULL) { int value = atoi (attribute_get_value (attr, 0)); enum var_role role; switch (value) { case 0: role = ROLE_INPUT; break; case 1: role = ROLE_TARGET; break; case 2: role = ROLE_BOTH; break; case 3: role = ROLE_NONE; break; case 4: role = ROLE_PARTITION; break; case 5: role = ROLE_SPLIT; break; default: role = ROLE_INPUT; if (n_warnings++ == 0) sys_warn (r, -1, _("Invalid role for variable %s."), var_get_name (var)); } var_set_role (var, role); } } if (n_warnings > 1) sys_warn (r, -1, _("%zu other variables had invalid roles."), n_warnings - 1); } static bool check_overflow (struct sfm_reader *r, const struct sfm_extension_record *record, size_t ofs, size_t length) { size_t end = record->size * record->count; if (length >= end || ofs + length > end) { sys_warn (r, record->pos + end, _("Extension record subtype %d ends unexpectedly."), record->subtype); return false; } return true; } static void parse_long_string_value_labels (struct sfm_reader *r, const struct sfm_extension_record *record, struct dictionary *dict) { const char *dict_encoding = dict_get_encoding (dict); size_t end = record->size * record->count; size_t ofs = 0; while (ofs < end) { char *var_name; size_t n_labels, i; struct variable *var; union value value; int var_name_len; int width; /* Parse variable name length. */ if (!check_overflow (r, record, ofs, 4)) return; var_name_len = parse_int (r, record->data, ofs); ofs += 4; /* Parse variable name, width, and number of labels. */ if (!check_overflow (r, record, ofs, var_name_len) || !check_overflow (r, record, ofs, var_name_len + 8)) return; var_name = recode_string_pool ("UTF-8", dict_encoding, (const char *) record->data + ofs, var_name_len, r->pool); width = parse_int (r, record->data, ofs + var_name_len); n_labels = parse_int (r, record->data, ofs + var_name_len + 4); ofs += var_name_len + 8; /* Look up 'var' and validate. */ var = dict_lookup_var (dict, var_name); if (var == NULL) sys_warn (r, record->pos + ofs, _("Ignoring long string value label record for " "unknown variable %s."), var_name); else if (var_is_numeric (var)) { sys_warn (r, record->pos + ofs, _("Ignoring long string value label record for " "numeric variable %s."), var_name); var = NULL; } else if (width != var_get_width (var)) { sys_warn (r, record->pos + ofs, _("Ignoring long string value label record for variable " "%s because the record's width (%d) does not match the " "variable's width (%d)."), var_name, width, var_get_width (var)); var = NULL; } /* Parse values. */ value_init_pool (r->pool, &value, width); for (i = 0; i < n_labels; i++) { size_t value_length, label_length; bool skip = var == NULL; /* Parse value length. */ if (!check_overflow (r, record, ofs, 4)) return; value_length = parse_int (r, record->data, ofs); ofs += 4; /* Parse value. */ if (!check_overflow (r, record, ofs, value_length)) return; if (!skip) { if (value_length == width) memcpy (value_str_rw (&value, width), (const uint8_t *) record->data + ofs, width); else { sys_warn (r, record->pos + ofs, _("Ignoring long string value label %zu for " "variable %s, with width %d, that has bad value " "width %zu."), i, var_get_name (var), width, value_length); skip = true; } } ofs += value_length; /* Parse label length. */ if (!check_overflow (r, record, ofs, 4)) return; label_length = parse_int (r, record->data, ofs); ofs += 4; /* Parse label. */ if (!check_overflow (r, record, ofs, label_length)) return; if (!skip) { char *label; label = recode_string_pool ("UTF-8", dict_encoding, (const char *) record->data + ofs, label_length, r->pool); if (!var_add_value_label (var, &value, label)) sys_warn (r, record->pos + ofs, _("Duplicate value label for `%.*s' on %s."), width, value_str (&value, width), var_get_name (var)); pool_free (r->pool, label); } ofs += label_length; } } } static void parse_long_string_missing_values (struct sfm_reader *r, const struct sfm_extension_record *record, struct dictionary *dict) { const char *dict_encoding = dict_get_encoding (dict); size_t end = record->size * record->count; size_t ofs = 0; while (ofs < end) { struct missing_values mv; char *var_name; struct variable *var; int n_missing_values; int var_name_len; size_t i; /* Parse variable name length. */ if (!check_overflow (r, record, ofs, 4)) return; var_name_len = parse_int (r, record->data, ofs); ofs += 4; /* Parse variable name. */ if (!check_overflow (r, record, ofs, var_name_len) || !check_overflow (r, record, ofs, var_name_len + 1)) return; var_name = recode_string_pool ("UTF-8", dict_encoding, (const char *) record->data + ofs, var_name_len, r->pool); ofs += var_name_len; /* Parse number of missing values. */ n_missing_values = ((const uint8_t *) record->data)[ofs]; if (n_missing_values < 1 || n_missing_values > 3) sys_warn (r, record->pos + ofs, _("Long string missing values record says variable %s " "has %d missing values, but only 1 to 3 missing values " "are allowed."), var_name, n_missing_values); ofs++; /* Look up 'var' and validate. */ var = dict_lookup_var (dict, var_name); if (var == NULL) sys_warn (r, record->pos + ofs, _("Ignoring long string missing value record for " "unknown variable %s."), var_name); else if (var_is_numeric (var)) { sys_warn (r, record->pos + ofs, _("Ignoring long string missing value record for " "numeric variable %s."), var_name); var = NULL; } /* Parse values. */ mv_init_pool (r->pool, &mv, var ? var_get_width (var) : 8); for (i = 0; i < n_missing_values; i++) { size_t value_length; /* Parse value length. */ if (!check_overflow (r, record, ofs, 4)) return; value_length = parse_int (r, record->data, ofs); ofs += 4; /* Parse value. */ if (!check_overflow (r, record, ofs, value_length)) return; if (var != NULL && i < 3 && !mv_add_str (&mv, (const uint8_t *) record->data + ofs, value_length)) sys_warn (r, record->pos + ofs, _("Ignoring long string missing value %zu for variable " "%s, with width %d, that has bad value width %zu."), i, var_get_name (var), var_get_width (var), value_length); ofs += value_length; } if (var != NULL) var_set_missing_values (var, &mv); } } /* Case reader. */ static void partial_record (struct sfm_reader *); static void read_error (struct casereader *, const struct sfm_reader *); static bool read_case_number (struct sfm_reader *, double *); static int read_case_string (struct sfm_reader *, uint8_t *, size_t); static int read_opcode (struct sfm_reader *); static bool read_compressed_number (struct sfm_reader *, double *); static int read_compressed_string (struct sfm_reader *, uint8_t *); static int read_whole_strings (struct sfm_reader *, uint8_t *, size_t); static bool skip_whole_strings (struct sfm_reader *, size_t); /* Reads and returns one case from READER's file. Returns a null pointer if not successful. */ static struct ccase * sys_file_casereader_read (struct casereader *reader, void *r_) { struct sfm_reader *r = r_; struct ccase *c; int retval; int i; if (r->error || !r->sfm_var_cnt) return NULL; c = case_create (r->proto); for (i = 0; i < r->sfm_var_cnt; i++) { struct sfm_var *sv = &r->sfm_vars[i]; union value *v = case_data_rw_idx (c, sv->case_index); if (sv->var_width == 0) retval = read_case_number (r, &v->f); else { uint8_t *s = value_str_rw (v, sv->var_width); retval = read_case_string (r, s + sv->offset, sv->segment_width); if (retval == 1) { retval = skip_whole_strings (r, ROUND_DOWN (sv->padding, 8)); if (retval == 0) sys_error (r, r->pos, _("File ends in partial string value.")); } } if (retval != 1) goto eof; } return c; eof: if (i != 0) partial_record (r); if (r->case_cnt != -1) read_error (reader, r); case_unref (c); return NULL; } /* Issues an error that R ends in a partial record. */ static void partial_record (struct sfm_reader *r) { sys_error (r, r->pos, _("File ends in partial case.")); } /* Issues an error that an unspecified error occurred SFM, and marks R tainted. */ static void read_error (struct casereader *r, const struct sfm_reader *sfm) { msg (ME, _("Error reading case from file %s."), fh_get_name (sfm->fh)); casereader_force_error (r); } /* Reads a number from R and stores its value in *D. If R is compressed, reads a compressed number; otherwise, reads a number in the regular way. Returns true if successful, false if end of file is reached immediately. */ static bool read_case_number (struct sfm_reader *r, double *d) { if (r->compression == ANY_COMP_NONE) { uint8_t number[8]; if (!try_read_bytes (r, number, sizeof number)) return false; float_convert (r->float_format, number, FLOAT_NATIVE_DOUBLE, d); return true; } else return read_compressed_number (r, d); } /* Reads LENGTH string bytes from R into S. Always reads a multiple of 8 bytes; if LENGTH is not a multiple of 8, then extra bytes are read and discarded without being written to S. Reads compressed strings if S is compressed. Returns 1 if successful, 0 if end of file is reached immediately, or -1 for some kind of error. */ static int read_case_string (struct sfm_reader *r, uint8_t *s, size_t length) { size_t whole = ROUND_DOWN (length, 8); size_t partial = length % 8; if (whole) { int retval = read_whole_strings (r, s, whole); if (retval != 1) return retval; } if (partial) { uint8_t bounce[8]; int retval = read_whole_strings (r, bounce, sizeof bounce); if (retval == -1) return -1; else if (!retval) { if (whole) { partial_record (r); return -1; } return 0; } memcpy (s + whole, bounce, partial); } return 1; } /* Reads and returns the next compression opcode from R. */ static int read_opcode (struct sfm_reader *r) { assert (r->compression != ANY_COMP_NONE); for (;;) { int opcode; if (r->opcode_idx >= sizeof r->opcodes) { int retval = try_read_compressed_bytes (r, r->opcodes, sizeof r->opcodes); if (retval != 1) return -1; r->opcode_idx = 0; } opcode = r->opcodes[r->opcode_idx++]; if (opcode != 0) return opcode; } } /* Reads a compressed number from R and stores its value in D. Returns true if successful, false if end of file is reached immediately. */ static bool read_compressed_number (struct sfm_reader *r, double *d) { int opcode = read_opcode (r); switch (opcode) { case -1: case 252: return false; case 253: return read_compressed_float (r, d); case 254: float_convert (r->float_format, " ", FLOAT_NATIVE_DOUBLE, d); if (!r->corruption_warning) { r->corruption_warning = true; sys_warn (r, r->pos, _("Possible compressed data corruption: " "compressed spaces appear in numeric field.")); } break; case 255: *d = SYSMIS; break; default: *d = opcode - r->bias; break; } return true; } /* Reads a compressed 8-byte string segment from R and stores it in DST. */ static int read_compressed_string (struct sfm_reader *r, uint8_t *dst) { int opcode; int retval; opcode = read_opcode (r); switch (opcode) { case -1: case 252: return 0; case 253: retval = read_compressed_bytes (r, dst, 8); return retval == 1 ? 1 : -1; case 254: memset (dst, ' ', 8); return 1; default: { double value = opcode - r->bias; float_convert (FLOAT_NATIVE_DOUBLE, &value, r->float_format, dst); if (value == 0.0) { /* This has actually been seen "in the wild". The submitter of the file that showed that the contents decoded as spaces, but they were at the end of the field so it's possible that the null bytes just acted as null terminators. */ } else if (!r->corruption_warning) { r->corruption_warning = true; sys_warn (r, r->pos, _("Possible compressed data corruption: " "string contains compressed integer (opcode %d)."), opcode); } } return 1; } } /* Reads LENGTH string bytes from R into S. LENGTH must be a multiple of 8. Reads compressed strings if S is compressed. Returns 1 if successful, 0 if end of file is reached immediately, or -1 for some kind of error. */ static int read_whole_strings (struct sfm_reader *r, uint8_t *s, size_t length) { assert (length % 8 == 0); if (r->compression == ANY_COMP_NONE) return try_read_bytes (r, s, length); else { size_t ofs; for (ofs = 0; ofs < length; ofs += 8) { int retval = read_compressed_string (r, s + ofs); if (retval != 1) { if (ofs != 0) { partial_record (r); return -1; } return retval; } } return 1; } } /* Skips LENGTH string bytes from R. LENGTH must be a multiple of 8. (LENGTH is also limited to 1024, but that's only because the current caller never needs more than that many bytes.) Returns true if successful, false if end of file is reached immediately. */ static bool skip_whole_strings (struct sfm_reader *r, size_t length) { uint8_t buffer[1024]; assert (length < sizeof buffer); return read_whole_strings (r, buffer, length); } /* Helpers for reading records that contain structured text strings. */ /* Maximum number of warnings to issue for a single text record. */ #define MAX_TEXT_WARNINGS 5 /* State. */ struct text_record { struct substring buffer; /* Record contents. */ off_t start; /* Starting offset in file. */ size_t pos; /* Current position in buffer. */ int n_warnings; /* Number of warnings issued or suppressed. */ bool recoded; /* Recoded into UTF-8? */ }; static struct text_record * open_text_record (struct sfm_reader *r, const struct sfm_extension_record *record, bool recode_to_utf8) { struct text_record *text; struct substring raw; text = pool_alloc (r->pool, sizeof *text); raw = ss_buffer (record->data, record->size * record->count); text->start = record->pos; text->buffer = (recode_to_utf8 ? recode_substring_pool ("UTF-8", r->encoding, raw, r->pool) : raw); text->pos = 0; text->n_warnings = 0; text->recoded = recode_to_utf8; return text; } /* Closes TEXT, frees its storage, and issues a final warning about suppressed warnings if necessary. */ static void close_text_record (struct sfm_reader *r, struct text_record *text) { if (text->n_warnings > MAX_TEXT_WARNINGS) sys_warn (r, -1, _("Suppressed %d additional related warnings."), text->n_warnings - MAX_TEXT_WARNINGS); if (text->recoded) pool_free (r->pool, ss_data (text->buffer)); } /* Reads a variable=value pair from TEXT. Looks up the variable in DICT and stores it into *VAR. Stores a null-terminated value into *VALUE. */ static bool read_variable_to_value_pair (struct sfm_reader *r, struct dictionary *dict, struct text_record *text, struct variable **var, char **value) { for (;;) { if (!text_read_short_name (r, dict, text, ss_cstr ("="), var)) return false; *value = text_get_token (text, ss_buffer ("\t\0", 2), NULL); if (*value == NULL) return false; text->pos += ss_span (ss_substr (text->buffer, text->pos, SIZE_MAX), ss_buffer ("\t\0", 2)); if (*var != NULL) return true; } } static bool text_read_variable_name (struct sfm_reader *r, struct dictionary *dict, struct text_record *text, struct substring delimiters, struct variable **var) { char *name; name = text_get_token (text, delimiters, NULL); if (name == NULL) return false; *var = dict_lookup_var (dict, name); if (*var != NULL) return true; text_warn (r, text, _("Dictionary record refers to unknown variable %s."), name); return false; } static bool text_read_short_name (struct sfm_reader *r, struct dictionary *dict, struct text_record *text, struct substring delimiters, struct variable **var) { char *short_name = text_get_token (text, delimiters, NULL); if (short_name == NULL) return false; *var = dict_lookup_var (dict, short_name); if (*var == NULL) text_warn (r, text, _("Dictionary record refers to unknown variable %s."), short_name); return true; } /* Displays a warning for the current file position, limiting the number to MAX_TEXT_WARNINGS for TEXT. */ static void text_warn (struct sfm_reader *r, struct text_record *text, const char *format, ...) { if (text->n_warnings++ < MAX_TEXT_WARNINGS) { va_list args; va_start (args, format); sys_msg (r, text->start + text->pos, MW, format, args); va_end (args); } } static char * text_get_token (struct text_record *text, struct substring delimiters, char *delimiter) { struct substring token; char *end; if (!ss_tokenize (text->buffer, delimiters, &text->pos, &token)) return NULL; end = &ss_data (token)[ss_length (token)]; if (delimiter != NULL) *delimiter = *end; *end = '\0'; return ss_data (token); } /* Reads a integer value expressed in decimal, then a space, then a string that consists of exactly as many bytes as specified by the integer, then a space, from TEXT. Returns the string, null-terminated, as a subset of TEXT's buffer (so the caller should not free the string). */ static const char * text_parse_counted_string (struct sfm_reader *r, struct text_record *text) { size_t start; size_t n; char *s; start = text->pos; n = 0; while (text->pos < text->buffer.length) { int c = text->buffer.string[text->pos]; if (c < '0' || c > '9') break; n = (n * 10) + (c - '0'); text->pos++; } if (text->pos >= text->buffer.length || start == text->pos) { sys_warn (r, text->start, _("Expecting digit at offset %zu in MRSETS record."), text->pos); return NULL; } if (!text_match (text, ' ')) { sys_warn (r, text->start, _("Expecting space at offset %zu in MRSETS record."), text->pos); return NULL; } if (text->pos + n > text->buffer.length) { sys_warn (r, text->start, _("%zu-byte string starting at offset %zu " "exceeds record length %zu."), n, text->pos, text->buffer.length); return NULL; } s = &text->buffer.string[text->pos]; if (s[n] != ' ') { sys_warn (r, text->start, _("Expecting space at offset %zu following %zu-byte string."), text->pos + n, n); return NULL; } s[n] = '\0'; text->pos += n + 1; return s; } static bool text_match (struct text_record *text, char c) { if (text->pos >= text->buffer.length) return false; if (text->buffer.string[text->pos] == c) { text->pos++; return true; } else return false; } /* Returns the current byte offset (as converted to UTF-8, if it was converted) inside the TEXT's string. */ static size_t text_pos (const struct text_record *text) { return text->pos; } static const char * text_get_all (const struct text_record *text) { return text->buffer.string; } /* Messages. */ /* Displays a corruption message. */ static void sys_msg (struct sfm_reader *r, off_t offset, int class, const char *format, va_list args) { struct msg m; struct string text; ds_init_empty (&text); if (offset >= 0) ds_put_format (&text, _("`%s' near offset 0x%llx: "), fh_get_file_name (r->fh), (long long int) offset); else ds_put_format (&text, _("`%s': "), fh_get_file_name (r->fh)); ds_put_vformat (&text, format, args); m.category = msg_class_to_category (class); m.severity = msg_class_to_severity (class); m.file_name = NULL; m.first_line = 0; m.last_line = 0; m.first_column = 0; m.last_column = 0; m.text = ds_cstr (&text); msg_emit (&m); } /* Displays a warning for offset OFFSET in the file. */ static void sys_warn (struct sfm_reader *r, off_t offset, const char *format, ...) { va_list args; va_start (args, format); sys_msg (r, offset, MW, format, args); va_end (args); } /* Displays an error for the current file position and marks it as in an error state. */ static void sys_error (struct sfm_reader *r, off_t offset, const char *format, ...) { va_list args; va_start (args, format); sys_msg (r, offset, ME, format, args); va_end (args); r->error = true; } /* Reads BYTE_CNT bytes into BUF. Returns 1 if exactly BYTE_CNT bytes are successfully read. Returns -1 if an I/O error or a partial read occurs. Returns 0 for an immediate end-of-file and, if EOF_IS_OK is false, reports an error. */ static inline int read_bytes_internal (struct sfm_reader *r, bool eof_is_ok, void *buf, size_t byte_cnt) { size_t bytes_read = fread (buf, 1, byte_cnt, r->file); r->pos += bytes_read; if (bytes_read == byte_cnt) return 1; else if (ferror (r->file)) { sys_error (r, r->pos, _("System error: %s."), strerror (errno)); return -1; } else if (!eof_is_ok || bytes_read != 0) { sys_error (r, r->pos, _("Unexpected end of file.")); return -1; } else return 0; } /* Reads BYTE_CNT into BUF. Returns true if successful. Returns false upon I/O error or if end-of-file is encountered. */ static bool read_bytes (struct sfm_reader *r, void *buf, size_t byte_cnt) { return read_bytes_internal (r, false, buf, byte_cnt) == 1; } /* Reads BYTE_CNT bytes into BUF. Returns 1 if exactly BYTE_CNT bytes are successfully read. Returns 0 if an immediate end-of-file is encountered. Returns -1 if an I/O error or a partial read occurs. */ static int try_read_bytes (struct sfm_reader *r, void *buf, size_t byte_cnt) { return read_bytes_internal (r, true, buf, byte_cnt); } /* Reads a 32-bit signed integer from R and stores its value in host format in *X. Returns true if successful, otherwise false. */ static bool read_int (struct sfm_reader *r, int *x) { uint8_t integer[4]; if (read_bytes (r, integer, sizeof integer) != 1) return false; *x = integer_get (r->integer_format, integer, sizeof integer); return true; } static bool read_uint (struct sfm_reader *r, unsigned int *x) { bool ok; int y; ok = read_int (r, &y); *x = y; return ok; } /* Reads a 64-bit signed integer from R and returns its value in host format. */ static bool read_int64 (struct sfm_reader *r, long long int *x) { uint8_t integer[8]; if (read_bytes (r, integer, sizeof integer) != 1) return false; *x = integer_get (r->integer_format, integer, sizeof integer); return true; } /* Reads a 64-bit signed integer from R and returns its value in host format. */ static bool read_uint64 (struct sfm_reader *r, unsigned long long int *x) { long long int y; bool ok; ok = read_int64 (r, &y); *x = y; return ok; } static int parse_int (const struct sfm_reader *r, const void *data, size_t ofs) { return integer_get (r->integer_format, (const uint8_t *) data + ofs, 4); } static double parse_float (const struct sfm_reader *r, const void *data, size_t ofs) { return float_get_double (r->float_format, (const uint8_t *) data + ofs); } /* Reads exactly SIZE - 1 bytes into BUFFER and stores a null byte into BUFFER[SIZE - 1]. */ static bool read_string (struct sfm_reader *r, char *buffer, size_t size) { bool ok; assert (size > 0); ok = read_bytes (r, buffer, size - 1); if (ok) buffer[size - 1] = '\0'; return ok; } /* Skips BYTES bytes forward in R. */ static bool skip_bytes (struct sfm_reader *r, size_t bytes) { while (bytes > 0) { char buffer[1024]; size_t chunk = MIN (sizeof buffer, bytes); if (!read_bytes (r, buffer, chunk)) return false; bytes -= chunk; } return true; } /* Returns a malloc()'d copy of S in which all lone CRs and CR LF pairs have been replaced by LFs. (A product that identifies itself as VOXCO INTERVIEWER 4.3 produces system files that use CR-only line ends in the file label and extra product info.) */ static char * fix_line_ends (const char *s) { char *dst, *d; d = dst = xmalloc (strlen (s) + 1); while (*s != '\0') { if (*s == '\r') { s++; if (*s == '\n') s++; *d++ = '\n'; } else *d++ = *s++; } *d = '\0'; return dst; } static bool read_ztrailer (struct sfm_reader *r, long long int zheader_ofs, long long int ztrailer_len); static void * zalloc (voidpf pool_, uInt items, uInt size) { struct pool *pool = pool_; return (!size || xalloc_oversized (items, size) ? Z_NULL : pool_malloc (pool, items * size)); } static void zfree (voidpf pool_, voidpf address) { struct pool *pool = pool_; pool_free (pool, address); } static bool read_zheader (struct sfm_reader *r) { off_t pos = r->pos; long long int zheader_ofs; long long int ztrailer_ofs; long long int ztrailer_len; if (!read_int64 (r, &zheader_ofs) || !read_int64 (r, &ztrailer_ofs) || !read_int64 (r, &ztrailer_len)) return false; if (zheader_ofs != pos) { sys_error (r, pos, _("Wrong ZLIB data header offset %#llx " "(expected %#llx)."), zheader_ofs, (long long int) pos); return false; } if (ztrailer_ofs < r->pos) { sys_error (r, pos, _("Impossible ZLIB trailer offset 0x%llx."), ztrailer_ofs); return false; } if (ztrailer_len < 24 || ztrailer_len % 24) { sys_error (r, pos, _("Invalid ZLIB trailer length %lld."), ztrailer_len); return false; } r->ztrailer_ofs = ztrailer_ofs; if (!read_ztrailer (r, zheader_ofs, ztrailer_len)) return false; if (r->zin_buf == NULL) { r->zin_buf = pool_malloc (r->pool, ZIN_BUF_SIZE); r->zout_buf = pool_malloc (r->pool, ZOUT_BUF_SIZE); r->zstream.next_in = NULL; r->zstream.avail_in = 0; } r->zstream.zalloc = zalloc; r->zstream.zfree = zfree; r->zstream.opaque = r->pool; return open_zstream (r); } static void seek (struct sfm_reader *r, off_t offset) { if (fseeko (r->file, offset, SEEK_SET)) sys_error (r, 0, _("%s: seek failed (%s)."), fh_get_file_name (r->fh), strerror (errno)); r->pos = offset; } /* Performs some additional consistency checks on the ZLIB compressed data trailer. */ static bool read_ztrailer (struct sfm_reader *r, long long int zheader_ofs, long long int ztrailer_len) { long long int expected_uncmp_ofs; long long int expected_cmp_ofs; long long int bias; long long int zero; unsigned int block_size; unsigned int n_blocks; unsigned int i; struct stat s; if (fstat (fileno (r->file), &s)) { sys_error (ME, 0, _("%s: stat failed (%s)."), fh_get_file_name (r->fh), strerror (errno)); return false; } if (!S_ISREG (s.st_mode)) { /* We can't seek to the trailer and then back to the data in this file, so skip doing extra checks. */ return true; } if (r->ztrailer_ofs + ztrailer_len != s.st_size) sys_warn (r, r->pos, _("End of ZLIB trailer (0x%llx) is not file size (0x%llx)."), r->ztrailer_ofs + ztrailer_len, (long long int) s.st_size); seek (r, r->ztrailer_ofs); /* Read fixed header from ZLIB data trailer. */ if (!read_int64 (r, &bias)) return false; if (-bias != r->bias) { sys_error (r, r->pos, _("ZLIB trailer bias (%lld) differs from " "file header bias (%.2f)."), -bias, r->bias); return false; } if (!read_int64 (r, &zero)) return false; if (zero != 0) sys_warn (r, r->pos, _("ZLIB trailer \"zero\" field has nonzero value %lld."), zero); if (!read_uint (r, &block_size)) return false; if (block_size != ZBLOCK_SIZE) sys_warn (r, r->pos, _("ZLIB trailer specifies unexpected %u-byte block size."), block_size); if (!read_uint (r, &n_blocks)) return false; if (n_blocks != (ztrailer_len - 24) / 24) { sys_error (r, r->pos, _("%lld-byte ZLIB trailer specifies %u data blocks (expected " "%lld)."), ztrailer_len, n_blocks, (ztrailer_len - 24) / 24); return false; } expected_uncmp_ofs = zheader_ofs; expected_cmp_ofs = zheader_ofs + 24; for (i = 0; i < n_blocks; i++) { off_t desc_ofs = r->pos; unsigned long long int uncompressed_ofs; unsigned long long int compressed_ofs; unsigned int uncompressed_size; unsigned int compressed_size; if (!read_uint64 (r, &uncompressed_ofs) || !read_uint64 (r, &compressed_ofs) || !read_uint (r, &uncompressed_size) || !read_uint (r, &compressed_size)) return false; if (uncompressed_ofs != expected_uncmp_ofs) { sys_error (r, desc_ofs, _("ZLIB block descriptor %u reported uncompressed data " "offset %#llx, when %#llx was expected."), i, uncompressed_ofs, expected_uncmp_ofs); return false; } if (compressed_ofs != expected_cmp_ofs) { sys_error (r, desc_ofs, _("ZLIB block descriptor %u reported compressed data " "offset %#llx, when %#llx was expected."), i, compressed_ofs, expected_cmp_ofs); return false; } if (i < n_blocks - 1) { if (uncompressed_size != block_size) sys_warn (r, desc_ofs, _("ZLIB block descriptor %u reported block size %#x, " "when %#x was expected."), i, uncompressed_size, block_size); } else { if (uncompressed_size > block_size) sys_warn (r, desc_ofs, _("ZLIB block descriptor %u reported block size %#x, " "when at most %#x was expected."), i, uncompressed_size, block_size); } /* http://www.zlib.net/zlib_tech.html says that the maximum expansion from compression, with worst-case parameters, is 13.5% plus 11 bytes. This code checks for an expansion of more than 14.3% plus 11 bytes. */ if (compressed_size > uncompressed_size + uncompressed_size / 7 + 11) { sys_error (r, desc_ofs, _("ZLIB block descriptor %u reports compressed size %u " "and uncompressed size %u."), i, compressed_size, uncompressed_size); return false; } expected_uncmp_ofs += uncompressed_size; expected_cmp_ofs += compressed_size; } if (expected_cmp_ofs != r->ztrailer_ofs) { sys_error (r, r->pos, _("ZLIB trailer is at offset %#llx but %#llx " "would be expected from block descriptors."), r->ztrailer_ofs, expected_cmp_ofs); return false; } seek (r, zheader_ofs + 24); return true; } static bool open_zstream (struct sfm_reader *r) { int error; r->zout_pos = r->zout_end = 0; error = inflateInit (&r->zstream); if (error != Z_OK) { sys_error (r, r->pos, _("ZLIB initialization failed (%s)."), r->zstream.msg); return false; } return true; } static bool close_zstream (struct sfm_reader *r) { int error; error = inflateEnd (&r->zstream); if (error != Z_OK) { sys_error (r, r->pos, _("Inconsistency at end of ZLIB stream (%s)."), r->zstream.msg); return false; } return true; } static int read_bytes_zlib (struct sfm_reader *r, void *buf_, size_t byte_cnt) { uint8_t *buf = buf_; if (byte_cnt == 0) return 1; for (;;) { int error; /* Use already inflated data if there is any. */ if (r->zout_pos < r->zout_end) { unsigned int n = MIN (byte_cnt, r->zout_end - r->zout_pos); memcpy (buf, &r->zout_buf[r->zout_pos], n); r->zout_pos += n; byte_cnt -= n; buf += n; if (byte_cnt == 0) return 1; } /* We need to inflate some more data. Get some more input data if we don't have any. */ if (r->zstream.avail_in == 0) { unsigned int n = MIN (ZIN_BUF_SIZE, r->ztrailer_ofs - r->pos); if (n == 0) return 0; else { int retval = try_read_bytes (r, r->zin_buf, n); if (retval != 1) return retval; r->zstream.avail_in = n; r->zstream.next_in = r->zin_buf; } } /* Inflate the (remaining) input data. */ r->zstream.avail_out = ZOUT_BUF_SIZE; r->zstream.next_out = r->zout_buf; error = inflate (&r->zstream, Z_SYNC_FLUSH); r->zout_pos = 0; r->zout_end = r->zstream.next_out - r->zout_buf; if (r->zout_end == 0) { if (error != Z_STREAM_END) { sys_error (r, r->pos, _("ZLIB stream inconsistency (%s)."), r->zstream.msg); return -1; } else if (!close_zstream (r) || !open_zstream (r)) return -1; } else { /* Process the output data and ignore 'error' for now. ZLIB will present it to us again on the next inflate() call. */ } } } static int read_compressed_bytes (struct sfm_reader *r, void *buf, size_t byte_cnt) { if (r->compression == ANY_COMP_SIMPLE) return read_bytes (r, buf, byte_cnt); else { int retval = read_bytes_zlib (r, buf, byte_cnt); if (retval == 0) sys_error (r, r->pos, _("Unexpected end of ZLIB compressed data.")); return retval; } } static int try_read_compressed_bytes (struct sfm_reader *r, void *buf, size_t byte_cnt) { if (r->compression == ANY_COMP_SIMPLE) return try_read_bytes (r, buf, byte_cnt); else return read_bytes_zlib (r, buf, byte_cnt); } /* Reads a 64-bit floating-point number from R and returns its value in host format. */ static bool read_compressed_float (struct sfm_reader *r, double *d) { uint8_t number[8]; if (!read_compressed_bytes (r, number, sizeof number)) return false; *d = float_get_double (r->float_format, number); return true; } static const struct casereader_class sys_file_casereader_class = { sys_file_casereader_read, sys_file_casereader_destroy, NULL, NULL, }; const struct any_reader_class sys_file_reader_class = { N_("SPSS System File"), sfm_detect, sfm_open, sfm_close, sfm_decode, sfm_get_strings, }; pspp-1.0.1/src/data/dict-class.h0000644000175000017500000000307712470242642013325 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Dictionary classes. Occasionally it is useful to classify variables into three groups: system variables (those whose names begin with $), scratch variables (those whose names begin with #), and ordinary variables (all others). This header provides a little bit of support for this. */ #ifndef DATA_DICT_CLASS_H #define DATA_DICT_CLASS_H 1 /* Classes of variables. These values are bitwise disjoint so that they can be used in masks. */ enum dict_class { DC_ORDINARY = 0x0001, /* Ordinary identifier. */ DC_SYSTEM = 0x0002, /* System variable. */ DC_SCRATCH = 0x0004, /* Scratch variable. */ DC_ALL = 0x0007 /* All of the above. */ }; enum dict_class dict_class_from_id (const char *name); const char *dict_class_to_name (enum dict_class); #endif /* data/dict-class.h */ pspp-1.0.1/src/data/casewriter-provider.h0000644000175000017500000000467312470243700015276 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_CASEWRITER_PROVIDER_H #define DATA_CASEWRITER_PROVIDER_H 1 #include "data/casewriter.h" struct casewriter_class { /* Mandatory. Writes case C to WRITER. Ownership of C is transferred to WRITER. If an I/O error occurs, this function should call casewriter_force_error on WRITER. Some I/O error detection may be deferred to the "destroy" member function (e.g. writes to disk need not be flushed by "write") . */ void (*write) (struct casewriter *writer, void *aux, struct ccase *c); /* Mandatory. Finalizes output and destroys WRITER. If an I/O error is detected while finalizing output (e.g. while flushing output to disk), this function should call casewriter_force_error on WRITER. */ void (*destroy) (struct casewriter *writer, void *aux); /* Optional: supply if practical and desired by clients. Finalizes output to WRITER, destroys WRITER, and in its place returns a casereader that can be used to read back the data written to WRITER. WRITER will not be used again after calling this function, even as an argument to casewriter_destroy. If an I/O error is detected while finalizing output (e.g. while flushing output to disk), this function should call casewriter_force_error on WRITER. The caller will ensure that the error is propagated to the returned casereader. */ struct casereader *(*convert_to_reader) (struct casewriter *, void *aux); }; struct casewriter *casewriter_create (const struct caseproto *, const struct casewriter_class *, void *); #endif /* data/casewriter-provider.h */ pspp-1.0.1/src/data/casereader.c0000644000175000017500000005012213137223525013361 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/casereader.h" #include "data/casereader-provider.h" #include #include "data/casereader-shim.h" #include "data/casewriter.h" #include "libpspp/assertion.h" #include "libpspp/heap.h" #include "libpspp/taint.h" #include "gl/xalloc.h" /* A casereader. */ struct casereader { struct taint *taint; /* Corrupted? */ struct caseproto *proto; /* Format of contained cases. */ casenumber case_cnt; /* Number of cases, CASENUMBER_MAX if unknown. */ const struct casereader_class *class; /* Class. */ void *aux; /* Auxiliary data for class. */ }; /* Reads and returns the next case from READER. The caller owns the returned case and must call case_unref on it when its data is no longer needed. Returns a null pointer if cases have been exhausted or upon detection of an I/O error. The case returned is effectively consumed: it can never be read again through READER. If this is inconvenient, READER may be cloned in advance with casereader_clone, or casereader_peek may be used instead. */ struct ccase * casereader_read (struct casereader *reader) { if (reader->case_cnt != 0) { /* ->read may use casereader_swap to replace itself by another reader and then delegate to that reader by recursively calling casereader_read. Currently only lazy_casereader does this and, with luck, nothing else ever will. To allow this to work, however, we must decrement case_cnt before calling ->read. If we decremented case_cnt after calling ->read, then this would actually drop two cases from case_cnt instead of one, and we'd lose the last case in the casereader. */ struct ccase *c; if (reader->case_cnt != CASENUMBER_MAX) reader->case_cnt--; c = reader->class->read (reader, reader->aux); if (c != NULL) { size_t n_widths UNUSED = caseproto_get_n_widths (reader->proto); assert (case_get_value_cnt (c) >= n_widths); expensive_assert (caseproto_equal (case_get_proto (c), 0, reader->proto, 0, n_widths)); return c; } } reader->case_cnt = 0; return NULL; } /* Destroys READER. Returns false if an I/O error was detected on READER, true otherwise. */ bool casereader_destroy (struct casereader *reader) { bool ok = true; if (reader != NULL) { reader->class->destroy (reader, reader->aux); ok = taint_destroy (reader->taint); caseproto_unref (reader->proto); free (reader); } return ok; } /* Returns a clone of READER. READER and its clone may be used to read the same sequence of cases in the same order, barring I/O errors. */ struct casereader * casereader_clone (const struct casereader *reader_) { struct casereader *reader = CONST_CAST (struct casereader *, reader_); struct casereader *clone; if ( reader == NULL ) return NULL; if (reader->class->clone == NULL) casereader_shim_insert (reader); clone = reader->class->clone (reader, reader->aux); assert (clone != NULL); assert (clone != reader); return clone; } /* Returns a copy of READER, which is itself destroyed. Useful for taking over ownership of a casereader, to enforce preventing the original owner from accessing the casereader again. */ struct casereader * casereader_rename (struct casereader *reader) { struct casereader *new = xmemdup (reader, sizeof *reader); free (reader); return new; } /* Exchanges the casereaders referred to by A and B. */ void casereader_swap (struct casereader *a, struct casereader *b) { if (a != b) { struct casereader tmp = *a; *a = *b; *b = tmp; } } /* Reads and returns the (IDX + 1)'th case from READER. The caller owns the returned case and must call case_unref on it when it is no longer needed. Returns a null pointer if cases have been exhausted or upon detection of an I/O error. */ struct ccase * casereader_peek (struct casereader *reader, casenumber idx) { if (idx < reader->case_cnt) { struct ccase *c; if (reader->class->peek == NULL) casereader_shim_insert (reader); c = reader->class->peek (reader, reader->aux, idx); if (c != NULL) return c; else if (casereader_error (reader)) reader->case_cnt = 0; } if (reader->case_cnt > idx) reader->case_cnt = idx; return NULL; } /* Returns true if no cases remain to be read from READER, or if an error has occurred on READER. (A return value of false does *not* mean that the next call to casereader_peek or casereader_read will return true, because an error can occur in the meantime.) */ bool casereader_is_empty (struct casereader *reader) { if (reader->case_cnt == 0) return true; else { struct ccase *c = casereader_peek (reader, 0); if (c == NULL) return true; else { case_unref (c); return false; } } } /* Returns true if an I/O error or another hard error has occurred on READER, a clone of READER, or on some object on which READER's data has a dependency, false otherwise. */ bool casereader_error (const struct casereader *reader) { return taint_is_tainted (reader->taint); } /* Marks READER as having encountered an error. Ordinarily, this function should be called by the implementation of a casereader, not by the casereader's client. Instead, casereader clients should usually ensure that a casereader's error state is correct by using taint_propagate to propagate to the casereader's taint structure, which may be obtained via casereader_get_taint. */ void casereader_force_error (struct casereader *reader) { taint_set_taint (reader->taint); } /* Returns READER's associate taint object, for use with taint_propagate and other taint functions. */ const struct taint * casereader_get_taint (const struct casereader *reader) { return reader->taint; } /* Returns the number of cases that will be read by successive calls to casereader_read for READER, assuming that no errors occur. Upon an error condition, the case count drops to 0, so that no more cases can be obtained. Not all casereaders can predict the number of cases that they will produce without actually reading all of them. In that case, this function returns CASENUMBER_MAX. To obtain the actual number of cases in such a casereader, use casereader_count_cases. */ casenumber casereader_get_case_cnt (struct casereader *reader) { return reader->case_cnt; } static casenumber casereader_count_cases__ (const struct casereader *reader, casenumber max_cases) { struct casereader *clone; casenumber n_cases; clone = casereader_clone (reader); n_cases = casereader_advance (clone, max_cases); casereader_destroy (clone); return n_cases; } /* Returns the number of cases that will be read by successive calls to casereader_read for READER, assuming that no errors occur. Upon an error condition, the case count drops to 0, so that no more cases can be obtained. For a casereader that cannot predict the number of cases it will produce, this function actually reads (and discards) all of the contents of a clone of READER. Thus, the return value is always correct in the absence of I/O errors. */ casenumber casereader_count_cases (const struct casereader *reader) { if (reader->case_cnt == CASENUMBER_MAX) { struct casereader *reader_rw = CONST_CAST (struct casereader *, reader); reader_rw->case_cnt = casereader_count_cases__ (reader, CASENUMBER_MAX); } return reader->case_cnt; } /* Truncates READER to at most N cases. */ void casereader_truncate (struct casereader *reader, casenumber n) { /* This could be optimized, if it ever becomes too expensive, by adding a "max_cases" member to struct casereader. We could also add a "truncate" function to the casereader implementation, to allow the casereader to throw away data that cannot ever be read. */ if (reader->case_cnt == CASENUMBER_MAX) reader->case_cnt = casereader_count_cases__ (reader, n); if (reader->case_cnt > n) reader->case_cnt = n; } /* Returns the prototype for the cases in READER. The caller must not unref the returned prototype. */ const struct caseproto * casereader_get_proto (const struct casereader *reader) { return reader->proto; } /* Skips past N cases in READER, stopping when the last case in READER has been read or on an input error. Returns the number of cases successfully skipped. */ casenumber casereader_advance (struct casereader *reader, casenumber n) { casenumber i; for (i = 0; i < n; i++) { struct ccase *c = casereader_read (reader); if (c == NULL) break; case_unref (c); } return i; } /* Copies all the cases in READER to WRITER, propagating errors appropriately. READER is destroyed by this function */ void casereader_transfer (struct casereader *reader, struct casewriter *writer) { struct ccase *c; taint_propagate (casereader_get_taint (reader), casewriter_get_taint (writer)); while ((c = casereader_read (reader)) != NULL) casewriter_write (writer, c); casereader_destroy (reader); } /* Creates and returns a new casereader. This function is intended for use by casereader implementations, not by casereader clients. This function is most suited for creating a casereader for a data source that is naturally sequential. casereader_create_random may be more appropriate for a data source that supports random access. Ordinarily, specify a null pointer for TAINT, in which case the new casereader will have a new, unique taint object. If the new casereader should have a clone of an existing taint object, specify that object as TAINT. (This is most commonly useful in an implementation of the "clone" casereader_class function, in which case the cloned casereader should have the same taint object as the original casereader.) PROTO must be the prototype for the cases that may be read from the casereader. The caller retains its reference to PROTO. CASE_CNT is an upper limit on the number of cases that casereader_read will return from the casereader in successive calls. Ordinarily, this is the actual number of cases in the data source or CASENUMBER_MAX if the number of cases cannot be predicted in advance. CLASS and AUX are a set of casereader implementation-specific member functions and auxiliary data to pass to those member functions, respectively. */ struct casereader * casereader_create_sequential (const struct taint *taint, const struct caseproto *proto, casenumber case_cnt, const struct casereader_class *class, void *aux) { struct casereader *reader = xmalloc (sizeof *reader); reader->taint = taint != NULL ? taint_clone (taint) : taint_create (); reader->proto = caseproto_ref (proto); reader->case_cnt = case_cnt; reader->class = class; reader->aux = aux; return reader; } /* If READER is a casereader of the given CLASS, returns its associated auxiliary data; otherwise, returns a null pointer. This function is intended for use from casereader implementations, not by casereader users. Even within casereader implementations, its usefulness is quite limited, for at least two reasons. First, every casereader member function already receives a pointer to the casereader's auxiliary data. Second, a casereader's class can change (through a call to casereader_swap) and this is in practice quite common (e.g. any call to casereader_clone on a casereader that does not directly support clone will cause the casereader to be replaced by a shim caseader). */ void * casereader_dynamic_cast (struct casereader *reader, const struct casereader_class *class) { return reader->class == class ? reader->aux : NULL; } /* Random-access casereader implementation. This is a set of wrappers around casereader_create_sequential and struct casereader_class to make it easy to create efficient casereaders for data sources that natively support random access. */ /* One clone of a random reader. */ struct random_reader { struct random_reader_shared *shared; /* Data shared among clones. */ struct heap_node heap_node; /* Node in shared data's heap of readers. */ casenumber offset; /* Number of cases already read. */ }; /* Returns the random_reader in which the given heap_node is embedded. */ static struct random_reader * random_reader_from_heap_node (const struct heap_node *node) { return heap_data (node, struct random_reader, heap_node); } /* Data shared among clones of a random reader. */ struct random_reader_shared { struct heap *readers; /* Heap of struct random_readers. */ casenumber min_offset; /* Smallest offset of any random_reader. */ const struct casereader_random_class *class; void *aux; }; static const struct casereader_class random_reader_casereader_class; /* Creates and returns a new random_reader with the given SHARED data and OFFSET. Inserts the new random reader into the shared heap. */ static struct random_reader * make_random_reader (struct random_reader_shared *shared, casenumber offset) { struct random_reader *br = xmalloc (sizeof *br); br->offset = offset; br->shared = shared; heap_insert (shared->readers, &br->heap_node); return br; } /* Compares random_readers A and B by offset and returns a strcmp()-like result. */ static int compare_random_readers_by_offset (const struct heap_node *a_, const struct heap_node *b_, const void *aux UNUSED) { const struct random_reader *a = random_reader_from_heap_node (a_); const struct random_reader *b = random_reader_from_heap_node (b_); return a->offset < b->offset ? -1 : a->offset > b->offset; } /* Creates and returns a new casereader. This function is intended for use by casereader implementations, not by casereader clients. This function is most suited for creating a casereader for a data source that supports random access. casereader_create_sequential is more appropriate for a data source that is naturally sequential. PROTO must be the prototype for the cases that may be read from the casereader. The caller retains its reference to PROTO. CASE_CNT is an upper limit on the number of cases that casereader_read will return from the casereader in successive calls. Ordinarily, this is the actual number of cases in the data source or CASENUMBER_MAX if the number of cases cannot be predicted in advance. CLASS and AUX are a set of casereader implementation-specific member functions and auxiliary data to pass to those member functions, respectively. */ struct casereader * casereader_create_random (const struct caseproto *proto, casenumber case_cnt, const struct casereader_random_class *class, void *aux) { struct random_reader_shared *shared = xmalloc (sizeof *shared); shared->readers = heap_create (compare_random_readers_by_offset, NULL); shared->class = class; shared->aux = aux; shared->min_offset = 0; return casereader_create_sequential (NULL, proto, case_cnt, &random_reader_casereader_class, make_random_reader (shared, 0)); } /* Reassesses the min_offset in SHARED based on the minimum offset in the heap. */ static void advance_random_reader (struct casereader *reader, struct random_reader_shared *shared) { casenumber old, new; old = shared->min_offset; new = random_reader_from_heap_node (heap_minimum (shared->readers))->offset; assert (new >= old); if (new > old) { shared->min_offset = new; shared->class->advance (reader, shared->aux, new - old); } } /* struct casereader_class "read" function for random reader. */ static struct ccase * random_reader_read (struct casereader *reader, void *br_) { struct random_reader *br = br_; struct random_reader_shared *shared = br->shared; struct ccase *c = shared->class->read (reader, shared->aux, br->offset - shared->min_offset); if (c != NULL) { br->offset++; heap_changed (shared->readers, &br->heap_node); advance_random_reader (reader, shared); } return c; } /* struct casereader_class "destroy" function for random reader. */ static void random_reader_destroy (struct casereader *reader, void *br_) { struct random_reader *br = br_; struct random_reader_shared *shared = br->shared; heap_delete (shared->readers, &br->heap_node); if (heap_is_empty (shared->readers)) { heap_destroy (shared->readers); shared->class->destroy (reader, shared->aux); free (shared); } else advance_random_reader (reader, shared); free (br); } /* struct casereader_class "clone" function for random reader. */ static struct casereader * random_reader_clone (struct casereader *reader, void *br_) { struct random_reader *br = br_; struct random_reader_shared *shared = br->shared; return casereader_create_sequential (casereader_get_taint (reader), reader->proto, casereader_get_case_cnt (reader), &random_reader_casereader_class, make_random_reader (shared, br->offset)); } /* struct casereader_class "peek" function for random reader. */ static struct ccase * random_reader_peek (struct casereader *reader, void *br_, casenumber idx) { struct random_reader *br = br_; struct random_reader_shared *shared = br->shared; return shared->class->read (reader, shared->aux, br->offset - shared->min_offset + idx); } /* Casereader class for random reader. */ static const struct casereader_class random_reader_casereader_class = { random_reader_read, random_reader_destroy, random_reader_clone, random_reader_peek, }; static const struct casereader_class casereader_null_class; /* Returns a casereader with no cases. The casereader has the prototype specified by PROTO. PROTO may be specified as a null pointer, in which case the casereader has no variables. */ struct casereader * casereader_create_empty (const struct caseproto *proto_) { struct casereader *reader; struct caseproto *proto; proto = proto_ != NULL ? caseproto_ref (proto_) : caseproto_create (); reader = casereader_create_sequential (NULL, proto, 0, &casereader_null_class, NULL); caseproto_unref (proto); return reader; } static struct ccase * casereader_null_read (struct casereader *reader UNUSED, void *aux UNUSED) { return NULL; } static void casereader_null_destroy (struct casereader *reader UNUSED, void *aux UNUSED) { /* Nothing to do. */ } static const struct casereader_class casereader_null_class = { casereader_null_read, casereader_null_destroy, NULL, /* clone */ NULL, /* peek */ }; pspp-1.0.1/src/data/missing-values.c0000644000175000017500000003131612476227410014237 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005, 2009, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/missing-values.h" #include #include #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/str.h" /* Types of user-missing values. Invisible--use access functions defined below instead. */ enum mv_type { MVT_NONE = 0, /* No user-missing values. */ MVT_1 = 1, /* One user-missing value. */ MVT_2 = 2, /* Two user-missing values. */ MVT_3 = 3, /* Three user-missing values. */ MVT_RANGE = 4, /* A range of user-missing values. */ MVT_RANGE_1 = 5 /* A range plus an individual value. */ }; /* Initializes MV as a set of missing values for a variable of the given WIDTH. MV should be destroyed with mv_destroy when it is no longer needed. */ void mv_init (struct missing_values *mv, int width) { int i; assert (width >= 0 && width <= MAX_STRING); mv->type = MVT_NONE; mv->width = width; for (i = 0; i < 3; i++) value_init (&mv->values[i], width); } /* Initializes MV as a set of missing values for a variable of the given WIDTH. MV will be automatically destroyed along with POOL; it must not be passed to mv_destroy for explicit destruction. */ void mv_init_pool (struct pool *pool, struct missing_values *mv, int width) { int i; assert (width >= 0 && width <= MAX_STRING); mv->type = MVT_NONE; mv->width = width; for (i = 0; i < 3; i++) value_init_pool (pool, &mv->values[i], width); } /* Frees any storage allocated by mv_init for MV. */ void mv_destroy (struct missing_values *mv) { if (mv != NULL) { int i; for (i = 0; i < 3; i++) value_destroy (&mv->values[i], mv->width); } } /* Removes any missing values from MV. */ void mv_clear (struct missing_values *mv) { mv->type = MVT_NONE; } /* Initializes MV as a copy of SRC. */ void mv_copy (struct missing_values *mv, const struct missing_values *src) { int i; mv_init (mv, src->width); mv->type = src->type; for (i = 0; i < 3; i++) value_copy (&mv->values[i], &src->values[i], mv->width); } /* Returns true if VALUE, of the given WIDTH, may be added to a missing value set also of the given WIDTH. This is normally the case, but string missing values over MV_MAX_STRING bytes long must consist solely of spaces after the first MV_MAX_STRING bytes. */ bool mv_is_acceptable (const union value *value, int width) { int i; for (i = MV_MAX_STRING; i < width; i++) if (value_str (value, width)[i] != ' ') return false; return true; } /* Returns true if MV is an empty set of missing values. */ bool mv_is_empty (const struct missing_values *mv) { return mv->type == MVT_NONE; } /* Returns the width of the missing values that MV may contain. */ int mv_get_width (const struct missing_values *mv) { return mv->width; } /* Attempts to add individual value V to the set of missing values MV. Returns true if successful, false if MV has no more room for missing values or if V is not an acceptable missing value. */ bool mv_add_value (struct missing_values *mv, const union value *v) { if (!mv_is_acceptable (v, mv->width)) return false; switch (mv->type) { case MVT_NONE: case MVT_1: case MVT_2: case MVT_RANGE: value_copy (&mv->values[mv->type & 3], v, mv->width); mv->type++; return true; case MVT_3: case MVT_RANGE_1: return false; } NOT_REACHED (); } /* Attempts to add S, which is LEN bytes long, to the set of string missing values MV. Returns true if successful, false if MV has no more room for missing values or if S is not an acceptable missing value. */ bool mv_add_str (struct missing_values *mv, const uint8_t s[], size_t len) { union value v; bool ok; assert (mv->width > 0); while (len > mv->width) if (s[--len] != ' ') return false; value_init (&v, mv->width); buf_copy_rpad (CHAR_CAST (char *, value_str_rw (&v, mv->width)), mv->width, CHAR_CAST (char *, s), len, ' '); ok = mv_add_value (mv, &v); value_destroy (&v, mv->width); return ok; } /* Attempts to add D to the set of numeric missing values MV. Returns true if successful, false if MV has no more room for missing values. */ bool mv_add_num (struct missing_values *mv, double d) { union value v; bool ok; assert (mv->width == 0); value_init (&v, 0); v.f = d; ok = mv_add_value (mv, &v); value_destroy (&v, 0); return ok; } /* Attempts to add range [LOW, HIGH] to the set of numeric missing values MV. Returns true if successful, false if MV has no room for a range, or if LOW > HIGH. */ bool mv_add_range (struct missing_values *mv, double low, double high) { assert (mv->width == 0); if (low <= high && (mv->type == MVT_NONE || mv->type == MVT_1)) { mv->values[1].f = low; mv->values[2].f = high; mv->type |= 4; return true; } else return false; } /* Returns true if MV contains an individual value, false if MV is empty (or contains only a range). */ bool mv_has_value (const struct missing_values *mv) { return mv_n_values (mv) > 0; } /* Removes one individual value from MV and stores it in V, which must have been initialized as a value with the same width as MV. MV must contain an individual value (as determined by mv_has_value()). We remove the first value from MV, not the last, because the common use for this function is in iterating through a set of missing values. If we remove the last value then we'll output the missing values in order opposite of that in which they were added, so that a GET followed by a SAVE would reverse the order of missing values in the system file, a weird effect. */ void mv_pop_value (struct missing_values *mv, union value *v) { union value tmp; assert (mv_has_value (mv)); value_copy (v, &mv->values[0], mv->width); tmp = mv->values[0]; mv->values[0] = mv->values[1]; mv->values[1] = mv->values[2]; mv->values[2] = tmp; mv->type--; } /* Returns MV's discrete value with index IDX. The caller must not modify or free this value, or access it after MV is modified or freed. IDX must be less than the number of discrete values in MV, as reported by mv_n_values. */ const union value * mv_get_value (const struct missing_values *mv, int idx) { assert (idx >= 0 && idx < mv_n_values (mv)); return &mv->values[idx]; } /* Replaces MV's discrete value with index IDX by a copy of V, which must have the same width as MV. IDX must be less than the number of discrete values in MV, as reported by mv_n_values. */ bool mv_replace_value (struct missing_values *mv, const union value *v, int idx) { assert (idx >= 0) ; assert (idx < mv_n_values(mv)); if (!mv_is_acceptable (v, mv->width)) return false; value_copy (&mv->values[idx], v, mv->width); return true; } /* Returns the number of individual (not part of a range) missing values in MV. */ int mv_n_values (const struct missing_values *mv) { return mv->type & 3; } /* Returns true if MV contains a numeric range, false if MV is empty (or contains only individual values). */ bool mv_has_range (const struct missing_values *mv) { return mv->type == MVT_RANGE || mv->type == MVT_RANGE_1; } /* Removes the numeric range from MV and stores it in *LOW and *HIGH. MV must contain a individual range (as determined by mv_has_range()). */ void mv_pop_range (struct missing_values *mv, double *low, double *high) { assert (mv_has_range (mv)); *low = mv->values[1].f; *high = mv->values[2].f; mv->type &= 3; } /* Returns the numeric range from MV into *LOW and *HIGH. MV must contain a individual range (as determined by mv_has_range()). */ void mv_get_range (const struct missing_values *mv, double *low, double *high) { assert (mv_has_range (mv)); *low = mv->values[1].f; *high = mv->values[2].f; } /* Returns true if values[IDX] is in use when the `type' member is set to TYPE (in struct missing_values), false otherwise. */ static bool using_element (unsigned type, int idx) { assert (idx >= 0 && idx < 3); switch (type) { case MVT_NONE: return false; case MVT_1: return idx < 1; case MVT_2: return idx < 2; case MVT_3: return true; case MVT_RANGE: return idx > 0; case MVT_RANGE_1: return true; } NOT_REACHED (); } /* Returns true if MV can be resized to the given WIDTH with mv_resize(), false otherwise. Resizing is possible only when each value in MV (if any) is resizable from MV's current width to WIDTH, as determined by value_is_resizable. */ bool mv_is_resizable (const struct missing_values *mv, int width) { int i; for (i = 0; i < 3; i++) if (using_element (mv->type, i) && !value_is_resizable (&mv->values[i], mv->width, width)) return false; return true; } /* Resizes MV to the given WIDTH. WIDTH must fit the constraints explained for mv_is_resizable. */ void mv_resize (struct missing_values *mv, int width) { int i; assert (mv_is_resizable (mv, width)); for (i = 0; i < 3; i++) if (using_element (mv->type, i)) value_resize (&mv->values[i], mv->width, width); else { value_destroy (&mv->values[i], mv->width); value_init (&mv->values[i], width); } mv->width = width; } /* Returns true if D is a missing value in MV, false otherwise. MV must be a set of numeric missing values. */ static bool is_num_user_missing (const struct missing_values *mv, double d) { const union value *v = mv->values; assert (mv->width == 0); switch (mv->type) { case MVT_NONE: return false; case MVT_1: return v[0].f == d; case MVT_2: return v[0].f == d || v[1].f == d; case MVT_3: return v[0].f == d || v[1].f == d || v[2].f == d; case MVT_RANGE: return v[1].f <= d && d <= v[2].f; case MVT_RANGE_1: return v[0].f == d || (v[1].f <= d && d <= v[2].f); } NOT_REACHED (); } /* Returns true if S[] is a missing value in MV, false otherwise. MV must be a set of string missing values. S[] must contain exactly as many characters as MV's width. */ static bool is_str_user_missing (const struct missing_values *mv, const uint8_t s[]) { const union value *v = mv->values; assert (mv->width > 0); switch (mv->type) { case MVT_NONE: return false; case MVT_1: return !memcmp (value_str (&v[0], mv->width), s, mv->width); case MVT_2: return (!memcmp (value_str (&v[0], mv->width), s, mv->width) || !memcmp (value_str (&v[1], mv->width), s, mv->width)); case MVT_3: return (!memcmp (value_str (&v[0], mv->width), s, mv->width) || !memcmp (value_str (&v[1], mv->width), s, mv->width) || !memcmp (value_str (&v[2], mv->width), s, mv->width)); case MVT_RANGE: case MVT_RANGE_1: NOT_REACHED (); } NOT_REACHED (); } /* Returns true if V is a missing value in the given CLASS in MV, false otherwise. */ bool mv_is_value_missing (const struct missing_values *mv, const union value *v, enum mv_class class) { return (mv->width == 0 ? mv_is_num_missing (mv, v->f, class) : mv_is_str_missing (mv, value_str (v, mv->width), class)); } /* Returns true if D is a missing value in the given CLASS in MV, false otherwise. MV must be a set of numeric missing values. */ bool mv_is_num_missing (const struct missing_values *mv, double d, enum mv_class class) { assert (mv->width == 0); return ((class & MV_SYSTEM && d == SYSMIS) || (class & MV_USER && is_num_user_missing (mv, d))); } /* Returns true if S[] is a missing value in the given CLASS in MV, false otherwise. MV must be a set of string missing values. S[] must contain exactly as many characters as MV's width. */ bool mv_is_str_missing (const struct missing_values *mv, const uint8_t s[], enum mv_class class) { assert (mv->width > 0); return class & MV_USER && is_str_user_missing (mv, s); } pspp-1.0.1/src/data/datasheet.c0000644000175000017500000013627612470434665013254 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/datasheet.h" #include #include #include "data/casereader-provider.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/lazy-casereader.h" #include "data/settings.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/misc.h" #include "libpspp/range-map.h" #include "libpspp/range-set.h" #include "libpspp/sparse-xarray.h" #include "libpspp/taint.h" #include "libpspp/tower.h" #include "gl/minmax.h" #include "gl/md4.h" #include "gl/xalloc.h" struct column; static struct axis *axis_create (void); static struct axis *axis_clone (const struct axis *); static void axis_destroy (struct axis *); static void axis_hash (const struct axis *, struct md4_ctx *); static bool axis_allocate (struct axis *, unsigned long int request, unsigned long int *start, unsigned long int *width); static void axis_make_available (struct axis *, unsigned long int start, unsigned long int width); static unsigned long int axis_extend (struct axis *, unsigned long int width); static unsigned long int axis_map (const struct axis *, unsigned long log_pos); static unsigned long axis_get_size (const struct axis *); static void axis_insert (struct axis *, unsigned long int log_start, unsigned long int phy_start, unsigned long int cnt); static void axis_remove (struct axis *, unsigned long int start, unsigned long int cnt); static void axis_move (struct axis *, unsigned long int old_start, unsigned long int new_start, unsigned long int cnt); static struct source *source_create_empty (size_t n_bytes); static struct source *source_create_casereader (struct casereader *); static struct source *source_clone (const struct source *); static void source_destroy (struct source *); static casenumber source_get_backing_n_rows (const struct source *); static int source_allocate_column (struct source *, int width); static void source_release_column (struct source *, int ofs, int width); static bool source_in_use (const struct source *); static bool source_read (const struct column *, casenumber row, union value *, size_t n); static bool source_write (const struct column *, casenumber row, const union value *, size_t n); static bool source_write_column (struct column *, const union value *); static bool source_has_backing (const struct source *); static int get_source_index (const struct datasheet *ds, const struct source *source); /* A datasheet is internally composed from a set of data files, called "sources". The sources that make up a datasheet must have the same number of rows (cases), but their numbers of columns (variables) may vary. A datasheet's external view is produced by mapping (permuting and selecting) its internal data. Thus, we can rearrange or delete rows or columns simply by modifying the mapping. We add rows by adding rows to each source and to the row mapping. We add columns by adding a new source, then adding that source to the column mapping. Each source in a datasheet can be a casereader or a sparse_xarray. Casereaders are read-only, so when sources made from casereaders need to be modified, it is done "virtually" through being overlaid by a sparse_xarray. */ struct source { struct range_set *avail; /* Free bytes are set to 1s. */ struct sparse_xarray *data; /* Data at top level, atop the backing. */ struct casereader *backing; /* Backing casereader (or null). */ casenumber backing_rows; /* Number of rows in backing (if backed). */ size_t n_used; /* Number of column in use (if backed). */ }; /* A logical column. */ struct column { struct source *source; /* Source of the underlying physical column. */ int value_ofs; /* If 'source' has a backing casereader, column's value offset in its cases. */ int byte_ofs; /* Byte offset in source's sparse_xarray. */ int width; /* 0=numeric, otherwise string width. */ }; /* A datasheet. */ struct datasheet { /* Data sources. */ struct source **sources; /* Sources, in no particular order. */ size_t n_sources; /* Number of sources. */ /* Columns. */ struct caseproto *proto; /* Prototype for rows (initialized lazily). */ struct column *columns; /* Logical to physical column mapping. */ size_t n_columns; /* Number of logical columns. */ unsigned column_min_alloc; /* Min. # of columns to put in a new source. */ /* Rows. */ struct axis *rows; /* Logical to physical row mapping. */ /* Tainting. */ struct taint *taint; /* Indicates corrupted data. */ }; /* Is this operation a read or a write? */ enum rw_op { OP_READ, OP_WRITE }; static void allocate_column (struct datasheet *, int width, struct column *); static void release_source (struct datasheet *, struct source *); static bool rw_case (struct datasheet *ds, enum rw_op op, casenumber lrow, size_t start_column, size_t n_columns, union value data[]); /* Returns the number of bytes needed to store a value with the given WIDTH on disk. */ static size_t width_to_n_bytes (int width) { return width == 0 ? sizeof (double) : width; } /* Returns the address of the data in VALUE (for reading or writing to/from disk). VALUE must have the given WIDTH. */ static void * value_to_data (const union value *value_, int width) { union value *value = (union value *) value_; assert (sizeof value->f == sizeof (double)); if (width == 0) return &value->f; else return value_str_rw (value, width); } /* Returns the number of bytes needed to store all the values in PROTO on disk. */ static size_t caseproto_to_n_bytes (const struct caseproto *proto) { size_t n_bytes; size_t i; n_bytes = 0; for (i = 0; i < caseproto_get_n_widths (proto); i++) { int width = caseproto_get_width (proto, i); if (width >= 0) n_bytes += width_to_n_bytes (width); } return n_bytes; } /* Creates and returns a new datasheet. If READER is nonnull, then the datasheet initially contains the contents of READER. */ struct datasheet * datasheet_create (struct casereader *reader) { struct datasheet *ds = xmalloc (sizeof *ds); ds->sources = NULL; ds->n_sources = 0; ds->proto = NULL; ds->columns = NULL; ds->n_columns = 0; ds->column_min_alloc = 8; ds->rows = axis_create (); ds->taint = taint_create (); if (reader != NULL) { casenumber n_rows; size_t byte_ofs; size_t i; taint_propagate (casereader_get_taint (reader), ds->taint); ds->proto = caseproto_ref (casereader_get_proto (reader)); ds->sources = xmalloc (sizeof *ds->sources); ds->sources[0] = source_create_casereader (reader); ds->n_sources = 1; ds->n_columns = caseproto_get_n_widths (ds->proto); ds->columns = xnmalloc (ds->n_columns, sizeof *ds->columns); byte_ofs = 0; for (i = 0; i < ds->n_columns; i++) { struct column *column = &ds->columns[i]; int width = caseproto_get_width (ds->proto, i); column->source = ds->sources[0]; column->width = width; if (width >= 0) { column->value_ofs = i; column->byte_ofs = byte_ofs; byte_ofs += width_to_n_bytes (column->width); } } n_rows = source_get_backing_n_rows (ds->sources[0]); if (n_rows > 0) axis_insert (ds->rows, 0, axis_extend (ds->rows, n_rows), n_rows); } return ds; } /* Destroys datasheet DS. */ void datasheet_destroy (struct datasheet *ds) { size_t i; if (ds == NULL) return; for (i = 0; i < ds->n_sources; i++) source_destroy (ds->sources[i]); free (ds->sources); caseproto_unref (ds->proto); free (ds->columns); axis_destroy (ds->rows); taint_destroy (ds->taint); free (ds); } /* Returns the prototype for the cases in DS. The caller must not unref the returned prototype. */ const struct caseproto * datasheet_get_proto (const struct datasheet *ds_) { struct datasheet *ds = CONST_CAST (struct datasheet *, ds_); if (ds->proto == NULL) { size_t i; ds->proto = caseproto_create (); for (i = 0; i < ds->n_columns; i++) ds->proto = caseproto_add_width (ds->proto, ds->columns[i].width); } return ds->proto; } /* Returns the width of the given COLUMN within DS. COLUMN must be less than the number of columns in DS. */ int datasheet_get_column_width (const struct datasheet *ds, size_t column) { assert (column < datasheet_get_n_columns (ds)); return ds->columns[column].width; } /* Moves datasheet DS to a new location in memory, and returns the new location. Afterward, the datasheet must not be accessed at its former location. This function is useful for ensuring that all references to a datasheet have been dropped, especially in conjunction with tools like Valgrind. */ struct datasheet * datasheet_rename (struct datasheet *ds) { struct datasheet *new = xmemdup (ds, sizeof *ds); free (ds); return new; } /* Returns true if datasheet DS is tainted. A datasheet is tainted by an I/O error or by taint propagation to the datasheet. */ bool datasheet_error (const struct datasheet *ds) { return taint_is_tainted (ds->taint); } /* Marks datasheet DS tainted. */ void datasheet_force_error (struct datasheet *ds) { taint_set_taint (ds->taint); } /* Returns datasheet DS's taint object. */ const struct taint * datasheet_get_taint (const struct datasheet *ds) { return ds->taint; } /* Returns the number of rows in DS. */ casenumber datasheet_get_n_rows (const struct datasheet *ds) { return axis_get_size (ds->rows); } /* Returns the number of columns in DS. */ size_t datasheet_get_n_columns (const struct datasheet *ds) { return ds->n_columns; } /* Inserts a column of the given WIDTH into datasheet DS just before column BEFORE. Initializes the contents of each row in the inserted column to VALUE (which must have width WIDTH). Returns true if successful, false on failure. In case of failure, the datasheet is unchanged. */ bool datasheet_insert_column (struct datasheet *ds, const union value *value, int width, size_t before) { struct column *col; assert (before <= ds->n_columns); ds->columns = xnrealloc (ds->columns, ds->n_columns + 1, sizeof *ds->columns); insert_element (ds->columns, ds->n_columns, sizeof *ds->columns, before); col = &ds->columns[before]; ds->n_columns++; allocate_column (ds, width, col); if (width >= 0 && !source_write_column (col, value)) { datasheet_delete_columns (ds, before, 1); taint_set_taint (ds->taint); return false; } return true; } /* Deletes the N columns in DS starting from column START. */ void datasheet_delete_columns (struct datasheet *ds, size_t start, size_t n) { assert (start + n <= ds->n_columns); if (n > 0) { size_t i; for (i = start; i < start + n; i++) { struct column *column = &ds->columns[i]; struct source *source = column->source; source_release_column (source, column->byte_ofs, column->width); release_source (ds, source); } remove_range (ds->columns, ds->n_columns, sizeof *ds->columns, start, n); ds->n_columns -= n; caseproto_unref (ds->proto); ds->proto = NULL; } } /* Moves the N columns in DS starting at position OLD_START so that they then start at position NEW_START. Equivalent to deleting the column rows, then inserting them at what becomes position NEW_START after the deletion. */ void datasheet_move_columns (struct datasheet *ds, size_t old_start, size_t new_start, size_t n) { assert (old_start + n <= ds->n_columns); assert (new_start + n <= ds->n_columns); move_range (ds->columns, ds->n_columns, sizeof *ds->columns, old_start, new_start, n); caseproto_unref (ds->proto); ds->proto = NULL; } struct resize_datasheet_value_aux { union value src_value; size_t src_ofs; int src_width; void (*resize_cb) (const union value *, union value *, const void *aux); const void *resize_cb_aux; union value dst_value; size_t dst_ofs; int dst_width; }; static bool resize_datasheet_value (const void *src, void *dst, void *aux_) { struct resize_datasheet_value_aux *aux = aux_; memcpy (value_to_data (&aux->src_value, aux->src_width), (uint8_t *) src + aux->src_ofs, width_to_n_bytes (aux->src_width)); aux->resize_cb (&aux->src_value, &aux->dst_value, aux->resize_cb_aux); memcpy ((uint8_t *) dst + aux->dst_ofs, value_to_data (&aux->dst_value, aux->dst_width), width_to_n_bytes (aux->dst_width)); return true; } bool datasheet_resize_column (struct datasheet *ds, size_t column, int new_width, void (*resize_cb) (const union value *, union value *, const void *aux), const void *resize_cb_aux) { struct column old_col; struct column *col; int old_width; assert (column < datasheet_get_n_columns (ds)); col = &ds->columns[column]; old_col = *col; old_width = old_col.width; if (new_width == -1) { if (old_width != -1) { datasheet_delete_columns (ds, column, 1); datasheet_insert_column (ds, NULL, -1, column); } } else if (old_width == -1) { union value value; value_init (&value, new_width); value_set_missing (&value, new_width); if (resize_cb != NULL) resize_cb (NULL, &value, resize_cb_aux); datasheet_delete_columns (ds, column, 1); datasheet_insert_column (ds, &value, new_width, column); value_destroy (&value, new_width); } else if (source_has_backing (col->source)) { unsigned long int n_rows = axis_get_size (ds->rows); unsigned long int lrow; union value src, dst; source_release_column (col->source, col->byte_ofs, col->width); allocate_column (ds, new_width, col); value_init (&src, old_width); value_init (&dst, new_width); for (lrow = 0; lrow < n_rows; lrow++) { unsigned long int prow = axis_map (ds->rows, lrow); if (!source_read (&old_col, prow, &src, 1)) { /* FIXME: back out col changes. */ break; } resize_cb (&src, &dst, resize_cb_aux); if (!source_write (col, prow, &dst, 1)) { /* FIXME: back out col changes. */ break; } } value_destroy (&src, old_width); value_destroy (&dst, new_width); if (lrow < n_rows) return false; release_source (ds, old_col.source); } else { struct resize_datasheet_value_aux aux; source_release_column (col->source, col->byte_ofs, col->width); allocate_column (ds, new_width, col); value_init (&aux.src_value, old_col.width); aux.src_ofs = old_col.byte_ofs; aux.src_width = old_col.width; aux.resize_cb = resize_cb; aux.resize_cb_aux = resize_cb_aux; value_init (&aux.dst_value, new_width); aux.dst_ofs = col->byte_ofs; aux.dst_width = new_width; sparse_xarray_copy (old_col.source->data, col->source->data, resize_datasheet_value, &aux); value_destroy (&aux.src_value, old_width); value_destroy (&aux.dst_value, new_width); release_source (ds, old_col.source); } return true; } /* Retrieves and returns the contents of the given ROW in datasheet DS. The caller owns the returned case and must unref it when it is no longer needed. Returns a null pointer on I/O error. */ struct ccase * datasheet_get_row (const struct datasheet *ds, casenumber row) { size_t n_columns = datasheet_get_n_columns (ds); struct ccase *c = case_create (datasheet_get_proto (ds)); if (rw_case (CONST_CAST (struct datasheet *, ds), OP_READ, row, 0, n_columns, case_data_all_rw (c))) return c; else { case_unref (c); return NULL; } } /* Stores the contents of case C, which is destroyed, into the given ROW in DS. Returns true on success, false on I/O error. On failure, the given ROW might be partially modified or corrupted. */ bool datasheet_put_row (struct datasheet *ds, casenumber row, struct ccase *c) { size_t n_columns = datasheet_get_n_columns (ds); bool ok = rw_case (ds, OP_WRITE, row, 0, n_columns, (union value *) case_data_all (c)); case_unref (c); return ok; } /* Stores the values of COLUMN in DS in the given ROW in DS into VALUE. The caller must have already initialized VALUE as a value of the appropriate width (as returned by datasheet_get_column_width (DS, COLUMN)). Returns true if successful, false on I/O error. */ bool datasheet_get_value (const struct datasheet *ds, casenumber row, size_t column, union value *value) { assert (row >= 0); return rw_case (CONST_CAST (struct datasheet *, ds), OP_READ, row, column, 1, value); } /* Stores VALUE into DS in the given ROW and COLUMN. VALUE must have the correct width for COLUMN (as returned by datasheet_get_column_width (DS, COLUMN)). Returns true if successful, false on I/O error. On failure, ROW might be partially modified or corrupted. */ bool datasheet_put_value (struct datasheet *ds UNUSED, casenumber row UNUSED, size_t column UNUSED, const union value *value UNUSED) { return rw_case (ds, OP_WRITE, row, column, 1, (union value *) value); } /* Inserts the CNT cases at C into datasheet DS just before row BEFORE. Returns true if successful, false on I/O error. On failure, datasheet DS is not modified. Regardless of success, this function unrefs all of the cases in C. */ bool datasheet_insert_rows (struct datasheet *ds, casenumber before, struct ccase *c[], casenumber cnt) { casenumber added = 0; while (cnt > 0) { unsigned long first_phy; unsigned long phy_cnt; unsigned long i; /* Allocate physical rows from the pool of available rows. */ if (!axis_allocate (ds->rows, cnt, &first_phy, &phy_cnt)) { /* No rows were available. Extend the row axis to make some new ones available. */ phy_cnt = cnt; first_phy = axis_extend (ds->rows, cnt); } /* Insert the new rows into the row mapping. */ axis_insert (ds->rows, before, first_phy, phy_cnt); /* Initialize the new rows. */ for (i = 0; i < phy_cnt; i++) if (!datasheet_put_row (ds, before + i, c[i])) { while (++i < cnt) case_unref (c[i]); datasheet_delete_rows (ds, before - added, phy_cnt + added); return false; } /* Advance. */ c += phy_cnt; cnt -= phy_cnt; before += phy_cnt; added += phy_cnt; } return true; } /* Deletes the CNT rows in DS starting from row FIRST. */ void datasheet_delete_rows (struct datasheet *ds, casenumber first, casenumber cnt) { size_t lrow; /* Free up rows for reuse. FIXME: optimize. */ for (lrow = first; lrow < first + cnt; lrow++) axis_make_available (ds->rows, axis_map (ds->rows, lrow), 1); /* Remove rows from logical-to-physical mapping. */ axis_remove (ds->rows, first, cnt); } /* Moves the CNT rows in DS starting at position OLD_START so that they then start at position NEW_START. Equivalent to deleting the given rows, then inserting them at what becomes position NEW_START after the deletion. */ void datasheet_move_rows (struct datasheet *ds, size_t old_start, size_t new_start, size_t cnt) { axis_move (ds->rows, old_start, new_start, cnt); } static const struct casereader_random_class datasheet_reader_class; /* Creates and returns a casereader whose input cases are the rows in datasheet DS. From the caller's perspective, DS is effectively destroyed by this operation, such that the caller must not reference it again. */ struct casereader * datasheet_make_reader (struct datasheet *ds) { struct casereader *reader; ds = datasheet_rename (ds); reader = casereader_create_random (datasheet_get_proto (ds), datasheet_get_n_rows (ds), &datasheet_reader_class, ds); taint_propagate (datasheet_get_taint (ds), casereader_get_taint (reader)); return reader; } /* "read" function for the datasheet random casereader. */ static struct ccase * datasheet_reader_read (struct casereader *reader UNUSED, void *ds_, casenumber case_idx) { struct datasheet *ds = ds_; if (case_idx < datasheet_get_n_rows (ds)) { struct ccase *c = datasheet_get_row (ds, case_idx); if (c == NULL) taint_set_taint (ds->taint); return c; } else return NULL; } /* "destroy" function for the datasheet random casereader. */ static void datasheet_reader_destroy (struct casereader *reader UNUSED, void *ds_) { struct datasheet *ds = ds_; datasheet_destroy (ds); } /* "advance" function for the datasheet random casereader. */ static void datasheet_reader_advance (struct casereader *reader UNUSED, void *ds_, casenumber case_cnt) { struct datasheet *ds = ds_; datasheet_delete_rows (ds, 0, case_cnt); } /* Random casereader class for a datasheet. */ static const struct casereader_random_class datasheet_reader_class = { datasheet_reader_read, datasheet_reader_destroy, datasheet_reader_advance, }; static void allocate_column (struct datasheet *ds, int width, struct column *column) { caseproto_unref (ds->proto); ds->proto = NULL; column->value_ofs = -1; column->width = width; if (width >= 0) { int n_bytes; size_t i; n_bytes = width_to_n_bytes (width); for (i = 0; i < ds->n_sources; i++) { column->source = ds->sources[i]; column->byte_ofs = source_allocate_column (column->source, n_bytes); if (column->byte_ofs >= 0) return; } column->source = source_create_empty (MAX (n_bytes, ds->column_min_alloc)); ds->sources = xnrealloc (ds->sources, ds->n_sources + 1, sizeof *ds->sources); ds->sources[ds->n_sources++] = column->source; ds->column_min_alloc = MIN (65536, ds->column_min_alloc * 2); column->byte_ofs = source_allocate_column (column->source, n_bytes); assert (column->byte_ofs >= 0); } else { column->source = NULL; column->byte_ofs = -1; } } static void release_source (struct datasheet *ds, struct source *source) { if (source_has_backing (source) && !source_in_use (source)) { /* Since only the first source to be added ever has a backing, this source must have index 0. */ assert (source == ds->sources[0]); ds->sources[0] = ds->sources[--ds->n_sources]; source_destroy (source); } } /* Reads (if OP is OP_READ) or writes (if op is OP_WRITE) the N_COLUMNS columns starting from column START_COLUMN in row LROW to/from the N_COLUMNS values in DATA. */ static bool rw_case (struct datasheet *ds, enum rw_op op, casenumber lrow, size_t start_column, size_t n_columns, union value data[]) { struct column *columns = &ds->columns[start_column]; casenumber prow; size_t i; assert (lrow < datasheet_get_n_rows (ds)); assert (n_columns <= datasheet_get_n_columns (ds)); assert (start_column + n_columns <= datasheet_get_n_columns (ds)); prow = axis_map (ds->rows, lrow); for (i = 0; i < n_columns; ) { struct source *source = columns[i].source; size_t j; bool ok; if (columns[i].width < 0) { i++; continue; } for (j = i + 1; j < n_columns; j++) if (columns[j].width < 0 || columns[j].source != source) break; if (op == OP_READ) ok = source_read (&columns[i], prow, &data[i], j - i); else ok = source_write (&columns[i], prow, &data[i], j - i); if (!ok) { taint_set_taint (ds->taint); return false; } i = j; } return true; } /* An axis. An axis has two functions. First, it maintains a mapping from logical (client-visible) to physical (storage) ordinates. The axis_map and axis_get_size functions inspect this mapping, and the axis_insert, axis_remove, and axis_move functions modify it. Second, it tracks the set of ordinates that are unused and available for reuse. The axis_allocate, axis_make_available, and axis_extend functions affect the set of available ordinates. */ struct axis { struct tower log_to_phy; /* Map from logical to physical ordinates; contains "struct axis_group"s. */ struct range_set *available; /* Set of unused, available ordinates. */ unsigned long int phy_size; /* Current physical length of axis. */ }; /* A mapping from logical to physical ordinates. */ struct axis_group { struct tower_node logical; /* Range of logical ordinates. */ unsigned long phy_start; /* First corresponding physical ordinate. */ }; static struct axis_group *axis_group_from_tower_node (struct tower_node *); static struct tower_node *make_axis_group (unsigned long int phy_start); static struct tower_node *split_axis (struct axis *, unsigned long int where); static void merge_axis_nodes (struct axis *, struct tower_node *, struct tower_node **other_node); static void check_axis_merged (const struct axis *axis UNUSED); /* Creates and returns a new, initially empty axis. */ static struct axis * axis_create (void) { struct axis *axis = xmalloc (sizeof *axis); tower_init (&axis->log_to_phy); axis->available = range_set_create (); axis->phy_size = 0; return axis; } /* Returns a clone of existing axis OLD. Currently this is used only by the datasheet model checker driver, but it could be otherwise useful. */ static struct axis * axis_clone (const struct axis *old) { const struct tower_node *node; struct axis *new; new = xmalloc (sizeof *new); tower_init (&new->log_to_phy); new->available = range_set_clone (old->available, NULL); new->phy_size = old->phy_size; for (node = tower_first (&old->log_to_phy); node != NULL; node = tower_next (&old->log_to_phy, node)) { unsigned long int size = tower_node_get_size (node); struct axis_group *group = tower_data (node, struct axis_group, logical); tower_insert (&new->log_to_phy, size, make_axis_group (group->phy_start), NULL); } return new; } /* Adds the state of AXIS to the MD4 hash context CTX. This is only used by the datasheet model checker driver. It is unlikely to be otherwise useful. */ static void axis_hash (const struct axis *axis, struct md4_ctx *ctx) { const struct tower_node *tn; const struct range_set_node *rsn; for (tn = tower_first (&axis->log_to_phy); tn != NULL; tn = tower_next (&axis->log_to_phy, tn)) { struct axis_group *group = tower_data (tn, struct axis_group, logical); unsigned long int phy_start = group->phy_start; unsigned long int size = tower_node_get_size (tn); md4_process_bytes (&phy_start, sizeof phy_start, ctx); md4_process_bytes (&size, sizeof size, ctx); } RANGE_SET_FOR_EACH (rsn, axis->available) { unsigned long int start = range_set_node_get_start (rsn); unsigned long int end = range_set_node_get_end (rsn); md4_process_bytes (&start, sizeof start, ctx); md4_process_bytes (&end, sizeof end, ctx); } md4_process_bytes (&axis->phy_size, sizeof axis->phy_size, ctx); } /* Destroys AXIS. */ static void axis_destroy (struct axis *axis) { if (axis == NULL) return; while (!tower_is_empty (&axis->log_to_phy)) { struct tower_node *node = tower_first (&axis->log_to_phy); struct axis_group *group = tower_data (node, struct axis_group, logical); tower_delete (&axis->log_to_phy, node); free (group); } range_set_destroy (axis->available); free (axis); } /* Allocates up to REQUEST contiguous unused and available ordinates from AXIS. If successful, stores the number obtained into *WIDTH and the ordinate of the first into *START, marks the ordinates as now unavailable return true. On failure, which occurs only if AXIS has no unused and available ordinates, returns false without modifying AXIS. */ static bool axis_allocate (struct axis *axis, unsigned long int request, unsigned long int *start, unsigned long int *width) { return range_set_allocate (axis->available, request, start, width); } /* Marks the WIDTH contiguous ordinates in AXIS, starting from START, as unused and available. */ static void axis_make_available (struct axis *axis, unsigned long int start, unsigned long int width) { range_set_set1 (axis->available, start, width); } /* Extends the total physical length of AXIS by WIDTH and returns the first ordinate in the new physical region. */ static unsigned long int axis_extend (struct axis *axis, unsigned long int width) { unsigned long int start = axis->phy_size; axis->phy_size += width; return start; } /* Returns the physical ordinate in AXIS corresponding to logical ordinate LOG_POS. LOG_POS must be less than the logical length of AXIS. */ static unsigned long int axis_map (const struct axis *axis, unsigned long log_pos) { struct tower_node *node; struct axis_group *group; unsigned long int group_start; node = tower_lookup (&axis->log_to_phy, log_pos, &group_start); group = tower_data (node, struct axis_group, logical); return group->phy_start + (log_pos - group_start); } /* Returns the logical length of AXIS. */ static unsigned long axis_get_size (const struct axis *axis) { return tower_height (&axis->log_to_phy); } /* Inserts the CNT contiguous physical ordinates starting at PHY_START into AXIS's logical-to-physical mapping, starting at logical position LOG_START. */ static void axis_insert (struct axis *axis, unsigned long int log_start, unsigned long int phy_start, unsigned long int cnt) { struct tower_node *before = split_axis (axis, log_start); struct tower_node *new = make_axis_group (phy_start); tower_insert (&axis->log_to_phy, cnt, new, before); merge_axis_nodes (axis, new, NULL); check_axis_merged (axis); } /* Removes CNT ordinates from AXIS's logical-to-physical mapping starting at logical position START. */ static void axis_remove (struct axis *axis, unsigned long int start, unsigned long int cnt) { if (cnt > 0) { struct tower_node *last = split_axis (axis, start + cnt); struct tower_node *cur, *next; for (cur = split_axis (axis, start); cur != last; cur = next) { next = tower_delete (&axis->log_to_phy, cur); free (axis_group_from_tower_node (cur)); } merge_axis_nodes (axis, last, NULL); check_axis_merged (axis); } } /* Moves the CNT ordinates in AXIS's logical-to-mapping starting at logical position OLD_START so that they then start at position NEW_START. */ static void axis_move (struct axis *axis, unsigned long int old_start, unsigned long int new_start, unsigned long int cnt) { if (cnt > 0 && old_start != new_start) { struct tower_node *old_first, *old_last, *new_first; struct tower_node *merge1, *merge2; struct tower tmp_array; /* Move ordinates OLD_START...(OLD_START + CNT) into new, separate TMP_ARRAY. */ old_first = split_axis (axis, old_start); old_last = split_axis (axis, old_start + cnt); tower_init (&tmp_array); tower_splice (&tmp_array, NULL, &axis->log_to_phy, old_first, old_last); merge_axis_nodes (axis, old_last, NULL); check_axis_merged (axis); /* Move TMP_ARRAY to position NEW_START. */ new_first = split_axis (axis, new_start); merge1 = tower_first (&tmp_array); merge2 = tower_last (&tmp_array); if (merge2 == merge1) merge2 = NULL; tower_splice (&axis->log_to_phy, new_first, &tmp_array, old_first, NULL); merge_axis_nodes (axis, merge1, &merge2); merge_axis_nodes (axis, merge2, NULL); check_axis_merged (axis); } } /* Returns the axis_group in which NODE is embedded. */ static struct axis_group * axis_group_from_tower_node (struct tower_node *node) { return tower_data (node, struct axis_group, logical); } /* Creates and returns a new axis_group at physical position PHY_START. */ static struct tower_node * make_axis_group (unsigned long phy_start) { struct axis_group *group = xmalloc (sizeof *group); group->phy_start = phy_start; return &group->logical; } /* Returns the tower_node in AXIS's logical-to-physical map whose bottom edge is at exact level WHERE. If there is no such tower_node in AXIS's logical-to-physical map, then split_axis creates one by breaking an existing tower_node into two separate ones, unless WHERE is equal to the tower height, in which case it simply returns a null pointer. */ static struct tower_node * split_axis (struct axis *axis, unsigned long int where) { unsigned long int group_start; struct tower_node *group_node; struct axis_group *group; assert (where <= tower_height (&axis->log_to_phy)); if (where >= tower_height (&axis->log_to_phy)) return NULL; group_node = tower_lookup (&axis->log_to_phy, where, &group_start); group = axis_group_from_tower_node (group_node); if (where > group_start) { unsigned long int size_1 = where - group_start; unsigned long int size_2 = tower_node_get_size (group_node) - size_1; struct tower_node *next = tower_next (&axis->log_to_phy, group_node); struct tower_node *new = make_axis_group (group->phy_start + size_1); tower_resize (&axis->log_to_phy, group_node, size_1); tower_insert (&axis->log_to_phy, size_2, new, next); return new; } else return &group->logical; } /* Within AXIS, attempts to merge NODE (or the last node in AXIS, if NODE is null) with its neighbor nodes. This is possible when logically adjacent nodes are also adjacent physically (in the same order). When a merge occurs, and OTHER_NODE is non-null and points to the node to be deleted, this function also updates *OTHER_NODE, if necessary, to ensure that it remains a valid pointer. */ static void merge_axis_nodes (struct axis *axis, struct tower_node *node, struct tower_node **other_node) { struct tower *t = &axis->log_to_phy; struct axis_group *group; struct tower_node *next, *prev; /* Find node to potentially merge with neighbors. */ if (node == NULL) node = tower_last (t); if (node == NULL) return; group = axis_group_from_tower_node (node); /* Try to merge NODE with successor. */ next = tower_next (t, node); if (next != NULL) { struct axis_group *next_group = axis_group_from_tower_node (next); unsigned long this_height = tower_node_get_size (node); if (group->phy_start + this_height == next_group->phy_start) { unsigned long next_height = tower_node_get_size (next); tower_resize (t, node, this_height + next_height); if (other_node != NULL && *other_node == next) *other_node = tower_next (t, *other_node); tower_delete (t, next); free (next_group); } } /* Try to merge NODE with predecessor. */ prev = tower_prev (t, node); if (prev != NULL) { struct axis_group *prev_group = axis_group_from_tower_node (prev); unsigned long prev_height = tower_node_get_size (prev); if (prev_group->phy_start + prev_height == group->phy_start) { unsigned long this_height = tower_node_get_size (node); group->phy_start = prev_group->phy_start; tower_resize (t, node, this_height + prev_height); if (other_node != NULL && *other_node == prev) *other_node = tower_next (t, *other_node); tower_delete (t, prev); free (prev_group); } } } /* Verify that all potentially merge-able nodes in AXIS are actually merged. */ static void check_axis_merged (const struct axis *axis UNUSED) { #if ASSERT_LEVEL >= 10 struct tower_node *prev, *node; for (prev = NULL, node = tower_first (&axis->log_to_phy); node != NULL; prev = node, node = tower_next (&axis->log_to_phy, node)) if (prev != NULL) { struct axis_group *prev_group = axis_group_from_tower_node (prev); unsigned long prev_height = tower_node_get_size (prev); struct axis_group *node_group = axis_group_from_tower_node (node); assert (prev_group->phy_start + prev_height != node_group->phy_start); } #endif } /* A source. */ /* Creates and returns an empty, unbacked source with N_BYTES bytes per case, none of which are initially in use. */ static struct source * source_create_empty (size_t n_bytes) { struct source *source = xmalloc (sizeof *source); size_t row_size = n_bytes + 4 * sizeof (void *); size_t max_memory_rows = settings_get_workspace () / row_size; source->avail = range_set_create (); range_set_set1 (source->avail, 0, n_bytes); source->data = sparse_xarray_create (n_bytes, MAX (max_memory_rows, 4)); source->backing = NULL; source->backing_rows = 0; source->n_used = 0; return source; } /* Creates and returns a new source backed by READER and with the same initial dimensions and content. */ static struct source * source_create_casereader (struct casereader *reader) { const struct caseproto *proto = casereader_get_proto (reader); size_t n_bytes = caseproto_to_n_bytes (proto); struct source *source = source_create_empty (n_bytes); size_t n_columns; size_t i; range_set_set0 (source->avail, 0, n_bytes); source->backing = reader; source->backing_rows = casereader_count_cases (reader); source->n_used = 0; n_columns = caseproto_get_n_widths (proto); for (i = 0; i < n_columns; i++) if (caseproto_get_width (proto, i) >= 0) source->n_used++; return source; } /* Returns a clone of source OLD with the same data and backing (if any). Currently this is used only by the datasheet model checker driver, but it could be otherwise useful. */ static struct source * source_clone (const struct source *old) { struct source *new = xmalloc (sizeof *new); new->avail = range_set_clone (old->avail, NULL); new->data = sparse_xarray_clone (old->data); new->backing = old->backing != NULL ? casereader_clone (old->backing) : NULL; new->backing_rows = old->backing_rows; new->n_used = old->n_used; if (new->data == NULL) { source_destroy (new); new = NULL; } return new; } static int source_allocate_column (struct source *source, int width) { unsigned long int start; int n_bytes; assert (width >= 0); n_bytes = width_to_n_bytes (width); if (source->backing == NULL && range_set_allocate_fully (source->avail, n_bytes, &start)) return start; else return -1; } static void source_release_column (struct source *source, int ofs, int width) { assert (width >= 0); range_set_set1 (source->avail, ofs, width_to_n_bytes (width)); if (source->backing != NULL) source->n_used--; } /* Returns true if SOURCE has any columns in use, false otherwise. */ static bool source_in_use (const struct source *source) { return source->n_used > 0; } /* Destroys SOURCE and its data and backing, if any. */ static void source_destroy (struct source *source) { if (source != NULL) { range_set_destroy (source->avail); sparse_xarray_destroy (source->data); casereader_destroy (source->backing); free (source); } } /* Returns the number of rows in SOURCE's backing casereader (SOURCE must have a backing casereader). */ static casenumber source_get_backing_n_rows (const struct source *source) { assert (source_has_backing (source)); return source->backing_rows; } /* Reads the N COLUMNS in the given ROW, into the N VALUES. Returns true if successful, false on I/O error. All of the COLUMNS must have the same source. The caller must have initialized VALUES with the proper width. */ static bool source_read (const struct column columns[], casenumber row, union value values[], size_t n) { struct source *source = columns[0].source; size_t i; if (source->backing == NULL || sparse_xarray_contains_row (source->data, row)) { bool ok = true; for (i = 0; i < n && ok; i++) ok = sparse_xarray_read (source->data, row, columns[i].byte_ofs, width_to_n_bytes (columns[i].width), value_to_data (&values[i], columns[i].width)); return ok; } else { struct ccase *c = casereader_peek (source->backing, row); bool ok = c != NULL; if (ok) { for (i = 0; i < n; i++) value_copy (&values[i], case_data_idx (c, columns[i].value_ofs), columns[i].width); case_unref (c); } return ok; } } static bool copy_case_into_source (struct source *source, struct ccase *c, casenumber row) { const struct caseproto *proto = casereader_get_proto (source->backing); size_t n_widths = caseproto_get_n_widths (proto); size_t ofs; size_t i; ofs = 0; for (i = 0; i < n_widths; i++) { int width = caseproto_get_width (proto, i); if (width >= 0) { int n_bytes = width_to_n_bytes (width); if (!sparse_xarray_write (source->data, row, ofs, n_bytes, value_to_data (case_data_idx (c, i), width))) return false; ofs += n_bytes; } } return true; } /* Writes the N VALUES to their source in the given ROW and COLUMNS. Returns true if successful, false on I/O error. On error, the row's data may be completely or partially corrupted, both inside and outside the region to be written. All of the COLUMNS must have the same source. */ static bool source_write (const struct column columns[], casenumber row, const union value values[], size_t n) { struct source *source = columns[0].source; struct casereader *backing = source->backing; size_t i; if (backing != NULL && !sparse_xarray_contains_row (source->data, row) && row < source->backing_rows) { struct ccase *c; bool ok; c = casereader_peek (backing, row); if (c == NULL) return false; ok = copy_case_into_source (source, c, row); case_unref (c); if (!ok) return false; } for (i = 0; i < n; i++) if (!sparse_xarray_write (source->data, row, columns[i].byte_ofs, width_to_n_bytes (columns[i].width), value_to_data (&values[i], columns[i].width))) return false; return true; } /* Within SOURCE, which must not have a backing casereader, writes the VALUE_CNT values in VALUES_CNT to the VALUE_CNT columns starting from START_COLUMN, in every row, even in rows not yet otherwise initialized. Returns true if successful, false if an I/O error occurs. We don't support backing != NULL because (1) it's harder and (2) this function is only called by datasheet_insert_column, which doesn't reuse columns from sources that are backed by casereaders. */ static bool source_write_column (struct column *column, const union value *value) { int width = column->width; assert (column->source->backing == NULL); assert (width >= 0); return sparse_xarray_write_columns (column->source->data, column->byte_ofs, width_to_n_bytes (width), value_to_data (value, width)); } /* Returns true if SOURCE has a backing casereader, false otherwise. */ static bool source_has_backing (const struct source *source) { return source->backing != NULL; } /* Datasheet model checker test driver. */ static int get_source_index (const struct datasheet *ds, const struct source *source) { size_t i; for (i = 0; i < ds->n_sources; i++) if (ds->sources[i] == source) return i; NOT_REACHED (); } /* Clones the structure and contents of ODS into a new datasheet, and returns the new datasheet. */ struct datasheet * clone_datasheet (const struct datasheet *ods) { struct datasheet *ds; size_t i; ds = xmalloc (sizeof *ds); ds->sources = xmalloc (ods->n_sources * sizeof *ds->sources); for (i = 0; i < ods->n_sources; i++) ds->sources[i] = source_clone (ods->sources[i]); ds->n_sources = ods->n_sources; ds->proto = ods->proto != NULL ? caseproto_ref (ods->proto) : NULL; ds->columns = xmemdup (ods->columns, ods->n_columns * sizeof *ods->columns); for (i = 0; i < ods->n_columns; i++) ds->columns[i].source = ds->sources[get_source_index (ods, ods->columns[i].source)]; ds->n_columns = ods->n_columns; ds->column_min_alloc = ods->column_min_alloc; ds->rows = axis_clone (ods->rows); ds->taint = taint_create (); return ds; } /* Hashes the structure of datasheet DS and returns the hash. We use MD4 because it is much faster than MD5 or SHA-1 but its collision resistance is just as good. */ unsigned int hash_datasheet (const struct datasheet *ds) { unsigned int hash[DIV_RND_UP (20, sizeof (unsigned int))]; struct md4_ctx ctx; size_t i; md4_init_ctx (&ctx); for (i = 0; i < ds->n_columns; i++) { const struct column *column = &ds->columns[i]; int source_n_bytes = sparse_xarray_get_n_columns (column->source->data); md4_process_bytes (&source_n_bytes, sizeof source_n_bytes, &ctx); /*md4_process_bytes (&column->byte_ofs, sizeof column->byte_ofs, &ctx);*/ md4_process_bytes (&column->value_ofs, sizeof column->value_ofs, &ctx); md4_process_bytes (&column->width, sizeof column->width, &ctx); } axis_hash (ds->rows, &ctx); md4_process_bytes (&ds->column_min_alloc, sizeof ds->column_min_alloc, &ctx); md4_finish_ctx (&ctx, hash); return hash[0]; } pspp-1.0.1/src/data/attributes.c0000644000175000017500000002433213150617240013451 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011, 2012, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/attributes.h" #include #include #include "libpspp/array.h" #include "libpspp/compiler.h" #include "libpspp/hash-functions.h" #include "libpspp/i18n.h" #include "gl/xalloc.h" /* A custom attribute of the sort maintained by the DATAFILE ATTRIBUTE and VARIABLE ATTRIBUTE commands. Attributes have a name (the rules for which are the same as those for PSPP variable names) and one or more values, each of which is a string. An attribute may be part of one attribute set. */ struct attribute { struct hmap_node node; /* Used by attrset. */ char *name; /* Name. */ char **values; /* Each value. */ size_t n_values; /* Number of values. */ size_t allocated_values; /* Amount of allocated space for values. */ }; /* Creates and returns a new attribute with the given NAME. The attribute initially has no values. (Attributes with no values cannot be saved to system files, so at least one value should be added before the attribute is made available to the PSPP user.) */ struct attribute * attribute_create (const char *name) { struct attribute *attr = xmalloc (sizeof *attr); attr->name = xstrdup (name); attr->values = NULL; attr->n_values = 0; attr->allocated_values = 0; return attr; } /* Creates and returns a new attribute with the same name and values as ORIG. */ struct attribute * attribute_clone (const struct attribute *orig) { struct attribute *attr; size_t i; attr = attribute_create (orig->name); for (i = 0; i < orig->n_values; i++) attribute_add_value (attr, orig->values[i]); return attr; } /* Destroys ATTR and frees all associated memory. This function must not be called if ATTR is part of an attribute set. Use attrset_delete() instead. */ void attribute_destroy (struct attribute *attr) { if (attr != NULL) { size_t i; for (i = 0; i < attr->n_values; i++) free (attr->values[i]); free (attr->values); free (attr->name); free (attr); } } /* Returns the name of ATTR. The caller must not free or modify the returned string. */ const char * attribute_get_name (const struct attribute *attr) { return attr->name; } /* Returns ATTR's value with the given INDEX, or a null pointer if INDEX is greater than or equal to the number of values in ATTR (that is, attributes are numbered starting from 0). The caller must not free or modify the returned string. */ const char * attribute_get_value (const struct attribute *attr, size_t index) { return index < attr->n_values ? attr->values[index] : NULL; } /* Returns ATTR's number of values. */ size_t attribute_get_n_values (const struct attribute *attrs) { return attrs->n_values; } /* Adds a copy of VALUE as a new value to ATTR. The caller retains ownership of VALUE. */ void attribute_add_value (struct attribute *attr, const char *value) { if (attr->n_values >= attr->allocated_values) attr->values = x2nrealloc (attr->values, &attr->allocated_values, sizeof *attr->values); attr->values[attr->n_values++] = xstrdup (value); } /* Adds or replaces the value with the given INDEX in ATTR by a copy of VALUE. The caller retains ownership of VALUE. If INDEX is an existing value index, that value is replaced. If no value index numbered INDEX exists in ATTR, then it is added, and any values intermediate between the last maximum index and INDEX are set to the empty string. */ void attribute_set_value (struct attribute *attr, size_t index, const char *value) { if (index < attr->n_values) { /* Replace existing value. */ free (attr->values[index]); attr->values[index] = xstrdup (value); } else { /* Add new value. */ while (index > attr->n_values) attribute_add_value (attr, ""); attribute_add_value (attr, value); } } /* Deletes the value with the given INDEX from ATTR. Any values with higher-numbered indexes are shifted down into the gap that this creates. If INDEX is greater than the maximum index, this has no effect.*/ void attribute_del_value (struct attribute *attr, size_t index) { if (index < attr->n_values) { free (attr->values[index]); remove_element (attr->values, attr->n_values, sizeof *attr->values, index); attr->n_values--; } } /* Initializes SET as a new, initially empty attibute set. */ void attrset_init (struct attrset *set) { hmap_init (&set->map); } /* Initializes NEW_SET as a new attribute set whose contents are initially the same as that of OLD_SET. */ void attrset_clone (struct attrset *new_set, const struct attrset *old_set) { struct attribute *old_attr; attrset_init (new_set); HMAP_FOR_EACH (old_attr, struct attribute, node, &old_set->map) { struct attribute *new_attr = attribute_clone (old_attr); hmap_insert (&new_set->map, &new_attr->node, hmap_node_hash (&old_attr->node)); } } /* Frees the storage associated with SET, if SET is nonnull. (Does not free SET itself.) */ void attrset_destroy (struct attrset *set) { if (set != NULL) { struct attribute *attr, *next; HMAP_FOR_EACH_SAFE (attr, next, struct attribute, node, &set->map) attribute_destroy (attr); hmap_destroy (&set->map); } } /* Returns the number of attributes in SET. */ size_t attrset_count (const struct attrset *set) { return hmap_count (&set->map); } /* Returns the attribute in SET whose name matches NAME case-insensitively, or a null pointer if SET does not contain an attribute with that name. */ struct attribute * attrset_lookup (const struct attrset *set, const char *name) { const struct attribute *attr; HMAP_FOR_EACH_WITH_HASH (attr, struct attribute, node, utf8_hash_case_string (name, 0), &set->map) if (!utf8_strcasecmp (attribute_get_name (attr), name)) break; return CONST_CAST (struct attribute *, attr); } /* Adds ATTR to SET. Succeeds and returns true if SET does not already contain an attribute with the same name (matched case insensitively); otherwise fails and returns false. On success only, ownership of ATTR is transferred to SET. */ bool attrset_try_add (struct attrset *set, struct attribute *attr) { const char *name = attribute_get_name (attr); if (attrset_lookup (set, name)) return false; hmap_insert (&set->map, &attr->node, utf8_hash_case_string (name, 0)); return true; } /* Adds ATTR to SET, which must not already contain an attribute with the same name (matched case insensitively). Ownership of ATTR is transferred to SET. */ void attrset_add (struct attrset *set, struct attribute *attr) { bool ok UNUSED = attrset_try_add (set, attr); assert (ok); } /* Deletes any attribute from SET that matches NAME (case-insensitively). */ void attrset_delete (struct attrset *set, const char *name) { struct attribute *attr = attrset_lookup (set, name); if (attr != NULL) { hmap_delete (&set->map, &attr->node); attribute_destroy (attr); } } /* Deletes all attributes from SET. */ void attrset_clear (struct attrset *set) { attrset_destroy (set); attrset_init (set); } static struct attribute *iterator_data (struct attrset_iterator *iterator) { return HMAP_NULLABLE_DATA (iterator->node, struct attribute, node); } /* Returns the first attribute in SET and initializes ITERATOR. If SET is empty, returns a null pointer. The caller must not destroy the returned attribute, but it may add or remove values. Attributes are visited in no particular order. Calling attrset_add() during iteration can cause some attributes to be visited more than once and others not at all. */ struct attribute * attrset_first (const struct attrset *set, struct attrset_iterator *iterator) { iterator->node = hmap_first (&set->map); return iterator_data (iterator); } /* Returns the next attribute in SET and advances ITERATOR, which should have been initialized by calling attrset_first(). If all the attributes in SET have already been visited, returns a null pointer. The caller must not destroy the returned attribute, but it may add or remove values. Attributes are visited in no particular order. Calling attrset_add() during iteration can cause some attributes to be visited more than once and others not at all. */ struct attribute * attrset_next (const struct attrset *set, struct attrset_iterator *iterator) { iterator->node = hmap_next (&set->map, iterator->node); return iterator_data (iterator); } static int compare_attribute_by_name (const void *a_, const void *b_) { const struct attribute *const *a = a_; const struct attribute *const *b = b_; return strcmp ((*a)->name, (*b)->name); } /* Allocates and returns an array of pointers to attributes that is sorted by attribute name. The array has 'attrset_count (SET)' elements. The caller is responsible for freeing the array. */ struct attribute ** attrset_sorted (const struct attrset *set) { if (set != NULL && attrset_count (set) > 0) { struct attribute **attrs; struct attribute *attr; size_t i; attrs = xmalloc (attrset_count (set) * sizeof *attrs); i = 0; HMAP_FOR_EACH (attr, struct attribute, node, &set->map) attrs[i++] = attr; assert (i == attrset_count (set)); qsort (attrs, attrset_count (set), sizeof *attrs, compare_attribute_by_name); return attrs; } else return NULL; } pspp-1.0.1/src/data/case.h0000644000175000017500000001404412476227410012210 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_CASE_H #define DATA_CASE_H 1 #include #include #include #include #include "libpspp/compiler.h" #include "data/caseproto.h" struct variable; /* A count of cases or the index of a case within a collection of them. */ #define CASENUMBER_MAX LONG_MAX typedef long int casenumber; /* Reference-counted case implementation. A newly created case has a single owner (the code that created it), represented by an initial reference count of 1. Other code that receives the case may keep a virtual copy of it by calling case_ref, which increments the case's reference count. When this is done, the case becomes shared between its original owner and each piece of code that incremented the reference count. A shared case (one whose reference count is greater than 1) must not be modified, because this would make the case change in the view of every reference count holder, not just the one that intended to change the case. Because the purpose of keeping the reference count is to make a virtual copy of the case, this is undesirable behavior. The case_unshare function provides a solution, by making a new, unshared copy of a shared case. */ struct ccase { struct caseproto *proto; /* Case prototype. */ size_t ref_cnt; /* Reference count. */ union value values[1]; /* Values. */ }; struct ccase *case_create (const struct caseproto *) MALLOC_LIKE; struct ccase *case_try_create (const struct caseproto *) MALLOC_LIKE; struct ccase *case_clone (const struct ccase *) MALLOC_LIKE; static inline struct ccase *case_unshare (struct ccase *) WARN_UNUSED_RESULT; struct ccase *case_ref (const struct ccase *) WARN_UNUSED_RESULT; static inline void case_unref (struct ccase *); static inline bool case_is_shared (const struct ccase *); static inline size_t case_get_value_cnt (const struct ccase *); static inline const struct caseproto *case_get_proto (const struct ccase *); size_t case_get_cost (const struct caseproto *); struct ccase *case_resize (struct ccase *, const struct caseproto *) WARN_UNUSED_RESULT; struct ccase *case_unshare_and_resize (struct ccase *, const struct caseproto *) WARN_UNUSED_RESULT; void case_set_missing (struct ccase *); void case_copy (struct ccase *dst, size_t dst_idx, const struct ccase *src, size_t src_idx, size_t cnt); void case_copy_out (const struct ccase *, size_t start_idx, union value *, size_t n_values); void case_copy_in (struct ccase *, size_t start_idx, const union value *, size_t n_values); const union value *case_data (const struct ccase *, const struct variable *); const union value *case_data_idx (const struct ccase *, size_t idx); union value *case_data_rw (struct ccase *, const struct variable *); union value *case_data_rw_idx (struct ccase *, size_t idx); double case_num (const struct ccase *, const struct variable *); double case_num_idx (const struct ccase *, size_t idx); const uint8_t *case_str (const struct ccase *, const struct variable *); const uint8_t *case_str_idx (const struct ccase *, size_t idx); uint8_t *case_str_rw (struct ccase *, const struct variable *); uint8_t *case_str_rw_idx (struct ccase *, size_t idx); int case_compare (const struct ccase *, const struct ccase *, const struct variable *const *, size_t n_vars); int case_compare_2dict (const struct ccase *, const struct ccase *, const struct variable *const *, const struct variable *const *, size_t n_vars); const union value *case_data_all (const struct ccase *); union value *case_data_all_rw (struct ccase *); struct ccase *case_unshare__ (struct ccase *); void case_unref__ (struct ccase *); /* If C is a shared case, that is, if it has a reference count greater than 1, makes a new unshared copy and returns it, decrementing C's reference count. If C is not shared (its reference count is 1), returns C. This function should be used before attempting to modify any of the data in a case that might be shared, e.g.: c = case_unshare (c); // Make sure that C is not shared. case_data_rw (c, myvar)->f = 1; // Modify data in C. */ static inline struct ccase * case_unshare (struct ccase *c) { if (case_is_shared (c)) c = case_unshare__ (c); return c; } /* Decrements case C's reference count. Frees C if its reference count drops to 0. If C is a null pointer, this function has no effect. */ static inline void case_unref (struct ccase *c) { if (c != NULL && !--c->ref_cnt) case_unref__ (c); } /* Returns true if case C is shared. A case that is shared cannot be modified directly. Instead, an unshared copy must first be made with case_unshare(). */ static inline bool case_is_shared (const struct ccase *c) { return c->ref_cnt > 1; } /* Returns the number of union values in C. */ static inline size_t case_get_value_cnt (const struct ccase *c) { return caseproto_get_n_widths (c->proto); } /* Returns the prototype that describes the format of case C. The caller must not unref the returned prototype. */ static inline const struct caseproto * case_get_proto (const struct ccase *c) { return c->proto; } #endif /* data/case.h */ pspp-1.0.1/src/data/calendar.h0000644000175000017500000000222413137223525013041 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef CALENDAR_H #define CALENDAR_H 1 double calendar_gregorian_to_offset (int y, int m, int d, char **errorp); void calendar_offset_to_gregorian (int ofs, int *y, int *m, int *d, int *yd); int calendar_offset_to_year (int ofs); int calendar_offset_to_month (int ofs); int calendar_offset_to_mday (int ofs); int calendar_offset_to_yday (int ofs); int calendar_offset_to_wday (int ofs); int calendar_days_in_month (int y, int m); #endif /* calendar.h */ pspp-1.0.1/src/data/vardict.h0000644000175000017500000000366112470434665012742 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_VARDICT_H #define DATA_VARDICT_H 1 /* Interface between dictionary and variable code. This header file should only be included by variable.c and dictionary.c. */ struct dictionary ; /* Binds a variable to a dictionary. */ struct vardict_info { struct dictionary *dict; struct variable *var; struct hmap_node name_node; /* In struct dictionary's name_map. */ int case_index; /* Index into case of variable data. */ }; /* Called by dictionary code, defined in variable.c. */ struct vardict_info *var_get_vardict (const struct variable *); void var_set_vardict (struct variable *, struct vardict_info *); bool var_has_vardict (const struct variable *); void var_clear_vardict (struct variable *); /* Called by variable.c, defined in dictionary.c. */ void dict_var_changed (const struct variable *v, unsigned int what, struct variable *ov); int vardict_get_dict_index (const struct vardict_info *); static inline int vardict_get_case_index (const struct vardict_info *vardict) { return vardict->case_index; } static inline struct dictionary * vardict_get_dictionary (const struct vardict_info *vardict) { return vardict->dict; } #endif /* data/vardict.h */ pspp-1.0.1/src/data/casewriter.h0000644000175000017500000000376412470243700013446 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_CASEWRITER_H #define DATA_CASEWRITER_H 1 #include #include "data/transformations.h" #include "libpspp/compiler.h" struct casewriter; void casewriter_write (struct casewriter *, struct ccase *); bool casewriter_destroy (struct casewriter *); const struct caseproto *casewriter_get_proto (const struct casewriter *); struct casereader *casewriter_make_reader (struct casewriter *); struct casewriter *casewriter_rename (struct casewriter *); bool casewriter_error (const struct casewriter *); void casewriter_force_error (struct casewriter *); const struct taint *casewriter_get_taint (const struct casewriter *); struct casewriter *mem_writer_create (const struct caseproto *); struct casewriter *tmpfile_writer_create (const struct caseproto *); struct casewriter *autopaging_writer_create (const struct caseproto *); struct casewriter * casewriter_create_translator (struct casewriter *, const struct caseproto *translated_proto, struct ccase *(*translate) (struct ccase *input, void *aux), bool (*destroy) (void *aux), void *aux); #endif /* data/casewriter.h */ pspp-1.0.1/src/data/casegrouper.c0000644000175000017500000001740313137223525013607 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/casegrouper.h" #include #include "data/casereader.h" #include "data/casewriter.h" #include "data/dictionary.h" #include "data/subcase.h" #include "libpspp/taint.h" #include "gl/xalloc.h" /* A casegrouper. */ struct casegrouper { struct casereader *reader; /* Source of input cases. */ struct taint *taint; /* Error status for casegrouper. */ /* Functions for grouping cases. */ bool (*same_group) (const struct ccase *, const struct ccase *, void *aux); void (*destroy) (void *aux); void *aux; }; /* Creates and returns a new casegrouper that takes its input from READER. SAME_GROUP is used to decide which cases are in a group: it returns true if the pair of cases provided are in the same group, false otherwise. DESTROY will be called when the casegrouper is destroyed and should free any storage needed by SAME_GROUP. Takes ownerhip of READER. SAME_GROUP may be a null pointer. If so, READER's entire contents is considered to be a single group. */ struct casegrouper * casegrouper_create_func (struct casereader *reader, bool (*same_group) (const struct ccase *, const struct ccase *, void *aux), void (*destroy) (void *aux), void *aux) { struct casegrouper *grouper = xmalloc (sizeof *grouper); grouper->reader = casereader_rename (reader); grouper->taint = taint_clone (casereader_get_taint (grouper->reader)); grouper->same_group = same_group; grouper->destroy = destroy; grouper->aux = aux; return grouper; } /* Obtains the next group of cases from GROUPER. Returns true if successful, false if no groups remain. If successful, *READER is set to the casereader for the new group; otherwise, it is set to NULL. */ bool casegrouper_get_next_group (struct casegrouper *grouper, struct casereader **reader) { /* FIXME: we really shouldn't need a temporary casewriter for the common case where we read an entire group's data before going on to the next. */ if (grouper->same_group != NULL) { struct casewriter *writer; struct ccase *group_case, *tmp; group_case = casereader_read (grouper->reader); if (group_case == NULL) { *reader = NULL; return false; } writer = autopaging_writer_create ( casereader_get_proto (grouper->reader)); casewriter_write (writer, case_ref (group_case)); while ((tmp = casereader_peek (grouper->reader, 0)) != NULL && grouper->same_group (group_case, tmp, grouper->aux)) { case_unref (casereader_read (grouper->reader)); casewriter_write (writer, tmp); } case_unref (tmp); case_unref (group_case); *reader = casewriter_make_reader (writer); return true; } else { if (grouper->reader != NULL) { if (!casereader_is_empty (grouper->reader)) { *reader = grouper->reader; grouper->reader = NULL; return true; } else { casereader_destroy (grouper->reader); grouper->reader = NULL; return false; } } else { *reader = NULL; return false; } } } /* Destroys GROUPER. Returns false if GROUPER's input casereader or any state derived from it had become tainted, which means that an I/O error or other serious error occurred in processing data derived from GROUPER; otherwise, return true. */ bool casegrouper_destroy (struct casegrouper *grouper) { if (grouper != NULL) { struct taint *taint = grouper->taint; bool ok; casereader_destroy (grouper->reader); if (grouper->destroy != NULL) grouper->destroy (grouper->aux); free (grouper); ok = !taint_has_tainted_successor (taint); taint_destroy (taint); return ok; } else return true; } /* Casegrouper based on equal values of variables from case to case. */ static bool casegrouper_vars_same_group (const struct ccase *, const struct ccase *, void *); static void casegrouper_vars_destroy (void *); /* Creates and returns a casegrouper that reads data from READER and breaks it into contiguous groups of cases that have equal values for the VAR_CNT variables in VARS. If VAR_CNT is 0, then all the cases will be put in a single group. Takes ownerhip of READER. */ struct casegrouper * casegrouper_create_vars (struct casereader *reader, const struct variable *const *vars, size_t var_cnt) { if (var_cnt > 0) { struct subcase *sc = xmalloc (sizeof *sc); subcase_init_vars (sc, vars, var_cnt); return casegrouper_create_func (reader, casegrouper_vars_same_group, casegrouper_vars_destroy, sc); } else return casegrouper_create_func (reader, NULL, NULL, NULL); } /* Creates and returns a casegrouper that reads data from READER and breaks it into contiguous groups of cases that have equal values for the SPLIT FILE variables in DICT. If DICT has no SPLIT FILE variables, then all the cases will be put into a single group. Takes ownerhip of READER. */ struct casegrouper * casegrouper_create_splits (struct casereader *reader, const struct dictionary *dict) { return casegrouper_create_vars (reader, dict_get_split_vars (dict), dict_get_split_cnt (dict)); } /* Creates and returns a casegrouper that reads data from READER and breaks it into contiguous groups of cases that have equal values for the variables used for sorting in SC. If SC is empty (contains no fields), then all the cases will be put into a single group. Takes ownerhip of READER. */ struct casegrouper * casegrouper_create_subcase (struct casereader *reader, const struct subcase *sc) { if (subcase_get_n_fields (sc) > 0) { struct subcase *sc_copy = xmalloc (sizeof *sc); subcase_clone (sc_copy, sc); return casegrouper_create_func (reader, casegrouper_vars_same_group, casegrouper_vars_destroy, sc_copy); } else return casegrouper_create_func (reader, NULL, NULL, NULL); } /* "same_group" function for an equal-variables casegrouper. */ static bool casegrouper_vars_same_group (const struct ccase *a, const struct ccase *b, void *sc_) { struct subcase *sc = sc_; return subcase_equal (sc, a, sc, b); } /* "destroy" for an equal-variables casegrouper. */ static void casegrouper_vars_destroy (void *sc_) { struct subcase *sc = sc_; if (sc != NULL) { subcase_destroy (sc); free (sc); } } pspp-1.0.1/src/data/dataset-writer.h0000644000175000017500000000201112470243700014215 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATASET_WRITER_H #define DATASET_WRITER_H 1 #include struct dictionary; struct file_handle; struct casewriter *dataset_writer_open (struct file_handle *, const struct dictionary *); #endif /* dataset-writer.h */ pspp-1.0.1/src/data/case.c0000644000175000017500000003612213137223525012202 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/case.h" #include #include #include #include "data/value.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/str.h" #include "gl/minmax.h" #include "gl/xalloc.h" /* Set this flag to 1 to copy cases instead of ref counting them. This is sometimes helpful in debugging situations. */ #define DEBUG_CASEREFS 0 #if DEBUG_CASEREFS #warning "Caseref debug enabled. CASES ARE NOT BEING SHARED!!" #endif static size_t case_size (const struct caseproto *); static bool variable_matches_case (const struct ccase *, const struct variable *); static void copy_forward (struct ccase *dst, size_t dst_idx, const struct ccase *src, size_t src_idx, size_t n_values); static void copy_backward (struct ccase *dst, size_t dst_idx, const struct ccase *src, size_t src_idx, size_t n_values); /* Creates and returns a new case that stores data of the form specified by PROTO. The data in the case have indeterminate contents until explicitly written. The caller retains ownership of PROTO. */ struct ccase * case_create (const struct caseproto *proto) { struct ccase *c = case_try_create (proto); if (c == NULL) xalloc_die (); return c; } /* Like case_create, but returns a null pointer if not enough memory is available. */ struct ccase * case_try_create (const struct caseproto *proto) { struct ccase *c = malloc (case_size (proto)); if (c != NULL) { if (caseproto_try_init_values (proto, c->values)) { c->proto = caseproto_ref (proto); c->ref_cnt = 1; return c; } free (c); } return NULL; } /* Creates and returns an unshared copy of case C. */ struct ccase * case_clone (const struct ccase *c) { return case_unshare (case_ref (c)); } /* Increments case C's reference count and returns C. Afterward, case C is shared among its reference count holders. */ struct ccase * case_ref (const struct ccase *c_) { struct ccase *c = CONST_CAST (struct ccase *, c_); c->ref_cnt++; #if DEBUG_CASEREFS c = case_unshare__ (c); #endif return c; } /* Returns an estimate of the number of bytes of memory that would be consumed in creating a case based on PROTO. The estimate includes typical overhead from malloc() in addition to the actual size of data. */ size_t case_get_cost (const struct caseproto *proto) { /* FIXME: improve approximation? */ return (1 + caseproto_get_n_widths (proto) + 3 * caseproto_get_n_long_strings (proto)) * sizeof (union value); } /* Changes the prototype for case C, which must not be shared. The new PROTO must be conformable with C's current prototype (as defined by caseproto_is_conformable). Any new values created by this function have indeterminate content that the caller is responsible for initializing. The caller retains ownership of PROTO. Returns a new case that replaces C, which is freed. */ struct ccase * case_resize (struct ccase *c, const struct caseproto *new_proto) { struct caseproto *old_proto = c->proto; size_t old_n_widths = caseproto_get_n_widths (old_proto); size_t new_n_widths = caseproto_get_n_widths (new_proto); assert (!case_is_shared (c)); expensive_assert (caseproto_is_conformable (old_proto, new_proto)); if (old_n_widths != new_n_widths) { if (new_n_widths < old_n_widths) caseproto_reinit_values (old_proto, new_proto, c->values); c = xrealloc (c, case_size (new_proto)); if (new_n_widths > old_n_widths) caseproto_reinit_values (old_proto, new_proto, c->values); caseproto_unref (old_proto); c->proto = caseproto_ref (new_proto); } return c; } /* case_unshare_and_resize(C, PROTO) is equivalent to case_resize(case_unshare(C), PROTO), but it is faster if case C is shared. Any new values created by this function have indeterminate content that the caller is responsible for initializing. The caller retains ownership of PROTO. Returns the new case that replaces C, which is freed. */ struct ccase * case_unshare_and_resize (struct ccase *c, const struct caseproto *proto) { if (!case_is_shared (c)) return case_resize (c, proto); else { struct ccase *new = case_create (proto); size_t old_n_values = caseproto_get_n_widths (c->proto); size_t new_n_values = caseproto_get_n_widths (proto); case_copy (new, 0, c, 0, MIN (old_n_values, new_n_values)); c->ref_cnt--; return new; } } /* Sets all of the numeric values in case C to the system-missing value, and all of the string values to spaces. */ void case_set_missing (struct ccase *c) { size_t i; assert (!case_is_shared (c)); for (i = 0; i < caseproto_get_n_widths (c->proto); i++) value_set_missing (&c->values[i], caseproto_get_width (c->proto, i)); } /* Copies N_VALUES values from SRC (starting at SRC_IDX) to DST (starting at DST_IDX). Each value that is copied into must have the same width as the value that it is copied from. Properly handles overlapping ranges when DST == SRC. DST must not be shared. */ void case_copy (struct ccase *dst, size_t dst_idx, const struct ccase *src, size_t src_idx, size_t n_values) { assert (!case_is_shared (dst)); assert (caseproto_range_is_valid (dst->proto, dst_idx, n_values)); assert (caseproto_range_is_valid (src->proto, src_idx, n_values)); assert (caseproto_equal (dst->proto, dst_idx, src->proto, src_idx, n_values)); if (dst != src) { if (!dst->proto->n_long_strings || !src->proto->n_long_strings) memcpy (&dst->values[dst_idx], &src->values[src_idx], sizeof dst->values[0] * n_values); else copy_forward (dst, dst_idx, src, src_idx, n_values); } else if (dst_idx != src_idx) { if (!dst->proto->n_long_strings) memmove (&dst->values[dst_idx], &src->values[src_idx], sizeof dst->values[0] * n_values); else if (dst_idx < src_idx) copy_forward (dst, dst_idx, src, src_idx, n_values); else /* dst_idx > src_idx */ copy_backward (dst, dst_idx, src, src_idx, n_values); } } /* Copies N_VALUES values out of case C to VALUES, starting at the given START_IDX. */ void case_copy_out (const struct ccase *c, size_t start_idx, union value *values, size_t n_values) { size_t i; assert (caseproto_range_is_valid (c->proto, start_idx, n_values)); for (i = 0; i < n_values; i++) value_copy (&values[i], &c->values[start_idx + i], caseproto_get_width (c->proto, start_idx + i)); } /* Copies N_VALUES values from VALUES into case C, starting at the given START_IDX. C must not be shared. */ void case_copy_in (struct ccase *c, size_t start_idx, const union value *values, size_t n_values) { size_t i; assert (!case_is_shared (c)); assert (caseproto_range_is_valid (c->proto, start_idx, n_values)); for (i = 0; i < n_values; i++) value_copy (&c->values[start_idx + i], &values[i], caseproto_get_width (c->proto, start_idx + i)); } /* Returns a pointer to the `union value' used for the element of C for variable V. Case C must be drawn from V's dictionary. The caller must not modify the returned data. */ const union value * case_data (const struct ccase *c, const struct variable *v) { assert (variable_matches_case (c, v)); return &c->values[var_get_case_index (v)]; } /* Returns a pointer to the `union value' used for the element of C numbered IDX. The caller must not modify the returned data. */ const union value * case_data_idx (const struct ccase *c, size_t idx) { assert (idx < c->proto->n_widths); return &c->values[idx]; } /* Returns a pointer to the `union value' used for the element of C for variable V. Case C must be drawn from V's dictionary. The caller is allowed to modify the returned data. Case C must not be shared. */ union value * case_data_rw (struct ccase *c, const struct variable *v) { assert (variable_matches_case (c, v)); assert (!case_is_shared (c)); return &c->values[var_get_case_index (v)]; } /* Returns a pointer to the `union value' used for the element of C numbered IDX. The caller is allowed to modify the returned data. Case C must not be shared. */ union value * case_data_rw_idx (struct ccase *c, size_t idx) { assert (idx < c->proto->n_widths); assert (!case_is_shared (c)); return &c->values[idx]; } /* Returns the numeric value of the `union value' in C for variable V. Case C must be drawn from V's dictionary. */ double case_num (const struct ccase *c, const struct variable *v) { assert (variable_matches_case (c, v)); return c->values[var_get_case_index (v)].f; } /* Returns the numeric value of the `union value' in C numbered IDX. */ double case_num_idx (const struct ccase *c, size_t idx) { assert (idx < c->proto->n_widths); return c->values[idx].f; } /* Returns the string value of the `union value' in C for variable V. Case C must be drawn from V's dictionary. The caller must not modify the return value. Like the strings embedded in all "union value"s, the return value is not null-terminated. */ const uint8_t * case_str (const struct ccase *c, const struct variable *v) { size_t idx = var_get_case_index (v); assert (variable_matches_case (c, v)); return value_str (&c->values[idx], caseproto_get_width (c->proto, idx)); } /* Returns the string value of the `union value' in C numbered IDX. The caller must not modify the return value. Like the strings embedded in all "union value"s, the return value is not null-terminated. */ const uint8_t * case_str_idx (const struct ccase *c, size_t idx) { assert (idx < c->proto->n_widths); return value_str (&c->values[idx], caseproto_get_width (c->proto, idx)); } /* Returns the string value of the `union value' in C for variable V. Case C must be drawn from V's dictionary. The caller may modify the return value. Case C must not be shared. Like the strings embedded in all "union value"s, the return value is not null-terminated. */ uint8_t * case_str_rw (struct ccase *c, const struct variable *v) { size_t idx = var_get_case_index (v); assert (variable_matches_case (c, v)); assert (!case_is_shared (c)); return value_str_rw (&c->values[idx], caseproto_get_width (c->proto, idx)); } /* Returns the string value of the `union value' in C numbered IDX. The caller may modify the return value. Case C must not be shared. Like the strings embedded in all "union value"s, the return value is not null-terminated. */ uint8_t * case_str_rw_idx (struct ccase *c, size_t idx) { assert (idx < c->proto->n_widths); assert (!case_is_shared (c)); return value_str_rw (&c->values[idx], caseproto_get_width (c->proto, idx)); } /* Compares the values of the N_VARS variables in VP in cases A and B and returns a strcmp()-type result. */ int case_compare (const struct ccase *a, const struct ccase *b, const struct variable *const *vp, size_t n_vars) { return case_compare_2dict (a, b, vp, vp, n_vars); } /* Compares the values of the N_VARS variables in VAP in case CA to the values of the N_VARS variables in VBP in CB and returns a strcmp()-type result. */ int case_compare_2dict (const struct ccase *ca, const struct ccase *cb, const struct variable *const *vap, const struct variable *const *vbp, size_t n_vars) { int cmp = 0; for (; !cmp && n_vars-- > 0; vap++, vbp++) { const union value *va = case_data (ca, *vap); const union value *vb = case_data (cb, *vbp); assert (var_get_width (*vap) == var_get_width (*vbp)); cmp = value_compare_3way (va, vb, var_get_width (*vap)); } return cmp; } /* Returns a pointer to the array of `union value's used for C. The caller must *not* modify the returned data. This function breaks the case abstraction. It should *not* be commonly used. Prefer the other case functions. */ const union value * case_data_all (const struct ccase *c) { return c->values; } /* Returns a pointer to the array of `union value's used for C. The caller is allowed to modify the returned data. Case C must not be shared. This function breaks the case abstraction. It should *not* be commonly used. Prefer the other case functions. */ union value * case_data_all_rw (struct ccase *c) { assert (!case_is_shared (c)); return c->values; } /* Internal helper function for case_unshare. */ struct ccase * case_unshare__ (struct ccase *old) { struct ccase *new = case_create (old->proto); case_copy (new, 0, old, 0, caseproto_get_n_widths (new->proto)); --old->ref_cnt; return new; } /* Internal helper function for case_unref. */ void case_unref__ (struct ccase *c) { caseproto_destroy_values (c->proto, c->values); caseproto_unref (c->proto); free (c); } /* Returns the number of bytes needed by a case for case prototype PROTO. */ static size_t case_size (const struct caseproto *proto) { return (offsetof (struct ccase, values) + caseproto_get_n_widths (proto) * sizeof (union value)); } /* Returns true if C contains a value at V's case index with the same width as V; that is, if V may plausibly be used to read or write data in C. Useful in assertions. */ static bool UNUSED variable_matches_case (const struct ccase *c, const struct variable *v) { size_t case_idx = var_get_case_index (v); return (case_idx < caseproto_get_n_widths (c->proto) && caseproto_get_width (c->proto, case_idx) == var_get_width (v)); } /* Internal helper function for case_copy(). */ static void copy_forward (struct ccase *dst, size_t dst_idx, const struct ccase *src, size_t src_idx, size_t n_values) { size_t i; for (i = 0; i < n_values; i++) value_copy (&dst->values[dst_idx + i], &src->values[src_idx + i], caseproto_get_width (dst->proto, dst_idx + i)); } /* Internal helper function for case_copy(). */ static void copy_backward (struct ccase *dst, size_t dst_idx, const struct ccase *src, size_t src_idx, size_t n_values) { size_t i; for (i = n_values; i-- != 0; ) value_copy (&dst->values[dst_idx + i], &src->values[src_idx + i], caseproto_get_width (dst->proto, dst_idx + i)); } pspp-1.0.1/src/data/format.c0000644000175000017500000007230212523704223012554 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "format.h" #include #include #include #include "data/identifier.h" #include "data/settings.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "gl/c-strcase.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct fmt_settings { struct fmt_number_style styles[FMT_NUMBER_OF_FORMATS]; }; bool is_fmt_type (enum fmt_type); static bool valid_width (enum fmt_type, int width, enum fmt_use); static int max_digits_for_bytes (int bytes); static void fmt_clamp_width (struct fmt_spec *, enum fmt_use); static void fmt_clamp_decimals (struct fmt_spec *, enum fmt_use); static void fmt_affix_set (struct fmt_affix *, const char *); static void fmt_affix_free (struct fmt_affix *); static void fmt_number_style_init (struct fmt_number_style *); static void fmt_number_style_clone (struct fmt_number_style *, const struct fmt_number_style *); static void fmt_number_style_destroy (struct fmt_number_style *); /* Creates and returns a new struct fmt_settings with default format styles. */ struct fmt_settings * fmt_settings_create (void) { struct fmt_settings *settings; int t; settings = xzalloc (sizeof *settings); for (t = 0 ; t < FMT_NUMBER_OF_FORMATS ; ++t ) fmt_number_style_init (&settings->styles[t]); fmt_settings_set_decimal (settings, '.'); return settings; } /* Destroys SETTINGS. */ void fmt_settings_destroy (struct fmt_settings *settings) { if (settings != NULL) { int t; for (t = 0 ; t < FMT_NUMBER_OF_FORMATS ; ++t ) fmt_number_style_destroy (&settings->styles[t]); free (settings->styles); } } /* Returns a copy of SETTINGS. */ struct fmt_settings * fmt_settings_clone (const struct fmt_settings *old) { struct fmt_settings *new; int t; new = xmalloc (sizeof *new); for (t = 0 ; t < FMT_NUMBER_OF_FORMATS ; ++t ) fmt_number_style_clone (&new->styles[t], &old->styles[t]); return new; } /* Returns the number formatting style associated with the given format TYPE. */ const struct fmt_number_style * fmt_settings_get_style (const struct fmt_settings *settings, enum fmt_type type) { assert (is_fmt_type (type)); return &settings->styles[type]; } /* Sets the number style for TYPE to have the given DECIMAL and GROUPING characters, negative prefix NEG_PREFIX, prefix PREFIX, suffix SUFFIX, and negative suffix NEG_SUFFIX. All of the strings are UTF-8 encoded. */ void fmt_settings_set_style (struct fmt_settings *settings, enum fmt_type type, char decimal, char grouping, const char *neg_prefix, const char *prefix, const char *suffix, const char *neg_suffix) { struct fmt_number_style *style = &settings->styles[type]; int total_bytes, total_width; assert (grouping == '.' || grouping == ',' || grouping == 0); assert (decimal == '.' || decimal == ','); assert (decimal != grouping); fmt_number_style_destroy (style); fmt_affix_set (&style->neg_prefix, neg_prefix); fmt_affix_set (&style->prefix, prefix); fmt_affix_set (&style->suffix, suffix); fmt_affix_set (&style->neg_suffix, neg_suffix); style->decimal = decimal; style->grouping = grouping; total_bytes = (strlen (neg_prefix) + strlen (prefix) + strlen (suffix) + strlen (neg_suffix)); total_width = (style->neg_prefix.width + style->prefix.width + style->suffix.width + style->neg_suffix.width); style->extra_bytes = MAX (0, total_bytes - total_width); } /* Sets the decimal point character for the settings in S to DECIMAL. This has no effect on custom currency formats. */ void fmt_settings_set_decimal (struct fmt_settings *s, char decimal) { int grouping = decimal == '.' ? ',' : '.'; assert (decimal == '.' || decimal == ','); fmt_settings_set_style (s, FMT_F, decimal, 0, "-", "", "", ""); fmt_settings_set_style (s, FMT_E, decimal, 0, "-", "", "", ""); fmt_settings_set_style (s, FMT_COMMA, decimal, grouping, "-", "", "", ""); fmt_settings_set_style (s, FMT_DOT, grouping, decimal, "-", "", "", ""); fmt_settings_set_style (s, FMT_DOLLAR, decimal, grouping, "-", "$", "", ""); fmt_settings_set_style (s, FMT_PCT, decimal, 0, "-", "", "%", ""); } /* Returns an input format specification with type TYPE, width W, and D decimals. */ struct fmt_spec fmt_for_input (enum fmt_type type, int w, int d) { struct fmt_spec f; f.type = type; f.w = w; f.d = d; assert (fmt_check_input (&f)); return f; } /* Returns an output format specification with type TYPE, width W, and D decimals. */ struct fmt_spec fmt_for_output (enum fmt_type type, int w, int d) { struct fmt_spec f; f.type = type; f.w = w; f.d = d; assert (fmt_check_output (&f)); return f; } /* Returns the output format specifier corresponding to input format specifier INPUT. */ struct fmt_spec fmt_for_output_from_input (const struct fmt_spec *input) { struct fmt_spec output; assert (fmt_check_input (input)); output.type = fmt_input_to_output (input->type); output.w = input->w; if (output.w > fmt_max_output_width (output.type)) output.w = fmt_max_output_width (output.type); else if (output.w < fmt_min_output_width (output.type)) output.w = fmt_min_output_width (output.type); output.d = input->d; switch (input->type) { case FMT_Z: output.w++; if (output.d > 0) output.w++; break; case FMT_F: case FMT_COMMA: case FMT_DOT: case FMT_DOLLAR: case FMT_PCT: { const struct fmt_number_style *style = settings_get_style (input->type); output.w += fmt_affix_width (style); if (style->grouping != 0 && input->w - input->d >= 3) output.w += (input->w - input->d - 1) / 3; if (output.d > 0) output.w++; } break; case FMT_N: if (output.d > 0) output.w++; break; case FMT_E: output.d = MAX (input->d, 3); output.w = MAX (input->w, output.d + 7); break; case FMT_PIBHEX: output.w = max_digits_for_bytes (input->w / 2) + 1; break; case FMT_RB: case FMT_RBHEX: output.w = 8; output.d = 2; break; case FMT_P: case FMT_PK: output.w = 2 * input->w + (input->d > 0); break; case FMT_IB: case FMT_PIB: output.w = max_digits_for_bytes (input->w) + 1; if (output.d > 0) output.w++; break; case FMT_CCA: case FMT_CCB: case FMT_CCC: case FMT_CCD: case FMT_CCE: NOT_REACHED (); case FMT_A: break; case FMT_AHEX: output.w = input->w / 2; break; case FMT_DATE: case FMT_EDATE: case FMT_SDATE: case FMT_ADATE: case FMT_JDATE: case FMT_QYR: case FMT_MOYR: case FMT_WKYR: case FMT_TIME: case FMT_DTIME: case FMT_DATETIME: case FMT_WKDAY: case FMT_MONTH: break; default: NOT_REACHED (); } if (output.w > fmt_max_output_width (output.type)) output.w = fmt_max_output_width (output.type); assert (fmt_check_output (&output)); return output; } /* Returns the default format for the given WIDTH: F8.2 format for a numeric value, A format for a string value. */ struct fmt_spec fmt_default_for_width (int width) { return (width == 0 ? fmt_for_output (FMT_F, 8, 2) : fmt_for_output (FMT_A, width, 0)); } /* Checks whether SPEC is valid for USE and returns nonzero if so. Otherwise, emits an error message and returns zero. */ bool fmt_check (const struct fmt_spec *spec, enum fmt_use use) { const char *io_fmt; char str[FMT_STRING_LEN_MAX + 1]; int min_w, max_w, max_d; assert (is_fmt_type (spec->type)); fmt_to_string (spec, str); io_fmt = use == FMT_FOR_INPUT ? _("Input format") : _("Output format"); if (use == FMT_FOR_INPUT && !fmt_usable_for_input (spec->type)) { msg (SE, _("Format %s may not be used for input."), str); return false; } if (spec->w % fmt_step_width (spec->type)) { assert (fmt_step_width (spec->type) == 2); msg (SE, _("%s specifies width %d, but %s requires an even width."), str, spec->w, fmt_name (spec->type)); return false; } min_w = fmt_min_width (spec->type, use); max_w = fmt_max_width (spec->type, use); if (spec->w < min_w || spec->w > max_w) { msg (SE, _("%s %s specifies width %d, but " "%s requires a width between %d and %d."), io_fmt, str, spec->w, fmt_name (spec->type), min_w, max_w); return false; } max_d = fmt_max_decimals (spec->type, spec->w, use); if (!fmt_takes_decimals (spec->type) && spec->d != 0) { msg (SE, ngettext ("%s %s specifies %d decimal place, but " "%s does not allow any decimals.", "%s %s specifies %d decimal places, but " "%s does not allow any decimals.", spec->d), io_fmt, str, spec->d, fmt_name (spec->type)); return false; } else if (spec->d > max_d) { if (max_d > 0) msg (SE, ngettext ("%s %s specifies %d decimal place, but " "the given width allows at most %d decimals.", "%s %s specifies %d decimal places, but " "the given width allows at most %d decimals.", spec->d), io_fmt, str, spec->d, max_d); else msg (SE, ngettext ("%s %s specifies %d decimal place, but " "the given width does not allow for any decimals.", "%s %s specifies %d decimal places, but " "the given width does not allow for any decimals.", spec->d), io_fmt, str, spec->d); return false; } return true; } /* Checks whether SPEC is valid as an input format and returns nonzero if so. Otherwise, emits an error message and returns zero. */ bool fmt_check_input (const struct fmt_spec *spec) { return fmt_check (spec, FMT_FOR_INPUT); } /* Checks whether SPEC is valid as an output format and returns true if so. Otherwise, emits an error message and returns false. */ bool fmt_check_output (const struct fmt_spec *spec) { return fmt_check (spec, FMT_FOR_OUTPUT); } /* Checks that FORMAT is appropriate for a variable of the given VAR_TYPE and returns true if so. Otherwise returns false and emits an error message. */ bool fmt_check_type_compat (const struct fmt_spec *format, enum val_type var_type) { assert (val_type_is_valid (var_type)); if ((var_type == VAL_STRING) != (fmt_is_string (format->type) != 0)) { char str[FMT_STRING_LEN_MAX + 1]; msg (SE, _("%s variables are not compatible with %s format %s."), var_type == VAL_STRING ? _("String") : _("Numeric"), var_type == VAL_STRING ? _("numeric") : _("string"), fmt_to_string (format, str)); return false; } return true; } /* Checks that FORMAT is appropriate for a variable of the given WIDTH and returns true if so. Otherwise returns false and emits an error message. */ bool fmt_check_width_compat (const struct fmt_spec *format, int width) { if (!fmt_check_type_compat (format, val_type_from_width (width))) return false; if (fmt_var_width (format) != width) { char str[FMT_STRING_LEN_MAX + 1]; msg (SE, _("String variable with width %d is not compatible with " "format %s."), width, fmt_to_string (format, str)); return false; } return true; } /* Returns the width corresponding to FORMAT. The return value is the width of the `union value's required by FORMAT. */ int fmt_var_width (const struct fmt_spec *format) { return (format->type == FMT_AHEX ? format->w / 2 : format->type == FMT_A ? format->w : 0); } /* Converts F to its string representation (for instance, "F8.2") in BUFFER. Returns BUFFER. If F has decimals, they are included in the output string, even if F's format type does not allow decimals, to allow accurately presenting incorrect formats to the user. */ char * fmt_to_string (const struct fmt_spec *f, char buffer[FMT_STRING_LEN_MAX + 1]) { if (fmt_takes_decimals (f->type) || f->d > 0) snprintf (buffer, FMT_STRING_LEN_MAX + 1, "%s%d.%d", fmt_name (f->type), f->w, f->d); else snprintf (buffer, FMT_STRING_LEN_MAX + 1, "%s%d", fmt_name (f->type), f->w); return buffer; } /* Returns true if A and B are identical formats, false otherwise. */ bool fmt_equal (const struct fmt_spec *a, const struct fmt_spec *b) { return a->type == b->type && a->w == b->w && a->d == b->d; } /* Adjusts FMT to be valid for a value of the given WIDTH if necessary. If nothing needed to be changed the return value is false */ bool fmt_resize (struct fmt_spec *fmt, int width) { if ((width > 0) != fmt_is_string (fmt->type)) { /* Changed from numeric to string or vice versa. Set to default format for new width. */ *fmt = fmt_default_for_width (width); } else if (width > 0) { /* Changed width of string. Preserve format type, adjust width. */ fmt->w = fmt->type == FMT_AHEX ? width * 2 : width; } else { /* Still numeric. */ return false; } return true; } /* Adjusts FMT's width and decimal places to be valid for USE. */ void fmt_fix (struct fmt_spec *fmt, enum fmt_use use) { /* Clamp width to those allowed by format. */ fmt_clamp_width (fmt, use); /* If FMT has more decimal places than allowed, attempt to increase FMT's width until that number of decimal places can be achieved. */ if (fmt->d > fmt_max_decimals (fmt->type, fmt->w, use) && fmt_takes_decimals (fmt->type)) { int max_w = fmt_max_width (fmt->type, use); for (; fmt->w < max_w; fmt->w++) if (fmt->d <= fmt_max_decimals (fmt->type, fmt->w, use)) break; } /* Clamp decimals to those allowed by format and width. */ fmt_clamp_decimals (fmt, use); } /* Adjusts FMT's width and decimal places to be valid for an input format. */ void fmt_fix_input (struct fmt_spec *fmt) { fmt_fix (fmt, FMT_FOR_INPUT); } /* Adjusts FMT's width and decimal places to be valid for an output format. */ void fmt_fix_output (struct fmt_spec *fmt) { fmt_fix (fmt, FMT_FOR_OUTPUT); } /* Sets FMT's width to WIDTH (or the nearest width allowed by FMT's type) and reduces its decimal places as necessary (if necessary) for that width. */ void fmt_change_width (struct fmt_spec *fmt, int width, enum fmt_use use) { fmt->w = width; fmt_clamp_width (fmt, use); fmt_clamp_decimals (fmt, use); } /* Sets FMT's decimal places to DECIMALS (or the nearest number of decimal places allowed by FMT's type) and increases its width as necessary (if necessary) for that number of decimal places. */ void fmt_change_decimals (struct fmt_spec *fmt, int decimals, enum fmt_use use) { fmt->d = decimals; fmt_fix (fmt, use); } /* Describes a display format. */ struct fmt_desc { char name[9]; int min_input_width, min_output_width; int io; enum fmt_category category; }; static const struct fmt_desc *get_fmt_desc (enum fmt_type type); /* Returns the name of the given format TYPE. */ const char * fmt_name (enum fmt_type type) { return get_fmt_desc (type)->name; } /* Tries to parse NAME as a format type. If successful, stores the type in *TYPE and returns true. On failure, returns false. */ bool fmt_from_name (const char *name, enum fmt_type *type) { int i; for (i = 0; i < FMT_NUMBER_OF_FORMATS; i++) if (!c_strcasecmp (name, get_fmt_desc (i)->name)) { *type = i; return true; } return false; } /* Returns true if TYPE accepts decimal places, false otherwise. */ bool fmt_takes_decimals (enum fmt_type type) { return fmt_max_output_decimals (type, fmt_max_output_width (type)) > 0; } /* Returns the minimum width of the given format TYPE for the given USE. */ int fmt_min_width (enum fmt_type type, enum fmt_use use) { return (use == FMT_FOR_INPUT ? fmt_min_input_width (type) : fmt_min_output_width (type)); } /* Returns the maximum width of the given format TYPE, for input if FOR_INPUT is true, for output otherwise. */ int fmt_max_width (enum fmt_type type, enum fmt_use use UNUSED) { /* Maximum width is actually invariant of whether the format is for input or output, so FOR_INPUT is unused. */ assert (is_fmt_type (type)); switch (type) { case FMT_P: case FMT_PK: case FMT_PIBHEX: case FMT_RBHEX: return 16; case FMT_IB: case FMT_PIB: case FMT_RB: return 8; case FMT_A: return MAX_STRING; case FMT_AHEX: return 2 * MAX_STRING; default: return 40; } } /* Returns the maximum number of decimal places allowed for the given format TYPE with a width of WIDTH places, for the given USE. */ int fmt_max_decimals (enum fmt_type type, int width, enum fmt_use use) { int max_d; switch (type) { case FMT_F: case FMT_COMMA: case FMT_DOT: max_d = use == FMT_FOR_INPUT ? width : width - 1; break; case FMT_DOLLAR: case FMT_PCT: max_d = use == FMT_FOR_INPUT ? width : width - 2; break; case FMT_E: max_d = use == FMT_FOR_INPUT ? width : width - 7; break; case FMT_CCA: case FMT_CCB: case FMT_CCC: case FMT_CCD: case FMT_CCE: assert (use == FMT_FOR_OUTPUT); max_d = width - 1; break; case FMT_N: case FMT_Z: max_d = width; break; case FMT_P: max_d = width * 2 - 1; break; case FMT_PK: max_d = width * 2; break; case FMT_IB: case FMT_PIB: max_d = max_digits_for_bytes (width); break; case FMT_PIBHEX: max_d = 0; break; case FMT_RB: case FMT_RBHEX: max_d = 16; break; case FMT_DATE: case FMT_ADATE: case FMT_EDATE: case FMT_JDATE: case FMT_SDATE: case FMT_QYR: case FMT_MOYR: case FMT_WKYR: max_d = 0; break; case FMT_DATETIME: max_d = width - 21; break; case FMT_TIME: max_d = width - 9; break; case FMT_DTIME: max_d = width - 12; break; case FMT_WKDAY: case FMT_MONTH: case FMT_A: case FMT_AHEX: max_d = 0; break; default: NOT_REACHED (); } if (max_d < 0) max_d = 0; else if (max_d > 16) max_d = 16; return max_d; } /* Returns the minimum acceptable width for an input field formatted with the given TYPE. */ int fmt_min_input_width (enum fmt_type type) { return get_fmt_desc (type)->min_input_width; } /* Returns the maximum acceptable width for an input field formatted with the given TYPE. */ int fmt_max_input_width (enum fmt_type type) { return fmt_max_width (type, FMT_FOR_INPUT); } /* Returns the maximum number of decimal places allowed in an input field of the given TYPE and WIDTH. */ int fmt_max_input_decimals (enum fmt_type type, int width) { assert (valid_width (type, width, true)); return fmt_max_decimals (type, width, FMT_FOR_INPUT); } /* Returns the minimum acceptable width for an output field formatted with the given TYPE. */ int fmt_min_output_width (enum fmt_type type) { return get_fmt_desc (type)->min_output_width; } /* Returns the maximum acceptable width for an output field formatted with the given TYPE. */ int fmt_max_output_width (enum fmt_type type) { return fmt_max_width (type, FMT_FOR_OUTPUT); } /* Returns the maximum number of decimal places allowed in an output field of the given TYPE and WIDTH. */ int fmt_max_output_decimals (enum fmt_type type, int width) { assert (valid_width (type, width, false)); return fmt_max_decimals (type, width, FMT_FOR_OUTPUT); } /* Returns the width step for a field formatted with the given TYPE. Field width must be a multiple of the width step. */ int fmt_step_width (enum fmt_type type) { return (fmt_get_category (type) == FMT_CAT_HEXADECIMAL || type == FMT_AHEX ? 2 : 1); } /* Returns true if TYPE is used for string fields, false if it is used for numeric fields. */ bool fmt_is_string (enum fmt_type type) { return fmt_get_category (type) == FMT_CAT_STRING; } /* Returns true if TYPE is used for numeric fields, false if it is used for string fields. */ bool fmt_is_numeric (enum fmt_type type) { return !fmt_is_string (type); } /* Returns the format TYPE's category. Each format type is in exactly one category, and each category's value is bitwise disjoint from every other category. Thus, the return value may be tested for equality or compared bitwise against a mask of FMT_CAT_* values. */ enum fmt_category fmt_get_category (enum fmt_type type) { return get_fmt_desc (type)->category; } /* Returns the output format selected by default when TYPE is used as an input format. */ enum fmt_type fmt_input_to_output (enum fmt_type type) { switch (fmt_get_category (type)) { case FMT_CAT_STRING: return FMT_A; case FMT_CAT_LEGACY: case FMT_CAT_BINARY: case FMT_CAT_HEXADECIMAL: return FMT_F; default: return type; } } /* Returns the SPSS format type corresponding to the given PSPP format type. */ int fmt_to_io (enum fmt_type type) { return get_fmt_desc (type)->io; } /* Determines the PSPP format corresponding to the given SPSS format type. If successful, sets *FMT_TYPE to the PSPP format and returns true. On failure, return false. */ bool fmt_from_io (int io, enum fmt_type *fmt_type) { switch (io) { #define FMT(NAME, METHOD, IMIN, OMIN, IO, CATEGORY) \ case IO: \ *fmt_type = FMT_##NAME; \ return true; #include "format.def" default: return false; } } /* Returns true if TYPE may be used as an input format, false otherwise. */ bool fmt_usable_for_input (enum fmt_type type) { assert (is_fmt_type (type)); return fmt_get_category (type) != FMT_CAT_CUSTOM; } /* For time and date formats, returns a template used for input and output in a field of the given WIDTH. WIDTH only affects whether a 2-digit year or a 4-digit year is used, that is, whether the returned string contains "yy" or "yyyy", and whether seconds are include, that is, whether the returned string contains ":SS". A caller that doesn't care whether the returned string contains "yy" or "yyyy" or ":SS" can just specify 0 to omit them. */ const char * fmt_date_template (enum fmt_type type, int width) { const char *s1, *s2; switch (type) { case FMT_DATE: s1 = "dd-mmm-yy"; s2 = "dd-mmm-yyyy"; break; case FMT_ADATE: s1 = "mm/dd/yy"; s2 = "mm/dd/yyyy"; break; case FMT_EDATE: s1 = "dd.mm.yy"; s2 = "dd.mm.yyyy"; break; case FMT_JDATE: s1 = "yyddd"; s2 = "yyyyddd"; break; case FMT_SDATE: s1 = "yy/mm/dd"; s2 = "yyyy/mm/dd"; break; case FMT_QYR: s1 = "q Q yy"; s2 = "q Q yyyy"; break; case FMT_MOYR: s1 = "mmm yy"; s2 = "mmm yyyy"; break; case FMT_WKYR: s1 = "ww WK yy"; s2 = "ww WK yyyy"; break; case FMT_DATETIME: s1 = "dd-mmm-yyyy HH:MM"; s2 = "dd-mmm-yyyy HH:MM:SS"; break; case FMT_TIME: s1 = "H:MM"; s2 = "H:MM:SS"; break; case FMT_DTIME: s1 = "D HH:MM"; s2 = "D HH:MM:SS"; break; default: NOT_REACHED (); } return width >= strlen (s2) ? s2 : s1; } /* Returns a string representing the format TYPE for use in a GUI dialog. */ const char * fmt_gui_name (enum fmt_type type) { switch (type) { case FMT_F: return _("Numeric"); case FMT_COMMA: return _("Comma"); case FMT_DOT: return _("Dot"); case FMT_E: return _("Scientific"); case FMT_DATE: case FMT_EDATE: case FMT_SDATE: case FMT_ADATE: case FMT_JDATE: case FMT_QYR: case FMT_MOYR: case FMT_WKYR: case FMT_DATETIME: case FMT_TIME: case FMT_DTIME: case FMT_WKDAY: case FMT_MONTH: return _("Date"); case FMT_DOLLAR: return _("Dollar"); case FMT_CCA: case FMT_CCB: case FMT_CCC: case FMT_CCD: case FMT_CCE: return _("Custom"); case FMT_A: return _("String"); default: return fmt_name (type); } } /* Returns true if TYPE is a valid format type, false otherwise. */ bool is_fmt_type (enum fmt_type type) { return type < FMT_NUMBER_OF_FORMATS; } /* Returns true if WIDTH is a valid width for the given format TYPE, for the given USE. */ static bool valid_width (enum fmt_type type, int width, enum fmt_use use) { return (width >= fmt_min_width (type, use) && width <= fmt_max_width (type, use)); } /* Returns the maximum number of decimal digits in an unsigned binary number that is BYTES bytes long. */ static int max_digits_for_bytes (int bytes) { int map[8] = {3, 5, 8, 10, 13, 15, 17, 20}; assert (bytes > 0 && bytes <= sizeof map / sizeof *map); return map[bytes - 1]; } /* Clamp FMT's width to the range and values allowed by FMT's type. */ static void fmt_clamp_width (struct fmt_spec *fmt, enum fmt_use use) { unsigned int step; int min_w, max_w; min_w = fmt_min_width (fmt->type, use); max_w = fmt_max_width (fmt->type, use); if (fmt->w < min_w) fmt->w = min_w; else if (fmt->w > max_w) fmt->w = max_w; /* Round width to step. */ step = fmt_step_width (fmt->type); fmt->w = ROUND_DOWN (fmt->w, step); } /* Clamp FMT's decimal places to the range allowed by FMT's type and width. */ static void fmt_clamp_decimals (struct fmt_spec *fmt, enum fmt_use use) { int max_d; max_d = fmt_max_decimals (fmt->type, fmt->w, use); if (fmt->d < 0) fmt->d = 0; else if (fmt->d > max_d) fmt->d = max_d; } /* Sets AFFIX's string value to S, a UTF-8 encoded string. */ static void fmt_affix_set (struct fmt_affix *affix, const char *s) { affix->s = s[0] == '\0' ? CONST_CAST (char *, "") : xstrdup (s); affix->width = u8_strwidth (CHAR_CAST (const uint8_t *, s), "UTF-8"); } /* Frees data in AFFIX. */ static void fmt_affix_free (struct fmt_affix *affix) { if (affix->s[0]) free (affix->s); } static void fmt_number_style_init (struct fmt_number_style *style) { fmt_affix_set (&style->neg_prefix, ""); fmt_affix_set (&style->prefix, ""); fmt_affix_set (&style->suffix, ""); fmt_affix_set (&style->neg_suffix, ""); style->decimal = '.'; style->grouping = 0; } static void fmt_number_style_clone (struct fmt_number_style *new, const struct fmt_number_style *old) { fmt_affix_set (&new->neg_prefix, old->neg_prefix.s); fmt_affix_set (&new->prefix, old->prefix.s); fmt_affix_set (&new->suffix, old->suffix.s); fmt_affix_set (&new->neg_suffix, old->neg_suffix.s); new->decimal = old->decimal; new->grouping = old->grouping; new->extra_bytes = old->extra_bytes; } /* Destroys a struct fmt_number_style. */ static void fmt_number_style_destroy (struct fmt_number_style *style) { if (style != NULL) { fmt_affix_free (&style->neg_prefix); fmt_affix_free (&style->prefix); fmt_affix_free (&style->suffix); fmt_affix_free (&style->neg_suffix); } } /* Returns the total width of the standard prefix and suffix for STYLE, in display columns (e.g. as returned by u8_strwidth()). */ int fmt_affix_width (const struct fmt_number_style *style) { return style->prefix.width + style->suffix.width; } /* Returns the total width of the negative prefix and suffix for STYLE, in display columns (e.g. as returned by u8_strwidth()). */ int fmt_neg_affix_width (const struct fmt_number_style *style) { return style->neg_prefix.width + style->neg_suffix.width; } /* Returns the struct fmt_desc for the given format TYPE. */ static const struct fmt_desc * get_fmt_desc (enum fmt_type type) { static const struct fmt_desc formats[FMT_NUMBER_OF_FORMATS] = { #define FMT(NAME, METHOD, IMIN, OMIN, IO, CATEGORY) \ {#NAME, IMIN, OMIN, IO, CATEGORY}, #include "format.def" }; assert (is_fmt_type (type)); return &formats[type]; } const struct fmt_spec F_8_0 = {FMT_F, 8, 0}; const struct fmt_spec F_8_2 = {FMT_F, 8, 2}; const struct fmt_spec F_4_3 = {FMT_F, 4, 3}; const struct fmt_spec F_5_1 = {FMT_F, 5, 1}; pspp-1.0.1/src/data/casewriter-translator.c0000644000175000017500000000740512470243700015624 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/casewriter.h" #include "data/casewriter-provider.h" #include #include "libpspp/taint.h" #include "gl/xalloc.h" struct casewriter_translator { struct casewriter *subwriter; struct ccase *(*translate) (struct ccase *, void *aux); bool (*destroy) (void *aux); void *aux; }; static const struct casewriter_class casewriter_translator_class; /* Creates and returns a new casewriter whose cases are passed through TRANSLATE, based on INPUT and auxiliary data AUX. (TRANSLATE may also return a null pointer, in which case no case is written to the output.) The translated cases are then written to SUBWRITER. The cases returned by TRANSLATE must match OUTPUT_PROTO. TRANSLATE takes ownership of each case passed to it. Thus, it should either unref each case and return a new case, or (unshare and then) modify and return the same case. When the translating casewriter is destroyed, DESTROY will be called to allow any state maintained by TRANSLATE to be freed. After this function is called, SUBWRITER must not ever again be referenced directly. It will be destroyed automatically when the translating casewriter is destroyed. */ struct casewriter * casewriter_create_translator (struct casewriter *subwriter, const struct caseproto *translated_proto, struct ccase *(*translate) (struct ccase *, void *aux), bool (*destroy) (void *aux), void *aux) { struct casewriter_translator *ct = xmalloc (sizeof *ct); struct casewriter *writer; ct->subwriter = casewriter_rename (subwriter); ct->translate = translate; ct->destroy = destroy; ct->aux = aux; writer = casewriter_create (translated_proto, &casewriter_translator_class, ct); taint_propagate (casewriter_get_taint (ct->subwriter), casewriter_get_taint (writer)); return writer; } static void casewriter_translator_write (struct casewriter *writer UNUSED, void *ct_, struct ccase *c) { struct casewriter_translator *ct = ct_; c = ct->translate (c, ct->aux); if (c != NULL) casewriter_write (ct->subwriter, c); } static void casewriter_translator_destroy (struct casewriter *writer UNUSED, void *ct_) { struct casewriter_translator *ct = ct_; casewriter_destroy (ct->subwriter); ct->destroy (ct->aux); free (ct); } static struct casereader * casewriter_translator_convert_to_reader (struct casewriter *writer UNUSED, void *ct_) { struct casewriter_translator *ct = ct_; struct casereader *reader = casewriter_make_reader (ct->subwriter); free (ct); ct->destroy (ct->aux); return reader; } static const struct casewriter_class casewriter_translator_class = { casewriter_translator_write, casewriter_translator_destroy, casewriter_translator_convert_to_reader, }; pspp-1.0.1/src/data/encrypted-file.h0000644000175000017500000000242112642117700014176 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2013, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef ENCRYPTED_FILE_H #define ENCRYPTED_FILE_H 1 #include #include /* Reading encrypted SPSS files. */ struct encrypted_file; struct file_handle; int encrypted_file_open (struct encrypted_file **, const struct file_handle *); bool encrypted_file_unlock (struct encrypted_file *, const char *password); size_t encrypted_file_read (struct encrypted_file *, void *, size_t); int encrypted_file_close (struct encrypted_file *); bool encrypted_file_is_sav (const struct encrypted_file *); #endif /* encrypted-file.h */ pspp-1.0.1/src/data/calendar.c0000644000175000017500000001510012470243700013025 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/calendar.h" #include #include #include "data/settings.h" #include "data/val-type.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* 14 Oct 1582. */ #define EPOCH (-577734) /* Calculates and returns floor(a/b) for integer b > 0. */ static int floor_div (int a, int b) { assert (b > 0); return (a >= 0 ? a : a - b + 1) / b; } /* Calculates floor(a/b) and the corresponding remainder and stores them into *Q and *R. */ static void floor_divmod (int a, int b, int *q, int *r) { *q = floor_div (a, b); *r = a - b * *q; } /* Returns true if Y is a leap year, false otherwise. */ static bool is_leap_year (int y) { return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); } static int raw_gregorian_to_offset (int y, int m, int d) { return (EPOCH - 1 + 365 * (y - 1) + floor_div (y - 1, 4) - floor_div (y - 1, 100) + floor_div (y - 1, 400) + floor_div (367 * m - 362, 12) + (m <= 2 ? 0 : (m >= 2 && is_leap_year (y) ? -1 : -2)) + d); } /* Returns the number of days from 14 Oct 1582 to (Y,M,D) in the Gregorian calendar. Returns SYSMIS for dates before 14 Oct 1582. */ double calendar_gregorian_to_offset (int y, int m, int d, char **errorp) { /* Normalize year. */ if (y >= 0 && y < 100) { int epoch = settings_get_epoch (); int century = epoch / 100 + (y < epoch % 100); y += century * 100; } /* Normalize month. */ if (m < 1 || m > 12) { if (m == 0) { y--; m = 12; } else if (m == 13) { y++; m = 1; } else { if (errorp != NULL) *errorp = xasprintf (_("Month %d is not in acceptable range of " "0 to 13."), m); return SYSMIS; } } /* Normalize day. */ if (d < 0 || d > 31) { if (errorp != NULL) *errorp = xasprintf (_("Day %d is not in acceptable range of " "0 to 31."), d); return SYSMIS; } /* Validate date. */ if (y < 1582 || (y == 1582 && (m < 10 || (m == 10 && d < 15)))) { if (errorp != NULL) *errorp = xasprintf (_("Date %04d-%d-%d is before the earliest " "acceptable date of 1582-10-15."), y, m, d); return SYSMIS; } /* Calculate offset. */ if (errorp != NULL) *errorp = NULL; return raw_gregorian_to_offset (y, m, d); } /* Returns the number of days in the given YEAR from January 1 up to (but not including) the first day of MONTH. */ static int cum_month_days (int year, int month) { static const int cum_month_days[12] = { 0, 31, /* Jan */ 31 + 28, /* Feb */ 31 + 28 + 31, /* Mar */ 31 + 28 + 31 + 30, /* Apr */ 31 + 28 + 31 + 30 + 31, /* May */ 31 + 28 + 31 + 30 + 31 + 30, /* Jun */ 31 + 28 + 31 + 30 + 31 + 30 + 31, /* Jul */ 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31, /* Aug */ 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30, /* Sep */ 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, /* Oct */ 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, /* Nov */ }; assert (month >= 1 && month <= 12); return cum_month_days[month - 1] + (month >= 3 && is_leap_year (year)); } /* Takes a count of days from 14 Oct 1582 and returns the Gregorian calendar year it is in. Dates both before and after the epoch are supported. */ int calendar_offset_to_year (int ofs) { int d0; int n400, d1; int n100, d2; int n4, d3; int n1; int y; d0 = ofs - EPOCH; floor_divmod (d0, 365 * 400 + 100 - 3, &n400, &d1); floor_divmod (d1, 365 * 100 + 25 - 1, &n100, &d2); floor_divmod (d2, 365 * 4 + 1, &n4, &d3); n1 = floor_div (d3, 365); y = 400 * n400 + 100 * n100 + 4 * n4 + n1; if (n100 != 4 && n1 != 4) y++; return y; } /* Takes a count of days from 14 Oct 1582 and translates it into a Gregorian calendar date in (*Y,*M,*D). Also stores the year-relative day number into *YD. Dates both before and after the epoch are supported. */ void calendar_offset_to_gregorian (int ofs, int *y, int *m, int *d, int *yd) { int year = *y = calendar_offset_to_year (ofs); int january1 = raw_gregorian_to_offset (year, 1, 1); int yday = *yd = ofs - january1 + 1; int march1 = january1 + cum_month_days (year, 3); int correction = ofs < march1 ? 0 : (is_leap_year (year) ? 1 : 2); int month = *m = (12 * (yday - 1 + correction) + 373) / 367; *d = yday - cum_month_days (year, month); } /* Takes a count of days from 14 Oct 1582 and returns the 1-based year-relative day number, that is, the number of days from the beginning of the year. */ int calendar_offset_to_yday (int ofs) { int year = calendar_offset_to_year (ofs); int january1 = raw_gregorian_to_offset (year, 1, 1); int yday = ofs - january1 + 1; return yday; } /* Takes a count of days from 14 Oct 1582 and returns the corresponding weekday 1...7, with 1=Sunday. */ int calendar_offset_to_wday (int ofs) { int wday = (ofs - EPOCH + 1) % 7 + 1; if (wday <= 0) wday += 7; return wday; } /* Takes a count of days from 14 Oct 1582 and returns the month it is in. */ int calendar_offset_to_month (int ofs) { int y, m, d, yd; calendar_offset_to_gregorian (ofs, &y, &m, &d, &yd); return m; } /* Takes a count of days from 14 Oct 1582 and returns the corresponding day of the month. */ int calendar_offset_to_mday (int ofs) { int y, m, d, yd; calendar_offset_to_gregorian (ofs, &y, &m, &d, &yd); return d; } /* Returns the number of days in the specified month. */ int calendar_days_in_month (int y, int m) { static const int days_per_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; assert (m >= 1 && m <= 12); return m == 2 && is_leap_year (y) ? 29 : days_per_month[m - 1]; } pspp-1.0.1/src/data/casereader-project.c0000644000175000017500000000622412470243700015025 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/casereader-provider.h" #include "data/subcase.h" #include "gl/xalloc.h" static bool projection_is_no_op (const struct casereader *reader, const struct subcase *sc) { size_t n = subcase_get_n_fields (sc); size_t i; if (n != caseproto_get_n_widths (casereader_get_proto (reader))) return false; for (i = 0; i < n; i++) if (subcase_get_case_index (sc, i) != i) return false; return true; } struct casereader_project { struct subcase old_sc; struct subcase new_sc; }; static struct ccase * project_case (struct ccase *old, casenumber idx UNUSED, const void *project_) { const struct casereader_project *project = project_; struct ccase *new = case_create (subcase_get_proto (&project->new_sc)); subcase_copy (&project->old_sc, old, &project->new_sc, new); case_unref (old); return new; } static bool destroy_projection (void *project_) { struct casereader_project *project = project_; subcase_destroy (&project->old_sc); subcase_destroy (&project->new_sc); free (project); return true; } /* Returns a casereader in which each row is obtained by extracting the subcase SC from the corresponding row of SUBREADER. */ struct casereader * casereader_project (struct casereader *subreader, const struct subcase *sc) { if (projection_is_no_op (subreader, sc)) return casereader_rename (subreader); else { struct casereader_project *project = xmalloc (sizeof *project); const struct caseproto *proto; subcase_clone (&project->old_sc, sc); proto = subcase_get_proto (&project->old_sc); subcase_init_empty (&project->new_sc); subcase_add_proto_always (&project->new_sc, proto); return casereader_translate_stateless (subreader, proto, project_case, destroy_projection, project); } } /* Returns a casereader in which each row is obtained by extracting the value with index COLUMN from the corresponding row of SUBREADER. */ struct casereader * casereader_project_1 (struct casereader *subreader, int column) { const struct caseproto *subproto = casereader_get_proto (subreader); struct casereader *reader; struct subcase sc; subcase_init (&sc, column, caseproto_get_width (subproto, column), SC_ASCEND); reader = casereader_project (subreader, &sc); subcase_destroy (&sc); return reader; } pspp-1.0.1/src/data/casereader.h0000644000175000017500000001534012476227410013373 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Casereader client interface. A casereader abstracts interfaces through which cases may be read. A casereader may be a front-end for a system file, a portable file, a dataset, or anything else on which a casereader interface has been overlaid. Casereader layering, in which a casereader acts as a filter or translator on top of another casereader, is also supported. There is no central interface for obtaining casereaders: a casereader for reading a system file is obtained from the system file reading module, and so on. Once a casereader has been obtained, by whatever means, the interface to it is uniform. The most important functions for casereader usage are: - casereader_read: Reads a case from the casereader. The case is consumed and cannot be read again. The caller is responsible for destroying the case. - casereader_clone: Makes a copy of a casereader. May be used to read one or a set of cases from a casereader repeatedly. - casereader_destroy: Destroys a casereader. Casereaders can encounter error conditions, such as I/O errors, as they read cases. Error conditions prevent any more cases from being read from the casereader. Error conditions are reported by casereader_error. Error condition may be propagated to or from a casereader with taint_propagate using the casereader's taint object, which may be obtained with casereader_get_taint. */ #ifndef DATA_CASEREADER_H #define DATA_CASEREADER_H 1 #include "libpspp/compiler.h" #include "data/case.h" #include "data/missing-values.h" struct dictionary; struct casereader; struct casewriter; struct subcase; struct ccase *casereader_read (struct casereader *); bool casereader_destroy (struct casereader *); struct casereader *casereader_clone (const struct casereader *); struct casereader *casereader_rename (struct casereader *); void casereader_swap (struct casereader *, struct casereader *); struct ccase *casereader_peek (struct casereader *, casenumber); bool casereader_is_empty (struct casereader *); bool casereader_error (const struct casereader *); void casereader_force_error (struct casereader *); const struct taint *casereader_get_taint (const struct casereader *); casenumber casereader_get_case_cnt (struct casereader *); casenumber casereader_count_cases (const struct casereader *); void casereader_truncate (struct casereader *, casenumber); const struct caseproto *casereader_get_proto (const struct casereader *); casenumber casereader_advance (struct casereader *, casenumber); void casereader_transfer (struct casereader *, struct casewriter *); struct casereader *casereader_create_empty (const struct caseproto *); struct casereader * casereader_create_filter_func (struct casereader *, bool (*include) (const struct ccase *, void *aux), bool (*destroy) (void *aux), void *aux, struct casewriter *exclude); struct casereader * casereader_create_filter_weight (struct casereader *, const struct dictionary *dict, bool *warn_on_invalid, struct casewriter *exclude); struct casereader * casereader_create_filter_missing (struct casereader *, const struct variable *const*vars, size_t var_cnt, enum mv_class, casenumber *n_missing, struct casewriter *exclude); struct casereader * casereader_create_counter (struct casereader *, casenumber *counter, casenumber initial_value); struct casereader * casereader_create_translator (struct casereader *, const struct caseproto *output_proto, struct ccase *(*translate) (struct ccase *, void *aux), bool (*destroy) (void *aux), void *aux); struct casereader * casereader_translate_stateless (struct casereader *, const struct caseproto *output_proto, struct ccase *(*translate) (struct ccase *, casenumber idx, const void *aux), bool (*destroy) (void *aux), void *aux); struct casereader *casereader_project (struct casereader *, const struct subcase *); struct casereader *casereader_project_1 (struct casereader *, int column); struct casereader *casereader_select (struct casereader *, casenumber first, casenumber last, casenumber by); /* A function which creates a numberic value from an existing case */ typedef double new_value_func (const struct ccase *, casenumber, void *); struct casereader * casereader_create_append_numeric (struct casereader *subreader, new_value_func func, void *aux, void (*destroy) (void *aux)); struct casereader * casereader_create_arithmetic_sequence (struct casereader *, double first, double increment); enum rank_error { RANK_ERR_NONE = 0, RANK_ERR_NEGATIVE_WEIGHT = 0x01, RANK_ERR_UNSORTED = 0x02 }; typedef void distinct_func (double v, casenumber n, double w, void *aux); struct casereader * casereader_create_append_rank (struct casereader *, const struct variable *v, const struct variable *w, enum rank_error *err, distinct_func *distinct_callback, void *aux); struct casereader * casereader_create_distinct (struct casereader *input, const struct variable *key, const struct variable *weight); #endif /* data/casereader.h */ pspp-1.0.1/src/data/vector.c0000644000175000017500000000771212476227410012576 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/vector.h" #include #include "data/dictionary.h" #include "data/identifier.h" #include "libpspp/assertion.h" #include "libpspp/i18n.h" #include "libpspp/str.h" #include "gl/xalloc.h" /* Vector of variables. */ struct vector { char *name; /* Name. */ struct variable **vars; /* Set of variables. */ size_t var_cnt; /* Number of variables. */ }; /* Checks that all the variables in VECTOR have consistent width. */ static void check_widths (const struct vector *vector) { int width = var_get_width (vector->vars[0]); size_t i; for (i = 1; i < vector->var_cnt; i++) assert (width == var_get_width (vector->vars[i])); } /* Creates and returns a new vector with the given UTF-8 encoded NAME that contains the VAR_CNT variables in VARS. All variables in VARS must have the same type and width. */ struct vector * vector_create (const char *name, struct variable **vars, size_t var_cnt) { struct vector *vector = xmalloc (sizeof *vector); assert (var_cnt > 0); assert (id_is_plausible (name, false)); vector->name = xstrdup (name); vector->vars = xmemdup (vars, var_cnt * sizeof *vector->vars); vector->var_cnt = var_cnt; check_widths (vector); return vector; } /* Creates and returns a new vector as a clone of OLD, but that contains variables from NEW_DICT that are in the same position as those in OLD are in OLD_DICT. All variables in the new vector must have the same type and width. */ struct vector * vector_clone (const struct vector *old, const struct dictionary *old_dict, const struct dictionary *new_dict) { struct vector *new = xmalloc (sizeof *new); size_t i; new->name = xstrdup (old->name); new->vars = xnmalloc (old->var_cnt, sizeof *new->vars); new->var_cnt = old->var_cnt; for (i = 0; i < new->var_cnt; i++) { assert (dict_contains_var (old_dict, old->vars[i])); new->vars[i] = dict_get_var (new_dict, var_get_dict_index (old->vars[i])); } check_widths (new); return new; } /* Destroys VECTOR. */ void vector_destroy (struct vector *vector) { free (vector->name); free (vector->vars); free (vector); } /* Returns VECTOR's name, as a UTF-8 encoded string. */ const char * vector_get_name (const struct vector *vector) { return vector->name; } /* Returns the type of the variables in VECTOR. */ enum val_type vector_get_type (const struct vector *vector) { return var_get_type (vector->vars[0]); } /* Returns the variable in VECTOR with the given INDEX. */ struct variable * vector_get_var (const struct vector *vector, size_t index) { assert (index < vector->var_cnt); return vector->vars[index]; } /* Returns the number of variables in VECTOR. */ size_t vector_get_var_cnt (const struct vector *vector) { return vector->var_cnt; } /* Compares two pointers to vectors represented by A and B and returns a strcmp()-type result. */ int compare_vector_ptrs_by_name (const void *a_, const void *b_) { struct vector *const *pa = a_; struct vector *const *pb = b_; struct vector *a = *pa; struct vector *b = *pb; return utf8_strcasecmp (a->name, b->name); } pspp-1.0.1/src/data/casegrouper.h0000644000175000017500000000423612470242642013614 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Casegrouper. Breaks up the cases from a casereader into sets of contiguous cases based on some criteria, e.g. sets of cases that all have the same values for some subset of variables. Each set of cases is made available to the client as a casereader. */ #ifndef DATA_CASEGROUPER_H #define DATA_CASEGROUPER_H 1 #include #include struct casereader; struct ccase; struct dictionary; struct subcase; struct variable; struct casegrouper * casegrouper_create_func (struct casereader *, bool (*same_group) (const struct ccase *, const struct ccase *, void *aux), void (*destroy) (void *aux), void *aux); struct casegrouper *casegrouper_create_vars (struct casereader *, const struct variable *const *vars, size_t var_cnt); struct casegrouper *casegrouper_create_splits (struct casereader *, const struct dictionary *); struct casegrouper *casegrouper_create_subcase (struct casereader *, const struct subcase *); bool casegrouper_get_next_group (struct casegrouper *, struct casereader **); bool casegrouper_destroy (struct casegrouper *); #endif /* data/casegrouper.h */ pspp-1.0.1/src/data/transformations.h0000644000175000017500000000417512470445540014532 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef TRANSFORMATIONS_H #define TRANSFORMATIONS_H 1 #include #include #include "data/case.h" /* trns_proc_func return values. */ enum trns_result { TRNS_CONTINUE = -1, /* Continue to next transformation. */ TRNS_DROP_CASE = -2, /* Drop this case. */ TRNS_ERROR = -3, /* A serious error, so stop the procedure. */ TRNS_END_CASE = -4, /* Skip to next case. INPUT PROGRAM only. */ TRNS_END_FILE = -5 /* End of input. INPUT PROGRAM only. */ }; struct ccase; typedef void trns_finalize_func (void *); typedef int trns_proc_func (void *, struct ccase **, casenumber); typedef bool trns_free_func (void *); /* Transformation chains. */ struct trns_chain *trns_chain_create (void); void trns_chain_finalize (struct trns_chain *); bool trns_chain_destroy (struct trns_chain *); bool trns_chain_is_empty (const struct trns_chain *); void trns_chain_append (struct trns_chain *, trns_finalize_func *, trns_proc_func *, trns_free_func *, void *); size_t trns_chain_next (struct trns_chain *); enum trns_result trns_chain_execute (const struct trns_chain *, enum trns_result, struct ccase **, casenumber case_nr); void trns_chain_splice (struct trns_chain *, struct trns_chain *); #endif /* transformations.h */ pspp-1.0.1/src/data/make-file.h0000644000175000017500000000375012611724427013132 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef MAKE_FILE_H #define MAKE_FILE_H #include #include #include struct file_handle; /* Prepares to atomically replace a (potentially) existing file by a new file., by creating a temporary file with the given PERMISSIONS bits. Special files are an exception: they are not atomically replaced but simply opened for writing. If successful, stores a stream for it opened according to MODE (which should be "w" or "wb") in *FP. Returns a ticket that can be used to commit or abort the file replacement. If neither action has yet been taken, program termination via signal will cause all resources to be released. The return value must not be explicitly freed. The caller is responsible for closing *FP */ struct replace_file *replace_file_start (const struct file_handle *fh, const char *mode, mode_t permissions, FILE **fp); /* Commits or aborts the replacement of a (potentially) existing file by a new file, using the ticket returned by replace_file_start. Returns success. */ bool replace_file_commit (struct replace_file *); bool replace_file_abort (struct replace_file *); #endif /* make-file.h */ pspp-1.0.1/src/data/value.h0000644000175000017500000001513012470413451012402 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_VALUE_H #define DATA_VALUE_H 1 #include #include #include #include #include #include "xalloc.h" /* Maximum length of a "short" string, that is represented in "union value" without a separate pointer. This is an implementation detail of the "union value" code. There is little reason for client code to use it. */ #define MAX_SHORT_STRING 8 /* A numeric or string value. The client is responsible for keeping track of the value's width. This structure is semi-opaque: - If the value is a number, clients may access the 'f' member directly. - Clients should not access other members directly. */ union value { double f; uint8_t short_string[MAX_SHORT_STRING]; uint8_t *long_string; }; static inline void value_init (union value *, int width); static inline void value_clone (union value *, const union value *, int width); static inline bool value_needs_init (int width); static inline bool value_try_init (union value *, int width); static inline void value_destroy (union value *, int width); static inline double value_num (const union value *); static inline const uint8_t *value_str (const union value *, int width); static inline uint8_t *value_str_rw (union value *, int width); static inline void value_copy (union value *, const union value *, int width); void value_copy_rpad (union value *, int dst_width, const union value *, int src_width, char pad); void value_copy_str_rpad (union value *, int dst_width, const uint8_t *, char pad); void value_copy_buf_rpad (union value *dst, int dst_width, const uint8_t *src, size_t src_len, char pad); void value_set_missing (union value *, int width); int value_compare_3way (const union value *, const union value *, int width); bool value_equal (const union value *, const union value *, int width); unsigned int value_hash (const union value *, int width, unsigned int basis); bool value_is_resizable (const union value *, int old_width, int new_width); bool value_needs_resize (int old_width, int new_width); void value_resize (union value *, int old_width, int new_width); bool value_is_spaces (const union value *, int width); static inline void value_swap (union value *, union value *); struct pool; void value_init_pool (struct pool *, union value *, int width); void value_clone_pool (struct pool *, union value *, const union value *, int width); void value_resize_pool (struct pool *, union value *, int old_width, int new_width); /* Initializes V as a value of the given WIDTH, where 0 represents a numeric value and a positive integer represents a string value WIDTH bytes long. A WIDTH of -1 is ignored. The contents of value V are indeterminate after initialization. */ static inline void value_init (union value *v, int width) { if (width > MAX_SHORT_STRING) v->long_string = xmalloc (width); } /* Initializes V as a value of the given WIDTH, as with value_init(), and copies SRC's value into V as its initial value. */ static inline void value_clone (union value *v, const union value *src, int width) { if (width <= MAX_SHORT_STRING) *v = *src; else v->long_string = xmemdup (src->long_string, width); } /* Returns true if a value of the given WIDTH actually needs to have the value_init and value_destroy functions called, false if those functions are no-ops for values of the given WIDTH. Using this function is only a valuable optimization if a large number of values of the given WIDTH are to be initialized*/ static inline bool value_needs_init (int width) { return width > MAX_SHORT_STRING; } /* Same as value_init, except that failure to allocate memory causes it to return false instead of terminating the program. On success, returns true. */ static inline bool value_try_init (union value *v, int width) { if (width > MAX_SHORT_STRING) { v->long_string = malloc (width); return v->long_string != NULL; } else return true; } /* Frees any memory allocated by value_init for V, which must have the given WIDTH. */ static inline void value_destroy (union value *v, int width) { if (width > MAX_SHORT_STRING) free (v->long_string); } /* Returns the numeric value in V, which must have width 0. */ static inline double value_num (const union value *v) { return v->f; } /* Returns the string value in V, which must have width WIDTH. The returned value is not null-terminated. It is important that WIDTH be the actual value that was passed to value_init. Passing, e.g., a smaller value because only that number of bytes will be accessed will not always work. */ static inline const uint8_t * value_str (const union value *v, int width) { assert (width > 0); return (width > MAX_SHORT_STRING ? v->long_string : v->short_string); } /* Returns the string value in V, which must have width WIDTH. The returned value is not null-terminated. It is important that WIDTH be the actual value that was passed to value_init. Passing, e.g., a smaller value because only that number of bytes will be accessed will not always work. */ static inline uint8_t * value_str_rw (union value *v, int width) { assert (width > 0); return (width > MAX_SHORT_STRING ? v->long_string : v->short_string); } /* Copies SRC to DST, given that they both contain data of the given WIDTH. */ static inline void value_copy (union value *dst, const union value *src, int width) { if (width <= MAX_SHORT_STRING) *dst = *src; else if (dst != src) memcpy (dst->long_string, src->long_string, width); } /* Exchanges the contents of A and B. */ static inline void value_swap (union value *a, union value *b) { union value tmp = *a; *a = *b; *b = tmp; } #endif /* data/value.h */ pspp-1.0.1/src/data/psql-reader.c0000644000175000017500000004341713137223525013513 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/psql-reader.h" #include #include #include #include "data/calendar.h" #include "data/casereader-provider.h" #include "data/dictionary.h" #include "data/format.h" #include "data/variable.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "gl/c-strcase.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) #if !PSQL_SUPPORT struct casereader * psql_open_reader (struct psql_read_info *info UNUSED, struct dictionary **dict UNUSED) { msg (ME, _("Support for reading postgres databases was not compiled into this installation of PSPP")); return NULL; } #else #include #include /* Default width of string variables. */ #define PSQL_DEFAULT_WIDTH 8 /* These macros must be the same as in catalog/pg_types.h from the postgres source */ #define BOOLOID 16 #define BYTEAOID 17 #define CHAROID 18 #define NAMEOID 19 #define INT8OID 20 #define INT2OID 21 #define INT4OID 23 #define TEXTOID 25 #define OIDOID 26 #define FLOAT4OID 700 #define FLOAT8OID 701 #define CASHOID 790 #define BPCHAROID 1042 #define VARCHAROID 1043 #define DATEOID 1082 #define TIMEOID 1083 #define TIMESTAMPOID 1114 #define TIMESTAMPTZOID 1184 #define INTERVALOID 1186 #define TIMETZOID 1266 #define NUMERICOID 1700 static void psql_casereader_destroy (struct casereader *reader UNUSED, void *r_); static struct ccase *psql_casereader_read (struct casereader *, void *); static const struct casereader_class psql_casereader_class = { psql_casereader_read, psql_casereader_destroy, NULL, NULL, }; struct psql_reader { PGconn *conn; PGresult *res; int tuple; bool integer_datetimes; double postgres_epoch; struct caseproto *proto; struct dictionary *dict; /* An array of ints, which maps psql column numbers into pspp variables */ struct variable **vmap; size_t vmapsize; struct string fetch_cmd; int cache_size; }; static struct ccase *set_value (struct psql_reader *r); #if WORDS_BIGENDIAN static void data_to_native (const void *in_, void *out_, int len) { int i; const unsigned char *in = in_; unsigned char *out = out_; for (i = 0 ; i < len ; ++i ) out[i] = in[i]; } #else static void data_to_native (const void *in_, void *out_, int len) { int i; const unsigned char *in = in_; unsigned char *out = out_; for (i = 0 ; i < len ; ++i ) out[len - i - 1] = in[i]; } #endif #define GET_VALUE(IN, OUT) do { \ size_t sz = sizeof (OUT); \ data_to_native (*(IN), &(OUT), sz) ; \ (*IN) += sz; \ } while (false) #if 0 static void dump (const unsigned char *x, int l) { int i; for (i = 0; i < l ; ++i) { printf ("%02x ", x[i]); } putchar ('\n'); for (i = 0; i < l ; ++i) { if ( isprint (x[i])) printf ("%c ", x[i]); else printf (" "); } putchar ('\n'); } #endif static struct variable * create_var (struct psql_reader *r, const struct fmt_spec *fmt, int width, const char *suggested_name, int col) { unsigned long int vx = 0; struct variable *var; char *name; name = dict_make_unique_var_name (r->dict, suggested_name, &vx); var = dict_create_var (r->dict, name, width); free (name); var_set_both_formats (var, fmt); if ( col != -1) { r->vmap = xrealloc (r->vmap, (col + 1) * sizeof (*r->vmap)); r->vmap[col] = var; r->vmapsize = col + 1; } return var; } /* Fill the cache */ static bool reload_cache (struct psql_reader *r) { PQclear (r->res); r->tuple = 0; r->res = PQexec (r->conn, ds_cstr (&r->fetch_cmd)); if (PQresultStatus (r->res) != PGRES_TUPLES_OK || PQntuples (r->res) < 1) { PQclear (r->res); r->res = NULL; return false; } return true; } struct casereader * psql_open_reader (struct psql_read_info *info, struct dictionary **dict) { int i; int n_fields, n_tuples; PGresult *qres = NULL; casenumber n_cases = CASENUMBER_MAX; const char *encoding; struct psql_reader *r = xzalloc (sizeof *r); struct string query ; r->conn = PQconnectdb (info->conninfo); if ( NULL == r->conn) { msg (ME, _("Memory error whilst opening psql source")); goto error; } if ( PQstatus (r->conn) != CONNECTION_OK ) { msg (ME, _("Error opening psql source: %s."), PQerrorMessage (r->conn)); goto error; } { int ver_num = 0; const char *vers = PQparameterStatus (r->conn, "server_version"); sscanf (vers, "%d", &ver_num); if ( ver_num < 8) { msg (ME, _("Postgres server is version %s." " Reading from versions earlier than 8.0 is not supported."), vers); goto error; } } { const char *dt = PQparameterStatus (r->conn, "integer_datetimes"); r->integer_datetimes = ( 0 == c_strcasecmp (dt, "on")); } #if USE_SSL if ( PQgetssl (r->conn) == NULL) #endif { if (! info->allow_clear) { msg (ME, _("Connection is unencrypted, " "but unencrypted connections have not been permitted.")); goto error; } } r->postgres_epoch = calendar_gregorian_to_offset (2000, 1, 1, NULL); { const int enc = PQclientEncoding (r->conn); /* According to section 22.2 of the Postgresql manual a value of zero (SQL_ASCII) indicates "a declaration of ignorance about the encoding". Accordingly, we use the default encoding if we find this value. */ encoding = enc ? pg_encoding_to_char (enc) : get_default_encoding (); /* Create the dictionary and populate it */ *dict = r->dict = dict_create (encoding); } const int version = PQserverVersion (r->conn); ds_init_empty (&query); /* Versions before 9.1 don't have the REPEATABLE READ isolation level. However according to if the server is in the "hot standby" mode then SERIALIZABLE won't work. */ ds_put_c_format (&query, "BEGIN READ ONLY ISOLATION LEVEL %s; " "DECLARE pspp BINARY CURSOR FOR ", (version < 90100) ? "SERIALIZABLE" : "REPEATABLE READ"); ds_put_substring (&query, info->sql.ss); qres = PQexec (r->conn, ds_cstr (&query)); ds_destroy (&query); if ( PQresultStatus (qres) != PGRES_COMMAND_OK ) { msg (ME, _("Error from psql source: %s."), PQresultErrorMessage (qres)); goto error; } PQclear (qres); /* Now use the count() function to find the total number of cases that this query returns. Doing this incurs some overhead. The server has to iterate every case in order to find this number. However, it's performed on the server side, and in all except the most huge databases the extra overhead will be worth the effort. On the other hand, most PSPP functions don't need to know this. The GUI is the notable exception. */ ds_init_cstr (&query, "SELECT count (*) FROM ("); ds_put_substring (&query, info->sql.ss); ds_put_cstr (&query, ") stupid_sql_standard"); qres = PQexec (r->conn, ds_cstr (&query)); ds_destroy (&query); if ( PQresultStatus (qres) != PGRES_TUPLES_OK ) { msg (ME, _("Error from psql source: %s."), PQresultErrorMessage (qres)); goto error; } n_cases = atol (PQgetvalue (qres, 0, 0)); PQclear (qres); qres = PQexec (r->conn, "FETCH FIRST FROM pspp"); if ( PQresultStatus (qres) != PGRES_TUPLES_OK ) { msg (ME, _("Error from psql source: %s."), PQresultErrorMessage (qres)); goto error; } n_tuples = PQntuples (qres); n_fields = PQnfields (qres); r->proto = NULL; r->vmap = NULL; r->vmapsize = 0; for (i = 0 ; i < n_fields ; ++i ) { struct variable *var; struct fmt_spec fmt = {FMT_F, 8, 2}; Oid type = PQftype (qres, i); int width = 0; int length ; /* If there are no data then make a finger in the air guess at the contents */ if ( n_tuples > 0 ) length = PQgetlength (qres, 0, i); else length = PSQL_DEFAULT_WIDTH; switch (type) { case BOOLOID: case OIDOID: case INT2OID: case INT4OID: case INT8OID: case FLOAT4OID: case FLOAT8OID: fmt.type = FMT_F; break; case CASHOID: fmt.type = FMT_DOLLAR; break; case CHAROID: fmt.type = FMT_A; width = length > 0 ? length : 1; fmt.d = 0; fmt.w = 1; break; case TEXTOID: case VARCHAROID: case BPCHAROID: fmt.type = FMT_A; width = (info->str_width == -1) ? ROUND_UP (length, PSQL_DEFAULT_WIDTH) : info->str_width; fmt.w = width; fmt.d = 0; break; case BYTEAOID: fmt.type = FMT_AHEX; width = length > 0 ? length : PSQL_DEFAULT_WIDTH; fmt.w = width * 2; fmt.d = 0; break; case INTERVALOID: fmt.type = FMT_DTIME; width = 0; fmt.d = 0; fmt.w = 13; break; case DATEOID: fmt.type = FMT_DATE; width = 0; fmt.w = 11; fmt.d = 0; break; case TIMEOID: case TIMETZOID: fmt.type = FMT_TIME; width = 0; fmt.w = 11; fmt.d = 0; break; case TIMESTAMPOID: case TIMESTAMPTZOID: fmt.type = FMT_DATETIME; fmt.d = 0; fmt.w = 22; width = 0; break; case NUMERICOID: fmt.type = FMT_E; fmt.d = 2; fmt.w = 40; width = 0; break; default: msg (MW, _("Unsupported OID %d. SYSMIS values will be inserted."), type); fmt.type = FMT_A; width = length > 0 ? length : PSQL_DEFAULT_WIDTH; fmt.w = width ; fmt.d = 0; break; } if ( width == 0 && fmt_is_string (fmt.type)) fmt.w = width = PSQL_DEFAULT_WIDTH; var = create_var (r, &fmt, width, PQfname (qres, i), i); if ( type == NUMERICOID && n_tuples > 0) { const uint8_t *vptr = (const uint8_t *) PQgetvalue (qres, 0, i); struct fmt_spec fmt; int16_t n_digits, weight, dscale; uint16_t sign; GET_VALUE (&vptr, n_digits); GET_VALUE (&vptr, weight); GET_VALUE (&vptr, sign); GET_VALUE (&vptr, dscale); fmt.d = dscale; fmt.type = FMT_E; fmt.w = fmt_max_output_width (fmt.type) ; fmt.d = MIN (dscale, fmt_max_output_decimals (fmt.type, fmt.w)); var_set_both_formats (var, &fmt); } /* Timezones need an extra variable */ switch (type) { case TIMETZOID: { struct string name; ds_init_cstr (&name, var_get_name (var)); ds_put_cstr (&name, "-zone"); fmt.type = FMT_F; fmt.w = 8; fmt.d = 2; create_var (r, &fmt, 0, ds_cstr (&name), -1); ds_destroy (&name); } break; case INTERVALOID: { struct string name; ds_init_cstr (&name, var_get_name (var)); ds_put_cstr (&name, "-months"); fmt.type = FMT_F; fmt.w = 3; fmt.d = 0; create_var (r, &fmt, 0, ds_cstr (&name), -1); ds_destroy (&name); } default: break; } } PQclear (qres); qres = PQexec (r->conn, "MOVE BACKWARD 1 FROM pspp"); if ( PQresultStatus (qres) != PGRES_COMMAND_OK) { PQclear (qres); goto error; } PQclear (qres); r->cache_size = info->bsize != -1 ? info->bsize: 4096; ds_init_empty (&r->fetch_cmd); ds_put_format (&r->fetch_cmd, "FETCH FORWARD %d FROM pspp", r->cache_size); reload_cache (r); r->proto = caseproto_ref (dict_get_proto (*dict)); return casereader_create_sequential (NULL, r->proto, n_cases, &psql_casereader_class, r); error: dict_destroy (*dict); psql_casereader_destroy (NULL, r); return NULL; } static void psql_casereader_destroy (struct casereader *reader UNUSED, void *r_) { struct psql_reader *r = r_; if (r == NULL) return ; ds_destroy (&r->fetch_cmd); free (r->vmap); if (r->res) PQclear (r->res); PQfinish (r->conn); caseproto_unref (r->proto); free (r); } static struct ccase * psql_casereader_read (struct casereader *reader UNUSED, void *r_) { struct psql_reader *r = r_; if ( NULL == r->res || r->tuple >= r->cache_size) { if ( ! reload_cache (r) ) return false; } return set_value (r); } static struct ccase * set_value (struct psql_reader *r) { struct ccase *c; int n_vars; int i; assert (r->res); n_vars = PQnfields (r->res); if ( r->tuple >= PQntuples (r->res)) return NULL; c = case_create (r->proto); case_set_missing (c); for (i = 0 ; i < n_vars ; ++i ) { Oid type = PQftype (r->res, i); const struct variable *v = r->vmap[i]; union value *val = case_data_rw (c, v); union value *val1 = NULL; switch (type) { case INTERVALOID: case TIMESTAMPTZOID: case TIMETZOID: if (i < r->vmapsize && var_get_dict_index(v) + 1 < dict_get_var_cnt (r->dict)) { const struct variable *v1 = NULL; v1 = dict_get_var (r->dict, var_get_dict_index (v) + 1); val1 = case_data_rw (c, v1); } break; default: break; } if (PQgetisnull (r->res, r->tuple, i)) { value_set_missing (val, var_get_width (v)); switch (type) { case INTERVALOID: case TIMESTAMPTZOID: case TIMETZOID: val1->f = SYSMIS; break; default: break; } } else { const uint8_t *vptr = (const uint8_t *) PQgetvalue (r->res, r->tuple, i); int length = PQgetlength (r->res, r->tuple, i); int var_width = var_get_width (v); switch (type) { case BOOLOID: { int8_t x; GET_VALUE (&vptr, x); val->f = x; } break; case OIDOID: case INT2OID: { int16_t x; GET_VALUE (&vptr, x); val->f = x; } break; case INT4OID: { int32_t x; GET_VALUE (&vptr, x); val->f = x; } break; case INT8OID: { int64_t x; GET_VALUE (&vptr, x); val->f = x; } break; case FLOAT4OID: { float n; GET_VALUE (&vptr, n); val->f = n; } break; case FLOAT8OID: { double n; GET_VALUE (&vptr, n); val->f = n; } break; case CASHOID: { /* Postgres 8.3 uses 64 bits. Earlier versions use 32 */ switch (length) { case 8: { int64_t x; GET_VALUE (&vptr, x); val->f = x / 100.0; } break; case 4: { int32_t x; GET_VALUE (&vptr, x); val->f = x / 100.0; } break; default: val->f = SYSMIS; break; } } break; case INTERVALOID: { if ( r->integer_datetimes ) { uint32_t months; uint32_t days; uint32_t us; uint32_t things; GET_VALUE (&vptr, things); GET_VALUE (&vptr, us); GET_VALUE (&vptr, days); GET_VALUE (&vptr, months); val->f = us / 1000000.0; val->f += days * 24 * 3600; val1->f = months; } else { uint32_t days, months; double seconds; GET_VALUE (&vptr, seconds); GET_VALUE (&vptr, days); GET_VALUE (&vptr, months); val->f = seconds; val->f += days * 24 * 3600; val1->f = months; } } break; case DATEOID: { int32_t x; GET_VALUE (&vptr, x); val->f = (x + r->postgres_epoch) * 24 * 3600 ; } break; case TIMEOID: { if ( r->integer_datetimes) { uint64_t x; GET_VALUE (&vptr, x); val->f = x / 1000000.0; } else { double x; GET_VALUE (&vptr, x); val->f = x; } } break; case TIMETZOID: { int32_t zone; if ( r->integer_datetimes) { uint64_t x; GET_VALUE (&vptr, x); val->f = x / 1000000.0; } else { double x; GET_VALUE (&vptr, x); val->f = x ; } GET_VALUE (&vptr, zone); val1->f = zone / 3600.0; } break; case TIMESTAMPOID: case TIMESTAMPTZOID: { if ( r->integer_datetimes) { int64_t x; GET_VALUE (&vptr, x); x /= 1000000; val->f = (x + r->postgres_epoch * 24 * 3600 ); } else { double x; GET_VALUE (&vptr, x); val->f = (x + r->postgres_epoch * 24 * 3600 ); } } break; case TEXTOID: case VARCHAROID: case BPCHAROID: case BYTEAOID: memcpy (value_str_rw (val, var_width), vptr, MIN (length, var_width)); break; case NUMERICOID: { double f = 0.0; int i; int16_t n_digits, weight, dscale; uint16_t sign; GET_VALUE (&vptr, n_digits); GET_VALUE (&vptr, weight); GET_VALUE (&vptr, sign); GET_VALUE (&vptr, dscale); #if 0 { struct fmt_spec fmt; fmt.d = dscale; fmt.type = FMT_E; fmt.w = fmt_max_output_width (fmt.type) ; fmt.d = MIN (dscale, fmt_max_output_decimals (fmt.type, fmt.w)); var_set_both_formats (v, &fmt); } #endif for (i = 0 ; i < n_digits; ++i) { uint16_t x; GET_VALUE (&vptr, x); f += x * pow (10000, weight--); } if ( sign == 0x4000) f *= -1.0; if ( sign == 0xC000) val->f = SYSMIS; else val->f = f; } break; default: val->f = SYSMIS; break; } } } r->tuple++; return c; } #endif pspp-1.0.1/src/data/case-matcher.c0000644000175000017500000001107612470243700013620 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/case-matcher.h" #include #include "data/case.h" #include "data/subcase.h" #include "data/value.h" #include "libpspp/assertion.h" #include "gl/xalloc.h" struct case_matcher_input { struct subcase by_vars; struct ccase **data; bool *is_minimal; }; struct case_matcher { struct case_matcher_input *inputs; size_t n_inputs, allocated_inputs; union value *by_values; }; /* Creates and returns a new case matcher. */ struct case_matcher * case_matcher_create (void) { struct case_matcher *cm = xmalloc (sizeof *cm); cm->inputs = NULL; cm->n_inputs = 0; cm->allocated_inputs = 0; cm->by_values = NULL; return cm; } /* Adds a new input file to case matcher CM. case_matcher_match() will compare the variables specified in BY in case *DATA and set *IS_MINIMAL appropriately. (The caller may change the case that *DATA points to from one call to the next.) All of the BY subcases provided to this function for a given CM must be conformable (see subcase_conformable()). */ void case_matcher_add_input (struct case_matcher *cm, const struct subcase *by, struct ccase **data, bool *is_minimal) { struct case_matcher_input *input; if (cm->n_inputs == 0) { cm->by_values = xmalloc (sizeof *cm->by_values * subcase_get_n_fields (by)); caseproto_init_values (subcase_get_proto (by), cm->by_values); } else assert (subcase_conformable (by, &cm->inputs[0].by_vars)); if (cm->n_inputs >= cm->allocated_inputs) cm->inputs = x2nrealloc (cm->inputs, &cm->allocated_inputs, sizeof *cm->inputs); input = &cm->inputs[cm->n_inputs++]; subcase_clone (&input->by_vars, by); input->data = data; input->is_minimal = is_minimal; } /* Destroys case matcher CM. */ void case_matcher_destroy (struct case_matcher *cm) { if (cm != NULL) { size_t i; if (cm->by_values != NULL) { caseproto_destroy_values (subcase_get_proto (&cm->inputs[0].by_vars), cm->by_values); free (cm->by_values); } for (i = 0; i < cm->n_inputs; i++) { struct case_matcher_input *input = &cm->inputs[i]; subcase_destroy (&input->by_vars); } free (cm->inputs); free (cm); } } static int compare_BY_3way (struct case_matcher_input *a, struct case_matcher_input *b) { return subcase_compare_3way (&a->by_vars, *a->data, &b->by_vars, *b->data); } /* Compares the values of the BY variables in all of the nonnull cases provided to case_matcher_add_input() for CM, sets *IS_MINIMAL for each one to true if it has the minimum BY values among those cases or to false if its BY values are greater than the minimum. Also sets *IS_MINIMAL to false for null cases. Sets *BY to the BY values extracted from the minimum case. (The caller must not free *BY.) Returns true if at least one of the cases is nonnull, false if they are all null.*/ bool case_matcher_match (struct case_matcher *cm, union value **by) { struct case_matcher_input *file, *min; min = NULL; for (file = cm->inputs; file < &cm->inputs[cm->n_inputs]; file++) if (*file->data != NULL) { int cmp = min != NULL ? compare_BY_3way (min, file) : 1; if (cmp < 0) *file->is_minimal = false; else { *file->is_minimal = true; if (cmp > 0) min = file; } } else *file->is_minimal = false; if (min != NULL) { for (file = cm->inputs; file < min; file++) *file->is_minimal = false; subcase_extract (&min->by_vars, *min->data, cm->by_values); *by = cm->by_values; return true; } else { *by = NULL; return false; } } pspp-1.0.1/src/data/sys-file-encoding.c0000644000175000017500000012613013137223525014605 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* -*- mode: c; buffer-read-only: t -*- Generated by sys-file-encoding.pl. Do not modify! */ #include #include "data/sys-file-private.h" struct sys_encoding sys_codepage_number_to_name[] = { { 37, "IBM037" }, { 256, "ibm-256" }, { 259, "IBM-Symbols" }, { 273, "IBM273" }, { 274, "IBM274" }, { 275, "IBM275" }, { 277, "IBM277" }, { 278, "IBM278" }, { 280, "IBM280" }, { 284, "IBM284" }, { 285, "IBM285" }, { 286, "EBCDIC-AT-DE-A" }, { 290, "IBM290" }, { 293, "ibm-293" }, { 297, "IBM297" }, { 300, "ibm-300" }, { 301, "ibm-301" }, { 367, "ANSI_X3.4-1968" }, { 420, "IBM420" }, { 424, "IBM424" }, { 425, "ibm-425" }, { 437, "IBM437" }, { 500, "IBM500" }, { 720, "windows-720" }, { 737, "windows-737" }, { 775, "IBM775" }, { 803, "ibm-803" }, { 806, "ibm-806" }, { 808, "ibm-808" }, { 813, "ISO-8859-7" }, { 819, "ISO_8859-1:1987" }, { 833, "ibm-833" }, { 834, "ibm-834" }, { 835, "ibm-835" }, { 836, "ibm-836" }, { 837, "ibm-837" }, { 838, "IBM-Thai" }, { 848, "ibm-848" }, { 849, "ibm-849" }, { 850, "IBM850" }, { 851, "IBM851" }, { 852, "IBM852" }, { 855, "IBM855" }, { 856, "cp856" }, { 857, "IBM857" }, { 858, "IBM00858" }, { 859, "ibm-859" }, { 860, "IBM860" }, { 861, "IBM861" }, { 862, "IBM862" }, { 863, "IBM863" }, { 864, "IBM864" }, { 865, "IBM865" }, { 866, "IBM866" }, { 867, "ibm-867" }, { 868, "IBM868" }, { 869, "IBM869" }, { 870, "IBM870" }, { 871, "IBM871" }, { 872, "ibm-872" }, { 874, "windows-874" }, { 875, "cp875" }, { 878, "KOI8-R" }, { 880, "IBM880" }, { 896, "ibm-896" }, { 897, "JIS_X0201" }, { 901, "ibm-901" }, { 902, "ibm-902" }, { 905, "IBM905" }, { 912, "ISO_8859-2:1987" }, { 913, "ISO_8859-3:1988" }, { 914, "ISO_8859-4:1988" }, { 915, "ISO_8859-5:1988" }, { 916, "ibm-916" }, { 918, "IBM918" }, { 920, "ISO_8859-9:1989" }, { 921, "ISO-8859-13" }, { 922, "cp922" }, { 923, "ISO-8859-15" }, { 924, "IBM00924" }, { 926, "ibm-926" }, { 927, "ibm-927" }, { 928, "ibm-928" }, { 930, "cp930" }, { 932, "Shift_JIS" }, { 933, "cp933" }, { 935, "cp935" }, { 936, "GBK" }, { 937, "cp937" }, { 939, "cp939" }, { 941, "ibm-941" }, { 943, "cp943" }, { 944, "ibm-944" }, { 946, "ibm-946" }, { 947, "ibm-947" }, { 948, "ibm-948" }, { 949, "windows-949" }, { 950, "Big5" }, { 951, "ibm-951" }, { 952, "ibm-952" }, { 953, "JIS_X0212-1990" }, { 954, "EUC-JP" }, { 955, "ibm-955" }, { 964, "cp964" }, { 970, "EUC-KR" }, { 971, "ibm-971" }, { 1004, "ibm-1004" }, { 1006, "cp1006" }, { 1008, "ibm-1008" }, { 1009, "ibm-1009" }, { 1010, "NF_Z_62-010" }, { 1011, "DIN_66003" }, { 1012, "IT" }, { 1013, "BS_4730" }, { 1014, "ES2" }, { 1015, "PT2" }, { 1016, "NS_4551-1" }, { 1017, "ibm-1017" }, { 1018, "SEN_850200_B" }, { 1019, "ibm-1019" }, { 1020, "CSA_Z243.4-1985-1" }, { 1021, "ibm-1021" }, { 1023, "ES" }, { 1025, "cp1025" }, { 1026, "IBM1026" }, { 1027, "ibm-1027" }, { 1041, "ibm-1041" }, { 1043, "ibm-1043" }, { 1046, "ibm-1046" }, { 1047, "IBM1047" }, { 1051, "hp-roman8" }, { 1088, "ibm-1088" }, { 1089, "ISO_8859-6:1987" }, { 1097, "cp1097" }, { 1098, "cp1098" }, { 1100, "DEC-MCS" }, { 1101, "ibm-1101" }, { 1102, "ibm-1102" }, { 1103, "ibm-1103" }, { 1104, "iso-ir-25" }, { 1105, "ibm-1105" }, { 1106, "ibm-1106" }, { 1107, "DS_2089" }, { 1112, "cp1112" }, { 1114, "ibm-1114" }, { 1115, "ibm-1115" }, { 1122, "cp1122" }, { 1123, "cp1123" }, { 1124, "cp1124" }, { 1125, "ibm-1125" }, { 1127, "ibm-1127" }, { 1129, "ibm-1129" }, { 1130, "ibm-1130" }, { 1131, "ibm-1131" }, { 1132, "ibm-1132" }, { 1133, "ibm-1133" }, { 1137, "ibm-1137" }, { 1140, "IBM01140" }, { 1141, "IBM01141" }, { 1142, "IBM01142" }, { 1143, "IBM01143" }, { 1144, "IBM01144" }, { 1145, "IBM01145" }, { 1146, "IBM01146" }, { 1147, "IBM01147" }, { 1148, "IBM01148" }, { 1149, "IBM01149" }, { 1153, "ibm-1153" }, { 1154, "ibm-1154" }, { 1155, "ibm-1155" }, { 1156, "ibm-1156" }, { 1157, "ibm-1157" }, { 1158, "ibm-1158" }, { 1160, "ibm-1160" }, { 1161, "ibm-1161" }, { 1162, "ibm-1162" }, { 1163, "ibm-1163" }, { 1164, "ibm-1164" }, { 1165, "ibm-1165" }, { 1166, "ibm-1166" }, { 1167, "ibm-1167" }, { 1168, "KOI8-U" }, { 1174, "KZ-1048" }, { 1200, "UTF-16LE" }, { 1201, "UTF-16BE" }, { 1205, "UTF-16" }, { 1213, "SCSU" }, { 1215, "BOCU-1" }, { 1235, "UTF-32LE" }, { 1237, "UTF-32" }, { 1250, "windows-1250" }, { 1251, "windows-1251" }, { 1252, "windows-1252" }, { 1253, "windows-1253" }, { 1254, "windows-1254" }, { 1255, "windows-1255" }, { 1256, "windows-1256" }, { 1257, "windows-1257" }, { 1258, "windows-1258" }, { 1276, "Adobe-Standard-Encoding" }, { 1277, "ibm-1277" }, { 1350, "ibm-1350" }, { 1351, "ibm-1351" }, { 1362, "ibm-1362" }, { 1363, "ibm-1363" }, { 1364, "ibm-1364" }, { 1370, "ibm-1370" }, { 1371, "ibm-1371" }, { 1373, "ibm-1373" }, { 1375, "Big5-HKSCS" }, { 1380, "ibm-1380" }, { 1381, "cp1381" }, { 1382, "ibm-1382" }, { 1383, "GB2312" }, { 1385, "ibm-9577" }, { 1386, "ibm-1386" }, { 1390, "ibm-1390" }, { 1392, "gb18030" }, { 1399, "ibm-1399" }, { 4517, "ibm-4517" }, { 4899, "ibm-4899" }, { 4902, "ibm-4902" }, { 4909, "ibm-4909" }, { 4930, "ibm-4930" }, { 4933, "ibm-4933" }, { 4948, "ibm-4948" }, { 4951, "ibm-4951" }, { 4952, "ibm-4952" }, { 4960, "ibm-4960" }, { 4971, "ibm-4971" }, { 5012, "ISO_8859-8:1988" }, { 5026, "cp930" }, { 5035, "cp939" }, { 5039, "ibm-5039" }, { 5048, "ibm-5048" }, { 5049, "ibm-5049" }, { 5050, "cp33722" }, { 5054, "JIS_Encoding" }, { 5067, "ibm-5067" }, { 5104, "ibm-5104" }, { 5123, "ibm-5123" }, { 5346, "windows-1250" }, { 5347, "windows-1251" }, { 5348, "windows-1252" }, { 5349, "windows-1253" }, { 5350, "windows-1254" }, { 5351, "ibm-5351" }, { 5352, "ibm-5352" }, { 5353, "ibm-5353" }, { 5354, "windows-1258" }, { 5471, "MS950_HKSCS" }, { 5478, "GB_2312-80" }, { 8482, "ibm-8482" }, { 8612, "ibm-8612" }, { 9005, "ISO_8859-7:1987" }, { 9027, "ibm-9027" }, { 9030, "IBM-Thai" }, { 9048, "ibm-9048" }, { 9056, "ibm-9056" }, { 9061, "ibm-9061" }, { 9066, "TIS-620" }, { 9067, "ibm-9067" }, { 9145, "ibm-9145" }, { 9238, "ibm-9238" }, { 9400, "CESU-8" }, { 9424, "UTF-32BE" }, { 9447, "windows-1255" }, { 9448, "windows-1256" }, { 9449, "windows-1257" }, { 9580, "ibm-1388" }, { 10000, "macintosh" }, { 10006, "windows-10006" }, { 10007, "windows-10007" }, { 10029, "windows-10029" }, { 10081, "windows-10081" }, { 12712, "ibm-12712" }, { 13125, "ibm-13125" }, { 13140, "ibm-13140" }, { 13218, "ibm-13218" }, { 13676, "ibm-13676" }, { 16804, "ibm-16804" }, { 17221, "ibm-17221" }, { 17248, "ibm-17248" }, { 17593, "UTF-8" }, { 20127, "ANSI_X3.4-1968" }, { 20780, "ibm-16684" }, { 20866, "KOI8-R" }, { 20880, "IBM880" }, { 20905, "IBM905" }, { 21344, "ibm-21344" }, { 21427, "ibm-21427" }, { 21866, "KOI8-U" }, { 25546, "ibm-25546" }, { 28592, "ISO_8859-2:1987" }, { 28593, "ISO_8859-3:1988" }, { 28594, "ISO_8859-4:1988" }, { 28595, "ISO_8859-5:1988" }, { 28596, "ISO_8859-6:1987" }, { 28597, "ISO_8859-7:1987" }, { 28598, "ISO_8859-8:1988" }, { 28599, "ISO_8859-9:1989" }, { 28603, "ISO-8859-13" }, { 28605, "ISO-8859-15" }, { 29875, "UTF-16LE" }, { 33058, "ibm-33058" }, { 33722, "cp33722" }, { 51932, "Extended_UNIX_Code_Packed_Format_for_Japanese" }, { 51949, "EUC-KR" }, { 54936, "gb18030" }, { 57002, "ibm-4902" }, { 57004, "windows-57004" }, { 57005, "windows-57005" }, { 57006, "windows-57003" }, { 57007, "windows-57007" }, { 57008, "windows-57008" }, { 57009, "windows-57009" }, { 57010, "windows-57010" }, { 57011, "windows-57011" }, { 61956, "UTF-16BE" }, { 65000, "UTF-7" }, { 65001, "UTF-8" }, { 65025, "ibm-65025" }, { 0, NULL } }; struct sys_encoding sys_codepage_name_to_number[] = { { 37, "037" }, { 1006, "1006" }, { 1025, "1025" }, { 1026, "1026" }, { 1047, "1047" }, { 28596, "1089" }, { 1097, "1097" }, { 1098, "1098" }, { 1112, "1112" }, { 1122, "1122" }, { 1123, "1123" }, { 1124, "1124" }, { 1381, "1381" }, { 1383, "1383" }, { 273, "273" }, { 277, "277" }, { 278, "278" }, { 280, "280" }, { 284, "284" }, { 285, "285" }, { 297, "297" }, { 5050, "33722" }, { 420, "420" }, { 424, "424" }, { 437, "437" }, { 51949, "5601" }, { 20127, "646" }, { 737, "737" }, { 775, "775" }, { 813, "813" }, { 819, "819" }, { 9030, "838" }, { 850, "850" }, { 851, "851" }, { 852, "852" }, { 855, "855" }, { 856, "856" }, { 857, "857" }, { 860, "860" }, { 861, "861" }, { 862, "862" }, { 863, "863" }, { 865, "865" }, { 866, "866" }, { 868, "868" }, { 869, "869" }, { 871, "871" }, { 875, "875" }, { 819, "8859_1" }, { 28603, "8859_13" }, { 28605, "8859_15" }, { 28592, "8859_2" }, { 28593, "8859_3" }, { 28594, "8859_4" }, { 28595, "8859_5" }, { 28596, "8859_6" }, { 813, "8859_7" }, { 28598, "8859_8" }, { 28599, "8859_9" }, { 28592, "912" }, { 28593, "913" }, { 28594, "914" }, { 28595, "915" }, { 916, "916" }, { 28599, "920" }, { 922, "922" }, { 28605, "923" }, { 5026, "930" }, { 933, "933" }, { 935, "935" }, { 937, "937" }, { 5035, "939" }, { 943, "943" }, { 949, "949" }, { 950, "950" }, { 964, "964" }, { 51949, "970" }, { 20127, "ANSI_X3.4-1968" }, { 20127, "ANSI_X3.4-1986" }, { 20127, "ASCII" }, { 28596, "ASMO-708" }, { 1276, "Adobe-Standard-Encoding" }, { 1215, "BOCU-1" }, { 1013, "BS_4730" }, { 950, "Big5" }, { 1375, "Big5-HKSCS" }, { 858, "CCSID00858" }, { 924, "CCSID00924" }, { 1140, "CCSID01140" }, { 1141, "CCSID01141" }, { 1142, "CCSID01142" }, { 1143, "CCSID01143" }, { 1144, "CCSID01144" }, { 1145, "CCSID01145" }, { 1146, "CCSID01146" }, { 1147, "CCSID01147" }, { 1148, "CCSID01148" }, { 1149, "CCSID01149" }, { 9400, "CESU-8" }, { 858, "CP00858" }, { 924, "CP00924" }, { 1140, "CP01140" }, { 1141, "CP01141" }, { 1142, "CP01142" }, { 1143, "CP01143" }, { 1144, "CP01144" }, { 1145, "CP01145" }, { 1146, "CP01146" }, { 1147, "CP01147" }, { 1148, "CP01148" }, { 1149, "CP01149" }, { 1026, "CP1026" }, { 273, "CP273" }, { 274, "CP274" }, { 280, "CP280" }, { 284, "CP284" }, { 285, "CP285" }, { 500, "CP500" }, { 868, "CP868" }, { 870, "CP870" }, { 871, "CP871" }, { 20905, "CP905" }, { 918, "CP918" }, { 936, "CP936" }, { 1020, "CSA_Z243.4-1985-1" }, { 1100, "DEC-MCS" }, { 1011, "DIN_66003" }, { 720, "DOS-720" }, { 862, "DOS-862" }, { 1107, "DS_2089" }, { 286, "EBCDIC-AT-DE-A" }, { 274, "EBCDIC-BE" }, { 275, "EBCDIC-BR" }, { 277, "EBCDIC-CP-DK" }, { 277, "EBCDIC-CP-NO" }, { 20880, "EBCDIC-Cyrillic" }, { 290, "EBCDIC-JP-kana" }, { 28596, "ECMA-114" }, { 28597, "ECMA-118" }, { 28597, "ELOT_928" }, { 1023, "ES" }, { 1014, "ES2" }, { 51932, "EUC-JP" }, { 51949, "EUC-KR" }, { 51932, "Extended_UNIX_Code_Packed_Format_for_Japanese" }, { 1018, "FI" }, { 54936, "GB18030" }, { 1383, "GB2312" }, { 936, "GBK" }, { 5478, "GB_2312-80" }, { 259, "IBM-Symbols" }, { 9030, "IBM-Thai" }, { 858, "IBM00858" }, { 924, "IBM00924" }, { 1140, "IBM01140" }, { 1141, "IBM01141" }, { 1142, "IBM01142" }, { 1143, "IBM01143" }, { 1144, "IBM01144" }, { 1145, "IBM01145" }, { 1146, "IBM01146" }, { 1147, "IBM01147" }, { 1148, "IBM01148" }, { 1149, "IBM01149" }, { 37, "IBM037" }, { 1006, "IBM1006" }, { 1026, "IBM1026" }, { 1047, "IBM1047" }, { 1098, "IBM1098" }, { 1153, "IBM1153" }, { 273, "IBM273" }, { 274, "IBM274" }, { 275, "IBM275" }, { 277, "IBM277" }, { 278, "IBM278" }, { 280, "IBM280" }, { 284, "IBM284" }, { 285, "IBM285" }, { 290, "IBM290" }, { 297, "IBM297" }, { 20127, "IBM367" }, { 420, "IBM420" }, { 424, "IBM424" }, { 437, "IBM437" }, { 500, "IBM500" }, { 737, "IBM737" }, { 775, "IBM775" }, { 819, "IBM819" }, { 9030, "IBM838" }, { 850, "IBM850" }, { 851, "IBM851" }, { 852, "IBM852" }, { 855, "IBM855" }, { 856, "IBM856" }, { 857, "IBM857" }, { 860, "IBM860" }, { 861, "IBM861" }, { 862, "IBM862" }, { 863, "IBM863" }, { 864, "IBM864" }, { 865, "IBM865" }, { 866, "IBM866" }, { 868, "IBM868" }, { 869, "IBM869" }, { 870, "IBM870" }, { 871, "IBM871" }, { 875, "IBM875" }, { 20880, "IBM880" }, { 20905, "IBM905" }, { 918, "IBM918" }, { 922, "IBM922" }, { 5026, "IBM930" }, { 5035, "IBM939" }, { 1205, "ISO-10646-UCS-2" }, { 1237, "ISO-10646-UCS-4" }, { 5054, "ISO-2022-JP-1" }, { 819, "ISO-8859-1" }, { 28603, "ISO-8859-13" }, { 28605, "ISO-8859-15" }, { 28592, "ISO-8859-2" }, { 28593, "ISO-8859-3" }, { 28594, "ISO-8859-4" }, { 28595, "ISO-8859-5" }, { 28596, "ISO-8859-6" }, { 28596, "ISO-8859-6-E" }, { 28596, "ISO-8859-6-I" }, { 28597, "ISO-8859-7" }, { 28598, "ISO-8859-8" }, { 28598, "ISO-8859-8-E" }, { 28598, "ISO-8859-8-I" }, { 28599, "ISO-8859-9" }, { 1020, "ISO646-CA" }, { 1011, "ISO646-DE" }, { 1107, "ISO646-DK" }, { 1023, "ISO646-ES" }, { 1014, "ISO646-ES2" }, { 1018, "ISO646-FI" }, { 1010, "ISO646-FR" }, { 1104, "ISO646-FR1" }, { 1013, "ISO646-GB" }, { 1012, "ISO646-IT" }, { 1016, "ISO646-NO" }, { 1015, "ISO646-PT2" }, { 1018, "ISO646-SE" }, { 20127, "ISO646-US" }, { 20127, "ISO_646.irv:1991" }, { 819, "ISO_8859-1:1987" }, { 28592, "ISO_8859-2:1987" }, { 28593, "ISO_8859-3:1988" }, { 28594, "ISO_8859-4:1988" }, { 28595, "ISO_8859-5:1988" }, { 28596, "ISO_8859-6:1987" }, { 28597, "ISO_8859-7:1987" }, { 28598, "ISO_8859-8:1988" }, { 28599, "ISO_8859-9:1989" }, { 1012, "IT" }, { 5054, "JIS_Encoding" }, { 897, "JIS_X0201" }, { 953, "JIS_X0212-1990" }, { 20866, "KOI8-R" }, { 21866, "KOI8-U" }, /* KSC_5601 has multiple numbers for windows: 949 51949 */ { 949, "KSC_5601" }, /* KS_C_5601-1987 has multiple numbers for windows: 949 51949 */ { 949, "KS_C_5601-1987" }, { 949, "KS_C_5601-1989" }, { 1174, "KZ-1048" }, { 28605, "Latin-9" }, { 874, "MS874" }, { 936, "MS936" }, { 5471, "MS950_HKSCS" }, { 932, "MS_Kanji" }, { 1010, "NF_Z_62-010" }, { 1016, "NS_4551-1" }, { 858, "PC-Multilingual-850+euro" }, { 1015, "PT2" }, { 1174, "RK1048" }, { 1213, "SCSU" }, { 1018, "SEN_850200_B" }, { 1174, "STRK1048-2002" }, { 932, "Shift_JIS" }, { 874, "TIS-620" }, { 20127, "US-ASCII" }, { 1205, "UTF-16" }, { 1201, "UTF-16BE" }, { 1200, "UTF-16LE" }, { 1237, "UTF-32" }, { 9424, "UTF-32BE" }, { 1235, "UTF-32LE" }, { 65000, "UTF-7" }, { 65001, "UTF-8" }, { 1201, "UnicodeBigUnmarked" }, { 1200, "UnicodeLittleUnmarked" }, { 51932, "X-EUC-JP" }, { 897, "X0201" }, { 28596, "arabic" }, { 20127, "ascii7" }, { 1375, "big5hk" }, { 1020, "ca" }, { 5478, "chinese" }, { 868, "cp-ar" }, { 869, "cp-gr" }, { 861, "cp-is" }, { 37, "cp037" }, { 1006, "cp1006" }, { 1025, "cp1025" }, { 1047, "cp1047" }, { 28596, "cp1089" }, { 1097, "cp1097" }, { 1098, "cp1098" }, { 1112, "cp1112" }, { 1122, "cp1122" }, { 1123, "cp1123" }, { 1124, "cp1124" }, { 1140, "cp1140" }, { 1141, "cp1141" }, { 1142, "cp1142" }, { 1143, "cp1143" }, { 1144, "cp1144" }, { 1145, "cp1145" }, { 1146, "cp1146" }, { 1147, "cp1147" }, { 1148, "cp1148" }, { 1149, "cp1149" }, { 1250, "cp1250" }, { 1251, "cp1251" }, { 1252, "cp1252" }, { 1253, "cp1253" }, { 1254, "cp1254" }, { 1255, "cp1255" }, { 1256, "cp1256" }, { 1257, "cp1257" }, { 1258, "cp1258" }, { 1363, "cp1363" }, { 1381, "cp1381" }, { 1383, "cp1383" }, { 275, "cp275" }, { 277, "cp277" }, { 278, "cp278" }, { 290, "cp290" }, { 297, "cp297" }, { 5050, "cp33722" }, { 20127, "cp367" }, { 420, "cp420" }, { 424, "cp424" }, { 437, "cp437" }, { 737, "cp737" }, { 775, "cp775" }, { 813, "cp813" }, { 819, "cp819" }, { 9030, "cp838" }, { 850, "cp850" }, { 851, "cp851" }, { 852, "cp852" }, { 855, "cp855" }, { 856, "cp856" }, { 857, "cp857" }, { 858, "cp858" }, { 860, "cp860" }, { 861, "cp861" }, { 862, "cp862" }, { 863, "cp863" }, { 864, "cp864" }, { 865, "cp865" }, { 866, "cp866" }, { 869, "cp869" }, { 9066, "cp874" }, { 875, "cp875" }, { 20880, "cp880" }, { 28592, "cp912" }, { 28593, "cp913" }, { 28594, "cp914" }, { 28595, "cp915" }, { 916, "cp916" }, { 28599, "cp920" }, { 922, "cp922" }, { 28605, "cp923" }, { 5026, "cp930" }, { 932, "cp932" }, { 933, "cp933" }, { 935, "cp935" }, { 937, "cp937" }, { 5035, "cp939" }, { 943, "cp943" }, { 932, "cp943c" }, { 949, "cp949" }, { 950, "cp950" }, { 964, "cp964" }, { 51949, "cp970" }, { 284, "cpibm284" }, { 285, "cpibm285" }, { 297, "cpibm297" }, { 37, "cpibm37" }, { 20127, "csASCII" }, { 1276, "csAdobeStandardEncoding" }, { 1215, "csBOCU-1" }, { 950, "csBig5" }, { 1100, "csDECMCS" }, { 286, "csEBCDICATDEA" }, { 51949, "csEUCKR" }, { 51932, "csEUCPkdFmtJapanese" }, { 1383, "csGB2312" }, { 1051, "csHPRoman8" }, { 897, "csHalfWidthKatakana" }, { 37, "csIBM037" }, { 1026, "csIBM1026" }, { 273, "csIBM273" }, { 274, "csIBM274" }, { 275, "csIBM275" }, { 277, "csIBM277" }, { 278, "csIBM278" }, { 280, "csIBM280" }, { 284, "csIBM284" }, { 285, "csIBM285" }, { 290, "csIBM290" }, { 297, "csIBM297" }, { 420, "csIBM420" }, { 424, "csIBM424" }, { 500, "csIBM500" }, { 855, "csIBM855" }, { 857, "csIBM857" }, { 860, "csIBM860" }, { 861, "csIBM861" }, { 863, "csIBM863" }, { 864, "csIBM864" }, { 865, "csIBM865" }, { 866, "csIBM866" }, { 868, "csIBM868" }, { 869, "csIBM869" }, { 870, "csIBM870" }, { 871, "csIBM871" }, { 20880, "csIBM880" }, { 20905, "csIBM905" }, { 918, "csIBM918" }, { 259, "csIBMSymbols" }, { 9030, "csIBMThai" }, { 1018, "csISO10Swedish" }, { 1020, "csISO121Canadian1" }, { 1012, "csISO15Italian" }, { 1023, "csISO17Spanish" }, { 1011, "csISO21German" }, { 1104, "csISO25French" }, { 1013, "csISO4UnitedKingdom" }, { 5478, "csISO58GB231280" }, { 1016, "csISO60DanishNorwegian" }, { 1016, "csISO60Norwegian1" }, { 1107, "csISO646Danish" }, { 1010, "csISO69French" }, { 1015, "csISO84Portuguese2" }, { 1014, "csISO85Spanish2" }, { 819, "csISOLatin1" }, { 28592, "csISOLatin2" }, { 28593, "csISOLatin3" }, { 28594, "csISOLatin4" }, { 28599, "csISOLatin5" }, { 28596, "csISOLatinArabic" }, { 28595, "csISOLatinCyrillic" }, { 28597, "csISOLatinGreek" }, { 28598, "csISOLatinHebrew" }, { 5054, "csJISEncoding" }, { 20866, "csKOI8R" }, { 949, "csKSC56011987" }, { 1174, "csKZ1048" }, { 10000, "csMacintosh" }, { 775, "csPC775Baltic" }, { 850, "csPC850Multilingual" }, { 851, "csPC851" }, { 862, "csPC862LatinHebrew" }, { 437, "csPC8CodePage437" }, { 852, "csPCp852" }, { 855, "csPCp855" }, { 932, "csShiftJIS" }, { 932, "csWindows31J" }, { 1020, "csa7-1" }, { 28605, "csisolatin0" }, { 28605, "csisolatin9" }, { 28595, "cyrillic" }, { 1011, "de" }, { 1100, "dec" }, { 1107, "dk" }, { 924, "ebcdic-Latin9--euro" }, { 420, "ebcdic-cp-ar1" }, { 918, "ebcdic-cp-ar2" }, { 500, "ebcdic-cp-be" }, { 37, "ebcdic-cp-ca" }, { 500, "ebcdic-cp-ch" }, { 284, "ebcdic-cp-es" }, { 278, "ebcdic-cp-fi" }, { 297, "ebcdic-cp-fr" }, { 285, "ebcdic-cp-gb" }, { 424, "ebcdic-cp-he" }, { 871, "ebcdic-cp-is" }, { 280, "ebcdic-cp-it" }, { 37, "ebcdic-cp-nl" }, { 870, "ebcdic-cp-roece" }, { 278, "ebcdic-cp-se" }, { 20905, "ebcdic-cp-tr" }, { 37, "ebcdic-cp-us" }, { 37, "ebcdic-cp-wt" }, { 870, "ebcdic-cp-yu" }, { 1141, "ebcdic-de-273+euro" }, { 1142, "ebcdic-dk-277+euro" }, { 1145, "ebcdic-es-284+euro" }, { 1143, "ebcdic-fi-278+euro" }, { 1147, "ebcdic-fr-297+euro" }, { 285, "ebcdic-gb" }, { 1146, "ebcdic-gb-285+euro" }, { 1148, "ebcdic-international-500+euro" }, { 871, "ebcdic-is" }, { 1149, "ebcdic-is-871+euro" }, { 1144, "ebcdic-it-280+euro" }, { 1142, "ebcdic-no-277+euro" }, { 1143, "ebcdic-se-278+euro" }, { 278, "ebcdic-sv" }, { 1140, "ebcdic-us-37+euro" }, { 1350, "eucJP-Open" }, { 954, "eucjis" }, { 1010, "fr" }, { 1013, "gb" }, { 54936, "gb18030" }, { 28597, "greek" }, { 28597, "greek8" }, { 28598, "hebrew" }, { 1051, "hp-roman8" }, { 1004, "ibm-1004" }, { 1004, "ibm-1004_P100-1995" }, { 1006, "ibm-1006" }, { 1006, "ibm-1006_P100-1995" }, { 1008, "ibm-1008" }, { 1008, "ibm-1008_P100-1995" }, { 1009, "ibm-1009" }, { 1009, "ibm-1009_P100-1995" }, { 1010, "ibm-1010" }, { 1010, "ibm-1010_P100-1995" }, { 1011, "ibm-1011" }, { 1011, "ibm-1011_P100-1995" }, { 1012, "ibm-1012" }, { 1012, "ibm-1012_P100-1995" }, { 1013, "ibm-1013" }, { 1013, "ibm-1013_P100-1995" }, { 1014, "ibm-1014" }, { 1014, "ibm-1014_P100-1995" }, { 1015, "ibm-1015" }, { 1015, "ibm-1015_P100-1995" }, { 1016, "ibm-1016" }, { 1016, "ibm-1016_P100-1995" }, { 1017, "ibm-1017" }, { 1017, "ibm-1017_P100-1995" }, { 1018, "ibm-1018" }, { 1018, "ibm-1018_P100-1995" }, { 1019, "ibm-1019" }, { 1019, "ibm-1019_P100-1995" }, { 1020, "ibm-1020" }, { 1020, "ibm-1020_P100-2003" }, { 1021, "ibm-1021" }, { 1021, "ibm-1021_P100-2003" }, { 1023, "ibm-1023" }, { 1023, "ibm-1023_P100-2003" }, { 1025, "ibm-1025" }, { 1025, "ibm-1025_P100-1995" }, { 1026, "ibm-1026" }, { 1026, "ibm-1026_P100-1995" }, { 1027, "ibm-1027" }, { 1027, "ibm-1027_P100-1995" }, { 1041, "ibm-1041" }, { 1041, "ibm-1041_P100-1995" }, { 1043, "ibm-1043" }, { 1043, "ibm-1043_P100-1995" }, { 1046, "ibm-1046" }, { 1046, "ibm-1046_X110-1999" }, { 1047, "ibm-1047" }, { 1047, "ibm-1047_P100-1995" }, { 1051, "ibm-1051" }, { 1051, "ibm-1051_P100-1995" }, { 1088, "ibm-1088" }, { 1088, "ibm-1088_P100-1995" }, { 28596, "ibm-1089" }, { 28596, "ibm-1089_P100-1995" }, { 1097, "ibm-1097" }, { 1097, "ibm-1097_P100-1995" }, { 1098, "ibm-1098" }, { 1098, "ibm-1098_P100-1995" }, { 1100, "ibm-1100" }, { 1100, "ibm-1100_P100-2003" }, { 1101, "ibm-1101" }, { 1101, "ibm-1101_P100-2003" }, { 1102, "ibm-1102" }, { 1102, "ibm-1102_P100-2003" }, { 1103, "ibm-1103" }, { 1103, "ibm-1103_P100-2003" }, { 1104, "ibm-1104" }, { 1104, "ibm-1104_P100-2003" }, { 1105, "ibm-1105" }, { 1105, "ibm-1105_P100-2003" }, { 1106, "ibm-1106" }, { 1106, "ibm-1106_P100-2003" }, { 1107, "ibm-1107" }, { 1107, "ibm-1107_P100-2003" }, { 1112, "ibm-1112" }, { 1112, "ibm-1112_P100-1995" }, { 1114, "ibm-1114" }, { 1114, "ibm-1114_P100-2001" }, { 1115, "ibm-1115" }, { 1115, "ibm-1115_P100-1995" }, { 1122, "ibm-1122" }, { 1122, "ibm-1122_P100-1999" }, { 1123, "ibm-1123" }, { 1123, "ibm-1123_P100-1995" }, { 1124, "ibm-1124" }, { 1124, "ibm-1124_P100-1996" }, { 1125, "ibm-1125" }, { 1125, "ibm-1125_P100-1997" }, { 1127, "ibm-1127" }, { 1127, "ibm-1127_P100-2004" }, { 1129, "ibm-1129" }, { 1129, "ibm-1129_P100-1997" }, { 1130, "ibm-1130" }, { 1130, "ibm-1130_P100-1997" }, { 1131, "ibm-1131" }, { 1131, "ibm-1131_P100-1997" }, { 1132, "ibm-1132" }, { 1132, "ibm-1132_P100-1998" }, { 1133, "ibm-1133" }, { 1133, "ibm-1133_P100-1997" }, { 1137, "ibm-1137" }, { 1137, "ibm-1137_P100-1999" }, { 1140, "ibm-1140" }, { 1140, "ibm-1140_P100-1997" }, { 1141, "ibm-1141" }, { 1141, "ibm-1141_P100-1997" }, { 1142, "ibm-1142" }, { 1142, "ibm-1142_P100-1997" }, { 1143, "ibm-1143" }, { 1143, "ibm-1143_P100-1997" }, { 1144, "ibm-1144" }, { 1144, "ibm-1144_P100-1997" }, { 1145, "ibm-1145" }, { 1145, "ibm-1145_P100-1997" }, { 1146, "ibm-1146" }, { 1146, "ibm-1146_P100-1997" }, { 1147, "ibm-1147" }, { 1147, "ibm-1147_P100-1997" }, { 1148, "ibm-1148" }, { 1148, "ibm-1148_P100-1997" }, { 1149, "ibm-1149" }, { 1149, "ibm-1149_P100-1997" }, { 1153, "ibm-1153" }, { 1153, "ibm-1153_P100-1999" }, { 1154, "ibm-1154" }, { 1154, "ibm-1154_P100-1999" }, { 1155, "ibm-1155" }, { 1155, "ibm-1155_P100-1999" }, { 1156, "ibm-1156" }, { 1156, "ibm-1156_P100-1999" }, { 1157, "ibm-1157" }, { 1157, "ibm-1157_P100-1999" }, { 1158, "ibm-1158" }, { 1158, "ibm-1158_P100-1999" }, { 1160, "ibm-1160" }, { 1160, "ibm-1160_P100-1999" }, { 1161, "ibm-1161" }, { 1161, "ibm-1161_P100-1999" }, { 1162, "ibm-1162" }, { 1162, "ibm-1162_P100-1999" }, { 1163, "ibm-1163" }, { 1163, "ibm-1163_P100-1999" }, { 1164, "ibm-1164" }, { 1164, "ibm-1164_P100-1999" }, { 1165, "ibm-1165" }, { 1165, "ibm-1165_P101-2000" }, { 1166, "ibm-1166" }, { 1166, "ibm-1166_P100-2002" }, { 1167, "ibm-1167" }, { 1167, "ibm-1167_P100-2002" }, { 21866, "ibm-1168" }, { 21866, "ibm-1168_P100-2002" }, { 1174, "ibm-1174" }, { 1174, "ibm-1174_X100-2007" }, { 1201, "ibm-1200" }, { 1201, "ibm-1201" }, { 1200, "ibm-1202" }, { 1200, "ibm-1203" }, { 1205, "ibm-1204" }, { 1205, "ibm-1205" }, { 65001, "ibm-1208" }, { 65001, "ibm-1209" }, { 1213, "ibm-1212" }, { 1213, "ibm-1213" }, { 1215, "ibm-1214" }, { 1215, "ibm-1215" }, { 9424, "ibm-1232" }, { 9424, "ibm-1233" }, { 1235, "ibm-1234" }, { 1235, "ibm-1235" }, { 1237, "ibm-1236" }, { 1237, "ibm-1237" }, { 1250, "ibm-1250" }, { 1250, "ibm-1250_P100-1995" }, { 1251, "ibm-1251" }, { 1251, "ibm-1251_P100-1995" }, { 1252, "ibm-1252" }, { 1252, "ibm-1252_P100-2000" }, { 1253, "ibm-1253" }, { 1253, "ibm-1253_P100-1995" }, { 1254, "ibm-1254" }, { 1254, "ibm-1254_P100-1995" }, { 1255, "ibm-1255" }, { 1255, "ibm-1255_P100-1995" }, { 1256, "ibm-1256" }, { 1256, "ibm-1256_P110-1997" }, { 1257, "ibm-1257" }, { 1257, "ibm-1257_P100-1995" }, { 1258, "ibm-1258" }, { 1258, "ibm-1258_P100-1997" }, { 12712, "ibm-12712" }, { 12712, "ibm-12712_P100-1998" }, { 1276, "ibm-1276" }, { 1276, "ibm-1276_P100-1995" }, { 1277, "ibm-1277" }, { 1277, "ibm-1277_P100-1995" }, { 13125, "ibm-13125" }, { 13125, "ibm-13125_P100-1997" }, { 13140, "ibm-13140" }, { 13140, "ibm-13140_P101-2000" }, { 13218, "ibm-13218" }, { 13218, "ibm-13218_P100-1996" }, { 1201, "ibm-13488" }, { 1201, "ibm-13489" }, { 1200, "ibm-13490" }, { 1200, "ibm-13491" }, { 65001, "ibm-13496" }, { 65001, "ibm-13497" }, { 1350, "ibm-1350" }, { 1350, "ibm-1350_P110-1997" }, { 1351, "ibm-1351" }, { 1351, "ibm-1351_P110-1997" }, { 1362, "ibm-1362" }, { 1362, "ibm-1362_P110-1999" }, { 1363, "ibm-1363" }, { 1363, "ibm-1363_P110-1997" }, { 1363, "ibm-1363_P11B-1998" }, { 1364, "ibm-1364" }, { 1364, "ibm-1364_P110-2007" }, { 13676, "ibm-13676" }, { 13676, "ibm-13676_P102-2001" }, { 1370, "ibm-1370" }, { 1370, "ibm-1370_P100-1999" }, { 1371, "ibm-1371" }, { 1371, "ibm-1371_P100-1999" }, { 1373, "ibm-1373" }, { 1373, "ibm-1373_P100-2002" }, { 1375, "ibm-1375" }, { 1375, "ibm-1375_P100-2007" }, { 1380, "ibm-1380" }, { 1380, "ibm-1380_P100-1995" }, { 1381, "ibm-1381" }, { 1381, "ibm-1381_P110-1999" }, { 1382, "ibm-1382" }, { 1382, "ibm-1382_P100-1995" }, { 1383, "ibm-1383" }, { 1383, "ibm-1383_P110-1999" }, { 1385, "ibm-1385" }, { 1386, "ibm-1386" }, { 1386, "ibm-1386_P100-2001" }, { 9580, "ibm-1388" }, { 9580, "ibm-1388_P103-2001" }, { 1390, "ibm-1390" }, { 1390, "ibm-1390_P110-2003" }, { 54936, "ibm-1392" }, { 1399, "ibm-1399" }, { 1399, "ibm-1399_P110-2003" }, { 20780, "ibm-16684" }, { 20780, "ibm-16684_P110-2003" }, { 16804, "ibm-16804" }, { 16804, "ibm-16804_X110-1999" }, { 17221, "ibm-17221" }, { 17221, "ibm-17221_P100-2001" }, { 17248, "ibm-17248" }, { 17248, "ibm-17248_X110-1999" }, { 1201, "ibm-17584" }, { 1201, "ibm-17585" }, { 1200, "ibm-17586" }, { 1200, "ibm-17587" }, { 65001, "ibm-17592" }, { 65001, "ibm-17593" }, { 20780, "ibm-20780" }, { 21344, "ibm-21344" }, { 21344, "ibm-21344_P101-2000" }, { 21427, "ibm-21427" }, { 21427, "ibm-21427_P100-1999" }, { 1201, "ibm-21680" }, { 1201, "ibm-21681" }, { 1200, "ibm-21682" }, { 1200, "ibm-21683" }, { 25546, "ibm-25546" }, { 256, "ibm-256" }, { 256, "ibm-256_P100-1995" }, { 1201, "ibm-25776" }, { 1201, "ibm-25777" }, { 1200, "ibm-25778" }, { 1200, "ibm-25779" }, { 259, "ibm-259" }, { 259, "ibm-259_P100-1995" }, { 273, "ibm-273" }, { 273, "ibm-273_P100-1995" }, { 274, "ibm-274" }, { 274, "ibm-274_P100-2000" }, { 275, "ibm-275" }, { 275, "ibm-275_P100-1995" }, { 277, "ibm-277" }, { 277, "ibm-277_P100-1995" }, { 278, "ibm-278" }, { 278, "ibm-278_P100-1995" }, { 280, "ibm-280" }, { 280, "ibm-280_P100-1995" }, { 284, "ibm-284" }, { 284, "ibm-284_P100-1995" }, { 285, "ibm-285" }, { 285, "ibm-285_P100-1995" }, { 286, "ibm-286" }, { 286, "ibm-286_P100-2003" }, { 290, "ibm-290" }, { 290, "ibm-290_P100-1995" }, { 293, "ibm-293" }, { 293, "ibm-293_P100-1995" }, { 297, "ibm-297" }, { 297, "ibm-297_P100-1995" }, { 1201, "ibm-29872" }, { 1201, "ibm-29873" }, { 1200, "ibm-29874" }, { 1200, "ibm-29875" }, { 300, "ibm-300" }, { 300, "ibm-300_P120-2006" }, { 301, "ibm-301" }, { 301, "ibm-301_P110-1997" }, { 33058, "ibm-33058" }, { 33058, "ibm-33058_P100-2000" }, { 5050, "ibm-33722" }, { 5050, "ibm-33722_P120-1999" }, { 51932, "ibm-33722_P12A_P12A-2004_U2" }, { 20127, "ibm-367" }, { 37, "ibm-37" }, { 37, "ibm-37_P100-1995" }, { 420, "ibm-420" }, { 420, "ibm-420_X120-1999" }, { 424, "ibm-424" }, { 424, "ibm-424_P100-1995" }, { 425, "ibm-425" }, { 425, "ibm-425_P101-2000" }, { 437, "ibm-437" }, { 437, "ibm-437_P100-1995" }, { 4517, "ibm-4517" }, { 4517, "ibm-4517_P100-2005" }, { 4899, "ibm-4899" }, { 4899, "ibm-4899_P100-1998" }, { 57002, "ibm-4902" }, { 4909, "ibm-4909" }, { 4909, "ibm-4909_P100-1999" }, { 4930, "ibm-4930" }, { 4930, "ibm-4930_P110-1999" }, { 4933, "ibm-4933" }, { 4933, "ibm-4933_P100-2002" }, { 4948, "ibm-4948" }, { 4948, "ibm-4948_P100-1995" }, { 4951, "ibm-4951" }, { 4951, "ibm-4951_P100-1995" }, { 4952, "ibm-4952" }, { 4952, "ibm-4952_P100-1995" }, { 4960, "ibm-4960" }, { 4960, "ibm-4960_P100-1995" }, { 4971, "ibm-4971" }, { 4971, "ibm-4971_P100-1999" }, { 500, "ibm-500" }, { 500, "ibm-500_P100-1995" }, { 28598, "ibm-5012" }, { 28598, "ibm-5012_P100-1999" }, { 5026, "ibm-5026" }, { 5035, "ibm-5035" }, { 5039, "ibm-5039" }, { 5039, "ibm-5039_P11A-1998" }, { 5048, "ibm-5048" }, { 5048, "ibm-5048_P100-1995" }, { 5049, "ibm-5049" }, { 5049, "ibm-5049_P100-1995" }, { 5050, "ibm-5050" }, { 5054, "ibm-5054" }, { 5067, "ibm-5067" }, { 5067, "ibm-5067_P100-1995" }, { 5104, "ibm-5104" }, { 5104, "ibm-5104_X110-1999" }, { 5123, "ibm-5123" }, { 5123, "ibm-5123_P100-1999" }, { 65001, "ibm-5304" }, { 65001, "ibm-5305" }, { 1250, "ibm-5346" }, { 1250, "ibm-5346_P100-1998" }, { 1251, "ibm-5347" }, { 1251, "ibm-5347_P100-1998" }, { 1252, "ibm-5348" }, { 1252, "ibm-5348_P100-1997" }, { 1253, "ibm-5349" }, { 1253, "ibm-5349_P100-1998" }, { 1254, "ibm-5350" }, { 1254, "ibm-5350_P100-1998" }, { 5351, "ibm-5351" }, { 5351, "ibm-5351_P100-1998" }, { 5352, "ibm-5352" }, { 5352, "ibm-5352_P100-1998" }, { 5353, "ibm-5353" }, { 5353, "ibm-5353_P100-1998" }, { 1258, "ibm-5354" }, { 1258, "ibm-5354_P100-1998" }, { 5471, "ibm-5471" }, { 5471, "ibm-5471_P100-2006" }, { 5478, "ibm-5478" }, { 5478, "ibm-5478_P100-1995" }, { 1201, "ibm-61955" }, { 1201, "ibm-61956" }, { 65025, "ibm-65025" }, { 720, "ibm-720" }, { 720, "ibm-720_P100-1997" }, { 737, "ibm-737" }, { 737, "ibm-737_P100-1997" }, { 775, "ibm-775" }, { 775, "ibm-775_P100-1996" }, { 803, "ibm-803" }, { 803, "ibm-803_P100-1999" }, { 806, "ibm-806" }, { 806, "ibm-806_P100-1998" }, { 808, "ibm-808" }, { 808, "ibm-808_P100-1999" }, { 813, "ibm-813" }, { 813, "ibm-813_P100-1995" }, { 819, "ibm-819" }, { 833, "ibm-833" }, { 833, "ibm-833_P100-1995" }, { 834, "ibm-834" }, { 834, "ibm-834_P100-1995" }, { 835, "ibm-835" }, { 835, "ibm-835_P100-1995" }, { 836, "ibm-836" }, { 836, "ibm-836_P100-1995" }, { 837, "ibm-837" }, { 837, "ibm-837_P100-1995" }, { 9030, "ibm-838" }, { 9030, "ibm-838_P100-1995" }, { 848, "ibm-848" }, { 8482, "ibm-8482" }, { 8482, "ibm-8482_P100-1999" }, { 848, "ibm-848_P100-1999" }, { 849, "ibm-849" }, { 849, "ibm-849_P100-1999" }, { 850, "ibm-850" }, { 850, "ibm-850_P100-1995" }, { 851, "ibm-851" }, { 851, "ibm-851_P100-1995" }, { 852, "ibm-852" }, { 852, "ibm-852_P100-1995" }, { 855, "ibm-855" }, { 855, "ibm-855_P100-1995" }, { 856, "ibm-856" }, { 856, "ibm-856_P100-1995" }, { 857, "ibm-857" }, { 857, "ibm-857_P100-1995" }, { 858, "ibm-858" }, { 858, "ibm-858_P100-1997" }, { 859, "ibm-859" }, { 859, "ibm-859_P100-1999" }, { 860, "ibm-860" }, { 860, "ibm-860_P100-1995" }, { 861, "ibm-861" }, { 8612, "ibm-8612" }, { 8612, "ibm-8612_P100-1995" }, { 861, "ibm-861_P100-1995" }, { 862, "ibm-862" }, { 862, "ibm-862_P100-1995" }, { 863, "ibm-863" }, { 863, "ibm-863_P100-1995" }, { 864, "ibm-864" }, { 864, "ibm-864_X110-1999" }, { 865, "ibm-865" }, { 865, "ibm-865_P100-1995" }, { 866, "ibm-866" }, { 866, "ibm-866_P100-1995" }, { 867, "ibm-867" }, { 867, "ibm-867_P100-1998" }, { 868, "ibm-868" }, { 868, "ibm-868_P100-1995" }, { 869, "ibm-869" }, { 869, "ibm-869_P100-1995" }, { 870, "ibm-870" }, { 870, "ibm-870_P100-1995" }, { 871, "ibm-871" }, { 871, "ibm-871_P100-1995" }, { 872, "ibm-872" }, { 872, "ibm-872_P100-1999" }, { 9066, "ibm-874" }, { 9066, "ibm-874_P100-1995" }, { 875, "ibm-875" }, { 875, "ibm-875_P100-1995" }, { 20866, "ibm-878" }, { 20866, "ibm-878_P100-1996" }, { 20880, "ibm-880" }, { 20880, "ibm-880_P100-1995" }, { 896, "ibm-896" }, { 896, "ibm-896_P100-1995" }, { 897, "ibm-897" }, { 897, "ibm-897_P100-1995" }, { 28597, "ibm-9005" }, { 28597, "ibm-9005_X110-2007" }, { 901, "ibm-901" }, { 901, "ibm-901_P100-1999" }, { 902, "ibm-902" }, { 9027, "ibm-9027" }, { 9027, "ibm-9027_P100-1999" }, { 902, "ibm-902_P100-1999" }, { 9030, "ibm-9030" }, { 9048, "ibm-9048" }, { 9048, "ibm-9048_P100-1998" }, { 20905, "ibm-905" }, { 9056, "ibm-9056" }, { 9056, "ibm-9056_P100-1995" }, { 20905, "ibm-905_P100-1995" }, { 9061, "ibm-9061" }, { 9061, "ibm-9061_P100-1999" }, { 9066, "ibm-9066" }, { 9067, "ibm-9067" }, { 9067, "ibm-9067_X100-2005" }, { 28592, "ibm-912" }, { 28592, "ibm-912_P100-1995" }, { 28593, "ibm-913" }, { 28593, "ibm-913_P100-2000" }, { 28594, "ibm-914" }, { 9145, "ibm-9145" }, { 9145, "ibm-9145_P110-1997" }, { 28594, "ibm-914_P100-1995" }, { 28595, "ibm-915" }, { 28595, "ibm-915_P100-1995" }, { 916, "ibm-916" }, { 916, "ibm-916_P100-1995" }, { 918, "ibm-918" }, { 918, "ibm-918_P100-1995" }, { 28599, "ibm-920" }, { 28599, "ibm-920_P100-1995" }, { 28603, "ibm-921" }, { 28603, "ibm-921_P100-1995" }, { 922, "ibm-922" }, { 922, "ibm-922_P100-1999" }, { 28605, "ibm-923" }, { 9238, "ibm-9238" }, { 9238, "ibm-9238_X110-1999" }, { 28605, "ibm-923_P100-1998" }, { 924, "ibm-924" }, { 924, "ibm-924_P100-1998" }, { 926, "ibm-926" }, { 926, "ibm-926_P100-2000" }, { 927, "ibm-927" }, { 927, "ibm-927_P100-1995" }, { 928, "ibm-928" }, { 928, "ibm-928_P100-1995" }, { 5026, "ibm-930" }, { 5026, "ibm-930_P120-1999" }, { 5035, "ibm-931" }, { 932, "ibm-932" }, { 933, "ibm-933" }, { 933, "ibm-933_P110-1995" }, { 935, "ibm-935" }, { 935, "ibm-935_P110-1999" }, { 937, "ibm-937" }, { 937, "ibm-937_P110-1999" }, { 5035, "ibm-939" }, { 5035, "ibm-939_P120-1999" }, { 9400, "ibm-9400" }, { 941, "ibm-941" }, { 941, "ibm-941_P13A-2001" }, { 932, "ibm-942" }, { 9424, "ibm-9424" }, { 932, "ibm-942_P12A-1999" }, { 943, "ibm-943" }, { 943, "ibm-943_P130-1999" }, { 932, "ibm-943_P15A-2003" }, { 944, "ibm-944" }, { 1255, "ibm-9447" }, { 1255, "ibm-9447_P100-2002" }, { 1256, "ibm-9448" }, { 1256, "ibm-9448_X100-2005" }, { 1257, "ibm-9449" }, { 1257, "ibm-9449_P100-2002" }, { 944, "ibm-944_P100-1995" }, { 946, "ibm-946" }, { 946, "ibm-946_P100-1995" }, { 947, "ibm-947" }, { 947, "ibm-947_P100-1995" }, { 948, "ibm-948" }, { 948, "ibm-948_P110-1999" }, { 949, "ibm-949" }, { 949, "ibm-949_P110-1999" }, { 950, "ibm-950" }, { 950, "ibm-950_P110-1999" }, { 951, "ibm-951" }, { 951, "ibm-951_P100-1995" }, { 952, "ibm-952" }, { 952, "ibm-952_P110-1997" }, { 953, "ibm-953" }, { 953, "ibm-953_P100-2000" }, { 954, "ibm-954" }, { 954, "ibm-954_P101-2007" }, { 955, "ibm-955" }, { 955, "ibm-955_P110-1997" }, { 1385, "ibm-9577" }, { 1385, "ibm-9577_P100-2001" }, { 9580, "ibm-9580" }, { 964, "ibm-964" }, { 964, "ibm-964_P110-1999" }, { 51949, "ibm-970" }, { 51949, "ibm-970_P110_P110-2006_U2" }, { 971, "ibm-971" }, { 51949, "ibm-eucKR" }, { 1018, "iso-ir-10" }, { 819, "iso-ir-100" }, { 28592, "iso-ir-101" }, { 28593, "iso-ir-109" }, { 28594, "iso-ir-110" }, { 1020, "iso-ir-121" }, { 28597, "iso-ir-126" }, { 28596, "iso-ir-127" }, { 28598, "iso-ir-138" }, { 28595, "iso-ir-144" }, { 28599, "iso-ir-148" }, { 949, "iso-ir-149" }, { 1012, "iso-ir-15" }, { 1023, "iso-ir-17" }, { 1011, "iso-ir-21" }, { 1104, "iso-ir-25" }, { 1013, "iso-ir-4" }, { 5478, "iso-ir-58" }, { 20127, "iso-ir-6" }, { 1016, "iso-ir-60" }, { 1010, "iso-ir-69" }, { 1015, "iso-ir-84" }, { 1014, "iso-ir-85" }, { 28605, "iso8859_15_fdis" }, { 20127, "iso_646.irv:1983" }, { 20866, "koi8" }, { 949, "korean" }, { 819, "l1" }, { 28592, "l2" }, { 28593, "l3" }, { 28594, "l4" }, { 28599, "l5" }, { 28605, "l9" }, { 28605, "latin0" }, { 819, "latin1" }, { 28592, "latin2" }, { 28593, "latin3" }, { 28594, "latin4" }, { 28599, "latin5" }, { 10000, "mac" }, { 10000, "macintosh" }, { 10000, "macos-0_2-10.2" }, { 10029, "macos-29-10.2" }, { 10081, "macos-35-10.2" }, { 10006, "macos-6_2-10.4" }, { 10007, "macos-7_3-10.2" }, { 10000, "macroman" }, { 949, "ms949" }, { 1016, "no" }, { 1051, "r8" }, { 1051, "roman8" }, { 1018, "se" }, { 9066, "tis620.2533" }, { 1013, "uk" }, { 20127, "us" }, { 10000, "windows-10000" }, { 10006, "windows-10006" }, { 10007, "windows-10007" }, { 10029, "windows-10029" }, { 10081, "windows-10081" }, { 1200, "windows-1200" }, { 1201, "windows-1201" }, { 1250, "windows-1250" }, { 1251, "windows-1251" }, { 1252, "windows-1252" }, { 1253, "windows-1253" }, { 1254, "windows-1254" }, { 1255, "windows-1255" }, { 1256, "windows-1256" }, { 1257, "windows-1257" }, { 1258, "windows-1258" }, { 20127, "windows-20127" }, { 20866, "windows-20866" }, { 20880, "windows-20880" }, { 20905, "windows-20905" }, { 21866, "windows-21866" }, { 28592, "windows-28592" }, { 28593, "windows-28593" }, { 28594, "windows-28594" }, { 28595, "windows-28595" }, { 28596, "windows-28596" }, { 28597, "windows-28597" }, { 28598, "windows-28598" }, { 28599, "windows-28599" }, { 28603, "windows-28603" }, { 28605, "windows-28605" }, { 932, "windows-31j" }, { 437, "windows-437" }, { 51932, "windows-51932" }, { 51949, "windows-51949" }, { 54936, "windows-54936" }, { 57002, "windows-57002" }, { 57006, "windows-57003" }, { 57004, "windows-57004" }, { 57005, "windows-57005" }, { 57006, "windows-57006" }, { 57007, "windows-57007" }, { 57008, "windows-57008" }, { 57009, "windows-57009" }, { 57010, "windows-57010" }, { 57011, "windows-57011" }, { 65000, "windows-65000" }, { 65001, "windows-65001" }, { 720, "windows-720" }, { 737, "windows-737" }, { 775, "windows-775" }, { 850, "windows-850" }, { 852, "windows-852" }, { 855, "windows-855" }, { 857, "windows-857" }, { 858, "windows-858" }, { 861, "windows-861" }, { 862, "windows-862" }, { 866, "windows-866" }, { 869, "windows-869" }, { 874, "windows-874" }, { 874, "windows-874-2000" }, { 932, "windows-932" }, { 936, "windows-936" }, { 936, "windows-936-2000" }, { 949, "windows-949" }, { 949, "windows-949-2000" }, { 950, "windows-950" }, { 950, "windows-950-2000" }, { 1006, "x-IBM1006" }, { 1025, "x-IBM1025" }, { 1027, "x-IBM1027" }, { 1041, "x-IBM1041" }, { 1043, "x-IBM1043" }, { 1046, "x-IBM1046" }, { 1046, "x-IBM1046S" }, { 1088, "x-IBM1088" }, { 1097, "x-IBM1097" }, { 1098, "x-IBM1098" }, { 1112, "x-IBM1112" }, { 1114, "x-IBM1114" }, { 1115, "x-IBM1115" }, { 1122, "x-IBM1122" }, { 1123, "x-IBM1123" }, { 1124, "x-IBM1124" }, { 1153, "x-IBM1153" }, { 1351, "x-IBM1351" }, { 1362, "x-IBM1362" }, { 1363, "x-IBM1363" }, { 1363, "x-IBM1363C" }, { 1364, "x-IBM1364" }, { 1370, "x-IBM1370" }, { 1371, "x-IBM1371" }, { 1380, "x-IBM1380" }, { 1381, "x-IBM1381" }, { 1382, "x-IBM1382" }, { 1385, "x-IBM1385" }, { 9580, "x-IBM1388" }, { 1390, "x-IBM1390" }, { 1399, "x-IBM1399" }, { 300, "x-IBM300" }, { 301, "x-IBM301" }, { 5050, "x-IBM33722" }, { 5050, "x-IBM33722A" }, { 5050, "x-IBM33722C" }, { 720, "x-IBM720" }, { 737, "x-IBM737" }, { 808, "x-IBM808" }, { 833, "x-IBM833" }, { 834, "x-IBM834" }, { 835, "x-IBM835" }, { 836, "x-IBM836" }, { 837, "x-IBM837" }, { 856, "x-IBM856" }, { 859, "x-IBM859" }, { 867, "x-IBM867" }, { 9066, "x-IBM874" }, { 875, "x-IBM875" }, { 897, "x-IBM897" }, { 28603, "x-IBM921" }, { 922, "x-IBM922" }, { 927, "x-IBM927" }, { 5026, "x-IBM930" }, { 5026, "x-IBM930A" }, { 933, "x-IBM933" }, { 935, "x-IBM935" }, { 937, "x-IBM937" }, { 5035, "x-IBM939" }, { 5035, "x-IBM939A" }, { 932, "x-IBM942" }, { 932, "x-IBM942C" }, { 943, "x-IBM943" }, { 947, "x-IBM947" }, { 948, "x-IBM948" }, { 949, "x-IBM949" }, { 950, "x-IBM950" }, { 951, "x-IBM951" }, { 954, "x-IBM954" }, { 954, "x-IBM954C" }, { 964, "x-IBM964" }, { 51949, "x-IBM970" }, { 971, "x-IBM971" }, { 57002, "x-ISCII91" }, { 28596, "x-ISO-8859-6S" }, { 932, "x-JISAutoDetect" }, { 1167, "x-KOI8_RU" }, { 949, "x-KSC5601" }, { 932, "x-MS932_0213" }, { 5471, "x-MS950-HKSCS" }, { 10029, "x-MacCentralEurope" }, { 10007, "x-MacCyrillic" }, { 10006, "x-MacGreek" }, { 10081, "x-MacTurkish" }, { 10007, "x-MacUkraine" }, { 1350, "x-eucJP-Open" }, { 57006, "x-iscii-as" }, { 57006, "x-iscii-be" }, { 57002, "x-iscii-de" }, { 57010, "x-iscii-gu" }, { 57008, "x-iscii-ka" }, { 57009, "x-iscii-ma" }, { 57007, "x-iscii-or" }, { 57011, "x-iscii-pa" }, { 57004, "x-iscii-ta" }, { 57005, "x-iscii-te" }, { 10029, "x-mac-ce" }, { 10029, "x-mac-centraleurroman" }, { 10007, "x-mac-cyrillic" }, { 10006, "x-mac-greek" }, { 10081, "x-mac-turkish" }, { 10000, "x-macroman" }, { 932, "x-ms-cp932" }, { 932, "x-sjis" }, { 1201, "x-utf-16be" }, { 1200, "x-utf-16le" }, { 1256, "x-windows-1256S" }, { 5054, "x-windows-50221" }, { 874, "x-windows-874" }, { 950, "x-windows-950" }, { 0, NULL } }; pspp-1.0.1/src/data/casewindow.c0000644000175000017500000002271712642366735013452 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This casewindow implementation in terms of an class interface is undoubtedly a form of over-abstraction. However, it works and the extra abstraction seems to be harmless. */ #include #include "data/casewindow.h" #include #include "data/case-tmpfile.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/deque.h" #include "libpspp/taint.h" #include "gl/xalloc.h" /* A queue of cases. */ struct casewindow { /* Common data. */ struct caseproto *proto; /* Prototype of cases in window. */ casenumber max_in_core_cases; /* Max cases before dumping to disk. */ struct taint *taint; /* Taint status. */ /* Implementation data. */ const struct casewindow_class *class; void *aux; }; /* Implementation of a casewindow. */ struct casewindow_class { void *(*create) (struct taint *, const struct caseproto *); void (*destroy) (void *aux); void (*push_head) (void *aux, struct ccase *); void (*pop_tail) (void *aux, casenumber cnt); struct ccase *(*get_case) (void *aux, casenumber ofs); casenumber (*get_case_cnt) (const void *aux); }; /* Classes. */ static const struct casewindow_class casewindow_memory_class; static const struct casewindow_class casewindow_file_class; /* Creates and returns a new casewindow using the given parameters. */ static struct casewindow * do_casewindow_create (struct taint *taint, const struct caseproto *proto, casenumber max_in_core_cases) { struct casewindow *cw = xmalloc (sizeof *cw); cw->class = (max_in_core_cases ? &casewindow_memory_class : &casewindow_file_class); cw->aux = cw->class->create (taint, proto); cw->proto = caseproto_ref (proto); cw->max_in_core_cases = max_in_core_cases; cw->taint = taint; return cw; } /* Creates and returns a new casewindow for cases that take the form specified by PROTO. If the casewindow holds more than MAX_IN_CORE_CASES cases at any time, its cases will be dumped to disk; otherwise, its cases will be held in memory. The caller retains its reference to PROTO. */ struct casewindow * casewindow_create (const struct caseproto *proto, casenumber max_in_core_cases) { return do_casewindow_create (taint_create (), proto, max_in_core_cases); } /* Destroys casewindow CW. Returns true if CW was tainted, which is caused by an I/O error or by taint propagation to the casewindow. */ bool casewindow_destroy (struct casewindow *cw) { bool ok = true; if (cw != NULL) { cw->class->destroy (cw->aux); ok = taint_destroy (cw->taint); caseproto_unref (cw->proto); free (cw); } return ok; } /* Swaps the contents of casewindows A and B. */ static void casewindow_swap (struct casewindow *a, struct casewindow *b) { struct casewindow tmp = *a; *a = *b; *b = tmp; } /* Dumps the contents of casewindow OLD to disk. */ static void casewindow_to_disk (struct casewindow *old) { struct casewindow *new; new = do_casewindow_create (taint_clone (old->taint), old->proto, 0); while (casewindow_get_case_cnt (old) > 0 && !casewindow_error (new)) { struct ccase *c = casewindow_get_case (old, 0); if (c == NULL) break; casewindow_pop_tail (old, 1); casewindow_push_head (new, c); } casewindow_swap (old, new); casewindow_destroy (new); } /* Pushes case C at the head of casewindow CW. Case C becomes owned by the casewindow. */ void casewindow_push_head (struct casewindow *cw, struct ccase *c) { if (!casewindow_error (cw)) { cw->class->push_head (cw->aux, c); if (!casewindow_error (cw)) { casenumber case_cnt = cw->class->get_case_cnt (cw->aux); if (case_cnt > cw->max_in_core_cases && cw->class == &casewindow_memory_class) casewindow_to_disk (cw); } } else case_unref (c); } /* Deletes CASE_CNT cases at the tail of casewindow CW. */ void casewindow_pop_tail (struct casewindow *cw, casenumber case_cnt) { if (!casewindow_error (cw)) cw->class->pop_tail (cw->aux, case_cnt); } /* Returns the case that is CASE_IDX cases away from CW's tail into C, or a null pointer on an I/O error or if CW is otherwise tainted. The caller must call case_unref() on the returned case when it is no longer needed. */ struct ccase * casewindow_get_case (const struct casewindow *cw_, casenumber case_idx) { struct casewindow *cw = CONST_CAST (struct casewindow *, cw_); assert (case_idx >= 0 && case_idx < casewindow_get_case_cnt (cw)); if (casewindow_error (cw)) return NULL; return cw->class->get_case (cw->aux, case_idx); } /* Returns the number of cases in casewindow CW. */ casenumber casewindow_get_case_cnt (const struct casewindow *cw) { return cw->class->get_case_cnt (cw->aux); } /* Returns the case prototype for the cases in casewindow CW. The caller must not unref the returned prototype. */ const struct caseproto * casewindow_get_proto (const struct casewindow *cw) { return cw->proto; } /* Returns true if casewindow CW is tainted. A casewindow is tainted by an I/O error or by taint propagation to the casewindow. */ bool casewindow_error (const struct casewindow *cw) { return taint_is_tainted (cw->taint); } /* Marks casewindow CW tainted. */ void casewindow_force_error (struct casewindow *cw) { taint_set_taint (cw->taint); } /* Returns casewindow CW's taint object. */ const struct taint * casewindow_get_taint (const struct casewindow *cw) { return cw->taint; } /* In-memory casewindow data. */ struct casewindow_memory { struct deque deque; struct ccase **cases; }; static void * casewindow_memory_create (struct taint *taint UNUSED, const struct caseproto *proto UNUSED) { struct casewindow_memory *cwm = xmalloc (sizeof *cwm); cwm->cases = deque_init (&cwm->deque, 4, sizeof *cwm->cases); return cwm; } static void casewindow_memory_destroy (void *cwm_) { struct casewindow_memory *cwm = cwm_; while (!deque_is_empty (&cwm->deque)) case_unref (cwm->cases[deque_pop_front (&cwm->deque)]); free (cwm->cases); free (cwm); } static void casewindow_memory_push_head (void *cwm_, struct ccase *c) { struct casewindow_memory *cwm = cwm_; if (deque_is_full (&cwm->deque)) cwm->cases = deque_expand (&cwm->deque, cwm->cases, sizeof *cwm->cases); cwm->cases[deque_push_back (&cwm->deque)] = c; } static void casewindow_memory_pop_tail (void *cwm_, casenumber case_cnt) { struct casewindow_memory *cwm = cwm_; assert (deque_count (&cwm->deque) >= case_cnt); while (case_cnt-- > 0) case_unref (cwm->cases[deque_pop_front (&cwm->deque)]); } static struct ccase * casewindow_memory_get_case (void *cwm_, casenumber ofs) { struct casewindow_memory *cwm = cwm_; return case_ref (cwm->cases[deque_front (&cwm->deque, ofs)]); } static casenumber casewindow_memory_get_case_cnt (const void *cwm_) { const struct casewindow_memory *cwm = cwm_; return deque_count (&cwm->deque); } static const struct casewindow_class casewindow_memory_class = { casewindow_memory_create, casewindow_memory_destroy, casewindow_memory_push_head, casewindow_memory_pop_tail, casewindow_memory_get_case, casewindow_memory_get_case_cnt, }; /* On-disk casewindow data. */ struct casewindow_file { struct case_tmpfile *file; casenumber head, tail; }; static void * casewindow_file_create (struct taint *taint, const struct caseproto *proto) { struct casewindow_file *cwf = xmalloc (sizeof *cwf); cwf->file = case_tmpfile_create (proto); cwf->head = cwf->tail = 0; taint_propagate (case_tmpfile_get_taint (cwf->file), taint); return cwf; } static void casewindow_file_destroy (void *cwf_) { struct casewindow_file *cwf = cwf_; case_tmpfile_destroy (cwf->file); free (cwf); } static void casewindow_file_push_head (void *cwf_, struct ccase *c) { struct casewindow_file *cwf = cwf_; if (case_tmpfile_put_case (cwf->file, cwf->head, c)) cwf->head++; } static void casewindow_file_pop_tail (void *cwf_, casenumber cnt) { struct casewindow_file *cwf = cwf_; assert (cnt <= cwf->head - cwf->tail); cwf->tail += cnt; if (cwf->head == cwf->tail) cwf->head = cwf->tail = 0; } static struct ccase * casewindow_file_get_case (void *cwf_, casenumber ofs) { struct casewindow_file *cwf = cwf_; return case_tmpfile_get_case (cwf->file, cwf->tail + ofs); } static casenumber casewindow_file_get_case_cnt (const void *cwf_) { const struct casewindow_file *cwf = cwf_; return cwf->head - cwf->tail; } static const struct casewindow_class casewindow_file_class = { casewindow_file_create, casewindow_file_destroy, casewindow_file_push_head, casewindow_file_pop_tail, casewindow_file_get_case, casewindow_file_get_case_cnt, }; pspp-1.0.1/src/data/dictionary.c0000644000175000017500000013670113150617234013437 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/dictionary.h" #include #include #include #include #include "data/attributes.h" #include "data/case.h" #include "data/identifier.h" #include "data/mrset.h" #include "data/settings.h" #include "data/value-labels.h" #include "data/vardict.h" #include "data/variable.h" #include "data/vector.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/hash-functions.h" #include "libpspp/hmap.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "libpspp/string-array.h" #include "gl/intprops.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gl/xmemdup0.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* A dictionary. */ struct dictionary { struct vardict_info *var; /* Variables. */ size_t var_cnt, var_cap; /* Number of variables, capacity. */ struct caseproto *proto; /* Prototype for dictionary cases (updated lazily). */ struct hmap name_map; /* Variable index by name. */ int next_value_idx; /* Index of next `union value' to allocate. */ const struct variable **split; /* SPLIT FILE vars. */ size_t split_cnt; /* SPLIT FILE count. */ struct variable *weight; /* WEIGHT variable. */ struct variable *filter; /* FILTER variable. */ casenumber case_limit; /* Current case limit (N command). */ char *label; /* File label. */ struct string_array documents; /* Documents. */ struct vector **vector; /* Vectors of variables. */ size_t vector_cnt; /* Number of vectors. */ struct attrset attributes; /* Custom attributes. */ struct mrset **mrsets; /* Multiple response sets. */ size_t n_mrsets; /* Number of multiple response sets. */ char *encoding; /* Character encoding of string data */ const struct dict_callbacks *callbacks; /* Callbacks on dictionary modification */ void *cb_data ; /* Data passed to callbacks */ void (*changed) (struct dictionary *, void *); /* Generic change callback */ void *changed_data; }; static void dict_unset_split_var (struct dictionary *, struct variable *); static void dict_unset_mrset_var (struct dictionary *, struct variable *); /* Returns the encoding for data in dictionary D. The return value is a nonnull string that contains an IANA character set name. */ const char * dict_get_encoding (const struct dictionary *d) { return d->encoding ; } /* Returns true if UTF-8 string ID is an acceptable identifier in DICT's encoding, false otherwise. If ISSUE_ERROR is true, issues an explanatory error message on failure. */ bool dict_id_is_valid (const struct dictionary *dict, const char *id, bool issue_error) { return id_is_valid (id, dict->encoding, issue_error); } void dict_set_change_callback (struct dictionary *d, void (*changed) (struct dictionary *, void*), void *data) { d->changed = changed; d->changed_data = data; } /* Discards dictionary D's caseproto. (It will be regenerated lazily, on demand.) */ static void invalidate_proto (struct dictionary *d) { caseproto_unref (d->proto); d->proto = NULL; } /* Print a representation of dictionary D to stdout, for debugging purposes. */ void dict_dump (const struct dictionary *d) { int i; for (i = 0 ; i < d->var_cnt ; ++i ) { const struct variable *v = d->var[i].var; printf ("Name: %s;\tdict_idx: %zu; case_idx: %zu\n", var_get_name (v), var_get_dict_index (v), var_get_case_index (v)); } } /* Associate CALLBACKS with DICT. Callbacks will be invoked whenever the dictionary or any of the variables it contains are modified. Each callback will get passed CALLBACK_DATA. Any callback may be NULL, in which case it'll be ignored. */ void dict_set_callbacks (struct dictionary *dict, const struct dict_callbacks *callbacks, void *callback_data) { dict->callbacks = callbacks; dict->cb_data = callback_data; } /* Shallow copy the callbacks from SRC to DEST */ void dict_copy_callbacks (struct dictionary *dest, const struct dictionary *src) { dest->callbacks = src->callbacks; dest->cb_data = src->cb_data; } /* Creates and returns a new dictionary with the specified ENCODING. */ struct dictionary * dict_create (const char *encoding) { struct dictionary *d = xzalloc (sizeof *d); d->encoding = xstrdup (encoding); hmap_init (&d->name_map); attrset_init (&d->attributes); return d; } /* Creates and returns a (deep) copy of an existing dictionary. The new dictionary's case indexes are copied from the old dictionary. If the new dictionary won't be used to access cases produced with the old dictionary, then the new dictionary's case indexes should be compacted with dict_compact_values to save space. Callbacks are not cloned. */ struct dictionary * dict_clone (const struct dictionary *s) { struct dictionary *d; size_t i; d = dict_create (s->encoding); for (i = 0; i < s->var_cnt; i++) { struct variable *sv = s->var[i].var; struct variable *dv = dict_clone_var_assert (d, sv); size_t i; for (i = 0; i < var_get_short_name_cnt (sv); i++) var_set_short_name (dv, i, var_get_short_name (sv, i)); var_get_vardict (dv)->case_index = var_get_vardict (sv)->case_index; } d->next_value_idx = s->next_value_idx; d->split_cnt = s->split_cnt; if (d->split_cnt > 0) { d->split = xnmalloc (d->split_cnt, sizeof *d->split); for (i = 0; i < d->split_cnt; i++) d->split[i] = dict_lookup_var_assert (d, var_get_name (s->split[i])); } if (s->weight != NULL) dict_set_weight (d, dict_lookup_var_assert (d, var_get_name (s->weight))); if (s->filter != NULL) dict_set_filter (d, dict_lookup_var_assert (d, var_get_name (s->filter))); d->case_limit = s->case_limit; dict_set_label (d, dict_get_label (s)); dict_set_documents (d, dict_get_documents (s)); d->vector_cnt = s->vector_cnt; d->vector = xnmalloc (d->vector_cnt, sizeof *d->vector); for (i = 0; i < s->vector_cnt; i++) d->vector[i] = vector_clone (s->vector[i], s, d); dict_set_attributes (d, dict_get_attributes (s)); for (i = 0; i < s->n_mrsets; i++) { const struct mrset *old = s->mrsets[i]; struct mrset *new; size_t j; /* Clone old mrset, then replace vars from D by vars from S. */ new = mrset_clone (old); for (j = 0; j < new->n_vars; j++) new->vars[j] = dict_lookup_var_assert (d, var_get_name (new->vars[j])); dict_add_mrset (d, new); } return d; } /* Clears the contents from a dictionary without destroying the dictionary itself. */ void dict_clear (struct dictionary *d) { /* FIXME? Should we really clear case_limit, label, documents? Others are necessarily cleared by deleting all the variables.*/ while (d->var_cnt > 0 ) { dict_delete_var (d, d->var[d->var_cnt - 1].var); } free (d->var); d->var = NULL; d->var_cnt = d->var_cap = 0; invalidate_proto (d); hmap_clear (&d->name_map); d->next_value_idx = 0; dict_set_split_vars (d, NULL, 0); dict_set_weight (d, NULL); dict_set_filter (d, NULL); d->case_limit = 0; free (d->label); d->label = NULL; string_array_clear (&d->documents); dict_clear_vectors (d); attrset_clear (&d->attributes); } /* Clears a dictionary and destroys it. */ void dict_destroy (struct dictionary *d) { if (d != NULL) { /* In general, we don't want callbacks occurring, if the dictionary is being destroyed */ d->callbacks = NULL ; dict_clear (d); string_array_destroy (&d->documents); hmap_destroy (&d->name_map); attrset_destroy (&d->attributes); dict_clear_mrsets (d); free (d->encoding); free (d); } } /* Returns the number of variables in D. */ size_t dict_get_var_cnt (const struct dictionary *d) { return d->var_cnt; } /* Returns the variable in D with dictionary index IDX, which must be between 0 and the count returned by dict_get_var_cnt(), exclusive. */ struct variable * dict_get_var (const struct dictionary *d, size_t idx) { assert (idx < d->var_cnt); return d->var[idx].var; } /* Sets *VARS to an array of pointers to variables in D and *CNT to the number of variables in *D. All variables are returned except for those, if any, in the classes indicated by EXCLUDE. (There is no point in putting DC_SYSTEM in EXCLUDE as dictionaries never include system variables.) */ void dict_get_vars (const struct dictionary *d, const struct variable ***vars, size_t *cnt, enum dict_class exclude) { dict_get_vars_mutable (d, (struct variable ***) vars, cnt, exclude); } /* Sets *VARS to an array of pointers to variables in D and *CNT to the number of variables in *D. All variables are returned except for those, if any, in the classes indicated by EXCLUDE. (There is no point in putting DC_SYSTEM in EXCLUDE as dictionaries never include system variables.) */ void dict_get_vars_mutable (const struct dictionary *d, struct variable ***vars, size_t *cnt, enum dict_class exclude) { size_t count; size_t i; assert (exclude == (exclude & DC_ALL)); count = 0; for (i = 0; i < d->var_cnt; i++) { enum dict_class class = var_get_dict_class (d->var[i].var); if (!(class & exclude)) count++; } *vars = xnmalloc (count, sizeof **vars); *cnt = 0; for (i = 0; i < d->var_cnt; i++) { enum dict_class class = var_get_dict_class (d->var[i].var); if (!(class & exclude)) (*vars)[(*cnt)++] = d->var[i].var; } assert (*cnt == count); } static struct variable * add_var_with_case_index (struct dictionary *d, struct variable *v, int case_index) { struct vardict_info *vardict; assert (case_index >= d->next_value_idx); /* Update dictionary. */ if (d->var_cnt >= d->var_cap) { size_t i; d->var = x2nrealloc (d->var, &d->var_cap, sizeof *d->var); hmap_clear (&d->name_map); for (i = 0; i < d->var_cnt; i++) { var_set_vardict (d->var[i].var, &d->var[i]); hmap_insert_fast (&d->name_map, &d->var[i].name_node, d->var[i].name_node.hash); } } vardict = &d->var[d->var_cnt++]; vardict->dict = d; vardict->var = v; hmap_insert (&d->name_map, &vardict->name_node, utf8_hash_case_string (var_get_name (v), 0)); vardict->case_index = case_index; var_set_vardict (v, vardict); if ( d->changed ) d->changed (d, d->changed_data); if ( d->callbacks && d->callbacks->var_added ) d->callbacks->var_added (d, var_get_dict_index (v), d->cb_data); invalidate_proto (d); d->next_value_idx = case_index + 1; return v; } static struct variable * add_var (struct dictionary *d, struct variable *v) { return add_var_with_case_index (d, v, d->next_value_idx); } /* Creates and returns a new variable in D with the given NAME and WIDTH. Returns a null pointer if the given NAME would duplicate that of an existing variable in the dictionary. */ struct variable * dict_create_var (struct dictionary *d, const char *name, int width) { return (dict_lookup_var (d, name) == NULL ? dict_create_var_assert (d, name, width) : NULL); } /* Creates and returns a new variable in D with the given NAME and WIDTH. Assert-fails if the given NAME would duplicate that of an existing variable in the dictionary. */ struct variable * dict_create_var_assert (struct dictionary *d, const char *name, int width) { assert (dict_lookup_var (d, name) == NULL); return add_var (d, var_create (name, width)); } /* Creates and returns a new variable in D, as a copy of existing variable OLD_VAR, which need not be in D or in any dictionary. Returns a null pointer if OLD_VAR's name would duplicate that of an existing variable in the dictionary. */ struct variable * dict_clone_var (struct dictionary *d, const struct variable *old_var) { return dict_clone_var_as (d, old_var, var_get_name (old_var)); } /* Creates and returns a new variable in D, as a copy of existing variable OLD_VAR, which need not be in D or in any dictionary. Assert-fails if OLD_VAR's name would duplicate that of an existing variable in the dictionary. */ struct variable * dict_clone_var_assert (struct dictionary *d, const struct variable *old_var) { return dict_clone_var_as_assert (d, old_var, var_get_name (old_var)); } /* Creates and returns a new variable in D with name NAME, as a copy of existing variable OLD_VAR, which need not be in D or in any dictionary. Returns a null pointer if the given NAME would duplicate that of an existing variable in the dictionary. */ struct variable * dict_clone_var_as (struct dictionary *d, const struct variable *old_var, const char *name) { return (dict_lookup_var (d, name) == NULL ? dict_clone_var_as_assert (d, old_var, name) : NULL); } /* Creates and returns a new variable in D with name NAME, as a copy of existing variable OLD_VAR, which need not be in D or in any dictionary. Assert-fails if the given NAME would duplicate that of an existing variable in the dictionary. */ struct variable * dict_clone_var_as_assert (struct dictionary *d, const struct variable *old_var, const char *name) { struct variable *new_var = var_clone (old_var); assert (dict_lookup_var (d, name) == NULL); var_set_name (new_var, name); return add_var (d, new_var); } struct variable * dict_clone_var_in_place_assert (struct dictionary *d, const struct variable *old_var) { assert (dict_lookup_var (d, var_get_name (old_var)) == NULL); return add_var_with_case_index (d, var_clone (old_var), var_get_case_index (old_var)); } /* Returns the variable named NAME in D, or a null pointer if no variable has that name. */ struct variable * dict_lookup_var (const struct dictionary *d, const char *name) { struct vardict_info *vardict; HMAP_FOR_EACH_WITH_HASH (vardict, struct vardict_info, name_node, utf8_hash_case_string (name, 0), &d->name_map) { struct variable *var = vardict->var; if (!utf8_strcasecmp (var_get_name (var), name)) return var; } return NULL; } /* Returns the variable named NAME in D. Assert-fails if no variable has that name. */ struct variable * dict_lookup_var_assert (const struct dictionary *d, const char *name) { struct variable *v = dict_lookup_var (d, name); assert (v != NULL); return v; } /* Returns true if variable V is in dictionary D, false otherwise. */ bool dict_contains_var (const struct dictionary *d, const struct variable *v) { return (var_has_vardict (v) && vardict_get_dictionary (var_get_vardict (v)) == d); } /* Compares two double pointers to variables, which should point to elements of a struct dictionary's `var' member array. */ static int compare_var_ptrs (const void *a_, const void *b_, const void *aux UNUSED) { struct variable *const *a = a_; struct variable *const *b = b_; return *a < *b ? -1 : *a > *b; } static void unindex_var (struct dictionary *d, struct vardict_info *vardict) { hmap_delete (&d->name_map, &vardict->name_node); } /* This function assumes that vardict->name_node.hash is valid, that is, that its name has not changed since it was hashed (rename_var() updates this hash along with the name itself). */ static void reindex_var (struct dictionary *d, struct vardict_info *vardict) { struct variable *old = (d->callbacks && d->callbacks->var_changed ? var_clone (vardict->var) : NULL); struct variable *var = vardict->var; var_set_vardict (var, vardict); hmap_insert_fast (&d->name_map, &vardict->name_node, vardict->name_node.hash); if ( d->changed ) d->changed (d, d->changed_data); if (old) { d->callbacks->var_changed (d, var_get_dict_index (var), VAR_TRAIT_POSITION, old, d->cb_data); var_destroy (old); } } /* Sets the case_index in V's vardict to CASE_INDEX. */ static void set_var_case_index (struct variable *v, int case_index) { var_get_vardict (v)->case_index = case_index; } /* Removes the dictionary variables with indexes from FROM to TO (exclusive) from name_map. */ static void unindex_vars (struct dictionary *d, size_t from, size_t to) { size_t i; for (i = from; i < to; i++) unindex_var (d, &d->var[i]); } /* Re-sets the dict_index in the dictionary variables with indexes from FROM to TO (exclusive). */ static void reindex_vars (struct dictionary *d, size_t from, size_t to) { size_t i; for (i = from; i < to; i++) reindex_var (d, &d->var[i]); } /* Deletes variable V from dictionary D and frees V. This is a very bad idea if there might be any pointers to V from outside D. In general, no variable in the active dataset's dictionary should be deleted when any transformations are active on the dictionary's dataset, because those transformations might reference the deleted variable. The safest time to delete a variable is just after a procedure has been executed, as done by DELETE VARIABLES. Pointers to V within D are not a problem, because dict_delete_var() knows to remove V from split variables, weights, filters, etc. */ void dict_delete_var (struct dictionary *d, struct variable *v) { int dict_index = var_get_dict_index (v); const int case_index = var_get_case_index (v); assert (dict_contains_var (d, v)); dict_unset_split_var (d, v); dict_unset_mrset_var (d, v); if (d->weight == v) dict_set_weight (d, NULL); if (d->filter == v) dict_set_filter (d, NULL); dict_clear_vectors (d); /* Remove V from var array. */ unindex_vars (d, dict_index, d->var_cnt); remove_element (d->var, d->var_cnt, sizeof *d->var, dict_index); d->var_cnt--; /* Update dict_index for each affected variable. */ reindex_vars (d, dict_index, d->var_cnt); /* Free memory. */ var_clear_vardict (v); if ( d->changed ) d->changed (d, d->changed_data); invalidate_proto (d); if (d->callbacks && d->callbacks->var_deleted ) d->callbacks->var_deleted (d, v, dict_index, case_index, d->cb_data); var_destroy (v); } /* Deletes the COUNT variables listed in VARS from D. This is unsafe; see the comment on dict_delete_var() for details. */ void dict_delete_vars (struct dictionary *d, struct variable *const *vars, size_t count) { /* FIXME: this can be done in O(count) time, but this algorithm is O(count**2). */ assert (count == 0 || vars != NULL); while (count-- > 0) dict_delete_var (d, *vars++); } /* Deletes the COUNT variables in D starting at index IDX. This is unsafe; see the comment on dict_delete_var() for details. */ void dict_delete_consecutive_vars (struct dictionary *d, size_t idx, size_t count) { /* FIXME: this can be done in O(count) time, but this algorithm is O(count**2). */ assert (idx + count <= d->var_cnt); while (count-- > 0) dict_delete_var (d, d->var[idx].var); } /* Deletes scratch variables from dictionary D. */ void dict_delete_scratch_vars (struct dictionary *d) { int i; /* FIXME: this can be done in O(count) time, but this algorithm is O(count**2). */ for (i = 0; i < d->var_cnt; ) if (var_get_dict_class (d->var[i].var) == DC_SCRATCH) dict_delete_var (d, d->var[i].var); else i++; } /* Moves V to 0-based position IDX in D. Other variables in D, if any, retain their relative positions. Runs in time linear in the distance moved. */ void dict_reorder_var (struct dictionary *d, struct variable *v, size_t new_index) { size_t old_index = var_get_dict_index (v); assert (new_index < d->var_cnt); unindex_vars (d, MIN (old_index, new_index), MAX (old_index, new_index) + 1); move_element (d->var, d->var_cnt, sizeof *d->var, old_index, new_index); reindex_vars (d, MIN (old_index, new_index), MAX (old_index, new_index) + 1); } /* Reorders the variables in D, placing the COUNT variables listed in ORDER in that order at the beginning of D. The other variables in D, if any, retain their relative positions. */ void dict_reorder_vars (struct dictionary *d, struct variable *const *order, size_t count) { struct vardict_info *new_var; size_t i; assert (count == 0 || order != NULL); assert (count <= d->var_cnt); new_var = xnmalloc (d->var_cap, sizeof *new_var); /* Add variables in ORDER to new_var. */ for (i = 0; i < count; i++) { struct vardict_info *old_var; assert (dict_contains_var (d, order[i])); old_var = var_get_vardict (order[i]); new_var[i] = *old_var; old_var->dict = NULL; } /* Add remaining variables to new_var. */ for (i = 0; i < d->var_cnt; i++) if (d->var[i].dict != NULL) new_var[count++] = d->var[i]; assert (count == d->var_cnt); /* Replace old vardicts by new ones. */ free (d->var); d->var = new_var; hmap_clear (&d->name_map); reindex_vars (d, 0, d->var_cnt); } /* Changes the name of variable V that is currently in a dictionary to NEW_NAME. */ static void rename_var (struct variable *v, const char *new_name) { struct vardict_info *vardict = var_get_vardict (v); var_clear_vardict (v); var_set_name (v, new_name); vardict->name_node.hash = utf8_hash_case_string (new_name, 0); var_set_vardict (v, vardict); } /* Tries to changes the name of V in D to name NEW_NAME. Returns true if successful, false if a variable (other than V) with the given name already exists in D. */ bool dict_try_rename_var (struct dictionary *d, struct variable *v, const char *new_name) { struct variable *conflict = dict_lookup_var (d, new_name); if (conflict && v != conflict) return false; struct variable *old = var_clone (v); unindex_var (d, var_get_vardict (v)); rename_var (v, new_name); reindex_var (d, var_get_vardict (v)); if (settings_get_algorithm () == ENHANCED) var_clear_short_names (v); if ( d->changed ) d->changed (d, d->changed_data); if ( d->callbacks && d->callbacks->var_changed ) d->callbacks->var_changed (d, var_get_dict_index (v), VAR_TRAIT_NAME, old, d->cb_data); var_destroy (old); return true; } /* Changes the name of V in D to name NEW_NAME. Assert-fails if a variable named NEW_NAME is already in D, except that NEW_NAME may be the same as V's existing name. */ void dict_rename_var (struct dictionary *d, struct variable *v, const char *new_name) { bool ok UNUSED = dict_try_rename_var (d, v, new_name); assert (ok); } /* Renames COUNT variables specified in VARS to the names given in NEW_NAMES within dictionary D. If the renaming would result in a duplicate variable name, returns false and stores a name that would be duplicated into *ERR_NAME (if ERR_NAME is non-null). Otherwise, the renaming is successful, and true is returned. */ bool dict_rename_vars (struct dictionary *d, struct variable **vars, char **new_names, size_t count, char **err_name) { struct pool *pool; char **old_names; size_t i; assert (count == 0 || vars != NULL); assert (count == 0 || new_names != NULL); /* Save the names of the variables to be renamed. */ pool = pool_create (); old_names = pool_nalloc (pool, count, sizeof *old_names); for (i = 0; i < count; i++) old_names[i] = pool_strdup (pool, var_get_name (vars[i])); /* Remove the variables to be renamed from the name hash, and rename them. */ for (i = 0; i < count; i++) { unindex_var (d, var_get_vardict (vars[i])); rename_var (vars[i], new_names[i]); } /* Add the renamed variables back into the name hash, checking for conflicts. */ for (i = 0; i < count; i++) { if (dict_lookup_var (d, var_get_name (vars[i])) != NULL) { /* There is a name conflict. Back out all the name changes that have already taken place, and indicate failure. */ size_t fail_idx = i; if (err_name != NULL) *err_name = new_names[i]; for (i = 0; i < fail_idx; i++) unindex_var (d, var_get_vardict (vars[i])); for (i = 0; i < count; i++) { rename_var (vars[i], old_names[i]); reindex_var (d, var_get_vardict (vars[i])); } pool_destroy (pool); return false; } reindex_var (d, var_get_vardict (vars[i])); } /* Clear short names. */ if (settings_get_algorithm () == ENHANCED) for (i = 0; i < count; i++) var_clear_short_names (vars[i]); pool_destroy (pool); return true; } /* Returns true if a variable named NAME may be inserted in DICT; that is, if there is not already a variable with that name in DICT and if NAME is not a reserved word. (The caller's checks have already verified that NAME is otherwise acceptable as a variable name.) */ static bool var_name_is_insertable (const struct dictionary *dict, const char *name) { return (dict_lookup_var (dict, name) == NULL && lex_id_to_token (ss_cstr (name)) == T_ID); } static char * make_hinted_name (const struct dictionary *dict, const char *hint) { size_t hint_len = strlen (hint); bool dropped = false; char *root, *rp; size_t ofs; int mblen; /* The allocation size here is OK: characters that are copied directly fit OK, and characters that are not copied directly are replaced by a single '_' byte. If u8_mbtouc() replaces bad input by 0xfffd, then that will get replaced by '_' too. */ root = rp = xmalloc (hint_len + 1); for (ofs = 0; ofs < hint_len; ofs += mblen) { ucs4_t uc; mblen = u8_mbtouc (&uc, CHAR_CAST (const uint8_t *, hint + ofs), hint_len - ofs); if (rp == root ? lex_uc_is_id1 (uc) && uc != '$' : lex_uc_is_idn (uc)) { if (dropped) { *rp++ = '_'; dropped = false; } rp += u8_uctomb (CHAR_CAST (uint8_t *, rp), uc, 6); } else if (rp != root) dropped = true; } *rp = '\0'; if (root[0] != '\0') { unsigned long int i; if (var_name_is_insertable (dict, root)) return root; for (i = 0; i < ULONG_MAX; i++) { char suffix[INT_BUFSIZE_BOUND (i) + 1]; char *name; suffix[0] = '_'; if (!str_format_26adic (i + 1, true, &suffix[1], sizeof suffix - 1)) NOT_REACHED (); name = utf8_encoding_concat (root, suffix, dict->encoding, 64); if (var_name_is_insertable (dict, name)) { free (root); return name; } free (name); } } free (root); return NULL; } static char * make_numeric_name (const struct dictionary *dict, unsigned long int *num_start) { unsigned long int number; for (number = num_start != NULL ? MAX (*num_start, 1) : 1; number < ULONG_MAX; number++) { char name[3 + INT_STRLEN_BOUND (number) + 1]; sprintf (name, "VAR%03lu", number); if (dict_lookup_var (dict, name) == NULL) { if (num_start != NULL) *num_start = number + 1; return xstrdup (name); } } NOT_REACHED (); } /* Devises and returns a variable name unique within DICT. The variable name is owned by the caller, which must free it with free() when it is no longer needed. HINT, if it is non-null, is used as a suggestion that will be modified for suitability as a variable name and for uniqueness. If HINT is null or entirely unsuitable, a name in the form "VAR%03d" will be generated, where the smallest unused integer value is used. If NUM_START is non-null, then its value is used as the minimum numeric value to check, and it is updated to the next value to be checked. */ char * dict_make_unique_var_name (const struct dictionary *dict, const char *hint, unsigned long int *num_start) { if (hint != NULL) { char *hinted_name = make_hinted_name (dict, hint); if (hinted_name != NULL) return hinted_name; } return make_numeric_name (dict, num_start); } /* Returns the weighting variable in dictionary D, or a null pointer if the dictionary is unweighted. */ struct variable * dict_get_weight (const struct dictionary *d) { assert (d->weight == NULL || dict_contains_var (d, d->weight)); return d->weight; } /* Returns the value of D's weighting variable in case C, except that a negative weight is returned as 0. Returns 1 if the dictionary is unweighted. Will warn about missing, negative, or zero values if *WARN_ON_INVALID is true. The function will set *WARN_ON_INVALID to false if an invalid weight is found. */ double dict_get_case_weight (const struct dictionary *d, const struct ccase *c, bool *warn_on_invalid) { assert (c != NULL); if (d->weight == NULL) return 1.0; else { double w = case_num (c, d->weight); return var_force_valid_weight (d->weight, w, warn_on_invalid); } } /* Sets the weighting variable of D to V, or turning off weighting if V is a null pointer. */ void dict_set_weight (struct dictionary *d, struct variable *v) { assert (v == NULL || dict_contains_var (d, v)); assert (v == NULL || var_is_numeric (v)); d->weight = v; if (d->changed) d->changed (d, d->changed_data); if ( d->callbacks && d->callbacks->weight_changed ) d->callbacks->weight_changed (d, v ? var_get_dict_index (v) : -1, d->cb_data); } /* Returns the filter variable in dictionary D (see cmd_filter()) or a null pointer if the dictionary is unfiltered. */ struct variable * dict_get_filter (const struct dictionary *d) { assert (d->filter == NULL || dict_contains_var (d, d->filter)); return d->filter; } /* Sets V as the filter variable for dictionary D. Passing a null pointer for V turn off filtering. */ void dict_set_filter (struct dictionary *d, struct variable *v) { assert (v == NULL || dict_contains_var (d, v)); assert (v == NULL || var_is_numeric (v)); d->filter = v; if (d->changed) d->changed (d, d->changed_data); if ( d->callbacks && d->callbacks->filter_changed ) d->callbacks->filter_changed (d, v ? var_get_dict_index (v) : -1, d->cb_data); } /* Returns the case limit for dictionary D, or zero if the number of cases is unlimited. */ casenumber dict_get_case_limit (const struct dictionary *d) { return d->case_limit; } /* Sets CASE_LIMIT as the case limit for dictionary D. Use 0 for CASE_LIMIT to indicate no limit. */ void dict_set_case_limit (struct dictionary *d, casenumber case_limit) { d->case_limit = case_limit; } /* Returns the prototype used for cases created by dictionary D. */ const struct caseproto * dict_get_proto (const struct dictionary *d_) { struct dictionary *d = CONST_CAST (struct dictionary *, d_); if (d->proto == NULL) { size_t i; d->proto = caseproto_create (); d->proto = caseproto_reserve (d->proto, d->var_cnt); for (i = 0; i < d->var_cnt; i++) d->proto = caseproto_set_width (d->proto, var_get_case_index (d->var[i].var), var_get_width (d->var[i].var)); } return d->proto; } /* Returns the case index of the next value to be added to D. This value is the number of `union value's that need to be allocated to store a case for dictionary D. */ int dict_get_next_value_idx (const struct dictionary *d) { return d->next_value_idx; } /* Returns the number of bytes needed to store a case for dictionary D. */ size_t dict_get_case_size (const struct dictionary *d) { return sizeof (union value) * dict_get_next_value_idx (d); } /* Reassigns values in dictionary D so that fragmentation is eliminated. */ void dict_compact_values (struct dictionary *d) { size_t i; d->next_value_idx = 0; for (i = 0; i < d->var_cnt; i++) { struct variable *v = d->var[i].var; set_var_case_index (v, d->next_value_idx++); } invalidate_proto (d); } /* Returns the number of values occupied by the variables in dictionary D. All variables are considered if EXCLUDE_CLASSES is 0, or it may contain one or more of (1u << DC_ORDINARY), (1u << DC_SYSTEM), or (1u << DC_SCRATCH) to exclude the corresponding type of variable. The return value may be less than the number of values in one of dictionary D's cases (as returned by dict_get_next_value_idx) even if E is 0, because there may be gaps in D's cases due to deleted variables. */ size_t dict_count_values (const struct dictionary *d, unsigned int exclude_classes) { size_t i; size_t cnt; assert ((exclude_classes & ~((1u << DC_ORDINARY) | (1u << DC_SYSTEM) | (1u << DC_SCRATCH))) == 0); cnt = 0; for (i = 0; i < d->var_cnt; i++) { enum dict_class class = var_get_dict_class (d->var[i].var); if (!(exclude_classes & (1u << class))) cnt++; } return cnt; } /* Returns the case prototype that would result after deleting all variables from D that are not in one of the EXCLUDE_CLASSES and compacting the dictionary with dict_compact(). The caller must unref the returned caseproto when it is no longer needed. */ struct caseproto * dict_get_compacted_proto (const struct dictionary *d, unsigned int exclude_classes) { struct caseproto *proto; size_t i; assert ((exclude_classes & ~((1u << DC_ORDINARY) | (1u << DC_SYSTEM) | (1u << DC_SCRATCH))) == 0); proto = caseproto_create (); for (i = 0; i < d->var_cnt; i++) { struct variable *v = d->var[i].var; if (!(exclude_classes & (1u << var_get_dict_class (v)))) proto = caseproto_add_width (proto, var_get_width (v)); } return proto; } /* Returns the SPLIT FILE vars (see cmd_split_file()). Call dict_get_split_cnt() to determine how many SPLIT FILE vars there are. Returns a null pointer if and only if there are no SPLIT FILE vars. */ const struct variable *const * dict_get_split_vars (const struct dictionary *d) { return d->split; } /* Returns the number of SPLIT FILE vars. */ size_t dict_get_split_cnt (const struct dictionary *d) { return d->split_cnt; } /* Removes variable V, which must be in D, from D's set of split variables. */ static void dict_unset_split_var (struct dictionary *d, struct variable *v) { int orig_count; assert (dict_contains_var (d, v)); orig_count = d->split_cnt; d->split_cnt = remove_equal (d->split, d->split_cnt, sizeof *d->split, &v, compare_var_ptrs, NULL); if (orig_count != d->split_cnt) { if (d->changed) d->changed (d, d->changed_data); /* We changed the set of split variables so invoke the callback. */ if (d->callbacks && d->callbacks->split_changed) d->callbacks->split_changed (d, d->cb_data); } } /* Sets CNT split vars SPLIT in dictionary D. */ void dict_set_split_vars (struct dictionary *d, struct variable *const *split, size_t cnt) { assert (cnt == 0 || split != NULL); d->split_cnt = cnt; if ( cnt > 0 ) { d->split = xnrealloc (d->split, cnt, sizeof *d->split) ; memcpy (d->split, split, cnt * sizeof *d->split); } else { free (d->split); d->split = NULL; } if (d->changed) d->changed (d, d->changed_data); if ( d->callbacks && d->callbacks->split_changed ) d->callbacks->split_changed (d, d->cb_data); } /* Returns the file label for D, or a null pointer if D is unlabeled (see cmd_file_label()). */ const char * dict_get_label (const struct dictionary *d) { return d->label; } /* Sets D's file label to LABEL, truncating it to at most 60 bytes in D's encoding. Removes D's label if LABEL is null or the empty string. */ void dict_set_label (struct dictionary *d, const char *label) { free (d->label); if (label == NULL || label[0] == '\0') d->label = NULL; else d->label = utf8_encoding_trunc (label, d->encoding, 60); } /* Returns the documents for D, as an UTF-8 encoded string_array. The return value is always nonnull; if there are no documents then the string_arary is empty.*/ const struct string_array * dict_get_documents (const struct dictionary *d) { return &d->documents; } /* Replaces the documents for D by NEW_DOCS, a UTF-8 encoded string_array. */ void dict_set_documents (struct dictionary *d, const struct string_array *new_docs) { size_t i; dict_clear_documents (d); for (i = 0; i < new_docs->n; i++) dict_add_document_line (d, new_docs->strings[i], false); } /* Replaces the documents for D by UTF-8 encoded string NEW_DOCS, dividing it into individual lines at new-line characters. Each line is truncated to at most DOC_LINE_LENGTH bytes in D's encoding. */ void dict_set_documents_string (struct dictionary *d, const char *new_docs) { const char *s; dict_clear_documents (d); for (s = new_docs; *s != '\0'; ) { size_t len = strcspn (s, "\n"); char *line = xmemdup0 (s, len); dict_add_document_line (d, line, false); free (line); s += len; if (*s == '\n') s++; } } /* Drops the documents from dictionary D. */ void dict_clear_documents (struct dictionary *d) { string_array_clear (&d->documents); } /* Appends the UTF-8 encoded LINE to the documents in D. LINE will be truncated so that it is no more than 80 bytes in the dictionary's encoding. If this causes some text to be lost, and ISSUE_WARNING is true, then a warning will be issued. */ bool dict_add_document_line (struct dictionary *d, const char *line, bool issue_warning) { size_t trunc_len; bool truncated; trunc_len = utf8_encoding_trunc_len (line, d->encoding, DOC_LINE_LENGTH); truncated = line[trunc_len] != '\0'; if (truncated && issue_warning) { /* Note to translators: "bytes" is correct, not characters */ msg (SW, _("Truncating document line to %d bytes."), DOC_LINE_LENGTH); } string_array_append_nocopy (&d->documents, xmemdup0 (line, trunc_len)); return !truncated; } /* Returns the number of document lines in dictionary D. */ size_t dict_get_document_line_cnt (const struct dictionary *d) { return d->documents.n; } /* Returns document line number IDX in dictionary D. The caller must not modify or free the returned string. */ const char * dict_get_document_line (const struct dictionary *d, size_t idx) { assert (idx < d->documents.n); return d->documents.strings[idx]; } /* Creates in D a vector named NAME that contains the CNT variables in VAR. Returns true if successful, or false if a vector named NAME already exists in D. */ bool dict_create_vector (struct dictionary *d, const char *name, struct variable **var, size_t cnt) { size_t i; assert (cnt > 0); for (i = 0; i < cnt; i++) assert (dict_contains_var (d, var[i])); if (dict_lookup_vector (d, name) == NULL) { d->vector = xnrealloc (d->vector, d->vector_cnt + 1, sizeof *d->vector); d->vector[d->vector_cnt++] = vector_create (name, var, cnt); return true; } else return false; } /* Creates in D a vector named NAME that contains the CNT variables in VAR. A vector named NAME must not already exist in D. */ void dict_create_vector_assert (struct dictionary *d, const char *name, struct variable **var, size_t cnt) { assert (dict_lookup_vector (d, name) == NULL); dict_create_vector (d, name, var, cnt); } /* Returns the vector in D with index IDX, which must be less than dict_get_vector_cnt (D). */ const struct vector * dict_get_vector (const struct dictionary *d, size_t idx) { assert (idx < d->vector_cnt); return d->vector[idx]; } /* Returns the number of vectors in D. */ size_t dict_get_vector_cnt (const struct dictionary *d) { return d->vector_cnt; } /* Looks up and returns the vector within D with the given NAME. */ const struct vector * dict_lookup_vector (const struct dictionary *d, const char *name) { size_t i; for (i = 0; i < d->vector_cnt; i++) if (!utf8_strcasecmp (vector_get_name (d->vector[i]), name)) return d->vector[i]; return NULL; } /* Deletes all vectors from D. */ void dict_clear_vectors (struct dictionary *d) { size_t i; for (i = 0; i < d->vector_cnt; i++) vector_destroy (d->vector[i]); free (d->vector); d->vector = NULL; d->vector_cnt = 0; } /* Multiple response sets. */ /* Returns the multiple response set in DICT with index IDX, which must be between 0 and the count returned by dict_get_n_mrsets(), exclusive. */ const struct mrset * dict_get_mrset (const struct dictionary *dict, size_t idx) { assert (idx < dict->n_mrsets); return dict->mrsets[idx]; } /* Returns the number of multiple response sets in DICT. */ size_t dict_get_n_mrsets (const struct dictionary *dict) { return dict->n_mrsets; } /* Looks for a multiple response set named NAME in DICT. If it finds one, returns its index; otherwise, returns SIZE_MAX. */ static size_t dict_lookup_mrset_idx (const struct dictionary *dict, const char *name) { size_t i; for (i = 0; i < dict->n_mrsets; i++) if (!utf8_strcasecmp (name, dict->mrsets[i]->name)) return i; return SIZE_MAX; } /* Looks for a multiple response set named NAME in DICT. If it finds one, returns it; otherwise, returns NULL. */ const struct mrset * dict_lookup_mrset (const struct dictionary *dict, const char *name) { size_t idx = dict_lookup_mrset_idx (dict, name); return idx != SIZE_MAX ? dict->mrsets[idx] : NULL; } /* Adds MRSET to DICT, replacing any existing set with the same name. Returns true if a set was replaced, false if none existed with the specified name. Ownership of MRSET is transferred to DICT. */ bool dict_add_mrset (struct dictionary *dict, struct mrset *mrset) { size_t idx; assert (mrset_ok (mrset, dict)); idx = dict_lookup_mrset_idx (dict, mrset->name); if (idx == SIZE_MAX) { dict->mrsets = xrealloc (dict->mrsets, (dict->n_mrsets + 1) * sizeof *dict->mrsets); dict->mrsets[dict->n_mrsets++] = mrset; return true; } else { mrset_destroy (dict->mrsets[idx]); dict->mrsets[idx] = mrset; return false; } } /* Looks for a multiple response set in DICT named NAME. If found, removes it from DICT and returns true. If none is found, returns false without modifying DICT. Deleting one multiple response set causes the indexes of other sets within DICT to change. */ bool dict_delete_mrset (struct dictionary *dict, const char *name) { size_t idx = dict_lookup_mrset_idx (dict, name); if (idx != SIZE_MAX) { mrset_destroy (dict->mrsets[idx]); dict->mrsets[idx] = dict->mrsets[--dict->n_mrsets]; return true; } else return false; } /* Deletes all multiple response sets from DICT. */ void dict_clear_mrsets (struct dictionary *dict) { size_t i; for (i = 0; i < dict->n_mrsets; i++) mrset_destroy (dict->mrsets[i]); free (dict->mrsets); dict->mrsets = NULL; dict->n_mrsets = 0; } /* Removes VAR, which must be in DICT, from DICT's multiple response sets. */ static void dict_unset_mrset_var (struct dictionary *dict, struct variable *var) { size_t i; assert (dict_contains_var (dict, var)); for (i = 0; i < dict->n_mrsets; ) { struct mrset *mrset = dict->mrsets[i]; size_t j; for (j = 0; j < mrset->n_vars; ) if (mrset->vars[j] == var) remove_element (mrset->vars, mrset->n_vars--, sizeof *mrset->vars, j); else j++; if (mrset->n_vars < 2) { mrset_destroy (mrset); dict->mrsets[i] = dict->mrsets[--dict->n_mrsets]; } else i++; } } /* Returns D's attribute set. The caller may examine or modify the attribute set, but must not destroy it. Destroying D or calling dict_set_attributes for D will also destroy D's attribute set. */ struct attrset * dict_get_attributes (const struct dictionary *d) { return CONST_CAST (struct attrset *, &d->attributes); } /* Replaces D's attributes set by a copy of ATTRS. */ void dict_set_attributes (struct dictionary *d, const struct attrset *attrs) { attrset_destroy (&d->attributes); attrset_clone (&d->attributes, attrs); } /* Returns true if D has at least one attribute in its attribute set, false if D's attribute set is empty. */ bool dict_has_attributes (const struct dictionary *d) { return attrset_count (&d->attributes) > 0; } /* Called from variable.c to notify the dictionary that some property (indicated by WHAT) of the variable has changed. OLDVAR is a copy of V as it existed prior to the change. OLDVAR is destroyed by this function. */ void dict_var_changed (const struct variable *v, unsigned int what, struct variable *oldvar) { if ( var_has_vardict (v)) { const struct vardict_info *vardict = var_get_vardict (v); struct dictionary *d = vardict->dict; if ( NULL == d) return; if (d->changed ) d->changed (d, d->changed_data); if ( d->callbacks && d->callbacks->var_changed ) d->callbacks->var_changed (d, var_get_dict_index (v), what, oldvar, d->cb_data); } var_destroy (oldvar); } /* Dictionary used to contain "internal variables". */ static struct dictionary *internal_dict; /* Create a variable of the specified WIDTH to be used for internal calculations only. The variable is assigned case index CASE_IDX. */ struct variable * dict_create_internal_var (int case_idx, int width) { if (internal_dict == NULL) internal_dict = dict_create ("UTF-8"); for (;;) { static int counter = INT_MAX / 2; struct variable *var; char name[64]; if (++counter == INT_MAX) counter = INT_MAX / 2; sprintf (name, "$internal%d", counter); var = dict_create_var (internal_dict, name, width); if (var != NULL) { set_var_case_index (var, case_idx); return var; } } } /* Destroys VAR, which must have been created with dict_create_internal_var(). */ void dict_destroy_internal_var (struct variable *var) { if (var != NULL) { dict_delete_var (internal_dict, var); /* Destroy internal_dict if it has no variables left, just so that valgrind --leak-check --show-reachable won't show internal_dict. */ if (dict_get_var_cnt (internal_dict) == 0) { dict_destroy (internal_dict); internal_dict = NULL; } } } int vardict_get_dict_index (const struct vardict_info *vardict) { return vardict - vardict->dict->var; } pspp-1.0.1/src/data/identifier2.c0000644000175000017500000000761212470243700013471 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2005, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This file implements parts of identifier.h that call the msg() function. This allows test programs that do not use those functions to avoid linking additional object files. */ #include #include "data/identifier.h" #include #include #include "libpspp/cast.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "gl/c-ctype.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Returns true if UTF-8 string ID is an acceptable identifier in encoding DICT_ENCODING (UTF-8 if null), false otherwise. If ISSUE_ERROR is true, issues an explanatory error message on failure. */ bool id_is_valid (const char *id, const char *dict_encoding, bool issue_error) { size_t dict_len; if (!id_is_plausible (id, issue_error)) return false; if (dict_encoding != NULL) { /* XXX need to reject recoded strings that contain the fallback character. */ dict_len = recode_string_len (dict_encoding, "UTF-8", id, -1); } else dict_len = strlen (id); if (dict_len > ID_MAX_LEN) { if (issue_error) msg (SE, _("Identifier `%s' exceeds %d-byte limit."), id, ID_MAX_LEN); return false; } return true; } /* Returns true if UTF-8 string ID is an plausible identifier, false otherwise. If ISSUE_ERROR is true, issues an explanatory error message on failure. */ bool id_is_plausible (const char *id, bool issue_error) { const uint8_t *bad_unit; const uint8_t *s; char ucname[16]; int mblen; ucs4_t uc; /* ID cannot be the empty string. */ if (id[0] == '\0') { if (issue_error) msg (SE, _("Identifier cannot be empty string.")); return false; } /* ID cannot be a reserved word. */ if (lex_id_to_token (ss_cstr (id)) != T_ID) { if (issue_error) msg (SE, _("`%s' may not be used as an identifier because it " "is a reserved word."), id); return false; } bad_unit = u8_check (CHAR_CAST (const uint8_t *, id), strlen (id)); if (bad_unit != NULL) { /* If this message ever appears, it probably indicates a PSPP bug since it shouldn't be possible to get invalid UTF-8 this far. */ if (issue_error) msg (SE, _("`%s' may not be used as an identifier because it " "contains ill-formed UTF-8 at byte offset %tu."), id, CHAR_CAST (const char *, bad_unit) - id); return false; } /* Check that it is a valid identifier. */ mblen = u8_strmbtouc (&uc, CHAR_CAST (uint8_t *, id)); if (!lex_uc_is_id1 (uc)) { if (issue_error) msg (SE, _("Character %s (in `%s') may not appear " "as the first character in a identifier."), uc_name (uc, ucname), id); return false; } for (s = CHAR_CAST (uint8_t *, id + mblen); (mblen = u8_strmbtouc (&uc, s)) != 0; s += mblen) if (!lex_uc_is_idn (uc)) { if (issue_error) msg (SE, _("Character %s (in `%s') may not appear in an " "identifier."), uc_name (uc, ucname), id); return false; } return true; } pspp-1.0.1/src/data/caseproto.c0000644000175000017500000003126012476227410013266 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/caseproto.h" #include "data/val-type.h" #include "data/value.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/pool.h" #include "gl/minmax.h" static struct caseproto *caseproto_unshare (struct caseproto *); static bool try_init_long_strings (const struct caseproto *, size_t first, size_t last, union value[]); static void init_long_strings (const struct caseproto *, size_t first, size_t last, union value[]); static void destroy_long_strings (const struct caseproto *, size_t first, size_t last, union value[]); static size_t count_long_strings (const struct caseproto *, size_t idx, size_t count); /* Returns the number of bytes to allocate for a struct caseproto with room for N_WIDTHS elements in its widths[] array. */ static inline size_t caseproto_size (size_t n_widths) { return (offsetof (struct caseproto, widths) + n_widths * sizeof (((struct caseproto *) NULL)->widths[0])); } /* Creates and returns a case prototype that initially has no widths. */ struct caseproto * caseproto_create (void) { enum { N_ALLOCATE = 4 }; struct caseproto *proto = xmalloc (caseproto_size (N_ALLOCATE)); proto->ref_cnt = 1; proto->long_strings = NULL; proto->n_long_strings = 0; proto->n_widths = 0; proto->allocated_widths = N_ALLOCATE; return proto; } static void do_unref (void *proto_) { struct caseproto *proto = proto_; caseproto_unref (proto); } /* Creates and returns a new reference to PROTO. When POOL is destroyed, the new reference will be destroyed (unrefed). */ struct caseproto * caseproto_ref_pool (const struct caseproto *proto_, struct pool *pool) { struct caseproto *proto = caseproto_ref (proto_); pool_register (pool, do_unref, proto); return proto; } /* Returns a replacement for PROTO that is unshared and has enough room for at least N_WIDTHS widths before additional memory is needed. */ struct caseproto * caseproto_reserve (struct caseproto *proto, size_t n_widths) { proto = caseproto_unshare (proto); if (n_widths > proto->allocated_widths) { proto->allocated_widths *= MAX (proto->allocated_widths * 2, n_widths); proto = xrealloc (proto, caseproto_size (proto->allocated_widths)); } return proto; } /* Returns a replacement for PROTO with WIDTH appended. */ struct caseproto * caseproto_add_width (struct caseproto *proto, int width) { assert (width >= -1 && width <= MAX_STRING); proto = caseproto_reserve (proto, proto->n_widths + 1); proto->widths[proto->n_widths++] = width; proto->n_long_strings += count_long_strings (proto, proto->n_widths - 1, 1); return proto; } /* Returns a replacement for PROTO with the width at index IDX replaced by WIDTH. IDX may be greater than the current number of widths in PROTO, in which case any gap is filled in by widths of -1. */ struct caseproto * caseproto_set_width (struct caseproto *proto, size_t idx, int width) { assert (width >= -1 && width <= MAX_STRING); proto = caseproto_reserve (proto, idx + 1); while (idx >= proto->n_widths) proto->widths[proto->n_widths++] = -1; proto->n_long_strings -= count_long_strings (proto, idx, 1); proto->widths[idx] = width; proto->n_long_strings += count_long_strings (proto, idx, 1); return proto; } /* Returns a replacement for PROTO with WIDTH inserted just before index BEFORE, or just after the last element if BEFORE is the number of widths in PROTO. */ struct caseproto * caseproto_insert_width (struct caseproto *proto, size_t before, int width) { assert (before <= proto->n_widths); proto = caseproto_reserve (proto, proto->n_widths + 1); proto->n_long_strings += value_needs_init (width); insert_element (proto->widths, proto->n_widths, sizeof *proto->widths, before); proto->widths[before] = width; proto->n_widths++; return proto; } /* Returns a replacement for PROTO with CNT widths removed starting at index IDX. */ struct caseproto * caseproto_remove_widths (struct caseproto *proto, size_t idx, size_t cnt) { assert (caseproto_range_is_valid (proto, idx, cnt)); proto = caseproto_unshare (proto); proto->n_long_strings -= count_long_strings (proto, idx, cnt); remove_range (proto->widths, proto->n_widths, sizeof *proto->widths, idx, cnt); proto->n_widths -= cnt; return proto; } /* Returns a replacement for PROTO in which the CNT widths starting at index OLD_WIDTH now start at index NEW_WIDTH, with other widths shifting out of the way to make room. */ struct caseproto * caseproto_move_widths (struct caseproto *proto, size_t old_start, size_t new_start, size_t cnt) { assert (caseproto_range_is_valid (proto, old_start, cnt)); assert (caseproto_range_is_valid (proto, new_start, cnt)); proto = caseproto_unshare (proto); move_range (proto->widths, proto->n_widths, sizeof *proto->widths, old_start, new_start, cnt); return proto; } /* Returns true if PROTO contains COUNT widths starting at index OFS, false if any of those widths are out of range for PROTO. */ bool caseproto_range_is_valid (const struct caseproto *proto, size_t ofs, size_t count) { return (count <= proto->n_widths && ofs <= proto->n_widths && ofs + count <= proto->n_widths); } /* Returns true if A and B have the same widths along their common length. (When this is so, a case with prototype A may be extended or truncated to have prototype B without having to change any existing values, and vice versa.) */ bool caseproto_is_conformable (const struct caseproto *a, const struct caseproto *b) { size_t min; size_t i; min = MIN (a->n_widths, b->n_widths); for (i = 0; i < min; i++) if (a->widths[i] != b->widths[i]) return false; return true; } /* Returns true if the N widths starting at A_START in A are the same as the N widths starting at B_START in B, false if any of the corresponding widths differ. */ bool caseproto_equal (const struct caseproto *a, size_t a_start, const struct caseproto *b, size_t b_start, size_t n) { size_t i; assert (caseproto_range_is_valid (a, a_start, n)); assert (caseproto_range_is_valid (b, b_start, n)); for (i = 0; i < n; i++) if (a->widths[a_start + i] != b->widths[b_start + i]) return false; return true; } /* Returns true if an array of values that is to be used for data of the format specified in PROTO needs to be initialized by calling caseproto_init_values, false if that step may be skipped because such an initialization would be a no-op anyhow. This optimization is useful only when a large number of initializations of such arrays may be skipped as a group. */ bool caseproto_needs_init_values (const struct caseproto *proto) { return proto->n_long_strings > 0; } /* Initializes the values in VALUES as required by PROTO, by calling value_init() on each value for which this is required. The data in VALUES have indeterminate contents until explicitly written. VALUES must have at least caseproto_get_n_widths(PROTO) elements; only that many elements of VALUES are initialized. The caller retains ownership of PROTO. */ void caseproto_init_values (const struct caseproto *proto, union value values[]) { init_long_strings (proto, 0, proto->n_long_strings, values); } /* Like caseproto_init_values, but returns false instead of terminating if memory cannot be obtained. */ bool caseproto_try_init_values (const struct caseproto *proto, union value values[]) { return try_init_long_strings (proto, 0, proto->n_long_strings, values); } /* Initializes the data in VALUES that are in NEW but not in OLD, destroys the data in VALUES that are in OLD but not NEW, and does not modify the data in VALUES that are in both OLD and NEW. VALUES must previously have been initialized as required by OLD using e.g. caseproto_init_values. The data in VALUES that are in NEW but not in OLD will have indeterminate contents until explicitly written. OLD and NEW must be conformable for this operation, as reported by caseproto_is_conformable. The caller retains ownership of OLD and NEW. */ void caseproto_reinit_values (const struct caseproto *old, const struct caseproto *new, union value values[]) { size_t old_n_long = old->n_long_strings; size_t new_n_long = new->n_long_strings; expensive_assert (caseproto_is_conformable (old, new)); if (new_n_long > old_n_long) init_long_strings (new, old_n_long, new_n_long, values); else if (new_n_long < old_n_long) destroy_long_strings (old, new_n_long, old_n_long, values); } /* Frees the values in VALUES as required by PROTO, by calling value_destroy() on each value for which this is required. The values must previously have been initialized using e.g. caseproto_init_values. The caller retains ownership of PROTO. */ void caseproto_destroy_values (const struct caseproto *proto, union value values[]) { destroy_long_strings (proto, 0, proto->n_long_strings, values); } /* Copies COUNT values, whose widths are given by widths in PROTO starting with index IDX, from SRC to DST. The caller must ensure that the values in SRC and DST were appropriately initialized using e.g. caseproto_init_values. */ void caseproto_copy (const struct caseproto *proto, size_t idx, size_t count, union value *dst, const union value *src) { size_t i; assert (caseproto_range_is_valid (proto, idx, count)); for (i = 0; i < count; i++) value_copy (&dst[idx + i], &src[idx + i], proto->widths[idx + i]); } void caseproto_free__ (struct caseproto *proto) { free (proto->long_strings); free (proto); } void caseproto_refresh_long_string_cache__ (const struct caseproto *proto_) { struct caseproto *proto = CONST_CAST (struct caseproto *, proto_); size_t n, i; assert (proto->long_strings == NULL); assert (proto->n_long_strings > 0); proto->long_strings = xmalloc (proto->n_long_strings * sizeof *proto->long_strings); n = 0; for (i = 0; i < proto->n_widths; i++) if (proto->widths[i] > MAX_SHORT_STRING) proto->long_strings[n++] = i; assert (n == proto->n_long_strings); } static struct caseproto * caseproto_unshare (struct caseproto *old) { struct caseproto *new; if (old->ref_cnt > 1) { new = xmemdup (old, caseproto_size (old->allocated_widths)); new->ref_cnt = 1; --old->ref_cnt; } else { new = old; free (new->long_strings); } new->long_strings = NULL; return new; } static bool try_init_long_strings (const struct caseproto *proto, size_t first, size_t last, union value values[]) { size_t i; if (last > 0 && proto->long_strings == NULL) caseproto_refresh_long_string_cache__ (proto); for (i = first; i < last; i++) { size_t idx = proto->long_strings[i]; if (!value_try_init (&values[idx], proto->widths[idx])) { destroy_long_strings (proto, first, i, values); return false; } } return true; } static void init_long_strings (const struct caseproto *proto, size_t first, size_t last, union value values[]) { if (!try_init_long_strings (proto, first, last, values)) xalloc_die (); } static void destroy_long_strings (const struct caseproto *proto, size_t first, size_t last, union value values[]) { size_t i; if (last > 0 && proto->long_strings == NULL) caseproto_refresh_long_string_cache__ (proto); for (i = first; i < last; i++) { size_t idx = proto->long_strings[i]; value_destroy (&values[idx], proto->widths[idx]); } } static size_t count_long_strings (const struct caseproto *proto, size_t idx, size_t count) { size_t n, i; n = 0; for (i = 0; i < count; i++) n += proto->widths[idx + i] > MAX_SHORT_STRING; return n; } pspp-1.0.1/src/data/caseproto.h0000644000175000017500000001772112615456173013306 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_CASEPROTO_H #define DATA_CASEPROTO_H 1 #include #include #include #include #include "data/value.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" /* Case prototype. A case prototype specifies the number and type of the values in a case. It is essentially an array of integers, where the array index is an index into a case and each element represents the width of a value in a case. Valid widths are: * 0, indicating a numeric value. * A positive integer between 1 and 32767, indicating the size in bytes of a string value. * -1, indicating that the value at this index in the case is not used at all. (This is rarely useful.) Case prototypes are reference counted. A newly created case prototype has a single owner (the code that created it), represented by an initial reference count of 1. Other code that receives the case prototype may keep a virtual copy of it by calling caseproto_ref, which increments the case prototype's reference count. When this is done, the case prototype becomes shared between its original owner and each piece of code that incremented the reference count. Functions that modifying case prototypes automatically unshare them as necessary. All of these functions potentially move the caseproto around in memory even when the case prototype is not shared. Thus it is very important that every caller of a function that modifies a case prototype thereafter uses the returned caseproto instead of the one passed in as an argument. Only the case prototype code should refer to caseproto members directly. Other code should use the provided helper functions. */ struct caseproto { size_t ref_cnt; /* Reference count. */ /* Tracking of long string widths. Lazily maintained: when 'long_strings' is null and 'n_long_strings' is nonzero, the former must be regenerated. */ size_t *long_strings; /* Array of indexes of long string widths. */ size_t n_long_strings; /* Number of long string widths. */ /* Widths. */ size_t n_widths; /* Number of widths. */ size_t allocated_widths; /* Space allocated for 'widths' array. */ short int widths[1]; /* Width of each case value. */ }; struct pool; /* Creation and destruction. */ struct caseproto *caseproto_create (void) MALLOC_LIKE; static inline struct caseproto *caseproto_ref (const struct caseproto *) WARN_UNUSED_RESULT; struct caseproto *caseproto_ref_pool (const struct caseproto *, struct pool *) WARN_UNUSED_RESULT; static inline void caseproto_unref (struct caseproto *); /* Inspecting stored widths. */ static inline int caseproto_get_width (const struct caseproto *, size_t idx); static inline size_t caseproto_get_n_widths (const struct caseproto *); /* Adding and removing widths. */ struct caseproto *caseproto_reserve (struct caseproto *, size_t n_widths) WARN_UNUSED_RESULT; struct caseproto *caseproto_add_width (struct caseproto *, int width) WARN_UNUSED_RESULT; struct caseproto *caseproto_set_width (struct caseproto *, size_t idx, int width) WARN_UNUSED_RESULT; struct caseproto *caseproto_insert_width (struct caseproto *, size_t before, int width) WARN_UNUSED_RESULT; struct caseproto *caseproto_remove_widths (struct caseproto *, size_t idx, size_t cnt) WARN_UNUSED_RESULT; struct caseproto *caseproto_move_widths (struct caseproto *, size_t old_start, size_t new_start, size_t cnt) WARN_UNUSED_RESULT; /* Working with "union value" arrays. */ bool caseproto_needs_init_values (const struct caseproto *); void caseproto_init_values (const struct caseproto *, union value[]); bool caseproto_try_init_values (const struct caseproto *, union value[]); void caseproto_reinit_values (const struct caseproto *old, const struct caseproto *new, union value[]); void caseproto_destroy_values (const struct caseproto *, union value[]); void caseproto_copy (const struct caseproto *, size_t idx, size_t count, union value *dst, const union value *src); /* Inspecting the cache of long string widths. (These functions are useful for allocating cases, which requires allocating a block memory for each long string value in the case.) */ static inline size_t caseproto_get_n_long_strings (const struct caseproto *); static inline size_t caseproto_get_long_string_idx (const struct caseproto *, size_t idx1); /* For use in assertions. */ bool caseproto_range_is_valid (const struct caseproto *, size_t ofs, size_t count); bool caseproto_is_conformable (const struct caseproto *a, const struct caseproto *b); bool caseproto_equal (const struct caseproto *a, size_t a_start, const struct caseproto *b, size_t b_start, size_t n); /* Creation and destruction. */ void caseproto_free__ (struct caseproto *); /* Increments case prototype PROTO's reference count and returns PROTO. Afterward, PROTO is shared among its reference count holders. */ static inline struct caseproto * caseproto_ref (const struct caseproto *proto_) { struct caseproto *proto = CONST_CAST (struct caseproto *, proto_); proto->ref_cnt++; return proto; } /* Decrements case prototype PROTO's reference count. Frees PROTO if its reference count drops to 0. If PROTO is a null pointer, this function has no effect. */ static inline void caseproto_unref (struct caseproto *proto) { if (proto != NULL && !--proto->ref_cnt) caseproto_free__ (proto); } /* Inspecting stored widths. */ /* Returns case prototype PROTO's width with the given IDX. IDX must be less than caseproto_get_n_widths(PROTO). */ static inline int caseproto_get_width (const struct caseproto *proto, size_t idx) { assert (idx < proto->n_widths); return proto->widths[idx]; } /* Returns the number of widths in case prototype PROTO. */ static inline size_t caseproto_get_n_widths (const struct caseproto *proto) { return proto->n_widths; } /* Inspecting the cache of long string widths. */ void caseproto_refresh_long_string_cache__ (const struct caseproto *); /* Returns the number of long string widths in PROTO; that is, the number of widths in PROTO that are greater than to MAX_SHORT_STRING. */ static inline size_t caseproto_get_n_long_strings (const struct caseproto *proto) { return proto->n_long_strings; } /* Given long string width IDX1, returns a value IDX2 for which caseproto_get_width(PROTO, IDX2) will return a value greater than MAX_SHORT_STRING. IDX1 must be less than caseproto_get_n_long_strings(PROTO), and IDX2 will be less than caseproto_get_n_widths(PROTO). */ static inline size_t caseproto_get_long_string_idx (const struct caseproto *proto, size_t idx1) { if (proto->long_strings == NULL) caseproto_refresh_long_string_cache__ (proto); assert (idx1 < proto->n_long_strings); return proto->long_strings[idx1]; } #endif /* data/caseproto.h */ pspp-1.0.1/src/data/make-file.c0000644000175000017500000002177413137223525013130 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2010, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/make-file.h" #include "libpspp/i18n.h" #include #include #include #include #include #include #include #include #include "data/file-name.h" #include "data/file-handle-def.h" #include "libpspp/ll.h" #include "libpspp/message.h" #include "gl/fatal-signal.h" #include "gl/tempname.h" #include "gl/xalloc.h" #include "gl/xvasprintf.h" #include "gl/localcharset.h" #include "gettext.h" #define _(msgid) gettext (msgid) #if defined _WIN32 || defined __WIN32__ #define WIN32_LEAN_AND_MEAN /* avoid including junk */ #include #define TS_stat _stat #define Tunlink _wunlink #define Topen _wopen #define Tstat _wstat /* Shamelessly lifted and modified from the rpl_rename function in Gnulib */ static int Trename (TCHAR const *src, TCHAR const *dst) { int error; /* MoveFileExW works if SRC is a directory without any flags, but fails with MOVEFILE_REPLACE_EXISTING, so try without flags first. Thankfully, MoveFileExW handles hard links correctly, even though rename() does not. */ if (MoveFileExW (src, dst, 0)) return 0; /* Retry with MOVEFILE_REPLACE_EXISTING if the move failed due to the destination already existing. */ error = GetLastError (); if (error == ERROR_FILE_EXISTS || error == ERROR_ALREADY_EXISTS) { if (MoveFileExW (src, dst, MOVEFILE_REPLACE_EXISTING)) return 0; error = GetLastError (); } switch (error) { case ERROR_FILE_NOT_FOUND: case ERROR_PATH_NOT_FOUND: case ERROR_BAD_PATHNAME: case ERROR_DIRECTORY: errno = ENOENT; break; case ERROR_ACCESS_DENIED: case ERROR_SHARING_VIOLATION: errno = EACCES; break; case ERROR_OUTOFMEMORY: errno = ENOMEM; break; case ERROR_CURRENT_DIRECTORY: errno = EBUSY; break; case ERROR_NOT_SAME_DEVICE: errno = EXDEV; break; case ERROR_WRITE_PROTECT: errno = EROFS; break; case ERROR_WRITE_FAULT: case ERROR_READ_FAULT: case ERROR_GEN_FAILURE: errno = EIO; break; case ERROR_HANDLE_DISK_FULL: case ERROR_DISK_FULL: case ERROR_DISK_TOO_FRAGMENTED: errno = ENOSPC; break; case ERROR_FILE_EXISTS: case ERROR_ALREADY_EXISTS: errno = EEXIST; break; case ERROR_BUFFER_OVERFLOW: case ERROR_FILENAME_EXCED_RANGE: errno = ENAMETOOLONG; break; case ERROR_INVALID_NAME: case ERROR_DELETE_PENDING: errno = EPERM; /* ? */ break; # ifndef ERROR_FILE_TOO_LARGE /* This value is documented but not defined in all versions of windows.h. */ # define ERROR_FILE_TOO_LARGE 223 # endif case ERROR_FILE_TOO_LARGE: errno = EFBIG; break; default: errno = EINVAL; break; } return -1; } TCHAR * convert_to_filename_encoding (const char *s, size_t len, const char *current_encoding) { const char *enc = current_encoding; if (NULL == enc || 0 == strcmp (enc, "Auto")) enc = locale_charset (); return (TCHAR *) recode_string ("UTF-16LE", enc, s, len); } #else #define TS_stat stat #define Trename rename #define Tunlink unlink #define Topen open #define Tstat stat TCHAR * convert_to_filename_encoding (const char *s, size_t len UNUSED, const char *current_encoding UNUSED) { /* Non-windows systems don't care about the encoding. The string is copied here, to be consistent with the w32 case. */ return xstrdup (s); } #endif struct replace_file { struct ll ll; TCHAR *file_name; TCHAR *tmp_name; char *tmp_name_verbatim; const char *file_name_verbatim; }; static struct ll_list all_files = LL_INITIALIZER (all_files); static void free_replace_file (struct replace_file *); static void unlink_replace_files (void); struct replace_file * replace_file_start (const struct file_handle *fh, const char *mode, mode_t permissions, FILE **fp) { static bool registered; struct TS_stat s; struct replace_file *rf; int fd; int saved_errno = errno; const char *file_name = fh_get_file_name (fh); TCHAR * Tfile_name = convert_to_filename_encoding (file_name, strlen (file_name), fh_get_file_name_encoding (fh)); /* If FILE_NAME represents a special file, write to it directly instead of trying to replace it. */ if (Tstat (Tfile_name, &s) == 0 && !S_ISREG (s.st_mode)) { /* Open file descriptor. */ fd = Topen (Tfile_name, O_WRONLY); if (fd < 0) { saved_errno = errno; msg (ME, _("Opening %s for writing: %s."), file_name, strerror (saved_errno)); free (Tfile_name); return NULL; } /* Open file as stream. */ *fp = fdopen (fd, mode); if (*fp == NULL) { saved_errno = errno; msg (ME, _("Opening stream for %s: %s."), file_name, strerror (saved_errno)); close (fd); free (Tfile_name); return NULL; } rf = xzalloc (sizeof *rf); rf->file_name = NULL; rf->tmp_name = Tfile_name; return rf; } if (!registered) { at_fatal_signal (unlink_replace_files); registered = true; } block_fatal_signals (); rf = xzalloc (sizeof *rf); rf->file_name = Tfile_name; rf->file_name_verbatim = file_name; for (;;) { /* Generate unique temporary file name. */ free (rf->tmp_name_verbatim); rf->tmp_name_verbatim = xasprintf ("%stmpXXXXXX", file_name); if (gen_tempname (rf->tmp_name_verbatim, 0, 0600, GT_NOCREATE) < 0) { saved_errno = errno; msg (ME, _("Creating temporary file to replace %s: %s."), file_name, strerror (saved_errno)); goto error; } rf->tmp_name = convert_to_filename_encoding (rf->tmp_name_verbatim, strlen (rf->tmp_name_verbatim), fh_get_file_name_encoding (fh)); /* Create file by that name. */ fd = Topen (rf->tmp_name, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, permissions); if (fd >= 0) break; if (errno != EEXIST) { saved_errno = errno; msg (ME, _("Creating temporary file %s: %s."), rf->tmp_name_verbatim, strerror (saved_errno)); goto error; } } /* Open file as stream. */ *fp = fdopen (fd, mode); if (*fp == NULL) { saved_errno = errno; msg (ME, _("Opening stream for temporary file %s: %s."), rf->tmp_name_verbatim, strerror (saved_errno)); close (fd); Tunlink (rf->tmp_name); goto error; } /* Register file for deletion. */ ll_push_head (&all_files, &rf->ll); unblock_fatal_signals (); return rf; error: unblock_fatal_signals (); free_replace_file (rf); *fp = NULL; errno = saved_errno; return NULL; } bool replace_file_commit (struct replace_file *rf) { bool ok = true; if (rf->file_name != NULL) { int save_errno; block_fatal_signals (); ok = Trename (rf->tmp_name, rf->file_name) == 0; save_errno = errno; ll_remove (&rf->ll); unblock_fatal_signals (); if (!ok) msg (ME, _("Replacing %s by %s: %s."), rf->file_name_verbatim, rf->tmp_name_verbatim, strerror (save_errno)); } else { /* Special file: no temporary file to rename. */ } free_replace_file (rf); return ok; } bool replace_file_abort (struct replace_file *rf) { bool ok = true; if (rf->file_name != NULL) { int save_errno; block_fatal_signals (); ok = Tunlink (rf->tmp_name) == 0; save_errno = errno; ll_remove (&rf->ll); unblock_fatal_signals (); if (!ok) msg (ME, _("Removing %s: %s."), rf->tmp_name_verbatim, strerror (save_errno)); } else { /* Special file: no temporary file to unlink. */ } free_replace_file (rf); return ok; } static void free_replace_file (struct replace_file *rf) { free (rf->file_name); free (rf->tmp_name); free (rf->tmp_name_verbatim); free (rf); } static void unlink_replace_files (void) { struct replace_file *rf; block_fatal_signals (); ll_for_each (rf, struct replace_file, ll, &all_files) { /* We don't free_replace_file(RF) because calling free is unsafe from an asynchronous signal handler. */ Tunlink (rf->tmp_name); } unblock_fatal_signals (); } pspp-1.0.1/src/data/mrset.h0000644000175000017500000000610412476227410012425 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_MRSET_H #define DATA_MRSET_H 1 /* Multiple response set data structure. A multiple response set (mrset) is a set of variables that represent multiple responses to a single survey question in one of the two following ways: - A multiple dichotomy set represents a survey question with a set of checkboxes. Each variable in the set is treated in a Boolean fashion: one value (the "counted value") means that the box was checked, and any other value means that it was not. - A multiple category set represents a survey question where the respondent is instructed to "list up to N choices". Each variable represents one of the responses. The set of functions provided here are skeletal. Undoubtedly they will grow as PSPP begins to make use of multiple response sets, as opposed to merely maintaining them as part of the dictionary. */ #include #include #include "data/value.h" struct dictionary; /* Type of a multiple response set. */ enum mrset_type { MRSET_MD, /* Multiple dichotomy group. */ MRSET_MC /* Multiple category group. */ }; /* Source of category labels for a multiple dichotomy group. */ enum mrset_md_cat_source { MRSET_VARLABELS, /* Variable labels. */ MRSET_COUNTEDVALUES /* Value labels for the counted value. */ }; /* A multiple response set. */ struct mrset { char *name; /* UTF-8 encoded name beginning with "$". */ char *label; /* Human-readable UTF-8 label for group. */ enum mrset_type type; /* Group type. */ struct variable **vars; /* Constituent variables. */ size_t n_vars; /* Number of constituent variables. */ /* MRSET_MD only. */ enum mrset_md_cat_source cat_source; /* Source of category labels. */ bool label_from_var_label; /* 'label' taken from variable label? */ union value counted; /* Counted value. */ int width; /* Width of 'counted'. */ }; struct mrset *mrset_clone (const struct mrset *); void mrset_destroy (struct mrset *); bool mrset_is_valid_name (const char *name, const char *dict_encoding, bool issue_error); bool mrset_ok (const struct mrset *, const struct dictionary *); #endif /* data/mrset.h */ pspp-1.0.1/src/data/spreadsheet-reader.c0000644000175000017500000001214113137223525015031 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "spreadsheet-reader.h" #include #include "gnumeric-reader.h" #include "ods-reader.h" #include #include #include #include #include #include #ifdef ODF_READ_SUPPORT static const bool ODF_READING_SUPPORTED = true; #else static const bool ODF_READING_SUPPORTED = false; #endif #ifdef GNM_READ_SUPPORT static const bool GNM_READING_SUPPORTED = true; #else static const bool GNM_READING_SUPPORTED = false; #endif void spreadsheet_ref (struct spreadsheet *s) { s->ref_cnt++; } void spreadsheet_unref (struct spreadsheet *s) { switch (s->type) { case SPREADSHEET_ODS: assert (ODF_READING_SUPPORTED); ods_unref (s); break; case SPREADSHEET_GNUMERIC: assert (GNM_READING_SUPPORTED); gnumeric_unref (s); break; default: NOT_REACHED (); break; } } struct casereader * spreadsheet_make_reader (struct spreadsheet *s, const struct spreadsheet_read_options *opts) { if (ODF_READING_SUPPORTED) if ( s->type == SPREADSHEET_ODS) return ods_make_reader (s, opts); if (GNM_READING_SUPPORTED) if ( s->type == SPREADSHEET_GNUMERIC) return gnumeric_make_reader (s, opts); return NULL; } const char * spreadsheet_get_sheet_name (struct spreadsheet *s, int n) { if (ODF_READING_SUPPORTED) if ( s->type == SPREADSHEET_ODS) return ods_get_sheet_name (s, n); if (GNM_READING_SUPPORTED) if ( s->type == SPREADSHEET_GNUMERIC) return gnumeric_get_sheet_name (s, n); return NULL; } char * spreadsheet_get_sheet_range (struct spreadsheet *s, int n) { if (ODF_READING_SUPPORTED) if ( s->type == SPREADSHEET_ODS) return ods_get_sheet_range (s, n); if (GNM_READING_SUPPORTED) if ( s->type == SPREADSHEET_GNUMERIC) return gnumeric_get_sheet_range (s, n); return NULL; } #define RADIX 26 static void reverse (char *s, int len) { int i; for (i = 0; i < len / 2; ++i) { char tmp = s[len - i - 1]; s[len - i -1] = s[i]; s[i] = tmp; } } /* Convert a string, which is an integer encoded in base26 IE, A=0, B=1, ... Z=25 to the integer it represents. ... except that in this scheme, digits with an exponent greater than 1 are implicitly incremented by 1, so AA = 0 + 1*26, AB = 1 + 1*26, ABC = 2 + 2*26 + 1*26^2 .... */ int ps26_to_int (const char *str) { int i; int multiplier = 1; int result = 0; int len = strlen (str); for (i = len - 1 ; i >= 0; --i) { int mantissa = (str[i] - 'A'); assert (mantissa >= 0); assert (mantissa < RADIX); if (i != len - 1) mantissa++; result += mantissa * multiplier; multiplier *= RADIX; } return result; } char * int_to_ps26 (int i) { char *ret = NULL; int lower = 0; long long int base = RADIX; int exp = 1; assert (i >= 0); while (i > lower + base - 1) { lower += base; base *= RADIX; assert (base > 0); exp++; } i -= lower; i += base; ret = xmalloc (exp + 1); exp = 0; do { ret[exp++] = (i % RADIX) + 'A'; i /= RADIX; } while (i > 1); ret[exp]='\0'; reverse (ret, exp); return ret; } char * create_cell_ref (int col0, int row0) { char *cs0 ; char *s ; if ( col0 < 0) return NULL; if ( row0 < 0) return NULL; cs0 = int_to_ps26 (col0); s = c_xasprintf ("%s%d", cs0, row0 + 1); free (cs0); return s; } char * create_cell_range (int col0, int row0, int coli, int rowi) { char *s0 = create_cell_ref (col0, row0); char *si = create_cell_ref (coli, rowi); char *s = c_xasprintf ("%s:%s", s0, si); free (s0); free (si); return s; } /* Convert a cell reference in the form "A1:B2", to integers. A1 means column zero, row zero. B1 means column 1 row 0. AA1 means column 26, row 0. */ bool convert_cell_ref (const char *ref, int *col0, int *row0, int *coli, int *rowi) { char startcol[5]; char stopcol [5]; int startrow; int stoprow; int n = sscanf (ref, "%4[a-zA-Z]%d:%4[a-zA-Z]%d", startcol, &startrow, stopcol, &stoprow); if ( n != 4) return false; str_uppercase (startcol); *col0 = ps26_to_int (startcol); str_uppercase (stopcol); *coli = ps26_to_int (stopcol); *row0 = startrow - 1; *rowi = stoprow - 1 ; return true; } pspp-1.0.1/src/data/caseinit.h0000644000175000017500000000400012470243700013055 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Case initializer. The procedure code has to resize cases provided by the active dataset data source, to provide room for any other variables that should go in the case, fill in the values of "left" variables, and initialize the values of other non-left variable to zero or spaces. Then, when we're done with that case, we have to save the values of "left" variables to copy into the next case read from the active dataset. The caseinit data structure provides a little help for tracking what data to initialize or to copy from case to case. */ #ifndef DATA_CASEINIT_H #define DATA_CASEINIT_H 1 struct dictionary; struct ccase; /* Creation and destruction. */ struct caseinit *caseinit_create (void); struct caseinit *caseinit_clone (struct caseinit *); void caseinit_clear (struct caseinit *); void caseinit_destroy (struct caseinit *); /* Track data to be initialized. */ void caseinit_mark_as_preinited (struct caseinit *, const struct dictionary *); void caseinit_mark_for_init (struct caseinit *, const struct dictionary *); /* Initialize data and copy data from case to case. */ void caseinit_init_vars (const struct caseinit *, struct ccase *); void caseinit_update_left_vars (struct caseinit *, const struct ccase *); #endif /* data/caseinit.h */ pspp-1.0.1/src/data/por-file-writer.h0000644000175000017500000000300712470242642014317 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef PFM_WRITE_H #define PFM_WRITE_H #include /* Portable file writing. */ /* Portable file types. */ enum pfm_type { PFM_COMM, /* Formatted for communication. */ PFM_TAPE /* Formatted for tape. */ }; /* Portable file writing options. */ struct pfm_write_options { bool create_writeable; /* File perms: writeable or read/only? */ enum pfm_type type; /* Type of portable file (TODO). */ int digits; /* Digits of precision. */ }; struct file_handle; struct dictionary; struct casewriter *pfm_open_writer (struct file_handle *, struct dictionary *, struct pfm_write_options); struct pfm_write_options pfm_writer_default_options (void); #endif /* por-file-writer.h */ pspp-1.0.1/src/data/identifier.h0000644000175000017500000001074012470243700013410 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_IDENTIFIER_H #define DATA_IDENTIFIER_H 1 #include #include #include #include "libpspp/str.h" #define TOKEN_TYPES \ TOKEN_TYPE(ID) /* Identifier. */ \ TOKEN_TYPE(POS_NUM) /* Positive number. */ \ TOKEN_TYPE(NEG_NUM) /* Negative number. */ \ TOKEN_TYPE(STRING) /* Quoted string. */ \ TOKEN_TYPE(STOP) /* End of input. */ \ \ TOKEN_TYPE(ENDCMD) /* . */ \ TOKEN_TYPE(PLUS) /* + */ \ TOKEN_TYPE(DASH) /* - */ \ TOKEN_TYPE(ASTERISK) /* * */ \ TOKEN_TYPE(SLASH) /* / */ \ TOKEN_TYPE(EQUALS) /* = */ \ TOKEN_TYPE(LPAREN) /* ( */ \ TOKEN_TYPE(RPAREN) /* ) */ \ TOKEN_TYPE(LBRACK) /* [ */ \ TOKEN_TYPE(RBRACK) /* ] */ \ TOKEN_TYPE(COMMA) /* , */ \ \ TOKEN_TYPE(AND) /* AND */ \ TOKEN_TYPE(OR) /* OR */ \ TOKEN_TYPE(NOT) /* NOT */ \ \ TOKEN_TYPE(EQ) /* EQ */ \ TOKEN_TYPE(GE) /* GE or >= */ \ TOKEN_TYPE(GT) /* GT or > */ \ TOKEN_TYPE(LE) /* LE or <= */ \ TOKEN_TYPE(LT) /* LT or < */ \ TOKEN_TYPE(NE) /* NE or ~= */ \ \ TOKEN_TYPE(ALL) /* ALL */ \ TOKEN_TYPE(BY) /* BY */ \ TOKEN_TYPE(TO) /* TO */ \ TOKEN_TYPE(WITH) /* WITH */ \ \ TOKEN_TYPE(EXP) /* ** */ /* Token types. */ enum token_type { #define TOKEN_TYPE(TYPE) T_##TYPE, TOKEN_TYPES TOKEN_N_TYPES #undef TOKEN_TYPE }; const char *token_type_to_name (enum token_type); const char *token_type_to_string (enum token_type); /* Tokens. */ bool lex_is_keyword (enum token_type); /* Validating identifiers. */ #define ID_MAX_LEN 64 /* Maximum length of identifier, in bytes. */ bool id_is_valid (const char *id, const char *dict_encoding, bool issue_error); bool id_is_plausible (const char *id, bool issue_error); /* Recognizing identifiers. */ bool lex_is_id1 (char); bool lex_is_idn (char); bool lex_uc_is_id1 (ucs4_t); bool lex_uc_is_idn (ucs4_t); bool lex_uc_is_space (ucs4_t); size_t lex_id_get_length (struct substring); /* Comparing identifiers. */ bool lex_id_match (struct substring keyword, struct substring token); bool lex_id_match_n (struct substring keyword, struct substring token, size_t n); int lex_id_to_token (struct substring); #endif /* !data/identifier.h */ pspp-1.0.1/src/data/gnumeric-reader.c0000644000175000017500000005431713137223525014346 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2012, 2013, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/message.h" #include "libpspp/misc.h" #include "gl/minmax.h" #include "gl/c-strtod.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) #include "spreadsheet-reader.h" #if !GNM_READ_SUPPORT struct spreadsheet * gnumeric_probe (const char *filename, bool report_errors) { if (report_errors) msg (ME, _("Support for %s files was not compiled into this installation of PSPP"), "Gnumeric"); return NULL; } const char * gnumeric_get_sheet_name (struct spreadsheet *s, int n) { return NULL; } char * gnumeric_get_sheet_range (struct spreadsheet *s, int n) { return NULL; } struct casereader * gnumeric_make_reader (struct spreadsheet *spreadsheet, const struct spreadsheet_read_options *opts) { return NULL; } void gnumeric_unref (struct spreadsheet *r) { } #else #include "data/gnumeric-reader.h" #include #include #include #include #include #include "data/format.h" #include "data/data-in.h" #include "data/case.h" #include "data/casereader-provider.h" #include "data/dictionary.h" #include "data/identifier.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/i18n.h" #include "libpspp/str.h" #include "gl/xalloc.h" /* Shamelessly lifted from the Gnumeric sources: https://git.gnome.org/browse/gnumeric/tree/src/value.h */ enum gnm_value_type { VALUE_EMPTY = 10, VALUE_BOOLEAN = 20, VALUE_INTEGER = 30, /* Note, this was removed from gnumeric in 2006 - old versions may of course still be around. New ones are supposed to use float.*/ VALUE_FLOAT = 40, VALUE_ERROR = 50, VALUE_STRING = 60, VALUE_CELLRANGE = 70, VALUE_ARRAY = 80 }; static void gnm_file_casereader_destroy (struct casereader *, void *); static struct ccase *gnm_file_casereader_read (struct casereader *, void *); static const struct casereader_class gnm_file_casereader_class = { gnm_file_casereader_read, gnm_file_casereader_destroy, NULL, NULL, }; enum reader_state { STATE_PRE_INIT = 0, /* Initial state */ STATE_SHEET_COUNT, /* Found the sheet index */ STATE_INIT , /* Other Initial state */ STATE_SHEET_START, /* Found the start of a sheet */ STATE_SHEET_NAME, /* Found the sheet name */ STATE_MAXROW, STATE_MAXCOL, STATE_SHEET_FOUND, /* Found the sheet that we actually want */ STATE_CELLS_START, /* Found the start of the cell array */ STATE_CELL /* Found a cell */ }; struct sheet_detail { /* The name of the sheet (utf8 encoding) */ char *name; int start_col; int stop_col; int start_row; int stop_row; int maxcol; int maxrow; }; struct state_data { /* The libxml reader for this instance */ xmlTextReaderPtr xtr; /* An internal state variable */ enum reader_state state; int node_type; int current_sheet; int row; int col; int min_col; }; static void state_data_destroy (struct state_data *sd) { xmlFreeTextReader (sd->xtr); } struct gnumeric_reader { struct spreadsheet spreadsheet; struct state_data rsd; struct state_data msd; int start_col; int stop_col; int start_row; int stop_row; struct sheet_detail *sheets; const xmlChar *target_sheet; int target_sheet_index; struct caseproto *proto; struct dictionary *dict; struct ccase *first_case; bool used_first_case; enum gnm_value_type vtype; }; void gnumeric_unref (struct spreadsheet *s) { struct gnumeric_reader *r = (struct gnumeric_reader *) s; if (0 == --s->ref_cnt) { int i; for (i = 0; i < s->n_sheets; ++i) { xmlFree (r->sheets[i].name); } free (r->sheets); state_data_destroy (&r->msd); dict_destroy (r->dict); free (s->file_name); free (r); } } const char * gnumeric_get_sheet_name (struct spreadsheet *s, int n) { struct gnumeric_reader *gr = (struct gnumeric_reader *) s; assert (n < s->n_sheets); return gr->sheets[n].name; } static void process_node (struct gnumeric_reader *r, struct state_data *sd); char * gnumeric_get_sheet_range (struct spreadsheet *s, int n) { int ret; struct gnumeric_reader *gr = (struct gnumeric_reader *) s; assert (n < s->n_sheets); while ( (gr->sheets[n].stop_col == -1) && (1 == (ret = xmlTextReaderRead (gr->msd.xtr))) ) { process_node (gr, &gr->msd); } return create_cell_range ( gr->sheets[n].start_col, gr->sheets[n].start_row, gr->sheets[n].stop_col, gr->sheets[n].stop_row); } static void gnm_file_casereader_destroy (struct casereader *reader UNUSED, void *r_) { struct gnumeric_reader *r = r_; if ( r == NULL) return ; state_data_destroy (&r->rsd); if (r->first_case && ! r->used_first_case ) case_unref (r->first_case); if (r->proto) caseproto_unref (r->proto); gnumeric_unref (&r->spreadsheet); } static void process_node (struct gnumeric_reader *r, struct state_data *sd) { xmlChar *name = xmlTextReaderName (sd->xtr); if (name == NULL) name = xmlStrdup (_xml ("--")); sd->node_type = xmlTextReaderNodeType (sd->xtr); switch (sd->state) { case STATE_PRE_INIT: sd->current_sheet = -1; if (0 == xmlStrcasecmp (name, _xml("gnm:SheetNameIndex")) && XML_READER_TYPE_ELEMENT == sd->node_type) { sd->state = STATE_SHEET_COUNT; } break; case STATE_SHEET_COUNT: if (0 == xmlStrcasecmp (name, _xml("gnm:SheetName")) && XML_READER_TYPE_ELEMENT == sd->node_type) { ++sd->current_sheet; if (sd->current_sheet + 1 > r->spreadsheet.n_sheets) { struct sheet_detail *detail ; r->sheets = xrealloc (r->sheets, (sd->current_sheet + 1) * sizeof *r->sheets); detail = &r->sheets[sd->current_sheet]; detail->start_col = detail->stop_col = detail->start_row = detail->stop_row = -1; detail->name = NULL; r->spreadsheet.n_sheets = sd->current_sheet + 1; } } else if (0 == xmlStrcasecmp (name, _xml("gnm:SheetNameIndex")) && XML_READER_TYPE_END_ELEMENT == sd->node_type) { sd->state = STATE_INIT; sd->current_sheet = -1; } else if (XML_READER_TYPE_TEXT == sd->node_type) { if ( r->sheets [r->spreadsheet.n_sheets - 1].name == NULL) r->sheets [r->spreadsheet.n_sheets - 1].name = CHAR_CAST (char *, xmlTextReaderValue (sd->xtr)); } break; case STATE_INIT: if (0 == xmlStrcasecmp (name, _xml("gnm:Sheet")) && XML_READER_TYPE_ELEMENT == sd->node_type) { ++sd->current_sheet; sd->state = STATE_SHEET_START; } break; case STATE_SHEET_START: if (0 == xmlStrcasecmp (name, _xml("gnm:Name")) && XML_READER_TYPE_ELEMENT == sd->node_type) { sd->state = STATE_SHEET_NAME; } break; case STATE_SHEET_NAME: if (0 == xmlStrcasecmp (name, _xml("gnm:Name")) && XML_READER_TYPE_END_ELEMENT == sd->node_type) { sd->state = STATE_INIT; } else if (0 == xmlStrcasecmp (name, _xml("gnm:Sheet")) && XML_READER_TYPE_END_ELEMENT == sd->node_type) { sd->state = STATE_INIT; } else if (XML_READER_TYPE_TEXT == sd->node_type) { if ( r->target_sheet != NULL) { xmlChar *value = xmlTextReaderValue (sd->xtr); if ( 0 == xmlStrcmp (value, r->target_sheet)) sd->state = STATE_SHEET_FOUND; free (value); } else if (r->target_sheet_index == sd->current_sheet + 1) { sd->state = STATE_SHEET_FOUND; } else if (r->target_sheet_index == -1) { sd->state = STATE_SHEET_FOUND; } } break; case STATE_SHEET_FOUND: if (0 == xmlStrcasecmp (name, _xml("gnm:Cells")) && XML_READER_TYPE_ELEMENT == sd->node_type) { sd->min_col = INT_MAX; if (! xmlTextReaderIsEmptyElement (sd->xtr)) sd->state = STATE_CELLS_START; } else if (0 == xmlStrcasecmp (name, _xml("gnm:MaxRow")) && XML_READER_TYPE_ELEMENT == sd->node_type) { sd->state = STATE_MAXROW; } else if (0 == xmlStrcasecmp (name, _xml("gnm:MaxCol")) && XML_READER_TYPE_ELEMENT == sd->node_type) { sd->state = STATE_MAXCOL; } else if (0 == xmlStrcasecmp (name, _xml("gnm:Sheet")) && XML_READER_TYPE_END_ELEMENT == sd->node_type) { sd->state = STATE_INIT; } break; case STATE_MAXROW: if (0 == xmlStrcasecmp (name, _xml("gnm:MaxRow")) && XML_READER_TYPE_END_ELEMENT == sd->node_type) { sd->state = STATE_SHEET_FOUND; } else if (sd->node_type == XML_READER_TYPE_TEXT) { xmlChar *value = xmlTextReaderValue (sd->xtr); r->sheets[sd->current_sheet].maxrow = _xmlchar_to_int (value); xmlFree (value); } break; case STATE_MAXCOL: if (0 == xmlStrcasecmp (name, _xml("gnm:MaxCol")) && XML_READER_TYPE_END_ELEMENT == sd->node_type) { sd->state = STATE_SHEET_FOUND; } else if (sd->node_type == XML_READER_TYPE_TEXT) { xmlChar *value = xmlTextReaderValue (sd->xtr); r->sheets[sd->current_sheet].maxcol = _xmlchar_to_int (value); xmlFree (value); } break; case STATE_CELLS_START: if (0 == xmlStrcasecmp (name, _xml ("gnm:Cell")) && XML_READER_TYPE_ELEMENT == sd->node_type) { xmlChar *attr = NULL; attr = xmlTextReaderGetAttribute (sd->xtr, _xml ("Col")); sd->col = _xmlchar_to_int (attr); free (attr); if (sd->col < sd->min_col) sd->min_col = sd->col; attr = xmlTextReaderGetAttribute (sd->xtr, _xml ("Row")); sd->row = _xmlchar_to_int (attr); free (attr); if (r->sheets[sd->current_sheet].start_row == -1) { r->sheets[sd->current_sheet].start_row = sd->row; } if (r->sheets[sd->current_sheet].start_col == -1) { r->sheets[sd->current_sheet].start_col = sd->col; } if (! xmlTextReaderIsEmptyElement (sd->xtr)) sd->state = STATE_CELL; } else if ( (0 == xmlStrcasecmp (name, _xml("gnm:Cells"))) && (XML_READER_TYPE_END_ELEMENT == sd->node_type) ) { r->sheets[sd->current_sheet].stop_col = sd->col; r->sheets[sd->current_sheet].stop_row = sd->row; sd->state = STATE_SHEET_NAME; } break; case STATE_CELL: if (0 == xmlStrcasecmp (name, _xml("gnm:Cell")) && XML_READER_TYPE_END_ELEMENT == sd->node_type) { sd->state = STATE_CELLS_START; } break; default: break; }; xmlFree (name); } /* Sets the VAR of case C, to the value corresponding to the xml string XV */ static void convert_xml_string_to_value (struct ccase *c, const struct variable *var, const xmlChar *xv, enum gnm_value_type type, int col, int row) { union value *v = case_data_rw (c, var); if (xv == NULL) value_set_missing (v, var_get_width (var)); else if ( var_is_alpha (var)) value_copy_str_rpad (v, var_get_width (var), xv, ' '); else if (type == VALUE_FLOAT || type == VALUE_INTEGER) { const char *text = CHAR_CAST (const char *, xv); char *endptr; errno = 0; v->f = c_strtod (text, &endptr); if ( errno != 0 || endptr == text) v->f = SYSMIS; } else { const char *text = CHAR_CAST (const char *, xv); const struct fmt_spec *fmt = var_get_write_format (var); char *m = data_in (ss_cstr (text), "UTF-8", fmt->type, v, var_get_width (var), "UTF-8"); if (m) { char buf [FMT_STRING_LEN_MAX + 1]; char *cell = create_cell_ref (col, row); msg (MW, _("Cannot convert the value in the spreadsheet cell %s to format (%s): %s"), cell, fmt_to_string (fmt, buf), m); free (cell); } free (m); } } struct var_spec { char *name; int width; xmlChar *first_value; int first_type; }; static void gnumeric_error_handler (void *ctx, const char *mesg, UNUSED xmlParserSeverities sev, xmlTextReaderLocatorPtr loc) { struct gnumeric_reader *r = ctx; msg (MW, _("There was a problem whilst reading the %s file `%s' (near line %d): `%s'"), "Gnumeric", r->spreadsheet.file_name, xmlTextReaderLocatorLineNumber (loc), mesg); } static struct gnumeric_reader * gnumeric_reopen (struct gnumeric_reader *r, const char *filename, bool show_errors) { int ret = -1; struct state_data *sd; xmlTextReaderPtr xtr; gzFile gz; assert (r == NULL || filename == NULL); if (filename) { gz = gzopen (filename, "r"); } else { gz = gzopen (r->spreadsheet.file_name, "r"); } if (NULL == gz) return NULL; xtr = xmlReaderForIO ((xmlInputReadCallback) gzread, (xmlInputCloseCallback) gzclose, gz, NULL, NULL, show_errors ? 0 : (XML_PARSE_NOERROR | XML_PARSE_NOWARNING) ); if (xtr == NULL) { gzclose (gz); return NULL; } if (r == NULL) { r = xzalloc (sizeof *r); r->spreadsheet.n_sheets = -1; r->spreadsheet.file_name = strdup (filename); sd = &r->msd; } else { sd = &r->rsd; } if (show_errors) xmlTextReaderSetErrorHandler (xtr, gnumeric_error_handler, r); r->target_sheet = NULL; r->target_sheet_index = -1; sd->row = sd->col = -1; sd->state = STATE_PRE_INIT; sd->xtr = xtr; r->spreadsheet.ref_cnt++; /* Advance to the start of the workbook. This gives us some confidence that we are actually dealing with a gnumeric spreadsheet. */ while ( (sd->state != STATE_INIT ) && 1 == (ret = xmlTextReaderRead (sd->xtr))) { process_node (r, sd); } if ( ret != 1) { /* Does not seem to be a gnumeric file */ gnumeric_unref (&r->spreadsheet); return NULL; } r->spreadsheet.type = SPREADSHEET_GNUMERIC; if (show_errors) { const xmlChar *enc = xmlTextReaderConstEncoding (sd->xtr); xmlCharEncoding xce = xmlParseCharEncoding (CHAR_CAST (const char *, enc)); if ( XML_CHAR_ENCODING_UTF8 != xce) { /* I have been told that ALL gnumeric files are UTF8 encoded. If that is correct, this can never happen. */ msg (MW, _("The gnumeric file `%s' is encoded as %s instead of the usual UTF-8 encoding. " "Any non-ascii characters will be incorrectly imported."), r->spreadsheet.file_name, enc); } } return r; } struct spreadsheet * gnumeric_probe (const char *filename, bool report_errors) { struct gnumeric_reader *r = gnumeric_reopen (NULL, filename, report_errors); return &r->spreadsheet; } struct casereader * gnumeric_make_reader (struct spreadsheet *spreadsheet, const struct spreadsheet_read_options *opts) { int type = 0; int x = 0; struct gnumeric_reader *r = NULL; unsigned long int vstart = 0; int ret; casenumber n_cases = CASENUMBER_MAX; int i; struct var_spec *var_spec = NULL; int n_var_specs = 0; r = (struct gnumeric_reader *) (spreadsheet); r = gnumeric_reopen (r, NULL, true); if ( opts->cell_range ) { if ( ! convert_cell_ref (opts->cell_range, &r->start_col, &r->start_row, &r->stop_col, &r->stop_row)) { msg (SE, _("Invalid cell range `%s'"), opts->cell_range); goto error; } } else { r->start_col = -1; r->start_row = 0; r->stop_col = -1; r->stop_row = -1; } r->target_sheet = BAD_CAST opts->sheet_name; r->target_sheet_index = opts->sheet_index; r->rsd.row = r->rsd.col = -1; r->rsd.current_sheet = -1; r->first_case = NULL; r->proto = NULL; /* Advance to the start of the cells for the target sheet */ while ( (r->rsd.state != STATE_CELL || r->rsd.row < r->start_row ) && 1 == (ret = xmlTextReaderRead (r->rsd.xtr))) { xmlChar *value ; process_node (r, &r->rsd); value = xmlTextReaderValue (r->rsd.xtr); if ( r->rsd.state == STATE_MAXROW && r->rsd.node_type == XML_READER_TYPE_TEXT) { n_cases = 1 + _xmlchar_to_int (value) ; } free (value); } /* If a range has been given, then use that to calculate the number of cases */ if ( opts->cell_range) { n_cases = MIN (n_cases, r->stop_row - r->start_row + 1); } if ( opts->read_names ) { r->start_row++; n_cases --; } /* Read in the first row of cells, including the headers if read_names was set */ while ( (( r->rsd.state == STATE_CELLS_START && r->rsd.row <= r->start_row) || r->rsd.state == STATE_CELL ) && (ret = xmlTextReaderRead (r->rsd.xtr)) ) { int idx; if (r->rsd.state == STATE_CELL && r->rsd.node_type == XML_READER_TYPE_TEXT) { xmlChar *attr = xmlTextReaderGetAttribute (r->rsd.xtr, _xml ("ValueType")); type = _xmlchar_to_int (attr); xmlFree (attr); } process_node (r, &r->rsd); if ( r->rsd.row > r->start_row ) { xmlChar *attr = xmlTextReaderGetAttribute (r->rsd.xtr, _xml ("ValueType")); r->vtype = _xmlchar_to_int (attr); xmlFree (attr); break; } if ( r->rsd.col < r->start_col || (r->stop_col != -1 && r->rsd.col > r->stop_col)) continue; idx = r->rsd.col - r->start_col; if ( idx >= n_var_specs ) { int i; var_spec = xrealloc (var_spec, sizeof (*var_spec) * (idx + 1)); for (i = n_var_specs; i <= idx; ++i) { var_spec [i].name = NULL; var_spec [i].width = -1; var_spec [i].first_value = NULL; var_spec [i].first_type = -1; } n_var_specs = idx + 1 ; } var_spec [idx].first_type = type; if ( r->rsd.node_type == XML_READER_TYPE_TEXT ) { xmlChar *value = xmlTextReaderValue (r->rsd.xtr); const char *text = CHAR_CAST (const char *, value); if ( r->rsd.row < r->start_row) { if ( opts->read_names ) { var_spec [idx].name = xstrdup (text); } } else { var_spec [idx].first_value = xmlStrdup (value); if (-1 == var_spec [idx].width ) var_spec [idx].width = (opts->asw == -1) ? ROUND_UP (strlen(text), SPREADSHEET_DEFAULT_WIDTH) : opts->asw; } free (value); } else if ( r->rsd.node_type == XML_READER_TYPE_ELEMENT && r->rsd.state == STATE_CELL) { if ( r->rsd.row == r->start_row ) { xmlChar *attr = xmlTextReaderGetAttribute (r->rsd.xtr, _xml ("ValueType")); if ( NULL == attr || VALUE_STRING != _xmlchar_to_int (attr)) var_spec [idx].width = 0; free (attr); } } } { const xmlChar *enc = xmlTextReaderConstEncoding (r->rsd.xtr); if ( enc == NULL) goto error; /* Create the dictionary and populate it */ spreadsheet->dict = r->dict = dict_create (CHAR_CAST (const char *, enc)); } for (i = 0 ; i < n_var_specs ; ++i ) { char *name; if ( (var_spec[i].name == NULL) && (var_spec[i].first_value == NULL)) continue; /* Probably no data exists for this variable, so allocate a default width */ if ( var_spec[i].width == -1 ) var_spec[i].width = SPREADSHEET_DEFAULT_WIDTH; name = dict_make_unique_var_name (r->dict, var_spec[i].name, &vstart); dict_create_var (r->dict, name, var_spec[i].width); free (name); } /* Create the first case, and cache it */ r->used_first_case = false; if ( n_var_specs == 0 ) { msg (MW, _("Selected sheet or range of spreadsheet `%s' is empty."), spreadsheet->file_name); goto error; } r->proto = caseproto_ref (dict_get_proto (r->dict)); r->first_case = case_create (r->proto); case_set_missing (r->first_case); for ( i = 0 ; i < n_var_specs ; ++i ) { const struct variable *var; if ( (var_spec[i].name == NULL) && (var_spec[i].first_value == NULL)) continue; var = dict_get_var (r->dict, x++); convert_xml_string_to_value (r->first_case, var, var_spec[i].first_value, var_spec[i].first_type, r->rsd.col + i - 1, r->rsd.row - 1); } for ( i = 0 ; i < n_var_specs ; ++i ) { free (var_spec[i].first_value); free (var_spec[i].name); } free (var_spec); return casereader_create_sequential (NULL, r->proto, n_cases, &gnm_file_casereader_class, r); error: for ( i = 0 ; i < n_var_specs ; ++i ) { free (var_spec[i].first_value); free (var_spec[i].name); } free (var_spec); gnm_file_casereader_destroy (NULL, r); return NULL; }; /* Reads and returns one case from READER's file. Returns a null pointer on failure. */ static struct ccase * gnm_file_casereader_read (struct casereader *reader UNUSED, void *r_) { struct ccase *c; int ret = 0; struct gnumeric_reader *r = r_; int current_row = r->rsd.row; if ( !r->used_first_case ) { r->used_first_case = true; return r->first_case; } c = case_create (r->proto); case_set_missing (c); if (r->start_col == -1) r->start_col = r->rsd.min_col; while ((r->rsd.state == STATE_CELL || r->rsd.state == STATE_CELLS_START ) && r->rsd.row == current_row && (ret = xmlTextReaderRead (r->rsd.xtr))) { process_node (r, &r->rsd); if (r->rsd.state == STATE_CELL && r->rsd.node_type == XML_READER_TYPE_ELEMENT) { xmlChar *attr = xmlTextReaderGetAttribute (r->rsd.xtr, _xml ("ValueType")); r->vtype = _xmlchar_to_int (attr); xmlFree (attr); } if ( r->rsd.col < r->start_col || (r->stop_col != -1 && r->rsd.col > r->stop_col)) continue; if ( r->rsd.col - r->start_col >= caseproto_get_n_widths (r->proto)) continue; if ( r->stop_row != -1 && r->rsd.row > r->stop_row) break; if ( r->rsd.node_type == XML_READER_TYPE_TEXT ) { xmlChar *value = xmlTextReaderValue (r->rsd.xtr); const int idx = r->rsd.col - r->start_col; const struct variable *var = dict_get_var (r->dict, idx); convert_xml_string_to_value (c, var, value, r->vtype, r->rsd.col, r->rsd.row); xmlFree (value); } } if (ret == 1) return c; else { case_unref (c); return NULL; } } #endif /* GNM_READ_SUPPORT */ pspp-1.0.1/src/data/psql-reader.h0000644000175000017500000000211312470243700013500 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef PSQL_READER_H #define PSQL_READER_H 1 #include #include "libpspp/str.h" struct casereader; struct psql_read_info { char *conninfo ; struct string sql; bool allow_clear; int str_width; int bsize; }; struct dictionary; struct casereader * psql_open_reader (struct psql_read_info *, struct dictionary **); #endif pspp-1.0.1/src/data/session.c0000644000175000017500000001231712671322442012752 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/session.h" #include #include #include "data/dataset.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/hash-functions.h" #include "libpspp/i18n.h" #include "libpspp/str.h" #include "libpspp/hmapx.h" #include "gl/xalloc.h" struct session { struct session *parent; struct hmapx datasets; struct dataset *active; char *syntax_encoding; /* Default encoding for syntax files. */ unsigned int n_dataset_names; /* For session_generate_dataset_name(). */ }; static struct hmapx_node *session_lookup_dataset__ (const struct session *, const char *name); struct session * session_create (struct session *parent) { struct session *s; s = xmalloc (sizeof *s); s->parent = parent; hmapx_init (&s->datasets); s->active = NULL; s->syntax_encoding = xstrdup (s->parent != NULL ? s->parent->syntax_encoding : "Auto"); s->n_dataset_names = 0; return s; } void session_destroy (struct session *s) { if (s != NULL) { struct hmapx_node *node, *next; struct dataset *ds; s->active = NULL; HMAPX_FOR_EACH_SAFE (ds, node, next, &s->datasets) dataset_destroy (ds); hmapx_destroy (&s->datasets); free (s->syntax_encoding); free (s); } } struct dataset * session_active_dataset (struct session *s) { return s->active; } void session_set_active_dataset (struct session *s, struct dataset *ds) { assert (ds == NULL || dataset_session (ds) == s); s->active = ds; } void session_add_dataset (struct session *s, struct dataset *ds) { struct dataset *old; old = session_lookup_dataset (s, dataset_name (ds)); if (old == s->active) s->active = ds; if (old != NULL) { session_remove_dataset (s, old); dataset_destroy (old); } hmapx_insert (&s->datasets, ds, utf8_hash_case_string (dataset_name (ds), 0)); if (s->active == NULL) s->active = ds; dataset_set_session__ (ds, s); } void session_remove_dataset (struct session *s, struct dataset *ds) { assert (ds != s->active); hmapx_delete (&s->datasets, session_lookup_dataset__ (s, dataset_name (ds))); dataset_set_session__ (ds, NULL); } struct dataset * session_lookup_dataset (const struct session *s, const char *name) { struct hmapx_node *node = session_lookup_dataset__ (s, name); return (node != NULL ? node->data : s->parent != NULL ? session_lookup_dataset (s->parent, name) : NULL); } struct dataset * session_lookup_dataset_assert (const struct session *s, const char *name) { struct dataset *ds = session_lookup_dataset (s, name); assert (ds != NULL); return ds; } void session_set_default_syntax_encoding (struct session *s, const char *encoding) { free (s->syntax_encoding); s->syntax_encoding = xstrdup (encoding); } const char * session_get_default_syntax_encoding (const struct session *s) { return s->syntax_encoding; } size_t session_n_datasets (const struct session *s) { return hmapx_count (&s->datasets); } void session_for_each_dataset (const struct session *s, void (*cb) (struct dataset *, void *aux), void *aux) { struct hmapx_node *node, *next; struct dataset *ds; HMAPX_FOR_EACH_SAFE (ds, node, next, &s->datasets) cb (ds, aux); } struct dataset * session_get_dataset_by_seqno (const struct session *s, unsigned int seqno) { struct hmapx_node *node; struct dataset *ds; HMAPX_FOR_EACH (ds, node, &s->datasets) if (dataset_seqno (ds) == seqno) return ds; return NULL; } /* Returns an identifier that is is not currently in use as a dataset name. The caller must free the returned identifier, with free(). */ char * session_generate_dataset_name (struct session *s) { for (;;) { char *name; s->n_dataset_names++; assert(s->n_dataset_names != 0); name = xasprintf ("DataSet%u", s->n_dataset_names); if (!session_lookup_dataset (s, name)) return name; free (name); } } static struct hmapx_node * session_lookup_dataset__ (const struct session *s_, const char *name) { struct session *s = CONST_CAST (struct session *, s_); struct hmapx_node *node; struct dataset *ds; HMAPX_FOR_EACH_WITH_HASH (ds, node, utf8_hash_case_string (name, 0), &s->datasets) if (!utf8_strcasecmp (dataset_name (ds), name)) return node; return NULL; } pspp-1.0.1/src/data/sys-file-encoding.pl0000755000175000017500000000726012470242646015007 00000000000000#! /usr/bin/perl use strict; use warnings; if (-t 0 || @ARGV) { print < sys-file-encoding.c To regenerate the encoding data, get the latest ICU encoding data from: http://source.icu-project.org/repos/icu/icu/trunk/source/data/mappings/convrtrs.txt then convert it with this script using the command above. EOF exit (@ARGV && $ARGV[0] eq '--help' ? 0 : 1); } open (CONVERTERS, '<', 'convrtrs.txt') or die "convrtrs.txt: open failed ($!)\n"; our $WINDOWS = 3; # Windows code pages. our $IBM = 2; # IBM code pages. our $CP = 1; # Java (?) code pages. our %sources = ($WINDOWS => "windows", $IBM => "ibm", $CP => "cp"); my $converter = ""; while () { chomp; s/#.*//; if (s/^\s+//) { $converter .= " $_"; } else { process_converter ($converter); $converter = $_; } } process_converter ($converter); close (CONVERTERS); our %codepages; print <<'EOF'; /* -*- mode: c; buffer-read-only: t -*- Generated by sys-file-encoding.pl. Do not modify! */ #include #include "data/sys-file-private.h" struct sys_encoding sys_codepage_number_to_name[] = { EOF for my $cpnumber (sort { $a <=> $b } (keys (%codepages))) { my $source = max (keys (%{$codepages{$cpnumber}})); my $name = ${$codepages{$cpnumber}{$source}}[0]; print " { $cpnumber, \"$name\" },\n"; } print " { 0, NULL }\n"; print "};\n\n"; my %names; for my $cpnumber (sort { $a <=> $b } (keys (%codepages))) { for my $source (keys (%{$codepages{$cpnumber}})) { for my $name (@{$codepages{$cpnumber}{$source}}) { push(@{$names{$name}{$source}}, $cpnumber); } } } print "struct sys_encoding sys_codepage_name_to_number[] = {\n"; for my $name (sort (keys (%names))) { for my $source (reverse (sort (keys (%sources)))) { next if !exists ($names{$name}{$source}); my (@numbers) = @{$names{$name}{$source}}; # The only two encodings that currently print this are KSC_5601 # and KS_C_5601-1987, for code pages 949 and 51949. It looks to # me like the correct code page number is 949, which is the one # chosen (because the numbers are in sorted order). print " /* $name has multiple numbers for $sources{$source}: @numbers */\n" if @numbers > 1; print " { $numbers[0], \"$name\" },\n"; last; } } print " { 0, NULL }\n"; print "};\n"; sub process_converter { my ($converter) = @_; return if $converter =~ /^\s*$/; return if $converter =~ /^\s*\{/; my %cps; my @iana; my @other; my @fields = split (' ', $converter); while (@fields) { my $name = shift (@fields); if (@fields && $fields[0] eq '{') { shift (@fields); my (%standards); for (;;) { my $standard = shift (@fields); last if $standard eq '}'; $standards{$standard} = 1; } if (exists $standards{'IANA*'}) { unshift (@iana, $name); } elsif (exists $standards{'IANA'}) { push (@iana, $name); } elsif (grep (/\*$/, keys %standards)) { unshift (@other, $name); } else { push (@other, $name); } } else { # Untagged names are completely nonstandard. next; } my $number; if (($number) = $name =~ /^cp([0-9]+)$/) { $cps{$CP} = int ($number); } elsif (($number) = $name =~ /^windows-([0-9]+)$/) { $cps{$WINDOWS} = int ($number); } elsif (($number) = $name =~ /^ibm-([0-9]+)$/) { $cps{$IBM} = int ($number); } else { next; } } # If there are no tagged names then this is completely nonstandard. return if !@iana && !@other; $codepages{$cps{$_}}{$_} = [@iana, @other] for keys (%cps); } sub max { my ($best); for my $x (@_) { $best = $x if !defined ($best) || $x > $best; } return $best; } pspp-1.0.1/src/data/caseinit.c0000644000175000017500000002020412470243700013054 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/caseinit.h" #include #include #include #include "data/case.h" #include "data/dictionary.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "gl/xalloc.h" /* Initializer list: a set of values to write to locations within a case. */ /* Binds a value with a place to put it. */ struct init_value { size_t case_index; int width; union value value; }; /* A set of values to initialize in a case. */ struct init_list { struct init_value *values; size_t cnt; }; /* A bitmap of the "left" status of variables. */ enum leave_class { LEAVE_REINIT = 0x001, /* Reinitialize for every case. */ LEAVE_LEFT = 0x002 /* Keep the value from one case to the next. */ }; /* Initializes LIST as an empty initializer list. */ static void init_list_create (struct init_list *list) { list->values = NULL; list->cnt = 0; } /* Initializes NEW as a copy of OLD. */ static void init_list_clone (struct init_list *new, const struct init_list *old) { size_t i; new->values = xmemdup (old->values, old->cnt * sizeof *old->values); new->cnt = old->cnt; for (i = 0; i < new->cnt; i++) { struct init_value *iv = &new->values[i]; value_clone (&iv->value, &iv->value, iv->width); } } /* Frees the storage associated with LIST. */ static void init_list_destroy (struct init_list *list) { struct init_value *iv; for (iv = &list->values[0]; iv < &list->values[list->cnt]; iv++) value_destroy (&iv->value, iv->width); free (list->values); } /* Clears LIST, making it an empty list. */ static void init_list_clear (struct init_list *list) { init_list_destroy (list); init_list_create (list); } /* Compares `struct init_value's A and B by case_index and returns a strcmp()-type result. */ static int compare_init_values (const void *a_, const void *b_, const void *aux UNUSED) { const struct init_value *a = a_; const struct init_value *b = b_; return a->case_index < b->case_index ? -1 : a->case_index > b->case_index; } /* Returns true if LIST includes CASE_INDEX, false otherwise. */ static bool init_list_includes (const struct init_list *list, size_t case_index) { struct init_value value; value.case_index = case_index; return binary_search (list->values, list->cnt, sizeof *list->values, &value, compare_init_values, NULL) != NULL; } /* Marks LIST to initialize the `union value's for the variables in dictionary D that both (1) fall in the leave class or classes designated by INCLUDE and (2) are not in EXCLUDE. */ static void init_list_mark (struct init_list *list, const struct init_list *exclude, enum leave_class include, const struct dictionary *d) { size_t var_cnt = dict_get_var_cnt (d); size_t i; assert (list != exclude); list->values = xnrealloc (list->values, list->cnt + dict_get_var_cnt (d), sizeof *list->values); for (i = 0; i < var_cnt; i++) { struct variable *v = dict_get_var (d, i); size_t case_index = var_get_case_index (v); struct init_value *iv; /* Only include the correct class. */ if (!(include & (var_get_leave (v) ? LEAVE_LEFT : LEAVE_REINIT))) continue; /* Don't include those to be excluded. */ if (exclude != NULL && init_list_includes (exclude, case_index)) continue; iv = &list->values[list->cnt++]; iv->case_index = case_index; iv->width = var_get_width (v); value_init (&iv->value, iv->width); if (var_is_numeric (v) && var_get_leave (v)) iv->value.f = 0; else value_set_missing (&iv->value, iv->width); } /* Drop duplicates. */ list->cnt = sort_unique (list->values, list->cnt, sizeof *list->values, compare_init_values, NULL); } /* Initializes data in case C to the values in the initializer LIST. */ static void init_list_init (const struct init_list *list, struct ccase *c) { const struct init_value *iv; for (iv = &list->values[0]; iv < &list->values[list->cnt]; iv++) value_copy (case_data_rw_idx (c, iv->case_index), &iv->value, iv->width); } /* Updates the values in the initializer LIST from the data in case C. */ static void init_list_update (const struct init_list *list, const struct ccase *c) { struct init_value *iv; for (iv = &list->values[0]; iv < &list->values[list->cnt]; iv++) value_copy (&iv->value, case_data_idx (c, iv->case_index), iv->width); } /* A case initializer. */ struct caseinit { /* Values that do not need to be initialized by the procedure, because they are initialized by the data source. */ struct init_list preinited_values; /* Values that need to be initialized to SYSMIS or spaces in each case. */ struct init_list reinit_values; /* Values that need to be initialized to 0 or spaces in the first case and thereafter retain their values from case to case. */ struct init_list left_values; }; /* Creates and returns a new case initializer. */ struct caseinit * caseinit_create (void) { struct caseinit *ci = xmalloc (sizeof *ci); init_list_create (&ci->preinited_values); init_list_create (&ci->reinit_values); init_list_create (&ci->left_values); return ci; } /* Creates and returns a copy of OLD. */ struct caseinit * caseinit_clone (struct caseinit *old) { struct caseinit *new = xmalloc (sizeof *new); init_list_clone (&new->preinited_values, &old->preinited_values); init_list_clone (&new->reinit_values, &old->reinit_values); init_list_clone (&new->left_values, &old->left_values); return new; } /* Clears the contents of case initializer CI. */ void caseinit_clear (struct caseinit *ci) { init_list_clear (&ci->preinited_values); init_list_clear (&ci->reinit_values); init_list_clear (&ci->left_values); } /* Destroys case initializer CI. */ void caseinit_destroy (struct caseinit *ci) { if (ci != NULL) { init_list_destroy (&ci->preinited_values); init_list_destroy (&ci->reinit_values); init_list_destroy (&ci->left_values); free (ci); } } /* Marks the variables from dictionary D in CI as being initialized by the data source, so that the case initializer need not initialize them itself. */ void caseinit_mark_as_preinited (struct caseinit *ci, const struct dictionary *d) { init_list_mark (&ci->preinited_values, NULL, LEAVE_REINIT | LEAVE_LEFT, d); } /* Marks in CI the variables from dictionary D, except for any variables that were already marked with caseinit_mark_as_preinited, as needing initialization according to their leave status. */ void caseinit_mark_for_init (struct caseinit *ci, const struct dictionary *d) { init_list_mark (&ci->reinit_values, &ci->preinited_values, LEAVE_REINIT, d); init_list_mark (&ci->left_values, &ci->preinited_values, LEAVE_LEFT, d); } /* Initializes variables in *C as described by CI. C must not be shared. */ void caseinit_init_vars (const struct caseinit *ci, struct ccase *c) { init_list_init (&ci->reinit_values, c); init_list_init (&ci->left_values, c); } /* Updates the left vars in CI from the data in C, so that the next call to caseinit_init_vars will store those values in the next case. */ void caseinit_update_left_vars (struct caseinit *ci, const struct ccase *c) { init_list_update (&ci->left_values, c); } pspp-1.0.1/src/data/sys-file-private.h0000644000175000017500000000641112470434665014505 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Infrastructure common to system file reader and writer. Old versions of SPSS limited string variables to a width of 255 bytes. For backward compatibility with these older versions, the system file format represents a string longer than 255 bytes, called a "very long string", as a collection of strings no longer than 255 bytes each. The strings concatenated to make a very long string are called its "segments"; for consistency, variables other than very long strings are considered to have a single segment. The interfaces in this file primarily provide support for dealing with very long strings. */ #ifndef DATA_SYS_FILE_PRIVATE_H #define DATA_SYS_FILE_PRIVATE_H 1 #include struct dictionary; /* ASCII magic numbers. */ #define ASCII_MAGIC "$FL2" /* For regular files. */ #define ASCII_ZMAGIC "$FL3" /* For ZLIB compressed files. */ /* EBCDIC magic number, the same as ASCII_MAGIC but encoded in EBCDIC. No EBCDIC ZLIB compressed files have been observed, so we do not define EBCDIC_ZMAGIC even though the value is obvious. */ #define EBCDIC_MAGIC "\x5b\xc6\xd3\xf2" /* Amount of data that ZLIB compressed data blocks typically decompress to. */ #define ZBLOCK_SIZE 0x3ff000 /* A variable in a system file. */ struct sfm_var { int var_width; /* Variable width (0 to 32767). */ int segment_width; /* Segment width (0 to 255). */ int case_index; /* Index into case. */ /* The following members are interesting only for string variables (width != 0). For numeric variables (width == 0) their values are always 0. Note: width + padding is always a multiple of 8. */ int offset; /* Offset within string variable in case. */ int padding; /* Number of padding bytes following data. */ }; int sfm_dictionary_to_sfm_vars (const struct dictionary *, struct sfm_var **, size_t *); int sfm_width_to_octs (int width); int sfm_width_to_segments (int width); int sfm_segment_effective_offset (int width, int segment); int sfm_segment_alloc_width (int width, int segment); /* A mapping between an encoding name and a Windows codepage. */ struct sys_encoding { int number; const char *name; }; extern struct sys_encoding sys_codepage_number_to_name[]; extern struct sys_encoding sys_codepage_name_to_number[]; int sys_get_codepage_from_encoding (const char *); const char *sys_get_encoding_from_codepage (int); #endif /* data/sys-file-private.h */ pspp-1.0.1/src/data/file-name.c0000644000175000017500000001554013137223525013125 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/file-name.h" #include "data/file-handle-def.h" #include #include #include #include #include #include #include #include "data/settings.h" #include "libpspp/hash-functions.h" #include "libpspp/message.h" #include "libpspp/i18n.h" #include "libpspp/str.h" #include "libpspp/version.h" #include "gl/dirname.h" #include "gl/dosname.h" #include "gl/intprops.h" #include "gl/minmax.h" #include "gl/relocatable.h" #include "gl/xalloc.h" #include "gl/xmalloca.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Functions for performing operations on file names. */ /* Returns the extension part of FILE_NAME as a malloc()'d string. If FILE_NAME does not have an extension, returns an empty string. */ char * fn_extension (const struct file_handle *fh) { const char *file_name = fh_get_file_name (fh); const char *extension = strrchr (file_name, '.'); if (extension == NULL) extension = ""; return xstrdup (extension); } /* Find out information about files. */ /* Returns true iff NAME specifies an absolute file name. */ static bool fn_is_absolute (const char *name) { return IS_ABSOLUTE_FILE_NAME (name); } /* Searches for a file with name NAME in the directories given in PATH, which is terminated by a null pointer. Returns the full name of the first file found, which the caller is responsible for freeing with free(), or NULL if none is found. */ char * fn_search_path (const char *base_name, char **path) { size_t i; if (fn_is_absolute (base_name)) return xstrdup (base_name); for (i = 0; path[i] != NULL; i++) { const char *dir = path[i]; char *file; if (!strcmp (dir, "") || !strcmp (dir, ".")) file = xstrdup (base_name); else if (ISSLASH (dir[strlen (dir) - 1])) file = xasprintf ("%s%s", dir, base_name); else file = xasprintf ("%s/%s", dir, base_name); struct stat temp; if (( (stat (file, &temp) == 0 ) && ( ! S_ISDIR (temp.st_mode) ))) return file; free (file); } return NULL; } /* Returns true if file with name NAME exists, and that file is not a directory */ bool fn_exists (const struct file_handle *fh) { const char *name = fh_get_file_name (fh); struct stat temp; if ( stat (name, &temp) != 0 ) return false; return ! S_ISDIR (temp.st_mode); } /* Basic file handling. */ #if HAVE_POPEN /* Used for giving an error message on a set_safer security violation. */ static FILE * safety_violation (const char *fn) { msg (SE, _("Not opening pipe file `%s' because %s option set."), fn, "SAFER"); errno = EPERM; return NULL; } #endif /* File open routine that understands `-' as stdin/stdout and `|cmd' as a pipe to command `cmd'. Returns resultant FILE on success, NULL on failure. If NULL is returned then errno is set to a sensible value. */ FILE * fn_open (const struct file_handle *fh, const char *mode) { const char *fn = fh_get_file_name (fh); assert (mode[0] == 'r' || mode[0] == 'w' || mode[0] == 'a'); if (mode[0] == 'r') { if (!strcmp (fn, "stdin") || !strcmp (fn, "-")) return stdin; } else { if (!strcmp (fn, "stdout") || !strcmp (fn, "-")) return stdout; if (!strcmp (fn, "stderr")) return stderr; } #if HAVE_POPEN if (fn[0] == '|') { if (settings_get_safer_mode ()) return safety_violation (fn); return popen (&fn[1], mode[0] == 'r' ? "r" : "w"); } else if (*fn && fn[strlen (fn) - 1] == '|') { char *s; FILE *f; if (settings_get_safer_mode ()) return safety_violation (fn); s = xmalloca (strlen (fn)); memcpy (s, fn, strlen (fn) - 1); s[strlen (fn) - 1] = 0; f = popen (s, mode[0] == 'r' ? "r" : "w"); freea (s); return f; } else #endif #if WIN32 { wchar_t *ss = convert_to_filename_encoding (fn, strlen (fn), fh_get_file_name_encoding (fh)); wchar_t *m = (wchar_t *) recode_string ("UTF-16LE", "ASCII", mode, strlen (mode)); FILE *fp = _wfopen (ss, m); free (m); free (ss); return fp; } #else return fopen (fn, mode); #endif } /* Counterpart to fn_open that closes file F with name FN; returns 0 on success, EOF on failure. If EOF is returned, errno is set to a sensible value. */ int fn_close (const struct file_handle *fh, FILE *f) { const char *fn = fh_get_file_name (fh); if (fileno (f) == STDIN_FILENO || fileno (f) == STDOUT_FILENO || fileno (f) == STDERR_FILENO) return 0; #if HAVE_POPEN else if (fn[0] == '|' || (*fn && fn[strlen (fn) - 1] == '|')) { pclose (f); return 0; } #endif else return fclose (f); } #ifdef WIN32 /* Apparently windoze users like to see output dumped into their home directory, not the current directory (!) */ const char * default_output_path (void) { static char *path = NULL; if ( path == NULL) { /* Windows NT defines HOMEDRIVE and HOMEPATH. But give preference to HOME, because the user can change HOME. */ const char *home_dir = getenv ("HOME"); int i; if (home_dir == NULL) { const char *home_drive = getenv ("HOMEDRIVE"); const char *home_path = getenv ("HOMEPATH"); if (home_drive != NULL && home_path != NULL) home_dir = xasprintf ("%s%s", home_drive, home_path); } if (home_dir == NULL) home_dir = "c:/users/default"; /* poor default */ /* Copy home_dir into path. Add a slash at the end but only if there isn't already one there, because Windows treats // specially. */ if (home_dir[0] == '\0' || strchr ("/\\", home_dir[strlen (home_dir) - 1]) == NULL) path = xasprintf ("%s%c", home_dir, '/'); else path = xstrdup (home_dir); for(i = 0; i < strlen (path); i++) if (path[i] == '\\') path[i] = '/'; } return path; } #else /* ... whereas the rest of the world just likes it to be put "here" for easy access. */ const char * default_output_path (void) { static char current_dir[] = ""; return current_dir; } #endif pspp-1.0.1/src/data/case-tmpfile.h0000644000175000017500000000441512470243700013641 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Manager for temporary files, each of which stores an array of like-size cases. Partial and whole cases may be read from and written to a case_tmpfile in random order. The indexes of the cases written in a case_tmpfile need not be sequential or start from 0 (although this will be inefficient if the file system does not support sparse files). The case_tmpfile does not track which cases have been written, so the client is responsible for reading data only from cases (or partial cases) that have previously been written. */ #ifndef DATA_CASE_TMPFILE_H #define DATA_CASE_TMPFILE_H 1 #include "data/case.h" struct caseproto; struct case_tmpfile *case_tmpfile_create (const struct caseproto *); bool case_tmpfile_destroy (struct case_tmpfile *); bool case_tmpfile_error (const struct case_tmpfile *); void case_tmpfile_force_error (struct case_tmpfile *); const struct taint *case_tmpfile_get_taint (const struct case_tmpfile *); bool case_tmpfile_get_values (const struct case_tmpfile *, casenumber, size_t start_value, union value[], size_t value_cnt); struct ccase *case_tmpfile_get_case (const struct case_tmpfile *, casenumber); bool case_tmpfile_put_values (struct case_tmpfile *, casenumber, size_t start_value, const union value[], size_t value_cnt); bool case_tmpfile_put_case (struct case_tmpfile *, casenumber, struct ccase *); #endif /* data/case-tmpfile.h */ pspp-1.0.1/src/data/case-map.h0000644000175000017500000000465212470413451012763 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Case map. A case map copies data from a case that corresponds to one dictionary to a case that corresponds to a second dictionary. A few options are available for ways to create the mapping. */ #ifndef DATA_CASE_MAP_H #define DATA_CASE_MAP_H 1 #include struct case_map; struct casereader; struct casewriter; struct ccase; struct dictionary; struct case_map *case_map_create (void); void case_map_destroy (struct case_map *); struct ccase *case_map_execute (const struct case_map *, struct ccase *); const struct caseproto *case_map_get_proto (const struct case_map *); struct casereader *case_map_create_input_translator (struct case_map *, struct casereader *); struct casewriter *case_map_create_output_translator (struct case_map *, struct casewriter *); /* For mapping cases for one version of a dictionary to those in a modified version of the same dictionary. */ struct case_map_stage *case_map_stage_create (const struct dictionary *); void case_map_stage_destroy (struct case_map_stage *); struct case_map *case_map_stage_get_case_map (const struct case_map_stage *); /* For eliminating "holes" in a case. */ struct case_map *case_map_to_compact_dict (const struct dictionary *d, unsigned int exclude_classes); /* For mapping cases for one dictionary to another based on variable names within the dictionary. */ struct case_map *case_map_by_name (const struct dictionary *old, const struct dictionary *new); void case_map_dump (const struct case_map *); #endif /* data/case-map.h */ pspp-1.0.1/src/data/dataset-writer.c0000644000175000017500000001016512470243700014221 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/dataset-writer.h" #include #include "data/case.h" #include "data/case-map.h" #include "data/casereader.h" #include "data/casewriter-provider.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/variable.h" #include "libpspp/compiler.h" #include "libpspp/taint.h" #include "gl/xalloc.h" #define N_(msgid) (msgid) /* A dataset file writer. */ struct dataset_writer { struct dataset *ds; /* Underlying dataset. */ struct fh_lock *lock; /* Exclusive access to file handle. */ struct dictionary *dict; /* Dictionary for subwriter. */ struct case_map *compactor; /* Compacts into dictionary. */ struct casewriter *subwriter; /* Data output. */ }; static const struct casewriter_class dataset_writer_casewriter_class; /* Opens FH, which must have referent type FH_REF_DATASET, and returns a dataset_writer for it, or a null pointer on failure. Cases stored in the dataset_writer will be expected to be drawn from DICTIONARY. */ struct casewriter * dataset_writer_open (struct file_handle *fh, const struct dictionary *dictionary) { struct dataset_writer *writer; struct casewriter *casewriter; struct fh_lock *lock; /* Get exclusive write access to handle. */ /* TRANSLATORS: this fragment will be interpolated into messages in fh_lock() that identify types of files. */ lock = fh_lock (fh, FH_REF_DATASET, N_("dataset"), FH_ACC_WRITE, true); if (lock == NULL) return NULL; /* Create writer. */ writer = xmalloc (sizeof *writer); writer->lock = lock; writer->ds = fh_get_dataset (fh); writer->dict = dict_clone (dictionary); dict_delete_scratch_vars (writer->dict); if (dict_count_values (writer->dict, 0) < dict_get_next_value_idx (writer->dict)) { writer->compactor = case_map_to_compact_dict (writer->dict, 0); dict_compact_values (writer->dict); } else writer->compactor = NULL; writer->subwriter = autopaging_writer_create (dict_get_proto (writer->dict)); casewriter = casewriter_create (dict_get_proto (writer->dict), &dataset_writer_casewriter_class, writer); taint_propagate (casewriter_get_taint (writer->subwriter), casewriter_get_taint (casewriter)); return casewriter; } /* Writes case C to WRITER. */ static void dataset_writer_casewriter_write (struct casewriter *w UNUSED, void *writer_, struct ccase *c) { struct dataset_writer *writer = writer_; casewriter_write (writer->subwriter, case_map_execute (writer->compactor, c)); } /* Closes WRITER. */ static void dataset_writer_casewriter_destroy (struct casewriter *w UNUSED, void *writer_) { struct dataset_writer *writer = writer_; struct casereader *reader = casewriter_make_reader (writer->subwriter); if (!casereader_error (reader)) { dataset_set_dict (writer->ds, writer->dict); dataset_set_source (writer->ds, reader); } else { casereader_destroy (reader); dict_destroy (writer->dict); } fh_unlock (writer->lock); free (writer); } static const struct casewriter_class dataset_writer_casewriter_class = { dataset_writer_casewriter_write, dataset_writer_casewriter_destroy, NULL, }; pspp-1.0.1/src/data/case-map.c0000644000175000017500000002623513137223525012761 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/case-map.h" #include #include #include "data/casereader.h" #include "data/casewriter.h" #include "data/dictionary.h" #include "data/variable.h" #include "data/case.h" #include "libpspp/assertion.h" #include "libpspp/hash-functions.h" #include "libpspp/hmap.h" #include "gl/xalloc.h" /* A case map. */ struct case_map { struct caseproto *proto; /* Prototype for output cases. */ int *map; /* For each destination index, the corresponding source index. */ }; static struct ccase *translate_case (struct ccase *, void *map_); static bool destroy_case_map (void *map_); /* Creates and returns an empty map that outputs cases matching PROTO. */ static struct case_map * create_case_map (const struct caseproto *proto) { size_t n_values = caseproto_get_n_widths (proto); struct case_map *map; size_t i; map = xmalloc (sizeof *map); map->proto = caseproto_ref (proto); map->map = xnmalloc (n_values, sizeof *map->map); for (i = 0; i < n_values; i++) map->map[i] = -1; return map; } /* Inserts into MAP a mapping of the value at index FROM in the source case to the value at index TO in the destination case. */ static void insert_mapping (struct case_map *map, size_t from, size_t to) { assert (to < caseproto_get_n_widths (map->proto)); assert (map->map[to] == -1); map->map[to] = from; } /* Destroys case map MAP. */ void case_map_destroy (struct case_map *map) { if (map != NULL) { caseproto_unref (map->proto); free (map->map); free (map); } } /* If MAP is nonnull, returns a new case that is the result of applying case map MAP to SRC, and unrefs SRC. If MAP is null, returns SRC unchanged. */ struct ccase * case_map_execute (const struct case_map *map, struct ccase *src) { if (map != NULL) { size_t n_values = caseproto_get_n_widths (map->proto); struct ccase *dst; size_t dst_idx; dst = case_create (map->proto); for (dst_idx = 0; dst_idx < n_values; dst_idx++) { int src_idx = map->map[dst_idx]; if (src_idx != -1) value_copy (case_data_rw_idx (dst, dst_idx), case_data_idx (src, src_idx), caseproto_get_width (map->proto, dst_idx)); } case_unref (src); return dst; } else return src; } /* Returns the prototype for output cases created by MAP. The caller must not unref the returned case prototype. */ const struct caseproto * case_map_get_proto (const struct case_map *map) { return map->proto; } /* Creates and returns a new casereader whose cases are produced by reading from SUBREADER and executing the actions of MAP. The casereader will have as many `union value's as MAP. When the new casereader is destroyed, MAP will be destroyed too. After this function is called, SUBREADER must not ever again be referenced directly. It will be destroyed automatically when the returned casereader is destroyed. */ struct casereader * case_map_create_input_translator (struct case_map *map, struct casereader *subreader) { return casereader_create_translator (subreader, case_map_get_proto (map), translate_case, destroy_case_map, map); } /* Creates and returns a new casewriter. Cases written to the new casewriter will be passed through MAP and written to SUBWRITER. The casewriter will have as many `union value's as MAP. When the new casewriter is destroyed, MAP will be destroyed too. After this function is called, SUBWRITER must not ever again be referenced directly. It will be destroyed automatically when the returned casewriter is destroyed. */ struct casewriter * case_map_create_output_translator (struct case_map *map, struct casewriter *subwriter) { return casewriter_create_translator (subwriter, case_map_get_proto (map), translate_case, destroy_case_map, map); } /* Casereader/casewriter translation callback. */ static struct ccase * translate_case (struct ccase *input, void *map_) { struct case_map *map = map_; return case_map_execute (map, input); } /* Casereader/casewriter destruction callback. */ static bool destroy_case_map (void *map_) { struct case_map *map = map_; case_map_destroy (map); return true; } /* Creates and returns a case_map that can be used to compact cases for dictionary D. Compacting a case eliminates "holes" between values and after the last value. (Holes are created by deleting variables.) All variables are compacted if EXCLUDE_CLASSES is 0, or it may contain one or more of (1u << DC_ORDINARY), (1u << DC_SYSTEM), or (1u << DC_SCRATCH) to cause the corresponding type of variable to be deleted during compaction. */ struct case_map * case_map_to_compact_dict (const struct dictionary *d, unsigned int exclude_classes) { size_t n_vars = dict_get_var_cnt (d); struct caseproto *proto; struct case_map *map; size_t n_values; size_t i; /* Create the case mapping. */ proto = dict_get_compacted_proto (d, exclude_classes); map = create_case_map (proto); caseproto_unref (proto); /* Add the values to the case mapping. */ n_values = 0; for (i = 0; i < n_vars; i++) { struct variable *v = dict_get_var (d, i); if (!(exclude_classes & (1u << var_get_dict_class (v)))) insert_mapping (map, var_get_case_index (v), n_values++); } return map; } struct stage_var { struct hmap_node hmap_node; /* In struct case_map_stage's 'stage_vars'. */ const struct variable *var; int case_index; }; struct case_map_stage { const struct dictionary *dict; struct hmap stage_vars; }; /* Prepares and returns a "struct case_map_stage" for producing a case map for DICT. Afterward, the caller may delete, reorder, or rename variables within DICT at will before using case_map_stage_get_case_map() to produce the case map. The caller must *not* add new variables to DICT. */ struct case_map_stage * case_map_stage_create (const struct dictionary *dict) { size_t n_vars = dict_get_var_cnt (dict); struct case_map_stage *stage; size_t i; stage = xmalloc (sizeof *stage); stage->dict = dict; hmap_init (&stage->stage_vars); for (i = 0; i < n_vars; i++) { const struct variable *var = dict_get_var (dict, i); struct stage_var *stage_var; stage_var = xmalloc (sizeof *stage_var); stage_var->var = var; stage_var->case_index = var_get_case_index (var); hmap_insert (&stage->stage_vars, &stage_var->hmap_node, hash_pointer (var, 0)); } return stage; } /* Destroys STAGE, which was created by case_map_stage_create(). */ void case_map_stage_destroy (struct case_map_stage *stage) { if (stage != NULL) { struct stage_var *stage_var, *next_stage_var; HMAP_FOR_EACH_SAFE (stage_var, next_stage_var, struct stage_var, hmap_node, &stage->stage_vars) { hmap_delete (&stage->stage_vars, &stage_var->hmap_node); free (stage_var); } hmap_destroy (&stage->stage_vars); free (stage); } } static const struct stage_var * case_map_stage_find_var (const struct case_map_stage *stage, const struct variable *var) { const struct stage_var *stage_var; HMAP_FOR_EACH_IN_BUCKET (stage_var, struct stage_var, hmap_node, hash_pointer (var, 0), &stage->stage_vars) if (stage_var->var == var) return stage_var; /* If the following assertion is reached, it indicates a bug in the case_map_stage client: the client allowed a new variable to be added to the dictionary. This is not allowed, because of the risk that the new varaible might have the same address as an old variable that has been deleted. */ NOT_REACHED (); } /* Produces a case map from STAGE, which must have been previously created with case_map_stage_create(). The case map maps from the original case index of the variables in STAGE's dictionary to their current case indexes. Returns the new case map, or a null pointer if no mapping is required (that is, no data has changed position). */ struct case_map * case_map_stage_get_case_map (const struct case_map_stage *stage) { struct case_map *map; size_t n_vars = dict_get_var_cnt (stage->dict); size_t n_values; size_t i; bool identity_map = true; map = create_case_map (dict_get_proto (stage->dict)); for (i = 0; i < n_vars; i++) { const struct variable *var = dict_get_var (stage->dict, i); const struct stage_var *stage_var = case_map_stage_find_var (stage, var); if (var_get_case_index (var) != stage_var->case_index) identity_map = false; insert_mapping (map, stage_var->case_index, var_get_case_index (var)); } if (identity_map) { case_map_destroy (map); return NULL; } n_values = caseproto_get_n_widths (map->proto); while (n_values > 0 && caseproto_get_width (map->proto, n_values - 1) == -1) map->proto = caseproto_remove_widths (map->proto, --n_values, 1); return map; } /* Creates and returns a case map for mapping variables in OLD to variables in NEW based on their name. For every variable in NEW, there must be a variable in OLD with the same name, type, and width. */ struct case_map * case_map_by_name (const struct dictionary *old, const struct dictionary *new) { struct case_map *map; size_t var_cnt = dict_get_var_cnt (new); size_t i; map = create_case_map (dict_get_proto (new)); for (i = 0; i < var_cnt; i++) { struct variable *nv = dict_get_var (new, i); struct variable *ov = dict_lookup_var_assert (old, var_get_name (nv)); assert (var_get_width (nv) == var_get_width (ov)); insert_mapping (map, var_get_case_index (ov), var_get_case_index (nv)); } return map; } /* Prints the mapping represented by case map CM to stdout, for debugging purposes. */ void case_map_dump (const struct case_map *cm) { int i; for (i = 0 ; i < caseproto_get_n_widths (cm->proto); ++i ) printf ("%d -> %d\n", i, cm->map[i]); } pspp-1.0.1/src/data/spreadsheet-reader.h0000644000175000017500000000543413137223525015045 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2010, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SPREADSHEET_READ_H #define SPREADSHEET_READ_H 1 #include #include struct casereeader; /* Default width of string variables. */ #define SPREADSHEET_DEFAULT_WIDTH 8 /* These elements are read/write. They may be passed in NULL (for pointers) or negative for integers, in which case they will be filled in be the function. */ struct spreadsheet_read_options { char *sheet_name ; /* The name of the sheet to open (in UTF-8) */ int sheet_index ; /* The index of the sheet to open (only used if sheet_name is NULL) */ char *cell_range ; /* The cell range (in UTF-8) */ bool read_names ; /* True if the first row is to be used as the names of the variables */ int asw ; /* The width of string variables in the created dictionary */ }; int ps26_to_int (const char *str); char * int_to_ps26 (int); bool convert_cell_ref (const char *ref, int *col0, int *row0, int *coli, int *rowi); #define _xml(X) (CHAR_CAST (const xmlChar *, (X))) #define _xmlchar_to_int(X) ((X) ? atoi (CHAR_CAST (const char *, (X))) : -1) enum spreadsheet_type { SPREADSHEET_NONE, SPREADSHEET_GNUMERIC, SPREADSHEET_ODS }; struct spreadsheet { char *file_name; enum spreadsheet_type type; /* The total number of sheets in the "workbook" */ int n_sheets; /* The dictionary for client's reference. Client must clone if it needs a permanent or modifiable copy. */ const struct dictionary *dict; int ref_cnt; }; struct casereader * spreadsheet_make_reader (struct spreadsheet *, const struct spreadsheet_read_options *); const char * spreadsheet_get_sheet_name (struct spreadsheet *s, int n) OPTIMIZE(2); char * spreadsheet_get_sheet_range (struct spreadsheet *s, int n) OPTIMIZE(2); char * create_cell_ref (int col0, int row0); char *create_cell_range (int col0, int row0, int coli, int rowi); void spreadsheet_unref (struct spreadsheet *); void spreadsheet_ref (struct spreadsheet *); #define SPREADSHEET_CAST(X) ((struct spreadsheet *)(X)) #endif pspp-1.0.1/src/data/value-labels.c0000644000175000017500000002513013137223525013640 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/value-labels.h" #include #include "data/data-out.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/array.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/hash-functions.h" #include "libpspp/hmap.h" #include "libpspp/intern.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" /* Creates and returns a new, empty set of value labels with the given WIDTH. */ struct val_labs * val_labs_create (int width) { struct val_labs *vls = xmalloc (sizeof *vls); vls->width = width; hmap_init (&vls->labels); return vls; } /* Creates and returns a new set of value labels identical to VLS. Returns a null pointer if VLS is null. */ struct val_labs * val_labs_clone (const struct val_labs *vls) { struct val_labs *copy; struct val_lab *label; if (vls == NULL) return NULL; copy = val_labs_create (vls->width); HMAP_FOR_EACH (label, struct val_lab, node, &vls->labels) val_labs_add (copy, &label->value, label->escaped_label); return copy; } /* Determines whether VLS's width can be changed to NEW_WIDTH, using the rules checked by value_is_resizable. */ bool val_labs_can_set_width (const struct val_labs *vls, int new_width) { struct val_lab *label; HMAP_FOR_EACH (label, struct val_lab, node, &vls->labels) if (!value_is_resizable (&label->value, vls->width, new_width)) return false; return true; } /* Changes the width of VLS to NEW_WIDTH. The original and new width must be both numeric or both string. */ void val_labs_set_width (struct val_labs *vls, int new_width) { assert (val_labs_can_set_width (vls, new_width)); if (value_needs_resize (vls->width, new_width)) { struct val_lab *label; HMAP_FOR_EACH (label, struct val_lab, node, &vls->labels) value_resize (&label->value, vls->width, new_width); } vls->width = new_width; } /* Destroys VLS. */ void val_labs_destroy (struct val_labs *vls) { if (vls != NULL) { val_labs_clear (vls); hmap_destroy (&vls->labels); free (vls); } } /* Removes all the value labels from VLS. */ void val_labs_clear (struct val_labs *vls) { struct val_lab *label, *next; HMAP_FOR_EACH_SAFE (label, next, struct val_lab, node, &vls->labels) { hmap_delete (&vls->labels, &label->node); value_destroy (&label->value, vls->width); intern_unref (label->label); intern_unref (label->escaped_label); free (label); } } /* Returns the width of VLS. */ int val_labs_get_width (const struct val_labs *vls) { return vls->width; } /* Returns the number of value labels in VLS. Returns 0 if VLS is null. */ size_t val_labs_count (const struct val_labs *vls) { return vls == NULL ? 0 : hmap_count (&vls->labels); } static void set_label (struct val_lab *lab, const char *escaped_label) { lab->escaped_label = intern_new (escaped_label); if (strstr (escaped_label, "\\n") == NULL) lab->label = intern_ref (lab->escaped_label); else { struct string s; const char *p; ds_init_empty (&s); ds_extend (&s, intern_strlen (lab->escaped_label)); for (p = escaped_label; *p != '\0'; p++) { char c = *p; if (c == '\\' && p[1] == 'n') { c = '\n'; p++; } ds_put_byte (&s, c); } lab->label = intern_new (ds_cstr (&s)); ds_destroy (&s); } } static void do_add_val_lab (struct val_labs *vls, const union value *value, const char *escaped_label) { struct val_lab *lab = xmalloc (sizeof *lab); value_clone (&lab->value, value, vls->width); set_label (lab, escaped_label); hmap_insert (&vls->labels, &lab->node, value_hash (value, vls->width, 0)); } /* If VLS does not already contain a value label for VALUE, adds the UTF-8 encoded LABEL for it and returns true. Otherwise, returns false. In LABEL, the two-byte sequence "\\n" is interpreted as a new-line. */ bool val_labs_add (struct val_labs *vls, const union value *value, const char *label) { const struct val_lab *lab = val_labs_lookup (vls, value); if (lab == NULL) { do_add_val_lab (vls, value, label); return true; } else return false; } /* Sets LABEL as the value label for VALUE in VLS, replacing any existing label for VALUE. In LABEL, the two-byte sequence "\\n" is interpreted as a new-line. */ void val_labs_replace (struct val_labs *vls, const union value *value, const char *label) { struct val_lab *vl = val_labs_lookup (vls, value); if (vl != NULL) { intern_unref (vl->label); intern_unref (vl->escaped_label); set_label (vl, label); } else do_add_val_lab (vls, value, label); } /* Removes LABEL from VLS. */ void val_labs_remove (struct val_labs *vls, struct val_lab *label) { hmap_delete (&vls->labels, &label->node); value_destroy (&label->value, vls->width); intern_unref (label->label); intern_unref (label->escaped_label); free (label); } /* Searches VLS for a value label for VALUE. If successful, returns the string used as the label, as a UTF-8 encoded string in a format suitable for output. Otherwise, returns a null pointer. Returns a null pointer if VLS is null. */ const char * val_labs_find (const struct val_labs *vls, const union value *value) { const struct val_lab *label = val_labs_lookup (vls, value); return label ? label->label : NULL; } /* Searches VLS for a value label for VALUE. If successful, returns the value label; otherwise, returns a null pointer. Returns a null pointer if VLS is null. */ static struct val_lab * val_labs_lookup__ (const struct val_labs *vls, const union value *value, unsigned int hash) { struct val_lab *label; HMAP_FOR_EACH_WITH_HASH (label, struct val_lab, node, hash, &vls->labels) if (value_equal (&label->value, value, vls->width)) return label; return NULL; } /* Searches VLS for a value label for VALUE. If successful, returns the value label; otherwise, returns a null pointer. Returns a null pointer if VLS is null. */ struct val_lab * val_labs_lookup (const struct val_labs *vls, const union value *value) { return (vls == NULL ? NULL : val_labs_lookup__ (vls, value, value_hash (value, vls->width, 0))); } /* Searches VLS for a value label whose label is exactly LABEL. If successful, returns the corresponding value. Otherwise, returns a null pointer. Returns a null pointer if VLS is null. This function is O(n) in the number of labels in VLS. */ const union value * val_labs_find_value (const struct val_labs *vls, const char *label_) { const union value *value = NULL; if (vls != NULL) { const struct val_lab *vl; const char *label; label = intern_new (label_); HMAP_FOR_EACH (vl, struct val_lab, node, &vls->labels) if (vl->label == label) { value = &vl->value; break; } intern_unref (label); } return value; } /* Returns the first value label in VLS, in arbitrary order, or a null pointer if VLS is empty or if VLS is a null pointer. If the return value is non-null, then val_labs_next() may be used to continue iterating. */ const struct val_lab * val_labs_first (const struct val_labs *vls) { return vls ? HMAP_FIRST (struct val_lab, node, &vls->labels) : NULL; } /* Returns the next value label in an iteration begun by val_labs_first(). If the return value is non-null, then val_labs_next() may be used to continue iterating. */ const struct val_lab * val_labs_next (const struct val_labs *vls, const struct val_lab *label) { return HMAP_NEXT (label, struct val_lab, node, &vls->labels); } static int compare_labels_by_value_3way (const void *a_, const void *b_, const void *vls_) { const struct val_lab *const *a = a_; const struct val_lab *const *b = b_; const struct val_labs *vls = vls_; return value_compare_3way (&(*a)->value, &(*b)->value, vls->width); } /* Allocates and returns an array of pointers to value labels that is sorted in increasing order by value. The array has val_labs_count(VLS) elements. The caller is responsible for freeing the array. */ const struct val_lab ** val_labs_sorted (const struct val_labs *vls) { if (vls != NULL) { const struct val_lab *label; const struct val_lab **labels; size_t i; labels = xmalloc (val_labs_count (vls) * sizeof *labels); i = 0; HMAP_FOR_EACH (label, struct val_lab, node, &vls->labels) labels[i++] = label; assert (i == val_labs_count (vls)); sort (labels, val_labs_count (vls), sizeof *labels, compare_labels_by_value_3way, vls); return labels; } else return NULL; } /* Returns a hash value that represents all of the labels in VLS, starting from BASIS. */ unsigned int val_labs_hash (const struct val_labs *vls, unsigned int basis) { const struct val_lab *label; unsigned int hash; hash = hash_int (val_labs_count (vls), basis); HMAP_FOR_EACH (label, struct val_lab, node, &vls->labels) hash ^= value_hash (&label->value, vls->width, hash_string (label->label, basis)); return hash; } /* Returns true if A and B contain the same values with the same labels, false if they differ in some way. */ bool val_labs_equal (const struct val_labs *a, const struct val_labs *b) { const struct val_lab *label; if (val_labs_count (a) != val_labs_count (b)) return false; if (a == NULL || b == NULL) return true; if (a->width != b->width) return false; HMAP_FOR_EACH (label, struct val_lab, node, &a->labels) { struct val_lab *label2 = val_labs_lookup__ (b, &label->value, label->node.hash); if (!label2 || label->label != label2->label) return false; } return true; } pspp-1.0.1/src/data/value.c0000644000175000017500000002224412470413451012401 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/value.h" #include "data/val-type.h" #include "data/variable.h" #include "libpspp/hash-functions.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/unistr.h" #include "gl/minmax.h" #include "gl/xalloc.h" /* Copies the contents of string value SRC with width SRC_WIDTH to string value DST with width DST_WIDTH. If SRC_WIDTH is greater than DST_WIDTH, then only the first DST_WIDTH bytes are copied; if DST_WIDTH is greater than SRC_WIDTH, then DST is padded on the right with PAD bytes. SRC and DST must be string values; that is, SRC_WIDTH and DST_WIDTH must both be positive. It is important that SRC_WIDTH and DST_WIDTH be the actual widths with which SRC and DST were initialized. Passing, e.g., smaller values in order to copy only a prefix of SRC or modify only a prefix of DST will not work in every case. */ void value_copy_rpad (union value *dst, int dst_width, const union value *src, int src_width, char pad) { u8_buf_copy_rpad (value_str_rw (dst, dst_width), dst_width, value_str (src, src_width), src_width, pad); } /* Copies the contents of null-terminated string SRC to string value DST with width DST_WIDTH. If SRC is more than DST_WIDTH bytes long, then only the first DST_WIDTH bytes are copied; if DST_WIDTH is greater than the length of SRC, then DST is padded on the right with PAD bytes. DST must be a string value; that is, DST_WIDTH must be positive. It is important that DST_WIDTH be the actual width with which DST was initialized. Passing, e.g., a smaller value in order to modify only a prefix of DST will not work in every case. */ void value_copy_str_rpad (union value *dst, int dst_width, const uint8_t *src, char pad) { value_copy_buf_rpad (dst, dst_width, src, u8_strlen (src), pad); } /* Copies the SRC_LEN bytes at SRC to string value DST with width DST_WIDTH. If SRC_LEN is greater than DST_WIDTH, then only the first DST_WIDTH bytes are copied; if DST_WIDTH is greater than SRC_LEN, then DST is padded on the right with PAD bytes. DST must be a string value; that is, DST_WIDTH must be positive. It is important that DST_WIDTH be the actual width with which DST was initialized. Passing, e.g., a smaller value in order to modify only a prefix of DST will not work in every case. */ void value_copy_buf_rpad (union value *dst, int dst_width, const uint8_t *src, size_t src_len, char pad) { u8_buf_copy_rpad (value_str_rw (dst, dst_width), dst_width, src, src_len, pad); } /* Sets V to the system-missing value for data of the given WIDTH. */ void value_set_missing (union value *v, int width) { if (width != -1) { if (width == 0) v->f = SYSMIS; else memset (value_str_rw (v, width), ' ', width); } } /* Compares A and B, which both have the given WIDTH, and returns a strcmp()-type result. */ int value_compare_3way (const union value *a, const union value *b, int width) { return (width == -1 ? 0 : width == 0 ? (a->f < b->f ? -1 : a->f > b->f) : memcmp (value_str (a, width), value_str (b, width), width)); } /* Returns true if A and B, which must both have the given WIDTH, have equal contents, false if their contents differ. */ bool value_equal (const union value *a, const union value *b, int width) { return (width == -1 ? true : width == 0 ? a->f == b->f : !memcmp (value_str (a, width), value_str (b, width), width)); } /* Returns a hash of the data in VALUE, which must have the given WIDTH, folding BASIS into the hash value calculation. */ unsigned int value_hash (const union value *value, int width, unsigned int basis) { return (width == -1 ? basis : width == 0 ? hash_double (value->f, basis) : hash_bytes (value_str (value, width), width, basis)); } /* Tests whether VALUE may be resized from OLD_WIDTH to NEW_WIDTH, using the following rules that match those for resizing missing values and value labels. First, OLD_WIDTH and NEW_WIDTH must be both numeric or both string. Second, if NEW_WIDTH is less than OLD_WIDTH, then the bytes that would be trimmed off the right end of VALUE must be all spaces. */ bool value_is_resizable (const union value *value, int old_width, int new_width) { if (old_width == new_width) return true; else if (val_type_from_width (old_width) != val_type_from_width (new_width)) return false; else { const uint8_t *str = value_str (value, old_width); int i; for (i = new_width; i < old_width; i++) if (str[i] != ' ') return false; return true; } } /* Resizes VALUE from OLD_WIDTH to NEW_WIDTH. The arguments must satisfy the rules specified above for value_is_resizable. */ void value_resize (union value *value, int old_width, int new_width) { assert (value_is_resizable (value, old_width, new_width)); if (new_width != old_width) { union value tmp; value_init (&tmp, new_width); value_copy_rpad (&tmp, new_width, value, old_width, ' '); value_destroy (value, old_width); *value = tmp; } } /* Returns true if VALUE, with the given WIDTH, is all spaces, false otherwise. Returns false if VALUE is numeric. */ bool value_is_spaces (const union value *value, int width) { const uint8_t *s = value_str (value, width); int i; for (i = 0; i < width; i++) if (s[i] != ' ') return false; return true; } /* Returns true if resizing a value from OLD_WIDTH to NEW_WIDTH actually changes anything, false otherwise. If false is returned, calls to value_resize() with the specified parameters may be omitted without any ill effects. This is generally useful only if many values can skip being resized from OLD_WIDTH to NEW_WIDTH. Otherwise you might as well just call value_resize directly. */ bool value_needs_resize (int old_width, int new_width) { assert (val_type_from_width (old_width) == val_type_from_width (new_width)); /* We need to call value_resize if either the new width is longer than the old width (in which case the new characters must be set to spaces) or if either width is a long string. (We could omit resizing if both the old and new widths were long and the new width was shorter, but we choose to do so anyway in hopes of saving memory.) */ return (old_width != new_width && (new_width > old_width || old_width > MAX_SHORT_STRING || new_width > MAX_SHORT_STRING)); } /* Same as value_init, except that memory for VALUE (if necessary) is allocated from POOL and will be freed automatically when POOL is destroyed. VALUE must not be freed manually by calling value_destroy. If it needs to be resized, it must be done using value_resize_pool instead of value_resize. */ void value_init_pool (struct pool *pool, union value *value, int width) { if (width > MAX_SHORT_STRING) value->long_string = pool_alloc_unaligned (pool, width); } /* Same as value_clone(), except that memory for VALUE (if necessary) is allocated from POOL and will be freed automatically when POOL is destroyed. VALUE must not be freed manually by calling value_destroy(). If it needs to be resized, it must be done using value_resize_pool() instead of value_resize(). */ void value_clone_pool (struct pool *pool, union value *value, const union value *src, int width) { if (width > MAX_SHORT_STRING) value->long_string = pool_clone_unaligned (pool, src->long_string, width); else *value = *src; } /* Same as value_resize, except that VALUE must have been allocated from POOL using value_init_pool. This function causes some memory in POOL to be wasted in some cases (until the pool is freed), so it should only be done if this is acceptable. */ void value_resize_pool (struct pool *pool, union value *value, int old_width, int new_width) { assert (value_is_resizable (value, old_width, new_width)); if (new_width > old_width) { if (new_width > MAX_SHORT_STRING) { uint8_t *new_long_string = pool_alloc_unaligned (pool, new_width); memcpy (new_long_string, value_str (value, old_width), old_width); value->long_string = new_long_string; } memset (value_str_rw (value, new_width) + old_width, ' ', new_width - old_width); } } pspp-1.0.1/src/data/format.def0000644000175000017500000000527212470242646013101 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Basic numeric formats. */ FMT (F, number, 1, 1, 5, FMT_CAT_BASIC) FMT (COMMA, number, 1, 1, 3, FMT_CAT_BASIC) FMT (DOT, number, 1, 1, 32, FMT_CAT_BASIC) FMT (DOLLAR, number, 1, 2, 4, FMT_CAT_BASIC) FMT (PCT, number, 1, 2, 31, FMT_CAT_BASIC) FMT (E, number, 1, 6, 17, FMT_CAT_BASIC) /* Custom currency formats. */ FMT (CCA, number, -1, 2, 33, FMT_CAT_CUSTOM) FMT (CCB, number, -1, 2, 34, FMT_CAT_CUSTOM) FMT (CCC, number, -1, 2, 35, FMT_CAT_CUSTOM) FMT (CCD, number, -1, 2, 36, FMT_CAT_CUSTOM) FMT (CCE, number, -1, 2, 37, FMT_CAT_CUSTOM) /* Legacy numeric formats. */ FMT (N, N, 1, 1, 16, FMT_CAT_LEGACY) FMT (Z, Z, 1, 1, 15, FMT_CAT_LEGACY) /* Binary and hexadecimal formats. */ FMT (P, P, 1, 1, 8, FMT_CAT_BINARY) FMT (PK, PK, 1, 1, 10, FMT_CAT_BINARY) FMT (IB, IB, 1, 1, 6, FMT_CAT_BINARY) FMT (PIB, PIB, 1, 1, 9, FMT_CAT_BINARY) FMT (PIBHEX, PIBHEX, 2, 2, 7, FMT_CAT_HEXADECIMAL) FMT (RB, RB, 2, 2, 11, FMT_CAT_BINARY) FMT (RBHEX, RBHEX, 4, 4, 12, FMT_CAT_HEXADECIMAL) /* Time and date formats. */ FMT (DATE, date, 8, 9, 20, FMT_CAT_DATE) FMT (ADATE, date, 8, 8, 23, FMT_CAT_DATE) FMT (EDATE, date, 8, 8, 38, FMT_CAT_DATE) FMT (JDATE, date, 5, 5, 24, FMT_CAT_DATE) FMT (SDATE, date, 8, 8, 39, FMT_CAT_DATE) FMT (QYR, date, 4, 6, 29, FMT_CAT_DATE) FMT (MOYR, date, 6, 6, 28, FMT_CAT_DATE) FMT (WKYR, date, 6, 8, 30, FMT_CAT_DATE) FMT (DATETIME, date, 17, 17, 22, FMT_CAT_DATE) FMT (TIME, date, 5, 5, 21, FMT_CAT_TIME) FMT (DTIME, date, 8, 8, 25, FMT_CAT_TIME) /* Date component formats. */ FMT (WKDAY, WKDAY, 2, 2, 26, FMT_CAT_DATE_COMPONENT) FMT (MONTH, MONTH, 3, 3, 27, FMT_CAT_DATE_COMPONENT) /* String formats. */ FMT (A, A, 1, 1, 1, FMT_CAT_STRING) FMT (AHEX, AHEX, 2, 2, 2, FMT_CAT_STRING) #undef FMT pspp-1.0.1/src/data/format.h0000644000175000017500000001630412523704223012561 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_FORMAT_H #define DATA_FORMAT_H 1 /* Display format types. */ #include #include "data/val-type.h" #include "libpspp/str.h" /* How a format is going to be used. */ enum fmt_use { FMT_FOR_INPUT, /* For parsing data input, e.g. data_in(). */ FMT_FOR_OUTPUT /* For formatting data output, e.g. data_out(). */ }; /* Format type categories. Each format is in exactly one category. We give categories bitwise disjoint values only to enable bitwise comparisons against a mask of FMT_CAT_* values, not to allow multiple categories per format. */ enum fmt_category { /* Numeric formats. */ FMT_CAT_BASIC = 0x001, /* Basic numeric formats. */ FMT_CAT_CUSTOM = 0x002, /* Custom currency formats. */ FMT_CAT_LEGACY = 0x004, /* Legacy numeric formats. */ FMT_CAT_BINARY = 0x008, /* Binary formats. */ FMT_CAT_HEXADECIMAL = 0x010, /* Hexadecimal formats. */ FMT_CAT_DATE = 0x020, /* Date formats. */ FMT_CAT_TIME = 0x040, /* Time formats. */ FMT_CAT_DATE_COMPONENT = 0x080, /* Date component formats. */ /* String formats. */ FMT_CAT_STRING = 0x100 /* String formats. */ }; /* Format type. */ enum fmt_type { #define FMT(NAME, METHOD, IMIN, OMIN, IO, CATEGORY) FMT_##NAME, #include "format.def" FMT_NUMBER_OF_FORMATS, }; /* Length of longest format specifier name, not including terminating null. */ #define FMT_TYPE_LEN_MAX 8 /* Length of longest string representation of fmt_spec, not including terminating null. */ #define FMT_STRING_LEN_MAX 32 /* Display format. */ struct fmt_spec { enum fmt_type type; /* One of FMT_*. */ int w; /* Width. */ int d; /* Number of decimal places. */ }; /* Maximum width of any numeric format. */ #define FMT_MAX_NUMERIC_WIDTH 40 /* Constructing formats. */ struct fmt_spec fmt_for_input (enum fmt_type, int w, int d) PURE_FUNCTION; struct fmt_spec fmt_for_output (enum fmt_type, int w, int d) PURE_FUNCTION; struct fmt_spec fmt_for_output_from_input (const struct fmt_spec *); struct fmt_spec fmt_default_for_width (int width); /* Verifying formats. */ bool fmt_check (const struct fmt_spec *, enum fmt_use); bool fmt_check_input (const struct fmt_spec *); bool fmt_check_output (const struct fmt_spec *); bool fmt_check_type_compat (const struct fmt_spec *, enum val_type); bool fmt_check_width_compat (const struct fmt_spec *, int var_width); /* Working with formats. */ int fmt_var_width (const struct fmt_spec *); char *fmt_to_string (const struct fmt_spec *, char s[FMT_STRING_LEN_MAX + 1]); bool fmt_equal (const struct fmt_spec *, const struct fmt_spec *); bool fmt_resize (struct fmt_spec *, int new_width); void fmt_fix (struct fmt_spec *, enum fmt_use); void fmt_fix_input (struct fmt_spec *); void fmt_fix_output (struct fmt_spec *); void fmt_change_width (struct fmt_spec *, int width, enum fmt_use); void fmt_change_decimals (struct fmt_spec *, int decimals, enum fmt_use); /* Format types. */ bool is_fmt_type (enum fmt_type); const char *fmt_name (enum fmt_type) PURE_FUNCTION; bool fmt_from_name (const char *name, enum fmt_type *); bool fmt_takes_decimals (enum fmt_type) PURE_FUNCTION; int fmt_min_width (enum fmt_type, enum fmt_use) PURE_FUNCTION; int fmt_max_width (enum fmt_type, enum fmt_use) PURE_FUNCTION; int fmt_max_decimals (enum fmt_type, int width, enum fmt_use) PURE_FUNCTION; int fmt_min_input_width (enum fmt_type) PURE_FUNCTION; int fmt_max_input_width (enum fmt_type) PURE_FUNCTION; int fmt_max_input_decimals (enum fmt_type, int width) PURE_FUNCTION; int fmt_min_output_width (enum fmt_type) PURE_FUNCTION; int fmt_max_output_width (enum fmt_type) PURE_FUNCTION; int fmt_max_output_decimals (enum fmt_type, int width) PURE_FUNCTION; int fmt_step_width (enum fmt_type) PURE_FUNCTION; bool fmt_is_string (enum fmt_type) PURE_FUNCTION; bool fmt_is_numeric (enum fmt_type) PURE_FUNCTION; enum fmt_category fmt_get_category (enum fmt_type) PURE_FUNCTION; enum fmt_type fmt_input_to_output (enum fmt_type) PURE_FUNCTION; bool fmt_usable_for_input (enum fmt_type) PURE_FUNCTION; int fmt_to_io (enum fmt_type) PURE_FUNCTION; bool fmt_from_io (int io, enum fmt_type *); const char *fmt_date_template (enum fmt_type, int width) PURE_FUNCTION; const char *fmt_gui_name (enum fmt_type); /* Format settings. A fmt_settings is really just a collection of one "struct fmt_number_style" for each format type. */ struct fmt_settings *fmt_settings_create (void); void fmt_settings_destroy (struct fmt_settings *); struct fmt_settings *fmt_settings_clone (const struct fmt_settings *); void fmt_settings_set_decimal (struct fmt_settings *, char); const struct fmt_number_style *fmt_settings_get_style ( const struct fmt_settings *, enum fmt_type); void fmt_settings_set_style (struct fmt_settings *, enum fmt_type, char decimal, char grouping, const char *neg_prefix, const char *prefix, const char *suffix, const char *neg_suffix); /* A prefix or suffix for a numeric output format. */ struct fmt_affix { char *s; /* String contents of affix, in UTF-8. */ int width; /* Display width in columns (see wcwidth()). */ }; /* A numeric output style. */ struct fmt_number_style { struct fmt_affix neg_prefix; /* Negative prefix. */ struct fmt_affix prefix; /* Prefix. */ struct fmt_affix suffix; /* Suffix. */ struct fmt_affix neg_suffix; /* Negative suffix. */ char decimal; /* Decimal point: '.' or ','. */ char grouping; /* Grouping character: ',', '.', or 0. */ /* A fmt_affix may require more bytes than its display width; for example, U+00A5 (¥) is 3 bytes in UTF-8 but occupies only one display column. This member is the sum of the number of bytes required by all of the fmt_affix members in this struct, minus their display widths. Thus, it can be used to size memory allocations: for example, the formatted result of CCA20.5 requires no more than (20 + extra_bytes) bytes in UTF-8. */ int extra_bytes; }; int fmt_affix_width (const struct fmt_number_style *); int fmt_neg_affix_width (const struct fmt_number_style *); extern const struct fmt_spec F_8_0 ; extern const struct fmt_spec F_8_2 ; extern const struct fmt_spec F_4_3 ; extern const struct fmt_spec F_5_1 ; #endif /* data/format.h */ pspp-1.0.1/src/data/any-reader.c0000644000175000017500000001556012642117700013316 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010, 2011, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/any-reader.h" #include #include #include #include #include #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/file-name.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) static const struct any_reader_class dataset_reader_class; static const struct any_reader_class *classes[] = { &sys_file_reader_class, &por_file_reader_class, &pcp_file_reader_class, }; enum { N_CLASSES = sizeof classes / sizeof *classes }; int any_reader_detect (const struct file_handle *file_handle, const struct any_reader_class **classp) { struct detector { enum any_type type; int (*detect) (FILE *); }; FILE *file; int retval; if (classp) *classp = NULL; file = fn_open (file_handle, "rb"); if (file == NULL) { msg (ME, _("An error occurred while opening `%s': %s."), fh_get_file_name (file_handle), strerror (errno)); return -errno; } retval = 0; for (int i = 0; i < N_CLASSES; i++) { int rc = classes[i]->detect (file); if (rc == 1) { retval = 1; if (classp) *classp = classes[i]; break; } else if (rc < 0) retval = rc; } if (retval < 0) msg (ME, _("Error reading `%s': %s."), fh_get_file_name (file_handle), strerror (-retval)); fn_close (file_handle, file); return retval; } struct any_reader * any_reader_open (struct file_handle *handle) { switch (fh_get_referent (handle)) { case FH_REF_FILE: { const struct any_reader_class *class; int retval; retval = any_reader_detect (handle, &class); if (retval <= 0) { if (retval == 0) msg (SE, _("`%s' is not a system or portable file."), fh_get_file_name (handle)); return NULL; } return class->open (handle); } case FH_REF_INLINE: msg (SE, _("The inline file is not allowed here.")); return NULL; case FH_REF_DATASET: return dataset_reader_class.open (handle); } NOT_REACHED (); } bool any_reader_close (struct any_reader *any_reader) { return any_reader ? any_reader->klass->close (any_reader) : true; } struct casereader * any_reader_decode (struct any_reader *any_reader, const char *encoding, struct dictionary **dictp, struct any_read_info *info) { const struct any_reader_class *class = any_reader->klass; struct casereader *reader; reader = any_reader->klass->decode (any_reader, encoding, dictp, info); if (reader && info) info->klass = class; return reader; } size_t any_reader_get_strings (const struct any_reader *any_reader, struct pool *pool, char ***labels, bool **ids, char ***values) { return (any_reader->klass->get_strings ? any_reader->klass->get_strings (any_reader, pool, labels, ids, values) : 0); } struct casereader * any_reader_open_and_decode (struct file_handle *handle, const char *encoding, struct dictionary **dictp, struct any_read_info *info) { struct any_reader *any_reader = any_reader_open (handle); return (any_reader ? any_reader_decode (any_reader, encoding, dictp, info) : NULL); } struct dataset_reader { struct any_reader any_reader; struct dictionary *dict; struct casereader *reader; }; /* Opens FH, which must have referent type FH_REF_DATASET, and returns a dataset_reader for it, or a null pointer on failure. Stores a copy of the dictionary for the dataset file into *DICT. The caller takes ownership of the casereader and the dictionary. */ static struct any_reader * dataset_reader_open (struct file_handle *fh) { struct dataset_reader *reader; struct dataset *ds; /* We don't bother doing fh_lock or fh_ref on the file handle, as there's no advantage in this case, and doing these would require us to keep track of the "struct file_handle" and "struct fh_lock" and undo our work later. */ assert (fh_get_referent (fh) == FH_REF_DATASET); ds = fh_get_dataset (fh); if (ds == NULL || !dataset_has_source (ds)) { msg (SE, _("Cannot read from dataset %s because no dictionary or data " "has been written to it yet."), fh_get_name (fh)); return NULL; } reader = xmalloc (sizeof *reader); reader->any_reader.klass = &dataset_reader_class; reader->dict = dict_clone (dataset_dict (ds)); reader->reader = casereader_clone (dataset_source (ds)); return &reader->any_reader; } static struct dataset_reader * dataset_reader_cast (const struct any_reader *r_) { assert (r_->klass == &dataset_reader_class); return UP_CAST (r_, struct dataset_reader, any_reader); } static bool dataset_reader_close (struct any_reader *r_) { struct dataset_reader *r = dataset_reader_cast (r_); dict_destroy (r->dict); casereader_destroy (r->reader); free (r); return true; } static struct casereader * dataset_reader_decode (struct any_reader *r_, const char *encoding UNUSED, struct dictionary **dictp, struct any_read_info *info) { struct dataset_reader *r = dataset_reader_cast (r_); struct casereader *reader; *dictp = r->dict; reader = r->reader; if (info) { memset (info, 0, sizeof *info); info->integer_format = INTEGER_NATIVE; info->float_format = FLOAT_NATIVE_DOUBLE; info->compression = ANY_COMP_NONE; info->case_cnt = casereader_get_case_cnt (reader); } free (r); return reader; } static const struct any_reader_class dataset_reader_class = { N_("Dataset"), NULL, dataset_reader_open, dataset_reader_close, dataset_reader_decode, NULL, }; pspp-1.0.1/src/data/automake.mk0000644000175000017500000000756013137223525013266 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # noinst_LTLIBRARIES += src/data/libdata.la src_data_libdata_la_CPPFLAGS = $(LIBXML2_CFLAGS) $(PG_CFLAGS) $(AM_CPPFLAGS) src_data_libdata_la_LIBADD = $(LIBXML2_LIBS) $(PG_LIBS) src_data_libdata_la_SOURCES = \ src/data/any-reader.c \ src/data/any-reader.h \ src/data/any-writer.c \ src/data/any-writer.h \ src/data/attributes.c \ src/data/attributes.h \ src/data/calendar.c \ src/data/calendar.h \ src/data/case-map.c \ src/data/case-map.h \ src/data/case-matcher.c \ src/data/case-matcher.h \ src/data/caseproto.c \ src/data/caseproto.h \ src/data/case.c \ src/data/casegrouper.c \ src/data/casegrouper.h \ src/data/caseinit.c \ src/data/caseinit.h \ src/data/casereader-filter.c \ src/data/casereader-project.c \ src/data/casereader-provider.h \ src/data/casereader-select.c \ src/data/casereader-shim.c \ src/data/casereader-shim.h \ src/data/casereader-translator.c \ src/data/casereader.c \ src/data/casereader.h \ src/data/casewindow.c \ src/data/casewindow.h \ src/data/casewriter-provider.h \ src/data/casewriter-translator.c \ src/data/casewriter.c \ src/data/casewriter.h \ src/data/case.h \ src/data/case-tmpfile.c \ src/data/case-tmpfile.h \ src/data/csv-file-writer.c \ src/data/csv-file-writer.h \ src/data/data-in.c \ src/data/data-in.h \ src/data/data-out.c \ src/data/data-out.h \ src/data/dataset.c \ src/data/dataset.h \ src/data/dataset-writer.c \ src/data/dataset-writer.h \ src/data/datasheet.c \ src/data/datasheet.h \ src/data/dict-class.c \ src/data/dict-class.h \ src/data/dictionary.c \ src/data/dictionary.h \ src/data/encrypted-file.c \ src/data/encrypted-file.h \ src/data/file-handle-def.c \ src/data/file-handle-def.h \ src/data/file-name.c \ src/data/file-name.h \ src/data/format-guesser.c \ src/data/format-guesser.h \ src/data/format.c \ src/data/format.h \ src/data/format.def \ src/data/gnumeric-reader.c \ src/data/gnumeric-reader.h \ src/data/identifier.c \ src/data/identifier2.c \ src/data/identifier.h \ src/data/lazy-casereader.c \ src/data/lazy-casereader.h \ src/data/missing-values.c \ src/data/missing-values.h \ src/data/make-file.c \ src/data/make-file.h \ src/data/mrset.c \ src/data/mrset.h \ src/data/ods-reader.c \ src/data/ods-reader.h \ src/data/pc+-file-reader.c \ src/data/por-file-reader.c \ src/data/por-file-writer.c \ src/data/por-file-writer.h \ src/data/psql-reader.c \ src/data/psql-reader.h \ src/data/session.c \ src/data/session.h \ src/data/settings.c \ src/data/settings.h \ src/data/short-names.c \ src/data/short-names.h \ src/data/spreadsheet-reader.c \ src/data/spreadsheet-reader.h \ src/data/subcase.c \ src/data/subcase.h \ src/data/sys-file-encoding.c \ src/data/sys-file-private.c \ src/data/sys-file-private.h \ src/data/sys-file-reader.c \ src/data/sys-file-writer.c \ src/data/sys-file-writer.h \ src/data/transformations.c \ src/data/transformations.h \ src/data/val-type.h \ src/data/value.c \ src/data/value.h \ src/data/value-labels.c \ src/data/value-labels.h \ src/data/vardict.h \ src/data/variable.h \ src/data/variable.c \ src/data/vector.c \ src/data/vector.h EXTRA_DIST += src/data/sys-file-encoding.pl pspp-1.0.1/src/data/session.h0000644000175000017500000000372412470434665012771 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SESSION_H #define SESSION_H 1 #include struct dataset; struct session *session_create (struct session *parent); void session_destroy (struct session *); struct dataset *session_active_dataset (struct session *); void session_set_active_dataset (struct session *, struct dataset *); void session_add_dataset (struct session *, struct dataset *); void session_remove_dataset (struct session *, struct dataset *); struct dataset *session_lookup_dataset (const struct session *, const char *); struct dataset *session_lookup_dataset_assert (const struct session *, const char *); void session_set_default_syntax_encoding (struct session *, const char *); const char *session_get_default_syntax_encoding (const struct session *); size_t session_n_datasets (const struct session *); void session_for_each_dataset (const struct session *, void (*cb) (struct dataset *, void *aux), void *aux); struct dataset *session_get_dataset_by_seqno (const struct session *, unsigned int seqno); char *session_generate_dataset_name (struct session *); #endif /* session.h */ pspp-1.0.1/src/data/csv-file-writer.c0000644000175000017500000003053712642117700014312 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/csv-file-writer.h" #include #include #include #include #include #include #include #include "data/calendar.h" #include "data/case.h" #include "data/casewriter-provider.h" #include "data/casewriter.h" #include "data/data-out.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/format.h" #include "data/make-file.h" #include "data/missing-values.h" #include "data/settings.h" #include "data/value-labels.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/ftoastr.h" #include "gl/minmax.h" #include "gl/unlocked-io.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) /* A variable in a CSV file. */ struct csv_var { int width; /* Variable width (0 to 32767). */ int case_index; /* Index into case. */ struct fmt_spec format; /* Print format. */ struct missing_values missing; /* User-missing values, if recoding. */ struct val_labs *val_labs; /* Value labels, if any and they are in use. */ }; /* Comma-separated value (CSV) file writer. */ struct csv_writer { struct file_handle *fh; /* File handle. */ struct fh_lock *lock; /* Mutual exclusion for file. */ FILE *file; /* File stream. */ struct replace_file *rf; /* Ticket for replacing output file. */ struct csv_writer_options opts; char *encoding; /* Encoding used by variables. */ /* Variables. */ struct csv_var *csv_vars; /* Variables. */ size_t n_csv_vars; /* Number of variables. */ }; static const struct casewriter_class csv_file_casewriter_class; static void write_var_names (struct csv_writer *, const struct dictionary *); static bool write_error (const struct csv_writer *); static bool close_writer (struct csv_writer *); /* Initializes OPTS with default options for writing a CSV file. */ void csv_writer_options_init (struct csv_writer_options *opts) { opts->recode_user_missing = false; opts->include_var_names = false; opts->use_value_labels = false; opts->use_print_formats = false; opts->decimal = settings_get_decimal_char (FMT_F); opts->delimiter = ','; opts->qualifier = '"'; } /* Opens the CSV file designated by file handle FH for writing cases from dictionary DICT according to the given OPTS. No reference to D is retained, so it may be modified or destroyed at will after this function returns. */ struct casewriter * csv_writer_open (struct file_handle *fh, const struct dictionary *dict, const struct csv_writer_options *opts) { struct csv_writer *w; int i; /* Create and initialize writer. */ w = xmalloc (sizeof *w); w->fh = fh_ref (fh); w->lock = NULL; w->file = NULL; w->rf = NULL; w->opts = *opts; w->encoding = xstrdup (dict_get_encoding (dict)); w->n_csv_vars = dict_get_var_cnt (dict); w->csv_vars = xnmalloc (w->n_csv_vars, sizeof *w->csv_vars); for (i = 0; i < w->n_csv_vars; i++) { const struct variable *var = dict_get_var (dict, i); struct csv_var *cv = &w->csv_vars[i]; cv->width = var_get_width (var); cv->case_index = var_get_case_index (var); cv->format = *var_get_print_format (var); if (opts->recode_user_missing) mv_copy (&cv->missing, var_get_missing_values (var)); else mv_init (&cv->missing, cv->width); if (opts->use_value_labels) cv->val_labs = val_labs_clone (var_get_value_labels (var)); else cv->val_labs = NULL; } /* Open file handle as an exclusive writer. */ /* TRANSLATORS: this fragment will be interpolated into messages in fh_lock() that identify types of files. */ w->lock = fh_lock (fh, FH_REF_FILE, N_("CSV file"), FH_ACC_WRITE, true); if (w->lock == NULL) goto error; /* Create the file on disk. */ w->rf = replace_file_start (fh, "w", 0666, &w->file); if (w->rf == NULL) { msg (ME, _("Error opening `%s' for writing as a system file: %s."), fh_get_file_name (fh), strerror (errno)); goto error; } if (opts->include_var_names) write_var_names (w, dict); if (write_error (w)) goto error; return casewriter_create (dict_get_proto (dict), &csv_file_casewriter_class, w); error: close_writer (w); return NULL; } static bool csv_field_needs_quoting (struct csv_writer *w, const char *s, size_t len) { const char *p; for (p = s; p < &s[len]; p++) if (*p == w->opts.qualifier || *p == w->opts.delimiter || *p == '\n' || *p == '\r') return true; return false; } static void csv_output_buffer (struct csv_writer *w, const char *s, size_t len) { if (csv_field_needs_quoting (w, s, len)) { const char *p; putc (w->opts.qualifier, w->file); for (p = s; p < &s[len]; p++) { /* We are writing the output file in text mode, so transform any explicit CR-LF line breaks into LF only, to allow the C library to use correct system-specific new-lines. */ if (*p == '\r' && p[1] == '\n') continue; if (*p == w->opts.qualifier) putc (w->opts.qualifier, w->file); putc (*p, w->file); } putc (w->opts.qualifier, w->file); } else fwrite (s, 1, len, w->file); } static void csv_output_string (struct csv_writer *w, const char *s) { csv_output_buffer (w, s, strlen (s)); } static void write_var_names (struct csv_writer *w, const struct dictionary *d) { size_t i; for (i = 0; i < w->n_csv_vars; i++) { if (i > 0) putc (w->opts.delimiter, w->file); csv_output_string (w, var_get_name (dict_get_var (d, i))); } putc ('\n', w->file); } static void csv_output_format (struct csv_writer *w, const struct csv_var *cv, const union value *value) { char *s = data_out (value, w->encoding, &cv->format); struct substring ss = ss_cstr (s); if (cv->format.type != FMT_A) ss_trim (&ss, ss_cstr (" ")); else ss_rtrim (&ss, ss_cstr (" ")); csv_output_buffer (w, ss.string, ss.length); free (s); } static double extract_date (double number, int *y, int *m, int *d) { int yd; calendar_offset_to_gregorian (number / 60. / 60. / 24., y, m, d, &yd); return fmod (number, 60. * 60. * 24.); } static void extract_time (double number, double *H, int *M, int *S) { *H = floor (number / 60. / 60.); number = fmod (number, 60. * 60.); *M = floor (number / 60.); number = fmod (number, 60.); *S = floor (number); } static void csv_write_var__ (struct csv_writer *w, const struct csv_var *cv, const union value *value) { const char *label; label = val_labs_find (cv->val_labs, value); if (label != NULL) csv_output_string (w, label); else if (cv->width == 0 && value->f == SYSMIS) csv_output_buffer (w, " ", 1); else if (w->opts.use_print_formats) csv_output_format (w, cv, value); else { char s[MAX (DBL_STRLEN_BOUND, 128)]; char *cp; switch (cv->format.type) { case FMT_F: case FMT_COMMA: case FMT_DOT: case FMT_DOLLAR: case FMT_PCT: case FMT_E: case FMT_CCA: case FMT_CCB: case FMT_CCC: case FMT_CCD: case FMT_CCE: case FMT_N: case FMT_Z: case FMT_P: case FMT_PK: case FMT_IB: case FMT_PIB: case FMT_PIBHEX: case FMT_RB: case FMT_RBHEX: case FMT_WKDAY: case FMT_MONTH: dtoastr (s, sizeof s, 0, 0, value->f); cp = strpbrk (s, ".,"); if (cp != NULL) *cp = w->opts.decimal; break; case FMT_DATE: case FMT_ADATE: case FMT_EDATE: case FMT_JDATE: case FMT_SDATE: case FMT_QYR: case FMT_MOYR: case FMT_WKYR: if (value->f < 0) strcpy (s, " "); else { int y, m, d; extract_date (value->f, &y, &m, &d); snprintf (s, sizeof s, "%02d/%02d/%04d", m, d, y); } break; case FMT_DATETIME: if (value->f < 0) strcpy (s, " "); else { int y, m, d, M, S; double H; extract_time (extract_date (value->f, &y, &m, &d), &H, &M, &S); snprintf (s, sizeof s, "%02d/%02d/%04d %02.0f:%02d:%02d", m, d, y, H, M, S); } break; case FMT_TIME: case FMT_DTIME: { double H; int M, S; extract_time (fabs (value->f), &H, &M, &S); snprintf (s, sizeof s, "%s%02.0f:%02d:%02d", value->f < 0 ? "-" : "", H, M, S); } break; case FMT_A: case FMT_AHEX: csv_output_format (w, cv, value); return; case FMT_NUMBER_OF_FORMATS: NOT_REACHED (); } csv_output_string (w, s); } } static void csv_write_var (struct csv_writer *w, const struct csv_var *cv, const union value *value) { if (mv_is_value_missing (&cv->missing, value, MV_USER)) { union value missing; value_init (&missing, cv->width); value_set_missing (&missing, cv->width); csv_write_var__ (w, cv, &missing); value_destroy (&missing, cv->width); } else csv_write_var__ (w, cv, value); } static void csv_write_case (struct csv_writer *w, const struct ccase *c) { size_t i; for (i = 0; i < w->n_csv_vars; i++) { const struct csv_var *cv = &w->csv_vars[i]; if (i > 0) putc (w->opts.delimiter, w->file); csv_write_var (w, cv, case_data_idx (c, cv->case_index)); } putc ('\n', w->file); } /* Writes case C to CSV file W. */ static void csv_file_casewriter_write (struct casewriter *writer, void *w_, struct ccase *c) { struct csv_writer *w = w_; if (ferror (w->file)) { casewriter_force_error (writer); case_unref (c); return; } csv_write_case (w, c); case_unref (c); } /* Destroys CSV file writer W. */ static void csv_file_casewriter_destroy (struct casewriter *writer, void *w_) { struct csv_writer *w = w_; if (!close_writer (w)) casewriter_force_error (writer); } /* Returns true if an I/O error has occurred on WRITER, false otherwise. */ bool write_error (const struct csv_writer *writer) { return ferror (writer->file); } /* Closes a CSV file after we're done with it. Returns true if successful, false if an I/O error occurred. */ bool close_writer (struct csv_writer *w) { size_t i; bool ok; if (w == NULL) return true; ok = true; if (w->file != NULL) { if (write_error (w)) ok = false; if (fclose (w->file) == EOF) ok = false; if (!ok) msg (ME, _("An I/O error occurred writing CSV file `%s'."), fh_get_file_name (w->fh)); if (ok ? !replace_file_commit (w->rf) : !replace_file_abort (w->rf)) ok = false; } fh_unlock (w->lock); fh_unref (w->fh); free (w->encoding); for (i = 0; i < w->n_csv_vars; i++) { struct csv_var *cv = &w->csv_vars[i]; mv_destroy (&cv->missing); val_labs_destroy (cv->val_labs); } free (w->csv_vars); free (w); return ok; } /* CSV file writer casewriter class. */ static const struct casewriter_class csv_file_casewriter_class = { csv_file_casewriter_write, csv_file_casewriter_destroy, NULL, }; pspp-1.0.1/src/data/subcase.h0000644000175000017500000001210612470434665012725 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_SUBCASE_H #define DATA_SUBCASE_H 1 #include #include struct ccase; union value; struct variable; /* Sort order. */ enum subcase_direction { SC_ASCEND, /* A, B, C, ..., X, Y, Z. */ SC_DESCEND /* Z, Y, X, ..., C, B, A. */ }; /* A value within a case. */ struct subcase_field { size_t case_index; /* Starting position in the case. */ int width; /* 0=numeric, otherwise string width. */ enum subcase_direction direction; /* Sort order. */ }; /* A subcase specifies how to draw values from a case. */ struct subcase { struct subcase_field *fields; size_t n_fields; struct caseproto *proto; /* Created lazily. */ }; void subcase_init_empty (struct subcase *); void subcase_init_vars (struct subcase *, const struct variable *const *, size_t n_vars); void subcase_init_var (struct subcase *, const struct variable *, enum subcase_direction); void subcase_init (struct subcase *, int index, int width, enum subcase_direction); void subcase_clone (struct subcase *, const struct subcase *); void subcase_clear (struct subcase *); void subcase_destroy (struct subcase *); bool subcase_contains (const struct subcase *, int case_index); bool subcase_contains_var (const struct subcase *, const struct variable *); bool subcase_add (struct subcase *, int case_index, int width, enum subcase_direction direction); bool subcase_add_var (struct subcase *, const struct variable *, enum subcase_direction); void subcase_add_always (struct subcase *sc, int case_index, int width, enum subcase_direction direction); void subcase_add_var_always (struct subcase *, const struct variable *, enum subcase_direction); void subcase_add_vars_always (struct subcase *, const struct variable *const *, size_t n_vars); void subcase_add_proto_always (struct subcase *, const struct caseproto *); const struct caseproto *subcase_get_proto (const struct subcase *); static inline bool subcase_is_empty (const struct subcase *); static inline size_t subcase_get_n_fields (const struct subcase *); static inline size_t subcase_get_case_index (const struct subcase *, size_t idx); static inline enum subcase_direction subcase_get_direction ( const struct subcase *, size_t idx); bool subcase_conformable (const struct subcase *, const struct subcase *); void subcase_extract (const struct subcase *, const struct ccase *, union value *values); void subcase_inject (const struct subcase *, const union value *values, struct ccase *); void subcase_copy (const struct subcase *src_sc, const struct ccase *src, const struct subcase *dst_sc, struct ccase *dst); int subcase_compare_3way (const struct subcase *a_sc, const struct ccase *a, const struct subcase *b_sc, const struct ccase *b); int subcase_compare_3way_xc (const struct subcase *, const union value *a, const struct ccase *b); int subcase_compare_3way_cx (const struct subcase *, const struct ccase *a, const union value *b); int subcase_compare_3way_xx (const struct subcase *, const union value *a, const union value *b); bool subcase_equal (const struct subcase *a_sc, const struct ccase *a, const struct subcase *b_sc, const struct ccase *b); bool subcase_equal_xc (const struct subcase *, const union value *a, const struct ccase *b); bool subcase_equal_cx (const struct subcase *, const struct ccase *a, const union value *b); bool subcase_equal_xx (const struct subcase *, const union value *a, const union value *b); static inline size_t subcase_get_case_index (const struct subcase *sc, size_t idx) { return sc->fields[idx].case_index; } static inline enum subcase_direction subcase_get_direction (const struct subcase *sc, size_t idx) { return sc->fields[idx].direction; } static inline bool subcase_is_empty (const struct subcase *sc) { return sc->n_fields == 0; } static inline size_t subcase_get_n_fields (const struct subcase *sc) { return sc->n_fields; } #endif /* data/subcase.h */ pspp-1.0.1/src/data/sys-file-writer.c0000644000175000017500000014116613137223525014341 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-2000, 2006-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/sys-file-writer.h" #include "data/sys-file-private.h" #include #include #include #include #include #include #include #include "data/attributes.h" #include "data/case.h" #include "data/casewriter-provider.h" #include "data/casewriter.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/format.h" #include "data/make-file.h" #include "data/missing-values.h" #include "data/mrset.h" #include "data/settings.h" #include "data/short-names.h" #include "data/value-labels.h" #include "data/variable.h" #include "libpspp/float-format.h" #include "libpspp/i18n.h" #include "libpspp/integer-format.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "libpspp/string-array.h" #include "libpspp/version.h" #include "gl/xmemdup0.h" #include "gl/minmax.h" #include "gl/unlocked-io.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) /* Compression bias used by PSPP. Values between (1 - COMPRESSION_BIAS) and (251 - COMPRESSION_BIAS) inclusive can be compressed. */ #define COMPRESSION_BIAS 100 /* System file writer. */ struct sfm_writer { struct file_handle *fh; /* File handle. */ struct fh_lock *lock; /* Mutual exclusion for file. */ FILE *file; /* File stream. */ struct replace_file *rf; /* Ticket for replacing output file. */ enum any_compression compression; casenumber case_cnt; /* Number of cases written so far. */ uint8_t space; /* ' ' in the file's character encoding. */ /* Simple compression buffering. Compressed data is output as a series of 8-byte elements, with 1 to 9 such elements clustered together. The first element in a cluster is 8 1-byte opcodes. Some opcodes call for an additional element in the cluster (hence, if there are eight such opcodes, then the cluster contains a full 9 elements). cbuf[] holds a cluster at a time. */ uint8_t cbuf[9][8]; int n_opcodes; /* Number of opcodes in cbuf[0] so far. */ int n_elements; /* Number of elements in cbuf[] so far. */ /* ZLIB compression. */ z_stream zstream; /* ZLIB deflater. */ off_t zstart; struct zblock *blocks; size_t n_blocks, allocated_blocks; /* Variables. */ struct sfm_var *sfm_vars; /* Variables. */ size_t sfm_var_cnt; /* Number of variables. */ size_t segment_cnt; /* Number of variables including extra segments for long string variables. */ }; struct zblock { unsigned int uncompressed_size; unsigned int compressed_size; }; static const struct casewriter_class sys_file_casewriter_class; static void write_header (struct sfm_writer *, const struct dictionary *); static void write_variable (struct sfm_writer *, const struct variable *); static void write_value_labels (struct sfm_writer *, const struct dictionary *); static void write_integer_info_record (struct sfm_writer *, const struct dictionary *); static void write_float_info_record (struct sfm_writer *); static void write_longvar_table (struct sfm_writer *w, const struct dictionary *dict); static void write_encoding_record (struct sfm_writer *w, const struct dictionary *); static void write_vls_length_table (struct sfm_writer *w, const struct dictionary *dict); static void write_long_string_value_labels (struct sfm_writer *, const struct dictionary *); static void write_long_string_missing_values (struct sfm_writer *, const struct dictionary *); static void write_mrsets (struct sfm_writer *, const struct dictionary *, bool pre_v14); static void write_variable_display_parameters (struct sfm_writer *w, const struct dictionary *dict); static void write_documents (struct sfm_writer *, const struct dictionary *); static void write_data_file_attributes (struct sfm_writer *, const struct dictionary *); static void write_variable_attributes (struct sfm_writer *, const struct dictionary *); static void write_int (struct sfm_writer *, int32_t); static void write_int64 (struct sfm_writer *, int64_t); static inline void convert_double_to_output_format (double, uint8_t[8]); static void write_float (struct sfm_writer *, double); static void write_string (struct sfm_writer *, const char *, size_t); static void write_utf8_string (struct sfm_writer *, const char *encoding, const char *string, size_t width); static void write_utf8_record (struct sfm_writer *, const char *encoding, const struct string *content, int subtype); static void write_string_record (struct sfm_writer *, const struct substring content, int subtype); static void write_bytes (struct sfm_writer *, const void *, size_t); static void write_zeros (struct sfm_writer *, size_t); static void write_spaces (struct sfm_writer *, size_t); static void write_value (struct sfm_writer *, const union value *, int width); static void write_case_uncompressed (struct sfm_writer *, const struct ccase *); static void write_case_compressed (struct sfm_writer *, const struct ccase *); static void flush_compressed (struct sfm_writer *); static void put_cmp_opcode (struct sfm_writer *, uint8_t); static void put_cmp_number (struct sfm_writer *, double); static void put_cmp_string (struct sfm_writer *, const void *, size_t); static bool start_zstream (struct sfm_writer *); static void finish_zstream (struct sfm_writer *); static void write_ztrailer (struct sfm_writer *); static bool write_error (const struct sfm_writer *); static bool close_writer (struct sfm_writer *); /* Returns default options for writing a system file. */ struct sfm_write_options sfm_writer_default_options (void) { struct sfm_write_options opts; opts.compression = (settings_get_scompression () ? ANY_COMP_SIMPLE : ANY_COMP_NONE); opts.create_writeable = true; opts.version = 3; return opts; } /* Opens the system file designated by file handle FH for writing cases from dictionary D according to the given OPTS. No reference to D is retained, so it may be modified or destroyed at will after this function returns. D is not modified by this function, except to assign short names. */ struct casewriter * sfm_open_writer (struct file_handle *fh, struct dictionary *d, struct sfm_write_options opts) { struct encoding_info encoding_info; struct sfm_writer *w; mode_t mode; int i; /* Check version. */ if (opts.version != 2 && opts.version != 3) { msg (ME, _("Unknown system file version %d. Treating as version %d."), opts.version, 3); opts.version = 3; } /* Create and initialize writer. */ w = xzalloc (sizeof *w); w->fh = fh_ref (fh); w->lock = NULL; w->file = NULL; w->rf = NULL; /* Use the requested compression, except that no EBCDIC-based ZLIB compressed files have been observed, so drop back to simple compression for those files. */ w->compression = opts.compression; if (w->compression == ANY_COMP_ZLIB && is_encoding_ebcdic_compatible (dict_get_encoding (d))) w->compression = ANY_COMP_SIMPLE; w->case_cnt = 0; w->n_opcodes = w->n_elements = 0; memset (w->cbuf[0], 0, 8); /* Figure out how to map in-memory case data to on-disk case data. Also count the number of segments. Very long strings occupy multiple segments, otherwise each variable only takes one segment. */ w->segment_cnt = sfm_dictionary_to_sfm_vars (d, &w->sfm_vars, &w->sfm_var_cnt); /* Open file handle as an exclusive writer. */ /* TRANSLATORS: this fragment will be interpolated into messages in fh_lock() that identify types of files. */ w->lock = fh_lock (fh, FH_REF_FILE, N_("system file"), FH_ACC_WRITE, true); if (w->lock == NULL) goto error; /* Create the file on disk. */ mode = 0444; if (opts.create_writeable) mode |= 0222; w->rf = replace_file_start (fh, "wb", mode, &w->file); if (w->rf == NULL) { msg (ME, _("Error opening `%s' for writing as a system file: %s."), fh_get_file_name (fh), strerror (errno)); goto error; } get_encoding_info (&encoding_info, dict_get_encoding (d)); w->space = encoding_info.space[0]; /* Write the file header. */ write_header (w, d); /* Write basic variable info. */ short_names_assign (d); for (i = 0; i < dict_get_var_cnt (d); i++) write_variable (w, dict_get_var (d, i)); write_value_labels (w, d); if (dict_get_document_line_cnt (d) > 0) write_documents (w, d); write_integer_info_record (w, d); write_float_info_record (w); write_mrsets (w, d, true); write_variable_display_parameters (w, d); if (opts.version >= 3) write_longvar_table (w, d); write_vls_length_table (w, d); write_long_string_value_labels (w, d); write_long_string_missing_values (w, d); if (opts.version >= 3) { if (attrset_count (dict_get_attributes (d))) write_data_file_attributes (w, d); write_variable_attributes (w, d); } write_mrsets (w, d, false); write_encoding_record (w, d); /* Write end-of-headers record. */ write_int (w, 999); write_int (w, 0); if (w->compression == ANY_COMP_ZLIB) { w->zstream.zalloc = Z_NULL; w->zstream.zfree = Z_NULL; w->zstream.opaque = Z_NULL; w->zstart = ftello (w->file); write_int64 (w, w->zstart); write_int64 (w, 0); write_int64 (w, 0); start_zstream (w); } if (write_error (w)) goto error; return casewriter_create (dict_get_proto (d), &sys_file_casewriter_class, w); error: close_writer (w); return NULL; } /* Returns value of X truncated to two least-significant digits. */ static int rerange (int x) { if (x < 0) x = -x; if (x >= 100) x %= 100; return x; } /* Calculates the offset of data for TARGET_VAR from the beginning of each case's data for dictionary D. The return value is in "octs" (8-byte units). */ static int calc_oct_idx (const struct dictionary *d, struct variable *target_var) { int oct_idx; int i; oct_idx = 0; for (i = 0; i < dict_get_var_cnt (d); i++) { struct variable *var = dict_get_var (d, i); if (var == target_var) break; oct_idx += sfm_width_to_octs (var_get_width (var)); } return oct_idx; } /* Write the sysfile_header header to system file W. */ static void write_header (struct sfm_writer *w, const struct dictionary *d) { const char *dict_encoding = dict_get_encoding (d); char prod_name[61]; char creation_date[10]; char creation_time[9]; const char *file_label; struct variable *weight; time_t t; /* Record-type code. */ if (is_encoding_ebcdic_compatible (dict_encoding)) write_string (w, EBCDIC_MAGIC, 4); else if (w->compression == ANY_COMP_ZLIB) write_string (w, ASCII_ZMAGIC, 4); else write_string (w, ASCII_MAGIC, 4); /* Product identification. */ snprintf (prod_name, sizeof prod_name, "@(#) SPSS DATA FILE %s - %s", version, host_system); write_utf8_string (w, dict_encoding, prod_name, 60); /* Layout code. */ write_int (w, 2); /* Number of `union value's per case. */ write_int (w, calc_oct_idx (d, NULL)); /* Compressed? */ write_int (w, (w->compression == ANY_COMP_NONE ? 0 : w->compression == ANY_COMP_SIMPLE ? 1 : 2)); /* Weight variable. */ weight = dict_get_weight (d); write_int (w, weight != NULL ? calc_oct_idx (d, weight) + 1 : 0); /* Number of cases. We don't know this in advance, so we write -1 to indicate an unknown number of cases. Later we can come back and overwrite it with the true value. */ write_int (w, -1); /* Compression bias. */ write_float (w, COMPRESSION_BIAS); /* Creation date and time. */ if (time (&t) == (time_t) -1) { strcpy (creation_date, "01 Jan 70"); strcpy (creation_time, "00:00:00"); } else { static const char *const month_name[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", }; struct tm *tmp = localtime (&t); int day = rerange (tmp->tm_mday); int mon = rerange (tmp->tm_mon + 1); int year = rerange (tmp->tm_year); int hour = rerange (tmp->tm_hour + 1); int min = rerange (tmp->tm_min + 1); int sec = rerange (tmp->tm_sec + 1); snprintf (creation_date, sizeof creation_date, "%02d %s %02d", day, month_name[mon - 1], year); snprintf (creation_time, sizeof creation_time, "%02d:%02d:%02d", hour - 1, min - 1, sec - 1); } write_utf8_string (w, dict_encoding, creation_date, 9); write_utf8_string (w, dict_encoding, creation_time, 8); /* File label. */ file_label = dict_get_label (d); if (file_label == NULL) file_label = ""; write_utf8_string (w, dict_encoding, file_label, 64); /* Padding. */ write_zeros (w, 3); } /* Write format spec FMT to W, after adjusting it to be compatible with the given WIDTH. */ static void write_format (struct sfm_writer *w, struct fmt_spec fmt, int width) { assert (fmt_check_output (&fmt)); assert (sfm_width_to_segments (width) == 1); if (width > 0) fmt_resize (&fmt, width); write_int (w, (fmt_to_io (fmt.type) << 16) | (fmt.w << 8) | fmt.d); } /* Write a string continuation variable record for each 8-byte section beyond the initial 8 bytes, for a variable of the given WIDTH. */ static void write_variable_continuation_records (struct sfm_writer *w, int width) { int position; assert (sfm_width_to_segments (width) == 1); for (position = 8; position < width; position += 8) { write_int (w, 2); /* Record type. */ write_int (w, -1); /* Width. */ write_int (w, 0); /* No variable label. */ write_int (w, 0); /* No missing values. */ write_int (w, 0); /* Print format. */ write_int (w, 0); /* Write format. */ write_zeros (w, 8); /* Name. */ } } /* Write the variable record(s) for variable V to system file W. */ static void write_variable (struct sfm_writer *w, const struct variable *v) { int width = var_get_width (v); int segment_cnt = sfm_width_to_segments (width); int seg0_width = sfm_segment_alloc_width (width, 0); const char *encoding = var_get_encoding (v); int i; /* Record type. */ write_int (w, 2); /* Width. */ write_int (w, seg0_width); /* Variable has a variable label? */ write_int (w, var_has_label (v)); /* Number of missing values. If there is a range, then the range counts as 2 missing values and causes the number to be negated. Missing values for long string variables are written in a separate record. */ if (width <= MAX_SHORT_STRING) { const struct missing_values *mv = var_get_missing_values (v); if (mv_has_range (mv)) write_int (w, -2 - mv_n_values (mv)); else write_int (w, mv_n_values (mv)); } else write_int (w, 0); /* Print and write formats. */ write_format (w, *var_get_print_format (v), seg0_width); write_format (w, *var_get_write_format (v), seg0_width); /* Short name. The full name is in a translation table written separately. */ write_utf8_string (w, encoding, var_get_short_name (v, 0), 8); /* Value label. */ if (var_has_label (v)) { char *label = recode_string (encoding, UTF8, var_get_label (v), -1); size_t label_len = MIN (strlen (label), 255); size_t padded_len = ROUND_UP (label_len, 4); write_int (w, label_len); write_string (w, label, padded_len); free (label); } /* Write the missing values, if any, range first. */ if (width <= MAX_SHORT_STRING) { const struct missing_values *mv = var_get_missing_values (v); if (mv_has_range (mv)) { double x, y; mv_get_range (mv, &x, &y); write_float (w, x); write_float (w, y); } for (i = 0; i < mv_n_values (mv); i++) write_value (w, mv_get_value (mv, i), width); } write_variable_continuation_records (w, seg0_width); /* Write additional segments for very long string variables. */ for (i = 1; i < segment_cnt; i++) { int seg_width = sfm_segment_alloc_width (width, i); struct fmt_spec fmt = fmt_for_output (FMT_A, MAX (seg_width, 1), 0); write_int (w, 2); /* Variable record. */ write_int (w, seg_width); /* Width. */ write_int (w, 0); /* No variable label. */ write_int (w, 0); /* No missing values. */ write_format (w, fmt, seg_width); /* Print format. */ write_format (w, fmt, seg_width); /* Write format. */ write_utf8_string (w, encoding, var_get_short_name (v, i), 8); write_variable_continuation_records (w, seg_width); } } /* Writes the value labels to system file W. Value labels for long string variables are written separately, by write_long_string_value_labels. */ static void write_value_labels (struct sfm_writer *w, const struct dictionary *d) { struct label_set { struct hmap_node hmap_node; const struct val_labs *val_labs; int *indexes; size_t n_indexes, allocated_indexes; }; size_t n_sets, allocated_sets; struct label_set **sets; struct hmap same_sets; size_t i; int idx; n_sets = allocated_sets = 0; sets = NULL; hmap_init (&same_sets); idx = 0; for (i = 0; i < dict_get_var_cnt (d); i++) { struct variable *v = dict_get_var (d, i); if (var_has_value_labels (v) && var_get_width (v) <= 8) { const struct val_labs *val_labs = var_get_value_labels (v); unsigned int hash = val_labs_hash (val_labs, 0); struct label_set *set; HMAP_FOR_EACH_WITH_HASH (set, struct label_set, hmap_node, hash, &same_sets) { if (val_labs_equal (set->val_labs, val_labs)) { if (set->n_indexes >= set->allocated_indexes) set->indexes = x2nrealloc (set->indexes, &set->allocated_indexes, sizeof *set->indexes); set->indexes[set->n_indexes++] = idx; goto next_var; } } set = xmalloc (sizeof *set); set->val_labs = val_labs; set->indexes = xmalloc (sizeof *set->indexes); set->indexes[0] = idx; set->n_indexes = 1; set->allocated_indexes = 1; hmap_insert (&same_sets, &set->hmap_node, hash); if (n_sets >= allocated_sets) sets = x2nrealloc (sets, &allocated_sets, sizeof *sets); sets[n_sets++] = set; } next_var: idx += sfm_width_to_octs (var_get_width (v)); } for (i = 0; i < n_sets; i++) { const struct label_set *set = sets[i]; const struct val_labs *val_labs = set->val_labs; size_t n_labels = val_labs_count (val_labs); int width = val_labs_get_width (val_labs); const struct val_lab **labels; size_t j; /* Value label record. */ write_int (w, 3); /* Record type. */ write_int (w, n_labels); labels = val_labs_sorted (val_labs); for (j = 0; j < n_labels; j++) { const struct val_lab *vl = labels[j]; char *label = recode_string (dict_get_encoding (d), UTF8, val_lab_get_escaped_label (vl), -1); uint8_t len = MIN (strlen (label), 255); write_value (w, val_lab_get_value (vl), width); write_bytes (w, &len, 1); write_bytes (w, label, len); write_zeros (w, REM_RND_UP (len + 1, 8)); free (label); } free (labels); /* Value label variable record. */ write_int (w, 4); /* Record type. */ write_int (w, set->n_indexes); for (j = 0; j < set->n_indexes; j++) write_int (w, set->indexes[j] + 1); } for (i = 0; i < n_sets; i++) { struct label_set *set = sets[i]; free (set->indexes); free (set); } free (sets); hmap_destroy (&same_sets); } /* Writes record type 6, document record. */ static void write_documents (struct sfm_writer *w, const struct dictionary *d) { const struct string_array *docs = dict_get_documents (d); const char *enc = dict_get_encoding (d); size_t i; write_int (w, 6); /* Record type. */ write_int (w, docs->n); for (i = 0; i < docs->n; i++) { char *s = recode_string (enc, "UTF-8", docs->strings[i], -1); size_t s_len = strlen (s); size_t write_len = MIN (s_len, DOC_LINE_LENGTH); write_bytes (w, s, write_len); write_spaces (w, DOC_LINE_LENGTH - write_len); free (s); } } static void put_attrset (struct string *string, const struct attrset *attrs) { const struct attribute *attr; struct attrset_iterator i; for (attr = attrset_first (attrs, &i); attr != NULL; attr = attrset_next (attrs, &i)) { size_t n_values = attribute_get_n_values (attr); size_t j; ds_put_cstr (string, attribute_get_name (attr)); ds_put_byte (string, '('); for (j = 0; j < n_values; j++) ds_put_format (string, "'%s'\n", attribute_get_value (attr, j)); ds_put_byte (string, ')'); } } static void write_data_file_attributes (struct sfm_writer *w, const struct dictionary *d) { struct string s = DS_EMPTY_INITIALIZER; put_attrset (&s, dict_get_attributes (d)); write_utf8_record (w, dict_get_encoding (d), &s, 17); ds_destroy (&s); } static void add_role_attribute (enum var_role role, struct attrset *attrs) { struct attribute *attr; const char *s; switch (role) { case ROLE_INPUT: default: s = "0"; break; case ROLE_TARGET: s = "1"; break; case ROLE_BOTH: s = "2"; break; case ROLE_NONE: s = "3"; break; case ROLE_PARTITION: s = "4"; break; case ROLE_SPLIT: s = "5"; break; } attrset_delete (attrs, "$@Role"); attr = attribute_create ("$@Role"); attribute_add_value (attr, s); attrset_add (attrs, attr); } static void write_variable_attributes (struct sfm_writer *w, const struct dictionary *d) { struct string s = DS_EMPTY_INITIALIZER; size_t n_vars = dict_get_var_cnt (d); size_t n_attrsets = 0; size_t i; for (i = 0; i < n_vars; i++) { struct variable *v = dict_get_var (d, i); struct attrset attrs; attrset_clone (&attrs, var_get_attributes (v)); add_role_attribute (var_get_role (v), &attrs); if (n_attrsets++) ds_put_byte (&s, '/'); ds_put_format (&s, "%s:", var_get_name (v)); put_attrset (&s, &attrs); attrset_destroy (&attrs); } if (n_attrsets) write_utf8_record (w, dict_get_encoding (d), &s, 18); ds_destroy (&s); } /* Write multiple response sets. If PRE_V14 is true, writes sets supported by SPSS before release 14, otherwise writes sets supported only by later versions. */ static void write_mrsets (struct sfm_writer *w, const struct dictionary *dict, bool pre_v14) { const char *encoding = dict_get_encoding (dict); struct string s = DS_EMPTY_INITIALIZER; size_t n_mrsets; size_t i; if (is_encoding_ebcdic_compatible (encoding)) { /* FIXME. */ return; } n_mrsets = dict_get_n_mrsets (dict); if (n_mrsets == 0) return; for (i = 0; i < n_mrsets; i++) { const struct mrset *mrset = dict_get_mrset (dict, i); char *name; size_t j; if ((mrset->type != MRSET_MD || mrset->cat_source != MRSET_COUNTEDVALUES) != pre_v14) continue; name = recode_string (encoding, "UTF-8", mrset->name, -1); ds_put_format (&s, "%s=", name); free (name); if (mrset->type == MRSET_MD) { char *counted; if (mrset->cat_source == MRSET_COUNTEDVALUES) ds_put_format (&s, "E %d ", mrset->label_from_var_label ? 11 : 1); else ds_put_byte (&s, 'D'); if (mrset->width == 0) counted = xasprintf ("%.0f", mrset->counted.f); else counted = xmemdup0 (value_str (&mrset->counted, mrset->width), mrset->width); ds_put_format (&s, "%zu %s", strlen (counted), counted); free (counted); } else ds_put_byte (&s, 'C'); ds_put_byte (&s, ' '); if (mrset->label && !mrset->label_from_var_label) { char *label = recode_string (encoding, "UTF-8", mrset->label, -1); ds_put_format (&s, "%zu %s", strlen (label), label); free (label); } else ds_put_cstr (&s, "0 "); for (j = 0; j < mrset->n_vars; j++) { const char *short_name_utf8 = var_get_short_name (mrset->vars[j], 0); char *lower_name_utf8 = utf8_to_lower (short_name_utf8); char *short_name = recode_string (encoding, "UTF-8", lower_name_utf8, -1); ds_put_format (&s, " %s", short_name); free (short_name); free (lower_name_utf8); } ds_put_byte (&s, '\n'); } if (!ds_is_empty (&s)) write_string_record (w, ds_ss (&s), pre_v14 ? 7 : 19); ds_destroy (&s); } /* Write the alignment, width and scale values. */ static void write_variable_display_parameters (struct sfm_writer *w, const struct dictionary *dict) { int i; write_int (w, 7); /* Record type. */ write_int (w, 11); /* Record subtype. */ write_int (w, 4); /* Data item (int32) size. */ write_int (w, w->segment_cnt * 3); /* Number of data items. */ for (i = 0; i < dict_get_var_cnt (dict); ++i) { struct variable *v = dict_get_var (dict, i); int width = var_get_width (v); int segment_cnt = sfm_width_to_segments (width); int measure = (var_get_measure (v) == MEASURE_NOMINAL ? 1 : var_get_measure (v) == MEASURE_ORDINAL ? 2 : 3); int alignment = (var_get_alignment (v) == ALIGN_LEFT ? 0 : var_get_alignment (v) == ALIGN_RIGHT ? 1 : 2); int i; for (i = 0; i < segment_cnt; i++) { int width_left = width - sfm_segment_effective_offset (width, i); write_int (w, measure); write_int (w, (i == 0 ? var_get_display_width (v) : var_default_display_width (width_left))); write_int (w, alignment); } } } /* Writes the table of lengths for very long string variables. */ static void write_vls_length_table (struct sfm_writer *w, const struct dictionary *dict) { struct string map; int i; ds_init_empty (&map); for (i = 0; i < dict_get_var_cnt (dict); ++i) { const struct variable *v = dict_get_var (dict, i); if (sfm_width_to_segments (var_get_width (v)) > 1) ds_put_format (&map, "%s=%05d%c\t", var_get_short_name (v, 0), var_get_width (v), 0); } if (!ds_is_empty (&map)) write_utf8_record (w, dict_get_encoding (dict), &map, 14); ds_destroy (&map); } static void write_long_string_value_labels (struct sfm_writer *w, const struct dictionary *dict) { const char *encoding = dict_get_encoding (dict); size_t n_vars = dict_get_var_cnt (dict); size_t size, i; off_t start UNUSED; /* Figure out the size in advance. */ size = 0; for (i = 0; i < n_vars; i++) { struct variable *var = dict_get_var (dict, i); const struct val_labs *val_labs = var_get_value_labels (var); int width = var_get_width (var); const struct val_lab *val_lab; if (val_labs_count (val_labs) == 0 || width < 9) continue; size += 12; size += recode_string_len (encoding, "UTF-8", var_get_name (var), -1); for (val_lab = val_labs_first (val_labs); val_lab != NULL; val_lab = val_labs_next (val_labs, val_lab)) { size += 8 + width; size += recode_string_len (encoding, "UTF-8", val_lab_get_escaped_label (val_lab), -1); } } if (size == 0) return; write_int (w, 7); /* Record type. */ write_int (w, 21); /* Record subtype */ write_int (w, 1); /* Data item (byte) size. */ write_int (w, size); /* Number of data items. */ start = ftello (w->file); for (i = 0; i < n_vars; i++) { struct variable *var = dict_get_var (dict, i); const struct val_labs *val_labs = var_get_value_labels (var); int width = var_get_width (var); const struct val_lab *val_lab; char *var_name; if (val_labs_count (val_labs) == 0 || width < 9) continue; var_name = recode_string (encoding, "UTF-8", var_get_name (var), -1); write_int (w, strlen (var_name)); write_bytes (w, var_name, strlen (var_name)); free (var_name); write_int (w, width); write_int (w, val_labs_count (val_labs)); for (val_lab = val_labs_first (val_labs); val_lab != NULL; val_lab = val_labs_next (val_labs, val_lab)) { char *label; size_t len; write_int (w, width); write_bytes (w, value_str (val_lab_get_value (val_lab), width), width); label = recode_string (var_get_encoding (var), "UTF-8", val_lab_get_escaped_label (val_lab), -1); len = strlen (label); write_int (w, len); write_bytes (w, label, len); free (label); } } assert (ftello (w->file) == start + size); } static void write_long_string_missing_values (struct sfm_writer *w, const struct dictionary *dict) { const char *encoding = dict_get_encoding (dict); size_t n_vars = dict_get_var_cnt (dict); size_t size, i; off_t start UNUSED; /* Figure out the size in advance. */ size = 0; for (i = 0; i < n_vars; i++) { struct variable *var = dict_get_var (dict, i); const struct missing_values *mv = var_get_missing_values (var); int width = var_get_width (var); if (mv_is_empty (mv) || width < 9) continue; size += 4; size += recode_string_len (encoding, "UTF-8", var_get_name (var), -1); size += 1; size += mv_n_values (mv) * (4 + 8); } if (size == 0) return; write_int (w, 7); /* Record type. */ write_int (w, 22); /* Record subtype */ write_int (w, 1); /* Data item (byte) size. */ write_int (w, size); /* Number of data items. */ start = ftello (w->file); for (i = 0; i < n_vars; i++) { struct variable *var = dict_get_var (dict, i); const struct missing_values *mv = var_get_missing_values (var); int width = var_get_width (var); uint8_t n_missing_values; char *var_name; int j; if (mv_is_empty (mv) || width < 9) continue; var_name = recode_string (encoding, "UTF-8", var_get_name (var), -1); write_int (w, strlen (var_name)); write_bytes (w, var_name, strlen (var_name)); free (var_name); n_missing_values = mv_n_values (mv); write_bytes (w, &n_missing_values, 1); for (j = 0; j < n_missing_values; j++) { const union value *value = mv_get_value (mv, j); write_int (w, 8); write_bytes (w, value_str (value, width), 8); } } assert (ftello (w->file) == start + size); } static void write_encoding_record (struct sfm_writer *w, const struct dictionary *d) { /* IANA says "...character set names may be up to 40 characters taken from the printable characters of US-ASCII," so character set names don't need to be recoded to be in UTF-8. We convert encoding names to uppercase because SPSS writes encoding names in uppercase. */ char *encoding = xstrdup (dict_get_encoding (d)); str_uppercase (encoding); write_string_record (w, ss_cstr (encoding), 20); free (encoding); } /* Writes the long variable name table. */ static void write_longvar_table (struct sfm_writer *w, const struct dictionary *dict) { struct string map; size_t i; ds_init_empty (&map); for (i = 0; i < dict_get_var_cnt (dict); i++) { struct variable *v = dict_get_var (dict, i); if (i) ds_put_byte (&map, '\t'); ds_put_format (&map, "%s=%s", var_get_short_name (v, 0), var_get_name (v)); } write_utf8_record (w, dict_get_encoding (dict), &map, 13); ds_destroy (&map); } /* Write integer information record. */ static void write_integer_info_record (struct sfm_writer *w, const struct dictionary *d) { const char *dict_encoding = dict_get_encoding (d); int version_component[3]; int float_format; int codepage; /* Parse the version string. */ memset (version_component, 0, sizeof version_component); sscanf (bare_version, "%d.%d.%d", &version_component[0], &version_component[1], &version_component[2]); /* Figure out the floating-point format. */ if (FLOAT_NATIVE_64_BIT == FLOAT_IEEE_DOUBLE_LE || FLOAT_NATIVE_64_BIT == FLOAT_IEEE_DOUBLE_BE) float_format = 1; else if (FLOAT_NATIVE_64_BIT == FLOAT_Z_LONG) float_format = 2; else if (FLOAT_NATIVE_64_BIT == FLOAT_VAX_D) float_format = 3; else abort (); /* Choose codepage. */ codepage = sys_get_codepage_from_encoding (dict_encoding); if (codepage == 0) { /* The codepage is unknown. Choose a default. For an EBCDIC-compatible encoding, use the value for EBCDIC. For an ASCII-compatible encoding, default to "7-bit ASCII", because many files use this codepage number regardless of their actual encoding. */ if (is_encoding_ascii_compatible (dict_encoding)) codepage = 2; else if (is_encoding_ebcdic_compatible (dict_encoding)) codepage = 1; } /* Write record. */ write_int (w, 7); /* Record type. */ write_int (w, 3); /* Record subtype. */ write_int (w, 4); /* Data item (int32) size. */ write_int (w, 8); /* Number of data items. */ write_int (w, version_component[0]); write_int (w, version_component[1]); write_int (w, version_component[2]); write_int (w, -1); /* Machine code. */ write_int (w, float_format); write_int (w, 1); /* Compression code. */ write_int (w, INTEGER_NATIVE == INTEGER_MSB_FIRST ? 1 : 2); write_int (w, codepage); } /* Write floating-point information record. */ static void write_float_info_record (struct sfm_writer *w) { write_int (w, 7); /* Record type. */ write_int (w, 4); /* Record subtype. */ write_int (w, 8); /* Data item (flt64) size. */ write_int (w, 3); /* Number of data items. */ write_float (w, SYSMIS); /* System-missing value. */ write_float (w, HIGHEST); /* Value used for HIGHEST in missing values. */ write_float (w, LOWEST); /* Value used for LOWEST in missing values. */ } /* Writes case C to system file W. */ static void sys_file_casewriter_write (struct casewriter *writer, void *w_, struct ccase *c) { struct sfm_writer *w = w_; if (ferror (w->file)) { casewriter_force_error (writer); case_unref (c); return; } w->case_cnt++; if (w->compression == ANY_COMP_NONE) write_case_uncompressed (w, c); else write_case_compressed (w, c); case_unref (c); } /* Destroys system file writer W. */ static void sys_file_casewriter_destroy (struct casewriter *writer, void *w_) { struct sfm_writer *w = w_; if (!close_writer (w)) casewriter_force_error (writer); } /* Returns true if an I/O error has occurred on WRITER, false otherwise. */ static bool write_error (const struct sfm_writer *writer) { return ferror (writer->file); } /* Closes a system file after we're done with it. Returns true if successful, false if an I/O error occurred. */ static bool close_writer (struct sfm_writer *w) { bool ok; if (w == NULL) return true; ok = true; if (w->file != NULL) { /* Flush buffer. */ flush_compressed (w); if (w->compression == ANY_COMP_ZLIB) { finish_zstream (w); write_ztrailer (w); } fflush (w->file); ok = !write_error (w); /* Seek back to the beginning and update the number of cases. This is just a courtesy to later readers, so there's no need to check return values or report errors. */ if (ok && w->case_cnt <= INT32_MAX && !fseeko (w->file, 80, SEEK_SET)) { write_int (w, w->case_cnt); clearerr (w->file); } if (fclose (w->file) == EOF) ok = false; if (!ok) msg (ME, _("An I/O error occurred writing system file `%s'."), fh_get_file_name (w->fh)); if (ok ? !replace_file_commit (w->rf) : !replace_file_abort (w->rf)) ok = false; } free (w->blocks); fh_unlock (w->lock); fh_unref (w->fh); free (w->sfm_vars); free (w); return ok; } /* System file writer casewriter class. */ static const struct casewriter_class sys_file_casewriter_class = { sys_file_casewriter_write, sys_file_casewriter_destroy, NULL, }; /* Writes case C to system file W, without compressing it. */ static void write_case_uncompressed (struct sfm_writer *w, const struct ccase *c) { size_t i; for (i = 0; i < w->sfm_var_cnt; i++) { struct sfm_var *v = &w->sfm_vars[i]; if (v->var_width == 0) write_float (w, case_num_idx (c, v->case_index)); else { write_bytes (w, case_str_idx (c, v->case_index) + v->offset, v->segment_width); write_spaces (w, v->padding); } } } /* Writes case C to system file W, with compression. */ static void write_case_compressed (struct sfm_writer *w, const struct ccase *c) { size_t i; for (i = 0; i < w->sfm_var_cnt; i++) { struct sfm_var *v = &w->sfm_vars[i]; if (v->var_width == 0) { double d = case_num_idx (c, v->case_index); if (d == SYSMIS) put_cmp_opcode (w, 255); else if (d >= 1 - COMPRESSION_BIAS && d <= 251 - COMPRESSION_BIAS && d == (int) d) put_cmp_opcode (w, (int) d + COMPRESSION_BIAS); else put_cmp_number (w, d); } else { int offset = v->offset; int width, padding; /* This code properly deals with a width that is not a multiple of 8, by ensuring that the final partial oct (8 byte unit) is treated as padded with spaces on the right. */ for (width = v->segment_width; width > 0; width -= 8, offset += 8) { const void *data = case_str_idx (c, v->case_index) + offset; int chunk_size = MIN (width, 8); if (!memcmp (data, " ", chunk_size)) put_cmp_opcode (w, 254); else put_cmp_string (w, data, chunk_size); } /* This code deals properly with padding that is not a multiple of 8 bytes, by discarding the remainder, which was already effectively padded with spaces in the previous loop. (Note that v->width + v->padding is always a multiple of 8.) */ for (padding = v->padding / 8; padding > 0; padding--) put_cmp_opcode (w, 254); } } } static bool start_zstream (struct sfm_writer *w) { int error; error = deflateInit (&w->zstream, 1); if (error != Z_OK) { msg (ME, _("Failed to initialize ZLIB for compression (%s)."), w->zstream.msg); return false; } return true; } static void finish_zstream (struct sfm_writer *w) { struct zblock *block; int error; assert (w->zstream.total_in <= ZBLOCK_SIZE); w->zstream.next_in = NULL; w->zstream.avail_in = 0; do { uint8_t buf[4096]; w->zstream.next_out = buf; w->zstream.avail_out = sizeof buf; error = deflate (&w->zstream, Z_FINISH); write_bytes (w, buf, w->zstream.next_out - buf); } while (error == Z_OK); if (error != Z_STREAM_END) msg (ME, _("Failed to complete ZLIB stream compression (%s)."), w->zstream.msg); if (w->n_blocks >= w->allocated_blocks) w->blocks = x2nrealloc (w->blocks, &w->allocated_blocks, sizeof *w->blocks); block = &w->blocks[w->n_blocks++]; block->uncompressed_size = w->zstream.total_in; block->compressed_size = w->zstream.total_out; deflateEnd (&w->zstream); } static void write_zlib (struct sfm_writer *w, const void *data_, unsigned int n) { const uint8_t *data = data_; while (n > 0) { unsigned int chunk; if (w->zstream.total_in >= ZBLOCK_SIZE) { finish_zstream (w); start_zstream (w); } chunk = MIN (n, ZBLOCK_SIZE - w->zstream.total_in); w->zstream.next_in = CONST_CAST (uint8_t *, data); w->zstream.avail_in = chunk; do { uint8_t buf[4096]; int error; w->zstream.next_out = buf; w->zstream.avail_out = sizeof buf; error = deflate (&w->zstream, Z_NO_FLUSH); write_bytes (w, buf, w->zstream.next_out - buf); if (error != Z_OK) { msg (ME, _("ZLIB stream compression failed (%s)."), w->zstream.msg); return; } } while (w->zstream.avail_in > 0 || w->zstream.avail_out == 0); data += chunk; n -= chunk; } } static void write_ztrailer (struct sfm_writer *w) { long long int uncompressed_ofs; long long int compressed_ofs; const struct zblock *block; write_int64 (w, -COMPRESSION_BIAS); write_int64 (w, 0); write_int (w, ZBLOCK_SIZE); write_int (w, w->n_blocks); uncompressed_ofs = w->zstart; compressed_ofs = w->zstart + 24; for (block = w->blocks; block < &w->blocks[w->n_blocks]; block++) { write_int64 (w, uncompressed_ofs); write_int64 (w, compressed_ofs); write_int (w, block->uncompressed_size); write_int (w, block->compressed_size); uncompressed_ofs += block->uncompressed_size; compressed_ofs += block->compressed_size; } if (!fseeko (w->file, w->zstart + 8, SEEK_SET)) { write_int64 (w, compressed_ofs); write_int64 (w, 24 + (w->n_blocks * 24)); } else msg (ME, _("%s: Seek failed (%s)."), fh_get_file_name (w->fh), strerror (errno)); } /* Flushes buffered compressed opcodes and data to W. */ static void flush_compressed (struct sfm_writer *w) { if (w->n_opcodes) { unsigned int n = 8 * (1 + w->n_elements); if (w->compression == ANY_COMP_SIMPLE) write_bytes (w, w->cbuf, n); else write_zlib (w, w->cbuf, n); w->n_opcodes = w->n_elements = 0; memset (w->cbuf[0], 0, 8); } } /* Appends OPCODE to the buffered set of compression opcodes in W. Flushes the compression buffer beforehand if necessary. */ static void put_cmp_opcode (struct sfm_writer *w, uint8_t opcode) { if (w->n_opcodes >= 8) flush_compressed (w); w->cbuf[0][w->n_opcodes++] = opcode; } /* Appends NUMBER to the buffered compression data in W. */ static void put_cmp_number (struct sfm_writer *w, double number) { put_cmp_opcode (w, 253); convert_double_to_output_format (number, w->cbuf[++w->n_elements]); } /* Appends SIZE bytes of DATA to the buffered compression data in W, followed by enough spaces to pad the output data to exactly 8 bytes (thus, SIZE must be no greater than 8). */ static void put_cmp_string (struct sfm_writer *w, const void *data, size_t size) { assert (size <= 8); put_cmp_opcode (w, 253); w->n_elements++; memset (w->cbuf[w->n_elements], w->space, 8); memcpy (w->cbuf[w->n_elements], data, size); } /* Writes 32-bit integer X to the output file for writer W. */ static void write_int (struct sfm_writer *w, int32_t x) { write_bytes (w, &x, sizeof x); } /* Writes 64-bit integer X to the output file for writer W. */ static void write_int64 (struct sfm_writer *w, int64_t x) { write_bytes (w, &x, sizeof x); } /* Converts NATIVE to the 64-bit format used in output files in OUTPUT. */ static inline void convert_double_to_output_format (double native, uint8_t output[8]) { /* If "double" is not a 64-bit type, then convert it to a 64-bit type. Otherwise just copy it. */ if (FLOAT_NATIVE_DOUBLE != FLOAT_NATIVE_64_BIT) float_convert (FLOAT_NATIVE_DOUBLE, &native, FLOAT_NATIVE_64_BIT, output); else memcpy (output, &native, sizeof native); } /* Writes floating-point number X to the output file for writer W. */ static void write_float (struct sfm_writer *w, double x) { uint8_t output[8]; convert_double_to_output_format (x, output); write_bytes (w, output, sizeof output); } /* Writes contents of VALUE with the given WIDTH to W, padding with zeros to a multiple of 8 bytes. To avoid a branch, and because we don't actually need to support it, WIDTH must be no bigger than 8. */ static void write_value (struct sfm_writer *w, const union value *value, int width) { assert (width <= 8); if (width == 0) write_float (w, value->f); else { write_bytes (w, value_str (value, width), width); write_zeros (w, 8 - width); } } /* Writes null-terminated STRING in a field of the given WIDTH to W. If STRING is longer than WIDTH, it is truncated; if STRING is shorter than WIDTH, it is padded on the right with spaces. */ static void write_string (struct sfm_writer *w, const char *string, size_t width) { size_t data_bytes = MIN (strlen (string), width); size_t pad_bytes = width - data_bytes; write_bytes (w, string, data_bytes); while (pad_bytes-- > 0) putc (w->space, w->file); } /* Recodes null-terminated UTF-8 encoded STRING into ENCODING, and writes the recoded version in a field of the given WIDTH to W. The string is truncated or padded on the right with spaces to exactly WIDTH bytes. */ static void write_utf8_string (struct sfm_writer *w, const char *encoding, const char *string, size_t width) { char *s = recode_string (encoding, "UTF-8", string, -1); write_string (w, s, width); free (s); } /* Writes a record with type 7, subtype SUBTYPE that contains CONTENT recoded from UTF-8 encoded into ENCODING. */ static void write_utf8_record (struct sfm_writer *w, const char *encoding, const struct string *content, int subtype) { struct substring s; s = recode_substring_pool (encoding, "UTF-8", ds_ss (content), NULL); write_string_record (w, s, subtype); ss_dealloc (&s); } /* Writes a record with type 7, subtype SUBTYPE that contains the string CONTENT. */ static void write_string_record (struct sfm_writer *w, const struct substring content, int subtype) { write_int (w, 7); write_int (w, subtype); write_int (w, 1); write_int (w, ss_length (content)); write_bytes (w, ss_data (content), ss_length (content)); } /* Writes SIZE bytes of DATA to W's output file. */ static void write_bytes (struct sfm_writer *w, const void *data, size_t size) { fwrite (data, 1, size, w->file); } /* Writes N zeros to W's output file. */ static void write_zeros (struct sfm_writer *w, size_t n) { while (n-- > 0) putc (0, w->file); } /* Writes N spaces to W's output file. */ static void write_spaces (struct sfm_writer *w, size_t n) { while (n-- > 0) putc (w->space, w->file); } pspp-1.0.1/src/data/file-handle-def.c0000644000175000017500000005563013137223525014200 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/file-handle-def.h" #include #include #include #include #include "data/dataset.h" #include "data/variable.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/hash-functions.h" #include "libpspp/hmap.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include #include "gl/dirname.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #if defined _WIN32 || defined __WIN32__ #define WIN32_LEAN_AND_MEAN /* avoid including junk */ #include #endif /* File handle. */ struct file_handle { struct hmap_node name_node; /* Element in named_handles hmap. */ size_t ref_cnt; /* Number of references. */ char *id; /* Identifier token, NULL if none. */ char *name; /* User-friendly identifying name. */ enum fh_referent referent; /* What the file handle refers to. */ /* FH_REF_FILE only. */ char *file_name; /* File name as provided by user. */ char *file_name_encoding; /* The character encoding of file_name, This is NOT the encoding of the file contents! */ enum fh_mode mode; /* File mode. */ enum fh_line_ends line_ends; /* Line ends for text files. */ /* FH_REF_FILE and FH_REF_INLINE only. */ size_t record_width; /* Length of fixed-format records. */ size_t tab_width; /* Tab width, 0=do not expand tabs. */ char *encoding; /* Charset for contents. */ /* FH_REF_DATASET only. */ struct dataset *ds; /* Dataset. */ }; /* All "struct file_handle"s with nonnull 'id' member. */ static struct hmap named_handles = HMAP_INITIALIZER (named_handles); /* Default file handle for DATA LIST, REREAD, REPEATING DATA commands. */ static struct file_handle *default_handle; /* The "file" that reads from BEGIN DATA...END DATA. */ static struct file_handle *inline_file; static struct file_handle *create_handle (const char *id, char *name, enum fh_referent, const char *encoding); static void free_handle (struct file_handle *); static void unname_handle (struct file_handle *); /* Hash table of all active locks. */ static struct hmap locks = HMAP_INITIALIZER (locks); static struct file_identity *fh_get_identity (const struct file_handle *); static void fh_free_identity (struct file_identity *); static int fh_compare_file_identities (const struct file_identity *, const struct file_identity *); static unsigned int fh_hash_identity (const struct file_identity *); /* File handle initialization routine. */ void fh_init (void) { inline_file = create_handle ("INLINE", xstrdup ("INLINE"), FH_REF_INLINE, "Auto"); inline_file->record_width = 80; inline_file->tab_width = 8; } /* Removes all named file handles from the global list. */ void fh_done (void) { struct file_handle *handle, *next; HMAP_FOR_EACH_SAFE (handle, next, struct file_handle, name_node, &named_handles) unname_handle (handle); } /* Free HANDLE and remove it from the global list. */ static void free_handle (struct file_handle *handle) { /* Remove handle from global list. */ if (handle->id != NULL) hmap_delete (&named_handles, &handle->name_node); /* Free data. */ free (handle->id); free (handle->name); free (handle->file_name); free (handle->file_name_encoding); free (handle->encoding); free (handle); } /* Make HANDLE unnamed, so that it can no longer be referenced by name. The caller must hold a reference to HANDLE, which is not affected by this function. */ static void unname_handle (struct file_handle *handle) { assert (handle->id != NULL); free (handle->id); handle->id = NULL; hmap_delete (&named_handles, &handle->name_node); /* Drop the reference held by the named_handles table. */ fh_unref (handle); } /* Increments HANDLE's reference count and returns HANDLE. */ struct file_handle * fh_ref (struct file_handle *handle) { assert (handle->ref_cnt > 0); handle->ref_cnt++; return handle; } /* Decrements HANDLE's reference count. If the reference count drops to 0, HANDLE is destroyed. */ void fh_unref (struct file_handle *handle) { if (handle != NULL) { assert (handle->ref_cnt > 0); if (--handle->ref_cnt == 0) free_handle (handle); } } /* Make HANDLE unnamed, so that it can no longer be referenced by name. The caller must hold a reference to HANDLE, which is not affected by this function. This function ignores a null pointer as input. It has no effect on the inline handle, which is always named INLINE.*/ void fh_unname (struct file_handle *handle) { assert (handle->ref_cnt > 1); if (handle != fh_inline_file () && handle->id != NULL) unname_handle (handle); } /* Returns the handle with the given ID, or a null pointer if there is none. */ struct file_handle * fh_from_id (const char *id) { struct file_handle *handle; HMAP_FOR_EACH_WITH_HASH (handle, struct file_handle, name_node, utf8_hash_case_string (id, 0), &named_handles) if (!utf8_strcasecmp (id, handle->id)) { return fh_ref (handle); } return NULL; } /* Creates a new handle with identifier ID (which may be null) and name HANDLE_NAME that refers to REFERENT. Links the new handle into the global list. Returns the new handle. The new handle is not fully initialized. The caller is responsible for completing its initialization. */ static struct file_handle * create_handle (const char *id, char *handle_name, enum fh_referent referent, const char *encoding) { struct file_handle *handle = xzalloc (sizeof *handle); handle->ref_cnt = 1; handle->id = id != NULL ? xstrdup (id) : NULL; handle->name = handle_name; handle->referent = referent; handle->encoding = xstrdup (encoding); if (id != NULL) { hmap_insert (&named_handles, &handle->name_node, utf8_hash_case_string (handle->id, 0)); } return handle; } /* Returns the unique handle of referent type FH_REF_INLINE, which refers to the "inline file" that represents character data in the command file between BEGIN DATA and END DATA. */ struct file_handle * fh_inline_file (void) { return inline_file; } /* Creates and returns a new file handle with the given ID, which may be null. If it is non-null, it must be a UTF-8 encoded string that is unique among existing file identifiers. The new handle is associated with file FILE_NAME and the given PROPERTIES. */ struct file_handle * fh_create_file (const char *id, const char *file_name, const char *file_name_encoding, const struct fh_properties *properties) { char *handle_name; struct file_handle *handle; handle_name = id != NULL ? xstrdup (id) : xasprintf ("`%s'", file_name); handle = create_handle (id, handle_name, FH_REF_FILE, properties->encoding); handle->file_name = xstrdup (file_name); handle->file_name_encoding = file_name_encoding ? xstrdup (file_name_encoding) : NULL; handle->mode = properties->mode; handle->line_ends = properties->line_ends; handle->record_width = properties->record_width; handle->tab_width = properties->tab_width; return handle; } /* Creates a new file handle with the given ID, which must be unique among existing file identifiers. The new handle is associated with a dataset file (initially empty). */ struct file_handle * fh_create_dataset (struct dataset *ds) { const char *name; struct file_handle *handle; name = dataset_name (ds); if (name[0] == '\0') name = _("active dataset"); handle = create_handle (NULL, xstrdup (name), FH_REF_DATASET, C_ENCODING); handle->ds = ds; return handle; } /* Returns a set of default properties for a file handle. */ const struct fh_properties * fh_default_properties (void) { #if defined _WIN32 || defined __WIN32__ #define DEFAULT_LINE_ENDS FH_END_CRLF #else #define DEFAULT_LINE_ENDS FH_END_LF #endif static const struct fh_properties default_properties = {FH_MODE_TEXT, DEFAULT_LINE_ENDS, 1024, 4, (char *) "Auto"}; return &default_properties; } /* Returns the identifier that may be used in syntax to name the given HANDLE, which takes the form of a PSPP identifier. If HANDLE has no identifier, returns a null pointer. Return value is owned by the file handle.*/ const char * fh_get_id (const struct file_handle *handle) { return handle->id; } /* Returns a user-friendly string to identify the given HANDLE. If HANDLE was created by referring to a file name, returns the file name, enclosed in double quotes. Return value is owned by the file handle. Useful for printing error messages about use of file handles. */ const char * fh_get_name (const struct file_handle *handle) { return handle->name; } /* Returns the type of object that HANDLE refers to. */ enum fh_referent fh_get_referent (const struct file_handle *handle) { return handle->referent; } /* Returns the name of the file associated with HANDLE. */ const char * fh_get_file_name (const struct file_handle *handle) { assert (handle->referent == FH_REF_FILE); return handle->file_name; } /* Returns the character encoding of the name of the file associated with HANDLE. */ const char * fh_get_file_name_encoding (const struct file_handle *handle) { assert (handle->referent == FH_REF_FILE); return handle->file_name_encoding; } /* Returns the mode of HANDLE. */ enum fh_mode fh_get_mode (const struct file_handle *handle) { assert (handle->referent == FH_REF_FILE); return handle->mode; } /* Returns the line ends of HANDLE, which must be a handle associated with a file. */ enum fh_line_ends fh_get_line_ends (const struct file_handle *handle) { assert (handle->referent == FH_REF_FILE); return handle->line_ends; } /* Returns the width of a logical record on HANDLE. */ size_t fh_get_record_width (const struct file_handle *handle) { assert (handle->referent & (FH_REF_FILE | FH_REF_INLINE)); return handle->record_width; } /* Returns the number of characters per tab stop for HANDLE, or zero if tabs are not to be expanded. Applicable only to FH_MODE_TEXT files. */ size_t fh_get_tab_width (const struct file_handle *handle) { assert (handle->referent & (FH_REF_FILE | FH_REF_INLINE)); return handle->tab_width; } /* Returns the encoding of characters read from HANDLE. */ const char * fh_get_encoding (const struct file_handle *handle) { return handle->encoding; } /* Returns the dataset handle associated with HANDLE. Applicable to only FH_REF_DATASET files. */ struct dataset * fh_get_dataset (const struct file_handle *handle) { assert (handle->referent == FH_REF_DATASET); return handle->ds; } /* Returns the current default handle. */ struct file_handle * fh_get_default_handle (void) { return default_handle ? default_handle : fh_inline_file (); } /* Sets NEW_DEFAULT_HANDLE as the default handle. */ void fh_set_default_handle (struct file_handle *new_default_handle) { assert (new_default_handle == NULL || (new_default_handle->referent & (FH_REF_INLINE | FH_REF_FILE))); if (default_handle != NULL && default_handle != inline_file) fh_unref (default_handle); default_handle = new_default_handle; if (default_handle != NULL) fh_ref (default_handle); } /* Information about a file handle's readers or writers. */ struct fh_lock { struct hmap_node node; /* hmap_node member. */ /* Hash key. */ enum fh_referent referent; /* Type of underlying file. */ union { struct file_identity *file; /* FH_REF_FILE only. */ unsigned int unique_id; /* FH_REF_DATASET only. */ } u; enum fh_access access; /* Type of file access. */ /* Number of openers. */ size_t open_cnt; /* Applicable only when open_cnt > 0. */ bool exclusive; /* No other openers allowed? */ const char *type; /* Human-readable type of file. */ void *aux; /* Owner's auxiliary data. */ }; static void make_key (struct fh_lock *, const struct file_handle *, enum fh_access); static void free_key (struct fh_lock *); static int compare_fh_locks (const struct fh_lock *a, const struct fh_lock *b); static unsigned int hash_fh_lock (const struct fh_lock *lock); /* Tries to lock handle H for the given kind of ACCESS and TYPE of file. Returns a pointer to a struct fh_lock if successful, otherwise a null pointer. H's referent type must be one of the bits in MASK. The caller must verify this ahead of time; we simply assert it here. TYPE is the sort of file, e.g. "system file". Only one type of access is allowed on a given file at a time for reading, and similarly for writing. If successful, a reference to TYPE is retained, so it should probably be a string literal. TYPE should be marked with N_() in the caller: that is, the caller should not translate it with gettext, but fh_lock will do so. ACCESS specifies whether the lock is for reading or writing. EXCLUSIVE is true to require exclusive access, false to allow sharing with other accessors. Exclusive read access precludes other readers, but not writers; exclusive write access precludes other writers, but not readers. A sharable read or write lock precludes reader or writers, respectively, of a different TYPE. A lock may be associated with auxiliary data. See fh_lock_get_aux and fh_lock_set_aux for more details. */ struct fh_lock * fh_lock (struct file_handle *h, enum fh_referent mask UNUSED, const char *type, enum fh_access access, bool exclusive) { struct fh_lock *key = NULL; size_t hash ; struct fh_lock *lock = NULL; bool found_lock = false; assert ((fh_get_referent (h) & mask) != 0); assert (access == FH_ACC_READ || access == FH_ACC_WRITE); key = xmalloc (sizeof *key); make_key (key, h, access); key->open_cnt = 1; key->exclusive = exclusive; key->type = type; key->aux = NULL; hash = hash_fh_lock (key); HMAP_FOR_EACH_WITH_HASH (lock, struct fh_lock, node, hash, &locks) { if ( 0 == compare_fh_locks (lock, key)) { found_lock = true; break; } } if ( found_lock ) { if (strcmp (lock->type, type)) { if (access == FH_ACC_READ) msg (SE, _("Can't read from %s as a %s because it is " "already being read as a %s."), fh_get_name (h), gettext (type), gettext (lock->type)); else msg (SE, _("Can't write to %s as a %s because it is " "already being written as a %s."), fh_get_name (h), gettext (type), gettext (lock->type)); return NULL; } else if (exclusive || lock->exclusive) { msg (SE, _("Can't re-open %s as a %s."), fh_get_name (h), gettext (type)); return NULL; } lock->open_cnt++; free_key (key); free (key); return lock; } hmap_insert (&locks, &key->node, hash); found_lock = false; HMAP_FOR_EACH_WITH_HASH (lock, struct fh_lock, node, hash, &locks) { if ( 0 == compare_fh_locks (lock, key)) { found_lock = true; break; } } assert (found_lock); return key; } /* Releases LOCK that was acquired with fh_lock. Returns true if LOCK is still locked, because other clients also had it locked. Returns false if LOCK has now been destroyed. In this case the caller must ensure that any auxiliary data associated with LOCK is destroyed, to avoid a memory leak. The caller must obtain a pointer to the auxiliary data, e.g. via fh_lock_get_aux *before* calling fh_unlock (because it yields undefined behavior to call fh_lock_get_aux on a destroyed lock). */ bool fh_unlock (struct fh_lock *lock) { if (lock != NULL) { assert (lock->open_cnt > 0); if (--lock->open_cnt == 0) { hmap_delete (&locks, &lock->node); free_key (lock); free (lock); return false; } } return true; } /* Returns auxiliary data for LOCK. Auxiliary data is shared by every client that holds LOCK (for an exclusive lock, this is a single client). To avoid leaks, auxiliary data must be released before LOCK is destroyed. */ void * fh_lock_get_aux (const struct fh_lock *lock) { return lock->aux; } /* Sets the auxiliary data for LOCK to AUX. */ void fh_lock_set_aux (struct fh_lock *lock, void *aux) { lock->aux = aux; } /* Returns true if HANDLE is locked for the given type of ACCESS, false otherwise. */ bool fh_is_locked (const struct file_handle *handle, enum fh_access access) { struct fh_lock key; const struct fh_lock *k = NULL; bool is_locked = false; size_t hash ; make_key (&key, handle, access); hash = hash_fh_lock (&key); HMAP_FOR_EACH_WITH_HASH (k, struct fh_lock, node, hash, &locks) { if ( 0 == compare_fh_locks (k, &key)) { is_locked = true; break; } } free_key (&key); return is_locked; } /* Initializes the key fields in LOCK for looking up or inserting handle H for the given kind of ACCESS. */ static void make_key (struct fh_lock *lock, const struct file_handle *h, enum fh_access access) { lock->referent = fh_get_referent (h); lock->access = access; if (lock->referent == FH_REF_FILE) lock->u.file = fh_get_identity (h); else if (lock->referent == FH_REF_DATASET) lock->u.unique_id = dataset_seqno (fh_get_dataset (h)); } /* Frees the key fields in LOCK. */ static void free_key (struct fh_lock *lock) { if (lock->referent == FH_REF_FILE) fh_free_identity (lock->u.file); } /* Compares the key fields in struct fh_lock objects A and B and returns a strcmp()-type result. */ static int compare_fh_locks (const struct fh_lock *a, const struct fh_lock *b) { if (a->referent != b->referent) return a->referent < b->referent ? -1 : 1; else if (a->access != b->access) return a->access < b->access ? -1 : 1; else if (a->referent == FH_REF_FILE) return fh_compare_file_identities (a->u.file, b->u.file); else if (a->referent == FH_REF_DATASET) return (a->u.unique_id < b->u.unique_id ? -1 : a->u.unique_id > b->u.unique_id); else return 0; } /* Returns a hash value for LOCK. */ static unsigned int hash_fh_lock (const struct fh_lock *lock) { unsigned int basis; if (lock->referent == FH_REF_FILE) basis = fh_hash_identity (lock->u.file); else if (lock->referent == FH_REF_DATASET) basis = lock->u.unique_id; else basis = 0; return hash_int ((lock->referent << 3) | lock->access, basis); } /* A file's identity: - For a file that exists, this is its device and inode. - For a file that does not exist, but which has a directory name that exists, this is the device and inode of the directory, plus the file's base name. - For a file that does not exist and has a nonexistent directory, this is the file name. Windows doesn't have inode numbers, so we just use the name there. */ struct file_identity { unsigned long long device; /* Device number. */ unsigned long long inode; /* Inode number. */ char *name; /* File name, where needed, otherwise NULL. */ }; /* Returns a pointer to a dynamically allocated structure whose value can be used to tell whether two files are actually the same file. The caller is responsible for freeing the structure with fh_free_identity() when finished. */ static struct file_identity * fh_get_identity (const struct file_handle *fh) { struct file_identity *identity = xmalloc (sizeof *identity); const char *file_name = fh_get_file_name (fh); #if !(defined _WIN32 || defined __WIN32__) struct stat s; if (lstat (file_name, &s) == 0) { identity->device = s.st_dev; identity->inode = s.st_ino; identity->name = NULL; } else { char *dir = dir_name (file_name); if (last_component (file_name) != NULL && stat (dir, &s) == 0) { identity->device = s.st_dev; identity->inode = s.st_ino; identity->name = base_name (file_name); } else { identity->device = 0; identity->inode = 0; identity->name = xstrdup (file_name); } free (dir); } #else /* Windows */ bool ok = false; HANDLE h = CreateFile (file_name, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL); if (h != INVALID_HANDLE_VALUE) { BY_HANDLE_FILE_INFORMATION fi; ok = GetFileInformationByHandle (h, &fi); if (ok) { identity->device = fi.dwVolumeSerialNumber; identity->inode = fi.nFileIndexHigh; identity->inode <<= (sizeof fi.nFileIndexLow) * CHAR_BIT; identity->inode |= fi.nFileIndexLow; identity->name = 0; } CloseHandle (h); } if (!ok) { identity->device = 0; identity->inode = 0; size_t bufsize; size_t pathlen = 255; char *cname = NULL; do { bufsize = pathlen; cname = xrealloc (cname, bufsize); pathlen = GetFullPathName (file_name, bufsize, cname, NULL); } while (pathlen > bufsize); identity->name = xstrdup (cname); free (cname); str_lowercase (identity->name); } #endif /* Windows */ return identity; } /* Frees IDENTITY obtained from fh_get_identity(). */ void fh_free_identity (struct file_identity *identity) { if (identity != NULL) { free (identity->name); free (identity); } } /* Compares A and B, returning a strcmp()-type result. */ int fh_compare_file_identities (const struct file_identity *a, const struct file_identity *b) { if (a->device != b->device) return a->device < b->device ? -1 : 1; else if (a->inode != b->inode) return a->inode < b->inode ? -1 : 1; else if (a->name != NULL) return b->name != NULL ? strcmp (a->name, b->name) : 1; else return b->name != NULL ? -1 : 0; } /* Returns a hash value for IDENTITY. */ unsigned int fh_hash_identity (const struct file_identity *identity) { unsigned int hash = hash_int (identity->device, identity->inode); if (identity->name != NULL) hash = hash_string (identity->name, hash); return hash; } pspp-1.0.1/src/data/dataset.c0000644000175000017500000006671312671322442012725 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/dataset.h" #include #include #include #include #include "data/case.h" #include "data/case-map.h" #include "data/caseinit.h" #include "data/casereader.h" #include "data/casereader-provider.h" #include "data/casereader-shim.h" #include "data/casewriter.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/session.h" #include "data/transformations.h" #include "data/variable.h" #include "libpspp/deque.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "libpspp/taint.h" #include "libpspp/i18n.h" #include "gl/minmax.h" #include "gl/xalloc.h" struct dataset { /* A dataset is usually part of a session. Within a session its name must unique. The name must either be a valid PSPP identifier or the empty string. (It must be unique within the session even if it is the empty string; that is, there may only be a single dataset within a session with the empty string as its name.) */ struct session *session; char *name; enum dataset_display display; /* Cases are read from source, their transformation variables are initialized, pass through permanent_trns_chain (which transforms them into the format described by permanent_dict), are written to sink, pass through temporary_trns_chain (which transforms them into the format described by dict), and are finally passed to the procedure. */ struct casereader *source; struct caseinit *caseinit; struct trns_chain *permanent_trns_chain; struct dictionary *permanent_dict; struct casewriter *sink; struct trns_chain *temporary_trns_chain; struct dictionary *dict; /* If true, cases are discarded instead of being written to sink. */ bool discard_output; /* The transformation chain that the next transformation will be added to. */ struct trns_chain *cur_trns_chain; /* The case map used to compact a case, if necessary; otherwise a null pointer. */ struct case_map *compactor; /* Time at which proc was last invoked. */ time_t last_proc_invocation; /* Cases just before ("lagging") the current one. */ int n_lag; /* Number of cases to lag. */ struct deque lag; /* Deque of lagged cases. */ struct ccase **lag_cases; /* Lagged cases managed by deque. */ /* Procedure data. */ enum { PROC_COMMITTED, /* No procedure in progress. */ PROC_OPEN, /* proc_open called, casereader still open. */ PROC_CLOSED /* casereader from proc_open destroyed, but proc_commit not yet called. */ } proc_state; casenumber cases_written; /* Cases output so far. */ bool ok; /* Error status. */ struct casereader_shim *shim; /* Shim on proc_open() casereader. */ const struct dataset_callbacks *callbacks; void *cb_data; /* Uniquely distinguishes datasets. */ unsigned int seqno; }; static void dataset_changed__ (struct dataset *); static void dataset_transformations_changed__ (struct dataset *, bool non_empty); static void add_case_limit_trns (struct dataset *ds); static void add_filter_trns (struct dataset *ds); static void update_last_proc_invocation (struct dataset *ds); static void dict_callback (struct dictionary *d UNUSED, void *ds_) { struct dataset *ds = ds_; dataset_changed__ (ds); } static void dataset_create_finish__ (struct dataset *ds, struct session *session) { static unsigned int seqno; dict_set_change_callback (ds->dict, dict_callback, ds); proc_cancel_all_transformations (ds); dataset_set_session (ds, session); ds->seqno = ++seqno; } /* Creates a new dataset named NAME, adds it to SESSION, and returns it. If SESSION already contains a dataset named NAME, it is deleted and replaced. The dataset initially has an empty dictionary and no data source. */ struct dataset * dataset_create (struct session *session, const char *name) { struct dataset *ds; ds = xzalloc (sizeof *ds); ds->name = xstrdup (name); ds->display = DATASET_FRONT; ds->dict = dict_create (get_default_encoding ()); ds->caseinit = caseinit_create (); dataset_create_finish__ (ds, session); return ds; } /* Creates and returns a new dataset that has the same data and dictionary as OLD named NAME, adds it to the same session as OLD, and returns the new dataset. If SESSION already contains a dataset named NAME, it is deleted and replaced. OLD must not have any active transformations or temporary state and must not be in the middle of a procedure. Callbacks are not cloned. */ struct dataset * dataset_clone (struct dataset *old, const char *name) { struct dataset *new; assert (old->proc_state == PROC_COMMITTED); assert (trns_chain_is_empty (old->permanent_trns_chain)); assert (old->permanent_dict == NULL); assert (old->sink == NULL); assert (old->temporary_trns_chain == NULL); new = xzalloc (sizeof *new); new->name = xstrdup (name); new->display = DATASET_FRONT; new->source = casereader_clone (old->source); new->dict = dict_clone (old->dict); new->caseinit = caseinit_clone (old->caseinit); new->last_proc_invocation = old->last_proc_invocation; new->ok = old->ok; dataset_create_finish__ (new, old->session); return new; } /* Destroys DS. */ void dataset_destroy (struct dataset *ds) { if (ds != NULL) { dataset_set_session (ds, NULL); dataset_clear (ds); dict_destroy (ds->dict); caseinit_destroy (ds->caseinit); trns_chain_destroy (ds->permanent_trns_chain); dataset_transformations_changed__ (ds, false); free (ds->name); free (ds); } } /* Discards the active dataset's dictionary, data, and transformations. */ void dataset_clear (struct dataset *ds) { assert (ds->proc_state == PROC_COMMITTED); dict_clear (ds->dict); fh_set_default_handle (NULL); ds->n_lag = 0; casereader_destroy (ds->source); ds->source = NULL; proc_cancel_all_transformations (ds); } const char * dataset_name (const struct dataset *ds) { return ds->name; } void dataset_set_name (struct dataset *ds, const char *name) { struct session *session = ds->session; bool active = false; if (session != NULL) { active = session_active_dataset (session) == ds; if (active) session_set_active_dataset (session, NULL); dataset_set_session (ds, NULL); } free (ds->name); ds->name = xstrdup (name); if (session != NULL) { dataset_set_session (ds, session); if (active) session_set_active_dataset (session, ds); } } struct session * dataset_session (const struct dataset *ds) { return ds->session; } void dataset_set_session (struct dataset *ds, struct session *session) { if (session != ds->session) { if (ds->session != NULL) session_remove_dataset (ds->session, ds); if (session != NULL) session_add_dataset (session, ds); } } /* Returns the dictionary within DS. This is always nonnull, although it might not contain any variables. */ struct dictionary * dataset_dict (const struct dataset *ds) { return ds->dict; } /* Replaces DS's dictionary by DICT, discarding any source and transformations. */ void dataset_set_dict (struct dataset *ds, struct dictionary *dict) { assert (ds->proc_state == PROC_COMMITTED); assert (ds->dict != dict); dataset_clear (ds); dict_destroy (ds->dict); ds->dict = dict; dict_set_change_callback (ds->dict, dict_callback, ds); } /* Returns the casereader that will be read when a procedure is executed on DS. This can be NULL if none has been set up yet. */ const struct casereader * dataset_source (const struct dataset *ds) { return ds->source; } /* Returns true if DS has a data source, false otherwise. */ bool dataset_has_source (const struct dataset *ds) { return dataset_source (ds) != NULL; } /* Replaces the active dataset's data by READER. READER's cases must have an appropriate format for DS's dictionary. */ bool dataset_set_source (struct dataset *ds, struct casereader *reader) { casereader_destroy (ds->source); ds->source = reader; caseinit_clear (ds->caseinit); caseinit_mark_as_preinited (ds->caseinit, ds->dict); return reader == NULL || !casereader_error (reader); } /* Returns the data source from DS and removes it from DS. Returns a null pointer if DS has no data source. */ struct casereader * dataset_steal_source (struct dataset *ds) { struct casereader *reader = ds->source; ds->source = NULL; return reader; } /* Returns a number unique to DS. It can be used to distinguish one dataset from any other within a given program run, even datasets that do not exist at the same time. */ unsigned int dataset_seqno (const struct dataset *ds) { return ds->seqno; } void dataset_set_callbacks (struct dataset *ds, const struct dataset_callbacks *callbacks, void *cb_data) { ds->callbacks = callbacks; ds->cb_data = cb_data; } enum dataset_display dataset_get_display (const struct dataset *ds) { return ds->display; } void dataset_set_display (struct dataset *ds, enum dataset_display display) { ds->display = display; } /* Returns the last time the data was read. */ time_t time_of_last_procedure (struct dataset *ds) { if (ds->last_proc_invocation == 0) update_last_proc_invocation (ds); return ds->last_proc_invocation; } /* Regular procedure. */ /* Executes any pending transformations, if necessary. This is not identical to the EXECUTE command in that it won't always read the source data. This can be important when the source data is given inline within BEGIN DATA...END FILE. */ bool proc_execute (struct dataset *ds) { bool ok; if ((ds->temporary_trns_chain == NULL || trns_chain_is_empty (ds->temporary_trns_chain)) && trns_chain_is_empty (ds->permanent_trns_chain)) { ds->n_lag = 0; ds->discard_output = false; dict_set_case_limit (ds->dict, 0); dict_clear_vectors (ds->dict); return true; } ok = casereader_destroy (proc_open (ds)); return proc_commit (ds) && ok; } static const struct casereader_class proc_casereader_class; /* Opens dataset DS for reading cases with proc_read. If FILTER is true, then cases filtered out with FILTER BY will not be included in the casereader (which is usually desirable). If FILTER is false, all cases will be included regardless of FILTER BY settings. proc_commit must be called when done. */ struct casereader * proc_open_filtering (struct dataset *ds, bool filter) { struct casereader *reader; assert (ds->source != NULL); assert (ds->proc_state == PROC_COMMITTED); update_last_proc_invocation (ds); caseinit_mark_for_init (ds->caseinit, ds->dict); /* Finish up the collection of transformations. */ add_case_limit_trns (ds); if (filter) add_filter_trns (ds); trns_chain_finalize (ds->cur_trns_chain); /* Make permanent_dict refer to the dictionary right before data reaches the sink. */ if (ds->permanent_dict == NULL) ds->permanent_dict = ds->dict; /* Prepare sink. */ if (!ds->discard_output) { struct dictionary *pd = ds->permanent_dict; size_t compacted_value_cnt = dict_count_values (pd, 1u << DC_SCRATCH); if (compacted_value_cnt < dict_get_next_value_idx (pd)) { struct caseproto *compacted_proto; compacted_proto = dict_get_compacted_proto (pd, 1u << DC_SCRATCH); ds->compactor = case_map_to_compact_dict (pd, 1u << DC_SCRATCH); ds->sink = autopaging_writer_create (compacted_proto); caseproto_unref (compacted_proto); } else { ds->compactor = NULL; ds->sink = autopaging_writer_create (dict_get_proto (pd)); } } else { ds->compactor = NULL; ds->sink = NULL; } /* Allocate memory for lagged cases. */ ds->lag_cases = deque_init (&ds->lag, ds->n_lag, sizeof *ds->lag_cases); ds->proc_state = PROC_OPEN; ds->cases_written = 0; ds->ok = true; /* FIXME: use taint in dataset in place of `ok'? */ /* FIXME: for trivial cases we can just return a clone of ds->source? */ /* Create casereader and insert a shim on top. The shim allows us to arbitrarily extend the casereader's lifetime, by slurping the cases into the shim's buffer in proc_commit(). That is especially useful when output table_items are generated directly from the procedure casereader (e.g. by the LIST procedure) when we are using an output driver that keeps a reference to the output items passed to it (e.g. the GUI output driver in PSPPIRE). */ reader = casereader_create_sequential (NULL, dict_get_proto (ds->dict), CASENUMBER_MAX, &proc_casereader_class, ds); ds->shim = casereader_shim_insert (reader); return reader; } /* Opens dataset DS for reading cases with proc_read. proc_commit must be called when done. */ struct casereader * proc_open (struct dataset *ds) { return proc_open_filtering (ds, true); } /* Returns true if a procedure is in progress, that is, if proc_open has been called but proc_commit has not. */ bool proc_is_open (const struct dataset *ds) { return ds->proc_state != PROC_COMMITTED; } /* "read" function for procedure casereader. */ static struct ccase * proc_casereader_read (struct casereader *reader UNUSED, void *ds_) { struct dataset *ds = ds_; enum trns_result retval = TRNS_DROP_CASE; struct ccase *c; assert (ds->proc_state == PROC_OPEN); for (; ; case_unref (c)) { casenumber case_nr; assert (retval == TRNS_DROP_CASE || retval == TRNS_ERROR); if (retval == TRNS_ERROR) ds->ok = false; if (!ds->ok) return NULL; /* Read a case from source. */ c = casereader_read (ds->source); if (c == NULL) return NULL; c = case_unshare_and_resize (c, dict_get_proto (ds->dict)); caseinit_init_vars (ds->caseinit, c); /* Execute permanent transformations. */ case_nr = ds->cases_written + 1; retval = trns_chain_execute (ds->permanent_trns_chain, TRNS_CONTINUE, &c, case_nr); caseinit_update_left_vars (ds->caseinit, c); if (retval != TRNS_CONTINUE) continue; /* Write case to collection of lagged cases. */ if (ds->n_lag > 0) { while (deque_count (&ds->lag) >= ds->n_lag) case_unref (ds->lag_cases[deque_pop_back (&ds->lag)]); ds->lag_cases[deque_push_front (&ds->lag)] = case_ref (c); } /* Write case to replacement dataset. */ ds->cases_written++; if (ds->sink != NULL) casewriter_write (ds->sink, case_map_execute (ds->compactor, case_ref (c))); /* Execute temporary transformations. */ if (ds->temporary_trns_chain != NULL) { retval = trns_chain_execute (ds->temporary_trns_chain, TRNS_CONTINUE, &c, ds->cases_written); if (retval != TRNS_CONTINUE) continue; } return c; } } /* "destroy" function for procedure casereader. */ static void proc_casereader_destroy (struct casereader *reader, void *ds_) { struct dataset *ds = ds_; struct ccase *c; /* We are always the subreader for a casereader_buffer, so if we're being destroyed then it's because the casereader_buffer has read all the cases that it ever will. */ ds->shim = NULL; /* Make sure transformations happen for every input case, in case they have side effects, and ensure that the replacement active dataset gets all the cases it should. */ while ((c = casereader_read (reader)) != NULL) case_unref (c); ds->proc_state = PROC_CLOSED; ds->ok = casereader_destroy (ds->source) && ds->ok; ds->source = NULL; dataset_set_source (ds, NULL); } /* Must return false if the source casereader, a transformation, or the sink casewriter signaled an error. (If a temporary transformation signals an error, then the return value is false, but the replacement active dataset may still be untainted.) */ bool proc_commit (struct dataset *ds) { if (ds->shim != NULL) casereader_shim_slurp (ds->shim); assert (ds->proc_state == PROC_CLOSED); ds->proc_state = PROC_COMMITTED; dataset_changed__ (ds); /* Free memory for lagged cases. */ while (!deque_is_empty (&ds->lag)) case_unref (ds->lag_cases[deque_pop_back (&ds->lag)]); free (ds->lag_cases); /* Dictionary from before TEMPORARY becomes permanent. */ proc_cancel_temporary_transformations (ds); if (!ds->discard_output) { /* Finish compacting. */ if (ds->compactor != NULL) { case_map_destroy (ds->compactor); ds->compactor = NULL; dict_delete_scratch_vars (ds->dict); dict_compact_values (ds->dict); } /* Old data sink becomes new data source. */ if (ds->sink != NULL) ds->source = casewriter_make_reader (ds->sink); } else { ds->source = NULL; ds->discard_output = false; } ds->sink = NULL; caseinit_clear (ds->caseinit); caseinit_mark_as_preinited (ds->caseinit, ds->dict); dict_clear_vectors (ds->dict); ds->permanent_dict = NULL; return proc_cancel_all_transformations (ds) && ds->ok; } /* Casereader class for procedure execution. */ static const struct casereader_class proc_casereader_class = { proc_casereader_read, proc_casereader_destroy, NULL, NULL, }; /* Updates last_proc_invocation. */ static void update_last_proc_invocation (struct dataset *ds) { ds->last_proc_invocation = time (NULL); } /* Returns a pointer to the lagged case from N_BEFORE cases before the current one, or NULL if there haven't been that many cases yet. */ const struct ccase * lagged_case (const struct dataset *ds, int n_before) { assert (n_before >= 1); assert (n_before <= ds->n_lag); if (n_before <= deque_count (&ds->lag)) return ds->lag_cases[deque_front (&ds->lag, n_before - 1)]; else return NULL; } /* Returns the current set of permanent transformations, and clears the permanent transformations. For use by INPUT PROGRAM. */ struct trns_chain * proc_capture_transformations (struct dataset *ds) { struct trns_chain *chain; assert (ds->temporary_trns_chain == NULL); chain = ds->permanent_trns_chain; ds->cur_trns_chain = ds->permanent_trns_chain = trns_chain_create (); dataset_transformations_changed__ (ds, false); return chain; } /* Adds a transformation that processes a case with PROC and frees itself with FREE to the current set of transformations. The functions are passed AUX as auxiliary data. */ void add_transformation (struct dataset *ds, trns_proc_func *proc, trns_free_func *free, void *aux) { trns_chain_append (ds->cur_trns_chain, NULL, proc, free, aux); dataset_transformations_changed__ (ds, true); } /* Adds a transformation that processes a case with PROC and frees itself with FREE to the current set of transformations. When parsing of the block of transformations is complete, FINALIZE will be called. The functions are passed AUX as auxiliary data. */ void add_transformation_with_finalizer (struct dataset *ds, trns_finalize_func *finalize, trns_proc_func *proc, trns_free_func *free, void *aux) { trns_chain_append (ds->cur_trns_chain, finalize, proc, free, aux); dataset_transformations_changed__ (ds, true); } /* Returns the index of the next transformation. This value can be returned by a transformation procedure function to indicate a "jump" to that transformation. */ size_t next_transformation (const struct dataset *ds) { return trns_chain_next (ds->cur_trns_chain); } /* Returns true if the next call to add_transformation() will add a temporary transformation, false if it will add a permanent transformation. */ bool proc_in_temporary_transformations (const struct dataset *ds) { return ds->temporary_trns_chain != NULL; } /* Marks the start of temporary transformations. Further calls to add_transformation() will add temporary transformations. */ void proc_start_temporary_transformations (struct dataset *ds) { if (!proc_in_temporary_transformations (ds)) { add_case_limit_trns (ds); ds->permanent_dict = dict_clone (ds->dict); trns_chain_finalize (ds->permanent_trns_chain); ds->temporary_trns_chain = ds->cur_trns_chain = trns_chain_create (); dataset_transformations_changed__ (ds, true); } } /* Converts all the temporary transformations, if any, to permanent transformations. Further transformations will be permanent. The FILTER command is implemented as a temporary transformation, so a procedure that uses this function should usually use proc_open_filtering() with FILTER false, instead of plain proc_open(). Returns true if anything changed, false otherwise. */ bool proc_make_temporary_transformations_permanent (struct dataset *ds) { if (proc_in_temporary_transformations (ds)) { trns_chain_finalize (ds->temporary_trns_chain); trns_chain_splice (ds->permanent_trns_chain, ds->temporary_trns_chain); ds->temporary_trns_chain = NULL; ds->cur_trns_chain = ds->permanent_trns_chain; dict_destroy (ds->permanent_dict); ds->permanent_dict = NULL; return true; } else return false; } /* Cancels all temporary transformations, if any. Further transformations will be permanent. Returns true if anything changed, false otherwise. */ bool proc_cancel_temporary_transformations (struct dataset *ds) { if (proc_in_temporary_transformations (ds)) { dict_destroy (ds->dict); ds->dict = ds->permanent_dict; ds->permanent_dict = NULL; trns_chain_destroy (ds->temporary_trns_chain); ds->temporary_trns_chain = NULL; dataset_transformations_changed__ ( ds, !trns_chain_is_empty (ds->permanent_trns_chain)); return true; } else return false; } /* Cancels all transformations, if any. Returns true if successful, false on I/O error. */ bool proc_cancel_all_transformations (struct dataset *ds) { bool ok; assert (ds->proc_state == PROC_COMMITTED); ok = trns_chain_destroy (ds->permanent_trns_chain); ok = trns_chain_destroy (ds->temporary_trns_chain) && ok; ds->permanent_trns_chain = ds->cur_trns_chain = trns_chain_create (); ds->temporary_trns_chain = NULL; dataset_transformations_changed__ (ds, false); return ok; } static int store_case_num (void *var_, struct ccase **cc, casenumber case_num) { struct variable *var = var_; *cc = case_unshare (*cc); case_data_rw (*cc, var)->f = case_num; return TRNS_CONTINUE; } /* Add a variable which we can sort by to get back the original order. */ struct variable * add_permanent_ordering_transformation (struct dataset *ds) { struct variable *temp_var; temp_var = dict_create_var_assert (ds->dict, "$ORDER", 0); if (proc_in_temporary_transformations (ds)) { struct variable *perm_var; perm_var = dict_clone_var_in_place_assert (ds->permanent_dict, temp_var); trns_chain_append (ds->permanent_trns_chain, NULL, store_case_num, NULL, perm_var); trns_chain_finalize (ds->permanent_trns_chain); } else add_transformation (ds, store_case_num, NULL, temp_var); return temp_var; } /* Causes output from the next procedure to be discarded, instead of being preserved for use as input for the next procedure. */ void proc_discard_output (struct dataset *ds) { ds->discard_output = true; } /* Checks whether DS has a corrupted active dataset. If so, discards it and returns false. If not, returns true without doing anything. */ bool dataset_end_of_command (struct dataset *ds) { if (ds->source != NULL) { if (casereader_error (ds->source)) { dataset_clear (ds); return false; } else { const struct taint *taint = casereader_get_taint (ds->source); taint_reset_successor_taint (CONST_CAST (struct taint *, taint)); assert (!taint_has_tainted_successor (taint)); } } return true; } static trns_proc_func case_limit_trns_proc; static trns_free_func case_limit_trns_free; /* Adds a transformation that limits the number of cases that may pass through, if DS->DICT has a case limit. */ static void add_case_limit_trns (struct dataset *ds) { casenumber case_limit = dict_get_case_limit (ds->dict); if (case_limit != 0) { casenumber *cases_remaining = xmalloc (sizeof *cases_remaining); *cases_remaining = case_limit; add_transformation (ds, case_limit_trns_proc, case_limit_trns_free, cases_remaining); dict_set_case_limit (ds->dict, 0); } } /* Limits the maximum number of cases processed to *CASES_REMAINING. */ static int case_limit_trns_proc (void *cases_remaining_, struct ccase **c UNUSED, casenumber case_nr UNUSED) { size_t *cases_remaining = cases_remaining_; if (*cases_remaining > 0) { (*cases_remaining)--; return TRNS_CONTINUE; } else return TRNS_DROP_CASE; } /* Frees the data associated with a case limit transformation. */ static bool case_limit_trns_free (void *cases_remaining_) { size_t *cases_remaining = cases_remaining_; free (cases_remaining); return true; } static trns_proc_func filter_trns_proc; /* Adds a temporary transformation to filter data according to the variable specified on FILTER, if any. */ static void add_filter_trns (struct dataset *ds) { struct variable *filter_var = dict_get_filter (ds->dict); if (filter_var != NULL) { proc_start_temporary_transformations (ds); add_transformation (ds, filter_trns_proc, NULL, filter_var); } } /* FILTER transformation. */ static int filter_trns_proc (void *filter_var_, struct ccase **c UNUSED, casenumber case_nr UNUSED) { struct variable *filter_var = filter_var_; double f = case_num (*c, filter_var); return (f != 0.0 && !var_is_num_missing (filter_var, f, MV_ANY) ? TRNS_CONTINUE : TRNS_DROP_CASE); } void dataset_need_lag (struct dataset *ds, int n_before) { ds->n_lag = MAX (ds->n_lag, n_before); } static void dataset_changed__ (struct dataset *ds) { if (ds->callbacks != NULL && ds->callbacks->changed != NULL) ds->callbacks->changed (ds->cb_data); } static void dataset_transformations_changed__ (struct dataset *ds, bool non_empty) { if (ds->callbacks != NULL && ds->callbacks->transformations_changed != NULL) ds->callbacks->transformations_changed (non_empty, ds->cb_data); } /* Private interface for use by session code. */ void dataset_set_session__ (struct dataset *ds, struct session *session) { ds->session = session; } pspp-1.0.1/src/data/sys-file-private.c0000644000175000017500000002154012470242646014474 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/sys-file-private.h" #include "data/dictionary.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/misc.h" #include "gl/c-strcase.h" #include "gl/minmax.h" #include "gl/xalloc.h" /* Number of bytes really stored in each segment of a very long string variable. */ #define REAL_VLS_CHUNK 255 /* Number of bytes per segment by which the amount of space for very long string variables is allocated. */ #define EFFECTIVE_VLS_CHUNK 252 /* Returns true if WIDTH is a very long string width, false otherwise. */ static bool is_very_long (int width) { return width >= 256; } /* Returns the smaller of A or B. (Defined as a function to avoid evaluating A or B more than once.) */ static int min_int (int a, int b) { return MIN (a, b); } /* Returns the larger of A or B. (Defined as a function to avoid evaluating A or B more than once.) */ static int max_int (int a, int b) { return MAX (a, b); } /* Returns the number of bytes of uncompressed case data used for writing a variable of the given WIDTH to a system file. All required space is included, including trailing padding and internal padding. */ static int sfm_width_to_bytes (int width) { int bytes; assert (width >= 0); if (width == 0) bytes = 8; else if (!is_very_long (width)) bytes = width; else { int chunks = width / EFFECTIVE_VLS_CHUNK; int remainder = width % EFFECTIVE_VLS_CHUNK; bytes = remainder + (chunks * ROUND_UP (REAL_VLS_CHUNK, 8)); } return ROUND_UP (bytes, 8); } /* Returns the number of 8-byte units (octs) used to write data for a variable of the given WIDTH. */ int sfm_width_to_octs (int width) { return sfm_width_to_bytes (width) / 8; } /* Returns the number of "segments" used for writing case data for a variable of the given WIDTH. A segment is a physical variable in the system file that represents some piece of a logical variable as seen by a PSPP user. Only very long string variables have more than one segment. */ int sfm_width_to_segments (int width) { assert (width >= 0); return !is_very_long (width) ? 1 : DIV_RND_UP (width, EFFECTIVE_VLS_CHUNK); } /* Returns the width to allocate to the given SEGMENT within a variable of the given WIDTH. A segment is a physical variable in the system file that represents some piece of a logical variable as seen by a PSPP user. */ int sfm_segment_alloc_width (int width, int segment) { assert (segment < sfm_width_to_segments (width)); return (!is_very_long (width) ? width : segment < sfm_width_to_segments (width) - 1 ? 255 : width - segment * EFFECTIVE_VLS_CHUNK); } /* Returns the number of bytes to allocate to the given SEGMENT within a variable of the given width. This is the same as sfm_segment_alloc_width, except that a numeric value takes up 8 bytes despite having a width of 0. */ static int sfm_segment_alloc_bytes (int width, int segment) { assert (segment < sfm_width_to_segments (width)); return (width == 0 ? 8 : ROUND_UP (sfm_segment_alloc_width (width, segment), 8)); } /* Returns the number of bytes in the given SEGMENT within a variable of the given WIDTH that are actually used to store data. For a numeric value (WIDTH of 0), this is 8 bytes; for a string value less than 256 bytes wide, it is WIDTH bytes. For very long string values, the calculation is more complicated and ranges between 255 bytes for the first segment to as little as 0 bytes for final segments. */ static int sfm_segment_used_bytes (int width, int segment) { assert (segment < sfm_width_to_segments (width)); return (width == 0 ? 8 : !is_very_long (width) ? width : max_int (0, min_int (width - REAL_VLS_CHUNK * segment, REAL_VLS_CHUNK))); } /* Returns the number of bytes at the end of the given SEGMENT within a variable of the given WIDTH that are not used for data; that is, the number of bytes that must be padded with data that a reader ignores. */ static int sfm_segment_padding (int width, int segment) { return (sfm_segment_alloc_bytes (width, segment) - sfm_segment_used_bytes (width, segment)); } /* Returns the byte offset of the start of the given SEGMENT within a variable of the given WIDTH. The first segment starts at offset 0; only very long string variables have any other segments. */ static int sfm_segment_offset (int width, int segment) { assert (segment < sfm_width_to_segments (width)); return min_int (REAL_VLS_CHUNK * segment, width); } /* Returns the byte offset of the start of the given SEGMENT within a variable of the given WIDTH, given the (incorrect) assumption that there are EFFECTIVE_VLS_CHUNK bytes per segment. (Use of this function is questionable at best.) */ int sfm_segment_effective_offset (int width, int segment) { assert (segment < sfm_width_to_segments (width)); return EFFECTIVE_VLS_CHUNK * segment; } /* Creates and initializes an array of struct sfm_vars that describe how a case drawn from dictionary DICT is laid out in a system file. Returns the number of segments in a case. A segment is a physical variable in the system file that represents some piece of a logical variable as seen by a PSPP user. The array is allocated with malloc and stored in *SFM_VARS, and its number of elements is stored in *SFM_VAR_CNT. The caller is responsible for freeing it when it is no longer needed. */ int sfm_dictionary_to_sfm_vars (const struct dictionary *dict, struct sfm_var **sfm_vars, size_t *sfm_var_cnt) { size_t var_cnt = dict_get_var_cnt (dict); size_t segment_cnt; size_t i; /* Estimate the number of sfm_vars that will be needed. We might not need all of these, because very long string variables can have segments that are all padding, which do not need sfm_vars of their own. */ segment_cnt = 0; for (i = 0; i < var_cnt; i++) { const struct variable *v = dict_get_var (dict, i); segment_cnt += sfm_width_to_segments (var_get_width (v)); } /* Compose the sfm_vars. */ *sfm_vars = xnmalloc (segment_cnt, sizeof **sfm_vars); *sfm_var_cnt = 0; for (i = 0; i < var_cnt; i++) { const struct variable *dv = dict_get_var (dict, i); int width = var_get_width (dv); int j; for (j = 0; j < sfm_width_to_segments (width); j++) { int used_bytes = sfm_segment_used_bytes (width, j); int padding = sfm_segment_padding (width, j); struct sfm_var *sv; if (used_bytes != 0) { sv = &(*sfm_vars)[(*sfm_var_cnt)++]; sv->var_width = width; sv->segment_width = width == 0 ? 0 : used_bytes; sv->case_index = var_get_case_index (dv); sv->offset = sfm_segment_offset (width, j); sv->padding = padding; } else { /* Segment is all padding. Just add it to the previous segment. */ sv = &(*sfm_vars)[*sfm_var_cnt - 1]; sv->padding += padding; } assert ((sv->segment_width + sv->padding) % 8 == 0); } } return segment_cnt; } /* Given the name of an encoding, returns the codepage number to use in the 'character_code' member of the machine integer info record for writing a system file. */ int sys_get_codepage_from_encoding (const char *name) { const struct sys_encoding *e; for (e = sys_codepage_name_to_number; e->name != NULL; e++) if (!c_strcasecmp (name, e->name)) return e->number; return 0; } /* Given a codepage number from the 'character_code' member of the machine integer info record in a system file, returns a corresponding encoding name. Most encodings have multiple aliases; the one returned is the one that would be used in the character encoding record. */ const char * sys_get_encoding_from_codepage (int codepage) { const struct sys_encoding *e; for (e = sys_codepage_number_to_name; e->name != NULL; e++) if (codepage == e->number) return e->name; return NULL; } pspp-1.0.1/src/data/pc+-file-reader.c0000644000175000017500000011506613150407273014125 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-2000, 2006-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include "data/any-reader.h" #include "data/case.h" #include "data/casereader-provider.h" #include "data/casereader.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/file-name.h" #include "data/format.h" #include "data/identifier.h" #include "data/missing-values.h" #include "data/value-labels.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/float-format.h" #include "libpspp/i18n.h" #include "libpspp/integer-format.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/localcharset.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gl/xsize.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) struct pcp_dir_entry { unsigned int ofs; unsigned int len; }; struct pcp_directory { struct pcp_dir_entry main; struct pcp_dir_entry variables; struct pcp_dir_entry labels; struct pcp_dir_entry data; }; struct pcp_main_header { char product[63]; /* "PCSPSS SYSTEM FILE..." */ unsigned int nominal_case_size; /* Number of var positions. */ char creation_date[9]; /* "[m]m/dd/yy". */ char creation_time[9]; /* "[H]H:MM:SS". */ char file_label[65]; /* File label. */ unsigned int weight_index; /* Index of weighting variable, 0 if none. */ }; struct pcp_var_record { unsigned int pos; char name[9]; int width; struct fmt_spec format; uint8_t missing[8]; char *label; bool weight; struct pcp_value_label *val_labs; size_t n_val_labs; struct variable *var; }; struct pcp_value_label { uint8_t value[8]; char *label; }; /* System file reader. */ struct pcp_reader { struct any_reader any_reader; /* Resource tracking. */ struct pool *pool; /* All system file state. */ /* File data. */ unsigned int file_size; struct any_read_info info; struct pcp_directory directory; struct pcp_main_header header; struct pcp_var_record *vars; size_t n_vars; /* File state. */ struct file_handle *fh; /* File handle. */ struct fh_lock *lock; /* Mutual exclusion for file handle. */ FILE *file; /* File stream. */ unsigned int pos; /* Position in file. */ bool error; /* I/O or corruption error? */ struct caseproto *proto; /* Format of output cases. */ /* File format. */ unsigned int n_cases; /* Number of cases */ const char *encoding; /* String encoding. */ /* Decompression. */ bool compressed; uint8_t opcodes[8]; /* Current block of opcodes. */ size_t opcode_idx; /* Next opcode to interpret, 8 if none left. */ bool corruption_warning; /* Warned about possible corruption? */ }; static struct pcp_reader * pcp_reader_cast (const struct any_reader *r_) { assert (r_->klass == &pcp_file_reader_class); return UP_CAST (r_, struct pcp_reader, any_reader); } static const struct casereader_class pcp_file_casereader_class; static bool pcp_close (struct any_reader *); static bool read_variables_record (struct pcp_reader *); static void pcp_msg (struct pcp_reader *r, off_t, int class, const char *format, va_list args) PRINTF_FORMAT (4, 0); static void pcp_warn (struct pcp_reader *, off_t, const char *, ...) PRINTF_FORMAT (3, 4); static void pcp_error (struct pcp_reader *, off_t, const char *, ...) PRINTF_FORMAT (3, 4); static bool read_bytes (struct pcp_reader *, void *, size_t) WARN_UNUSED_RESULT; static int try_read_bytes (struct pcp_reader *, void *, size_t) WARN_UNUSED_RESULT; static bool read_uint16 (struct pcp_reader *, unsigned int *) WARN_UNUSED_RESULT; static bool read_uint32 (struct pcp_reader *, unsigned int *) WARN_UNUSED_RESULT; static bool read_float (struct pcp_reader *, double *) WARN_UNUSED_RESULT; static double parse_float (const uint8_t number[8]); static bool read_string (struct pcp_reader *, char *, size_t) WARN_UNUSED_RESULT; static bool skip_bytes (struct pcp_reader *, size_t) WARN_UNUSED_RESULT; static bool pcp_seek (struct pcp_reader *, off_t); static bool pcp_is_sysmis(const uint8_t *); /* Dictionary reader. */ static bool read_dictionary (struct pcp_reader *); static bool read_main_header (struct pcp_reader *, struct pcp_main_header *); static void parse_header (struct pcp_reader *, const struct pcp_main_header *, struct any_read_info *, struct dictionary *); static bool parse_variable_records (struct pcp_reader *, struct dictionary *, struct pcp_var_record *, size_t n); /* Tries to open FH for reading as an SPSS/PC+ system file. Returns a pcp_reader if successful, otherwise NULL. */ static struct any_reader * pcp_open (struct file_handle *fh) { struct pcp_reader *r; struct stat s; /* Create and initialize reader. */ r = xzalloc (sizeof *r); r->any_reader.klass = &pcp_file_reader_class; r->pool = pool_create (); pool_register (r->pool, free, r); r->fh = fh_ref (fh); r->opcode_idx = sizeof r->opcodes; /* TRANSLATORS: this fragment will be interpolated into messages in fh_lock() that identify types of files. */ r->lock = fh_lock (fh, FH_REF_FILE, N_("SPSS/PC+ system file"), FH_ACC_READ, false); if (r->lock == NULL) goto error; /* Open file. */ r->file = fn_open (fh, "rb"); if (r->file == NULL) { msg (ME, _("Error opening `%s' for reading as an SPSS/PC+ " "system file: %s."), fh_get_file_name (r->fh), strerror (errno)); goto error; } /* Fetch file size. */ if (fstat (fileno (r->file), &s)) { pcp_error (ME, 0, _("%s: stat failed (%s)."), fh_get_file_name (r->fh), strerror (errno)); goto error; } if (s.st_size > UINT_MAX) { pcp_error (ME, 0, _("%s: file too large."), fh_get_file_name (r->fh)); goto error; } r->file_size = s.st_size; /* Read dictionary. */ if (!read_dictionary (r)) goto error; if (!pcp_seek (r, r->directory.data.ofs)) goto error; return &r->any_reader; error: pcp_close (&r->any_reader); return NULL; } static bool pcp_read_dir_entry (struct pcp_reader *r, struct pcp_dir_entry *de) { if (!read_uint32 (r, &de->ofs) || !read_uint32 (r, &de->len)) return false; if (de->len > r->file_size || de->ofs > r->file_size - de->len) { pcp_error (r, r->pos - 8, _("Directory entry is for a %u-byte record " "starting at offset %u but file is only " "%u bytes long."), de->ofs, de->len, r->file_size); return false; } return true; } static bool read_dictionary (struct pcp_reader *r) { unsigned int two, zero; if (!read_uint32 (r, &two) || !read_uint32 (r, &zero)) return false; if (two != 2 || zero != 0) pcp_warn (r, 0, _("Directory fields have unexpected values " "(%u,%u)."), two, zero); if (!pcp_read_dir_entry (r, &r->directory.main) || !pcp_read_dir_entry (r, &r->directory.variables) || !pcp_read_dir_entry (r, &r->directory.labels) || !pcp_read_dir_entry (r, &r->directory.data)) return false; if (!read_main_header (r, &r->header)) return false; read_variables_record (r); return true; } struct get_strings_aux { struct pool *pool; char **titles; char **strings; bool *ids; size_t allocated; size_t n; }; static void add_string__ (struct get_strings_aux *aux, const char *string, bool id, char *title) { if (aux->n >= aux->allocated) { aux->allocated = 2 * (aux->allocated + 1); aux->titles = pool_realloc (aux->pool, aux->titles, aux->allocated * sizeof *aux->titles); aux->strings = pool_realloc (aux->pool, aux->strings, aux->allocated * sizeof *aux->strings); aux->ids = pool_realloc (aux->pool, aux->ids, aux->allocated * sizeof *aux->ids); } aux->titles[aux->n] = title; aux->strings[aux->n] = pool_strdup (aux->pool, string); aux->ids[aux->n] = id; aux->n++; } static void PRINTF_FORMAT (3, 4) add_string (struct get_strings_aux *aux, const char *string, const char *title, ...) { va_list args; va_start (args, title); add_string__ (aux, string, false, pool_vasprintf (aux->pool, title, args)); va_end (args); } static void PRINTF_FORMAT (3, 4) add_id (struct get_strings_aux *aux, const char *id, const char *title, ...) { va_list args; va_start (args, title); add_string__ (aux, id, true, pool_vasprintf (aux->pool, title, args)); va_end (args); } /* Retrieves significant string data from R in its raw format, to allow the caller to try to detect the encoding in use. Returns the number of strings retrieved N. Sets each of *TITLESP, *IDSP, and *STRINGSP to an array of N elements allocated from POOL. For each I in 0...N-1, UTF-8 string *TITLESP[I] describes *STRINGSP[I], which is in whatever encoding system file R uses. *IDS[I] is true if *STRINGSP[I] must be a valid PSPP language identifier, false if *STRINGSP[I] is free-form text. */ static size_t pcp_get_strings (const struct any_reader *r_, struct pool *pool, char ***titlesp, bool **idsp, char ***stringsp) { struct pcp_reader *r = pcp_reader_cast (r_); struct get_strings_aux aux; size_t var_idx; size_t i, j; aux.pool = pool; aux.titles = NULL; aux.strings = NULL; aux.ids = NULL; aux.allocated = 0; aux.n = 0; var_idx = 0; for (i = 0; i < r->n_vars; i++) if (r->vars[i].width != -1) add_id (&aux, r->vars[i].name, _("Variable %zu"), ++var_idx); var_idx = 0; for (i = 0; i < r->n_vars; i++) if (r->vars[i].width != -1) { var_idx++; if (r->vars[i].label) add_string (&aux, r->vars[i].label, _("Variable %zu Label"), var_idx); for (j = 0; j < r->vars[i].n_val_labs; j++) add_string (&aux, r->vars[i].label, _("Variable %zu Value Label %zu"), var_idx, j); } add_string (&aux, r->header.creation_date, _("Creation Date")); add_string (&aux, r->header.creation_time, _("Creation Time")); add_string (&aux, r->header.product, _("Product")); add_string (&aux, r->header.file_label, _("File Label")); *titlesp = aux.titles; *idsp = aux.ids; *stringsp = aux.strings; return aux.n; } static void find_and_delete_var (struct dictionary *dict, const char *name) { struct variable *var = dict_lookup_var (dict, name); if (var) dict_delete_var (dict, var); } /* Decodes the dictionary read from R, saving it into into *DICT. Character strings in R are decoded using ENCODING, or an encoding obtained from R if ENCODING is null, or the locale encoding if R specifies no encoding. If INFOP is non-null, then it receives additional info about the system file, which the caller must eventually free with any_read_info_destroy() when it is no longer needed. This function consumes R. The caller must use it again later, even to destroy it with pcp_close(). */ static struct casereader * pcp_decode (struct any_reader *r_, const char *encoding, struct dictionary **dictp, struct any_read_info *infop) { struct pcp_reader *r = pcp_reader_cast (r_); struct dictionary *dict; if (encoding == NULL) { encoding = locale_charset (); pcp_warn (r, -1, _("Using default encoding %s to read this SPSS/PC+ " "system file. For best results, specify an " "encoding explicitly. Use SYSFILE INFO with " "ENCODING=\"DETECT\" to analyze the possible " "encodings."), encoding); } dict = dict_create (encoding); r->encoding = dict_get_encoding (dict); parse_header (r, &r->header, &r->info, dict); if (!parse_variable_records (r, dict, r->vars, r->n_vars)) goto error; /* Create an index of dictionary variable widths for pcp_read_case to use. We cannot use the `struct variable's from the dictionary we created, because the caller owns the dictionary and may destroy or modify its variables. */ r->proto = caseproto_ref_pool (dict_get_proto (dict), r->pool); find_and_delete_var (dict, "CASENUM_"); find_and_delete_var (dict, "DATE_"); find_and_delete_var (dict, "WEIGHT_"); *dictp = dict; if (infop) { *infop = r->info; memset (&r->info, 0, sizeof r->info); } return casereader_create_sequential (NULL, r->proto, r->n_cases, &pcp_file_casereader_class, r); error: pcp_close (&r->any_reader); dict_destroy (dict); *dictp = NULL; return NULL; } /* Closes R, which should have been returned by pcp_open() but not already closed with pcp_decode() or this function. Returns true if an I/O error has occurred on READER, false otherwise. */ static bool pcp_close (struct any_reader *r_) { struct pcp_reader *r = pcp_reader_cast (r_); bool error; if (r->file) { if (fn_close (r->fh, r->file) == EOF) { msg (ME, _("Error closing system file `%s': %s."), fh_get_file_name (r->fh), strerror (errno)); r->error = true; } r->file = NULL; } any_read_info_destroy (&r->info); fh_unlock (r->lock); fh_unref (r->fh); error = r->error; pool_destroy (r->pool); return !error; } /* Destroys READER. */ static void pcp_file_casereader_destroy (struct casereader *reader UNUSED, void *r_) { struct pcp_reader *r = r_; pcp_close (&r->any_reader); } /* Detects whether FILE is an SPSS/PC+ system file. Returns 1 if so, 0 if not, and a negative errno value if there is an error reading FILE. */ static int pcp_detect (FILE *file) { static const char signature[4] = "SPSS"; char buf[sizeof signature]; if (fseek (file, 0x104, SEEK_SET)) return -errno; if (fread (buf, sizeof buf, 1, file) != 1) return ferror (file) ? -errno : 0; return !memcmp (buf, signature, sizeof buf); } /* Reads the main header of the SPSS/PC+ system file. Initializes *HEADER and *INFO, except for the string fields in *INFO, which parse_header() will initialize later once the file's encoding is known. */ static bool read_main_header (struct pcp_reader *r, struct pcp_main_header *header) { unsigned int base_ofs = r->directory.main.ofs; unsigned int zero0, zero1, zero2, zero3; size_t min_values, min_data_size; unsigned int one0, one1; unsigned int compressed; unsigned int n_cases1; uint8_t sysmis[8]; if (!pcp_seek (r, base_ofs)) return false; if (r->directory.main.len < 0xb0) { pcp_error (r, r->pos, _("This is not an SPSS/PC+ system file.")); return false; } else if (r->directory.main.len > 0xb0) pcp_warn (r, r->pos, _("Record 0 has unexpected length %u."), r->directory.main.len); if (!read_uint16 (r, &one0) || !read_string (r, header->product, sizeof header->product) || !read_bytes (r, sysmis, sizeof sysmis) || !read_uint32 (r, &zero0) || !read_uint32 (r, &zero1) || !read_uint16 (r, &one1) || !read_uint16 (r, &compressed) || !read_uint16 (r, &header->nominal_case_size) || !read_uint16 (r, &r->n_cases) || !read_uint16 (r, &header->weight_index) || !read_uint16 (r, &zero2) || !read_uint16 (r, &n_cases1) || !read_uint16 (r, &zero3) || !read_string (r, header->creation_date, sizeof header->creation_date) || !read_string (r, header->creation_time, sizeof header->creation_time) || !read_string (r, header->file_label, sizeof header->file_label)) return false; if (!pcp_is_sysmis (sysmis)) { double d = parse_float (sysmis); pcp_warn (r, base_ofs, _("Record 0 specifies unexpected system missing " "value %g (%a)."), d, d); } if (one0 != 1 || one1 != 1 || zero0 != 0 || zero1 != 0 || zero2 != 0 || zero3 != 0) pcp_warn (r, base_ofs, _("Record 0 reserved fields have unexpected values " "(%u,%u,%u,%u,%u,%u)."), one0, one1, zero0, zero1, zero2, zero3); if (n_cases1 != r->n_cases) pcp_warn (r, base_ofs, _("Record 0 case counts differ (%u versus %u)."), r->n_cases, n_cases1); if (compressed != 0 && compressed != 1) { pcp_error (r, base_ofs, _("Invalid compression type %u."), compressed); return false; } r->compressed = compressed != 0; min_values = xtimes (header->nominal_case_size, r->n_cases); min_data_size = xtimes (compressed ? 1 : 8, min_values); if (r->directory.data.len < min_data_size || size_overflow_p (min_data_size)) { pcp_warn (r, base_ofs, _("Record 0 claims %u cases with %u values per " "case (requiring at least %zu bytes) but data " "record is only %u bytes long."), r->n_cases, header->nominal_case_size, min_data_size, r->directory.data.len); return true; } return true; } static bool read_value_labels (struct pcp_reader *r, struct pcp_var_record *var, unsigned int start, unsigned int end) { size_t allocated_val_labs = 0; start += 7; end += 7; if (end > r->directory.labels.len) { pcp_warn (r, r->pos - 32, _("Value labels claimed to end at offset %u in labels record " "but labels record is only %u bytes."), end, r->directory.labels.len); return true; } start += r->directory.labels.ofs; end += r->directory.labels.ofs; if (start > end || end > r->file_size) { pcp_warn (r, r->pos - 32, _("Value labels claimed to be at offset %u with length %u " "but file size is only %u bytes."), start, end - start, r->file_size); return true; } if (!pcp_seek (r, start)) return false; while (r->pos < end && end - r->pos > 8) { struct pcp_value_label *vl; uint8_t len; if (var->n_val_labs >= allocated_val_labs) var->val_labs = pool_2nrealloc (r->pool, var->val_labs, &allocated_val_labs, sizeof *var->val_labs); vl = &var->val_labs[var->n_val_labs]; if (!read_bytes (r, vl->value, sizeof vl->value) || !read_bytes (r, &len, 1)) return false; if (end - r->pos < len) { pcp_warn (r, r->pos, _("Value labels end with partial label (%u bytes left in " "record, label length %"PRIu8")."), end - r->pos, len); return true; } vl->label = pool_malloc (r->pool, len + 1); if (!read_bytes (r, vl->label, len)) return false; vl->label[len] = '\0'; var->n_val_labs++; } if (r->pos < end) pcp_warn (r, r->pos, _("%u leftover bytes following value labels."), end - r->pos); return true; } static bool read_var_label (struct pcp_reader *r, struct pcp_var_record *var, unsigned int ofs) { uint8_t len; ofs += 7; if (ofs >= r->directory.labels.len) { pcp_warn (r, r->pos - 32, _("Variable label claimed to start at offset %u in labels " "record but labels record is only %u bytes."), ofs, r->directory.labels.len); return true; } if (!pcp_seek (r, ofs + r->directory.labels.ofs) || !read_bytes (r, &len, 1)) return false; if (len >= r->directory.labels.len - ofs) { pcp_warn (r, r->pos - 1, _("Variable label with length %u starting at offset %u in " "labels record overruns end of %u-byte labels record."), len, ofs + 1, r->directory.labels.len); return false; } var->label = pool_malloc (r->pool, len + 1); var->label[len] = '\0'; return read_bytes (r, var->label, len); } /* Reads the variables record (record 1) into R. */ static bool read_variables_record (struct pcp_reader *r) { unsigned int i; bool weighted; if (!pcp_seek (r, r->directory.variables.ofs)) return false; if (r->directory.variables.len != r->header.nominal_case_size * 32) { pcp_error (r, r->pos, _("Record 1 has length %u (expected %u)."), r->directory.variables.len, r->header.nominal_case_size * 32); return false; } r->vars = pool_calloc (r->pool, r->header.nominal_case_size, sizeof *r->vars); weighted = false; for (i = 0; i < r->header.nominal_case_size; i++) { struct pcp_var_record *var = &r->vars[r->n_vars++]; unsigned int value_label_start, value_label_end; unsigned int var_label_ofs; unsigned int format; uint8_t raw_type; var->pos = r->pos; if (!read_uint32 (r, &value_label_start) || !read_uint32 (r, &value_label_end) || !read_uint32 (r, &var_label_ofs) || !read_uint32 (r, &format) || !read_string (r, var->name, sizeof var->name) || !read_bytes (r, var->missing, sizeof var->missing)) return false; var->weight = r->header.weight_index && i == r->header.weight_index - 1; if (var->weight) weighted = true; raw_type = format >> 16; if (!fmt_from_io (raw_type, &var->format.type)) { pcp_error (r, var->pos, _("Variable %u has invalid type %"PRIu8"."), i, raw_type); return false; } var->format.w = (format >> 8) & 0xff; var->format.d = format & 0xff; fmt_fix_output (&var->format); var->width = fmt_var_width (&var->format); if (var_label_ofs) { unsigned int save_pos = r->pos; if (!read_var_label (r, var, var_label_ofs) || !pcp_seek (r, save_pos)) return false; } if (value_label_end > value_label_start && var->width <= 8) { unsigned int save_pos = r->pos; if (!read_value_labels (r, var, value_label_start, value_label_end) || !pcp_seek (r, save_pos)) return false; } if (var->width > 8) { int extra = DIV_RND_UP (var->width - 8, 8); i += extra; if (!skip_bytes (r, 32 * extra)) return false; } } if (r->header.weight_index && !weighted) pcp_warn (r, -1, _("Invalid weight index %u."), r->header.weight_index); return true; } static char * recode_and_trim_string (struct pool *pool, const char *from, const char *in) { struct substring out; out = recode_substring_pool ("UTF-8", from, ss_cstr (in), pool); ss_trim (&out, ss_cstr (" ")); return ss_xstrdup (out); } static void parse_header (struct pcp_reader *r, const struct pcp_main_header *header, struct any_read_info *info, struct dictionary *dict) { const char *dict_encoding = dict_get_encoding (dict); char *label; memset (info, 0, sizeof *info); info->integer_format = INTEGER_LSB_FIRST; info->float_format = FLOAT_IEEE_DOUBLE_LE; info->compression = r->compressed ? ANY_COMP_SIMPLE : ANY_COMP_NONE; info->case_cnt = r->n_cases; /* Convert file label to UTF-8 and put it into DICT. */ label = recode_and_trim_string (r->pool, dict_encoding, header->file_label); dict_set_label (dict, label); free (label); /* Put creation date, time, and product in UTF-8 into INFO. */ info->creation_date = recode_and_trim_string (r->pool, dict_encoding, header->creation_date); info->creation_time = recode_and_trim_string (r->pool, dict_encoding, header->creation_time); info->product = recode_and_trim_string (r->pool, dict_encoding, header->product); } /* Reads a variable (type 2) record from R and adds the corresponding variable to DICT. Also skips past additional variable records for long string variables. */ static bool parse_variable_records (struct pcp_reader *r, struct dictionary *dict, struct pcp_var_record *var_recs, size_t n_var_recs) { const char *dict_encoding = dict_get_encoding (dict); struct pcp_var_record *rec; for (rec = var_recs; rec < &var_recs[n_var_recs]; rec++) { struct variable *var; char *name; size_t i; name = recode_string_pool ("UTF-8", dict_encoding, rec->name, -1, r->pool); name[strcspn (name, " ")] = '\0'; /* Transform $DATE => DATE_, $WEIGHT => WEIGHT_, $CASENUM => CASENUM_. */ if (name[0] == '$') name = pool_asprintf (r->pool, "%s_", name + 1); if (!dict_id_is_valid (dict, name, false) || name[0] == '#') { pcp_error (r, rec->pos, _("Invalid variable name `%s'."), name); return false; } var = rec->var = dict_create_var (dict, name, rec->width); if (var == NULL) { char *new_name = dict_make_unique_var_name (dict, NULL, NULL); pcp_warn (r, rec->pos, _("Renaming variable with duplicate name " "`%s' to `%s'."), name, new_name); var = rec->var = dict_create_var_assert (dict, new_name, rec->width); free (new_name); } if (rec->weight) { if (!rec->width) dict_set_weight (dict, var); else pcp_warn (r, rec->pos, _("Cannot weight by string variable `%s'."), name); } /* Set the short name the same as the long name. */ var_set_short_name (var, 0, name); /* Get variable label, if any. */ if (rec->label) { char *utf8_label; utf8_label = recode_string ("UTF-8", dict_encoding, rec->label, -1); var_set_label (var, utf8_label); free (utf8_label); } /* Add value labels. */ for (i = 0; i < rec->n_val_labs; i++) { union value value; char *utf8_label; value_init (&value, rec->width); if (var_is_numeric (var)) value.f = parse_float (rec->val_labs[i].value); else memcpy (value_str_rw (&value, rec->width), rec->val_labs[i].value, rec->width); utf8_label = recode_string ("UTF-8", dict_encoding, rec->val_labs[i].label, -1); var_add_value_label (var, &value, utf8_label); free (utf8_label); value_destroy (&value, rec->width); } /* Set missing values. */ if (rec->width <= 8 && !pcp_is_sysmis (rec->missing)) { int width = var_get_width (var); struct missing_values mv; mv_init_pool (r->pool, &mv, width); if (var_is_numeric (var)) mv_add_num (&mv, parse_float (rec->missing)); else mv_add_str (&mv, rec->missing, MIN (width, 8)); var_set_missing_values (var, &mv); } /* Set formats. */ var_set_both_formats (var, &rec->format); } return true; } /* Case reader. */ static void read_error (struct casereader *, const struct pcp_reader *); static bool read_case_number (struct pcp_reader *, double *); static int read_case_string (struct pcp_reader *, uint8_t *, size_t); static int read_opcode (struct pcp_reader *); static bool read_compressed_number (struct pcp_reader *, double *); static int read_compressed_string (struct pcp_reader *, uint8_t *); static int read_whole_strings (struct pcp_reader *, uint8_t *, size_t); /* Reads and returns one case from READER's file. Returns a null pointer if not successful. */ static struct ccase * pcp_file_casereader_read (struct casereader *reader, void *r_) { struct pcp_reader *r = r_; unsigned int start_pos = r->pos; struct ccase *c; int retval; int i; if (r->error || !r->n_cases) return NULL; r->n_cases--; c = case_create (r->proto); for (i = 0; i < r->n_vars; i++) { struct pcp_var_record *var = &r->vars[i]; union value *v = case_data_rw_idx (c, i); if (var->width == 0) retval = read_case_number (r, &v->f); else retval = read_case_string (r, value_str_rw (v, var->width), var->width); if (retval != 1) { pcp_error (r, r->pos, _("File ends in partial case.")); goto error; } } if (r->pos > r->directory.data.ofs + r->directory.data.len) { pcp_error (r, r->pos, _("Case beginning at offset 0x%08x extends past " "end of data record at offset 0x%08x."), start_pos, r->directory.data.ofs + r->directory.data.len); goto error; } return c; error: read_error (reader, r); case_unref (c); return NULL; } /* Issues an error that an unspecified error occurred PCP, and marks R tainted. */ static void read_error (struct casereader *r, const struct pcp_reader *pcp) { msg (ME, _("Error reading case from file %s."), fh_get_name (pcp->fh)); casereader_force_error (r); } /* Reads a number from R and stores its value in *D. If R is compressed, reads a compressed number; otherwise, reads a number in the regular way. Returns true if successful, false if end of file is reached immediately. */ static bool read_case_number (struct pcp_reader *r, double *d) { if (!r->compressed) { uint8_t number[8]; if (!try_read_bytes (r, number, sizeof number)) return false; *d = parse_float (number); return true; } else return read_compressed_number (r, d); } /* Reads LENGTH string bytes from R into S. Always reads a multiple of 8 bytes; if LENGTH is not a multiple of 8, then extra bytes are read and discarded without being written to S. Reads compressed strings if S is compressed. Returns 1 if successful, 0 if end of file is reached immediately, or -1 for some kind of error. */ static int read_case_string (struct pcp_reader *r, uint8_t *s, size_t length) { size_t whole = ROUND_DOWN (length, 8); size_t partial = length % 8; if (whole) { int retval = read_whole_strings (r, s, whole); if (retval != 1) return retval; } if (partial) { uint8_t bounce[8]; int retval = read_whole_strings (r, bounce, sizeof bounce); if (retval <= 0) return -1; memcpy (s + whole, bounce, partial); } return 1; } /* Reads and returns the next compression opcode from R. */ static int read_opcode (struct pcp_reader *r) { assert (r->compressed); if (r->opcode_idx >= sizeof r->opcodes) { int retval = try_read_bytes (r, r->opcodes, sizeof r->opcodes); if (retval != 1) return -1; r->opcode_idx = 0; } return r->opcodes[r->opcode_idx++]; } /* Reads a compressed number from R and stores its value in D. Returns true if successful, false if end of file is reached immediately. */ static bool read_compressed_number (struct pcp_reader *r, double *d) { int opcode = read_opcode (r); switch (opcode) { case -1: return false; case 0: *d = SYSMIS; return true; case 1: return read_float (r, d); default: *d = opcode - 105.0; return true; } } /* Reads a compressed 8-byte string segment from R and stores it in DST. */ static int read_compressed_string (struct pcp_reader *r, uint8_t *dst) { int opcode; int retval; opcode = read_opcode (r); switch (opcode) { case -1: return 0; case 1: retval = read_bytes (r, dst, 8); return retval == 1 ? 1 : -1; default: if (!r->corruption_warning) { r->corruption_warning = true; pcp_warn (r, r->pos, _("Possible compressed data corruption: " "string contains compressed integer (opcode %d)."), opcode); } memset (dst, ' ', 8); return 1; } } /* Reads LENGTH string bytes from R into S. LENGTH must be a multiple of 8. Reads compressed strings if S is compressed. Returns 1 if successful, 0 if end of file is reached immediately, or -1 for some kind of error. */ static int read_whole_strings (struct pcp_reader *r, uint8_t *s, size_t length) { assert (length % 8 == 0); if (!r->compressed) return try_read_bytes (r, s, length); else { size_t ofs; for (ofs = 0; ofs < length; ofs += 8) { int retval = read_compressed_string (r, s + ofs); if (retval != 1) return -1; } return 1; } } /* Messages. */ /* Displays a corruption message. */ static void pcp_msg (struct pcp_reader *r, off_t offset, int class, const char *format, va_list args) { struct msg m; struct string text; ds_init_empty (&text); if (offset >= 0) ds_put_format (&text, _("`%s' near offset 0x%llx: "), fh_get_file_name (r->fh), (long long int) offset); else ds_put_format (&text, _("`%s': "), fh_get_file_name (r->fh)); ds_put_vformat (&text, format, args); m.category = msg_class_to_category (class); m.severity = msg_class_to_severity (class); m.file_name = NULL; m.first_line = 0; m.last_line = 0; m.first_column = 0; m.last_column = 0; m.text = ds_cstr (&text); msg_emit (&m); } /* Displays a warning for offset OFFSET in the file. */ static void pcp_warn (struct pcp_reader *r, off_t offset, const char *format, ...) { va_list args; va_start (args, format); pcp_msg (r, offset, MW, format, args); va_end (args); } /* Displays an error for the current file position, marks it as in an error state, and aborts reading it using longjmp. */ static void pcp_error (struct pcp_reader *r, off_t offset, const char *format, ...) { va_list args; va_start (args, format); pcp_msg (r, offset, ME, format, args); va_end (args); r->error = true; } /* Reads BYTE_CNT bytes into BUF. Returns 1 if exactly BYTE_CNT bytes are successfully read. Returns -1 if an I/O error or a partial read occurs. Returns 0 for an immediate end-of-file and, if EOF_IS_OK is false, reports an error. */ static inline int read_bytes_internal (struct pcp_reader *r, bool eof_is_ok, void *buf, size_t byte_cnt) { size_t bytes_read = fread (buf, 1, byte_cnt, r->file); r->pos += bytes_read; if (bytes_read == byte_cnt) return 1; else if (ferror (r->file)) { pcp_error (r, r->pos, _("System error: %s."), strerror (errno)); return -1; } else if (!eof_is_ok || bytes_read != 0) { pcp_error (r, r->pos, _("Unexpected end of file.")); return -1; } else return 0; } /* Reads BYTE_CNT into BUF. Returns true if successful. Returns false upon I/O error or if end-of-file is encountered. */ static bool read_bytes (struct pcp_reader *r, void *buf, size_t byte_cnt) { return read_bytes_internal (r, false, buf, byte_cnt) == 1; } /* Reads BYTE_CNT bytes into BUF. Returns 1 if exactly BYTE_CNT bytes are successfully read. Returns 0 if an immediate end-of-file is encountered. Returns -1 if an I/O error or a partial read occurs. */ static int try_read_bytes (struct pcp_reader *r, void *buf, size_t byte_cnt) { return read_bytes_internal (r, true, buf, byte_cnt); } /* Reads a 16-bit signed integer from R and stores its value in host format in *X. Returns true if successful, otherwise false. */ static bool read_uint16 (struct pcp_reader *r, unsigned int *x) { uint8_t integer[2]; if (read_bytes (r, integer, sizeof integer) != 1) return false; *x = integer_get (INTEGER_LSB_FIRST, integer, sizeof integer); return true; } /* Reads a 32-bit signed integer from R and stores its value in host format in *X. Returns true if successful, otherwise false. */ static bool read_uint32 (struct pcp_reader *r, unsigned int *x) { uint8_t integer[4]; if (read_bytes (r, integer, sizeof integer) != 1) return false; *x = integer_get (INTEGER_LSB_FIRST, integer, sizeof integer); return true; } /* Reads exactly SIZE - 1 bytes into BUFFER and stores a null byte into BUFFER[SIZE - 1]. */ static bool read_string (struct pcp_reader *r, char *buffer, size_t size) { bool ok; assert (size > 0); ok = read_bytes (r, buffer, size - 1); if (ok) buffer[size - 1] = '\0'; return ok; } /* Skips BYTES bytes forward in R. */ static bool skip_bytes (struct pcp_reader *r, size_t bytes) { while (bytes > 0) { char buffer[1024]; size_t chunk = MIN (sizeof buffer, bytes); if (!read_bytes (r, buffer, chunk)) return false; bytes -= chunk; } return true; } static bool pcp_seek (struct pcp_reader *r, off_t offset) { if (fseeko (r->file, offset, SEEK_SET)) { pcp_error (r, 0, _("%s: seek failed (%s)."), fh_get_file_name (r->fh), strerror (errno)); return false; } r->pos = offset; return true; } /* Reads a 64-bit floating-point number from R and returns its value in host format. */ static bool read_float (struct pcp_reader *r, double *d) { uint8_t number[8]; if (!read_bytes (r, number, sizeof number)) return false; else { *d = parse_float (number); return true; } } static double parse_float (const uint8_t number[8]) { return (pcp_is_sysmis (number) ? SYSMIS : float_get_double (FLOAT_IEEE_DOUBLE_LE, number)); } static bool pcp_is_sysmis(const uint8_t *p) { static const uint8_t sysmis[8] = { 0xf5, 0x1e, 0x26, 0x02, 0x8a, 0x8c, 0xed, 0xff }; return !memcmp (p, sysmis, 8); } static const struct casereader_class pcp_file_casereader_class = { pcp_file_casereader_read, pcp_file_casereader_destroy, NULL, NULL, }; const struct any_reader_class pcp_file_reader_class = { N_("SPSS/PC+ System File"), pcp_detect, pcp_open, pcp_close, pcp_decode, pcp_get_strings, }; pspp-1.0.1/src/data/value-labels.h0000644000175000017500000001071512476227410013652 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Sets of value labels. struct val_labs represents a mapping from `union value's to strings. The `union value's in the mapping all have the same width. If this width is numeric or short string, the mapping may contain any number of entries; long string mappings are always empty. */ #ifndef DATA_VALUE_LABELS_H #define DATA_VALUE_LABELS_H 1 #include #include #include "data/value.h" #include "libpspp/hmap.h" /* One value label. A value label is normally part of a struct val_labs (see below). */ struct val_lab { struct hmap_node node; /* Node in hash map. */ union value value; /* The value being labeled. */ const char *label; /* An interned string. */ const char *escaped_label; /* An interned string. */ }; /* Returns the value in VL. The caller must not modify or free the returned value. The width of the returned value cannot be determined directly from VL. It may be obtained by calling val_labs_get_width on the val_labs struct that VL is in. */ static inline const union value *val_lab_get_value (const struct val_lab *vl) { return &vl->value; } /* Returns the label in VL as a UTF-8 encoded interned string, in a format appropriate for use in output. The caller must not modify or free the returned value. */ static inline const char * val_lab_get_label (const struct val_lab *vl) { return vl->label; } /* Returns the label in VL as a UTF-8 encoded interned string. Any new-line characters in the label's usual output form are represented in the returned string as the two-byte sequence "\\n". This form is used on the VALUE LABELS command, in system and portable files, and passed to val_labs_add() and val_labs_replace(). The caller must not modify or free the returned value. */ static inline const char * val_lab_get_escaped_label (const struct val_lab *vl) { return vl->escaped_label; } /* A set of value labels. */ struct val_labs { int width; /* 0=numeric, otherwise string width. */ struct hmap labels; /* Hash table of `struct val_lab's. */ }; /* Creating and destroying sets of value labels. */ struct val_labs *val_labs_create (int width); struct val_labs *val_labs_clone (const struct val_labs *); void val_labs_clear (struct val_labs *); void val_labs_destroy (struct val_labs *); size_t val_labs_count (const struct val_labs *); /* Looking up value labels. */ const char *val_labs_find (const struct val_labs *, const union value *); struct val_lab *val_labs_lookup (const struct val_labs *, const union value *); const union value *val_labs_find_value (const struct val_labs *, const char *label); /* Basic properties. */ size_t val_labs_count (const struct val_labs *); int val_labs_get_width (const struct val_labs *); bool val_labs_can_set_width (const struct val_labs *, int new_width); void val_labs_set_width (struct val_labs *, int new_width); /* Adding value labels. */ bool val_labs_add (struct val_labs *, const union value *, const char *); void val_labs_replace (struct val_labs *, const union value *, const char *); void val_labs_remove (struct val_labs *, struct val_lab *); /* Iterating through value labels. */ const struct val_lab *val_labs_first (const struct val_labs *); const struct val_lab *val_labs_next (const struct val_labs *, const struct val_lab *); const struct val_lab **val_labs_sorted (const struct val_labs *); /* Properties of entire sets. */ unsigned int val_labs_hash (const struct val_labs *, unsigned int basis); bool val_labs_equal (const struct val_labs *, const struct val_labs *); #endif /* data/value-labels.h */ pspp-1.0.1/src/data/encrypted-file.c0000644000175000017500000002373212642117700014201 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2013, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/encrypted-file.h" #include "data/file-handle-def.h" #include #include #include "data/file-name.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/cmac-aes256.h" #include "libpspp/message.h" #include "gl/minmax.h" #include "gl/rijndael-alg-fst.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct encrypted_file { FILE *file; enum { SYSTEM, SYNTAX } type; int error; uint8_t ciphertext[16]; uint8_t plaintext[16]; unsigned int ofs, n; uint32_t rk[4 * (RIJNDAEL_MAXNR + 1)]; int Nr; }; static bool try_password(struct encrypted_file *, const char *password); static bool decode_password (const char *input, char output[11]); static bool fill_buffer (struct encrypted_file *); /* If FILENAME names an encrypted SPSS file, returns 1 and initializes *FP for further use by the caller. If FILENAME can be opened and read, but is not an encrypted SPSS file, returns 0. If FILENAME cannot be open or read, returns a negative errno value. */ int encrypted_file_open (struct encrypted_file **fp, const struct file_handle *fh) { struct encrypted_file *f; char header[36 + 16]; int retval; int n; f = xmalloc (sizeof *f); f->error = 0; f->file = fn_open (fh, "rb"); if (f->file == NULL) { msg (ME, _("An error occurred while opening `%s': %s."), fh_get_file_name (fh), strerror (errno)); retval = -errno; goto error; } n = fread (header, 1, sizeof header, f->file); if (n != sizeof header) { int error = feof (f->file) ? 0 : errno; if (error) msg (ME, _("An error occurred while reading `%s': %s."), fh_get_file_name (fh), strerror (error)); retval = -error; goto error; } if (!memcmp (header + 8, "ENCRYPTEDSAV", 12)) f->type = SYSTEM; else if (!memcmp (header + 8, "ENCRYPTEDSPS", 12)) f->type = SYNTAX; else { retval = 0; goto error; } memcpy (f->ciphertext, header + 36, 16); f->n = 16; f->ofs = 0; *fp = f; return 1; error: if (f->file) fn_close (fh, f->file); free (f); *fp = NULL; return retval; } /* Attempts to use PASSWORD, which may be a plaintext or "encrypted" password, to unlock F. Returns true if successful, otherwise false. */ bool encrypted_file_unlock (struct encrypted_file *f, const char *password) { char decoded_password[11]; return (try_password (f, password) || (decode_password (password, decoded_password) && try_password (f, decoded_password))); } /* Attempts to read N bytes of plaintext from F into BUF. Returns the number of bytes successfully read. A return value less than N may indicate end of file or an error; use encrypted_file_close() to distinguish. This function can only be used after encrypted_file_unlock() returns true. */ size_t encrypted_file_read (struct encrypted_file *f, void *buf_, size_t n) { uint8_t *buf = buf_; size_t ofs = 0; if (f->error) return 0; while (ofs < n) { unsigned int chunk = MIN (n - ofs, f->n - f->ofs); if (chunk > 0) { memcpy (buf + ofs, &f->plaintext[f->ofs], chunk); ofs += chunk; f->ofs += chunk; } else { if (!fill_buffer (f)) return ofs; } } return ofs; } /* Closes F. Returns 0 if no read errors occurred, otherwise a positive errno value. */ int encrypted_file_close (struct encrypted_file *f) { int error = f->error; if (fclose (f->file) == EOF && !error) error = errno; free (f); return error; } /* Returns true if F is an encrypted system file, false if it is an encrypted syntax file. */ bool encrypted_file_is_sav (const struct encrypted_file *f) { return f->type == SYSTEM; } #define b(x) (1 << (x)) static const uint16_t m0[4][2] = { { b(2), b(2) | b(3) | b(6) | b(7) }, { b(3), b(0) | b(1) | b(4) | b(5) }, { b(4) | b(7), b(8) | b(9) | b(12) | b(14) }, { b(5) | b(6), b(10) | b(11) | b(14) | b(15) }, }; static const uint16_t m1[4][2] = { { b(0) | b(3) | b(12) | b(15), b(0) | b(1) | b(4) | b(5) }, { b(1) | b(2) | b(13) | b(14), b(2) | b(3) | b(6) | b(7) }, { b(4) | b(7) | b(8) | b(11), b(8) | b(9) | b(12) | b(13) }, { b(5) | b(6) | b(9) | b(10), b(10) | b(11) | b(14) | b(15) }, }; static const uint16_t m2[4][2] = { { b(2), b(1) | b(3) | b(9) | b(11) }, { b(3), b(0) | b(2) | b(8) | b(10) }, { b(4) | b(7), b(4) | b(6) | b(12) | b(14) }, { b(5) | b(6), b(5) | b(7) | b(13) | b(15) }, }; static const uint16_t m3[4][2] = { { b(0) | b(3) | b(12) | b(15), b(0) | b(2) | b(8) | b(10) }, { b(1) | b(2) | b(13) | b(14), b(1) | b(3) | b(9) | b(11) }, { b(4) | b(7) | b(8) | b(11), b(4) | b(6) | b(12) | b(14) }, { b(5) | b(6) | b(9) | b(10), b(5) | b(7) | b(13) | b(15) }, }; static int decode_nibble (const uint16_t table[4][2], int nibble) { int i; for (i = 0; i < 4; i++) if (table[i][0] & (1 << nibble)) return table[i][1]; return 0; } /* Returns true if X has exactly one 1-bit, false otherwise. */ static bool is_pow2 (int x) { return x && (x & (x - 1)) == 0; } /* If X has exactly one 1-bit, returns its index, where bit 0 is the LSB. Otherwise, returns 0. */ static int find_1bit (uint16_t x) { int i; if (!is_pow2 (x)) return -1; for (i = 0; i < 16; i++) if (x & (1u << i)) return i; abort (); } /* Attempts to decode a pair of encoded password characters A and B into a single byte of the plaintext password. Returns 0 if A and B are not a valid encoded password pair, otherwise a byte of the plaintext password. */ static int decode_password_2bytes (uint8_t a, uint8_t b) { int x = find_1bit (decode_nibble (m0, a >> 4) & decode_nibble (m2, b >> 4)); int y = find_1bit (decode_nibble (m1, a & 15) & decode_nibble (m3, b & 15)); return x < 0 || y < 0 ? 0 : (x << 4) | y; } /* Decodes an SPSS so-called "encrypted" password INPUT into OUTPUT. An encoded password is always an even number of bytes long and no longer than 20 bytes. A decoded password is never longer than 10 bytes plus a null terminator. Returns true if successful, otherwise false. */ static bool decode_password (const char *input, char output[11]) { size_t len; len = strlen (input); if (len > 20 || len % 2) return false; for (; *input; input += 2) { int c = decode_password_2bytes (input[0], input[1]); if (!c) return false; *output++ = c; } *output = '\0'; return true; } /* If CIPHERTEXT is the first ciphertext block in an encrypted .sav file for PASSWORD, initializes rk[] and returns an nonzero Nr value. Otherwise, returns zero. */ static bool try_password(struct encrypted_file *f, const char *password) { /* NIST SP 800-108 fixed data. */ static const uint8_t fixed[] = { /* i */ 0x00, 0x00, 0x00, 0x01, /* label */ 0x35, 0x27, 0x13, 0xcc, 0x53, 0xa7, 0x78, 0x89, 0x87, 0x53, 0x22, 0x11, 0xd6, 0x5b, 0x31, 0x58, 0xdc, 0xfe, 0x2e, 0x7e, 0x94, 0xda, 0x2f, 0x00, 0xcc, 0x15, 0x71, 0x80, 0x0a, 0x6c, 0x63, 0x53, /* delimiter */ 0x00, /* context */ 0x38, 0xc3, 0x38, 0xac, 0x22, 0xf3, 0x63, 0x62, 0x0e, 0xce, 0x85, 0x3f, 0xb8, 0x07, 0x4c, 0x4e, 0x2b, 0x77, 0xc7, 0x21, 0xf5, 0x1a, 0x80, 0x1d, 0x67, 0xfb, 0xe1, 0xe1, 0x83, 0x07, 0xd8, 0x0d, /* L */ 0x00, 0x00, 0x01, 0x00, }; char padded_password[32]; size_t password_len; uint8_t cmac[16]; uint8_t key[32]; /* Truncate password to at most 10 bytes. */ password_len = strlen (password); if (password_len > 10) password_len = 10; /* padded_password = password padded with zeros to 32 bytes. */ memset (padded_password, 0, sizeof padded_password); memcpy (padded_password, password, password_len); /* cmac = CMAC(padded_password, fixed). */ cmac_aes256 (CHAR_CAST (const uint8_t *, padded_password), fixed, sizeof fixed, cmac); /* The key is the cmac repeated twice. */ memcpy(key, cmac, 16); memcpy(key + 16, cmac, 16); /* Use key to initialize AES. */ assert (sizeof key == 32); f->Nr = rijndaelKeySetupDec (f->rk, CHAR_CAST (const char *, key), 256); /* Check for magic number at beginning of plaintext. */ rijndaelDecrypt (f->rk, f->Nr, CHAR_CAST (const char *, f->ciphertext), CHAR_CAST (char *, f->plaintext)); return !memcmp (f->plaintext, f->type == SYSTEM ? "$FL" : "* E", 3); } static bool fill_buffer (struct encrypted_file *f) { f->n = fread (f->ciphertext, 1, sizeof f->ciphertext, f->file); f->ofs = 0; if (f->n == sizeof f->ciphertext) { rijndaelDecrypt (f->rk, f->Nr, CHAR_CAST (const char *, f->ciphertext), CHAR_CAST (char *, f->plaintext)); if (f->type == SYNTAX) { const char *eof = memchr (f->plaintext, '\04', sizeof f->plaintext); if (eof) f->n = CHAR_CAST (const uint8_t *, eof) - f->plaintext; } return true; } else { if (ferror (f->file)) f->error = errno; return false; } } pspp-1.0.1/src/data/short-names.h0000644000175000017500000000304712470242642013534 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Short names for variables. PSPP allows variable names to be up to 64 bytes long, but the system and portable file formats require that each variable have a unique name no more than 8 bytes long, called its "short name". Furthermore, each "very long" string variable that is more than 255 bytes long has to be divided into multiple long string variables within that limit, and each of these segments must also have its own unique short name. The function in this module generates short names for variables with long names or that have very long string width. */ #ifndef DATA_SHORT_NAMES_H #define DATA_SHORT_NAMES_H 1 struct dictionary; /* Maximum length of a short name, in bytes. */ #define SHORT_NAME_LEN 8 void short_names_assign (struct dictionary *); #endif /* data/short-names.h */ pspp-1.0.1/src/data/por-file-reader.c0000644000175000017500000006217512642117700014250 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include #include #include "data/any-reader.h" #include "data/casereader-provider.h" #include "data/casereader.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/file-name.h" #include "data/format.h" #include "data/missing-values.h" #include "data/short-names.h" #include "data/value-labels.h" #include "data/variable.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/intprops.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gl/xmemdup0.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) /* portable_to_local[PORTABLE] translates the given portable character into the local character set. */ static const char portable_to_local[256] = { " " "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ." "<(+|&[]!$*);^-/|,%_>?`:$@'=\" ~- 0123456789 -() {}\\ " " " }; /* Portable file reader. */ struct pfm_reader { struct any_reader any_reader; struct pool *pool; /* All the portable file state. */ jmp_buf bail_out; /* longjmp() target for error handling. */ struct dictionary *dict; struct any_read_info info; struct file_handle *fh; /* File handle. */ struct fh_lock *lock; /* Read lock for file. */ FILE *file; /* File stream. */ int line_length; /* Number of characters so far on this line. */ char cc; /* Current character. */ char *trans; /* 256-byte character set translation table. */ int var_cnt; /* Number of variables. */ int weight_index; /* 0-based index of weight variable, or -1. */ struct caseproto *proto; /* Format of output cases. */ bool ok; /* Set false on I/O error. */ }; static const struct casereader_class por_file_casereader_class; static struct pfm_reader * pfm_reader_cast (const struct any_reader *r_) { assert (r_->klass == &por_file_reader_class); return UP_CAST (r_, struct pfm_reader, any_reader); } static void error (struct pfm_reader *r, const char *msg,...) PRINTF_FORMAT (2, 3) NO_RETURN; /* Displays MSG as an error message and aborts reading the portable file via longjmp(). */ static void error (struct pfm_reader *r, const char *msg, ...) { struct msg m; struct string text; va_list args; ds_init_empty (&text); ds_put_format (&text, _("portable file %s corrupt at offset 0x%llx: "), fh_get_file_name (r->fh), (long long int) ftello (r->file)); va_start (args, msg); ds_put_vformat (&text, msg, args); va_end (args); m.category = MSG_C_GENERAL; m.severity = MSG_S_ERROR; m.file_name = NULL; m.first_line = 0; m.last_line = 0; m.first_column = 0; m.last_column = 0; m.text = ds_cstr (&text); msg_emit (&m); r->ok = false; longjmp (r->bail_out, 1); } /* Displays MSG as an warning for the current position in portable file reader R. */ static void warning (struct pfm_reader *r, const char *msg, ...) { struct msg m; struct string text; va_list args; ds_init_empty (&text); ds_put_format (&text, _("reading portable file %s at offset 0x%llx: "), fh_get_file_name (r->fh), (long long int) ftello (r->file)); va_start (args, msg); ds_put_vformat (&text, msg, args); va_end (args); m.category = MSG_C_GENERAL; m.severity = MSG_S_WARNING; m.file_name = NULL; m.first_line = 0; m.last_line = 0; m.first_column = 0; m.last_column = 0; m.text = ds_cstr (&text); msg_emit (&m); } /* Close and destroy R. Returns false if an error was detected on R, true otherwise. */ static bool pfm_close (struct any_reader *r_) { struct pfm_reader *r = pfm_reader_cast (r_); bool ok; dict_destroy (r->dict); any_read_info_destroy (&r->info); if (r->file) { if (fn_close (r->fh, r->file) == EOF) { msg (ME, _("Error closing portable file `%s': %s."), fh_get_file_name (r->fh), strerror (errno)); r->ok = false; } r->file = NULL; } fh_unlock (r->lock); fh_unref (r->fh); ok = r->ok; pool_destroy (r->pool); return ok; } /* Closes portable file reader R, after we're done with it. */ static void por_file_casereader_destroy (struct casereader *reader, void *r_) { struct pfm_reader *r = r_; if (!pfm_close (&r->any_reader)) casereader_force_error (reader); } /* Read a single character into cur_char. */ static void advance (struct pfm_reader *r) { int c; /* Read the next character from the file. Ignore carriage returns entirely. Mostly ignore new-lines, but if a new-line occurs before the line has reached 80 bytes in length, then treat the "missing" bytes as spaces. */ for (;;) { while ((c = getc (r->file)) == '\r') continue; if (c != '\n') break; if (r->line_length < 80) { c = ' '; ungetc ('\n', r->file); break; } r->line_length = 0; } if (c == EOF) error (r, _("unexpected end of file")); if (r->trans != NULL) c = r->trans[c]; r->cc = c; r->line_length++; } /* Skip a single character if present, and return whether it was skipped. */ static inline bool match (struct pfm_reader *r, int c) { if (r->cc == c) { advance (r); return true; } else return false; } static void read_header (struct pfm_reader *); static void read_version_data (struct pfm_reader *, struct any_read_info *); static void read_variables (struct pfm_reader *, struct dictionary *); static void read_value_label (struct pfm_reader *, struct dictionary *); static void read_documents (struct pfm_reader *, struct dictionary *); /* Reads the dictionary from file with handle H, and returns it in a dictionary structure. This dictionary may be modified in order to rename, reorder, and delete variables, etc. */ static struct any_reader * pfm_open (struct file_handle *fh) { struct pool *volatile pool = NULL; struct pfm_reader *volatile r = NULL; /* Create and initialize reader. */ pool = pool_create (); r = pool_alloc (pool, sizeof *r); r->any_reader.klass = &por_file_reader_class; r->dict = dict_create (get_default_encoding ()); memset (&r->info, 0, sizeof r->info); r->pool = pool; r->fh = fh_ref (fh); r->lock = NULL; r->file = NULL; r->line_length = 0; r->weight_index = -1; r->trans = NULL; r->var_cnt = 0; r->proto = NULL; r->ok = true; if (setjmp (r->bail_out)) goto error; /* Lock file. */ /* TRANSLATORS: this fragment will be interpolated into messages in fh_lock() that identify types of files. */ r->lock = fh_lock (fh, FH_REF_FILE, N_("portable file"), FH_ACC_READ, false); if (r->lock == NULL) goto error; /* Open file. */ r->file = fn_open (r->fh, "rb"); if (r->file == NULL) { msg (ME, _("An error occurred while opening `%s' for reading " "as a portable file: %s."), fh_get_file_name (r->fh), strerror (errno)); goto error; } /* Read header, version, date info, product id, variables. */ read_header (r); read_version_data (r, &r->info); read_variables (r, r->dict); /* Read value labels. */ while (match (r, 'D')) read_value_label (r, r->dict); /* Read documents. */ if (match (r, 'E')) read_documents (r, r->dict); /* Check that we've made it to the data. */ if (!match (r, 'F')) error (r, _("Data record expected.")); r->proto = caseproto_ref_pool (dict_get_proto (r->dict), r->pool); return &r->any_reader; error: pfm_close (&r->any_reader); return NULL; } static struct casereader * pfm_decode (struct any_reader *r_, const char *encoding UNUSED, struct dictionary **dictp, struct any_read_info *info) { struct pfm_reader *r = pfm_reader_cast (r_); *dictp = r->dict; r->dict = NULL; if (info) { *info = r->info; memset (&r->info, 0, sizeof r->info); } return casereader_create_sequential (NULL, r->proto, CASENUMBER_MAX, &por_file_casereader_class, r); } /* Returns the value of base-30 digit C, or -1 if C is not a base-30 digit. */ static int base_30_value (unsigned char c) { static const char base_30_digits[] = "0123456789ABCDEFGHIJKLMNOPQRST"; const char *p = strchr (base_30_digits, c); return p != NULL ? p - base_30_digits : -1; } /* Read a floating point value and return its value. */ static double read_float (struct pfm_reader *r) { double num = 0.; int exponent = 0; bool got_dot = false; /* Seen a decimal point? */ bool got_digit = false; /* Seen any digits? */ bool negative = false; /* Number is negative? */ /* Skip leading spaces. */ while (match (r, ' ')) continue; /* `*' indicates system-missing. */ if (match (r, '*')) { advance (r); /* Probably a dot (.) but doesn't appear to matter. */ return SYSMIS; } negative = match (r, '-'); for (;;) { int digit = base_30_value (r->cc); if (digit != -1) { got_digit = true; /* Make sure that multiplication by 30 will not overflow. */ if (num > DBL_MAX * (1. / 30.)) /* The value of the digit doesn't matter, since we have already gotten as many digits as can be represented in a `double'. This doesn't necessarily mean the result will overflow. The exponent may reduce it to within range. We just need to record that there was another digit so that we can multiply by 10 later. */ ++exponent; else num = (num * 30.0) + digit; /* Keep track of the number of digits after the decimal point. If we just divided by 30 here, we would lose precision. */ if (got_dot) --exponent; } else if (!got_dot && r->cc == '.') /* Record that we have found the decimal point. */ got_dot = 1; else /* Any other character terminates the number. */ break; advance (r); } /* Check that we had some digits. */ if (!got_digit) error (r, _("Number expected.")); /* Get exponent if any. */ if (r->cc == '+' || r->cc == '-') { long int exp = 0; bool negative_exponent = r->cc == '-'; int digit; for (advance (r); (digit = base_30_value (r->cc)) != -1; advance (r)) { if (exp > LONG_MAX / 30) { exp = LONG_MAX; break; } exp = exp * 30 + digit; } /* We don't check whether there were actually any digits, but we probably should. */ if (negative_exponent) exp = -exp; exponent += exp; } /* Numbers must end with `/'. */ if (!match (r, '/')) error (r, _("Missing numeric terminator.")); /* Multiply `num' by 30 to the `exponent' power, checking for overflow. */ if (exponent < 0) num *= pow (30.0, (double) exponent); else if (exponent > 0) { if (num > DBL_MAX * pow (30.0, (double) -exponent)) num = DBL_MAX; else num *= pow (30.0, (double) exponent); } return negative ? -num : num; } /* Read an integer and return its value. */ static int read_int (struct pfm_reader *r) { double f = read_float (r); if (floor (f) != f || f >= INT_MAX || f <= INT_MIN) error (r, _("Invalid integer.")); return f; } /* Reads a string into BUF, which must have room for 256 characters. */ static void read_string (struct pfm_reader *r, char *buf) { int n = read_int (r); if (n < 0 || n > 255) error (r, _("Bad string length %d."), n); while (n-- > 0) { *buf++ = r->cc; advance (r); } *buf = '\0'; } /* Reads a string into BUF, which must have room for 256 characters. Returns the number of bytes read. */ static size_t read_bytes (struct pfm_reader *r, uint8_t *buf) { int n = read_int (r); if (n < 0 || n > 255) error (r, _("Bad string length %d."), n); while (n-- > 0) { *buf++ = r->cc; advance (r); } return n; } /* Reads a string and returns a copy of it allocated from R's pool. */ static char * read_pool_string (struct pfm_reader *r) { char string[256]; read_string (r, string); return pool_strdup (r->pool, string); } /* Reads the 464-byte file header. */ static void read_header (struct pfm_reader *r) { char *trans; int i; /* Read and ignore vanity splash strings. */ for (i = 0; i < 200; i++) advance (r); /* Skip the first 64 characters of the translation table. We don't care about these. They are probably all set to '0', marking them as untranslatable, and that would screw up our actual translation of the real '0'. */ for (i = 0; i < 64; i++) advance (r); /* Read the rest of the translation table. */ trans = pool_malloc (r->pool, 256); memset (trans, 0, 256); for (; i < 256; i++) { unsigned char c; advance (r); c = r->cc; if (trans[c] == 0) trans[c] = portable_to_local[i]; } /* Set up the translation table, then read the first translated character. */ r->trans = trans; advance (r); /* Skip and verify signature. */ for (i = 0; i < 8; i++) if (!match (r, "SPSSPORT"[i])) { msg (SE, _("%s: Not a portable file."), fh_get_file_name (r->fh)); longjmp (r->bail_out, 1); } } /* Reads the version and date info record, as well as product and subproduct identification records if present. */ static void read_version_data (struct pfm_reader *r, struct any_read_info *info) { static const char empty_string[] = ""; char *date, *time; const char *product, *subproduct; int i; /* Read file. */ if (!match (r, 'A')) error (r, _("Unrecognized version code `%c'."), r->cc); date = read_pool_string (r); time = read_pool_string (r); product = match (r, '1') ? read_pool_string (r) : empty_string; if (match (r, '2')) { /* Skip "author" field. */ read_pool_string (r); } subproduct = match (r, '3') ? read_pool_string (r) : empty_string; /* Validate file. */ if (strlen (date) != 8) error (r, _("Bad date string length %zu."), strlen (date)); if (strlen (time) != 6) error (r, _("Bad time string length %zu."), strlen (time)); /* Save file info. */ if (info != NULL) { memset (info, 0, sizeof *info); info->float_format = FLOAT_NATIVE_DOUBLE; info->integer_format = INTEGER_NATIVE; info->compression = ANY_COMP_NONE; info->case_cnt = -1; /* Date. */ info->creation_date = xmalloc (11); for (i = 0; i < 8; i++) { static const int map[] = {6, 7, 8, 9, 3, 4, 0, 1}; info->creation_date[map[i]] = date[i]; } info->creation_date[2] = info->creation_date[5] = ' '; info->creation_date[10] = '\0'; /* Time. */ info->creation_time = xmalloc (9); for (i = 0; i < 6; i++) { static const int map[] = {0, 1, 3, 4, 6, 7}; info->creation_time[map[i]] = time[i]; } info->creation_time[2] = info->creation_time[5] = ' '; info->creation_time[8] = 0; /* Product. */ info->product = xstrdup (product); info->product_ext = xstrdup (subproduct); } } /* Translates a format specification read from portable file R as the three integers INTS into a normal format specifier FORMAT, checking that the format is appropriate for variable V. */ static struct fmt_spec convert_format (struct pfm_reader *r, const int portable_format[3], struct variable *v, bool *report_error) { struct fmt_spec format; bool ok; if (!fmt_from_io (portable_format[0], &format.type)) { if (*report_error) warning (r, _("%s: Bad format specifier byte (%d). Variable " "will be assigned a default format."), var_get_name (v), portable_format[0]); goto assign_default; } format.w = portable_format[1]; format.d = portable_format[2]; msg_disable (); ok = (fmt_check_output (&format) && fmt_check_width_compat (&format, var_get_width (v))); msg_enable (); if (!ok) { if (*report_error) { char fmt_string[FMT_STRING_LEN_MAX + 1]; fmt_to_string (&format, fmt_string); if (var_is_numeric (v)) warning (r, _("Numeric variable %s has invalid format " "specifier %s."), var_get_name (v), fmt_string); else warning (r, _("String variable %s with width %d has " "invalid format specifier %s."), var_get_name (v), var_get_width (v), fmt_string); } goto assign_default; } return format; assign_default: *report_error = false; return fmt_default_for_width (var_get_width (v)); } static void parse_value (struct pfm_reader *, int width, union value *); /* Read information on all the variables. */ static void read_variables (struct pfm_reader *r, struct dictionary *dict) { char *weight_name = NULL; int i; if (!match (r, '4')) error (r, _("Expected variable count record.")); r->var_cnt = read_int (r); if (r->var_cnt <= 0) error (r, _("Invalid number of variables %d."), r->var_cnt); if (match (r, '5')) read_int (r); if (match (r, '6')) { weight_name = read_pool_string (r); if (strlen (weight_name) > SHORT_NAME_LEN) error (r, _("Weight variable name (%s) truncated."), weight_name); } for (i = 0; i < r->var_cnt; i++) { int width; char name[256]; int fmt[6]; struct variable *v; struct missing_values miss; struct fmt_spec print, write; bool report_error = true; int j; if (!match (r, '7')) error (r, _("Expected variable record.")); width = read_int (r); if (width < 0) error (r, _("Invalid variable width %d."), width); read_string (r, name); for (j = 0; j < 6; j++) fmt[j] = read_int (r); if (!dict_id_is_valid (dict, name, false) || *name == '#' || *name == '$') error (r, _("Invalid variable name `%s' in position %d."), name, i); str_uppercase (name); if (width < 0 || width > 255) error (r, _("Bad width %d for variable %s."), width, name); v = dict_create_var (dict, name, width); if (v == NULL) { unsigned long int i; for (i = 1; ; i++) { char try_name[8 + 1 + INT_STRLEN_BOUND (i) + 1]; sprintf (try_name, "%s_%lu", name, i); v = dict_create_var (dict, try_name, width); if (v != NULL) break; } warning (r, _("Duplicate variable name %s in position %d renamed " "to %s."), name, i, var_get_name (v)); } print = convert_format (r, &fmt[0], v, &report_error); write = convert_format (r, &fmt[3], v, &report_error); var_set_print_format (v, &print); var_set_write_format (v, &write); /* Range missing values. */ mv_init (&miss, width); if (match (r, 'B')) { double x = read_float (r); double y = read_float (r); mv_add_range (&miss, x, y); } else if (match (r, 'A')) mv_add_range (&miss, read_float (r), HIGHEST); else if (match (r, '9')) mv_add_range (&miss, LOWEST, read_float (r)); /* Single missing values. */ while (match (r, '8')) { int mv_width = MIN (width, 8); union value value; parse_value (r, mv_width, &value); value_resize (&value, mv_width, width); mv_add_value (&miss, &value); value_destroy (&value, width); } var_set_missing_values (v, &miss); mv_destroy (&miss); if (match (r, 'C')) { char label[256]; read_string (r, label); var_set_label (v, label); /* XXX */ } } if (weight_name != NULL) { struct variable *weight_var = dict_lookup_var (dict, weight_name); if (weight_var == NULL) error (r, _("Weighting variable %s not present in dictionary."), weight_name); dict_set_weight (dict, weight_var); } } /* Parse a value of with WIDTH into value V. */ static void parse_value (struct pfm_reader *r, int width, union value *v) { value_init (v, width); if (width > 0) { uint8_t buf[256]; size_t n_bytes = read_bytes (r, buf); value_copy_buf_rpad (v, width, buf, n_bytes, ' '); } else v->f = read_float (r); } /* Parse a value label record and return success. */ static void read_value_label (struct pfm_reader *r, struct dictionary *dict) { /* Variables. */ int nv; struct variable **v; /* Labels. */ int n_labels; int i; nv = read_int (r); v = pool_nalloc (r->pool, nv, sizeof *v); for (i = 0; i < nv; i++) { char name[256]; read_string (r, name); v[i] = dict_lookup_var (dict, name); if (v[i] == NULL) error (r, _("Unknown variable %s while parsing value labels."), name); if (var_get_type (v[0]) != var_get_type (v[i])) error (r, _("Cannot assign value labels to %s and %s, which " "have different variable types."), var_get_name (v[0]), var_get_name (v[i])); } n_labels = read_int (r); for (i = 0; i < n_labels; i++) { union value val; char label[256]; int j; parse_value (r, var_get_width (v[0]), &val); read_string (r, label); /* Assign the value label to each variable. */ for (j = 0; j < nv; j++) var_replace_value_label (v[j], &val, label); value_destroy (&val, var_get_width (v[0])); } } /* Reads a set of documents from portable file R into DICT. */ static void read_documents (struct pfm_reader *r, struct dictionary *dict) { int line_cnt; int i; line_cnt = read_int (r); for (i = 0; i < line_cnt; i++) { char line[256]; read_string (r, line); dict_add_document_line (dict, line, false); } } /* Reads and returns one case from portable file R. Returns a null pointer on failure. */ static struct ccase * por_file_casereader_read (struct casereader *reader, void *r_) { struct pfm_reader *r = r_; struct ccase *volatile c; size_t i; c = case_create (r->proto); setjmp (r->bail_out); if (!r->ok) { casereader_force_error (reader); case_unref (c); return NULL; } /* Check for end of file. */ if (r->cc == 'Z') { case_unref (c); return NULL; } for (i = 0; i < r->var_cnt; i++) { int width = caseproto_get_width (r->proto, i); if (width == 0) case_data_rw_idx (c, i)->f = read_float (r); else { uint8_t buf[256]; size_t n_bytes = read_bytes (r, buf); u8_buf_copy_rpad (case_str_rw_idx (c, i), width, buf, n_bytes, ' '); } } return c; } /* Detects whether FILE is an SPSS portable file. Returns 1 if so, 0 if not, and a negative errno value if there is an error reading FILE. */ static int pfm_detect (FILE *file) { unsigned char header[464]; char trans[256]; int cooked_cnt, raw_cnt, line_len; int i; cooked_cnt = raw_cnt = 0; line_len = 0; while (cooked_cnt < sizeof header) { int c = getc (file); if (c == EOF || raw_cnt++ > 512) return ferror (file) ? -errno : 0; else if (c == '\n') { while (line_len < 80 && cooked_cnt < sizeof header) { header[cooked_cnt++] = ' '; line_len++; } line_len = 0; } else if (c != '\r') { header[cooked_cnt++] = c; line_len++; } } memset (trans, 0, 256); for (i = 64; i < 256; i++) { unsigned char c = header[i + 200]; if (trans[c] == 0) trans[c] = portable_to_local[i]; } for (i = 0; i < 8; i++) if (trans[header[i + 456]] != "SPSSPORT"[i]) return 0; return 1; } static const struct casereader_class por_file_casereader_class = { por_file_casereader_read, por_file_casereader_destroy, NULL, NULL, }; const struct any_reader_class por_file_reader_class = { N_("SPSS Portable File"), pfm_detect, pfm_open, pfm_close, pfm_decode, NULL, /* get_strings */ }; pspp-1.0.1/src/data/identifier.c0000644000175000017500000002037612470434665013425 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2005, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This file is concerned with the definition of the PSPP syntax, NOT the action of scanning/parsing code . */ #include #include "data/identifier.h" #include #include #include #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "gl/c-ctype.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Tokens. */ /* Returns TYPE as a string, e.g. "ID" for T_ID. */ const char * token_type_to_name (enum token_type type) { switch (type) { #define TOKEN_TYPE(TYPE) case T_##TYPE: return #TYPE; TOKEN_TYPES #undef TOKEN_TYPE case TOKEN_N_TYPES: default: return "unknown token type"; } } /* Returns an ASCII string that yields TOKEN if it appeared in a syntax file, as a statically allocated constant string. This function returns NULL for tokens that don't have any fixed string representation, such as identifier and number tokens. */ const char * token_type_to_string (enum token_type token) { switch (token) { case T_ID: case T_POS_NUM: case T_NEG_NUM: case T_STRING: case T_STOP: return NULL; case T_ENDCMD: return "."; case T_PLUS: return "+"; case T_DASH: return "-"; case T_ASTERISK: return "*"; case T_SLASH: return "/"; case T_EQUALS: return "="; case T_LPAREN: return "("; case T_RPAREN: return ")"; case T_LBRACK: return "["; case T_RBRACK: return "]"; case T_COMMA: return ","; case T_AND: return "AND"; case T_OR: return "OR"; case T_NOT: return "NOT"; case T_EQ: return "EQ"; case T_GE: return ">="; case T_GT: return ">"; case T_LE: return "<="; case T_LT: return "<"; case T_NE: return "~="; case T_ALL: return "ALL"; case T_BY: return "BY"; case T_TO: return "TO"; case T_WITH: return "WITH"; case T_EXP: return "**"; case TOKEN_N_TYPES: NOT_REACHED (); } NOT_REACHED (); } /* Recognizing identifiers. */ static bool is_ascii_id1 (unsigned char c) { return c_isalpha (c) || c == '@' || c == '#' || c == '$'; } static bool is_ascii_idn (unsigned char c) { return is_ascii_id1 (c) || isdigit (c) || c == '.' || c == '_'; } /* Returns true if C may be the first byte in an identifier in the current locale. (PSPP is transitioning to using Unicode internally for syntax, so please use lex_uc_is_id1() instead, if possible.) */ bool lex_is_id1 (char c) { return is_ascii_id1 (c) || (unsigned char) c >= 128; } /* Returns true if C may be a byte in an identifier other than the first. (PSPP is transitioning to using Unicode internally for syntax, so please use lex_uc_is_idn() instead, if possible.) */ bool lex_is_idn (char c) { return is_ascii_idn (c) || (unsigned char) c >= 128; } /* Returns true if Unicode code point UC may be the first character in an identifier in the current locale. */ bool lex_uc_is_id1 (ucs4_t uc) { return (uc < 0x80 ? is_ascii_id1 (uc) : (uc_is_general_category_withtable (uc, UC_CATEGORY_MASK_L | UC_CATEGORY_MASK_M | UC_CATEGORY_MASK_S) && uc != 0xfffc && uc != 0xfffd)); } /* Returns true if Unicode code point UC may be a character in an identifier other than the first. */ bool lex_uc_is_idn (ucs4_t uc) { return (uc < 0x80 ? is_ascii_id1 (uc) || isdigit (uc) || uc == '.' || uc == '_' : (uc_is_general_category_withtable (uc, UC_CATEGORY_MASK_L | UC_CATEGORY_MASK_M | UC_CATEGORY_MASK_S | UC_CATEGORY_MASK_N) && uc != 0xfffc && uc != 0xfffd)); } /* Returns true if Unicode code point UC is a space that separates tokens. */ bool lex_uc_is_space (ucs4_t uc) { /* These are all of the Unicode characters in category Zs, Zl, or Zp. */ return (uc == ' ' || (uc <= 0x000d && uc >= 0x0009) || (uc >= 0x80 && (uc == 0xa0 || uc == 0x85 || uc == 0x1680 || uc == 0x180e || (uc >= 0x2000 && uc <= 0x200a) || uc == 0x2028 || uc == 0x2029 || uc == 0x202f || uc == 0x205f || uc == 0x3000))); } /* Returns the length of the longest prefix of STRING that forms a valid identifier. Returns zero if STRING does not begin with a valid identifier. */ size_t lex_id_get_length (struct substring string) { const uint8_t *s = CHAR_CAST (const uint8_t *, string.string); size_t len = string.length; size_t ofs; int mblen; for (ofs = 0; ofs < string.length; ofs += mblen) { ucs4_t uc; mblen = u8_mbtouc (&uc, s + ofs, len - ofs); if (!(ofs == 0 ? lex_uc_is_id1 (uc) : lex_uc_is_idn (uc))) break; } return ofs; } /* Comparing identifiers. */ /* Returns true if TOKEN is a case-insensitive match for KEYWORD. Keywords match if one of the following is true: KEYWORD and TOKEN are identical, or TOKEN is at least 3 characters long and those characters are identical to KEYWORD. (Letters that differ only in case are considered identical.) KEYWORD must be ASCII, but TOKEN may be ASCII or UTF-8. */ bool lex_id_match (struct substring keyword, struct substring token) { return lex_id_match_n (keyword, token, 3); } /* Returns true if TOKEN is a case-insensitive match for at least the first N characters of KEYWORD. KEYWORD must be ASCII, but TOKEN may be ASCII or UTF-8. */ bool lex_id_match_n (struct substring keyword, struct substring token, size_t n) { size_t token_len = ss_length (token); size_t keyword_len = ss_length (keyword); if (token_len >= n && token_len < keyword_len) return ss_equals_case (ss_head (keyword, token_len), token); else return ss_equals_case (keyword, token); } /* Table of keywords. */ struct keyword { int token; const struct substring identifier; }; static const struct keyword keywords[] = { { T_AND, SS_LITERAL_INITIALIZER ("AND") }, { T_OR, SS_LITERAL_INITIALIZER ("OR") }, { T_NOT, SS_LITERAL_INITIALIZER ("NOT") }, { T_EQ, SS_LITERAL_INITIALIZER ("EQ") }, { T_GE, SS_LITERAL_INITIALIZER ("GE") }, { T_GT, SS_LITERAL_INITIALIZER ("GT") }, { T_LE, SS_LITERAL_INITIALIZER ("LE") }, { T_LT, SS_LITERAL_INITIALIZER ("LT") }, { T_NE, SS_LITERAL_INITIALIZER ("NE") }, { T_ALL, SS_LITERAL_INITIALIZER ("ALL") }, { T_BY, SS_LITERAL_INITIALIZER ("BY") }, { T_TO, SS_LITERAL_INITIALIZER ("TO") }, { T_WITH, SS_LITERAL_INITIALIZER ("WITH") }, }; static const size_t keyword_cnt = sizeof keywords / sizeof *keywords; /* Returns true if TOKEN is representable as a keyword. */ bool lex_is_keyword (enum token_type token) { const struct keyword *kw; for (kw = keywords; kw < &keywords[keyword_cnt]; kw++) if (kw->token == token) return true; return false; } /* Returns the proper token type, either T_ID or a reserved keyword enum, for ID. */ int lex_id_to_token (struct substring id) { if (ss_length (id) >= 2 && ss_length (id) <= 4) { const struct keyword *kw; for (kw = keywords; kw < &keywords[keyword_cnt]; kw++) if (ss_equals_case (kw->identifier, id)) return kw->token; } return T_ID; } pspp-1.0.1/src/data/attributes.h0000644000175000017500000000530313150617240013453 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2011, 2012, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_ATTRIBUTES_H #define DATA_ATTRIBUTES_H 1 #include "libpspp/hmapx.h" /* This header supports custom attribute of the sort maintained by the DATAFILE ATTRIBUTE and VARIABLE ATTRIBUTE commands. Attributes have a name (the rules for which are the same as those for PSPP variable names) and one or more values, each of which is a string. An attribute may be part of one attribute set. An attribute set is an unordered collection of attributes with names that are unique (case-insensitively). */ struct attribute *attribute_create (const char *name); struct attribute *attribute_clone (const struct attribute *); void attribute_destroy (struct attribute *); const char *attribute_get_name (const struct attribute *); const char *attribute_get_value (const struct attribute *, size_t index); void attribute_add_value (struct attribute *, const char *); void attribute_set_value (struct attribute *, size_t index, const char *); void attribute_del_value (struct attribute *, size_t index); size_t attribute_get_n_values (const struct attribute *); struct attrset { struct hmap map; }; void attrset_init (struct attrset *); void attrset_clone (struct attrset *, const struct attrset *); void attrset_destroy (struct attrset *); size_t attrset_count (const struct attrset *); struct attribute *attrset_lookup (const struct attrset *, const char *); bool attrset_try_add (struct attrset *, struct attribute *); void attrset_add (struct attrset *, struct attribute *); void attrset_delete (struct attrset *, const char *); void attrset_clear (struct attrset *); struct attrset_iterator { struct hmap_node *node; }; struct attribute *attrset_first (const struct attrset *, struct attrset_iterator *); struct attribute *attrset_next (const struct attrset *, struct attrset_iterator *); struct attribute **attrset_sorted (const struct attrset *); #endif /* data/attributes.h */ pspp-1.0.1/src/data/dataset.h0000644000175000017500000001056012671322442012717 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef PROCEDURE_H #define PROCEDURE_H 1 #include #include #include "data/transformations.h" struct casereader; struct dataset; struct dictionary; struct session; struct dataset *dataset_create (struct session *, const char *); struct dataset *dataset_clone (struct dataset *, const char *); void dataset_destroy (struct dataset *); void dataset_clear (struct dataset *); const char *dataset_name (const struct dataset *); void dataset_set_name (struct dataset *, const char *); struct session *dataset_session (const struct dataset *); void dataset_set_session (struct dataset *, struct session *); struct dictionary *dataset_dict (const struct dataset *); void dataset_set_dict (struct dataset *, struct dictionary *); const struct casereader *dataset_source (const struct dataset *); bool dataset_has_source (const struct dataset *ds); bool dataset_set_source (struct dataset *, struct casereader *); struct casereader *dataset_steal_source (struct dataset *); unsigned int dataset_seqno (const struct dataset *); struct dataset_callbacks { /* Called whenever a procedure completes execution or whenever the dictionary within the dataset is modified (though not when it is replaced by a new dictionary). */ void (*changed) (void *aux); /* Called whenever a transformation is added or removed. NON_EMPTY is true if after the change there is at least one transformation, false if there are no transformations. */ void (*transformations_changed) (bool non_empty, void *aux); }; void dataset_set_callbacks (struct dataset *, const struct dataset_callbacks *, void *aux); /* Dataset GUI window display status. */ enum dataset_display { DATASET_ASIS, /* Current state unchanged. */ DATASET_FRONT, /* Display and raise to top. */ DATASET_MINIMIZED, /* Display as icon. */ DATASET_HIDDEN /* Do not display. */ }; enum dataset_display dataset_get_display (const struct dataset *); void dataset_set_display (struct dataset *, enum dataset_display); /* Transformations. */ void add_transformation (struct dataset *ds, trns_proc_func *, trns_free_func *, void *); void add_transformation_with_finalizer (struct dataset *ds, trns_finalize_func *, trns_proc_func *, trns_free_func *, void *); size_t next_transformation (const struct dataset *ds); bool proc_cancel_all_transformations (struct dataset *ds); struct trns_chain *proc_capture_transformations (struct dataset *ds); void proc_start_temporary_transformations (struct dataset *ds); bool proc_in_temporary_transformations (const struct dataset *ds); bool proc_make_temporary_transformations_permanent (struct dataset *ds); bool proc_cancel_temporary_transformations (struct dataset *ds); struct variable *add_permanent_ordering_transformation (struct dataset *); /* Procedures. */ void proc_discard_output (struct dataset *ds); bool proc_execute (struct dataset *ds); time_t time_of_last_procedure (struct dataset *ds); struct casereader *proc_open_filtering (struct dataset *, bool filter); struct casereader *proc_open (struct dataset *); bool proc_is_open (const struct dataset *); bool proc_commit (struct dataset *); bool dataset_end_of_command (struct dataset *); const struct ccase *lagged_case (const struct dataset *ds, int n_before); void dataset_need_lag (struct dataset *ds, int n_before); /* Private interface for use by session code. */ void dataset_set_session__(struct dataset *, struct session *); #endif /* dataset.h */ pspp-1.0.1/src/data/case-matcher.h0000644000175000017500000000230412470242642013623 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DATA_CASE_MATCHER_H #define DATA_CASE_MATCHER_H 1 #include struct ccase; struct subcase; union value; struct case_matcher *case_matcher_create (void); void case_matcher_add_input (struct case_matcher *, const struct subcase *, struct ccase **, bool *is_minimal); void case_matcher_destroy (struct case_matcher *); bool case_matcher_match (struct case_matcher *, union value **by); #endif /* data/case-matcher.h */ pspp-1.0.1/src/data/casewriter.c0000644000175000017500000002343512642367743013455 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/casewriter.h" #include "data/casewriter-provider.h" #include #include #include "data/casereader.h" #include "data/casereader-provider.h" #include "data/casewindow.h" #include "data/settings.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/taint.h" #include "gl/xalloc.h" /* A casewriter. */ struct casewriter { struct taint *taint; struct caseproto *proto; casenumber case_cnt; const struct casewriter_class *class; void *aux; }; static struct casewriter *create_casewriter_window (const struct caseproto *, casenumber max_in_core); /* Writes case C to WRITER. Ownership of C is transferred to WRITER. */ void casewriter_write (struct casewriter *writer, struct ccase *c) { size_t n_widths UNUSED = caseproto_get_n_widths (writer->proto); assert (case_get_value_cnt (c) >= n_widths); expensive_assert (caseproto_equal (case_get_proto (c), 0, writer->proto, 0, n_widths)); writer->class->write (writer, writer->aux, c); } /* Destroys WRITER. Returns true if successful, false if an I/O error was encountered on WRITER or on some object on which WRITER has a dependency. */ bool casewriter_destroy (struct casewriter *writer) { bool ok = true; if (writer != NULL) { writer->class->destroy (writer, writer->aux); ok = taint_destroy (writer->taint); caseproto_unref (writer->proto); free (writer); } return ok; } /* Returns the prototype for that cases written to WRITER must follow. */ const struct caseproto * casewriter_get_proto (const struct casewriter *writer) { return writer->proto; } /* Destroys WRITER and in its place returns a casereader that can be used to read back the data written to WRITER. WRITER must not be used again after calling this function, even as an argument to casewriter_destroy. Not all casewriters implement this function. Behavior is undefined if it is called on one that does not. If an I/O error was encountered on WRITER or on some object on which WRITER has a dependency, then the error will be propagated to the new casereader. */ struct casereader * casewriter_make_reader (struct casewriter *writer) { struct casereader *reader = writer->class->convert_to_reader (writer, writer->aux); taint_propagate (writer->taint, casereader_get_taint (reader)); caseproto_unref (writer->proto); taint_destroy (writer->taint); free (writer); return reader; } /* Returns a copy of WRITER, which is itself destroyed. Useful for taking over ownership of a casewriter, to enforce preventing the original owner from accessing the casewriter again. */ struct casewriter * casewriter_rename (struct casewriter *writer) { struct casewriter *new = xmemdup (writer, sizeof *writer); free (writer); return new; } /* Returns true if an I/O error or another hard error has occurred on WRITER, a clone of WRITER, or on some object on which WRITER's data has a dependency, false otherwise. */ bool casewriter_error (const struct casewriter *writer) { return taint_is_tainted (writer->taint); } /* Marks WRITER as having encountered an error. Ordinarily, this function should be called by the implementation of a casewriter, not by the casewriter's client. Instead, casewriter clients should usually ensure that a casewriter's error state is correct by using taint_propagate to propagate to the casewriter's taint structure, which may be obtained via casewriter_get_taint. */ void casewriter_force_error (struct casewriter *writer) { taint_set_taint (writer->taint); } /* Returns WRITER's associate taint object, for use with taint_propagate and other taint functions. */ const struct taint * casewriter_get_taint (const struct casewriter *writer) { return writer->taint; } /* Creates and returns a new casewriter with the given CLASS and auxiliary data AUX. The casewriter accepts cases that match case prototype PROTO, of which the caller retains ownership. */ struct casewriter * casewriter_create (const struct caseproto *proto, const struct casewriter_class *class, void *aux) { struct casewriter *writer = xmalloc (sizeof *writer); writer->taint = taint_create (); writer->proto = caseproto_ref (proto); writer->case_cnt = 0; writer->class = class; writer->aux = aux; return writer; } /* Returns a casewriter for cases that match case prototype PROTO. The cases written to the casewriter will be kept in memory, unless the amount of memory used grows too large, in which case they will be written to disk. A casewriter created with this function may be passed to casewriter_make_reader. This is usually the right kind of casewriter to use. */ struct casewriter * autopaging_writer_create (const struct caseproto *proto) { return create_casewriter_window (proto, settings_get_workspace_cases (proto)); } /* Returns a casewriter for cases that match case prototype PROTO. The cases written to the casewriter will be kept in memory. A casewriter created with this function may be passed to casewriter_make_reader. */ struct casewriter * mem_writer_create (const struct caseproto *proto) { return create_casewriter_window (proto, CASENUMBER_MAX); } /* Returns a casewriter for cases that match case prototype PROTO. The cases written to the casewriter will be written to disk. A casewriter created with this function may be passed to casewriter_make_reader. */ struct casewriter * tmpfile_writer_create (const struct caseproto *proto) { return create_casewriter_window (proto, 0); } static const struct casewriter_class casewriter_window_class; static const struct casereader_random_class casereader_window_class; /* Creates and returns a new casewriter based on a casewindow. Each of the casewriter's cases are composed of VALUE_CNT struct values. The casewriter's cases will be maintained in memory until MAX_IN_CORE_CASES have been written, at which point they will be written to disk. */ static struct casewriter * create_casewriter_window (const struct caseproto *proto, casenumber max_in_core_cases) { struct casewindow *window = casewindow_create (proto, max_in_core_cases); struct casewriter *writer = casewriter_create (proto, &casewriter_window_class, window); taint_propagate (casewindow_get_taint (window), casewriter_get_taint (writer)); return writer; } /* Writes case C to casewindow writer WINDOW. */ static void casewriter_window_write (struct casewriter *writer UNUSED, void *window_, struct ccase *c) { struct casewindow *window = window_; casewindow_push_head (window, c); } /* Destroys casewindow writer WINDOW. */ static void casewriter_window_destroy (struct casewriter *writer UNUSED, void *window_) { struct casewindow *window = window_; casewindow_destroy (window); } /* Converts casewindow writer WINDOW to a casereader and returns the casereader. */ static struct casereader * casewriter_window_convert_to_reader (struct casewriter *writer UNUSED, void *window_) { struct casewindow *window = window_; struct casereader *reader = casereader_create_random (casewindow_get_proto (window), casewindow_get_case_cnt (window), &casereader_window_class, window); taint_propagate (casewindow_get_taint (window), casereader_get_taint (reader)); return reader; } /* Reads and returns the case at the given 0-based OFFSET from the front of WINDOW into C. Returns a null pointer if OFFSET is beyond the end of file or upon I/O error. The caller must call case_unref() on the returned case when it is no longer needed.*/ static struct ccase * casereader_window_read (struct casereader *reader UNUSED, void *window_, casenumber offset) { struct casewindow *window = window_; if (offset >= casewindow_get_case_cnt (window)) return NULL; return casewindow_get_case (window, offset); } /* Destroys casewindow reader WINDOW. */ static void casereader_window_destroy (struct casereader *reader UNUSED, void *window_) { struct casewindow *window = window_; casewindow_destroy (window); } /* Discards CASE_CNT cases from the front of WINDOW. */ static void casereader_window_advance (struct casereader *reader UNUSED, void *window_, casenumber case_cnt) { struct casewindow *window = window_; casewindow_pop_tail (window, case_cnt); } /* Class for casewindow writer. */ static const struct casewriter_class casewriter_window_class = { casewriter_window_write, casewriter_window_destroy, casewriter_window_convert_to_reader, }; /* Class for casewindow reader. */ static const struct casereader_random_class casereader_window_class = { casereader_window_read, casereader_window_destroy, casereader_window_advance, }; pspp-1.0.1/src/language/0000755000175000017500000000000013150620333012042 500000000000000pspp-1.0.1/src/language/stats/0000755000175000017500000000000013150620333013200 500000000000000pspp-1.0.1/src/language/stats/t-test-parser.c0000644000175000017500000002051613137223525016011 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/message.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dictionary.h" #include "data/dataset.h" #include "data/missing-values.h" #include "language/lexer/lexer.h" #include "language/command.h" #include "language/lexer/variable-parser.h" #include "language/lexer/value-parser.h" #include "gettext.h" #define _(msgid) gettext (msgid) #include "t-test.h" int cmd_t_test (struct lexer *lexer, struct dataset *ds) { bool ok; const struct dictionary *dict = dataset_dict (ds); struct tt tt; int mode_count = 0; /* Variables pertaining to the paired mode */ const struct variable **v1 = NULL; size_t n_v1 = 0; const struct variable **v2 = NULL; size_t n_v2 = 0; size_t n_pairs = 0; vp *pairs = NULL; /* One sample mode */ double testval = SYSMIS; /* Independent samples mode */ const struct variable *gvar; union value gval0; union value gval1; bool cut = false; tt.wv = dict_get_weight (dict); tt.dict = dict; tt.confidence = 0.95; tt.exclude = MV_ANY; tt.missing_type = MISS_ANALYSIS; tt.n_vars = 0; tt.vars = NULL; tt.mode = MODE_undef; lex_match (lexer, T_EQUALS); for (; lex_token (lexer) != T_ENDCMD; ) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "TESTVAL")) { mode_count++; tt.mode = MODE_SINGLE; lex_match (lexer, T_EQUALS); if (!lex_force_num (lexer)) goto parse_failed; testval = lex_number (lexer); lex_get (lexer); } else if (lex_match_id (lexer, "GROUPS")) { mode_count++; cut = false; tt.mode = MODE_INDEP; lex_match (lexer, T_EQUALS); if (NULL == (gvar = parse_variable (lexer, dict))) goto parse_failed; if (lex_match (lexer, T_LPAREN)) { value_init (&gval0, var_get_width (gvar)); parse_value (lexer, &gval0, gvar); cut = true; if (lex_token (lexer) != T_RPAREN) { lex_match (lexer, T_COMMA); value_init (&gval1, var_get_width (gvar)); parse_value (lexer, &gval1, gvar); cut = false; } if (! lex_force_match (lexer, T_RPAREN)) goto parse_failed; } else { value_init (&gval0, 0); value_init (&gval1, 0); gval0.f = 1.0; gval1.f = 2.0; cut = false; } if ( cut == true && var_is_alpha (gvar)) { msg (SE, _("When applying %s to a string variable, two " "values must be specified."), "GROUPS"); goto parse_failed; } } else if (lex_match_id (lexer, "PAIRS")) { bool with = false; bool paired = false; if (tt.n_vars > 0) { msg (SE, _("%s subcommand may not be used with %s."), "VARIABLES", "PAIRS"); goto parse_failed; } mode_count++; tt.mode = MODE_PAIRED; lex_match (lexer, T_EQUALS); if (!parse_variables_const (lexer, dict, &v1, &n_v1, PV_NO_DUPLICATE | PV_NUMERIC)) goto parse_failed; if ( lex_match (lexer, T_WITH)) { with = true; if (!parse_variables_const (lexer, dict, &v2, &n_v2, PV_NO_DUPLICATE | PV_NUMERIC)) goto parse_failed; if (lex_match (lexer, T_LPAREN) && lex_match_id (lexer, "PAIRED") && lex_match (lexer, T_RPAREN)) { paired = true; if (n_v1 != n_v2) { msg (SE, _("PAIRED was specified but the number of variables " "preceding WITH (%zu) did not match the number " "following (%zu)."), n_v1, n_v2); goto parse_failed; } } } { int i; if ( !with ) n_pairs = (n_v1 * (n_v1 - 1)) / 2.0; else if ( paired ) n_pairs = n_v1; else n_pairs = n_v1 * n_v2; pairs = xcalloc (n_pairs, sizeof *pairs); if ( with) { int x = 0; if (paired) { for (i = 0 ; i < n_v1; ++i) { vp *pair = &pairs[i]; (*pair)[0] = v1[i]; (*pair)[1] = v2[i]; } } else { for (i = 0 ; i < n_v1; ++i) { int j; for (j = 0 ; j < n_v2; ++j) { vp *pair = &pairs[x++]; (*pair)[0] = v1[i]; (*pair)[1] = v2[j]; } } } } else { int x = 0; for (i = 0 ; i < n_v1; ++i) { int j; for (j = i + 1 ; j < n_v1; ++j) { vp *pair = &pairs[x++]; (*pair)[0] = v1[i]; (*pair)[1] = v1[j]; } } } } } else if (lex_match_id (lexer, "VARIABLES")) { if ( tt.mode == MODE_PAIRED) { msg (SE, _("%s subcommand may not be used with %s."), "VARIABLES", "PAIRS"); goto parse_failed; } lex_match (lexer, T_EQUALS); if (!parse_variables_const (lexer, dict, &tt.vars, &tt.n_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto parse_failed; } else if ( lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "INCLUDE")) { tt.exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "EXCLUDE")) { tt.exclude = MV_ANY; } else if (lex_match_id (lexer, "LISTWISE")) { tt.missing_type = MISS_LISTWISE; } else if (lex_match_id (lexer, "ANALYSIS")) { tt.missing_type = MISS_ANALYSIS; } else { lex_error (lexer, NULL); goto parse_failed; } lex_match (lexer, T_COMMA); } } else if (lex_match_id (lexer, "CRITERIA")) { lex_match (lexer, T_EQUALS); if ( lex_match_id (lexer, "CIN") || lex_force_match_id (lexer, "CI")) if ( lex_force_match (lexer, T_LPAREN)) { if (!lex_force_num (lexer)) goto parse_failed; tt.confidence = lex_number (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto parse_failed; } } else { lex_error (lexer, NULL); goto parse_failed; } } if ( mode_count != 1) { msg (SE, _("Exactly one of TESTVAL, GROUPS and PAIRS subcommands " "must be specified.")); goto parse_failed; } if (tt.n_vars == 0 && tt.mode != MODE_PAIRED) { lex_sbc_missing ("VARIABLES"); goto parse_failed; } /* Deal with splits etc */ { struct casereader *group; struct casegrouper *grouper = casegrouper_create_splits (proc_open (ds), dict); while (casegrouper_get_next_group (grouper, &group)) { if ( tt.mode == MODE_SINGLE) { if ( tt.missing_type == MISS_LISTWISE ) group = casereader_create_filter_missing (group, tt.vars, tt.n_vars, tt.exclude, NULL, NULL); one_sample_run (&tt, testval, group); } else if ( tt.mode == MODE_PAIRED) { if ( tt.missing_type == MISS_LISTWISE ) { group = casereader_create_filter_missing (group, v1, n_v1, tt.exclude, NULL, NULL); group = casereader_create_filter_missing (group, v2, n_v2, tt.exclude, NULL, NULL); } paired_run (&tt, n_pairs, pairs, group); } else /* tt.mode == MODE_INDEP */ { if ( tt.missing_type == MISS_LISTWISE ) { group = casereader_create_filter_missing (group, tt.vars, tt.n_vars, tt.exclude, NULL, NULL); group = casereader_create_filter_missing (group, &gvar, 1, tt.exclude, NULL, NULL); } indep_run (&tt, gvar, cut, &gval0, &gval1, group); } } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; } free (pairs); free (v1); free (v2); free (tt.vars); return ok ? CMD_SUCCESS : CMD_FAILURE; parse_failed: free (pairs); free (v1); free (v2); free (tt.vars); return CMD_FAILURE; } pspp-1.0.1/src/language/stats/median.c0000644000175000017500000002674713137223525014550 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "median.h" #include #include "data/format.h" #include "data/variable.h" #include "data/case.h" #include "data/dictionary.h" #include "data/dataset.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/subcase.h" #include "data/value.h" #include "math/percentiles.h" #include "math/sort.h" #include "libpspp/cast.h" #include "libpspp/hmap.h" #include "libpspp/array.h" #include "libpspp/str.h" #include "libpspp/misc.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct val_node { struct hmap_node node; union value val; casenumber le; casenumber gt; }; struct results { const struct variable *var; struct val_node **sorted_array; double n; double median; double chisq; }; static int val_node_cmp_3way (const void *a_, const void *b_, const void *aux) { const struct variable *indep_var = aux; const struct val_node *const *a = a_; const struct val_node *const *b = b_; return value_compare_3way (&(*a)->val, &(*b)->val, var_get_width (indep_var)); } static void show_frequencies (const struct n_sample_test *nst, const struct results *results, int n_vals, const struct dictionary *); static void show_test_statistics (const struct n_sample_test *nst, const struct results *results, int, const struct dictionary *); static struct val_node * find_value (const struct hmap *map, const union value *val, const struct variable *var) { struct val_node *foo = NULL; size_t hash = value_hash (val, var_get_width (var), 0); HMAP_FOR_EACH_WITH_HASH (foo, struct val_node, node, hash, map) if (value_equal (val, &foo->val, var_get_width (var))) break; return foo; } void median_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact UNUSED, double timer UNUSED) { const struct dictionary *dict = dataset_dict (ds); const struct variable *wvar = dict_get_weight (dict); bool warn = true; int v; const struct median_test *mt = UP_CAST (test, const struct median_test, parent.parent); const struct n_sample_test *nst = UP_CAST (test, const struct n_sample_test, parent); const bool n_sample_test = (value_compare_3way (&nst->val2, &nst->val1, var_get_width (nst->indep_var)) > 0); struct results *results = xcalloc (nst->n_vars, sizeof (*results)); int n_vals = 0; for (v = 0; v < nst->n_vars; ++v) { double count = 0; double cc = 0; double median = mt->median; const struct variable *var = nst->vars[v]; struct ccase *c; struct hmap map = HMAP_INITIALIZER (map); struct casereader *r = casereader_clone (input); if (n_sample_test == false) { struct val_node *vn = xzalloc (sizeof *vn); value_clone (&vn->val, &nst->val1, var_get_width (nst->indep_var)); hmap_insert (&map, &vn->node, value_hash (&nst->val1, var_get_width (nst->indep_var), 0)); vn = xzalloc (sizeof *vn); value_clone (&vn->val, &nst->val2, var_get_width (nst->indep_var)); hmap_insert (&map, &vn->node, value_hash (&nst->val2, var_get_width (nst->indep_var), 0)); } if ( median == SYSMIS) { struct percentile *ptl; struct order_stats *os; struct casereader *rr; struct subcase sc; struct casewriter *writer; subcase_init_var (&sc, var, SC_ASCEND); rr = casereader_clone (r); writer = sort_create_writer (&sc, casereader_get_proto (rr)); for (; (c = casereader_read (rr)) != NULL; ) { if ( var_is_value_missing (var, case_data (c, var), exclude)) { case_unref (c); continue; } cc += dict_get_case_weight (dict, c, &warn); casewriter_write (writer, c); } subcase_destroy (&sc); casereader_destroy (rr); rr = casewriter_make_reader (writer); ptl = percentile_create (0.5, cc); os = &ptl->parent; order_stats_accumulate (&os, 1, rr, wvar, var, exclude); median = percentile_calculate (ptl, PC_HAVERAGE); statistic_destroy (&ptl->parent.parent); } results[v].median = median; for (; (c = casereader_read (r)) != NULL; case_unref (c)) { struct val_node *vn ; const double weight = dict_get_case_weight (dict, c, &warn); const union value *val = case_data (c, var); const union value *indep_val = case_data (c, nst->indep_var); if ( var_is_value_missing (var, case_data (c, var), exclude)) { continue; } if (n_sample_test) { int width = var_get_width (nst->indep_var); /* Ignore out of range values */ if ( value_compare_3way (indep_val, &nst->val1, width) < 0 || value_compare_3way (indep_val, &nst->val2, width) > 0 ) { continue; } } vn = find_value (&map, indep_val, nst->indep_var); if ( vn == NULL) { if ( n_sample_test == true) { int width = var_get_width (nst->indep_var); vn = xzalloc (sizeof *vn); value_clone (&vn->val, indep_val, width); hmap_insert (&map, &vn->node, value_hash (indep_val, width, 0)); } else { continue; } } if (val->f <= median) vn->le += weight; else vn->gt += weight; count += weight; } casereader_destroy (r); { int x = 0; struct val_node *vn = NULL; double r_0 = 0; double r_1 = 0; HMAP_FOR_EACH (vn, struct val_node, node, &map) { r_0 += vn->le; r_1 += vn->gt; } results[v].n = count; results[v].sorted_array = xcalloc (hmap_count (&map), sizeof (void*)); results[v].var = var; HMAP_FOR_EACH (vn, struct val_node, node, &map) { double e_0j = r_0 * (vn->le + vn->gt) / count; double e_1j = r_1 * (vn->le + vn->gt) / count; results[v].chisq += pow2 (vn->le - e_0j) / e_0j; results[v].chisq += pow2 (vn->gt - e_1j) / e_1j; results[v].sorted_array[x++] = vn; } n_vals = x; hmap_destroy (&map); sort (results[v].sorted_array, x, sizeof (*results[v].sorted_array), val_node_cmp_3way, nst->indep_var); } } casereader_destroy (input); show_frequencies (nst, results, n_vals, dict); show_test_statistics (nst, results, n_vals, dict); for (v = 0; v < nst->n_vars; ++v) { int i; const struct results *rs = results + v; for (i = 0; i < n_vals; ++i) { struct val_node *vn = rs->sorted_array[i]; value_destroy (&vn->val, var_get_width (nst->indep_var)); free (vn); } free (rs->sorted_array); } free (results); } static void show_frequencies (const struct n_sample_test *nst, const struct results *results, int n_vals, const struct dictionary *dict) { const struct variable *weight = dict_get_weight (dict); const struct fmt_spec *wfmt = weight ? var_get_print_format (weight) : &F_8_0; int i; int v; const int row_headers = 2; const int column_headers = 2; const int nc = row_headers + n_vals; const int nr = column_headers + nst->n_vars * 2; struct tab_table *table = tab_create (nc, nr); tab_set_format (table, RC_WEIGHT, wfmt); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Frequencies")); /* Box around the table and vertical lines inside*/ tab_box (table, TAL_2, TAL_2, -1, TAL_1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); tab_joint_text (table, row_headers, 0, row_headers + n_vals - 1, 0, TAT_TITLE | TAB_CENTER, var_to_string (nst->indep_var)); tab_hline (table, TAL_1, row_headers, tab_nc (table) - 1, 1); for (i = 0; i < n_vals; ++i) { const struct results *rs = results + 0; struct string label; ds_init_empty (&label); var_append_value_name (nst->indep_var, &rs->sorted_array[i]->val, &label); tab_text (table, row_headers + i, 1, TAT_TITLE | TAB_LEFT, ds_cstr (&label)); ds_destroy (&label); } for (v = 0; v < nst->n_vars; ++v) { const struct results *rs = &results[v]; tab_text (table, 0, column_headers + v * 2, TAT_TITLE | TAB_LEFT, var_to_string (rs->var) ); tab_text (table, 1, column_headers + v * 2, TAT_TITLE | TAB_LEFT, _("> Median") ); tab_text (table, 1, column_headers + v * 2 + 1, TAT_TITLE | TAB_LEFT, _("≤ Median") ); if ( v > 0) tab_hline (table, TAL_1, 0, tab_nc (table) - 1, column_headers + v * 2); } for (v = 0; v < nst->n_vars; ++v) { int i; const struct results *rs = &results[v]; for (i = 0; i < n_vals; ++i) { const struct val_node *vn = rs->sorted_array[i]; tab_double (table, row_headers + i, column_headers + v * 2, 0, vn->gt, NULL, RC_WEIGHT); tab_double (table, row_headers + i, column_headers + v * 2 + 1, 0, vn->le, NULL, RC_WEIGHT); } } tab_submit (table); } static void show_test_statistics (const struct n_sample_test *nst, const struct results *results, int n_vals, const struct dictionary *dict) { const struct variable *weight = dict_get_weight (dict); const struct fmt_spec *wfmt = weight ? var_get_print_format (weight) : &F_8_0; int v; const int row_headers = 1; const int column_headers = 1; const int nc = row_headers + 5; const int nr = column_headers + nst->n_vars; struct tab_table *table = tab_create (nc, nr); tab_set_format (table, RC_WEIGHT, wfmt); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Test Statistics")); tab_box (table, TAL_2, TAL_2, -1, TAL_1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); tab_text (table, row_headers + 0, 0, TAT_TITLE | TAB_CENTER, _("N")); tab_text (table, row_headers + 1, 0, TAT_TITLE | TAB_CENTER, _("Median")); tab_text (table, row_headers + 2, 0, TAT_TITLE | TAB_CENTER, _("Chi-Square")); tab_text (table, row_headers + 3, 0, TAT_TITLE | TAB_CENTER, _("df")); tab_text (table, row_headers + 4, 0, TAT_TITLE | TAB_CENTER, _("Asymp. Sig.")); for (v = 0; v < nst->n_vars; ++v) { double df = n_vals - 1; const struct results *rs = &results[v]; tab_text (table, 0, column_headers + v, TAT_TITLE | TAB_LEFT, var_to_string (rs->var)); tab_double (table, row_headers + 0, column_headers + v, 0, rs->n, NULL, RC_WEIGHT); tab_double (table, row_headers + 1, column_headers + v, 0, rs->median, NULL, RC_OTHER); tab_double (table, row_headers + 2, column_headers + v, 0, rs->chisq, NULL, RC_OTHER); tab_double (table, row_headers + 3, column_headers + v, 0, df, NULL, RC_WEIGHT); tab_double (table, row_headers + 4, column_headers + v, 0, gsl_cdf_chisq_Q (rs->chisq, df), NULL, RC_PVALUE); } tab_submit (table); } pspp-1.0.1/src/language/stats/runs.c0000644000175000017500000002360713137223525014272 00000000000000/* PSPP - a program for statistical analysis. -*-c-*- Copyright (C) 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/runs.h" #include #include #include #include "data/casegrouper.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/subcase.h" #include "data/variable.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "math/percentiles.h" #include "math/sort.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct run_state { /* The value used to dichotimise the data */ double cutpoint; /* The number of cases not less than cutpoint */ double np; /* The number of cases less than cutpoint */ double nn; /* The sum of np and nn */ double n; /* The number of runs */ long runs; /* The sign of the last case seen */ short last_sign; }; /* Return the Z statistic representing the assympototic distribution of the number of runs */ static double runs_statistic (const struct run_state *rs) { double z; double sigma; double mu = 2 * rs->np * rs->nn; mu /= rs->np + rs->nn; mu += 1.0; z = rs->runs - mu; if ( rs->n < 50) { if (z <= -0.5) z += 0.5; else if (z >= 0.5) z -= 0.5; else return 0; } sigma = 2 * rs->np * rs->nn; sigma *= 2 * rs->np * rs->nn - rs->nn - rs->np; sigma /= pow2 (rs->np + rs->nn); sigma /= rs->np + rs->nn - 1.0; sigma = sqrt (sigma); z /= sigma; return z; } static void show_runs_result (const struct runs_test *, const struct run_state *, const struct dictionary *); void runs_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact UNUSED, double timer UNUSED) { int v; struct ccase *c; const struct dictionary *dict = dataset_dict (ds); const struct variable *weight = dict_get_weight (dict); struct one_sample_test *otp = UP_CAST (test, struct one_sample_test, parent); struct runs_test *rt = UP_CAST (otp, struct runs_test, parent); struct run_state *rs = xcalloc (otp->n_vars, sizeof (*rs)); switch ( rt->cp_mode) { case CP_MODE: { for (v = 0; v < otp->n_vars; ++v) { bool multimodal = false; struct run_state *run = &rs[v]; double last_cc; struct casereader *group = NULL; struct casegrouper *grouper; struct casereader *reader = casereader_clone (input); const struct variable *var = otp->vars[v]; reader = sort_execute_1var (reader, var); grouper = casegrouper_create_vars (reader, &var, 1); last_cc = SYSMIS; while (casegrouper_get_next_group (grouper, &group)) { double x = SYSMIS; double cc = 0.0; struct ccase *c; for (; (c = casereader_read (group)); case_unref (c)) { const double w = weight ? case_data (c, weight)->f: 1.0; const union value *val = case_data (c, var); if ( var_is_value_missing (var, val, exclude)) continue; x = val->f; cc += w; } if ( cc > last_cc) { run->cutpoint = x; } else if ( cc == last_cc) { multimodal = true; if ( x > run->cutpoint) run->cutpoint = x; } last_cc = cc; casereader_destroy (group); } casegrouper_destroy (grouper); if (multimodal) msg (MW, _("Multiple modes exist for variable `%s'. " "Using %.*g as the threshold value."), var_get_name (var), DBL_DIG + 1, run->cutpoint); } } break; case CP_MEDIAN: { for (v = 0; v < otp->n_vars; ++v) { double cc = 0.0; struct ccase *c; struct run_state *run = &rs[v]; struct casereader *reader = casereader_clone (input); const struct variable *var = otp->vars[v]; struct casewriter *writer; struct percentile *median; struct order_stats *os; struct subcase sc; subcase_init_var (&sc, var, SC_ASCEND); writer = sort_create_writer (&sc, casereader_get_proto (reader)); for (; (c = casereader_read (reader)); ) { const union value *val = case_data (c, var); const double w = weight ? case_data (c, weight)->f: 1.0; if ( var_is_value_missing (var, val, exclude)) { case_unref (c); continue; } cc += w; casewriter_write (writer, c); } subcase_destroy (&sc); casereader_destroy (reader); reader = casewriter_make_reader (writer); median = percentile_create (0.5, cc); os = &median->parent; order_stats_accumulate (&os, 1, reader, weight, var, exclude); run->cutpoint = percentile_calculate (median, PC_HAVERAGE); statistic_destroy (&median->parent.parent); } } break; case CP_MEAN: { struct casereader *reader = casereader_clone (input); for (; (c = casereader_read (reader)); case_unref (c)) { const double w = weight ? case_data (c, weight)->f: 1.0; for (v = 0; v < otp->n_vars; ++v) { const struct variable *var = otp->vars[v]; const union value *val = case_data (c, var); const double x = val->f; struct run_state *run = &rs[v]; if ( var_is_value_missing (var, val, exclude)) continue; run->cutpoint += x * w; run->n += w; } } casereader_destroy (reader); for (v = 0; v < otp->n_vars; ++v) { struct run_state *run = &rs[v]; run->cutpoint /= run->n; } } break; case CP_CUSTOM: { for (v = 0; v < otp->n_vars; ++v) { struct run_state *run = &rs[v]; run->cutpoint = rt->cutpoint; } } break; } for (; (c = casereader_read (input)); case_unref (c)) { const double w = weight ? case_data (c, weight)->f: 1.0; for (v = 0; v < otp->n_vars; ++v) { struct run_state *run = &rs[v]; const struct variable *var = otp->vars[v]; const union value *val = case_data (c, var); double x = val->f; double d = x - run->cutpoint; short sign = 0; if ( var_is_value_missing (var, val, exclude)) continue; if (d >= 0) { sign = +1; run->np += w; } else { sign = -1; run->nn += w; } if (sign != run->last_sign) run->runs++; run->last_sign = sign; } } casereader_destroy (input); for (v = 0; v < otp->n_vars; ++v) { struct run_state *run = &rs[v]; run->n = run->np + run->nn; } show_runs_result (rt, rs, dict); free (rs); } static void show_runs_result (const struct runs_test *rt, const struct run_state *rs, const struct dictionary *dict) { const struct variable *weight = dict_get_weight (dict); const struct fmt_spec *wfmt = weight ? var_get_print_format (weight) : &F_8_0; const struct one_sample_test *otp = &rt->parent; int i; const int row_headers = 1; const int column_headers = 1; struct tab_table *table = tab_create (row_headers + otp->n_vars, column_headers + 7); tab_set_format (table, RC_WEIGHT, wfmt); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Runs Test")); /* Box around the table and vertical lines inside*/ tab_box (table, TAL_2, TAL_2, -1, TAL_1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); for (i = 0 ; i < otp->n_vars; ++i) { const struct run_state *run = &rs[i]; double z = runs_statistic (run); tab_text (table, row_headers + i, 0, TAT_TITLE | TAB_CENTER , var_to_string (otp->vars[i])); tab_double (table, row_headers +i, 1, 0, run->cutpoint, NULL, RC_OTHER); tab_double (table, row_headers +i, 2, 0, run->nn, NULL, RC_WEIGHT); tab_double (table, row_headers +i, 3, 0, run->np, NULL, RC_WEIGHT); tab_double (table, row_headers +i, 4, 0, run->n, NULL, RC_WEIGHT); tab_double (table, row_headers +i, 5, 0, run->runs, NULL, RC_INTEGER); tab_double (table, row_headers +i, 6, 0, z, NULL, RC_OTHER); tab_double (table, row_headers +i, 7, 0, 2.0 * (1.0 - gsl_cdf_ugaussian_P (z)), NULL, RC_PVALUE); } switch ( rt->cp_mode) { case CP_CUSTOM: tab_text (table, 0, column_headers , TAT_TITLE | TAB_LEFT , _("Test Value")); break; case CP_MODE: tab_text (table, 0, column_headers , TAT_TITLE | TAB_LEFT , _("Test Value (mode)")); break; case CP_MEAN: tab_text (table, 0, column_headers , TAT_TITLE | TAB_LEFT , _("Test Value (mean)")); break; case CP_MEDIAN: tab_text (table, 0, column_headers , TAT_TITLE | TAB_LEFT , _("Test Value (median)")); break; } tab_text (table, 0, column_headers + 1, TAT_TITLE | TAB_LEFT , _("Cases < Test Value")); tab_text (table, 0, column_headers + 2, TAT_TITLE | TAB_LEFT , _("Cases ≥ Test Value")); tab_text (table, 0, column_headers + 3, TAT_TITLE | TAB_LEFT , _("Total Cases")); tab_text (table, 0, column_headers + 4, TAT_TITLE | TAB_LEFT , _("Number of Runs")); tab_text (table, 0, column_headers + 5, TAT_TITLE | TAB_LEFT , _("Z")); tab_text (table, 0, column_headers + 6, TAT_TITLE | TAB_LEFT , _("Asymp. Sig. (2-tailed)")); tab_submit (table); } pspp-1.0.1/src/language/stats/wilcoxon.c0000644000175000017500000002363612523704223015144 00000000000000/* Pspp - a program for statistical analysis. Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/wilcoxon.h" #include #include #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/subcase.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "math/sort.h" #include "math/wilcoxon-sig.h" #include "output/tab.h" #include "gl/minmax.h" #include "gl/xalloc.h" static double append_difference (const struct ccase *c, casenumber n UNUSED, void *aux) { const variable_pair *vp = aux; return case_data (c, (*vp)[0])->f - case_data (c, (*vp)[1])->f; } static void show_ranks_box (const struct wilcoxon_state *, const struct two_sample_test *, const struct dictionary *); static void show_tests_box (const struct wilcoxon_state *, const struct two_sample_test *, bool exact, double timer); static void distinct_callback (double v UNUSED, casenumber n, double w UNUSED, void *aux) { struct wilcoxon_state *ws = aux; ws->tiebreaker += pow3 (n) - n; } #define WEIGHT_IDX 2 void wilcoxon_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact, double timer) { int i; bool warn = true; const struct dictionary *dict = dataset_dict (ds); const struct two_sample_test *t2s = UP_CAST (test, const struct two_sample_test, parent); struct wilcoxon_state *ws = xcalloc (t2s->n_pairs, sizeof *ws); const struct variable *weight = dict_get_weight (dict); struct variable *weightx = dict_create_internal_var (WEIGHT_IDX, 0); struct caseproto *proto; input = casereader_create_filter_weight (input, dict, &warn, NULL); proto = caseproto_create (); proto = caseproto_add_width (proto, 0); proto = caseproto_add_width (proto, 0); if (weight != NULL) proto = caseproto_add_width (proto, 0); for (i = 0 ; i < t2s->n_pairs; ++i ) { struct casereader *r = casereader_clone (input); struct casewriter *writer; struct ccase *c; struct subcase ordering; variable_pair *vp = &t2s->pairs[i]; ws[i].sign = dict_create_internal_var (0, 0); ws[i].absdiff = dict_create_internal_var (1, 0); r = casereader_create_filter_missing (r, *vp, 2, exclude, NULL, NULL); subcase_init_var (&ordering, ws[i].absdiff, SC_ASCEND); writer = sort_create_writer (&ordering, proto); subcase_destroy (&ordering); for (; (c = casereader_read (r)) != NULL; case_unref (c)) { struct ccase *output = case_create (proto); double d = append_difference (c, 0, vp); if (d > 0) { case_data_rw (output, ws[i].sign)->f = 1.0; } else if (d < 0) { case_data_rw (output, ws[i].sign)->f = -1.0; } else { double w = 1.0; if (weight) w = case_data (c, weight)->f; /* Central point values should be dropped */ ws[i].n_zeros += w; case_unref (output); continue; } case_data_rw (output, ws[i].absdiff)->f = fabs (d); if (weight) case_data_rw (output, weightx)->f = case_data (c, weight)->f; casewriter_write (writer, output); } casereader_destroy (r); ws[i].reader = casewriter_make_reader (writer); } caseproto_unref (proto); for (i = 0 ; i < t2s->n_pairs; ++i ) { struct casereader *rr ; struct ccase *c; enum rank_error err = 0; rr = casereader_create_append_rank (ws[i].reader, ws[i].absdiff, weight ? weightx : NULL, &err, distinct_callback, &ws[i] ); for (; (c = casereader_read (rr)) != NULL; case_unref (c)) { double sign = case_data (c, ws[i].sign)->f; double rank = case_data_idx (c, weight ? 3 : 2)->f; double w = 1.0; if (weight) w = case_data (c, weightx)->f; if ( sign > 0 ) { ws[i].positives.sum += rank * w; ws[i].positives.n += w; } else if (sign < 0) { ws[i].negatives.sum += rank * w; ws[i].negatives.n += w; } else NOT_REACHED (); } casereader_destroy (rr); } casereader_destroy (input); dict_destroy_internal_var (weightx); show_ranks_box (ws, t2s, dict); show_tests_box (ws, t2s, exact, timer); for (i = 0 ; i < t2s->n_pairs; ++i ) { dict_destroy_internal_var (ws[i].sign); dict_destroy_internal_var (ws[i].absdiff); } free (ws); } #include "gettext.h" #define _(msgid) gettext (msgid) static void show_ranks_box (const struct wilcoxon_state *ws, const struct two_sample_test *t2s, const struct dictionary *dict) { size_t i; const struct variable *wv = dict_get_weight (dict); const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0; struct tab_table *table = tab_create (5, 1 + 4 * t2s->n_pairs); tab_set_format (table, RC_WEIGHT, wfmt); tab_title (table, _("Ranks")); tab_headers (table, 2, 0, 1, 0); /* Vertical lines inside the box */ tab_box (table, 0, 0, -1, TAL_1, 1, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); /* Box around entire table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_text (table, 2, 0, TAB_CENTER, _("N")); tab_text (table, 3, 0, TAB_CENTER, _("Mean Rank")); tab_text (table, 4, 0, TAB_CENTER, _("Sum of Ranks")); for (i = 0 ; i < t2s->n_pairs; ++i) { variable_pair *vp = &t2s->pairs[i]; struct string pair_name; ds_init_cstr (&pair_name, var_to_string ((*vp)[0])); ds_put_cstr (&pair_name, " - "); ds_put_cstr (&pair_name, var_to_string ((*vp)[1])); tab_text (table, 1, 1 + i * 4, TAB_LEFT, _("Negative Ranks")); tab_text (table, 1, 2 + i * 4, TAB_LEFT, _("Positive Ranks")); tab_text (table, 1, 3 + i * 4, TAB_LEFT, _("Ties")); tab_text (table, 1, 4 + i * 4, TAB_LEFT, _("Total")); tab_hline (table, TAL_1, 0, tab_nc (table) - 1, 1 + i * 4); tab_text (table, 0, 1 + i * 4, TAB_LEFT, ds_cstr (&pair_name)); ds_destroy (&pair_name); /* N */ tab_double (table, 2, 1 + i * 4, TAB_RIGHT, ws[i].negatives.n, NULL, RC_WEIGHT); tab_double (table, 2, 2 + i * 4, TAB_RIGHT, ws[i].positives.n, NULL, RC_WEIGHT); tab_double (table, 2, 3 + i * 4, TAB_RIGHT, ws[i].n_zeros, NULL, RC_WEIGHT); tab_double (table, 2, 4 + i * 4, TAB_RIGHT, ws[i].n_zeros + ws[i].positives.n + ws[i].negatives.n, NULL, RC_WEIGHT); /* Sums */ tab_double (table, 4, 1 + i * 4, TAB_RIGHT, ws[i].negatives.sum, NULL, RC_OTHER); tab_double (table, 4, 2 + i * 4, TAB_RIGHT, ws[i].positives.sum, NULL, RC_OTHER); /* Means */ tab_double (table, 3, 1 + i * 4, TAB_RIGHT, ws[i].negatives.sum / (double) ws[i].negatives.n, NULL, RC_OTHER); tab_double (table, 3, 2 + i * 4, TAB_RIGHT, ws[i].positives.sum / (double) ws[i].positives.n, NULL, RC_OTHER); } tab_hline (table, TAL_2, 0, tab_nc (table) - 1, 1); tab_vline (table, TAL_2, 2, 0, tab_nr (table) - 1); tab_submit (table); } static void show_tests_box (const struct wilcoxon_state *ws, const struct two_sample_test *t2s, bool exact, double timer UNUSED ) { size_t i; struct tab_table *table = tab_create (1 + t2s->n_pairs, exact ? 5 : 3); tab_title (table, _("Test Statistics")); tab_headers (table, 1, 0, 1, 0); /* Vertical lines inside the box */ tab_box (table, 0, 0, -1, TAL_1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); /* Box around entire table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_text (table, 0, 1, TAB_LEFT, _("Z")); tab_text (table, 0, 2, TAB_LEFT, _("Asymp. Sig. (2-tailed)")); if ( exact ) { tab_text (table, 0, 3, TAB_LEFT, _("Exact Sig. (2-tailed)")); tab_text (table, 0, 4, TAB_LEFT, _("Exact Sig. (1-tailed)")); #if 0 tab_text (table, 0, 5, TAB_LEFT, _("Point Probability")); #endif } for (i = 0 ; i < t2s->n_pairs; ++i) { double z; double n = ws[i].positives.n + ws[i].negatives.n; variable_pair *vp = &t2s->pairs[i]; struct string pair_name; ds_init_cstr (&pair_name, var_to_string ((*vp)[0])); ds_put_cstr (&pair_name, " - "); ds_put_cstr (&pair_name, var_to_string ((*vp)[1])); tab_text (table, 1 + i, 0, TAB_CENTER, ds_cstr (&pair_name)); ds_destroy (&pair_name); z = MIN (ws[i].positives.sum, ws[i].negatives.sum); z -= n * (n + 1)/ 4.0; z /= sqrt (n * (n + 1) * (2*n + 1)/24.0 - ws[i].tiebreaker / 48.0); tab_double (table, 1 + i, 1, TAB_RIGHT, z, NULL, RC_OTHER); tab_double (table, 1 + i, 2, TAB_RIGHT, 2.0 * gsl_cdf_ugaussian_P (z), NULL, RC_PVALUE); if (exact) { double p = LevelOfSignificanceWXMPSR (ws[i].positives.sum, n); if (p < 0) { msg (MW, _("Too many pairs to calculate exact significance.")); } else { tab_double (table, 1 + i, 3, TAB_RIGHT, p, NULL, RC_PVALUE); tab_double (table, 1 + i, 4, TAB_RIGHT, p / 2.0, NULL, RC_PVALUE); } } } tab_hline (table, TAL_2, 0, tab_nc (table) - 1, 1); tab_vline (table, TAL_2, 1, 0, tab_nr (table) - 1); tab_submit (table); } pspp-1.0.1/src/language/stats/binomial.c0000644000175000017500000001710312523704223015064 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/binomial.h" #include #include #include #include "data/case.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/value-labels.h" #include "data/value.h" #include "data/variable.h" #include "language/stats/freq.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "output/tab.h" #include "gl/xalloc.h" #include "gl/minmax.h" #include "gettext.h" #define _(msgid) gettext (msgid) static double calculate_binomial_internal (double n1, double n2, double p); static void swap (double *i1, double *i2) { double temp = *i1; *i1 = *i2; *i2 = temp; } static double calculate_binomial (double n1, double n2, double p) { const double n = n1 + n2; const bool test_reversed = (n1 / n > p ) ; if ( test_reversed ) { p = 1 - p ; swap (&n1, &n2); } return calculate_binomial_internal (n1, n2, p); } static double calculate_binomial_internal (double n1, double n2, double p) { /* SPSS Statistical Algorithms has completely different and WRONG advice here. */ double sig1tailed = gsl_cdf_binomial_P (n1, p, n1 + n2); if ( p == 0.5 ) return sig1tailed > 0.5 ? 1.0 :sig1tailed * 2.0; return sig1tailed ; } static bool do_binomial (const struct dictionary *dict, struct casereader *input, const struct one_sample_test *ost, struct freq *cat1, struct freq *cat2, enum mv_class exclude ) { const struct binomial_test *bst = UP_CAST (ost, const struct binomial_test, parent); bool warn = true; struct ccase *c; for (; (c = casereader_read (input)) != NULL; case_unref (c)) { int v; double w = dict_get_case_weight (dict, c, &warn); for (v = 0 ; v < ost->n_vars ; ++v ) { const struct variable *var = ost->vars[v]; double value = case_num (c, var); if (var_is_num_missing (var, value, exclude)) continue; if (bst->cutpoint != SYSMIS) { if ( cat1[v].values[0].f >= value ) cat1[v].count += w; else cat2[v].count += w; } else { if ( SYSMIS == cat1[v].values[0].f ) { cat1[v].values[0].f = value; cat1[v].count = w; } else if ( cat1[v].values[0].f == value ) cat1[v].count += w; else if ( SYSMIS == cat2[v].values[0].f ) { cat2[v].values[0].f = value; cat2[v].count = w; } else if ( cat2[v].values[0].f == value ) cat2[v].count += w; else if ( bst->category1 == SYSMIS) msg (ME, _("Variable %s is not dichotomous"), var_get_name (var)); } } } return casereader_destroy (input); } void binomial_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact UNUSED, double timer UNUSED) { int v; const struct dictionary *dict = dataset_dict (ds); const struct one_sample_test *ost = UP_CAST (test, const struct one_sample_test, parent); const struct binomial_test *bst = UP_CAST (ost, const struct binomial_test, parent); struct freq *cat[2]; int i; assert ((bst->category1 == SYSMIS) == (bst->category2 == SYSMIS) || bst->cutpoint != SYSMIS); for (i = 0; i < 2; i++) { double value; if (i == 0) value = bst->cutpoint != SYSMIS ? bst->cutpoint : bst->category1; else value = bst->category2; cat[i] = xnmalloc (ost->n_vars, sizeof *cat[i]); for (v = 0; v < ost->n_vars; v++) { cat[i][v].values[0].f = value; cat[i][v].count = 0; } } if (do_binomial (dataset_dict (ds), input, ost, cat[0], cat[1], exclude)) { const struct variable *wvar = dict_get_weight (dict); const struct fmt_spec *wfmt = wvar ? var_get_print_format (wvar) : & F_8_0; struct tab_table *table = tab_create (7, ost->n_vars * 3 + 1); tab_set_format (table, RC_WEIGHT, wfmt); tab_title (table, _("Binomial Test")); tab_headers (table, 2, 0, 1, 0); tab_box (table, TAL_1, TAL_1, -1, TAL_1, 0, 0, tab_nc (table) - 1, tab_nr(table) - 1 ); for (v = 0 ; v < ost->n_vars; ++v) { double n_total, sig; struct string catstr[2]; const struct variable *var = ost->vars[v]; ds_init_empty (&catstr[0]); ds_init_empty (&catstr[1]); if ( bst->cutpoint != SYSMIS) { ds_put_format (&catstr[0], "<= %.*g", DBL_DIG + 1, bst->cutpoint); } else { var_append_value_name (var, cat[0][v].values, &catstr[0]); var_append_value_name (var, cat[1][v].values, &catstr[1]); } tab_hline (table, TAL_1, 0, tab_nc (table) -1, 1 + v * 3); /* Titles */ tab_text (table, 0, 1 + v * 3, TAB_LEFT, var_to_string (var)); tab_text (table, 1, 1 + v * 3, TAB_LEFT, _("Group1")); tab_text (table, 1, 2 + v * 3, TAB_LEFT, _("Group2")); tab_text (table, 1, 3 + v * 3, TAB_LEFT, _("Total")); /* Test Prop */ tab_double (table, 5, 1 + v * 3, TAB_NONE, bst->p, NULL, RC_OTHER); /* Category labels */ tab_text (table, 2, 1 + v * 3, TAB_NONE, ds_cstr (&catstr[0])); tab_text (table, 2, 2 + v * 3, TAB_NONE, ds_cstr (&catstr[1])); /* Observed N */ tab_double (table, 3, 1 + v * 3, TAB_NONE, cat[0][v].count, NULL, RC_WEIGHT); tab_double (table, 3, 2 + v * 3, TAB_NONE, cat[1][v].count, NULL, RC_WEIGHT); n_total = cat[0][v].count + cat[1][v].count; tab_double (table, 3, 3 + v * 3, TAB_NONE, n_total, NULL, RC_WEIGHT); /* Observed Proportions */ tab_double (table, 4, 1 + v * 3, TAB_NONE, cat[0][v].count / n_total, NULL, RC_OTHER); tab_double (table, 4, 2 + v * 3, TAB_NONE, cat[1][v].count / n_total, NULL, RC_OTHER); tab_double (table, 4, 3 + v * 3, TAB_NONE, (cat[0][v].count + cat[1][v].count) / n_total, NULL, RC_OTHER); /* Significance */ sig = calculate_binomial (cat[0][v].count, cat[1][v].count, bst->p); tab_double (table, 6, 1 + v * 3, TAB_NONE, sig, NULL, RC_PVALUE); ds_destroy (&catstr[0]); ds_destroy (&catstr[1]); } tab_text (table, 2, 0, TAB_CENTER, _("Category")); tab_text (table, 3, 0, TAB_CENTER, _("N")); tab_text (table, 4, 0, TAB_CENTER, _("Observed Prop.")); tab_text (table, 5, 0, TAB_CENTER, _("Test Prop.")); tab_text_format (table, 6, 0, TAB_CENTER, _("Exact Sig. (%d-tailed)"), bst->p == 0.5 ? 2 : 1); tab_vline (table, TAL_2, 2, 0, tab_nr (table) -1); tab_submit (table); } for (i = 0; i < 2; i++) free (cat[i]); } pspp-1.0.1/src/language/stats/descriptives.c0000644000175000017500000010002713137223525015777 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-2000, 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include "data/casegrouper.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/dictionary/split-file.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "math/moments.h" #include "output/tab.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid /* DESCRIPTIVES private data. */ struct dsc_proc; /* Handling of missing values. */ enum dsc_missing_type { DSC_VARIABLE, /* Handle missing values on a per-variable basis. */ DSC_LISTWISE /* Discard entire case if any variable is missing. */ }; /* Describes properties of a distribution for the purpose of calculating a Z-score. */ struct dsc_z_score { const struct variable *src_var; /* Variable on which z-score is based. */ struct variable *z_var; /* New z-score variable. */ double mean; /* Distribution mean. */ double std_dev; /* Distribution standard deviation. */ }; /* DESCRIPTIVES transformation (for calculating Z-scores). */ struct dsc_trns { struct dsc_z_score *z_scores; /* Array of Z-scores. */ int z_score_cnt; /* Number of Z-scores. */ const struct variable **vars; /* Variables for listwise missing checks. */ size_t var_cnt; /* Number of variables. */ enum dsc_missing_type missing_type; /* Treatment of missing values. */ enum mv_class exclude; /* Classes of missing values to exclude. */ struct variable *filter; /* Dictionary FILTER BY variable. */ struct casereader *z_reader; /* Reader for count, mean, stddev. */ casenumber count; /* Number left in this SPLIT FILE group.*/ bool ok; }; /* Statistics. Used as bit indexes, so must be 32 or fewer. */ enum dsc_statistic { DSC_MEAN = 0, DSC_SEMEAN, DSC_STDDEV, DSC_VARIANCE, DSC_KURTOSIS, DSC_SEKURT, DSC_SKEWNESS, DSC_SESKEW, DSC_RANGE, DSC_MIN, DSC_MAX, DSC_SUM, DSC_N_STATS, /* Only valid as sort criteria. */ DSC_NAME = -2, /* Sort by name. */ DSC_NONE = -1 /* Unsorted. */ }; /* Describes one statistic. */ struct dsc_statistic_info { const char *identifier; /* Identifier. */ const char *name; /* Full name. */ enum moment moment; /* Highest moment needed to calculate. */ }; /* Table of statistics, indexed by DSC_*. */ static const struct dsc_statistic_info dsc_info[DSC_N_STATS] = { {"MEAN", N_("Mean"), MOMENT_MEAN}, {"SEMEAN", N_("S.E. Mean"), MOMENT_VARIANCE}, {"STDDEV", N_("Std Dev"), MOMENT_VARIANCE}, {"VARIANCE", N_("Variance"), MOMENT_VARIANCE}, {"KURTOSIS", N_("Kurtosis"), MOMENT_KURTOSIS}, {"SEKURTOSIS", N_("S.E. Kurt"), MOMENT_NONE}, {"SKEWNESS", N_("Skewness"), MOMENT_SKEWNESS}, {"SESKEWNESS", N_("S.E. Skew"), MOMENT_NONE}, {"RANGE", N_("Range"), MOMENT_NONE}, {"MINIMUM", N_("Minimum"), MOMENT_NONE}, {"MAXIMUM", N_("Maximum"), MOMENT_NONE}, {"SUM", N_("Sum"), MOMENT_MEAN}, }; /* Statistics calculated by default if none are explicitly requested. */ #define DEFAULT_STATS \ ((1ul << DSC_MEAN) | (1ul << DSC_STDDEV) | (1ul << DSC_MIN) \ | (1ul << DSC_MAX)) /* A variable specified on DESCRIPTIVES. */ struct dsc_var { const struct variable *v; /* Variable to calculate on. */ char *z_name; /* Name for z-score variable. */ double valid, missing; /* Valid, missing counts. */ struct moments *moments; /* Moments. */ double min, max; /* Maximum and mimimum values. */ double stats[DSC_N_STATS]; /* All the stats' values. */ }; /* Output format. */ enum dsc_format { DSC_LINE, /* Abbreviated format. */ DSC_SERIAL /* Long format. */ }; /* A DESCRIPTIVES procedure. */ struct dsc_proc { /* Per-variable info. */ struct dsc_var *vars; /* Variables. */ size_t var_cnt; /* Number of variables. */ /* User options. */ enum dsc_missing_type missing_type; /* Treatment of missing values. */ enum mv_class exclude; /* Classes of missing values to exclude. */ int show_var_labels; /* Nonzero to show variable labels. */ int show_index; /* Nonzero to show variable index. */ enum dsc_format format; /* Output format. */ /* Accumulated results. */ double missing_listwise; /* Sum of weights of cases missing listwise. */ double valid; /* Sum of weights of valid cases. */ bool bad_warn; /* Warn if bad weight found. */ enum dsc_statistic sort_by_stat; /* Statistic to sort by; -1: name. */ int sort_ascending; /* !0: ascending order; 0: descending. */ unsigned long show_stats; /* Statistics to display. */ unsigned long calc_stats; /* Statistics to calculate. */ enum moment max_moment; /* Highest moment needed for stats. */ /* Z scores. */ struct casewriter *z_writer; /* Mean and stddev per SPLIT FILE group. */ }; /* Parsing. */ static enum dsc_statistic match_statistic (struct lexer *); static void free_dsc_proc (struct dsc_proc *); /* Z-score functions. */ static bool try_name (const struct dictionary *dict, struct dsc_proc *dsc, const char *name); static char *generate_z_varname (const struct dictionary *dict, struct dsc_proc *dsc, const char *name, int *z_cnt); static void dump_z_table (struct dsc_proc *); static void setup_z_trns (struct dsc_proc *, struct dataset *); /* Procedure execution functions. */ static void calc_descriptives (struct dsc_proc *, struct casereader *, struct dataset *); static void display (struct dsc_proc *dsc); /* Parser and outline. */ /* Handles DESCRIPTIVES. */ int cmd_descriptives (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); struct dsc_proc *dsc; const struct variable **vars = NULL; size_t var_cnt = 0; int save_z_scores = 0; int z_cnt = 0; size_t i; bool ok; struct casegrouper *grouper; struct casereader *group; /* Create and initialize dsc. */ dsc = xmalloc (sizeof *dsc); dsc->vars = NULL; dsc->var_cnt = 0; dsc->missing_type = DSC_VARIABLE; dsc->exclude = MV_ANY; dsc->show_var_labels = 1; dsc->show_index = 0; dsc->format = DSC_LINE; dsc->missing_listwise = 0.; dsc->valid = 0.; dsc->bad_warn = 1; dsc->sort_by_stat = DSC_NONE; dsc->sort_ascending = 1; dsc->show_stats = dsc->calc_stats = DEFAULT_STATS; dsc->z_writer = NULL; /* Parse DESCRIPTIVES. */ while (lex_token (lexer) != T_ENDCMD) { if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "VARIABLE")) dsc->missing_type = DSC_VARIABLE; else if (lex_match_id (lexer, "LISTWISE")) dsc->missing_type = DSC_LISTWISE; else if (lex_match_id (lexer, "INCLUDE")) dsc->exclude = MV_SYSTEM; else { lex_error (lexer, NULL); goto error; } lex_match (lexer, T_COMMA); } } else if (lex_match_id (lexer, "SAVE")) save_z_scores = 1; else if (lex_match_id (lexer, "FORMAT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "LABELS")) dsc->show_var_labels = 1; else if (lex_match_id (lexer, "NOLABELS")) dsc->show_var_labels = 0; else if (lex_match_id (lexer, "INDEX")) dsc->show_index = 1; else if (lex_match_id (lexer, "NOINDEX")) dsc->show_index = 0; else if (lex_match_id (lexer, "LINE")) dsc->format = DSC_LINE; else if (lex_match_id (lexer, "SERIAL")) dsc->format = DSC_SERIAL; else { lex_error (lexer, NULL); goto error; } lex_match (lexer, T_COMMA); } } else if (lex_match_id (lexer, "STATISTICS")) { lex_match (lexer, T_EQUALS); dsc->show_stats = 0; while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match (lexer, T_ALL)) dsc->show_stats |= (1ul << DSC_N_STATS) - 1; else if (lex_match_id (lexer, "DEFAULT")) dsc->show_stats |= DEFAULT_STATS; else { enum dsc_statistic s = match_statistic (lexer); if (s == DSC_NONE ) { lex_error (lexer, NULL); goto error; } dsc->show_stats |= 1ul << s; } lex_match (lexer, T_COMMA); } if (dsc->show_stats == 0) dsc->show_stats = DEFAULT_STATS; } else if (lex_match_id (lexer, "SORT")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "NAME")) dsc->sort_by_stat = DSC_NAME; else { dsc->sort_by_stat = match_statistic (lexer); if (dsc->sort_by_stat == DSC_NONE ) dsc->sort_by_stat = DSC_MEAN; } if (lex_match (lexer, T_LPAREN)) { if (lex_match_id (lexer, "A")) dsc->sort_ascending = 1; else if (lex_match_id (lexer, "D")) dsc->sort_ascending = 0; else lex_error (lexer, NULL); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else if (var_cnt == 0) { if (lex_next_token (lexer, 1) == T_EQUALS) { lex_match_id (lexer, "VARIABLES"); lex_match (lexer, T_EQUALS); } while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { int i; if (!parse_variables_const (lexer, dict, &vars, &var_cnt, PV_APPEND | PV_NO_DUPLICATE | PV_NUMERIC)) goto error; dsc->vars = xnrealloc ((void *)dsc->vars, var_cnt, sizeof *dsc->vars); for (i = dsc->var_cnt; i < var_cnt; i++) { struct dsc_var *dv = &dsc->vars[i]; dv->v = vars[i]; dv->z_name = NULL; dv->moments = NULL; } dsc->var_cnt = var_cnt; if (lex_match (lexer, T_LPAREN)) { if (lex_token (lexer) != T_ID) { lex_error (lexer, NULL); goto error; } if (try_name (dict, dsc, lex_tokcstr (lexer))) { struct dsc_var *dsc_var = &dsc->vars[dsc->var_cnt - 1]; dsc_var->z_name = xstrdup (lex_tokcstr (lexer)); z_cnt++; } else msg (SE, _("Z-score variable name %s would be" " a duplicate variable name."), lex_tokcstr (lexer)); lex_get (lexer); if (!lex_force_match (lexer, T_RPAREN)) goto error; } } } else { lex_error (lexer, NULL); goto error; } lex_match (lexer, T_SLASH); } if (var_cnt == 0) { msg (SE, _("No variables specified.")); goto error; } /* Construct z-score varnames, show translation table. */ if (z_cnt || save_z_scores) { struct caseproto *proto; if (save_z_scores) { int gen_cnt = 0; for (i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dsc_var = &dsc->vars[i]; if (dsc_var->z_name == NULL) { const char *name = var_get_name (dsc_var->v); dsc_var->z_name = generate_z_varname (dict, dsc, name, &gen_cnt); if (dsc_var->z_name == NULL) goto error; z_cnt++; } } } /* It would be better to handle Z scores correctly (however we define that) when TEMPORARY is in effect, but in the meantime this at least prevents a use-after-free error. See bug #38786. */ if (proc_make_temporary_transformations_permanent (ds)) msg (SW, _("DESCRIPTIVES with Z scores ignores TEMPORARY. " "Temporary transformations will be made permanent.")); proto = caseproto_create (); for (i = 0; i < 1 + 2 * z_cnt; i++) proto = caseproto_add_width (proto, 0); dsc->z_writer = autopaging_writer_create (proto); caseproto_unref (proto); dump_z_table (dsc); } /* Figure out statistics to display. */ if (dsc->show_stats & (1ul << DSC_SKEWNESS)) dsc->show_stats |= 1ul << DSC_SESKEW; if (dsc->show_stats & (1ul << DSC_KURTOSIS)) dsc->show_stats |= 1ul << DSC_SEKURT; /* Figure out which statistics to calculate. */ dsc->calc_stats = dsc->show_stats; if (z_cnt > 0) dsc->calc_stats |= (1ul << DSC_MEAN) | (1ul << DSC_STDDEV); if (dsc->sort_by_stat >= 0) dsc->calc_stats |= 1ul << dsc->sort_by_stat; if (dsc->show_stats & (1ul << DSC_SESKEW)) dsc->calc_stats |= 1ul << DSC_SKEWNESS; if (dsc->show_stats & (1ul << DSC_SEKURT)) dsc->calc_stats |= 1ul << DSC_KURTOSIS; /* Figure out maximum moment needed and allocate moments for the variables. */ dsc->max_moment = MOMENT_NONE; for (i = 0; i < DSC_N_STATS; i++) if (dsc->calc_stats & (1ul << i) && dsc_info[i].moment > dsc->max_moment) dsc->max_moment = dsc_info[i].moment; if (dsc->max_moment != MOMENT_NONE) for (i = 0; i < dsc->var_cnt; i++) dsc->vars[i].moments = moments_create (dsc->max_moment); /* Data pass. */ grouper = casegrouper_create_splits (proc_open_filtering (ds, false), dict); while (casegrouper_get_next_group (grouper, &group)) calc_descriptives (dsc, group, ds); ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; /* Z-scoring! */ if (ok && z_cnt) setup_z_trns (dsc, ds); /* Done. */ free (vars); free_dsc_proc (dsc); return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; error: free (vars); free_dsc_proc (dsc); return CMD_FAILURE; } /* Returns the statistic named by the current token and skips past the token. Returns DSC_NONE if no statistic is given (e.g., subcommand with no specifiers). Emits an error if the current token ID does not name a statistic. */ static enum dsc_statistic match_statistic (struct lexer *lexer) { if (lex_token (lexer) == T_ID) { enum dsc_statistic stat; for (stat = 0; stat < DSC_N_STATS; stat++) if (lex_match_id (lexer, dsc_info[stat].identifier)) return stat; lex_get (lexer); lex_error (lexer, _("expecting statistic name: reverting to default")); } return DSC_NONE; } /* Frees DSC. */ static void free_dsc_proc (struct dsc_proc *dsc) { size_t i; if (dsc == NULL) return; for (i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dsc_var = &dsc->vars[i]; free (dsc_var->z_name); moments_destroy (dsc_var->moments); } casewriter_destroy (dsc->z_writer); free (dsc->vars); free (dsc); } /* Z scores. */ /* Returns false if NAME is a duplicate of any existing variable name or of any previously-declared z-var name; otherwise returns true. */ static bool try_name (const struct dictionary *dict, struct dsc_proc *dsc, const char *name) { size_t i; if (dict_lookup_var (dict, name) != NULL) return false; for (i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dsc_var = &dsc->vars[i]; if (dsc_var->z_name != NULL && !utf8_strcasecmp (dsc_var->z_name, name)) return false; } return true; } /* Generates a name for a Z-score variable based on a variable named VAR_NAME, given that *Z_CNT generated variable names are known to already exist. If successful, returns the new name as a dynamically allocated string. On failure, returns NULL. */ static char * generate_z_varname (const struct dictionary *dict, struct dsc_proc *dsc, const char *var_name, int *z_cnt) { char *z_name, *trunc_name; /* Try a name based on the original variable name. */ z_name = xasprintf ("Z%s", var_name); trunc_name = utf8_encoding_trunc (z_name, dict_get_encoding (dict), ID_MAX_LEN); free (z_name); if (try_name (dict, dsc, trunc_name)) return trunc_name; free (trunc_name); /* Generate a synthetic name. */ for (;;) { char name[8]; (*z_cnt)++; if (*z_cnt <= 99) sprintf (name, "ZSC%03d", *z_cnt); else if (*z_cnt <= 108) sprintf (name, "STDZ%02d", *z_cnt - 99); else if (*z_cnt <= 117) sprintf (name, "ZZZZ%02d", *z_cnt - 108); else if (*z_cnt <= 126) sprintf (name, "ZQZQ%02d", *z_cnt - 117); else { msg (SE, _("Ran out of generic names for Z-score variables. " "There are only 126 generic names: ZSC001-ZSC0999, " "STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-ZQZQ09.")); return NULL; } if (try_name (dict, dsc, name)) return xstrdup (name); } NOT_REACHED(); } /* Outputs a table describing the mapping between source variables and Z-score variables. */ static void dump_z_table (struct dsc_proc *dsc) { size_t cnt = 0; struct tab_table *t; { size_t i; for (i = 0; i < dsc->var_cnt; i++) if (dsc->vars[i].z_name != NULL) cnt++; } t = tab_create (2, cnt + 1); tab_title (t, _("Mapping of variables to corresponding Z-scores.")); tab_headers (t, 0, 0, 1, 0); tab_box (t, TAL_1, TAL_1, TAL_0, TAL_1, 0, 0, 1, cnt); tab_hline (t, TAL_2, 0, 1, 1); tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Source")); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Target")); { size_t i, y; for (i = 0, y = 1; i < dsc->var_cnt; i++) if (dsc->vars[i].z_name != NULL) { tab_text (t, 0, y, TAB_LEFT, var_to_string (dsc->vars[i].v)); tab_text (t, 1, y++, TAB_LEFT, dsc->vars[i].z_name); } } tab_submit (t); } static void descriptives_set_all_sysmis_zscores (const struct dsc_trns *t, struct ccase *c) { const struct dsc_z_score *z; for (z = t->z_scores; z < t->z_scores + t->z_score_cnt; z++) case_data_rw (c, z->z_var)->f = SYSMIS; } /* Transformation function to calculate Z-scores. Will return SYSMIS if any of the following are true: 1) mean or standard deviation is SYSMIS 2) score is SYSMIS 3) score is user missing and they were not included in the original analyis. 4) any of the variables in the original analysis were missing (either system or user-missing values that weren't included). */ static int descriptives_trns_proc (void *trns_, struct ccase **c, casenumber case_idx UNUSED) { struct dsc_trns *t = trns_; struct dsc_z_score *z; const struct variable **vars; *c = case_unshare (*c); if (t->filter) { double f = case_num (*c, t->filter); if (f == 0.0 || var_is_num_missing (t->filter, f, MV_ANY)) { descriptives_set_all_sysmis_zscores (t, *c); return TRNS_CONTINUE; } } if (t->count <= 0) { struct ccase *z_case; z_case = casereader_read (t->z_reader); if (z_case) { size_t z_idx = 0; t->count = case_num_idx (z_case, z_idx++); for (z = t->z_scores; z < t->z_scores + t->z_score_cnt; z++) { z->mean = case_num_idx (z_case, z_idx++); z->std_dev = case_num_idx (z_case, z_idx++); } case_unref (z_case); } else { if (t->ok) { msg (SE, _("Internal error processing Z scores")); t->ok = false; } descriptives_set_all_sysmis_zscores (t, *c); return TRNS_CONTINUE; } } t->count--; if (t->missing_type == DSC_LISTWISE) { assert(t->vars); for (vars = t->vars; vars < t->vars + t->var_cnt; vars++) { double score = case_num (*c, *vars); if (var_is_num_missing (*vars, score, t->exclude)) { descriptives_set_all_sysmis_zscores (t, *c); return TRNS_CONTINUE; } } } for (z = t->z_scores; z < t->z_scores + t->z_score_cnt; z++) { double input = case_num (*c, z->src_var); double *output = &case_data_rw (*c, z->z_var)->f; if (z->mean == SYSMIS || z->std_dev == SYSMIS || var_is_num_missing (z->src_var, input, t->exclude)) *output = SYSMIS; else *output = (input - z->mean) / z->std_dev; } return TRNS_CONTINUE; } /* Frees a descriptives_trns struct. */ static bool descriptives_trns_free (void *trns_) { struct dsc_trns *t = trns_; bool ok = t->ok && !casereader_error (t->z_reader); free (t->z_scores); casereader_destroy (t->z_reader); assert((t->missing_type != DSC_LISTWISE) ^ (t->vars != NULL)); free (t->vars); free (t); return ok; } /* Sets up a transformation to calculate Z scores. */ static void setup_z_trns (struct dsc_proc *dsc, struct dataset *ds) { struct dsc_trns *t; size_t cnt, i; for (cnt = i = 0; i < dsc->var_cnt; i++) if (dsc->vars[i].z_name != NULL) cnt++; t = xmalloc (sizeof *t); t->z_scores = xnmalloc (cnt, sizeof *t->z_scores); t->z_score_cnt = cnt; t->missing_type = dsc->missing_type; t->exclude = dsc->exclude; if ( t->missing_type == DSC_LISTWISE ) { t->var_cnt = dsc->var_cnt; t->vars = xnmalloc (t->var_cnt, sizeof *t->vars); for (i = 0; i < t->var_cnt; i++) t->vars[i] = dsc->vars[i].v; } else { t->var_cnt = 0; t->vars = NULL; } t->filter = dict_get_filter (dataset_dict (ds)); t->z_reader = casewriter_make_reader (dsc->z_writer); t->count = 0; t->ok = true; dsc->z_writer = NULL; for (cnt = i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dv = &dsc->vars[i]; if (dv->z_name != NULL) { struct dsc_z_score *z; struct variable *dst_var; char *label; dst_var = dict_create_var_assert (dataset_dict (ds), dv->z_name, 0); label = xasprintf (_("Z-score of %s"),var_to_string (dv->v)); var_set_label (dst_var, label); free (label); z = &t->z_scores[cnt++]; z->src_var = dv->v; z->z_var = dst_var; } } add_transformation (ds, descriptives_trns_proc, descriptives_trns_free, t); } /* Statistical calculation. */ static bool listwise_missing (struct dsc_proc *dsc, const struct ccase *c); /* Calculates and displays descriptive statistics for the cases in CF. */ static void calc_descriptives (struct dsc_proc *dsc, struct casereader *group, struct dataset *ds) { struct variable *filter = dict_get_filter (dataset_dict (ds)); struct casereader *pass1, *pass2; casenumber count; struct ccase *c; size_t z_idx; size_t i; c = casereader_peek (group, 0); if (c == NULL) { casereader_destroy (group); return; } output_split_file_values (ds, c); case_unref (c); group = casereader_create_filter_weight (group, dataset_dict (ds), NULL, NULL); pass1 = group; pass2 = dsc->max_moment <= MOMENT_MEAN ? NULL : casereader_clone (pass1); for (i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dv = &dsc->vars[i]; dv->valid = dv->missing = 0.0; if (dv->moments != NULL) moments_clear (dv->moments); dv->min = DBL_MAX; dv->max = -DBL_MAX; } dsc->missing_listwise = 0.; dsc->valid = 0.; /* First pass to handle most of the work. */ count = 0; for (; (c = casereader_read (pass1)) != NULL; case_unref (c)) { double weight = dict_get_case_weight (dataset_dict (ds), c, NULL); if (filter) { double f = case_num (c, filter); if (f == 0.0 || var_is_num_missing (filter, f, MV_ANY)) continue; } /* Check for missing values. */ if (listwise_missing (dsc, c)) { dsc->missing_listwise += weight; if (dsc->missing_type == DSC_LISTWISE) continue; } dsc->valid += weight; for (i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dv = &dsc->vars[i]; double x = case_num (c, dv->v); if (var_is_num_missing (dv->v, x, dsc->exclude)) { dv->missing += weight; continue; } if (dv->moments != NULL) moments_pass_one (dv->moments, x, weight); if (x < dv->min) dv->min = x; if (x > dv->max) dv->max = x; } count++; } if (!casereader_destroy (pass1)) { casereader_destroy (pass2); return; } /* Second pass for higher-order moments. */ if (dsc->max_moment > MOMENT_MEAN) { for (; (c = casereader_read (pass2)) != NULL; case_unref (c)) { double weight = dict_get_case_weight (dataset_dict (ds), c, NULL); if (filter) { double f = case_num (c, filter); if (f == 0.0 || var_is_num_missing (filter, f, MV_ANY)) continue; } /* Check for missing values. */ if (dsc->missing_type == DSC_LISTWISE && listwise_missing (dsc, c)) continue; for (i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dv = &dsc->vars[i]; double x = case_num (c, dv->v); if (var_is_num_missing (dv->v, x, dsc->exclude)) continue; if (dv->moments != NULL) moments_pass_two (dv->moments, x, weight); } } if (!casereader_destroy (pass2)) return; } /* Calculate results. */ if (dsc->z_writer && count > 0) { c = case_create (casewriter_get_proto (dsc->z_writer)); z_idx = 0; case_data_rw_idx (c, z_idx++)->f = count; } else c = NULL; for (i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dv = &dsc->vars[i]; double W; int j; for (j = 0; j < DSC_N_STATS; j++) dv->stats[j] = SYSMIS; dv->valid = W = dsc->valid - dv->missing; if (dv->moments != NULL) moments_calculate (dv->moments, NULL, &dv->stats[DSC_MEAN], &dv->stats[DSC_VARIANCE], &dv->stats[DSC_SKEWNESS], &dv->stats[DSC_KURTOSIS]); if (dsc->calc_stats & (1ul << DSC_SEMEAN) && dv->stats[DSC_VARIANCE] != SYSMIS && W > 0.) dv->stats[DSC_SEMEAN] = sqrt (dv->stats[DSC_VARIANCE]) / sqrt (W); if (dsc->calc_stats & (1ul << DSC_STDDEV) && dv->stats[DSC_VARIANCE] != SYSMIS) dv->stats[DSC_STDDEV] = sqrt (dv->stats[DSC_VARIANCE]); if (dsc->calc_stats & (1ul << DSC_SEKURT)) if (dv->stats[DSC_KURTOSIS] != SYSMIS) dv->stats[DSC_SEKURT] = calc_sekurt (W); if (dsc->calc_stats & (1ul << DSC_SESKEW) && dv->stats[DSC_SKEWNESS] != SYSMIS) dv->stats[DSC_SESKEW] = calc_seskew (W); dv->stats[DSC_RANGE] = ((dv->min == DBL_MAX || dv->max == -DBL_MAX) ? SYSMIS : dv->max - dv->min); dv->stats[DSC_MIN] = dv->min == DBL_MAX ? SYSMIS : dv->min; dv->stats[DSC_MAX] = dv->max == -DBL_MAX ? SYSMIS : dv->max; if (dsc->calc_stats & (1ul << DSC_SUM)) dv->stats[DSC_SUM] = W * dv->stats[DSC_MEAN]; if (dv->z_name && c != NULL) { case_data_rw_idx (c, z_idx++)->f = dv->stats[DSC_MEAN]; case_data_rw_idx (c, z_idx++)->f = dv->stats[DSC_STDDEV]; } } if (c != NULL) casewriter_write (dsc->z_writer, c); /* Output results. */ display (dsc); } /* Returns true if any of the descriptives variables in DSC's variable list have missing values in case C, false otherwise. */ static bool listwise_missing (struct dsc_proc *dsc, const struct ccase *c) { size_t i; for (i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dv = &dsc->vars[i]; double x = case_num (c, dv->v); if (var_is_num_missing (dv->v, x, dsc->exclude)) return true; } return false; } /* Statistical display. */ static algo_compare_func descriptives_compare_dsc_vars; /* Displays a table of descriptive statistics for DSC. */ static void display (struct dsc_proc *dsc) { size_t i; int nc; struct tab_table *t; nc = 1 + (dsc->format == DSC_SERIAL ? 2 : 1); for (i = 0; i < DSC_N_STATS; i++) if (dsc->show_stats & (1ul << i)) nc++; if (dsc->sort_by_stat != DSC_NONE) sort (dsc->vars, dsc->var_cnt, sizeof *dsc->vars, descriptives_compare_dsc_vars, dsc); t = tab_create (nc, dsc->var_cnt + 1); tab_headers (t, 1, 0, 1, 0); tab_box (t, TAL_1, TAL_1, -1, -1, 0, 0, nc - 1, dsc->var_cnt); tab_box (t, -1, -1, -1, TAL_1, 1, 0, nc - 1, dsc->var_cnt); tab_hline (t, TAL_2, 0, nc - 1, 1); tab_vline (t, TAL_2, 1, 0, dsc->var_cnt); nc = 0; tab_text (t, nc++, 0, TAB_LEFT | TAT_TITLE, _("Variable")); if (dsc->format == DSC_SERIAL) { tab_text (t, nc++, 0, TAB_CENTER | TAT_TITLE, _("Valid N")); tab_text (t, nc++, 0, TAB_CENTER | TAT_TITLE, _("Missing N")); } else tab_text (t, nc++, 0, TAB_CENTER | TAT_TITLE, "N"); for (i = 0; i < DSC_N_STATS; i++) if (dsc->show_stats & (1ul << i)) { const char *title = gettext (dsc_info[i].name); tab_text (t, nc++, 0, TAB_CENTER | TAT_TITLE, title); } for (i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dv = &dsc->vars[i]; size_t j; nc = 0; tab_text (t, nc++, i + 1, TAB_LEFT, var_to_string (dv->v)); tab_text_format (t, nc++, i + 1, 0, "%.*g", DBL_DIG + 1, dv->valid); if (dsc->format == DSC_SERIAL) tab_text_format (t, nc++, i + 1, 0, "%.*g", DBL_DIG + 1, dv->missing); for (j = 0; j < DSC_N_STATS; j++) if (dsc->show_stats & (1ul << j)) tab_double (t, nc++, i + 1, TAB_NONE, dv->stats[j], NULL, RC_OTHER); } tab_title (t, _("Valid cases = %.*g; cases with missing value(s) = %.*g."), DBL_DIG + 1, dsc->valid, DBL_DIG + 1, dsc->missing_listwise); tab_submit (t); } /* Compares `struct dsc_var's A and B according to the ordering specified by CMD. */ static int descriptives_compare_dsc_vars (const void *a_, const void *b_, const void *dsc_) { const struct dsc_var *a = a_; const struct dsc_var *b = b_; const struct dsc_proc *dsc = dsc_; int result; if (dsc->sort_by_stat == DSC_NAME) result = utf8_strcasecmp (var_get_name (a->v), var_get_name (b->v)); else { double as = a->stats[dsc->sort_by_stat]; double bs = b->stats[dsc->sort_by_stat]; result = as < bs ? -1 : as > bs; } if (!dsc->sort_ascending) result = -result; return result; } pspp-1.0.1/src/language/stats/t-test-indep.c0000644000175000017500000002724413137223525015621 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "t-test.h" #include #include #include "libpspp/misc.h" #include "libpspp/str.h" #include "data/casereader.h" #include "data/dictionary.h" #include "data/format.h" #include "data/variable.h" #include "math/moments.h" #include "math/levene.h" #include #include "gettext.h" #define _(msgid) gettext (msgid) struct indep_samples { const struct variable *gvar; bool cut; const union value *gval0; const union value *gval1; }; struct pair_stats { struct moments *mom[2]; double lev ; struct levene *nl; }; static void indep_summary (const struct tt *tt, struct indep_samples *is, const struct pair_stats *ps); static void indep_test (const struct tt *tt, const struct pair_stats *ps); static int which_group (const union value *v, const struct indep_samples *is) { int width = var_get_width (is->gvar); int cmp = value_compare_3way (v, is->gval0, width); if ( is->cut ) return (cmp < 0); if (cmp == 0) return 0; if (0 == value_compare_3way (v, is->gval1, width)) return 1; return -1; } void indep_run (struct tt *tt, const struct variable *gvar, bool cut, const union value *gval0, const union value *gval1, struct casereader *reader) { struct indep_samples is; struct ccase *c; struct casereader *r; struct pair_stats *ps = xcalloc (tt->n_vars, sizeof *ps); int v; for (v = 0; v < tt->n_vars; ++v) { ps[v].mom[0] = moments_create (MOMENT_VARIANCE); ps[v].mom[1] = moments_create (MOMENT_VARIANCE); ps[v].nl = levene_create (var_get_width (gvar), cut ? gval0: NULL); } is.gvar = gvar; is.gval0 = gval0; is.gval1 = gval1; is.cut = cut; r = casereader_clone (reader); for ( ; (c = casereader_read (r) ); case_unref (c)) { double w = dict_get_case_weight (tt->dict, c, NULL); const union value *gv = case_data (c, gvar); int grp = which_group (gv, &is); if ( grp < 0) continue; for (v = 0; v < tt->n_vars; ++v) { const union value *val = case_data (c, tt->vars[v]); if (var_is_value_missing (tt->vars[v], val, tt->exclude)) continue; moments_pass_one (ps[v].mom[grp], val->f, w); levene_pass_one (ps[v].nl, val->f, w, gv); } } casereader_destroy (r); r = casereader_clone (reader); for ( ; (c = casereader_read (r) ); case_unref (c)) { double w = dict_get_case_weight (tt->dict, c, NULL); const union value *gv = case_data (c, gvar); int grp = which_group (gv, &is); if ( grp < 0) continue; for (v = 0; v < tt->n_vars; ++v) { const union value *val = case_data (c, tt->vars[v]); if (var_is_value_missing (tt->vars[v], val, tt->exclude)) continue; moments_pass_two (ps[v].mom[grp], val->f, w); levene_pass_two (ps[v].nl, val->f, w, gv); } } casereader_destroy (r); r = reader; for ( ; (c = casereader_read (r) ); case_unref (c)) { double w = dict_get_case_weight (tt->dict, c, NULL); const union value *gv = case_data (c, gvar); int grp = which_group (gv, &is); if ( grp < 0) continue; for (v = 0; v < tt->n_vars; ++v) { const union value *val = case_data (c, tt->vars[v]); if (var_is_value_missing (tt->vars[v], val, tt->exclude)) continue; levene_pass_three (ps[v].nl, val->f, w, gv); } } casereader_destroy (r); for (v = 0; v < tt->n_vars; ++v) ps[v].lev = levene_calculate (ps[v].nl); indep_summary (tt, &is, ps); indep_test (tt, ps); for (v = 0; v < tt->n_vars; ++v) { moments_destroy (ps[v].mom[0]); moments_destroy (ps[v].mom[1]); levene_destroy (ps[v].nl); } free (ps); } static void indep_summary (const struct tt *tt, struct indep_samples *is, const struct pair_stats *ps) { const struct fmt_spec *wfmt = tt->wv ? var_get_print_format (tt->wv) : & F_8_0; int v; int cols = 6; const int heading_rows = 1; int rows = tt->n_vars * 2 + heading_rows; struct string vallab0 ; struct string vallab1 ; struct tab_table *t = tab_create (cols, rows); tab_set_format (t, RC_WEIGHT, wfmt); ds_init_empty (&vallab0); ds_init_empty (&vallab1); tab_headers (t, 0, 0, 1, 0); tab_box (t, TAL_2, TAL_2, TAL_0, TAL_1, 0, 0, cols - 1, rows - 1); tab_hline (t, TAL_2, 0, cols - 1, 1); tab_vline (t, TAL_GAP, 1, 0, rows - 1); tab_title (t, _("Group Statistics")); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, var_to_string (is->gvar)); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("N")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Mean")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Std. Deviation")); tab_text (t, 5, 0, TAB_CENTER | TAT_TITLE, _("S.E. Mean")); if (is->cut) { ds_put_cstr (&vallab0, "≥"); ds_put_cstr (&vallab1, "<"); var_append_value_name (is->gvar, is->gval0, &vallab0); var_append_value_name (is->gvar, is->gval0, &vallab1); } else { var_append_value_name (is->gvar, is->gval0, &vallab0); var_append_value_name (is->gvar, is->gval1, &vallab1); } tab_vline (t, TAL_1, 1, heading_rows, rows - 1); for (v = 0; v < tt->n_vars; ++v) { int i; const struct variable *var = tt->vars[v]; tab_text (t, 0, v * 2 + heading_rows, TAB_LEFT, var_to_string (var)); tab_text (t, 1, v * 2 + heading_rows, TAB_LEFT, ds_cstr (&vallab0)); tab_text (t, 1, v * 2 + 1 + heading_rows, TAB_LEFT, ds_cstr (&vallab1)); for (i = 0 ; i < 2; ++i) { double cc, mean, sigma; moments_calculate (ps[v].mom[i], &cc, &mean, &sigma, NULL, NULL); tab_double (t, 2, v * 2 + i + heading_rows, TAB_RIGHT, cc, NULL, RC_WEIGHT); tab_double (t, 3, v * 2 + i + heading_rows, TAB_RIGHT, mean, NULL, RC_OTHER); tab_double (t, 4, v * 2 + i + heading_rows, TAB_RIGHT, sqrt (sigma), NULL, RC_OTHER); tab_double (t, 5, v * 2 + i + heading_rows, TAB_RIGHT, sqrt (sigma / cc), NULL, RC_OTHER); } } tab_submit (t); ds_destroy (&vallab0); ds_destroy (&vallab1); } static void indep_test (const struct tt *tt, const struct pair_stats *ps) { int v; const int heading_rows = 3; const int rows= tt->n_vars * 2 + heading_rows; const size_t cols = 11; struct tab_table *t = tab_create (cols, rows); tab_headers (t, 0, 0, 3, 0); tab_box (t, TAL_2, TAL_2, TAL_0, TAL_0, 0, 0, cols - 1, rows - 1); tab_hline (t, TAL_2, 0, cols - 1, 3); tab_title (t, _("Independent Samples Test")); tab_hline (t, TAL_1, 2, cols - 1, 1); tab_vline (t, TAL_2, 2, 0, rows - 1); tab_vline (t, TAL_1, 4, 0, rows - 1); tab_box (t, -1, -1, -1, TAL_1, 2, 1, cols - 2, rows - 1); tab_hline (t, TAL_1, cols - 2, cols - 1, 2); tab_box (t, -1, -1, -1, TAL_1, cols - 2, 2, cols - 1, rows - 1); tab_joint_text (t, 2, 0, 3, 0, TAB_CENTER, _("Levene's Test for Equality of Variances")); tab_joint_text (t, 4, 0, cols - 1, 0, TAB_CENTER, _("t-test for Equality of Means")); tab_text (t, 2, 2, TAB_CENTER | TAT_TITLE, _("F")); tab_text (t, 3, 2, TAB_CENTER | TAT_TITLE, _("Sig.")); tab_text (t, 4, 2, TAB_CENTER | TAT_TITLE, _("t")); tab_text (t, 5, 2, TAB_CENTER | TAT_TITLE, _("df")); tab_text (t, 6, 2, TAB_CENTER | TAT_TITLE, _("Sig. (2-tailed)")); tab_text (t, 7, 2, TAB_CENTER | TAT_TITLE, _("Mean Difference")); tab_text (t, 8, 2, TAB_CENTER | TAT_TITLE, _("Std. Error Difference")); tab_text (t, 9, 2, TAB_CENTER | TAT_TITLE, _("Lower")); tab_text (t, 10, 2, TAB_CENTER | TAT_TITLE, _("Upper")); tab_joint_text_format (t, 9, 1, 10, 1, TAB_CENTER, _("%g%% Confidence Interval of the Difference"), tt->confidence * 100.0); tab_vline (t, TAL_1, 1, heading_rows, rows - 1); for (v = 0; v < tt->n_vars; ++v) { double df, pooled_variance, mean_diff, tval; double se2, std_err_diff; double p, q; double cc0, mean0, sigma0; double cc1, mean1, sigma1; moments_calculate (ps[v].mom[0], &cc0, &mean0, &sigma0, NULL, NULL); moments_calculate (ps[v].mom[1], &cc1, &mean1, &sigma1, NULL, NULL); tab_text (t, 0, v * 2 + heading_rows, TAB_LEFT, var_to_string (tt->vars[v])); tab_text (t, 1, v * 2 + heading_rows, TAB_LEFT, _("Equal variances assumed")); df = cc0 + cc1 - 2.0; tab_double (t, 5, v * 2 + heading_rows, TAB_RIGHT, df, NULL, RC_OTHER); pooled_variance = ((cc0 - 1)* sigma0 + (cc1 - 1) * sigma1) / df ; tval = (mean0 - mean1) / sqrt (pooled_variance); tval /= sqrt ((cc0 + cc1) / (cc0 * cc1)); tab_double (t, 4, v * 2 + heading_rows, TAB_RIGHT, tval, NULL, RC_OTHER); p = gsl_cdf_tdist_P (tval, df); q = gsl_cdf_tdist_Q (tval, df); mean_diff = mean0 - mean1; tab_double (t, 6, v * 2 + heading_rows, TAB_RIGHT, 2.0 * (tval > 0 ? q : p), NULL, RC_PVALUE); tab_double (t, 7, v * 2 + heading_rows, TAB_RIGHT, mean_diff, NULL, RC_OTHER); std_err_diff = sqrt (pooled_variance * (1.0/cc0 + 1.0/cc1)); tab_double (t, 8, v * 2 + heading_rows, TAB_RIGHT, std_err_diff, NULL, RC_OTHER); /* Now work out the confidence interval */ q = (1 - tt->confidence)/2.0; /* 2-tailed test */ tval = gsl_cdf_tdist_Qinv (q, df); tab_double (t, 9, v * 2 + heading_rows, TAB_RIGHT, mean_diff - tval * std_err_diff, NULL, RC_OTHER); tab_double (t, 10, v * 2 + heading_rows, TAB_RIGHT, mean_diff + tval * std_err_diff, NULL, RC_OTHER); /* Equal variances not assumed */ tab_text (t, 1, v * 2 + heading_rows + 1, TAB_LEFT, _("Equal variances not assumed")); std_err_diff = sqrt ((sigma0 / cc0) + (sigma1 / cc1)); se2 = sigma0 / cc0 + sigma1 / cc1; tval = mean_diff / sqrt (se2); tab_double (t, 4, v * 2 + heading_rows + 1, TAB_RIGHT, tval, NULL, RC_OTHER); { double p, q; const double s0 = sigma0 / (cc0); const double s1 = sigma1 / (cc1); double df = pow2 (s0 + s1) ; df /= pow2 (s0) / (cc0 - 1) + pow2 (s1) / (cc1 - 1); tab_double (t, 5, v * 2 + heading_rows + 1, TAB_RIGHT, df, NULL, RC_OTHER); p = gsl_cdf_tdist_P (tval, df); q = gsl_cdf_tdist_Q (tval, df); tab_double (t, 6, v * 2 + heading_rows + 1, TAB_RIGHT, 2.0 * (tval > 0 ? q : p), NULL, RC_PVALUE); /* Now work out the confidence interval */ q = (1 - tt->confidence) / 2.0; /* 2-tailed test */ tval = gsl_cdf_tdist_Qinv (q, df); } tab_double (t, 7, v * 2 + heading_rows + 1, TAB_RIGHT, mean_diff, NULL, RC_OTHER); tab_double (t, 8, v * 2 + heading_rows + 1, TAB_RIGHT, std_err_diff, NULL, RC_OTHER); tab_double (t, 9, v * 2 + heading_rows + 1, TAB_RIGHT, mean_diff - tval * std_err_diff, NULL, RC_OTHER); tab_double (t, 10, v * 2 + heading_rows + 1, TAB_RIGHT, mean_diff + tval * std_err_diff, NULL, RC_OTHER); tab_double (t, 2, v * 2 + heading_rows, TAB_CENTER, ps[v].lev, NULL, RC_OTHER); { /* Now work out the significance of the Levene test */ double df1 = 1; double df2 = cc0 + cc1 - 2; double q = gsl_cdf_fdist_Q (ps[v].lev, df1, df2); tab_double (t, 3, v * 2 + heading_rows, TAB_CENTER, q, NULL, RC_PVALUE); } } tab_submit (t); } pspp-1.0.1/src/language/stats/logistic.c0000644000175000017500000012034213146355723015120 00000000000000/* pspp - a program for statistical analysis. Copyright (C) 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* References: 1. "Coding Logistic Regression with Newton-Raphson", James McCaffrey http://msdn.microsoft.com/en-us/magazine/jj618304.aspx 2. "SPSS Statistical Algorithms" Chapter LOGISTIC REGRESSION Algorithms The Newton Raphson method finds successive approximations to $\bf b$ where approximation ${\bf b}_t$ is (hopefully) better than the previous ${\bf b}_{t-1}$. $ {\bf b}_t = {\bf b}_{t -1} + ({\bf X}^T{\bf W}_{t-1}{\bf X})^{-1}{\bf X}^T({\bf y} - {\bf \pi}_{t-1})$ where: $\bf X$ is the $n \times p$ design matrix, $n$ being the number of cases, $p$ the number of parameters, \par $\bf W$ is the diagonal matrix whose diagonal elements are $\hat{\pi}_0(1 - \hat{\pi}_0), \, \hat{\pi}_1(1 - \hat{\pi}_2)\dots \hat{\pi}_{n-1}(1 - \hat{\pi}_{n-1})$ \par */ #include #include #include #include #include #include #include #include "data/case.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/value.h" #include "language/command.h" #include "language/dictionary/split-file.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "libpspp/assertion.h" #include "libpspp/ll.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "math/categoricals.h" #include "math/interaction.h" #include "libpspp/hmap.h" #include "libpspp/hash-functions.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define PRINT_EACH_STEP 0x01 #define PRINT_SUMMARY 0x02 #define PRINT_CORR 0x04 #define PRINT_ITER 0x08 #define PRINT_GOODFIT 0x10 #define PRINT_CI 0x20 #define PRINT_DEFAULT (PRINT_SUMMARY | PRINT_EACH_STEP) /* The constant parameters of the procedure. That is, those which are set by the user. */ struct lr_spec { /* The dependent variable */ const struct variable *dep_var; /* The predictor variables (excluding categorical ones) */ const struct variable **predictor_vars; size_t n_predictor_vars; /* The categorical predictors */ struct interaction **cat_predictors; size_t n_cat_predictors; /* The union of the categorical and non-categorical variables */ const struct variable **indep_vars; size_t n_indep_vars; /* Which classes of missing vars are to be excluded */ enum mv_class exclude; /* The weight variable */ const struct variable *wv; /* The dictionary of the dataset */ const struct dictionary *dict; /* True iff the constant (intercept) is to be included in the model */ bool constant; /* Ths maximum number of iterations */ int max_iter; /* Other iteration limiting conditions */ double bcon; double min_epsilon; double lcon; /* The confidence interval (in percent) */ int confidence; /* What results should be presented */ unsigned int print; /* Inverse logit of the cut point */ double ilogit_cut_point; }; /* The results and intermediate result of the procedure. These are mutated as the procedure runs. Used for temporary variables etc. */ struct lr_result { /* Used to indicate if a pass should flag a warning when invalid (ie negative or missing) weight values are encountered */ bool warn_bad_weight; /* The two values of the dependent variable. */ union value y0; union value y1; /* The sum of caseweights */ double cc; /* The number of missing and nonmissing cases */ casenumber n_missing; casenumber n_nonmissing; gsl_matrix *hessian; /* The categoricals and their payload. Null if the analysis has no categorical predictors */ struct categoricals *cats; struct payload cp; /* The estimates of the predictor coefficients */ gsl_vector *beta_hat; /* The predicted classifications: True Negative, True Positive, False Negative, False Positive */ double tn, tp, fn, fp; }; /* Convert INPUT into a dichotomous scalar, according to how the dependent variable's values are mapped. For simple cases, this is a 1:1 mapping The return value is always either 0 or 1 */ static double map_dependent_var (const struct lr_spec *cmd, const struct lr_result *res, const union value *input) { const int width = var_get_width (cmd->dep_var); if (value_equal (input, &res->y0, width)) return 0; if (value_equal (input, &res->y1, width)) return 1; /* This should never happen. If it does, then y0 and/or y1 have probably not been set */ NOT_REACHED (); return SYSMIS; } static void output_classification_table (const struct lr_spec *cmd, const struct lr_result *res); static void output_categories (const struct lr_spec *cmd, const struct lr_result *res); static void output_depvarmap (const struct lr_spec *cmd, const struct lr_result *); static void output_variables (const struct lr_spec *cmd, const struct lr_result *); static void output_model_summary (const struct lr_result *, double initial_likelihood, double likelihood); static void case_processing_summary (const struct lr_result *); /* Return the value of case C corresponding to the INDEX'th entry in the model */ static double predictor_value (const struct ccase *c, const struct variable **x, size_t n_x, const struct categoricals *cats, size_t index) { /* Values of the scalar predictor variables */ if (index < n_x) return case_data (c, x[index])->f; /* Coded values of categorical predictor variables (or interactions) */ if (cats && index - n_x < categoricals_df_total (cats)) { double x = categoricals_get_dummy_code_for_case (cats, index - n_x, c); return x; } /* The constant term */ return 1.0; } /* Return the probability beta_hat (that is the estimator logit(y) ) corresponding to the coefficient estimator for case C */ static double pi_hat (const struct lr_spec *cmd, const struct lr_result *res, const struct variable **x, size_t n_x, const struct ccase *c) { int v0; double pi = 0; size_t n_coeffs = res->beta_hat->size; if (cmd->constant) { pi += gsl_vector_get (res->beta_hat, res->beta_hat->size - 1); n_coeffs--; } for (v0 = 0; v0 < n_coeffs; ++v0) { pi += gsl_vector_get (res->beta_hat, v0) * predictor_value (c, x, n_x, res->cats, v0); } pi = 1.0 / (1.0 + exp(-pi)); return pi; } /* Calculates the Hessian matrix X' V X, where: X is the n by N_X matrix comprising the n cases in INPUT V is a diagonal matrix { (pi_hat_0)(1 - pi_hat_0), (pi_hat_1)(1 - pi_hat_1), ... (pi_hat_{N-1})(1 - pi_hat_{N-1})} (the partial derivative of the predicted values) If ALL predicted values derivatives are close to zero or one, then CONVERGED will be set to true. */ static void hessian (const struct lr_spec *cmd, struct lr_result *res, struct casereader *input, const struct variable **x, size_t n_x, bool *converged) { struct casereader *reader; struct ccase *c; double max_w = -DBL_MAX; gsl_matrix_set_zero (res->hessian); for (reader = casereader_clone (input); (c = casereader_read (reader)) != NULL; case_unref (c)) { int v0, v1; double pi = pi_hat (cmd, res, x, n_x, c); double weight = dict_get_case_weight (cmd->dict, c, &res->warn_bad_weight); double w = pi * (1 - pi); if (w > max_w) max_w = w; w *= weight; for (v0 = 0; v0 < res->beta_hat->size; ++v0) { double in0 = predictor_value (c, x, n_x, res->cats, v0); for (v1 = 0; v1 < res->beta_hat->size; ++v1) { double in1 = predictor_value (c, x, n_x, res->cats, v1); double *o = gsl_matrix_ptr (res->hessian, v0, v1); *o += in0 * w * in1; } } } casereader_destroy (reader); if ( max_w < cmd->min_epsilon) { *converged = true; msg (MN, _("All predicted values are either 1 or 0")); } } /* Calculates the value X' (y - pi) where X is the design model, y is the vector of observed independent variables pi is the vector of estimates for y Side effects: the likelihood is stored in LIKELIHOOD; the predicted values are placed in the respective tn, fn, tp fp values in RES */ static gsl_vector * xt_times_y_pi (const struct lr_spec *cmd, struct lr_result *res, struct casereader *input, const struct variable **x, size_t n_x, const struct variable *y_var, double *llikelihood) { struct casereader *reader; struct ccase *c; gsl_vector *output = gsl_vector_calloc (res->beta_hat->size); *llikelihood = 0.0; res->tn = res->tp = res->fn = res->fp = 0; for (reader = casereader_clone (input); (c = casereader_read (reader)) != NULL; case_unref (c)) { double pred_y = 0; int v0; double pi = pi_hat (cmd, res, x, n_x, c); double weight = dict_get_case_weight (cmd->dict, c, &res->warn_bad_weight); double y = map_dependent_var (cmd, res, case_data (c, y_var)); *llikelihood += (weight * y) * log (pi) + log (1 - pi) * weight * (1 - y); for (v0 = 0; v0 < res->beta_hat->size; ++v0) { double in0 = predictor_value (c, x, n_x, res->cats, v0); double *o = gsl_vector_ptr (output, v0); *o += in0 * (y - pi) * weight; pred_y += gsl_vector_get (res->beta_hat, v0) * in0; } /* Count the number of cases which would be correctly/incorrectly classified by this estimated model */ if (pred_y <= cmd->ilogit_cut_point) { if (y == 0) res->tn += weight; else res->fn += weight; } else { if (y == 0) res->fp += weight; else res->tp += weight; } } casereader_destroy (reader); return output; } /* "payload" functions for the categoricals. The only function is to accumulate the frequency of each category. */ static void * frq_create (const void *aux1 UNUSED, void *aux2 UNUSED) { return xzalloc (sizeof (double)); } static void frq_update (const void *aux1 UNUSED, void *aux2 UNUSED, void *ud, const struct ccase *c UNUSED , double weight) { double *freq = ud; *freq += weight; } static void frq_destroy (const void *aux1 UNUSED, void *aux2 UNUSED, void *user_data UNUSED) { free (user_data); } /* Makes an initial pass though the data, doing the following: * Checks that the dependent variable is dichotomous, * Creates and initialises the categoricals, * Accumulates summary results, * Calculates necessary initial values. * Creates an initial value for \hat\beta the vector of beta_hats of \beta Returns true if successful */ static bool initial_pass (const struct lr_spec *cmd, struct lr_result *res, struct casereader *input) { const int width = var_get_width (cmd->dep_var); struct ccase *c; struct casereader *reader; double sum; double sumA = 0.0; double sumB = 0.0; bool v0set = false; bool v1set = false; size_t n_coefficients = cmd->n_predictor_vars; if (cmd->constant) n_coefficients++; /* Create categoricals if appropriate */ if (cmd->n_cat_predictors > 0) { res->cp.create = frq_create; res->cp.update = frq_update; res->cp.calculate = NULL; res->cp.destroy = frq_destroy; res->cats = categoricals_create (cmd->cat_predictors, cmd->n_cat_predictors, cmd->wv, cmd->exclude, MV_ANY); categoricals_set_payload (res->cats, &res->cp, cmd, res); } res->cc = 0; for (reader = casereader_clone (input); (c = casereader_read (reader)) != NULL; case_unref (c)) { int v; bool missing = false; double weight = dict_get_case_weight (cmd->dict, c, &res->warn_bad_weight); const union value *depval = case_data (c, cmd->dep_var); if (var_is_value_missing (cmd->dep_var, depval, cmd->exclude)) { missing = true; } else for (v = 0; v < cmd->n_indep_vars; ++v) { const union value *val = case_data (c, cmd->indep_vars[v]); if (var_is_value_missing (cmd->indep_vars[v], val, cmd->exclude)) { missing = true; break; } } /* Accumulate the missing and non-missing counts */ if (missing) { res->n_missing++; continue; } res->n_nonmissing++; /* Find the values of the dependent variable */ if (!v0set) { value_clone (&res->y0, depval, width); v0set = true; } else if (!v1set) { if ( !value_equal (&res->y0, depval, width)) { value_clone (&res->y1, depval, width); v1set = true; } } else { if (! value_equal (&res->y0, depval, width) && ! value_equal (&res->y1, depval, width) ) { msg (ME, _("Dependent variable's values are not dichotomous.")); case_unref (c); goto error; } } if (v0set && value_equal (&res->y0, depval, width)) sumA += weight; if (v1set && value_equal (&res->y1, depval, width)) sumB += weight; res->cc += weight; categoricals_update (res->cats, c); } casereader_destroy (reader); categoricals_done (res->cats); sum = sumB; /* Ensure that Y0 is less than Y1. Otherwise the mapping gets inverted, which is confusing to users */ if (var_is_numeric (cmd->dep_var) && value_compare_3way (&res->y0, &res->y1, width) > 0) { union value tmp; value_clone (&tmp, &res->y0, width); value_copy (&res->y0, &res->y1, width); value_copy (&res->y1, &tmp, width); value_destroy (&tmp, width); sum = sumA; } n_coefficients += categoricals_df_total (res->cats); res->beta_hat = gsl_vector_calloc (n_coefficients); if (cmd->constant) { double mean = sum / res->cc; gsl_vector_set (res->beta_hat, res->beta_hat->size - 1, log (mean / (1 - mean))); } return true; error: casereader_destroy (reader); return false; } /* Start of the logistic regression routine proper */ static bool run_lr (const struct lr_spec *cmd, struct casereader *input, const struct dataset *ds UNUSED) { int i; bool converged = false; /* Set the log likelihoods to a sentinel value */ double log_likelihood = SYSMIS; double prev_log_likelihood = SYSMIS; double initial_log_likelihood = SYSMIS; struct lr_result work; work.n_missing = 0; work.n_nonmissing = 0; work.warn_bad_weight = true; work.cats = NULL; work.beta_hat = NULL; work.hessian = NULL; /* Get the initial estimates of \beta and their standard errors. And perform other auxiliary initialisation. */ if (! initial_pass (cmd, &work, input)) goto error; for (i = 0; i < cmd->n_cat_predictors; ++i) { if (1 >= categoricals_n_count (work.cats, i)) { struct string str; ds_init_empty (&str); interaction_to_string (cmd->cat_predictors[i], &str); msg (ME, _("Category %s does not have at least two distinct values. Logistic regression will not be run."), ds_cstr(&str)); ds_destroy (&str); goto error; } } output_depvarmap (cmd, &work); case_processing_summary (&work); input = casereader_create_filter_missing (input, cmd->indep_vars, cmd->n_indep_vars, cmd->exclude, NULL, NULL); input = casereader_create_filter_missing (input, &cmd->dep_var, 1, cmd->exclude, NULL, NULL); work.hessian = gsl_matrix_calloc (work.beta_hat->size, work.beta_hat->size); /* Start the Newton Raphson iteration process... */ for( i = 0 ; i < cmd->max_iter ; ++i) { double min, max; gsl_vector *v ; hessian (cmd, &work, input, cmd->predictor_vars, cmd->n_predictor_vars, &converged); gsl_linalg_cholesky_decomp (work.hessian); gsl_linalg_cholesky_invert (work.hessian); v = xt_times_y_pi (cmd, &work, input, cmd->predictor_vars, cmd->n_predictor_vars, cmd->dep_var, &log_likelihood); { /* delta = M.v */ gsl_vector *delta = gsl_vector_alloc (v->size); gsl_blas_dgemv (CblasNoTrans, 1.0, work.hessian, v, 0, delta); gsl_vector_free (v); gsl_vector_add (work.beta_hat, delta); gsl_vector_minmax (delta, &min, &max); if ( fabs (min) < cmd->bcon && fabs (max) < cmd->bcon) { msg (MN, _("Estimation terminated at iteration number %d because parameter estimates changed by less than %g"), i + 1, cmd->bcon); converged = true; } gsl_vector_free (delta); } if (i > 0) { if (-log_likelihood > -(1.0 - cmd->lcon) * prev_log_likelihood) { msg (MN, _("Estimation terminated at iteration number %d because Log Likelihood decreased by less than %g%%"), i + 1, 100 * cmd->lcon); converged = true; } } if (i == 0) initial_log_likelihood = log_likelihood; prev_log_likelihood = log_likelihood; if (converged) break; } if ( ! converged) msg (MW, _("Estimation terminated at iteration number %d because maximum iterations has been reached"), i ); output_model_summary (&work, initial_log_likelihood, log_likelihood); if (work.cats) output_categories (cmd, &work); output_classification_table (cmd, &work); output_variables (cmd, &work); casereader_destroy (input); gsl_matrix_free (work.hessian); gsl_vector_free (work.beta_hat); categoricals_destroy (work.cats); return true; error: casereader_destroy (input); gsl_matrix_free (work.hessian); gsl_vector_free (work.beta_hat); categoricals_destroy (work.cats); return false; } struct variable_node { struct hmap_node node; /* Node in hash map. */ const struct variable *var; /* The variable */ }; static struct variable_node * lookup_variable (const struct hmap *map, const struct variable *var, unsigned int hash) { struct variable_node *vn = NULL; HMAP_FOR_EACH_WITH_HASH (vn, struct variable_node, node, hash, map) { if (vn->var == var) break; fprintf (stderr, "Warning: Hash table collision\n"); } return vn; } /* Parse the LOGISTIC REGRESSION command syntax */ int cmd_logistic (struct lexer *lexer, struct dataset *ds) { int i; /* Temporary location for the predictor variables. These may or may not include the categorical predictors */ const struct variable **pred_vars; size_t n_pred_vars; double cp = 0.5; int v, x; struct lr_spec lr; lr.dict = dataset_dict (ds); lr.n_predictor_vars = 0; lr.predictor_vars = NULL; lr.exclude = MV_ANY; lr.wv = dict_get_weight (lr.dict); lr.max_iter = 20; lr.lcon = 0.0000; lr.bcon = 0.001; lr.min_epsilon = 0.00000001; lr.constant = true; lr.confidence = 95; lr.print = PRINT_DEFAULT; lr.cat_predictors = NULL; lr.n_cat_predictors = 0; lr.indep_vars = NULL; if (lex_match_id (lexer, "VARIABLES")) lex_match (lexer, T_EQUALS); if (! (lr.dep_var = parse_variable_const (lexer, lr.dict))) goto error; if (! lex_force_match (lexer, T_WITH)) goto error; if (!parse_variables_const (lexer, lr.dict, &pred_vars, &n_pred_vars, PV_NO_DUPLICATE)) goto error; while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "INCLUDE")) { lr.exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "EXCLUDE")) { lr.exclude = MV_ANY; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "ORIGIN")) { lr.constant = false; } else if (lex_match_id (lexer, "NOORIGIN")) { lr.constant = true; } else if (lex_match_id (lexer, "NOCONST")) { lr.constant = false; } else if (lex_match_id (lexer, "EXTERNAL")) { /* This is for compatibility. It does nothing */ } else if (lex_match_id (lexer, "CATEGORICAL")) { lex_match (lexer, T_EQUALS); do { lr.cat_predictors = xrealloc (lr.cat_predictors, sizeof (*lr.cat_predictors) * ++lr.n_cat_predictors); lr.cat_predictors[lr.n_cat_predictors - 1] = 0; } while (parse_design_interaction (lexer, lr.dict, lr.cat_predictors + lr.n_cat_predictors - 1)); lr.n_cat_predictors--; } else if (lex_match_id (lexer, "PRINT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "DEFAULT")) { lr.print |= PRINT_DEFAULT; } else if (lex_match_id (lexer, "SUMMARY")) { lr.print |= PRINT_SUMMARY; } #if 0 else if (lex_match_id (lexer, "CORR")) { lr.print |= PRINT_CORR; } else if (lex_match_id (lexer, "ITER")) { lr.print |= PRINT_ITER; } else if (lex_match_id (lexer, "GOODFIT")) { lr.print |= PRINT_GOODFIT; } #endif else if (lex_match_id (lexer, "CI")) { lr.print |= PRINT_CI; if (lex_force_match (lexer, T_LPAREN)) { if (! lex_force_num (lexer)) { lex_error (lexer, NULL); goto error; } lr.confidence = lex_number (lexer); lex_get (lexer); if ( ! lex_force_match (lexer, T_RPAREN)) { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "ALL")) { lr.print = ~0x0000; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "CRITERIA")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "BCON")) { if (lex_force_match (lexer, T_LPAREN)) { if (! lex_force_num (lexer)) { lex_error (lexer, NULL); goto error; } lr.bcon = lex_number (lexer); lex_get (lexer); if ( ! lex_force_match (lexer, T_RPAREN)) { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "ITERATE")) { if (lex_force_match (lexer, T_LPAREN)) { if (! lex_force_int (lexer)) { lex_error (lexer, NULL); goto error; } lr.max_iter = lex_integer (lexer); lex_get (lexer); if ( ! lex_force_match (lexer, T_RPAREN)) { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "LCON")) { if (lex_force_match (lexer, T_LPAREN)) { if (! lex_force_num (lexer)) { lex_error (lexer, NULL); goto error; } lr.lcon = lex_number (lexer); lex_get (lexer); if ( ! lex_force_match (lexer, T_RPAREN)) { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "EPS")) { if (lex_force_match (lexer, T_LPAREN)) { if (! lex_force_num (lexer)) { lex_error (lexer, NULL); goto error; } lr.min_epsilon = lex_number (lexer); lex_get (lexer); if ( ! lex_force_match (lexer, T_RPAREN)) { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "CUT")) { if (lex_force_match (lexer, T_LPAREN)) { if (! lex_force_num (lexer)) { lex_error (lexer, NULL); goto error; } cp = lex_number (lexer); if (cp < 0 || cp > 1.0) { msg (ME, _("Cut point value must be in the range [0,1]")); goto error; } lex_get (lexer); if ( ! lex_force_match (lexer, T_RPAREN)) { lex_error (lexer, NULL); goto error; } } } else { lex_error (lexer, NULL); goto error; } } } else { lex_error (lexer, NULL); goto error; } } lr.ilogit_cut_point = - log (1/cp - 1); /* Copy the predictor variables from the temporary location into the final one, dropping any categorical variables which appear there. FIXME: This is O(NxM). */ { struct variable_node *vn, *next; struct hmap allvars; hmap_init (&allvars); for (v = x = 0; v < n_pred_vars; ++v) { bool drop = false; const struct variable *var = pred_vars[v]; int cv = 0; unsigned int hash = hash_pointer (var, 0); struct variable_node *vn = lookup_variable (&allvars, var, hash); if (vn == NULL) { vn = xmalloc (sizeof *vn); vn->var = var; hmap_insert (&allvars, &vn->node, hash); } for (cv = 0; cv < lr.n_cat_predictors ; ++cv) { int iv; const struct interaction *iact = lr.cat_predictors[cv]; for (iv = 0 ; iv < iact->n_vars ; ++iv) { const struct variable *ivar = iact->vars[iv]; unsigned int hash = hash_pointer (ivar, 0); struct variable_node *vn = lookup_variable (&allvars, ivar, hash); if (vn == NULL) { vn = xmalloc (sizeof *vn); vn->var = ivar; hmap_insert (&allvars, &vn->node, hash); } if (var == ivar) { drop = true; } } } if (drop) continue; lr.predictor_vars = xrealloc (lr.predictor_vars, sizeof *lr.predictor_vars * (x + 1)); lr.predictor_vars[x++] = var; lr.n_predictor_vars++; } free (pred_vars); lr.n_indep_vars = hmap_count (&allvars); lr.indep_vars = xmalloc (lr.n_indep_vars * sizeof *lr.indep_vars); /* Interate over each variable and push it into the array */ x = 0; HMAP_FOR_EACH_SAFE (vn, next, struct variable_node, node, &allvars) { lr.indep_vars[x++] = vn->var; free (vn); } hmap_destroy (&allvars); } /* logistical regression for each split group */ { struct casegrouper *grouper; struct casereader *group; bool ok; grouper = casegrouper_create_splits (proc_open (ds), lr.dict); while (casegrouper_get_next_group (grouper, &group)) ok = run_lr (&lr, group, ds); ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; } for (i = 0 ; i < lr.n_cat_predictors; ++i) { interaction_destroy (lr.cat_predictors[i]); } free (lr.predictor_vars); free (lr.cat_predictors); free (lr.indep_vars); return CMD_SUCCESS; error: for (i = 0 ; i < lr.n_cat_predictors; ++i) { interaction_destroy (lr.cat_predictors[i]); } free (lr.predictor_vars); free (lr.cat_predictors); free (lr.indep_vars); return CMD_FAILURE; } /* Show the Dependent Variable Encoding box. This indicates how the dependent variable is mapped to the internal zero/one values. */ static void output_depvarmap (const struct lr_spec *cmd, const struct lr_result *res) { const int heading_columns = 0; const int heading_rows = 1; struct tab_table *t; struct string str; const int nc = 2; int nr = heading_rows + 2; t = tab_create (nc, nr); tab_title (t, _("Dependent Variable Encoding")); tab_headers (t, heading_columns, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Original Value")); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Internal Value")); ds_init_empty (&str); var_append_value_name (cmd->dep_var, &res->y0, &str); tab_text (t, 0, 0 + heading_rows, 0, ds_cstr (&str)); ds_clear (&str); var_append_value_name (cmd->dep_var, &res->y1, &str); tab_text (t, 0, 1 + heading_rows, 0, ds_cstr (&str)); tab_double (t, 1, 0 + heading_rows, 0, map_dependent_var (cmd, res, &res->y0), NULL, RC_INTEGER); tab_double (t, 1, 1 + heading_rows, 0, map_dependent_var (cmd, res, &res->y1), NULL, RC_INTEGER); ds_destroy (&str); tab_submit (t); } /* Show the Variables in the Equation box */ static void output_variables (const struct lr_spec *cmd, const struct lr_result *res) { int row = 0; const int heading_columns = 1; int heading_rows = 1; struct tab_table *t; int nc = 8; int nr ; int i = 0; int ivar = 0; int idx_correction = 0; if (cmd->print & PRINT_CI) { nc += 2; heading_rows += 1; row++; } nr = heading_rows + cmd->n_predictor_vars; if (cmd->constant) nr++; if (res->cats) nr += categoricals_df_total (res->cats) + cmd->n_cat_predictors; t = tab_create (nc, nr); tab_title (t, _("Variables in the Equation")); tab_headers (t, heading_columns, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_text (t, 0, row + 1, TAB_CENTER | TAT_TITLE, _("Step 1")); tab_text (t, 2, row, TAB_CENTER | TAT_TITLE, _("B")); tab_text (t, 3, row, TAB_CENTER | TAT_TITLE, _("S.E.")); tab_text (t, 4, row, TAB_CENTER | TAT_TITLE, _("Wald")); tab_text (t, 5, row, TAB_CENTER | TAT_TITLE, _("df")); tab_text (t, 6, row, TAB_CENTER | TAT_TITLE, _("Sig.")); tab_text (t, 7, row, TAB_CENTER | TAT_TITLE, _("Exp(B)")); if (cmd->print & PRINT_CI) { tab_joint_text_format (t, 8, 0, 9, 0, TAB_CENTER | TAT_TITLE, _("%d%% CI for Exp(B)"), cmd->confidence); tab_text (t, 8, row, TAB_CENTER | TAT_TITLE, _("Lower")); tab_text (t, 9, row, TAB_CENTER | TAT_TITLE, _("Upper")); } for (row = heading_rows ; row < nr; ++row) { const int idx = row - heading_rows - idx_correction; const double b = gsl_vector_get (res->beta_hat, idx); const double sigma2 = gsl_matrix_get (res->hessian, idx, idx); const double wald = pow2 (b) / sigma2; const double df = 1; if (idx < cmd->n_predictor_vars) { tab_text (t, 1, row, TAB_LEFT | TAT_TITLE, var_to_string (cmd->predictor_vars[idx])); } else if (i < cmd->n_cat_predictors) { double wald; bool summary = false; struct string str; const struct interaction *cat_predictors = cmd->cat_predictors[i]; const int df = categoricals_df (res->cats, i); ds_init_empty (&str); interaction_to_string (cat_predictors, &str); if (ivar == 0) { /* Calculate the Wald statistic, which is \beta' C^-1 \beta . where \beta is the vector of the coefficient estimates comprising this categorial variable. and C is the corresponding submatrix of the hessian matrix. */ gsl_matrix_const_view mv = gsl_matrix_const_submatrix (res->hessian, idx, idx, df, df); gsl_matrix *subhessian = gsl_matrix_alloc (mv.matrix.size1, mv.matrix.size2); gsl_vector_const_view vv = gsl_vector_const_subvector (res->beta_hat, idx, df); gsl_vector *temp = gsl_vector_alloc (df); gsl_matrix_memcpy (subhessian, &mv.matrix); gsl_linalg_cholesky_decomp (subhessian); gsl_linalg_cholesky_invert (subhessian); gsl_blas_dgemv (CblasTrans, 1.0, subhessian, &vv.vector, 0, temp); gsl_blas_ddot (temp, &vv.vector, &wald); tab_double (t, 4, row, 0, wald, NULL, RC_OTHER); tab_double (t, 5, row, 0, df, NULL, RC_INTEGER); tab_double (t, 6, row, 0, gsl_cdf_chisq_Q (wald, df), NULL, RC_PVALUE); idx_correction ++; summary = true; gsl_matrix_free (subhessian); gsl_vector_free (temp); } else { ds_put_format (&str, "(%d)", ivar); } tab_text (t, 1, row, TAB_LEFT | TAT_TITLE, ds_cstr (&str)); if (ivar++ == df) { ++i; /* next interaction */ ivar = 0; } ds_destroy (&str); if (summary) continue; } else { tab_text (t, 1, row, TAB_LEFT | TAT_TITLE, _("Constant")); } tab_double (t, 2, row, 0, b, NULL, RC_OTHER); tab_double (t, 3, row, 0, sqrt (sigma2), NULL, RC_OTHER); tab_double (t, 4, row, 0, wald, NULL, RC_OTHER); tab_double (t, 5, row, 0, df, NULL, RC_INTEGER); tab_double (t, 6, row, 0, gsl_cdf_chisq_Q (wald, df), NULL, RC_PVALUE); tab_double (t, 7, row, 0, exp (b), NULL, RC_OTHER); if (cmd->print & PRINT_CI) { int last_ci = nr; double wc = gsl_cdf_ugaussian_Pinv (0.5 + cmd->confidence / 200.0); wc *= sqrt (sigma2); if (cmd->constant) last_ci--; if (row < last_ci) { tab_double (t, 8, row, 0, exp (b - wc), NULL, RC_OTHER); tab_double (t, 9, row, 0, exp (b + wc), NULL, RC_OTHER); } } } tab_submit (t); } /* Show the model summary box */ static void output_model_summary (const struct lr_result *res, double initial_log_likelihood, double log_likelihood) { const int heading_columns = 0; const int heading_rows = 1; struct tab_table *t; const int nc = 4; int nr = heading_rows + 1; double cox; t = tab_create (nc, nr); tab_title (t, _("Model Summary")); tab_headers (t, heading_columns, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Step 1")); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("-2 Log likelihood")); tab_double (t, 1, 1, 0, -2 * log_likelihood, NULL, RC_OTHER); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Cox & Snell R Square")); cox = 1.0 - exp((initial_log_likelihood - log_likelihood) * (2 / res->cc)); tab_double (t, 2, 1, 0, cox, NULL, RC_OTHER); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Nagelkerke R Square")); tab_double (t, 3, 1, 0, cox / ( 1.0 - exp(initial_log_likelihood * (2 / res->cc))), NULL, RC_OTHER); tab_submit (t); } /* Show the case processing summary box */ static void case_processing_summary (const struct lr_result *res) { const int heading_columns = 1; const int heading_rows = 1; struct tab_table *t; const int nc = 3; const int nr = heading_rows + 3; casenumber total; t = tab_create (nc, nr); tab_title (t, _("Case Processing Summary")); tab_headers (t, heading_columns, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Unweighted Cases")); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("N")); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Percent")); tab_text (t, 0, 1, TAB_LEFT | TAT_TITLE, _("Included in Analysis")); tab_text (t, 0, 2, TAB_LEFT | TAT_TITLE, _("Missing Cases")); tab_text (t, 0, 3, TAB_LEFT | TAT_TITLE, _("Total")); tab_double (t, 1, 1, 0, res->n_nonmissing, NULL, RC_INTEGER); tab_double (t, 1, 2, 0, res->n_missing, NULL, RC_INTEGER); total = res->n_nonmissing + res->n_missing; tab_double (t, 1, 3, 0, total , NULL, RC_INTEGER); tab_double (t, 2, 1, 0, 100 * res->n_nonmissing / (double) total, NULL, RC_OTHER); tab_double (t, 2, 2, 0, 100 * res->n_missing / (double) total, NULL, RC_OTHER); tab_double (t, 2, 3, 0, 100 * total / (double) total, NULL, RC_OTHER); tab_submit (t); } static void output_categories (const struct lr_spec *cmd, const struct lr_result *res) { const struct fmt_spec *wfmt = cmd->wv ? var_get_print_format (cmd->wv) : &F_8_0; int cumulative_df; int i = 0; const int heading_columns = 2; const int heading_rows = 2; struct tab_table *t; int nc ; int nr ; int v; int r = 0; int max_df = 0; int total_cats = 0; for (i = 0; i < cmd->n_cat_predictors; ++i) { size_t n = categoricals_n_count (res->cats, i); size_t df = categoricals_df (res->cats, i); if (max_df < df) max_df = df; total_cats += n; } nc = heading_columns + 1 + max_df; nr = heading_rows + total_cats; t = tab_create (nc, nr); tab_set_format (t, RC_WEIGHT, wfmt); tab_title (t, _("Categorical Variables' Codings")); tab_headers (t, heading_columns, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_text (t, heading_columns, 1, TAB_CENTER | TAT_TITLE, _("Frequency")); tab_joint_text_format (t, heading_columns + 1, 0, nc - 1, 0, TAB_CENTER | TAT_TITLE, _("Parameter coding")); for (i = 0; i < max_df; ++i) { int c = heading_columns + 1 + i; tab_text_format (t, c, 1, TAB_CENTER | TAT_TITLE, _("(%d)"), i + 1); } cumulative_df = 0; for (v = 0; v < cmd->n_cat_predictors; ++v) { int cat; const struct interaction *cat_predictors = cmd->cat_predictors[v]; int df = categoricals_df (res->cats, v); struct string str; ds_init_empty (&str); interaction_to_string (cat_predictors, &str); tab_text (t, 0, heading_rows + r, TAB_LEFT | TAT_TITLE, ds_cstr (&str) ); ds_destroy (&str); for (cat = 0; cat < categoricals_n_count (res->cats, v) ; ++cat) { struct string str; const struct ccase *c = categoricals_get_case_by_category_real (res->cats, v, cat); const double *freq = categoricals_get_user_data_by_category_real (res->cats, v, cat); int x; ds_init_empty (&str); for (x = 0; x < cat_predictors->n_vars; ++x) { const union value *val = case_data (c, cat_predictors->vars[x]); var_append_value_name (cat_predictors->vars[x], val, &str); if (x < cat_predictors->n_vars - 1) ds_put_cstr (&str, " "); } tab_text (t, 1, heading_rows + r, 0, ds_cstr (&str)); ds_destroy (&str); tab_double (t, 2, heading_rows + r, 0, *freq, NULL, RC_WEIGHT); for (x = 0; x < df; ++x) { tab_double (t, heading_columns + 1 + x, heading_rows + r, 0, (cat == x), NULL, RC_INTEGER); } ++r; } cumulative_df += df; } tab_submit (t); } static void output_classification_table (const struct lr_spec *cmd, const struct lr_result *res) { const struct fmt_spec *wfmt = cmd->wv ? var_get_print_format (cmd->wv) : &F_8_0; const int heading_columns = 3; const int heading_rows = 3; struct string sv0, sv1; const int nc = heading_columns + 3; const int nr = heading_rows + 3; struct tab_table *t = tab_create (nc, nr); tab_set_format (t, RC_WEIGHT, wfmt); ds_init_empty (&sv0); ds_init_empty (&sv1); tab_title (t, _("Classification Table")); tab_headers (t, heading_columns, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_text (t, 0, heading_rows, TAB_CENTER | TAT_TITLE, _("Step 1")); tab_joint_text (t, heading_columns, 0, nc - 1, 0, TAB_CENTER | TAT_TITLE, _("Predicted")); tab_joint_text (t, heading_columns, 1, heading_columns + 1, 1, 0, var_to_string (cmd->dep_var) ); tab_joint_text (t, 1, 2, 2, 2, TAB_LEFT | TAT_TITLE, _("Observed")); tab_text (t, 1, 3, TAB_LEFT, var_to_string (cmd->dep_var) ); tab_joint_text (t, nc - 1, 1, nc - 1, 2, TAB_CENTER | TAT_TITLE, _("Percentage\nCorrect")); tab_joint_text (t, 1, nr - 1, 2, nr - 1, TAB_LEFT | TAT_TITLE, _("Overall Percentage")); tab_hline (t, TAL_1, 1, nc - 1, nr - 1); var_append_value_name (cmd->dep_var, &res->y0, &sv0); var_append_value_name (cmd->dep_var, &res->y1, &sv1); tab_text (t, 2, heading_rows, TAB_LEFT, ds_cstr (&sv0)); tab_text (t, 2, heading_rows + 1, TAB_LEFT, ds_cstr (&sv1)); tab_text (t, heading_columns, 2, 0, ds_cstr (&sv0)); tab_text (t, heading_columns + 1, 2, 0, ds_cstr (&sv1)); ds_destroy (&sv0); ds_destroy (&sv1); tab_double (t, heading_columns, 3, 0, res->tn, NULL, RC_WEIGHT); tab_double (t, heading_columns + 1, 4, 0, res->tp, NULL, RC_WEIGHT); tab_double (t, heading_columns + 1, 3, 0, res->fp, NULL, RC_WEIGHT); tab_double (t, heading_columns, 4, 0, res->fn, NULL, RC_WEIGHT); tab_double (t, heading_columns + 2, 3, 0, 100 * res->tn / (res->tn + res->fp), NULL, RC_OTHER); tab_double (t, heading_columns + 2, 4, 0, 100 * res->tp / (res->tp + res->fn), NULL, RC_OTHER); tab_double (t, heading_columns + 2, 5, 0, 100 * (res->tp + res->tn) / (res->tp + res->tn + res->fp + res->fn), NULL, RC_OTHER); tab_submit (t); } pspp-1.0.1/src/language/stats/kruskal-wallis.c0000644000175000017500000002367313146355723016261 00000000000000/* Pspp - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "kruskal-wallis.h" #include #include #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/subcase.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/hmap.h" #include "libpspp/bt.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "math/sort.h" #include "output/tab.h" #include "gl/minmax.h" #include "gl/xalloc.h" /* Returns true iff the independent variable lies in the range [nst->val1, nst->val2] */ static bool include_func (const struct ccase *c, void *aux) { const struct n_sample_test *nst = aux; if (0 < value_compare_3way (&nst->val1, case_data (c, nst->indep_var), var_get_width (nst->indep_var))) return false; if (0 > value_compare_3way (&nst->val2, case_data (c, nst->indep_var), var_get_width (nst->indep_var))) return false; return true; } struct rank_entry { struct hmap_node node; struct bt_node btn; union value group; double sum_of_ranks; double n; }; static int compare_rank_entries_3way (const struct bt_node *a, const struct bt_node *b, const void *aux) { const struct variable *var = aux; const struct rank_entry *rea = bt_data (a, struct rank_entry, btn); const struct rank_entry *reb = bt_data (b, struct rank_entry, btn); return value_compare_3way (&rea->group, &reb->group, var_get_width (var)); } /* Return the entry with the key GROUP or null if there is no such entry */ static struct rank_entry * find_rank_entry (const struct hmap *map, const union value *group, size_t width) { struct rank_entry *re = NULL; size_t hash = value_hash (group, width, 0); HMAP_FOR_EACH_WITH_HASH (re, struct rank_entry, node, hash, map) { if (0 == value_compare_3way (group, &re->group, width)) return re; } return re; } /* Calculates the adjustment necessary for tie compensation */ static void distinct_callback (double v UNUSED, casenumber t, double w UNUSED, void *aux) { double *tiebreaker = aux; *tiebreaker += pow3 (t) - t; } struct kw { struct hmap map; double h; }; static void show_ranks_box (const struct n_sample_test *nst, const struct kw *kw, int n_groups); static void show_sig_box (const struct n_sample_test *nst, const struct kw *kw); void kruskal_wallis_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact UNUSED, double timer UNUSED) { int i; struct ccase *c; bool warn = true; const struct dictionary *dict = dataset_dict (ds); const struct n_sample_test *nst = UP_CAST (test, const struct n_sample_test, parent); const struct caseproto *proto ; size_t rank_idx ; int total_n_groups = 0.0; struct kw *kw = xcalloc (nst->n_vars, sizeof *kw); /* If the independent variable is missing, then we ignore the case */ input = casereader_create_filter_missing (input, &nst->indep_var, 1, exclude, NULL, NULL); input = casereader_create_filter_weight (input, dict, &warn, NULL); /* Remove all those cases which are outside the range (val1, val2) */ input = casereader_create_filter_func (input, include_func, NULL, CONST_CAST (struct n_sample_test *, nst), NULL); proto = casereader_get_proto (input); rank_idx = caseproto_get_n_widths (proto); /* Rank cases by the v value */ for (i = 0; i < nst->n_vars; ++i) { double tiebreaker = 0.0; bool warn = true; enum rank_error rerr = 0; struct casereader *rr; struct casereader *r = casereader_clone (input); r = sort_execute_1var (r, nst->vars[i]); /* Ignore missings in the test variable */ r = casereader_create_filter_missing (r, &nst->vars[i], 1, exclude, NULL, NULL); rr = casereader_create_append_rank (r, nst->vars[i], dict_get_weight (dict), &rerr, distinct_callback, &tiebreaker); hmap_init (&kw[i].map); for (; (c = casereader_read (rr)); case_unref (c)) { const union value *group = case_data (c, nst->indep_var); const size_t group_var_width = var_get_width (nst->indep_var); struct rank_entry *rank = find_rank_entry (&kw[i].map, group, group_var_width); if ( NULL == rank) { rank = xzalloc (sizeof *rank); value_clone (&rank->group, group, group_var_width); hmap_insert (&kw[i].map, &rank->node, value_hash (&rank->group, group_var_width, 0)); } rank->sum_of_ranks += case_data_idx (c, rank_idx)->f; rank->n += dict_get_case_weight (dict, c, &warn); /* If this assertion fires, then either the data wasn't sorted or some other problem occurred */ assert (rerr == 0); } casereader_destroy (rr); /* Calculate the value of h */ { struct rank_entry *mre; double n = 0.0; HMAP_FOR_EACH (mre, struct rank_entry, node, &kw[i].map) { kw[i].h += pow2 (mre->sum_of_ranks) / mre->n; n += mre->n; total_n_groups ++; } kw[i].h *= 12 / (n * ( n + 1)); kw[i].h -= 3 * (n + 1) ; kw[i].h /= 1 - tiebreaker/ (pow3 (n) - n); } } casereader_destroy (input); show_ranks_box (nst, kw, total_n_groups); show_sig_box (nst, kw); /* Cleanup allocated memory */ for (i = 0 ; i < nst->n_vars; ++i) { struct rank_entry *mre, *next; HMAP_FOR_EACH_SAFE (mre, next, struct rank_entry, node, &kw[i].map) { hmap_delete (&kw[i].map, &mre->node); free (mre); } hmap_destroy (&kw[i].map); } free (kw); } #include "gettext.h" #define _(msgid) gettext (msgid) static void show_ranks_box (const struct n_sample_test *nst, const struct kw *kw, int n_groups) { int row; int i; const int row_headers = 2; const int column_headers = 1; struct tab_table *table = tab_create (row_headers + 2, column_headers + n_groups + nst->n_vars); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Ranks")); /* Vertical lines inside the box */ tab_box (table, 1, 0, -1, TAL_1, row_headers, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); /* Box around the table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_text (table, 1, 0, TAT_TITLE, var_to_string (nst->indep_var) ); tab_text (table, 3, 0, 0, _("Mean Rank")); tab_text (table, 2, 0, 0, _("N")); tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); row = column_headers; for (i = 0 ; i < nst->n_vars ; ++i) { int tot = 0; struct rank_entry *re_x; struct bt_node *bt_n = NULL; struct bt bt; if (i > 0) tab_hline (table, TAL_1, 0, tab_nc (table) -1, row); tab_text (table, 0, row, TAT_TITLE, var_to_string (nst->vars[i])); /* Sort the rank entries, by iteratin the hash and putting the entries into a binary tree. */ bt_init (&bt, compare_rank_entries_3way, nst->vars[i]); HMAP_FOR_EACH (re_x, struct rank_entry, node, &kw[i].map) { bt_insert (&bt, &re_x->btn); } /* Report the rank entries in sorted order. */ for (bt_n = bt_first (&bt); bt_n != NULL; bt_n = bt_next (&bt, bt_n) ) { const struct rank_entry *re = bt_data (bt_n, const struct rank_entry, btn); struct string str; ds_init_empty (&str); var_append_value_name (nst->indep_var, &re->group, &str); tab_text (table, 1, row, TAB_LEFT, ds_cstr (&str)); tab_double (table, 2, row, TAB_LEFT, re->n, NULL, RC_INTEGER); tab_double (table, 3, row, TAB_LEFT, re->sum_of_ranks / re->n, NULL, RC_OTHER); tot += re->n; row++; ds_destroy (&str); } tab_double (table, 2, row, TAB_LEFT, tot, NULL, RC_INTEGER); tab_text (table, 1, row++, TAB_LEFT, _("Total")); } tab_submit (table); } static void show_sig_box (const struct n_sample_test *nst, const struct kw *kw) { int i; const int row_headers = 1; const int column_headers = 1; struct tab_table *table = tab_create (row_headers + nst->n_vars * 2, column_headers + 3); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Test Statistics")); tab_text (table, 0, column_headers, TAT_TITLE | TAB_LEFT , _("Chi-Square")); tab_text (table, 0, 1 + column_headers, TAT_TITLE | TAB_LEFT, _("df")); tab_text (table, 0, 2 + column_headers, TAT_TITLE | TAB_LEFT, _("Asymp. Sig.")); /* Box around the table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); for (i = 0 ; i < nst->n_vars; ++i) { const double df = hmap_count (&kw[i].map) - 1; tab_text (table, column_headers + 1 + i, 0, TAT_TITLE, var_to_string (nst->vars[i]) ); tab_double (table, column_headers + 1 + i, 1, 0, kw[i].h, NULL, RC_OTHER); tab_double (table, column_headers + 1 + i, 2, 0, df, NULL, RC_INTEGER); tab_double (table, column_headers + 1 + i, 3, 0, gsl_cdf_chisq_Q (kw[i].h, df), NULL, RC_PVALUE); } tab_submit (table); } pspp-1.0.1/src/language/stats/frequencies.c0000644000175000017500000012020013137223525015577 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2011, 2014, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/case.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/missing-values.h" #include "data/settings.h" #include "data/value-labels.h" #include "data/variable.h" #include "language/dictionary/split-file.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "language/stats/freq.h" #include "libpspp/array.h" #include "libpspp/bit-vector.h" #include "libpspp/compiler.h" #include "libpspp/hmap.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "math/histogram.h" #include "math/moments.h" #include "math/chart-geometry.h" #include "output/chart-item.h" #include "output/charts/barchart.h" #include "output/charts/piechart.h" #include "output/charts/plot-hist.h" #include "output/tab.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid /* Percentiles to calculate. */ struct percentile { double p; /* the %ile to be calculated */ double value; /* the %ile's value */ bool show; /* True to show this percentile in the statistics box. */ }; static int ptile_3way (const void *_p1, const void *_p2) { const struct percentile *p1 = _p1; const struct percentile *p2 = _p2; if (p1->p < p2->p) return -1; if (p1->p == p2->p) { if (p1->show > p2->show) return -1; return (p1->show < p2->show); } return (p1->p > p2->p); } enum { FRQ_NONORMAL, FRQ_NORMAL }; enum { FRQ_FREQ, FRQ_PERCENT }; enum sortprops { FRQ_AFREQ, FRQ_DFREQ, FRQ_AVALUE, FRQ_DVALUE }; /* Array indices for STATISTICS subcommand. */ enum { FRQ_ST_MEAN, FRQ_ST_SEMEAN, FRQ_ST_MEDIAN, FRQ_ST_MODE, FRQ_ST_STDDEV, FRQ_ST_VARIANCE, FRQ_ST_KURTOSIS, FRQ_ST_SEKURTOSIS, FRQ_ST_SKEWNESS, FRQ_ST_SESKEWNESS, FRQ_ST_RANGE, FRQ_ST_MINIMUM, FRQ_ST_MAXIMUM, FRQ_ST_SUM, FRQ_ST_count }; /* Description of statistics. */ static const char *st_name[FRQ_ST_count] = { N_("Mean"), N_("S.E. Mean"), N_("Median"), N_("Mode"), N_("Std Dev"), N_("Variance"), N_("Kurtosis"), N_("S.E. Kurt"), N_("Skewness"), N_("S.E. Skew"), N_("Range"), N_("Minimum"), N_("Maximum"), N_("Sum") }; struct freq_tab { struct hmap data; /* Hash table for accumulating counts. */ struct freq *valid; /* Valid freqs. */ int n_valid; /* Number of total freqs. */ const struct dictionary *dict; /* Source of entries in the table. */ struct freq *missing; /* Missing freqs. */ int n_missing; /* Number of missing freqs. */ /* Statistics. */ double total_cases; /* Sum of weights of all cases. */ double valid_cases; /* Sum of weights of valid cases. */ }; struct frq_chart { double x_min; /* X axis minimum value. */ double x_max; /* X axis maximum value. */ int y_scale; /* Y axis scale: FRQ_FREQ or FRQ_PERCENT. */ /* Histograms only. */ double y_max; /* Y axis maximum value. */ bool draw_normal; /* Whether to draw normal curve. */ /* Pie charts only. */ bool include_missing; /* Whether to include missing values. */ }; /* Per-variable frequency data. */ struct var_freqs { const struct variable *var; /* Freqency table. */ struct freq_tab tab; /* Frequencies table to use. */ /* Percentiles. */ int n_groups; /* Number of groups. */ double *groups; /* Groups. */ /* Statistics. */ double stat[FRQ_ST_count]; /* Variable attributes. */ int width; }; struct frq_proc { struct pool *pool; struct var_freqs *vars; size_t n_vars; /* Percentiles to calculate and possibly display. */ struct percentile *percentiles; int n_percentiles, n_show_percentiles; /* Frequency table display. */ long int max_categories; /* Maximum categories to show. */ int sort; /* FRQ_AVALUE or FRQ_DVALUE or FRQ_AFREQ or FRQ_DFREQ. */ /* Statistics; number of statistics. */ unsigned long stats; int n_stats; /* Histogram and pie chart settings. */ struct frq_chart *hist, *pie, *bar; }; struct freq_compare_aux { bool by_freq; bool ascending_freq; int width; bool ascending_value; }; static void calc_stats (const struct var_freqs *vf, double d[FRQ_ST_count]); static void do_piechart(const struct frq_chart *pie, const struct variable *var, const struct freq_tab *frq_tab); static void do_barchart(const struct frq_chart *bar, const struct variable **var, const struct freq_tab *frq_tab); static void dump_statistics (const struct frq_proc *frq, const struct var_freqs *vf, const struct variable *wv); static int compare_freq (const void *a_, const void *b_, const void *aux_) { const struct freq_compare_aux *aux = aux_; const struct freq *a = a_; const struct freq *b = b_; if (aux->by_freq && a->count != b->count) { int cmp = a->count > b->count ? 1 : -1; return aux->ascending_freq ? cmp : -cmp; } else { int cmp = value_compare_3way (a->values, b->values, aux->width); return aux->ascending_value ? cmp : -cmp; } } /* Create a gsl_histogram from a freq_tab */ static struct histogram * freq_tab_to_hist (const struct frq_proc *frq, const struct freq_tab *ft, const struct variable *var); /* Displays a full frequency table for variable V. */ static void dump_freq_table (const struct var_freqs *vf, const struct variable *wv) { const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : &F_8_0; const struct freq_tab *ft = &vf->tab; int n_categories; struct freq *f; struct tab_table *t; int r, x; double cum_total = 0.0; double cum_freq = 0.0; static const char *headings[] = { N_("Value Label"), N_("Value"), N_("Frequency"), N_("Percent"), N_("Valid Percent"), N_("Cum Percent") }; n_categories = ft->n_valid + ft->n_missing; t = tab_create (6, n_categories + 2); tab_set_format (t, RC_WEIGHT, wfmt); tab_headers (t, 0, 0, 1, 0); for (x = 0; x < 6; x++) tab_text (t, x, 0, TAB_CENTER | TAT_TITLE, gettext (headings[x])); r = 1; for (f = ft->valid; f < ft->missing; f++) { const char *label; double percent, valid_percent; cum_freq += f->count; percent = f->count / ft->total_cases * 100.0; valid_percent = f->count / ft->valid_cases * 100.0; cum_total += valid_percent; label = var_lookup_value_label (vf->var, f->values); if (label != NULL) tab_text (t, 0, r, TAB_LEFT, label); tab_value (t, 1, r, TAB_NONE, f->values, vf->var, NULL); tab_double (t, 2, r, TAB_NONE, f->count, NULL, RC_WEIGHT); tab_double (t, 3, r, TAB_NONE, percent, NULL, RC_OTHER); tab_double (t, 4, r, TAB_NONE, valid_percent, NULL, RC_OTHER); tab_double (t, 5, r, TAB_NONE, cum_total, NULL, RC_OTHER); r++; } for (; f < &ft->valid[n_categories]; f++) { const char *label; cum_freq += f->count; label = var_lookup_value_label (vf->var, f->values); if (label != NULL) tab_text (t, 0, r, TAB_LEFT, label); tab_value (t, 1, r, TAB_NONE, f->values, vf->var, NULL); tab_double (t, 2, r, TAB_NONE, f->count, NULL, RC_WEIGHT); tab_double (t, 3, r, TAB_NONE, f->count / ft->total_cases * 100.0, NULL, RC_OTHER); tab_text (t, 4, r, TAB_NONE, _("Missing")); r++; } tab_box (t, TAL_1, TAL_1, -1, TAL_1, 0, 0, 5, r); tab_hline (t, TAL_2, 0, 5, 1); tab_hline (t, TAL_2, 0, 5, r); tab_joint_text (t, 0, r, 1, r, TAB_RIGHT | TAT_TITLE, _("Total")); tab_vline (t, TAL_0, 1, r, r); tab_double (t, 2, r, TAB_NONE, cum_freq, NULL, RC_WEIGHT); tab_double (t, 3, r, TAB_NONE, 100.0, &F_5_1, RC_OTHER); tab_double (t, 4, r, TAB_NONE, 100.0, &F_5_1, RC_OTHER); tab_title (t, "%s", var_to_string (vf->var)); tab_submit (t); } /* Statistical display. */ static double calc_percentile (double p, double valid_cases, double x1, double x2) { double s, dummy; s = (settings_get_algorithm () != COMPATIBLE ? modf ((valid_cases - 1) * p, &dummy) : modf ((valid_cases + 1) * p - 1, &dummy)); return x1 + (x2 - x1) * s; } /* Calculates all of the percentiles for VF within FRQ. */ static void calc_percentiles (const struct frq_proc *frq, const struct var_freqs *vf) { const struct freq_tab *ft = &vf->tab; double W = ft->valid_cases; const struct freq *f; int percentile_idx = 0; double rank = 0; for (f = ft->valid; f < ft->missing; f++) { rank += f->count; for (; percentile_idx < frq->n_percentiles; percentile_idx++) { struct percentile *pc = &frq->percentiles[percentile_idx]; double tp; tp = (settings_get_algorithm () == ENHANCED ? (W - 1) * pc->p : (W + 1) * pc->p - 1); if (rank <= tp) break; if (tp + 1 < rank || f + 1 >= ft->missing) pc->value = f->values[0].f; else pc->value = calc_percentile (pc->p, W, f->values[0].f, f[1].values[0].f); } } for (; percentile_idx < frq->n_percentiles; percentile_idx++) { struct percentile *pc = &frq->percentiles[percentile_idx]; pc->value = ft->valid[ft->n_valid - 1].values[0].f; } } /* Returns true iff the value in struct freq F is non-missing for variable V. */ static bool not_missing (const void *f_, const void *v_) { const struct freq *f = f_; const struct variable *v = v_; return !var_is_value_missing (v, f->values, MV_ANY); } /* Summarizes the frequency table data for variable V. */ static void postprocess_freq_tab (const struct frq_proc *frq, struct var_freqs *vf) { struct freq_tab *ft = &vf->tab; struct freq_compare_aux aux; size_t count; struct freq *freqs, *f; size_t i; /* Extract data from hash table. */ count = hmap_count (&ft->data); freqs = freq_hmap_extract (&ft->data); /* Put data into ft. */ ft->valid = freqs; ft->n_valid = partition (freqs, count, sizeof *freqs, not_missing, vf->var); ft->missing = freqs + ft->n_valid; ft->n_missing = count - ft->n_valid; /* Sort data. */ aux.by_freq = frq->sort == FRQ_AFREQ || frq->sort == FRQ_DFREQ; aux.ascending_freq = frq->sort != FRQ_DFREQ; aux.width = vf->width; aux.ascending_value = frq->sort != FRQ_DVALUE; sort (ft->valid, ft->n_valid, sizeof *ft->valid, compare_freq, &aux); sort (ft->missing, ft->n_missing, sizeof *ft->missing, compare_freq, &aux); /* Summary statistics. */ ft->valid_cases = 0.0; for(i = 0 ; i < ft->n_valid ; ++i ) { f = &ft->valid[i]; ft->valid_cases += f->count; } ft->total_cases = ft->valid_cases ; for(i = 0 ; i < ft->n_missing ; ++i ) { f = &ft->missing[i]; ft->total_cases += f->count; } } /* Frees the frequency table for variable V. */ static void cleanup_freq_tab (struct var_freqs *vf) { free (vf->tab.valid); freq_hmap_destroy (&vf->tab.data, vf->width); } /* Add data from case C to the frequency table. */ static void calc (struct frq_proc *frq, const struct ccase *c, const struct dataset *ds) { double weight = dict_get_case_weight (dataset_dict (ds), c, NULL); size_t i; for (i = 0; i < frq->n_vars; i++) { struct var_freqs *vf = &frq->vars[i]; const union value *value = case_data (c, vf->var); size_t hash = value_hash (value, vf->width, 0); struct freq *f; f = freq_hmap_search (&vf->tab.data, value, vf->width, hash); if (f == NULL) f = freq_hmap_insert (&vf->tab.data, value, vf->width, hash); f->count += weight; } } /* Prepares each variable that is the target of FREQUENCIES by setting up its hash table. */ static void precalc (struct frq_proc *frq, struct casereader *input, struct dataset *ds) { struct ccase *c; size_t i; c = casereader_peek (input, 0); if (c != NULL) { output_split_file_values (ds, c); case_unref (c); } for (i = 0; i < frq->n_vars; i++) hmap_init (&frq->vars[i].tab.data); } /* Finishes up with the variables after frequencies have been calculated. Displays statistics, percentiles, ... */ static void postcalc (struct frq_proc *frq, const struct dataset *ds) { const struct dictionary *dict = dataset_dict (ds); const struct variable *wv = dict_get_weight (dict); size_t i; for (i = 0; i < frq->n_vars; i++) { struct var_freqs *vf = &frq->vars[i]; postprocess_freq_tab (frq, vf); /* Frequencies tables. */ if (vf->tab.n_valid + vf->tab.n_missing <= frq->max_categories) dump_freq_table (vf, wv); calc_percentiles (frq, vf); /* Statistics. */ if (frq->n_stats) dump_statistics (frq, vf, wv); if (frq->hist && var_is_numeric (vf->var) && vf->tab.n_valid > 0) { double d[FRQ_ST_count]; struct histogram *histogram; calc_stats (vf, d); histogram = freq_tab_to_hist (frq, &vf->tab, vf->var); if ( histogram) { chart_item_submit (histogram_chart_create ( histogram->gsl_hist, var_to_string(vf->var), vf->tab.valid_cases, d[FRQ_ST_MEAN], d[FRQ_ST_STDDEV], frq->hist->draw_normal)); statistic_destroy (&histogram->parent); } } if (frq->pie) do_piechart(frq->pie, vf->var, &vf->tab); if (frq->bar) do_barchart(frq->bar, &vf->var, &vf->tab); cleanup_freq_tab (vf); } } int cmd_frequencies (struct lexer *lexer, struct dataset *ds) { int i; struct frq_proc frq; const struct variable **vars = NULL; bool sbc_barchart = false; bool sbc_piechart = false; bool sbc_histogram = false; double pie_min = -DBL_MAX; double pie_max = DBL_MAX; bool pie_missing = true; double bar_min = -DBL_MAX; double bar_max = DBL_MAX; bool bar_freq = true; double hi_min = -DBL_MAX; double hi_max = DBL_MAX; int hi_scale = FRQ_FREQ; int hi_freq = INT_MIN; int hi_pcnt = INT_MIN; int hi_norm = FRQ_NONORMAL; frq.pool = pool_create (); frq.sort = FRQ_AVALUE; frq.vars = NULL; frq.n_vars = 0; frq.stats = BIT_INDEX (FRQ_ST_MEAN) | BIT_INDEX (FRQ_ST_STDDEV) | BIT_INDEX (FRQ_ST_MINIMUM) | BIT_INDEX (FRQ_ST_MAXIMUM); frq.n_stats = 4; frq.max_categories = LONG_MAX; frq.percentiles = NULL; frq.n_percentiles = 0; frq.n_show_percentiles = 0; frq.hist = NULL; frq.pie = NULL; frq.bar = NULL; /* Accept an optional, completely pointless "/VARIABLES=" */ lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "VARIABLES")) { if (! lex_force_match (lexer, T_EQUALS) ) goto error; } if (!parse_variables_const (lexer, dataset_dict (ds), &vars, &frq.n_vars, PV_NO_DUPLICATE)) goto error; frq.vars = xzalloc (frq.n_vars * sizeof (*frq.vars)); for (i = 0; i < frq.n_vars; ++i) { frq.vars[i].var = vars[i]; frq.vars[i].width = var_get_width (vars[i]); } while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "STATISTICS")) { frq.stats = BIT_INDEX (FRQ_ST_MEAN) | BIT_INDEX (FRQ_ST_STDDEV) | BIT_INDEX (FRQ_ST_MINIMUM) | BIT_INDEX (FRQ_ST_MAXIMUM); frq.n_stats = 4; if (lex_match (lexer, T_EQUALS)) { frq.n_stats = 0; frq.stats = 0; } while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "DEFAULT")) { frq.stats = BIT_INDEX (FRQ_ST_MEAN) | BIT_INDEX (FRQ_ST_STDDEV) | BIT_INDEX (FRQ_ST_MINIMUM) | BIT_INDEX (FRQ_ST_MAXIMUM); frq.n_stats = 4; } else if (lex_match_id (lexer, "MEAN")) { frq.stats |= BIT_INDEX (FRQ_ST_MEAN); frq.n_stats++; } else if (lex_match_id (lexer, "SEMEAN")) { frq.stats |= BIT_INDEX (FRQ_ST_SEMEAN); frq.n_stats++; } else if (lex_match_id (lexer, "MEDIAN")) { frq.stats |= BIT_INDEX (FRQ_ST_MEDIAN); frq.n_stats++; } else if (lex_match_id (lexer, "MODE")) { frq.stats |= BIT_INDEX (FRQ_ST_MODE); frq.n_stats++; } else if (lex_match_id (lexer, "STDDEV")) { frq.stats |= BIT_INDEX (FRQ_ST_STDDEV); frq.n_stats++; } else if (lex_match_id (lexer, "VARIANCE")) { frq.stats |= BIT_INDEX (FRQ_ST_VARIANCE); frq.n_stats++; } else if (lex_match_id (lexer, "KURTOSIS")) { frq.stats |= BIT_INDEX (FRQ_ST_KURTOSIS); frq.n_stats++; } else if (lex_match_id (lexer, "SKEWNESS")) { frq.stats |= BIT_INDEX (FRQ_ST_SKEWNESS); frq.n_stats++; } else if (lex_match_id (lexer, "RANGE")) { frq.stats |= BIT_INDEX (FRQ_ST_RANGE); frq.n_stats++; } else if (lex_match_id (lexer, "MINIMUM")) { frq.stats |= BIT_INDEX (FRQ_ST_MINIMUM); frq.n_stats++; } else if (lex_match_id (lexer, "MAXIMUM")) { frq.stats |= BIT_INDEX (FRQ_ST_MAXIMUM); frq.n_stats++; } else if (lex_match_id (lexer, "SUM")) { frq.stats |= BIT_INDEX (FRQ_ST_SUM); frq.n_stats++; } else if (lex_match_id (lexer, "SESKEWNESS")) { frq.stats |= BIT_INDEX (FRQ_ST_SESKEWNESS); frq.n_stats++; } else if (lex_match_id (lexer, "SEKURTOSIS")) { frq.stats |= BIT_INDEX (FRQ_ST_SEKURTOSIS); frq.n_stats++; } else if (lex_match_id (lexer, "NONE")) { frq.stats = 0; frq.n_stats = 0; } else if (lex_match (lexer, T_ALL)) { frq.stats = ~0; frq.n_stats = FRQ_ST_count; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "PERCENTILES")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_force_num (lexer)) { frq.percentiles = xrealloc (frq.percentiles, (frq.n_percentiles + 1) * sizeof (*frq.percentiles)); frq.percentiles[frq.n_percentiles].p = lex_number (lexer) / 100.0; frq.percentiles[frq.n_percentiles].show = true; lex_get (lexer); frq.n_percentiles++; frq.n_show_percentiles++; } else { lex_error (lexer, NULL); goto error; } lex_match (lexer, T_COMMA); } } else if (lex_match_id (lexer, "FORMAT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "TABLE")) { } else if (lex_match_id (lexer, "NOTABLE")) { frq.max_categories = 0; } else if (lex_match_id (lexer, "LIMIT")) { if (!lex_force_match (lexer, T_LPAREN) || !lex_force_int (lexer)) goto error; frq.max_categories = lex_integer (lexer); lex_get (lexer); if (!lex_force_match (lexer, T_RPAREN)) goto error; } else if (lex_match_id (lexer, "AVALUE")) { frq.sort = FRQ_AVALUE; } else if (lex_match_id (lexer, "DVALUE")) { frq.sort = FRQ_DVALUE; } else if (lex_match_id (lexer, "AFREQ")) { frq.sort = FRQ_AFREQ; } else if (lex_match_id (lexer, "DFREQ")) { frq.sort = FRQ_DFREQ; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "NTILES")) { lex_match (lexer, T_EQUALS); if (lex_force_int (lexer)) { int i; int n = lex_integer (lexer); lex_get (lexer); for (i = 0; i < n + 1; ++i) { frq.percentiles = xrealloc (frq.percentiles, (frq.n_percentiles + 1) * sizeof (*frq.percentiles)); frq.percentiles[frq.n_percentiles].p = i / (double) n ; frq.percentiles[frq.n_percentiles].show = true; frq.n_percentiles++; frq.n_show_percentiles++; } } else { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "ALGORITHM")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "COMPATIBLE")) { settings_set_cmd_algorithm (COMPATIBLE); } else if (lex_match_id (lexer, "ENHANCED")) { settings_set_cmd_algorithm (ENHANCED); } else { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "HISTOGRAM")) { lex_match (lexer, T_EQUALS); sbc_histogram = true; while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "NORMAL")) { hi_norm = FRQ_NORMAL; } else if (lex_match_id (lexer, "NONORMAL")) { hi_norm = FRQ_NONORMAL; } else if (lex_match_id (lexer, "FREQ")) { hi_scale = FRQ_FREQ; if (lex_match (lexer, T_LPAREN)) { if (lex_force_int (lexer)) { hi_freq = lex_integer (lexer); if (hi_freq <= 0) { lex_error (lexer, _("Histogram frequency must be greater than zero.")); } lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } } else if (lex_match_id (lexer, "PERCENT")) { hi_scale = FRQ_PERCENT; if (lex_match (lexer, T_LPAREN)) { if (lex_force_int (lexer)) { hi_pcnt = lex_integer (lexer); if (hi_pcnt <= 0) { lex_error (lexer, _("Histogram percentage must be greater than zero.")); } lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } } else if (lex_match_id (lexer, "MINIMUM")) { if (! lex_force_match (lexer, T_LPAREN)) goto error; if (lex_force_num (lexer)) { hi_min = lex_number (lexer); lex_get (lexer); } if (! lex_force_match (lexer, T_RPAREN)) goto error; } else if (lex_match_id (lexer, "MAXIMUM")) { if (! lex_force_match (lexer, T_LPAREN)) goto error; if (lex_force_num (lexer)) { hi_max = lex_number (lexer); lex_get (lexer); } if (! lex_force_match (lexer, T_RPAREN)) goto error; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "PIECHART")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "MINIMUM")) { if (! lex_force_match (lexer, T_LPAREN)) goto error; if (lex_force_num (lexer)) { pie_min = lex_number (lexer); lex_get (lexer); } if (! lex_force_match (lexer, T_RPAREN)) goto error; } else if (lex_match_id (lexer, "MAXIMUM")) { if (! lex_force_match (lexer, T_LPAREN)) goto error; if (lex_force_num (lexer)) { pie_max = lex_number (lexer); lex_get (lexer); } if (! lex_force_match (lexer, T_RPAREN)) goto error; } else if (lex_match_id (lexer, "MISSING")) { pie_missing = true; } else if (lex_match_id (lexer, "NOMISSING")) { pie_missing = false; } else { lex_error (lexer, NULL); goto error; } } sbc_piechart = true; } else if (lex_match_id (lexer, "BARCHART")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "MINIMUM")) { if (! lex_force_match (lexer, T_LPAREN)) goto error; if (lex_force_num (lexer)) { bar_min = lex_number (lexer); lex_get (lexer); } if (! lex_force_match (lexer, T_RPAREN)) goto error; } else if (lex_match_id (lexer, "MAXIMUM")) { if (! lex_force_match (lexer, T_LPAREN)) goto error; if (lex_force_num (lexer)) { bar_max = lex_number (lexer); lex_get (lexer); } if (! lex_force_match (lexer, T_RPAREN)) goto error; } else if (lex_match_id (lexer, "FREQ")) { if ( lex_match (lexer, T_LPAREN)) { if (lex_force_num (lexer)) { lex_number (lexer); lex_get (lexer); } if (! lex_force_match (lexer, T_RPAREN)) goto error; } bar_freq = true; } else if (lex_match_id (lexer, "PERCENT")) { if ( lex_match (lexer, T_LPAREN)) { if (lex_force_num (lexer)) { lex_number (lexer); lex_get (lexer); } if (! lex_force_match (lexer, T_RPAREN)) goto error; } bar_freq = false; } else { lex_error (lexer, NULL); goto error; } } sbc_barchart = true; } else if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "EXCLUDE")) { } else if (lex_match_id (lexer, "INCLUDE")) { } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "ORDER")) { lex_match (lexer, T_EQUALS); if (!lex_match_id (lexer, "ANALYSIS")) lex_match_id (lexer, "VARIABLE"); } else { lex_error (lexer, NULL); goto error; } } if (frq.stats & BIT_INDEX (FRQ_ST_MEDIAN)) { frq.percentiles = xrealloc (frq.percentiles, (frq.n_percentiles + 1) * sizeof (*frq.percentiles)); frq.percentiles[frq.n_percentiles].p = 0.50; frq.percentiles[frq.n_percentiles].show = true; frq.n_percentiles++; frq.n_show_percentiles++; } /* Figure out which charts the user requested. */ { if (sbc_histogram) { struct frq_chart *hist; hist = frq.hist = xmalloc (sizeof *frq.hist); hist->x_min = hi_min; hist->x_max = hi_max; hist->y_scale = hi_scale; hist->y_max = hi_scale == FRQ_FREQ ? hi_freq : hi_pcnt; hist->draw_normal = hi_norm != FRQ_NONORMAL; hist->include_missing = false; if (hist->x_min != SYSMIS && hist->x_max != SYSMIS && hist->x_min >= hist->x_max) { msg (SE, _("%s for histogram must be greater than or equal to %s, " "but %s was specified as %.15g and %s as %.15g. " "%s and %s will be ignored."), "MAX", "MIN", "MIN", hist->x_min, "MAX", hist->x_max, "MIN", "MAX"); hist->x_min = hist->x_max = SYSMIS; } frq.percentiles = xrealloc (frq.percentiles, (frq.n_percentiles + 2) * sizeof (*frq.percentiles)); frq.percentiles[frq.n_percentiles].p = 0.25; frq.percentiles[frq.n_percentiles].show = false; frq.percentiles[frq.n_percentiles + 1].p = 0.75; frq.percentiles[frq.n_percentiles + 1].show = false; frq.n_percentiles+=2; } if (sbc_barchart) { frq.bar = xmalloc (sizeof *frq.bar); frq.bar->x_min = bar_min; frq.bar->x_max = bar_max; frq.bar->include_missing = false; frq.bar->y_scale = bar_freq ? FRQ_FREQ : FRQ_PERCENT; } if (sbc_piechart) { struct frq_chart *pie; pie = frq.pie = xmalloc (sizeof *frq.pie); pie->x_min = pie_min; pie->x_max = pie_max; pie->include_missing = pie_missing; if (pie->x_min != SYSMIS && pie->x_max != SYSMIS && pie->x_min >= pie->x_max) { msg (SE, _("%s for pie chart must be greater than or equal to %s, " "but %s was specified as %.15g and %s as %.15g. " "%s and %s will be ignored."), "MAX", "MIN", "MIN", pie->x_min, "MAX", pie->x_max, "MIN", "MAX"); pie->x_min = pie->x_max = SYSMIS; } } } { int i,o; double previous_p = -1; qsort (frq.percentiles, frq.n_percentiles, sizeof (*frq.percentiles), ptile_3way); frq.n_show_percentiles = 0; for (i = o = 0; i < frq.n_percentiles; ++i) { if (frq.percentiles[i].p != previous_p) { frq.percentiles[o].p = frq.percentiles[i].p; frq.percentiles[o].show = frq.percentiles[i].show; if (frq.percentiles[i].show) frq.n_show_percentiles++; o++; } else if (frq.percentiles[i].show && !frq.percentiles[o].show) { frq.percentiles[o].show = true; frq.n_show_percentiles++; } previous_p = frq.percentiles[i].p; } frq.n_percentiles = o; } { struct casegrouper *grouper; struct casereader *group; bool ok; grouper = casegrouper_create_splits (proc_open (ds), dataset_dict (ds)); while (casegrouper_get_next_group (grouper, &group)) { struct ccase *c; precalc (&frq, group, ds); for (; (c = casereader_read (group)) != NULL; case_unref (c)) calc (&frq, c, ds); postcalc (&frq, ds); casereader_destroy (group); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; } free (vars); free (frq.vars); free (frq.bar); free (frq.pie); free (frq.hist); free (frq.percentiles); pool_destroy (frq.pool); return CMD_SUCCESS; error: free (vars); free (frq.vars); free (frq.bar); free (frq.pie); free (frq.hist); free (frq.percentiles); pool_destroy (frq.pool); return CMD_FAILURE; } static double calculate_iqr (const struct frq_proc *frq) { double q1 = SYSMIS; double q3 = SYSMIS; int i; /* This cannot work unless the 25th and 75th percentile are calculated */ assert (frq->n_percentiles >= 2); for (i = 0; i < frq->n_percentiles; i++) { struct percentile *pc = &frq->percentiles[i]; if (fabs (0.25 - pc->p) < DBL_EPSILON) q1 = pc->value; else if (fabs (0.75 - pc->p) < DBL_EPSILON) q3 = pc->value; } return q1 == SYSMIS || q3 == SYSMIS ? SYSMIS : q3 - q1; } static bool chart_includes_value (const struct frq_chart *chart, const struct variable *var, const union value *value) { if (!chart->include_missing && var_is_value_missing (var, value, MV_ANY)) return false; if (var_is_numeric (var) && ((chart->x_min != SYSMIS && value->f < chart->x_min) || (chart->x_max != SYSMIS && value->f > chart->x_max))) return false; return true; } /* Create a gsl_histogram from a freq_tab */ static struct histogram * freq_tab_to_hist (const struct frq_proc *frq, const struct freq_tab *ft, const struct variable *var) { double x_min, x_max, valid_freq; int i; double bin_width; struct histogram *histogram; double iqr; /* Find out the extremes of the x value, within the range to be included in the histogram, and sum the total frequency of those values. */ x_min = DBL_MAX; x_max = -DBL_MAX; valid_freq = 0; for (i = 0; i < ft->n_valid; i++) { const struct freq *f = &ft->valid[i]; if (chart_includes_value (frq->hist, var, f->values)) { x_min = MIN (x_min, f->values[0].f); x_max = MAX (x_max, f->values[0].f); valid_freq += f->count; } } if (valid_freq <= 0) return NULL; iqr = calculate_iqr (frq); if (iqr > 0) /* Freedman-Diaconis' choice of bin width. */ bin_width = 2 * iqr / pow (valid_freq, 1.0 / 3.0); else /* Sturges Rule */ bin_width = (x_max - x_min) / (1 + log2 (valid_freq)); histogram = histogram_create (bin_width, x_min, x_max); if ( histogram == NULL) return NULL; for (i = 0; i < ft->n_valid; i++) { const struct freq *f = &ft->valid[i]; if (chart_includes_value (frq->hist, var, f->values)) histogram_add (histogram, f->values[0].f, f->count); } return histogram; } /* Allocate an array of struct freqs and fill them from the data in FRQ_TAB, according to the parameters of CATCHART N_SLICES will contain the number of slices allocated. The caller is responsible for freeing slices */ static struct freq * pick_cat_counts (const struct frq_chart *catchart, const struct freq_tab *frq_tab, int *n_slicesp) { int n_slices = 0; int i; struct freq *slices = xnmalloc (frq_tab->n_valid + frq_tab->n_missing, sizeof *slices); for (i = 0; i < frq_tab->n_valid; i++) { const struct freq *f = &frq_tab->valid[i]; if (f->count > catchart->x_max) continue; if (f->count < catchart->x_min) continue; slices[n_slices] = *f; n_slices++; } if (catchart->include_missing) { for (i = 0; i < frq_tab->n_missing; i++) { const struct freq *f = &frq_tab->missing[i]; slices[n_slices].count += f->count; if (i == 0) slices[n_slices].values[0] = f->values[0]; } if (frq_tab->n_missing > 0) n_slices++; } *n_slicesp = n_slices; return slices; } /* Allocate an array of struct freqs and fill them from the data in FRQ_TAB, according to the parameters of CATCHART N_SLICES will contain the number of slices allocated. The caller is responsible for freeing slices */ static struct freq ** pick_cat_counts_ptr (const struct frq_chart *catchart, const struct freq_tab *frq_tab, int *n_slicesp) { int n_slices = 0; int i; struct freq **slices = xnmalloc (frq_tab->n_valid + frq_tab->n_missing, sizeof *slices); for (i = 0; i < frq_tab->n_valid; i++) { struct freq *f = &frq_tab->valid[i]; if (f->count > catchart->x_max) continue; if (f->count < catchart->x_min) continue; slices[n_slices] = f; n_slices++; } if (catchart->include_missing) { for (i = 0; i < frq_tab->n_missing; i++) { const struct freq *f = &frq_tab->missing[i]; if (i == 0) { slices[n_slices] = xmalloc (sizeof (struct freq)); slices[n_slices]->values[0] = f->values[0]; } slices[n_slices]->count += f->count; } } *n_slicesp = n_slices; return slices; } static void do_piechart(const struct frq_chart *pie, const struct variable *var, const struct freq_tab *frq_tab) { int n_slices; struct freq *slices = pick_cat_counts (pie, frq_tab, &n_slices); if (n_slices < 2) msg (SW, _("Omitting pie chart for %s, which has only %d unique values."), var_get_name (var), n_slices); else if (n_slices > 50) msg (SW, _("Omitting pie chart for %s, which has over 50 unique values."), var_get_name (var)); else chart_item_submit (piechart_create (var, slices, n_slices)); free (slices); } static void do_barchart(const struct frq_chart *bar, const struct variable **var, const struct freq_tab *frq_tab) { int n_slices; struct freq **slices = pick_cat_counts_ptr (bar, frq_tab, &n_slices); chart_item_submit (barchart_create (var, 1, (bar->y_scale == FRQ_FREQ) ? _("Count") : _("Percent"), (bar->y_scale == FRQ_PERCENT), slices, n_slices)); free (slices); } /* Calculates all the pertinent statistics for VF, putting them in array D[]. */ static void calc_stats (const struct var_freqs *vf, double d[FRQ_ST_count]) { const struct freq_tab *ft = &vf->tab; double W = ft->valid_cases; const struct freq *f; struct moments *m; int most_often = -1; double X_mode = SYSMIS; /* Calculate the mode. */ for (f = ft->valid; f < ft->missing; f++) { if (most_often < f->count) { most_often = f->count; X_mode = f->values[0].f; } else if (most_often == f->count) { /* A duplicate mode is undefined. FIXME: keep track of *all* the modes. */ X_mode = SYSMIS; } } /* Calculate moments. */ m = moments_create (MOMENT_KURTOSIS); for (f = ft->valid; f < ft->missing; f++) moments_pass_one (m, f->values[0].f, f->count); for (f = ft->valid; f < ft->missing; f++) moments_pass_two (m, f->values[0].f, f->count); moments_calculate (m, NULL, &d[FRQ_ST_MEAN], &d[FRQ_ST_VARIANCE], &d[FRQ_ST_SKEWNESS], &d[FRQ_ST_KURTOSIS]); moments_destroy (m); /* Formulae below are taken from _SPSS Statistical Algorithms_. */ d[FRQ_ST_MINIMUM] = ft->valid[0].values[0].f; d[FRQ_ST_MAXIMUM] = ft->valid[ft->n_valid - 1].values[0].f; d[FRQ_ST_MODE] = X_mode; d[FRQ_ST_RANGE] = d[FRQ_ST_MAXIMUM] - d[FRQ_ST_MINIMUM]; d[FRQ_ST_SUM] = d[FRQ_ST_MEAN] * W; d[FRQ_ST_STDDEV] = sqrt (d[FRQ_ST_VARIANCE]); d[FRQ_ST_SEMEAN] = d[FRQ_ST_STDDEV] / sqrt (W); d[FRQ_ST_SESKEWNESS] = calc_seskew (W); d[FRQ_ST_SEKURTOSIS] = calc_sekurt (W); } /* Displays a table of all the statistics requested for variable V. */ static void dump_statistics (const struct frq_proc *frq, const struct var_freqs *vf, const struct variable *wv) { const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : &F_8_0; const struct freq_tab *ft = &vf->tab; double stat_value[FRQ_ST_count]; struct tab_table *t; int i, r = 2; /* N missing and N valid are always dumped */ if (var_is_alpha (vf->var)) return; calc_stats (vf, stat_value); t = tab_create (3, ((frq->stats & BIT_INDEX (FRQ_ST_MEDIAN)) ? frq->n_stats - 1 : frq->n_stats) + frq->n_show_percentiles + 2); tab_set_format (t, RC_WEIGHT, wfmt); tab_box (t, TAL_1, TAL_1, -1, -1 , 0 , 0 , 2, tab_nr(t) - 1) ; tab_vline (t, TAL_1 , 2, 0, tab_nr(t) - 1); tab_vline (t, TAL_GAP , 1, 0, tab_nr(t) - 1 ) ; for (i = 0; i < FRQ_ST_count; i++) { if (FRQ_ST_MEDIAN == i) continue; if (frq->stats & BIT_INDEX (i)) { tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, gettext (st_name[i])); if (vf->tab.n_valid <= 0 && r >= 2) tab_text (t, 2, r, 0, "."); else tab_double (t, 2, r, TAB_NONE, stat_value[i], NULL, RC_OTHER); r++; } } tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("N")); tab_text (t, 1, 0, TAB_LEFT | TAT_TITLE, _("Valid")); tab_text (t, 1, 1, TAB_LEFT | TAT_TITLE, _("Missing")); tab_double (t, 2, 0, TAB_NONE, ft->valid_cases, NULL, RC_WEIGHT); tab_double (t, 2, 1, TAB_NONE, ft->total_cases - ft->valid_cases, NULL, RC_WEIGHT); for (i = 0; i < frq->n_percentiles; i++) { const struct percentile *pc = &frq->percentiles[i]; if (!pc->show) continue; if ( i == 0 ) { tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, _("Percentiles")); } if (vf->tab.n_valid <= 0) { tab_text (t, 2, r, 0, "."); ++r; continue; } if (pc->p == 0.5) tab_text (t, 1, r, TAB_LEFT, _("50 (Median)")); else tab_double (t, 1, r, TAB_LEFT, pc->p * 100, NULL, RC_INTEGER); tab_double (t, 2, r, TAB_NONE, pc->value, var_get_print_format (vf->var), RC_OTHER); ++r; } tab_title (t, "%s", var_to_string (vf->var)); tab_submit (t); } pspp-1.0.1/src/language/stats/ks-one-sample.h0000644000175000017500000000237312470243700015754 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !ks_one_sample_h #define ks_one_sample_h 1 #include #include #include "language/stats/npar.h" enum dist { KS_NORMAL, KS_UNIFORM, KS_POISSON, KS_EXPONENTIAL }; struct ks_one_sample_test { struct one_sample_test parent; double p[2]; enum dist dist; }; struct casereader; struct dataset; void ks_one_sample_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool, double); #endif pspp-1.0.1/src/language/stats/median.h0000644000175000017500000000223412470243700014532 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !median_h #define median_h 1 #include #include #include "language/stats/npar.h" struct median_test { struct n_sample_test parent; double median; }; struct casereader; struct dataset; void median_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact, double timer ); #endif pspp-1.0.1/src/language/stats/freq.h0000644000175000017500000000356512523704223014243 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LANGUAGE_STATS_FREQ_H #define LANGUAGE_STATS_FREQ_H 1 #include "data/value.h" #include "libpspp/hmap.h" /* Frequency table entry. */ struct freq { struct hmap_node node; /* Element in hash table. */ double count; /* The number of occurrences of the value. */ union value values[1]; /* The value. */ }; struct freq *freq_clone (const struct freq *, int values, int *widths); void freq_destroy (struct freq *f, int values, int *widths); static inline size_t table_entry_size (size_t n_values) { return (offsetof (struct freq, values) + n_values * sizeof (union value)); } int compare_freq_ptr_3way (const void *a_, const void *b_, const void *width_); void freq_hmap_destroy (struct hmap *, int width); struct freq *freq_hmap_search (struct hmap *, const union value *, int width, size_t hash); struct freq *freq_hmap_insert (struct hmap *, const union value *, int width, size_t hash); struct freq **freq_hmap_sort (struct hmap *, int width); struct freq *freq_hmap_extract (struct hmap *); #endif /* language/stats/freq.h */ pspp-1.0.1/src/language/stats/kruskal-wallis.h0000644000175000017500000000231212470243700016237 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !kruskal_wallis_h #define kruskal_wallis_h 1 #include #include #include "data/case.h" #include "language/stats/npar.h" struct kruskal_wallis_test { struct two_sample_test parent; }; struct casereader; struct dataset; void kruskal_wallis_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact, double timer ); #endif pspp-1.0.1/src/language/stats/reliability.c0000644000175000017500000005131013137223525015604 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011, 2013, 2015, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/missing-values.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "math/moments.h" #include "output/tab.h" #include "output/text-item.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid struct cronbach { const struct variable **items; size_t n_items; double alpha; double sum_of_variances; double variance_of_sums; int totals_idx; /* Casereader index into the totals */ struct moments1 **m ; /* Moments of the items */ struct moments1 *total ; /* Moments of the totals */ }; #if 0 static void dump_cronbach (const struct cronbach *s) { int i; printf ("N items %d\n", s->n_items); for (i = 0 ; i < s->n_items; ++i) { printf ("%s\n", var_get_name (s->items[i])); } printf ("Totals idx %d\n", s->totals_idx); printf ("scale variance %g\n", s->variance_of_sums); printf ("alpha %g\n", s->alpha); putchar ('\n'); } #endif enum model { MODEL_ALPHA, MODEL_SPLIT }; enum summary_opts { SUMMARY_TOTAL = 0x0001, }; struct reliability { const struct variable **variables; size_t n_variables; enum mv_class exclude; struct cronbach *sc; int n_sc; int total_start; struct string scale_name; enum model model; int split_point; enum summary_opts summary; const struct variable *wv; }; static bool run_reliability (struct dataset *ds, const struct reliability *reliability); static void reliability_destroy (struct reliability *rel) { int j; ds_destroy (&rel->scale_name); if (rel->sc) for (j = 0; j < rel->n_sc ; ++j) { int x; free (rel->sc[j].items); moments1_destroy (rel->sc[j].total); if (rel->sc[j].m) for (x = 0; x < rel->sc[j].n_items; ++x) free (rel->sc[j].m[x]); free (rel->sc[j].m); } free (rel->sc); free (rel->variables); } int cmd_reliability (struct lexer *lexer, struct dataset *ds) { const struct dictionary *dict = dataset_dict (ds); struct reliability reliability; reliability.n_variables = 0; reliability.variables = NULL; reliability.model = MODEL_ALPHA; reliability.exclude = MV_ANY; reliability.summary = 0; reliability.n_sc = 0; reliability.sc = NULL; reliability.wv = dict_get_weight (dict); reliability.total_start = 0; ds_init_empty (&reliability.scale_name); lex_match (lexer, T_SLASH); if (!lex_force_match_id (lexer, "VARIABLES")) { goto error; } lex_match (lexer, T_EQUALS); if (!parse_variables_const (lexer, dict, &reliability.variables, &reliability.n_variables, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; if (reliability.n_variables < 2) msg (MW, _("Reliability on a single variable is not useful.")); { int i; struct cronbach *c; /* Create a default Scale */ reliability.n_sc = 1; reliability.sc = xzalloc (sizeof (struct cronbach) * reliability.n_sc); ds_assign_cstr (&reliability.scale_name, "ANY"); c = &reliability.sc[0]; c->n_items = reliability.n_variables; c->items = xzalloc (sizeof (struct variable*) * c->n_items); for (i = 0 ; i < c->n_items ; ++i) c->items[i] = reliability.variables[i]; } while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "SCALE")) { struct const_var_set *vs; if ( ! lex_force_match (lexer, T_LPAREN)) goto error; if ( ! lex_force_string (lexer) ) goto error; ds_assign_substring (&reliability.scale_name, lex_tokss (lexer)); lex_get (lexer); if ( ! lex_force_match (lexer, T_RPAREN)) goto error; lex_match (lexer, T_EQUALS); vs = const_var_set_create_from_array (reliability.variables, reliability.n_variables); free (reliability.sc->items); if (!parse_const_var_set_vars (lexer, vs, &reliability.sc->items, &reliability.sc->n_items, 0)) { const_var_set_destroy (vs); goto error; } const_var_set_destroy (vs); } else if (lex_match_id (lexer, "MODEL")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "ALPHA")) { reliability.model = MODEL_ALPHA; } else if (lex_match_id (lexer, "SPLIT")) { reliability.model = MODEL_SPLIT; reliability.split_point = -1; if ( lex_match (lexer, T_LPAREN) && lex_force_num (lexer)) { reliability.split_point = lex_number (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else goto error; } else if (lex_match_id (lexer, "SUMMARY")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "TOTAL")) { reliability.summary |= SUMMARY_TOTAL; } else if (lex_match (lexer, T_ALL)) { reliability.summary = 0xFFFF; } else goto error; } else if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "INCLUDE")) { reliability.exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "EXCLUDE")) { reliability.exclude = MV_ANY; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "STATISTICS")) { lex_match (lexer, T_EQUALS); msg (SW, _("The STATISTICS subcommand is not yet implemented. " "No statistics will be produced.")); while (lex_match (lexer, T_ID)) continue; } else { lex_error (lexer, NULL); goto error; } } if ( reliability.model == MODEL_SPLIT) { int i; const struct cronbach *s; if ( reliability.split_point >= reliability.n_variables) { msg (ME, _("The split point must be less than the number of variables")); goto error; } reliability.n_sc += 2 ; reliability.sc = xrealloc (reliability.sc, sizeof (struct cronbach) * reliability.n_sc); s = &reliability.sc[0]; reliability.sc[1].n_items = (reliability.split_point == -1) ? s->n_items / 2 : reliability.split_point; reliability.sc[2].n_items = s->n_items - reliability.sc[1].n_items; reliability.sc[1].items = xzalloc (sizeof (struct variable *) * reliability.sc[1].n_items); reliability.sc[2].items = xzalloc (sizeof (struct variable *) * reliability.sc[2].n_items); for (i = 0; i < reliability.sc[1].n_items ; ++i) reliability.sc[1].items[i] = s->items[i]; while (i < s->n_items) { reliability.sc[2].items[i - reliability.sc[1].n_items] = s->items[i]; i++; } } if ( reliability.summary & SUMMARY_TOTAL) { int i; const int base_sc = reliability.n_sc; reliability.total_start = base_sc; reliability.n_sc += reliability.sc[0].n_items ; reliability.sc = xrealloc (reliability.sc, sizeof (struct cronbach) * reliability.n_sc); for (i = 0 ; i < reliability.sc[0].n_items; ++i ) { int v_src; int v_dest = 0; struct cronbach *s = &reliability.sc[i + base_sc]; s->n_items = reliability.sc[0].n_items - 1; s->items = xzalloc (sizeof (struct variable *) * s->n_items); for (v_src = 0 ; v_src < reliability.sc[0].n_items ; ++v_src) { if ( v_src != i) s->items[v_dest++] = reliability.sc[0].items[v_src]; } } } if ( ! run_reliability (ds, &reliability)) goto error; reliability_destroy (&reliability); return CMD_SUCCESS; error: reliability_destroy (&reliability); return CMD_FAILURE; } static void do_reliability (struct casereader *group, struct dataset *ds, const struct reliability *rel); static void reliability_summary_total (const struct reliability *rel); static void reliability_statistics (const struct reliability *rel); static bool run_reliability (struct dataset *ds, const struct reliability *reliability) { struct dictionary *dict = dataset_dict (ds); bool ok; struct casereader *group; struct casegrouper *grouper = casegrouper_create_splits (proc_open (ds), dict); int si; for (si = 0 ; si < reliability->n_sc; ++si) { struct cronbach *s = &reliability->sc[si]; int i; s->m = xzalloc (sizeof *s->m * s->n_items); s->total = moments1_create (MOMENT_VARIANCE); for (i = 0 ; i < s->n_items ; ++i ) s->m[i] = moments1_create (MOMENT_VARIANCE); } while (casegrouper_get_next_group (grouper, &group)) { do_reliability (group, ds, reliability); reliability_statistics (reliability); if (reliability->summary & SUMMARY_TOTAL ) reliability_summary_total (reliability); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; return ok; } /* Return the sum of all the item variables in S */ static double append_sum (const struct ccase *c, casenumber n UNUSED, void *aux) { double sum = 0; const struct cronbach *s = aux; int v; for (v = 0 ; v < s->n_items; ++v) { sum += case_data (c, s->items[v])->f; } return sum; }; static void case_processing_summary (casenumber n_valid, casenumber n_missing, const struct dictionary *dict); static double alpha (int k, double sum_of_variances, double variance_of_sums) { return k / ( k - 1.0) * ( 1 - sum_of_variances / variance_of_sums); } static void do_reliability (struct casereader *input, struct dataset *ds, const struct reliability *rel) { int i; int si; struct ccase *c; casenumber n_missing ; casenumber n_valid = 0; for (si = 0 ; si < rel->n_sc; ++si) { struct cronbach *s = &rel->sc[si]; moments1_clear (s->total); for (i = 0 ; i < s->n_items ; ++i ) moments1_clear (s->m[i]); } input = casereader_create_filter_missing (input, rel->variables, rel->n_variables, rel->exclude, &n_missing, NULL); for (si = 0 ; si < rel->n_sc; ++si) { struct cronbach *s = &rel->sc[si]; s->totals_idx = caseproto_get_n_widths (casereader_get_proto (input)); input = casereader_create_append_numeric (input, append_sum, s, NULL); } for (; (c = casereader_read (input)) != NULL; case_unref (c)) { double weight = 1.0; n_valid ++; for (si = 0; si < rel->n_sc; ++si) { struct cronbach *s = &rel->sc[si]; for (i = 0 ; i < s->n_items ; ++i ) moments1_add (s->m[i], case_data (c, s->items[i])->f, weight); moments1_add (s->total, case_data_idx (c, s->totals_idx)->f, weight); } } casereader_destroy (input); for (si = 0; si < rel->n_sc; ++si) { struct cronbach *s = &rel->sc[si]; s->sum_of_variances = 0; for (i = 0 ; i < s->n_items ; ++i ) { double weight, mean, variance; moments1_calculate (s->m[i], &weight, &mean, &variance, NULL, NULL); s->sum_of_variances += variance; } moments1_calculate (s->total, NULL, NULL, &s->variance_of_sums, NULL, NULL); s->alpha = alpha (s->n_items, s->sum_of_variances, s->variance_of_sums); } text_item_submit (text_item_create_format (TEXT_ITEM_PARAGRAPH, _("Scale: %s"), ds_cstr (&rel->scale_name))); case_processing_summary (n_valid, n_missing, dataset_dict (ds)); } static void case_processing_summary (casenumber n_valid, casenumber n_missing, const struct dictionary *dict) { const struct variable *wv = dict_get_weight (dict); const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0; casenumber total; int n_cols = 4; int n_rows = 4; int heading_columns = 2; int heading_rows = 1; struct tab_table *tbl; tbl = tab_create (n_cols, n_rows); tab_set_format (tbl, RC_WEIGHT, wfmt); tab_headers (tbl, heading_columns, 0, heading_rows, 0); tab_title (tbl, _("Case Processing Summary")); /* Vertical lines for the data only */ tab_box (tbl, -1, -1, -1, TAL_1, heading_columns, 0, n_cols - 1, n_rows - 1); /* Box around table */ tab_box (tbl, TAL_2, TAL_2, -1, -1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (tbl, TAL_2, 0, n_cols - 1, heading_rows); tab_vline (tbl, TAL_2, heading_columns, 0, n_rows - 1); tab_text (tbl, 0, heading_rows, TAB_LEFT | TAT_TITLE, _("Cases")); tab_text (tbl, 1, heading_rows, TAB_LEFT | TAT_TITLE, _("Valid")); tab_text (tbl, 1, heading_rows + 1, TAB_LEFT | TAT_TITLE, _("Excluded")); tab_text (tbl, 1, heading_rows + 2, TAB_LEFT | TAT_TITLE, _("Total")); tab_text (tbl, heading_columns, 0, TAB_CENTER | TAT_TITLE, _("N")); tab_text (tbl, heading_columns + 1, 0, TAB_CENTER | TAT_TITLE, _("%")); total = n_missing + n_valid; tab_double (tbl, 2, heading_rows, TAB_RIGHT, n_valid, NULL, RC_WEIGHT); tab_double (tbl, 2, heading_rows + 1, TAB_RIGHT, n_missing, NULL, RC_WEIGHT); tab_double (tbl, 2, heading_rows + 2, TAB_RIGHT, total, NULL, RC_WEIGHT); tab_double (tbl, 3, heading_rows, TAB_RIGHT, 100 * n_valid / (double) total, NULL, RC_OTHER); tab_double (tbl, 3, heading_rows + 1, TAB_RIGHT, 100 * n_missing / (double) total, NULL, RC_OTHER); tab_double (tbl, 3, heading_rows + 2, TAB_RIGHT, 100 * total / (double) total, NULL, RC_OTHER); tab_submit (tbl); } static void reliability_summary_total (const struct reliability *rel) { int i; const int n_cols = 5; const int heading_columns = 1; const int heading_rows = 1; const int n_rows = rel->sc[0].n_items + heading_rows ; const struct variable *wv = rel->wv; const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0; struct tab_table *tbl = tab_create (n_cols, n_rows); tab_set_format (tbl, RC_WEIGHT, wfmt); tab_headers (tbl, heading_columns, 0, heading_rows, 0); tab_title (tbl, _("Item-Total Statistics")); /* Vertical lines for the data only */ tab_box (tbl, -1, -1, -1, TAL_1, heading_columns, 0, n_cols - 1, n_rows - 1); /* Box around table */ tab_box (tbl, TAL_2, TAL_2, -1, -1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (tbl, TAL_2, 0, n_cols - 1, heading_rows); tab_vline (tbl, TAL_2, heading_columns, 0, n_rows - 1); tab_text (tbl, 1, 0, TAB_CENTER | TAT_TITLE, _("Scale Mean if Item Deleted")); tab_text (tbl, 2, 0, TAB_CENTER | TAT_TITLE, _("Scale Variance if Item Deleted")); tab_text (tbl, 3, 0, TAB_CENTER | TAT_TITLE, _("Corrected Item-Total Correlation")); tab_text (tbl, 4, 0, TAB_CENTER | TAT_TITLE, _("Cronbach's Alpha if Item Deleted")); for (i = 0 ; i < rel->sc[0].n_items; ++i) { double cov, item_to_total_r; double mean, weight, var; const struct cronbach *s = &rel->sc[rel->total_start + i]; tab_text (tbl, 0, heading_rows + i, TAB_LEFT| TAT_TITLE, var_to_string (rel->sc[0].items[i])); moments1_calculate (s->total, &weight, &mean, &var, 0, 0); tab_double (tbl, 1, heading_rows + i, TAB_RIGHT, mean, NULL, RC_OTHER); tab_double (tbl, 2, heading_rows + i, TAB_RIGHT, s->variance_of_sums, NULL, RC_OTHER); tab_double (tbl, 4, heading_rows + i, TAB_RIGHT, s->alpha, NULL, RC_OTHER); moments1_calculate (rel->sc[0].m[i], &weight, &mean, &var, 0,0); cov = rel->sc[0].variance_of_sums + var - s->variance_of_sums; cov /= 2.0; item_to_total_r = (cov - var) / (sqrt(var) * sqrt (s->variance_of_sums)); tab_double (tbl, 3, heading_rows + i, TAB_RIGHT, item_to_total_r, NULL, RC_OTHER); } tab_submit (tbl); } static void reliability_statistics_model_alpha (struct tab_table *tbl, const struct reliability *rel); static void reliability_statistics_model_split (struct tab_table *tbl, const struct reliability *rel); struct reliability_output_table { int n_cols; int n_rows; int heading_cols; int heading_rows; void (*populate) (struct tab_table *, const struct reliability *); }; static struct reliability_output_table rol[2] = { { 2, 2, 1, 1, reliability_statistics_model_alpha}, { 4, 9, 3, 0, reliability_statistics_model_split} }; static void reliability_statistics (const struct reliability *rel) { int n_cols = rol[rel->model].n_cols; int n_rows = rol[rel->model].n_rows; int heading_columns = rol[rel->model].heading_cols; int heading_rows = rol[rel->model].heading_rows; const struct variable *wv = rel->wv; const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0; struct tab_table *tbl = tab_create (n_cols, n_rows); tab_set_format (tbl, RC_WEIGHT, wfmt); tab_headers (tbl, heading_columns, 0, heading_rows, 0); tab_title (tbl, _("Reliability Statistics")); /* Vertical lines for the data only */ tab_box (tbl, -1, -1, -1, TAL_1, heading_columns, 0, n_cols - 1, n_rows - 1); /* Box around table */ tab_box (tbl, TAL_2, TAL_2, -1, -1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (tbl, TAL_2, 0, n_cols - 1, heading_rows); tab_vline (tbl, TAL_2, heading_columns, 0, n_rows - 1); if ( rel->model == MODEL_ALPHA ) reliability_statistics_model_alpha (tbl, rel); else if (rel->model == MODEL_SPLIT ) reliability_statistics_model_split (tbl, rel); tab_submit (tbl); } static void reliability_statistics_model_alpha (struct tab_table *tbl, const struct reliability *rel) { const struct cronbach *s = &rel->sc[0]; tab_text (tbl, 0, 0, TAB_CENTER | TAT_TITLE, _("Cronbach's Alpha")); tab_text (tbl, 1, 0, TAB_CENTER | TAT_TITLE, _("N of Items")); tab_double (tbl, 0, 1, TAB_RIGHT, s->alpha, NULL, RC_OTHER); tab_double (tbl, 1, 1, TAB_RIGHT, s->n_items, NULL, RC_WEIGHT); } static void reliability_statistics_model_split (struct tab_table *tbl, const struct reliability *rel) { tab_text (tbl, 0, 0, TAB_LEFT, _("Cronbach's Alpha")); tab_text (tbl, 1, 0, TAB_LEFT, _("Part 1")); tab_text (tbl, 2, 0, TAB_LEFT, _("Value")); tab_text (tbl, 2, 1, TAB_LEFT, _("N of Items")); tab_text (tbl, 1, 2, TAB_LEFT, _("Part 2")); tab_text (tbl, 2, 2, TAB_LEFT, _("Value")); tab_text (tbl, 2, 3, TAB_LEFT, _("N of Items")); tab_text (tbl, 1, 4, TAB_LEFT, _("Total N of Items")); tab_text (tbl, 0, 5, TAB_LEFT, _("Correlation Between Forms")); tab_text (tbl, 0, 6, TAB_LEFT, _("Spearman-Brown Coefficient")); tab_text (tbl, 1, 6, TAB_LEFT, _("Equal Length")); tab_text (tbl, 1, 7, TAB_LEFT, _("Unequal Length")); tab_text (tbl, 0, 8, TAB_LEFT, _("Guttman Split-Half Coefficient")); tab_double (tbl, 3, 0, TAB_RIGHT, rel->sc[1].alpha, NULL, RC_OTHER); tab_double (tbl, 3, 2, TAB_RIGHT, rel->sc[2].alpha, NULL, RC_OTHER); tab_double (tbl, 3, 1, TAB_RIGHT, rel->sc[1].n_items, NULL, RC_WEIGHT); tab_double (tbl, 3, 3, TAB_RIGHT, rel->sc[2].n_items, NULL, RC_WEIGHT); tab_double (tbl, 3, 4, TAB_RIGHT, rel->sc[1].n_items + rel->sc[2].n_items, NULL, RC_WEIGHT); { /* R is the correlation between the two parts */ double r = rel->sc[0].variance_of_sums - rel->sc[1].variance_of_sums - rel->sc[2].variance_of_sums ; /* Guttman Split Half Coefficient */ double g = 2 * r / rel->sc[0].variance_of_sums; /* Unequal Length Spearman Brown Coefficient, and intermediate value used in the computation thereof */ double uly, tmp; r /= sqrt (rel->sc[1].variance_of_sums); r /= sqrt (rel->sc[2].variance_of_sums); r /= 2.0; tab_double (tbl, 3, 5, TAB_RIGHT, r, NULL, RC_OTHER); /* Equal length Spearman-Brown Coefficient */ tab_double (tbl, 3, 6, TAB_RIGHT, 2 * r / (1.0 + r), NULL, RC_OTHER); tab_double (tbl, 3, 8, TAB_RIGHT, g, NULL, RC_OTHER); tmp = (1.0 - r*r) * rel->sc[1].n_items * rel->sc[2].n_items / pow2 (rel->sc[0].n_items); uly = sqrt( pow4 (r) + 4 * pow2 (r) * tmp); uly -= pow2 (r); uly /= 2 * tmp; tab_double (tbl, 3, 7, TAB_RIGHT, uly, NULL, RC_OTHER); } } pspp-1.0.1/src/language/stats/sort-cases.c0000644000175000017500000000445512470243700015362 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include "data/dataset.h" #include "data/settings.h" #include "data/subcase.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/stats/sort-criteria.h" #include "libpspp/message.h" #include "math/sort.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Performs the SORT CASES procedures. */ int cmd_sort_cases (struct lexer *lexer, struct dataset *ds) { struct subcase ordering; struct casereader *output; bool ok = false; lex_match (lexer, T_BY); proc_cancel_temporary_transformations (ds); subcase_init_empty (&ordering); if (!parse_sort_criteria (lexer, dataset_dict (ds), &ordering, NULL, NULL)) return CMD_CASCADING_FAILURE; if (settings_get_testing_mode () && lex_match (lexer, T_SLASH)) { if (!lex_force_match_id (lexer, "BUFFERS") || !lex_match (lexer, T_EQUALS) || !lex_force_int (lexer)) goto done; min_buffers = max_buffers = lex_integer (lexer); if (max_buffers < 2) { msg (SE, _("Buffer limit must be at least 2.")); goto done; } lex_get (lexer); } proc_discard_output (ds); output = sort_execute (proc_open_filtering (ds, false), &ordering); ok = proc_commit (ds); ok = dataset_set_source (ds, output) && ok; done: min_buffers = 64; max_buffers = INT_MAX; subcase_destroy (&ordering); return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; } pspp-1.0.1/src/language/stats/chisquare.c0000644000175000017500000003277212523704223015267 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/chisquare.h" #include #include #include #include "data/case.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/value-labels.h" #include "data/variable.h" #include "language/stats/freq.h" #include "language/stats/npar.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/hash-functions.h" #include "libpspp/message.h" #include "libpspp/taint.h" #include "output/tab.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Adds frequency counts of each value of VAR in INPUT between LO and HI to FREQ_HASH. LO and HI and each input value is truncated to an integer. Returns true if successful, false on input error. It is the caller's responsibility to initialize FREQ_HASH and to free it when no longer required, even on failure. */ static bool create_freq_hash_with_range (const struct dictionary *dict, struct casereader *input, const struct variable *var, double lo_, double hi_, struct hmap *freq_hash) { struct freq **entries; bool warn = true; struct ccase *c; double lo, hi; double i_d; assert (var_is_numeric (var)); lo = trunc (lo_); hi = trunc (hi_); /* Populate the hash with zero entries */ entries = xnmalloc (hi - lo + 1, sizeof *entries); for (i_d = lo; i_d <= hi; i_d += 1.0 ) { size_t ofs = i_d - lo; union value value = { i_d }; entries[ofs] = freq_hmap_insert (freq_hash, &value, 0, value_hash (&value, 0, 0)); } for (; (c = casereader_read (input)) != NULL; case_unref (c)) { double x = trunc (case_num (c, var)); if (x >= lo && x <= hi) { size_t ofs = x - lo; struct freq *fr = entries[ofs]; fr->count += dict_get_case_weight (dict, c, &warn); } } free (entries); return casereader_destroy (input); } /* Adds frequency counts of each value of VAR in INPUT to FREQ_HASH. LO and HI and each input value is truncated to an integer. Returns true if successful, false on input error. It is the caller's responsibility to initialize FREQ_HASH and to free it when no longer required, even on failure. */ static bool create_freq_hash (const struct dictionary *dict, struct casereader *input, const struct variable *var, struct hmap *freq_hash) { int width = var_get_width (var); bool warn = true; struct ccase *c; for (; (c = casereader_read (input)) != NULL; case_unref (c)) { const union value *value = case_data (c, var); size_t hash = value_hash (value, width, 0); double weight = dict_get_case_weight (dict, c, &warn); struct freq *f; f = freq_hmap_search (freq_hash, value, width, hash); if (f == NULL) f = freq_hmap_insert (freq_hash, value, width, hash); f->count += weight; } return casereader_destroy (input); } static struct tab_table * create_variable_frequency_table (const struct dictionary *dict, struct casereader *input, const struct chisquare_test *test, int v, struct hmap *freq_hash) { int i; const struct one_sample_test *ost = (const struct one_sample_test*)test; int n_cells; struct tab_table *table ; const struct variable *var = ost->vars[v]; const struct variable *wvar = dict_get_weight (dict); const struct fmt_spec *wfmt = wvar ? var_get_print_format (wvar) : & F_8_0; hmap_init (freq_hash); if (!create_freq_hash (dict, input, var, freq_hash)) { freq_hmap_destroy (freq_hash, var_get_width (var)); return NULL; } n_cells = hmap_count (freq_hash); if ( test->n_expected > 0 && n_cells != test->n_expected ) { msg(ME, _("CHISQUARE test specified %d expected values, but" " %d distinct values were encountered in variable %s."), test->n_expected, n_cells, var_get_name (var) ); freq_hmap_destroy (freq_hash, var_get_width (var)); return NULL; } table = tab_create(4, n_cells + 2); tab_set_format (table, RC_WEIGHT, wfmt); tab_title (table, "%s", var_to_string(var)); tab_text (table, 1, 0, TAB_LEFT, _("Observed N")); tab_text (table, 2, 0, TAB_LEFT, _("Expected N")); tab_text (table, 3, 0, TAB_LEFT, _("Residual")); tab_headers (table, 1, 0, 1, 0); tab_box (table, TAL_1, TAL_1, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr(table) - 1 ); tab_hline (table, TAL_1, 0, tab_nc(table) - 1, 1); tab_vline (table, TAL_2, 1, 0, tab_nr(table) - 1); for ( i = 2 ; i < 4 ; ++i ) tab_vline (table, TAL_1, i, 0, tab_nr(table) - 1); tab_text (table, 0, tab_nr (table) - 1, TAB_LEFT, _("Total")); return table; } static struct tab_table * create_combo_frequency_table (const struct dictionary *dict, const struct chisquare_test *test) { int i; const struct one_sample_test *ost = (const struct one_sample_test*)test; struct tab_table *table ; const struct variable *wvar = dict_get_weight (dict); const struct fmt_spec *wfmt = wvar ? var_get_print_format (wvar) : & F_8_0; int n_cells = test->hi - test->lo + 1; table = tab_create(1 + ost->n_vars * 4, n_cells + 3); tab_set_format (table, RC_WEIGHT, wfmt); tab_title (table, _("Frequencies")); for ( i = 0 ; i < ost->n_vars ; ++i ) { const struct variable *var = ost->vars[i]; tab_text (table, i * 4 + 1, 1, TAB_LEFT, _("Category")); tab_text (table, i * 4 + 2, 1, TAB_LEFT, _("Observed N")); tab_text (table, i * 4 + 3, 1, TAB_LEFT, _("Expected N")); tab_text (table, i * 4 + 4, 1, TAB_LEFT, _("Residual")); tab_vline (table, TAL_2, i * 4 + 1, 0, tab_nr (table) - 1); tab_vline (table, TAL_1, i * 4 + 2, 0, tab_nr (table) - 1); tab_vline (table, TAL_1, i * 4 + 3, 1, tab_nr (table) - 1); tab_vline (table, TAL_1, i * 4 + 4, 1, tab_nr (table) - 1); tab_joint_text (table, i * 4 + 1, 0, i * 4 + 4, 0, TAB_CENTER, var_to_string (var)); } for ( i = test->lo ; i <= test->hi ; ++i ) tab_double (table, 0, 2 + i - test->lo, TAB_LEFT, 1 + i - test->lo, NULL, RC_INTEGER); tab_headers (table, 1, 0, 2, 0); tab_box (table, TAL_1, TAL_1, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr(table) - 1 ); tab_hline (table, TAL_1, 1, tab_nc(table) - 1, 1); tab_hline (table, TAL_1, 0, tab_nc(table) - 1, 2); tab_text (table, 0, tab_nr (table) - 1, TAB_LEFT, _("Total")); return table; } static struct tab_table * create_stats_table (const struct chisquare_test *test) { const struct one_sample_test *ost = (const struct one_sample_test*) test; struct tab_table *table; table = tab_create (1 + ost->n_vars, 4); tab_title (table, _("Test Statistics")); tab_headers (table, 1, 0, 1, 0); tab_box (table, TAL_1, TAL_1, -1, -1, 0, 0, tab_nc(table) - 1, tab_nr(table) - 1 ); tab_box (table, -1, -1, -1, TAL_1, 1, 0, tab_nc(table) - 1, tab_nr(table) - 1 ); tab_vline (table, TAL_2, 1, 0, tab_nr (table) - 1); tab_hline (table, TAL_1, 0, tab_nc (table) - 1, 1); tab_text (table, 0, 1, TAB_LEFT, _("Chi-Square")); tab_text (table, 0, 2, TAB_LEFT, _("df")); tab_text (table, 0, 3, TAB_LEFT, _("Asymp. Sig.")); return table; } void chisquare_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact UNUSED, double timer UNUSED) { const struct dictionary *dict = dataset_dict (ds); int v, i; struct chisquare_test *cst = UP_CAST (test, struct chisquare_test, parent.parent); struct one_sample_test *ost = &cst->parent; int n_cells = 0; double total_expected = 0.0; double *df = xzalloc (sizeof (*df) * ost->n_vars); double *xsq = xzalloc (sizeof (*df) * ost->n_vars); bool ok; for ( i = 0 ; i < cst->n_expected ; ++i ) total_expected += cst->expected[i]; if ( cst->ranged == false ) { for ( v = 0 ; v < ost->n_vars ; ++v ) { const struct variable *var = ost->vars[v]; double total_obs = 0.0; struct hmap freq_hash; struct casereader *reader = casereader_create_filter_missing (casereader_clone (input), &var, 1, exclude, NULL, NULL); struct tab_table *freq_table = create_variable_frequency_table (dict, reader, cst, v, &freq_hash); struct freq **ff; if ( NULL == freq_table ) continue; ff = freq_hmap_sort (&freq_hash, var_get_width (var)); n_cells = hmap_count (&freq_hash); for ( i = 0 ; i < n_cells ; ++i ) total_obs += ff[i]->count; xsq[v] = 0.0; for ( i = 0 ; i < n_cells ; ++i ) { struct string str; double exp; const union value *observed_value = &ff[i]->values[0]; ds_init_empty (&str); var_append_value_name (var, observed_value, &str); /* The key */ tab_text (freq_table, 0, i + 1, TAB_LEFT, ds_cstr (&str)); ds_destroy (&str); /* The observed N */ tab_double (freq_table, 1, i + 1, TAB_NONE, ff[i]->count, NULL, RC_WEIGHT); if ( cst->n_expected > 0 ) exp = cst->expected[i] * total_obs / total_expected ; else exp = total_obs / (double) n_cells; tab_double (freq_table, 2, i + 1, TAB_NONE, exp, NULL, RC_OTHER); /* The residual */ tab_double (freq_table, 3, i + 1, TAB_NONE, ff[i]->count - exp, NULL, RC_OTHER); xsq[v] += (ff[i]->count - exp) * (ff[i]->count - exp) / exp; } df[v] = n_cells - 1.0; tab_double (freq_table, 1, i + 1, TAB_NONE, total_obs, NULL, RC_WEIGHT); tab_submit (freq_table); freq_hmap_destroy (&freq_hash, var_get_width (var)); free (ff); } } else /* ranged == true */ { struct tab_table *freq_table = create_combo_frequency_table (dict, cst); n_cells = cst->hi - cst->lo + 1; for ( v = 0 ; v < ost->n_vars ; ++v ) { const struct variable *var = ost->vars[v]; double total_obs = 0.0; struct casereader *reader = casereader_create_filter_missing (casereader_clone (input), &var, 1, exclude, NULL, NULL); struct hmap freq_hash; struct freq **ff; hmap_init (&freq_hash); if (!create_freq_hash_with_range (dict, reader, var, cst->lo, cst->hi, &freq_hash)) { freq_hmap_destroy (&freq_hash, var_get_width (var)); continue; } ff = freq_hmap_sort (&freq_hash, var_get_width (var)); for ( i = 0 ; i < hmap_count (&freq_hash) ; ++i ) total_obs += ff[i]->count; xsq[v] = 0.0; for ( i = 0 ; i < hmap_count (&freq_hash) ; ++i ) { struct string str; double exp; const union value *observed_value = &ff[i]->values[0]; ds_init_empty (&str); var_append_value_name (ost->vars[v], observed_value, &str); /* The key */ tab_text (freq_table, v * 4 + 1, i + 2 , TAB_LEFT, ds_cstr (&str)); ds_destroy (&str); /* The observed N */ tab_double (freq_table, v * 4 + 2, i + 2 , TAB_NONE, ff[i]->count, NULL, RC_WEIGHT); if ( cst->n_expected > 0 ) exp = cst->expected[i] * total_obs / total_expected ; else exp = total_obs / (double) hmap_count (&freq_hash); /* The expected N */ tab_double (freq_table, v * 4 + 3, i + 2 , TAB_NONE, exp, NULL, RC_OTHER); /* The residual */ tab_double (freq_table, v * 4 + 4, i + 2 , TAB_NONE, ff[i]->count - exp, NULL, RC_OTHER); xsq[v] += (ff[i]->count - exp) * (ff[i]->count - exp) / exp; } tab_double (freq_table, v * 4 + 2, tab_nr (freq_table) - 1, TAB_NONE, total_obs, NULL, RC_WEIGHT); df[v] = n_cells - 1.0; freq_hmap_destroy (&freq_hash, var_get_width (var)); free (ff); } tab_submit (freq_table); } ok = !taint_has_tainted_successor (casereader_get_taint (input)); casereader_destroy (input); if (ok) { struct tab_table *stats_table = create_stats_table (cst); /* Populate the summary statistics table */ for ( v = 0 ; v < ost->n_vars ; ++v ) { const struct variable *var = ost->vars[v]; tab_text (stats_table, 1 + v, 0, TAB_CENTER, var_get_name (var)); tab_double (stats_table, 1 + v, 1, TAB_NONE, xsq[v], NULL, RC_OTHER); tab_double (stats_table, 1 + v, 2, TAB_NONE, df[v], NULL, RC_INTEGER); tab_double (stats_table, 1 + v, 3, TAB_NONE, gsl_cdf_chisq_Q (xsq[v], df[v]), NULL, RC_PVALUE); } tab_submit (stats_table); } free (xsq); free (df); } pspp-1.0.1/src/language/stats/t-test-paired.c0000644000175000017500000002643313137223525015765 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "t-test.h" #include "math/moments.h" #include "math/correlation.h" #include "data/casereader.h" #include "data/dictionary.h" #include "data/format.h" #include "data/variable.h" #include "libpspp/hmapx.h" #include "libpspp/hash-functions.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct pair_stats { int posn; double sum_of_prod; struct moments *mom0; const struct variable *var0; struct moments *mom1; const struct variable *var1; struct moments *mom_diff; }; struct paired_samp { struct hmapx hmap; }; static void paired_summary (const struct tt *tt, struct paired_samp *os); static void paired_correlations (const struct tt *tt, struct paired_samp *os); static void paired_test (const struct tt *tt, const struct paired_samp *os); void paired_run (const struct tt *tt, size_t n_pairs, vp *pairs, struct casereader *reader) { int i; struct ccase *c; struct paired_samp ps; struct casereader *r; struct hmapx_node *node; struct pair_stats *pp = NULL; hmapx_init (&ps.hmap); for (i = 0; i < n_pairs; ++i) { vp *pair = &pairs[i]; unsigned int hash; struct pair_stats *pp = xzalloc (sizeof *pp); pp->posn = i; pp->var0 = (*pair)[0]; pp->var1 = (*pair)[1]; pp->mom0 = moments_create (MOMENT_VARIANCE); pp->mom1 = moments_create (MOMENT_VARIANCE); pp->mom_diff = moments_create (MOMENT_VARIANCE); hash = hash_pointer ((*pair)[0], 0); hash = hash_pointer ((*pair)[1], hash); hmapx_insert (&ps.hmap, pp, hash); } r = casereader_clone (reader); for ( ; (c = casereader_read (r) ); case_unref (c)) { double w = dict_get_case_weight (tt->dict, c, NULL); struct hmapx_node *node; struct pair_stats *pp = NULL; HMAPX_FOR_EACH (pp, node, &ps.hmap) { const union value *val0 = case_data (c, pp->var0); const union value *val1 = case_data (c, pp->var1); if (var_is_value_missing (pp->var0, val0, tt->exclude)) continue; if (var_is_value_missing (pp->var1, val1, tt->exclude)) continue; moments_pass_one (pp->mom0, val0->f, w); moments_pass_one (pp->mom1, val1->f, w); moments_pass_one (pp->mom_diff, val0->f - val1->f, w); } } casereader_destroy (r); r = reader; for ( ; (c = casereader_read (r) ); case_unref (c)) { double w = dict_get_case_weight (tt->dict, c, NULL); struct hmapx_node *node; struct pair_stats *pp = NULL; HMAPX_FOR_EACH (pp, node, &ps.hmap) { const union value *val0 = case_data (c, pp->var0); const union value *val1 = case_data (c, pp->var1); if (var_is_value_missing (pp->var0, val0, tt->exclude)) continue; if (var_is_value_missing (pp->var1, val1, tt->exclude)) continue; moments_pass_two (pp->mom0, val0->f, w); moments_pass_two (pp->mom1, val1->f, w); moments_pass_two (pp->mom_diff, val0->f - val1->f, w); pp->sum_of_prod += val0->f * val1->f * w; } } casereader_destroy (r); paired_summary (tt, &ps); paired_correlations (tt, &ps); paired_test (tt, &ps); /* Clean up */ HMAPX_FOR_EACH (pp, node, &ps.hmap) { moments_destroy (pp->mom0); moments_destroy (pp->mom1); moments_destroy (pp->mom_diff); free (pp); } hmapx_destroy (&ps.hmap); } static void paired_summary (const struct tt *tt, struct paired_samp *os) { size_t n_pairs = hmapx_count (&os->hmap); struct hmapx_node *node; struct pair_stats *pp = NULL; const int heading_rows = 1; const int heading_cols = 2; const int cols = 4 + heading_cols; const int rows = n_pairs * 2 + heading_rows; struct tab_table *t = tab_create (cols, rows); const struct fmt_spec *wfmt = tt->wv ? var_get_print_format (tt->wv) : & F_8_0; tab_set_format (t, RC_WEIGHT, wfmt); tab_headers (t, 0, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, TAL_0, TAL_0, 0, 0, cols - 1, rows - 1); tab_box (t, -1, -1, TAL_0, TAL_1, heading_cols, 0, cols - 1, rows - 1); tab_hline (t, TAL_2, 0, cols - 1, 1); tab_title (t, _("Paired Sample Statistics")); tab_vline (t, TAL_2, heading_cols, 0, rows - 1); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("N")); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Mean")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Std. Deviation")); tab_text (t, 5, 0, TAB_CENTER | TAT_TITLE, _("S.E. Mean")); HMAPX_FOR_EACH (pp, node, &os->hmap) { int v = pp->posn; double cc, mean, sigma; tab_text_format (t, 0, v * 2 + heading_rows, TAB_LEFT, _("Pair %d"), pp->posn + 1); /* first var */ moments_calculate (pp->mom0, &cc, &mean, &sigma, NULL, NULL); tab_text (t, 1, v * 2 + heading_rows, TAB_LEFT, var_to_string (pp->var0)); tab_double (t, 3, v * 2 + heading_rows, TAB_RIGHT, cc, NULL, RC_WEIGHT); tab_double (t, 2, v * 2 + heading_rows, TAB_RIGHT, mean, NULL, RC_OTHER); tab_double (t, 4, v * 2 + heading_rows, TAB_RIGHT, sqrt (sigma), NULL, RC_OTHER); tab_double (t, 5, v * 2 + heading_rows, TAB_RIGHT, sqrt (sigma / cc), NULL, RC_OTHER); /* second var */ moments_calculate (pp->mom1, &cc, &mean, &sigma, NULL, NULL); tab_text (t, 1, v * 2 + 1 + heading_rows, TAB_LEFT, var_to_string (pp->var1)); tab_double (t, 3, v * 2 + 1 + heading_rows, TAB_RIGHT, cc, NULL, RC_WEIGHT); tab_double (t, 2, v * 2 + 1 + heading_rows, TAB_RIGHT, mean, NULL, RC_OTHER); tab_double (t, 4, v * 2 + 1 + heading_rows, TAB_RIGHT, sqrt (sigma), NULL, RC_OTHER); tab_double (t, 5, v * 2 + 1 + heading_rows, TAB_RIGHT, sqrt (sigma / cc), NULL, RC_OTHER); } tab_submit (t); } static void paired_correlations (const struct tt *tt, struct paired_samp *os) { size_t n_pairs = hmapx_count (&os->hmap); struct hmapx_node *node; struct pair_stats *pp = NULL; const int heading_rows = 1; const int heading_cols = 2; const int cols = 5; const int rows = n_pairs + heading_rows; struct tab_table *t = tab_create (cols, rows); const struct fmt_spec *wfmt = tt->wv ? var_get_print_format (tt->wv) : & F_8_0; tab_set_format (t, RC_WEIGHT, wfmt); tab_headers (t, 0, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, TAL_0, TAL_1, 0, 0, cols - 1, rows - 1); tab_hline (t, TAL_2, 0, cols - 1, 1); tab_title (t, _("Paired Samples Correlations")); tab_vline (t, TAL_2, heading_cols, 0, rows - 1); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("N")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Correlation")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Sig.")); HMAPX_FOR_EACH (pp, node, &os->hmap) { double corr; double cc0, mean0, sigma0; double cc1, mean1, sigma1; int v = pp->posn; tab_text_format (t, 0, v + heading_rows, TAB_LEFT, _("Pair %d"), pp->posn + 1); tab_text_format (t, 1, v + heading_rows, TAB_LEFT, _("%s & %s"), var_to_string (pp->var0), var_to_string (pp->var1)); moments_calculate (pp->mom0, &cc0, &mean0, &sigma0, NULL, NULL); moments_calculate (pp->mom1, &cc1, &mean1, &sigma1, NULL, NULL); /* If this fails, then we're not dealing with missing values properly */ assert (cc0 == cc1); tab_double (t, 2, v + heading_rows, TAB_RIGHT, cc0, NULL, RC_WEIGHT); corr = pp->sum_of_prod / cc0 - (mean0 * mean1); corr /= sqrt (sigma0 * sigma1); corr *= cc0 / (cc0 - 1); tab_double (t, 3, v + heading_rows, TAB_RIGHT, corr, NULL, RC_OTHER); tab_double (t, 4, v + heading_rows, TAB_RIGHT, 2.0 * significance_of_correlation (corr, cc0), NULL, RC_PVALUE); } tab_submit (t); } static void paired_test (const struct tt *tt, const struct paired_samp *os) { size_t n_pairs = hmapx_count (&os->hmap); struct hmapx_node *node; struct pair_stats *pp = NULL; const int heading_rows = 3; const int heading_cols = 2; const size_t rows = heading_rows + n_pairs; const size_t cols = 10; const struct fmt_spec *wfmt = tt->wv ? var_get_print_format (tt->wv) : & F_8_0; struct tab_table *t = tab_create (cols, rows); tab_set_format (t, RC_WEIGHT, wfmt); tab_headers (t, 0, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, TAL_0, TAL_0, 0, 0, cols - 1, rows - 1); tab_hline (t, TAL_2, 0, cols - 1, 3); tab_title (t, _("Paired Samples Test")); tab_hline (t, TAL_1, heading_cols, 6, 1); tab_vline (t, TAL_2, heading_cols, 0, rows - 1); tab_box (t, -1, -1, -1, TAL_1, heading_cols, 0, cols - 1, rows - 1); tab_joint_text (t, 2, 0, 6, 0, TAB_CENTER, _("Paired Differences")); tab_joint_text_format (t, 5, 1, 6, 1, TAB_CENTER, _("%g%% Confidence Interval of the Difference"), tt->confidence * 100.0); tab_vline (t, TAL_GAP, 6, 1, 1); tab_hline (t, TAL_1, 5, 6, 2); tab_text (t, 7, 2, TAB_CENTER | TAT_TITLE, _("t")); tab_text (t, 8, 2, TAB_CENTER | TAT_TITLE, _("df")); tab_text (t, 9, 2, TAB_CENTER | TAT_TITLE, _("Sig. (2-tailed)")); tab_text (t, 4, 2, TAB_CENTER | TAT_TITLE, _("Std. Error Mean")); tab_text (t, 3, 2, TAB_CENTER | TAT_TITLE, _("Std. Deviation")); tab_text (t, 2, 2, TAB_CENTER | TAT_TITLE, _("Mean")); tab_text (t, 5, 2, TAB_CENTER | TAT_TITLE, _("Lower")); tab_text (t, 6, 2, TAB_CENTER | TAT_TITLE, _("Upper")); HMAPX_FOR_EACH (pp, node, &os->hmap) { int v = pp->posn; double cc, mean, sigma; double df ; double tval; double p, q; double se_mean; moments_calculate (pp->mom_diff, &cc, &mean, &sigma, NULL, NULL); df = cc - 1.0; tab_text_format (t, 0, v + heading_rows, TAB_LEFT, _("Pair %d"), v + 1); tab_text_format (t, 1, v + heading_rows, TAB_LEFT, _("%s - %s"), var_to_string (pp->var0), var_to_string (pp->var1)); tval = mean * sqrt (cc / sigma); se_mean = sqrt (sigma / cc); tab_double (t, 2, v + heading_rows, TAB_RIGHT, mean, NULL, RC_OTHER); tab_double (t, 3, v + heading_rows, TAB_RIGHT, sqrt (sigma), NULL, RC_OTHER); tab_double (t, 4, v + heading_rows, TAB_RIGHT, se_mean, NULL, RC_OTHER); tab_double (t, 7, v + heading_rows, TAB_RIGHT, tval, NULL, RC_OTHER); tab_double (t, 8, v + heading_rows, TAB_RIGHT, df, NULL, RC_WEIGHT); p = gsl_cdf_tdist_P (tval, df); q = gsl_cdf_tdist_Q (tval, df); tab_double (t, 9, v + heading_rows, TAB_RIGHT, 2.0 * (tval > 0 ? q : p), NULL, RC_PVALUE); tval = gsl_cdf_tdist_Qinv ( (1.0 - tt->confidence) / 2.0, df); tab_double (t, 5, v + heading_rows, TAB_RIGHT, mean - tval * se_mean, NULL, RC_OTHER); tab_double (t, 6, v + heading_rows, TAB_RIGHT, mean + tval * se_mean, NULL, RC_OTHER); } tab_submit (t); } pspp-1.0.1/src/language/stats/roc.h0000644000175000017500000000202312470242642014060 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LANGUAGE_STATS_ROC_H #define LANGUAGE_STATS_ROC_H 1 /* These are case indexes into the cutpoint case readers for ROC output, used by roc.c and roc-chart.c. */ #define ROC_CUTPOINT 0 #define ROC_TP 1 #define ROC_FN 2 #define ROC_TN 3 #define ROC_FP 4 #endif /* language/stats/roc.h */ pspp-1.0.1/src/language/stats/t-test.h0000644000175000017500000000313312470243700014514 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef T_TEST_H #define T_TEST_H 1 #include "data/missing-values.h" struct variable; typedef const struct variable *vp[2]; enum missing_type { MISS_LISTWISE, MISS_ANALYSIS, }; enum mode { MODE_undef, MODE_PAIRED, MODE_INDEP, MODE_SINGLE, }; struct tt { size_t n_vars; const struct variable **vars; enum mode mode; enum missing_type missing_type; enum mv_class exclude; double confidence; const struct variable *wv; const struct dictionary *dict; }; struct casereader; union value; void one_sample_run (const struct tt *tt, double testval, struct casereader *reader); void paired_run (const struct tt *tt, size_t n_pairs, vp *pairs, struct casereader *reader); void indep_run (struct tt *tt, const struct variable *gvar, bool cut, const union value *gval0, const union value *gval1, struct casereader *reader); #endif pspp-1.0.1/src/language/stats/npar-summary.c0000644000175000017500000001131212523704223015721 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/npar-summary.h" #include #include "data/case.h" #include "data/casereader.h" #include "data/dictionary.h" #include "data/format.h" #include "data/variable.h" #include "math/moments.h" #include "output/tab.h" #include "gl/minmax.h" #include "gettext.h" #define _(msgid) gettext (msgid) void npar_summary_calc_descriptives (struct descriptives *desc, struct casereader *input, const struct dictionary *dict, const struct variable *const *vv, int n_vars, enum mv_class filter) { int i = 0; for (i = 0 ; i < n_vars; ++i) { double minimum = DBL_MAX; double maximum = -DBL_MAX; double var; struct moments1 *moments = moments1_create (MOMENT_VARIANCE); struct ccase *c; const struct variable *v = vv[i]; struct casereader *pass; pass = casereader_clone (input); pass = casereader_create_filter_missing (pass, &v, 1, filter, NULL, NULL); pass = casereader_create_filter_weight (pass, dict, NULL, NULL); while ((c = casereader_read (pass)) != NULL) { double val = case_num (c, v); double w = dict_get_case_weight (dict, c, NULL); minimum = MIN (minimum, val); maximum = MAX (maximum, val); moments1_add (moments, val, w); case_unref (c); } casereader_destroy (pass); moments1_calculate (moments, &desc[i].n, &desc[i].mean, &var, NULL, NULL); desc[i].std_dev = sqrt (var); moments1_destroy (moments); desc[i].min = minimum; desc[i].max = maximum; } casereader_destroy (input); } void do_summary_box (const struct descriptives *desc, const struct variable *const *vv, int n_vars) { int v; bool quartiles = false; int col; int columns = 1 ; struct tab_table *table ; if ( desc ) columns += 5; if ( quartiles ) columns += 3; table = tab_create (columns, 2 + n_vars); tab_title (table, _("Descriptive Statistics")); tab_headers (table, 1, 0, 1, 0); tab_box (table, TAL_1, TAL_1, -1, TAL_1, 0, 0, tab_nc (table) - 1, tab_nr(table) - 1 ); tab_hline (table, TAL_2, 0, tab_nc (table) -1, 2); tab_vline (table, TAL_2, 1, 0, tab_nr (table) - 1); col = 1; if ( desc ) { tab_joint_text (table, col, 0, col, 1, TAT_TITLE | TAB_CENTER, _("N")); col++; tab_joint_text (table, col, 0, col, 1, TAT_TITLE | TAB_CENTER, _("Mean")); col++; tab_joint_text (table, col, 0, col, 1, TAT_TITLE | TAB_CENTER, _("Std. Deviation")); col++; tab_joint_text (table, col, 0, col, 1, TAT_TITLE | TAB_CENTER, _("Minimum")); col++; tab_joint_text (table, col, 0, col, 1, TAT_TITLE | TAB_CENTER, _("Maximum")); col++; } if ( quartiles ) { tab_joint_text (table, col, 0, col + 2, 0, TAT_TITLE | TAB_CENTER, _("Percentiles")); tab_hline (table, TAL_1, col, col + 2, 1); tab_text (table, col, 1, TAT_TITLE | TAB_CENTER, _("25th")); col++; tab_text (table, col, 1, TAT_TITLE | TAB_CENTER, _("50th (Median)")); col++; tab_text (table, col, 1, TAT_TITLE | TAB_CENTER, _("75th")); col++; } for ( v = 0 ; v < n_vars ; ++v ) { const struct variable *var = vv[v]; const struct fmt_spec *fmt = var_get_print_format (var); tab_text (table, 0, 2 + v, 0, var_to_string (var)); col = 1; if (desc != NULL) { tab_double (table, col++, 2 + v, 0, desc[v].n, fmt, RC_OTHER); tab_double (table, col++, 2 + v, 0, desc[v].mean, fmt, RC_OTHER); tab_double (table, col++, 2 + v, 0, desc[v].std_dev, fmt, RC_OTHER); tab_double (table, col++, 2 + v, 0, desc[v].min, fmt, RC_OTHER); tab_double (table, col++, 2 + v, 0, desc[v].max, fmt, RC_OTHER); } } tab_submit (table); } pspp-1.0.1/src/language/stats/wilcoxon.h0000644000175000017500000000267012470243700015143 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !wilcoxon_h #define wilcoxon_h 1 #include #include #include "data/case.h" #include "language/stats/npar.h" struct rank_sum { double n; double sum; }; struct wilcoxon_state { struct casereader *reader; struct variable *sign; struct variable *absdiff; struct rank_sum positives; struct rank_sum negatives; double n_zeros; double tiebreaker; }; struct wilcoxon_test { struct two_sample_test parent; }; struct casereader; struct dataset; void wilcoxon_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact, double timer ); #endif pspp-1.0.1/src/language/stats/chisquare.h0000644000175000017500000000261212470243700015261 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !chisquare_h #define chisquare_h 1 #include #include #include "language/stats/npar.h" struct chisquare_test { struct one_sample_test parent; bool ranged ; /* True if this test has a range specified */ int lo; /* Lower bound of range (undefined if RANGED is false) */ int hi; /* Upper bound of range (undefined if RANGED is false) */ double *expected; int n_expected; }; struct casereader; struct dataset; void chisquare_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool, double); #endif pspp-1.0.1/src/language/stats/runs.h0000644000175000017500000000231012470243700014257 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !runs_h #define runs_h 1 #include #include #include "language/stats/npar.h" enum cp_mode { CP_MEAN, CP_MEDIAN, CP_MODE, CP_CUSTOM }; struct runs_test { struct one_sample_test parent; double cutpoint; enum cp_mode cp_mode; }; void runs_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool, double); #endif pspp-1.0.1/src/language/stats/npar.c0000644000175000017500000011276413137223525014246 00000000000000/* PSPP - a program for statistical analysis. -*-c-*- Copyright (C) 2006, 2008, 2009, 2010, 2011, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/npar.h" #include #include #include "data/case.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/settings.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "language/stats/binomial.h" #include "language/stats/chisquare.h" #include "language/stats/ks-one-sample.h" #include "language/stats/cochran.h" #include "language/stats/friedman.h" #include "language/stats/jonckheere-terpstra.h" #include "language/stats/kruskal-wallis.h" #include "language/stats/mann-whitney.h" #include "language/stats/mcnemar.h" #include "language/stats/median.h" #include "language/stats/npar-summary.h" #include "language/stats/runs.h" #include "language/stats/sign.h" #include "language/stats/wilcoxon.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/hash-functions.h" #include "libpspp/hmapx.h" #include "libpspp/message.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "libpspp/taint.h" #include "math/moments.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Settings for subcommand specifiers. */ enum missing_type { MISS_ANALYSIS, MISS_LISTWISE, }; /* Array indices for STATISTICS subcommand. */ enum { NPAR_ST_DESCRIPTIVES = 0, NPAR_ST_QUARTILES = 1, NPAR_ST_ALL = 2, NPAR_ST_count }; /* NPAR TESTS structure. */ struct cmd_npar_tests { /* Count variables indicating how many of the subcommands have been given. */ int chisquare; int cochran; int binomial; int ks_one_sample; int wilcoxon; int sign; int runs; int friedman; int kendall; int kruskal_wallis; int mann_whitney; int mcnemar; int median; int jonckheere_terpstra; int missing; int method; int statistics; /* How missing values should be treated */ long miss; /* Which statistics have been requested */ int a_statistics[NPAR_ST_count]; }; struct npar_specs { struct pool *pool; struct npar_test **test; size_t n_tests; const struct variable **vv; /* Compendium of all variables (those mentioned on ANY subcommand */ int n_vars; /* Number of variables in vv */ enum mv_class filter; /* Missing values to filter. */ bool descriptives; /* Descriptive statistics should be calculated */ bool quartiles; /* Quartiles should be calculated */ bool exact; /* Whether exact calculations have been requested */ double timer; /* Maximum time (in minutes) to wait for exact calculations */ }; /* Prototype for custom subcommands of NPAR TESTS. */ static int npar_chisquare (struct lexer *, struct dataset *, struct npar_specs *); static int npar_binomial (struct lexer *, struct dataset *, struct npar_specs *); static int npar_ks_one_sample (struct lexer *, struct dataset *, struct npar_specs *); static int npar_runs (struct lexer *, struct dataset *, struct npar_specs *); static int npar_friedman (struct lexer *, struct dataset *, struct npar_specs *); static int npar_kendall (struct lexer *, struct dataset *, struct npar_specs *); static int npar_cochran (struct lexer *, struct dataset *, struct npar_specs *); static int npar_wilcoxon (struct lexer *, struct dataset *, struct npar_specs *); static int npar_sign (struct lexer *, struct dataset *, struct npar_specs *); static int npar_kruskal_wallis (struct lexer *, struct dataset *, struct npar_specs *); static int npar_jonckheere_terpstra (struct lexer *, struct dataset *, struct npar_specs *); static int npar_mann_whitney (struct lexer *, struct dataset *, struct npar_specs *); static int npar_mcnemar (struct lexer *, struct dataset *, struct npar_specs *); static int npar_median (struct lexer *, struct dataset *, struct npar_specs *); static int npar_method (struct lexer *, struct npar_specs *); /* Command parsing functions. */ static int parse_npar_tests (struct lexer *lexer, struct dataset *ds, struct cmd_npar_tests *p, struct npar_specs *npar_specs ); static int parse_npar_tests (struct lexer *lexer, struct dataset *ds, struct cmd_npar_tests *npt, struct npar_specs *nps) { npt->chisquare = 0; npt->cochran = 0; npt->binomial = 0; npt->ks_one_sample = 0; npt->wilcoxon = 0; npt->sign = 0; npt->runs = 0; npt->friedman = 0; npt->kendall = 0; npt->kruskal_wallis = 0; npt->mann_whitney = 0; npt->mcnemar = 0; npt->median = 0; npt->jonckheere_terpstra = 0; npt->miss = MISS_ANALYSIS; npt->missing = 0; npt->method = 0; npt->statistics = 0; memset (npt->a_statistics, 0, sizeof npt->a_statistics); for (;;) { if (lex_match_id (lexer, "COCHRAN")) { npt->cochran++; switch (npar_cochran (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_id (lexer, "FRIEDMAN")) { npt->friedman++; switch (npar_friedman (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_id (lexer, "KENDALL")) { npt->kendall++; switch (npar_kendall (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_id (lexer, "RUNS")) { npt->runs++; switch (npar_runs (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_id (lexer, "CHISQUARE")) { lex_match (lexer, T_EQUALS); npt->chisquare++; switch (npar_chisquare (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; case 3: continue; default: NOT_REACHED (); } } else if (lex_match_id (lexer, "BINOMIAL")) { lex_match (lexer, T_EQUALS); npt->binomial++; switch (npar_binomial (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_phrase (lexer, "K-S") || lex_match_phrase (lexer, "KOLMOGOROV-SMIRNOV")) { lex_match (lexer, T_EQUALS); npt->ks_one_sample++; switch (npar_ks_one_sample (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_phrase (lexer, "J-T") || lex_match_phrase (lexer, "JONCKHEERE-TERPSTRA")) { lex_match (lexer, T_EQUALS); npt->jonckheere_terpstra++; switch (npar_jonckheere_terpstra (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_phrase (lexer, "K-W") || lex_match_phrase (lexer, "KRUSKAL-WALLIS")) { lex_match (lexer, T_EQUALS); npt->kruskal_wallis++; switch (npar_kruskal_wallis (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_phrase (lexer, "MCNEMAR")) { lex_match (lexer, T_EQUALS); npt->mcnemar++; switch (npar_mcnemar (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_phrase (lexer, "M-W") || lex_match_phrase (lexer, "MANN-WHITNEY")) { lex_match (lexer, T_EQUALS); npt->mann_whitney++; switch (npar_mann_whitney (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_phrase (lexer, "MEDIAN")) { npt->median++; switch (npar_median (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_id (lexer, "WILCOXON")) { lex_match (lexer, T_EQUALS); npt->wilcoxon++; switch (npar_wilcoxon (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_id (lexer, "SIGN")) { lex_match (lexer, T_EQUALS); npt->sign++; switch (npar_sign (lexer, ds, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); npt->missing++; if (npt->missing > 1) { lex_sbc_only_once ("MISSING"); goto lossage; } while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD) { if (lex_match_id (lexer, "ANALYSIS")) npt->miss = MISS_ANALYSIS; else if (lex_match_id (lexer, "LISTWISE")) npt->miss = MISS_LISTWISE; else if (lex_match_id (lexer, "INCLUDE")) nps->filter = MV_SYSTEM; else if (lex_match_id (lexer, "EXCLUDE")) nps->filter = MV_ANY; else { lex_error (lexer, NULL); goto lossage; } lex_match (lexer, T_COMMA); } } else if (lex_match_id (lexer, "METHOD")) { lex_match (lexer, T_EQUALS); npt->method++; if (npt->method > 1) { lex_sbc_only_once ("METHOD"); goto lossage; } switch (npar_method (lexer, nps)) { case 0: goto lossage; case 1: break; case 2: lex_error (lexer, NULL); goto lossage; default: NOT_REACHED (); } } else if (lex_match_id (lexer, "STATISTICS")) { lex_match (lexer, T_EQUALS); npt->statistics++; while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD) { if (lex_match_id (lexer, "DESCRIPTIVES")) npt->a_statistics[NPAR_ST_DESCRIPTIVES] = 1; else if (lex_match_id (lexer, "QUARTILES")) npt->a_statistics[NPAR_ST_QUARTILES] = 1; else if (lex_match (lexer, T_ALL)) npt->a_statistics[NPAR_ST_ALL] = 1; else { lex_error (lexer, NULL); goto lossage; } lex_match (lexer, T_COMMA); } } else if ( settings_get_syntax () != COMPATIBLE && lex_match_id (lexer, "ALGORITHM")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "COMPATIBLE")) settings_set_cmd_algorithm (COMPATIBLE); else if (lex_match_id (lexer, "ENHANCED")) settings_set_cmd_algorithm (ENHANCED); } if (!lex_match (lexer, T_SLASH)) break; } if (lex_token (lexer) != T_ENDCMD) { lex_error (lexer, _("expecting end of command")); goto lossage; } return true; lossage: return false; } static void one_sample_insert_variables (const struct npar_test *test, struct hmapx *); static void two_sample_insert_variables (const struct npar_test *test, struct hmapx *); static void n_sample_insert_variables (const struct npar_test *test, struct hmapx *); static void npar_execute (struct casereader *input, const struct npar_specs *specs, const struct dataset *ds) { int t; struct descriptives *summary_descriptives = NULL; for ( t = 0 ; t < specs->n_tests; ++t ) { const struct npar_test *test = specs->test[t]; if ( NULL == test->execute ) { msg (SW, _("%s subcommand not currently implemented."), "NPAR"); continue; } test->execute (ds, casereader_clone (input), specs->filter, test, specs->exact, specs->timer); } if (specs->descriptives && specs->n_vars > 0) { summary_descriptives = xnmalloc (sizeof (*summary_descriptives), specs->n_vars); npar_summary_calc_descriptives (summary_descriptives, casereader_clone (input), dataset_dict (ds), specs->vv, specs->n_vars, specs->filter); } if ( (specs->descriptives || specs->quartiles) && !taint_has_tainted_successor (casereader_get_taint (input)) ) do_summary_box (summary_descriptives, specs->vv, specs->n_vars ); free (summary_descriptives); casereader_destroy (input); } int cmd_npar_tests (struct lexer *lexer, struct dataset *ds) { struct cmd_npar_tests cmd; bool ok; int i; struct npar_specs npar_specs = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; struct casegrouper *grouper; struct casereader *input, *group; struct hmapx var_map = HMAPX_INITIALIZER (var_map); npar_specs.pool = pool_create (); npar_specs.filter = MV_ANY; npar_specs.n_vars = -1; npar_specs.vv = NULL; if ( ! parse_npar_tests (lexer, ds, &cmd, &npar_specs) ) { pool_destroy (npar_specs.pool); return CMD_FAILURE; } for (i = 0; i < npar_specs.n_tests; ++i ) { const struct npar_test *test = npar_specs.test[i]; test->insert_variables (test, &var_map); } { struct hmapx_node *node; struct variable *var; npar_specs.n_vars = 0; HMAPX_FOR_EACH (var, node, &var_map) { npar_specs.n_vars ++; npar_specs.vv = pool_nrealloc (npar_specs.pool, npar_specs.vv, npar_specs.n_vars, sizeof (*npar_specs.vv)); npar_specs.vv[npar_specs.n_vars - 1] = var; } } sort (npar_specs.vv, npar_specs.n_vars, sizeof (*npar_specs.vv), compare_var_ptrs_by_name, NULL); if ( cmd.statistics ) { int i; for ( i = 0 ; i < NPAR_ST_count; ++i ) { if ( cmd.a_statistics[i] ) { switch ( i ) { case NPAR_ST_DESCRIPTIVES: npar_specs.descriptives = true; break; case NPAR_ST_QUARTILES: npar_specs.quartiles = true; break; case NPAR_ST_ALL: npar_specs.quartiles = true; npar_specs.descriptives = true; break; default: NOT_REACHED (); }; } } } input = proc_open (ds); if ( cmd.miss == MISS_LISTWISE ) { input = casereader_create_filter_missing (input, npar_specs.vv, npar_specs.n_vars, npar_specs.filter, NULL, NULL); } grouper = casegrouper_create_splits (input, dataset_dict (ds)); while (casegrouper_get_next_group (grouper, &group)) npar_execute (group, &npar_specs, ds); ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; pool_destroy (npar_specs.pool); hmapx_destroy (&var_map); return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; } static int npar_runs (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct runs_test *rt = pool_alloc (specs->pool, sizeof (*rt)); struct one_sample_test *tp = &rt->parent; struct npar_test *nt = &tp->parent; nt->execute = runs_execute; nt->insert_variables = one_sample_insert_variables; if ( lex_force_match (lexer, T_LPAREN) ) { if ( lex_match_id (lexer, "MEAN")) { rt->cp_mode = CP_MEAN; } else if (lex_match_id (lexer, "MEDIAN")) { rt->cp_mode = CP_MEDIAN; } else if (lex_match_id (lexer, "MODE")) { rt->cp_mode = CP_MODE; } else if (lex_is_number (lexer)) { rt->cutpoint = lex_number (lexer); rt->cp_mode = CP_CUSTOM; lex_get (lexer); } else { lex_error (lexer, _("Expecting %s, %s, %s or a number."), "MEAN", "MEDIAN", "MODE"); return 0; } if (! lex_force_match (lexer, T_RPAREN)) return 2; if (! lex_force_match (lexer, T_EQUALS)) return 2; if (!parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds), &tp->vars, &tp->n_vars, PV_NO_SCRATCH | PV_NO_DUPLICATE | PV_NUMERIC)) { return 2; } } specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static int npar_friedman (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct friedman_test *ft = pool_alloc (specs->pool, sizeof (*ft)); struct one_sample_test *ost = &ft->parent; struct npar_test *nt = &ost->parent; ft->kendalls_w = false; nt->execute = friedman_execute; nt->insert_variables = one_sample_insert_variables; lex_match (lexer, T_EQUALS); if (!parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds), &ost->vars, &ost->n_vars, PV_NO_SCRATCH | PV_NO_DUPLICATE | PV_NUMERIC)) { return 2; } specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static int npar_kendall (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct friedman_test *kt = pool_alloc (specs->pool, sizeof (*kt)); struct one_sample_test *ost = &kt->parent; struct npar_test *nt = &ost->parent; kt->kendalls_w = true; nt->execute = friedman_execute; nt->insert_variables = one_sample_insert_variables; lex_match (lexer, T_EQUALS); if (!parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds), &ost->vars, &ost->n_vars, PV_NO_SCRATCH | PV_NO_DUPLICATE | PV_NUMERIC)) { return 2; } specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static int npar_cochran (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct one_sample_test *ft = pool_alloc (specs->pool, sizeof (*ft)); struct npar_test *nt = &ft->parent; nt->execute = cochran_execute; nt->insert_variables = one_sample_insert_variables; lex_match (lexer, T_EQUALS); if (!parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds), &ft->vars, &ft->n_vars, PV_NO_SCRATCH | PV_NO_DUPLICATE | PV_NUMERIC)) { return 2; } specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static int npar_chisquare (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct chisquare_test *cstp = pool_alloc (specs->pool, sizeof (*cstp)); struct one_sample_test *tp = &cstp->parent; struct npar_test *nt = &tp->parent; int retval = 1; nt->execute = chisquare_execute; nt->insert_variables = one_sample_insert_variables; if (!parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds), &tp->vars, &tp->n_vars, PV_NO_SCRATCH | PV_NO_DUPLICATE)) { return 2; } cstp->ranged = false; if ( lex_match (lexer, T_LPAREN)) { cstp->ranged = true; if ( ! lex_force_num (lexer)) return 0; cstp->lo = lex_number (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_COMMA)) return 0; if (! lex_force_num (lexer) ) return 0; cstp->hi = lex_number (lexer); if ( cstp->lo >= cstp->hi ) { msg (ME, _("The specified value of HI (%d) is " "lower than the specified value of LO (%d)"), cstp->hi, cstp->lo); return 0; } lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) return 0; } cstp->n_expected = 0; cstp->expected = NULL; if (lex_match_phrase (lexer, "/EXPECTED")) { if (! lex_force_match (lexer, T_EQUALS)) return 0; if (! lex_match_id (lexer, "EQUAL") ) { double f; int n; while ( lex_is_number (lexer) ) { int i; n = 1; f = lex_number (lexer); lex_get (lexer); if ( lex_match (lexer, T_ASTERISK)) { n = f; if (!lex_force_num (lexer)) return 0; f = lex_number (lexer); lex_get (lexer); } lex_match (lexer, T_COMMA); cstp->n_expected += n; cstp->expected = pool_realloc (specs->pool, cstp->expected, sizeof (double) * cstp->n_expected); for ( i = cstp->n_expected - n ; i < cstp->n_expected; ++i ) cstp->expected[i] = f; } } } if ( cstp->ranged && cstp->n_expected > 0 && cstp->n_expected != cstp->hi - cstp->lo + 1 ) { msg (ME, _("%d expected values were given, but the specified " "range (%d-%d) requires exactly %d values."), cstp->n_expected, cstp->lo, cstp->hi, cstp->hi - cstp->lo +1); return 0; } specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return retval; } static int npar_binomial (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct binomial_test *btp = pool_alloc (specs->pool, sizeof (*btp)); struct one_sample_test *tp = &btp->parent; struct npar_test *nt = &tp->parent; bool equals = false; nt->execute = binomial_execute; nt->insert_variables = one_sample_insert_variables; btp->category1 = btp->category2 = btp->cutpoint = SYSMIS; btp->p = 0.5; if ( lex_match (lexer, T_LPAREN) ) { equals = false; if ( lex_force_num (lexer) ) { btp->p = lex_number (lexer); lex_get (lexer); if (!lex_force_match (lexer, T_RPAREN)) return 0; } else return 0; } else equals = true; if (!equals) if (!lex_force_match (lexer, T_EQUALS)) return 0; { if (parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds), &tp->vars, &tp->n_vars, PV_NUMERIC | PV_NO_SCRATCH | PV_NO_DUPLICATE) ) { if (lex_match (lexer, T_LPAREN)) { if (! lex_force_num (lexer)) return 2; btp->category1 = lex_number (lexer); lex_get (lexer); if ( lex_match (lexer, T_COMMA)) { if ( ! lex_force_num (lexer) ) return 2; btp->category2 = lex_number (lexer); lex_get (lexer); } else { btp->cutpoint = btp->category1; } if (! lex_force_match (lexer, T_RPAREN)) return 0; } } else { return 2; } } specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static void ks_one_sample_parse_params (struct lexer *lexer, struct ks_one_sample_test *kst, int params) { assert (params == 1 || params == 2); if (lex_is_number (lexer)) { kst->p[0] = lex_number (lexer); lex_get (lexer); if ( params == 2) { lex_match (lexer, T_COMMA); if (lex_force_num (lexer)) { kst->p[1] = lex_number (lexer); lex_get (lexer); } } } } static int npar_ks_one_sample (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct ks_one_sample_test *kst = pool_alloc (specs->pool, sizeof (*kst)); struct one_sample_test *tp = &kst->parent; struct npar_test *nt = &tp->parent; nt->execute = ks_one_sample_execute; nt->insert_variables = one_sample_insert_variables; kst->p[0] = kst->p[1] = SYSMIS; if (! lex_force_match (lexer, T_LPAREN)) return 2; if (lex_match_id (lexer, "NORMAL")) { kst->dist = KS_NORMAL; ks_one_sample_parse_params (lexer, kst, 2); } else if (lex_match_id (lexer, "POISSON")) { kst->dist = KS_POISSON; ks_one_sample_parse_params (lexer, kst, 1); } else if (lex_match_id (lexer, "UNIFORM")) { kst->dist = KS_UNIFORM; ks_one_sample_parse_params (lexer, kst, 2); } else if (lex_match_id (lexer, "EXPONENTIAL")) { kst->dist = KS_EXPONENTIAL; ks_one_sample_parse_params (lexer, kst, 1); } else return 2; if (! lex_force_match (lexer, T_RPAREN)) return 2; lex_match (lexer, T_EQUALS); if (! parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds), &tp->vars, &tp->n_vars, PV_NUMERIC | PV_NO_SCRATCH | PV_NO_DUPLICATE) ) return 2; specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static bool parse_two_sample_related_test (struct lexer *lexer, const struct dictionary *dict, struct two_sample_test *test_parameters, struct pool *pool) { int n = 0; bool paired = false; bool with = false; const struct variable **vlist1; size_t n_vlist1; const struct variable **vlist2; size_t n_vlist2; test_parameters->parent.insert_variables = two_sample_insert_variables; if (!parse_variables_const_pool (lexer, pool, dict, &vlist1, &n_vlist1, PV_NUMERIC | PV_NO_SCRATCH | PV_DUPLICATE) ) return false; if ( lex_match (lexer, T_WITH)) { with = true; if ( !parse_variables_const_pool (lexer, pool, dict, &vlist2, &n_vlist2, PV_NUMERIC | PV_NO_SCRATCH | PV_DUPLICATE) ) return false; paired = (lex_match (lexer, T_LPAREN) && lex_match_id (lexer, "PAIRED") && lex_match (lexer, T_RPAREN)); } if ( with ) { if (paired) { if ( n_vlist1 != n_vlist2) { msg (SE, _("PAIRED was specified but the number of variables " "preceding WITH (%zu) did not match the number " "following (%zu)."), n_vlist1, n_vlist2); return false; } test_parameters->n_pairs = n_vlist1 ; } else { test_parameters->n_pairs = n_vlist1 * n_vlist2; } } else { test_parameters->n_pairs = (n_vlist1 * (n_vlist1 - 1)) / 2 ; } test_parameters->pairs = pool_alloc (pool, sizeof ( variable_pair) * test_parameters->n_pairs); if ( with ) { if (paired) { int i; assert (n_vlist1 == n_vlist2); for ( i = 0 ; i < n_vlist1; ++i ) { test_parameters->pairs[n][0] = vlist1[i]; test_parameters->pairs[n][1] = vlist2[i]; n++; } } else { int i,j; for ( i = 0 ; i < n_vlist1; ++i ) { for ( j = 0 ; j < n_vlist2; ++j ) { test_parameters->pairs[n][0] = vlist1[i]; test_parameters->pairs[n][1] = vlist2[j]; n++; } } } } else { int i,j; for ( i = 0 ; i < n_vlist1 - 1; ++i ) { for ( j = i + 1 ; j < n_vlist1; ++j ) { assert ( n < test_parameters->n_pairs); test_parameters->pairs[n][0] = vlist1[i]; test_parameters->pairs[n][1] = vlist1[j]; n++; } } } assert ( n == test_parameters->n_pairs); return true; } static bool parse_n_sample_related_test (struct lexer *lexer, const struct dictionary *dict, struct n_sample_test *nst, struct pool *pool ) { if (!parse_variables_const_pool (lexer, pool, dict, &nst->vars, &nst->n_vars, PV_NUMERIC | PV_NO_SCRATCH | PV_NO_DUPLICATE) ) return false; if ( ! lex_force_match (lexer, T_BY)) return false; nst->indep_var = parse_variable_const (lexer, dict); if (!nst->indep_var) return false; if ( ! lex_force_match (lexer, T_LPAREN)) return false; value_init (&nst->val1, var_get_width (nst->indep_var)); if ( ! parse_value (lexer, &nst->val1, nst->indep_var)) { value_destroy (&nst->val1, var_get_width (nst->indep_var)); return false; } lex_match (lexer, T_COMMA); value_init (&nst->val2, var_get_width (nst->indep_var)); if ( ! parse_value (lexer, &nst->val2, nst->indep_var)) { value_destroy (&nst->val2, var_get_width (nst->indep_var)); return false; } if ( ! lex_force_match (lexer, T_RPAREN)) return false; return true; } static int npar_wilcoxon (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs ) { struct two_sample_test *tp = pool_alloc (specs->pool, sizeof (*tp)); struct npar_test *nt = &tp->parent; nt->execute = wilcoxon_execute; if (!parse_two_sample_related_test (lexer, dataset_dict (ds), tp, specs->pool) ) return 0; specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static int npar_mann_whitney (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs ) { struct n_sample_test *tp = pool_alloc (specs->pool, sizeof (*tp)); struct npar_test *nt = &tp->parent; nt->insert_variables = n_sample_insert_variables; nt->execute = mann_whitney_execute; if (!parse_n_sample_related_test (lexer, dataset_dict (ds), tp, specs->pool) ) return 0; specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static int npar_median (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct median_test *mt = pool_alloc (specs->pool, sizeof (*mt)); struct n_sample_test *tp = &mt->parent; struct npar_test *nt = &tp->parent; mt->median = SYSMIS; if ( lex_match (lexer, T_LPAREN) && lex_force_num (lexer)) { mt->median = lex_number (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) return 0; } lex_match (lexer, T_EQUALS); nt->insert_variables = n_sample_insert_variables; nt->execute = median_execute; if (!parse_n_sample_related_test (lexer, dataset_dict (ds), tp, specs->pool) ) return 0; specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static int npar_sign (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct two_sample_test *tp = pool_alloc (specs->pool, sizeof (*tp)); struct npar_test *nt = &tp->parent; nt->execute = sign_execute; if (!parse_two_sample_related_test (lexer, dataset_dict (ds), tp, specs->pool) ) return 0; specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static int npar_mcnemar (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct two_sample_test *tp = pool_alloc (specs->pool, sizeof (*tp)); struct npar_test *nt = &tp->parent; nt->execute = mcnemar_execute; if (!parse_two_sample_related_test (lexer, dataset_dict (ds), tp, specs->pool) ) return 0; specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static int npar_jonckheere_terpstra (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct n_sample_test *tp = pool_alloc (specs->pool, sizeof (*tp)); struct npar_test *nt = &tp->parent; nt->insert_variables = n_sample_insert_variables; nt->execute = jonckheere_terpstra_execute; if (!parse_n_sample_related_test (lexer, dataset_dict (ds), tp, specs->pool) ) return 0; specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static int npar_kruskal_wallis (struct lexer *lexer, struct dataset *ds, struct npar_specs *specs) { struct n_sample_test *tp = pool_alloc (specs->pool, sizeof (*tp)); struct npar_test *nt = &tp->parent; nt->insert_variables = n_sample_insert_variables; nt->execute = kruskal_wallis_execute; if (!parse_n_sample_related_test (lexer, dataset_dict (ds), tp, specs->pool) ) return 0; specs->n_tests++; specs->test = pool_realloc (specs->pool, specs->test, sizeof (*specs->test) * specs->n_tests); specs->test[specs->n_tests - 1] = nt; return 1; } static void insert_variable_into_map (struct hmapx *var_map, const struct variable *var) { size_t hash = hash_pointer (var, 0); struct hmapx_node *node; const struct variable *v = NULL; HMAPX_FOR_EACH_WITH_HASH (v, node, hash, var_map) { if ( v == var) return ; } hmapx_insert (var_map, CONST_CAST (struct variable *, var), hash); } /* Insert the variables for TEST into VAR_MAP */ static void one_sample_insert_variables (const struct npar_test *test, struct hmapx *var_map) { int i; const struct one_sample_test *ost = UP_CAST (test, const struct one_sample_test, parent); for ( i = 0 ; i < ost->n_vars ; ++i ) insert_variable_into_map (var_map, ost->vars[i]); } static void two_sample_insert_variables (const struct npar_test *test, struct hmapx *var_map) { int i; const struct two_sample_test *tst = UP_CAST (test, const struct two_sample_test, parent); for ( i = 0 ; i < tst->n_pairs ; ++i ) { variable_pair *pair = &tst->pairs[i]; insert_variable_into_map (var_map, (*pair)[0]); insert_variable_into_map (var_map, (*pair)[1]); } } static void n_sample_insert_variables (const struct npar_test *test, struct hmapx *var_map) { int i; const struct n_sample_test *tst = UP_CAST (test, const struct n_sample_test, parent); for ( i = 0 ; i < tst->n_vars ; ++i ) insert_variable_into_map (var_map, tst->vars[i]); insert_variable_into_map (var_map, tst->indep_var); } static int npar_method (struct lexer *lexer, struct npar_specs *specs) { if ( lex_match_id (lexer, "EXACT") ) { specs->exact = true; specs->timer = 0.0; if (lex_match_id (lexer, "TIMER")) { specs->timer = 5.0; if ( lex_match (lexer, T_LPAREN)) { if (lex_force_num (lexer) ) { specs->timer = lex_number (lexer); lex_get (lexer); } if (lex_force_match (lexer, T_RPAREN)) return 0; } } } return 1; } pspp-1.0.1/src/language/stats/graph.c0000644000175000017500000005422013137223525014377 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2012, 2013, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* * This module implements the graph command */ #include #include #include "gl/xalloc.h" #include #include "libpspp/assertion.h" #include "libpspp/message.h" #include "libpspp/pool.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/caseproto.h" #include "data/subcase.h" #include "data/format.h" #include "math/chart-geometry.h" #include "math/histogram.h" #include "math/moments.h" #include "math/sort.h" #include "math/order-stats.h" #include "output/charts/plot-hist.h" #include "output/charts/scatterplot.h" #include "output/charts/barchart.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "language/stats/freq.h" #include "language/stats/chart-category.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid enum chart_type { CT_NONE, CT_BAR, CT_LINE, CT_PIE, CT_ERRORBAR, CT_HILO, CT_HISTOGRAM, CT_SCATTERPLOT, CT_PARETO }; enum scatter_type { ST_BIVARIATE, ST_OVERLAY, ST_MATRIX, ST_XYZ }; enum bar_type { CBT_SIMPLE, CBT_GROUPED, CBT_STACKED, CBT_RANGE }; /* Variable index for histogram case */ enum { HG_IDX_X, HG_IDX_WT }; struct exploratory_stats { double missing; double non_missing; struct moments *mom; double minimum; double maximum; /* Total weight */ double cc; /* The minimum weight */ double cmin; }; struct graph { struct pool *pool; size_t n_dep_vars; const struct variable **dep_vars; struct exploratory_stats *es; enum mv_class dep_excl; enum mv_class fctr_excl; const struct dictionary *dict; bool missing_pw; /* ------------ Graph ---------------- */ bool normal; /* For histograms, draw the normal curve */ enum chart_type chart_type; enum scatter_type scatter_type; enum bar_type bar_type; const struct variable *by_var[2]; size_t n_by_vars; struct subcase ordering; /* Ordering for aggregation */ int agr; /* Index into ag_func */ /* A caseproto that contains the plot data */ struct caseproto *gr_proto; }; static double calc_mom1 (double acc, double x, double w) { return acc + x * w; } static double calc_mom0 (double acc, double x UNUSED, double w) { return acc + w; } static double pre_low_extreme (void) { return -DBL_MAX; } static double calc_max (double acc, double x, double w UNUSED) { return (acc > x) ? acc : x; } static double pre_high_extreme (void) { return DBL_MAX; } static double calc_min (double acc, double x, double w UNUSED) { return (acc < x) ? acc : x; } static double post_normalise (double acc, double cc) { return acc / cc; } static double post_percentage (double acc, double ccc) { return acc / ccc * 100.0; } const struct ag_func ag_func[] = { {"COUNT", N_("Count"), 0, 0, NULL, calc_mom0, 0, 0}, {"PCT", N_("Percentage"), 0, 0, NULL, calc_mom0, 0, post_percentage}, {"CUFREQ", N_("Cumulative Count"), 0, 1, NULL, calc_mom0, 0, 0}, {"CUPCT", N_("Cumulative Percent"), 0, 1, NULL, calc_mom0, 0, post_percentage}, {"MEAN", N_("Mean"), 1, 0, NULL, calc_mom1, post_normalise, 0}, {"SUM", N_("Sum"), 1, 0, NULL, calc_mom1, 0, 0}, {"MAXIMUM", N_("Maximum"), 1, 0, pre_low_extreme, calc_max, 0, 0}, {"MINIMUM", N_("Minimum"), 1, 0, pre_high_extreme, calc_min, 0, 0}, }; const int N_AG_FUNCS = sizeof (ag_func) / sizeof (ag_func[0]); static bool parse_function (struct lexer *lexer, struct graph *graph) { int i; for (i = 0 ; i < N_AG_FUNCS; ++i) { if (lex_match_id (lexer, ag_func[i].name)) { graph->agr = i; break; } } if (i == N_AG_FUNCS) { goto error; } graph->n_dep_vars = ag_func[i].arity; if (ag_func[i].arity > 0) { int v; if (!lex_force_match (lexer, T_LPAREN)) goto error; graph->dep_vars = xzalloc (sizeof (graph->dep_vars) * graph->n_dep_vars); for (v = 0; v < ag_func[i].arity; ++v) { graph->dep_vars[v] = parse_variable (lexer, graph->dict); if (! graph->dep_vars[v]) goto error; } if (!lex_force_match (lexer, T_RPAREN)) goto error; } if (!lex_force_match (lexer, T_BY)) goto error; graph->by_var[0] = parse_variable (lexer, graph->dict); if (!graph->by_var[0]) { goto error; } subcase_add_var (&graph->ordering, graph->by_var[0], SC_ASCEND); graph->n_by_vars++; if (lex_match (lexer, T_BY)) { graph->by_var[1] = parse_variable (lexer, graph->dict); if (!graph->by_var[1]) { goto error; } subcase_add_var (&graph->ordering, graph->by_var[1], SC_ASCEND); graph->n_by_vars++; } return true; error: lex_error (lexer, NULL); return false; } static void show_scatterplot (const struct graph *cmd, struct casereader *input) { struct string title; struct scatterplot_chart *scatterplot; bool byvar_overflow = false; ds_init_empty (&title); if (cmd->n_by_vars > 0) { ds_put_format (&title, _("%s vs. %s by %s"), var_to_string (cmd->dep_vars[1]), var_to_string (cmd->dep_vars[0]), var_to_string (cmd->by_var[0])); } else { ds_put_format (&title, _("%s vs. %s"), var_to_string (cmd->dep_vars[1]), var_to_string (cmd->dep_vars[0])); } scatterplot = scatterplot_create (input, var_to_string(cmd->dep_vars[0]), var_to_string(cmd->dep_vars[1]), (cmd->n_by_vars > 0) ? cmd->by_var[0] : NULL, &byvar_overflow, ds_cstr (&title), cmd->es[0].minimum, cmd->es[0].maximum, cmd->es[1].minimum, cmd->es[1].maximum); scatterplot_chart_submit (scatterplot); ds_destroy (&title); if (byvar_overflow) { msg (MW, _("Maximum number of scatterplot categories reached. " "Your BY variable has too many distinct values. " "The coloring of the plot will not be correct.")); } } static void show_histogr (const struct graph *cmd, struct casereader *input) { struct histogram *histogram; struct ccase *c; if (cmd->es[0].cc <= 0) { casereader_destroy (input); return; } { /* Sturges Rule */ double bin_width = fabs (cmd->es[0].minimum - cmd->es[0].maximum) / (1 + log2 (cmd->es[0].cc)) ; histogram = histogram_create (bin_width, cmd->es[0].minimum, cmd->es[0].maximum); } if (NULL == histogram) { casereader_destroy (input); return; } for (;(c = casereader_read (input)) != NULL; case_unref (c)) { const double x = case_data_idx (c, HG_IDX_X)->f; const double weight = case_data_idx (c, HG_IDX_WT)->f; moments_pass_two (cmd->es[0].mom, x, weight); histogram_add (histogram, x, weight); } casereader_destroy (input); { double n, mean, var; struct string label; ds_init_cstr (&label, var_to_string (cmd->dep_vars[0])); moments_calculate (cmd->es[0].mom, &n, &mean, &var, NULL, NULL); chart_item_submit ( histogram_chart_create (histogram->gsl_hist, ds_cstr (&label), n, mean, sqrt (var), cmd->normal)); statistic_destroy (&histogram->parent); ds_destroy (&label); } } static void cleanup_exploratory_stats (struct graph *cmd) { int v; for (v = 0; v < cmd->n_dep_vars; ++v) { moments_destroy (cmd->es[v].mom); } } static void run_barchart (struct graph *cmd, struct casereader *input) { struct casegrouper *grouper; struct casereader *group; double ccc = 0.0; if ( cmd->missing_pw == false) input = casereader_create_filter_missing (input, cmd->dep_vars, cmd->n_dep_vars, cmd->dep_excl, NULL, NULL); input = sort_execute (input, &cmd->ordering); struct freq **freqs = NULL; int n_freqs = 0; for (grouper = casegrouper_create_vars (input, cmd->by_var, cmd->n_by_vars); casegrouper_get_next_group (grouper, &group); casereader_destroy (group)) { int v; struct ccase *c = casereader_peek (group, 0); /* Deal with missing values in the categorical variables */ for (v = 0; v < cmd->n_by_vars; ++v) { if (var_is_value_missing (cmd->by_var[v], case_data (c, cmd->by_var[v]), cmd->fctr_excl) ) break; } if (v < cmd->n_by_vars) { case_unref (c); continue; } freqs = xrealloc (freqs, sizeof (*freqs) * ++n_freqs); freqs[n_freqs - 1] = xzalloc (sizeof (**freqs) + sizeof (union value) * (cmd->n_by_vars - 1) ); if (ag_func[cmd->agr].cumulative && n_freqs >= 2) freqs[n_freqs - 1]->count = freqs[n_freqs - 2]->count; else freqs[n_freqs - 1]->count = 0; if (ag_func[cmd->agr].pre) freqs[n_freqs - 1]->count = ag_func[cmd->agr].pre(); for (v = 0; v < cmd->n_by_vars; ++v) { value_clone (&freqs[n_freqs - 1]->values[v], case_data (c, cmd->by_var[v]), var_get_width (cmd->by_var[v]) ); } case_unref (c); double cc = 0; for (;(c = casereader_read (group)) != NULL; case_unref (c)) { const double weight = dict_get_case_weight (cmd->dict,c,NULL); const double x = (cmd->n_dep_vars > 0) ? case_data (c, cmd->dep_vars[0])->f : SYSMIS; cc += weight; freqs[n_freqs - 1]->count = ag_func[cmd->agr].calc (freqs[n_freqs - 1]->count, x, weight); } if (ag_func[cmd->agr].post) freqs[n_freqs - 1]->count = ag_func[cmd->agr].post (freqs[n_freqs - 1]->count, cc); ccc += cc; } casegrouper_destroy (grouper); for (int i = 0; i < n_freqs; ++i) { if (ag_func[cmd->agr].ppost) freqs[i]->count = ag_func[cmd->agr].ppost (freqs[i]->count, ccc); } { struct string label; ds_init_empty (&label); if (cmd->n_dep_vars > 0) ds_put_format (&label, _("%s of %s"), ag_func[cmd->agr].description, var_get_name (cmd->dep_vars[0])); else ds_put_cstr (&label, ag_func[cmd->agr].description); chart_item_submit (barchart_create (cmd->by_var, cmd->n_by_vars, ds_cstr (&label), false, freqs, n_freqs)); ds_destroy (&label); } for (int i = 0; i < n_freqs; ++i) free (freqs[i]); free (freqs); } static void run_graph (struct graph *cmd, struct casereader *input) { struct ccase *c; struct casereader *reader; struct casewriter *writer; cmd->es = pool_calloc (cmd->pool,cmd->n_dep_vars,sizeof(struct exploratory_stats)); for(int v=0;vn_dep_vars;v++) { cmd->es[v].mom = moments_create (MOMENT_KURTOSIS); cmd->es[v].cmin = DBL_MAX; cmd->es[v].maximum = -DBL_MAX; cmd->es[v].minimum = DBL_MAX; } /* Always remove cases listwise. This is correct for */ /* the histogram because there is only one variable */ /* and a simple bivariate scatterplot */ /* if ( cmd->missing_pw == false) */ input = casereader_create_filter_missing (input, cmd->dep_vars, cmd->n_dep_vars, cmd->dep_excl, NULL, NULL); writer = autopaging_writer_create (cmd->gr_proto); /* The case data is copied to a new writer */ /* The setup of the case depends on the Charttype */ /* For Scatterplot x is assumed in dep_vars[0] */ /* y is assumed in dep_vars[1] */ /* For Histogram x is assumed in dep_vars[0] */ assert(SP_IDX_X == 0 && SP_IDX_Y == 1 && HG_IDX_X == 0); for (;(c = casereader_read (input)) != NULL; case_unref (c)) { struct ccase *outcase = case_create (cmd->gr_proto); const double weight = dict_get_case_weight (cmd->dict,c,NULL); if (cmd->chart_type == CT_HISTOGRAM) case_data_rw_idx (outcase, HG_IDX_WT)->f = weight; if (cmd->chart_type == CT_SCATTERPLOT && cmd->n_by_vars > 0) value_copy (case_data_rw_idx (outcase, SP_IDX_BY), case_data (c, cmd->by_var[0]), var_get_width (cmd->by_var[0])); for(int v=0;vn_dep_vars;v++) { const struct variable *var = cmd->dep_vars[v]; const double x = case_data (c, var)->f; if (var_is_value_missing (var, case_data (c, var), cmd->dep_excl)) { cmd->es[v].missing += weight; continue; } /* Magically v value fits to SP_IDX_X, SP_IDX_Y, HG_IDX_X */ case_data_rw_idx (outcase, v)->f = x; if (x > cmd->es[v].maximum) cmd->es[v].maximum = x; if (x < cmd->es[v].minimum) cmd->es[v].minimum = x; cmd->es[v].non_missing += weight; moments_pass_one (cmd->es[v].mom, x, weight); cmd->es[v].cc += weight; if (cmd->es[v].cmin > weight) cmd->es[v].cmin = weight; } casewriter_write (writer,outcase); } reader = casewriter_make_reader (writer); switch (cmd->chart_type) { case CT_HISTOGRAM: show_histogr (cmd,reader); break; case CT_SCATTERPLOT: show_scatterplot (cmd,reader); break; default: NOT_REACHED (); break; }; casereader_destroy (input); cleanup_exploratory_stats (cmd); } int cmd_graph (struct lexer *lexer, struct dataset *ds) { struct graph graph; graph.missing_pw = false; graph.pool = pool_create (); graph.dep_excl = MV_ANY; graph.fctr_excl = MV_ANY; graph.dict = dataset_dict (ds); graph.dep_vars = NULL; graph.chart_type = CT_NONE; graph.scatter_type = ST_BIVARIATE; graph.n_by_vars = 0; graph.gr_proto = caseproto_create (); subcase_init_empty (&graph.ordering); while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "HISTOGRAM")) { if (graph.chart_type != CT_NONE) { lex_error (lexer, _("Only one chart type is allowed.")); goto error; } graph.normal = false; if (lex_match (lexer, T_LPAREN)) { if (!lex_force_match_id (lexer, "NORMAL")) goto error; if (!lex_force_match (lexer, T_RPAREN)) goto error; graph.normal = true; } if (!lex_force_match (lexer, T_EQUALS)) goto error; graph.chart_type = CT_HISTOGRAM; if (!parse_variables_const (lexer, graph.dict, &graph.dep_vars, &graph.n_dep_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; if (graph.n_dep_vars > 1) { lex_error (lexer, _("Only one variable is allowed.")); goto error; } } else if (lex_match_id (lexer, "BAR")) { if (graph.chart_type != CT_NONE) { lex_error (lexer, _("Only one chart type is allowed.")); goto error; } graph.chart_type = CT_BAR; graph.bar_type = CBT_SIMPLE; if (lex_match (lexer, T_LPAREN)) { if (lex_match_id (lexer, "SIMPLE")) { /* This is the default anyway */ } else if (lex_match_id (lexer, "GROUPED")) { graph.bar_type = CBT_GROUPED; goto error; } else if (lex_match_id (lexer, "STACKED")) { graph.bar_type = CBT_STACKED; lex_error (lexer, _("%s is not yet implemented."), "STACKED"); goto error; } else if (lex_match_id (lexer, "RANGE")) { graph.bar_type = CBT_RANGE; lex_error (lexer, _("%s is not yet implemented."), "RANGE"); goto error; } else { lex_error (lexer, NULL); goto error; } if (!lex_force_match (lexer, T_RPAREN)) goto error; } if (!lex_force_match (lexer, T_EQUALS)) goto error; if (! parse_function (lexer, &graph)) goto error; } else if (lex_match_id (lexer, "SCATTERPLOT")) { if (graph.chart_type != CT_NONE) { lex_error (lexer, _("Only one chart type is allowed.")); goto error; } graph.chart_type = CT_SCATTERPLOT; if (lex_match (lexer, T_LPAREN)) { if (lex_match_id (lexer, "BIVARIATE")) { /* This is the default anyway */ } else if (lex_match_id (lexer, "OVERLAY")) { lex_error (lexer, _("%s is not yet implemented."),"OVERLAY"); goto error; } else if (lex_match_id (lexer, "MATRIX")) { lex_error (lexer, _("%s is not yet implemented."),"MATRIX"); goto error; } else if (lex_match_id (lexer, "XYZ")) { lex_error(lexer, _("%s is not yet implemented."),"XYZ"); goto error; } else { lex_error_expecting (lexer, "BIVARIATE", NULL); goto error; } if (!lex_force_match (lexer, T_RPAREN)) goto error; } if (!lex_force_match (lexer, T_EQUALS)) goto error; if (!parse_variables_const (lexer, graph.dict, &graph.dep_vars, &graph.n_dep_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; if (graph.scatter_type == ST_BIVARIATE && graph.n_dep_vars != 1) { lex_error(lexer, _("Only one variable is allowed.")); goto error; } if (!lex_force_match (lexer, T_WITH)) goto error; if (!parse_variables_const (lexer, graph.dict, &graph.dep_vars, &graph.n_dep_vars, PV_NO_DUPLICATE | PV_NUMERIC | PV_APPEND)) goto error; if (graph.scatter_type == ST_BIVARIATE && graph.n_dep_vars != 2) { lex_error (lexer, _("Only one variable is allowed.")); goto error; } if (lex_match (lexer, T_BY)) { const struct variable *v = NULL; if (!lex_match_variable (lexer,graph.dict,&v)) { lex_error (lexer, _("Variable expected")); goto error; } graph.by_var[0] = v; graph.n_by_vars = 1; } } else if (lex_match_id (lexer, "LINE")) { lex_error (lexer, _("%s is not yet implemented."),"LINE"); goto error; } else if (lex_match_id (lexer, "PIE")) { lex_error (lexer, _("%s is not yet implemented."),"PIE"); goto error; } else if (lex_match_id (lexer, "ERRORBAR")) { lex_error (lexer, _("%s is not yet implemented."),"ERRORBAR"); goto error; } else if (lex_match_id (lexer, "PARETO")) { lex_error (lexer, _("%s is not yet implemented."),"PARETO"); goto error; } else if (lex_match_id (lexer, "TITLE")) { lex_error (lexer, _("%s is not yet implemented."),"TITLE"); goto error; } else if (lex_match_id (lexer, "SUBTITLE")) { lex_error (lexer, _("%s is not yet implemented."),"SUBTITLE"); goto error; } else if (lex_match_id (lexer, "FOOTNOTE")) { lex_error (lexer, _("%s is not yet implemented."),"FOOTNOTE"); lex_error (lexer, _("FOOTNOTE is not implemented yet for GRAPH")); goto error; } else if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "LISTWISE")) { graph.missing_pw = false; } else if (lex_match_id (lexer, "VARIABLE")) { graph.missing_pw = true; } else if (lex_match_id (lexer, "EXCLUDE")) { graph.dep_excl = MV_ANY; } else if (lex_match_id (lexer, "INCLUDE")) { graph.dep_excl = MV_SYSTEM; } else if (lex_match_id (lexer, "REPORT")) { graph.fctr_excl = MV_NEVER; } else if (lex_match_id (lexer, "NOREPORT")) { graph.fctr_excl = MV_ANY; } else { lex_error (lexer, NULL); goto error; } } } else { lex_error (lexer, NULL); goto error; } } switch (graph.chart_type) { case CT_SCATTERPLOT: /* See scatterplot.h for the setup of the case prototype */ graph.gr_proto = caseproto_add_width (graph.gr_proto, 0); /* x value - SP_IDX_X*/ graph.gr_proto = caseproto_add_width (graph.gr_proto, 0); /* y value - SP_IDX_Y*/ /* The by_var contains the plot categories for the different xy plot colors */ if (graph.n_by_vars > 0) /* SP_IDX_BY */ graph.gr_proto = caseproto_add_width (graph.gr_proto, var_get_width(graph.by_var[0])); break; case CT_HISTOGRAM: graph.gr_proto = caseproto_add_width (graph.gr_proto, 0); /* x value */ graph.gr_proto = caseproto_add_width (graph.gr_proto, 0); /* weight value */ break; case CT_BAR: break; case CT_NONE: lex_error_expecting (lexer, "HISTOGRAM", "SCATTERPLOT", "BAR", NULL); goto error; default: NOT_REACHED (); break; }; { struct casegrouper *grouper; struct casereader *group; bool ok; grouper = casegrouper_create_splits (proc_open (ds), graph.dict); while (casegrouper_get_next_group (grouper, &group)) { if (graph.chart_type == CT_BAR) run_barchart (&graph, group); else run_graph (&graph, group); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; } subcase_destroy (&graph.ordering); free (graph.dep_vars); pool_destroy (graph.pool); caseproto_unref (graph.gr_proto); return CMD_SUCCESS; error: subcase_destroy (&graph.ordering); caseproto_unref (graph.gr_proto); free (graph.dep_vars); pool_destroy (graph.pool); return CMD_FAILURE; } pspp-1.0.1/src/language/stats/examine.c0000644000175000017500000017635213137223525014737 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2012, 2013, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "libpspp/assertion.h" #include "libpspp/message.h" #include "libpspp/pool.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/caseproto.h" #include "data/subcase.h" #include "data/format.h" #include "math/interaction.h" #include "math/box-whisker.h" #include "math/categoricals.h" #include "math/chart-geometry.h" #include "math/histogram.h" #include "math/moments.h" #include "math/np.h" #include "math/sort.h" #include "math/order-stats.h" #include "math/percentiles.h" #include "math/tukey-hinges.h" #include "math/trimmed-mean.h" #include "output/charts/boxplot.h" #include "output/charts/np-plot.h" #include "output/charts/spreadlevel-plot.h" #include "output/charts/plot-hist.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid static void append_value_name (const struct variable *var, const union value *val, struct string *str) { var_append_value_name (var, val, str); if ( var_is_value_missing (var, val, MV_ANY)) ds_put_cstr (str, _(" (missing)")); } enum bp_mode { BP_GROUPS, BP_VARIABLES }; /* Indices for the ex_proto member (below) */ enum { EX_VAL, /* value */ EX_ID, /* identity */ EX_WT /* weight */ }; struct examine { struct pool *pool; /* A caseproto used to contain the data subsets under examination, see (enum above) */ struct caseproto *ex_proto; size_t n_dep_vars; const struct variable **dep_vars; size_t n_iacts; struct interaction **iacts; enum mv_class dep_excl; enum mv_class fctr_excl; const struct dictionary *dict; struct categoricals *cats; /* how many extremities to display */ int disp_extremes; int calc_extremes; bool descriptives; double conf; bool missing_pw; /* The case index of the ID value (or -1) if not applicable */ size_t id_idx; int id_width; enum pc_alg pc_alg; double *ptiles; size_t n_percentiles; bool npplot; bool histogramplot; bool boxplot; bool spreadlevelplot; int sl_power; enum bp_mode boxplot_mode; const struct variable *id_var; const struct variable *wv; }; struct extremity { /* The value of this extremity */ double val; /* Either the casenumber or the value of the variable specified by the /ID subcommand which corresponds to this extremity */ union value identity; }; struct exploratory_stats { double missing; double non_missing; struct moments *mom; /* Most operations need a sorted reader/writer */ struct casewriter *sorted_writer; struct casereader *sorted_reader; struct extremity *minima; struct extremity *maxima; /* Minimum should alway equal mimima[0].val. Likewise, maximum should alway equal maxima[0].val. This redundancy exists as an optimisation effort. Some statistics (eg histogram) require early calculation of the min and max */ double minimum; double maximum; struct trimmed_mean *trimmed_mean; struct percentile *quartiles[3]; struct percentile **percentiles; struct tukey_hinges *hinges; /* The data for the NP Plots */ struct np *np; struct histogram *histogram; /* The data for the box plots */ struct box_whisker *box_whisker; /* Total weight */ double cc; /* The minimum weight */ double cmin; }; /* Returns an array of (iact->n_vars) pointers to union value initialised to NULL. The caller must free this array when no longer required. */ static const union value ** previous_value_alloc (const struct interaction *iact) { int ivar_idx; const union value **prev_val = xcalloc (iact->n_vars, sizeof (*prev_val)); for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) prev_val[ivar_idx] = NULL; return prev_val; } /* Set the contents of PREV_VAL to the values of C indexed by the variables of IACT */ static int previous_value_record (const struct interaction *iact, const struct ccase *c, const union value **prev_val) { int ivar_idx; int diff_idx = -1; for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) { const struct variable *ivar = iact->vars[ivar_idx]; const int width = var_get_width (ivar); const union value *val = case_data (c, ivar); if (prev_val[ivar_idx]) if (! value_equal (prev_val[ivar_idx], val, width)) { diff_idx = ivar_idx; break; } } for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) { const struct variable *ivar = iact->vars[ivar_idx]; const union value *val = case_data (c, ivar); prev_val[ivar_idx] = val; } return diff_idx; } static void show_boxplot_grouped (const struct examine *cmd, int iact_idx) { int v; const struct interaction *iact = cmd->iacts[iact_idx]; const size_t n_cats = categoricals_n_count (cmd->cats, iact_idx); for (v = 0; v < cmd->n_dep_vars; ++v) { double y_min = DBL_MAX; double y_max = -DBL_MAX; int grp; struct boxplot *boxplot; struct string title; ds_init_empty (&title); if (iact->n_vars > 0) { struct string istr; ds_init_empty (&istr); interaction_to_string (iact, &istr); ds_put_format (&title, _("Boxplot of %s vs. %s"), var_to_string (cmd->dep_vars[v]), ds_cstr (&istr)); ds_destroy (&istr); } else ds_put_format (&title, _("Boxplot of %s"), var_to_string (cmd->dep_vars[v])); for (grp = 0; grp < n_cats; ++grp) { const struct exploratory_stats *es = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, grp); if ( y_min > es[v].minimum) y_min = es[v].minimum; if ( y_max < es[v].maximum) y_max = es[v].maximum; } boxplot = boxplot_create (y_min, y_max, ds_cstr (&title)); ds_destroy (&title); for (grp = 0; grp < n_cats; ++grp) { int ivar_idx; struct string label; const struct ccase *c = categoricals_get_case_by_category_real (cmd->cats, iact_idx, grp); struct exploratory_stats *es = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, grp); ds_init_empty (&label); for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) { struct string l; const struct variable *ivar = iact->vars[ivar_idx]; const union value *val = case_data (c, ivar); ds_init_empty (&l); append_value_name (ivar, val, &l); ds_ltrim (&l, ss_cstr (" ")); ds_put_substring (&label, l.ss); if (ivar_idx < iact->n_vars - 1) ds_put_cstr (&label, "; "); ds_destroy (&l); } boxplot_add_box (boxplot, es[v].box_whisker, ds_cstr (&label)); es[v].box_whisker = NULL; ds_destroy (&label); } boxplot_submit (boxplot); } } static void show_boxplot_variabled (const struct examine *cmd, int iact_idx) { int grp; const struct interaction *iact = cmd->iacts[iact_idx]; const size_t n_cats = categoricals_n_count (cmd->cats, iact_idx); for (grp = 0; grp < n_cats; ++grp) { struct boxplot *boxplot; int v; double y_min = DBL_MAX; double y_max = -DBL_MAX; const struct ccase *c = categoricals_get_case_by_category_real (cmd->cats, iact_idx, grp); struct string title; ds_init_empty (&title); for (v = 0; v < cmd->n_dep_vars; ++v) { const struct exploratory_stats *es = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, grp); if ( y_min > es[v].minimum) y_min = es[v].minimum; if ( y_max < es[v].maximum) y_max = es[v].maximum; } if ( iact->n_vars == 0) ds_put_format (&title, _("Boxplot")); else { int ivar_idx; struct string label; ds_init_empty (&label); for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) { const struct variable *ivar = iact->vars[ivar_idx]; const union value *val = case_data (c, ivar); ds_put_cstr (&label, var_to_string (ivar)); ds_put_cstr (&label, " = "); append_value_name (ivar, val, &label); ds_put_cstr (&label, "; "); } ds_put_format (&title, _("Boxplot of %s"), ds_cstr (&label)); ds_destroy (&label); } boxplot = boxplot_create (y_min, y_max, ds_cstr (&title)); ds_destroy (&title); for (v = 0; v < cmd->n_dep_vars; ++v) { struct exploratory_stats *es = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, grp); boxplot_add_box (boxplot, es[v].box_whisker, var_to_string (cmd->dep_vars[v])); es[v].box_whisker = NULL; } boxplot_submit (boxplot); } } static void show_npplot (const struct examine *cmd, int iact_idx) { const struct interaction *iact = cmd->iacts[iact_idx]; const size_t n_cats = categoricals_n_count (cmd->cats, iact_idx); int v; for (v = 0; v < cmd->n_dep_vars; ++v) { int grp; for (grp = 0; grp < n_cats; ++grp) { struct chart_item *npp, *dnpp; struct casereader *reader; struct np *np; int ivar_idx; const struct ccase *c = categoricals_get_case_by_category_real (cmd->cats, iact_idx, grp); const struct exploratory_stats *es = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, grp); struct string label; ds_init_cstr (&label, var_to_string (cmd->dep_vars[v])); if ( iact->n_vars > 0) { ds_put_cstr (&label, " ("); for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) { const struct variable *ivar = iact->vars[ivar_idx]; const union value *val = case_data (c, ivar); ds_put_cstr (&label, var_to_string (ivar)); ds_put_cstr (&label, " = "); append_value_name (ivar, val, &label); ds_put_cstr (&label, "; "); } ds_put_cstr (&label, ")"); } np = es[v].np; reader = casewriter_make_reader (np->writer); np->writer = NULL; npp = np_plot_create (np, reader, ds_cstr (&label)); dnpp = dnp_plot_create (np, reader, ds_cstr (&label)); if (npp == NULL || dnpp == NULL) { msg (MW, _("Not creating NP plot because data set is empty.")); chart_item_unref (npp); chart_item_unref (dnpp); } else { chart_item_submit (npp); chart_item_submit (dnpp); } casereader_destroy (reader); ds_destroy (&label); } } } static void show_spreadlevel (const struct examine *cmd, int iact_idx) { const struct interaction *iact = cmd->iacts[iact_idx]; const size_t n_cats = categoricals_n_count (cmd->cats, iact_idx); int v; /* Spreadlevel when there are no levels is not useful */ if (iact->n_vars == 0) return; for (v = 0; v < cmd->n_dep_vars; ++v) { int grp; struct chart_item *sl; struct string label; ds_init_cstr (&label, var_to_string (cmd->dep_vars[v])); if (iact->n_vars > 0) { ds_put_cstr (&label, " ("); interaction_to_string (iact, &label); ds_put_cstr (&label, ")"); } sl = spreadlevel_plot_create (ds_cstr (&label), cmd->sl_power); for (grp = 0; grp < n_cats; ++grp) { const struct exploratory_stats *es = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, grp); double median = percentile_calculate (es[v].quartiles[1], cmd->pc_alg); double iqr = percentile_calculate (es[v].quartiles[2], cmd->pc_alg) - percentile_calculate (es[v].quartiles[0], cmd->pc_alg); spreadlevel_plot_add (sl, iqr, median); } if (sl == NULL) msg (MW, _("Not creating spreadlevel chart for %s"), ds_cstr (&label)); else chart_item_submit (sl); ds_destroy (&label); } } static void show_histogram (const struct examine *cmd, int iact_idx) { const struct interaction *iact = cmd->iacts[iact_idx]; const size_t n_cats = categoricals_n_count (cmd->cats, iact_idx); int v; for (v = 0; v < cmd->n_dep_vars; ++v) { int grp; for (grp = 0; grp < n_cats; ++grp) { double n, mean, var; int ivar_idx; const struct ccase *c = categoricals_get_case_by_category_real (cmd->cats, iact_idx, grp); const struct exploratory_stats *es = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, grp); struct string label; if (es[v].histogram == NULL) continue; ds_init_cstr (&label, var_to_string (cmd->dep_vars[v])); if ( iact->n_vars > 0) { ds_put_cstr (&label, " ("); for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) { const struct variable *ivar = iact->vars[ivar_idx]; const union value *val = case_data (c, ivar); ds_put_cstr (&label, var_to_string (ivar)); ds_put_cstr (&label, " = "); append_value_name (ivar, val, &label); ds_put_cstr (&label, "; "); } ds_put_cstr (&label, ")"); } moments_calculate (es[v].mom, &n, &mean, &var, NULL, NULL); chart_item_submit ( histogram_chart_create (es[v].histogram->gsl_hist, ds_cstr (&label), n, mean, sqrt (var), false)); ds_destroy (&label); } } } static void percentiles_report (const struct examine *cmd, int iact_idx) { const struct interaction *iact = cmd->iacts[iact_idx]; int i, v; const int heading_columns = 1 + iact->n_vars + 1; const int heading_rows = 2; struct tab_table *t; const size_t n_cats = categoricals_n_count (cmd->cats, iact_idx); const int rows_per_cat = 2; const int rows_per_var = n_cats * rows_per_cat; const int nr = heading_rows + cmd->n_dep_vars * rows_per_var; const int nc = heading_columns + cmd->n_percentiles; t = tab_create (nc, nr); tab_title (t, _("Percentiles")); tab_headers (t, heading_columns, 0, heading_rows, 0); /* Internal Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); /* External Frame */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_joint_text (t, heading_columns, 0, nc - 1, 0, TAT_TITLE | TAB_CENTER, _("Percentiles") ); tab_hline (t, TAL_1, heading_columns, nc - 1, 1); for (i = 0; i < cmd->n_percentiles; ++i) { tab_text_format (t, heading_columns + i, 1, TAT_TITLE | TAB_CENTER, _("%g"), cmd->ptiles[i]); } for (i = 0; i < iact->n_vars; ++i) { tab_text (t, 1 + i, 1, TAT_TITLE, var_to_string (iact->vars[i]) ); } if (n_cats > 0) { tab_vline (t, TAL_1, heading_columns - 1, heading_rows, nr - 1); for (v = 0; v < cmd->n_dep_vars; ++v) { const union value **prev_vals = previous_value_alloc (iact); int ivar_idx; if ( v > 0 ) tab_hline (t, TAL_1, 0, nc - 1, heading_rows + v * rows_per_var); tab_text (t, 0, heading_rows + v * rows_per_var, TAT_TITLE | TAB_LEFT, var_to_string (cmd->dep_vars[v]) ); for (i = 0; i < n_cats; ++i) { const struct ccase *c = categoricals_get_case_by_category_real (cmd->cats, iact_idx, i); const struct exploratory_stats *ess = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, i); const struct exploratory_stats *es = ess + v; int diff_idx = previous_value_record (iact, c, prev_vals); double hinges[3]; int p; for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) { const struct variable *ivar = iact->vars[ivar_idx]; const union value *val = case_data (c, ivar); if (( diff_idx != -1 && diff_idx <= ivar_idx) || i == 0) { struct string str; ds_init_empty (&str); append_value_name (ivar, val, &str); tab_text (t, 1 + ivar_idx, heading_rows + v * rows_per_var + i * rows_per_cat, TAT_TITLE | TAB_LEFT, ds_cstr (&str) ); ds_destroy (&str); } } if ( diff_idx != -1 && diff_idx < iact->n_vars) { tab_hline (t, TAL_1, 1 + diff_idx, nc - 1, heading_rows + v * rows_per_var + i * rows_per_cat ); } tab_text (t, heading_columns - 1, heading_rows + v * rows_per_var + i * rows_per_cat, TAT_TITLE | TAB_LEFT, gettext (ptile_alg_desc [cmd->pc_alg])); tukey_hinges_calculate (es->hinges, hinges); for (p = 0; p < cmd->n_percentiles; ++p) { tab_double (t, heading_columns + p, heading_rows + v * rows_per_var + i * rows_per_cat, 0, percentile_calculate (es->percentiles[p], cmd->pc_alg), NULL, RC_OTHER); if (cmd->ptiles[p] == 25.0) { tab_double (t, heading_columns + p, heading_rows + v * rows_per_var + i * rows_per_cat + 1, 0, hinges[0], NULL, RC_OTHER); } else if (cmd->ptiles[p] == 50.0) { tab_double (t, heading_columns + p, heading_rows + v * rows_per_var + i * rows_per_cat + 1, 0, hinges[1], NULL, RC_OTHER); } else if (cmd->ptiles[p] == 75.0) { tab_double (t, heading_columns + p, heading_rows + v * rows_per_var + i * rows_per_cat + 1, 0, hinges[2], NULL, RC_OTHER); } } tab_text (t, heading_columns - 1, heading_rows + v * rows_per_var + i * rows_per_cat + 1, TAT_TITLE | TAB_LEFT, _("Tukey's Hinges")); } free (prev_vals); } } tab_submit (t); } static void descriptives_report (const struct examine *cmd, int iact_idx) { const struct interaction *iact = cmd->iacts[iact_idx]; int i, v; const int heading_columns = 1 + iact->n_vars + 2; const int heading_rows = 1; struct tab_table *t; size_t n_cats = categoricals_n_count (cmd->cats, iact_idx); const int rows_per_cat = 13; const int rows_per_var = n_cats * rows_per_cat; const int nr = heading_rows + cmd->n_dep_vars * rows_per_var; const int nc = 2 + heading_columns; t = tab_create (nc, nr); tab_title (t, _("Descriptives")); tab_headers (t, heading_columns, 0, heading_rows, 0); /* Internal Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); /* External Frame */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_text (t, heading_columns, 0, TAB_CENTER | TAT_TITLE, _("Statistic")); tab_text (t, heading_columns + 1, 0, TAB_CENTER | TAT_TITLE, _("Std. Error")); for (i = 0; i < iact->n_vars; ++i) { tab_text (t, 1 + i, 0, TAT_TITLE, var_to_string (iact->vars[i]) ); } for (v = 0; v < cmd->n_dep_vars; ++v) { const union value **prev_val = previous_value_alloc (iact); int ivar_idx; if ( v > 0 ) tab_hline (t, TAL_1, 0, nc - 1, heading_rows + v * rows_per_var); tab_text (t, 0, heading_rows + v * rows_per_var, TAT_TITLE | TAB_LEFT, var_to_string (cmd->dep_vars[v]) ); for (i = 0; i < n_cats; ++i) { const struct ccase *c = categoricals_get_case_by_category_real (cmd->cats, iact_idx, i); const struct exploratory_stats *ess = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, i); const struct exploratory_stats *es = ess + v; const int diff_idx = previous_value_record (iact, c, prev_val); double m0, m1, m2, m3, m4; double tval; moments_calculate (es->mom, &m0, &m1, &m2, &m3, &m4); tval = gsl_cdf_tdist_Qinv ((1.0 - cmd->conf) / 2.0, m0 - 1.0); for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) { const struct variable *ivar = iact->vars[ivar_idx]; const union value *val = case_data (c, ivar); if (( diff_idx != -1 && diff_idx <= ivar_idx) || i == 0) { struct string str; ds_init_empty (&str); append_value_name (ivar, val, &str); tab_text (t, 1 + ivar_idx, heading_rows + v * rows_per_var + i * rows_per_cat, TAT_TITLE | TAB_LEFT, ds_cstr (&str) ); ds_destroy (&str); } } if ( diff_idx != -1 && diff_idx < iact->n_vars) { tab_hline (t, TAL_1, 1 + diff_idx, nc - 1, heading_rows + v * rows_per_var + i * rows_per_cat ); } tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat, TAB_LEFT, _("Mean") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat, 0, m1, NULL, RC_OTHER); tab_double (t, 1 + iact->n_vars + 3, heading_rows + v * rows_per_var + i * rows_per_cat, 0, calc_semean (m2, m0), NULL, RC_OTHER); tab_text_format (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 1, TAB_LEFT, _("%g%% Confidence Interval for Mean"), cmd->conf * 100.0 ); tab_text (t, 1 + iact->n_vars + 1, heading_rows + v * rows_per_var + i * rows_per_cat + 1, TAB_LEFT, _("Lower Bound") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 1, 0, m1 - tval * calc_semean (m2, m0), NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars + 1, heading_rows + v * rows_per_var + i * rows_per_cat + 2, TAB_LEFT, _("Upper Bound") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 2, 0, m1 + tval * calc_semean (m2, m0), NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 3, TAB_LEFT, _("5% Trimmed Mean") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 3, 0, trimmed_mean_calculate (es->trimmed_mean), NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 4, TAB_LEFT, _("Median") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 4, 0, percentile_calculate (es->quartiles[1], cmd->pc_alg), NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 5, TAB_LEFT, _("Variance") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 5, 0, m2, NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 6, TAB_LEFT, _("Std. Deviation") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 6, 0, sqrt (m2), NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 7, TAB_LEFT, _("Minimum") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 7, 0, es->minima[0].val, NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 8, TAB_LEFT, _("Maximum") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 8, 0, es->maxima[0].val, NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 9, TAB_LEFT, _("Range") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 9, 0, es->maxima[0].val - es->minima[0].val, NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 10, TAB_LEFT, _("Interquartile Range") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 10, 0, percentile_calculate (es->quartiles[2], cmd->pc_alg) - percentile_calculate (es->quartiles[0], cmd->pc_alg), NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 11, TAB_LEFT, _("Skewness") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 11, 0, m3, NULL, RC_OTHER); tab_double (t, 1 + iact->n_vars + 3, heading_rows + v * rows_per_var + i * rows_per_cat + 11, 0, calc_seskew (m0), NULL, RC_OTHER); tab_text (t, 1 + iact->n_vars, heading_rows + v * rows_per_var + i * rows_per_cat + 12, TAB_LEFT, _("Kurtosis") ); tab_double (t, 1 + iact->n_vars + 2, heading_rows + v * rows_per_var + i * rows_per_cat + 12, 0, m4, NULL, RC_OTHER); tab_double (t, 1 + iact->n_vars + 3, heading_rows + v * rows_per_var + i * rows_per_cat + 12, 0, calc_sekurt (m0), NULL, RC_OTHER); } free (prev_val); } tab_submit (t); } static void extremes_report (const struct examine *cmd, int iact_idx) { const struct interaction *iact = cmd->iacts[iact_idx]; int i, v; const int heading_columns = 1 + iact->n_vars + 2; const int heading_rows = 1; struct tab_table *t; size_t n_cats = categoricals_n_count (cmd->cats, iact_idx); const int rows_per_cat = 2 * cmd->disp_extremes; const int rows_per_var = n_cats * rows_per_cat; const int nr = heading_rows + cmd->n_dep_vars * rows_per_var; const int nc = 2 + heading_columns; t = tab_create (nc, nr); tab_title (t, _("Extreme Values")); tab_headers (t, heading_columns, 0, heading_rows, 0); /* Internal Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); /* External Frame */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); if ( cmd->id_var ) tab_text (t, heading_columns, 0, TAB_CENTER | TAT_TITLE, var_to_string (cmd->id_var)); else tab_text (t, heading_columns, 0, TAB_CENTER | TAT_TITLE, _("Case Number")); tab_text (t, heading_columns + 1, 0, TAB_CENTER | TAT_TITLE, _("Value")); for (i = 0; i < iact->n_vars; ++i) { tab_text (t, 1 + i, 0, TAT_TITLE, var_to_string (iact->vars[i]) ); } for (v = 0; v < cmd->n_dep_vars; ++v) { const union value **prev_val = previous_value_alloc (iact); int ivar_idx; if ( v > 0 ) tab_hline (t, TAL_1, 0, nc - 1, heading_rows + v * rows_per_var); tab_text (t, 0, heading_rows + v * rows_per_var, TAT_TITLE, var_to_string (cmd->dep_vars[v]) ); for (i = 0; i < n_cats; ++i) { int e; const struct ccase *c = categoricals_get_case_by_category_real (cmd->cats, iact_idx, i); const struct exploratory_stats *ess = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, i); const struct exploratory_stats *es = ess + v; int diff_idx = previous_value_record (iact, c, prev_val); for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) { const struct variable *ivar = iact->vars[ivar_idx]; const union value *val = case_data (c, ivar); if (( diff_idx != -1 && diff_idx <= ivar_idx) || i == 0) { struct string str; ds_init_empty (&str); append_value_name (ivar, val, &str); tab_text (t, 1 + ivar_idx, heading_rows + v * rows_per_var + i * rows_per_cat, TAT_TITLE | TAB_LEFT, ds_cstr (&str) ); ds_destroy (&str); } } if ( diff_idx != -1 && diff_idx < iact->n_vars) { tab_hline (t, TAL_1, 1 + diff_idx, nc - 1, heading_rows + v * rows_per_var + i * rows_per_cat ); } tab_text (t, heading_columns - 2, heading_rows + v * rows_per_var + i * rows_per_cat, TAB_RIGHT, _("Highest")); tab_hline (t, TAL_1, heading_columns - 2, nc - 1, heading_rows + v * rows_per_var + i * rows_per_cat + cmd->disp_extremes ); tab_text (t, heading_columns - 2, heading_rows + v * rows_per_var + i * rows_per_cat + cmd->disp_extremes, TAB_RIGHT, _("Lowest")); for (e = 0 ; e < cmd->disp_extremes; ++e) { tab_double (t, heading_columns - 1, heading_rows + v * rows_per_var + i * rows_per_cat + e, TAB_RIGHT, e + 1, NULL, RC_INTEGER); /* The casenumber */ if (cmd->id_var) tab_value (t, heading_columns, heading_rows + v * rows_per_var + i * rows_per_cat + e, TAB_RIGHT, &es->maxima[e].identity, cmd->id_var, NULL); else tab_double (t, heading_columns, heading_rows + v * rows_per_var + i * rows_per_cat + e, TAB_RIGHT, es->maxima[e].identity.f, NULL, RC_INTEGER); tab_double (t, heading_columns + 1, heading_rows + v * rows_per_var + i * rows_per_cat + e, 0, es->maxima[e].val, var_get_print_format (cmd->dep_vars[v]), RC_OTHER); tab_double (t, heading_columns - 1, heading_rows + v * rows_per_var + i * rows_per_cat + cmd->disp_extremes + e, TAB_RIGHT, e + 1, NULL, RC_INTEGER); /* The casenumber */ if (cmd->id_var) tab_value (t, heading_columns, heading_rows + v * rows_per_var + i * rows_per_cat + cmd->disp_extremes + e, TAB_RIGHT, &es->minima[e].identity, cmd->id_var, NULL); else tab_double (t, heading_columns, heading_rows + v * rows_per_var + i * rows_per_cat + cmd->disp_extremes + e, TAB_RIGHT, es->minima[e].identity.f, NULL, RC_INTEGER); tab_double (t, heading_columns + 1, heading_rows + v * rows_per_var + i * rows_per_cat + cmd->disp_extremes + e, 0, es->minima[e].val, var_get_print_format (cmd->dep_vars[v]), RC_OTHER); } } free (prev_val); } tab_submit (t); } static void summary_report (const struct examine *cmd, int iact_idx) { const struct interaction *iact = cmd->iacts[iact_idx]; int i, v; const int heading_columns = 1 + iact->n_vars; const int heading_rows = 3; struct tab_table *t; const struct fmt_spec *wfmt = cmd->wv ? var_get_print_format (cmd->wv) : &F_8_0; size_t n_cats = categoricals_n_count (cmd->cats, iact_idx); const int nr = heading_rows + n_cats * cmd->n_dep_vars; const int nc = 6 + heading_columns; t = tab_create (nc, nr); tab_set_format (t, RC_WEIGHT, wfmt); tab_title (t, _("Case Processing Summary")); tab_headers (t, heading_columns, 0, heading_rows, 0); /* Internal Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); /* External Frame */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_joint_text (t, heading_columns, 0, nc - 1, 0, TAB_CENTER | TAT_TITLE, _("Cases")); tab_joint_text (t, heading_columns, 1, heading_columns + 1, 1, TAB_CENTER | TAT_TITLE, _("Valid")); tab_joint_text (t, heading_columns + 2, 1, heading_columns + 3, 1, TAB_CENTER | TAT_TITLE, _("Missing")); tab_joint_text (t, heading_columns + 4, 1, heading_columns + 5, 1, TAB_CENTER | TAT_TITLE, _("Total")); for (i = 0; i < 3; ++i) { tab_text (t, heading_columns + i * 2, 2, TAB_CENTER | TAT_TITLE, _("N")); tab_text (t, heading_columns + i * 2 + 1, 2, TAB_CENTER | TAT_TITLE, _("Percent")); } for (i = 0; i < iact->n_vars; ++i) { tab_text (t, 1 + i, 2, TAT_TITLE, var_to_string (iact->vars[i]) ); } if (n_cats > 0) for (v = 0; v < cmd->n_dep_vars; ++v) { int ivar_idx; const union value **prev_values = previous_value_alloc (iact); if ( v > 0 ) tab_hline (t, TAL_1, 0, nc - 1, heading_rows + v * n_cats); tab_text (t, 0, heading_rows + n_cats * v, TAT_TITLE, var_to_string (cmd->dep_vars[v]) ); for (i = 0; i < n_cats; ++i) { double total; const struct exploratory_stats *es; const struct ccase *c = categoricals_get_case_by_category_real (cmd->cats, iact_idx, i); if (c) { int diff_idx = previous_value_record (iact, c, prev_values); if ( diff_idx != -1 && diff_idx < iact->n_vars - 1) tab_hline (t, TAL_1, 1 + diff_idx, nc - 1, heading_rows + n_cats * v + i ); for (ivar_idx = 0; ivar_idx < iact->n_vars; ++ivar_idx) { const struct variable *ivar = iact->vars[ivar_idx]; const union value *val = case_data (c, ivar); if (( diff_idx != -1 && diff_idx <= ivar_idx) || i == 0) { struct string str; ds_init_empty (&str); append_value_name (ivar, val, &str); tab_text (t, 1 + ivar_idx, heading_rows + n_cats * v + i, TAT_TITLE | TAB_LEFT, ds_cstr (&str) ); ds_destroy (&str); } } } es = categoricals_get_user_data_by_category_real (cmd->cats, iact_idx, i); total = es[v].missing + es[v].non_missing; tab_double (t, heading_columns + 0, heading_rows + n_cats * v + i, 0, es[v].non_missing, NULL, RC_WEIGHT); tab_text_format (t, heading_columns + 1, heading_rows + n_cats * v + i, 0, "%g%%", 100.0 * es[v].non_missing / total ); tab_double (t, heading_columns + 2, heading_rows + n_cats * v + i, 0, es[v].missing, NULL, RC_WEIGHT); tab_text_format (t, heading_columns + 3, heading_rows + n_cats * v + i, 0, "%g%%", 100.0 * es[v].missing / total ); tab_double (t, heading_columns + 4, heading_rows + n_cats * v + i, 0, total, NULL, RC_WEIGHT); /* This can only be 100% can't it? */ tab_text_format (t, heading_columns + 5, heading_rows + n_cats * v + i, 0, "%g%%", 100.0 * (es[v].missing + es[v].non_missing)/ total ); } free (prev_values); } tab_hline (t, TAL_1, heading_columns, nc - 1, 1); tab_hline (t, TAL_1, heading_columns, nc - 1, 2); tab_submit (t); } /* Attempt to parse an interaction from LEXER */ static struct interaction * parse_interaction (struct lexer *lexer, struct examine *ex) { const struct variable *v = NULL; struct interaction *iact = NULL; if ( lex_match_variable (lexer, ex->dict, &v)) { iact = interaction_create (v); while (lex_match (lexer, T_BY)) { if (!lex_match_variable (lexer, ex->dict, &v)) { interaction_destroy (iact); return NULL; } interaction_add_variable (iact, v); } lex_match (lexer, T_COMMA); } return iact; } static void * create_n (const void *aux1, void *aux2 UNUSED) { int v; const struct examine *examine = aux1; struct exploratory_stats *es = pool_calloc (examine->pool, examine->n_dep_vars, sizeof (*es)); struct subcase ordering; subcase_init (&ordering, 0, 0, SC_ASCEND); for (v = 0; v < examine->n_dep_vars; v++) { es[v].sorted_writer = sort_create_writer (&ordering, examine->ex_proto); es[v].sorted_reader = NULL; es[v].mom = moments_create (MOMENT_KURTOSIS); es[v].cmin = DBL_MAX; es[v].maximum = -DBL_MAX; es[v].minimum = DBL_MAX; } subcase_destroy (&ordering); return es; } static void update_n (const void *aux1, void *aux2 UNUSED, void *user_data, const struct ccase *c, double weight) { int v; const struct examine *examine = aux1; struct exploratory_stats *es = user_data; bool this_case_is_missing = false; /* LISTWISE missing must be dealt with here */ if (!examine->missing_pw) { for (v = 0; v < examine->n_dep_vars; v++) { const struct variable *var = examine->dep_vars[v]; if (var_is_value_missing (var, case_data (c, var), examine->dep_excl)) { es[v].missing += weight; this_case_is_missing = true; } } } if (this_case_is_missing) return; for (v = 0; v < examine->n_dep_vars; v++) { struct ccase *outcase ; const struct variable *var = examine->dep_vars[v]; const double x = case_data (c, var)->f; if (var_is_value_missing (var, case_data (c, var), examine->dep_excl)) { es[v].missing += weight; continue; } outcase = case_create (examine->ex_proto); if (x > es[v].maximum) es[v].maximum = x; if (x < es[v].minimum) es[v].minimum = x; es[v].non_missing += weight; moments_pass_one (es[v].mom, x, weight); /* Save the value and the ID to the writer */ assert (examine->id_idx != -1); case_data_rw_idx (outcase, EX_VAL)->f = x; value_copy (case_data_rw_idx (outcase, EX_ID), case_data_idx (c, examine->id_idx), examine->id_width); case_data_rw_idx (outcase, EX_WT)->f = weight; es[v].cc += weight; if (es[v].cmin > weight) es[v].cmin = weight; casewriter_write (es[v].sorted_writer, outcase); } } static void calculate_n (const void *aux1, void *aux2 UNUSED, void *user_data) { int v; const struct examine *examine = aux1; struct exploratory_stats *es = user_data; for (v = 0; v < examine->n_dep_vars; v++) { int i; casenumber imin = 0; casenumber imax; struct casereader *reader; struct ccase *c; if (examine->histogramplot && es[v].non_missing > 0) { /* Sturges Rule */ double bin_width = fabs (es[v].minimum - es[v].maximum) / (1 + log2 (es[v].cc)) ; es[v].histogram = histogram_create (bin_width, es[v].minimum, es[v].maximum); } es[v].sorted_reader = casewriter_make_reader (es[v].sorted_writer); es[v].sorted_writer = NULL; imax = casereader_get_case_cnt (es[v].sorted_reader); es[v].maxima = pool_calloc (examine->pool, examine->calc_extremes, sizeof (*es[v].maxima)); es[v].minima = pool_calloc (examine->pool, examine->calc_extremes, sizeof (*es[v].minima)); for (i = 0; i < examine->calc_extremes; ++i) { value_init_pool (examine->pool, &es[v].maxima[i].identity, examine->id_width) ; value_init_pool (examine->pool, &es[v].minima[i].identity, examine->id_width) ; } bool warn = true; for (reader = casereader_clone (es[v].sorted_reader); (c = casereader_read (reader)) != NULL; case_unref (c)) { const double val = case_data_idx (c, EX_VAL)->f; double wt = case_data_idx (c, EX_WT)->f; wt = var_force_valid_weight (examine->wv, wt, &warn); moments_pass_two (es[v].mom, val, wt); if (es[v].histogram) histogram_add (es[v].histogram, val, wt); if (imin < examine->calc_extremes) { int x; for (x = imin; x < examine->calc_extremes; ++x) { struct extremity *min = &es[v].minima[x]; min->val = val; value_copy (&min->identity, case_data_idx (c, EX_ID), examine->id_width); } imin ++; } imax --; if (imax < examine->calc_extremes) { int x; for (x = imax; x < imax + 1; ++x) { struct extremity *max; if (x >= examine->calc_extremes) break; max = &es[v].maxima[x]; max->val = val; value_copy (&max->identity, case_data_idx (c, EX_ID), examine->id_width); } } } casereader_destroy (reader); if (examine->calc_extremes > 0 && es[v].non_missing > 0) { assert (es[v].minima[0].val == es[v].minimum); assert (es[v].maxima[0].val == es[v].maximum); } { const int n_os = 5 + examine->n_percentiles; struct order_stats **os ; es[v].percentiles = pool_calloc (examine->pool, examine->n_percentiles, sizeof (*es[v].percentiles)); es[v].trimmed_mean = trimmed_mean_create (es[v].cc, 0.05); os = xcalloc (n_os, sizeof *os); os[0] = &es[v].trimmed_mean->parent; es[v].quartiles[0] = percentile_create (0.25, es[v].cc); es[v].quartiles[1] = percentile_create (0.5, es[v].cc); es[v].quartiles[2] = percentile_create (0.75, es[v].cc); os[1] = &es[v].quartiles[0]->parent; os[2] = &es[v].quartiles[1]->parent; os[3] = &es[v].quartiles[2]->parent; es[v].hinges = tukey_hinges_create (es[v].cc, es[v].cmin); os[4] = &es[v].hinges->parent; for (i = 0; i < examine->n_percentiles; ++i) { es[v].percentiles[i] = percentile_create (examine->ptiles[i] / 100.00, es[v].cc); os[5 + i] = &es[v].percentiles[i]->parent; } order_stats_accumulate_idx (os, n_os, casereader_clone (es[v].sorted_reader), EX_WT, EX_VAL); free (os); } if (examine->boxplot) { struct order_stats *os; es[v].box_whisker = box_whisker_create (es[v].hinges, EX_ID, examine->id_var); os = &es[v].box_whisker->parent; order_stats_accumulate_idx (&os, 1, casereader_clone (es[v].sorted_reader), EX_WT, EX_VAL); } if (examine->npplot) { double n, mean, var; struct order_stats *os; moments_calculate (es[v].mom, &n, &mean, &var, NULL, NULL); es[v].np = np_create (n, mean, var); os = &es[v].np->parent; order_stats_accumulate_idx (&os, 1, casereader_clone (es[v].sorted_reader), EX_WT, EX_VAL); } } } static void cleanup_exploratory_stats (struct examine *cmd) { int i; for (i = 0; i < cmd->n_iacts; ++i) { int v; const size_t n_cats = categoricals_n_count (cmd->cats, i); for (v = 0; v < cmd->n_dep_vars; ++v) { int grp; for (grp = 0; grp < n_cats; ++grp) { int q; const struct exploratory_stats *es = categoricals_get_user_data_by_category_real (cmd->cats, i, grp); struct order_stats *os = &es[v].hinges->parent; struct statistic *stat = &os->parent; stat->destroy (stat); for (q = 0; q < 3 ; q++) { os = &es[v].quartiles[q]->parent; stat = &os->parent; stat->destroy (stat); } for (q = 0; q < cmd->n_percentiles ; q++) { os = &es[v].percentiles[q]->parent; stat = &os->parent; stat->destroy (stat); } os = &es[v].trimmed_mean->parent; stat = &os->parent; stat->destroy (stat); os = &es[v].np->parent; if (os) { stat = &os->parent; stat->destroy (stat); } statistic_destroy (&es[v].histogram->parent); moments_destroy (es[v].mom); if (es[v].box_whisker) { stat = &es[v].box_whisker->parent.parent; stat->destroy (stat); } casereader_destroy (es[v].sorted_reader); } } } } static void run_examine (struct examine *cmd, struct casereader *input) { int i; struct ccase *c; struct casereader *reader; struct payload payload; payload.create = create_n; payload.update = update_n; payload.calculate = calculate_n; payload.destroy = NULL; cmd->wv = dict_get_weight (cmd->dict); cmd->cats = categoricals_create (cmd->iacts, cmd->n_iacts, cmd->wv, cmd->dep_excl, cmd->fctr_excl); categoricals_set_payload (cmd->cats, &payload, cmd, NULL); if (cmd->id_var == NULL) { struct ccase *c = casereader_peek (input, 0); cmd->id_idx = case_get_value_cnt (c); input = casereader_create_arithmetic_sequence (input, 1.0, 1.0); case_unref (c); } for (reader = input; (c = casereader_read (reader)) != NULL; case_unref (c)) { categoricals_update (cmd->cats, c); } casereader_destroy (reader); categoricals_done (cmd->cats); for (i = 0; i < cmd->n_iacts; ++i) { summary_report (cmd, i); const size_t n_cats = categoricals_n_count (cmd->cats, i); if (n_cats == 0) continue; if (cmd->disp_extremes > 0) extremes_report (cmd, i); if (cmd->n_percentiles > 0) percentiles_report (cmd, i); if (cmd->boxplot) { switch (cmd->boxplot_mode) { case BP_GROUPS: show_boxplot_grouped (cmd, i); break; case BP_VARIABLES: show_boxplot_variabled (cmd, i); break; default: NOT_REACHED (); break; } } if (cmd->histogramplot) show_histogram (cmd, i); if (cmd->npplot) show_npplot (cmd, i); if (cmd->spreadlevelplot) show_spreadlevel (cmd, i); if (cmd->descriptives) descriptives_report (cmd, i); } cleanup_exploratory_stats (cmd); categoricals_destroy (cmd->cats); } int cmd_examine (struct lexer *lexer, struct dataset *ds) { int i; bool nototals_seen = false; bool totals_seen = false; struct interaction **iacts_mem = NULL; struct examine examine; bool percentiles_seen = false; examine.missing_pw = false; examine.disp_extremes = 0; examine.calc_extremes = 0; examine.descriptives = false; examine.conf = 0.95; examine.pc_alg = PC_HAVERAGE; examine.ptiles = NULL; examine.n_percentiles = 0; examine.id_idx = -1; examine.id_width = 0; examine.id_var = NULL; examine.boxplot_mode = BP_GROUPS; examine.ex_proto = caseproto_create (); examine.pool = pool_create (); /* Allocate space for the first interaction. This is interaction is an empty one (for the totals). If no totals are requested, we will simply ignore this interaction. */ examine.n_iacts = 1; examine.iacts = iacts_mem = pool_zalloc (examine.pool, sizeof (struct interaction *)); examine.iacts[0] = interaction_create (NULL); examine.dep_excl = MV_ANY; examine.fctr_excl = MV_ANY; examine.histogramplot = false; examine.npplot = false; examine.boxplot = false; examine.spreadlevelplot = false; examine.sl_power = 0; examine.dep_vars = NULL; examine.n_dep_vars = 0; examine.dict = dataset_dict (ds); /* Accept an optional, completely pointless "/VARIABLES=" */ lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "VARIABLES")) { if (! lex_force_match (lexer, T_EQUALS) ) goto error; } if (!parse_variables_const (lexer, examine.dict, &examine.dep_vars, &examine.n_dep_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; if (lex_match (lexer, T_BY)) { struct interaction *iact = NULL; do { iact = parse_interaction (lexer, &examine); if (iact) { examine.n_iacts++; iacts_mem = pool_nrealloc (examine.pool, iacts_mem, examine.n_iacts, sizeof (*iacts_mem)); iacts_mem[examine.n_iacts - 1] = iact; } } while (iact); } while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "STATISTICS")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "DESCRIPTIVES")) { examine.descriptives = true; } else if (lex_match_id (lexer, "EXTREME")) { int extr = 5; if (lex_match (lexer, T_LPAREN)) { if (!lex_force_int (lexer)) goto error; extr = lex_integer (lexer); if (extr < 0) { msg (MW, _("%s may not be negative. Using default value (%g)."), "EXTREME", 5.0); extr = 5; } lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } examine.disp_extremes = extr; } else if (lex_match_id (lexer, "NONE")) { } else if (lex_match (lexer, T_ALL)) { if (examine.disp_extremes == 0) examine.disp_extremes = 5; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "PERCENTILES")) { percentiles_seen = true; if (lex_match (lexer, T_LPAREN)) { while (lex_is_number (lexer)) { double p = lex_number (lexer); if ( p <= 0 || p >= 100.0) { lex_error (lexer, _("Percentiles must lie in the range (0, 100)")); goto error; } examine.n_percentiles++; examine.ptiles = xrealloc (examine.ptiles, sizeof (*examine.ptiles) * examine.n_percentiles); examine.ptiles[examine.n_percentiles - 1] = p; lex_get (lexer); lex_match (lexer, T_COMMA); } if (!lex_force_match (lexer, T_RPAREN)) goto error; } lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "HAVERAGE")) { examine.pc_alg = PC_HAVERAGE; } else if (lex_match_id (lexer, "WAVERAGE")) { examine.pc_alg = PC_WAVERAGE; } else if (lex_match_id (lexer, "ROUND")) { examine.pc_alg = PC_ROUND; } else if (lex_match_id (lexer, "EMPIRICAL")) { examine.pc_alg = PC_EMPIRICAL; } else if (lex_match_id (lexer, "AEMPIRICAL")) { examine.pc_alg = PC_AEMPIRICAL; } else if (lex_match_id (lexer, "NONE")) { examine.pc_alg = PC_NONE; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "TOTAL")) { totals_seen = true; } else if (lex_match_id (lexer, "NOTOTAL")) { nototals_seen = true; } else if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "LISTWISE")) { examine.missing_pw = false; } else if (lex_match_id (lexer, "PAIRWISE")) { examine.missing_pw = true; } else if (lex_match_id (lexer, "EXCLUDE")) { examine.dep_excl = MV_ANY; } else if (lex_match_id (lexer, "INCLUDE")) { examine.dep_excl = MV_SYSTEM; } else if (lex_match_id (lexer, "REPORT")) { examine.fctr_excl = MV_NEVER; } else if (lex_match_id (lexer, "NOREPORT")) { examine.fctr_excl = MV_ANY; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "COMPARE")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "VARIABLES")) { examine.boxplot_mode = BP_VARIABLES; } else if (lex_match_id (lexer, "GROUPS")) { examine.boxplot_mode = BP_GROUPS; } else { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "PLOT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "BOXPLOT")) { examine.boxplot = true; } else if (lex_match_id (lexer, "NPPLOT")) { examine.npplot = true; } else if (lex_match_id (lexer, "HISTOGRAM")) { examine.histogramplot = true; } else if (lex_match_id (lexer, "SPREADLEVEL")) { examine.spreadlevelplot = true; examine.sl_power = 0; if (lex_match (lexer, T_LPAREN) && lex_force_int (lexer)) { examine.sl_power = lex_integer (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "NONE")) { examine.histogramplot = false; examine.npplot = false; examine.boxplot = false; } else if (lex_match (lexer, T_ALL)) { examine.histogramplot = true; examine.npplot = true; examine.boxplot = true; } else { lex_error (lexer, NULL); goto error; } lex_match (lexer, T_COMMA); } } else if (lex_match_id (lexer, "CINTERVAL")) { if ( !lex_force_num (lexer)) goto error; examine.conf = lex_number (lexer); lex_get (lexer); } else if (lex_match_id (lexer, "ID")) { lex_match (lexer, T_EQUALS); examine.id_var = parse_variable_const (lexer, examine.dict); } else { lex_error (lexer, NULL); goto error; } } if ( totals_seen && nototals_seen) { msg (SE, _("%s and %s are mutually exclusive"),"TOTAL","NOTOTAL"); goto error; } /* If totals have been requested or if there are no factors in this analysis, then the totals need to be included. */ if ( !nototals_seen || examine.n_iacts == 1) { examine.iacts = &iacts_mem[0]; } else { examine.n_iacts--; examine.iacts = &iacts_mem[1]; interaction_destroy (iacts_mem[0]); } if ( examine.id_var ) { examine.id_idx = var_get_case_index (examine.id_var); examine.id_width = var_get_width (examine.id_var); } examine.ex_proto = caseproto_add_width (examine.ex_proto, 0); /* value */ examine.ex_proto = caseproto_add_width (examine.ex_proto, examine.id_width); /* id */ examine.ex_proto = caseproto_add_width (examine.ex_proto, 0); /* weight */ if (examine.disp_extremes > 0) { examine.calc_extremes = examine.disp_extremes; } if (examine.descriptives && examine.calc_extremes == 0) { /* Descriptives always displays the max and min */ examine.calc_extremes = 1; } if (percentiles_seen && examine.n_percentiles == 0) { examine.n_percentiles = 7; examine.ptiles = xcalloc (examine.n_percentiles, sizeof (*examine.ptiles)); examine.ptiles[0] = 5; examine.ptiles[1] = 10; examine.ptiles[2] = 25; examine.ptiles[3] = 50; examine.ptiles[4] = 75; examine.ptiles[5] = 90; examine.ptiles[6] = 95; } assert (examine.calc_extremes >= examine.disp_extremes); { struct casegrouper *grouper; struct casereader *group; bool ok; grouper = casegrouper_create_splits (proc_open (ds), examine.dict); while (casegrouper_get_next_group (grouper, &group)) run_examine (&examine, group); ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; } caseproto_unref (examine.ex_proto); for (i = 0; i < examine.n_iacts; ++i) interaction_destroy (examine.iacts[i]); free (examine.ptiles); free (examine.dep_vars); pool_destroy (examine.pool); return CMD_SUCCESS; error: caseproto_unref (examine.ex_proto); examine.iacts = iacts_mem; for (i = 0; i < examine.n_iacts; ++i) interaction_destroy (examine.iacts[i]); free (examine.dep_vars); free (examine.ptiles); pool_destroy (examine.pool); return CMD_FAILURE; } pspp-1.0.1/src/language/stats/npar.h0000644000175000017500000000316012470243700014234 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !npar_h #define npar_h 1 #include #include #include "data/missing-values.h" #include "data/value.h" typedef const struct variable *variable_pair[2]; struct hmapx; struct casefilter; struct casereader; struct dataset; struct npar_test { void (*execute) (const struct dataset *, struct casereader *, enum mv_class exclude, const struct npar_test *, bool, double); void (*insert_variables) (const struct npar_test *, struct hmapx *); }; struct one_sample_test { struct npar_test parent; const struct variable **vars; size_t n_vars; }; struct two_sample_test { struct npar_test parent; variable_pair *pairs; size_t n_pairs; }; struct n_sample_test { struct npar_test parent; const struct variable **vars; size_t n_vars; union value val1, val2; const struct variable *indep_var; }; #endif pspp-1.0.1/src/language/stats/binomial.h0000644000175000017500000000225512470242642015076 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !binomial_h #define binomial_h 1 #include #include #include "npar.h" struct binomial_test { struct one_sample_test parent; double p; double category1; double category2; double cutpoint; }; struct casereader; struct dataset; void binomial_execute (const struct dataset *, struct casereader *, enum mv_class, const struct npar_test *, bool, double); #endif pspp-1.0.1/src/language/stats/mcnemar.h0000644000175000017500000000206712470243700014723 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !mcnemar_h #define mcnemar_h 1 #include #include "data/missing-values.h" struct casereader; struct dataset; struct npar_test; void mcnemar_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact, double timer); #endif pspp-1.0.1/src/language/stats/regression.c0000644000175000017500000007265213146355723015475 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dictionary.h" #include "math/covariance.h" #include "math/linreg.h" #include "math/moments.h" #include "libpspp/message.h" #include "libpspp/taint.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid #include #define STATS_R 1 #define STATS_COEFF 2 #define STATS_ANOVA 4 #define STATS_OUTS 8 #define STATS_CI 16 #define STATS_BCOV 32 #define STATS_DEFAULT (STATS_R | STATS_COEFF | STATS_ANOVA | STATS_OUTS) struct regression { struct dataset *ds; const struct variable **vars; size_t n_vars; const struct variable **dep_vars; size_t n_dep_vars; unsigned int stats; double ci; bool resid; bool pred; bool origin; }; struct regression_workspace { /* The new variables which will be introduced by /SAVE */ const struct variable **predvars; const struct variable **residvars; /* A reader/writer pair to temporarily hold the values of the new variables */ struct casewriter *writer; struct casereader *reader; /* Indeces of the new values in the reader/writer (-1 if not applicable) */ int res_idx; int pred_idx; /* 0, 1 or 2 depending on what new variables are to be created */ int extras; }; static void run_regression (const struct regression *cmd, struct regression_workspace *ws, struct casereader *input); /* Return a string based on PREFIX which may be used as the name of a new variable in DICT */ static char * reg_get_name (const struct dictionary *dict, const char *prefix) { char *name; int i; /* XXX handle too-long prefixes */ name = xmalloc (strlen (prefix) + INT_BUFSIZE_BOUND (i) + 1); for (i = 1;; i++) { sprintf (name, "%s%d", prefix, i); if (dict_lookup_var (dict, name) == NULL) return name; } } static const struct variable * create_aux_var (struct dataset *ds, const char *prefix) { struct variable *var; struct dictionary *dict = dataset_dict (ds); char *name = reg_get_name (dict, prefix); var = dict_create_var_assert (dict, name, 0); free (name); return var; } /* Auxiliary data for transformation when /SAVE is entered */ struct save_trans_data { int n_dep_vars; struct regression_workspace *ws; }; static bool save_trans_free (void *aux) { struct save_trans_data *save_trans_data = aux; free (save_trans_data->ws->predvars); free (save_trans_data->ws->residvars); casereader_destroy (save_trans_data->ws->reader); free (save_trans_data->ws); free (save_trans_data); return true; } static int save_trans_func (void *aux, struct ccase **c, casenumber x UNUSED) { struct save_trans_data *save_trans_data = aux; struct regression_workspace *ws = save_trans_data->ws; struct ccase *in = casereader_read (ws->reader); if (in) { int k; *c = case_unshare (*c); for (k = 0; k < save_trans_data->n_dep_vars; ++k) { if (ws->pred_idx != -1) { double pred = case_data_idx (in, ws->extras * k + ws->pred_idx)->f; case_data_rw (*c, ws->predvars[k])->f = pred; } if (ws->res_idx != -1) { double resid = case_data_idx (in, ws->extras * k + ws->res_idx)->f; case_data_rw (*c, ws->residvars[k])->f = resid; } } case_unref (in); } return TRNS_CONTINUE; } int cmd_regression (struct lexer *lexer, struct dataset *ds) { struct regression_workspace workspace; struct regression regression; const struct dictionary *dict = dataset_dict (ds); bool save; memset (®ression, 0, sizeof (struct regression)); regression.ci = 0.95; regression.stats = STATS_DEFAULT; regression.pred = false; regression.resid = false; regression.ds = ds; regression.origin = false; bool variables_seen = false; bool method_seen = false; bool dependent_seen = false; while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "VARIABLES")) { if (method_seen) { msg (SE, _("VARIABLES may not appear after %s"), "METHOD"); goto error; } if (dependent_seen) { msg (SE, _("VARIABLES may not appear after %s"), "DEPENDENT"); goto error; } variables_seen = true; lex_match (lexer, T_EQUALS); if (!parse_variables_const (lexer, dict, ®ression.vars, ®ression.n_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; } else if (lex_match_id (lexer, "DEPENDENT")) { dependent_seen = true; lex_match (lexer, T_EQUALS); free (regression.dep_vars); regression.n_dep_vars = 0; if (!parse_variables_const (lexer, dict, ®ression.dep_vars, ®ression.n_dep_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; } else if (lex_match_id (lexer, "ORIGIN")) { regression.origin = true; } else if (lex_match_id (lexer, "NOORIGIN")) { regression.origin = false; } else if (lex_match_id (lexer, "METHOD")) { method_seen = true; lex_match (lexer, T_EQUALS); if (!lex_force_match_id (lexer, "ENTER")) { goto error; } if (! variables_seen) { if (!parse_variables_const (lexer, dict, ®ression.vars, ®ression.n_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; } } else if (lex_match_id (lexer, "STATISTICS")) { unsigned long statistics = 0; lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match (lexer, T_ALL)) { statistics = ~0; } else if (lex_match_id (lexer, "DEFAULTS")) { statistics |= STATS_DEFAULT; } else if (lex_match_id (lexer, "R")) { statistics |= STATS_R; } else if (lex_match_id (lexer, "COEFF")) { statistics |= STATS_COEFF; } else if (lex_match_id (lexer, "ANOVA")) { statistics |= STATS_ANOVA; } else if (lex_match_id (lexer, "BCOV")) { statistics |= STATS_BCOV; } else if (lex_match_id (lexer, "CI")) { statistics |= STATS_CI; if (lex_match (lexer, T_LPAREN) && lex_force_num (lexer)) { regression.ci = lex_number (lexer) / 100.0; lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else { lex_error (lexer, NULL); goto error; } } if (statistics) regression.stats = statistics; } else if (lex_match_id (lexer, "SAVE")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "PRED")) { regression.pred = true; } else if (lex_match_id (lexer, "RESID")) { regression.resid = true; } else { lex_error (lexer, NULL); goto error; } } } else { lex_error (lexer, NULL); goto error; } } if (!regression.vars) { dict_get_vars (dict, ®ression.vars, ®ression.n_vars, 0); } save = regression.pred || regression.resid; workspace.extras = 0; workspace.res_idx = -1; workspace.pred_idx = -1; workspace.writer = NULL; workspace.reader = NULL; workspace.residvars = NULL; workspace.predvars = NULL; if (save) { int i; struct caseproto *proto = caseproto_create (); if (regression.resid) { workspace.res_idx = workspace.extras ++; workspace.residvars = xcalloc (regression.n_dep_vars, sizeof (*workspace.residvars)); for (i = 0; i < regression.n_dep_vars; ++i) { workspace.residvars[i] = create_aux_var (ds, "RES"); proto = caseproto_add_width (proto, 0); } } if (regression.pred) { workspace.pred_idx = workspace.extras ++; workspace.predvars = xcalloc (regression.n_dep_vars, sizeof (*workspace.predvars)); for (i = 0; i < regression.n_dep_vars; ++i) { workspace.predvars[i] = create_aux_var (ds, "PRED"); proto = caseproto_add_width (proto, 0); } } if (proc_make_temporary_transformations_permanent (ds)) msg (SW, _("REGRESSION with SAVE ignores TEMPORARY. " "Temporary transformations will be made permanent.")); if (dict_get_filter (dict)) msg (SW, _("REGRESSION with SAVE ignores FILTER. " "All cases will be processed.")); workspace.writer = autopaging_writer_create (proto); caseproto_unref (proto); } { struct casegrouper *grouper; struct casereader *group; bool ok; grouper = casegrouper_create_splits (proc_open_filtering (ds, !save), dict); while (casegrouper_get_next_group (grouper, &group)) { run_regression (®ression, &workspace, group); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; } if (workspace.writer) { struct save_trans_data *save_trans_data = xmalloc (sizeof *save_trans_data); struct casereader *r = casewriter_make_reader (workspace.writer); workspace.writer = NULL; workspace.reader = r; save_trans_data->ws = xmalloc (sizeof (workspace)); memcpy (save_trans_data->ws, &workspace, sizeof (workspace)); save_trans_data->n_dep_vars = regression.n_dep_vars; add_transformation (ds, save_trans_func, save_trans_free, save_trans_data); } free (regression.vars); free (regression.dep_vars); return CMD_SUCCESS; error: free (regression.vars); free (regression.dep_vars); return CMD_FAILURE; } /* Return the size of the union of dependent and independent variables */ static size_t get_n_all_vars (const struct regression *cmd) { size_t result = cmd->n_vars; size_t i; size_t j; result += cmd->n_dep_vars; for (i = 0; i < cmd->n_dep_vars; i++) { for (j = 0; j < cmd->n_vars; j++) { if (cmd->vars[j] == cmd->dep_vars[i]) { result--; } } } return result; } /* Fill VARS with the union of dependent and independent variables */ static void fill_all_vars (const struct variable **vars, const struct regression *cmd) { size_t x = 0; size_t i; for (i = 0; i < cmd->n_vars; i++) { vars[i] = cmd->vars[i]; } for (i = 0; i < cmd->n_dep_vars; i++) { size_t j; bool absent = true; for (j = 0; j < cmd->n_vars; j++) { if (cmd->dep_vars[i] == cmd->vars[j]) { absent = false; break; } } if (absent) { vars[cmd->n_vars + x++] = cmd->dep_vars[i]; } } } /* Is variable k the dependent variable? */ static bool is_depvar (const struct regression *cmd, size_t k, const struct variable *v) { return v == cmd->vars[k]; } /* Identify the explanatory variables in v_variables. Returns the number of independent variables. */ static int identify_indep_vars (const struct regression *cmd, const struct variable **indep_vars, const struct variable *depvar) { int n_indep_vars = 0; int i; for (i = 0; i < cmd->n_vars; i++) if (!is_depvar (cmd, i, depvar)) indep_vars[n_indep_vars++] = cmd->vars[i]; if ((n_indep_vars < 1) && is_depvar (cmd, 0, depvar)) { /* There is only one independent variable, and it is the same as the dependent variable. Print a warning and continue. */ msg (SW, gettext ("The dependent variable is equal to the independent variable. " "The least squares line is therefore Y=X. " "Standard errors and related statistics may be meaningless.")); n_indep_vars = 1; indep_vars[0] = cmd->vars[0]; } return n_indep_vars; } static double fill_covariance (gsl_matrix * cov, struct covariance *all_cov, const struct variable **vars, size_t n_vars, const struct variable *dep_var, const struct variable **all_vars, size_t n_all_vars, double *means) { size_t i; size_t j; size_t dep_subscript; size_t *rows; const gsl_matrix *ssizes; const gsl_matrix *mean_matrix; const gsl_matrix *ssize_matrix; double result = 0.0; const gsl_matrix *cm = covariance_calculate_unnormalized (all_cov); if (cm == NULL) return 0; rows = xnmalloc (cov->size1 - 1, sizeof (*rows)); for (i = 0; i < n_all_vars; i++) { for (j = 0; j < n_vars; j++) { if (vars[j] == all_vars[i]) { rows[j] = i; } } if (all_vars[i] == dep_var) { dep_subscript = i; } } mean_matrix = covariance_moments (all_cov, MOMENT_MEAN); ssize_matrix = covariance_moments (all_cov, MOMENT_NONE); for (i = 0; i < cov->size1 - 1; i++) { means[i] = gsl_matrix_get (mean_matrix, rows[i], 0) / gsl_matrix_get (ssize_matrix, rows[i], 0); for (j = 0; j < cov->size2 - 1; j++) { gsl_matrix_set (cov, i, j, gsl_matrix_get (cm, rows[i], rows[j])); gsl_matrix_set (cov, j, i, gsl_matrix_get (cm, rows[j], rows[i])); } } means[cov->size1 - 1] = gsl_matrix_get (mean_matrix, dep_subscript, 0) / gsl_matrix_get (ssize_matrix, dep_subscript, 0); ssizes = covariance_moments (all_cov, MOMENT_NONE); result = gsl_matrix_get (ssizes, dep_subscript, rows[0]); for (i = 0; i < cov->size1 - 1; i++) { gsl_matrix_set (cov, i, cov->size1 - 1, gsl_matrix_get (cm, rows[i], dep_subscript)); gsl_matrix_set (cov, cov->size1 - 1, i, gsl_matrix_get (cm, rows[i], dep_subscript)); if (result > gsl_matrix_get (ssizes, rows[i], dep_subscript)) { result = gsl_matrix_get (ssizes, rows[i], dep_subscript); } } gsl_matrix_set (cov, cov->size1 - 1, cov->size1 - 1, gsl_matrix_get (cm, dep_subscript, dep_subscript)); free (rows); return result; } /* STATISTICS subcommand output functions. */ static void reg_stats_r (const struct linreg *, const struct variable *); static void reg_stats_coeff (const struct linreg *, const gsl_matrix *, const struct variable *, const struct regression *); static void reg_stats_anova (const struct linreg *, const struct variable *); static void reg_stats_bcov (const struct linreg *, const struct variable *); static void subcommand_statistics (const struct regression *cmd, const struct linreg * c, const gsl_matrix * cm, const struct variable *var) { if (cmd->stats & STATS_R) reg_stats_r (c, var); if (cmd->stats & STATS_ANOVA) reg_stats_anova (c, var); if (cmd->stats & STATS_COEFF) reg_stats_coeff (c, cm, var, cmd); if (cmd->stats & STATS_BCOV) reg_stats_bcov (c, var); } static void run_regression (const struct regression *cmd, struct regression_workspace *ws, struct casereader *input) { size_t i; struct linreg **models; int k; struct ccase *c; struct covariance *cov; struct casereader *reader; size_t n_all_vars = get_n_all_vars (cmd); const struct variable **all_vars = xnmalloc (n_all_vars, sizeof (*all_vars)); double *means = xnmalloc (n_all_vars, sizeof (*means)); fill_all_vars (all_vars, cmd); cov = covariance_1pass_create (n_all_vars, all_vars, dict_get_weight (dataset_dict (cmd->ds)), MV_ANY, cmd->origin == false); reader = casereader_clone (input); reader = casereader_create_filter_missing (reader, all_vars, n_all_vars, MV_ANY, NULL, NULL); { struct casereader *r = casereader_clone (reader); for (; (c = casereader_read (r)) != NULL; case_unref (c)) { covariance_accumulate (cov, c); } casereader_destroy (r); } models = xcalloc (cmd->n_dep_vars, sizeof (*models)); for (k = 0; k < cmd->n_dep_vars; k++) { const struct variable **vars = xnmalloc (cmd->n_vars, sizeof (*vars)); const struct variable *dep_var = cmd->dep_vars[k]; int n_indep = identify_indep_vars (cmd, vars, dep_var); gsl_matrix *this_cm = gsl_matrix_alloc (n_indep + 1, n_indep + 1); double n_data = fill_covariance (this_cm, cov, vars, n_indep, dep_var, all_vars, n_all_vars, means); models[k] = linreg_alloc (dep_var, vars, n_data, n_indep, cmd->origin); for (i = 0; i < n_indep; i++) { linreg_set_indep_variable_mean (models[k], i, means[i]); } linreg_set_depvar_mean (models[k], means[i]); if (n_data > 0) { /* Find the least-squares estimates and other statistics. */ linreg_fit (this_cm, models[k]); if (!taint_has_tainted_successor (casereader_get_taint (input))) { subcommand_statistics (cmd, models[k], this_cm, dep_var); } } else { msg (SE, _("No valid data found. This command was skipped.")); } gsl_matrix_free (this_cm); free (vars); } if (ws->extras > 0) { struct casereader *r = casereader_clone (reader); for (; (c = casereader_read (r)) != NULL; case_unref (c)) { struct ccase *outc = case_create (casewriter_get_proto (ws->writer)); for (k = 0; k < cmd->n_dep_vars; k++) { const struct variable **vars = xnmalloc (cmd->n_vars, sizeof (*vars)); const struct variable *dep_var = cmd->dep_vars[k]; int n_indep = identify_indep_vars (cmd, vars, dep_var); double *vals = xnmalloc (n_indep, sizeof (*vals)); for (i = 0; i < n_indep; i++) { const union value *tmp = case_data (c, vars[i]); vals[i] = tmp->f; } if (cmd->pred) { double pred = linreg_predict (models[k], vals, n_indep); case_data_rw_idx (outc, k * ws->extras + ws->pred_idx)->f = pred; } if (cmd->resid) { double obs = case_data (c, linreg_dep_var (models[k]))->f; double res = linreg_residual (models[k], obs, vals, n_indep); case_data_rw_idx (outc, k * ws->extras + ws->res_idx)->f = res; } free (vals); free (vars); } casewriter_write (ws->writer, outc); } casereader_destroy (r); } casereader_destroy (reader); for (k = 0; k < cmd->n_dep_vars; k++) { linreg_unref (models[k]); } free (models); free (all_vars); free (means); casereader_destroy (input); covariance_destroy (cov); } static void reg_stats_r (const struct linreg * c, const struct variable *var) { struct tab_table *t; int n_rows = 2; int n_cols = 5; double rsq; double adjrsq; double std_error; assert (c != NULL); rsq = linreg_ssreg (c) / linreg_sst (c); adjrsq = rsq - (1.0 - rsq) * linreg_n_coeffs (c) / (linreg_n_obs (c) - linreg_n_coeffs (c) - 1); std_error = sqrt (linreg_mse (c)); t = tab_create (n_cols, n_rows); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (t, TAL_2, 0, n_cols - 1, 1); tab_vline (t, TAL_2, 2, 0, n_rows - 1); tab_vline (t, TAL_0, 1, 0, 0); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("R")); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("R Square")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Adjusted R Square")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Std. Error of the Estimate")); tab_double (t, 1, 1, TAB_RIGHT, sqrt (rsq), NULL, RC_OTHER); tab_double (t, 2, 1, TAB_RIGHT, rsq, NULL, RC_OTHER); tab_double (t, 3, 1, TAB_RIGHT, adjrsq, NULL, RC_OTHER); tab_double (t, 4, 1, TAB_RIGHT, std_error, NULL, RC_OTHER); tab_title (t, _("Model Summary (%s)"), var_to_string (var)); tab_submit (t); } /* Table showing estimated regression coefficients. */ static void reg_stats_coeff (const struct linreg * c, const gsl_matrix *cov, const struct variable *var, const struct regression *cmd) { size_t j; int n_cols = 7; const int heading_rows = 2; int n_rows; int this_row = heading_rows; double pval; double std_err; double beta; const char *label; const struct variable *v; struct tab_table *t; const double df = linreg_n_obs (c) - linreg_n_coeffs (c) - 1; double q = (1 - cmd->ci) / 2.0; /* 2-tailed test */ double tval = gsl_cdf_tdist_Qinv (q, df); assert (c != NULL); n_rows = linreg_n_coeffs (c) + heading_rows + 1; if (cmd->stats & STATS_CI) n_cols += 2; t = tab_create (n_cols, n_rows); tab_headers (t, 2, 0, 1, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (t, TAL_2, 0, n_cols - 1, heading_rows); tab_vline (t, TAL_2, 2, 0, n_rows - 1); tab_vline (t, TAL_0, 1, 0, 0); tab_hline (t, TAL_1, 2, 4, 1); tab_joint_text (t, 2, 0, 3, 0, TAB_CENTER | TAT_TITLE, _("Unstandardized Coefficients")); tab_text (t, 2, 1, TAB_CENTER | TAT_TITLE, _("B")); tab_text (t, 3, 1, TAB_CENTER | TAT_TITLE, _("Std. Error")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Standardized Coefficients")); tab_text (t, 4, 1, TAB_CENTER | TAT_TITLE, _("Beta")); tab_text (t, 5, 1, TAB_CENTER | TAT_TITLE, _("t")); tab_text (t, 6, 1, TAB_CENTER | TAT_TITLE, _("Sig.")); std_err = sqrt (gsl_matrix_get (linreg_cov (c), 0, 0)); if (cmd->stats & STATS_CI) { double lower = linreg_intercept (c) - tval * std_err ; double upper = linreg_intercept (c) + tval * std_err ; tab_double (t, 7, heading_rows, 0, lower, NULL, RC_OTHER); tab_double (t, 8, heading_rows, 0, upper, NULL, RC_OTHER); tab_joint_text_format (t, 7, 0, 8, 0, TAB_CENTER | TAT_TITLE, _("%g%% Confidence Interval for B"), cmd->ci * 100); tab_hline (t, TAL_1, 7, 8, 1); tab_text (t, 7, 1, TAB_CENTER | TAT_TITLE, _("Lower Bound")); tab_text (t, 8, 1, TAB_CENTER | TAT_TITLE, _("Upper Bound")); } if (!cmd->origin) { tab_text (t, 1, this_row, TAB_LEFT | TAT_TITLE, _("(Constant)")); tab_double (t, 2, this_row, 0, linreg_intercept (c), NULL, RC_OTHER); tab_double (t, 3, this_row, 0, std_err, NULL, RC_OTHER); tab_double (t, 4, this_row, 0, 0.0, NULL, RC_OTHER); double t_stat = linreg_intercept (c) / std_err; tab_double (t, 5, this_row, 0, t_stat, NULL, RC_OTHER); double pval = 2 * gsl_cdf_tdist_Q (fabs (t_stat), (double) (linreg_n_obs (c) - linreg_n_coeffs (c))); tab_double (t, 6, this_row, 0, pval, NULL, RC_PVALUE); this_row++; } for (j = 0; j < linreg_n_coeffs (c); j++, this_row++) { struct string tstr; ds_init_empty (&tstr); v = linreg_indep_var (c, j); label = var_to_string (v); /* Do not overwrite the variable's name. */ ds_put_cstr (&tstr, label); tab_text (t, 1, this_row, TAB_LEFT, ds_cstr (&tstr)); /* Regression coefficients. */ tab_double (t, 2, this_row, 0, linreg_coeff (c, j), NULL, RC_OTHER); /* Standard error of the coefficients. */ std_err = sqrt (gsl_matrix_get (linreg_cov (c), j + 1, j + 1)); tab_double (t, 3, this_row, 0, std_err, NULL, RC_OTHER); /* Standardized coefficient, i.e., regression coefficient if all variables had unit variance. */ beta = sqrt (gsl_matrix_get (cov, j, j)); beta *= linreg_coeff (c, j) / sqrt (gsl_matrix_get (cov, cov->size1 - 1, cov->size2 - 1)); tab_double (t, 4, this_row, 0, beta, NULL, RC_OTHER); /* Test statistic for H0: coefficient is 0. */ double t_stat = linreg_coeff (c, j) / std_err; tab_double (t, 5, this_row, 0, t_stat, NULL, RC_OTHER); /* P values for the test statistic above. */ pval = 2 * gsl_cdf_tdist_Q (fabs (t_stat), df); tab_double (t, 6, this_row, 0, pval, NULL, RC_PVALUE); ds_destroy (&tstr); if (cmd->stats & STATS_CI) { double lower = linreg_coeff (c, j) - tval * std_err ; double upper = linreg_coeff (c, j) + tval * std_err ; tab_double (t, 7, this_row, 0, lower, NULL, RC_OTHER); tab_double (t, 8, this_row, 0, upper, NULL, RC_OTHER); } } tab_title (t, _("Coefficients (%s)"), var_to_string (var)); tab_submit (t); } /* Display the ANOVA table. */ static void reg_stats_anova (const struct linreg * c, const struct variable *var) { int n_cols = 7; int n_rows = 4; const double msm = linreg_ssreg (c) / linreg_dfmodel (c); const double mse = linreg_mse (c); const double F = msm / mse; const double pval = gsl_cdf_fdist_Q (F, linreg_dfmodel (c), linreg_dferror (c)); struct tab_table *t; assert (c != NULL); t = tab_create (n_cols, n_rows); tab_headers (t, 2, 0, 1, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (t, TAL_2, 0, n_cols - 1, 1); tab_vline (t, TAL_2, 2, 0, n_rows - 1); tab_vline (t, TAL_0, 1, 0, 0); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Sum of Squares")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("df")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Mean Square")); tab_text (t, 5, 0, TAB_CENTER | TAT_TITLE, _("F")); tab_text (t, 6, 0, TAB_CENTER | TAT_TITLE, _("Sig.")); tab_text (t, 1, 1, TAB_LEFT | TAT_TITLE, _("Regression")); tab_text (t, 1, 2, TAB_LEFT | TAT_TITLE, _("Residual")); tab_text (t, 1, 3, TAB_LEFT | TAT_TITLE, _("Total")); /* Sums of Squares */ tab_double (t, 2, 1, 0, linreg_ssreg (c), NULL, RC_OTHER); tab_double (t, 2, 3, 0, linreg_sst (c), NULL, RC_OTHER); tab_double (t, 2, 2, 0, linreg_sse (c), NULL, RC_OTHER); /* Degrees of freedom */ tab_text_format (t, 3, 1, TAB_RIGHT, "%.*g", DBL_DIG + 1, linreg_dfmodel (c)); tab_text_format (t, 3, 2, TAB_RIGHT, "%.*g", DBL_DIG + 1, linreg_dferror (c)); tab_text_format (t, 3, 3, TAB_RIGHT, "%.*g", DBL_DIG + 1, linreg_dftotal (c)); /* Mean Squares */ tab_double (t, 4, 1, TAB_RIGHT, msm, NULL, RC_OTHER); tab_double (t, 4, 2, TAB_RIGHT, mse, NULL, RC_OTHER); tab_double (t, 5, 1, 0, F, NULL, RC_OTHER); tab_double (t, 6, 1, 0, pval, NULL, RC_PVALUE); tab_title (t, _("ANOVA (%s)"), var_to_string (var)); tab_submit (t); } static void reg_stats_bcov (const struct linreg * c, const struct variable *var) { int n_cols; int n_rows; int i; int k; int row; int col; const char *label; struct tab_table *t; assert (c != NULL); n_cols = linreg_n_indeps (c) + 1 + 2; n_rows = 2 * (linreg_n_indeps (c) + 1); t = tab_create (n_cols, n_rows); tab_headers (t, 2, 0, 1, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (t, TAL_2, 0, n_cols - 1, 1); tab_vline (t, TAL_2, 2, 0, n_rows - 1); tab_vline (t, TAL_0, 1, 0, 0); tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Model")); tab_text (t, 1, 1, TAB_CENTER | TAT_TITLE, _("Covariances")); for (i = 0; i < linreg_n_coeffs (c); i++) { const struct variable *v = linreg_indep_var (c, i); label = var_to_string (v); tab_text (t, 2, i, TAB_CENTER, label); tab_text (t, i + 2, 0, TAB_CENTER, label); for (k = 1; k < linreg_n_coeffs (c); k++) { col = (i <= k) ? k : i; row = (i <= k) ? i : k; tab_double (t, k + 2, i, TAB_CENTER, gsl_matrix_get (linreg_cov (c), row, col), NULL, RC_OTHER); } } tab_title (t, _("Coefficient Correlations (%s)"), var_to_string (var)); tab_submit (t); } pspp-1.0.1/src/language/stats/chart-category.h0000644000175000017500000000211613137223525016214 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef BARCHART_DEF_H #define BARCHART_DEF_H 1 struct ag_func { const char *name; const char *description; int arity; bool cumulative; double (*pre) (void); double (*calc) (double acc, double x, double w); double (*post) (double acc, double cc); double (*ppost) (double acc, double ccc); }; extern const struct ag_func ag_func[]; extern const int N_AG_FUNCS; #endif pspp-1.0.1/src/language/stats/jonckheere-terpstra.h0000644000175000017500000000233012470243700017251 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !jonckheere_terpstra_h #define jonckheere_terpstra_h 1 #include #include #include "data/case.h" #include "language/stats/npar.h" struct jonckheere_terpstra_test { struct two_sample_test parent; }; struct casereader; struct dataset; void jonckheere_terpstra_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact, double timer ); #endif pspp-1.0.1/src/language/stats/roc.c0000644000175000017500000007256113146355723014077 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/roc.h" #include #include "data/casegrouper.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/subcase.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "libpspp/misc.h" #include "math/sort.h" #include "output/chart-item.h" #include "output/charts/roc-chart.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid struct cmd_roc { size_t n_vars; const struct variable **vars; const struct dictionary *dict; const struct variable *state_var; union value state_value; size_t state_var_width; /* Plot the roc curve */ bool curve; /* Plot the reference line */ bool reference; double ci; bool print_coords; bool print_se; bool bi_neg_exp; /* True iff the bi-negative exponential critieria should be used */ enum mv_class exclude; bool invert ; /* True iff a smaller test result variable indicates a positive result */ double pos; double neg; double pos_weighted; double neg_weighted; }; static int run_roc (struct dataset *ds, struct cmd_roc *roc); int cmd_roc (struct lexer *lexer, struct dataset *ds) { struct cmd_roc roc ; const struct dictionary *dict = dataset_dict (ds); roc.vars = NULL; roc.n_vars = 0; roc.print_se = false; roc.print_coords = false; roc.exclude = MV_ANY; roc.curve = true; roc.reference = false; roc.ci = 95; roc.bi_neg_exp = false; roc.invert = false; roc.pos = roc.pos_weighted = 0; roc.neg = roc.neg_weighted = 0; roc.dict = dataset_dict (ds); roc.state_var = NULL; roc.state_var_width = -1; lex_match (lexer, T_SLASH); if (!parse_variables_const (lexer, dict, &roc.vars, &roc.n_vars, PV_APPEND | PV_NO_DUPLICATE | PV_NUMERIC)) goto error; if ( ! lex_force_match (lexer, T_BY)) { goto error; } roc.state_var = parse_variable (lexer, dict); if (! roc.state_var) { goto error; } if ( !lex_force_match (lexer, T_LPAREN)) { goto error; } roc.state_var_width = var_get_width (roc.state_var); value_init (&roc.state_value, roc.state_var_width); parse_value (lexer, &roc.state_value, roc.state_var); if ( !lex_force_match (lexer, T_RPAREN)) { goto error; } while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "INCLUDE")) { roc.exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "EXCLUDE")) { roc.exclude = MV_ANY; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "PLOT")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "CURVE")) { roc.curve = true; if (lex_match (lexer, T_LPAREN)) { roc.reference = true; if (! lex_force_match_id (lexer, "REFERENCE")) goto error; if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "NONE")) { roc.curve = false; } else { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "PRINT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "SE")) { roc.print_se = true; } else if (lex_match_id (lexer, "COORDINATES")) { roc.print_coords = true; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "CRITERIA")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "CUTOFF")) { if (! lex_force_match (lexer, T_LPAREN)) goto error; if (lex_match_id (lexer, "INCLUDE")) { roc.exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "EXCLUDE")) { roc.exclude = MV_USER | MV_SYSTEM; } else { lex_error (lexer, NULL); goto error; } if (! lex_force_match (lexer, T_RPAREN)) goto error; } else if (lex_match_id (lexer, "TESTPOS")) { if (! lex_force_match (lexer, T_LPAREN)) goto error; if (lex_match_id (lexer, "LARGE")) { roc.invert = false; } else if (lex_match_id (lexer, "SMALL")) { roc.invert = true; } else { lex_error (lexer, NULL); goto error; } if (! lex_force_match (lexer, T_RPAREN)) goto error; } else if (lex_match_id (lexer, "CI")) { if (!lex_force_match (lexer, T_LPAREN)) goto error; if (! lex_force_num (lexer)) goto error; roc.ci = lex_number (lexer); lex_get (lexer); if (!lex_force_match (lexer, T_RPAREN)) goto error; } else if (lex_match_id (lexer, "DISTRIBUTION")) { if (!lex_force_match (lexer, T_LPAREN)) goto error; if (lex_match_id (lexer, "FREE")) { roc.bi_neg_exp = false; } else if (lex_match_id (lexer, "NEGEXPO")) { roc.bi_neg_exp = true; } else { lex_error (lexer, NULL); goto error; } if (!lex_force_match (lexer, T_RPAREN)) goto error; } else { lex_error (lexer, NULL); goto error; } } } else { lex_error (lexer, NULL); break; } } if ( ! run_roc (ds, &roc)) goto error; if ( roc.state_var) value_destroy (&roc.state_value, roc.state_var_width); free (roc.vars); return CMD_SUCCESS; error: if ( roc.state_var) value_destroy (&roc.state_value, roc.state_var_width); free (roc.vars); return CMD_FAILURE; } static void do_roc (struct cmd_roc *roc, struct casereader *group, struct dictionary *dict); static int run_roc (struct dataset *ds, struct cmd_roc *roc) { struct dictionary *dict = dataset_dict (ds); bool ok; struct casereader *group; struct casegrouper *grouper = casegrouper_create_splits (proc_open (ds), dict); while (casegrouper_get_next_group (grouper, &group)) { do_roc (roc, group, dataset_dict (ds)); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; return ok; } #if 0 static void dump_casereader (struct casereader *reader) { struct ccase *c; struct casereader *r = casereader_clone (reader); for ( ; (c = casereader_read (r) ); case_unref (c)) { int i; for (i = 0 ; i < case_get_value_cnt (c); ++i) { printf ("%g ", case_data_idx (c, i)->f); } printf ("\n"); } casereader_destroy (r); } #endif /* Return true iff the state variable indicates that C has positive actual state. As a side effect, this function also accumulates the roc->{pos,neg} and roc->{pos,neg}_weighted counts. */ static bool match_positives (const struct ccase *c, void *aux) { struct cmd_roc *roc = aux; const struct variable *wv = dict_get_weight (roc->dict); const double weight = wv ? case_data (c, wv)->f : 1.0; const bool positive = ( 0 == value_compare_3way (case_data (c, roc->state_var), &roc->state_value, var_get_width (roc->state_var))); if ( positive ) { roc->pos++; roc->pos_weighted += weight; } else { roc->neg++; roc->neg_weighted += weight; } return positive; } #define VALUE 0 #define N_EQ 1 #define N_PRED 2 /* Some intermediate state for calculating the cutpoints and the standard error values */ struct roc_state { double auc; /* Area under the curve */ double n1; /* total weight of positives */ double n2; /* total weight of negatives */ /* intermediates for standard error */ double q1hat; double q2hat; /* intermediates for cutpoints */ struct casewriter *cutpoint_wtr; struct casereader *cutpoint_rdr; double prev_result; double min; double max; }; /* Return a new casereader based upon CUTPOINT_RDR. The number of "positive" cases are placed into the position TRUE_INDEX, and the number of "negative" cases into FALSE_INDEX. POS_COND and RESULT determine the semantics of what is "positive". WEIGHT is the value of a single count. */ static struct casereader * accumulate_counts (struct casereader *input, double result, double weight, bool (*pos_cond) (double, double), int true_index, int false_index) { const struct caseproto *proto = casereader_get_proto (input); struct casewriter *w = autopaging_writer_create (proto); struct ccase *cpc; double prev_cp = SYSMIS; for ( ; (cpc = casereader_read (input) ); case_unref (cpc)) { struct ccase *new_case; const double cp = case_data_idx (cpc, ROC_CUTPOINT)->f; assert (cp != SYSMIS); /* We don't want duplicates here */ if ( cp == prev_cp ) continue; new_case = case_clone (cpc); if ( pos_cond (result, cp)) case_data_rw_idx (new_case, true_index)->f += weight; else case_data_rw_idx (new_case, false_index)->f += weight; prev_cp = cp; casewriter_write (w, new_case); } casereader_destroy (input); return casewriter_make_reader (w); } static void output_roc (struct roc_state *rs, const struct cmd_roc *roc); /* This function does 3 things: 1. Counts the number of cases which are equal to every other case in READER, and those cases for which the relationship between it and every other case satifies PRED (normally either > or <). VAR is variable defining a case's value for this purpose. 2. Counts the number of true and false cases in reader, and populates CUTPOINT_RDR accordingly. TRUE_INDEX and FALSE_INDEX are the indices which receive these values. POS_COND is the condition defining true and false. 3. CC is filled with the cumulative weight of all cases of READER. */ static struct casereader * process_group (const struct variable *var, struct casereader *reader, bool (*pred) (double, double), const struct dictionary *dict, double *cc, struct casereader **cutpoint_rdr, bool (*pos_cond) (double, double), int true_index, int false_index) { const struct variable *w = dict_get_weight (dict); struct casereader *r1 = casereader_create_distinct (sort_execute_1var (reader, var), var, w); const int weight_idx = w ? var_get_case_index (w) : caseproto_get_n_widths (casereader_get_proto (r1)) - 1; struct ccase *c1; struct casereader *rclone = casereader_clone (r1); struct casewriter *wtr; struct caseproto *proto = caseproto_create (); proto = caseproto_add_width (proto, 0); proto = caseproto_add_width (proto, 0); proto = caseproto_add_width (proto, 0); wtr = autopaging_writer_create (proto); *cc = 0; for ( ; (c1 = casereader_read (r1) ); case_unref (c1)) { struct ccase *new_case = case_create (proto); struct ccase *c2; struct casereader *r2 = casereader_clone (rclone); const double weight1 = case_data_idx (c1, weight_idx)->f; const double d1 = case_data (c1, var)->f; double n_eq = 0.0; double n_pred = 0.0; *cutpoint_rdr = accumulate_counts (*cutpoint_rdr, d1, weight1, pos_cond, true_index, false_index); *cc += weight1; for ( ; (c2 = casereader_read (r2) ); case_unref (c2)) { const double d2 = case_data (c2, var)->f; const double weight2 = case_data_idx (c2, weight_idx)->f; if ( d1 == d2 ) { n_eq += weight2; continue; } else if ( pred (d2, d1)) { n_pred += weight2; } } case_data_rw_idx (new_case, VALUE)->f = d1; case_data_rw_idx (new_case, N_EQ)->f = n_eq; case_data_rw_idx (new_case, N_PRED)->f = n_pred; casewriter_write (wtr, new_case); casereader_destroy (r2); } casereader_destroy (r1); casereader_destroy (rclone); caseproto_unref (proto); return casewriter_make_reader (wtr); } /* Some more indeces into case data */ #define N_POS_EQ 1 /* number of positive cases with values equal to n */ #define N_POS_GT 2 /* number of positive cases with values greater than n */ #define N_NEG_EQ 3 /* number of negative cases with values equal to n */ #define N_NEG_LT 4 /* number of negative cases with values less than n */ static bool gt (double d1, double d2) { return d1 > d2; } static bool ge (double d1, double d2) { return d1 > d2; } static bool lt (double d1, double d2) { return d1 < d2; } /* Return a casereader with width 3, populated with cases based upon READER. The cases will have the values: (N, number of cases equal to N, number of cases greater than N) As a side effect, update RS->n1 with the number of positive cases. */ static struct casereader * process_positive_group (const struct variable *var, struct casereader *reader, const struct dictionary *dict, struct roc_state *rs) { return process_group (var, reader, gt, dict, &rs->n1, &rs->cutpoint_rdr, ge, ROC_TP, ROC_FN); } /* Return a casereader with width 3, populated with cases based upon READER. The cases will have the values: (N, number of cases equal to N, number of cases less than N) As a side effect, update RS->n2 with the number of negative cases. */ static struct casereader * process_negative_group (const struct variable *var, struct casereader *reader, const struct dictionary *dict, struct roc_state *rs) { return process_group (var, reader, lt, dict, &rs->n2, &rs->cutpoint_rdr, lt, ROC_TN, ROC_FP); } static void append_cutpoint (struct casewriter *writer, double cutpoint) { struct ccase *cc = case_create (casewriter_get_proto (writer)); case_data_rw_idx (cc, ROC_CUTPOINT)->f = cutpoint; case_data_rw_idx (cc, ROC_TP)->f = 0; case_data_rw_idx (cc, ROC_FN)->f = 0; case_data_rw_idx (cc, ROC_TN)->f = 0; case_data_rw_idx (cc, ROC_FP)->f = 0; casewriter_write (writer, cc); } /* Create and initialise the rs[x].cutpoint_rdr casereaders. That is, the readers will be created with width 5, ready to take the values (cutpoint, ROC_TP, ROC_FN, ROC_TN, ROC_FP), and the reader will be populated with its final number of cases. However on exit from this function, only ROC_CUTPOINT entries will be set to their final value. The other entries will be initialised to zero. */ static void prepare_cutpoints (struct cmd_roc *roc, struct roc_state *rs, struct casereader *input) { int i; struct casereader *r = casereader_clone (input); struct ccase *c; { struct caseproto *proto = caseproto_create (); struct subcase ordering; subcase_init (&ordering, ROC_CUTPOINT, 0, SC_ASCEND); proto = caseproto_add_width (proto, 0); /* cutpoint */ proto = caseproto_add_width (proto, 0); /* ROC_TP */ proto = caseproto_add_width (proto, 0); /* ROC_FN */ proto = caseproto_add_width (proto, 0); /* ROC_TN */ proto = caseproto_add_width (proto, 0); /* ROC_FP */ for (i = 0 ; i < roc->n_vars; ++i) { rs[i].cutpoint_wtr = sort_create_writer (&ordering, proto); rs[i].prev_result = SYSMIS; rs[i].max = -DBL_MAX; rs[i].min = DBL_MAX; } caseproto_unref (proto); subcase_destroy (&ordering); } for (; (c = casereader_read (r)) != NULL; case_unref (c)) { for (i = 0 ; i < roc->n_vars; ++i) { const union value *v = case_data (c, roc->vars[i]); const double result = v->f; if ( mv_is_value_missing (var_get_missing_values (roc->vars[i]), v, roc->exclude)) continue; minimize (&rs[i].min, result); maximize (&rs[i].max, result); if ( rs[i].prev_result != SYSMIS && rs[i].prev_result != result ) { const double mean = (result + rs[i].prev_result ) / 2.0; append_cutpoint (rs[i].cutpoint_wtr, mean); } rs[i].prev_result = result; } } casereader_destroy (r); /* Append the min and max cutpoints */ for (i = 0 ; i < roc->n_vars; ++i) { append_cutpoint (rs[i].cutpoint_wtr, rs[i].min - 1); append_cutpoint (rs[i].cutpoint_wtr, rs[i].max + 1); rs[i].cutpoint_rdr = casewriter_make_reader (rs[i].cutpoint_wtr); } } static void do_roc (struct cmd_roc *roc, struct casereader *reader, struct dictionary *dict) { int i; struct roc_state *rs = xcalloc (roc->n_vars, sizeof *rs); struct casereader *negatives = NULL; struct casereader *positives = NULL; struct caseproto *n_proto = NULL; struct subcase up_ordering; struct subcase down_ordering; struct casewriter *neg_wtr = NULL; struct casereader *input = casereader_create_filter_missing (reader, roc->vars, roc->n_vars, roc->exclude, NULL, NULL); input = casereader_create_filter_missing (input, &roc->state_var, 1, roc->exclude, NULL, NULL); neg_wtr = autopaging_writer_create (casereader_get_proto (input)); prepare_cutpoints (roc, rs, input); /* Separate the positive actual state cases from the negative ones */ positives = casereader_create_filter_func (input, match_positives, NULL, roc, neg_wtr); n_proto = caseproto_create (); n_proto = caseproto_add_width (n_proto, 0); n_proto = caseproto_add_width (n_proto, 0); n_proto = caseproto_add_width (n_proto, 0); n_proto = caseproto_add_width (n_proto, 0); n_proto = caseproto_add_width (n_proto, 0); subcase_init (&up_ordering, VALUE, 0, SC_ASCEND); subcase_init (&down_ordering, VALUE, 0, SC_DESCEND); for (i = 0 ; i < roc->n_vars; ++i) { struct casewriter *w = NULL; struct casereader *r = NULL; struct ccase *c; struct ccase *cpos; struct casereader *n_neg_reader ; const struct variable *var = roc->vars[i]; struct casereader *neg ; struct casereader *pos = casereader_clone (positives); struct casereader *n_pos_reader = process_positive_group (var, pos, dict, &rs[i]); if ( negatives == NULL) { negatives = casewriter_make_reader (neg_wtr); } neg = casereader_clone (negatives); n_neg_reader = process_negative_group (var, neg, dict, &rs[i]); /* Merge the n_pos and n_neg casereaders */ w = sort_create_writer (&up_ordering, n_proto); for ( ; (cpos = casereader_read (n_pos_reader) ); case_unref (cpos)) { struct ccase *pos_case = case_create (n_proto); struct ccase *cneg; const double jpos = case_data_idx (cpos, VALUE)->f; while ((cneg = casereader_read (n_neg_reader))) { struct ccase *nc = case_create (n_proto); const double jneg = case_data_idx (cneg, VALUE)->f; case_data_rw_idx (nc, VALUE)->f = jneg; case_data_rw_idx (nc, N_POS_EQ)->f = 0; case_data_rw_idx (nc, N_POS_GT)->f = SYSMIS; *case_data_rw_idx (nc, N_NEG_EQ) = *case_data_idx (cneg, N_EQ); *case_data_rw_idx (nc, N_NEG_LT) = *case_data_idx (cneg, N_PRED); casewriter_write (w, nc); case_unref (cneg); if ( jneg > jpos) break; } case_data_rw_idx (pos_case, VALUE)->f = jpos; *case_data_rw_idx (pos_case, N_POS_EQ) = *case_data_idx (cpos, N_EQ); *case_data_rw_idx (pos_case, N_POS_GT) = *case_data_idx (cpos, N_PRED); case_data_rw_idx (pos_case, N_NEG_EQ)->f = 0; case_data_rw_idx (pos_case, N_NEG_LT)->f = SYSMIS; casewriter_write (w, pos_case); } casereader_destroy (n_pos_reader); casereader_destroy (n_neg_reader); /* These aren't used anymore */ #undef N_EQ #undef N_PRED r = casewriter_make_reader (w); /* Propagate the N_POS_GT values from the positive cases to the negative ones */ { double prev_pos_gt = rs[i].n1; w = sort_create_writer (&down_ordering, n_proto); for ( ; (c = casereader_read (r) ); case_unref (c)) { double n_pos_gt = case_data_idx (c, N_POS_GT)->f; struct ccase *nc = case_clone (c); if ( n_pos_gt == SYSMIS) { n_pos_gt = prev_pos_gt; case_data_rw_idx (nc, N_POS_GT)->f = n_pos_gt; } casewriter_write (w, nc); prev_pos_gt = n_pos_gt; } casereader_destroy (r); r = casewriter_make_reader (w); } /* Propagate the N_NEG_LT values from the negative cases to the positive ones */ { double prev_neg_lt = rs[i].n2; w = sort_create_writer (&up_ordering, n_proto); for ( ; (c = casereader_read (r) ); case_unref (c)) { double n_neg_lt = case_data_idx (c, N_NEG_LT)->f; struct ccase *nc = case_clone (c); if ( n_neg_lt == SYSMIS) { n_neg_lt = prev_neg_lt; case_data_rw_idx (nc, N_NEG_LT)->f = n_neg_lt; } casewriter_write (w, nc); prev_neg_lt = n_neg_lt; } casereader_destroy (r); r = casewriter_make_reader (w); } { struct ccase *prev_case = NULL; for ( ; (c = casereader_read (r) ); case_unref (c)) { struct ccase *next_case = casereader_peek (r, 0); const double j = case_data_idx (c, VALUE)->f; double n_pos_eq = case_data_idx (c, N_POS_EQ)->f; double n_pos_gt = case_data_idx (c, N_POS_GT)->f; double n_neg_eq = case_data_idx (c, N_NEG_EQ)->f; double n_neg_lt = case_data_idx (c, N_NEG_LT)->f; if ( prev_case && j == case_data_idx (prev_case, VALUE)->f) { if ( 0 == case_data_idx (c, N_POS_EQ)->f) { n_pos_eq = case_data_idx (prev_case, N_POS_EQ)->f; n_pos_gt = case_data_idx (prev_case, N_POS_GT)->f; } if ( 0 == case_data_idx (c, N_NEG_EQ)->f) { n_neg_eq = case_data_idx (prev_case, N_NEG_EQ)->f; n_neg_lt = case_data_idx (prev_case, N_NEG_LT)->f; } } if ( NULL == next_case || j != case_data_idx (next_case, VALUE)->f) { rs[i].auc += n_pos_gt * n_neg_eq + (n_pos_eq * n_neg_eq) / 2.0; rs[i].q1hat += n_neg_eq * ( pow2 (n_pos_gt) + n_pos_gt * n_pos_eq + pow2 (n_pos_eq) / 3.0); rs[i].q2hat += n_pos_eq * ( pow2 (n_neg_lt) + n_neg_lt * n_neg_eq + pow2 (n_neg_eq) / 3.0); } case_unref (next_case); case_unref (prev_case); prev_case = case_clone (c); } casereader_destroy (r); case_unref (prev_case); rs[i].auc /= rs[i].n1 * rs[i].n2; if ( roc->invert ) rs[i].auc = 1 - rs[i].auc; if ( roc->bi_neg_exp ) { rs[i].q1hat = rs[i].auc / ( 2 - rs[i].auc); rs[i].q2hat = 2 * pow2 (rs[i].auc) / ( 1 + rs[i].auc); } else { rs[i].q1hat /= rs[i].n2 * pow2 (rs[i].n1); rs[i].q2hat /= rs[i].n1 * pow2 (rs[i].n2); } } } casereader_destroy (positives); casereader_destroy (negatives); caseproto_unref (n_proto); subcase_destroy (&up_ordering); subcase_destroy (&down_ordering); output_roc (rs, roc); for (i = 0 ; i < roc->n_vars; ++i) casereader_destroy (rs[i].cutpoint_rdr); free (rs); } static void show_auc (struct roc_state *rs, const struct cmd_roc *roc) { int i; const int n_fields = roc->print_se ? 5 : 1; const int n_cols = roc->n_vars > 1 ? n_fields + 1: n_fields; const int n_rows = 2 + roc->n_vars; struct tab_table *tbl = tab_create (n_cols, n_rows); if ( roc->n_vars > 1) tab_title (tbl, _("Area Under the Curve")); else tab_title (tbl, _("Area Under the Curve (%s)"), var_to_string (roc->vars[0])); tab_headers (tbl, n_cols - n_fields, 0, 1, 0); tab_text (tbl, n_cols - n_fields, 1, TAT_TITLE, _("Area")); tab_hline (tbl, TAL_2, 0, n_cols - 1, 2); tab_box (tbl, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); if ( roc->print_se ) { tab_text (tbl, n_cols - 4, 1, TAT_TITLE, _("Std. Error")); tab_text (tbl, n_cols - 3, 1, TAT_TITLE, _("Asymptotic Sig.")); tab_text (tbl, n_cols - 2, 1, TAT_TITLE, _("Lower Bound")); tab_text (tbl, n_cols - 1, 1, TAT_TITLE, _("Upper Bound")); tab_joint_text_format (tbl, n_cols - 2, 0, 4, 0, TAT_TITLE | TAB_CENTER, _("Asymp. %g%% Confidence Interval"), roc->ci); tab_vline (tbl, 0, n_cols - 1, 0, 0); tab_hline (tbl, TAL_1, n_cols - 2, n_cols - 1, 1); } if ( roc->n_vars > 1) tab_text (tbl, 0, 1, TAT_TITLE, _("Variable under test")); if ( roc->n_vars > 1) tab_vline (tbl, TAL_2, 1, 0, n_rows - 1); for ( i = 0 ; i < roc->n_vars ; ++i ) { tab_text (tbl, 0, 2 + i, TAT_TITLE, var_to_string (roc->vars[i])); tab_double (tbl, n_cols - n_fields, 2 + i, 0, rs[i].auc, NULL, RC_OTHER); if ( roc->print_se ) { double se ; const double sd_0_5 = sqrt ((rs[i].n1 + rs[i].n2 + 1) / (12 * rs[i].n1 * rs[i].n2)); double ci ; double yy ; se = rs[i].auc * (1 - rs[i].auc) + (rs[i].n1 - 1) * (rs[i].q1hat - pow2 (rs[i].auc)) + (rs[i].n2 - 1) * (rs[i].q2hat - pow2 (rs[i].auc)); se /= rs[i].n1 * rs[i].n2; se = sqrt (se); tab_double (tbl, n_cols - 4, 2 + i, 0, se, NULL, RC_OTHER); ci = 1 - roc->ci / 100.0; yy = gsl_cdf_gaussian_Qinv (ci, se) ; tab_double (tbl, n_cols - 2, 2 + i, 0, rs[i].auc - yy, NULL, RC_OTHER); tab_double (tbl, n_cols - 1, 2 + i, 0, rs[i].auc + yy, NULL, RC_OTHER); tab_double (tbl, n_cols - 3, 2 + i, 0, 2.0 * gsl_cdf_ugaussian_Q (fabs ((rs[i].auc - 0.5 ) / sd_0_5)), NULL, RC_PVALUE); } } tab_submit (tbl); } static void show_summary (const struct cmd_roc *roc) { const int n_cols = 3; const int n_rows = 4; struct tab_table *tbl = tab_create (n_cols, n_rows); tab_title (tbl, _("Case Summary")); tab_headers (tbl, 1, 0, 2, 0); tab_box (tbl, TAL_2, TAL_2, -1, -1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (tbl, TAL_2, 0, n_cols - 1, 2); tab_vline (tbl, TAL_2, 1, 0, n_rows - 1); tab_hline (tbl, TAL_2, 1, n_cols - 1, 1); tab_vline (tbl, TAL_1, 2, 1, n_rows - 1); tab_text (tbl, 0, 1, TAT_TITLE | TAB_LEFT, var_to_string (roc->state_var)); tab_text (tbl, 1, 1, TAT_TITLE, _("Unweighted")); tab_text (tbl, 2, 1, TAT_TITLE, _("Weighted")); tab_joint_text (tbl, 1, 0, 2, 0, TAT_TITLE | TAB_CENTER, _("Valid N (listwise)")); tab_text (tbl, 0, 2, TAB_LEFT, _("Positive")); tab_text (tbl, 0, 3, TAB_LEFT, _("Negative")); tab_double (tbl, 1, 2, 0, roc->pos, NULL, RC_INTEGER); tab_double (tbl, 1, 3, 0, roc->neg, NULL, RC_INTEGER); tab_double (tbl, 2, 2, 0, roc->pos_weighted, NULL, RC_OTHER); tab_double (tbl, 2, 3, 0, roc->neg_weighted, NULL, RC_OTHER); tab_submit (tbl); } static void show_coords (struct roc_state *rs, const struct cmd_roc *roc) { int x = 1; int i; const int n_cols = roc->n_vars > 1 ? 4 : 3; int n_rows = 1; struct tab_table *tbl ; for (i = 0; i < roc->n_vars; ++i) n_rows += casereader_count_cases (rs[i].cutpoint_rdr); tbl = tab_create (n_cols, n_rows); if ( roc->n_vars > 1) tab_title (tbl, _("Coordinates of the Curve")); else tab_title (tbl, _("Coordinates of the Curve (%s)"), var_to_string (roc->vars[0])); tab_headers (tbl, 1, 0, 1, 0); tab_hline (tbl, TAL_2, 0, n_cols - 1, 1); if ( roc->n_vars > 1) tab_text (tbl, 0, 0, TAT_TITLE, _("Test variable")); tab_text (tbl, n_cols - 3, 0, TAT_TITLE, _("Positive if greater than or equal to")); tab_text (tbl, n_cols - 2, 0, TAT_TITLE, _("Sensitivity")); tab_text (tbl, n_cols - 1, 0, TAT_TITLE, _("1 - Specificity")); tab_box (tbl, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); if ( roc->n_vars > 1) tab_vline (tbl, TAL_2, 1, 0, n_rows - 1); for (i = 0; i < roc->n_vars; ++i) { struct ccase *cc; struct casereader *r = casereader_clone (rs[i].cutpoint_rdr); if ( roc->n_vars > 1) tab_text (tbl, 0, x, TAT_TITLE, var_to_string (roc->vars[i])); if ( i > 0) tab_hline (tbl, TAL_1, 0, n_cols - 1, x); for (; (cc = casereader_read (r)) != NULL; case_unref (cc), x++) { const double se = case_data_idx (cc, ROC_TP)->f / ( case_data_idx (cc, ROC_TP)->f + case_data_idx (cc, ROC_FN)->f ); const double sp = case_data_idx (cc, ROC_TN)->f / ( case_data_idx (cc, ROC_TN)->f + case_data_idx (cc, ROC_FP)->f ); tab_double (tbl, n_cols - 3, x, 0, case_data_idx (cc, ROC_CUTPOINT)->f, var_get_print_format (roc->vars[i]), RC_OTHER); tab_double (tbl, n_cols - 2, x, 0, se, NULL, RC_OTHER); tab_double (tbl, n_cols - 1, x, 0, 1 - sp, NULL, RC_OTHER); } casereader_destroy (r); } tab_submit (tbl); } static void output_roc (struct roc_state *rs, const struct cmd_roc *roc) { show_summary (roc); if ( roc->curve ) { struct roc_chart *rc; size_t i; rc = roc_chart_create (roc->reference); for (i = 0; i < roc->n_vars; i++) roc_chart_add_var (rc, var_get_name (roc->vars[i]), rs[i].cutpoint_rdr); roc_chart_submit (rc); } show_auc (rs, roc); if ( roc->print_coords ) show_coords (rs, roc); } pspp-1.0.1/src/language/stats/cochran.c0000644000175000017500000001460013137223525014711 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/cochran.h" #include #include #include #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/val-type.h" #include "data/variable.h" #include "language/stats/npar.h" #include "libpspp/cast.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct cochran { double success; double failure; double *hits; double *misses; const struct dictionary *dict; double cc; double df; double q; }; static void show_freqs_box (const struct one_sample_test *ost, const struct cochran *ch); static void show_sig_box (const struct cochran *ch); void cochran_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact UNUSED, double timer UNUSED) { struct one_sample_test *ct = UP_CAST (test, struct one_sample_test, parent); int v; struct cochran ch; const struct dictionary *dict = dataset_dict (ds); const struct variable *weight = dict_get_weight (dict); struct ccase *c; double rowsq = 0; ch.cc = 0.0; ch.dict = dict; ch.success = SYSMIS; ch.failure = SYSMIS; ch.hits = xcalloc (ct->n_vars, sizeof *ch.hits); ch.misses = xcalloc (ct->n_vars, sizeof *ch.misses); for (; (c = casereader_read (input)); case_unref (c)) { double case_hits = 0.0; const double w = weight ? case_data (c, weight)->f: 1.0; for (v = 0; v < ct->n_vars; ++v) { const struct variable *var = ct->vars[v]; const union value *val = case_data (c, var); if ( var_is_value_missing (var, val, exclude)) continue; if ( ch.success == SYSMIS) { ch.success = val->f; } else if (ch.failure == SYSMIS && val->f != ch.success) { ch.failure = val->f; } if ( ch.success == val->f) { ch.hits[v] += w; case_hits += w; } else if ( ch.failure == val->f) { ch.misses[v] += w; } else { msg (MW, _("More than two values encountered. Cochran Q test will not be run.")); goto finish; } } ch.cc += w; rowsq += pow2 (case_hits); } casereader_destroy (input); { double c_l = 0; double c_l2 = 0; for (v = 0; v < ct->n_vars; ++v) { c_l += ch.hits[v]; c_l2 += pow2 (ch.hits[v]); } ch.q = ct->n_vars * c_l2; ch.q -= pow2 (c_l); ch.q *= ct->n_vars - 1; ch.q /= ct->n_vars * c_l - rowsq; ch.df = ct->n_vars - 1; } show_freqs_box (ct, &ch); show_sig_box (&ch); finish: free (ch.hits); free (ch.misses); } static void show_freqs_box (const struct one_sample_test *ost, const struct cochran *ct) { int i; const struct variable *weight = dict_get_weight (ct->dict); const struct fmt_spec *wfmt = weight ? var_get_print_format (weight) : &F_8_0; const int row_headers = 1; const int column_headers = 2; struct tab_table *table = tab_create (row_headers + 2, column_headers + ost->n_vars); tab_set_format (table, RC_WEIGHT, wfmt); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Frequencies")); /* Vertical lines inside the box */ tab_box (table, 1, 0, -1, TAL_1, row_headers, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); /* Box around the table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_joint_text (table, 1, 0, 2, 0, TAT_TITLE | TAB_CENTER, _("Value")); tab_text_format (table, 1, 1, 0, _("Success (%.*g)"), DBL_DIG + 1, ct->success); tab_text_format (table, 2, 1, 0, _("Failure (%.*g)"), DBL_DIG + 1, ct->failure); tab_hline (table, TAL_2, 0, tab_nc (table) - 1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); for (i = 0 ; i < ost->n_vars ; ++i) { tab_text (table, 0, column_headers + i, TAB_LEFT, var_to_string (ost->vars[i])); tab_double (table, 1, column_headers + i, 0, ct->hits[i], NULL, RC_WEIGHT); tab_double (table, 2, column_headers + i, 0, ct->misses[i], NULL, RC_WEIGHT); } tab_submit (table); } static void show_sig_box (const struct cochran *ch) { const struct variable *weight = dict_get_weight (ch->dict); const struct fmt_spec *wfmt = weight ? var_get_print_format (weight) : &F_8_0; const int row_headers = 1; const int column_headers = 0; struct tab_table *table = tab_create (row_headers + 1, column_headers + 4); tab_set_format (table, RC_WEIGHT, wfmt); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Test Statistics")); tab_text (table, 0, column_headers, TAT_TITLE | TAB_LEFT , _("N")); tab_text (table, 0, 1 + column_headers, TAT_TITLE | TAB_LEFT , _("Cochran's Q")); tab_text (table, 0, 2 + column_headers, TAT_TITLE | TAB_LEFT, _("df")); tab_text (table, 0, 3 + column_headers, TAT_TITLE | TAB_LEFT, _("Asymp. Sig.")); /* Box around the table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); tab_double (table, 1, column_headers, 0, ch->cc, NULL, RC_WEIGHT); tab_double (table, 1, column_headers + 1, 0, ch->q, NULL, RC_OTHER); tab_double (table, 1, column_headers + 2, 0, ch->df, NULL, RC_INTEGER); tab_double (table, 1, column_headers + 3, 0, gsl_cdf_chisq_Q (ch->q, ch->df), NULL, RC_PVALUE); tab_submit (table); } pspp-1.0.1/src/language/stats/sort-criteria.h0000644000175000017500000000215712470242642016074 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SORT_CRITERIA_H #define SORT_CRITERIA_H #include #include struct dictionary; struct lexer; struct variable; struct subcase; bool parse_sort_criteria (struct lexer *, const struct dictionary *, struct subcase *, const struct variable ***vars, bool *saw_direction); #endif /* sort-criteria.h */ pspp-1.0.1/src/language/stats/freq.c0000644000175000017500000000641412523704223014232 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/freq.h" #include #include "data/variable.h" #include "data/value.h" #include "libpspp/array.h" #include "libpspp/compiler.h" struct freq * freq_clone (const struct freq *in, int values, int *widths) { int i; struct freq *f = xmalloc (sizeof (struct freq) + (sizeof (union value) * (values - 1))); f->node = in->node; f->count = in->count; for (i = 0; i < values; ++i) { value_init (&f->values[i], widths[i]); value_copy (&f->values[i], &in->values[i], widths[i]); } return f; } void freq_destroy (struct freq *f, int values, int *widths) { int i; for (i = 0; i < values; ++i) { value_destroy (&f->values[i], widths[i]); } free (f); } void freq_hmap_destroy (struct hmap *hmap, int width) { struct freq *f, *next; HMAP_FOR_EACH_SAFE (f, next, struct freq, node, hmap) { value_destroy (&f->values[0], width); hmap_delete (hmap, &f->node); free (f); } hmap_destroy (hmap); } struct freq * freq_hmap_search (struct hmap *hmap, const union value *value, int width, size_t hash) { struct freq *f; HMAP_FOR_EACH_WITH_HASH (f, struct freq, node, hash, hmap) if (value_equal (value, &f->values[0], width)) return f; return NULL; } struct freq * freq_hmap_insert (struct hmap *hmap, const union value *value, int width, size_t hash) { struct freq *f = xmalloc (sizeof *f); value_clone (&f->values[0], value, width); f->count = 0; hmap_insert (hmap, &f->node, hash); return f; } int compare_freq_ptr_3way (const void *a_, const void *b_, const void *width_) { const struct freq *const *ap = a_; const struct freq *const *bp = b_; const int *widthp = width_; return value_compare_3way (&(*ap)->values[0], &(*bp)->values[0], *widthp); } struct freq ** freq_hmap_sort (struct hmap *hmap, int width) { size_t n_entries = hmap_count (hmap); struct freq **entries; struct freq *f; size_t i; entries = xnmalloc (n_entries, sizeof *entries); i = 0; HMAP_FOR_EACH (f, struct freq, node, hmap) entries[i++] = f; assert (i == n_entries); sort (entries, n_entries, sizeof *entries, compare_freq_ptr_3way, &width); return entries; } struct freq * freq_hmap_extract (struct hmap *hmap) { struct freq *freqs, *f; size_t n_freqs; size_t i; n_freqs = hmap_count (hmap); freqs = xnmalloc (n_freqs, sizeof *freqs); i = 0; HMAP_FOR_EACH (f, struct freq, node, hmap) freqs[i++] = *f; assert (i == n_freqs); return freqs; } pspp-1.0.1/src/language/stats/mann-whitney.h0000644000175000017500000000225412470243700015715 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !mann_whitney_h #define mann_whitney_h 1 #include #include #include "language/stats/npar.h" struct mann_whitney_test { struct two_sample_test parent; }; struct casereader; struct dataset; void mann_whitney_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact, double timer ); #endif pspp-1.0.1/src/language/stats/jonckheere-terpstra.c0000644000175000017500000002625413137223525017263 00000000000000/* Pspp - a program for statistical analysis. Copyright (C) 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "jonckheere-terpstra.h" #include #include #include "data/casegrouper.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/subcase.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/hmap.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "math/sort.h" #include "output/tab.h" #include "gl/minmax.h" #include "gl/xalloc.h" /* Returns true iff the independent variable lies in the between val1 and val2. Regardless of which is the greater value. */ static bool include_func_bi (const struct ccase *c, void *aux) { const struct n_sample_test *nst = aux; const union value *bigger = NULL; const union value *smaller = NULL; if (0 > value_compare_3way (&nst->val1, &nst->val2, var_get_width (nst->indep_var))) { bigger = &nst->val2; smaller = &nst->val1; } else { smaller = &nst->val2; bigger = &nst->val1; } if (0 < value_compare_3way (smaller, case_data (c, nst->indep_var), var_get_width (nst->indep_var))) return false; if (0 > value_compare_3way (bigger, case_data (c, nst->indep_var), var_get_width (nst->indep_var))) return false; return true; } struct group_data { /* The total of the caseweights in the group */ double cc; /* A casereader containing the group data. This casereader contains just two values: 0: The raw value of the data 1: The cumulative caseweight */ struct casereader *reader; }; static double u (const struct group_data *grp0, const struct group_data *grp1) { struct ccase *c0; struct casereader *r0 = casereader_clone (grp0->reader); double usum = 0; double prev_cc0 = 0.0; for (; (c0 = casereader_read (r0)); case_unref (c0)) { struct ccase *c1; struct casereader *r1 = casereader_clone (grp1->reader); double x0 = case_data_idx (c0, 0)->f; double cc0 = case_data_idx (c0, 1)->f; double w0 = cc0 - prev_cc0; double prev_cc1 = 0; for (; (c1 = casereader_read (r1)); case_unref (c1)) { double x1 = case_data_idx (c1, 0)->f; double cc1 = case_data_idx (c1, 1)->f; if (x0 > x1) { /* Do nothing */ } else if (x0 < x1) { usum += w0 * (grp1->cc - prev_cc1); case_unref (c1); break; } else { #if 1 usum += w0 * ( (grp1->cc - prev_cc1) / 2.0); #else usum += w0 * (grp1->cc - (prev_cc1 + cc1) / 2.0); #endif case_unref (c1); break; } prev_cc1 = cc1; } casereader_destroy (r1); prev_cc0 = cc0; } casereader_destroy (r0); return usum; } typedef double func_f (double e_l); /* These 3 functions are used repeatedly in the calculation of the variance of the JT statistic. Having them explicitly defined makes the variance calculation a lot simpler. */ static double ff1 (double e) { return e * (e - 1) * (2*e + 5); } static double ff2 (double e) { return e * (e - 1) * (e - 2); } static double ff3 (double e) { return e * (e - 1) ; } static func_f *mff[3] = { ff1, ff2, ff3 }; /* This function does the following: It creates an ordered set of *distinct* values from IR. For each case in that set, it calls f[0..N] passing it the caseweight. It returns the sum of f[j] in result[j]. result and f must be allocated prior to calling this function. */ static void variance_calculation (struct casereader *ir, const struct variable *var, const struct dictionary *dict, func_f **f, double *result, size_t n) { int i; struct casereader *r = casereader_clone (ir); struct ccase *c; const struct variable *wv = dict_get_weight (dict); const int w_idx = wv ? var_get_case_index (wv) : caseproto_get_n_widths (casereader_get_proto (r)) ; r = sort_execute_1var (r, var); r = casereader_create_distinct (r, var, dict_get_weight (dict)); for (; (c = casereader_read (r)); case_unref (c)) { double w = case_data_idx (c, w_idx)->f; for (i = 0; i < n; ++i) result[i] += f[i] (w); } casereader_destroy (r); } struct jt { int levels; double n; double obs; double mean; double stddev; }; static void show_jt (const struct n_sample_test *nst, const struct jt *jt, const struct variable *wv); void jonckheere_terpstra_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact UNUSED, double timer UNUSED) { int v; bool warn = true; const struct dictionary *dict = dataset_dict (ds); const struct n_sample_test *nst = UP_CAST (test, const struct n_sample_test, parent); struct caseproto *proto = caseproto_create (); proto = caseproto_add_width (proto, 0); proto = caseproto_add_width (proto, 0); /* If the independent variable is missing, then we ignore the case */ input = casereader_create_filter_missing (input, &nst->indep_var, 1, exclude, NULL, NULL); /* Remove cases with invalid weigths */ input = casereader_create_filter_weight (input, dict, &warn, NULL); /* Remove all those cases which are outside the range (val1, val2) */ input = casereader_create_filter_func (input, include_func_bi, NULL, CONST_CAST (struct n_sample_test *, nst), NULL); /* Sort the data by the independent variable */ input = sort_execute_1var (input, nst->indep_var); for (v = 0; v < nst->n_vars ; ++v) { struct jt jt; double variance; int g0; double nn = 0; int i; double sums[3] = {0,0,0}; double e_sum[3] = {0,0,0}; struct group_data *grp = NULL; double ccsq_sum = 0; struct casegrouper *grouper; struct casereader *group; struct casereader *vreader= casereader_clone (input); /* Get a few values into e_sum - we'll be needing these later */ variance_calculation (vreader, nst->vars[v], dict, mff, e_sum, 3); grouper = casegrouper_create_vars (vreader, &nst->indep_var, 1); jt.obs = 0; jt.levels = 0; jt.n = 0; for (; casegrouper_get_next_group (grouper, &group); casereader_destroy (group) ) { struct casewriter *writer = autopaging_writer_create (proto); struct ccase *c; double cc = 0; group = sort_execute_1var (group, nst->vars[v]); for (; (c = casereader_read (group)); case_unref (c)) { struct ccase *c_out = case_create (proto); const union value *x = case_data (c, nst->vars[v]); case_data_rw_idx (c_out, 0)->f = x->f; cc += dict_get_case_weight (dict, c, &warn); case_data_rw_idx (c_out, 1)->f = cc; casewriter_write (writer, c_out); } grp = xrealloc (grp, sizeof *grp * (jt.levels + 1)); grp[jt.levels].reader = casewriter_make_reader (writer); grp[jt.levels].cc = cc; jt.levels++; jt.n += cc; ccsq_sum += pow2 (cc); } casegrouper_destroy (grouper); for (g0 = 0; g0 < jt.levels; ++g0) { int g1; for (g1 = g0 +1 ; g1 < jt.levels; ++g1) { double uu = u (&grp[g0], &grp[g1]); jt.obs += uu; } nn += pow2 (grp[g0].cc) * (2 * grp[g0].cc + 3); for (i = 0; i < 3; ++i) sums[i] += mff[i] (grp[g0].cc); casereader_destroy (grp[g0].reader); } free (grp); variance = (mff[0](jt.n) - sums[0] - e_sum[0]) / 72.0; variance += sums[1] * e_sum[1] / (36.0 * mff[1] (jt.n)); variance += sums[2] * e_sum[2] / (8.0 * mff[2] (jt.n)); jt.stddev = sqrt (variance); jt.mean = (pow2 (jt.n) - ccsq_sum) / 4.0; show_jt (nst, &jt, dict_get_weight (dict)); } casereader_destroy (input); caseproto_unref (proto); } #include "gettext.h" #define _(msgid) gettext (msgid) static void show_jt (const struct n_sample_test *nst, const struct jt *jt, const struct variable *wv) { int i; const int row_headers = 1; const int column_headers = 1; const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0; struct tab_table *table = tab_create (row_headers + 7, column_headers + nst->n_vars); tab_set_format (table, RC_WEIGHT, wfmt); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Jonckheere-Terpstra Test")); /* Vertical lines inside the box */ tab_box (table, 1, 0, -1, TAL_1, row_headers, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); /* Box around the table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); tab_text_format (table, 1, 0, TAT_TITLE | TAB_CENTER, _("Number of levels in %s"), var_to_string (nst->indep_var)); tab_text (table, 2, 0, TAT_TITLE | TAB_CENTER, _("N")); tab_text (table, 3, 0, TAT_TITLE | TAB_CENTER, _("Observed J-T Statistic")); tab_text (table, 4, 0, TAT_TITLE | TAB_CENTER, _("Mean J-T Statistic")); tab_text (table, 5, 0, TAT_TITLE | TAB_CENTER, _("Std. Deviation of J-T Statistic")); tab_text (table, 6, 0, TAT_TITLE | TAB_CENTER, _("Std. J-T Statistic")); tab_text (table, 7, 0, TAT_TITLE | TAB_CENTER, _("Asymp. Sig. (2-tailed)")); for (i = 0; i < nst->n_vars; ++i) { double std_jt; tab_text (table, 0, i + row_headers, TAT_TITLE, var_to_string (nst->vars[i]) ); tab_double (table, 1, i + row_headers, TAT_TITLE, jt[0].levels, NULL, RC_INTEGER); tab_double (table, 2, i + row_headers, TAT_TITLE, jt[0].n, NULL, RC_WEIGHT); tab_double (table, 3, i + row_headers, TAT_TITLE, jt[0].obs, NULL, RC_OTHER); tab_double (table, 4, i + row_headers, TAT_TITLE, jt[0].mean, NULL, RC_OTHER); tab_double (table, 5, i + row_headers, TAT_TITLE, jt[0].stddev, NULL, RC_OTHER); std_jt = (jt[0].obs - jt[0].mean) / jt[0].stddev; tab_double (table, 6, i + row_headers, TAT_TITLE, std_jt, NULL, RC_OTHER); tab_double (table, 7, i + row_headers, TAT_TITLE, 2.0 * ((std_jt > 0) ? gsl_cdf_ugaussian_Q (std_jt) : gsl_cdf_ugaussian_P (std_jt)), NULL, RC_PVALUE); } tab_submit (table); } pspp-1.0.1/src/language/stats/mcnemar.c0000644000175000017500000001767113137223525014731 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "mcnemar.h" #include #include #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/missing-values.h" #include "data/variable.h" #include "language/stats/npar.h" #include "libpspp/str.h" #include "output/tab.h" #include "libpspp/message.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "data/value.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct mcnemar { union value val0; union value val1; double n00; double n01; double n10; double n11; }; static void output_freq_table (variable_pair *vp, const struct mcnemar *param, const struct dictionary *dict); static void output_statistics_table (const struct two_sample_test *t2s, const struct mcnemar *param, const struct dictionary *dict); void mcnemar_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact UNUSED, double timer UNUSED) { int i; bool warn = true; const struct dictionary *dict = dataset_dict (ds); const struct two_sample_test *t2s = UP_CAST (test, const struct two_sample_test, parent); struct ccase *c; struct casereader *r = input; struct mcnemar *mc = xcalloc (t2s->n_pairs, sizeof *mc); for (i = 0 ; i < t2s->n_pairs; ++i ) { mc[i].val0.f = mc[i].val1.f = SYSMIS; } for (; (c = casereader_read (r)) != NULL; case_unref (c)) { const double weight = dict_get_case_weight (dict, c, &warn); for (i = 0 ; i < t2s->n_pairs; ++i ) { variable_pair *vp = &t2s->pairs[i]; const union value *value0 = case_data (c, (*vp)[0]); const union value *value1 = case_data (c, (*vp)[1]); if (var_is_value_missing ((*vp)[0], value0, exclude)) continue; if (var_is_value_missing ((*vp)[1], value1, exclude)) continue; if ( mc[i].val0.f == SYSMIS) { if (mc[i].val1.f != value0->f) mc[i].val0.f = value0->f; else if (mc[i].val1.f != value1->f) mc[i].val0.f = value1->f; } if ( mc[i].val1.f == SYSMIS) { if (mc[i].val0.f != value1->f) mc[i].val1.f = value1->f; else if (mc[i].val0.f != value0->f) mc[i].val1.f = value0->f; } if (mc[i].val0.f == value0->f && mc[i].val0.f == value1->f) { mc[i].n00 += weight; } else if ( mc[i].val0.f == value0->f && mc[i].val1.f == value1->f) { mc[i].n10 += weight; } else if ( mc[i].val1.f == value0->f && mc[i].val0.f == value1->f) { mc[i].n01 += weight; } else if ( mc[i].val1.f == value0->f && mc[i].val1.f == value1->f) { mc[i].n11 += weight; } else { msg (ME, _("The McNemar test is appropriate only for dichotomous variables")); } } } casereader_destroy (r); for (i = 0 ; i < t2s->n_pairs ; ++i) output_freq_table (&t2s->pairs[i], mc + i, dict); output_statistics_table (t2s, mc, dict); free (mc); } static void output_freq_table (variable_pair *vp, const struct mcnemar *param, const struct dictionary *dict) { const int header_rows = 2; const int header_cols = 1; struct tab_table *table = tab_create (header_cols + 2, header_rows + 2); const struct variable *wv = dict_get_weight (dict); const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0; struct string pair_name; struct string val1str ; struct string val0str ; tab_set_format (table, RC_WEIGHT, wfmt); ds_init_empty (&val0str); ds_init_empty (&val1str); var_append_value_name ((*vp)[0], ¶m->val0, &val0str); var_append_value_name ((*vp)[1], ¶m->val1, &val1str); ds_init_cstr (&pair_name, var_to_string ((*vp)[0])); ds_put_cstr (&pair_name, " & "); ds_put_cstr (&pair_name, var_to_string ((*vp)[1])); tab_title (table, "%s", ds_cstr (&pair_name)); ds_destroy (&pair_name); tab_headers (table, header_cols, 0, header_rows, 0); /* Vertical lines inside the box */ tab_box (table, 0, 0, -1, TAL_1, 1, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); /* Box around entire table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_vline (table, TAL_2, header_cols, 0, tab_nr (table) - 1); tab_hline (table, TAL_2, 0, tab_nc (table) - 1, header_rows); tab_text (table, 0, 0, TAB_CENTER, var_to_string ((*vp)[0])); tab_joint_text (table, 1, 0, 2, 0, TAB_CENTER, var_to_string ((*vp)[1])); tab_hline (table, TAL_1, 1, tab_nc (table) - 1, 1); tab_text (table, 0, header_rows + 0, TAB_LEFT, ds_cstr (&val0str)); tab_text (table, 0, header_rows + 1, TAB_LEFT, ds_cstr (&val1str)); tab_text (table, header_cols + 0, 1, TAB_LEFT, ds_cstr (&val0str)); tab_text (table, header_cols + 1, 1, TAB_LEFT, ds_cstr (&val1str)); tab_double (table, header_cols + 0, header_rows + 0, TAB_RIGHT, param->n00, NULL, RC_WEIGHT); tab_double (table, header_cols + 0, header_rows + 1, TAB_RIGHT, param->n01, NULL, RC_WEIGHT); tab_double (table, header_cols + 1, header_rows + 0, TAB_RIGHT, param->n10, NULL, RC_WEIGHT); tab_double (table, header_cols + 1, header_rows + 1, TAB_RIGHT, param->n11, NULL, RC_WEIGHT); tab_submit (table); ds_destroy (&val0str); ds_destroy (&val1str); } static void output_statistics_table (const struct two_sample_test *t2s, const struct mcnemar *mc, const struct dictionary *dict) { int i; struct tab_table *table = tab_create (5, t2s->n_pairs + 1); const struct variable *wv = dict_get_weight (dict); const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0; tab_title (table, _("Test Statistics")); tab_set_format (table, RC_WEIGHT, wfmt); tab_headers (table, 0, 1, 0, 1); tab_hline (table, TAL_2, 0, tab_nc (table) - 1, 1); tab_vline (table, TAL_2, 1, 0, tab_nr (table) - 1); /* Vertical lines inside the box */ tab_box (table, -1, -1, -1, TAL_1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1); /* Box around entire table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1); tab_text (table, 1, 0, TAT_TITLE | TAB_CENTER, _("N")); tab_text (table, 2, 0, TAT_TITLE | TAB_CENTER, _("Exact Sig. (2-tailed)")); tab_text (table, 3, 0, TAT_TITLE | TAB_CENTER, _("Exact Sig. (1-tailed)")); tab_text (table, 4, 0, TAT_TITLE | TAB_CENTER, _("Point Probability")); for (i = 0 ; i < t2s->n_pairs; ++i) { double sig; variable_pair *vp = &t2s->pairs[i]; struct string pair_name; ds_init_cstr (&pair_name, var_to_string ((*vp)[0])); ds_put_cstr (&pair_name, " & "); ds_put_cstr (&pair_name, var_to_string ((*vp)[1])); tab_text (table, 0, 1 + i, TAB_LEFT, ds_cstr (&pair_name)); ds_destroy (&pair_name); tab_double (table, 1, 1 + i, TAB_RIGHT, mc[i].n00 + mc[i].n01 + mc[i].n10 + mc[i].n11, NULL, RC_WEIGHT); sig = gsl_cdf_binomial_P (mc[i].n01, 0.5, mc[i].n01 + mc[i].n10); tab_double (table, 2, 1 + i, TAB_RIGHT, 2 * sig, NULL, RC_PVALUE); tab_double (table, 3, 1 + i, TAB_RIGHT, sig, NULL, RC_PVALUE); tab_double (table, 4, 1 + i, TAB_RIGHT, gsl_ran_binomial_pdf (mc[i].n01, 0.5, mc[i].n01 + mc[i].n10), NULL, RC_OTHER); } tab_submit (table); } pspp-1.0.1/src/language/stats/cochran.h0000644000175000017500000000204012470243700014705 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !cochran_h #define cochran_h 1 #include #include #include "language/stats/npar.h" void cochran_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool, double); #endif pspp-1.0.1/src/language/stats/sort-criteria.c0000644000175000017500000000612313137223525016064 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/sort-criteria.h" #include #include "data/dictionary.h" #include "data/subcase.h" #include "data/variable.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Parses a list of sort fields and appends them to ORDERING, which the caller must already have initialized. Returns true if successful, false on error. If SAW_DIRECTION is nonnull, sets *SAW_DIRECTION to true if at least one parenthesized sort direction was specified, false otherwise. */ bool parse_sort_criteria (struct lexer *lexer, const struct dictionary *dict, struct subcase *ordering, const struct variable ***vars, bool *saw_direction) { const struct variable **local_vars = NULL; size_t var_cnt = 0; if (vars == NULL) vars = &local_vars; *vars = NULL; if (saw_direction != NULL) *saw_direction = false; do { size_t prev_var_cnt = var_cnt; enum subcase_direction direction; size_t i; /* Variables. */ if (!parse_variables_const (lexer, dict, vars, &var_cnt, PV_APPEND | PV_NO_SCRATCH)) goto error; /* Sort direction. */ if (lex_match (lexer, T_LPAREN)) { if (lex_match_id (lexer, "D") || lex_match_id (lexer, "DOWN")) direction = SC_DESCEND; else if (lex_match_id (lexer, "A") || lex_match_id (lexer, "UP")) direction = SC_ASCEND; else { lex_error_expecting (lexer, "A", "D", NULL_SENTINEL); goto error; } if (!lex_force_match (lexer, T_RPAREN)) goto error; if (saw_direction != NULL) *saw_direction = true; } else direction = SC_ASCEND; for (i = prev_var_cnt; i < var_cnt; i++) { const struct variable *var = (*vars)[i]; if (!subcase_add_var (ordering, var, direction)) msg (SW, _("Variable %s specified twice in sort criteria."), var_get_name (var)); } } while (lex_token (lexer) == T_ID && dict_lookup_var (dict, lex_tokcstr (lexer)) != NULL); free (local_vars); return true; error: free (local_vars); if (vars) *vars = NULL; return false; } pspp-1.0.1/src/language/stats/mann-whitney.c0000644000175000017500000002211313137223525015710 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/mann-whitney.h" #include #include "data/case.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/variable.h" #include "libpspp/cast.h" #include "libpspp/misc.h" #include "math/sort.h" #include "output/tab.h" /* Calculates the adjustment necessary for tie compensation */ static void distinct_callback (double v UNUSED, casenumber t, double w UNUSED, void *aux) { double *tiebreaker = aux; *tiebreaker += (pow3 (t) - t) / 12.0; } struct mw { double rank_sum[2]; double n[2]; double u; /* The Mann-Whitney U statistic */ double w; /* The Wilcoxon Rank Sum W statistic */ double z; }; static void show_ranks_box (const struct n_sample_test *nst, const struct mw *mw); static void show_statistics_box (const struct n_sample_test *nst, const struct mw *mw, bool exact); static bool belongs_to_test (const struct ccase *c, void *aux) { const struct n_sample_test *nst = aux; const union value *group = case_data (c, nst->indep_var); const size_t group_var_width = var_get_width (nst->indep_var); if ( value_equal (group, &nst->val1, group_var_width)) return true; if ( value_equal (group, &nst->val2, group_var_width)) return true; return false; } void mann_whitney_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact, double timer UNUSED) { int i; const struct dictionary *dict = dataset_dict (ds); const struct n_sample_test *nst = UP_CAST (test, const struct n_sample_test, parent); const struct caseproto *proto = casereader_get_proto (input); size_t rank_idx = caseproto_get_n_widths (proto); struct mw *mw = xcalloc (nst->n_vars, sizeof *mw); for (i = 0; i < nst->n_vars; ++i) { double tiebreaker = 0.0; bool warn = true; enum rank_error rerr = 0; struct casereader *rr; struct ccase *c; const struct variable *var = nst->vars[i]; struct casereader *reader = casereader_create_filter_func (casereader_clone (input), belongs_to_test, NULL, CONST_CAST (struct n_sample_test *, nst), NULL); reader = casereader_create_filter_missing (reader, &var, 1, exclude, NULL, NULL); reader = sort_execute_1var (reader, var); rr = casereader_create_append_rank (reader, var, dict_get_weight (dict), &rerr, distinct_callback, &tiebreaker); for (; (c = casereader_read (rr)); case_unref (c)) { const union value *group = case_data (c, nst->indep_var); const size_t group_var_width = var_get_width (nst->indep_var); const double rank = case_data_idx (c, rank_idx)->f; if ( value_equal (group, &nst->val1, group_var_width)) { mw[i].rank_sum[0] += rank; mw[i].n[0] += dict_get_case_weight (dict, c, &warn); } else if ( value_equal (group, &nst->val2, group_var_width)) { mw[i].rank_sum[1] += rank; mw[i].n[1] += dict_get_case_weight (dict, c, &warn); } } casereader_destroy (rr); { double n; double denominator; struct mw *mwv = &mw[i]; mwv->u = mwv->n[0] * mwv->n[1] ; mwv->u += mwv->n[0] * (mwv->n[0] + 1) / 2.0; mwv->u -= mwv->rank_sum[0]; mwv->w = mwv->rank_sum[1]; if ( mwv->u > mwv->n[0] * mwv->n[1] / 2.0) { mwv->u = mwv->n[0] * mwv->n[1] - mwv->u; mwv->w = mwv->rank_sum[0]; } mwv->z = mwv->u - mwv->n[0] * mwv->n[1] / 2.0; n = mwv->n[0] + mwv->n[1]; denominator = pow3(n) - n; denominator /= 12; denominator -= tiebreaker; denominator *= mwv->n[0] * mwv->n[1]; denominator /= n * (n - 1); mwv->z /= sqrt (denominator); } } casereader_destroy (input); show_ranks_box (nst, mw); show_statistics_box (nst, mw, exact); free (mw); } #include "gettext.h" #define _(msgid) gettext (msgid) static void show_ranks_box (const struct n_sample_test *nst, const struct mw *mwv) { int i; const int row_headers = 1; const int column_headers = 2; struct tab_table *table = tab_create (row_headers + 7, column_headers + nst->n_vars); struct string g1str, g2str;; ds_init_empty (&g1str); var_append_value_name (nst->indep_var, &nst->val1, &g1str); ds_init_empty (&g2str); var_append_value_name (nst->indep_var, &nst->val2, &g2str); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Ranks")); /* Vertical lines inside the box */ tab_box (table, 1, 0, -1, TAL_1, row_headers, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); /* Box around the table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); tab_hline (table, TAL_1, row_headers, tab_nc (table) -1, 1); tab_text (table, 1, 1, TAT_TITLE | TAB_CENTER, ds_cstr (&g1str)); tab_text (table, 2, 1, TAT_TITLE | TAB_CENTER, ds_cstr (&g2str)); tab_text (table, 3, 1, TAT_TITLE | TAB_CENTER, _("Total")); tab_joint_text (table, 1, 0, 3, 0, TAT_TITLE | TAB_CENTER, _("N")); tab_vline (table, TAL_2, 4, 0, tab_nr (table) - 1); tab_text (table, 4, 1, TAT_TITLE | TAB_CENTER, ds_cstr (&g1str)); tab_text (table, 5, 1, TAT_TITLE | TAB_CENTER, ds_cstr (&g2str)); tab_joint_text (table, 4, 0, 5, 0, TAT_TITLE | TAB_CENTER, _("Mean Rank")); tab_vline (table, TAL_2, 6, 0, tab_nr (table) - 1); tab_text (table, 6, 1, TAT_TITLE | TAB_CENTER, ds_cstr (&g1str)); tab_text (table, 7, 1, TAT_TITLE | TAB_CENTER, ds_cstr (&g2str)); tab_joint_text (table, 6, 0, 7, 0, TAT_TITLE | TAB_CENTER, _("Sum of Ranks")); ds_destroy (&g1str); ds_destroy (&g2str); for (i = 0 ; i < nst->n_vars ; ++i) { const struct mw *mw = &mwv[i]; tab_text (table, 0, column_headers + i, TAT_TITLE, var_to_string (nst->vars[i])); tab_double (table, 1, column_headers + i, 0, mw->n[0], NULL, RC_OTHER); tab_double (table, 2, column_headers + i, 0, mw->n[1], NULL, RC_OTHER); tab_double (table, 3, column_headers + i, 0, mw->n[1] + mw->n[0], NULL, RC_OTHER); /* Mean Ranks */ tab_double (table, 4, column_headers + i, 0, mw->rank_sum[0] / mw->n[0], NULL, RC_OTHER); tab_double (table, 5, column_headers + i, 0, mw->rank_sum[1] / mw->n[1], NULL, RC_OTHER); /* Sum of Ranks */ tab_double (table, 6, column_headers + i, 0, mw->rank_sum[0], NULL, RC_OTHER); tab_double (table, 7, column_headers + i, 0, mw->rank_sum[1], NULL, RC_OTHER); } tab_submit (table); } static void show_statistics_box (const struct n_sample_test *nst, const struct mw *mwv, bool exact) { int i; const int row_headers = 1; const int column_headers = 1; struct tab_table *table = tab_create (row_headers + (exact ? 6 : 4), column_headers + nst->n_vars); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Test Statistics")); /* Vertical lines inside the box */ tab_box (table, 1, 0, -1, TAL_1, row_headers, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); /* Box around the table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); tab_text (table, 1, 0, TAT_TITLE | TAB_CENTER, _("Mann-Whitney U")); tab_text (table, 2, 0, TAT_TITLE | TAB_CENTER, _("Wilcoxon W")); tab_text (table, 3, 0, TAT_TITLE | TAB_CENTER, _("Z")); tab_text (table, 4, 0, TAT_TITLE | TAB_CENTER, _("Asymp. Sig. (2-tailed)")); if (exact) { tab_text (table, 5, 0, TAT_TITLE | TAB_CENTER, _("Exact Sig. (2-tailed)")); tab_text (table, 6, 0, TAT_TITLE | TAB_CENTER, _("Point Probability")); } for (i = 0 ; i < nst->n_vars ; ++i) { const struct mw *mw = &mwv[i]; tab_text (table, 0, column_headers + i, TAT_TITLE, var_to_string (nst->vars[i])); tab_double (table, 1, column_headers + i, 0, mw->u, NULL, RC_OTHER); tab_double (table, 2, column_headers + i, 0, mw->w, NULL, RC_OTHER); tab_double (table, 3, column_headers + i, 0, mw->z, NULL, RC_OTHER); tab_double (table, 4, column_headers + i, 0, 2.0 * gsl_cdf_ugaussian_P (mw->z), NULL, RC_PVALUE); } tab_submit (table); } pspp-1.0.1/src/language/stats/crosstabs.q0000644000175000017500000025165213137223525015327 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* FIXME: - How to calculate significance of some symmetric and directional measures? - How to calculate ASE for symmetric Somers ' d? - How to calculate ASE for Goodman and Kruskal's tau? - How to calculate approx. T of symmetric uncertainty coefficient? */ #include #include #include #include #include #include #include "data/case.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/data-out.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/value-labels.h" #include "data/variable.h" #include "language/command.h" #include "language/stats/freq.h" #include "language/dictionary/split-file.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/hash-functions.h" #include "libpspp/hmap.h" #include "libpspp/hmapx.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "output/tab.h" #include "output/chart-item.h" #include "output/charts/barchart.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gl/xsize.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid /* (headers) */ /* (specification) crosstabs (crs_): *^tables=custom; +variables=custom; missing=miss:!table/include/report; count=roundwhat:asis/case/!cell, roundhow:!round/truncate; +write[wr_]=none,cells,all; +format=val:!avalue/dvalue, indx:!noindex/index, tabl:!tables/notables, box:!box/nobox, pivot:!pivot/nopivot; +barchart=; +cells[cl_]=count,expected,row,column,total,residual,sresidual, asresidual,all,none; +statistics[st_]=chisq,phi,cc,lambda,uc,none,btau,ctau,risk,gamma,d, kappa,eta,corr,all. */ /* (declarations) */ /* (functions) */ /* Number of chi-square statistics. */ #define N_CHISQ 5 /* Number of symmetric statistics. */ #define N_SYMMETRIC 9 /* Number of directional statistics. */ #define N_DIRECTIONAL 13 /* Indexes into the 'vars' member of struct pivot_table and struct crosstab member. */ enum { ROW_VAR = 0, /* Row variable. */ COL_VAR = 1 /* Column variable. */ /* Higher indexes cause multiple tables to be output. */ }; /* A crosstabulation of 2 or more variables. */ struct pivot_table { struct crosstabs_proc *proc; struct fmt_spec weight_format; /* Format for weight variable. */ double missing; /* Weight of missing cases. */ /* Variables (2 or more). */ int n_vars; const struct variable **vars; /* Constants (0 or more). */ int n_consts; const struct variable **const_vars; union value *const_values; /* Data. */ struct hmap data; struct freq **entries; size_t n_entries; /* Column values, number of columns. */ union value *cols; int n_cols; /* Row values, number of rows. */ union value *rows; int n_rows; /* Number of statistically interesting columns/rows (columns/rows with data in them). */ int ns_cols, ns_rows; /* Matrix contents. */ double *mat; /* Matrix proper. */ double *row_tot; /* Row totals. */ double *col_tot; /* Column totals. */ double total; /* Grand total. */ }; /* Integer mode variable info. */ struct var_range { struct hmap_node hmap_node; /* In struct crosstabs_proc var_ranges map. */ const struct variable *var; /* The variable. */ int min; /* Minimum value. */ int max; /* Maximum value + 1. */ int count; /* max - min. */ }; struct crosstabs_proc { const struct dictionary *dict; enum { INTEGER, GENERAL } mode; enum mv_class exclude; bool pivot; bool barchart; bool bad_warn; struct fmt_spec weight_format; /* Variables specifies on VARIABLES. */ const struct variable **variables; size_t n_variables; struct hmap var_ranges; /* TABLES. */ struct pivot_table *pivots; int n_pivots; /* CELLS. */ int n_cells; /* Number of cells requested. */ unsigned int cells; /* Bit k is 1 if cell k is requested. */ int a_cells[CRS_CL_count]; /* 0...n_cells-1 are the requested cells. */ /* Rounding of cells. */ bool round_case_weights; /* Round case weights? */ bool round_cells; /* If !round_case_weights, round cells? */ bool round_down; /* Round down? (otherwise to nearest) */ /* STATISTICS. */ unsigned int statistics; /* Bit k is 1 if statistic k is requested. */ bool descending; /* True if descending sort order is requested. */ }; const struct var_range *get_var_range (const struct crosstabs_proc *, const struct variable *); static bool should_tabulate_case (const struct pivot_table *, const struct ccase *, enum mv_class exclude); static void tabulate_general_case (struct pivot_table *, const struct ccase *, double weight); static void tabulate_integer_case (struct pivot_table *, const struct ccase *, double weight); static void postcalc (struct crosstabs_proc *); static void submit (struct pivot_table *, struct tab_table *); static double round_weight (const struct crosstabs_proc *proc, double weight) { return proc->round_down ? floor (weight) : floor (weight + 0.5); } /* Parses and executes the CROSSTABS procedure. */ int cmd_crosstabs (struct lexer *lexer, struct dataset *ds) { const struct variable *wv = dict_get_weight (dataset_dict (ds)); struct var_range *range, *next_range; struct crosstabs_proc proc; struct casegrouper *grouper; struct casereader *input, *group; struct cmd_crosstabs cmd; struct pivot_table *pt; int result; bool ok; int i; proc.dict = dataset_dict (ds); proc.bad_warn = true; proc.variables = NULL; proc.n_variables = 0; hmap_init (&proc.var_ranges); proc.pivots = NULL; proc.n_pivots = 0; proc.descending = false; proc.weight_format = wv ? *var_get_print_format (wv) : F_8_0; if (!parse_crosstabs (lexer, ds, &cmd, &proc)) { result = CMD_FAILURE; goto exit; } proc.mode = proc.n_variables ? INTEGER : GENERAL; proc.barchart = cmd.sbc_barchart > 0; proc.descending = cmd.val == CRS_DVALUE; proc.round_case_weights = cmd.sbc_count && cmd.roundwhat == CRS_CASE; proc.round_cells = cmd.sbc_count && cmd.roundwhat == CRS_CELL; proc.round_down = cmd.roundhow == CRS_TRUNCATE; /* CELLS. */ if (!cmd.sbc_cells) proc.cells = 1u << CRS_CL_COUNT; else if (cmd.a_cells[CRS_CL_ALL]) proc.cells = UINT_MAX; else { proc.cells = 0; for (i = 0; i < CRS_CL_count; i++) if (cmd.a_cells[i]) proc.cells |= 1u << i; if (proc.cells == 0) proc.cells = ((1u << CRS_CL_COUNT) | (1u << CRS_CL_ROW) | (1u << CRS_CL_COLUMN) | (1u << CRS_CL_TOTAL)); } proc.cells &= ((1u << CRS_CL_count) - 1); proc.cells &= ~((1u << CRS_CL_NONE) | (1u << CRS_CL_ALL)); proc.n_cells = 0; for (i = 0; i < CRS_CL_count; i++) if (proc.cells & (1u << i)) proc.a_cells[proc.n_cells++] = i; /* STATISTICS. */ if (cmd.a_statistics[CRS_ST_ALL]) proc.statistics = UINT_MAX; else if (cmd.sbc_statistics) { int i; proc.statistics = 0; for (i = 0; i < CRS_ST_count; i++) if (cmd.a_statistics[i]) proc.statistics |= 1u << i; if (proc.statistics == 0) proc.statistics |= 1u << CRS_ST_CHISQ; } else proc.statistics = 0; /* MISSING. */ proc.exclude = (cmd.miss == CRS_TABLE ? MV_ANY : cmd.miss == CRS_INCLUDE ? MV_SYSTEM : MV_NEVER); if (proc.mode == GENERAL && proc.exclude == MV_NEVER) { msg (SE, _("Missing mode %s not allowed in general mode. " "Assuming %s."), "REPORT", "MISSING=TABLE"); proc.exclude = MV_ANY; } /* PIVOT. */ proc.pivot = cmd.pivot == CRS_PIVOT; input = casereader_create_filter_weight (proc_open (ds), dataset_dict (ds), NULL, NULL); grouper = casegrouper_create_splits (input, dataset_dict (ds)); while (casegrouper_get_next_group (grouper, &group)) { struct ccase *c; /* Output SPLIT FILE variables. */ c = casereader_peek (group, 0); if (c != NULL) { output_split_file_values (ds, c); case_unref (c); } /* Initialize hash tables. */ for (pt = &proc.pivots[0]; pt < &proc.pivots[proc.n_pivots]; pt++) hmap_init (&pt->data); /* Tabulate. */ for (; (c = casereader_read (group)) != NULL; case_unref (c)) for (pt = &proc.pivots[0]; pt < &proc.pivots[proc.n_pivots]; pt++) { double weight = dict_get_case_weight (dataset_dict (ds), c, &proc.bad_warn); if (cmd.roundwhat == CRS_CASE) { weight = round_weight (&proc, weight); if (weight == 0.) continue; } if (should_tabulate_case (pt, c, proc.exclude)) { if (proc.mode == GENERAL) tabulate_general_case (pt, c, weight); else tabulate_integer_case (pt, c, weight); } else pt->missing += weight; } casereader_destroy (group); /* Output. */ postcalc (&proc); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; result = ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; exit: free (proc.variables); HMAP_FOR_EACH_SAFE (range, next_range, struct var_range, hmap_node, &proc.var_ranges) { hmap_delete (&proc.var_ranges, &range->hmap_node); free (range); } for (pt = &proc.pivots[0]; pt < &proc.pivots[proc.n_pivots]; pt++) { free (pt->vars); free (pt->const_vars); /* We must not call value_destroy on const_values because it is a wild pointer; it never pointed to anything owned by the pivot_table. The rest of the data was allocated and destroyed at a lower level already. */ } free (proc.pivots); return result; } /* Parses the TABLES subcommand. */ static int crs_custom_tables (struct lexer *lexer, struct dataset *ds, struct cmd_crosstabs *cmd UNUSED, void *proc_) { struct crosstabs_proc *proc = proc_; struct const_var_set *var_set; int n_by; const struct variable ***by = NULL; int *by_iter; size_t *by_nvar = NULL; size_t nx = 1; bool ok = false; int i; /* Ensure that this is a TABLES subcommand. */ if (!lex_match_id (lexer, "TABLES") && (lex_token (lexer) != T_ID || dict_lookup_var (dataset_dict (ds), lex_tokcstr (lexer)) == NULL) && lex_token (lexer) != T_ALL) return 2; lex_match (lexer, T_EQUALS); if (proc->variables != NULL) var_set = const_var_set_create_from_array (proc->variables, proc->n_variables); else var_set = const_var_set_create_from_dict (dataset_dict (ds)); assert (var_set != NULL); for (n_by = 0; ;) { by = xnrealloc (by, n_by + 1, sizeof *by); by_nvar = xnrealloc (by_nvar, n_by + 1, sizeof *by_nvar); if (!parse_const_var_set_vars (lexer, var_set, &by[n_by], &by_nvar[n_by], PV_NO_DUPLICATE | PV_NO_SCRATCH)) goto done; if (xalloc_oversized (nx, by_nvar[n_by])) { msg (SE, _("Too many cross-tabulation variables or dimensions.")); goto done; } nx *= by_nvar[n_by]; n_by++; if (!lex_match (lexer, T_BY)) { if (n_by < 2) goto done; else break; } } by_iter = xcalloc (n_by, sizeof *by_iter); proc->pivots = xnrealloc (proc->pivots, proc->n_pivots + nx, sizeof *proc->pivots); for (i = 0; i < nx; i++) { struct pivot_table *pt = &proc->pivots[proc->n_pivots++]; int j; pt->proc = proc; pt->weight_format = proc->weight_format; pt->missing = 0.; pt->n_vars = n_by; pt->vars = xmalloc (n_by * sizeof *pt->vars); pt->n_consts = 0; pt->const_vars = NULL; pt->const_values = NULL; for (j = 0; j < n_by; j++) pt->vars[j] = by[j][by_iter[j]]; for (j = n_by - 1; j >= 0; j--) { if (++by_iter[j] < by_nvar[j]) break; by_iter[j] = 0; } } free (by_iter); ok = true; done: /* All return paths lead here. */ for (i = 0; i < n_by; i++) free (by[i]); free (by); free (by_nvar); const_var_set_destroy (var_set); return ok; } /* Parses the VARIABLES subcommand. */ static int crs_custom_variables (struct lexer *lexer, struct dataset *ds, struct cmd_crosstabs *cmd UNUSED, void *proc_) { struct crosstabs_proc *proc = proc_; if (proc->n_pivots) { msg (SE, _("%s must be specified before %s."), "VARIABLES", "TABLES"); return 0; } lex_match (lexer, T_EQUALS); for (;;) { size_t orig_nv = proc->n_variables; size_t i; long min, max; if (!parse_variables_const (lexer, dataset_dict (ds), &proc->variables, &proc->n_variables, (PV_APPEND | PV_NUMERIC | PV_NO_DUPLICATE | PV_NO_SCRATCH))) return 0; if (!lex_force_match (lexer, T_LPAREN)) goto lossage; if (!lex_force_int (lexer)) goto lossage; min = lex_integer (lexer); lex_get (lexer); lex_match (lexer, T_COMMA); if (!lex_force_int (lexer)) goto lossage; max = lex_integer (lexer); if (max < min) { msg (SE, _("Maximum value (%ld) less than minimum value (%ld)."), max, min); goto lossage; } lex_get (lexer); if (!lex_force_match (lexer, T_RPAREN)) goto lossage; for (i = orig_nv; i < proc->n_variables; i++) { const struct variable *var = proc->variables[i]; struct var_range *vr = xmalloc (sizeof *vr); vr->var = var; vr->min = min; vr->max = max; vr->count = max - min + 1; hmap_insert (&proc->var_ranges, &vr->hmap_node, hash_pointer (var, 0)); } if (lex_token (lexer) == T_SLASH) break; } return 1; lossage: free (proc->variables); proc->variables = NULL; proc->n_variables = 0; return 0; } /* Data file processing. */ const struct var_range * get_var_range (const struct crosstabs_proc *proc, const struct variable *var) { if (!hmap_is_empty (&proc->var_ranges)) { const struct var_range *range; HMAP_FOR_EACH_IN_BUCKET (range, struct var_range, hmap_node, hash_pointer (var, 0), &proc->var_ranges) if (range->var == var) return range; } return NULL; } static bool should_tabulate_case (const struct pivot_table *pt, const struct ccase *c, enum mv_class exclude) { int j; for (j = 0; j < pt->n_vars; j++) { const struct variable *var = pt->vars[j]; const struct var_range *range = get_var_range (pt->proc, var); if (var_is_value_missing (var, case_data (c, var), exclude)) return false; if (range != NULL) { double num = case_num (c, var); if (num < range->min || num >= range->max + 1.) return false; } } return true; } static void tabulate_integer_case (struct pivot_table *pt, const struct ccase *c, double weight) { struct freq *te; size_t hash; int j; hash = 0; for (j = 0; j < pt->n_vars; j++) { /* Throw away fractional parts of values. */ hash = hash_int (case_num (c, pt->vars[j]), hash); } HMAP_FOR_EACH_WITH_HASH (te, struct freq, node, hash, &pt->data) { for (j = 0; j < pt->n_vars; j++) if ((int) case_num (c, pt->vars[j]) != (int) te->values[j].f) goto no_match; /* Found an existing entry. */ te->count += weight; return; no_match: ; } /* No existing entry. Create a new one. */ te = xmalloc (table_entry_size (pt->n_vars)); te->count = weight; for (j = 0; j < pt->n_vars; j++) te->values[j].f = (int) case_num (c, pt->vars[j]); hmap_insert (&pt->data, &te->node, hash); } static void tabulate_general_case (struct pivot_table *pt, const struct ccase *c, double weight) { struct freq *te; size_t hash; int j; hash = 0; for (j = 0; j < pt->n_vars; j++) { const struct variable *var = pt->vars[j]; hash = value_hash (case_data (c, var), var_get_width (var), hash); } HMAP_FOR_EACH_WITH_HASH (te, struct freq, node, hash, &pt->data) { for (j = 0; j < pt->n_vars; j++) { const struct variable *var = pt->vars[j]; if (!value_equal (case_data (c, var), &te->values[j], var_get_width (var))) goto no_match; } /* Found an existing entry. */ te->count += weight; return; no_match: ; } /* No existing entry. Create a new one. */ te = xmalloc (table_entry_size (pt->n_vars)); te->count = weight; for (j = 0; j < pt->n_vars; j++) { const struct variable *var = pt->vars[j]; value_clone (&te->values[j], case_data (c, var), var_get_width (var)); } hmap_insert (&pt->data, &te->node, hash); } /* Post-data reading calculations. */ static int compare_table_entry_vars_3way (const struct freq *a, const struct freq *b, const struct pivot_table *pt, int idx0, int idx1); static int compare_table_entry_3way (const void *ap_, const void *bp_, const void *pt_); static int compare_table_entry_3way_inv (const void *ap_, const void *bp_, const void *pt_); static void enum_var_values (const struct pivot_table *, int var_idx, union value **valuesp, int *n_values, bool descending); static void output_pivot_table (struct crosstabs_proc *, struct pivot_table *); static void make_pivot_table_subset (struct pivot_table *pt, size_t row0, size_t row1, struct pivot_table *subset); static void make_summary_table (struct crosstabs_proc *); static bool find_crosstab (struct pivot_table *, size_t *row0p, size_t *row1p); static void postcalc (struct crosstabs_proc *proc) { /* Round hash table entries, if requested If this causes any of the cell counts to fall to zero, delete those cells. */ if (proc->round_cells) for (struct pivot_table *pt = proc->pivots; pt < &proc->pivots[proc->n_pivots]; pt++) { struct freq *e, *next; HMAP_FOR_EACH_SAFE (e, next, struct freq, node, &pt->data) { e->count = round_weight (proc, e->count); if (e->count == 0.0) { hmap_delete (&pt->data, &e->node); free (e); } } } /* Convert hash tables into sorted arrays of entries. */ for (struct pivot_table *pt = proc->pivots; pt < &proc->pivots[proc->n_pivots]; pt++) { struct freq *e; pt->n_entries = hmap_count (&pt->data); pt->entries = xnmalloc (pt->n_entries, sizeof *pt->entries); size_t i = 0; HMAP_FOR_EACH (e, struct freq, node, &pt->data) pt->entries[i++] = e; hmap_destroy (&pt->data); sort (pt->entries, pt->n_entries, sizeof *pt->entries, proc->descending ? compare_table_entry_3way_inv : compare_table_entry_3way, pt); } make_summary_table (proc); /* Output each pivot table. */ for (struct pivot_table *pt = proc->pivots; pt < &proc->pivots[proc->n_pivots]; pt++) { if (proc->pivot || pt->n_vars == 2) output_pivot_table (proc, pt); else { size_t row0 = 0, row1 = 0; while (find_crosstab (pt, &row0, &row1)) { struct pivot_table subset; make_pivot_table_subset (pt, row0, row1, &subset); output_pivot_table (proc, &subset); } } if (proc->barchart) chart_item_submit (barchart_create (pt->vars, pt->n_vars, _("Count"), false, pt->entries, pt->n_entries)); } /* Free output and prepare for next split file. */ for (struct pivot_table *pt = proc->pivots; pt < &proc->pivots[proc->n_pivots]; pt++) { pt->missing = 0.0; /* Free the members that were allocated in this function(and the values owned by the entries. The other pointer members are either both allocated and destroyed at a lower level (in output_pivot_table), or both allocated and destroyed at a higher level (in crs_custom_tables and free_proc, respectively). */ for (size_t i = 0; i < pt->n_vars; i++) { int width = var_get_width (pt->vars[i]); if (value_needs_init (width)) { size_t j; for (j = 0; j < pt->n_entries; j++) value_destroy (&pt->entries[j]->values[i], width); } } for (size_t i = 0; i < pt->n_entries; i++) free (pt->entries[i]); free (pt->entries); } } static void make_pivot_table_subset (struct pivot_table *pt, size_t row0, size_t row1, struct pivot_table *subset) { *subset = *pt; if (pt->n_vars > 2) { assert (pt->n_consts == 0); subset->missing = pt->missing; subset->n_vars = 2; subset->vars = pt->vars; subset->n_consts = pt->n_vars - 2; subset->const_vars = pt->vars + 2; subset->const_values = &pt->entries[row0]->values[2]; } subset->entries = &pt->entries[row0]; subset->n_entries = row1 - row0; } static int compare_table_entry_var_3way (const struct freq *a, const struct freq *b, const struct pivot_table *pt, int idx) { return value_compare_3way (&a->values[idx], &b->values[idx], var_get_width (pt->vars[idx])); } static int compare_table_entry_vars_3way (const struct freq *a, const struct freq *b, const struct pivot_table *pt, int idx0, int idx1) { int i; for (i = idx1 - 1; i >= idx0; i--) { int cmp = compare_table_entry_var_3way (a, b, pt, i); if (cmp != 0) return cmp; } return 0; } /* Compare the struct freq at *AP to the one at *BP and return a strcmp()-type result. */ static int compare_table_entry_3way (const void *ap_, const void *bp_, const void *pt_) { const struct freq *const *ap = ap_; const struct freq *const *bp = bp_; const struct freq *a = *ap; const struct freq *b = *bp; const struct pivot_table *pt = pt_; int cmp; cmp = compare_table_entry_vars_3way (a, b, pt, 2, pt->n_vars); if (cmp != 0) return cmp; cmp = compare_table_entry_var_3way (a, b, pt, ROW_VAR); if (cmp != 0) return cmp; return compare_table_entry_var_3way (a, b, pt, COL_VAR); } /* Inverted version of compare_table_entry_3way */ static int compare_table_entry_3way_inv (const void *ap_, const void *bp_, const void *pt_) { return -compare_table_entry_3way (ap_, bp_, pt_); } static int find_first_difference (const struct pivot_table *pt, size_t row) { if (row == 0) return pt->n_vars - 1; else { const struct freq *a = pt->entries[row]; const struct freq *b = pt->entries[row - 1]; int col; for (col = pt->n_vars - 1; col >= 0; col--) if (compare_table_entry_var_3way (a, b, pt, col)) return col; NOT_REACHED (); } } /* Output a table summarizing the cases processed. */ static void make_summary_table (struct crosstabs_proc *proc) { struct tab_table *summary; struct pivot_table *pt; struct string name; int i; summary = tab_create (7, 3 + proc->n_pivots); tab_set_format (summary, RC_WEIGHT, &proc->weight_format); tab_title (summary, _("Summary.")); tab_headers (summary, 1, 0, 3, 0); tab_joint_text (summary, 1, 0, 6, 0, TAB_CENTER, _("Cases")); tab_joint_text (summary, 1, 1, 2, 1, TAB_CENTER, _("Valid")); tab_joint_text (summary, 3, 1, 4, 1, TAB_CENTER, _("Missing")); tab_joint_text (summary, 5, 1, 6, 1, TAB_CENTER, _("Total")); tab_hline (summary, TAL_1, 1, 6, 1); tab_hline (summary, TAL_1, 1, 6, 2); tab_vline (summary, TAL_1, 3, 1, 1); tab_vline (summary, TAL_1, 5, 1, 1); for (i = 0; i < 3; i++) { tab_text (summary, 1 + i * 2, 2, TAB_RIGHT, _("N")); tab_text (summary, 2 + i * 2, 2, TAB_RIGHT, _("Percent")); } tab_offset (summary, 0, 3); ds_init_empty (&name); for (pt = &proc->pivots[0]; pt < &proc->pivots[proc->n_pivots]; pt++) { double valid; double n[3]; size_t i; tab_hline (summary, TAL_1, 0, 6, 0); ds_clear (&name); for (i = 0; i < pt->n_vars; i++) { if (i > 0) ds_put_cstr (&name, " * "); ds_put_cstr (&name, var_to_string (pt->vars[i])); } tab_text (summary, 0, 0, TAB_LEFT, ds_cstr (&name)); valid = 0.; for (i = 0; i < pt->n_entries; i++) valid += pt->entries[i]->count; n[0] = valid; n[1] = pt->missing; n[2] = n[0] + n[1]; for (i = 0; i < 3; i++) { tab_double (summary, i * 2 + 1, 0, TAB_RIGHT, n[i], NULL, RC_WEIGHT); tab_text_format (summary, i * 2 + 2, 0, TAB_RIGHT, "%.1f%%", n[i] / n[2] * 100.); } tab_next_row (summary); } ds_destroy (&name); submit (NULL, summary); } /* Output. */ static struct tab_table *create_crosstab_table (struct crosstabs_proc *, struct pivot_table *); static struct tab_table *create_chisq_table (struct crosstabs_proc *proc, struct pivot_table *); static struct tab_table *create_sym_table (struct crosstabs_proc *proc, struct pivot_table *); static struct tab_table *create_risk_table (struct crosstabs_proc *proc, struct pivot_table *); static struct tab_table *create_direct_table (struct crosstabs_proc *proc, struct pivot_table *); static void display_dimensions (struct crosstabs_proc *, struct pivot_table *, struct tab_table *, int first_difference); static void display_crosstabulation (struct crosstabs_proc *, struct pivot_table *, struct tab_table *); static void display_chisq (struct pivot_table *, struct tab_table *, bool *showed_fisher); static void display_symmetric (struct crosstabs_proc *, struct pivot_table *, struct tab_table *); static void display_risk (struct pivot_table *, struct tab_table *); static void display_directional (struct crosstabs_proc *, struct pivot_table *, struct tab_table *); static void table_value_missing (struct crosstabs_proc *proc, struct tab_table *table, int c, int r, unsigned char opt, const union value *v, const struct variable *var); static void delete_missing (struct pivot_table *); static void build_matrix (struct pivot_table *); /* Output pivot table PT in the context of PROC. */ static void output_pivot_table (struct crosstabs_proc *proc, struct pivot_table *pt) { struct tab_table *table = NULL; /* Crosstabulation table. */ struct tab_table *chisq = NULL; /* Chi-square table. */ bool showed_fisher = false; struct tab_table *sym = NULL; /* Symmetric measures table. */ struct tab_table *risk = NULL; /* Risk estimate table. */ struct tab_table *direct = NULL; /* Directional measures table. */ size_t row0, row1; enum_var_values (pt, COL_VAR, &pt->cols, &pt->n_cols, proc->descending); if (pt->n_cols == 0) { struct string vars; int i; ds_init_cstr (&vars, var_to_string (pt->vars[0])); for (i = 1; i < pt->n_vars; i++) ds_put_format (&vars, " * %s", var_to_string (pt->vars[i])); /* TRANSLATORS: The %s here describes a crosstabulation. It takes the form "var1 * var2 * var3 * ...". */ msg (SW, _("Crosstabulation %s contained no non-missing cases."), ds_cstr (&vars)); ds_destroy (&vars); free (pt->cols); return; } if (proc->cells) table = create_crosstab_table (proc, pt); if (proc->statistics & (1u << CRS_ST_CHISQ)) chisq = create_chisq_table (proc, pt); if (proc->statistics & ((1u << CRS_ST_PHI) | (1u << CRS_ST_CC) | (1u << CRS_ST_BTAU) | (1u << CRS_ST_CTAU) | (1u << CRS_ST_GAMMA) | (1u << CRS_ST_CORR) | (1u << CRS_ST_KAPPA))) sym = create_sym_table (proc, pt); if (proc->statistics & (1u << CRS_ST_RISK)) risk = create_risk_table (proc, pt); if (proc->statistics & ((1u << CRS_ST_LAMBDA) | (1u << CRS_ST_UC) | (1u << CRS_ST_D) | (1u << CRS_ST_ETA))) direct = create_direct_table (proc, pt); row0 = row1 = 0; while (find_crosstab (pt, &row0, &row1)) { struct pivot_table x; int first_difference; make_pivot_table_subset (pt, row0, row1, &x); /* Find all the row variable values. */ enum_var_values (&x, ROW_VAR, &x.rows, &x.n_rows, proc->descending); if (size_overflow_p (xtimes (xtimes (x.n_rows, x.n_cols), sizeof (double)))) xalloc_die (); x.row_tot = xmalloc (x.n_rows * sizeof *x.row_tot); x.col_tot = xmalloc (x.n_cols * sizeof *x.col_tot); x.mat = xmalloc (x.n_rows * x.n_cols * sizeof *x.mat); /* Allocate table space for the matrix. */ if (table && tab_row (table) + (x.n_rows + 1) * proc->n_cells > tab_nr (table)) tab_realloc (table, -1, MAX (tab_nr (table) + (x.n_rows + 1) * proc->n_cells, tab_nr (table) * pt->n_entries / x.n_entries)); build_matrix (&x); /* Find the first variable that differs from the last subtable. */ first_difference = find_first_difference (pt, row0); if (table) { display_dimensions (proc, &x, table, first_difference); display_crosstabulation (proc, &x, table); } if (proc->exclude == MV_NEVER) delete_missing (&x); if (chisq) { display_dimensions (proc, &x, chisq, first_difference); display_chisq (&x, chisq, &showed_fisher); } if (sym) { display_dimensions (proc, &x, sym, first_difference); display_symmetric (proc, &x, sym); } if (risk) { display_dimensions (proc, &x, risk, first_difference); display_risk (&x, risk); } if (direct) { display_dimensions (proc, &x, direct, first_difference); display_directional (proc, &x, direct); } /* Free the parts of x that are not owned by pt. In particular we must not free x.cols, which is the same as pt->cols, which is freed at the end of this function. */ free (x.rows); free (x.mat); free (x.row_tot); free (x.col_tot); } submit (NULL, table); if (chisq) { if (!showed_fisher) tab_resize (chisq, 4 + (pt->n_vars - 2), -1); submit (pt, chisq); } submit (pt, sym); submit (pt, risk); submit (pt, direct); free (pt->cols); } static void build_matrix (struct pivot_table *x) { const int col_var_width = var_get_width (x->vars[COL_VAR]); const int row_var_width = var_get_width (x->vars[ROW_VAR]); int col, row; double *mp; struct freq **p; mp = x->mat; col = row = 0; for (p = x->entries; p < &x->entries[x->n_entries]; p++) { const struct freq *te = *p; while (!value_equal (&x->rows[row], &te->values[ROW_VAR], row_var_width)) { for (; col < x->n_cols; col++) *mp++ = 0.0; col = 0; row++; } while (!value_equal (&x->cols[col], &te->values[COL_VAR], col_var_width)) { *mp++ = 0.0; col++; } *mp++ = te->count; if (++col >= x->n_cols) { col = 0; row++; } } while (mp < &x->mat[x->n_cols * x->n_rows]) *mp++ = 0.0; assert (mp == &x->mat[x->n_cols * x->n_rows]); /* Column totals, row totals, ns_rows. */ mp = x->mat; for (col = 0; col < x->n_cols; col++) x->col_tot[col] = 0.0; for (row = 0; row < x->n_rows; row++) x->row_tot[row] = 0.0; x->ns_rows = 0; for (row = 0; row < x->n_rows; row++) { bool row_is_empty = true; for (col = 0; col < x->n_cols; col++) { if (*mp != 0.0) { row_is_empty = false; x->col_tot[col] += *mp; x->row_tot[row] += *mp; } mp++; } if (!row_is_empty) x->ns_rows++; } assert (mp == &x->mat[x->n_cols * x->n_rows]); /* ns_cols. */ x->ns_cols = 0; for (col = 0; col < x->n_cols; col++) for (row = 0; row < x->n_rows; row++) if (x->mat[col + row * x->n_cols] != 0.0) { x->ns_cols++; break; } /* Grand total. */ x->total = 0.0; for (col = 0; col < x->n_cols; col++) x->total += x->col_tot[col]; } static struct tab_table * create_crosstab_table (struct crosstabs_proc *proc, struct pivot_table *pt) { struct tuple { int value; const char *name; }; static const struct tuple names[] = { {CRS_CL_COUNT, N_("count")}, {CRS_CL_ROW, N_("row %")}, {CRS_CL_COLUMN, N_("column %")}, {CRS_CL_TOTAL, N_("total %")}, {CRS_CL_EXPECTED, N_("expected")}, {CRS_CL_RESIDUAL, N_("residual")}, {CRS_CL_SRESIDUAL, N_("std. resid.")}, {CRS_CL_ASRESIDUAL, N_("adj. resid.")}, }; const int n_names = sizeof names / sizeof *names; const struct tuple *t; struct tab_table *table; struct string title; struct pivot_table x; int i; make_pivot_table_subset (pt, 0, 0, &x); table = tab_create (x.n_consts + 1 + x.n_cols + 1, (x.n_entries / x.n_cols) * 3 / 2 * proc->n_cells + 10); tab_headers (table, x.n_consts + 1, 0, 2, 0); tab_set_format (table, RC_WEIGHT, &proc->weight_format); /* First header line. */ tab_joint_text (table, x.n_consts + 1, 0, (x.n_consts + 1) + (x.n_cols - 1), 0, TAB_CENTER | TAT_TITLE, var_to_string (x.vars[COL_VAR])); tab_hline (table, TAL_1, x.n_consts + 1, x.n_consts + 2 + x.n_cols - 2, 1); /* Second header line. */ for (i = 2; i < x.n_consts + 2; i++) tab_joint_text (table, x.n_consts + 2 - i - 1, 0, x.n_consts + 2 - i - 1, 1, TAB_RIGHT | TAT_TITLE, var_to_string (x.vars[i])); tab_text (table, x.n_consts + 2 - 2, 1, TAB_RIGHT | TAT_TITLE, var_to_string (x.vars[ROW_VAR])); for (i = 0; i < x.n_cols; i++) table_value_missing (proc, table, x.n_consts + 2 + i - 1, 1, TAB_RIGHT, &x.cols[i], x.vars[COL_VAR]); tab_text (table, x.n_consts + 2 + x.n_cols - 1, 1, TAB_CENTER, _("Total")); tab_hline (table, TAL_1, 0, x.n_consts + 2 + x.n_cols - 1, 2); tab_vline (table, TAL_1, x.n_consts + 2 + x.n_cols - 1, 0, 1); /* Title. */ ds_init_empty (&title); for (i = 0; i < x.n_consts + 2; i++) { if (i) ds_put_cstr (&title, " * "); ds_put_cstr (&title, var_to_string (x.vars[i])); } for (i = 0; i < pt->n_consts; i++) { const struct variable *var = pt->const_vars[i]; char *s; ds_put_format (&title, ", %s=", var_to_string (var)); /* Insert the formatted value of VAR without any leading spaces. */ s = data_out (&pt->const_values[i], var_get_encoding (var), var_get_print_format (var)); ds_put_cstr (&title, s + strspn (s, " ")); free (s); } ds_put_cstr (&title, " ["); i = 0; for (t = names; t < &names[n_names]; t++) if (proc->cells & (1u << t->value)) { if (i++) ds_put_cstr (&title, ", "); ds_put_cstr (&title, gettext (t->name)); } ds_put_cstr (&title, "]."); tab_title (table, "%s", ds_cstr (&title)); ds_destroy (&title); tab_offset (table, 0, 2); return table; } static struct tab_table * create_chisq_table (struct crosstabs_proc *proc, struct pivot_table *pt) { struct tab_table *chisq; chisq = tab_create (6 + (pt->n_vars - 2), pt->n_entries / pt->n_cols * 3 / 2 * N_CHISQ + 10); tab_headers (chisq, 1 + (pt->n_vars - 2), 0, 1, 0); tab_set_format (chisq, RC_WEIGHT, &proc->weight_format); tab_title (chisq, _("Chi-square tests.")); tab_offset (chisq, pt->n_vars - 2, 0); tab_text (chisq, 0, 0, TAB_LEFT | TAT_TITLE, _("Statistic")); tab_text (chisq, 1, 0, TAB_RIGHT | TAT_TITLE, _("Value")); tab_text (chisq, 2, 0, TAB_RIGHT | TAT_TITLE, _("df")); tab_text (chisq, 3, 0, TAB_RIGHT | TAT_TITLE, _("Asymp. Sig. (2-tailed)")); tab_text_format (chisq, 4, 0, TAB_RIGHT | TAT_TITLE, _("Exact Sig. (%d-tailed)"), 2); tab_text_format (chisq, 5, 0, TAB_RIGHT | TAT_TITLE, _("Exact Sig. (%d-tailed)"), 1); tab_offset (chisq, 0, 1); return chisq; } /* Symmetric measures. */ static struct tab_table * create_sym_table (struct crosstabs_proc *proc, struct pivot_table *pt) { struct tab_table *sym; sym = tab_create (6 + (pt->n_vars - 2), pt->n_entries / pt->n_cols * 7 + 10); tab_set_format (sym, RC_WEIGHT, &proc->weight_format); tab_headers (sym, 2 + (pt->n_vars - 2), 0, 1, 0); tab_title (sym, _("Symmetric measures.")); tab_offset (sym, pt->n_vars - 2, 0); tab_text (sym, 0, 0, TAB_LEFT | TAT_TITLE, _("Category")); tab_text (sym, 1, 0, TAB_LEFT | TAT_TITLE, _("Statistic")); tab_text (sym, 2, 0, TAB_RIGHT | TAT_TITLE, _("Value")); tab_text (sym, 3, 0, TAB_RIGHT | TAT_TITLE, _("Asymp. Std. Error")); tab_text (sym, 4, 0, TAB_RIGHT | TAT_TITLE, _("Approx. T")); tab_text (sym, 5, 0, TAB_RIGHT | TAT_TITLE, _("Approx. Sig.")); tab_offset (sym, 0, 1); return sym; } /* Risk estimate. */ static struct tab_table * create_risk_table (struct crosstabs_proc *proc, struct pivot_table *pt) { struct tab_table *risk; risk = tab_create (4 + (pt->n_vars - 2), pt->n_entries / pt->n_cols * 4 + 10); tab_headers (risk, 1 + pt->n_vars - 2, 0, 2, 0); tab_title (risk, _("Risk estimate.")); tab_set_format (risk, RC_WEIGHT, &proc->weight_format); tab_offset (risk, pt->n_vars - 2, 0); tab_joint_text_format (risk, 2, 0, 3, 0, TAB_CENTER | TAT_TITLE, _("95%% Confidence Interval")); tab_text (risk, 0, 1, TAB_LEFT | TAT_TITLE, _("Statistic")); tab_text (risk, 1, 1, TAB_RIGHT | TAT_TITLE, _("Value")); tab_text (risk, 2, 1, TAB_RIGHT | TAT_TITLE, _("Lower")); tab_text (risk, 3, 1, TAB_RIGHT | TAT_TITLE, _("Upper")); tab_hline (risk, TAL_1, 2, 3, 1); tab_vline (risk, TAL_1, 2, 0, 1); tab_offset (risk, 0, 2); return risk; } /* Directional measures. */ static struct tab_table * create_direct_table (struct crosstabs_proc *proc, struct pivot_table *pt) { struct tab_table *direct; direct = tab_create (7 + (pt->n_vars - 2), pt->n_entries / pt->n_cols * 7 + 10); tab_headers (direct, 3 + (pt->n_vars - 2), 0, 1, 0); tab_title (direct, _("Directional measures.")); tab_set_format (direct, RC_WEIGHT, &proc->weight_format); tab_offset (direct, pt->n_vars - 2, 0); tab_text (direct, 0, 0, TAB_LEFT | TAT_TITLE, _("Category")); tab_text (direct, 1, 0, TAB_LEFT | TAT_TITLE, _("Statistic")); tab_text (direct, 2, 0, TAB_LEFT | TAT_TITLE, _("Type")); tab_text (direct, 3, 0, TAB_RIGHT | TAT_TITLE, _("Value")); tab_text (direct, 4, 0, TAB_RIGHT | TAT_TITLE, _("Asymp. Std. Error")); tab_text (direct, 5, 0, TAB_RIGHT | TAT_TITLE, _("Approx. T")); tab_text (direct, 6, 0, TAB_RIGHT | TAT_TITLE, _("Approx. Sig.")); tab_offset (direct, 0, 1); return direct; } /* Delete missing rows and columns for statistical analysis when /MISSING=REPORT. */ static void delete_missing (struct pivot_table *pt) { int r, c; for (r = 0; r < pt->n_rows; r++) if (var_is_num_missing (pt->vars[ROW_VAR], pt->rows[r].f, MV_USER)) { for (c = 0; c < pt->n_cols; c++) pt->mat[c + r * pt->n_cols] = 0.; pt->ns_rows--; } for (c = 0; c < pt->n_cols; c++) if (var_is_num_missing (pt->vars[COL_VAR], pt->cols[c].f, MV_USER)) { for (r = 0; r < pt->n_rows; r++) pt->mat[c + r * pt->n_cols] = 0.; pt->ns_cols--; } } /* Prepare table T for submission, and submit it. */ static void submit (struct pivot_table *pt, struct tab_table *t) { int i; if (t == NULL) return; tab_resize (t, -1, 0); if (tab_nr (t) == tab_t (t)) { table_unref (&t->table); return; } tab_offset (t, 0, 0); if (pt != NULL) for (i = 2; i < pt->n_vars; i++) tab_text (t, pt->n_vars - i - 1, 0, TAB_RIGHT | TAT_TITLE, var_to_string (pt->vars[i])); tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (t) - 1, tab_nr (t) - 1); tab_box (t, -1, -1, -1, TAL_1, tab_l (t), tab_t (t) - 1, tab_nc (t) - 1, tab_nr (t) - 1); tab_box (t, -1, -1, -1, TAL_GAP, 0, tab_t (t), tab_l (t) - 1, tab_nr (t) - 1); tab_vline (t, TAL_2, tab_l (t), 0, tab_nr (t) - 1); tab_submit (t); } static bool find_crosstab (struct pivot_table *pt, size_t *row0p, size_t *row1p) { size_t row0 = *row1p; size_t row1; if (row0 >= pt->n_entries) return false; for (row1 = row0 + 1; row1 < pt->n_entries; row1++) { struct freq *a = pt->entries[row0]; struct freq *b = pt->entries[row1]; if (compare_table_entry_vars_3way (a, b, pt, 2, pt->n_vars) != 0) break; } *row0p = row0; *row1p = row1; return true; } /* Compares `union value's A_ and B_ and returns a strcmp()-like result. WIDTH_ points to an int which is either 0 for a numeric value or a string width for a string value. */ static int compare_value_3way (const void *a_, const void *b_, const void *width_) { const union value *a = a_; const union value *b = b_; const int *width = width_; return value_compare_3way (a, b, *width); } /* Inverted version of the above */ static int compare_value_3way_inv (const void *a_, const void *b_, const void *width_) { return -compare_value_3way (a_, b_, width_); } /* Given an array of ENTRY_CNT table_entry structures starting at ENTRIES, creates a sorted list of the values that the variable with index VAR_IDX takes on. The values are returned as a malloc()'d array stored in *VALUES, with the number of values stored in *VALUE_CNT. The caller must eventually free *VALUES, but each pointer in *VALUES points to existing data not owned by *VALUES itself. */ static void enum_var_values (const struct pivot_table *pt, int var_idx, union value **valuesp, int *n_values, bool descending) { const struct variable *var = pt->vars[var_idx]; const struct var_range *range = get_var_range (pt->proc, var); union value *values; size_t i; if (range) { values = *valuesp = xnmalloc (range->count, sizeof *values); *n_values = range->count; for (i = 0; i < range->count; i++) values[i].f = range->min + i; } else { int width = var_get_width (var); struct hmapx_node *node; const union value *iter; struct hmapx set; hmapx_init (&set); for (i = 0; i < pt->n_entries; i++) { const struct freq *te = pt->entries[i]; const union value *value = &te->values[var_idx]; size_t hash = value_hash (value, width, 0); HMAPX_FOR_EACH_WITH_HASH (iter, node, hash, &set) if (value_equal (iter, value, width)) goto next_entry; hmapx_insert (&set, (union value *) value, hash); next_entry: ; } *n_values = hmapx_count (&set); values = *valuesp = xnmalloc (*n_values, sizeof *values); i = 0; HMAPX_FOR_EACH (iter, node, &set) values[i++] = *iter; hmapx_destroy (&set); sort (values, *n_values, sizeof *values, descending ? compare_value_3way_inv : compare_value_3way, &width); } } /* Sets cell (C,R) in TABLE, with options OPT, to have a value taken from V, displayed with print format spec from variable VAR. When in REPORT missing-value mode, missing values have an M appended. */ static void table_value_missing (struct crosstabs_proc *proc, struct tab_table *table, int c, int r, unsigned char opt, const union value *v, const struct variable *var) { const char *label = var_lookup_value_label (var, v); if (label != NULL) tab_text (table, c, r, TAB_LEFT, label); else { const struct fmt_spec *print = var_get_print_format (var); if (proc->exclude == MV_NEVER && var_is_value_missing (var, v, MV_USER)) { char *s = data_out (v, dict_get_encoding (proc->dict), print); tab_text_format (table, c, r, opt, "%sM", s + strspn (s, " ")); free (s); } else tab_value (table, c, r, opt, v, var, print); } } /* Draws a line across TABLE at the current row to indicate the most major dimension variable with index FIRST_DIFFERENCE out of N_VARS that changed, and puts the values that changed into the table. TB and PT must be the corresponding table_entry and crosstab, respectively. */ static void display_dimensions (struct crosstabs_proc *proc, struct pivot_table *pt, struct tab_table *table, int first_difference) { tab_hline (table, TAL_1, pt->n_consts + pt->n_vars - first_difference - 1, tab_nc (table) - 1, 0); for (; first_difference >= 2; first_difference--) table_value_missing (proc, table, pt->n_consts + pt->n_vars - first_difference - 1, 0, TAB_RIGHT, &pt->entries[0]->values[first_difference], pt->vars[first_difference]); } /* Put VALUE into cell (C,R) of TABLE, suffixed with character SUFFIX if nonzero. If MARK_MISSING is true the entry is additionally suffixed with a letter `M'. */ static void format_cell_entry (struct tab_table *table, int c, int r, double value, char suffix, bool mark_missing, const struct dictionary *dict) { union value v; char suffixes[3]; int suffix_len; char *s; v.f = value; s = data_out (&v, dict_get_encoding (dict), settings_get_format ()); suffix_len = 0; if (suffix != 0) suffixes[suffix_len++] = suffix; if (mark_missing) suffixes[suffix_len++] = 'M'; suffixes[suffix_len] = '\0'; tab_text_format (table, c, r, TAB_RIGHT, "%s%s", s + strspn (s, " "), suffixes); free (s); } /* Displays the crosstabulation table. */ static void display_crosstabulation (struct crosstabs_proc *proc, struct pivot_table *pt, struct tab_table *table) { int last_row; int r, c, i; double *mp; for (r = 0; r < pt->n_rows; r++) table_value_missing (proc, table, pt->n_consts + pt->n_vars - 2, r * proc->n_cells, TAB_RIGHT, &pt->rows[r], pt->vars[ROW_VAR]); tab_text (table, pt->n_vars - 2, pt->n_rows * proc->n_cells, TAB_LEFT, _("Total")); /* Put in the actual cells. */ mp = pt->mat; tab_offset (table, pt->n_consts + pt->n_vars - 1, -1); for (r = 0; r < pt->n_rows; r++) { if (proc->n_cells > 1) tab_hline (table, TAL_1, -1, pt->n_cols, 0); for (c = 0; c < pt->n_cols; c++) { bool mark_missing = false; double expected_value = pt->row_tot[r] * pt->col_tot[c] / pt->total; if (proc->exclude == MV_NEVER && (var_is_num_missing (pt->vars[COL_VAR], pt->cols[c].f, MV_USER) || var_is_num_missing (pt->vars[ROW_VAR], pt->rows[r].f, MV_USER))) mark_missing = true; for (i = 0; i < proc->n_cells; i++) { double v; int suffix = 0; switch (proc->a_cells[i]) { case CRS_CL_COUNT: v = *mp; break; case CRS_CL_ROW: v = *mp / pt->row_tot[r] * 100.; suffix = '%'; break; case CRS_CL_COLUMN: v = *mp / pt->col_tot[c] * 100.; suffix = '%'; break; case CRS_CL_TOTAL: v = *mp / pt->total * 100.; suffix = '%'; break; case CRS_CL_EXPECTED: v = expected_value; break; case CRS_CL_RESIDUAL: v = *mp - expected_value; break; case CRS_CL_SRESIDUAL: v = (*mp - expected_value) / sqrt (expected_value); break; case CRS_CL_ASRESIDUAL: v = ((*mp - expected_value) / sqrt (expected_value * (1. - pt->row_tot[r] / pt->total) * (1. - pt->col_tot[c] / pt->total))); break; default: NOT_REACHED (); } format_cell_entry (table, c, i, v, suffix, mark_missing, proc->dict); } mp++; } tab_offset (table, -1, tab_row (table) + proc->n_cells); } /* Row totals. */ tab_offset (table, -1, tab_row (table) - proc->n_cells * pt->n_rows); for (r = 0; r < pt->n_rows; r++) { bool mark_missing = false; if (proc->exclude == MV_NEVER && var_is_num_missing (pt->vars[ROW_VAR], pt->rows[r].f, MV_USER)) mark_missing = true; for (i = 0; i < proc->n_cells; i++) { char suffix = 0; double v; switch (proc->a_cells[i]) { case CRS_CL_COUNT: v = pt->row_tot[r]; break; case CRS_CL_ROW: v = 100.0; suffix = '%'; break; case CRS_CL_COLUMN: v = pt->row_tot[r] / pt->total * 100.; suffix = '%'; break; case CRS_CL_TOTAL: v = pt->row_tot[r] / pt->total * 100.; suffix = '%'; break; case CRS_CL_EXPECTED: case CRS_CL_RESIDUAL: case CRS_CL_SRESIDUAL: case CRS_CL_ASRESIDUAL: v = 0.; break; default: NOT_REACHED (); } format_cell_entry (table, pt->n_cols, 0, v, suffix, mark_missing, proc->dict); tab_next_row (table); } } /* Column totals, grand total. */ last_row = 0; if (proc->n_cells > 1) tab_hline (table, TAL_1, -1, pt->n_cols, 0); for (c = 0; c <= pt->n_cols; c++) { double ct = c < pt->n_cols ? pt->col_tot[c] : pt->total; bool mark_missing = false; int i; if (proc->exclude == MV_NEVER && c < pt->n_cols && var_is_num_missing (pt->vars[COL_VAR], pt->cols[c].f, MV_USER)) mark_missing = true; for (i = 0; i < proc->n_cells; i++) { char suffix = 0; double v; switch (proc->a_cells[i]) { case CRS_CL_COUNT: v = ct; break; case CRS_CL_ROW: v = ct / pt->total * 100.; suffix = '%'; break; case CRS_CL_COLUMN: v = 100.; suffix = '%'; break; case CRS_CL_TOTAL: v = ct / pt->total * 100.; suffix = '%'; break; case CRS_CL_EXPECTED: case CRS_CL_RESIDUAL: case CRS_CL_SRESIDUAL: case CRS_CL_ASRESIDUAL: continue; default: NOT_REACHED (); } format_cell_entry (table, c, i, v, suffix, mark_missing, proc->dict); } last_row = i; } tab_offset (table, -1, tab_row (table) + last_row); tab_offset (table, 0, -1); } static void calc_r (struct pivot_table *, double *PT, double *Y, double *, double *, double *); static void calc_chisq (struct pivot_table *, double[N_CHISQ], int[N_CHISQ], double *, double *); /* Display chi-square statistics. */ static void display_chisq (struct pivot_table *pt, struct tab_table *chisq, bool *showed_fisher) { static const char *chisq_stats[N_CHISQ] = { N_("Pearson Chi-Square"), N_("Likelihood Ratio"), N_("Fisher's Exact Test"), N_("Continuity Correction"), N_("Linear-by-Linear Association"), }; double chisq_v[N_CHISQ]; double fisher1, fisher2; int df[N_CHISQ]; int i; calc_chisq (pt, chisq_v, df, &fisher1, &fisher2); tab_offset (chisq, pt->n_consts + pt->n_vars - 2, -1); for (i = 0; i < N_CHISQ; i++) { if ((i != 2 && chisq_v[i] == SYSMIS) || (i == 2 && fisher1 == SYSMIS)) continue; tab_text (chisq, 0, 0, TAB_LEFT, gettext (chisq_stats[i])); if (i != 2) { tab_double (chisq, 1, 0, TAB_RIGHT, chisq_v[i], NULL, RC_OTHER); tab_double (chisq, 2, 0, TAB_RIGHT, df[i], NULL, RC_WEIGHT); tab_double (chisq, 3, 0, TAB_RIGHT, gsl_cdf_chisq_Q (chisq_v[i], df[i]), NULL, RC_PVALUE); } else { *showed_fisher = true; tab_double (chisq, 4, 0, TAB_RIGHT, fisher2, NULL, RC_PVALUE); tab_double (chisq, 5, 0, TAB_RIGHT, fisher1, NULL, RC_PVALUE); } tab_next_row (chisq); } tab_text (chisq, 0, 0, TAB_LEFT, _("N of Valid Cases")); tab_double (chisq, 1, 0, TAB_RIGHT, pt->total, NULL, RC_WEIGHT); tab_next_row (chisq); tab_offset (chisq, 0, -1); } static int calc_symmetric (struct crosstabs_proc *, struct pivot_table *, double[N_SYMMETRIC], double[N_SYMMETRIC], double[N_SYMMETRIC], double[3], double[3], double[3]); /* Display symmetric measures. */ static void display_symmetric (struct crosstabs_proc *proc, struct pivot_table *pt, struct tab_table *sym) { static const char *categories[] = { N_("Nominal by Nominal"), N_("Ordinal by Ordinal"), N_("Interval by Interval"), N_("Measure of Agreement"), }; static const char *stats[N_SYMMETRIC] = { N_("Phi"), N_("Cramer's V"), N_("Contingency Coefficient"), N_("Kendall's tau-b"), N_("Kendall's tau-c"), N_("Gamma"), N_("Spearman Correlation"), N_("Pearson's R"), N_("Kappa"), }; static const int stats_categories[N_SYMMETRIC] = { 0, 0, 0, 1, 1, 1, 1, 2, 3, }; int last_cat = -1; double sym_v[N_SYMMETRIC], sym_ase[N_SYMMETRIC], sym_t[N_SYMMETRIC]; double somers_d_v[3], somers_d_ase[3], somers_d_t[3]; int i; if (!calc_symmetric (proc, pt, sym_v, sym_ase, sym_t, somers_d_v, somers_d_ase, somers_d_t)) return; tab_offset (sym, pt->n_consts + pt->n_vars - 2, -1); for (i = 0; i < N_SYMMETRIC; i++) { if (sym_v[i] == SYSMIS) continue; if (stats_categories[i] != last_cat) { last_cat = stats_categories[i]; tab_text (sym, 0, 0, TAB_LEFT, gettext (categories[last_cat])); } tab_text (sym, 1, 0, TAB_LEFT, gettext (stats[i])); tab_double (sym, 2, 0, TAB_RIGHT, sym_v[i], NULL, RC_OTHER); if (sym_ase[i] != SYSMIS) tab_double (sym, 3, 0, TAB_RIGHT, sym_ase[i], NULL, RC_OTHER); if (sym_t[i] != SYSMIS) tab_double (sym, 4, 0, TAB_RIGHT, sym_t[i], NULL, RC_OTHER); /*tab_double (sym, 5, 0, TAB_RIGHT, normal_sig (sym_v[i]), NULL, RC_PVALUE);*/ tab_next_row (sym); } tab_text (sym, 0, 0, TAB_LEFT, _("N of Valid Cases")); tab_double (sym, 2, 0, TAB_RIGHT, pt->total, NULL, RC_WEIGHT); tab_next_row (sym); tab_offset (sym, 0, -1); } static int calc_risk (struct pivot_table *, double[], double[], double[], union value *); /* Display risk estimate. */ static void display_risk (struct pivot_table *pt, struct tab_table *risk) { char buf[256]; double risk_v[3], lower[3], upper[3]; union value c[2]; int i; if (!calc_risk (pt, risk_v, upper, lower, c)) return; tab_offset (risk, pt->n_consts + pt->n_vars - 2, -1); for (i = 0; i < 3; i++) { const struct variable *cv = pt->vars[COL_VAR]; const struct variable *rv = pt->vars[ROW_VAR]; int cvw = var_get_width (cv); int rvw = var_get_width (rv); if (risk_v[i] == SYSMIS) continue; switch (i) { case 0: if (var_is_numeric (cv)) sprintf (buf, _("Odds Ratio for %s (%g / %g)"), var_to_string (cv), c[0].f, c[1].f); else sprintf (buf, _("Odds Ratio for %s (%.*s / %.*s)"), var_to_string (cv), cvw, value_str (&c[0], cvw), cvw, value_str (&c[1], cvw)); break; case 1: case 2: if (var_is_numeric (rv)) sprintf (buf, _("For cohort %s = %.*g"), var_to_string (rv), DBL_DIG + 1, pt->rows[i - 1].f); else sprintf (buf, _("For cohort %s = %.*s"), var_to_string (rv), rvw, value_str (&pt->rows[i - 1], rvw)); break; } tab_text (risk, 0, 0, TAB_LEFT, buf); tab_double (risk, 1, 0, TAB_RIGHT, risk_v[i], NULL, RC_OTHER); tab_double (risk, 2, 0, TAB_RIGHT, lower[i], NULL, RC_OTHER); tab_double (risk, 3, 0, TAB_RIGHT, upper[i], NULL, RC_OTHER); tab_next_row (risk); } tab_text (risk, 0, 0, TAB_LEFT, _("N of Valid Cases")); tab_double (risk, 1, 0, TAB_RIGHT, pt->total, NULL, RC_WEIGHT); tab_next_row (risk); tab_offset (risk, 0, -1); } static int calc_directional (struct crosstabs_proc *, struct pivot_table *, double[N_DIRECTIONAL], double[N_DIRECTIONAL], double[N_DIRECTIONAL], double[N_DIRECTIONAL]); /* Display directional measures. */ static void display_directional (struct crosstabs_proc *proc, struct pivot_table *pt, struct tab_table *direct) { static const char *categories[] = { N_("Nominal by Nominal"), N_("Ordinal by Ordinal"), N_("Nominal by Interval"), }; static const char *stats[] = { N_("Lambda"), N_("Goodman and Kruskal tau"), N_("Uncertainty Coefficient"), N_("Somers' d"), N_("Eta"), }; static const char *types[] = { N_("Symmetric"), N_("%s Dependent"), N_("%s Dependent"), }; static const int stats_categories[N_DIRECTIONAL] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, }; static const int stats_stats[N_DIRECTIONAL] = { 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, }; static const int stats_types[N_DIRECTIONAL] = { 0, 1, 2, 1, 2, 0, 1, 2, 0, 1, 2, 1, 2, }; static const int *stats_lookup[] = { stats_categories, stats_stats, stats_types, }; static const char **stats_names[] = { categories, stats, types, }; int last[3] = { -1, -1, -1, }; double direct_v[N_DIRECTIONAL]; double direct_ase[N_DIRECTIONAL]; double direct_t[N_DIRECTIONAL]; double sig[N_DIRECTIONAL]; int i; if (!calc_directional (proc, pt, direct_v, direct_ase, direct_t, sig)) return; tab_offset (direct, pt->n_consts + pt->n_vars - 2, -1); for (i = 0; i < N_DIRECTIONAL; i++) { if (direct_v[i] == SYSMIS) continue; { int j; for (j = 0; j < 3; j++) if (last[j] != stats_lookup[j][i]) { if (j < 2) tab_hline (direct, TAL_1, j, 6, 0); for (; j < 3; j++) { const char *string; int k = last[j] = stats_lookup[j][i]; if (k == 0) string = NULL; else if (k == 1) string = var_to_string (pt->vars[0]); else string = var_to_string (pt->vars[1]); tab_text_format (direct, j, 0, TAB_LEFT, gettext (stats_names[j][k]), string); } } } tab_double (direct, 3, 0, TAB_RIGHT, direct_v[i], NULL, RC_OTHER); if (direct_ase[i] != SYSMIS) tab_double (direct, 4, 0, TAB_RIGHT, direct_ase[i], NULL, RC_OTHER); if (direct_t[i] != SYSMIS) tab_double (direct, 5, 0, TAB_RIGHT, direct_t[i], NULL, RC_OTHER); tab_double (direct, 6, 0, TAB_RIGHT, sig[i], NULL, RC_PVALUE); tab_next_row (direct); } tab_offset (direct, 0, -1); } /* Statistical calculations. */ /* Returns the value of the logarithm of gamma (factorial) function for an integer argument PT. */ static double log_gamma_int (double pt) { double r = 0; int i; for (i = 2; i < pt; i++) r += log(i); return r; } /* Calculate P_r as specified in _SPSS Statistical Algorithms_, Appendix 5. */ static inline double Pr (int a, int b, int c, int d) { return exp (log_gamma_int (a + b + 1.) - log_gamma_int (a + 1.) + log_gamma_int (c + d + 1.) - log_gamma_int (b + 1.) + log_gamma_int (a + c + 1.) - log_gamma_int (c + 1.) + log_gamma_int (b + d + 1.) - log_gamma_int (d + 1.) - log_gamma_int (a + b + c + d + 1.)); } /* Swap the contents of A and B. */ static inline void swap (int *a, int *b) { int t = *a; *a = *b; *b = t; } /* Calculate significance for Fisher's exact test as specified in _SPSS Statistical Algorithms_, Appendix 5. */ static void calc_fisher (int a, int b, int c, int d, double *fisher1, double *fisher2) { int pt; double pn1; if (MIN (c, d) < MIN (a, b)) swap (&a, &c), swap (&b, &d); if (MIN (b, d) < MIN (a, c)) swap (&a, &b), swap (&c, &d); if (b * c < a * d) { if (b < c) swap (&a, &b), swap (&c, &d); else swap (&a, &c), swap (&b, &d); } pn1 = Pr (a, b, c, d); *fisher1 = pn1; for (pt = 1; pt <= a; pt++) { *fisher1 += Pr (a - pt, b + pt, c + pt, d - pt); } *fisher2 = *fisher1; for (pt = 1; pt <= b; pt++) { double p = Pr (a + pt, b - pt, c - pt, d + pt); if (p < pn1) *fisher2 += p; } } /* Calculates chi-squares into CHISQ. MAT is a matrix with N_COLS columns with values COLS and N_ROWS rows with values ROWS. Values in the matrix sum to pt->total. */ static void calc_chisq (struct pivot_table *pt, double chisq[N_CHISQ], int df[N_CHISQ], double *fisher1, double *fisher2) { int r, c; chisq[0] = chisq[1] = 0.; chisq[2] = chisq[3] = chisq[4] = SYSMIS; *fisher1 = *fisher2 = SYSMIS; df[0] = df[1] = (pt->ns_cols - 1) * (pt->ns_rows - 1); if (pt->ns_rows <= 1 || pt->ns_cols <= 1) { chisq[0] = chisq[1] = SYSMIS; return; } for (r = 0; r < pt->n_rows; r++) for (c = 0; c < pt->n_cols; c++) { const double expected = pt->row_tot[r] * pt->col_tot[c] / pt->total; const double freq = pt->mat[pt->n_cols * r + c]; const double residual = freq - expected; chisq[0] += residual * residual / expected; if (freq) chisq[1] += freq * log (expected / freq); } if (chisq[0] == 0.) chisq[0] = SYSMIS; if (chisq[1] != 0.) chisq[1] *= -2.; else chisq[1] = SYSMIS; /* Calculate Yates and Fisher exact test. */ if (pt->ns_cols == 2 && pt->ns_rows == 2) { double f11, f12, f21, f22; { int nz_cols[2]; int i, j; for (i = j = 0; i < pt->n_cols; i++) if (pt->col_tot[i] != 0.) { nz_cols[j++] = i; if (j == 2) break; } assert (j == 2); f11 = pt->mat[nz_cols[0]]; f12 = pt->mat[nz_cols[1]]; f21 = pt->mat[nz_cols[0] + pt->n_cols]; f22 = pt->mat[nz_cols[1] + pt->n_cols]; } /* Yates. */ { const double pt_ = fabs (f11 * f22 - f12 * f21) - 0.5 * pt->total; if (pt_ > 0.) chisq[3] = (pt->total * pow2 (pt_) / (f11 + f12) / (f21 + f22) / (f11 + f21) / (f12 + f22)); else chisq[3] = 0.; df[3] = 1.; } /* Fisher. */ calc_fisher (f11 + .5, f12 + .5, f21 + .5, f22 + .5, fisher1, fisher2); } /* Calculate Mantel-Haenszel. */ if (var_is_numeric (pt->vars[ROW_VAR]) && var_is_numeric (pt->vars[COL_VAR])) { double r, ase_0, ase_1; calc_r (pt, (double *) pt->rows, (double *) pt->cols, &r, &ase_0, &ase_1); chisq[4] = (pt->total - 1.) * r * r; df[4] = 1; } } /* Calculate the value of Pearson's r. r is stored into R, its T value into T, and standard error into ERROR. The row and column values must be passed in PT and Y. */ static void calc_r (struct pivot_table *pt, double *PT, double *Y, double *r, double *t, double *error) { double SX, SY, S, T; double Xbar, Ybar; double sum_XYf, sum_X2Y2f; double sum_Xr, sum_X2r; double sum_Yc, sum_Y2c; int i, j; for (sum_X2Y2f = sum_XYf = 0., i = 0; i < pt->n_rows; i++) for (j = 0; j < pt->n_cols; j++) { double fij = pt->mat[j + i * pt->n_cols]; double product = PT[i] * Y[j]; double temp = fij * product; sum_XYf += temp; sum_X2Y2f += temp * product; } for (sum_Xr = sum_X2r = 0., i = 0; i < pt->n_rows; i++) { sum_Xr += PT[i] * pt->row_tot[i]; sum_X2r += pow2 (PT[i]) * pt->row_tot[i]; } Xbar = sum_Xr / pt->total; for (sum_Yc = sum_Y2c = 0., i = 0; i < pt->n_cols; i++) { sum_Yc += Y[i] * pt->col_tot[i]; sum_Y2c += Y[i] * Y[i] * pt->col_tot[i]; } Ybar = sum_Yc / pt->total; S = sum_XYf - sum_Xr * sum_Yc / pt->total; SX = sum_X2r - pow2 (sum_Xr) / pt->total; SY = sum_Y2c - pow2 (sum_Yc) / pt->total; T = sqrt (SX * SY); *r = S / T; *t = *r / sqrt (1 - pow2 (*r)) * sqrt (pt->total - 2); { double s, c, y, t; for (s = c = 0., i = 0; i < pt->n_rows; i++) for (j = 0; j < pt->n_cols; j++) { double Xresid, Yresid; double temp; Xresid = PT[i] - Xbar; Yresid = Y[j] - Ybar; temp = (T * Xresid * Yresid - ((S / (2. * T)) * (Xresid * Xresid * SY + Yresid * Yresid * SX))); y = pt->mat[j + i * pt->n_cols] * temp * temp - c; t = s + y; c = (t - s) - y; s = t; } *error = sqrt (s) / (T * T); } } /* Calculate symmetric statistics and their asymptotic standard errors. Returns 0 if none could be calculated. */ static int calc_symmetric (struct crosstabs_proc *proc, struct pivot_table *pt, double v[N_SYMMETRIC], double ase[N_SYMMETRIC], double t[N_SYMMETRIC], double somers_d_v[3], double somers_d_ase[3], double somers_d_t[3]) { int q, i; q = MIN (pt->ns_rows, pt->ns_cols); if (q <= 1) return 0; for (i = 0; i < N_SYMMETRIC; i++) v[i] = ase[i] = t[i] = SYSMIS; /* Phi, Cramer's V, contingency coefficient. */ if (proc->statistics & ((1u << CRS_ST_PHI) | (1u << CRS_ST_CC))) { double Xp = 0.; /* Pearson chi-square. */ int r, c; for (r = 0; r < pt->n_rows; r++) for (c = 0; c < pt->n_cols; c++) { const double expected = pt->row_tot[r] * pt->col_tot[c] / pt->total; const double freq = pt->mat[pt->n_cols * r + c]; const double residual = freq - expected; Xp += residual * residual / expected; } if (proc->statistics & (1u << CRS_ST_PHI)) { v[0] = sqrt (Xp / pt->total); v[1] = sqrt (Xp / (pt->total * (q - 1))); } if (proc->statistics & (1u << CRS_ST_CC)) v[2] = sqrt (Xp / (Xp + pt->total)); } if (proc->statistics & ((1u << CRS_ST_BTAU) | (1u << CRS_ST_CTAU) | (1u << CRS_ST_GAMMA) | (1u << CRS_ST_D))) { double *cum; double Dr, Dc; double P, Q; double btau_cum, ctau_cum, gamma_cum, d_yx_cum, d_xy_cum; double btau_var; int r, c; Dr = Dc = pow2 (pt->total); for (r = 0; r < pt->n_rows; r++) Dr -= pow2 (pt->row_tot[r]); for (c = 0; c < pt->n_cols; c++) Dc -= pow2 (pt->col_tot[c]); cum = xnmalloc (pt->n_cols * pt->n_rows, sizeof *cum); for (c = 0; c < pt->n_cols; c++) { double ct = 0.; for (r = 0; r < pt->n_rows; r++) cum[c + r * pt->n_cols] = ct += pt->mat[c + r * pt->n_cols]; } /* P and Q. */ { int i, j; double Cij, Dij; P = Q = 0.; for (i = 0; i < pt->n_rows; i++) { Cij = Dij = 0.; for (j = 1; j < pt->n_cols; j++) Cij += pt->col_tot[j] - cum[j + i * pt->n_cols]; if (i > 0) for (j = 1; j < pt->n_cols; j++) Dij += cum[j + (i - 1) * pt->n_cols]; for (j = 0;;) { double fij = pt->mat[j + i * pt->n_cols]; P += fij * Cij; Q += fij * Dij; if (++j == pt->n_cols) break; assert (j < pt->n_cols); Cij -= pt->col_tot[j] - cum[j + i * pt->n_cols]; Dij += pt->col_tot[j - 1] - cum[j - 1 + i * pt->n_cols]; if (i > 0) { Cij += cum[j - 1 + (i - 1) * pt->n_cols]; Dij -= cum[j + (i - 1) * pt->n_cols]; } } } } if (proc->statistics & (1u << CRS_ST_BTAU)) v[3] = (P - Q) / sqrt (Dr * Dc); if (proc->statistics & (1u << CRS_ST_CTAU)) v[4] = (q * (P - Q)) / (pow2 (pt->total) * (q - 1)); if (proc->statistics & (1u << CRS_ST_GAMMA)) v[5] = (P - Q) / (P + Q); /* ASE for tau-b, tau-c, gamma. Calculations could be eliminated here, at expense of memory. */ { int i, j; double Cij, Dij; btau_cum = ctau_cum = gamma_cum = d_yx_cum = d_xy_cum = 0.; for (i = 0; i < pt->n_rows; i++) { Cij = Dij = 0.; for (j = 1; j < pt->n_cols; j++) Cij += pt->col_tot[j] - cum[j + i * pt->n_cols]; if (i > 0) for (j = 1; j < pt->n_cols; j++) Dij += cum[j + (i - 1) * pt->n_cols]; for (j = 0;;) { double fij = pt->mat[j + i * pt->n_cols]; if (proc->statistics & (1u << CRS_ST_BTAU)) { const double temp = (2. * sqrt (Dr * Dc) * (Cij - Dij) + v[3] * (pt->row_tot[i] * Dc + pt->col_tot[j] * Dr)); btau_cum += fij * temp * temp; } { const double temp = Cij - Dij; ctau_cum += fij * temp * temp; } if (proc->statistics & (1u << CRS_ST_GAMMA)) { const double temp = Q * Cij - P * Dij; gamma_cum += fij * temp * temp; } if (proc->statistics & (1u << CRS_ST_D)) { d_yx_cum += fij * pow2 (Dr * (Cij - Dij) - (P - Q) * (pt->total - pt->row_tot[i])); d_xy_cum += fij * pow2 (Dc * (Dij - Cij) - (Q - P) * (pt->total - pt->col_tot[j])); } if (++j == pt->n_cols) break; assert (j < pt->n_cols); Cij -= pt->col_tot[j] - cum[j + i * pt->n_cols]; Dij += pt->col_tot[j - 1] - cum[j - 1 + i * pt->n_cols]; if (i > 0) { Cij += cum[j - 1 + (i - 1) * pt->n_cols]; Dij -= cum[j + (i - 1) * pt->n_cols]; } } } } btau_var = ((btau_cum - (pt->total * pow2 (pt->total * (P - Q) / sqrt (Dr * Dc) * (Dr + Dc)))) / pow2 (Dr * Dc)); if (proc->statistics & (1u << CRS_ST_BTAU)) { ase[3] = sqrt (btau_var); t[3] = v[3] / (2 * sqrt ((ctau_cum - (P - Q) * (P - Q) / pt->total) / (Dr * Dc))); } if (proc->statistics & (1u << CRS_ST_CTAU)) { ase[4] = ((2 * q / ((q - 1) * pow2 (pt->total))) * sqrt (ctau_cum - (P - Q) * (P - Q) / pt->total)); t[4] = v[4] / ase[4]; } if (proc->statistics & (1u << CRS_ST_GAMMA)) { ase[5] = ((4. / ((P + Q) * (P + Q))) * sqrt (gamma_cum)); t[5] = v[5] / (2. / (P + Q) * sqrt (ctau_cum - (P - Q) * (P - Q) / pt->total)); } if (proc->statistics & (1u << CRS_ST_D)) { somers_d_v[0] = (P - Q) / (.5 * (Dc + Dr)); somers_d_ase[0] = SYSMIS; somers_d_t[0] = (somers_d_v[0] / (4 / (Dc + Dr) * sqrt (ctau_cum - pow2 (P - Q) / pt->total))); somers_d_v[1] = (P - Q) / Dc; somers_d_ase[1] = 2. / pow2 (Dc) * sqrt (d_xy_cum); somers_d_t[1] = (somers_d_v[1] / (2. / Dc * sqrt (ctau_cum - pow2 (P - Q) / pt->total))); somers_d_v[2] = (P - Q) / Dr; somers_d_ase[2] = 2. / pow2 (Dr) * sqrt (d_yx_cum); somers_d_t[2] = (somers_d_v[2] / (2. / Dr * sqrt (ctau_cum - pow2 (P - Q) / pt->total))); } free (cum); } /* Spearman correlation, Pearson's r. */ if (proc->statistics & (1u << CRS_ST_CORR)) { double *R = xmalloc (sizeof *R * pt->n_rows); double *C = xmalloc (sizeof *C * pt->n_cols); { double y, t, c = 0., s = 0.; int i = 0; for (;;) { R[i] = s + (pt->row_tot[i] + 1.) / 2.; y = pt->row_tot[i] - c; t = s + y; c = (t - s) - y; s = t; if (++i == pt->n_rows) break; assert (i < pt->n_rows); } } { double y, t, c = 0., s = 0.; int j = 0; for (;;) { C[j] = s + (pt->col_tot[j] + 1.) / 2; y = pt->col_tot[j] - c; t = s + y; c = (t - s) - y; s = t; if (++j == pt->n_cols) break; assert (j < pt->n_cols); } } calc_r (pt, R, C, &v[6], &t[6], &ase[6]); free (R); free (C); calc_r (pt, (double *) pt->rows, (double *) pt->cols, &v[7], &t[7], &ase[7]); } /* Cohen's kappa. */ if (proc->statistics & (1u << CRS_ST_KAPPA) && pt->ns_rows == pt->ns_cols) { double ase_under_h0; double sum_fii, sum_rici, sum_fiiri_ci, sum_fijri_ci2, sum_riciri_ci; int i, j; for (sum_fii = sum_rici = sum_fiiri_ci = sum_riciri_ci = 0., i = j = 0; i < pt->ns_rows; i++, j++) { double prod, sum; while (pt->col_tot[j] == 0.) j++; prod = pt->row_tot[i] * pt->col_tot[j]; sum = pt->row_tot[i] + pt->col_tot[j]; sum_fii += pt->mat[j + i * pt->n_cols]; sum_rici += prod; sum_fiiri_ci += pt->mat[j + i * pt->n_cols] * sum; sum_riciri_ci += prod * sum; } for (sum_fijri_ci2 = 0., i = 0; i < pt->ns_rows; i++) for (j = 0; j < pt->ns_cols; j++) { double sum = pt->row_tot[i] + pt->col_tot[j]; sum_fijri_ci2 += pt->mat[j + i * pt->n_cols] * sum * sum; } v[8] = (pt->total * sum_fii - sum_rici) / (pow2 (pt->total) - sum_rici); ase_under_h0 = sqrt ((pow2 (pt->total) * sum_rici + sum_rici * sum_rici - pt->total * sum_riciri_ci) / (pt->total * (pow2 (pt->total) - sum_rici) * (pow2 (pt->total) - sum_rici))); ase[8] = sqrt (pt->total * (((sum_fii * (pt->total - sum_fii)) / pow2 (pow2 (pt->total) - sum_rici)) + ((2. * (pt->total - sum_fii) * (2. * sum_fii * sum_rici - pt->total * sum_fiiri_ci)) / pow3 (pow2 (pt->total) - sum_rici)) + (pow2 (pt->total - sum_fii) * (pt->total * sum_fijri_ci2 - 4. * sum_rici * sum_rici) / pow4 (pow2 (pt->total) - sum_rici)))); t[8] = v[8] / ase_under_h0; } return 1; } /* Calculate risk estimate. */ static int calc_risk (struct pivot_table *pt, double *value, double *upper, double *lower, union value *c) { double f11, f12, f21, f22; double v; { int i; for (i = 0; i < 3; i++) value[i] = upper[i] = lower[i] = SYSMIS; } if (pt->ns_rows != 2 || pt->ns_cols != 2) return 0; { int nz_cols[2]; int i, j; for (i = j = 0; i < pt->n_cols; i++) if (pt->col_tot[i] != 0.) { nz_cols[j++] = i; if (j == 2) break; } assert (j == 2); f11 = pt->mat[nz_cols[0]]; f12 = pt->mat[nz_cols[1]]; f21 = pt->mat[nz_cols[0] + pt->n_cols]; f22 = pt->mat[nz_cols[1] + pt->n_cols]; c[0] = pt->cols[nz_cols[0]]; c[1] = pt->cols[nz_cols[1]]; } value[0] = (f11 * f22) / (f12 * f21); v = sqrt (1. / f11 + 1. / f12 + 1. / f21 + 1. / f22); lower[0] = value[0] * exp (-1.960 * v); upper[0] = value[0] * exp (1.960 * v); value[1] = (f11 * (f21 + f22)) / (f21 * (f11 + f12)); v = sqrt ((f12 / (f11 * (f11 + f12))) + (f22 / (f21 * (f21 + f22)))); lower[1] = value[1] * exp (-1.960 * v); upper[1] = value[1] * exp (1.960 * v); value[2] = (f12 * (f21 + f22)) / (f22 * (f11 + f12)); v = sqrt ((f11 / (f12 * (f11 + f12))) + (f21 / (f22 * (f21 + f22)))); lower[2] = value[2] * exp (-1.960 * v); upper[2] = value[2] * exp (1.960 * v); return 1; } /* Calculate directional measures. */ static int calc_directional (struct crosstabs_proc *proc, struct pivot_table *pt, double v[N_DIRECTIONAL], double ase[N_DIRECTIONAL], double t[N_DIRECTIONAL], double sig[N_DIRECTIONAL]) { { int i; for (i = 0; i < N_DIRECTIONAL; i++) v[i] = ase[i] = t[i] = sig[i] = SYSMIS; } /* Lambda. */ if (proc->statistics & (1u << CRS_ST_LAMBDA)) { double *fim = xnmalloc (pt->n_rows, sizeof *fim); int *fim_index = xnmalloc (pt->n_rows, sizeof *fim_index); double *fmj = xnmalloc (pt->n_cols, sizeof *fmj); int *fmj_index = xnmalloc (pt->n_cols, sizeof *fmj_index); double sum_fim, sum_fmj; double rm, cm; int rm_index, cm_index; int i, j; /* Find maximum for each row and their sum. */ for (sum_fim = 0., i = 0; i < pt->n_rows; i++) { double max = pt->mat[i * pt->n_cols]; int index = 0; for (j = 1; j < pt->n_cols; j++) if (pt->mat[j + i * pt->n_cols] > max) { max = pt->mat[j + i * pt->n_cols]; index = j; } sum_fim += fim[i] = max; fim_index[i] = index; } /* Find maximum for each column. */ for (sum_fmj = 0., j = 0; j < pt->n_cols; j++) { double max = pt->mat[j]; int index = 0; for (i = 1; i < pt->n_rows; i++) if (pt->mat[j + i * pt->n_cols] > max) { max = pt->mat[j + i * pt->n_cols]; index = i; } sum_fmj += fmj[j] = max; fmj_index[j] = index; } /* Find maximum row total. */ rm = pt->row_tot[0]; rm_index = 0; for (i = 1; i < pt->n_rows; i++) if (pt->row_tot[i] > rm) { rm = pt->row_tot[i]; rm_index = i; } /* Find maximum column total. */ cm = pt->col_tot[0]; cm_index = 0; for (j = 1; j < pt->n_cols; j++) if (pt->col_tot[j] > cm) { cm = pt->col_tot[j]; cm_index = j; } v[0] = (sum_fim + sum_fmj - cm - rm) / (2. * pt->total - rm - cm); v[1] = (sum_fmj - rm) / (pt->total - rm); v[2] = (sum_fim - cm) / (pt->total - cm); /* ASE1 for Y given PT. */ { double accum; accum = 0.; for (i = 0; i < pt->n_rows; i++) if (cm_index == fim_index[i]) accum += fim[i]; ase[2] = sqrt ((pt->total - sum_fim) * (sum_fim + cm - 2. * accum) / pow3 (pt->total - cm)); } /* ASE0 for Y given PT. */ { double accum; for (accum = 0., i = 0; i < pt->n_rows; i++) if (cm_index != fim_index[i]) accum += (pt->mat[i * pt->n_cols + fim_index[i]] + pt->mat[i * pt->n_cols + cm_index]); t[2] = v[2] / (sqrt (accum - pow2 (sum_fim - cm) / pt->total) / (pt->total - cm)); } /* ASE1 for PT given Y. */ { double accum; accum = 0.; for (j = 0; j < pt->n_cols; j++) if (rm_index == fmj_index[j]) accum += fmj[j]; ase[1] = sqrt ((pt->total - sum_fmj) * (sum_fmj + rm - 2. * accum) / pow3 (pt->total - rm)); } /* ASE0 for PT given Y. */ { double accum; for (accum = 0., j = 0; j < pt->n_cols; j++) if (rm_index != fmj_index[j]) accum += (pt->mat[j + pt->n_cols * fmj_index[j]] + pt->mat[j + pt->n_cols * rm_index]); t[1] = v[1] / (sqrt (accum - pow2 (sum_fmj - rm) / pt->total) / (pt->total - rm)); } /* Symmetric ASE0 and ASE1. */ { double accum0; double accum1; for (accum0 = accum1 = 0., i = 0; i < pt->n_rows; i++) for (j = 0; j < pt->n_cols; j++) { int temp0 = (fmj_index[j] == i) + (fim_index[i] == j); int temp1 = (i == rm_index) + (j == cm_index); accum0 += pt->mat[j + i * pt->n_cols] * pow2 (temp0 - temp1); accum1 += (pt->mat[j + i * pt->n_cols] * pow2 (temp0 + (v[0] - 1.) * temp1)); } ase[0] = sqrt (accum1 - 4. * pt->total * v[0] * v[0]) / (2. * pt->total - rm - cm); t[0] = v[0] / (sqrt (accum0 - pow2 (sum_fim + sum_fmj - cm - rm) / pt->total) / (2. * pt->total - rm - cm)); } for (i = 0; i < 3; i++) sig[i] = 2 * gsl_cdf_ugaussian_Q (t[i]); free (fim); free (fim_index); free (fmj); free (fmj_index); /* Tau. */ { double sum_fij2_ri, sum_fij2_ci; double sum_ri2, sum_cj2; for (sum_fij2_ri = sum_fij2_ci = 0., i = 0; i < pt->n_rows; i++) for (j = 0; j < pt->n_cols; j++) { double temp = pow2 (pt->mat[j + i * pt->n_cols]); sum_fij2_ri += temp / pt->row_tot[i]; sum_fij2_ci += temp / pt->col_tot[j]; } for (sum_ri2 = 0., i = 0; i < pt->n_rows; i++) sum_ri2 += pow2 (pt->row_tot[i]); for (sum_cj2 = 0., j = 0; j < pt->n_cols; j++) sum_cj2 += pow2 (pt->col_tot[j]); v[3] = (pt->total * sum_fij2_ci - sum_ri2) / (pow2 (pt->total) - sum_ri2); v[4] = (pt->total * sum_fij2_ri - sum_cj2) / (pow2 (pt->total) - sum_cj2); } } if (proc->statistics & (1u << CRS_ST_UC)) { double UX, UY, UXY, P; double ase1_yx, ase1_xy, ase1_sym; int i, j; for (UX = 0., i = 0; i < pt->n_rows; i++) if (pt->row_tot[i] > 0.) UX -= pt->row_tot[i] / pt->total * log (pt->row_tot[i] / pt->total); for (UY = 0., j = 0; j < pt->n_cols; j++) if (pt->col_tot[j] > 0.) UY -= pt->col_tot[j] / pt->total * log (pt->col_tot[j] / pt->total); for (UXY = P = 0., i = 0; i < pt->n_rows; i++) for (j = 0; j < pt->n_cols; j++) { double entry = pt->mat[j + i * pt->n_cols]; if (entry <= 0.) continue; P += entry * pow2 (log (pt->col_tot[j] * pt->row_tot[i] / (pt->total * entry))); UXY -= entry / pt->total * log (entry / pt->total); } for (ase1_yx = ase1_xy = ase1_sym = 0., i = 0; i < pt->n_rows; i++) for (j = 0; j < pt->n_cols; j++) { double entry = pt->mat[j + i * pt->n_cols]; if (entry <= 0.) continue; ase1_yx += entry * pow2 (UY * log (entry / pt->row_tot[i]) + (UX - UXY) * log (pt->col_tot[j] / pt->total)); ase1_xy += entry * pow2 (UX * log (entry / pt->col_tot[j]) + (UY - UXY) * log (pt->row_tot[i] / pt->total)); ase1_sym += entry * pow2 ((UXY * log (pt->row_tot[i] * pt->col_tot[j] / pow2 (pt->total))) - (UX + UY) * log (entry / pt->total)); } v[5] = 2. * ((UX + UY - UXY) / (UX + UY)); ase[5] = (2. / (pt->total * pow2 (UX + UY))) * sqrt (ase1_sym); t[5] = SYSMIS; v[6] = (UX + UY - UXY) / UX; ase[6] = sqrt (ase1_xy) / (pt->total * UX * UX); t[6] = v[6] / (sqrt (P - pt->total * pow2 (UX + UY - UXY)) / (pt->total * UX)); v[7] = (UX + UY - UXY) / UY; ase[7] = sqrt (ase1_yx) / (pt->total * UY * UY); t[7] = v[7] / (sqrt (P - pt->total * pow2 (UX + UY - UXY)) / (pt->total * UY)); } /* Somers' D. */ if (proc->statistics & (1u << CRS_ST_D)) { double v_dummy[N_SYMMETRIC]; double ase_dummy[N_SYMMETRIC]; double t_dummy[N_SYMMETRIC]; double somers_d_v[3]; double somers_d_ase[3]; double somers_d_t[3]; if (calc_symmetric (proc, pt, v_dummy, ase_dummy, t_dummy, somers_d_v, somers_d_ase, somers_d_t)) { int i; for (i = 0; i < 3; i++) { v[8 + i] = somers_d_v[i]; ase[8 + i] = somers_d_ase[i]; t[8 + i] = somers_d_t[i]; sig[8 + i] = 2 * gsl_cdf_ugaussian_Q (fabs (somers_d_t[i])); } } } /* Eta. */ if (proc->statistics & (1u << CRS_ST_ETA)) { { double sum_Xr, sum_X2r; double SX, SXW; int i, j; for (sum_Xr = sum_X2r = 0., i = 0; i < pt->n_rows; i++) { sum_Xr += pt->rows[i].f * pt->row_tot[i]; sum_X2r += pow2 (pt->rows[i].f) * pt->row_tot[i]; } SX = sum_X2r - pow2 (sum_Xr) / pt->total; for (SXW = 0., j = 0; j < pt->n_cols; j++) { double cum; for (cum = 0., i = 0; i < pt->n_rows; i++) { SXW += pow2 (pt->rows[i].f) * pt->mat[j + i * pt->n_cols]; cum += pt->rows[i].f * pt->mat[j + i * pt->n_cols]; } SXW -= cum * cum / pt->col_tot[j]; } v[11] = sqrt (1. - SXW / SX); } { double sum_Yc, sum_Y2c; double SY, SYW; int i, j; for (sum_Yc = sum_Y2c = 0., i = 0; i < pt->n_cols; i++) { sum_Yc += pt->cols[i].f * pt->col_tot[i]; sum_Y2c += pow2 (pt->cols[i].f) * pt->col_tot[i]; } SY = sum_Y2c - sum_Yc * sum_Yc / pt->total; for (SYW = 0., i = 0; i < pt->n_rows; i++) { double cum; for (cum = 0., j = 0; j < pt->n_cols; j++) { SYW += pow2 (pt->cols[j].f) * pt->mat[j + i * pt->n_cols]; cum += pt->cols[j].f * pt->mat[j + i * pt->n_cols]; } SYW -= cum * cum / pt->row_tot[i]; } v[12] = sqrt (1. - SYW / SY); } } return 1; } /* Local Variables: mode: c End: */ pspp-1.0.1/src/language/stats/friedman.h0000644000175000017500000000225512470243700015065 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !friedman_h #define friedman_h 1 #include #include #include "language/stats/npar.h" struct friedman_test { struct one_sample_test parent; /* Calculate and display the Kendall W statistic */ bool kendalls_w; }; void friedman_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool, double); #endif pspp-1.0.1/src/language/stats/correlations.c0000644000175000017500000003237613137223525016012 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/variable.h" #include "language/command.h" #include "language/dictionary/split-file.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/assertion.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "math/correlation.h" #include "math/covariance.h" #include "math/moments.h" #include "output/tab.h" #include "gl/xalloc.h" #include "gl/minmax.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid struct corr { size_t n_vars_total; size_t n_vars1; const struct variable **vars; }; /* Handling of missing values. */ enum corr_missing_type { CORR_PAIRWISE, /* Handle missing values on a per-variable-pair basis. */ CORR_LISTWISE /* Discard entire case if any variable is missing. */ }; enum stats_opts { STATS_DESCRIPTIVES = 0x01, STATS_XPROD = 0x02, STATS_ALL = STATS_XPROD | STATS_DESCRIPTIVES }; struct corr_opts { enum corr_missing_type missing_type; enum mv_class exclude; /* Classes of missing values to exclude. */ bool sig; /* Flag significant values or not */ int tails; /* Report significance with how many tails ? */ enum stats_opts statistics; const struct variable *wv; /* The weight variable (if any) */ }; static void output_descriptives (const struct corr *corr, const gsl_matrix *means, const gsl_matrix *vars, const gsl_matrix *ns) { const int nr = corr->n_vars_total + 1; const int nc = 4; int c, r; const int heading_columns = 1; const int heading_rows = 1; struct tab_table *t = tab_create (nc, nr); tab_title (t, _("Descriptive Statistics")); tab_headers (t, heading_columns, 0, heading_rows, 0); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); /* Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_hline (t, TAL_1, 0, nc - 1, heading_rows); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Mean")); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Std. Deviation")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("N")); for (r = 0 ; r < corr->n_vars_total ; ++r) { const struct variable *v = corr->vars[r]; tab_text (t, 0, r + heading_rows, TAB_LEFT | TAT_TITLE, var_to_string (v)); for (c = 1 ; c < nc ; ++c) { double x ; double n; switch (c) { case 1: x = gsl_matrix_get (means, r, 0); break; case 2: x = gsl_matrix_get (vars, r, 0); /* Here we want to display the non-biased estimator */ n = gsl_matrix_get (ns, r, 0); x *= n / (n -1); x = sqrt (x); break; case 3: x = gsl_matrix_get (ns, r, 0); break; default: NOT_REACHED (); }; tab_double (t, c, r + heading_rows, 0, x, NULL, RC_OTHER); } } tab_submit (t); } static void output_correlation (const struct corr *corr, const struct corr_opts *opts, const gsl_matrix *cm, const gsl_matrix *samples, const gsl_matrix *cv) { int r, c; struct tab_table *t; int matrix_cols; int nr = corr->n_vars1; int nc = matrix_cols = corr->n_vars_total > corr->n_vars1 ? corr->n_vars_total - corr->n_vars1 : corr->n_vars1; const struct fmt_spec *wfmt = opts->wv ? var_get_print_format (opts->wv) : & F_8_0; const int heading_columns = 2; const int heading_rows = 1; int rows_per_variable = opts->missing_type == CORR_LISTWISE ? 2 : 3; if (opts->statistics & STATS_XPROD) rows_per_variable += 2; /* Two header columns */ nc += heading_columns; /* Three data per variable */ nr *= rows_per_variable; /* One header row */ nr += heading_rows; t = tab_create (nc, nr); tab_set_format (t, RC_WEIGHT, wfmt); tab_title (t, _("Correlations")); tab_headers (t, heading_columns, 0, heading_rows, 0); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); /* Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_vline (t, TAL_1, 1, heading_rows, nr - 1); /* Row Headers */ for (r = 0 ; r < corr->n_vars1 ; ++r) { tab_text (t, 0, 1 + r * rows_per_variable, TAB_LEFT | TAT_TITLE, var_to_string (corr->vars[r])); tab_text (t, 1, 1 + r * rows_per_variable, TAB_LEFT | TAT_TITLE, _("Pearson Correlation")); tab_text (t, 1, 2 + r * rows_per_variable, TAB_LEFT | TAT_TITLE, (opts->tails == 2) ? _("Sig. (2-tailed)") : _("Sig. (1-tailed)")); if (opts->statistics & STATS_XPROD) { tab_text (t, 1, 3 + r * rows_per_variable, TAB_LEFT | TAT_TITLE, _("Cross-products")); tab_text (t, 1, 4 + r * rows_per_variable, TAB_LEFT | TAT_TITLE, _("Covariance")); } if ( opts->missing_type != CORR_LISTWISE ) tab_text (t, 1, rows_per_variable + r * rows_per_variable, TAB_LEFT | TAT_TITLE, _("N")); tab_hline (t, TAL_1, 0, nc - 1, r * rows_per_variable + 1); } /* Column Headers */ for (c = 0 ; c < matrix_cols ; ++c) { const struct variable *v = corr->n_vars_total > corr->n_vars1 ? corr->vars[corr->n_vars1 + c] : corr->vars[c]; tab_text (t, heading_columns + c, 0, TAB_LEFT | TAT_TITLE, var_to_string (v)); } for (r = 0 ; r < corr->n_vars1 ; ++r) { const int row = r * rows_per_variable + heading_rows; for (c = 0 ; c < matrix_cols ; ++c) { unsigned char flags = 0; const int col_index = corr->n_vars_total > corr->n_vars1 ? corr->n_vars1 + c : c; double pearson = gsl_matrix_get (cm, r, col_index); double w = gsl_matrix_get (samples, r, col_index); double sig = opts->tails * significance_of_correlation (pearson, w); if ( opts->missing_type != CORR_LISTWISE ) tab_double (t, c + heading_columns, row + rows_per_variable - 1, 0, w, NULL, RC_WEIGHT); if ( col_index != r) tab_double (t, c + heading_columns, row + 1, 0, sig, NULL, RC_PVALUE); if ( opts->sig && col_index != r && sig < 0.05) flags = TAB_EMPH; tab_double (t, c + heading_columns, row, flags, pearson, NULL, RC_OTHER); if (opts->statistics & STATS_XPROD) { double cov = gsl_matrix_get (cv, r, col_index); const double xprod_dev = cov * w; cov *= w / (w - 1.0); tab_double (t, c + heading_columns, row + 2, 0, xprod_dev, NULL, RC_OTHER); tab_double (t, c + heading_columns, row + 3, 0, cov, NULL, RC_OTHER); } } } tab_submit (t); } static void run_corr (struct casereader *r, const struct corr_opts *opts, const struct corr *corr) { struct ccase *c; const gsl_matrix *var_matrix, *samples_matrix, *mean_matrix; gsl_matrix *cov_matrix = NULL; gsl_matrix *corr_matrix = NULL; struct covariance *cov = covariance_2pass_create (corr->n_vars_total, corr->vars, NULL, opts->wv, opts->exclude, true); struct casereader *rc = casereader_clone (r); for ( ; (c = casereader_read (r) ); case_unref (c)) { covariance_accumulate_pass1 (cov, c); } for ( ; (c = casereader_read (rc) ); case_unref (c)) { covariance_accumulate_pass2 (cov, c); } casereader_destroy (rc); cov_matrix = covariance_calculate (cov); if (! cov_matrix) { msg (SE, _("The data for the chosen variables are all missing or empty.")); goto error; } samples_matrix = covariance_moments (cov, MOMENT_NONE); var_matrix = covariance_moments (cov, MOMENT_VARIANCE); mean_matrix = covariance_moments (cov, MOMENT_MEAN); corr_matrix = correlation_from_covariance (cov_matrix, var_matrix); if ( opts->statistics & STATS_DESCRIPTIVES) output_descriptives (corr, mean_matrix, var_matrix, samples_matrix); output_correlation (corr, opts, corr_matrix, samples_matrix, cov_matrix); error: covariance_destroy (cov); gsl_matrix_free (corr_matrix); gsl_matrix_free (cov_matrix); } int cmd_correlation (struct lexer *lexer, struct dataset *ds) { int i; int n_all_vars = 0; /* Total number of variables involved in this command */ const struct variable **all_vars ; const struct dictionary *dict = dataset_dict (ds); bool ok = true; struct casegrouper *grouper; struct casereader *group; struct corr *corr = NULL; size_t n_corrs = 0; struct corr_opts opts; opts.missing_type = CORR_PAIRWISE; opts.wv = dict_get_weight (dict); opts.tails = 2; opts.sig = false; opts.exclude = MV_ANY; opts.statistics = 0; /* Parse CORRELATIONS. */ while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "PAIRWISE")) opts.missing_type = CORR_PAIRWISE; else if (lex_match_id (lexer, "LISTWISE")) opts.missing_type = CORR_LISTWISE; else if (lex_match_id (lexer, "INCLUDE")) opts.exclude = MV_SYSTEM; else if (lex_match_id (lexer, "EXCLUDE")) opts.exclude = MV_ANY; else { lex_error (lexer, NULL); goto error; } lex_match (lexer, T_COMMA); } } else if (lex_match_id (lexer, "PRINT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if ( lex_match_id (lexer, "TWOTAIL")) opts.tails = 2; else if (lex_match_id (lexer, "ONETAIL")) opts.tails = 1; else if (lex_match_id (lexer, "SIG")) opts.sig = false; else if (lex_match_id (lexer, "NOSIG")) opts.sig = true; else { lex_error (lexer, NULL); goto error; } lex_match (lexer, T_COMMA); } } else if (lex_match_id (lexer, "STATISTICS")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if ( lex_match_id (lexer, "DESCRIPTIVES")) opts.statistics = STATS_DESCRIPTIVES; else if (lex_match_id (lexer, "XPROD")) opts.statistics = STATS_XPROD; else if (lex_token (lexer) == T_ALL) { opts.statistics = STATS_ALL; lex_get (lexer); } else { lex_error (lexer, NULL); goto error; } lex_match (lexer, T_COMMA); } } else { if (lex_match_id (lexer, "VARIABLES")) { lex_match (lexer, T_EQUALS); } corr = xrealloc (corr, sizeof (*corr) * (n_corrs + 1)); corr[n_corrs].n_vars_total = corr[n_corrs].n_vars1 = 0; if ( ! parse_variables_const (lexer, dict, &corr[n_corrs].vars, &corr[n_corrs].n_vars_total, PV_NUMERIC)) { ok = false; break; } corr[n_corrs].n_vars1 = corr[n_corrs].n_vars_total; if ( lex_match (lexer, T_WITH)) { if ( ! parse_variables_const (lexer, dict, &corr[n_corrs].vars, &corr[n_corrs].n_vars_total, PV_NUMERIC | PV_APPEND)) { ok = false; break; } } n_all_vars += corr[n_corrs].n_vars_total; n_corrs++; } } if (n_corrs == 0) { msg (SE, _("No variables specified.")); goto error; } all_vars = xmalloc (sizeof (*all_vars) * n_all_vars); { /* FIXME: Using a hash here would make more sense */ const struct variable **vv = all_vars; for (i = 0 ; i < n_corrs; ++i) { int v; const struct corr *c = &corr[i]; for (v = 0 ; v < c->n_vars_total; ++v) *vv++ = c->vars[v]; } } grouper = casegrouper_create_splits (proc_open (ds), dict); while (casegrouper_get_next_group (grouper, &group)) { for (i = 0 ; i < n_corrs; ++i) { /* FIXME: No need to iterate the data multiple times */ struct casereader *r = casereader_clone (group); if ( opts.missing_type == CORR_LISTWISE) r = casereader_create_filter_missing (r, all_vars, n_all_vars, opts.exclude, NULL, NULL); run_corr (r, &opts, &corr[i]); casereader_destroy (r); } casereader_destroy (group); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; free (all_vars); /* Done. */ free (corr->vars); free (corr); return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; error: if (corr) free (corr->vars); free (corr); return CMD_FAILURE; } pspp-1.0.1/src/language/stats/quick-cluster.c0000644000175000017500000005320213146355723016076 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2012, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include "data/case.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/missing-values.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/assertion.h" #include "libpspp/str.h" #include "math/random.h" #include "output/tab.h" #include "output/text-item.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid enum missing_type { MISS_LISTWISE, MISS_PAIRWISE, }; struct qc { const struct variable **vars; size_t n_vars; double epsilon; /* The convergence criterium */ int ngroups; /* Number of group. (Given by the user) */ int maxiter; /* Maximum iterations (Given by the user) */ bool print_cluster_membership; /* true => print membership */ bool print_initial_clusters; /* true => print initial cluster */ bool no_initial; /* true => simplified initial cluster selection */ bool no_update; /* true => do not iterate */ const struct variable *wv; /* Weighting variable. */ enum missing_type missing_type; enum mv_class exclude; }; /* Holds all of the information for the functions. int n, holds the number of observation and its default value is -1. We set it in kmeans_recalculate_centers in first invocation. */ struct Kmeans { gsl_matrix *centers; /* Centers for groups. */ gsl_matrix *updated_centers; casenumber n; gsl_vector_long *num_elements_groups; gsl_matrix *initial_centers; /* Initial random centers. */ double convergence_criteria; gsl_permutation *group_order; /* Group order for reporting. */ }; static struct Kmeans *kmeans_create (const struct qc *qc); static void kmeans_get_nearest_group (const struct Kmeans *kmeans, struct ccase *c, const struct qc *, int *, double *, int *, double *); static void kmeans_order_groups (struct Kmeans *kmeans, const struct qc *); static void kmeans_cluster (struct Kmeans *kmeans, struct casereader *reader, const struct qc *); static void quick_cluster_show_centers (struct Kmeans *kmeans, bool initial, const struct qc *); static void quick_cluster_show_membership (struct Kmeans *kmeans, const struct casereader *reader, const struct qc *); static void quick_cluster_show_number_cases (struct Kmeans *kmeans, const struct qc *); static void quick_cluster_show_results (struct Kmeans *kmeans, const struct casereader *reader, const struct qc *); int cmd_quick_cluster (struct lexer *lexer, struct dataset *ds); static void kmeans_destroy (struct Kmeans *kmeans); /* Creates and returns a struct of Kmeans with given casereader 'cs', parsed variables 'variables', number of cases 'n', number of variables 'm', number of clusters and amount of maximum iterations. */ static struct Kmeans * kmeans_create (const struct qc *qc) { struct Kmeans *kmeans = xmalloc (sizeof (struct Kmeans)); kmeans->centers = gsl_matrix_alloc (qc->ngroups, qc->n_vars); kmeans->updated_centers = gsl_matrix_alloc (qc->ngroups, qc->n_vars); kmeans->num_elements_groups = gsl_vector_long_alloc (qc->ngroups); kmeans->group_order = gsl_permutation_alloc (kmeans->centers->size1); kmeans->initial_centers = NULL; return (kmeans); } static void kmeans_destroy (struct Kmeans *kmeans) { gsl_matrix_free (kmeans->centers); gsl_matrix_free (kmeans->updated_centers); gsl_matrix_free (kmeans->initial_centers); gsl_vector_long_free (kmeans->num_elements_groups); gsl_permutation_free (kmeans->group_order); free (kmeans); } static double diff_matrix (const gsl_matrix *m1, const gsl_matrix *m2) { int i,j; double max_diff = -INFINITY; for (i = 0; i < m1->size1; ++i) { double diff = 0; for (j = 0; j < m1->size2; ++j) { diff += pow2 (gsl_matrix_get (m1,i,j) - gsl_matrix_get (m2,i,j) ); } if (diff > max_diff) max_diff = diff; } return max_diff; } static double matrix_mindist (const gsl_matrix *m, int *mn, int *mm) { int i, j; double mindist = INFINITY; for (i = 0; i < m->size1 - 1; ++i) { for (j = i + 1; j < m->size1; ++j) { int k; double diff_sq = 0; for (k = 0; k < m->size2; ++k) { diff_sq += pow2 (gsl_matrix_get (m, j, k) - gsl_matrix_get (m, i, k)); } if (diff_sq < mindist) { mindist = diff_sq; if (mn) *mn = i; if (mm) *mm = j; } } } return mindist; } /* Return the distance of C from the group whose index is WHICH */ static double dist_from_case (const struct Kmeans *kmeans, const struct ccase *c, const struct qc *qc, int which) { int j; double dist = 0; for (j = 0; j < qc->n_vars; j++) { const union value *val = case_data (c, qc->vars[j]); if ( var_is_value_missing (qc->vars[j], val, qc->exclude)) NOT_REACHED (); dist += pow2 (gsl_matrix_get (kmeans->centers, which, j) - val->f); } return dist; } /* Return the minimum distance of the group WHICH and all other groups */ static double min_dist_from (const struct Kmeans *kmeans, const struct qc *qc, int which) { int j, i; double mindist = INFINITY; for (i = 0; i < qc->ngroups; i++) { if (i == which) continue; double dist = 0; for (j = 0; j < qc->n_vars; j++) { dist += pow2 (gsl_matrix_get (kmeans->centers, i, j) - gsl_matrix_get (kmeans->centers, which, j)); } if (dist < mindist) { mindist = dist; } } return mindist; } /* Calculate the initial cluster centers. */ static void kmeans_initial_centers (struct Kmeans *kmeans, const struct casereader *reader, const struct qc *qc) { struct ccase *c; int nc = 0, j; struct casereader *cs = casereader_clone (reader); for (; (c = casereader_read (cs)) != NULL; case_unref (c)) { bool missing = false; for (j = 0; j < qc->n_vars; ++j) { const union value *val = case_data (c, qc->vars[j]); if ( var_is_value_missing (qc->vars[j], val, qc->exclude)) { missing = true; break; } if (nc < qc->ngroups) gsl_matrix_set (kmeans->centers, nc, j, val->f); } if (missing) continue; if (nc++ < qc->ngroups) continue; if (!qc->no_initial) { int mq, mp; double delta; int mn, mm; double m = matrix_mindist (kmeans->centers, &mn, &mm); kmeans_get_nearest_group (kmeans, c, qc, &mq, &delta, &mp, NULL); if (delta > m) /* If the distance between C and the nearest group, is greater than the distance between the two groups which are clostest to each other, then one group must be replaced */ { /* Out of mn and mm, which is the clostest of the two groups to C ? */ int which = (dist_from_case (kmeans, c, qc, mn) > dist_from_case (kmeans, c, qc, mm)) ? mm : mn; for (j = 0; j < qc->n_vars; ++j) { const union value *val = case_data (c, qc->vars[j]); gsl_matrix_set (kmeans->centers, which, j, val->f); } } else if (dist_from_case (kmeans, c, qc, mp) > min_dist_from (kmeans, qc, mq)) /* If the distance between C and the second nearest group (MP) is greater than the smallest distance between the nearest group (MQ) and any other group, then replace MQ with C */ { for (j = 0; j < qc->n_vars; ++j) { const union value *val = case_data (c, qc->vars[j]); gsl_matrix_set (kmeans->centers, mq, j, val->f); } } } } casereader_destroy (cs); kmeans->convergence_criteria = qc->epsilon * matrix_mindist (kmeans->centers, NULL, NULL); /* As it is the first iteration, the variable kmeans->initial_centers is NULL and it is created once for reporting issues. */ kmeans->initial_centers = gsl_matrix_alloc (qc->ngroups, qc->n_vars); gsl_matrix_memcpy (kmeans->initial_centers, kmeans->centers); } /* Return the index of the group which is nearest to the case C */ static void kmeans_get_nearest_group (const struct Kmeans *kmeans, struct ccase *c, const struct qc *qc, int *g_q, double *delta_q, int *g_p, double *delta_p) { int result0 = -1; int result1 = -1; int i, j; double mindist0 = INFINITY; double mindist1 = INFINITY; for (i = 0; i < qc->ngroups; i++) { double dist = 0; for (j = 0; j < qc->n_vars; j++) { const union value *val = case_data (c, qc->vars[j]); if ( var_is_value_missing (qc->vars[j], val, qc->exclude)) continue; dist += pow2 (gsl_matrix_get (kmeans->centers, i, j) - val->f); } if (dist < mindist0) { mindist1 = mindist0; result1 = result0; mindist0 = dist; result0 = i; } else if (dist < mindist1) { mindist1 = dist; result1 = i; } } if (delta_q) *delta_q = mindist0; if (g_q) *g_q = result0; if (delta_p) *delta_p = mindist1; if (g_p) *g_p = result1; } static void kmeans_order_groups (struct Kmeans *kmeans, const struct qc *qc) { gsl_vector *v = gsl_vector_alloc (qc->ngroups); gsl_matrix_get_col (v, kmeans->centers, 0); gsl_sort_vector_index (kmeans->group_order, v); gsl_vector_free (v); } /* Main algorithm. Does iterations, checks convergency. */ static void kmeans_cluster (struct Kmeans *kmeans, struct casereader *reader, const struct qc *qc) { int j; kmeans_initial_centers (kmeans, reader, qc); gsl_matrix_memcpy (kmeans->updated_centers, kmeans->centers); for (int xx = 0 ; xx < qc->maxiter ; ++xx) { gsl_vector_long_set_all (kmeans->num_elements_groups, 0.0); kmeans->n = 0; if (!qc->no_update) { struct casereader *r = casereader_clone (reader); struct ccase *c; for (; (c = casereader_read (r)) != NULL; case_unref (c)) { int group = -1; int g; bool missing = false; for (j = 0; j < qc->n_vars; j++) { const union value *val = case_data (c, qc->vars[j]); if ( var_is_value_missing (qc->vars[j], val, qc->exclude)) missing = true; } if (missing) continue; double mindist = INFINITY; for (g = 0; g < qc->ngroups; ++g) { double d = dist_from_case (kmeans, c, qc, g); if (d < mindist) { mindist = d; group = g; } } long *n = gsl_vector_long_ptr (kmeans->num_elements_groups, group); *n += qc->wv ? case_data (c, qc->wv)->f : 1.0; kmeans->n++; for (j = 0; j < qc->n_vars; ++j) { const union value *val = case_data (c, qc->vars[j]); if ( var_is_value_missing (qc->vars[j], val, qc->exclude)) continue; double *x = gsl_matrix_ptr (kmeans->updated_centers, group, j); *x += val->f * (qc->wv ? case_data (c, qc->wv)->f : 1.0); } } casereader_destroy (r); } int g; /* Divide the cluster sums by the number of items in each cluster */ for (g = 0; g < qc->ngroups; ++g) { for (j = 0; j < qc->n_vars; ++j) { long n = gsl_vector_long_get (kmeans->num_elements_groups, g); double *x = gsl_matrix_ptr (kmeans->updated_centers, g, j); *x /= n + 1; // Plus 1 for the initial centers } } gsl_matrix_memcpy (kmeans->centers, kmeans->updated_centers); { kmeans->n = 0; /* Step 3 */ gsl_vector_long_set_all (kmeans->num_elements_groups, 0.0); gsl_matrix_set_all (kmeans->updated_centers, 0.0); struct ccase *c; struct casereader *cs = casereader_clone (reader); for (; (c = casereader_read (cs)) != NULL; case_unref (c)) { int group = -1; kmeans_get_nearest_group (kmeans, c, qc, &group, NULL, NULL, NULL); for (j = 0; j < qc->n_vars; ++j) { const union value *val = case_data (c, qc->vars[j]); if ( var_is_value_missing (qc->vars[j], val, qc->exclude)) continue; double *x = gsl_matrix_ptr (kmeans->updated_centers, group, j); *x += val->f; } long *n = gsl_vector_long_ptr (kmeans->num_elements_groups, group); *n += qc->wv ? case_data (c, qc->wv)->f : 1.0; kmeans->n++; } casereader_destroy (cs); /* Divide the cluster sums by the number of items in each cluster */ for (g = 0; g < qc->ngroups; ++g) { for (j = 0; j < qc->n_vars; ++j) { long n = gsl_vector_long_get (kmeans->num_elements_groups, g); double *x = gsl_matrix_ptr (kmeans->updated_centers, g, j); *x /= n ; } } double d = diff_matrix (kmeans->updated_centers, kmeans->centers); if (d < kmeans->convergence_criteria) break; } if (qc->no_update) break; } } /* Reports centers of clusters. Initial parameter is optional for future use. If initial is true, initial cluster centers are reported. Otherwise, resulted centers are reported. */ static void quick_cluster_show_centers (struct Kmeans *kmeans, bool initial, const struct qc *qc) { struct tab_table *t; int nc, nr, currow; int i, j; nc = qc->ngroups + 1; nr = qc->n_vars + 4; t = tab_create (nc, nr); tab_headers (t, 0, nc - 1, 0, 1); currow = 0; if (!initial) { tab_title (t, _("Final Cluster Centers")); } else { tab_title (t, _("Initial Cluster Centers")); } tab_box (t, TAL_2, TAL_2, TAL_0, TAL_1, 0, 0, nc - 1, nr - 1); tab_joint_text (t, 1, 0, nc - 1, 0, TAB_CENTER, _("Cluster")); tab_hline (t, TAL_1, 1, nc - 1, 2); currow += 2; for (i = 0; i < qc->ngroups; i++) { tab_text_format (t, (i + 1), currow, TAB_CENTER, "%d", (i + 1)); } currow++; tab_hline (t, TAL_1, 1, nc - 1, currow); currow++; for (i = 0; i < qc->n_vars; i++) { tab_text (t, 0, currow + i, TAB_LEFT, var_to_string (qc->vars[i])); } for (i = 0; i < qc->ngroups; i++) { for (j = 0; j < qc->n_vars; j++) { if (!initial) { tab_double (t, i + 1, j + 4, TAB_CENTER, gsl_matrix_get (kmeans->centers, kmeans->group_order->data[i], j), var_get_print_format (qc->vars[j]), RC_OTHER); } else { tab_double (t, i + 1, j + 4, TAB_CENTER, gsl_matrix_get (kmeans->initial_centers, kmeans->group_order->data[i], j), var_get_print_format (qc->vars[j]), RC_OTHER); } } } tab_submit (t); } /* Reports cluster membership for each case. */ static void quick_cluster_show_membership (struct Kmeans *kmeans, const struct casereader *reader, const struct qc *qc) { struct tab_table *t; int nc, nr, i; struct ccase *c; struct casereader *cs = casereader_clone (reader); nc = 2; nr = kmeans->n + 1; t = tab_create (nc, nr); tab_headers (t, 0, nc - 1, 0, 0); tab_title (t, _("Cluster Membership")); tab_text (t, 0, 0, TAB_CENTER, _("Case Number")); tab_text (t, 1, 0, TAB_CENTER, _("Cluster")); tab_box (t, TAL_2, TAL_2, TAL_0, TAL_1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_1, 0, nc - 1, 1); gsl_permutation *ip = gsl_permutation_alloc (qc->ngroups); gsl_permutation_inverse (ip, kmeans->group_order); for (i = 0; (c = casereader_read (cs)) != NULL; i++, case_unref (c)) { int clust = -1; assert (i < kmeans->n); kmeans_get_nearest_group (kmeans, c, qc, &clust, NULL, NULL, NULL); clust = ip->data[clust]; tab_text_format (t, 0, i+1, TAB_CENTER, "%d", (i + 1)); tab_text_format (t, 1, i+1, TAB_CENTER, "%d", (clust + 1)); } gsl_permutation_free (ip); assert (i == kmeans->n); tab_submit (t); casereader_destroy (cs); } /* Reports number of cases of each single cluster. */ static void quick_cluster_show_number_cases (struct Kmeans *kmeans, const struct qc *qc) { struct tab_table *t; int nc, nr; int i, numelem; long int total; nc = 3; nr = qc->ngroups + 1; t = tab_create (nc, nr); tab_headers (t, 0, nc - 1, 0, 0); tab_title (t, _("Number of Cases in each Cluster")); tab_box (t, TAL_2, TAL_2, TAL_0, TAL_1, 0, 0, nc - 1, nr - 1); tab_text (t, 0, 0, TAB_LEFT, _("Cluster")); total = 0; for (i = 0; i < qc->ngroups; i++) { tab_text_format (t, 1, i, TAB_CENTER, "%d", (i + 1)); numelem = kmeans->num_elements_groups->data[kmeans->group_order->data[i]]; tab_text_format (t, 2, i, TAB_CENTER, "%d", numelem); total += numelem; } tab_text (t, 0, qc->ngroups, TAB_LEFT, _("Valid")); tab_text_format (t, 2, qc->ngroups, TAB_LEFT, "%ld", total); tab_submit (t); } /* Reports. */ static void quick_cluster_show_results (struct Kmeans *kmeans, const struct casereader *reader, const struct qc *qc) { kmeans_order_groups (kmeans, qc); /* what does this do? */ if( qc->print_initial_clusters ) quick_cluster_show_centers (kmeans, true, qc); quick_cluster_show_centers (kmeans, false, qc); quick_cluster_show_number_cases (kmeans, qc); if( qc->print_cluster_membership ) quick_cluster_show_membership(kmeans, reader, qc); } int cmd_quick_cluster (struct lexer *lexer, struct dataset *ds) { struct qc qc; struct Kmeans *kmeans; bool ok; const struct dictionary *dict = dataset_dict (ds); qc.ngroups = 2; qc.maxiter = 10; qc.epsilon = DBL_EPSILON; qc.missing_type = MISS_LISTWISE; qc.exclude = MV_ANY; qc.print_cluster_membership = false; /* default = do not output case cluster membership */ qc.print_initial_clusters = false; /* default = do not print initial clusters */ qc.no_initial = false; /* default = use well separated initial clusters */ qc.no_update = false; /* default = iterate until convergence or max iterations */ if (!parse_variables_const (lexer, dict, &qc.vars, &qc.n_vars, PV_NO_DUPLICATE | PV_NUMERIC)) { return (CMD_FAILURE); } while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "LISTWISE") || lex_match_id (lexer, "DEFAULT")) { qc.missing_type = MISS_LISTWISE; } else if (lex_match_id (lexer, "PAIRWISE")) { qc.missing_type = MISS_PAIRWISE; } else if (lex_match_id (lexer, "INCLUDE")) { qc.exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "EXCLUDE")) { qc.exclude = MV_ANY; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "PRINT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "CLUSTER")) qc.print_cluster_membership = true; else if (lex_match_id (lexer, "INITIAL")) qc.print_initial_clusters = true; else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "CRITERIA")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "CLUSTERS")) { if (lex_force_match (lexer, T_LPAREN) && lex_force_int (lexer)) { qc.ngroups = lex_integer (lexer); if (qc.ngroups <= 0) { lex_error (lexer, _("The number of clusters must be positive")); goto error; } lex_get (lexer); if (!lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "CONVERGE")) { if (lex_force_match (lexer, T_LPAREN) && lex_force_num (lexer)) { qc.epsilon = lex_number (lexer); if (qc.epsilon <= 0) { lex_error (lexer, _("The convergence criterium must be positive")); goto error; } lex_get (lexer); if (!lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "MXITER")) { if (lex_force_match (lexer, T_LPAREN) && lex_force_int (lexer)) { qc.maxiter = lex_integer (lexer); if (qc.maxiter <= 0) { lex_error (lexer, _("The number of iterations must be positive")); goto error; } lex_get (lexer); if (!lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "NOINITIAL")) { qc.no_initial = true; } else if (lex_match_id (lexer, "NOUPDATE")) { qc.no_update = true; } else { lex_error (lexer, NULL); goto error; } } } else { lex_error (lexer, NULL); goto error; } } qc.wv = dict_get_weight (dict); { struct casereader *group; struct casegrouper *grouper = casegrouper_create_splits (proc_open (ds), dict); while (casegrouper_get_next_group (grouper, &group)) { if ( qc.missing_type == MISS_LISTWISE ) { group = casereader_create_filter_missing (group, qc.vars, qc.n_vars, qc.exclude, NULL, NULL); } kmeans = kmeans_create (&qc); kmeans_cluster (kmeans, group, &qc); quick_cluster_show_results (kmeans, group, &qc); kmeans_destroy (kmeans); casereader_destroy (group); } ok = casegrouper_destroy (grouper); } ok = proc_commit (ds) && ok; free (qc.vars); return (ok); error: free (qc.vars); return CMD_FAILURE; } pspp-1.0.1/src/language/stats/ks-one-sample.c0000644000175000017500000002311613137223525015751 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/ks-one-sample.h" #include #include #include #include "math/sort.h" #include "data/case.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/value-labels.h" #include "data/variable.h" #include "language/stats/freq.h" #include "language/stats/npar.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/hash-functions.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "output/tab.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* The per test variable statistics */ struct ks { double obs_cc; double test_min ; double test_max; double mu; double sigma; double diff_pos; double diff_neg; double ssq; double sum; }; typedef double theoretical (const struct ks *ks, double x); typedef theoretical *theoreticalfp; static double theoretical_uniform (const struct ks *ks, double x) { return gsl_cdf_flat_P (x, ks->test_min, ks->test_max); } static double theoretical_normal (const struct ks *ks, double x) { return gsl_cdf_gaussian_P (x - ks->mu, ks->sigma); } static double theoretical_poisson (const struct ks *ks, double x) { return gsl_cdf_poisson_P (x, ks->mu); } static double theoretical_exponential (const struct ks *ks, double x) { return gsl_cdf_exponential_P (x, 1/ks->mu); } static const theoreticalfp theoreticalf[4] = { theoretical_normal, theoretical_uniform, theoretical_poisson, theoretical_exponential }; /* Return the assymptotic approximation to the significance of Z */ static double ks_asymp_sig (double z) { if (z < 0.27) return 1; if (z >= 3.1) return 0; if (z < 1) { double q = exp (-1.233701 * pow (z, -2)); return 1 - 2.506628 * (q + pow (q, 9) + pow (q, 25))/ z ; } else { double q = exp (-2 * z * z); return 2 * (q - pow (q, 4) + pow (q, 9) - pow (q, 16))/ z ; } } static void show_results (const struct ks *, const struct ks_one_sample_test *, const struct fmt_spec *); void ks_one_sample_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool x UNUSED, double y UNUSED) { const struct dictionary *dict = dataset_dict (ds); const struct ks_one_sample_test *kst = UP_CAST (test, const struct ks_one_sample_test, parent.parent); const struct one_sample_test *ost = &kst->parent; struct ccase *c; const struct variable *wvar = dict_get_weight (dict); const struct fmt_spec *wfmt = wvar ? var_get_print_format (wvar) : & F_8_0; bool warn = true; int v; struct casereader *r = casereader_clone (input); struct ks *ks = xcalloc (ost->n_vars, sizeof *ks); for (v = 0; v < ost->n_vars; ++v) { ks[v].obs_cc = 0; ks[v].test_min = DBL_MAX; ks[v].test_max = -DBL_MAX; ks[v].diff_pos = -DBL_MAX; ks[v].diff_neg = DBL_MAX; ks[v].sum = 0; ks[v].ssq = 0; } for (; (c = casereader_read (r)) != NULL; case_unref (c)) { const double weight = dict_get_case_weight (dict, c, &warn); for (v = 0; v < ost->n_vars; ++v) { const struct variable *var = ost->vars[v]; const union value *val = case_data (c, var); if (var_is_value_missing (var, val, exclude)) continue; minimize (&ks[v].test_min, val->f); maximize (&ks[v].test_max, val->f); ks[v].obs_cc += weight; ks[v].sum += val->f; ks[v].ssq += pow2 (val->f); } } casereader_destroy (r); for (v = 0; v < ost->n_vars; ++v) { const struct variable *var = ost->vars[v]; double cc = 0; double prev_empirical = 0; switch (kst->dist) { case KS_UNIFORM: if (kst->p[0] != SYSMIS) ks[v].test_min = kst->p[0]; if (kst->p[1] != SYSMIS) ks[v].test_max = kst->p[1]; break; case KS_NORMAL: if (kst->p[0] != SYSMIS) ks[v].mu = kst->p[0]; else ks[v].mu = ks[v].sum / ks[v].obs_cc; if (kst->p[1] != SYSMIS) ks[v].sigma = kst->p[1]; else { ks[v].sigma = ks[v].ssq - pow2 (ks[v].sum) / ks[v].obs_cc; ks[v].sigma /= ks[v].obs_cc - 1; ks[v].sigma = sqrt (ks[v].sigma); } break; case KS_POISSON: case KS_EXPONENTIAL: if (kst->p[0] != SYSMIS) ks[v].mu = ks[v].sigma = kst->p[0]; else ks[v].mu = ks[v].sigma = ks[v].sum / ks[v].obs_cc; break; default: NOT_REACHED (); } r = sort_execute_1var (casereader_clone (input), var); for (; (c = casereader_read (r)) != NULL; case_unref (c)) { double theoretical, empirical; double d, dp; const double weight = dict_get_case_weight (dict, c, &warn); const union value *val = case_data (c, var); if (var_is_value_missing (var, val, exclude)) continue; cc += weight; empirical = cc / ks[v].obs_cc; theoretical = theoreticalf[kst->dist] (&ks[v], val->f); d = empirical - theoretical; dp = prev_empirical - theoretical; if (d > 0) maximize (&ks[v].diff_pos, d); else minimize (&ks[v].diff_neg, d); if (dp > 0) maximize (&ks[v].diff_pos, dp); else minimize (&ks[v].diff_neg, dp); prev_empirical = empirical; } casereader_destroy (r); } show_results (ks, kst, wfmt); free (ks); casereader_destroy (input); } static void show_results (const struct ks *ks, const struct ks_one_sample_test *kst, const struct fmt_spec *wfmt) { int i; const int row_headers = 1; const int column_headers = 2; const int nc = kst->parent.n_vars + column_headers; const int nr = 8 + row_headers; struct tab_table *table = tab_create (nc, nr); tab_set_format (table, RC_WEIGHT, wfmt); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("One-Sample Kolmogorov-Smirnov Test")); /* Box around the table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1 ); tab_hline (table, TAL_2, 0, nc - 1, row_headers); tab_vline (table, TAL_1, column_headers, 0, nr - 1); tab_text (table, 0, 1, TAT_TITLE | TAB_LEFT , _("N")); switch (kst->dist) { case KS_NORMAL: tab_text (table, 0, 2, TAT_TITLE | TAB_LEFT , _("Normal Parameters")); tab_text (table, 1, 2, TAT_TITLE | TAB_LEFT , _("Mean")); tab_text (table, 1, 3, TAT_TITLE | TAB_LEFT , _("Std. Deviation")); break; case KS_UNIFORM: tab_text (table, 0, 2, TAT_TITLE | TAB_LEFT , _("Uniform Parameters")); tab_text (table, 1, 2, TAT_TITLE | TAB_LEFT , _("Minimum")); tab_text (table, 1, 3, TAT_TITLE | TAB_LEFT , _("Maximum")); break; case KS_POISSON: tab_text (table, 0, 2, TAT_TITLE | TAB_LEFT , _("Poisson Parameters")); tab_text (table, 1, 2, TAT_TITLE | TAB_LEFT , _("Lambda")); break; case KS_EXPONENTIAL: tab_text (table, 0, 2, TAT_TITLE | TAB_LEFT , _("Exponential Parameters")); tab_text (table, 1, 2, TAT_TITLE | TAB_LEFT , _("Scale")); break; default: NOT_REACHED (); } /* The variable columns */ for (i = 0; i < kst->parent.n_vars; ++i) { double abs = 0; double z = 0; const int col = 2 + i; tab_text (table, col, 0, TAT_TITLE | TAB_CENTER , var_to_string (kst->parent.vars[i])); switch (kst->dist) { case KS_UNIFORM: tab_double (table, col, 1, 0, ks[i].obs_cc, NULL, RC_WEIGHT); tab_double (table, col, 2, 0, ks[i].test_min, NULL, RC_OTHER); tab_double (table, col, 3, 0, ks[i].test_max, NULL, RC_OTHER); break; case KS_NORMAL: tab_double (table, col, 1, 0, ks[i].obs_cc, NULL, RC_WEIGHT); tab_double (table, col, 2, 0, ks[i].mu, NULL, RC_OTHER); tab_double (table, col, 3, 0, ks[i].sigma, NULL, RC_OTHER); break; case KS_POISSON: case KS_EXPONENTIAL: tab_double (table, col, 1, 0, ks[i].obs_cc, NULL, RC_WEIGHT); tab_double (table, col, 2, 0, ks[i].mu, NULL, RC_OTHER); break; default: NOT_REACHED (); } abs = ks[i].diff_pos; maximize (&abs, -ks[i].diff_neg); z = sqrt (ks[i].obs_cc) * abs; tab_double (table, col, 5, 0, ks[i].diff_pos, NULL, RC_OTHER); tab_double (table, col, 6, 0, ks[i].diff_neg, NULL, RC_OTHER); tab_double (table, col, 4, 0, abs, NULL, RC_OTHER); tab_double (table, col, 7, 0, z, NULL, RC_OTHER); tab_double (table, col, 8, 0, ks_asymp_sig (z), NULL, RC_PVALUE); } tab_text (table, 0, 4, TAT_TITLE | TAB_LEFT , _("Most Extreme Differences")); tab_text (table, 1, 4, TAT_TITLE | TAB_LEFT , _("Absolute")); tab_text (table, 1, 5, TAT_TITLE | TAB_LEFT , _("Positive")); tab_text (table, 1, 6, TAT_TITLE | TAB_LEFT , _("Negative")); tab_text (table, 0, 7, TAT_TITLE | TAB_LEFT , _("Kolmogorov-Smirnov Z")); tab_text (table, 0, 8, TAT_TITLE | TAB_LEFT , _("Asymp. Sig. (2-tailed)")); tab_submit (table); } pspp-1.0.1/src/language/stats/autorecode.c0000644000175000017500000002740513137223525015435 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/case.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/array.h" #include "libpspp/compiler.h" #include "libpspp/hash-functions.h" #include "libpspp/hmap.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gl/c-xvasprintf.h" #include "gl/mbiter.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* FIXME: Implement PRINT subcommand. */ /* Explains how to recode one value. */ struct arc_item { struct hmap_node hmap_node; /* Element in "struct arc_spec" hash table. */ union value from; /* Original value. */ int width; /* Width of the original value */ double to; /* Recoded value. */ }; /* Explains how to recode an AUTORECODE variable. */ struct arc_spec { int width; /* Variable width. */ int src_idx; /* Case index of source variable. */ struct variable *dst; /* Target variable. */ struct rec_items *items; }; /* Descending or ascending sort order. */ enum arc_direction { ASCENDING, DESCENDING }; struct rec_items { struct hmap ht; /* Hash table of "struct arc_item"s. */ int refcnt; }; /* AUTORECODE data. */ struct autorecode_pgm { struct arc_spec *specs; size_t n_specs; /* Hash table of "struct arc_item"s. */ struct rec_items *global_items; bool blank_valid; }; static trns_proc_func autorecode_trns_proc; static trns_free_func autorecode_trns_free; static int compare_arc_items (const void *, const void *, const void *aux); static void arc_free (struct autorecode_pgm *); static struct arc_item *find_arc_item (const struct arc_spec *, const union value *, size_t hash); static bool value_is_blank (const union value *val, int width, const struct dictionary *dict) { mbi_iterator_t iter; const char *str = CHAR_CAST_BUG (const char*, value_str (val, width)); char *text = recode_string (UTF8, dict_get_encoding (dict), str, width); for (mbi_init (iter, text, width); mbi_avail (iter); mbi_advance (iter)) { mbchar_t c = mbi_cur (iter); if ( ! mb_isblank (c)) { free (text); return false; } } free (text); return true; } /* Performs the AUTORECODE procedure. */ int cmd_autorecode (struct lexer *lexer, struct dataset *ds) { struct autorecode_pgm *arc = NULL; struct dictionary *dict = dataset_dict (ds); const struct variable **src_vars = NULL; char **dst_names = NULL; size_t n_srcs = 0; size_t n_dsts = 0; enum arc_direction direction = ASCENDING; struct casereader *input; struct ccase *c; size_t i; bool ok; /* Create procedure. */ arc = xzalloc (sizeof *arc); arc->blank_valid = true; /* Parse variable lists. */ lex_match_id (lexer, "VARIABLES"); lex_match (lexer, T_EQUALS); if (!parse_variables_const (lexer, dict, &src_vars, &n_srcs, PV_NO_DUPLICATE | PV_NO_SCRATCH)) goto error; lex_match (lexer, T_SLASH); if (!lex_force_match_id (lexer, "INTO")) goto error; lex_match (lexer, T_EQUALS); if (!parse_DATA_LIST_vars (lexer, dict, &dst_names, &n_dsts, PV_NO_DUPLICATE)) goto error; if (n_dsts != n_srcs) { msg (SE, _("Source variable count (%zu) does not match " "target variable count (%zu)."), n_srcs, n_dsts); goto error; } for (i = 0; i < n_dsts; i++) { const char *name = dst_names[i]; if (dict_lookup_var (dict, name) != NULL) { msg (SE, _("Target variable %s duplicates existing variable %s."), name, name); goto error; } } /* Parse options. */ while (lex_match (lexer, T_SLASH)) { if (lex_match_id (lexer, "DESCENDING")) direction = DESCENDING; else if (lex_match_id (lexer, "PRINT")) { /* Not yet implemented. */ } else if (lex_match_id (lexer, "GROUP")) { arc->global_items = xmalloc (sizeof (*arc->global_items)); arc->global_items->refcnt = 1; hmap_init (&arc->global_items->ht); } else if (lex_match_id (lexer, "BLANK")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "VALID")) { arc->blank_valid = true; } else if (lex_match_id (lexer, "MISSING")) { arc->blank_valid = false; } else goto error; } else goto error; } if (lex_token (lexer) != T_ENDCMD) { lex_error (lexer, _("expecting end of command")); goto error; } arc->specs = xmalloc (n_dsts * sizeof *arc->specs); arc->n_specs = n_dsts; for (i = 0; i < n_dsts; i++) { struct arc_spec *spec = &arc->specs[i]; spec->width = var_get_width (src_vars[i]); spec->src_idx = var_get_case_index (src_vars[i]); if (arc->global_items) { arc->global_items->refcnt++; spec->items = arc->global_items; } else { spec->items = xzalloc (sizeof (*spec->items)); spec->items->refcnt = 1; hmap_init (&spec->items->ht); } } /* Execute procedure. */ input = proc_open (ds); for (; (c = casereader_read (input)) != NULL; case_unref (c)) for (i = 0; i < arc->n_specs; i++) { struct arc_spec *spec = &arc->specs[i]; int width = spec->width; const union value *value = case_data_idx (c, spec->src_idx); size_t hash = value_hash (value, width, 0); struct arc_item *item; item = find_arc_item (spec, value, hash); if ( (item == NULL) && ( arc->blank_valid || val_type_from_width (spec->width) == VAL_NUMERIC || ! value_is_blank (value, width, dict)) ) { item = xmalloc (sizeof *item); item->width = width; value_clone (&item->from, value, width); hmap_insert (&spec->items->ht, &item->hmap_node, hash); } } ok = casereader_destroy (input); ok = proc_commit (ds) && ok; /* Re-fetch dictionary because it might have changed (if TEMPORARY was in use). */ dict = dataset_dict (ds); /* Create transformation. */ for (i = 0; i < arc->n_specs; i++) { struct arc_spec *spec = &arc->specs[i]; struct arc_item **items; struct arc_item *item; size_t n_items; size_t j; /* Create destination variable. */ spec->dst = dict_create_var_assert (dict, dst_names[i], 0); /* Create array of pointers to items. */ n_items = hmap_count (&spec->items->ht); items = xmalloc (n_items * sizeof *items); j = 0; HMAP_FOR_EACH (item, struct arc_item, hmap_node, &spec->items->ht) items[j++] = item; assert (j == n_items); /* Sort array by value. */ sort (items, n_items, sizeof *items, compare_arc_items, NULL); /* Assign recoded values in sorted order. */ for (j = 0; j < n_items; j++) { const union value *from = &items[j]->from; char *recoded_value = NULL; const int src_width = items[j]->width; union value to_val; size_t len; value_init (&to_val, 0); items[j]->to = direction == ASCENDING ? j + 1 : n_items - j; to_val.f = items[j]->to; /* Add value labels to the destination variable which indicate the source value from whence the new value comes. */ if (src_width > 0) { const char *str = CHAR_CAST_BUG (const char*, value_str (from, src_width)); recoded_value = recode_string (UTF8, dict_get_encoding (dict), str, src_width); } else recoded_value = c_xasprintf ("%.*g", DBL_DIG + 1, from->f); /* Remove trailing whitespace */ len = strlen (recoded_value); while (len > 0 && recoded_value[len - 1] == ' ') recoded_value[--len] = '\0'; var_add_value_label (spec->dst, &to_val, recoded_value); value_destroy (&to_val, 0); free (recoded_value); } /* Free array. */ free (items); } add_transformation (ds, autorecode_trns_proc, autorecode_trns_free, arc); for (i = 0; i < n_dsts; i++) free (dst_names[i]); free (dst_names); free (src_vars); return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; error: for (i = 0; i < n_dsts; i++) free (dst_names[i]); free (dst_names); free (src_vars); arc_free (arc); return CMD_CASCADING_FAILURE; } static void arc_free (struct autorecode_pgm *arc) { if (arc != NULL) { size_t i; for (i = 0; i < arc->n_specs; i++) { struct arc_spec *spec = &arc->specs[i]; struct arc_item *item, *next; HMAP_FOR_EACH_SAFE (item, next, struct arc_item, hmap_node, &spec->items->ht) { value_destroy (&item->from, item->width); hmap_delete (&spec->items->ht, &item->hmap_node); free (item); } } for (i = 0; i < arc->n_specs; i++) { struct arc_spec *spec = &arc->specs[i]; if (--spec->items->refcnt == 0) { hmap_destroy (&spec->items->ht); free (spec->items); } } if (arc->global_items && --arc->global_items->refcnt == 0) { hmap_destroy (&arc->global_items->ht); free (arc->global_items); } free (arc->specs); free (arc); } } static struct arc_item * find_arc_item (const struct arc_spec *spec, const union value *value, size_t hash) { struct arc_item *item; HMAP_FOR_EACH_WITH_HASH (item, struct arc_item, hmap_node, hash, &spec->items->ht) if (value_equal (value, &item->from, spec->width)) return item; return NULL; } static int compare_arc_items (const void *a_, const void *b_, const void *aux UNUSED) { const struct arc_item *const *a = a_; const struct arc_item *const *b = b_; int width_a = (*a)->width; int width_b = (*b)->width; if ( width_a == width_b) return value_compare_3way (&(*a)->from, &(*b)->from, width_a); if ( width_a == 0 && width_b != 0) return -1; if ( width_b == 0 && width_a != 0) return +1; return buf_compare_rpad (CHAR_CAST_BUG (const char *, value_str (&(*a)->from, width_a)), width_a, CHAR_CAST_BUG (const char *, value_str (&(*b)->from, width_b)), width_b); } static int autorecode_trns_proc (void *arc_, struct ccase **c, casenumber case_idx UNUSED) { struct autorecode_pgm *arc = arc_; size_t i; *c = case_unshare (*c); for (i = 0; i < arc->n_specs; i++) { const struct arc_spec *spec = &arc->specs[i]; const union value *value = case_data_idx (*c, spec->src_idx); unsigned int hash = value_hash (value, spec->width, 0); const struct arc_item *item = find_arc_item (spec, value, hash); case_data_rw (*c, spec->dst)->f = item ? item->to : SYSMIS; } return TRNS_CONTINUE; } static bool autorecode_trns_free (void *arc_) { struct autorecode_pgm *arc = arc_; arc_free (arc); return true; } pspp-1.0.1/src/language/stats/automake.mk0000644000175000017500000000624413137223525015274 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- AM_CPPFLAGS += -I$(top_srcdir)/src/language/stats src_language_stats_built_sources = \ src/language/stats/crosstabs.c language_stats_sources = \ src/language/stats/aggregate.c \ src/language/stats/aggregate.h \ src/language/stats/autorecode.c \ src/language/stats/binomial.c \ src/language/stats/binomial.h \ src/language/stats/chart-category.h \ src/language/stats/chisquare.c \ src/language/stats/chisquare.h \ src/language/stats/cochran.c \ src/language/stats/cochran.h \ src/language/stats/correlations.c \ src/language/stats/descriptives.c \ src/language/stats/examine.c \ src/language/stats/factor.c \ src/language/stats/flip.c \ src/language/stats/freq.c \ src/language/stats/freq.h \ src/language/stats/frequencies.c \ src/language/stats/friedman.c \ src/language/stats/friedman.h \ src/language/stats/glm.c \ src/language/stats/graph.c \ src/language/stats/kruskal-wallis.c \ src/language/stats/kruskal-wallis.h \ src/language/stats/ks-one-sample.c \ src/language/stats/ks-one-sample.h \ src/language/stats/logistic.c \ src/language/stats/jonckheere-terpstra.c \ src/language/stats/jonckheere-terpstra.h \ src/language/stats/mann-whitney.c \ src/language/stats/mann-whitney.h \ src/language/stats/means.c \ src/language/stats/mcnemar.c \ src/language/stats/mcnemar.h \ src/language/stats/median.c \ src/language/stats/median.h \ src/language/stats/npar.c \ src/language/stats/npar.h \ src/language/stats/npar-summary.c \ src/language/stats/npar-summary.h \ src/language/stats/oneway.c \ src/language/stats/quick-cluster.c \ src/language/stats/rank.c \ src/language/stats/reliability.c \ src/language/stats/roc.c \ src/language/stats/roc.h \ src/language/stats/regression.c \ src/language/stats/runs.h \ src/language/stats/runs.c \ src/language/stats/sign.c \ src/language/stats/sign.h \ src/language/stats/sort-cases.c \ src/language/stats/sort-criteria.c \ src/language/stats/sort-criteria.h \ src/language/stats/t-test.h \ src/language/stats/t-test-indep.c \ src/language/stats/t-test-one-sample.c \ src/language/stats/t-test-paired.c \ src/language/stats/t-test-parser.c \ src/language/stats/wilcoxon.c \ src/language/stats/wilcoxon.h EXTRA_DIST += src/language/stats/glm.c all_q_sources += $(src_language_stats_built_sources:.c=.q) EXTRA_DIST += $(src_language_stats_built_sources:.c=.q) CLEANFILES += $(src_language_stats_built_sources) pspp-1.0.1/src/language/stats/sign.h0000644000175000017500000000206412470243700014236 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !sign_h #define sign_h 1 #include #include "data/missing-values.h" struct casereader; struct dataset; struct npar_test; void sign_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact, double timer); #endif pspp-1.0.1/src/language/stats/factor.c0000644000175000017500000017703713137223525014570 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011, 2012, 2014, 2015, 2016, 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include #include "data/any-reader.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/subcase.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "language/data-io/file-handle.h" #include "language/data-io/matrix-reader.h" #include "libpspp/cast.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "math/correlation.h" #include "math/covariance.h" #include "math/moments.h" #include "output/chart-item.h" #include "output/charts/scree.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid enum method { METHOD_CORR, METHOD_COV }; enum missing_type { MISS_LISTWISE, MISS_PAIRWISE, MISS_MEANSUB, }; enum extraction_method { EXTRACTION_PC, EXTRACTION_PAF, }; enum plot_opts { PLOT_SCREE = 0x0001, PLOT_ROTATION = 0x0002 }; enum print_opts { PRINT_UNIVARIATE = 0x0001, PRINT_DETERMINANT = 0x0002, PRINT_INV = 0x0004, PRINT_AIC = 0x0008, PRINT_SIG = 0x0010, PRINT_COVARIANCE = 0x0020, PRINT_CORRELATION = 0x0040, PRINT_ROTATION = 0x0080, PRINT_EXTRACTION = 0x0100, PRINT_INITIAL = 0x0200, PRINT_KMO = 0x0400, PRINT_REPR = 0x0800, PRINT_FSCORE = 0x1000 }; enum rotation_type { ROT_VARIMAX = 0, ROT_EQUAMAX, ROT_QUARTIMAX, ROT_PROMAX, ROT_NONE }; typedef void (*rotation_coefficients) (double *x, double *y, double a, double b, double c, double d, const gsl_matrix *loadings ); static void varimax_coefficients (double *x, double *y, double a, double b, double c, double d, const gsl_matrix *loadings ) { *x = d - 2 * a * b / loadings->size1; *y = c - (a * a - b * b) / loadings->size1; } static void equamax_coefficients (double *x, double *y, double a, double b, double c, double d, const gsl_matrix *loadings ) { *x = d - loadings->size2 * a * b / loadings->size1; *y = c - loadings->size2 * (a * a - b * b) / (2 * loadings->size1); } static void quartimax_coefficients (double *x, double *y, double a UNUSED, double b UNUSED, double c, double d, const gsl_matrix *loadings UNUSED) { *x = d ; *y = c ; } static const rotation_coefficients rotation_coeff[] = { varimax_coefficients, equamax_coefficients, quartimax_coefficients, varimax_coefficients /* PROMAX is identical to VARIMAX */ }; /* return diag (C'C) ^ {-0.5} */ static gsl_matrix * diag_rcp_sqrt (const gsl_matrix *C) { int j; gsl_matrix *d = gsl_matrix_calloc (C->size1, C->size2); gsl_matrix *r = gsl_matrix_calloc (C->size1, C->size2); assert (C->size1 == C->size2); gsl_linalg_matmult_mod (C, GSL_LINALG_MOD_TRANSPOSE, C, GSL_LINALG_MOD_NONE, d); for (j = 0 ; j < d->size2; ++j) { double e = gsl_matrix_get (d, j, j); e = 1.0 / sqrt (e); gsl_matrix_set (r, j, j, e); } gsl_matrix_free (d); return r; } /* return diag ((C'C)^-1) ^ {-0.5} */ static gsl_matrix * diag_rcp_inv_sqrt (const gsl_matrix *CCinv) { int j; gsl_matrix *r = gsl_matrix_calloc (CCinv->size1, CCinv->size2); assert (CCinv->size1 == CCinv->size2); for (j = 0 ; j < CCinv->size2; ++j) { double e = gsl_matrix_get (CCinv, j, j); e = 1.0 / sqrt (e); gsl_matrix_set (r, j, j, e); } return r; } struct cmd_factor { size_t n_vars; const struct variable **vars; const struct variable *wv; enum method method; enum missing_type missing_type; enum mv_class exclude; enum print_opts print; enum extraction_method extraction; enum plot_opts plot; enum rotation_type rotation; int rotation_iterations; int promax_power; /* Extraction Criteria */ int n_factors; double min_eigen; double econverge; int extraction_iterations; double rconverge; /* Format */ double blank; bool sort; }; struct idata { /* Intermediate values used in calculation */ struct matrix_material mm; gsl_matrix *analysis_matrix; /* A pointer to either mm.corr or mm.cov */ gsl_vector *eval ; /* The eigenvalues */ gsl_matrix *evec ; /* The eigenvectors */ int n_extractions; gsl_vector *msr ; /* Multiple Squared Regressions */ double detR; /* The determinant of the correlation matrix */ gsl_matrix *ai_cov; /* The anti-image covariance matrix */ gsl_matrix *ai_cor; /* The anti-image correlation matrix */ struct covariance *cvm; }; static struct idata * idata_alloc (size_t n_vars) { struct idata *id = xzalloc (sizeof (*id)); id->n_extractions = 0; id->msr = gsl_vector_alloc (n_vars); id->eval = gsl_vector_alloc (n_vars); id->evec = gsl_matrix_alloc (n_vars, n_vars); return id; } static void idata_free (struct idata *id) { gsl_vector_free (id->msr); gsl_vector_free (id->eval); gsl_matrix_free (id->evec); gsl_matrix_free (id->ai_cov); gsl_matrix_free (id->ai_cor); free (id); } /* Return the sum of squares of all the elements in row J excluding column J */ static double ssq_row_od_n (const gsl_matrix *m, int j) { int i; double ss = 0; assert (m->size1 == m->size2); assert (j < m->size1); for (i = 0; i < m->size1; ++i) { if (i == j ) continue; ss += pow2 (gsl_matrix_get (m, i, j)); } return ss; } /* Return the sum of squares of all the elements excluding row N */ static double ssq_od_n (const gsl_matrix *m, int n) { int i, j; double ss = 0; assert (m->size1 == m->size2); assert (n < m->size1); for (i = 0; i < m->size1; ++i) { for (j = 0; j < m->size2; ++j) { if (i == j) continue; ss += pow2 (gsl_matrix_get (m, i, j)); } } return ss; } static gsl_matrix * anti_image_corr (const gsl_matrix *m, const struct idata *idata) { int i, j; gsl_matrix *a; assert (m->size1 == m->size2); a = gsl_matrix_alloc (m->size1, m->size2); for (i = 0; i < m->size1; ++i) { for (j = 0; j < m->size2; ++j) { double *p = gsl_matrix_ptr (a, i, j); *p = gsl_matrix_get (m, i, j); *p /= sqrt (gsl_matrix_get (m, i, i) * gsl_matrix_get (m, j, j)); } } for (i = 0; i < m->size1; ++i) { double r = ssq_row_od_n (idata->mm.corr, i); double u = ssq_row_od_n (a, i); gsl_matrix_set (a, i, i, r / (r + u)); } return a; } static gsl_matrix * anti_image_cov (const gsl_matrix *m) { int i, j; gsl_matrix *a; assert (m->size1 == m->size2); a = gsl_matrix_alloc (m->size1, m->size2); for (i = 0; i < m->size1; ++i) { for (j = 0; j < m->size2; ++j) { double *p = gsl_matrix_ptr (a, i, j); *p = gsl_matrix_get (m, i, j); *p /= gsl_matrix_get (m, i, i); *p /= gsl_matrix_get (m, j, j); } } return a; } #if 0 static void dump_matrix (const gsl_matrix *m) { size_t i, j; for (i = 0 ; i < m->size1; ++i) { for (j = 0 ; j < m->size2; ++j) printf ("%02f ", gsl_matrix_get (m, i, j)); printf ("\n"); } } static void dump_matrix_permute (const gsl_matrix *m, const gsl_permutation *p) { size_t i, j; for (i = 0 ; i < m->size1; ++i) { for (j = 0 ; j < m->size2; ++j) printf ("%02f ", gsl_matrix_get (m, gsl_permutation_get (p, i), j)); printf ("\n"); } } static void dump_vector (const gsl_vector *v) { size_t i; for (i = 0 ; i < v->size; ++i) { printf ("%02f\n", gsl_vector_get (v, i)); } printf ("\n"); } #endif static int n_extracted_factors (const struct cmd_factor *factor, struct idata *idata) { int i; /* If there is a cached value, then return that. */ if ( idata->n_extractions != 0) return idata->n_extractions; /* Otherwise, if the number of factors has been explicitly requested, use that. */ if (factor->n_factors > 0) { idata->n_extractions = factor->n_factors; goto finish; } /* Use the MIN_EIGEN setting. */ for (i = 0 ; i < idata->eval->size; ++i) { double evali = fabs (gsl_vector_get (idata->eval, i)); idata->n_extractions = i; if (evali < factor->min_eigen) goto finish; } finish: return idata->n_extractions; } /* Returns a newly allocated matrix identical to M. It it the callers responsibility to free the returned value. */ static gsl_matrix * matrix_dup (const gsl_matrix *m) { gsl_matrix *n = gsl_matrix_alloc (m->size1, m->size2); gsl_matrix_memcpy (n, m); return n; } struct smr_workspace { /* Copy of the subject */ gsl_matrix *m; gsl_matrix *inverse; gsl_permutation *perm; gsl_matrix *result1; gsl_matrix *result2; }; static struct smr_workspace *ws_create (const gsl_matrix *input) { struct smr_workspace *ws = xmalloc (sizeof (*ws)); ws->m = gsl_matrix_alloc (input->size1, input->size2); ws->inverse = gsl_matrix_calloc (input->size1 - 1, input->size2 - 1); ws->perm = gsl_permutation_alloc (input->size1 - 1); ws->result1 = gsl_matrix_calloc (input->size1 - 1, 1); ws->result2 = gsl_matrix_calloc (1, 1); return ws; } static void ws_destroy (struct smr_workspace *ws) { gsl_matrix_free (ws->result2); gsl_matrix_free (ws->result1); gsl_permutation_free (ws->perm); gsl_matrix_free (ws->inverse); gsl_matrix_free (ws->m); free (ws); } /* Return the square of the regression coefficient for VAR regressed against all other variables. */ static double squared_multiple_correlation (const gsl_matrix *corr, int var, struct smr_workspace *ws) { /* For an explanation of what this is doing, see http://www.visualstatistics.net/Visual%20Statistics%20Multimedia/multiple_regression_analysis.htm */ int signum = 0; gsl_matrix_view rxx; gsl_matrix_memcpy (ws->m, corr); gsl_matrix_swap_rows (ws->m, 0, var); gsl_matrix_swap_columns (ws->m, 0, var); rxx = gsl_matrix_submatrix (ws->m, 1, 1, ws->m->size1 - 1, ws->m->size1 - 1); gsl_linalg_LU_decomp (&rxx.matrix, ws->perm, &signum); gsl_linalg_LU_invert (&rxx.matrix, ws->perm, ws->inverse); { gsl_matrix_const_view rxy = gsl_matrix_const_submatrix (ws->m, 1, 0, ws->m->size1 - 1, 1); gsl_matrix_const_view ryx = gsl_matrix_const_submatrix (ws->m, 0, 1, 1, ws->m->size1 - 1); gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, ws->inverse, &rxy.matrix, 0.0, ws->result1); gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, &ryx.matrix, ws->result1, 0.0, ws->result2); } return gsl_matrix_get (ws->result2, 0, 0); } static double the_communality (const gsl_matrix *evec, const gsl_vector *eval, int n, int n_factors); struct factor_matrix_workspace { size_t n_factors; gsl_eigen_symmv_workspace *eigen_ws; gsl_vector *eval ; gsl_matrix *evec ; gsl_matrix *gamma ; gsl_matrix *r; }; static struct factor_matrix_workspace * factor_matrix_workspace_alloc (size_t n, size_t nf) { struct factor_matrix_workspace *ws = xmalloc (sizeof (*ws)); ws->n_factors = nf; ws->gamma = gsl_matrix_calloc (nf, nf); ws->eigen_ws = gsl_eigen_symmv_alloc (n); ws->eval = gsl_vector_alloc (n); ws->evec = gsl_matrix_alloc (n, n); ws->r = gsl_matrix_alloc (n, n); return ws; } static void factor_matrix_workspace_free (struct factor_matrix_workspace *ws) { gsl_eigen_symmv_free (ws->eigen_ws); gsl_vector_free (ws->eval); gsl_matrix_free (ws->evec); gsl_matrix_free (ws->gamma); gsl_matrix_free (ws->r); free (ws); } /* Shift P left by OFFSET places, and overwrite TARGET with the shifted result. Positions in TARGET less than OFFSET are unchanged. */ static void perm_shift_apply (gsl_permutation *target, const gsl_permutation *p, size_t offset) { size_t i; assert (target->size == p->size); assert (offset <= target->size); for (i = 0; i < target->size - offset; ++i) { target->data[i] = p->data [i + offset]; } } /* Indirectly sort the rows of matrix INPUT, storing the sort order in PERM. The sort criteria are as follows: Rows are sorted on the first column, until the absolute value of an element in a subsequent column is greater than that of the first column. Thereafter, rows will be sorted on the second column, until the absolute value of an element in a subsequent column exceeds that of the second column ... */ static void sort_matrix_indirect (const gsl_matrix *input, gsl_permutation *perm) { const size_t n = perm->size; const size_t m = input->size2; int i, j; gsl_matrix *mat ; int column_n = 0; int row_n = 0; gsl_permutation *p; assert (perm->size == input->size1); p = gsl_permutation_alloc (n); /* Copy INPUT into MAT, discarding the sign */ mat = gsl_matrix_alloc (n, m); for (i = 0 ; i < mat->size1; ++i) { for (j = 0 ; j < mat->size2; ++j) { double x = gsl_matrix_get (input, i, j); gsl_matrix_set (mat, i, j, fabs (x)); } } while (column_n < m && row_n < n) { gsl_vector_const_view columni = gsl_matrix_const_column (mat, column_n); gsl_sort_vector_index (p, &columni.vector); for (i = 0 ; i < n; ++i) { gsl_vector_view row = gsl_matrix_row (mat, p->data[n - 1 - i]); size_t maxindex = gsl_vector_max_index (&row.vector); if ( maxindex > column_n ) break; /* All subsequent elements of this row, are of no interest. So set them all to a highly negative value */ for (j = column_n + 1; j < row.vector.size ; ++j) gsl_vector_set (&row.vector, j, -DBL_MAX); } perm_shift_apply (perm, p, row_n); row_n += i; column_n++; } gsl_permutation_free (p); gsl_matrix_free (mat); assert ( 0 == gsl_permutation_valid (perm)); /* We want the biggest value to be first */ gsl_permutation_reverse (perm); } static void drot_go (double phi, double *l0, double *l1) { double r0 = cos (phi) * *l0 + sin (phi) * *l1; double r1 = - sin (phi) * *l0 + cos (phi) * *l1; *l0 = r0; *l1 = r1; } static gsl_matrix * clone_matrix (const gsl_matrix *m) { int j, k; gsl_matrix *c = gsl_matrix_calloc (m->size1, m->size2); for (j = 0 ; j < c->size1; ++j) { for (k = 0 ; k < c->size2; ++k) { const double *v = gsl_matrix_const_ptr (m, j, k); gsl_matrix_set (c, j, k, *v); } } return c; } static double initial_sv (const gsl_matrix *fm) { int j, k; double sv = 0.0; for (j = 0 ; j < fm->size2; ++j) { double l4s = 0; double l2s = 0; for (k = j + 1 ; k < fm->size2; ++k) { double lambda = gsl_matrix_get (fm, k, j); double lambda_sq = lambda * lambda; double lambda_4 = lambda_sq * lambda_sq; l4s += lambda_4; l2s += lambda_sq; } sv += ( fm->size1 * l4s - (l2s * l2s) ) / (fm->size1 * fm->size1 ); } return sv; } static void rotate (const struct cmd_factor *cf, const gsl_matrix *unrot, const gsl_vector *communalities, gsl_matrix *result, gsl_vector *rotated_loadings, gsl_matrix *pattern_matrix, gsl_matrix *factor_correlation_matrix ) { int j, k; int i; double prev_sv; /* First get a normalised version of UNROT */ gsl_matrix *normalised = gsl_matrix_calloc (unrot->size1, unrot->size2); gsl_matrix *h_sqrt = gsl_matrix_calloc (communalities->size, communalities->size); gsl_matrix *h_sqrt_inv ; /* H is the diagonal matrix containing the absolute values of the communalities */ for (i = 0 ; i < communalities->size ; ++i) { double *ptr = gsl_matrix_ptr (h_sqrt, i, i); *ptr = fabs (gsl_vector_get (communalities, i)); } /* Take the square root of the communalities */ gsl_linalg_cholesky_decomp (h_sqrt); /* Save a copy of h_sqrt and invert it */ h_sqrt_inv = clone_matrix (h_sqrt); gsl_linalg_cholesky_decomp (h_sqrt_inv); gsl_linalg_cholesky_invert (h_sqrt_inv); /* normalised vertion is H^{1/2} x UNROT */ gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, h_sqrt_inv, unrot, 0.0, normalised); gsl_matrix_free (h_sqrt_inv); /* Now perform the rotation iterations */ prev_sv = initial_sv (normalised); for (i = 0 ; i < cf->rotation_iterations ; ++i) { double sv = 0.0; for (j = 0 ; j < normalised->size2; ++j) { /* These variables relate to the convergence criterium */ double l4s = 0; double l2s = 0; for (k = j + 1 ; k < normalised->size2; ++k) { int p; double a = 0.0; double b = 0.0; double c = 0.0; double d = 0.0; double x, y; double phi; for (p = 0; p < normalised->size1; ++p) { double jv = gsl_matrix_get (normalised, p, j); double kv = gsl_matrix_get (normalised, p, k); double u = jv * jv - kv * kv; double v = 2 * jv * kv; a += u; b += v; c += u * u - v * v; d += 2 * u * v; } rotation_coeff [cf->rotation] (&x, &y, a, b, c, d, normalised); phi = atan2 (x, y) / 4.0 ; /* Don't bother rotating if the angle is small */ if ( fabs (sin (phi) ) <= pow (10.0, -15.0)) continue; for (p = 0; p < normalised->size1; ++p) { double *lambda0 = gsl_matrix_ptr (normalised, p, j); double *lambda1 = gsl_matrix_ptr (normalised, p, k); drot_go (phi, lambda0, lambda1); } /* Calculate the convergence criterium */ { double lambda = gsl_matrix_get (normalised, k, j); double lambda_sq = lambda * lambda; double lambda_4 = lambda_sq * lambda_sq; l4s += lambda_4; l2s += lambda_sq; } } sv += ( normalised->size1 * l4s - (l2s * l2s) ) / (normalised->size1 * normalised->size1 ); } if ( fabs (sv - prev_sv) <= cf->rconverge) break; prev_sv = sv; } gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, h_sqrt, normalised, 0.0, result); gsl_matrix_free (h_sqrt); gsl_matrix_free (normalised); if (cf->rotation == ROT_PROMAX) { /* general purpose m by m matrix, where m is the number of factors */ gsl_matrix *mm1 = gsl_matrix_calloc (unrot->size2, unrot->size2); gsl_matrix *mm2 = gsl_matrix_calloc (unrot->size2, unrot->size2); /* general purpose m by p matrix, where p is the number of variables */ gsl_matrix *mp1 = gsl_matrix_calloc (unrot->size2, unrot->size1); gsl_matrix *pm1 = gsl_matrix_calloc (unrot->size1, unrot->size2); gsl_permutation *perm = gsl_permutation_alloc (unrot->size2); int signum; int i, j; /* The following variables follow the notation by SPSS Statistical Algorithms page 342 */ gsl_matrix *L = gsl_matrix_calloc (unrot->size2, unrot->size2); gsl_matrix *P = clone_matrix (result); gsl_matrix *D ; gsl_matrix *Q ; /* Vector of length p containing (indexed by i) \Sum^m_j {\lambda^2_{ij}} */ gsl_vector *rssq = gsl_vector_calloc (unrot->size1); for (i = 0; i < P->size1; ++i) { double sum = 0; for (j = 0; j < P->size2; ++j) { sum += gsl_matrix_get (result, i, j) * gsl_matrix_get (result, i, j); } gsl_vector_set (rssq, i, sqrt (sum)); } for (i = 0; i < P->size1; ++i) { for (j = 0; j < P->size2; ++j) { double l = gsl_matrix_get (result, i, j); double r = gsl_vector_get (rssq, i); gsl_matrix_set (P, i, j, pow (fabs (l / r), cf->promax_power + 1) * r / l); } } gsl_vector_free (rssq); gsl_linalg_matmult_mod (result, GSL_LINALG_MOD_TRANSPOSE, result, GSL_LINALG_MOD_NONE, mm1); gsl_linalg_LU_decomp (mm1, perm, &signum); gsl_linalg_LU_invert (mm1, perm, mm2); gsl_linalg_matmult_mod (mm2, GSL_LINALG_MOD_NONE, result, GSL_LINALG_MOD_TRANSPOSE, mp1); gsl_linalg_matmult_mod (mp1, GSL_LINALG_MOD_NONE, P, GSL_LINALG_MOD_NONE, L); D = diag_rcp_sqrt (L); Q = gsl_matrix_calloc (unrot->size2, unrot->size2); gsl_linalg_matmult_mod (L, GSL_LINALG_MOD_NONE, D, GSL_LINALG_MOD_NONE, Q); gsl_matrix *QQinv = gsl_matrix_calloc (unrot->size2, unrot->size2); gsl_linalg_matmult_mod (Q, GSL_LINALG_MOD_TRANSPOSE, Q, GSL_LINALG_MOD_NONE, QQinv); gsl_linalg_cholesky_decomp (QQinv); gsl_linalg_cholesky_invert (QQinv); gsl_matrix *C = diag_rcp_inv_sqrt (QQinv); gsl_matrix *Cinv = clone_matrix (C); gsl_linalg_cholesky_decomp (Cinv); gsl_linalg_cholesky_invert (Cinv); gsl_linalg_matmult_mod (result, GSL_LINALG_MOD_NONE, Q, GSL_LINALG_MOD_NONE, pm1); gsl_linalg_matmult_mod (pm1, GSL_LINALG_MOD_NONE, Cinv, GSL_LINALG_MOD_NONE, pattern_matrix); gsl_linalg_matmult_mod (C, GSL_LINALG_MOD_NONE, QQinv, GSL_LINALG_MOD_NONE, mm1); gsl_linalg_matmult_mod (mm1, GSL_LINALG_MOD_NONE, C, GSL_LINALG_MOD_TRANSPOSE, factor_correlation_matrix); gsl_linalg_matmult_mod (pattern_matrix, GSL_LINALG_MOD_NONE, factor_correlation_matrix, GSL_LINALG_MOD_NONE, pm1); gsl_matrix_memcpy (result, pm1); gsl_matrix_free (QQinv); gsl_matrix_free (C); gsl_matrix_free (Cinv); gsl_matrix_free (D); gsl_matrix_free (Q); gsl_matrix_free (L); gsl_matrix_free (P); gsl_permutation_free (perm); gsl_matrix_free (mm1); gsl_matrix_free (mm2); gsl_matrix_free (mp1); gsl_matrix_free (pm1); } /* reflect negative sums and populate the rotated loadings vector*/ for (i = 0 ; i < result->size2; ++i) { double ssq = 0.0; double sum = 0.0; for (j = 0 ; j < result->size1; ++j) { double s = gsl_matrix_get (result, j, i); ssq += s * s; sum += s; } gsl_vector_set (rotated_loadings, i, ssq); if ( sum < 0 ) for (j = 0 ; j < result->size1; ++j) { double *lambda = gsl_matrix_ptr (result, j, i); *lambda = - *lambda; } } } /* Get an approximation for the factor matrix into FACTORS, and the communalities into COMMUNALITIES. R is the matrix to be analysed. WS is a pointer to a structure which must have been initialised with factor_matrix_workspace_init. */ static void iterate_factor_matrix (const gsl_matrix *r, gsl_vector *communalities, gsl_matrix *factors, struct factor_matrix_workspace *ws) { size_t i; gsl_matrix_view mv ; assert (r->size1 == r->size2); assert (r->size1 == communalities->size); assert (factors->size1 == r->size1); assert (factors->size2 == ws->n_factors); gsl_matrix_memcpy (ws->r, r); /* Apply Communalities to diagonal of correlation matrix */ for (i = 0 ; i < communalities->size ; ++i) { double *x = gsl_matrix_ptr (ws->r, i, i); *x = gsl_vector_get (communalities, i); } gsl_eigen_symmv (ws->r, ws->eval, ws->evec, ws->eigen_ws); mv = gsl_matrix_submatrix (ws->evec, 0, 0, ws->evec->size1, ws->n_factors); /* Gamma is the diagonal matrix containing the absolute values of the eigenvalues */ for (i = 0 ; i < ws->n_factors ; ++i) { double *ptr = gsl_matrix_ptr (ws->gamma, i, i); *ptr = fabs (gsl_vector_get (ws->eval, i)); } /* Take the square root of gamma */ gsl_linalg_cholesky_decomp (ws->gamma); gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0, &mv.matrix, ws->gamma, 0.0, factors); for (i = 0 ; i < r->size1 ; ++i) { double h = the_communality (ws->evec, ws->eval, i, ws->n_factors); gsl_vector_set (communalities, i, h); } } static bool run_factor (struct dataset *ds, const struct cmd_factor *factor); static void do_factor_by_matrix (const struct cmd_factor *factor, struct idata *idata); int cmd_factor (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = NULL; int n_iterations = 25; struct cmd_factor factor; factor.n_vars = 0; factor.vars = NULL; factor.method = METHOD_CORR; factor.missing_type = MISS_LISTWISE; factor.exclude = MV_ANY; factor.print = PRINT_INITIAL | PRINT_EXTRACTION | PRINT_ROTATION; factor.extraction = EXTRACTION_PC; factor.n_factors = 0; factor.min_eigen = SYSMIS; factor.extraction_iterations = 25; factor.rotation_iterations = 25; factor.econverge = 0.001; factor.blank = 0; factor.sort = false; factor.plot = 0; factor.rotation = ROT_VARIMAX; factor.wv = NULL; factor.rconverge = 0.0001; lex_match (lexer, T_SLASH); struct matrix_reader *mr = NULL; struct casereader *matrix_reader = NULL; if (lex_match_id (lexer, "VARIABLES")) { lex_match (lexer, T_EQUALS); dict = dataset_dict (ds); factor.wv = dict_get_weight (dict); if (!parse_variables_const (lexer, dict, &factor.vars, &factor.n_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; } else if (lex_match_id (lexer, "MATRIX")) { lex_match (lexer, T_EQUALS); if (! lex_force_match_id (lexer, "IN")) goto error; if (!lex_force_match (lexer, T_LPAREN)) { goto error; } if (lex_match_id (lexer, "CORR")) { } else if (lex_match_id (lexer, "COV")) { } else { lex_error (lexer, _("Matrix input for %s must be either COV or CORR"), "FACTOR"); goto error; } if (! lex_force_match (lexer, T_EQUALS)) goto error; if (lex_match (lexer, T_ASTERISK)) { dict = dataset_dict (ds); matrix_reader = casereader_clone (dataset_source (ds)); } else { struct file_handle *fh = fh_parse (lexer, FH_REF_FILE, NULL); if (fh == NULL) goto error; matrix_reader = any_reader_open_and_decode (fh, NULL, &dict, NULL); if (! (matrix_reader && dict)) { goto error; } } if (! lex_force_match (lexer, T_RPAREN)) goto error; mr = create_matrix_reader_from_case_reader (dict, matrix_reader, &factor.vars, &factor.n_vars); } else { goto error; } while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "ANALYSIS")) { struct const_var_set *vs; const struct variable **vars; size_t n_vars; bool ok; lex_match (lexer, T_EQUALS); vs = const_var_set_create_from_array (factor.vars, factor.n_vars); ok = parse_const_var_set_vars (lexer, vs, &vars, &n_vars, PV_NO_DUPLICATE | PV_NUMERIC); const_var_set_destroy (vs); if (!ok) goto error; free (factor.vars); factor.vars = vars; factor.n_vars = n_vars; } else if (lex_match_id (lexer, "PLOT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "EIGEN")) { factor.plot |= PLOT_SCREE; } #if FACTOR_FULLY_IMPLEMENTED else if (lex_match_id (lexer, "ROTATION")) { } #endif else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "METHOD")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "COVARIANCE")) { factor.method = METHOD_COV; } else if (lex_match_id (lexer, "CORRELATION")) { factor.method = METHOD_CORR; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "ROTATION")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { /* VARIMAX and DEFAULT are defaults */ if (lex_match_id (lexer, "VARIMAX") || lex_match_id (lexer, "DEFAULT")) { factor.rotation = ROT_VARIMAX; } else if (lex_match_id (lexer, "EQUAMAX")) { factor.rotation = ROT_EQUAMAX; } else if (lex_match_id (lexer, "QUARTIMAX")) { factor.rotation = ROT_QUARTIMAX; } else if (lex_match_id (lexer, "PROMAX")) { factor.promax_power = 5; if (lex_match (lexer, T_LPAREN) && lex_force_int (lexer)) { factor.promax_power = lex_integer (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } factor.rotation = ROT_PROMAX; } else if (lex_match_id (lexer, "NOROTATE")) { factor.rotation = ROT_NONE; } else { lex_error (lexer, NULL); goto error; } } factor.rotation_iterations = n_iterations; } else if (lex_match_id (lexer, "CRITERIA")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "FACTORS")) { if ( lex_force_match (lexer, T_LPAREN) && lex_force_int (lexer)) { factor.n_factors = lex_integer (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "MINEIGEN")) { if ( lex_force_match (lexer, T_LPAREN) && lex_force_num (lexer)) { factor.min_eigen = lex_number (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "ECONVERGE")) { if ( lex_force_match (lexer, T_LPAREN) && lex_force_num (lexer)) { factor.econverge = lex_number (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "RCONVERGE")) { if (lex_force_match (lexer, T_LPAREN) && lex_force_num (lexer)) { factor.rconverge = lex_number (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "ITERATE")) { if ( lex_force_match (lexer, T_LPAREN) && lex_force_int (lexer)) { n_iterations = lex_integer (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "DEFAULT")) { factor.n_factors = 0; factor.min_eigen = 1; n_iterations = 25; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "EXTRACTION")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "PAF")) { factor.extraction = EXTRACTION_PAF; } else if (lex_match_id (lexer, "PC")) { factor.extraction = EXTRACTION_PC; } else if (lex_match_id (lexer, "PA1")) { factor.extraction = EXTRACTION_PC; } else if (lex_match_id (lexer, "DEFAULT")) { factor.extraction = EXTRACTION_PC; } else { lex_error (lexer, NULL); goto error; } } factor.extraction_iterations = n_iterations; } else if (lex_match_id (lexer, "FORMAT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "SORT")) { factor.sort = true; } else if (lex_match_id (lexer, "BLANK")) { if ( lex_force_match (lexer, T_LPAREN) && lex_force_num (lexer)) { factor.blank = lex_number (lexer); lex_get (lexer); if (! lex_force_match (lexer, T_RPAREN)) goto error; } } else if (lex_match_id (lexer, "DEFAULT")) { factor.blank = 0; factor.sort = false; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "PRINT")) { factor.print = 0; lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "UNIVARIATE")) { factor.print |= PRINT_UNIVARIATE; } else if (lex_match_id (lexer, "DET")) { factor.print |= PRINT_DETERMINANT; } #if FACTOR_FULLY_IMPLEMENTED else if (lex_match_id (lexer, "INV")) { } #endif else if (lex_match_id (lexer, "AIC")) { factor.print |= PRINT_AIC; } else if (lex_match_id (lexer, "SIG")) { factor.print |= PRINT_SIG; } else if (lex_match_id (lexer, "CORRELATION")) { factor.print |= PRINT_CORRELATION; } else if (lex_match_id (lexer, "COVARIANCE")) { factor.print |= PRINT_COVARIANCE; } else if (lex_match_id (lexer, "ROTATION")) { factor.print |= PRINT_ROTATION; } else if (lex_match_id (lexer, "EXTRACTION")) { factor.print |= PRINT_EXTRACTION; } else if (lex_match_id (lexer, "INITIAL")) { factor.print |= PRINT_INITIAL; } else if (lex_match_id (lexer, "KMO")) { factor.print |= PRINT_KMO; } #if FACTOR_FULLY_IMPLEMENTED else if (lex_match_id (lexer, "REPR")) { } else if (lex_match_id (lexer, "FSCORE")) { } #endif else if (lex_match (lexer, T_ALL)) { factor.print = 0xFFFF; } else if (lex_match_id (lexer, "DEFAULT")) { factor.print |= PRINT_INITIAL ; factor.print |= PRINT_EXTRACTION ; factor.print |= PRINT_ROTATION ; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "INCLUDE")) { factor.exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "EXCLUDE")) { factor.exclude = MV_ANY; } else if (lex_match_id (lexer, "LISTWISE")) { factor.missing_type = MISS_LISTWISE; } else if (lex_match_id (lexer, "PAIRWISE")) { factor.missing_type = MISS_PAIRWISE; } else if (lex_match_id (lexer, "MEANSUB")) { factor.missing_type = MISS_MEANSUB; } else { lex_error (lexer, NULL); goto error; } } } else { lex_error (lexer, NULL); goto error; } } if ( factor.rotation == ROT_NONE ) factor.print &= ~PRINT_ROTATION; if (factor.n_vars < 2) msg (MW, _("Factor analysis on a single variable is not useful.")); if (factor.n_vars < 1) { msg (ME, _("Factor analysis without variables is not possible.")); goto error; } if (matrix_reader) { struct idata *id = idata_alloc (factor.n_vars); while (next_matrix_from_reader (&id->mm, mr, factor.vars, factor.n_vars)) { do_factor_by_matrix (&factor, id); gsl_matrix_free (id->mm.corr); id->mm.corr = NULL; gsl_matrix_free (id->mm.cov); id->mm.cov = NULL; } idata_free (id); } else if ( ! run_factor (ds, &factor)) goto error; destroy_matrix_reader (mr); free (factor.vars); return CMD_SUCCESS; error: destroy_matrix_reader (mr); free (factor.vars); return CMD_FAILURE; } static void do_factor (const struct cmd_factor *factor, struct casereader *group); static bool run_factor (struct dataset *ds, const struct cmd_factor *factor) { struct dictionary *dict = dataset_dict (ds); bool ok; struct casereader *group; struct casegrouper *grouper = casegrouper_create_splits (proc_open (ds), dict); while (casegrouper_get_next_group (grouper, &group)) { if ( factor->missing_type == MISS_LISTWISE ) group = casereader_create_filter_missing (group, factor->vars, factor->n_vars, factor->exclude, NULL, NULL); do_factor (factor, group); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; return ok; } /* Return the communality of variable N, calculated to N_FACTORS */ static double the_communality (const gsl_matrix *evec, const gsl_vector *eval, int n, int n_factors) { size_t i; double comm = 0; assert (n >= 0); assert (n < eval->size); assert (n < evec->size1); assert (n_factors <= eval->size); for (i = 0 ; i < n_factors; ++i) { double evali = fabs (gsl_vector_get (eval, i)); double eveci = gsl_matrix_get (evec, n, i); comm += pow2 (eveci) * evali; } return comm; } /* Return the communality of variable N, calculated to N_FACTORS */ static double communality (const struct idata *idata, int n, int n_factors) { return the_communality (idata->evec, idata->eval, n, n_factors); } static void show_scree (const struct cmd_factor *f, const struct idata *idata) { struct scree *s; const char *label ; if ( !(f->plot & PLOT_SCREE) ) return; label = f->extraction == EXTRACTION_PC ? _("Component Number") : _("Factor Number"); s = scree_create (idata->eval, label); scree_submit (s); } static void show_communalities (const struct cmd_factor * factor, const gsl_vector *initial, const gsl_vector *extracted) { int i; int c = 0; const int heading_columns = 1; int nc = heading_columns; const int heading_rows = 1; const int nr = heading_rows + factor->n_vars; struct tab_table *t; if (factor->print & PRINT_EXTRACTION) nc++; if (factor->print & PRINT_INITIAL) nc++; /* No point having a table with only headings */ if (nc <= 1) return; t = tab_create (nc, nr); tab_title (t, _("Communalities")); tab_headers (t, heading_columns, 0, heading_rows, 0); c = 1; if (factor->print & PRINT_INITIAL) tab_text (t, c++, 0, TAB_CENTER | TAT_TITLE, _("Initial")); if (factor->print & PRINT_EXTRACTION) tab_text (t, c++, 0, TAB_CENTER | TAT_TITLE, _("Extraction")); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); /* Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); tab_hline (t, TAL_1, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); for (i = 0 ; i < factor->n_vars; ++i) { c = 0; tab_text (t, c++, i + heading_rows, TAT_TITLE, var_to_string (factor->vars[i])); if (factor->print & PRINT_INITIAL) tab_double (t, c++, i + heading_rows, 0, gsl_vector_get (initial, i), NULL, RC_OTHER); if (factor->print & PRINT_EXTRACTION) tab_double (t, c++, i + heading_rows, 0, gsl_vector_get (extracted, i), NULL, RC_OTHER); } tab_submit (t); } static void show_factor_matrix (const struct cmd_factor *factor, const struct idata *idata, const char *title, const gsl_matrix *fm) { int i; const int n_factors = idata->n_extractions; const int heading_columns = 1; const int heading_rows = 2; const int nr = heading_rows + factor->n_vars; const int nc = heading_columns + n_factors; gsl_permutation *perm; struct tab_table *t = tab_create (nc, nr); /* if ( factor->extraction == EXTRACTION_PC ) tab_title (t, _("Component Matrix")); else tab_title (t, _("Factor Matrix")); */ tab_title (t, "%s", title); tab_headers (t, heading_columns, 0, heading_rows, 0); if ( factor->extraction == EXTRACTION_PC ) tab_joint_text (t, 1, 0, nc - 1, 0, TAB_CENTER | TAT_TITLE, _("Component")); else tab_joint_text (t, 1, 0, nc - 1, 0, TAB_CENTER | TAT_TITLE, _("Factor")); tab_hline (t, TAL_1, heading_columns, nc - 1, 1); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); /* Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 1, nc - 1, nr - 1); tab_hline (t, TAL_1, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); /* Initialise to the identity permutation */ perm = gsl_permutation_calloc (factor->n_vars); if ( factor->sort) sort_matrix_indirect (fm, perm); for (i = 0 ; i < n_factors; ++i) { tab_text_format (t, heading_columns + i, 1, TAB_CENTER | TAT_TITLE, _("%d"), i + 1); } for (i = 0 ; i < factor->n_vars; ++i) { int j; const int matrix_row = perm->data[i]; tab_text (t, 0, i + heading_rows, TAT_TITLE, var_to_string (factor->vars[matrix_row])); for (j = 0 ; j < n_factors; ++j) { double x = gsl_matrix_get (fm, matrix_row, j); if ( fabs (x) < factor->blank) continue; tab_double (t, heading_columns + j, heading_rows + i, 0, x, NULL, RC_OTHER); } } gsl_permutation_free (perm); tab_submit (t); } static void show_explained_variance (const struct cmd_factor * factor, const struct idata *idata, const gsl_vector *initial_eigenvalues, const gsl_vector *extracted_eigenvalues, const gsl_vector *rotated_loadings) { size_t i; int c = 0; const int heading_columns = 1; const int heading_rows = 2; const int nr = heading_rows + factor->n_vars; struct tab_table *t ; double i_total = 0.0; double i_cum = 0.0; double e_total = 0.0; double e_cum = 0.0; double r_cum = 0.0; int nc = heading_columns; if (factor->print & PRINT_EXTRACTION) nc += 3; if (factor->print & PRINT_INITIAL) nc += 3; if (factor->print & PRINT_ROTATION) { nc += factor->rotation == ROT_PROMAX ? 1 : 3; } /* No point having a table with only headings */ if ( nc <= heading_columns) return; t = tab_create (nc, nr); tab_title (t, _("Total Variance Explained")); tab_headers (t, heading_columns, 0, heading_rows, 0); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); /* Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); tab_hline (t, TAL_1, 0, nc - 1, heading_rows); tab_hline (t, TAL_1, 1, nc - 1, 1); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); if ( factor->extraction == EXTRACTION_PC) tab_text (t, 0, 1, TAB_LEFT | TAT_TITLE, _("Component")); else tab_text (t, 0, 1, TAB_LEFT | TAT_TITLE, _("Factor")); c = 1; if (factor->print & PRINT_INITIAL) { tab_joint_text (t, c, 0, c + 2, 0, TAB_CENTER | TAT_TITLE, _("Initial Eigenvalues")); c += 3; } if (factor->print & PRINT_EXTRACTION) { tab_joint_text (t, c, 0, c + 2, 0, TAB_CENTER | TAT_TITLE, _("Extraction Sums of Squared Loadings")); c += 3; } if (factor->print & PRINT_ROTATION) { const int width = factor->rotation == ROT_PROMAX ? 0 : 2; tab_joint_text (t, c, 0, c + width, 0, TAB_CENTER | TAT_TITLE, _("Rotation Sums of Squared Loadings")); c += width + 1; } for (i = 0; i < (nc - heading_columns + 2) / 3 ; ++i) { tab_text (t, i * 3 + 1, 1, TAB_CENTER | TAT_TITLE, _("Total")); tab_vline (t, TAL_2, heading_columns + i * 3, 0, nr - 1); if (i == 2 && factor->rotation == ROT_PROMAX) continue; /* xgettext:no-c-format */ tab_text (t, i * 3 + 2, 1, TAB_CENTER | TAT_TITLE, _("% of Variance")); tab_text (t, i * 3 + 3, 1, TAB_CENTER | TAT_TITLE, _("Cumulative %")); } for (i = 0 ; i < initial_eigenvalues->size; ++i) i_total += gsl_vector_get (initial_eigenvalues, i); if ( factor->extraction == EXTRACTION_PAF) { e_total = factor->n_vars; } else { e_total = i_total; } for (i = 0 ; i < factor->n_vars; ++i) { const double i_lambda = gsl_vector_get (initial_eigenvalues, i); double i_percent = 100.0 * i_lambda / i_total ; const double e_lambda = gsl_vector_get (extracted_eigenvalues, i); double e_percent = 100.0 * e_lambda / e_total ; c = 0; tab_text_format (t, c++, i + heading_rows, TAB_LEFT | TAT_TITLE, _("%zu"), i + 1); i_cum += i_percent; e_cum += e_percent; /* Initial Eigenvalues */ if (factor->print & PRINT_INITIAL) { tab_double (t, c++, i + heading_rows, 0, i_lambda, NULL, RC_OTHER); tab_double (t, c++, i + heading_rows, 0, i_percent, NULL, RC_OTHER); tab_double (t, c++, i + heading_rows, 0, i_cum, NULL, RC_OTHER); } if (factor->print & PRINT_EXTRACTION) { if (i < idata->n_extractions) { /* Sums of squared loadings */ tab_double (t, c++, i + heading_rows, 0, e_lambda, NULL, RC_OTHER); tab_double (t, c++, i + heading_rows, 0, e_percent, NULL, RC_OTHER); tab_double (t, c++, i + heading_rows, 0, e_cum, NULL, RC_OTHER); } } if (rotated_loadings != NULL) { const double r_lambda = gsl_vector_get (rotated_loadings, i); double r_percent = 100.0 * r_lambda / e_total ; if (factor->print & PRINT_ROTATION) { if (i < idata->n_extractions) { r_cum += r_percent; tab_double (t, c++, i + heading_rows, 0, r_lambda, NULL, RC_OTHER); if (factor->rotation != ROT_PROMAX) { tab_double (t, c++, i + heading_rows, 0, r_percent, NULL, RC_OTHER); tab_double (t, c++, i + heading_rows, 0, r_cum, NULL, RC_OTHER); } } } } } tab_submit (t); } static void show_factor_correlation (const struct cmd_factor * factor, const gsl_matrix *fcm) { size_t i, j; const int heading_columns = 1; const int heading_rows = 1; const int nr = heading_rows + fcm->size2; const int nc = heading_columns + fcm->size1; struct tab_table *t = tab_create (nc, nr); tab_title (t, _("Factor Correlation Matrix")); tab_headers (t, heading_columns, 0, heading_rows, 0); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); /* Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); tab_hline (t, TAL_1, 0, nc - 1, heading_rows); tab_hline (t, TAL_1, 1, nc - 1, 1); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); if ( factor->extraction == EXTRACTION_PC) tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Component")); else tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Factor")); for (i = 0 ; i < fcm->size1; ++i) { tab_text_format (t, heading_columns + i, 0, TAB_CENTER | TAT_TITLE, _("%zu"), i + 1); } for (i = 0 ; i < fcm->size2; ++i) { tab_text_format (t, 0, heading_rows + i, TAB_CENTER | TAT_TITLE, _("%zu"), i + 1); } for (i = 0 ; i < fcm->size1; ++i) { for (j = 0 ; j < fcm->size2; ++j) tab_double (t, heading_columns + j, heading_rows + i, 0, gsl_matrix_get (fcm, i, j), NULL, RC_OTHER); } tab_submit (t); } static void show_aic (const struct cmd_factor *factor, const struct idata *idata) { struct tab_table *t ; size_t i; const int heading_rows = 1; const int heading_columns = 2; const int nc = heading_columns + factor->n_vars; const int nr = heading_rows + 2 * factor->n_vars; if ((factor->print & PRINT_AIC) == 0) return; t = tab_create (nc, nr); tab_title (t, _("Anti-Image Matrices")); tab_hline (t, TAL_1, 0, nc - 1, heading_rows); tab_headers (t, heading_columns, 0, heading_rows, 0); tab_vline (t, TAL_2, 2, 0, nr - 1); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); /* Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); for (i = 0; i < factor->n_vars; ++i) tab_text (t, heading_columns + i, 0, TAT_TITLE, var_to_string (factor->vars[i])); tab_text (t, 0, heading_rows, TAT_TITLE, _("Anti-image Covariance")); tab_hline (t, TAL_1, 0, nc - 1, heading_rows + factor->n_vars); tab_text (t, 0, heading_rows + factor->n_vars, TAT_TITLE, _("Anti-image Correlation")); for (i = 0; i < factor->n_vars; ++i) { tab_text (t, 1, i + heading_rows, TAT_TITLE, var_to_string (factor->vars[i])); tab_text (t, 1, factor->n_vars + i + heading_rows, TAT_TITLE, var_to_string (factor->vars[i])); } for (i = 0; i < factor->n_vars; ++i) { int j; for (j = 0; j < factor->n_vars; ++j) { tab_double (t, heading_columns + i, heading_rows + j, 0, gsl_matrix_get (idata->ai_cov, i, j), NULL, RC_OTHER); } for (j = 0; j < factor->n_vars; ++j) { tab_double (t, heading_columns + i, factor->n_vars + heading_rows + j, 0, gsl_matrix_get (idata->ai_cor, i, j), NULL, RC_OTHER); } } tab_submit (t); } static void show_correlation_matrix (const struct cmd_factor *factor, const struct idata *idata) { struct tab_table *t ; size_t i, j; int y_pos_corr = -1; int y_pos_sig = -1; int suffix_rows = 0; const int heading_rows = 1; const int heading_columns = 2; int nc = heading_columns ; int nr = heading_rows ; int n_data_sets = 0; if (factor->print & PRINT_CORRELATION) { y_pos_corr = n_data_sets; n_data_sets++; nc = heading_columns + factor->n_vars; } if (factor->print & PRINT_SIG) { y_pos_sig = n_data_sets; n_data_sets++; nc = heading_columns + factor->n_vars; } nr += n_data_sets * factor->n_vars; if (factor->print & PRINT_DETERMINANT) suffix_rows = 1; /* If the table would contain only headings, don't bother rendering it */ if (nr <= heading_rows && suffix_rows == 0) return; t = tab_create (nc, nr + suffix_rows); tab_title (t, _("Correlation Matrix")); tab_hline (t, TAL_1, 0, nc - 1, heading_rows); if (nr > heading_rows) { tab_headers (t, heading_columns, 0, heading_rows, 0); tab_vline (t, TAL_2, 2, 0, nr - 1); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); /* Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); for (i = 0; i < factor->n_vars; ++i) tab_text (t, heading_columns + i, 0, TAT_TITLE, var_to_string (factor->vars[i])); for (i = 0 ; i < n_data_sets; ++i) { int y = heading_rows + i * factor->n_vars; size_t v; for (v = 0; v < factor->n_vars; ++v) tab_text (t, 1, y + v, TAT_TITLE, var_to_string (factor->vars[v])); tab_hline (t, TAL_1, 0, nc - 1, y); } if (factor->print & PRINT_CORRELATION) { const double y = heading_rows + y_pos_corr; tab_text (t, 0, y, TAT_TITLE, _("Correlations")); for (i = 0; i < factor->n_vars; ++i) { for (j = 0; j < factor->n_vars; ++j) tab_double (t, heading_columns + j, y + i, 0, gsl_matrix_get (idata->mm.corr, i, j), NULL, RC_OTHER); } } if (factor->print & PRINT_SIG) { const double y = heading_rows + y_pos_sig * factor->n_vars; tab_text (t, 0, y, TAT_TITLE, _("Sig. (1-tailed)")); for (i = 0; i < factor->n_vars; ++i) { for (j = 0; j < factor->n_vars; ++j) { double rho = gsl_matrix_get (idata->mm.corr, i, j); double w = gsl_matrix_get (idata->mm.n, i, j); if (i == j) continue; tab_double (t, heading_columns + j, y + i, 0, significance_of_correlation (rho, w), NULL, RC_PVALUE); } } } } if (factor->print & PRINT_DETERMINANT) { tab_text (t, 0, nr, TAB_LEFT | TAT_TITLE, _("Determinant")); tab_double (t, 1, nr, 0, idata->detR, NULL, RC_OTHER); } tab_submit (t); } static void show_covariance_matrix (const struct cmd_factor *factor, const struct idata *idata) { struct tab_table *t ; size_t i, j; int y_pos_corr = -1; int suffix_rows = 0; const int heading_rows = 1; const int heading_columns = 1; int nc = heading_columns ; int nr = heading_rows ; int n_data_sets = 0; if (factor->print & PRINT_COVARIANCE) { y_pos_corr = n_data_sets; n_data_sets++; nc = heading_columns + factor->n_vars; } nr += n_data_sets * factor->n_vars; /* If the table would contain only headings, don't bother rendering it */ if (nr <= heading_rows && suffix_rows == 0) return; t = tab_create (nc, nr + suffix_rows); tab_title (t, _("Covariance Matrix")); tab_hline (t, TAL_1, 0, nc - 1, heading_rows); if (nr > heading_rows) { tab_headers (t, heading_columns, 0, heading_rows, 0); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); /* Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); for (i = 0; i < factor->n_vars; ++i) tab_text (t, heading_columns + i, 0, TAT_TITLE, var_to_string (factor->vars[i])); for (i = 0 ; i < n_data_sets; ++i) { int y = heading_rows + i * factor->n_vars; size_t v; for (v = 0; v < factor->n_vars; ++v) tab_text (t, heading_columns -1, y + v, TAT_TITLE, var_to_string (factor->vars[v])); tab_hline (t, TAL_1, 0, nc - 1, y); } if (factor->print & PRINT_COVARIANCE) { const double y = heading_rows + y_pos_corr; for (i = 0; i < factor->n_vars; ++i) { for (j = 0; j < factor->n_vars; ++j) tab_double (t, heading_columns + j, y + i, 0, gsl_matrix_get (idata->mm.cov, i, j), NULL, RC_OTHER); } } } tab_submit (t); } static void do_factor (const struct cmd_factor *factor, struct casereader *r) { struct ccase *c; struct idata *idata = idata_alloc (factor->n_vars); idata->cvm = covariance_1pass_create (factor->n_vars, factor->vars, factor->wv, factor->exclude, true); for ( ; (c = casereader_read (r) ); case_unref (c)) { covariance_accumulate (idata->cvm, c); } idata->mm.cov = covariance_calculate (idata->cvm); if (idata->mm.cov == NULL) { msg (MW, _("The dataset contains no complete observations. No analysis will be performed.")); covariance_destroy (idata->cvm); goto finish; } idata->mm.var_matrix = covariance_moments (idata->cvm, MOMENT_VARIANCE); idata->mm.mean_matrix = covariance_moments (idata->cvm, MOMENT_MEAN); idata->mm.n = covariance_moments (idata->cvm, MOMENT_NONE); do_factor_by_matrix (factor, idata); finish: gsl_matrix_free (idata->mm.corr); gsl_matrix_free (idata->mm.cov); idata_free (idata); casereader_destroy (r); } static void do_factor_by_matrix (const struct cmd_factor *factor, struct idata *idata) { if (!idata->mm.cov && !idata->mm.corr) { msg (ME, _("The dataset has no complete covariance or correlation matrix.")); return; } if (idata->mm.cov && !idata->mm.corr) idata->mm.corr = correlation_from_covariance (idata->mm.cov, idata->mm.var_matrix); if (idata->mm.corr && !idata->mm.cov) idata->mm.cov = covariance_from_correlation (idata->mm.corr, idata->mm.var_matrix); if (factor->method == METHOD_CORR) idata->analysis_matrix = idata->mm.corr; else idata->analysis_matrix = idata->mm.cov; gsl_matrix *r_inv; r_inv = clone_matrix (idata->mm.corr); gsl_linalg_cholesky_decomp (r_inv); gsl_linalg_cholesky_invert (r_inv); idata->ai_cov = anti_image_cov (r_inv); idata->ai_cor = anti_image_corr (r_inv, idata); int i; double sum_ssq_r = 0; double sum_ssq_a = 0; for (i = 0; i < r_inv->size1; ++i) { sum_ssq_r += ssq_od_n (idata->mm.corr, i); sum_ssq_a += ssq_od_n (idata->ai_cor, i); } gsl_matrix_free (r_inv); if (factor->print & PRINT_DETERMINANT || factor->print & PRINT_KMO) { int sign = 0; const int size = idata->mm.corr->size1; gsl_permutation *p = gsl_permutation_calloc (size); gsl_matrix *tmp = gsl_matrix_calloc (size, size); gsl_matrix_memcpy (tmp, idata->mm.corr); gsl_linalg_LU_decomp (tmp, p, &sign); idata->detR = gsl_linalg_LU_det (tmp, sign); gsl_permutation_free (p); gsl_matrix_free (tmp); } if ( factor->print & PRINT_UNIVARIATE) { const struct fmt_spec *wfmt = factor->wv ? var_get_print_format (factor->wv) : & F_8_0; const int nc = 4; int i; const int heading_columns = 1; const int heading_rows = 1; const int nr = heading_rows + factor->n_vars; struct tab_table *t = tab_create (nc, nr); tab_set_format (t, RC_WEIGHT, wfmt); tab_title (t, _("Descriptive Statistics")); tab_headers (t, heading_columns, 0, heading_rows, 0); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); /* Vertical lines */ tab_box (t, -1, -1, -1, TAL_1, heading_columns, 0, nc - 1, nr - 1); tab_hline (t, TAL_1, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Mean")); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Std. Deviation")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Analysis N")); for (i = 0 ; i < factor->n_vars; ++i) { const struct variable *v = factor->vars[i]; tab_text (t, 0, i + heading_rows, TAB_LEFT | TAT_TITLE, var_to_string (v)); tab_double (t, 1, i + heading_rows, 0, gsl_matrix_get (idata->mm.mean_matrix, i, i), NULL, RC_OTHER); tab_double (t, 2, i + heading_rows, 0, sqrt (gsl_matrix_get (idata->mm.var_matrix, i, i)), NULL, RC_OTHER); tab_double (t, 3, i + heading_rows, 0, gsl_matrix_get (idata->mm.n, i, i), NULL, RC_WEIGHT); } tab_submit (t); } if (factor->print & PRINT_KMO) { int i; double df = factor->n_vars * (factor->n_vars - 1) / 2; double w = 0; double xsq; const int heading_columns = 2; const int heading_rows = 0; const int nr = heading_rows + 4; const int nc = heading_columns + 1; struct tab_table *t = tab_create (nc, nr); tab_title (t, _("KMO and Bartlett's Test")); tab_headers (t, heading_columns, 0, heading_rows, 0); /* Outline the box */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, nc - 1, nr - 1); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_text (t, 0, 0, TAT_TITLE | TAB_LEFT, _("Kaiser-Meyer-Olkin Measure of Sampling Adequacy")); tab_double (t, 2, 0, 0, sum_ssq_r / (sum_ssq_r + sum_ssq_a), NULL, RC_OTHER); tab_text (t, 0, 1, TAT_TITLE | TAB_LEFT, _("Bartlett's Test of Sphericity")); tab_text (t, 1, 1, TAT_TITLE, _("Approx. Chi-Square")); tab_text (t, 1, 2, TAT_TITLE, _("df")); tab_text (t, 1, 3, TAT_TITLE, _("Sig.")); /* The literature doesn't say what to do for the value of W when missing values are involved. The best thing I can think of is to take the mean average. */ w = 0; for (i = 0; i < idata->mm.n->size1; ++i) w += gsl_matrix_get (idata->mm.n, i, i); w /= idata->mm.n->size1; xsq = w - 1 - (2 * factor->n_vars + 5) / 6.0; xsq *= -log (idata->detR); tab_double (t, 2, 1, 0, xsq, NULL, RC_OTHER); tab_double (t, 2, 2, 0, df, NULL, RC_INTEGER); tab_double (t, 2, 3, 0, gsl_cdf_chisq_Q (xsq, df), NULL, RC_PVALUE); tab_submit (t); } show_correlation_matrix (factor, idata); show_covariance_matrix (factor, idata); if (idata->cvm) covariance_destroy (idata->cvm); { gsl_matrix *am = matrix_dup (idata->analysis_matrix); gsl_eigen_symmv_workspace *workspace = gsl_eigen_symmv_alloc (factor->n_vars); gsl_eigen_symmv (am, idata->eval, idata->evec, workspace); gsl_eigen_symmv_free (workspace); gsl_matrix_free (am); } gsl_eigen_symmv_sort (idata->eval, idata->evec, GSL_EIGEN_SORT_ABS_DESC); idata->n_extractions = n_extracted_factors (factor, idata); if (idata->n_extractions == 0) { msg (MW, _("The %s criteria result in zero factors extracted. Therefore no analysis will be performed."), "FACTOR"); return; } if (idata->n_extractions > factor->n_vars) { msg (MW, _("The %s criteria result in more factors than variables, which is not meaningful. No analysis will be performed."), "FACTOR"); return; } { gsl_matrix *rotated_factors = NULL; gsl_matrix *pattern_matrix = NULL; gsl_matrix *fcm = NULL; gsl_vector *rotated_loadings = NULL; const gsl_vector *extracted_eigenvalues = NULL; gsl_vector *initial_communalities = gsl_vector_alloc (factor->n_vars); gsl_vector *extracted_communalities = gsl_vector_alloc (factor->n_vars); size_t i; struct factor_matrix_workspace *fmw = factor_matrix_workspace_alloc (idata->msr->size, idata->n_extractions); gsl_matrix *factor_matrix = gsl_matrix_calloc (factor->n_vars, fmw->n_factors); if ( factor->extraction == EXTRACTION_PAF) { gsl_vector *diff = gsl_vector_alloc (idata->msr->size); struct smr_workspace *ws = ws_create (idata->analysis_matrix); for (i = 0 ; i < factor->n_vars ; ++i) { double r2 = squared_multiple_correlation (idata->analysis_matrix, i, ws); gsl_vector_set (idata->msr, i, r2); } ws_destroy (ws); gsl_vector_memcpy (initial_communalities, idata->msr); for (i = 0; i < factor->extraction_iterations; ++i) { double min, max; gsl_vector_memcpy (diff, idata->msr); iterate_factor_matrix (idata->analysis_matrix, idata->msr, factor_matrix, fmw); gsl_vector_sub (diff, idata->msr); gsl_vector_minmax (diff, &min, &max); if ( fabs (min) < factor->econverge && fabs (max) < factor->econverge) break; } gsl_vector_free (diff); gsl_vector_memcpy (extracted_communalities, idata->msr); extracted_eigenvalues = fmw->eval; } else if (factor->extraction == EXTRACTION_PC) { for (i = 0; i < factor->n_vars; ++i) gsl_vector_set (initial_communalities, i, communality (idata, i, factor->n_vars)); gsl_vector_memcpy (extracted_communalities, initial_communalities); iterate_factor_matrix (idata->analysis_matrix, extracted_communalities, factor_matrix, fmw); extracted_eigenvalues = idata->eval; } show_aic (factor, idata); show_communalities (factor, initial_communalities, extracted_communalities); if ( factor->rotation != ROT_NONE) { rotated_factors = gsl_matrix_calloc (factor_matrix->size1, factor_matrix->size2); rotated_loadings = gsl_vector_calloc (factor_matrix->size2); if (factor->rotation == ROT_PROMAX) { pattern_matrix = gsl_matrix_calloc (factor_matrix->size1, factor_matrix->size2); fcm = gsl_matrix_calloc (factor_matrix->size2, factor_matrix->size2); } rotate (factor, factor_matrix, extracted_communalities, rotated_factors, rotated_loadings, pattern_matrix, fcm); } show_explained_variance (factor, idata, idata->eval, extracted_eigenvalues, rotated_loadings); factor_matrix_workspace_free (fmw); show_scree (factor, idata); show_factor_matrix (factor, idata, factor->extraction == EXTRACTION_PC ? _("Component Matrix") : _("Factor Matrix"), factor_matrix); if ( factor->rotation == ROT_PROMAX) { show_factor_matrix (factor, idata, _("Pattern Matrix"), pattern_matrix); gsl_matrix_free (pattern_matrix); } if ( factor->rotation != ROT_NONE) { show_factor_matrix (factor, idata, (factor->rotation == ROT_PROMAX) ? _("Structure Matrix") : (factor->extraction == EXTRACTION_PC ? _("Rotated Component Matrix") : _("Rotated Factor Matrix")), rotated_factors); gsl_matrix_free (rotated_factors); } if ( factor->rotation == ROT_PROMAX) { show_factor_correlation (factor, fcm); gsl_matrix_free (fcm); } gsl_matrix_free (factor_matrix); gsl_vector_free (rotated_loadings); gsl_vector_free (initial_communalities); gsl_vector_free (extracted_communalities); } } pspp-1.0.1/src/language/stats/means.c0000644000175000017500000006374013137223525014410 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/case.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "math/categoricals.h" #include "math/interaction.h" #include "math/moments.h" #include "output/tab.h" #include #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) struct means; struct per_var_data { void **cell_stats; struct moments1 *mom; }; typedef void *stat_create (struct pool *pool); typedef void stat_update (void *stat, double w, double x); typedef double stat_get (const struct per_var_data *, void *aux); struct cell_spec { /* Printable title for output */ const char *title; /* Keyword for syntax */ const char *keyword; stat_create *sc; stat_update *su; stat_get *sd; }; struct harmonic_mean { double rsum; double n; }; static void * harmonic_create (struct pool *pool) { struct harmonic_mean *hm = pool_alloc (pool, sizeof *hm); hm->rsum = 0; hm->n = 0; return hm; } static void harmonic_update (void *stat, double w, double x) { struct harmonic_mean *hm = stat; hm->rsum += w / x; hm->n += w; } static double harmonic_get (const struct per_var_data *pvd UNUSED, void *stat) { struct harmonic_mean *hm = stat; return hm->n / hm->rsum; } struct geometric_mean { double prod; double n; }; static void * geometric_create (struct pool *pool) { struct geometric_mean *gm = pool_alloc (pool, sizeof *gm); gm->prod = 1.0; gm->n = 0; return gm; } static void geometric_update (void *stat, double w, double x) { struct geometric_mean *gm = stat; gm->prod *= pow (x, w); gm->n += w; } static double geometric_get (const struct per_var_data *pvd UNUSED, void *stat) { struct geometric_mean *gm = stat; return pow (gm->prod, 1.0 / gm->n); } static double sum_get (const struct per_var_data *pvd, void *stat UNUSED) { double n, mean; moments1_calculate (pvd->mom, &n, &mean, 0, 0, 0); return mean * n; } static double n_get (const struct per_var_data *pvd, void *stat UNUSED) { double n; moments1_calculate (pvd->mom, &n, 0, 0, 0, 0); return n; } static double arithmean_get (const struct per_var_data *pvd, void *stat UNUSED) { double n, mean; moments1_calculate (pvd->mom, &n, &mean, 0, 0, 0); return mean; } static double variance_get (const struct per_var_data *pvd, void *stat UNUSED) { double n, mean, variance; moments1_calculate (pvd->mom, &n, &mean, &variance, 0, 0); return variance; } static double stddev_get (const struct per_var_data *pvd, void *stat) { return sqrt (variance_get (pvd, stat)); } static double skew_get (const struct per_var_data *pvd, void *stat UNUSED) { double skew; moments1_calculate (pvd->mom, NULL, NULL, NULL, &skew, 0); return skew; } static double sekurt_get (const struct per_var_data *pvd, void *stat UNUSED) { double n; moments1_calculate (pvd->mom, &n, NULL, NULL, NULL, NULL); return calc_sekurt (n); } static double seskew_get (const struct per_var_data *pvd, void *stat UNUSED) { double n; moments1_calculate (pvd->mom, &n, NULL, NULL, NULL, NULL); return calc_seskew (n); } static double kurt_get (const struct per_var_data *pvd, void *stat UNUSED) { double kurt; moments1_calculate (pvd->mom, NULL, NULL, NULL, NULL, &kurt); return kurt; } static double semean_get (const struct per_var_data *pvd, void *stat UNUSED) { double n, var; moments1_calculate (pvd->mom, &n, NULL, &var, NULL, NULL); return sqrt (var / n); } static void * min_create (struct pool *pool) { double *r = pool_alloc (pool, sizeof *r); *r = DBL_MAX; return r; } static void min_update (void *stat, double w UNUSED, double x) { double *r = stat; if (x < *r) *r = x; } static double min_get (const struct per_var_data *pvd UNUSED, void *stat) { double *r = stat; return *r; } static void * max_create (struct pool *pool) { double *r = pool_alloc (pool, sizeof *r); *r = -DBL_MAX; return r; } static void max_update (void *stat, double w UNUSED, double x) { double *r = stat; if (x > *r) *r = x; } static double max_get (const struct per_var_data *pvd UNUSED, void *stat) { double *r = stat; return *r; } struct range { double min; double max; }; static void * range_create (struct pool *pool) { struct range *r = pool_alloc (pool, sizeof *r); r->min = DBL_MAX; r->max = -DBL_MAX; return r; } static void range_update (void *stat, double w UNUSED, double x) { struct range *r = stat; if (x > r->max) r->max = x; if (x < r->min) r->min = x; } static double range_get (const struct per_var_data *pvd UNUSED, void *stat) { struct range *r = stat; return r->max - r->min; } static void * last_create (struct pool *pool) { double *l = pool_alloc (pool, sizeof *l); return l; } static void last_update (void *stat, double w UNUSED, double x) { double *l = stat; *l = x; } static double last_get (const struct per_var_data *pvd UNUSED, void *stat) { double *l = stat; return *l; } static void * first_create (struct pool *pool) { double *f = pool_alloc (pool, sizeof *f); *f = SYSMIS; return f; } static void first_update (void *stat, double w UNUSED, double x) { double *f = stat; if (*f == SYSMIS) *f = x; } static double first_get (const struct per_var_data *pvd UNUSED, void *stat) { double *f = stat; return *f; } enum { MEANS_MEAN = 0, MEANS_N, MEANS_STDDEV }; /* Table of cell_specs */ static const struct cell_spec cell_spec[] = { {N_("Mean"), "MEAN", NULL, NULL, arithmean_get}, {N_("N"), "COUNT", NULL, NULL, n_get}, {N_("Std. Deviation"), "STDDEV", NULL, NULL, stddev_get}, #if 0 {N_("Median"), "MEDIAN", NULL, NULL, NULL}, {N_("Group Median"), "GMEDIAN", NULL, NULL, NULL}, #endif {N_("S.E. Mean"), "SEMEAN", NULL, NULL, semean_get}, {N_("Sum"), "SUM", NULL, NULL, sum_get}, {N_("Min"), "MIN", min_create, min_update, min_get}, {N_("Max"), "MAX", max_create, max_update, max_get}, {N_("Range"), "RANGE", range_create, range_update, range_get}, {N_("Variance"), "VARIANCE", NULL, NULL, variance_get}, {N_("Kurtosis"), "KURT", NULL, NULL, kurt_get}, {N_("S.E. Kurt"), "SEKURT", NULL, NULL, sekurt_get}, {N_("Skewness"), "SKEW", NULL, NULL, skew_get}, {N_("S.E. Skew"), "SESKEW", NULL, NULL, seskew_get}, {N_("First"), "FIRST", first_create, first_update, first_get}, {N_("Last"), "LAST", last_create, last_update, last_get}, #if 0 {N_("Percent N"), "NPCT", NULL, NULL, NULL}, {N_("Percent Sum"), "SPCT", NULL, NULL, NULL}, #endif {N_("Harmonic Mean"), "HARMONIC", harmonic_create, harmonic_update, harmonic_get}, {N_("Geom. Mean"), "GEOMETRIC", geometric_create, geometric_update, geometric_get} }; #define n_C (sizeof (cell_spec) / sizeof (struct cell_spec)) struct summary { casenumber missing; casenumber non_missing; }; struct layer { size_t n_factor_vars; const struct variable **factor_vars; }; /* The thing parsed after TABLES= */ struct mtable { size_t n_dep_vars; const struct variable **dep_vars; int n_layers; struct layer *layers; struct interaction **interactions; struct summary *summary; int ii; struct categoricals *cats; }; struct means { const struct dictionary *dict; struct mtable *table; size_t n_tables; /* Missing value class for categorical variables */ enum mv_class exclude; /* Missing value class for dependent variables */ enum mv_class dep_exclude; bool listwise_exclude; /* an array indicating which statistics are to be calculated */ int *cells; /* Size of cells */ int n_cells; /* Pool on which cell functions may allocate data */ struct pool *pool; }; static void run_means (struct means *cmd, struct casereader *input, const struct dataset *ds); static bool parse_means_table_syntax (struct lexer *lexer, const struct means *cmd, struct mtable *table) { table->ii = 0; table->n_layers = 0; table->layers = NULL; table->interactions = NULL; /* Dependent variable (s) */ if (!parse_variables_const_pool (lexer, cmd->pool, cmd->dict, &table->dep_vars, &table->n_dep_vars, PV_NO_DUPLICATE | PV_NUMERIC)) return false; /* Factor variable (s) */ while (lex_match (lexer, T_BY)) { table->n_layers++; table->layers = pool_realloc (cmd->pool, table->layers, sizeof (*table->layers) * table->n_layers); if (!parse_variables_const_pool (lexer, cmd->pool, cmd->dict, &table->layers[table->n_layers - 1].factor_vars, &table->layers[table->n_layers - 1].n_factor_vars, PV_NO_DUPLICATE)) return false; } /* There is always at least one layer. However the final layer is the total, and not normally considered by the user as a layer. */ table->n_layers++; table->layers = pool_realloc (cmd->pool, table->layers, sizeof (*table->layers) * table->n_layers); table->layers[table->n_layers - 1].factor_vars = NULL; table->layers[table->n_layers - 1].n_factor_vars = 0; return true; } /* Match a variable. If the match succeeds, the variable will be placed in VAR. Returns true if successful */ static bool lex_is_variable (struct lexer *lexer, const struct dictionary *dict, int n) { const char *tstr; if (lex_next_token (lexer, n) != T_ID) return false; tstr = lex_next_tokcstr (lexer, n); if (NULL == dict_lookup_var (dict, tstr) ) return false; return true; } int cmd_means (struct lexer *lexer, struct dataset *ds) { int t; int i; int l; struct means means; bool more_tables = true; means.pool = pool_create (); means.exclude = MV_ANY; means.dep_exclude = MV_ANY; means.listwise_exclude = false; means.table = NULL; means.n_tables = 0; means.dict = dataset_dict (ds); means.n_cells = 3; means.cells = pool_calloc (means.pool, means.n_cells, sizeof (*means.cells)); /* The first three items (MEAN, COUNT, STDDEV) are the default */ for (i = 0; i < 3; ++i) means.cells[i] = i; /* Optional TABLES = */ if (lex_match_id (lexer, "TABLES")) { if (! lex_force_match (lexer, T_EQUALS)) goto error; } more_tables = true; /* Parse the "tables" */ while (more_tables) { means.n_tables ++; means.table = pool_realloc (means.pool, means.table, means.n_tables * sizeof (*means.table)); if (! parse_means_table_syntax (lexer, &means, &means.table[means.n_tables - 1])) { goto error; } /* Look ahead to see if there are more tables to be parsed */ more_tables = false; if ( T_SLASH == lex_next_token (lexer, 0) ) { if (lex_is_variable (lexer, means.dict, 1) ) { more_tables = true; lex_match (lexer, T_SLASH); } } } /* /MISSING subcommand */ while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "MISSING")) { /* If no MISSING subcommand is specified, each combination of a dependent variable and categorical variables is handled separately. */ lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "INCLUDE")) { /* Use the subcommand "/MISSING=INCLUDE" to include user-missing values in the analysis. */ means.exclude = MV_SYSTEM; means.dep_exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "TABLE")) /* This is the default. (I think). Every case containing a complete set of variables for a given table. If any variable, categorical or dependent for in a table is missing (as defined by what?), then that variable will be dropped FOR THAT TABLE ONLY. */ { means.listwise_exclude = true; } else if (lex_match_id (lexer, "DEPENDENT")) /* Use the command "/MISSING=DEPENDENT" to include user-missing values for the categorical variables, while excluding them for the dependent variables. Cases are dropped only when user-missing values appear in dependent variables. User-missing values for categorical variables are treated according to their face value. Cases are ALWAYS dropped when System Missing values appear in the categorical variables. */ { means.dep_exclude = MV_ANY; means.exclude = MV_SYSTEM; } else { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "CELLS")) { lex_match (lexer, T_EQUALS); /* The default values become overwritten */ means.n_cells = 0; while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { int k = 0; if (lex_match (lexer, T_ALL)) { int x; means.cells = pool_realloc (means.pool, means.cells, (means.n_cells += n_C) * sizeof (*means.cells)); for (x = 0; x < n_C; ++x) means.cells[means.n_cells - (n_C - 1 - x) - 1] = x; } else if (lex_match_id (lexer, "NONE")) { /* Do nothing */ } else if (lex_match_id (lexer, "DEFAULT")) { means.cells = pool_realloc (means.pool, means.cells, (means.n_cells += 3) * sizeof (*means.cells)); means.cells[means.n_cells - 2 - 1] = MEANS_MEAN; means.cells[means.n_cells - 1 - 1] = MEANS_N; means.cells[means.n_cells - 0 - 1] = MEANS_STDDEV; } else { for (; k < n_C; ++k) { if (lex_match_id (lexer, cell_spec[k].keyword)) { means.cells = pool_realloc (means.pool, means.cells, ++means.n_cells * sizeof (*means.cells)); means.cells[means.n_cells - 1] = k; break; } } } if (k >= n_C) { lex_error (lexer, NULL); goto error; } } } else { lex_error (lexer, NULL); goto error; } } for (t = 0; t < means.n_tables; ++t) { struct mtable *table = &means.table[t]; table->interactions = pool_calloc (means.pool, table->n_layers, sizeof (*table->interactions)); table->summary = pool_calloc (means.pool, table->n_dep_vars * table->n_layers, sizeof (*table->summary)); for (l = 0; l < table->n_layers; ++l) { int v; const struct layer *lyr = &table->layers[l]; const int n_vars = lyr->n_factor_vars; table->interactions[l] = interaction_create (NULL); for (v = 0; v < n_vars ; ++v) { interaction_add_variable (table->interactions[l], lyr->factor_vars[v]); } } } { struct casegrouper *grouper; struct casereader *group; bool ok; grouper = casegrouper_create_splits (proc_open (ds), means.dict); while (casegrouper_get_next_group (grouper, &group)) { run_means (&means, group, ds); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; } for (t = 0; t < means.n_tables; ++t) { int l; struct mtable *table = &means.table[t]; if (table->interactions) for (l = 0; l < table->n_layers; ++l) { interaction_destroy (table->interactions[l]); } } pool_destroy (means.pool); return CMD_SUCCESS; error: for (t = 0; t < means.n_tables; ++t) { int l; struct mtable *table = &means.table[t]; if (table->interactions) for (l = 0; l < table->n_layers; ++l) { interaction_destroy (table->interactions[l]); } } pool_destroy (means.pool); return CMD_FAILURE; } static bool is_missing (const struct means *cmd, const struct variable *dvar, const struct interaction *iact, const struct ccase *c) { if ( interaction_case_is_missing (iact, c, cmd->exclude) ) return true; if (var_is_value_missing (dvar, case_data (c, dvar), cmd->dep_exclude)) return true; return false; } static void output_case_processing_summary (const struct mtable *); static void output_report (const struct means *, int, const struct mtable *); struct per_cat_data { struct per_var_data *pvd; bool warn; }; static void destroy_n (const void *aux1 UNUSED, void *aux2, void *user_data) { struct mtable *table = aux2; int v; struct per_cat_data *per_cat_data = user_data; struct per_var_data *pvd = per_cat_data->pvd; for (v = 0; v < table->n_dep_vars; ++v) { struct per_var_data *pp = &pvd[v]; moments1_destroy (pp->mom); } } static void * create_n (const void *aux1, void *aux2) { int i, v; const struct means *means = aux1; struct mtable *table = aux2; struct per_cat_data *per_cat_data = pool_malloc (means->pool, sizeof *per_cat_data); struct per_var_data *pvd = pool_calloc (means->pool, table->n_dep_vars, sizeof *pvd); for (v = 0; v < table->n_dep_vars; ++v) { enum moment maxmom = MOMENT_KURTOSIS; struct per_var_data *pp = &pvd[v]; pp->cell_stats = pool_calloc (means->pool, means->n_cells, sizeof *pp->cell_stats); for (i = 0; i < means->n_cells; ++i) { int csi = means->cells[i]; const struct cell_spec *cs = &cell_spec[csi]; if (cs->sc) { pp->cell_stats[i] = cs->sc (means->pool); } } pp->mom = moments1_create (maxmom); } per_cat_data->pvd = pvd; per_cat_data->warn = true; return per_cat_data; } static void update_n (const void *aux1, void *aux2, void *user_data, const struct ccase *c, double weight) { int i; int v = 0; const struct means *means = aux1; struct mtable *table = aux2; struct per_cat_data *per_cat_data = user_data; for (v = 0; v < table->n_dep_vars; ++v) { struct per_var_data *pvd = &per_cat_data->pvd[v]; const double x = case_data (c, table->dep_vars[v])->f; for (i = 0; i < table->n_layers; ++i) { if ( is_missing (means, table->dep_vars[v], table->interactions[i], c)) goto end; } for (i = 0; i < means->n_cells; ++i) { const int csi = means->cells[i]; const struct cell_spec *cs = &cell_spec[csi]; if (cs->su) cs->su (pvd->cell_stats[i], weight, x); } moments1_add (pvd->mom, x, weight); end: continue; } } static void calculate_n (const void *aux1, void *aux2, void *user_data) { int i; int v = 0; struct per_cat_data *per_cat_data = user_data; const struct means *means = aux1; struct mtable *table = aux2; for (v = 0; v < table->n_dep_vars; ++v) { struct per_var_data *pvd = &per_cat_data->pvd[v]; for (i = 0; i < means->n_cells; ++i) { int csi = means->cells[i]; const struct cell_spec *cs = &cell_spec[csi]; if (cs->su) cs->sd (pvd, pvd->cell_stats[i]); } } } static void run_means (struct means *cmd, struct casereader *input, const struct dataset *ds UNUSED) { int t; const struct variable *wv = dict_get_weight (cmd->dict); struct ccase *c; struct casereader *reader; struct payload payload; payload.create = create_n; payload.update = update_n; payload.calculate = calculate_n; payload.destroy = destroy_n; for (t = 0; t < cmd->n_tables; ++t) { struct mtable *table = &cmd->table[t]; table->cats = categoricals_create (table->interactions, table->n_layers, wv, cmd->dep_exclude, cmd->exclude); categoricals_set_payload (table->cats, &payload, cmd, table); } for (reader = input; (c = casereader_read (reader)) != NULL; case_unref (c)) { for (t = 0; t < cmd->n_tables; ++t) { bool something_missing = false; int v; struct mtable *table = &cmd->table[t]; for (v = 0; v < table->n_dep_vars; ++v) { int i; for (i = 0; i < table->n_layers; ++i) { const bool missing = is_missing (cmd, table->dep_vars[v], table->interactions[i], c); if (missing) { something_missing = true; table->summary[v * table->n_layers + i].missing++; } else table->summary[v * table->n_layers + i].non_missing++; } } if ( something_missing && cmd->listwise_exclude) continue; categoricals_update (table->cats, c); } } casereader_destroy (reader); for (t = 0; t < cmd->n_tables; ++t) { struct mtable *table = &cmd->table[t]; categoricals_done (table->cats); } for (t = 0; t < cmd->n_tables; ++t) { int i; const struct mtable *table = &cmd->table[t]; output_case_processing_summary (table); for (i = 0; i < table->n_layers; ++i) { output_report (cmd, i, table); } categoricals_destroy (table->cats); } } static void output_case_processing_summary (const struct mtable *table) { int i, v; const int heading_columns = 1; const int heading_rows = 3; struct tab_table *t; const int nr = heading_rows + table->n_layers * table->n_dep_vars; const int nc = 7; t = tab_create (nc, nr); tab_title (t, _("Case Processing Summary")); tab_headers (t, heading_columns, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_joint_text (t, heading_columns, 0, nc - 1, 0, TAB_CENTER | TAT_TITLE, _("Cases")); tab_joint_text (t, 1, 1, 2, 1, TAB_CENTER | TAT_TITLE, _("Included")); tab_joint_text (t, 3, 1, 4, 1, TAB_CENTER | TAT_TITLE, _("Excluded")); tab_joint_text (t, 5, 1, 6, 1, TAB_CENTER | TAT_TITLE, _("Total")); tab_hline (t, TAL_1, heading_columns, nc - 1, 1); tab_hline (t, TAL_1, heading_columns, nc - 1, 2); for (i = 0; i < 3; ++i) { tab_text (t, heading_columns + i * 2, 2, TAB_CENTER | TAT_TITLE, _("N")); tab_text (t, heading_columns + i * 2 + 1, 2, TAB_CENTER | TAT_TITLE, _("Percent")); } for (v = 0; v < table->n_dep_vars; ++v) { const struct variable *var = table->dep_vars[v]; const char *dv_name = var_to_string (var); for (i = 0; i < table->n_layers; ++i) { const int row = v * table->n_layers + i; const struct interaction *iact = table->interactions[i]; casenumber n_total; struct string str; ds_init_cstr (&str, dv_name); ds_put_cstr (&str, ": "); interaction_to_string (iact, &str); tab_text (t, 0, row + heading_rows, TAB_LEFT | TAT_TITLE, ds_cstr (&str)); n_total = table->summary[row].missing + table->summary[row].non_missing; tab_double (t, 1, row + heading_rows, 0, table->summary[row].non_missing, NULL, RC_INTEGER); tab_text_format (t, 2, row + heading_rows, 0, _("%g%%"), table->summary[row].non_missing / (double) n_total * 100.0); tab_double (t, 3, row + heading_rows, 0, table->summary[row].missing, NULL, RC_INTEGER); tab_text_format (t, 4, row + heading_rows, 0, _("%g%%"), table->summary[row].missing / (double) n_total * 100.0); tab_double (t, 5, row + heading_rows, 0, table->summary[row].missing + table->summary[row].non_missing, NULL, RC_INTEGER); tab_text_format (t, 6, row + heading_rows, 0, _("%g%%"), n_total / (double) n_total * 100.0); ds_destroy (&str); } } tab_submit (t); } static void output_report (const struct means *cmd, int iact_idx, const struct mtable *table) { int grp; int i; const struct interaction *iact = table->interactions[iact_idx]; const int heading_columns = 1 + iact->n_vars; const int heading_rows = 1; struct tab_table *t; const int n_cats = categoricals_n_count (table->cats, iact_idx); const int nr = n_cats * table->n_dep_vars + heading_rows; const int nc = heading_columns + cmd->n_cells; t = tab_create (nc, nr); tab_title (t, _("Report")); tab_headers (t, heading_columns, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); for (i = 0; i < iact->n_vars; ++i) { tab_text (t, 1 + i, 0, TAB_CENTER | TAT_TITLE, var_to_string (iact->vars[i])); } for (i = 0; i < cmd->n_cells; ++i) { tab_text (t, heading_columns + i, 0, TAB_CENTER | TAT_TITLE, gettext (cell_spec[cmd->cells[i]].title)); } for (i = 0; i < n_cats; ++i) { int v, dv; const struct ccase *c = categoricals_get_case_by_category_real (table->cats, iact_idx, i); for (dv = 0; dv < table->n_dep_vars; ++dv) { tab_text (t, 0, heading_rows + dv * n_cats, TAB_RIGHT | TAT_TITLE, var_to_string (table->dep_vars[dv]) ); if ( dv > 0) tab_hline (t, TAL_1, 0, nc - 1, heading_rows + dv * n_cats); for (v = 0; v < iact->n_vars; ++v) { const struct variable *var = iact->vars[v]; const union value *val = case_data (c, var); struct string str; ds_init_empty (&str); var_append_value_name (var, val, &str); tab_text (t, 1 + v, heading_rows + dv * n_cats + i, TAB_RIGHT | TAT_TITLE, ds_cstr (&str)); ds_destroy (&str); } } } for (grp = 0; grp < n_cats; ++grp) { int dv; struct per_cat_data *per_cat_data = categoricals_get_user_data_by_category_real (table->cats, iact_idx, grp); for (dv = 0; dv < table->n_dep_vars; ++dv) { const struct per_var_data *pvd = &per_cat_data->pvd[dv]; for (i = 0; i < cmd->n_cells; ++i) { const int csi = cmd->cells[i]; const struct cell_spec *cs = &cell_spec[csi]; double result = cs->sd (pvd, pvd->cell_stats[i]); tab_double (t, heading_columns + i, heading_rows + grp + dv * n_cats, 0, result, NULL, RC_OTHER); } } } tab_submit (t); } pspp-1.0.1/src/language/stats/oneway.c0000644000175000017500000012740413137223525014605 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include "data/case.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/value.h" #include "language/command.h" #include "language/dictionary/split-file.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "libpspp/ll.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/taint.h" #include "linreg/sweep.h" #include "tukey/tukey.h" #include "math/categoricals.h" #include "math/interaction.h" #include "math/covariance.h" #include "math/levene.h" #include "math/moments.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid /* Workspace variable for each dependent variable */ struct per_var_ws { struct interaction *iact; struct categoricals *cat; struct covariance *cov; struct levene *nl; double n; double sst; double sse; double ssa; int n_groups; double mse; }; /* Per category data */ struct descriptive_data { const struct variable *var; struct moments1 *mom; double minimum; double maximum; }; enum missing_type { MISS_LISTWISE, MISS_ANALYSIS, }; enum statistics { STATS_DESCRIPTIVES = 0x0001, STATS_HOMOGENEITY = 0x0002 }; struct coeff_node { struct ll ll; double coeff; }; struct contrasts_node { struct ll ll; struct ll_list coefficient_list; }; struct oneway_spec; typedef double df_func (const struct per_var_ws *pvw, const struct moments1 *mom_i, const struct moments1 *mom_j); typedef double ts_func (int k, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err); typedef double p1tail_func (double ts, double df1, double df2); typedef double pinv_func (double std_err, double alpha, double df, int k, const struct moments1 *mom_i, const struct moments1 *mom_j); struct posthoc { const char *syntax; const char *label; df_func *dff; ts_func *tsf; p1tail_func *p1f; pinv_func *pinv; }; struct oneway_spec { size_t n_vars; const struct variable **vars; const struct variable *indep_var; enum statistics stats; enum missing_type missing_type; enum mv_class exclude; /* List of contrasts */ struct ll_list contrast_list; /* The weight variable */ const struct variable *wv; /* The confidence level for multiple comparisons */ double alpha; int *posthoc; int n_posthoc; }; static double df_common (const struct per_var_ws *pvw, const struct moments1 *mom_i UNUSED, const struct moments1 *mom_j UNUSED) { return pvw->n - pvw->n_groups; } static double df_individual (const struct per_var_ws *pvw UNUSED, const struct moments1 *mom_i, const struct moments1 *mom_j) { double n_i, var_i; double n_j, var_j; double nom,denom; moments1_calculate (mom_i, &n_i, NULL, &var_i, 0, 0); moments1_calculate (mom_j, &n_j, NULL, &var_j, 0, 0); if ( n_i <= 1.0 || n_j <= 1.0) return SYSMIS; nom = pow2 (var_i/n_i + var_j/n_j); denom = pow2 (var_i/n_i) / (n_i - 1) + pow2 (var_j/n_j) / (n_j - 1); return nom / denom; } static double lsd_pinv (double std_err, double alpha, double df, int k UNUSED, const struct moments1 *mom_i UNUSED, const struct moments1 *mom_j UNUSED) { return std_err * gsl_cdf_tdist_Pinv (1.0 - alpha / 2.0, df); } static double bonferroni_pinv (double std_err, double alpha, double df, int k, const struct moments1 *mom_i UNUSED, const struct moments1 *mom_j UNUSED) { const int m = k * (k - 1) / 2; return std_err * gsl_cdf_tdist_Pinv (1.0 - alpha / (2.0 * m), df); } static double sidak_pinv (double std_err, double alpha, double df, int k, const struct moments1 *mom_i UNUSED, const struct moments1 *mom_j UNUSED) { const double m = k * (k - 1) / 2; double lp = 1.0 - exp (log (1.0 - alpha) / m ) ; return std_err * gsl_cdf_tdist_Pinv (1.0 - lp / 2.0, df); } static double tukey_pinv (double std_err, double alpha, double df, int k, const struct moments1 *mom_i UNUSED, const struct moments1 *mom_j UNUSED) { if ( k < 2 || df < 2) return SYSMIS; return std_err / sqrt (2.0) * qtukey (1 - alpha, 1.0, k, df, 1, 0); } static double scheffe_pinv (double std_err, double alpha, double df, int k, const struct moments1 *mom_i UNUSED, const struct moments1 *mom_j UNUSED) { double x = (k - 1) * gsl_cdf_fdist_Pinv (1.0 - alpha, k - 1, df); return std_err * sqrt (x); } static double gh_pinv (double std_err UNUSED, double alpha, double df, int k, const struct moments1 *mom_i, const struct moments1 *mom_j) { double n_i, mean_i, var_i; double n_j, mean_j, var_j; double m; moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0); moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0); m = sqrt ((var_i/n_i + var_j/n_j) / 2.0); if ( k < 2 || df < 2) return SYSMIS; return m * qtukey (1 - alpha, 1.0, k, df, 1, 0); } static double multiple_comparison_sig (double std_err, const struct per_var_ws *pvw, const struct descriptive_data *dd_i, const struct descriptive_data *dd_j, const struct posthoc *ph) { int k = pvw->n_groups; double df = ph->dff (pvw, dd_i->mom, dd_j->mom); double ts = ph->tsf (k, dd_i->mom, dd_j->mom, std_err); if ( df == SYSMIS) return SYSMIS; return ph->p1f (ts, k - 1, df); } static double mc_half_range (const struct oneway_spec *cmd, const struct per_var_ws *pvw, double std_err, const struct descriptive_data *dd_i, const struct descriptive_data *dd_j, const struct posthoc *ph) { int k = pvw->n_groups; double df = ph->dff (pvw, dd_i->mom, dd_j->mom); if ( df == SYSMIS) return SYSMIS; return ph->pinv (std_err, cmd->alpha, df, k, dd_i->mom, dd_j->mom); } static double tukey_1tailsig (double ts, double df1, double df2) { double twotailedsig; if (df2 < 2 || df1 < 1) return SYSMIS; twotailedsig = 1.0 - ptukey (ts, 1.0, df1 + 1, df2, 1, 0); return twotailedsig / 2.0; } static double lsd_1tailsig (double ts, double df1 UNUSED, double df2) { return ts < 0 ? gsl_cdf_tdist_P (ts, df2) : gsl_cdf_tdist_Q (ts, df2); } static double sidak_1tailsig (double ts, double df1, double df2) { double ex = (df1 + 1.0) * df1 / 2.0; double lsd_sig = 2 * lsd_1tailsig (ts, df1, df2); return 0.5 * (1.0 - pow (1.0 - lsd_sig, ex)); } static double bonferroni_1tailsig (double ts, double df1, double df2) { const int m = (df1 + 1) * df1 / 2; double p = ts < 0 ? gsl_cdf_tdist_P (ts, df2) : gsl_cdf_tdist_Q (ts, df2); p *= m; return p > 0.5 ? 0.5 : p; } static double scheffe_1tailsig (double ts, double df1, double df2) { return 0.5 * gsl_cdf_fdist_Q (ts, df1, df2); } static double tukey_test_stat (int k UNUSED, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err) { double ts; double n_i, mean_i, var_i; double n_j, mean_j, var_j; moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0); moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0); ts = (mean_i - mean_j) / std_err; ts = fabs (ts) * sqrt (2.0); return ts; } static double lsd_test_stat (int k UNUSED, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err) { double n_i, mean_i, var_i; double n_j, mean_j, var_j; moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0); moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0); return (mean_i - mean_j) / std_err; } static double scheffe_test_stat (int k, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err) { double t; double n_i, mean_i, var_i; double n_j, mean_j, var_j; moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0); moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0); t = (mean_i - mean_j) / std_err; t = pow2 (t); t /= k - 1; return t; } static double gh_test_stat (int k UNUSED, const struct moments1 *mom_i, const struct moments1 *mom_j, double std_err UNUSED) { double ts; double thing; double n_i, mean_i, var_i; double n_j, mean_j, var_j; moments1_calculate (mom_i, &n_i, &mean_i, &var_i, 0, 0); moments1_calculate (mom_j, &n_j, &mean_j, &var_j, 0, 0); thing = var_i / n_i + var_j / n_j; thing /= 2.0; thing = sqrt (thing); ts = (mean_i - mean_j) / thing; return fabs (ts); } static const struct posthoc ph_tests [] = { { "LSD", N_("LSD"), df_common, lsd_test_stat, lsd_1tailsig, lsd_pinv}, { "TUKEY", N_("Tukey HSD"), df_common, tukey_test_stat, tukey_1tailsig, tukey_pinv}, { "BONFERRONI", N_("Bonferroni"), df_common, lsd_test_stat, bonferroni_1tailsig, bonferroni_pinv}, { "SCHEFFE", N_("Scheffé"), df_common, scheffe_test_stat, scheffe_1tailsig, scheffe_pinv}, { "GH", N_("Games-Howell"), df_individual, gh_test_stat, tukey_1tailsig, gh_pinv}, { "SIDAK", N_("Šidák"), df_common, lsd_test_stat, sidak_1tailsig, sidak_pinv} }; struct oneway_workspace { /* The number of distinct values of the independent variable, when all missing values are disregarded */ int actual_number_of_groups; struct per_var_ws *vws; /* An array of descriptive data. One for each dependent variable */ struct descriptive_data **dd_total; }; /* Routines to show the output tables */ static void show_anova_table (const struct oneway_spec *, const struct oneway_workspace *); static void show_descriptives (const struct oneway_spec *, const struct oneway_workspace *); static void show_homogeneity (const struct oneway_spec *, const struct oneway_workspace *); static void output_oneway (const struct oneway_spec *, struct oneway_workspace *ws); static void run_oneway (const struct oneway_spec *cmd, struct casereader *input, const struct dataset *ds); static void destroy_coeff_list (struct contrasts_node *coeff_list) { struct coeff_node *cn = NULL; struct coeff_node *cnx = NULL; struct ll_list *cl = &coeff_list->coefficient_list; ll_for_each_safe (cn, cnx, struct coeff_node, ll, cl) { free (cn); } free (coeff_list); } static void oneway_cleanup (struct oneway_spec *cmd) { struct contrasts_node *coeff_list = NULL; struct contrasts_node *coeff_next = NULL; ll_for_each_safe (coeff_list, coeff_next, struct contrasts_node, ll, &cmd->contrast_list) { destroy_coeff_list (coeff_list); } free (cmd->posthoc); } int cmd_oneway (struct lexer *lexer, struct dataset *ds) { const struct dictionary *dict = dataset_dict (ds); struct oneway_spec oneway ; oneway.n_vars = 0; oneway.vars = NULL; oneway.indep_var = NULL; oneway.stats = 0; oneway.missing_type = MISS_ANALYSIS; oneway.exclude = MV_ANY; oneway.wv = dict_get_weight (dict); oneway.alpha = 0.05; oneway.posthoc = NULL; oneway.n_posthoc = 0; ll_init (&oneway.contrast_list); if ( lex_match (lexer, T_SLASH)) { if (!lex_force_match_id (lexer, "VARIABLES")) { goto error; } lex_match (lexer, T_EQUALS); } if (!parse_variables_const (lexer, dict, &oneway.vars, &oneway.n_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; if (!lex_force_match (lexer, T_BY)) goto error; oneway.indep_var = parse_variable_const (lexer, dict); if (oneway.indep_var == NULL) goto error; while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "STATISTICS")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "DESCRIPTIVES")) { oneway.stats |= STATS_DESCRIPTIVES; } else if (lex_match_id (lexer, "HOMOGENEITY")) { oneway.stats |= STATS_HOMOGENEITY; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "POSTHOC")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { int p; bool method = false; for (p = 0 ; p < sizeof (ph_tests) / sizeof (struct posthoc); ++p) { if (lex_match_id (lexer, ph_tests[p].syntax)) { oneway.n_posthoc++; oneway.posthoc = xrealloc (oneway.posthoc, sizeof (*oneway.posthoc) * oneway.n_posthoc); oneway.posthoc[oneway.n_posthoc - 1] = p; method = true; break; } } if ( method == false) { if (lex_match_id (lexer, "ALPHA")) { if ( !lex_force_match (lexer, T_LPAREN)) goto error; if (! lex_force_num (lexer)) goto error; oneway.alpha = lex_number (lexer); lex_get (lexer); if ( !lex_force_match (lexer, T_RPAREN)) goto error; } else { msg (SE, _("The post hoc analysis method %s is not supported."), lex_tokcstr (lexer)); lex_error (lexer, NULL); goto error; } } } } else if (lex_match_id (lexer, "CONTRAST")) { struct contrasts_node *cl = xzalloc (sizeof *cl); struct ll_list *coefficient_list = &cl->coefficient_list; lex_match (lexer, T_EQUALS); ll_init (coefficient_list); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if ( lex_is_number (lexer)) { struct coeff_node *cc = xmalloc (sizeof *cc); cc->coeff = lex_number (lexer); ll_push_tail (coefficient_list, &cc->ll); lex_get (lexer); } else { destroy_coeff_list (cl); lex_error (lexer, NULL); goto error; } } if ( ll_count (coefficient_list) <= 0) goto error; ll_push_tail (&oneway.contrast_list, &cl->ll); } else if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "INCLUDE")) { oneway.exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "EXCLUDE")) { oneway.exclude = MV_ANY; } else if (lex_match_id (lexer, "LISTWISE")) { oneway.missing_type = MISS_LISTWISE; } else if (lex_match_id (lexer, "ANALYSIS")) { oneway.missing_type = MISS_ANALYSIS; } else { lex_error (lexer, NULL); goto error; } } } else { lex_error (lexer, NULL); goto error; } } { struct casegrouper *grouper; struct casereader *group; bool ok; grouper = casegrouper_create_splits (proc_open (ds), dict); while (casegrouper_get_next_group (grouper, &group)) run_oneway (&oneway, group, ds); ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; } oneway_cleanup (&oneway); free (oneway.vars); return CMD_SUCCESS; error: oneway_cleanup (&oneway); free (oneway.vars); return CMD_FAILURE; } static struct descriptive_data * dd_create (const struct variable *var) { struct descriptive_data *dd = xmalloc (sizeof *dd); dd->mom = moments1_create (MOMENT_VARIANCE); dd->minimum = DBL_MAX; dd->maximum = -DBL_MAX; dd->var = var; return dd; } static void dd_destroy (struct descriptive_data *dd) { moments1_destroy (dd->mom); free (dd); } static void * makeit (const void *aux1, void *aux2 UNUSED) { const struct variable *var = aux1; struct descriptive_data *dd = dd_create (var); return dd; } static void killit (const void *aux1 UNUSED, void *aux2 UNUSED, void *user_data) { struct descriptive_data *dd = user_data; dd_destroy (dd); } static void updateit (const void *aux1, void *aux2, void *user_data, const struct ccase *c, double weight) { struct descriptive_data *dd = user_data; const struct variable *varp = aux1; const union value *valx = case_data (c, varp); struct descriptive_data *dd_total = aux2; moments1_add (dd->mom, valx->f, weight); if (valx->f < dd->minimum) dd->minimum = valx->f; if (valx->f > dd->maximum) dd->maximum = valx->f; { const struct variable *var = dd_total->var; const union value *val = case_data (c, var); moments1_add (dd_total->mom, val->f, weight); if (val->f < dd_total->minimum) dd_total->minimum = val->f; if (val->f > dd_total->maximum) dd_total->maximum = val->f; } } static void run_oneway (const struct oneway_spec *cmd, struct casereader *input, const struct dataset *ds) { int v; struct taint *taint; struct dictionary *dict = dataset_dict (ds); struct casereader *reader; struct ccase *c; struct oneway_workspace ws; ws.actual_number_of_groups = 0; ws.vws = xzalloc (cmd->n_vars * sizeof (*ws.vws)); ws.dd_total = xmalloc (sizeof (struct descriptive_data) * cmd->n_vars); for (v = 0 ; v < cmd->n_vars; ++v) ws.dd_total[v] = dd_create (cmd->vars[v]); for (v = 0; v < cmd->n_vars; ++v) { struct payload payload; payload.create = makeit; payload.update = updateit; payload.calculate = NULL; payload.destroy = killit; ws.vws[v].iact = interaction_create (cmd->indep_var); ws.vws[v].cat = categoricals_create (&ws.vws[v].iact, 1, cmd->wv, cmd->exclude, cmd->exclude); categoricals_set_payload (ws.vws[v].cat, &payload, CONST_CAST (struct variable *, cmd->vars[v]), ws.dd_total[v]); ws.vws[v].cov = covariance_2pass_create (1, &cmd->vars[v], ws.vws[v].cat, cmd->wv, cmd->exclude, true); ws.vws[v].nl = levene_create (var_get_width (cmd->indep_var), NULL); } c = casereader_peek (input, 0); if (c == NULL) { casereader_destroy (input); goto finish; } output_split_file_values (ds, c); case_unref (c); taint = taint_clone (casereader_get_taint (input)); input = casereader_create_filter_missing (input, &cmd->indep_var, 1, cmd->exclude, NULL, NULL); if (cmd->missing_type == MISS_LISTWISE) input = casereader_create_filter_missing (input, cmd->vars, cmd->n_vars, cmd->exclude, NULL, NULL); input = casereader_create_filter_weight (input, dict, NULL, NULL); reader = casereader_clone (input); for (; (c = casereader_read (reader)) != NULL; case_unref (c)) { int i; double w = dict_get_case_weight (dict, c, NULL); for (i = 0; i < cmd->n_vars; ++i) { struct per_var_ws *pvw = &ws.vws[i]; const struct variable *v = cmd->vars[i]; const union value *val = case_data (c, v); if ( MISS_ANALYSIS == cmd->missing_type) { if ( var_is_value_missing (v, val, cmd->exclude)) continue; } covariance_accumulate_pass1 (pvw->cov, c); levene_pass_one (pvw->nl, val->f, w, case_data (c, cmd->indep_var)); } } casereader_destroy (reader); reader = casereader_clone (input); for ( ; (c = casereader_read (reader) ); case_unref (c)) { int i; double w = dict_get_case_weight (dict, c, NULL); for (i = 0; i < cmd->n_vars; ++i) { struct per_var_ws *pvw = &ws.vws[i]; const struct variable *v = cmd->vars[i]; const union value *val = case_data (c, v); if ( MISS_ANALYSIS == cmd->missing_type) { if ( var_is_value_missing (v, val, cmd->exclude)) continue; } covariance_accumulate_pass2 (pvw->cov, c); levene_pass_two (pvw->nl, val->f, w, case_data (c, cmd->indep_var)); } } casereader_destroy (reader); reader = casereader_clone (input); for ( ; (c = casereader_read (reader) ); case_unref (c)) { int i; double w = dict_get_case_weight (dict, c, NULL); for (i = 0; i < cmd->n_vars; ++i) { struct per_var_ws *pvw = &ws.vws[i]; const struct variable *v = cmd->vars[i]; const union value *val = case_data (c, v); if ( MISS_ANALYSIS == cmd->missing_type) { if ( var_is_value_missing (v, val, cmd->exclude)) continue; } levene_pass_three (pvw->nl, val->f, w, case_data (c, cmd->indep_var)); } } casereader_destroy (reader); for (v = 0; v < cmd->n_vars; ++v) { const gsl_matrix *ucm; gsl_matrix *cm; struct per_var_ws *pvw = &ws.vws[v]; const struct categoricals *cats = covariance_get_categoricals (pvw->cov); const bool ok = categoricals_sane (cats); if ( ! ok) { msg (MW, _("Dependent variable %s has no non-missing values. No analysis for this variable will be done."), var_get_name (cmd->vars[v])); continue; } ucm = covariance_calculate_unnormalized (pvw->cov); cm = gsl_matrix_alloc (ucm->size1, ucm->size2); gsl_matrix_memcpy (cm, ucm); moments1_calculate (ws.dd_total[v]->mom, &pvw->n, NULL, NULL, NULL, NULL); pvw->sst = gsl_matrix_get (cm, 0, 0); reg_sweep (cm, 0); pvw->sse = gsl_matrix_get (cm, 0, 0); gsl_matrix_free (cm); pvw->ssa = pvw->sst - pvw->sse; pvw->n_groups = categoricals_n_total (cats); pvw->mse = (pvw->sst - pvw->ssa) / (pvw->n - pvw->n_groups); } for (v = 0; v < cmd->n_vars; ++v) { const struct categoricals *cats = covariance_get_categoricals (ws.vws[v].cov); if ( ! categoricals_is_complete (cats)) { continue; } if (categoricals_n_total (cats) > ws.actual_number_of_groups) ws.actual_number_of_groups = categoricals_n_total (cats); } casereader_destroy (input); if (!taint_has_tainted_successor (taint)) output_oneway (cmd, &ws); taint_destroy (taint); finish: for (v = 0; v < cmd->n_vars; ++v) { covariance_destroy (ws.vws[v].cov); levene_destroy (ws.vws[v].nl); dd_destroy (ws.dd_total[v]); interaction_destroy (ws.vws[v].iact); } free (ws.vws); free (ws.dd_total); } static void show_contrast_coeffs (const struct oneway_spec *cmd, const struct oneway_workspace *ws); static void show_contrast_tests (const struct oneway_spec *cmd, const struct oneway_workspace *ws); static void show_comparisons (const struct oneway_spec *cmd, const struct oneway_workspace *ws, int depvar); static void output_oneway (const struct oneway_spec *cmd, struct oneway_workspace *ws) { size_t i = 0; /* Check the sanity of the given contrast values */ struct contrasts_node *coeff_list = NULL; struct contrasts_node *coeff_next = NULL; ll_for_each_safe (coeff_list, coeff_next, struct contrasts_node, ll, &cmd->contrast_list) { struct coeff_node *cn = NULL; double sum = 0; struct ll_list *cl = &coeff_list->coefficient_list; ++i; if (ll_count (cl) != ws->actual_number_of_groups) { msg (SW, _("In contrast list %zu, the number of coefficients (%zu) does not equal the number of groups (%d). This contrast list will be ignored."), i, ll_count (cl), ws->actual_number_of_groups); ll_remove (&coeff_list->ll); destroy_coeff_list (coeff_list); continue; } ll_for_each (cn, struct coeff_node, ll, cl) sum += cn->coeff; if ( sum != 0.0 ) msg (SW, _("Coefficients for contrast %zu do not total zero"), i); } if (cmd->stats & STATS_DESCRIPTIVES) show_descriptives (cmd, ws); if (cmd->stats & STATS_HOMOGENEITY) show_homogeneity (cmd, ws); show_anova_table (cmd, ws); if (ll_count (&cmd->contrast_list) > 0) { show_contrast_coeffs (cmd, ws); show_contrast_tests (cmd, ws); } if ( cmd->posthoc ) { int v; for (v = 0 ; v < cmd->n_vars; ++v) { const struct categoricals *cats = covariance_get_categoricals (ws->vws[v].cov); if ( categoricals_is_complete (cats)) show_comparisons (cmd, ws, v); } } } /* Show the ANOVA table */ static void show_anova_table (const struct oneway_spec *cmd, const struct oneway_workspace *ws) { size_t i; int n_cols =7; size_t n_rows = cmd->n_vars * 3 + 1; struct tab_table *t = tab_create (n_cols, n_rows); tab_headers (t, 2, 0, 1, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (t, TAL_2, 0, n_cols - 1, 1 ); tab_vline (t, TAL_2, 2, 0, n_rows - 1); tab_vline (t, TAL_0, 1, 0, 0); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Sum of Squares")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("df")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Mean Square")); tab_text (t, 5, 0, TAB_CENTER | TAT_TITLE, _("F")); tab_text (t, 6, 0, TAB_CENTER | TAT_TITLE, _("Sig.")); for (i = 0; i < cmd->n_vars; ++i) { double n; double df1, df2; double msa; const char *s = var_to_string (cmd->vars[i]); const struct per_var_ws *pvw = &ws->vws[i]; moments1_calculate (ws->dd_total[i]->mom, &n, NULL, NULL, NULL, NULL); df1 = pvw->n_groups - 1; df2 = n - pvw->n_groups; msa = pvw->ssa / df1; tab_text (t, 0, i * 3 + 1, TAB_LEFT | TAT_TITLE, s); tab_text (t, 1, i * 3 + 1, TAB_LEFT | TAT_TITLE, _("Between Groups")); tab_text (t, 1, i * 3 + 2, TAB_LEFT | TAT_TITLE, _("Within Groups")); tab_text (t, 1, i * 3 + 3, TAB_LEFT | TAT_TITLE, _("Total")); if (i > 0) tab_hline (t, TAL_1, 0, n_cols - 1, i * 3 + 1); /* Sums of Squares */ tab_double (t, 2, i * 3 + 1, 0, pvw->ssa, NULL, RC_OTHER); tab_double (t, 2, i * 3 + 3, 0, pvw->sst, NULL, RC_OTHER); tab_double (t, 2, i * 3 + 2, 0, pvw->sse, NULL, RC_OTHER); /* Degrees of freedom */ tab_double (t, 3, i * 3 + 1, 0, df1, NULL, RC_INTEGER); tab_double (t, 3, i * 3 + 2, 0, df2, NULL, RC_INTEGER); tab_double (t, 3, i * 3 + 3, 0, n - 1, NULL, RC_INTEGER); /* Mean Squares */ tab_double (t, 4, i * 3 + 1, TAB_RIGHT, msa, NULL, RC_OTHER); tab_double (t, 4, i * 3 + 2, TAB_RIGHT, pvw->mse, NULL, RC_OTHER); { const double F = msa / pvw->mse ; /* The F value */ tab_double (t, 5, i * 3 + 1, 0, F, NULL, RC_OTHER); /* The significance */ tab_double (t, 6, i * 3 + 1, 0, gsl_cdf_fdist_Q (F, df1, df2), NULL, RC_PVALUE); } } tab_title (t, _("ANOVA")); tab_submit (t); } /* Show the descriptives table */ static void show_descriptives (const struct oneway_spec *cmd, const struct oneway_workspace *ws) { size_t v; int n_cols = 10; struct tab_table *t; int row; const double confidence = 0.95; const double q = (1.0 - confidence) / 2.0; const struct fmt_spec *wfmt = cmd->wv ? var_get_print_format (cmd->wv) : &F_8_0; int n_rows = 2; for (v = 0; v < cmd->n_vars; ++v) n_rows += ws->actual_number_of_groups + 1; t = tab_create (n_cols, n_rows); tab_set_format (t, RC_WEIGHT, wfmt); tab_headers (t, 2, 0, 2, 0); /* Put a frame around the entire box, and vertical lines inside */ tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); /* Underline headers */ tab_hline (t, TAL_2, 0, n_cols - 1, 2); tab_vline (t, TAL_2, 2, 0, n_rows - 1); tab_text (t, 2, 1, TAB_CENTER | TAT_TITLE, _("N")); tab_text (t, 3, 1, TAB_CENTER | TAT_TITLE, _("Mean")); tab_text (t, 4, 1, TAB_CENTER | TAT_TITLE, _("Std. Deviation")); tab_text (t, 5, 1, TAB_CENTER | TAT_TITLE, _("Std. Error")); tab_vline (t, TAL_0, 7, 0, 0); tab_hline (t, TAL_1, 6, 7, 1); tab_joint_text_format (t, 6, 0, 7, 0, TAB_CENTER | TAT_TITLE, _("%g%% Confidence Interval for Mean"), confidence*100.0); tab_text (t, 6, 1, TAB_CENTER | TAT_TITLE, _("Lower Bound")); tab_text (t, 7, 1, TAB_CENTER | TAT_TITLE, _("Upper Bound")); tab_text (t, 8, 1, TAB_CENTER | TAT_TITLE, _("Minimum")); tab_text (t, 9, 1, TAB_CENTER | TAT_TITLE, _("Maximum")); tab_title (t, _("Descriptives")); row = 2; for (v = 0; v < cmd->n_vars; ++v) { const char *s = var_to_string (cmd->vars[v]); const struct fmt_spec *fmt = var_get_print_format (cmd->vars[v]); int count = 0; struct per_var_ws *pvw = &ws->vws[v]; const struct categoricals *cats = covariance_get_categoricals (pvw->cov); tab_text (t, 0, row, TAB_LEFT | TAT_TITLE, s); if ( v > 0) tab_hline (t, TAL_1, 0, n_cols - 1, row); for (count = 0; count < categoricals_n_total (cats); ++count) { double T; double n, mean, variance; double std_dev, std_error ; struct string vstr; const struct ccase *gcc = categoricals_get_case_by_category (cats, count); const struct descriptive_data *dd = categoricals_get_user_data_by_category (cats, count); moments1_calculate (dd->mom, &n, &mean, &variance, NULL, NULL); std_dev = sqrt (variance); std_error = std_dev / sqrt (n) ; ds_init_empty (&vstr); var_append_value_name (cmd->indep_var, case_data (gcc, cmd->indep_var), &vstr); tab_text (t, 1, row + count, TAB_LEFT | TAT_TITLE, ds_cstr (&vstr)); ds_destroy (&vstr); /* Now fill in the numbers ... */ tab_double (t, 2, row + count, 0, n, NULL, RC_WEIGHT); tab_double (t, 3, row + count, 0, mean, NULL, RC_OTHER); tab_double (t, 4, row + count, 0, std_dev, NULL, RC_OTHER); tab_double (t, 5, row + count, 0, std_error, NULL, RC_OTHER); /* Now the confidence interval */ T = gsl_cdf_tdist_Qinv (q, n - 1); tab_double (t, 6, row + count, 0, mean - T * std_error, NULL, RC_OTHER); tab_double (t, 7, row + count, 0, mean + T * std_error, NULL, RC_OTHER); /* Min and Max */ tab_double (t, 8, row + count, 0, dd->minimum, fmt, RC_OTHER); tab_double (t, 9, row + count, 0, dd->maximum, fmt, RC_OTHER); } if (categoricals_is_complete (cats)) { double T; double n, mean, variance; double std_dev; double std_error; moments1_calculate (ws->dd_total[v]->mom, &n, &mean, &variance, NULL, NULL); std_dev = sqrt (variance); std_error = std_dev / sqrt (n) ; tab_text (t, 1, row + count, TAB_LEFT | TAT_TITLE, _("Total")); tab_double (t, 2, row + count, 0, n, NULL, RC_WEIGHT); tab_double (t, 3, row + count, 0, mean, NULL, RC_OTHER); tab_double (t, 4, row + count, 0, std_dev, NULL, RC_OTHER); tab_double (t, 5, row + count, 0, std_error, NULL, RC_OTHER); /* Now the confidence interval */ T = gsl_cdf_tdist_Qinv (q, n - 1); tab_double (t, 6, row + count, 0, mean - T * std_error, NULL, RC_OTHER); tab_double (t, 7, row + count, 0, mean + T * std_error, NULL, RC_OTHER); /* Min and Max */ tab_double (t, 8, row + count, 0, ws->dd_total[v]->minimum, fmt, RC_OTHER); tab_double (t, 9, row + count, 0, ws->dd_total[v]->maximum, fmt, RC_OTHER); } row += categoricals_n_total (cats) + 1; } tab_submit (t); } /* Show the homogeneity table */ static void show_homogeneity (const struct oneway_spec *cmd, const struct oneway_workspace *ws) { size_t v; int n_cols = 5; size_t n_rows = cmd->n_vars + 1; struct tab_table *t = tab_create (n_cols, n_rows); tab_headers (t, 1, 0, 1, 0); /* Put a frame around the entire box, and vertical lines inside */ tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_hline (t, TAL_2, 0, n_cols - 1, 1); tab_vline (t, TAL_2, 1, 0, n_rows - 1); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Levene Statistic")); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("df1")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("df2")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Sig.")); tab_title (t, _("Test of Homogeneity of Variances")); for (v = 0; v < cmd->n_vars; ++v) { double n; const struct per_var_ws *pvw = &ws->vws[v]; double F = levene_calculate (pvw->nl); const struct variable *var = cmd->vars[v]; const char *s = var_to_string (var); double df1, df2; moments1_calculate (ws->dd_total[v]->mom, &n, NULL, NULL, NULL, NULL); df1 = pvw->n_groups - 1; df2 = n - pvw->n_groups; tab_text (t, 0, v + 1, TAB_LEFT | TAT_TITLE, s); tab_double (t, 1, v + 1, TAB_RIGHT, F, NULL, RC_OTHER); tab_double (t, 2, v + 1, TAB_RIGHT, df1, NULL, RC_INTEGER); tab_double (t, 3, v + 1, TAB_RIGHT, df2, NULL, RC_INTEGER); /* Now the significance */ tab_double (t, 4, v + 1, TAB_RIGHT, gsl_cdf_fdist_Q (F, df1, df2), NULL, RC_PVALUE); } tab_submit (t); } /* Show the contrast coefficients table */ static void show_contrast_coeffs (const struct oneway_spec *cmd, const struct oneway_workspace *ws) { int c_num = 0; struct ll *cli; int n_contrasts = ll_count (&cmd->contrast_list); int n_cols = 2 + ws->actual_number_of_groups; int n_rows = 2 + n_contrasts; struct tab_table *t; const struct covariance *cov = ws->vws[0].cov ; t = tab_create (n_cols, n_rows); tab_headers (t, 2, 0, 2, 0); /* Put a frame around the entire box, and vertical lines inside */ tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_box (t, -1, -1, TAL_0, TAL_0, 2, 0, n_cols - 1, 0); tab_box (t, -1, -1, TAL_0, TAL_0, 0, 0, 1, 1); tab_hline (t, TAL_1, 2, n_cols - 1, 1); tab_hline (t, TAL_2, 0, n_cols - 1, 2); tab_vline (t, TAL_2, 2, 0, n_rows - 1); tab_title (t, _("Contrast Coefficients")); tab_text (t, 0, 2, TAB_LEFT | TAT_TITLE, _("Contrast")); tab_joint_text (t, 2, 0, n_cols - 1, 0, TAB_CENTER | TAT_TITLE, var_to_string (cmd->indep_var)); for ( cli = ll_head (&cmd->contrast_list); cli != ll_null (&cmd->contrast_list); cli = ll_next (cli)) { int count = 0; struct contrasts_node *cn = ll_data (cli, struct contrasts_node, ll); struct ll *coeffi ; tab_text_format (t, 1, c_num + 2, TAB_CENTER, "%d", c_num + 1); for (coeffi = ll_head (&cn->coefficient_list); coeffi != ll_null (&cn->coefficient_list); ++count, coeffi = ll_next (coeffi)) { const struct categoricals *cats = covariance_get_categoricals (cov); const struct ccase *gcc = categoricals_get_case_by_category (cats, count); struct coeff_node *coeffn = ll_data (coeffi, struct coeff_node, ll); struct string vstr; ds_init_empty (&vstr); var_append_value_name (cmd->indep_var, case_data (gcc, cmd->indep_var), &vstr); tab_text (t, count + 2, 1, TAB_CENTER | TAT_TITLE, ds_cstr (&vstr)); ds_destroy (&vstr); tab_text_format (t, count + 2, c_num + 2, TAB_RIGHT, "%.*g", DBL_DIG + 1, coeffn->coeff); } ++c_num; } tab_submit (t); } /* Show the results of the contrast tests */ static void show_contrast_tests (const struct oneway_spec *cmd, const struct oneway_workspace *ws) { int n_contrasts = ll_count (&cmd->contrast_list); size_t v; int n_cols = 8; size_t n_rows = 1 + cmd->n_vars * 2 * n_contrasts; struct tab_table *t; t = tab_create (n_cols, n_rows); tab_headers (t, 3, 0, 1, 0); /* Put a frame around the entire box, and vertical lines inside */ tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1); tab_box (t, -1, -1, TAL_0, TAL_0, 0, 0, 2, 0); tab_hline (t, TAL_2, 0, n_cols - 1, 1); tab_vline (t, TAL_2, 3, 0, n_rows - 1); tab_title (t, _("Contrast Tests")); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Contrast")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Value of Contrast")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("Std. Error")); tab_text (t, 5, 0, TAB_CENTER | TAT_TITLE, _("t")); tab_text (t, 6, 0, TAB_CENTER | TAT_TITLE, _("df")); tab_text (t, 7, 0, TAB_CENTER | TAT_TITLE, _("Sig. (2-tailed)")); for (v = 0; v < cmd->n_vars; ++v) { const struct per_var_ws *pvw = &ws->vws[v]; const struct categoricals *cats = covariance_get_categoricals (pvw->cov); if (!categoricals_is_complete (cats)) continue; struct ll *cli; int i = 0; int lines_per_variable = 2 * n_contrasts; tab_text (t, 0, (v * lines_per_variable) + 1, TAB_LEFT | TAT_TITLE, var_to_string (cmd->vars[v])); for ( cli = ll_head (&cmd->contrast_list); cli != ll_null (&cmd->contrast_list); ++i, cli = ll_next (cli)) { struct contrasts_node *cn = ll_data (cli, struct contrasts_node, ll); struct ll *coeffi ; int ci = 0; double contrast_value = 0.0; double coef_msq = 0.0; double T; double std_error_contrast; double df; double sec_vneq = 0.0; /* Note: The calculation of the degrees of freedom in the "variances not equal" case is painfull!! The following formula may help to understand it: \frac{\left (\sum_{i=1}^k{c_i^2\frac{s_i^2}{n_i}}\right)^2} { \sum_{i=1}^k\left ( \frac{\left (c_i^2\frac{s_i^2}{n_i}\right)^2} {n_i-1} \right) } */ double df_denominator = 0.0; double df_numerator = 0.0; double grand_n; moments1_calculate (ws->dd_total[v]->mom, &grand_n, NULL, NULL, NULL, NULL); df = grand_n - pvw->n_groups; if ( i == 0 ) { tab_text (t, 1, (v * lines_per_variable) + i + 1, TAB_LEFT | TAT_TITLE, _("Assume equal variances")); tab_text (t, 1, (v * lines_per_variable) + i + 1 + n_contrasts, TAB_LEFT | TAT_TITLE, _("Does not assume equal")); } tab_text_format (t, 2, (v * lines_per_variable) + i + 1, TAB_CENTER | TAT_TITLE, "%d", i + 1); tab_text_format (t, 2, (v * lines_per_variable) + i + 1 + n_contrasts, TAB_CENTER | TAT_TITLE, "%d", i + 1); for (coeffi = ll_head (&cn->coefficient_list); coeffi != ll_null (&cn->coefficient_list); ++ci, coeffi = ll_next (coeffi)) { double n, mean, variance; const struct descriptive_data *dd = categoricals_get_user_data_by_category (cats, ci); struct coeff_node *cn = ll_data (coeffi, struct coeff_node, ll); const double coef = cn->coeff; double winv ; moments1_calculate (dd->mom, &n, &mean, &variance, NULL, NULL); winv = variance / n; contrast_value += coef * mean; coef_msq += (pow2 (coef)) / n; sec_vneq += (pow2 (coef)) * variance / n; df_numerator += (pow2 (coef)) * winv; df_denominator += pow2((pow2 (coef)) * winv) / (n - 1); } sec_vneq = sqrt (sec_vneq); df_numerator = pow2 (df_numerator); tab_double (t, 3, (v * lines_per_variable) + i + 1, TAB_RIGHT, contrast_value, NULL, RC_OTHER); tab_double (t, 3, (v * lines_per_variable) + i + 1 + n_contrasts, TAB_RIGHT, contrast_value, NULL, RC_OTHER); std_error_contrast = sqrt (pvw->mse * coef_msq); /* Std. Error */ tab_double (t, 4, (v * lines_per_variable) + i + 1, TAB_RIGHT, std_error_contrast, NULL, RC_OTHER); T = fabs (contrast_value / std_error_contrast); /* T Statistic */ tab_double (t, 5, (v * lines_per_variable) + i + 1, TAB_RIGHT, T, NULL, RC_OTHER); /* Degrees of Freedom */ tab_double (t, 6, (v * lines_per_variable) + i + 1, TAB_RIGHT, df, NULL, RC_INTEGER); /* Significance TWO TAILED !!*/ tab_double (t, 7, (v * lines_per_variable) + i + 1, TAB_RIGHT, 2 * gsl_cdf_tdist_Q (T, df), NULL, RC_PVALUE); /* Now for the Variances NOT Equal case */ /* Std. Error */ tab_double (t, 4, (v * lines_per_variable) + i + 1 + n_contrasts, TAB_RIGHT, sec_vneq, NULL, RC_OTHER); T = contrast_value / sec_vneq; tab_double (t, 5, (v * lines_per_variable) + i + 1 + n_contrasts, TAB_RIGHT, T, NULL, RC_OTHER); df = df_numerator / df_denominator; tab_double (t, 6, (v * lines_per_variable) + i + 1 + n_contrasts, TAB_RIGHT, df, NULL, RC_OTHER); { double p = gsl_cdf_tdist_P (T, df); double q = gsl_cdf_tdist_Q (T, df); /* The Significance */ tab_double (t, 7, (v * lines_per_variable) + i + 1 + n_contrasts, TAB_RIGHT, 2 * ((T > 0) ? q : p), NULL, RC_PVALUE); } } if ( v > 0 ) tab_hline (t, TAL_1, 0, n_cols - 1, (v * lines_per_variable) + 1); } tab_submit (t); } static void show_comparisons (const struct oneway_spec *cmd, const struct oneway_workspace *ws, int v) { const int n_cols = 8; const int heading_rows = 2; const int heading_cols = 3; int p; int r = heading_rows ; const struct per_var_ws *pvw = &ws->vws[v]; const struct categoricals *cat = pvw->cat; const int n_rows = heading_rows + cmd->n_posthoc * pvw->n_groups * (pvw->n_groups - 1); struct tab_table *t = tab_create (n_cols, n_rows); tab_headers (t, heading_cols, 0, heading_rows, 0); /* Put a frame around the entire box, and vertical lines inside */ tab_box (t, TAL_2, TAL_2, -1, -1, 0, 0, n_cols - 1, n_rows - 1); tab_box (t, -1, -1, -1, TAL_1, heading_cols, 0, n_cols - 1, n_rows - 1); tab_vline (t, TAL_2, heading_cols, 0, n_rows - 1); tab_title (t, _("Multiple Comparisons (%s)"), var_to_string (cmd->vars[v])); tab_text_format (t, 1, 1, TAB_LEFT | TAT_TITLE, _("(I) %s"), var_to_string (cmd->indep_var)); tab_text_format (t, 2, 1, TAB_LEFT | TAT_TITLE, _("(J) %s"), var_to_string (cmd->indep_var)); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Mean Difference")); tab_text (t, 3, 1, TAB_CENTER | TAT_TITLE, _("(I - J)")); tab_text (t, 4, 1, TAB_CENTER | TAT_TITLE, _("Std. Error")); tab_text (t, 5, 1, TAB_CENTER | TAT_TITLE, _("Sig.")); tab_joint_text_format (t, 6, 0, 7, 0, TAB_CENTER | TAT_TITLE, _("%g%% Confidence Interval"), (1 - cmd->alpha) * 100.0); tab_text (t, 6, 1, TAB_CENTER | TAT_TITLE, _("Lower Bound")); tab_text (t, 7, 1, TAB_CENTER | TAT_TITLE, _("Upper Bound")); for (p = 0; p < cmd->n_posthoc; ++p) { int i; const struct posthoc *ph = &ph_tests[cmd->posthoc[p]]; tab_hline (t, TAL_2, 0, n_cols - 1, r); tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, gettext (ph->label)); for (i = 0; i < pvw->n_groups ; ++i) { double weight_i, mean_i, var_i; int rx = 0; struct string vstr; int j; struct descriptive_data *dd_i = categoricals_get_user_data_by_category (cat, i); const struct ccase *gcc = categoricals_get_case_by_category (cat, i); ds_init_empty (&vstr); var_append_value_name (cmd->indep_var, case_data (gcc, cmd->indep_var), &vstr); if ( i != 0) tab_hline (t, TAL_1, 1, n_cols - 1, r); tab_text (t, 1, r, TAB_LEFT | TAT_TITLE, ds_cstr (&vstr)); moments1_calculate (dd_i->mom, &weight_i, &mean_i, &var_i, 0, 0); for (j = 0 ; j < pvw->n_groups; ++j) { double std_err; double weight_j, mean_j, var_j; double half_range; const struct ccase *cc; struct descriptive_data *dd_j = categoricals_get_user_data_by_category (cat, j); if (j == i) continue; ds_clear (&vstr); cc = categoricals_get_case_by_category (cat, j); var_append_value_name (cmd->indep_var, case_data (cc, cmd->indep_var), &vstr); tab_text (t, 2, r + rx, TAB_LEFT | TAT_TITLE, ds_cstr (&vstr)); moments1_calculate (dd_j->mom, &weight_j, &mean_j, &var_j, 0, 0); tab_double (t, 3, r + rx, 0, mean_i - mean_j, NULL, RC_OTHER); std_err = pvw->mse; std_err *= weight_i + weight_j; std_err /= weight_i * weight_j; std_err = sqrt (std_err); tab_double (t, 4, r + rx, 0, std_err, NULL, RC_OTHER); tab_double (t, 5, r + rx, 0, 2 * multiple_comparison_sig (std_err, pvw, dd_i, dd_j, ph), NULL, RC_PVALUE); half_range = mc_half_range (cmd, pvw, std_err, dd_i, dd_j, ph); tab_double (t, 6, r + rx, 0, (mean_i - mean_j) - half_range, NULL, RC_OTHER); tab_double (t, 7, r + rx, 0, (mean_i - mean_j) + half_range, NULL, RC_OTHER); rx++; } ds_destroy (&vstr); r += pvw->n_groups - 1; } } tab_submit (t); } pspp-1.0.1/src/language/stats/t-test-one-sample.c0000644000175000017500000001724312523704223016555 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "t-test.h" #include #include #include "data/variable.h" #include "data/format.h" #include "data/casereader.h" #include "data/dictionary.h" #include "libpspp/hash-functions.h" #include "libpspp/hmapx.h" #include "math/moments.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct per_var_stats { const struct variable *var; /* The position for reporting purposes */ int posn; /* N, Mean, Variance */ struct moments *mom; /* Sum of the differences */ double sum_diff; }; struct one_samp { struct hmapx hmap; double testval; }; static void one_sample_test (const struct tt *tt, const struct one_samp *os) { struct hmapx_node *node; struct per_var_stats *per_var_stats; const int heading_rows = 3; const size_t rows = heading_rows + tt->n_vars; const size_t cols = 7; const struct fmt_spec *wfmt = tt->wv ? var_get_print_format (tt->wv) : & F_8_0; struct tab_table *t = tab_create (cols, rows); tab_set_format (t, RC_WEIGHT, wfmt); tab_headers (t, 0, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, TAL_0, TAL_0, 0, 0, cols - 1, rows - 1); tab_hline (t, TAL_2, 0, cols - 1, 3); tab_title (t, _("One-Sample Test")); tab_hline (t, TAL_1, 1, cols - 1, 1); tab_vline (t, TAL_2, 1, 0, rows - 1); tab_joint_text_format (t, 1, 0, cols - 1, 0, TAB_CENTER, _("Test Value = %f"), os->testval); tab_box (t, -1, -1, -1, TAL_1, 1, 1, cols - 1, rows - 1); tab_joint_text_format (t, 5, 1, 6, 1, TAB_CENTER, _("%g%% Confidence Interval of the Difference"), tt->confidence * 100.0); tab_vline (t, TAL_GAP, 6, 1, 1); tab_hline (t, TAL_1, 5, 6, 2); tab_text (t, 1, 2, TAB_CENTER | TAT_TITLE, _("t")); tab_text (t, 2, 2, TAB_CENTER | TAT_TITLE, _("df")); tab_text (t, 3, 2, TAB_CENTER | TAT_TITLE, _("Sig. (2-tailed)")); tab_text (t, 4, 2, TAB_CENTER | TAT_TITLE, _("Mean Difference")); tab_text (t, 5, 2, TAB_CENTER | TAT_TITLE, _("Lower")); tab_text (t, 6, 2, TAB_CENTER | TAT_TITLE, _("Upper")); HMAPX_FOR_EACH (per_var_stats, node, &os->hmap) { const struct moments *m = per_var_stats->mom; double cc, mean, sigma; double tval, df; double p, q; double mean_diff; double se_mean ; const int v = per_var_stats->posn; moments_calculate (m, &cc, &mean, &sigma, NULL, NULL); tval = (mean - os->testval) * sqrt (cc / sigma); mean_diff = per_var_stats->sum_diff / cc; se_mean = sqrt (sigma / cc); df = cc - 1.0; p = gsl_cdf_tdist_P (tval, df); q = gsl_cdf_tdist_Q (tval, df); tab_text (t, 0, v + heading_rows, TAB_LEFT, var_to_string (per_var_stats->var)); tab_double (t, 1, v + heading_rows, TAB_RIGHT, tval, NULL, RC_OTHER); tab_double (t, 2, v + heading_rows, TAB_RIGHT, df, NULL, RC_WEIGHT); /* Multiply by 2 to get 2-tailed significance, makeing sure we've got the correct tail*/ tab_double (t, 3, v + heading_rows, TAB_RIGHT, 2.0 * (tval > 0 ? q : p), NULL, RC_PVALUE); tab_double (t, 4, v + heading_rows, TAB_RIGHT, mean_diff, NULL, RC_OTHER); tval = gsl_cdf_tdist_Qinv ( (1.0 - tt->confidence) / 2.0, df); tab_double (t, 5, v + heading_rows, TAB_RIGHT, mean_diff - tval * se_mean, NULL, RC_OTHER); tab_double (t, 6, v + heading_rows, TAB_RIGHT, mean_diff + tval * se_mean, NULL, RC_OTHER); } tab_submit (t); } static void one_sample_summary (const struct tt *tt, const struct one_samp *os) { struct hmapx_node *node; struct per_var_stats *per_var_stats; const int cols = 5; const int heading_rows = 1; const int rows = tt->n_vars + heading_rows; struct tab_table *t = tab_create (cols, rows); const struct fmt_spec *wfmt = tt->wv ? var_get_print_format (tt->wv) : & F_8_0; tab_set_format (t, RC_WEIGHT, wfmt); tab_headers (t, 0, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, TAL_0, TAL_1, 0, 0, cols - 1, rows - 1); tab_hline (t, TAL_2, 0, cols - 1, 1); tab_title (t, _("One-Sample Statistics")); tab_vline (t, TAL_2, 1, 0, rows - 1); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("N")); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Mean")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Std. Deviation")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("S.E. Mean")); HMAPX_FOR_EACH (per_var_stats, node, &os->hmap) { const struct moments *m = per_var_stats->mom; const int v = per_var_stats->posn; double cc, mean, sigma; moments_calculate (m, &cc, &mean, &sigma, NULL, NULL); tab_text (t, 0, v + heading_rows, TAB_LEFT, var_to_string (per_var_stats->var)); tab_double (t, 1, v + heading_rows, TAB_RIGHT, cc, NULL, RC_WEIGHT); tab_double (t, 2, v + heading_rows, TAB_RIGHT, mean, NULL, RC_OTHER); tab_double (t, 3, v + heading_rows, TAB_RIGHT, sqrt (sigma), NULL, RC_OTHER); tab_double (t, 4, v + heading_rows, TAB_RIGHT, sqrt (sigma / cc), NULL, RC_OTHER); } tab_submit (t); } void one_sample_run (const struct tt *tt, double testval, struct casereader *reader) { int i; struct ccase *c; struct one_samp os; struct casereader *r; struct hmapx_node *node; struct per_var_stats *per_var_stats; os.testval = testval; hmapx_init (&os.hmap); /* Insert all the variables into the map */ for (i = 0; i < tt->n_vars; ++i) { struct per_var_stats *per_var_stats = xzalloc (sizeof (*per_var_stats)); per_var_stats->posn = i; per_var_stats->var = tt->vars[i]; per_var_stats->mom = moments_create (MOMENT_VARIANCE); hmapx_insert (&os.hmap, per_var_stats, hash_pointer (per_var_stats->var, 0)); } r = casereader_clone (reader); for ( ; (c = casereader_read (r) ); case_unref (c)) { double w = dict_get_case_weight (tt->dict, c, NULL); struct hmapx_node *node; struct per_var_stats *per_var_stats; HMAPX_FOR_EACH (per_var_stats, node, &os.hmap) { const struct variable *var = per_var_stats->var; const union value *val = case_data (c, var); if (var_is_value_missing (var, val, tt->exclude)) continue; moments_pass_one (per_var_stats->mom, val->f, w); } } casereader_destroy (r); r = reader; for ( ; (c = casereader_read (r) ); case_unref (c)) { double w = dict_get_case_weight (tt->dict, c, NULL); struct hmapx_node *node; struct per_var_stats *per_var_stats; HMAPX_FOR_EACH (per_var_stats, node, &os.hmap) { const struct variable *var = per_var_stats->var; const union value *val = case_data (c, var); if (var_is_value_missing (var, val, tt->exclude)) continue; moments_pass_two (per_var_stats->mom, val->f, w); per_var_stats->sum_diff += w * (val->f - os.testval); } } casereader_destroy (r); one_sample_summary (tt, &os); one_sample_test (tt, &os); HMAPX_FOR_EACH (per_var_stats, node, &os.hmap) { moments_destroy (per_var_stats->mom); free (per_var_stats); } hmapx_destroy (&os.hmap); } pspp-1.0.1/src/language/stats/glm.c0000644000175000017500000005624313137223525014064 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include "data/case.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/value.h" #include "language/command.h" #include "language/dictionary/split-file.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "libpspp/assertion.h" #include "libpspp/ll.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/taint.h" #include "linreg/sweep.h" #include "math/categoricals.h" #include "math/covariance.h" #include "math/interaction.h" #include "math/moments.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct glm_spec { size_t n_dep_vars; const struct variable **dep_vars; size_t n_factor_vars; const struct variable **factor_vars; size_t n_interactions; struct interaction **interactions; enum mv_class exclude; /* The weight variable */ const struct variable *wv; const struct dictionary *dict; int ss_type; bool intercept; double alpha; bool dump_coding; }; struct glm_workspace { double total_ssq; struct moments *totals; struct categoricals *cats; /* Sums of squares due to different variables. Element 0 is the SSE for the entire model. For i > 0, element i is the SS due to variable i. */ gsl_vector *ssq; }; /* Default design: all possible interactions */ static void design_full (struct glm_spec *glm) { int sz; int i = 0; glm->n_interactions = (1 << glm->n_factor_vars) - 1; glm->interactions = xcalloc (glm->n_interactions, sizeof *glm->interactions); /* All subsets, with exception of the empty set, of [0, glm->n_factor_vars) */ for (sz = 1; sz <= glm->n_factor_vars; ++sz) { gsl_combination *c = gsl_combination_calloc (glm->n_factor_vars, sz); do { struct interaction *iact = interaction_create (NULL); int e; for (e = 0 ; e < gsl_combination_k (c); ++e) interaction_add_variable (iact, glm->factor_vars [gsl_combination_get (c, e)]); glm->interactions[i++] = iact; } while (gsl_combination_next (c) == GSL_SUCCESS); gsl_combination_free (c); } } static void output_glm (const struct glm_spec *, const struct glm_workspace *ws); static void run_glm (struct glm_spec *cmd, struct casereader *input, const struct dataset *ds); static bool parse_design_spec (struct lexer *lexer, struct glm_spec *glm); int cmd_glm (struct lexer *lexer, struct dataset *ds) { int i; struct const_var_set *factors = NULL; struct glm_spec glm; bool design = false; glm.dict = dataset_dict (ds); glm.n_dep_vars = 0; glm.n_factor_vars = 0; glm.n_interactions = 0; glm.interactions = NULL; glm.dep_vars = NULL; glm.factor_vars = NULL; glm.exclude = MV_ANY; glm.intercept = true; glm.wv = dict_get_weight (glm.dict); glm.alpha = 0.05; glm.dump_coding = false; glm.ss_type = 3; if (!parse_variables_const (lexer, glm.dict, &glm.dep_vars, &glm.n_dep_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; if (! lex_force_match (lexer, T_BY)) goto error; if (!parse_variables_const (lexer, glm.dict, &glm.factor_vars, &glm.n_factor_vars, PV_NO_DUPLICATE | PV_NUMERIC)) goto error; if (glm.n_dep_vars > 1) { msg (ME, _("Multivariate analysis is not yet implemented")); return CMD_FAILURE; } factors = const_var_set_create_from_array (glm.factor_vars, glm.n_factor_vars); while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "INCLUDE")) { glm.exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "EXCLUDE")) { glm.exclude = MV_ANY; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "INTERCEPT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "INCLUDE")) { glm.intercept = true; } else if (lex_match_id (lexer, "EXCLUDE")) { glm.intercept = false; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "CRITERIA")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "ALPHA")) { if (lex_force_match (lexer, T_LPAREN)) { if (! lex_force_num (lexer)) { lex_error (lexer, NULL); goto error; } glm.alpha = lex_number (lexer); lex_get (lexer); if ( ! lex_force_match (lexer, T_RPAREN)) { lex_error (lexer, NULL); goto error; } } } else { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "METHOD")) { lex_match (lexer, T_EQUALS); if ( !lex_force_match_id (lexer, "SSTYPE")) { lex_error (lexer, NULL); goto error; } if ( ! lex_force_match (lexer, T_LPAREN)) { lex_error (lexer, NULL); goto error; } if ( ! lex_force_int (lexer)) { lex_error (lexer, NULL); goto error; } glm.ss_type = lex_integer (lexer); if (1 > glm.ss_type || 3 < glm.ss_type ) { msg (ME, _("Only types 1, 2 & 3 sums of squares are currently implemented")); goto error; } lex_get (lexer); if ( ! lex_force_match (lexer, T_RPAREN)) { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "DESIGN")) { lex_match (lexer, T_EQUALS); if (! parse_design_spec (lexer, &glm)) goto error; if (glm.n_interactions > 0) design = true; } else if (lex_match_id (lexer, "SHOWCODES")) /* Undocumented debug option */ { lex_match (lexer, T_EQUALS); glm.dump_coding = true; } else { lex_error (lexer, NULL); goto error; } } if ( ! design ) { design_full (&glm); } { struct casegrouper *grouper; struct casereader *group; bool ok; grouper = casegrouper_create_splits (proc_open (ds), glm.dict); while (casegrouper_get_next_group (grouper, &group)) run_glm (&glm, group, ds); ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; } const_var_set_destroy (factors); free (glm.factor_vars); for (i = 0 ; i < glm.n_interactions; ++i) interaction_destroy (glm.interactions[i]); free (glm.interactions); free (glm.dep_vars); return CMD_SUCCESS; error: const_var_set_destroy (factors); free (glm.factor_vars); for (i = 0 ; i < glm.n_interactions; ++i) interaction_destroy (glm.interactions[i]); free (glm.interactions); free (glm.dep_vars); return CMD_FAILURE; } static inline bool not_dropped (size_t j, const bool *ff) { return ! ff[j]; } static void fill_submatrix (const gsl_matrix * cov, gsl_matrix * submatrix, bool *dropped_f) { size_t i; size_t j; size_t n = 0; size_t m = 0; for (i = 0; i < cov->size1; i++) { if (not_dropped (i, dropped_f)) { m = 0; for (j = 0; j < cov->size2; j++) { if (not_dropped (j, dropped_f)) { gsl_matrix_set (submatrix, n, m, gsl_matrix_get (cov, i, j)); m++; } } n++; } } } /* Type 1 sums of squares. Populate SSQ with the Type 1 sums of squares according to COV */ static void ssq_type1 (struct covariance *cov, gsl_vector *ssq, const struct glm_spec *cmd) { const gsl_matrix *cm = covariance_calculate_unnormalized (cov); size_t i; size_t k; bool *model_dropped = xcalloc (covariance_dim (cov), sizeof (*model_dropped)); bool *submodel_dropped = xcalloc (covariance_dim (cov), sizeof (*submodel_dropped)); const struct categoricals *cats = covariance_get_categoricals (cov); size_t n_dropped_model = 0; size_t n_dropped_submodel = 0; for (i = cmd->n_dep_vars; i < covariance_dim (cov); i++) { n_dropped_model++; n_dropped_submodel++; model_dropped[i] = true; submodel_dropped[i] = true; } for (k = 0; k < cmd->n_interactions; k++) { gsl_matrix *model_cov = NULL; gsl_matrix *submodel_cov = NULL; n_dropped_submodel = n_dropped_model; for (i = cmd->n_dep_vars; i < covariance_dim (cov); i++) { submodel_dropped[i] = model_dropped[i]; } for (i = cmd->n_dep_vars; i < covariance_dim (cov); i++) { const struct interaction * x = categoricals_get_interaction_by_subscript (cats, i - cmd->n_dep_vars); if ( x == cmd->interactions [k]) { model_dropped[i] = false; n_dropped_model--; } } model_cov = gsl_matrix_alloc (cm->size1 - n_dropped_model, cm->size2 - n_dropped_model); submodel_cov = gsl_matrix_alloc (cm->size1 - n_dropped_submodel, cm->size2 - n_dropped_submodel); fill_submatrix (cm, model_cov, model_dropped); fill_submatrix (cm, submodel_cov, submodel_dropped); reg_sweep (model_cov, 0); reg_sweep (submodel_cov, 0); gsl_vector_set (ssq, k + 1, gsl_matrix_get (submodel_cov, 0, 0) - gsl_matrix_get (model_cov, 0, 0) ); gsl_matrix_free (model_cov); gsl_matrix_free (submodel_cov); } free (model_dropped); free (submodel_dropped); } /* Type 2 sums of squares. Populate SSQ with the Type 2 sums of squares according to COV */ static void ssq_type2 (struct covariance *cov, gsl_vector *ssq, const struct glm_spec *cmd) { const gsl_matrix *cm = covariance_calculate_unnormalized (cov); size_t i; size_t k; bool *model_dropped = xcalloc (covariance_dim (cov), sizeof (*model_dropped)); bool *submodel_dropped = xcalloc (covariance_dim (cov), sizeof (*submodel_dropped)); const struct categoricals *cats = covariance_get_categoricals (cov); for (k = 0; k < cmd->n_interactions; k++) { gsl_matrix *model_cov = NULL; gsl_matrix *submodel_cov = NULL; size_t n_dropped_model = 0; size_t n_dropped_submodel = 0; for (i = cmd->n_dep_vars; i < covariance_dim (cov); i++) { const struct interaction * x = categoricals_get_interaction_by_subscript (cats, i - cmd->n_dep_vars); model_dropped[i] = false; submodel_dropped[i] = false; if (interaction_is_subset (cmd->interactions [k], x)) { assert (n_dropped_submodel < covariance_dim (cov)); n_dropped_submodel++; submodel_dropped[i] = true; if ( cmd->interactions [k]->n_vars < x->n_vars) { assert (n_dropped_model < covariance_dim (cov)); n_dropped_model++; model_dropped[i] = true; } } } model_cov = gsl_matrix_alloc (cm->size1 - n_dropped_model, cm->size2 - n_dropped_model); submodel_cov = gsl_matrix_alloc (cm->size1 - n_dropped_submodel, cm->size2 - n_dropped_submodel); fill_submatrix (cm, model_cov, model_dropped); fill_submatrix (cm, submodel_cov, submodel_dropped); reg_sweep (model_cov, 0); reg_sweep (submodel_cov, 0); gsl_vector_set (ssq, k + 1, gsl_matrix_get (submodel_cov, 0, 0) - gsl_matrix_get (model_cov, 0, 0) ); gsl_matrix_free (model_cov); gsl_matrix_free (submodel_cov); } free (model_dropped); free (submodel_dropped); } /* Type 3 sums of squares. Populate SSQ with the Type 2 sums of squares according to COV */ static void ssq_type3 (struct covariance *cov, gsl_vector *ssq, const struct glm_spec *cmd) { const gsl_matrix *cm = covariance_calculate_unnormalized (cov); size_t i; size_t k; bool *model_dropped = xcalloc (covariance_dim (cov), sizeof (*model_dropped)); bool *submodel_dropped = xcalloc (covariance_dim (cov), sizeof (*submodel_dropped)); const struct categoricals *cats = covariance_get_categoricals (cov); double ss0; gsl_matrix *submodel_cov = gsl_matrix_alloc (cm->size1, cm->size2); fill_submatrix (cm, submodel_cov, submodel_dropped); reg_sweep (submodel_cov, 0); ss0 = gsl_matrix_get (submodel_cov, 0, 0); gsl_matrix_free (submodel_cov); free (submodel_dropped); for (k = 0; k < cmd->n_interactions; k++) { gsl_matrix *model_cov = NULL; size_t n_dropped_model = 0; for (i = cmd->n_dep_vars; i < covariance_dim (cov); i++) { const struct interaction * x = categoricals_get_interaction_by_subscript (cats, i - cmd->n_dep_vars); model_dropped[i] = false; if ( cmd->interactions [k] == x) { assert (n_dropped_model < covariance_dim (cov)); n_dropped_model++; model_dropped[i] = true; } } model_cov = gsl_matrix_alloc (cm->size1 - n_dropped_model, cm->size2 - n_dropped_model); fill_submatrix (cm, model_cov, model_dropped); reg_sweep (model_cov, 0); gsl_vector_set (ssq, k + 1, gsl_matrix_get (model_cov, 0, 0) - ss0); gsl_matrix_free (model_cov); } free (model_dropped); } //static void dump_matrix (const gsl_matrix *m); static void run_glm (struct glm_spec *cmd, struct casereader *input, const struct dataset *ds) { bool warn_bad_weight = true; int v; struct taint *taint; struct dictionary *dict = dataset_dict (ds); struct casereader *reader; struct ccase *c; struct glm_workspace ws; struct covariance *cov; input = casereader_create_filter_missing (input, cmd->dep_vars, cmd->n_dep_vars, cmd->exclude, NULL, NULL); input = casereader_create_filter_missing (input, cmd->factor_vars, cmd->n_factor_vars, cmd->exclude, NULL, NULL); ws.cats = categoricals_create (cmd->interactions, cmd->n_interactions, cmd->wv, cmd->exclude, MV_ANY); cov = covariance_2pass_create (cmd->n_dep_vars, cmd->dep_vars, ws.cats, cmd->wv, cmd->exclude, true); c = casereader_peek (input, 0); if (c == NULL) { casereader_destroy (input); return; } output_split_file_values (ds, c); case_unref (c); taint = taint_clone (casereader_get_taint (input)); ws.totals = moments_create (MOMENT_VARIANCE); for (reader = casereader_clone (input); (c = casereader_read (reader)) != NULL; case_unref (c)) { double weight = dict_get_case_weight (dict, c, &warn_bad_weight); for (v = 0; v < cmd->n_dep_vars; ++v) moments_pass_one (ws.totals, case_data (c, cmd->dep_vars[v])->f, weight); covariance_accumulate_pass1 (cov, c); } casereader_destroy (reader); if (cmd->dump_coding) reader = casereader_clone (input); else reader = input; for (; (c = casereader_read (reader)) != NULL; case_unref (c)) { double weight = dict_get_case_weight (dict, c, &warn_bad_weight); for (v = 0; v < cmd->n_dep_vars; ++v) moments_pass_two (ws.totals, case_data (c, cmd->dep_vars[v])->f, weight); covariance_accumulate_pass2 (cov, c); } casereader_destroy (reader); if (cmd->dump_coding) { struct tab_table *t = covariance_dump_enc_header (cov, 1 + casereader_count_cases (input)); for (reader = input; (c = casereader_read (reader)) != NULL; case_unref (c)) { covariance_dump_enc (cov, c, t); } casereader_destroy (reader); tab_submit (t); } { const gsl_matrix *ucm = covariance_calculate_unnormalized (cov); gsl_matrix *cm = gsl_matrix_alloc (ucm->size1, ucm->size2); gsl_matrix_memcpy (cm, ucm); // dump_matrix (cm); ws.total_ssq = gsl_matrix_get (cm, 0, 0); reg_sweep (cm, 0); /* Store the overall SSE. */ ws.ssq = gsl_vector_alloc (cm->size1); gsl_vector_set (ws.ssq, 0, gsl_matrix_get (cm, 0, 0)); switch (cmd->ss_type) { case 1: ssq_type1 (cov, ws.ssq, cmd); break; case 2: ssq_type2 (cov, ws.ssq, cmd); break; case 3: ssq_type3 (cov, ws.ssq, cmd); break; default: NOT_REACHED (); break; } // dump_matrix (cm); gsl_matrix_free (cm); } if (!taint_has_tainted_successor (taint)) output_glm (cmd, &ws); gsl_vector_free (ws.ssq); covariance_destroy (cov); moments_destroy (ws.totals); taint_destroy (taint); } static const char *roman[] = { "", /* The Romans had no concept of zero */ "I", "II", "III", "IV" }; static void output_glm (const struct glm_spec *cmd, const struct glm_workspace *ws) { const struct fmt_spec *wfmt = cmd->wv ? var_get_print_format (cmd->wv) : &F_8_0; double intercept_ssq; double ssq_effects; double n_total, mean; double df_corr = 1.0; double mse = 0; int f; int r; const int heading_columns = 1; const int heading_rows = 1; struct tab_table *t; const int nc = 6; int nr = heading_rows + 3 + cmd->n_interactions; if (cmd->intercept) nr += 2; t = tab_create (nc, nr); tab_set_format (t, RC_WEIGHT, wfmt); tab_title (t, _("Tests of Between-Subjects Effects")); tab_headers (t, heading_columns, 0, heading_rows, 0); tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, nc - 1, nr - 1); tab_hline (t, TAL_2, 0, nc - 1, heading_rows); tab_vline (t, TAL_2, heading_columns, 0, nr - 1); tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Source")); /* TRANSLATORS: The parameter is a roman numeral */ tab_text_format (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Type %s Sum of Squares"), roman[cmd->ss_type]); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("df")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Mean Square")); tab_text (t, 4, 0, TAB_CENTER | TAT_TITLE, _("F")); tab_text (t, 5, 0, TAB_CENTER | TAT_TITLE, _("Sig.")); moments_calculate (ws->totals, &n_total, &mean, NULL, NULL, NULL); df_corr += categoricals_df_total (ws->cats); r = heading_rows; if (cmd->intercept) tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, _("Corrected Model")); else tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, _("Model")); r++; mse = gsl_vector_get (ws->ssq, 0) / (n_total - df_corr); intercept_ssq = pow2 (mean * n_total) / n_total; ssq_effects = 0.0; if (cmd->intercept) { const double df = 1.0; const double F = intercept_ssq / df / mse; tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, _("Intercept")); /* The intercept for unbalanced models is of limited use and nobody knows how to calculate it properly */ if (categoricals_isbalanced (ws->cats)) { tab_double (t, 1, r, 0, intercept_ssq, NULL, RC_OTHER); tab_double (t, 2, r, 0, 1.00, NULL, RC_WEIGHT); tab_double (t, 3, r, 0, intercept_ssq / df, NULL, RC_OTHER); tab_double (t, 4, r, 0, F, NULL, RC_OTHER); tab_double (t, 5, r, 0, gsl_cdf_fdist_Q (F, df, n_total - df_corr), NULL, RC_PVALUE); } r++; } for (f = 0; f < cmd->n_interactions; ++f) { struct string str = DS_EMPTY_INITIALIZER; double df = categoricals_df (ws->cats, f); double ssq = gsl_vector_get (ws->ssq, f + 1); double F; ssq_effects += ssq; if (! cmd->intercept) { df++; ssq += intercept_ssq; } F = ssq / df / mse; interaction_to_string (cmd->interactions[f], &str); tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, ds_cstr (&str)); ds_destroy (&str); tab_double (t, 1, r, 0, ssq, NULL, RC_OTHER); tab_double (t, 2, r, 0, df, NULL, RC_WEIGHT); tab_double (t, 3, r, 0, ssq / df, NULL, RC_OTHER); tab_double (t, 4, r, 0, F, NULL, RC_OTHER); tab_double (t, 5, r, 0, gsl_cdf_fdist_Q (F, df, n_total - df_corr), NULL, RC_PVALUE); r++; } { /* Model / Corrected Model */ double df = df_corr; double ssq = ws->total_ssq - gsl_vector_get (ws->ssq, 0); double F; if ( cmd->intercept ) df --; else ssq += intercept_ssq; F = ssq / df / mse; tab_double (t, 1, heading_rows, 0, ssq, NULL, RC_OTHER); tab_double (t, 2, heading_rows, 0, df, NULL, RC_WEIGHT); tab_double (t, 3, heading_rows, 0, ssq / df, NULL, RC_OTHER); tab_double (t, 4, heading_rows, 0, F, NULL, RC_OTHER); tab_double (t, 5, heading_rows, 0, gsl_cdf_fdist_Q (F, df, n_total - df_corr), NULL, RC_PVALUE); } { const double df = n_total - df_corr; const double ssq = gsl_vector_get (ws->ssq, 0); const double mse = ssq / df; tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, _("Error")); tab_double (t, 1, r, 0, ssq, NULL, RC_OTHER); tab_double (t, 2, r, 0, df, NULL, RC_WEIGHT); tab_double (t, 3, r++, 0, mse, NULL, RC_OTHER); } { tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, _("Total")); tab_double (t, 1, r, 0, ws->total_ssq + intercept_ssq, NULL, RC_OTHER); tab_double (t, 2, r, 0, n_total, NULL, RC_WEIGHT); r++; } if (cmd->intercept) { tab_text (t, 0, r, TAB_LEFT | TAT_TITLE, _("Corrected Total")); tab_double (t, 1, r, 0, ws->total_ssq, NULL, RC_OTHER); tab_double (t, 2, r, 0, n_total - 1.0, NULL, RC_WEIGHT); } tab_submit (t); } #if 0 static void dump_matrix (const gsl_matrix * m) { size_t i, j; for (i = 0; i < m->size1; ++i) { for (j = 0; j < m->size2; ++j) { double x = gsl_matrix_get (m, i, j); printf ("%.3f ", x); } printf ("\n"); } printf ("\n"); } #endif static bool parse_nested_variable (struct lexer *lexer, struct glm_spec *glm) { const struct variable *v = NULL; if ( ! lex_match_variable (lexer, glm->dict, &v)) return false; if (lex_match (lexer, T_LPAREN)) { if ( ! parse_nested_variable (lexer, glm)) return false; if ( ! lex_force_match (lexer, T_RPAREN)) return false; } lex_error (lexer, "Nested variables are not yet implemented"); return false; return true; } /* A design term is an interaction OR a nested variable */ static bool parse_design_term (struct lexer *lexer, struct glm_spec *glm) { struct interaction *iact = NULL; if (parse_design_interaction (lexer, glm->dict, &iact)) { /* Interaction parsing successful. Add to list of interactions */ glm->interactions = xrealloc (glm->interactions, sizeof *glm->interactions * ++glm->n_interactions); glm->interactions[glm->n_interactions - 1] = iact; return true; } if ( parse_nested_variable (lexer, glm)) return true; return false; } /* Parse a complete DESIGN specification. A design spec is a design term, optionally followed by a comma, and another design spec. */ static bool parse_design_spec (struct lexer *lexer, struct glm_spec *glm) { if (lex_token (lexer) == T_ENDCMD || lex_token (lexer) == T_SLASH) return true; if ( ! parse_design_term (lexer, glm)) return false; lex_match (lexer, T_COMMA); return parse_design_spec (lexer, glm); } pspp-1.0.1/src/language/stats/rank.c0000644000175000017500000007211213146355723014237 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Free Software Foundation, Inc This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/case.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/variable.h" #include "data/subcase.h" #include "data/casewriter.h" #include "data/short-names.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "language/stats/sort-criteria.h" #include "math/sort.h" #include "libpspp/assertion.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/string-set.h" #include "libpspp/taint.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) struct rank; typedef double (*rank_function_t) (const struct rank*, double c, double cc, double cc_1, int i, double w); static double rank_proportion (const struct rank *, double c, double cc, double cc_1, int i, double w); static double rank_normal (const struct rank *, double c, double cc, double cc_1, int i, double w); static double rank_percent (const struct rank *, double c, double cc, double cc_1, int i, double w); static double rank_rfraction (const struct rank *, double c, double cc, double cc_1, int i, double w); static double rank_rank (const struct rank *, double c, double cc, double cc_1, int i, double w); static double rank_n (const struct rank *, double c, double cc, double cc_1, int i, double w); static double rank_savage (const struct rank *, double c, double cc, double cc_1, int i, double w); static double rank_ntiles (const struct rank *, double c, double cc, double cc_1, int i, double w); enum rank_func { RANK, NORMAL, PERCENT, RFRACTION, PROPORTION, N, NTILES, SAVAGE, n_RANK_FUNCS }; static const struct fmt_spec dest_format[n_RANK_FUNCS] = { {FMT_F, 9, 3}, /* rank */ {FMT_F, 6, 4}, /* normal */ {FMT_F, 6, 2}, /* percent */ {FMT_F, 6, 4}, /* rfraction */ {FMT_F, 6, 4}, /* proportion */ {FMT_F, 6, 0}, /* n */ {FMT_F, 3, 0}, /* ntiles */ {FMT_F, 8, 4} /* savage */ }; static const char * const function_name[n_RANK_FUNCS] = { "RANK", "NORMAL", "PERCENT", "RFRACTION", "PROPORTION", "N", "NTILES", "SAVAGE" }; static const rank_function_t rank_func[n_RANK_FUNCS] = { rank_rank, rank_normal, rank_percent, rank_rfraction, rank_proportion, rank_n, rank_ntiles, rank_savage }; enum ties { TIES_LOW, TIES_HIGH, TIES_MEAN, TIES_CONDENSE }; enum fraction { FRAC_BLOM, FRAC_RANKIT, FRAC_TUKEY, FRAC_VW }; struct rank_spec { enum rank_func rfunc; const char **dest_names; const char **dest_labels; }; /* If NEW_NAME exists in DICT or NEW_NAMES, returns NULL without changing anything. Otherwise, inserts NEW_NAME in NEW_NAMES and returns the copy of NEW_NAME now in NEW_NAMES. */ static const char * try_new_name (const char *new_name, const struct dictionary *dict, struct string_set *new_names) { return (!dict_lookup_var (dict, new_name) && string_set_insert (new_names, new_name) ? string_set_find_node (new_names, new_name)->string : NULL); } /* Returns a variable name for storing ranks of a variable named SRC_NAME according to the rank function F. The name chosen will not be one already in DICT or NEW_NAMES. If successful, adds the new name to NEW_NAMES and returns the name added. If no name can be generated, returns NULL. */ static const char * rank_choose_dest_name (struct dictionary *dict, struct string_set *new_names, enum rank_func f, const char *src_name) { char *src_name_7; char name[128]; const char *s; int i; /* Try the first character of the ranking function followed by the first 7 bytes of the srcinal variable name. */ src_name_7 = utf8_encoding_trunc (src_name, dict_get_encoding (dict), 7); snprintf (name, sizeof name, "%c%s", function_name[f][0], src_name_7); free (src_name_7); s = try_new_name (name, dict, new_names); if (s != NULL) return s; /* Try "fun###". */ for (i = 1; i <= 999; i++) { sprintf (name, "%.3s%03d", function_name[f], i); s = try_new_name (name, dict, new_names); if (s != NULL) return s; } /* Try "RNKfn##". */ for (i = 1; i <= 99; i++) { sprintf (name, "RNK%.2s%02d", function_name[f], i); s = try_new_name (name, dict, new_names); if (s != NULL) return s; } msg (ME, _("Cannot generate variable name for ranking %s with %s. " "All candidates in use."), src_name, function_name[f]); return NULL; } struct rank { struct dictionary *dict; struct subcase sc; const struct variable **vars; size_t n_vars; const struct variable **group_vars; size_t n_group_vars; enum mv_class exclude; struct rank_spec *rs; size_t n_rs; enum ties ties; enum fraction fraction; int k_ntiles; bool print; /* Pool on which cell functions may allocate data */ struct pool *pool; }; static void destroy_rank (struct rank *rank) { free (rank->vars); free (rank->group_vars); subcase_destroy (&rank->sc); pool_destroy (rank->pool); } static bool parse_into (struct lexer *lexer, struct rank *cmd, struct string_set *new_names) { int var_count = 0; struct rank_spec *rs = NULL; cmd->rs = pool_realloc (cmd->pool, cmd->rs, sizeof (*cmd->rs) * (cmd->n_rs + 1)); rs = &cmd->rs[cmd->n_rs]; if (lex_match_id (lexer, "RANK")) { rs->rfunc = RANK; } else if (lex_match_id (lexer, "NORMAL")) { rs->rfunc = NORMAL; } else if (lex_match_id (lexer, "RFRACTION")) { rs->rfunc = RFRACTION; } else if (lex_match_id (lexer, "N")) { rs->rfunc = N; } else if (lex_match_id (lexer, "SAVAGE")) { rs->rfunc = SAVAGE; } else if (lex_match_id (lexer, "PERCENT")) { rs->rfunc = PERCENT; } else if (lex_match_id (lexer, "PROPORTION")) { rs->rfunc = PROPORTION; } else if (lex_match_id (lexer, "NTILES")) { if ( !lex_force_match (lexer, T_LPAREN)) return false; if (! lex_force_int (lexer) ) return false; cmd->k_ntiles = lex_integer (lexer); lex_get (lexer); if ( !lex_force_match (lexer, T_RPAREN)) return false; rs->rfunc = NTILES; } else { lex_error (lexer, NULL); return false; } cmd->n_rs++; rs->dest_names = pool_calloc (cmd->pool, cmd->n_vars, sizeof *rs->dest_names); if (lex_match_id (lexer, "INTO")) { while( lex_token (lexer) == T_ID ) { const char *name = lex_tokcstr (lexer); if ( var_count >= subcase_get_n_fields (&cmd->sc) ) msg (SE, _("Too many variables in %s clause."), "INTO"); else if ( dict_lookup_var (cmd->dict, name) != NULL ) msg (SE, _("Variable %s already exists."), name); else if (string_set_contains (new_names, name)) msg (SE, _("Duplicate variable name %s."), name); else { string_set_insert (new_names, name); rs->dest_names[var_count++] = pool_strdup (cmd->pool, name); lex_get (lexer); continue; } /* Error path. */ return false; } } return true; } /* Hardly a rank function !! */ static double rank_n (const struct rank *cmd UNUSED, double c UNUSED, double cc UNUSED, double cc_1 UNUSED, int i UNUSED, double w) { return w; } static double rank_rank (const struct rank *cmd, double c, double cc, double cc_1, int i, double w UNUSED) { double rank; if ( c >= 1.0 ) { switch (cmd->ties) { case TIES_LOW: rank = cc_1 + 1; break; case TIES_HIGH: rank = cc; break; case TIES_MEAN: rank = cc_1 + (c + 1.0)/ 2.0; break; case TIES_CONDENSE: rank = i; break; default: NOT_REACHED (); } } else { switch (cmd->ties) { case TIES_LOW: rank = cc_1; break; case TIES_HIGH: rank = cc; break; case TIES_MEAN: rank = cc_1 + c / 2.0 ; break; case TIES_CONDENSE: rank = i; break; default: NOT_REACHED (); } } return rank; } static double rank_rfraction (const struct rank *cmd, double c, double cc, double cc_1, int i, double w) { return rank_rank (cmd, c, cc, cc_1, i, w) / w ; } static double rank_percent (const struct rank *cmd, double c, double cc, double cc_1, int i, double w) { return rank_rank (cmd, c, cc, cc_1, i, w) * 100.0 / w ; } static double rank_proportion (const struct rank *cmd, double c, double cc, double cc_1, int i, double w) { const double r = rank_rank (cmd, c, cc, cc_1, i, w) ; double f; switch ( cmd->fraction ) { case FRAC_BLOM: f = (r - 3.0/8.0) / (w + 0.25); break; case FRAC_RANKIT: f = (r - 0.5) / w ; break; case FRAC_TUKEY: f = (r - 1.0/3.0) / (w + 1.0/3.0); break; case FRAC_VW: f = r / ( w + 1.0); break; default: NOT_REACHED (); } return (f > 0) ? f : SYSMIS; } static double rank_normal (const struct rank *cmd, double c, double cc, double cc_1, int i, double w) { double f = rank_proportion (cmd, c, cc, cc_1, i, w); return gsl_cdf_ugaussian_Pinv (f); } static double rank_ntiles (const struct rank *cmd, double c, double cc, double cc_1, int i, double w) { double r = rank_rank (cmd, c, cc, cc_1, i, w); return ( floor (( r * cmd->k_ntiles) / ( w + 1) ) + 1); } /* Expected value of the order statistics from an exponential distribution */ static double ee (int j, double w_star) { int k; double sum = 0.0; for (k = 1 ; k <= j; k++) sum += 1.0 / ( w_star + 1 - k ); return sum; } static double rank_savage (const struct rank *cmd UNUSED, double c, double cc, double cc_1, int i UNUSED, double w) { double int_part; const int i_1 = floor (cc_1); const int i_2 = floor (cc); const double w_star = (modf (w, &int_part) == 0 ) ? w : floor (w) + 1; const double g_1 = cc_1 - i_1; const double g_2 = cc - i_2; /* The second factor is infinite, when the first is zero. Therefore, evaluate the second, only when the first is non-zero */ const double expr1 = (1 - g_1) ? (1 - g_1) * ee(i_1+1, w_star) : ( 1 - g_1); const double expr2 = g_2 ? g_2 * ee (i_2+1, w_star) : g_2 ; if ( i_1 == i_2 ) return ee (i_1 + 1, w_star) - 1; if ( i_1 + 1 == i_2 ) return ( ( expr1 + expr2 )/c ) - 1; if ( i_1 + 2 <= i_2 ) { int j; double sigma = 0.0; for (j = i_1 + 2 ; j <= i_2; ++j ) sigma += ee (j, w_star); return ( (expr1 + expr2 + sigma) / c) -1; } NOT_REACHED(); } static double sum_weights (const struct casereader *input, int weight_idx) { if (weight_idx == -1) return casereader_count_cases (input); else { struct casereader *pass; struct ccase *c; double w; w = 0.0; pass = casereader_clone (input); for (; (c = casereader_read (pass)) != NULL; case_unref (c)) w += case_num_idx (c, weight_idx); casereader_destroy (pass); return w; } } static void rank_sorted_file (struct casereader *input, struct casewriter *output, int weight_idx, const struct rank *cmd) { struct casegrouper *tie_grouper; struct casereader *tied_cases; struct subcase input_var; int tie_group = 1; struct ccase *c; double cc = 0.0; double w; /* Get total group weight. */ w = sum_weights (input, weight_idx); /* Do ranking. */ subcase_init (&input_var, 0, 0, SC_ASCEND); tie_grouper = casegrouper_create_subcase (input, &input_var); subcase_destroy (&input_var); for (; casegrouper_get_next_group (tie_grouper, &tied_cases); casereader_destroy (tied_cases)) { double tw = sum_weights (tied_cases, weight_idx); double cc_1 = cc; cc += tw; taint_propagate (casereader_get_taint (tied_cases), casewriter_get_taint (output)); /* Rank tied cases. */ for (; (c = casereader_read (tied_cases)) != NULL; case_unref (c)) { struct ccase *out_case; size_t i; out_case = case_create (casewriter_get_proto (output)); case_data_rw_idx (out_case, 0)->f = case_num_idx (c, 1); for (i = 0; i < cmd->n_rs; ++i) { rank_function_t func = rank_func[cmd->rs[i].rfunc]; double rank = func (cmd, tw, cc, cc_1, tie_group, w); case_data_rw_idx (out_case, i + 1)->f = rank; } casewriter_write (output, out_case); } tie_group++; } casegrouper_destroy (tie_grouper); } static bool rank_cmd (struct dataset *ds, const struct rank *cmd); static const char * fraction_name (const struct rank *cmd) { switch (cmd->fraction ) { case FRAC_BLOM: return "BLOM"; case FRAC_RANKIT: return "RANKIT"; case FRAC_TUKEY: return "TUKEY"; case FRAC_VW: return "VW"; default: NOT_REACHED (); } } /* Returns a label for a variable derived from SRC_VAR with function F. */ static const char * create_var_label (struct rank *cmd, const struct variable *src_var, enum rank_func f) { struct string label; const char *pool_label; ds_init_empty (&label); if ( cmd->n_group_vars > 0 ) { struct string group_var_str; int g; ds_init_empty (&group_var_str); for (g = 0 ; g < cmd->n_group_vars ; ++g ) { if ( g > 0 ) ds_put_cstr (&group_var_str, " "); ds_put_cstr (&group_var_str, var_get_name (cmd->group_vars[g])); } ds_put_format (&label, _("%s of %s by %s"), function_name[f], var_get_name (src_var), ds_cstr (&group_var_str)); ds_destroy (&group_var_str); } else ds_put_format (&label, _("%s of %s"), function_name[f], var_get_name (src_var)); pool_label = pool_strdup (cmd->pool, ds_cstr (&label)); ds_destroy (&label); return pool_label; } int cmd_rank (struct lexer *lexer, struct dataset *ds) { struct string_set new_names; struct rank rank; struct rank_spec *rs; int i; subcase_init_empty (&rank.sc); rank.rs = NULL; rank.n_rs = 0; rank.exclude = MV_ANY; rank.n_group_vars = 0; rank.group_vars = NULL; rank.dict = dataset_dict (ds); rank.ties = TIES_MEAN; rank.fraction = FRAC_BLOM; rank.print = true; rank.pool = pool_create (); string_set_init (&new_names); if (lex_match_id (lexer, "VARIABLES")) if (! lex_force_match (lexer, T_EQUALS)) goto error; if (!parse_sort_criteria (lexer, rank.dict, &rank.sc, &rank.vars, NULL)) goto error; rank.n_vars = rank.sc.n_fields; if (lex_match (lexer, T_BY) ) { if ( ! parse_variables_const (lexer, rank.dict, &rank.group_vars, &rank.n_group_vars, PV_NO_DUPLICATE | PV_NO_SCRATCH)) goto error; } while (lex_token (lexer) != T_ENDCMD ) { if (! lex_force_match (lexer, T_SLASH)) goto error; if (lex_match_id (lexer, "TIES")) { if (! lex_force_match (lexer, T_EQUALS)) goto error; if (lex_match_id (lexer, "MEAN")) { rank.ties = TIES_MEAN; } else if (lex_match_id (lexer, "LOW")) { rank.ties = TIES_LOW; } else if (lex_match_id (lexer, "HIGH")) { rank.ties = TIES_HIGH; } else if (lex_match_id (lexer, "CONDENSE")) { rank.ties = TIES_CONDENSE; } else { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "FRACTION")) { if (! lex_force_match (lexer, T_EQUALS)) goto error; if (lex_match_id (lexer, "BLOM")) { rank.fraction = FRAC_BLOM; } else if (lex_match_id (lexer, "TUKEY")) { rank.fraction = FRAC_TUKEY; } else if (lex_match_id (lexer, "VW")) { rank.fraction = FRAC_VW; } else if (lex_match_id (lexer, "RANKIT")) { rank.fraction = FRAC_RANKIT; } else { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "PRINT")) { if (! lex_force_match (lexer, T_EQUALS)) goto error; if (lex_match_id (lexer, "YES")) { rank.print = true; } else if (lex_match_id (lexer, "NO")) { rank.print = false; } else { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "MISSING")) { if (! lex_force_match (lexer, T_EQUALS)) goto error; if (lex_match_id (lexer, "INCLUDE")) { rank.exclude = MV_SYSTEM; } else if (lex_match_id (lexer, "EXCLUDE")) { rank.exclude = MV_ANY; } else { lex_error (lexer, NULL); goto error; } } else if (! parse_into (lexer, &rank, &new_names)) goto error; } /* If no rank specs are given, then apply a default */ if ( rank.n_rs == 0) { struct rank_spec *rs; rs = pool_calloc (rank.pool, 1, sizeof *rs); rs->rfunc = RANK; rs->dest_names = pool_calloc (rank.pool, rank.n_vars, sizeof *rs->dest_names); rank.rs = rs; rank.n_rs = 1; } /* Choose variable names for all rank destinations which haven't already been created with INTO. */ for (rs = rank.rs; rs < &rank.rs[rank.n_rs]; rs++) { int v; rs->dest_labels = pool_calloc (rank.pool, rank.n_vars, sizeof *rs->dest_labels); for ( v = 0 ; v < rank.n_vars ; v ++ ) { const char **dst_name = &rs->dest_names[v]; if ( *dst_name == NULL ) { *dst_name = rank_choose_dest_name (rank.dict, &new_names, rs->rfunc, var_get_name (rank.vars[v])); if (*dst_name == NULL) goto error; } rs->dest_labels[v] = create_var_label (&rank, rank.vars[v], rs->rfunc); } } if ( rank.print ) { int v; tab_output_text_format (0, _("Variables Created By %s"), "RANK"); tab_output_text (0, ""); for (i = 0 ; i < rank.n_rs ; ++i ) { for ( v = 0 ; v < rank.n_vars ; v ++ ) { if ( rank.n_group_vars > 0 ) { struct string varlist; int g; ds_init_empty (&varlist); for ( g = 0 ; g < rank.n_group_vars ; ++g ) { ds_put_cstr (&varlist, var_get_name (rank.group_vars[g])); if ( g < rank.n_group_vars - 1) ds_put_cstr (&varlist, " "); } if ( rank.rs[i].rfunc == NORMAL || rank.rs[i].rfunc == PROPORTION ) tab_output_text_format (0, _("%s into %s(%s of %s using %s BY %s)"), var_get_name (rank.vars[v]), rank.rs[i].dest_names[v], function_name[rank.rs[i].rfunc], var_get_name (rank.vars[v]), fraction_name (&rank), ds_cstr (&varlist)); else tab_output_text_format (0, _("%s into %s(%s of %s BY %s)"), var_get_name (rank.vars[v]), rank.rs[i].dest_names[v], function_name[rank.rs[i].rfunc], var_get_name (rank.vars[v]), ds_cstr (&varlist)); ds_destroy (&varlist); } else { if ( rank.rs[i].rfunc == NORMAL || rank.rs[i].rfunc == PROPORTION ) tab_output_text_format (0, _("%s into %s(%s of %s using %s)"), var_get_name (rank.vars[v]), rank.rs[i].dest_names[v], function_name[rank.rs[i].rfunc], var_get_name (rank.vars[v]), fraction_name (&rank)); else tab_output_text_format (0, _("%s into %s(%s of %s)"), var_get_name (rank.vars[v]), rank.rs[i].dest_names[v], function_name[rank.rs[i].rfunc], var_get_name (rank.vars[v])); } } } } /* Do the ranking */ rank_cmd (ds, &rank); destroy_rank (&rank); string_set_destroy (&new_names); return CMD_SUCCESS; error: destroy_rank (&rank); string_set_destroy (&new_names); return CMD_FAILURE; } /* RANK transformation. */ struct rank_trns { int order_case_idx; struct rank_trns_input_var *input_vars; size_t n_input_vars; size_t n_funcs; }; struct rank_trns_input_var { struct casereader *input; struct ccase *current; struct variable **output_vars; }; static void advance_ranking (struct rank_trns_input_var *iv) { case_unref (iv->current); iv->current = casereader_read (iv->input); } static int rank_trns_proc (void *trns_, struct ccase **c, casenumber case_idx UNUSED) { struct rank_trns *trns = trns_; double order = case_num_idx (*c, trns->order_case_idx); struct rank_trns_input_var *iv; *c = case_unshare (*c); for (iv = trns->input_vars; iv < &trns->input_vars[trns->n_input_vars]; iv++) while (iv->current != NULL) { double iv_order = case_num_idx (iv->current, 0); if (iv_order == order) { size_t i; for (i = 0; i < trns->n_funcs; i++) case_data_rw (*c, iv->output_vars[i])->f = case_num_idx (iv->current, i + 1); advance_ranking (iv); break; } else if (iv_order > order) break; else advance_ranking (iv); } return TRNS_CONTINUE; } static bool rank_trns_free (void *trns_) { struct rank_trns *trns = trns_; struct rank_trns_input_var *iv; for (iv = trns->input_vars; iv < &trns->input_vars[trns->n_input_vars]; iv++) { casereader_destroy (iv->input); case_unref (iv->current); free (iv->output_vars); } free (trns->input_vars); free (trns); return true; } static bool rank_cmd (struct dataset *ds, const struct rank *cmd) { struct dictionary *d = dataset_dict (ds); struct variable *weight_var = dict_get_weight (d); struct casewriter **outputs; struct variable *order_var; struct casereader *input; struct rank_trns *trns; bool ok = true; int i; order_var = add_permanent_ordering_transformation (ds); /* Create output files. */ { struct caseproto *output_proto; struct subcase by_order; output_proto = caseproto_create (); for (i = 0; i < cmd->n_rs + 1; i++) output_proto = caseproto_add_width (output_proto, 0); subcase_init (&by_order, 0, 0, SC_ASCEND); outputs = xnmalloc (cmd->n_vars, sizeof *outputs); for (i = 0; i < cmd->n_vars; i++) outputs[i] = sort_create_writer (&by_order, output_proto); subcase_destroy (&by_order); caseproto_unref (output_proto); } /* Open the active file and make one pass per input variable. */ input = proc_open (ds); input = casereader_create_filter_weight (input, d, NULL, NULL); for (i = 0 ; i < cmd->n_vars ; ++i ) { const struct variable *input_var = cmd->vars[i]; struct casereader *input_pass; struct casegrouper *split_grouper; struct casereader *split_group; struct subcase rank_ordering; struct subcase projection; struct subcase split_vars; struct subcase group_vars; int weight_idx; int j; /* Discard cases that have missing values of input variable. */ input_pass = i == cmd->n_vars - 1 ? input : casereader_clone (input); input_pass = casereader_create_filter_missing (input_pass, &input_var, 1, cmd->exclude, NULL, NULL); /* Keep only the columns we really need, to save time and space when we sort them just below. After this projection, the input_pass case indexes look like: - 0: input_var. - 1: order_var. - 2 and up: cmd->n_group_vars group variables - 2 + cmd->n_group_vars and up: split variables - 2 + cmd->n_group_vars + n_split_vars: weight var */ subcase_init_empty (&projection); subcase_add_var_always (&projection, input_var, SC_ASCEND); subcase_add_var_always (&projection, order_var, SC_ASCEND); subcase_add_vars_always (&projection, cmd->group_vars, cmd->n_group_vars); subcase_add_vars_always (&projection, dict_get_split_vars (d), dict_get_split_cnt (d)); if (weight_var != NULL) { subcase_add_var_always (&projection, weight_var, SC_ASCEND); weight_idx = 2 + cmd->n_group_vars + dict_get_split_cnt (d); } else weight_idx = -1; input_pass = casereader_project (input_pass, &projection); subcase_destroy (&projection); /* Prepare 'group_vars' as the set of grouping variables. */ subcase_init_empty (&group_vars); for (j = 0; j < cmd->n_group_vars; j++) subcase_add_always (&group_vars, j + 2, var_get_width (cmd->group_vars[j]), SC_ASCEND); /* Prepare 'rank_ordering' for sorting with the group variables as primary key and the input variable as secondary key. */ subcase_clone (&rank_ordering, &group_vars); subcase_add (&rank_ordering, 0, 0, subcase_get_direction (&cmd->sc, i)); /* Group by split variables */ subcase_init_empty (&split_vars); for (j = 0; j < dict_get_split_cnt (d); j++) subcase_add_always (&split_vars, 2 + j + cmd->n_group_vars, var_get_width (dict_get_split_vars (d)[j]), SC_ASCEND); split_grouper = casegrouper_create_subcase (input_pass, &split_vars); subcase_destroy (&split_vars); while (casegrouper_get_next_group (split_grouper, &split_group)) { struct casereader *ordered; struct casegrouper *by_grouper; struct casereader *by_group; ordered = sort_execute (split_group, &rank_ordering); by_grouper = casegrouper_create_subcase (ordered, &group_vars); while (casegrouper_get_next_group (by_grouper, &by_group)) rank_sorted_file (by_group, outputs[i], weight_idx, cmd); ok = casegrouper_destroy (by_grouper) && ok; } subcase_destroy (&group_vars); subcase_destroy (&rank_ordering); ok = casegrouper_destroy (split_grouper) && ok; } ok = proc_commit (ds) && ok; /* Re-fetch the dictionary and order variable, because if TEMPORARY was in effect then there's a new dictionary. */ d = dataset_dict (ds); order_var = dict_lookup_var_assert (d, "$ORDER"); /* Merge the original data set with the ranks (which we already sorted on $ORDER). */ trns = xmalloc (sizeof *trns); trns->order_case_idx = var_get_case_index (order_var); trns->input_vars = xnmalloc (cmd->n_vars, sizeof *trns->input_vars); trns->n_input_vars = cmd->n_vars; trns->n_funcs = cmd->n_rs; for (i = 0; i < trns->n_input_vars; i++) { struct rank_trns_input_var *iv = &trns->input_vars[i]; int j; iv->input = casewriter_make_reader (outputs[i]); iv->current = casereader_read (iv->input); iv->output_vars = xnmalloc (trns->n_funcs, sizeof *iv->output_vars); for (j = 0; j < trns->n_funcs; j++) { struct rank_spec *rs = &cmd->rs[j]; struct variable *var; var = dict_create_var_assert (d, rs->dest_names[i], 0); var_set_both_formats (var, &dest_format[rs->rfunc]); var_set_label (var, rs->dest_labels[i]); iv->output_vars[j] = var; } } free (outputs); add_transformation (ds, rank_trns_proc, rank_trns_free, trns); /* Delete our sort key, which we don't need anymore. */ dict_delete_var (d, order_var); return ok; } pspp-1.0.1/src/language/stats/aggregate.c0000644000175000017500000007471613137223525015240 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2008, 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/aggregate.h" #include #include "data/any-writer.h" #include "data/case.h" #include "data/casegrouper.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/format.h" #include "data/settings.h" #include "data/subcase.h" #include "data/sys-file-writer.h" #include "data/variable.h" #include "language/command.h" #include "language/data-io/file-handle.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "language/stats/sort-criteria.h" #include "libpspp/assertion.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "math/moments.h" #include "math/percentiles.h" #include "math/sort.h" #include "math/statistic.h" #include "gl/c-strcase.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid /* Argument for AGGREGATE function. */ union agr_argument { double f; /* Numeric. */ char *c; /* Short or long string. */ }; /* Specifies how to make an aggregate variable. */ struct agr_var { struct agr_var *next; /* Next in list. */ /* Collected during parsing. */ const struct variable *src; /* Source variable. */ struct variable *dest; /* Target variable. */ int function; /* Function. */ enum mv_class exclude; /* Classes of missing values to exclude. */ union agr_argument arg[2]; /* Arguments. */ /* Accumulated during AGGREGATE execution. */ double dbl[3]; int int1, int2; char *string; bool saw_missing; struct moments1 *moments; double cc; struct variable *subject; struct variable *weight; struct casewriter *writer; }; /* Attributes of aggregation functions. */ const struct agr_func agr_func_tab[] = { {"SUM", N_("Sum of values"), AGR_SV_YES, 0, -1, {FMT_F, 8, 2}}, {"MEAN", N_("Mean average"), AGR_SV_YES, 0, -1, {FMT_F, 8, 2}}, {"MEDIAN", N_("Median average"), AGR_SV_YES, 0, -1, {FMT_F, 8, 2}}, {"SD", N_("Standard deviation"), AGR_SV_YES, 0, -1, {FMT_F, 8, 2}}, {"MAX", N_("Maximum value"), AGR_SV_YES, 0, VAL_STRING, {-1, -1, -1}}, {"MIN", N_("Minimum value"), AGR_SV_YES, 0, VAL_STRING, {-1, -1, -1}}, {"PGT", N_("Percentage greater than"), AGR_SV_YES, 1, VAL_NUMERIC, {FMT_F, 5, 1}}, {"PLT", N_("Percentage less than"), AGR_SV_YES, 1, VAL_NUMERIC, {FMT_F, 5, 1}}, {"PIN", N_("Percentage included in range"), AGR_SV_YES, 2, VAL_NUMERIC, {FMT_F, 5, 1}}, {"POUT", N_("Percentage excluded from range"), AGR_SV_YES, 2, VAL_NUMERIC, {FMT_F, 5, 1}}, {"FGT", N_("Fraction greater than"), AGR_SV_YES, 1, VAL_NUMERIC, {FMT_F, 5, 3}}, {"FLT", N_("Fraction less than"), AGR_SV_YES, 1, VAL_NUMERIC, {FMT_F, 5, 3}}, {"FIN", N_("Fraction included in range"), AGR_SV_YES, 2, VAL_NUMERIC, {FMT_F, 5, 3}}, {"FOUT", N_("Fraction excluded from range"), AGR_SV_YES, 2, VAL_NUMERIC, {FMT_F, 5, 3}}, {"N", N_("Number of cases"), AGR_SV_NO, 0, VAL_NUMERIC, {FMT_F, 7, 0}}, {"NU", N_("Number of cases (unweighted)"), AGR_SV_OPT, 0, VAL_NUMERIC, {FMT_F, 7, 0}}, {"NMISS", N_("Number of missing values"), AGR_SV_YES, 0, VAL_NUMERIC, {FMT_F, 7, 0}}, {"NUMISS", N_("Number of missing values (unweighted)"), AGR_SV_YES, 0, VAL_NUMERIC, {FMT_F, 7, 0}}, {"FIRST", N_("First non-missing value"), AGR_SV_YES, 0, VAL_STRING, {-1, -1, -1}}, {"LAST", N_("Last non-missing value"), AGR_SV_YES, 0, VAL_STRING, {-1, -1, -1}}, {NULL, NULL, AGR_SV_NO, 0, -1, {-1, -1, -1}}, }; /* Missing value types. */ enum missing_treatment { ITEMWISE, /* Missing values item by item. */ COLUMNWISE /* Missing values column by column. */ }; /* An entire AGGREGATE procedure. */ struct agr_proc { /* Break variables. */ struct subcase sort; /* Sort criteria (break variables). */ const struct variable **break_vars; /* Break variables. */ size_t break_var_cnt; /* Number of break variables. */ enum missing_treatment missing; /* How to treat missing values. */ struct agr_var *agr_vars; /* First aggregate variable. */ struct dictionary *dict; /* Aggregate dictionary. */ const struct dictionary *src_dict; /* Dict of the source */ int case_cnt; /* Counts aggregated cases. */ bool add_variables; /* True iff the aggregated variables should be appended to the existing dictionary */ }; static void initialize_aggregate_info (struct agr_proc *); static void accumulate_aggregate_info (struct agr_proc *, const struct ccase *); /* Prototypes. */ static bool parse_aggregate_functions (struct lexer *, const struct dictionary *, struct agr_proc *); static void agr_destroy (struct agr_proc *); static void dump_aggregate_info (const struct agr_proc *agr, struct casewriter *output, const struct ccase *break_case); /* Parsing. */ /* Parses and executes the AGGREGATE procedure. */ int cmd_aggregate (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); struct agr_proc agr; struct file_handle *out_file = NULL; struct casereader *input = NULL, *group; struct casegrouper *grouper; struct casewriter *output = NULL; bool copy_documents = false; bool presorted = false; bool saw_direction; bool ok; memset(&agr, 0 , sizeof (agr)); agr.missing = ITEMWISE; agr.src_dict = dict; subcase_init_empty (&agr.sort); /* OUTFILE subcommand must be first. */ lex_match (lexer, T_SLASH); if (!lex_force_match_id (lexer, "OUTFILE")) goto error; lex_match (lexer, T_EQUALS); if (!lex_match (lexer, T_ASTERISK)) { out_file = fh_parse (lexer, FH_REF_FILE, dataset_session (ds)); if (out_file == NULL) goto error; } if (out_file == NULL && lex_match_id (lexer, "MODE")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "ADDVARIABLES")) { agr.add_variables = true; /* presorted is assumed in ADDVARIABLES mode */ presorted = true; } else if (lex_match_id (lexer, "REPLACE")) { agr.add_variables = false; } else goto error; } if ( agr.add_variables ) agr.dict = dict_clone (dict); else agr.dict = dict_create (dict_get_encoding (dict)); dict_set_label (agr.dict, dict_get_label (dict)); dict_set_documents (agr.dict, dict_get_documents (dict)); /* Read most of the subcommands. */ for (;;) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); if (!lex_match_id (lexer, "COLUMNWISE")) { lex_error_expecting (lexer, "COLUMNWISE", NULL); goto error; } agr.missing = COLUMNWISE; } else if (lex_match_id (lexer, "DOCUMENT")) copy_documents = true; else if (lex_match_id (lexer, "PRESORTED")) presorted = true; else if (lex_force_match_id (lexer, "BREAK")) { int i; lex_match (lexer, T_EQUALS); if (!parse_sort_criteria (lexer, dict, &agr.sort, &agr.break_vars, &saw_direction)) goto error; agr.break_var_cnt = subcase_get_n_fields (&agr.sort); if (! agr.add_variables) for (i = 0; i < agr.break_var_cnt; i++) dict_clone_var_assert (agr.dict, agr.break_vars[i]); /* BREAK must follow the options. */ break; } else goto error; } if (presorted && saw_direction) msg (SW, _("When PRESORTED is specified, specifying sorting directions " "with (A) or (D) has no effect. Output data will be sorted " "the same way as the input data.")); /* Read in the aggregate functions. */ lex_match (lexer, T_SLASH); if (!parse_aggregate_functions (lexer, dict, &agr)) goto error; /* Delete documents. */ if (!copy_documents) dict_clear_documents (agr.dict); /* Cancel SPLIT FILE. */ dict_set_split_vars (agr.dict, NULL, 0); /* Initialize. */ agr.case_cnt = 0; if (out_file == NULL) { /* The active dataset will be replaced by the aggregated data, so TEMPORARY is moot. */ proc_cancel_temporary_transformations (ds); proc_discard_output (ds); output = autopaging_writer_create (dict_get_proto (agr.dict)); } else { output = any_writer_open (out_file, agr.dict); if (output == NULL) goto error; } input = proc_open (ds); if (!subcase_is_empty (&agr.sort) && !presorted) { input = sort_execute (input, &agr.sort); subcase_clear (&agr.sort); } for (grouper = casegrouper_create_vars (input, agr.break_vars, agr.break_var_cnt); casegrouper_get_next_group (grouper, &group); casereader_destroy (group)) { struct casereader *placeholder = NULL; struct ccase *c = casereader_peek (group, 0); if (c == NULL) { casereader_destroy (group); continue; } initialize_aggregate_info (&agr); if ( agr.add_variables ) placeholder = casereader_clone (group); { struct ccase *cg; for (; (cg = casereader_read (group)) != NULL; case_unref (cg)) accumulate_aggregate_info (&agr, cg); } if (agr.add_variables) { struct ccase *cg; for (; (cg = casereader_read (placeholder)) != NULL; case_unref (cg)) dump_aggregate_info (&agr, output, cg); casereader_destroy (placeholder); } else { dump_aggregate_info (&agr, output, c); } case_unref (c); } if (!casegrouper_destroy (grouper)) goto error; if (!proc_commit (ds)) { input = NULL; goto error; } input = NULL; if (out_file == NULL) { struct casereader *next_input = casewriter_make_reader (output); if (next_input == NULL) goto error; dataset_set_dict (ds, agr.dict); dataset_set_source (ds, next_input); agr.dict = NULL; } else { ok = casewriter_destroy (output); output = NULL; if (!ok) goto error; } agr_destroy (&agr); fh_unref (out_file); return CMD_SUCCESS; error: if (input != NULL) proc_commit (ds); casewriter_destroy (output); agr_destroy (&agr); fh_unref (out_file); return CMD_CASCADING_FAILURE; } /* Parse all the aggregate functions. */ static bool parse_aggregate_functions (struct lexer *lexer, const struct dictionary *dict, struct agr_proc *agr) { struct agr_var *tail; /* Tail of linked list starting at agr->vars. */ /* Parse everything. */ tail = NULL; for (;;) { char **dest; char **dest_label; size_t n_dest; struct string function_name; enum mv_class exclude; const struct agr_func *function; int func_index; union agr_argument arg[2]; const struct variable **src; size_t n_src; size_t i; dest = NULL; dest_label = NULL; n_dest = 0; src = NULL; function = NULL; n_src = 0; arg[0].c = NULL; arg[1].c = NULL; ds_init_empty (&function_name); /* Parse the list of target variables. */ while (!lex_match (lexer, T_EQUALS)) { size_t n_dest_prev = n_dest; if (!parse_DATA_LIST_vars (lexer, dict, &dest, &n_dest, (PV_APPEND | PV_SINGLE | PV_NO_SCRATCH | PV_NO_DUPLICATE))) goto error; /* Assign empty labels. */ { int j; dest_label = xnrealloc (dest_label, n_dest, sizeof *dest_label); for (j = n_dest_prev; j < n_dest; j++) dest_label[j] = NULL; } if (lex_is_string (lexer)) { dest_label[n_dest - 1] = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); } } /* Get the name of the aggregation function. */ if (lex_token (lexer) != T_ID) { lex_error (lexer, _("expecting aggregation function")); goto error; } ds_assign_substring (&function_name, lex_tokss (lexer)); exclude = ds_chomp_byte (&function_name, '.') ? MV_SYSTEM : MV_ANY; for (function = agr_func_tab; function->name; function++) if (!c_strcasecmp (function->name, ds_cstr (&function_name))) break; if (NULL == function->name) { msg (SE, _("Unknown aggregation function %s."), ds_cstr (&function_name)); goto error; } ds_destroy (&function_name); func_index = function - agr_func_tab; lex_get (lexer); /* Check for leading lparen. */ if (!lex_match (lexer, T_LPAREN)) { if (function->src_vars == AGR_SV_YES) { goto error; } } else { /* Parse list of source variables. */ { int pv_opts = PV_NO_SCRATCH; if (func_index == SUM || func_index == MEAN || func_index == SD) pv_opts |= PV_NUMERIC; else if (function->n_args) pv_opts |= PV_SAME_TYPE; if (!parse_variables_const (lexer, dict, &src, &n_src, pv_opts)) goto error; } /* Parse function arguments, for those functions that require arguments. */ if (function->n_args != 0) for (i = 0; i < function->n_args; i++) { int type; lex_match (lexer, T_COMMA); if (lex_is_string (lexer)) { arg[i].c = recode_string (dict_get_encoding (agr->dict), "UTF-8", lex_tokcstr (lexer), -1); type = VAL_STRING; } else if (lex_is_number (lexer)) { arg[i].f = lex_tokval (lexer); type = VAL_NUMERIC; } else { msg (SE, _("Missing argument %zu to %s."), i + 1, function->name); goto error; } lex_get (lexer); if (type != var_get_type (src[0])) { msg (SE, _("Arguments to %s must be of same type as " "source variables."), function->name); goto error; } } /* Trailing rparen. */ if (!lex_force_match (lexer, T_RPAREN)) goto error; /* Now check that the number of source variables match the number of target variables. If we check earlier than this, the user can get very misleading error message, i.e. `AGGREGATE x=SUM(y t).' will get this error message when a proper message would be more like `unknown variable t'. */ if (n_src != n_dest) { msg (SE, _("Number of source variables (%zu) does not match " "number of target variables (%zu)."), n_src, n_dest); goto error; } if ((func_index == PIN || func_index == POUT || func_index == FIN || func_index == FOUT) && (var_is_numeric (src[0]) ? arg[0].f > arg[1].f : str_compare_rpad (arg[0].c, arg[1].c) > 0)) { union agr_argument t = arg[0]; arg[0] = arg[1]; arg[1] = t; msg (SW, _("The value arguments passed to the %s function " "are out-of-order. They will be treated as if " "they had been specified in the correct order."), function->name); } } /* Finally add these to the linked list of aggregation variables. */ for (i = 0; i < n_dest; i++) { struct agr_var *v = xzalloc (sizeof *v); /* Add variable to chain. */ if (agr->agr_vars != NULL) tail->next = v; else agr->agr_vars = v; tail = v; tail->next = NULL; v->moments = NULL; /* Create the target variable in the aggregate dictionary. */ { struct variable *destvar; v->function = func_index; if (src) { v->src = src[i]; if (var_is_alpha (src[i])) { v->function |= FSTRING; v->string = xmalloc (var_get_width (src[i])); } if (function->alpha_type == VAL_STRING) destvar = dict_clone_var_as (agr->dict, v->src, dest[i]); else { assert (var_is_numeric (v->src) || function->alpha_type == VAL_NUMERIC); destvar = dict_create_var (agr->dict, dest[i], 0); if (destvar != NULL) { struct fmt_spec f; if ((func_index == N || func_index == NMISS) && dict_get_weight (dict) != NULL) f = fmt_for_output (FMT_F, 8, 2); else f = function->format; var_set_both_formats (destvar, &f); } } } else { struct fmt_spec f; v->src = NULL; destvar = dict_create_var (agr->dict, dest[i], 0); if (destvar != NULL) { if ((func_index == N || func_index == NMISS) && dict_get_weight (dict) != NULL) f = fmt_for_output (FMT_F, 8, 2); else f = function->format; var_set_both_formats (destvar, &f); } } if (!destvar) { msg (SE, _("Variable name %s is not unique within the " "aggregate file dictionary, which contains " "the aggregate variables and the break " "variables."), dest[i]); goto error; } free (dest[i]); if (dest_label[i]) var_set_label (destvar, dest_label[i]); v->dest = destvar; } v->exclude = exclude; if (v->src != NULL) { int j; if (var_is_numeric (v->src)) for (j = 0; j < function->n_args; j++) v->arg[j].f = arg[j].f; else for (j = 0; j < function->n_args; j++) v->arg[j].c = xstrdup (arg[j].c); } } if (src != NULL && var_is_alpha (src[0])) for (i = 0; i < function->n_args; i++) { free (arg[i].c); arg[i].c = NULL; } free (src); free (dest); free (dest_label); if (!lex_match (lexer, T_SLASH)) { if (lex_token (lexer) == T_ENDCMD) return true; lex_error (lexer, "expecting end of command"); return false; } continue; error: ds_destroy (&function_name); for (i = 0; i < n_dest; i++) { free (dest[i]); free (dest_label[i]); } free (dest); free (dest_label); free (arg[0].c); free (arg[1].c); if (src && n_src && var_is_alpha (src[0])) for (i = 0; i < function->n_args; i++) { free (arg[i].c); arg[i].c = NULL; } free (src); return false; } } /* Destroys AGR. */ static void agr_destroy (struct agr_proc *agr) { struct agr_var *iter, *next; subcase_destroy (&agr->sort); free (agr->break_vars); for (iter = agr->agr_vars; iter; iter = next) { next = iter->next; if (iter->function & FSTRING) { size_t n_args; size_t i; n_args = agr_func_tab[iter->function & FUNC].n_args; for (i = 0; i < n_args; i++) free (iter->arg[i].c); free (iter->string); } else if (iter->function == SD) moments1_destroy (iter->moments); dict_destroy_internal_var (iter->subject); dict_destroy_internal_var (iter->weight); free (iter); } if (agr->dict != NULL) dict_destroy (agr->dict); } /* Execution. */ /* Accumulates aggregation data from the case INPUT. */ static void accumulate_aggregate_info (struct agr_proc *agr, const struct ccase *input) { struct agr_var *iter; double weight; bool bad_warn = true; weight = dict_get_case_weight (agr->src_dict, input, &bad_warn); for (iter = agr->agr_vars; iter; iter = iter->next) if (iter->src) { const union value *v = case_data (input, iter->src); int src_width = var_get_width (iter->src); if (var_is_value_missing (iter->src, v, iter->exclude)) { switch (iter->function) { case NMISS: case NMISS | FSTRING: iter->dbl[0] += weight; break; case NUMISS: case NUMISS | FSTRING: iter->int1++; break; } iter->saw_missing = true; continue; } /* This is horrible. There are too many possibilities. */ switch (iter->function) { case SUM: iter->dbl[0] += v->f * weight; iter->int1 = 1; break; case MEAN: iter->dbl[0] += v->f * weight; iter->dbl[1] += weight; break; case MEDIAN: { double wv ; struct ccase *cout; cout = case_create (casewriter_get_proto (iter->writer)); case_data_rw (cout, iter->subject)->f = case_data (input, iter->src)->f; wv = dict_get_case_weight (agr->src_dict, input, NULL); case_data_rw (cout, iter->weight)->f = wv; iter->cc += wv; casewriter_write (iter->writer, cout); } break; case SD: moments1_add (iter->moments, v->f, weight); break; case MAX: iter->dbl[0] = MAX (iter->dbl[0], v->f); iter->int1 = 1; break; case MAX | FSTRING: /* Need to do some kind of Unicode collation thingy here */ if (memcmp (iter->string, value_str (v, src_width), src_width) < 0) memcpy (iter->string, value_str (v, src_width), src_width); iter->int1 = 1; break; case MIN: iter->dbl[0] = MIN (iter->dbl[0], v->f); iter->int1 = 1; break; case MIN | FSTRING: if (memcmp (iter->string, value_str (v, src_width), src_width) > 0) memcpy (iter->string, value_str (v, src_width), src_width); iter->int1 = 1; break; case FGT: case PGT: if (v->f > iter->arg[0].f) iter->dbl[0] += weight; iter->dbl[1] += weight; break; case FGT | FSTRING: case PGT | FSTRING: if (memcmp (iter->arg[0].c, value_str (v, src_width), src_width) < 0) iter->dbl[0] += weight; iter->dbl[1] += weight; break; case FLT: case PLT: if (v->f < iter->arg[0].f) iter->dbl[0] += weight; iter->dbl[1] += weight; break; case FLT | FSTRING: case PLT | FSTRING: if (memcmp (iter->arg[0].c, value_str (v, src_width), src_width) > 0) iter->dbl[0] += weight; iter->dbl[1] += weight; break; case FIN: case PIN: if (iter->arg[0].f <= v->f && v->f <= iter->arg[1].f) iter->dbl[0] += weight; iter->dbl[1] += weight; break; case FIN | FSTRING: case PIN | FSTRING: if (memcmp (iter->arg[0].c, value_str (v, src_width), src_width) <= 0 && memcmp (iter->arg[1].c, value_str (v, src_width), src_width) >= 0) iter->dbl[0] += weight; iter->dbl[1] += weight; break; case FOUT: case POUT: if (iter->arg[0].f > v->f || v->f > iter->arg[1].f) iter->dbl[0] += weight; iter->dbl[1] += weight; break; case FOUT | FSTRING: case POUT | FSTRING: if (memcmp (iter->arg[0].c, value_str (v, src_width), src_width) > 0 || memcmp (iter->arg[1].c, value_str (v, src_width), src_width) < 0) iter->dbl[0] += weight; iter->dbl[1] += weight; break; case N: case N | FSTRING: iter->dbl[0] += weight; break; case NU: case NU | FSTRING: iter->int1++; break; case FIRST: if (iter->int1 == 0) { iter->dbl[0] = v->f; iter->int1 = 1; } break; case FIRST | FSTRING: if (iter->int1 == 0) { memcpy (iter->string, value_str (v, src_width), src_width); iter->int1 = 1; } break; case LAST: iter->dbl[0] = v->f; iter->int1 = 1; break; case LAST | FSTRING: memcpy (iter->string, value_str (v, src_width), src_width); iter->int1 = 1; break; case NMISS: case NMISS | FSTRING: case NUMISS: case NUMISS | FSTRING: /* Our value is not missing or it would have been caught earlier. Nothing to do. */ break; default: NOT_REACHED (); } } else { switch (iter->function) { case N: iter->dbl[0] += weight; break; case NU: iter->int1++; break; default: NOT_REACHED (); } } } /* Writes an aggregated record to OUTPUT. */ static void dump_aggregate_info (const struct agr_proc *agr, struct casewriter *output, const struct ccase *break_case) { struct ccase *c = case_create (dict_get_proto (agr->dict)); if ( agr->add_variables) { case_copy (c, 0, break_case, 0, dict_get_var_cnt (agr->src_dict)); } else { int value_idx = 0; int i; for (i = 0; i < agr->break_var_cnt; i++) { const struct variable *v = agr->break_vars[i]; value_copy (case_data_rw_idx (c, value_idx), case_data (break_case, v), var_get_width (v)); value_idx++; } } { struct agr_var *i; for (i = agr->agr_vars; i; i = i->next) { union value *v = case_data_rw (c, i->dest); int width = var_get_width (i->dest); if (agr->missing == COLUMNWISE && i->saw_missing && (i->function & FUNC) != N && (i->function & FUNC) != NU && (i->function & FUNC) != NMISS && (i->function & FUNC) != NUMISS) { value_set_missing (v, width); casewriter_destroy (i->writer); continue; } switch (i->function) { case SUM: v->f = i->int1 ? i->dbl[0] : SYSMIS; break; case MEAN: v->f = i->dbl[1] != 0.0 ? i->dbl[0] / i->dbl[1] : SYSMIS; break; case MEDIAN: { if ( i->writer) { struct percentile *median = percentile_create (0.5, i->cc); struct order_stats *os = &median->parent; struct casereader *sorted_reader = casewriter_make_reader (i->writer); i->writer = NULL; order_stats_accumulate (&os, 1, sorted_reader, i->weight, i->subject, i->exclude); i->dbl[0] = percentile_calculate (median, PC_HAVERAGE); statistic_destroy (&median->parent.parent); } v->f = i->dbl[0]; } break; case SD: { double variance; /* FIXME: we should use two passes. */ moments1_calculate (i->moments, NULL, NULL, &variance, NULL, NULL); if (variance != SYSMIS) v->f = sqrt (variance); else v->f = SYSMIS; } break; case MAX: case MIN: v->f = i->int1 ? i->dbl[0] : SYSMIS; break; case MAX | FSTRING: case MIN | FSTRING: if (i->int1) memcpy (value_str_rw (v, width), i->string, width); else value_set_missing (v, width); break; case FGT: case FGT | FSTRING: case FLT: case FLT | FSTRING: case FIN: case FIN | FSTRING: case FOUT: case FOUT | FSTRING: v->f = i->dbl[1] ? i->dbl[0] / i->dbl[1] : SYSMIS; break; case PGT: case PGT | FSTRING: case PLT: case PLT | FSTRING: case PIN: case PIN | FSTRING: case POUT: case POUT | FSTRING: v->f = i->dbl[1] ? i->dbl[0] / i->dbl[1] * 100.0 : SYSMIS; break; case N: case N | FSTRING: v->f = i->dbl[0]; break; case NU: case NU | FSTRING: v->f = i->int1; break; case FIRST: case LAST: v->f = i->int1 ? i->dbl[0] : SYSMIS; break; case FIRST | FSTRING: case LAST | FSTRING: if (i->int1) memcpy (value_str_rw (v, width), i->string, width); else value_set_missing (v, width); break; case NMISS: case NMISS | FSTRING: v->f = i->dbl[0]; break; case NUMISS: case NUMISS | FSTRING: v->f = i->int1; break; default: NOT_REACHED (); } } } casewriter_write (output, c); } /* Resets the state for all the aggregate functions. */ static void initialize_aggregate_info (struct agr_proc *agr) { struct agr_var *iter; for (iter = agr->agr_vars; iter; iter = iter->next) { iter->saw_missing = false; iter->dbl[0] = iter->dbl[1] = iter->dbl[2] = 0.0; iter->int1 = iter->int2 = 0; switch (iter->function) { case MIN: iter->dbl[0] = DBL_MAX; break; case MIN | FSTRING: memset (iter->string, 255, var_get_width (iter->src)); break; case MAX: iter->dbl[0] = -DBL_MAX; break; case MAX | FSTRING: memset (iter->string, 0, var_get_width (iter->src)); break; case MEDIAN: { struct caseproto *proto; struct subcase ordering; proto = caseproto_create (); proto = caseproto_add_width (proto, 0); proto = caseproto_add_width (proto, 0); if ( ! iter->subject) iter->subject = dict_create_internal_var (0, 0); if ( ! iter->weight) iter->weight = dict_create_internal_var (1, 0); subcase_init_var (&ordering, iter->subject, SC_ASCEND); iter->writer = sort_create_writer (&ordering, proto); subcase_destroy (&ordering); caseproto_unref (proto); iter->cc = 0; } break; case SD: if (iter->moments == NULL) iter->moments = moments1_create (MOMENT_VARIANCE); else moments1_clear (iter->moments); break; default: break; } } } pspp-1.0.1/src/language/stats/aggregate.h0000644000175000017500000000336612470243700015232 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef AGGREGATE_H #define AGGREGATE_H #include #include "data/format.h" #include "data/val-type.h" enum agr_src_vars { AGR_SV_NO, AGR_SV_YES, AGR_SV_OPT }; /* Aggregation functions. */ enum { SUM, MEAN, MEDIAN, SD, MAX, MIN, PGT, PLT, PIN, POUT, FGT, FLT, FIN, FOUT, N, NU, NMISS, NUMISS, FIRST, LAST, FUNC = 0x1f, /* Function mask. */ FSTRING = 1<<5, /* String function bit. */ }; /* Attributes of an aggregation function. */ struct agr_func { const char *name; /* Aggregation function name. */ const char *description; /* Translatable string describing the function. */ enum agr_src_vars src_vars; /* Whether source variables are a parameter of the function */ size_t n_args; /* Number of arguments (not including src vars). */ enum val_type alpha_type; /* When given ALPHA arguments, output type. */ struct fmt_spec format; /* Format spec if alpha_type != ALPHA. */ }; extern const struct agr_func agr_func_tab[]; #endif pspp-1.0.1/src/language/stats/friedman.c0000644000175000017500000001717013137223525015066 00000000000000/* PSPP - a program for statistical analysis. -*-c-*- Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/friedman.h" #include #include #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/variable.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct friedman { double *rank_sum; double cc; double chi_sq; double w; const struct dictionary *dict; }; static void show_ranks_box (const struct one_sample_test *ost, const struct friedman *fr); static void show_sig_box (const struct one_sample_test *ost, const struct friedman *fr); struct datum { long posn; double x; }; static int cmp_x (const void *a_, const void *b_) { const struct datum *a = a_; const struct datum *b = b_; if (a->x < b->x) return -1; return (a->x > b->x); } static int cmp_posn (const void *a_, const void *b_) { const struct datum *a = a_; const struct datum *b = b_; if (a->posn < b->posn) return -1; return (a->posn > b->posn); } void friedman_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact UNUSED, double timer UNUSED) { double numerator = 0.0; double denominator = 0.0; int v; struct ccase *c; const struct dictionary *dict = dataset_dict (ds); const struct variable *weight = dict_get_weight (dict); struct one_sample_test *ost = UP_CAST (test, struct one_sample_test, parent); struct friedman_test *ft = UP_CAST (ost, struct friedman_test, parent); bool warn = true; double sigma_t = 0.0; struct datum *row = xcalloc (ost->n_vars, sizeof *row); double rsq; struct friedman fr; fr.rank_sum = xcalloc (ost->n_vars, sizeof *fr.rank_sum); fr.cc = 0.0; fr.dict = dict; for (v = 0; v < ost->n_vars; ++v) { row[v].posn = v; fr.rank_sum[v] = 0.0; } input = casereader_create_filter_weight (input, dict, &warn, NULL); input = casereader_create_filter_missing (input, ost->vars, ost->n_vars, exclude, 0, 0); for (; (c = casereader_read (input)); case_unref (c)) { double prev_x = SYSMIS; int run_length = 0; const double w = weight ? case_data (c, weight)->f: 1.0; fr.cc += w; for (v = 0; v < ost->n_vars; ++v) { const struct variable *var = ost->vars[v]; const union value *val = case_data (c, var); row[v].x = val->f; } qsort (row, ost->n_vars, sizeof *row, cmp_x); for (v = 0; v < ost->n_vars; ++v) { double x = row[v].x; /* Replace value by the Rank */ if ( prev_x == x) { /* Deal with ties */ int i; run_length++; for (i = v - run_length; i < v; ++i) { row[i].x *= run_length ; row[i].x += v + 1; row[i].x /= run_length + 1; } row[v].x = row[v-1].x; } else { row[v].x = v + 1; if ( run_length > 0) { double t = run_length + 1; sigma_t += w * (pow3 (t) - t); } run_length = 0; } prev_x = x; } if ( run_length > 0) { double t = run_length + 1; sigma_t += w * (pow3 (t) - t ); } qsort (row, ost->n_vars, sizeof *row, cmp_posn); for (v = 0; v < ost->n_vars; ++v) fr.rank_sum[v] += row[v].x * w; } casereader_destroy (input); free (row); for (v = 0; v < ost->n_vars; ++v) { numerator += pow2 (fr.rank_sum[v]); } rsq = numerator; numerator *= 12.0 / (fr.cc * ost->n_vars * ( ost->n_vars + 1)); numerator -= 3 * fr.cc * ( ost->n_vars + 1); denominator = 1 - sigma_t / ( fr.cc * ost->n_vars * ( pow2 (ost->n_vars) - 1)); fr.chi_sq = numerator / denominator; if ( ft->kendalls_w) { fr.w = 12 * rsq ; fr.w -= 3 * pow2 (fr.cc) * ost->n_vars * pow2 (ost->n_vars + 1); fr.w /= pow2 (fr.cc) * (pow3 (ost->n_vars) - ost->n_vars) - fr.cc * sigma_t; } else fr.w = SYSMIS; show_ranks_box (ost, &fr); show_sig_box (ost, &fr); free (fr.rank_sum); } static void show_ranks_box (const struct one_sample_test *ost, const struct friedman *fr) { int i; const int row_headers = 1; const int column_headers = 1; struct tab_table *table = tab_create (row_headers + 1, column_headers + ost->n_vars); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Ranks")); /* Vertical lines inside the box */ tab_box (table, 1, 0, -1, TAL_1, row_headers, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); /* Box around the table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_text (table, 1, 0, 0, _("Mean Rank")); tab_hline (table, TAL_2, 0, tab_nc (table) - 1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); for (i = 0 ; i < ost->n_vars ; ++i) { tab_text (table, 0, row_headers + i, TAB_LEFT, var_to_string (ost->vars[i])); tab_double (table, 1, row_headers + i, 0, fr->rank_sum[i] / fr->cc, NULL, RC_OTHER); } tab_submit (table); } static void show_sig_box (const struct one_sample_test *ost, const struct friedman *fr) { const struct friedman_test *ft = UP_CAST (ost, const struct friedman_test, parent); int row = 0; const struct variable *weight = dict_get_weight (fr->dict); const struct fmt_spec *wfmt = weight ? var_get_print_format (weight) : &F_8_0; const int row_headers = 1; const int column_headers = 0; struct tab_table *table = tab_create (row_headers + 1, column_headers + (ft->kendalls_w ? 5 : 4)); tab_set_format (table, RC_WEIGHT, wfmt); tab_headers (table, row_headers, 0, column_headers, 0); tab_title (table, _("Test Statistics")); tab_text (table, 0, column_headers + row++, TAT_TITLE | TAB_LEFT , _("N")); if ( ft->kendalls_w) tab_text (table, 0, column_headers + row++, TAT_TITLE | TAB_LEFT , _("Kendall's W")); tab_text (table, 0, column_headers + row++, TAT_TITLE | TAB_LEFT , _("Chi-Square")); tab_text (table, 0, column_headers + row++, TAT_TITLE | TAB_LEFT, _("df")); tab_text (table, 0, column_headers + row++, TAT_TITLE | TAB_LEFT, _("Asymp. Sig.")); /* Box around the table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers); tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1); row = 0; tab_double (table, 1, column_headers + row++, 0, fr->cc, NULL, RC_WEIGHT); if (ft->kendalls_w) tab_double (table, 1, column_headers + row++, 0, fr->w, NULL, RC_OTHER); tab_double (table, 1, column_headers + row++, 0, fr->chi_sq, NULL, RC_OTHER); tab_double (table, 1, column_headers + row++, 0, ost->n_vars - 1, NULL, RC_INTEGER); tab_double (table, 1, column_headers + row++, 0, gsl_cdf_chisq_Q (fr->chi_sq, ost->n_vars - 1), NULL, RC_PVALUE); tab_submit (table); } pspp-1.0.1/src/language/stats/sign.c0000644000175000017500000001432312523704223014233 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/stats/sign.h" #include #include #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/missing-values.h" #include "data/variable.h" #include "language/stats/npar.h" #include "libpspp/str.h" #include "output/tab.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct sign_test_params { double pos; double ties; double neg; double one_tailed_sig; double point_prob; }; static void output_frequency_table (const struct two_sample_test *t2s, const struct sign_test_params *param, const struct dictionary *dict) { int i; struct tab_table *table = tab_create (3, 1 + 4 * t2s->n_pairs); const struct variable *wv = dict_get_weight (dict); const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0; tab_set_format (table, RC_WEIGHT, wfmt); tab_title (table, _("Frequencies")); tab_headers (table, 2, 0, 1, 0); /* Vertical lines inside the box */ tab_box (table, 0, 0, -1, TAL_1, 1, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); /* Box around entire table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 ); tab_text (table, 2, 0, TAB_CENTER, _("N")); for (i = 0 ; i < t2s->n_pairs; ++i) { variable_pair *vp = &t2s->pairs[i]; struct string pair_name; ds_init_cstr (&pair_name, var_to_string ((*vp)[0])); ds_put_cstr (&pair_name, " - "); ds_put_cstr (&pair_name, var_to_string ((*vp)[1])); tab_text (table, 0, 1 + i * 4, TAB_LEFT, ds_cstr (&pair_name)); ds_destroy (&pair_name); tab_hline (table, TAL_1, 0, tab_nc (table) - 1, 1 + i * 4); tab_text (table, 1, 1 + i * 4, TAB_LEFT, _("Negative Differences")); tab_text (table, 1, 2 + i * 4, TAB_LEFT, _("Positive Differences")); tab_text (table, 1, 3 + i * 4, TAB_LEFT, _("Ties")); tab_text (table, 1, 4 + i * 4, TAB_LEFT, _("Total")); tab_double (table, 2, 1 + i * 4, TAB_RIGHT, param[i].neg, NULL, RC_WEIGHT); tab_double (table, 2, 2 + i * 4, TAB_RIGHT, param[i].pos, NULL, RC_WEIGHT); tab_double (table, 2, 3 + i * 4, TAB_RIGHT, param[i].ties, NULL, RC_WEIGHT); tab_double (table, 2, 4 + i * 4, TAB_RIGHT, param[i].ties + param[i].neg + param[i].pos, NULL, RC_WEIGHT); } tab_submit (table); } static void output_statistics_table (const struct two_sample_test *t2s, const struct sign_test_params *param) { int i; struct tab_table *table = tab_create (1 + t2s->n_pairs, 4); tab_title (table, _("Test Statistics")); tab_headers (table, 0, 1, 0, 1); tab_hline (table, TAL_2, 0, tab_nc (table) - 1, 1); tab_vline (table, TAL_2, 1, 0, tab_nr (table) - 1); /* Vertical lines inside the box */ tab_box (table, -1, -1, -1, TAL_1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1); /* Box around entire table */ tab_box (table, TAL_2, TAL_2, -1, -1, 0, 0, tab_nc (table) - 1, tab_nr (table) - 1); tab_text (table, 0, 1, TAT_TITLE | TAB_LEFT, _("Exact Sig. (2-tailed)")); tab_text (table, 0, 2, TAT_TITLE | TAB_LEFT, _("Exact Sig. (1-tailed)")); tab_text (table, 0, 3, TAT_TITLE | TAB_LEFT, _("Point Probability")); for (i = 0 ; i < t2s->n_pairs; ++i) { variable_pair *vp = &t2s->pairs[i]; struct string pair_name; ds_init_cstr (&pair_name, var_to_string ((*vp)[0])); ds_put_cstr (&pair_name, " - "); ds_put_cstr (&pair_name, var_to_string ((*vp)[1])); tab_text (table, 1 + i, 0, TAB_LEFT, ds_cstr (&pair_name)); ds_destroy (&pair_name); tab_double (table, 1 + i, 1, TAB_RIGHT, param[i].one_tailed_sig * 2, NULL, RC_PVALUE); tab_double (table, 1 + i, 2, TAB_RIGHT, param[i].one_tailed_sig, NULL, RC_PVALUE); tab_double (table, 1 + i, 3, TAB_RIGHT, param[i].point_prob, NULL, RC_PVALUE); } tab_submit (table); } void sign_execute (const struct dataset *ds, struct casereader *input, enum mv_class exclude, const struct npar_test *test, bool exact UNUSED, double timer UNUSED) { int i; bool warn = true; const struct dictionary *dict = dataset_dict (ds); const struct two_sample_test *t2s = UP_CAST (test, const struct two_sample_test, parent); struct ccase *c; struct sign_test_params *stp = xcalloc (t2s->n_pairs, sizeof *stp); struct casereader *r = input; for (; (c = casereader_read (r)) != NULL; case_unref (c)) { const double weight = dict_get_case_weight (dict, c, &warn); for (i = 0 ; i < t2s->n_pairs; ++i ) { variable_pair *vp = &t2s->pairs[i]; const union value *value0 = case_data (c, (*vp)[0]); const union value *value1 = case_data (c, (*vp)[1]); const double diff = value0->f - value1->f; if (var_is_value_missing ((*vp)[0], value0, exclude)) continue; if (var_is_value_missing ((*vp)[1], value1, exclude)) continue; if ( diff > 0) stp[i].pos += weight; else if (diff < 0) stp[i].neg += weight; else stp[i].ties += weight; } } casereader_destroy (r); for (i = 0 ; i < t2s->n_pairs; ++i ) { int r = MIN (stp[i].pos, stp[i].neg); stp[i].one_tailed_sig = gsl_cdf_binomial_P (r, 0.5, stp[i].pos + stp[i].neg); stp[i].point_prob = gsl_ran_binomial_pdf (r, 0.5, stp[i].pos + stp[i].neg); } output_frequency_table (t2s, stp, dict); output_statistics_table (t2s, stp); free (stp); } pspp-1.0.1/src/language/stats/npar-summary.h0000644000175000017500000000253012470243700015727 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !n_par_summary_h #define n_par_summary_h 1 #include "data/missing-values.h" struct variable ; struct casereader ; struct dictionary; struct descriptives { double n; double mean; double std_dev; double min; double max; }; void do_summary_box (const struct descriptives *desc, const struct variable *const *vv, int n_vars); void npar_summary_calc_descriptives (struct descriptives *desc, struct casereader *input, const struct dictionary *dict, const struct variable *const *vv, int n_vars, enum mv_class filter); #endif pspp-1.0.1/src/language/stats/flip.c0000644000175000017500000003277413137223525014242 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include "data/case.h" #include "data/casereader.h" #include "data/casereader-provider.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/settings.h" #include "data/short-names.h" #include "data/value.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "data/data-in.h" #include "data/data-out.h" #include "gl/intprops.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* List of variable names. */ struct var_names { const char **names; size_t n_names, allocated_names; }; static void var_names_init (struct var_names *); static void var_names_add (struct pool *, struct var_names *, const char *); /* Represents a FLIP input program. */ struct flip_pgm { struct pool *pool; /* Pool containing FLIP data. */ size_t n_vars; /* Pre-flip number of variables. */ int n_cases; /* Pre-flip number of cases. */ struct variable *new_names_var; /* Variable with new variable names. */ const char *encoding; /* Variable names' encoding. */ struct var_names old_names; /* Variable names before FLIP. */ struct var_names new_names; /* Variable names after FLIP. */ FILE *file; /* Temporary file containing data. */ size_t cases_read; /* Number of cases already read. */ bool error; /* Error reading temporary file? */ }; static const struct casereader_class flip_casereader_class; static void destroy_flip_pgm (struct flip_pgm *); static bool flip_file (struct flip_pgm *); static void make_new_var (struct dictionary *, const char *name); /* Parses and executes FLIP. */ int cmd_flip (struct lexer *lexer, struct dataset *ds) { struct dictionary *old_dict = dataset_dict (ds); struct dictionary *new_dict = NULL; const struct variable **vars; struct flip_pgm *flip; struct casereader *input, *reader; struct ccase *c; size_t i; bool ok; if (proc_make_temporary_transformations_permanent (ds)) msg (SW, _("%s ignores %s. " "Temporary transformations will be made permanent."), "FLIP", "TEMPORARY"); flip = pool_create_container (struct flip_pgm, pool); flip->n_vars = 0; flip->n_cases = 0; flip->new_names_var = NULL; var_names_init (&flip->old_names); var_names_init (&flip->new_names); flip->file = NULL; flip->cases_read = 0; flip->error = false; lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "VARIABLES")) { lex_match (lexer, T_EQUALS); if (!parse_variables_const (lexer, old_dict, &vars, &flip->n_vars, PV_NO_DUPLICATE)) goto error; lex_match (lexer, T_SLASH); } else dict_get_vars (old_dict, &vars, &flip->n_vars, DC_SYSTEM); pool_register (flip->pool, free, vars); lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "NEWNAMES")) { lex_match (lexer, T_EQUALS); flip->new_names_var = parse_variable (lexer, old_dict); if (!flip->new_names_var) goto error; } else flip->new_names_var = dict_lookup_var (old_dict, "CASE_LBL"); if (flip->new_names_var) { for (i = 0; i < flip->n_vars; i++) if (vars[i] == flip->new_names_var) { remove_element (vars, flip->n_vars, sizeof *vars, i); flip->n_vars--; break; } } if (flip->n_vars <= 0) goto error; flip->file = pool_create_temp_file (flip->pool); if (flip->file == NULL) { msg (SE, _("Could not create temporary file for %s."), "FLIP"); goto error; } /* Save old variable names for use as values of CASE_LBL variable in flipped file. */ for (i = 0; i < flip->n_vars; i++) var_names_add (flip->pool, &flip->old_names, pool_strdup (flip->pool, var_get_name (vars[i]))); /* Read the active dataset into a flip_sink. */ proc_discard_output (ds); /* Save old dictionary. */ new_dict = dict_clone (old_dict); flip->encoding = dict_get_encoding (new_dict); dict_clear (new_dict); input = proc_open_filtering (ds, false); while ((c = casereader_read (input)) != NULL) { flip->n_cases++; for (i = 0; i < flip->n_vars; i++) { const struct variable *v = vars[i]; double out = var_is_numeric (v) ? case_num (c, v) : SYSMIS; fwrite (&out, sizeof out, 1, flip->file); } if (flip->new_names_var != NULL) { const union value *value = case_data (c, flip->new_names_var); const char *name; if (var_is_numeric (flip->new_names_var)) { double f = value->f; name = (f == SYSMIS ? "VSYSMIS" : f < INT_MIN ? "VNEGINF" : f > INT_MAX ? "VPOSINF" : pool_asprintf (flip->pool, "V%d", (int) f)); } else { name = data_out_pool (value, dict_get_encoding (old_dict), var_get_write_format (flip->new_names_var), flip->pool); } var_names_add (flip->pool, &flip->new_names, name); } case_unref (c); } ok = casereader_destroy (input); ok = proc_commit (ds) && ok; /* Flip the data we read. */ if (!ok || !flip_file (flip)) { dataset_clear (ds); goto error; } /* Flip the dictionary. */ dict_create_var_assert (new_dict, "CASE_LBL", 8); for (i = 0; i < flip->n_cases; i++) if (flip->new_names.n_names) make_new_var (new_dict, flip->new_names.names[i]); else { char s[3 + INT_STRLEN_BOUND (i) + 1]; sprintf (s, "VAR%03zu", i); dict_create_var_assert (new_dict, s, 0); } /* Set up flipped data for reading. */ reader = casereader_create_sequential (NULL, dict_get_proto (new_dict), flip->n_vars, &flip_casereader_class, flip); dataset_set_dict (ds, new_dict); dataset_set_source (ds, reader); return CMD_SUCCESS; error: dict_destroy (new_dict); destroy_flip_pgm (flip); return CMD_CASCADING_FAILURE; } /* Destroys FLIP. */ static void destroy_flip_pgm (struct flip_pgm *flip) { if (flip != NULL) pool_destroy (flip->pool); } /* Make a new variable with base name NAME, which is bowdlerized and mangled until acceptable. */ static void make_new_var (struct dictionary *dict, const char *name_) { char *name = xstrdup (name_); char *cp; /* Trim trailing spaces. */ cp = strchr (name, '\0'); while (cp > name && isspace ((unsigned char) cp[-1])) *--cp = '\0'; /* Fix invalid characters. */ for (cp = name; *cp && cp < name + ID_MAX_LEN; cp++) if (cp == name) { if (!lex_is_id1 (*cp) || *cp == '$') *cp = 'V'; } else { if (!lex_is_idn (*cp)) *cp = '_'; } *cp = '\0'; if (strlen (name) == 0) { free (name); name = xstrdup ("v"); } /* Use the mangled name, if it is available, or add numeric extensions until we find one that is. */ if (!id_is_plausible (name, false) || !dict_create_var (dict, name, 0)) { int len = strlen (name); int i; for (i = 1; ; i++) { char n[ID_MAX_LEN + 1]; int ofs = MIN (ID_MAX_LEN - 1 - intlog10 (i), len); strncpy (n, name, ofs); sprintf (&n[ofs], "%d", i); if (id_is_plausible (n, false) && dict_create_var (dict, n, 0)) break; } } free (name); } /* Transposes the external file into a new file. */ static bool flip_file (struct flip_pgm *flip) { size_t case_bytes; size_t case_capacity; size_t case_idx; double *input_buf, *output_buf; FILE *input_file, *output_file; /* Allocate memory for many cases. */ case_bytes = flip->n_vars * sizeof *input_buf; case_capacity = settings_get_workspace () / case_bytes; if (case_capacity > flip->n_cases * 2) case_capacity = flip->n_cases * 2; if (case_capacity < 2) case_capacity = 2; for (;;) { size_t bytes = case_bytes * case_capacity; if (case_capacity > 2) input_buf = malloc (bytes); else input_buf = xmalloc (bytes); if (input_buf != NULL) break; case_capacity /= 2; if (case_capacity < 2) case_capacity = 2; } pool_register (flip->pool, free, input_buf); /* Use half the allocated memory for input_buf, half for output_buf. */ case_capacity /= 2; output_buf = input_buf + flip->n_vars * case_capacity; input_file = flip->file; if (fseeko (input_file, 0, SEEK_SET) != 0) { msg (SE, _("Error rewinding %s file: %s."), "FLIP", strerror (errno)); return false; } output_file = pool_create_temp_file (flip->pool); if (output_file == NULL) { msg (SE, _("Error creating %s source file."), "FLIP"); return false; } for (case_idx = 0; case_idx < flip->n_cases; ) { unsigned long read_cases = MIN (flip->n_cases - case_idx, case_capacity); size_t i; if (read_cases != fread (input_buf, case_bytes, read_cases, input_file)) { if (ferror (input_file)) msg (SE, _("Error reading %s file: %s."), "FLIP", strerror (errno)); else msg (SE, _("Unexpected end of file reading %s file."), "FLIP"); return false; } for (i = 0; i < flip->n_vars; i++) { unsigned long j; for (j = 0; j < read_cases; j++) output_buf[j] = input_buf[i + j * flip->n_vars]; if (fseeko (output_file, sizeof *input_buf * (case_idx + (off_t) i * flip->n_cases), SEEK_SET) != 0) { msg (SE, _("Error seeking %s source file: %s."), "FLIP", strerror (errno)); return false; } if (fwrite (output_buf, sizeof *output_buf, read_cases, output_file) != read_cases) { msg (SE, _("Error writing %s source file: %s."), "FLIP", strerror (errno)); return false; } } case_idx += read_cases; } pool_fclose_temp_file (flip->pool, input_file); pool_unregister (flip->pool, input_buf); free (input_buf); if (fseeko (output_file, 0, SEEK_SET) != 0) { msg (SE, _("Error rewinding %s source file: %s."), "FLIP", strerror (errno)); return false; } flip->file = output_file; return true; } /* Reads and returns one case. Returns a null pointer at end of file or if an I/O error occurred. */ static struct ccase * flip_casereader_read (struct casereader *reader, void *flip_) { struct flip_pgm *flip = flip_; struct ccase *c; size_t i; if (flip->error || flip->cases_read >= flip->n_vars) return false; c = case_create (casereader_get_proto (reader)); data_in (ss_cstr (flip->old_names.names[flip->cases_read]), flip->encoding, FMT_A, case_data_rw_idx (c, 0), 8, flip->encoding); for (i = 0; i < flip->n_cases; i++) { double in; if (fread (&in, sizeof in, 1, flip->file) != 1) { case_unref (c); if (ferror (flip->file)) msg (SE, _("Error reading %s temporary file: %s."), "FLIP", strerror (errno)); else if (feof (flip->file)) msg (SE, _("Unexpected end of file reading %s temporary file."), "FLIP"); else NOT_REACHED (); flip->error = true; return NULL; } case_data_rw_idx (c, i + 1)->f = in; } flip->cases_read++; return c; } /* Destroys the source. Returns true if successful read, false if an I/O occurred during destruction or previously. */ static void flip_casereader_destroy (struct casereader *reader UNUSED, void *flip_) { struct flip_pgm *flip = flip_; if (flip->error) casereader_force_error (reader); destroy_flip_pgm (flip); } static const struct casereader_class flip_casereader_class = { flip_casereader_read, flip_casereader_destroy, NULL, NULL, }; static void var_names_init (struct var_names *vn) { vn->names = NULL; vn->n_names = 0; vn->allocated_names = 0; } static void var_names_add (struct pool *pool, struct var_names *vn, const char *name) { if (vn->n_names >= vn->allocated_names) vn->names = pool_2nrealloc (pool, vn->names, &vn->allocated_names, sizeof *vn->names); vn->names[vn->n_names++] = name; } pspp-1.0.1/src/language/command.h0000644000175000017500000000464712470434665013603 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef COMMAND_H #define COMMAND_H 1 #include /* Command return values. */ enum cmd_result { /* Successful return values. */ CMD_SUCCESS = 1, /* Successfully parsed and executed. */ CMD_EOF = 2, /* End of input. */ CMD_FINISH = 3, /* FINISH was executed. */ /* Successful return values returned by specific commands to let INPUT PROGRAM function properly. */ CMD_DATA_LIST, CMD_END_CASE, CMD_END_FILE, /* Various kinds of failures. */ CMD_FAILURE = -1, /* Not executed at all. */ CMD_NOT_IMPLEMENTED = -2, /* Command not implemented. */ CMD_CASCADING_FAILURE = -3 /* Serious error: don't continue. */ }; bool cmd_result_is_success (enum cmd_result); bool cmd_result_is_failure (enum cmd_result); /* Command processing state. */ enum cmd_state { CMD_STATE_INITIAL, /* No active dataset yet defined. */ CMD_STATE_DATA, /* Active dataset has been defined. */ CMD_STATE_INPUT_PROGRAM, /* Inside INPUT PROGRAM. */ CMD_STATE_FILE_TYPE /* Inside FILE TYPE. */ }; struct dataset; struct lexer; enum cmd_result cmd_parse_in_state (struct lexer *lexer, struct dataset *ds, enum cmd_state); enum cmd_result cmd_parse (struct lexer *lexer, struct dataset *ds); struct command; const char *cmd_complete (const char *, const struct command **); struct dataset; /* Prototype all the command functions. */ #define DEF_CMD(STATES, FLAGS, NAME, FUNCTION) int FUNCTION (struct lexer *, struct dataset *); #define UNIMPL_CMD(NAME, DESCRIPTION) #include "command.def" #undef DEF_CMD #undef UNIMPL_CMD #endif /* command.h */ pspp-1.0.1/src/language/lexer/0000755000175000017500000000000013150620333013161 500000000000000pspp-1.0.1/src/language/lexer/q2c.c0000644000175000017500000013406212470434665013757 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include #include /* GNU C allows the programmer to declare that certain functions take printf-like arguments, never return, etc. Conditionalize these declarations on whether gcc is in use. */ #if __GNUC__ > 1 #define ATTRIBUTE(X) __attribute__ (X) #else #define ATTRIBUTE(X) #endif /* Marks a function argument as possibly not used. */ #define UNUSED ATTRIBUTE ((unused)) /* Marks a function that will never return. */ #define NO_RETURN ATTRIBUTE ((noreturn)) /* Mark a function as taking a printf- or scanf-like format string as its FMT'th argument and that the FIRST'th argument is the first one to be checked against the format string. */ #define PRINTF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (__printf__, FMT, FIRST))) /* Max length of an input line. */ #define MAX_LINE_LEN 1024 /* Max token length. */ #define MAX_TOK_LEN 1024 /* argv[0]. */ static char *program_name; /* Have the input and output files been opened yet? */ static bool is_open; /* Input, output files. */ static FILE *in, *out; /* Input, output file names. */ static char *ifn, *ofn; /* Input, output file line number. */ static int ln, oln = 1; /* Input line buffer, current position. */ static char *buf, *cp; /* Token types. */ enum { T_STRING = 256, /* String literal. */ T_ID = 257 /* Identifier. */ }; /* Current token: either one of the above, or a single character. */ static int token; /* Token string value. */ static char *tokstr; /* Utility functions. */ /* Close all open files and delete the output file, on failure. */ static void finish_up (void) { if (!is_open) return; is_open = false; fclose (in); fclose (out); if (remove (ofn) == -1) fprintf (stderr, "%s: %s: remove: %s\n", program_name, ofn, strerror (errno)); } void hcf (void) NO_RETURN; /* Terminate unsuccessfully. */ void hcf (void) { finish_up (); exit (EXIT_FAILURE); } int fail (const char *, ...) PRINTF_FORMAT (1, 2) NO_RETURN; int error (const char *, ...) PRINTF_FORMAT (1, 2) NO_RETURN; /* Output an error message and terminate unsuccessfully. */ int fail (const char *format, ...) { va_list args; va_start (args, format); fprintf (stderr, "%s: ", program_name); vfprintf (stderr, format, args); fprintf (stderr, "\n"); va_end (args); hcf (); } /* Output a context-dependent error message and terminate unsuccessfully. */ int error (const char *format,...) { va_list args; va_start (args, format); fprintf (stderr, "%s:%d: (column %d) ", ifn, ln, (int) (cp - buf)); vfprintf (stderr, format, args); fprintf (stderr, "\n"); va_end (args); hcf (); } #define VME "virtual memory exhausted" /* Allocate a block of SIZE bytes and return a pointer to its beginning. */ static void * xmalloc (size_t size) { void *vp; if (size == 0) return NULL; vp = malloc (size); if (!vp) fail ("xmalloc(%lu): %s", (unsigned long) size, VME); return vp; } /* Make a dynamically allocated copy of string S and return a pointer to the first character. */ static char * xstrdup (const char *s) { size_t size; char *t; assert (s != NULL); size = strlen (s) + 1; t = malloc (size); if (!t) fail ("xstrdup(%lu): %s", (unsigned long) strlen (s), VME); memcpy (t, s, size); return t; } /* Returns a pointer to one of 8 static buffers. The buffers are used in rotation. */ static char * get_buffer (void) { static char b[8][256]; static int cb; if (++cb >= 8) cb = 0; return b[cb]; } /* Copies a string to a static buffer, converting it to lowercase in the process, and returns a pointer to the static buffer. */ static char * st_lower (const char *s) { char *p, *cp; p = cp = get_buffer (); while (*s) *cp++ = tolower ((unsigned char) (*s++)); *cp++ = '\0'; return p; } /* Copies a string to a static buffer, converting it to uppercase in the process, and returns a pointer to the static buffer. */ static char * st_upper (const char *s) { char *p, *cp; p = cp = get_buffer (); while (*s) *cp++ = toupper ((unsigned char) (*s++)); *cp++ = '\0'; return p; } /* Returns the address of the first non-whitespace character in S, or the address of the null terminator if none. */ static char * skip_ws (char *s) { while (isspace ((unsigned char) *s)) s++; return s; } /* Read one line from the input file into buf. Lines having special formats are handled specially. */ static bool get_line (void) { ln++; if (0 == fgets (buf, MAX_LINE_LEN, in)) { if (ferror (in)) fail ("%s: fgets: %s", ifn, strerror (errno)); return false; } cp = strchr (buf, '\n'); if (cp != NULL) *cp = '\0'; cp = buf; return true; } /* Symbol table manager. */ /* Symbol table entry. */ typedef struct symbol symbol; struct symbol { symbol *next; /* Next symbol in symbol table. */ char *name; /* Symbol name. */ int unique; /* 1=Name must be unique in this file. */ int ln; /* Line number of definition. */ int value; /* Symbol value. */ }; /* Symbol table. */ symbol *symtab; /* Add a symbol to the symbol table having name NAME, uniqueness UNIQUE, and value VALUE. If a symbol having the same name is found in the symbol table, its sequence number is returned and the symbol table is not modified. Otherwise, the symbol is added and the next available sequence number is returned. */ static int add_symbol (const char *name, int unique, int value) { symbol *iter, *sym; int x; sym = xmalloc (sizeof *sym); sym->name = xstrdup (name); sym->unique = unique; sym->value = value; sym->next = NULL; sym->ln = ln; if (!symtab) { symtab = sym; return 1; } iter = symtab; x = 1; for (;;) { if (!strcmp (iter->name, name)) { if (iter->unique) { fprintf (stderr, "%s:%d: `%s' is already defined above\n", ifn, ln, name); fprintf (stderr, "%s:%d: location of previous definition\n", ifn, iter->ln); hcf (); } free (sym->name); free (sym); return x; } if (!iter->next) break; iter = iter->next; x++; } iter->next = sym; return ++x; } /* Finds the symbol having given sequence number X within the symbol table, and returns the associated symbol structure. */ static symbol * find_symbol (int x) { symbol *iter; iter = symtab; while (x > 1 && iter) { iter = iter->next; x--; } assert (iter); return iter; } #if DUMP_TOKENS /* Writes a printable representation of the current token to stdout. */ static void dump_token (void) { switch (token) { case T_STRING: printf ("STRING\t\"%s\"\n", tokstr); break; case T_ID: printf ("ID\t%s\n", tokstr); break; default: printf ("PUNCT\t%c\n", token); } } #endif /* DUMP_TOKENS */ const char hyphen_proxy = '_'; static void id_cpy (char **cp) { char *dest = tokstr; char *src = *cp; while (*src == '_' || *src == '-' || isalnum ((unsigned char) *src)) { *dest++ = *src == '-' ? hyphen_proxy :toupper ((unsigned char) (*src)); src++; } *cp = src; *dest++ = '\0'; } static char * unmunge (const char *s) { char *dest = xmalloc (strlen (s) + 1); char *d = dest; while (*s) { if (*s == hyphen_proxy) *d = '-'; else *d = *s; s++; d++; } *d = '\0'; return dest; } /* Reads a token from the input file. */ static int lex_get (void) { /* Skip whitespace and check for end of file. */ for (;;) { cp = skip_ws (cp); if (*cp != '\0') break; if (!get_line ()) fail ("%s: Unexpected end of file.", ifn); } if (*cp == '"') { char *dest = tokstr; token = T_STRING; cp++; while (*cp != '"' && *cp) { if (*cp == '\\') { cp++; if (!*cp) error ("Unterminated string literal."); *dest++ = *cp++; } else *dest++ = *cp++; } *dest++ = 0; if (!*cp) error ("Unterminated string literal."); cp++; } else if (*cp == '_' || isalnum ((unsigned char) *cp)) { char *dest = tokstr; token = T_ID; id_cpy (&cp); } else token = *cp++; #if DUMP_TOKENS dump_token (); #endif return token; } /* Force the current token to be an identifier token. */ static void force_id (void) { if (token != T_ID) error ("Identifier expected."); } /* Force the current token to be a string token. */ static void force_string (void) { if (token != T_STRING) error ("String expected."); } /* Checks whether the current token is the identifier S; if so, skips the token and returns true; otherwise, returns false. */ static bool match_id (const char *s) { if (token == T_ID && !strcmp (tokstr, s)) { lex_get (); return true; } return false; } /* Checks whether the current token is T. If so, skips the token and returns true; otherwise, returns false. */ static bool match_token (int t) { if (token == t) { lex_get (); return true; } return false; } /* Force the current token to be T, and skip it. */ static void skip_token (int t) { if (token != t) error ("`%c' expected.", t); lex_get (); } /* Structures. */ /* Some specifiers have associated values. */ enum { VAL_NONE, /* No value. */ VAL_INT, /* Integer value. */ VAL_DBL, /* Floating point value. */ VAL_STRING /* String value. */ }; /* For those specifiers with values, the syntax of those values. */ enum { VT_PLAIN, /* Unadorned value. */ VT_PAREN /* Value must be enclosed in parentheses. */ }; /* Forward definition. */ typedef struct specifier specifier; /* A single setting. */ typedef struct setting setting; struct setting { specifier *parent; /* Owning specifier. */ setting *next; /* Next in the chain. */ char *specname; /* Name of the setting. */ int con; /* Sequence number. */ /* Values. */ int valtype; /* One of VT_*. */ int value; /* One of VAL_*. */ int optvalue; /* 1=value is optional, 0=value is required. */ char *valname; /* Variable name for the value. */ char *restriction; /* !=NULL: expression specifying valid values. */ }; /* A single specifier. */ struct specifier { specifier *next; /* Next in the chain. */ char *varname; /* Variable name. */ setting *s; /* Associated settings. */ setting *def; /* Default setting. */ setting *omit_kw; /* Setting for which the keyword can be omitted. */ int index; /* Next array index. */ }; /* Subcommand types. */ typedef enum { SBC_PLAIN, /* The usual case. */ SBC_VARLIST, /* Variable list. */ SBC_INT, /* Integer value. */ SBC_PINT, /* Integer inside parentheses. */ SBC_DBL, /* Floating point value. */ SBC_INT_LIST, /* List of integers (?). */ SBC_DBL_LIST, /* List of floating points (?). */ SBC_CUSTOM, /* Custom. */ SBC_ARRAY, /* Array of boolean values. */ SBC_STRING, /* String value. */ SBC_VAR /* Single variable name. */ } subcommand_type; typedef enum { ARITY_ONCE_EXACTLY, /* must occur exactly once */ ARITY_ONCE_ONLY, /* zero or once */ ARITY_MANY /* 0, 1, ... , inf */ }subcommand_arity; /* A single subcommand. */ typedef struct subcommand subcommand; struct subcommand { subcommand *next; /* Next in the chain. */ char *name; /* Subcommand name. */ subcommand_type type; /* One of SBC_*. */ subcommand_arity arity; /* How many times should the subcommand occur*/ int narray; /* Index of next array element. */ const char *prefix; /* Prefix for variable and constant names. */ specifier *spec; /* Array of specifiers. */ char *pv_options; /* PV_* options for SBC_VARLIST. */ }; /* Name of the command; i.e., DESCRIPTIVES. */ char *cmdname; /* Short prefix for the command; i.e., `dsc_'. */ char *prefix; /* List of subcommands. */ subcommand *subcommands; /* Default subcommand if any, or NULL. */ subcommand *def; /* Parsing. */ void parse_subcommands (void); /* Parse an entire specification. */ static void parse (void) { /* Get the command name and prefix. */ if (token != T_STRING && token != T_ID) error ("Command name expected."); cmdname = xstrdup (tokstr); lex_get (); skip_token ('('); force_id (); prefix = xstrdup (tokstr); lex_get (); skip_token (')'); skip_token (':'); /* Read all the subcommands. */ subcommands = NULL; def = NULL; parse_subcommands (); } /* Parses a single setting into S, given subcommand information SBC and specifier information SPEC. */ static void parse_setting (setting *s, specifier *spec) { s->parent = spec; if (match_token ('*')) { if (spec->omit_kw) error ("Cannot have two settings with omittable keywords."); else spec->omit_kw = s; } if (match_token ('!')) { if (spec->def) error ("Cannot have two default settings."); else spec->def = s; } force_id (); s->specname = xstrdup (tokstr); s->con = add_symbol (s->specname, 0, 0); s->value = VAL_NONE; lex_get (); /* Parse setting value info if necessary. */ if (token != '/' && token != ';' && token != '.' && token != ',') { if (token == '(') { s->valtype = VT_PAREN; lex_get (); } else s->valtype = VT_PLAIN; s->optvalue = match_token ('*'); if (match_id ("N")) s->value = VAL_INT; else if (match_id ("D")) s->value = VAL_DBL; else if (match_id ("S")) s->value = VAL_STRING; else error ("`n', `d', or `s' expected."); skip_token (':'); force_id (); s->valname = xstrdup (tokstr); lex_get (); if (token == ',') { lex_get (); force_string (); s->restriction = xstrdup (tokstr); lex_get (); } else s->restriction = NULL; if (s->valtype == VT_PAREN) skip_token (')'); } } /* Parse a single specifier into SPEC, given subcommand information SBC. */ static void parse_specifier (specifier *spec, subcommand *sbc) { spec->index = 0; spec->s = NULL; spec->def = NULL; spec->omit_kw = NULL; spec->varname = NULL; if (token == T_ID) { spec->varname = xstrdup (st_lower (tokstr)); lex_get (); } /* Handle array elements. */ if (token != ':') { spec->index = sbc->narray; if (sbc->type == SBC_ARRAY) { if (token == '|') token = ','; else sbc->narray++; } spec->s = NULL; return; } skip_token (':'); if ( sbc->type == SBC_ARRAY && token == T_ID ) { spec->varname = xstrdup (st_lower (tokstr)); spec->index = sbc->narray; sbc->narray++; } /* Parse all the settings. */ { setting **s = &spec->s; for (;;) { *s = xmalloc (sizeof **s); parse_setting (*s, spec); if (token == ',' || token == ';' || token == '.') break; skip_token ('/'); s = &(*s)->next; } (*s)->next = NULL; } } /* Parse a list of specifiers for subcommand SBC. */ static void parse_specifiers (subcommand *sbc) { specifier **spec = &sbc->spec; if (token == ';' || token == '.') { *spec = NULL; return; } for (;;) { *spec = xmalloc (sizeof **spec); parse_specifier (*spec, sbc); if (token == ';' || token == '.') break; skip_token (','); spec = &(*spec)->next; } (*spec)->next = NULL; } /* Parse a subcommand into SBC. */ static void parse_subcommand (subcommand *sbc) { if (match_token ('*')) { if (def) error ("Multiple default subcommands."); def = sbc; } sbc->arity = ARITY_ONCE_ONLY; if ( match_token('+')) sbc->arity = ARITY_MANY; else if (match_token('^')) sbc->arity = ARITY_ONCE_EXACTLY ; force_id (); sbc->name = xstrdup (tokstr); lex_get (); sbc->narray = 0; sbc->type = SBC_PLAIN; sbc->spec = NULL; if (match_token ('[')) { force_id (); sbc->prefix = xstrdup (st_lower (tokstr)); lex_get (); skip_token (']'); skip_token ('='); sbc->type = SBC_ARRAY; parse_specifiers (sbc); } else { if (match_token ('(')) { force_id (); sbc->prefix = xstrdup (st_lower (tokstr)); lex_get (); skip_token (')'); } else sbc->prefix = ""; skip_token ('='); if (match_id ("VAR")) sbc->type = SBC_VAR; if (match_id ("VARLIST")) { if (match_token ('(')) { force_string (); sbc->pv_options = xstrdup (tokstr); lex_get(); skip_token (')'); } else sbc->pv_options = NULL; sbc->type = SBC_VARLIST; } else if (match_id ("INTEGER")) sbc->type = match_id ("LIST") ? SBC_INT_LIST : SBC_INT; else if (match_id ("PINT")) sbc->type = SBC_PINT; else if (match_id ("DOUBLE")) { if ( match_id ("LIST") ) sbc->type = SBC_DBL_LIST; else sbc->type = SBC_DBL; } else if (match_id ("STRING")) sbc->type = SBC_STRING; else if (match_id ("CUSTOM")) sbc->type = SBC_CUSTOM; else parse_specifiers (sbc); } } /* Parse all the subcommands. */ void parse_subcommands (void) { subcommand **sbc = &subcommands; for (;;) { *sbc = xmalloc (sizeof **sbc); (*sbc)->next = NULL; parse_subcommand (*sbc); if (token == '.') return; skip_token (';'); sbc = &(*sbc)->next; } } /* Output. */ #define BASE_INDENT 2 /* Starting indent. */ #define INC_INDENT 2 /* Indent increment. */ /* Increment the indent. */ #define indent() indent += INC_INDENT #define outdent() indent -= INC_INDENT /* Size of the indent from the left margin. */ int indent; void dump (int, const char *, ...) PRINTF_FORMAT (2, 3); /* Write line FORMAT to the output file, formatted as with printf, indented `indent' characters from the left margin. If INDENTION is greater than 0, indents BASE_INDENT * INDENTION characters after writing the line; if INDENTION is less than 0, dedents BASE_INDENT * INDENTION characters _before_ writing the line. */ void dump (int indention, const char *format, ...) { va_list args; int i; if (indention < 0) indent += BASE_INDENT * indention; oln++; va_start (args, format); for (i = 0; i < indent; i++) putc (' ', out); vfprintf (out, format, args); putc ('\n', out); va_end (args); if (indention > 0) indent += BASE_INDENT * indention; } /* Writes a blank line to the output file and adjusts 'indent' by BASE_INDENT * INDENTION characters. (This is only useful because GCC complains about using "" as a format string, for whatever reason.) */ static void dump_blank_line (int indention) { oln++; indent += BASE_INDENT * indention; putc ('\n', out); } /* Write the structure members for specifier SPEC to the output file. SBC is the including subcommand. */ static void dump_specifier_vars (const specifier *spec, const subcommand *sbc) { if (spec->varname) dump (0, "long %s%s;", sbc->prefix, spec->varname); { setting *s; for (s = spec->s; s; s = s->next) { if (s->value != VAL_NONE) { const char *typename; assert (s->value == VAL_INT || s->value == VAL_DBL || s->value == VAL_STRING); typename = (s->value == VAL_INT ? "long" : s->value == VAL_DBL ? "double" : "char *"); dump (0, "%s %s%s;", typename, sbc->prefix, st_lower (s->valname)); } } } } /* Returns true if string T is a PSPP keyword, false otherwise. */ static bool is_keyword (const char *t) { static const char *kw[] = { "AND", "OR", "NOT", "EQ", "GE", "GT", "LE", "LT", "NE", "ALL", "BY", "TO", "WITH", 0, }; const char **cp; for (cp = kw; *cp; cp++) if (!strcmp (t, *cp)) return true; return false; } /* Transforms a string NAME into a valid C identifier: makes everything lowercase and maps nonalphabetic characters to underscores. Returns a pointer to a static buffer. */ static char * make_identifier (const char *name) { char *p = get_buffer (); char *cp; for (cp = p; *name; name++) if (isalpha ((unsigned char) *name)) *cp++ = tolower ((unsigned char) (*name)); else *cp++ = '_'; *cp = '\0'; return p; } /* Writes the struct and enum declarations for the parser. */ static void dump_declarations (void) { indent = 0; dump (0, "struct dataset;"); /* Write out enums for all the identifiers in the symbol table. */ { int f, k; symbol *sym; char *buf = NULL; /* Note the squirmings necessary to make sure that the last enum is not followed by a comma, as mandated by ANSI C89. */ for (sym = symtab, f = k = 0; sym; sym = sym->next) if (!sym->unique && !is_keyword (sym->name)) { if (!f) { dump (0, "/* Settings for subcommand specifiers. */"); dump (1, "enum"); dump (1, "{"); f = 1; } if (buf == NULL) buf = xmalloc (1024); else dump (0, "%s", buf); if (k) sprintf (buf, "%s%s,", st_upper (prefix), sym->name); else { k = 1; sprintf (buf, "%s%s = 1000,", st_upper (prefix), sym->name); } } if (buf) { buf[strlen (buf) - 1] = 0; dump (0, "%s", buf); free (buf); } if (f) { dump (-1, "};"); dump_blank_line (-1); } } /* Write out some type definitions */ { dump (0, "#define MAXLISTS 10"); } /* For every array subcommand, write out the associated enumerated values. */ { subcommand *sbc; for (sbc = subcommands; sbc; sbc = sbc->next) if (sbc->type == SBC_ARRAY && sbc->narray) { dump (0, "/* Array indices for %s subcommand. */", sbc->name); dump (1, "enum"); dump (1, "{"); { specifier *spec; for (spec = sbc->spec; spec; spec = spec->next) dump (0, "%s%s%s = %d,", st_upper (prefix), st_upper (sbc->prefix), st_upper (spec->varname), spec->index); dump (0, "%s%scount", st_upper (prefix), st_upper (sbc->prefix)); dump (-1, "};"); dump_blank_line (-1); } } } /* Write out structure declaration. */ { subcommand *sbc; dump (0, "/* %s structure. */", cmdname); dump (1, "struct cmd_%s", make_identifier (cmdname)); dump (1, "{"); for (sbc = subcommands; sbc; sbc = sbc->next) { int f = 0; if (sbc != subcommands) dump_blank_line (0); dump (0, "/* %s subcommand. */", sbc->name); dump (0, "int sbc_%s;", st_lower (sbc->name)); switch (sbc->type) { case SBC_ARRAY: case SBC_PLAIN: { specifier *spec; for (spec = sbc->spec; spec; spec = spec->next) { if (spec->s == 0) { if (sbc->type == SBC_PLAIN) dump (0, "long int %s%s;", st_lower (sbc->prefix), spec->varname); else if (f == 0) { dump (0, "int a_%s[%s%scount];", st_lower (sbc->name), st_upper (prefix), st_upper (sbc->prefix) ); f = 1; } } else dump_specifier_vars (spec, sbc); } } break; case SBC_VARLIST: dump (0, "size_t %sn_%s;", st_lower (sbc->prefix), st_lower (sbc->name)); dump (0, "const struct variable **%sv_%s;", st_lower (sbc->prefix), st_lower (sbc->name)); break; case SBC_VAR: dump (0, "const struct variable *%sv_%s;", st_lower (sbc->prefix), st_lower (sbc->name)); break; case SBC_STRING: dump (0, "char *s_%s;", st_lower (sbc->name)); break; case SBC_INT: case SBC_PINT: dump (0, "long n_%s[MAXLISTS];", st_lower (sbc->name)); break; case SBC_DBL: dump (0, "double n_%s[MAXLISTS];", st_lower (sbc->name)); break; case SBC_DBL_LIST: dump (0, "subc_list_double dl_%s[MAXLISTS];", st_lower(sbc->name)); break; case SBC_INT_LIST: dump (0, "subc_list_int il_%s[MAXLISTS];", st_lower(sbc->name)); break; default:; /* nothing */ } } dump (-1, "};"); dump_blank_line (-1); } /* Write out prototypes for custom_*() functions as necessary. */ { bool seen = false; subcommand *sbc; for (sbc = subcommands; sbc; sbc = sbc->next) if (sbc->type == SBC_CUSTOM) { if (!seen) { seen = true; dump (0, "/* Prototype for custom subcommands of %s. */", cmdname); } dump (0, "static int %scustom_%s (struct lexer *, struct dataset *, struct cmd_%s *, void *);", st_lower (prefix), st_lower (sbc->name), make_identifier (cmdname)); } if (seen) dump_blank_line (0); } /* Prototypes for parsing and freeing functions. */ { dump (0, "/* Command parsing functions. */"); dump (0, "static int parse_%s (struct lexer *, struct dataset *, struct cmd_%s *, void *);", make_identifier (cmdname), make_identifier (cmdname)); dump (0, "static void free_%s (struct cmd_%s *);", make_identifier (cmdname), make_identifier (cmdname)); dump_blank_line (0); } } /* Writes out code to initialize all the variables that need initialization for particular specifier SPEC inside subcommand SBC. */ static void dump_specifier_init (const specifier *spec, const subcommand *sbc) { if (spec->varname) { char s[256]; if (spec->def) sprintf (s, "%s%s", st_upper (prefix), find_symbol (spec->def->con)->name); else strcpy (s, "-1"); dump (0, "p->%s%s = %s;", sbc->prefix, spec->varname, s); } { setting *s; for (s = spec->s; s; s = s->next) { if (s->value != VAL_NONE) { const char *init; assert (s->value == VAL_INT || s->value == VAL_DBL || s->value == VAL_STRING); init = (s->value == VAL_INT ? "LONG_MIN" : s->value == VAL_DBL ? "SYSMIS" : "NULL"); dump (0, "p->%s%s = %s;", sbc->prefix, st_lower (s->valname), init); } } } } /* Write code to initialize all variables. */ static void dump_vars_init (int persistent) { /* Loop through all the subcommands. */ { subcommand *sbc; for (sbc = subcommands; sbc; sbc = sbc->next) { int f = 0; dump (0, "p->sbc_%s = 0;", st_lower (sbc->name)); if ( ! persistent ) { switch (sbc->type) { case SBC_INT_LIST: case SBC_DBL_LIST: dump (1, "{"); dump (0, "int i;"); dump (1, "for (i = 0; i < MAXLISTS; ++i)"); dump (0, "subc_list_%s_create(&p->%cl_%s[i]) ;", sbc->type == SBC_INT_LIST ? "int" : "double", sbc->type == SBC_INT_LIST ? 'i' : 'd', st_lower (sbc->name) ); dump (-2, "}"); break; case SBC_DBL: dump (1, "{"); dump (0, "int i;"); dump (1, "for (i = 0; i < MAXLISTS; ++i)"); dump (0, "p->n_%s[i] = SYSMIS;", st_lower (sbc->name)); dump (-2, "}"); break; case SBC_CUSTOM: /* nothing */ break; case SBC_PLAIN: case SBC_ARRAY: { specifier *spec; for (spec = sbc->spec; spec; spec = spec->next) if (spec->s == NULL) { if (sbc->type == SBC_PLAIN) dump (0, "p->%s%s = 0;", sbc->prefix, spec->varname); else if (f == 0) { dump (0, "memset (p->a_%s, 0, sizeof p->a_%s);", st_lower (sbc->name), st_lower (sbc->name)); f = 1; } } else dump_specifier_init (spec, sbc); } break; case SBC_VARLIST: dump (0, "p->%sn_%s = 0;", st_lower (sbc->prefix), st_lower (sbc->name)); dump (0, "p->%sv_%s = NULL;", st_lower (sbc->prefix), st_lower (sbc->name)); break; case SBC_VAR: dump (0, "p->%sv_%s = NULL;", st_lower (sbc->prefix), st_lower (sbc->name)); break; case SBC_STRING: dump (0, "p->s_%s = NULL;", st_lower (sbc->name)); break; case SBC_INT: case SBC_PINT: dump (1, "{"); dump (0, "int i;"); dump (1, "for (i = 0; i < MAXLISTS; ++i)"); dump (0, "p->n_%s[i] = LONG_MIN;", st_lower (sbc->name)); dump (-2, "}"); break; default: abort (); } } } } } /* Return a pointer to a static buffer containing an expression that will match token T. */ static char * make_match (const char *t) { char *s; s = get_buffer (); while (*t == '_') t++; if (is_keyword (t)) sprintf (s, "lex_match (lexer, T_%s)", t); else if (!strcmp (t, "ON") || !strcmp (t, "YES")) strcpy (s, "(lex_match_id (lexer, \"ON\") || lex_match_id (lexer, \"YES\") " "|| lex_match_id (lexer, \"TRUE\"))"); else if (!strcmp (t, "OFF") || !strcmp (t, "NO")) strcpy (s, "(lex_match_id (lexer, \"OFF\") || lex_match_id (lexer, \"NO\") " "|| lex_match_id (lexer, \"FALSE\"))"); else if (isdigit ((unsigned char) t[0])) sprintf (s, "lex_match_int (lexer, %s)", t); else if (strchr (t, hyphen_proxy)) { char *c = unmunge (t); sprintf (s, "lex_match_phrase (lexer, \"%s\")", c); free (c); } else sprintf (s, "lex_match_id (lexer, \"%s\")", t); return s; } /* Write out the parsing code for specifier SPEC within subcommand SBC. */ static void dump_specifier_parse (const specifier *spec, const subcommand *sbc) { setting *s; if (spec->omit_kw && spec->omit_kw->next) error ("Omittable setting is not last setting in `%s' specifier.", spec->varname); if (spec->omit_kw && spec->omit_kw->parent->next) error ("Default specifier is not in last specifier in `%s' " "subcommand.", sbc->name); for (s = spec->s; s; s = s->next) { int first = spec == sbc->spec && s == spec->s; /* Match the setting's keyword. */ if (spec->omit_kw == s) { if (!first) { dump (1, "else"); dump (1, "{"); } dump (1, "%s;", make_match (s->specname)); } else dump (1, "%sif (%s)", first ? "" : "else ", make_match (s->specname)); /* Handle values. */ if (s->value == VAL_NONE) dump (0, "p->%s%s = %s%s;", sbc->prefix, spec->varname, st_upper (prefix), find_symbol (s->con)->name); else { if (spec->omit_kw != s) dump (1, "{"); if (spec->varname) { dump (0, "p->%s%s = %s%s;", sbc->prefix, spec->varname, st_upper (prefix), find_symbol (s->con)->name); if ( sbc->type == SBC_ARRAY ) dump (0, "p->a_%s[%s%s%s] = 1;", st_lower (sbc->name), st_upper (prefix), st_upper (sbc->prefix), st_upper (spec->varname)); } if (s->valtype == VT_PAREN) { if (s->optvalue) { dump (1, "if (lex_match (lexer, T_LPAREN))"); dump (1, "{"); } else { dump (1, "if (!lex_match (lexer, T_LPAREN))"); dump (1, "{"); dump (0, "lex_error_expecting (lexer, \"`('\", " "NULL_SENTINEL);"); dump (0, "goto lossage;"); dump (-1, "}"); outdent (); } } if (s->value == VAL_INT) { dump (1, "if (!lex_force_int (lexer))"); dump (0, "goto lossage;"); dump (-1, "p->%s%s = lex_integer (lexer);", sbc->prefix, st_lower (s->valname)); } else if (s->value == VAL_DBL) { dump (1, "if (!lex_force_num (lexer))"); dump (0, "goto lossage;"); dump (-1, "p->%s%s = lex_tokval (lexer);", sbc->prefix, st_lower (s->valname)); } else if (s->value == VAL_STRING) { dump (1, "if (!lex_force_string_or_id (lexer))"); dump (0, "goto lossage;"); dump (-1, "free (p->%s%s);", sbc->prefix, st_lower (s->valname)); dump (0, "p->%s%s = ss_xstrdup (ss_tokss (lexer));", sbc->prefix, st_lower (s->valname)); } else abort (); if (s->restriction) { { char *str, *str2; str = xmalloc (MAX_TOK_LEN); str2 = xmalloc (MAX_TOK_LEN); sprintf (str2, "p->%s%s", sbc->prefix, st_lower (s->valname)); sprintf (str, s->restriction, str2, str2, str2, str2, str2, str2, str2, str2); dump (1, "if (!(%s))", str); free (str); free (str2); } dump (1, "{"); dump (0, "lex_error (lexer, NULL);"); dump (0, "goto lossage;"); dump (-1, "}"); outdent (); } dump (0, "lex_get (lexer);"); if (s->valtype == VT_PAREN) { dump (1, "if (!lex_force_match (lexer, T_RPAREN))"); dump (0, "goto lossage;"); outdent (); if (s->optvalue) { dump (-1, "}"); outdent (); } } if (s != spec->omit_kw) dump (-1, "}"); } if (s == spec->omit_kw) { dump (-1, "}"); outdent (); } outdent (); } } /* Write out the code to parse subcommand SBC. */ static void dump_subcommand (const subcommand *sbc) { if (sbc->type == SBC_PLAIN || sbc->type == SBC_ARRAY) { int count; dump (1, "while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD)"); dump (1, "{"); { specifier *spec; for (count = 0, spec = sbc->spec; spec; spec = spec->next) { if (spec->s) dump_specifier_parse (spec, sbc); else { count++; dump (1, "%sif (%s)", spec != sbc->spec ? "else " : "", make_match (st_upper (spec->varname))); if (sbc->type == SBC_PLAIN) dump (0, "p->%s%s = 1;", st_lower (sbc->prefix), spec->varname); else dump (0, "p->a_%s[%s%s%s] = 1;", st_lower (sbc->name), st_upper (prefix), st_upper (sbc->prefix), st_upper (spec->varname)); outdent (); } } } { specifier *spec; setting *s; /* This code first finds the last specifier in sbc. Then it finds the last setting within that last specifier. Either or both might be NULL. */ spec = sbc->spec; s = NULL; if (spec) { while (spec->next) spec = spec->next; s = spec->s; if (s) while (s->next) s = s->next; } if (spec && (!spec->s || !spec->omit_kw)) { dump (1, "else"); dump (1, "{"); dump (0, "lex_error (lexer, NULL);"); dump (0, "goto lossage;"); dump (-1, "}"); outdent (); } } dump (0, "lex_match (lexer, T_COMMA);"); dump (-1, "}"); outdent (); } else if (sbc->type == SBC_VARLIST) { dump (1, "if (!parse_variables_const (lexer, dataset_dict (ds), &p->%sv_%s, &p->%sn_%s, " "PV_APPEND%s%s))", st_lower (sbc->prefix), st_lower (sbc->name), st_lower (sbc->prefix), st_lower (sbc->name), sbc->pv_options ? " |" : "", sbc->pv_options ? sbc->pv_options : ""); dump (0, "goto lossage;"); outdent (); } else if (sbc->type == SBC_VAR) { dump (0, "p->%sv_%s = parse_variable (lexer, dataset_dict (ds));", st_lower (sbc->prefix), st_lower (sbc->name)); dump (1, "if (!p->%sv_%s)", st_lower (sbc->prefix), st_lower (sbc->name)); dump (0, "goto lossage;"); outdent (); } else if (sbc->type == SBC_STRING) { dump (1, "if (!lex_force_string (lexer))"); dump (0, "return false;"); outdent (); dump (0, "free(p->s_%s);", st_lower(sbc->name) ); dump (0, "p->s_%s = ss_xstrdup (lex_tokss (lexer));", st_lower (sbc->name)); dump (0, "lex_get (lexer);"); } else if (sbc->type == SBC_DBL) { dump (1, "if (!lex_force_num (lexer))"); dump (0, "goto lossage;"); dump (-1, "p->n_%s[p->sbc_%s - 1] = lex_number (lexer);", st_lower (sbc->name), st_lower (sbc->name) ); dump (0, "lex_get(lexer);"); } else if (sbc->type == SBC_INT) { dump(1, "{"); dump(0, "int x;"); dump (1, "if (!lex_force_int (lexer))"); dump (0, "goto lossage;"); dump (-1, "x = lex_integer (lexer);"); dump (0, "lex_get(lexer);"); dump (0, "p->n_%s[p->sbc_%s - 1] = x;", st_lower (sbc->name), st_lower(sbc->name) ); dump (-1,"}"); } else if (sbc->type == SBC_PINT) { dump (0, "lex_match (lexer, T_LPAREN);"); dump (1, "if (!lex_force_int (lexer))"); dump (0, "goto lossage;"); dump (-1, "p->n_%s = lex_integer (lexer);", st_lower (sbc->name)); dump (0, "lex_match (lexer, T_RPAREN);"); } else if (sbc->type == SBC_DBL_LIST || sbc->type == SBC_INT_LIST) { dump (0, "if ( p->sbc_%s > MAXLISTS)",st_lower(sbc->name)); dump (1, "{"); dump (0, "subc_list_error (lexer, \"%s\", MAXLISTS);", st_lower(sbc->name)); dump (0, "goto lossage;"); dump (-1,"}"); dump (1, "while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD)"); dump (1, "{"); dump (0, "lex_match (lexer, T_COMMA);"); dump (0, "if (!lex_force_num (lexer))"); dump (1, "{"); dump (0, "goto lossage;"); dump (-1,"}"); dump (0, "subc_list_%s_push (&p->%cl_%s[p->sbc_%s-1], lex_number (lexer));", sbc->type == SBC_INT_LIST ? "int" : "double", sbc->type == SBC_INT_LIST ? 'i' : 'd', st_lower (sbc->name), st_lower (sbc->name)); dump (0, "lex_get (lexer);"); dump (-1,"}"); } else if (sbc->type == SBC_CUSTOM) { dump (1, "switch (%scustom_%s (lexer, ds, p, aux))", st_lower (prefix), st_lower (sbc->name)); dump (0, "{"); dump (1, "case 0:"); dump (0, "goto lossage;"); dump (-1, "case 1:"); indent (); dump (0, "break;"); dump (-1, "case 2:"); indent (); dump (0, "lex_error (lexer, NULL);"); dump (0, "goto lossage;"); dump (-1, "default:"); indent (); dump (0, "NOT_REACHED ();"); dump (-1, "}"); outdent (); } } /* Write out entire parser. */ static void dump_parser (int persistent) { int f; indent = 0; dump (0, "static int"); dump (0, "parse_%s (struct lexer *lexer, struct dataset *ds%s, struct cmd_%s *p, void *aux UNUSED)", make_identifier (cmdname), (def && ( def->type == SBC_VARLIST || def->type == SBC_CUSTOM))?"":" UNUSED", make_identifier (cmdname)); dump (1, "{"); dump_vars_init (persistent); dump (1, "for (;;)"); dump (1, "{"); f = 0; if (def && (def->type == SBC_VARLIST)) { if (def->type == SBC_VARLIST) dump (1, "if (lex_token (lexer) == T_ID " "&& dict_lookup_var (dataset_dict (ds), lex_tokcstr (lexer)) != NULL " "&& lex_next_token (lexer, 1) != T_EQUALS)"); else { dump (0, "if ((lex_token (lexer) == T_ID " "&& dict_lookup_var (dataset_dict (ds), lex_tokcstr (lexer)) " "&& lex_next_token (lexer, 1) != T_EQUALS)"); dump (1, " || token == T_ALL)"); } dump (1, "{"); dump (0, "p->sbc_%s++;", st_lower (def->name)); dump (1, "if (!parse_variables_const (lexer, dataset_dict (ds), &p->%sv_%s, &p->%sn_%s, " "PV_APPEND))", st_lower (def->prefix), st_lower (def->name), st_lower (def->prefix), st_lower (def->name)); dump (0, "goto lossage;"); dump (-2, "}"); outdent (); f = 1; } else if (def && def->type == SBC_CUSTOM) { dump (1, "switch (%scustom_%s (lexer, ds, p, aux))", st_lower (prefix), st_lower (def->name)); dump (0, "{"); dump (1, "case 0:"); dump (0, "goto lossage;"); dump (-1, "case 1:"); indent (); dump (0, "p->sbc_%s++;", st_lower (def->name)); dump (0, "continue;"); dump (-1, "case 2:"); indent (); dump (0, "break;"); dump (-1, "default:"); indent (); dump (0, "NOT_REACHED ();"); dump (-1, "}"); outdent (); } { subcommand *sbc; for (sbc = subcommands; sbc; sbc = sbc->next) { dump (1, "%sif (%s)", f ? "else " : "", make_match (sbc->name)); f = 1; dump (1, "{"); dump (0, "lex_match (lexer, T_EQUALS);"); dump (0, "p->sbc_%s++;", st_lower (sbc->name)); if (sbc->arity != ARITY_MANY) { dump (1, "if (p->sbc_%s > 1)", st_lower (sbc->name)); dump (1, "{"); dump (0, "lex_sbc_only_once (\"%s\");", sbc->name); dump (0, "goto lossage;"); dump (-1, "}"); outdent (); } dump_subcommand (sbc); dump (-1, "}"); outdent (); } } /* Now deal with the /ALGORITHM subcommand implicit to all commands */ dump(1,"else if ( settings_get_syntax () != COMPATIBLE && lex_match_id(lexer, \"ALGORITHM\"))"); dump(1,"{"); dump (0, "lex_match (lexer, T_EQUALS);"); dump(1,"if (lex_match_id(lexer, \"COMPATIBLE\"))"); dump(0,"settings_set_cmd_algorithm (COMPATIBLE);"); outdent(); dump(1,"else if (lex_match_id(lexer, \"ENHANCED\"))"); dump(0,"settings_set_cmd_algorithm (ENHANCED);"); dump (-1, "}"); outdent (); dump (1, "if (!lex_match (lexer, T_SLASH))"); dump (0, "break;"); dump (-2, "}"); outdent (); dump_blank_line (0); dump (1, "if (lex_token (lexer) != T_ENDCMD)"); dump (1, "{"); dump (0, "lex_error (lexer, _(\"expecting end of command\"));"); dump (0, "goto lossage;"); dump (-1, "}"); dump_blank_line (0); outdent (); { /* Check that mandatory subcommands have been specified */ subcommand *sbc; for (sbc = subcommands; sbc; sbc = sbc->next) { if ( sbc->arity == ARITY_ONCE_EXACTLY ) { dump (0, "if ( 0 == p->sbc_%s)", st_lower (sbc->name)); dump (1, "{"); dump (0, "lex_sbc_missing (\"%s\");", sbc->name); dump (0, "goto lossage;"); dump (-1, "}"); dump_blank_line (0); } } } dump (-1, "return true;"); dump_blank_line (0); dump (-1, "lossage:"); indent (); dump (0, "free_%s (p);", make_identifier (cmdname)); dump (0, "return false;"); dump (-1, "}"); dump_blank_line (0); } /* Write the output file header. */ static void dump_header (void) { indent = 0; dump (0, "/* %s\t\t-*- mode: c; buffer-read-only: t -*-", ofn); dump_blank_line (0); dump (0, " Generated by q2c from %s.", ifn); dump (0, " Do not modify!"); dump (0, " */"); } /* Write out commands to free variable state. */ static void dump_free (int persistent) { subcommand *sbc; int used; indent = 0; used = 0; if ( ! persistent ) { for (sbc = subcommands; sbc; sbc = sbc->next) used = (sbc->type == SBC_STRING || sbc->type == SBC_DBL_LIST || sbc->type == SBC_INT_LIST); } dump (0, "static void"); dump (0, "free_%s (struct cmd_%s *p%s)", make_identifier (cmdname), make_identifier (cmdname), used ? "" : " UNUSED"); dump (1, "{"); if ( ! persistent ) { for (sbc = subcommands; sbc; sbc = sbc->next) { switch (sbc->type) { case SBC_VARLIST: dump (0, "free (p->v_%s);", st_lower (sbc->name)); break; case SBC_STRING: dump (0, "free (p->s_%s);", st_lower (sbc->name)); break; case SBC_DBL_LIST: case SBC_INT_LIST: dump (0, "{"); dump (1, "int i;"); dump (2, "for(i = 0; i < MAXLISTS ; ++i)"); dump (1, "subc_list_%s_destroy(&p->%cl_%s[i]);", sbc->type == SBC_INT_LIST ? "int" : "double", sbc->type == SBC_INT_LIST ? 'i' : 'd', st_lower (sbc->name)); dump (0, "}"); outdent(); break; case SBC_PLAIN: { specifier *spec; setting *s; for (spec = sbc->spec; spec; spec = spec->next) for (s = spec->s; s; s = s->next) if (s->value == VAL_STRING) dump (0, "free (p->%s%s);", sbc->prefix, st_lower (s->valname)); } default: break; } } } dump (-1, "}"); } /* Returns the name of a directive found on the current input line, if any, or a null pointer if none found. */ static const char * recognize_directive (void) { static char directive[16]; char *sp, *ep; sp = skip_ws (buf); if (strncmp (sp, "/*", 2)) return NULL; sp = skip_ws (sp + 2); if (*sp != '(') return NULL; sp++; ep = strchr (sp, ')'); if (ep == NULL) return NULL; if (ep - sp > 15) ep = sp + 15; memcpy (directive, sp, ep - sp); directive[ep - sp] = '\0'; return directive; } int main (int argc, char *argv[]) { program_name = argv[0]; if (argc != 3) fail ("Syntax: q2c input.q output.c"); ifn = argv[1]; in = fopen (ifn, "r"); if (!in) fail ("%s: open: %s.", ifn, strerror (errno)); ofn = argv[2]; out = fopen (ofn, "w"); if (!out) fail ("%s: open: %s.", ofn, strerror (errno)); is_open = true; buf = xmalloc (MAX_LINE_LEN); tokstr = xmalloc (MAX_TOK_LEN); dump_header (); indent = 0; dump (0, "#line %d \"%s\"", ln + 1, ifn); while (get_line ()) { const char *directive = recognize_directive (); if (directive == NULL) { dump (0, "%s", buf); continue; } dump (0, "#line %d \"%s\"", oln + 1, ofn); if (!strcmp (directive, "specification")) { /* Skip leading slash-star line. */ get_line (); lex_get (); parse (); /* Skip trailing star-slash line. */ get_line (); } else if (!strcmp (directive, "headers")) { indent = 0; dump (0, "#include "); dump_blank_line (0); dump (0, "#include \"data/settings.h\""); dump (0, "#include \"data/variable.h\""); dump (0, "#include \"language/lexer/lexer.h\""); dump (0, "#include \"language/lexer/subcommand-list.h\""); dump (0, "#include \"language/lexer/variable-parser.h\""); dump (0, "#include \"libpspp/assertion.h\""); dump (0, "#include \"libpspp/cast.h\""); dump (0, "#include \"libpspp/message.h\""); dump (0, "#include \"libpspp/str.h\""); dump_blank_line (0); dump (0, "#include \"gl/xalloc.h\""); dump_blank_line (0); } else if (!strcmp (directive, "declarations")) dump_declarations (); else if (!strcmp (directive, "functions")) { dump_parser (0); dump_free (0); } else if (!strcmp (directive, "_functions")) { dump_parser (1); dump_free (1); } else error ("unknown directive `%s'", directive); indent = 0; dump (0, "#line %d \"%s\"", ln + 1, ifn); } return EXIT_SUCCESS; } pspp-1.0.1/src/language/lexer/variable-parser.h0000644000175000017500000001154713146355723016356 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef VARIABLE_PARSER_H #define VARIABLE_PARSER_H 1 #include #include struct pool; struct dictionary; struct var_set; struct const_var_set; struct variable; struct lexer ; struct var_set *var_set_create_from_dict (const struct dictionary *d); struct var_set *var_set_create_from_array (struct variable *const *var, size_t); size_t var_set_get_cnt (const struct var_set *vs); void var_set_destroy (struct var_set *vs); /* Variable parsers. */ enum { PV_NONE = 0, /* No options. */ PV_SINGLE = 0001, /* Restrict to a single name or TO use. */ PV_DUPLICATE = 0002, /* Don't merge duplicates. */ PV_APPEND = 0004, /* Append to existing list. */ PV_NO_DUPLICATE = 0010, /* Error on duplicates. */ PV_NUMERIC = 0020, /* Vars must be numeric. */ PV_STRING = 0040, /* Vars must be string. */ PV_SAME_TYPE = 00100, /* All vars must be the same type. */ PV_SAME_WIDTH = 00200, /* All vars must be the same type and width. */ PV_NO_SCRATCH = 00400 /* Disallow scratch variables. */ }; struct variable *parse_variable (struct lexer *, const struct dictionary *); bool parse_variables (struct lexer *, const struct dictionary *, struct variable ***, size_t *, int opts); bool parse_variables_pool (struct lexer *, struct pool *, const struct dictionary *, struct variable ***, size_t *, int opts); bool parse_var_set_vars (struct lexer *, const struct var_set *, struct variable ***, size_t *, int opts); bool parse_DATA_LIST_vars (struct lexer *, const struct dictionary *, char ***names, size_t *cnt, int opts); bool parse_DATA_LIST_vars_pool (struct lexer *, const struct dictionary *, struct pool *, char ***names, size_t *cnt, int opts); bool parse_mixed_vars (struct lexer *, const struct dictionary *dict, char ***names, size_t *cnt, int opts); bool parse_mixed_vars_pool (struct lexer *, const struct dictionary *dict, struct pool *, char ***names, size_t *cnt, int opts); /* Const wrappers */ static inline const struct variable * parse_variable_const (struct lexer *l, const struct dictionary *d) { return parse_variable (l, d); } static inline bool parse_variables_const (struct lexer *l, const struct dictionary *d, const struct variable ***v, size_t *s, int opts) { return parse_variables (l, d, (struct variable ***) v, s, opts); } static inline bool parse_variables_const_pool (struct lexer *l, struct pool *p, const struct dictionary *d, const struct variable ***v, size_t *s, int opts) { return parse_variables_pool (l, p, d, (struct variable ***) v, s, opts); } static inline struct const_var_set * const_var_set_create_from_dict (const struct dictionary *d) { return (struct const_var_set *) var_set_create_from_dict (d); } static inline struct const_var_set * const_var_set_create_from_array (const struct variable *const *var, size_t s) { return (struct const_var_set *) var_set_create_from_array ((struct variable *const *) var, s); } static inline bool parse_const_var_set_vars (struct lexer *l, const struct const_var_set *vs, const struct variable ***v, size_t *s, int opts) { return parse_var_set_vars (l, (const struct var_set *) vs, (struct variable ***) v, s, opts); } static inline void const_var_set_destroy (struct const_var_set *vs) { var_set_destroy ( (struct var_set *) vs); } /* Match a variable. If the match succeeds, the variable will be placed in VAR. Returns true if successful */ bool lex_match_variable (struct lexer *lexer, const struct dictionary *dict, const struct variable **var); struct interaction; /* Parse an interaction. If not successful return false. Otherwise, a newly created interaction will be placed in IACT. It is the caller's responsibility to destroy this interaction. */ bool parse_design_interaction (struct lexer *lexer, const struct dictionary *dict, struct interaction **iact); #endif /* variable-parser.h */ pspp-1.0.1/src/language/lexer/scan.c0000644000175000017500000003560212470434665014216 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/lexer/scan.h" #include #include #include "data/identifier.h" #include "language/lexer/token.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "gl/c-ctype.h" #include "gl/c-strtod.h" #include "gl/xmemdup0.h" enum { S_START, S_DASH, S_STRING }; #define SS_NL_BEFORE_PLUS (1u << 0) #define SS_PLUS (1u << 1) #define SS_NL_AFTER_PLUS (1u << 2) /* Returns the integer value of (hex) digit C. */ static int digit_value (int c) { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; case 'a': case 'A': return 10; case 'b': case 'B': return 11; case 'c': case 'C': return 12; case 'd': case 'D': return 13; case 'e': case 'E': return 14; case 'f': case 'F': return 15; default: return INT_MAX; } } static bool scan_quoted_string__ (struct substring s, struct token *token) { int quote; /* Trim ' or " from front and back. */ quote = s.string[s.length - 1]; s.string++; s.length -= 2; ss_realloc (&token->string, token->string.length + s.length + 1); for (;;) { size_t pos = ss_find_byte (s, quote); if (pos == SIZE_MAX) break; memcpy (ss_end (token->string), s.string, pos + 1); token->string.length += pos + 1; ss_advance (&s, pos + 2); } memcpy (ss_end (token->string), s.string, ss_length (s)); token->string.length += ss_length (s); return true; } static bool scan_hex_string__ (struct substring s, struct token *token) { uint8_t *dst; size_t i; /* Trim X' from front and ' from back. */ s.string += 2; s.length -= 3; if (s.length % 2 != 0) { token->type = SCAN_BAD_HEX_LENGTH; token->number = s.length; return false; } ss_realloc (&token->string, token->string.length + s.length / 2 + 1); dst = CHAR_CAST (uint8_t *, ss_end (token->string)); token->string.length += s.length / 2; for (i = 0; i < s.length; i += 2) { int hi = digit_value (s.string[i]); int lo = digit_value (s.string[i + 1]); if (hi >= 16 || lo >= 16) { token->type = SCAN_BAD_HEX_DIGIT; token->number = s.string[hi >= 16 ? i : i + 1]; return false; } *dst++ = hi * 16 + lo; } return true; } static bool scan_unicode_string__ (struct substring s, struct token *token) { uint8_t *dst; ucs4_t uc; size_t i; /* Trim U' from front and ' from back. */ s.string += 2; s.length -= 3; if (s.length < 1 || s.length > 8) { token->type = SCAN_BAD_UNICODE_LENGTH; token->number = s.length; return 0; } ss_realloc (&token->string, token->string.length + 4 + 1); uc = 0; for (i = 0; i < s.length; i++) { int digit = digit_value (s.string[i]); if (digit >= 16) { token->type = SCAN_BAD_UNICODE_DIGIT; token->number = s.string[i]; return 0; } uc = uc * 16 + digit; } if ((uc >= 0xd800 && uc < 0xe000) || uc > 0x10ffff) { token->type = SCAN_BAD_UNICODE_CODE_POINT; token->number = uc; return 0; } dst = CHAR_CAST (uint8_t *, ss_end (token->string)); token->string.length += u8_uctomb (dst, uc, 4); return true; } static enum scan_result scan_string_segment__ (struct scanner *scanner, enum segment_type type, struct substring s, struct token *token) { bool ok; switch (type) { case SEG_QUOTED_STRING: ok = scan_quoted_string__ (s, token); break; case SEG_HEX_STRING: ok = scan_hex_string__ (s, token); break; case SEG_UNICODE_STRING: ok = scan_unicode_string__ (s, token); break; default: NOT_REACHED (); } if (ok) { token->type = T_STRING; token->string.string[token->string.length] = '\0'; scanner->state = S_STRING; scanner->substate = 0; return SCAN_SAVE; } else { /* The function we called above should have filled in token->type and token->number properly to describe the error. */ ss_dealloc (&token->string); token->string = ss_empty (); return SCAN_DONE; } } static enum scan_result add_bit (struct scanner *scanner, unsigned int bit) { if (!(scanner->substate & bit)) { scanner->substate |= bit; return SCAN_MORE; } else return SCAN_BACK; } static enum scan_result scan_string__ (struct scanner *scanner, enum segment_type type, struct substring s, struct token *token) { switch (type) { case SEG_SPACES: case SEG_COMMENT: return SCAN_MORE; case SEG_NEWLINE: if (scanner->substate & SS_PLUS) return add_bit (scanner, SS_NL_AFTER_PLUS); else return add_bit (scanner, SS_NL_BEFORE_PLUS); case SEG_PUNCT: return (s.length == 1 && s.string[0] == '+' ? add_bit (scanner, SS_PLUS) : SCAN_BACK); case SEG_QUOTED_STRING: case SEG_HEX_STRING: case SEG_UNICODE_STRING: return (scanner->substate & SS_PLUS ? scan_string_segment__ (scanner, type, s, token) : SCAN_BACK); default: return SCAN_BACK; } } static enum token_type scan_reserved_word__ (struct substring word) { switch (c_toupper (word.string[0])) { case 'B': return T_BY; case 'E': return T_EQ; case 'G': return c_toupper (word.string[1]) == 'E' ? T_GE : T_GT; case 'L': return c_toupper (word.string[1]) == 'E' ? T_LE : T_LT; case 'N': return word.length == 2 ? T_NE : T_NOT; case 'O': return T_OR; case 'T': return T_TO; case 'A': return c_toupper (word.string[1]) == 'L' ? T_ALL : T_AND; case 'W': return T_WITH; } NOT_REACHED (); } static enum token_type scan_punct1__ (char c0) { switch (c0) { case '(': return T_LPAREN; case ')': return T_RPAREN; case ',': return T_COMMA; case '=': return T_EQUALS; case '-': return T_DASH; case '[': return T_LBRACK; case ']': return T_RBRACK; case '&': return T_AND; case '|': return T_OR; case '+': return T_PLUS; case '/': return T_SLASH; case '*': return T_ASTERISK; case '<': return T_LT; case '>': return T_GT; case '~': return T_NOT; } NOT_REACHED (); } static enum token_type scan_punct2__ (char c0, char c1) { switch (c0) { case '*': return T_EXP; case '<': return c1 == '=' ? T_LE : T_NE; case '>': return T_GE; case '~': return T_NE; case '&': return T_AND; case '|': return T_OR; } NOT_REACHED (); } static enum token_type scan_punct__ (struct substring s) { return (s.length == 1 ? scan_punct1__ (s.string[0]) : scan_punct2__ (s.string[0], s.string[1])); } static double scan_number__ (struct substring s) { char buf[128]; double number; char *p; if (s.length < sizeof buf) { p = buf; memcpy (buf, s.string, s.length); buf[s.length] = '\0'; } else p = xmemdup0 (s.string, s.length); number = c_strtod (p, NULL); if (p != buf) free (p); return number; } static enum scan_result scan_unexpected_char (const struct substring *s, struct token *token) { ucs4_t uc; token->type = SCAN_UNEXPECTED_CHAR; u8_mbtouc (&uc, CHAR_CAST (const uint8_t *, s->string), s->length); token->number = uc; return SCAN_DONE; } const char * scan_type_to_string (enum scan_type type) { switch (type) { #define SCAN_TYPE(NAME) case SCAN_##NAME: return #NAME; SCAN_TYPES #undef SCAN_TYPE default: return token_type_to_name (type); } } bool is_scan_type (enum scan_type type) { return type > SCAN_FIRST && type < SCAN_LAST; } static enum scan_result scan_start__ (struct scanner *scanner, enum segment_type type, struct substring s, struct token *token) { switch (type) { case SEG_NUMBER: token->type = T_POS_NUM; token->number = scan_number__ (s); return SCAN_DONE; case SEG_QUOTED_STRING: case SEG_HEX_STRING: case SEG_UNICODE_STRING: return scan_string_segment__ (scanner, type, s, token); case SEG_UNQUOTED_STRING: case SEG_DO_REPEAT_COMMAND: case SEG_INLINE_DATA: case SEG_DOCUMENT: token->type = T_STRING; ss_alloc_substring (&token->string, s); return SCAN_DONE; case SEG_RESERVED_WORD: token->type = scan_reserved_word__ (s); return SCAN_DONE; case SEG_IDENTIFIER: token->type = T_ID; ss_alloc_substring (&token->string, s); return SCAN_DONE; case SEG_PUNCT: if (s.length == 1 && s.string[0] == '-') { scanner->state = S_DASH; return SCAN_SAVE; } else { token->type = scan_punct__ (s); return SCAN_DONE; } case SEG_SHBANG: case SEG_SPACES: case SEG_COMMENT: case SEG_NEWLINE: case SEG_COMMENT_COMMAND: token->type = SCAN_SKIP; return SCAN_DONE; case SEG_START_DOCUMENT: token->type = T_ID; ss_alloc_substring (&token->string, ss_cstr ("DOCUMENT")); return SCAN_DONE; case SEG_START_COMMAND: case SEG_SEPARATE_COMMANDS: case SEG_END_COMMAND: token->type = T_ENDCMD; return SCAN_DONE; case SEG_END: token->type = T_STOP; return SCAN_DONE; case SEG_EXPECTED_QUOTE: token->type = SCAN_EXPECTED_QUOTE; return SCAN_DONE; case SEG_EXPECTED_EXPONENT: token->type = SCAN_EXPECTED_EXPONENT; ss_alloc_substring (&token->string, s); return SCAN_DONE; case SEG_UNEXPECTED_DOT: token->type = SCAN_UNEXPECTED_DOT; return SCAN_DONE; case SEG_UNEXPECTED_CHAR: return scan_unexpected_char (&s, token); } NOT_REACHED (); } static enum scan_result scan_dash__ (enum segment_type type, struct substring s, struct token *token) { switch (type) { case SEG_SPACES: case SEG_COMMENT: return SCAN_MORE; case SEG_NUMBER: token->type = T_NEG_NUM; token->number = -scan_number__ (s); return SCAN_DONE; default: token->type = T_DASH; return SCAN_BACK; } } /* Initializes SCANNER for scanning a token from a sequence of segments. Initializes TOKEN as the output token. (The client retains ownership of TOKEN, but it must be preserved across subsequent calls to scanner_push() for SCANNER.) A scanner only produces a single token. To obtain the next token, re-initialize it by calling this function again. A scanner does not contain any external references, so nothing needs to be done to destroy one. For the same reason, scanners may be copied with plain struct assignment (or memcpy). */ void scanner_init (struct scanner *scanner, struct token *token) { scanner->state = S_START; token_init (token); } /* Adds the segment with type TYPE and UTF-8 text S to SCANNER. TOKEN must be the same token passed to scanner_init() for SCANNER, or a copy of it. scanner_push() may modify TOKEN. The client retains ownership of TOKEN, The possible return values are: - SCAN_DONE: All of the segments that have been passed to scanner_push() form the token now stored in TOKEN. SCANNER is now "used up" and must be reinitialized with scanner_init() if it is to be used again. Most tokens only consist of a single segment, so this is the most common return value. - SCAN_MORE: The segments passed to scanner_push() don't yet determine a token. The caller should call scanner_push() again with the next token. (This won't happen if TYPE is SEG_END indicating the end of input.) - SCAN_SAVE: This is similar to SCAN_MORE, with one difference: the caller needs to "save its place" in the stream of segments for a possible future SCAN_BACK return. This value can be returned more than once in a sequence of scanner_push() calls for SCANNER, but the caller only needs to keep track of the most recent position. - SCAN_BACK: This is similar to SCAN_DONE, but the token consists of only the segments up to and including the segment for which SCAN_SAVE was most recently returned. Segments following that one should be passed to the next scanner to be initialized. */ enum scan_result scanner_push (struct scanner *scanner, enum segment_type type, struct substring s, struct token *token) { switch (scanner->state) { case S_START: return scan_start__ (scanner, type, s, token); case S_DASH: return scan_dash__ (type, s, token); case S_STRING: return scan_string__ (scanner, type, s, token); } NOT_REACHED (); } /* Initializes SLEX for parsing INPUT in the specified MODE. SLEX has no internal state to free, but it retains a reference to INPUT, so INPUT must not be modified or freed while SLEX is still in use. */ void string_lexer_init (struct string_lexer *slex, const char *input, enum segmenter_mode mode) { slex->input = input; slex->length = strlen (input) + 1; slex->offset = 0; segmenter_init (&slex->segmenter, mode); } /* */ bool string_lexer_next (struct string_lexer *slex, struct token *token) { struct segmenter saved_segmenter; size_t saved_offset = 0; struct scanner scanner; scanner_init (&scanner, token); for (;;) { const char *s = slex->input + slex->offset; size_t left = slex->length - slex->offset; enum segment_type type; int n; n = segmenter_push (&slex->segmenter, s, left, &type); assert (n >= 0); slex->offset += n; switch (scanner_push (&scanner, type, ss_buffer (s, n), token)) { case SCAN_BACK: slex->segmenter = saved_segmenter; slex->offset = saved_offset; /* Fall through. */ case SCAN_DONE: return token->type != T_STOP; case SCAN_MORE: break; case SCAN_SAVE: saved_segmenter = slex->segmenter; saved_offset = slex->offset; break; } } } pspp-1.0.1/src/language/lexer/value-parser.c0000644000175000017500000001021113137223525015655 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005, 2006, 2009, 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "value-parser.h" #include #include #include "data/data-in.h" #include "data/format.h" #include "data/value.h" #include "language/lexer/lexer.h" #include "libpspp/cast.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid static bool parse_number (struct lexer *, double *, const enum fmt_type *); /* Parses and stores a numeric value, or a range of the form "x THRU y". Open-ended ranges may be specified as "LO(WEST) THRU y" or "x THRU HI(GHEST)". Sets *X and *Y to the range or the value and returns success. Numeric values are always accepted. If FORMAT is nonnull, then string values are also accepted, and converted to numeric values using *FORMAT. */ bool parse_num_range (struct lexer *lexer, double *x, double *y, const enum fmt_type *format) { if (lex_match_id (lexer, "LO") || lex_match_id (lexer, "LOWEST")) *x = LOWEST; else if (!parse_number (lexer, x, format)) return false; if (lex_match_id (lexer, "THRU")) { if (lex_match_id (lexer, "HI") || lex_match_id (lexer, "HIGHEST")) *y = HIGHEST; else if (!parse_number (lexer, y, format)) return false; if (*y < *x) { double t; msg (SW, _("The high end of the range (%.*g) is below the low end " "(%.*g). The range will be treated as if reversed."), DBL_DIG + 1, *y, DBL_DIG + 1, *x); t = *x; *x = *y; *y = t; } else if (*x == *y) msg (SW, _("Ends of range are equal (%.*g)."), DBL_DIG + 1, *x); return true; } else { if (*x == LOWEST) { msg (SE, _("%s or %s must be part of a range."), "LO", "LOWEST"); return false; } *y = *x; } return true; } /* Parses a number and stores it in *X. Returns success. Numeric values are always accepted. If FORMAT is nonnull, then string values are also accepted, and converted to numeric values using *FORMAT. */ static bool parse_number (struct lexer *lexer, double *x, const enum fmt_type *format) { if (lex_is_string (lexer) && format != NULL) { union value v; assert (fmt_get_category (*format) != FMT_CAT_STRING); if (!data_in_msg (lex_tokss (lexer), "UTF-8", *format, &v, 0, NULL)) return false; lex_get (lexer); *x = v.f; if (*x == SYSMIS) { msg (SE, _("System-missing value is not valid here.")); return false; } return true; } if (lex_force_num (lexer)) { *x = lex_number (lexer); lex_get (lexer); return true; } return false; } /* Parses the current token from LEXER into value V, which must already have been initialized with the specified VAR's WIDTH. Returns true if successful, false otherwise. */ bool parse_value (struct lexer *lexer, union value *v, const struct variable *var) { int width = var_get_width (var); if (width == 0) return parse_number (lexer, &v->f, &var_get_print_format (var)->type); else if (lex_force_string (lexer)) { const char *s = lex_tokcstr (lexer); value_copy_str_rpad (v, width, CHAR_CAST_BUG (const uint8_t *, s), ' '); } else return false; lex_get (lexer); return true; } pspp-1.0.1/src/language/lexer/lexer.c0000644000175000017500000014263313137223525014404 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2013, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/lexer/lexer.h" #include #include #include #include #include #include #include #include #include #include #include #include "language/command.h" #include "language/lexer/scan.h" #include "language/lexer/segment.h" #include "language/lexer/token.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/deque.h" #include "libpspp/i18n.h" #include "libpspp/ll.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "libpspp/u8-istream.h" #include "output/journal.h" #include "output/text-item.h" #include "gl/c-ctype.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gl/xmemdup0.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid /* A token within a lex_source. */ struct lex_token { /* The regular token information. */ struct token token; /* Location of token in terms of the lex_source's buffer. src->tail <= line_pos <= token_pos <= src->head. */ size_t token_pos; /* Start of token. */ size_t token_len; /* Length of source for token in bytes. */ size_t line_pos; /* Start of line containing token_pos. */ int first_line; /* Line number at token_pos. */ }; /* A source of tokens, corresponding to a syntax file. This is conceptually a lex_reader wrapped with everything needed to convert its UTF-8 bytes into tokens. */ struct lex_source { struct ll ll; /* In lexer's list of sources. */ struct lex_reader *reader; struct segmenter segmenter; bool eof; /* True if T_STOP was read from 'reader'. */ /* Buffer of UTF-8 bytes. */ char *buffer; size_t allocated; /* Number of bytes allocated. */ size_t tail; /* &buffer[0] offset into UTF-8 source. */ size_t head; /* &buffer[head - tail] offset into source. */ /* Positions in source file, tail <= pos <= head for each member here. */ size_t journal_pos; /* First byte not yet output to journal. */ size_t seg_pos; /* First byte not yet scanned as token. */ size_t line_pos; /* First byte of line containing seg_pos. */ int n_newlines; /* Number of new-lines up to seg_pos. */ bool suppress_next_newline; /* Tokens. */ struct deque deque; /* Indexes into 'tokens'. */ struct lex_token *tokens; /* Lookahead tokens for parser. */ }; static struct lex_source *lex_source_create (struct lex_reader *); static void lex_source_destroy (struct lex_source *); /* Lexer. */ struct lexer { struct ll_list sources; /* Contains "struct lex_source"s. */ }; static struct lex_source *lex_source__ (const struct lexer *); static const struct lex_token *lex_next__ (const struct lexer *, int n); static void lex_source_push_endcmd__ (struct lex_source *); static void lex_source_pop__ (struct lex_source *); static bool lex_source_get__ (const struct lex_source *); static void lex_source_error_valist (struct lex_source *, int n0, int n1, const char *format, va_list) PRINTF_FORMAT (4, 0); static const struct lex_token *lex_source_next__ (const struct lex_source *, int n); /* Initializes READER with the specified CLASS and otherwise some reasonable defaults. The caller should fill in the others members as desired. */ void lex_reader_init (struct lex_reader *reader, const struct lex_reader_class *class) { reader->class = class; reader->syntax = LEX_SYNTAX_AUTO; reader->error = LEX_ERROR_CONTINUE; reader->file_name = NULL; reader->encoding = NULL; reader->line_number = 0; } /* Frees any file name already in READER and replaces it by a copy of FILE_NAME, or if FILE_NAME is null then clears any existing name. */ void lex_reader_set_file_name (struct lex_reader *reader, const char *file_name) { free (reader->file_name); reader->file_name = file_name != NULL ? xstrdup (file_name) : NULL; } /* Creates and returns a new lexer. */ struct lexer * lex_create (void) { struct lexer *lexer = xzalloc (sizeof *lexer); ll_init (&lexer->sources); return lexer; } /* Destroys LEXER. */ void lex_destroy (struct lexer *lexer) { if (lexer != NULL) { struct lex_source *source, *next; ll_for_each_safe (source, next, struct lex_source, ll, &lexer->sources) lex_source_destroy (source); free (lexer); } } /* Inserts READER into LEXER so that the next token read by LEXER comes from READER. Before the caller, LEXER must either be empty or at a T_ENDCMD token. */ void lex_include (struct lexer *lexer, struct lex_reader *reader) { assert (ll_is_empty (&lexer->sources) || lex_token (lexer) == T_ENDCMD); ll_push_head (&lexer->sources, &lex_source_create (reader)->ll); } /* Appends READER to LEXER, so that it will be read after all other current readers have already been read. */ void lex_append (struct lexer *lexer, struct lex_reader *reader) { ll_push_tail (&lexer->sources, &lex_source_create (reader)->ll); } /* Advancing. */ static struct lex_token * lex_push_token__ (struct lex_source *src) { struct lex_token *token; if (deque_is_full (&src->deque)) src->tokens = deque_expand (&src->deque, src->tokens, sizeof *src->tokens); token = &src->tokens[deque_push_front (&src->deque)]; token_init (&token->token); return token; } static void lex_source_pop__ (struct lex_source *src) { token_destroy (&src->tokens[deque_pop_back (&src->deque)].token); } static void lex_source_pop_front (struct lex_source *src) { token_destroy (&src->tokens[deque_pop_front (&src->deque)].token); } /* Advances LEXER to the next token, consuming the current token. */ void lex_get (struct lexer *lexer) { struct lex_source *src; src = lex_source__ (lexer); if (src == NULL) return; if (!deque_is_empty (&src->deque)) lex_source_pop__ (src); while (deque_is_empty (&src->deque)) if (!lex_source_get__ (src)) { lex_source_destroy (src); src = lex_source__ (lexer); if (src == NULL) return; } } /* Issuing errors. */ /* Prints a syntax error message containing the current token and given message MESSAGE (if non-null). */ void lex_error (struct lexer *lexer, const char *format, ...) { va_list args; va_start (args, format); lex_next_error_valist (lexer, 0, 0, format, args); va_end (args); } /* Prints a syntax error message containing the current token and given message MESSAGE (if non-null). */ void lex_error_valist (struct lexer *lexer, const char *format, va_list args) { lex_next_error_valist (lexer, 0, 0, format, args); } /* Prints a syntax error message containing the current token and given message MESSAGE (if non-null). */ void lex_next_error (struct lexer *lexer, int n0, int n1, const char *format, ...) { va_list args; va_start (args, format); lex_next_error_valist (lexer, n0, n1, format, args); va_end (args); } /* Prints a syntax error message saying that OPTION0 or one of the other strings following it, up to the first NULL, is expected. */ void lex_error_expecting (struct lexer *lexer, const char *option0, ...) { enum { MAX_OPTIONS = 8 }; const char *options[MAX_OPTIONS + 1]; va_list args; int n; va_start (args, option0); options[0] = option0; n = 0; while (n + 1 < MAX_OPTIONS && options[n] != NULL) options[++n] = va_arg (args, const char *); va_end (args); switch (n) { case 0: lex_error (lexer, NULL); break; case 1: lex_error (lexer, _("expecting %s"), options[0]); break; case 2: lex_error (lexer, _("expecting %s or %s"), options[0], options[1]); break; case 3: lex_error (lexer, _("expecting %s, %s, or %s"), options[0], options[1], options[2]); break; case 4: lex_error (lexer, _("expecting %s, %s, %s, or %s"), options[0], options[1], options[2], options[3]); break; case 5: lex_error (lexer, _("expecting %s, %s, %s, %s, or %s"), options[0], options[1], options[2], options[3], options[4]); break; case 6: lex_error (lexer, _("expecting %s, %s, %s, %s, %s, or %s"), options[0], options[1], options[2], options[3], options[4], options[5]); break; case 7: lex_error (lexer, _("expecting %s, %s, %s, %s, %s, %s, or %s"), options[0], options[1], options[2], options[3], options[4], options[5], options[6]); break; case 8: lex_error (lexer, _("expecting %s, %s, %s, %s, %s, %s, %s, or %s"), options[0], options[1], options[2], options[3], options[4], options[5], options[6], options[7]); break; default: NOT_REACHED (); } } /* Reports an error to the effect that subcommand SBC may only be specified once. This function does not take a lexer as an argument or use lex_error(), because the result would ordinarily just be redundant: "Syntax error at SUBCOMMAND: Subcommand SUBCOMMAND may only be specified once.", which does not help the user find the error. */ void lex_sbc_only_once (const char *sbc) { msg (SE, _("Subcommand %s may only be specified once."), sbc); } /* Reports an error to the effect that subcommand SBC is missing. This function does not take a lexer as an argument or use lex_error(), because a missing subcommand can normally be detected only after the whole command has been parsed, and so lex_error() would always report "Syntax error at end of command", which does not help the user find the error. */ void lex_sbc_missing (const char *sbc) { msg (SE, _("Required subcommand %s was not specified."), sbc); } /* Reports an error to the effect that specification SPEC may only be specified once within subcommand SBC. */ void lex_spec_only_once (struct lexer *lexer, const char *sbc, const char *spec) { lex_error (lexer, _("%s may only be specified once within subcommand %s"), spec, sbc); } /* Reports an error to the effect that specification SPEC is missing within subcommand SBC. */ void lex_spec_missing (struct lexer *lexer, const char *sbc, const char *spec) { lex_error (lexer, _("Required %s specification missing from %s subcommand"), sbc, spec); } /* Prints a syntax error message containing the current token and given message MESSAGE (if non-null). */ void lex_next_error_valist (struct lexer *lexer, int n0, int n1, const char *format, va_list args) { struct lex_source *src = lex_source__ (lexer); if (src != NULL) lex_source_error_valist (src, n0, n1, format, args); else { struct string s; ds_init_empty (&s); ds_put_format (&s, _("Syntax error at end of input")); if (format != NULL) { ds_put_cstr (&s, ": "); ds_put_vformat (&s, format, args); } ds_put_byte (&s, '.'); msg (SE, "%s", ds_cstr (&s)); ds_destroy (&s); } } /* Checks that we're at end of command. If so, returns a successful command completion code. If not, flags a syntax error and returns an error command completion code. */ int lex_end_of_command (struct lexer *lexer) { if (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_STOP) { lex_error (lexer, _("expecting end of command")); return CMD_FAILURE; } else return CMD_SUCCESS; } /* Token testing functions. */ /* Returns true if the current token is a number. */ bool lex_is_number (struct lexer *lexer) { return lex_next_is_number (lexer, 0); } /* Returns true if the current token is a string. */ bool lex_is_string (struct lexer *lexer) { return lex_next_is_string (lexer, 0); } /* Returns the value of the current token, which must be a floating point number. */ double lex_number (struct lexer *lexer) { return lex_next_number (lexer, 0); } /* Returns true iff the current token is an integer. */ bool lex_is_integer (struct lexer *lexer) { return lex_next_is_integer (lexer, 0); } /* Returns the value of the current token, which must be an integer. */ long lex_integer (struct lexer *lexer) { return lex_next_integer (lexer, 0); } /* Token testing functions with lookahead. A value of 0 for N as an argument to any of these functions refers to the current token. Lookahead is limited to the current command. Any N greater than the number of tokens remaining in the current command will be treated as referring to a T_ENDCMD token. */ /* Returns true if the token N ahead of the current token is a number. */ bool lex_next_is_number (struct lexer *lexer, int n) { enum token_type next_token = lex_next_token (lexer, n); return next_token == T_POS_NUM || next_token == T_NEG_NUM; } /* Returns true if the token N ahead of the current token is a string. */ bool lex_next_is_string (struct lexer *lexer, int n) { return lex_next_token (lexer, n) == T_STRING; } /* Returns the value of the token N ahead of the current token, which must be a floating point number. */ double lex_next_number (struct lexer *lexer, int n) { assert (lex_next_is_number (lexer, n)); return lex_next_tokval (lexer, n); } /* Returns true if the token N ahead of the current token is an integer. */ bool lex_next_is_integer (struct lexer *lexer, int n) { double value; if (!lex_next_is_number (lexer, n)) return false; value = lex_next_tokval (lexer, n); return value > LONG_MIN && value <= LONG_MAX && floor (value) == value; } /* Returns the value of the token N ahead of the current token, which must be an integer. */ long lex_next_integer (struct lexer *lexer, int n) { assert (lex_next_is_integer (lexer, n)); return lex_next_tokval (lexer, n); } /* Token matching functions. */ /* If the current token has the specified TYPE, skips it and returns true. Otherwise, returns false. */ bool lex_match (struct lexer *lexer, enum token_type type) { if (lex_token (lexer) == type) { lex_get (lexer); return true; } else return false; } /* If the current token matches IDENTIFIER, skips it and returns true. IDENTIFIER may be abbreviated to its first three letters. Otherwise, returns false. IDENTIFIER must be an ASCII string. */ bool lex_match_id (struct lexer *lexer, const char *identifier) { return lex_match_id_n (lexer, identifier, 3); } /* If the current token is IDENTIFIER, skips it and returns true. IDENTIFIER may be abbreviated to its first N letters. Otherwise, returns false. IDENTIFIER must be an ASCII string. */ bool lex_match_id_n (struct lexer *lexer, const char *identifier, size_t n) { if (lex_token (lexer) == T_ID && lex_id_match_n (ss_cstr (identifier), lex_tokss (lexer), n)) { lex_get (lexer); return true; } else return false; } /* If the current token is integer X, skips it and returns true. Otherwise, returns false. */ bool lex_match_int (struct lexer *lexer, int x) { if (lex_is_integer (lexer) && lex_integer (lexer) == x) { lex_get (lexer); return true; } else return false; } /* Forced matches. */ /* If this token is IDENTIFIER, skips it and returns true. IDENTIFIER may be abbreviated to its first 3 letters. Otherwise, reports an error and returns false. IDENTIFIER must be an ASCII string. */ bool lex_force_match_id (struct lexer *lexer, const char *identifier) { if (lex_match_id (lexer, identifier)) return true; else { lex_error_expecting (lexer, identifier, NULL_SENTINEL); return false; } } /* If the current token has the specified TYPE, skips it and returns true. Otherwise, reports an error and returns false. */ bool lex_force_match (struct lexer *lexer, enum token_type type) { if (lex_token (lexer) == type) { lex_get (lexer); return true; } else { const char *type_string = token_type_to_string (type); if (type_string) { char *s = xasprintf ("`%s'", type_string); lex_error_expecting (lexer, s, NULL_SENTINEL); free (s); } else lex_error_expecting (lexer, token_type_to_name (type), NULL_SENTINEL); return false; } } /* If the current token is a string, does nothing and returns true. Otherwise, reports an error and returns false. */ bool lex_force_string (struct lexer *lexer) { if (lex_is_string (lexer)) return true; else { lex_error (lexer, _("expecting string")); return false; } } /* If the current token is a string or an identifier, does nothing and returns true. Otherwise, reports an error and returns false. This is meant for use in syntactic situations where we want to encourage the user to supply a quoted string, but for compatibility we also accept identifiers. (One example of such a situation is file names.) Therefore, the error message issued when the current token is wrong only says that a string is expected and doesn't mention that an identifier would also be accepted. */ bool lex_force_string_or_id (struct lexer *lexer) { return lex_is_integer (lexer) || lex_force_string (lexer); } /* If the current token is an integer, does nothing and returns true. Otherwise, reports an error and returns false. */ bool lex_force_int (struct lexer *lexer) { if (lex_is_integer (lexer)) return true; else { lex_error (lexer, _("expecting integer")); return false; } } /* If the current token is a number, does nothing and returns true. Otherwise, reports an error and returns false. */ bool lex_force_num (struct lexer *lexer) { if (lex_is_number (lexer)) return true; lex_error (lexer, _("expecting number")); return false; } /* If the current token is an identifier, does nothing and returns true. Otherwise, reports an error and returns false. */ bool lex_force_id (struct lexer *lexer) { if (lex_token (lexer) == T_ID) return true; lex_error (lexer, _("expecting identifier")); return false; } /* Token accessors. */ /* Returns the type of LEXER's current token. */ enum token_type lex_token (const struct lexer *lexer) { return lex_next_token (lexer, 0); } /* Returns the number in LEXER's current token. Only T_NEG_NUM and T_POS_NUM tokens have meaningful values. For other tokens this function will always return zero. */ double lex_tokval (const struct lexer *lexer) { return lex_next_tokval (lexer, 0); } /* Returns the null-terminated string in LEXER's current token, UTF-8 encoded. Only T_ID and T_STRING tokens have meaningful strings. For other tokens this functions this function will always return NULL. The UTF-8 encoding of the returned string is correct for variable names and other identifiers. Use filename_to_utf8() to use it as a filename. Use data_in() to use it in a "union value". */ const char * lex_tokcstr (const struct lexer *lexer) { return lex_next_tokcstr (lexer, 0); } /* Returns the string in LEXER's current token, UTF-8 encoded. The string is null-terminated (but the null terminator is not included in the returned substring's 'length'). Only T_ID and T_STRING tokens have meaningful strings. For other tokens this functions this function will always return NULL. The UTF-8 encoding of the returned string is correct for variable names and other identifiers. Use filename_to_utf8() to use it as a filename. Use data_in() to use it in a "union value". */ struct substring lex_tokss (const struct lexer *lexer) { return lex_next_tokss (lexer, 0); } /* Looking ahead. A value of 0 for N as an argument to any of these functions refers to the current token. Lookahead is limited to the current command. Any N greater than the number of tokens remaining in the current command will be treated as referring to a T_ENDCMD token. */ static const struct lex_token * lex_next__ (const struct lexer *lexer_, int n) { struct lexer *lexer = CONST_CAST (struct lexer *, lexer_); struct lex_source *src = lex_source__ (lexer); if (src != NULL) return lex_source_next__ (src, n); else { static const struct lex_token stop_token = { TOKEN_INITIALIZER (T_STOP, 0.0, ""), 0, 0, 0, 0 }; return &stop_token; } } static const struct lex_token * lex_source_next__ (const struct lex_source *src, int n) { while (deque_count (&src->deque) <= n) { if (!deque_is_empty (&src->deque)) { struct lex_token *front; front = &src->tokens[deque_front (&src->deque, 0)]; if (front->token.type == T_STOP || front->token.type == T_ENDCMD) return front; } lex_source_get__ (src); } return &src->tokens[deque_back (&src->deque, n)]; } /* Returns the "struct token" of the token N after the current one in LEXER. The returned pointer can be invalidated by pretty much any succeeding call into the lexer, although the string pointer within the returned token is only invalidated by consuming the token (e.g. with lex_get()). */ const struct token * lex_next (const struct lexer *lexer, int n) { return &lex_next__ (lexer, n)->token; } /* Returns the type of the token N after the current one in LEXER. */ enum token_type lex_next_token (const struct lexer *lexer, int n) { return lex_next (lexer, n)->type; } /* Returns the number in the tokn N after the current one in LEXER. Only T_NEG_NUM and T_POS_NUM tokens have meaningful values. For other tokens this function will always return zero. */ double lex_next_tokval (const struct lexer *lexer, int n) { const struct token *token = lex_next (lexer, n); return token->number; } /* Returns the null-terminated string in the token N after the current one, in UTF-8 encoding. Only T_ID and T_STRING tokens have meaningful strings. For other tokens this functions this function will always return NULL. The UTF-8 encoding of the returned string is correct for variable names and other identifiers. Use filename_to_utf8() to use it as a filename. Use data_in() to use it in a "union value". */ const char * lex_next_tokcstr (const struct lexer *lexer, int n) { return lex_next_tokss (lexer, n).string; } /* Returns the string in the token N after the current one, in UTF-8 encoding. The string is null-terminated (but the null terminator is not included in the returned substring's 'length'). Only T_ID and T_STRING tokens have meaningful strings. For other tokens this functions this function will always return NULL. The UTF-8 encoding of the returned string is correct for variable names and other identifiers. Use filename_to_utf8() to use it as a filename. Use data_in() to use it in a "union value". */ struct substring lex_next_tokss (const struct lexer *lexer, int n) { return lex_next (lexer, n)->string; } static bool lex_tokens_match (const struct token *actual, const struct token *expected) { if (actual->type != expected->type) return false; switch (actual->type) { case T_POS_NUM: case T_NEG_NUM: return actual->number == expected->number; case T_ID: return lex_id_match (expected->string, actual->string); case T_STRING: return (actual->string.length == expected->string.length && !memcmp (actual->string.string, expected->string.string, actual->string.length)); default: return true; } } /* If LEXER is positioned at the sequence of tokens that may be parsed from S, skips it and returns true. Otherwise, returns false. S may consist of an arbitrary sequence of tokens, e.g. "KRUSKAL-WALLIS", "2SLS", or "END INPUT PROGRAM". Identifiers may be abbreviated to their first three letters. */ bool lex_match_phrase (struct lexer *lexer, const char *s) { struct string_lexer slex; struct token token; int i; i = 0; string_lexer_init (&slex, s, SEG_MODE_INTERACTIVE); while (string_lexer_next (&slex, &token)) if (token.type != SCAN_SKIP) { bool match = lex_tokens_match (lex_next (lexer, i++), &token); token_destroy (&token); if (!match) return false; } while (i-- > 0) lex_get (lexer); return true; } static int lex_source_get_first_line_number (const struct lex_source *src, int n) { return lex_source_next__ (src, n)->first_line; } static int count_newlines (char *s, size_t length) { int n_newlines = 0; char *newline; while ((newline = memchr (s, '\n', length)) != NULL) { n_newlines++; length -= (newline + 1) - s; s = newline + 1; } return n_newlines; } static int lex_source_get_last_line_number (const struct lex_source *src, int n) { const struct lex_token *token = lex_source_next__ (src, n); if (token->first_line == 0) return 0; else { char *token_str = &src->buffer[token->token_pos - src->tail]; return token->first_line + count_newlines (token_str, token->token_len) + 1; } } static int count_columns (const char *s_, size_t length) { const uint8_t *s = CHAR_CAST (const uint8_t *, s_); int columns; size_t ofs; int mblen; columns = 0; for (ofs = 0; ofs < length; ofs += mblen) { ucs4_t uc; mblen = u8_mbtouc (&uc, s + ofs, length - ofs); if (uc != '\t') { int width = uc_width (uc, "UTF-8"); if (width > 0) columns += width; } else columns = ROUND_UP (columns + 1, 8); } return columns + 1; } static int lex_source_get_first_column (const struct lex_source *src, int n) { const struct lex_token *token = lex_source_next__ (src, n); return count_columns (&src->buffer[token->line_pos - src->tail], token->token_pos - token->line_pos); } static int lex_source_get_last_column (const struct lex_source *src, int n) { const struct lex_token *token = lex_source_next__ (src, n); char *start, *end, *newline; start = &src->buffer[token->line_pos - src->tail]; end = &src->buffer[(token->token_pos + token->token_len) - src->tail]; newline = memrchr (start, '\n', end - start); if (newline != NULL) start = newline + 1; return count_columns (start, end - start); } /* Returns the 1-based line number of the start of the syntax that represents the token N after the current one in LEXER. Returns 0 for a T_STOP token or if the token is drawn from a source that does not have line numbers. */ int lex_get_first_line_number (const struct lexer *lexer, int n) { const struct lex_source *src = lex_source__ (lexer); return src != NULL ? lex_source_get_first_line_number (src, n) : 0; } /* Returns the 1-based line number of the end of the syntax that represents the token N after the current one in LEXER, plus 1. Returns 0 for a T_STOP token or if the token is drawn from a source that does not have line numbers. Most of the time, a single token is wholly within a single line of syntax, but there are two exceptions: a T_STRING token can be made up of multiple segments on adjacent lines connected with "+" punctuators, and a T_NEG_NUM token can consist of a "-" on one line followed by the number on the next. */ int lex_get_last_line_number (const struct lexer *lexer, int n) { const struct lex_source *src = lex_source__ (lexer); return src != NULL ? lex_source_get_last_line_number (src, n) : 0; } /* Returns the 1-based column number of the start of the syntax that represents the token N after the current one in LEXER. Returns 0 for a T_STOP token. Column numbers are measured according to the width of characters as shown in a typical fixed-width font, in which CJK characters have width 2 and combining characters have width 0. */ int lex_get_first_column (const struct lexer *lexer, int n) { const struct lex_source *src = lex_source__ (lexer); return src != NULL ? lex_source_get_first_column (src, n) : 0; } /* Returns the 1-based column number of the end of the syntax that represents the token N after the current one in LEXER, plus 1. Returns 0 for a T_STOP token. Column numbers are measured according to the width of characters as shown in a typical fixed-width font, in which CJK characters have width 2 and combining characters have width 0. */ int lex_get_last_column (const struct lexer *lexer, int n) { const struct lex_source *src = lex_source__ (lexer); return src != NULL ? lex_source_get_last_column (src, n) : 0; } /* Returns the name of the syntax file from which the current command is drawn. Returns NULL for a T_STOP token or if the command's source does not have line numbers. There is no version of this function that takes an N argument because lookahead only works to the end of a command and any given command is always within a single syntax file. */ const char * lex_get_file_name (const struct lexer *lexer) { struct lex_source *src = lex_source__ (lexer); return src == NULL ? NULL : src->reader->file_name; } const char * lex_get_encoding (const struct lexer *lexer) { struct lex_source *src = lex_source__ (lexer); return src == NULL ? NULL : src->reader->encoding; } /* Returns the syntax mode for the syntax file from which the current drawn is drawn. Returns LEX_SYNTAX_AUTO for a T_STOP token or if the command's source does not have line numbers. There is no version of this function that takes an N argument because lookahead only works to the end of a command and any given command is always within a single syntax file. */ enum lex_syntax_mode lex_get_syntax_mode (const struct lexer *lexer) { struct lex_source *src = lex_source__ (lexer); return src == NULL ? LEX_SYNTAX_AUTO : src->reader->syntax; } /* Returns the error mode for the syntax file from which the current drawn is drawn. Returns LEX_ERROR_TERMINAL for a T_STOP token or if the command's source does not have line numbers. There is no version of this function that takes an N argument because lookahead only works to the end of a command and any given command is always within a single syntax file. */ enum lex_error_mode lex_get_error_mode (const struct lexer *lexer) { struct lex_source *src = lex_source__ (lexer); return src == NULL ? LEX_ERROR_TERMINAL : src->reader->error; } /* If the source that LEXER is currently reading has error mode LEX_ERROR_TERMINAL, discards all buffered input and tokens, so that the next token to be read comes directly from whatever is next read from the stream. It makes sense to call this function after encountering an error in a command entered on the console, because usually the user would prefer not to have cascading errors. */ void lex_interactive_reset (struct lexer *lexer) { struct lex_source *src = lex_source__ (lexer); if (src != NULL && src->reader->error == LEX_ERROR_TERMINAL) { src->head = src->tail = 0; src->journal_pos = src->seg_pos = src->line_pos = 0; src->n_newlines = 0; src->suppress_next_newline = false; segmenter_init (&src->segmenter, segmenter_get_mode (&src->segmenter)); while (!deque_is_empty (&src->deque)) lex_source_pop__ (src); lex_source_push_endcmd__ (src); } } /* Advances past any tokens in LEXER up to a T_ENDCMD or T_STOP. */ void lex_discard_rest_of_command (struct lexer *lexer) { while (lex_token (lexer) != T_STOP && lex_token (lexer) != T_ENDCMD) lex_get (lexer); } /* Discards all lookahead tokens in LEXER, then discards all input sources until it encounters one with error mode LEX_ERROR_TERMINAL or until it runs out of input sources. */ void lex_discard_noninteractive (struct lexer *lexer) { struct lex_source *src = lex_source__ (lexer); if (src != NULL) { while (!deque_is_empty (&src->deque)) lex_source_pop__ (src); for (; src != NULL && src->reader->error != LEX_ERROR_TERMINAL; src = lex_source__ (lexer)) lex_source_destroy (src); } } static size_t lex_source_max_tail__ (const struct lex_source *src) { const struct lex_token *token; size_t max_tail; assert (src->seg_pos >= src->line_pos); max_tail = MIN (src->journal_pos, src->line_pos); /* Use the oldest token also. (We know that src->deque cannot be empty because we are in the process of adding a new token, which is already initialized enough to use here.) */ token = &src->tokens[deque_back (&src->deque, 0)]; assert (token->token_pos >= token->line_pos); max_tail = MIN (max_tail, token->line_pos); return max_tail; } static void lex_source_expand__ (struct lex_source *src) { if (src->head - src->tail >= src->allocated) { size_t max_tail = lex_source_max_tail__ (src); if (max_tail > src->tail) { /* Advance the tail, freeing up room at the head. */ memmove (src->buffer, src->buffer + (max_tail - src->tail), src->head - max_tail); src->tail = max_tail; } else { /* Buffer is completely full. Expand it. */ src->buffer = x2realloc (src->buffer, &src->allocated); } } else { /* There's space available at the head of the buffer. Nothing to do. */ } } static void lex_source_read__ (struct lex_source *src) { do { lex_source_expand__ (src); size_t head_ofs = src->head - src->tail; size_t space = src->allocated - head_ofs; enum prompt_style prompt = segmenter_get_prompt (&src->segmenter); size_t n = src->reader->class->read (src->reader, &src->buffer[head_ofs], space, prompt); assert (n <= space); for (char *p = &src->buffer[head_ofs]; p < &src->buffer[head_ofs + n]; p++) if (*p == '\0') { struct msg m; m.category = MSG_C_SYNTAX; m.severity = MSG_S_ERROR; m.file_name = src->reader->file_name; m.first_line = 0; m.last_line = 0; m.first_column = 0; m.last_column = 0; m.text = xstrdup ("Bad character U+0000 in input."); msg_emit (&m); *p = ' '; } if (n == 0) { /* End of input. Ensure that the input always ends in a new-line followed by a null byte, as required by the segmenter library. */ if (src->head == src->tail || src->buffer[src->head - src->tail - 1] != '\n') src->buffer[src->head++ - src->tail] = '\n'; lex_source_expand__ (src); src->buffer[src->head++ - src->tail] = '\0'; return; } src->head += n; } while (!memchr (&src->buffer[src->seg_pos - src->tail], '\n', src->head - src->seg_pos)); } static struct lex_source * lex_source__ (const struct lexer *lexer) { return (ll_is_empty (&lexer->sources) ? NULL : ll_data (ll_head (&lexer->sources), struct lex_source, ll)); } static struct substring lex_source_get_syntax__ (const struct lex_source *src, int n0, int n1) { const struct lex_token *token0 = lex_source_next__ (src, n0); const struct lex_token *token1 = lex_source_next__ (src, MAX (n0, n1)); size_t start = token0->token_pos; size_t end = token1->token_pos + token1->token_len; return ss_buffer (&src->buffer[start - src->tail], end - start); } static void lex_ellipsize__ (struct substring in, char *out, size_t out_size) { size_t out_maxlen; size_t out_len; int mblen; assert (out_size >= 16); out_maxlen = out_size - (in.length >= out_size ? 3 : 0) - 1; for (out_len = 0; out_len < in.length; out_len += mblen) { if (in.string[out_len] == '\n' || (in.string[out_len] == '\r' && out_len + 1 < in.length && in.string[out_len + 1] == '\n')) break; mblen = u8_mblen (CHAR_CAST (const uint8_t *, in.string + out_len), in.length - out_len); if (out_len + mblen > out_maxlen) break; } memcpy (out, in.string, out_len); strcpy (&out[out_len], out_len < in.length ? "..." : ""); } static void lex_source_error_valist (struct lex_source *src, int n0, int n1, const char *format, va_list args) { const struct lex_token *token; struct string s; struct msg m; ds_init_empty (&s); token = lex_source_next__ (src, n0); if (token->token.type == T_ENDCMD) ds_put_cstr (&s, _("Syntax error at end of command")); else { struct substring syntax = lex_source_get_syntax__ (src, n0, n1); if (!ss_is_empty (syntax)) { char syntax_cstr[64]; lex_ellipsize__ (syntax, syntax_cstr, sizeof syntax_cstr); ds_put_format (&s, _("Syntax error at `%s'"), syntax_cstr); } else ds_put_cstr (&s, _("Syntax error")); } if (format) { ds_put_cstr (&s, ": "); ds_put_vformat (&s, format, args); } ds_put_byte (&s, '.'); m.category = MSG_C_SYNTAX; m.severity = MSG_S_ERROR; m.file_name = src->reader->file_name; m.first_line = lex_source_get_first_line_number (src, n0); m.last_line = lex_source_get_last_line_number (src, n1); m.first_column = lex_source_get_first_column (src, n0); m.last_column = lex_source_get_last_column (src, n1); m.text = ds_steal_cstr (&s); msg_emit (&m); } static void PRINTF_FORMAT (2, 3) lex_get_error (struct lex_source *src, const char *format, ...) { va_list args; int n; va_start (args, format); n = deque_count (&src->deque) - 1; lex_source_error_valist (src, n, n, format, args); lex_source_pop_front (src); va_end (args); } /* Attempts to append an additional token into SRC's deque, reading more from the underlying lex_reader if necessary.. Returns true if successful, false if the deque already represents (a suffix of) the whole lex_reader's contents, */ static bool lex_source_get__ (const struct lex_source *src_) { struct lex_source *src = CONST_CAST (struct lex_source *, src_); if (src->eof) return false; /* State maintained while scanning tokens. Usually we only need a single state, but scanner_push() can return SCAN_SAVE to indicate that the state needs to be saved and possibly restored later with SCAN_BACK. */ struct state { struct segmenter segmenter; enum segment_type last_segment; int newlines; /* Number of newlines encountered so far. */ /* Maintained here so we can update lex_source's similar members when we finish. */ size_t line_pos; size_t seg_pos; }; /* Initialize state. */ struct state state = { .segmenter = src->segmenter, .newlines = 0, .seg_pos = src->seg_pos, .line_pos = src->line_pos, }; struct state saved = state; /* Append a new token to SRC and initialize it. */ struct lex_token *token = lex_push_token__ (src); struct scanner scanner; scanner_init (&scanner, &token->token); token->line_pos = src->line_pos; token->token_pos = src->seg_pos; if (src->reader->line_number > 0) token->first_line = src->reader->line_number + src->n_newlines; else token->first_line = 0; /* Extract segments and pass them through the scanner until we obtain a token. */ for (;;) { /* Extract a segment. */ const char *segment = &src->buffer[state.seg_pos - src->tail]; size_t seg_maxlen = src->head - state.seg_pos; enum segment_type type; int seg_len = segmenter_push (&state.segmenter, segment, seg_maxlen, &type); if (seg_len < 0) { /* The segmenter needs more input to produce a segment. */ lex_source_read__ (src); continue; } /* Update state based on the segment. */ state.last_segment = type; state.seg_pos += seg_len; if (type == SEG_NEWLINE) { state.newlines++; state.line_pos = state.seg_pos; } /* Pass the segment into the scanner and try to get a token out. */ enum scan_result result = scanner_push (&scanner, type, ss_buffer (segment, seg_len), &token->token); if (result == SCAN_SAVE) saved = state; else if (result == SCAN_BACK) { state = saved; break; } else if (result == SCAN_DONE) break; } /* If we've reached the end of a line, or the end of a command, then pass the line to the output engine as a syntax text item. */ int n_lines = state.newlines; if (state.last_segment == SEG_END_COMMAND && !src->suppress_next_newline) { n_lines++; src->suppress_next_newline = true; } else if (n_lines > 0 && src->suppress_next_newline) { n_lines--; src->suppress_next_newline = false; } for (int i = 0; i < n_lines; i++) { const char *line = &src->buffer[src->journal_pos - src->tail]; const char *newline = rawmemchr (line, '\n'); size_t line_len = newline - line; if (line_len > 0 && line[line_len - 1] == '\r') line_len--; char *syntax = malloc (line_len + 2); memcpy (syntax, line, line_len); syntax[line_len] = '\n'; syntax[line_len + 1] = '\0'; text_item_submit (text_item_create_nocopy (TEXT_ITEM_SYNTAX, syntax)); src->journal_pos += newline - line + 1; } token->token_len = state.seg_pos - src->seg_pos; src->segmenter = state.segmenter; src->seg_pos = state.seg_pos; src->line_pos = state.line_pos; src->n_newlines += state.newlines; switch (token->token.type) { default: break; case T_STOP: token->token.type = T_ENDCMD; src->eof = true; break; case SCAN_BAD_HEX_LENGTH: lex_get_error (src, _("String of hex digits has %d characters, which " "is not a multiple of 2"), (int) token->token.number); break; case SCAN_BAD_HEX_DIGIT: case SCAN_BAD_UNICODE_DIGIT: lex_get_error (src, _("`%c' is not a valid hex digit"), (int) token->token.number); break; case SCAN_BAD_UNICODE_LENGTH: lex_get_error (src, _("Unicode string contains %d bytes, which is " "not in the valid range of 1 to 8 bytes"), (int) token->token.number); break; case SCAN_BAD_UNICODE_CODE_POINT: lex_get_error (src, _("U+%04X is not a valid Unicode code point"), (int) token->token.number); break; case SCAN_EXPECTED_QUOTE: lex_get_error (src, _("Unterminated string constant")); break; case SCAN_EXPECTED_EXPONENT: lex_get_error (src, _("Missing exponent following `%s'"), token->token.string.string); break; case SCAN_UNEXPECTED_DOT: lex_get_error (src, _("Unexpected `.' in middle of command")); break; case SCAN_UNEXPECTED_CHAR: { char c_name[16]; lex_get_error (src, _("Bad character %s in input"), uc_name (token->token.number, c_name)); } break; case SCAN_SKIP: lex_source_pop_front (src); break; } return true; } static void lex_source_push_endcmd__ (struct lex_source *src) { struct lex_token *token = lex_push_token__ (src); token->token.type = T_ENDCMD; token->token_pos = 0; token->token_len = 0; token->line_pos = 0; token->first_line = 0; } static struct lex_source * lex_source_create (struct lex_reader *reader) { struct lex_source *src; enum segmenter_mode mode; src = xzalloc (sizeof *src); src->reader = reader; if (reader->syntax == LEX_SYNTAX_AUTO) mode = SEG_MODE_AUTO; else if (reader->syntax == LEX_SYNTAX_INTERACTIVE) mode = SEG_MODE_INTERACTIVE; else if (reader->syntax == LEX_SYNTAX_BATCH) mode = SEG_MODE_BATCH; else NOT_REACHED (); segmenter_init (&src->segmenter, mode); src->tokens = deque_init (&src->deque, 4, sizeof *src->tokens); lex_source_push_endcmd__ (src); return src; } static void lex_source_destroy (struct lex_source *src) { char *file_name = src->reader->file_name; char *encoding = src->reader->encoding; if (src->reader->class->destroy != NULL) src->reader->class->destroy (src->reader); free (file_name); free (encoding); free (src->buffer); while (!deque_is_empty (&src->deque)) lex_source_pop__ (src); free (src->tokens); ll_remove (&src->ll); free (src); } struct lex_file_reader { struct lex_reader reader; struct u8_istream *istream; }; static struct lex_reader_class lex_file_reader_class; /* Creates and returns a new lex_reader that will read from file FILE_NAME (or from stdin if FILE_NAME is "-"). The file is expected to be encoded with ENCODING, which should take one of the forms accepted by u8_istream_for_file(). SYNTAX and ERROR become the syntax mode and error mode of the new reader, respectively. Returns a null pointer if FILE_NAME cannot be opened. */ struct lex_reader * lex_reader_for_file (const char *file_name, const char *encoding, enum lex_syntax_mode syntax, enum lex_error_mode error) { struct lex_file_reader *r; struct u8_istream *istream; istream = (!strcmp(file_name, "-") ? u8_istream_for_fd (encoding, STDIN_FILENO) : u8_istream_for_file (encoding, file_name, O_RDONLY)); if (istream == NULL) { msg (ME, _("Opening `%s': %s."), file_name, strerror (errno)); return NULL; } r = xmalloc (sizeof *r); lex_reader_init (&r->reader, &lex_file_reader_class); r->reader.syntax = syntax; r->reader.error = error; r->reader.file_name = xstrdup (file_name); r->reader.encoding = encoding ? xstrdup (encoding) : NULL; r->reader.line_number = 1; r->istream = istream; return &r->reader; } static struct lex_file_reader * lex_file_reader_cast (struct lex_reader *r) { return UP_CAST (r, struct lex_file_reader, reader); } static size_t lex_file_read (struct lex_reader *r_, char *buf, size_t n, enum prompt_style prompt_style UNUSED) { struct lex_file_reader *r = lex_file_reader_cast (r_); ssize_t n_read = u8_istream_read (r->istream, buf, n); if (n_read < 0) { msg (ME, _("Error reading `%s': %s."), r_->file_name, strerror (errno)); return 0; } return n_read; } static void lex_file_close (struct lex_reader *r_) { struct lex_file_reader *r = lex_file_reader_cast (r_); if (u8_istream_fileno (r->istream) != STDIN_FILENO) { if (u8_istream_close (r->istream) != 0) msg (ME, _("Error closing `%s': %s."), r_->file_name, strerror (errno)); } else u8_istream_free (r->istream); free (r); } static struct lex_reader_class lex_file_reader_class = { lex_file_read, lex_file_close }; struct lex_string_reader { struct lex_reader reader; struct substring s; size_t offset; }; static struct lex_reader_class lex_string_reader_class; /* Creates and returns a new lex_reader for the contents of S, which must be encoded in the given ENCODING. The new reader takes ownership of S and will free it with ss_dealloc() when it is closed. */ struct lex_reader * lex_reader_for_substring_nocopy (struct substring s, const char *encoding) { struct lex_string_reader *r; r = xmalloc (sizeof *r); lex_reader_init (&r->reader, &lex_string_reader_class); r->reader.syntax = LEX_SYNTAX_AUTO; r->reader.encoding = encoding ? xstrdup (encoding) : NULL; r->s = s; r->offset = 0; return &r->reader; } /* Creates and returns a new lex_reader for a copy of null-terminated string S, which must be encoded in ENCODING. The caller retains ownership of S. */ struct lex_reader * lex_reader_for_string (const char *s, const char *encoding) { struct substring ss; ss_alloc_substring (&ss, ss_cstr (s)); return lex_reader_for_substring_nocopy (ss, encoding); } /* Formats FORMAT as a printf()-like format string and creates and returns a new lex_reader for the formatted result. */ struct lex_reader * lex_reader_for_format (const char *format, const char *encoding, ...) { struct lex_reader *r; va_list args; va_start (args, encoding); r = lex_reader_for_substring_nocopy (ss_cstr (xvasprintf (format, args)), encoding); va_end (args); return r; } static struct lex_string_reader * lex_string_reader_cast (struct lex_reader *r) { return UP_CAST (r, struct lex_string_reader, reader); } static size_t lex_string_read (struct lex_reader *r_, char *buf, size_t n, enum prompt_style prompt_style UNUSED) { struct lex_string_reader *r = lex_string_reader_cast (r_); size_t chunk; chunk = MIN (n, r->s.length - r->offset); memcpy (buf, r->s.string + r->offset, chunk); r->offset += chunk; return chunk; } static void lex_string_close (struct lex_reader *r_) { struct lex_string_reader *r = lex_string_reader_cast (r_); ss_dealloc (&r->s); free (r); } static struct lex_reader_class lex_string_reader_class = { lex_string_read, lex_string_close }; pspp-1.0.1/src/language/lexer/token.c0000644000175000017500000001023712470413451014375 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/lexer/token.h" #include #include #include #include "data/identifier.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/misc.h" #include "gl/ftoastr.h" #include "gl/xalloc.h" /* Initializes TOKEN with an arbitrary type, number 0, and a null string. */ void token_init (struct token *token) { token->type = 0; token->number = 0.0; token->string = ss_empty (); } /* Frees the string that TOKEN contains. */ void token_destroy (struct token *token) { if (token != NULL) ss_dealloc (&token->string); } static char * number_token_to_string (const struct token *token) { char buffer[DBL_BUFSIZE_BOUND]; c_dtoastr (buffer, sizeof buffer, 0, 0, fabs (token->number)); return (token->type == T_POS_NUM ? xstrdup (buffer) : xasprintf ("-%s", buffer)); } static char * quoted_string_representation (struct substring ss, size_t n_quotes) { char *rep; size_t i; char *p; p = rep = xmalloc (1 + ss.length + n_quotes + 1 + 1); *p++ = '\''; for (i = 0; i < ss.length; i++) { uint8_t c = ss.string[i]; if (c == '\'') *p++ = c; *p++ = c; } *p++ = '\''; *p = '\0'; return rep; } static char * hex_string_representation (struct substring ss) { char *rep; size_t i; char *p; p = rep = xmalloc (2 + 2 * ss.length + 1 + 1); *p++ = 'X'; *p++ = '\''; for (i = 0; i < ss.length; i++) { static const char hex_digits[] = "0123456789abcdef"; uint8_t c = ss.string[i]; *p++ = hex_digits[c >> 4]; *p++ = hex_digits[c & 15]; } *p++ = '\''; *p = '\0'; return rep; } static char * string_representation (struct substring ss) { size_t n_quotes; size_t ofs; int mblen; n_quotes = 0; for (ofs = 0; ofs < ss.length; ofs += mblen) { ucs4_t uc; mblen = u8_mbtoucr (&uc, CHAR_CAST (const uint8_t *, ss.string + ofs), ss.length - ofs); if (mblen < 0 || !uc_is_print (uc)) return hex_string_representation (ss); else if (uc == '\'') n_quotes++; } return quoted_string_representation (ss, n_quotes); } /* Returns a UTF-8 string that would yield TOKEN if it appeared in a syntax file. The caller should free the returned string, with free(), when it is no longer needed. The T_STOP token has no representation, so this function returns NULL. */ char * token_to_string (const struct token *token) { const char *name; switch (token->type) { case T_POS_NUM: case T_NEG_NUM: return number_token_to_string (token); case T_ID: return ss_xstrdup (token->string); case T_STRING: return string_representation (token->string); default: name = token_type_to_name (token->type); return name != NULL ? xstrdup (name) : NULL; } } /* Prints TOKEN on STREAM, for debugging. */ void token_print (const struct token *token, FILE *stream) { fputs (token_type_to_name (token->type), stream); if (token->type == T_POS_NUM || token->type == T_NEG_NUM || token->number != 0.0) { char s[DBL_BUFSIZE_BOUND]; c_dtoastr (s, sizeof s, 0, 0, token->number); fprintf (stream, "\t%s", s); } if (token->type == T_ID || token->type == T_STRING || token->string.length) fprintf (stream, "\t\"%.*s\"", (int) token->string.length, token->string.string); putc ('\n', stream); } pspp-1.0.1/src/language/lexer/variable-parser.c0000644000175000017500000006377313137223525016353 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/lexer/variable-parser.h" #include #include #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/variable.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/hash-functions.h" #include "libpspp/i18n.h" #include "libpspp/hmapx.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "libpspp/stringi-set.h" #include "math/interaction.h" #include "gl/c-ctype.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) static struct variable * var_set_get_var (const struct var_set *, size_t ); static struct variable *var_set_lookup_var (const struct var_set *, const char *); static bool var_set_lookup_var_idx (const struct var_set *, const char *, size_t *); /* Parses a name as a variable within VS. Sets *IDX to the variable's index and returns true if successful. On failure emits an error message and returns false. */ static bool parse_vs_variable_idx (struct lexer *lexer, const struct var_set *vs, size_t *idx) { assert (idx != NULL); if (lex_token (lexer) != T_ID) { lex_error (lexer, _("expecting variable name")); return false; } else if (var_set_lookup_var_idx (vs, lex_tokcstr (lexer), idx)) { lex_get (lexer); return true; } else { msg (SE, _("%s is not a variable name."), lex_tokcstr (lexer)); return false; } } /* Parses a name as a variable within VS and returns the variable if successful. On failure emits an error message and returns a null pointer. */ static struct variable * parse_vs_variable (struct lexer *lexer, const struct var_set *vs) { size_t idx; return parse_vs_variable_idx (lexer, vs, &idx) ? var_set_get_var (vs, idx) : NULL; } /* Parses a variable name in dictionary D and returns the variable if successful. On failure emits an error message and returns a null pointer. */ struct variable * parse_variable (struct lexer *lexer, const struct dictionary *d) { struct var_set *vs = var_set_create_from_dict (d); struct variable *var = parse_vs_variable (lexer, vs); var_set_destroy (vs); return var; } /* Parses a set of variables from dictionary D given options OPTS. Resulting list of variables stored in *VAR and the number of variables into *CNT. Returns true only if successful. */ bool parse_variables (struct lexer *lexer, const struct dictionary *d, struct variable ***var, size_t *cnt, int opts) { struct var_set *vs; int success; assert (d != NULL); assert (var != NULL); assert (cnt != NULL); vs = var_set_create_from_dict (d); success = parse_var_set_vars (lexer, vs, var, cnt, opts); var_set_destroy (vs); return success; } /* Parses a set of variables from dictionary D given options OPTS. Resulting list of variables stored in *VARS and the number of variables into *VAR_CNT. Returns true only if successful. Same behavior as parse_variables, except that all allocations are taken from the given POOL. */ bool parse_variables_pool (struct lexer *lexer, struct pool *pool, const struct dictionary *dict, struct variable ***vars, size_t *var_cnt, int opts) { int retval; /* PV_APPEND is unsafe because parse_variables would free the existing names on failure, but those names are presumably already in the pool, which would attempt to re-free it later. */ assert (!(opts & PV_APPEND)); retval = parse_variables (lexer, dict, vars, var_cnt, opts); if (retval) pool_register (pool, free, *vars); return retval; } /* Parses a variable name from VS. If successful, sets *IDX to the variable's index in VS, *CLASS to the variable's dictionary class, and returns true. Returns false on failure. */ static bool parse_var_idx_class (struct lexer *lexer, const struct var_set *vs, size_t *idx, enum dict_class *class) { if (!parse_vs_variable_idx (lexer, vs, idx)) return false; *class = dict_class_from_id (var_get_name (var_set_get_var (vs, *idx))); return true; } /* Add the variable from VS with index IDX to the list of variables V that has *NV elements and room for *MV. Uses and updates INCLUDED to avoid duplicates if indicated by PV_OPTS, which also affects what variables are allowed in appropriate ways. */ static void add_variable (struct variable ***v, size_t *nv, size_t *mv, char *included, int pv_opts, const struct var_set *vs, size_t idx) { struct variable *add = var_set_get_var (vs, idx); const char *add_name = var_get_name (add); if ((pv_opts & PV_NUMERIC) && !var_is_numeric (add)) msg (SW, _("%s is not a numeric variable. It will not be " "included in the variable list."), add_name); else if ((pv_opts & PV_STRING) && !var_is_alpha (add)) msg (SE, _("%s is not a string variable. It will not be " "included in the variable list."), add_name); else if ((pv_opts & PV_NO_SCRATCH) && dict_class_from_id (add_name) == DC_SCRATCH) msg (SE, _("Scratch variables (such as %s) are not allowed " "here."), add_name); else if ((pv_opts & (PV_SAME_TYPE | PV_SAME_WIDTH)) && *nv && var_get_type (add) != var_get_type ((*v)[0])) msg (SE, _("%s and %s are not the same type. All variables in " "this variable list must be of the same type. %s " "will be omitted from the list."), var_get_name ((*v)[0]), add_name, add_name); else if ((pv_opts & PV_SAME_WIDTH) && *nv && var_get_width (add) != var_get_width ((*v)[0])) msg (SE, _("%s and %s are string variables with different widths. " "All variables in this variable list must have the " "same width. %s will be omitted from the list."), var_get_name ((*v)[0]), add_name, add_name); else if ((pv_opts & PV_NO_DUPLICATE) && included && included[idx]) msg (SE, _("Variable %s appears twice in variable list."), add_name); else if ((pv_opts & PV_DUPLICATE) || !included || !included[idx]) { if (*nv >= *mv) { *mv = 2 * (*nv + 1); *v = xnrealloc (*v, *mv, sizeof **v); } (*v)[(*nv)++] = add; if (included != NULL) included[idx] = 1; } } /* Adds the variables in VS with indexes FIRST_IDX through LAST_IDX, inclusive, to the list of variables V that has *NV elements and room for *MV. Uses and updates INCLUDED to avoid duplicates if indicated by PV_OPTS, which also affects what variables are allowed in appropriate ways. */ static void add_variables (struct variable ***v, size_t *nv, size_t *mv, char *included, int pv_opts, const struct var_set *vs, int first_idx, int last_idx, enum dict_class class) { size_t i; for (i = first_idx; i <= last_idx; i++) if (dict_class_from_id (var_get_name (var_set_get_var (vs, i))) == class) add_variable (v, nv, mv, included, pv_opts, vs, i); } /* Note that if parse_variables() returns false, *v is free()'d. Conversely, if parse_variables() returns true, then *nv is nonzero and *v is non-NULL. */ bool parse_var_set_vars (struct lexer *lexer, const struct var_set *vs, struct variable ***v, size_t *nv, int pv_opts) { size_t mv; char *included; assert (vs != NULL); assert (v != NULL); assert (nv != NULL); /* At most one of PV_NUMERIC, PV_STRING, PV_SAME_TYPE, PV_SAME_WIDTH may be specified. */ assert (((pv_opts & PV_NUMERIC) != 0) + ((pv_opts & PV_STRING) != 0) + ((pv_opts & PV_SAME_TYPE) != 0) + ((pv_opts & PV_SAME_WIDTH) != 0) <= 1); /* PV_DUPLICATE and PV_NO_DUPLICATE are incompatible. */ assert (!(pv_opts & PV_DUPLICATE) || !(pv_opts & PV_NO_DUPLICATE)); if (!(pv_opts & PV_APPEND)) { *v = NULL; *nv = 0; mv = 0; } else mv = *nv; if (!(pv_opts & PV_DUPLICATE)) { size_t i; included = xcalloc (var_set_get_cnt (vs), sizeof *included); for (i = 0; i < *nv; i++) { size_t index; if (!var_set_lookup_var_idx (vs, var_get_name ((*v)[i]), &index)) NOT_REACHED (); included[index] = 1; } } else included = NULL; do { if (lex_match (lexer, T_ALL)) add_variables (v, nv, &mv, included, pv_opts, vs, 0, var_set_get_cnt (vs) - 1, DC_ORDINARY); else { enum dict_class class; size_t first_idx; if (!parse_var_idx_class (lexer, vs, &first_idx, &class)) goto fail; if (!lex_match (lexer, T_TO)) add_variable (v, nv, &mv, included, pv_opts, vs, first_idx); else { size_t last_idx; enum dict_class last_class; struct variable *first_var, *last_var; if (!parse_var_idx_class (lexer, vs, &last_idx, &last_class)) goto fail; first_var = var_set_get_var (vs, first_idx); last_var = var_set_get_var (vs, last_idx); if (last_idx < first_idx) { const char *first_name = var_get_name (first_var); const char *last_name = var_get_name (last_var); msg (SE, _("%s TO %s is not valid syntax since %s " "precedes %s in the dictionary."), first_name, last_name, first_name, last_name); goto fail; } if (class != last_class) { msg (SE, _("When using the TO keyword to specify several " "variables, both variables must be from " "the same variable dictionaries, of either " "ordinary, scratch, or system variables. " "%s is a %s variable, whereas %s is %s."), var_get_name (first_var), dict_class_to_name (class), var_get_name (last_var), dict_class_to_name (last_class)); goto fail; } add_variables (v, nv, &mv, included, pv_opts, vs, first_idx, last_idx, class); } } if (pv_opts & PV_SINGLE) break; lex_match (lexer, T_COMMA); } while (lex_token (lexer) == T_ALL || (lex_token (lexer) == T_ID && var_set_lookup_var (vs, lex_tokcstr (lexer)) != NULL)); if (*nv == 0) goto fail; free (included); return 1; fail: free (included); free (*v); *v = NULL; *nv = 0; return 0; } /* Attempts to break UTF-8 encoded NAME into a root (whose contents are arbitrary except that it does not end in a digit) followed by an integer numeric suffix. On success, stores the value of the suffix into *NUMBERP, the number of digits in the suffix into *N_DIGITSP, and returns the number of bytes in the root. On failure, returns 0. */ static int extract_numeric_suffix (const char *name, unsigned long int *numberp, int *n_digitsp) { size_t root_len, n_digits; size_t i; /* Count length of root. */ root_len = 1; /* Valid identifier never starts with digit. */ for (i = 1; name[i] != '\0'; i++) if (!c_isdigit (name[i])) root_len = i + 1; n_digits = i - root_len; if (n_digits == 0) { msg (SE, _("`%s' cannot be used with TO because it does not end in " "a digit."), name); return 0; } *numberp = strtoull (name + root_len, NULL, 10); if (*numberp == ULONG_MAX) { msg (SE, _("Numeric suffix on `%s' is larger than supported with TO."), name); return 0; } *n_digitsp = n_digits; return root_len; } static bool add_var_name (char *name, char ***names, size_t *n_vars, size_t *allocated_vars, struct stringi_set *set, int pv_opts) { if (pv_opts & PV_NO_DUPLICATE && !stringi_set_insert (set, name)) { msg (SE, _("Variable %s appears twice in variable list."), name); return false; } if (*n_vars >= *allocated_vars) *names = x2nrealloc (*names, allocated_vars, sizeof **names); (*names)[(*n_vars)++] = name; return true; } /* Parses a list of variable names according to the DATA LIST version of the TO convention. */ bool parse_DATA_LIST_vars (struct lexer *lexer, const struct dictionary *dict, char ***namesp, size_t *n_varsp, int pv_opts) { char **names; size_t n_vars; size_t allocated_vars; struct stringi_set set; char *name1 = NULL; bool ok = false; assert ((pv_opts & ~(PV_APPEND | PV_SINGLE | PV_NO_SCRATCH | PV_NO_DUPLICATE)) == 0); stringi_set_init (&set); if (pv_opts & PV_APPEND) { n_vars = allocated_vars = *n_varsp; names = *namesp; if (pv_opts & PV_NO_DUPLICATE) { size_t i; for (i = 0; i < n_vars; i++) stringi_set_insert (&set, names[i]); } } else { n_vars = allocated_vars = 0; names = NULL; } do { if (lex_token (lexer) != T_ID || !dict_id_is_valid (dict, lex_tokcstr (lexer), true)) { lex_error (lexer, "expecting variable name"); goto exit; } if (dict_class_from_id (lex_tokcstr (lexer)) == DC_SCRATCH && (pv_opts & PV_NO_SCRATCH)) { msg (SE, _("Scratch variables not allowed here.")); goto exit; } name1 = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); if (lex_token (lexer) == T_TO) { char *name2 = NULL; unsigned long int num1, num2; int n_digits1, n_digits2; int root_len1, root_len2; unsigned long int number; lex_get (lexer); if (lex_token (lexer) != T_ID || !dict_id_is_valid (dict, lex_tokcstr (lexer), true)) { lex_error (lexer, "expecting variable name"); goto exit; } name2 = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); root_len1 = extract_numeric_suffix (name1, &num1, &n_digits1); if (root_len1 == 0) goto exit; root_len2 = extract_numeric_suffix (name2, &num2, &n_digits2); if (root_len2 == 0) goto exit; if (root_len1 != root_len2 || memcasecmp (name1, name2, root_len1)) { msg (SE, _("Prefixes don't match in use of TO convention.")); goto exit; } if (num1 > num2) { msg (SE, _("Bad bounds in use of TO convention.")); goto exit; } for (number = num1; number <= num2; number++) { char *name = xasprintf ("%.*s%0*lu", root_len1, name1, n_digits1, number); if (!add_var_name (name, &names, &n_vars, &allocated_vars, &set, pv_opts)) { free (name); goto exit; } } free (name1); name1 = NULL; free (name2); } else { if (!add_var_name (name1, &names, &n_vars, &allocated_vars, &set, pv_opts)) goto exit; name1 = NULL; } lex_match (lexer, T_COMMA); if (pv_opts & PV_SINGLE) break; } while (lex_token (lexer) == T_ID); ok = true; exit: stringi_set_destroy (&set); if (ok) { *namesp = names; *n_varsp = n_vars; } else { int i; for (i = 0; i < n_vars; i++) free (names[i]); free (names); *namesp = NULL; *n_varsp = 0; free (name1); } return ok; } /* Registers each of the NAMES[0...NNAMES - 1] in POOL, as well as NAMES itself. */ static void register_vars_pool (struct pool *pool, char **names, size_t nnames) { size_t i; for (i = 0; i < nnames; i++) pool_register (pool, free, names[i]); pool_register (pool, free, names); } /* Parses a list of variable names according to the DATA LIST version of the TO convention. Same args as parse_DATA_LIST_vars(), except that all allocations are taken from the given POOL. */ bool parse_DATA_LIST_vars_pool (struct lexer *lexer, const struct dictionary *dict, struct pool *pool, char ***names, size_t *nnames, int pv_opts) { int retval; /* PV_APPEND is unsafe because parse_DATA_LIST_vars would free the existing names on failure, but those names are presumably already in the pool, which would attempt to re-free it later. */ assert (!(pv_opts & PV_APPEND)); retval = parse_DATA_LIST_vars (lexer, dict, names, nnames, pv_opts); if (retval) register_vars_pool (pool, *names, *nnames); return retval; } /* Parses a list of variables where some of the variables may be existing and the rest are to be created. Same args as parse_DATA_LIST_vars(). */ bool parse_mixed_vars (struct lexer *lexer, const struct dictionary *dict, char ***names, size_t *nnames, int pv_opts) { size_t i; assert (names != NULL); assert (nnames != NULL); if (!(pv_opts & PV_APPEND)) { *names = NULL; *nnames = 0; } while (lex_token (lexer) == T_ID || lex_token (lexer) == T_ALL) { if (lex_token (lexer) == T_ALL || dict_lookup_var (dict, lex_tokcstr (lexer)) != NULL) { struct variable **v; size_t nv; if (!parse_variables (lexer, dict, &v, &nv, pv_opts)) goto fail; *names = xnrealloc (*names, *nnames + nv, sizeof **names); for (i = 0; i < nv; i++) (*names)[*nnames + i] = xstrdup (var_get_name (v[i])); free (v); *nnames += nv; } else if (!parse_DATA_LIST_vars (lexer, dict, names, nnames, PV_APPEND | pv_opts)) goto fail; } if (*nnames == 0) goto fail; return true; fail: for (i = 0; i < *nnames; i++) free ((*names)[i]); free (*names); *names = NULL; *nnames = 0; return false; } /* Parses a list of variables where some of the variables may be existing and the rest are to be created. Same args as parse_mixed_vars(), except that all allocations are taken from the given POOL. */ bool parse_mixed_vars_pool (struct lexer *lexer, const struct dictionary *dict, struct pool *pool, char ***names, size_t *nnames, int pv_opts) { int retval; /* PV_APPEND is unsafe because parse_mixed_vars_pool would free the existing names on failure, but those names are presumably already in the pool, which would attempt to re-free it later. */ assert (!(pv_opts & PV_APPEND)); retval = parse_mixed_vars (lexer, dict, names, nnames, pv_opts); if (retval) register_vars_pool (pool, *names, *nnames); return retval; } /* A set of variables. */ struct var_set { size_t (*get_cnt) (const struct var_set *); struct variable *(*get_var) (const struct var_set *, size_t idx); bool (*lookup_var_idx) (const struct var_set *, const char *, size_t *); void (*destroy) (struct var_set *); void *aux; }; /* Returns the number of variables in VS. */ size_t var_set_get_cnt (const struct var_set *vs) { assert (vs != NULL); return vs->get_cnt (vs); } /* Return variable with index IDX in VS. IDX must be less than the number of variables in VS. */ static struct variable * var_set_get_var (const struct var_set *vs, size_t idx) { assert (vs != NULL); assert (idx < var_set_get_cnt (vs)); return vs->get_var (vs, idx); } /* Returns the variable in VS named NAME, or a null pointer if VS contains no variable with that name. */ struct variable * var_set_lookup_var (const struct var_set *vs, const char *name) { size_t idx; return (var_set_lookup_var_idx (vs, name, &idx) ? var_set_get_var (vs, idx) : NULL); } /* If VS contains a variable named NAME, sets *IDX to its index and returns true. Otherwise, returns false. */ bool var_set_lookup_var_idx (const struct var_set *vs, const char *name, size_t *idx) { assert (vs != NULL); assert (name != NULL); return vs->lookup_var_idx (vs, name, idx); } /* Destroys VS. */ void var_set_destroy (struct var_set *vs) { if (vs != NULL) vs->destroy (vs); } /* Returns the number of variables in VS. */ static size_t dict_var_set_get_cnt (const struct var_set *vs) { struct dictionary *d = vs->aux; return dict_get_var_cnt (d); } /* Return variable with index IDX in VS. IDX must be less than the number of variables in VS. */ static struct variable * dict_var_set_get_var (const struct var_set *vs, size_t idx) { struct dictionary *d = vs->aux; return dict_get_var (d, idx); } /* If VS contains a variable named NAME, sets *IDX to its index and returns true. Otherwise, returns false. */ static bool dict_var_set_lookup_var_idx (const struct var_set *vs, const char *name, size_t *idx) { struct dictionary *d = vs->aux; struct variable *v = dict_lookup_var (d, name); if (v != NULL) { *idx = var_get_dict_index (v); return true; } else return false; } /* Destroys VS. */ static void dict_var_set_destroy (struct var_set *vs) { free (vs); } /* Returns a variable set based on D. */ struct var_set * var_set_create_from_dict (const struct dictionary *d) { struct var_set *vs = xmalloc (sizeof *vs); vs->get_cnt = dict_var_set_get_cnt; vs->get_var = dict_var_set_get_var; vs->lookup_var_idx = dict_var_set_lookup_var_idx; vs->destroy = dict_var_set_destroy; vs->aux = (void *) d; return vs; } /* A variable set based on an array. */ struct array_var_set { struct variable *const *var;/* Array of variables. */ size_t var_cnt; /* Number of elements in var. */ struct hmapx vars_by_name; /* Variables hashed by name. */ }; /* Returns the number of variables in VS. */ static size_t array_var_set_get_cnt (const struct var_set *vs) { struct array_var_set *avs = vs->aux; return avs->var_cnt; } /* Return variable with index IDX in VS. IDX must be less than the number of variables in VS. */ static struct variable * array_var_set_get_var (const struct var_set *vs, size_t idx) { struct array_var_set *avs = vs->aux; return CONST_CAST (struct variable *, avs->var[idx]); } /* If VS contains a variable named NAME, sets *IDX to its index and returns true. Otherwise, returns false. */ static bool array_var_set_lookup_var_idx (const struct var_set *vs, const char *name, size_t *idx) { struct array_var_set *avs = vs->aux; struct hmapx_node *node; struct variable **varp; HMAPX_FOR_EACH_WITH_HASH (varp, node, utf8_hash_case_string (name, 0), &avs->vars_by_name) if (!utf8_strcasecmp (name, var_get_name (*varp))) { *idx = varp - avs->var; return true; } return false; } /* Destroys VS. */ static void array_var_set_destroy (struct var_set *vs) { struct array_var_set *avs = vs->aux; hmapx_destroy (&avs->vars_by_name); free (avs); free (vs); } /* Returns a variable set based on the VAR_CNT variables in VAR. */ struct var_set * var_set_create_from_array (struct variable *const *var, size_t var_cnt) { struct var_set *vs; struct array_var_set *avs; size_t i; vs = xmalloc (sizeof *vs); vs->get_cnt = array_var_set_get_cnt; vs->get_var = array_var_set_get_var; vs->lookup_var_idx = array_var_set_lookup_var_idx; vs->destroy = array_var_set_destroy; vs->aux = avs = xmalloc (sizeof *avs); avs->var = var; avs->var_cnt = var_cnt; hmapx_init (&avs->vars_by_name); for (i = 0; i < var_cnt; i++) { const char *name = var_get_name (var[i]); size_t idx; if (array_var_set_lookup_var_idx (vs, name, &idx)) { var_set_destroy (vs); return NULL; } hmapx_insert (&avs->vars_by_name, CONST_CAST (void *, &avs->var[i]), utf8_hash_case_string (name, 0)); } return vs; } /* Match a variable. If the match succeeds, the variable will be placed in VAR. Returns true if successful */ bool lex_match_variable (struct lexer *lexer, const struct dictionary *dict, const struct variable **var) { if (lex_token (lexer) != T_ID) return false; *var = parse_variable_const (lexer, dict); if ( *var == NULL) return false; return true; } /* An interaction is a variable followed by {*, BY} followed by an interaction */ static bool parse_internal_interaction (struct lexer *lexer, const struct dictionary *dict, struct interaction **iact, struct interaction **it) { const struct variable *v = NULL; assert (iact); switch (lex_next_token (lexer, 1)) { case T_ENDCMD: case T_SLASH: case T_COMMA: case T_ID: case T_BY: case T_ASTERISK: break; default: return false; break; } if (! lex_match_variable (lexer, dict, &v)) { if (it) interaction_destroy (*it); *iact = NULL; return false; } assert (v); if ( *iact == NULL) *iact = interaction_create (v); else interaction_add_variable (*iact, v); if ( lex_match (lexer, T_ASTERISK) || lex_match (lexer, T_BY)) { return parse_internal_interaction (lexer, dict, iact, iact); } return true; } bool parse_design_interaction (struct lexer *lexer, const struct dictionary *dict, struct interaction **iact) { return parse_internal_interaction (lexer, dict, iact, NULL); } pspp-1.0.1/src/language/lexer/subcommand-list.h0000644000175000017500000000365212470243700016364 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SUBCLIST_H #define SUBCLIST_H #include /* This module provides a rudimentary list class It is intended for use by the command line parser for list subcommands */ struct lexer; struct subc_list_double { double *data ; size_t sz; int n_data; }; struct subc_list_int { int *data ; size_t sz; int n_data; }; typedef struct subc_list_double subc_list_double ; typedef struct subc_list_int subc_list_int ; /* Create a list */ void subc_list_double_create(subc_list_double *l) ; void subc_list_int_create(subc_list_int *l) ; /* Push a value onto the list */ void subc_list_double_push(subc_list_double *l, double d) ; void subc_list_int_push(subc_list_int *l, int i) ; /* Index into the list */ double subc_list_double_at(const subc_list_double *l, int idx); int subc_list_int_at(const subc_list_int *l, int idx); /* Return the number of values in the list */ int subc_list_double_count(const subc_list_double *l); int subc_list_int_count(const subc_list_int *l); /* Destroy the list */ void subc_list_double_destroy(subc_list_double *l) ; void subc_list_int_destroy(subc_list_int *l) ; void subc_list_error (struct lexer *, const char *sbc, int max_list); #endif pspp-1.0.1/src/language/lexer/include-path.c0000644000175000017500000000425212470243700015630 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "src/language/lexer/include-path.h" #include #include "data/file-name.h" #include "libpspp/string-array.h" #include "gl/configmake.h" #include "gl/relocatable.h" #include "gl/xvasprintf.h" static struct string_array the_include_path; static struct string_array default_include_path; static void include_path_init__ (void); void include_path_clear (void) { include_path_init__ (); string_array_clear (&the_include_path); } void include_path_add (const char *dir) { include_path_init__ (); string_array_append (&the_include_path, dir); } char * include_path_search (const char *base_name) { return fn_search_path (base_name, include_path ()); } const struct string_array * include_path_default (void) { include_path_init__ (); return &default_include_path; } char ** include_path (void) { include_path_init__ (); string_array_terminate_null (&the_include_path); return the_include_path.strings; } static void include_path_init__ (void) { static bool inited; char *home; if (inited) return; inited = true; string_array_init (&the_include_path); string_array_append (&the_include_path, "."); home = getenv ("HOME"); if (home != NULL) string_array_append_nocopy (&the_include_path, xasprintf ("%s/.pspp", home)); string_array_append (&the_include_path, relocate (PKGDATADIR)); string_array_clone (&default_include_path, &the_include_path); } pspp-1.0.1/src/language/lexer/token.h0000644000175000017500000000270612470243700014402 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef TOKEN_H #define TOKEN_H 1 #include #include "libpspp/str.h" #include "data/identifier.h" /* A PSPP syntax token. The 'type' member is used by the scanner (see scan.h) for SCAN_* values as well, which is why it is not declared as type "enum token_type". */ struct token { int type; /* Usually a "enum token_type" value. */ double number; struct substring string; }; #define TOKEN_INITIALIZER(TYPE, NUMBER, STRING) \ { TYPE, NUMBER, SS_LITERAL_INITIALIZER (STRING) } void token_init (struct token *); void token_destroy (struct token *); char *token_to_string (const struct token *); void token_print (const struct token *, FILE *); #endif /* token.h */ pspp-1.0.1/src/language/lexer/command-name.c0000644000175000017500000001502612470242646015620 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/lexer/command-name.h" #include #include #include "data/identifier.h" #include "gl/c-ctype.h" /* Stores the first word in S into WORD and advances S past that word. Returns true if successful, false if no word remained in S to be extracted. A word is a sequence of digits, a letter possibly followed by a sequence of letters or digits, or one character of another type. Words may be delimited by spaces. */ static bool find_word (struct substring *s, struct substring *word) { size_t ofs; ucs4_t c; /* Skip whitespace. */ for (;;) { c = ss_first_mb (*s); if (c == UINT32_MAX) { *word = ss_empty (); return false; } else if (lex_uc_is_space (c)) ss_get_mb (s); else break; } ofs = ss_first_mblen (*s); if (lex_uc_is_id1 (c)) { while (lex_uc_is_idn (ss_at_mb (*s, ofs))) ofs += ss_at_mblen (*s, ofs); } else if (c_isdigit (c)) { while (c_isdigit (s->string[ofs])) ofs++; } ss_get_bytes (s, ofs, word); return true; } /* Returns the number of words in S, as extracted by find_word(). */ static int count_words (struct substring s) { struct substring word; int n; n = 0; while (find_word (&s, &word)) n++; return n; } /* Compares STRING obtained from the user against the full name of a COMMAND, using this algorithm: 1. Divide COMMAND into words C[0] through C[n - 1]. 2. Divide STRING into words S[0] through S[m - 1]. 3. Compare word C[i] against S[i] for 0 <= i < min(n, m), using the keyword matching algorithm implemented by lex_id_match(). If any of them fail to match, then STRING does not match COMMAND and the function returns false. 4. Otherwise, STRING and COMMAND match. Set *MISSING_WORDS to n - m. Set *EXACT to false if any of the S[i] were found to be abbreviated in the comparisons done in step 3, or to true if they were all exactly equal (modulo case). Return true. */ bool command_match (struct substring command, struct substring string, bool *exact, int *missing_words) { *exact = true; for (;;) { struct substring cw, sw; int match; if (!find_word (&command, &cw)) { *missing_words = -count_words (string); return true; } else if (!find_word (&string, &sw)) { *missing_words = 1 + count_words (command); return true; } match = lex_id_match (cw, sw); if (sw.length < cw.length) *exact = false; if (match == 0) return false; } } /* Initializes CM for matching STRING against a table of command names. STRING may be ASCII or UTF-8. For sample use, see command.c. Here's a usage outline: // Try each possible command. command_matcher_init (&cm, string); for (cmd = commands; cmd < &commands[command_cnt]; cmd++) command_matcher_add (&cm, cmd->name, cmd); // Get the result. match = command_matcher_get_match (&cm); missing_words = command_matcher_get_missing_words (&cm); if (missing_words > 0) { // Incomplete command name. Add another word to the string // and start over. Or if there are no more words to be added, // add " ." to the string as a sentinel and start over. } else if (match == NULL) { // No valid command with this name. } else if (missing_words == 0) { // The full, correct command name is 'match'. } else if (missing_words < 0) { // The abs(missing_words) last words of 'string' are actually // part of the command's body, not part of its name; they // were only needed to resolve ambiguities. 'match' is the // correct command but those extra words should be put back // for later re-parsing. } */ void command_matcher_init (struct command_matcher *cm, struct substring string) { cm->string = string; cm->extensible = false; cm->exact_match = NULL; cm->n_matches = 0; cm->match = NULL; cm->match_missing_words = 0; } /* Destroys CM's state. */ void command_matcher_destroy (struct command_matcher *cm UNUSED) { /* Nothing to do. */ } /* Considers COMMAND as a candidate for the command name being parsed by CM. If COMMAND is the correct command name, then command_matcher_get_match() will return AUX later. COMMAND must be an ASCII string. */ void command_matcher_add (struct command_matcher *cm, struct substring command, void *aux) { int missing_words; bool exact; assert (aux != NULL); if (command_match (command, cm->string, &exact, &missing_words)) { if (missing_words > 0) cm->extensible = true; else if (exact && missing_words == 0) cm->exact_match = aux; else { if (missing_words > cm->match_missing_words) cm->n_matches = 0; if (missing_words >= cm->match_missing_words || cm->n_matches == 0) { cm->n_matches++; cm->match = aux; cm->match_missing_words = missing_words; } } } } /* Returns the command name matched by CM. */ void * command_matcher_get_match (const struct command_matcher *cm) { return (cm->extensible ? NULL : cm->exact_match != NULL ? cm->exact_match : cm->n_matches == 1 ? cm->match : NULL); } /* Returns the difference between the number of words in the matched command name and the string provided to command_matcher_init(). */ int command_matcher_get_missing_words (const struct command_matcher *cm) { return (cm->extensible ? 1 : cm->exact_match != NULL ? 0 : cm->match_missing_words); } pspp-1.0.1/src/language/lexer/segment.h0000644000175000017500000001126412470434665014737 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SEGMENT_H #define SEGMENT_H 1 #include #include #include "libpspp/prompt.h" /* PSPP syntax segmentation. PSPP divides traditional "lexical analysis" or "tokenization" into two phases: a lower-level phase called "segmentation" and a higher-level phase called "scanning". This header file provides declarations for the segmentation phase. scan.h contains declarations for the scanning phase. Segmentation accepts a stream of UTF-8 bytes as input. It outputs a label (a segment type) for each byte or contiguous sequence of bytes in the input. It also, in a few corner cases, outputs zero-width segments that label the boundary between a pair of bytes in the input. Some segment types correspond directly to tokens; for example, an "identifier" segment (SEG_IDENTIFIER) becomes an identifier token (T_ID) later in lexical analysis. Other segments contribute to tokens but do not correspond diectly; for example, multiple quoted string segments (SEG_QUOTED_STRING) separated by spaces (SEG_SPACES) and "+" punctuators (SEG_PUNCT) may be combined to form a single string token (T_STRING). Still other segments are ignored (e.g. SEG_SPACES) or trigger special behavior such as error messages later in tokenization (e.g. SEG_EXPECTED_QUOTE). */ /* Segmentation mode. This corresponds to the syntax mode for which a syntax file is intended. This is the only configuration setting for a segmenter. */ enum segmenter_mode { /* Try to interpret input correctly regardless of whether it is written for interactive or batch mode. */ SEG_MODE_AUTO, /* Interactive or batch syntax mode. */ SEG_MODE_INTERACTIVE, SEG_MODE_BATCH }; #define SEG_TYPES \ SEG_TYPE(NUMBER) \ SEG_TYPE(QUOTED_STRING) \ SEG_TYPE(HEX_STRING) \ SEG_TYPE(UNICODE_STRING) \ SEG_TYPE(UNQUOTED_STRING) \ SEG_TYPE(RESERVED_WORD) \ SEG_TYPE(IDENTIFIER) \ SEG_TYPE(PUNCT) \ \ SEG_TYPE(SHBANG) \ SEG_TYPE(SPACES) \ SEG_TYPE(COMMENT) \ SEG_TYPE(NEWLINE) \ \ SEG_TYPE(COMMENT_COMMAND) \ SEG_TYPE(DO_REPEAT_COMMAND) \ SEG_TYPE(INLINE_DATA) \ \ SEG_TYPE(START_DOCUMENT) \ SEG_TYPE(DOCUMENT) \ \ SEG_TYPE(START_COMMAND) \ SEG_TYPE(SEPARATE_COMMANDS) \ SEG_TYPE(END_COMMAND) \ SEG_TYPE(END) \ \ SEG_TYPE(EXPECTED_QUOTE) \ SEG_TYPE(EXPECTED_EXPONENT) \ SEG_TYPE(UNEXPECTED_DOT) \ SEG_TYPE(UNEXPECTED_CHAR) /* Types of segments. */ enum segment_type { #define SEG_TYPE(NAME) SEG_##NAME, SEG_TYPES #undef SEG_TYPE }; /* Number of segment types. */ #define SEG_TYPE(NAME) + 1 enum { SEG_N_TYPES = SEG_TYPES }; #undef SEG_TYPE const char *segment_type_to_string (enum segment_type); /* A segmenter. Opaque. */ struct segmenter { unsigned char state; unsigned char substate; unsigned char mode; }; void segmenter_init (struct segmenter *, enum segmenter_mode); enum segmenter_mode segmenter_get_mode (const struct segmenter *); int segmenter_push (struct segmenter *, const char *input, size_t n, enum segment_type *); enum prompt_style segmenter_get_prompt (const struct segmenter *); #endif /* segment.h */ pspp-1.0.1/src/language/lexer/segment.c0000644000175000017500000011354212700263117014720 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2013, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/lexer/segment.h" #include #include #include "data/identifier.h" #include "language/lexer/command-name.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "gl/c-ctype.h" #include "gl/c-strcase.h" #include "gl/memchr2.h" enum segmenter_state { S_SHBANG, S_GENERAL, S_COMMENT_1, S_COMMENT_2, S_DOCUMENT_1, S_DOCUMENT_2, S_DOCUMENT_3, S_FILE_LABEL, S_DO_REPEAT_1, S_DO_REPEAT_2, S_DO_REPEAT_3, S_BEGIN_DATA_1, S_BEGIN_DATA_2, S_BEGIN_DATA_3, S_BEGIN_DATA_4, S_TITLE_1, S_TITLE_2 }; #define SS_START_OF_LINE (1u << 0) #define SS_START_OF_COMMAND (1u << 1) static int segmenter_detect_command_name__ (const char *input, size_t n, int ofs); static int segmenter_u8_to_uc__ (ucs4_t *puc, const char *input_, size_t n) { const uint8_t *input = CHAR_CAST (const uint8_t *, input_); int mblen; assert (n > 0); mblen = u8_mbtoucr (puc, input, n); return (mblen >= 0 ? mblen : mblen == -2 ? -1 : u8_mbtouc (puc, input, n)); } static int segmenter_parse_shbang__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { if (input[0] == '#') { if (n < 2) return -1; else if (input[1] == '!') { int ofs; for (ofs = 2; ofs < n; ofs++) if (input[ofs] == '\n' || input[ofs] == '\0') { if (input[ofs] == '\n' && input[ofs - 1] == '\r') ofs--; s->state = S_GENERAL; s->substate = SS_START_OF_COMMAND; *type = SEG_SHBANG; return ofs; } return -1; } } s->state = S_GENERAL; s->substate = SS_START_OF_LINE | SS_START_OF_COMMAND; return segmenter_push (s, input, n, type); } static int segmenter_parse_digraph__ (const char *seconds, struct segmenter *s, const char *input, size_t n, enum segment_type *type) { assert (s->state == S_GENERAL); if (n < 2) return -1; *type = SEG_PUNCT; s->substate = 0; return input[1] != '\0' && strchr (seconds, input[1]) != NULL ? 2 : 1; } static int skip_comment (const char *input, size_t n, size_t ofs) { for (; ofs < n; ofs++) { if (input[ofs] == '\n' || input[ofs] == '\0') return ofs; else if (input[ofs] == '*') { if (ofs + 1 >= n) return -1; else if (input[ofs + 1] == '/') return ofs + 2; } } return -1; } static int skip_spaces_and_comments (const char *input, size_t n, int ofs) { while (ofs < n) { ucs4_t uc; int mblen; mblen = segmenter_u8_to_uc__ (&uc, input + ofs, n - ofs); if (mblen < 0) return -1; if (uc == '/') { if (ofs + 1 >= n) return -1; else if (input[ofs + 1] != '*') return ofs; ofs = skip_comment (input, n, ofs + 2); if (ofs < 0) return -1; } else if (lex_uc_is_space (uc) && uc != '\n') ofs += mblen; else return ofs; } return -1; } static int is_end_of_line (const char *input, size_t n, int ofs) { if (input[ofs] == '\n' || input[ofs] == '\0') return 1; else if (input[ofs] == '\r') { if (ofs + 1 >= n) return -1; return input[ofs + 1] == '\n'; } else return 0; } static int at_end_of_line (const char *input, size_t n, int ofs) { ofs = skip_spaces_and_comments (input, n, ofs); if (ofs < 0) return -1; return is_end_of_line (input, n, ofs); } static int segmenter_parse_newline__ (const char *input, size_t n, enum segment_type *type) { int ofs; if (input[0] == '\n') ofs = 1; else { if (n < 2) return -1; assert (input[0] == '\r'); assert (input[1] == '\n'); ofs = 2; } *type = SEG_NEWLINE; return ofs; } static int skip_spaces (const char *input, size_t n, size_t ofs) { while (ofs < n) { ucs4_t uc; int mblen; mblen = segmenter_u8_to_uc__ (&uc, input + ofs, n - ofs); if (mblen < 0) return -1; if (!lex_uc_is_space (uc) || uc == '\n' || uc == '\0') return ofs; ofs += mblen; } return -1; } static int skip_digits (const char *input, size_t n, int ofs) { for (; ofs < n; ofs++) if (!c_isdigit (input[ofs])) return ofs; return -1; } static int segmenter_parse_number__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int ofs; assert (s->state == S_GENERAL); ofs = skip_digits (input, n, 0); if (ofs < 0) return -1; if (input[ofs] == '.') { ofs = skip_digits (input, n, ofs + 1); if (ofs < 0) return -1; } if (ofs >= n) return -1; if (input[ofs] == 'e' || input[ofs] == 'E') { ofs++; if (ofs >= n) return -1; if (input[ofs] == '+' || input[ofs] == '-') { ofs++; if (ofs >= n) return -1; } if (!c_isdigit (input[ofs])) { *type = SEG_EXPECTED_EXPONENT; s->substate = 0; return ofs; } ofs = skip_digits (input, n, ofs); if (ofs < 0) return -1; } if (input[ofs - 1] == '.') { int eol = at_end_of_line (input, n, ofs); if (eol < 0) return -1; else if (eol) ofs--; } *type = SEG_NUMBER; s->substate = 0; return ofs; } static bool is_reserved_word (const char *s, int n) { char s0, s1, s2, s3; s0 = c_toupper (s[0]); switch (n) { case 2: s1 = c_toupper (s[1]); return ((s0 == 'B' && s1 == 'Y') || (s0 == 'E' && s1 == 'Q') || (s0 == 'G' && (s1 == 'E' || s1 == 'T')) || (s0 == 'L' && (s1 == 'E' || s1 == 'T')) || (s0 == 'N' && s1 == 'E') || (s0 == 'O' && s1 == 'R') || (s0 == 'T' && s1 == 'O')); case 3: s1 = c_toupper (s[1]); s2 = c_toupper (s[2]); return ((s0 == 'A' && ((s1 == 'L' && s2 == 'L') || (s1 == 'N' && s2 == 'D'))) || (s0 == 'N' && s1 == 'O' && s2 == 'T')); case 4: s1 = c_toupper (s[1]); s2 = c_toupper (s[2]); s3 = c_toupper (s[3]); return s0 == 'W' && s1 == 'I' && s2 == 'T' && s3 == 'H'; default: return false; } } static int segmenter_parse_comment_1__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int endcmd; int ofs; endcmd = -2; ofs = 0; while (ofs < n) { ucs4_t uc; int mblen; mblen = segmenter_u8_to_uc__ (&uc, input + ofs, n - ofs); if (mblen < 0) return -1; switch (uc) { case '.': endcmd = ofs; break; case '\n': if (ofs > 1 && input[ofs - 1] == '\r') ofs--; /* Fall through. */ case '\0': if (endcmd == -2 || uc == '\0') { /* Blank line ends comment command. */ s->state = S_GENERAL; s->substate = SS_START_OF_COMMAND; *type = SEG_SEPARATE_COMMANDS; return ofs; } else if (endcmd >= 0) { /* '.' at end of line ends comment command. */ s->state = S_GENERAL; s->substate = 0; *type = SEG_COMMENT_COMMAND; return endcmd; } else { /* Comment continues onto next line. */ *type = SEG_COMMENT_COMMAND; s->state = S_COMMENT_2; return ofs; } NOT_REACHED (); default: if (!lex_uc_is_space (uc)) endcmd = -1; break; } ofs += mblen; } return -1; } static int segmenter_parse_comment_2__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int new_cmd; ucs4_t uc; int mblen; int ofs; ofs = segmenter_parse_newline__ (input, n, type); if (ofs < 0 || ofs >= n) return -1; mblen = segmenter_u8_to_uc__ (&uc, input + ofs, n - ofs); if (mblen < 0) return -1; if (uc == '+' || uc == '-' || uc == '.') new_cmd = true; else if (!lex_uc_is_space (uc)) switch (s->mode) { case SEG_MODE_INTERACTIVE: new_cmd = false; break; case SEG_MODE_BATCH: new_cmd = true; break; case SEG_MODE_AUTO: new_cmd = segmenter_detect_command_name__ (input, n, ofs); if (new_cmd < 0) return -1; break; default: NOT_REACHED (); } else new_cmd = false; if (new_cmd) { s->state = S_GENERAL; s->substate = SS_START_OF_LINE | SS_START_OF_COMMAND; } else s->state = S_COMMENT_1; return ofs; } static int segmenter_parse_document_1__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { bool end_cmd; int ofs; end_cmd = false; ofs = 0; while (ofs < n) { ucs4_t uc; int mblen; mblen = segmenter_u8_to_uc__ (&uc, input + ofs, n - ofs); if (mblen < 0) return -1; switch (uc) { case '.': end_cmd = true; break; case '\n': if (ofs > 1 && input[ofs - 1] == '\r') ofs--; *type = SEG_DOCUMENT; s->state = end_cmd ? S_DOCUMENT_3 : S_DOCUMENT_2; return ofs; case '\0': *type = SEG_DOCUMENT; s->state = S_DOCUMENT_3; return ofs; default: if (!lex_uc_is_space (uc)) end_cmd = false; break; } ofs += mblen; } return -1; } static int segmenter_parse_document_2__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int ofs; ofs = segmenter_parse_newline__ (input, n, type); if (ofs < 0) return -1; s->state = S_DOCUMENT_1; return ofs; } static int segmenter_parse_document_3__ (struct segmenter *s, enum segment_type *type) { *type = SEG_END_COMMAND; s->state = S_GENERAL; s->substate = SS_START_OF_COMMAND | SS_START_OF_LINE; return 0; } static int segmenter_unquoted (const char *input, size_t n, int ofs) { char c; ofs = skip_spaces_and_comments (input, n, ofs); if (ofs < 0) return -1; c = input[ofs]; return c != '\'' && c != '"' && c != '\n' && c != '\0'; } static int next_id_in_command (const struct segmenter *s, const char *input, size_t n, int ofs, char id[], size_t id_size) { struct segmenter sub; assert (id_size > 0); sub.mode = s->mode; sub.state = S_GENERAL; sub.substate = 0; for (;;) { enum segment_type type; int retval; retval = segmenter_push (&sub, input + ofs, n - ofs, &type); if (retval < 0) { id[0] = '\0'; return -1; } switch (type) { case SEG_SHBANG: case SEG_SPACES: case SEG_COMMENT: case SEG_NEWLINE: break; case SEG_IDENTIFIER: if (retval < id_size) { memcpy (id, input + ofs, retval); id[retval] = '\0'; return ofs + retval; } /* fall through */ case SEG_NUMBER: case SEG_QUOTED_STRING: case SEG_HEX_STRING: case SEG_UNICODE_STRING: case SEG_UNQUOTED_STRING: case SEG_RESERVED_WORD: case SEG_PUNCT: case SEG_COMMENT_COMMAND: case SEG_DO_REPEAT_COMMAND: case SEG_INLINE_DATA: case SEG_START_DOCUMENT: case SEG_DOCUMENT: case SEG_START_COMMAND: case SEG_SEPARATE_COMMANDS: case SEG_END_COMMAND: case SEG_END: case SEG_EXPECTED_QUOTE: case SEG_EXPECTED_EXPONENT: case SEG_UNEXPECTED_DOT: case SEG_UNEXPECTED_CHAR: id[0] = '\0'; return ofs + retval; } ofs += retval; } } static int segmenter_parse_id__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { ucs4_t uc; int ofs; assert (s->state == S_GENERAL); ofs = u8_mbtouc (&uc, CHAR_CAST (const uint8_t *, input), n); for (;;) { int mblen; if (ofs >= n) return -1; mblen = segmenter_u8_to_uc__ (&uc, input + ofs, n - ofs); if (mblen < 0) return -1; else if (!lex_uc_is_idn (uc)) break; ofs += mblen; } if (input[ofs - 1] == '.') { int eol = at_end_of_line (input, n, ofs); if (eol < 0) return -1; else if (eol) ofs--; } if (is_reserved_word (input, ofs)) *type = SEG_RESERVED_WORD; else *type = SEG_IDENTIFIER; if (s->substate & SS_START_OF_COMMAND) { struct substring word = ss_buffer (input, ofs); if (lex_id_match_n (ss_cstr ("COMMENT"), word, 4)) { s->state = S_COMMENT_1; return segmenter_parse_comment_1__ (s, input, n, type); } else if (lex_id_match (ss_cstr ("DOCUMENT"), word)) { s->state = S_DOCUMENT_1; *type = SEG_START_DOCUMENT; return 0; } else if (lex_id_match (ss_cstr ("TITLE"), word) || lex_id_match (ss_cstr ("SUBTITLE"), word)) { int result = segmenter_unquoted (input, n, ofs); if (result < 0) return -1; else if (result) { s->state = S_TITLE_1; return ofs; } } else if (lex_id_match (ss_cstr ("FILE"), word)) { char id[16]; if (next_id_in_command (s, input, n, ofs, id, sizeof id) < 0) return -1; else if (lex_id_match (ss_cstr ("LABEL"), ss_cstr (id))) { s->state = S_FILE_LABEL; s->substate = 0; return ofs; } } else if (lex_id_match (ss_cstr ("DO"), word)) { char id[16]; if (next_id_in_command (s, input, n, ofs, id, sizeof id) < 0) return -1; else if (lex_id_match (ss_cstr ("REPEAT"), ss_cstr (id))) { s->state = S_DO_REPEAT_1; s->substate = 0; return ofs; } } else if (lex_id_match (ss_cstr ("BEGIN"), word)) { char id[16]; int ofs2; ofs2 = next_id_in_command (s, input, n, ofs, id, sizeof id); if (ofs2 < 0) return -1; else if (lex_id_match (ss_cstr ("DATA"), ss_cstr (id))) { int eol; ofs2 = skip_spaces_and_comments (input, n, ofs2); if (ofs2 < 0) return -1; if (input[ofs2] == '.') { ofs2 = skip_spaces_and_comments (input, n, ofs2 + 1); if (ofs2 < 0) return -1; } eol = is_end_of_line (input, n, ofs2); if (eol < 0) return -1; else if (eol) { if (memchr (input, '\n', ofs2)) s->state = S_BEGIN_DATA_1; else s->state = S_BEGIN_DATA_2; s->substate = 0; return ofs; } } } } s->substate = 0; return ofs; } static int segmenter_parse_string__ (enum segment_type string_type, int ofs, struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int quote = input[ofs]; ofs++; while (ofs < n) if (input[ofs] == quote) { ofs++; if (ofs >= n) return -1; else if (input[ofs] == quote) ofs++; else { *type = string_type; s->substate = 0; return ofs; } } else if (input[ofs] == '\n' || input[ofs] == '\0') { *type = SEG_EXPECTED_QUOTE; s->substate = 0; return ofs; } else ofs++; return -1; } static int segmenter_maybe_parse_string__ (enum segment_type string_type, struct segmenter *s, const char *input, size_t n, enum segment_type *type) { if (n < 2) return -1; else if (input[1] == '\'' || input[1] == '"') return segmenter_parse_string__ (string_type, 1, s, input, n, type); else return segmenter_parse_id__ (s, input, n, type); } static int segmenter_parse_mid_command__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { ucs4_t uc; int mblen; int ofs; assert (s->state == S_GENERAL); assert (!(s->substate & SS_START_OF_LINE)); mblen = segmenter_u8_to_uc__ (&uc, input, n); if (mblen < 0) return -1; switch (uc) { case '\n': s->substate |= SS_START_OF_LINE; *type = SEG_NEWLINE; return 1; case '/': if (n == 1) return -1; else if (input[1] == '*') { ofs = skip_comment (input, n, 2); if (ofs < 0) return -1; *type = SEG_COMMENT; return ofs; } else { s->substate = 0; *type = SEG_PUNCT; return 1; } case '(': case ')': case ',': case '=': case '-': case '[': case ']': case '&': case '|': case '+': *type = SEG_PUNCT; s->substate = 0; return 1; case '*': if (s->substate & SS_START_OF_COMMAND) { /* '*' at the beginning of a command begins a comment. */ s->state = S_COMMENT_1; return segmenter_parse_comment_1__ (s, input, n, type); } else return segmenter_parse_digraph__ ("*", s, input, n, type); case '<': return segmenter_parse_digraph__ ("=>", s, input, n, type); case '>': return segmenter_parse_digraph__ ("=", s, input, n, type); case '~': return segmenter_parse_digraph__ ("=", s, input, n, type); case '.': if (n < 2) return -1; else if (c_isdigit (input[1])) return segmenter_parse_number__ (s, input, n, type); else { int eol = at_end_of_line (input, n, 1); if (eol < 0) return -1; if (eol) { *type = SEG_END_COMMAND; s->substate = SS_START_OF_COMMAND; } else *type = SEG_UNEXPECTED_DOT; return 1; } NOT_REACHED (); case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return segmenter_parse_number__ (s, input, n, type); case 'u': case 'U': return segmenter_maybe_parse_string__ (SEG_UNICODE_STRING, s, input, n, type); case 'x': case 'X': return segmenter_maybe_parse_string__ (SEG_HEX_STRING, s, input, n, type); case '\'': case '"': return segmenter_parse_string__ (SEG_QUOTED_STRING, 0, s, input, n, type); default: if (lex_uc_is_space (uc)) { ofs = skip_spaces (input, n, mblen); if (ofs < 0) return -1; if (input[ofs - 1] == '\r' && input[ofs] == '\n') { if (ofs == 1) { s->substate |= SS_START_OF_LINE; *type = SEG_NEWLINE; return 2; } else ofs--; } *type = SEG_SPACES; return ofs; } else if (lex_uc_is_id1 (uc)) return segmenter_parse_id__ (s, input, n, type); else { *type = SEG_UNEXPECTED_CHAR; s->substate = 0; return mblen; } } } static int compare_commands (const void *a_, const void *b_) { const char *const *ap = a_; const char *const *bp = b_; const char *a = *ap; const char *b = *bp; return c_strcasecmp (a, b); } static const char ** segmenter_get_command_name_candidates (unsigned char first) { #define DEF_CMD(STATES, FLAGS, NAME, FUNCTION) NAME, #define UNIMPL_CMD(NAME, DESCRIPTION) NAME, static const char *commands[] = { #include "language/command.def" "" }; static size_t n_commands = (sizeof commands / sizeof *commands) - 1; #undef DEF_CMD #undef UNIMPL_CMD static bool inited; static const char **cindex[UCHAR_MAX + 1]; if (!inited) { size_t i; inited = true; qsort (commands, n_commands, sizeof *commands, compare_commands); for (i = 0; i < n_commands; i++) { unsigned char c = c_toupper (commands[i][0]); if (cindex[c] == NULL) cindex[c] = &commands[i]; } for (i = 0; i <= UCHAR_MAX; i++) if (cindex[i] == NULL) cindex[i] = &commands[n_commands]; } return cindex[c_toupper (first)]; } static int segmenter_detect_command_name__ (const char *input, size_t n, int ofs) { const char **commands; input += ofs; n -= ofs; ofs = 0; for (;;) { ucs4_t uc; int mblen; if (ofs >= n) return -1; mblen = segmenter_u8_to_uc__ (&uc, input + ofs, n - ofs); if (mblen < 0) return -1; if (uc == '\n' || uc == '\0' || !(lex_uc_is_space (uc) || lex_uc_is_idn (uc) || uc == '-')) break; ofs += mblen; } if (!ofs) return 0; if (input[ofs - 1] == '.') ofs--; for (commands = segmenter_get_command_name_candidates (input[0]); c_toupper (input[0]) == c_toupper ((*commands)[0]); commands++) { int missing_words; bool exact; if (command_match (ss_cstr (*commands), ss_buffer (input, ofs), &exact, &missing_words) && missing_words <= 0) return 1; } return 0; } static int is_start_of_string__ (const char *input, size_t n, int ofs) { int c; c = input[ofs]; if (c == 'x' || c == 'X' || c == 'u' || c == 'U') { if (ofs + 1 >= n) return -1; return input[ofs + 1] == '\'' || input[ofs + 1] == '"'; } else return c == '\'' || c == '"' || c == '\n'; } static int segmenter_parse_start_of_line__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { ucs4_t uc; int mblen; int ofs; assert (s->state == S_GENERAL); assert (s->substate & SS_START_OF_LINE); mblen = segmenter_u8_to_uc__ (&uc, input, n); if (mblen < 0) return -1; switch (uc) { case '+': ofs = skip_spaces_and_comments (input, n, 1); if (ofs < 0) return -1; else { int is_string = is_start_of_string__ (input, n, ofs); if (is_string < 0) return -1; else if (is_string) { /* This is punctuation that may separate pieces of a string. */ *type = SEG_PUNCT; s->substate = 0; return 1; } } /* Fall through. */ case '-': case '.': *type = SEG_START_COMMAND; s->substate = SS_START_OF_COMMAND; return 1; default: if (lex_uc_is_space (uc)) { int eol = at_end_of_line (input, n, 0); if (eol < 0) return -1; else if (eol) { s->substate = SS_START_OF_COMMAND; *type = SEG_SEPARATE_COMMANDS; return 0; } break; } if (s->mode == SEG_MODE_INTERACTIVE || s->substate & SS_START_OF_COMMAND) break; else if (s->mode == SEG_MODE_AUTO) { int cmd = segmenter_detect_command_name__ (input, n, 0); if (cmd < 0) return -1; else if (cmd == 0) break; } else assert (s->mode == SEG_MODE_BATCH); s->substate = SS_START_OF_COMMAND; *type = SEG_START_COMMAND; return 0; } s->substate = SS_START_OF_COMMAND; return segmenter_parse_mid_command__ (s, input, n, type); } static int segmenter_parse_file_label__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { struct segmenter sub; int ofs; sub = *s; sub.state = S_GENERAL; ofs = segmenter_push (&sub, input, n, type); if (ofs < 0) return -1; else if (*type == SEG_IDENTIFIER) { int result; assert (lex_id_match (ss_cstr ("LABEL"), ss_buffer ((char *) input, ofs))); result = segmenter_unquoted (input, n, ofs); if (result < 0) return -1; else { if (result) s->state = S_TITLE_1; else *s = sub; return ofs; } } else { s->substate = sub.substate; return ofs; } } static int segmenter_subparse (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { struct segmenter sub; int ofs; sub.mode = s->mode; sub.state = S_GENERAL; sub.substate = s->substate; ofs = segmenter_push (&sub, input, n, type); s->substate = sub.substate; return ofs; } static int segmenter_parse_do_repeat_1__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int ofs = segmenter_subparse (s, input, n, type); if (ofs < 0) return -1; if (*type == SEG_START_COMMAND || *type == SEG_SEPARATE_COMMANDS) s->state = S_DO_REPEAT_2; else if (*type == SEG_END_COMMAND) { s->state = S_DO_REPEAT_3; s->substate = 1; } return ofs; } static int segmenter_parse_do_repeat_2__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int ofs = segmenter_subparse (s, input, n, type); if (ofs < 0) return -1; if (*type == SEG_NEWLINE) { s->state = S_DO_REPEAT_3; s->substate = 1; } return ofs; } static bool check_repeat_command (struct segmenter *s, const char *input, size_t n) { int direction; char id[16]; int ofs; ofs = 0; if (input[ofs] == '+' || input[ofs] == '-') ofs++; ofs = next_id_in_command (s, input, n, ofs, id, sizeof id); if (ofs < 0) return false; else if (lex_id_match (ss_cstr ("DO"), ss_cstr (id))) direction = 1; else if (lex_id_match (ss_cstr ("END"), ss_cstr (id))) direction = -1; else return true; ofs = next_id_in_command (s, input, n, ofs, id, sizeof id); if (ofs < 0) return false; if (lex_id_match (ss_cstr ("REPEAT"), ss_cstr (id))) s->substate += direction; return true; } static int segmenter_parse_full_line__ (const char *input, size_t n, enum segment_type *type) { const char *newline = memchr2 (input, '\n', '\0', n); if (newline == NULL) return -1; else { int ofs = newline - input; if (*newline == '\0') { assert (ofs > 0); return ofs; } else if (ofs == 0 || (ofs == 1 && input[0] == '\r')) { *type = SEG_NEWLINE; return ofs + 1; } else return ofs - (input[ofs - 1] == '\r'); } } static int segmenter_parse_do_repeat_3__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int ofs; ofs = segmenter_parse_full_line__ (input, n, type); if (ofs < 0 || input[ofs - 1] == '\n') return ofs; else if (!check_repeat_command (s, input, n)) return -1; else if (s->substate == 0) { s->state = S_GENERAL; s->substate = SS_START_OF_COMMAND | SS_START_OF_LINE; return segmenter_push (s, input, n, type); } else { *type = SEG_DO_REPEAT_COMMAND; return ofs; } } static int segmenter_parse_begin_data_1__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int ofs = segmenter_subparse (s, input, n, type); if (ofs < 0) return -1; if (*type == SEG_NEWLINE) s->state = S_BEGIN_DATA_2; return ofs; } static int segmenter_parse_begin_data_2__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int ofs = segmenter_subparse (s, input, n, type); if (ofs < 0) return -1; if (*type == SEG_NEWLINE) s->state = S_BEGIN_DATA_3; return ofs; } static bool is_end_data (const char *input, size_t n) { const uint8_t *u_input = CHAR_CAST (const uint8_t *, input); bool endcmd; ucs4_t uc; int mblen; int ofs; if (n < 3 || c_strncasecmp (input, "END", 3)) return false; ofs = 3; mblen = u8_mbtouc (&uc, u_input + ofs, n - ofs); if (!lex_uc_is_space (uc)) return false; ofs += mblen; if (n - ofs < 4 || c_strncasecmp (input + ofs, "DATA", 4)) return false; ofs += 4; endcmd = false; while (ofs < n) { mblen = u8_mbtouc (&uc, u_input + ofs, n - ofs); if (uc == '.') { if (endcmd) return false; endcmd = true; } else if (!lex_uc_is_space (uc)) return false; ofs += mblen; } return true; } static int segmenter_parse_begin_data_3__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int ofs; ofs = segmenter_parse_full_line__ (input, n, type); if (ofs < 0) return -1; else if (is_end_data (input, ofs)) { s->state = S_GENERAL; s->substate = SS_START_OF_COMMAND | SS_START_OF_LINE; return segmenter_push (s, input, n, type); } else { *type = SEG_INLINE_DATA; s->state = S_BEGIN_DATA_4; return input[ofs - 1] == '\n' ? 0 : ofs; } } static int segmenter_parse_begin_data_4__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int ofs; ofs = segmenter_parse_newline__ (input, n, type); if (ofs < 0) return -1; s->state = S_BEGIN_DATA_3; return ofs; } static int segmenter_parse_title_1__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int ofs; ofs = skip_spaces (input, n, 0); if (ofs < 0) return -1; s->state = S_TITLE_2; *type = SEG_SPACES; return ofs; } static int segmenter_parse_title_2__ (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { int endcmd; int ofs; endcmd = -1; ofs = 0; while (ofs < n) { ucs4_t uc; int mblen; mblen = segmenter_u8_to_uc__ (&uc, input + ofs, n - ofs); if (mblen < 0) return -1; switch (uc) { case '\n': case '\0': s->state = S_GENERAL; s->substate = 0; *type = SEG_UNQUOTED_STRING; return endcmd >= 0 ? endcmd : ofs; case '.': endcmd = ofs; break; default: if (!lex_uc_is_space (uc)) endcmd = -1; break; } ofs += mblen; } return -1; } /* Returns the name of segment TYPE as a string. The caller must not modify or free the returned string. This is useful only for debugging and testing. */ const char * segment_type_to_string (enum segment_type type) { switch (type) { #define SEG_TYPE(NAME) case SEG_##NAME: return #NAME; SEG_TYPES #undef SEG_TYPE default: return "unknown segment type"; } } /* Initializes S as a segmenter with the given syntax MODE. A segmenter does not contain any external references, so nothing needs to be done to destroy one. For the same reason, segmenters may be copied with plain struct assignment (or memcpy). */ void segmenter_init (struct segmenter *s, enum segmenter_mode mode) { s->state = S_SHBANG; s->substate = 0; s->mode = mode; } /* Returns the mode passed to segmenter_init() for S. */ enum segmenter_mode segmenter_get_mode (const struct segmenter *s) { return s->mode; } /* Attempts to label a prefix of S's remaining input with a segment type. The caller supplies the first N bytes of the remaining input as INPUT, which must be a UTF-8 encoded string. The end of the input stream must be indicated by a null byte at the beginning of a line, that is, immediately following a new-line (or as the first byte of the input stream). The input may contain '\n' or '\r\n' line ends in any combination. If successful, returns the number of bytes in the segment at the beginning of INPUT (between 0 and N, inclusive) and stores the type of that segment into *TYPE. The next call to segmenter_push() should not include those bytes as part of INPUT, because they have (figuratively) been consumed by the segmenter. Failure occurs only if the segment type of the N bytes in INPUT cannot yet be determined. In this case segmenter_push() returns -1. The caller should obtain more input and then call segmenter_push() again with a larger N and repeat until the input is exhausted (which must be indicated as described above) or until a valid segment is returned. segmenter_push() will never return -1 when the end of input is visible within INPUT. The caller must not, in a sequence of calls, supply contradictory input. That is, bytes provided as part of INPUT in one call, but not consumed, must not be provided with *different* values on subsequent calls. This is because segmenter_push() must often make decisions based on looking ahead beyond the bytes that it consumes. */ int segmenter_push (struct segmenter *s, const char *input, size_t n, enum segment_type *type) { if (n == 0) return -1; if (input[0] == '\0') { *type = SEG_END; return 1; } switch (s->state) { case S_SHBANG: return segmenter_parse_shbang__ (s, input, n, type); case S_GENERAL: return (s->substate & SS_START_OF_LINE ? segmenter_parse_start_of_line__ (s, input, n, type) : segmenter_parse_mid_command__ (s, input, n, type)); case S_COMMENT_1: return segmenter_parse_comment_1__ (s, input, n, type); case S_COMMENT_2: return segmenter_parse_comment_2__ (s, input, n, type); case S_DOCUMENT_1: return segmenter_parse_document_1__ (s, input, n, type); case S_DOCUMENT_2: return segmenter_parse_document_2__ (s, input, n, type); case S_DOCUMENT_3: return segmenter_parse_document_3__ (s, type); case S_FILE_LABEL: return segmenter_parse_file_label__ (s, input, n, type); case S_DO_REPEAT_1: return segmenter_parse_do_repeat_1__ (s, input, n, type); case S_DO_REPEAT_2: return segmenter_parse_do_repeat_2__ (s, input, n, type); case S_DO_REPEAT_3: return segmenter_parse_do_repeat_3__ (s, input, n, type); case S_BEGIN_DATA_1: return segmenter_parse_begin_data_1__ (s, input, n, type); case S_BEGIN_DATA_2: return segmenter_parse_begin_data_2__ (s, input, n, type); case S_BEGIN_DATA_3: return segmenter_parse_begin_data_3__ (s, input, n, type); case S_BEGIN_DATA_4: return segmenter_parse_begin_data_4__ (s, input, n, type); case S_TITLE_1: return segmenter_parse_title_1__ (s, input, n, type); case S_TITLE_2: return segmenter_parse_title_2__ (s, input, n, type); } NOT_REACHED (); } /* Returns the style of command prompt to display to an interactive user for input in S. The return value is most accurate in mode SEG_MODE_INTERACTIVE and at the beginning of a line (that is, if segmenter_push() consumed as much as possible of the input up to a new-line). */ enum prompt_style segmenter_get_prompt (const struct segmenter *s) { switch (s->state) { case S_SHBANG: return PROMPT_FIRST; case S_GENERAL: return s->substate & SS_START_OF_COMMAND ? PROMPT_FIRST : PROMPT_LATER; case S_COMMENT_1: case S_COMMENT_2: return PROMPT_COMMENT; case S_DOCUMENT_1: case S_DOCUMENT_2: return PROMPT_DOCUMENT; case S_DOCUMENT_3: return PROMPT_FIRST; case S_FILE_LABEL: return PROMPT_LATER; case S_DO_REPEAT_1: case S_DO_REPEAT_2: return s->substate & SS_START_OF_COMMAND ? PROMPT_FIRST : PROMPT_LATER; case S_DO_REPEAT_3: return PROMPT_DO_REPEAT; case S_BEGIN_DATA_1: return PROMPT_FIRST; case S_BEGIN_DATA_2: return PROMPT_LATER; case S_BEGIN_DATA_3: case S_BEGIN_DATA_4: return PROMPT_DATA; case S_TITLE_1: case S_TITLE_2: return PROMPT_FIRST; } NOT_REACHED (); } pspp-1.0.1/src/language/lexer/command-name.h0000644000175000017500000000313112470242646015617 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef COMMAND_NAME_H #define COMMAND_NAME_H 1 #include #include "libpspp/str.h" bool command_match (struct substring command, struct substring string, bool *exact, int *missing_words); /* Allows matching a string against a table of command names. */ struct command_matcher { struct substring string; bool extensible; void *exact_match; int n_matches; void *match; int match_missing_words; }; void command_matcher_init (struct command_matcher *, struct substring string); void command_matcher_destroy (struct command_matcher *); void command_matcher_add (struct command_matcher *, struct substring command, void *aux); void *command_matcher_get_match (const struct command_matcher *); int command_matcher_get_missing_words (const struct command_matcher *); #endif /* command-name.h */ pspp-1.0.1/src/language/lexer/format-parser.c0000644000175000017500000001106213137223525016036 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include "data/format.h" #include "data/variable.h" #include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "gettext.h" #define _(msgid) gettext (msgid) static bool parse_abstract_format_specifier__ (struct lexer *lexer, char type[FMT_TYPE_LEN_MAX + 1], int *width, int *decimals) { struct substring s; struct substring type_ss, width_ss, decimals_ss; bool has_decimals; if (lex_token (lexer) != T_ID && lex_token (lexer) != T_STRING) goto error; /* Extract pieces. */ s = ss_cstr (lex_tokcstr (lexer)); ss_get_bytes (&s, ss_span (s, ss_cstr (CC_LETTERS)), &type_ss); ss_get_bytes (&s, ss_span (s, ss_cstr (CC_DIGITS)), &width_ss); if (ss_match_byte (&s, '.')) { has_decimals = true; ss_get_bytes (&s, ss_span (s, ss_cstr (CC_DIGITS)), &decimals_ss); } else has_decimals = false; /* Check pieces. */ if (ss_is_empty (type_ss) || ss_length (type_ss) > FMT_TYPE_LEN_MAX) goto error; if (has_decimals && ss_is_empty (decimals_ss)) goto error; if (!ss_is_empty (s)) goto error; /* Return pieces. These uses of strtol are valid only because we know that their substrings are followed by non-digit characters. */ str_copy_buf_trunc (type, FMT_TYPE_LEN_MAX + 1, ss_data (type_ss), ss_length (type_ss)); *width = strtol (ss_data (width_ss), NULL, 10); *decimals = has_decimals ? strtol (ss_data (decimals_ss), NULL, 10) : 0; return true; error: lex_error (lexer, _("expecting valid format specifier")); return false; } /* Parses a token taking the form of a format specifier and returns true only if successful. Emits an error message on failure. Stores a null-terminated string representing the format type in TYPE, and the width and number of decimal places in *WIDTH and *DECIMALS. TYPE is not checked as to whether it is really the name of a format. Both width and decimals are considered optional. If missing, *WIDTH or *DECIMALS or both will be set to 0. */ bool parse_abstract_format_specifier (struct lexer *lexer, char type[FMT_TYPE_LEN_MAX + 1], int *width, int *decimals) { bool ok = parse_abstract_format_specifier__ (lexer, type, width, decimals); if (ok) lex_get (lexer); return ok; } /* Parses a format specifier from the token stream and returns true only if successful. Emits an error message on failure. The caller should call check_input_specifier() or check_output_specifier() on the parsed format as necessary. */ bool parse_format_specifier (struct lexer *lexer, struct fmt_spec *format) { char type[FMT_TYPE_LEN_MAX + 1]; if (!parse_abstract_format_specifier__ (lexer, type, &format->w, &format->d)) return false; if (!fmt_from_name (type, &format->type)) { msg (SE, _("Unknown format type `%s'."), type); return false; } if (format->w == 0 && !strchr (lex_tokcstr (lexer), '0')) { msg (SE, _("Format specifier `%s' lacks required width."), lex_tokcstr (lexer)); return false; } lex_get (lexer); return true; } /* Parses a token containing just the name of a format type and returns true if successful. */ bool parse_format_specifier_name (struct lexer *lexer, enum fmt_type *type) { if (lex_token (lexer) != T_ID) { lex_error (lexer, _("expecting format type")); return false; } if (!fmt_from_name (lex_tokcstr (lexer), type)) { msg (SE, _("Unknown format type `%s'."), lex_tokcstr (lexer)); return false; } lex_get (lexer); return true; } pspp-1.0.1/src/language/lexer/subcommand-list.c0000644000175000017500000000477512470243700016366 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/lexer/subcommand-list.h" #include #include "language/lexer/lexer.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* I call these objects `lists' but they are in fact simple dynamic arrays */ #define CHUNKSIZE 16 /* Create a list */ void subc_list_double_create(subc_list_double *l) { l->data = xnmalloc (CHUNKSIZE, sizeof *l->data); l->sz = CHUNKSIZE; l->n_data = 0; } void subc_list_int_create(subc_list_int *l) { l->data = xnmalloc (CHUNKSIZE, sizeof *l->data); l->sz = CHUNKSIZE; l->n_data = 0; } /* Push a value onto the list */ void subc_list_double_push(subc_list_double *l, double d) { l->data[l->n_data++] = d; if (l->n_data >= l->sz ) { l->sz += CHUNKSIZE; l->data = xnrealloc (l->data, l->sz, sizeof *l->data); } } void subc_list_int_push(subc_list_int *l, int d) { l->data[l->n_data++] = d; if (l->n_data >= l->sz ) { l->sz += CHUNKSIZE; l->data = xnrealloc (l->data, l->sz, sizeof *l->data); } } /* Return the number of items in the list */ int subc_list_double_count(const subc_list_double *l) { return l->n_data; } int subc_list_int_count(const subc_list_int *l) { return l->n_data; } /* Index into the list (array) */ double subc_list_double_at(const subc_list_double *l, int idx) { return l->data[idx]; } int subc_list_int_at(const subc_list_int *l, int idx) { return l->data[idx]; } /* Free up the list */ void subc_list_double_destroy(subc_list_double *l) { free(l->data); } void subc_list_int_destroy(subc_list_int *l) { free(l->data); } void subc_list_error (struct lexer *lexer, const char *sbc, int max_list) { lex_error (lexer, _("No more than %d %s subcommands allowed."), max_list, sbc); } pspp-1.0.1/src/language/lexer/automake.mk0000644000175000017500000000353013137223525015250 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- language_lexer_sources = \ src/language/lexer/command-name.c \ src/language/lexer/command-name.h \ src/language/lexer/include-path.c \ src/language/lexer/include-path.h \ src/language/lexer/lexer.c \ src/language/lexer/lexer.h \ src/language/lexer/subcommand-list.c \ src/language/lexer/subcommand-list.h \ src/language/lexer/format-parser.c \ src/language/lexer/format-parser.h \ src/language/lexer/scan.c \ src/language/lexer/scan.h \ src/language/lexer/segment.c \ src/language/lexer/segment.h \ src/language/lexer/token.c \ src/language/lexer/token.h \ src/language/lexer/value-parser.c \ src/language/lexer/value-parser.h \ src/language/lexer/variable-parser.c \ src/language/lexer/variable-parser.h EXTRA_DIST += src/language/lexer/q2c.c src/language/lexer/q2c$(EXEEXT_FOR_BUILD): $(top_srcdir)/src/language/lexer/q2c.c @$(MKDIR_P) `dirname $@` $(AM_V_GEN)$(CC_FOR_BUILD) $(top_srcdir)/src/language/lexer/q2c.c -o $(top_builddir)/src/language/lexer/q2c$(EXEEXT_FOR_BUILD) CLEANFILES += src/language/lexer/q2c$(EXEEXT_FOR_BUILD) pspp-1.0.1/src/language/lexer/lexer.h0000644000175000017500000001561013137223525014403 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LEXER_H #define LEXER_H 1 #include #include #include #include "data/identifier.h" #include "data/variable.h" #include "libpspp/compiler.h" #include "libpspp/prompt.h" struct lexer; /* The syntax mode for which a syntax file is intended. */ enum lex_syntax_mode { LEX_SYNTAX_AUTO, /* Try to guess intent. */ LEX_SYNTAX_INTERACTIVE, /* Interactive mode. */ LEX_SYNTAX_BATCH /* Batch mode. */ }; /* Handling of errors. */ enum lex_error_mode { LEX_ERROR_TERMINAL, /* Discard input line and continue reading. */ LEX_ERROR_CONTINUE, /* Continue to next command, except for cascading failures. */ LEX_ERROR_STOP /* Stop processing. */ }; /* Reads a single syntax file as a stream of bytes encoded in UTF-8. Not opaque. */ struct lex_reader { const struct lex_reader_class *class; enum lex_syntax_mode syntax; enum lex_error_mode error; char *encoding; char *file_name; /* NULL if not associated with a file. */ int line_number; /* 1-based initial line number, 0 if none. */ }; /* An implementation of a lex_reader. */ struct lex_reader_class { /* Reads up to N bytes of data from READER into N. Returns the positive number of bytes read if successful, or zero at end of input or on error. STYLE provides a hint to interactive readers as to what kind of syntax is being read right now. */ size_t (*read) (struct lex_reader *reader, char *buf, size_t n, enum prompt_style style); /* Closes and destroys READER, releasing any allocated storage. The caller will free the 'file_name' member of READER, so the implementation should not do so. */ void (*destroy) (struct lex_reader *reader); }; /* Helper functions for lex_reader. */ void lex_reader_init (struct lex_reader *, const struct lex_reader_class *); void lex_reader_set_file_name (struct lex_reader *, const char *file_name); /* Creating various kinds of lex_readers. */ struct lex_reader *lex_reader_for_file (const char *file_name, const char *encoding, enum lex_syntax_mode syntax, enum lex_error_mode error); struct lex_reader *lex_reader_for_string (const char *, const char *encoding); struct lex_reader *lex_reader_for_format (const char *, const char *, ...) PRINTF_FORMAT (1, 3); struct lex_reader *lex_reader_for_substring_nocopy (struct substring, const char *encoding); /* Initialization. */ struct lexer *lex_create (void); void lex_destroy (struct lexer *); /* Files. */ void lex_include (struct lexer *, struct lex_reader *); void lex_append (struct lexer *, struct lex_reader *); /* Advancing. */ void lex_get (struct lexer *); /* Token testing functions. */ bool lex_is_number (struct lexer *); double lex_number (struct lexer *); bool lex_is_integer (struct lexer *); long lex_integer (struct lexer *); bool lex_is_string (struct lexer *); /* Token testing functions with lookahead. */ bool lex_next_is_number (struct lexer *, int n); double lex_next_number (struct lexer *, int n); bool lex_next_is_integer (struct lexer *, int n); long lex_next_integer (struct lexer *, int n); bool lex_next_is_string (struct lexer *, int n); /* Token matching functions. */ bool lex_match (struct lexer *, enum token_type); bool lex_match_id (struct lexer *, const char *); bool lex_match_id_n (struct lexer *, const char *, size_t n); bool lex_match_int (struct lexer *, int); bool lex_match_phrase (struct lexer *, const char *s); /* Forcible matching functions. */ bool lex_force_match (struct lexer *, enum token_type) WARN_UNUSED_RESULT; bool lex_force_match_id (struct lexer *, const char *) WARN_UNUSED_RESULT; bool lex_force_int (struct lexer *) WARN_UNUSED_RESULT; bool lex_force_num (struct lexer *) WARN_UNUSED_RESULT; bool lex_force_id (struct lexer *) WARN_UNUSED_RESULT; bool lex_force_string (struct lexer *) WARN_UNUSED_RESULT; bool lex_force_string_or_id (struct lexer *) WARN_UNUSED_RESULT; /* Token accessors. */ enum token_type lex_token (const struct lexer *); double lex_tokval (const struct lexer *); const char *lex_tokcstr (const struct lexer *); struct substring lex_tokss (const struct lexer *); /* Looking ahead. */ const struct token *lex_next (const struct lexer *, int n); enum token_type lex_next_token (const struct lexer *, int n); const char *lex_next_tokcstr (const struct lexer *, int n); double lex_next_tokval (const struct lexer *, int n); struct substring lex_next_tokss (const struct lexer *, int n); /* Current position. */ int lex_get_first_line_number (const struct lexer *, int n); int lex_get_last_line_number (const struct lexer *, int n); int lex_get_first_column (const struct lexer *, int n); int lex_get_last_column (const struct lexer *, int n); const char *lex_get_file_name (const struct lexer *); const char *lex_get_encoding (const struct lexer *); /* Issuing errors. */ void lex_error (struct lexer *, const char *, ...) PRINTF_FORMAT (2, 3); void lex_next_error (struct lexer *, int n0, int n1, const char *, ...) PRINTF_FORMAT (4, 5); int lex_end_of_command (struct lexer *); void lex_error_expecting (struct lexer *, const char *, ...) SENTINEL(0); void lex_sbc_only_once (const char *); void lex_sbc_missing (const char *); void lex_spec_only_once (struct lexer *, const char *subcommand, const char *specification); void lex_spec_missing (struct lexer *, const char *subcommand, const char *specification); void lex_error_valist (struct lexer *, const char *, va_list) PRINTF_FORMAT (2, 0); void lex_next_error_valist (struct lexer *lexer, int n0, int n1, const char *format, va_list) PRINTF_FORMAT (4, 0); /* Error handling. */ enum lex_syntax_mode lex_get_syntax_mode (const struct lexer *); enum lex_error_mode lex_get_error_mode (const struct lexer *); void lex_discard_rest_of_command (struct lexer *); void lex_interactive_reset (struct lexer *); void lex_discard_noninteractive (struct lexer *); #endif /* lexer.h */ pspp-1.0.1/src/language/lexer/scan.h0000644000175000017500000000704412470434665014222 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SCAN_H #define SCAN_H 1 #include "language/lexer/segment.h" #include "libpspp/str.h" struct token; /* PSPP syntax scanning. PSPP divides traditional "lexical analysis" or "tokenization" into two phases: a lower-level phase called "segmentation" and a higher-level phase called "scanning". segment.h provides declarations for the segmentation phase. This header file contains declarations for the scanning phase. Scanning accepts as input a stream of segments, which are UTF-8 strings each labeled with a segment type. It outputs a stream of "scan tokens", which are the same as the tokens used by the PSPP parser with a few additional types. */ #define SCAN_TYPES \ SCAN_TYPE(BAD_HEX_LENGTH) \ SCAN_TYPE(BAD_HEX_DIGIT) \ \ SCAN_TYPE(BAD_UNICODE_LENGTH) \ SCAN_TYPE(BAD_UNICODE_DIGIT) \ SCAN_TYPE(BAD_UNICODE_CODE_POINT) \ \ SCAN_TYPE(EXPECTED_QUOTE) \ SCAN_TYPE(EXPECTED_EXPONENT) \ SCAN_TYPE(UNEXPECTED_DOT) \ SCAN_TYPE(UNEXPECTED_CHAR) \ \ SCAN_TYPE(SKIP) /* Types of scan tokens. Scan token types are a superset of enum token_type. Only the additional scan token types are defined here, so see the definition of enum token_type for the others. */ enum scan_type { #define SCAN_TYPE(TYPE) SCAN_##TYPE, SCAN_FIRST = 255, SCAN_TYPES SCAN_LAST #undef SCAN_TYPE }; const char *scan_type_to_string (enum scan_type); bool is_scan_type (enum scan_type); /* A scanner. Opaque. */ struct scanner { unsigned char state; unsigned char substate; }; /* scanner_push() return type. */ enum scan_result { /* Complete token. */ SCAN_DONE, /* Token successfully scanned. */ SCAN_MORE, /* More segments needed to scan token. */ /* Incomplete token. */ SCAN_BACK, /* Done, but go back to saved position too. */ SCAN_SAVE /* Need more segments, and save position. */ }; void scanner_init (struct scanner *, struct token *); enum scan_result scanner_push (struct scanner *, enum segment_type, struct substring, struct token *); /* A simplified lexer for handling syntax in a string. */ struct string_lexer { const char *input; size_t length; size_t offset; struct segmenter segmenter; }; void string_lexer_init (struct string_lexer *, const char *input, enum segmenter_mode); bool string_lexer_next (struct string_lexer *, struct token *); #endif /* scan.h */ pspp-1.0.1/src/language/lexer/include-path.h0000644000175000017500000000203712470243700015634 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef INCLUDE_PATH_H #define INCLUDE_PATH_H 1 struct string_array; void include_path_clear (void); void include_path_add (const char *dir); char *include_path_search (const char *base_name); const struct string_array *include_path_default (void); char **include_path (void); #endif /* include-path.h */ pspp-1.0.1/src/language/lexer/format-parser.h0000644000175000017500000000230512470242642016043 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LANGUAGE_LEXER_FORMAT_PARSER_H #define LANGUAGE_LEXER_FORMAT_PARSER_H 1 #include struct lexer; bool parse_abstract_format_specifier (struct lexer *, char *type, int *width, int *decimals); enum fmt_type ; struct fmt_spec; bool parse_format_specifier (struct lexer *, struct fmt_spec *); bool parse_format_specifier_name (struct lexer *, enum fmt_type *type); #endif /* language/lexer/format-parser.h. */ pspp-1.0.1/src/language/lexer/value-parser.h0000644000175000017500000000211512470243700015662 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef VALUE_PARSER_H #define VALUE_PARSER_H 1 #include struct lexer; enum fmt_type; struct variable; union value; bool parse_num_range (struct lexer *, double *x, double *y, const enum fmt_type *fmt); bool parse_value (struct lexer *, union value *, const struct variable *); #endif /* value-parser.h */ pspp-1.0.1/src/language/expressions/0000755000175000017500000000000013150620333014424 500000000000000pspp-1.0.1/src/language/expressions/evaluate.c0000644000175000017500000001671613137223525016340 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "evaluate.h" #include #include "libpspp/assertion.h" #include "libpspp/message.h" #include "language/expressions/helpers.h" #include "language/expressions/private.h" #include "language/lexer/value-parser.h" #include "libpspp/pool.h" #include "xalloc.h" static void expr_evaluate (struct expression *e, const struct ccase *c, int case_idx, void *result) { struct dataset *ds = e->ds; union operation_data *op = e->ops; double *ns = e->number_stack; struct substring *ss = e->string_stack; /* Without a dictionary/dataset, the expression can't refer to variables, and you don't need to specify a case when you evaluate the expression. With a dictionary/dataset, the expression can refer to variables, so you must specify a case when you evaluate the expression. */ assert ((c != NULL) == (e->ds != NULL)); pool_clear (e->eval_pool); for (;;) { assert (op < e->ops + e->op_cnt); switch (op++->operation) { case OP_number: case OP_boolean: *ns++ = op++->number; break; case OP_string: { const struct substring *s = &op++->string; *ss++ = copy_string (e, s->string, s->length); } break; case OP_return_number: *(double *) result = isfinite (ns[-1]) ? ns[-1] : SYSMIS; return; case OP_return_string: *(struct substring *) result = ss[-1]; return; #include "evaluate.inc" default: NOT_REACHED (); } } } double expr_evaluate_num (struct expression *e, const struct ccase *c, int case_idx) { double d; assert (e->type == OP_number || e->type == OP_boolean); expr_evaluate (e, c, case_idx, &d); return d; } void expr_evaluate_str (struct expression *e, const struct ccase *c, int case_idx, char *dst, size_t dst_size) { struct substring s; assert (e->type == OP_string); assert ((dst == NULL) == (dst_size == 0)); expr_evaluate (e, c, case_idx, &s); buf_copy_rpad (dst, dst_size, s.string, s.length, ' '); } #include "language/lexer/lexer.h" #include "language/command.h" int cmd_debug_evaluate (struct lexer *lexer, struct dataset *dsother UNUSED) { bool optimize = true; int retval = CMD_FAILURE; bool dump_postfix = false; struct ccase *c = NULL; struct dataset *ds = NULL; char *name = NULL; struct expression *expr; for (;;) { struct dictionary *d = NULL; if (lex_match_id (lexer, "NOOPTIMIZE")) optimize = 0; else if (lex_match_id (lexer, "POSTFIX")) dump_postfix = 1; else if (lex_match (lexer, T_LPAREN)) { struct variable *v; int width; if (!lex_force_id (lexer)) goto done; name = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); if (!lex_force_match (lexer, T_EQUALS)) goto done; if (lex_is_number (lexer)) width = 0; else if (lex_is_string (lexer)) width = ss_length (lex_tokss (lexer)); else { lex_error (lexer, _("expecting number or string")); goto done; } if ( ds == NULL ) { ds = dataset_create (NULL, ""); d = dataset_dict (ds); } v = dict_create_var (d, name, width); if (v == NULL) { msg (SE, _("Duplicate variable name %s."), name); goto done; } free (name); name = NULL; if (c == NULL) c = case_create (dict_get_proto (d)); else c = case_unshare_and_resize (c, dict_get_proto (d)); if (!parse_value (lexer, case_data_rw (c, v), v)) NOT_REACHED (); if (!lex_force_match (lexer, T_RPAREN)) goto done; } else break; } if (!lex_force_match (lexer, T_SLASH)) goto done; expr = expr_parse_any (lexer, ds, optimize); if (!expr || lex_end_of_command (lexer) != CMD_SUCCESS) { if (expr != NULL) expr_free (expr); printf ("error\n"); goto done; } if (dump_postfix) expr_debug_print_postfix (expr); else switch (expr->type) { case OP_number: { double d = expr_evaluate_num (expr, c, 0); if (d == SYSMIS) printf ("sysmis\n"); else printf ("%.2f\n", d); } break; case OP_boolean: { double b = expr_evaluate_num (expr, c, 0); printf ("%s\n", b == SYSMIS ? "sysmis" : b == 0.0 ? "false" : "true"); } break; case OP_string: { struct substring s; expr_evaluate (expr, c, 0, &s); putchar ('"'); fwrite (s.string, s.length, 1, stdout); puts ("\""); break; } default: NOT_REACHED (); } expr_free (expr); retval = CMD_SUCCESS; done: dataset_destroy (ds); case_unref (c); free (name); return retval; } void expr_debug_print_postfix (const struct expression *e) { size_t i; for (i = 0; i < e->op_cnt; i++) { union operation_data *op = &e->ops[i]; if (i > 0) putc (' ', stderr); switch (e->op_types[i]) { case OP_operation: if (op->operation == OP_return_number) printf ("return_number"); else if (op->operation == OP_return_string) printf ("return_string"); else if (is_function (op->operation)) printf ("%s", operations[op->operation].prototype); else if (is_composite (op->operation)) printf ("%s", operations[op->operation].name); else printf ("%s:", operations[op->operation].name); break; case OP_number: if (op->number != SYSMIS) printf ("n<%g>", op->number); else printf ("n"); break; case OP_string: printf ("s<%.*s>", (int) op->string.length, op->string.string != NULL ? op->string.string : ""); break; case OP_format: { char str[FMT_STRING_LEN_MAX + 1]; fmt_to_string (op->format, str); printf ("f<%s>", str); } break; case OP_variable: printf ("v<%s>", var_get_name (op->variable)); break; case OP_vector: printf ("vec<%s>", vector_get_name (op->vector)); break; case OP_integer: printf ("i<%d>", op->integer); break; default: NOT_REACHED (); } } printf ("\n"); } pspp-1.0.1/src/language/expressions/private.h0000644000175000017500000001444712470243700016204 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef EXPRESSIONS_PRIVATE_H #define EXPRESSIONS_PRIVATE_H #include #include #include "data/format.h" #include "operations.h" #include "public.h" #include "libpspp/str.h" enum operation_flags { /* Most operations produce a missing output value if any input value is missing. Setting this bit indicates that this operation may produce a non-missing result given missing input values (although it is not obliged to do so). Unless this bit is set, the operation's evaluation function will never be passed a missing argument. */ OPF_ABSORB_MISS = 004, /* If set, this operation's final operand is an array of one or more elements. */ OPF_ARRAY_OPERAND = 001, /* If set, the user can specify the minimum number of array elements that must be non-missing for the function result to be non-missing. The operation must have an array operand and the array must contain `double's. Both OPF_ABSORB_MISS and OPF_ARRAY_OPERAND must also be set. */ OPF_MIN_VALID = 002, /* If set, operation is non-optimizable in general. Unless combined with OPF_ABSORB_MISS, missing input values are still assumed to yield missing results. */ OPF_NONOPTIMIZABLE = 010, /* If set, this operation is not implemented. */ OPF_UNIMPLEMENTED = 020, /* If set, this operation is a PSPP extension. */ OPF_EXTENSION = 040, /* If set, this operation may not occur after TEMPORARY. (Currently this applies only to LAG.) */ OPF_PERM_ONLY = 0100, /* If set, this operation's name may not be abbreviated. */ OPF_NO_ABBREV = 0200 }; #define EXPR_ARG_MAX 4 struct operation { const char *name; const char *prototype; enum operation_flags flags; atom_type returns; int arg_cnt; atom_type args[EXPR_ARG_MAX]; int array_min_elems; int array_granularity; }; extern const struct operation operations[]; /* Tree structured expressions. */ /* Atoms. */ struct number_node { operation_type type; /* OP_number. */ double n; }; struct string_node { operation_type type; /* OP_string. */ struct substring s; }; struct variable_node { operation_type type; /* OP_variable. */ const struct variable *v; }; struct integer_node { operation_type type; /* OP_integer. */ int i; }; struct vector_node { operation_type type; /* OP_vector. */ const struct vector *v; }; struct format_node { operation_type type; /* OP_format. */ struct fmt_spec f; }; /* Any composite node. */ struct composite_node { operation_type type; /* One of OP_*. */ size_t arg_cnt; /* Number of arguments. */ union any_node **args; /* Arguments. */ size_t min_valid; /* Min valid array args to get valid result. */ }; /* Any node. */ union any_node { operation_type type; struct number_node number; struct string_node string; struct variable_node variable; struct integer_node integer; struct vector_node vector; struct format_node format; struct composite_node composite; }; union operation_data { operation_type operation; double number; struct substring string; const struct variable *variable; const struct vector *vector; struct fmt_spec *format; int integer; }; /* An expression. */ struct expression { struct pool *expr_pool; /* Pool for expression static data. */ struct dataset *ds ; /* The dataset */ atom_type type; /* Type of expression result. */ union operation_data *ops; /* Expression data. */ operation_type *op_types; /* ops[] element types (for debugging). */ size_t op_cnt, op_cap; /* Number of ops, amount of allocated space. */ double *number_stack; /* Evaluation stack: numerics, Booleans. */ struct substring *string_stack; /* Evaluation stack: strings. */ struct pool *eval_pool; /* Pool for evaluation temporaries. */ }; struct expression *expr_parse_any (struct lexer *lexer, struct dataset *, bool optimize); void expr_debug_print_postfix (const struct expression *); union any_node *expr_optimize (union any_node *, struct expression *); void expr_flatten (union any_node *, struct expression *); atom_type expr_node_returns (const union any_node *); union any_node *expr_allocate_nullary (struct expression *e, operation_type); union any_node *expr_allocate_unary (struct expression *e, operation_type, union any_node *); union any_node *expr_allocate_binary (struct expression *e, operation_type, union any_node *, union any_node *); union any_node *expr_allocate_composite (struct expression *e, operation_type, union any_node **, size_t); union any_node *expr_allocate_number (struct expression *e, double); union any_node *expr_allocate_boolean (struct expression *e, double); union any_node *expr_allocate_integer (struct expression *e, int); union any_node *expr_allocate_pos_int (struct expression *e, int); union any_node *expr_allocate_string (struct expression *e, struct substring); union any_node *expr_allocate_variable (struct expression *e, const struct variable *); union any_node *expr_allocate_format (struct expression *e, const struct fmt_spec *); union any_node *expr_allocate_vector (struct expression *e, const struct vector *); #endif /* expressions/private.h */ pspp-1.0.1/src/language/expressions/TODO0000644000175000017500000000071512470242642015046 00000000000000Needed: - Warnings on domain errors (see "Domain Errors" in SPSS manual) and documentation of such. - Finish polishing code. Many functions need comments. - Test the remaining statistical distributions. - Implement unimplemented functions. - Check treatment of 0 bytes in expressions is correct. Extension ideas: - Short-circuit evaluation of logical ops - Conditional operator with ? : - User-defined functions. pspp-1.0.1/src/language/expressions/operations.def0000644000175000017500000010000413137223525017211 00000000000000// -*- c -*- // // PSPP - a program for statistical analysis. // Copyright (C) 2005, 2006, 2009, 2010, 2011, 2012, 2015, 2016 Free Software Foundation, Inc. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 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 . operator NEG (x) = -x; operator ADD (a, b) = a + b; operator SUB (a, b) = a - b; absorb_miss operator MUL (a, b) = (a == 0. || b == 0. ? 0. : a == SYSMIS || b == SYSMIS ? SYSMIS : a * b); absorb_miss operator DIV (a, b) = (a == 0. ? 0. : a == SYSMIS || b == SYSMIS ? SYSMIS : a / b); absorb_miss operator POW (a, b) = (a == SYSMIS ? (b == 0. ? 1. : a) : b == SYSMIS ? (a == 0. ? 0. : SYSMIS) : a == 0. && b <= 0. ? SYSMIS : pow (a, b)); absorb_miss boolean operator AND (boolean a, boolean b) = (a == 0. ? 0. : b == 0. ? 0. : b == SYSMIS ? SYSMIS : a); absorb_miss boolean operator OR (boolean a, boolean b) = (a == 1. ? 1. : b == 1. ? 1. : b == SYSMIS ? SYSMIS : a); boolean operator NOT (boolean a) = (a == 0. ? 1. : a == 1. ? 0. : SYSMIS); // Numeric relational operators. boolean operator EQ (a, b) = a == b; boolean operator GE (a, b) = a >= b; boolean operator GT (a, b) = a > b; boolean operator LE (a, b) = a <= b; boolean operator LT (a, b) = a < b; boolean operator NE (a, b) = a != b; // String relational operators. boolean operator EQ_STRING (string a, string b) = compare_string_3way (&a, &b) == 0; boolean operator GE_STRING (string a, string b) = compare_string_3way (&a, &b) >= 0; boolean operator GT_STRING (string a, string b) = compare_string_3way (&a, &b) > 0; boolean operator LE_STRING (string a, string b) = compare_string_3way (&a, &b) <= 0; boolean operator LT_STRING (string a, string b) = compare_string_3way (&a, &b) < 0; boolean operator NE_STRING (string a, string b) = compare_string_3way (&a, &b) != 0; // Unary functions. function ABS (x) = fabs (x); extension function ACOS (x >= -1 && x <= 1) = acos (x); function ASIN (x >= -1 && x <= 1) = asin (x); function ATAN (x) = atan (x); extension function ARCOS (x >= -1 && x <= 1) = acos (x); function ARSIN (x >= -1 && x <= 1) = asin (x); function ARTAN (x) = atan (x); function COS (x) = cos (x); function EXP (x) = check_errno (exp (x)); function LG10(x) = check_errno (log10 (x)); function LN (x) = check_errno (log (x)); function LNGAMMA (x >= 0) = gsl_sf_lngamma (x); function MOD10 (x) = fmod (x, 10); function RND (x) = round_nearest (x, 1, 0); function RND (x, mult != 0) = round_nearest (x, mult, 0); function RND (x, mult != 0, fuzzbits >= 0) = round_nearest (x, mult, fuzzbits); function SIN (x) = sin (x); function SQRT (x >= 0) = sqrt (x); function TAN (x) = check_errno (tan (x)); function TRUNC (x) = round_zero (x, 1, 0); function TRUNC (x, mult != 0) = round_zero (x, mult, 0); function TRUNC (x, mult != 0, fuzzbits >= 0) = round_zero (x, mult, fuzzbits); absorb_miss function MOD (n, d) { if (d != SYSMIS) return n != SYSMIS ? fmod (n, d) : SYSMIS; else return n != 0. ? SYSMIS : 0.; } // N-ary numeric functions. absorb_miss boolean function ANY (x != SYSMIS, a[n]) { int sysmis = 0; size_t i; for (i = 0; i < n; i++) if (a[i] == x) return 1.; else if (a[i] == SYSMIS) sysmis = 1; return sysmis ? SYSMIS : 0.; } boolean function ANY (string x, string a[n]) { size_t i; for (i = 0; i < n; i++) if (!compare_string_3way (&x, &a[i])) return 1.; return 0.; } function CFVAR.2 (a[n]) { double mean, variance; moments_of_doubles (a, n, NULL, &mean, &variance, NULL, NULL); if (mean == SYSMIS || mean == 0 || variance == SYSMIS) return SYSMIS; else return sqrt (variance) / mean; } function MAX.1 (a[n]) { double max; size_t i; max = -DBL_MAX; for (i = 0; i < n; i++) if (a[i] != SYSMIS && a[i] > max) max = a[i]; return max; } string function MAX (string a[n]) { struct substring *max; size_t i; max = &a[0]; for (i = 1; i < n; i++) if (compare_string_3way (&a[i], max) > 0) max = &a[i]; return *max; } function MEAN.1 (a[n]) { double mean; moments_of_doubles (a, n, NULL, &mean, NULL, NULL, NULL); return mean; } function MEDIAN.1 (a[n]) { return median (a, n); } function MIN.1 (a[n]) { double min; size_t i; min = DBL_MAX; for (i = 0; i < n; i++) if (a[i] != SYSMIS && a[i] < min) min = a[i]; return min; } string function MIN (string a[n]) { struct substring *min; size_t i; min = &a[0]; for (i = 1; i < n; i++) if (compare_string_3way (&a[i], min) < 0) min = &a[i]; return *min; } absorb_miss function NMISS (a[n]) { size_t i; size_t missing_cnt = 0; for (i = 0; i < n; i++) missing_cnt += a[i] == SYSMIS; return missing_cnt; } absorb_miss function NVALID (a[n]) { size_t i; size_t valid_cnt = 0; for (i = 0; i < n; i++) valid_cnt += a[i] != SYSMIS; return valid_cnt; } absorb_miss boolean function RANGE (x != SYSMIS, a[n*2]) { size_t i; int sysmis = 0; for (i = 0; i < n; i++) { double w = a[2 * i]; double y = a[2 * i + 1]; if (w != SYSMIS && y != SYSMIS) { if (w <= x && x <= y) return 1.0; } else sysmis = 1; } return sysmis ? SYSMIS : 0.; } boolean function RANGE (string x, string a[n*2]) { int i; for (i = 0; i < n; i++) { struct substring *w = &a[2 * i]; struct substring *y = &a[2 * i + 1]; if (compare_string_3way (w, &x) <= 0 && compare_string_3way (&x, y) <= 0) return 1.; } return 0.; } function SD.2 (a[n]) { double variance; moments_of_doubles (a, n, NULL, NULL, &variance, NULL, NULL); return sqrt (variance); } function SUM.1 (a[n]) { double sum; size_t i; sum = 0.; for (i = 0; i < n; i++) if (a[i] != SYSMIS) sum += a[i]; return sum; } function VARIANCE.2 (a[n]) { double variance; moments_of_doubles (a, n, NULL, NULL, &variance, NULL, NULL); return variance; } // Time construction & extraction functions. function TIME.HMS (h, m, s) { if ((h > 0. || m > 0. || s > 0.) && (h < 0. || m < 0. || s < 0.)) { msg (SW, _("TIME.HMS cannot mix positive and negative arguments.")); return SYSMIS; } else return H_S * h + MIN_S * m + s; } function TIME.DAYS (days) = days * DAY_S; function CTIME.DAYS (time) = time / DAY_S; function CTIME.HOURS (time) = time / H_S; function CTIME.MINUTES (time) = time / MIN_S; function CTIME.SECONDS (time) = time; // Date construction functions. function DATE.DMY (d, m, y) = expr_ymd_to_date (y, m, d); function DATE.MDY (m, d, y) = expr_ymd_to_date (y, m, d); function DATE.MOYR (m, y) = expr_ymd_to_date (y, m, 1); function DATE.QYR (q, y) { if (q < 1.0 || q > 4.0 || q != (int) q) { msg (SW, _("The first argument to DATE.QYR must be 1, 2, 3, or 4.")); return SYSMIS; } return expr_ymd_to_date (y, q * 3 - 2, 1); } function DATE.WKYR (w, y) = expr_wkyr_to_date (w, y); function DATE.YRDAY (y, yday) = expr_yrday_to_date (y, yday); function YRMODA (y, m, d) = expr_yrmoda (y, m, d); // Date extraction functions. function XDATE.TDAY (date) = floor (date / DAY_S); function XDATE.HOUR (date) = fmod (floor (date / H_S), DAY_H); function XDATE.MINUTE (date) = fmod (floor (date / H_MIN), H_MIN); function XDATE.SECOND (date) = fmod (date, MIN_S); function XDATE.DATE (date) = floor (date / DAY_S) * DAY_S; function XDATE.TIME (date) = fmod (date, DAY_S); function XDATE.JDAY (date >= DAY_S) = calendar_offset_to_yday (date / DAY_S); function XDATE.MDAY (date >= DAY_S) = calendar_offset_to_mday (date / DAY_S); function XDATE.MONTH (date >= DAY_S) = calendar_offset_to_month (date / DAY_S); function XDATE.QUARTER (date >= DAY_S) = (calendar_offset_to_month (date / DAY_S) - 1) / 3 + 1; function XDATE.WEEK (date >= DAY_S) = (calendar_offset_to_yday (date / DAY_S) - 1) / 7 + 1; function XDATE.WKDAY (date >= DAY_S) = calendar_offset_to_wday (date / DAY_S); function XDATE.YEAR (date >= DAY_S) = calendar_offset_to_year (date / DAY_S); // Date arithmetic functions. no_abbrev function DATEDIFF (date2 >= DAY_S, date1 >= DAY_S, string unit) = expr_date_difference (date1, date2, unit); no_abbrev function DATESUM (date, quantity, string unit) = expr_date_sum (date, quantity, unit, ss_cstr ("closest")); no_abbrev function DATESUM (date, quantity, string unit, string method) = expr_date_sum (date, quantity, unit, method); // String functions. string function CONCAT (string a[n]) expression e; { struct substring dst; size_t i; dst = alloc_string (e, MAX_STRING); dst.length = 0; for (i = 0; i < n; i++) { struct substring *src = &a[i]; size_t copy_len; copy_len = src->length; if (dst.length + copy_len > MAX_STRING) copy_len = MAX_STRING - dst.length; memcpy (&dst.string[dst.length], src->string, copy_len); dst.length += copy_len; } return dst; } function INDEX (string haystack, string needle) { if (needle.length == 0) return SYSMIS; else { int limit = haystack.length - needle.length + 1; int i; for (i = 1; i <= limit; i++) if (!memcmp (&haystack.string[i - 1], needle.string, needle.length)) return i; return 0; } } function INDEX (string haystack, string needles, needle_len_d) { if (needle_len_d <= INT_MIN || needle_len_d >= INT_MAX || (int) needle_len_d != needle_len_d || needles.length == 0) return SYSMIS; else { int needle_len = needle_len_d; if (needle_len < 0 || needle_len > needles.length || needles.length % needle_len != 0) return SYSMIS; else { int limit = haystack.length - needle_len + 1; int i, j; for (i = 1; i <= limit; i++) for (j = 0; j < needles.length; j += needle_len) if (!memcmp (&haystack.string[i - 1], &needles.string[j], needle_len)) return i; return 0; } } } function RINDEX (string haystack, string needle) { if (needle.length == 0) return SYSMIS; else { int limit = haystack.length - needle.length + 1; int i; for (i = limit; i >= 1; i--) if (!memcmp (&haystack.string[i - 1], needle.string, needle.length)) return i; return 0; } } function RINDEX (string haystack, string needles, needle_len_d) { if (needle_len_d <= 0 || needle_len_d >= INT_MAX || (int) needle_len_d != needle_len_d || needles.length == 0) return SYSMIS; else { int needle_len = needle_len_d; if (needle_len < 0 || needle_len > needles.length || needles.length % needle_len != 0) return SYSMIS; else { int limit = haystack.length - needle_len + 1; int i, j; for (i = limit; i >= 1; i--) for (j = 0; j < needles.length; j += needle_len) if (!memcmp (&haystack.string[i - 1], &needles.string[j], needle_len)) return i; return 0; } } } function LENGTH (string s) { return s.length; } string function LOWER (string s) { int i; for (i = 0; i < s.length; i++) s.string[i] = tolower ((unsigned char) s.string[i]); return s; } function MBLEN.BYTE (string s, idx) { if (idx < 0 || idx >= s.length || (int) idx != idx) return SYSMIS; else return 1; } string function UPCASE (string s) { int i; for (i = 0; i < s.length; i++) s.string[i] = toupper ((unsigned char) s.string[i]); return s; } absorb_miss string function LPAD (string s, n) expression e; { if (n < 0 || n > MAX_STRING || (int) n != n) return empty_string; else if (s.length >= n) return s; else { struct substring t = alloc_string (e, n); memset (t.string, ' ', n - s.length); memcpy (&t.string[(int) n - s.length], s.string, s.length); return t; } } absorb_miss string function LPAD (string s, n, string c) expression e; { if (n < 0 || n > MAX_STRING || (int) n != n || c.length != 1) return empty_string; else if (s.length >= n) return s; else { struct substring t = alloc_string (e, n); memset (t.string, c.string[0], n - s.length); memcpy (&t.string[(int) n - s.length], s.string, s.length); return t; } } string function REPLACE (string haystack, string needle, string replacement) expression e; = replace_string (e, haystack, needle, replacement, DBL_MAX); absorb_miss string function REPLACE (string haystack, string needle, string replacement, n) expression e; = replace_string (e, haystack, needle, replacement, n); absorb_miss string function RPAD (string s, n) expression e; { if (n < 0 || n > MAX_STRING || (int) n != n) return empty_string; else if (s.length >= n) return s; else { struct substring t = alloc_string (e, n); memcpy (t.string, s.string, s.length); memset (&t.string[s.length], ' ', n - s.length); return t; } } absorb_miss string function RPAD (string s, n, string c) expression e; { if (n < 0 || n > MAX_STRING || (int) n != n || c.length != 1) return empty_string; else if (s.length >= n) return s; else { struct substring t = alloc_string (e, n); memcpy (t.string, s.string, s.length); memset (&t.string[s.length], c.string[0], n - s.length); return t; } } string function LTRIM (string s) { while (s.length > 0 && s.string[0] == ' ') { s.length--; s.string++; } return s; } string function LTRIM (string s, string c) { if (c.length == 1) { while (s.length > 0 && s.string[0] == c.string[0]) { s.length--; s.string++; } return s; } else return empty_string; } string function RTRIM (string s) { while (s.length > 0 && s.string[s.length - 1] == ' ') s.length--; return s; } string function RTRIM (string s, string c) { if (c.length == 1) { while (s.length > 0 && s.string[s.length - 1] == c.string[0]) s.length--; return s; } else return empty_string; } function NUMBER (string s, ni_format f) { union value out; char *error; if (s.length > f->w) s.length = f->w; error = data_in (s, C_ENCODING, f->type, &out, 0, NULL); if (error == NULL) data_in_imply_decimals (s, C_ENCODING, f->type, f->d, &out); else { msg (SE, "Cannot parse `%.*s' as format %s: %s", (int) s.length, s.string, fmt_name (f->type), error); free (error); } return out.f; } absorb_miss string function STRING (x, no_format f) expression e; { union value v; struct substring dst; char *s; v.f = x; assert (!fmt_is_string (f->type)); s = data_out (&v, C_ENCODING, f); dst = alloc_string (e, strlen (s)); strcpy (dst.string, s); free (s); return dst; } absorb_miss string function STRUNC (string s, n) { if (n < 1 || n == SYSMIS) return empty_string; if (n < s.length) s.length = n; while (s.length > 0 && s.string[s.length - 1] == ' ') s.length--; return s; } absorb_miss string function SUBSTR (string s, ofs) expression e; { if (ofs >= 1 && ofs <= s.length && (int) ofs == ofs) return copy_string (e, &s.string[(int) ofs - 1], s.length - ofs + 1); else return empty_string; } absorb_miss string function SUBSTR (string s, ofs, cnt) expression e; { if (ofs >= 1 && ofs <= s.length && (int) ofs == ofs && cnt >= 1 && cnt <= INT_MAX && (int) cnt == cnt) { int cnt_max = s.length - (int) ofs + 1; return copy_string (e, &s.string[(int) ofs - 1], cnt <= cnt_max ? cnt : cnt_max); } else return empty_string; } absorb_miss no_opt no_abbrev string function VALUELABEL (var v) expression e; case c; { const char *label = var_lookup_value_label (v, case_data (c, v)); if (label != NULL) return copy_string (e, label, strlen (label)); else return empty_string; } // Artificial. operator SQUARE (x) = x * x; boolean operator NUM_TO_BOOLEAN (x, string op_name) { if (x == 0. || x == 1. || x == SYSMIS) return x; if (!ss_is_empty (op_name)) msg (SE, _("An operand of the %.*s operator was found to have a value " "other than 0 (false), 1 (true), or the system-missing " "value. The result was forced to 0."), (int) op_name.length, op_name.string); else msg (SE, _("A logical expression was found to have a value other than 0 " "(false), 1 (true), or the system-missing value. The result " "was forced to 0.")); return 0.; } operator BOOLEAN_TO_NUM (boolean x) = x; // Beta distribution. function PDF.BETA (x >= 0 && x <= 1, a > 0, b > 0) = gsl_ran_beta_pdf (x, a, b); function CDF.BETA (x >= 0 && x <= 1, a > 0, b > 0) = gsl_cdf_beta_P (x, a, b); function IDF.BETA (P >= 0 && P <= 1, a > 0, b > 0) = gsl_cdf_beta_Pinv (P, a, b); no_opt function RV.BETA (a > 0, b > 0) = gsl_ran_beta (get_rng (), a, b); function NCDF.BETA (x >= 0, a > 0, b > 0, lambda > 0) = ncdf_beta (x, a, b, lambda); function NPDF.BETA (x >= 0, a > 0, b > 0, lambda > 0) = npdf_beta (x, a, b, lambda); // Bivariate normal distribution. function CDF.BVNOR (x0, x1, r >= -1 && r <= 1) = cdf_bvnor (x0, x1, r); function PDF.BVNOR (x0, x1, r >= -1 && r <= 1) = gsl_ran_bivariate_gaussian_pdf (x0, x1, 1, 1, r); // Cauchy distribution. function CDF.CAUCHY (x, a, b > 0) = gsl_cdf_cauchy_P ((x - a) / b, 1); function IDF.CAUCHY (P > 0 && P < 1, a, b > 0) = a + b * gsl_cdf_cauchy_Pinv (P, 1); function PDF.CAUCHY (x, a, b > 0) = gsl_ran_cauchy_pdf ((x - a) / b, 1) / b; no_opt function RV.CAUCHY (a, b > 0) = a + b * gsl_ran_cauchy (get_rng (), 1); // Chi-square distribution. function CDF.CHISQ (x >= 0, df > 0) = gsl_cdf_chisq_P (x, df); function IDF.CHISQ (P >= 0 && P < 1, df > 0) = gsl_cdf_chisq_Pinv (P, df); function PDF.CHISQ (x >= 0, df > 0) = gsl_ran_chisq_pdf (x, df); no_opt function RV.CHISQ (df > 0) = gsl_ran_chisq (get_rng (), df); function NCDF.CHISQ (x >= 0, df > 0, c) = unimplemented; function NPDF.CHISQ (x >= 0, df > 0, c) = unimplemented; function SIG.CHISQ (x >= 0, df > 0) = gsl_cdf_chisq_Q (x, df); // Exponential distribution. function CDF.EXP (x >= 0, a > 0) = gsl_cdf_exponential_P (x, 1. / a); function IDF.EXP (P >= 0 && P < 1, a > 0) = gsl_cdf_exponential_Pinv (P, 1. / a); function PDF.EXP (x >= 0, a > 0) = gsl_ran_exponential_pdf (x, 1. / a); no_opt function RV.EXP (a > 0) = gsl_ran_exponential (get_rng (), 1. / a); // Exponential power distribution. extension function PDF.XPOWER (x, a > 0, b >= 0) = gsl_ran_exppow_pdf (x, a, b); no_opt extension function RV.XPOWER (a > 0, b >= 0) = gsl_ran_exppow (get_rng (), a, b); // F distribution. function CDF.F (x >= 0, df1 > 0, df2 > 0) = gsl_cdf_fdist_P (x, df1, df2); function IDF.F (P >= 0 && P < 1, df1 > 0, df2 > 0) = idf_fdist (P, df1, df2); function PDF.F (x >= 0, df1 > 0, df2 > 0) = gsl_ran_fdist_pdf (x, df1, df2); no_opt function RV.F (df1 > 0, df2 > 0) = gsl_ran_fdist (get_rng (), df1, df2); function NCDF.F (x >= 0, df1 > 0, df2 > 0, lambda >= 0) = unimplemented; function NPDF.F (x >= 0, df1 > 0, df2 > 0, lmabda >= 0) = unimplemented; function SIG.F (x >= 0, df1 > 0, df2 > 0) = gsl_cdf_fdist_Q (x, df1, df2); // Gamma distribution. function CDF.GAMMA (x >= 0, a > 0, b > 0) = gsl_cdf_gamma_P (x, a, 1. / b); function IDF.GAMMA (P >= 0 && P <= 1, a > 0, b > 0) = gsl_cdf_gamma_Pinv (P, a, 1. / b); function PDF.GAMMA (x >= 0, a > 0, b > 0) = gsl_ran_gamma_pdf (x, a, 1. / b); no_opt function RV.GAMMA (a > 0, b > 0) = gsl_ran_gamma (get_rng (), a, 1. / b); // Half-normal distribution. function CDF.HALFNRM (x, a, b > 0) = unimplemented; function IDF.HALFNRM (P > 0 && P < 1, a, b > 0) = unimplemented; function PDF.HALFNRM (x, a, b > 0) = unimplemented; no_opt function RV.HALFNRM (a, b > 0) = unimplemented; // Inverse Gaussian distribution. function CDF.IGAUSS (x > 0, a > 0, b > 0) = unimplemented; function IDF.IGAUSS (P >= 0 && P < 1, a > 0, b > 0) = unimplemented; function PDF.IGAUSS (x > 0, a > 0, b > 0) = unimplemented; no_opt function RV.IGAUSS (a > 0, b > 0) = unimplemented; // Landau distribution. extension function PDF.LANDAU (x) = gsl_ran_landau_pdf (x); no_opt extension function RV.LANDAU () = gsl_ran_landau (get_rng ()); // Laplace distribution. function CDF.LAPLACE (x, a, b > 0) = gsl_cdf_laplace_P ((x - a) / b, 1); function IDF.LAPLACE (P > 0 && P < 1, a, b > 0) = a + b * gsl_cdf_laplace_Pinv (P, 1); function PDF.LAPLACE (x, a, b > 0) = gsl_ran_laplace_pdf ((x - a) / b, 1) / b; no_opt function RV.LAPLACE (a, b > 0) = a + b * gsl_ran_laplace (get_rng (), 1); // Levy alpha-stable distribution. no_opt extension function RV.LEVY (c, alpha > 0 && alpha <= 2) = gsl_ran_levy (get_rng (), c, alpha); // Levy skew alpha-stable distribution. no_opt extension function RV.LVSKEW (c, alpha > 0 && alpha <= 2, beta >= -1 && beta <= 1) = gsl_ran_levy_skew (get_rng (), c, alpha, beta); // Logistic distribution. function CDF.LOGISTIC (x, a, b > 0) = gsl_cdf_logistic_P ((x - a) / b, 1); function IDF.LOGISTIC (P > 0 && P < 1, a, b > 0) = a + b * gsl_cdf_logistic_Pinv (P, 1); function PDF.LOGISTIC (x, a, b > 0) = gsl_ran_logistic_pdf ((x - a) / b, 1) / b; no_opt function RV.LOGISTIC (a, b > 0) = a + b * gsl_ran_logistic (get_rng (), 1); // Lognormal distribution. function CDF.LNORMAL (x >= 0, m > 0, s > 0) = gsl_cdf_lognormal_P (x, log (m), s); function IDF.LNORMAL (P >= 0 && P < 1, m > 0, s > 0) = gsl_cdf_lognormal_Pinv (P, log (m), s); function PDF.LNORMAL (x >= 0, m > 0, s > 0) = gsl_ran_lognormal_pdf (x, log (m), s); no_opt function RV.LNORMAL (m > 0, s > 0) = gsl_ran_lognormal (get_rng (), log (m), s); // Normal distribution. function CDF.NORMAL (x, u, s > 0) = gsl_cdf_gaussian_P (x - u, s); function IDF.NORMAL (P > 0 && P < 1, u, s > 0) = u + gsl_cdf_gaussian_Pinv (P, s); function PDF.NORMAL (x, u, s > 0) = gsl_ran_gaussian_pdf ((x - u) / s, 1) / s; no_opt function RV.NORMAL (u, s > 0) = u + gsl_ran_gaussian (get_rng (), s); function CDFNORM (x) = gsl_cdf_ugaussian_P (x); function PROBIT (P > 0 && P < 1) = gsl_cdf_ugaussian_Pinv (P); no_opt function NORMAL (s > 0) = gsl_ran_gaussian (get_rng (), s); // Normal tail distribution. function PDF.NTAIL (x, a > 0, sigma > 0) = gsl_ran_gaussian_tail_pdf (x, a, sigma); no_opt function RV.NTAIL (a > 0, sigma > 0) = gsl_ran_gaussian_tail (get_rng (), a, sigma); // Pareto distribution. function CDF.PARETO (x >= a, a > 0, b > 0) = gsl_cdf_pareto_P (x, b, a); function IDF.PARETO (P >= 0 && P < 1, a > 0, b > 0) = gsl_cdf_pareto_Pinv (P, b, a); function PDF.PARETO (x >= a, a > 0, b > 0) = gsl_ran_pareto_pdf (x, b, a); no_opt function RV.PARETO (a > 0, b > 0) = gsl_ran_pareto (get_rng (), b, a); // Rayleigh distribution. extension function CDF.RAYLEIGH (x, sigma > 0) = gsl_cdf_rayleigh_P (x, sigma); extension function IDF.RAYLEIGH (P >= 0 && P <= 1, sigma > 0) = gsl_cdf_rayleigh_Pinv (P, sigma); extension function PDF.RAYLEIGH (x, sigma > 0) = gsl_ran_rayleigh_pdf (x, sigma); no_opt extension function RV.RAYLEIGH (sigma > 0) = gsl_ran_rayleigh (get_rng (), sigma); // Rayleigh tail distribution. extension function PDF.RTAIL (x, a, sigma) = gsl_ran_rayleigh_tail_pdf (x, a, sigma); no_opt extension function RV.RTAIL (a, sigma) = gsl_ran_rayleigh_tail (get_rng (), a, sigma); // Studentized maximum modulus distribution. function CDF.SMOD (x > 0, a >= 1, b >= 1) = unimplemented; function IDF.SMOD (P >= 0 && P < 1, a >= 1, b >= 1) = unimplemented; // Studentized range distribution. function CDF.SRANGE (x > 0, a >= 1, b >= 1) = unimplemented; function IDF.SRANGE (P >= 0 && P < 1, a >= 1, b >= 1) = unimplemented; // Student t distribution. function CDF.T (x, df > 0) = gsl_cdf_tdist_P (x, df); function IDF.T (P > 0 && P < 1, df > 0) = gsl_cdf_tdist_Pinv (P, df); function PDF.T (x, df > 0) = gsl_ran_tdist_pdf (x, df); no_opt function RV.T (df > 0) = gsl_ran_tdist (get_rng (), df); function NCDF.T (x, df > 0, nc) = unimplemented; function NPDF.T (x, df > 0, nc) = unimplemented; // Type-1 Gumbel distribution. extension function CDF.T1G (x, a, b) = gsl_cdf_gumbel1_P (x, a, b); extension function IDF.T1G (P >= 0 && P <= 1, a, b) = gsl_cdf_gumbel1_P (P, a, b); extension function PDF.T1G (x, a, b) = gsl_ran_gumbel1_pdf (x, a, b); no_opt extension function RV.T1G (a, b) = gsl_ran_gumbel1 (get_rng (), a, b); // Type-2 Gumbel distribution. extension function CDF.T2G (x, a, b) = gsl_cdf_gumbel2_P (x, a, b); extension function IDF.T2G (P >= 0 && P <= 1, a, b) = gsl_cdf_gumbel2_P (P, a, b); extension function PDF.T2G (x, a, b) = gsl_ran_gumbel2_pdf (x, a, b); no_opt extension function RV.T2G (a, b) = gsl_ran_gumbel2 (get_rng (), a, b); // Uniform distribution. function CDF.UNIFORM (x <= b, a <= x, b) = gsl_cdf_flat_P (x, a, b); function IDF.UNIFORM (P >= 0 && P <= 1, a <= b, b) = gsl_cdf_flat_Pinv (P, a, b); function PDF.UNIFORM (x <= b, a <= x, b) = gsl_ran_flat_pdf (x, a, b); no_opt function RV.UNIFORM (a <= b, b) = gsl_ran_flat (get_rng (), a, b); no_opt function UNIFORM (b >= 0) = gsl_ran_flat (get_rng (), 0, b); // Weibull distribution. function CDF.WEIBULL (x >= 0, a > 0, b > 0) = gsl_cdf_weibull_P (x, a, b); function IDF.WEIBULL (P >= 0 && P < 1, a > 0, b > 0) = gsl_cdf_weibull_Pinv (P, a, b); function PDF.WEIBULL (x >= 0, a > 0, b > 0) = gsl_ran_weibull_pdf (x, a, b); no_opt function RV.WEIBULL (a > 0, b > 0) = gsl_ran_weibull (get_rng (), a, b); // Bernoulli distribution. function CDF.BERNOULLI (k == 0 || k == 1, p >= 0 && p <= 1) = k ? 1 : 1 - p; function PDF.BERNOULLI (k == 0 || k == 1, p >= 0 && p <= 1) = gsl_ran_bernoulli_pdf (k, p); no_opt function RV.BERNOULLI (p >= 0 && p <= 1) = gsl_ran_bernoulli (get_rng (), p); // Binomial distribution. function CDF.BINOM (k, n > 0 && n == floor (n), p >= 0 && p <= 1) = gsl_cdf_binomial_P (k, p, n); function PDF.BINOM (k >= 0 && k == floor (k) && k <= n, n > 0 && n == floor (n), p >= 0 && p <= 1) = gsl_ran_binomial_pdf (k, p, n); no_opt function RV.BINOM (p > 0 && p == floor (p), n >= 0 && n <= 1) = gsl_ran_binomial (get_rng (), p, n); // Geometric distribution. function CDF.GEOM (k >= 1 && k == floor (k), p >= 0 && p <= 1) = gsl_cdf_geometric_P (k, p); function PDF.GEOM (k >= 1 && k == floor (k), p >= 0 && p <= 1) = gsl_ran_geometric_pdf (k, p); no_opt function RV.GEOM (p >= 0 && p <= 1) = gsl_ran_geometric (get_rng (), p); // Hypergeometric distribution. function CDF.HYPER (k >= 0 && k == floor (k) && k <= c, a > 0 && a == floor (a), b > 0 && b == floor (b) && b <= a, c > 0 && c == floor (c) && c <= a) = gsl_cdf_hypergeometric_P (k, c, a - c, b); function PDF.HYPER (k >= 0 && k == floor (k) && k <= c, a > 0 && a == floor (a), b > 0 && b == floor (b) && b <= a, c > 0 && c == floor (c) && c <= a) = gsl_ran_hypergeometric_pdf (k, c, a - c, b); no_opt function RV.HYPER (a > 0 && a == floor (a), b > 0 && b == floor (b) && b <= a, c > 0 && c == floor (c) && c <= a) = gsl_ran_hypergeometric (get_rng (), c, a - c, b); // Logarithmic distribution. extension function PDF.LOG (k >= 1, p > 0 && p <= 1) = gsl_ran_logarithmic_pdf (k, p); no_opt extension function RV.LOG (p > 0 && p <= 1) = gsl_ran_logarithmic (get_rng (), p); // Negative binomial distribution. function CDF.NEGBIN (k >= 1, n == floor (n), p > 0 && p <= 1) = gsl_cdf_negative_binomial_P (k, p, n); function PDF.NEGBIN (k >= 1, n == floor (n), p > 0 && p <= 1) = gsl_ran_negative_binomial_pdf (k, p, n); no_opt function RV.NEGBIN (n == floor (n), p > 0 && p <= 1) = gsl_ran_negative_binomial (get_rng (), p, n); // Poisson distribution. function CDF.POISSON (k >= 0 && k == floor (k), mu > 0) = gsl_cdf_poisson_P (k, mu); function PDF.POISSON (k >= 0 && k == floor (k), mu > 0) = gsl_ran_poisson_pdf (k, mu); no_opt function RV.POISSON (mu > 0) = gsl_ran_poisson (get_rng (), mu); // Weirdness. absorb_miss boolean function MISSING (x) = x == SYSMIS || !finite (x); absorb_miss boolean function SYSMIS (x) = x == SYSMIS || !finite (x); no_opt boolean function SYSMIS (num_var v) case c; { return case_num (c, v) == SYSMIS; } no_opt boolean function VALUE (num_var v) case c; { return case_num (c, v); } no_opt operator VEC_ELEM_NUM (idx) vector v; case c; { if (idx >= 1 && idx <= vector_get_var_cnt (v)) { const struct variable *var = vector_get_var (v, (size_t) idx - 1); double value = case_num (c, var); return !var_is_num_missing (var, value, MV_USER) ? value : SYSMIS; } else { if (idx == SYSMIS) msg (SE, _("SYSMIS is not a valid index value for vector " "%s. The result will be set to SYSMIS."), vector_get_name (v)); else msg (SE, _("%g is not a valid index value for vector %s. " "The result will be set to SYSMIS."), idx, vector_get_name (v)); return SYSMIS; } } absorb_miss no_opt string operator VEC_ELEM_STR (idx) expression e; vector v; case c; { if (idx >= 1 && idx <= vector_get_var_cnt (v)) { struct variable *var = vector_get_var (v, (size_t) idx - 1); return copy_string (e, CHAR_CAST_BUG (char *, case_str (c, var)), var_get_width (var)); } else { if (idx == SYSMIS) msg (SE, _("SYSMIS is not a valid index value for vector " "%s. The result will be set to the empty string."), vector_get_name (v)); else msg (SE, _("%g is not a valid index value for vector %s. " "The result will be set to the empty string."), idx, vector_get_name (v)); return empty_string; } } // Terminals. no_opt operator NUM_VAR () case c; num_var v; { double d = case_num (c, v); return !var_is_num_missing (v, d, MV_USER) ? d : SYSMIS; } no_opt string operator STR_VAR () case c; expression e; str_var v; { struct substring s = alloc_string (e, var_get_width (v)); memcpy (s.string, case_str (c, v), var_get_width (v)); return s; } no_opt perm_only function LAG (num_var v, pos_int n_before) dataset ds; { const struct ccase *c = lagged_case (ds, n_before); if (c != NULL) { double x = case_num (c, v); return !var_is_num_missing (v, x, MV_USER) ? x : SYSMIS; } else return SYSMIS; } no_opt perm_only function LAG (num_var v) dataset ds; { const struct ccase *c = lagged_case (ds, 1); if (c != NULL) { double x = case_num (c, v); return !var_is_num_missing (v, x, MV_USER) ? x : SYSMIS; } else return SYSMIS; } no_opt perm_only string function LAG (str_var v, pos_int n_before) expression e; dataset ds; { const struct ccase *c = lagged_case (ds, n_before); if (c != NULL) return copy_string (e, CHAR_CAST_BUG (char *, case_str (c, v)), var_get_width (v)); else return empty_string; } no_opt perm_only string function LAG (str_var v) expression e; dataset ds; { const struct ccase *c = lagged_case (ds, 1); if (c != NULL) return copy_string (e, CHAR_CAST_BUG (char *, case_str (c, v)), var_get_width (v)); else return empty_string; } no_opt operator NUM_SYS () case c; num_var v; { return case_num (c, v) == SYSMIS; } no_opt operator NUM_VAL () case c; num_var v; { return case_num (c, v); } no_opt operator CASENUM () case_idx idx; { return idx; } pspp-1.0.1/src/language/expressions/parse.c0000644000175000017500000012617712523704223015644 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010, 2011, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "private.h" #include #include #include #include #include "data/case.h" #include "data/dictionary.h" #include "data/settings.h" #include "data/variable.h" #include "language/expressions/helpers.h" #include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/c-strcase.h" #include "gl/xalloc.h" /* Declarations. */ /* Recursive descent parser in order of increasing precedence. */ typedef union any_node *parse_recursively_func (struct lexer *, struct expression *); static parse_recursively_func parse_or, parse_and, parse_not; static parse_recursively_func parse_rel, parse_add, parse_mul; static parse_recursively_func parse_neg, parse_exp; static parse_recursively_func parse_primary; static parse_recursively_func parse_vector_element, parse_function; /* Utility functions. */ static struct expression *expr_create (struct dataset *ds); atom_type expr_node_returns (const union any_node *); static const char *atom_type_name (atom_type); static struct expression *finish_expression (union any_node *, struct expression *); static bool type_check (struct expression *, union any_node **, enum expr_type expected_type); static union any_node *allocate_unary_variable (struct expression *, const struct variable *); /* Public functions. */ /* Parses an expression of the given TYPE. If DICT is nonnull then variables and vectors within it may be referenced within the expression; otherwise, the expression must not reference any variables or vectors. Returns the new expression if successful or a null pointer otherwise. */ struct expression * expr_parse (struct lexer *lexer, struct dataset *ds, enum expr_type type) { union any_node *n; struct expression *e; assert (type == EXPR_NUMBER || type == EXPR_STRING || type == EXPR_BOOLEAN); e = expr_create (ds); n = parse_or (lexer, e); if (n != NULL && type_check (e, &n, type)) return finish_expression (expr_optimize (n, e), e); else { expr_free (e); return NULL; } } /* Parses and returns an expression of the given TYPE, as expr_parse(), and sets up so that destroying POOL will free the expression as well. */ struct expression * expr_parse_pool (struct lexer *lexer, struct pool *pool, struct dataset *ds, enum expr_type type) { struct expression *e = expr_parse (lexer, ds, type); if (e != NULL) pool_add_subpool (pool, e->expr_pool); return e; } /* Free expression E. */ void expr_free (struct expression *e) { if (e != NULL) pool_destroy (e->expr_pool); } struct expression * expr_parse_any (struct lexer *lexer, struct dataset *ds, bool optimize) { union any_node *n; struct expression *e; e = expr_create (ds); n = parse_or (lexer, e); if (n == NULL) { expr_free (e); return NULL; } if (optimize) n = expr_optimize (n, e); return finish_expression (n, e); } /* Finishing up expression building. */ /* Height of an expression's stacks. */ struct stack_heights { int number_height; /* Height of number stack. */ int string_height; /* Height of string stack. */ }; /* Stack heights used by different kinds of arguments. */ static const struct stack_heights on_number_stack = {1, 0}; static const struct stack_heights on_string_stack = {0, 1}; static const struct stack_heights not_on_stack = {0, 0}; /* Returns the stack heights used by an atom of the given TYPE. */ static const struct stack_heights * atom_type_stack (atom_type type) { assert (is_atom (type)); switch (type) { case OP_number: case OP_boolean: return &on_number_stack; case OP_string: return &on_string_stack; case OP_format: case OP_ni_format: case OP_no_format: case OP_num_var: case OP_str_var: case OP_integer: case OP_pos_int: case OP_vector: return ¬_on_stack; default: NOT_REACHED (); } } /* Measures the stack height needed for node N, supposing that the stack height is initially *HEIGHT and updating *HEIGHT to the final stack height. Updates *MAX, if necessary, to reflect the maximum intermediate or final height. */ static void measure_stack (const union any_node *n, struct stack_heights *height, struct stack_heights *max) { const struct stack_heights *return_height; if (is_composite (n->type)) { struct stack_heights args; int i; args = *height; for (i = 0; i < n->composite.arg_cnt; i++) measure_stack (n->composite.args[i], &args, max); return_height = atom_type_stack (operations[n->type].returns); } else return_height = atom_type_stack (n->type); height->number_height += return_height->number_height; height->string_height += return_height->string_height; if (height->number_height > max->number_height) max->number_height = height->number_height; if (height->string_height > max->string_height) max->string_height = height->string_height; } /* Allocates stacks within E sufficient for evaluating node N. */ static void allocate_stacks (union any_node *n, struct expression *e) { struct stack_heights initial = {0, 0}; struct stack_heights max = {0, 0}; measure_stack (n, &initial, &max); e->number_stack = pool_alloc (e->expr_pool, sizeof *e->number_stack * max.number_height); e->string_stack = pool_alloc (e->expr_pool, sizeof *e->string_stack * max.string_height); } /* Finalizes expression E for evaluating node N. */ static struct expression * finish_expression (union any_node *n, struct expression *e) { /* Allocate stacks. */ allocate_stacks (n, e); /* Output postfix representation. */ expr_flatten (n, e); /* The eval_pool might have been used for allocating strings during optimization. We need to keep those strings around for all subsequent evaluations, so start a new eval_pool. */ e->eval_pool = pool_create_subpool (e->expr_pool); return e; } /* Verifies that expression E, whose root node is *N, can be converted to type EXPECTED_TYPE, inserting a conversion at *N if necessary. Returns true if successful, false on failure. */ static bool type_check (struct expression *e, union any_node **n, enum expr_type expected_type) { atom_type actual_type = expr_node_returns (*n); switch (expected_type) { case EXPR_BOOLEAN: case EXPR_NUMBER: if (actual_type != OP_number && actual_type != OP_boolean) { msg (SE, _("Type mismatch: expression has %s type, " "but a numeric value is required here."), atom_type_name (actual_type)); return false; } if (actual_type == OP_number && expected_type == EXPR_BOOLEAN) *n = expr_allocate_binary (e, OP_NUM_TO_BOOLEAN, *n, expr_allocate_string (e, ss_empty ())); break; case EXPR_STRING: if (actual_type != OP_string) { msg (SE, _("Type mismatch: expression has %s type, " "but a string value is required here."), atom_type_name (actual_type)); return false; } break; default: NOT_REACHED (); } return true; } /* Recursive-descent expression parser. */ /* Considers whether *NODE may be coerced to type REQUIRED_TYPE. Returns true if possible, false if disallowed. If DO_COERCION is false, then *NODE is not modified and there are no side effects. If DO_COERCION is true, we perform the coercion if possible, modifying *NODE if necessary. If the coercion is not possible then we free *NODE and set *NODE to a null pointer. This function's interface is somewhat awkward. Use one of the wrapper functions type_coercion(), type_coercion_assert(), or is_coercible() instead. */ static bool type_coercion_core (struct expression *e, atom_type required_type, union any_node **node, const char *operator_name, bool do_coercion) { atom_type actual_type; assert (!!do_coercion == (e != NULL)); if (*node == NULL) { /* Propagate error. Whatever caused the original error already emitted an error message. */ return false; } actual_type = expr_node_returns (*node); if (actual_type == required_type) { /* Type match. */ return true; } switch (required_type) { case OP_number: if (actual_type == OP_boolean) { /* To enforce strict typing rules, insert Boolean to numeric "conversion". This conversion is a no-op, so it will be removed later. */ if (do_coercion) *node = expr_allocate_unary (e, OP_BOOLEAN_TO_NUM, *node); return true; } break; case OP_string: /* No coercion to string. */ break; case OP_boolean: if (actual_type == OP_number) { /* Convert numeric to boolean. */ if (do_coercion) { union any_node *op_name; op_name = expr_allocate_string (e, ss_cstr (operator_name)); *node = expr_allocate_binary (e, OP_NUM_TO_BOOLEAN, *node, op_name); } return true; } break; case OP_format: NOT_REACHED (); case OP_ni_format: msg_disable (); if ((*node)->type == OP_format && fmt_check_input (&(*node)->format.f) && fmt_check_type_compat (&(*node)->format.f, VAL_NUMERIC)) { msg_enable (); if (do_coercion) (*node)->type = OP_ni_format; return true; } msg_enable (); break; case OP_no_format: msg_disable (); if ((*node)->type == OP_format && fmt_check_output (&(*node)->format.f) && fmt_check_type_compat (&(*node)->format.f, VAL_NUMERIC)) { msg_enable (); if (do_coercion) (*node)->type = OP_no_format; return true; } msg_enable (); break; case OP_num_var: if ((*node)->type == OP_NUM_VAR) { if (do_coercion) *node = (*node)->composite.args[0]; return true; } break; case OP_str_var: if ((*node)->type == OP_STR_VAR) { if (do_coercion) *node = (*node)->composite.args[0]; return true; } break; case OP_var: if ((*node)->type == OP_NUM_VAR || (*node)->type == OP_STR_VAR) { if (do_coercion) *node = (*node)->composite.args[0]; return true; } break; case OP_pos_int: if ((*node)->type == OP_number && floor ((*node)->number.n) == (*node)->number.n && (*node)->number.n > 0 && (*node)->number.n < INT_MAX) { if (do_coercion) *node = expr_allocate_pos_int (e, (*node)->number.n); return true; } break; default: NOT_REACHED (); } if (do_coercion) { msg (SE, _("Type mismatch while applying %s operator: " "cannot convert %s to %s."), operator_name, atom_type_name (actual_type), atom_type_name (required_type)); *node = NULL; } return false; } /* Coerces *NODE to type REQUIRED_TYPE, and returns success. If *NODE cannot be coerced to the desired type then we issue an error message about operator OPERATOR_NAME and free *NODE. */ static bool type_coercion (struct expression *e, atom_type required_type, union any_node **node, const char *operator_name) { return type_coercion_core (e, required_type, node, operator_name, true); } /* Coerces *NODE to type REQUIRED_TYPE. Assert-fails if the coercion is disallowed. */ static void type_coercion_assert (struct expression *e, atom_type required_type, union any_node **node) { int success = type_coercion_core (e, required_type, node, NULL, true); assert (success); } /* Returns true if *NODE may be coerced to type REQUIRED_TYPE, false otherwise. */ static bool is_coercible (atom_type required_type, union any_node *const *node) { return type_coercion_core (NULL, required_type, (union any_node **) node, NULL, false); } /* Returns true if ACTUAL_TYPE is a kind of REQUIRED_TYPE, false otherwise. */ static bool is_compatible (atom_type required_type, atom_type actual_type) { return (required_type == actual_type || (required_type == OP_var && (actual_type == OP_num_var || actual_type == OP_str_var))); } /* How to parse an operator. */ struct operator { int token; /* Token representing operator. */ operation_type type; /* Operation type representing operation. */ const char *name; /* Name of operator. */ }; /* Attempts to match the current token against the tokens for the OP_CNT operators in OPS[]. If successful, returns true and, if OPERATOR is non-null, sets *OPERATOR to the operator. On failure, returns false and, if OPERATOR is non-null, sets *OPERATOR to a null pointer. */ static bool match_operator (struct lexer *lexer, const struct operator ops[], size_t op_cnt, const struct operator **operator) { const struct operator *op; for (op = ops; op < ops + op_cnt; op++) if (lex_token (lexer) == op->token) { if (op->token != T_NEG_NUM) lex_get (lexer); if (operator != NULL) *operator = op; return true; } if (operator != NULL) *operator = NULL; return false; } static bool check_operator (const struct operator *op, int arg_cnt, atom_type arg_type) { const struct operation *o; size_t i; assert (op != NULL); o = &operations[op->type]; assert (o->arg_cnt == arg_cnt); assert ((o->flags & OPF_ARRAY_OPERAND) == 0); for (i = 0; i < arg_cnt; i++) assert (is_compatible (arg_type, o->args[i])); return true; } static bool check_binary_operators (const struct operator ops[], size_t op_cnt, atom_type arg_type) { size_t i; for (i = 0; i < op_cnt; i++) check_operator (&ops[i], 2, arg_type); return true; } static atom_type get_operand_type (const struct operator *op) { return operations[op->type].args[0]; } /* Parses a chain of left-associative operator/operand pairs. There are OP_CNT operators, specified in OPS[]. The operators' operands must all be the same type. The next higher level is parsed by PARSE_NEXT_LEVEL. If CHAIN_WARNING is non-null, then it will be issued as a warning if more than one operator/operand pair is parsed. */ static union any_node * parse_binary_operators (struct lexer *lexer, struct expression *e, union any_node *node, const struct operator ops[], size_t op_cnt, parse_recursively_func *parse_next_level, const char *chain_warning) { atom_type operand_type = get_operand_type (&ops[0]); int op_count; const struct operator *operator; assert (check_binary_operators (ops, op_cnt, operand_type)); if (node == NULL) return node; for (op_count = 0; match_operator (lexer, ops, op_cnt, &operator); op_count++) { union any_node *rhs; /* Convert the left-hand side to type OPERAND_TYPE. */ if (!type_coercion (e, operand_type, &node, operator->name)) return NULL; /* Parse the right-hand side and coerce to type OPERAND_TYPE. */ rhs = parse_next_level (lexer, e); if (!type_coercion (e, operand_type, &rhs, operator->name)) return NULL; node = expr_allocate_binary (e, operator->type, node, rhs); } if (op_count > 1 && chain_warning != NULL) msg (SW, "%s", chain_warning); return node; } static union any_node * parse_inverting_unary_operator (struct lexer *lexer, struct expression *e, const struct operator *op, parse_recursively_func *parse_next_level) { union any_node *node; unsigned op_count; check_operator (op, 1, get_operand_type (op)); op_count = 0; while (match_operator (lexer, op, 1, NULL)) op_count++; node = parse_next_level (lexer, e); if (op_count > 0 && type_coercion (e, get_operand_type (op), &node, op->name) && op_count % 2 != 0) return expr_allocate_unary (e, op->type, node); else return node; } /* Parses the OR level. */ static union any_node * parse_or (struct lexer *lexer, struct expression *e) { static const struct operator op = { T_OR, OP_OR, "logical disjunction (`OR')" }; return parse_binary_operators (lexer, e, parse_and (lexer, e), &op, 1, parse_and, NULL); } /* Parses the AND level. */ static union any_node * parse_and (struct lexer *lexer, struct expression *e) { static const struct operator op = { T_AND, OP_AND, "logical conjunction (`AND')" }; return parse_binary_operators (lexer, e, parse_not (lexer, e), &op, 1, parse_not, NULL); } /* Parses the NOT level. */ static union any_node * parse_not (struct lexer *lexer, struct expression *e) { static const struct operator op = { T_NOT, OP_NOT, "logical negation (`NOT')" }; return parse_inverting_unary_operator (lexer, e, &op, parse_rel); } /* Parse relational operators. */ static union any_node * parse_rel (struct lexer *lexer, struct expression *e) { const char *chain_warning = _("Chaining relational operators (e.g. `a < b < c') will " "not produce the mathematically expected result. " "Use the AND logical operator to fix the problem " "(e.g. `a < b AND b < c'). " "If chaining is really intended, parentheses will disable " "this warning (e.g. `(a < b) < c'.)"); union any_node *node = parse_add (lexer, e); if (node == NULL) return NULL; switch (expr_node_returns (node)) { case OP_number: case OP_boolean: { static const struct operator ops[] = { { T_EQUALS, OP_EQ, "numeric equality (`=')" }, { T_EQ, OP_EQ, "numeric equality (`EQ')" }, { T_GE, OP_GE, "numeric greater-than-or-equal-to (`>=')" }, { T_GT, OP_GT, "numeric greater than (`>')" }, { T_LE, OP_LE, "numeric less-than-or-equal-to (`<=')" }, { T_LT, OP_LT, "numeric less than (`<')" }, { T_NE, OP_NE, "numeric inequality (`<>')" }, }; return parse_binary_operators (lexer, e, node, ops, sizeof ops / sizeof *ops, parse_add, chain_warning); } case OP_string: { static const struct operator ops[] = { { T_EQUALS, OP_EQ_STRING, "string equality (`=')" }, { T_EQ, OP_EQ_STRING, "string equality (`EQ')" }, { T_GE, OP_GE_STRING, "string greater-than-or-equal-to (`>=')" }, { T_GT, OP_GT_STRING, "string greater than (`>')" }, { T_LE, OP_LE_STRING, "string less-than-or-equal-to (`<=')" }, { T_LT, OP_LT_STRING, "string less than (`<')" }, { T_NE, OP_NE_STRING, "string inequality (`<>')" }, }; return parse_binary_operators (lexer, e, node, ops, sizeof ops / sizeof *ops, parse_add, chain_warning); } default: return node; } } /* Parses the addition and subtraction level. */ static union any_node * parse_add (struct lexer *lexer, struct expression *e) { static const struct operator ops[] = { { T_PLUS, OP_ADD, "addition (`+')" }, { T_DASH, OP_SUB, "subtraction (`-')" }, { T_NEG_NUM, OP_ADD, "subtraction (`-')" }, }; return parse_binary_operators (lexer, e, parse_mul (lexer, e), ops, sizeof ops / sizeof *ops, parse_mul, NULL); } /* Parses the multiplication and division level. */ static union any_node * parse_mul (struct lexer *lexer, struct expression *e) { static const struct operator ops[] = { { T_ASTERISK, OP_MUL, "multiplication (`*')" }, { T_SLASH, OP_DIV, "division (`/')" }, }; return parse_binary_operators (lexer, e, parse_neg (lexer, e), ops, sizeof ops / sizeof *ops, parse_neg, NULL); } /* Parses the unary minus level. */ static union any_node * parse_neg (struct lexer *lexer, struct expression *e) { static const struct operator op = { T_DASH, OP_NEG, "negation (`-')" }; return parse_inverting_unary_operator (lexer, e, &op, parse_exp); } static union any_node * parse_exp (struct lexer *lexer, struct expression *e) { static const struct operator op = { T_EXP, OP_POW, "exponentiation (`**')" }; const char *chain_warning = _("The exponentiation operator (`**') is left-associative, " "even though right-associative semantics are more useful. " "That is, `a**b**c' equals `(a**b)**c', not as `a**(b**c)'. " "To disable this warning, insert parentheses."); union any_node *lhs, *node; bool negative = false; if (lex_token (lexer) == T_NEG_NUM) { lhs = expr_allocate_number (e, -lex_tokval (lexer)); negative = true; lex_get (lexer); } else lhs = parse_primary (lexer, e); node = parse_binary_operators (lexer, e, lhs, &op, 1, parse_primary, chain_warning); return negative ? expr_allocate_unary (e, OP_NEG, node) : node; } /* Parses system variables. */ static union any_node * parse_sysvar (struct lexer *lexer, struct expression *e) { if (lex_match_id (lexer, "$CASENUM")) return expr_allocate_nullary (e, OP_CASENUM); else if (lex_match_id (lexer, "$DATE")) { static const char *months[12] = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC", }; time_t last_proc_time = time_of_last_procedure (e->ds); struct tm *time; char temp_buf[10]; struct substring s; time = localtime (&last_proc_time); sprintf (temp_buf, "%02d %s %02d", abs (time->tm_mday) % 100, months[abs (time->tm_mon) % 12], abs (time->tm_year) % 100); ss_alloc_substring (&s, ss_cstr (temp_buf)); return expr_allocate_string (e, s); } else if (lex_match_id (lexer, "$TRUE")) return expr_allocate_boolean (e, 1.0); else if (lex_match_id (lexer, "$FALSE")) return expr_allocate_boolean (e, 0.0); else if (lex_match_id (lexer, "$SYSMIS")) return expr_allocate_number (e, SYSMIS); else if (lex_match_id (lexer, "$JDATE")) { time_t time = time_of_last_procedure (e->ds); struct tm *tm = localtime (&time); return expr_allocate_number (e, expr_ymd_to_ofs (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday)); } else if (lex_match_id (lexer, "$TIME")) { time_t time = time_of_last_procedure (e->ds); struct tm *tm = localtime (&time); return expr_allocate_number (e, expr_ymd_to_date (tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday) + tm->tm_hour * 60 * 60. + tm->tm_min * 60. + tm->tm_sec); } else if (lex_match_id (lexer, "$LENGTH")) return expr_allocate_number (e, settings_get_viewlength ()); else if (lex_match_id (lexer, "$WIDTH")) return expr_allocate_number (e, settings_get_viewwidth ()); else { msg (SE, _("Unknown system variable %s."), lex_tokcstr (lexer)); return NULL; } } /* Parses numbers, varnames, etc. */ static union any_node * parse_primary (struct lexer *lexer, struct expression *e) { switch (lex_token (lexer)) { case T_ID: if (lex_next_token (lexer, 1) == T_LPAREN) { /* An identifier followed by a left parenthesis may be a vector element reference. If not, it's a function call. */ if (e->ds != NULL && dict_lookup_vector (dataset_dict (e->ds), lex_tokcstr (lexer)) != NULL) return parse_vector_element (lexer, e); else return parse_function (lexer, e); } else if (lex_tokcstr (lexer)[0] == '$') { /* $ at the beginning indicates a system variable. */ return parse_sysvar (lexer, e); } else if (e->ds != NULL && dict_lookup_var (dataset_dict (e->ds), lex_tokcstr (lexer))) { /* It looks like a user variable. (It could be a format specifier, but we'll assume it's a variable unless proven otherwise. */ return allocate_unary_variable (e, parse_variable (lexer, dataset_dict (e->ds))); } else { /* Try to parse it as a format specifier. */ struct fmt_spec fmt; bool ok; msg_disable (); ok = parse_format_specifier (lexer, &fmt); msg_enable (); if (ok) return expr_allocate_format (e, &fmt); /* All attempts failed. */ msg (SE, _("Unknown identifier %s."), lex_tokcstr (lexer)); return NULL; } break; case T_POS_NUM: case T_NEG_NUM: { union any_node *node = expr_allocate_number (e, lex_tokval (lexer) ); lex_get (lexer); return node; } case T_STRING: { const char *dict_encoding; union any_node *node; char *s; dict_encoding = (e->ds != NULL ? dict_get_encoding (dataset_dict (e->ds)) : "UTF-8"); s = recode_string_pool (dict_encoding, "UTF-8", lex_tokcstr (lexer), ss_length (lex_tokss (lexer)), e->expr_pool); node = expr_allocate_string (e, ss_cstr (s)); lex_get (lexer); return node; } case T_LPAREN: { union any_node *node; lex_get (lexer); node = parse_or (lexer, e); if (node != NULL && !lex_force_match (lexer, T_RPAREN)) return NULL; return node; } default: lex_error (lexer, NULL); return NULL; } } static union any_node * parse_vector_element (struct lexer *lexer, struct expression *e) { const struct vector *vector; union any_node *element; /* Find vector, skip token. The caller must already have verified that the current token is the name of a vector. */ vector = dict_lookup_vector (dataset_dict (e->ds), lex_tokcstr (lexer)); assert (vector != NULL); lex_get (lexer); /* Skip left parenthesis token. The caller must have verified that the lookahead is a left parenthesis. */ assert (lex_token (lexer) == T_LPAREN); lex_get (lexer); element = parse_or (lexer, e); if (!type_coercion (e, OP_number, &element, "vector indexing") || !lex_match (lexer, T_RPAREN)) return NULL; return expr_allocate_binary (e, (vector_get_type (vector) == VAL_NUMERIC ? OP_VEC_ELEM_NUM : OP_VEC_ELEM_STR), element, expr_allocate_vector (e, vector)); } /* Individual function parsing. */ const struct operation operations[OP_first + OP_cnt] = { #include "parse.inc" }; static bool word_matches (const char **test, const char **name) { size_t test_len = strcspn (*test, "."); size_t name_len = strcspn (*name, "."); if (test_len == name_len) { if (buf_compare_case (*test, *name, test_len)) return false; } else if (test_len < 3 || test_len > name_len) return false; else { if (buf_compare_case (*test, *name, test_len)) return false; } *test += test_len; *name += name_len; if (**test != **name) return false; if (**test == '.') { (*test)++; (*name)++; } return true; } static int compare_names (const char *test, const char *name, bool abbrev_ok) { if (!abbrev_ok) return true; for (;;) { if (!word_matches (&test, &name)) return true; if (*name == '\0' && *test == '\0') return false; } } static int compare_strings (const char *test, const char *name, bool abbrev_ok UNUSED) { return c_strcasecmp (test, name); } static bool lookup_function_helper (const char *name, int (*compare) (const char *test, const char *name, bool abbrev_ok), const struct operation **first, const struct operation **last) { const struct operation *f; for (f = operations + OP_function_first; f <= operations + OP_function_last; f++) if (!compare (name, f->name, !(f->flags & OPF_NO_ABBREV))) { *first = f; while (f <= operations + OP_function_last && !compare (name, f->name, !(f->flags & OPF_NO_ABBREV))) f++; *last = f; return true; } return false; } static bool lookup_function (const char *name, const struct operation **first, const struct operation **last) { *first = *last = NULL; return (lookup_function_helper (name, compare_strings, first, last) || lookup_function_helper (name, compare_names, first, last)); } static int extract_min_valid (const char *s) { char *p = strrchr (s, '.'); if (p == NULL || p[1] < '0' || p[1] > '9' || strspn (p + 1, "0123456789") != strlen (p + 1)) return -1; *p = '\0'; return atoi (p + 1); } static atom_type function_arg_type (const struct operation *f, size_t arg_idx) { assert (arg_idx < f->arg_cnt || (f->flags & OPF_ARRAY_OPERAND)); return f->args[arg_idx < f->arg_cnt ? arg_idx : f->arg_cnt - 1]; } static bool match_function (union any_node **args, int arg_cnt, const struct operation *f) { size_t i; if (arg_cnt < f->arg_cnt || (arg_cnt > f->arg_cnt && (f->flags & OPF_ARRAY_OPERAND) == 0) || arg_cnt - (f->arg_cnt - 1) < f->array_min_elems) return false; for (i = 0; i < arg_cnt; i++) if (!is_coercible (function_arg_type (f, i), &args[i])) return false; return true; } static void coerce_function_args (struct expression *e, const struct operation *f, union any_node **args, size_t arg_cnt) { int i; for (i = 0; i < arg_cnt; i++) type_coercion_assert (e, function_arg_type (f, i), &args[i]); } static bool validate_function_args (const struct operation *f, int arg_cnt, int min_valid) { int array_arg_cnt = arg_cnt - (f->arg_cnt - 1); if (array_arg_cnt < f->array_min_elems) { msg (SE, _("%s must have at least %d arguments in list."), f->prototype, f->array_min_elems); return false; } if ((f->flags & OPF_ARRAY_OPERAND) && array_arg_cnt % f->array_granularity != 0) { if (f->array_granularity == 2) msg (SE, _("%s must have an even number of arguments in list."), f->prototype); else msg (SE, _("%s must have multiple of %d arguments in list."), f->prototype, f->array_granularity); return false; } if (min_valid != -1) { if (f->array_min_elems == 0) { assert ((f->flags & OPF_MIN_VALID) == 0); msg (SE, _("%s function does not accept a minimum valid " "argument count."), f->prototype); return false; } else { assert (f->flags & OPF_MIN_VALID); if (array_arg_cnt < f->array_min_elems) { msg (SE, _("%s requires at least %d valid arguments in list."), f->prototype, f->array_min_elems); return false; } else if (min_valid > array_arg_cnt) { msg (SE, _("With %s, " "using minimum valid argument count of %d " "does not make sense when passing only %d " "arguments in list."), f->prototype, min_valid, array_arg_cnt); return false; } } } return true; } static void add_arg (union any_node ***args, int *arg_cnt, int *arg_cap, union any_node *arg) { if (*arg_cnt >= *arg_cap) { *arg_cap += 8; *args = xrealloc (*args, sizeof **args * *arg_cap); } (*args)[(*arg_cnt)++] = arg; } static void put_invocation (struct string *s, const char *func_name, union any_node **args, size_t arg_cnt) { size_t i; ds_put_format (s, "%s(", func_name); for (i = 0; i < arg_cnt; i++) { if (i > 0) ds_put_cstr (s, ", "); ds_put_cstr (s, operations[expr_node_returns (args[i])].prototype); } ds_put_byte (s, ')'); } static void no_match (const char *func_name, union any_node **args, size_t arg_cnt, const struct operation *first, const struct operation *last) { struct string s; const struct operation *f; ds_init_empty (&s); if (last - first == 1) { ds_put_format (&s, _("Type mismatch invoking %s as "), first->prototype); put_invocation (&s, func_name, args, arg_cnt); } else { ds_put_cstr (&s, _("Function invocation ")); put_invocation (&s, func_name, args, arg_cnt); ds_put_cstr (&s, _(" does not match any known function. Candidates are:")); for (f = first; f < last; f++) ds_put_format (&s, "\n%s", f->prototype); } ds_put_byte (&s, '.'); msg (SE, "%s", ds_cstr (&s)); ds_destroy (&s); } static union any_node * parse_function (struct lexer *lexer, struct expression *e) { int min_valid; const struct operation *f, *first, *last; union any_node **args = NULL; int arg_cnt = 0; int arg_cap = 0; struct string func_name; union any_node *n; ds_init_substring (&func_name, lex_tokss (lexer)); min_valid = extract_min_valid (lex_tokcstr (lexer)); if (!lookup_function (lex_tokcstr (lexer), &first, &last)) { msg (SE, _("No function or vector named %s."), lex_tokcstr (lexer)); ds_destroy (&func_name); return NULL; } lex_get (lexer); if (!lex_force_match (lexer, T_LPAREN)) { ds_destroy (&func_name); return NULL; } args = NULL; arg_cnt = arg_cap = 0; if (lex_token (lexer) != T_RPAREN) for (;;) { if (lex_token (lexer) == T_ID && lex_next_token (lexer, 1) == T_TO) { const struct variable **vars; size_t var_cnt; size_t i; if (!parse_variables_const (lexer, dataset_dict (e->ds), &vars, &var_cnt, PV_SINGLE)) goto fail; for (i = 0; i < var_cnt; i++) add_arg (&args, &arg_cnt, &arg_cap, allocate_unary_variable (e, vars[i])); free (vars); } else { union any_node *arg = parse_or (lexer, e); if (arg == NULL) goto fail; add_arg (&args, &arg_cnt, &arg_cap, arg); } if (lex_match (lexer, T_RPAREN)) break; else if (!lex_match (lexer, T_COMMA)) { lex_error_expecting (lexer, "`,'", "`)'", NULL_SENTINEL); goto fail; } } for (f = first; f < last; f++) if (match_function (args, arg_cnt, f)) break; if (f >= last) { no_match (ds_cstr (&func_name), args, arg_cnt, first, last); goto fail; } coerce_function_args (e, f, args, arg_cnt); if (!validate_function_args (f, arg_cnt, min_valid)) goto fail; if ((f->flags & OPF_EXTENSION) && settings_get_syntax () == COMPATIBLE) msg (SW, _("%s is a PSPP extension."), f->prototype); if (f->flags & OPF_UNIMPLEMENTED) { msg (SE, _("%s is not available in this version of PSPP."), f->prototype); goto fail; } if ((f->flags & OPF_PERM_ONLY) && proc_in_temporary_transformations (e->ds)) { msg (SE, _("%s may not appear after %s."), f->prototype, "TEMPORARY"); goto fail; } n = expr_allocate_composite (e, f - operations, args, arg_cnt); n->composite.min_valid = min_valid != -1 ? min_valid : f->array_min_elems; if (n->type == OP_LAG_Vn || n->type == OP_LAG_Vs) dataset_need_lag (e->ds, 1); else if (n->type == OP_LAG_Vnn || n->type == OP_LAG_Vsn) { int n_before; assert (n->composite.arg_cnt == 2); assert (n->composite.args[1]->type == OP_pos_int); n_before = n->composite.args[1]->integer.i; dataset_need_lag (e->ds, n_before); } free (args); ds_destroy (&func_name); return n; fail: free (args); ds_destroy (&func_name); return NULL; } /* Utility functions. */ static struct expression * expr_create (struct dataset *ds) { struct pool *pool = pool_create (); struct expression *e = pool_alloc (pool, sizeof *e); e->expr_pool = pool; e->ds = ds; e->eval_pool = pool_create_subpool (e->expr_pool); e->ops = NULL; e->op_types = NULL; e->op_cnt = e->op_cap = 0; return e; } atom_type expr_node_returns (const union any_node *n) { assert (n != NULL); assert (is_operation (n->type)); if (is_atom (n->type)) return n->type; else if (is_composite (n->type)) return operations[n->type].returns; else NOT_REACHED (); } static const char * atom_type_name (atom_type type) { assert (is_atom (type)); return operations[type].name; } union any_node * expr_allocate_nullary (struct expression *e, operation_type op) { return expr_allocate_composite (e, op, NULL, 0); } union any_node * expr_allocate_unary (struct expression *e, operation_type op, union any_node *arg0) { return expr_allocate_composite (e, op, &arg0, 1); } union any_node * expr_allocate_binary (struct expression *e, operation_type op, union any_node *arg0, union any_node *arg1) { union any_node *args[2]; args[0] = arg0; args[1] = arg1; return expr_allocate_composite (e, op, args, 2); } static bool is_valid_node (union any_node *n) { const struct operation *op; size_t i; assert (n != NULL); assert (is_operation (n->type)); op = &operations[n->type]; if (!is_atom (n->type)) { struct composite_node *c = &n->composite; assert (is_composite (n->type)); assert (c->arg_cnt >= op->arg_cnt); for (i = 0; i < op->arg_cnt; i++) assert (is_compatible (op->args[i], expr_node_returns (c->args[i]))); if (c->arg_cnt > op->arg_cnt && !is_operator (n->type)) { assert (op->flags & OPF_ARRAY_OPERAND); for (i = 0; i < c->arg_cnt; i++) assert (is_compatible (op->args[op->arg_cnt - 1], expr_node_returns (c->args[i]))); } } return true; } union any_node * expr_allocate_composite (struct expression *e, operation_type op, union any_node **args, size_t arg_cnt) { union any_node *n; size_t i; n = pool_alloc (e->expr_pool, sizeof n->composite); n->type = op; n->composite.arg_cnt = arg_cnt; n->composite.args = pool_alloc (e->expr_pool, sizeof *n->composite.args * arg_cnt); for (i = 0; i < arg_cnt; i++) { if (args[i] == NULL) return NULL; n->composite.args[i] = args[i]; } memcpy (n->composite.args, args, sizeof *n->composite.args * arg_cnt); n->composite.min_valid = 0; assert (is_valid_node (n)); return n; } union any_node * expr_allocate_number (struct expression *e, double d) { union any_node *n = pool_alloc (e->expr_pool, sizeof n->number); n->type = OP_number; n->number.n = d; return n; } union any_node * expr_allocate_boolean (struct expression *e, double b) { union any_node *n = pool_alloc (e->expr_pool, sizeof n->number); assert (b == 0.0 || b == 1.0 || b == SYSMIS); n->type = OP_boolean; n->number.n = b; return n; } union any_node * expr_allocate_integer (struct expression *e, int i) { union any_node *n = pool_alloc (e->expr_pool, sizeof n->integer); n->type = OP_integer; n->integer.i = i; return n; } union any_node * expr_allocate_pos_int (struct expression *e, int i) { union any_node *n = pool_alloc (e->expr_pool, sizeof n->integer); assert (i > 0); n->type = OP_pos_int; n->integer.i = i; return n; } union any_node * expr_allocate_vector (struct expression *e, const struct vector *vector) { union any_node *n = pool_alloc (e->expr_pool, sizeof n->vector); n->type = OP_vector; n->vector.v = vector; return n; } union any_node * expr_allocate_string (struct expression *e, struct substring s) { union any_node *n = pool_alloc (e->expr_pool, sizeof n->string); n->type = OP_string; n->string.s = s; return n; } union any_node * expr_allocate_variable (struct expression *e, const struct variable *v) { union any_node *n = pool_alloc (e->expr_pool, sizeof n->variable); n->type = var_is_numeric (v) ? OP_num_var : OP_str_var; n->variable.v = v; return n; } union any_node * expr_allocate_format (struct expression *e, const struct fmt_spec *format) { union any_node *n = pool_alloc (e->expr_pool, sizeof n->format); n->type = OP_format; n->format.f = *format; return n; } /* Allocates a unary composite node that represents the value of variable V in expression E. */ static union any_node * allocate_unary_variable (struct expression *e, const struct variable *v) { assert (v != NULL); return expr_allocate_unary (e, var_is_numeric (v) ? OP_NUM_VAR : OP_STR_VAR, expr_allocate_variable (e, v)); } /* Export function details to other modules. */ /* Returns the operation structure for the function with the given IDX. */ const struct operation * expr_get_function (size_t idx) { assert (idx < OP_function_cnt); return &operations[OP_function_first + idx]; } /* Returns the number of expression functions. */ size_t expr_get_function_cnt (void) { return OP_function_cnt; } /* Returns the name of operation OP. */ const char * expr_operation_get_name (const struct operation *op) { return op->name; } /* Returns the human-readable prototype for operation OP. */ const char * expr_operation_get_prototype (const struct operation *op) { return op->prototype; } /* Returns the number of arguments for operation OP. */ int expr_operation_get_arg_cnt (const struct operation *op) { return op->arg_cnt; } pspp-1.0.1/src/language/expressions/optimize.c0000644000175000017500000002403012470243700016352 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/expressions/private.h" #include #include #include #include #include "data/calendar.h" #include "data/data-in.h" #include "data/variable.h" #include "evaluate.h" #include "language/expressions/helpers.h" #include "language/expressions/public.h" #include "libpspp/assertion.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/xalloc.h" static union any_node *evaluate_tree (struct composite_node *, struct expression *); static union any_node *optimize_tree (union any_node *, struct expression *); union any_node * expr_optimize (union any_node *node, struct expression *e) { int nonconst_cnt = 0; /* Number of nonconstant children. */ int sysmis_cnt = 0; /* Number of system-missing children. */ const struct operation *op; struct composite_node *c; int i; /* We can't optimize an atom. */ if (is_atom (node->type)) return node; /* Start by optimizing all the children. */ c = &node->composite; for (i = 0; i < c->arg_cnt; i++) { c->args[i] = expr_optimize (c->args[i], e); if (c->args[i]->type == OP_number) { if (c->args[i]->number.n == SYSMIS) sysmis_cnt++; } if (!is_atom (c->args[i]->type)) nonconst_cnt++; } op = &operations[c->type]; if (sysmis_cnt && (op->flags & OPF_ABSORB_MISS) == 0) { /* Most operations produce SYSMIS given any SYSMIS argument. */ assert (op->returns == OP_number || op->returns == OP_boolean); if (op->returns == OP_number) return expr_allocate_number (e, SYSMIS); else return expr_allocate_boolean (e, SYSMIS); } else if (!nonconst_cnt && (op->flags & OPF_NONOPTIMIZABLE) == 0) { /* Evaluate constant expressions. */ return evaluate_tree (&node->composite, e); } else { /* A few optimization possibilities are still left. */ return optimize_tree (node, e); } } static int eq_double (union any_node *node, double n) { return node->type == OP_number && node->number.n == n; } static union any_node * optimize_tree (union any_node *node, struct expression *e) { struct composite_node *n = &node->composite; assert (is_composite (node->type)); /* If you add to these optimizations, please also add a correctness test in tests/expressions/expressions.sh. */ /* x+0, x-0, 0+x => x. */ if ((n->type == OP_ADD || n->type == OP_SUB) && eq_double (n->args[1], 0.)) return n->args[0]; else if (n->type == OP_ADD && eq_double (n->args[0], 0.)) return n->args[1]; /* x*1, x/1, 1*x => x. */ else if ((n->type == OP_MUL || n->type == OP_DIV) && eq_double (n->args[1], 1.)) return n->args[0]; else if (n->type == OP_MUL && eq_double (n->args[0], 1.)) return n->args[1]; /* 0*x, 0/x, x*0, MOD(0,x) => 0. */ else if (((n->type == OP_MUL || n->type == OP_DIV || n->type == OP_MOD_nn) && eq_double (n->args[0], 0.)) || (n->type == OP_MUL && eq_double (n->args[1], 0.))) return expr_allocate_number (e, 0.); /* x**1 => x. */ else if (n->type == OP_POW && eq_double (n->args[1], 1)) return n->args[0]; /* x**2 => SQUARE(x). */ else if (n->type == OP_POW && eq_double (n->args[1], 2)) return expr_allocate_unary (e, OP_SQUARE, n->args[0]); /* Otherwise, nothing to do. */ else return node; } static double get_number_arg (struct composite_node *, size_t arg_idx); static double *get_number_args (struct composite_node *, size_t arg_idx, size_t arg_cnt, struct expression *); static struct substring get_string_arg (struct composite_node *, size_t arg_idx); static struct substring *get_string_args (struct composite_node *, size_t arg_idx, size_t arg_cnt, struct expression *); static const struct fmt_spec *get_format_arg (struct composite_node *, size_t arg_idx); static union any_node * evaluate_tree (struct composite_node *node, struct expression *e) { switch (node->type) { #include "optimize.inc" default: NOT_REACHED (); } NOT_REACHED (); } static double get_number_arg (struct composite_node *c, size_t arg_idx) { assert (arg_idx < c->arg_cnt); assert (c->args[arg_idx]->type == OP_number || c->args[arg_idx]->type == OP_boolean); return c->args[arg_idx]->number.n; } static double * get_number_args (struct composite_node *c, size_t arg_idx, size_t arg_cnt, struct expression *e) { double *d; size_t i; d = pool_alloc (e->expr_pool, sizeof *d * arg_cnt); for (i = 0; i < arg_cnt; i++) d[i] = get_number_arg (c, i + arg_idx); return d; } static struct substring get_string_arg (struct composite_node *c, size_t arg_idx) { assert (arg_idx < c->arg_cnt); assert (c->args[arg_idx]->type == OP_string); return c->args[arg_idx]->string.s; } static struct substring * get_string_args (struct composite_node *c, size_t arg_idx, size_t arg_cnt, struct expression *e) { struct substring *s; size_t i; s = pool_alloc (e->expr_pool, sizeof *s * arg_cnt); for (i = 0; i < arg_cnt; i++) s[i] = get_string_arg (c, i + arg_idx); return s; } static const struct fmt_spec * get_format_arg (struct composite_node *c, size_t arg_idx) { assert (arg_idx < c->arg_cnt); assert (c->args[arg_idx]->type == OP_ni_format || c->args[arg_idx]->type == OP_no_format); return &c->args[arg_idx]->format.f; } /* Expression flattening. */ static union operation_data *allocate_aux (struct expression *, operation_type); static void flatten_node (union any_node *, struct expression *); static void emit_operation (struct expression *e, operation_type type) { allocate_aux (e, OP_operation)->operation = type; } static void emit_number (struct expression *e, double n) { allocate_aux (e, OP_number)->number = n; } static void emit_string (struct expression *e, struct substring s) { allocate_aux (e, OP_string)->string = s; } static void emit_format (struct expression *e, const struct fmt_spec *f) { allocate_aux (e, OP_format)->format = pool_clone (e->expr_pool, f, sizeof *f); } static void emit_variable (struct expression *e, const struct variable *v) { allocate_aux (e, OP_variable)->variable = v; } static void emit_vector (struct expression *e, const struct vector *v) { allocate_aux (e, OP_vector)->vector = v; } static void emit_integer (struct expression *e, int i) { allocate_aux (e, OP_integer)->integer = i; } void expr_flatten (union any_node *n, struct expression *e) { flatten_node (n, e); e->type = expr_node_returns (n); emit_operation (e, (e->type == OP_string ? OP_return_string : OP_return_number)); } static void flatten_atom (union any_node *n, struct expression *e) { switch (n->type) { case OP_number: case OP_boolean: emit_operation (e, OP_number); emit_number (e, n->number.n); break; case OP_string: emit_operation (e, OP_string); emit_string (e, n->string.s); break; case OP_num_var: case OP_str_var: case OP_vector: case OP_no_format: case OP_ni_format: case OP_pos_int: /* These are passed as aux data following the operation. */ break; default: NOT_REACHED (); } } static void flatten_composite (union any_node *n, struct expression *e) { const struct operation *op = &operations[n->type]; size_t i; for (i = 0; i < n->composite.arg_cnt; i++) flatten_node (n->composite.args[i], e); if (n->type != OP_BOOLEAN_TO_NUM) emit_operation (e, n->type); for (i = 0; i < n->composite.arg_cnt; i++) { union any_node *arg = n->composite.args[i]; switch (arg->type) { case OP_num_var: case OP_str_var: emit_variable (e, arg->variable.v); break; case OP_vector: emit_vector (e, arg->vector.v); break; case OP_ni_format: case OP_no_format: emit_format (e, &arg->format.f); break; case OP_pos_int: emit_integer (e, arg->integer.i); break; default: /* Nothing to do. */ break; } } if (op->flags & OPF_ARRAY_OPERAND) emit_integer (e, n->composite.arg_cnt - op->arg_cnt + 1); if (op->flags & OPF_MIN_VALID) emit_integer (e, n->composite.min_valid); } void flatten_node (union any_node *n, struct expression *e) { assert (is_operation (n->type)); if (is_atom (n->type)) flatten_atom (n, e); else if (is_composite (n->type)) flatten_composite (n, e); else NOT_REACHED (); } static union operation_data * allocate_aux (struct expression *e, operation_type type) { if (e->op_cnt >= e->op_cap) { e->op_cap = (e->op_cap + 8) * 3 / 2; e->ops = pool_realloc (e->expr_pool, e->ops, sizeof *e->ops * e->op_cap); e->op_types = pool_realloc (e->expr_pool, e->op_types, sizeof *e->op_types * e->op_cap); } e->op_types[e->op_cnt] = type; return &e->ops[e->op_cnt++]; } pspp-1.0.1/src/language/expressions/helpers.c0000644000175000017500000004466713137223525016202 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2010, 2011, 2015, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/expressions/helpers.h" #include #include #include "language/expressions/private.h" #include "libpspp/assertion.h" #include "libpspp/pool.h" #include "gl/minmax.h" const struct substring empty_string = {NULL, 0}; double expr_ymd_to_ofs (double year, double month, double day) { int y = year; int m = month; int d = day; char *error; double ofs; if (y != year || m != month || d != day) { msg (SE, _("One of the arguments to a DATE function is not an integer. " "The result will be system-missing.")); return SYSMIS; } ofs = calendar_gregorian_to_offset (y, m, d, &error); if (error != NULL) { msg (SE, "%s", error); free (error); } return ofs; } double expr_ymd_to_date (double year, double month, double day) { double ofs = expr_ymd_to_ofs (year, month, day); return ofs != SYSMIS ? ofs * DAY_S : SYSMIS; } double expr_wkyr_to_date (double week, double year) { int w = week; if (w != week) { msg (SE, _("The week argument to DATE.WKYR is not an integer. " "The result will be system-missing.")); return SYSMIS; } else if (w < 1 || w > 53) { msg (SE, _("The week argument to DATE.WKYR is outside the acceptable " "range of 1 to 53. " "The result will be system-missing.")); return SYSMIS; } else { double yr_1_1 = expr_ymd_to_ofs (year, 1, 1); if (yr_1_1 != SYSMIS) return DAY_S * (yr_1_1 + WEEK_DAY * (w - 1)); else return SYSMIS; } } double expr_yrday_to_date (double year, double yday) { int yd = yday; if (yd != yday) { msg (SE, _("The day argument to DATE.YRDAY is not an integer. " "The result will be system-missing.")); return SYSMIS; } else if (yd < 1 || yd > 366) { msg (SE, _("The day argument to DATE.YRDAY is outside the acceptable " "range of 1 to 366. " "The result will be system-missing.")); return SYSMIS; } else { double yr_1_1 = expr_ymd_to_ofs (year, 1, 1); if (yr_1_1 != SYSMIS) return DAY_S * (yr_1_1 + yd - 1.); else return SYSMIS; } } double expr_yrmoda (double year, double month, double day) { if (year >= 0 && year <= 99) year += 1900; else if (year != (int) year && year > 47516) { msg (SE, _("The year argument to YRMODA is greater than 47516. " "The result will be system-missing.")); return SYSMIS; } return expr_ymd_to_ofs (year, month, day); } /* A date unit. */ enum date_unit { DATE_YEARS, DATE_QUARTERS, DATE_MONTHS, DATE_WEEKS, DATE_DAYS, DATE_HOURS, DATE_MINUTES, DATE_SECONDS }; /* Stores in *UNIT the unit whose name is NAME. Return success. */ static enum date_unit recognize_unit (struct substring name, enum date_unit *unit) { struct unit_name { enum date_unit unit; const struct substring name; }; static const struct unit_name unit_names[] = { { DATE_YEARS, SS_LITERAL_INITIALIZER ("years") }, { DATE_QUARTERS, SS_LITERAL_INITIALIZER ("quarters") }, { DATE_MONTHS, SS_LITERAL_INITIALIZER ("months") }, { DATE_WEEKS, SS_LITERAL_INITIALIZER ("weeks") }, { DATE_DAYS, SS_LITERAL_INITIALIZER ("days") }, { DATE_HOURS, SS_LITERAL_INITIALIZER ("hours") }, { DATE_MINUTES, SS_LITERAL_INITIALIZER ("minutes") }, { DATE_SECONDS, SS_LITERAL_INITIALIZER ("seconds") }, }; const int unit_name_cnt = sizeof unit_names / sizeof *unit_names; const struct unit_name *un; for (un = unit_names; un < &unit_names[unit_name_cnt]; un++) if (ss_equals_case (un->name, name)) { *unit = un->unit; return true; } msg (SE, _("Unrecognized date unit `%.*s'. " "Valid date units are `%s', `%s', `%s', " "`%s', `%s', `%s', `%s', and `%s'."), (int) ss_length (name), ss_data (name), "years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds"); return false; } /* Returns the number of whole years from DATE1 to DATE2, where a year is defined as the same or later month, day, and time of day. */ static int year_diff (double date1, double date2) { int y1, m1, d1, yd1; int y2, m2, d2, yd2; int diff; assert (date2 >= date1); calendar_offset_to_gregorian (date1 / DAY_S, &y1, &m1, &d1, &yd1); calendar_offset_to_gregorian (date2 / DAY_S, &y2, &m2, &d2, &yd2); diff = y2 - y1; if (diff > 0) { int yd1 = 32 * m1 + d1; int yd2 = 32 * m2 + d2; if (yd2 < yd1 || (yd2 == yd1 && fmod (date2, DAY_S) < fmod (date1, DAY_S))) diff--; } return diff; } /* Returns the number of whole months from DATE1 to DATE2, where a month is defined as the same or later day and time of day. */ static int month_diff (double date1, double date2) { int y1, m1, d1, yd1; int y2, m2, d2, yd2; int diff; assert (date2 >= date1); calendar_offset_to_gregorian (date1 / DAY_S, &y1, &m1, &d1, &yd1); calendar_offset_to_gregorian (date2 / DAY_S, &y2, &m2, &d2, &yd2); diff = ((y2 * 12) + m2) - ((y1 * 12) + m1); if (diff > 0 && (d2 < d1 || (d2 == d1 && fmod (date2, DAY_S) < fmod (date1, DAY_S)))) diff--; return diff; } /* Returns the number of whole quarter from DATE1 to DATE2, where a quarter is defined as three months. */ static int quarter_diff (double date1, double date2) { return month_diff (date1, date2) / 3; } /* Returns the number of seconds in the given UNIT. */ static int date_unit_duration (enum date_unit unit) { switch (unit) { case DATE_WEEKS: return WEEK_S; case DATE_DAYS: return DAY_S; case DATE_HOURS: return H_S; case DATE_MINUTES: return MIN_S; case DATE_SECONDS: return 1; default: NOT_REACHED (); } } /* Returns the span from DATE1 to DATE2 in terms of UNIT_NAME. */ double expr_date_difference (double date1, double date2, struct substring unit_name) { enum date_unit unit; if (!recognize_unit (unit_name, &unit)) return SYSMIS; switch (unit) { case DATE_YEARS: return (date2 >= date1 ? year_diff (date1, date2) : -year_diff (date2, date1)); case DATE_QUARTERS: return (date2 >= date1 ? quarter_diff (date1, date2) : -quarter_diff (date2, date1)); case DATE_MONTHS: return (date2 >= date1 ? month_diff (date1, date2) : -month_diff (date2, date1)); case DATE_WEEKS: case DATE_DAYS: case DATE_HOURS: case DATE_MINUTES: case DATE_SECONDS: return trunc ((date2 - date1) / date_unit_duration (unit)); } NOT_REACHED (); } /* How to deal with days out of range for a given month. */ enum date_sum_method { SUM_ROLLOVER, /* Roll them over to the next month. */ SUM_CLOSEST /* Use the last day of the month. */ }; /* Stores in *METHOD the method whose name is NAME. Return success. */ static bool recognize_method (struct substring method_name, enum date_sum_method *method) { if (ss_equals_case (method_name, ss_cstr ("closest"))) { *method = SUM_CLOSEST; return true; } else if (ss_equals_case (method_name, ss_cstr ("rollover"))) { *method = SUM_ROLLOVER; return true; } else { msg (SE, _("Invalid DATESUM method. " "Valid choices are `%s' and `%s'."), "closest", "rollover"); return false; } } /* Returns DATE advanced by the given number of MONTHS, with day-of-month overflow resolved using METHOD. */ static double add_months (double date, int months, enum date_sum_method method) { int y, m, d, yd; double output; char *error; calendar_offset_to_gregorian (date / DAY_S, &y, &m, &d, &yd); y += months / 12; m += months % 12; if (m < 1) { m += 12; y--; } else if (m > 12) { m -= 12; y++; } assert (m >= 1 && m <= 12); if (method == SUM_CLOSEST && d > calendar_days_in_month (y, m)) d = calendar_days_in_month (y, m); output = calendar_gregorian_to_offset (y, m, d, &error); if (output != SYSMIS) output = (output * DAY_S) + fmod (date, DAY_S); else { msg (SE, "%s", error); free (error); } return output; } /* Returns DATE advanced by the given QUANTITY of units given in UNIT_NAME, with day-of-month overflow resolved using METHOD_NAME. */ double expr_date_sum (double date, double quantity, struct substring unit_name, struct substring method_name) { enum date_unit unit; enum date_sum_method method; if (!recognize_unit (unit_name, &unit) || !recognize_method (method_name, &method)) return SYSMIS; switch (unit) { case DATE_YEARS: return add_months (date, trunc (quantity) * 12, method); case DATE_QUARTERS: return add_months (date, trunc (quantity) * 3, method); case DATE_MONTHS: return add_months (date, trunc (quantity), method); case DATE_WEEKS: case DATE_DAYS: case DATE_HOURS: case DATE_MINUTES: case DATE_SECONDS: return date + quantity * date_unit_duration (unit); } NOT_REACHED (); } int compare_string_3way (const struct substring *a, const struct substring *b) { size_t i; for (i = 0; i < a->length && i < b->length; i++) if (a->string[i] != b->string[i]) return a->string[i] < b->string[i] ? -1 : 1; for (; i < a->length; i++) if (a->string[i] != ' ') return 1; for (; i < b->length; i++) if (b->string[i] != ' ') return -1; return 0; } size_t count_valid (double *d, size_t d_cnt) { size_t valid_cnt; size_t i; valid_cnt = 0; for (i = 0; i < d_cnt; i++) valid_cnt += is_valid (d[i]); return valid_cnt; } struct substring alloc_string (struct expression *e, size_t length) { struct substring s; s.length = length; s.string = pool_alloc (e->eval_pool, length); return s; } struct substring copy_string (struct expression *e, const char *old, size_t length) { struct substring s = alloc_string (e, length); memcpy (s.string, old, length); return s; } /* Returns the noncentral beta cumulative distribution function value for the given arguments. FIXME: The accuracy of this function is not entirely satisfactory. We only match the example values given in AS 310 to the first 5 significant digits. */ double ncdf_beta (double x, double a, double b, double lambda) { double c; if (x <= 0. || x >= 1. || a <= 0. || b <= 0. || lambda <= 0.) return SYSMIS; c = lambda / 2.; if (lambda < 54.) { /* Algorithm AS 226. */ double x0, a0, beta, temp, gx, q, ax, sumq, sum; double err_max = 2 * DBL_EPSILON; double err_bound; int iter_max = 100; int iter; x0 = floor (c - 5.0 * sqrt (c)); if (x0 < 0.) x0 = 0.; a0 = a + x0; beta = (gsl_sf_lngamma (a0) + gsl_sf_lngamma (b) - gsl_sf_lngamma (a0 + b)); temp = gsl_sf_beta_inc (a0, b, x); gx = exp (a0 * log (x) + b * log (1. - x) - beta - log (a0)); if (a0 >= a) q = exp (-c + x0 * log (c)) - gsl_sf_lngamma (x0 + 1.); else q = exp (-c); ax = q * temp; sumq = 1. - q; sum = ax; iter = 0; do { iter++; temp -= gx; gx = x * (a + b + iter - 1.) * gx / (a + iter); q *= c / iter; sumq -= q; ax = temp * q; sum += ax; err_bound = (temp - gx) * sumq; } while (iter < iter_max && err_bound > err_max); return sum; } else { /* Algorithm AS 310. */ double m, m_sqrt; int iter, iter_lower, iter_upper, iter1, iter2, j; double t, q, r, psum, beta, s1, gx, fx, temp, ftemp, t0, s0, sum, s; double err_bound; double err_max = 2 * DBL_EPSILON; iter = 0; m = floor (c + .5); m_sqrt = sqrt (m); iter_lower = m - 5. * m_sqrt; iter_upper = m + 5. * m_sqrt; t = -c + m * log (c) - gsl_sf_lngamma (m + 1.); q = exp (t); r = q; psum = q; beta = (gsl_sf_lngamma (a + m) + gsl_sf_lngamma (b) - gsl_sf_lngamma (a + m + b)); s1 = (a + m) * log (x) + b * log (1. - x) - log (a + m) - beta; fx = gx = exp (s1); ftemp = temp = gsl_sf_beta_inc (a + m, b, x); iter++; sum = q * temp; iter1 = m; while (iter1 >= iter_lower && q >= err_max) { q = q * iter1 / c; iter++; gx = (a + iter1) / (x * (a + b + iter1 - 1.)) * gx; iter1--; temp += gx; psum += q; sum += q * temp; } t0 = (gsl_sf_lngamma (a + b) - gsl_sf_lngamma (a + 1.) - gsl_sf_lngamma (b)); s0 = a * log (x) + b * log (1. - x); s = 0.; for (j = 0; j < iter1; j++) { double t1; s += exp (t0 + s0 + j * log (x)); t1 = log (a + b + j) - log (a + 1. + j) + t0; t0 = t1; } err_bound = (1. - gsl_sf_gamma_inc_P (iter1, c)) * (temp + s); q = r; temp = ftemp; gx = fx; iter2 = m; for (;;) { double ebd = err_bound + (1. - psum) * temp; if (ebd < err_max || iter >= iter_upper) break; iter2++; iter++; q = q * c / iter2; psum += q; temp -= gx; gx = x * (a + b + iter2 - 1.) / (a + iter2) * gx; sum += q * temp; } return sum; } } double cdf_bvnor (double x0, double x1, double r) { double z = pow2 (x0) - 2. * r * x0 * x1 + pow2 (x1); return exp (-z / (2. * (1 - r * r))) * (2. * M_PI * sqrt (1 - r * r)); } double idf_fdist (double P, double df1, double df2) { double temp = gsl_cdf_beta_Pinv (P, df1 / 2, df2 / 2); return temp * df2 / ((1. - temp) * df1); } /* * Mathlib : A C Library of Special Functions * Copyright (C) 1998 Ross Ihaka * Copyright (C) 2000 The R Development Core Team * * This program is free software; you can redistribute it and/or * modify * it under the terms of the GNU General Public License as * published by * the Free Software Foundation; either version 2 of the * License, or * (at your option) any later version. * * This program is distributed in the hope that it will be * useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ /* Returns the density of the noncentral beta distribution with noncentrality parameter LAMBDA. */ double npdf_beta (double x, double a, double b, double lambda) { if (lambda < 0. || a <= 0. || b <= 0.) return SYSMIS; else if (lambda == 0.) return gsl_ran_beta_pdf (x, a, b); else { double max_error = 2 * DBL_EPSILON; int max_iter = 200; double term = gsl_ran_beta_pdf (x, a, b); double lambda2 = 0.5 * lambda; double weight = exp (-lambda2); double sum = weight * term; double psum = weight; int k; for (k = 1; k <= max_iter && 1 - psum < max_error; k++) { weight *= lambda2 / k; term *= x * (a + b) / a; sum += weight * term; psum += weight; a += 1; } return sum; } } static double round__ (double x, double mult, double fuzzbits, double adjustment) { if (fuzzbits <= 0) fuzzbits = settings_get_fuzzbits (); adjustment += exp2 (fuzzbits - DBL_MANT_DIG); x /= mult; x = x >= 0. ? floor (x + adjustment) : -floor (-x + adjustment); return x * mult; } double round_nearest (double x, double mult, double fuzzbits) { return round__ (x, mult, fuzzbits, .5); } double round_zero (double x, double mult, double fuzzbits) { return round__ (x, mult, fuzzbits, 0); } struct substring replace_string (struct expression *e, struct substring haystack, struct substring needle, struct substring replacement, double n) { if (!needle.length || haystack.length < needle.length || n <= 0 || n == SYSMIS) return haystack; struct substring result = alloc_string (e, MAX_STRING); result.length = 0; size_t i = 0; while (i <= haystack.length - needle.length) if (!memcmp (&haystack.string[i], needle.string, needle.length)) { size_t copy_len = MIN (replacement.length, MAX_STRING - result.length); memcpy (&result.string[result.length], replacement.string, copy_len); result.length += copy_len; i += needle.length; if (--n < 1) break; } else { if (result.length < MAX_STRING) result.string[result.length++] = haystack.string[i]; i++; } while (i < haystack.length && result.length < MAX_STRING) result.string[result.length++] = haystack.string[i++]; return result; } static int compare_doubles (const void *a_, const void *b_) { const double *ap = a_; const double *bp = b_; double a = *ap; double b = *bp; /* Sort SYSMIS to the end. */ return (a == b ? 0 : a == SYSMIS ? 1 : b == SYSMIS ? -1 : a > b ? 1 : -1); } double median (double *a, size_t n) { /* Sort the array in-place, sorting SYSMIS to the end. */ qsort (a, n, sizeof *a, compare_doubles); /* Drop SYSMIS. */ n = count_valid (a, n); return (!n ? SYSMIS : n % 2 ? a[n / 2] : (a[n / 2 - 1] + a[n / 2]) / 2.0); } pspp-1.0.1/src/language/expressions/automake.mk0000644000175000017500000000347513137223525016523 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- language_expressions_sources = \ src/language/expressions/evaluate.c \ src/language/expressions/helpers.c \ src/language/expressions/helpers.h \ src/language/expressions/optimize.c \ src/language/expressions/parse.c \ src/language/expressions/private.h \ src/language/expressions/public.h expressions_built_sources = \ src/language/expressions/evaluate.h \ src/language/expressions/evaluate.inc \ src/language/expressions/operations.h \ src/language/expressions/optimize.inc \ src/language/expressions/parse.inc BUILT_SOURCES += $(expressions_built_sources) CLEANFILES += $(expressions_built_sources) helpers = src/language/expressions/generate.pl \ src/language/expressions/operations.def EXTRA_DIST += $(helpers) $(expressions_built_sources): $(helpers) $(AV_V_GEN)$(MKDIR_P) `dirname $@` && \ $(PERL) $< -o $@ -i $(top_srcdir)/src/language/expressions/operations.def AM_CPPFLAGS += -I$(top_builddir)/src/language/expressions \ -I$(top_srcdir)/src/language/expressions EXTRA_DIST += src/language/expressions/TODO pspp-1.0.1/src/language/expressions/generate.pl0000644000175000017500000006514613137223525016516 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # use strict; use warnings 'all'; use Getopt::Long; # Parse command line. our ($input_file); our ($output_file); parse_cmd_line (); # Initialize type system. our (%type, @types); init_all_types (); # Parse input file. our (%ops); our (@funcs, @opers, @order); parse_input (); # Produce output. print_header (); if ($output_file =~ /evaluate\.h$/) { generate_evaluate_h (); } elsif ($output_file =~ /evaluate\.inc$/) { generate_evaluate_inc (); } elsif ($output_file =~ /operations\.h$/) { generate_operations_h (); } elsif ($output_file =~ /optimize\.inc$/) { generate_optimize_inc (); } elsif ($output_file =~ /parse\.inc$/) { generate_parse_inc (); } else { die "$output_file: unknown output type\n"; } print_trailer (); # Command line. # Parses the command line. # # Initializes $input_file, $output_file. sub parse_cmd_line { GetOptions ("i|input=s" => \$input_file, "o|output=s" => \$output_file, "h|help" => sub { usage (); }) or exit 1; $input_file = "operations.def" if !defined $input_file; die "$0: output file must be specified\n" if !defined $output_file; open (INPUT, "<$input_file") or die "$input_file: open: $!\n"; open (OUTPUT, ">$output_file") or die "$output_file: create: $!\n"; select (OUTPUT); } sub usage { print < 'double', ATOM => 'number', MANGLE => 'n', HUMAN_NAME => 'number', STACK => 'ns', MISSING_VALUE => 'SYSMIS'); init_type ('string', 'any', C_TYPE => 'struct substring', ATOM => 'string', MANGLE => 's', HUMAN_NAME => 'string', STACK => 'ss', MISSING_VALUE => 'empty_string'); init_type ('boolean', 'any', C_TYPE => 'double', ATOM => 'number', MANGLE => 'n', HUMAN_NAME => 'boolean', STACK => 'ns', MISSING_VALUE => 'SYSMIS'); # Format types. init_type ('format', 'atom'); init_type ('ni_format', 'leaf', C_TYPE => 'const struct fmt_spec *', ATOM => 'format', MANGLE => 'f', HUMAN_NAME => 'num_input_format'); init_type ('no_format', 'leaf', C_TYPE => 'const struct fmt_spec *', ATOM => 'format', MANGLE => 'f', HUMAN_NAME => 'num_output_format'); # Integer types. init_type ('integer', 'leaf', C_TYPE => 'int', ATOM => 'integer', MANGLE => 'n', HUMAN_NAME => 'integer'); init_type ('pos_int', 'leaf', C_TYPE => 'int', ATOM => 'integer', MANGLE => 'n', HUMAN_NAME => 'positive_integer_constant'); # Variable names. init_type ('variable', 'atom'); init_type ('num_var', 'leaf', C_TYPE => 'const struct variable *', ATOM => 'variable', MANGLE => 'Vn', HUMAN_NAME => 'num_variable'); init_type ('str_var', 'leaf', C_TYPE => 'const struct variable *', ATOM => 'variable', MANGLE => 'Vs', HUMAN_NAME => 'string_variable'); init_type ('var', 'leaf', C_TYPE => 'const struct variable *', ATOM => 'variable', MANGLE => 'V', HUMAN_NAME => 'variable'); # Vectors. init_type ('vector', 'leaf', C_TYPE => 'const struct vector *', ATOM => 'vector', MANGLE => 'v', HUMAN_NAME => 'vector'); # Fixed types. init_type ('expression', 'fixed', C_TYPE => 'struct expression *', FIXED_VALUE => 'e'); init_type ('case', 'fixed', C_TYPE => 'const struct ccase *', FIXED_VALUE => 'c'); init_type ('case_idx', 'fixed', C_TYPE => 'size_t', FIXED_VALUE => 'case_idx'); init_type ('dataset', 'fixed', C_TYPE => 'struct dataset *', FIXED_VALUE => 'ds'); # One of these is emitted at the end of each expression as a sentinel # that tells expr_evaluate() to return the value on the stack. init_type ('return_number', 'atom'); init_type ('return_string', 'atom'); # Used only for debugging purposes. init_type ('operation', 'atom'); } # init_type has 2 required arguments: # # NAME: Type name. # # `$name' is the type's name in operations.def. # # `OP_$name' is the terminal's type in operations.h. # # `expr_allocate_$name()' allocates a node of the given type. # # ROLE: How the type may be used: # # "any": Usable as operands and function arguments, and # function and operator results. # # "leaf": Usable as operands and function arguments, but # not function arguments or results. (Thus, they appear # only in leaf nodes in the parse type.) # # "fixed": Not allowed either as an operand or argument # type or a result type. Used only as auxiliary data. # # "atom": Not allowed anywhere; just adds the name to # the list of atoms. # # All types except those with "atom" as their role also require: # # C_TYPE: The C type that represents this abstract type. # # Types with "any" or "leaf" role require: # # ATOM: # # `$atom' is the `struct operation_data' member name. # # get_$atom_name() obtains the corresponding data from a # node. # # MANGLE: Short string for name mangling. Use identical strings # if two types should not be overloaded. # # HUMAN_NAME: Name for a type when we describe it to the user. # # Types with role "any" require: # # STACK: Name of the local variable in expr_evaluate(), used for # maintaining the stack for this type. # # MISSING_VALUE: Expression used for the missing value of this # type. # # Types with role "fixed" require: # # FIXED_VALUE: Expression used for the value of this type. sub init_type { my ($name, $role, %rest) = @_; my ($type) = $type{"\U$name"} = {NAME => $name, ROLE => $role, %rest}; my (@need_keys) = qw (NAME ROLE); if ($role eq 'any') { push (@need_keys, qw (C_TYPE ATOM MANGLE HUMAN_NAME STACK MISSING_VALUE)); } elsif ($role eq 'leaf') { push (@need_keys, qw (C_TYPE ATOM MANGLE HUMAN_NAME)); } elsif ($role eq 'fixed') { push (@need_keys, qw (C_TYPE FIXED_VALUE)); } elsif ($role eq 'atom') { } else { die "no role `$role'"; } my (%have_keys); $have_keys{$_} = 1 foreach keys %$type; for my $key (@need_keys) { defined $type->{$key} or die "$name lacks $key"; delete $have_keys{$key}; } scalar (keys (%have_keys)) == 0 or die "$name has superfluous key(s) " . join (', ', keys (%have_keys)); push (@types, $type); } # c_type(type). # # Returns the C type of the given type as a string designed to be # prepended to a variable name to produce a declaration. (That won't # work in general but it works well enough for our types.) sub c_type { my ($type) = @_; my ($c_type) = $type->{C_TYPE}; defined $c_type or die; # Append a space unless (typically) $c_type ends in `*'. $c_type .= ' ' if $c_type =~ /\w$/; return $c_type; } # Input parsing. # Parses the entire input. # # Initializes %ops, @funcs, @opers. sub parse_input { get_line (); get_token (); while ($toktype ne 'eof') { my (%op); $op{OPTIMIZABLE} = 1; $op{UNIMPLEMENTED} = 0; $op{EXTENSION} = 0; $op{PERM_ONLY} = 0; for (;;) { if (match ('extension')) { $op{EXTENSION} = 1; } elsif (match ('no_opt')) { $op{OPTIMIZABLE} = 0; } elsif (match ('absorb_miss')) { $op{ABSORB_MISS} = 1; } elsif (match ('perm_only')) { $op{PERM_ONLY} = 1; } elsif (match ('no_abbrev')) { $op{NO_ABBREV} = 1; } else { last; } } $op{RETURNS} = parse_type () || $type{NUMBER}; die "$op{RETURNS} is not a valid return type" if !any ($op{RETURNS}, @type{qw (NUMBER STRING BOOLEAN)}); $op{CATEGORY} = $token; if (!any ($op{CATEGORY}, qw (operator function))) { die "`operator' or `function' expected at `$token'"; } get_token (); my ($name) = force ("id"); die "function name may not contain underscore" if $op{CATEGORY} eq 'function' && $name =~ /_/; die "operator name may not contain period" if $op{CATEGORY} eq 'operator' && $name =~ /\./; if (my ($prefix, $suffix) = $name =~ /^(.*)\.(\d+)$/) { $name = $prefix; $op{MIN_VALID} = $suffix; $op{ABSORB_MISS} = 1; } $op{NAME} = $name; force_match ('('); @{$op{ARGS}} = (); while (!match (')')) { my ($arg) = parse_arg (); push (@{$op{ARGS}}, $arg); if (defined ($arg->{IDX})) { last if match (')'); die "array must be last argument"; } if (!match (',')) { force_match (')'); last; } } for my $arg (@{$op{ARGS}}) { next if !defined $arg->{CONDITION}; my ($any_arg) = join ('|', map ($_->{NAME}, @{$op{ARGS}})); $arg->{CONDITION} =~ s/\b($any_arg)\b/arg_$1/g; } my ($opname) = "OP_$op{NAME}"; $opname =~ tr/./_/; if ($op{CATEGORY} eq 'function') { my ($mangle) = join ('', map ($_->{TYPE}{MANGLE}, @{$op{ARGS}})); $op{MANGLE} = $mangle; $opname .= "_$mangle"; } $op{OPNAME} = $opname; if ($op{MIN_VALID}) { my ($array_arg) = array_arg (\%op); die "can't have minimum valid count without array arg" if !defined $array_arg; die "minimum valid count allowed only with double array" if $array_arg->{TYPE} ne $type{NUMBER}; die "can't have minimum valid count if array has multiplication factor" if $array_arg->{TIMES} != 1; } while ($toktype eq 'id') { my ($type) = parse_type () or die "parse error"; die "`$type->{NAME}' is not allowed as auxiliary data" unless $type->{ROLE} eq 'leaf' || $type->{ROLE} eq 'fixed'; my ($name) = force ("id"); push (@{$op{AUX}}, {TYPE => $type, NAME => $name}); force_match (';'); } if ($op{OPTIMIZABLE}) { die "random variate functions must be marked `no_opt'" if $op{NAME} =~ /^RV\./; for my $aux (@{$op{AUX}}) { if (any ($aux->{TYPE}, @type{qw (CASE CASE_IDX)})) { die "operators with $aux->{TYPE} aux data must be " . "marked `no_opt'"; } } } if ($op{RETURNS} eq $type{STRING} && !defined ($op{ABSORB_MISS})) { my (@args); for my $arg (@{$op{ARGS}}) { if (any ($arg->{TYPE}, @type{qw (NUMBER BOOLEAN)})) { die "$op{NAME} returns string and has double or bool " . "argument, but is not marked ABSORB_MISS"; } if (defined $arg->{CONDITION}) { die "$op{NAME} returns string but has argument with condition"; } } } if ($toktype eq 'block') { $op{BLOCK} = force ('block'); } elsif ($toktype eq 'expression') { if ($token eq 'unimplemented') { $op{UNIMPLEMENTED} = 1; } else { $op{EXPRESSION} = $token; } get_token (); } else { die "block or expression expected"; } die "duplicate operation name $opname" if defined $ops{$opname}; $ops{$opname} = \%op; if ($op{CATEGORY} eq 'function') { push (@funcs, $opname); } else { push (@opers, $opname); } } close(INPUT); @funcs = sort {$ops{$a}->{NAME} cmp $ops{$b}->{NAME} || $ops{$a}->{OPNAME} cmp $ops{$b}->{OPNAME}} @funcs; @opers = sort {$ops{$a}->{NAME} cmp $ops{$b}->{NAME}} @opers; @order = (@funcs, @opers); } # Reads the next token into $token, $toktype. sub get_token { our ($line); lookahead (); return if defined ($toktype) && $toktype eq 'eof'; $toktype = 'id', $token = $1, return if $line =~ /\G([a-zA-Z_][a-zA-Z_.0-9]*)/gc; $toktype = 'int', $token = $1, return if $line =~ /\G([0-9]+)/gc; $toktype = 'punct', $token = $1, return if $line =~ /\G([][(),*;.])/gc; if ($line =~ /\G=/gc) { $toktype = "expression"; $line =~ /\G\s+/gc; $token = accumulate_balanced (';'); } elsif ($line =~ /\G\{/gc) { $toktype = "block"; $token = accumulate_balanced ('}'); $token =~ s/^\n+//; } else { die "bad character `" . substr ($line, pos $line, 1) . "' in input"; } } # Skip whitespace, then return the remainder of the line. sub lookahead { our ($line); die "unexpected end of file" if !defined ($line); for (;;) { $line =~ /\G\s+/gc; last if pos ($line) < length ($line); get_line (); $token = $toktype = 'eof', return if !defined ($line); } return substr ($line, pos ($line)); } # accumulate_balanced($chars) # # Accumulates input until a character in $chars is encountered, except # that balanced pairs of (), [], or {} cause $chars to be ignored. # # Returns the input read. sub accumulate_balanced { my ($end) = @_; my ($s) = ""; my ($nest) = 0; our ($line); for (;;) { my ($start) = pos ($line); if ($line =~ /\G([^][(){};,]*)([][(){};,])/gc) { $s .= substr ($line, $start, pos ($line) - $start - 1) if pos ($line) > $start; my ($last) = substr ($line, pos ($line) - 1, 1); if ($last =~ /[[({]/) { $nest++; $s .= $last; } elsif ($last =~ /[])}]/) { if ($nest > 0) { $nest--; $s .= $last; } elsif (index ($end, $last) >= 0) { return $s; } else { die "unbalanced parentheses"; } } elsif (index ($end, $last) >= 0) { return $s if !$nest; $s .= $last; } else { $s .= $last; } } else { $s .= substr ($line, pos ($line)) . "\n"; get_line (); } } } # Reads the next line from INPUT into $line. sub get_line { our ($line); $line = ; if (defined ($line)) { chomp $line; $line =~ s%//.*%%; pos ($line) = 0; } } # If the current token is an identifier that names a type, # returns the type and skips to the next token. # Otherwise, returns undef. sub parse_type { if ($toktype eq 'id') { foreach my $type (values (%type)) { get_token (), return $type if defined ($type->{NAME}) && $type->{NAME} eq $token; } } return; } # force($type). # # Makes sure that $toktype equals $type, reads the next token, and # returns the previous $token. sub force { my ($type) = @_; die "parse error at `$token' expecting $type" if $type ne $toktype; my ($tok) = $token; get_token (); return $tok; } # force($tok). # # If $token equals $tok, reads the next token and returns true. # Otherwise, returns false. sub match { my ($tok) = @_; if ($token eq $tok) { get_token (); return 1; } else { return 0; } } # force_match($tok). # # If $token equals $tok, reads the next token. # Otherwise, flags an error in the input. sub force_match { my ($tok) = @_; die "parse error at `$token' expecting `$tok'" if !match ($tok); } # Parses and returns a function argument. sub parse_arg { my (%arg); $arg{TYPE} = parse_type () || $type{NUMBER}; die "argument name expected at `$token'" if $toktype ne 'id'; $arg{NAME} = $token; if (lookahead () =~ /^[[,)]/) { get_token (); if (match ('[')) { die "only double and string arrays supported" if !any ($arg{TYPE}, @type{qw (NUMBER STRING)}); $arg{IDX} = force ('id'); if (match ('*')) { $arg{TIMES} = force ('int'); die "multiplication factor must be positive" if $arg{TIMES} < 1; } else { $arg{TIMES} = 1; } force_match (']'); } } else { $arg{CONDITION} = $arg{NAME} . ' ' . accumulate_balanced (',)'); our ($line); pos ($line) -= 1; get_token (); } return \%arg; } # Output. # Prints the output file header. sub print_header { print <{UNIMPLEMENTED}; my (@args); for my $arg (@{$op->{ARGS}}) { if (!defined $arg->{IDX}) { push (@args, c_type ($arg->{TYPE}) . $arg->{NAME}); } else { push (@args, c_type ($arg->{TYPE}) . "$arg->{NAME}" . "[]"); push (@args, "size_t $arg->{IDX}"); } } for my $aux (@{$op->{AUX}}) { push (@args, c_type ($aux->{TYPE}) . $aux->{NAME}); } push (@args, "void") if !@args; my ($statements) = $op->{BLOCK} || " return $op->{EXPRESSION};\n"; print "static inline ", c_type ($op->{RETURNS}), "\n"; print "eval_$opname (", join (', ', @args), ")\n"; print "{\n"; print "$statements"; print "}\n\n"; } } sub generate_evaluate_inc { for my $opname (@order) { my ($op) = $ops{$opname}; if ($op->{UNIMPLEMENTED}) { print "case $opname:\n"; print " NOT_REACHED ();\n\n"; next; } my (@decls); my (@args); for my $arg (@{$op->{ARGS}}) { my ($name) = $arg->{NAME}; my ($type) = $arg->{TYPE}; my ($c_type) = c_type ($type); my ($idx) = $arg->{IDX}; push (@args, "arg_$arg->{NAME}"); if (!defined ($idx)) { my ($decl) = "${c_type}arg_$name"; if ($type->{ROLE} eq 'any') { unshift (@decls, "$decl = *--$type->{STACK}"); } elsif ($type->{ROLE} eq 'leaf') { push (@decls, "$decl = op++->$type->{ATOM}"); } else { die; } } else { my ($stack) = $type->{STACK}; defined $stack or die; unshift (@decls, "$c_type*arg_$arg->{NAME} = $stack -= arg_$idx"); unshift (@decls, "size_t arg_$arg->{IDX} = op++->integer"); my ($idx) = "arg_$idx"; if ($arg->{TIMES} != 1) { $idx .= " / $arg->{TIMES}"; } push (@args, $idx); } } for my $aux (@{$op->{AUX}}) { my ($type) = $aux->{TYPE}; my ($name) = $aux->{NAME}; if ($type->{ROLE} eq 'leaf') { my ($c_type) = c_type ($type); push (@decls, "${c_type}aux_$name = op++->$type->{ATOM}"); push (@args, "aux_$name"); } elsif ($type->{ROLE} eq 'fixed') { push (@args, $type->{FIXED_VALUE}); } } my ($sysmis_cond) = make_sysmis_decl ($op, "op++->integer"); push (@decls, $sysmis_cond) if defined $sysmis_cond; my ($result) = "eval_$op->{OPNAME} (" . join (', ', @args) . ")"; my ($stack) = $op->{RETURNS}{STACK}; print "case $opname:\n"; if (@decls) { print " {\n"; print " $_;\n" foreach @decls; if (defined $sysmis_cond) { my ($miss_ret) = $op->{RETURNS}{MISSING_VALUE}; print " *$stack++ = force_sysmis ? $miss_ret : $result;\n"; } else { print " *$stack++ = $result;\n"; } print " }\n"; } else { print " *$stack++ = $result;\n"; } print " break;\n\n"; } } sub generate_operations_h { print "#include \n"; print "#include \n\n"; print "typedef enum"; print " {\n"; my (@atoms); foreach my $type (@types) { next if $type->{ROLE} eq 'fixed'; push (@atoms, "OP_$type->{NAME}"); } print_operations ('atom', 1, \@atoms); print_operations ('function', "OP_atom_last + 1", \@funcs); print_operations ('operator', "OP_function_last + 1", \@opers); print_range ("OP_composite", "OP_function_first", "OP_operator_last"); print ",\n\n"; print_range ("OP", "OP_atom_first", "OP_composite_last"); print "\n }\n"; print "operation_type, atom_type;\n"; print_predicate ('is_operation', 'OP'); print_predicate ("is_$_", "OP_$_") foreach qw (atom composite function operator); } sub print_operations { my ($type, $first, $names) = @_; print " /* \u$type types. */\n"; print " $names->[0] = $first,\n"; print " $_,\n" foreach @$names[1...$#{$names}]; print_range ("OP_$type", $names->[0], $names->[$#{$names}]); print ",\n\n"; } sub print_range { my ($prefix, $first, $last) = @_; print " ${prefix}_first = $first,\n"; print " ${prefix}_last = $last,\n"; print " ${prefix}_cnt = ${prefix}_last - ${prefix}_first + 1"; } sub print_predicate { my ($function, $category) = @_; my ($assertion) = ""; print "\nstatic inline bool\n"; print "$function (operation_type op)\n"; print "{\n"; print " assert (is_operation (op));\n" if $function ne 'is_operation'; print " return op >= ${category}_first && op <= ${category}_last;\n"; print "}\n"; } sub generate_optimize_inc { for my $opname (@order) { my ($op) = $ops{$opname}; if (!$op->{OPTIMIZABLE} || $op->{UNIMPLEMENTED}) { print "case $opname:\n"; print " NOT_REACHED ();\n\n"; next; } my (@decls); my ($arg_idx) = 0; for my $arg (@{$op->{ARGS}}) { my ($decl); my ($name) = $arg->{NAME}; my ($type) = $arg->{TYPE}; my ($ctype) = c_type ($type); my ($idx) = $arg->{IDX}; if (!defined ($idx)) { my ($func) = "get_$type->{ATOM}_arg"; push (@decls, "${ctype}arg_$name = $func (node, $arg_idx)"); } else { my ($decl) = "size_t arg_$idx = node->arg_cnt"; $decl .= " - $arg_idx" if $arg_idx; push (@decls, $decl); push (@decls, "${ctype}*arg_$name = " . "get_$type->{ATOM}_args " . " (node, $arg_idx, arg_$idx, e)"); } $arg_idx++; } my ($sysmis_cond) = make_sysmis_decl ($op, "node->min_valid"); push (@decls, $sysmis_cond) if defined $sysmis_cond; my (@args); for my $arg (@{$op->{ARGS}}) { push (@args, "arg_$arg->{NAME}"); if (defined $arg->{IDX}) { my ($idx) = "arg_$arg->{IDX}"; $idx .= " / $arg->{TIMES}" if $arg->{TIMES} != 1; push (@args, $idx); } } for my $aux (@{$op->{AUX}}) { my ($type) = $aux->{TYPE}; if ($type->{ROLE} eq 'leaf') { my ($func) = "get_$type->{ATOM}_arg"; push (@args, "$func (node, $arg_idx)"); $arg_idx++; } elsif ($type->{ROLE} eq 'fixed') { push (@args, $type->{FIXED_VALUE}); } else { die; } } my ($result) = "eval_$op->{OPNAME} (" . join (', ', @args) . ")"; if (@decls && defined ($sysmis_cond)) { my ($miss_ret) = $op->{RETURNS}{MISSING_VALUE}; push (@decls, c_type ($op->{RETURNS}) . "result = " . "force_sysmis ? $miss_ret : $result"); $result = "result"; } print "case $opname:\n"; my ($alloc_func) = "expr_allocate_$op->{RETURNS}{NAME}"; if (@decls) { print " {\n"; print " $_;\n" foreach @decls; print " return $alloc_func (e, $result);\n"; print " }\n"; } else { print " return $alloc_func (e, $result);\n"; } print "\n"; } } sub generate_parse_inc { my (@members) = ("\"\"", "\"\"", 0, 0, 0, "{}", 0, 0); print "{", join (', ', @members), "},\n"; for my $type (@types) { next if $type->{ROLE} eq 'fixed'; my ($human_name) = $type->{HUMAN_NAME}; $human_name = $type->{NAME} if !defined $human_name; my (@members) = ("\"$type->{NAME}\"", "\"$human_name\"", 0, "OP_$type->{NAME}", 0, "{}", 0, 0); print "{", join (', ', @members), "},\n"; } for my $opname (@order) { my ($op) = $ops{$opname}; my (@members); push (@members, "\"$op->{NAME}\""); if ($op->{CATEGORY} eq 'function') { my (@args, @opt_args); for my $arg (@{$op->{ARGS}}) { push (@args, $arg->{TYPE}{HUMAN_NAME}) if !defined $arg->{IDX}; } if (my ($array) = array_arg ($op)) { if (!defined $op->{MIN_VALID}) { my (@array_args); for (my $i = 0; $i < $array->{TIMES}; $i++) { push (@array_args, $array->{TYPE}{HUMAN_NAME}); } push (@args, @array_args); @opt_args = @array_args; } else { for (my $i = 0; $i < $op->{MIN_VALID}; $i++) { push (@args, $array->{TYPE}{HUMAN_NAME}); } push (@opt_args, $array->{TYPE}{HUMAN_NAME}); } } my ($human) = "$op->{NAME}(" . join (', ', @args); $human .= '[, ' . join (', ', @opt_args) . ']...' if @opt_args; $human .= ')'; push (@members, "\"$human\""); } else { push (@members, "NULL"); } my (@flags); push (@flags, "OPF_ABSORB_MISS") if defined $op->{ABSORB_MISS}; push (@flags, "OPF_ARRAY_OPERAND") if array_arg ($op); push (@flags, "OPF_MIN_VALID") if defined $op->{MIN_VALID}; push (@flags, "OPF_NONOPTIMIZABLE") if !$op->{OPTIMIZABLE}; push (@flags, "OPF_EXTENSION") if $op->{EXTENSION}; push (@flags, "OPF_UNIMPLEMENTED") if $op->{UNIMPLEMENTED}; push (@flags, "OPF_PERM_ONLY") if $op->{PERM_ONLY}; push (@flags, "OPF_NO_ABBREV") if $op->{NO_ABBREV}; push (@members, @flags ? join (' | ', @flags) : 0); push (@members, "OP_$op->{RETURNS}{NAME}"); push (@members, scalar (@{$op->{ARGS}})); my (@arg_types) = map ("OP_$_->{TYPE}{NAME}", @{$op->{ARGS}}); push (@members, "{" . join (', ', @arg_types) . "}"); push (@members, $op->{MIN_VALID} || 0); push (@members, array_arg ($op) ? ${array_arg ($op)}{TIMES} : 0); print "{", join (', ', @members), "},\n"; } } # Utilities. # any($target, @list) # # Returns true if $target appears in @list, # false otherwise. sub any { $_ eq $_[0] and return 1 foreach @_[1...$#_]; return 0; } # make_sysmis_decl($op, $min_valid_src) # # Returns a declaration for a boolean variable called `force_sysmis', # which will be true when operation $op should be system-missing. # Returns undef if there are no such circumstances. # # If $op has a minimum number of valid arguments, $min_valid_src # should be an an expression that evaluates to the minimum number of # valid arguments for $op. sub make_sysmis_decl { my ($op, $min_valid_src) = @_; my (@sysmis_cond); if (!$op->{ABSORB_MISS}) { for my $arg (@{$op->{ARGS}}) { my ($arg_name) = "arg_$arg->{NAME}"; if (!defined $arg->{IDX}) { if (any ($arg->{TYPE}, @type{qw (NUMBER BOOLEAN)})) { push (@sysmis_cond, "!is_valid ($arg_name)"); } } elsif ($arg->{TYPE} eq $type{NUMBER}) { my ($a) = "$arg_name"; my ($n) = "arg_$arg->{IDX}"; push (@sysmis_cond, "count_valid ($a, $n) < $n"); } } } elsif (defined $op->{MIN_VALID}) { my ($args) = $op->{ARGS}; my ($arg) = ${$args}[$#{$args}]; my ($a) = "arg_$arg->{NAME}"; my ($n) = "arg_$arg->{IDX}"; push (@sysmis_cond, "count_valid ($a, $n) < $min_valid_src"); } for my $arg (@{$op->{ARGS}}) { push (@sysmis_cond, "!($arg->{CONDITION})") if defined $arg->{CONDITION}; } return "bool force_sysmis = " . join (' || ', @sysmis_cond) if @sysmis_cond; return; } # array_arg($op) # # If $op has an array argument, return it. # Otherwise, returns undef. sub array_arg { my ($op) = @_; my ($args) = $op->{ARGS}; return if !@$args; my ($last_arg) = $args->[@$args - 1]; return $last_arg if defined $last_arg->{IDX}; return; } pspp-1.0.1/src/language/expressions/helpers.h0000644000175000017500000000734013137223525016172 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef EXPRESSIONS_HELPERS_H #define EXPRESSIONS_HELPERS_H #include #include #include #include #include #include #include #include #include "data/calendar.h" #include "data/case.h" #include "data/data-in.h" #include "data/data-out.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/settings.h" #include "data/value.h" #include "data/variable.h" #include "data/vector.h" #include "language/expressions/public.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "math/moments.h" #include "math/random.h" #include "gettext.h" #define _(msgid) gettext (msgid) static inline double check_errno (double x) { return errno == 0 ? x : SYSMIS; } #define check_errno(EXPRESSION) (errno = 0, check_errno (EXPRESSION)) #define DAY_S (60. * 60. * 24.) /* Seconds per day. */ #define DAY_H 24. /* Hours per day. */ #define H_S (60 * 60.) /* Seconds per hour. */ #define H_MIN 60. /* Minutes per hour. */ #define MIN_S 60. /* Seconds per minute. */ #define WEEK_DAY 7. /* Days per week. */ #define WEEK_S (WEEK_DAY * DAY_S) /* Seconds per week. */ extern const struct substring empty_string; int compare_string_3way (const struct substring *, const struct substring *); double expr_ymd_to_date (double year, double month, double day); double expr_ymd_to_ofs (double year, double month, double day); double expr_wkyr_to_date (double wk, double yr); double expr_yrday_to_date (double yr, double day); double expr_yrmoda (double year, double month, double day); double expr_date_difference (double date1, double date2, struct substring unit); double expr_date_sum (double date, double quantity, struct substring unit_name, struct substring method_name); struct substring alloc_string (struct expression *, size_t length); struct substring copy_string (struct expression *, const char *, size_t length); static inline bool is_valid (double d) { return isfinite (d) && d != SYSMIS; } size_t count_valid (double *, size_t); double idf_beta (double P, double a, double b); double ncdf_beta (double x, double a, double b, double lambda); double npdf_beta (double x, double a, double b, double lambda); double cdf_bvnor (double x0, double x1, double r); double idf_fdist (double P, double a, double b); double round_nearest (double x, double mult, double fuzzbits); double round_zero (double x, double mult, double fuzzbits); struct substring replace_string (struct expression *, struct substring haystack, struct substring needle, struct substring replacement, double n); double median (double *, size_t n); #endif /* expressions/helpers.h */ pspp-1.0.1/src/language/expressions/public.h0000644000175000017500000000371012470242642016003 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #if !expr_h #define expr_h 1 #include /* Expression parsing flags. */ enum expr_type { EXPR_NUMBER = 0xf000, /* Number. */ EXPR_STRING, /* String. */ EXPR_BOOLEAN, /* Boolean (number limited to 0, 1, SYSMIS). */ }; struct dictionary; struct expression; struct ccase; struct pool; union value; struct dataset ; struct lexer ; struct expression *expr_parse (struct lexer *lexer, struct dataset *, enum expr_type); struct expression *expr_parse_pool (struct lexer *, struct pool *, struct dataset *, enum expr_type); void expr_free (struct expression *); struct dataset; double expr_evaluate_num (struct expression *, const struct ccase *, int case_idx); void expr_evaluate_str (struct expression *, const struct ccase *, int case_idx, char *dst, size_t dst_size); const struct operation *expr_get_function (size_t idx); size_t expr_get_function_cnt (void); const char *expr_operation_get_name (const struct operation *); const char *expr_operation_get_prototype (const struct operation *); int expr_operation_get_arg_cnt (const struct operation *); #endif /* expr.h */ pspp-1.0.1/src/language/command.c0000644000175000017500000003715513137223525013566 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/command.h" #include #include #include #include #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/session.h" #include "data/settings.h" #include "data/variable.h" #include "language/lexer/command-name.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "output/text-item.h" #include "xalloc.h" #include "xmalloca.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid /* Returns true if RESULT is a valid "enum cmd_result", false otherwise. */ static inline bool cmd_result_is_valid (enum cmd_result result) { switch (result) { case CMD_SUCCESS: case CMD_EOF: case CMD_FINISH: case CMD_DATA_LIST: case CMD_END_CASE: case CMD_END_FILE: case CMD_FAILURE: case CMD_NOT_IMPLEMENTED: case CMD_CASCADING_FAILURE: return true; default: return false; } } /* Returns true if RESULT indicates success, false otherwise. */ bool cmd_result_is_success (enum cmd_result result) { assert (cmd_result_is_valid (result)); return result > 0; } /* Returns true if RESULT indicates failure, false otherwise. */ bool cmd_result_is_failure (enum cmd_result result) { assert (cmd_result_is_valid (result)); return result < 0; } /* Command processing states. */ enum states { S_INITIAL = 0x01, /* Allowed before active dataset defined. */ S_DATA = 0x02, /* Allowed after active dataset defined. */ S_INPUT_PROGRAM = 0x04, /* Allowed in INPUT PROGRAM. */ S_FILE_TYPE = 0x08, /* Allowed in FILE TYPE. */ S_ANY = 0x0f /* Allowed anywhere. */ }; /* Other command requirements. */ enum flags { F_ENHANCED = 0x10, /* Allowed only in enhanced syntax mode. */ F_TESTING = 0x20, /* Allowed only in testing mode. */ F_ABBREV = 0x80 /* Not a candidate for name completion. */ }; /* A single command. */ struct command { enum states states; /* States in which command is allowed. */ enum flags flags; /* Other command requirements. */ const char *name; /* Command name. */ int (*function) (struct lexer *, struct dataset *); /* Function to call. */ }; /* Define the command array. */ #define DEF_CMD(STATES, FLAGS, NAME, FUNCTION) {STATES, FLAGS, NAME, FUNCTION}, #define UNIMPL_CMD(NAME, DESCRIPTION) {S_ANY, 0, NAME, NULL}, static const struct command commands[] = { #include "command.def" }; #undef DEF_CMD #undef UNIMPL_CMD static const size_t command_cnt = sizeof commands / sizeof *commands; static bool in_correct_state (const struct command *, enum cmd_state); static bool report_state_mismatch (const struct command *, enum cmd_state); static void set_completion_state (enum cmd_state); /* Command parser. */ static const struct command *parse_command_name (struct lexer *, int *n_tokens); static enum cmd_result do_parse_command (struct lexer *, struct dataset *, enum cmd_state); /* Parses an entire command, from command name to terminating dot. On failure, skips to the terminating dot. Returns the command's success or failure result. */ enum cmd_result cmd_parse_in_state (struct lexer *lexer, struct dataset *ds, enum cmd_state state) { struct session *session = dataset_session (ds); int result; result = do_parse_command (lexer, ds, state); ds = session_active_dataset (session); assert (!proc_is_open (ds)); unset_cmd_algorithm (); if (!dataset_end_of_command (ds)) result = CMD_CASCADING_FAILURE; return result; } enum cmd_result cmd_parse (struct lexer *lexer, struct dataset *ds) { const struct dictionary *dict = dataset_dict (ds); return cmd_parse_in_state (lexer, ds, dataset_has_source (ds) && dict_get_var_cnt (dict) > 0 ? CMD_STATE_DATA : CMD_STATE_INITIAL); } /* Parses an entire command, from command name to terminating dot. */ static enum cmd_result do_parse_command (struct lexer *lexer, struct dataset *ds, enum cmd_state state) { const struct command *command = NULL; enum cmd_result result; bool opened = false; int n_tokens; /* Read the command's first token. */ set_completion_state (state); if (lex_token (lexer) == T_STOP) { result = CMD_EOF; goto finish; } else if (lex_token (lexer) == T_ENDCMD) { /* Null commands can result from extra empty lines. */ result = CMD_SUCCESS; goto finish; } /* Parse the command name. */ command = parse_command_name (lexer, &n_tokens); if (command == NULL) { result = CMD_FAILURE; goto finish; } text_item_submit (text_item_create (TEXT_ITEM_COMMAND_OPEN, command->name)); opened = true; if (command->function == NULL) { msg (SE, _("%s is not yet implemented."), command->name); result = CMD_NOT_IMPLEMENTED; } else if ((command->flags & F_TESTING) && !settings_get_testing_mode ()) { msg (SE, _("%s may be used only in testing mode."), command->name); result = CMD_FAILURE; } else if ((command->flags & F_ENHANCED) && settings_get_syntax () != ENHANCED) { msg (SE, _("%s may be used only in enhanced syntax mode."), command->name); result = CMD_FAILURE; } else if (!in_correct_state (command, state)) { report_state_mismatch (command, state); result = CMD_FAILURE; } else { /* Execute command. */ int i; for (i = 0; i < n_tokens; i++) lex_get (lexer); result = command->function (lexer, ds); } assert (cmd_result_is_valid (result)); finish: if (cmd_result_is_failure (result)) lex_interactive_reset (lexer); else if (result == CMD_SUCCESS) result = lex_end_of_command (lexer); lex_discard_rest_of_command (lexer); if (result != CMD_EOF && result != CMD_FINISH) while (lex_token (lexer) == T_ENDCMD) lex_get (lexer); if (opened) text_item_submit (text_item_create (TEXT_ITEM_COMMAND_CLOSE, command->name)); return result; } static int find_best_match (struct substring s, const struct command **matchp) { const struct command *cmd; struct command_matcher cm; int missing_words; command_matcher_init (&cm, s); for (cmd = commands; cmd < &commands[command_cnt]; cmd++) command_matcher_add (&cm, ss_cstr (cmd->name), CONST_CAST (void *, cmd)); *matchp = command_matcher_get_match (&cm); missing_words = command_matcher_get_missing_words (&cm); command_matcher_destroy (&cm); return missing_words; } static bool parse_command_word (struct lexer *lexer, struct string *s, int n) { bool need_space = ds_last (s) != EOF && ds_last (s) != '-'; switch (lex_next_token (lexer, n)) { case T_DASH: ds_put_byte (s, '-'); return true; case T_ID: if (need_space) ds_put_byte (s, ' '); ds_put_cstr (s, lex_next_tokcstr (lexer, n)); return true; case T_POS_NUM: if (lex_next_is_integer (lexer, n)) { int integer = lex_next_integer (lexer, n); if (integer >= 0) { if (need_space) ds_put_byte (s, ' '); ds_put_format (s, "%ld", lex_next_integer (lexer, n)); return true; } } return false; default: return false; } } /* Parses the command name. On success returns a pointer to the corresponding struct command and stores the number of tokens in the command name into *N_TOKENS. On failure, returns a null pointer and stores the number of tokens required to determine that no command name was present into *N_TOKENS. */ static const struct command * parse_command_name (struct lexer *lexer, int *n_tokens) { const struct command *command; int missing_words; struct string s; int word; command = NULL; missing_words = 0; ds_init_empty (&s); word = 0; while (parse_command_word (lexer, &s, word)) { missing_words = find_best_match (ds_ss (&s), &command); if (missing_words <= 0) break; word++; } if (command == NULL && missing_words > 0) { ds_put_cstr (&s, " ."); missing_words = find_best_match (ds_ss (&s), &command); ds_truncate (&s, ds_length (&s) - 2); } if (command == NULL) { if (ds_is_empty (&s)) lex_error (lexer, _("expecting command name")); else msg (SE, _("Unknown command `%s'."), ds_cstr (&s)); } ds_destroy (&s); *n_tokens = (word + 1) + missing_words; return command; } /* Returns true if COMMAND is allowed in STATE, false otherwise. */ static bool in_correct_state (const struct command *command, enum cmd_state state) { return ((state == CMD_STATE_INITIAL && command->states & S_INITIAL) || (state == CMD_STATE_DATA && command->states & S_DATA) || (state == CMD_STATE_INPUT_PROGRAM && command->states & S_INPUT_PROGRAM) || (state == CMD_STATE_FILE_TYPE && command->states & S_FILE_TYPE)); } /* Emits an appropriate error message for trying to invoke COMMAND in STATE. */ static bool report_state_mismatch (const struct command *command, enum cmd_state state) { assert (!in_correct_state (command, state)); if (state == CMD_STATE_INITIAL || state == CMD_STATE_DATA) { switch ((int) command->states) { /* One allowed state. */ case S_INITIAL: msg (SE, _("%s is allowed only before the active dataset has " "been defined."), command->name); break; case S_DATA: msg (SE, _("%s is allowed only after the active dataset has " "been defined."), command->name); break; case S_INPUT_PROGRAM: msg (SE, _("%s is allowed only inside %s."), command->name, "INPUT PROGRAM"); break; case S_FILE_TYPE: msg (SE, _("%s is allowed only inside %s."), command->name, "FILE TYPE"); break; /* Two allowed states. */ case S_INITIAL | S_DATA: NOT_REACHED (); case S_INITIAL | S_INPUT_PROGRAM: msg (SE, _("%s is allowed only before the active dataset has been defined or inside %s."), command->name, "INPUT PROGRAM"); break; case S_INITIAL | S_FILE_TYPE: msg (SE, _("%s is allowed only before the active dataset has been defined or inside %s."), command->name, "FILE TYPE"); break; case S_DATA | S_INPUT_PROGRAM: msg (SE, _("%s is allowed only after the active dataset has been defined or inside %s."), command->name, "INPUT PROGRAM"); break; case S_DATA | S_FILE_TYPE: msg (SE, _("%s is allowed only after the active dataset has been defined or inside %s."), command->name, "FILE TYPE"); break; case S_INPUT_PROGRAM | S_FILE_TYPE: msg (SE, _("%s is allowed only inside %s or inside %s."), command->name, "INPUT PROGRAM", "FILE TYPE"); break; /* Three allowed states. */ case S_DATA | S_INPUT_PROGRAM | S_FILE_TYPE: msg (SE, _("%s is allowed only after the active dataset has " "been defined, inside INPUT PROGRAM, or inside " "FILE TYPE."), command->name); break; case S_INITIAL | S_INPUT_PROGRAM | S_FILE_TYPE: msg (SE, _("%s is allowed only before the active dataset has " "been defined, inside INPUT PROGRAM, or inside " "FILE TYPE."), command->name); break; case S_INITIAL | S_DATA | S_FILE_TYPE: NOT_REACHED (); case S_INITIAL | S_DATA | S_INPUT_PROGRAM: NOT_REACHED (); /* Four allowed states. */ case S_INITIAL | S_DATA | S_INPUT_PROGRAM | S_FILE_TYPE: NOT_REACHED (); default: NOT_REACHED (); } } else if (state == CMD_STATE_INPUT_PROGRAM) msg (SE, _("%s is not allowed inside %s."), command->name, "INPUT PROGRAM" ); else if (state == CMD_STATE_FILE_TYPE) msg (SE, _("%s is not allowed inside %s."), command->name, "FILE TYPE"); return false; } /* Command name completion. */ static enum cmd_state completion_state = CMD_STATE_INITIAL; static void set_completion_state (enum cmd_state state) { completion_state = state; } /* Returns the next possible completion of a command name that begins with PREFIX, in the current command state, or a null pointer if no completions remain. Before calling the first time, set *CMD to a null pointer. */ const char * cmd_complete (const char *prefix, const struct command **cmd) { if (*cmd == NULL) *cmd = commands; for (; *cmd < commands + command_cnt; (*cmd)++) if (!memcasecmp ((*cmd)->name, prefix, strlen (prefix)) && (!((*cmd)->flags & F_TESTING) || settings_get_testing_mode ()) && (!((*cmd)->flags & F_ENHANCED) || settings_get_syntax () == ENHANCED) && !((*cmd)->flags & F_ABBREV) && ((*cmd)->function != NULL) && in_correct_state (*cmd, completion_state)) return (*cmd)++->name; return NULL; } /* Simple commands. */ /* Parse and execute FINISH command. */ int cmd_finish (struct lexer *lexer UNUSED, struct dataset *ds UNUSED) { return CMD_FINISH; } /* Parses the N command. */ int cmd_n_of_cases (struct lexer *lexer, struct dataset *ds) { /* Value for N. */ int x; if (!lex_force_int (lexer)) return CMD_FAILURE; x = lex_integer (lexer); lex_get (lexer); if (!lex_match_id (lexer, "ESTIMATED")) dict_set_case_limit (dataset_dict (ds), x); return CMD_SUCCESS; } /* Parses, performs the EXECUTE procedure. */ int cmd_execute (struct lexer *lexer UNUSED, struct dataset *ds) { bool ok = casereader_destroy (proc_open (ds)); if (!proc_commit (ds) || !ok) return CMD_CASCADING_FAILURE; return CMD_SUCCESS; } /* Parses, performs the ERASE command. */ int cmd_erase (struct lexer *lexer, struct dataset *ds UNUSED) { char *filename; int retval; if (settings_get_safer_mode ()) { msg (SE, _("This command not allowed when the %s option is set."), "SAFER"); return CMD_FAILURE; } if (!lex_force_match_id (lexer, "FILE")) return CMD_FAILURE; lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) return CMD_FAILURE; filename = utf8_to_filename (lex_tokcstr (lexer)); retval = remove (filename); free (filename); if (retval == -1) { msg (SW, _("Error removing `%s': %s."), lex_tokcstr (lexer), strerror (errno)); return CMD_FAILURE; } lex_get (lexer); return CMD_SUCCESS; } /* Parses, performs the NEW FILE command. */ int cmd_new_file (struct lexer *lexer UNUSED, struct dataset *ds) { dataset_clear (ds); return CMD_SUCCESS; } pspp-1.0.1/src/language/tests/0000755000175000017500000000000013150620333013204 500000000000000pspp-1.0.1/src/language/tests/pool-test.c0000644000175000017500000000575712470243700015237 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2000, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include "libpspp/pool.h" #include "language/command.h" #define N_ITERATIONS 8192 #define N_FILES 16 /* Self-test routine. This is not exhaustive, but it can be useful. */ int cmd_debug_pool (struct lexer *lexer UNUSED, struct dataset *ds UNUSED) { int seed = time (0) * 257 % 32768; for (;;) { struct pool *pool; struct pool_mark m1, m2; FILE *files[N_FILES]; int cur_file; long i; printf ("Random number seed: %d\n", seed); srand (seed++); printf ("Creating pool...\n"); pool = pool_create (); printf ("Marking pool state...\n"); pool_mark (pool, &m1); printf (" Populating pool with random-sized small objects...\n"); for (i = 0; i < N_ITERATIONS; i++) { size_t size = rand () % MAX_SUBALLOC; void *p = pool_alloc (pool, size); memset (p, 0, size); } printf (" Marking pool state...\n"); pool_mark (pool, &m2); printf (" Populating pool with random-sized small " "and large objects...\n"); for (i = 0; i < N_ITERATIONS; i++) { size_t size = rand () % (2 * MAX_SUBALLOC); void *p = pool_alloc (pool, size); memset (p, 0, size); } printf (" Releasing pool state...\n"); pool_release (pool, &m2); printf (" Populating pool with random objects and gizmos...\n"); for (i = 0; i < N_FILES; i++) files[i] = NULL; cur_file = 0; for (i = 0; i < N_ITERATIONS; i++) { int type = rand () % 32; if (type == 0) { if (files[cur_file] != NULL && EOF == pool_fclose (pool, files[cur_file])) printf ("error on fclose: %s\n", strerror (errno)); files[cur_file] = pool_fopen (pool, "/dev/null", "r"); if (++cur_file >= N_FILES) cur_file = 0; } else if (type == 1) pool_create_subpool (pool); else { size_t size = rand () % (2 * MAX_SUBALLOC); void *p = pool_alloc (pool, size); memset (p, 0, size); } } printf ("Releasing pool state...\n"); pool_release (pool, &m1); printf ("Destroying pool...\n"); pool_destroy (pool); putchar ('\n'); } return CMD_SUCCESS; } pspp-1.0.1/src/language/tests/paper-size.c0000644000175000017500000000273412470243700015360 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/string-map.h" #include "output/measure.h" /* Executes the DEBUG PAPER SIZE command. */ int cmd_debug_paper_size (struct lexer *lexer, struct dataset *ds UNUSED) { const char *paper_size; int h, v; if (!lex_force_string (lexer)) return CMD_FAILURE; paper_size = lex_tokcstr (lexer); printf ("\"%s\" => ", paper_size); if (measure_paper (paper_size, &h, &v)) printf ("%.1f x %.1f in, %.0f x %.0f mm\n", h / 72000., v / 72000., h / (72000 / 25.4), v / (72000 / 25.4)); else printf ("error\n"); lex_get (lexer); return CMD_SUCCESS; } pspp-1.0.1/src/language/tests/format-guesser-test.c0000644000175000017500000000336212470243700017217 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/format.h" #include "data/format-guesser.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" /* Executes the DEBUG FORMAT GUESSER command. */ int cmd_debug_format_guesser (struct lexer *lexer, struct dataset *ds UNUSED) { struct fmt_guesser *g; struct fmt_spec format; char format_string[FMT_STRING_LEN_MAX + 1]; g = fmt_guesser_create (); while (lex_is_string (lexer)) { fprintf (stderr, "\"%s\" ", lex_tokcstr (lexer)); fmt_guesser_add (g, lex_tokss (lexer)); lex_get (lexer); } fmt_guesser_guess (g, &format); fmt_to_string (&format, format_string); fprintf (stderr, "=> %s", format_string); msg_disable (); if (!fmt_check_input (&format)) { fmt_fix_input (&format); fmt_to_string (&format, format_string); fprintf (stderr, " (%s)", format_string); } msg_enable (); putc ('\n', stderr); fmt_guesser_destroy (g); return CMD_SUCCESS; } pspp-1.0.1/src/language/tests/float-format.c0000644000175000017500000002217312470242646015703 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/float-format.h" #include #include #include #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/message.h" #include "libpspp/str.h" /* Maximum supported size of a floating-point number, in bytes. */ #define FP_MAX_SIZE 32 /* A floating-point number tagged with its representation. */ struct fp { enum float_format format; /* Format. */ uint8_t data[FP_MAX_SIZE]; /* Representation. */ }; /* Associates a format name with its identifier. */ struct assoc { char name[4]; enum float_format format; }; /* List of floating-point formats. */ static const struct assoc fp_formats[] = { {"ISL", FLOAT_IEEE_SINGLE_LE}, {"ISB", FLOAT_IEEE_SINGLE_BE}, {"IDL", FLOAT_IEEE_DOUBLE_LE}, {"IDB", FLOAT_IEEE_DOUBLE_BE}, {"VF", FLOAT_VAX_F}, {"VD", FLOAT_VAX_D}, {"VG", FLOAT_VAX_G}, {"ZS", FLOAT_Z_SHORT}, {"ZL", FLOAT_Z_LONG}, {"X", FLOAT_HEX}, {"FP", FLOAT_FP}, }; static const size_t format_cnt = sizeof fp_formats / sizeof *fp_formats; /* Parses a floating-point format name into *FORMAT, and returns success. */ static bool parse_float_format (struct lexer *lexer, enum float_format *format) { size_t i; for (i = 0; i < format_cnt; i++) if (lex_match_id (lexer, fp_formats[i].name)) { *format = fp_formats[i].format; return true; } lex_error (lexer, "expecting floating-point format identifier"); return false; } /* Returns the name for the given FORMAT. */ static const char * get_float_format_name (enum float_format format) { size_t i; for (i = 0; i < format_cnt; i++) if (fp_formats[i].format == format) return fp_formats[i].name; NOT_REACHED (); } /* Returns the integer value of (hex) digit C. */ static int digit_value (int c) { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; case 'a': case 'A': return 10; case 'b': case 'B': return 11; case 'c': case 'C': return 12; case 'd': case 'D': return 13; case 'e': case 'E': return 14; case 'f': case 'F': return 15; default: return INT_MAX; } } /* Parses a number in the form FORMAT(STRING), where FORMAT is the name of the format and STRING gives the number's representation. Also supports ordinary floating-point numbers written in decimal notation. Returns success. */ static bool parse_fp (struct lexer *lexer, struct fp *fp) { memset (fp, 0, sizeof *fp); if (lex_is_number (lexer)) { double number = lex_number (lexer); fp->format = FLOAT_NATIVE_DOUBLE; memcpy (fp->data, &number, sizeof number); lex_get (lexer); } else if (lex_token (lexer) == T_ID) { struct substring s; if (!parse_float_format (lexer, &fp->format) || !lex_force_match (lexer, T_LPAREN) || !lex_force_string (lexer)) return false; s = lex_tokss (lexer); if (fp->format != FLOAT_HEX) { size_t i; if (s.length != float_get_size (fp->format) * 2) { msg (SE, "%zu-byte string needed but %zu-byte string " "supplied.", float_get_size (fp->format), s.length); return false; } assert (s.length / 2 <= sizeof fp->data); for (i = 0; i < s.length / 2; i++) { int hi = digit_value (s.string[i * 2]); int lo = digit_value (s.string[i * 2 + 1]); if (hi >= 16 || lo >= 16) { msg (SE, "Invalid hex digit in string."); return false; } fp->data[i] = hi * 16 + lo; } } else { if (s.length >= sizeof fp->data) { msg (SE, "Hexadecimal floating constant too long."); return false; } memcpy (fp->data, s.string, s.length); } lex_get (lexer); if (!lex_force_match (lexer, T_RPAREN)) return false; } else { lex_error (lexer, NULL); return false; } return true; } /* Renders SRC, which contains SRC_SIZE bytes of a floating-point number in the given FORMAT, as relatively human-readable null-terminated string in the DST_SIZE bytes in DST. DST_SIZE must be be large enough to hold the output. */ static void make_printable (enum float_format format, const void *src_, size_t src_size, char *dst, size_t dst_size) { assert (dst_size >= 2 * src_size + 1); if (format != FLOAT_HEX) { const uint8_t *src = src_; while (src_size-- > 0) { sprintf (dst, "%02x", *src++); dst += 2; } *dst = '\0'; } else strncpy (dst, src_, src_size + 1); } /* Checks that RESULT is identical to TO. If so, returns false. If not, issues a helpful error message that includes the given CONVERSION_TYPE and the value that was converted FROM, and returns true. */ static bool mismatch (const struct fp *from, const struct fp *to, char *result, const char *conversion_type) { size_t to_size = float_get_size (to->format); if (!memcmp (to->data, result, to_size)) return false; else { size_t from_size = float_get_size (from->format); char original[FP_MAX_SIZE * 2 + 1]; char expected[FP_MAX_SIZE * 2 + 1]; char actual[FP_MAX_SIZE * 2 + 1]; make_printable (from->format, from->data, from_size, original, sizeof original); make_printable (to->format, to->data, to_size, expected, sizeof expected); make_printable (to->format, result, to_size, actual, sizeof actual); msg (SE, "%s conversion of %s from %s to %s should have produced %s " "but actually produced %s.", conversion_type, original, get_float_format_name (from->format), get_float_format_name (to->format), expected, actual); return true; } } /* Checks that converting FROM into the format of TO yields exactly the data in TO. */ static bool verify_conversion (const struct fp *from, const struct fp *to) { char tmp1[FP_MAX_SIZE], tmp2[FP_MAX_SIZE]; /* First try converting directly. */ float_convert (from->format, from->data, to->format, tmp1); if (mismatch (from, to, tmp1, "Direct")) return false; /* Then convert via FLOAT_FP to prevent short-circuiting that float_convert() does for some conversions (e.g. little<->big endian for IEEE formats). */ float_convert (from->format, from->data, FLOAT_FP, tmp1); float_convert (FLOAT_FP, tmp1, to->format, tmp2); if (mismatch (from, to, tmp2, "Indirect")) return false; return true; } /* Executes the DEBUG FLOAT FORMAT command. */ int cmd_debug_float_format (struct lexer *lexer, struct dataset *ds UNUSED) { struct fp fp[16]; size_t fp_cnt = 0; bool bijective = false; bool ok; for (;;) { if (fp_cnt >= sizeof fp / sizeof *fp) { msg (SE, "Too many values in single command."); return CMD_FAILURE; } if (!parse_fp (lexer, &fp[fp_cnt++])) return CMD_FAILURE; if (lex_token (lexer) == T_ENDCMD && fp_cnt > 1) break; else if (!lex_force_match (lexer, T_EQUALS)) return CMD_FAILURE; if (fp_cnt == 1) { if (lex_match (lexer, T_EQUALS)) bijective = true; else if (lex_match (lexer, T_GT)) bijective = false; else { lex_error (lexer, NULL); return CMD_FAILURE; } } else { if ((bijective && !lex_force_match (lexer, T_EQUALS)) || (!bijective && !lex_force_match (lexer, T_GT))) return CMD_FAILURE; } } ok = true; if (bijective) { size_t i, j; for (i = 0; i < fp_cnt; i++) for (j = 0; j < fp_cnt; j++) if (!verify_conversion (&fp[i], &fp[j])) ok = false; } else { size_t i; for (i = 1; i < fp_cnt; i++) if (!verify_conversion (&fp[i - 1], &fp[i])) ok = false; } return ok ? CMD_SUCCESS : CMD_FAILURE; } pspp-1.0.1/src/language/tests/moments-test.c0000644000175000017500000000700213137223525015735 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/compiler.h" #include "math/moments.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) static bool read_values (struct lexer *lexer, double **values, double **weights, size_t *cnt) { size_t cap = 0; *values = NULL; *weights = NULL; *cnt = 0; while (lex_is_number (lexer)) { double value = lex_tokval (lexer); double weight = 1.; lex_get (lexer); if (lex_match (lexer, T_ASTERISK)) { if (!lex_is_number (lexer)) { lex_error (lexer, _("expecting weight value")); return false; } weight = lex_tokval (lexer); lex_get (lexer); } if (*cnt >= cap) { cap = 2 * (cap + 8); *values = xnrealloc (*values, cap, sizeof **values); *weights = xnrealloc (*weights, cap, sizeof **weights); } (*values)[*cnt] = value; (*weights)[*cnt] = weight; (*cnt)++; } return true; } int cmd_debug_moments (struct lexer *lexer, struct dataset *ds UNUSED) { int retval = CMD_FAILURE; double *values = NULL; double *weights = NULL; double weight, M[4]; int two_pass = 1; size_t cnt; size_t i; if (lex_match_id (lexer, "ONEPASS")) two_pass = 0; if (!lex_force_match (lexer, T_SLASH)) goto done; if (two_pass) { struct moments *m = NULL; m = moments_create (MOMENT_KURTOSIS); if (!read_values (lexer, &values, &weights, &cnt)) { moments_destroy (m); goto done; } for (i = 0; i < cnt; i++) moments_pass_one (m, values[i], weights[i]); for (i = 0; i < cnt; i++) moments_pass_two (m, values[i], weights[i]); moments_calculate (m, &weight, &M[0], &M[1], &M[2], &M[3]); moments_destroy (m); } else { struct moments1 *m = NULL; m = moments1_create (MOMENT_KURTOSIS); if (!read_values (lexer, &values, &weights, &cnt)) { moments1_destroy (m); goto done; } for (i = 0; i < cnt; i++) moments1_add (m, values[i], weights[i]); moments1_calculate (m, &weight, &M[0], &M[1], &M[2], &M[3]); moments1_destroy (m); } fprintf (stderr, "W=%.3f", weight); for (i = 0; i < 4; i++) { fprintf (stderr, " M%zu=", i + 1); if (M[i] == SYSMIS) fprintf (stderr, "sysmis"); else if (fabs (M[i]) <= 0.0005) fprintf (stderr, "0.000"); else fprintf (stderr, "%.3f", M[i]); } fprintf (stderr, "\n"); retval = CMD_SUCCESS; done: free (values); free (weights); return retval; } pspp-1.0.1/src/language/tests/automake.mk0000644000175000017500000000200513137223525015267 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- language_tests_sources = \ src/language/tests/format-guesser-test.c \ src/language/tests/float-format.c \ src/language/tests/moments-test.c \ src/language/tests/paper-size.c \ src/language/tests/pool-test.c pspp-1.0.1/src/language/command.def0000644000175000017500000003365213137223525014100 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2010, 2011, 2013, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Utility commands acceptable anywhere. */ DEF_CMD (S_ANY, F_ENHANCED, "CLOSE FILE HANDLE", cmd_close_file_handle) DEF_CMD (S_ANY, 0, "CACHE", cmd_cache) DEF_CMD (S_ANY, 0, "CD", cmd_cd) DEF_CMD (S_ANY, 0, "DO REPEAT", cmd_do_repeat) DEF_CMD (S_ANY, 0, "END REPEAT", cmd_end_repeat) DEF_CMD (S_ANY, 0, "ECHO", cmd_echo) DEF_CMD (S_ANY, 0, "ERASE", cmd_erase) DEF_CMD (S_ANY, 0, "EXIT", cmd_finish) DEF_CMD (S_ANY, 0, "FILE HANDLE", cmd_file_handle) DEF_CMD (S_ANY, 0, "FILE LABEL", cmd_file_label) DEF_CMD (S_ANY, 0, "FINISH", cmd_finish) DEF_CMD (S_ANY, 0, "HOST", cmd_host) DEF_CMD (S_ANY, 0, "INCLUDE", cmd_include) DEF_CMD (S_ANY, 0, "INSERT", cmd_insert) DEF_CMD (S_ANY, 0, "N OF CASES", cmd_n_of_cases) DEF_CMD (S_ANY, F_ABBREV, "N", cmd_n_of_cases) DEF_CMD (S_ANY, 0, "NEW FILE", cmd_new_file) DEF_CMD (S_ANY, 0, "OUTPUT", cmd_output) DEF_CMD (S_ANY, 0, "PERMISSIONS", cmd_permissions) DEF_CMD (S_ANY, 0, "PRESERVE", cmd_preserve) DEF_CMD (S_ANY, F_ABBREV, "Q", cmd_finish) DEF_CMD (S_ANY, 0, "QUIT", cmd_finish) DEF_CMD (S_ANY, 0, "RESTORE", cmd_restore) DEF_CMD (S_ANY, 0, "SET", cmd_set) DEF_CMD (S_ANY, 0, "SHOW", cmd_show) DEF_CMD (S_ANY, 0, "SUBTITLE", cmd_subtitle) DEF_CMD (S_ANY, 0, "SYSFILE INFO", cmd_sysfile_info) DEF_CMD (S_ANY, 0, "TITLE", cmd_title) /* Commands that define (or replace) the active dataset. */ DEF_CMD (S_INITIAL | S_DATA, 0, "ADD FILES", cmd_add_files) DEF_CMD (S_INITIAL | S_DATA | S_INPUT_PROGRAM | S_FILE_TYPE, 0, "DATA LIST", cmd_data_list) DEF_CMD (S_INITIAL | S_DATA, 0, "GET", cmd_get) DEF_CMD (S_INITIAL | S_DATA, 0, "GET DATA", cmd_get_data) DEF_CMD (S_INITIAL | S_DATA, 0, "IMPORT", cmd_import) DEF_CMD (S_INITIAL | S_DATA, 0, "INPUT PROGRAM", cmd_input_program) DEF_CMD (S_INITIAL | S_DATA, 0, "MATCH FILES", cmd_match_files) DEF_CMD (S_INITIAL | S_DATA | S_INPUT_PROGRAM | S_FILE_TYPE, 0, "MATRIX DATA", cmd_matrix) DEF_CMD (S_INITIAL | S_DATA, 0, "UPDATE", cmd_update) DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET ACTIVATE", cmd_dataset_activate) DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET DECLARE", cmd_dataset_declare) DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET CLOSE", cmd_dataset_close) DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET COPY", cmd_dataset_copy) DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET NAME", cmd_dataset_name) DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET DISPLAY", cmd_dataset_display) /* Transformations and utilities that may appear after active file definition or within INPUT PROGRAM. */ DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "ADD VALUE LABELS", cmd_add_value_labels) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "ADD DOCUMENT", cmd_add_documents) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "APPLY DICTIONARY", cmd_apply_dictionary) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "BREAK", cmd_break) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "COMPUTE", cmd_compute) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "DATAFILE ATTRIBUTE", cmd_datafile_attribute) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "DISPLAY", cmd_display) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "DOCUMENT", cmd_document) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "DO IF", cmd_do_if) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "DROP DOCUMENTS", cmd_drop_documents) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "ELSE IF", cmd_else_if) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "ELSE", cmd_else) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "END IF", cmd_end_if) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "END LOOP", cmd_end_loop) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "FORMATS", cmd_formats) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "IF", cmd_if) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "LEAVE", cmd_leave) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "LOOP", cmd_loop) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "MISSING VALUES", cmd_missing_values) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "MRSETS", cmd_mrsets) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "NUMERIC", cmd_numeric) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "PRINT EJECT", cmd_print_eject) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "PRINT FORMATS", cmd_print_formats) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "PRINT SPACE", cmd_print_space) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "PRINT", cmd_print) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "RECODE", cmd_recode) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "SELECT IF", cmd_select_if) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "SPLIT FILE", cmd_split_file) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "STRING", cmd_string) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "VALUE LABELS", cmd_value_labels) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "VARIABLE ALIGNMENT", cmd_variable_alignment) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "VARIABLE ATTRIBUTE", cmd_variable_attribute) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "VARIABLE LABELS", cmd_variable_labels) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "VARIABLE LEVEL", cmd_variable_level) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "VARIABLE ROLE", cmd_variable_role) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "VARIABLE WIDTH", cmd_variable_width) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "VECTOR", cmd_vector) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "WEIGHT", cmd_weight) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "WRITE FORMATS", cmd_write_formats) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "WRITE", cmd_write) DEF_CMD (S_DATA | S_INPUT_PROGRAM, F_ENHANCED, "XEXPORT", cmd_xexport) DEF_CMD (S_DATA | S_INPUT_PROGRAM, 0, "XSAVE", cmd_xsave) /* Commands that may appear after active dataset definition. */ DEF_CMD (S_DATA, 0, "AGGREGATE", cmd_aggregate) DEF_CMD (S_DATA, 0, "AUTORECODE", cmd_autorecode) DEF_CMD (S_DATA, 0, "BEGIN DATA", cmd_begin_data) DEF_CMD (S_DATA, 0, "COUNT", cmd_count) DEF_CMD (S_DATA, 0, "CROSSTABS", cmd_crosstabs) DEF_CMD (S_DATA, 0, "CORRELATIONS", cmd_correlation) DEF_CMD (S_DATA, 0, "DELETE VARIABLES", cmd_delete_variables) DEF_CMD (S_DATA, 0, "DESCRIPTIVES", cmd_descriptives) DEF_CMD (S_DATA, 0, "EXAMINE", cmd_examine) DEF_CMD (S_DATA, 0, "EXECUTE", cmd_execute) DEF_CMD (S_DATA, 0, "EXPORT", cmd_export) DEF_CMD (S_DATA, 0, "FACTOR", cmd_factor) DEF_CMD (S_DATA, 0, "FILTER", cmd_filter) DEF_CMD (S_DATA, 0, "FLIP", cmd_flip) DEF_CMD (S_DATA, 0, "FREQUENCIES", cmd_frequencies) DEF_CMD (S_DATA, 0, "GLM", cmd_glm) DEF_CMD (S_DATA, 0, "GRAPH", cmd_graph) DEF_CMD (S_DATA, 0, "LIST", cmd_list) DEF_CMD (S_DATA, 0, "LOGISTIC REGRESSION", cmd_logistic) DEF_CMD (S_DATA, 0, "MEANS", cmd_means) DEF_CMD (S_DATA, 0, "MODIFY VARS", cmd_modify_vars) DEF_CMD (S_DATA, 0, "NPAR TESTS", cmd_npar_tests) DEF_CMD (S_DATA, 0, "ONEWAY", cmd_oneway) DEF_CMD (S_DATA, 0, "PEARSON CORRELATIONS", cmd_correlation) DEF_CMD (S_DATA, 0, "QUICK CLUSTER", cmd_quick_cluster) DEF_CMD (S_DATA, 0, "RANK", cmd_rank) DEF_CMD (S_DATA, 0, "REGRESSION", cmd_regression) DEF_CMD (S_DATA, 0, "RELIABILITY", cmd_reliability) DEF_CMD (S_DATA, 0, "RENAME VARIABLES", cmd_rename_variables) DEF_CMD (S_DATA, 0, "ROC", cmd_roc) DEF_CMD (S_DATA, 0, "SAMPLE", cmd_sample) DEF_CMD (S_DATA, 0, "SAVE", cmd_save) DEF_CMD (S_DATA, 0, "SAVE TRANSLATE", cmd_save_translate) DEF_CMD (S_DATA, 0, "SORT CASES", cmd_sort_cases) DEF_CMD (S_DATA, 0, "SORT VARIABLES", cmd_sort_variables) DEF_CMD (S_DATA, 0, "T-TEST", cmd_t_test) DEF_CMD (S_DATA, 0, "TEMPORARY", cmd_temporary) DEF_CMD (S_DATA, 0, "USE", cmd_use) /* Commands valid only with INPUT PROGRAM. */ DEF_CMD (S_INPUT_PROGRAM, 0, "END CASE", cmd_end_case) DEF_CMD (S_INPUT_PROGRAM, 0, "END FILE", cmd_end_file) DEF_CMD (S_INPUT_PROGRAM, 0, "END INPUT PROGRAM", cmd_end_input_program) DEF_CMD (S_INPUT_PROGRAM, 0, "REREAD", cmd_reread) /* Commands for testing PSPP. */ DEF_CMD (S_ANY, F_TESTING, "DEBUG EVALUATE", cmd_debug_evaluate) DEF_CMD (S_ANY, F_TESTING, "DEBUG FORMAT GUESSER", cmd_debug_format_guesser) DEF_CMD (S_ANY, F_TESTING, "DEBUG MOMENTS", cmd_debug_moments) DEF_CMD (S_ANY, F_TESTING, "DEBUG PAPER SIZE", cmd_debug_paper_size) DEF_CMD (S_ANY, F_TESTING, "DEBUG POOL", cmd_debug_pool) DEF_CMD (S_ANY, F_TESTING, "DEBUG FLOAT FORMAT", cmd_debug_float_format) DEF_CMD (S_ANY, F_TESTING, "DEBUG XFORM FAIL", cmd_debug_xform_fail) /* Unimplemented commands. */ UNIMPL_CMD ("2SLS", "Two stage least squares regression") UNIMPL_CMD ("ACF", "Autocorrelation function") UNIMPL_CMD ("ALSCAL", "Multidimensional scaling") UNIMPL_CMD ("ANACOR", "Correspondence analysis") UNIMPL_CMD ("ANOVA", "Factorial analysis of variance") UNIMPL_CMD ("CASEPLOT", "Plot time series") UNIMPL_CMD ("CASESTOVARS", "Restructure complex data") UNIMPL_CMD ("CATPCA", "Categorical principle components analysis") UNIMPL_CMD ("CATREG", "Categorical regression") UNIMPL_CMD ("CCF", "Time series cross correlation") UNIMPL_CMD ("CLEAR TRANSFORMATIONS", "Clears transformations from active dataset") UNIMPL_CMD ("CLUSTER", "Hierarchical clustering") UNIMPL_CMD ("CONJOINT", "Analyse full concept data") UNIMPL_CMD ("CORRESPONDENCE", "Show correspondence") UNIMPL_CMD ("COXREG", "Cox proportional hazards regression") UNIMPL_CMD ("CREATE", "Create time series data") UNIMPL_CMD ("CSDESCRIPTIVES", "Complex samples descriptives") UNIMPL_CMD ("CSGLM", "Complex samples GLM") UNIMPL_CMD ("CSLOGISTIC", "Complex samples logistic regression") UNIMPL_CMD ("CSPLAN", "Complex samples design") UNIMPL_CMD ("CSSELECT", "Select complex samples") UNIMPL_CMD ("CSTABULATE", "Tabulate complex samples") UNIMPL_CMD ("CTABLES", "Display complex samples") UNIMPL_CMD ("CURVEFIT", "Fit curve to line plot") UNIMPL_CMD ("DATE", "Create time series data") UNIMPL_CMD ("DEFINE", "Syntax macros") UNIMPL_CMD ("DETECTANOMALY", "Find unusual cases") UNIMPL_CMD ("DISCRIMINANT", "Linear discriminant analysis") UNIMPL_CMD ("EDIT", "obsolete") UNIMPL_CMD ("END FILE TYPE", "Ends complex data input") UNIMPL_CMD ("FILE TYPE", "Complex data input") UNIMPL_CMD ("FIT", "Goodness of Fit") UNIMPL_CMD ("GENLOG", "Categorical model fitting") UNIMPL_CMD ("GET TRANSLATE", "Read other file formats") UNIMPL_CMD ("GGRAPH", "Custom defined graphs") UNIMPL_CMD ("HILOGLINEAR", "Hierarchical loglinear models") UNIMPL_CMD ("HOMALS", "Homogeneity analysis") UNIMPL_CMD ("IGRAPH", "Interactive graphs") UNIMPL_CMD ("INFO", "Local Documentation") UNIMPL_CMD ("KEYED DATA LIST", "Read nonsequential data") UNIMPL_CMD ("KM", "Kaplan-Meier") UNIMPL_CMD ("LOGLINEAR", "General model fitting") UNIMPL_CMD ("MANOVA", "Multivariate analysis of variance") UNIMPL_CMD ("MAPS", "Geographical display") UNIMPL_CMD ("MATRIX", "Matrix processing") UNIMPL_CMD ("MCONVERT", "Convert covariance/correlation matrices") UNIMPL_CMD ("MIXED", "Mixed linear models") UNIMPL_CMD ("MODEL CLOSE", "Close server connection") UNIMPL_CMD ("MODEL HANDLE", "Define server connection") UNIMPL_CMD ("MODEL LIST", "Show existing models") UNIMPL_CMD ("MODEL NAME", "Specify model label") UNIMPL_CMD ("MULTIPLE CORRESPONDENCE", "Multiple correspondence analysis") UNIMPL_CMD ("MULT RESPONSE", "Multiple response analysis") UNIMPL_CMD ("MVA", "Missing value analysis") UNIMPL_CMD ("NAIVEBAYES", "Small sample bayesian prediction") UNIMPL_CMD ("NLR", "Non Linear Regression") UNIMPL_CMD ("NOMREG", "Multinomial logistic regression") UNIMPL_CMD ("NONPAR CORR", "Nonparametric correlation") UNIMPL_CMD ("NUMBERED", "") UNIMPL_CMD ("OLAP CUBES", "On-line analytical processing") UNIMPL_CMD ("OMS", "Output management") UNIMPL_CMD ("ORTHOPLAN", "Orthogonal effects design") UNIMPL_CMD ("OVERALS", "Nonlinear canonical correlation") UNIMPL_CMD ("PACF", "Partial autocorrelation") UNIMPL_CMD ("PARTIAL CORR", "Partial correlation") UNIMPL_CMD ("PLANCARDS", "Conjoint analysis planning") UNIMPL_CMD ("PLUM", "Estimate ordinal regression models") UNIMPL_CMD ("POINT", "Marker in keyed file") UNIMPL_CMD ("PPLOT", "Plot time series variables") UNIMPL_CMD ("PREDICT", "Specify forecast period") UNIMPL_CMD ("PREFSCAL", "Multidimensional unfolding") UNIMPL_CMD ("PRINCALS", "PCA by alternating least squares") UNIMPL_CMD ("PROBIT", "Probit analysis") UNIMPL_CMD ("PROCEDURE OUTPUT", "Specify output file") UNIMPL_CMD ("PROXIMITIES", "Pairwise similarity") UNIMPL_CMD ("PROXSCAL", "Multidimensional scaling of proximity data") UNIMPL_CMD ("RATIO STATISTICS", "Descriptives of ratios") UNIMPL_CMD ("READ MODEL", "Read new model") UNIMPL_CMD ("RECORD TYPE", "Defines a type of record within FILE TYPE") UNIMPL_CMD ("REFORMAT", "Read obsolete files") UNIMPL_CMD ("REPEATING DATA", "Specify multiple cases per input record") UNIMPL_CMD ("REPORT", "Pretty print working file") UNIMPL_CMD ("RMV", "Replace missing values") UNIMPL_CMD ("SCRIPT", "Run script file") UNIMPL_CMD ("SEASON", "Estimate seasonal factors") UNIMPL_CMD ("SELECTPRED", "Select predictor variables") UNIMPL_CMD ("SPCHART", "Plot control charts") UNIMPL_CMD ("SPECTRA", "Plot spectral density") UNIMPL_CMD ("STEMLEAF", "Plot stem-and-leaf display") UNIMPL_CMD ("SUMMARIZE", "Univariate statistics") UNIMPL_CMD ("SURVIVAL", "Survival analysis") UNIMPL_CMD ("TDISPLAY", "Display active models") UNIMPL_CMD ("TREE", "Create classification tree") UNIMPL_CMD ("TSAPPLY", "Apply time series model") UNIMPL_CMD ("TSET", "Set time sequence variables") UNIMPL_CMD ("TSHOW", "Show time sequence variables") UNIMPL_CMD ("TSMODEL", "Estimate time series model") UNIMPL_CMD ("TSPLOT", "Plot time sequence variables") UNIMPL_CMD ("TWOSTEP CLUSTER", "Cluster observations") UNIMPL_CMD ("UNIANOVA", "Univariate analysis") UNIMPL_CMD ("UNNUMBERED", "obsolete") UNIMPL_CMD ("VALIDATEDATA", "Identify suspicious cases") UNIMPL_CMD ("VARCOMP", "Estimate variance") UNIMPL_CMD ("VARSTOCASES", "Restructure complex data") UNIMPL_CMD ("VERIFY", "Report time series") UNIMPL_CMD ("WLS", "Weighted least squares regression") UNIMPL_CMD ("XGRAPH", "High resolution charts") pspp-1.0.1/src/language/xforms/0000755000175000017500000000000013150620333013360 500000000000000pspp-1.0.1/src/language/xforms/sample.c0000644000175000017500000000707612470243700014742 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include "data/dataset.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/compiler.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "math/random.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* The two different types of samples. */ enum { TYPE_A_FROM_B, /* 5 FROM 10 */ TYPE_FRACTION /* 0.5 */ }; /* SAMPLE transformation. */ struct sample_trns { int type; /* One of TYPE_*. */ int n, N; /* TYPE_A_FROM_B: n from N. */ int m, t; /* TYPE_A_FROM_B: # picked so far; # so far. */ unsigned frac; /* TYPE_FRACTION: a fraction of UINT_MAX. */ }; static trns_proc_func sample_trns_proc; static trns_free_func sample_trns_free; int cmd_sample (struct lexer *lexer, struct dataset *ds) { struct sample_trns *trns; int type; int a, b; unsigned frac; if (!lex_force_num (lexer)) return CMD_FAILURE; if (!lex_is_integer (lexer)) { unsigned long min = gsl_rng_min (get_rng ()); unsigned long max = gsl_rng_max (get_rng ()); type = TYPE_FRACTION; if (lex_tokval (lexer) <= 0 || lex_tokval (lexer) >= 1) { msg (SE, _("The sampling factor must be between 0 and 1 " "exclusive.")); return CMD_FAILURE; } frac = lex_tokval (lexer) * (max - min) + min; a = b = 0; } else { type = TYPE_A_FROM_B; a = lex_integer (lexer); lex_get (lexer); if (!lex_force_match_id (lexer, "FROM")) return CMD_FAILURE; if (!lex_force_int (lexer)) return CMD_FAILURE; b = lex_integer (lexer); if (a >= b) { msg (SE, _("Cannot sample %d observations from a population of " "%d."), a, b); return CMD_FAILURE; } frac = 0; } lex_get (lexer); trns = xmalloc (sizeof *trns); trns->type = type; trns->n = a; trns->N = b; trns->m = trns->t = 0; trns->frac = frac; add_transformation (ds, sample_trns_proc, sample_trns_free, trns); return CMD_SUCCESS; } /* Executes a SAMPLE transformation. */ static int sample_trns_proc (void *t_, struct ccase **c UNUSED, casenumber case_num UNUSED) { struct sample_trns *t = t_; double U; if (t->type == TYPE_FRACTION) { if (gsl_rng_get (get_rng ()) <= t->frac) return TRNS_CONTINUE; else return TRNS_DROP_CASE; } if (t->m >= t->n) return TRNS_DROP_CASE; U = gsl_rng_uniform (get_rng ()); if ((t->N - t->t) * U >= t->n - t->m) { t->t++; return TRNS_DROP_CASE; } else { t->m++; t->t++; return TRNS_CONTINUE; } } static bool sample_trns_free (void *t_) { struct sample_trns *t = t_; free (t); return true; } pspp-1.0.1/src/language/xforms/fail.c0000644000175000017500000000261612470243700014367 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/case.h" #include "data/dataset.h" #include "data/transformations.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" static int trns_fail (void *x, struct ccase **c, casenumber n); /* A transformation which is guaranteed to fail. */ static int trns_fail (void *x UNUSED, struct ccase **c UNUSED, casenumber n UNUSED) { msg (SE, "DEBUG XFORM FAIL transformation executed"); return TRNS_ERROR; } int cmd_debug_xform_fail (struct lexer *lexer UNUSED, struct dataset *ds) { add_transformation (ds, trns_fail, NULL, NULL); return CMD_SUCCESS; } pspp-1.0.1/src/language/xforms/recode.c0000644000175000017500000005407213137223525014724 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include "data/case.h" #include "data/data-in.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Definitions. */ /* Type of source value for RECODE. */ enum map_in_type { MAP_SINGLE, /* Specific value. */ MAP_RANGE, /* Range of values. */ MAP_SYSMIS, /* System missing value. */ MAP_MISSING, /* Any missing value. */ MAP_ELSE, /* Any value. */ MAP_CONVERT /* "123" => 123. */ }; /* Describes input values to be mapped. */ struct map_in { enum map_in_type type; /* One of MAP_*. */ union value x, y; /* Source values. */ }; /* Describes the value used as output from a mapping. */ struct map_out { bool copy_input; /* If true, copy input to output. */ union value value; /* If copy_input false, recoded value. */ int width; /* If copy_input false, output value width. */ }; /* Describes how to recode a single value or range of values into a single value. */ struct mapping { struct map_in in; /* Input values. */ struct map_out out; /* Output value. */ }; /* RECODE transformation. */ struct recode_trns { struct pool *pool; /* Variable types, for convenience. */ enum val_type src_type; /* src_vars[*] type. */ enum val_type dst_type; /* dst_vars[*] type. */ /* Variables. */ const struct variable **src_vars; /* Source variables. */ const struct variable **dst_vars; /* Destination variables. */ const struct dictionary *dst_dict; /* Dictionary of dst_vars */ char **dst_names; /* Name of dest variables, if they're new. */ size_t var_cnt; /* Number of variables. */ /* Mappings. */ struct mapping *mappings; /* Value mappings. */ size_t map_cnt; /* Number of mappings. */ int max_src_width; /* Maximum width of src_vars[*]. */ int max_dst_width; /* Maximum width of any map_out in mappings. */ }; static bool parse_src_vars (struct lexer *, struct recode_trns *, const struct dictionary *dict); static bool parse_mappings (struct lexer *, struct recode_trns *, const char *dict_encoding); static bool parse_dst_vars (struct lexer *, struct recode_trns *, const struct dictionary *dict); static void add_mapping (struct recode_trns *, size_t *map_allocated, const struct map_in *); static bool parse_map_in (struct lexer *lexer, struct map_in *, struct pool *, enum val_type src_type, size_t max_src_width, const char *dict_encoding); static void set_map_in_generic (struct map_in *, enum map_in_type); static void set_map_in_num (struct map_in *, enum map_in_type, double, double); static void set_map_in_str (struct map_in *, struct pool *, struct substring, size_t width, const char *dict_encoding); static bool parse_map_out (struct lexer *lexer, struct pool *, struct map_out *); static void set_map_out_num (struct map_out *, double); static void set_map_out_str (struct map_out *, struct pool *, struct substring); static bool enlarge_dst_widths (struct recode_trns *); static void create_dst_vars (struct recode_trns *, struct dictionary *); static trns_proc_func recode_trns_proc; static trns_free_func recode_trns_free; /* Parser. */ /* Parses the RECODE transformation. */ int cmd_recode (struct lexer *lexer, struct dataset *ds) { do { struct dictionary *dict = dataset_dict (ds); struct recode_trns *trns = pool_create_container (struct recode_trns, pool); /* Parse source variable names, then input to output mappings, then destintation variable names. */ if (!parse_src_vars (lexer, trns, dict) || !parse_mappings (lexer, trns, dict_get_encoding (dict)) || !parse_dst_vars (lexer, trns, dict)) { recode_trns_free (trns); return CMD_FAILURE; } /* Ensure that all the output strings are at least as wide as the widest destination variable. */ if (trns->dst_type == VAL_STRING) { if ( ! enlarge_dst_widths (trns)) { recode_trns_free (trns); return CMD_FAILURE; } } /* Create destination variables, if needed. This must be the final step; otherwise we'd have to delete destination variables on failure. */ trns->dst_dict = dict; if (trns->src_vars != trns->dst_vars) create_dst_vars (trns, dict); /* Done. */ add_transformation (ds, recode_trns_proc, recode_trns_free, trns); } while (lex_match (lexer, T_SLASH)); return CMD_SUCCESS; } /* Parses a set of variables to recode into TRNS->src_vars and TRNS->var_cnt. Sets TRNS->src_type. Returns true if successful, false on parse error. */ static bool parse_src_vars (struct lexer *lexer, struct recode_trns *trns, const struct dictionary *dict) { if (!parse_variables_const (lexer, dict, &trns->src_vars, &trns->var_cnt, PV_SAME_TYPE)) return false; pool_register (trns->pool, free, trns->src_vars); trns->src_type = var_get_type (trns->src_vars[0]); return true; } /* Parses a set of mappings, which take the form (input=output), into TRNS->mappings and TRNS->map_cnt. Sets TRNS->dst_type. Returns true if successful, false on parse error. */ static bool parse_mappings (struct lexer *lexer, struct recode_trns *trns, const char *dict_encoding) { size_t map_allocated; bool have_dst_type; size_t i; /* Find length of longest source variable. */ trns->max_src_width = var_get_width (trns->src_vars[0]); for (i = 1; i < trns->var_cnt; i++) { size_t var_width = var_get_width (trns->src_vars[i]); if (var_width > trns->max_src_width) trns->max_src_width = var_width; } /* Parse the mappings in parentheses. */ trns->mappings = NULL; trns->map_cnt = 0; map_allocated = 0; have_dst_type = false; if (!lex_force_match (lexer, T_LPAREN)) return false; do { enum val_type dst_type; if (!lex_match_id (lexer, "CONVERT")) { struct map_out out; size_t first_map_idx; size_t i; first_map_idx = trns->map_cnt; /* Parse source specifications. */ do { struct map_in in; if (!parse_map_in (lexer, &in, trns->pool, trns->src_type, trns->max_src_width, dict_encoding)) return false; add_mapping (trns, &map_allocated, &in); lex_match (lexer, T_COMMA); } while (!lex_match (lexer, T_EQUALS)); if (!parse_map_out (lexer, trns->pool, &out)) return false; if (out.copy_input) dst_type = trns->src_type; else dst_type = val_type_from_width (out.width); if (have_dst_type && dst_type != trns->dst_type) { msg (SE, _("Inconsistent target variable types. " "Target variables " "must be all numeric or all string.")); return false; } for (i = first_map_idx; i < trns->map_cnt; i++) trns->mappings[i].out = out; } else { /* Parse CONVERT as a special case. */ struct map_in in; set_map_in_generic (&in, MAP_CONVERT); add_mapping (trns, &map_allocated, &in); set_map_out_num (&trns->mappings[trns->map_cnt - 1].out, 0.0); dst_type = VAL_NUMERIC; if (trns->src_type != VAL_STRING || (have_dst_type && trns->dst_type != VAL_NUMERIC)) { msg (SE, _("CONVERT requires string input values and " "numeric output values.")); return false; } } trns->dst_type = dst_type; have_dst_type = true; if (!lex_force_match (lexer, T_RPAREN)) return false; } while (lex_match (lexer, T_LPAREN)); return true; } /* Parses a mapping input value into IN, allocating memory from POOL. The source value type must be provided as SRC_TYPE and, if string, the maximum width of a string source variable must be provided in MAX_SRC_WIDTH. Returns true if successful, false on parse error. */ static bool parse_map_in (struct lexer *lexer, struct map_in *in, struct pool *pool, enum val_type src_type, size_t max_src_width, const char *dict_encoding) { if (lex_match_id (lexer, "ELSE")) set_map_in_generic (in, MAP_ELSE); else if (src_type == VAL_NUMERIC) { if (lex_match_id (lexer, "MISSING")) set_map_in_generic (in, MAP_MISSING); else if (lex_match_id (lexer, "SYSMIS")) set_map_in_generic (in, MAP_SYSMIS); else { double x, y; if (!parse_num_range (lexer, &x, &y, NULL)) return false; set_map_in_num (in, x == y ? MAP_SINGLE : MAP_RANGE, x, y); } } else { if (lex_match_id (lexer, "MISSING")) set_map_in_generic (in, MAP_MISSING); else if (!lex_force_string (lexer)) return false; else { set_map_in_str (in, pool, lex_tokss (lexer), max_src_width, dict_encoding); lex_get (lexer); if (lex_token (lexer) == T_ID && lex_id_match (ss_cstr ("THRU"), lex_tokss (lexer))) { msg (SE, _("%s is not allowed with string variables."), "THRU"); return false; } } } return true; } /* Adds IN to the list of mappings in TRNS. MAP_ALLOCATED is the current number of allocated mappings, which is updated as needed. */ static void add_mapping (struct recode_trns *trns, size_t *map_allocated, const struct map_in *in) { struct mapping *m; if (trns->map_cnt >= *map_allocated) trns->mappings = pool_2nrealloc (trns->pool, trns->mappings, map_allocated, sizeof *trns->mappings); m = &trns->mappings[trns->map_cnt++]; m->in = *in; } /* Sets IN as a mapping of the given TYPE. */ static void set_map_in_generic (struct map_in *in, enum map_in_type type) { in->type = type; } /* Sets IN as a numeric mapping of the given TYPE, with X and Y as the two numeric values. */ static void set_map_in_num (struct map_in *in, enum map_in_type type, double x, double y) { in->type = type; in->x.f = x; in->y.f = y; } /* Sets IN as a string mapping, with STRING as the string, allocated from POOL. The string is padded with spaces on the right to WIDTH characters long. */ static void set_map_in_str (struct map_in *in, struct pool *pool, struct substring string, size_t width, const char *dict_encoding) { char *s = recode_string (dict_encoding, "UTF-8", ss_data (string), ss_length (string)); in->type = MAP_SINGLE; value_init_pool (pool, &in->x, width); value_copy_buf_rpad (&in->x, width, CHAR_CAST (uint8_t *, s), strlen (s), ' '); free (s); } /* Parses a mapping output value into OUT, allocating memory from POOL. Returns true if successful, false on parse error. */ static bool parse_map_out (struct lexer *lexer, struct pool *pool, struct map_out *out) { if (lex_is_number (lexer)) { set_map_out_num (out, lex_number (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "SYSMIS")) set_map_out_num (out, SYSMIS); else if (lex_is_string (lexer)) { set_map_out_str (out, pool, lex_tokss (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "COPY")) { out->copy_input = true; out->width = 0; } else { lex_error (lexer, _("expecting output value")); return false; } return true; } /* Sets OUT as a numeric mapping output with the given VALUE. */ static void set_map_out_num (struct map_out *out, double value) { out->copy_input = false; out->value.f = value; out->width = 0; } /* Sets OUT as a string mapping output with the given VALUE. */ static void set_map_out_str (struct map_out *out, struct pool *pool, const struct substring value) { const char *string = ss_data (value); size_t length = ss_length (value); if (length == 0) { /* A length of 0 will yield a numeric value, which is not what we want. */ string = " "; length = 1; } out->copy_input = false; value_init_pool (pool, &out->value, length); memcpy (value_str_rw (&out->value, length), string, length); out->width = length; } /* Parses a set of target variables into TRNS->dst_vars and TRNS->dst_names. */ static bool parse_dst_vars (struct lexer *lexer, struct recode_trns *trns, const struct dictionary *dict) { size_t i; if (lex_match_id (lexer, "INTO")) { size_t name_cnt; size_t i; if (!parse_mixed_vars_pool (lexer, dict, trns->pool, &trns->dst_names, &name_cnt, PV_NONE)) return false; if (name_cnt != trns->var_cnt) { msg (SE, _("%zu variable(s) cannot be recoded into " "%zu variable(s). Specify the same number " "of variables as source and target variables."), trns->var_cnt, name_cnt); return false; } trns->dst_vars = pool_nalloc (trns->pool, trns->var_cnt, sizeof *trns->dst_vars); for (i = 0; i < trns->var_cnt; i++) { const struct variable *v; v = trns->dst_vars[i] = dict_lookup_var (dict, trns->dst_names[i]); if (v == NULL && trns->dst_type == VAL_STRING) { msg (SE, _("There is no variable named " "%s. (All string variables specified " "on INTO must already exist. Use the " "STRING command to create a string " "variable.)"), trns->dst_names[i]); return false; } } } else { trns->dst_vars = trns->src_vars; if (trns->src_type != trns->dst_type) { msg (SE, _("INTO is required with %s input values " "and %s output values."), trns->src_type == VAL_NUMERIC ? _("numeric") : _("string"), trns->dst_type == VAL_NUMERIC ? _("numeric") : _("string")); return false; } } for (i = 0; i < trns->var_cnt; i++) { const struct variable *v = trns->dst_vars[i]; if (v != NULL && var_get_type (v) != trns->dst_type) { msg (SE, _("Type mismatch. Cannot store %s data in " "%s variable %s."), trns->dst_type == VAL_STRING ? _("string") : _("numeric"), var_is_alpha (v) ? _("string") : _("numeric"), var_get_name (v)); return false; } } return true; } /* Ensures that all the output values in TRNS are as wide as the widest destination variable. */ static bool enlarge_dst_widths (struct recode_trns *trns) { size_t i; const struct variable *narrow_var = NULL; int min_dst_width = INT_MAX; trns->max_dst_width = 0; for (i = 0; i < trns->var_cnt; i++) { const struct variable *v = trns->dst_vars[i]; if (var_get_width (v) > trns->max_dst_width) trns->max_dst_width = var_get_width (v); if (var_get_width (v) < min_dst_width) { min_dst_width = var_get_width (v); narrow_var = v; } } for (i = 0; i < trns->map_cnt; i++) { struct map_out *out = &trns->mappings[i].out; if (!out->copy_input) { if (out->width > min_dst_width) { msg (ME, _("Cannot recode because the variable %s would require a width of %d bytes or greater, but it has a width of only %d bytes."), var_get_name (narrow_var), out->width, min_dst_width); return false; } value_resize_pool (trns->pool, &out->value, out->width, trns->max_dst_width); } } return true; } /* Creates destination variables that don't already exist. */ static void create_dst_vars (struct recode_trns *trns, struct dictionary *dict) { size_t i; for (i = 0; i < trns->var_cnt; i++) { const struct variable **var = &trns->dst_vars[i]; const char *name = trns->dst_names[i]; *var = dict_lookup_var (dict, name); if (*var == NULL) *var = dict_create_var_assert (dict, name, 0); assert (var_get_type (*var) == trns->dst_type); } } /* Data transformation. */ /* Returns the output mapping in TRNS for an input of VALUE on variable V, or a null pointer if there is no mapping. */ static const struct map_out * find_src_numeric (struct recode_trns *trns, double value, const struct variable *v) { struct mapping *m; for (m = trns->mappings; m < trns->mappings + trns->map_cnt; m++) { const struct map_in *in = &m->in; const struct map_out *out = &m->out; bool match; switch (in->type) { case MAP_SINGLE: match = value == in->x.f; break; case MAP_MISSING: match = var_is_num_missing (v, value, MV_ANY); break; case MAP_RANGE: match = value >= in->x.f && value <= in->y.f; break; case MAP_SYSMIS: match = value == SYSMIS; break; case MAP_ELSE: match = true; break; default: NOT_REACHED (); } if (match) return out; } return NULL; } /* Returns the output mapping in TRNS for an input of VALUE with the given WIDTH, or a null pointer if there is no mapping. */ static const struct map_out * find_src_string (struct recode_trns *trns, const uint8_t *value, const struct variable *src_var) { const char *encoding = dict_get_encoding (trns->dst_dict); int width = var_get_width (src_var); struct mapping *m; for (m = trns->mappings; m < trns->mappings + trns->map_cnt; m++) { const struct map_in *in = &m->in; struct map_out *out = &m->out; bool match; switch (in->type) { case MAP_SINGLE: match = !memcmp (value, value_str (&in->x, trns->max_src_width), width); break; case MAP_ELSE: match = true; break; case MAP_CONVERT: { union value uv; char *error; error = data_in (ss_buffer (CHAR_CAST_BUG (char *, value), width), C_ENCODING, FMT_F, &uv, 0, encoding); match = error == NULL; free (error); out->value.f = uv.f; break; } case MAP_MISSING: match = var_is_str_missing (src_var, value, MV_ANY); break; default: NOT_REACHED (); } if (match) return out; } return NULL; } /* Performs RECODE transformation. */ static int recode_trns_proc (void *trns_, struct ccase **c, casenumber case_idx UNUSED) { struct recode_trns *trns = trns_; size_t i; *c = case_unshare (*c); for (i = 0; i < trns->var_cnt; i++) { const struct variable *src_var = trns->src_vars[i]; const struct variable *dst_var = trns->dst_vars[i]; const struct map_out *out; if (trns->src_type == VAL_NUMERIC) out = find_src_numeric (trns, case_num (*c, src_var), src_var); else out = find_src_string (trns, case_str (*c, src_var), src_var); if (trns->dst_type == VAL_NUMERIC) { double *dst = &case_data_rw (*c, dst_var)->f; if (out != NULL) *dst = !out->copy_input ? out->value.f : case_num (*c, src_var); else if (trns->src_vars != trns->dst_vars) *dst = SYSMIS; } else { char *dst = CHAR_CAST_BUG (char *, case_str_rw (*c, dst_var)); if (out != NULL) { if (!out->copy_input) memcpy (dst, value_str (&out->value, trns->max_dst_width), var_get_width (dst_var)); else if (trns->src_vars != trns->dst_vars) { union value *dst_data = case_data_rw (*c, dst_var); const union value *src_data = case_data (*c, src_var); value_copy_rpad (dst_data, var_get_width (dst_var), src_data, var_get_width (src_var), ' '); } } else if (trns->src_vars != trns->dst_vars) memset (dst, ' ', var_get_width (dst_var)); } } return TRNS_CONTINUE; } /* Frees a RECODE transformation. */ static bool recode_trns_free (void *trns_) { struct recode_trns *trns = trns_; pool_destroy (trns->pool); return true; } pspp-1.0.1/src/language/xforms/compute.c0000644000175000017500000003104312523704223015125 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include "data/case.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/transformations.h" #include "data/variable.h" #include "data/vector.h" #include "language/command.h" #include "language/expressions/public.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct compute_trns; struct lvalue; /* Target of a COMPUTE or IF assignment, either a variable or a vector element. */ static struct lvalue *lvalue_parse (struct lexer *lexer, struct dataset *); static int lvalue_get_type (const struct lvalue *); static bool lvalue_is_vector (const struct lvalue *); static void lvalue_finalize (struct lvalue *, struct compute_trns *, struct dictionary *); static void lvalue_destroy (struct lvalue *, struct dictionary *); /* COMPUTE and IF transformation. */ struct compute_trns { /* Test expression (IF only). */ struct expression *test; /* Test expression. */ /* Variable lvalue, if variable != NULL. */ struct variable *variable; /* Destination variable, if any. */ int width; /* Lvalue string width; 0=numeric. */ /* Vector lvalue, if vector != NULL. */ const struct vector *vector; /* Destination vector, if any. */ struct expression *element; /* Destination vector element expr. */ /* Rvalue. */ struct expression *rvalue; /* Rvalue expression. */ }; static struct expression *parse_rvalue (struct lexer *lexer, const struct lvalue *, struct dataset *); static struct compute_trns *compute_trns_create (void); static trns_proc_func *get_proc_func (const struct lvalue *); static trns_free_func compute_trns_free; /* COMPUTE. */ int cmd_compute (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); struct lvalue *lvalue = NULL; struct compute_trns *compute = NULL; compute = compute_trns_create (); lvalue = lvalue_parse (lexer, ds); if (lvalue == NULL) goto fail; if (!lex_force_match (lexer, T_EQUALS)) goto fail; compute->rvalue = parse_rvalue (lexer, lvalue, ds); if (compute->rvalue == NULL) goto fail; add_transformation (ds, get_proc_func (lvalue), compute_trns_free, compute); lvalue_finalize (lvalue, compute, dict); return CMD_SUCCESS; fail: lvalue_destroy (lvalue, dict); compute_trns_free (compute); return CMD_CASCADING_FAILURE; } /* Transformation functions. */ /* Handle COMPUTE or IF with numeric target variable. */ static int compute_num (void *compute_, struct ccase **c, casenumber case_num) { struct compute_trns *compute = compute_; if (compute->test == NULL || expr_evaluate_num (compute->test, *c, case_num) == 1.0) { *c = case_unshare (*c); case_data_rw (*c, compute->variable)->f = expr_evaluate_num (compute->rvalue, *c, case_num); } return TRNS_CONTINUE; } /* Handle COMPUTE or IF with numeric vector element target variable. */ static int compute_num_vec (void *compute_, struct ccase **c, casenumber case_num) { struct compute_trns *compute = compute_; if (compute->test == NULL || expr_evaluate_num (compute->test, *c, case_num) == 1.0) { double index; /* Index into the vector. */ int rindx; /* Rounded index value. */ index = expr_evaluate_num (compute->element, *c, case_num); rindx = floor (index + EPSILON); if (index == SYSMIS || rindx < 1 || rindx > vector_get_var_cnt (compute->vector)) { if (index == SYSMIS) msg (SW, _("When executing COMPUTE: SYSMIS is not a valid value " "as an index into vector %s."), vector_get_name (compute->vector)); else msg (SW, _("When executing COMPUTE: %.*g is not a valid value as " "an index into vector %s."), DBL_DIG + 1, index, vector_get_name (compute->vector)); return TRNS_CONTINUE; } *c = case_unshare (*c); case_data_rw (*c, vector_get_var (compute->vector, rindx - 1))->f = expr_evaluate_num (compute->rvalue, *c, case_num); } return TRNS_CONTINUE; } /* Handle COMPUTE or IF with string target variable. */ static int compute_str (void *compute_, struct ccase **c, casenumber case_num) { struct compute_trns *compute = compute_; if (compute->test == NULL || expr_evaluate_num (compute->test, *c, case_num) == 1.0) { char *s; *c = case_unshare (*c); s = CHAR_CAST_BUG (char *, case_str_rw (*c, compute->variable)); expr_evaluate_str (compute->rvalue, *c, case_num, s, compute->width); } return TRNS_CONTINUE; } /* Handle COMPUTE or IF with string vector element target variable. */ static int compute_str_vec (void *compute_, struct ccase **c, casenumber case_num) { struct compute_trns *compute = compute_; if (compute->test == NULL || expr_evaluate_num (compute->test, *c, case_num) == 1.0) { double index; /* Index into the vector. */ int rindx; /* Rounded index value. */ struct variable *vr; /* Variable reference by indexed vector. */ index = expr_evaluate_num (compute->element, *c, case_num); rindx = floor (index + EPSILON); if (index == SYSMIS) { msg (SW, _("When executing COMPUTE: SYSMIS is not a valid " "value as an index into vector %s."), vector_get_name (compute->vector)); return TRNS_CONTINUE; } else if (rindx < 1 || rindx > vector_get_var_cnt (compute->vector)) { msg (SW, _("When executing COMPUTE: %.*g is not a valid value as " "an index into vector %s."), DBL_DIG + 1, index, vector_get_name (compute->vector)); return TRNS_CONTINUE; } vr = vector_get_var (compute->vector, rindx - 1); *c = case_unshare (*c); expr_evaluate_str (compute->rvalue, *c, case_num, CHAR_CAST_BUG (char *, case_str_rw (*c, vr)), var_get_width (vr)); } return TRNS_CONTINUE; } /* IF. */ int cmd_if (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); struct compute_trns *compute = NULL; struct lvalue *lvalue = NULL; compute = compute_trns_create (); /* Test expression. */ compute->test = expr_parse (lexer, ds, EXPR_BOOLEAN); if (compute->test == NULL) goto fail; /* Lvalue variable. */ lvalue = lvalue_parse (lexer, ds); if (lvalue == NULL) goto fail; /* Rvalue expression. */ if (!lex_force_match (lexer, T_EQUALS)) goto fail; compute->rvalue = parse_rvalue (lexer, lvalue, ds); if (compute->rvalue == NULL) goto fail; add_transformation (ds, get_proc_func (lvalue), compute_trns_free, compute); lvalue_finalize (lvalue, compute, dict); return CMD_SUCCESS; fail: lvalue_destroy (lvalue, dict); compute_trns_free (compute); return CMD_CASCADING_FAILURE; } /* Code common to COMPUTE and IF. */ static trns_proc_func * get_proc_func (const struct lvalue *lvalue) { bool is_numeric = lvalue_get_type (lvalue) == VAL_NUMERIC; bool is_vector = lvalue_is_vector (lvalue); return (is_numeric ? (is_vector ? compute_num_vec : compute_num) : (is_vector ? compute_str_vec : compute_str)); } /* Parses and returns an rvalue expression of the same type as LVALUE, or a null pointer on failure. */ static struct expression * parse_rvalue (struct lexer *lexer, const struct lvalue *lvalue, struct dataset *ds) { bool is_numeric = lvalue_get_type (lvalue) == VAL_NUMERIC; return expr_parse (lexer, ds, is_numeric ? EXPR_NUMBER : EXPR_STRING); } /* Returns a new struct compute_trns after initializing its fields. */ static struct compute_trns * compute_trns_create (void) { struct compute_trns *compute = xmalloc (sizeof *compute); compute->test = NULL; compute->variable = NULL; compute->vector = NULL; compute->element = NULL; compute->rvalue = NULL; return compute; } /* Deletes all the fields in COMPUTE. */ static bool compute_trns_free (void *compute_) { struct compute_trns *compute = compute_; if (compute != NULL) { expr_free (compute->test); expr_free (compute->element); expr_free (compute->rvalue); free (compute); } return true; } /* COMPUTE or IF target variable or vector element. For a variable, the `variable' member is non-null. For a vector element, the `vector' member is non-null. */ struct lvalue { struct variable *variable; /* Destination variable. */ bool is_new_variable; /* Did we create the variable? */ const struct vector *vector; /* Destination vector, if any, or NULL. */ struct expression *element; /* Destination vector element, or NULL. */ }; /* Parses the target variable or vector element into a new `struct lvalue', which is returned. */ static struct lvalue * lvalue_parse (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); struct lvalue *lvalue; lvalue = xmalloc (sizeof *lvalue); lvalue->variable = NULL; lvalue->is_new_variable = false; lvalue->vector = NULL; lvalue->element = NULL; if (!lex_force_id (lexer)) goto lossage; if (lex_next_token (lexer, 1) == T_LPAREN) { /* Vector. */ lvalue->vector = dict_lookup_vector (dict, lex_tokcstr (lexer)); if (lvalue->vector == NULL) { msg (SE, _("There is no vector named %s."), lex_tokcstr (lexer)); goto lossage; } /* Vector element. */ lex_get (lexer); if (!lex_force_match (lexer, T_LPAREN)) goto lossage; lvalue->element = expr_parse (lexer, ds, EXPR_NUMBER); if (lvalue->element == NULL) goto lossage; if (!lex_force_match (lexer, T_RPAREN)) goto lossage; } else { /* Variable name. */ const char *var_name = lex_tokcstr (lexer); lvalue->variable = dict_lookup_var (dict, var_name); if (lvalue->variable == NULL) { lvalue->variable = dict_create_var_assert (dict, var_name, 0); lvalue->is_new_variable = true; } lex_get (lexer); } return lvalue; lossage: lvalue_destroy (lvalue, dict); return NULL; } /* Returns the type (NUMERIC or ALPHA) of the target variable or vector in LVALUE. */ static int lvalue_get_type (const struct lvalue *lvalue) { return (lvalue->variable != NULL ? var_get_type (lvalue->variable) : vector_get_type (lvalue->vector)); } /* Returns true if LVALUE has a vector as its target. */ static bool lvalue_is_vector (const struct lvalue *lvalue) { return lvalue->vector != NULL; } /* Finalizes making LVALUE the target of COMPUTE, by creating the target variable if necessary and setting fields in COMPUTE. */ static void lvalue_finalize (struct lvalue *lvalue, struct compute_trns *compute, struct dictionary *dict) { if (lvalue->vector == NULL) { compute->variable = lvalue->variable; compute->width = var_get_width (compute->variable); /* Goofy behavior, but compatible: Turn off LEAVE. */ if (!var_must_leave (compute->variable)) var_set_leave (compute->variable, false); /* Prevent lvalue_destroy from deleting variable. */ lvalue->is_new_variable = false; } else { compute->vector = lvalue->vector; compute->element = lvalue->element; lvalue->element = NULL; } lvalue_destroy (lvalue, dict); } /* Destroys LVALUE. */ static void lvalue_destroy (struct lvalue *lvalue, struct dictionary *dict) { if (lvalue == NULL) return; if (lvalue->is_new_variable) dict_delete_var (dict, lvalue->variable); expr_free (lvalue->element); free (lvalue); } pspp-1.0.1/src/language/xforms/automake.mk0000644000175000017500000000201413137223525015443 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- language_xforms_sources = \ src/language/xforms/compute.c \ src/language/xforms/count.c \ src/language/xforms/fail.c \ src/language/xforms/sample.c \ src/language/xforms/recode.c \ src/language/xforms/select-if.c pspp-1.0.1/src/language/xforms/select-if.c0000644000175000017500000000630712470243700015330 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/expressions/public.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* SELECT IF transformation. */ struct select_if_trns { struct expression *e; /* Test expression. */ }; static trns_proc_func select_if_proc; static trns_free_func select_if_free; /* Parses the SELECT IF transformation. */ int cmd_select_if (struct lexer *lexer, struct dataset *ds) { struct expression *e; struct select_if_trns *t; e = expr_parse (lexer, ds, EXPR_BOOLEAN); if (!e) return CMD_CASCADING_FAILURE; if (lex_token (lexer) != T_ENDCMD) { expr_free (e); lex_error (lexer, _("expecting end of command")); return CMD_CASCADING_FAILURE; } t = xmalloc (sizeof *t); t->e = e; add_transformation (ds, select_if_proc, select_if_free, t); return CMD_SUCCESS; } /* Performs the SELECT IF transformation T on case C. */ static int select_if_proc (void *t_, struct ccase **c, casenumber case_num) { struct select_if_trns *t = t_; return (expr_evaluate_num (t->e, *c, case_num) == 1.0 ? TRNS_CONTINUE : TRNS_DROP_CASE); } /* Frees SELECT IF transformation T. */ static bool select_if_free (void *t_) { struct select_if_trns *t = t_; expr_free (t->e); free (t); return true; } /* Parses the FILTER command. */ int cmd_filter (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); if (lex_match_id (lexer, "OFF")) dict_set_filter (dict, NULL); else if (lex_token (lexer) == T_ENDCMD) { msg (SW, _("Syntax error expecting OFF or BY. " "Turning off case filtering.")); dict_set_filter (dict, NULL); } else { struct variable *v; lex_match (lexer, T_BY); v = parse_variable (lexer, dict); if (!v) return CMD_FAILURE; if (var_is_alpha (v)) { msg (SE, _("The filter variable must be numeric.")); return CMD_FAILURE; } if (dict_class_from_id (var_get_name (v)) == DC_SCRATCH) { msg (SE, _("The filter variable may not be scratch.")); return CMD_FAILURE; } dict_set_filter (dict, v); } return CMD_SUCCESS; } pspp-1.0.1/src/language/xforms/count.c0000644000175000017500000002330112523704223014577 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/case.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Value or range? */ enum value_type { CNT_SINGLE, /* Single value. */ CNT_RANGE /* a <= x <= b. */ }; /* Numeric count criteria. */ struct num_value { enum value_type type; /* How to interpret a, b. */ double a, b; /* Values to count. */ }; struct criteria { struct criteria *next; /* Variables to count. */ const struct variable **vars; size_t var_cnt; /* Count special values? */ bool count_system_missing; /* Count system missing? */ bool count_user_missing; /* Count user missing? */ /* Criterion values. */ size_t value_cnt; union { struct num_value *num; char **str; } values; }; struct dst_var { struct dst_var *next; struct variable *var; /* Destination variable. */ char *name; /* Name of dest var. */ struct criteria *crit; /* The criteria specifications. */ }; struct count_trns { struct dst_var *dst_vars; struct pool *pool; }; static trns_proc_func count_trns_proc; static trns_free_func count_trns_free; static bool parse_numeric_criteria (struct lexer *, struct pool *, struct criteria *); static bool parse_string_criteria (struct lexer *, struct pool *, struct criteria *, const char *dict_encoding); int cmd_count (struct lexer *lexer, struct dataset *ds) { struct dst_var *dv; /* Destination var being parsed. */ struct count_trns *trns; /* Transformation. */ /* Parses each slash-delimited specification. */ trns = pool_create_container (struct count_trns, pool); trns->dst_vars = dv = pool_alloc (trns->pool, sizeof *dv); for (;;) { struct criteria *crit; /* Initialize this struct dst_var to ensure proper cleanup. */ dv->next = NULL; dv->var = NULL; dv->crit = NULL; /* Get destination variable, or at least its name. */ if (!lex_force_id (lexer)) goto fail; dv->var = dict_lookup_var (dataset_dict (ds), lex_tokcstr (lexer)); if (dv->var != NULL) { if (var_is_alpha (dv->var)) { msg (SE, _("Destination cannot be a string variable.")); goto fail; } } else dv->name = pool_strdup (trns->pool, lex_tokcstr (lexer)); lex_get (lexer); if (!lex_force_match (lexer, T_EQUALS)) goto fail; crit = dv->crit = pool_alloc (trns->pool, sizeof *crit); for (;;) { struct dictionary *dict = dataset_dict (ds); bool ok; crit->next = NULL; crit->vars = NULL; if (!parse_variables_const (lexer, dict, &crit->vars, &crit->var_cnt, PV_DUPLICATE | PV_SAME_TYPE)) goto fail; pool_register (trns->pool, free, crit->vars); if (!lex_force_match (lexer, T_LPAREN)) goto fail; crit->value_cnt = 0; if (var_is_numeric (crit->vars[0])) ok = parse_numeric_criteria (lexer, trns->pool, crit); else ok = parse_string_criteria (lexer, trns->pool, crit, dict_get_encoding (dict)); if (!ok) goto fail; if (lex_token (lexer) == T_SLASH || lex_token (lexer) == T_ENDCMD) break; crit = crit->next = pool_alloc (trns->pool, sizeof *crit); } if (lex_token (lexer) == T_ENDCMD) break; if (!lex_force_match (lexer, T_SLASH)) goto fail; dv = dv->next = pool_alloc (trns->pool, sizeof *dv); } /* Create all the nonexistent destination variables. */ for (dv = trns->dst_vars; dv; dv = dv->next) if (dv->var == NULL) { /* It's valid, though motivationally questionable, to count to the same dest var more than once. */ dv->var = dict_lookup_var (dataset_dict (ds), dv->name); if (dv->var == NULL) dv->var = dict_create_var_assert (dataset_dict (ds), dv->name, 0); } add_transformation (ds, count_trns_proc, count_trns_free, trns); return CMD_SUCCESS; fail: count_trns_free (trns); return CMD_FAILURE; } /* Parses a set of numeric criterion values. Returns success. */ static bool parse_numeric_criteria (struct lexer *lexer, struct pool *pool, struct criteria *crit) { size_t allocated = 0; crit->values.num = NULL; crit->count_system_missing = false; crit->count_user_missing = false; for (;;) { double low, high; if (lex_match_id (lexer, "SYSMIS")) crit->count_system_missing = true; else if (lex_match_id (lexer, "MISSING")) crit->count_system_missing = crit->count_user_missing = true; else if (parse_num_range (lexer, &low, &high, NULL)) { struct num_value *cur; if (crit->value_cnt >= allocated) crit->values.num = pool_2nrealloc (pool, crit->values.num, &allocated, sizeof *crit->values.num); cur = &crit->values.num[crit->value_cnt++]; cur->type = low == high ? CNT_SINGLE : CNT_RANGE; cur->a = low; cur->b = high; } else return false; lex_match (lexer, T_COMMA); if (lex_match (lexer, T_RPAREN)) break; } return true; } /* Parses a set of string criteria values. Returns success. */ static bool parse_string_criteria (struct lexer *lexer, struct pool *pool, struct criteria *crit, const char *dict_encoding) { int len = 0; size_t allocated = 0; size_t i; for (i = 0; i < crit->var_cnt; i++) if (var_get_width (crit->vars[i]) > len) len = var_get_width (crit->vars[i]); crit->values.str = NULL; for (;;) { char **cur; char *s; if (crit->value_cnt >= allocated) crit->values.str = pool_2nrealloc (pool, crit->values.str, &allocated, sizeof *crit->values.str); if (!lex_force_string (lexer)) return false; s = recode_string (dict_encoding, "UTF-8", lex_tokcstr (lexer), ss_length (lex_tokss (lexer))); cur = &crit->values.str[crit->value_cnt++]; *cur = pool_alloc (pool, len + 1); str_copy_rpad (*cur, len + 1, s); lex_get (lexer); free (s); lex_match (lexer, T_COMMA); if (lex_match (lexer, T_RPAREN)) break; } return true; } /* Transformation. */ /* Counts the number of values in case C matching CRIT. */ static int count_numeric (struct criteria *crit, const struct ccase *c) { int counter = 0; size_t i; for (i = 0; i < crit->var_cnt; i++) { double x = case_num (c, crit->vars[i]); struct num_value *v; for (v = crit->values.num; v < crit->values.num + crit->value_cnt; v++) if (v->type == CNT_SINGLE ? x == v->a : x >= v->a && x <= v->b) { counter++; break; } if (var_is_num_missing (crit->vars[i], x, MV_ANY) && (x == SYSMIS ? crit->count_system_missing : crit->count_user_missing)) { counter++; continue; } } return counter; } /* Counts the number of values in case C matching CRIT. */ static int count_string (struct criteria *crit, const struct ccase *c) { int counter = 0; size_t i; for (i = 0; i < crit->var_cnt; i++) { char **v; for (v = crit->values.str; v < crit->values.str + crit->value_cnt; v++) if (!memcmp (case_str (c, crit->vars[i]), *v, var_get_width (crit->vars[i]))) { counter++; break; } } return counter; } /* Performs the COUNT transformation T on case C. */ static int count_trns_proc (void *trns_, struct ccase **c, casenumber case_num UNUSED) { struct count_trns *trns = trns_; struct dst_var *dv; *c = case_unshare (*c); for (dv = trns->dst_vars; dv; dv = dv->next) { struct criteria *crit; int counter; counter = 0; for (crit = dv->crit; crit; crit = crit->next) if (var_is_numeric (crit->vars[0])) counter += count_numeric (crit, *c); else counter += count_string (crit, *c); case_data_rw (*c, dv->var)->f = counter; } return TRNS_CONTINUE; } /* Destroys all dynamic data structures associated with TRNS. */ static bool count_trns_free (void *trns_) { struct count_trns *trns = trns_; pool_destroy (trns->pool); return true; } pspp-1.0.1/src/language/data-io/0000755000175000017500000000000013150620333013360 500000000000000pspp-1.0.1/src/language/data-io/inpt-pgm.h0000644000175000017500000000160212470242642015212 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef INPT_PGM_H #define INPT_PGM_H 1 #include bool in_input_program (void); void cancel_input_program (void); #endif /* inpt-pgm.h */ pspp-1.0.1/src/language/data-io/save-translate.c0000644000175000017500000002122212646201371016402 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2013, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/case-map.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/csv-file-writer.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/file-name.h" #include "data/format.h" #include "data/settings.h" #include "language/command.h" #include "language/data-io/file-handle.h" #include "language/data-io/trim.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) int cmd_save_translate (struct lexer *lexer, struct dataset *ds) { enum { CSV_FILE = 1, TAB_FILE } type; struct dictionary *dict; struct case_map_stage *stage; struct case_map *map; struct casewriter *writer; struct file_handle *handle; struct csv_writer_options csv_opts; bool replace; bool retain_unselected; bool recode_user_missing; bool include_var_names; bool use_value_labels; bool use_print_formats; char decimal; char delimiter; char qualifier; bool ok; type = 0; dict = dict_clone (dataset_dict (ds)); stage = NULL; map = NULL; handle = NULL; replace = false; retain_unselected = true; recode_user_missing = false; include_var_names = false; use_value_labels = false; use_print_formats = false; decimal = settings_get_decimal_char (FMT_F); delimiter = 0; qualifier = '"'; stage = case_map_stage_create (dict); dict_delete_scratch_vars (dict); while (lex_token (lexer) != T_ENDCMD) { if (!lex_force_match (lexer, T_SLASH)) goto error; if (lex_match_id (lexer, "OUTFILE")) { if (handle != NULL) { lex_sbc_only_once ("OUTFILE"); goto error; } lex_match (lexer, T_EQUALS); handle = fh_parse (lexer, FH_REF_FILE, NULL); if (handle == NULL) goto error; } else if (lex_match_id (lexer, "TYPE")) { if (type != 0) { lex_sbc_only_once ("TYPE"); goto error; } lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "CSV")) type = CSV_FILE; else if (lex_match_id (lexer, "TAB")) type = TAB_FILE; else { lex_error_expecting (lexer, "CSV", "TAB", NULL_SENTINEL); goto error; } } else if (lex_match_id (lexer, "REPLACE")) replace = true; else if (lex_match_id (lexer, "FIELDNAMES")) include_var_names = true; else if (lex_match_id (lexer, "MISSING")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "IGNORE")) recode_user_missing = false; else if (lex_match_id (lexer, "RECODE")) recode_user_missing = true; else { lex_error_expecting (lexer, "IGNORE", "RECODE", NULL_SENTINEL); goto error; } } else if (lex_match_id (lexer, "CELLS")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "VALUES")) use_value_labels = false; else if (lex_match_id (lexer, "LABELS")) use_value_labels = true; else { lex_error_expecting (lexer, "VALUES", "LABELS", NULL_SENTINEL); goto error; } } else if (lex_match_id (lexer, "TEXTOPTIONS")) { lex_match (lexer, T_EQUALS); for (;;) { if (lex_match_id (lexer, "DELIMITER")) { lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; /* XXX should support multibyte UTF-8 delimiters */ if (ss_length (lex_tokss (lexer)) != 1) { msg (SE, _("The %s string must contain exactly one " "character."), "DELIMITER"); goto error; } delimiter = ss_first (lex_tokss (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "QUALIFIER")) { lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; /* XXX should support multibyte UTF-8 qualifiers */ if (ss_length (lex_tokss (lexer)) != 1) { msg (SE, _("The %s string must contain exactly one " "character."), "QUALIFIER"); goto error; } qualifier = ss_first (lex_tokss (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "DECIMAL")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "DOT")) decimal = '.'; else if (lex_match_id (lexer, "COMMA")) decimal = ','; else { lex_error_expecting (lexer, "DOT", "COMMA", NULL_SENTINEL); goto error; } } else if (lex_match_id (lexer, "FORMAT")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "PLAIN")) use_print_formats = false; else if (lex_match_id (lexer, "VARIABLE")) use_print_formats = true; else { lex_error_expecting (lexer, "PLAIN", "VARIABLE", NULL_SENTINEL); goto error; } } else break; } } else if (lex_match_id (lexer, "UNSELECTED")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "RETAIN")) retain_unselected = true; else if (lex_match_id (lexer, "DELETE")) retain_unselected = false; else { lex_error_expecting (lexer, "RETAIN", "DELETE", NULL_SENTINEL); goto error; } } else if (!parse_dict_trim (lexer, dict)) goto error; } if (type == 0) { lex_sbc_missing ("TYPE"); goto error; } else if (handle == NULL) { lex_sbc_missing ("OUTFILE"); goto error; } else if (!replace && fn_exists (handle)) { msg (SE, _("Output file `%s' exists but %s was not specified."), fh_get_file_name (handle), "REPLACE"); goto error; } dict_delete_scratch_vars (dict); dict_compact_values (dict); csv_opts.recode_user_missing = recode_user_missing; csv_opts.include_var_names = include_var_names; csv_opts.use_value_labels = use_value_labels; csv_opts.use_print_formats = use_print_formats; csv_opts.decimal = decimal; csv_opts.delimiter = (delimiter ? delimiter : type == TAB_FILE ? '\t' : decimal == '.' ? ',' : ';'); csv_opts.qualifier = qualifier; writer = csv_writer_open (handle, dict, &csv_opts); if (writer == NULL) goto error; fh_unref (handle); map = case_map_stage_get_case_map (stage); case_map_stage_destroy (stage); if (map != NULL) writer = case_map_create_output_translator (map, writer); dict_destroy (dict); casereader_transfer (proc_open_filtering (ds, !retain_unselected), writer); ok = casewriter_destroy (writer); ok = proc_commit (ds) && ok; return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; error: case_map_stage_destroy (stage); fh_unref (handle); dict_destroy (dict); case_map_destroy (map); return CMD_FAILURE; } pspp-1.0.1/src/language/data-io/trim.h0000644000175000017500000000220312470242642014430 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LANGUAGE_DATA_IO_TRIM_H #define LANGUAGE_DATA_IO_TRIM_H #include struct lexer; struct dictionary; bool parse_dict_trim (struct lexer *, struct dictionary *); bool parse_dict_rename (struct lexer *, struct dictionary *); bool parse_dict_drop (struct lexer *, struct dictionary *); bool parse_dict_keep (struct lexer *, struct dictionary *); #endif /* trim.c */ pspp-1.0.1/src/language/data-io/data-reader.c0000644000175000017500000005174612642262510015636 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-2004, 2006, 2010, 2011, 2012, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/data-io/data-reader.h" #include #include #include #include #include #include "data/casereader.h" #include "data/dataset.h" #include "data/file-handle-def.h" #include "data/file-name.h" #include "language/command.h" #include "language/data-io/file-handle.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/encoding-guesser.h" #include "libpspp/integer-format.h" #include "libpspp/line-reader.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) /* Flags for DFM readers. */ enum dfm_reader_flags { DFM_ADVANCE = 002, /* Read next line on dfm_get_record() call? */ DFM_SAW_BEGIN_DATA = 004, /* For inline_file only, whether we've already read a BEGIN DATA line. */ DFM_TABS_EXPANDED = 010, /* Tabs have been expanded. */ DFM_CONSUME = 020 /* read_inline_record() should get a token? */ }; /* Data file reader. */ struct dfm_reader { struct file_handle *fh; /* File handle. */ struct fh_lock *lock; /* Mutual exclusion lock for file. */ int line_number; /* Current line or record number. */ struct string line; /* Current line. */ struct string scratch; /* Extra line buffer. */ enum dfm_reader_flags flags; /* Zero or more of DFM_*. */ FILE *file; /* Associated file. */ size_t pos; /* Offset in line of current character. */ unsigned eof_cnt; /* # of attempts to advance past EOF. */ struct lexer *lexer; /* The lexer reading the file */ char *encoding; /* Current encoding. */ /* For FH_MODE_TEXT only. */ struct line_reader *line_reader; /* For FH_MODE_360_VARIABLE and FH_MODE_360_SPANNED files only. */ size_t block_left; /* Bytes left in current block. */ }; /* Closes reader R opened by dfm_open_reader(). */ void dfm_close_reader (struct dfm_reader *r) { if (r == NULL) return; if (fh_unlock (r->lock)) { /* File is still locked by another client. */ return; } /* This was the last client, so close the underlying file. */ if (fh_get_referent (r->fh) != FH_REF_INLINE) fn_close (r->fh, r->file); else { /* Skip any remaining data on the inline file. */ if (r->flags & DFM_SAW_BEGIN_DATA) { dfm_reread_record (r, 0); while (!dfm_eof (r)) dfm_forward_record (r); } } line_reader_free (r->line_reader); free (r->encoding); fh_unref (r->fh); ds_destroy (&r->line); ds_destroy (&r->scratch); free (r); } /* Opens the file designated by file handle FH for reading as a data file. Returns a reader if successful, or a null pointer otherwise. If FH is fh_inline_file() then the new reader reads data included inline in the command file between BEGIN FILE and END FILE, obtaining data from LEXER. LEXER must remain valid as long as the new reader is in use. ENCODING is ignored. If FH is not fh_inline_file(), then the encoding of the file read is by default that of FH itself. If ENCODING is nonnull, then it overrides the default encoding. LEXER is ignored. */ struct dfm_reader * dfm_open_reader (struct file_handle *fh, struct lexer *lexer, const char *encoding) { struct dfm_reader *r; struct fh_lock *lock; /* TRANSLATORS: this fragment will be interpolated into messages in fh_lock() that identify types of files. */ lock = fh_lock (fh, FH_REF_FILE | FH_REF_INLINE, N_("data file"), FH_ACC_READ, false); if (lock == NULL) return NULL; r = fh_lock_get_aux (lock); if (r != NULL) return r; r = xmalloc (sizeof *r); r->fh = fh_ref (fh); r->lock = lock; r->lexer = lexer; ds_init_empty (&r->line); ds_init_empty (&r->scratch); r->flags = DFM_ADVANCE; r->eof_cnt = 0; r->block_left = 0; if (fh_get_referent (fh) != FH_REF_INLINE) { r->line_number = 0; r->file = fn_open (fh, "rb"); if (r->file == NULL) { msg (ME, _("Could not open `%s' for reading as a data file: %s."), fh_get_file_name (r->fh), strerror (errno)); goto error; } } fh_lock_set_aux (lock, r); if (encoding == NULL) encoding = fh_get_encoding (fh); if (fh_get_referent (fh) == FH_REF_FILE && fh_get_mode (fh) == FH_MODE_TEXT) { r->line_reader = line_reader_for_fd (encoding, fileno (r->file)); if (r->line_reader == NULL) { msg (ME, _("Could not read `%s' as a text file with encoding `%s': " "%s."), fh_get_file_name (r->fh), encoding, strerror (errno)); goto error; } r->encoding = xstrdup (line_reader_get_encoding (r->line_reader)); } else { r->line_reader = NULL; r->encoding = xstrdup (encoding_guess_parse_encoding (encoding)); } return r; error: fh_unlock (r->lock); fh_unref (fh); free (r); return NULL; } /* Returns true if an I/O error occurred on READER, false otherwise. */ bool dfm_reader_error (const struct dfm_reader *r) { return (fh_get_referent (r->fh) == FH_REF_FILE && (r->line_reader != NULL ? line_reader_error (r->line_reader) != 0 : ferror (r->file))); } /* Reads a record from the inline file into R. Returns true if successful, false on failure. */ static bool read_inline_record (struct dfm_reader *r) { if ((r->flags & DFM_SAW_BEGIN_DATA) == 0) { r->flags |= DFM_SAW_BEGIN_DATA; r->flags &= ~DFM_CONSUME; while (lex_token (r->lexer) == T_ENDCMD) lex_get (r->lexer); if (!lex_force_match_id (r->lexer, "BEGIN") || !lex_force_match_id (r->lexer, "DATA")) return false; lex_match (r->lexer, T_ENDCMD); } if (r->flags & DFM_CONSUME) lex_get (r->lexer); if (!lex_is_string (r->lexer)) { if (!lex_match_id (r->lexer, "END") || !lex_match_id (r->lexer, "DATA")) { msg (SE, _("Missing %s while reading inline data. " "This probably indicates a missing or incorrectly " "formatted %s command. %s must appear " "by itself on a single line with exactly one space " "between words."), "END DATA", "END DATA", "END DATA"); lex_discard_rest_of_command (r->lexer); } return false; } ds_assign_substring (&r->line, lex_tokss (r->lexer)); r->flags |= DFM_CONSUME; return true; } /* Report a read error on R. */ static void read_error (struct dfm_reader *r) { msg (ME, _("Error reading file %s: %s."), fh_get_name (r->fh), strerror (errno)); } /* Report a partial read at end of file reading R. */ static void partial_record (struct dfm_reader *r) { msg (ME, _("Unexpected end of file in partial record reading %s."), fh_get_name (r->fh)); } /* Tries to read SIZE bytes from R into BUFFER. Returns 1 if successful, 0 if end of file was reached before any bytes could be read, and -1 if some bytes were read but fewer than SIZE due to end of file or an error mid-read. In the latter case, reports an error. */ static int try_to_read_fully (struct dfm_reader *r, void *buffer, size_t size) { size_t bytes_read = fread (buffer, 1, size, r->file); if (bytes_read == size) return 1; else if (bytes_read == 0) return 0; else { partial_record (r); return -1; } } /* Type of a descriptor word. */ enum descriptor_type { BLOCK, RECORD }; /* Reads a block descriptor word or record descriptor word (according to TYPE) from R. Returns 1 if successful, 0 if end of file was reached before any bytes could be read, -1 if an error occurred. Reports an error in the latter case. If successful, stores the number of remaining bytes in the block or record (that is, the block or record length, minus the 4 bytes in the BDW or RDW itself) into *REMAINING_SIZE. If SEGMENT is nonnull, also stores the segment control character (SCC) into *SEGMENT. */ static int read_descriptor_word (struct dfm_reader *r, enum descriptor_type type, size_t *remaining_size, int *segment) { uint8_t raw_descriptor[4]; int status; status = try_to_read_fully (r, raw_descriptor, sizeof raw_descriptor); if (status <= 0) return status; *remaining_size = (raw_descriptor[0] << 8) | raw_descriptor[1]; if (segment != NULL) *segment = raw_descriptor[2]; if (*remaining_size < 4) { msg (ME, (type == BLOCK ? _("Corrupt block descriptor word at offset 0x%lx in %s.") : _("Corrupt record descriptor word at offset 0x%lx in %s.")), (long) ftello (r->file) - 4, fh_get_name (r->fh)); return -1; } *remaining_size -= 4; return 1; } /* Reports that reader R has read a corrupt record size. */ static void corrupt_size (struct dfm_reader *r) { msg (ME, _("Corrupt record size at offset 0x%lx in %s."), (long) ftello (r->file) - 4, fh_get_name (r->fh)); } /* Reads a 32-byte little-endian signed number from R and stores its value into *SIZE_OUT. Returns 1 if successful, 0 if end of file was reached before any bytes could be read, -1 if an error occurred. Reports an error in the latter case. Numbers less than 0 are considered errors. */ static int read_size (struct dfm_reader *r, size_t *size_out) { int32_t size; int status; status = try_to_read_fully (r, &size, sizeof size); if (status <= 0) return status; integer_convert (INTEGER_LSB_FIRST, &size, INTEGER_NATIVE, &size, sizeof size); if (size < 0) { corrupt_size (r); return -1; } *size_out = size; return 1; } static bool read_text_record (struct dfm_reader *r) { bool is_auto; bool ok; /* Read a line. If the line reader's encoding changes, update r->encoding to match. */ is_auto = line_reader_is_auto (r->line_reader); ok = line_reader_read (r->line_reader, &r->line, SIZE_MAX); if (is_auto && !line_reader_is_auto (r->line_reader)) { free (r->encoding); r->encoding = xstrdup (line_reader_get_encoding (r->line_reader)); } /* Detect and report read error. */ if (!ok) { int error = line_reader_error (r->line_reader); if (error != 0) msg (ME, _("Error reading file %s: %s."), fh_get_name (r->fh), strerror (error)); } return ok; } /* Reads a record from a disk file into R. Returns true if successful, false on error or at end of file. */ static bool read_file_record (struct dfm_reader *r) { assert (r->fh != fh_inline_file ()); ds_clear (&r->line); switch (fh_get_mode (r->fh)) { case FH_MODE_TEXT: return read_text_record (r); case FH_MODE_FIXED: if (ds_read_stream (&r->line, 1, fh_get_record_width (r->fh), r->file)) return true; else { if (ferror (r->file)) read_error (r); else if (!ds_is_empty (&r->line)) partial_record (r); return false; } case FH_MODE_VARIABLE: { size_t leading_size; size_t trailing_size; int status; /* Read leading record size. */ status = read_size (r, &leading_size); if (status <= 0) return false; /* Read record data. */ if (!ds_read_stream (&r->line, leading_size, 1, r->file)) { if (ferror (r->file)) read_error (r); else partial_record (r); return false; } /* Read trailing record size and check that it's the same as the leading record size. */ status = read_size (r, &trailing_size); if (status <= 0) { if (status == 0) partial_record (r); return false; } if (leading_size != trailing_size) { corrupt_size (r); return false; } return true; } case FH_MODE_360_VARIABLE: case FH_MODE_360_SPANNED: for (;;) { size_t record_size; int segment; int status; /* If we've exhausted our current block, start another one by reading the new block descriptor word. */ if (r->block_left == 0) { status = read_descriptor_word (r, BLOCK, &r->block_left, NULL); if (status < 0) return false; else if (status == 0) return !ds_is_empty (&r->line); } /* Read record descriptor. */ if (r->block_left < 4) { partial_record (r); return false; } r->block_left -= 4; status = read_descriptor_word (r, RECORD, &record_size, &segment); if (status <= 0) { if (status == 0) partial_record (r); return false; } if (record_size > r->block_left) { msg (ME, _("Record exceeds remaining block length.")); return false; } /* Read record data. */ if (!ds_read_stream (&r->line, record_size, 1, r->file)) { if (ferror (r->file)) read_error (r); else partial_record (r); return false; } r->block_left -= record_size; /* In variable mode, read only a single record. In spanned mode, a segment value of 0 should designate a whole record without spanning, 1 the first segment in a record, 2 the last segment in a record, and 3 an intermediate segment in a record. For compatibility, though, we actually pay attention only to whether the segment value is even or odd. */ if (fh_get_mode (r->fh) == FH_MODE_360_VARIABLE || (segment & 1) == 0) return true; } } NOT_REACHED (); } /* Reads a record from R, setting the current position to the start of the line. If an error occurs or end-of-file is encountered, the current line is set to null. */ static bool read_record (struct dfm_reader *r) { if (fh_get_referent (r->fh) == FH_REF_FILE) { bool ok = read_file_record (r); if (ok) r->line_number++; return ok; } else return read_inline_record (r); } /* Returns the number of attempts, thus far, to advance past end-of-file in reader R. Reads forward in HANDLE's file, if necessary, to find out. Normally, the user stops attempting to read from the file the first time EOF is reached (a return value of 1). If the user tries to read past EOF again (a return value of 2 or more), an error message is issued, and the caller should more forcibly abort to avoid an infinite loop. */ unsigned dfm_eof (struct dfm_reader *r) { if (r->flags & DFM_ADVANCE) { r->flags &= ~DFM_ADVANCE; if (r->eof_cnt == 0 && read_record (r) ) { r->pos = 0; return 0; } r->eof_cnt++; if (r->eof_cnt == 2) { if (r->fh != fh_inline_file ()) msg (ME, _("Attempt to read beyond end-of-file on file %s."), fh_get_name (r->fh)); else msg (ME, _("Attempt to read beyond %s."), "END DATA"); } } return r->eof_cnt; } /* Returns the current record in the file corresponding to HANDLE. Aborts if reading from the file is necessary or at end of file, so call dfm_eof() first. */ struct substring dfm_get_record (struct dfm_reader *r) { assert ((r->flags & DFM_ADVANCE) == 0); assert (r->eof_cnt == 0); return ds_substr (&r->line, r->pos, SIZE_MAX); } /* Expands tabs in the current line into the equivalent number of spaces, if appropriate for this kind of file. Aborts if reading from the file is necessary or at end of file, so call dfm_eof() first.*/ void dfm_expand_tabs (struct dfm_reader *r) { size_t ofs, new_pos, tab_width; assert ((r->flags & DFM_ADVANCE) == 0); assert (r->eof_cnt == 0); if (r->flags & DFM_TABS_EXPANDED) return; r->flags |= DFM_TABS_EXPANDED; if (r->fh != fh_inline_file () && (fh_get_mode (r->fh) != FH_MODE_TEXT || fh_get_tab_width (r->fh) == 0 || ds_find_byte (&r->line, '\t') == SIZE_MAX)) return; /* Expand tabs from r->line into r->scratch, and figure out new value for r->pos. */ tab_width = fh_get_tab_width (r->fh); ds_clear (&r->scratch); new_pos = SIZE_MAX; for (ofs = 0; ofs < ds_length (&r->line); ofs++) { unsigned char c; if (ofs == r->pos) new_pos = ds_length (&r->scratch); c = ds_data (&r->line)[ofs]; if (c != '\t') ds_put_byte (&r->scratch, c); else { do ds_put_byte (&r->scratch, ' '); while (ds_length (&r->scratch) % tab_width != 0); } } if (new_pos == SIZE_MAX) { /* Maintain the same relationship between position and line length that we had before. DATA LIST uses a beyond-the-end position to deal with an empty field at the end of the line. */ assert (r->pos >= ds_length (&r->line)); new_pos = (r->pos - ds_length (&r->line)) + ds_length (&r->scratch); } /* Swap r->line and r->scratch and set new r->pos. */ ds_swap (&r->line, &r->scratch); r->pos = new_pos; } /* Returns the character encoding of data read from READER. */ const char * dfm_reader_get_encoding (const struct dfm_reader *reader) { return reader->encoding; } /* Causes dfm_get_record() or dfm_get_whole_record() to read in the next record the next time it is executed on file HANDLE. */ void dfm_forward_record (struct dfm_reader *r) { r->flags |= DFM_ADVANCE; } /* Cancels the effect of any previous dfm_fwd_record() executed on file HANDLE. Sets the current line to begin in the 1-based column COLUMN. */ void dfm_reread_record (struct dfm_reader *r, size_t column) { r->flags &= ~DFM_ADVANCE; r->pos = MAX (column, 1) - 1; } /* Sets the current line to begin COLUMNS characters following the current start. */ void dfm_forward_columns (struct dfm_reader *r, size_t columns) { dfm_reread_record (r, (r->pos + 1) + columns); } /* Returns the 1-based column to which the line pointer in HANDLE is set. Unless dfm_reread_record() or dfm_forward_columns() have been called, this is 1. */ size_t dfm_column_start (const struct dfm_reader *r) { return r->pos + 1; } /* Returns the number of columns we are currently beyond the end of the line. At or before end-of-line, this is 0; one column after end-of-line, this is 1; and so on. */ size_t dfm_columns_past_end (const struct dfm_reader *r) { return r->pos < ds_length (&r->line) ? 0 : ds_length (&r->line) - r->pos; } /* Returns the 1-based column within the current line that P designates. */ size_t dfm_get_column (const struct dfm_reader *r, const char *p) { return ds_pointer_to_position (&r->line, p) + 1; } const char * dfm_get_file_name (const struct dfm_reader *r) { return (fh_get_referent (r->fh) == FH_REF_FILE ? fh_get_file_name (r->fh) : NULL); } int dfm_get_line_number (const struct dfm_reader *r) { return fh_get_referent (r->fh) == FH_REF_FILE ? r->line_number : -1; } /* BEGIN DATA...END DATA procedure. */ /* Perform BEGIN DATA...END DATA as a procedure in itself. */ int cmd_begin_data (struct lexer *lexer, struct dataset *ds) { struct dfm_reader *r; bool ok; if (!fh_is_locked (fh_inline_file (), FH_ACC_READ)) { msg (SE, _("This command is not valid here since the current " "input program does not access the inline file.")); return CMD_CASCADING_FAILURE; } lex_match (lexer, T_ENDCMD); /* Open inline file. */ r = dfm_open_reader (fh_inline_file (), lexer, NULL); r->flags |= DFM_SAW_BEGIN_DATA; r->flags &= ~DFM_CONSUME; /* Input procedure reads from inline file. */ casereader_destroy (proc_open (ds)); ok = proc_commit (ds); dfm_close_reader (r); return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; } pspp-1.0.1/src/language/data-io/get.c0000644000175000017500000001005312554731161014233 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006-2007, 2010-15 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/any-reader.h" #include "data/case-map.h" #include "data/case.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/por-file-writer.h" #include "language/command.h" #include "language/data-io/file-handle.h" #include "language/data-io/trim.h" #include "language/lexer/lexer.h" #include "libpspp/compiler.h" #include "libpspp/misc.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Reading system and portable files. */ /* Type of command. */ enum reader_command { GET_CMD, IMPORT_CMD }; static int parse_read_command (struct lexer *, struct dataset *, enum reader_command); /* GET. */ int cmd_get (struct lexer *lexer, struct dataset *ds) { return parse_read_command (lexer, ds, GET_CMD); } /* IMPORT. */ int cmd_import (struct lexer *lexer, struct dataset *ds) { return parse_read_command (lexer, ds, IMPORT_CMD); } /* Parses a GET or IMPORT command. */ static int parse_read_command (struct lexer *lexer, struct dataset *ds, enum reader_command command) { struct casereader *reader = NULL; struct file_handle *fh = NULL; struct dictionary *dict = NULL; struct case_map *map = NULL; struct case_map_stage *stage = NULL; char *encoding = NULL; for (;;) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "FILE") || lex_is_string (lexer)) { lex_match (lexer, T_EQUALS); fh_unref (fh); fh = fh_parse (lexer, FH_REF_FILE, NULL); if (fh == NULL) goto error; } else if (command == GET_CMD && lex_match_id (lexer, "ENCODING")) { lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; free (encoding); encoding = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } else if (command == IMPORT_CMD && lex_match_id (lexer, "TYPE")) { lex_match (lexer, T_EQUALS); if (!lex_match_id (lexer, "COMM") && !lex_match_id (lexer, "TAPE")) { lex_error_expecting (lexer, "COMM", "TAPE", NULL_SENTINEL); goto error; } } else break; } if (fh == NULL) { lex_sbc_missing ("FILE"); goto error; } reader = any_reader_open_and_decode (fh, encoding, &dict, NULL); if (reader == NULL) goto error; if (dict_get_var_cnt (dict) == 0) { msg (SE, _("%s: Data file dictionary has no variables."), fh_get_name (fh)); goto error; } stage = case_map_stage_create (dict); while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (!parse_dict_trim (lexer, dict)) goto error; } dict_compact_values (dict); map = case_map_stage_get_case_map (stage); case_map_stage_destroy (stage); if (map != NULL) reader = case_map_create_input_translator (map, reader); dataset_set_dict (ds, dict); dataset_set_source (ds, reader); fh_unref (fh); free (encoding); return CMD_SUCCESS; error: case_map_stage_destroy (stage); fh_unref (fh); casereader_destroy (reader); if (dict != NULL) dict_destroy (dict); free (encoding); return CMD_CASCADING_FAILURE; } pspp-1.0.1/src/language/data-io/trim.c0000644000175000017500000001253412470243700014427 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/data-io/trim.h" #include #include "data/dictionary.h" #include "data/variable.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Commands that read and write system files share a great deal of common syntactic structure for rearranging and dropping variables. This function parses this syntax and modifies DICT appropriately. Returns true on success, false on failure. */ bool parse_dict_trim (struct lexer *lexer, struct dictionary *dict) { if (lex_match_id (lexer, "MAP")) { /* FIXME. */ return true; } else if (lex_match_id (lexer, "DROP")) return parse_dict_drop (lexer, dict); else if (lex_match_id (lexer, "KEEP")) return parse_dict_keep (lexer, dict); else if (lex_match_id (lexer, "RENAME")) return parse_dict_rename (lexer, dict); else { lex_error (lexer, _("expecting a valid subcommand")); return false; } } /* Parses and performs the RENAME subcommand of GET, SAVE, and related commands. */ bool parse_dict_rename (struct lexer *lexer, struct dictionary *dict) { size_t i; int success = 0; struct variable **v; char **new_names; size_t nv, nn; char *err_name; int group; lex_match (lexer, T_EQUALS); if (lex_token (lexer) != T_LPAREN) { struct variable *v; v = parse_variable (lexer, dict); if (v == NULL) return 0; if (!lex_force_match (lexer, T_EQUALS) || !lex_force_id (lexer) || !dict_id_is_valid (dict, lex_tokcstr (lexer), true)) return 0; if (dict_lookup_var (dict, lex_tokcstr (lexer)) != NULL) { msg (SE, _("Cannot rename %s as %s because there already exists " "a variable named %s. To rename variables with " "overlapping names, use a single RENAME subcommand " "such as `/RENAME (A=B)(B=C)(C=A)', or equivalently, " "`/RENAME (A B C=B C A)'."), var_get_name (v), lex_tokcstr (lexer), lex_tokcstr (lexer)); return 0; } dict_rename_var (dict, v, lex_tokcstr (lexer)); lex_get (lexer); return 1; } nv = nn = 0; v = NULL; new_names = 0; group = 1; while (lex_match (lexer, T_LPAREN)) { size_t old_nv = nv; if (!parse_variables (lexer, dict, &v, &nv, PV_NO_DUPLICATE | PV_APPEND)) goto done; if (!lex_match (lexer, T_EQUALS)) { lex_error_expecting (lexer, "`='", NULL_SENTINEL); goto done; } if (!parse_DATA_LIST_vars (lexer, dict, &new_names, &nn, PV_APPEND | PV_NO_SCRATCH | PV_NO_DUPLICATE)) goto done; if (nn != nv) { msg (SE, _("Number of variables on left side of `=' (%zu) does not " "match number of variables on right side (%zu), in " "parenthesized group %d of RENAME subcommand."), nv - old_nv, nn - old_nv, group); goto done; } if (!lex_force_match (lexer, T_RPAREN)) goto done; group++; } if (!dict_rename_vars (dict, v, new_names, nv, &err_name)) { msg (SE, _("Requested renaming duplicates variable name %s."), err_name); goto done; } success = 1; done: for (i = 0; i < nn; i++) free (new_names[i]); free (new_names); free (v); return success; } /* Parses and performs the DROP subcommand of GET, SAVE, and related commands. Returns true if successful, false on failure.*/ bool parse_dict_drop (struct lexer *lexer, struct dictionary *dict) { struct variable **v; size_t nv; lex_match (lexer, T_EQUALS); if (!parse_variables (lexer, dict, &v, &nv, PV_NONE)) return false; dict_delete_vars (dict, v, nv); free (v); if (dict_get_var_cnt (dict) == 0) { msg (SE, _("Cannot DROP all variables from dictionary.")); return false; } return true; } /* Parses and performs the KEEP subcommand of GET, SAVE, and related commands. Returns true if successful, false on failure.*/ bool parse_dict_keep (struct lexer *lexer, struct dictionary *dict) { struct variable **v; size_t nv; size_t i; lex_match (lexer, T_EQUALS); if (!parse_variables (lexer, dict, &v, &nv, PV_NONE)) return false; /* Move the specified variables to the beginning. */ dict_reorder_vars (dict, v, nv); /* Delete the remaining variables. */ v = xnrealloc (v, dict_get_var_cnt (dict) - nv, sizeof *v); for (i = nv; i < dict_get_var_cnt (dict); i++) v[i - nv] = dict_get_var (dict, i); dict_delete_vars (dict, v, dict_get_var_cnt (dict) - nv); free (v); return true; } pspp-1.0.1/src/language/data-io/placement-parser.c0000644000175000017500000003046512470434665016735 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/data-io/placement-parser.h" #include #include "data/format.h" #include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/c-strcase.h" #include "gl/xalloc.h" #include "gl/xsize.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Extensions to the format specifiers used only for placement. */ enum { PRS_TYPE_T = SCHAR_MAX - 3, /* Tab to absolute column. */ PRS_TYPE_X, /* Skip columns. */ PRS_TYPE_NEW_REC /* Next record. */ }; static bool fixed_parse_columns (struct lexer *, struct pool *, size_t var_cnt, enum fmt_use, struct fmt_spec **, size_t *); static bool fixed_parse_fortran (struct lexer *l, struct pool *, enum fmt_use, struct fmt_spec **, size_t *); /* Parses Fortran-like or column-based specifications for placing variable data in fixed positions in columns and rows, that is, formats like those parsed by DATA LIST or PRINT. Returns true only if successful. The formats parsed are either input or output formats, according to USE. If USE is FMT_FOR_INPUT, then T, X, and / "formats" are parsed, in addition to regular formats. If USE is FMT_FOR_OUTPUT, then T and X "formats" are parsed but not /. If successful, formats for VAR_CNT variables are stored in *FORMATS, and the number of formats required is stored in *FORMAT_CNT. *FORMAT_CNT may be greater than VAR_CNT because of T, X, and / "formats", but success guarantees that exactly VAR_CNT variables will be placed by the output formats. The caller should call execute_placement_format to process those "formats" in interpreting the output. Uses POOL for allocation. When the caller is finished interpreting *FORMATS, POOL may be destroyed. */ bool parse_var_placements (struct lexer *lexer, struct pool *pool, size_t var_cnt, enum fmt_use use, struct fmt_spec **formats, size_t *format_cnt) { assert (var_cnt > 0); if (lex_is_number (lexer)) return fixed_parse_columns (lexer, pool, var_cnt, use, formats, format_cnt); else if (lex_match (lexer, T_LPAREN)) { size_t assignment_cnt; size_t i; if (!fixed_parse_fortran (lexer, pool, use, formats, format_cnt)) return false; assignment_cnt = 0; for (i = 0; i < *format_cnt; i++) assignment_cnt += (*formats)[i].type < FMT_NUMBER_OF_FORMATS; if (assignment_cnt != var_cnt) { msg (SE, _("Number of variables specified (%zu) " "differs from number of variable formats (%zu)."), var_cnt, assignment_cnt); return false; } return true; } else { msg (SE, _("SPSS-like or Fortran-like format " "specification expected after variable names.")); return false; } } /* Implements parse_var_placements for column-based formats. */ static bool fixed_parse_columns (struct lexer *lexer, struct pool *pool, size_t var_cnt, enum fmt_use use, struct fmt_spec **formats, size_t *format_cnt) { struct fmt_spec format; int fc, lc; size_t i; if ( !parse_column_range (lexer, 1, &fc, &lc, NULL) ) return false; /* Divide columns evenly. */ format.w = (lc - fc + 1) / var_cnt; if ((lc - fc + 1) % var_cnt) { msg (SE, _("The %d columns %d-%d " "can't be evenly divided into %zu fields."), lc - fc + 1, fc, lc, var_cnt); return false; } /* Format specifier. */ if (lex_match (lexer, T_LPAREN)) { /* Get format type. */ if (lex_token (lexer) == T_ID) { if (!parse_format_specifier_name (lexer, &format.type)) return false; lex_match (lexer, T_COMMA); } else format.type = FMT_F; /* Get decimal places. */ if (lex_is_integer (lexer)) { format.d = lex_integer (lexer); lex_get (lexer); } else format.d = 0; if (!lex_force_match (lexer, T_RPAREN)) return false; } else { format.type = FMT_F; format.d = 0; } if (!fmt_check (&format, use)) return false; *formats = pool_nalloc (pool, var_cnt + 1, sizeof **formats); *format_cnt = var_cnt + 1; (*formats)[0].type = PRS_TYPE_T; (*formats)[0].w = fc; for (i = 1; i <= var_cnt; i++) (*formats)[i] = format; return true; } /* Implements parse_var_placements for Fortran-like formats. */ static bool fixed_parse_fortran (struct lexer *lexer, struct pool *pool, enum fmt_use use, struct fmt_spec **formats, size_t *format_cnt) { size_t formats_allocated = 0; size_t formats_used = 0; *formats = NULL; while (!lex_match (lexer, T_RPAREN)) { struct fmt_spec f; struct fmt_spec *new_formats; size_t new_format_cnt; size_t count; size_t formats_needed; /* Parse count. */ if (lex_is_integer (lexer)) { count = lex_integer (lexer); lex_get (lexer); } else count = 1; /* Parse format specifier. */ if (lex_match (lexer, T_LPAREN)) { /* Call ourselves recursively to handle parentheses. */ if (!fixed_parse_fortran (lexer, pool, use, &new_formats, &new_format_cnt)) return false; } else { new_formats = &f; new_format_cnt = 1; if (use == FMT_FOR_INPUT && lex_match (lexer, T_SLASH)) f.type = PRS_TYPE_NEW_REC; else { char type[FMT_TYPE_LEN_MAX + 1]; if (!parse_abstract_format_specifier (lexer, type, &f.w, &f.d)) return false; if (!c_strcasecmp (type, "T")) f.type = PRS_TYPE_T; else if (!c_strcasecmp (type, "X")) { f.type = PRS_TYPE_X; f.w = count; count = 1; } else { if (!fmt_from_name (type, &f.type)) { msg (SE, _("Unknown format type `%s'."), type); return false; } if (!fmt_check (&f, use)) return false; } } } /* Add COUNT copies of the NEW_FORMAT_CNT formats in NEW_FORMATS to FORMATS. */ if (new_format_cnt != 0 && size_overflow_p (xtimes (xsum (formats_used, xtimes (count, new_format_cnt)), sizeof *formats))) xalloc_die (); formats_needed = count * new_format_cnt; if (formats_used + formats_needed > formats_allocated) { formats_allocated = formats_used + formats_needed; *formats = pool_2nrealloc (pool, *formats, &formats_allocated, sizeof **formats); } for (; count > 0; count--) { memcpy (&(*formats)[formats_used], new_formats, sizeof **formats * new_format_cnt); formats_used += new_format_cnt; } lex_match (lexer, T_COMMA); } *format_cnt = formats_used; return true; } /* Checks whether FORMAT represents one of the special "formats" for T, X, or /. If so, updates *RECORD or *COLUMN (or both) as appropriate, and returns true. Otherwise, returns false without any side effects. */ bool execute_placement_format (const struct fmt_spec *format, int *record, int *column) { switch ((int) format->type) { case PRS_TYPE_X: *column += format->w; return true; case PRS_TYPE_T: *column = format->w; return true; case PRS_TYPE_NEW_REC: (*record)++; *column = 1; return true; default: assert (format->type < FMT_NUMBER_OF_FORMATS); return false; } } static bool parse_column__ (int value, int base, int *column) { assert (base == 0 || base == 1); *column = value - base + 1; if (*column < 1) { if (base == 1) msg (SE, _("Column positions for fields must be positive.")); else msg (SE, _("Column positions for fields must not be negative.")); return false; } return true; } /* Parses a BASE-based column using LEXER. Returns true and stores a 1-based column number into *COLUMN if successful, otherwise emits an error message and returns false. If BASE is 0, zero-based column numbers are parsed; if BASE is 1, 1-based column numbers are parsed. Regardless of BASE, the values stored in *FIRST_COLUMN and *LAST_COLUMN are 1-based. */ bool parse_column (struct lexer *lexer, int base, int *column) { assert (base == 0 || base == 1); if (!lex_force_int (lexer) || !parse_column__ (lex_integer (lexer), base, column)) return false; lex_get (lexer); return true; } /* Parse a column or a range of columns, specified as a single integer or two integers delimited by a dash. Stores the range in *FIRST_COLUMN and *LAST_COLUMN. (If only a single integer is given, it is stored in both.) If RANGE_SPECIFIED is non-null, then *RANGE_SPECIFIED is set to true if the syntax contained a dash, false otherwise. Returns true if successful, false if the syntax was invalid or the values specified did not make sense. If BASE is 0, zero-based column numbers are parsed; if BASE is 1, 1-based column numbers are parsed. Regardless of BASE, the values stored in *FIRST_COLUMN and *LAST_COLUMN are 1-based. */ bool parse_column_range (struct lexer *lexer, int base, int *first_column, int *last_column, bool *range_specified) { /* First column. */ if (!lex_force_int (lexer) || !parse_column__ (lex_integer (lexer), base, first_column)) return false; lex_get (lexer); /* Last column. */ if (lex_is_integer (lexer) && lex_integer (lexer) < 0) { if (!parse_column__ (-lex_integer (lexer), base, last_column)) return false; lex_get (lexer); if (*last_column < *first_column) { msg (SE, _("The ending column for a field must be " "greater than the starting column.")); return false; } if (range_specified) *range_specified = true; } else { *last_column = *first_column; if (range_specified) *range_specified = false; } return true; } /* Parses a (possibly empty) sequence of slashes, each of which may be followed by an integer. A slash on its own increases *RECORD by 1 and sets *COLUMN to 1. A slash followed by an integer sets *RECORD to the integer, as long as that increases *RECORD, and sets *COLUMN to 1. Returns true if successful, false on syntax error. */ bool parse_record_placement (struct lexer *lexer, int *record, int *column) { while (lex_match (lexer, T_SLASH)) { if (lex_is_integer (lexer)) { if (lex_integer (lexer) <= *record) { msg (SE, _("The record number specified, %ld, is at or " "before the previous record, %d. Data " "fields must be listed in order of " "increasing record number."), lex_integer (lexer), *record); return false; } *record = lex_integer (lexer); lex_get (lexer); } else (*record)++; *column = 1; } assert (*record >= 1); return true; } pspp-1.0.1/src/language/data-io/data-reader.h0000644000175000017500000000403512642263765015645 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011, 2012, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DFM_READ_H #define DFM_READ_H /* Data file manager (dfm). This module is in charge of reading and writing data files (other than system files). dfm is an fhuser, so see file-handle.h for the fhuser interface. */ #include #include struct file_handle; struct string; struct lexer; /* Input. */ struct dfm_reader *dfm_open_reader (struct file_handle *, struct lexer *, const char *encoding); void dfm_close_reader (struct dfm_reader *); bool dfm_reader_error (const struct dfm_reader *); unsigned dfm_eof (struct dfm_reader *); struct substring dfm_get_record (struct dfm_reader *); void dfm_expand_tabs (struct dfm_reader *); const char *dfm_reader_get_encoding (const struct dfm_reader *); /* Line control. */ void dfm_forward_record (struct dfm_reader *); void dfm_reread_record (struct dfm_reader *, size_t column); void dfm_forward_columns (struct dfm_reader *, size_t columns); size_t dfm_column_start (const struct dfm_reader *); size_t dfm_columns_past_end (const struct dfm_reader *); size_t dfm_get_column (const struct dfm_reader *, const char *); /* Information. */ const char *dfm_get_file_name (const struct dfm_reader *); int dfm_get_line_number (const struct dfm_reader *); #endif /* data-reader.h */ pspp-1.0.1/src/language/data-io/matrix-data.c0000644000175000017500000004033513137223525015673 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/case.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/data-io/data-parser.h" #include "language/data-io/data-reader.h" #include "language/data-io/file-handle.h" #include "language/data-io/inpt-pgm.h" #include "language/data-io/placement-parser.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "gl/xsize.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* DATA LIST transformation data. */ struct data_list_trns { struct data_parser *parser; /* Parser. */ struct dfm_reader *reader; /* Data file reader. */ struct variable *end; /* Variable specified on END subcommand. */ }; static trns_free_func data_list_trns_free; static trns_proc_func data_list_trns_proc; enum diagonal { DIAGONAL, NO_DIAGONAL }; enum triangle { LOWER, UPPER, FULL }; static const int ROWTYPE_WIDTH = 8; struct matrix_format { enum triangle triangle; enum diagonal diagonal; const struct variable *rowtype; const struct variable *varname; int n_continuous_vars; struct variable **split_vars; size_t n_split_vars; long n; }; /* valid rowtype_ values: CORR, COV, MAT, MSE, DFE, MEAN, STDDEV (or SD), N_VECTOR (or N), N_SCALAR, N_MATRIX, COUNT, PROX. */ /* Sets the value of OUTCASE which corresponds to VNAME to the value STR. VNAME must be of type string. */ static void set_varname_column (struct ccase *outcase, const struct variable *vname, const char *str) { int len = var_get_width (vname); uint8_t *s = value_str_rw (case_data_rw (outcase, vname), len); strncpy ((char *) s, str, len); } static void blank_varname_column (struct ccase *outcase, const struct variable *vname) { int len = var_get_width (vname); uint8_t *s = value_str_rw (case_data_rw (outcase, vname), len); memset (s, ' ', len); } static struct casereader * preprocess (struct casereader *casereader0, const struct dictionary *dict, void *aux) { struct matrix_format *mformat = aux; const struct caseproto *proto = casereader_get_proto (casereader0); struct casewriter *writer; writer = autopaging_writer_create (proto); struct ccase *prev_case = NULL; double **matrices = NULL; size_t n_splits = 0; const size_t sizeof_matrix = sizeof (double) * mformat->n_continuous_vars * mformat->n_continuous_vars; /* Make an initial pass to populate our temporary matrix */ struct casereader *pass0 = casereader_clone (casereader0); struct ccase *c; unsigned int prev_split_hash = 1; int row = (mformat->triangle == LOWER && mformat->diagonal == NO_DIAGONAL) ? 1 : 0; for (; (c = casereader_read (pass0)) != NULL; case_unref (c)) { int s; unsigned int split_hash = 0; for (s = 0; s < mformat->n_split_vars; ++s) { const struct variable *svar = mformat->split_vars[s]; const union value *sv = case_data (c, svar); split_hash = value_hash (sv, var_get_width (svar), split_hash); } if (matrices == NULL || prev_split_hash != split_hash) { row = (mformat->triangle == LOWER && mformat->diagonal == NO_DIAGONAL) ? 1 : 0; n_splits++; matrices = xrealloc (matrices, sizeof (double*) * n_splits); matrices[n_splits - 1] = xmalloc (sizeof_matrix); } prev_split_hash = split_hash; int c_offset = (mformat->triangle == UPPER) ? row : 0; if (mformat->triangle == UPPER && mformat->diagonal == NO_DIAGONAL) c_offset++; const union value *v = case_data (c, mformat->rowtype); const char *val = (const char *) value_str (v, ROWTYPE_WIDTH); if (0 == strncasecmp (val, "corr ", ROWTYPE_WIDTH) || 0 == strncasecmp (val, "cov ", ROWTYPE_WIDTH)) { if (row >= mformat->n_continuous_vars) { msg (SE, _("There are %d variable declared but the data has at least %d matrix rows."), mformat->n_continuous_vars, row + 1); goto error; } int col; for (col = c_offset; col < mformat->n_continuous_vars; ++col) { const struct variable *var = dict_get_var (dict, 1 + col - c_offset + var_get_dict_index (mformat->varname)); double e = case_data (c, var)->f; if (e == SYSMIS) continue; /* Fill in the lower triangle */ (matrices[n_splits-1])[col + mformat->n_continuous_vars * row] = e; if (mformat->triangle != FULL) /* Fill in the upper triangle */ (matrices[n_splits-1]) [row + mformat->n_continuous_vars * col] = e; } row++; } } casereader_destroy (pass0); /* Now make a second pass to fill in the other triangle from our temporary matrix */ const int idx = var_get_dict_index (mformat->varname); row = 0; if (mformat->n >= 0) { int col; struct ccase *outcase = case_create (proto); union value *v = case_data_rw (outcase, mformat->rowtype); uint8_t *n = value_str_rw (v, ROWTYPE_WIDTH); strncpy ((char *) n, "N ", ROWTYPE_WIDTH); blank_varname_column (outcase, mformat->varname); for (col = 0; col < mformat->n_continuous_vars; ++col) { union value *dest_val = case_data_rw_idx (outcase, 1 + col + var_get_dict_index (mformat->varname)); dest_val->f = mformat->n; } casewriter_write (writer, outcase); } prev_split_hash = 1; n_splits = 0; for (; (c = casereader_read (casereader0)) != NULL; prev_case = c) { int s; unsigned int split_hash = 0; for (s = 0; s < mformat->n_split_vars; ++s) { const struct variable *svar = mformat->split_vars[s]; const union value *sv = case_data (c, svar); split_hash = value_hash (sv, var_get_width (svar), split_hash); } if (prev_split_hash != split_hash) { n_splits++; row = 0; } prev_split_hash = split_hash; case_unref (prev_case); const union value *v = case_data (c, mformat->rowtype); const char *val = (const char *) value_str (v, ROWTYPE_WIDTH); if (mformat->n >= 0) { if (0 == strncasecmp (val, "n ", ROWTYPE_WIDTH) || 0 == strncasecmp (val, "n_vector", ROWTYPE_WIDTH)) { msg (SW, _("The N subcommand was specified, but a N record was also found in the data. The N record will be ignored.")); continue; } } struct ccase *outcase = case_create (proto); case_copy (outcase, 0, c, 0, caseproto_get_n_widths (proto)); if (0 == strncasecmp (val, "corr ", ROWTYPE_WIDTH) || 0 == strncasecmp (val, "cov ", ROWTYPE_WIDTH)) { int col; const struct variable *var = dict_get_var (dict, idx + 1 + row); set_varname_column (outcase, mformat->varname, var_get_name (var)); value_copy (case_data_rw (outcase, mformat->rowtype), v, ROWTYPE_WIDTH); for (col = 0; col < mformat->n_continuous_vars; ++col) { union value *dest_val = case_data_rw_idx (outcase, 1 + col + var_get_dict_index (mformat->varname)); dest_val->f = (matrices[n_splits - 1])[col + mformat->n_continuous_vars * row]; if (col == row && mformat->diagonal == NO_DIAGONAL) dest_val->f = 1.0; } row++; } else { blank_varname_column (outcase, mformat->varname); } /* Special case for SD and N_VECTOR: Rewrite as STDDEV and N respectively */ if (0 == strncasecmp (val, "sd ", ROWTYPE_WIDTH)) { value_copy_buf_rpad (case_data_rw (outcase, mformat->rowtype), ROWTYPE_WIDTH, (uint8_t *) "STDDEV", 6, ' '); } else if (0 == strncasecmp (val, "n_vector", ROWTYPE_WIDTH)) { value_copy_buf_rpad (case_data_rw (outcase, mformat->rowtype), ROWTYPE_WIDTH, (uint8_t *) "N", 1, ' '); } casewriter_write (writer, outcase); } /* If NODIAGONAL is specified, then a final case must be written */ if (mformat->diagonal == NO_DIAGONAL) { int col; struct ccase *outcase = case_create (proto); if (prev_case) case_copy (outcase, 0, prev_case, 0, caseproto_get_n_widths (proto)); const struct variable *var = dict_get_var (dict, idx + 1 + row); set_varname_column (outcase, mformat->varname, var_get_name (var)); for (col = 0; col < mformat->n_continuous_vars; ++col) { union value *dest_val = case_data_rw_idx (outcase, 1 + col + var_get_dict_index (mformat->varname)); dest_val->f = (matrices[n_splits - 1]) [col + mformat->n_continuous_vars * row]; if (col == row && mformat->diagonal == NO_DIAGONAL) dest_val->f = 1.0; } casewriter_write (writer, outcase); } if (prev_case) case_unref (prev_case); int i; for (i = 0 ; i < n_splits; ++i) free (matrices[i]); free (matrices); struct casereader *reader1 = casewriter_make_reader (writer); casereader_destroy (casereader0); return reader1; error: if (prev_case) case_unref (prev_case); for (i = 0 ; i < n_splits; ++i) free (matrices[i]); free (matrices); casereader_destroy (casereader0); return NULL; } int cmd_matrix (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict; struct data_parser *parser; struct dfm_reader *reader; struct file_handle *fh = NULL; char *encoding = NULL; struct matrix_format mformat; int i; size_t n_names; char **names = NULL; mformat.triangle = LOWER; mformat.diagonal = DIAGONAL; mformat.n_split_vars = 0; mformat.split_vars = NULL; mformat.n = -1; dict = (in_input_program () ? dataset_dict (ds) : dict_create (get_default_encoding ())); parser = data_parser_create (dict); reader = NULL; data_parser_set_type (parser, DP_DELIMITED); data_parser_set_warn_missing_fields (parser, false); data_parser_set_span (parser, false); mformat.rowtype = dict_create_var (dict, "ROWTYPE_", ROWTYPE_WIDTH); mformat.n_continuous_vars = 0; mformat.n_split_vars = 0; if (! lex_force_match_id (lexer, "VARIABLES")) goto error; lex_match (lexer, T_EQUALS); if (! parse_mixed_vars (lexer, dict, &names, &n_names, PV_NO_DUPLICATE)) { int i; for (i = 0; i < n_names; ++i) free (names[i]); free (names); goto error; } int longest_name = 0; for (i = 0; i < n_names; ++i) { maximize_int (&longest_name, strlen (names[i])); } mformat.varname = dict_create_var (dict, "VARNAME_", 8 * DIV_RND_UP (longest_name, 8)); for (i = 0; i < n_names; ++i) { if (0 == strcasecmp (names[i], "ROWTYPE_")) { const struct fmt_spec fmt = fmt_for_input (FMT_A, 8, 0); data_parser_add_delimited_field (parser, &fmt, var_get_case_index (mformat.rowtype), "ROWTYPE_"); } else { const struct fmt_spec fmt = fmt_for_input (FMT_F, 10, 4); struct variable *v = dict_create_var (dict, names[i], 0); var_set_both_formats (v, &fmt); data_parser_add_delimited_field (parser, &fmt, var_get_case_index (mformat.varname) + ++mformat.n_continuous_vars, names[i]); } } for (i = 0; i < n_names; ++i) free (names[i]); free (names); while (lex_token (lexer) != T_ENDCMD) { if (! lex_force_match (lexer, T_SLASH)) goto error; if (lex_match_id (lexer, "N")) { lex_match (lexer, T_EQUALS); if (! lex_force_int (lexer)) goto error; mformat.n = lex_integer (lexer); if (mformat.n < 0) { msg (SE, _("%s must not be negative."), "N"); goto error; } lex_get (lexer); } else if (lex_match_id (lexer, "FORMAT")) { lex_match (lexer, T_EQUALS); while (lex_token (lexer) != T_SLASH && (lex_token (lexer) != T_ENDCMD)) { if (lex_match_id (lexer, "LIST")) { data_parser_set_span (parser, false); } else if (lex_match_id (lexer, "FREE")) { data_parser_set_span (parser, true); } else if (lex_match_id (lexer, "UPPER")) { mformat.triangle = UPPER; } else if (lex_match_id (lexer, "LOWER")) { mformat.triangle = LOWER; } else if (lex_match_id (lexer, "FULL")) { mformat.triangle = FULL; } else if (lex_match_id (lexer, "DIAGONAL")) { mformat.diagonal = DIAGONAL; } else if (lex_match_id (lexer, "NODIAGONAL")) { mformat.diagonal = NO_DIAGONAL; } else { lex_error (lexer, NULL); goto error; } } } else if (lex_match_id (lexer, "FILE")) { lex_match (lexer, T_EQUALS); fh_unref (fh); fh = fh_parse (lexer, FH_REF_FILE | FH_REF_INLINE, NULL); if (fh == NULL) goto error; } else if (lex_match_id (lexer, "SPLIT")) { lex_match (lexer, T_EQUALS); if (! parse_variables (lexer, dict, &mformat.split_vars, &mformat.n_split_vars, 0)) { free (mformat.split_vars); goto error; } int i; for (i = 0; i < mformat.n_split_vars; ++i) { const struct fmt_spec fmt = fmt_for_input (FMT_F, 4, 0); var_set_both_formats (mformat.split_vars[i], &fmt); } dict_reorder_vars (dict, mformat.split_vars, mformat.n_split_vars); mformat.n_continuous_vars -= mformat.n_split_vars; } else { lex_error (lexer, NULL); goto error; } } if (mformat.diagonal == NO_DIAGONAL && mformat.triangle == FULL) { msg (SE, _("FORMAT = FULL and FORMAT = NODIAGONAL are mutually exclusive.")); goto error; } if (fh == NULL) fh = fh_inline_file (); fh_set_default_handle (fh); if (!data_parser_any_fields (parser)) { msg (SE, _("At least one variable must be specified.")); goto error; } if (lex_end_of_command (lexer) != CMD_SUCCESS) goto error; reader = dfm_open_reader (fh, lexer, encoding); if (reader == NULL) goto error; if (in_input_program ()) { struct data_list_trns *trns = xmalloc (sizeof *trns); trns->parser = parser; trns->reader = reader; trns->end = NULL; add_transformation (ds, data_list_trns_proc, data_list_trns_free, trns); } else { data_parser_make_active_file (parser, ds, reader, dict, preprocess, &mformat); } fh_unref (fh); free (encoding); free (mformat.split_vars); return CMD_DATA_LIST; error: data_parser_destroy (parser); if (!in_input_program ()) dict_destroy (dict); fh_unref (fh); free (encoding); free (mformat.split_vars); return CMD_CASCADING_FAILURE; } /* Input procedure. */ /* Destroys DATA LIST transformation TRNS. Returns true if successful, false if an I/O error occurred. */ static bool data_list_trns_free (void *trns_) { struct data_list_trns *trns = trns_; data_parser_destroy (trns->parser); dfm_close_reader (trns->reader); free (trns); return true; } /* Handle DATA LIST transformation TRNS, parsing data into *C. */ static int data_list_trns_proc (void *trns_, struct ccase **c, casenumber case_num UNUSED) { struct data_list_trns *trns = trns_; int retval; *c = case_unshare (*c); if (data_parser_parse (trns->parser, trns->reader, *c)) retval = TRNS_CONTINUE; else if (dfm_reader_error (trns->reader) || dfm_eof (trns->reader) > 1) { /* An I/O error, or encountering end of file for a second time, should be escalated into a more serious error. */ retval = TRNS_ERROR; } else retval = TRNS_END_FILE; /* If there was an END subcommand handle it. */ if (trns->end != NULL) { double *end = &case_data_rw (*c, trns->end)->f; if (retval == TRNS_END_FILE) { *end = 1.0; retval = TRNS_CONTINUE; } else *end = 0.0; } return retval; } pspp-1.0.1/src/language/data-io/data-parser.h0000644000175000017500000000722413137223525015670 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2011, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LANGUAGE_DATA_IO_DATA_PARSER_H #define LANGUAGE_DATA_IO_DATA_PARSER_H /* Abstraction of a DATA LIST or GET DATA TYPE=TXT data parser. */ #include #include "data/case.h" #include "libpspp/str.h" struct dataset; struct dfm_reader; struct dictionary; struct file_handle; struct fmt_spec; struct substring; /* Type of data read by a data parser. */ enum data_parser_type { DP_FIXED, /* Fields in fixed column positions. */ DP_DELIMITED /* Fields delimited by e.g. commas. */ }; /* Creating and configuring any parser. */ struct data_parser *data_parser_create (const struct dictionary *dict); void data_parser_destroy (struct data_parser *); enum data_parser_type data_parser_get_type (const struct data_parser *); void data_parser_set_type (struct data_parser *, enum data_parser_type); void data_parser_set_skip (struct data_parser *, int initial_records_to_skip); /* For configuring delimited parsers only. */ bool data_parser_get_span (const struct data_parser *); void data_parser_set_span (struct data_parser *, bool may_cases_span_records); void data_parser_set_empty_line_has_field (struct data_parser *, bool empty_line_has_field); void data_parser_set_warn_missing_fields (struct data_parser *parser, bool warn_missing_fields); void data_parser_set_quotes (struct data_parser *, struct substring); void data_parser_set_quote_escape (struct data_parser *, bool escape); void data_parser_set_soft_delimiters (struct data_parser *, struct substring); void data_parser_set_hard_delimiters (struct data_parser *, struct substring); /* For configuring fixed parsers only. */ int data_parser_get_records (const struct data_parser *); void data_parser_set_records (struct data_parser *, int records_per_case); /* Field setup and parsing. */ void data_parser_add_delimited_field (struct data_parser *, const struct fmt_spec *, int fv, const char *name); void data_parser_add_fixed_field (struct data_parser *, const struct fmt_spec *, int fv, const char *name, int record, int first_column); bool data_parser_any_fields (const struct data_parser *); bool data_parser_parse (struct data_parser *, struct dfm_reader *, struct ccase *); /* Uses for a configured parser. */ void data_parser_output_description (struct data_parser *, const struct file_handle *); struct casereader; void data_parser_make_active_file (struct data_parser *, struct dataset *, struct dfm_reader *, struct dictionary *, struct casereader* (*func)(struct casereader *, const struct dictionary *, void *), void *ud); #endif /* language/data-io/data-parser.h */ pspp-1.0.1/src/language/data-io/data-writer.h0000644000175000017500000000237112470243700015702 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef DFM_WRITE_H #define DFM_WRITE_H /* Writing data files. */ #include #include struct file_handle; struct dfm_writer *dfm_open_writer (struct file_handle *, const char *encoding); bool dfm_close_writer (struct dfm_writer *); bool dfm_write_error (const struct dfm_writer *); bool dfm_put_record (struct dfm_writer *, const char *rec, size_t len); const char *dfm_writer_get_encoding (const struct dfm_writer *); #endif /* data-writer.h */ pspp-1.0.1/src/language/data-io/list.c0000644000175000017500000001575713137223525014445 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009-2011, 2013, 2014, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include "data/casegrouper.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/data-out.h" #include "data/format.h" #include "data/subcase.h" #include "data/variable.h" #include "language/command.h" #include "language/dictionary/split-file.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/compiler.h" #include "libpspp/ll.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "output/tab.h" #include "output/table-item.h" #include "gl/intprops.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gl/xmalloca.h" #include "gettext.h" #define _(msgid) gettext (msgid) enum numbering { format_unnumbered, format_numbered }; struct lst_cmd { long first; long last; long step; const struct variable **v_variables; size_t n_variables; enum numbering numbering; }; static int list_execute (const struct lst_cmd *lcmd, struct dataset *ds) { const struct dictionary *dict = dataset_dict (ds); bool ok; int i; struct casegrouper *grouper; struct casereader *group; struct subcase sc; subcase_init_empty (&sc); for (i = 0; i < lcmd->n_variables; i++) subcase_add_var (&sc, lcmd->v_variables[i], SC_ASCEND); grouper = casegrouper_create_splits (proc_open (ds), dict); while (casegrouper_get_next_group (grouper, &group)) { struct ccase *ccase; struct table *t = NULL; ccase = casereader_peek (group, 0); if (ccase != NULL) { output_split_file_values (ds, ccase); case_unref (ccase); } group = casereader_project (group, &sc); if (lcmd->numbering == format_numbered) group = casereader_create_arithmetic_sequence (group, 1, 1); group = casereader_select (group, lcmd->first - 1, (lcmd->last != LONG_MAX ? lcmd->last : CASENUMBER_MAX), lcmd->step); if (lcmd->numbering == format_numbered) { struct fmt_spec fmt; size_t col; int width; width = lcmd->last == LONG_MAX ? 5 : intlog10 (lcmd->last); fmt = fmt_for_output (FMT_F, width, 0); col = caseproto_get_n_widths (casereader_get_proto (group)) - 1; t = table_from_casereader (group, col, _("Case Number"), &fmt); } else t = NULL; for (i = 0; i < lcmd->n_variables; i++) { const struct variable *var = lcmd->v_variables[i]; struct table *c; c = table_from_casereader (group, i, var_get_name (var), var_get_print_format (var)); t = table_hpaste (t, c); } casereader_destroy (group); if (t) table_item_submit (table_item_create (t, "Data List", NULL)); } ok = casegrouper_destroy (grouper); ok = proc_commit (ds) && ok; subcase_destroy (&sc); free (lcmd->v_variables); return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; } /* Parses and executes the LIST procedure. */ int cmd_list (struct lexer *lexer, struct dataset *ds) { struct lst_cmd cmd; const struct dictionary *dict = dataset_dict (ds); /* Fill in defaults. */ cmd.step = 1; cmd.first = 1; cmd.last = LONG_MAX; cmd.n_variables = 0; cmd.v_variables = NULL; cmd.numbering = format_unnumbered; while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "VARIABLES") ) { lex_match (lexer, T_EQUALS); if (! parse_variables_const (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 )) { msg (SE, _("No variables specified.")); return CMD_FAILURE; } } else if (lex_match_id (lexer, "FORMAT") ) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "NUMBERED") ) { cmd.numbering = format_numbered; } else if (lex_match_id (lexer, "UNNUMBERED") ) { cmd.numbering = format_unnumbered; } else { lex_error (lexer, NULL); goto error; } } /* example: LIST /CASES=FROM 1 TO 25 BY 5. */ else if (lex_match_id (lexer, "CASES")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "FROM") && lex_force_int (lexer)) { cmd.first = lex_integer (lexer); lex_get (lexer); } if ((lex_match (lexer, T_TO) && lex_force_int (lexer)) || lex_is_integer (lexer)) { cmd.last = lex_integer (lexer); lex_get (lexer); } if (lex_match (lexer, T_BY) && lex_force_int (lexer)) { cmd.step = lex_integer (lexer); lex_get (lexer); } } else if (! parse_variables_const (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 )) { return CMD_FAILURE; } } /* Verify arguments. */ if (cmd.first > cmd.last) { int t; msg (SW, _("The first case (%ld) specified precedes the last case (%ld) " "specified. The values will be swapped."), cmd.first, cmd.last); t = cmd.first; cmd.first = cmd.last; cmd.last = t; } if (cmd.first < 1) { msg (SW, _("The first case (%ld) to list is numbered less than 1. " "The value is being reset to 1."), cmd.first); cmd.first = 1; } if (cmd.last < 1) { msg (SW, _("The last case (%ld) to list is numbered less than 1. " "The value is being reset to 1."), cmd.last); cmd.last = 1; } if (cmd.step < 1) { msg (SW, _("The step value %ld is less than 1. The value is being " "reset to 1."), cmd.step); cmd.step = 1; } /* If no variables were explicitly provided, then default to ALL */ if (cmd.n_variables == 0) dict_get_vars (dict, &cmd.v_variables, &cmd.n_variables, DC_SYSTEM | DC_SCRATCH); return list_execute (&cmd, ds); error: free (cmd.v_variables); return CMD_FAILURE; } pspp-1.0.1/src/language/data-io/matrix-reader.h0000644000175000017500000000314013137223525016222 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef MATRIX_READER_H #define MATRIX_READER_H #include #include struct matrix_material { gsl_matrix *corr ; /* The correlation matrix */ gsl_matrix *cov ; /* The covariance matrix */ /* Moment matrices */ const gsl_matrix *n ; /* MOMENT 0 */ const gsl_matrix *mean_matrix; /* MOMENT 1 */ const gsl_matrix *var_matrix; /* MOMENT 2 */ }; struct dictionary; struct variable; struct casereader; struct matrix_reader; struct matrix_reader *create_matrix_reader_from_case_reader (const struct dictionary *dict, struct casereader *in_reader, const struct variable ***vars, size_t *n_vars); bool destroy_matrix_reader (struct matrix_reader *mr); bool next_matrix_from_reader (struct matrix_material *mm, struct matrix_reader *mr, const struct variable **vars, int n_vars); #endif pspp-1.0.1/src/language/data-io/get-data.c0000644000175000017500000004504713137223525015153 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/gnumeric-reader.h" #include "data/ods-reader.h" #include "data/spreadsheet-reader.h" #include "data/psql-reader.h" #include "data/settings.h" #include "language/command.h" #include "language/data-io/data-parser.h" #include "language/data-io/data-reader.h" #include "language/data-io/file-handle.h" #include "language/data-io/placement-parser.h" #include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "libpspp/cast.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) static bool parse_spreadsheet (struct lexer *lexer, char **filename, struct spreadsheet_read_options *opts); static void destroy_spreadsheet_read_info (struct spreadsheet_read_options *); static int parse_get_txt (struct lexer *lexer, struct dataset *); static int parse_get_psql (struct lexer *lexer, struct dataset *); int cmd_get_data (struct lexer *lexer, struct dataset *ds) { char *tok = NULL; struct spreadsheet_read_options opts; opts.sheet_name = NULL; opts.sheet_index = -1; opts.cell_range = NULL; opts.read_names = false; opts.asw = -1; if (! lex_force_match (lexer, T_SLASH)) goto error; if (!lex_force_match_id (lexer, "TYPE")) goto error; if (!lex_force_match (lexer, T_EQUALS)) goto error; const char *s = lex_tokcstr (lexer); if (s) tok = strdup (s); if (lex_match_id (lexer, "TXT")) { free (tok); return parse_get_txt (lexer, ds); } else if (lex_match_id (lexer, "PSQL")) { free (tok); return parse_get_psql (lexer, ds); } else if (lex_match_id (lexer, "GNM") || lex_match_id (lexer, "ODS")) { char *filename = NULL; if (!parse_spreadsheet (lexer, &filename, &opts)) goto error; struct spreadsheet *spreadsheet = NULL; if ( 0 == strncasecmp (tok, "GNM", 3)) spreadsheet = gnumeric_probe (filename, true); else if ( 0 == strncasecmp (tok, "ODS", 3)) spreadsheet = ods_probe (filename, true); if (spreadsheet == NULL) { msg (SE, _("error reading file `%s'"), filename); free (filename); goto error; } free (filename); struct casereader *reader = spreadsheet_make_reader (spreadsheet, &opts); if (reader) { dataset_set_dict (ds, dict_clone (spreadsheet->dict)); dataset_set_source (ds, reader); free (tok); destroy_spreadsheet_read_info (&opts); spreadsheet_unref (spreadsheet); return CMD_SUCCESS; } spreadsheet_unref (spreadsheet); } else msg (SE, _("Unsupported TYPE %s."), tok); error: destroy_spreadsheet_read_info (&opts); free (tok); return CMD_FAILURE; } static int parse_get_psql (struct lexer *lexer, struct dataset *ds) { struct psql_read_info psql; psql.allow_clear = false; psql.conninfo = NULL; psql.str_width = -1; psql.bsize = -1; ds_init_empty (&psql.sql); if (! lex_force_match (lexer, T_SLASH)) goto error; if (!lex_force_match_id (lexer, "CONNECT")) goto error; if (! lex_force_match (lexer, T_EQUALS)) goto error; if (!lex_force_string (lexer)) goto error; psql.conninfo = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); while (lex_match (lexer, T_SLASH) ) { if ( lex_match_id (lexer, "ASSUMEDSTRWIDTH")) { lex_match (lexer, T_EQUALS); if (lex_force_int (lexer)) { psql.str_width = lex_integer (lexer); lex_get (lexer); } } else if ( lex_match_id (lexer, "BSIZE")) { lex_match (lexer, T_EQUALS); if (lex_force_int (lexer)) { psql.bsize = lex_integer (lexer); lex_get (lexer); } } else if ( lex_match_id (lexer, "UNENCRYPTED")) { psql.allow_clear = true; } else if (lex_match_id (lexer, "SQL")) { lex_match (lexer, T_EQUALS); if ( ! lex_force_string (lexer) ) goto error; ds_put_substring (&psql.sql, lex_tokss (lexer)); lex_get (lexer); } } { struct dictionary *dict = NULL; struct casereader *reader = psql_open_reader (&psql, &dict); if ( reader ) { dataset_set_dict (ds, dict); dataset_set_source (ds, reader); } } ds_destroy (&psql.sql); free (psql.conninfo); return CMD_SUCCESS; error: ds_destroy (&psql.sql); free (psql.conninfo); return CMD_FAILURE; } static bool parse_spreadsheet (struct lexer *lexer, char **filename, struct spreadsheet_read_options *opts) { opts->sheet_index = 1; opts->sheet_name = NULL; opts->cell_range = NULL; opts->read_names = true; opts->asw = -1; if (! lex_force_match (lexer, T_SLASH)) goto error; if (!lex_force_match_id (lexer, "FILE")) goto error; if (! lex_force_match (lexer, T_EQUALS)) goto error; if (!lex_force_string (lexer)) goto error; *filename = utf8_to_filename (lex_tokcstr (lexer)); lex_get (lexer); while (lex_match (lexer, T_SLASH) ) { if ( lex_match_id (lexer, "ASSUMEDSTRWIDTH")) { lex_match (lexer, T_EQUALS); if (lex_force_int (lexer)) { opts->asw = lex_integer (lexer); lex_get (lexer); } } else if (lex_match_id (lexer, "SHEET")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "NAME")) { if ( ! lex_force_string (lexer) ) goto error; opts->sheet_name = ss_xstrdup (lex_tokss (lexer)); opts->sheet_index = -1; lex_get (lexer); } else if (lex_match_id (lexer, "INDEX")) { if (!lex_force_int (lexer)) goto error; opts->sheet_index = lex_integer (lexer); if (opts->sheet_index <= 0) { msg (SE, _("The sheet index must be greater than or equal to 1")); goto error; } lex_get (lexer); } else { msg (SE, _("%s must be followed by either \"%s\" or \"%s\"."), "/SHEET", "NAME", "INDEX"); goto error; } } else if (lex_match_id (lexer, "CELLRANGE")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "FULL")) { opts->cell_range = NULL; } else if (lex_match_id (lexer, "RANGE")) { if ( ! lex_force_string (lexer) ) goto error; opts->cell_range = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } else { msg (SE, _("%s must be followed by either \"%s\" or \"%s\"."), "/CELLRANGE", "FULL", "RANGE"); goto error; } } else if (lex_match_id (lexer, "READNAMES")) { lex_match (lexer, T_EQUALS); if ( lex_match_id (lexer, "ON")) { opts->read_names = true; } else if (lex_match_id (lexer, "OFF")) { opts->read_names = false; } else { msg (SE, _("%s must be followed by either \"%s\" or \"%s\"."), "/READNAMES", "ON", "OFF"); goto error; } } else { lex_error (lexer, NULL); goto error; } } return true; error: return false; } static bool set_type (struct data_parser *parser, const char *subcommand, enum data_parser_type type, bool *has_type) { if (!*has_type) { data_parser_set_type (parser, type); *has_type = true; } else if (type != data_parser_get_type (parser)) { msg (SE, _("%s is allowed only with %s arrangement, but %s arrangement " "was stated or implied earlier in this command."), subcommand, type == DP_FIXED ? "FIXED" : "DELIMITED", type == DP_FIXED ? "DELIMITED" : "FIXED"); return false; } return true; } static int parse_get_txt (struct lexer *lexer, struct dataset *ds) { struct data_parser *parser = NULL; struct dictionary *dict = dict_create (get_default_encoding ()); struct file_handle *fh = NULL; struct dfm_reader *reader = NULL; char *encoding = NULL; char *name = NULL; int record; enum data_parser_type type; bool has_type; if (! lex_force_match (lexer, T_SLASH)) goto error; if (!lex_force_match_id (lexer, "FILE")) goto error; if (! lex_force_match (lexer, T_EQUALS)) goto error; fh = fh_parse (lexer, FH_REF_FILE | FH_REF_INLINE, NULL); if (fh == NULL) goto error; parser = data_parser_create (dict); has_type = false; data_parser_set_type (parser, DP_DELIMITED); data_parser_set_span (parser, false); data_parser_set_quotes (parser, ss_empty ()); data_parser_set_quote_escape (parser, true); data_parser_set_empty_line_has_field (parser, true); for (;;) { if (!lex_force_match (lexer, T_SLASH)) goto error; if (lex_match_id (lexer, "ENCODING")) { lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; free (encoding); encoding = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "ARRANGEMENT")) { bool ok; lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "FIXED")) ok = set_type (parser, "ARRANGEMENT=FIXED", DP_FIXED, &has_type); else if (lex_match_id (lexer, "DELIMITED")) ok = set_type (parser, "ARRANGEMENT=DELIMITED", DP_DELIMITED, &has_type); else { lex_error_expecting (lexer, "FIXED", "DELIMITED", NULL_SENTINEL); goto error; } if (!ok) goto error; } else if (lex_match_id (lexer, "FIRSTCASE")) { lex_match (lexer, T_EQUALS); if (!lex_force_int (lexer)) goto error; if (lex_integer (lexer) < 1) { msg (SE, _("Value of %s must be 1 or greater."), "FIRSTCASE"); goto error; } data_parser_set_skip (parser, lex_integer (lexer) - 1); lex_get (lexer); } else if (lex_match_id_n (lexer, "DELCASE", 4)) { if (!set_type (parser, "DELCASE", DP_DELIMITED, &has_type)) goto error; lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "LINE")) data_parser_set_span (parser, false); else if (lex_match_id (lexer, "VARIABLES")) { data_parser_set_span (parser, true); /* VARIABLES takes an integer argument, but for no good reason. We just ignore it. */ if (!lex_force_int (lexer)) goto error; lex_get (lexer); } else { lex_error_expecting (lexer, "LINE", "VARIABLES", NULL_SENTINEL); goto error; } } else if (lex_match_id (lexer, "FIXCASE")) { if (!set_type (parser, "FIXCASE", DP_FIXED, &has_type)) goto error; lex_match (lexer, T_EQUALS); if (!lex_force_int (lexer)) goto error; if (lex_integer (lexer) < 1) { msg (SE, _("Value of %s must be 1 or greater."), "FIXCASE"); goto error; } data_parser_set_records (parser, lex_integer (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "IMPORTCASES")) { lex_match (lexer, T_EQUALS); if (lex_match (lexer, T_ALL)) { /* Nothing to do. */ } else if (lex_match_id (lexer, "FIRST")) { if (!lex_force_int (lexer)) goto error; lex_get (lexer); } else if (lex_match_id (lexer, "PERCENT")) { if (!lex_force_int (lexer)) goto error; lex_get (lexer); } msg (SW, _("Ignoring obsolete IMPORTCASES subcommand. (N OF CASES " "or SAMPLE may be used to substitute.)")); } else if (lex_match_id_n (lexer, "DELIMITERS", 4)) { struct string hard_seps = DS_EMPTY_INITIALIZER; const char *soft_seps = ""; struct substring s; int c; if (!set_type (parser, "DELIMITERS", DP_DELIMITED, &has_type)) goto error; lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; /* XXX should support multibyte UTF-8 characters */ s = lex_tokss (lexer); if (ss_match_string (&s, ss_cstr ("\\t"))) ds_put_cstr (&hard_seps, "\t"); if (ss_match_string (&s, ss_cstr ("\\\\"))) ds_put_cstr (&hard_seps, "\\"); while ((c = ss_get_byte (&s)) != EOF) if (c == ' ') soft_seps = " "; else ds_put_byte (&hard_seps, c); data_parser_set_soft_delimiters (parser, ss_cstr (soft_seps)); data_parser_set_hard_delimiters (parser, ds_ss (&hard_seps)); ds_destroy (&hard_seps); lex_get (lexer); } else if (lex_match_id (lexer, "QUALIFIERS")) { if (!set_type (parser, "QUALIFIERS", DP_DELIMITED, &has_type)) goto error; lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; /* XXX should support multibyte UTF-8 characters */ if (settings_get_syntax () == COMPATIBLE && ss_length (lex_tokss (lexer)) != 1) { msg (SE, _("In compatible syntax mode, the QUALIFIER string " "must contain exactly one character.")); goto error; } data_parser_set_quotes (parser, lex_tokss (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "VARIABLES")) break; else { lex_error_expecting (lexer, "VARIABLES", NULL_SENTINEL); goto error; } } lex_match (lexer, T_EQUALS); record = 1; type = data_parser_get_type (parser); do { struct fmt_spec input, output; struct variable *v; int fc, lc; while (type == DP_FIXED && lex_match (lexer, T_SLASH)) { if (!lex_force_int (lexer)) goto error; if (lex_integer (lexer) < record) { msg (SE, _("The record number specified, %ld, is at or " "before the previous record, %d. Data " "fields must be listed in order of " "increasing record number."), lex_integer (lexer), record); goto error; } if (lex_integer (lexer) > data_parser_get_records (parser)) { msg (SE, _("The record number specified, %ld, exceeds " "the number of records per case specified " "on FIXCASE, %d."), lex_integer (lexer), data_parser_get_records (parser)); goto error; } record = lex_integer (lexer); lex_get (lexer); } const char * tstr = lex_tokcstr (lexer); if (tstr == NULL) { lex_error (lexer, NULL); goto error; } name = xstrdup (tstr); if (!lex_force_id (lexer) || !dict_id_is_valid (dict, name, true)) { goto error; } lex_get (lexer); if (type == DP_DELIMITED) { if (!parse_format_specifier (lexer, &input) || !fmt_check_input (&input)) { goto error; } output = fmt_for_output_from_input (&input); } else { char fmt_type_name[FMT_TYPE_LEN_MAX + 1]; enum fmt_type fmt_type; int w, d; if (!parse_column_range (lexer, 0, &fc, &lc, NULL)) goto error; /* Accept a format (e.g. F8.2) or just a type name (e.g. DOLLAR). */ if (!parse_abstract_format_specifier (lexer, fmt_type_name, &w, &d)) goto error; if (!fmt_from_name (fmt_type_name, &fmt_type)) { msg (SE, _("Unknown format type `%s'."), fmt_type_name); goto error; } /* Compose input format. */ input.type = fmt_type; input.w = lc - fc + 1; input.d = 0; if (!fmt_check_input (&input)) goto error; /* Compose output format. */ if (w != 0) { output.type = fmt_type; output.w = w; output.d = d; if (!fmt_check_output (&output)) goto error; } else output = fmt_for_output_from_input (&input); } v = dict_create_var (dict, name, fmt_var_width (&input)); if (v == NULL) { msg (SE, _("%s is a duplicate variable name."), name); goto error; } var_set_both_formats (v, &output); if (type == DP_DELIMITED) data_parser_add_delimited_field (parser, &input, var_get_case_index (v), name); else data_parser_add_fixed_field (parser, &input, var_get_case_index (v), name, record, fc); free (name); name = NULL; } while (lex_token (lexer) != T_ENDCMD); reader = dfm_open_reader (fh, lexer, encoding); if (reader == NULL) goto error; data_parser_make_active_file (parser, ds, reader, dict, NULL, NULL); fh_unref (fh); free (encoding); return CMD_SUCCESS; error: data_parser_destroy (parser); dict_destroy (dict); fh_unref (fh); free (name); free (encoding); return CMD_CASCADING_FAILURE; } static void destroy_spreadsheet_read_info (struct spreadsheet_read_options *opts) { free (opts->cell_range); free (opts->sheet_name); } pspp-1.0.1/src/language/data-io/save.c0000644000175000017500000002375112523704223014416 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/any-writer.h" #include "data/case-map.h" #include "data/case.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/por-file-writer.h" #include "data/sys-file-writer.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/data-io/file-handle.h" #include "language/data-io/trim.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Writing system and portable files. */ /* Type of output file. */ enum writer_type { SYSFILE_WRITER, /* System file. */ PORFILE_WRITER /* Portable file. */ }; /* Type of a command. */ enum command_type { XFORM_CMD, /* Transformation. */ PROC_CMD /* Procedure. */ }; static int parse_output_proc (struct lexer *, struct dataset *, enum writer_type); static int parse_output_trns (struct lexer *, struct dataset *, enum writer_type); int cmd_save (struct lexer *lexer, struct dataset *ds) { return parse_output_proc (lexer, ds, SYSFILE_WRITER); } int cmd_export (struct lexer *lexer, struct dataset *ds) { return parse_output_proc (lexer, ds, PORFILE_WRITER); } int cmd_xsave (struct lexer *lexer, struct dataset *ds) { return parse_output_trns (lexer, ds, SYSFILE_WRITER); } int cmd_xexport (struct lexer *lexer, struct dataset *ds) { return parse_output_trns (lexer, ds, PORFILE_WRITER); } struct output_trns { struct casewriter *writer; /* Writer. */ }; static trns_proc_func output_trns_proc; static trns_free_func output_trns_free; static struct casewriter *parse_write_command (struct lexer *, struct dataset *, enum writer_type, enum command_type, bool *retain_unselected); /* Parses and performs the SAVE or EXPORT procedure. */ static int parse_output_proc (struct lexer *lexer, struct dataset *ds, enum writer_type writer_type) { bool retain_unselected; struct casewriter *output; bool ok; output = parse_write_command (lexer, ds, writer_type, PROC_CMD, &retain_unselected); if (output == NULL) return CMD_CASCADING_FAILURE; casereader_transfer (proc_open_filtering (ds, !retain_unselected), output); ok = casewriter_destroy (output); ok = proc_commit (ds) && ok; return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; } /* Parses the XSAVE or XEXPORT transformation command. */ static int parse_output_trns (struct lexer *lexer, struct dataset *ds, enum writer_type writer_type) { struct output_trns *t = xmalloc (sizeof *t); t->writer = parse_write_command (lexer, ds, writer_type, XFORM_CMD, NULL); if (t->writer == NULL) { free (t); return CMD_CASCADING_FAILURE; } add_transformation (ds, output_trns_proc, output_trns_free, t); return CMD_SUCCESS; } /* Parses SAVE or XSAVE or EXPORT or XEXPORT command. WRITER_TYPE identifies the type of file to write, and COMMAND_TYPE identifies the type of command. On success, returns a writer. For procedures only, sets *RETAIN_UNSELECTED to true if cases that would otherwise be excluded by FILTER or USE should be included. On failure, returns a null pointer. */ static struct casewriter * parse_write_command (struct lexer *lexer, struct dataset *ds, enum writer_type writer_type, enum command_type command_type, bool *retain_unselected) { /* Common data. */ struct file_handle *handle; /* Output file. */ struct dictionary *dict; /* Dictionary for output file. */ struct casewriter *writer; /* Writer. */ struct case_map_stage *stage; /* Preparation for 'map'. */ struct case_map *map; /* Map from input data to data for writer. */ /* Common options. */ struct sfm_write_options sysfile_opts; struct pfm_write_options porfile_opts; assert (writer_type == SYSFILE_WRITER || writer_type == PORFILE_WRITER); assert (command_type == XFORM_CMD || command_type == PROC_CMD); assert ((retain_unselected != NULL) == (command_type == PROC_CMD)); if (command_type == PROC_CMD) *retain_unselected = true; handle = NULL; dict = dict_clone (dataset_dict (ds)); writer = NULL; stage = NULL; map = NULL; sysfile_opts = sfm_writer_default_options (); porfile_opts = pfm_writer_default_options (); stage = case_map_stage_create (dict); dict_delete_scratch_vars (dict); lex_match (lexer, T_SLASH); for (;;) { if (lex_match_id (lexer, "OUTFILE")) { if (handle != NULL) { lex_sbc_only_once ("OUTFILE"); goto error; } lex_match (lexer, T_EQUALS); handle = fh_parse (lexer, FH_REF_FILE, NULL); if (handle == NULL) goto error; } else if (lex_match_id (lexer, "NAMES")) { /* Not yet implemented. */ } else if (lex_match_id (lexer, "PERMISSIONS")) { bool cw; lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "READONLY")) cw = false; else if (lex_match_id (lexer, "WRITEABLE")) cw = true; else { lex_error_expecting (lexer, "READONLY", "WRITEABLE", NULL_SENTINEL); goto error; } sysfile_opts.create_writeable = porfile_opts.create_writeable = cw; } else if (command_type == PROC_CMD && lex_match_id (lexer, "UNSELECTED")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "RETAIN")) *retain_unselected = true; else if (lex_match_id (lexer, "DELETE")) *retain_unselected = false; else { lex_error_expecting (lexer, "RETAIN", "DELETE", NULL_SENTINEL); goto error; } } else if (writer_type == SYSFILE_WRITER && lex_match_id (lexer, "COMPRESSED")) sysfile_opts.compression = ANY_COMP_SIMPLE; else if (writer_type == SYSFILE_WRITER && lex_match_id (lexer, "UNCOMPRESSED")) sysfile_opts.compression = ANY_COMP_NONE; else if (writer_type == SYSFILE_WRITER && lex_match_id (lexer, "ZCOMPRESSED")) sysfile_opts.compression = ANY_COMP_ZLIB; else if (writer_type == SYSFILE_WRITER && lex_match_id (lexer, "VERSION")) { lex_match (lexer, T_EQUALS); if (!lex_force_int (lexer)) goto error; sysfile_opts.version = lex_integer (lexer); lex_get (lexer); } else if (writer_type == PORFILE_WRITER && lex_match_id (lexer, "TYPE")) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "COMMUNICATIONS")) porfile_opts.type = PFM_COMM; else if (lex_match_id (lexer, "TAPE")) porfile_opts.type = PFM_TAPE; else { lex_error_expecting (lexer, "COMM", "TAPE", NULL_SENTINEL); goto error; } } else if (writer_type == PORFILE_WRITER && lex_match_id (lexer, "DIGITS")) { lex_match (lexer, T_EQUALS); if (!lex_force_int (lexer)) goto error; porfile_opts.digits = lex_integer (lexer); lex_get (lexer); } else if (!parse_dict_trim (lexer, dict)) goto error; if (!lex_match (lexer, T_SLASH)) break; } if (lex_end_of_command (lexer) != CMD_SUCCESS) goto error; if (handle == NULL) { lex_sbc_missing ("OUTFILE"); goto error; } dict_delete_scratch_vars (dict); dict_compact_values (dict); if (fh_get_referent (handle) == FH_REF_FILE) { switch (writer_type) { case SYSFILE_WRITER: writer = sfm_open_writer (handle, dict, sysfile_opts); break; case PORFILE_WRITER: writer = pfm_open_writer (handle, dict, porfile_opts); break; } } else writer = any_writer_open (handle, dict); if (writer == NULL) goto error; map = case_map_stage_get_case_map (stage); case_map_stage_destroy (stage); if (map != NULL) writer = case_map_create_output_translator (map, writer); dict_destroy (dict); fh_unref (handle); return writer; error: case_map_stage_destroy (stage); fh_unref (handle); casewriter_destroy (writer); dict_destroy (dict); case_map_destroy (map); return NULL; } /* Writes case *C to the system file specified on XSAVE or XEXPORT. */ static int output_trns_proc (void *trns_, struct ccase **c, casenumber case_num UNUSED) { struct output_trns *t = trns_; casewriter_write (t->writer, case_ref (*c)); return TRNS_CONTINUE; } /* Frees an XSAVE or XEXPORT transformation. Returns true if successful, false if an I/O error occurred. */ static bool output_trns_free (void *trns_) { struct output_trns *t = trns_; bool ok = casewriter_destroy (t->writer); free (t); return ok; } pspp-1.0.1/src/language/data-io/data-writer.c0000644000175000017500000001632712642117700015704 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-2004, 2006, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/data-io/data-writer.h" #include #include #include #include #include #include "data/file-name.h" #include "data/make-file.h" #include "language/data-io/file-handle.h" #include "libpspp/assertion.h" #include "libpspp/encoding-guesser.h" #include "libpspp/integer-format.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) (msgid) /* Data file writer. */ struct dfm_writer { struct file_handle *fh; /* File handle. */ struct fh_lock *lock; /* Exclusive access to file. */ FILE *file; /* Associated file. */ struct replace_file *rf; /* Atomic file replacement support. */ char *encoding; /* Encoding. */ enum fh_line_ends line_ends; /* Line ends for text files. */ int unit; /* Unit width, in bytes. */ char cr[MAX_UNIT]; /* \r in encoding, 'unit' bytes long. */ char lf[MAX_UNIT]; /* \n in encoding, 'unit' bytes long. */ char spaces[32]; /* 32 bytes worth of ' ' in encoding. */ }; /* Opens a file handle for writing as a data file. The encoding of the file written is by default that of FH itself. If ENCODING is nonnull, then it overrides the default encoding. *However*: ENCODING directly affects only text strings written by the data writer code itself, that is, new-lines in FH_MODE_TEXT and space padding in FH_MODE_FIXED mode. The client must do its own encoding translation for the data that it writes. (This is unavoidable because sometimes the data written includes binary data that reencoding would mangle.) The client can obtain the encoding to re-encode into with dfm_writer_get_encoding(). */ struct dfm_writer * dfm_open_writer (struct file_handle *fh, const char *encoding) { struct encoding_info ei; struct dfm_writer *w; struct fh_lock *lock; int ofs; lock = fh_lock (fh, FH_REF_FILE, N_("data file"), FH_ACC_WRITE, false); if (lock == NULL) return NULL; w = fh_lock_get_aux (lock); if (w != NULL) return w; encoding = encoding_guess_parse_encoding (encoding != NULL ? encoding : fh_get_encoding (fh)); get_encoding_info (&ei, encoding); w = xmalloc (sizeof *w); w->fh = fh_ref (fh); w->lock = lock; w->rf = replace_file_start (w->fh, "wb", 0666, &w->file); w->encoding = xstrdup (encoding); w->line_ends = fh_get_line_ends (fh); w->unit = ei.unit; memcpy (w->cr, ei.cr, sizeof w->cr); memcpy (w->lf, ei.lf, sizeof w->lf); for (ofs = 0; ofs + ei.unit <= sizeof w->spaces; ofs += ei.unit) memcpy (&w->spaces[ofs], ei.space, ei.unit); if (w->rf == NULL) { msg (ME, _("An error occurred while opening `%s' for writing " "as a data file: %s."), fh_get_file_name (w->fh), strerror (errno)); dfm_close_writer (w); return NULL; } fh_lock_set_aux (lock, w); return w; } /* Returns true if an I/O error occurred on WRITER, false otherwise. */ bool dfm_write_error (const struct dfm_writer *writer) { return ferror (writer->file); } /* Writes record REC (which need not be null-terminated) having length LEN to the file corresponding to HANDLE. Adds any needed formatting, such as a trailing new-line. Returns true on success, false on failure. */ bool dfm_put_record (struct dfm_writer *w, const char *rec, size_t len) { assert (w != NULL); if (dfm_write_error (w)) return false; switch (fh_get_mode (w->fh)) { case FH_MODE_TEXT: fwrite (rec, len, 1, w->file); if (w->line_ends == FH_END_CRLF) fwrite (w->cr, w->unit, 1, w->file); fwrite (w->lf, w->unit, 1, w->file); break; case FH_MODE_FIXED: { size_t record_width = fh_get_record_width (w->fh); size_t write_bytes = MIN (len, record_width); size_t pad_bytes = record_width - write_bytes; fwrite (rec, write_bytes, 1, w->file); while (pad_bytes > 0) { size_t chunk = MIN (pad_bytes, sizeof w->spaces); fwrite (w->spaces, chunk, 1, w->file); pad_bytes -= chunk; } } break; case FH_MODE_VARIABLE: { uint32_t size = len; integer_convert (INTEGER_NATIVE, &size, INTEGER_LSB_FIRST, &size, sizeof size); fwrite (&size, sizeof size, 1, w->file); fwrite (rec, len, 1, w->file); fwrite (&size, sizeof size, 1, w->file); } break; case FH_MODE_360_VARIABLE: case FH_MODE_360_SPANNED: { size_t ofs = 0; if (fh_get_mode (w->fh) == FH_MODE_360_VARIABLE) len = MIN (65527, len); while (ofs < len) { size_t chunk = MIN (65527, len - ofs); uint32_t bdw = (chunk + 8) << 16; int scc = (ofs == 0 && chunk == len ? 0 : ofs == 0 ? 1 : ofs + chunk == len ? 2 : 3); uint32_t rdw = ((chunk + 4) << 16) | (scc << 8); integer_convert (INTEGER_NATIVE, &bdw, INTEGER_MSB_FIRST, &bdw, sizeof bdw); integer_convert (INTEGER_NATIVE, &rdw, INTEGER_MSB_FIRST, &rdw, sizeof rdw); fwrite (&bdw, 1, sizeof bdw, w->file); fwrite (&rdw, 1, sizeof rdw, w->file); fwrite (rec + ofs, 1, chunk, w->file); ofs += chunk; } } break; default: NOT_REACHED (); } return !dfm_write_error (w); } /* Closes data file writer W. */ bool dfm_close_writer (struct dfm_writer *w) { bool ok; if (w == NULL) return true; if (fh_unlock (w->lock)) return true; ok = true; if (w->file != NULL) { const char *file_name = fh_get_file_name (w->fh); ok = !dfm_write_error (w) && !fn_close (w->fh, w->file); if (!ok) msg (ME, _("I/O error occurred writing data file `%s'."), file_name); if (ok ? !replace_file_commit (w->rf) : !replace_file_abort (w->rf)) ok = false; } fh_unref (w->fh); free (w->encoding); free (w); return ok; } /* Returns the encoding of data written to WRITER. */ const char * dfm_writer_get_encoding (const struct dfm_writer *writer) { return writer->encoding; } pspp-1.0.1/src/language/data-io/matrix-reader.c0000644000175000017500000001726113137223525016226 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "matrix-reader.h" #include #include #include #include #include #include #include #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid /* This module interprets a "data matrix", typically generated by the command MATRIX DATA. The dictionary of such a matrix takes the form: s_0, s_1, ... s_m, ROWTYPE_, VARNAME_, v_0, v_1, .... v_n where s_0, s_1 ... s_m are the variables defining the splits, and v_0, v_1 ... v_n are the continuous variables. m >= 0; n >= 0 The ROWTYPE_ variable is of type A8. The VARNAME_ variable is a string type whose width is not predetermined. The variables s_x are of type F4.0 (although this reader accepts any type), and v_x are of any numeric type. The values of the ROWTYPE_ variable are in the set {MEAN, STDDEV, N, CORR, COV} and determine the purpose of that case. The values of the VARNAME_ variable must correspond to the names of the varibles in {v_0, v_1 ... v_n} and indicate the rows of the correlation or covariance matrices. A typical example is as follows: s_0 ROWTYPE_ VARNAME_ v_0 v_1 v_2 0 MEAN 5.0000 4.0000 3.0000 0 STDDEV 1.0000 2.0000 3.0000 0 N 9.0000 9.0000 9.0000 0 CORR V1 1.0000 .6000 .7000 0 CORR V2 .6000 1.0000 .8000 0 CORR V3 .7000 .8000 1.0000 1 MEAN 9.0000 8.0000 7.0000 1 STDDEV 5.0000 6.0000 7.0000 1 N 9.0000 9.0000 9.0000 1 CORR V1 1.0000 .4000 .3000 1 CORR V2 .4000 1.0000 .2000 1 CORR V3 .3000 .2000 1.0000 */ struct matrix_reader { const struct variable *varname; const struct variable *rowtype; struct casegrouper *grouper; gsl_matrix *n_vectors; gsl_matrix *mean_vectors; gsl_matrix *var_vectors; }; struct matrix_reader * create_matrix_reader_from_case_reader (const struct dictionary *dict, struct casereader *in_reader, const struct variable ***vars, size_t *n_vars) { struct matrix_reader *mr = xzalloc (sizeof *mr); mr->varname = dict_lookup_var (dict, "varname_"); if (mr->varname == NULL) { msg (ME, _("Matrix dataset lacks a variable called %s."), "VARNAME_"); free (mr); return NULL; } if (!var_is_alpha (mr->varname)) { msg (ME, _("Matrix dataset variable %s should be of string type."), "VARNAME_"); free (mr); return NULL; } mr->rowtype = dict_lookup_var (dict, "rowtype_"); if (mr->rowtype == NULL) { msg (ME, _("Matrix dataset lacks a variable called %s."), "ROWTYPE_"); free (mr); return NULL; } if (!var_is_alpha (mr->rowtype)) { msg (ME, _("Matrix dataset variable %s should be of string type."), "ROWTYPE_"); free (mr); return NULL; } size_t dvarcnt; const struct variable **dvars = NULL; dict_get_vars (dict, &dvars, &dvarcnt, DC_SCRATCH); if (n_vars) *n_vars = dvarcnt - var_get_dict_index (mr->varname) - 1; if (vars) { int i; *vars = xcalloc (sizeof (struct variable **), *n_vars); for (i = 0; i < *n_vars; ++i) { (*vars)[i] = dvars[i + var_get_dict_index (mr->varname) + 1]; } } /* All the variables before ROWTYPE_ (if any) are split variables */ mr->grouper = casegrouper_create_vars (in_reader, dvars, var_get_dict_index (mr->rowtype)); free (dvars); return mr; } bool destroy_matrix_reader (struct matrix_reader *mr) { if (mr == NULL) return false; bool ret = casegrouper_destroy (mr->grouper); free (mr); return ret; } /* Allocates MATRIX if necessary, and populates row MROW, from the data in C corresponding to variables in VARS. N_VARS is the length of VARS. */ static void matrix_fill_row (gsl_matrix **matrix, const struct ccase *c, int mrow, const struct variable **vars, size_t n_vars) { int col; if (*matrix == NULL) *matrix = gsl_matrix_alloc (n_vars, n_vars); for (col = 0; col < n_vars; ++col) { const struct variable *cv = vars [col]; double x = case_data (c, cv)->f; assert (col < (*matrix)->size2); assert (mrow < (*matrix)->size1); gsl_matrix_set (*matrix, mrow, col, x); } } bool next_matrix_from_reader (struct matrix_material *mm, struct matrix_reader *mr, const struct variable **vars, int n_vars) { struct casereader *group; assert (vars); gsl_matrix_free (mr->n_vectors); gsl_matrix_free (mr->mean_vectors); gsl_matrix_free (mr->var_vectors); if (!casegrouper_get_next_group (mr->grouper, &group)) return false; mr->n_vectors = gsl_matrix_alloc (n_vars, n_vars); mr->mean_vectors = gsl_matrix_alloc (n_vars, n_vars); mr->var_vectors = gsl_matrix_alloc (n_vars, n_vars); mm->n = mr->n_vectors; mm->mean_matrix = mr->mean_vectors; mm->var_matrix = mr->var_vectors; // FIXME: Make this into a hash table. unsigned long *table = xmalloc (sizeof (*table) * n_vars); int i; for (i = 0; i < n_vars; ++i) { const int w = var_get_width (mr->varname); char s[w]; memset (s, 0, w); const char *name = var_get_name (vars[i]); strncpy (s, name, w); unsigned long h = hash_bytes (s, w, 0); table[i] = h; } struct ccase *c; for ( ; (c = casereader_read (group) ); case_unref (c)) { const union value *uv = case_data (c, mr->rowtype); int col, row; for (col = 0; col < n_vars; ++col) { const struct variable *cv = vars[col]; double x = case_data (c, cv)->f; if (0 == strncasecmp ((char *)value_str (uv, 8), "N ", 8)) for (row = 0; row < n_vars; ++row) gsl_matrix_set (mr->n_vectors, row, col, x); else if (0 == strncasecmp ((char *) value_str (uv, 8), "MEAN ", 8)) for (row = 0; row < n_vars; ++row) gsl_matrix_set (mr->mean_vectors, row, col, x); else if (0 == strncasecmp ((char *) value_str (uv, 8), "STDDEV ", 8)) for (row = 0; row < n_vars; ++row) gsl_matrix_set (mr->var_vectors, row, col, x * x); } const union value *uvv = case_data (c, mr->varname); const uint8_t *vs = value_str (uvv, var_get_width (mr->varname)); int w = var_get_width (mr->varname); unsigned long h = hash_bytes (vs, w, 0); int mrow = -1; for (i = 0; i < n_vars; ++i) { if (table[i] == h) { mrow = i; break; } } if (mrow == -1) continue; if (0 == strncasecmp ((char *) value_str (uv, 8), "CORR ", 8)) { matrix_fill_row (&mm->corr, c, mrow, vars, n_vars); } else if (0 == strncasecmp ((char *) value_str (uv, 8), "COV ", 8)) { matrix_fill_row (&mm->cov, c, mrow, vars, n_vars); } } casereader_destroy (group); free (table); return true; } pspp-1.0.1/src/language/data-io/data-parser.c0000644000175000017500000006375113137223525015672 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2011, 2012, 2013, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/data-io/data-parser.h" #include #include #include "data/casereader-provider.h" #include "data/data-in.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/file-handle-def.h" #include "data/settings.h" #include "language/data-io/data-reader.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "output/tab.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Data parser for textual data like that read by DATA LIST. */ struct data_parser { const struct dictionary *dict; /*Dictionary of destination */ enum data_parser_type type; /* Type of data to parse. */ int skip_records; /* Records to skip before first real data. */ struct field *fields; /* Fields to parse. */ size_t field_cnt; /* Number of fields. */ size_t field_allocated; /* Number of fields spaced allocated for. */ /* DP_DELIMITED parsers only. */ bool span; /* May cases span multiple records? */ bool empty_line_has_field; /* Does an empty line have an (empty) field? */ bool warn_missing_fields; /* Should missing fields be considered errors? */ struct substring quotes; /* Characters that can quote separators. */ bool quote_escape; /* Doubled quote acts as escape? */ struct substring soft_seps; /* Two soft separators act like just one. */ struct substring hard_seps; /* Two hard separators yield empty fields. */ struct string any_sep; /* Concatenation of soft_seps and hard_seps. */ /* DP_FIXED parsers only. */ int records_per_case; /* Number of records in each case. */ }; /* How to parse one variable. */ struct field { struct fmt_spec format; /* Input format of this field. */ int case_idx; /* First value in case. */ char *name; /* Var name for error messages and tables. */ /* DP_FIXED only. */ int record; /* Record number (1-based). */ int first_column; /* First column in record (1-based). */ }; static void set_any_sep (struct data_parser *parser); /* Creates and returns a new data parser. */ struct data_parser * data_parser_create (const struct dictionary *dict) { struct data_parser *parser = xmalloc (sizeof *parser); parser->type = DP_FIXED; parser->skip_records = 0; parser->fields = NULL; parser->field_cnt = 0; parser->field_allocated = 0; parser->dict = dict; parser->span = true; parser->empty_line_has_field = false; parser->warn_missing_fields = true; ss_alloc_substring (&parser->quotes, ss_cstr ("\"'")); parser->quote_escape = false; ss_alloc_substring (&parser->soft_seps, ss_cstr (CC_SPACES)); ss_alloc_substring (&parser->hard_seps, ss_cstr (",")); ds_init_empty (&parser->any_sep); set_any_sep (parser); parser->records_per_case = 0; return parser; } /* Destroys PARSER. */ void data_parser_destroy (struct data_parser *parser) { if (parser != NULL) { size_t i; for (i = 0; i < parser->field_cnt; i++) free (parser->fields[i].name); free (parser->fields); ss_dealloc (&parser->quotes); ss_dealloc (&parser->soft_seps); ss_dealloc (&parser->hard_seps); ds_destroy (&parser->any_sep); free (parser); } } /* Returns the type of PARSER (either DP_DELIMITED or DP_FIXED). */ enum data_parser_type data_parser_get_type (const struct data_parser *parser) { return parser->type; } /* Sets the type of PARSER to TYPE (either DP_DELIMITED or DP_FIXED). */ void data_parser_set_type (struct data_parser *parser, enum data_parser_type type) { assert (parser->field_cnt == 0); assert (type == DP_FIXED || type == DP_DELIMITED); parser->type = type; } /* Configures PARSER to skip the specified number of INITIAL_RECORDS_TO_SKIP before parsing any data. By default, no records are skipped. */ void data_parser_set_skip (struct data_parser *parser, int initial_records_to_skip) { assert (initial_records_to_skip >= 0); parser->skip_records = initial_records_to_skip; } /* Returns true if PARSER is configured to allow cases to span multiple records. */ bool data_parser_get_span (const struct data_parser *parser) { return parser->span; } /* If MAY_CASES_SPAN_RECORDS is true, configures PARSER to allow a single case to span multiple records and multiple cases to occupy a single record. If MAY_CASES_SPAN_RECORDS is false, configures PARSER to require each record to contain exactly one case. This setting affects parsing of DP_DELIMITED files only. */ void data_parser_set_span (struct data_parser *parser, bool may_cases_span_records) { parser->span = may_cases_span_records; } /* If EMPTY_LINE_HAS_FIELD is true, configures PARSER to parse an empty line as an empty field and to treat a hard delimiter followed by end-of-line as an empty field. If EMPTY_LINE_HAS_FIELD is false, PARSER will skip empty lines and hard delimiters at the end of lines without emitting empty fields. This setting affects parsing of DP_DELIMITED files only. */ void data_parser_set_empty_line_has_field (struct data_parser *parser, bool empty_line_has_field) { parser->empty_line_has_field = empty_line_has_field; } /* If WARN_MISSING_FIELDS is true, configures PARSER to emit a warning and cause an error condition when a missing field is encountered. If WARN_MISSING_FIELDS is false, PARSER will silently fill such fields with the system missing value. This setting affects parsing of DP_DELIMITED files only. */ void data_parser_set_warn_missing_fields (struct data_parser *parser, bool warn_missing_fields) { parser->warn_missing_fields = warn_missing_fields; } /* Sets the characters that may be used for quoting field contents to QUOTES. If QUOTES is empty, quoting will be disabled. The caller retains ownership of QUOTES. This setting affects parsing of DP_DELIMITED files only. */ void data_parser_set_quotes (struct data_parser *parser, struct substring quotes) { ss_dealloc (&parser->quotes); ss_alloc_substring (&parser->quotes, quotes); } /* If ESCAPE is false (the default setting), a character used for quoting cannot itself be embedded within a quoted field. If ESCAPE is true, then a quote character can be embedded within a quoted field by doubling it. This setting affects parsing of DP_DELIMITED files only, and only when at least one quote character has been set (with data_parser_set_quotes). */ void data_parser_set_quote_escape (struct data_parser *parser, bool escape) { parser->quote_escape = escape; } /* Sets PARSER's soft delimiters to DELIMITERS. Soft delimiters separate fields, but consecutive soft delimiters do not yield empty fields. (Ordinarily, only white space characters are appropriate soft delimiters.) The caller retains ownership of DELIMITERS. This setting affects parsing of DP_DELIMITED files only. */ void data_parser_set_soft_delimiters (struct data_parser *parser, struct substring delimiters) { ss_dealloc (&parser->soft_seps); ss_alloc_substring (&parser->soft_seps, delimiters); set_any_sep (parser); } /* Sets PARSER's hard delimiters to DELIMITERS. Hard delimiters separate fields. A consecutive pair of hard delimiters yield an empty field. The caller retains ownership of DELIMITERS. This setting affects parsing of DP_DELIMITED files only. */ void data_parser_set_hard_delimiters (struct data_parser *parser, struct substring delimiters) { ss_dealloc (&parser->hard_seps); ss_alloc_substring (&parser->hard_seps, delimiters); set_any_sep (parser); } /* Returns the number of records per case. */ int data_parser_get_records (const struct data_parser *parser) { return parser->records_per_case; } /* Sets the number of records per case to RECORDS_PER_CASE. This setting affects parsing of DP_FIXED files only. */ void data_parser_set_records (struct data_parser *parser, int records_per_case) { assert (records_per_case >= 0); assert (records_per_case >= parser->records_per_case); parser->records_per_case = records_per_case; } static void add_field (struct data_parser *p, const struct fmt_spec *format, int case_idx, const char *name, int record, int first_column) { struct field *field; if (p->field_cnt == p->field_allocated) p->fields = x2nrealloc (p->fields, &p->field_allocated, sizeof *p->fields); field = &p->fields[p->field_cnt++]; field->format = *format; field->case_idx = case_idx; field->name = xstrdup (name); field->record = record; field->first_column = first_column; } /* Adds a delimited field to the field parsed by PARSER, which must be configured as a DP_DELIMITED parser. The field is parsed as input format FORMAT. Its data will be stored into case index CASE_INDEX. Errors in input data will be reported against variable NAME. */ void data_parser_add_delimited_field (struct data_parser *parser, const struct fmt_spec *format, int case_idx, const char *name) { assert (parser->type == DP_DELIMITED); add_field (parser, format, case_idx, name, 0, 0); } /* Adds a fixed field to the field parsed by PARSER, which must be configured as a DP_FIXED parser. The field is parsed as input format FORMAT. Its data will be stored into case index CASE_INDEX. Errors in input data will be reported against variable NAME. The field will be drawn from the FORMAT->w columns in 1-based RECORD starting at 1-based column FIRST_COLUMN. RECORD must be at least as great as that of any field already added; that is, fields must be added in increasing order of record number. If RECORD is greater than the current number of records per case, the number of records per case are increased as needed. */ void data_parser_add_fixed_field (struct data_parser *parser, const struct fmt_spec *format, int case_idx, const char *name, int record, int first_column) { assert (parser->type == DP_FIXED); assert (parser->field_cnt == 0 || record >= parser->fields[parser->field_cnt - 1].record); if (record > parser->records_per_case) parser->records_per_case = record; add_field (parser, format, case_idx, name, record, first_column); } /* Returns true if any fields have been added to PARSER, false otherwise. */ bool data_parser_any_fields (const struct data_parser *parser) { return parser->field_cnt > 0; } static void set_any_sep (struct data_parser *parser) { ds_assign_substring (&parser->any_sep, parser->soft_seps); ds_put_substring (&parser->any_sep, parser->hard_seps); } static bool parse_delimited_span (const struct data_parser *, struct dfm_reader *, struct ccase *); static bool parse_delimited_no_span (const struct data_parser *, struct dfm_reader *, struct ccase *); static bool parse_fixed (const struct data_parser *, struct dfm_reader *, struct ccase *); /* Reads a case from DFM into C, parsing it with PARSER. Returns true if successful, false at end of file or on I/O error. Case C must not be shared. */ bool data_parser_parse (struct data_parser *parser, struct dfm_reader *reader, struct ccase *c) { bool retval; assert (!case_is_shared (c)); assert (data_parser_any_fields (parser)); /* Skip the requested number of records before reading the first case. */ for (; parser->skip_records > 0; parser->skip_records--) { if (dfm_eof (reader)) return false; dfm_forward_record (reader); } /* Limit cases. */ if (parser->type == DP_DELIMITED) { if (parser->span) retval = parse_delimited_span (parser, reader, c); else retval = parse_delimited_no_span (parser, reader, c); } else retval = parse_fixed (parser, reader, c); return retval; } /* Extracts a delimited field from the current position in the current record according to PARSER, reading data from READER. *FIELD is set to the field content. The caller must not or destroy this constant string. Sets *FIRST_COLUMN to the 1-based column number of the start of the extracted field, and *LAST_COLUMN to the end of the extracted field. Returns true on success, false on failure. */ static bool cut_field (const struct data_parser *parser, struct dfm_reader *reader, int *first_column, int *last_column, struct string *tmp, struct substring *field) { size_t length_before_separators; struct substring line, p; bool quoted; if (dfm_eof (reader)) return false; if (ss_is_empty (parser->hard_seps)) dfm_expand_tabs (reader); line = p = dfm_get_record (reader); /* Skip leading soft separators. */ ss_ltrim (&p, parser->soft_seps); /* Handle empty or completely consumed lines. */ if (ss_is_empty (p)) { if (!parser->empty_line_has_field || dfm_columns_past_end (reader) > 0) return false; else { *field = p; *first_column = dfm_column_start (reader); *last_column = *first_column + 1; dfm_forward_columns (reader, 1); return true; } } *first_column = dfm_column_start (reader); quoted = ss_find_byte (parser->quotes, ss_first (p)) != SIZE_MAX; if (quoted) { /* Quoted field. */ int quote = ss_get_byte (&p); if (!ss_get_until (&p, quote, field)) msg (DW, _("Quoted string extends beyond end of line.")); if (parser->quote_escape && ss_first (p) == quote) { ds_assign_substring (tmp, *field); while (ss_match_byte (&p, quote)) { struct substring ss; ds_put_byte (tmp, quote); if (!ss_get_until (&p, quote, &ss)) msg (DW, _("Quoted string extends beyond end of line.")); ds_put_substring (tmp, ss); } *field = ds_ss (tmp); } *last_column = *first_column + (ss_length (line) - ss_length (p)); } else { /* Regular field. */ ss_get_bytes (&p, ss_cspan (p, ds_ss (&parser->any_sep)), field); *last_column = *first_column + ss_length (*field); } /* Skip trailing soft separator and a single hard separator if present. */ length_before_separators = ss_length (p); ss_ltrim (&p, parser->soft_seps); if (!ss_is_empty (p) && ss_find_byte (parser->hard_seps, ss_first (p)) != SIZE_MAX) { ss_advance (&p, 1); ss_ltrim (&p, parser->soft_seps); } if (ss_is_empty (p)) dfm_forward_columns (reader, 1); else if (quoted && length_before_separators == ss_length (p)) msg (DW, _("Missing delimiter following quoted string.")); dfm_forward_columns (reader, ss_length (line) - ss_length (p)); return true; } static void parse_error (const struct dfm_reader *reader, const struct field *field, int first_column, int last_column, char *error) { struct msg m; m.category = MSG_C_DATA; m.severity = MSG_S_WARNING; m.file_name = CONST_CAST (char *, dfm_get_file_name (reader)); m.first_line = dfm_get_line_number (reader); m.last_line = m.first_line + 1; m.first_column = first_column; m.last_column = last_column; m.text = xasprintf (_("Data for variable %s is not valid as format %s: %s"), field->name, fmt_name (field->format.type), error); msg_emit (&m); free (error); } /* Reads a case from READER into C, parsing it according to fixed-format syntax rules in PARSER. Returns true if successful, false at end of file or on I/O error. */ static bool parse_fixed (const struct data_parser *parser, struct dfm_reader *reader, struct ccase *c) { const char *input_encoding = dfm_reader_get_encoding (reader); const char *output_encoding = dict_get_encoding (parser->dict); struct field *f; int row; if (dfm_eof (reader)) return false; f = parser->fields; for (row = 1; row <= parser->records_per_case; row++) { struct substring line; if (dfm_eof (reader)) { msg (DW, _("Partial case of %d of %d records discarded."), row - 1, parser->records_per_case); return false; } dfm_expand_tabs (reader); line = dfm_get_record (reader); for (; f < &parser->fields[parser->field_cnt] && f->record == row; f++) { struct substring s = ss_substr (line, f->first_column - 1, f->format.w); union value *value = case_data_rw_idx (c, f->case_idx); char *error = data_in (s, input_encoding, f->format.type, value, fmt_var_width (&f->format), output_encoding); if (error == NULL) data_in_imply_decimals (s, input_encoding, f->format.type, f->format.d, value); else parse_error (reader, f, f->first_column, f->first_column + f->format.w, error); } dfm_forward_record (reader); } return true; } /* Reads a case from READER into C, parsing it according to free-format syntax rules in PARSER. Returns true if successful, false at end of file or on I/O error. */ static bool parse_delimited_span (const struct data_parser *parser, struct dfm_reader *reader, struct ccase *c) { const char *output_encoding = dict_get_encoding (parser->dict); struct string tmp = DS_EMPTY_INITIALIZER; struct field *f; for (f = parser->fields; f < &parser->fields[parser->field_cnt]; f++) { struct substring s; int first_column, last_column; char *error; /* Cut out a field and read in a new record if necessary. */ while (!cut_field (parser, reader, &first_column, &last_column, &tmp, &s)) { if (!dfm_eof (reader)) dfm_forward_record (reader); if (dfm_eof (reader)) { if (f > parser->fields) msg (DW, _("Partial case discarded. The first variable " "missing was %s."), f->name); ds_destroy (&tmp); return false; } } const char *input_encoding = dfm_reader_get_encoding (reader); error = data_in (s, input_encoding, f->format.type, case_data_rw_idx (c, f->case_idx), fmt_var_width (&f->format), output_encoding); if (error != NULL) parse_error (reader, f, first_column, last_column, error); } ds_destroy (&tmp); return true; } /* Reads a case from READER into C, parsing it according to delimited syntax rules with one case per record in PARSER. Returns true if successful, false at end of file or on I/O error. */ static bool parse_delimited_no_span (const struct data_parser *parser, struct dfm_reader *reader, struct ccase *c) { const char *output_encoding = dict_get_encoding (parser->dict); struct string tmp = DS_EMPTY_INITIALIZER; struct substring s; struct field *f, *end; if (dfm_eof (reader)) return false; end = &parser->fields[parser->field_cnt]; for (f = parser->fields; f < end; f++) { int first_column, last_column; char *error; if (!cut_field (parser, reader, &first_column, &last_column, &tmp, &s)) { if (f < end - 1 && settings_get_undefined () && parser->warn_missing_fields) msg (DW, _("Missing value(s) for all variables from %s onward. " "These will be filled with the system-missing value " "or blanks, as appropriate."), f->name); for (; f < end; f++) value_set_missing (case_data_rw_idx (c, f->case_idx), fmt_var_width (&f->format)); goto exit; } const char *input_encoding = dfm_reader_get_encoding (reader); error = data_in (s, input_encoding, f->format.type, case_data_rw_idx (c, f->case_idx), fmt_var_width (&f->format), output_encoding); if (error != NULL) parse_error (reader, f, first_column, last_column, error); } s = dfm_get_record (reader); ss_ltrim (&s, parser->soft_seps); if (!ss_is_empty (s)) msg (DW, _("Record ends in data not part of any field.")); exit: dfm_forward_record (reader); ds_destroy (&tmp); return true; } /* Displays a table giving information on fixed-format variable parsing on DATA LIST. */ static void dump_fixed_table (const struct data_parser *parser, const struct file_handle *fh) { struct tab_table *t; size_t i; t = tab_create (4, parser->field_cnt + 1); tab_headers (t, 0, 0, 1, 0); tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Variable")); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Record")); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Columns")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Format")); tab_box (t, TAL_1, TAL_1, TAL_0, TAL_1, 0, 0, 3, parser->field_cnt); tab_hline (t, TAL_2, 0, 3, 1); for (i = 0; i < parser->field_cnt; i++) { struct field *f = &parser->fields[i]; char fmt_string[FMT_STRING_LEN_MAX + 1]; int row = i + 1; tab_text (t, 0, row, TAB_LEFT, f->name); tab_text_format (t, 1, row, 0, "%d", f->record); tab_text_format (t, 2, row, 0, "%3d-%3d", f->first_column, f->first_column + f->format.w - 1); tab_text (t, 3, row, TAB_LEFT | TAB_FIX, fmt_to_string (&f->format, fmt_string)); } tab_title (t, ngettext ("Reading %d record from %s.", "Reading %d records from %s.", parser->records_per_case), parser->records_per_case, fh_get_name (fh)); tab_submit (t); } /* Displays a table giving information on free-format variable parsing on DATA LIST. */ static void dump_delimited_table (const struct data_parser *parser, const struct file_handle *fh) { struct tab_table *t; size_t i; t = tab_create (2, parser->field_cnt + 1); tab_headers (t, 0, 0, 1, 0); tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Variable")); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Format")); tab_box (t, TAL_1, TAL_1, TAL_0, TAL_1, 0, 0, 1, parser->field_cnt); tab_hline (t, TAL_2, 0, 1, 1); for (i = 0; i < parser->field_cnt; i++) { struct field *f = &parser->fields[i]; char str[FMT_STRING_LEN_MAX + 1]; int row = i + 1; tab_text (t, 0, row, TAB_LEFT, f->name); tab_text (t, 1, row, TAB_LEFT | TAB_FIX, fmt_to_string (&f->format, str)); } tab_title (t, _("Reading free-form data from %s."), fh_get_name (fh)); tab_submit (t); } /* Displays a table giving information on how PARSER will read data from FH. */ void data_parser_output_description (struct data_parser *parser, const struct file_handle *fh) { if (parser->type == DP_FIXED) dump_fixed_table (parser, fh); else dump_delimited_table (parser, fh); } /* Data parser input program. */ struct data_parser_casereader { struct data_parser *parser; /* Parser. */ struct dfm_reader *reader; /* Data file reader. */ struct caseproto *proto; /* Format of cases. */ }; static const struct casereader_class data_parser_casereader_class; /* Replaces DS's active dataset by an input program that reads data from READER according to the rules in PARSER, using DICT as the underlying dictionary. Ownership of PARSER and READER is transferred to the input program, and ownership of DICT is transferred to the dataset. */ void data_parser_make_active_file (struct data_parser *parser, struct dataset *ds, struct dfm_reader *reader, struct dictionary *dict, struct casereader* (*func)(struct casereader *, const struct dictionary *, void *), void *ud) { struct data_parser_casereader *r; struct casereader *casereader0; struct casereader *casereader1; r = xmalloc (sizeof *r); r->parser = parser; r->reader = reader; r->proto = caseproto_ref (dict_get_proto (dict)); casereader0 = casereader_create_sequential (NULL, r->proto, CASENUMBER_MAX, &data_parser_casereader_class, r); if (func) casereader1 = func (casereader0, dict, ud); else casereader1 = casereader0; dataset_set_dict (ds, dict); dataset_set_source (ds, casereader1); } static struct ccase * data_parser_casereader_read (struct casereader *reader UNUSED, void *r_) { struct data_parser_casereader *r = r_; struct ccase *c = case_create (r->proto); if (data_parser_parse (r->parser, r->reader, c)) return c; else { case_unref (c); return NULL; } } static void data_parser_casereader_destroy (struct casereader *reader UNUSED, void *r_) { struct data_parser_casereader *r = r_; if (dfm_reader_error (r->reader)) casereader_force_error (reader); data_parser_destroy (r->parser); dfm_close_reader (r->reader); caseproto_unref (r->proto); free (r); } static const struct casereader_class data_parser_casereader_class = { data_parser_casereader_read, data_parser_casereader_destroy, NULL, NULL, }; pspp-1.0.1/src/language/data-io/file-handle.c0000644000175000017500000002375113137223525015633 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-2000, 2006, 2010-2013, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/file-handle-def.h" #include #include #include #include "data/file-name.h" #include "data/session.h" #include "data/variable.h" #include "language/command.h" #include "language/data-io/file-handle.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) int cmd_file_handle (struct lexer *lexer, struct dataset *ds UNUSED) { enum cmd_result result = CMD_CASCADING_FAILURE; char *handle_name = NULL; char *file_name = NULL; int lrecl = 0; int tabwidth = -1; enum { MODE_DEFAULT, MODE_CHARACTER, MODE_BINARY, MODE_IMAGE, MODE_360 } mode = MODE_DEFAULT; int ends = -1; enum { RECFORM_FIXED = 1, RECFORM_VARIABLE, RECFORM_SPANNED } recform = 0; char *encoding = NULL; if (!lex_force_id (lexer)) goto exit; handle_name = xstrdup (lex_tokcstr (lexer)); if (fh_from_id (handle_name)) { msg (SE, _("File handle %s is already defined. " "Use %s before redefining a file handle."), handle_name, "CLOSE FILE HANDLE"); goto exit; } lex_get (lexer); if (!lex_force_match (lexer, T_SLASH)) goto exit; while (lex_token (lexer) != T_ENDCMD) { if (lex_match_id (lexer, "NAME")) { if (file_name) { lex_sbc_only_once ("NAME"); goto exit; } lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto exit; free (file_name); file_name = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "LRECL")) { if (lrecl) { lex_sbc_only_once ("LRECL"); goto exit; } lex_match (lexer, T_EQUALS); if (!lex_force_int (lexer)) goto exit; lrecl = lex_integer (lexer); lex_get (lexer); } else if (lex_match_id (lexer, "TABWIDTH")) { if (tabwidth >= 0) { lex_sbc_only_once ("TABWIDTH"); goto exit; } lex_match (lexer, T_EQUALS); if (!lex_force_int (lexer)) goto exit; tabwidth = lex_integer (lexer); lex_get (lexer); } else if (lex_match_id (lexer, "MODE")) { if (mode != MODE_DEFAULT) { lex_sbc_only_once ("MODE"); goto exit; } lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "CHARACTER")) mode = MODE_CHARACTER; else if (lex_match_id (lexer, "BINARY")) mode = MODE_BINARY; else if (lex_match_id (lexer, "IMAGE")) mode = MODE_IMAGE; else if (lex_match_int (lexer, 360)) mode = MODE_360; else { lex_error (lexer, NULL); goto exit; } } else if (lex_match_id (lexer, "ENDS")) { if (ends >= 0) { lex_sbc_only_once ("ENDS"); goto exit; } lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "LF")) ends = FH_END_LF; else if (lex_match_id (lexer, "CRLF")) ends = FH_END_CRLF; else { lex_error (lexer, NULL); goto exit; } } else if (lex_match_id (lexer, "RECFORM")) { if (recform) { lex_sbc_only_once ("RECFORM"); goto exit; } lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "FIXED") || lex_match_id (lexer, "F")) recform = RECFORM_FIXED; else if (lex_match_id (lexer, "VARIABLE") || lex_match_id (lexer, "V")) recform = RECFORM_VARIABLE; else if (lex_match_id (lexer, "SPANNED") || lex_match_id (lexer, "VS")) recform = RECFORM_SPANNED; else { lex_error (lexer, NULL); goto exit; } } else if (lex_match_id (lexer, "ENCODING")) { if (encoding) { lex_sbc_only_once ("ENCODING"); goto exit; } lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto exit; free (encoding); encoding = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } if (!lex_match (lexer, T_SLASH)) break; } if (lex_end_of_command (lexer) != CMD_SUCCESS) goto exit; struct fh_properties properties = *fh_default_properties (); if (file_name == NULL) { lex_sbc_missing ("NAME"); goto exit; } switch (mode) { case MODE_DEFAULT: case MODE_CHARACTER: properties.mode = FH_MODE_TEXT; if (tabwidth >= 0) properties.tab_width = tabwidth; if (ends) properties.line_ends = ends; break; case MODE_IMAGE: properties.mode = FH_MODE_FIXED; break; case MODE_BINARY: properties.mode = FH_MODE_VARIABLE; break; case MODE_360: properties.encoding = CONST_CAST (char *, "EBCDIC-US"); if (recform == RECFORM_FIXED) properties.mode = FH_MODE_FIXED; else if (recform == RECFORM_VARIABLE) { properties.mode = FH_MODE_360_VARIABLE; properties.record_width = 8192; } else if (recform == RECFORM_SPANNED) { properties.mode = FH_MODE_360_SPANNED; properties.record_width = 8192; } else { msg (SE, _("%s must be specified with %s."), "RECFORM", "MODE=360"); goto exit; } break; default: NOT_REACHED (); } if (properties.mode == FH_MODE_FIXED || lrecl) { if (!lrecl) msg (SE, _("The specified file mode requires LRECL. " "Assuming %zu-character records."), properties.record_width); else if (lrecl < 1 || lrecl >= (1UL << 31)) msg (SE, _("Record length (%d) must be between 1 and %lu bytes. " "Assuming %zu-character records."), lrecl, (1UL << 31) - 1, properties.record_width); else properties.record_width = lrecl; } if (encoding) properties.encoding = encoding; fh_create_file (handle_name, file_name, lex_get_encoding (lexer), &properties); result = CMD_SUCCESS; exit: free (handle_name); free (file_name); free (encoding); return result; } int cmd_close_file_handle (struct lexer *lexer, struct dataset *ds UNUSED) { struct file_handle *handle; if (!lex_force_id (lexer)) return CMD_CASCADING_FAILURE; handle = fh_from_id (lex_tokcstr (lexer)); if (handle == NULL) return CMD_CASCADING_FAILURE; fh_unname (handle); return CMD_SUCCESS; } /* Returns the name for REFERENT. */ static const char * referent_name (enum fh_referent referent) { switch (referent) { case FH_REF_FILE: return _("file"); case FH_REF_INLINE: return _("inline file"); case FH_REF_DATASET: return _("dataset"); default: NOT_REACHED (); } } /* Parses a file handle name: - If SESSION is nonnull, then the parsed syntax may be the name of a dataset within SESSION. Dataset names take precedence over file handle names. - If REFERENT_MASK includes FH_REF_FILE, the parsed syntax may be a file name as a string or a file handle name as an identifier. - If REFERENT_MASK includes FH_REF_INLINE, the parsed syntax may be the identifier INLINE to represent inline data. Returns the file handle when successful, a null pointer on failure. The caller is responsible for fh_unref()'ing the returned file handle when it is no longer needed. */ struct file_handle * fh_parse (struct lexer *lexer, enum fh_referent referent_mask, struct session *session) { struct file_handle *handle; if (session != NULL && lex_token (lexer) == T_ID) { struct dataset *ds; ds = session_lookup_dataset (session, lex_tokcstr (lexer)); if (ds != NULL) { lex_get (lexer); return fh_create_dataset (ds); } } if (lex_match_id (lexer, "INLINE")) handle = fh_inline_file (); else { if (lex_token (lexer) != T_ID && !lex_is_string (lexer)) { lex_error (lexer, _("expecting a file name or handle name")); return NULL; } handle = NULL; if (lex_token (lexer) == T_ID) handle = fh_from_id (lex_tokcstr (lexer)); if (handle == NULL) handle = fh_create_file (NULL, lex_tokcstr (lexer), lex_get_encoding (lexer), fh_default_properties ()); lex_get (lexer); } if (!(fh_get_referent (handle) & referent_mask)) { msg (SE, _("Handle for %s not allowed here."), referent_name (fh_get_referent (handle))); fh_unref (handle); return NULL; } return handle; } /* Local variables: mode: c End: */ pspp-1.0.1/src/language/data-io/data-list.c0000644000175000017500000004026213137223525015341 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include "data/case.h" #include "data/casereader.h" #include "data/data-in.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/settings.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/data-io/data-parser.h" #include "language/data-io/data-reader.h" #include "language/data-io/file-handle.h" #include "language/data-io/inpt-pgm.h" #include "language/data-io/placement-parser.h" #include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/xsize.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* DATA LIST transformation data. */ struct data_list_trns { struct data_parser *parser; /* Parser. */ struct dfm_reader *reader; /* Data file reader. */ struct variable *end; /* Variable specified on END subcommand. */ }; static bool parse_fixed (struct lexer *, struct dictionary *, struct pool *, struct data_parser *); static bool parse_free (struct lexer *, struct dictionary *, struct pool *, struct data_parser *); static trns_free_func data_list_trns_free; static trns_proc_func data_list_trns_proc; int cmd_data_list (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict; struct data_parser *parser; struct dfm_reader *reader; struct variable *end = NULL; struct file_handle *fh = NULL; char *encoding = NULL; int table; enum data_parser_type type; bool has_type; struct pool *tmp_pool; bool ok; dict = (in_input_program () ? dataset_dict (ds) : dict_create (get_default_encoding ())); parser = data_parser_create (dict); reader = NULL; table = -1; /* Print table if nonzero, -1=undecided. */ has_type = false; while (lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "FILE")) { lex_match (lexer, T_EQUALS); fh_unref (fh); fh = fh_parse (lexer, FH_REF_FILE | FH_REF_INLINE, NULL); if (fh == NULL) goto error; } else if (lex_match_id (lexer, "ENCODING")) { lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; free (encoding); encoding = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "RECORDS")) { lex_match (lexer, T_EQUALS); lex_match (lexer, T_LPAREN); if (!lex_force_int (lexer)) goto error; int records = lex_integer (lexer); if (records < 0) { msg (SE, _("The %s value must be nonnegative."), "RECORDS"); goto error; } data_parser_set_records (parser, records); lex_get (lexer); lex_match (lexer, T_RPAREN); } else if (lex_match_id (lexer, "SKIP")) { lex_match (lexer, T_EQUALS); if (!lex_force_int (lexer)) goto error; int skip = lex_integer (lexer); if (skip < 0) { msg (SE, _("The %s value must be nonnegative."), "SKIP"); goto error; } data_parser_set_skip (parser, skip); lex_get (lexer); } else if (lex_match_id (lexer, "END")) { if (!in_input_program ()) { msg (SE, _("The %s subcommand may only be used within %s."), "END", "INPUT PROGRAM"); goto error; } if (end) { msg (SE, _("The %s subcommand may only be specified once."), "END"); goto error; } lex_match (lexer, T_EQUALS); if (!lex_force_id (lexer)) goto error; end = dict_lookup_var (dict, lex_tokcstr (lexer)); if (!end) end = dict_create_var_assert (dict, lex_tokcstr (lexer), 0); lex_get (lexer); } else if (lex_match_id (lexer, "NOTABLE")) table = 0; else if (lex_match_id (lexer, "TABLE")) table = 1; else if (lex_token (lexer) == T_ID) { if (lex_match_id (lexer, "FIXED")) data_parser_set_type (parser, DP_FIXED); else if (lex_match_id (lexer, "FREE")) { data_parser_set_type (parser, DP_DELIMITED); data_parser_set_span (parser, true); } else if (lex_match_id (lexer, "LIST")) { data_parser_set_type (parser, DP_DELIMITED); data_parser_set_span (parser, false); } else { lex_error (lexer, NULL); goto error; } if (has_type) { msg (SE, _("Only one of FIXED, FREE, or LIST may " "be specified.")); goto error; } has_type = true; if (data_parser_get_type (parser) == DP_DELIMITED) { if (lex_match (lexer, T_LPAREN)) { struct string delims = DS_EMPTY_INITIALIZER; while (!lex_match (lexer, T_RPAREN)) { int delim; if (lex_match_id (lexer, "TAB")) delim = '\t'; else if (lex_is_string (lexer) && ss_length (lex_tokss (lexer)) == 1) { delim = ss_first (lex_tokss (lexer)); lex_get (lexer); } else { /* XXX should support multibyte UTF-8 characters */ lex_error (lexer, NULL); ds_destroy (&delims); goto error; } ds_put_byte (&delims, delim); lex_match (lexer, T_COMMA); } data_parser_set_empty_line_has_field (parser, true); data_parser_set_quotes (parser, ss_empty ()); data_parser_set_soft_delimiters (parser, ss_empty ()); data_parser_set_hard_delimiters (parser, ds_ss (&delims)); ds_destroy (&delims); } else { data_parser_set_empty_line_has_field (parser, false); data_parser_set_quotes (parser, ss_cstr ("'\"")); data_parser_set_soft_delimiters (parser, ss_cstr (CC_SPACES)); const char decimal = settings_get_decimal_char (FMT_F); data_parser_set_hard_delimiters (parser, ss_buffer (",", (decimal == '.') ? 1 : 0)); } } } else { lex_error (lexer, NULL); goto error; } } type = data_parser_get_type (parser); if (encoding && NULL == fh) msg (MW, _("Encoding should not be specified for inline data. It will be " "ignored.")); if (fh == NULL) fh = fh_inline_file (); fh_set_default_handle (fh); if (type != DP_FIXED && end != NULL) { msg (SE, _("The %s subcommand may be used only with %s."), "END", "DATA LIST FIXED"); goto error; } tmp_pool = pool_create (); if (type == DP_FIXED) ok = parse_fixed (lexer, dict, tmp_pool, parser); else ok = parse_free (lexer, dict, tmp_pool, parser); pool_destroy (tmp_pool); if (!ok) goto error; if (!data_parser_any_fields (parser)) { msg (SE, _("At least one variable must be specified.")); goto error; } if (lex_end_of_command (lexer) != CMD_SUCCESS) goto error; if (table == -1) table = type == DP_FIXED || !data_parser_get_span (parser); if (table) data_parser_output_description (parser, fh); reader = dfm_open_reader (fh, lexer, encoding); if (reader == NULL) goto error; if (in_input_program ()) { struct data_list_trns *trns = xmalloc (sizeof *trns); trns->parser = parser; trns->reader = reader; trns->end = end; add_transformation (ds, data_list_trns_proc, data_list_trns_free, trns); } else data_parser_make_active_file (parser, ds, reader, dict, NULL, NULL); fh_unref (fh); free (encoding); return CMD_DATA_LIST; error: data_parser_destroy (parser); if (!in_input_program ()) dict_destroy (dict); fh_unref (fh); free (encoding); return CMD_CASCADING_FAILURE; } /* Fixed-format parsing. */ /* Parses all the variable specifications for DATA LIST FIXED, storing them into DLS. Uses TMP_POOL for temporary storage; the caller may destroy it. Returns true only if successful. */ static bool parse_fixed (struct lexer *lexer, struct dictionary *dict, struct pool *tmp_pool, struct data_parser *parser) { int max_records = data_parser_get_records (parser); int record = 0; int column = 1; while (lex_token (lexer) != T_ENDCMD) { char **names; size_t name_cnt, name_idx; struct fmt_spec *formats, *f; size_t format_cnt; /* Parse everything. */ if (!parse_record_placement (lexer, &record, &column) || !parse_DATA_LIST_vars_pool (lexer, dict, tmp_pool, &names, &name_cnt, PV_NONE) || !parse_var_placements (lexer, tmp_pool, name_cnt, FMT_FOR_INPUT, &formats, &format_cnt)) return false; /* Create variables and var specs. */ name_idx = 0; for (f = formats; f < &formats[format_cnt]; f++) if (!execute_placement_format (f, &record, &column)) { char *name; int width; struct variable *v; name = names[name_idx++]; /* Create variable. */ width = fmt_var_width (f); v = dict_create_var (dict, name, width); if (v != NULL) { /* Success. */ struct fmt_spec output = fmt_for_output_from_input (f); var_set_both_formats (v, &output); } else { /* Failure. This can be acceptable if we're in INPUT PROGRAM, but only if the existing variable has the same width as the one we would have created. */ if (!in_input_program ()) { msg (SE, _("%s is a duplicate variable name."), name); return false; } v = dict_lookup_var_assert (dict, name); if ((width != 0) != (var_get_width (v) != 0)) { msg (SE, _("There is already a variable %s of a " "different type."), name); return false; } if (width != 0 && width != var_get_width (v)) { msg (SE, _("There is already a string variable %s of a " "different width."), name); return false; } } if (max_records && record > max_records) { msg (SE, _("Cannot place variable %s on record %d when " "RECORDS=%d is specified."), var_get_name (v), record, data_parser_get_records (parser)); } data_parser_add_fixed_field (parser, f, var_get_case_index (v), var_get_name (v), record, column); column += f->w; } assert (name_idx == name_cnt); } return true; } /* Free-format parsing. */ /* Parses variable specifications for DATA LIST FREE and adds them to DLS. Uses TMP_POOL for temporary storage; the caller may destroy it. Returns true only if successful. */ static bool parse_free (struct lexer *lexer, struct dictionary *dict, struct pool *tmp_pool, struct data_parser *parser) { lex_get (lexer); while (lex_token (lexer) != T_ENDCMD) { struct fmt_spec input, output; char **name; size_t name_cnt; size_t i; if (!parse_DATA_LIST_vars_pool (lexer, dict, tmp_pool, &name, &name_cnt, PV_NONE)) return false; if (lex_match (lexer, T_LPAREN)) { char type[FMT_TYPE_LEN_MAX + 1]; if (!parse_abstract_format_specifier (lexer, type, &input.w, &input.d)) return NULL; if (!fmt_from_name (type, &input.type)) { msg (SE, _("Unknown format type `%s'."), type); return NULL; } /* If no width was included, use the minimum width for the type. This isn't quite right, because DATETIME by itself seems to become DATETIME20 (see bug #30690), whereas this will become DATETIME17. The correct behavior is not documented. */ if (input.w == 0) { input.w = fmt_min_input_width (input.type); input.d = 0; } if (!fmt_check_input (&input) || !lex_force_match (lexer, T_RPAREN)) return NULL; /* As a special case, N format is treated as F format for free-field input. */ if (input.type == FMT_N) input.type = FMT_F; output = fmt_for_output_from_input (&input); } else { lex_match (lexer, T_ASTERISK); input = fmt_for_input (FMT_F, 8, 0); output = *settings_get_format (); } for (i = 0; i < name_cnt; i++) { struct variable *v; v = dict_create_var (dict, name[i], fmt_var_width (&input)); if (v == NULL) { msg (SE, _("%s is a duplicate variable name."), name[i]); return false; } var_set_both_formats (v, &output); data_parser_add_delimited_field (parser, &input, var_get_case_index (v), var_get_name (v)); } } return true; } /* Input procedure. */ /* Destroys DATA LIST transformation TRNS. Returns true if successful, false if an I/O error occurred. */ static bool data_list_trns_free (void *trns_) { struct data_list_trns *trns = trns_; data_parser_destroy (trns->parser); dfm_close_reader (trns->reader); free (trns); return true; } /* Handle DATA LIST transformation TRNS, parsing data into *C. */ static int data_list_trns_proc (void *trns_, struct ccase **c, casenumber case_num UNUSED) { struct data_list_trns *trns = trns_; int retval; *c = case_unshare (*c); if (data_parser_parse (trns->parser, trns->reader, *c)) retval = TRNS_CONTINUE; else if (dfm_reader_error (trns->reader) || dfm_eof (trns->reader) > 1) { /* An I/O error, or encountering end of file for a second time, should be escalated into a more serious error. */ retval = TRNS_ERROR; } else retval = TRNS_END_FILE; /* If there was an END subcommand handle it. */ if (trns->end != NULL) { double *end = &case_data_rw (*c, trns->end)->f; if (retval == TRNS_END_FILE) { *end = 1.0; retval = TRNS_CONTINUE; } else *end = 0.0; } return retval; } pspp-1.0.1/src/language/data-io/combine-files.c0000644000175000017500000007133312523704223016173 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/any-reader.h" #include "data/case-matcher.h" #include "data/case.h" #include "data/casereader.h" #include "data/casewriter.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/subcase.h" #include "data/variable.h" #include "language/command.h" #include "language/data-io/file-handle.h" #include "language/data-io/trim.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "language/stats/sort-criteria.h" #include "libpspp/assertion.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/string-array.h" #include "libpspp/taint.h" #include "math/sort.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) enum comb_command_type { COMB_ADD, COMB_MATCH, COMB_UPDATE }; /* File types. */ enum comb_file_type { COMB_FILE, /* Specified on FILE= subcommand. */ COMB_TABLE /* Specified on TABLE= subcommand. */ }; /* One FILE or TABLE subcommand. */ struct comb_file { /* Basics. */ enum comb_file_type type; /* COMB_FILE or COMB_TABLE. */ /* Variables. */ struct subcase by_vars; /* BY variables in this input file. */ struct subcase src, dst; /* Data to copy to output; where to put it. */ const struct missing_values **mv; /* Each variable's missing values. */ /* Input files. */ struct file_handle *handle; /* Input file handle. */ struct dictionary *dict; /* Input file dictionary. */ struct casereader *reader; /* Input data source. */ struct ccase *data; /* The current input case. */ bool is_minimal; /* Does 'data' have minimum BY values across all input files? */ bool is_sorted; /* Is file presorted on the BY variables? */ /* IN subcommand. */ char *in_name; struct variable *in_var; }; struct comb_proc { struct comb_file *files; /* All the files being merged. */ size_t n_files; /* Number of files. */ struct dictionary *dict; /* Dictionary of output file. */ struct subcase by_vars; /* BY variables in the output. */ struct casewriter *output; /* Destination for output. */ struct case_matcher *matcher; /* FIRST, LAST. Only if "first" or "last" is nonnull are the remaining members used. */ struct variable *first; /* Variable specified on FIRST (if any). */ struct variable *last; /* Variable specified on LAST (if any). */ struct ccase *buffered_case; /* Case ready for output except that we don't know the value for the LAST var yet. */ union value *prev_BY; /* Values of BY vars in buffered_case. */ }; static int combine_files (enum comb_command_type, struct lexer *, struct dataset *); static void free_comb_proc (struct comb_proc *); static void close_all_comb_files (struct comb_proc *); static bool merge_dictionary (struct dictionary *const, struct comb_file *); static void execute_update (struct comb_proc *); static void execute_match_files (struct comb_proc *); static void execute_add_files (struct comb_proc *); static bool create_flag_var (const char *subcommand_name, const char *var_name, struct dictionary *, struct variable **); static void output_case (struct comb_proc *, struct ccase *, union value *by); static void output_buffered_case (struct comb_proc *); int cmd_add_files (struct lexer *lexer, struct dataset *ds) { return combine_files (COMB_ADD, lexer, ds); } int cmd_match_files (struct lexer *lexer, struct dataset *ds) { return combine_files (COMB_MATCH, lexer, ds); } int cmd_update (struct lexer *lexer, struct dataset *ds) { return combine_files (COMB_UPDATE, lexer, ds); } static int combine_files (enum comb_command_type command, struct lexer *lexer, struct dataset *ds) { struct comb_proc proc; bool saw_by = false; bool saw_sort = false; struct casereader *active_file = NULL; char *first_name = NULL; char *last_name = NULL; struct taint *taint = NULL; size_t n_tables = 0; size_t allocated_files = 0; size_t i; proc.files = NULL; proc.n_files = 0; proc.dict = dict_create (get_default_encoding ()); proc.output = NULL; proc.matcher = NULL; subcase_init_empty (&proc.by_vars); proc.first = NULL; proc.last = NULL; proc.buffered_case = NULL; proc.prev_BY = NULL; dict_set_case_limit (proc.dict, dict_get_case_limit (dataset_dict (ds))); lex_match (lexer, T_SLASH); for (;;) { struct comb_file *file; enum comb_file_type type; if (lex_match_id (lexer, "FILE")) type = COMB_FILE; else if (command == COMB_MATCH && lex_match_id (lexer, "TABLE")) { type = COMB_TABLE; n_tables++; } else break; lex_match (lexer, T_EQUALS); if (proc.n_files >= allocated_files) proc.files = x2nrealloc (proc.files, &allocated_files, sizeof *proc.files); file = &proc.files[proc.n_files++]; file->type = type; subcase_init_empty (&file->by_vars); subcase_init_empty (&file->src); subcase_init_empty (&file->dst); file->mv = NULL; file->handle = NULL; file->dict = NULL; file->reader = NULL; file->data = NULL; file->is_sorted = true; file->in_name = NULL; file->in_var = NULL; if (lex_match (lexer, T_ASTERISK)) { if (!dataset_has_source (ds)) { msg (SE, _("Cannot specify the active dataset since none " "has been defined.")); goto error; } if (proc_make_temporary_transformations_permanent (ds)) msg (SE, _("This command may not be used after TEMPORARY when " "the active dataset is an input source. " "Temporary transformations will be made permanent.")); file->dict = dict_clone (dataset_dict (ds)); } else { file->handle = fh_parse (lexer, FH_REF_FILE, dataset_session (ds)); if (file->handle == NULL) goto error; file->reader = any_reader_open_and_decode (file->handle, NULL, &file->dict, NULL); if (file->reader == NULL) goto error; } while (lex_match (lexer, T_SLASH)) if (lex_match_id (lexer, "RENAME")) { if (!parse_dict_rename (lexer, file->dict)) goto error; } else if (lex_match_id (lexer, "IN")) { lex_match (lexer, T_EQUALS); if (lex_token (lexer) != T_ID) { lex_error (lexer, NULL); goto error; } if (file->in_name) { msg (SE, _("Multiple IN subcommands for a single FILE or " "TABLE.")); goto error; } file->in_name = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "SORT")) { file->is_sorted = false; saw_sort = true; } if (!merge_dictionary (proc.dict, file)) goto error; } while (lex_token (lexer) != T_ENDCMD) { if (lex_match (lexer, T_BY)) { const struct variable **by_vars; size_t i; bool ok; if (saw_by) { lex_sbc_only_once ("BY"); goto error; } saw_by = true; lex_match (lexer, T_EQUALS); if (!parse_sort_criteria (lexer, proc.dict, &proc.by_vars, &by_vars, NULL)) goto error; ok = true; for (i = 0; i < proc.n_files; i++) { struct comb_file *file = &proc.files[i]; size_t j; for (j = 0; j < subcase_get_n_fields (&proc.by_vars); j++) { const char *name = var_get_name (by_vars[j]); struct variable *var = dict_lookup_var (file->dict, name); if (var != NULL) subcase_add_var (&file->by_vars, var, subcase_get_direction (&proc.by_vars, j)); else { if (file->handle != NULL) msg (SE, _("File %s lacks BY variable %s."), fh_get_name (file->handle), name); else msg (SE, _("Active dataset lacks BY variable %s."), name); ok = false; } } assert (!ok || subcase_conformable (&file->by_vars, &proc.files[0].by_vars)); } free (by_vars); if (!ok) goto error; } else if (command != COMB_UPDATE && lex_match_id (lexer, "FIRST")) { if (first_name != NULL) { lex_sbc_only_once ("FIRST"); goto error; } lex_match (lexer, T_EQUALS); if (!lex_force_id (lexer)) goto error; first_name = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); } else if (command != COMB_UPDATE && lex_match_id (lexer, "LAST")) { if (last_name != NULL) { lex_sbc_only_once ("LAST"); goto error; } lex_match (lexer, T_EQUALS); if (!lex_force_id (lexer)) goto error; last_name = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "MAP")) { /* FIXME. */ } else if (lex_match_id (lexer, "DROP")) { if (!parse_dict_drop (lexer, proc.dict)) goto error; } else if (lex_match_id (lexer, "KEEP")) { if (!parse_dict_keep (lexer, proc.dict)) goto error; } else { lex_error (lexer, NULL); goto error; } if (!lex_match (lexer, T_SLASH) && lex_token (lexer) != T_ENDCMD) { lex_end_of_command (lexer); goto error; } } if (!saw_by) { if (command == COMB_UPDATE) { lex_sbc_missing ("BY"); goto error; } if (n_tables) { msg (SE, _("BY is required when %s is specified."), "TABLE"); goto error; } if (saw_sort) { msg (SE, _("BY is required when %s is specified."), "SORT"); goto error; } } /* Add IN, FIRST, and LAST variables to master dictionary. */ for (i = 0; i < proc.n_files; i++) { struct comb_file *file = &proc.files[i]; if (!create_flag_var ("IN", file->in_name, proc.dict, &file->in_var)) goto error; } if (!create_flag_var ("FIRST", first_name, proc.dict, &proc.first) || !create_flag_var ("LAST", last_name, proc.dict, &proc.last)) goto error; dict_delete_scratch_vars (proc.dict); dict_compact_values (proc.dict); /* Set up mapping from each file's variables to master variables. */ for (i = 0; i < proc.n_files; i++) { struct comb_file *file = &proc.files[i]; size_t src_var_cnt = dict_get_var_cnt (file->dict); size_t j; file->mv = xnmalloc (src_var_cnt, sizeof *file->mv); for (j = 0; j < src_var_cnt; j++) { struct variable *src_var = dict_get_var (file->dict, j); struct variable *dst_var = dict_lookup_var (proc.dict, var_get_name (src_var)); if (dst_var != NULL) { size_t n = subcase_get_n_fields (&file->src); file->mv[n] = var_get_missing_values (src_var); subcase_add_var (&file->src, src_var, SC_ASCEND); subcase_add_var (&file->dst, dst_var, SC_ASCEND); } } } proc.output = autopaging_writer_create (dict_get_proto (proc.dict)); taint = taint_clone (casewriter_get_taint (proc.output)); /* Set up case matcher. */ proc.matcher = case_matcher_create (); for (i = 0; i < proc.n_files; i++) { struct comb_file *file = &proc.files[i]; if (file->reader == NULL) { if (active_file == NULL) { proc_discard_output (ds); file->reader = active_file = proc_open_filtering (ds, false); } else file->reader = casereader_clone (active_file); } if (!file->is_sorted) file->reader = sort_execute (file->reader, &file->by_vars); taint_propagate (casereader_get_taint (file->reader), taint); file->data = casereader_read (file->reader); if (file->type == COMB_FILE) case_matcher_add_input (proc.matcher, &file->by_vars, &file->data, &file->is_minimal); } if (command == COMB_ADD) execute_add_files (&proc); else if (command == COMB_MATCH) execute_match_files (&proc); else if (command == COMB_UPDATE) execute_update (&proc); else NOT_REACHED (); case_matcher_destroy (proc.matcher); proc.matcher = NULL; close_all_comb_files (&proc); if (active_file != NULL) proc_commit (ds); dataset_set_dict (ds, proc.dict); dataset_set_source (ds, casewriter_make_reader (proc.output)); proc.dict = NULL; proc.output = NULL; free_comb_proc (&proc); free (first_name); free (last_name); return taint_destroy (taint) ? CMD_SUCCESS : CMD_CASCADING_FAILURE; error: if (active_file != NULL) proc_commit (ds); free_comb_proc (&proc); taint_destroy (taint); free (first_name); free (last_name); return CMD_CASCADING_FAILURE; } /* Merge the dictionary for file F into master dictionary M. */ static bool merge_dictionary (struct dictionary *const m, struct comb_file *f) { struct dictionary *d = f->dict; const struct string_array *d_docs, *m_docs; int i; if (dict_get_label (m) == NULL) dict_set_label (m, dict_get_label (d)); d_docs = dict_get_documents (d); m_docs = dict_get_documents (m); /* FIXME: If the input files have different encodings, then the result is undefined. The correct thing to do would be to convert to an encoding which can cope with all the input files (eg UTF-8). */ if ( 0 != strcmp (dict_get_encoding (f->dict), dict_get_encoding (m))) msg (MW, _("Combining files with incompatible encodings. String data may " "not be represented correctly.")); if (d_docs != NULL) { if (m_docs == NULL) dict_set_documents (m, d_docs); else { struct string_array new_docs; size_t i; new_docs.n = m_docs->n + d_docs->n; new_docs.strings = xmalloc (new_docs.n * sizeof *new_docs.strings); for (i = 0; i < m_docs->n; i++) new_docs.strings[i] = m_docs->strings[i]; for (i = 0; i < d_docs->n; i++) new_docs.strings[m_docs->n + i] = d_docs->strings[i]; dict_set_documents (m, &new_docs); free (new_docs.strings); } } for (i = 0; i < dict_get_var_cnt (d); i++) { struct variable *dv = dict_get_var (d, i); struct variable *mv = dict_lookup_var (m, var_get_name (dv)); if (dict_class_from_id (var_get_name (dv)) == DC_SCRATCH) continue; if (mv != NULL) { if (var_get_width (mv) != var_get_width (dv)) { const char *var_name = var_get_name (dv); struct string s = DS_EMPTY_INITIALIZER; const char *file_name; file_name = f->handle ? fh_get_name (f->handle) : "*"; ds_put_format (&s, _("Variable %s in file %s has different " "type or width from the same variable in " "earlier file."), var_name, file_name); ds_put_cstr (&s, " "); if (var_is_numeric (dv)) ds_put_format (&s, _("In file %s, %s is numeric."), file_name, var_name); else ds_put_format (&s, _("In file %s, %s is a string variable " "with width %d."), file_name, var_name, var_get_width (dv)); ds_put_cstr (&s, " "); if (var_is_numeric (mv)) ds_put_format (&s, _("In an earlier file, %s was numeric."), var_name); else ds_put_format (&s, _("In an earlier file, %s was a string " "variable with width %d."), var_name, var_get_width (mv)); msg (SE, "%s", ds_cstr (&s)); ds_destroy (&s); return false; } if (var_has_value_labels (dv) && !var_has_value_labels (mv)) var_set_value_labels (mv, var_get_value_labels (dv)); if (var_has_missing_values (dv) && !var_has_missing_values (mv)) var_set_missing_values (mv, var_get_missing_values (dv)); if (var_get_label (dv) && !var_get_label (mv)) var_set_label (mv, var_get_label (dv)); } else mv = dict_clone_var_assert (m, dv); } return true; } /* If VAR_NAME is non-NULL, attempts to create a variable named VAR_NAME, with format F1.0, in DICT, and stores a pointer to the variable in *VAR. Returns true if successful, false if the variable name is a duplicate (in which case a message saying that the variable specified on the given SUBCOMMAND is a duplicate is emitted). Does nothing and returns true if VAR_NAME is null. */ static bool create_flag_var (const char *subcommand, const char *var_name, struct dictionary *dict, struct variable **var) { if (var_name != NULL) { struct fmt_spec format = fmt_for_output (FMT_F, 1, 0); *var = dict_create_var (dict, var_name, 0); if (*var == NULL) { msg (SE, _("Variable name %s specified on %s subcommand " "duplicates an existing variable name."), subcommand, var_name); return false; } var_set_both_formats (*var, &format); } else *var = NULL; return true; } /* Closes all the files in PROC and frees their associated data. */ static void close_all_comb_files (struct comb_proc *proc) { size_t i; for (i = 0; i < proc->n_files; i++) { struct comb_file *file = &proc->files[i]; subcase_destroy (&file->by_vars); subcase_destroy (&file->src); subcase_destroy (&file->dst); free (file->mv); fh_unref (file->handle); dict_destroy (file->dict); casereader_destroy (file->reader); case_unref (file->data); free (file->in_name); } free (proc->files); proc->files = NULL; proc->n_files = 0; } /* Frees all the data for the procedure. */ static void free_comb_proc (struct comb_proc *proc) { close_all_comb_files (proc); dict_destroy (proc->dict); casewriter_destroy (proc->output); case_matcher_destroy (proc->matcher); if (proc->prev_BY) { caseproto_destroy_values (subcase_get_proto (&proc->by_vars), proc->prev_BY); free (proc->prev_BY); } subcase_destroy (&proc->by_vars); case_unref (proc->buffered_case); } static bool scan_table (struct comb_file *, union value by[]); static struct ccase *create_output_case (const struct comb_proc *); static void apply_case (const struct comb_file *, struct ccase *); static void apply_nonmissing_case (const struct comb_file *, struct ccase *); static void advance_file (struct comb_file *, union value by[]); static void output_case (struct comb_proc *, struct ccase *, union value by[]); static void output_buffered_case (struct comb_proc *); /* Executes the ADD FILES command. */ static void execute_add_files (struct comb_proc *proc) { union value *by; while (case_matcher_match (proc->matcher, &by)) { size_t i; for (i = 0; i < proc->n_files; i++) { struct comb_file *file = &proc->files[i]; while (file->is_minimal) { struct ccase *output = create_output_case (proc); apply_case (file, output); advance_file (file, by); output_case (proc, output, by); } } } output_buffered_case (proc); } /* Executes the MATCH FILES command. */ static void execute_match_files (struct comb_proc *proc) { union value *by; while (case_matcher_match (proc->matcher, &by)) { struct ccase *output; size_t i; output = create_output_case (proc); for (i = proc->n_files; i-- > 0; ) { struct comb_file *file = &proc->files[i]; if (file->type == COMB_FILE) { if (file->is_minimal) { apply_case (file, output); advance_file (file, NULL); } } else { if (scan_table (file, by)) apply_case (file, output); } } output_case (proc, output, by); } output_buffered_case (proc); } /* Executes the UPDATE command. */ static void execute_update (struct comb_proc *proc) { union value *by; size_t n_duplicates = 0; while (case_matcher_match (proc->matcher, &by)) { struct comb_file *first, *file; struct ccase *output; /* Find first nonnull case in array and make an output case from it. */ output = create_output_case (proc); for (first = &proc->files[0]; ; first++) if (first->is_minimal) break; apply_case (first, output); advance_file (first, by); /* Read additional cases and update the output case from them. (Don't update the output case from any duplicate cases in the master file.) */ for (file = first + (first == proc->files); file < &proc->files[proc->n_files]; file++) { while (file->is_minimal) { apply_nonmissing_case (file, output); advance_file (file, by); } } casewriter_write (proc->output, output); /* Write duplicate cases in the master file directly to the output. */ if (first == proc->files && first->is_minimal) { n_duplicates++; while (first->is_minimal) { output = create_output_case (proc); apply_case (first, output); advance_file (first, by); casewriter_write (proc->output, output); } } } if (n_duplicates) msg (SW, _("Encountered %zu sets of duplicate cases in the master file."), n_duplicates); } /* Reads FILE, which must be of type COMB_TABLE, until it encounters a case with BY or greater for its BY variables. Returns true if a case with exactly BY for its BY variables was found, otherwise false. */ static bool scan_table (struct comb_file *file, union value by[]) { while (file->data != NULL) { int cmp = subcase_compare_3way_xc (&file->by_vars, by, file->data); if (cmp > 0) { case_unref (file->data); file->data = casereader_read (file->reader); } else return cmp == 0; } return false; } /* Creates and returns an output case for PROC, initializing each of its values to system-missing or blanks, except that the values of IN variables are set to 0. */ static struct ccase * create_output_case (const struct comb_proc *proc) { size_t n_vars = dict_get_var_cnt (proc->dict); struct ccase *output; size_t i; output = case_create (dict_get_proto (proc->dict)); for (i = 0; i < n_vars; i++) { struct variable *v = dict_get_var (proc->dict, i); value_set_missing (case_data_rw (output, v), var_get_width (v)); } for (i = 0; i < proc->n_files; i++) { struct comb_file *file = &proc->files[i]; if (file->in_var != NULL) case_data_rw (output, file->in_var)->f = false; } return output; } static void mark_file_used (const struct comb_file *file, struct ccase *output) { if (file->in_var != NULL) case_data_rw (output, file->in_var)->f = true; } /* Copies the data from FILE's case into output case OUTPUT. If FILE has an IN variable, then it is set to 1 in OUTPUT. */ static void apply_case (const struct comb_file *file, struct ccase *output) { subcase_copy (&file->src, file->data, &file->dst, output); mark_file_used (file, output); } /* Copies the data from FILE's case into output case OUTPUT, skipping values that are missing or all spaces. If FILE has an IN variable, then it is set to 1 in OUTPUT. */ static void apply_nonmissing_case (const struct comb_file *file, struct ccase *output) { size_t i; for (i = 0; i < subcase_get_n_fields (&file->src); i++) { const struct subcase_field *src_field = &file->src.fields[i]; const struct subcase_field *dst_field = &file->dst.fields[i]; const union value *src_value = case_data_idx (file->data, src_field->case_index); int width = src_field->width; if (!mv_is_value_missing (file->mv[i], src_value, MV_ANY) && !(width > 0 && value_is_spaces (src_value, width))) value_copy (case_data_rw_idx (output, dst_field->case_index), src_value, width); } mark_file_used (file, output); } /* Advances FILE to its next case. If BY is nonnull, then FILE's is_minimal member is updated based on whether the new case's BY values still match those in BY. */ static void advance_file (struct comb_file *file, union value by[]) { case_unref (file->data); file->data = casereader_read (file->reader); if (by) file->is_minimal = (file->data != NULL && subcase_equal_cx (&file->by_vars, file->data, by)); } /* Writes OUTPUT, whose BY values has been extracted into BY, to PROC's output file, first initializing any FIRST or LAST variables in OUTPUT to the correct values. */ static void output_case (struct comb_proc *proc, struct ccase *output, union value by[]) { if (proc->first == NULL && proc->last == NULL) casewriter_write (proc->output, output); else { /* It's harder with LAST, because we can't know whether this case is the last in a group until we've prepared the *next* case also. Thus, we buffer the previous output case until the next one is ready. */ bool new_BY; if (proc->prev_BY != NULL) { new_BY = !subcase_equal_xx (&proc->by_vars, proc->prev_BY, by); if (proc->last != NULL) case_data_rw (proc->buffered_case, proc->last)->f = new_BY; casewriter_write (proc->output, proc->buffered_case); } else new_BY = true; proc->buffered_case = output; if (proc->first != NULL) case_data_rw (proc->buffered_case, proc->first)->f = new_BY; if (new_BY) { size_t n_values = subcase_get_n_fields (&proc->by_vars); const struct caseproto *proto = subcase_get_proto (&proc->by_vars); if (proc->prev_BY == NULL) { proc->prev_BY = xmalloc (n_values * sizeof *proc->prev_BY); caseproto_init_values (proto, proc->prev_BY); } caseproto_copy (subcase_get_proto (&proc->by_vars), 0, n_values, proc->prev_BY, by); } } } /* Writes a trailing buffered case to the output, if FIRST or LAST is in use. */ static void output_buffered_case (struct comb_proc *proc) { if (proc->prev_BY != NULL) { if (proc->last != NULL) case_data_rw (proc->buffered_case, proc->last)->f = 1.0; casewriter_write (proc->output, proc->buffered_case); proc->buffered_case = NULL; } } pspp-1.0.1/src/language/data-io/automake.mk0000644000175000017500000000344713137223525015456 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- language_data_io_sources = \ src/language/data-io/combine-files.c \ src/language/data-io/data-list.c \ src/language/data-io/data-parser.c \ src/language/data-io/data-parser.h \ src/language/data-io/data-reader.c \ src/language/data-io/data-reader.h \ src/language/data-io/data-writer.c \ src/language/data-io/data-writer.h \ src/language/data-io/dataset.c \ src/language/data-io/file-handle.c \ src/language/data-io/file-handle.h \ src/language/data-io/get-data.c \ src/language/data-io/get.c \ src/language/data-io/inpt-pgm.c \ src/language/data-io/inpt-pgm.h \ src/language/data-io/list.c \ src/language/data-io/placement-parser.c \ src/language/data-io/placement-parser.h \ src/language/data-io/print-space.c \ src/language/data-io/print.c \ src/language/data-io/matrix-data.c \ src/language/data-io/matrix-reader.c \ src/language/data-io/matrix-reader.h \ src/language/data-io/save-translate.c \ src/language/data-io/save.c \ src/language/data-io/trim.c \ src/language/data-io/trim.h pspp-1.0.1/src/language/data-io/inpt-pgm.c0000644000175000017500000002454712523704223015217 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/case.h" #include "data/caseinit.h" #include "data/casereader-provider.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/session.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/data-io/data-reader.h" #include "language/data-io/file-handle.h" #include "language/data-io/inpt-pgm.h" #include "language/expressions/public.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Indicates how a `union value' should be initialized. */ struct input_program_pgm { struct session *session; struct dataset *ds; struct trns_chain *trns_chain; enum trns_result restart; casenumber case_nr; /* Incremented by END CASE transformation. */ struct caseinit *init; struct caseproto *proto; }; static void destroy_input_program (struct input_program_pgm *); static trns_proc_func end_case_trns_proc; static trns_proc_func reread_trns_proc; static trns_proc_func end_file_trns_proc; static trns_free_func reread_trns_free; static const struct casereader_class input_program_casereader_class; static bool inside_input_program; /* Returns true if we're parsing the inside of a INPUT PROGRAM...END INPUT PROGRAM construct, false otherwise. */ bool in_input_program (void) { return inside_input_program; } /* Emits an END CASE transformation for INP. */ static void emit_END_CASE (struct dataset *ds, struct input_program_pgm *inp) { add_transformation (ds, end_case_trns_proc, NULL, inp); } int cmd_input_program (struct lexer *lexer, struct dataset *ds) { struct input_program_pgm *inp; bool saw_END_CASE = false; bool saw_END_FILE = false; bool saw_DATA_LIST = false; if (!lex_match (lexer, T_ENDCMD)) return lex_end_of_command (lexer); inp = xmalloc (sizeof *inp); inp->session = session_create (dataset_session (ds)); inp->ds = dataset_create (inp->session, "INPUT PROGRAM"); inp->trns_chain = NULL; inp->init = NULL; inp->proto = NULL; inside_input_program = true; while (!lex_match_phrase (lexer, "END INPUT PROGRAM")) { enum cmd_result result; result = cmd_parse_in_state (lexer, inp->ds, CMD_STATE_INPUT_PROGRAM); switch (result) { case CMD_DATA_LIST: saw_DATA_LIST = true; break; case CMD_END_CASE: emit_END_CASE (inp->ds, inp); saw_END_CASE = true; break; case CMD_END_FILE: saw_END_FILE = true; break; case CMD_FAILURE: break; default: if (cmd_result_is_failure (result) && lex_get_error_mode (lexer) != LEX_ERROR_TERMINAL) { if (result == CMD_EOF) msg (SE, _("Unexpected end-of-file within %s."), "INPUT PROGRAM"); inside_input_program = false; destroy_input_program (inp); return result; } } } if (!saw_END_CASE) emit_END_CASE (inp->ds, inp); inside_input_program = false; if (!saw_DATA_LIST && !saw_END_FILE) { msg (SE, _("Input program must contain %s or %s."), "DATA LIST", "END FILE"); destroy_input_program (inp); return CMD_FAILURE; } if (dict_get_next_value_idx (dataset_dict (inp->ds)) == 0) { msg (SE, _("Input program did not create any variables.")); destroy_input_program (inp); return CMD_FAILURE; } inp->trns_chain = proc_capture_transformations (inp->ds); trns_chain_finalize (inp->trns_chain); inp->restart = TRNS_CONTINUE; /* Figure out how to initialize each input case. */ inp->init = caseinit_create (); caseinit_mark_for_init (inp->init, dataset_dict (inp->ds)); inp->proto = caseproto_ref (dict_get_proto (dataset_dict (inp->ds))); dataset_set_dict (ds, dict_clone (dataset_dict (inp->ds))); dataset_set_source ( ds, casereader_create_sequential (NULL, inp->proto, CASENUMBER_MAX, &input_program_casereader_class, inp)); return CMD_SUCCESS; } int cmd_end_input_program (struct lexer *lexer UNUSED, struct dataset *ds UNUSED) { /* Inside INPUT PROGRAM, this should get caught at the top of the loop in cmd_input_program(). Outside of INPUT PROGRAM, the command parser should reject this command. */ NOT_REACHED (); } /* Returns true if STATE is valid given the transformations that are allowed within INPUT PROGRAM. */ static bool is_valid_state (enum trns_result state) { return (state == TRNS_CONTINUE || state == TRNS_ERROR || state == TRNS_END_FILE || state >= 0); } /* Reads and returns one case. Returns the case if successful, null at end of file or if an I/O error occurred. */ static struct ccase * input_program_casereader_read (struct casereader *reader UNUSED, void *inp_) { struct input_program_pgm *inp = inp_; struct ccase *c = case_create (inp->proto); do { assert (is_valid_state (inp->restart)); if (inp->restart == TRNS_ERROR || inp->restart == TRNS_END_FILE) { case_unref (c); return NULL; } c = case_unshare (c); caseinit_init_vars (inp->init, c); inp->restart = trns_chain_execute (inp->trns_chain, inp->restart, &c, inp->case_nr); assert (is_valid_state (inp->restart)); caseinit_update_left_vars (inp->init, c); } while (inp->restart < 0); return c; } static void destroy_input_program (struct input_program_pgm *pgm) { if (pgm != NULL) { session_destroy (pgm->session); trns_chain_destroy (pgm->trns_chain); caseinit_destroy (pgm->init); caseproto_unref (pgm->proto); free (pgm); } } /* Destroys the casereader. */ static void input_program_casereader_destroy (struct casereader *reader UNUSED, void *inp_) { struct input_program_pgm *inp = inp_; if (inp->restart == TRNS_ERROR) casereader_force_error (reader); destroy_input_program (inp); } static const struct casereader_class input_program_casereader_class = { input_program_casereader_read, input_program_casereader_destroy, NULL, NULL, }; int cmd_end_case (struct lexer *lexer, struct dataset *ds UNUSED) { assert (in_input_program ()); if (lex_token (lexer) == T_ENDCMD) return CMD_END_CASE; return CMD_SUCCESS; } /* Outputs the current case */ int end_case_trns_proc (void *inp_, struct ccase **c UNUSED, casenumber case_nr UNUSED) { struct input_program_pgm *inp = inp_; inp->case_nr++; return TRNS_END_CASE; } /* REREAD transformation. */ struct reread_trns { struct dfm_reader *reader; /* File to move file pointer back on. */ struct expression *column; /* Column to reset file pointer to. */ }; /* Parses REREAD command. */ int cmd_reread (struct lexer *lexer, struct dataset *ds) { struct file_handle *fh; /* File to be re-read. */ struct expression *e; /* Expression for column to set. */ struct reread_trns *t; /* Created transformation. */ char *encoding = NULL; fh = fh_get_default_handle (); e = NULL; while (lex_token (lexer) != T_ENDCMD) { if (lex_match_id (lexer, "COLUMN")) { lex_match (lexer, T_EQUALS); if (e) { lex_sbc_only_once ("COLUMN"); goto error; } e = expr_parse (lexer, ds, EXPR_NUMBER); if (!e) goto error; } else if (lex_match_id (lexer, "FILE")) { lex_match (lexer, T_EQUALS); fh_unref (fh); fh = fh_parse (lexer, FH_REF_FILE | FH_REF_INLINE, NULL); if (fh == NULL) goto error; } else if (lex_match_id (lexer, "ENCODING")) { lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; free (encoding); encoding = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } else { lex_error (lexer, NULL); goto error; } } t = xmalloc (sizeof *t); t->reader = dfm_open_reader (fh, lexer, encoding); t->column = e; add_transformation (ds, reread_trns_proc, reread_trns_free, t); fh_unref (fh); free (encoding); return CMD_SUCCESS; error: expr_free (e); free (encoding); return CMD_CASCADING_FAILURE; } /* Executes a REREAD transformation. */ static int reread_trns_proc (void *t_, struct ccase **c, casenumber case_num) { struct reread_trns *t = t_; if (t->column == NULL) dfm_reread_record (t->reader, 1); else { double column = expr_evaluate_num (t->column, *c, case_num); if (!isfinite (column) || column < 1) { msg (SE, _("REREAD: Column numbers must be positive finite " "numbers. Column set to 1.")); dfm_reread_record (t->reader, 1); } else dfm_reread_record (t->reader, column); } return TRNS_CONTINUE; } /* Frees a REREAD transformation. Returns true if successful, false if an I/O error occurred. */ static bool reread_trns_free (void *t_) { struct reread_trns *t = t_; expr_free (t->column); dfm_close_reader (t->reader); return true; } /* Parses END FILE command. */ int cmd_end_file (struct lexer *lexer UNUSED, struct dataset *ds) { assert (in_input_program ()); add_transformation (ds, end_file_trns_proc, NULL, NULL); return CMD_END_FILE; } /* Executes an END FILE transformation. */ static int end_file_trns_proc (void *trns_ UNUSED, struct ccase **c UNUSED, casenumber case_num UNUSED) { return TRNS_END_FILE; } pspp-1.0.1/src/language/data-io/dataset.c0000644000175000017500000001612312470243700015077 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/command.h" #include "data/dataset.h" #include "data/session.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) static int parse_window (struct lexer *lexer, unsigned int allowed, enum dataset_display def) { if (!lex_match_id (lexer, "WINDOW")) return def; lex_match (lexer, T_EQUALS); if (allowed & (1 << DATASET_MINIMIZED) && lex_match_id (lexer, "MINIMIZED")) return DATASET_MINIMIZED; else if (allowed & (1 << DATASET_ASIS) && lex_match_id (lexer, "ASIS")) return DATASET_ASIS; else if (allowed & (1 << DATASET_FRONT) && lex_match_id (lexer, "FRONT")) return DATASET_FRONT; else if (allowed & (1 << DATASET_HIDDEN) && lex_match_id (lexer, "HIDDEN")) return DATASET_HIDDEN; lex_error (lexer, NULL); return -1; } static struct dataset * parse_dataset_name (struct lexer *lexer, struct session *session) { struct dataset *ds; if (!lex_force_id (lexer)) return NULL; ds = session_lookup_dataset (session, lex_tokcstr (lexer)); if (ds != NULL) lex_get (lexer); else msg (SE, _("There is no dataset named %s."), lex_tokcstr (lexer)); return ds; } int cmd_dataset_name (struct lexer *lexer, struct dataset *active) { int display; if (!lex_force_id (lexer)) return CMD_FAILURE; dataset_set_name (active, lex_tokcstr (lexer)); lex_get (lexer); display = parse_window (lexer, (1 << DATASET_ASIS) | (1 << DATASET_FRONT), DATASET_ASIS); if (display < 0) return CMD_FAILURE; else if (display != DATASET_ASIS) dataset_set_display (active, display); return CMD_SUCCESS; } int cmd_dataset_activate (struct lexer *lexer, struct dataset *active) { struct session *session = dataset_session (active); struct dataset *ds; int display; ds = parse_dataset_name (lexer, session); if (ds == NULL) return CMD_FAILURE; if (ds != active) { proc_execute (active); session_set_active_dataset (session, ds); if (dataset_name (active)[0] == '\0') dataset_destroy (active); return CMD_SUCCESS; } display = parse_window (lexer, (1 << DATASET_ASIS) | (1 << DATASET_FRONT), DATASET_ASIS); if (display < 0) return CMD_FAILURE; else if (display != DATASET_ASIS) dataset_set_display (ds, display); return CMD_SUCCESS; } int cmd_dataset_copy (struct lexer *lexer, struct dataset *old) { struct session *session = dataset_session (old); struct dataset *new; int display; char *name; /* Parse the entire command first. proc_execute() can attempt to parse BEGIN DATA...END DATA and it will fail confusingly if we are in the middle of the command at the point. */ if (!lex_force_id (lexer)) return CMD_FAILURE; name = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); display = parse_window (lexer, ((1 << DATASET_MINIMIZED) | (1 << DATASET_HIDDEN) | (1 << DATASET_FRONT)), DATASET_MINIMIZED); if (display < 0) { free (name); return CMD_FAILURE; } if (session_lookup_dataset (session, name) == old) { new = old; dataset_set_name (old, ""); } else { proc_execute (old); new = dataset_clone (old, name); } dataset_set_display (new, display); free (name); return CMD_SUCCESS; } int cmd_dataset_declare (struct lexer *lexer, struct dataset *ds) { struct session *session = dataset_session (ds); struct dataset *new; int display; if (!lex_force_id (lexer)) return CMD_FAILURE; new = session_lookup_dataset (session, lex_tokcstr (lexer)); if (new == NULL) new = dataset_create (session, lex_tokcstr (lexer)); lex_get (lexer); display = parse_window (lexer, ((1 << DATASET_MINIMIZED) | (1 << DATASET_HIDDEN) | (1 << DATASET_FRONT)), DATASET_MINIMIZED); if (display < 0) return CMD_FAILURE; dataset_set_display (new, display); return CMD_SUCCESS; } static void dataset_close_cb (struct dataset *ds, void *session_) { struct session *session = session_; if (ds != session_active_dataset (session)) dataset_destroy (ds); } int cmd_dataset_close (struct lexer *lexer, struct dataset *ds) { struct session *session = dataset_session (ds); if (lex_match (lexer, T_ALL)) { session_for_each_dataset (session, dataset_close_cb, session); dataset_set_name (session_active_dataset (session), ""); } else { if (!lex_match (lexer, T_ASTERISK)) { ds = parse_dataset_name (lexer, session); if (ds == NULL) return CMD_FAILURE; } if (ds == session_active_dataset (session)) dataset_set_name (ds, ""); else dataset_destroy (ds); } return CMD_SUCCESS; } static void dataset_display_cb (struct dataset *ds, void *p_) { struct dataset ***p = p_; **p = ds; (*p)++; } static int sort_datasets (const void *a_, const void *b_) { struct dataset *const *a = a_; struct dataset *const *b = b_; return strcmp (dataset_name (*a), dataset_name (*b)); } int cmd_dataset_display (struct lexer *lexer UNUSED, struct dataset *ds) { struct session *session = dataset_session (ds); struct dataset **datasets, **p; struct tab_table *t; size_t i, n; n = session_n_datasets (session); datasets = xmalloc (n * sizeof *datasets); p = datasets; session_for_each_dataset (session, dataset_display_cb, &p); qsort (datasets, n, sizeof *datasets, sort_datasets); t = tab_create (1, n + 1); tab_headers (t, 0, 0, 1, 0); tab_box (t, TAL_1, TAL_1, -1, TAL_1, 0, 0, tab_nc (t) - 1, tab_nr (t) - 1); tab_hline (t, TAL_2, 0, 0, 1); tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Dataset")); for (i = 0; i < n; i++) { struct dataset *ds = datasets[i]; const char *name; name = dataset_name (ds); if (name[0] == '\0') name = _("unnamed dataset"); if (ds == session_active_dataset (session)) tab_text_format (t, 0, i + 1, TAB_LEFT, "%s %s", name, _("(active dataset)")); else tab_text (t, 0, i + 1, TAB_LEFT, name); } tab_title (t, "Open datasets."); tab_submit (t); free (datasets); return CMD_SUCCESS; } pspp-1.0.1/src/language/data-io/print-space.c0000644000175000017500000000766112523704223015707 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/dataset.h" #include "data/value.h" #include "language/command.h" #include "language/data-io/data-writer.h" #include "language/data-io/file-handle.h" #include "language/expressions/public.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "output/text-item.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* PRINT SPACE transformation. */ struct print_space_trns { struct dfm_writer *writer; /* Output data file. */ struct expression *expr; /* Number of lines; NULL means 1. */ }; static trns_proc_func print_space_trns_proc; static trns_free_func print_space_trns_free; int cmd_print_space (struct lexer *lexer, struct dataset *ds) { struct print_space_trns *trns; struct file_handle *handle = NULL; struct expression *expr = NULL; struct dfm_writer *writer; char *encoding = NULL; if (lex_match_id (lexer, "OUTFILE")) { lex_match (lexer, T_EQUALS); handle = fh_parse (lexer, FH_REF_FILE, NULL); if (handle == NULL) return CMD_FAILURE; if (lex_match_id (lexer, "ENCODING")) { lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; encoding = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } } else handle = NULL; if (lex_token (lexer) != T_ENDCMD) { expr = expr_parse (lexer, ds, EXPR_NUMBER); if (lex_token (lexer) != T_ENDCMD) { lex_error (lexer, _("expecting end of command")); goto error; } } else expr = NULL; if (handle != NULL) { writer = dfm_open_writer (handle, encoding); if (writer == NULL) goto error; } else writer = NULL; trns = xmalloc (sizeof *trns); trns->writer = writer; trns->expr = expr; add_transformation (ds, print_space_trns_proc, print_space_trns_free, trns); fh_unref (handle); return CMD_SUCCESS; error: fh_unref (handle); expr_free (expr); return CMD_FAILURE; } /* Executes a PRINT SPACE transformation. */ static int print_space_trns_proc (void *t_, struct ccase **c, casenumber case_num UNUSED) { struct print_space_trns *trns = t_; int n; n = 1; if (trns->expr) { double f = expr_evaluate_num (trns->expr, *c, case_num); if (f == SYSMIS) msg (SW, _("The expression on %s evaluated to the " "system-missing value."), "PRINT SPACE"); else if (f < 0 || f > INT_MAX) msg (SW, _("The expression on %s evaluated to %g."), "PRINT SPACE", f); else n = f; } while (n--) if (trns->writer == NULL) text_item_submit (text_item_create (TEXT_ITEM_BLANK_LINE, "")); else dfm_put_record (trns->writer, " ", 1); /* XXX */ if (trns->writer != NULL && dfm_write_error (trns->writer)) return TRNS_ERROR; return TRNS_CONTINUE; } /* Frees a PRINT SPACE transformation. Returns true if successful, false if an I/O error occurred. */ static bool print_space_trns_free (void *trns_) { struct print_space_trns *trns = trns_; bool ok = dfm_close_writer (trns->writer); expr_free (trns->expr); free (trns); return ok; } pspp-1.0.1/src/language/data-io/file-handle.h0000644000175000017500000000216612470243700015631 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LANGUAGE_DATA_IO_FILE_HANDLE_H #define LANGUAGE_DATA_IO_FILE_HANDLE_H 1 /* Parsing file handles. */ #include #include #include "data/file-handle-def.h" struct lexer; struct session; struct file_handle *fh_parse (struct lexer *, enum fh_referent, struct session *); #endif /* language/data-io/file-handle.h */ pspp-1.0.1/src/language/data-io/print.c0000644000175000017500000005175012523704223014614 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/case.h" #include "data/dataset.h" #include "data/data-out.h" #include "data/format.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/data-io/data-writer.h" #include "language/data-io/file-handle.h" #include "language/data-io/placement-parser.h" #include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/ll.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/u8-line.h" #include "output/tab.h" #include "output/text-item.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Describes what to do when an output field is encountered. */ enum field_type { PRT_LITERAL, /* Literal string. */ PRT_VAR /* Variable. */ }; /* Describes how to output one field. */ struct prt_out_spec { /* All fields. */ struct ll ll; /* In struct print_trns `specs' list. */ enum field_type type; /* What type of field this is. */ int record; /* 1-based record number. */ int first_column; /* 0-based first column. */ /* PRT_VAR only. */ const struct variable *var; /* Associated variable. */ struct fmt_spec format; /* Output spec. */ bool add_space; /* Add trailing space? */ bool sysmis_as_spaces; /* Output SYSMIS as spaces? */ /* PRT_LITERAL only. */ struct string string; /* String to output. */ int width; /* Width of 'string', in display columns. */ }; static inline struct prt_out_spec * ll_to_prt_out_spec (struct ll *ll) { return ll_data (ll, struct prt_out_spec, ll); } /* PRINT, PRINT EJECT, WRITE private data structure. */ struct print_trns { struct pool *pool; /* Stores related data. */ bool eject; /* Eject page before printing? */ bool include_prefix; /* Prefix lines with space? */ const char *encoding; /* Encoding to use for output. */ struct dfm_writer *writer; /* Output file, NULL=listing file. */ struct ll_list specs; /* List of struct prt_out_specs. */ size_t record_cnt; /* Number of records to write. */ }; enum which_formats { PRINT, WRITE }; static int internal_cmd_print (struct lexer *, struct dataset *ds, enum which_formats, bool eject); static trns_proc_func print_text_trns_proc, print_binary_trns_proc; static trns_free_func print_trns_free; static bool parse_specs (struct lexer *, struct pool *tmp_pool, struct print_trns *, struct dictionary *dict, enum which_formats); static void dump_table (struct print_trns *, const struct file_handle *); /* Basic parsing. */ /* Parses PRINT command. */ int cmd_print (struct lexer *lexer, struct dataset *ds) { return internal_cmd_print (lexer, ds, PRINT, false); } /* Parses PRINT EJECT command. */ int cmd_print_eject (struct lexer *lexer, struct dataset *ds) { return internal_cmd_print (lexer, ds, PRINT, true); } /* Parses WRITE command. */ int cmd_write (struct lexer *lexer, struct dataset *ds) { return internal_cmd_print (lexer, ds, WRITE, false); } /* Parses the output commands. */ static int internal_cmd_print (struct lexer *lexer, struct dataset *ds, enum which_formats which_formats, bool eject) { bool print_table = false; const struct prt_out_spec *spec; struct print_trns *trns; struct file_handle *fh = NULL; char *encoding = NULL; struct pool *tmp_pool; bool binary; /* Fill in prt to facilitate error-handling. */ trns = pool_create_container (struct print_trns, pool); trns->eject = eject; trns->writer = NULL; trns->record_cnt = 0; ll_init (&trns->specs); tmp_pool = pool_create_subpool (trns->pool); /* Parse the command options. */ while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD) { if (lex_match_id (lexer, "OUTFILE")) { lex_match (lexer, T_EQUALS); fh = fh_parse (lexer, FH_REF_FILE, NULL); if (fh == NULL) goto error; } else if (lex_match_id (lexer, "ENCODING")) { lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; free (encoding); encoding = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "RECORDS")) { lex_match (lexer, T_EQUALS); lex_match (lexer, T_LPAREN); if (!lex_force_int (lexer)) goto error; trns->record_cnt = lex_integer (lexer); lex_get (lexer); lex_match (lexer, T_RPAREN); } else if (lex_match_id (lexer, "TABLE")) print_table = true; else if (lex_match_id (lexer, "NOTABLE")) print_table = false; else { lex_error (lexer, _("expecting a valid subcommand")); goto error; } } /* When PRINT or PRINT EJECT writes to an external file, we prefix each line with a space for compatibility. */ trns->include_prefix = which_formats == PRINT && fh != NULL; /* Parse variables and strings. */ if (!parse_specs (lexer, tmp_pool, trns, dataset_dict (ds), which_formats)) goto error; /* Are there any binary formats? There are real difficulties figuring out what to do when both binary formats and nontrivial encodings enter the picture. So when binary formats are present we fall back to much simpler handling. */ binary = false; ll_for_each (spec, struct prt_out_spec, ll, &trns->specs) { if (spec->type == PRT_VAR && fmt_get_category (spec->format.type) == FMT_CAT_BINARY) { binary = true; break; } } if (binary && fh == NULL) { msg (SE, _("%s is required when binary formats are specified."), "OUTFILE"); goto error; } if (lex_end_of_command (lexer) != CMD_SUCCESS) goto error; if (fh != NULL) { trns->writer = dfm_open_writer (fh, encoding); if (trns->writer == NULL) goto error; trns->encoding = dfm_writer_get_encoding (trns->writer); } else trns->encoding = UTF8; /* Output the variable table if requested. */ if (print_table) dump_table (trns, fh); /* Put the transformation in the queue. */ add_transformation (ds, (binary ? print_binary_trns_proc : print_text_trns_proc), print_trns_free, trns); pool_destroy (tmp_pool); fh_unref (fh); return CMD_SUCCESS; error: print_trns_free (trns); fh_unref (fh); return CMD_FAILURE; } static bool parse_string_argument (struct lexer *, struct print_trns *, int record, int *column); static bool parse_variable_argument (struct lexer *, const struct dictionary *, struct print_trns *, struct pool *tmp_pool, int *record, int *column, enum which_formats); /* Parses all the variable and string specifications on a single PRINT, PRINT EJECT, or WRITE command into the prt structure. Returns success. */ static bool parse_specs (struct lexer *lexer, struct pool *tmp_pool, struct print_trns *trns, struct dictionary *dict, enum which_formats which_formats) { int record = 0; int column = 1; if (lex_token (lexer) == T_ENDCMD) { trns->record_cnt = 1; return true; } while (lex_token (lexer) != T_ENDCMD) { bool ok; if (!parse_record_placement (lexer, &record, &column)) return false; if (lex_is_string (lexer)) ok = parse_string_argument (lexer, trns, record, &column); else ok = parse_variable_argument (lexer, dict, trns, tmp_pool, &record, &column, which_formats); if (!ok) return 0; lex_match (lexer, T_COMMA); } if (trns->record_cnt != 0 && trns->record_cnt != record) msg (SW, _("Output calls for %d records but %zu specified on RECORDS " "subcommand."), record, trns->record_cnt); trns->record_cnt = record; return true; } /* Parses a string argument to the PRINT commands. Returns success. */ static bool parse_string_argument (struct lexer *lexer, struct print_trns *trns, int record, int *column) { struct prt_out_spec *spec = pool_alloc (trns->pool, sizeof *spec); spec->type = PRT_LITERAL; spec->record = record; spec->first_column = *column; ds_init_substring (&spec->string, lex_tokss (lexer)); ds_register_pool (&spec->string, trns->pool); lex_get (lexer); /* Parse the included column range. */ if (lex_is_number (lexer)) { int first_column, last_column; bool range_specified; if (!parse_column_range (lexer, 1, &first_column, &last_column, &range_specified)) return false; spec->first_column = first_column; if (range_specified) ds_set_length (&spec->string, last_column - first_column + 1, ' '); } spec->width = u8_strwidth (CHAR_CAST (const uint8_t *, ds_cstr (&spec->string)), UTF8); *column = spec->first_column + spec->width; ll_push_tail (&trns->specs, &spec->ll); return true; } /* Parses a variable argument to the PRINT commands by passing it off to fixed_parse_compatible() or fixed_parse_fortran() as appropriate. Returns success. */ static bool parse_variable_argument (struct lexer *lexer, const struct dictionary *dict, struct print_trns *trns, struct pool *tmp_pool, int *record, int *column, enum which_formats which_formats) { const struct variable **vars; size_t var_cnt, var_idx; struct fmt_spec *formats, *f; size_t format_cnt; bool add_space; if (!parse_variables_const_pool (lexer, tmp_pool, dict, &vars, &var_cnt, PV_DUPLICATE)) return false; if (lex_is_number (lexer) || lex_token (lexer) == T_LPAREN) { if (!parse_var_placements (lexer, tmp_pool, var_cnt, FMT_FOR_OUTPUT, &formats, &format_cnt)) return false; add_space = false; } else { size_t i; lex_match (lexer, T_ASTERISK); formats = pool_nmalloc (tmp_pool, var_cnt, sizeof *formats); format_cnt = var_cnt; for (i = 0; i < var_cnt; i++) { const struct variable *v = vars[i]; formats[i] = (which_formats == PRINT ? *var_get_print_format (v) : *var_get_write_format (v)); } add_space = which_formats == PRINT; } var_idx = 0; for (f = formats; f < &formats[format_cnt]; f++) if (!execute_placement_format (f, record, column)) { const struct variable *var; struct prt_out_spec *spec; var = vars[var_idx++]; if (!fmt_check_width_compat (f, var_get_width (var))) return false; spec = pool_alloc (trns->pool, sizeof *spec); spec->type = PRT_VAR; spec->record = *record; spec->first_column = *column; spec->var = var; spec->format = *f; spec->add_space = add_space; /* This is a completely bizarre twist for compatibility: WRITE outputs the system-missing value as a field filled with spaces, instead of using the normal format that usually contains a period. */ spec->sysmis_as_spaces = (which_formats == WRITE && var_is_numeric (var) && (fmt_get_category (spec->format.type) != FMT_CAT_BINARY)); ll_push_tail (&trns->specs, &spec->ll); *column += f->w + add_space; } assert (var_idx == var_cnt); return true; } /* Prints the table produced by the TABLE subcommand to the listing file. */ static void dump_table (struct print_trns *trns, const struct file_handle *fh) { struct prt_out_spec *spec; struct tab_table *t; int spec_cnt; int row; spec_cnt = ll_count (&trns->specs); t = tab_create (4, spec_cnt + 1); tab_box (t, TAL_1, TAL_1, TAL_0, TAL_1, 0, 0, 3, spec_cnt); tab_hline (t, TAL_2, 0, 3, 1); tab_headers (t, 0, 0, 1, 0); tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Variable")); tab_text (t, 1, 0, TAB_CENTER | TAT_TITLE, _("Record")); tab_text (t, 2, 0, TAB_CENTER | TAT_TITLE, _("Columns")); tab_text (t, 3, 0, TAB_CENTER | TAT_TITLE, _("Format")); row = 1; ll_for_each (spec, struct prt_out_spec, ll, &trns->specs) { char fmt_string[FMT_STRING_LEN_MAX + 1]; int width; switch (spec->type) { case PRT_LITERAL: tab_text_format (t, 0, row, TAB_LEFT | TAB_FIX, "`%.*s'", (int) ds_length (&spec->string), ds_data (&spec->string)); width = ds_length (&spec->string); break; case PRT_VAR: tab_text (t, 0, row, TAB_LEFT, var_get_name (spec->var)); tab_text (t, 3, row, TAB_LEFT | TAB_FIX, fmt_to_string (&spec->format, fmt_string)); width = spec->format.w; break; default: NOT_REACHED (); } tab_text_format (t, 1, row, 0, "%d", spec->record); tab_text_format (t, 2, row, 0, "%3d-%3d", spec->first_column, spec->first_column + width - 1); row++; } if (fh != NULL) tab_title (t, ngettext ("Writing %zu record to %s.", "Writing %zu records to %s.", trns->record_cnt), trns->record_cnt, fh_get_name (fh)); else tab_title (t, ngettext ("Writing %zu record.", "Writing %zu records.", trns->record_cnt), trns->record_cnt); tab_submit (t); } /* Transformation, for all-text output. */ static void print_text_flush_records (struct print_trns *, struct u8_line *, int target_record, bool *eject, int *record); /* Performs the transformation inside print_trns T on case C. */ static int print_text_trns_proc (void *trns_, struct ccase **c, casenumber case_num UNUSED) { struct print_trns *trns = trns_; struct prt_out_spec *spec; struct u8_line line; bool eject = trns->eject; int record = 1; u8_line_init (&line); ll_for_each (spec, struct prt_out_spec, ll, &trns->specs) { int x0 = spec->first_column; print_text_flush_records (trns, &line, spec->record, &eject, &record); u8_line_set_length (&line, spec->first_column); if (spec->type == PRT_VAR) { const union value *input = case_data (*c, spec->var); int x1; if (!spec->sysmis_as_spaces || input->f != SYSMIS) { size_t len; int width; char *s; s = data_out (input, var_get_encoding (spec->var), &spec->format); len = strlen (s); width = u8_width (CHAR_CAST (const uint8_t *, s), len, UTF8); x1 = x0 + width; u8_line_put (&line, x0, x1, s, len); free (s); } else { int n = spec->format.w; x1 = x0 + n; memset (u8_line_reserve (&line, x0, x1, n), ' ', n); } if (spec->add_space) *u8_line_reserve (&line, x1, x1 + 1, 1) = ' '; } else { const struct string *s = &spec->string; u8_line_put (&line, x0, x0 + spec->width, ds_data (s), ds_length (s)); } } print_text_flush_records (trns, &line, trns->record_cnt + 1, &eject, &record); u8_line_destroy (&line); if (trns->writer != NULL && dfm_write_error (trns->writer)) return TRNS_ERROR; return TRNS_CONTINUE; } /* Advance from *RECORD to TARGET_RECORD, outputting records along the way. If *EJECT is true, then the first record output is preceded by ejecting the page (and *EJECT is set false). */ static void print_text_flush_records (struct print_trns *trns, struct u8_line *line, int target_record, bool *eject, int *record) { for (; target_record > *record; (*record)++) { char leader = ' '; if (*eject) { *eject = false; if (trns->writer == NULL) text_item_submit (text_item_create (TEXT_ITEM_EJECT_PAGE, "")); else leader = '1'; } *u8_line_reserve (line, 0, 1, 1) = leader; if (trns->writer == NULL) tab_output_text (TAB_FIX, ds_cstr (&line->s) + 1); else { size_t len = ds_length (&line->s); char *s = ds_cstr (&line->s); if (!trns->include_prefix) { s++; len--; } if (is_encoding_utf8 (trns->encoding)) dfm_put_record (trns->writer, s, len); else { char *recoded = recode_string (trns->encoding, UTF8, s, len); dfm_put_record (trns->writer, recoded, strlen (recoded)); free (recoded); } } } } /* Transformation, for output involving binary. */ static void print_binary_flush_records (struct print_trns *, struct string *line, int target_record, bool *eject, int *record); /* Performs the transformation inside print_trns T on case C. */ static int print_binary_trns_proc (void *trns_, struct ccase **c, casenumber case_num UNUSED) { struct print_trns *trns = trns_; bool eject = trns->eject; char encoded_space = recode_byte (trns->encoding, C_ENCODING, ' '); int record = 1; struct prt_out_spec *spec; struct string line; ds_init_empty (&line); ds_put_byte (&line, ' '); ll_for_each (spec, struct prt_out_spec, ll, &trns->specs) { print_binary_flush_records (trns, &line, spec->record, &eject, &record); ds_set_length (&line, spec->first_column, encoded_space); if (spec->type == PRT_VAR) { const union value *input = case_data (*c, spec->var); if (!spec->sysmis_as_spaces || input->f != SYSMIS) data_out_recode (input, var_get_encoding (spec->var), &spec->format, &line, trns->encoding); else ds_put_byte_multiple (&line, encoded_space, spec->format.w); if (spec->add_space) ds_put_byte (&line, encoded_space); } else { ds_put_substring (&line, ds_ss (&spec->string)); if (0 != strcmp (trns->encoding, UTF8)) { size_t length = ds_length (&spec->string); char *data = ss_data (ds_tail (&line, length)); char *s = recode_string (trns->encoding, UTF8, data, length); memcpy (data, s, length); free (s); } } } print_binary_flush_records (trns, &line, trns->record_cnt + 1, &eject, &record); ds_destroy (&line); if (trns->writer != NULL && dfm_write_error (trns->writer)) return TRNS_ERROR; return TRNS_CONTINUE; } /* Advance from *RECORD to TARGET_RECORD, outputting records along the way. If *EJECT is true, then the first record output is preceded by ejecting the page (and *EJECT is set false). */ static void print_binary_flush_records (struct print_trns *trns, struct string *line, int target_record, bool *eject, int *record) { for (; target_record > *record; (*record)++) { char *s = ds_cstr (line); size_t length = ds_length (line); char leader = ' '; if (*eject) { *eject = false; leader = '1'; } s[0] = recode_byte (trns->encoding, C_ENCODING, leader); if (!trns->include_prefix) { s++; length--; } dfm_put_record (trns->writer, s, length); ds_truncate (line, 1); } } /* Frees TRNS. */ static bool print_trns_free (void *trns_) { struct print_trns *trns = trns_; bool ok = true; if (trns->writer != NULL) ok = dfm_close_writer (trns->writer); pool_destroy (trns->pool); return ok; } pspp-1.0.1/src/language/data-io/placement-parser.h0000644000175000017500000000305712470413451016725 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef LANGUAGE_DATA_IO_PLACEMENT_PARSER_H #define LANGUAGE_DATA_IO_PLACEMENT_PARSER_H 1 #include #include #include "data/format.h" struct pool; struct lexer; bool parse_record_placement (struct lexer *, int *record, int *column); bool parse_var_placements (struct lexer *, struct pool *, size_t var_cnt, enum fmt_use, struct fmt_spec **, size_t *format_cnt); bool execute_placement_format (const struct fmt_spec *, int *record, int *column); bool parse_column (struct lexer *lexer, int base, int *column); bool parse_column_range (struct lexer *, int base, int *first_column, int *last_column, bool *range_specified); #endif /* language/data-io/placement-parser.h */ pspp-1.0.1/src/language/control/0000755000175000017500000000000013150620333013522 500000000000000pspp-1.0.1/src/language/control/control-stack.c0000644000175000017500000000534213137223525016404 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/control/control-stack.h" #include #include #include "libpspp/compiler.h" #include "libpspp/message.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct ctl_struct { const struct ctl_class *class; /* Class of control structure. */ struct ctl_struct *down; /* Points toward the bottom of ctl_stack. */ void *private; /* Private data. */ }; static struct ctl_struct *ctl_stack; void ctl_stack_clear (void) { while (ctl_stack != NULL) { struct ctl_struct *top = ctl_stack; msg (SE, _("%s without %s."), top->class->start_name, top->class->end_name); ctl_stack_pop (top->private); } } void ctl_stack_push (const struct ctl_class *class, void *private) { struct ctl_struct *ctl; assert (private != NULL); ctl = xmalloc (sizeof *ctl); ctl->class = class; ctl->down = ctl_stack; ctl->private = private; ctl_stack = ctl; } void * ctl_stack_top (const struct ctl_class *class) { struct ctl_struct *top = ctl_stack; if (top != NULL && top->class == class) return top->private; else { if (ctl_stack_search (class) != NULL) msg (SE, _("This command must appear inside %s...%s, " "without intermediate %s...%s."), class->start_name, class->end_name, top->class->start_name, top->class->end_name); return NULL; } } void * ctl_stack_search (const struct ctl_class *class) { struct ctl_struct *ctl; for (ctl = ctl_stack; ctl != NULL; ctl = ctl->down) if (ctl->class == class) return ctl->private; msg (SE, _("This command cannot appear outside %s...%s."), class->start_name, class->end_name); return NULL; } void ctl_stack_pop (void *private) { struct ctl_struct *top = ctl_stack; assert (top != NULL); assert (top->private == private); top->class->close (top->private); ctl_stack = top->down; free (top); } bool ctl_stack_is_empty (void) { return ctl_stack == NULL; } pspp-1.0.1/src/language/control/do-if.c0000644000175000017500000001766513137223525014632 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/case.h" #include "data/dataset.h" #include "data/transformations.h" #include "data/value.h" #include "language/command.h" #include "language/control/control-stack.h" #include "language/expressions/public.h" #include "language/lexer/lexer.h" #include "libpspp/compiler.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* DO IF, ELSE IF, and ELSE are translated as a single transformation that evaluates each condition and jumps to the start of the appropriate block of transformations. Each block of transformations (except for the last) ends with a transformation that jumps past the remaining blocks. So, the following code: DO IF a. ...block 1... ELSE IF b. ...block 2... ELSE. ...block 3... END IF. is effectively translated like this: IF a GOTO 1, IF b GOTO 2, ELSE GOTO 3. 1: ...block 1... GOTO 4 2: ...block 2... GOTO 4 3: ...block 3... 4: */ /* A conditional clause. */ struct clause { struct expression *condition; /* Test expression; NULL for ELSE clause. */ int target_index; /* Transformation to jump to if true. */ }; /* DO IF transformation. */ struct do_if_trns { struct dataset *ds; /* The dataset */ struct clause *clauses; /* Clauses. */ size_t clause_cnt; /* Number of clauses. */ int past_END_IF_index; /* Transformation just past last clause. */ }; static const struct ctl_class do_if_class; static int parse_clause (struct lexer *, struct do_if_trns *, struct dataset *ds); static void add_clause (struct do_if_trns *, struct expression *condition); static void add_else (struct do_if_trns *); static bool has_else (struct do_if_trns *); static bool must_not_have_else (struct do_if_trns *); static void close_do_if (void *do_if); static trns_finalize_func do_if_finalize_func; static trns_proc_func do_if_trns_proc, break_trns_proc; static trns_free_func do_if_trns_free; /* Parse DO IF. */ int cmd_do_if (struct lexer *lexer, struct dataset *ds) { struct do_if_trns *do_if = xmalloc (sizeof *do_if); do_if->clauses = NULL; do_if->clause_cnt = 0; do_if->ds = ds; ctl_stack_push (&do_if_class, do_if); add_transformation_with_finalizer (ds, do_if_finalize_func, do_if_trns_proc, do_if_trns_free, do_if); return parse_clause (lexer, do_if, ds); } /* Parse ELSE IF. */ int cmd_else_if (struct lexer *lexer, struct dataset *ds) { struct do_if_trns *do_if = ctl_stack_top (&do_if_class); if (do_if == NULL || !must_not_have_else (do_if)) return CMD_CASCADING_FAILURE; return parse_clause (lexer, do_if, ds); } /* Parse ELSE. */ int cmd_else (struct lexer *lexer UNUSED, struct dataset *ds) { struct do_if_trns *do_if = ctl_stack_top (&do_if_class); if (do_if == NULL || !must_not_have_else (do_if)) return CMD_CASCADING_FAILURE; assert (ds == do_if->ds); add_else (do_if); return CMD_SUCCESS; } /* Parse END IF. */ int cmd_end_if (struct lexer *lexer UNUSED, struct dataset *ds) { struct do_if_trns *do_if = ctl_stack_top (&do_if_class); if (do_if == NULL) return CMD_CASCADING_FAILURE; assert (ds == do_if->ds); ctl_stack_pop (do_if); return CMD_SUCCESS; } /* Closes out DO_IF, by adding a sentinel ELSE clause if necessary and setting past_END_IF_index. */ static void close_do_if (void *do_if_) { struct do_if_trns *do_if = do_if_; if (!has_else (do_if)) add_else (do_if); do_if->past_END_IF_index = next_transformation (do_if->ds); } /* Adds an ELSE clause to DO_IF pointing to the next transformation. */ static void add_else (struct do_if_trns *do_if) { assert (!has_else (do_if)); add_clause (do_if, NULL); } /* Returns true if DO_IF does not yet have an ELSE clause. Reports an error and returns false if it does already. */ static bool must_not_have_else (struct do_if_trns *do_if) { if (has_else (do_if)) { msg (SE, _("This command may not follow %s in %s ... %s."), "ELSE", "DO IF", "END IF"); return false; } else return true; } /* Returns true if DO_IF already has an ELSE clause, false otherwise. */ static bool has_else (struct do_if_trns *do_if) { return (do_if->clause_cnt != 0 && do_if->clauses[do_if->clause_cnt - 1].condition == NULL); } /* Parses a DO IF or ELSE IF expression and appends the corresponding clause to DO_IF. Checks for end of command and returns a command return code. */ static int parse_clause (struct lexer *lexer, struct do_if_trns *do_if, struct dataset *ds) { struct expression *condition; condition = expr_parse (lexer, ds, EXPR_BOOLEAN); if (condition == NULL) return CMD_CASCADING_FAILURE; add_clause (do_if, condition); return CMD_SUCCESS; } /* Adds a clause to DO_IF that tests for the given CONDITION and, if true, jumps to the set of transformations produced by following commands. */ static void add_clause (struct do_if_trns *do_if, struct expression *condition) { struct clause *clause; if (do_if->clause_cnt > 0) add_transformation (do_if->ds, break_trns_proc, NULL, do_if); do_if->clauses = xnrealloc (do_if->clauses, do_if->clause_cnt + 1, sizeof *do_if->clauses); clause = &do_if->clauses[do_if->clause_cnt++]; clause->condition = condition; clause->target_index = next_transformation (do_if->ds); } /* Finalizes DO IF by clearing the control stack, thus ensuring that all open DO IFs are closed. */ static void do_if_finalize_func (void *do_if_ UNUSED) { /* This will be called multiple times if multiple DO IFs were executed, which is slightly unclean, but at least it's idempotent. */ ctl_stack_clear (); } /* DO IF transformation procedure. Checks each clause and jumps to the appropriate transformation. */ static int do_if_trns_proc (void *do_if_, struct ccase **c, casenumber case_num UNUSED) { struct do_if_trns *do_if = do_if_; struct clause *clause; for (clause = do_if->clauses; clause < do_if->clauses + do_if->clause_cnt; clause++) { if (clause->condition != NULL) { double boolean = expr_evaluate_num (clause->condition, *c, case_num); if (boolean == 1.0) return clause->target_index; else if (boolean == SYSMIS) return do_if->past_END_IF_index; } else return clause->target_index; } return do_if->past_END_IF_index; } /* Frees a DO IF transformation. */ static bool do_if_trns_free (void *do_if_) { struct do_if_trns *do_if = do_if_; struct clause *clause; for (clause = do_if->clauses; clause < do_if->clauses + do_if->clause_cnt; clause++) expr_free (clause->condition); free (do_if->clauses); free (do_if); return true; } /* Breaks out of a DO IF construct. */ static int break_trns_proc (void *do_if_, struct ccase **c UNUSED, casenumber case_num UNUSED) { struct do_if_trns *do_if = do_if_; return do_if->past_END_IF_index; } /* DO IF control structure class definition. */ static const struct ctl_class do_if_class = { "DO IF", "END IF", close_do_if, }; pspp-1.0.1/src/language/control/loop.c0000644000175000017500000002704313146355723014602 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/control/control-stack.h" #include "data/case.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/settings.h" #include "data/transformations.h" #include "data/variable.h" #include "language/command.h" #include "language/expressions/public.h" #include "language/lexer/lexer.h" #include "libpspp/compiler.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* LOOP outputs a transformation that is executed only on the first pass through the loop. On this trip, it initializes for the first pass by resetting the pass number, setting up the indexing clause, and testing the LOOP IF clause. If the loop is not to be entered at all, it jumps forward just past the END LOOP transformation; otherwise, it continues to the transformation following LOOP. END LOOP outputs a transformation that executes at the end of each trip through the loop. It checks the END LOOP IF clause, then updates the pass number, increments the indexing clause, and tests the LOOP IF clause. If another pass through the loop is due, it jumps backward to just after the LOOP transformation; otherwise, it continues to the transformation following END LOOP. */ struct loop_trns { struct pool *pool; struct dataset *ds; /* Iteration limit. */ int max_pass_count; /* Maximum number of passes (-1=unlimited). */ int pass; /* Number of passes through the loop so far. */ /* a=a TO b [BY c]. */ struct variable *index_var; /* Index variable. */ struct expression *first_expr; /* Starting index. */ struct expression *by_expr; /* Index increment (default 1.0 if null). */ struct expression *last_expr; /* Terminal index. */ double cur, by, last; /* Current value, increment, last value. */ /* IF condition for LOOP or END LOOP. */ struct expression *loop_condition; struct expression *end_loop_condition; /* Transformation indexes. */ int past_LOOP_index; /* Just past LOOP transformation. */ int past_END_LOOP_index; /* Just past END LOOP transformation. */ }; static const struct ctl_class loop_class; static trns_finalize_func loop_trns_finalize; static trns_proc_func loop_trns_proc, end_loop_trns_proc, break_trns_proc; static trns_free_func loop_trns_free; static struct loop_trns *create_loop_trns (struct dataset *); static bool parse_if_clause (struct lexer *, struct loop_trns *, struct expression **); static bool parse_index_clause (struct dataset *, struct lexer *, struct loop_trns *, bool *created_index_var); static void close_loop (void *); /* LOOP. */ /* Parses LOOP. */ int cmd_loop (struct lexer *lexer, struct dataset *ds) { struct loop_trns *loop; bool created_index_var = false; bool ok = true; loop = create_loop_trns (ds); while (lex_token (lexer) != T_ENDCMD && ok) { if (lex_match_id (lexer, "IF")) ok = parse_if_clause (lexer, loop, &loop->loop_condition); else ok = parse_index_clause (ds, lexer, loop, &created_index_var); } /* Clean up if necessary. */ if (!ok) { loop->max_pass_count = 0; if (loop->index_var != NULL && created_index_var) { dict_delete_var (dataset_dict (ds), loop->index_var); loop->index_var = NULL; } } return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; } /* Parses END LOOP. */ int cmd_end_loop (struct lexer *lexer, struct dataset *ds) { struct loop_trns *loop; bool ok = true; loop = ctl_stack_top (&loop_class); if (loop == NULL) return CMD_CASCADING_FAILURE; assert (loop->ds == ds); /* Parse syntax. */ if (lex_match_id (lexer, "IF")) ok = parse_if_clause (lexer, loop, &loop->end_loop_condition); if (ok) ok = lex_end_of_command (lexer) == CMD_SUCCESS; if (!ok) loop->max_pass_count = 0; ctl_stack_pop (loop); return ok ? CMD_SUCCESS : CMD_FAILURE; } /* Parses BREAK. */ int cmd_break (struct lexer *lexer UNUSED, struct dataset *ds) { struct ctl_stmt *loop = ctl_stack_search (&loop_class); if (loop == NULL) return CMD_CASCADING_FAILURE; add_transformation (ds, break_trns_proc, NULL, loop); return CMD_SUCCESS; } /* Closes a LOOP construct by emitting the END LOOP transformation and finalizing its members appropriately. */ static void close_loop (void *loop_) { struct loop_trns *loop = loop_; add_transformation (loop->ds, end_loop_trns_proc, NULL, loop); loop->past_END_LOOP_index = next_transformation (loop->ds); /* If there's nothing else limiting the number of loops, use MXLOOPS as a limit. */ if (loop->max_pass_count == -1 && loop->index_var == NULL && loop->loop_condition == NULL && loop->end_loop_condition == NULL) loop->max_pass_count = settings_get_mxloops (); } /* Parses an IF clause for LOOP or END LOOP and stores the resulting expression to *CONDITION. Returns true if successful, false on failure. */ static bool parse_if_clause (struct lexer *lexer, struct loop_trns *loop, struct expression **condition) { if (*condition != NULL) { lex_sbc_only_once ("IF"); return false; } *condition = expr_parse_pool (lexer, loop->pool, loop->ds, EXPR_BOOLEAN); return *condition != NULL; } /* Parses an indexing clause into LOOP. Stores true in *CREATED_INDEX_VAR if the index clause created a new variable, false otherwise. Returns true if successful, false on failure. */ static bool parse_index_clause (struct dataset *ds, struct lexer *lexer, struct loop_trns *loop, bool *created_index_var) { if (loop->index_var != NULL) { msg (SE, _("Only one index clause may be specified.")); return false; } if (lex_token (lexer) != T_ID) { lex_error (lexer, NULL); return false; } loop->index_var = dict_lookup_var (dataset_dict (ds), lex_tokcstr (lexer)); if (loop->index_var != NULL) *created_index_var = false; else { loop->index_var = dict_create_var_assert (dataset_dict (ds), lex_tokcstr (lexer), 0); *created_index_var = true; } lex_get (lexer); if (!lex_force_match (lexer, T_EQUALS)) return false; loop->first_expr = expr_parse_pool (lexer, loop->pool, loop->ds, EXPR_NUMBER); if (loop->first_expr == NULL) return false; for (;;) { struct expression **e; if (lex_match (lexer, T_TO)) e = &loop->last_expr; else if (lex_match (lexer, T_BY)) e = &loop->by_expr; else break; if (*e != NULL) { lex_sbc_only_once (e == &loop->last_expr ? "TO" : "BY"); return false; } *e = expr_parse_pool (lexer, loop->pool, loop->ds, EXPR_NUMBER); if (*e == NULL) return false; } if (loop->last_expr == NULL) { lex_sbc_missing ("TO"); return false; } if (loop->by_expr == NULL) loop->by = 1.0; return true; } /* Creates, initializes, and returns a new loop_trns. */ static struct loop_trns * create_loop_trns (struct dataset *ds) { struct loop_trns *loop = pool_create_container (struct loop_trns, pool); loop->max_pass_count = -1; loop->pass = 0; loop->index_var = NULL; loop->first_expr = loop->by_expr = loop->last_expr = NULL; loop->loop_condition = loop->end_loop_condition = NULL; loop->ds = ds; add_transformation_with_finalizer (ds, loop_trns_finalize, loop_trns_proc, loop_trns_free, loop); loop->past_LOOP_index = next_transformation (ds); ctl_stack_push (&loop_class, loop); return loop; } /* Finalizes LOOP by clearing the control stack, thus ensuring that all open LOOPs are closed. */ static void loop_trns_finalize (void *do_if_ UNUSED) { /* This will be called multiple times if multiple LOOPs were executed, which is slightly unclean, but at least it's idempotent. */ ctl_stack_clear (); } /* Sets up LOOP for the first pass. */ static int loop_trns_proc (void *loop_, struct ccase **c, casenumber case_num) { struct loop_trns *loop = loop_; if (loop->index_var != NULL) { /* Evaluate loop index expressions. */ loop->cur = expr_evaluate_num (loop->first_expr, *c, case_num); if (loop->by_expr != NULL) loop->by = expr_evaluate_num (loop->by_expr, *c, case_num); loop->last = expr_evaluate_num (loop->last_expr, *c, case_num); /* Even if the loop is never entered, set the index variable to the initial value. */ *c = case_unshare (*c); case_data_rw (*c, loop->index_var)->f = loop->cur; /* Throw out pathological cases. */ if (!isfinite (loop->cur) || !isfinite (loop->by) || !isfinite (loop->last) || loop->by == 0.0 || (loop->by > 0.0 && loop->cur > loop->last) || (loop->by < 0.0 && loop->cur < loop->last)) goto zero_pass; } /* Initialize pass count. */ loop->pass = 0; if (loop->max_pass_count >= 0 && loop->pass >= loop->max_pass_count) goto zero_pass; /* Check condition. */ if (loop->loop_condition != NULL && expr_evaluate_num (loop->loop_condition, *c, case_num) != 1.0) goto zero_pass; return loop->past_LOOP_index; zero_pass: return loop->past_END_LOOP_index; } /* Frees LOOP. */ static bool loop_trns_free (void *loop_) { struct loop_trns *loop = loop_; pool_destroy (loop->pool); return true; } /* Finishes a pass through the loop and starts the next. */ static int end_loop_trns_proc (void *loop_, struct ccase **c, casenumber case_num UNUSED) { struct loop_trns *loop = loop_; if (loop->end_loop_condition != NULL && expr_evaluate_num (loop->end_loop_condition, *c, case_num) != 0.0) goto break_out; /* MXLOOPS limiter. */ if (loop->max_pass_count >= 0 && ++loop->pass >= loop->max_pass_count) goto break_out; /* Indexing clause limiter: counting downward. */ if (loop->index_var != NULL) { loop->cur += loop->by; if ((loop->by > 0.0 && loop->cur > loop->last) || (loop->by < 0.0 && loop->cur < loop->last)) goto break_out; *c = case_unshare (*c); case_data_rw (*c, loop->index_var)->f = loop->cur; } if (loop->loop_condition != NULL && expr_evaluate_num (loop->loop_condition, *c, case_num) != 1.0) goto break_out; return loop->past_LOOP_index; break_out: return loop->past_END_LOOP_index; } /* Executes BREAK. */ static int break_trns_proc (void *loop_, struct ccase **c UNUSED, casenumber case_num UNUSED) { struct loop_trns *loop = loop_; return loop->past_END_LOOP_index; } /* LOOP control structure class definition. */ static const struct ctl_class loop_class = { "LOOP", "END LOOP", close_loop, }; pspp-1.0.1/src/language/control/temporary.c0000644000175000017500000000303712470445540015644 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/transformations.h" #include "data/value-labels.h" #include "data/variable.h" #include "language/command.h" #include "language/control/control-stack.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Parses the TEMPORARY command. */ int cmd_temporary (struct lexer *lexer UNUSED, struct dataset *ds) { if (!proc_in_temporary_transformations (ds)) proc_start_temporary_transformations (ds); else msg (SE, _("This command may only appear once between " "procedures and procedure-like commands.")); return CMD_SUCCESS; } pspp-1.0.1/src/language/control/repeat.c0000644000175000017500000002644012611724427015106 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/settings.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/segment.h" #include "language/lexer/token.h" #include "language/lexer/variable-parser.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/hash-functions.h" #include "libpspp/hmap.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "libpspp/misc.h" #include "gl/ftoastr.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct dummy_var { struct hmap_node hmap_node; char *name; char **values; size_t n_values; }; static bool parse_specification (struct lexer *, struct dictionary *, struct hmap *dummies); static bool parse_commands (struct lexer *, struct hmap *dummies); static void destroy_dummies (struct hmap *dummies); static bool parse_ids (struct lexer *, const struct dictionary *, struct dummy_var *); static bool parse_numbers (struct lexer *, struct dummy_var *); static bool parse_strings (struct lexer *, struct dummy_var *); int cmd_do_repeat (struct lexer *lexer, struct dataset *ds) { struct hmap dummies; bool ok; if (!parse_specification (lexer, dataset_dict (ds), &dummies)) return CMD_CASCADING_FAILURE; ok = parse_commands (lexer, &dummies); destroy_dummies (&dummies); return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; } static unsigned int hash_dummy (const char *name, size_t name_len) { return utf8_hash_case_bytes (name, name_len, 0); } static const struct dummy_var * find_dummy_var (struct hmap *hmap, const char *name, size_t name_len) { const struct dummy_var *dv; HMAP_FOR_EACH_WITH_HASH (dv, struct dummy_var, hmap_node, hash_dummy (name, name_len), hmap) if (utf8_strcasecmp (dv->name, name)) return dv; return NULL; } /* Parses the whole DO REPEAT command specification. Returns success. */ static bool parse_specification (struct lexer *lexer, struct dictionary *dict, struct hmap *dummies) { struct dummy_var *first_dv = NULL; hmap_init (dummies); do { struct dummy_var *dv; const char *name; bool ok; /* Get a stand-in variable name and make sure it's unique. */ if (!lex_force_id (lexer)) goto error; name = lex_tokcstr (lexer); if (dict_lookup_var (dict, name)) msg (SW, _("Dummy variable name `%s' hides dictionary variable `%s'."), name, name); if (find_dummy_var (dummies, name, strlen (name))) { msg (SE, _("Dummy variable name `%s' is given twice."), name); goto error; } /* Make a new macro. */ dv = xmalloc (sizeof *dv); dv->name = xstrdup (name); dv->values = NULL; dv->n_values = 0; hmap_insert (dummies, &dv->hmap_node, hash_dummy (name, strlen (name))); /* Skip equals sign. */ lex_get (lexer); if (!lex_force_match (lexer, T_EQUALS)) goto error; /* Get the details of the variable's possible values. */ if (lex_token (lexer) == T_ID || lex_token (lexer) == T_ALL) ok = parse_ids (lexer, dict, dv); else if (lex_is_number (lexer)) ok = parse_numbers (lexer, dv); else if (lex_is_string (lexer)) ok = parse_strings (lexer, dv); else { lex_error (lexer, NULL); goto error; } if (!ok) goto error; assert (dv->n_values > 0); if (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD) { lex_error (lexer, NULL); goto error; } /* If this is the first variable then it defines how many replacements there must be; otherwise enforce this number of replacements. */ if (first_dv == NULL) first_dv = dv; else if (first_dv->n_values != dv->n_values) { msg (SE, _("Dummy variable `%s' had %zu substitutions, so `%s' must " "also, but %zu were specified."), first_dv->name, first_dv->n_values, dv->name, dv->n_values); goto error; } lex_match (lexer, T_SLASH); } while (!lex_match (lexer, T_ENDCMD)); while (lex_match (lexer, T_ENDCMD)) continue; return true; error: destroy_dummies (dummies); return false; } static size_t count_values (struct hmap *dummies) { const struct dummy_var *dv; dv = HMAP_FIRST (struct dummy_var, hmap_node, dummies); return dv->n_values; } static void do_parse_commands (struct substring s, enum segmenter_mode mode, struct hmap *dummies, struct string *outputs, size_t n_outputs) { struct segmenter segmenter; segmenter_init (&segmenter, mode); while (!ss_is_empty (s)) { enum segment_type type; int n; n = segmenter_push (&segmenter, s.string, s.length, &type); assert (n >= 0); if (type == SEG_DO_REPEAT_COMMAND) { for (;;) { int k; k = segmenter_push (&segmenter, s.string + n, s.length - n, &type); if (type != SEG_NEWLINE && type != SEG_DO_REPEAT_COMMAND) break; n += k; } do_parse_commands (ss_head (s, n), mode, dummies, outputs, n_outputs); } else if (type != SEG_END) { const struct dummy_var *dv; size_t i; dv = (type == SEG_IDENTIFIER ? find_dummy_var (dummies, s.string, n) : NULL); for (i = 0; i < n_outputs; i++) if (dv != NULL) ds_put_cstr (&outputs[i], dv->values[i]); else ds_put_substring (&outputs[i], ss_head (s, n)); } ss_advance (&s, n); } } static bool parse_commands (struct lexer *lexer, struct hmap *dummies) { enum lex_syntax_mode syntax_mode; enum segmenter_mode mode; struct string *outputs; struct string input; size_t n_values; char *file_name; int line_number; bool ok; size_t i; if (lex_get_file_name (lexer) != NULL) file_name = xstrdup (lex_get_file_name (lexer)); else file_name = NULL; line_number = lex_get_first_line_number (lexer, 0); ds_init_empty (&input); while (lex_is_string (lexer)) { ds_put_substring (&input, lex_tokss (lexer)); ds_put_byte (&input, '\n'); lex_get (lexer); } if (ds_is_empty (&input)) ds_put_byte (&input, '\n'); ds_put_byte (&input, '\0'); n_values = count_values (dummies); outputs = xmalloc (n_values * sizeof *outputs); for (i = 0; i < n_values; i++) ds_init_empty (&outputs[i]); syntax_mode = lex_get_syntax_mode (lexer); if (syntax_mode == LEX_SYNTAX_AUTO) mode = SEG_MODE_AUTO; else if (syntax_mode == LEX_SYNTAX_INTERACTIVE) mode = SEG_MODE_INTERACTIVE; else if (syntax_mode == LEX_SYNTAX_BATCH) mode = SEG_MODE_BATCH; else NOT_REACHED (); do_parse_commands (ds_ss (&input), mode, dummies, outputs, n_values); ds_destroy (&input); while (lex_match (lexer, T_ENDCMD)) continue; ok = (lex_force_match_id (lexer, "END") && lex_force_match_id (lexer, "REPEAT")); if (ok) lex_match_id (lexer, "PRINT"); /* XXX */ lex_discard_rest_of_command (lexer); for (i = 0; i < n_values; i++) { struct string *output = &outputs[n_values - i - 1]; const char *encoding = lex_get_encoding (lexer); struct lex_reader *reader = lex_reader_for_substring_nocopy (ds_ss (output), encoding); lex_reader_set_file_name (reader, file_name); reader->line_number = line_number; lex_include (lexer, reader); } free (file_name); free (outputs); return ok; } static void destroy_dummies (struct hmap *dummies) { struct dummy_var *dv, *next; HMAP_FOR_EACH_SAFE (dv, next, struct dummy_var, hmap_node, dummies) { size_t i; hmap_delete (dummies, &dv->hmap_node); free (dv->name); for (i = 0; i < dv->n_values; i++) free (dv->values[i]); free (dv->values); free (dv); } hmap_destroy (dummies); } /* Parses a set of ids for DO REPEAT. */ static bool parse_ids (struct lexer *lexer, const struct dictionary *dict, struct dummy_var *dv) { return parse_mixed_vars (lexer, dict, &dv->values, &dv->n_values, PV_NONE); } /* Adds REPLACEMENT to MACRO's list of replacements, which has *USED elements and has room for *ALLOCATED. Allocates memory from POOL. */ static void add_replacement (struct dummy_var *dv, char *value, size_t *allocated) { if (dv->n_values == *allocated) dv->values = x2nrealloc (dv->values, allocated, sizeof *dv->values); dv->values[dv->n_values++] = value; } /* Parses a list or range of numbers for DO REPEAT. */ static bool parse_numbers (struct lexer *lexer, struct dummy_var *dv) { size_t allocated = 0; do { if (!lex_force_num (lexer)) return false; if (lex_next_token (lexer, 1) == T_TO) { long int a, b; long int i; if (!lex_is_integer (lexer)) { msg (SE, _("Ranges may only have integer bounds.")); return false; } a = lex_integer (lexer); lex_get (lexer); lex_get (lexer); if (!lex_force_int (lexer)) return false; b = lex_integer (lexer); if (b < a) { msg (SE, _("%ld TO %ld is an invalid range."), a, b); return false; } lex_get (lexer); for (i = a; i <= b; i++) add_replacement (dv, xasprintf ("%ld", i), &allocated); } else { char s[DBL_BUFSIZE_BOUND]; c_dtoastr (s, sizeof s, 0, 0, lex_number (lexer)); add_replacement (dv, xstrdup (s), &allocated); lex_get (lexer); } lex_match (lexer, T_COMMA); } while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD); return true; } /* Parses a list of strings for DO REPEAT. */ static bool parse_strings (struct lexer *lexer, struct dummy_var *dv) { size_t allocated = 0; do { if (!lex_force_string (lexer)) { return false; } add_replacement (dv, token_to_string (lex_next (lexer, 0)), &allocated); lex_get (lexer); lex_match (lexer, T_COMMA); } while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD); return true; } int cmd_end_repeat (struct lexer *lexer UNUSED, struct dataset *ds UNUSED) { msg (SE, _("No matching %s."), "DO REPEAT"); return CMD_CASCADING_FAILURE; } pspp-1.0.1/src/language/control/control-stack.h0000644000175000017500000000314512470445540016412 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef CTL_STACK_H #define CTL_STACK_H 1 #include /* The following #include avoids a potential problem when Gnulib substitutes * for close() by putting "#define close rpl_close" into , by * ensuring that every source file that includes this one sees the #define.. * (It would probably be better to rename the 'close' member of struct * ctl_class.) */ #include struct ctl_class { const char *start_name; /* e.g. LOOP. */ const char *end_name; /* e.g. END LOOP. */ void (*close) (void *); /* Closes the control structure. */ }; void ctl_stack_clear (void); void ctl_stack_push (const struct ctl_class *, void *private); void *ctl_stack_top (const struct ctl_class *); void *ctl_stack_search (const struct ctl_class *); void ctl_stack_pop (void *); bool ctl_stack_is_empty (void); #endif /* ctl_stack.h */ pspp-1.0.1/src/language/control/automake.mk0000644000175000017500000000204013137223525015604 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- language_control_sources = \ src/language/control/control-stack.c \ src/language/control/control-stack.h \ src/language/control/do-if.c \ src/language/control/loop.c \ src/language/control/repeat.c \ src/language/control/temporary.c pspp-1.0.1/src/language/dictionary/0000755000175000017500000000000013150620333014207 500000000000000pspp-1.0.1/src/language/dictionary/rename-variables.c0000644000175000017500000000604513137223525017524 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011, 2015, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* The code for this function is very similar to the code for the RENAME subcommand of MODIFY VARS. */ int cmd_rename_variables (struct lexer *lexer, struct dataset *ds) { struct variable **vars_to_be_renamed = NULL; size_t n_vars_to_be_renamed = 0; char **new_names = NULL; size_t n_new_names = 0; char *err_name; int status = CMD_CASCADING_FAILURE; if (proc_make_temporary_transformations_permanent (ds)) msg (SE, _("%s may not be used after %s. " "Temporary transformations will be made permanent."), "RENAME VARS", "TEMPORARY"); do { int opts = PV_APPEND | PV_NO_DUPLICATE; if (!lex_match (lexer, T_LPAREN)) opts |= PV_SINGLE; if (!parse_variables (lexer, dataset_dict (ds), &vars_to_be_renamed, &n_vars_to_be_renamed, opts)) { goto lossage; } if (!lex_force_match (lexer, T_EQUALS)) { goto lossage; } if (!parse_DATA_LIST_vars (lexer, dataset_dict (ds), &new_names, &n_new_names, opts)) { goto lossage; } if (n_new_names != n_vars_to_be_renamed) { msg (SE, _("Differing number of variables in old name list " "(%zu) and in new name list (%zu)."), n_vars_to_be_renamed, n_new_names); goto lossage; } if (!(opts & PV_SINGLE) && !lex_force_match (lexer, T_RPAREN)) { goto lossage; } } while (lex_token (lexer) != T_ENDCMD); if (!dict_rename_vars (dataset_dict (ds), vars_to_be_renamed, new_names, n_new_names, &err_name)) { msg (SE, _("Renaming would duplicate variable name %s."), err_name); goto lossage; } status = CMD_SUCCESS; lossage: free (vars_to_be_renamed); if (new_names != NULL) { size_t i; for (i = 0; i < n_new_names; ++i) free (new_names[i]); free (new_names); } return status; } pspp-1.0.1/src/language/dictionary/weight.c0000644000175000017500000000341612470243700015571 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gettext.h" #define _(msgid) gettext (msgid) int cmd_weight (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); if (lex_match_id (lexer, "OFF")) dict_set_weight (dataset_dict (ds), NULL); else { struct variable *v; lex_match (lexer, T_BY); v = parse_variable (lexer, dict); if (!v) return CMD_CASCADING_FAILURE; if (var_is_alpha (v)) { msg (SE, _("The weighting variable must be numeric.")); return CMD_CASCADING_FAILURE; } if (dict_class_from_id (var_get_name (v)) == DC_SCRATCH) { msg (SE, _("The weighting variable may not be scratch.")); return CMD_CASCADING_FAILURE; } dict_set_weight (dict, v); } return CMD_SUCCESS; } pspp-1.0.1/src/language/dictionary/numeric.c0000644000175000017500000001127012523704223015742 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/variable.h" #include "data/format.h" #include "language/command.h" #include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/assertion.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Parses the NUMERIC command. */ int cmd_numeric (struct lexer *lexer, struct dataset *ds) { size_t i; /* Names of variables to create. */ char **v; size_t nv; do { /* Format spec for variables to create. */ struct fmt_spec f; if (!parse_DATA_LIST_vars (lexer, dataset_dict (ds), &v, &nv, PV_NO_DUPLICATE)) return CMD_FAILURE; /* Get the optional format specification. */ if (lex_match (lexer, T_LPAREN)) { if (!parse_format_specifier (lexer, &f)) goto fail; if ( ! fmt_check_output (&f)) goto fail; if (fmt_is_string (f.type)) { char str[FMT_STRING_LEN_MAX + 1]; msg (SE, _("Format type %s may not be used with a numeric " "variable."), fmt_to_string (&f, str)); goto fail; } if (!lex_match (lexer, T_RPAREN)) { lex_error_expecting (lexer, "`)'", NULL_SENTINEL); goto fail; } } else f = var_default_formats (0); /* Create each variable. */ for (i = 0; i < nv; i++) { struct variable *new_var = dict_create_var (dataset_dict (ds), v[i], 0); if (!new_var) msg (SE, _("There is already a variable named %s."), v[i]); else var_set_both_formats (new_var, &f); } /* Clean up. */ for (i = 0; i < nv; i++) free (v[i]); free (v); } while (lex_match (lexer, T_SLASH)); return CMD_SUCCESS; /* If we have an error at a point where cleanup is required, flow-of-control comes here. */ fail: for (i = 0; i < nv; i++) free (v[i]); free (v); return CMD_FAILURE; } /* Parses the STRING command. */ int cmd_string (struct lexer *lexer, struct dataset *ds) { size_t i; /* Names of variables to create. */ char **v; size_t nv; /* Format spec for variables to create. */ struct fmt_spec f; /* Width of variables to create. */ int width; do { if (!parse_DATA_LIST_vars (lexer, dataset_dict (ds), &v, &nv, PV_NO_DUPLICATE)) return CMD_FAILURE; if (!lex_force_match (lexer, T_LPAREN) || !parse_format_specifier (lexer, &f) || !lex_force_match (lexer, T_RPAREN)) goto fail; if (!fmt_is_string (f.type)) { char str[FMT_STRING_LEN_MAX + 1]; msg (SE, _("Format type %s may not be used with a string " "variable."), fmt_to_string (&f, str)); goto fail; } if (!fmt_check_output (&f)) goto fail; width = fmt_var_width (&f); /* Create each variable. */ for (i = 0; i < nv; i++) { struct variable *new_var = dict_create_var (dataset_dict (ds), v[i], width); if (!new_var) msg (SE, _("There is already a variable named %s."), v[i]); else var_set_both_formats (new_var, &f); } /* Clean up. */ for (i = 0; i < nv; i++) free (v[i]); free (v); } while (lex_match (lexer, T_SLASH)); return CMD_SUCCESS; /* If we have an error at a point where cleanup is required, flow-of-control comes here. */ fail: for (i = 0; i < nv; i++) free (v[i]); free (v); return CMD_FAILURE; } /* Parses the LEAVE command. */ int cmd_leave (struct lexer *lexer, struct dataset *ds) { struct variable **v; size_t nv; size_t i; if (!parse_variables (lexer, dataset_dict (ds), &v, &nv, PV_NONE)) return CMD_CASCADING_FAILURE; for (i = 0; i < nv; i++) var_set_leave (v[i], true); free (v); return CMD_SUCCESS; } pspp-1.0.1/src/language/dictionary/split-file.h0000644000175000017500000000160212470242642016356 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SPLIT_FILE_H #define SPLIT_FILE_H 1 void output_split_file_values (const struct dataset *ds, const struct ccase *); #endif /* split-file.h */ pspp-1.0.1/src/language/dictionary/missing-values.c0000644000175000017500000001313212661775510017257 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2013, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/data-in.h" #include "data/dictionary.h" #include "data/dataset.h" #include "data/format.h" #include "data/missing-values.h" #include "data/value.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gettext.h" #define _(msgid) gettext (msgid) int cmd_missing_values (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); struct variable **v = NULL; size_t nv; bool ok = true; while (lex_token (lexer) != T_ENDCMD) { size_t i; if (!parse_variables (lexer, dict, &v, &nv, PV_NONE)) goto error; if (!lex_force_match (lexer, T_LPAREN)) goto error; for (i = 0; i < nv; i++) var_clear_missing_values (v[i]); if (!lex_match (lexer, T_RPAREN)) { struct missing_values mv; for (i = 0; i < nv; i++) if (var_get_type (v[i]) != var_get_type (v[0])) { const struct variable *n = var_is_numeric (v[0]) ? v[0] : v[i]; const struct variable *s = var_is_numeric (v[0]) ? v[i] : v[0]; msg (SE, _("Cannot mix numeric variables (e.g. %s) and " "string variables (e.g. %s) within a single list."), var_get_name (n), var_get_name (s)); goto error; } if (var_is_numeric (v[0])) { mv_init (&mv, 0); while (!lex_match (lexer, T_RPAREN)) { enum fmt_type type = var_get_print_format (v[0])->type; double x, y; if (!parse_num_range (lexer, &x, &y, &type)) goto error; if (!(x == y ? mv_add_num (&mv, x) : mv_add_range (&mv, x, y))) { msg (SE, _("Too many numeric missing values. At most " "three individual values or one value and " "one range are allowed.")); ok = false; } lex_match (lexer, T_COMMA); } } else { const char *encoding = dict_get_encoding (dict); mv_init (&mv, MV_MAX_STRING); while (!lex_match (lexer, T_RPAREN)) { const char *utf8_s; size_t utf8_trunc_len; size_t utf8_len; char *raw_s; if (!lex_force_string (lexer)) { ok = false; break; } /* Truncate the string to fit in 8 bytes in the dictionary encoding. */ utf8_s = lex_tokcstr (lexer); utf8_len = ss_length (lex_tokss (lexer)); utf8_trunc_len = utf8_encoding_trunc_len (utf8_s, encoding, MV_MAX_STRING); if (utf8_trunc_len < utf8_len) msg (SE, _("Truncating missing value to maximum " "acceptable length (%d bytes)."), MV_MAX_STRING); /* Recode to dictionary encoding and add. */ raw_s = recode_string (encoding, "UTF-8", utf8_s, utf8_trunc_len); if (!mv_add_str (&mv, CHAR_CAST (const uint8_t *, raw_s), strlen (raw_s))) { msg (SE, _("Too many string missing values. " "At most three individual values are allowed.")); ok = false; } free (raw_s); lex_get (lexer); lex_match (lexer, T_COMMA); } } for (i = 0; i < nv; i++) { if (mv_is_resizable (&mv, var_get_width (v[i]))) var_set_missing_values (v[i], &mv); else { msg (SE, _("Missing values provided are too long to assign " "to variable of width %d."), var_get_width (v[i])); ok = false; } } mv_destroy (&mv); } lex_match (lexer, T_SLASH); free (v); v = NULL; } free (v); return ok ? CMD_SUCCESS : CMD_FAILURE; error: free (v); return CMD_FAILURE; } pspp-1.0.1/src/language/dictionary/attributes.c0000644000175000017500000001335513137223525016477 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/attributes.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) static enum cmd_result parse_attributes (struct lexer *, const char *dict_encoding, struct attrset **, size_t n); /* Parses the DATAFILE ATTRIBUTE command. */ int cmd_datafile_attribute (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); struct attrset *set = dict_get_attributes (dict); return parse_attributes (lexer, dict_get_encoding (dict), &set, 1); } /* Parses the VARIABLE ATTRIBUTE command. */ int cmd_variable_attribute (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); const char *dict_encoding = dict_get_encoding (dict); do { struct variable **vars; struct attrset **sets; size_t n_vars, i; bool ok; if (!lex_force_match_id (lexer, "VARIABLES") || !lex_force_match (lexer, T_EQUALS) || !parse_variables (lexer, dict, &vars, &n_vars, PV_NONE)) return CMD_FAILURE; sets = xmalloc (n_vars * sizeof *sets); for (i = 0; i < n_vars; i++) sets[i] = var_get_attributes (vars[i]); ok = parse_attributes (lexer, dict_encoding, sets, n_vars); free (vars); free (sets); if (!ok) return CMD_FAILURE; } while (lex_match (lexer, T_SLASH)); return CMD_SUCCESS; } /* Parses an attribute name and verifies that it is valid in DICT_ENCODING, optionally followed by an index inside square brackets. Returns the attribute name or NULL if there was a parse error. Stores the index into *INDEX. */ static char * parse_attribute_name (struct lexer *lexer, const char *dict_encoding, size_t *index) { char *name; if (!lex_force_id (lexer) || !id_is_valid (lex_tokcstr (lexer), dict_encoding, true)) return NULL; name = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); if (lex_match (lexer, T_LBRACK)) { if (!lex_force_int (lexer)) goto error; if (lex_integer (lexer) < 1 || lex_integer (lexer) > 65535) { msg (SE, _("Attribute array index must be between 1 and 65535.")); goto error; } *index = lex_integer (lexer); lex_get (lexer); if (!lex_force_match (lexer, T_RBRACK)) goto error; } else *index = 0; return name; error: free (name); return NULL; } static bool add_attribute (struct lexer *lexer, const char *dict_encoding, struct attrset **sets, size_t n) { const char *value; size_t index, i; char *name; name = parse_attribute_name (lexer, dict_encoding, &index); if (name == NULL) return false; if (!lex_force_match (lexer, T_LPAREN) || !lex_force_string (lexer)) { free (name); return false; } value = lex_tokcstr (lexer); for (i = 0; i < n; i++) { struct attribute *attr = attrset_lookup (sets[i], name); if (attr == NULL) { attr = attribute_create (name); attrset_add (sets[i], attr); } attribute_set_value (attr, index ? index - 1 : 0, value); } lex_get (lexer); free (name); return lex_force_match (lexer, T_RPAREN); } static bool delete_attribute (struct lexer *lexer, const char *dict_encoding, struct attrset **sets, size_t n) { size_t index, i; char *name; name = parse_attribute_name (lexer, dict_encoding, &index); if (name == NULL) return false; for (i = 0; i < n; i++) { struct attrset *set = sets[i]; if (index == 0) attrset_delete (set, name); else { struct attribute *attr = attrset_lookup (set, name); if (attr != NULL) { attribute_del_value (attr, index - 1); if (attribute_get_n_values (attr) == 0) attrset_delete (set, name); } } } free (name); return true; } static enum cmd_result parse_attributes (struct lexer *lexer, const char *dict_encoding, struct attrset **sets, size_t n) { enum { UNKNOWN, ADD, DELETE } command = UNKNOWN; do { if (lex_match_phrase (lexer, "ATTRIBUTE=")) command = ADD; else if (lex_match_phrase (lexer, "DELETE=")) command = DELETE; else if (command == UNKNOWN) { lex_error_expecting (lexer, "ATTRIBUTE=", "DELETE=", NULL_SENTINEL); return CMD_FAILURE; } if (!(command == ADD ? add_attribute (lexer, dict_encoding, sets, n) : delete_attribute (lexer, dict_encoding, sets, n))) return CMD_FAILURE; } while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD); return CMD_SUCCESS; } pspp-1.0.1/src/language/dictionary/sys-file-info.c0000644000175000017500000007462513137223525017004 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include "data/any-reader.h" #include "data/attributes.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/format.h" #include "data/missing-values.h" #include "data/value-labels.h" #include "data/variable.h" #include "data/vector.h" #include "language/command.h" #include "language/data-io/file-handle.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/array.h" #include "libpspp/hash-functions.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/string-array.h" #include "output/tab.h" #include "output/text-item.h" #include "output/table-item.h" #include "gl/localcharset.h" #include "gl/intprops.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Information to include in displaying a dictionary. */ enum { DF_DICT_INDEX = 1 << 0, DF_FORMATS = 1 << 1, DF_VALUE_LABELS = 1 << 2, DF_VARIABLE_LABELS = 1 << 3, DF_MISSING_VALUES = 1 << 4, DF_AT_ATTRIBUTES = 1 << 5, /* Attributes whose names begin with @. */ DF_ATTRIBUTES = 1 << 6, /* All other attributes. */ DF_MEASURE = 1 << 7, DF_ROLE = 1 << 8, DF_ALIGNMENT = 1 << 9, DF_WIDTH = 1 << 10, DF_ALL = (1 << 11) - 1 }; static unsigned int dict_display_mask (const struct dictionary *); static struct table *describe_variable (const struct variable *v, int flags); static void report_encodings (const struct file_handle *, struct pool *, char **titles, bool *ids, char **strings, size_t n_strings); /* SYSFILE INFO utility. */ int cmd_sysfile_info (struct lexer *lexer, struct dataset *ds UNUSED) { struct any_reader *any_reader; struct file_handle *h; struct dictionary *d; struct tab_table *t; struct casereader *reader; struct any_read_info info; char *encoding; struct table *table; int r, i; h = NULL; encoding = NULL; for (;;) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "FILE") || lex_is_string (lexer)) { lex_match (lexer, T_EQUALS); fh_unref (h); h = fh_parse (lexer, FH_REF_FILE, NULL); if (h == NULL) goto error; } else if (lex_match_id (lexer, "ENCODING")) { lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto error; free (encoding); encoding = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } else break; } if (h == NULL) { lex_sbc_missing ("FILE"); goto error; } any_reader = any_reader_open (h); if (!any_reader) { free (encoding); return CMD_FAILURE; } if (encoding && !strcasecmp (encoding, "detect")) { char **titles, **strings; struct pool *pool; size_t n_strings; bool *ids; pool = pool_create (); n_strings = any_reader_get_strings (any_reader, pool, &titles, &ids, &strings); any_reader_close (any_reader); report_encodings (h, pool, titles, ids, strings, n_strings); fh_unref (h); pool_destroy (pool); free (encoding); return CMD_SUCCESS; } reader = any_reader_decode (any_reader, encoding, &d, &info); if (!reader) goto error; casereader_destroy (reader); t = tab_create (2, 11 + (info.product_ext != NULL)); r = 0; tab_vline (t, TAL_GAP, 1, 0, 8); tab_text (t, 0, r, TAB_LEFT, _("File:")); tab_text (t, 1, r++, TAB_LEFT, fh_get_file_name (h)); tab_text (t, 0, r, TAB_LEFT, _("Label:")); { const char *label = dict_get_label (d); if (label == NULL) label = _("No label."); tab_text (t, 1, r++, TAB_LEFT, label); } tab_text (t, 0, r, TAB_LEFT, _("Created:")); tab_text_format (t, 1, r++, TAB_LEFT, "%s %s by %s", info.creation_date, info.creation_time, info.product); if (info.product_ext) { tab_text (t, 0, r, TAB_LEFT, _("Product:")); tab_text (t, 1, r++, TAB_LEFT, info.product_ext); } tab_text (t, 0, r, TAB_LEFT, _("Integer Format:")); tab_text (t, 1, r++, TAB_LEFT, info.integer_format == INTEGER_MSB_FIRST ? _("Big Endian") : info.integer_format == INTEGER_LSB_FIRST ? _("Little Endian") : _("Unknown")); tab_text (t, 0, r, TAB_LEFT, _("Real Format:")); tab_text (t, 1, r++, TAB_LEFT, info.float_format == FLOAT_IEEE_DOUBLE_LE ? _("IEEE 754 LE.") : info.float_format == FLOAT_IEEE_DOUBLE_BE ? _("IEEE 754 BE.") : info.float_format == FLOAT_VAX_D ? _("VAX D.") : info.float_format == FLOAT_VAX_G ? _("VAX G.") : info.float_format == FLOAT_Z_LONG ? _("IBM 390 Hex Long.") : _("Unknown")); tab_text (t, 0, r, TAB_LEFT, _("Variables:")); tab_text_format (t, 1, r++, TAB_LEFT, "%zu", dict_get_var_cnt (d)); tab_text (t, 0, r, TAB_LEFT, _("Cases:")); if (info.case_cnt == -1) tab_text (t, 1, r, TAB_LEFT, _("Unknown")); else tab_text_format (t, 1, r, TAB_LEFT, "%ld", (long int) info.case_cnt); r++; tab_text (t, 0, r, TAB_LEFT, _("Type:")); tab_text (t, 1, r++, TAB_LEFT, gettext (info.klass->name)); tab_text (t, 0, r, TAB_LEFT, _("Weight:")); { struct variable *weight_var = dict_get_weight (d); tab_text (t, 1, r++, TAB_LEFT, (weight_var != NULL ? var_get_name (weight_var) : _("Not weighted."))); } tab_text (t, 0, r, TAB_LEFT, _("Compression:")); tab_text_format (t, 1, r++, TAB_LEFT, info.compression == ANY_COMP_NONE ? _("None") : info.compression == ANY_COMP_SIMPLE ? "SAV" : "ZSAV"); tab_text (t, 0, r, TAB_LEFT, _("Encoding:")); tab_text (t, 1, r++, TAB_LEFT, dict_get_encoding (d)); tab_submit (t); t = tab_create (3, 1); tab_headers (t, 0, 0, 1, 0); tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Variable")); tab_text (t, 1, 0, TAB_LEFT | TAT_TITLE, _("Description")); tab_text (t, 2, 0, TAB_LEFT | TAT_TITLE, _("Position")); tab_hline (t, TAL_2, 0, 2, 1); table = &t->table; for (i = 0; i < dict_get_var_cnt (d); i++) table = table_vpaste (table, describe_variable (dict_get_var (d, i), DF_ALL & ~DF_AT_ATTRIBUTES)); table_item_submit (table_item_create (table, NULL /* XXX */, NULL)); dict_destroy (d); fh_unref (h); free (encoding); any_read_info_destroy (&info); return CMD_SUCCESS; error: fh_unref (h); free (encoding); return CMD_FAILURE; } /* DISPLAY utility. */ static void display_macros (void); static void display_documents (const struct dictionary *dict); static void display_variables (const struct variable **, size_t, int); static void display_vectors (const struct dictionary *dict, int sorted); static void display_data_file_attributes (struct attrset *, int flags); int cmd_display (struct lexer *lexer, struct dataset *ds) { /* Whether to sort the list of variables alphabetically. */ int sorted; /* Variables to display. */ size_t n; const struct variable **vl; if (lex_match_id (lexer, "MACROS")) display_macros (); else if (lex_match_id (lexer, "DOCUMENTS")) display_documents (dataset_dict (ds)); else if (lex_match_id (lexer, "FILE")) { if (!lex_force_match_id (lexer, "LABEL")) return CMD_FAILURE; if (dict_get_label (dataset_dict (ds)) == NULL) tab_output_text (TAB_LEFT, _("The active dataset does not have a file label.")); else tab_output_text_format (TAB_LEFT, _("File label: %s"), dict_get_label (dataset_dict (ds))); } else { int flags; sorted = lex_match_id (lexer, "SORTED"); if (lex_match_id (lexer, "VECTORS")) { display_vectors (dataset_dict(ds), sorted); return CMD_SUCCESS; } else if (lex_match_id (lexer, "SCRATCH")) { dict_get_vars (dataset_dict (ds), &vl, &n, DC_ORDINARY); flags = 0; } else { struct subcommand { const char *name; int flags; }; static const struct subcommand subcommands[] = { {"@ATTRIBUTES", DF_ATTRIBUTES | DF_AT_ATTRIBUTES}, {"ATTRIBUTES", DF_ATTRIBUTES}, {"DICTIONARY", DF_ALL & ~DF_AT_ATTRIBUTES}, {"INDEX", DF_DICT_INDEX}, {"LABELS", DF_DICT_INDEX | DF_VARIABLE_LABELS}, {"NAMES", 0}, {"VARIABLES", DF_DICT_INDEX | DF_FORMATS | DF_MISSING_VALUES | DF_MEASURE | DF_ROLE | DF_ALIGNMENT | DF_WIDTH}, {NULL, 0}, }; const struct subcommand *sbc; struct dictionary *dict = dataset_dict (ds); flags = 0; for (sbc = subcommands; sbc->name != NULL; sbc++) if (lex_match_id (lexer, sbc->name)) { flags = sbc->flags & dict_display_mask (dict); break; } lex_match (lexer, T_SLASH); lex_match_id (lexer, "VARIABLES"); lex_match (lexer, T_EQUALS); if (lex_token (lexer) != T_ENDCMD) { if (!parse_variables_const (lexer, dict, &vl, &n, PV_NONE)) { free (vl); return CMD_FAILURE; } } else dict_get_vars (dict, &vl, &n, 0); } if (n > 0) { sort (vl, n, sizeof *vl, (sorted ? compare_var_ptrs_by_name : compare_var_ptrs_by_dict_index), NULL); display_variables (vl, n, flags); } else msg (SW, _("No variables to display.")); free (vl); if (flags & (DF_ATTRIBUTES | DF_AT_ATTRIBUTES)) display_data_file_attributes (dict_get_attributes (dataset_dict (ds)), flags); } return CMD_SUCCESS; } static void display_macros (void) { tab_output_text (TAB_LEFT, _("Macros not supported.")); } static void display_documents (const struct dictionary *dict) { const struct string_array *documents = dict_get_documents (dict); if (string_array_is_empty (documents)) tab_output_text (TAB_LEFT, _("The active dataset dictionary does not " "contain any documents.")); else { size_t i; tab_output_text (TAB_LEFT | TAT_TITLE, _("Documents in the active dataset:")); for (i = 0; i < dict_get_document_line_cnt (dict); i++) tab_output_text (TAB_LEFT | TAB_FIX, dict_get_document_line (dict, i)); } } static int count_columns (int flags) { int nc = 1; if (flags & ~DF_DICT_INDEX) nc++; if (flags & DF_DICT_INDEX) nc++; return nc; } static int position_column (int flags) { int pc = 1; if (flags & ~DF_DICT_INDEX) pc++; return pc; } static void display_variables (const struct variable **vl, size_t n, int flags) { struct tab_table *t; struct table *table; size_t i; int nc; nc = count_columns (flags); t = tab_create (nc, 1); tab_headers (t, 0, 0, 1, 0); tab_hline (t, TAL_2, 0, nc - 1, 1); tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Variable")); if (flags & ~DF_DICT_INDEX) tab_text (t, 1, 0, TAB_LEFT | TAT_TITLE, (flags & ~(DF_DICT_INDEX | DF_VARIABLE_LABELS) ? _("Description") : _("Label"))); if (flags & DF_DICT_INDEX) tab_text (t, position_column (flags), 0, TAB_LEFT | TAT_TITLE, _("Position")); table = &t->table; for (i = 0; i < n; i++) table = table_vpaste (table, describe_variable (vl[i], flags)); table_item_submit (table_item_create (table, NULL /* XXX */, NULL)); } static bool is_at_name (const char *name) { return name[0] == '@' || (name[0] == '$' && name[1] == '@'); } static size_t count_attributes (const struct attrset *set, int flags) { struct attrset_iterator i; struct attribute *attr; size_t n_attrs; n_attrs = 0; for (attr = attrset_first (set, &i); attr != NULL; attr = attrset_next (set, &i)) if (flags & DF_AT_ATTRIBUTES || !is_at_name (attribute_get_name (attr))) n_attrs += attribute_get_n_values (attr); return n_attrs; } static struct table * describe_attributes (const struct attrset *set, int flags) { struct attribute **attrs; struct tab_table *t; size_t n_attrs; size_t i; int r = 1; t = tab_create (2, 1 + count_attributes (set, flags)); tab_headers (t, 0, 0, 1, 0); tab_box (t, TAL_1, TAL_1, -1, TAL_1, 0, 0, tab_nc (t) - 1, tab_nr (t) - 1); tab_hline (t, TAL_1, 0, 1, 1); tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Attribute")); tab_text (t, 1, 0, TAB_LEFT | TAT_TITLE, _("Value")); n_attrs = attrset_count (set); attrs = attrset_sorted (set); for (i = 0; i < n_attrs; i++) { const struct attribute *attr = attrs[i]; const char *name = attribute_get_name (attr); size_t n_values; size_t j; if (!(flags & DF_AT_ATTRIBUTES) && is_at_name (name)) continue; n_values = attribute_get_n_values (attr); for (j = 0; j < n_values; j++) { if (n_values > 1) tab_text_format (t, 0, r, TAB_LEFT, "%s[%zu]", name, j + 1); else tab_text (t, 0, r, TAB_LEFT, name); tab_text (t, 1, r, TAB_LEFT, attribute_get_value (attr, j)); r++; } } free (attrs); return &t->table; } static void display_data_file_attributes (struct attrset *set, int flags) { if (count_attributes (set, flags)) table_item_submit (table_item_create (describe_attributes (set, flags), _("Custom data file attributes."), NULL)); } static struct table * describe_value_labels (const struct variable *var) { const struct val_labs *val_labs = var_get_value_labels (var); size_t n_labels = val_labs_count (val_labs); const struct val_lab **labels; struct tab_table *t; size_t i; t = tab_create (2, n_labels + 1); tab_box (t, TAL_1, TAL_1, -1, TAL_1, 0, 0, tab_nc (t) - 1, tab_nr (t) - 1); tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Value")); tab_text (t, 1, 0, TAB_LEFT | TAT_TITLE, _("Label")); tab_hline (t, TAL_1, 0, 1, 1); tab_vline (t, TAL_1, 1, 0, n_labels); labels = val_labs_sorted (val_labs); for (i = 0; i < n_labels; i++) { const struct val_lab *vl = labels[i]; tab_value (t, 0, i + 1, TAB_NONE, &vl->value, var, NULL); tab_text (t, 1, i + 1, TAB_LEFT, val_lab_get_escaped_label (vl)); } free (labels); return &t->table; } static struct table * describe_variable_details (const struct variable *v, int flags) { struct table *table; struct string s; ds_init_empty (&s); /* Variable label. */ if (flags & DF_VARIABLE_LABELS && var_has_label (v)) { if (flags & ~(DF_DICT_INDEX | DF_VARIABLE_LABELS)) ds_put_format (&s, _("Label: %s\n"), var_get_label (v)); else ds_put_format (&s, "%s\n", var_get_label (v)); } /* Print/write format, or print and write formats. */ if (flags & DF_FORMATS) { const struct fmt_spec *print = var_get_print_format (v); const struct fmt_spec *write = var_get_write_format (v); char str[FMT_STRING_LEN_MAX + 1]; if (fmt_equal (print, write)) ds_put_format (&s, _("Format: %s\n"), fmt_to_string (print, str)); else { ds_put_format (&s, _("Print Format: %s\n"), fmt_to_string (print, str)); ds_put_format (&s, _("Write Format: %s\n"), fmt_to_string (write, str)); } } /* Measurement level, role, display width, alignment. */ if (flags & DF_MEASURE) ds_put_format (&s, _("Measure: %s\n"), measure_to_string (var_get_measure (v))); if (flags & DF_ROLE) ds_put_format (&s, _("Role: %s\n"), var_role_to_string (var_get_role (v))); if (flags & DF_ALIGNMENT) ds_put_format (&s, _("Display Alignment: %s\n"), alignment_to_string (var_get_alignment (v))); if (flags & DF_WIDTH) ds_put_format (&s, _("Display Width: %d\n"), var_get_display_width (v)); /* Missing values if any. */ if (flags & DF_MISSING_VALUES && var_has_missing_values (v)) { const struct missing_values *mv = var_get_missing_values (v); int cnt = 0; int i; ds_put_cstr (&s, _("Missing Values: ")); if (mv_has_range (mv)) { double x, y; mv_get_range (mv, &x, &y); if (x == LOWEST) ds_put_format (&s, "LOWEST THRU %.*g", DBL_DIG + 1, y); else if (y == HIGHEST) ds_put_format (&s, "%.*g THRU HIGHEST", DBL_DIG + 1, x); else ds_put_format (&s, "%.*g THRU %.*g", DBL_DIG + 1, x, DBL_DIG + 1, y); cnt++; } for (i = 0; i < mv_n_values (mv); i++) { const union value *value = mv_get_value (mv, i); if (cnt++ > 0) ds_put_cstr (&s, "; "); if (var_is_numeric (v)) ds_put_format (&s, "%.*g", DBL_DIG + 1, value->f); else { int width = var_get_width (v); int mv_width = MIN (width, MV_MAX_STRING); ds_put_byte (&s, '"'); memcpy (ds_put_uninit (&s, mv_width), value_str (value, width), mv_width); ds_put_byte (&s, '"'); } } ds_put_byte (&s, '\n'); } ds_chomp_byte (&s, '\n'); table = (ds_is_empty (&s) ? NULL : table_from_string (TAB_LEFT, ds_cstr (&s))); ds_destroy (&s); /* Value labels. */ if (flags & DF_VALUE_LABELS && var_has_value_labels (v)) table = table_vpaste (table, table_create_nested (describe_value_labels (v))); if (flags & (DF_ATTRIBUTES | DF_AT_ATTRIBUTES)) { struct attrset *attrs = var_get_attributes (v); if (count_attributes (attrs, flags)) table = table_vpaste ( table, table_create_nested (describe_attributes (attrs, flags))); } return table ? table : table_from_string (TAB_LEFT, ""); } /* Puts a description of variable V into table T starting at row R. The variable will be described in the format given by FLAGS. Returns the next row available for use in the table. */ static struct table * describe_variable (const struct variable *v, int flags) { struct table *table; table = flags & ~DF_DICT_INDEX ? describe_variable_details (v, flags) : NULL; table = table_hpaste (table_from_string (0, var_get_name (v)), table ? table_stomp (table) : NULL); if (flags & DF_DICT_INDEX) { char s[INT_BUFSIZE_BOUND (size_t)]; sprintf (s, "%zu", var_get_dict_index (v) + 1); table = table_hpaste (table, table_from_string (0, s)); } return table; } /* Display a list of vectors. If SORTED is nonzero then they are sorted alphabetically. */ static void display_vectors (const struct dictionary *dict, int sorted) { const struct vector **vl; int i; struct tab_table *t; size_t nvec; size_t nrow; size_t row; nvec = dict_get_vector_cnt (dict); if (nvec == 0) { msg (SW, _("No vectors defined.")); return; } vl = xnmalloc (nvec, sizeof *vl); nrow = 0; for (i = 0; i < nvec; i++) { vl[i] = dict_get_vector (dict, i); nrow += vector_get_var_cnt (vl[i]); } if (sorted) qsort (vl, nvec, sizeof *vl, compare_vector_ptrs_by_name); t = tab_create (4, nrow + 1); tab_headers (t, 0, 0, 1, 0); tab_box (t, TAL_1, TAL_1, -1, -1, 0, 0, 3, nrow); tab_box (t, -1, -1, -1, TAL_1, 0, 0, 3, nrow); tab_hline (t, TAL_2, 0, 3, 1); tab_text (t, 0, 0, TAT_TITLE | TAB_LEFT, _("Vector")); tab_text (t, 1, 0, TAT_TITLE | TAB_LEFT, _("Position")); tab_text (t, 2, 0, TAT_TITLE | TAB_LEFT, _("Variable")); tab_text (t, 3, 0, TAT_TITLE | TAB_LEFT, _("Print Format")); row = 1; for (i = 0; i < nvec; i++) { const struct vector *vec = vl[i]; size_t j; tab_joint_text (t, 0, row, 0, row + vector_get_var_cnt (vec) - 1, TAB_LEFT, vector_get_name (vl[i])); for (j = 0; j < vector_get_var_cnt (vec); j++) { struct variable *var = vector_get_var (vec, j); char fmt_string[FMT_STRING_LEN_MAX + 1]; fmt_to_string (var_get_print_format (var), fmt_string); tab_text_format (t, 1, row, TAB_RIGHT, "%zu", j + 1); tab_text (t, 2, row, TAB_LEFT, var_get_name (var)); tab_text (t, 3, row, TAB_LEFT, fmt_string); row++; } tab_hline (t, TAL_1, 0, 3, row); } tab_submit (t); free (vl); } /* Encoding analysis. */ static const char *encoding_names[] = { /* These encodings are from http://encoding.spec.whatwg.org/, as retrieved February 2014. Encodings not supported by glibc and encodings relevant only to HTML have been removed. */ "utf-8", "windows-1252", "iso-8859-2", "iso-8859-3", "iso-8859-4", "iso-8859-5", "iso-8859-6", "iso-8859-7", "iso-8859-8", "iso-8859-10", "iso-8859-13", "iso-8859-14", "iso-8859-16", "macintosh", "windows-874", "windows-1250", "windows-1251", "windows-1253", "windows-1254", "windows-1255", "windows-1256", "windows-1257", "windows-1258", "koi8-r", "koi8-u", "ibm866", "gb18030", "big5", "euc-jp", "iso-2022-jp", "shift_jis", "euc-kr", /* Added by user request. */ "ibm850", "din_66003", }; #define N_ENCODING_NAMES (sizeof encoding_names / sizeof *encoding_names) struct encoding { uint64_t encodings; char **utf8_strings; unsigned int hash; }; static char ** recode_strings (struct pool *pool, char **strings, bool *ids, size_t n, const char *encoding) { char **utf8_strings; size_t i; utf8_strings = pool_alloc (pool, n * sizeof *utf8_strings); for (i = 0; i < n; i++) { struct substring utf8; int error; error = recode_pedantically ("UTF-8", encoding, ss_cstr (strings[i]), pool, &utf8); if (!error) { ss_rtrim (&utf8, ss_cstr (" ")); utf8.string[utf8.length] = '\0'; if (ids[i] && !id_is_plausible (utf8.string, false)) error = EINVAL; } if (error) return NULL; utf8_strings[i] = utf8.string; } return utf8_strings; } static struct encoding * find_duplicate_encoding (struct encoding *encodings, size_t n_encodings, char **utf8_strings, size_t n_strings, unsigned int hash) { struct encoding *e; for (e = encodings; e < &encodings[n_encodings]; e++) { int i; if (e->hash != hash) goto next_encoding; for (i = 0; i < n_strings; i++) if (strcmp (utf8_strings[i], e->utf8_strings[i])) goto next_encoding; return e; next_encoding:; } return NULL; } static bool all_equal (const struct encoding *encodings, size_t n_encodings, size_t string_idx) { const char *s0; size_t i; s0 = encodings[0].utf8_strings[string_idx]; for (i = 1; i < n_encodings; i++) if (strcmp (s0, encodings[i].utf8_strings[string_idx])) return false; return true; } static int equal_prefix (const struct encoding *encodings, size_t n_encodings, size_t string_idx) { const char *s0; size_t prefix; size_t i; s0 = encodings[0].utf8_strings[string_idx]; prefix = strlen (s0); for (i = 1; i < n_encodings; i++) { const char *si = encodings[i].utf8_strings[string_idx]; size_t j; for (j = 0; j < prefix; j++) if (s0[j] != si[j]) { prefix = j; if (!prefix) return 0; break; } } while (prefix > 0 && s0[prefix - 1] != ' ') prefix--; return prefix; } static int equal_suffix (const struct encoding *encodings, size_t n_encodings, size_t string_idx) { const char *s0; size_t s0_len; size_t suffix; size_t i; s0 = encodings[0].utf8_strings[string_idx]; s0_len = strlen (s0); suffix = s0_len; for (i = 1; i < n_encodings; i++) { const char *si = encodings[i].utf8_strings[string_idx]; size_t si_len = strlen (si); size_t j; if (si_len < suffix) suffix = si_len; for (j = 0; j < suffix; j++) if (s0[s0_len - j - 1] != si[si_len - j - 1]) { suffix = j; if (!suffix) return 0; break; } } while (suffix > 0 && s0[s0_len - suffix] != ' ') suffix--; return suffix; } static void report_encodings (const struct file_handle *h, struct pool *pool, char **titles, bool *ids, char **strings, size_t n_strings) { struct encoding encodings[N_ENCODING_NAMES]; size_t n_encodings, n_unique_strings; size_t i, j; struct tab_table *t; size_t row; n_encodings = 0; for (i = 0; i < N_ENCODING_NAMES; i++) { char **utf8_strings; struct encoding *e; unsigned int hash; utf8_strings = recode_strings (pool, strings, ids, n_strings, encoding_names[i]); if (!utf8_strings) continue; /* Hash utf8_strings. */ hash = 0; for (j = 0; j < n_strings; j++) hash = hash_string (utf8_strings[j], hash); /* If there's a duplicate encoding, just mark it. */ e = find_duplicate_encoding (encodings, n_encodings, utf8_strings, n_strings, hash); if (e) { e->encodings |= UINT64_C (1) << i; continue; } e = &encodings[n_encodings++]; e->encodings = UINT64_C (1) << i; e->utf8_strings = utf8_strings; e->hash = hash; } if (!n_encodings) { msg (SW, _("No valid encodings found.")); return; } t = tab_create (2, n_encodings + 1); tab_title (t, _("Usable encodings for %s."), fh_get_name (h)); tab_caption (t, _("Encodings that can successfully read %s (by specifying " "the encoding name on the GET command's ENCODING " "subcommand). Encodings that yield identical text are " "listed together."), fh_get_name (h)); tab_headers (t, 1, 0, 1, 0); tab_box (t, TAL_1, TAL_1, -1, -1, 0, 0, 1, n_encodings); tab_hline (t, TAL_1, 0, 1, 1); tab_text (t, 0, 0, TAB_RIGHT, "#"); tab_text (t, 1, 0, TAB_LEFT, _("Encodings")); for (i = 0; i < n_encodings; i++) { struct string s; ds_init_empty (&s); for (j = 0; j < 64; j++) if (encodings[i].encodings & (UINT64_C (1) << j)) ds_put_format (&s, "%s, ", encoding_names[j]); ds_chomp (&s, ss_cstr (", ")); tab_text_format (t, 0, i + 1, TAB_RIGHT, "%zu", i + 1); tab_text (t, 1, i + 1, TAB_LEFT, ds_cstr (&s)); ds_destroy (&s); } tab_submit (t); n_unique_strings = 0; for (i = 0; i < n_strings; i++) if (!all_equal (encodings, n_encodings, i)) n_unique_strings++; if (!n_unique_strings) return; t = tab_create (3, (n_encodings * n_unique_strings) + 1); tab_title (t, _("%s encoded text strings."), fh_get_name (h)); tab_caption (t, _("Text strings in the file dictionary that the previously " "listed encodings interpret differently, along with the " "interpretations.")); tab_headers (t, 1, 0, 1, 0); tab_box (t, TAL_1, TAL_1, -1, -1, 0, 0, 2, n_encodings * n_unique_strings); tab_hline (t, TAL_1, 0, 2, 1); tab_text (t, 0, 0, TAB_LEFT, _("Purpose")); tab_text (t, 1, 0, TAB_RIGHT, "#"); tab_text (t, 2, 0, TAB_LEFT, _("Text")); row = 1; for (i = 0; i < n_strings; i++) if (!all_equal (encodings, n_encodings, i)) { int prefix = equal_prefix (encodings, n_encodings, i); int suffix = equal_suffix (encodings, n_encodings, i); tab_joint_text (t, 0, row, 0, row + n_encodings - 1, TAB_LEFT, titles[i]); tab_hline (t, TAL_1, 0, 2, row); for (j = 0; j < n_encodings; j++) { const char *s = encodings[j].utf8_strings[i] + prefix; tab_text_format (t, 1, row, TAB_RIGHT, "%zu", j + 1); if (prefix || suffix) { size_t len = strlen (s) - suffix; struct string entry; ds_init_empty (&entry); if (prefix) ds_put_cstr (&entry, "..."); ds_put_substring (&entry, ss_buffer (s, len)); if (suffix) ds_put_cstr (&entry, "..."); tab_text (t, 2, row, TAB_LEFT, ds_cstr (&entry)); } else tab_text (t, 2, row, TAB_LEFT, s); row++; } } tab_submit (t); } static unsigned int dict_display_mask (const struct dictionary *d) { size_t n_vars = dict_get_var_cnt (d); unsigned int mask; size_t i; mask = DF_ALL & ~(DF_MEASURE | DF_ROLE | DF_ALIGNMENT | DF_WIDTH); for (i = 0; i < n_vars; i++) { const struct variable *v = dict_get_var (d, i); enum val_type val = var_get_type (v); int width = var_get_width (v); if (var_get_measure (v) != var_default_measure (val)) mask |= DF_MEASURE; if (var_get_role (v) != ROLE_INPUT) mask |= DF_ROLE; if (var_get_alignment (v) != var_default_alignment (val)) mask |= DF_ALIGNMENT; if (var_get_display_width (v) != var_default_display_width (width)) mask |= DF_WIDTH; } return mask; } pspp-1.0.1/src/language/dictionary/delete-variables.c0000644000175000017500000000403113137223525017510 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2006, 2007, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "language/command.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Performs DELETE VARIABLES command. */ int cmd_delete_variables (struct lexer *lexer, struct dataset *ds) { struct variable **vars; size_t var_cnt; bool ok; if (proc_make_temporary_transformations_permanent (ds)) msg (SE, _("%s may not be used after %s. " "Temporary transformations will be made permanent."), "DELETE VARIABLES", "TEMPORARY"); if (!parse_variables (lexer, dataset_dict (ds), &vars, &var_cnt, PV_NONE)) goto error; if (var_cnt == dict_get_var_cnt (dataset_dict (ds))) { msg (SE, _("%s may not be used to delete all variables " "from the active dataset dictionary. " "Use %s instead."), "DELETE VARIABLES", "NEW FILE"); goto error; } ok = casereader_destroy (proc_open_filtering (ds, false)); ok = proc_commit (ds) && ok; if (!ok) goto error; dict_delete_vars (dataset_dict (ds), vars, var_cnt); free (vars); return CMD_SUCCESS; error: free (vars); return CMD_CASCADING_FAILURE; } pspp-1.0.1/src/language/dictionary/mrsets.c0000644000175000017500000005010012470434665015623 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "data/data-out.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/mrset.h" #include "data/value-labels.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/assertion.h" #include "libpspp/hmap.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "libpspp/stringi-map.h" #include "libpspp/stringi-set.h" #include "output/tab.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) static bool parse_group (struct lexer *, struct dictionary *, enum mrset_type); static bool parse_delete (struct lexer *, struct dictionary *); static bool parse_display (struct lexer *, struct dictionary *); int cmd_mrsets (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); while (lex_match (lexer, T_SLASH)) { bool ok; if (lex_match_id (lexer, "MDGROUP")) ok = parse_group (lexer, dict, MRSET_MD); else if (lex_match_id (lexer, "MCGROUP")) ok = parse_group (lexer, dict, MRSET_MC); else if (lex_match_id (lexer, "DELETE")) ok = parse_delete (lexer, dict); else if (lex_match_id (lexer, "DISPLAY")) ok = parse_display (lexer, dict); else { ok = false; lex_error (lexer, NULL); } if (!ok) return CMD_FAILURE; } return CMD_SUCCESS; } static bool parse_group (struct lexer *lexer, struct dictionary *dict, enum mrset_type type) { const char *subcommand_name = type == MRSET_MD ? "MDGROUP" : "MCGROUP"; struct mrset *mrset; bool labelsource_varlabel; bool has_value; mrset = xzalloc (sizeof *mrset); mrset->type = type; mrset->cat_source = MRSET_VARLABELS; labelsource_varlabel = false; has_value = false; while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD) { if (lex_match_id (lexer, "NAME")) { if (!lex_force_match (lexer, T_EQUALS) || !lex_force_id (lexer) || !mrset_is_valid_name (lex_tokcstr (lexer), dict_get_encoding (dict), true)) goto error; free (mrset->name); mrset->name = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); } else if (lex_match_id (lexer, "VARIABLES")) { if (!lex_force_match (lexer, T_EQUALS)) goto error; free (mrset->vars); if (!parse_variables (lexer, dict, &mrset->vars, &mrset->n_vars, PV_SAME_TYPE | PV_NO_SCRATCH)) goto error; if (mrset->n_vars < 2) { msg (SE, _("VARIABLES specified only variable %s on %s, but " "at least two variables are required."), var_get_name (mrset->vars[0]), subcommand_name); goto error; } } else if (lex_match_id (lexer, "LABEL")) { if (!lex_force_match (lexer, T_EQUALS) || !lex_force_string (lexer)) goto error; free (mrset->label); mrset->label = ss_xstrdup (lex_tokss (lexer)); lex_get (lexer); } else if (type == MRSET_MD && lex_match_id (lexer, "LABELSOURCE")) { if (!lex_force_match (lexer, T_EQUALS) || !lex_force_match_id (lexer, "VARLABEL")) goto error; labelsource_varlabel = true; } else if (type == MRSET_MD && lex_match_id (lexer, "VALUE")) { if (!lex_force_match (lexer, T_EQUALS)) goto error; has_value = true; if (lex_is_number (lexer)) { if (!lex_is_integer (lexer)) { msg (SE, _("Numeric VALUE must be an integer.")); goto error; } value_destroy (&mrset->counted, mrset->width); mrset->counted.f = lex_integer (lexer); mrset->width = 0; } else if (lex_is_string (lexer)) { size_t width; char *s; s = recode_string (dict_get_encoding (dict), "UTF-8", lex_tokcstr (lexer), -1); width = strlen (s); /* Trim off trailing spaces, but don't trim the string until it's empty because a width of 0 is a numeric type. */ while (width > 1 && s[width - 1] == ' ') width--; value_destroy (&mrset->counted, mrset->width); value_init (&mrset->counted, width); memcpy (value_str_rw (&mrset->counted, width), s, width); mrset->width = width; free (s); } else { lex_error (lexer, NULL); goto error; } lex_get (lexer); } else if (type == MRSET_MD && lex_match_id (lexer, "CATEGORYLABELS")) { if (!lex_force_match (lexer, T_EQUALS)) goto error; if (lex_match_id (lexer, "VARLABELS")) mrset->cat_source = MRSET_VARLABELS; else if (lex_match_id (lexer, "COUNTEDVALUES")) mrset->cat_source = MRSET_COUNTEDVALUES; else { lex_error (lexer, NULL); goto error; } } else { lex_error (lexer, NULL); goto error; } } if (mrset->name == NULL) { lex_spec_missing (lexer, subcommand_name, "NAME"); goto error; } else if (mrset->n_vars == 0) { lex_spec_missing (lexer, subcommand_name, "VARIABLES"); goto error; } if (type == MRSET_MD) { /* Check that VALUE is specified and is valid for the VARIABLES. */ if (!has_value) { lex_spec_missing (lexer, subcommand_name, "VALUE"); goto error; } else if (var_is_alpha (mrset->vars[0])) { if (mrset->width == 0) { msg (SE, _("MDGROUP subcommand for group %s specifies a string " "VALUE, but the variables specified for this group " "are numeric."), mrset->name); goto error; } else { const struct variable *shortest_var; int min_width; size_t i; shortest_var = NULL; min_width = INT_MAX; for (i = 0; i < mrset->n_vars; i++) { int width = var_get_width (mrset->vars[i]); if (width < min_width) { shortest_var = mrset->vars[i]; min_width = width; } } if (mrset->width > min_width) { msg (SE, _("VALUE string on MDGROUP subcommand for group " "%s is %d bytes long, but it must be no longer " "than the narrowest variable in the group, " "which is %s with a width of %d bytes."), mrset->name, mrset->width, var_get_name (shortest_var), min_width); goto error; } } } else { if (mrset->width != 0) { msg (SE, _("MDGROUP subcommand for group %s specifies a string " "VALUE, but the variables specified for this group " "are numeric."), mrset->name); goto error; } } /* Implement LABELSOURCE=VARLABEL. */ if (labelsource_varlabel) { if (mrset->cat_source != MRSET_COUNTEDVALUES) msg (SW, _("MDGROUP subcommand for group %s specifies " "LABELSOURCE=VARLABEL but not " "CATEGORYLABELS=COUNTEDVALUES. " "Ignoring LABELSOURCE."), mrset->name); else if (mrset->label) msg (SW, _("MDGROUP subcommand for group %s specifies both LABEL " "and LABELSOURCE, but only one of these subcommands " "may be used at a time. Ignoring LABELSOURCE."), mrset->name); else { size_t i; mrset->label_from_var_label = true; for (i = 0; mrset->label == NULL && i < mrset->n_vars; i++) { const char *label = var_get_label (mrset->vars[i]); if (label != NULL) { mrset->label = xstrdup (label); break; } } } } /* Warn if categories cannot be distinguished in output. */ if (mrset->cat_source == MRSET_VARLABELS) { struct stringi_map seen; size_t i; stringi_map_init (&seen); for (i = 0; i < mrset->n_vars; i++) { const struct variable *var = mrset->vars[i]; const char *name = var_get_name (var); const char *label = var_get_label (var); if (label != NULL) { const char *other_name = stringi_map_find (&seen, label); if (other_name == NULL) stringi_map_insert (&seen, label, name); else msg (SW, _("Variables %s and %s specified as part of " "multiple dichotomy group %s have the same " "variable label. Categories represented by " "these variables will not be distinguishable " "in output."), other_name, name, mrset->name); } } stringi_map_destroy (&seen); } else { struct stringi_map seen; size_t i; stringi_map_init (&seen); for (i = 0; i < mrset->n_vars; i++) { const struct variable *var = mrset->vars[i]; const char *name = var_get_name (var); const struct val_labs *val_labs; union value value; const char *label; value_clone (&value, &mrset->counted, mrset->width); value_resize (&value, mrset->width, var_get_width (var)); val_labs = var_get_value_labels (var); label = val_labs_find (val_labs, &value); if (label == NULL) msg (SW, _("Variable %s specified as part of multiple " "dichotomy group %s (which has " "CATEGORYLABELS=COUNTEDVALUES) has no value label " "for its counted value. This category will not " "be distinguishable in output."), name, mrset->name); else { const char *other_name = stringi_map_find (&seen, label); if (other_name == NULL) stringi_map_insert (&seen, label, name); else msg (SW, _("Variables %s and %s specified as part of " "multiple dichotomy group %s (which has " "CATEGORYLABELS=COUNTEDVALUES) have the same " "value label for the group's counted " "value. These categories will not be " "distinguishable in output."), other_name, name, mrset->name); } } stringi_map_destroy (&seen); } } else /* MCGROUP. */ { /* Warn if categories cannot be distinguished in output. */ struct category { struct hmap_node hmap_node; union value value; int width; const char *label; const char *var_name; bool warned; }; struct category *c, *next; struct hmap categories; size_t i; hmap_init (&categories); for (i = 0; i < mrset->n_vars; i++) { const struct variable *var = mrset->vars[i]; const char *name = var_get_name (var); int width = var_get_width (var); const struct val_labs *val_labs; const struct val_lab *vl; val_labs = var_get_value_labels (var); for (vl = val_labs_first (val_labs); vl != NULL; vl = val_labs_next (val_labs, vl)) { const union value *value = val_lab_get_value (vl); const char *label = val_lab_get_label (vl); unsigned int hash = value_hash (value, width, 0); HMAP_FOR_EACH_WITH_HASH (c, struct category, hmap_node, hash, &categories) { if (width == c->width && value_equal (value, &c->value, width)) { if (!c->warned && utf8_strcasecmp (c->label, label)) { char *s = data_out (value, var_get_encoding (var), var_get_print_format (var)); c->warned = true; msg (SW, _("Variables specified on MCGROUP should " "have the same categories, but %s and %s " "(and possibly others) in multiple " "category group %s have different " "value labels for value %s."), c->var_name, name, mrset->name, s); free (s); } goto found; } } c = xmalloc (sizeof *c); value_clone (&c->value, value, width); c->width = width; c->label = label; c->var_name = name; c->warned = false; hmap_insert (&categories, &c->hmap_node, hash); found: ; } } HMAP_FOR_EACH_SAFE (c, next, struct category, hmap_node, &categories) { value_destroy (&c->value, c->width); hmap_delete (&categories, &c->hmap_node); free (c); } hmap_destroy (&categories); } dict_add_mrset (dict, mrset); return true; error: mrset_destroy (mrset); return false; } static bool parse_mrset_names (struct lexer *lexer, struct dictionary *dict, struct stringi_set *mrset_names) { if (!lex_force_match_id (lexer, "NAME") || !lex_force_match (lexer, T_EQUALS)) return false; stringi_set_init (mrset_names); if (lex_match (lexer, T_LBRACK)) { while (!lex_match (lexer, T_RBRACK)) { if (!lex_force_id (lexer)) return false; if (dict_lookup_mrset (dict, lex_tokcstr (lexer)) == NULL) { msg (SE, _("No multiple response set named %s."), lex_tokcstr (lexer)); stringi_set_destroy (mrset_names); return false; } stringi_set_insert (mrset_names, lex_tokcstr (lexer)); lex_get (lexer); } } else if (lex_match (lexer, T_ALL)) { size_t n_sets = dict_get_n_mrsets (dict); size_t i; for (i = 0; i < n_sets; i++) stringi_set_insert (mrset_names, dict_get_mrset (dict, i)->name); } return true; } static bool parse_delete (struct lexer *lexer, struct dictionary *dict) { const struct stringi_set_node *node; struct stringi_set mrset_names; const char *name; if (!parse_mrset_names (lexer, dict, &mrset_names)) return false; STRINGI_SET_FOR_EACH (name, node, &mrset_names) dict_delete_mrset (dict, name); stringi_set_destroy (&mrset_names); return true; } static bool parse_display (struct lexer *lexer, struct dictionary *dict) { struct string details, var_names; struct stringi_set mrset_names_set; char **mrset_names; struct tab_table *table; size_t i, n; if (!parse_mrset_names (lexer, dict, &mrset_names_set)) return false; n = stringi_set_count (&mrset_names_set); if (n == 0) { if (dict_get_n_mrsets (dict) == 0) msg (SN, _("The active dataset dictionary does not contain any " "multiple response sets.")); stringi_set_destroy (&mrset_names_set); return true; } table = tab_create (3, n + 1); tab_headers (table, 0, 0, 1, 0); tab_box (table, TAL_1, TAL_1, TAL_1, TAL_1, 0, 0, 2, n); tab_hline (table, TAL_2, 0, 2, 1); tab_title (table, "%s", _("Multiple Response Sets")); tab_text (table, 0, 0, TAB_EMPH | TAB_LEFT, _("Name")); tab_text (table, 1, 0, TAB_EMPH | TAB_LEFT, _("Variables")); tab_text (table, 2, 0, TAB_EMPH | TAB_LEFT, _("Details")); ds_init_empty (&details); ds_init_empty (&var_names); mrset_names = stringi_set_get_sorted_array (&mrset_names_set); for (i = 0; i < n; i++) { const struct mrset *mrset = dict_lookup_mrset (dict, mrset_names[i]); const int row = i + 1; size_t j; /* Details. */ ds_clear (&details); ds_put_format (&details, "%s\n", (mrset->type == MRSET_MD ? _("Multiple dichotomy set") : _("Multiple category set"))); if (mrset->label != NULL) ds_put_format (&details, "%s: %s\n", _("Label"), mrset->label); if (mrset->type == MRSET_MD) { if (mrset->label != NULL || mrset->label_from_var_label) ds_put_format (&details, "%s: %s\n", _("Label source"), (mrset->label_from_var_label ? _("First variable label among variables") : _("Provided by user"))); ds_put_format (&details, "%s: ", _("Counted value")); if (mrset->width == 0) ds_put_format (&details, "%.0f\n", mrset->counted.f); else { const uint8_t *raw = value_str (&mrset->counted, mrset->width); char *utf8 = recode_string ("UTF-8", dict_get_encoding (dict), CHAR_CAST (const char *, raw), mrset->width); ds_put_format (&details, "`%s'\n", utf8); free (utf8); } ds_put_format (&details, "%s: %s\n", _("Category label source"), (mrset->cat_source == MRSET_VARLABELS ? _("Variable labels") : _("Value labels of counted value"))); } /* Variable names. */ ds_clear (&var_names); for (j = 0; j < mrset->n_vars; j++) ds_put_format (&var_names, "%s\n", var_get_name (mrset->vars[j])); tab_text (table, 0, row, TAB_LEFT, mrset_names[i]); tab_text (table, 1, row, TAB_LEFT, ds_cstr (&var_names)); tab_text (table, 2, row, TAB_LEFT, ds_cstr (&details)); } free (mrset_names); ds_destroy (&var_names); ds_destroy (&details); stringi_set_destroy (&mrset_names_set); tab_submit (table); return true; } pspp-1.0.1/src/language/dictionary/variable-display.c0000644000175000017500000001244013137223525017533 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/dataset.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Set variables' alignment This is the alignment for GUI display only. It affects nothing but GUIs */ int cmd_variable_alignment (struct lexer *lexer, struct dataset *ds) { do { struct variable **v; size_t nv; size_t i; enum alignment align; if (!parse_variables (lexer, dataset_dict (ds), &v, &nv, PV_NONE)) return CMD_FAILURE; if ( lex_force_match (lexer, T_LPAREN) ) { if ( lex_match_id (lexer, "LEFT")) align = ALIGN_LEFT; else if ( lex_match_id (lexer, "RIGHT")) align = ALIGN_RIGHT; else if ( lex_match_id (lexer, "CENTER")) align = ALIGN_CENTRE; else { free (v); return CMD_FAILURE; } if (!lex_force_match (lexer, T_RPAREN)) return CMD_FAILURE; } else { free (v); return CMD_FAILURE; } for( i = 0 ; i < nv ; ++i ) var_set_alignment (v[i], align); while (lex_token (lexer) == T_SLASH) lex_get (lexer); free (v); } while (lex_token (lexer) != T_ENDCMD); return CMD_SUCCESS; } /* Set variables' display width. This is the width for GUI display only. It affects nothing but GUIs */ int cmd_variable_width (struct lexer *lexer, struct dataset *ds) { do { struct variable **v; long int width; size_t nv; size_t i; if (!parse_variables (lexer, dataset_dict (ds), &v, &nv, PV_NONE)) return CMD_FAILURE; if (!lex_force_match (lexer, T_LPAREN) || !lex_force_int (lexer)) { free (v); return CMD_FAILURE; } width = lex_integer (lexer); lex_get (lexer); if (!lex_force_match (lexer, T_RPAREN)) { free (v); return CMD_FAILURE; } if (width < 0) { msg (SE, _("Variable display width must be a positive integer.")); free (v); return CMD_FAILURE; } width = MIN (width, 2 * MAX_STRING); for( i = 0 ; i < nv ; ++i ) var_set_display_width (v[i], width); while (lex_token (lexer) == T_SLASH) lex_get (lexer); free (v); } while (lex_token (lexer) != T_ENDCMD); return CMD_SUCCESS; } /* Set variables' measurement level */ int cmd_variable_level (struct lexer *lexer, struct dataset *ds) { do { struct variable **v; size_t nv; enum measure level; size_t i; if (!parse_variables (lexer, dataset_dict (ds), &v, &nv, PV_NONE)) return CMD_FAILURE; if ( lex_force_match (lexer, T_LPAREN) ) { if ( lex_match_id (lexer, "SCALE")) level = MEASURE_SCALE; else if ( lex_match_id (lexer, "ORDINAL")) level = MEASURE_ORDINAL; else if ( lex_match_id (lexer, "NOMINAL")) level = MEASURE_NOMINAL; else { free (v); return CMD_FAILURE; } if (!lex_force_match (lexer, T_RPAREN)) return CMD_FAILURE; } else { free (v); return CMD_FAILURE; } for( i = 0 ; i < nv ; ++i ) var_set_measure (v[i], level); while (lex_token (lexer) == T_SLASH) lex_get (lexer); free (v); } while (lex_token (lexer) != T_ENDCMD); return CMD_SUCCESS; } /* Set variables' role */ int cmd_variable_role (struct lexer *lexer, struct dataset *ds) { while (lex_match (lexer, T_SLASH)) { struct variable **v; size_t nv; enum var_role role; size_t i; if ( lex_match_id (lexer, "INPUT")) role = ROLE_INPUT; else if ( lex_match_id (lexer, "TARGET")) role = ROLE_TARGET; else if ( lex_match_id (lexer, "BOTH")) role = ROLE_BOTH; else if ( lex_match_id (lexer, "NONE")) role = ROLE_NONE; else if ( lex_match_id (lexer, "PARTITION")) role = ROLE_PARTITION; else if ( lex_match_id (lexer, "SPLIT")) role = ROLE_SPLIT; else { lex_error (lexer, NULL); return CMD_FAILURE; } if (!parse_variables (lexer, dataset_dict (ds), &v, &nv, PV_NONE)) return CMD_FAILURE; for (i = 0; i < nv; i++) var_set_role (v[i], role); free (v); } return CMD_SUCCESS; } pspp-1.0.1/src/language/dictionary/vector.c0000644000175000017500000001363113137223525015610 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011, 2012, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/dataset.h" #include "data/format.h" #include "data/dictionary.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/assertion.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "libpspp/str.h" #include "gl/intprops.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) int cmd_vector (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); struct pool *pool = pool_create (); do { char **vectors; size_t vector_cnt, vector_cap; /* Get the name(s) of the new vector(s). */ if (!lex_force_id (lexer) || !dict_id_is_valid (dict, lex_tokcstr (lexer), true)) return CMD_CASCADING_FAILURE; vectors = NULL; vector_cnt = vector_cap = 0; while (lex_token (lexer) == T_ID) { size_t i; if (dict_lookup_vector (dict, lex_tokcstr (lexer))) { msg (SE, _("A vector named %s already exists."), lex_tokcstr (lexer)); goto fail; } for (i = 0; i < vector_cnt; i++) if (!utf8_strcasecmp (vectors[i], lex_tokcstr (lexer))) { msg (SE, _("Vector name %s is given twice."), lex_tokcstr (lexer)); goto fail; } if (vector_cnt == vector_cap) vectors = pool_2nrealloc (pool, vectors, &vector_cap, sizeof *vectors); vectors[vector_cnt++] = pool_strdup (pool, lex_tokcstr (lexer)); lex_get (lexer); lex_match (lexer, T_COMMA); } /* Now that we have the names it's time to check for the short or long forms. */ if (lex_match (lexer, T_EQUALS)) { /* Long form. */ struct variable **v; size_t nv; if (vector_cnt > 1) { msg (SE, _("A slash must separate each vector " "specification in VECTOR's long form.")); goto fail; } if (!parse_variables_pool (lexer, pool, dict, &v, &nv, PV_SAME_WIDTH | PV_DUPLICATE)) goto fail; dict_create_vector (dict, vectors[0], v, nv); } else if (lex_match (lexer, T_LPAREN)) { /* Short form. */ struct fmt_spec format; bool seen_format = false; struct variable **vars; int var_cnt; size_t i; var_cnt = 0; format = fmt_for_output (FMT_F, 8, 2); seen_format = false; while (!lex_match (lexer, T_RPAREN)) { if (lex_is_integer (lexer) && var_cnt == 0) { var_cnt = lex_integer (lexer); lex_get (lexer); if (var_cnt <= 0) { msg (SE, _("Vectors must have at least one element.")); goto fail; } } else if (lex_token (lexer) == T_ID && !seen_format) { seen_format = true; if (!parse_format_specifier (lexer, &format) || !fmt_check_output (&format)) goto fail; } else { lex_error (lexer, NULL); goto fail; } lex_match (lexer, T_COMMA); } if (var_cnt == 0) { lex_error (lexer, _("expecting vector length")); goto fail; } /* Check that none of the variables exist and that their names are not excessively long. */ for (i = 0; i < vector_cnt; i++) { int j; for (j = 0; j < var_cnt; j++) { char *name = xasprintf ("%s%d", vectors[i], j + 1); if (!dict_id_is_valid (dict, name, true)) { free (name); goto fail; } if (dict_lookup_var (dict, name)) { free (name); msg (SE, _("%s is an existing variable name."), name); goto fail; } free (name); } } /* Finally create the variables and vectors. */ vars = pool_nmalloc (pool, var_cnt, sizeof *vars); for (i = 0; i < vector_cnt; i++) { int j; for (j = 0; j < var_cnt; j++) { char *name = xasprintf ("%s%d", vectors[i], j + 1); vars[j] = dict_create_var_assert (dict, name, fmt_var_width (&format)); var_set_both_formats (vars[j], &format); free (name); } dict_create_vector_assert (dict, vectors[i], vars, var_cnt); } } else { lex_error (lexer, NULL); goto fail; } } while (lex_match (lexer, T_SLASH)); pool_destroy (pool); return CMD_SUCCESS; fail: pool_destroy (pool); return CMD_FAILURE; } pspp-1.0.1/src/language/dictionary/split-file.c0000644000175000017500000000607713137223525016364 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/case.h" #include "data/data-out.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/value-labels.h" #include "data/variable.h" #include "language/command.h" #include "language/dictionary/split-file.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "output/tab.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) int cmd_split_file (struct lexer *lexer, struct dataset *ds) { if (lex_match_id (lexer, "OFF")) dict_set_split_vars (dataset_dict (ds), NULL, 0); else { struct variable **v; size_t n; /* For now, ignore SEPARATE and LAYERED. */ (void) ( lex_match_id (lexer, "SEPARATE") || lex_match_id (lexer, "LAYERED") ); lex_match (lexer, T_BY); if (!parse_variables (lexer, dataset_dict (ds), &v, &n, PV_NO_DUPLICATE)) return CMD_CASCADING_FAILURE; dict_set_split_vars (dataset_dict (ds), v, n); free (v); } return CMD_SUCCESS; } /* Dumps out the values of all the split variables for the case C. */ void output_split_file_values (const struct dataset *ds, const struct ccase *c) { const struct dictionary *dict = dataset_dict (ds); const struct variable *const *split; struct tab_table *t; size_t split_cnt; int i; split_cnt = dict_get_split_cnt (dict); if (split_cnt == 0) return; t = tab_create (3, split_cnt + 1); tab_vline (t, TAL_GAP, 1, 0, split_cnt); tab_vline (t, TAL_GAP, 2, 0, split_cnt); tab_text (t, 0, 0, TAB_NONE, _("Variable")); tab_text (t, 1, 0, TAB_LEFT, _("Value")); tab_text (t, 2, 0, TAB_LEFT, _("Label")); split = dict_get_split_vars (dict); for (i = 0; i < split_cnt; i++) { const struct variable *v = split[i]; char *s; const char *val_lab; const struct fmt_spec *print = var_get_print_format (v); tab_text_format (t, 0, i + 1, TAB_LEFT, "%s", var_get_name (v)); s = data_out (case_data (c, v), dict_get_encoding (dict), print); tab_text_format (t, 1, i + 1, 0, "%.*s", print->w, s); free (s); val_lab = var_lookup_value_label (v, case_data (c, v)); if (val_lab) tab_text (t, 2, i + 1, TAB_LEFT, val_lab); } tab_submit (t); } pspp-1.0.1/src/language/dictionary/variable-label.c0000644000175000017500000000332312523704223017142 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) int cmd_variable_labels (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); do { struct variable **v; size_t nv; size_t i; if (!parse_variables (lexer, dict, &v, &nv, PV_NONE)) return CMD_FAILURE; if (!lex_force_string (lexer)) { free (v); return CMD_FAILURE; } for (i = 0; i < nv; i++) var_set_label (v[i], lex_tokcstr (lexer)); lex_get (lexer); while (lex_token (lexer) == T_SLASH) lex_get (lexer); free (v); } while (lex_token (lexer) != T_ENDCMD); return CMD_SUCCESS; } pspp-1.0.1/src/language/dictionary/formats.c0000644000175000017500000000546312470243700015761 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include "data/dataset.h" #include "data/format.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "gettext.h" #define _(msgid) gettext (msgid) enum { FORMATS_PRINT = 001, FORMATS_WRITE = 002 }; static int internal_cmd_formats (struct lexer *, struct dataset *ds, int); int cmd_print_formats (struct lexer *lexer, struct dataset *ds) { return internal_cmd_formats (lexer, ds, FORMATS_PRINT); } int cmd_write_formats (struct lexer *lexer, struct dataset *ds) { return internal_cmd_formats (lexer, ds, FORMATS_WRITE); } int cmd_formats (struct lexer *lexer, struct dataset *ds) { return internal_cmd_formats (lexer, ds, FORMATS_PRINT | FORMATS_WRITE); } static int internal_cmd_formats (struct lexer *lexer, struct dataset *ds, int which) { /* Variables. */ struct variable **v; size_t cv; for (;;) { struct fmt_spec f; int width; size_t i; lex_match (lexer, T_SLASH); if (lex_token (lexer) == T_ENDCMD) break; if (!parse_variables (lexer, dataset_dict (ds), &v, &cv, PV_SAME_WIDTH)) return CMD_FAILURE; width = var_get_width (v[0]); if (!lex_match (lexer, T_LPAREN)) { lex_error_expecting (lexer, "`('", NULL_SENTINEL); goto fail; } if (!parse_format_specifier (lexer, &f) || !fmt_check_output (&f) || !fmt_check_width_compat (&f, width)) goto fail; if (!lex_match (lexer, T_RPAREN)) { lex_error_expecting (lexer, "`)'", NULL_SENTINEL); goto fail; } for (i = 0; i < cv; i++) { if (which & FORMATS_PRINT) var_set_print_format (v[i], &f); if (which & FORMATS_WRITE) var_set_write_format (v[i], &f); } free (v); v = NULL; } return CMD_SUCCESS; fail: free (v); return CMD_FAILURE; } pspp-1.0.1/src/language/dictionary/value-labels.c0000644000175000017500000001077112470243700016660 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/value-labels.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Declarations. */ static int do_value_labels (struct lexer *, const struct dictionary *dict, bool); static void erase_labels (struct variable **vars, size_t var_cnt); static int get_label (struct lexer *, struct variable **vars, size_t var_cnt, const char *dict_encoding); /* Stubs. */ int cmd_value_labels (struct lexer *lexer, struct dataset *ds) { return do_value_labels (lexer, dataset_dict (ds), true); } int cmd_add_value_labels (struct lexer *lexer, struct dataset *ds) { return do_value_labels (lexer, dataset_dict (ds), false); } /* Do it. */ static int do_value_labels (struct lexer *lexer, const struct dictionary *dict, bool erase) { struct variable **vars; /* Variable list. */ size_t var_cnt; /* Number of variables. */ int parse_err=0; /* true if error parsing variables */ lex_match (lexer, T_SLASH); while (lex_token (lexer) != T_ENDCMD) { parse_err = !parse_variables (lexer, dict, &vars, &var_cnt, PV_SAME_WIDTH); if (var_cnt < 1) { free(vars); return CMD_FAILURE; } if (erase) erase_labels (vars, var_cnt); while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD) if (!get_label (lexer, vars, var_cnt, dict_get_encoding (dict))) goto lossage; if (lex_token (lexer) != T_SLASH) { free (vars); break; } lex_get (lexer); free (vars); } return parse_err ? CMD_FAILURE : CMD_SUCCESS; lossage: free (vars); return CMD_FAILURE; } /* Erases all the labels for the VAR_CNT variables in VARS. */ static void erase_labels (struct variable **vars, size_t var_cnt) { size_t i; /* Erase old value labels if desired. */ for (i = 0; i < var_cnt; i++) var_clear_value_labels (vars[i]); } /* Parse all the labels for the VAR_CNT variables in VARS and add the specified labels to those variables. */ static int get_label (struct lexer *lexer, struct variable **vars, size_t var_cnt, const char *dict_encoding) { /* Parse all the labels and add them to the variables. */ do { enum { MAX_LABEL_LEN = 255 }; int width = var_get_width (vars[0]); union value value; struct string label; size_t trunc_len; size_t i; /* Set value. */ value_init (&value, width); if (!parse_value (lexer, &value, vars[0])) { value_destroy (&value, width); return 0; } lex_match (lexer, T_COMMA); /* Set label. */ if (lex_token (lexer) != T_ID && !lex_force_string (lexer)) { value_destroy (&value, width); return 0; } ds_init_substring (&label, lex_tokss (lexer)); trunc_len = utf8_encoding_trunc_len (ds_cstr (&label), dict_encoding, MAX_LABEL_LEN); if (ds_length (&label) > trunc_len) { msg (SW, _("Truncating value label to %d bytes."), MAX_LABEL_LEN); ds_truncate (&label, trunc_len); } for (i = 0; i < var_cnt; i++) var_replace_value_label (vars[i], &value, ds_cstr (&label)); ds_destroy (&label); value_destroy (&value, width); lex_get (lexer); lex_match (lexer, T_COMMA); } while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD); return 1; } pspp-1.0.1/src/language/dictionary/sort-variables.c0000644000175000017500000001533213137223525017243 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/attributes.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) enum key { K_NAME, K_TYPE, K_FORMAT, K_VAR_LABEL, K_VALUE_LABELS, K_MISSING_VALUES, K_MEASURE, K_ROLE, K_COLUMNS, K_ALIGNMENT, K_ATTRIBUTE, }; struct criterion { enum key key; char *attr_name; bool descending; }; static int compare_ints (int a, int b) { return a < b ? -1 : a > b; } static int compare_formats (const struct fmt_spec *a, const struct fmt_spec *b) { int retval = compare_ints (fmt_to_io (a->type), fmt_to_io (b->type)); if (!retval) retval = compare_ints (a->w, b->w); if (!retval) retval = compare_ints (a->d, b->d); return retval; } static int compare_var_labels (const struct variable *a, const struct variable *b) { const char *a_label = var_get_label (a); const char *b_label = var_get_label (b); return utf8_strcasecmp (a_label ? a_label : "", b_label ? b_label : ""); } static int map_measure (enum measure m) { return (m == MEASURE_NOMINAL ? 0 : m == MEASURE_ORDINAL ? 1 : 2); } static int map_role (enum var_role r) { return (r == ROLE_INPUT ? 0 : r == ROLE_TARGET ? 1 : r == ROLE_BOTH ? 2 : r == ROLE_NONE ? 3 : r == ROLE_PARTITION ? 4 : 5); } static const char * get_attribute (const struct variable *v, const char *name) { const struct attrset *set = var_get_attributes (v); const struct attribute *attr = attrset_lookup (set, name); const char *value = attr ? attribute_get_value (attr, 0) : NULL; return value ? value : ""; } static int map_alignment (enum alignment a) { return (a == ALIGN_LEFT ? 0 : a == ALIGN_RIGHT ? 1 : 2); } static int compare_vars (const void *a_, const void *b_, const void *c_) { const struct variable *const *ap = a_; const struct variable *const *bp = b_; const struct variable *a = *ap; const struct variable *b = *bp; const struct criterion *c = c_; int retval; switch (c->key) { case K_NAME: retval = utf8_strverscasecmp (var_get_name (a), var_get_name (b)); break; case K_TYPE: retval = compare_ints (var_get_width (a), var_get_width (b)); break; case K_FORMAT: retval = compare_formats (var_get_print_format (a), var_get_print_format (b)); break; case K_VAR_LABEL: retval = compare_var_labels (a, b); break; case K_VALUE_LABELS: retval = compare_ints (var_has_value_labels (a), var_has_value_labels (b)); break; case K_MISSING_VALUES: retval = compare_ints (var_has_missing_values (a), var_has_missing_values (b)); break; case K_MEASURE: retval = compare_ints (map_measure (var_get_measure (a)), map_measure (var_get_measure (b))); break; case K_ROLE: retval = compare_ints (map_role (var_get_role (a)), map_role (var_get_role (b))); break; case K_COLUMNS: retval = compare_ints (var_get_display_width (a), var_get_display_width (b)); break; case K_ALIGNMENT: retval = compare_ints (map_alignment (var_get_alignment (a)), map_alignment (var_get_alignment (b))); break; case K_ATTRIBUTE: retval = utf8_strcasecmp (get_attribute (a, c->attr_name), get_attribute (b, c->attr_name)); break; default: NOT_REACHED (); } /* Make this a stable sort. */ if (!retval) retval = a < b ? -1 : a > b; if (c->descending) retval = -retval; return retval; } /* Performs SORT VARIABLES command. */ int cmd_sort_variables (struct lexer *lexer, struct dataset *ds) { enum cmd_result result = CMD_FAILURE; lex_match (lexer, T_BY); /* Parse sort key. */ struct criterion c = { .attr_name = NULL }; if (lex_match_id (lexer, "NAME")) c.key = K_NAME; else if (lex_match_id (lexer, "TYPE")) c.key = K_TYPE; else if (lex_match_id (lexer, "FORMAT")) c.key = K_FORMAT; else if (lex_match_id (lexer, "LABEL")) c.key = K_VAR_LABEL; else if (lex_match_id (lexer, "VALUES")) c.key = K_VALUE_LABELS; else if (lex_match_id (lexer, "MISSING")) c.key = K_MISSING_VALUES; else if (lex_match_id (lexer, "MEASURE")) c.key = K_MEASURE; else if (lex_match_id (lexer, "ROLE")) c.key = K_ROLE; else if (lex_match_id (lexer, "COLUMNS")) c.key = K_COLUMNS; else if (lex_match_id (lexer, "ALIGNMENT")) c.key = K_ALIGNMENT; else if (lex_match_id (lexer, "ATTRIBUTE")) { if (!lex_force_id (lexer)) goto exit; c.key = K_ATTRIBUTE; c.attr_name = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); } /* Parse sort direction. */ if (lex_match (lexer, T_LPAREN)) { if (lex_match_id (lexer, "A") || lex_match_id (lexer, "UP")) c.descending = false; else if (lex_match_id (lexer, "D") || lex_match_id (lexer, "DOWN")) c.descending = true; else { lex_error (lexer, NULL); goto exit; } if (!lex_force_match (lexer, T_RPAREN)) goto exit; } else c.descending = false; /* Sort variables. */ struct dictionary *d = dataset_dict (ds); struct variable **vars; size_t n_vars; dict_get_vars_mutable (d, &vars, &n_vars, 0); sort (vars, n_vars, sizeof *vars, compare_vars, &c); dict_reorder_vars (d, CONST_CAST (struct variable *const *, vars), n_vars); free (vars); result = CMD_SUCCESS; exit: free (c.attr_name); return result; } pspp-1.0.1/src/language/dictionary/modify-variables.c0000644000175000017500000003645012523704223017544 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/variable-parser.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/bit-vector.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* These control the ordering produced by compare_variables_given_ordering(). */ struct ordering { int forward; /* 1=FORWARD, 0=BACKWARD. */ int positional; /* 1=POSITIONAL, 0=ALPHA. */ }; /* Increasing order of variable index. */ static struct ordering forward_positional_ordering = {1, 1}; static int compare_variables_given_ordering (const void *, const void *, const void *ordering); /* Explains how to modify the variables in a dictionary. */ struct var_modification { /* New variable ordering. */ struct variable **reorder_vars; size_t reorder_cnt; /* DROP/KEEP information. */ struct variable **drop_vars; size_t drop_cnt; /* New variable names. */ struct variable **rename_vars; char **new_names; size_t rename_cnt; }; static bool rearrange_dict (struct dictionary *d, const struct var_modification *vm); /* Performs MODIFY VARS command. */ int cmd_modify_vars (struct lexer *lexer, struct dataset *ds) { /* Bits indicated whether we've already encountered a subcommand of this type. */ unsigned already_encountered = 0; /* What we are going to do to the active dataset. */ struct var_modification vm; /* Return code. */ int ret_code = CMD_CASCADING_FAILURE; size_t i; if (proc_make_temporary_transformations_permanent (ds)) msg (SE, _("%s may not be used after %s. " "Temporary transformations will be made permanent."), "MODIFY VARS", "TEMPORARY"); vm.reorder_vars = NULL; vm.reorder_cnt = 0; vm.rename_vars = NULL; vm.new_names = NULL; vm.rename_cnt = 0; vm.drop_vars = NULL; vm.drop_cnt = 0; /* Parse each subcommand. */ lex_match (lexer, T_SLASH); for (;;) { if (lex_match_id (lexer, "REORDER")) { struct variable **v = NULL; size_t nv = 0; if (already_encountered & 1) { lex_sbc_only_once ("REORDER"); goto done; } already_encountered |= 1; lex_match (lexer, T_EQUALS); do { struct ordering ordering; size_t prev_nv = nv; ordering.forward = ordering.positional = 1; if (lex_match_id (lexer, "FORWARD")); else if (lex_match_id (lexer, "BACKWARD")) ordering.forward = 0; if (lex_match_id (lexer, "POSITIONAL")); else if (lex_match_id (lexer, "ALPHA")) ordering.positional = 0; if (lex_match (lexer, T_ALL) || lex_token (lexer) == T_SLASH || lex_token (lexer) == T_ENDCMD) { if (prev_nv != 0) { msg (SE, _("Cannot specify ALL after specifying a set " "of variables.")); goto done; } dict_get_vars_mutable (dataset_dict (ds), &v, &nv, DC_SYSTEM); } else { if (!lex_match (lexer, T_LPAREN)) { lex_error_expecting (lexer, "`('", NULL_SENTINEL); free (v); goto done; } if (!parse_variables (lexer, dataset_dict (ds), &v, &nv, PV_APPEND | PV_NO_DUPLICATE)) { free (v); goto done; } if (!lex_match (lexer, T_RPAREN)) { lex_error_expecting (lexer, "`)'", NULL_SENTINEL); free (v); goto done; } } sort (&v[prev_nv], nv - prev_nv, sizeof *v, compare_variables_given_ordering, &ordering); } while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD); vm.reorder_vars = v; vm.reorder_cnt = nv; } else if (lex_match_id (lexer, "RENAME")) { if (already_encountered & 2) { lex_sbc_only_once ("RENAME"); goto done; } already_encountered |= 2; lex_match (lexer, T_EQUALS); do { size_t prev_nv_1 = vm.rename_cnt; size_t prev_nv_2 = vm.rename_cnt; if (!lex_match (lexer, T_LPAREN)) { lex_error_expecting (lexer, "`('", NULL_SENTINEL); goto done; } if (!parse_variables (lexer, dataset_dict (ds), &vm.rename_vars, &vm.rename_cnt, PV_APPEND | PV_NO_DUPLICATE)) goto done; if (!lex_match (lexer, T_EQUALS)) { lex_error_expecting (lexer, "`='", NULL_SENTINEL); goto done; } if (!parse_DATA_LIST_vars (lexer, dataset_dict (ds), &vm.new_names, &prev_nv_1, PV_APPEND)) goto done; if (prev_nv_1 != vm.rename_cnt) { msg (SE, _("Differing number of variables in old name list " "(%zu) and in new name list (%zu)."), vm.rename_cnt - prev_nv_2, prev_nv_1 - prev_nv_2); for (i = 0; i < prev_nv_1; i++) free (vm.new_names[i]); free (vm.new_names); vm.new_names = NULL; goto done; } if (!lex_match (lexer, T_RPAREN)) { lex_error_expecting (lexer, "`)'", NULL_SENTINEL); goto done; } } while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH); } else if (lex_match_id (lexer, "KEEP")) { struct variable **keep_vars, **all_vars, **drop_vars; size_t keep_cnt, all_cnt, drop_cnt; if (already_encountered & 4) { msg (SE, _("%s subcommand may be given at most once. It may " "not be given in conjunction with the %s subcommand."), "KEEP", "DROP"); goto done; } already_encountered |= 4; lex_match (lexer, T_EQUALS); if (!parse_variables (lexer, dataset_dict (ds), &keep_vars, &keep_cnt, PV_NONE)) goto done; /* Transform the list of variables to keep into a list of variables to drop. First sort the keep list, then figure out which variables are missing. */ sort (keep_vars, keep_cnt, sizeof *keep_vars, compare_variables_given_ordering, &forward_positional_ordering); dict_get_vars_mutable (dataset_dict (ds), &all_vars, &all_cnt, 0); assert (all_cnt >= keep_cnt); drop_cnt = all_cnt - keep_cnt; drop_vars = xnmalloc (drop_cnt, sizeof *keep_vars); if (set_difference (all_vars, all_cnt, keep_vars, keep_cnt, sizeof *all_vars, drop_vars, compare_variables_given_ordering, &forward_positional_ordering) != drop_cnt) NOT_REACHED (); free (keep_vars); free (all_vars); vm.drop_vars = drop_vars; vm.drop_cnt = drop_cnt; } else if (lex_match_id (lexer, "DROP")) { struct variable **drop_vars; size_t drop_cnt; if (already_encountered & 4) { msg (SE, _("%s subcommand may be given at most once. It may " "not be given in conjunction with the %s " "subcommand."), "DROP", "KEEP" ); goto done; } already_encountered |= 4; lex_match (lexer, T_EQUALS); if (!parse_variables (lexer, dataset_dict (ds), &drop_vars, &drop_cnt, PV_NONE)) goto done; vm.drop_vars = drop_vars; vm.drop_cnt = drop_cnt; } else if (lex_match_id (lexer, "MAP")) { struct dictionary *temp = dict_clone (dataset_dict (ds)); int success = rearrange_dict (temp, &vm); if (success) { /* FIXME: display new dictionary. */ } dict_destroy (temp); } else { if (lex_token (lexer) == T_ID) msg (SE, _("Unrecognized subcommand name `%s'."), lex_tokcstr (lexer)); else msg (SE, _("Subcommand name expected.")); goto done; } if (lex_token (lexer) == T_ENDCMD) break; if (lex_token (lexer) != T_SLASH) { lex_error_expecting (lexer, "`/'", "`.'", NULL_SENTINEL); goto done; } lex_get (lexer); } if (already_encountered & (1 | 4)) { /* Read the data. */ if (!proc_execute (ds)) goto done; } if (!rearrange_dict (dataset_dict (ds), &vm)) goto done; ret_code = CMD_SUCCESS; done: free (vm.reorder_vars); free (vm.rename_vars); for (i = 0; i < vm.rename_cnt; i++) free (vm.new_names[i]); free (vm.new_names); free (vm.drop_vars); return ret_code; } /* Compares A and B according to the settings in ORDERING, returning a strcmp()-type result. */ static int compare_variables_given_ordering (const void *a_, const void *b_, const void *ordering_) { struct variable *const *pa = a_; struct variable *const *pb = b_; const struct variable *a = *pa; const struct variable *b = *pb; const struct ordering *ordering = ordering_; int result; if (ordering->positional) { size_t a_index = var_get_dict_index (a); size_t b_index = var_get_dict_index (b); result = a_index < b_index ? -1 : a_index > b_index; } else result = utf8_strcasecmp (var_get_name (a), var_get_name (b)); if (!ordering->forward) result = -result; return result; } /* Pairs a variable with a new name. */ struct var_renaming { struct variable *var; const char *new_name; }; /* A algo_compare_func that compares new_name members in struct var_renaming structures A and B. */ static int compare_var_renaming_by_new_name (const void *a_, const void *b_, const void *aux UNUSED) { const struct var_renaming *a = a_; const struct var_renaming *b = b_; return utf8_strcasecmp (a->new_name, b->new_name); } /* Returns true if performing VM on dictionary D would not cause problems such as duplicate variable names. Returns false otherwise, and issues an error message. */ static int validate_var_modification (const struct dictionary *d, const struct var_modification *vm) { /* Variable reordering can't be a problem, so we don't simulate it. Variable renaming can cause duplicate names, but dropping variables can eliminate them, so we simulate both of those. */ struct variable **all_vars; struct variable **keep_vars; struct variable **drop_vars; size_t keep_cnt, drop_cnt; size_t all_cnt; struct var_renaming *var_renaming; int valid; size_t i; /* All variables, in index order. */ dict_get_vars_mutable (d, &all_vars, &all_cnt, 0); /* Drop variables, in index order. */ drop_cnt = vm->drop_cnt; drop_vars = xnmalloc (drop_cnt, sizeof *drop_vars); memcpy (drop_vars, vm->drop_vars, drop_cnt * sizeof *drop_vars); sort (drop_vars, drop_cnt, sizeof *drop_vars, compare_variables_given_ordering, &forward_positional_ordering); /* Keep variables, in index order. */ assert (all_cnt >= drop_cnt); keep_cnt = all_cnt - drop_cnt; keep_vars = xnmalloc (keep_cnt, sizeof *keep_vars); if (set_difference (all_vars, all_cnt, drop_vars, drop_cnt, sizeof *all_vars, keep_vars, compare_variables_given_ordering, &forward_positional_ordering) != keep_cnt) NOT_REACHED (); /* Copy variables into var_renaming array. */ var_renaming = xnmalloc (keep_cnt, sizeof *var_renaming); for (i = 0; i < keep_cnt; i++) { var_renaming[i].var = keep_vars[i]; var_renaming[i].new_name = var_get_name (keep_vars[i]); } /* Rename variables in var_renaming array. */ for (i = 0; i < vm->rename_cnt; i++) { struct variable *const *kv; struct var_renaming *vr; /* Get the var_renaming element. */ kv = binary_search (keep_vars, keep_cnt, sizeof *keep_vars, &vm->rename_vars[i], compare_variables_given_ordering, &forward_positional_ordering); if (kv == NULL) continue; vr = var_renaming + (kv - keep_vars); vr->new_name = vm->new_names[i]; } /* Sort var_renaming array by new names and check for duplicates. */ sort (var_renaming, keep_cnt, sizeof *var_renaming, compare_var_renaming_by_new_name, NULL); valid = adjacent_find_equal (var_renaming, keep_cnt, sizeof *var_renaming, compare_var_renaming_by_new_name, NULL) == NULL; /* Clean up. */ free (all_vars); free (keep_vars); free (drop_vars); free (var_renaming); return valid; } /* Reoders, removes, and renames variables in dictionary D according to VM. Returns true if successful, false if there would have been duplicate variable names if the modifications had been carried out. In the latter case, the dictionary is not modified. */ static bool rearrange_dict (struct dictionary *d, const struct var_modification *vm) { char **rename_old_names; struct variable **rename_vars; char **rename_new_names; size_t rename_cnt; size_t i; /* Check whether the modifications will cause duplicate names. */ if (!validate_var_modification (d, vm)) return false; /* Record the old names of variables to rename. After variables are deleted, we can't depend on the variables to still exist, but we can still look them up by name. */ rename_old_names = xnmalloc (vm->rename_cnt, sizeof *rename_old_names); for (i = 0; i < vm->rename_cnt; i++) rename_old_names[i] = xstrdup (var_get_name (vm->rename_vars[i])); /* Reorder and delete variables. */ dict_reorder_vars (d, vm->reorder_vars, vm->reorder_cnt); dict_delete_vars (d, vm->drop_vars, vm->drop_cnt); /* Compose lists of variables to rename and their new names. */ rename_vars = xnmalloc (vm->rename_cnt, sizeof *rename_vars); rename_new_names = xnmalloc (vm->rename_cnt, sizeof *rename_new_names); rename_cnt = 0; for (i = 0; i < vm->rename_cnt; i++) { struct variable *var = dict_lookup_var (d, rename_old_names[i]); if (var == NULL) continue; rename_vars[rename_cnt] = var; rename_new_names[rename_cnt] = vm->new_names[i]; rename_cnt++; } /* Do renaming. */ if (dict_rename_vars (d, rename_vars, rename_new_names, rename_cnt, NULL) == 0) NOT_REACHED (); /* Clean up. */ for (i = 0; i < vm->rename_cnt; i++) free (rename_old_names[i]); free (rename_old_names); free (rename_vars); free (rename_new_names); return true; } pspp-1.0.1/src/language/dictionary/automake.mk0000644000175000017500000000307313137223525016300 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- language_dictionary_sources = \ src/language/dictionary/attributes.c \ src/language/dictionary/apply-dictionary.c \ src/language/dictionary/delete-variables.c \ src/language/dictionary/formats.c \ src/language/dictionary/missing-values.c \ src/language/dictionary/modify-variables.c \ src/language/dictionary/mrsets.c \ src/language/dictionary/numeric.c \ src/language/dictionary/rename-variables.c \ src/language/dictionary/sort-variables.c \ src/language/dictionary/split-file.c \ src/language/dictionary/split-file.h \ src/language/dictionary/sys-file-info.c \ src/language/dictionary/value-labels.c \ src/language/dictionary/variable-label.c \ src/language/dictionary/vector.c \ src/language/dictionary/variable-display.c \ src/language/dictionary/weight.c pspp-1.0.1/src/language/dictionary/apply-dictionary.c0000644000175000017500000000736713137223525017607 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2012, 2014, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include "data/any-reader.h" #include "data/casereader.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/missing-values.h" #include "data/value-labels.h" #include "data/variable.h" #include "language/command.h" #include "language/data-io/file-handle.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Parses and executes APPLY DICTIONARY. */ int cmd_apply_dictionary (struct lexer *lexer, struct dataset *ds) { struct file_handle *handle; struct casereader *reader; struct dictionary *dict; int n_matched = 0; int i; lex_match_id (lexer, "FROM"); lex_match (lexer, T_EQUALS); handle = fh_parse (lexer, FH_REF_FILE, dataset_session (ds)); if (!handle) return CMD_FAILURE; reader = any_reader_open_and_decode (handle, NULL, &dict, NULL); fh_unref (handle); if (!reader) return CMD_FAILURE; casereader_destroy (reader); for (i = 0; i < dict_get_var_cnt (dict); i++) { const struct variable *s = dict_get_var (dict, i); struct variable *t = dict_lookup_var (dataset_dict (ds), var_get_name (s)); if (t == NULL) continue; n_matched++; if (var_get_type (s) != var_get_type (t)) { msg (SW, _("Variable %s is %s in target file, but %s in " "source file."), var_get_name (s), var_is_alpha (t) ? _("string") : _("numeric"), var_is_alpha (s) ? _("string") : _("numeric")); continue; } if (var_has_label (s)) var_set_label (t, var_get_label (s)); if (var_has_value_labels (s)) { const struct val_labs *value_labels = var_get_value_labels (s); if (val_labs_can_set_width (value_labels, var_get_width (t))) var_set_value_labels (t, value_labels); } if (var_has_missing_values (s)) { const struct missing_values *miss = var_get_missing_values (s); if (mv_is_resizable (miss, var_get_width (t))) var_set_missing_values (t, miss); } if (var_is_numeric (s)) { var_set_print_format (t, var_get_print_format (s)); var_set_write_format (t, var_get_write_format (s)); } if (var_has_attributes (s)) var_set_attributes (t, var_get_attributes (s)); } if (!n_matched) msg (SW, _("No matching variables found between the source " "and target files.")); /* Data file attributes. */ if (dict_has_attributes (dict)) dict_set_attributes (dataset_dict (ds), dict_get_attributes (dict)); /* Weighting. */ if (dict_get_weight (dict) != NULL) { struct variable *new_weight = dict_lookup_var (dataset_dict (ds), var_get_name (dict_get_weight (dict))); if (new_weight != NULL) dict_set_weight (dataset_dict (ds), new_weight); } return CMD_SUCCESS; } pspp-1.0.1/src/language/automake.mk0000644000175000017500000000372413137223525014136 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- include $(top_srcdir)/src/language/lexer/automake.mk include $(top_srcdir)/src/language/xforms/automake.mk include $(top_srcdir)/src/language/control/automake.mk include $(top_srcdir)/src/language/dictionary/automake.mk include $(top_srcdir)/src/language/tests/automake.mk include $(top_srcdir)/src/language/utilities/automake.mk include $(top_srcdir)/src/language/stats/automake.mk include $(top_srcdir)/src/language/data-io/automake.mk include $(top_srcdir)/src/language/expressions/automake.mk noinst_LTLIBRARIES += src/language/liblanguage.la src_language_liblanguage_la_SOURCES = \ src/language/command.c \ src/language/command.h \ src/language/command.def \ $(language_lexer_sources) \ $(language_xforms_sources) \ $(language_control_sources) \ $(language_dictionary_sources) \ $(language_tests_sources) \ $(language_utilities_sources) \ $(language_stats_sources) \ $(language_data_io_sources) \ $(language_expressions_sources) nodist_src_language_liblanguage_la_SOURCES = \ $(src_language_data_io_built_sources) \ $(src_language_utilities_built_sources) \ $(src_language_stats_built_sources) \ $(language_tests_built_sources) \ $(expressions_built_sources) pspp-1.0.1/src/language/utilities/0000755000175000017500000000000013150620333014055 500000000000000pspp-1.0.1/src/language/utilities/date.c0000644000175000017500000000221312523704223015060 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Stub for USE command. */ int cmd_use (struct lexer *lexer, struct dataset *ds UNUSED) { if (lex_match (lexer, T_ALL)) return CMD_SUCCESS; msg (SW, _("Only %s is currently implemented."), "USE ALL"); return CMD_FAILURE; } pspp-1.0.1/src/language/utilities/include.c0000644000175000017500000001116213137223525015574 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2007, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include "data/dataset.h" #include "data/session.h" #include "language/command.h" #include "language/lexer/include-path.h" #include "language/lexer/lexer.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/dirname.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) enum variant { INSERT, INCLUDE }; static int do_insert (struct lexer *lexer, struct dataset *ds, enum variant variant) { enum lex_syntax_mode syntax_mode; enum lex_error_mode error_mode; char *relative_name; char *filename; char *encoding; int status; bool cd; /* Skip optional FILE=. */ if (lex_match_id (lexer, "FILE")) lex_match (lexer, T_EQUALS); if (!lex_force_string_or_id (lexer)) return CMD_FAILURE; relative_name = utf8_to_filename (lex_tokcstr (lexer)); if (NULL == relative_name) return CMD_FAILURE; filename = include_path_search (relative_name); free (relative_name); if ( ! filename) { msg (SE, _("Can't find `%s' in include file search path."), lex_tokcstr (lexer)); return CMD_FAILURE; } lex_get (lexer); syntax_mode = LEX_SYNTAX_INTERACTIVE; error_mode = LEX_ERROR_CONTINUE; cd = false; status = CMD_FAILURE; encoding = xstrdup (session_get_default_syntax_encoding ( dataset_session (ds))); while ( T_ENDCMD != lex_token (lexer)) { if (lex_match_id (lexer, "ENCODING")) { lex_match (lexer, T_EQUALS); if (!lex_force_string (lexer)) goto exit; free (encoding); encoding = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); } else if (variant == INSERT && lex_match_id (lexer, "SYNTAX")) { lex_match (lexer, T_EQUALS); if ( lex_match_id (lexer, "INTERACTIVE") ) syntax_mode = LEX_SYNTAX_INTERACTIVE; else if ( lex_match_id (lexer, "BATCH")) syntax_mode = LEX_SYNTAX_BATCH; else if ( lex_match_id (lexer, "AUTO")) syntax_mode = LEX_SYNTAX_AUTO; else { lex_error_expecting (lexer, "BATCH", "INTERACTIVE", "AUTO", NULL_SENTINEL); goto exit; } } else if (variant == INSERT && lex_match_id (lexer, "CD")) { lex_match (lexer, T_EQUALS); if ( lex_match_id (lexer, "YES") ) { cd = true; } else if ( lex_match_id (lexer, "NO")) { cd = false; } else { lex_error_expecting (lexer, "YES", "NO", NULL_SENTINEL); goto exit; } } else if (variant == INSERT && lex_match_id (lexer, "ERROR")) { lex_match (lexer, T_EQUALS); if ( lex_match_id (lexer, "CONTINUE") ) { error_mode = LEX_ERROR_CONTINUE; } else if ( lex_match_id (lexer, "STOP")) { error_mode = LEX_ERROR_STOP; } else { lex_error_expecting (lexer, "CONTINUE", "STOP", NULL_SENTINEL); goto exit; } } else { lex_error (lexer, NULL); goto exit; } } status = lex_end_of_command (lexer); if ( status == CMD_SUCCESS) { struct lex_reader *reader; reader = lex_reader_for_file (filename, encoding, syntax_mode, error_mode); if (reader != NULL) { lex_discard_rest_of_command (lexer); lex_include (lexer, reader); if ( cd ) { char *directory = dir_name (filename); chdir (directory); free (directory); } } } exit: free (encoding); free (filename); return status; } int cmd_include (struct lexer *lexer, struct dataset *ds) { return do_insert (lexer, ds, INCLUDE); } int cmd_insert (struct lexer *lexer, struct dataset *ds) { return do_insert (lexer, ds, INSERT); } pspp-1.0.1/src/language/utilities/cache.c0000644000175000017500000000204012470243700015203 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "language/command.h" #include "language/lexer/lexer.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Parses the CACHE command. */ int cmd_cache (struct lexer *lexer UNUSED, struct dataset *ds UNUSED) { return CMD_SUCCESS; } pspp-1.0.1/src/language/utilities/set.q0000644000175000017500000006462313137223525014774 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include #include "gl/vasnprintf.h" #include "data/casereader.h" #include "data/data-in.h" #include "data/data-out.h" #include "data/dataset.h" #include "data/dictionary.h" #include "data/format.h" #include "data/settings.h" #include "data/value.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "libpspp/compiler.h" #include "libpspp/copyleft.h" #include "libpspp/temp-file.h" #include "libpspp/version.h" #include "libpspp/float-format.h" #include "libpspp/i18n.h" #include "libpspp/integer-format.h" #include "libpspp/message.h" #include "math/random.h" #include "output/driver.h" #include "output/journal.h" #if HAVE_LIBTERMCAP #if HAVE_TERMCAP_H #include #else /* !HAVE_TERMCAP_H */ int tgetent (char *, const char *); int tgetnum (const char *); #endif /* !HAVE_TERMCAP_H */ #endif /* !HAVE_LIBTERMCAP */ #include "xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* (specification) "SET" (stc_): blanks=custom; block=string; boxstring=string; case=size:upper/uplow; cca=string; ccb=string; ccc=string; ccd=string; cce=string; compression=compress:on/off; cpi=integer; decimal=dec:dot/comma; epoch=custom; errors=custom; format=custom; fuzzbits=integer; headers=headers:no/yes/blank; highres=hires:on/off; histogram=string; include=inc:on/off; journal=custom; log=custom; length=custom; locale=custom; lowres=lores:auto/on/off; lpi=integer; menus=menus:standard/extended; messages=custom; mexpand=mexp:on/off; miterate=integer; mnest=integer; mprint=mprint:on/off; mxerrs=integer; mxloops=integer; mxmemory=integer; mxwarns=integer; printback=custom; results=custom; rib=rib:msbfirst/lsbfirst/vax/native; rrb=rrb:native/isl/isb/idl/idb/vf/vd/vg/zs/zl; safer=safe:on; scompression=scompress:on/off; scripttab=string; seed=custom; tnumbers=custom; tvars=custom; tb1=string; tbfonts=string; undefined=undef:warn/nowarn; wib=wib:msbfirst/lsbfirst/vax/native; wrb=wrb:native/isl/isb/idl/idb/vf/vd/vg/zs/zl; width=custom; workspace=integer; xsort=xsort:yes/no. */ /* (headers) */ /* (declarations) */ /* (functions) */ static enum integer_format stc_to_integer_format (int stc); static enum float_format stc_to_float_format (int stc); int cmd_set (struct lexer *lexer, struct dataset *ds) { struct cmd_set cmd; if (!parse_set (lexer, ds, &cmd, NULL)) { return CMD_FAILURE; } if (cmd.sbc_cca) settings_set_cc ( cmd.s_cca, FMT_CCA); if (cmd.sbc_ccb) settings_set_cc ( cmd.s_ccb, FMT_CCB); if (cmd.sbc_ccc) settings_set_cc ( cmd.s_ccc, FMT_CCC); if (cmd.sbc_ccd) settings_set_cc ( cmd.s_ccd, FMT_CCD); if (cmd.sbc_cce) settings_set_cc ( cmd.s_cce, FMT_CCE); if (cmd.sbc_decimal) settings_set_decimal_char (cmd.dec == STC_DOT ? '.' : ','); if (cmd.sbc_fuzzbits) { int fuzzbits = cmd.n_fuzzbits[0]; if (fuzzbits >= 0 && fuzzbits <= 20) settings_set_fuzzbits (fuzzbits); else msg (SE, _("%s must be between 0 and 20."), "FUZZBITS"); } if (cmd.sbc_include) settings_set_include (cmd.inc == STC_ON); if (cmd.sbc_mxerrs) { if (cmd.n_mxerrs[0] >= 1) settings_set_max_messages (MSG_S_ERROR, cmd.n_mxerrs[0]); else msg (SE, _("%s must be at least 1."), "MXERRS"); } if (cmd.sbc_mxloops) { if (cmd.n_mxloops[0] >= 1) settings_set_mxloops (cmd.n_mxloops[0]); else msg (SE, _("%s must be at least 1."), "MXLOOPS"); } if (cmd.sbc_mxwarns) { if (cmd.n_mxwarns[0] >= 0) settings_set_max_messages (MSG_S_WARNING, cmd.n_mxwarns[0]); else msg (SE, _("%s must not be negative."), "MXWARNS"); } if (cmd.sbc_rib) settings_set_input_integer_format (stc_to_integer_format (cmd.rib)); if (cmd.sbc_rrb) settings_set_input_float_format (stc_to_float_format (cmd.rrb)); if (cmd.sbc_safer) settings_set_safer_mode (); if (cmd.sbc_scompression) settings_set_scompression (cmd.scompress == STC_ON); if (cmd.sbc_undefined) settings_set_undefined (cmd.undef == STC_WARN); if (cmd.sbc_wib) settings_set_output_integer_format (stc_to_integer_format (cmd.wib)); if (cmd.sbc_wrb) settings_set_output_float_format (stc_to_float_format (cmd.wrb)); if (cmd.sbc_workspace) { if ( cmd.n_workspace[0] < 1024 && ! settings_get_testing_mode ()) msg (SE, _("%s must be at least 1MB"), "WORKSPACE"); else if (cmd.n_workspace[0] <= 0) msg (SE, _("%s must be positive"), "WORKSPACE"); else settings_set_workspace (cmd.n_workspace[0] * 1024L); } if (cmd.sbc_block) msg (SW, _("%s is obsolete."), "BLOCK"); if (cmd.sbc_boxstring) msg (SW, _("%s is obsolete."), "BOXSTRING"); if (cmd.sbc_cpi) msg (SW, _("%s is obsolete."), "CPI"); if (cmd.sbc_histogram) msg (SW, _("%s is obsolete."), "HISTOGRAM"); if (cmd.sbc_lpi) msg (SW, _("%s is obsolete."), "LPI"); if (cmd.sbc_menus) msg (SW, _("%s is obsolete."), "MENUS"); if (cmd.sbc_xsort) msg (SW, _("%s is obsolete."), "XSORT"); if (cmd.sbc_mxmemory) msg (SE, _("%s is obsolete."), "MXMEMORY"); if (cmd.sbc_scripttab) msg (SE, _("%s is obsolete."), "SCRIPTTAB"); if (cmd.sbc_tbfonts) msg (SW, _("%s is obsolete."), "TBFONTS"); if (cmd.sbc_tb1 && cmd.s_tb1) msg (SW, _("%s is obsolete."), "TB1"); if (cmd.sbc_case) msg (SW, _("%s is not yet implemented."), "CASE"); if (cmd.sbc_compression) msg (SW, _("Active file compression is not implemented.")); free_set (&cmd); return CMD_SUCCESS; } /* Returns the integer_format value corresponding to STC, which should be the value of cmd.rib or cmd.wib. */ static enum integer_format stc_to_integer_format (int stc) { return (stc == STC_MSBFIRST ? INTEGER_MSB_FIRST : stc == STC_LSBFIRST ? INTEGER_LSB_FIRST : stc == STC_VAX ? INTEGER_VAX : INTEGER_NATIVE); } /* Returns the float_format value corresponding to STC, which should be the value of cmd.rrb or cmd.wrb. */ static enum float_format stc_to_float_format (int stc) { switch (stc) { case STC_NATIVE: return FLOAT_NATIVE_DOUBLE; case STC_ISL: return FLOAT_IEEE_SINGLE_LE; case STC_ISB: return FLOAT_IEEE_SINGLE_BE; case STC_IDL: return FLOAT_IEEE_DOUBLE_LE; case STC_IDB: return FLOAT_IEEE_DOUBLE_BE; case STC_VF: return FLOAT_VAX_F; case STC_VD: return FLOAT_VAX_D; case STC_VG: return FLOAT_VAX_G; case STC_ZS: return FLOAT_Z_SHORT; case STC_ZL: return FLOAT_Z_LONG; } NOT_REACHED (); } static int set_output_routing (struct lexer *lexer, enum settings_output_type type) { enum settings_output_devices devices; lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "ON") || lex_match_id (lexer, "BOTH")) devices = SETTINGS_DEVICE_LISTING | SETTINGS_DEVICE_TERMINAL; else if (lex_match_id (lexer, "TERMINAL")) devices = SETTINGS_DEVICE_TERMINAL; else if (lex_match_id (lexer, "LISTING")) devices = SETTINGS_DEVICE_LISTING; else if (lex_match_id (lexer, "OFF") || lex_match_id (lexer, "NONE")) devices = 0; else { lex_error (lexer, NULL); return 0; } settings_set_output_routing (type, devices); return 1; } /* Parses the BLANKS subcommand, which controls the value that completely blank fields in numeric data imply. X, Wnd: Syntax is SYSMIS or a numeric value. */ static int stc_custom_blanks (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "SYSMIS")) { lex_get (lexer); settings_set_blanks (SYSMIS); } else { if (!lex_force_num (lexer)) return 0; settings_set_blanks (lex_number (lexer)); lex_get (lexer); } return 1; } static int stc_custom_tnumbers (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "VALUES")) { settings_set_value_style (SETTINGS_VAL_STYLE_VALUES); } else if (lex_match_id (lexer, "LABELS")) { settings_set_value_style (SETTINGS_VAL_STYLE_LABELS); } else if (lex_match_id (lexer, "BOTH")) { settings_set_value_style (SETTINGS_VAL_STYLE_BOTH); } else { lex_error_expecting (lexer, "VALUES", "LABELS", "BOTH", NULL_SENTINEL); return 0; } return 1; } static int stc_custom_tvars (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "NAMES")) { settings_set_var_style (SETTINGS_VAR_STYLE_NAMES); } else if (lex_match_id (lexer, "LABELS")) { settings_set_var_style (SETTINGS_VAR_STYLE_LABELS); } else if (lex_match_id (lexer, "BOTH")) { settings_set_var_style (SETTINGS_VAR_STYLE_BOTH); } else { lex_error_expecting (lexer, "NAMES", "LABELS", "BOTH", NULL_SENTINEL); return 0; } return 1; } /* Parses the EPOCH subcommand, which controls the epoch used for parsing 2-digit years. */ static int stc_custom_epoch (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "AUTOMATIC")) settings_set_epoch (-1); else if (lex_is_integer (lexer)) { int new_epoch = lex_integer (lexer); lex_get (lexer); if (new_epoch < 1500) { msg (SE, _("%s must be 1500 or later."), "EPOCH"); return 0; } settings_set_epoch (new_epoch); } else { lex_error (lexer, _("expecting %s or year"), "AUTOMATIC"); return 0; } return 1; } static int stc_custom_errors (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { return set_output_routing (lexer, SETTINGS_OUTPUT_ERROR); } static int stc_custom_length (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { int page_length; lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "NONE")) page_length = -1; else { if (!lex_force_int (lexer)) return 0; if (lex_integer (lexer) < 1) { msg (SE, _("%s must be at least %d."), "LENGTH", 1); return 0; } page_length = lex_integer (lexer); lex_get (lexer); } if (page_length != -1) settings_set_viewlength (page_length); return 1; } static int stc_custom_locale (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { const char *s; lex_match (lexer, T_EQUALS); if ( !lex_force_string (lexer)) return 0; s = lex_tokcstr (lexer); /* First try this string as an encoding name */ if ( valid_encoding (s)) set_default_encoding (s); /* Now try as a locale name (or alias) */ else if (set_encoding_from_locale (s)) { } else { msg (ME, _("%s is not a recognized encoding or locale name"), s); return 0; } lex_get (lexer); return 1; } static int stc_custom_messages (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { return set_output_routing (lexer, SETTINGS_OUTPUT_NOTE); } static int stc_custom_printback (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { return set_output_routing (lexer, SETTINGS_OUTPUT_SYNTAX); } static int stc_custom_results (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { return set_output_routing (lexer, SETTINGS_OUTPUT_RESULT); } static int stc_custom_seed (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "RANDOM")) set_rng (time (0)); else { if (!lex_force_num (lexer)) return 0; set_rng (lex_number (lexer)); lex_get (lexer); } return 1; } static int stc_custom_width (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "NARROW")) settings_set_viewwidth (79); else if (lex_match_id (lexer, "WIDE")) settings_set_viewwidth (131); else { if (!lex_force_int (lexer)) return 0; if (lex_integer (lexer) < 40) { msg (SE, _("%s must be at least %d."), "WIDTH", 40); return 0; } settings_set_viewwidth (lex_integer (lexer)); lex_get (lexer); } return 1; } /* Parses FORMAT subcommand, which consists of a numeric format specifier. */ static int stc_custom_format (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { struct fmt_spec fmt; lex_match (lexer, T_EQUALS); if (!parse_format_specifier (lexer, &fmt)) return 0; if (!fmt_check_output (&fmt)) return 0; if (fmt_is_string (fmt.type)) { char str[FMT_STRING_LEN_MAX + 1]; msg (SE, _("%s requires numeric output format as an argument. " "Specified format %s is of type string."), "FORMAT", fmt_to_string (&fmt, str)); return 0; } settings_set_format (&fmt); return 1; } static int stc_custom_journal (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { lex_match (lexer, T_EQUALS); if (lex_match_id (lexer, "ON") || lex_match_id (lexer, "YES")) journal_enable (); else if (lex_match_id (lexer, "OFF") || lex_match_id (lexer, "NO")) journal_disable (); else if (lex_is_string (lexer) || lex_token (lexer) == T_ID) { char *filename = utf8_to_filename (lex_tokcstr (lexer)); journal_set_file_name (filename); free (filename); lex_get (lexer); } else { lex_error (lexer, NULL); return 0; } return 1; } static int stc_custom_log (struct lexer *lexer, struct dataset *ds UNUSED, struct cmd_set *cmd UNUSED, void *aux UNUSED) { return stc_custom_journal (lexer, ds, cmd, aux); } static char * show_output_routing (enum settings_output_type type) { enum settings_output_devices devices; const char *s; devices = settings_get_output_routing (type); if (devices & SETTINGS_DEVICE_LISTING) s = devices & SETTINGS_DEVICE_TERMINAL ? "BOTH" : "LISTING"; else if (devices & SETTINGS_DEVICE_TERMINAL) s = "TERMINAL"; else s = "NONE"; return xstrdup (s); } static char * show_blanks (const struct dataset *ds UNUSED) { return (settings_get_blanks () == SYSMIS ? xstrdup ("SYSMIS") : xasprintf ("%.*g", DBL_DIG + 1, settings_get_blanks ())); } static void format_cc (struct string *out, const char *in, char grouping) { while (*in != '\0') { char c = *in++; if (c == grouping || c == '\'') ds_put_byte (out, '\''); else if (c == '"') ds_put_byte (out, '"'); ds_put_byte (out, c); } } static char * show_cc (enum fmt_type type) { const struct fmt_number_style *cc = settings_get_style (type); struct string out; ds_init_empty (&out); format_cc (&out, cc->neg_prefix.s, cc->grouping); ds_put_byte (&out, cc->grouping); format_cc (&out, cc->prefix.s, cc->grouping); ds_put_byte (&out, cc->grouping); format_cc (&out, cc->suffix.s, cc->grouping); ds_put_byte (&out, cc->grouping); format_cc (&out, cc->neg_suffix.s, cc->grouping); return ds_cstr (&out); } static char * show_cca (const struct dataset *ds UNUSED) { return show_cc (FMT_CCA); } static char * show_ccb (const struct dataset *ds UNUSED) { return show_cc (FMT_CCB); } static char * show_ccc (const struct dataset *ds UNUSED) { return show_cc (FMT_CCC); } static char * show_ccd (const struct dataset *ds UNUSED) { return show_cc (FMT_CCD); } static char * show_cce (const struct dataset *ds UNUSED) { return show_cc (FMT_CCE); } static char * show_decimals (const struct dataset *ds UNUSED) { return xasprintf ("`%c'", settings_get_decimal_char (FMT_F)); } static char * show_errors (const struct dataset *ds UNUSED) { return show_output_routing (SETTINGS_OUTPUT_ERROR); } static char * show_format (const struct dataset *ds UNUSED) { char str[FMT_STRING_LEN_MAX + 1]; return xstrdup (fmt_to_string (settings_get_format (), str)); } static char * show_fuzzbits (const struct dataset *ds UNUSED) { return xasprintf ("%d", settings_get_fuzzbits ()); } static char * show_journal (const struct dataset *ds UNUSED) { return (journal_is_enabled () ? xasprintf ("\"%s\"", journal_get_file_name ()) : xstrdup ("disabled")); } static char * show_length (const struct dataset *ds UNUSED) { return xasprintf ("%d", settings_get_viewlength ()); } static char * show_locale (const struct dataset *ds UNUSED) { return xstrdup (get_default_encoding ()); } static char * show_messages (const struct dataset *ds UNUSED) { return show_output_routing (SETTINGS_OUTPUT_NOTE); } static char * show_printback (const struct dataset *ds UNUSED) { return show_output_routing (SETTINGS_OUTPUT_SYNTAX); } static char * show_results (const struct dataset *ds UNUSED) { return show_output_routing (SETTINGS_OUTPUT_RESULT); } static char * show_mxerrs (const struct dataset *ds UNUSED) { return xasprintf ("%d", settings_get_max_messages (MSG_S_ERROR)); } static char * show_mxloops (const struct dataset *ds UNUSED) { return xasprintf ("%d", settings_get_mxloops ()); } static char * show_mxwarns (const struct dataset *ds UNUSED) { return xasprintf ("%d", settings_get_max_messages (MSG_S_WARNING)); } /* Returns a name for the given INTEGER_FORMAT value. */ static char * show_integer_format (enum integer_format integer_format) { return xasprintf ("%s (%s)", (integer_format == INTEGER_MSB_FIRST ? "MSBFIRST" : integer_format == INTEGER_LSB_FIRST ? "LSBFIRST" : "VAX"), integer_format == INTEGER_NATIVE ? "NATIVE" : "nonnative"); } /* Returns a name for the given FLOAT_FORMAT value. */ static char * show_float_format (enum float_format float_format) { const char *format_name = ""; switch (float_format) { case FLOAT_IEEE_SINGLE_LE: format_name = _("ISL (32-bit IEEE 754 single, little-endian)"); break; case FLOAT_IEEE_SINGLE_BE: format_name = _("ISB (32-bit IEEE 754 single, big-endian)"); break; case FLOAT_IEEE_DOUBLE_LE: format_name = _("IDL (64-bit IEEE 754 double, little-endian)"); break; case FLOAT_IEEE_DOUBLE_BE: format_name = _("IDB (64-bit IEEE 754 double, big-endian)"); break; case FLOAT_VAX_F: format_name = _("VF (32-bit VAX F, VAX-endian)"); break; case FLOAT_VAX_D: format_name = _("VD (64-bit VAX D, VAX-endian)"); break; case FLOAT_VAX_G: format_name = _("VG (64-bit VAX G, VAX-endian)"); break; case FLOAT_Z_SHORT: format_name = _("ZS (32-bit IBM Z hexadecimal short, big-endian)"); break; case FLOAT_Z_LONG: format_name = _("ZL (64-bit IBM Z hexadecimal long, big-endian)"); break; case FLOAT_FP: case FLOAT_HEX: NOT_REACHED (); } return xasprintf ("%s (%s)", format_name, (float_format == FLOAT_NATIVE_DOUBLE ? "NATIVE" : "nonnative")); } static char * show_rib (const struct dataset *ds UNUSED) { return show_integer_format (settings_get_input_integer_format ()); } static char * show_rrb (const struct dataset *ds UNUSED) { return show_float_format (settings_get_input_float_format ()); } static char * show_scompression (const struct dataset *ds UNUSED) { return xstrdup (settings_get_scompression () ? "ON" : "OFF"); } static char * show_undefined (const struct dataset *ds UNUSED) { return xstrdup (settings_get_undefined () ? "WARN" : "NOWARN"); } static char * show_weight (const struct dataset *ds) { const struct variable *var = dict_get_weight (dataset_dict (ds)); return xstrdup (var != NULL ? var_get_name (var) : "OFF"); } static char * show_wib (const struct dataset *ds UNUSED) { return show_integer_format (settings_get_output_integer_format ()); } static char * show_wrb (const struct dataset *ds UNUSED) { return show_float_format (settings_get_output_float_format ()); } static char * show_width (const struct dataset *ds UNUSED) { return xasprintf ("%d", settings_get_viewwidth ()); } static char * show_workspace (const struct dataset *ds UNUSED) { size_t ws = settings_get_workspace () / 1024L; return xasprintf ("%zu", ws); } static char * show_current_directory (const struct dataset *ds UNUSED) { char *buf = NULL; char *wd = NULL; size_t len = 256; do { len <<= 1; buf = xrealloc (buf, len); } while (NULL == (wd = getcwd (buf, len))); return wd; } static char * show_tempdir (const struct dataset *ds UNUSED) { return strdup (temp_dir_name ()); } static char * show_version (const struct dataset *ds UNUSED) { return strdup (announced_version); } static char * show_system (const struct dataset *ds UNUSED) { return strdup (host_system); } static char * show_n (const struct dataset *ds) { casenumber n; size_t l; const struct casereader *reader = dataset_source (ds); if (reader == NULL) return strdup (_("Unknown")); n = casereader_count_cases (reader); return asnprintf (NULL, &l, "%ld", n); } struct show_sbc { const char *name; char *(*function) (const struct dataset *); }; const struct show_sbc show_table[] = { {"BLANKS", show_blanks}, {"CCA", show_cca}, {"CCB", show_ccb}, {"CCC", show_ccc}, {"CCD", show_ccd}, {"CCE", show_cce}, {"DECIMALS", show_decimals}, {"DIRECTORY", show_current_directory}, {"ENVIRONMENT", show_system}, {"ERRORS", show_errors}, {"FORMAT", show_format}, {"FUZZBITS", show_fuzzbits}, {"JOURNAL", show_journal}, {"LENGTH", show_length}, {"LOCALE", show_locale}, {"MESSAGES", show_messages}, {"MXERRS", show_mxerrs}, {"MXLOOPS", show_mxloops}, {"MXWARNS", show_mxwarns}, {"N", show_n}, {"PRINTBACk", show_printback}, {"RESULTS", show_results}, {"RIB", show_rib}, {"RRB", show_rrb}, {"SCOMPRESSION", show_scompression}, {"TEMPDIR", show_tempdir}, {"UNDEFINED", show_undefined}, {"VERSION", show_version}, {"WEIGHT", show_weight}, {"WIB", show_wib}, {"WRB", show_wrb}, {"WIDTH", show_width}, {"WORKSPACE", show_workspace}, }; static void do_show (const struct dataset *ds, const struct show_sbc *sbc) { char *value = sbc->function (ds); msg (SN, _("%s is %s."), sbc->name, value); free (value); } static void show_all (const struct dataset *ds) { size_t i; for (i = 0; i < sizeof show_table / sizeof *show_table; i++) do_show (ds, &show_table[i]); } static void show_all_cc (const struct dataset *ds) { int i; for (i = 0; i < sizeof show_table / sizeof *show_table; i++) { const struct show_sbc *sbc = &show_table[i]; if (!strncmp (sbc->name, "CC", 2)) do_show (ds, sbc); } } static void show_warranty (const struct dataset *ds UNUSED) { fputs (lack_of_warranty, stdout); } static void show_copying (const struct dataset *ds UNUSED) { fputs (copyleft, stdout); } int cmd_show (struct lexer *lexer, struct dataset *ds) { if (lex_token (lexer) == T_ENDCMD) { show_all (ds); return CMD_SUCCESS; } do { if (lex_match (lexer, T_ALL)) show_all (ds); else if (lex_match_id (lexer, "CC")) show_all_cc (ds); else if (lex_match_id (lexer, "WARRANTY")) show_warranty (ds); else if (lex_match_id (lexer, "COPYING") || lex_match_id (lexer, "LICENSE")) show_copying (ds); else if (lex_token (lexer) == T_ID) { int i; for (i = 0; i < sizeof show_table / sizeof *show_table; i++) { const struct show_sbc *sbc = &show_table[i]; if (lex_match_id (lexer, sbc->name)) { do_show (ds, sbc); goto found; } } lex_error (lexer, NULL); return CMD_FAILURE; found: ; } else { lex_error (lexer, NULL); return CMD_FAILURE; } lex_match (lexer, T_SLASH); } while (lex_token (lexer) != T_ENDCMD); return CMD_SUCCESS; } #define MAX_SAVED_SETTINGS 5 static struct settings *saved_settings[MAX_SAVED_SETTINGS]; static int n_saved_settings; int cmd_preserve (struct lexer *lexer UNUSED, struct dataset *ds UNUSED) { if (n_saved_settings < MAX_SAVED_SETTINGS) { saved_settings[n_saved_settings++] = settings_get (); return CMD_SUCCESS; } else { msg (SE, _("Too many %s commands without a %s: at most " "%d levels of saved settings are allowed."), "PRESERVE", "RESTORE", MAX_SAVED_SETTINGS); return CMD_CASCADING_FAILURE; } } int cmd_restore (struct lexer *lexer UNUSED, struct dataset *ds UNUSED) { if (n_saved_settings > 0) { struct settings *s = saved_settings[--n_saved_settings]; settings_set (s); settings_destroy (s); return CMD_SUCCESS; } else { msg (SE, _("%s without matching %s."), "RESTORE", "PRESERVE"); return CMD_FAILURE; } } /* Local Variables: mode: c End: */ pspp-1.0.1/src/language/utilities/output.c0000644000175000017500000001062413137223525015513 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/dataset.h" #include "data/settings.h" #include "data/format.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/format-parser.h" #include "libpspp/message.h" #include "libpspp/version.h" #include "output/tab.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct thing { const char *identifier; enum result_class rc; }; extern struct fmt_spec ugly [n_RC]; static const struct thing things[] = { {"SIGNIFICANCE", RC_PVALUE}, {"COUNT" ,RC_WEIGHT} }; #define N_THINGS (sizeof (things) / sizeof (struct thing)) struct output_spec { /* An array of classes */ enum result_class *rc; int n_rc; /* The format to be applied to these classes */ struct fmt_spec fmt; }; int cmd_output (struct lexer *lexer, struct dataset *ds UNUSED) { int j, i; struct output_spec *output_specs = NULL; int n_os = 0; if (!lex_force_match_id (lexer, "MODIFY")) { lex_error (lexer, NULL); goto error; } while (lex_token (lexer) != T_ENDCMD) { lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "SELECT")) { if (!lex_match_id (lexer, "TABLES")) { lex_error (lexer, NULL); goto error; } } else if (lex_match_id (lexer, "TABLECELLS")) { struct output_spec *os; output_specs = xrealloc (output_specs, sizeof (*output_specs) * ++n_os); os = &output_specs[n_os - 1]; os->n_rc = 0; os->rc = NULL; bool format = false; while (lex_token (lexer) != T_SLASH && lex_token (lexer) != T_ENDCMD) { if (lex_match_id (lexer, "SELECT")) { if (! lex_force_match (lexer, T_EQUALS)) goto error; if (! lex_force_match (lexer, T_LBRACK)) goto error; while (lex_token (lexer) != T_RBRACK && lex_token (lexer) != T_ENDCMD) { int i; for (i = 0 ; i < N_THINGS; ++i) { if (lex_match_id (lexer, things[i].identifier)) { os->rc = xrealloc (os->rc, sizeof (*os->rc) * ++os->n_rc); os->rc[os->n_rc - 1] = things[i].rc; break; } } if (i >= N_THINGS) { lex_error (lexer, _("Unknown TABLECELLS class")); goto error; } } if (! lex_force_match (lexer, T_RBRACK)) goto error; } else if (lex_match_id (lexer, "FORMAT")) { struct fmt_spec fmt; char type[FMT_TYPE_LEN_MAX + 1]; int width = -1; int decimals = -1; if (! lex_force_match (lexer, T_EQUALS)) goto error; if (! parse_abstract_format_specifier (lexer, type, &width, &decimals)) { lex_error (lexer, NULL); goto error; } if (width <= 0) { const struct fmt_spec *dflt = settings_get_format (); width = dflt->w; } if (!fmt_from_name (type, &fmt.type)) { lex_error (lexer, _("Unknown format type `%s'."), type); goto error; } fmt.w = width; fmt.d = decimals; os->fmt = fmt; format = true; } else { lex_error (lexer, NULL); goto error; } } if (!format) goto error; } else { lex_error (lexer, NULL); goto error; } } /* Populate the global table, with the values we parsed */ for (i = 0; i < n_os; ++i) { for (j = 0; j < output_specs[i].n_rc; ++j) { ugly [output_specs[i].rc[j]] = output_specs[i].fmt; } } for (j = 0; j < n_os; ++j) free (output_specs[j].rc); free (output_specs); return CMD_SUCCESS; error: for (j = 0; j < n_os; ++j) free (output_specs[j].rc); free (output_specs); return CMD_SUCCESS; } pspp-1.0.1/src/language/utilities/cd.c0000644000175000017500000000271112470243700014533 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/command.h" #include #include #include "language/lexer/lexer.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Parses the CD command. */ int cmd_cd (struct lexer *lexer, struct dataset *ds UNUSED) { char *path = 0; if ( ! lex_force_string (lexer)) goto error; path = utf8_to_filename (lex_tokcstr (lexer)); if ( -1 == chdir (path) ) { int err = errno; msg (SE, _("Cannot change directory to %s: %s "), path, strerror (err)); goto error; } free (path); lex_get (lexer); return CMD_SUCCESS; error: free(path); return CMD_FAILURE; } pspp-1.0.1/src/language/utilities/host.c0000644000175000017500000001010012523704223015112 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #if HAVE_SYS_WAIT_H #include #endif #include "data/settings.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "gl/localcharset.h" #include "gl/xalloc.h" #include "gl/xmalloca.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid #if HAVE_FORK && HAVE_EXECL /* Spawn an interactive shell process. */ static bool shell (void) { int pid; pid = fork (); switch (pid) { case 0: { const char *shell_fn; char *shell_process; { int i; for (i = 3; i < 20; i++) close (i); } shell_fn = getenv ("SHELL"); if (shell_fn == NULL) shell_fn = "/bin/sh"; { const char *cp = strrchr (shell_fn, '/'); cp = cp ? &cp[1] : shell_fn; shell_process = xmalloca (strlen (cp) + 8); strcpy (shell_process, "-"); strcat (shell_process, cp); if (strcmp (cp, "sh")) shell_process[0] = '+'; } execl (shell_fn, shell_process, NULL); _exit (1); } case -1: msg (SE, _("Couldn't fork: %s."), strerror (errno)); return false; default: assert (pid > 0); while (wait (NULL) != pid) ; return true; } } #else /* !(HAVE_FORK && HAVE_EXECL) */ /* Don't know how to spawn an interactive shell. */ static bool shell (void) { msg (SE, _("Interactive shell not supported on this platform.")); return false; } #endif /* Executes the specified COMMAND in a subshell. Returns true if successful, false otherwise. */ static bool run_command (const char *command) { if (system (NULL) == 0) { msg (SE, _("Command shell not supported on this platform.")); return false; } /* Execute the command. */ if (system (command) == -1) msg (SE, _("Error executing command: %s."), strerror (errno)); return true; } int cmd_host (struct lexer *lexer, struct dataset *ds UNUSED) { if (settings_get_safer_mode ()) { msg (SE, _("This command not allowed when the %s option is set."), "SAFER"); return CMD_FAILURE; } if (lex_token (lexer) == T_ENDCMD) return shell () ? CMD_SUCCESS : CMD_FAILURE; else if (lex_match_id (lexer, "COMMAND")) { struct string command; char *locale_command; bool ok; lex_match (lexer, T_EQUALS); if (!lex_force_match (lexer, T_LBRACK)) return CMD_FAILURE; ds_init_empty (&command); while (lex_is_string (lexer)) { if (!ds_is_empty (&command)) ds_put_byte (&command, '\n'); ds_put_substring (&command, lex_tokss (lexer)); lex_get (lexer); } if (!lex_force_match (lexer, T_RBRACK)) { ds_destroy (&command); return CMD_FAILURE; } locale_command = recode_string (locale_charset (), "UTF-8", ds_cstr (&command), ds_length (&command)); ds_destroy (&command); ok = run_command (locale_command); free (locale_command); return ok ? CMD_SUCCESS : CMD_FAILURE; } else { lex_error (lexer, NULL); return CMD_FAILURE; } } pspp-1.0.1/src/language/utilities/title.c0000644000175000017500000000565412470243700015277 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2007, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/variable.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "libpspp/start-date.h" #include "libpspp/version.h" #include "output/text-item.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) static int parse_title (struct lexer *, enum text_item_type); static void set_title (const char *title, enum text_item_type); int cmd_title (struct lexer *lexer, struct dataset *ds UNUSED) { return parse_title (lexer, TEXT_ITEM_TITLE); } int cmd_subtitle (struct lexer *lexer, struct dataset *ds UNUSED) { return parse_title (lexer, TEXT_ITEM_SUBTITLE); } static int parse_title (struct lexer *lexer, enum text_item_type type) { if (!lex_force_string (lexer)) return CMD_FAILURE; set_title (lex_tokcstr (lexer), type); lex_get (lexer); return CMD_SUCCESS; } static void set_title (const char *title, enum text_item_type type) { text_item_submit (text_item_create (type, title)); } /* Performs the FILE LABEL command. */ int cmd_file_label (struct lexer *lexer, struct dataset *ds) { if (!lex_force_string (lexer)) return CMD_FAILURE; dict_set_label (dataset_dict (ds), lex_tokcstr (lexer)); lex_get (lexer); return CMD_SUCCESS; } /* Performs the DOCUMENT command. */ int cmd_document (struct lexer *lexer, struct dataset *ds) { struct dictionary *dict = dataset_dict (ds); char *trailer; if (!lex_force_string (lexer)) return CMD_FAILURE; while (lex_is_string (lexer)) { dict_add_document_line (dict, lex_tokcstr (lexer), true); lex_get (lexer); } trailer = xasprintf (_(" (Entered %s)"), get_start_date ()); dict_add_document_line (dict, trailer, true); free (trailer); return CMD_SUCCESS; } /* Performs the ADD DOCUMENTS command. */ int cmd_add_documents (struct lexer *lexer, struct dataset *ds) { return cmd_document (lexer, ds); } /* Performs the DROP DOCUMENTS command. */ int cmd_drop_documents (struct lexer *lexer UNUSED, struct dataset *ds) { dict_clear_documents (dataset_dict (ds)); return CMD_SUCCESS; } pspp-1.0.1/src/language/utilities/automake.mk0000644000175000017500000000257613137223525016155 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- src_language_utilities_built_sources = \ src/language/utilities/set.c language_utilities_sources = \ src/language/utilities/cache.c \ src/language/utilities/cd.c \ src/language/utilities/date.c \ src/language/utilities/echo.c \ src/language/utilities/host.c \ src/language/utilities/title.c \ src/language/utilities/include.c \ src/language/utilities/output.c \ src/language/utilities/permissions.c all_q_sources += $(src_language_utilities_built_sources:.c=.q) EXTRA_DIST += $(src_language_utilities_built_sources:.c=.q) CLEANFILES += $(src_language_utilities_built_sources) pspp-1.0.1/src/language/utilities/echo.c0000644000175000017500000000232512470242646015074 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "output/text-item.h" #include "gl/xalloc.h" /* Echos a string to the output stream */ int cmd_echo (struct lexer *lexer, struct dataset *ds UNUSED) { if (!lex_force_string (lexer)) return CMD_FAILURE; text_item_submit (text_item_create (TEXT_ITEM_ECHO, lex_tokcstr (lexer))); lex_get (lexer); return CMD_SUCCESS; } pspp-1.0.1/src/language/utilities/permissions.c0000644000175000017500000000601113137223525016521 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #include "data/settings.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/cast.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/misc.h" #include "libpspp/str.h" #include "gettext.h" #define _(msgid) gettext (msgid) enum PER {PER_RO, PER_RW}; int change_permissions(const char *file_name, enum PER per); /* Parses the PERMISSIONS command. */ int cmd_permissions (struct lexer *lexer, struct dataset *ds UNUSED) { char *fn = NULL; const char *str = NULL; lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "FILE")) lex_match (lexer, T_EQUALS); str = lex_tokcstr (lexer); if (str) fn = strdup (str); if (!lex_force_match (lexer, T_STRING) || str == NULL) goto error; lex_match (lexer, T_SLASH); if ( ! lex_match_id (lexer, "PERMISSIONS")) goto error; lex_match (lexer, T_EQUALS); if ( lex_match_id (lexer, "READONLY")) { if (! change_permissions (fn, PER_RO)) goto error; } else if (lex_match_id (lexer, "WRITEABLE")) { if (! change_permissions (fn, PER_RW )) goto error; } else { lex_error_expecting (lexer, "WRITEABLE", "READONLY", NULL_SENTINEL); goto error; } free (fn); return CMD_SUCCESS; error: free(fn); return CMD_FAILURE; } int change_permissions (const char *file_name, enum PER per) { char *locale_file_name; struct stat buf; mode_t mode; if (settings_get_safer_mode ()) { msg (SE, _("This command not allowed when the %s option is set."), "SAFER"); return 0; } locale_file_name = utf8_to_filename (file_name); if ( -1 == stat(locale_file_name, &buf) ) { const int errnum = errno; msg (SE, _("Cannot stat %s: %s"), file_name, strerror(errnum)); free (locale_file_name); return 0; } if ( per == PER_RW ) mode = buf.st_mode | 0200; else mode = buf.st_mode & ~0222; if ( -1 == chmod(locale_file_name, mode)) { const int errnum = errno; msg (SE, _("Cannot change mode of %s: %s"), file_name, strerror(errnum)); free (locale_file_name); return 0; } free (locale_file_name); return 1; } pspp-1.0.1/src/ui/0000755000175000017500000000000013150620333010674 500000000000000pspp-1.0.1/src/ui/syntax-gen.h0000644000175000017500000000330312470243701013065 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SYNTAX_GEN_H #define SYNTAX_GEN_H 1 /* These functions aid in composing PSPP syntax. */ #include #include #include "libpspp/compiler.h" #include "libpspp/str.h" struct fmt_spec; struct substring; struct string; union value; void syntax_gen_string (struct string *output, struct substring in); void syntax_gen_number (struct string *output, double, const struct fmt_spec *format); void syntax_gen_value (struct string *output, const union value *value, int width, const struct fmt_spec *format); void syntax_gen_num_range (struct string *output, double low, double high, const struct fmt_spec *format); void syntax_gen_pspp_valist (struct string *output, const char *format, va_list) PRINTF_FORMAT (2, 0); void syntax_gen_pspp (struct string *output, const char *format, ...) PRINTF_FORMAT (2, 3); #endif /* format-syntax.h */ pspp-1.0.1/src/ui/source-init-opts.c0000644000175000017500000000562412642117700014217 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2008, 2010, 2014 Free Software Foundation 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 . */ #include #include "source-init-opts.h" #include #include #include #include "data/settings.h" #include "language/lexer/include-path.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/argv-parser.h" #include "libpspp/llx.h" #include "libpspp/message.h" #include "ui/syntax-gen.h" #include "gl/error.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid enum { OPT_ALGORITHM, OPT_INCLUDE, OPT_NO_INCLUDE, OPT_SAFER, OPT_SYNTAX, N_SOURCE_INIT_OPTIONS }; static const struct argv_option source_init_options[N_SOURCE_INIT_OPTIONS] = { {"algorithm", 'a', required_argument, OPT_ALGORITHM}, {"include", 'I', required_argument, OPT_INCLUDE}, {"no-include", 0, no_argument, OPT_NO_INCLUDE}, {"safer", 's', no_argument, OPT_SAFER}, {"syntax", 'x', required_argument, OPT_SYNTAX}, }; static void source_init_option_callback (int id, void *aux UNUSED) { switch (id) { case OPT_ALGORITHM: if (!strcmp (optarg, "compatible")) settings_set_algorithm (COMPATIBLE); else if (!strcmp (optarg, "enhanced")) settings_set_algorithm (ENHANCED); else error (1, 0, _("Algorithm must be either `%s' or `%s'."), "compatible", "enhanced"); break; case OPT_INCLUDE: if (!strcmp (optarg, "-")) include_path_clear (); else include_path_add (optarg); break; case OPT_NO_INCLUDE: include_path_clear (); break; case OPT_SAFER: settings_set_safer_mode (); break; case OPT_SYNTAX: if (!strcmp (optarg, "compatible") ) settings_set_syntax (COMPATIBLE); else if (!strcmp (optarg, "enhanced")) settings_set_syntax (ENHANCED); else error (1, 0, _("Syntax must be either `%s' or `%s'."), "compatible", "enhanced"); break; default: NOT_REACHED (); } } void source_init_register_argv_parser (struct argv_parser *ap) { argv_parser_add_options (ap, source_init_options, N_SOURCE_INIT_OPTIONS, source_init_option_callback, NULL); } pspp-1.0.1/src/ui/source-init-opts.h0000644000175000017500000000165512470243701014224 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2008, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef UI_SOURCE_INIT_OPTS #define UI_SOURCE_INIT_OPTS struct argv_parser; void source_init_register_argv_parser (struct argv_parser *); #endif /* ui/source/source-init-opts.h */ pspp-1.0.1/src/ui/terminal/0000755000175000017500000000000013150620333012507 500000000000000pspp-1.0.1/src/ui/terminal/terminal.c0000644000175000017500000000342313137223525014417 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2007, 2010, 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "ui/terminal/terminal.h" #include #include #include "data/settings.h" #include "libpspp/compiler.h" #include "gl/error.h" #include "gettext.h" #ifdef HAVE_TERMIOS_H # include #endif #ifdef GWINSZ_IN_SYS_IOCTL # include #endif #define _(msgid) gettext (msgid) /* Determines the size of the terminal, if possible, or at least takes an educated guess. */ void terminal_check_size (void) { int view_width = 0; int view_length = 0; #ifdef HAVE_TERMIOS_H struct winsize ws; if (0 == ioctl (0, TIOCGWINSZ, &ws)) { view_width = ws.ws_col; view_length = ws.ws_row; } else #endif { if (view_width <= 0 && getenv ("COLUMNS") != NULL) view_width = atoi (getenv ("COLUMNS")); if (view_length <= 0 && getenv ("LINES") != NULL) view_length = atoi (getenv ("LINES")); } if (view_width > 0) settings_set_viewwidth (view_width); if (view_length > 0) settings_set_viewlength (view_length); } pspp-1.0.1/src/ui/terminal/main.c0000644000175000017500000001470112642117700013526 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-2000, 2006-2007, 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #if HAVE_FPU_CONTROL_H #include #endif #if HAVE_FENV_H #include #endif #if HAVE_IEEEFP_H #include #endif #include #include "data/dataset.h" #include "data/dictionary.h" #include "data/file-handle-def.h" #include "data/session.h" #include "data/settings.h" #include "data/variable.h" #include "gsl/gsl_errno.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "language/lexer/include-path.h" #include "libpspp/argv-parser.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/version.h" #include "math/random.h" #include "output/driver.h" #include "output/message-item.h" #include "ui/source-init-opts.h" #include "ui/terminal/terminal-opts.h" #include "ui/terminal/terminal-reader.h" #include "ui/terminal/terminal.h" #include "gl/fatal-signal.h" #include "gl/progname.h" #include "gl/relocatable.h" #include "gettext.h" #define _(msgid) gettext (msgid) static struct session *the_session; static void add_syntax_reader (struct lexer *, const char *file_name, const char *encoding, enum lex_syntax_mode); static void bug_handler(int sig); static void fpu_init (void); static void output_msg (const struct msg *, void *); /* Program entry point. */ int main (int argc, char **argv) { struct terminal_opts *terminal_opts; struct argv_parser *parser; enum lex_syntax_mode syntax_mode; char *syntax_encoding; bool process_statrc; struct lexer *lexer; set_program_name (argv[0]); signal (SIGABRT, bug_handler); signal (SIGSEGV, bug_handler); signal (SIGFPE, bug_handler); i18n_init (); fpu_init (); gsl_set_error_handler_off (); output_engine_push (); fh_init (); settings_init (); terminal_check_size (); random_init (); lexer = lex_create (); the_session = session_create (NULL); dataset_create (the_session, ""); parser = argv_parser_create (); terminal_opts = terminal_opts_init (parser, &syntax_mode, &process_statrc, &syntax_encoding); source_init_register_argv_parser (parser); if (!argv_parser_run (parser, argc, argv)) exit (EXIT_FAILURE); terminal_opts_done (terminal_opts, argc, argv); argv_parser_destroy (parser); msg_set_handler (output_msg, lexer); session_set_default_syntax_encoding (the_session, syntax_encoding); /* Add syntax files to source stream. */ if (process_statrc) { char *rc = include_path_search ("rc"); if (rc != NULL) { add_syntax_reader (lexer, rc, "Auto", LEX_SYNTAX_AUTO); free (rc); } } if (optind < argc) { int i; for (i = optind; i < argc; i++) add_syntax_reader (lexer, argv[i], syntax_encoding, syntax_mode); } else add_syntax_reader (lexer, "-", syntax_encoding, syntax_mode); /* Parse and execute syntax. */ lex_get (lexer); for (;;) { int result = cmd_parse (lexer, session_active_dataset (the_session)); if (result == CMD_EOF || result == CMD_FINISH) break; else if (cmd_result_is_failure (result) && lex_token (lexer) != T_STOP) { if (lex_get_error_mode (lexer) == LEX_ERROR_STOP) { msg (MW, _("Error encountered while ERROR=STOP is effective.")); lex_discard_noninteractive (lexer); } else if (result == CMD_CASCADING_FAILURE && lex_get_error_mode (lexer) != LEX_ERROR_TERMINAL) { msg (SE, _("Stopping syntax file processing here to avoid " "a cascade of dependent command failures.")); lex_discard_noninteractive (lexer); } } if (msg_ui_too_many_errors ()) lex_discard_noninteractive (lexer); } session_destroy (the_session); random_done (); settings_done (); fh_done (); lex_destroy (lexer); output_engine_pop (); i18n_done (); return msg_ui_any_errors (); } static void fpu_init (void) { #if HAVE_FEHOLDEXCEPT fenv_t foo; feholdexcept (&foo); #elif HAVE___SETFPUCW && defined(_FPU_IEEE) __setfpucw (_FPU_IEEE); #elif HAVE_FPSETMASK fpsetmask (0); #endif } /* If a segfault happens, issue a message to that effect and halt */ static void bug_handler(int sig) { /* Reset SIG to its default handling so that if it happens again we won't recurse. */ signal (sig, SIG_DFL); switch (sig) { case SIGABRT: request_bug_report("Assertion Failure/Abort"); break; case SIGFPE: request_bug_report("Floating Point Exception"); break; case SIGSEGV: request_bug_report("Segmentation Violation"); break; default: request_bug_report("Unknown"); break; } /* Re-raise the signal so that we terminate with the correct status. */ raise (sig); } static void output_msg (const struct msg *m_, void *lexer_) { struct lexer *lexer = lexer_; struct msg m = *m_; if (m.file_name == NULL) { m.file_name = CONST_CAST (char *, lex_get_file_name (lexer)); m.first_line = lex_get_first_line_number (lexer, 0); m.last_line = lex_get_last_line_number (lexer, 0); } message_item_submit (message_item_create (&m)); } static void add_syntax_reader (struct lexer *lexer, const char *file_name, const char *encoding, enum lex_syntax_mode syntax_mode) { struct lex_reader *reader; reader = (!strcmp (file_name, "-") && isatty (STDIN_FILENO) ? terminal_reader_create () : lex_reader_for_file (file_name, encoding, syntax_mode, LEX_ERROR_CONTINUE)); if (reader) lex_append (lexer, reader); } pspp-1.0.1/src/ui/terminal/terminal-reader.h0000644000175000017500000000160012470243701015654 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef TERMINAL_READER_H #define TERMINAL_READER_H struct lex_reader *terminal_reader_create (void); #endif /* terminal-reader.h */ pspp-1.0.1/src/ui/terminal/terminal.h0000644000175000017500000000165712470242642014433 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2007 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef UI_TERMINAL_TERMINAL_H #define UI_TERMINAL_TERMINAL_H 1 void terminal_init (int **view_width_p, int **view_length_p); void terminal_check_size (void); #endif /* ui/terminal/terminal.h */ pspp-1.0.1/src/ui/terminal/terminal-opts.h0000644000175000017500000000245312470243701015406 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2008, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef UI_TERMINAL_TERMINAL_OPTS_H #define UI_TERMINAL_TERMINAL_OPTS_H 1 #include #include "language/lexer/lexer.h" struct argv_parser; struct lexer; struct terminal_opts; struct terminal_opts *terminal_opts_init (struct argv_parser *, enum lex_syntax_mode *, bool *process_statrc, char **syntax_encoding); void terminal_opts_done (struct terminal_opts *, int argc, char *argv[]); #endif /* ui/terminal/terminal-opts.h */ pspp-1.0.1/src/ui/terminal/terminal-reader.c0000644000175000017500000002401413137223525015656 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include #include #include #if HAVE_READLINE #include #include #include static char *history_file; static char **complete_command_name (const char *, int, int); static char **dont_complete (const char *, int, int); static char *command_generator (const char *text, int state); static const bool have_readline = true; #else static const bool have_readline = false; static int rl_end; #endif #include "ui/terminal/terminal-reader.h" #include #include #include #include #include #include #include #include "data/settings.h" #include "language/command.h" #include "language/lexer/lexer.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/message.h" #include "libpspp/prompt.h" #include "libpspp/str.h" #include "libpspp/version.h" #include "output/driver.h" #include "output/journal.h" #include "ui/terminal/terminal.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct terminal_reader { struct lex_reader reader; struct substring s; size_t offset; bool eof; }; static int n_terminal_readers; static void readline_init (void); static void readline_done (void); static bool readline_read (struct substring *, enum prompt_style); /* Display a welcoming message. */ static void welcome (void) { static bool welcomed = false; if (welcomed) return; welcomed = true; fputs ("PSPP is free software and you are welcome to distribute copies of " "it\nunder certain conditions; type \"show copying.\" to see the " "conditions.\nThere is ABSOLUTELY NO WARRANTY for PSPP; type \"show " "warranty.\" for details.\n", stdout); puts (announced_version); journal_init (); } static struct terminal_reader * terminal_reader_cast (struct lex_reader *r) { return UP_CAST (r, struct terminal_reader, reader); } /* Older libreadline versions do not provide rl_outstream. However, it is almost always going to be the same as stdout. */ #if ! HAVE_RL_OUTSTREAM # define rl_outstream stdout #endif #if HAVE_READLINE /* Similarly, rl_echo_signal_char is fairly recent. We provide our own crude version if it is not present. */ #if ! HAVE_RL_ECHO_SIGNAL_CHAR static void rl_echo_signal_char (int sig) { #if HAVE_TERMIOS_H struct termios t; if (0 == tcgetattr (0, &t)) { cc_t c = t.c_cc[VINTR]; if (c >= 0 && c <= 'Z' - 'A') fprintf (rl_outstream, "^%c", 'A' + c - 1); else fprintf (rl_outstream, "%c", c); } else #endif fprintf (rl_outstream, "^C"); fflush (rl_outstream); } #endif #endif static size_t terminal_reader_read (struct lex_reader *r_, char *buf, size_t n, enum prompt_style prompt_style) { struct terminal_reader *r = terminal_reader_cast (r_); size_t chunk; if (r->offset >= r->s.length && !r->eof) { welcome (); msg_ui_reset_counts (); output_flush (); ss_dealloc (&r->s); if (! readline_read (&r->s, prompt_style)) { *buf = '\n'; fprintf (rl_outstream, "\n"); return 1; } r->offset = 0; r->eof = ss_is_empty (r->s); /* Check whether the size of the window has changed, so that the output drivers can adjust their settings as needed. We only do this for the first line of a command, as it's possible that the output drivers are actually in use afterward, and we don't want to confuse them in the middle of output. */ if (prompt_style == PROMPT_FIRST) terminal_check_size (); } chunk = MIN (n, r->s.length - r->offset); memcpy (buf, r->s.string + r->offset, chunk); r->offset += chunk; return chunk; } static void terminal_reader_close (struct lex_reader *r_) { struct terminal_reader *r = terminal_reader_cast (r_); ss_dealloc (&r->s); free (r->reader.file_name); free (r); if (!--n_terminal_readers) readline_done (); } static struct lex_reader_class terminal_reader_class = { terminal_reader_read, terminal_reader_close }; /* Creates a source which uses readln to get its line */ struct lex_reader * terminal_reader_create (void) { struct terminal_reader *r; if (!n_terminal_readers++) readline_init (); r = xzalloc (sizeof *r); r->reader.class = &terminal_reader_class; r->reader.syntax = LEX_SYNTAX_INTERACTIVE; r->reader.error = LEX_ERROR_TERMINAL; r->reader.file_name = NULL; r->s = ss_empty (); r->offset = 0; r->eof = false; return &r->reader; } static const char * readline_prompt (enum prompt_style style) { switch (style) { case PROMPT_FIRST: return "PSPP> "; case PROMPT_LATER: return " > "; case PROMPT_DATA: return "data> "; case PROMPT_COMMENT: return "comment> "; case PROMPT_DOCUMENT: return "document> "; case PROMPT_DO_REPEAT: return "DO REPEAT> "; } NOT_REACHED (); } static int pfd[2]; static bool sigint_received ; /* A function similar to getc from stdio. However this one may be interrupted by SIGINT. If that happens it will return EOF and the global variable sigint_received will be set to true. */ static int interruptible_getc (FILE *fp) { int c = 0; int ret = -1; do { struct timeval timeout = {0, 50000}; fd_set what; int max_fd = 0; int fd ; FD_ZERO (&what); fd = fileno (fp); max_fd = (max_fd > fd) ? max_fd : fd; FD_SET (fd, &what); fd = pfd[0]; max_fd = (max_fd > fd) ? max_fd : fd; FD_SET (fd, &what); ret = select (max_fd + 1, &what, NULL, NULL, &timeout); if ( ret == -1 && errno != EINTR) { perror ("Select failed"); continue; } if (ret > 0 ) { if (FD_ISSET (pfd[0], &what)) { char dummy[1]; read (pfd[0], dummy, 1); sigint_received = true; return EOF; } } } while (ret <= 0); /* This will not block! */ read (fileno (fp), &c, 1); return c; } #if HAVE_READLINE static void handler (int sig) { rl_end = 0; write (pfd[1], "x", 1); rl_echo_signal_char (sig); } static void readline_init (void) { if ( 0 != pipe2 (pfd, O_NONBLOCK)) perror ("Cannot create pipe"); if ( SIG_ERR == signal (SIGINT, handler)) perror ("Cannot add signal handler"); rl_catch_signals = 0; rl_getc_function = interruptible_getc; rl_basic_word_break_characters = "\n"; using_history (); stifle_history (500); if (history_file == NULL) { const char *home_dir = getenv ("HOME"); if (home_dir != NULL) { history_file = xasprintf ("%s/.pspp_history", home_dir); read_history (history_file); } } } static void readline_done (void) { if (history_file != NULL && false == settings_get_testing_mode () ) write_history (history_file); clear_history (); free (history_file); } /* Prompt the user for a line of input and return it in LINE. Returns true if the LINE should be considered valid, false otherwise. */ static bool readline_read (struct substring *line, enum prompt_style style) { char *string; rl_attempted_completion_function = (style == PROMPT_FIRST ? complete_command_name : dont_complete); sigint_received = false; string = readline (readline_prompt (style)); if (sigint_received) { *line = ss_empty (); return false; } if (string != NULL) { char *end; if (string[0]) add_history (string); end = strchr (string, '\0'); *end = '\n'; *line = ss_buffer (string, end - string + 1); } else *line = ss_empty (); return true; } /* Returns a set of command name completions for TEXT. This is of the proper form for assigning to rl_attempted_completion_function. */ static char ** complete_command_name (const char *text, int start, int end UNUSED) { if (start == 0) { /* Complete command name at start of line. */ return rl_completion_matches (text, command_generator); } else { /* Otherwise don't do any completion. */ rl_attempted_completion_over = 1; return NULL; } } /* Do not do any completion for TEXT. */ static char ** dont_complete (const char *text UNUSED, int start UNUSED, int end UNUSED) { rl_attempted_completion_over = 1; return NULL; } /* If STATE is 0, returns the first command name matching TEXT. Otherwise, returns the next command name matching TEXT. Returns a null pointer when no matches are left. */ static char * command_generator (const char *text, int state) { static const struct command *cmd; const char *name; if (state == 0) cmd = NULL; name = cmd_complete (text, &cmd); return name ? xstrdup (name) : NULL; } #else /* !HAVE_READLINE */ static void readline_init (void) { } static void readline_done (void) { } static bool readline_read (struct substring *line, enum prompt_style style) { struct string string; const char *prompt = readline_prompt (style); fputs (prompt, stdout); fflush (stdout); ds_init_empty (&string); ds_read_line (&string, stdin, SIZE_MAX); *line = string.ss; return false; } #endif /* !HAVE_READLINE */ pspp-1.0.1/src/ui/terminal/automake.mk0000644000175000017500000000310613137223525014575 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- noinst_LTLIBRARIES += src/ui/terminal/libui.la src_ui_terminal_libui_la_SOURCES = \ src/ui/terminal/main.c \ src/ui/terminal/terminal-opts.c \ src/ui/terminal/terminal-opts.h \ src/ui/terminal/terminal-reader.c \ src/ui/terminal/terminal-reader.h \ src/ui/terminal/terminal.c \ src/ui/terminal/terminal.h src_ui_terminal_libui_la_CFLAGS = $(NCURSES_CFLAGS) bin_PROGRAMS += src/ui/terminal/pspp src_ui_terminal_pspp_SOURCES = src_ui_terminal_pspp_LDADD = \ src/ui/terminal/libui.la \ src/ui/libuicommon.la \ src/libpspp.la \ src/libpspp-core.la \ $(CAIRO_LIBS) \ $(NCURSES_LIBS) \ $(LTLIBREADLINE) \ $(GSL_LIBS) src_ui_terminal_pspp_LDFLAGS = $(PSPP_LDFLAGS) $(PG_LDFLAGS) if RELOCATABLE_VIA_LD src_ui_terminal_pspp_LDFLAGS += `$(RELOCATABLE_LDFLAGS) $(bindir)` endif pspp-1.0.1/src/ui/terminal/terminal-opts.c0000644000175000017500000002261613137223525015407 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2008, 2010 Free Software Foundation 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 . */ #include #include "terminal-opts.h" #include #include #include #include "data/settings.h" #include "language/lexer/include-path.h" #include "libpspp/argv-parser.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/compiler.h" #include "libpspp/llx.h" #include "libpspp/str.h" #include "libpspp/string-array.h" #include "libpspp/string-map.h" #include "libpspp/string-set.h" #include "libpspp/version.h" #include "output/driver.h" #include "output/driver-provider.h" #include "output/msglog.h" #include "gl/error.h" #include "gl/localcharset.h" #include "gl/progname.h" #include "gl/version-etc.h" #include "gl/xmemdup0.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid struct terminal_opts { struct string_map options; /* Output driver options. */ bool has_output_driver; bool has_terminal_driver; bool has_error_file; enum lex_syntax_mode *syntax_mode; bool *process_statrc; char **syntax_encoding; }; enum { OPT_TESTING_MODE, OPT_ERROR_FILE, OPT_OUTPUT, OPT_OUTPUT_OPTION, OPT_NO_OUTPUT, OPT_BATCH, OPT_INTERACTIVE, OPT_SYNTAX_ENCODING, OPT_NO_STATRC, OPT_HELP, OPT_VERSION, N_TERMINAL_OPTIONS }; static struct argv_option terminal_argv_options[N_TERMINAL_OPTIONS] = { {"testing-mode", 0, no_argument, OPT_TESTING_MODE}, {"error-file", 'e', required_argument, OPT_ERROR_FILE}, {"output", 'o', required_argument, OPT_OUTPUT}, {NULL, 'O', required_argument, OPT_OUTPUT_OPTION}, {"no-output", 0, no_argument, OPT_NO_OUTPUT}, {"batch", 'b', no_argument, OPT_BATCH}, {"interactive", 'i', no_argument, OPT_INTERACTIVE}, {"syntax-encoding", 0, required_argument, OPT_SYNTAX_ENCODING}, {"no-statrc", 'r', no_argument, OPT_NO_STATRC}, {"help", 'h', no_argument, OPT_HELP}, {"version", 'V', no_argument, OPT_VERSION}, }; static void register_output_driver (struct terminal_opts *to) { if (!string_map_is_empty (&to->options)) { struct output_driver *driver; driver = output_driver_create (&to->options); if (driver != NULL) { output_driver_register (driver); to->has_output_driver = true; if (driver->device_type == SETTINGS_DEVICE_TERMINAL) to->has_terminal_driver = true; } string_map_clear (&to->options); } } static void parse_output_option (struct terminal_opts *to, const char *option) { const char *equals; char *key, *value; equals = strchr (option, '='); if (equals == NULL) { error (0, 0, _("%s: output option missing `='"), option); return; } key = xmemdup0 (option, equals - option); if (string_map_contains (&to->options, key)) { error (0, 0, _("%s: output option specified more than once"), key); free (key); return; } value = xmemdup0 (equals + 1, strlen (equals + 1)); string_map_insert_nocopy (&to->options, key, value); } static char * get_supported_formats (void) { const struct string_set_node *node; struct string_array format_array; struct string_set format_set; char *format_string; const char *format; /* Get supported formats as unordered set. */ string_set_init (&format_set); output_get_supported_formats (&format_set); /* Converted supported formats to sorted array. */ string_array_init (&format_array); STRING_SET_FOR_EACH (format, node, &format_set) string_array_append (&format_array, format); string_array_sort (&format_array); string_set_destroy (&format_set); /* Converted supported formats to string. */ format_string = string_array_join (&format_array, " "); string_array_destroy (&format_array); return format_string; } static void usage (void) { char *supported_formats = get_supported_formats (); char *inc_path = string_array_join (include_path_default (), " "); printf (_("\ PSPP, a program for statistical analysis of sampled data.\n\ Usage: %s [OPTION]... FILE...\n\ \n\ Arguments to long options also apply to equivalent short options.\n\ \n\ Output options:\n\ -o, --output=FILE output to FILE, default format from FILE's name\n\ -O format=FORMAT override format for previous -o\n\ -O OPTION=VALUE set output option to customize previous -o\n\ -O device={terminal|listing} override device type for previous -o\n\ -e, --error-file=FILE append errors, warnings, and notes to FILE\n\ --no-output disable default output driver\n\ Supported output formats: %s\n\ \n\ Language options:\n\ -I, --include=DIR append DIR to search path\n\ -I-, --no-include clear search path\n\ -r, --no-statrc disable running rc file at startup\n\ -a, --algorithm={compatible|enhanced}\n\ set to `compatible' if you want output\n\ calculated from broken algorithms\n\ -x, --syntax={compatible|enhanced}\n\ set to `compatible' to disable PSPP extensions\n\ -b, --batch interpret syntax in batch mode\n\ -i, --interactive interpret syntax in interactive mode\n\ --syntax-encoding=ENCODING specify encoding for syntax files\n\ -s, --safer don't allow some unsafe operations\n\ Default search path: %s\n\ \n\ Informative output:\n\ -h, --help display this help and exit\n\ -V, --version output version information and exit\n\ \n\ Non-option arguments are interpreted as syntax files to execute.\n"), program_name, supported_formats, inc_path); free (supported_formats); free (inc_path); emit_bug_reporting_address (); exit (EXIT_SUCCESS); } static void terminal_option_callback (int id, void *to_) { struct terminal_opts *to = to_; switch (id) { case OPT_TESTING_MODE: settings_set_testing_mode (true); break; case OPT_ERROR_FILE: if (!strcmp (optarg, "none") || msglog_create (optarg)) to->has_error_file = true; break; case OPT_OUTPUT: register_output_driver (to); string_map_insert (&to->options, "output-file", optarg); break; case OPT_OUTPUT_OPTION: parse_output_option (to, optarg); break; case OPT_NO_OUTPUT: /* Pretend that we already have an output driver, which disables adding one in terminal_opts_done() when we don't already have one. */ to->has_output_driver = true; break; case OPT_BATCH: *to->syntax_mode = LEX_SYNTAX_BATCH; break; case OPT_INTERACTIVE: *to->syntax_mode = LEX_SYNTAX_INTERACTIVE; break; case OPT_SYNTAX_ENCODING: *to->syntax_encoding = optarg; break; case OPT_NO_STATRC: *to->process_statrc = false; break; case OPT_HELP: usage (); exit (EXIT_SUCCESS); case OPT_VERSION: version_etc (stdout, "pspp", PACKAGE_NAME, PACKAGE_VERSION, "Ben Pfaff", "John Darrington", "Jason Stover", NULL_SENTINEL); exit (EXIT_SUCCESS); default: NOT_REACHED (); } } struct terminal_opts * terminal_opts_init (struct argv_parser *ap, enum lex_syntax_mode *syntax_mode, bool *process_statrc, char **syntax_encoding) { struct terminal_opts *to; *syntax_mode = LEX_SYNTAX_AUTO; *process_statrc = true; *syntax_encoding = "Auto"; to = xzalloc (sizeof *to); to->syntax_mode = syntax_mode; string_map_init (&to->options); to->has_output_driver = false; to->has_error_file = false; to->syntax_mode = syntax_mode; to->process_statrc = process_statrc; to->syntax_encoding = syntax_encoding; argv_parser_add_options (ap, terminal_argv_options, N_TERMINAL_OPTIONS, terminal_option_callback, to); return to; } /* Return true iff the terminal appears to be an xterm with UTF-8 capabilities */ static bool term_is_utf8_xterm (void) { char *s = NULL; if ( (s = getenv ("TERM")) && (0 == strcmp ("xterm", s)) ) if ( (s = getenv ("XTERM_LOCALE")) ) return strcasestr (s, "utf8") || strcasestr (s, "utf-8"); return false; } void terminal_opts_done (struct terminal_opts *to, int argc, char *argv[]) { register_output_driver (to); if (!to->has_output_driver) { if ((0 == strcmp (locale_charset (), "UTF-8")) || (term_is_utf8_xterm ()) ) { string_map_insert (&to->options, "box", "unicode"); } string_map_insert (&to->options, "output-file", "-"); string_map_insert (&to->options, "format", "txt"); register_output_driver (to); } if (!to->has_terminal_driver && !to->has_error_file) msglog_create ("-"); string_map_destroy (&to->options); free (to); } pspp-1.0.1/src/ui/automake.mk0000644000175000017500000000210013137223525012753 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- include $(top_srcdir)/src/ui/terminal/automake.mk include $(top_srcdir)/src/ui/gui/automake.mk noinst_LTLIBRARIES += src/ui/libuicommon.la src_ui_libuicommon_la_SOURCES = \ src/ui/source-init-opts.c src/ui/source-init-opts.h \ src/ui/syntax-gen.c src/ui/syntax-gen.h pspp-1.0.1/src/ui/syntax-gen.c0000644000175000017500000002270413137223525013071 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2008, 2010, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "ui/syntax-gen.h" #include #include #include "data/data-in.h" #include "data/data-out.h" #include "data/format.h" #include "data/value.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "libpspp/misc.h" #include "gl/c-ctype.h" #include "gl/ftoastr.h" /* Appends to OUTPUT a pair of hex digits for each byte in IN. */ static void syntax_gen_hex_digits (struct string *output, struct substring in) { size_t i; for (i = 0; i < in.length; i++) { unsigned char c = in.string[i]; ds_put_byte (output, "0123456789ABCDEF"[c >> 4]); ds_put_byte (output, "0123456789ABCDEF"[c & 0xf]); } } /* Returns true if IN contains any control characters, false otherwise */ static bool has_control_chars (struct substring in) { size_t i; for (i = 0; i < in.length; i++) if (iscntrl ((unsigned char) in.string[i])) return true; return false; } static bool has_single_quote (struct substring str) { return (SIZE_MAX != ss_find_byte (str, '\'')); } static bool has_double_quote (struct substring str) { return (SIZE_MAX != ss_find_byte (str, '"')); } /* Appends to OUTPUT valid PSPP syntax for a quoted string that contains IN. IN must be encoded in UTF-8, and the quoted result will also be encoded in UTF-8. The string will be output as a regular quoted string unless it contains control characters, in which case it is output as a hex string. */ void syntax_gen_string (struct string *output, struct substring in) { if (has_control_chars (in)) { ds_put_cstr (output, "X'"); syntax_gen_hex_digits (output, in); ds_put_byte (output, '\''); } else { int quote; size_t i; /* This seemingly simple implementation is possible, because UTF-8 guarantees that bytes corresponding to basic characters (such as '\'') cannot appear in a multi-byte character sequence except to represent that basic character. */ assert (is_basic ('\'')); quote = has_double_quote (in) && !has_single_quote (in) ? '\'' : '"'; ds_put_byte (output, quote); for (i = 0; i < in.length; i++) { char c = in.string[i]; if (c == quote) ds_put_byte (output, quote); ds_put_byte (output, c); } ds_put_byte (output, quote); } } /* Appends to OUTPUT a representation of NUMBER in PSPP syntax. The representation is precise, that is, when PSPP parses the representation, its value will be exactly NUMBER. (This might not be the case on a C implementation where double has a different representation.) If NUMBER is the system-missing value, it is output as the identifier SYSMIS. This may not be appropriate, because SYSMIS is not consistently parsed throughout PSPP syntax as the system-missing value. But in such circumstances the system-missing value would not be meaningful anyhow, so the caller should refrain from supplying the system-missing value in such cases. A value of LOWEST or HIGHEST is not treated specially. If FORMAT is null, then the representation will be in numeric form, e.g. 123 or 1.23e10. If FORMAT is non-null, then it must point to a numeric format. If the format is one easier for a user to understand when expressed as a string than as a number (for example, a date format), and the string representation precisely represents NUMBER, then the string representation is written to OUTPUT. Otherwise, NUMBER is output as if FORMAT was a null pointer. */ void syntax_gen_number (struct string *output, double number, const struct fmt_spec *format) { assert (format == NULL || fmt_is_numeric (format->type)); if (format != NULL && (format->type & (FMT_CAT_DATE | FMT_CAT_TIME | FMT_CAT_DATE_COMPONENT))) { union value v_in, v_out; char *s, *error; bool ok; v_in.f = number; s = data_out (&v_in, "FIXME", format); /* FIXME: UTF8 encoded strings will fail here */ error = data_in (ss_cstr (s), C_ENCODING, format->type, &v_out, 0, NULL); ok = error == NULL; free (error); if (ok && v_out.f == number) { syntax_gen_string (output, ss_cstr (s)); free (s); return; } free (s); } if (number == SYSMIS) ds_put_cstr (output, "SYSMIS"); else { char s[DBL_BUFSIZE_BOUND]; c_dtoastr (s, sizeof s, 0, 0, number); ds_put_cstr (output, s); } } /* Appends to OUTPUT a representation of VALUE, which has the specified WIDTH. If FORMAT is non-null, it influences the output format. The representation is precise, that is, when PSPP parses the representation, its value will be exactly VALUE. */ void syntax_gen_value (struct string *output, const union value *value, int width, const struct fmt_spec *format) { assert (format == NULL || fmt_var_width (format) == width); if (width == 0) syntax_gen_number (output, value->f, format); else { char *s = CHAR_CAST_BUG (char *, value_str (value, width)); syntax_gen_string (output, ss_buffer (s, width)); } } /* Appends THRU to OUTPUT. If LOW is LOWEST, then it is formatted as the identifier LO; if HIGH is HIGHEST, then it is formatted as the identifier HI. Otherwise, LOW and HIGH are formatted as with a call to syntax_gen_num with the specified FORMAT. This is the opposite of the function parse_num_range. */ void syntax_gen_num_range (struct string *output, double low, double high, const struct fmt_spec *format) { if (low == LOWEST) ds_put_cstr (output, "LO"); else syntax_gen_number (output, low, format); ds_put_cstr (output, " THRU "); if (high == HIGHEST) ds_put_cstr (output, "HI"); else syntax_gen_number (output, high, format); } /* Same as syntax_gen_pspp, below, but takes a va_list. */ void syntax_gen_pspp_valist (struct string *output, const char *format, va_list args) { for (;;) { char qualifier[16]; int precision = -1; char directive; size_t copy = strcspn (format, "%"); ds_put_substring (output, ss_buffer (format, copy)); format += copy; if (*format == '\0') return; assert (*format == '%'); format++; directive = *format++; if (directive == '.') { int x = 0; while (directive = *format++, c_isdigit (directive)) { assert (x < 16); qualifier[x++] = directive; } qualifier[x++] = '\0'; precision = atoi (qualifier); } switch (directive) { case 's': { const char *s = va_arg (args, char *); switch (*format++) { case 'q': syntax_gen_string (output, ss_cstr (s)); break; case 's': ds_put_cstr (output, s); break; default: NOT_REACHED (); } } break; case 'd': { int i = va_arg (args, int); ds_put_format (output, "%d", i); } break; case 'f': case 'g': { char conv[32]; double d = va_arg (args, double); int x = 0; conv[x++] = '%'; conv[x] = '\0'; if (precision != -1) { strcat (conv, "."); strcat (conv, qualifier); x += strlen (qualifier) + 1; } conv[x++] = directive; conv[x++] = '\0'; ds_put_c_format (output, conv, d); break; } case '%': ds_put_byte (output, '%'); break; default: NOT_REACHED (); } } } /* printf-like function specialized for outputting PSPP syntax. FORMAT is appended to OUTPUT. The following substitutions are supported: %sq: The char * argument is formatted as a PSPP string, as if with a call to syntax_gen_string. %ss: The char * argument is appended literally. %d: Same as printf's %d. %f %g: Same as printf. %%: Literal %. (These substitutions were chosen to allow GCC to check for correct argument types.) This function is somewhat experimental. If it proves useful, the allowed substitutions will almost certainly be expanded. */ void syntax_gen_pspp (struct string *output, const char *format, ...) { va_list args; va_start (args, format); syntax_gen_pspp_valist (output, format, args); va_end (args); } pspp-1.0.1/src/ui/gui/0000755000175000017500000000000013150620333011460 500000000000000pspp-1.0.1/src/ui/gui/psppire-output-window.c0000644000175000017500000003632513137223525016111 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Free Software Foundation 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 . */ #include #include "ui/gui/psppire-output-window.h" #include #include #include #include #include #include #include "libpspp/cast.h" #include "libpspp/message.h" #include "libpspp/string-map.h" #include "output/chart-item.h" #include "output/driver-provider.h" #include "output/message-item.h" #include "output/output-item.h" #include "output/tab.h" #include "output/table-item.h" #include "output/text-item.h" #include "ui/gui/help-menu.h" #include "ui/gui/builder-wrapper.h" #include "ui/gui/psppire-output-view.h" #include "ui/gui/psppire-conf.h" #include "ui/gui/windows-menu.h" #include "gl/xalloc.h" #include "helper.h" #include #define _(msgid) gettext (msgid) #define N_(msgid) msgid static void psppire_output_window_class_init (PsppireOutputWindowClass *class); static void psppire_output_window_init (PsppireOutputWindow *window); GType psppire_output_window_get_type (void) { static GType psppire_output_window_type = 0; if (!psppire_output_window_type) { static const GTypeInfo psppire_output_window_info = { sizeof (PsppireOutputWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc)psppire_output_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PsppireOutputWindow), 0, (GInstanceInitFunc) psppire_output_window_init, }; psppire_output_window_type = g_type_register_static (PSPPIRE_TYPE_WINDOW, "PsppireOutputWindow", &psppire_output_window_info, 0); } return psppire_output_window_type; } static GObjectClass *parent_class; static void psppire_output_window_finalize (GObject *object) { if (G_OBJECT_CLASS (parent_class)->finalize) (*G_OBJECT_CLASS (parent_class)->finalize) (object); } static void psppire_output_window_dispose (GObject *obj) { PsppireOutputWindow *window = PSPPIRE_OUTPUT_WINDOW (obj); if (window->dispose_has_run) return; window->dispose_has_run = TRUE; psppire_output_view_destroy (window->view); window->view = NULL; /* Chain up to the parent class */ G_OBJECT_CLASS (parent_class)->dispose (obj); } static void psppire_output_window_class_init (PsppireOutputWindowClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); parent_class = g_type_class_peek_parent (class); object_class->dispose = psppire_output_window_dispose; object_class->finalize = psppire_output_window_finalize; } /* Output driver class. */ struct psppire_output_driver { struct output_driver driver; PsppireOutputWindow *window; }; static struct output_driver_class psppire_output_class; static struct psppire_output_driver * psppire_output_cast (struct output_driver *driver) { assert (driver->class == &psppire_output_class); return UP_CAST (driver, struct psppire_output_driver, driver); } static void psppire_output_submit (struct output_driver *this, const struct output_item *item) { struct psppire_output_driver *pod = psppire_output_cast (this); PsppireOutputWindow *window; bool new; new = pod->window == NULL; if (new) { pod->window = PSPPIRE_OUTPUT_WINDOW (psppire_output_window_new ()); GApplication *app = g_application_get_default (); gtk_application_add_window (GTK_APPLICATION (app), GTK_WINDOW (pod->window)); pod->window->driver = pod; } window = pod->window; psppire_output_view_put (window->view, item); if (new) { /* We could have called this earlier in the previous "if (new)" block, but doing it here finds, in a plain GTK+ environment, a bug that otherwise only showed up on an Ubuntu Unity desktop. See bug #43362. */ gtk_widget_show_all (GTK_WIDGET (pod->window)); } PsppireConf *conf = psppire_conf_new (); { gboolean status = true; psppire_conf_get_boolean (conf, "OutputWindowAction", "alert", &status); gtk_window_set_urgency_hint (GTK_WINDOW (pod->window), status); } { gboolean status ; if (psppire_conf_get_boolean (conf, "OutputWindowAction", "maximize", &status) && status) gtk_window_maximize (GTK_WINDOW (pod->window)); } { gboolean status ; if (psppire_conf_get_boolean (conf, "OutputWindowAction", "raise", &status) && status) gtk_window_present (GTK_WINDOW (pod->window)); } } static struct output_driver_class psppire_output_class = { "PSPPIRE", /* name */ NULL, /* destroy */ psppire_output_submit, /* submit */ NULL, /* flush */ }; void psppire_output_window_setup (void) { struct psppire_output_driver *pod; struct output_driver *d; pod = xzalloc (sizeof *pod); d = &pod->driver; output_driver_init (d, &psppire_output_class, "PSPPIRE", SETTINGS_DEVICE_UNFILTERED); output_driver_register (d); } /* Callback for the "delete" action (clicking the x on the top right hand corner of the window) */ static gboolean on_delete (GtkWidget *w, GdkEvent *event, gpointer user_data) { PsppireOutputWindow *ow = PSPPIRE_OUTPUT_WINDOW (user_data); gtk_widget_destroy (GTK_WIDGET (ow)); ow->driver->window = NULL; return FALSE; } static void cancel_urgency (GtkWindow *window, gpointer data) { gtk_window_set_urgency_hint (window, FALSE); } static void psppire_output_window_print (PsppireOutputWindow *window); static void export_output (PsppireOutputWindow *window, struct string_map *options, const char *format) { string_map_insert (options, "format", format); psppire_output_view_export (window->view, options); } struct file_types { const gchar *label; const gchar *ext; }; enum { FT_AUTO = 0, FT_PDF, FT_HTML, FT_ODT, FT_TXT, FT_ASCII, FT_PS, FT_CSV, n_FT }; #define N_EXTENSIONS (n_FT - 1) struct file_types ft[n_FT] = { {N_("Infer file type from extension"), NULL}, {N_("PDF (*.pdf)"), ".pdf"}, {N_("HTML (*.html)"), ".html"}, {N_("OpenDocument (*.odt)"), ".odt"}, {N_("Text (*.txt)"), ".txt"}, {N_("Text [plain] (*.txt)"), ".txt"}, {N_("PostScript (*.ps)"), ".ps"}, {N_("Comma-Separated Values (*.csv)"), ".csv"} }; static void on_combo_change (GtkFileChooser *chooser) { gboolean sensitive = FALSE; GtkWidget *combo = gtk_file_chooser_get_extra_widget (chooser); int x = 0; gchar *fn = gtk_file_chooser_get_filename (chooser); if (combo && gtk_widget_get_realized (combo)) x = gtk_combo_box_get_active (GTK_COMBO_BOX (combo)); if (fn == NULL) { sensitive = FALSE; } else { gint i; if ( x != 0 ) sensitive = TRUE; for (i = 1 ; i < N_EXTENSIONS ; ++i) { if ( g_str_has_suffix (fn, ft[i].ext)) { sensitive = TRUE; break; } } } g_free (fn); gtk_dialog_set_response_sensitive (GTK_DIALOG (chooser), GTK_RESPONSE_ACCEPT, sensitive); } static void on_file_chooser_change (GObject *w, GParamSpec *pspec, gpointer data) { GtkFileChooser *chooser = data; const gchar *name = g_param_spec_get_name (pspec); if ( ! gtk_widget_get_realized (GTK_WIDGET (chooser))) return; /* Ignore this one. It causes recursion. */ if ( 0 == strcmp ("tooltip-text", name)) return; on_combo_change (chooser); } /* Recursively descend all the children of W, connecting to their "notify" signal */ static void iterate_widgets (GtkWidget *w, gpointer data) { if ( GTK_IS_CONTAINER (w)) gtk_container_forall (GTK_CONTAINER (w), iterate_widgets, data); else g_signal_connect (w, "notify", G_CALLBACK (on_file_chooser_change), data); } static GtkListStore * create_file_type_list (void) { int i; GtkTreeIter iter; GtkListStore *list = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); for (i = 0 ; i < n_FT ; ++i) { gtk_list_store_append (list, &iter); gtk_list_store_set (list, &iter, 0, gettext (ft[i].label), 1, ft[i].ext, -1); } return list; } static void psppire_output_window_export (PsppireOutputWindow *window) { gint response; GtkWidget *combo; GtkListStore *list; GtkFileChooser *chooser; GtkWidget *dialog = gtk_file_chooser_dialog_new (_("Export Output"), GTK_WINDOW (window), GTK_FILE_CHOOSER_ACTION_SAVE, _("Cancel"), GTK_RESPONSE_CANCEL, _("Save"), GTK_RESPONSE_ACCEPT, NULL); g_object_set (dialog, "local-only", FALSE, NULL); chooser = GTK_FILE_CHOOSER (dialog); list = create_file_type_list (); combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (list)); { /* Create text cell renderer */ GtkCellRenderer *cell = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, FALSE ); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), cell, "text", 0); } g_signal_connect_swapped (combo, "changed", G_CALLBACK (on_combo_change), chooser); gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); gtk_file_chooser_set_extra_widget (chooser, combo); /* This kludge is necessary because there is no signal to tell us when the candidate filename of a GtkFileChooser has changed */ gtk_container_forall (GTK_CONTAINER (dialog), iterate_widgets, dialog); gtk_file_chooser_set_do_overwrite_confirmation (chooser, TRUE); response = gtk_dialog_run (GTK_DIALOG (dialog)); if ( response == GTK_RESPONSE_ACCEPT ) { gint file_type = gtk_combo_box_get_active (GTK_COMBO_BOX (combo)); gchar *filename = gtk_file_chooser_get_filename (chooser); struct string_map options; g_return_if_fail (filename); if (file_type == FT_AUTO) { /* If the "Infer file type from extension" option was chosen, search for the respective type in the list. (It's a O(n) search, but fortunately n is small). */ gint i; for (i = 1 ; i < N_EXTENSIONS ; ++i) { if ( g_str_has_suffix (filename, ft[i].ext)) { file_type = i; break; } } } else if (! g_str_has_suffix (filename, ft[file_type].ext)) { /* If an explicit document format was chosen, and if the chosen filename does not already have that particular "extension", then append it. */ gchar *of = filename; filename = g_strconcat (filename, ft[file_type].ext, NULL); g_free (of); } string_map_init (&options); string_map_insert (&options, "output-file", filename); switch (file_type) { case FT_PDF: export_output (window, &options, "pdf"); break; case FT_HTML: export_output (window, &options, "html"); break; case FT_ODT: export_output (window, &options, "odt"); break; case FT_PS: export_output (window, &options, "ps"); break; case FT_CSV: export_output (window, &options, "csv"); break; case FT_TXT: string_map_insert (&options, "box", "unicode"); /* Fall through */ case FT_ASCII: string_map_insert (&options, "headers", "false"); string_map_insert (&options, "paginate", "false"); string_map_insert (&options, "squeeze", "true"); string_map_insert (&options, "emphasis", "none"); string_map_insert (&options, "charts", "none"); string_map_insert (&options, "top-margin", "0"); string_map_insert (&options, "bottom-margin", "0"); export_output (window, &options, "txt"); break; default: g_assert_not_reached (); } string_map_destroy (&options); free (filename); } gtk_widget_destroy (dialog); } static void psppire_output_window_init (PsppireOutputWindow *window) { GtkBuilder *xml = builder_new ("output-window.ui"); GtkApplication *app = GTK_APPLICATION (g_application_get_default()); GtkWidget *box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (window), box); GtkWidget *paned = get_widget_assert (xml, "paned1"); window->dispose_has_run = FALSE; window->view = psppire_output_view_new ( GTK_LAYOUT (get_widget_assert (xml, "output")), GTK_TREE_VIEW (get_widget_assert (xml, "overview"))); connect_help (xml); g_signal_connect (window, "focus-in-event", G_CALLBACK (cancel_urgency), NULL); GObject *menu = get_object_assert (xml, "output-window-menu", G_TYPE_MENU); GtkWidget *menubar = gtk_menu_bar_new_from_model (G_MENU_MODEL (menu)); gtk_box_pack_start (GTK_BOX (box), menubar, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (box), paned, TRUE, TRUE, 0); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), create_windows_menu (GTK_WINDOW (window))); gtk_menu_shell_append (GTK_MENU_SHELL (menubar), create_help_menu (GTK_WINDOW (window))); { GSimpleAction *print = g_simple_action_new ("print", NULL); g_signal_connect_swapped (print, "activate", G_CALLBACK (psppire_output_window_print), window); g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (print)); const gchar *accels[2] = { "P", NULL}; gtk_application_set_accels_for_action (app, "win.print", accels); } { GSimpleAction *export = g_simple_action_new ("export", NULL); g_signal_connect_swapped (export, "activate", G_CALLBACK (psppire_output_window_export), window); g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (export)); } { GSimpleAction *select_all = g_simple_action_new ("select-all", NULL); g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (select_all)); } { GSimpleAction *copy = g_simple_action_new ("copy", NULL); g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (copy)); const gchar *accels[2] = { "C", NULL}; gtk_application_set_accels_for_action (app, "win.copy", accels); } g_object_unref (xml); g_signal_connect (window, "delete-event", G_CALLBACK (on_delete), window); } GtkWidget* psppire_output_window_new (void) { return GTK_WIDGET (g_object_new (psppire_output_window_get_type (), /* TRANSLATORS: This will be part of a filename. Please avoid whitespace. */ "filename", _("Output"), "description", _("Output Viewer"), NULL)); } static void psppire_output_window_print (PsppireOutputWindow *window) { psppire_output_view_print (window->view, GTK_WINDOW (window)); } pspp-1.0.1/src/ui/gui/options.ui0000644000175000017500000003141113137223525013441 00000000000000 False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Options Case True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 5 5 True False 0 in True False vertical True False vertical 5 start Display _Labels True True False True True radiobutton-names True True 0 Display _Names True True False True True True True True 1 True False False False 2 Sort by L_abel True True False True True radiobutton-sort-by-name True True 3 Sort by Na_me True True False True True True True True 4 Do not S_ort True True False True True True radiobutton-sort-by-name True True 5 False True 2 True False Variable Lists True True 0 True False 0 in True False vertical spread Ma_ximize True True False True True True True 0 _Raise True True False True True True True 1 Aler_t True True False True True True True 2 True False Output Window Action vertical True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 PSPPIRE_BUTTON_OK_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK False False end 1 pspp-1.0.1/src/ui/gui/psppire-acr.c0000644000175000017500000002160712545013704014004 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2007, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This widget is a GtkBox which looks roughly like: +-----------------------------+ |+------------+ +----------+ | || Add | | | | |+------------+ | | | | | | | |+------------+ | | | || Edit | | | | |+------------+ | | | | | | | |+------------+ | | | || Remove | | | | |+------------+ +----------+ | +-----------------------------+ */ #include #include #include "psppire-acr.h" #include "helper.h" #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid G_DEFINE_TYPE (PsppireAcr, psppire_acr, GTK_TYPE_BOX); static void psppire_acr_dispose (GObject *obj) { PsppireAcr *acr = PSPPIRE_ACR (obj); psppire_acr_set_model (acr, NULL); G_OBJECT_CLASS (psppire_acr_parent_class)->dispose (obj); } static void psppire_acr_class_init (PsppireAcrClass *class) { G_OBJECT_CLASS (class)->dispose = psppire_acr_dispose; } static gboolean row_is_selected (const PsppireAcr *acr); static gboolean value_from_entry (gint col, GValue *val, gpointer data) { GtkEntry *entry = data; const gchar *text = gtk_entry_get_text (entry); gdouble x = g_strtod (text, 0); g_value_init (val, G_TYPE_DOUBLE); g_value_set_double (val, x); return TRUE; } /* Returns true, if there's text in the entry */ static gboolean entry_not_empty (gpointer data) { GtkEntry *entry = data; const char *text = gtk_entry_get_text (entry); return !g_str_equal (text, ""); } static void clear_entry (gpointer data) { GtkEntry *entry = data; gtk_entry_set_text (entry, ""); } static void on_entry_change (GtkEntry *entry, PsppireAcr *acr) { gtk_widget_set_sensitive (acr->add_button, acr->enabled (entry)); gtk_widget_set_sensitive (acr->change_button, acr->enabled (entry) && row_is_selected (acr)); } void psppire_acr_set_entry (PsppireAcr *acr, GtkEntry *entry) { acr->get_value = value_from_entry; acr->get_value_data = entry; acr->enabled = entry_not_empty; acr->enabled_data = entry; acr->update = clear_entry; acr->update_data = entry; g_signal_connect (entry, "changed", G_CALLBACK (on_entry_change), acr); } /* Callback for when the Add button is clicked. It appends an item to the list. */ static void on_add_button_clicked (PsppireAcr *acr) { gint i; GtkTreeIter iter; gtk_list_store_append (acr->list_store, &iter); for (i = 0 ; i < gtk_tree_model_get_n_columns (GTK_TREE_MODEL (acr->list_store)); ++i) { static GValue value; if ( ! acr->get_value (i, &value, acr->get_value_data) ) continue; gtk_list_store_set_value (acr->list_store, &iter, i, &value); g_value_unset (&value); } if (acr->update) acr->update (acr->update_data); } /* Callback for when the Changed button is clicked. It replaces the currently selected entry. */ static void on_change_button_clicked (PsppireAcr *acr) { gint i; GtkTreeModel *model = GTK_TREE_MODEL (acr->list_store); GList *l= gtk_tree_selection_get_selected_rows (acr->selection, &model); GtkTreePath *path = l->data; GtkTreeIter iter; gtk_tree_model_get_iter (model, &iter, path); for (i = 0 ; i < gtk_tree_model_get_n_columns (GTK_TREE_MODEL (acr->list_store)); ++i) { static GValue value; if ( ! acr->get_value (i, &value, acr->get_value_data) ) continue; gtk_list_store_set_value (acr->list_store, &iter, i, &value); g_value_unset (&value); } g_list_foreach (l, (GFunc) gtk_tree_path_free, NULL); g_list_free (l); if ( acr->update) acr->update (acr->update_data); } /* Callback for when the remove button is clicked. It deletes the currently selected entry. */ static void on_remove_button_clicked (PsppireAcr *acr) { GtkTreeModel *model = GTK_TREE_MODEL (acr->list_store); GList *l= gtk_tree_selection_get_selected_rows (acr->selection, &model); GtkTreePath *path = l->data; GtkTreeIter iter; gtk_tree_model_get_iter (model, &iter, path); gtk_list_store_remove (acr->list_store, &iter); g_list_foreach (l, (GFunc) gtk_tree_path_free, NULL); g_list_free (l); } /* Returns true if there is a row currently selected. False otherwise. */ static gboolean row_is_selected (const PsppireAcr *acr) { gboolean result; GtkTreeModel *model = GTK_TREE_MODEL (acr->list_store); GList *l = gtk_tree_selection_get_selected_rows (acr->selection, &model); result = (l != NULL); g_list_foreach (l, (GFunc) gtk_tree_path_free, NULL); g_list_free (l); return result; } /* Callback which occurs when an item in the treeview is selected */ static void on_select (GtkTreeSelection *selection, gpointer data) { PsppireAcr *acr = data; gtk_widget_set_sensitive (acr->remove_button, row_is_selected (acr)); gtk_widget_set_sensitive (acr->change_button, row_is_selected (acr) ); } void psppire_acr_set_enabled (PsppireAcr *acr, gboolean status) { gtk_widget_set_sensitive (acr->add_button, status); gtk_widget_set_sensitive (acr->change_button, status && row_is_selected (acr)); } static void psppire_acr_init (PsppireAcr *acr) { GtkWidget *bb = gtk_button_box_new (GTK_ORIENTATION_VERTICAL); GtkWidget *sw = gtk_scrolled_window_new (NULL, NULL); gtk_orientable_set_orientation (GTK_ORIENTABLE (acr), GTK_ORIENTATION_HORIZONTAL); acr->tv = GTK_TREE_VIEW (gtk_tree_view_new ()); acr->add_button = gtk_button_new_with_label (_("Add")); acr->change_button = gtk_button_new_with_label (_("Edit")); acr->remove_button = gtk_button_new_with_label (_("Remove")); acr->get_value = NULL; acr->get_value_data = NULL; acr->enabled = NULL; acr->update = NULL; gtk_widget_set_sensitive (acr->change_button, FALSE); gtk_widget_set_sensitive (acr->remove_button, FALSE); gtk_widget_set_sensitive (acr->add_button, FALSE); psppire_box_pack_start_defaults (GTK_BOX (bb), acr->add_button); psppire_box_pack_start_defaults (GTK_BOX (bb), acr->change_button); psppire_box_pack_start_defaults (GTK_BOX (bb), acr->remove_button); gtk_box_pack_start (GTK_BOX (acr), bb, FALSE, TRUE, 5); g_object_set (sw, "hscrollbar-policy", GTK_POLICY_NEVER, "vscrollbar-policy", GTK_POLICY_AUTOMATIC, "shadow-type", GTK_SHADOW_ETCHED_IN, NULL); gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (acr->tv)); gtk_box_pack_start (GTK_BOX (acr), sw, TRUE, TRUE, 5); g_signal_connect_swapped (acr->add_button, "clicked", G_CALLBACK (on_add_button_clicked), acr); g_signal_connect_swapped (acr->change_button, "clicked", G_CALLBACK (on_change_button_clicked), acr); g_signal_connect_swapped (acr->remove_button, "clicked", G_CALLBACK (on_remove_button_clicked), acr); gtk_widget_show_all (bb); g_object_set (acr->tv, "headers-visible", FALSE, NULL); acr->list_store = NULL; psppire_acr_set_model (acr, acr->list_store); acr->selection = gtk_tree_view_get_selection (acr->tv); g_signal_connect (acr->selection, "changed", G_CALLBACK (on_select), acr); gtk_widget_set_sensitive (GTK_WIDGET (acr), FALSE); gtk_widget_show_all (sw); { GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes ("value", renderer, "text", 0, NULL); gtk_tree_view_append_column (acr->tv, column); } } GtkWidget* psppire_acr_new (void) { return GTK_WIDGET (g_object_new (psppire_acr_get_type (), NULL)); } /* Set the widget's treemodel to LISTSTORE. LISTSTORE ownership is not transferred. */ void psppire_acr_set_model (PsppireAcr *acr, GtkListStore *liststore) { if (acr->list_store) g_object_unref (acr->list_store); if (liststore) g_object_ref (liststore); acr->list_store = liststore; gtk_tree_view_set_model (GTK_TREE_VIEW (acr->tv), GTK_TREE_MODEL (liststore)); gtk_widget_set_sensitive (GTK_WIDGET (acr), liststore != NULL); } void psppire_acr_set_enable_func (PsppireAcr *acr, EnabledFunc func, gpointer p) { acr->enabled = func; acr->enabled_data = p; } void psppire_acr_set_get_value_func (PsppireAcr *acr, GetValueFunc getvalue, gpointer data) { acr->get_value_data = data; acr->get_value = getvalue; } pspp-1.0.1/src/ui/gui/psppire-format.c0000644000175000017500000000246112470243701014523 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2012 Free Software Foundation 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 . */ #include #include "ui/gui/psppire-format.h" static gpointer psppire_format_copy (gpointer boxed) { struct fmt_spec *format = boxed; return g_memdup (format, sizeof *format); } static void psppire_format_free (gpointer boxed) { struct fmt_spec *format = boxed; g_free (format); } GType psppire_format_get_type (void) { static GType type = 0; if (type == 0) type = g_boxed_type_register_static ("PsppireFormat", psppire_format_copy, psppire_format_free); return type; } pspp-1.0.1/src/ui/gui/psppire-dialog-action-flip.c0000644000175000017500000000671013137223525016701 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2013 Free Software Foundation 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 . */ #include #include "psppire-dialog-action-flip.h" #include "psppire-var-view.h" #include "psppire-dialog.h" #include "builder-wrapper.h" static void psppire_dialog_action_flip_init (PsppireDialogActionFlip *act); static void psppire_dialog_action_flip_class_init (PsppireDialogActionFlipClass *class); G_DEFINE_TYPE (PsppireDialogActionFlip, psppire_dialog_action_flip, PSPPIRE_TYPE_DIALOG_ACTION); /* FLIP /VARIABLES=var_list /NEWNAMES=var_name. */ static char * generate_syntax (const PsppireDialogAction *act) { const gchar *text; PsppireDialogActionFlip *rd = PSPPIRE_DIALOG_ACTION_FLIP (act); GString *string = g_string_new ("FLIP"); gchar *syntax ; g_string_append (string, " /VARIABLES = "); psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->dest), 0, string); text = gtk_entry_get_text (GTK_ENTRY (rd->entry)); if ( text) g_string_append_printf (string, " /NEWNAME = %s", text); g_string_append (string, ".\n"); syntax = string->str; g_string_free (string, FALSE); return syntax; } static gboolean dialog_state_valid (gpointer a) { PsppireDialogActionFlip *act = PSPPIRE_DIALOG_ACTION_FLIP (a); GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (act->dest)); gint n_rows = gtk_tree_model_iter_n_children (model, NULL); if ( n_rows == 0 ) return FALSE; if ( 0 == strcmp ("", gtk_entry_get_text (GTK_ENTRY (act->entry)))) return FALSE; return TRUE; } static void refresh (PsppireDialogAction *rd_) { PsppireDialogActionFlip *rd = PSPPIRE_DIALOG_ACTION_FLIP (rd_); GtkTreeModel *dmodel = gtk_tree_view_get_model (GTK_TREE_VIEW (rd->dest)); gtk_list_store_clear (GTK_LIST_STORE (dmodel)); gtk_entry_set_text (GTK_ENTRY (rd->entry), ""); } static GtkBuilder * psppire_dialog_action_flip_activate (PsppireDialogAction *a, GVariant *param) { PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionFlip *act = PSPPIRE_DIALOG_ACTION_FLIP (a); GtkBuilder *xml = builder_new ( "transpose.ui"); pda->dialog = get_widget_assert (xml, "transpose-dialog"); pda->source = get_widget_assert (xml, "source-treeview"); act->dest = get_widget_assert (xml, "variables-treeview"); act->entry = get_widget_assert (xml, "new-name-entry"); psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid); psppire_dialog_action_set_refresh (pda, refresh); return xml; } static void psppire_dialog_action_flip_class_init (PsppireDialogActionFlipClass *class) { PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_flip_activate; PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax; } static void psppire_dialog_action_flip_init (PsppireDialogActionFlip *act) { } pspp-1.0.1/src/ui/gui/psppire-dialog-action-comments.h0000644000175000017500000000452712642117700017602 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2015 Free Software Foundation 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 . */ #include #include #include "psppire-dialog-action.h" #ifndef __PSPPIRE_DIALOG_ACTION_COMMENTS_H__ #define __PSPPIRE_DIALOG_ACTION_COMMENTS_H__ G_BEGIN_DECLS #define PSPPIRE_TYPE_DIALOG_ACTION_COMMENTS (psppire_dialog_action_comments_get_type ()) #define PSPPIRE_DIALOG_ACTION_COMMENTS(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ PSPPIRE_TYPE_DIALOG_ACTION_COMMENTS, PsppireDialogActionComments)) #define PSPPIRE_DIALOG_ACTION_COMMENTS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), \ PSPPIRE_TYPE_DIALOG_ACTION_COMMENTS, \ PsppireDialogActionCommentsClass)) #define PSPPIRE_IS_DIALOG_ACTION_COMMENTS(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_TYPE_DIALOG_ACTION_COMMENTS)) #define PSPPIRE_IS_DIALOG_ACTION_COMMENTS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_TYPE_DIALOG_ACTION_COMMENTS)) #define PSPPIRE_DIALOG_ACTION_COMMENTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ PSPPIRE_TYPE_DIALOG_ACTION_COMMENTS, \ PsppireDialogActionCommentsClass)) typedef struct _PsppireDialogActionComments PsppireDialogActionComments; typedef struct _PsppireDialogActionCommentsClass PsppireDialogActionCommentsClass; struct _PsppireDialogActionComments { PsppireDialogAction parent; GtkWidget *textview; GtkWidget *check; }; struct _PsppireDialogActionCommentsClass { PsppireDialogActionClass parent_class; }; GType psppire_dialog_action_comments_get_type (void) ; G_END_DECLS #endif /* __PSPPIRE_DIALOG_ACTION_COMMENTS_H__ */ pspp-1.0.1/src/ui/gui/widget-io.h0000644000175000017500000000225312470243701013447 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2007 Free Software Foundation 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 . */ #include /* Returns a string generated from FMT and a list of GtkEntry widgets. Each conversion in FMT will be replaced with the text from the corresponding GtkEntry. The normal printf semantics will be ignored. Note that the GtkEntry widgets may be GtkSpinbuttons or any other widget derived from GtkEntry. The returned string should be freed when no longer required. */ gchar * widget_printf (const gchar *fmt, ...); pspp-1.0.1/src/ui/gui/psppire-dialog-action-rank.h0000644000175000017500000000563112470243701016705 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2012 Free Software Foundation 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 . */ #ifndef __PSPPIRE_DIALOG_ACTION_RANK_H__ #define __PSPPIRE_DIALOG_ACTION_RANK_H__ #include #include #include "psppire-dialog-action.h" G_BEGIN_DECLS #define PSPPIRE_TYPE_DIALOG_ACTION_RANK (psppire_dialog_action_rank_get_type ()) #define PSPPIRE_DIALOG_ACTION_RANK(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ PSPPIRE_TYPE_DIALOG_ACTION_RANK, PsppireDialogActionRank)) #define PSPPIRE_DIALOG_ACTION_RANK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), \ PSPPIRE_TYPE_DIALOG_ACTION_RANK, \ PsppireDialogActionRankClass)) #define PSPPIRE_IS_DIALOG_ACTION_RANK(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_TYPE_DIALOG_ACTION_RANK)) #define PSPPIRE_IS_DIALOG_ACTION_RANK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_TYPE_DIALOG_ACTION_RANK)) #define PSPPIRE_DIALOG_ACTION_RANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ PSPPIRE_TYPE_DIALOG_ACTION_RANK, \ PsppireDialogActionRankClass)) typedef struct _PsppireDialogActionRank PsppireDialogActionRank; typedef struct _PsppireDialogActionRankClass PsppireDialogActionRankClass; enum RANK_FUNC { RANK, NORMAL, PERCENT, RFRACTION, PROPORTION, N, NTILES, SAVAGE, n_RANK_FUNCS }; struct _PsppireDialogActionRank { PsppireDialogAction parent; /*< private >*/ GtkWidget *rank_vars; GtkWidget *group_vars; GtkToggleButton *ascending_togglebutton; GtkToggleButton *summary_togglebutton; /* Types subdialog widgets */ GtkWidget *types_dialog; GtkWidget *ntiles_entry; GtkToggleButton *func_button[n_RANK_FUNCS]; GtkWidget *formula_box; GtkToggleButton *blom; GtkToggleButton *tukey; GtkToggleButton *rankit; GtkToggleButton *vw; /* Ties subdialog widgets */ PsppireDialog *ties_dialog; GtkToggleButton *mean; GtkToggleButton *low; GtkToggleButton *high; GtkToggleButton *condense; }; struct _PsppireDialogActionRankClass { PsppireDialogActionClass parent_class; }; GType psppire_dialog_action_rank_get_type (void) ; G_END_DECLS #endif /* __PSPPIRE_DIALOG_ACTION_RANK_H__ */ pspp-1.0.1/src/ui/gui/psppire-dialog-action-recode-different.c0000644000175000017500000002766613137223525021171 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2007, 2009, 2010, 2011, 2012, 2014, 2016 Free Software Foundation 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 . */ #include #include "psppire-var-view.h" #include "psppire-dialog-action-recode-different.h" #include "builder-wrapper.h" #include #include "psppire-acr.h" #include "psppire-selector.h" #include "psppire-val-chooser.h" #include "helper.h" #include #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid static gboolean difx_variable_treeview_is_populated (PsppireDialogActionRecode *rd) { PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (rd); GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview)); if (g_hash_table_size (rdd->varmap) != gtk_tree_model_iter_n_children (model, NULL) ) return FALSE; return TRUE; } /* Dialog is valid iff at least one variable has been selected, AND the list of mappings is not empty. */ static gboolean dialog_state_valid (gpointer data) { PsppireDialogActionRecode *rd = data; GtkTreeIter not_used; if ( ! rd->value_map ) return FALSE; if ( ! gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->value_map), ¬_used) ) return FALSE; return difx_variable_treeview_is_populated (rd); } static void psppire_dialog_action_recode_different_class_init (PsppireDialogActionRecodeDifferentClass *class); G_DEFINE_TYPE (PsppireDialogActionRecodeDifferent, psppire_dialog_action_recode_different, PSPPIRE_TYPE_DIALOG_ACTION_RECODE); static void refresh (PsppireDialogAction *act) { PsppireDialogActionRecode *rd = PSPPIRE_DIALOG_ACTION_RECODE (act); PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (rd); psppire_dialog_action_recode_refresh (act); if (rdd->varmap) g_hash_table_remove_all (rdd->varmap); } static void on_old_new_show (PsppireDialogActionRecode *rd) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->toggle[BUTTON_NEW_VALUE]), TRUE); g_signal_emit_by_name (rd->toggle[BUTTON_NEW_VALUE], "toggled"); gtk_widget_show (rd->toggle[BUTTON_NEW_COPY]); gtk_widget_show (rd->new_copy_label); gtk_widget_show (rd->strings_box); } /* Name-Label pair */ struct nlp { char *name; char *label; }; static struct nlp * nlp_create (const char *name, const char *label) { struct nlp *nlp = xmalloc (sizeof *nlp); nlp->name = g_strdup (name); nlp->label = NULL; if ( 0 != strcmp ("", label)) nlp->label = g_strdup (label); return nlp; } static void nlp_destroy (gpointer data) { struct nlp *nlp = data ; if ( ! nlp ) return; g_free (nlp->name); g_free (nlp->label); g_free (nlp); } static void render_new_var_name (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) { struct nlp *nlp = NULL; PsppireDialogActionRecode *rd = data; PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (rd); struct variable *var = NULL; gtk_tree_model_get (tree_model, iter, 0, &var, -1); nlp = g_hash_table_lookup (rdd->varmap, var); if ( nlp ) g_object_set (cell, "text", nlp->name, NULL); else g_object_set (cell, "text", "", NULL); } static void on_change_clicked (GObject *obj, gpointer data) { PsppireDialogActionRecode *rd = data; PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (rd); struct variable *var = NULL; struct nlp *nlp; GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview)); GtkTreeIter iter; GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (rd->variable_treeview)); GList *rows = gtk_tree_selection_get_selected_rows (selection, &model); const gchar *dest_var_name = gtk_entry_get_text (GTK_ENTRY (rd->new_name_entry)); const gchar *dest_var_label = gtk_entry_get_text (GTK_ENTRY (rd->new_label_entry)); if ( NULL == rows || rows->next != NULL) goto finish; gtk_tree_model_get_iter (model, &iter, rows->data); gtk_tree_model_get (model, &iter, 0, &var, -1); g_hash_table_remove (rdd->varmap, var); nlp = nlp_create (dest_var_name, dest_var_label); g_hash_table_insert (rdd->varmap, var, nlp); gtk_tree_model_row_changed (model, rows->data, &iter); finish: g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL); g_list_free (rows); } /* Callback which gets called when a new row is selected in the variable treeview. It sets the name and label entry widgets to reflect the currently selected row. */ static void on_selection_change (GtkTreeSelection *selection, gpointer data) { PsppireDialogActionRecode *rd = data; PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (rd); GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview)); GList *rows = gtk_tree_selection_get_selected_rows (selection, &model); if ( rows && !rows->next) { /* Exactly one row is selected */ struct nlp *nlp; struct variable *var; gboolean ok; GtkTreeIter iter; gtk_widget_set_sensitive (rd->change_button, TRUE); gtk_widget_set_sensitive (rd->new_name_entry, TRUE); gtk_widget_set_sensitive (rd->new_label_entry, TRUE); ok = gtk_tree_model_get_iter (model, &iter, (GtkTreePath*) rows->data); g_return_if_fail (ok); gtk_tree_model_get (model, &iter, 0, &var, -1); nlp = g_hash_table_lookup (rdd->varmap, var); if (nlp) { gtk_entry_set_text (GTK_ENTRY (rd->new_name_entry), nlp->name ? nlp->name : ""); gtk_entry_set_text (GTK_ENTRY (rd->new_label_entry), nlp->label ? nlp->label : ""); } else { gtk_entry_set_text (GTK_ENTRY (rd->new_name_entry), ""); gtk_entry_set_text (GTK_ENTRY (rd->new_label_entry), ""); } } else { gtk_widget_set_sensitive (rd->change_button, FALSE); gtk_widget_set_sensitive (rd->new_name_entry, FALSE); gtk_widget_set_sensitive (rd->new_label_entry, FALSE); gtk_entry_set_text (GTK_ENTRY (rd->new_name_entry), ""); gtk_entry_set_text (GTK_ENTRY (rd->new_label_entry), ""); } g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL); g_list_free (rows); } static void populate_treeview (PsppireDialogActionRecode *act) { GtkTreeSelection *sel; PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (act); GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); GtkTreeViewColumn *col = gtk_tree_view_column_new_with_attributes (_("New"), renderer, "text", NULL, NULL); gtk_tree_view_column_set_cell_data_func (col, renderer, render_new_var_name, act, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (act->variable_treeview), col); col = gtk_tree_view_get_column (GTK_TREE_VIEW (act->variable_treeview), 0); g_object_set (col, "title", _("Old"), NULL); g_object_set (act->variable_treeview, "headers-visible", TRUE, NULL); rdd->varmap = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, nlp_destroy); sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (act->variable_treeview)); g_signal_connect (sel, "changed", G_CALLBACK (on_selection_change), act); g_signal_connect (act->change_button, "clicked", G_CALLBACK (on_change_clicked), act); } static GtkBuilder * psppire_dialog_action_recode_different_activate (PsppireDialogAction *a, GVariant *param) { PsppireDialogActionRecode *act = PSPPIRE_DIALOG_ACTION_RECODE (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); GtkBuilder *xml = psppire_dialog_action_recode_pre_activate (act, populate_treeview); gtk_window_set_title (GTK_WINDOW (pda->dialog), _("Recode into Different Variables")); gtk_window_set_title (GTK_WINDOW (act->old_and_new_dialog), _("Recode into Different Variables: Old and New Values ")); gtk_widget_show (act->output_variable_box); g_signal_connect_swapped (act->old_and_new_dialog, "show", G_CALLBACK (on_old_new_show), act); psppire_dialog_action_set_refresh (pda, refresh); psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid); return xml; } static void append_into_clause (const PsppireDialogActionRecode *rd, struct string *dds) { PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (rd); /* If applicable set the INTO clause which determines into which variables the new values go */ GtkTreeIter iter; ds_put_cstr (dds, "\n\tINTO "); gboolean ok; for (ok = psppire_var_view_get_iter_first (PSPPIRE_VAR_VIEW (rd->variable_treeview), &iter); ok; ok = psppire_var_view_get_iter_next (PSPPIRE_VAR_VIEW (rd->variable_treeview), &iter)) { struct nlp *nlp = NULL; const struct variable *var = psppire_var_view_get_variable (PSPPIRE_VAR_VIEW (rd->variable_treeview), 0, &iter); nlp = g_hash_table_lookup (rdd->varmap, var); ds_put_cstr (dds, nlp->name); ds_put_cstr (dds, " "); } } static void append_string_declarations (const PsppireDialogActionRecode *rd, struct string *dds) { PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (rd); /* Declare new string variables if applicable */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->string_button))) { GHashTableIter iter; struct variable *var = NULL; struct nlp *nlp = NULL; g_hash_table_iter_init (&iter, rdd->varmap); while (g_hash_table_iter_next (&iter, (void**) &var, (void**) &nlp)) { ds_put_cstr (dds, "\nSTRING "); ds_put_cstr (dds, nlp->name); ds_put_c_format (dds, " (A%d).", (int) gtk_spin_button_get_value (GTK_SPIN_BUTTON (rd->width_entry))); } } } static void append_new_value_labels (const PsppireDialogActionRecode *rd, struct string *dds) { PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (rd); /* If applicable, set labels for the new variables. */ GHashTableIter iter; struct variable *var = NULL; struct nlp *nlp = NULL; g_hash_table_iter_init (&iter, rdd->varmap); while (g_hash_table_iter_next (&iter, (void**) &var, (void**) &nlp)) { if (nlp->label) { struct string sl; ds_init_empty (&sl); syntax_gen_string (&sl, ss_cstr (nlp->label)); ds_put_c_format (dds, "\nVARIABLE LABELS %s %s.", nlp->name, ds_cstr (&sl)); ds_destroy (&sl); } } } static char * diff_generate_syntax (const PsppireDialogAction *act) { return psppire_dialog_action_recode_generate_syntax (act, append_string_declarations, append_into_clause, append_new_value_labels); } static gboolean target_is_string (const PsppireDialogActionRecode *rd) { return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->string_button)); } static void psppire_dialog_action_recode_different_class_init (PsppireDialogActionRecodeDifferentClass *class) { PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_recode_different_activate; PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = diff_generate_syntax; PSPPIRE_DIALOG_ACTION_RECODE_CLASS (class)->target_is_string = target_is_string; } static void psppire_dialog_action_recode_different_init (PsppireDialogActionRecodeDifferent *act) { } pspp-1.0.1/src/ui/gui/psppire-cell-renderer-button.h0000644000175000017500000000524213113322021017260 00000000000000/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef PSPPIRE_CELL_RENDERER_BUTTON_H #define PSPPIRE_CELL_RENDERER_BUTTON_H 1 #include G_BEGIN_DECLS #define PSPPIRE_TYPE_CELL_RENDERER_BUTTON (psppire_cell_renderer_button_get_type()) #define PSPPIRE_CELL_RENDERER_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),PSPPIRE_TYPE_CELL_RENDERER_BUTTON,PsppireCellRendererButton)) #define PSPPIRE_CELL_RENDERER_BUTTON_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class),PSPPIRE_TYPE_CELL_RENDERER_BUTTON,PsppireCellRendererButtonClass)) #define PSPPIRE_IS_CELL_RENDERER_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),PSPPIRE_TYPE_CELL_RENDERER_BUTTON)) #define PSPPIRE_IS_CELL_RENDERER_BUTTON_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class),PSPPIRE_TYPE_CELL_RENDERER_BUTTON)) #define PSPPIRE_CELL_RENDERER_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),PSPPIRE_TYPE_CELL_RENDERER_BUTTON,PsppireCellRendererButtonClass)) typedef struct _PsppireCellRendererButton PsppireCellRendererButton; typedef struct _PsppireCellRendererButtonClass PsppireCellRendererButtonClass; struct _PsppireCellRendererButton { GtkCellRenderer parent; gboolean editable; gchar *label; gint border_width; gint xpad; gint ypad; gboolean slash; GtkWidget *button; guint32 click_time; gdouble click_x; gdouble click_y; /* Style caching. */ GtkStyle *button_style; GtkStyle *label_style; GtkWidget *base; gulong style_set_handler; gboolean dispose_has_run; }; struct _PsppireCellRendererButtonClass { GtkCellRendererClass parent_class; }; GType psppire_cell_renderer_button_get_type (void) G_GNUC_CONST; GtkCellRenderer* psppire_cell_renderer_button_new (void); void psppire_cell_renderer_button_set_slash (PsppireCellRendererButton *, gboolean slash); gboolean psppire_cell_renderer_button_get_slash (const PsppireCellRendererButton *); G_END_DECLS #endif /* PSPPIRE_CELL_RENDERER_BUTTON_H */ pspp-1.0.1/src/ui/gui/marshaller-list0000644000175000017500000000035613113322021014422 00000000000000#List of custom marshallers used by psppire BOOLEAN:BOOLEAN BOOLEAN:BOXED BOOLEAN:ENUM BOOLEAN:ENUM,INT BOOLEAN:INT BOOLEAN:OBJECT BOOLEAN:VOID VOID:BOXED,OBJECT VOID:INT,INT VOID:OBJECT,OBJECT VOID:POINTER,INT,INT VOID:INT,UINT,POINTER pspp-1.0.1/src/ui/gui/pspp.lang0000644000175000017500000000553512470243701013241 00000000000000 \n", html->file); } fputs ("\n", html->file); fputs ("file); fputs (" LINK=\"#1f00ff\" ALINK=\"#ff0000\" VLINK=\"#9900dd\">\n", html->file); return d; error: output_driver_destroy (d); return NULL; } /* Emits CONTENT to the output, escaping CONTENT as necessary for HTML. */ static void print_title_tag (FILE *file, const char *name, const char *content) { if (content != NULL) { fprintf (file, "<%s>", name); escape_string (file, content, strlen (content), " ", " - "); fprintf (file, "\n", name); } } static void html_destroy (struct output_driver *driver) { struct html_driver *html = html_driver_cast (driver); if (html->file != NULL) { fprintf (html->file, "\n" "\n" "\n"); fn_close (html->handle, html->file); } free (html->chart_file_name); fh_unref (html->handle); free (html->command_name); free (html); } static void html_submit (struct output_driver *driver, const struct output_item *output_item) { struct html_driver *html = html_driver_cast (driver); output_driver_track_current_command (output_item, &html->command_name); if (is_table_item (output_item)) { struct table_item *table_item = to_table_item (output_item); html_output_table (html, table_item); } #ifdef HAVE_CAIRO else if (is_chart_item (output_item) && html->chart_file_name != NULL) { struct chart_item *chart_item = to_chart_item (output_item); char *file_name; file_name = xr_draw_png_chart (chart_item, html->chart_file_name, html->chart_cnt++, &html->fg, &html->bg ); if (file_name != NULL) { const char *title = chart_item_get_title (chart_item); fprintf (html->file, "\"Chart:", file_name, title ? title : _("No description")); free (file_name); } } #endif /* HAVE_CAIRO */ else if (is_text_item (output_item)) { struct text_item *text_item = to_text_item (output_item); const char *s = text_item_get_text (text_item); switch (text_item_get_type (text_item)) { case TEXT_ITEM_TITLE: print_title_tag (html->file, "H1", s); break; case TEXT_ITEM_SUBTITLE: print_title_tag (html->file, "H2", s); break; case TEXT_ITEM_COMMAND_OPEN: fprintf (html->file, "
file, s, strlen (s), "_", "
"); fprintf (html->file, "\">"); print_title_tag (html->file, "H3", s); break; case TEXT_ITEM_COMMAND_CLOSE: fprintf (html->file, "
\n"); break; case TEXT_ITEM_SUBHEAD: print_title_tag (html->file, "H4", s); break; case TEXT_ITEM_SYNTAX: fprintf (html->file, "
");
          escape_string (html->file, s, strlen (s), " ", "
"); fprintf (html->file, "
\n"); break; case TEXT_ITEM_PARAGRAPH: print_title_tag (html->file, "P", s); break; case TEXT_ITEM_MONOSPACE: print_title_tag (html->file, "PRE", s); /* should be

*/ break; case TEXT_ITEM_BLANK_LINE: fputs ("
", html->file); break; case TEXT_ITEM_EJECT_PAGE: /* Nothing to do. */ break; case TEXT_ITEM_COMMENT: case TEXT_ITEM_ECHO: /* We print out syntax anyway, so nothing to do here either. */ break; } } else if (is_message_item (output_item)) { const struct message_item *message_item = to_message_item (output_item); const struct msg *msg = message_item_get_msg (message_item); char *s = msg_to_string (msg, html->command_name); print_title_tag (html->file, "P", s); free (s); } } /* Write LENGTH characters in TEXT to file F, escaping characters as necessary for HTML. Spaces are replaced by SPACE, which should be " " or " " New-lines are replaced by NEWLINE, which might be "
" or "\n" or something else appropriate. */ static void escape_string (FILE *file, const char *text, size_t length, const char *space, const char *newline) { while (length-- > 0) { char c = *text++; switch (c) { case '\n': fputs (newline, file); break; case '&': fputs ("&", file); break; case '<': fputs ("<", file); break; case '>': fputs (">", file); break; case ' ': fputs (space, file); break; case '"': fputs (""", file); break; default: putc (c, file); break; } } } static void put_border (FILE *file, int n_borders, int style, const char *border_name) { fprintf (file, "%sborder-%s: %s", n_borders == 0 ? " STYLE=\"" : "; ", border_name, style == TAL_1 ? "thin solid" : "double"); } static void put_tfoot (struct html_driver *html, const struct table *t, bool *tfoot) { if (!*tfoot) { fprintf (html->file, "", table_nc (t)); *tfoot = true; } else fputs ("\n
", html->file); } static void html_output_table (struct html_driver *html, const struct table_item *item) { const struct table *t = table_item_get_table (item); const char *title = table_item_get_title (item); const char *caption = table_item_get_caption (item); int footnote_idx = 0; bool tfoot = false; int y; fputs ("", html->file); if (caption) { put_tfoot (html, t, &tfoot); escape_string (html->file, caption, strlen (caption), " ", "
"); } footnote_idx = 0; for (y = 0; y < table_nr (t); y++) { int x; for (x = 0; x < table_nc (t); ) { const struct cell_contents *c; struct table_cell cell; table_get_cell (t, x, y, &cell); if (y != cell.d[TABLE_VERT][0]) goto next_0; for (c = cell.contents; c < &cell.contents[cell.n_contents]; c++) { int i; for (i = 0; i < c->n_footnotes; i++) { char marker[16]; put_tfoot (html, t, &tfoot); str_format_26adic (++footnote_idx, false, marker, sizeof marker); fprintf (html->file, "%s ", marker); escape_string (html->file, c->footnotes[i], strlen (c->footnotes[i]), " ", "
"); } } next_0: x = cell.d[TABLE_HORZ][1]; table_cell_free (&cell); } } if (tfoot) fputs ("\n", html->file); footnote_idx = 0; fputs ("\n", html->file); if (title != NULL) { fputs (" \n", html->file); } for (y = 0; y < table_nr (t); y++) { int x; fputs (" \n", html->file); for (x = 0; x < table_nc (t); ) { const struct cell_contents *c; struct table_cell cell; const char *tag; bool is_header; int alignment, colspan, rowspan; int top, left, right, bottom, n_borders; table_get_cell (t, x, y, &cell); if (x != cell.d[TABLE_HORZ][0] || y != cell.d[TABLE_VERT][0]) goto next_1; /* Output or . */ fprintf (html->file, "\n", tag); next_1: x = cell.d[TABLE_HORZ][1]; table_cell_free (&cell); } fputs (" \n", html->file); } fputs ("
", html->file); escape_string (html->file, title, strlen (title), " ", "
"); fputs ("
or tag. */ is_header = (y < table_ht (t) || y >= table_nr (t) - table_hb (t) || x < table_hl (t) || x >= table_nc (t) - table_hr (t)); tag = is_header ? "TH" : "TD"; fprintf (html->file, " <%s", tag); alignment = (cell.n_contents > 0 ? cell.contents[0].options & TAB_ALIGNMENT : TAB_LEFT); if (alignment != TAB_LEFT) fprintf (html->file, " ALIGN=\"%s\"", alignment == TAB_RIGHT ? "RIGHT" : "CENTER"); colspan = table_cell_colspan (&cell); if (colspan > 1) fprintf (html->file, " COLSPAN=\"%d\"", colspan); rowspan = table_cell_rowspan (&cell); if (rowspan > 1) fprintf (html->file, " ROWSPAN=\"%d\"", rowspan); if (html->borders) { /* Cell borders. */ n_borders = 0; top = table_get_rule (t, TABLE_VERT, x, y); if (top > TAL_GAP) put_border (html->file, n_borders++, top, "top"); if (y + rowspan == table_nr (t)) { bottom = table_get_rule (t, TABLE_VERT, x, y + rowspan); if (bottom > TAL_GAP) put_border (html->file, n_borders++, bottom, "bottom"); } left = table_get_rule (t, TABLE_HORZ, x, y); if (left > TAL_GAP) put_border (html->file, n_borders++, left, "left"); if (x + colspan == table_nc (t)) { right = table_get_rule (t, TABLE_HORZ, x + colspan, y); if (right > TAL_GAP) put_border (html->file, n_borders++, right, "right"); } if (n_borders > 0) fputs ("\"", html->file); } putc ('>', html->file); /* Output cell contents. */ for (c = cell.contents; c < &cell.contents[cell.n_contents]; c++) { if (c->text) { const char *s = c->text; int i; if (c->options & TAB_EMPH) fputs ("", html->file); if (c->options & TAB_FIX) { fputs ("", html->file); escape_string (html->file, s, strlen (s), " ", "
"); fputs ("
", html->file); } else { s += strspn (s, CC_SPACES); escape_string (html->file, s, strlen (s), " ", "
"); } if (c->options & TAB_EMPH) fputs ("
", html->file); if (c->n_footnotes > 0) { fputs ("", html->file); for (i = 0; i < c->n_footnotes; i++) { char marker[16]; if (i > 0) putc (',', html->file); str_format_26adic (++footnote_idx, false, marker, sizeof marker); fputs (marker, html->file); } fputs ("", html->file); } } else html_output_table (html, c->table); } /* Output
\n\n", html->file); } struct output_driver_factory html_driver_factory = { "html", "pspp.html", html_create }; static const struct output_driver_class html_driver_class = { "html", html_destroy, html_submit, NULL, }; pspp-1.0.1/src/output/options.c0000644000175000017500000002375012523704223013411 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "output/options.h" #include #include #include #include #include #include "libpspp/str.h" #include "libpspp/string-map.h" #include "output/driver-provider.h" #include "output/measure.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Creates and returns a new struct driver_option that contains copies of all of the supplied arguments. All of the arguments must be nonnull, except that VALUE may be NULL (if the user did not supply a value for this option). Refer to struct driver_option for the meaning of each argument. */ struct driver_option * driver_option_create (const char *driver_name, const char *name, const char *value, const char *default_value) { struct driver_option *o = xmalloc (sizeof *o); o->driver_name = xstrdup (driver_name); o->name = xstrdup (name); o->value = value != NULL ? xstrdup (value) : NULL; o->default_value = default_value ? xstrdup (default_value) : NULL; return o; } /* Creates and returns a new struct driver_option for output driver DRIVER (which is needed only to the extent that its name will be used in error messages). The option named NAME is extracted from OPTIONS. DEFAULT_VALUE is the default value of the option, used if the given option was not supplied or was invalid. */ struct driver_option * driver_option_get (struct output_driver *driver, struct string_map *options, const char *name, const char *default_value) { struct driver_option *option; char *value; value = string_map_find_and_delete (options, name); option = driver_option_create (output_driver_get_name (driver), name, value, default_value); free (value); return option; } /* Frees driver option O. */ void driver_option_destroy (struct driver_option *o) { if (o != NULL) { free (o->driver_name); free (o->name); free (o->value); free (o->default_value); free (o); } } /* Stores the paper size of the value of option O into *H and *V, in 1/72000" units. Any syntax accepted by measure_paper() may be used. Destroys O. */ void parse_paper_size (struct driver_option *o, int *h, int *v) { if (o->value == NULL || !measure_paper (o->value, h, v)) measure_paper (o->default_value, h, v); driver_option_destroy (o); } static int do_parse_boolean (const char *driver_name, const char *key, const char *value) { if (!strcmp (value, "on") || !strcmp (value, "true") || !strcmp (value, "yes") || !strcmp (value, "1")) return true; else if (!strcmp (value, "off") || !strcmp (value, "false") || !strcmp (value, "no") || !strcmp (value, "0")) return false; else { msg (MW, _("%s: `%s' is `%s' but a Boolean value is required"), driver_name, value, key); return -1; } } /* Parses and return O's value as a Boolean value. "true" and "false", "yes" and "no", "on" and "off", and "1" and "0" are acceptable boolean strings. Destroys O. */ bool parse_boolean (struct driver_option *o) { bool retval; retval = do_parse_boolean (o->driver_name, o->name, o->default_value) > 0; if (o->value != NULL) { int value = do_parse_boolean (o->driver_name, o->name, o->value); if (value >= 0) retval = value; } driver_option_destroy (o); return retval; } /* Parses O's value as an enumeration constant. The arguments to this function consist of a series of string/int pairs, terminated by a null pointer value. O's value is compared to each string in turn, and parse_enum() returns the int associated with the first matching string. If there is no match, or if O has no user-specified value, then O's default value is treated the same way. If the default value still does not match, parse_enum() returns 0. Example: parse_enum (o, "a", 1, "b", 2, NULL_SENTINEL) returns 1 if O's value if "a", 2 if O's value is "b". Destroys O. */ int parse_enum (struct driver_option *o, ...) { va_list args; int retval; retval = 0; va_start (args, o); for (;;) { const char *s; int value; s = va_arg (args, const char *); if (s == NULL) { if (o->value != NULL) { struct string choices; int i; ds_init_empty (&choices); va_end (args); va_start (args, o); for (i = 0; ; i++) { s = va_arg (args, const char *); if (s == NULL) break; value = va_arg (args, int); if (i > 0) ds_put_cstr (&choices, ", "); ds_put_format (&choices, "`%s'", s); } msg (MW, _("%s: `%s' is `%s' but one of the following " "is required: %s"), o->driver_name, o->name, o->value, ds_cstr (&choices)); ds_destroy (&choices); } break; } value = va_arg (args, int); if (o->value != NULL && !strcmp (s, o->value)) { retval = value; break; } else if (!strcmp (s, o->default_value)) retval = value; } va_end (args); driver_option_destroy (o); return retval; } /* Parses O's value as an integer in the range MIN_VALUE to MAX_VALUE (inclusive) and returns the integer. Destroys O. */ int parse_int (struct driver_option *o, int min_value, int max_value) { int retval = strtol (o->default_value, NULL, 0); if (o->value != NULL) { int value; char *tail; errno = 0; value = strtol (o->value, &tail, 0); if (tail != o->value && *tail == '\0' && errno != ERANGE && value >= min_value && value <= max_value) retval = value; else if (max_value == INT_MAX) { if (min_value == 0) msg (MW, _("%s: `%s' is `%s' but a nonnegative integer " "is required"), o->driver_name, o->name, o->value); else if (min_value == 1) msg (MW, _("%s: `%s' is `%s' but a positive integer is " "required"), o->driver_name, o->name, o->value); else if (min_value == INT_MIN) msg (MW, _("%s: `%s' is `%s' but an integer is required"), o->driver_name, o->name, o->value); else msg (MW, _("%s: `%s' is `%s' but an integer greater " "than %d is required"), o->driver_name, o->name, o->value, min_value - 1); } else msg (MW, _("%s: `%s' is `%s' but an integer between %d and " "%d is required"), o->driver_name, o->name, o->value, min_value, max_value); } driver_option_destroy (o); return retval; } /* Parses O's value as a dimension, as understood by measure_dimension(), and returns its length in units of 1/72000". Destroys O. */ int parse_dimension (struct driver_option *o) { int retval; retval = (o->value != NULL ? measure_dimension (o->value) : o->default_value != NULL ? measure_dimension (o->default_value) : -1); driver_option_destroy (o); return retval; } /* Parses O's value as a string and returns it as a malloc'd string that the caller is responsible for freeing. Destroys O. */ char * parse_string (struct driver_option *o) { char *retval = xstrdup (o->value != NULL ? o->value : o->default_value); driver_option_destroy (o); return retval; } static char * default_chart_file_name (const char *file_name) { if (strcmp (file_name, "-")) { const char *extension = strrchr (file_name, '.'); int stem_length = extension ? extension - file_name : strlen (file_name); return xasprintf ("%.*s-#.png", stem_length, file_name); } else return NULL; } /* Parses and returns a chart file name, or NULL if no charts should be output. If a nonnull string is returned, it will contain at least one '#' character, which the client will presumably replace by a number as part of writing charts to separate files. If O->value is "none", then this function returns NULL. If O->value is non-NULL but not "none", returns a copy of that string (if it contains '#'). If O->value is NULL, then O's default_value should be the name of the main output file. Returns NULL if default_value is "-", and otherwise returns a copy of string string with its extension stripped off and "-#.png" appended. Destroys O. */ char * parse_chart_file_name (struct driver_option *o) { char *chart_file_name; if (o->value != NULL) { if (!strcmp (o->value, "none")) chart_file_name = NULL; else if (strchr (o->value, '#') != NULL) chart_file_name = xstrdup (o->value); else { msg (MW, _("%s: `%s' is `%s' but a file name that contains " "`#' is required."), o->name, o->value, o->driver_name); chart_file_name = default_chart_file_name (o->default_value); } } else chart_file_name = default_chart_file_name (o->default_value); driver_option_destroy (o); return chart_file_name; } pspp-1.0.1/src/output/options.h0000644000175000017500000000442712470242642013421 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef OUTPUT_OPTIONS_H #define OUTPUT_OPTIONS_H 1 /* Helper functions for driver option parsing. */ #include #include "libpspp/compiler.h" struct output_driver; struct string_map; /* An option being parsed. */ struct driver_option { char *driver_name; /* Driver's name, for use in error messages. */ char *name; /* Option name, for use in error messages. */ char *value; /* Value supplied by user (NULL if none). */ char *default_value; /* Default value supplied by driver. */ }; struct driver_option *driver_option_create (const char *driver_name, const char *name, const char *value, const char *default_value); struct driver_option *driver_option_get (struct output_driver *, struct string_map *, const char *name, const char *default_value); void driver_option_destroy (struct driver_option *); void parse_paper_size (struct driver_option *, int *h, int *v); bool parse_boolean (struct driver_option *); int parse_enum (struct driver_option *, ...) SENTINEL(0); int parse_int (struct driver_option *, int min_value, int max_value); int parse_dimension (struct driver_option *); char *parse_string (struct driver_option *); char *parse_chart_file_name (struct driver_option *); #endif /* output/options.h */ pspp-1.0.1/src/output/driver-provider.h0000644000175000017500000001032112642117700015034 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef OUTPUT_DRIVER_PROVIDER_H #define OUTPUT_DRIVER_PROVIDER_H 1 #include #include "data/settings.h" #include "libpspp/compiler.h" #include "output/driver.h" struct output_item; struct string_map; struct file_handle; /* A configured output driver. */ struct output_driver { const struct output_driver_class *class; /* Driver class. */ char *name; /* Name of this driver. */ enum settings_output_devices device_type; /* One of SETTINGS_DEVICE_*. */ }; void output_driver_init (struct output_driver *, const struct output_driver_class *, const char *, enum settings_output_devices); void output_driver_destroy (struct output_driver *); const char *output_driver_get_name (const struct output_driver *); /* One kind of output driver. Output driver implementations must not call msg() to report errors. This can lead to reentrance in the output driver, because msg() may report error messages using the output drivers. Instead, this code should report errors with error(), which will never call into the output drivers. */ struct output_driver_class { /* Name of this driver class. */ const char *name; /* Closes and frees DRIVER. */ void (*destroy) (struct output_driver *driver); /* Passes ITEM to DRIVER to be written as output. The caller retains ownership of ITEM (but DRIVER may keep a copy of it by incrementing the reference count by calling output_item_ref). */ void (*submit) (struct output_driver *driver, const struct output_item *item); /* Ensures that any output items passed to the 'submit' function for DRIVER have actually been displayed. This is called from the text-based UI before showing the command prompt, to ensure that the user has actually been shown any preceding output If it doesn't make sense for DRIVER to be used this way, then this function need not do anything. */ void (*flush) (struct output_driver *driver); }; /* Useful for output driver implementation. */ void output_driver_track_current_command (const struct output_item *, char **); /* An abstract way for the output subsystem to create an output driver. */ struct output_driver_factory { /* The file extension, without the leading dot, e.g. "pdf". */ const char *extension; /* The default file name, including extension. If this is "-", that implies that by default output will be directed to stdout. */ const char *default_file_name; /* Creates a new output driver of this class. NAME and TYPE should be passed directly to output_driver_init. Returns the new output driver if successful, otherwise a null pointer. It is up to the driver class to decide how to interpret OPTIONS. The create function should delete pairs that it understands from OPTIONS, because the caller may issue errors about unknown options for any pairs that remain. The functions in output/options.h can be useful. The returned driver should not have been registered (with output_driver_register). The caller will register the driver (if this is desirable). */ struct output_driver *(*create) (struct file_handle *, enum settings_output_devices type, struct string_map *options); }; #endif /* output/driver-provider.h */ pspp-1.0.1/src/output/chart-item.h0000644000175000017500000000614212470243701013754 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef OUTPUT_CHART_ITEM_H #define OUTPUT_CHART_ITEM_H 1 /* Chart items. A chart item is a subclass of an output item (see output/output-item.h). A chart item is abstract. Every actual chart is a subclass of chart_item. */ #include #include "output/output-item.h" /* A chart item. The members of struct chart_item should not be accessed directly. Use one of the accessor functions defined below. */ struct chart_item { struct output_item output_item; /* Superclass */ const struct chart_item_class *class; /* Subclass. */ char *title; /* May be null if there is no title. */ }; const char *chart_item_get_title (const struct chart_item *); void chart_item_set_title (struct chart_item *, const char *); /* This boilerplate for chart_item, a subclass of output_item, was autogenerated by mk-class-boilerplate. */ #include #include "libpspp/cast.h" extern const struct output_item_class chart_item_class; /* Returns true if SUPER is a chart_item, otherwise false. */ static inline bool is_chart_item (const struct output_item *super) { return super->class == &chart_item_class; } /* Returns SUPER converted to chart_item. SUPER must be a chart_item, as reported by is_chart_item. */ static inline struct chart_item * to_chart_item (const struct output_item *super) { assert (is_chart_item (super)); return UP_CAST (super, struct chart_item, output_item); } /* Returns INSTANCE converted to output_item. */ static inline struct output_item * chart_item_super (const struct chart_item *instance) { return CONST_CAST (struct output_item *, &instance->output_item); } /* Increments INSTANCE's reference count and returns INSTANCE. */ static inline struct chart_item * chart_item_ref (const struct chart_item *instance) { return to_chart_item (output_item_ref (&instance->output_item)); } /* Decrements INSTANCE's reference count, then destroys INSTANCE if the reference count is now zero. */ static inline void chart_item_unref (struct chart_item *instance) { output_item_unref (&instance->output_item); } /* Returns true if INSTANCE's reference count is greater than 1, false otherwise. */ static inline bool chart_item_is_shared (const struct chart_item *instance) { return output_item_is_shared (&instance->output_item); } void chart_item_submit (struct chart_item *); #endif /* output/chart-item.h */ pspp-1.0.1/src/output/tab.c0000644000175000017500000005761613137223525012477 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2013, 2014, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "output/tab.h" #include #include #include #include #include "data/data-out.h" #include "data/format.h" #include "data/settings.h" #include "data/value.h" #include "data/variable.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/i18n.h" #include "libpspp/misc.h" #include "libpspp/pool.h" #include "output/driver.h" #include "output/table-item.h" #include "output/table-provider.h" #include "output/text-item.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) #if DEBUGGING static const bool debugging = true; #else static const bool debugging = false; #endif /* Cell options. */ #define TAB_JOIN (1u << TAB_FIRST_AVAILABLE) #define TAB_SUBTABLE (1u << (TAB_FIRST_AVAILABLE + 1)) #define TAB_BARE (1u << (TAB_FIRST_AVAILABLE + 2)) /* Joined cell. */ struct tab_joined_cell { int d[TABLE_N_AXES][2]; /* Table region, same as struct table_cell. */ union { char *text; struct table_item *subtable; } u; size_t n_footnotes; char **footnotes; }; static const struct table_class tab_table_class; struct fmt_spec ugly[n_RC] = { {FMT_F, 8, 0}, /* INTEGER */ {FMT_F, 8, 3}, /* WEIGHT (ignored) */ {FMT_F, 8, 3}, /* PVALUE */ {FMT_F, 8, 3} /* OTHER (ignored) */ }; /* Creates and returns a new table with NC columns and NR rows and initially no header rows or columns. The table's cells are initially empty. */ struct tab_table * tab_create (int nc, int nr) { struct tab_table *t; t = pool_create_container (struct tab_table, container); table_init (&t->table, &tab_table_class); table_set_nc (&t->table, nc); table_set_nr (&t->table, nr); t->title = NULL; t->caption = NULL; t->cf = nc; t->cc = pool_calloc (t->container, nr * nc, sizeof *t->cc); t->ct = pool_malloc (t->container, nr * nc); memset (t->ct, 0, nc * nr); t->rh = pool_nmalloc (t->container, nc, nr + 1); memset (t->rh, 0, nc * (nr + 1)); t->rv = pool_nmalloc (t->container, nr, nc + 1); memset (t->fmtmap, 0, sizeof (*t->fmtmap) * n_RC); memset (t->rv, TAL_GAP, nr * (nc + 1)); t->fmtmap[RC_PVALUE] = ugly[RC_PVALUE]; t->fmtmap[RC_INTEGER] = ugly[RC_INTEGER]; t->fmtmap[RC_OTHER] = *settings_get_format (); t->col_ofs = t->row_ofs = 0; return t; } void tab_set_format (struct tab_table *t, enum result_class rc, const struct fmt_spec *fmt) { t->fmtmap[rc] = *fmt; } /* Sets the width and height of a table, in columns and rows, respectively. Use only to reduce the size of a table, since it does not change the amount of allocated memory. This function is obsolete. Please do not add new uses of it. (Instead, use table_select() or one of its helper functions.) */ void tab_resize (struct tab_table *t, int nc, int nr) { if (nc != -1) { assert (nc + t->col_ofs <= t->cf); table_set_nc (&t->table, nc + t->col_ofs); } if (nr != -1) { assert (nr + t->row_ofs <= tab_nr (t)); table_set_nr (&t->table, nr + t->row_ofs); } } /* Changes either or both dimensions of a table and reallocates memory as necessary. This function is obsolete. Please do not add new uses of it. (Instead, use table_paste() or one of its helper functions to paste multiple tables together into a larger one.) */ void tab_realloc (struct tab_table *t, int nc, int nr) { int ro, co; ro = t->row_ofs; co = t->col_ofs; if (ro || co) tab_offset (t, 0, 0); if (nc == -1) nc = tab_nc (t); if (nr == -1) nr = tab_nr (t); assert (nc == tab_nc (t)); if (nc > t->cf) { int mr1 = MIN (nr, tab_nr (t)); int mc1 = MIN (nc, tab_nc (t)); void **new_cc; unsigned char *new_ct; int r; new_cc = pool_calloc (t->container, nr * nc, sizeof *new_cc); new_ct = pool_malloc (t->container, nr * nc); for (r = 0; r < mr1; r++) { memcpy (&new_cc[r * nc], &t->cc[r * tab_nc (t)], mc1 * sizeof *t->cc); memcpy (&new_ct[r * nc], &t->ct[r * tab_nc (t)], mc1); memset (&new_ct[r * nc + tab_nc (t)], 0, nc - tab_nc (t)); } pool_free (t->container, t->cc); pool_free (t->container, t->ct); t->cc = new_cc; t->ct = new_ct; t->cf = nc; } else if (nr != tab_nr (t)) { t->cc = pool_nrealloc (t->container, t->cc, nr * nc, sizeof *t->cc); t->ct = pool_realloc (t->container, t->ct, nr * nc); t->rh = pool_nrealloc (t->container, t->rh, nc, nr + 1); t->rv = pool_nrealloc (t->container, t->rv, nr, nc + 1); if (nr > tab_nr (t)) { memset (&t->rh[nc * (tab_nr (t) + 1)], TAL_0, (nr - tab_nr (t)) * nc); memset (&t->rv[(nc + 1) * tab_nr (t)], TAL_GAP, (nr - tab_nr (t)) * (nc + 1)); } } memset (&t->ct[nc * tab_nr (t)], 0, nc * (nr - tab_nr (t))); memset (&t->cc[nc * tab_nr (t)], 0, nc * (nr - tab_nr (t)) * sizeof *t->cc); table_set_nr (&t->table, nr); table_set_nc (&t->table, nc); if (ro || co) tab_offset (t, co, ro); } /* Sets the number of header rows on each side of TABLE to L on the left, R on the right, T on the top, B on the bottom. Header rows are repeated when a table is broken across multiple columns or multiple pages. */ void tab_headers (struct tab_table *table, int l, int r, int t, int b) { table_set_hl (&table->table, l); table_set_hr (&table->table, r); table_set_ht (&table->table, t); table_set_hb (&table->table, b); } /* Rules. */ /* Draws a vertical line to the left of cells at horizontal position X from Y1 to Y2 inclusive in style STYLE, if style is not -1. */ void tab_vline (struct tab_table *t, int style, int x, int y1, int y2) { if (debugging) { if (x + t->col_ofs < 0 || x + t->col_ofs > tab_nc (t) || y1 + t->row_ofs < 0 || y1 + t->row_ofs >= tab_nr (t) || y2 + t->row_ofs < 0 || y2 + t->row_ofs >= tab_nr (t)) { printf (_("bad vline: x=%d+%d=%d y=(%d+%d=%d,%d+%d=%d) in " "table size (%d,%d)\n"), x, t->col_ofs, x + t->col_ofs, y1, t->row_ofs, y1 + t->row_ofs, y2, t->row_ofs, y2 + t->row_ofs, tab_nc (t), tab_nr (t)); return; } } x += t->col_ofs; y1 += t->row_ofs; y2 += t->row_ofs; assert (x >= 0); assert (x <= tab_nc (t)); assert (y1 >= 0); assert (y2 >= y1); assert (y2 <= tab_nr (t)); if (style != -1) { int y; for (y = y1; y <= y2; y++) t->rv[x + (t->cf + 1) * y] = style; } } /* Draws a horizontal line above cells at vertical position Y from X1 to X2 inclusive in style STYLE, if style is not -1. */ void tab_hline (struct tab_table *t, int style, int x1, int x2, int y) { if (debugging) { if (y + t->row_ofs < 0 || y + t->row_ofs > tab_nr (t) || x1 + t->col_ofs < 0 || x1 + t->col_ofs >= tab_nc (t) || x2 + t->col_ofs < 0 || x2 + t->col_ofs >= tab_nc (t)) { printf (_("bad hline: x=(%d+%d=%d,%d+%d=%d) y=%d+%d=%d in " "table size (%d,%d)\n"), x1, t->col_ofs, x1 + t->col_ofs, x2, t->col_ofs, x2 + t->col_ofs, y, t->row_ofs, y + t->row_ofs, tab_nc (t), tab_nr (t)); return; } } x1 += t->col_ofs; x2 += t->col_ofs; y += t->row_ofs; assert (y >= 0); assert (y <= tab_nr (t)); assert (x2 >= x1); assert (x1 >= 0); assert (x2 < tab_nc (t)); if (style != -1) { int x; for (x = x1; x <= x2; x++) t->rh[x + t->cf * y] = style; } } /* Draws a box around cells (X1,Y1)-(X2,Y2) inclusive with horizontal lines of style F_H and vertical lines of style F_V. Fills the interior of the box with horizontal lines of style I_H and vertical lines of style I_V. Any of the line styles may be -1 to avoid drawing those lines. This is distinct from 0, which draws a null line. */ void tab_box (struct tab_table *t, int f_h, int f_v, int i_h, int i_v, int x1, int y1, int x2, int y2) { if (debugging) { if (x1 + t->col_ofs < 0 || x1 + t->col_ofs >= tab_nc (t) || x2 + t->col_ofs < 0 || x2 + t->col_ofs >= tab_nc (t) || y1 + t->row_ofs < 0 || y1 + t->row_ofs >= tab_nr (t) || y2 + t->row_ofs < 0 || y2 + t->row_ofs >= tab_nr (t)) { printf (_("bad box: (%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) " "in table size (%d,%d)\n"), x1, t->col_ofs, x1 + t->col_ofs, y1, t->row_ofs, y1 + t->row_ofs, x2, t->col_ofs, x2 + t->col_ofs, y2, t->row_ofs, y2 + t->row_ofs, tab_nc (t), tab_nr (t)); NOT_REACHED (); } } x1 += t->col_ofs; x2 += t->col_ofs; y1 += t->row_ofs; y2 += t->row_ofs; assert (x2 >= x1); assert (y2 >= y1); assert (x1 >= 0); assert (y1 >= 0); assert (x2 < tab_nc (t)); assert (y2 < tab_nr (t)); if (f_h != -1) { int x; for (x = x1; x <= x2; x++) { t->rh[x + t->cf * y1] = f_h; t->rh[x + t->cf * (y2 + 1)] = f_h; } } if (f_v != -1) { int y; for (y = y1; y <= y2; y++) { t->rv[x1 + (t->cf + 1) * y] = f_v; t->rv[(x2 + 1) + (t->cf + 1) * y] = f_v; } } if (i_h != -1) { int y; for (y = y1 + 1; y <= y2; y++) { int x; for (x = x1; x <= x2; x++) t->rh[x + t->cf * y] = i_h; } } if (i_v != -1) { int x; for (x = x1 + 1; x <= x2; x++) { int y; for (y = y1; y <= y2; y++) t->rv[x + (t->cf + 1) * y] = i_v; } } } /* Cells. */ /* Sets cell (C,R) in TABLE, with options OPT, to have a value taken from V, displayed with format spec F. */ void tab_value (struct tab_table *table, int c, int r, unsigned char opt, const union value *v, const struct variable *var, const struct fmt_spec *f) { char *contents; if (debugging) { if (c + table->col_ofs < 0 || r + table->row_ofs < 0 || c + table->col_ofs >= tab_nc (table) || r + table->row_ofs >= tab_nr (table)) { printf ("tab_value(): bad cell (%d+%d=%d,%d+%d=%d) in table size " "(%d,%d)\n", c, table->col_ofs, c + table->col_ofs, r, table->row_ofs, r + table->row_ofs, tab_nc (table), tab_nr (table)); return; } } contents = data_out_stretchy (v, var_get_encoding (var), f != NULL ? f : var_get_print_format (var), table->container); table->cc[c + r * table->cf] = contents; table->ct[c + r * table->cf] = opt; } /* Sets cell (C,R) in TABLE, with options OPT, to have value VAL as formatted by FMT. If FMT is null, then the default print format will be used. */ void tab_double (struct tab_table *table, int c, int r, unsigned char opt, double val, const struct fmt_spec *fmt, enum result_class rc) { union value double_value; char *s; assert (c >= 0); assert (c < tab_nc (table)); assert (r >= 0); assert (r < tab_nr (table)); if (fmt == NULL) fmt = &table->fmtmap[rc]; fmt_check_output (fmt); if (debugging) { if (c + table->col_ofs < 0 || r + table->row_ofs < 0 || c + table->col_ofs >= tab_nc (table) || r + table->row_ofs >= tab_nr (table)) { printf ("tab_double(): bad cell (%d+%d=%d,%d+%d=%d) in table size " "(%d,%d)\n", c, table->col_ofs, c + table->col_ofs, r, table->row_ofs, r + table->row_ofs, tab_nc (table), tab_nr (table)); return; } } double_value.f = val; s = data_out_stretchy (&double_value, C_ENCODING, fmt, table->container); table->cc[c + r * table->cf] = s + strspn (s, " "); table->ct[c + r * table->cf] = opt; } static void do_tab_text (struct tab_table *table, int c, int r, unsigned opt, char *text) { assert (c >= 0); assert (r >= 0); assert (c < tab_nc (table)); assert (r < tab_nr (table)); if (debugging) { if (c + table->col_ofs < 0 || r + table->row_ofs < 0 || c + table->col_ofs >= tab_nc (table) || r + table->row_ofs >= tab_nr (table)) { printf ("tab_text(): bad cell (%d+%d=%d,%d+%d=%d) in table size " "(%d,%d)\n", c, table->col_ofs, c + table->col_ofs, r, table->row_ofs, r + table->row_ofs, tab_nc (table), tab_nr (table)); return; } } table->cc[c + r * table->cf] = text; table->ct[c + r * table->cf] = opt; } /* Sets cell (C,R) in TABLE, with options OPT, to have text value TEXT. */ void tab_text (struct tab_table *table, int c, int r, unsigned opt, const char *text) { do_tab_text (table, c, r, opt, pool_strdup (table->container, text)); } /* Sets cell (C,R) in TABLE, with options OPT, to have text value FORMAT, which is formatted as if passed to printf. */ void tab_text_format (struct tab_table *table, int c, int r, unsigned opt, const char *format, ...) { va_list args; va_start (args, format); do_tab_text (table, c, r, opt, pool_vasprintf (table->container, format, args)); va_end (args); } static struct tab_joined_cell * add_joined_cell (struct tab_table *table, int x1, int y1, int x2, int y2, unsigned opt) { struct tab_joined_cell *j; assert (x1 + table->col_ofs >= 0); assert (y1 + table->row_ofs >= 0); assert (y2 >= y1); assert (x2 >= x1); assert (y2 + table->row_ofs < tab_nr (table)); assert (x2 + table->col_ofs < tab_nc (table)); if (debugging) { if (x1 + table->col_ofs < 0 || x1 + table->col_ofs >= tab_nc (table) || y1 + table->row_ofs < 0 || y1 + table->row_ofs >= tab_nr (table) || x2 < x1 || x2 + table->col_ofs >= tab_nc (table) || y2 < y1 || y2 + table->row_ofs >= tab_nr (table)) { printf ("tab_joint_text(): bad cell " "(%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n", x1, table->col_ofs, x1 + table->col_ofs, y1, table->row_ofs, y1 + table->row_ofs, x2, table->col_ofs, x2 + table->col_ofs, y2, table->row_ofs, y2 + table->row_ofs, tab_nc (table), tab_nr (table)); return NULL; } } tab_box (table, -1, -1, TAL_0, TAL_0, x1, y1, x2, y2); j = pool_alloc (table->container, sizeof *j); j->d[TABLE_HORZ][0] = x1 + table->col_ofs; j->d[TABLE_VERT][0] = y1 + table->row_ofs; j->d[TABLE_HORZ][1] = ++x2 + table->col_ofs; j->d[TABLE_VERT][1] = ++y2 + table->row_ofs; j->n_footnotes = 0; j->footnotes = NULL; { void **cc = &table->cc[x1 + y1 * table->cf]; unsigned char *ct = &table->ct[x1 + y1 * table->cf]; const int ofs = table->cf - (x2 - x1); int y; for (y = y1; y < y2; y++) { int x; for (x = x1; x < x2; x++) { *cc++ = j; *ct++ = opt | TAB_JOIN; } cc += ofs; ct += ofs; } } return j; } /* Joins cells (X1,X2)-(Y1,Y2) inclusive in TABLE, and sets them with options OPT to have text value TEXT. */ void tab_joint_text (struct tab_table *table, int x1, int y1, int x2, int y2, unsigned opt, const char *text) { char *s = pool_strdup (table->container, text); add_joined_cell (table, x1, y1, x2, y2, opt)->u.text = s; } /* Joins cells (X1,X2)-(Y1,Y2) inclusive in TABLE, and sets them with options OPT to have text value FORMAT, which is formatted as if passed to printf. */ void tab_joint_text_format (struct tab_table *table, int x1, int y1, int x2, int y2, unsigned opt, const char *format, ...) { va_list args; char *s; va_start (args, format); s = pool_vasprintf (table->container, format, args); va_end (args); add_joined_cell (table, x1, y1, x2, y2, opt)->u.text = s; } void tab_footnote (struct tab_table *table, int x, int y, const char *format, ...) { int index = x + y * table->cf; unsigned char opt = table->ct[index]; struct tab_joined_cell *j; va_list args; if (opt & TAB_JOIN) j = table->cc[index]; else { char *text = table->cc[index]; j = add_joined_cell (table, x, y, x, y, table->ct[index]); j->u.text = text ? text : xstrdup (""); } j->footnotes = xrealloc (j->footnotes, (j->n_footnotes + 1) * sizeof *j->footnotes); va_start (args, format); j->footnotes[j->n_footnotes++] = pool_vasprintf (table->container, format, args); va_end (args); } static void subtable_unref (void *subtable) { table_item_unref (subtable); } /* Places SUBTABLE as the content for cells (X1,X2)-(Y1,Y2) inclusive in TABLE with options OPT. */ void tab_subtable (struct tab_table *table, int x1, int y1, int x2, int y2, unsigned opt, struct table_item *subtable) { add_joined_cell (table, x1, y1, x2, y2, opt | TAB_SUBTABLE)->u.subtable = subtable; pool_register (table->container, subtable_unref, subtable); } /* Places the contents of SUBTABLE as the content for cells (X1,X2)-(Y1,Y2) inclusive in TABLE with options OPT. SUBTABLE must have exactly one row and column. The contents of its single cell are used as the contents of TABLE's cell; that is, SUBTABLE is not used as a nested table but its contents become part of TABLE. */ void tab_subtable_bare (struct tab_table *table, int x1, int y1, int x2, int y2, unsigned opt, struct table_item *subtable) { const struct table *t UNUSED = table_item_get_table (subtable); assert (table_nc (t) == 1); assert (table_nr (t) == 1); tab_subtable (table, x1, y1, x2, y2, opt | TAB_BARE, subtable); } bool tab_cell_is_empty (const struct tab_table *table, int c, int r) { return table->cc[c + r * table->cf] == NULL; } /* Miscellaneous. */ /* Set the title of table T to TITLE, which is formatted as if passed to printf(). */ void tab_title (struct tab_table *t, const char *title, ...) { va_list args; free (t->title); va_start (args, title); t->title = xvasprintf (title, args); va_end (args); } /* Set the caption of table T to CAPTION, which is formatted as if passed to printf(). */ void tab_caption (struct tab_table *t, const char *caption, ...) { va_list args; free (t->caption); va_start (args, caption); t->caption = xvasprintf (caption, args); va_end (args); } /* Easy, type-safe way to submit a tab table to som. */ void tab_submit (struct tab_table *t) { table_item_submit (table_item_create (&t->table, t->title, t->caption)); } /* Editing. */ /* Set table row and column offsets for all functions that affect cells or rules. */ void tab_offset (struct tab_table *t, int col, int row) { int diff = 0; if (debugging) { if (row < -1 || row > tab_nr (t)) { printf ("tab_offset(): row=%d in %d-row table\n", row, tab_nr (t)); NOT_REACHED (); } if (col < -1 || col > tab_nc (t)) { printf ("tab_offset(): col=%d in %d-column table\n", col, tab_nc (t)); NOT_REACHED (); } } if (row != -1) diff += (row - t->row_ofs) * t->cf, t->row_ofs = row; if (col != -1) diff += (col - t->col_ofs), t->col_ofs = col; t->cc += diff; t->ct += diff; } /* Increment the row offset by one. If the table is too small, increase its size. */ void tab_next_row (struct tab_table *t) { t->cc += t->cf; t->ct += t->cf; if (++t->row_ofs >= tab_nr (t)) tab_realloc (t, -1, tab_nr (t) * 4 / 3); } /* Writes STRING to the output. OPTIONS may be any valid combination of TAB_* bits. This function is obsolete. Please do not add new uses of it. Instead, use a text_item (see output/text-item.h). */ void tab_output_text (int options, const char *string) { enum text_item_type type = (options & TAB_EMPH ? TEXT_ITEM_SUBHEAD : options & TAB_FIX ? TEXT_ITEM_MONOSPACE : TEXT_ITEM_PARAGRAPH); text_item_submit (text_item_create (type, string)); } /* Same as tab_output_text(), but FORMAT is passed through printf-like formatting before output. */ void tab_output_text_format (int options, const char *format, ...) { va_list args; char *text; va_start (args, format); text = xvasprintf (format, args); va_end (args); tab_output_text (options, text); free (text); } /* Table class implementation. */ static void tab_destroy (struct table *table) { struct tab_table *t = tab_cast (table); free (t->title); t->title = NULL; free (t->caption); t->caption = NULL; pool_destroy (t->container); } static void tab_get_cell (const struct table *table, int x, int y, struct table_cell *cell) { const struct tab_table *t = tab_cast (table); int index = x + y * t->cf; unsigned char opt = t->ct[index]; const void *cc = t->cc[index]; cell->inline_contents.options = opt; cell->inline_contents.table = NULL; cell->inline_contents.n_footnotes = 0; cell->destructor = NULL; if (opt & TAB_JOIN) { const struct tab_joined_cell *jc = cc; if (opt & TAB_BARE) { assert (opt & TAB_SUBTABLE); /* This overwrites all of the members of CELL. */ table_get_cell (table_item_get_table (jc->u.subtable), 0, 0, cell); } else { cell->contents = &cell->inline_contents; cell->n_contents = 1; if (opt & TAB_SUBTABLE) { cell->inline_contents.table = jc->u.subtable; cell->inline_contents.text = NULL; } else cell->inline_contents.text = jc->u.text; } cell->inline_contents.footnotes = jc->footnotes; cell->inline_contents.n_footnotes = jc->n_footnotes; cell->d[TABLE_HORZ][0] = jc->d[TABLE_HORZ][0]; cell->d[TABLE_HORZ][1] = jc->d[TABLE_HORZ][1]; cell->d[TABLE_VERT][0] = jc->d[TABLE_VERT][0]; cell->d[TABLE_VERT][1] = jc->d[TABLE_VERT][1]; } else { cell->d[TABLE_HORZ][0] = x; cell->d[TABLE_HORZ][1] = x + 1; cell->d[TABLE_VERT][0] = y; cell->d[TABLE_VERT][1] = y + 1; if (cc != NULL) { cell->contents = &cell->inline_contents; cell->n_contents = 1; cell->inline_contents.text = CONST_CAST (char *, cc); } else { cell->contents = NULL; cell->n_contents = 0; } } } static int tab_get_rule (const struct table *table, enum table_axis axis, int x, int y) { const struct tab_table *t = tab_cast (table); return (axis == TABLE_VERT ? t->rh[x + t->cf * y] : t->rv[x + (t->cf + 1) * y]); } static const struct table_class tab_table_class = { tab_destroy, tab_get_cell, tab_get_rule, NULL, /* paste */ NULL, /* select */ }; struct tab_table * tab_cast (const struct table *table) { assert (table->klass == &tab_table_class); return UP_CAST (table, struct tab_table, table); } pspp-1.0.1/src/output/text-item.c0000644000175000017500000000552312470243701013634 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "output/text-item.h" #include #include #include #include "libpspp/cast.h" #include "output/driver.h" #include "output/output-item-provider.h" #include "gl/xalloc.h" #include "gl/xvasprintf.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Creates and returns a new text item containing TEXT and the specified TYPE. The new text item takes ownership of TEXT. */ struct text_item * text_item_create_nocopy (enum text_item_type type, char *text) { struct text_item *item = xmalloc (sizeof *item); output_item_init (&item->output_item, &text_item_class); item->text = text; item->type = type; return item; } /* Creates and returns a new text item containing a copy of TEXT and the specified TYPE. The caller retains ownership of TEXT. */ struct text_item * text_item_create (enum text_item_type type, const char *text) { return text_item_create_nocopy (type, xstrdup (text)); } /* Creates and returns a new text item containing a copy of FORMAT, which is formatted as if by printf(), and the specified TYPE. The caller retains ownership of FORMAT. */ struct text_item * text_item_create_format (enum text_item_type type, const char *format, ...) { struct text_item *item; va_list args; va_start (args, format); item = text_item_create_nocopy (type, xvasprintf (format, args)); va_end (args); return item; } /* Returns ITEM's type. */ enum text_item_type text_item_get_type (const struct text_item *item) { return item->type; } /* Returns ITEM's text, which the caller may not modify or free. */ const char * text_item_get_text (const struct text_item *item) { return item->text; } /* Submits ITEM to the configured output drivers, and transfers ownership to the output subsystem. */ void text_item_submit (struct text_item *item) { output_submit (&item->output_item); } static void text_item_destroy (struct output_item *output_item) { struct text_item *item = to_text_item (output_item); free (item->text); free (item); } const struct output_item_class text_item_class = { text_item_destroy, }; pspp-1.0.1/src/output/automake.mk0000644000175000017500000000622513137223525013712 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- noinst_LTLIBRARIES += src/output/liboutput.la src_output_liboutput_la_CPPFLAGS = $(LIBXML2_CFLAGS) $(AM_CPPFLAGS) src_output_liboutput_la_SOURCES = \ src/output/ascii.c \ src/output/ascii.h \ src/output/chart-item-provider.h \ src/output/chart-item.c \ src/output/chart-item.h \ src/output/charts/boxplot.c \ src/output/charts/boxplot.h \ src/output/charts/np-plot.c \ src/output/charts/np-plot.h \ src/output/charts/barchart.c \ src/output/charts/barchart.h \ src/output/charts/piechart.c \ src/output/charts/piechart.h \ src/output/charts/plot-hist.c \ src/output/charts/plot-hist.h \ src/output/charts/roc-chart.c \ src/output/charts/roc-chart.h \ src/output/charts/spreadlevel-plot.c \ src/output/charts/spreadlevel-plot.h \ src/output/charts/scree.c \ src/output/charts/scree.h \ src/output/charts/scatterplot.c \ src/output/charts/scatterplot.h \ src/output/csv.c \ src/output/driver-provider.h \ src/output/driver.c \ src/output/driver.h \ src/output/html.c \ src/output/journal.c \ src/output/journal.h \ src/output/measure.c \ src/output/measure.h \ src/output/message-item.c \ src/output/message-item.h \ src/output/msglog.c \ src/output/msglog.h \ src/output/options.c \ src/output/options.h \ src/output/output-item-provider.h \ src/output/output-item.c \ src/output/output-item.h \ src/output/render.c \ src/output/render.h \ src/output/tab.c \ src/output/tab.h \ src/output/table-casereader.c \ src/output/table-item.c \ src/output/table-item.h \ src/output/table-paste.c \ src/output/table-provider.h \ src/output/table-select.c \ src/output/table-stomp.c \ src/output/table-transpose.c \ src/output/table.c \ src/output/table.h \ src/output/text-item.c \ src/output/text-item.h if HAVE_CAIRO src_output_liboutput_la_SOURCES += \ src/output/cairo-chart.c \ src/output/cairo-chart.h \ src/output/cairo.c \ src/output/cairo.h \ src/output/charts/boxplot-cairo.c \ src/output/charts/np-plot-cairo.c \ src/output/charts/barchart-cairo.c \ src/output/charts/piechart-cairo.c \ src/output/charts/plot-hist-cairo.c \ src/output/charts/roc-chart-cairo.c \ src/output/charts/scree-cairo.c \ src/output/charts/spreadlevel-cairo.c \ src/output/charts/scatterplot-cairo.c endif if ODF_WRITE_SUPPORT src_output_liboutput_la_SOURCES += src/output/odt.c endif EXTRA_DIST += \ src/output/README \ src/output/mk-class-boilerplate pspp-1.0.1/src/output/csv.c0000644000175000017500000003010712642117700012503 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include #include #include "data/file-name.h" #include "data/file-handle-def.h" #include "libpspp/assertion.h" #include "libpspp/compiler.h" #include "libpspp/message.h" #include "libpspp/str.h" #include "libpspp/string-map.h" #include "output/text-item.h" #include "output/driver-provider.h" #include "output/options.h" #include "output/message-item.h" #include "output/table-item.h" #include "output/table-provider.h" #include "gl/xalloc.h" #include "gl/xvasprintf.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* Comma-separated value output driver. */ struct csv_driver { struct output_driver driver; char *separator; /* Field separator (usually comma or tab). */ int quote; /* Quote character (usually ' or ") or 0. */ char *quote_set; /* Characters that force quoting. */ bool titles; /* Print table titles? */ bool captions; /* Print table captions? */ struct file_handle *handle; char *command_name; /* Current command. */ FILE *file; /* Output file. */ int n_items; /* Number of items output so far. */ }; static const struct output_driver_class csv_driver_class; static struct csv_driver * csv_driver_cast (struct output_driver *driver) { assert (driver->class == &csv_driver_class); return UP_CAST (driver, struct csv_driver, driver); } static struct driver_option * opt (struct output_driver *d, struct string_map *options, const char *key, const char *default_value) { return driver_option_get (d, options, key, default_value); } static struct output_driver * csv_create (struct file_handle *fh, enum settings_output_devices device_type, struct string_map *o) { struct output_driver *d; struct csv_driver *csv; char *quote; csv = xzalloc (sizeof *csv); d = &csv->driver; output_driver_init (&csv->driver, &csv_driver_class, fh_get_file_name (fh), device_type); csv->separator = parse_string (opt (d, o, "separator", ",")); quote = parse_string (opt (d, o, "quote", "\"")); csv->quote = quote[0]; free (quote); csv->quote_set = xasprintf ("\n\r\t%s%c", csv->separator, csv->quote); csv->titles = parse_boolean (opt (d, o, "titles", "true")); csv->captions = parse_boolean (opt (d, o, "captions", "true")); csv->handle = fh; csv->file = fn_open (fh, "w"); csv->n_items = 0; if (csv->file == NULL) { msg_error (errno, _("error opening output file `%s'"), fh_get_file_name (fh)); output_driver_destroy (d); return NULL; } return d; } static void csv_destroy (struct output_driver *driver) { struct csv_driver *csv = csv_driver_cast (driver); if (csv->file != NULL) fn_close (csv->handle, csv->file); free (csv->separator); free (csv->quote_set); fh_unref (csv->handle); free (csv); } static void csv_flush (struct output_driver *driver) { struct csv_driver *csv = csv_driver_cast (driver); if (csv->file != NULL) fflush (csv->file); } static void csv_output_field (struct csv_driver *csv, const char *field) { while (*field == ' ') field++; if (csv->quote && field[strcspn (field, csv->quote_set)]) { const char *p; putc (csv->quote, csv->file); for (p = field; *p != '\0'; p++) { if (*p == csv->quote) putc (csv->quote, csv->file); putc (*p, csv->file); } putc (csv->quote, csv->file); } else fputs (field, csv->file); } static void PRINTF_FORMAT (2, 3) csv_output_field_format (struct csv_driver *csv, const char *format, ...) { va_list args; char *s; va_start (args, format); s = xvasprintf (format, args); va_end (args); csv_output_field (csv, s); free (s); } static void csv_put_field (struct csv_driver *csv, struct string *s, const char *field) { while (*field == ' ') field++; if (csv->quote && field[strcspn (field, csv->quote_set)]) { const char *p; ds_put_byte (s, csv->quote); for (p = field; *p != '\0'; p++) { if (*p == csv->quote) ds_put_byte (s, csv->quote); ds_put_byte (s, *p); } ds_put_byte (s, csv->quote); } else ds_put_cstr (s, field); } static void csv_output_subtable (struct csv_driver *csv, struct string *s, const struct table_item *item) { const struct table *t = table_item_get_table (item); const char *title = table_item_get_title (item); const char *caption = table_item_get_caption (item); int y, x; if (csv->titles && title != NULL) { csv_output_field_format (csv, "Table: %s", title); putc ('\n', csv->file); } for (y = 0; y < table_nr (t); y++) { if (y > 0) ds_put_byte (s, '\n'); for (x = 0; x < table_nc (t); x++) { struct table_cell cell; table_get_cell (t, x, y, &cell); if (x > 0) ds_put_cstr (s, csv->separator); if (x != cell.d[TABLE_HORZ][0] || y != cell.d[TABLE_VERT][0]) csv_put_field (csv, s, ""); else if (cell.n_contents == 1 && cell.contents[0].text != NULL) csv_put_field (csv, s, cell.contents[0].text); else { struct string s2; size_t i; ds_init_empty (&s2); for (i = 0; i < cell.n_contents; i++) { if (i > 0) ds_put_cstr (&s2, "\n\n"); if (cell.contents[i].text != NULL) ds_put_cstr (&s2, cell.contents[i].text); else csv_output_subtable (csv, &s2, cell.contents[i].table); } csv_put_field (csv, s, ds_cstr (&s2)); ds_destroy (&s2); } table_cell_free (&cell); } } if (csv->captions && caption != NULL) { csv_output_field_format (csv, "Caption: %s", caption); putc ('\n', csv->file); } } static void csv_put_separator (struct csv_driver *csv) { if (csv->n_items++ > 0) putc ('\n', csv->file); } static void csv_submit (struct output_driver *driver, const struct output_item *output_item) { struct csv_driver *csv = csv_driver_cast (driver); output_driver_track_current_command (output_item, &csv->command_name); if (is_table_item (output_item)) { struct table_item *table_item = to_table_item (output_item); const char *title = table_item_get_title (table_item); const char *caption = table_item_get_caption (table_item); const struct table *t = table_item_get_table (table_item); int footnote_idx; int x, y; csv_put_separator (csv); if (csv->titles && title != NULL) { csv_output_field_format (csv, "Table: %s", title); putc ('\n', csv->file); } footnote_idx = 0; for (y = 0; y < table_nr (t); y++) { for (x = 0; x < table_nc (t); x++) { struct table_cell cell; table_get_cell (t, x, y, &cell); if (x > 0) fputs (csv->separator, csv->file); if (x != cell.d[TABLE_HORZ][0] || y != cell.d[TABLE_VERT][0]) csv_output_field (csv, ""); else if (cell.n_contents == 1 && cell.contents[0].text != NULL && cell.contents[0].n_footnotes == 0) csv_output_field (csv, cell.contents[0].text); else { struct string s; size_t i; ds_init_empty (&s); for (i = 0; i < cell.n_contents; i++) { const struct cell_contents *c = &cell.contents[i]; int j; if (i > 0) ds_put_cstr (&s, "\n\n"); if (c->text != NULL) ds_put_cstr (&s, c->text); else csv_output_subtable (csv, &s, c->table); for (j = 0; j < c->n_footnotes; j++) { char marker[16]; str_format_26adic (++footnote_idx, false, marker, sizeof marker); ds_put_format (&s, "[%s]", marker); } } csv_output_field (csv, ds_cstr (&s)); ds_destroy (&s); } table_cell_free (&cell); } putc ('\n', csv->file); } if (csv->captions && caption != NULL) { csv_output_field_format (csv, "Caption: %s", caption); putc ('\n', csv->file); } if (footnote_idx) { size_t i; fputs ("\nFootnotes:\n", csv->file); footnote_idx = 0; for (y = 0; y < table_nr (t); y++) { struct table_cell cell; for (x = 0; x < table_nc (t); x = cell.d[TABLE_HORZ][1]) { table_get_cell (t, x, y, &cell); if (x == cell.d[TABLE_HORZ][0] && y == cell.d[TABLE_VERT][0]) for (i = 0; i < cell.n_contents; i++) { const struct cell_contents *c = &cell.contents[i]; int j; for (j = 0; j < c->n_footnotes; j++) { char marker[16]; str_format_26adic (++footnote_idx, false, marker, sizeof marker); csv_output_field (csv, marker); fputs (csv->separator, csv->file); csv_output_field (csv, c->footnotes[j]); putc ('\n', csv->file); } } table_cell_free (&cell); } } } } else if (is_text_item (output_item)) { const struct text_item *text_item = to_text_item (output_item); enum text_item_type type = text_item_get_type (text_item); const char *text = text_item_get_text (text_item); if (type == TEXT_ITEM_COMMAND_OPEN || type == TEXT_ITEM_COMMAND_CLOSE || type == TEXT_ITEM_SYNTAX) return; csv_put_separator (csv); switch (type) { case TEXT_ITEM_TITLE: csv_output_field_format (csv, "Title: %s", text); break; case TEXT_ITEM_SUBTITLE: csv_output_field_format (csv, "Subtitle: %s", text); break; default: csv_output_field (csv, text); break; } putc ('\n', csv->file); } else if (is_message_item (output_item)) { const struct message_item *message_item = to_message_item (output_item); const struct msg *msg = message_item_get_msg (message_item); char *s = msg_to_string (msg, csv->command_name); csv_put_separator (csv); csv_output_field (csv, s); free (s); putc ('\n', csv->file); } } struct output_driver_factory csv_driver_factory = { "csv", "-", csv_create }; static const struct output_driver_class csv_driver_class = { "csv", csv_destroy, csv_submit, csv_flush, }; pspp-1.0.1/src/output/message-item.h0000644000175000017500000000620412470243701014276 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2010, 2011 Free Sonftware Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef OUTPUT_MESSAGE_ITEM_H #define OUTPUT_MESSAGE_ITEM_H 1 /* Message items. A message item is a subclass of an output item (see output/output-item.h). A message item is an error, warning, or note to the user. Message items should not be submitted directly to the output subsystem. Instead, use the msg() function in libpspp/message.h, which will ensure that the message gets routed properly for the PSPP user interface in use. */ #include #include "output/output-item.h" /* A message item. */ struct message_item { struct output_item output_item; struct msg *msg; }; struct message_item *message_item_create (const struct msg *); const struct msg *message_item_get_msg (const struct message_item *); /* This boilerplate for message_item, a subclass of output_item, was autogenerated by mk-class-boilerplate. */ #include #include "libpspp/cast.h" extern const struct output_item_class message_item_class; /* Returns true if SUPER is a message_item, otherwise false. */ static inline bool is_message_item (const struct output_item *super) { return super->class == &message_item_class; } /* Returns SUPER converted to message_item. SUPER must be a message_item, as reported by is_message_item. */ static inline struct message_item * to_message_item (const struct output_item *super) { assert (is_message_item (super)); return UP_CAST (super, struct message_item, output_item); } /* Returns INSTANCE converted to output_item. */ static inline struct output_item * message_item_super (const struct message_item *instance) { return CONST_CAST (struct output_item *, &instance->output_item); } /* Increments INSTANCE's reference count and returns INSTANCE. */ static inline struct message_item * message_item_ref (const struct message_item *instance) { return to_message_item (output_item_ref (&instance->output_item)); } /* Decrements INSTANCE's reference count, then destroys INSTANCE if the reference count is now zero. */ static inline void message_item_unref (struct message_item *instance) { output_item_unref (&instance->output_item); } /* Returns true if INSTANCE's reference count is greater than 1, false otherwise. */ static inline bool message_item_is_shared (const struct message_item *instance) { return output_item_is_shared (&instance->output_item); } void message_item_submit (struct message_item *); #endif /* output/message-item.h */ pspp-1.0.1/src/output/cairo-chart.h0000644000175000017500000001320712537363615014126 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef OUTPUT_CAIRO_CHART_H #define OUTPUT_CAIRO_CHART_H 1 #include #include #include #include "libpspp/compiler.h" struct chart_item; struct xrchart_colour { uint8_t red; uint8_t green; uint8_t blue; }; struct xrchart_axis { int data_max; int data_min; double scale; double min; double max; }; /* The geometry of a chart. */ struct xrchart_geometry { /* Bottom of the abscissa segment */ int abscissa_bottom; /* Left of the ordinate segment */ int ordinate_left; int title_bottom; /* Legend. */ int legend_left; int legend_right; char **dataset; int n_datasets; /* Default font size for the plot. */ double font_size; struct xrchart_colour fill_colour; /* Stuff particular to cartesians and boxplots. */ struct xrchart_axis axis[2]; /* True iff a path is currently being drawn */ bool in_path; }; void xrchart_geometry_init (cairo_t *, struct xrchart_geometry *, double width, double length); void xrchart_geometry_free (cairo_t *, struct xrchart_geometry *); #define XRCHART_N_COLOURS 27 extern const struct xrchart_colour data_colour[]; enum tick_orientation { SCALE_ABSCISSA=0, SCALE_ORDINATE }; enum xrmarker_type { XRMARKER_CIRCLE, /* Hollow circle. */ XRMARKER_ASTERISK, /* Asterisk (*). */ XRMARKER_SQUARE /* Hollow square. */ }; void xrchart_draw_marker (cairo_t *, double x, double y, enum xrmarker_type, double size); void xrchart_label (cairo_t *, int horz_justify, int vert_justify, double font_size, const char *); void xrchart_label_rotate (cairo_t *cr, int horz_justify, int vert_justify, double font_size, const char *string, double angle); /* Draw a tick mark at position If label is non zero, then print it at the tick mark */ void draw_tick (cairo_t *, const struct xrchart_geometry *, enum tick_orientation orientation, bool rotated, double position, const char *label, ...) PRINTF_FORMAT (6, 7); /* Write the title on a chart*/ void xrchart_write_title (cairo_t *, const struct xrchart_geometry *, const char *title, ...) PRINTF_FORMAT (3, 4); /* Set the scale for the abscissa */ void xrchart_write_xscale (cairo_t *, struct xrchart_geometry *, double min, double max); /* Set the scale for the ordinate */ void xrchart_write_yscale (cairo_t *, struct xrchart_geometry *, double smin, double smax); void xrchart_write_xlabel (cairo_t *, const struct xrchart_geometry *, const char *label) ; /* Write the ordinate label */ void xrchart_write_ylabel (cairo_t *, const struct xrchart_geometry *, const char *label); void xrchart_write_legend (cairo_t *, const struct xrchart_geometry *); enum xrchart_dim { XRCHART_DIM_X, XRCHART_DIM_Y }; void xrchart_vector_start (cairo_t *, struct xrchart_geometry *, const char *name); void xrchart_vector_end (cairo_t *, struct xrchart_geometry *); void xrchart_vector (cairo_t *, struct xrchart_geometry *, double x, double y); /* Plot a data point */ void xrchart_datum (cairo_t *, const struct xrchart_geometry *, int dataset UNUSED, double x, double y); /* Draw a line with slope SLOPE and intercept INTERCEPT. between the points limit1 and limit2. If lim_dim is XRCHART_DIM_Y then the limit{1,2} are on the y axis otherwise the x axis */ void xrchart_line (cairo_t *, const struct xrchart_geometry *, double slope, double intercept, double limit1, double limit2, enum xrchart_dim lim_dim); /* Drawing various kinds of charts. */ void xrchart_draw_boxplot (const struct chart_item *, cairo_t *, struct xrchart_geometry *); void xrchart_draw_roc (const struct chart_item *, cairo_t *, struct xrchart_geometry *); void xrchart_draw_piechart (const struct chart_item *, cairo_t *, struct xrchart_geometry *); void xrchart_draw_barchart (const struct chart_item *, cairo_t *, struct xrchart_geometry *); void xrchart_draw_histogram (const struct chart_item *, cairo_t *, struct xrchart_geometry *); void xrchart_draw_np_plot (const struct chart_item *, cairo_t *, struct xrchart_geometry *); void xrchart_draw_scree (const struct chart_item *, cairo_t *, struct xrchart_geometry *); void xrchart_draw_spreadlevel (const struct chart_item *, cairo_t *, struct xrchart_geometry *); void xrchart_draw_scatterplot (const struct chart_item *, cairo_t *, struct xrchart_geometry *); #endif /* output/cairo-chart.h */ pspp-1.0.1/src/output/table-item.c0000644000175000017500000000676212523704223013745 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "output/table-provider.h" #include #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "output/driver.h" #include "output/output-item-provider.h" #include "output/table-item.h" #include "gl/xalloc.h" /* Initializes ITEM as a table item for rendering TABLE. The new table item initially has the specified TITLE and CAPTION, which may each be NULL. The caller retains ownership of TITLE and CAPTION. */ struct table_item * table_item_create (struct table *table, const char *title, const char *caption) { struct table_item *item = xmalloc (sizeof *item); output_item_init (&item->output_item, &table_item_class); item->table = table; item->title = title != NULL ? xstrdup (title) : NULL; item->caption = caption != NULL ? xstrdup (caption) : NULL; return item; } /* Returns the table contained by TABLE_ITEM. The caller must not modify or unref the returned table. */ const struct table * table_item_get_table (const struct table_item *table_item) { return table_item->table; } /* Returns ITEM's title, which is a null pointer if no title has been set. */ const char * table_item_get_title (const struct table_item *item) { return item->title; } /* Sets ITEM's title to TITLE, replacing any previous title. Specify NULL for TITLE to clear any title from ITEM. The caller retains ownership of TITLE. This function may only be used on a table_item that is unshared. */ void table_item_set_title (struct table_item *item, const char *title) { assert (!table_item_is_shared (item)); free (item->title); item->title = title != NULL ? xstrdup (title) : NULL; } /* Returns ITEM's caption, which is a null pointer if no caption has been set. */ const char * table_item_get_caption (const struct table_item *item) { return item->caption; } /* Sets ITEM's caption to CAPTION, replacing any previous caption. Specify NULL for CAPTION to clear any caption from ITEM. The caller retains ownership of CAPTION. This function may only be used on a table_item that is unshared. */ void table_item_set_caption (struct table_item *item, const char *caption) { assert (!table_item_is_shared (item)); free (item->caption); item->caption = caption != NULL ? xstrdup (caption) : NULL; } /* Submits TABLE_ITEM to the configured output drivers, and transfers ownership to the output subsystem. */ void table_item_submit (struct table_item *table_item) { output_submit (&table_item->output_item); } static void table_item_destroy (struct output_item *output_item) { struct table_item *item = to_table_item (output_item); free (item->title); free (item->caption); table_unref (item->table); free (item); } const struct output_item_class table_item_class = { table_item_destroy, }; pspp-1.0.1/src/output/output-item.c0000644000175000017500000000437212470243701014211 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "output/output-item-provider.h" #include #include #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "gl/xalloc.h" /* Increases ITEM's reference count, indicating that it has an additional owner. An output item that is shared among multiple owners must not be modified. */ struct output_item * output_item_ref (const struct output_item *item_) { struct output_item *item = CONST_CAST (struct output_item *, item_); item->ref_cnt++; return item; } /* Decreases ITEM's reference count, indicating that it has one fewer owner. If ITEM no longer has any owners, it is freed. */ void output_item_unref (struct output_item *item) { if (item != NULL) { assert (item->ref_cnt > 0); if (--item->ref_cnt == 0) item->class->destroy (item); } } /* Returns true if ITEM has more than one owner. An output item that is shared among multiple owners must not be modified. */ bool output_item_is_shared (const struct output_item *item) { return item->ref_cnt > 1; } /* Initializes ITEM as an output item of the specified CLASS, initially with a reference count of 1. An output item is an abstract class, that is, a plain output_item is not useful on its own. Thus, this function is normally called from the initialization function of some subclass of output_item. */ void output_item_init (struct output_item *item, const struct output_item_class *class) { item->class = class; item->ref_cnt = 1; } pspp-1.0.1/src/output/cairo.c0000644000175000017500000014133713137223525013020 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "output/cairo.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" #include "libpspp/message.h" #include "libpspp/start-date.h" #include "libpspp/str.h" #include "libpspp/string-map.h" #include "libpspp/version.h" #include "data/file-handle-def.h" #include "output/cairo-chart.h" #include "output/chart-item-provider.h" #include "output/charts/boxplot.h" #include "output/charts/np-plot.h" #include "output/charts/piechart.h" #include "output/charts/barchart.h" #include "output/charts/plot-hist.h" #include "output/charts/roc-chart.h" #include "output/charts/spreadlevel-plot.h" #include "output/charts/scree.h" #include "output/charts/scatterplot.h" #include "output/driver-provider.h" #include "output/message-item.h" #include "output/options.h" #include "output/render.h" #include "output/tab.h" #include "output/table-item.h" #include "output/table.h" #include "output/text-item.h" #include #include #include #include #include #include #include #include #include #include #include "gl/intprops.h" #include "gl/minmax.h" #include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) /* This file uses TABLE_HORZ and TABLE_VERT enough to warrant abbreviating. */ #define H TABLE_HORZ #define V TABLE_VERT /* The unit used for internal measurements is inch/(72 * XR_POINT). */ #define XR_POINT PANGO_SCALE /* Conversions to and from points. */ static double xr_to_pt (int x) { return x / (double) XR_POINT; } /* Output types. */ enum xr_output_type { XR_PDF, XR_PS, XR_SVG }; /* Cairo fonts. */ enum xr_font_type { XR_FONT_PROPORTIONAL, XR_FONT_EMPHASIS, XR_FONT_FIXED, XR_FONT_MARKER, XR_N_FONTS }; /* A font for use with Cairo. */ struct xr_font { PangoFontDescription *desc; PangoLayout *layout; }; /* An output item whose rendering is in progress. */ struct xr_render_fsm { /* Renders as much of itself as it can on the current page. Returns true if rendering is complete, false if the output item needs another page. */ bool (*render) (struct xr_render_fsm *, struct xr_driver *); /* Destroys the output item. */ void (*destroy) (struct xr_render_fsm *); }; /* Cairo output driver. */ struct xr_driver { struct output_driver driver; /* User parameters. */ struct xr_font fonts[XR_N_FONTS]; int width; /* Page width minus margins. */ int length; /* Page length minus margins and header. */ int left_margin; /* Left margin in inch/(72 * XR_POINT). */ int right_margin; /* Right margin in inch/(72 * XR_POINT). */ int top_margin; /* Top margin in inch/(72 * XR_POINT). */ int bottom_margin; /* Bottom margin in inch/(72 * XR_POINT). */ int line_gutter; /* Space around lines. */ int line_space; /* Space between lines. */ int line_width; /* Width of lines. */ int cell_margin; int min_break[TABLE_N_AXES]; /* Min cell size to break across pages. */ struct xr_color bg; /* Background color */ struct xr_color fg; /* Foreground color */ /* Internal state. */ struct render_params *params; int char_width, char_height; char *command_name; char *title; char *subtitle; cairo_t *cairo; int page_number; /* Current page number. */ int x, y; struct xr_render_fsm *fsm; int nest; }; static const struct output_driver_class cairo_driver_class; static void xr_driver_destroy_fsm (struct xr_driver *); static void xr_driver_run_fsm (struct xr_driver *); static void xr_draw_line (void *, int bb[TABLE_N_AXES][2], enum render_line_style styles[TABLE_N_AXES][2]); static void xr_measure_cell_width (void *, const struct table_cell *, int footnote_idx, int *min, int *max); static int xr_measure_cell_height (void *, const struct table_cell *, int footnote_idx, int width); static void xr_draw_cell (void *, const struct table_cell *, int footnote_idx, int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2]); static int xr_adjust_break (void *, const struct table_cell *, int footnote_idx, int width, int height); static struct xr_render_fsm *xr_render_output_item ( struct xr_driver *, const struct output_item *); /* Output driver basics. */ static struct xr_driver * xr_driver_cast (struct output_driver *driver) { assert (driver->class == &cairo_driver_class); return UP_CAST (driver, struct xr_driver, driver); } static struct driver_option * opt (struct output_driver *d, struct string_map *options, const char *key, const char *default_value) { return driver_option_get (d, options, key, default_value); } /* Parse color information specified by KEY into {RED,GREEN,BLUE}. Currently, the input string must be of the form "#RRRRGGGGBBBB" Future implementations might allow things like "yellow" and "sky-blue-ultra-brown" */ void parse_color (struct output_driver *d, struct string_map *options, const char *key, const char *default_value, struct xr_color *color) { int red, green, blue; char *string = parse_string (opt (d, options, key, default_value)); if (3 != sscanf (string, "#%04x%04x%04x", &red, &green, &blue)) { /* If the parsed option string fails, then try the default value */ if ( 3 != sscanf (default_value, "#%04x%04x%04x", &red, &green, &blue)) { /* ... and if that fails set everything to zero */ red = green = blue = 0; } } free (string); /* Convert 16 bit ints to float */ color->red = red / (double) 0xFFFF; color->green = green / (double) 0xFFFF; color->blue = blue / (double) 0xFFFF; } static PangoFontDescription * parse_font (struct output_driver *d, struct string_map *options, const char *key, const char *default_value, int default_size) { PangoFontDescription *desc; char *string; /* Parse KEY as a font description. */ string = parse_string (opt (d, options, key, default_value)); desc = pango_font_description_from_string (string); if (desc == NULL) { msg (MW, _("`%s': bad font specification"), string); /* Fall back to DEFAULT_VALUE, which had better be a valid font description. */ desc = pango_font_description_from_string (default_value); assert (desc != NULL); } free (string); /* If the font description didn't include an explicit font size, then set it to DEFAULT_SIZE, which is in inch/72000 units. */ if (!(pango_font_description_get_set_fields (desc) & PANGO_FONT_MASK_SIZE)) pango_font_description_set_size (desc, (default_size / 1000.0) * PANGO_SCALE); return desc; } static void apply_options (struct xr_driver *xr, struct string_map *o) { struct output_driver *d = &xr->driver; /* In inch/72000 units used by parse_paper_size() and parse_dimension(). */ int left_margin, right_margin; int top_margin, bottom_margin; int paper_width, paper_length; int font_size; int min_break[TABLE_N_AXES]; /* Scale factor from inch/72000 to inch/(72 * XR_POINT). */ const double scale = XR_POINT / 1000.; int i; for (i = 0; i < XR_N_FONTS; i++) { struct xr_font *font = &xr->fonts[i]; if (font->desc != NULL) pango_font_description_free (font->desc); } font_size = parse_int (opt (d, o, "font-size", "10000"), 1000, 1000000); xr->fonts[XR_FONT_FIXED].desc = parse_font (d, o, "fixed-font", "monospace", font_size); xr->fonts[XR_FONT_PROPORTIONAL].desc = parse_font (d, o, "prop-font", "serif", font_size); xr->fonts[XR_FONT_EMPHASIS].desc = parse_font (d, o, "emph-font", "serif italic", font_size); xr->fonts[XR_FONT_MARKER].desc = parse_font (d, o, "marker-font", "serif", font_size * PANGO_SCALE_X_SMALL); xr->line_gutter = XR_POINT / 2; xr->line_space = XR_POINT; xr->line_width = XR_POINT / 2; xr->page_number = 0; parse_color (d, o, "background-color", "#FFFFFFFFFFFF", &xr->bg); parse_color (d, o, "foreground-color", "#000000000000", &xr->fg); /* Get dimensions. */ parse_paper_size (opt (d, o, "paper-size", ""), &paper_width, &paper_length); left_margin = parse_dimension (opt (d, o, "left-margin", ".5in")); right_margin = parse_dimension (opt (d, o, "right-margin", ".5in")); top_margin = parse_dimension (opt (d, o, "top-margin", ".5in")); bottom_margin = parse_dimension (opt (d, o, "bottom-margin", ".5in")); min_break[H] = parse_dimension (opt (d, o, "min-hbreak", NULL)) * scale; min_break[V] = parse_dimension (opt (d, o, "min-vbreak", NULL)) * scale; /* Convert to inch/(XR_POINT * 72). */ xr->left_margin = left_margin * scale; xr->right_margin = right_margin * scale; xr->top_margin = top_margin * scale; xr->bottom_margin = bottom_margin * scale; xr->width = (paper_width - left_margin - right_margin) * scale; xr->length = (paper_length - top_margin - bottom_margin) * scale; xr->min_break[H] = min_break[H] >= 0 ? min_break[H] : xr->width / 2; xr->min_break[V] = min_break[V] >= 0 ? min_break[V] : xr->length / 2; } static struct xr_driver * xr_allocate (const char *name, int device_type, struct string_map *o) { struct xr_driver *xr = xzalloc (sizeof *xr); struct output_driver *d = &xr->driver; output_driver_init (d, &cairo_driver_class, name, device_type); apply_options (xr, o); return xr; } static int pango_to_xr (int pango) { return (XR_POINT != PANGO_SCALE ? ceil (pango * (1. * XR_POINT / PANGO_SCALE)) : pango); } static int xr_to_pango (int xr) { return (XR_POINT != PANGO_SCALE ? ceil (xr * (1. / XR_POINT * PANGO_SCALE)) : xr); } static bool xr_set_cairo (struct xr_driver *xr, cairo_t *cairo) { int i; xr->cairo = cairo; cairo_set_line_width (xr->cairo, xr_to_pt (xr->line_width)); xr->char_width = 0; xr->char_height = 0; for (i = 0; i < XR_N_FONTS; i++) { struct xr_font *font = &xr->fonts[i]; int char_width, char_height; font->layout = pango_cairo_create_layout (cairo); pango_layout_set_font_description (font->layout, font->desc); pango_layout_set_text (font->layout, "0", 1); pango_layout_get_size (font->layout, &char_width, &char_height); xr->char_width = MAX (xr->char_width, pango_to_xr (char_width)); xr->char_height = MAX (xr->char_height, pango_to_xr (char_height)); } xr->cell_margin = xr->char_width; if (xr->params == NULL) { int single_width, double_width; xr->params = xmalloc (sizeof *xr->params); xr->params->draw_line = xr_draw_line; xr->params->measure_cell_width = xr_measure_cell_width; xr->params->measure_cell_height = xr_measure_cell_height; xr->params->adjust_break = xr_adjust_break; xr->params->draw_cell = xr_draw_cell; xr->params->aux = xr; xr->params->size[H] = xr->width; xr->params->size[V] = xr->length; xr->params->font_size[H] = xr->char_width; xr->params->font_size[V] = xr->char_height; single_width = 2 * xr->line_gutter + xr->line_width; double_width = 2 * xr->line_gutter + xr->line_space + 2 * xr->line_width; for (i = 0; i < TABLE_N_AXES; i++) { xr->params->line_widths[i][RENDER_LINE_NONE] = 0; xr->params->line_widths[i][RENDER_LINE_SINGLE] = single_width; xr->params->line_widths[i][RENDER_LINE_DOUBLE] = double_width; } for (i = 0; i < TABLE_N_AXES; i++) xr->params->min_break[i] = xr->min_break[i]; } cairo_set_source_rgb (xr->cairo, xr->fg.red, xr->fg.green, xr->fg.blue); return true; } static struct output_driver * xr_create (const char *file_name, enum settings_output_devices device_type, struct string_map *o, enum xr_output_type file_type) { enum { MIN_WIDTH = 3, MIN_LENGTH = 3 }; struct xr_driver *xr; cairo_surface_t *surface; cairo_status_t status; double width_pt, length_pt; xr = xr_allocate (file_name, device_type, o); width_pt = xr_to_pt (xr->width + xr->left_margin + xr->right_margin); length_pt = xr_to_pt (xr->length + xr->top_margin + xr->bottom_margin); if (file_type == XR_PDF) surface = cairo_pdf_surface_create (file_name, width_pt, length_pt); else if (file_type == XR_PS) surface = cairo_ps_surface_create (file_name, width_pt, length_pt); else if (file_type == XR_SVG) surface = cairo_svg_surface_create (file_name, width_pt, length_pt); else NOT_REACHED (); status = cairo_surface_status (surface); if (status != CAIRO_STATUS_SUCCESS) { msg (ME, _("error opening output file `%s': %s"), file_name, cairo_status_to_string (status)); cairo_surface_destroy (surface); goto error; } xr->cairo = cairo_create (surface); cairo_surface_destroy (surface); if (!xr_set_cairo (xr, xr->cairo)) goto error; cairo_save (xr->cairo); xr_driver_next_page (xr, xr->cairo); if (xr->width / xr->char_width < MIN_WIDTH) { msg (ME, _("The defined page is not wide enough to hold at least %d " "characters in the default font. In fact, there's only " "room for %d characters."), MIN_WIDTH, xr->width / xr->char_width); goto error; } if (xr->length / xr->char_height < MIN_LENGTH) { msg (ME, _("The defined page is not long enough to hold at least %d " "lines in the default font. In fact, there's only " "room for %d lines."), MIN_LENGTH, xr->length / xr->char_height); goto error; } return &xr->driver; error: output_driver_destroy (&xr->driver); return NULL; } static struct output_driver * xr_pdf_create (struct file_handle *fh, enum settings_output_devices device_type, struct string_map *o) { struct output_driver *od = xr_create (fh_get_file_name (fh), device_type, o, XR_PDF); fh_unref (fh); return od ; } static struct output_driver * xr_ps_create (struct file_handle *fh, enum settings_output_devices device_type, struct string_map *o) { struct output_driver *od = xr_create (fh_get_file_name (fh), device_type, o, XR_PS); fh_unref (fh); return od ; } static struct output_driver * xr_svg_create (struct file_handle *fh, enum settings_output_devices device_type, struct string_map *o) { struct output_driver *od = xr_create (fh_get_file_name (fh), device_type, o, XR_SVG); fh_unref (fh); return od ; } static void xr_destroy (struct output_driver *driver) { struct xr_driver *xr = xr_driver_cast (driver); size_t i; xr_driver_destroy_fsm (xr); if (xr->cairo != NULL) { cairo_status_t status; cairo_surface_finish (cairo_get_target (xr->cairo)); status = cairo_status (xr->cairo); if (status != CAIRO_STATUS_SUCCESS) msg (ME, _("error drawing output for %s driver: %s"), output_driver_get_name (driver), cairo_status_to_string (status)); cairo_destroy (xr->cairo); } free (xr->command_name); for (i = 0; i < XR_N_FONTS; i++) { struct xr_font *font = &xr->fonts[i]; if (font->desc != NULL) pango_font_description_free (font->desc); if (font->layout != NULL) g_object_unref (font->layout); } free (xr->params); free (xr); } static void xr_flush (struct output_driver *driver) { struct xr_driver *xr = xr_driver_cast (driver); cairo_surface_flush (cairo_get_target (xr->cairo)); } static void xr_submit (struct output_driver *driver, const struct output_item *output_item) { struct xr_driver *xr = xr_driver_cast (driver); output_driver_track_current_command (output_item, &xr->command_name); xr_driver_output_item (xr, output_item); while (xr_driver_need_new_page (xr)) { cairo_restore (xr->cairo); cairo_show_page (xr->cairo); cairo_save (xr->cairo); xr_driver_next_page (xr, xr->cairo); } } /* Functions for rendering a series of output items to a series of Cairo contexts, with pagination. Used by PSPPIRE for printing, and by the basic Cairo output driver above as its underlying implementation. See the big comment in cairo.h for intended usage. */ /* Gives new page CAIRO to XR for output. */ void xr_driver_next_page (struct xr_driver *xr, cairo_t *cairo) { cairo_save (cairo); cairo_set_source_rgb (cairo, xr->bg.red, xr->bg.green, xr->bg.blue); cairo_rectangle (cairo, 0, 0, xr->width, xr->length); cairo_fill (cairo); cairo_restore (cairo); cairo_translate (cairo, xr_to_pt (xr->left_margin), xr_to_pt (xr->top_margin)); xr->page_number++; xr->cairo = cairo; xr->x = xr->y = 0; xr_driver_run_fsm (xr); } /* Start rendering OUTPUT_ITEM to XR. Only valid if XR is not in the middle of rendering a previous output item, that is, only if xr_driver_need_new_page() returns false. */ void xr_driver_output_item (struct xr_driver *xr, const struct output_item *output_item) { assert (xr->fsm == NULL); xr->fsm = xr_render_output_item (xr, output_item); xr_driver_run_fsm (xr); } /* Returns true if XR is in the middle of rendering an output item and needs a new page to be appended using xr_driver_next_page() to make progress, otherwise false. */ bool xr_driver_need_new_page (const struct xr_driver *xr) { return xr->fsm != NULL; } /* Returns true if the current page doesn't have any content yet. */ bool xr_driver_is_page_blank (const struct xr_driver *xr) { return xr->y == 0; } static void xr_driver_destroy_fsm (struct xr_driver *xr) { if (xr->fsm != NULL) { xr->fsm->destroy (xr->fsm); xr->fsm = NULL; } } static void xr_driver_run_fsm (struct xr_driver *xr) { if (xr->fsm != NULL && !xr->fsm->render (xr->fsm, xr)) xr_driver_destroy_fsm (xr); } static void xr_layout_cell (struct xr_driver *, const struct table_cell *, int footnote_idx, int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2], int *width, int *height, int *brk); static void dump_line (struct xr_driver *xr, int x0, int y0, int x1, int y1) { cairo_new_path (xr->cairo); cairo_move_to (xr->cairo, xr_to_pt (x0 + xr->x), xr_to_pt (y0 + xr->y)); cairo_line_to (xr->cairo, xr_to_pt (x1 + xr->x), xr_to_pt (y1 + xr->y)); cairo_stroke (xr->cairo); } static void UNUSED dump_rectangle (struct xr_driver *xr, int x0, int y0, int x1, int y1) { cairo_new_path (xr->cairo); cairo_move_to (xr->cairo, xr_to_pt (x0 + xr->x), xr_to_pt (y0 + xr->y)); cairo_line_to (xr->cairo, xr_to_pt (x1 + xr->x), xr_to_pt (y0 + xr->y)); cairo_line_to (xr->cairo, xr_to_pt (x1 + xr->x), xr_to_pt (y1 + xr->y)); cairo_line_to (xr->cairo, xr_to_pt (x0 + xr->x), xr_to_pt (y1 + xr->y)); cairo_close_path (xr->cairo); cairo_stroke (xr->cairo); } /* Draws a horizontal line X0...X2 at Y if LEFT says so, shortening it to X0...X1 if SHORTEN is true. Draws a horizontal line X1...X3 at Y if RIGHT says so, shortening it to X2...X3 if SHORTEN is true. */ static void horz_line (struct xr_driver *xr, int x0, int x1, int x2, int x3, int y, enum render_line_style left, enum render_line_style right, bool shorten) { if (left != RENDER_LINE_NONE && right != RENDER_LINE_NONE && !shorten) dump_line (xr, x0, y, x3, y); else { if (left != RENDER_LINE_NONE) dump_line (xr, x0, y, shorten ? x1 : x2, y); if (right != RENDER_LINE_NONE) dump_line (xr, shorten ? x2 : x1, y, x3, y); } } /* Draws a vertical line Y0...Y2 at X if TOP says so, shortening it to Y0...Y1 if SHORTEN is true. Draws a vertical line Y1...Y3 at X if BOTTOM says so, shortening it to Y2...Y3 if SHORTEN is true. */ static void vert_line (struct xr_driver *xr, int y0, int y1, int y2, int y3, int x, enum render_line_style top, enum render_line_style bottom, bool shorten) { if (top != RENDER_LINE_NONE && bottom != RENDER_LINE_NONE && !shorten) dump_line (xr, x, y0, x, y3); else { if (top != RENDER_LINE_NONE) dump_line (xr, x, y0, x, shorten ? y1 : y2); if (bottom != RENDER_LINE_NONE) dump_line (xr, x, shorten ? y2 : y1, x, y3); } } static void xr_draw_line (void *xr_, int bb[TABLE_N_AXES][2], enum render_line_style styles[TABLE_N_AXES][2]) { const int x0 = bb[H][0]; const int y0 = bb[V][0]; const int x3 = bb[H][1]; const int y3 = bb[V][1]; const int top = styles[H][0]; const int bottom = styles[H][1]; const int start_of_line = render_direction_rtl() ? styles[V][1]: styles[V][0]; const int end_of_line = render_direction_rtl() ? styles[V][0]: styles[V][1]; /* The algorithm here is somewhat subtle, to allow it to handle all the kinds of intersections that we need. Three additional ordinates are assigned along the x axis. The first is xc, midway between x0 and x3. The others are x1 and x2; for a single vertical line these are equal to xc, and for a double vertical line they are the ordinates of the left and right half of the double line. yc, y1, and y2 are assigned similarly along the y axis. The following diagram shows the coordinate system and output for double top and bottom lines, single left line, and no right line: x0 x1 xc x2 x3 y0 ________________________ | # # | | # # | | # # | | # # | | # # | y1 = y2 = yc |######### # | | # # | | # # | | # # | | # # | y3 |________#_____#_______| */ struct xr_driver *xr = xr_; /* Offset from center of each line in a pair of double lines. */ int double_line_ofs = (xr->line_space + xr->line_width) / 2; /* Are the lines along each axis single or double? (It doesn't make sense to have different kinds of line on the same axis, so we don't try to gracefully handle that case.) */ bool double_vert = top == RENDER_LINE_DOUBLE || bottom == RENDER_LINE_DOUBLE; bool double_horz = start_of_line == RENDER_LINE_DOUBLE || end_of_line == RENDER_LINE_DOUBLE; /* When horizontal lines are doubled, the left-side line along y1 normally runs from x0 to x2, and the right-side line along y1 from x3 to x1. If the top-side line is also doubled, we shorten the y1 lines, so that the left-side line runs only to x1, and the right-side line only to x2. Otherwise, the horizontal line at y = y1 below would cut off the intersection, which looks ugly: x0 x1 x2 x3 y0 ________________________ | # # | | # # | | # # | | # # | y1 |######### ########| | | | | y2 |######################| | | | | y3 |______________________| It is more of a judgment call when the horizontal line is single. We actually choose to cut off the line anyhow, as shown in the first diagram above. */ bool shorten_y1_lines = top == RENDER_LINE_DOUBLE; bool shorten_y2_lines = bottom == RENDER_LINE_DOUBLE; bool shorten_yc_line = shorten_y1_lines && shorten_y2_lines; int horz_line_ofs = double_vert ? double_line_ofs : 0; int xc = (x0 + x3) / 2; int x1 = xc - horz_line_ofs; int x2 = xc + horz_line_ofs; bool shorten_x1_lines = start_of_line == RENDER_LINE_DOUBLE; bool shorten_x2_lines = end_of_line == RENDER_LINE_DOUBLE; bool shorten_xc_line = shorten_x1_lines && shorten_x2_lines; int vert_line_ofs = double_horz ? double_line_ofs : 0; int yc = (y0 + y3) / 2; int y1 = yc - vert_line_ofs; int y2 = yc + vert_line_ofs; if (!double_horz) horz_line (xr, x0, x1, x2, x3, yc, start_of_line, end_of_line, shorten_yc_line); else { horz_line (xr, x0, x1, x2, x3, y1, start_of_line, end_of_line, shorten_y1_lines); horz_line (xr, x0, x1, x2, x3, y2, start_of_line, end_of_line, shorten_y2_lines); } if (!double_vert) vert_line (xr, y0, y1, y2, y3, xc, top, bottom, shorten_xc_line); else { vert_line (xr, y0, y1, y2, y3, x1, top, bottom, shorten_x1_lines); vert_line (xr, y0, y1, y2, y3, x2, top, bottom, shorten_x2_lines); } } static void xr_measure_cell_width (void *xr_, const struct table_cell *cell, int footnote_idx, int *min_width, int *max_width) { struct xr_driver *xr = xr_; int bb[TABLE_N_AXES][2]; int clip[TABLE_N_AXES][2]; int h; bb[H][0] = 0; bb[H][1] = INT_MAX; bb[V][0] = 0; bb[V][1] = INT_MAX; clip[H][0] = clip[H][1] = clip[V][0] = clip[V][1] = 0; xr_layout_cell (xr, cell, footnote_idx, bb, clip, max_width, &h, NULL); bb[H][1] = 1; xr_layout_cell (xr, cell, footnote_idx, bb, clip, min_width, &h, NULL); if (*min_width > 0) *min_width += xr->cell_margin * 2; if (*max_width > 0) *max_width += xr->cell_margin * 2; } static int xr_measure_cell_height (void *xr_, const struct table_cell *cell, int footnote_idx, int width) { struct xr_driver *xr = xr_; int bb[TABLE_N_AXES][2]; int clip[TABLE_N_AXES][2]; int w, h; bb[H][0] = 0; bb[H][1] = width - xr->cell_margin * 2; bb[V][0] = 0; bb[V][1] = INT_MAX; clip[H][0] = clip[H][1] = clip[V][0] = clip[V][1] = 0; xr_layout_cell (xr, cell, footnote_idx, bb, clip, &w, &h, NULL); return h; } static void xr_draw_cell (void *xr_, const struct table_cell *cell, int footnote_idx, int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2]) { struct xr_driver *xr = xr_; int w, h, brk; bb[H][0] += xr->cell_margin; bb[H][1] -= xr->cell_margin; if (bb[H][0] >= bb[H][1]) return; xr_layout_cell (xr, cell, footnote_idx, bb, clip, &w, &h, &brk); } static int xr_adjust_break (void *xr_, const struct table_cell *cell, int footnote_idx, int width, int height) { struct xr_driver *xr = xr_; int bb[TABLE_N_AXES][2]; int clip[TABLE_N_AXES][2]; int w, h, brk; if (xr_measure_cell_height (xr_, cell, footnote_idx, width) < height) return -1; bb[H][0] = 0; bb[H][1] = width - 2 * xr->cell_margin; if (bb[H][1] <= 0) return 0; bb[V][0] = 0; bb[V][1] = height; clip[H][0] = clip[H][1] = clip[V][0] = clip[V][1] = 0; xr_layout_cell (xr, cell, footnote_idx, bb, clip, &w, &h, &brk); return brk; } static void xr_clip (struct xr_driver *xr, int clip[TABLE_N_AXES][2]) { if (clip[H][1] != INT_MAX || clip[V][1] != INT_MAX) { double x0 = xr_to_pt (clip[H][0] + xr->x); double y0 = xr_to_pt (clip[V][0] + xr->y); double x1 = xr_to_pt (clip[H][1] + xr->x); double y1 = xr_to_pt (clip[V][1] + xr->y); cairo_rectangle (xr->cairo, x0, y0, x1 - x0, y1 - y0); cairo_clip (xr->cairo); } } static void add_attr_with_start (PangoAttrList *list, PangoAttribute *attr, guint start_index) { attr->start_index = start_index; pango_attr_list_insert (list, attr); } static int xr_layout_cell_text (struct xr_driver *xr, const struct cell_contents *contents, int footnote_idx, int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2], int y, int *widthp, int *brk) { unsigned int options = contents->options; struct xr_font *font; bool merge_footnotes; size_t length; int w, h; if (contents->n_footnotes == 0) merge_footnotes = false; else if (contents->n_footnotes == 1 && (options & TAB_ALIGNMENT) == TAB_RIGHT) { PangoAttrList *attrs; char marker[16]; font = &xr->fonts[XR_FONT_MARKER]; str_format_26adic (footnote_idx + 1, false, marker, sizeof marker); pango_layout_set_text (font->layout, marker, strlen (marker)); attrs = pango_attr_list_new (); pango_attr_list_insert (attrs, pango_attr_rise_new (7000)); pango_layout_set_attributes (font->layout, attrs); pango_attr_list_unref (attrs); pango_layout_get_size (font->layout, &w, &h); merge_footnotes = w > xr->cell_margin; if (!merge_footnotes && clip[H][0] != clip[H][1]) { cairo_save (xr->cairo); xr_clip (xr, clip); cairo_translate (xr->cairo, xr_to_pt (bb[H][1] + xr->x), xr_to_pt (y + xr->y)); pango_layout_set_alignment (font->layout, PANGO_ALIGN_LEFT); pango_layout_set_width (font->layout, -1); pango_cairo_show_layout (xr->cairo, font->layout); cairo_restore (xr->cairo); } pango_layout_set_attributes (font->layout, NULL); } else merge_footnotes = true; font = (options & TAB_FIX ? &xr->fonts[XR_FONT_FIXED] : options & TAB_EMPH ? &xr->fonts[XR_FONT_EMPHASIS] : &xr->fonts[XR_FONT_PROPORTIONAL]); length = strlen (contents->text); if (merge_footnotes) { PangoAttrList *attrs; struct string s; size_t i; bb[H][1] += xr->cell_margin; ds_init_empty (&s); ds_extend (&s, length + contents->n_footnotes * 10); ds_put_cstr (&s, contents->text); for (i = 0; i < contents->n_footnotes; i++) { char marker[16]; if (i > 0) ds_put_byte (&s, ','); str_format_26adic (footnote_idx + i + 1, false, marker, sizeof marker); ds_put_cstr (&s, marker); } pango_layout_set_text (font->layout, ds_cstr (&s), ds_length (&s)); ds_destroy (&s); attrs = pango_attr_list_new (); add_attr_with_start (attrs, pango_attr_rise_new (7000), length); add_attr_with_start ( attrs, pango_attr_font_desc_new (xr->fonts[XR_FONT_MARKER].desc), length); pango_layout_set_attributes (font->layout, attrs); pango_attr_list_unref (attrs); } else pango_layout_set_text (font->layout, contents->text, -1); pango_layout_set_alignment ( font->layout, ((options & TAB_ALIGNMENT) == TAB_RIGHT ? PANGO_ALIGN_RIGHT : (options & TAB_ALIGNMENT) == TAB_LEFT ? PANGO_ALIGN_LEFT : PANGO_ALIGN_CENTER)); pango_layout_set_width ( font->layout, bb[H][1] == INT_MAX ? -1 : xr_to_pango (bb[H][1] - bb[H][0])); pango_layout_set_wrap (font->layout, PANGO_WRAP_WORD); if (clip[H][0] != clip[H][1]) { cairo_save (xr->cairo); xr_clip (xr, clip); cairo_translate (xr->cairo, xr_to_pt (bb[H][0] + xr->x), xr_to_pt (y + xr->y)); pango_cairo_show_layout (xr->cairo, font->layout); /* If enabled, this draws a blue rectangle around the extents of each line of text, which can be rather useful for debugging layout issues. */ if (0) { PangoLayoutIter *iter; iter = pango_layout_get_iter (font->layout); do { PangoRectangle extents; pango_layout_iter_get_line_extents (iter, &extents, NULL); cairo_save (xr->cairo); cairo_set_source_rgb (xr->cairo, 1, 0, 0); dump_rectangle (xr, pango_to_xr (extents.x) - xr->x, pango_to_xr (extents.y) - xr->y, pango_to_xr (extents.x + extents.width) - xr->x, pango_to_xr (extents.y + extents.height) - xr->y); cairo_restore (xr->cairo); } while (pango_layout_iter_next_line (iter)); pango_layout_iter_free (iter); } cairo_restore (xr->cairo); } pango_layout_get_size (font->layout, &w, &h); w = pango_to_xr (w); h = pango_to_xr (h); if (w > *widthp) *widthp = w; if (y + h >= bb[V][1]) { PangoLayoutIter *iter; int best UNUSED = 0; /* Choose a breakpoint between lines instead of in the middle of one. */ iter = pango_layout_get_iter (font->layout); do { PangoRectangle extents; int y0, y1; int bottom; pango_layout_iter_get_line_extents (iter, NULL, &extents); pango_layout_iter_get_line_yrange (iter, &y0, &y1); extents.x = pango_to_xr (extents.x); extents.y = pango_to_xr (y0); extents.width = pango_to_xr (extents.width); extents.height = pango_to_xr (y1 - y0); bottom = y + extents.y + extents.height; if (bottom < bb[V][1]) { if (brk && clip[H][0] != clip[H][1]) best = bottom; if (brk) *brk = bottom; } else break; } while (pango_layout_iter_next_line (iter)); pango_layout_iter_free (iter); /* If enabled, draws a green line across the chosen breakpoint, which can be useful for debugging issues with breaking. */ if (0) { if (best && !xr->nest) { cairo_save (xr->cairo); cairo_set_source_rgb (xr->cairo, 0, 1, 0); dump_line (xr, -xr->left_margin, best, xr->width + xr->right_margin, best); cairo_restore (xr->cairo); } } } pango_layout_set_attributes (font->layout, NULL); return y + h; } static int xr_layout_cell_subtable (struct xr_driver *xr, const struct cell_contents *contents, int footnote_idx UNUSED, int bb[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2], int *widthp, int *brk) { int single_width, double_width; struct render_params params; struct render_pager *p; int r[TABLE_N_AXES][2]; int width, height; int i; params.draw_line = xr_draw_line; params.measure_cell_width = xr_measure_cell_width; params.measure_cell_height = xr_measure_cell_height; params.adjust_break = NULL; params.draw_cell = xr_draw_cell; params.aux = xr; params.size[H] = bb[H][1] - bb[H][0]; params.size[V] = bb[V][1] - bb[V][0]; params.font_size[H] = xr->char_width; params.font_size[V] = xr->char_height; single_width = 2 * xr->line_gutter + xr->line_width; double_width = 2 * xr->line_gutter + xr->line_space + 2 * xr->line_width; for (i = 0; i < TABLE_N_AXES; i++) { params.line_widths[i][RENDER_LINE_NONE] = 0; params.line_widths[i][RENDER_LINE_SINGLE] = single_width; params.line_widths[i][RENDER_LINE_DOUBLE] = double_width; } xr->nest++; p = render_pager_create (¶ms, contents->table); width = render_pager_get_size (p, H); height = render_pager_get_size (p, V); if (bb[V][0] + height >= bb[V][1]) *brk = bb[V][0] + render_pager_get_best_breakpoint (p, bb[V][1] - bb[V][0]); /* r = intersect(bb, clip) - bb. */ for (i = 0; i < TABLE_N_AXES; i++) { r[i][0] = MAX (bb[i][0], clip[i][0]) - bb[i][0]; r[i][1] = MIN (bb[i][1], clip[i][1]) - bb[i][0]; } if (r[H][0] < r[H][1] && r[V][0] < r[V][1]) { unsigned int alignment = contents->options & TAB_ALIGNMENT; int save_x = xr->x; cairo_save (xr->cairo); xr_clip (xr, clip); xr->x += bb[H][0]; if (alignment == TAB_RIGHT) xr->x += params.size[H] - width; else if (alignment == TAB_CENTER) xr->x += (params.size[H] - width) / 2; xr->y += bb[V][0]; render_pager_draw_region (p, r[H][0], r[V][0], r[H][1] - r[H][0], r[V][1] - r[V][0]); xr->y -= bb[V][0]; xr->x = save_x; cairo_restore (xr->cairo); } render_pager_destroy (p); xr->nest--; if (width > *widthp) *widthp = width; return bb[V][0] + height; } static void xr_layout_cell (struct xr_driver *xr, const struct table_cell *cell, int footnote_idx, int bb_[TABLE_N_AXES][2], int clip[TABLE_N_AXES][2], int *width, int *height, int *brk) { int bb[TABLE_N_AXES][2]; size_t i; *width = 0; *height = 0; if (brk) *brk = 0; memcpy (bb, bb_, sizeof bb); /* If enabled, draws a blue rectangle around the cell extents, which can be useful for debugging layout. */ if (0) { if (clip[H][0] != clip[H][1]) { int offset = (xr->nest) * XR_POINT; cairo_save (xr->cairo); cairo_set_source_rgb (xr->cairo, 0, 0, 1); dump_rectangle (xr, bb[H][0] + offset, bb[V][0] + offset, bb[H][1] - offset, bb[V][1] - offset); cairo_restore (xr->cairo); } } for (i = 0; i < cell->n_contents && bb[V][0] < bb[V][1]; i++) { const struct cell_contents *contents = &cell->contents[i]; if (brk) *brk = bb[V][0]; if (i > 0) { bb[V][0] += xr->char_height / 2; if (bb[V][0] >= bb[V][1]) break; if (brk) *brk = bb[V][0]; } if (contents->text) bb[V][0] = xr_layout_cell_text (xr, contents, footnote_idx, bb, clip, bb[V][0], width, brk); else bb[V][0] = xr_layout_cell_subtable (xr, contents, footnote_idx, bb, clip, width, brk); footnote_idx += contents->n_footnotes; } *height = bb[V][0] - bb_[V][0]; } struct output_driver_factory pdf_driver_factory = { "pdf", "pspp.pdf", xr_pdf_create }; struct output_driver_factory ps_driver_factory = { "ps", "pspp.ps", xr_ps_create }; struct output_driver_factory svg_driver_factory = { "svg", "pspp.svg", xr_svg_create }; static const struct output_driver_class cairo_driver_class = { "cairo", xr_destroy, xr_submit, xr_flush, }; /* GUI rendering helpers. */ struct xr_rendering { struct output_item *item; /* Table items. */ struct render_pager *p; struct xr_driver *xr; }; #define CHART_WIDTH 500 #define CHART_HEIGHT 375 struct xr_driver * xr_driver_create (cairo_t *cairo, struct string_map *options) { struct xr_driver *xr = xr_allocate ("cairo", 0, options); if (!xr_set_cairo (xr, cairo)) { output_driver_destroy (&xr->driver); return NULL; } return xr; } /* Destroy XR, which should have been created with xr_driver_create(). Any cairo_t added to XR is not destroyed, because it is owned by the client. */ void xr_driver_destroy (struct xr_driver *xr) { if (xr != NULL) { xr->cairo = NULL; output_driver_destroy (&xr->driver); } } static struct xr_rendering * xr_rendering_create_text (struct xr_driver *xr, const char *text, cairo_t *cr) { struct table_item *table_item; struct xr_rendering *r; table_item = table_item_create (table_from_string (TAB_LEFT, text), NULL, NULL); r = xr_rendering_create (xr, &table_item->output_item, cr); table_item_unref (table_item); return r; } void xr_rendering_apply_options (struct xr_rendering *xr, struct string_map *o) { if (is_table_item (xr->item)) apply_options (xr->xr, o); } struct xr_rendering * xr_rendering_create (struct xr_driver *xr, const struct output_item *item, cairo_t *cr) { struct xr_rendering *r = NULL; if (is_text_item (item)) r = xr_rendering_create_text (xr, text_item_get_text (to_text_item (item)), cr); else if (is_message_item (item)) { const struct message_item *message_item = to_message_item (item); const struct msg *msg = message_item_get_msg (message_item); char *s = msg_to_string (msg, NULL); r = xr_rendering_create_text (xr, s, cr); free (s); } else if (is_table_item (item)) { r = xzalloc (sizeof *r); r->item = output_item_ref (item); r->xr = xr; xr_set_cairo (xr, cr); r->p = render_pager_create (xr->params, to_table_item (item)); } else if (is_chart_item (item)) { r = xzalloc (sizeof *r); r->item = output_item_ref (item); } return r; } void xr_rendering_destroy (struct xr_rendering *r) { if (r) { output_item_unref (r->item); render_pager_destroy (r->p); free (r); } } void xr_rendering_measure (struct xr_rendering *r, int *w, int *h) { if (is_table_item (r->item)) { *w = render_pager_get_size (r->p, H) / XR_POINT; *h = render_pager_get_size (r->p, V) / XR_POINT; } else { *w = CHART_WIDTH; *h = CHART_HEIGHT; } } static void xr_draw_chart (const struct chart_item *, cairo_t *, double x, double y, double width, double height); /* Draws onto CR */ void xr_rendering_draw_all (struct xr_rendering *r, cairo_t *cr) { if (is_table_item (r->item)) { struct xr_driver *xr = r->xr; xr_set_cairo (xr, cr); render_pager_draw (r->p); } else xr_draw_chart (to_chart_item (r->item), cr, 0, 0, CHART_WIDTH, CHART_HEIGHT); } static void xr_draw_chart (const struct chart_item *chart_item, cairo_t *cr, double x, double y, double width, double height) { struct xrchart_geometry geom; cairo_save (cr); cairo_translate (cr, x, y + height); cairo_scale (cr, 1.0, -1.0); xrchart_geometry_init (cr, &geom, width, height); if (is_boxplot (chart_item)) xrchart_draw_boxplot (chart_item, cr, &geom); else if (is_histogram_chart (chart_item)) xrchart_draw_histogram (chart_item, cr, &geom); else if (is_np_plot_chart (chart_item)) xrchart_draw_np_plot (chart_item, cr, &geom); else if (is_piechart (chart_item)) xrchart_draw_piechart (chart_item, cr, &geom); else if (is_barchart (chart_item)) xrchart_draw_barchart (chart_item, cr, &geom); else if (is_roc_chart (chart_item)) xrchart_draw_roc (chart_item, cr, &geom); else if (is_scree (chart_item)) xrchart_draw_scree (chart_item, cr, &geom); else if (is_spreadlevel_plot_chart (chart_item)) xrchart_draw_spreadlevel (chart_item, cr, &geom); else if (is_scatterplot_chart (chart_item)) xrchart_draw_scatterplot (chart_item, cr, &geom); else NOT_REACHED (); xrchart_geometry_free (cr, &geom); cairo_restore (cr); } char * xr_draw_png_chart (const struct chart_item *item, const char *file_name_template, int number, const struct xr_color *fg, const struct xr_color *bg ) { const int width = 640; const int length = 480; cairo_surface_t *surface; cairo_status_t status; const char *number_pos; char *file_name; cairo_t *cr; number_pos = strchr (file_name_template, '#'); if (number_pos != NULL) file_name = xasprintf ("%.*s%d%s", (int) (number_pos - file_name_template), file_name_template, number, number_pos + 1); else file_name = xstrdup (file_name_template); surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, length); cr = cairo_create (surface); cairo_set_source_rgb (cr, bg->red, bg->green, bg->blue); cairo_paint (cr); cairo_set_source_rgb (cr, fg->red, fg->green, fg->blue); xr_draw_chart (item, cr, 0.0, 0.0, width, length); status = cairo_surface_write_to_png (surface, file_name); if (status != CAIRO_STATUS_SUCCESS) msg (ME, _("error writing output file `%s': %s"), file_name, cairo_status_to_string (status)); cairo_destroy (cr); cairo_surface_destroy (surface); return file_name; } struct xr_table_state { struct xr_render_fsm fsm; struct table_item *table_item; struct render_pager *p; }; static bool xr_table_render (struct xr_render_fsm *fsm, struct xr_driver *xr) { struct xr_table_state *ts = UP_CAST (fsm, struct xr_table_state, fsm); while (render_pager_has_next (ts->p)) { int used; used = render_pager_draw_next (ts->p, xr->length - xr->y); if (!used) { assert (xr->y > 0); return true; } else xr->y += used; } return false; } static void xr_table_destroy (struct xr_render_fsm *fsm) { struct xr_table_state *ts = UP_CAST (fsm, struct xr_table_state, fsm); table_item_unref (ts->table_item); render_pager_destroy (ts->p); free (ts); } static struct xr_render_fsm * xr_render_table (struct xr_driver *xr, const struct table_item *table_item) { struct xr_table_state *ts; ts = xmalloc (sizeof *ts); ts->fsm.render = xr_table_render; ts->fsm.destroy = xr_table_destroy; ts->table_item = table_item_ref (table_item); if (xr->y > 0) xr->y += xr->char_height; ts->p = render_pager_create (xr->params, table_item); return &ts->fsm; } struct xr_chart_state { struct xr_render_fsm fsm; struct chart_item *chart_item; }; static bool xr_chart_render (struct xr_render_fsm *fsm, struct xr_driver *xr) { struct xr_chart_state *cs = UP_CAST (fsm, struct xr_chart_state, fsm); if (xr->y > 0) return true; if (xr->cairo != NULL) xr_draw_chart (cs->chart_item, xr->cairo, 0.0, 0.0, xr_to_pt (xr->width), xr_to_pt (xr->length)); xr->y = xr->length; return false; } static void xr_chart_destroy (struct xr_render_fsm *fsm) { struct xr_chart_state *cs = UP_CAST (fsm, struct xr_chart_state, fsm); chart_item_unref (cs->chart_item); free (cs); } static struct xr_render_fsm * xr_render_chart (const struct chart_item *chart_item) { struct xr_chart_state *cs; cs = xmalloc (sizeof *cs); cs->fsm.render = xr_chart_render; cs->fsm.destroy = xr_chart_destroy; cs->chart_item = chart_item_ref (chart_item); return &cs->fsm; } static bool xr_eject_render (struct xr_render_fsm *fsm UNUSED, struct xr_driver *xr) { return xr->y > 0; } static void xr_eject_destroy (struct xr_render_fsm *fsm UNUSED) { /* Nothing to do. */ } static struct xr_render_fsm * xr_render_eject (void) { static struct xr_render_fsm eject_renderer = { xr_eject_render, xr_eject_destroy }; return &eject_renderer; } static struct xr_render_fsm * xr_create_text_renderer (struct xr_driver *xr, const char *text) { struct table_item *table_item; struct xr_render_fsm *fsm; table_item = table_item_create (table_from_string (TAB_LEFT, text), NULL, NULL); fsm = xr_render_table (xr, table_item); table_item_unref (table_item); return fsm; } static struct xr_render_fsm * xr_render_text (struct xr_driver *xr, const struct text_item *text_item) { enum text_item_type type = text_item_get_type (text_item); const char *text = text_item_get_text (text_item); switch (type) { case TEXT_ITEM_TITLE: free (xr->title); xr->title = xstrdup (text); break; case TEXT_ITEM_SUBTITLE: free (xr->subtitle); xr->subtitle = xstrdup (text); break; case TEXT_ITEM_COMMAND_CLOSE: break; case TEXT_ITEM_BLANK_LINE: if (xr->y > 0) xr->y += xr->char_height; break; case TEXT_ITEM_EJECT_PAGE: if (xr->y > 0) return xr_render_eject (); break; default: return xr_create_text_renderer (xr, text); } return NULL; } static struct xr_render_fsm * xr_render_message (struct xr_driver *xr, const struct message_item *message_item) { const struct msg *msg = message_item_get_msg (message_item); struct xr_render_fsm *fsm; char *s; s = msg_to_string (msg, xr->command_name); fsm = xr_create_text_renderer (xr, s); free (s); return fsm; } static struct xr_render_fsm * xr_render_output_item (struct xr_driver *xr, const struct output_item *output_item) { if (is_table_item (output_item)) return xr_render_table (xr, to_table_item (output_item)); else if (is_chart_item (output_item)) return xr_render_chart (to_chart_item (output_item)); else if (is_text_item (output_item)) return xr_render_text (xr, to_text_item (output_item)); else if (is_message_item (output_item)) return xr_render_message (xr, to_message_item (output_item)); else return NULL; } pspp-1.0.1/src/output/table-paste.c0000644000175000017500000002177112662236235014127 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2009, 2011, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "libpspp/assertion.h" #include "libpspp/tower.h" #include "output/table-provider.h" #include "gl/minmax.h" #include "gl/xalloc.h" struct paste_subtable { struct tower_node node; struct table *table; }; static struct paste_subtable * paste_subtable_cast (struct tower_node *node) { return tower_data (node, struct paste_subtable, node); } struct table_paste { struct table table; struct tower subtables; enum table_axis orientation; }; static const struct table_class table_paste_class; static struct table_paste * table_paste_cast (const struct table *table) { assert (table->klass == &table_paste_class); return UP_CAST (table, struct table_paste, table); } static bool is_table_paste (const struct table *table, int orientation) { return (table->klass == &table_paste_class && table_paste_cast (table)->orientation == orientation); } static struct paste_subtable * paste_subtable_lookup (struct table_paste *tp, unsigned long int offset, unsigned long int *start) { return paste_subtable_cast (tower_lookup (&tp->subtables, offset, start)); } /* This must be called *before* adding TABLE to TP, otherwise the test for whether TP is empty will not have the correct effect. */ static void table_paste_increase_size (struct table_paste *tp, const struct table *table) { int o = tp->orientation; int h0, h1; tp->table.n[o] += table->n[o]; tp->table.n[!o] = MAX (tp->table.n[!o], table->n[!o]); h0 = table->h[!o][0]; h1 = table->h[!o][1]; if (tower_is_empty (&tp->subtables)) { tp->table.h[!o][0] = h0; tp->table.h[!o][1] = h1; } else { tp->table.h[!o][0] = MIN (tp->table.h[!o][0], h0); /* XXX this is not quite right */ tp->table.h[!o][1] = MIN (tp->table.h[!o][1], h1); } } static void reassess_headers (struct table_paste *tp) { int o = tp->orientation; if (tower_is_empty (&tp->subtables)) tp->table.h[o][0] = tp->table.h[o][1] = 0; else { struct paste_subtable *h0, *h1; h0 = paste_subtable_cast (tower_first (&tp->subtables)); tp->table.h[o][0] = h0->table->h[o][0]; h1 = paste_subtable_cast (tower_last (&tp->subtables)); tp->table.h[o][1] = h1->table->h[o][1]; } } static void table_paste_insert_subtable (struct table_paste *tp, struct table *table, struct tower_node *under) { struct paste_subtable *subtable; subtable = xmalloc (sizeof *subtable); table_paste_increase_size (tp, table); tower_insert (&tp->subtables, table->n[tp->orientation], &subtable->node, under); subtable->table = table; reassess_headers (tp); } /* Takes ownership of A and B and returns a table that consists of tables A and B "pasted together", that is, a table whose size is the sum of the sizes of A and B along the axis specified by ORIENTATION. A and B should have the same size along the axis opposite ORIENTATION; the handling of tables that have different sizes along that axis may vary. The rules at the seam between A and B are combined. The exact way in which they are combined is unspecified, but the method of table_rule_combine() is typical. If A or B is null, returns the other argument. */ struct table * table_paste (struct table *a, struct table *b, enum table_axis orientation) { struct table_paste *tp; /* Handle nulls. */ if (a == NULL) return b; if (b == NULL) return a; assert (a->n[!orientation] == b->n[!orientation]); /* Handle tables that know how to paste themselves. */ if (!table_is_shared (a) && !table_is_shared (b) && a != b) { if (a->klass->paste != NULL) { struct table *new = a->klass->paste (a, b, orientation); if (new != NULL) return new; } if (b->klass->paste != NULL && a->klass != b->klass) { struct table *new = b->klass->paste (a, b, orientation); if (new != NULL) return new; } } /* Create new table_paste and insert A and B into it. */ tp = xmalloc (sizeof *tp); table_init (&tp->table, &table_paste_class); tower_init (&tp->subtables); tp->orientation = orientation; table_paste_insert_subtable (tp, a, NULL); table_paste_insert_subtable (tp, b, NULL); return &tp->table; } /* Shorthand for table_paste (left, right, TABLE_HORZ). */ struct table * table_hpaste (struct table *left, struct table *right) { return table_paste (left, right, TABLE_HORZ); } /* Shorthand for table_paste (top, bottom, TABLE_VERT). */ struct table * table_vpaste (struct table *top, struct table *bottom) { return table_paste (top, bottom, TABLE_VERT); } static void table_paste_destroy (struct table *t) { struct table_paste *tp = table_paste_cast (t); struct tower_node *node, *next; for (node = tower_first (&tp->subtables); node != NULL; node = next) { struct paste_subtable *ps = paste_subtable_cast (node); table_unref (ps->table); next = tower_delete (&tp->subtables, node); free (node); } free (tp); } static void table_paste_get_cell (const struct table *t, int x, int y, struct table_cell *cell) { struct table_paste *tp = table_paste_cast (t); struct paste_subtable *ps; unsigned long int start; int d[TABLE_N_AXES]; d[TABLE_HORZ] = x; d[TABLE_VERT] = y; ps = paste_subtable_lookup (tp, d[tp->orientation], &start); d[tp->orientation] -= start; table_get_cell (ps->table, d[TABLE_HORZ], d[TABLE_VERT], cell); cell->d[tp->orientation][0] += start; cell->d[tp->orientation][1] += start; } static int table_paste_get_rule (const struct table *t, enum table_axis axis, int x, int y) { struct table_paste *tp = table_paste_cast (t); int h = tp->orientation == TABLE_HORZ ? x : y; int k = tp->orientation == TABLE_HORZ ? y : x; struct paste_subtable *ps; unsigned long int start; if (tp->orientation == axis) { int r; ps = paste_subtable_lookup (tp, h == 0 ? 0 : h - 1, &start); if (tp->orientation == TABLE_HORZ) /* XXX */ r = table_get_rule (ps->table, axis, h - start, k); else r = table_get_rule (ps->table, axis, k, h - start); if (h == start + tower_node_get_size (&ps->node)) { struct tower_node *ps2_ = tower_next (&tp->subtables, &ps->node); if (ps2_ != NULL) { struct paste_subtable *ps2 = paste_subtable_cast (ps2_); int r2; if (tp->orientation == TABLE_HORZ) /* XXX */ r2 = table_get_rule (ps2->table, axis, 0, k); else r2 = table_get_rule (ps2->table, axis, k, 0); return table_rule_combine (r, r2); } } return r; } else { ps = paste_subtable_lookup (tp, h, &start); if (tp->orientation == TABLE_HORZ) /* XXX */ return table_get_rule (ps->table, axis, h - start, k); else return table_get_rule (ps->table, axis, k, h - start); } } static struct table * table_paste_paste (struct table *a, struct table *b, enum table_axis orientation) { struct table_paste *ta, *tb; ta = is_table_paste (a, orientation) ? table_paste_cast (a) : NULL; tb = is_table_paste (b, orientation) ? table_paste_cast (b) : NULL; if (ta != NULL) { if (tb != NULL) { /* Append all of B's subtables onto A, then destroy B. */ table_paste_increase_size (ta, b); tower_splice (&ta->subtables, NULL, &tb->subtables, tower_first (&tb->subtables), NULL); table_unref (b); } else { /* Append B to A's stack of subtables. */ table_paste_insert_subtable (ta, b, NULL); } reassess_headers (ta); return a; } else if (tb != NULL) { /* Insert A at the beginning of B's stack of subtables. */ table_paste_insert_subtable (tb, a, tower_first (&tb->subtables)); reassess_headers (tb); return b; } else return NULL; } static const struct table_class table_paste_class = { table_paste_destroy, table_paste_get_cell, table_paste_get_rule, table_paste_paste, NULL, /* select */ }; pspp-1.0.1/src/output/driver.c0000644000175000017500000002462613137223525013217 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #include #include "output/driver.h" #include "output/driver-provider.h" #include #include #include #include #include #include "data/file-handle-def.h" #include "data/settings.h" #include "libpspp/array.h" #include "libpspp/assertion.h" #include "libpspp/message.h" #include "libpspp/llx.h" #include "libpspp/string-map.h" #include "libpspp/string-set.h" #include "libpspp/str.h" #include "output/message-item.h" #include "output/output-item.h" #include "output/text-item.h" #include "gl/xalloc.h" #include "gl/xmemdup0.h" #include "gettext.h" #define _(msgid) gettext (msgid) struct output_engine { struct llx_list drivers; /* Contains "struct output_driver"s. */ struct string deferred_syntax; /* TEXT_ITEM_SYNTAX being accumulated. */ }; static const struct output_driver_factory *factories[]; /* A stack of output engines.. */ static struct output_engine *engine_stack; static size_t n_stack, allocated_stack; static struct output_engine * engine_stack_top (void) { assert (n_stack > 0); return &engine_stack[n_stack - 1]; } void output_engine_push (void) { struct output_engine *e; if (n_stack >= allocated_stack) engine_stack = x2nrealloc (engine_stack, &allocated_stack, sizeof *engine_stack); e = &engine_stack[n_stack++]; llx_init (&e->drivers); ds_init_empty (&e->deferred_syntax); } void output_engine_pop (void) { struct output_engine *e; assert (n_stack > 0); e = &engine_stack[--n_stack]; while (!llx_is_empty (&e->drivers)) { struct output_driver *d = llx_pop_head (&e->drivers, &llx_malloc_mgr); output_driver_destroy (d); } ds_destroy (&e->deferred_syntax); } void output_get_supported_formats (struct string_set *formats) { const struct output_driver_factory **fp; for (fp = factories; *fp != NULL; fp++) string_set_insert (formats, (*fp)->extension); } static void output_submit__ (struct output_engine *e, struct output_item *item) { struct llx *llx, *next; for (llx = llx_head (&e->drivers); llx != llx_null (&e->drivers); llx = next) { struct output_driver *d = llx_data (llx); enum settings_output_type type; next = llx_next (llx); if (is_message_item (item)) { const struct msg *m = message_item_get_msg (to_message_item (item)); if (m->severity == MSG_S_NOTE) type = SETTINGS_OUTPUT_NOTE; else type = SETTINGS_OUTPUT_ERROR; } else if (is_text_item (item) && text_item_get_type (to_text_item (item)) == TEXT_ITEM_SYNTAX) type = SETTINGS_OUTPUT_SYNTAX; else type = SETTINGS_OUTPUT_RESULT; if (settings_get_output_routing (type) & d->device_type) d->class->submit (d, item); } output_item_unref (item); } static void flush_deferred_syntax (struct output_engine *e) { if (!ds_is_empty (&e->deferred_syntax)) { char *syntax = ds_steal_cstr (&e->deferred_syntax); output_submit__ (e, text_item_super ( text_item_create_nocopy (TEXT_ITEM_SYNTAX, syntax))); } } static bool is_syntax_item (const struct output_item *item) { return (is_text_item (item) && text_item_get_type (to_text_item (item)) == TEXT_ITEM_SYNTAX); } /* Submits ITEM to the configured output drivers, and transfers ownership to the output subsystem. */ void output_submit (struct output_item *item) { struct output_engine *e = engine_stack_top (); if (item == NULL) return; if (is_syntax_item (item)) { ds_put_cstr (&e->deferred_syntax, text_item_get_text (to_text_item (item))); output_item_unref (item); return; } flush_deferred_syntax (e); output_submit__ (e, item); } /* Flushes output to screen devices, so that the user can see output that doesn't fill up an entire page. */ void output_flush (void) { struct output_engine *e = engine_stack_top (); struct llx *llx; flush_deferred_syntax (e); for (llx = llx_head (&e->drivers); llx != llx_null (&e->drivers); llx = llx_next (llx)) { struct output_driver *d = llx_data (llx); if (d->device_type & SETTINGS_DEVICE_TERMINAL && d->class->flush != NULL) d->class->flush (d); } } void output_driver_init (struct output_driver *driver, const struct output_driver_class *class, const char *name, enum settings_output_devices type) { driver->class = class; driver->name = xstrdup (name); driver->device_type = type; } void output_driver_destroy (struct output_driver *driver) { if (driver != NULL) { char *name = driver->name; if (output_driver_is_registered (driver)) output_driver_unregister (driver); if (driver->class->destroy) driver->class->destroy (driver); free (name); } } const char * output_driver_get_name (const struct output_driver *driver) { return driver->name; } static struct output_engine * output_driver_get_engine (const struct output_driver *driver) { struct output_engine *e; for (e = engine_stack; e < &engine_stack[n_stack]; e++) if (llx_find (llx_head (&e->drivers), llx_null (&e->drivers), driver)) return e; return NULL; } void output_driver_register (struct output_driver *driver) { struct output_engine *e = engine_stack_top (); assert (!output_driver_is_registered (driver)); llx_push_tail (&e->drivers, driver, &llx_malloc_mgr); } void output_driver_unregister (struct output_driver *driver) { struct output_engine *e = output_driver_get_engine (driver); assert (e != NULL); llx_remove (llx_find (llx_head (&e->drivers), llx_null (&e->drivers), driver), &llx_malloc_mgr); } bool output_driver_is_registered (const struct output_driver *driver) { return output_driver_get_engine (driver) != NULL; } /* Useful functions for output driver implementation. */ void output_driver_track_current_command (const struct output_item *output_item, char **command_namep) { if (is_text_item (output_item)) { const struct text_item *item = to_text_item (output_item); const char *text = text_item_get_text (item); enum text_item_type type = text_item_get_type (item); if (type == TEXT_ITEM_COMMAND_OPEN) { free (*command_namep); *command_namep = xstrdup (text); } else if (type == TEXT_ITEM_COMMAND_CLOSE) { free (*command_namep); *command_namep = NULL; } } } extern const struct output_driver_factory txt_driver_factory; extern const struct output_driver_factory list_driver_factory; extern const struct output_driver_factory html_driver_factory; extern const struct output_driver_factory csv_driver_factory; #ifdef ODF_WRITE_SUPPORT extern const struct output_driver_factory odt_driver_factory; #endif #ifdef HAVE_CAIRO extern const struct output_driver_factory pdf_driver_factory; extern const struct output_driver_factory ps_driver_factory; extern const struct output_driver_factory svg_driver_factory; #endif static const struct output_driver_factory *factories[] = { &txt_driver_factory, &list_driver_factory, &html_driver_factory, &csv_driver_factory, #ifdef ODF_WRITE_SUPPORT &odt_driver_factory, #endif #ifdef HAVE_CAIRO &pdf_driver_factory, &ps_driver_factory, &svg_driver_factory, #endif NULL }; static const struct output_driver_factory * find_factory (const char *format) { const struct output_driver_factory **fp; for (fp = factories; *fp != NULL; fp++) { const struct output_driver_factory *f = *fp; if (!strcmp (f->extension, format)) return f; } return &txt_driver_factory; } static enum settings_output_devices default_device_type (const char *file_name) { return (!strcmp (file_name, "-") ? SETTINGS_DEVICE_TERMINAL : SETTINGS_DEVICE_LISTING); } struct output_driver * output_driver_create (struct string_map *options) { enum settings_output_devices device_type; const struct output_driver_factory *f; struct output_driver *driver; char *device_string; char *file_name; char *format; format = string_map_find_and_delete (options, "format"); file_name = string_map_find_and_delete (options, "output-file"); if (format == NULL) { if (file_name != NULL) { const char *extension = strrchr (file_name, '.'); format = xstrdup (extension != NULL ? extension + 1 : ""); } else format = xstrdup ("txt"); } f = find_factory (format); if (file_name == NULL) file_name = xstrdup (f->default_file_name); /* XXX should use parse_enum(). */ device_string = string_map_find_and_delete (options, "device"); if (device_string == NULL || device_string[0] == '\0') device_type = default_device_type (file_name); else if (!strcmp (device_string, "terminal")) device_type = SETTINGS_DEVICE_TERMINAL; else if (!strcmp (device_string, "listing")) device_type = SETTINGS_DEVICE_LISTING; else { msg (MW, _("%s is not a valid device type (the choices are `%s' and `%s')"), device_string, "terminal", "listing"); device_type = default_device_type (file_name); } struct file_handle *fh = fh_create_file (NULL, file_name, NULL, fh_default_properties ()); driver = f->create (fh, device_type, options); if (driver != NULL) { const struct string_map_node *node; const char *key; STRING_MAP_FOR_EACH_KEY (key, node, options) msg (MW, _("%s: unknown option `%s'"), file_name, key); } string_map_clear (options); free (file_name); free (format); free (device_string); return driver; } pspp-1.0.1/src/automake.mk0000644000175000017500000000317413143642441012351 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- # PSPP include $(top_srcdir)/src/libpspp/automake.mk include $(top_srcdir)/src/data/automake.mk AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/lib pkglib_LTLIBRARIES = src/libpspp-core.la src/libpspp.la src_libpspp_core_la_SOURCES = src_libpspp_core_la_LDFLAGS = -release $(VERSION) src_libpspp_core_la_LIBADD = \ src/data/libdata.la \ src/libpspp/liblibpspp.la \ $(LIBXML2_LIBS) $(PG_LIBS) \ gl/libgl.la src_libpspp_la_SOURCES = src_libpspp_la_CFLAGS = $(GSL_CFLAGS) src_libpspp_la_LDFLAGS = -release $(VERSION) src_libpspp_la_LIBADD = \ src/language/liblanguage.la \ src/math/libpspp-math.la \ src/output/liboutput.la \ $(GSL_LIBS) include $(top_srcdir)/src/math/automake.mk include $(top_srcdir)/src/output/automake.mk include $(top_srcdir)/src/language/automake.mk include $(top_srcdir)/src/ui/automake.mk pspp-1.0.1/gl/0000755000175000017500000000000013150620334010073 500000000000000pspp-1.0.1/gl/c-vasprintf.h0000644000175000017500000000357313124536241012434 00000000000000/* vasprintf and asprintf, in C locale. Copyright (C) 2002-2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _C_VASPRINTF_H #define _C_VASPRINTF_H /* Get va_list. */ #include /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif #ifdef __cplusplus extern "C" { #endif /* asprintf() and vasprintf(), but formatting takes place in the C locale, that is, the decimal point used in floating-point formatting directives is always '.'. */ int c_asprintf (char **resultp, const char *format, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3)); int c_vasprintf (char **resultp, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT ((__printf__, 2, 0)); #ifdef __cplusplus } #endif #endif /* _C_VASPRINTF_H */ pspp-1.0.1/gl/xmemdup0.c0000644000175000017500000000320213124536243011721 00000000000000/* xmemdup0.c -- copy a block of arbitrary bytes, plus a trailing NUL Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include "xmemdup0.h" #include "xalloc.h" #include /* Clone an arbitrary block of bytes P of size S, with error checking, and include a terminating NUL byte. P is of type 'void const *', to make it easier to use this with other mem* functions that return 'void *', but since appending a NUL byte only makes sense on bytes, the return type is 'char *'. The terminating NUL makes it safe to use strlen or rawmemchr to check for embedded NUL; it also speeds up algorithms such as escape sequence processing on arbitrary memory, by making it always safe to read the byte after the escape character rather than having to check if each escape character is the last byte in the object. */ char * xmemdup0 (void const *p, size_t s) { char *result = xcharalloc (s + 1); memcpy (result, p, s); result[s] = 0; return result; } pspp-1.0.1/gl/gl_xlist.h0000644000175000017500000001374713124536242012032 00000000000000/* Abstract sequential list data type, with out-of-memory checking. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #ifndef _GL_XLIST_H #define _GL_XLIST_H #include "gl_list.h" #include "xalloc.h" #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef GL_XLIST_INLINE # define GL_XLIST_INLINE _GL_INLINE #endif #ifdef __cplusplus extern "C" { #endif /* These functions are thin wrappers around the corresponding functions with _nx_ infix from gl_list.h. Upon out-of-memory, they invoke xalloc_die (), instead of returning an error indicator. */ #if 0 /* These are defined inline below. */ extern gl_list_t gl_list_create_empty (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates); extern gl_list_t gl_list_create (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates, size_t count, const void **contents); extern void gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt); extern gl_list_node_t gl_list_set_at (gl_list_t list, size_t position, const void *elt); extern gl_list_node_t gl_list_add_first (gl_list_t list, const void *elt); extern gl_list_node_t gl_list_add_last (gl_list_t list, const void *elt); extern gl_list_node_t gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt); extern gl_list_node_t gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt); extern gl_list_node_t gl_list_add_at (gl_list_t list, size_t position, const void *elt); extern gl_list_node_t gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt); #endif GL_XLIST_INLINE gl_list_t gl_list_create_empty (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates) { gl_list_t result = gl_list_nx_create_empty (implementation, equals_fn, hashcode_fn, dispose_fn, allow_duplicates); if (result == NULL) xalloc_die (); return result; } GL_XLIST_INLINE gl_list_t gl_list_create (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates, size_t count, const void **contents) { gl_list_t result = gl_list_nx_create (implementation, equals_fn, hashcode_fn, dispose_fn, allow_duplicates, count, contents); if (result == NULL) xalloc_die (); return result; } GL_XLIST_INLINE void gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt) { int result = gl_list_node_nx_set_value (list, node, elt); if (result < 0) xalloc_die (); } GL_XLIST_INLINE gl_list_node_t gl_list_set_at (gl_list_t list, size_t position, const void *elt) { gl_list_node_t result = gl_list_nx_set_at (list, position, elt); if (result == NULL) xalloc_die (); return result; } GL_XLIST_INLINE gl_list_node_t gl_list_add_first (gl_list_t list, const void *elt) { gl_list_node_t result = gl_list_nx_add_first (list, elt); if (result == NULL) xalloc_die (); return result; } GL_XLIST_INLINE gl_list_node_t gl_list_add_last (gl_list_t list, const void *elt) { gl_list_node_t result = gl_list_nx_add_last (list, elt); if (result == NULL) xalloc_die (); return result; } GL_XLIST_INLINE gl_list_node_t gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt) { gl_list_node_t result = gl_list_nx_add_before (list, node, elt); if (result == NULL) xalloc_die (); return result; } GL_XLIST_INLINE gl_list_node_t gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt) { gl_list_node_t result = gl_list_nx_add_after (list, node, elt); if (result == NULL) xalloc_die (); return result; } GL_XLIST_INLINE gl_list_node_t gl_list_add_at (gl_list_t list, size_t position, const void *elt) { gl_list_node_t result = gl_list_nx_add_at (list, position, elt); if (result == NULL) xalloc_die (); return result; } GL_XLIST_INLINE gl_list_node_t gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { gl_list_node_t result = gl_sortedlist_nx_add (list, compar, elt); if (result == NULL) xalloc_die (); return result; } #ifdef __cplusplus } #endif _GL_INLINE_HEADER_END #endif /* _GL_XLIST_H */ pspp-1.0.1/gl/rmdir.c0000644000175000017500000000303413124536243011302 00000000000000/* Work around rmdir bugs. Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include #include #include #include "dosname.h" #undef rmdir /* Remove directory DIR. Return 0 if successful, -1 if not. */ int rpl_rmdir (char const *dir) { /* Work around cygwin 1.5.x bug where rmdir("dir/./") succeeds. */ size_t len = strlen (dir); int result; while (len && ISSLASH (dir[len - 1])) len--; if (len && dir[len - 1] == '.' && (1 == len || ISSLASH (dir[len - 2]))) { errno = EINVAL; return -1; } result = rmdir (dir); /* Work around mingw bug, where rmdir("file/") fails with EINVAL instead of ENOTDIR. We've already filtered out trailing ., the only reason allowed by POSIX for EINVAL. */ if (result == -1 && errno == EINVAL) errno = ENOTDIR; return result; } pspp-1.0.1/gl/fprintf.c0000644000175000017500000000336413124536241011641 00000000000000/* Formatted output to a stream. Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include #include #include #include #include #include "fseterr.h" #include "vasnprintf.h" /* Print formatted output to the stream FP. Return string length of formatted string. On error, return a negative value. */ int fprintf (FILE *fp, const char *format, ...) { char buf[2000]; char *output; size_t len; size_t lenbuf = sizeof (buf); va_list args; va_start (args, format); output = vasnprintf (buf, &lenbuf, format, args); len = lenbuf; va_end (args); if (!output) { fseterr (fp); return -1; } if (fwrite (output, 1, len, fp) < len) { if (output != buf) { int saved_errno = errno; free (output); errno = saved_errno; } return -1; } if (output != buf) free (output); if (len > INT_MAX) { errno = EOVERFLOW; fseterr (fp); return -1; } return len; } pspp-1.0.1/gl/unictype.in.h0000644000175000017500000012044113124536243012441 00000000000000/* Unicode character classification and properties. Copyright (C) 2002, 2005-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _UNICTYPE_H #define _UNICTYPE_H #include "unitypes.h" /* Get bool. */ #include /* Get size_t. */ #include #ifdef __cplusplus extern "C" { #endif /* ========================================================================= */ /* Field 1 of Unicode Character Database: Character name. See "uniname.h". */ /* ========================================================================= */ /* Field 2 of Unicode Character Database: General category. */ /* Data type denoting a General category value. This is not just a bitmask, but rather a bitmask and a pointer to the lookup table, so that programs that use only the predefined bitmasks (i.e. don't combine bitmasks with & and |) don't have a link-time dependency towards the big general table. */ typedef struct { uint32_t bitmask : 31; /*bool*/ unsigned int generic : 1; union { const void *table; /* when generic is 0 */ bool (*lookup_fn) (ucs4_t uc, uint32_t bitmask); /* when generic is 1 */ } lookup; } uc_general_category_t; /* Bits and bit masks denoting General category values. UnicodeData-3.2.0.html says a 32-bit integer will always suffice to represent them. These bit masks can only be used with the uc_is_general_category_withtable function. */ enum { UC_CATEGORY_MASK_L = 0x0000001f, UC_CATEGORY_MASK_LC = 0x00000007, UC_CATEGORY_MASK_Lu = 0x00000001, UC_CATEGORY_MASK_Ll = 0x00000002, UC_CATEGORY_MASK_Lt = 0x00000004, UC_CATEGORY_MASK_Lm = 0x00000008, UC_CATEGORY_MASK_Lo = 0x00000010, UC_CATEGORY_MASK_M = 0x000000e0, UC_CATEGORY_MASK_Mn = 0x00000020, UC_CATEGORY_MASK_Mc = 0x00000040, UC_CATEGORY_MASK_Me = 0x00000080, UC_CATEGORY_MASK_N = 0x00000700, UC_CATEGORY_MASK_Nd = 0x00000100, UC_CATEGORY_MASK_Nl = 0x00000200, UC_CATEGORY_MASK_No = 0x00000400, UC_CATEGORY_MASK_P = 0x0003f800, UC_CATEGORY_MASK_Pc = 0x00000800, UC_CATEGORY_MASK_Pd = 0x00001000, UC_CATEGORY_MASK_Ps = 0x00002000, UC_CATEGORY_MASK_Pe = 0x00004000, UC_CATEGORY_MASK_Pi = 0x00008000, UC_CATEGORY_MASK_Pf = 0x00010000, UC_CATEGORY_MASK_Po = 0x00020000, UC_CATEGORY_MASK_S = 0x003c0000, UC_CATEGORY_MASK_Sm = 0x00040000, UC_CATEGORY_MASK_Sc = 0x00080000, UC_CATEGORY_MASK_Sk = 0x00100000, UC_CATEGORY_MASK_So = 0x00200000, UC_CATEGORY_MASK_Z = 0x01c00000, UC_CATEGORY_MASK_Zs = 0x00400000, UC_CATEGORY_MASK_Zl = 0x00800000, UC_CATEGORY_MASK_Zp = 0x01000000, UC_CATEGORY_MASK_C = 0x3e000000, UC_CATEGORY_MASK_Cc = 0x02000000, UC_CATEGORY_MASK_Cf = 0x04000000, UC_CATEGORY_MASK_Cs = 0x08000000, UC_CATEGORY_MASK_Co = 0x10000000, UC_CATEGORY_MASK_Cn = 0x20000000 }; /* Predefined General category values. */ extern const uc_general_category_t UC_CATEGORY_L; extern const uc_general_category_t UC_CATEGORY_LC; extern const uc_general_category_t UC_CATEGORY_Lu; extern const uc_general_category_t UC_CATEGORY_Ll; extern const uc_general_category_t UC_CATEGORY_Lt; extern const uc_general_category_t UC_CATEGORY_Lm; extern const uc_general_category_t UC_CATEGORY_Lo; extern const uc_general_category_t UC_CATEGORY_M; extern const uc_general_category_t UC_CATEGORY_Mn; extern const uc_general_category_t UC_CATEGORY_Mc; extern const uc_general_category_t UC_CATEGORY_Me; extern const uc_general_category_t UC_CATEGORY_N; extern const uc_general_category_t UC_CATEGORY_Nd; extern const uc_general_category_t UC_CATEGORY_Nl; extern const uc_general_category_t UC_CATEGORY_No; extern const uc_general_category_t UC_CATEGORY_P; extern const uc_general_category_t UC_CATEGORY_Pc; extern const uc_general_category_t UC_CATEGORY_Pd; extern const uc_general_category_t UC_CATEGORY_Ps; extern const uc_general_category_t UC_CATEGORY_Pe; extern const uc_general_category_t UC_CATEGORY_Pi; extern const uc_general_category_t UC_CATEGORY_Pf; extern const uc_general_category_t UC_CATEGORY_Po; extern const uc_general_category_t UC_CATEGORY_S; extern const uc_general_category_t UC_CATEGORY_Sm; extern const uc_general_category_t UC_CATEGORY_Sc; extern const uc_general_category_t UC_CATEGORY_Sk; extern const uc_general_category_t UC_CATEGORY_So; extern const uc_general_category_t UC_CATEGORY_Z; extern const uc_general_category_t UC_CATEGORY_Zs; extern const uc_general_category_t UC_CATEGORY_Zl; extern const uc_general_category_t UC_CATEGORY_Zp; extern const uc_general_category_t UC_CATEGORY_C; extern const uc_general_category_t UC_CATEGORY_Cc; extern const uc_general_category_t UC_CATEGORY_Cf; extern const uc_general_category_t UC_CATEGORY_Cs; extern const uc_general_category_t UC_CATEGORY_Co; extern const uc_general_category_t UC_CATEGORY_Cn; /* Non-public. */ extern const uc_general_category_t _UC_CATEGORY_NONE; /* Alias names for predefined General category values. */ #define UC_LETTER UC_CATEGORY_L #define UC_CASED_LETTER UC_CATEGORY_LC #define UC_UPPERCASE_LETTER UC_CATEGORY_Lu #define UC_LOWERCASE_LETTER UC_CATEGORY_Ll #define UC_TITLECASE_LETTER UC_CATEGORY_Lt #define UC_MODIFIER_LETTER UC_CATEGORY_Lm #define UC_OTHER_LETTER UC_CATEGORY_Lo #define UC_MARK UC_CATEGORY_M #define UC_NON_SPACING_MARK UC_CATEGORY_Mn #define UC_COMBINING_SPACING_MARK UC_CATEGORY_Mc #define UC_ENCLOSING_MARK UC_CATEGORY_Me #define UC_NUMBER UC_CATEGORY_N #define UC_DECIMAL_DIGIT_NUMBER UC_CATEGORY_Nd #define UC_LETTER_NUMBER UC_CATEGORY_Nl #define UC_OTHER_NUMBER UC_CATEGORY_No #define UC_PUNCTUATION UC_CATEGORY_P #define UC_CONNECTOR_PUNCTUATION UC_CATEGORY_Pc #define UC_DASH_PUNCTUATION UC_CATEGORY_Pd #define UC_OPEN_PUNCTUATION UC_CATEGORY_Ps /* a.k.a. UC_START_PUNCTUATION */ #define UC_CLOSE_PUNCTUATION UC_CATEGORY_Pe /* a.k.a. UC_END_PUNCTUATION */ #define UC_INITIAL_QUOTE_PUNCTUATION UC_CATEGORY_Pi #define UC_FINAL_QUOTE_PUNCTUATION UC_CATEGORY_Pf #define UC_OTHER_PUNCTUATION UC_CATEGORY_Po #define UC_SYMBOL UC_CATEGORY_S #define UC_MATH_SYMBOL UC_CATEGORY_Sm #define UC_CURRENCY_SYMBOL UC_CATEGORY_Sc #define UC_MODIFIER_SYMBOL UC_CATEGORY_Sk #define UC_OTHER_SYMBOL UC_CATEGORY_So #define UC_SEPARATOR UC_CATEGORY_Z #define UC_SPACE_SEPARATOR UC_CATEGORY_Zs #define UC_LINE_SEPARATOR UC_CATEGORY_Zl #define UC_PARAGRAPH_SEPARATOR UC_CATEGORY_Zp #define UC_OTHER UC_CATEGORY_C #define UC_CONTROL UC_CATEGORY_Cc #define UC_FORMAT UC_CATEGORY_Cf #define UC_SURROGATE UC_CATEGORY_Cs /* all of them are invalid characters */ #define UC_PRIVATE_USE UC_CATEGORY_Co #define UC_UNASSIGNED UC_CATEGORY_Cn /* some of them are invalid characters */ /* Return the union of two general categories. This corresponds to the unions of the two sets of characters. */ extern uc_general_category_t uc_general_category_or (uc_general_category_t category1, uc_general_category_t category2); /* Return the intersection of two general categories as bit masks. This *does*not* correspond to the intersection of the two sets of characters. */ extern uc_general_category_t uc_general_category_and (uc_general_category_t category1, uc_general_category_t category2); /* Return the intersection of a general category with the complement of a second general category, as bit masks. This *does*not* correspond to the intersection with complement, when viewing the categories as sets of characters. */ extern uc_general_category_t uc_general_category_and_not (uc_general_category_t category1, uc_general_category_t category2); /* Return the name of a general category. */ extern const char * uc_general_category_name (uc_general_category_t category) _UC_ATTRIBUTE_PURE; /* Return the long name of a general category. */ extern const char * uc_general_category_long_name (uc_general_category_t category) _UC_ATTRIBUTE_PURE; /* Return the general category given by name, e.g. "Lu", or by long name, e.g. "Uppercase Letter". */ extern uc_general_category_t uc_general_category_byname (const char *category_name) _UC_ATTRIBUTE_PURE; /* Return the general category of a Unicode character. */ extern uc_general_category_t uc_general_category (ucs4_t uc) _UC_ATTRIBUTE_PURE; /* Test whether a Unicode character belongs to a given category. The CATEGORY argument can be the combination of several predefined general categories. */ extern bool uc_is_general_category (ucs4_t uc, uc_general_category_t category) _UC_ATTRIBUTE_PURE; /* Likewise. This function uses a big table comprising all categories. */ extern bool uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Field 3 of Unicode Character Database: Canonical combining class. */ /* The possible results of uc_combining_class (0..255) are described in UCD.html. The list here is not definitive; more values can be added in future versions. */ enum { UC_CCC_NR = 0, /* Not Reordered */ UC_CCC_OV = 1, /* Overlay */ UC_CCC_NK = 7, /* Nukta */ UC_CCC_KV = 8, /* Kana Voicing */ UC_CCC_VR = 9, /* Virama */ UC_CCC_ATBL = 200, /* Attached Below Left */ UC_CCC_ATB = 202, /* Attached Below */ UC_CCC_ATA = 214, /* Attached Above */ UC_CCC_ATAR = 216, /* Attached Above Right */ UC_CCC_BL = 218, /* Below Left */ UC_CCC_B = 220, /* Below */ UC_CCC_BR = 222, /* Below Right */ UC_CCC_L = 224, /* Left */ UC_CCC_R = 226, /* Right */ UC_CCC_AL = 228, /* Above Left */ UC_CCC_A = 230, /* Above */ UC_CCC_AR = 232, /* Above Right */ UC_CCC_DB = 233, /* Double Below */ UC_CCC_DA = 234, /* Double Above */ UC_CCC_IS = 240 /* Iota Subscript */ }; /* Return the canonical combining class of a Unicode character. */ extern int uc_combining_class (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Return the name of a canonical combining class. */ extern const char * uc_combining_class_name (int ccc) _UC_ATTRIBUTE_CONST; /* Return the long name of a canonical combining class. */ extern const char * uc_combining_class_long_name (int ccc) _UC_ATTRIBUTE_CONST; /* Return the canonical combining class given by name, e.g. "BL", or by long name, e.g. "Below Left". */ extern int uc_combining_class_byname (const char *ccc_name) _UC_ATTRIBUTE_PURE; /* ========================================================================= */ /* Field 4 of Unicode Character Database: Bidi class. Before Unicode 4.0, this field was called "Bidirectional category". */ enum { UC_BIDI_L, /* Left-to-Right */ UC_BIDI_LRE, /* Left-to-Right Embedding */ UC_BIDI_LRO, /* Left-to-Right Override */ UC_BIDI_R, /* Right-to-Left */ UC_BIDI_AL, /* Right-to-Left Arabic */ UC_BIDI_RLE, /* Right-to-Left Embedding */ UC_BIDI_RLO, /* Right-to-Left Override */ UC_BIDI_PDF, /* Pop Directional Format */ UC_BIDI_EN, /* European Number */ UC_BIDI_ES, /* European Number Separator */ UC_BIDI_ET, /* European Number Terminator */ UC_BIDI_AN, /* Arabic Number */ UC_BIDI_CS, /* Common Number Separator */ UC_BIDI_NSM, /* Non-Spacing Mark */ UC_BIDI_BN, /* Boundary Neutral */ UC_BIDI_B, /* Paragraph Separator */ UC_BIDI_S, /* Segment Separator */ UC_BIDI_WS, /* Whitespace */ UC_BIDI_ON, /* Other Neutral */ UC_BIDI_LRI, /* Left-to-Right Isolate */ UC_BIDI_RLI, /* Right-to-Left Isolate */ UC_BIDI_FSI, /* First Strong Isolate */ UC_BIDI_PDI /* Pop Directional Isolate */ }; /* Return the name of a bidi class. */ extern const char * uc_bidi_class_name (int bidi_class) _UC_ATTRIBUTE_CONST; /* Same; obsolete function name. */ extern const char * uc_bidi_category_name (int category) _UC_ATTRIBUTE_CONST; /* Return the long name of a bidi class. */ extern const char * uc_bidi_class_long_name (int bidi_class) _UC_ATTRIBUTE_CONST; /* Return the bidi class given by name, e.g. "LRE", or by long name, e.g. "Left-to-Right Embedding". */ extern int uc_bidi_class_byname (const char *bidi_class_name) _UC_ATTRIBUTE_PURE; /* Same; obsolete function name. */ extern int uc_bidi_category_byname (const char *category_name) _UC_ATTRIBUTE_PURE; /* Return the bidi class of a Unicode character. */ extern int uc_bidi_class (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Same; obsolete function name. */ extern int uc_bidi_category (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test whether a Unicode character belongs to a given bidi class. */ extern bool uc_is_bidi_class (ucs4_t uc, int bidi_class) _UC_ATTRIBUTE_CONST; /* Same; obsolete function name. */ extern bool uc_is_bidi_category (ucs4_t uc, int category) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Field 5 of Unicode Character Database: Character decomposition mapping. See "uninorm.h". */ /* ========================================================================= */ /* Field 6 of Unicode Character Database: Decimal digit value. */ /* Return the decimal digit value of a Unicode character. */ extern int uc_decimal_value (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Field 7 of Unicode Character Database: Digit value. */ /* Return the digit value of a Unicode character. */ extern int uc_digit_value (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Field 8 of Unicode Character Database: Numeric value. */ /* Return the numeric value of a Unicode character. */ typedef struct { int numerator; int denominator; } uc_fraction_t; extern uc_fraction_t uc_numeric_value (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Field 9 of Unicode Character Database: Mirrored. */ /* Return the mirrored character of a Unicode character UC in *PUC. */ extern bool uc_mirror_char (ucs4_t uc, ucs4_t *puc); /* ========================================================================= */ /* Field 10 of Unicode Character Database: Unicode 1.0 Name. Not available in this library. */ /* ========================================================================= */ /* Field 11 of Unicode Character Database: ISO 10646 comment. Not available in this library. */ /* ========================================================================= */ /* Field 12, 13, 14 of Unicode Character Database: Uppercase mapping, lowercase mapping, titlecase mapping. See "unicase.h". */ /* ========================================================================= */ /* Field 2 of the file ArabicShaping.txt in the Unicode Character Database. */ /* Possible joining types. */ enum { UC_JOINING_TYPE_U, /* Non_Joining */ UC_JOINING_TYPE_T, /* Transparent */ UC_JOINING_TYPE_C, /* Join_Causing */ UC_JOINING_TYPE_L, /* Left_Joining */ UC_JOINING_TYPE_R, /* Right_Joining */ UC_JOINING_TYPE_D /* Dual_Joining */ }; /* Return the name of a joining type. */ extern const char * uc_joining_type_name (int joining_type) _UC_ATTRIBUTE_CONST; /* Return the long name of a joining type. */ extern const char * uc_joining_type_long_name (int joining_type) _UC_ATTRIBUTE_CONST; /* Return the joining type given by name, e.g. "D", or by long name, e.g. "Dual Joining". */ extern int uc_joining_type_byname (const char *joining_type_name) _UC_ATTRIBUTE_PURE; /* Return the joining type of a Unicode character. */ extern int uc_joining_type (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Field 3 of the file ArabicShaping.txt in the Unicode Character Database. */ /* Possible joining groups. This enumeration may be extended in the future. */ enum { UC_JOINING_GROUP_NONE, /* No_Joining_Group */ UC_JOINING_GROUP_AIN, /* Ain */ UC_JOINING_GROUP_ALAPH, /* Alaph */ UC_JOINING_GROUP_ALEF, /* Alef */ UC_JOINING_GROUP_BEH, /* Beh */ UC_JOINING_GROUP_BETH, /* Beth */ UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */ UC_JOINING_GROUP_DAL, /* Dal */ UC_JOINING_GROUP_DALATH_RISH, /* Dalath_Rish */ UC_JOINING_GROUP_E, /* E */ UC_JOINING_GROUP_FARSI_YEH, /* Farsi_Yeh */ UC_JOINING_GROUP_FE, /* Fe */ UC_JOINING_GROUP_FEH, /* Feh */ UC_JOINING_GROUP_FINAL_SEMKATH, /* Final_Semkath */ UC_JOINING_GROUP_GAF, /* Gaf */ UC_JOINING_GROUP_GAMAL, /* Gamal */ UC_JOINING_GROUP_HAH, /* Hah */ UC_JOINING_GROUP_HE, /* He */ UC_JOINING_GROUP_HEH, /* Heh */ UC_JOINING_GROUP_HEH_GOAL, /* Heh_Goal */ UC_JOINING_GROUP_HETH, /* Heth */ UC_JOINING_GROUP_KAF, /* Kaf */ UC_JOINING_GROUP_KAPH, /* Kaph */ UC_JOINING_GROUP_KHAPH, /* Khaph */ UC_JOINING_GROUP_KNOTTED_HEH, /* Knotted_Heh */ UC_JOINING_GROUP_LAM, /* Lam */ UC_JOINING_GROUP_LAMADH, /* Lamadh */ UC_JOINING_GROUP_MEEM, /* Meem */ UC_JOINING_GROUP_MIM, /* Mim */ UC_JOINING_GROUP_NOON, /* Noon */ UC_JOINING_GROUP_NUN, /* Nun */ UC_JOINING_GROUP_NYA, /* Nya */ UC_JOINING_GROUP_PE, /* Pe */ UC_JOINING_GROUP_QAF, /* Qaf */ UC_JOINING_GROUP_QAPH, /* Qaph */ UC_JOINING_GROUP_REH, /* Reh */ UC_JOINING_GROUP_REVERSED_PE, /* Reversed_Pe */ UC_JOINING_GROUP_SAD, /* Sad */ UC_JOINING_GROUP_SADHE, /* Sadhe */ UC_JOINING_GROUP_SEEN, /* Seen */ UC_JOINING_GROUP_SEMKATH, /* Semkath */ UC_JOINING_GROUP_SHIN, /* Shin */ UC_JOINING_GROUP_SWASH_KAF, /* Swash_Kaf */ UC_JOINING_GROUP_SYRIAC_WAW, /* Syriac_Waw */ UC_JOINING_GROUP_TAH, /* Tah */ UC_JOINING_GROUP_TAW, /* Taw */ UC_JOINING_GROUP_TEH_MARBUTA, /* Teh_Marbuta */ UC_JOINING_GROUP_TEH_MARBUTA_GOAL, /* Teh_Marbuta_Goal */ UC_JOINING_GROUP_TETH, /* Teth */ UC_JOINING_GROUP_WAW, /* Waw */ UC_JOINING_GROUP_YEH, /* Yeh */ UC_JOINING_GROUP_YEH_BARREE, /* Yeh_Barree */ UC_JOINING_GROUP_YEH_WITH_TAIL, /* Yeh_With_Tail */ UC_JOINING_GROUP_YUDH, /* Yudh */ UC_JOINING_GROUP_YUDH_HE, /* Yudh_He */ UC_JOINING_GROUP_ZAIN, /* Zain */ UC_JOINING_GROUP_ZHAIN, /* Zhain */ UC_JOINING_GROUP_ROHINGYA_YEH, /* Rohingya_Yeh */ UC_JOINING_GROUP_STRAIGHT_WAW, /* Straight_Waw */ UC_JOINING_GROUP_MANICHAEAN_ALEPH, /* Manichaean_Aleph */ UC_JOINING_GROUP_MANICHAEAN_BETH, /* Manichaean_Beth */ UC_JOINING_GROUP_MANICHAEAN_GIMEL, /* Manichaean_Gimel */ UC_JOINING_GROUP_MANICHAEAN_DALETH, /* Manichaean_Daleth */ UC_JOINING_GROUP_MANICHAEAN_WAW, /* Manichaean_Waw */ UC_JOINING_GROUP_MANICHAEAN_ZAYIN, /* Manichaean_Zayin */ UC_JOINING_GROUP_MANICHAEAN_HETH, /* Manichaean_Heth */ UC_JOINING_GROUP_MANICHAEAN_TETH, /* Manichaean_Teth */ UC_JOINING_GROUP_MANICHAEAN_YODH, /* Manichaean_Yodh */ UC_JOINING_GROUP_MANICHAEAN_KAPH, /* Manichaean_Kaph */ UC_JOINING_GROUP_MANICHAEAN_LAMEDH, /* Manichaean_Lamedh */ UC_JOINING_GROUP_MANICHAEAN_DHAMEDH, /* Manichaean_Dhamedh */ UC_JOINING_GROUP_MANICHAEAN_THAMEDH, /* Manichaean_Thamedh */ UC_JOINING_GROUP_MANICHAEAN_MEM, /* Manichaean_Mem */ UC_JOINING_GROUP_MANICHAEAN_NUN, /* Manichaean_Nun */ UC_JOINING_GROUP_MANICHAEAN_SAMEKH, /* Manichaean_Aleph */ UC_JOINING_GROUP_MANICHAEAN_AYIN, /* Manichaean_Ayin */ UC_JOINING_GROUP_MANICHAEAN_PE, /* Manichaean_Pe */ UC_JOINING_GROUP_MANICHAEAN_SADHE, /* Manichaean_Sadhe */ UC_JOINING_GROUP_MANICHAEAN_QOPH, /* Manichaean_Qoph */ UC_JOINING_GROUP_MANICHAEAN_RESH, /* Manichaean_Resh */ UC_JOINING_GROUP_MANICHAEAN_TAW, /* Manichaean_Taw */ UC_JOINING_GROUP_MANICHAEAN_ONE, /* Manichaean_One */ UC_JOINING_GROUP_MANICHAEAN_FIVE, /* Manichaean_Five */ UC_JOINING_GROUP_MANICHAEAN_TEN, /* Manichaean_Ten */ UC_JOINING_GROUP_MANICHAEAN_TWENTY, /* Manichaean_Twenty */ UC_JOINING_GROUP_MANICHAEAN_HUNDRED /* Manichaean_Hundred */ }; /* Return the name of a joining group. */ extern const char * uc_joining_group_name (int joining_group) _UC_ATTRIBUTE_CONST; /* Return the joining group given by name, e.g. "Teh_Marbuta". */ extern int uc_joining_group_byname (const char *joining_group_name) _UC_ATTRIBUTE_PURE; /* Return the joining group of a Unicode character. */ extern int uc_joining_group (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Common API for properties. */ /* Data type denoting a property. This is not just a number, but rather a pointer to the test functions, so that programs that use only few of the properties don't have a link-time dependency towards all the tables. */ typedef struct { bool (*test_fn) (ucs4_t uc); } uc_property_t; /* Predefined properties. */ /* General. */ extern const uc_property_t UC_PROPERTY_WHITE_SPACE; extern const uc_property_t UC_PROPERTY_ALPHABETIC; extern const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC; extern const uc_property_t UC_PROPERTY_NOT_A_CHARACTER; extern const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT; extern const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; extern const uc_property_t UC_PROPERTY_DEPRECATED; extern const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION; extern const uc_property_t UC_PROPERTY_VARIATION_SELECTOR; extern const uc_property_t UC_PROPERTY_PRIVATE_USE; extern const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE; /* Case. */ extern const uc_property_t UC_PROPERTY_UPPERCASE; extern const uc_property_t UC_PROPERTY_OTHER_UPPERCASE; extern const uc_property_t UC_PROPERTY_LOWERCASE; extern const uc_property_t UC_PROPERTY_OTHER_LOWERCASE; extern const uc_property_t UC_PROPERTY_TITLECASE; extern const uc_property_t UC_PROPERTY_CASED; extern const uc_property_t UC_PROPERTY_CASE_IGNORABLE; extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED; extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED; extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED; extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED; extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED; extern const uc_property_t UC_PROPERTY_SOFT_DOTTED; /* Identifiers. */ extern const uc_property_t UC_PROPERTY_ID_START; extern const uc_property_t UC_PROPERTY_OTHER_ID_START; extern const uc_property_t UC_PROPERTY_ID_CONTINUE; extern const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE; extern const uc_property_t UC_PROPERTY_XID_START; extern const uc_property_t UC_PROPERTY_XID_CONTINUE; extern const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE; extern const uc_property_t UC_PROPERTY_PATTERN_SYNTAX; /* Shaping and rendering. */ extern const uc_property_t UC_PROPERTY_JOIN_CONTROL; extern const uc_property_t UC_PROPERTY_GRAPHEME_BASE; extern const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND; extern const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND; extern const uc_property_t UC_PROPERTY_GRAPHEME_LINK; /* Bidi. */ extern const uc_property_t UC_PROPERTY_BIDI_CONTROL; extern const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT; extern const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT; extern const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT; extern const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT; extern const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR; extern const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR; extern const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT; extern const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR; extern const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR; extern const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR; extern const uc_property_t UC_PROPERTY_BIDI_WHITESPACE; extern const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK; extern const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL; extern const uc_property_t UC_PROPERTY_BIDI_PDF; extern const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE; extern const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL; /* Numeric. */ extern const uc_property_t UC_PROPERTY_HEX_DIGIT; extern const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT; /* CJK. */ extern const uc_property_t UC_PROPERTY_IDEOGRAPHIC; extern const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH; extern const uc_property_t UC_PROPERTY_RADICAL; extern const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR; extern const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR; /* Misc. */ extern const uc_property_t UC_PROPERTY_ZERO_WIDTH; extern const uc_property_t UC_PROPERTY_SPACE; extern const uc_property_t UC_PROPERTY_NON_BREAK; extern const uc_property_t UC_PROPERTY_ISO_CONTROL; extern const uc_property_t UC_PROPERTY_FORMAT_CONTROL; extern const uc_property_t UC_PROPERTY_DASH; extern const uc_property_t UC_PROPERTY_HYPHEN; extern const uc_property_t UC_PROPERTY_PUNCTUATION; extern const uc_property_t UC_PROPERTY_LINE_SEPARATOR; extern const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR; extern const uc_property_t UC_PROPERTY_QUOTATION_MARK; extern const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL; extern const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION; extern const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL; extern const uc_property_t UC_PROPERTY_MATH; extern const uc_property_t UC_PROPERTY_OTHER_MATH; extern const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION; extern const uc_property_t UC_PROPERTY_LEFT_OF_PAIR; extern const uc_property_t UC_PROPERTY_COMBINING; extern const uc_property_t UC_PROPERTY_COMPOSITE; extern const uc_property_t UC_PROPERTY_DECIMAL_DIGIT; extern const uc_property_t UC_PROPERTY_NUMERIC; extern const uc_property_t UC_PROPERTY_DIACRITIC; extern const uc_property_t UC_PROPERTY_EXTENDER; extern const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL; /* Return the property given by name, e.g. "White space". */ extern uc_property_t uc_property_byname (const char *property_name); /* Test whether a property is valid. */ #define uc_property_is_valid(property) ((property).test_fn != NULL) /* Test whether a Unicode character has a given property. */ extern bool uc_is_property (ucs4_t uc, uc_property_t property); extern bool uc_is_property_white_space (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_alphabetic (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_other_alphabetic (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_not_a_character (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_deprecated (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_logical_order_exception (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_variation_selector (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_private_use (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_unassigned_code_value (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_uppercase (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_other_uppercase (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_lowercase (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_other_lowercase (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_titlecase (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_cased (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_case_ignorable (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_changes_when_lowercased (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_changes_when_uppercased (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_changes_when_titlecased (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_changes_when_casefolded (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_changes_when_casemapped (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_soft_dotted (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_id_start (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_other_id_start (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_id_continue (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_other_id_continue (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_xid_start (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_xid_continue (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_pattern_white_space (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_pattern_syntax (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_join_control (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_grapheme_base (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_grapheme_extend (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_other_grapheme_extend (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_grapheme_link (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_control (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_left_to_right (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_european_digit (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_common_separator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_block_separator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_segment_separator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_whitespace (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_pdf (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_bidi_other_neutral (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_hex_digit (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_ascii_hex_digit (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_ideographic (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_unified_ideograph (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_radical (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_ids_binary_operator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_ids_trinary_operator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_zero_width (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_space (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_non_break (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_iso_control (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_format_control (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_dash (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_hyphen (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_punctuation (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_line_separator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_paragraph_separator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_quotation_mark (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_sentence_terminal (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_terminal_punctuation (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_currency_symbol (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_math (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_other_math (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_paired_punctuation (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_left_of_pair (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_combining (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_composite (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_decimal_digit (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_numeric (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_diacritic (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_extender (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_ignorable_control (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Subdivision of the Unicode characters into scripts. */ typedef struct { unsigned int code : 21; unsigned int start : 1; unsigned int end : 1; } uc_interval_t; typedef struct { unsigned int nintervals; const uc_interval_t *intervals; const char *name; } uc_script_t; /* Return the script of a Unicode character. */ extern const uc_script_t * uc_script (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Return the script given by name, e.g. "HAN". */ extern const uc_script_t * uc_script_byname (const char *script_name) _UC_ATTRIBUTE_PURE; /* Test whether a Unicode character belongs to a given script. */ extern bool uc_is_script (ucs4_t uc, const uc_script_t *script) _UC_ATTRIBUTE_PURE; /* Get the list of all scripts. */ extern void uc_all_scripts (const uc_script_t **scripts, size_t *count); /* ========================================================================= */ /* Subdivision of the Unicode character range into blocks. */ typedef struct { ucs4_t start; ucs4_t end; const char *name; } uc_block_t; /* Return the block a character belongs to. */ extern const uc_block_t * uc_block (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test whether a Unicode character belongs to a given block. */ extern bool uc_is_block (ucs4_t uc, const uc_block_t *block) _UC_ATTRIBUTE_PURE; /* Get the list of all blocks. */ extern void uc_all_blocks (const uc_block_t **blocks, size_t *count); /* ========================================================================= */ /* Properties taken from language standards. */ /* Test whether a Unicode character is considered whitespace in ISO C 99. */ extern bool uc_is_c_whitespace (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test whether a Unicode character is considered whitespace in Java. */ extern bool uc_is_java_whitespace (ucs4_t uc) _UC_ATTRIBUTE_CONST; enum { UC_IDENTIFIER_START, /* valid as first or subsequent character */ UC_IDENTIFIER_VALID, /* valid as subsequent character only */ UC_IDENTIFIER_INVALID, /* not valid */ UC_IDENTIFIER_IGNORABLE /* ignorable (Java only) */ }; /* Return the categorization of a Unicode character w.r.t. the ISO C 99 identifier syntax. */ extern int uc_c_ident_category (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Return the categorization of a Unicode character w.r.t. the Java identifier syntax. */ extern int uc_java_ident_category (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Like ISO C and . These functions are deprecated, because this set of functions was designed with ASCII in mind and cannot reflect the more diverse reality of the Unicode character set. But they can be a quick-and-dirty porting aid when migrating from wchar_t APIs to Unicode strings. */ /* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true. */ extern bool uc_is_alnum (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true, or any character that is one of a locale-specific set of characters for which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ extern bool uc_is_alpha (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test for any control character. */ extern bool uc_is_cntrl (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test for any character that corresponds to a decimal-digit character. */ extern bool uc_is_digit (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test for any character for which 'uc_is_print' is true and 'uc_is_space' is false. */ extern bool uc_is_graph (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test for any character that corresponds to a lowercase letter or is one of a locale-specific set of characters for which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ extern bool uc_is_lower (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test for any printing character. */ extern bool uc_is_print (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test for any printing character that is one of a locale-specific set of characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true. */ extern bool uc_is_punct (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test for any character that corresponds to a locale-specific set of characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_punct' is true. */ extern bool uc_is_space (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test for any character that corresponds to an uppercase letter or is one of a locale-specific set of character for which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ extern bool uc_is_upper (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Test for any character that corresponds to a hexadecimal-digit character. */ extern bool uc_is_xdigit (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* GNU extension. */ /* Test for any character that corresponds to a standard blank character or a locale-specific set of characters for which 'uc_is_alnum' is false. */ extern bool uc_is_blank (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ #ifdef __cplusplus } #endif #endif /* _UNICTYPE_H */ pspp-1.0.1/gl/wctype.in.h0000644000175000017500000003321213124536243012113 00000000000000/* A substitute for ISO C99 , for platforms that lack it. Copyright (C) 2006-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Bruno Haible and Paul Eggert. */ /* * ISO C 99 for platforms that lack it. * * * iswctype, towctrans, towlower, towupper, wctrans, wctype, * wctrans_t, and wctype_t are not yet implemented. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if (defined __MINGW32__ && defined __CTYPE_H_SOURCED__) /* Special invocation convention: - With MinGW 3.22, when includes , only some part of is being processed, which doesn't include the idempotency guard. */ #@INCLUDE_NEXT@ @NEXT_WCTYPE_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_WCTYPE_H #if @HAVE_WINT_T@ /* Solaris 2.5 has a bug: must be included before . Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ # include # include # include # include #endif /* Native Windows (mingw, MSVC) have declarations of towupper, towlower, and isw* functions in , as well as in . Include , in advance to avoid rpl_ prefix being added to the declarations. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # include #endif /* Include the original if it exists. BeOS 5 has the functions but no . */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCTYPE_H@ # @INCLUDE_NEXT@ @NEXT_WCTYPE_H@ #endif #ifndef _@GUARD_PREFIX@_WCTYPE_H #define _@GUARD_PREFIX@_WCTYPE_H #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_WCTYPE_INLINE # define _GL_WCTYPE_INLINE _GL_INLINE #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Solaris 2.6 includes which includes which #defines a number of identifiers in the application namespace. Revert these #defines. */ #ifdef __sun # undef multibyte # undef eucw1 # undef eucw2 # undef eucw3 # undef scrw1 # undef scrw2 # undef scrw3 #endif /* Define wint_t and WEOF. (Also done in wchar.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #else /* mingw and MSVC define wint_t as 'unsigned short' in or . This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be "unchanged by default argument promotions". Override it. */ # if @GNULIB_OVERRIDES_WINT_T@ # if !GNULIB_defined_wint_t # if @HAVE_CRTDEFS_H@ # include # else # include # endif typedef unsigned int rpl_wint_t; # undef wint_t # define wint_t rpl_wint_t # define GNULIB_defined_wint_t 1 # endif # endif # ifndef WEOF # define WEOF ((wint_t) -1) # endif #endif #if !GNULIB_defined_wctype_functions /* FreeBSD 4.4 to 4.11 has but lacks the functions. Linux libc5 has and the functions but they are broken. Assume all 11 functions (all isw* except iswblank) are implemented the same way, or not at all. */ # if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@ /* IRIX 5.3 has macros but no functions, its isw* macros refer to an undefined variable _ctmp_ and to macros like _P, and they refer to system functions like _iswctype that are not in the standard C library. Rather than try to get ancient buggy implementations like this to work, just disable them. */ # undef iswalnum # undef iswalpha # undef iswblank # undef iswcntrl # undef iswdigit # undef iswgraph # undef iswlower # undef iswprint # undef iswpunct # undef iswspace # undef iswupper # undef iswxdigit # undef towlower # undef towupper /* Linux libc5 has and the functions but they are broken. */ # if @REPLACE_ISWCNTRL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define iswalnum rpl_iswalnum # define iswalpha rpl_iswalpha # define iswblank rpl_iswblank # define iswcntrl rpl_iswcntrl # define iswdigit rpl_iswdigit # define iswgraph rpl_iswgraph # define iswlower rpl_iswlower # define iswprint rpl_iswprint # define iswpunct rpl_iswpunct # define iswspace rpl_iswspace # define iswupper rpl_iswupper # define iswxdigit rpl_iswxdigit # endif # endif # if @REPLACE_TOWLOWER@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towlower rpl_towlower # define towupper rpl_towupper # endif # endif _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswalnum # else iswalnum # endif (wint_t wc) { return ((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswalpha # else iswalpha # endif (wint_t wc) { return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswblank # else iswblank # endif (wint_t wc) { return wc == ' ' || wc == '\t'; } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswcntrl # else iswcntrl # endif (wint_t wc) { return (wc & ~0x1f) == 0 || wc == 0x7f; } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswdigit # else iswdigit # endif (wint_t wc) { return wc >= '0' && wc <= '9'; } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswgraph # else iswgraph # endif (wint_t wc) { return wc >= '!' && wc <= '~'; } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswlower # else iswlower # endif (wint_t wc) { return wc >= 'a' && wc <= 'z'; } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswprint # else iswprint # endif (wint_t wc) { return wc >= ' ' && wc <= '~'; } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswpunct # else iswpunct # endif (wint_t wc) { return (wc >= '!' && wc <= '~' && !((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswspace # else iswspace # endif (wint_t wc) { return (wc == ' ' || wc == '\t' || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswupper # else iswupper # endif (wint_t wc) { return wc >= 'A' && wc <= 'Z'; } _GL_WCTYPE_INLINE int # if @REPLACE_ISWCNTRL@ rpl_iswxdigit # else iswxdigit # endif (wint_t wc) { return ((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); } _GL_WCTYPE_INLINE wint_t # if @REPLACE_TOWLOWER@ rpl_towlower # else towlower # endif (wint_t wc) { return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc); } _GL_WCTYPE_INLINE wint_t # if @REPLACE_TOWLOWER@ rpl_towupper # else towupper # endif (wint_t wc) { return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc); } # elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@) /* Only the iswblank function is missing. */ # if @REPLACE_ISWBLANK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define iswblank rpl_iswblank # endif _GL_FUNCDECL_RPL (iswblank, int, (wint_t wc)); # else _GL_FUNCDECL_SYS (iswblank, int, (wint_t wc)); # endif # endif # if defined __MINGW32__ /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. The functions towlower and towupper are implemented in the MSVCRT library to take a wchar_t argument and return a wchar_t result. mingw declares these functions to take a wint_t argument and return a wint_t result. This means that: 1. When the user passes an argument outside the range 0x0000..0xFFFF, the function will look only at the lower 16 bits. This is allowed according to POSIX. 2. The return value is returned in the lower 16 bits of the result register. The upper 16 bits are random: whatever happened to be in that part of the result register. We need to fix this by adding a zero-extend from wchar_t to wint_t after the call. */ _GL_WCTYPE_INLINE wint_t rpl_towlower (wint_t wc) { return (wint_t) (wchar_t) towlower (wc); } # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towlower rpl_towlower # endif _GL_WCTYPE_INLINE wint_t rpl_towupper (wint_t wc) { return (wint_t) (wchar_t) towupper (wc); } # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towupper rpl_towupper # endif # endif /* __MINGW32__ */ # define GNULIB_defined_wctype_functions 1 #endif #if @REPLACE_ISWCNTRL@ _GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswlower, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswprint, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswspace, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswupper, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc)); #else _GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswlower, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswprint, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswspace, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswupper, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc)); #endif _GL_CXXALIASWARN (iswalnum); _GL_CXXALIASWARN (iswalpha); _GL_CXXALIASWARN (iswcntrl); _GL_CXXALIASWARN (iswdigit); _GL_CXXALIASWARN (iswgraph); _GL_CXXALIASWARN (iswlower); _GL_CXXALIASWARN (iswprint); _GL_CXXALIASWARN (iswpunct); _GL_CXXALIASWARN (iswspace); _GL_CXXALIASWARN (iswupper); _GL_CXXALIASWARN (iswxdigit); #if @GNULIB_ISWBLANK@ # if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@ _GL_CXXALIAS_RPL (iswblank, int, (wint_t wc)); # else _GL_CXXALIAS_SYS (iswblank, int, (wint_t wc)); # endif _GL_CXXALIASWARN (iswblank); #endif #if !@HAVE_WCTYPE_T@ # if !GNULIB_defined_wctype_t typedef void * wctype_t; # define GNULIB_defined_wctype_t 1 # endif #endif /* Get a descriptor for a wide character property. */ #if @GNULIB_WCTYPE@ # if !@HAVE_WCTYPE_T@ _GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)); # endif _GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); _GL_CXXALIASWARN (wctype); #elif defined GNULIB_POSIXCHECK # undef wctype # if HAVE_RAW_DECL_WCTYPE _GL_WARN_ON_USE (wctype, "wctype is unportable - " "use gnulib module wctype for portability"); # endif #endif /* Test whether a wide character has a given property. The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctype() function. */ #if @GNULIB_ISWCTYPE@ # if !@HAVE_WCTYPE_T@ _GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc)); # endif _GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc)); _GL_CXXALIASWARN (iswctype); #elif defined GNULIB_POSIXCHECK # undef iswctype # if HAVE_RAW_DECL_ISWCTYPE _GL_WARN_ON_USE (iswctype, "iswctype is unportable - " "use gnulib module iswctype for portability"); # endif #endif #if @REPLACE_TOWLOWER@ || defined __MINGW32__ _GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc)); _GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); #else _GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc)); _GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc)); #endif _GL_CXXALIASWARN (towlower); _GL_CXXALIASWARN (towupper); #if !@HAVE_WCTRANS_T@ # if !GNULIB_defined_wctrans_t typedef void * wctrans_t; # define GNULIB_defined_wctrans_t 1 # endif #endif /* Get a descriptor for a wide character case conversion. */ #if @GNULIB_WCTRANS@ # if !@HAVE_WCTRANS_T@ _GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)); # endif _GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); _GL_CXXALIASWARN (wctrans); #elif defined GNULIB_POSIXCHECK # undef wctrans # if HAVE_RAW_DECL_WCTRANS _GL_WARN_ON_USE (wctrans, "wctrans is unportable - " "use gnulib module wctrans for portability"); # endif #endif /* Perform a given case conversion on a wide character. The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctrans() function. */ #if @GNULIB_TOWCTRANS@ # if !@HAVE_WCTRANS_T@ _GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); # endif _GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); _GL_CXXALIASWARN (towctrans); #elif defined GNULIB_POSIXCHECK # undef towctrans # if HAVE_RAW_DECL_TOWCTRANS _GL_WARN_ON_USE (towctrans, "towctrans is unportable - " "use gnulib module towctrans for portability"); # endif #endif _GL_INLINE_HEADER_END #endif /* _@GUARD_PREFIX@_WCTYPE_H */ #endif /* _@GUARD_PREFIX@_WCTYPE_H */ #endif pspp-1.0.1/gl/fseterr.c0000644000175000017500000000560013132510756011640 00000000000000/* Set the error indicator of a stream. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include "fseterr.h" #include #include "stdio-impl.h" void fseterr (FILE *fp) { /* Most systems provide FILE as a struct and the necessary bitmask in , because they need it for implementing getc() and putc() as fast macros. */ #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ fp->_flags |= _IO_ERR_SEEN; #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ fp_->_flags |= __SERR; #elif defined __EMX__ /* emx+gcc */ fp->_flags |= _IOERR; #elif defined __minix /* Minix */ fp->_flags |= _IOERR; #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */ fp_->_flag |= _IOERR; #elif defined __UCLIBC__ /* uClibc */ fp->__modeflags |= __FLAG_ERROR; #elif defined __QNX__ /* QNX */ fp->_Mode |= 0x200 /* _MERR */; #elif defined __MINT__ /* Atari FreeMiNT */ fp->__error = 1; #elif defined EPLAN9 /* Plan9 */ if (fp->state != 0 /* CLOSED */) fp->state = 5 /* ERR */; #elif 0 /* unknown */ /* Portable fallback, based on an idea by Rich Felker. Wow! 6 system calls for something that is just a bit operation! Not activated on any system, because there is no way to repair FP when the sequence of system calls fails, and library code should not call abort(). */ int saved_errno; int fd; int fd2; saved_errno = errno; fflush (fp); fd = fileno (fp); fd2 = dup (fd); if (fd2 >= 0) { close (fd); fputc ('\0', fp); /* This should set the error indicator. */ fflush (fp); /* Or this. */ if (dup2 (fd2, fd) < 0) /* Whee... we botched the stream and now cannot restore it! */ abort (); close (fd2); } errno = saved_errno; #else #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib." #endif } pspp-1.0.1/gl/exitfail.c0000644000175000017500000000153313124536241011772 00000000000000/* Failure exit status Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include "exitfail.h" #include int volatile exit_failure = EXIT_FAILURE; pspp-1.0.1/gl/unigbrk/0000755000175000017500000000000013150620334011534 500000000000000pspp-1.0.1/gl/unigbrk/gbrkprop.h0000644000175000017500000015241113020461275013462 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Grapheme break property of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ #define gbrkprop_header_0 16 #define gbrkprop_header_1 15 #define gbrkprop_header_2 7 #define gbrkprop_header_3 511 #define gbrkprop_header_4 127 static const struct { int level1[15]; short level2[3 << 9]; unsigned char level3[(102 << 7) / 2]; } unigbrkprop = { { 0, 512, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1024 }, { 0, 64, -1, -1, -1, -1, 128, -1, -1, 192, -1, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024, 1088, 1152, 1216, 1280, 1344, 1408, 1472, 1536, 1600, 1664, 1728, 1792, -1, -1, 1856, -1, -1, -1, -1, -1, -1, -1, 1920, 1984, 2048, 2112, 2176, -1, 2240, 2304, 2368, 2432, 2496, 2560, -1, 2624, -1, -1, -1, -1, 2688, 2752, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2816, 2880, 2944, -1, -1, -1, -1, 3008, 3072, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3136, 3200, -1, -1, 3264, 3328, 3392, 3456, 3520, 3584, -1, 3648, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 3712, 3776, 3840, 4160, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4288, -1, -1, -1, -1, -1, 4352, 4416, -1, 4480, -1, -1, -1, 4544, -1, 4608, 4672, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4736, 4800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4864, 4928, 4992, 5056, 5120, 5184, 5248, -1, -1, 5312, -1, 5376, 5440, 5504, 5568, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5632, 5696, -1, -1, -1, -1, -1, -1, -1, 5760, 5824, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5888, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5952, 6016, 6080, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6144, 6208, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6272, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4224, 4224, 6400, 6464, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 0x33, 0x33, 0x33, 0x33, 0x33, 0x32, 0x13, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x40, 0x40, 0x04, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x34, 0x40, 0x44, 0x44, 0x04, 0x40, 0x04, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x40, 0x44, 0x44, 0x44, 0x44, 0x40, 0x44, 0x40, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x04, 0x66, 0x46, 0x44, 0x44, 0x44, 0x64, 0x66, 0x46, 0x66, 0x40, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x64, 0x46, 0x44, 0x04, 0x60, 0x06, 0x60, 0x46, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x66, 0x46, 0x04, 0x00, 0x40, 0x04, 0x40, 0x44, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x66, 0x46, 0x44, 0x44, 0x40, 0x64, 0x60, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x44, 0x46, 0x44, 0x04, 0x60, 0x06, 0x60, 0x46, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x64, 0x06, 0x00, 0x66, 0x06, 0x66, 0x46, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x64, 0x66, 0x06, 0x44, 0x04, 0x44, 0x44, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x46, 0x66, 0x64, 0x06, 0x64, 0x06, 0x66, 0x44, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x46, 0x44, 0x04, 0x66, 0x06, 0x66, 0x46, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x66, 0x44, 0x04, 0x04, 0x66, 0x66, 0x66, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x44, 0x44, 0x44, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x64, 0x44, 0x44, 0x04, 0x44, 0x00, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x64, 0x44, 0x44, 0x44, 0x40, 0x64, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x44, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x46, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x46, 0x44, 0x44, 0x44, 0x66, 0x66, 0x66, 0x66, 0x64, 0x46, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x64, 0x66, 0x46, 0x64, 0x66, 0x00, 0x00, 0x66, 0x64, 0x66, 0x66, 0x46, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x64, 0x44, 0x44, 0x44, 0x04, 0x04, 0x04, 0x40, 0x44, 0x44, 0x44, 0x64, 0x66, 0x66, 0x46, 0x44, 0x44, 0x44, 0x44, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x44, 0x64, 0x64, 0x66, 0x66, 0x64, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x44, 0x44, 0x66, 0x44, 0x46, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x66, 0x46, 0x46, 0x44, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x44, 0x44, 0x44, 0x44, 0x66, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x64, 0x44, 0x44, 0x44, 0x04, 0x00, 0x40, 0x00, 0x00, 0x66, 0x04, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x44, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x04, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x46, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x07, 0x00, 0x44, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x44, 0x44, 0x66, 0x64, 0x66, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x64, 0x46, 0x64, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x44, 0x04, 0x40, 0x04, 0x00, 0x00, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x44, 0x66, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x46, 0x66, 0x64, 0x06, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xba, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x08, 0x00, 0x90, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x04, 0x00, 0x00, 0x40, 0x44, 0x40, 0x04, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x46, 0x44, 0x64, 0x46, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x46, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x66, 0x44, 0x44, 0x44, 0x44, 0x64, 0x06, 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x46, 0x44, 0x66, 0x64, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x46, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x64, 0x64, 0x66, 0x06, 0x60, 0x06, 0x60, 0x66, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x44, 0x44, 0x44, 0x04, 0x00, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x46, 0x44, 0x44, 0x64, 0x64, 0x46, 0x46, 0x64, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x44, 0x44, 0x00, 0x66, 0x66, 0x44, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x46, 0x44, 0x44, 0x44, 0x64, 0x46, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x46, 0x66, 0x44, 0x44, 0x44, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x66, 0x44, 0x44, 0x46, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x46, 0x44, 0x00, 0x60, 0x44, 0x44, 0x34, 0x33, 0x33, 0x33, 0x43, 0x44, 0x44, 0x44, 0x04, 0x40, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x00, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x44, 0x44, 0x40, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33 } }; pspp-1.0.1/gl/unigbrk/uc-gbrk-prop.c0000644000175000017500000000301313124536243014133 00000000000000/* Grapheme cluster break property function. Copyright (C) 2010-2017 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. 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 . */ #include /* Specification. */ #include "unigbrk.h" #include "gbrkprop.h" int uc_graphemeclusterbreak_property (ucs4_t uc) { unsigned int index1 = uc >> gbrkprop_header_0; if (index1 < gbrkprop_header_1) { int lookup1 = unigbrkprop.level1[index1]; if (lookup1 >= 0) { unsigned int index2 = (uc >> gbrkprop_header_2) & gbrkprop_header_3; int lookup2 = unigbrkprop.level2[lookup1 + index2]; if (lookup2 >= 0) { unsigned int index3 = uc & gbrkprop_header_4; unsigned char lookup3 = unigbrkprop.level3[lookup2 + index3 / 2]; return (lookup3 >> ((uc & 1) << 2)) & 0x0f; } } } return GBP_OTHER; } pspp-1.0.1/gl/unigbrk/uc-is-grapheme-break.c0000644000175000017500000001312413124536243015517 00000000000000/* Grapheme cluster break function. Copyright (C) 2010-2017 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. 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 . */ #include /* Specification. */ #include "unigbrk.h" /* Evaluates to true if there is an extended grapheme cluster break between code points with GBP_* values A and B, false if there is not. The comments are the grapheme cluster boundary rules from in UAX #29. */ #define UC_IS_GRAPHEME_BREAK(A, B) \ (/* GB1 and GB2 are covered--just use a GBP_CONTROL character, such \ as 0, for sot and eot. */ \ \ /* GB3 */ \ (A) == GBP_CR && (B) == GBP_LF ? false : \ \ /* GB4 */ \ (A) == GBP_CONTROL || (A) == GBP_CR || (A) == GBP_LF ? true : \ \ /* GB5 */ \ (B) == GBP_CONTROL || (B) == GBP_CR || (B) == GBP_LF ? true : \ \ /* GB6 */ \ (A) == GBP_L && ((B) == GBP_L || (B) == GBP_V \ || (B) == GBP_LV || (B) == GBP_LVT) ? false : \ \ /* GB7 */ \ ((A) == GBP_LV || (A) == GBP_V) \ && ((B) == GBP_V || (B) == GBP_T) ? false : \ \ /* GB8 */ \ ((A) == GBP_LVT || (A) == GBP_T) && (B) == GBP_T ? false : \ \ /* GB8a */ \ (A) == GBP_RI && (B) == GBP_RI ? false : \ \ /* GB9 */ \ (B) == GBP_EXTEND ? false : \ \ /* GB9a */ \ (B) == GBP_SPACINGMARK ? false : \ \ /* GB9b */ \ (A) == GBP_PREPEND ? false \ \ /* GB10 */ \ : true) #define UC_GRAPHEME_BREAKS_FOR(A) \ ( (UC_IS_GRAPHEME_BREAK(A, GBP_OTHER) << GBP_OTHER) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_CR) << GBP_CR) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_LF) << GBP_LF) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_CONTROL) << GBP_CONTROL) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_EXTEND) << GBP_EXTEND) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_PREPEND) << GBP_PREPEND) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_SPACINGMARK) << GBP_SPACINGMARK) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_L) << GBP_L) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_V) << GBP_V) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_T) << GBP_T) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_LV) << GBP_LV) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_LVT) << GBP_LVT) \ | (UC_IS_GRAPHEME_BREAK(A, GBP_RI) << GBP_RI)) static const unsigned short int gb_table[13] = { UC_GRAPHEME_BREAKS_FOR(0), /* GBP_OTHER */ UC_GRAPHEME_BREAKS_FOR(1), /* GBP_CR */ UC_GRAPHEME_BREAKS_FOR(2), /* GBP_LF */ UC_GRAPHEME_BREAKS_FOR(3), /* GBP_CONTROL */ UC_GRAPHEME_BREAKS_FOR(4), /* GBP_EXTEND */ UC_GRAPHEME_BREAKS_FOR(5), /* GBP_PREPEND */ UC_GRAPHEME_BREAKS_FOR(6), /* GBP_SPACINGMARK */ UC_GRAPHEME_BREAKS_FOR(7), /* GBP_L */ UC_GRAPHEME_BREAKS_FOR(8), /* GBP_V */ UC_GRAPHEME_BREAKS_FOR(9), /* GBP_T */ UC_GRAPHEME_BREAKS_FOR(10), /* GBP_LV */ UC_GRAPHEME_BREAKS_FOR(11), /* GBP_LVT */ UC_GRAPHEME_BREAKS_FOR(12), /* GBP_RI */ }; bool uc_is_grapheme_break (ucs4_t a, ucs4_t b) { int a_gcp, b_gcp; if ((a | b) < 0x300) { /* GB3 is the only relevant rule for this case. */ return a != '\r' || b != '\n'; } a_gcp = uc_graphemeclusterbreak_property (a); b_gcp = uc_graphemeclusterbreak_property (b); return (gb_table[a_gcp] >> b_gcp) & 1; } pspp-1.0.1/gl/fd-hook.c0000644000175000017500000000700313124536241011512 00000000000000/* Hook for making file descriptor functions close(), ioctl() extensible. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "fd-hook.h" #include /* Currently, this entire code is only needed for the handling of sockets on native Windows platforms. */ #if WINDOWS_SOCKETS /* The first and last link in the doubly linked list. Initially the list is empty. */ static struct fd_hook anchor = { &anchor, &anchor, NULL, NULL }; int execute_close_hooks (const struct fd_hook *remaining_list, gl_close_fn primary, int fd) { if (remaining_list == &anchor) /* End of list reached. */ return primary (fd); else return remaining_list->private_close_fn (remaining_list->private_next, primary, fd); } int execute_all_close_hooks (gl_close_fn primary, int fd) { return execute_close_hooks (anchor.private_next, primary, fd); } int execute_ioctl_hooks (const struct fd_hook *remaining_list, gl_ioctl_fn primary, int fd, int request, void *arg) { if (remaining_list == &anchor) /* End of list reached. */ return primary (fd, request, arg); else return remaining_list->private_ioctl_fn (remaining_list->private_next, primary, fd, request, arg); } int execute_all_ioctl_hooks (gl_ioctl_fn primary, int fd, int request, void *arg) { return execute_ioctl_hooks (anchor.private_next, primary, fd, request, arg); } void register_fd_hook (close_hook_fn close_hook, ioctl_hook_fn ioctl_hook, struct fd_hook *link) { if (close_hook == NULL) close_hook = execute_close_hooks; if (ioctl_hook == NULL) ioctl_hook = execute_ioctl_hooks; if (link->private_next == NULL && link->private_prev == NULL) { /* Add the link to the doubly linked list. */ link->private_next = anchor.private_next; link->private_prev = &anchor; link->private_close_fn = close_hook; link->private_ioctl_fn = ioctl_hook; anchor.private_next->private_prev = link; anchor.private_next = link; } else { /* The link is already in use. */ if (link->private_close_fn != close_hook || link->private_ioctl_fn != ioctl_hook) abort (); } } void unregister_fd_hook (struct fd_hook *link) { struct fd_hook *next = link->private_next; struct fd_hook *prev = link->private_prev; if (next != NULL && prev != NULL) { /* The link is in use. Remove it from the doubly linked list. */ prev->private_next = next; next->private_prev = prev; /* Clear the link, to mark it unused. */ link->private_next = NULL; link->private_prev = NULL; link->private_close_fn = NULL; link->private_ioctl_fn = NULL; } } #endif pspp-1.0.1/gl/c-vasnprintf.h0000644000175000017500000000546113124536241012610 00000000000000/* vsprintf with automatic memory allocation in C locale. Copyright (C) 2002-2004, 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _C_VASNPRINTF_H #define _C_VASNPRINTF_H /* Get va_list. */ #include /* Get size_t. */ #include /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). You can pass a preallocated buffer for the result in RESULTBUF and its size in *LENGTHP; otherwise you pass RESULTBUF = NULL. If successful, return the address of the string (this may be = RESULTBUF if no dynamic memory allocation was necessary) and set *LENGTHP to the number of resulting bytes, excluding the trailing NUL. Upon error, set errno and return NULL. When dynamic memory allocation occurs, the preallocated buffer is left alone (with possibly modified contents). This makes it possible to use a statically allocated or stack-allocated buffer, like this: char buf[100]; size_t len = sizeof (buf); char *output = vasnprintf (buf, &len, format, args); if (output == NULL) ... error handling ...; else { ... use the output string ...; if (output != buf) free (output); } Formatting takes place in the C locale, that is, the decimal point used in floating-point formatting directives is always '.'. */ extern char *c_vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0)); #ifdef __cplusplus } #endif #endif /* _C_VASNPRINTF_H */ pspp-1.0.1/gl/canonicalize-lgpl.c0000644000175000017500000002757213124536241013573 00000000000000/* Return the canonical absolute name of a given file. Copyright (C) 1996-2017 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 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 . */ #ifndef _LIBC /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the name == NULL test below. */ # define _GL_ARG_NONNULL(params) # define _GL_USE_STDLIB_ALLOC 1 # include #endif #if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC /* Specification. */ #include #include #include #include #include #if HAVE_SYS_PARAM_H || defined _LIBC # include #endif #include #include #include #ifdef _LIBC # include #else # define SHLIB_COMPAT(lib, introduced, obsoleted) 0 # define versioned_symbol(lib, local, symbol, version) extern int dummy # define compat_symbol(lib, local, symbol, version) # define weak_alias(local, symbol) # define __canonicalize_file_name canonicalize_file_name # define __realpath realpath # include "pathmax.h" # include "malloca.h" # include "dosname.h" # if HAVE_GETCWD # if IN_RELOCWRAPPER /* When building the relocatable program wrapper, use the system's getcwd function, not the gnulib override, otherwise we would get a link error. */ # undef getcwd # endif # if defined VMS && !defined getcwd /* We want the directory in Unix syntax, not in VMS syntax. The gnulib override of 'getcwd' takes 2 arguments; the original VMS 'getcwd' takes 3 arguments. */ # define __getcwd(buf, max) getcwd (buf, max, 0) # else # define __getcwd getcwd # endif # else # define __getcwd(buf, max) getwd (buf) # endif # define __readlink readlink # define __set_errno(e) errno = (e) # ifndef MAXSYMLINKS # ifdef SYMLOOP_MAX # define MAXSYMLINKS SYMLOOP_MAX # else # define MAXSYMLINKS 20 # endif # endif #endif #ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT # define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 #endif /* Define this independently so that stdint.h is not a prerequisite. */ #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #if !FUNC_REALPATH_WORKS || defined _LIBC static void alloc_failed (void) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid errno problem without using the malloc or realloc modules; see: http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00025.html */ errno = ENOMEM; #endif } /* Return the canonical absolute name of file NAME. A canonical name does not contain any ".", ".." components nor any repeated path separators ('/') or symlinks. All path components must exist. If RESOLVED is null, the result is malloc'd; otherwise, if the canonical name is PATH_MAX chars or more, returns null with 'errno' set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the name in RESOLVED. If the name cannot be resolved and RESOLVED is non-NULL, it contains the path of the first component that cannot be resolved. If the path can be resolved, RESOLVED holds the same value as the value returned. */ char * __realpath (const char *name, char *resolved) { char *rpath, *dest, *extra_buf = NULL; const char *start, *end, *rpath_limit; long int path_max; int num_links = 0; size_t prefix_len; if (name == NULL) { /* As per Single Unix Specification V2 we must return an error if either parameter is a null pointer. We extend this to allow the RESOLVED parameter to be NULL in case the we are expected to allocate the room for the return value. */ __set_errno (EINVAL); return NULL; } if (name[0] == '\0') { /* As per Single Unix Specification V2 we must return an error if the name argument points to an empty string. */ __set_errno (ENOENT); return NULL; } #ifdef PATH_MAX path_max = PATH_MAX; #else path_max = pathconf (name, _PC_PATH_MAX); if (path_max <= 0) path_max = 8192; #endif if (resolved == NULL) { rpath = malloc (path_max); if (rpath == NULL) { alloc_failed (); return NULL; } } else rpath = resolved; rpath_limit = rpath + path_max; /* This is always zero for Posix hosts, but can be 2 for MS-Windows and MS-DOS X:/foo/bar file names. */ prefix_len = FILE_SYSTEM_PREFIX_LEN (name); if (!IS_ABSOLUTE_FILE_NAME (name)) { if (!__getcwd (rpath, path_max)) { rpath[0] = '\0'; goto error; } dest = strchr (rpath, '\0'); start = name; prefix_len = FILE_SYSTEM_PREFIX_LEN (rpath); } else { dest = rpath; if (prefix_len) { memcpy (rpath, name, prefix_len); dest += prefix_len; } *dest++ = '/'; if (DOUBLE_SLASH_IS_DISTINCT_ROOT) { if (ISSLASH (name[1]) && !ISSLASH (name[2]) && !prefix_len) *dest++ = '/'; *dest = '\0'; } start = name + prefix_len; } for (end = start; *start; start = end) { #ifdef _LIBC struct stat64 st; #else struct stat st; #endif /* Skip sequence of multiple path-separators. */ while (ISSLASH (*start)) ++start; /* Find end of path component. */ for (end = start; *end && !ISSLASH (*end); ++end) /* Nothing. */; if (end - start == 0) break; else if (end - start == 1 && start[0] == '.') /* nothing */; else if (end - start == 2 && start[0] == '.' && start[1] == '.') { /* Back up to previous component, ignore if at root already. */ if (dest > rpath + prefix_len + 1) for (--dest; dest > rpath && !ISSLASH (dest[-1]); --dest) continue; if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && !prefix_len && ISSLASH (*dest) && !ISSLASH (dest[1])) dest++; } else { size_t new_size; if (!ISSLASH (dest[-1])) *dest++ = '/'; if (dest + (end - start) >= rpath_limit) { ptrdiff_t dest_offset = dest - rpath; char *new_rpath; if (resolved) { __set_errno (ENAMETOOLONG); if (dest > rpath + prefix_len + 1) dest--; *dest = '\0'; goto error; } new_size = rpath_limit - rpath; if (end - start + 1 > path_max) new_size += end - start + 1; else new_size += path_max; new_rpath = (char *) realloc (rpath, new_size); if (new_rpath == NULL) { alloc_failed (); goto error; } rpath = new_rpath; rpath_limit = rpath + new_size; dest = rpath + dest_offset; } #ifdef _LIBC dest = __mempcpy (dest, start, end - start); #else memcpy (dest, start, end - start); dest += end - start; #endif *dest = '\0'; #ifdef _LIBC if (__lxstat64 (_STAT_VER, rpath, &st) < 0) #else if (lstat (rpath, &st) < 0) #endif goto error; if (S_ISLNK (st.st_mode)) { char *buf; size_t len; ssize_t n; if (++num_links > MAXSYMLINKS) { __set_errno (ELOOP); goto error; } buf = malloca (path_max); if (!buf) { __set_errno (ENOMEM); goto error; } n = __readlink (rpath, buf, path_max - 1); if (n < 0) { int saved_errno = errno; freea (buf); __set_errno (saved_errno); goto error; } buf[n] = '\0'; if (!extra_buf) { extra_buf = malloca (path_max); if (!extra_buf) { freea (buf); __set_errno (ENOMEM); goto error; } } len = strlen (end); /* Check that n + len + 1 doesn't overflow and is <= path_max. */ if (n >= SIZE_MAX - len || n + len >= path_max) { freea (buf); __set_errno (ENAMETOOLONG); goto error; } /* Careful here, end may be a pointer into extra_buf... */ memmove (&extra_buf[n], end, len + 1); name = end = memcpy (extra_buf, buf, n); if (IS_ABSOLUTE_FILE_NAME (buf)) { size_t pfxlen = FILE_SYSTEM_PREFIX_LEN (buf); if (pfxlen) memcpy (rpath, buf, pfxlen); dest = rpath + pfxlen; *dest++ = '/'; /* It's an absolute symlink */ if (DOUBLE_SLASH_IS_DISTINCT_ROOT) { if (ISSLASH (buf[1]) && !ISSLASH (buf[2]) && !pfxlen) *dest++ = '/'; *dest = '\0'; } /* Install the new prefix to be in effect hereafter. */ prefix_len = pfxlen; } else { /* Back up to previous component, ignore if at root already: */ if (dest > rpath + prefix_len + 1) for (--dest; dest > rpath && !ISSLASH (dest[-1]); --dest) continue; if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && ISSLASH (*dest) && !ISSLASH (dest[1]) && !prefix_len) dest++; } } else if (!S_ISDIR (st.st_mode) && *end != '\0') { __set_errno (ENOTDIR); goto error; } } } if (dest > rpath + prefix_len + 1 && ISSLASH (dest[-1])) --dest; if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && !prefix_len && ISSLASH (*dest) && !ISSLASH (dest[1])) dest++; *dest = '\0'; if (extra_buf) freea (extra_buf); return rpath; error: { int saved_errno = errno; if (extra_buf) freea (extra_buf); if (resolved == NULL) free (rpath); __set_errno (saved_errno); } return NULL; } versioned_symbol (libc, __realpath, realpath, GLIBC_2_3); #endif /* !FUNC_REALPATH_WORKS || defined _LIBC */ #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3) char * attribute_compat_text_section __old_realpath (const char *name, char *resolved) { if (resolved == NULL) { __set_errno (EINVAL); return NULL; } return __realpath (name, resolved); } compat_symbol (libc, __old_realpath, realpath, GLIBC_2_0); #endif char * __canonicalize_file_name (const char *name) { return __realpath (name, NULL); } weak_alias (__canonicalize_file_name, canonicalize_file_name) #else /* This declaration is solely to ensure that after preprocessing this file is never empty. */ typedef int dummy; #endif pspp-1.0.1/gl/m4/0000755000175000017500000000000013150620333010412 500000000000000pspp-1.0.1/gl/m4/strnlen.m40000644000175000017500000000156113124536242012272 00000000000000# strnlen.m4 serial 13 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRNLEN], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) dnl Persuade glibc to declare strnlen(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([strnlen]) if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 else m4_pushdef([AC_LIBOBJ], [:]) dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]). AC_FUNC_STRNLEN m4_popdef([AC_LIBOBJ]) if test $ac_cv_func_strnlen_working = no; then REPLACE_STRNLEN=1 fi fi ]) # Prerequisites of lib/strnlen.c. AC_DEFUN([gl_PREREQ_STRNLEN], [:]) pspp-1.0.1/gl/m4/isnan.m40000644000175000017500000000274713124536242011724 00000000000000# isnan.m4 serial 5 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_ISNAN], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_ISNANF]) AC_REQUIRE([gl_FUNC_ISNAND]) AC_REQUIRE([gl_FUNC_ISNANL]) # If we replaced any of the underlying isnan* functions, replace # the isnan macro; it undoubtedly suffers from the same flaws. AC_MSG_CHECKING([whether isnan macro works]) if test $gl_func_isnanf = yes \ && test $gl_func_isnand = yes \ && test $gl_func_isnanl = yes; then AC_MSG_RESULT([yes]) ISNAN_LIBM= dnl Append $ISNANF_LIBM to ISNAN_LIBM, avoiding gratuitous duplicates. case " $ISNAN_LIBM " in *" $ISNANF_LIBM "*) ;; *) ISNAN_LIBM="$ISNAN_LIBM $ISNANF_LIBM" ;; esac dnl Append $ISNAND_LIBM to ISNAN_LIBM, avoiding gratuitous duplicates. case " $ISNAN_LIBM " in *" $ISNAND_LIBM "*) ;; *) ISNAN_LIBM="$ISNAN_LIBM $ISNAND_LIBM" ;; esac dnl Append $ISNANL_LIBM to ISNAN_LIBM, avoiding gratuitous duplicates. case " $ISNAN_LIBM " in *" $ISNANL_LIBM "*) ;; *) ISNAN_LIBM="$ISNAN_LIBM $ISNANL_LIBM" ;; esac else AC_MSG_RESULT([no]) dnl REPLACE_ISNAN=1 also makes sure the rpl_isnan[fdl] functions get built. REPLACE_ISNAN=1 ISNAN_LIBM= fi AC_SUBST([ISNAN_LIBM]) ]) pspp-1.0.1/gl/m4/snprintf-posix.m40000644000175000017500000001401013124536242013601 00000000000000# snprintf-posix.m4 serial 14 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SNPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_snprintf_posix=no AC_CHECK_FUNCS([snprintf]) if test $ac_cv_func_snprintf = yes; then gl_SNPRINTF_TRUNCATION_C99 gl_SNPRINTF_RETVAL_C99 gl_SNPRINTF_DIRECTIVE_N gl_SNPRINTF_SIZE1 gl_VSNPRINTF_ZEROSIZE_C99 case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) case "$gl_cv_func_snprintf_truncation_c99" in *yes) case "$gl_cv_func_snprintf_retval_c99" in *yes) case "$gl_cv_func_snprintf_directive_n" in *yes) case "$gl_cv_func_snprintf_size1" in *yes) case "$gl_cv_func_vsnprintf_zerosize_c99" in *yes) # snprintf exists and is # already POSIX compliant. gl_cv_func_snprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac fi if test $gl_cv_func_snprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_SNPRINTF fi ]) pspp-1.0.1/gl/m4/isnand.m40000644000175000017500000000525113124536242012061 00000000000000# isnand.m4 serial 11 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to get or define isnand(). AC_DEFUN([gl_FUNC_ISNAND], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) ISNAND_LIBM= gl_HAVE_ISNAND_NO_LIBM if test $gl_cv_func_isnand_no_libm = no; then gl_HAVE_ISNAND_IN_LIBM if test $gl_cv_func_isnand_in_libm = yes; then ISNAND_LIBM=-lm fi fi dnl The variable gl_func_isnand set here is used by isnan.m4. if test $gl_cv_func_isnand_no_libm = yes \ || test $gl_cv_func_isnand_in_libm = yes; then gl_func_isnand=yes else gl_func_isnand=no HAVE_ISNAND=0 fi AC_SUBST([ISNAND_LIBM]) ]) dnl Check how to get or define isnand() without linking with libm. AC_DEFUN([gl_FUNC_ISNAND_NO_LIBM], [ gl_HAVE_ISNAND_NO_LIBM gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm if test $gl_cv_func_isnand_no_libm = yes; then AC_DEFINE([HAVE_ISNAND_IN_LIBC], [1], [Define if the isnan(double) function is available in libc.]) fi ]) dnl Prerequisites of replacement isnand definition. It does not need -lm. AC_DEFUN([gl_PREREQ_ISNAND], [ AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) ]) dnl Test whether isnand() can be used with libm. AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM], [ AC_CACHE_CHECK([whether isnan(double) can be used with libm], [gl_cv_func_isnand_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) #elif defined isnan # undef isnand # define isnand(x) isnan ((double)(x)) #endif double x;]], [[return isnand (x);]])], [gl_cv_func_isnand_in_libm=yes], [gl_cv_func_isnand_in_libm=no]) LIBS="$save_LIBS" ]) ]) AC_DEFUN([gl_HAVE_ISNAND_NO_LIBM], [ AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm], [gl_cv_func_isnand_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) #else # undef isnand # define isnand(x) isnan ((double)(x)) #endif double x;]], [[return isnand (x);]])], [gl_cv_func_isnand_no_libm=yes], [gl_cv_func_isnand_no_libm=no]) ]) ]) pspp-1.0.1/gl/m4/frexpl.m40000644000175000017500000001557013124536242012112 00000000000000# frexpl.m4 serial 21 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FREXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) dnl Persuade glibc to declare frexpl(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) dnl Check whether it's declared. dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include ]]) FREXPL_LIBM= if test $HAVE_DECL_FREXPL = 1; then gl_CHECK_FREXPL_NO_LIBM if test $gl_cv_func_frexpl_no_libm = no; then AC_CACHE_CHECK([whether frexpl() can be used with libm], [gl_cv_func_frexpl_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include long double x;]], [[int e; return frexpl (x, &e) > 0;]])], [gl_cv_func_frexpl_in_libm=yes], [gl_cv_func_frexpl_in_libm=no]) LIBS="$save_LIBS" ]) if test $gl_cv_func_frexpl_in_libm = yes; then FREXPL_LIBM=-lm fi fi if test $gl_cv_func_frexpl_no_libm = yes \ || test $gl_cv_func_frexpl_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $FREXPL_LIBM" gl_FUNC_FREXPL_WORKS LIBS="$save_LIBS" case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl=yes ;; *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl=no fi if test $gl_func_frexpl = yes; then AC_DEFINE([HAVE_FREXPL], [1], [Define if the frexpl() function is available.]) fi fi if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then dnl Find libraries needed to link lib/frexpl.c. if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then AC_REQUIRE([gl_FUNC_FREXP]) FREXPL_LIBM="$FREXP_LIBM" else FREXPL_LIBM= fi fi AC_SUBST([FREXPL_LIBM]) ]) AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) dnl Check whether it's declared. dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include ]]) if test $HAVE_DECL_FREXPL = 1; then gl_CHECK_FREXPL_NO_LIBM if test $gl_cv_func_frexpl_no_libm = yes; then gl_FUNC_FREXPL_WORKS case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl_no_libm=yes ;; *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl_no_libm=no dnl Set REPLACE_FREXPL here because the system may have frexpl in libm. REPLACE_FREXPL=1 fi if test $gl_func_frexpl_no_libm = yes; then AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1], [Define if the frexpl() function is available in libc.]) fi fi ]) dnl Test whether frexpl() can be used without linking with libm. dnl Set gl_cv_func_frexpl_no_libm to 'yes' or 'no' accordingly. AC_DEFUN([gl_CHECK_FREXPL_NO_LIBM], [ AC_CACHE_CHECK([whether frexpl() can be used without linking with libm], [gl_cv_func_frexpl_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include long double x;]], [[int e; return frexpl (x, &e) > 0;]])], [gl_cv_func_frexpl_no_libm=yes], [gl_cv_func_frexpl_no_libm=no]) ]) ]) dnl Test whether frexpl() works on finite numbers (this fails on dnl Mac OS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers dnl (this fails on Mac OS X 10.5/i386), and also on infinite numbers (this dnl fails e.g. on IRIX 6.5 and mingw). AC_DEFUN([gl_FUNC_FREXPL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether frexpl works], [gl_cv_func_frexpl_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Override the values of , like done in float.in.h. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP #endif #if defined __sgi && (LDBL_MANT_DIG >= 106) # if defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP # endif #endif extern #ifdef __cplusplus "C" #endif long double frexpl (long double, int *); int main() { int result = 0; volatile long double x; /* Test on finite numbers that fails on AIX 5.1. */ x = 16.0L; { int exp = -9999; frexpl (x, &exp); if (exp != 5) result |= 1; } /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl function returns an invalid (incorrectly normalized) value: it returns y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } but the correct result is 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ x = 1.01L; { int exp = -9999; long double y = frexpl (x, &exp); if (!(exp == 1 && y == 0.505L)) result |= 2; } /* Test on large finite numbers. This fails on BeOS at i = 16322, while LDBL_MAX_EXP = 16384. In the loop end test, we test x against Infinity, rather than comparing i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ { int i; for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) { int exp = -9999; frexpl (x, &exp); if (exp != i) { result |= 4; break; } } } /* Test on denormalized numbers. */ { int i; for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) ; if (x > 0.0L) { int exp; long double y = frexpl (x, &exp); /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */ if (exp != LDBL_MIN_EXP - 1) result |= 8; } } /* Test on infinite numbers. */ x = 1.0L / 0.0L; { int exp; long double y = frexpl (x, &exp); if (y != x) result |= 16; } return result; }]])], [gl_cv_func_frexpl_works=yes], [gl_cv_func_frexpl_works=no], [ changequote(,)dnl case "$host_os" in aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) gl_cv_func_frexpl_works="guessing no";; *) gl_cv_func_frexpl_works="guessing yes";; esac changequote([,])dnl ]) ]) ]) pspp-1.0.1/gl/m4/fseek.m40000644000175000017500000000100513124536242011673 00000000000000# fseek.m4 serial 4 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FSEEK], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_FSEEKO]) dnl When fseeko needs fixes, fseek needs them too. if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then REPLACE_FSEEK=1 fi ]) pspp-1.0.1/gl/m4/unistd_h.m40000644000175000017500000002226413124536242012425 00000000000000# unistd_h.m4 serial 70 dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Simon Josefsson, Bruno Haible. AC_DEFUN([gl_UNISTD_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([unistd.h]) if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi AC_SUBST([HAVE_UNISTD_H]) dnl Ensure the type pid_t gets defined. AC_REQUIRE([AC_TYPE_PID_T]) dnl Determine WINDOWS_64_BIT_OFF_T. AC_REQUIRE([gl_TYPE_OFF_T]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ #if HAVE_UNISTD_H # include #endif /* Some systems declare various items in the wrong headers. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # endif #endif ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat truncate ttyname_r unlink unlinkat usleep]) ]) AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR]) GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) GNULIB_DUP=0; AC_SUBST([GNULIB_DUP]) GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) GNULIB_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC]) GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY]) GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) GNULIB_READ=0; AC_SUBST([GNULIB_READ]) GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME]) GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) GNULIB_TRUNCATE=0; AC_SUBST([GNULIB_TRUNCATE]) GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) HAVE_LINK=1; AC_SUBST([HAVE_LINK]) HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) HAVE_TRUNCATE=1; AC_SUBST([HAVE_TRUNCATE]) HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN]) HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) REPLACE_READ=0; AC_SUBST([REPLACE_READ]) REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT]) REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE]) REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) ]) pspp-1.0.1/gl/m4/stddef_h.m40000644000175000017500000000321613124536242012364 00000000000000dnl A placeholder for , for platforms that have issues. # stddef_h.m4 serial 5 dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDDEF_H], [ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) STDDEF_H= AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h], [[#include ]]) if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], [gl_cv_decl_null_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include int test[2 * (sizeof NULL == sizeof (void *)) -1]; ]])], [gl_cv_decl_null_works=yes], [gl_cv_decl_null_works=no])]) if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi AC_SUBST([STDDEF_H]) AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) if test -n "$STDDEF_H"; then gl_NEXT_HEADERS([stddef.h]) fi ]) AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) AC_DEFUN([gl_STDDEF_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T]) HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) ]) pspp-1.0.1/gl/m4/strftime.m40000644000175000017500000000115113124536242012435 00000000000000# serial 34 # Copyright (C) 1996-1997, 1999-2007, 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Jim Meyering and Paul Eggert. AC_DEFUN([gl_FUNC_GNU_STRFTIME], [ # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. AC_REQUIRE([AC_STRUCT_TIMEZONE]) AC_REQUIRE([gl_TM_GMTOFF]) AC_CHECK_FUNCS_ONCE([tzset]) AC_DEFINE([my_strftime], [nstrftime], [Define to the name of the strftime replacement function.]) ]) pspp-1.0.1/gl/m4/string_h.m40000644000175000017500000001271413124536242012424 00000000000000# Configure a GNU-like replacement for . # Copyright (C) 2007-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 21 # Written by Paul Eggert. AC_DEFUN([gl_HEADER_STRING_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_STRING_H_BODY]) ]) AC_DEFUN([gl_HEADER_STRING_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_NEXT_HEADERS([string.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include ]], [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp]) ]) AC_DEFUN([gl_STRING_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) ]) pspp-1.0.1/gl/m4/vasprintf.m40000644000175000017500000000210013124536242012607 00000000000000# vasprintf.m4 serial 6 dnl Copyright (C) 2002-2003, 2006-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VASPRINTF], [ AC_CHECK_FUNCS([vasprintf]) if test $ac_cv_func_vasprintf = no; then gl_REPLACE_VASPRINTF fi ]) AC_DEFUN([gl_REPLACE_VASPRINTF], [ AC_LIBOBJ([vasprintf]) AC_LIBOBJ([asprintf]) AC_REQUIRE([gl_STDIO_H_DEFAULTS]) if test $ac_cv_func_vasprintf = yes; then REPLACE_VASPRINTF=1 else HAVE_VASPRINTF=0 fi gl_PREREQ_VASPRINTF_H gl_PREREQ_VASPRINTF gl_PREREQ_ASPRINTF ]) # Prerequisites of the vasprintf portion of lib/stdio.h. AC_DEFUN([gl_PREREQ_VASPRINTF_H], [ dnl Persuade glibc to declare asprintf() and vasprintf(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) # Prerequisites of lib/vasprintf.c. AC_DEFUN([gl_PREREQ_VASPRINTF], [ ]) # Prerequisites of lib/asprintf.c. AC_DEFUN([gl_PREREQ_ASPRINTF], [ ]) pspp-1.0.1/gl/m4/floor.m40000644000175000017500000000603213132510756011725 00000000000000# floor.m4 serial 9 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FLOOR], [ m4_divert_text([DEFAULTS], [gl_floor_required=plain]) AC_REQUIRE([gl_MATH_H_DEFAULTS]) dnl Test whether floor() can be used without libm. gl_FUNC_FLOOR_LIBS if test "$FLOOR_LIBM" = "?"; then FLOOR_LIBM= fi m4_ifdef([gl_FUNC_FLOOR_IEEE], [ if test $gl_floor_required = ieee && test $REPLACE_FLOOR = 0; then AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether floor works according to ISO C 99 with IEC 60559], [gl_cv_func_floor_ieee], [ save_LIBS="$LIBS" LIBS="$LIBS $FLOOR_LIBM" AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include ]gl_DOUBLE_MINUS_ZERO_CODE[ ]gl_DOUBLE_SIGNBIT_CODE[ static double dummy (double f) { return 0; } int main (int argc, char *argv[]) { double (*my_floor) (double) = argc ? floor : dummy; /* Test whether floor (-0.0) is -0.0. */ if (signbitd (minus_zerod) && !signbitd (my_floor (minus_zerod))) return 1; return 0; } ]])], [gl_cv_func_floor_ieee=yes], [gl_cv_func_floor_ieee=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_floor_ieee="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_floor_ieee="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_floor_ieee="guessing no" ;; esac ]) LIBS="$save_LIBS" ]) case "$gl_cv_func_floor_ieee" in *yes) ;; *) REPLACE_FLOOR=1 ;; esac fi ]) if test $REPLACE_FLOOR = 1; then dnl No libraries are needed to link lib/floor.c. FLOOR_LIBM= fi AC_SUBST([FLOOR_LIBM]) ]) # Determines the libraries needed to get the floor() function. # Sets FLOOR_LIBM. AC_DEFUN([gl_FUNC_FLOOR_LIBS], [ gl_CACHE_VAL_SILENT([gl_cv_func_floor_libm], [ gl_cv_func_floor_libm=? AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include double x;]], [[x = floor(x);]])], [gl_cv_func_floor_libm=]) if test "$gl_cv_func_floor_libm" = "?"; then save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include double x;]], [[x = floor(x);]])], [gl_cv_func_floor_libm="-lm"]) LIBS="$save_LIBS" fi ]) FLOOR_LIBM="$gl_cv_func_floor_libm" ]) pspp-1.0.1/gl/m4/gettimeofday.m40000644000175000017500000001103313132510756013262 00000000000000# serial 24 # Copyright (C) 2001-2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Jim Meyering. AC_DEFUN([gl_FUNC_GETTIMEOFDAY], [ AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_HEADER_SYS_TIME_H]) AC_CHECK_FUNCS_ONCE([gettimeofday]) gl_gettimeofday_timezone=void if test $ac_cv_func_gettimeofday != yes; then HAVE_GETTIMEOFDAY=0 else gl_FUNC_GETTIMEOFDAY_CLOBBER AC_CACHE_CHECK([for gettimeofday with POSIX signature], [gl_cv_func_gettimeofday_posix_signature], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include struct timeval c; int gettimeofday (struct timeval *restrict, void *restrict); ]], [[/* glibc uses struct timezone * rather than the POSIX void * if _GNU_SOURCE is defined. However, since the only portable use of gettimeofday uses NULL as the second parameter, and since the glibc definition is actually more typesafe, it is not worth wrapping this to get a compliant signature. */ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday; int x = f (&c, 0); return !(x | c.tv_sec | c.tv_usec); ]])], [gl_cv_func_gettimeofday_posix_signature=yes], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include int gettimeofday (struct timeval *restrict, struct timezone *restrict); ]])], [gl_cv_func_gettimeofday_posix_signature=almost], [gl_cv_func_gettimeofday_posix_signature=no])])]) if test $gl_cv_func_gettimeofday_posix_signature = almost; then gl_gettimeofday_timezone='struct timezone' elif test $gl_cv_func_gettimeofday_posix_signature != yes; then REPLACE_GETTIMEOFDAY=1 fi dnl If we override 'struct timeval', we also have to override gettimeofday. if test $REPLACE_STRUCT_TIMEVAL = 1; then REPLACE_GETTIMEOFDAY=1 fi dnl On mingw, the original gettimeofday has only a precision of 15.6 dnl milliseconds. So override it. case "$host_os" in mingw*) REPLACE_GETTIMEOFDAY=1 ;; esac fi AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone], [Define this to 'void' or 'struct timezone' to match the system's declaration of the second argument to gettimeofday.]) ]) dnl See if gettimeofday clobbers the static buffer that localtime uses dnl for its return value. The gettimeofday function from Mac OS X 10.0.4 dnl (i.e., Darwin 1.3.7) has this problem. dnl dnl If it does, then arrange to use gettimeofday and localtime only via dnl the wrapper functions that work around the problem. AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], [ AC_REQUIRE([gl_HEADER_SYS_TIME_H]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], [gl_cv_func_gettimeofday_clobber], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include #include ]], [[ time_t t = 0; struct tm *lt; struct tm saved_lt; struct timeval tv; lt = localtime (&t); saved_lt = *lt; gettimeofday (&tv, NULL); return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; ]])], [gl_cv_func_gettimeofday_clobber=no], [gl_cv_func_gettimeofday_clobber=yes], [# When cross-compiling: case "$host_os" in # Guess all is fine on glibc systems. *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; # Guess no on native Windows. mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; esac ])]) case "$gl_cv_func_gettimeofday_clobber" in *yes) REPLACE_GETTIMEOFDAY=1 AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1], [Define if gettimeofday clobbers the localtime buffer.]) gl_LOCALTIME_BUFFER_NEEDED ;; esac ]) # Prerequisites of lib/gettimeofday.c. AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [:]) pspp-1.0.1/gl/m4/absolute-header.m40000644000175000017500000001034713124536242013653 00000000000000# absolute-header.m4 serial 16 dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Derek Price. # gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...) # --------------------------------------- # Find the absolute name of a header file, testing first if the header exists. # If the header were sys/inttypes.h, this macro would define # ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h # in config.h # (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"'). # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". # Use '""', not '<>', so that the /// cannot be confused with a C99 comment. # Note: This macro assumes that the header file is not empty after # preprocessing, i.e. it does not only define preprocessor macros but also # provides some type/enum definitions or function/variable declarations. AC_DEFUN([gl_ABSOLUTE_HEADER], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_PREPROC_REQUIRE()dnl dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted dnl until we can assume autoconf 2.64 or newer. m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_absolute_header], [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>], m4_defn([gl_absolute_header]), [AS_VAR_PUSHDEF([ac_header_exists], [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl if test AS_VAR_GET(ac_header_exists) = yes; then gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME])) fi AS_VAR_POPDEF([ac_header_exists])dnl ])dnl AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])), ["AS_VAR_GET(gl_absolute_header)"], [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.]) AS_VAR_POPDEF([gl_absolute_header])dnl ])dnl ])# gl_ABSOLUTE_HEADER # gl_ABSOLUTE_HEADER_ONE(HEADER) # ------------------------------ # Like gl_ABSOLUTE_HEADER, except that: # - it assumes that the header exists, # - it uses the current CPPFLAGS, # - it does not cache the result, # - it is silent. AC_DEFUN([gl_ABSOLUTE_HEADER_ONE], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])]) dnl AIX "xlc -E" and "cc -E" omit #line directives for header files dnl that contain only a #include of other header files and no dnl non-comment tokens of their own. This leads to a failure to dnl detect the absolute name of , , dnl and others. The workaround is to force preservation of comments dnl through option -C. This ensures all necessary #line directives dnl are present. GCC supports option -C as well. case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac changequote(,) case "$host_os" in mingw*) dnl For the sake of native Windows compilers (excluding gcc), dnl treat backslash as a directory separator, like /. dnl Actually, these compilers use a double-backslash as dnl directory separator, inside the dnl # line "filename" dnl directives. gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac dnl A sed expression that turns a string into a basic regular dnl expression, for use within "/.../". gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo '$1' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' changequote([,]) dnl eval is necessary to expand gl_absname_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl so use subshell. AS_VAR_SET([gl_cv_absolute_]AS_TR_SH([[$1]]), [`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | sed -n "$gl_absolute_header_sed"`]) ]) pspp-1.0.1/gl/m4/tzset.m40000644000175000017500000000456213132510757011764 00000000000000# serial 10 # Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # See if we have a working tzset function. # If so, arrange to compile the wrapper function. # For at least Solaris 2.5.1 and 2.6, this is necessary # because tzset can clobber the contents of the buffer # used by localtime. # Written by Paul Eggert and Jim Meyering. AC_DEFUN([gl_FUNC_TZSET], [ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([tzset]) if test $ac_cv_func_tzset = no; then HAVE_TZSET=0 fi gl_FUNC_TZSET_CLOBBER REPLACE_TZSET=0 case "$gl_cv_func_tzset_clobber" in *yes) REPLACE_TZSET=1 AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1], [Define if tzset clobbers localtime's static buffer.]) gl_LOCALTIME_BUFFER_NEEDED ;; esac case "$host_os" in mingw*) REPLACE_TZSET=1 ;; esac ]) # Set gl_cv_func_tzset_clobber. AC_DEFUN([gl_FUNC_TZSET_CLOBBER], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether tzset clobbers localtime buffer], [gl_cv_func_tzset_clobber], [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include int main () { time_t t1 = 853958121; struct tm *p, s; putenv ("TZ=GMT0"); p = localtime (&t1); s = *p; putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"); tzset (); return (p->tm_year != s.tm_year || p->tm_mon != s.tm_mon || p->tm_mday != s.tm_mday || p->tm_hour != s.tm_hour || p->tm_min != s.tm_min || p->tm_sec != s.tm_sec); } ]])], [gl_cv_func_tzset_clobber=no], [gl_cv_func_tzset_clobber=yes], [case "$host_os" in # Guess all is fine on glibc systems. *-gnu*) gl_cv_func_tzset_clobber="guessing no" ;; # Guess no on native Windows. mingw*) gl_cv_func_tzset_clobber="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_func_tzset_clobber="guessing yes" ;; esac ]) ]) AC_DEFINE([HAVE_RUN_TZSET_TEST], [1], [Define to 1 if you have run the test for working tzset.]) ]) pspp-1.0.1/gl/m4/getopt.m40000644000175000017500000003131113124536242012103 00000000000000# getopt.m4 serial 46 dnl Copyright (C) 2002-2006, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Request a POSIX compliant getopt function. AC_DEFUN([gl_FUNC_GETOPT_POSIX], [ m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) dnl Other modules can request the gnulib implementation of the getopt dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS. dnl argp.m4 does this. m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [ REPLACE_GETOPT=1 ], [ REPLACE_GETOPT=0 if test -n "$gl_replace_getopt"; then REPLACE_GETOPT=1 fi ]) if test $REPLACE_GETOPT = 1; then dnl Arrange for getopt.h to be created. gl_GETOPT_SUBSTITUTE_HEADER fi ]) # Request a POSIX compliant getopt function with GNU extensions (such as # options with optional arguments) and the functions getopt_long, # getopt_long_only. AC_DEFUN([gl_FUNC_GETOPT_GNU], [ dnl Set the variable gl_getopt_required, so that all invocations of dnl gl_GETOPT_CHECK_HEADERS in the scope of the current configure file dnl will check for getopt with GNU extensions. dnl This means that if one gnulib-tool invocation requests getopt-posix dnl and another gnulib-tool invocation requests getopt-gnu, it is as if dnl both had requested getopt-gnu. m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) dnl No need to invoke gl_FUNC_GETOPT_POSIX here; this is automatically dnl done through the module dependency getopt-gnu -> getopt-posix. ]) # Determine whether to replace the entire getopt facility. AC_DEFUN([gl_GETOPT_CHECK_HEADERS], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON dnl Persuade Solaris to declare optarg, optind, opterr, optopt. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) gl_CHECK_NEXT_HEADERS([getopt.h]) if test $ac_cv_header_getopt_h = yes; then HAVE_GETOPT_H=1 else HAVE_GETOPT_H=0 fi AC_SUBST([HAVE_GETOPT_H]) gl_replace_getopt= dnl Test whether is available. if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) fi dnl Test whether the function getopt_long is available. if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes]) fi dnl POSIX 2008 does not specify leading '+' behavior, but see dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on dnl the next version of POSIX. For now, we only guarantee leading '+' dnl behavior with getopt-gnu. if test -z "$gl_replace_getopt"; then AC_CACHE_CHECK([whether getopt is POSIX compatible], [gl_cv_func_getopt_posix], [ dnl Merging these three different test programs into a single one dnl would require a reset mechanism. On BSD systems, it can be done dnl through 'optreset'; on some others (glibc), it can be done by dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1, dnl Solaris 9, musl libc), there is no such mechanism. if test $cross_compiling = no; then dnl Sanity check. Succeeds everywhere (except on MSVC, dnl which lacks and getopt() entirely). AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include int main () { static char program[] = "program"; static char a[] = "-a"; static char foo[] = "foo"; static char bar[] = "bar"; char *argv[] = { program, a, foo, bar, NULL }; int c; c = getopt (4, argv, "ab"); if (!(c == 'a')) return 1; c = getopt (4, argv, "ab"); if (!(c == -1)) return 2; if (!(optind == 2)) return 3; return 0; } ]])], [gl_cv_func_getopt_posix=maybe], [gl_cv_func_getopt_posix=no]) if test $gl_cv_func_getopt_posix = maybe; then dnl Sanity check with '+'. Succeeds everywhere (except on MSVC, dnl which lacks and getopt() entirely). AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include int main () { static char program[] = "program"; static char donald[] = "donald"; static char p[] = "-p"; static char billy[] = "billy"; static char duck[] = "duck"; static char a[] = "-a"; static char bar[] = "bar"; char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; int c; c = getopt (7, argv, "+abp:q:"); if (!(c == -1)) return 4; if (!(strcmp (argv[0], "program") == 0)) return 5; if (!(strcmp (argv[1], "donald") == 0)) return 6; if (!(strcmp (argv[2], "-p") == 0)) return 7; if (!(strcmp (argv[3], "billy") == 0)) return 8; if (!(strcmp (argv[4], "duck") == 0)) return 9; if (!(strcmp (argv[5], "-a") == 0)) return 10; if (!(strcmp (argv[6], "bar") == 0)) return 11; if (!(optind == 1)) return 12; return 0; } ]])], [gl_cv_func_getopt_posix=maybe], [gl_cv_func_getopt_posix=no]) fi if test $gl_cv_func_getopt_posix = maybe; then dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug. AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include int main () { static char program[] = "program"; static char ab[] = "-ab"; char *argv[3] = { program, ab, NULL }; if (getopt (2, argv, "ab:") != 'a') return 13; if (getopt (2, argv, "ab:") != '?') return 14; if (optopt != 'b') return 15; if (optind != 2) return 16; return 0; } ]])], [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no]) fi else case "$host_os" in darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; *) gl_cv_func_getopt_posix="guessing yes";; esac fi ]) case "$gl_cv_func_getopt_posix" in *no) gl_replace_getopt=yes ;; esac fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu], [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the # optstring is necessary for programs like m4 that have POSIX-mandated # semantics for supporting options interspersed with files. # Also, since getopt_long is a GNU extension, we require optind=0. # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; # so take care to revert to the correct (non-)export state. dnl GNU Coding Standards currently allow awk but not env; besides, env dnl is ambiguous with environment values that contain newlines. gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" #include #include ]GL_NOCRASH[ ]], [[ int result = 0; nocrash_init(); /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { static char conftest[] = "conftest"; static char plus[] = "-+"; char *argv[3] = { conftest, plus, NULL }; opterr = 0; if (getopt (2, argv, "+a") != '?') result |= 1; } /* This code succeeds on glibc 2.8, mingw, and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ { static char program[] = "program"; static char p[] = "-p"; static char foo[] = "foo"; static char bar[] = "bar"; char *argv[] = { program, p, foo, bar, NULL }; optind = 1; if (getopt (4, argv, "p::") != 'p') result |= 2; else if (optarg != NULL) result |= 4; else if (getopt (4, argv, "p::") != -1) result |= 6; else if (optind != 2) result |= 8; } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { static char program[] = "program"; static char foo[] = "foo"; static char p[] = "-p"; char *argv[] = { program, foo, p, NULL }; optind = 0; if (getopt (3, argv, "-p") != 1) result |= 16; else if (getopt (3, argv, "-p") != 'p') result |= 16; } /* This code fails on glibc 2.11. */ { static char program[] = "program"; static char b[] = "-b"; static char a[] = "-a"; char *argv[] = { program, b, a, NULL }; optind = opterr = 0; if (getopt (3, argv, "+:a:b") != 'b') result |= 32; else if (getopt (3, argv, "+:a:b") != ':') result |= 32; } /* This code dumps core on glibc 2.14. */ { static char program[] = "program"; static char w[] = "-W"; static char dummy[] = "dummy"; char *argv[] = { program, w, dummy, NULL }; optind = opterr = 1; if (getopt (3, argv, "W;") != 'W') result |= 64; } return result; ]])], [gl_cv_func_getopt_gnu=yes], [gl_cv_func_getopt_gnu=no], [dnl Cross compiling. Assume the worst, even on glibc platforms. gl_cv_func_getopt_gnu="guessing no" ]) case $gl_had_POSIXLY_CORRECT in exported) ;; yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;; *) AS_UNSET([POSIXLY_CORRECT]) ;; esac ]) if test "$gl_cv_func_getopt_gnu" != yes; then gl_replace_getopt=yes else AC_CACHE_CHECK([for working GNU getopt_long function], [gl_cv_func_getopt_long_gnu], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include ]], [[static const struct option long_options[] = { { "xtremely-",no_argument, NULL, 1003 }, { "xtra", no_argument, NULL, 1001 }, { "xtreme", no_argument, NULL, 1002 }, { "xtremely", no_argument, NULL, 1003 }, { NULL, 0, NULL, 0 } }; /* This code fails on OpenBSD 5.0. */ { static char program[] = "program"; static char xtremel[] = "--xtremel"; char *argv[] = { program, xtremel, NULL }; int option_index; optind = 1; opterr = 0; if (getopt_long (2, argv, "", long_options, &option_index) != 1003) return 1; } return 0; ]])], [gl_cv_func_getopt_long_gnu=yes], [gl_cv_func_getopt_long_gnu=no], [dnl Cross compiling. Guess no on OpenBSD, yes otherwise. case "$host_os" in openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; *) gl_cv_func_getopt_long_gnu="guessing yes";; esac ]) ]) case "$gl_cv_func_getopt_long_gnu" in *yes) ;; *) gl_replace_getopt=yes ;; esac fi fi ]) AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], [ AC_CHECK_HEADERS_ONCE([sys/cdefs.h]) if test $ac_cv_header_sys_cdefs_h = yes; then HAVE_SYS_CDEFS_H=1 else HAVE_SYS_CDEFS_H=0 fi AC_SUBST([HAVE_SYS_CDEFS_H]) AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], [Define to rpl_ if the getopt replacement functions and variables should be used.]) GETOPT_H=getopt.h GETOPT_CDEFS_H=getopt-cdefs.h AC_SUBST([GETOPT_H]) AC_SUBST([GETOPT_CDEFS_H]) ]) pspp-1.0.1/gl/m4/vsprintf-posix.m40000644000175000017500000001024713124536242013621 00000000000000# vsprintf-posix.m4 serial 12 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VSPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_vsprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # vsprintf exists and is # already POSIX compliant. gl_cv_func_vsprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_vsprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_VSPRINTF fi ]) AC_DEFUN([gl_REPLACE_VSPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([vsprintf]) REPLACE_VSPRINTF=1 gl_PREREQ_VSPRINTF ]) AC_DEFUN([gl_PREREQ_VSPRINTF], [:]) pspp-1.0.1/gl/m4/frexp.m40000644000175000017500000001207113132510756011730 00000000000000# frexp.m4 serial 16 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FREXP], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_FREXP_NO_LIBM]) FREXP_LIBM= if test $gl_cv_func_frexp_no_libm = no; then AC_CACHE_CHECK([whether frexp() can be used with libm], [gl_cv_func_frexp_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include double x;]], [[int e; return frexp (x, &e) > 0;]])], [gl_cv_func_frexp_in_libm=yes], [gl_cv_func_frexp_in_libm=no]) LIBS="$save_LIBS" ]) if test $gl_cv_func_frexp_in_libm = yes; then FREXP_LIBM=-lm fi fi if test $gl_cv_func_frexp_no_libm = yes \ || test $gl_cv_func_frexp_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $FREXP_LIBM" gl_FUNC_FREXP_WORKS LIBS="$save_LIBS" case "$gl_cv_func_frexp_works" in *yes) gl_func_frexp=yes ;; *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;; esac else gl_func_frexp=no fi if test $gl_func_frexp = yes; then AC_DEFINE([HAVE_FREXP], [1], [Define if the frexp() function is available and works.]) fi AC_SUBST([FREXP_LIBM]) ]) AC_DEFUN([gl_FUNC_FREXP_NO_LIBM], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_FREXP_NO_LIBM]) if test $gl_cv_func_frexp_no_libm = yes; then gl_FUNC_FREXP_WORKS case "$gl_cv_func_frexp_works" in *yes) gl_func_frexp_no_libm=yes ;; *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;; esac else gl_func_frexp_no_libm=no dnl Set REPLACE_FREXP here because the system may have frexp in libm. REPLACE_FREXP=1 fi if test $gl_func_frexp_no_libm = yes; then AC_DEFINE([HAVE_FREXP_IN_LIBC], [1], [Define if the frexp() function is available in libc.]) fi ]) dnl Test whether frexp() can be used without linking with libm. dnl Set gl_cv_func_frexp_no_libm to 'yes' or 'no' accordingly. AC_DEFUN([gl_CHECK_FREXP_NO_LIBM], [ AC_CACHE_CHECK([whether frexp() can be used without linking with libm], [gl_cv_func_frexp_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include double x;]], [[int e; return frexp (x, &e) > 0;]])], [gl_cv_func_frexp_no_libm=yes], [gl_cv_func_frexp_no_libm=no]) ]) ]) dnl Test whether frexp() works also on denormalized numbers (this fails e.g. on dnl NetBSD 3.0), on infinite numbers (this fails e.g. on IRIX 6.5 and mingw), dnl and on negative zero (this fails e.g. on NetBSD 4.99 and mingw). AC_DEFUN([gl_FUNC_FREXP_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_DECLS_ONCE([alarm]) AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #if HAVE_DECL_ALARM # include # include #endif /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. ICC 10.0 has a bug when optimizing the expression -zero. The expression -DBL_MIN * DBL_MIN does not work when cross-compiling to PowerPC on Mac OS X 10.5. */ #if defined __hpux || defined __sgi || defined __ICC static double compute_minus_zero (void) { return -DBL_MIN * DBL_MIN; } # define minus_zero compute_minus_zero () #else double minus_zero = -0.0; #endif int main() { int result = 0; int i; volatile double x; double zero = 0.0; #if HAVE_DECL_ALARM /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite number. Let the test fail in this case. */ signal (SIGALRM, SIG_DFL); alarm (5); #endif /* Test on denormalized numbers. */ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) ; if (x > 0.0) { int exp; double y = frexp (x, &exp); /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. On NetBSD: y = 0.75. Correct: y = 0.5. */ if (y != 0.5) result |= 1; } /* Test on infinite numbers. */ x = 1.0 / zero; { int exp; double y = frexp (x, &exp); if (y != x) result |= 2; } /* Test on negative zero. */ x = minus_zero; { int exp; double y = frexp (x, &exp); if (memcmp (&y, &x, sizeof x)) result |= 4; } return result; }]])], [gl_cv_func_frexp_works=yes], [gl_cv_func_frexp_works=no], [case "$host_os" in netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;; mingw*) # Guess yes with MSVC, no with mingw. AC_EGREP_CPP([Good], [ #ifdef _MSC_VER Good #endif ], [gl_cv_func_frexp_works="guessing yes"], [gl_cv_func_frexp_works="guessing no"]) ;; *) gl_cv_func_frexp_works="guessing yes" ;; esac ]) ]) ]) pspp-1.0.1/gl/m4/time_r.m40000644000175000017500000000353013124536242012062 00000000000000dnl Reentrant time functions: localtime_r, gmtime_r. dnl Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_TIME_R], [ dnl Persuade glibc and Solaris to declare localtime_r. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is dnl not defined. AC_CHECK_DECLS([localtime_r], [], [], [[#include ]]) if test $ac_cv_have_decl_localtime_r = no; then HAVE_DECL_LOCALTIME_R=0 fi AC_CHECK_FUNCS_ONCE([localtime_r]) if test $ac_cv_func_localtime_r = yes; then HAVE_LOCALTIME_R=1 AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature], [gl_cv_time_r_posix], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[/* We don't need to append 'restrict's to the argument types, even though the POSIX signature has the 'restrict's, since C99 says they can't affect type compatibility. */ struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; if (ptr) return 0; /* Check the return type is a pointer. On HP-UX 10 it is 'int'. */ *localtime_r (0, 0);]]) ], [gl_cv_time_r_posix=yes], [gl_cv_time_r_posix=no]) ]) if test $gl_cv_time_r_posix = yes; then REPLACE_LOCALTIME_R=0 else REPLACE_LOCALTIME_R=1 fi else HAVE_LOCALTIME_R=0 fi ]) # Prerequisites of lib/time_r.c. AC_DEFUN([gl_PREREQ_TIME_R], [ : ]) pspp-1.0.1/gl/m4/realloc.m40000644000175000017500000000510013124536242012217 00000000000000# realloc.m4 serial 14 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. m4_version_prereq([2.70], [] ,[ # This is adapted with modifications from upstream Autoconf here: # http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c AC_DEFUN([_AC_FUNC_REALLOC_IF], [ AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles AC_CHECK_HEADERS([stdlib.h]) AC_CACHE_CHECK([for GNU libc compatible realloc], [ac_cv_func_realloc_0_nonnull], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif ]], [[char *p = realloc (0, 0); int result = !p; free (p); return result;]]) ], [ac_cv_func_realloc_0_nonnull=yes], [ac_cv_func_realloc_0_nonnull=no], [case "$host_os" in # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) ac_cv_func_realloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_realloc_0_nonnull=no ;; esac ]) ]) AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2]) ])# AC_FUNC_REALLOC ]) # gl_FUNC_REALLOC_GNU # ------------------- # Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace # realloc if it is not. AC_DEFUN([gl_FUNC_REALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) dnl _AC_FUNC_REALLOC_IF is defined in Autoconf. _AC_FUNC_REALLOC_IF( [AC_DEFINE([HAVE_REALLOC_GNU], [1], [Define to 1 if your system has a GNU libc compatible 'realloc' function, and to 0 otherwise.])], [AC_DEFINE([HAVE_REALLOC_GNU], [0]) REPLACE_REALLOC=1 ]) ])# gl_FUNC_REALLOC_GNU # gl_FUNC_REALLOC_POSIX # --------------------- # Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it # fails), and replace realloc if it is not. AC_DEFUN([gl_FUNC_REALLOC_POSIX], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then AC_DEFINE([HAVE_REALLOC_POSIX], [1], [Define if the 'realloc' function is POSIX compliant.]) else REPLACE_REALLOC=1 fi ]) pspp-1.0.1/gl/m4/fatal-signal.m40000644000175000017500000000065613124536242013153 00000000000000# fatal-signal.m4 serial 9 dnl Copyright (C) 2003-2004, 2006, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FATAL_SIGNAL], [ AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T]) AC_CHECK_HEADERS_ONCE([unistd.h]) gl_PREREQ_SIG_HANDLER_H ]) pspp-1.0.1/gl/m4/strdup.m40000644000175000017500000000165713124536242012134 00000000000000# strdup.m4 serial 13 dnl Copyright (C) 2002-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRDUP], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([strdup]) AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi ]) AC_DEFUN([gl_FUNC_STRDUP_POSIX], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) AC_CHECK_FUNCS_ONCE([strdup]) if test $ac_cv_func_strdup = yes; then if test $gl_cv_func_malloc_posix != yes; then REPLACE_STRDUP=1 fi fi AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi ]) # Prerequisites of lib/strdup.c. AC_DEFUN([gl_PREREQ_STRDUP], [:]) pspp-1.0.1/gl/m4/threadlib.m40000644000175000017500000003572413124536242012553 00000000000000# threadlib.m4 serial 12 dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl gl_THREADLIB dnl ------------ dnl Tests for a multithreading library to be used. dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the dnl default is 'no', otherwise it is system dependent. In both cases, the user dnl can change the choice through the options --enable-threads=choice or dnl --disable-threads. dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, dnl USE_PTH_THREADS, USE_WINDOWS_THREADS dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with dnl libtool). dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for dnl programs that really need multithread functionality. The difference dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not. dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for dnl multithread-safe programs. AC_DEFUN([gl_THREADLIB_EARLY], [ AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) ]) dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. AC_DEFUN([gl_THREADLIB_EARLY_BODY], [ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that dnl influences the result of the autoconf tests that test for *_unlocked dnl declarations, on AIX 5 at least. Therefore it must come early. AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl AC_BEFORE([$0], [gl_ARGP])dnl AC_REQUIRE([AC_CANONICAL_HOST]) dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes dnl AC_GNU_SOURCE. m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], [AC_REQUIRE([AC_GNU_SOURCE])]) dnl Check for multithreading. m4_ifdef([gl_THREADLIB_DEFAULT_NO], [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) AC_ARG_ENABLE([threads], AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ AC_HELP_STRING([--disable-threads], [build without multithread safety])]), [gl_use_threads=$enableval], [if test -n "$gl_use_threads_default"; then gl_use_threads="$gl_use_threads_default" else changequote(,)dnl case "$host_os" in dnl Disable multithreading by default on OSF/1, because it interferes dnl with fork()/exec(): When msgexec is linked with -lpthread, its dnl child process gets an endless segmentation fault inside execvp(). dnl Disable multithreading by default on Cygwin 1.5.x, because it has dnl bugs that lead to endless loops or crashes. See dnl . osf*) gl_use_threads=no ;; cygwin*) case `uname -r` in 1.[0-5].*) gl_use_threads=no ;; *) gl_use_threads=yes ;; esac ;; *) gl_use_threads=yes ;; esac changequote([,])dnl fi ]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # For using : case "$host_os" in osf*) # On OSF/1, the compiler needs the flag -D_REENTRANT so that it # groks . cc also understands the flag -pthread, but # we don't use it because 1. gcc-2.95 doesn't understand -pthread, # 2. putting a flag into CPPFLAGS that has an effect on the linker # causes the AC_LINK_IFELSE test below to succeed unexpectedly, # leading to wrong values of LIBTHREAD and LTLIBTHREAD. CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac # Some systems optimize for single-threaded programs by default, and # need special flags to disable these optimizations. For example, the # definition of 'errno' in . case "$host_os" in aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; esac fi ]) dnl The guts of gl_THREADLIB. Needs to be expanded only once. AC_DEFUN([gl_THREADLIB_BODY], [ AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) gl_threads_api=none LIBTHREAD= LTLIBTHREAD= LIBMULTITHREAD= LTLIBMULTITHREAD= if test "$gl_use_threads" != no; then dnl Check whether the compiler and linker support weak declarations. AC_CACHE_CHECK([whether imported symbols can be declared weak], [gl_cv_have_weak], [gl_cv_have_weak=no dnl First, test whether the compiler accepts it syntactically. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[extern void xyzzy (); #pragma weak xyzzy]], [[xyzzy();]])], [gl_cv_have_weak=maybe]) if test $gl_cv_have_weak = maybe; then dnl Second, test whether it actually works. On Cygwin 1.7.2, with dnl gcc 4.3, symbols declared weak always evaluate to the address 0. AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #pragma weak fputs int main () { return (fputs == NULL); }]])], [gl_cv_have_weak=yes], [gl_cv_have_weak=no], [dnl When cross-compiling, assume that only ELF platforms support dnl weak symbols. AC_EGREP_CPP([Extensible Linking Format], [#ifdef __ELF__ Extensible Linking Format #endif ], [gl_cv_have_weak="guessing yes"], [gl_cv_have_weak="guessing no"]) ]) fi ]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. AC_CHECK_HEADER([pthread.h], [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) if test "$gl_have_pthread_h" = yes; then # Other possible tests: # -lpthreads (FSU threads, PCthreads) # -lgthreads gl_have_pthread= # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist # in libc. IRIX 6.5 has the first one in both libc and libpthread, but # the second one only in libpthread, and lock.c needs it. # # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 # needs -pthread for some reason. See: # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html save_LIBS=$LIBS for gl_pthread in '' '-pthread'; do LIBS="$LIBS $gl_pthread" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include pthread_mutex_t m; pthread_mutexattr_t ma; ]], [[pthread_mutex_lock (&m); pthread_mutexattr_init (&ma);]])], [gl_have_pthread=yes LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread]) LIBS=$save_LIBS test -n "$gl_have_pthread" && break done # Test for libpthread by looking for pthread_kill. (Not pthread_self, # since it is defined as a macro on OSF/1.) if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then # The program links fine without libpthread. But it may actually # need to link with libpthread in order to create multiple threads. AC_CHECK_LIB([pthread], [pthread_kill], [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread # On Solaris and HP-UX, most pthread functions exist also in libc. # Therefore pthread_in_use() needs to actually try to create a # thread: pthread_create from libc will fail, whereas # pthread_create will actually create a thread. # On Solaris 10 or newer, this test is no longer needed, because # libc contains the fully functional pthread functions. case "$host_os" in solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*) AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], [Define if the pthread_in_use() detection is hard.]) esac ]) elif test -z "$gl_have_pthread"; then # Some library is needed. Try libpthread and libc_r. AC_CHECK_LIB([pthread], [pthread_kill], [gl_have_pthread=yes LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) if test -z "$gl_have_pthread"; then # For FreeBSD 4. AC_CHECK_LIB([c_r], [pthread_kill], [gl_have_pthread=yes LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) fi fi if test -n "$gl_have_pthread"; then gl_threads_api=posix AC_DEFINE([USE_POSIX_THREADS], [1], [Define if the POSIX multithreading library can be used.]) if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], [Define if references to the POSIX multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi fi fi fi if test -z "$gl_have_pthread"; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then gl_have_solaristhread= gl_save_LIBS="$LIBS" LIBS="$LIBS -lthread" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[thr_self();]])], [gl_have_solaristhread=yes]) LIBS="$gl_save_LIBS" if test -n "$gl_have_solaristhread"; then gl_threads_api=solaris LIBTHREAD=-lthread LTLIBTHREAD=-lthread LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" AC_DEFINE([USE_SOLARIS_THREADS], [1], [Define if the old Solaris multithreading library can be used.]) if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], [Define if references to the old Solaris multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi fi fi if test "$gl_use_threads" = pth; then gl_save_CPPFLAGS="$CPPFLAGS" AC_LIB_LINKFLAGS([pth]) gl_have_pth= gl_save_LIBS="$LIBS" LIBS="$LIBS $LIBPTH" AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[pth_self();]])], [gl_have_pth=yes]) LIBS="$gl_save_LIBS" if test -n "$gl_have_pth"; then gl_threads_api=pth LIBTHREAD="$LIBPTH" LTLIBTHREAD="$LTLIBPTH" LIBMULTITHREAD="$LIBTHREAD" LTLIBMULTITHREAD="$LTLIBTHREAD" AC_DEFINE([USE_PTH_THREADS], [1], [Define if the GNU Pth multithreading library can be used.]) if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then AC_DEFINE([USE_PTH_THREADS_WEAK], [1], [Define if references to the GNU Pth multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= fi fi else CPPFLAGS="$gl_save_CPPFLAGS" fi fi if test -z "$gl_have_pthread"; then case "$gl_use_threads" in yes | windows | win32) # The 'win32' is for backward compatibility. if { case "$host_os" in mingw*) true;; *) false;; esac }; then gl_threads_api=windows AC_DEFINE([USE_WINDOWS_THREADS], [1], [Define if the native Windows multithreading API can be used.]) fi ;; esac fi fi AC_MSG_CHECKING([for multithread API to use]) AC_MSG_RESULT([$gl_threads_api]) AC_SUBST([LIBTHREAD]) AC_SUBST([LTLIBTHREAD]) AC_SUBST([LIBMULTITHREAD]) AC_SUBST([LTLIBMULTITHREAD]) ]) AC_DEFUN([gl_THREADLIB], [ AC_REQUIRE([gl_THREADLIB_EARLY]) AC_REQUIRE([gl_THREADLIB_BODY]) ]) dnl gl_DISABLE_THREADS dnl ------------------ dnl Sets the gl_THREADLIB default so that threads are not used by default. dnl The user can still override it at installation time, by using the dnl configure option '--enable-threads'. AC_DEFUN([gl_DISABLE_THREADS], [ m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) ]) dnl Survey of platforms: dnl dnl Platform Available Compiler Supports test-lock dnl flavours option weak result dnl --------------- --------- --------- -------- --------- dnl Linux 2.4/glibc posix -lpthread Y OK dnl dnl GNU Hurd/glibc posix dnl dnl Ubuntu 14.04 posix -pthread Y OK dnl dnl FreeBSD 5.3 posix -lc_r Y dnl posix -lkse ? Y dnl posix -lpthread ? Y dnl posix -lthr Y dnl dnl FreeBSD 5.2 posix -lc_r Y dnl posix -lkse Y dnl posix -lthr Y dnl dnl FreeBSD 4.0,4.10 posix -lc_r Y OK dnl dnl NetBSD 1.6 -- dnl dnl OpenBSD 3.4 posix -lpthread Y OK dnl dnl Mac OS X 10.[123] posix -lpthread Y OK dnl dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK dnl dnl HP-UX 11 posix -lpthread N (cc) OK dnl Y (gcc) dnl dnl IRIX 6.5 posix -lpthread Y 0.5 dnl dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK dnl dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK dnl -lpthread (gcc) Y dnl dnl Cygwin posix -lpthread Y OK dnl dnl Any of the above pth -lpth 0.0 dnl dnl Mingw windows N OK dnl dnl BeOS 5 -- dnl dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is dnl turned off: dnl OK if all three tests terminate OK, dnl 0.5 if the first test terminates OK but the second one loops endlessly, dnl 0.0 if the first test already loops endlessly. pspp-1.0.1/gl/m4/printf-frexpl.m40000644000175000017500000000332313124536242013403 00000000000000# printf-frexpl.m4 serial 10 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to define printf_frexpl() without linking with libm. AC_DEFUN([gl_FUNC_PRINTF_FREXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) dnl Subset of gl_FUNC_FREXPL_NO_LIBM. gl_CHECK_FREXPL_NO_LIBM if test $gl_cv_func_frexpl_no_libm = yes; then gl_FUNC_FREXPL_WORKS case "$gl_cv_func_frexpl_works" in *yes) gl_func_frexpl_no_libm=yes ;; *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; esac else gl_func_frexpl_no_libm=no dnl Set REPLACE_FREXPL here because the system may have frexpl in libm. REPLACE_FREXPL=1 fi if test $gl_func_frexpl_no_libm = yes; then AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1], [Define if the frexpl function is available in libc.]) dnl Also check whether it's declared. dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include ]]) fi gl_CHECK_LDEXPL_NO_LIBM if test $gl_cv_func_ldexpl_no_libm = yes; then gl_FUNC_LDEXPL_WORKS case "$gl_cv_func_ldexpl_works" in *yes) AC_DEFINE([HAVE_LDEXPL_IN_LIBC], [1], [Define if the ldexpl function is available in libc.]) dnl Also check whether it's declared. dnl Mac OS X 10.3 has ldexpl() in libc but doesn't declare it in . AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include ]]) ;; esac fi ]) pspp-1.0.1/gl/m4/stdbool.m40000644000175000017500000000672713124536242012264 00000000000000# Check for stdbool.h that conforms to C99. dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. #serial 7 # Prepare for substituting if it is not supported. AC_DEFUN([AM_STDBOOL_H], [ AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi AC_SUBST([STDBOOL_H]) AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi AC_SUBST([HAVE__BOOL]) ]) # AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) # This version of the macro is needed in autoconf <= 2.68. AC_DEFUN([AC_CHECK_HEADER_STDBOOL], [AC_CACHE_CHECK([for stdbool.h that conforms to C99], [ac_cv_header_stdbool_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifdef __cplusplus typedef bool Bool; #else typedef _Bool Bool; #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ Bool q = true; Bool *pq = &q; bool *qq = &q; ]], [[ bool e = &s; *pq |= q; *pq |= ! q; *qq |= q; *qq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq + !qq); ]])], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) AC_CHECK_TYPES([_Bool]) ]) pspp-1.0.1/gl/m4/extern-inline.m40000644000175000017500000001042013124536242013360 00000000000000dnl 'extern inline' a la ISO C99. dnl Copyright 2012-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_EXTERN_INLINE], [ AH_VERBATIM([extern_inline], [/* Please see the Gnulib manual for how to use these macros. Suppress extern inline with HP-UX cc, as it appears to be broken; see . Suppress extern inline with Sun C in standards-conformance mode, as it mishandles inline functions that call each other. E.g., for 'inline void f (void) { } inline void g (void) { f (); }', c99 incorrectly complains 'reference to static identifier "f" in extern inline function'. This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) on configurations that mistakenly use 'static inline' to implement functions or macros in standard C headers like . For example, if isdigit is mistakenly implemented via a static inline function, a program containing an extern inline function that calls isdigit may not work since the C standard prohibits extern inline functions from calling static functions. This bug is known to occur on: OS X 10.8 and earlier; see: http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html DragonFly; see http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log FreeBSD; see: http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and for clang but remains for g++; see . Assume DragonFly and FreeBSD will be similar. */ #if (((defined __APPLE__ && defined __MACH__) \ || defined __DragonFly__ || defined __FreeBSD__) \ && (defined __header_inline \ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ && ! defined __clang__) \ : ((! defined _DONT_USE_CTYPE_INLINE_ \ && (defined __GNUC__ || defined __cplusplus)) \ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ && defined __GNUC__ && ! defined __cplusplus)))) # define _GL_EXTERN_INLINE_STDHEADER_BUG #endif #if ((__GNUC__ \ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ : (199901L <= __STDC_VERSION__ \ && !defined __HP_cc \ && !defined __PGI \ && !(defined __SUNPRO_C && __STDC__))) \ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) # define _GL_INLINE inline # define _GL_EXTERN_INLINE extern inline # define _GL_EXTERN_INLINE_IN_USE #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) # else # define _GL_INLINE extern inline # endif # define _GL_EXTERN_INLINE extern # define _GL_EXTERN_INLINE_IN_USE #else # define _GL_INLINE static _GL_UNUSED # define _GL_EXTERN_INLINE static _GL_UNUSED #endif /* In GCC 4.6 (inclusive) to 5.1 (exclusive), suppress bogus "no previous prototype for 'FOO'" and "no previous declaration for 'FOO'" diagnostics, when FOO is an inline function in the header; see and . */ #if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ # define _GL_INLINE_HEADER_CONST_PRAGMA # else # define _GL_INLINE_HEADER_CONST_PRAGMA \ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") # endif # define _GL_INLINE_HEADER_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ _GL_INLINE_HEADER_CONST_PRAGMA # define _GL_INLINE_HEADER_END \ _Pragma ("GCC diagnostic pop") #else # define _GL_INLINE_HEADER_BEGIN # define _GL_INLINE_HEADER_END #endif]) ]) pspp-1.0.1/gl/m4/lib-prefix.m40000644000175000017500000002253113124536242012646 00000000000000# lib-prefix.m4 serial 8 dnl Copyright (C) 2001-2005, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) dnl Allow the user to override the result by setting acl_cv_libdirstems. AC_CACHE_CHECK([for the common suffixes of directories in the library search path], [acl_cv_libdirstems], [acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) dnl The result is a property of the system. However, non-system dnl compilers sometimes have odd library search paths. Therefore dnl prefer asking /usr/bin/gcc, if available, rather than $CC. searchpath=`(if test -f /usr/bin/gcc \ && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ LC_ALL=C /usr/bin/gcc -print-search-dirs; \ else \ LC_ALL=C $CC -print-search-dirs; \ fi) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" ]) # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` ]) pspp-1.0.1/gl/m4/getpass.m40000644000175000017500000000356013124536242012254 00000000000000# getpass.m4 serial 14 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Provide a getpass() function if the system doesn't have it. AC_DEFUN([gl_FUNC_GETPASS], [ dnl Persuade Solaris and to declare getpass(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS([getpass]) AC_CHECK_DECLS_ONCE([getpass]) if test $ac_cv_func_getpass = yes; then HAVE_GETPASS=1 else HAVE_GETPASS=0 fi ]) # Provide the GNU getpass() implementation. It supports passwords of # arbitrary length (not just 8 bytes as on HP-UX). AC_DEFUN([gl_FUNC_GETPASS_GNU], [ dnl Persuade Solaris and to declare getpass(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([getpass]) dnl TODO: Detect when GNU getpass() is already found in glibc. REPLACE_GETPASS=1 if test $REPLACE_GETPASS = 1; then dnl We must choose a different name for our function, since on ELF systems dnl an unusable getpass() in libc.so would override our getpass() if it is dnl compiled into a shared library. AC_DEFINE([getpass], [gnu_getpass], [Define to a replacement function name for getpass().]) fi ]) # Prerequisites of lib/getpass.c. AC_DEFUN([gl_PREREQ_GETPASS], [ AC_CHECK_HEADERS_ONCE([stdio_ext.h termios.h]) AC_CHECK_FUNCS_ONCE([__fsetlocking tcgetattr tcsetattr]) AC_CHECK_DECLS([__fsetlocking],,, [[#include #if HAVE_STDIO_EXT_H #include #endif]]) AC_CHECK_DECLS_ONCE([fflush_unlocked]) AC_CHECK_DECLS_ONCE([flockfile]) AC_CHECK_DECLS_ONCE([fputs_unlocked]) AC_CHECK_DECLS_ONCE([funlockfile]) AC_CHECK_DECLS_ONCE([putc_unlocked]) : ]) pspp-1.0.1/gl/m4/assert.m40000644000175000017500000000166013124536242012106 00000000000000#serial 7 # Copyright (C) 1998-1999, 2001, 2004, 2008-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl based on code from Eleftherios Gkioulekas dnl Autoconf 2.60 provides AC_HEADER_ASSERT for the same purpose, but dnl it has broken semantics for --enable-assert until 2.64. AC_DEFUN([gl_ASSERT], [ AC_MSG_CHECKING([whether to enable assertions]) AC_ARG_ENABLE([assert], [AS_HELP_STRING([--disable-assert], [turn off assertions])], [AS_IF([test "x$enableval" = xno], [AC_DEFINE([NDEBUG], [1], [Define to 1 if assertions should be disabled.])], [test "x$enableval" != xyes], [AC_MSG_WARN([invalid argument supplied to --enable-assert]) enable_assert=yes])], [enable_assert=yes]) AC_MSG_RESULT([$enable_assert]) ]) pspp-1.0.1/gl/m4/mode_t.m40000644000175000017500000000234213124536242012052 00000000000000# mode_t.m4 serial 2 dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # For using mode_t, it's sufficient to use AC_TYPE_MODE_T and # include . # Define PROMOTED_MODE_T to the type that is the result of "default argument # promotion" (ISO C 6.5.2.2.(6)) of the type mode_t. AC_DEFUN([gl_PROMOTED_TYPE_MODE_T], [ AC_REQUIRE([AC_TYPE_MODE_T]) AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [ dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int', dnl and to itself otherwise. This assumption is not guaranteed by the ISO C dnl standard, but we don't know of any real-world counterexamples. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])], [gl_cv_promoted_mode_t='int'], [gl_cv_promoted_mode_t='mode_t']) ]) AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t], [Define to the type that is the result of default argument promotions of type mode_t.]) ]) pspp-1.0.1/gl/m4/size_max.m40000644000175000017500000000577013124536242012432 00000000000000# size_max.m4 serial 10 dnl Copyright (C) 2003, 2005-2006, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([gl_SIZE_MAX], [ AC_CHECK_HEADERS([stdint.h]) dnl First test whether the system already has SIZE_MAX. AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ gl_cv_size_max= AC_EGREP_CPP([Found it], [ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif ], [gl_cv_size_max=yes]) if test -z "$gl_cv_size_max"; then dnl Define it ourselves. Here we assume that the type 'size_t' is not wider dnl than the type 'unsigned long'. Try hard to find a definition that can dnl be used in a preprocessor #if, i.e. doesn't contain a cast. AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], [#include #include ], [size_t_bits_minus_1=]) AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], [#include ], [fits_in_uint=]) if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test $fits_in_uint = 1; then dnl Even though SIZE_MAX fits in an unsigned int, it must be of type dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include extern size_t foo; extern unsigned long foo; ]], [[]])], [fits_in_uint=0]) fi dnl We cannot use 'expr' to simplify this expression, because 'expr' dnl works only with 'long' integers in the host environment, while we dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. if test $fits_in_uint = 1; then gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" else gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" fi else dnl Shouldn't happen, but who knows... gl_cv_size_max='((size_t)~(size_t)0)' fi fi ]) if test "$gl_cv_size_max" != yes; then AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], [Define as the maximum value of type 'size_t', if the system doesn't define it.]) fi dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after dnl . Remember that the #undef in AH_VERBATIM gets replaced with dnl #define by AC_DEFINE_UNQUOTED. AH_VERBATIM([SIZE_MAX], [/* Define as the maximum value of type 'size_t', if the system doesn't define it. */ #ifndef SIZE_MAX # undef SIZE_MAX #endif]) ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) pspp-1.0.1/gl/m4/isnanl.m40000644000175000017500000001641713132510756012100 00000000000000# isnanl.m4 serial 20 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ISNANL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) ISNANL_LIBM= gl_HAVE_ISNANL_NO_LIBM if test $gl_cv_func_isnanl_no_libm = no; then gl_HAVE_ISNANL_IN_LIBM if test $gl_cv_func_isnanl_in_libm = yes; then ISNANL_LIBM=-lm fi fi dnl The variable gl_func_isnanl set here is used by isnan.m4. if test $gl_cv_func_isnanl_no_libm = yes \ || test $gl_cv_func_isnanl_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $ISNANL_LIBM" gl_FUNC_ISNANL_WORKS LIBS="$save_LIBS" case "$gl_cv_func_isnanl_works" in *yes) gl_func_isnanl=yes ;; *) gl_func_isnanl=no; ISNANL_LIBM= ;; esac else gl_func_isnanl=no fi if test $gl_func_isnanl != yes; then HAVE_ISNANL=0 fi AC_SUBST([ISNANL_LIBM]) ]) AC_DEFUN([gl_FUNC_ISNANL_NO_LIBM], [ gl_HAVE_ISNANL_NO_LIBM gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm if test $gl_func_isnanl_no_libm = yes; then gl_FUNC_ISNANL_WORKS case "$gl_cv_func_isnanl_works" in *yes) ;; *) gl_func_isnanl_no_libm=no ;; esac fi if test $gl_func_isnanl_no_libm = yes; then AC_DEFINE([HAVE_ISNANL_IN_LIBC], [1], [Define if the isnan(long double) function is available in libc.]) fi ]) dnl Prerequisites of replacement isnanl definition. It does not need -lm. AC_DEFUN([gl_PREREQ_ISNANL], [ gl_LONG_DOUBLE_EXPONENT_LOCATION AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) ]) dnl Test whether isnanl() can be used without libm. AC_DEFUN([gl_HAVE_ISNANL_NO_LIBM], [ AC_CACHE_CHECK([whether isnan(long double) can be used without linking with libm], [gl_cv_func_isnanl_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif long double x;]], [[return isnanl (x);]])], [gl_cv_func_isnanl_no_libm=yes], [gl_cv_func_isnanl_no_libm=no]) ]) ]) dnl Test whether isnanl() can be used with libm. AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM], [ AC_CACHE_CHECK([whether isnan(long double) can be used with libm], [gl_cv_func_isnanl_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif long double x;]], [[return isnanl (x);]])], [gl_cv_func_isnanl_in_libm=yes], [gl_cv_func_isnanl_in_libm=no]) LIBS="$save_LIBS" ]) ]) dnl Test whether isnanl() recognizes all canonical numbers which are neither dnl finite nor infinite. AC_DEFUN([gl_FUNC_ISNANL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether isnanl works], [gl_cv_func_isnanl_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #if __GNUC__ >= 4 # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) #elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) #endif #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; long double value; } memory_long_double; /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the runtime type conversion. */ #ifdef __sgi static long double NaNl () { double zero = 0.0; return zero / zero; } #else # define NaNl() (0.0L / 0.0L) #endif int main () { int result = 0; if (!isnanl (NaNl ())) result |= 1; { memory_long_double m; unsigned int i; /* The isnanl function should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit (since the exponent never extends to bit 31). */ m.value = NaNl (); m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); for (i = 0; i < NWORDS; i++) m.word[i] |= 1; if (!isnanl (m.value)) result |= 1; } #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (!isnanl (x.value)) result |= 2; } { /* Signalling NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (!isnanl (x.value)) result |= 2; } /* isnanl should return something even for noncanonical values. */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (isnanl (x.value) && !isnanl (x.value)) result |= 4; } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (isnanl (x.value) && !isnanl (x.value)) result |= 8; } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (isnanl (x.value) && !isnanl (x.value)) result |= 16; } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (isnanl (x.value) && !isnanl (x.value)) result |= 32; } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (isnanl (x.value) && !isnanl (x.value)) result |= 64; } #endif return result; }]])], [gl_cv_func_isnanl_works=yes], [gl_cv_func_isnanl_works=no], [case "$host_os" in mingw*) # Guess yes on mingw, no on MSVC. AC_EGREP_CPP([Known], [ #ifdef __MINGW32__ Known #endif ], [gl_cv_func_isnanl_works="guessing yes"], [gl_cv_func_isnanl_works="guessing no"]) ;; *) gl_cv_func_isnanl_works="guessing yes" ;; esac ]) ]) ]) pspp-1.0.1/gl/m4/intlmacosx.m40000644000175000017500000000474513020461274012772 00000000000000# intlmacosx.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on Mac OS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in Mac OS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFPreferencesCopyAppValue(NULL, NULL)]])], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in Mac OS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFLocaleCopyCurrent();]])], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) pspp-1.0.1/gl/m4/00gnulib.m40000644000175000017500000000415213124536242012224 00000000000000# 00gnulib.m4 serial 3 dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file must be named something that sorts before all other dnl gnulib-provided .m4 files. It is needed until such time as we can dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and dnl m4_divert semantics. # Until autoconf 2.63, handling of the diversion stack required m4_init # to be called first; but this does not happen with aclocal. Wrapping # the entire execution in another layer of the diversion stack fixes this. # Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4 # for whether it was FIFO or LIFO; in order to properly balance with # m4_init, we need to undo our push just before anything wrapped within # the m4_init body. The way to ensure this is to wrap both sides of # m4_init with a one-shot macro that does the pop at the right time. m4_ifndef([_m4_divert_diversion], [m4_divert_push([KILL]) m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])]) m4_define([m4_init], [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])]) # AC_DEFUN_ONCE([NAME], VALUE) # ---------------------------- # Define NAME to expand to VALUE on the first use (whether by direct # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This # definition is slower than the version in Autoconf 2.64, because it # can only use interfaces that existed since 2.59; but it achieves the # same effect. Quoting is necessary to avoid confusing Automake. m4_version_prereq([2.63.263], [], [m4_define([AC][_DEFUN_ONCE], [AC][_DEFUN([$1], [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) # gl_00GNULIB # ----------- # Witness macro that this file has been included. Needed to force # Automake to include this file prior to all other gnulib .m4 files. AC_DEFUN([gl_00GNULIB]) pspp-1.0.1/gl/m4/printf.m40000644000175000017500000017427413132510756012124 00000000000000# printf.m4 serial 55 dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Test whether the *printf family of functions supports the 'j', 'z', 't', dnl 'L' size specifiers. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_sizes_c99. AC_DEFUN([gl_PRINTF_SIZES_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports size specifiers as in C99], [gl_cv_func_printf_sizes_c99], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #include #if HAVE_STDINT_H_WITH_UINTMAX # include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX # include #endif static char buf[100]; int main () { int result = 0; #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX buf[0] = '\0'; if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 || strcmp (buf, "12345671 33") != 0) result |= 1; #else result |= 1; #endif buf[0] = '\0'; if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 || strcmp (buf, "12345672 33") != 0) result |= 2; buf[0] = '\0'; if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 || strcmp (buf, "12345673 33") != 0) result |= 4; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 || strcmp (buf, "1.5 33") != 0) result |= 8; return result; }]])], [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no], [ case "$host_os" in changequote(,)dnl # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_printf_sizes_c99="guessing no";; openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; solaris*) gl_cv_func_printf_sizes_c99="guessing no";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_sizes_c99="guessing no";; netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; changequote([,])dnl # Guess yes on MSVC, no on mingw. mingw*) AC_EGREP_CPP([Known], [ #ifdef _MSC_VER Known #endif ], [gl_cv_func_printf_sizes_c99="guessing yes"], [gl_cv_func_printf_sizes_c99="guessing no"]) ;; # If we don't know, assume the worst. *) gl_cv_func_printf_sizes_c99="guessing no";; esac ]) ]) ]) dnl Test whether the *printf family of functions supports 'long double' dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_long_double. AC_DEFUN([gl_PRINTF_LONG_DOUBLE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports 'long double' arguments], [gl_cv_func_printf_long_double], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[10000]; int main () { int result = 0; buf[0] = '\0'; if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000 33") != 0) result |= 1; buf[0] = '\0'; if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.750000e+00 33") != 0) result |= 2; buf[0] = '\0'; if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 || strcmp (buf, "1.75 33") != 0) result |= 4; return result; }]])], [gl_cv_func_printf_long_double=yes], [gl_cv_func_printf_long_double=no], [case "$host_os" in beos*) gl_cv_func_printf_long_double="guessing no";; # Guess yes on MSVC, no on mingw. mingw*) AC_EGREP_CPP([Known], [ #ifdef _MSC_VER Known #endif ], [gl_cv_func_printf_long_double="guessing yes"], [gl_cv_func_printf_long_double="guessing no"]) ;; *) gl_cv_func_printf_long_double="guessing yes";; esac ]) ]) ]) dnl Test whether the *printf family of functions supports infinite and NaN dnl 'double' arguments and negative zero arguments in the %f, %e, %g dnl directives. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_infinite. AC_DEFUN([gl_PRINTF_INFINITE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports infinite 'double' arguments], [gl_cv_func_printf_infinite], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static int have_minus_zero () { static double plus_zero = 0.0; double minus_zero = - plus_zero; return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; } static char buf[10000]; static double zero = 0.0; int main () { int result = 0; if (sprintf (buf, "%f", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%f", -1.0 / zero) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%f", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%e", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 4; if (sprintf (buf, "%e", -1.0 / zero) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 4; if (sprintf (buf, "%e", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 8; if (sprintf (buf, "%g", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 16; if (sprintf (buf, "%g", -1.0 / zero) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 16; if (sprintf (buf, "%g", zero / zero) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 32; /* This test fails on HP-UX 10.20. */ if (have_minus_zero ()) if (sprintf (buf, "%g", - zero) < 0 || strcmp (buf, "-0") != 0) result |= 64; return result; }]])], [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no], [ case "$host_os" in changequote(,)dnl # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; darwin*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; hpux*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_printf_infinite="guessing no";; netbsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_infinite="guessing yes";; changequote([,])dnl # Guess yes on MSVC, no on mingw. mingw*) AC_EGREP_CPP([Known], [ #ifdef _MSC_VER Known #endif ], [gl_cv_func_printf_infinite="guessing yes"], [gl_cv_func_printf_infinite="guessing no"]) ;; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite="guessing no";; esac ]) ]) ]) dnl Test whether the *printf family of functions supports infinite and NaN dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_infinite_long_double. AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl The user can set or unset the variable gl_printf_safe to indicate dnl that he wishes a safe handling of non-IEEE-754 'long double' values. if test -n "$gl_printf_safe"; then AC_DEFINE([CHECK_PRINTF_SAFE], [1], [Define if you wish *printf() functions that have a safe handling of non-IEEE-754 'long double' values.]) fi case "$gl_cv_func_printf_long_double" in *yes) AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments], [gl_cv_func_printf_infinite_long_double], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ ]GL_NOCRASH[ #include #include #include static int strisnan (const char *string, size_t start_index, size_t end_index) { if (start_index < end_index) { if (string[start_index] == '-') start_index++; if (start_index + 3 <= end_index && memcmp (string + start_index, "nan", 3) == 0) { start_index += 3; if (start_index == end_index || (string[start_index] == '(' && string[end_index - 1] == ')')) return 1; } } return 0; } static char buf[10000]; static long double zeroL = 0.0L; int main () { int result = 0; nocrash_init(); if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 1; if (sprintf (buf, "%Le", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%Le", -1.0L / zeroL) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%Le", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 1; if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) result |= 1; if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 1; #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; } { /* Signalling NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Le", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; if (sprintf (buf, "%Lg", x.value) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 2; } { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) <= 0) result |= 4; if (sprintf (buf, "%Le", x.value) <= 0) result |= 4; if (sprintf (buf, "%Lg", x.value) <= 0) result |= 4; } { /* Pseudo-Infinity. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) <= 0) result |= 8; if (sprintf (buf, "%Le", x.value) <= 0) result |= 8; if (sprintf (buf, "%Lg", x.value) <= 0) result |= 8; } { /* Pseudo-Zero. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) <= 0) result |= 16; if (sprintf (buf, "%Le", x.value) <= 0) result |= 16; if (sprintf (buf, "%Lg", x.value) <= 0) result |= 16; } { /* Unnormalized number. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) <= 0) result |= 32; if (sprintf (buf, "%Le", x.value) <= 0) result |= 32; if (sprintf (buf, "%Lg", x.value) <= 0) result |= 32; } { /* Pseudo-Denormal. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (sprintf (buf, "%Lf", x.value) <= 0) result |= 64; if (sprintf (buf, "%Le", x.value) <= 0) result |= 64; if (sprintf (buf, "%Lg", x.value) <= 0) result |= 64; } #endif return result; }]])], [gl_cv_func_printf_infinite_long_double=yes], [gl_cv_func_printf_infinite_long_double=no], [case "$host_cpu" in # Guess no on ia64, x86_64, i386. ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; *) case "$host_os" in changequote(,)dnl # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; changequote([,])dnl # Guess yes on MSVC, no on mingw. mingw*) AC_EGREP_CPP([Known], [ #ifdef _MSC_VER Known #endif ], [gl_cv_func_printf_infinite_long_double="guessing yes"], [gl_cv_func_printf_infinite_long_double="guessing no"]) ;; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite_long_double="guessing no";; esac ;; esac ]) ]) ;; *) gl_cv_func_printf_infinite_long_double="irrelevant" ;; esac ]) dnl Test whether the *printf family of functions supports the 'a' and 'A' dnl conversion specifier for hexadecimal output of floating-point numbers. dnl (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_a. AC_DEFUN([gl_PRINTF_DIRECTIVE_A], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives], [gl_cv_func_printf_directive_a], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[100]; static double zero = 0.0; int main () { int result = 0; if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "0x1.922p+1 33") != 0 && strcmp (buf, "0x3.244p+0 33") != 0 && strcmp (buf, "0x6.488p-1 33") != 0 && strcmp (buf, "0xc.91p-2 33") != 0)) result |= 1; if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 || (strcmp (buf, "-0X1.922P+1 33") != 0 && strcmp (buf, "-0X3.244P+0 33") != 0 && strcmp (buf, "-0X6.488P-1 33") != 0 && strcmp (buf, "-0XC.91P-2 33") != 0)) result |= 2; /* This catches a FreeBSD 6.1 bug: it doesn't round. */ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 || (strcmp (buf, "0x1.83p+0 33") != 0 && strcmp (buf, "0x3.05p-1 33") != 0 && strcmp (buf, "0x6.0ap-2 33") != 0 && strcmp (buf, "0xc.14p-3 33") != 0)) result |= 4; /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */ if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0 || (strcmp (buf, "0x2p+0 33") != 0 && strcmp (buf, "0x3p-1 33") != 0 && strcmp (buf, "0x6p-2 33") != 0 && strcmp (buf, "0xcp-3 33") != 0)) result |= 4; /* This catches a FreeBSD 6.1 bug. See */ if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0 || buf[0] == '0') result |= 8; /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */ if (sprintf (buf, "%.1a", 1.999) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) result |= 16; /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a glibc 2.4 bug . */ if (sprintf (buf, "%.1La", 1.999L) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) result |= 32; return result; }]])], [gl_cv_func_printf_directive_a=yes], [gl_cv_func_printf_directive_a=no], [ case "$host_os" in # Guess yes on glibc >= 2.5 systems. *-gnu*) AC_EGREP_CPP([BZ2908], [ #include #ifdef __GNU_LIBRARY__ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__ BZ2908 #endif #endif ], [gl_cv_func_printf_directive_a="guessing yes"], [gl_cv_func_printf_directive_a="guessing no"]) ;; # Guess no on native Windows. mingw*) gl_cv_func_printf_directive_a="guessing no";; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_a="guessing no";; esac ]) ]) ]) dnl Test whether the *printf family of functions supports the %F format dnl directive. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_f. AC_DEFUN([gl_PRINTF_DIRECTIVE_F], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'F' directive], [gl_cv_func_printf_directive_f], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[100]; static double zero = 0.0; int main () { int result = 0; if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 || strcmp (buf, "1234567.000000 33") != 0) result |= 1; if (sprintf (buf, "%F", 1.0 / zero) < 0 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) result |= 2; /* This catches a Cygwin 1.5.x bug. */ if (sprintf (buf, "%.F", 1234.0) < 0 || strcmp (buf, "1234") != 0) result |= 4; return result; }]])], [gl_cv_func_printf_directive_f=yes], [gl_cv_func_printf_directive_f=no], [ case "$host_os" in changequote(,)dnl # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on FreeBSD >= 6. freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; darwin*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";; solaris*) gl_cv_func_printf_directive_f="guessing no";; changequote([,])dnl # Guess yes on MSVC, no on mingw. mingw*) AC_EGREP_CPP([Known], [ #ifdef _MSC_VER Known #endif ], [gl_cv_func_printf_directive_f="guessing yes"], [gl_cv_func_printf_directive_f="guessing no"]) ;; # If we don't know, assume the worst. *) gl_cv_func_printf_directive_f="guessing no";; esac ]) ]) ]) dnl Test whether the *printf family of functions supports the %n format dnl directive. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_printf_directive_n. AC_DEFUN([gl_PRINTF_DIRECTIVE_N], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'n' directive], [gl_cv_func_printf_directive_n], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #ifdef _MSC_VER /* See page about "Parameter Validation" on msdn.microsoft.com. */ static void cdecl invalid_parameter_handler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t dummy) { exit (1); } #endif static char fmtstring[10]; static char buf[100]; int main () { int count = -1; #ifdef _MSC_VER _set_invalid_parameter_handler (invalid_parameter_handler); #endif /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 || strcmp (buf, "123 ") != 0 || count != 4) return 1; return 0; }]])], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no], [case "$host_os" in # Guess no on native Windows. mingw*) gl_cv_func_printf_directive_n="guessing no";; *) gl_cv_func_printf_directive_n="guessing yes";; esac ]) ]) ]) dnl Test whether the *printf family of functions supports the %ls format dnl directive and in particular, when a precision is specified, whether dnl the functions stop converting the wide string argument when the number dnl of bytes that have been produced by this conversion equals or exceeds dnl the precision. dnl Result is gl_cv_func_printf_directive_ls. AC_DEFUN([gl_PRINTF_DIRECTIVE_LS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the 'ls' directive], [gl_cv_func_printf_directive_ls], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { int result = 0; char buf[100]; /* Test whether %ls works at all. This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on Cygwin 1.5. */ { static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "abc") != 0) result |= 1; } /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an assertion failure inside libc), but not on OpenBSD 4.0. */ { static const wchar_t wstring[] = { 'a', 0 }; buf[0] = '\0'; if (sprintf (buf, "%ls", wstring) < 0 || strcmp (buf, "a") != 0) result |= 2; } /* Test whether precisions in %ls are supported as specified in ISO C 99 section 7.19.6.1: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." This test fails on Solaris 10. */ { static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; buf[0] = '\0'; if (sprintf (buf, "%.2ls", wstring) < 0 || strcmp (buf, "ab") != 0) result |= 8; } return result; }]])], [gl_cv_func_printf_directive_ls=yes], [gl_cv_func_printf_directive_ls=no], [ changequote(,)dnl case "$host_os" in openbsd*) gl_cv_func_printf_directive_ls="guessing no";; irix*) gl_cv_func_printf_directive_ls="guessing no";; solaris*) gl_cv_func_printf_directive_ls="guessing no";; cygwin*) gl_cv_func_printf_directive_ls="guessing no";; beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; # Guess yes on native Windows. mingw*) gl_cv_func_printf_directive_ls="guessing yes";; *) gl_cv_func_printf_directive_ls="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports POSIX/XSI format dnl strings with positions. (POSIX:2001) dnl Result is gl_cv_func_printf_positions. AC_DEFUN([gl_PRINTF_POSITIONS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions], [gl_cv_func_printf_positions], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* The string "%2$d %1$d", with dollar characters protected from the shell's dollar expansion (possibly an autoconf bug). */ static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { sprintf (buf, format, 33, 55); return (strcmp (buf, "55 33") != 0); }]])], [gl_cv_func_printf_positions=yes], [gl_cv_func_printf_positions=no], [ changequote(,)dnl case "$host_os" in netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) gl_cv_func_printf_positions="guessing no";; beos*) gl_cv_func_printf_positions="guessing no";; # Guess no on native Windows. mingw* | pw*) gl_cv_func_printf_positions="guessing no";; *) gl_cv_func_printf_positions="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports POSIX/XSI format dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001) dnl Result is gl_cv_func_printf_flag_grouping. AC_DEFUN([gl_PRINTF_FLAG_GROUPING], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the grouping flag], [gl_cv_func_printf_flag_grouping], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[100]; int main () { if (sprintf (buf, "%'d %d", 1234567, 99) < 0 || buf[strlen (buf) - 1] != '9') return 1; return 0; }]])], [gl_cv_func_printf_flag_grouping=yes], [gl_cv_func_printf_flag_grouping=no], [ changequote(,)dnl case "$host_os" in cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; # Guess no on native Windows. mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; *) gl_cv_func_printf_flag_grouping="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports the - flag correctly. dnl (ISO C99.) See dnl dnl Result is gl_cv_func_printf_flag_leftadjust. AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly], [gl_cv_func_printf_flag_leftadjust], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[100]; int main () { /* Check that a '-' flag is not annihilated by a negative width. */ if (sprintf (buf, "a%-*sc", -3, "b") < 0 || strcmp (buf, "ab c") != 0) return 1; return 0; }]])], [gl_cv_func_printf_flag_leftadjust=yes], [gl_cv_func_printf_flag_leftadjust=no], [ changequote(,)dnl case "$host_os" in # Guess yes on HP-UX 11. hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; # Guess no on HP-UX 10 and older. hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; # Guess yes on native Windows. mingw*) gl_cv_func_printf_flag_leftadjust="guessing yes";; # Guess yes otherwise. *) gl_cv_func_printf_flag_leftadjust="guessing yes";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports padding of non-finite dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See dnl dnl Result is gl_cv_func_printf_flag_zero. AC_DEFUN([gl_PRINTF_FLAG_ZERO], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports the zero flag correctly], [gl_cv_func_printf_flag_zero], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[100]; static double zero = 0.0; int main () { if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0 || (strcmp (buf, " inf") != 0 && strcmp (buf, " infinity") != 0)) return 1; return 0; }]])], [gl_cv_func_printf_flag_zero=yes], [gl_cv_func_printf_flag_zero=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_flag_zero="guessing yes";; # Guess no on native Windows. mingw*) gl_cv_func_printf_flag_zero="guessing no";; # If we don't know, assume the worst. *) gl_cv_func_printf_flag_zero="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions supports large precisions. dnl On mingw, precisions larger than 512 are treated like 512, in integer, dnl floating-point or pointer output. On Solaris 10/x86, precisions larger dnl than 510 in floating-point output crash the program. On Solaris 10/SPARC, dnl precisions larger than 510 in floating-point output yield wrong results. dnl On AIX 7.1, precisions larger than 998 in floating-point output yield dnl wrong results. On BeOS, precisions larger than 1044 crash the program. dnl Result is gl_cv_func_printf_precision. AC_DEFUN([gl_PRINTF_PRECISION], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf supports large precisions], [gl_cv_func_printf_precision], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static char buf[5000]; int main () { int result = 0; #ifdef __BEOS__ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ return 1; #endif if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) result |= 1; if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5) result |= 2; if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5 || buf[0] != '1') result |= 4; if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5 || buf[0] != '1') result |= 4; return result; }]])], [gl_cv_func_printf_precision=yes], [gl_cv_func_printf_precision=no], [ changequote(,)dnl case "$host_os" in # Guess no only on Solaris, native Windows, and BeOS systems. solaris*) gl_cv_func_printf_precision="guessing no" ;; mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; beos*) gl_cv_func_printf_precision="guessing no" ;; *) gl_cv_func_printf_precision="guessing yes" ;; esac changequote([,])dnl ]) ]) ]) dnl Test whether the *printf family of functions recovers gracefully in case dnl of an out-of-memory condition, or whether it crashes the entire program. dnl Result is gl_cv_func_printf_enomem. AC_DEFUN([gl_PRINTF_ENOMEM], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_MULTIARCH]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf survives out-of-memory conditions], [gl_cv_func_printf_enomem], [ gl_cv_func_printf_enomem="guessing no" if test "$cross_compiling" = no; then if test $APPLE_UNIVERSAL_BUILD = 0; then AC_LANG_CONFTEST([AC_LANG_SOURCE([ ]GL_NOCRASH[ changequote(,)dnl #include #include #include #include #include int main() { struct rlimit limit; int ret; nocrash_init (); /* Some printf implementations allocate temporary space with malloc. */ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ #ifdef RLIMIT_DATA if (getrlimit (RLIMIT_DATA, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_DATA, &limit) < 0) return 77; #endif /* On Linux systems, malloc() is limited by RLIMIT_AS. */ #ifdef RLIMIT_AS if (getrlimit (RLIMIT_AS, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_AS, &limit) < 0) return 77; #endif /* Some printf implementations allocate temporary space on the stack. */ #ifdef RLIMIT_STACK if (getrlimit (RLIMIT_STACK, &limit) < 0) return 77; if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) limit.rlim_max = 5000000; limit.rlim_cur = limit.rlim_max; if (setrlimit (RLIMIT_STACK, &limit) < 0) return 77; #endif ret = printf ("%.5000000f", 1.0); return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then (./conftest 2>&AS_MESSAGE_LOG_FD result=$? _AS_ECHO_LOG([\$? = $result]) if test $result != 0 && test $result != 77; then result=1; fi exit $result ) >/dev/null 2>/dev/null case $? in 0) gl_cv_func_printf_enomem="yes" ;; 77) gl_cv_func_printf_enomem="guessing no" ;; *) gl_cv_func_printf_enomem="no" ;; esac else gl_cv_func_printf_enomem="guessing no" fi rm -fr conftest* else dnl A universal build on Apple Mac OS X platforms. dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode. dnl But we need a configuration result that is valid in both modes. gl_cv_func_printf_enomem="guessing no" fi fi if test "$gl_cv_func_printf_enomem" = "guessing no"; then changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Solaris. solaris*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on AIX. aix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on HP-UX/hppa. hpux*) case "$host_cpu" in hppa*) gl_cv_func_printf_enomem="guessing yes";; *) gl_cv_func_printf_enomem="guessing no";; esac ;; # Guess yes on IRIX. irix*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on OSF/1. osf*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_printf_enomem="guessing yes";; # Guess yes on Haiku. haiku*) gl_cv_func_printf_enomem="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_enomem="guessing no";; esac changequote([,])dnl fi ]) ]) dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001) dnl Result is ac_cv_func_snprintf. AC_DEFUN([gl_SNPRINTF_PRESENCE], [ AC_CHECK_FUNCS_ONCE([snprintf]) ]) dnl Test whether the string produced by the snprintf function is always NUL dnl terminated. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_snprintf_truncation_c99. AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SNPRINTF_PRESENCE]) AC_CACHE_CHECK([whether snprintf truncates the result as in C99], [gl_cv_func_snprintf_truncation_c99], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #if HAVE_SNPRINTF # define my_snprintf snprintf #else # include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } #endif static char buf[100]; int main () { strcpy (buf, "ABCDEF"); my_snprintf (buf, 3, "%d %d", 4567, 89); if (memcmp (buf, "45\0DEF", 6) != 0) return 1; return 0; }]])], [gl_cv_func_snprintf_truncation_c99=yes], [gl_cv_func_snprintf_truncation_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_truncation_c99="guessing no";; openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5] | solaris2.[0-5].*) gl_cv_func_snprintf_truncation_c99="guessing no";; solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_truncation_c99="guessing no";; netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess no on native Windows. mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_truncation_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the return value of the snprintf function is the number dnl of bytes (excluding the terminating NUL) that would have been produced dnl if the buffer had been large enough. (ISO C99, POSIX:2001) dnl For example, this test program fails on IRIX 6.5: dnl --------------------------------------------------------------------- dnl #include dnl int main() dnl { dnl static char buf[8]; dnl int retval = snprintf (buf, 3, "%d", 12345); dnl return retval >= 0 && retval < 3; dnl } dnl --------------------------------------------------------------------- dnl Result is gl_cv_func_snprintf_retval_c99. AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SNPRINTF_PRESENCE]) AC_CACHE_CHECK([whether snprintf returns a byte count as in C99], [gl_cv_func_snprintf_retval_c99], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #if HAVE_SNPRINTF # define my_snprintf snprintf #else # include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } #endif static char buf[100]; int main () { strcpy (buf, "ABCDEF"); if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7) return 1; if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7) return 2; if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7) return 3; return 0; }]])], [gl_cv_func_snprintf_retval_c99=yes], [gl_cv_func_snprintf_retval_c99=no], [case "$host_os" in changequote(,)dnl # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_retval_c99="guessing no";; openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; solaris*) gl_cv_func_printf_sizes_c99="guessing no";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_retval_c99="guessing no";; netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; changequote([,])dnl # Guess yes on MSVC, no on mingw. mingw*) AC_EGREP_CPP([Known], [ #ifdef _MSC_VER Known #endif ], [gl_cv_func_snprintf_retval_c99="guessing yes"], [gl_cv_func_snprintf_retval_c99="guessing no"]) ;; # If we don't know, assume the worst. *) gl_cv_func_snprintf_retval_c99="guessing no";; esac ]) ]) ]) dnl Test whether the snprintf function supports the %n format directive dnl also in truncated portions of the format string. (ISO C99, POSIX:2001) dnl Result is gl_cv_func_snprintf_directive_n. AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SNPRINTF_PRESENCE]) AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive], [gl_cv_func_snprintf_directive_n], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #if HAVE_SNPRINTF # define my_snprintf snprintf #else # include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } #endif static char fmtstring[10]; static char buf[100]; int main () { int count = -1; /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) support %n in format strings in read-only memory but not in writable memory. */ strcpy (fmtstring, "%d %n"); my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); if (count != 6) return 1; return 0; }]])], [gl_cv_func_snprintf_directive_n=yes], [gl_cv_func_snprintf_directive_n=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5] | solaris2.[0-5].*) gl_cv_func_snprintf_directive_n="guessing no";; solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; aix*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on OSF/1 >= 5. osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; osf*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_directive_n="guessing no";; netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess no on native Windows. mingw*) gl_cv_func_snprintf_directive_n="guessing no";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_directive_n="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl Test whether the snprintf function, when passed a size = 1, writes any dnl output without bounds in this case, behaving like sprintf. This is the dnl case on Linux libc5. dnl Result is gl_cv_func_snprintf_size1. AC_DEFUN([gl_SNPRINTF_SIZE1], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SNPRINTF_PRESENCE]) AC_CACHE_CHECK([whether snprintf respects a size of 1], [gl_cv_func_snprintf_size1], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #if HAVE_SNPRINTF # define my_snprintf snprintf #else # include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } #endif int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; my_snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; }]])], [gl_cv_func_snprintf_size1=yes], [gl_cv_func_snprintf_size1=no], [case "$host_os" in # Guess yes on native Windows. mingw*) gl_cv_func_snprintf_size1="guessing yes" ;; *) gl_cv_func_snprintf_size1="guessing yes" ;; esac ]) ]) ]) dnl Test whether the vsnprintf function, when passed a zero size, produces no dnl output. (ISO C99, POSIX:2001) dnl For example, snprintf nevertheless writes a NUL byte in this case dnl on OSF/1 5.1: dnl --------------------------------------------------------------------- dnl #include dnl int main() dnl { dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; dnl snprintf (buf, 0, "%d", 12345); dnl return buf[0] != 'D'; dnl } dnl --------------------------------------------------------------------- dnl And vsnprintf writes any output without bounds in this case, behaving like dnl vsprintf, on HP-UX 11 and OSF/1 5.1: dnl --------------------------------------------------------------------- dnl #include dnl #include dnl static int my_snprintf (char *buf, int size, const char *format, ...) dnl { dnl va_list args; dnl int ret; dnl va_start (args, format); dnl ret = vsnprintf (buf, size, format, args); dnl va_end (args); dnl return ret; dnl } dnl int main() dnl { dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; dnl my_snprintf (buf, 0, "%d", 12345); dnl return buf[0] != 'D'; dnl } dnl --------------------------------------------------------------------- dnl Result is gl_cv_func_vsnprintf_zerosize_c99. AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99], [gl_cv_func_vsnprintf_zerosize_c99], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include static int my_snprintf (char *buf, int size, const char *format, ...) { va_list args; int ret; va_start (args, format); ret = vsnprintf (buf, size, format, args); va_end (args); return ret; } int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; my_snprintf (buf, 0, "%d", 12345); return buf[0] != 'D'; }]])], [gl_cv_func_vsnprintf_zerosize_c99=yes], [gl_cv_func_vsnprintf_zerosize_c99=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Cygwin. cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Solaris >= 2.6. solaris2.[0-5] | solaris2.[0-5].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on IRIX >= 6.5. irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on native Windows. mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; esac changequote([,])dnl ]) ]) ]) dnl The results of these tests on various platforms are: dnl dnl 1 = gl_PRINTF_SIZES_C99 dnl 2 = gl_PRINTF_LONG_DOUBLE dnl 3 = gl_PRINTF_INFINITE dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE dnl 5 = gl_PRINTF_DIRECTIVE_A dnl 6 = gl_PRINTF_DIRECTIVE_F dnl 7 = gl_PRINTF_DIRECTIVE_N dnl 8 = gl_PRINTF_DIRECTIVE_LS dnl 9 = gl_PRINTF_POSITIONS dnl 10 = gl_PRINTF_FLAG_GROUPING dnl 11 = gl_PRINTF_FLAG_LEFTADJUST dnl 12 = gl_PRINTF_FLAG_ZERO dnl 13 = gl_PRINTF_PRECISION dnl 14 = gl_PRINTF_ENOMEM dnl 15 = gl_SNPRINTF_PRESENCE dnl 16 = gl_SNPRINTF_TRUNCATION_C99 dnl 17 = gl_SNPRINTF_RETVAL_C99 dnl 18 = gl_SNPRINTF_DIRECTIVE_N dnl 19 = gl_SNPRINTF_SIZE1 dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99 dnl dnl 1 = checking whether printf supports size specifiers as in C99... dnl 2 = checking whether printf supports 'long double' arguments... dnl 3 = checking whether printf supports infinite 'double' arguments... dnl 4 = checking whether printf supports infinite 'long double' arguments... dnl 5 = checking whether printf supports the 'a' and 'A' directives... dnl 6 = checking whether printf supports the 'F' directive... dnl 7 = checking whether printf supports the 'n' directive... dnl 8 = checking whether printf supports the 'ls' directive... dnl 9 = checking whether printf supports POSIX/XSI format strings with positions... dnl 10 = checking whether printf supports the grouping flag... dnl 11 = checking whether printf supports the left-adjust flag correctly... dnl 12 = checking whether printf supports the zero flag correctly... dnl 13 = checking whether printf supports large precisions... dnl 14 = checking whether printf survives out-of-memory conditions... dnl 15 = checking for snprintf... dnl 16 = checking whether snprintf truncates the result as in C99... dnl 17 = checking whether snprintf returns a byte count as in C99... dnl 18 = checking whether snprintf fully supports the 'n' directive... dnl 19 = checking whether snprintf respects a size of 1... dnl 20 = checking whether vsnprintf respects a zero size as in C99... dnl dnl . = yes, # = no. dnl dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . . dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . . dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . dnl Mac OS X 10.5.8 . . . # # . . . . . . # . . . . . . . . dnl Mac OS X 10.3.9 . . . . # . . . . . . # . # . . . . . . dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . . dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . dnl Solaris 11 2011-11 . . # # # . . # . . . # . . . . . . . . dnl Solaris 10 . . # # # . . # . . . # # . . . . . . . dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . . dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # dnl AIX 7.1 . . # # # . . . . . . # # . . . . . . . dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . . dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . # . . . dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . . dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . # dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? # dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . . dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . # dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # # dnl NetBSD 5.0 . . . # # . . . . . . # . # . . . . . . dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ? dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . . dnl Haiku . . . # # # . # . . . . . ? . . ? . . . dnl BeOS # # . # # # . ? # . ? . # ? . . ? . . . dnl old mingw / msvcrt # # # # # # . . # # . # # ? . # # # . . dnl MSVC 9 # # # # # # # . # # . # # ? # # # # . . dnl mingw 2009-2011 . # . # . . . . # # . . . ? . . . . . . dnl mingw-w64 2011 # # # # # # . . # # . # # ? . # # # . . pspp-1.0.1/gl/m4/inline.m40000644000175000017500000000315413124536242012063 00000000000000# inline.m4 serial 4 dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Test for the 'inline' keyword or equivalent. dnl Define 'inline' to a supported equivalent, or to nothing if not supported, dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an dnl equivalent is effectively supported, i.e. if the compiler is likely to dnl drop unused 'static inline' functions. AC_DEFUN([gl_INLINE], [ AC_REQUIRE([AC_C_INLINE]) AC_CACHE_CHECK([whether the compiler generally respects inline], [gl_cv_c_inline_effective], [if test $ac_cv_c_inline = no; then gl_cv_c_inline_effective=no else dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is dnl specified. dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result dnl depends on optimization flags, which can be in CFLAGS. dnl (AC_EGREP_CPP looks only at the CPPFLAGS.) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]], [[#ifdef __NO_INLINE__ #error "inline is not effective" #endif]])], [gl_cv_c_inline_effective=yes], [gl_cv_c_inline_effective=no]) fi ]) if test $gl_cv_c_inline_effective = yes; then AC_DEFINE([HAVE_INLINE], [1], [Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline' and effectively inlines functions marked as such.]) fi ]) pspp-1.0.1/gl/m4/tempname.m40000644000175000017500000000103213124536242012404 00000000000000#serial 5 # Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose # it as a public API, and provide it on systems that are lacking. AC_DEFUN([gl_FUNC_GEN_TEMPNAME], [ gl_PREREQ_TEMPNAME ]) # Prerequisites of lib/tempname.c. AC_DEFUN([gl_PREREQ_TEMPNAME], [ : ]) pspp-1.0.1/gl/m4/unlocked-io.m40000644000175000017500000000302713124536242013015 00000000000000# unlocked-io.m4 serial 15 # Copyright (C) 1998-2006, 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Jim Meyering. dnl dnl See if the glibc *_unlocked I/O macros or functions are available. dnl Use only those *_unlocked macros or functions that are declared dnl (because some of them were declared in Solaris 2.5.1 but were removed dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run dnl on Solaris 2.6). AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO], [ AC_DEFINE([USE_UNLOCKED_IO], [1], [Define to 1 if you want getc etc. to use unlocked I/O if available. Unlocked I/O can improve performance in unithreaded apps, but it is not safe for multithreaded apps.]) dnl Persuade glibc and Solaris to declare dnl fgets_unlocked(), fputs_unlocked() etc. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([clearerr_unlocked]) AC_CHECK_DECLS_ONCE([feof_unlocked]) AC_CHECK_DECLS_ONCE([ferror_unlocked]) AC_CHECK_DECLS_ONCE([fflush_unlocked]) AC_CHECK_DECLS_ONCE([fgets_unlocked]) AC_CHECK_DECLS_ONCE([fputc_unlocked]) AC_CHECK_DECLS_ONCE([fputs_unlocked]) AC_CHECK_DECLS_ONCE([fread_unlocked]) AC_CHECK_DECLS_ONCE([fwrite_unlocked]) AC_CHECK_DECLS_ONCE([getc_unlocked]) AC_CHECK_DECLS_ONCE([getchar_unlocked]) AC_CHECK_DECLS_ONCE([putc_unlocked]) AC_CHECK_DECLS_ONCE([putchar_unlocked]) ]) pspp-1.0.1/gl/m4/time_h.m40000644000175000017500000001376213124536242012060 00000000000000# Configure a more-standard replacement for . # Copyright (C) 2000-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. # serial 11 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert and Jim Meyering. AC_DEFUN([gl_HEADER_TIME_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) ]) dnl Check whether 'struct timespec' is declared dnl in time.h, sys/time.h, pthread.h, or unistd.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [ AC_CHECK_HEADERS_ONCE([sys/time.h]) AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_time_h=yes], [gl_cv_sys_struct_timespec_in_time_h=no])]) TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_sys_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_sys_time_h=yes], [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_pthread_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_pthread_h=yes], [gl_cv_sys_struct_timespec_in_pthread_h=no])]) if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_unistd_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_unistd_h=yes], [gl_cv_sys_struct_timespec_in_unistd_h=no])]) if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 fi fi fi fi AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC]) ]) AC_DEFUN([gl_TIME_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], [ GNULIB_CTIME=0; AC_SUBST([GNULIB_CTIME]) GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) GNULIB_LOCALTIME=0; AC_SUBST([GNULIB_LOCALTIME]) GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) GNULIB_STRFTIME=0; AC_SUBST([GNULIB_STRFTIME]) GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) GNULIB_TIME_RZ=0; AC_SUBST([GNULIB_TIME_RZ]) GNULIB_TZSET=0; AC_SUBST([GNULIB_TZSET]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) HAVE_TZSET=1; AC_SUBST([HAVE_TZSET]) dnl Even GNU libc does not have timezone_t yet. HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) dnl If another module says to replace or to not replace, do that. dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; dnl this lets maintainers check for portability. REPLACE_CTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_CTIME]) REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_STRFTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRFTIME]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) REPLACE_TZSET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TZSET]) dnl Hack so that the time module doesn't depend on the sys_time module. dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent. : ${GNULIB_GETTIMEOFDAY=0}; AC_SUBST([GNULIB_GETTIMEOFDAY]) dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier dnl is no longer a big deal. REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME]) REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME]) ]) pspp-1.0.1/gl/m4/iswblank.m40000644000175000017500000000234113124536242012414 00000000000000# iswblank.m4 serial 4 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ISWBLANK], [ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) AC_REQUIRE([gl_WCTYPE_H]) dnl Persuade glibc to declare iswblank(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([iswblank]) AC_CHECK_DECLS([iswblank], , , [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include ]]) if test $ac_cv_func_iswblank = no; then HAVE_ISWBLANK=0 if test $ac_cv_have_decl_iswblank = yes; then REPLACE_ISWBLANK=1 fi fi if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then dnl Redefine all of iswcntrl, ..., towupper in . : else if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then dnl Redefine only iswblank. : fi fi ]) pspp-1.0.1/gl/m4/rmdir.m40000644000175000017500000000317013132510757011722 00000000000000# rmdir.m4 serial 14 dnl Copyright (C) 2002, 2005, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_RMDIR], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Detect cygwin 1.5.x bug. AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works], [mkdir conftest.dir touch conftest.file AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include #endif ]], [[int result = 0; if (!rmdir ("conftest.file/")) result |= 1; else if (errno != ENOTDIR) result |= 2; if (!rmdir ("conftest.dir/./")) result |= 4; return result; ]])], [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_rmdir_works="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_func_rmdir_works="guessing no" ;; esac ]) rm -rf conftest.dir conftest.file]) case "$gl_cv_func_rmdir_works" in *yes) ;; *) REPLACE_RMDIR=1 ;; esac ]) pspp-1.0.1/gl/m4/mkstemp.m40000644000175000017500000000554213132510756012271 00000000000000#serial 24 # Copyright (C) 2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a # silly limit that it can create no more than 26 files from a given template. # Other systems lack mkstemp altogether. # On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create # only 32 files per process. # On some hosts, mkstemp creates files with mode 0666, which is a security # problem and a violation of POSIX 2008. # On systems like the above, arrange to use the replacement function. AC_DEFUN([gl_FUNC_MKSTEMP], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS_ONCE([mkstemp]) if test $ac_cv_func_mkstemp = yes; then AC_CACHE_CHECK([for working mkstemp], [gl_cv_func_working_mkstemp], [ mkdir conftest.mkstemp AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT], [[int result = 0; int i; off_t large = (off_t) 4294967295u; if (large < 0) large = 2147483647; umask (0); for (i = 0; i < 70; i++) { char templ[] = "conftest.mkstemp/coXXXXXX"; int (*mkstemp_function) (char *) = mkstemp; int fd = mkstemp_function (templ); if (fd < 0) result |= 1; else { struct stat st; if (lseek (fd, large, SEEK_SET) != large) result |= 2; if (fstat (fd, &st) < 0) result |= 4; else if (st.st_mode & 0077) result |= 8; if (close (fd)) result |= 16; } } return result;]])], [gl_cv_func_working_mkstemp=yes], [gl_cv_func_working_mkstemp=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_working_mkstemp="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_func_working_mkstemp="guessing no" ;; esac ]) rm -rf conftest.mkstemp ]) case "$gl_cv_func_working_mkstemp" in *yes) ;; *) REPLACE_MKSTEMP=1 ;; esac else HAVE_MKSTEMP=0 fi ]) # Prerequisites of lib/mkstemp.c. AC_DEFUN([gl_PREREQ_MKSTEMP], [ ]) pspp-1.0.1/gl/m4/warn-on-use.m40000644000175000017500000000415413124536242012761 00000000000000# warn-on-use.m4 serial 5 dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) # --------------------------------------- # For each whitespace-separated element in the list of NAMES, define # HAVE_RAW_DECL_name if the function has a declaration among INCLUDES # even after being undefined as a macro. # # See warn-on-use.h for some hints on how to poison function names, as # well as ideas on poisoning global variables and macros. NAMES may # include global variables, but remember that only functions work with # _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single # header, but if the replacement header pulls in other headers because # some systems declare functions in the wrong header, then INCLUDES # should do likewise. # # It is generally safe to assume declarations for functions declared # in the intersection of C89 and C11 (such as printf) without # needing gl_WARN_ON_USE_PREPARE. AC_DEFUN([gl_WARN_ON_USE_PREPARE], [ m4_foreach_w([gl_decl], [$2], [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), [Define to 1 if ]m4_defn([gl_decl])[ is declared even after undefining macros.])])dnl dnl FIXME: gl_Symbol must be used unquoted until we can assume dnl autoconf 2.64 or newer. for gl_func in m4_flatten([$2]); do AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl AC_CACHE_CHECK([whether $gl_func is declared without a macro], gl_Symbol, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], [@%:@undef $gl_func (void) $gl_func;])], [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) AS_VAR_IF(gl_Symbol, [yes], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) dnl shortcut - if the raw declaration exists, then set a cache dnl variable to allow skipping any later AC_CHECK_DECL efforts eval ac_cv_have_decl_$gl_func=yes]) AS_VAR_POPDEF([gl_Symbol])dnl done ]) pspp-1.0.1/gl/m4/rawmemchr.m40000644000175000017500000000117213124536242012570 00000000000000# rawmemchr.m4 serial 2 dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_RAWMEMCHR], [ dnl Persuade glibc to declare rawmemchr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([rawmemchr]) if test $ac_cv_func_rawmemchr = no; then HAVE_RAWMEMCHR=0 fi ]) # Prerequisites of lib/strchrnul.c. AC_DEFUN([gl_PREREQ_RAWMEMCHR], [:]) pspp-1.0.1/gl/m4/byteswap.m40000644000175000017500000000110313124536242012433 00000000000000# byteswap.m4 serial 4 dnl Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Oskar Liljeblad. AC_DEFUN([gl_BYTESWAP], [ dnl Prerequisites of lib/byteswap.in.h. AC_CHECK_HEADERS([byteswap.h], [ BYTESWAP_H='' ], [ BYTESWAP_H='byteswap.h' ]) AC_SUBST([BYTESWAP_H]) AM_CONDITIONAL([GL_GENERATE_BYTESWAP_H], [test -n "$BYTESWAP_H"]) ]) pspp-1.0.1/gl/m4/math_h.m40000644000175000017500000004336213124536242012052 00000000000000# math_h.m4 serial 115 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MATH_H], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([math.h]) AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[/* Solaris 10 has a broken definition of NAN. Other platforms fail to provide NAN, or provide it only in C99 mode; this test only needs to fail when NAN is provided but wrong. */ float f = 1.0f; #ifdef NAN f = NAN; #endif return f == 0;]])], [gl_cv_header_math_nan_works=yes], [gl_cv_header_math_nan_works=no])]) if test $gl_cv_header_math_nan_works = no; then REPLACE_NAN=1 fi AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[/* Solaris 10 has a broken definition of HUGE_VAL. */ double d = HUGE_VAL; return d == 0;]])], [gl_cv_header_math_huge_val_works=yes], [gl_cv_header_math_huge_val_works=no])]) if test $gl_cv_header_math_huge_val_works = no; then REPLACE_HUGE_VAL=1 fi dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl]) ]) AC_DEFUN([gl_MATH_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_MATH_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_MATH_H_DEFAULTS], [ GNULIB_ACOSF=0; AC_SUBST([GNULIB_ACOSF]) GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) GNULIB_ASINF=0; AC_SUBST([GNULIB_ASINF]) GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF]) GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F]) GNULIB_CBRT=0; AC_SUBST([GNULIB_CBRT]) GNULIB_CBRTF=0; AC_SUBST([GNULIB_CBRTF]) GNULIB_CBRTL=0; AC_SUBST([GNULIB_CBRTL]) GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL]) GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN]) GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF]) GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL]) GNULIB_COSF=0; AC_SUBST([GNULIB_COSF]) GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF]) GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF]) GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) GNULIB_EXP2=0; AC_SUBST([GNULIB_EXP2]) GNULIB_EXP2F=0; AC_SUBST([GNULIB_EXP2F]) GNULIB_EXP2L=0; AC_SUBST([GNULIB_EXP2L]) GNULIB_EXPM1=0; AC_SUBST([GNULIB_EXPM1]) GNULIB_EXPM1F=0; AC_SUBST([GNULIB_EXPM1F]) GNULIB_EXPM1L=0; AC_SUBST([GNULIB_EXPM1L]) GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF]) GNULIB_FABSL=0; AC_SUBST([GNULIB_FABSL]) GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR]) GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) GNULIB_FMA=0; AC_SUBST([GNULIB_FMA]) GNULIB_FMAF=0; AC_SUBST([GNULIB_FMAF]) GNULIB_FMAL=0; AC_SUBST([GNULIB_FMAL]) GNULIB_FMOD=0; AC_SUBST([GNULIB_FMOD]) GNULIB_FMODF=0; AC_SUBST([GNULIB_FMODF]) GNULIB_FMODL=0; AC_SUBST([GNULIB_FMODL]) GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF]) GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) GNULIB_HYPOT=0; AC_SUBST([GNULIB_HYPOT]) GNULIB_HYPOTF=0; AC_SUBST([GNULIB_HYPOTF]) GNULIB_HYPOTL=0; AC_SUBST([GNULIB_HYPOTL]) GNULIB_ILOGB=0; AC_SUBST([GNULIB_ILOGB]) GNULIB_ILOGBF=0; AC_SUBST([GNULIB_ILOGBF]) GNULIB_ILOGBL=0; AC_SUBST([GNULIB_ILOGBL]) GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF]) GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) GNULIB_LOG=0; AC_SUBST([GNULIB_LOG]) GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF]) GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) GNULIB_LOG10=0; AC_SUBST([GNULIB_LOG10]) GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F]) GNULIB_LOG10L=0; AC_SUBST([GNULIB_LOG10L]) GNULIB_LOG1P=0; AC_SUBST([GNULIB_LOG1P]) GNULIB_LOG1PF=0; AC_SUBST([GNULIB_LOG1PF]) GNULIB_LOG1PL=0; AC_SUBST([GNULIB_LOG1PL]) GNULIB_LOG2=0; AC_SUBST([GNULIB_LOG2]) GNULIB_LOG2F=0; AC_SUBST([GNULIB_LOG2F]) GNULIB_LOG2L=0; AC_SUBST([GNULIB_LOG2L]) GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) GNULIB_LOGBF=0; AC_SUBST([GNULIB_LOGBF]) GNULIB_LOGBL=0; AC_SUBST([GNULIB_LOGBL]) GNULIB_MODF=0; AC_SUBST([GNULIB_MODF]) GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF]) GNULIB_MODFL=0; AC_SUBST([GNULIB_MODFL]) GNULIB_POWF=0; AC_SUBST([GNULIB_POWF]) GNULIB_REMAINDER=0; AC_SUBST([GNULIB_REMAINDER]) GNULIB_REMAINDERF=0; AC_SUBST([GNULIB_REMAINDERF]) GNULIB_REMAINDERL=0; AC_SUBST([GNULIB_REMAINDERL]) GNULIB_RINT=0; AC_SUBST([GNULIB_RINT]) GNULIB_RINTF=0; AC_SUBST([GNULIB_RINTF]) GNULIB_RINTL=0; AC_SUBST([GNULIB_RINTL]) GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) GNULIB_SINF=0; AC_SUBST([GNULIB_SINF]) GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) GNULIB_SINHF=0; AC_SUBST([GNULIB_SINHF]) GNULIB_SQRTF=0; AC_SUBST([GNULIB_SQRTF]) GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) GNULIB_TANF=0; AC_SUBST([GNULIB_TANF]) GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) GNULIB_TANHF=0; AC_SUBST([GNULIB_TANHF]) GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_ACOSF=1; AC_SUBST([HAVE_ACOSF]) HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) HAVE_ASINF=1; AC_SUBST([HAVE_ASINF]) HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) HAVE_ATANF=1; AC_SUBST([HAVE_ATANF]) HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) HAVE_ATAN2F=1; AC_SUBST([HAVE_ATAN2F]) HAVE_CBRT=1; AC_SUBST([HAVE_CBRT]) HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF]) HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL]) HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN]) HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL]) HAVE_COSF=1; AC_SUBST([HAVE_COSF]) HAVE_COSL=1; AC_SUBST([HAVE_COSL]) HAVE_COSHF=1; AC_SUBST([HAVE_COSHF]) HAVE_EXPF=1; AC_SUBST([HAVE_EXPF]) HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) HAVE_EXPM1=1; AC_SUBST([HAVE_EXPM1]) HAVE_EXPM1F=1; AC_SUBST([HAVE_EXPM1F]) HAVE_FABSF=1; AC_SUBST([HAVE_FABSF]) HAVE_FABSL=1; AC_SUBST([HAVE_FABSL]) HAVE_FMA=1; AC_SUBST([HAVE_FMA]) HAVE_FMAF=1; AC_SUBST([HAVE_FMAF]) HAVE_FMAL=1; AC_SUBST([HAVE_FMAL]) HAVE_FMODF=1; AC_SUBST([HAVE_FMODF]) HAVE_FMODL=1; AC_SUBST([HAVE_FMODL]) HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF]) HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF]) HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL]) HAVE_ILOGB=1; AC_SUBST([HAVE_ILOGB]) HAVE_ILOGBF=1; AC_SUBST([HAVE_ILOGBF]) HAVE_ILOGBL=1; AC_SUBST([HAVE_ILOGBL]) HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) HAVE_LDEXPF=1; AC_SUBST([HAVE_LDEXPF]) HAVE_LOGF=1; AC_SUBST([HAVE_LOGF]) HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) HAVE_LOG10F=1; AC_SUBST([HAVE_LOG10F]) HAVE_LOG10L=1; AC_SUBST([HAVE_LOG10L]) HAVE_LOG1P=1; AC_SUBST([HAVE_LOG1P]) HAVE_LOG1PF=1; AC_SUBST([HAVE_LOG1PF]) HAVE_LOG1PL=1; AC_SUBST([HAVE_LOG1PL]) HAVE_LOGBF=1; AC_SUBST([HAVE_LOGBF]) HAVE_LOGBL=1; AC_SUBST([HAVE_LOGBL]) HAVE_MODFF=1; AC_SUBST([HAVE_MODFF]) HAVE_MODFL=1; AC_SUBST([HAVE_MODFL]) HAVE_POWF=1; AC_SUBST([HAVE_POWF]) HAVE_REMAINDER=1; AC_SUBST([HAVE_REMAINDER]) HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF]) HAVE_RINT=1; AC_SUBST([HAVE_RINT]) HAVE_RINTL=1; AC_SUBST([HAVE_RINTL]) HAVE_SINF=1; AC_SUBST([HAVE_SINF]) HAVE_SINL=1; AC_SUBST([HAVE_SINL]) HAVE_SINHF=1; AC_SUBST([HAVE_SINHF]) HAVE_SQRTF=1; AC_SUBST([HAVE_SQRTF]) HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) HAVE_TANF=1; AC_SUBST([HAVE_TANF]) HAVE_TANL=1; AC_SUBST([HAVE_TANL]) HAVE_TANHF=1; AC_SUBST([HAVE_TANHF]) HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) HAVE_DECL_CBRTF=1; AC_SUBST([HAVE_DECL_CBRTF]) HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL]) HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) HAVE_DECL_COPYSIGNF=1; AC_SUBST([HAVE_DECL_COPYSIGNF]) HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) HAVE_DECL_EXP2=1; AC_SUBST([HAVE_DECL_EXP2]) HAVE_DECL_EXP2F=1; AC_SUBST([HAVE_DECL_EXP2F]) HAVE_DECL_EXP2L=1; AC_SUBST([HAVE_DECL_EXP2L]) HAVE_DECL_EXPM1L=1; AC_SUBST([HAVE_DECL_EXPM1L]) HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) HAVE_DECL_LOG10L=1; AC_SUBST([HAVE_DECL_LOG10L]) HAVE_DECL_LOG2=1; AC_SUBST([HAVE_DECL_LOG2]) HAVE_DECL_LOG2F=1; AC_SUBST([HAVE_DECL_LOG2F]) HAVE_DECL_LOG2L=1; AC_SUBST([HAVE_DECL_LOG2L]) HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) HAVE_DECL_REMAINDER=1; AC_SUBST([HAVE_DECL_REMAINDER]) HAVE_DECL_REMAINDERL=1; AC_SUBST([HAVE_DECL_REMAINDERL]) HAVE_DECL_RINTF=1; AC_SUBST([HAVE_DECL_RINTF]) HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND]) HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF]) HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL]) HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) REPLACE_ACOSF=0; AC_SUBST([REPLACE_ACOSF]) REPLACE_ASINF=0; AC_SUBST([REPLACE_ASINF]) REPLACE_ATANF=0; AC_SUBST([REPLACE_ATANF]) REPLACE_ATAN2F=0; AC_SUBST([REPLACE_ATAN2F]) REPLACE_CBRTF=0; AC_SUBST([REPLACE_CBRTF]) REPLACE_CBRTL=0; AC_SUBST([REPLACE_CBRTL]) REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL]) REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) REPLACE_COSF=0; AC_SUBST([REPLACE_COSF]) REPLACE_COSHF=0; AC_SUBST([REPLACE_COSHF]) REPLACE_EXPF=0; AC_SUBST([REPLACE_EXPF]) REPLACE_EXPM1=0; AC_SUBST([REPLACE_EXPM1]) REPLACE_EXPM1F=0; AC_SUBST([REPLACE_EXPM1F]) REPLACE_EXP2=0; AC_SUBST([REPLACE_EXP2]) REPLACE_EXP2L=0; AC_SUBST([REPLACE_EXP2L]) REPLACE_FABSL=0; AC_SUBST([REPLACE_FABSL]) REPLACE_FLOOR=0; AC_SUBST([REPLACE_FLOOR]) REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) REPLACE_FMA=0; AC_SUBST([REPLACE_FMA]) REPLACE_FMAF=0; AC_SUBST([REPLACE_FMAF]) REPLACE_FMAL=0; AC_SUBST([REPLACE_FMAL]) REPLACE_FMOD=0; AC_SUBST([REPLACE_FMOD]) REPLACE_FMODF=0; AC_SUBST([REPLACE_FMODF]) REPLACE_FMODL=0; AC_SUBST([REPLACE_FMODL]) REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF]) REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT]) REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF]) REPLACE_HYPOTL=0; AC_SUBST([REPLACE_HYPOTL]) REPLACE_ILOGB=0; AC_SUBST([REPLACE_ILOGB]) REPLACE_ILOGBF=0; AC_SUBST([REPLACE_ILOGBF]) REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) REPLACE_LOG=0; AC_SUBST([REPLACE_LOG]) REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF]) REPLACE_LOGL=0; AC_SUBST([REPLACE_LOGL]) REPLACE_LOG10=0; AC_SUBST([REPLACE_LOG10]) REPLACE_LOG10F=0; AC_SUBST([REPLACE_LOG10F]) REPLACE_LOG10L=0; AC_SUBST([REPLACE_LOG10L]) REPLACE_LOG1P=0; AC_SUBST([REPLACE_LOG1P]) REPLACE_LOG1PF=0; AC_SUBST([REPLACE_LOG1PF]) REPLACE_LOG1PL=0; AC_SUBST([REPLACE_LOG1PL]) REPLACE_LOG2=0; AC_SUBST([REPLACE_LOG2]) REPLACE_LOG2F=0; AC_SUBST([REPLACE_LOG2F]) REPLACE_LOG2L=0; AC_SUBST([REPLACE_LOG2L]) REPLACE_LOGB=0; AC_SUBST([REPLACE_LOGB]) REPLACE_LOGBF=0; AC_SUBST([REPLACE_LOGBF]) REPLACE_LOGBL=0; AC_SUBST([REPLACE_LOGBL]) REPLACE_MODF=0; AC_SUBST([REPLACE_MODF]) REPLACE_MODFF=0; AC_SUBST([REPLACE_MODFF]) REPLACE_MODFL=0; AC_SUBST([REPLACE_MODFL]) REPLACE_NAN=0; AC_SUBST([REPLACE_NAN]) REPLACE_REMAINDER=0; AC_SUBST([REPLACE_REMAINDER]) REPLACE_REMAINDERF=0; AC_SUBST([REPLACE_REMAINDERF]) REPLACE_REMAINDERL=0; AC_SUBST([REPLACE_REMAINDERL]) REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) REPLACE_SINF=0; AC_SUBST([REPLACE_SINF]) REPLACE_SINHF=0; AC_SUBST([REPLACE_SINHF]) REPLACE_SQRTF=0; AC_SUBST([REPLACE_SQRTF]) REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL]) REPLACE_TANF=0; AC_SUBST([REPLACE_TANF]) REPLACE_TANHF=0; AC_SUBST([REPLACE_TANHF]) REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC]) REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF]) REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) ]) # gl_LONG_DOUBLE_VS_DOUBLE # determines whether 'long double' and 'double' have the same representation. # Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines # HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly. # The currently known platforms where this is the case are: # Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9. AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE], [ AC_CACHE_CHECK([whether long double and double are the same], [gl_cv_long_double_equals_double], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[typedef int check[sizeof (long double) == sizeof (double) && LDBL_MANT_DIG == DBL_MANT_DIG && LDBL_MAX_EXP == DBL_MAX_EXP && LDBL_MIN_EXP == DBL_MIN_EXP ? 1 : -1]; ]])], [gl_cv_long_double_equals_double=yes], [gl_cv_long_double_equals_double=no]) ]) if test $gl_cv_long_double_equals_double = yes; then AC_DEFINE([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE], [1], [Define to 1 if 'long double' and 'double' have the same representation.]) HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 else HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 fi AC_SUBST([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]) ]) pspp-1.0.1/gl/m4/signalblocking.m40000644000175000017500000000164113124536242013572 00000000000000# signalblocking.m4 serial 14 dnl Copyright (C) 2001-2002, 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine available signal blocking primitives. Three different APIs exist: # 1) POSIX: sigemptyset, sigaddset, sigprocmask # 2) SYSV: sighold, sigrelse # 3) BSD: sigblock, sigsetmask # For simplicity, here we check only for the POSIX signal blocking. AC_DEFUN([gl_SIGNALBLOCKING], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T]) if test $gl_cv_type_sigset_t = yes; then AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1]) fi if test -z "$gl_cv_func_sigprocmask"; then HAVE_POSIX_SIGNALBLOCKING=0 fi ]) # Prerequisites of lib/sigprocmask.c. AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:]) pspp-1.0.1/gl/m4/stdarg.m40000644000175000017500000000540413124536242012071 00000000000000# stdarg.m4 serial 6 dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Provide a working va_copy in combination with . AC_DEFUN([gl_STDARG_H], [ STDARG_H='' NEXT_STDARG_H='' AC_MSG_CHECKING([for va_copy]) AC_CACHE_VAL([gl_cv_func_va_copy], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[ #ifndef va_copy void (*func) (va_list, va_list) = va_copy; #endif ]])], [gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])]) AC_MSG_RESULT([$gl_cv_func_va_copy]) if test $gl_cv_func_va_copy = no; then dnl Provide a substitute. dnl Usually a simple definition in is enough. Not so on AIX 5 dnl with some versions of the /usr/vac/bin/cc compiler. It has an dnl which does '#undef va_copy', leading to a missing va_copy symbol. For dnl this platform, we use an substitute. But we cannot use this dnl approach on other platforms, because often defines only dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do dnl not work in this situation. AC_EGREP_CPP([vaccine], [#if defined _AIX && !defined __GNUC__ AIX vaccine #endif ], [gl_aixcc=yes], [gl_aixcc=no]) if test $gl_aixcc = yes; then dnl Provide a substitute file. STDARG_H=stdarg.h gl_NEXT_HEADERS([stdarg.h]) dnl Fallback for the case when contains only macro definitions. if test "$gl_cv_next_stdarg_h" = '""'; then gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' NEXT_STDARG_H="$gl_cv_next_stdarg_h" fi else dnl Provide a substitute in , either __va_copy or as a simple dnl assignment. gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[ #ifndef __va_copy error, bail out #endif ]])], [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])]) if test $gl_cv_func___va_copy = yes; then AC_DEFINE([va_copy], [__va_copy], [Define as a macro for copying va_list variables.]) else AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */ #define gl_va_copy(a,b) ((a) = (b))]) AC_DEFINE([va_copy], [gl_va_copy], [Define as a macro for copying va_list variables.]) fi fi fi AC_SUBST([STDARG_H]) AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"]) AC_SUBST([NEXT_STDARG_H]) ]) pspp-1.0.1/gl/m4/mkdtemp.m40000644000175000017500000000102713124536242012243 00000000000000# mkdtemp.m4 serial 8 dnl Copyright (C) 2001-2003, 2006-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MKDTEMP], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_CHECK_FUNCS([mkdtemp]) if test $ac_cv_func_mkdtemp = no; then HAVE_MKDTEMP=0 fi ]) # Prerequisites of lib/mkdtemp.c AC_DEFUN([gl_PREREQ_MKDTEMP], [: ]) pspp-1.0.1/gl/m4/lstat.m40000644000175000017500000000507713132510756011743 00000000000000# serial 29 # Copyright (C) 1997-2001, 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Jim Meyering. AC_DEFUN([gl_FUNC_LSTAT], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl If lstat does not exist, the replacement does dnl "#define lstat stat", and lstat.c is a no-op. AC_CHECK_FUNCS_ONCE([lstat]) if test $ac_cv_func_lstat = yes; then AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) case "$gl_cv_func_lstat_dereferences_slashed_symlink" in *no) REPLACE_LSTAT=1 ;; esac else HAVE_LSTAT=0 fi ]) # Prerequisites of lib/lstat.c. AC_DEFUN([gl_PREREQ_LSTAT], [:]) AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], [ dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ. AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether lstat correctly handles trailing slash], [gl_cv_func_lstat_dereferences_slashed_symlink], [rm -f conftest.sym conftest.file echo >conftest.file AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT], [[struct stat sbuf; if (symlink ("conftest.file", "conftest.sym") != 0) return 1; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ]])], [gl_cv_func_lstat_dereferences_slashed_symlink=yes], [gl_cv_func_lstat_dereferences_slashed_symlink=no], [case "$host_os" in *-gnu*) # Guess yes on glibc systems. gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; mingw*) # Guess no on native Windows. gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; *) # If we don't know, assume the worst. gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; esac ]) rm -f conftest.sym conftest.file ]) case "$gl_cv_func_lstat_dereferences_slashed_symlink" in *yes) AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1], [Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash.]) ;; esac ]) pspp-1.0.1/gl/m4/getdelim.m40000644000175000017500000000504313124536242012376 00000000000000# getdelim.m4 serial 12 dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. dnl dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_PREREQ([2.59]) AC_DEFUN([gl_FUNC_GETDELIM], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) dnl Persuade glibc to declare getdelim(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([getdelim]) AC_CHECK_FUNCS_ONCE([getdelim]) if test $ac_cv_func_getdelim = yes; then HAVE_GETDELIM=1 dnl Found it in some library. Verify that it works. AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim], [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data AC_RUN_IFELSE([AC_LANG_SOURCE([[ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getdelim (&line, &siz, '\n', in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) { free (line); fclose (in); return 2; } } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getdelim (&line, &siz, '\n', in) == -1) { fclose (in); return 3; } free (line); } fclose (in); return 0; } ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works. , [gl_cv_func_working_getdelim=no] dnl The library version does NOT work. , dnl We're cross compiling. Assume it works on glibc2 systems. [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ Lucky GNU user #endif #endif ], [gl_cv_func_working_getdelim="guessing yes"], [gl_cv_func_working_getdelim="guessing no"])] )]) case "$gl_cv_func_working_getdelim" in *no) REPLACE_GETDELIM=1 ;; esac else HAVE_GETDELIM=0 fi if test $ac_cv_have_decl_getdelim = no; then HAVE_DECL_GETDELIM=0 fi ]) # Prerequisites of lib/getdelim.c. AC_DEFUN([gl_PREREQ_GETDELIM], [ AC_CHECK_FUNCS([flockfile funlockfile]) AC_CHECK_DECLS([getc_unlocked]) ]) pspp-1.0.1/gl/m4/fstat.m40000644000175000017500000000177213124536242011732 00000000000000# fstat.m4 serial 5 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FSTAT], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) case "$host_os" in mingw*) dnl On this platform, the original stat() returns st_atime, st_mtime, dnl st_ctime values that are affected by the time zone. REPLACE_FSTAT=1 ;; esac dnl Replace fstat() for supporting the gnulib-defined open() on directories. m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then case "$gl_cv_func_open_directory_works" in *yes) ;; *) REPLACE_FSTAT=1 ;; esac fi ]) ]) # Prerequisites of lib/fstat.c and lib/stat-w32.c. AC_DEFUN([gl_PREREQ_FSTAT], [ AC_REQUIRE([gl_HEADER_SYS_STAT_H]) : ]) pspp-1.0.1/gl/m4/glibc21.m40000644000175000017500000000161313124536242012026 00000000000000# glibc21.m4 serial 5 dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Test for the GNU C Library, version 2.1 or newer, or uClibc. # From Bruno Haible. AC_DEFUN([gl_GLIBC21], [ AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], [ac_cv_gnu_library_2_1], [AC_EGREP_CPP([Lucky], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif #ifdef __UCLIBC__ Lucky user #endif ], [ac_cv_gnu_library_2_1=yes], [ac_cv_gnu_library_2_1=no]) ] ) AC_SUBST([GLIBC21]) GLIBC21="$ac_cv_gnu_library_2_1" ] ) pspp-1.0.1/gl/m4/localeconv.m40000644000175000017500000000114713124536242012732 00000000000000# localeconv.m4 serial 1 dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_LOCALECONV], [ AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) AC_REQUIRE([gl_LOCALE_H]) if test $REPLACE_STRUCT_LCONV = 1; then REPLACE_LOCALECONV=1 fi ]) # Prerequisites of lib/localeconv.c. AC_DEFUN([gl_PREREQ_LOCALECONV], [ AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [], [[#include ]]) ]) pspp-1.0.1/gl/m4/localcharset.m40000644000175000017500000000112513124536242013245 00000000000000# localcharset.m4 serial 7 dnl Copyright (C) 2002, 2004, 2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LOCALCHARSET], [ dnl Prerequisites of lib/localcharset.c. AC_REQUIRE([AM_LANGINFO_CODESET]) AC_REQUIRE([gl_FCNTL_O_FLAGS]) AC_CHECK_DECLS_ONCE([getc_unlocked]) dnl Prerequisites of the lib/Makefile.am snippet. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_GLIBC21]) ]) pspp-1.0.1/gl/m4/error.m40000644000175000017500000000151013124536242011730 00000000000000#serial 14 # Copyright (C) 1996-1998, 2001-2004, 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_ERROR], [ dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer dnl maintained in Autoconf and because it invokes AC_LIBOBJ. AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[error_at_line (0, 0, "", 0, "an error occurred");]])], [ac_cv_lib_error_at_line=yes], [ac_cv_lib_error_at_line=no])]) ]) # Prerequisites of lib/error.c. AC_DEFUN([gl_PREREQ_ERROR], [ AC_REQUIRE([AC_FUNC_STRERROR_R]) : ]) pspp-1.0.1/gl/m4/gnulib-cache.m40000644000175000017500000001104013124536251013117 00000000000000# Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; you can 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 file is distributed in the hope that 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 file. If not, see . # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the specification of how gnulib-tool is used. # It acts as a cache: It is written and read by gnulib-tool. # In projects that use version control, this file is meant to be put under # version control, like the configure.ac and various Makefile.am files. # Specification in the form of a command-line invocation: # gnulib-tool --import --lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=gl/doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl assert byteswap c-ctype c-snprintf c-strcase c-strcasestr c-strtod c-xvasprintf clean-temp close configmake count-one-bits crc crypto/md4 crypto/rijndael dirname dtoastr environ fatal-signal fcntl fpieee fprintf-posix fseeko ftello full-read full-write fwriteerror getline getopt-gnu getpass gettext gettimeofday gitlog-to-changelog include_next intprops inttostr isfinite isinf isnan localcharset mbchar mbiter memcasecmp memchr memchr2 mempcpy memrchr minmax mkdtemp mkstemp pipe2 printf-posix printf-safe progname rawmemchr read-file regex relocatable-prog rename round select snprintf snprintf-posix sprintf-posix stdarg stdbool stdint stpcpy strcasestr strerror strftime strsep strtod strtok_r sys_stat tempname termios trunc unicase/u8-casecmp unicase/u8-casefold unicase/u8-tolower unicase/u8-toupper unictype/category-of unictype/ctype-print unigbrk/uc-is-grapheme-break unilbrk/u8-possible-linebreaks uninorm/nfkd unistd unistr/u8-check unistr/u8-cpy unistr/u8-mblen unistr/u8-mbtouc unistr/u8-mbtoucr unistr/u8-strlen unistr/u8-strmbtouc unistr/u8-strncat unistr/u8-uctomb unitypes uniwidth/u8-strwidth unlocked-io vasprintf-posix version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf vsnprintf-posix vsprintf-posix xalloc xalloc-die xmalloca xmemdup0 xsize xstrndup xvasprintf # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) gl_MODULES([ assert byteswap c-ctype c-snprintf c-strcase c-strcasestr c-strtod c-xvasprintf clean-temp close configmake count-one-bits crc crypto/md4 crypto/rijndael dirname dtoastr environ fatal-signal fcntl fpieee fprintf-posix fseeko ftello full-read full-write fwriteerror getline getopt-gnu getpass gettext gettimeofday gitlog-to-changelog include_next intprops inttostr isfinite isinf isnan localcharset mbchar mbiter memcasecmp memchr memchr2 mempcpy memrchr minmax mkdtemp mkstemp pipe2 printf-posix printf-safe progname rawmemchr read-file regex relocatable-prog rename round select snprintf snprintf-posix sprintf-posix stdarg stdbool stdint stpcpy strcasestr strerror strftime strsep strtod strtok_r sys_stat tempname termios trunc unicase/u8-casecmp unicase/u8-casefold unicase/u8-tolower unicase/u8-toupper unictype/category-of unictype/ctype-print unigbrk/uc-is-grapheme-break unilbrk/u8-possible-linebreaks uninorm/nfkd unistd unistr/u8-check unistr/u8-cpy unistr/u8-mblen unistr/u8-mbtouc unistr/u8-mbtoucr unistr/u8-strlen unistr/u8-strmbtouc unistr/u8-strncat unistr/u8-uctomb unitypes uniwidth/u8-strwidth unlocked-io vasprintf-posix version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf vsnprintf-posix vsprintf-posix xalloc xalloc-die xmalloca xmemdup0 xsize xstrndup xvasprintf ]) gl_AVOID([]) gl_SOURCE_BASE([gl]) gl_M4_BASE([gl/m4]) gl_PO_BASE([]) gl_DOC_BASE([gl/doc]) gl_TESTS_BASE([tests]) gl_LIB([libgl]) gl_MAKEFILE_NAME([]) gl_LIBTOOL gl_MACRO_PREFIX([gl]) gl_PO_DOMAIN([]) gl_WITNESS_C_MACRO([]) pspp-1.0.1/gl/m4/sprintf-posix.m40000644000175000017500000001023313124536242013426 00000000000000# sprintf-posix.m4 serial 12 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_sprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # sprintf exists and is # already POSIX compliant. gl_cv_func_sprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_sprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_SPRINTF fi ]) AC_DEFUN([gl_REPLACE_SPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([sprintf]) REPLACE_SPRINTF=1 gl_PREREQ_SPRINTF ]) AC_DEFUN([gl_PREREQ_SPRINTF], [:]) pspp-1.0.1/gl/m4/stdint_h.m40000644000175000017500000000174313124536242012423 00000000000000# stdint_h.m4 serial 9 dnl Copyright (C) 1997-2004, 2006, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_STDINT_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([gl_AC_HEADER_STDINT_H], [ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[uintmax_t i = (uintmax_t) -1; return !i;]])], [gl_cv_header_stdint_h=yes], [gl_cv_header_stdint_h=no])]) if test $gl_cv_header_stdint_h = yes; then AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) pspp-1.0.1/gl/m4/dirname.m40000644000175000017500000000105413124536242012221 00000000000000#serial 10 -*- autoconf -*- dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DIRNAME], [ AC_REQUIRE([gl_DIRNAME_LGPL]) ]) AC_DEFUN([gl_DIRNAME_LGPL], [ dnl Prerequisites of lib/dirname.h. AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c, dnl lib/stripslash.c. ]) pspp-1.0.1/gl/m4/msvc-nothrow.m40000644000175000017500000000053013124536242013246 00000000000000# msvc-nothrow.m4 serial 1 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MSVC_NOTHROW], [ AC_REQUIRE([gl_MSVC_INVAL]) ]) pspp-1.0.1/gl/m4/close.m40000644000175000017500000000222113124536242011704 00000000000000# close.m4 serial 9 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_CLOSE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) m4_ifdef([gl_MSVC_INVAL], [ AC_REQUIRE([gl_MSVC_INVAL]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_CLOSE=1 fi ]) m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [ gl_PREREQ_SYS_H_WINSOCK2 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then dnl Even if the 'socket' module is not used here, another part of the dnl application may use it and pass file descriptors that refer to dnl sockets to the close() function. So enable the support for sockets. REPLACE_CLOSE=1 fi ]) dnl Replace close() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ if test $REPLACE_CLOSE = 0; then gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then REPLACE_CLOSE=1 fi fi ]) ]) pspp-1.0.1/gl/m4/vfprintf-posix.m40000644000175000017500000001044613124536242013605 00000000000000# vfprintf-posix.m4 serial 14 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VFPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_vfprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # vfprintf exists and is # already POSIX compliant. gl_cv_func_vfprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_vfprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_VFPRINTF fi ]) AC_DEFUN([gl_REPLACE_VFPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([vfprintf]) REPLACE_VFPRINTF=1 AC_DEFINE([REPLACE_VFPRINTF_POSIX], [1], [Define if vfprintf is overridden by a POSIX compliant gnulib implementation.]) gl_PREREQ_VFPRINTF ]) AC_DEFUN([gl_PREREQ_VFPRINTF], [:]) pspp-1.0.1/gl/m4/termios_h.m40000644000175000017500000000271413124536242012577 00000000000000# termios_h.m4 serial 4 dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_TERMIOS_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_TERMIOS_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([termios.h]) if test $ac_cv_header_termios_h != yes; then HAVE_TERMIOS_H=0 fi dnl Ensure the type pid_t gets defined. AC_REQUIRE([AC_TYPE_PID_T]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include ]], [tcgetsid]) ]) AC_DEFUN([gl_TERMIOS_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_TERMIOS_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_TERMIOS_H_DEFAULTS], [ GNULIB_TCGETSID=0; AC_SUBST([GNULIB_TCGETSID]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_TCGETSID=1; AC_SUBST([HAVE_DECL_TCGETSID]) HAVE_TERMIOS_H=1; AC_SUBST([HAVE_TERMIOS_H]) ]) pspp-1.0.1/gl/m4/sockets.m40000644000175000017500000000070713124536242012261 00000000000000# sockets.m4 serial 7 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SOCKETS], [ AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([gl_SOCKETLIB]) gl_PREREQ_SOCKETS ]) # Prerequisites of lib/sockets.c. AC_DEFUN([gl_PREREQ_SOCKETS], [ : ]) pspp-1.0.1/gl/m4/mbchar.m40000644000175000017500000000065313124536242012042 00000000000000# mbchar.m4 serial 9 dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl autoconf tests required for use of mbchar.m4 dnl From Bruno Haible. AC_DEFUN([gl_MBCHAR], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) pspp-1.0.1/gl/m4/strtok_r.m40000644000175000017500000000506313132510757012457 00000000000000# strtok_r.m4 serial 14 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRTOK_R], [ dnl The strtok_r() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS([strtok_r]) if test $ac_cv_func_strtok_r = yes; then HAVE_STRTOK_R=1 dnl glibc 2.7 has a bug in strtok_r that causes a segmentation fault dnl when the second argument to strtok_r is a constant string that has dnl exactly one byte and compiling with optimization. This bug is, for dnl example, present in the glibc 2.7-18 package in Debian "lenny". dnl See . AC_CACHE_CHECK([whether strtok_r works], [gl_cv_func_strtok_r_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ #ifndef __OPTIMIZE__ # define __OPTIMIZE__ 1 #endif #undef __OPTIMIZE_SIZE__ #undef __NO_INLINE__ #include #include ]], [[static const char dummy[] = "\177\01a"; char delimiters[] = "xxxxxxxx"; char *save_ptr = (char *) dummy; strtok_r (delimiters, "x", &save_ptr); strtok_r (NULL, "x", &save_ptr); return 0; ]]) ], [gl_cv_func_strtok_r_works=yes], [gl_cv_func_strtok_r_works=no], [case "$host_os" in # Guess no on glibc systems. *-gnu*) gl_cv_func_strtok_r_works="guessing no" ;; # Guess yes on native Windows. mingw*) gl_cv_func_strtok_r_works="guessing yes" ;; *) gl_cv_func_strtok_r_works="guessing yes" ;; esac ]) ]) case "$gl_cv_func_strtok_r_works" in *no) dnl We could set REPLACE_STRTOK_R=1 here, but it's only the macro dnl version in which is wrong. The code compiled dnl into libc is fine. UNDEFINE_STRTOK_R=1 ;; esac else HAVE_STRTOK_R=0 fi AC_CHECK_DECLS_ONCE([strtok_r]) if test $ac_cv_have_decl_strtok_r = no; then HAVE_DECL_STRTOK_R=0 fi ]) # Prerequisites of lib/strtok_r.c. AC_DEFUN([gl_PREREQ_STRTOK_R], [ : ]) pspp-1.0.1/gl/m4/strerror.m40000644000175000017500000000641513132510757012474 00000000000000# strerror.m4 serial 18 dnl Copyright (C) 2002, 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRERROR], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_HEADER_ERRNO_H]) AC_REQUIRE([gl_FUNC_STRERROR_0]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) ]) if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then AC_CACHE_CHECK([for working strerror function], [gl_cv_func_working_strerror], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[if (!*strerror (-2)) return 1;]])], [gl_cv_func_working_strerror=yes], [gl_cv_func_working_strerror=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_working_strerror="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_working_strerror="guessing no" ;; esac ]) ]) case "$gl_cv_func_working_strerror" in *yes) ;; *) dnl The system's strerror() fails to return a string for out-of-range dnl integers. Replace it. REPLACE_STRERROR=1 ;; esac m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's dnl buffer, we must replace strerror. case "$gl_cv_func_strerror_r_works" in *no) REPLACE_STRERROR=1 ;; esac ]) else dnl The system's strerror() cannot know about the new errno values we add dnl to , or any fix for strerror(0). Replace it. REPLACE_STRERROR=1 fi ]) dnl Detect if strerror(0) passes (that is, does not set errno, and does not dnl return a string that matches strerror(-1)). AC_DEFUN([gl_FUNC_STRERROR_0], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles REPLACE_STRERROR_0=0 AC_CACHE_CHECK([whether strerror(0) succeeds], [gl_cv_func_strerror_0_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[int result = 0; char *str; errno = 0; str = strerror (0); if (!*str) result |= 1; if (errno) result |= 2; if (strstr (str, "nknown") || strstr (str, "ndefined")) result |= 4; return result;]])], [gl_cv_func_strerror_0_works=yes], [gl_cv_func_strerror_0_works=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_strerror_0_works="guessing no" ;; esac ]) ]) case "$gl_cv_func_strerror_0_works" in *yes) ;; *) REPLACE_STRERROR_0=1 AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0) does not return a message implying success.]) ;; esac ]) pspp-1.0.1/gl/m4/intmax_t.m40000644000175000017500000000416613124536242012434 00000000000000# intmax_t.m4 serial 8 dnl Copyright (C) 1997-2004, 2006-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. AC_PREREQ([2.53]) # Define intmax_t to 'long' or 'long long' # if it is not already defined in or . AC_DEFUN([gl_AC_TYPE_INTMAX_T], [ dnl For simplicity, we assume that a header file defines 'intmax_t' if and dnl only if it defines 'uintmax_t'. AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], [Define to long or long long if and don't define.]) else AC_DEFINE([HAVE_INTMAX_T], [1], [Define if you have the 'intmax_t' type in or .]) fi ]) dnl An alternative would be to explicitly test for 'intmax_t'. AC_DEFUN([gt_AC_TYPE_INTMAX_T], [ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif ]], [[intmax_t x = -1; return !x;]])], [gt_cv_c_intmax_t=yes], [gt_cv_c_intmax_t=no])]) if test $gt_cv_c_intmax_t = yes; then AC_DEFINE([HAVE_INTMAX_T], [1], [Define if you have the 'intmax_t' type in or .]) else AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], [Define to long or long long if and don't define.]) fi ]) pspp-1.0.1/gl/m4/fprintf-posix.m40000644000175000017500000001043013124536242013410 00000000000000# fprintf-posix.m4 serial 14 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_fprintf_posix=no case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) # fprintf exists and is # already POSIX compliant. gl_cv_func_fprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_fprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_FPRINTF fi ]) AC_DEFUN([gl_REPLACE_FPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([fprintf]) REPLACE_FPRINTF=1 AC_DEFINE([REPLACE_FPRINTF_POSIX], [1], [Define if fprintf is overridden by a POSIX compliant gnulib implementation.]) gl_PREREQ_FPRINTF ]) AC_DEFUN([gl_PREREQ_FPRINTF], [:]) pspp-1.0.1/gl/m4/localtime-buffer.m40000644000175000017500000000123013124536241014015 00000000000000# localtime-buffer.m4 serial 1 dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LOCALTIME_BUFFER_DEFAULTS], [ NEED_LOCALTIME_BUFFER=0 ]) dnl Macro invoked from other modules, to signal that the compilation of dnl module 'localtime-buffer' is needed. AC_DEFUN([gl_LOCALTIME_BUFFER_NEEDED], [ AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) NEED_LOCALTIME_BUFFER=1 REPLACE_GMTIME=1 REPLACE_LOCALTIME=1 ]) pspp-1.0.1/gl/m4/hard-locale.m40000644000175000017500000000056213124536242012760 00000000000000# hard-locale.m4 serial 8 dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl No prerequisites of lib/hard-locale.c. AC_DEFUN([gl_HARD_LOCALE], [ : ]) pspp-1.0.1/gl/m4/md4.m40000644000175000017500000000056413124536242011273 00000000000000# md4.m4 serial 7 dnl Copyright (C) 2002-2006, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Prerequisites of lib/md4.c. AC_DEFUN([gl_MD4], [ AC_REQUIRE([gl_BIGENDIAN]) : ]) pspp-1.0.1/gl/m4/write.m40000644000175000017500000000203013124536242011727 00000000000000# write.m4 serial 6 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WRITE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) m4_ifdef([gl_MSVC_INVAL], [ AC_REQUIRE([gl_MSVC_INVAL]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_WRITE=1 fi ]) dnl This ifdef is just an optimization, to avoid performing a configure dnl check whose result is not used. It does not make the test of dnl GNULIB_UNISTD_H_SIGPIPE or GNULIB_SIGPIPE redundant. m4_ifdef([gl_SIGNAL_SIGPIPE], [ gl_SIGNAL_SIGPIPE if test $gl_cv_header_signal_h_SIGPIPE != yes; then REPLACE_WRITE=1 fi ]) m4_ifdef([gl_NONBLOCKING_IO], [ gl_NONBLOCKING_IO if test $gl_cv_have_nonblocking != yes; then REPLACE_WRITE=1 fi ]) ]) # Prerequisites of lib/write.c. AC_DEFUN([gl_PREREQ_WRITE], [:]) pspp-1.0.1/gl/m4/trunc.m40000644000175000017500000000616113132510757011743 00000000000000# trunc.m4 serial 10 dnl Copyright (C) 2007, 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_TRUNC], [ m4_divert_text([DEFAULTS], [gl_trunc_required=plain]) AC_REQUIRE([gl_MATH_H_DEFAULTS]) dnl Persuade glibc to declare trunc(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) dnl Test whether trunc() is declared. AC_CHECK_DECLS([trunc], , , [[#include ]]) if test "$ac_cv_have_decl_trunc" = yes; then dnl Test whether trunc() can be used without libm. TRUNC_LIBM=? AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include double x;]], [[x = trunc(x);]])], [TRUNC_LIBM=]) if test "$TRUNC_LIBM" = "?"; then save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include double x;]], [[x = trunc(x);]])], [TRUNC_LIBM="-lm"]) LIBS="$save_LIBS" fi if test "$TRUNC_LIBM" = "?"; then TRUNC_LIBM= fi m4_ifdef([gl_FUNC_TRUNC_IEEE], [ if test $gl_trunc_required = ieee && test $REPLACE_TRUNC = 0; then AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether trunc works according to ISO C 99 with IEC 60559], [gl_cv_func_trunc_ieee], [ save_LIBS="$LIBS" LIBS="$LIBS $TRUNC_LIBM" AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include ]gl_DOUBLE_MINUS_ZERO_CODE[ ]gl_DOUBLE_SIGNBIT_CODE[ static double dummy (double f) { return 0; } int main (int argc, char *argv[]) { double (*my_trunc) (double) = argc ? trunc : dummy; /* Test whether trunc (-0.0) is -0.0. */ if (signbitd (minus_zerod) && !signbitd (my_trunc (minus_zerod))) return 1; return 0; } ]])], [gl_cv_func_trunc_ieee=yes], [gl_cv_func_trunc_ieee=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_trunc_ieee="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_trunc_ieee="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_trunc_ieee="guessing no" ;; esac ]) LIBS="$save_LIBS" ]) case "$gl_cv_func_trunc_ieee" in *yes) ;; *) REPLACE_TRUNC=1 ;; esac fi ]) else HAVE_DECL_TRUNC=0 fi if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then dnl No libraries are needed to link lib/trunc.c. TRUNC_LIBM= fi AC_SUBST([TRUNC_LIBM]) ]) pspp-1.0.1/gl/m4/fseterr.m40000644000175000017500000000053013124536242012252 00000000000000# fseterr.m4 serial 1 dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FSETERR], [ AC_CHECK_FUNCS_ONCE([__fseterr]) ]) pspp-1.0.1/gl/m4/count-one-bits.m40000644000175000017500000000074413124536242013455 00000000000000# count-one-bits.m4 serial 3 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_COUNT_ONE_BITS], [ dnl We don't need (and can't compile) count_one_bits_ll dnl unless the type 'unsigned long long int' exists. AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) ]) pspp-1.0.1/gl/m4/strncat.m40000644000175000017500000000565413132510757012274 00000000000000# strncat.m4 serial 3 dnl Copyright (C) 2002-2004, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_FUNC_STRNCAT], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) dnl Detect bug in Solaris 8..10 on SPARC: dnl strncat should not dereference more than n bytes, but always dereferences dnl n+1 bytes if the first n bytes don't contain a NUL byte. dnl Assume that strncat works on platforms that lack mprotect. AC_CACHE_CHECK([whether strncat works], [gl_cv_func_strncat_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #if HAVE_SYS_MMAN_H # include # include # include # include # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif ]], [[ char *fence = NULL; #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) fence = two_pages + pagesize; } #endif if (fence) { char dest[8]; dest[0] = '*'; dest[1] = 'a'; dest[2] = '\0'; dest[3] = 'w'; dest[4] = 'x'; dest[5] = 'y'; dest[6] = 'z'; *(fence - 3) = '7'; *(fence - 2) = '2'; *(fence - 1) = '9'; if (strncat (dest + 1, fence - 3, 3) != dest + 1) return 1; if (dest[0] != '*') return 2; if (dest[1] != 'a' || dest[2] != '7' || dest[3] != '2' || dest[4] != '9' || dest[5] != '\0') return 3; if (dest[6] != 'z') return 4; } return 0; ]])], [gl_cv_func_strncat_works=yes], [gl_cv_func_strncat_works=no], [ case "$host_os" in # Guess no on Solaris. solaris*) gl_cv_func_strncat_works="guessing no" ;; # Guess yes on native Windows. mingw*) gl_cv_func_strncat_works="guessing yes" ;; # Guess yes otherwise. *) gl_cv_func_strncat_works="guessing yes" ;; esac ]) ]) case "$gl_cv_func_strncat_works" in *yes) ;; *) REPLACE_STRNCAT=1 ;; esac ]) # Prerequisites of lib/strncat.c. AC_DEFUN([gl_PREREQ_STRNCAT], [ : ]) pspp-1.0.1/gl/m4/strcase.m40000644000175000017500000000201213124536242012241 00000000000000# strcase.m4 serial 11 dnl Copyright (C) 2002, 2005-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STRCASE], [ gl_FUNC_STRCASECMP gl_FUNC_STRNCASECMP ]) AC_DEFUN([gl_FUNC_STRCASECMP], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) AC_CHECK_FUNCS([strcasecmp]) if test $ac_cv_func_strcasecmp = no; then HAVE_STRCASECMP=0 fi ]) AC_DEFUN([gl_FUNC_STRNCASECMP], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) AC_CHECK_FUNCS([strncasecmp]) if test $ac_cv_func_strncasecmp = yes; then HAVE_STRNCASECMP=1 else HAVE_STRNCASECMP=0 fi AC_CHECK_DECLS([strncasecmp]) if test $ac_cv_have_decl_strncasecmp = no; then HAVE_DECL_STRNCASECMP=0 fi ]) # Prerequisites of lib/strcasecmp.c. AC_DEFUN([gl_PREREQ_STRCASECMP], [ : ]) # Prerequisites of lib/strncasecmp.c. AC_DEFUN([gl_PREREQ_STRNCASECMP], [ : ]) pspp-1.0.1/gl/m4/inttostr.m40000644000175000017500000000145413124536242012474 00000000000000#serial 8 dnl Copyright (C) 2004-2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_INTTOSTR], [ gl_PREREQ_INTTOSTR gl_PREREQ_IMAXTOSTR gl_PREREQ_OFFTOSTR gl_PREREQ_UMAXTOSTR gl_PREREQ_UINTTOSTR ]) # Prerequisites of lib/inttostr.h. AC_DEFUN([gl_PREREQ_INTTOSTR], [ AC_REQUIRE([AC_TYPE_OFF_T]) : ]) # Prerequisites of lib/imaxtostr.c. AC_DEFUN([gl_PREREQ_IMAXTOSTR], [:]) # Prerequisites of lib/offtostr.c. AC_DEFUN([gl_PREREQ_OFFTOSTR], [:]) # Prerequisites of lib/umaxtostr.c. AC_DEFUN([gl_PREREQ_UMAXTOSTR], [:]) # Prerequisites of lib/uinttostr.c. AC_DEFUN([gl_PREREQ_UINTTOSTR], [:]) pspp-1.0.1/gl/m4/errno_h.m40000644000175000017500000000623413124536242012243 00000000000000# errno_h.m4 serial 12 dnl Copyright (C) 2004, 2006, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ AC_EGREP_CPP([booboo],[ #include #if !defined ETXTBSY booboo #endif #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ENETRESET booboo #endif #if !defined ECONNABORTED booboo #endif #if !defined ESTALE booboo #endif #if !defined EDQUOT booboo #endif #if !defined ECANCELED booboo #endif #if !defined EOWNERDEAD booboo #endif #if !defined ENOTRECOVERABLE booboo #endif #if !defined EILSEQ booboo #endif ], [gl_cv_header_errno_h_complete=no], [gl_cv_header_errno_h_complete=yes]) ]) if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else gl_NEXT_HEADERS([errno.h]) ERRNO_H='errno.h' fi AC_SUBST([ERRNO_H]) AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"]) gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) gl_REPLACE_ERRNO_VALUE([ENOLINK]) gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) ]) # Assuming $1 = EOVERFLOW. # The EOVERFLOW errno value ought to be defined in , according to # POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and # some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. # Check for the value of EOVERFLOW. # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. AC_DEFUN([gl_REPLACE_ERRNO_VALUE], [ if test -n "$ERRNO_H"; then AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ AC_EGREP_CPP([yes],[ #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=yes], [gl_cv_header_errno_h_]$1[=no]) if test $gl_cv_header_errno_h_]$1[ = no; then AC_EGREP_CPP([yes],[ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=hidden]) if test $gl_cv_header_errno_h_]$1[ = hidden; then dnl The macro exists but is hidden. dnl Define it to the same value. AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include ]) fi fi ]) case $gl_cv_header_errno_h_]$1[ in yes | no) ]$1[_HIDDEN=0; ]$1[_VALUE= ;; *) ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" ;; esac AC_SUBST($1[_HIDDEN]) AC_SUBST($1[_VALUE]) fi ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) pspp-1.0.1/gl/m4/pipe2.m40000644000175000017500000000102313124536242011615 00000000000000# pipe2.m4 serial 2 dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_PIPE2], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl Persuade glibc to declare pipe2(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([pipe2]) if test $ac_cv_func_pipe2 != yes; then HAVE_PIPE2=0 fi ]) pspp-1.0.1/gl/m4/include_next.m40000644000175000017500000002106113124536242013263 00000000000000# include_next.m4 serial 24 dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Derek Price. dnl Sets INCLUDE_NEXT, INCLUDE_NEXT_AS_FIRST_DIRECTIVE, PRAGMA_SYSTEM_HEADER, dnl and PRAGMA_COLUMNS. dnl dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to dnl 'include' otherwise. dnl dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler dnl supports it in the special case that it is the first include directive in dnl the given file, or to 'include' otherwise. dnl dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, dnl so as to avoid GCC warnings when the gcc option -pedantic is used. dnl '#pragma GCC system_header' has the same effect as if the file was found dnl through the include search path specified with '-isystem' options (as dnl opposed to the search path specified with '-I' options). Namely, gcc dnl does not warn about some things, and on some systems (Solaris and Interix) dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead dnl of plain '__STDC__'. dnl dnl PRAGMA_COLUMNS can be used in files that override system header files, so dnl as to avoid compilation errors on HP NonStop systems when the gnulib file dnl is included by a system header file that does a "#pragma COLUMNS 80" (which dnl has the effect of truncating the lines of that file and all files that it dnl includes to 80 columns) and the gnulib file has lines longer than 80 dnl columns. AC_DEFUN([gl_INCLUDE_NEXT], [ AC_LANG_PREPROC_REQUIRE() AC_CACHE_CHECK([whether the preprocessor supports include_next], [gl_cv_have_include_next], [rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on dnl AIX 6.1 support include_next when used as first preprocessor directive dnl in a file, but not when preceded by another include directive. Check dnl for this bug by including . dnl Additionally, with this same compiler, include_next is a no-op when dnl used in a header file that was included by specifying its absolute dnl file name. Despite these two bugs, include_next is used in the dnl compiler's . By virtue of the second bug, we need to use dnl include_next as well in this case. cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" dnl We intentionally avoid using AC_LANG_SOURCE here. AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], [gl_cv_have_include_next=yes], [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], [gl_cv_have_include_next=buggy], [gl_cv_have_include_next=no]) ]) CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 ]) PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi AC_SUBST([INCLUDE_NEXT]) AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) AC_SUBST([PRAGMA_SYSTEM_HEADER]) AC_CACHE_CHECK([whether system header files limit the line length], [gl_cv_pragma_columns], [dnl HP NonStop systems, which define __TANDEM, have this misfeature. AC_EGREP_CPP([choke me], [ #ifdef __TANDEM choke me #endif ], [gl_cv_pragma_columns=yes], [gl_cv_pragma_columns=no]) ]) if test $gl_cv_pragma_columns = yes; then PRAGMA_COLUMNS="#pragma COLUMNS 10000" else PRAGMA_COLUMNS= fi AC_SUBST([PRAGMA_COLUMNS]) ]) # gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------------ # For each arg foo.h, if #include_next works, define NEXT_FOO_H to be # ''; otherwise define it to be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # Also, if #include_next works as first preprocessing directive in a file, # define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to # be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # That way, a header file with the following line: # #@INCLUDE_NEXT@ @NEXT_FOO_H@ # or # #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ # behaves (after sed substitution) as if it contained # #include_next # even if the compiler does not support include_next. # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". # Use '""', not '<>', so that the /// cannot be confused with a C99 comment. # Note: This macro assumes that the header file is not empty after # preprocessing, i.e. it does not only define preprocessor macros but also # provides some type/enum definitions or function/variable declarations. # # This macro also checks whether each header exists, by invoking # AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument. AC_DEFUN([gl_CHECK_NEXT_HEADERS], [ gl_NEXT_HEADERS_INTERNAL([$1], [check]) ]) # gl_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------ # Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist. # This is suitable for headers like that are standardized by C89 # and therefore can be assumed to exist. AC_DEFUN([gl_NEXT_HEADERS], [ gl_NEXT_HEADERS_INTERNAL([$1], [assume]) ]) # The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], [ AC_REQUIRE([gl_INCLUDE_NEXT]) AC_REQUIRE([AC_CANONICAL_HOST]) m4_if([$2], [check], [AC_CHECK_HEADERS_ONCE([$1]) ]) dnl FIXME: gl_next_header and gl_header_exists must be used unquoted dnl until we can assume autoconf 2.64 or newer. m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], [gl_cv_next_]m4_defn([gl_HEADER_NAME])) if test $gl_cv_have_include_next = yes; then AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( [absolute name of <]m4_defn([gl_HEADER_NAME])[>], m4_defn([gl_next_header]), [m4_if([$2], [check], [AS_VAR_PUSHDEF([gl_header_exists], [ac_cv_header_]m4_defn([gl_HEADER_NAME])) if test AS_VAR_GET(gl_header_exists) = yes; then AS_VAR_POPDEF([gl_header_exists]) ]) gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME)) AS_VAR_SET(gl_next_header, ['"'$gl_header'"']) m4_if([$2], [check], [else AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) fi ]) ]) fi AC_SUBST( AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), [AS_VAR_GET(gl_next_header)]) if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'gl_HEADER_NAME'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=AS_VAR_GET(gl_next_header) fi AC_SUBST( AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), [$gl_next_as_first_directive]) AS_VAR_POPDEF([gl_next_header])]) ]) # Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; # this fallback is safe for all earlier autoconf versions. m4_define_default([AC_LANG_DEFINES_PROVIDED]) pspp-1.0.1/gl/m4/relocatable.m40000644000175000017500000001101613132510757013060 00000000000000# relocatable.m4 serial 19 dnl Copyright (C) 2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl gl_RELOCATABLE([RELOCWRAPPER-DIR]) dnl ---------------------------------------------------------- dnl Support for relocatable programs. dnl Supply RELOCWRAPPER-DIR as the directory where relocwrapper.c may be found. AC_DEFUN([gl_RELOCATABLE], [ AC_REQUIRE([gl_RELOCATABLE_BODY]) gl_RELOCATABLE_LIBRARY : ${RELOCATABLE_CONFIG_H_DIR='$(top_builddir)'} RELOCATABLE_SRC_DIR="\$(top_srcdir)/$gl_source_base" RELOCATABLE_BUILD_DIR="\$(top_builddir)/$gl_source_base" ]) dnl The guts of gl_RELOCATABLE. Needs to be expanded only once. AC_DEFUN([gl_RELOCATABLE_BODY], [ AC_REQUIRE([AC_PROG_INSTALL]) dnl This AC_BEFORE invocation leads to unjustified autoconf warnings dnl when gl_RELOCATABLE_BODY is invoked more than once. dnl We need this AC_BEFORE because AC_PROG_INSTALL is documented to dnl overwrite earlier settings of INSTALL and INSTALL_PROGRAM (even dnl though in autoconf-2.52..2.60 it doesn't do so), but we want this dnl macro's setting of INSTALL_PROGRAM to persist. AC_BEFORE([AC_PROG_INSTALL],[gl_RELOCATABLE_BODY]) AC_REQUIRE([AC_LIB_LIBPATH]) AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY]) AC_REQUIRE([AC_CANONICAL_HOST]) is_noop=no use_elf_origin_trick=no use_wrapper=no if test $RELOCATABLE = yes; then # --enable-relocatable implies --disable-rpath enable_rpath=no AC_CHECK_HEADERS([mach-o/dyld.h]) AC_CHECK_FUNCS([_NSGetExecutablePath]) case "$host_os" in mingw*) is_noop=yes ;; linux* | kfreebsd*) use_elf_origin_trick=yes ;; esac if test $is_noop = yes; then RELOCATABLE_LDFLAGS=: AC_SUBST([RELOCATABLE_LDFLAGS]) else if test $use_elf_origin_trick = yes; then dnl Use the dynamic linker's support for relocatable programs. case "$ac_aux_dir" in /*) reloc_ldflags="$ac_aux_dir/reloc-ldflags" ;; *) reloc_ldflags="\$(top_builddir)/$ac_aux_dir/reloc-ldflags" ;; esac RELOCATABLE_LDFLAGS="\"$reloc_ldflags\" \"\$(host)\" \"\$(RELOCATABLE_LIBRARY_PATH)\"" AC_SUBST([RELOCATABLE_LDFLAGS]) else use_wrapper=yes dnl Unfortunately we cannot define INSTALL_PROGRAM to a command dnl consisting of more than one word - libtool doesn't support this. dnl So we abuse the INSTALL_PROGRAM_ENV hook, originally meant for the dnl 'install-strip' target. INSTALL_PROGRAM_ENV="RELOC_LIBRARY_PATH_VAR=\"$shlibpath_var\" RELOC_LIBRARY_PATH_VALUE=\"\$(RELOCATABLE_LIBRARY_PATH)\" RELOC_PREFIX=\"\$(prefix)\" RELOC_DESTDIR=\"\$(DESTDIR)\" RELOC_COMPILE_COMMAND=\"\$(CC) \$(CPPFLAGS) \$(CFLAGS) \$(LDFLAGS)\" RELOC_SRCDIR=\"\$(RELOCATABLE_SRC_DIR)\" RELOC_BUILDDIR=\"\$(RELOCATABLE_BUILD_DIR)\" RELOC_CONFIG_H_DIR=\"\$(RELOCATABLE_CONFIG_H_DIR)\" RELOC_EXEEXT=\"\$(EXEEXT)\" RELOC_STRIP_PROG=\"\$(RELOCATABLE_STRIP)\" RELOC_INSTALL_PROG=\"$INSTALL_PROGRAM\"" AC_SUBST([INSTALL_PROGRAM_ENV]) case "$ac_aux_dir" in /*) INSTALL_PROGRAM="$ac_aux_dir/install-reloc" ;; *) INSTALL_PROGRAM="\$(top_builddir)/$ac_aux_dir/install-reloc" ;; esac fi fi fi AM_CONDITIONAL([RELOCATABLE_VIA_LD], [test $is_noop = yes || test $use_elf_origin_trick = yes]) AM_CONDITIONAL([RELOCATABLE_VIA_WRAPPER], [test $use_wrapper = yes]) dnl RELOCATABLE_LIBRARY_PATH can be set in configure.ac. Default is empty. AC_SUBST([RELOCATABLE_LIBRARY_PATH]) AC_SUBST([RELOCATABLE_CONFIG_H_DIR]) AC_SUBST([RELOCATABLE_SRC_DIR]) AC_SUBST([RELOCATABLE_BUILD_DIR]) dnl Ensure RELOCATABLE_STRIP is defined in Makefiles (at least those dnl generated by automake), with value ':'. RELOCATABLE_STRIP=':' AC_SUBST([RELOCATABLE_STRIP]) ]) dnl Determine the platform dependent parameters needed to use relocatability: dnl shlibpath_var. AC_DEFUN([AC_LIB_LIBPATH], [ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library path variable], [acl_cv_libpath], [ LD="$LD" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.libpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_libpath=${acl_cv_shlibpath_var:-none} ]) shlibpath_var="$acl_cv_shlibpath_var" ]) pspp-1.0.1/gl/m4/alloca.m40000644000175000017500000001037213124536242012040 00000000000000# alloca.m4 serial 14 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ALLOCA], [ AC_REQUIRE([AC_FUNC_ALLOCA]) if test $ac_cv_func_alloca_works = no; then gl_PREREQ_ALLOCA fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ AC_EGREP_CPP([Need own alloca], [ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) ]) if test $gl_cv_rpl_alloca = yes; then dnl OK, alloca can be implemented through a compiler built-in. AC_DEFINE([HAVE_ALLOCA], [1], [Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution.]) ALLOCA_H=alloca.h else dnl alloca exists as a library function, i.e. it is slow and probably dnl a memory leak. Don't define HAVE_ALLOCA in this case. ALLOCA_H= fi else ALLOCA_H=alloca.h fi AC_SUBST([ALLOCA_H]) AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"]) ]) # Prerequisites of lib/alloca.c. # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. AC_DEFUN([gl_PREREQ_ALLOCA], [:]) # This works around a bug in autoconf <= 2.68. # See . m4_version_prereq([2.69], [] ,[ # This is taken from the following Autoconf patch: # http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497 # _AC_LIBOBJ_ALLOCA # ----------------- # Set up the LIBOBJ replacement of 'alloca'. Well, not exactly # AC_LIBOBJ since we actually set the output variable 'ALLOCA'. # Nevertheless, for Automake, AC_LIBSOURCES it. m4_define([_AC_LIBOBJ_ALLOCA], [# The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. AC_LIBSOURCES(alloca.c) AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.]) AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray, [AC_EGREP_CPP(webecray, [#if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif ], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, [Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP systems. This function is required for 'alloca.c' support on those systems.]) break]) done fi AC_CACHE_CHECK([stack direction for C alloca], [ac_cv_c_stack_direction], [AC_RUN_IFELSE([AC_LANG_SOURCE( [AC_INCLUDES_DEFAULT int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; }])], [ac_cv_c_stack_direction=1], [ac_cv_c_stack_direction=-1], [ac_cv_c_stack_direction=0])]) AH_VERBATIM([STACK_DIRECTION], [/* 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 runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ @%:@undef STACK_DIRECTION])dnl AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) ])# _AC_LIBOBJ_ALLOCA ]) pspp-1.0.1/gl/m4/getline.m40000644000175000017500000000601313124536242012231 00000000000000# getline.m4 serial 28 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_PREREQ([2.59]) dnl See if there's a working, system-supplied version of the getline function. dnl We can't just do AC_REPLACE_FUNCS([getline]) because some systems dnl have a function by that name in -linet that doesn't have anything dnl to do with the function we need. AC_DEFUN([gl_FUNC_GETLINE], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) dnl Persuade glibc to declare getline(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([getline]) gl_getline_needs_run_time_check=no AC_CHECK_FUNC([getline], [dnl Found it in some library. Verify that it works. gl_getline_needs_run_time_check=yes], [am_cv_func_working_getline=no]) if test $gl_getline_needs_run_time_check = yes; then AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline], [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data AC_RUN_IFELSE([AC_LANG_SOURCE([[ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getline (&line, &siz, in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) { free (line); fclose (in); return 2; } free (line); } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getline (&line, &siz, in) == -1) { fclose (in); return 3; } free (line); } fclose (in); return 0; } ]])], [am_cv_func_working_getline=yes] dnl The library version works. , [am_cv_func_working_getline=no] dnl The library version does NOT work. , dnl We're cross compiling. Assume it works on glibc2 systems. [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ Lucky GNU user #endif #endif ], [am_cv_func_working_getline="guessing yes"], [am_cv_func_working_getline="guessing no"])] )]) fi if test $ac_cv_have_decl_getline = no; then HAVE_DECL_GETLINE=0 fi case "$am_cv_func_working_getline" in *no) dnl Set REPLACE_GETLINE always: Even if we have not found the broken dnl getline function among $LIBS, it may exist in libinet and the dnl executable may be linked with -linet. REPLACE_GETLINE=1 ;; esac ]) # Prerequisites of lib/getline.c. AC_DEFUN([gl_PREREQ_GETLINE], [ : ]) pspp-1.0.1/gl/m4/wint_t.m40000644000175000017500000000444313124536242012113 00000000000000# wint_t.m4 serial 7 dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wint_t' type and whether gnulib's dnl or would, if present, override 'wint_t'. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], [ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0';]], [[]])], [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])]) if test $gt_cv_c_wint_t = yes; then AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) dnl Determine whether gnulib's or would, if present, dnl override 'wint_t'. AC_CACHE_CHECK([whether wint_t is too small], [gl_cv_type_wint_t_too_small], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include #endif #include int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; ]])], [gl_cv_type_wint_t_too_small=no], [gl_cv_type_wint_t_too_small=yes])]) if test $gl_cv_type_wint_t_too_small = yes; then GNULIB_OVERRIDES_WINT_T=1 else GNULIB_OVERRIDES_WINT_T=0 fi else GNULIB_OVERRIDES_WINT_T=0 fi AC_SUBST([GNULIB_OVERRIDES_WINT_T]) ]) dnl Prerequisites of the 'wint_t' override. AC_DEFUN([gl_TYPE_WINT_T_PREREQ], [ AC_CHECK_HEADERS_ONCE([crtdefs.h]) if test $ac_cv_header_crtdefs_h = yes; then HAVE_CRTDEFS_H=1 else HAVE_CRTDEFS_H=0 fi AC_SUBST([HAVE_CRTDEFS_H]) ]) pspp-1.0.1/gl/m4/sig_atomic_t.m40000644000175000017500000000110313124536242013236 00000000000000# sig_atomic_t.m4 serial 3 dnl Copyright (C) 2003, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gt_TYPE_SIG_ATOMIC_T], [ AC_CHECK_TYPES([sig_atomic_t], , [AC_DEFINE([sig_atomic_t], [int], [Define as an integer type suitable for memory locations that can be accessed atomically even in the presence of asynchronous signals.])], [#include ]) ]) pspp-1.0.1/gl/m4/readlink.m40000644000175000017500000000467013124536242012402 00000000000000# readlink.m4 serial 12 dnl Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_READLINK], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS_ONCE([readlink]) if test $ac_cv_func_readlink = no; then HAVE_READLINK=0 else AC_CACHE_CHECK([whether readlink signature is correct], [gl_cv_decl_readlink_works], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include /* Cause compilation failure if original declaration has wrong type. */ ssize_t readlink (const char *, char *, size_t);]])], [gl_cv_decl_readlink_works=yes], [gl_cv_decl_readlink_works=no])]) dnl Solaris 9 ignores trailing slash. dnl FreeBSD 7.2 dereferences only one level of links with trailing slash. AC_CACHE_CHECK([whether readlink handles trailing slash correctly], [gl_cv_func_readlink_works], [# We have readlink, so assume ln -s works. ln -s conftest.no-such conftest.link ln -s conftest.link conftest.lnk2 AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[char buf[20]; return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])], [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_readlink_works="guessing no" ;; esac ]) rm -f conftest.link conftest.lnk2]) case "$gl_cv_func_readlink_works" in *yes) if test "$gl_cv_decl_readlink_works" != yes; then REPLACE_READLINK=1 fi ;; *) AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink fails to recognize a trailing slash.]) REPLACE_READLINK=1 ;; esac fi ]) # Like gl_FUNC_READLINK, except prepare for separate compilation # (no REPLACE_READLINK, no AC_LIBOBJ). AC_DEFUN([gl_FUNC_READLINK_SEPARATE], [ AC_CHECK_FUNCS_ONCE([readlink]) gl_PREREQ_READLINK ]) # Prerequisites of lib/readlink.c. AC_DEFUN([gl_PREREQ_READLINK], [ : ]) pspp-1.0.1/gl/m4/exponentl.m40000644000175000017500000000713713132510756012627 00000000000000# exponentl.m4 serial 4 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LONG_DOUBLE_EXPONENT_LOCATION], [ AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([where to find the exponent in a 'long double'], [gl_cv_cc_long_double_expbit0], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (long double x) { memory_long_double m; size_t i; /* Clear it first, in case sizeof (long double) < sizeof (memory_long_double). */ memset (&m, 0, sizeof (memory_long_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25L); add_to_ored_words (0.5L); add_to_ored_words (1.0L); add_to_ored_words (2.0L); add_to_ored_words (4.0L); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } ]])], [gl_cv_cc_long_double_expbit0=`cat conftest.out`], [gl_cv_cc_long_double_expbit0="unknown"], [ dnl When cross-compiling, in general we don't know. It depends on the dnl ABI and compiler version. There are too many cases. gl_cv_cc_long_double_expbit0="unknown" case "$host_os" in mingw*) # On native Windows (little-endian), we know the result # in two cases: mingw, MSVC. AC_EGREP_CPP([Known], [ #ifdef __MINGW32__ Known #endif ], [gl_cv_cc_long_double_expbit0="word 2 bit 0"]) AC_EGREP_CPP([Known], [ #ifdef _MSC_VER Known #endif ], [gl_cv_cc_long_double_expbit0="word 1 bit 20"]) ;; esac ]) rm -f conftest.out ]) case "$gl_cv_cc_long_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_WORD], [$word], [Define as the word index where to find the exponent of 'long double'.]) AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_BIT], [$bit], [Define as the bit index in the word where to find bit 0 of the exponent of 'long double'.]) ;; esac ]) pspp-1.0.1/gl/m4/po.m40000644000175000017500000004503113020461274011220 00000000000000# po.m4 serial 24 (gettext-0.19) dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.60]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl AC_REQUIRE([AC_PROG_SED])dnl AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" tab=`printf '\t'` if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" < to define locale_t and the int_p_*, int_n_* dnl members of 'struct lconv'. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) dnl If is replaced, then must also be replaced. AC_REQUIRE([gl_STDDEF_H]) dnl Solaris 11 2011-11 defines the int_p_*, int_n_* members of 'struct lconv' dnl only if _LCONV_C99 is defined. AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in solaris*) AC_DEFINE([_LCONV_C99], [1], [Define to 1 on Solaris.]) ;; esac AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001], [gl_cv_header_locale_h_posix2001], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include int x = LC_MESSAGES; int y = sizeof (((struct lconv *) 0)->decimal_point);]], [[]])], [gl_cv_header_locale_h_posix2001=yes], [gl_cv_header_locale_h_posix2001=no])]) dnl Check for . AC_CHECK_HEADERS_ONCE([xlocale.h]) if test $ac_cv_header_xlocale_h = yes; then HAVE_XLOCALE_H=1 dnl Check whether use of locale_t requires inclusion of , dnl e.g. on Mac OS X 10.5. If does not define locale_t by dnl itself, we assume that will do so. AC_CACHE_CHECK([whether locale.h defines locale_t], [gl_cv_header_locale_has_locale_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include locale_t x;]], [[]])], [gl_cv_header_locale_has_locale_t=yes], [gl_cv_header_locale_has_locale_t=no]) ]) if test $gl_cv_header_locale_has_locale_t = yes; then gl_cv_header_locale_h_needs_xlocale_h=no else gl_cv_header_locale_h_needs_xlocale_h=yes fi else HAVE_XLOCALE_H=0 gl_cv_header_locale_h_needs_xlocale_h=no fi AC_SUBST([HAVE_XLOCALE_H]) dnl Check whether 'struct lconv' is complete. dnl Bionic libc's 'struct lconv' is just a dummy. dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x, dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members. AC_CACHE_CHECK([whether struct lconv is properly defined], [gl_cv_sys_struct_lconv_ok], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include struct lconv l; int x = sizeof (l.decimal_point); int y = sizeof (l.int_p_cs_precedes);]], [[]])], [gl_cv_sys_struct_lconv_ok=yes], [gl_cv_sys_struct_lconv_ok=no]) ]) if test $gl_cv_sys_struct_lconv_ok = no; then REPLACE_STRUCT_LCONV=1 fi dnl is always overridden, because of GNULIB_POSIXCHECK. gl_NEXT_HEADERS([locale.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include /* Some systems provide declarations in a non-standard header. */ #if HAVE_XLOCALE_H # include #endif ]], [setlocale duplocale]) ]) AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_LOCALE_H_DEFAULTS], [ GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV]) GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE]) GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE]) REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV]) REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE]) REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE]) REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV]) ]) pspp-1.0.1/gl/m4/tmpdir.m40000644000175000017500000000054113124536242012101 00000000000000# tmpdir.m4 serial 4 dnl Copyright (C) 2001-2002, 2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Prerequisites for lib/tmpdir.c AC_DEFUN([gt_TMPDIR], [:]) pspp-1.0.1/gl/m4/mbsinit.m40000644000175000017500000000276313124536242012257 00000000000000# mbsinit.m4 serial 8 dnl Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBSINIT], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN AC_CHECK_FUNCS_ONCE([mbsinit]) if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 AC_CHECK_DECLS([mbsinit],,, [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]]) if test $ac_cv_have_decl_mbsinit = yes; then dnl On Minix 3.1.8, the system's declares mbsinit() although dnl it does not have the function. Avoid a collision with gnulib's dnl replacement. REPLACE_MBSINIT=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSINIT=1 else dnl On mingw, mbsinit() always returns 1, which is inappropriate for dnl states produced by mbrtowc() for an incomplete multibyte character dnl in multibyte locales. case "$host_os" in mingw*) REPLACE_MBSINIT=1 ;; esac fi fi ]) # Prerequisites of lib/mbsinit.c. AC_DEFUN([gl_PREREQ_MBSINIT], [ : ]) pspp-1.0.1/gl/m4/wchar_t.m40000644000175000017500000000146213124536242012234 00000000000000# wchar_t.m4 serial 4 (gettext-0.18.2) dnl Copyright (C) 2002-2003, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wchar_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WCHAR_T], [ AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include wchar_t foo = (wchar_t)'\0';]], [[]])], [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) if test $gt_cv_c_wchar_t = yes; then AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) fi ]) pspp-1.0.1/gl/m4/mmap-anon.m40000644000175000017500000000373313124536242012473 00000000000000# mmap-anon.m4 serial 10 dnl Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Detect how mmap can be used to create anonymous (not file-backed) memory # mappings. # - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS # and MAP_ANON exist and have the same value. # - On HP-UX, only MAP_ANONYMOUS exists. # - On Mac OS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists. # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be # used. AC_DEFUN([gl_FUNC_MMAP_ANON], [ dnl Persuade glibc to define MAP_ANONYMOUS. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no]) # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then AC_MSG_CHECKING([for MAP_ANONYMOUS]) AC_EGREP_CPP([I cannot identify this map], [ #include #ifdef MAP_ANONYMOUS I cannot identify this map #endif ], [gl_have_mmap_anonymous=yes]) if test $gl_have_mmap_anonymous != yes; then AC_EGREP_CPP([I cannot identify this map], [ #include #ifdef MAP_ANON I cannot identify this map #endif ], [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.]) gl_have_mmap_anonymous=yes]) fi AC_MSG_RESULT([$gl_have_mmap_anonymous]) if test $gl_have_mmap_anonymous = yes; then AC_DEFINE([HAVE_MAP_ANONYMOUS], [1], [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including config.h and .]) fi fi ]) pspp-1.0.1/gl/m4/regex.m40000644000175000017500000002771013132510757011725 00000000000000# serial 67 # Copyright (C) 1996-2001, 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl Initially derived from code in GNU grep. dnl Mostly written by Jim Meyering. AC_PREREQ([2.50]) AC_DEFUN([gl_REGEX], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_ARG_WITH([included-regex], [AS_HELP_STRING([--without-included-regex], [don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library (use with caution on other systems).])]) case $with_included_regex in #( yes|no) ac_use_included_regex=$with_included_regex ;; '') # If the system regex support is good enough that it passes the # following run test, then default to *not* using the included regex.c. # If cross compiling, assume the test would fail and use the included # regex.c. AC_CHECK_DECLS_ONCE([alarm]) AC_CHECK_HEADERS_ONCE([malloc.h]) AC_CACHE_CHECK([for working re_compile_pattern], [gl_cv_func_re_compile_pattern_working], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include #include #if defined M_CHECK_ACTION || HAVE_DECL_ALARM # include # include #endif #if HAVE_MALLOC_H # include #endif #ifdef M_CHECK_ACTION /* Exit with distinguishable exit code. */ static void sigabrt_no_core (int sig) { raise (SIGTERM); } #endif ]], [[int result = 0; static struct re_pattern_buffer regex; unsigned char folded_chars[UCHAR_MAX + 1]; int i; const char *s; struct re_registers regs; /* Some builds of glibc go into an infinite loop on this test. Use alarm to force death, and mallopt to avoid malloc recursion in diagnosing the corrupted heap. */ #if HAVE_DECL_ALARM signal (SIGALRM, SIG_DFL); alarm (2); #endif #ifdef M_CHECK_ACTION signal (SIGABRT, sigabrt_no_core); mallopt (M_CHECK_ACTION, 2); #endif if (setlocale (LC_ALL, "en_US.UTF-8")) { { /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html This test needs valgrind to catch the bug on Debian GNU/Linux 3.1 x86, but it might catch the bug better on other platforms and it shouldn't hurt to try the test here. */ static char const pat[] = "insert into"; static char const data[] = "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern (pat, sizeof pat - 1, ®ex); if (s) result |= 1; else if (re_search (®ex, data, sizeof data - 1, 0, sizeof data - 1, ®s) != -1) result |= 1; regfree (®ex); } { /* This test is from glibc bug 15078. The test case is from Andreas Schwab in . */ static char const pat[] = "[^x]x"; static char const data[] = /* */ "\xe1\x80\x80" "\xe1\x80\xbb" "\xe1\x80\xbd" "\xe1\x80\x94" "\xe1\x80\xba" "\xe1\x80\xaf" "\xe1\x80\x95" "\xe1\x80\xba" "x"; re_set_syntax (0); memset (®ex, 0, sizeof regex); s = re_compile_pattern (pat, sizeof pat - 1, ®ex); if (s) result |= 1; else { i = re_search (®ex, data, sizeof data - 1, 0, sizeof data - 1, 0); if (i != 0 && i != 21) result |= 1; } regfree (®ex); } if (! setlocale (LC_ALL, "C")) return 1; } /* This test is from glibc bug 3957, reported by Andrew Mackey. */ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[^x]b", 6, ®ex); if (s) result |= 2; /* This should fail, but succeeds for glibc-2.5. */ else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) result |= 2; /* This regular expression is from Spencer ere test number 75 in grep-2.3. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); for (i = 0; i <= UCHAR_MAX; i++) folded_chars[i] = i; regex.translate = folded_chars; s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); /* This should fail with _Invalid character class name_ error. */ if (!s) result |= 4; /* Ensure that [b-a] is diagnosed as invalid, when using RE_NO_EMPTY_RANGES. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[b-a]", 6, ®ex); if (s == 0) result |= 8; /* This should succeed, but does not for glibc-2.1.3. */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("{1", 2, ®ex); if (s) result |= 8; /* The following example is derived from a problem report against gawk from Jorge Stolfi . */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[an\371]*n", 7, ®ex); if (s) result |= 8; /* This should match, but does not for glibc-2.2.1. */ else if (re_match (®ex, "an", 2, 0, ®s) != 2) result |= 8; memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) result |= 8; /* glibc-2.2.93 does not work with a negative RANGE argument. */ else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) result |= 8; /* The version of regex.c in older versions of gnulib ignored RE_ICASE. Detect that problem too. */ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) result |= 16; else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) result |= 16; /* Catch a bug reported by Vin Shelton in http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html */ re_set_syntax (RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); if (s) result |= 32; /* REG_STARTEND was added to glibc on 2004-01-15. Reject older versions. */ if (! REG_STARTEND) result |= 64; #if 0 /* It would be nice to reject hosts whose regoff_t values are too narrow (including glibc on hosts with 64-bit ptrdiff_t and 32-bit int), but we should wait until glibc implements this feature. Otherwise, support for equivalence classes and multibyte collation symbols would always be broken except when compiling --without-included-regex. */ if (sizeof (regoff_t) < sizeof (ptrdiff_t) || sizeof (regoff_t) < sizeof (ssize_t)) result |= 64; #endif return result; ]])], [gl_cv_func_re_compile_pattern_working=yes], [gl_cv_func_re_compile_pattern_working=no], [case "$host_os" in # Guess no on native Windows. mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;; # Otherwise, assume it is not working. *) gl_cv_func_re_compile_pattern_working="guessing no" ;; esac ]) ]) case "$gl_cv_func_re_compile_pattern_working" in #( *yes) ac_use_included_regex=no;; #( *no) ac_use_included_regex=yes;; esac ;; *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) ;; esac if test $ac_use_included_regex = yes; then AC_DEFINE([_REGEX_INCLUDE_LIMITS_H], [1], [Define if you want to include , so that it consistently overrides 's RE_DUP_MAX.]) AC_DEFINE([_REGEX_LARGE_OFFSETS], [1], [Define if you want regoff_t to be at least as wide POSIX requires.]) AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], [Define to rpl_re_syntax_options if the replacement should be used.]) AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], [Define to rpl_re_set_syntax if the replacement should be used.]) AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern], [Define to rpl_re_compile_pattern if the replacement should be used.]) AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap], [Define to rpl_re_compile_fastmap if the replacement should be used.]) AC_DEFINE([re_search], [rpl_re_search], [Define to rpl_re_search if the replacement should be used.]) AC_DEFINE([re_search_2], [rpl_re_search_2], [Define to rpl_re_search_2 if the replacement should be used.]) AC_DEFINE([re_match], [rpl_re_match], [Define to rpl_re_match if the replacement should be used.]) AC_DEFINE([re_match_2], [rpl_re_match_2], [Define to rpl_re_match_2 if the replacement should be used.]) AC_DEFINE([re_set_registers], [rpl_re_set_registers], [Define to rpl_re_set_registers if the replacement should be used.]) AC_DEFINE([re_comp], [rpl_re_comp], [Define to rpl_re_comp if the replacement should be used.]) AC_DEFINE([re_exec], [rpl_re_exec], [Define to rpl_re_exec if the replacement should be used.]) AC_DEFINE([regcomp], [rpl_regcomp], [Define to rpl_regcomp if the replacement should be used.]) AC_DEFINE([regexec], [rpl_regexec], [Define to rpl_regexec if the replacement should be used.]) AC_DEFINE([regerror], [rpl_regerror], [Define to rpl_regerror if the replacement should be used.]) AC_DEFINE([regfree], [rpl_regfree], [Define to rpl_regfree if the replacement should be used.]) fi ]) # Prerequisites of lib/regex.c and lib/regex_internal.c. AC_DEFUN([gl_PREREQ_REGEX], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_REQUIRE([gl_EEMALLOC]) AC_REQUIRE([gl_GLIBC21]) AC_CHECK_HEADERS([libintl.h]) AC_CHECK_FUNCS_ONCE([isblank iswctype]) AC_CHECK_DECLS([isblank], [], [], [[#include ]]) ]) pspp-1.0.1/gl/m4/ftello.m40000644000175000017500000000776613132510756012110 00000000000000# ftello.m4 serial 13 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FTELLO], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) AC_REQUIRE([gl_SYS_TYPES_H]) dnl Persuade glibc to declare ftello(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS_ONCE([ftello]) if test $ac_cv_have_decl_ftello = no; then HAVE_DECL_FTELLO=0 fi AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[ftello (stdin);]])], [gl_cv_func_ftello=yes], [gl_cv_func_ftello=no]) ]) if test $gl_cv_func_ftello = no; then HAVE_FTELLO=0 else if test $WINDOWS_64_BIT_OFF_T = 1; then REPLACE_FTELLO=1 fi if test $gl_cv_var_stdin_large_offset = no; then REPLACE_FTELLO=1 fi if test $REPLACE_FTELLO = 0; then dnl Detect bug on Solaris. dnl ftell and ftello produce incorrect results after putc that followed a dnl getc call that reached EOF on Solaris. This is because the _IOREAD dnl flag does not get cleared in this case, even though _IOWRT gets set, dnl and ftell and ftello look whether the _IOREAD flag is set. AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether ftello works], [gl_cv_func_ftello_works], [ dnl Initial guess, used when cross-compiling or when /dev/tty cannot dnl be opened. changequote(,)dnl case "$host_os" in # Guess no on Solaris. solaris*) gl_cv_func_ftello_works="guessing no" ;; # Guess yes on native Windows. mingw*) gl_cv_func_ftello_works="guessing yes" ;; # Guess yes otherwise. *) gl_cv_func_ftello_works="guessing yes" ;; esac changequote([,])dnl AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #define TESTFILE "conftest.tmp" int main (void) { FILE *fp; /* Create a file with some contents. */ fp = fopen (TESTFILE, "w"); if (fp == NULL) return 70; if (fwrite ("foogarsh", 1, 8, fp) < 8) { fclose (fp); return 71; } if (fclose (fp)) return 72; /* The file's contents is now "foogarsh". */ /* Try writing after reading to EOF. */ fp = fopen (TESTFILE, "r+"); if (fp == NULL) return 73; if (fseek (fp, -1, SEEK_END)) { fclose (fp); return 74; } if (!(getc (fp) == 'h')) { fclose (fp); return 1; } if (!(getc (fp) == EOF)) { fclose (fp); return 2; } if (!(ftell (fp) == 8)) { fclose (fp); return 3; } if (!(ftell (fp) == 8)) { fclose (fp); return 4; } if (!(putc ('!', fp) == '!')) { fclose (fp); return 5; } if (!(ftell (fp) == 9)) { fclose (fp); return 6; } if (!(fclose (fp) == 0)) return 7; fp = fopen (TESTFILE, "r"); if (fp == NULL) return 75; { char buf[10]; if (!(fread (buf, 1, 10, fp) == 9)) { fclose (fp); return 10; } if (!(memcmp (buf, "foogarsh!", 9) == 0)) { fclose (fp); return 11; } } if (!(fclose (fp) == 0)) return 12; /* The file's contents is now "foogarsh!". */ return 0; }]])], [gl_cv_func_ftello_works=yes], [gl_cv_func_ftello_works=no], [:]) ]) case "$gl_cv_func_ftello_works" in *yes) ;; *) REPLACE_FTELLO=1 AC_DEFINE([FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE], [1], [Define to 1 if the system's ftello function has the Solaris bug.]) ;; esac fi fi ]) # Prerequisites of lib/ftello.c. AC_DEFUN([gl_PREREQ_FTELLO], [ dnl Native Windows has the function _ftelli64. mingw hides it, but mingw64 dnl makes it usable again. AC_CHECK_FUNCS([_ftelli64]) ]) pspp-1.0.1/gl/m4/xsize.m40000644000175000017500000000062613124536242011750 00000000000000# xsize.m4 serial 5 dnl Copyright (C) 2003-2004, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XSIZE], [ dnl Prerequisites of lib/xsize.h. AC_REQUIRE([gl_SIZE_MAX]) AC_CHECK_HEADERS([stdint.h]) ]) pspp-1.0.1/gl/m4/xstrndup.m40000644000175000017500000000063113124536242012471 00000000000000# xstrndup.m4 serial 2 dnl Copyright (C) 2003, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XSTRNDUP], [ gl_PREREQ_XSTRNDUP ]) # Prerequisites of lib/xstrndup.c. AC_DEFUN([gl_PREREQ_XSTRNDUP], [ : ]) pspp-1.0.1/gl/m4/fpieee.m40000644000175000017500000000440513124536242012042 00000000000000# fpieee.m4 serial 2 -*- coding: utf-8 -*- dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl IEEE 754 standardized three items: dnl - The formats of single-float and double-float - nowadays commonly dnl available as 'float' and 'double' in C and C++. dnl No autoconf test needed. dnl - The overflow and division by zero behaviour: The result are values dnl '±Inf' and 'NaN', rather than exceptions as it was before. dnl This file provides an autoconf macro for ensuring this behaviour of dnl floating-point operations. dnl - A set of conditions (overflow, underflow, inexact, etc.) which can dnl be configured to trigger an exception. dnl This cannot be done in a portable way: it depends on the compiler, dnl libc, kernel, and CPU. No autoconf macro is provided for this. dnl Ensure non-trapping behaviour of floating-point overflow and dnl floating-point division by zero. dnl (For integer overflow, see gcc's -ftrapv option; for integer division by dnl zero, see the autoconf macro in intdiv0.m4.) AC_DEFUN([gl_FP_IEEE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) # IEEE behaviour is the default on all CPUs except Alpha and SH # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 # and the GCC 4.1.2 manual). case "$host_cpu" in alpha*) # On Alpha systems, a compiler option provides the behaviour. # See the ieee(3) manual page, also available at # if test -n "$GCC"; then # GCC has the option -mieee. # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. CPPFLAGS="$CPPFLAGS -mieee" else # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact. # For full IEEE compliance (rarely needed), use option -ieee_with_inexact. CPPFLAGS="$CPPFLAGS -ieee" fi ;; sh*) if test -n "$GCC"; then # GCC has the option -mieee. CPPFLAGS="$CPPFLAGS -mieee" fi ;; esac ]) pspp-1.0.1/gl/m4/stdint.m40000644000175000017500000004373513132510757012125 00000000000000# stdint.m4 serial 51 dnl Copyright (C) 2001-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Bruno Haible. dnl Test whether is supported or must be substituted. AC_DEFUN_ONCE([gl_STDINT_H], [ AC_PREREQ([2.59])dnl AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_LIMITS_H]) AC_REQUIRE([gt_TYPE_WINT_T]) dnl Check for long long int and unsigned long long int. AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi AC_SUBST([HAVE_LONG_LONG_INT]) AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) dnl Check for , in the same way as gl_WCHAR_H does. AC_CHECK_HEADERS_ONCE([wchar.h]) if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi AC_SUBST([HAVE_WCHAR_H]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi AC_SUBST([HAVE_INTTYPES_H]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi AC_SUBST([HAVE_SYS_TYPES_H]) gl_CHECK_NEXT_HEADERS([stdint.h]) if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi AC_SUBST([HAVE_STDINT_H]) dnl Now see whether we need a substitute . if test $ac_cv_header_stdint_h = yes; then AC_CACHE_CHECK([whether stdint.h conforms to C99], [gl_cv_header_working_stdint_h], [gl_cv_header_working_stdint_h=no AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #define __STDC_CONSTANT_MACROS 1 #define __STDC_LIMIT_MACROS 1 #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif ] gl_STDINT_INCLUDES [ #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; /* Check that SIZE_MAX has the correct type, if possible. */ #if 201112 <= __STDC_VERSION__ int k = _Generic (SIZE_MAX, size_t: 0); #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ || (0x5110 <= __SUNPRO_C && !__STDC__)) extern size_t k; extern __typeof__ (SIZE_MAX) k; #endif #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; ]])], [dnl Determine whether the various *_MIN, *_MAX macros are usable dnl in preprocessor expression. We could do it by compiling a test dnl program for each of these macros. It is faster to run a program dnl that inspects the macro expansion. dnl This detects a bug on HP-UX 11.23/ia64. AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #define __STDC_CONSTANT_MACROS 1 #define __STDC_LIMIT_MACROS 1 #include ] gl_STDINT_INCLUDES [ #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; ]], [[ const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return mv - macro_values + 1; } return 0; ]])], [gl_cv_header_working_stdint_h=yes], [], [case "$host_os" in # Guess yes on native Windows. mingw*) gl_cv_header_working_stdint_h="guessing yes" ;; # In general, assume it works. *) gl_cv_header_working_stdint_h="guessing yes" ;; esac ]) ]) ]) fi HAVE_C99_STDINT_H=0 HAVE_SYS_BITYPES_H=0 HAVE_SYS_INTTYPES_H=0 STDINT_H=stdint.h case "$gl_cv_header_working_stdint_h" in *yes) HAVE_C99_STDINT_H=1 dnl Now see whether the system works without dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. AC_CACHE_CHECK([whether stdint.h predates C++11], [gl_cv_header_stdint_predates_cxx11_h], [gl_cv_header_stdint_predates_cxx11_h=yes AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include ] gl_STDINT_INCLUDES [ intmax_t im = INTMAX_MAX; int32_t i32 = INT32_C (0x7fffffff); ]])], [gl_cv_header_stdint_predates_cxx11_h=no])]) if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then AC_DEFINE([__STDC_CONSTANT_MACROS], [1], [Define to 1 if the system predates C++11.]) AC_DEFINE([__STDC_LIMIT_MACROS], [1], [Define to 1 if the system predates C++11.]) fi AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], [gl_cv_header_stdint_width], [gl_cv_header_stdint_width=no AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 #endif #include ]gl_STDINT_INCLUDES[ int iw = UINTMAX_WIDTH; ]])], [gl_cv_header_stdint_width=yes])]) if test "$gl_cv_header_stdint_width" = yes; then STDINT_H= fi ;; *) dnl Check for , and for dnl (used in Linux libc4 >= 4.6.7 and libc5). AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 fi if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 fi gl_STDINT_TYPE_PROPERTIES ;; esac dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. LIMITS_H=limits.h AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) AC_SUBST([HAVE_C99_STDINT_H]) AC_SUBST([HAVE_SYS_BITYPES_H]) AC_SUBST([HAVE_SYS_INTTYPES_H]) AC_SUBST([STDINT_H]) AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) ]) dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) dnl Determine the size of each of the given types in bits. AC_DEFUN([gl_STDINT_BITSIZEOF], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to the number of bits in type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], [$2 #include ], [result=unknown]) eval gl_cv_bitsizeof_${gltype}=\$result ]) eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, dnl do a syntax check even on unused #if conditions and give an error dnl on valid C code like this: dnl #if 0 dnl # if > 32 dnl # endif dnl #endif result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) eval BITSIZEOF_${GLTYPE}=\$result done m4_foreach_w([gltype], [$1], [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) dnl Determine the signedness of each of the given types. dnl Define HAVE_SIGNED_TYPE if type is signed. AC_DEFUN([gl_CHECK_TYPES_SIGNED], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to 1 if ']gltype[' is a signed integer type.])]) for gltype in $1 ; do AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], result=yes, result=no) eval gl_cv_type_${gltype}_signed=\$result ]) eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done m4_foreach_w([gltype], [$1], [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) dnl Determine the suffix to use for integer constants of the given types. dnl Define t_SUFFIX for each such type. AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], [Define to l, ll, u, ul, ull, etc., as suitable for constants of type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for $gltype integer literal suffix], [gl_cv_type_${gltype}_suffix], [eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ extern $gltype foo; extern $gltype1 foo;]])], [eval gl_cv_type_${gltype}_suffix=\$glsuf]) eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done]) GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) done m4_foreach_w([gltype], [$1], [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) ]) dnl gl_STDINT_INCLUDES AC_DEFUN([gl_STDINT_INCLUDES], [[ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif ]]) dnl gl_STDINT_TYPE_PROPERTIES dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t dnl of interest to stdint.in.h. AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], [ AC_REQUIRE([gl_MULTIARCH]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_STDINT_BITSIZEOF([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) dnl If wint_t is smaller than 'int', it cannot satisfy the ISO C 99 dnl requirement that wint_t is "unchanged by default argument promotions". dnl In this case gnulib's and override wint_t. dnl Set the variable BITSIZEOF_WINT_T accordingly. if test $GNULIB_OVERRIDES_WINT_T = 1; then BITSIZEOF_WINT_T=32 fi ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) pspp-1.0.1/gl/m4/snprintf.m40000644000175000017500000000356713124536242012460 00000000000000# snprintf.m4 serial 7 dnl Copyright (C) 2002-2004, 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Libintl 0.17 will replace snprintf only if it does not support %1$s, dnl but defers to any gnulib snprintf replacements. Therefore, gnulib dnl must guarantee that the decision for replacing snprintf is a superset dnl of the reasons checked by libintl. AC_DEFUN([gl_FUNC_SNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_cv_func_snprintf_usable=no AC_CHECK_FUNCS([snprintf]) if test $ac_cv_func_snprintf = yes; then gl_SNPRINTF_SIZE1 case "$gl_cv_func_snprintf_size1" in *yes) gl_SNPRINTF_RETVAL_C99 case "$gl_cv_func_snprintf_retval_c99" in *yes) gl_PRINTF_POSITIONS case "$gl_cv_func_printf_positions" in *yes) gl_cv_func_snprintf_usable=yes ;; esac ;; esac ;; esac fi if test $gl_cv_func_snprintf_usable = no; then gl_REPLACE_SNPRINTF fi AC_CHECK_DECLS_ONCE([snprintf]) if test $ac_cv_have_decl_snprintf = no; then HAVE_DECL_SNPRINTF=0 fi ]) AC_DEFUN([gl_REPLACE_SNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([snprintf]) if test $ac_cv_func_snprintf = yes; then REPLACE_SNPRINTF=1 else AC_CHECK_DECLS_ONCE([snprintf]) if test $ac_cv_have_decl_snprintf = yes; then dnl If the function is declared but does not appear to exist, it may be dnl defined as an inline function. In order to avoid a conflict, we have dnl to define rpl_snprintf, not snprintf. REPLACE_SNPRINTF=1 fi fi gl_PREREQ_SNPRINTF ]) # Prerequisites of lib/snprintf.c. AC_DEFUN([gl_PREREQ_SNPRINTF], [:]) pspp-1.0.1/gl/m4/sigaction.m40000644000175000017500000000232513124536242012564 00000000000000# sigaction.m4 serial 7 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine if sigaction interface is present. AC_DEFUN([gl_SIGACTION], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([sigaction]) if test $ac_cv_func_sigaction = yes; then AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , , [[#include ]]) if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then HAVE_STRUCT_SIGACTION_SA_SIGACTION=0 fi else HAVE_SIGACTION=0 fi ]) # Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c. AC_DEFUN([gl_PREREQ_SIGACTION], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_TYPE_UID_T]) AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H]) AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt]) AC_CHECK_TYPES([siginfo_t], [], [], [[ #include ]]) if test $ac_cv_type_siginfo_t = no; then HAVE_SIGINFO_T=0 fi ]) # Prerequisites of lib/sig-handler.h. AC_DEFUN([gl_PREREQ_SIG_HANDLER_H], [:]) pspp-1.0.1/gl/m4/eealloc.m40000644000175000017500000000166713124536242012220 00000000000000# eealloc.m4 serial 3 dnl Copyright (C) 2003, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_EEALLOC], [ AC_REQUIRE([gl_EEMALLOC]) AC_REQUIRE([gl_EEREALLOC]) ]) AC_DEFUN([gl_EEMALLOC], [ _AC_FUNC_MALLOC_IF( [gl_cv_func_malloc_0_nonnull=1], [gl_cv_func_malloc_0_nonnull=0]) AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull], [If malloc(0) is != NULL, define this to 1. Otherwise define this to 0.]) ]) AC_DEFUN([gl_EEREALLOC], [ _AC_FUNC_REALLOC_IF( [gl_cv_func_realloc_0_nonnull=1], [gl_cv_func_realloc_0_nonnull=0]) AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull], [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this to 0.]) ]) pspp-1.0.1/gl/m4/lib-ld.m40000644000175000017500000001112213124536242011742 00000000000000# lib-ld.m4 serial 7 dnl Copyright (C) 1996-2003, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid dnl collision with libtool.m4. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi if test -n "$LD"; then AC_MSG_CHECKING([for ld]) elif test "$GCC" = yes; then AC_MSG_CHECKING([for ld used by $CC]) elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi if test -n "$LD"; then # Let the user override the test with a path. : else AC_CACHE_VAL([acl_cv_path_LD], [ acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) acl_output=`($CC -print-prog-name=ld) 2>&5` ;; esac case $acl_output in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` done # Got the pathname. No search in PATH is needed. acl_cv_path_LD="$acl_output" ac_prog= ;; "") # If it fails, then pretend we aren't using GCC. ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_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 `"$acl_cv_path_LD" -v 2>&1 , 1995-2000. dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value '$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ]])], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST([GENCAT]) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST([INTLOBJS]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) pspp-1.0.1/gl/m4/locale-zh.m40000644000175000017500000001222613124536242012463 00000000000000# locale-zh.m4 serial 12 dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a chinese locale with GB18030 encoding. AC_DEFUN([gt_LOCALE_ZH_CN], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else # None found. gt_cv_locale_zh_CN=none fi ;; solaris2.8) # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. gt_cv_locale_zh_CN=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi ;; esac else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* ]) LOCALE_ZH_CN=$gt_cv_locale_zh_CN AC_SUBST([LOCALE_ZH_CN]) ]) pspp-1.0.1/gl/m4/flexmember.m40000644000175000017500000000345313124536242012735 00000000000000# serial 5 # Check for flexible array member support. # Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert. AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], [ AC_CACHE_CHECK([for flexible array member], ac_cv_c_flexmember, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include struct m { struct m *next, **list; char name[]; }; struct s { struct s *p; struct m *m; int n; double d[]; };]], [[int m = getchar (); size_t nbytes = offsetof (struct s, d) + m * sizeof (double); nbytes += sizeof (struct s) - 1; nbytes -= nbytes % sizeof (struct s); struct s *p = malloc (nbytes); p->p = p; p->m = NULL; p->d[0] = 0.0; return p->d != (double *) NULL;]])], [ac_cv_c_flexmember=yes], [ac_cv_c_flexmember=no])]) if test $ac_cv_c_flexmember = yes; then AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [], [Define to nothing if C supports flexible array members, and to 1 if it does not. That way, with a declaration like 'struct s { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack can be used with pre-C99 compilers. When computing the size of such an object, don't use 'sizeof (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' instead. Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with MSVC and with C++ compilers.]) else AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1]) fi ]) pspp-1.0.1/gl/m4/longlong.m40000644000175000017500000001120313124536242012416 00000000000000# longlong.m4 serial 17 dnl Copyright (C) 1999-2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. # This fixes a bug in Autoconf 2.61, and can be faster # than what's in Autoconf 2.62 through 2.68. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be # defined. In this case you can treat 'long long int' like 'long int'. AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], [ac_cv_type_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int if test $ac_cv_type_long_long_int = yes; then dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. dnl If cross compiling, assume the bug is not important, since dnl nobody cross compiles for this platform as far as we know. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[@%:@include @%:@ifndef LLONG_MAX @%:@ define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) @%:@ define LLONG_MAX (HALF - 1 + HALF) @%:@endif]], [[long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0;]])], [], [ac_cv_type_long_long_int=no], [:]) fi fi]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], [Define to 1 if the system has the type 'long long int'.]) fi ]) # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. # This fixes a bug in Autoconf 2.61, and can be faster # than what's in Autoconf 2.62 through 2.68. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT # will not be defined. In this case you can treat 'unsigned long long int' # like 'unsigned long int'. AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], [ac_cv_type_unsigned_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [], [ac_cv_type_unsigned_long_long_int=no]) fi]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], [Define to 1 if the system has the type 'unsigned long long int'.]) fi ]) # Expands to a C program that can be used to test for simultaneous support # of 'long long' and 'unsigned long long'. We don't want to say that # 'long long' is available if 'unsigned long long' is not, or vice versa, # because too many programs rely on the symmetry between signed and unsigned # integer types (excluding 'bool'). AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], [ AC_LANG_PROGRAM( [[/* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63;]], [[/* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull));]]) ]) pspp-1.0.1/gl/m4/rename.m40000644000175000017500000002130513132510757012054 00000000000000# serial 27 # Copyright (C) 2001, 2003, 2005-2006, 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Volker Borchert. dnl Determine whether rename works for source file names with a trailing slash. dnl The rename from SunOS 4.1.1_U1 doesn't. dnl dnl If it doesn't, then define RENAME_TRAILING_SLASH_BUG and arrange dnl to compile the wrapper function. dnl AC_DEFUN([gl_FUNC_RENAME], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([lstat]) dnl Solaris 10, AIX 7.1 mistakenly allow rename("file","name/"). dnl NetBSD 1.6 mistakenly forbids rename("dir","name/"). dnl FreeBSD 7.2 mistakenly allows rename("file","link-to-file/"). dnl The Solaris bug can be worked around without stripping dnl trailing slash, while the NetBSD bug requires stripping; dnl the two conditions can be distinguished by whether hard dnl links are also broken. AC_CACHE_CHECK([whether rename honors trailing slash on destination], [gl_cv_func_rename_slash_dst_works], [rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || AC_MSG_ERROR([cannot create temporary files]) # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then ln -s conftest.f conftest.lnk fi AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ # include # include ]], [[int result = 0; if (rename ("conftest.f1", "conftest.f2/") == 0) result |= 1; if (rename ("conftest.d1", "conftest.d2/") != 0) result |= 2; #if HAVE_LSTAT if (rename ("conftest.f", "conftest.lnk/") == 0) result |= 4; #endif return result; ]])], [gl_cv_func_rename_slash_dst_works=yes], [gl_cv_func_rename_slash_dst_works=no], dnl When crosscompiling, assume rename is broken. [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_func_rename_slash_dst_works="guessing no" ;; esac ]) rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk ]) case "$gl_cv_func_rename_slash_dst_works" in *yes) ;; *) REPLACE_RENAME=1 AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1], [Define if rename does not correctly handle slashes on the destination argument, such as on Solaris 10 or NetBSD 1.6.]) ;; esac dnl SunOS 4.1.1_U1 mistakenly forbids rename("dir/","name"). dnl Solaris 9 mistakenly allows rename("file/","name"). dnl FreeBSD 7.2 mistakenly allows rename("link-to-file/","name"). dnl These bugs require stripping trailing slash to avoid corrupting dnl symlinks with a trailing slash. AC_CACHE_CHECK([whether rename honors trailing slash on source], [gl_cv_func_rename_slash_src_works], [rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || AC_MSG_ERROR([cannot create temporary files]) # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then ln -s conftest.f conftest.lnk fi AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ # include # include ]], [[int result = 0; if (rename ("conftest.f1/", "conftest.d3") == 0) result |= 1; if (rename ("conftest.d1/", "conftest.d2") != 0) result |= 2; #if HAVE_LSTAT if (rename ("conftest.lnk/", "conftest.f") == 0) result |= 4; #endif return result; ]])], [gl_cv_func_rename_slash_src_works=yes], [gl_cv_func_rename_slash_src_works=no], dnl When crosscompiling, assume rename is broken. [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_rename_slash_src_works="guessing no" ;; esac ]) rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk ]) case "$gl_cv_func_rename_slash_src_works" in *yes) ;; *) REPLACE_RENAME=1 AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1], [Define if rename does not correctly handle slashes on the source argument, such as on Solaris 9 or cygwin 1.5.]) ;; esac dnl NetBSD 1.6 and cygwin 1.5.x mistakenly reduce hard link count dnl on rename("h1","h2"). dnl This bug requires stat'ting targets prior to attempting rename. AC_CHECK_FUNCS_ONCE([link]) AC_CACHE_CHECK([whether rename manages hard links correctly], [gl_cv_func_rename_link_works], [if test $ac_cv_func_link = yes; then rm -rf conftest.f conftest.f1 if touch conftest.f && ln conftest.f conftest.f1 && set x `ls -i conftest.f conftest.f1` && test "$2" = "$4"; then AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ # include # include # include ]], [[int result = 0; if (rename ("conftest.f", "conftest.f1")) result |= 1; if (unlink ("conftest.f1")) result |= 2; if (rename ("conftest.f", "conftest.f")) result |= 4; if (rename ("conftest.f1", "conftest.f1") == 0) result |= 8; return result; ]])], [gl_cv_func_rename_link_works=yes], [gl_cv_func_rename_link_works=no], dnl When crosscompiling, assume rename is broken. [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_rename_link_works="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_rename_link_works="guessing no" ;; esac ]) else gl_cv_func_rename_link_works="guessing no" fi rm -rf conftest.f conftest.f1 else gl_cv_func_rename_link_works=yes fi ]) case "$gl_cv_func_rename_link_works" in *yes) ;; *) REPLACE_RENAME=1 AC_DEFINE([RENAME_HARD_LINK_BUG], [1], [Define if rename fails to leave hard links alone, as on NetBSD 1.6 or Cygwin 1.5.]) ;; esac dnl Cygwin 1.5.x mistakenly allows rename("dir","file"). dnl mingw mistakenly forbids rename("dir1","dir2"). dnl These bugs require stripping trailing slash to avoid corrupting dnl symlinks with a trailing slash. AC_CACHE_CHECK([whether rename manages existing destinations correctly], [gl_cv_func_rename_dest_works], [rm -rf conftest.f conftest.d1 conftest.d2 touch conftest.f && mkdir conftest.d1 conftest.d2 || AC_MSG_ERROR([cannot create temporary files]) AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ # include # include ]], [[int result = 0; if (rename ("conftest.d1", "conftest.d2") != 0) result |= 1; if (rename ("conftest.d2", "conftest.f") == 0) result |= 2; return result; ]])], [gl_cv_func_rename_dest_works=yes], [gl_cv_func_rename_dest_works=no], dnl When crosscompiling, assume rename is broken. [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_rename_dest_works="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_func_rename_dest_works="guessing no" ;; esac ]) rm -rf conftest.f conftest.d1 conftest.d2 ]) case "$gl_cv_func_rename_dest_works" in *yes) ;; *) REPLACE_RENAME=1 AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1], [Define if rename does not work when the destination file exists, as on Cygwin 1.5 or Windows.]) ;; esac ]) pspp-1.0.1/gl/m4/largefile.m40000644000175000017500000001345313124536242012542 00000000000000# Enable large files on systems where this is not the default. # Copyright 1992-1996, 1998-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # The following implementation works around a problem in autoconf <= 2.69; # AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5, # or configures them incorrectly in some cases. m4_version_prereq([2.70], [] ,[ # _AC_SYS_LARGEFILE_TEST_INCLUDES # ------------------------------- m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], [@%:@include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ @%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]];[]dnl ]) # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, # CACHE-VAR, # DESCRIPTION, # PROLOGUE, [FUNCTION-BODY]) # -------------------------------------------------------- m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], [AC_CACHE_CHECK([for $1 value needed for large files], [$3], [while :; do m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( [AC_LANG_PROGRAM([$5], [$6])], [$3=no; break]) m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( [AC_LANG_PROGRAM([@%:@define $1 $2 $5], [$6])], [$3=$2; break]) $3=unknown break done]) case $$3 in #( no | unknown) ;; *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);; esac rm -rf conftest*[]dnl ])# _AC_SYS_LARGEFILE_MACRO_VALUE # AC_SYS_LARGEFILE # ---------------- # By default, many hosts won't let programs access large files; # one must use special compiler options to get large-file access to work. # For more details about this brain damage please see: # http://www.unix-systems.org/version2/whatsnew/lfs20mar.html AC_DEFUN([AC_SYS_LARGEFILE], [AC_ARG_ENABLE(largefile, [ --disable-largefile omit support for large files]) if test "$enable_largefile" != no; then AC_CACHE_CHECK([for special C compiler options needed for large files], ac_cv_sys_largefile_CC, [ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) AC_COMPILE_IFELSE([], [break]) CC="$CC -n32" AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) break done CC=$ac_save_CC rm -f conftest.$ac_ext fi]) if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, ac_cv_sys_file_offset_bits, [Number of bits in a file offset, on hosts where this is settable.], [_AC_SYS_LARGEFILE_TEST_INCLUDES]) if test $ac_cv_sys_file_offset_bits = unknown; then _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, ac_cv_sys_large_files, [Define for large files, on AIX-style hosts.], [_AC_SYS_LARGEFILE_TEST_INCLUDES]) fi AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1], [Enable large inode numbers on Mac OS X 10.5.]) fi ])# AC_SYS_LARGEFILE ])# m4_version_prereq 2.70 # Enable large files on systems where this is implemented by Gnulib, not by the # system headers. # Set the variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE if Gnulib # overrides ensure that off_t or 'struct size.st_size' are 64-bit, respectively. AC_DEFUN([gl_LARGEFILE], [ AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in mingw*) dnl Native Windows. dnl mingw64 defines off_t to a 64-bit type already, if dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE. AC_CACHE_CHECK([for 64-bit off_t], [gl_cv_type_off_t_64], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; ]], [[]])], [gl_cv_type_off_t_64=yes], [gl_cv_type_off_t_64=no]) ]) if test $gl_cv_type_off_t_64 = no; then WINDOWS_64_BIT_OFF_T=1 else WINDOWS_64_BIT_OFF_T=0 fi dnl Some mingw versions define, if _FILE_OFFSET_BITS=64, 'struct stat' dnl to 'struct _stat32i64' or 'struct _stat64' (depending on dnl _USE_32BIT_TIME_T), which has a 32-bit st_size member. AC_CACHE_CHECK([for 64-bit st_size], [gl_cv_member_st_size_64], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include struct stat buf; int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1]; ]], [[]])], [gl_cv_member_st_size_64=yes], [gl_cv_member_st_size_64=no]) ]) if test $gl_cv_member_st_size_64 = no; then WINDOWS_64_BIT_ST_SIZE=1 else WINDOWS_64_BIT_ST_SIZE=0 fi ;; *) dnl Nothing to do on gnulib's side. dnl A 64-bit off_t is dnl - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX, dnl OSF/1, Cygwin, dnl - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on dnl glibc, HP-UX, Solaris, dnl - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX, dnl - impossible to achieve on Minix 3.1.8. WINDOWS_64_BIT_OFF_T=0 WINDOWS_64_BIT_ST_SIZE=0 ;; esac ]) pspp-1.0.1/gl/m4/strsep.m40000644000175000017500000000132013124536242012116 00000000000000# strsep.m4 serial 10 dnl Copyright (C) 2002-2004, 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRSEP], [ dnl Persuade glibc to declare strsep(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl The strsep() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([strsep]) if test $ac_cv_func_strsep = no; then HAVE_STRSEP=0 fi ]) # Prerequisites of lib/strsep.c. AC_DEFUN([gl_PREREQ_STRSEP], [:]) pspp-1.0.1/gl/m4/mempcpy.m40000644000175000017500000000134613124536242012260 00000000000000# mempcpy.m4 serial 11 dnl Copyright (C) 2003-2004, 2006-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MEMPCPY], [ dnl Persuade glibc to declare mempcpy(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([mempcpy]) if test $ac_cv_func_mempcpy = no; then HAVE_MEMPCPY=0 fi ]) # Prerequisites of lib/mempcpy.c. AC_DEFUN([gl_PREREQ_MEMPCPY], [ : ]) pspp-1.0.1/gl/m4/malloca.m40000644000175000017500000000110113124536242012203 00000000000000# malloca.m4 serial 1 dnl Copyright (C) 2003-2004, 2006-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MALLOCA], [ dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables dnl @ALLOCA@ and @LTALLOCA@. dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies. AC_REQUIRE([gl_EEMALLOC]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) ]) pspp-1.0.1/gl/m4/ftell.m40000644000175000017500000000100513124536242011704 00000000000000# ftell.m4 serial 3 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FTELL], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_FTELLO]) dnl When ftello needs fixes, ftell needs them too. if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then REPLACE_FTELL=1 fi ]) pspp-1.0.1/gl/m4/minmax.m40000644000175000017500000000245513124536242012101 00000000000000# minmax.m4 serial 4 dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_PREREQ([2.53]) AC_DEFUN([gl_MINMAX], [ AC_REQUIRE([gl_PREREQ_MINMAX]) ]) # Prerequisites of lib/minmax.h. AC_DEFUN([gl_PREREQ_MINMAX], [ gl_MINMAX_IN_HEADER([limits.h]) gl_MINMAX_IN_HEADER([sys/param.h]) ]) dnl gl_MINMAX_IN_HEADER(HEADER) dnl The parameter has to be a literal header name; it cannot be macro, dnl nor a shell variable. (Because autoheader collects only AC_DEFINE dnl invocations with a literal macro name.) AC_DEFUN([gl_MINMAX_IN_HEADER], [ m4_pushdef([header], AS_TR_SH([$1])) m4_pushdef([HEADER], AS_TR_CPP([$1])) AC_CACHE_CHECK([whether <$1> defines MIN and MAX], [gl_cv_minmax_in_]header, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <$1> int x = MIN (42, 17);]], [[]])], [gl_cv_minmax_in_]header[=yes], [gl_cv_minmax_in_]header[=no])]) if test $gl_cv_minmax_in_[]header = yes; then AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1, [Define to 1 if <$1> defines the MIN and MAX macros.]) fi m4_popdef([HEADER]) m4_popdef([header]) ]) pspp-1.0.1/gl/m4/vprintf-posix.m40000644000175000017500000000133513124536242013434 00000000000000# vprintf-posix.m4 serial 3 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VPRINTF_POSIX], [ AC_REQUIRE([gl_FUNC_VFPRINTF_POSIX]) if test $gl_cv_func_vfprintf_posix = no; then gl_REPLACE_VPRINTF fi ]) AC_DEFUN([gl_REPLACE_VPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([vprintf]) REPLACE_VPRINTF=1 AC_DEFINE([REPLACE_VPRINTF_POSIX], [1], [Define if vprintf is overridden by a POSIX compliant gnulib implementation.]) gl_PREREQ_VPRINTF ]) AC_DEFUN([gl_PREREQ_VPRINTF], [:]) pspp-1.0.1/gl/m4/mbiter.m40000644000175000017500000000064213124536242012066 00000000000000# mbiter.m4 serial 7 dnl Copyright (C) 2005, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl autoconf tests required for use of mbiter.h dnl From Bruno Haible. AC_DEFUN([gl_MBITER], [ AC_REQUIRE([AC_TYPE_MBSTATE_T]) : ]) pspp-1.0.1/gl/m4/timegm.m40000644000175000017500000000132713124536242012067 00000000000000# timegm.m4 serial 12 dnl Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_TIMEGM], [ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) REPLACE_TIMEGM=0 AC_CHECK_FUNCS_ONCE([timegm]) if test $ac_cv_func_timegm = yes; then if test "$gl_cv_func_working_mktime" != yes; then # Assume that timegm is buggy if mktime is. REPLACE_TIMEGM=1 fi else HAVE_TIMEGM=0 fi ]) # Prerequisites of lib/timegm.c. AC_DEFUN([gl_PREREQ_TIMEGM], [ : ]) pspp-1.0.1/gl/m4/stpcpy.m40000644000175000017500000000131613124536242012125 00000000000000# stpcpy.m4 serial 8 dnl Copyright (C) 2002, 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STPCPY], [ dnl Persuade glibc to declare stpcpy(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([stpcpy]) if test $ac_cv_func_stpcpy = no; then HAVE_STPCPY=0 fi ]) # Prerequisites of lib/stpcpy.c. AC_DEFUN([gl_PREREQ_STPCPY], [ : ]) pspp-1.0.1/gl/m4/pthread_rwlock_rdlock.m40000644000175000017500000001274313124536241015156 00000000000000# pthread_rwlock_rdlock.m4 serial 1 dnl Copyright (C) 2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Inspired by dnl https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c dnl by Intel Corporation. dnl Test whether in a situation where dnl - an rwlock is taken by a reader and has a writer waiting, dnl - an additional reader requests the lock, dnl - the waiting writer and the requesting reader threads have the same dnl priority, dnl the requesting reader thread gets blocked, so that at some point the dnl waiting writer can acquire the lock. dnl Without such a guarantee, when there a N readers and each of the readers dnl spends more than 1/Nth of the time with the lock held, there is a high dnl probability that the waiting writer will not get the lock in a given finite dnl time, a phenomenon called "writer starvation". dnl Without such a guarantee, applications have a hard time avoiding writer dnl starvation. dnl dnl POSIX:2008 makes this requirement only for implementations that support TPS dnl (Thread Priority Scheduling) and only for the scheduling policies SCHED_FIFO dnl and SCHED_RR, see dnl http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html dnl but test verifies the guarantee regardless of TPS and regardless of dnl scheduling policy. AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], [ AC_REQUIRE([gl_THREADLIB_EARLY]) AC_CACHE_CHECK([whether pthread_rwlock_rdlock prefers a writer to a reader], [gl_cv_pthread_rwlock_rdlock_prefer_writer], [save_LIBS="$LIBS" LIBS="$LIBS $LIBMULTITHREAD" AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #include #define SUCCEED() exit (0) #define FAILURE() exit (1) #define UNEXPECTED(n) (exit (10 + (n))) /* The main thread creates the waiting writer and the requesting reader threads in the default way; this guarantees that they have the same priority. We can reuse the main thread as first reader thread. */ static pthread_rwlock_t lock; static pthread_t reader1; static pthread_t writer; static pthread_t reader2; static pthread_t timer; /* Used to pass control from writer to reader2 and from reader2 to timer, as in a relay race. Passing control from one running thread to another running thread is most likely faster than to create the second thread. */ static pthread_mutex_t baton; static void * timer_func (void *ignored) { /* Step 13 (can be before or after step 12): The timer thread takes the baton, then waits a moment to make sure it can tell whether the second reader thread is blocked at step 12. */ if (pthread_mutex_lock (&baton)) UNEXPECTED (13); usleep (100000); /* By the time we get here, it's clear that the second reader thread is blocked at step 12. This is the desired behaviour. */ SUCCEED (); } static void * reader2_func (void *ignored) { int err; /* Step 8 (can be before or after step 7): The second reader thread takes the baton, then waits a moment to make sure the writer thread has reached step 7. */ if (pthread_mutex_lock (&baton)) UNEXPECTED (8); usleep (100000); /* Step 9: The second reader thread requests the lock. */ err = pthread_rwlock_tryrdlock (&lock); if (err == 0) FAILURE (); else if (err != EBUSY) UNEXPECTED (9); /* Step 10: Launch a timer, to test whether the next call blocks. */ if (pthread_create (&timer, NULL, timer_func, NULL)) UNEXPECTED (10); /* Step 11: Release the baton. */ if (pthread_mutex_unlock (&baton)) UNEXPECTED (11); /* Step 12: The second reader thread requests the lock. */ err = pthread_rwlock_rdlock (&lock); if (err == 0) FAILURE (); else UNEXPECTED (12); } static void * writer_func (void *ignored) { /* Step 4: Take the baton, so that the second reader thread does not go ahead too early. */ if (pthread_mutex_lock (&baton)) UNEXPECTED (4); /* Step 5: Create the second reader thread. */ if (pthread_create (&reader2, NULL, reader2_func, NULL)) UNEXPECTED (5); /* Step 6: Release the baton. */ if (pthread_mutex_unlock (&baton)) UNEXPECTED (6); /* Step 7: The writer thread requests the lock. */ if (pthread_rwlock_wrlock (&lock)) UNEXPECTED (7); return NULL; } int main () { reader1 = pthread_self (); /* Step 1: The main thread initializes the lock and the baton. */ if (pthread_rwlock_init (&lock, NULL)) UNEXPECTED (1); if (pthread_mutex_init (&baton, NULL)) UNEXPECTED (1); /* Step 2: The main thread acquires the lock as a reader. */ if (pthread_rwlock_rdlock (&lock)) UNEXPECTED (2); /* Step 3: Create the writer thread. */ if (pthread_create (&writer, NULL, writer_func, NULL)) UNEXPECTED (3); /* Job done. Go to sleep. */ for (;;) { sleep (1); } } ]])], [gl_cv_pthread_rwlock_rdlock_prefer_writer=yes], [gl_cv_pthread_rwlock_rdlock_prefer_writer=no], [gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"]) LIBS="$save_LIBS" ]) case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in *yes) AC_DEFINE([HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], [1], [Define if the 'pthread_rwlock_rdlock' function prefers a writer to a reader.]) ;; esac ]) pspp-1.0.1/gl/m4/malloc.m40000644000175000017500000000642313124536242012056 00000000000000# malloc.m4 serial 15 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. m4_version_prereq([2.70], [] ,[ # This is adapted with modifications from upstream Autoconf here: # http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c AC_DEFUN([_AC_FUNC_MALLOC_IF], [ AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles AC_CHECK_HEADERS([stdlib.h]) AC_CACHE_CHECK([for GNU libc compatible malloc], [ac_cv_func_malloc_0_nonnull], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif ]], [[char *p = malloc (0); int result = !p; free (p); return result;]]) ], [ac_cv_func_malloc_0_nonnull=yes], [ac_cv_func_malloc_0_nonnull=no], [case "$host_os" in # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_malloc_0_nonnull=no ;; esac ]) ]) AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2]) ])# _AC_FUNC_MALLOC_IF ]) # gl_FUNC_MALLOC_GNU # ------------------ # Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if # it is not. AC_DEFUN([gl_FUNC_MALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. _AC_FUNC_MALLOC_IF( [AC_DEFINE([HAVE_MALLOC_GNU], [1], [Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise.])], [AC_DEFINE([HAVE_MALLOC_GNU], [0]) REPLACE_MALLOC=1 ]) ]) # gl_FUNC_MALLOC_POSIX # -------------------- # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it # fails), and replace malloc if it is not. AC_DEFUN([gl_FUNC_MALLOC_POSIX], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then AC_DEFINE([HAVE_MALLOC_POSIX], [1], [Define if the 'malloc' function is POSIX compliant.]) else REPLACE_MALLOC=1 fi ]) # Test whether malloc, realloc, calloc are POSIX compliant, # Set gl_cv_func_malloc_posix to yes or no accordingly. AC_DEFUN([gl_CHECK_MALLOC_POSIX], [ AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], [gl_cv_func_malloc_posix], [ dnl It is too dangerous to try to allocate a large amount of memory: dnl some systems go to their knees when you do that. So assume that dnl all Unix implementations of the function are POSIX compliant. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[]], [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif ]])], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no]) ]) ]) pspp-1.0.1/gl/m4/sys_stat_h.m40000644000175000017500000000741013124536242012764 00000000000000# sys_stat_h.m4 serial 31 -*- Autoconf -*- dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Eric Blake. dnl Provide a GNU-like . AC_DEFUN([gl_HEADER_SYS_STAT_H], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl Check for broken stat macros. AC_REQUIRE([AC_HEADER_STAT]) gl_CHECK_NEXT_HEADERS([sys/stat.h]) dnl Ensure the type mode_t gets defined. AC_REQUIRE([AC_TYPE_MODE_T]) dnl Whether to enable precise timestamps in 'struct stat'. m4_ifdef([gl_WINDOWS_STAT_TIMESPEC], [ AC_REQUIRE([gl_WINDOWS_STAT_TIMESPEC]) ], [ WINDOWS_STAT_TIMESPEC=0 ]) AC_SUBST([WINDOWS_STAT_TIMESPEC]) dnl Whether to ensure that struct stat.st_size is 64-bit wide. m4_ifdef([gl_LARGEFILE], [ AC_REQUIRE([gl_LARGEFILE]) ], [ WINDOWS_64_BIT_ST_SIZE=0 ]) AC_SUBST([WINDOWS_64_BIT_ST_SIZE]) dnl Define types that are supposed to be defined in or dnl . AC_CHECK_TYPE([nlink_t], [], [AC_DEFINE([nlink_t], [int], [Define to the type of st_nlink in struct stat, or a supertype.])], [#include #include ]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat]) ]) # gl_HEADER_SYS_STAT_H AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT]) GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) GNULIB_OVERRIDES_STRUCT_STAT=0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_STAT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) ]) pspp-1.0.1/gl/m4/signbit.m40000644000175000017500000003014613132510757012247 00000000000000# signbit.m4 serial 15 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SIGNBIT], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([for signbit macro], [gl_cv_func_signbit], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include /* If signbit is defined as a function, don't use it, since calling it for 'float' or 'long double' arguments would involve conversions. If signbit is not declared at all but exists as a library function, don't use it, since the prototype may not match. If signbit is not declared at all but exists as a compiler built-in, don't use it, since it's preferable to use __builtin_signbit* (no warnings, no conversions). */ #ifndef signbit # error "signbit should be a macro" #endif #include ]gl_SIGNBIT_TEST_PROGRAM ])], [gl_cv_func_signbit=yes], [gl_cv_func_signbit=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_signbit="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_signbit="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_signbit="guessing no" ;; esac ]) ]) dnl GCC 4.0 and newer provides three built-ins for signbit. dnl They can be used without warnings, also in C++, regardless of . dnl But they may expand to calls to functions, which may or may not be in dnl libc. AC_CACHE_CHECK([for signbit compiler built-ins], [gl_cv_func_signbit_gcc], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #if __GNUC__ >= 4 # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ __builtin_signbitf (x)) #else # error "signbit should be three compiler built-ins" #endif #include ]gl_SIGNBIT_TEST_PROGRAM ])], [gl_cv_func_signbit_gcc=yes], [gl_cv_func_signbit_gcc=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;; # Guess yes on mingw, no on MSVC. mingw*) if test -n "$GCC"; then gl_cv_func_signbit_gcc="guessing yes" else gl_cv_func_signbit_gcc="guessing no" fi ;; # If we don't know, assume the worst. *) gl_cv_func_signbit_gcc="guessing no" ;; esac ]) ]) dnl Use the compiler built-ins whenever possible, because they are more dnl efficient than the system library functions (if they exist). case "$gl_cv_func_signbit_gcc" in *yes) REPLACE_SIGNBIT_USING_GCC=1 ;; *) case "$gl_cv_func_signbit" in *yes) ;; *) dnl REPLACE_SIGNBIT=1 makes sure the signbit[fdl] functions get built. REPLACE_SIGNBIT=1 gl_FLOAT_SIGN_LOCATION gl_DOUBLE_SIGN_LOCATION gl_LONG_DOUBLE_SIGN_LOCATION if test "$gl_cv_cc_float_signbit" = unknown; then dnl Test whether copysignf() is declared. AC_CHECK_DECLS([copysignf], , , [[#include ]]) if test "$ac_cv_have_decl_copysignf" = yes; then dnl Test whether copysignf() can be used without libm. AC_CACHE_CHECK([whether copysignf can be used without linking with libm], [gl_cv_func_copysignf_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include float x, y;]], [[return copysignf (x, y) < 0;]])], [gl_cv_func_copysignf_no_libm=yes], [gl_cv_func_copysignf_no_libm=no]) ]) if test $gl_cv_func_copysignf_no_libm = yes; then AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1], [Define if the copysignf function is declared in and available in libc.]) fi fi fi if test "$gl_cv_cc_double_signbit" = unknown; then dnl Test whether copysign() is declared. AC_CHECK_DECLS([copysign], , , [[#include ]]) if test "$ac_cv_have_decl_copysign" = yes; then dnl Test whether copysign() can be used without libm. AC_CACHE_CHECK([whether copysign can be used without linking with libm], [gl_cv_func_copysign_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include double x, y;]], [[return copysign (x, y) < 0;]])], [gl_cv_func_copysign_no_libm=yes], [gl_cv_func_copysign_no_libm=no]) ]) if test $gl_cv_func_copysign_no_libm = yes; then AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1], [Define if the copysign function is declared in and available in libc.]) fi fi fi if test "$gl_cv_cc_long_double_signbit" = unknown; then dnl Test whether copysignl() is declared. AC_CHECK_DECLS([copysignl], , , [[#include ]]) if test "$ac_cv_have_decl_copysignl" = yes; then dnl Test whether copysignl() can be used without libm. AC_CACHE_CHECK([whether copysignl can be used without linking with libm], [gl_cv_func_copysignl_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include long double x, y;]], [[return copysignl (x, y) < 0;]])], [gl_cv_func_copysignl_no_libm=yes], [gl_cv_func_copysignl_no_libm=no]) ]) if test $gl_cv_func_copysignl_no_libm = yes; then AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1], [Define if the copysignl function is declared in and available in libc.]) fi fi fi ;; esac ;; esac ]) AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [[ /* Global variables. Needed because GCC 4 constant-folds __builtin_signbitl (literal) but cannot constant-fold __builtin_signbitl (variable). */ float vf; double vd; long double vl; int main () { /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. So we use -p0f and -p0d instead. */ float p0f = 0.0f; float m0f = -p0f; double p0d = 0.0; double m0d = -p0d; /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. So we use another constant expression instead. But that expression does not work on other platforms, such as when cross-compiling to PowerPC on Mac OS X 10.5. */ long double p0l = 0.0L; #if defined __hpux || defined __sgi long double m0l = -LDBL_MIN * LDBL_MIN; #else long double m0l = -p0l; #endif int result = 0; if (signbit (vf)) /* link check */ vf++; { float plus_inf = 1.0f / p0f; float minus_inf = -1.0f / p0f; if (!(!signbit (255.0f) && signbit (-255.0f) && !signbit (p0f) && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f)) && !signbit (plus_inf) && signbit (minus_inf))) result |= 1; } if (signbit (vd)) /* link check */ vd++; { double plus_inf = 1.0 / p0d; double minus_inf = -1.0 / p0d; if (!(!signbit (255.0) && signbit (-255.0) && !signbit (p0d) && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d)) && !signbit (plus_inf) && signbit (minus_inf))) result |= 2; } if (signbit (vl)) /* link check */ vl++; { long double plus_inf = 1.0L / p0l; long double minus_inf = -1.0L / p0l; if (signbit (255.0L)) result |= 4; if (!signbit (-255.0L)) result |= 4; if (signbit (p0l)) result |= 8; if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))) result |= 16; if (signbit (plus_inf)) result |= 32; if (!signbit (minus_inf)) result |= 64; } return result; } ]]) AC_DEFUN([gl_FLOAT_SIGN_LOCATION], [ gl_FLOATTYPE_SIGN_LOCATION([float], [gl_cv_cc_float_signbit], [f], [FLT]) ]) AC_DEFUN([gl_DOUBLE_SIGN_LOCATION], [ gl_FLOATTYPE_SIGN_LOCATION([double], [gl_cv_cc_double_signbit], [], [DBL]) ]) AC_DEFUN([gl_LONG_DOUBLE_SIGN_LOCATION], [ gl_FLOATTYPE_SIGN_LOCATION([long double], [gl_cv_cc_long_double_signbit], [L], [LDBL]) ]) AC_DEFUN([gl_FLOATTYPE_SIGN_LOCATION], [ AC_CACHE_CHECK([where to find the sign bit in a '$1'], [$2], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #define NWORDS \ ((sizeof ($1) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { $1 value; unsigned int word[NWORDS]; } memory_float; static memory_float plus = { 1.0$3 }; static memory_float minus = { -1.0$3 }; int main () { size_t j, k, i; unsigned int m; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; /* Find the different bit. */ k = 0; m = 0; for (j = 0; j < NWORDS; j++) { unsigned int x = plus.word[j] ^ minus.word[j]; if ((x & (x - 1)) || (x && m)) { /* More than one bit difference. */ fprintf (fp, "unknown"); fclose (fp); return 2; } if (x) { k = j; m = x; } } if (m == 0) { /* No difference. */ fprintf (fp, "unknown"); fclose (fp); return 3; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ if (plus.word[k] & ~minus.word[k]) { /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); fclose (fp); return 4; } for (i = 0; ; i++) if ((m >> i) & 1) break; fprintf (fp, "word %d bit %d", (int) k, (int) i); if (fclose (fp) != 0) return 5; return 0; } ]])], [$2=`cat conftest.out`], [$2="unknown"], [ dnl When cross-compiling, we don't know. It depends on the dnl ABI and compiler version. There are too many cases. $2="unknown" ]) rm -f conftest.out ]) case "$]$2[" in word*bit*) word=`echo "$]$2[" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$]$2[" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([$4][_SIGNBIT_WORD], [$word], [Define as the word index where to find the sign of '$1'.]) AC_DEFINE_UNQUOTED([$4][_SIGNBIT_BIT], [$bit], [Define as the bit index in the word where to find the sign of '$1'.]) ;; esac ]) # Expands to code that defines a function signbitf(float). # It extracts the sign bit of a non-NaN value. AC_DEFUN([gl_FLOAT_SIGNBIT_CODE], [ gl_FLOATTYPE_SIGNBIT_CODE([float], [f], [f]) ]) # Expands to code that defines a function signbitd(double). # It extracts the sign bit of a non-NaN value. AC_DEFUN([gl_DOUBLE_SIGNBIT_CODE], [ gl_FLOATTYPE_SIGNBIT_CODE([double], [d], []) ]) # Expands to code that defines a function signbitl(long double). # It extracts the sign bit of a non-NaN value. AC_DEFUN([gl_LONG_DOUBLE_SIGNBIT_CODE], [ gl_FLOATTYPE_SIGNBIT_CODE([long double], [l], [L]) ]) AC_DEFUN([gl_FLOATTYPE_SIGNBIT_CODE], [[ static int signbit$2 ($1 value) { typedef union { $1 f; unsigned char b[sizeof ($1)]; } float_union; static float_union plus_one = { 1.0$3 }; /* unused bits are zero here */ static float_union minus_one = { -1.0$3 }; /* unused bits are zero here */ /* Compute the sign bit mask as the XOR of plus_one and minus_one. */ float_union u; unsigned int i; u.f = value; for (i = 0; i < sizeof ($1); i++) if (u.b[i] & (plus_one.b[i] ^ minus_one.b[i])) return 1; return 0; } ]]) pspp-1.0.1/gl/m4/builtin-expect.m40000644000175000017500000000302313124536241013533 00000000000000dnl Check for __builtin_expect. dnl Copyright 2016-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl___BUILTIN_EXPECT], [ AC_CACHE_CHECK([for __builtin_expect], [gl_cv___builtin_expect], [AC_LINK_IFELSE( [AC_LANG_SOURCE([[ int main (int argc, char **argv) { argc = __builtin_expect (argc, 100); return argv[argc != 100][0]; }]])], [gl_cv___builtin_expect=yes], [AC_LINK_IFELSE( [AC_LANG_SOURCE([[ #include int main (int argc, char **argv) { argc = __builtin_expect (argc, 100); return argv[argc != 100][0]; }]])], [gl_cv___builtin_expect="in "], [gl_cv___builtin_expect=no])])]) if test "$gl_cv___builtin_expect" = yes; then AC_DEFINE([HAVE___BUILTIN_EXPECT], [1]) elif test "$gl_cv___builtin_expect" = "in "; then AC_DEFINE([HAVE___BUILTIN_EXPECT], [2]) fi AH_VERBATIM([HAVE___BUILTIN_EXPECT], [/* Define to 1 if the compiler supports __builtin_expect, and to 2 if does. */ #undef HAVE___BUILTIN_EXPECT #ifndef HAVE___BUILTIN_EXPECT # define __builtin_expect(e, c) (e) #elif HAVE___BUILTIN_EXPECT == 2 # include #endif ]) ]) pspp-1.0.1/gl/m4/mktime.m40000644000175000017500000002042513132510756012074 00000000000000# serial 29 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Jim Meyering. AC_DEFUN([gl_TIME_T_IS_SIGNED], [ AC_CACHE_CHECK([whether time_t is signed], [gl_cv_time_t_is_signed], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include char time_t_signed[(time_t) -1 < 0 ? 1 : -1];]])], [gl_cv_time_t_is_signed=yes], [gl_cv_time_t_is_signed=no])]) if test $gl_cv_time_t_is_signed = yes; then AC_DEFINE([TIME_T_IS_SIGNED], [1], [Define to 1 if time_t is signed.]) fi ]) dnl Test whether mktime works. Set gl_cv_func_working_mktime. AC_DEFUN([gl_FUNC_MKTIME_WORKS], [ AC_REQUIRE([gl_TIME_T_IS_SIGNED]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl We don't use AC_FUNC_MKTIME any more, because it is no longer maintained dnl in Autoconf and because it invokes AC_LIBOBJ. AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_DECLS_ONCE([alarm]) AC_CHECK_FUNCS_ONCE([tzset]) AC_REQUIRE([gl_MULTIARCH]) if test $APPLE_UNIVERSAL_BUILD = 1; then # A universal build on Apple Mac OS X platforms. # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. # But we need a configuration result that is valid in both modes. gl_cv_func_working_mktime=no fi AC_CACHE_CHECK([for working mktime], [gl_cv_func_working_mktime], [AC_RUN_IFELSE( [AC_LANG_SOURCE( [[/* Test program from Paul Eggert and Tony Leneis. */ #include #include #include #ifdef HAVE_UNISTD_H # include #endif #if HAVE_DECL_ALARM # include #endif /* Work around redefinition to rpl_putenv by other config tests. */ #undef putenv static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ static char *tz_strings[] = { (char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) /* Return 0 if mktime fails to convert a date in the spring-forward gap. Based on a problem report from Andreas Jaeger. */ static int spring_forward_gap () { /* glibc (up to about 1998-10-07) failed this test. */ struct tm tm; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; tm.tm_mday = 5; tm.tm_hour = 2; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; return mktime (&tm) != (time_t) -1; } static int mktime_test1 (time_t now) { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int mktime_test (time_t now) { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) && mktime_test1 ((time_t) (time_t_min + now))); } static int irix_6_4_bug () { /* Based on code from Ariel Faigon. */ struct tm tm; tm.tm_year = 96; tm.tm_mon = 3; tm.tm_mday = 0; tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; mktime (&tm); return tm.tm_mon == 2 && tm.tm_mday == 31; } static int bigtime_test (int j) { struct tm tm; time_t now; tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; now = mktime (&tm); if (now != (time_t) -1) { struct tm *lt = localtime (&now); if (! (lt && lt->tm_year == tm.tm_year && lt->tm_mon == tm.tm_mon && lt->tm_mday == tm.tm_mday && lt->tm_hour == tm.tm_hour && lt->tm_min == tm.tm_min && lt->tm_sec == tm.tm_sec && lt->tm_yday == tm.tm_yday && lt->tm_wday == tm.tm_wday && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) return 0; } return 1; } static int year_2050_test () { /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ignoring leap seconds. */ unsigned long int answer = 2527315200UL; struct tm tm; time_t t; tm.tm_year = 2050 - 1900; tm.tm_mon = 2 - 1; tm.tm_mday = 1; tm.tm_hour = tm.tm_min = tm.tm_sec = 0; tm.tm_isdst = -1; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); /* Check that the result is either a failure, or close enough to the correct answer that we can assume the discrepancy is due to leap seconds. */ return (t == (time_t) -1 || (0 < t && answer - 120 <= t && t <= answer + 120)); } int main () { int result = 0; time_t t, delta; int i, j; int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; #if HAVE_DECL_ALARM /* This test makes some buggy mktime implementations loop. Give up after 60 seconds; a mktime slower than that isn't worth using anyway. */ signal (SIGALRM, SIG_DFL); alarm (60); #endif time_t_max = (! TIME_T_IS_SIGNED ? (time_t) -1 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) * 2 + 1)); time_t_min = (! TIME_T_IS_SIGNED ? (time_t) 0 : time_t_signed_magnitude ? ~ (time_t) 0 : ~ time_t_max); delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) putenv (tz_strings[i]); for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta) if (! mktime_test (t)) result |= 1; if ((result & 2) == 0 && ! (mktime_test ((time_t) 1) && mktime_test ((time_t) (60 * 60)) && mktime_test ((time_t) (60 * 60 * 24)))) result |= 2; for (j = 1; (result & 4) == 0; j <<= 1) { if (! bigtime_test (j)) result |= 4; if (INT_MAX / 2 < j) break; } if ((result & 8) == 0 && ! bigtime_test (INT_MAX)) result |= 8; } if (! irix_6_4_bug ()) result |= 16; if (! spring_forward_gap ()) result |= 32; if (! year_2050_test ()) result |= 64; return result; }]])], [gl_cv_func_working_mktime=yes], [gl_cv_func_working_mktime=no], [case "$host_os" in # Guess no on native Windows. mingw*) gl_cv_func_working_mktime="guessing no" ;; *) gl_cv_func_working_mktime="guessing no" ;; esac ]) ]) ]) dnl Main macro of module 'mktime'. AC_DEFUN([gl_FUNC_MKTIME], [ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) REPLACE_MKTIME=0 if test "$gl_cv_func_working_mktime" != yes; then REPLACE_MKTIME=1 AC_DEFINE([NEED_MKTIME_WORKING], [1], [Define if the compilation of mktime.c should define 'mktime' with the algorithmic workarounds.]) fi case "$host_os" in mingw*) REPLACE_MKTIME=1 AC_DEFINE([NEED_MKTIME_WINDOWS], [1], [Define if the compilation of mktime.c should define 'mktime' with the native Windows TZ workaround.]) ;; esac ]) dnl Main macro of module 'mktime-internal'. AC_DEFUN([gl_FUNC_MKTIME_INTERNAL], [ AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) WANT_MKTIME_INTERNAL=0 dnl BeOS has __mktime_internal in libc, but other platforms don't. AC_CHECK_FUNC([__mktime_internal], [AC_DEFINE([mktime_internal], [__mktime_internal], [Define to the real name of the mktime_internal function.]) ], [dnl mktime works but it doesn't export __mktime_internal, dnl so we need to substitute our own mktime implementation. WANT_MKTIME_INTERNAL=1 AC_DEFINE([NEED_MKTIME_INTERNAL], [1], [Define if the compilation of mktime.c should define 'mktime_internal'.]) ]) ]) # Prerequisites of lib/mktime.c. AC_DEFUN([gl_PREREQ_MKTIME], [:]) pspp-1.0.1/gl/m4/wchar_h.m40000644000175000017500000002354113124536242012222 00000000000000dnl A placeholder for ISO C99 , for platforms that have issues. dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. # wchar_h.m4 serial 42 AC_DEFUN([gl_WCHAR_H], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) dnl Prepare for creating substitute . dnl Check for (missing in Linux uClibc when built without wide dnl character support). dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([wchar.h]) if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi AC_SUBST([HAVE_WCHAR_H]) AC_REQUIRE([gl_FEATURES_H]) AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi AC_SUBST([HAVE_WINT_T]) AC_REQUIRE([gl_TYPE_WINT_T_PREREQ]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include #endif #include ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime ]) ]) dnl Check whether is usable at all. AC_DEFUN([gl_WCHAR_H_INLINE_OK], [ dnl Test whether suffers due to the transition from '__inline' to dnl 'gnu_inline'. See dnl and . In summary, dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and dnl the option -std=c99 or -std=gnu99, leads to a broken . AC_CACHE_CHECK([whether uses 'inline' correctly], [gl_cv_header_wchar_h_correct_inline], [gl_cv_header_wchar_h_correct_inline=yes AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include extern int zero (void); int main () { return zero(); } ]])]) dnl Do not rename the object file from conftest.$ac_objext to dnl conftest1.$ac_objext, as this will cause the link to fail on dnl z/OS when using the XPLINK object format (due to duplicate dnl CSECT names). Instead, temporarily redefine $ac_compile so dnl that the object file has the latter name from the start. save_ac_compile="$ac_compile" ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` if AC_TRY_EVAL([ac_compile]); then AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int zero (void) { return 0; } ]])]) dnl See note above about renaming object files. ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` if AC_TRY_EVAL([ac_compile]); then if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then : else gl_cv_header_wchar_h_correct_inline=no fi fi fi ac_compile="$save_ac_compile" rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext ]) if test $gl_cv_header_wchar_h_correct_inline = no; then AC_MSG_ERROR([ cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted.]) fi ]) AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_WCHAR_H_DEFAULTS], [ GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) GNULIB_WMEMCHR=0; AC_SUBST([GNULIB_WMEMCHR]) GNULIB_WMEMCMP=0; AC_SUBST([GNULIB_WMEMCMP]) GNULIB_WMEMCPY=0; AC_SUBST([GNULIB_WMEMCPY]) GNULIB_WMEMMOVE=0; AC_SUBST([GNULIB_WMEMMOVE]) GNULIB_WMEMSET=0; AC_SUBST([GNULIB_WMEMSET]) GNULIB_WCSLEN=0; AC_SUBST([GNULIB_WCSLEN]) GNULIB_WCSNLEN=0; AC_SUBST([GNULIB_WCSNLEN]) GNULIB_WCSCPY=0; AC_SUBST([GNULIB_WCSCPY]) GNULIB_WCPCPY=0; AC_SUBST([GNULIB_WCPCPY]) GNULIB_WCSNCPY=0; AC_SUBST([GNULIB_WCSNCPY]) GNULIB_WCPNCPY=0; AC_SUBST([GNULIB_WCPNCPY]) GNULIB_WCSCAT=0; AC_SUBST([GNULIB_WCSCAT]) GNULIB_WCSNCAT=0; AC_SUBST([GNULIB_WCSNCAT]) GNULIB_WCSCMP=0; AC_SUBST([GNULIB_WCSCMP]) GNULIB_WCSNCMP=0; AC_SUBST([GNULIB_WCSNCMP]) GNULIB_WCSCASECMP=0; AC_SUBST([GNULIB_WCSCASECMP]) GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP]) GNULIB_WCSCOLL=0; AC_SUBST([GNULIB_WCSCOLL]) GNULIB_WCSXFRM=0; AC_SUBST([GNULIB_WCSXFRM]) GNULIB_WCSDUP=0; AC_SUBST([GNULIB_WCSDUP]) GNULIB_WCSCHR=0; AC_SUBST([GNULIB_WCSCHR]) GNULIB_WCSRCHR=0; AC_SUBST([GNULIB_WCSRCHR]) GNULIB_WCSCSPN=0; AC_SUBST([GNULIB_WCSCSPN]) GNULIB_WCSSPN=0; AC_SUBST([GNULIB_WCSSPN]) GNULIB_WCSPBRK=0; AC_SUBST([GNULIB_WCSPBRK]) GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR]) GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK]) GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH]) GNULIB_WCSFTIME=0; AC_SUBST([GNULIB_WCSFTIME]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC]) HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN]) HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS]) HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS]) HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB]) HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS]) HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS]) HAVE_WMEMCHR=1; AC_SUBST([HAVE_WMEMCHR]) HAVE_WMEMCMP=1; AC_SUBST([HAVE_WMEMCMP]) HAVE_WMEMCPY=1; AC_SUBST([HAVE_WMEMCPY]) HAVE_WMEMMOVE=1; AC_SUBST([HAVE_WMEMMOVE]) HAVE_WMEMSET=1; AC_SUBST([HAVE_WMEMSET]) HAVE_WCSLEN=1; AC_SUBST([HAVE_WCSLEN]) HAVE_WCSNLEN=1; AC_SUBST([HAVE_WCSNLEN]) HAVE_WCSCPY=1; AC_SUBST([HAVE_WCSCPY]) HAVE_WCPCPY=1; AC_SUBST([HAVE_WCPCPY]) HAVE_WCSNCPY=1; AC_SUBST([HAVE_WCSNCPY]) HAVE_WCPNCPY=1; AC_SUBST([HAVE_WCPNCPY]) HAVE_WCSCAT=1; AC_SUBST([HAVE_WCSCAT]) HAVE_WCSNCAT=1; AC_SUBST([HAVE_WCSNCAT]) HAVE_WCSCMP=1; AC_SUBST([HAVE_WCSCMP]) HAVE_WCSNCMP=1; AC_SUBST([HAVE_WCSNCMP]) HAVE_WCSCASECMP=1; AC_SUBST([HAVE_WCSCASECMP]) HAVE_WCSNCASECMP=1; AC_SUBST([HAVE_WCSNCASECMP]) HAVE_WCSCOLL=1; AC_SUBST([HAVE_WCSCOLL]) HAVE_WCSXFRM=1; AC_SUBST([HAVE_WCSXFRM]) HAVE_WCSDUP=1; AC_SUBST([HAVE_WCSDUP]) HAVE_WCSCHR=1; AC_SUBST([HAVE_WCSCHR]) HAVE_WCSRCHR=1; AC_SUBST([HAVE_WCSRCHR]) HAVE_WCSCSPN=1; AC_SUBST([HAVE_WCSCSPN]) HAVE_WCSSPN=1; AC_SUBST([HAVE_WCSSPN]) HAVE_WCSPBRK=1; AC_SUBST([HAVE_WCSPBRK]) HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR]) HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK]) HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH]) HAVE_WCSFTIME=1; AC_SUBST([HAVE_WCSFTIME]) HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC]) REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB]) REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT]) REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC]) REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN]) REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS]) REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS]) REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB]) REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH]) REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME]) ]) pspp-1.0.1/gl/m4/msvc-inval.m40000644000175000017500000000133413124536242012662 00000000000000# msvc-inval.m4 serial 1 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MSVC_INVAL], [ AC_CHECK_FUNCS_ONCE([_set_invalid_parameter_handler]) if test $ac_cv_func__set_invalid_parameter_handler = yes; then HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 AC_DEFINE([HAVE_MSVC_INVALID_PARAMETER_HANDLER], [1], [Define to 1 on MSVC platforms that have the "invalid parameter handler" concept.]) else HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 fi AC_SUBST([HAVE_MSVC_INVALID_PARAMETER_HANDLER]) ]) pspp-1.0.1/gl/m4/wctype_h.m40000644000175000017500000001557513132510757012443 00000000000000# wctype_h.m4 serial 21 dnl A placeholder for ISO C99 , for platforms that lack it. dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_WCTYPE_H], [ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([iswcntrl]) if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else HAVE_ISWCNTRL=0 fi AC_SUBST([HAVE_ISWCNTRL]) AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi AC_SUBST([HAVE_WINT_T]) AC_REQUIRE([gl_TYPE_WINT_T_PREREQ]) gl_CHECK_NEXT_HEADERS([wctype.h]) if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then dnl Linux libc5 has an iswprint function that returns 0 for all arguments. dnl The other functions are likely broken in the same way. AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { return iswprint ('x') == 0; } ]])], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], [dnl Guess no on Linux libc5, yes otherwise. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif]], [])], [gl_cv_func_iswcntrl_works="guessing yes"], [gl_cv_func_iswcntrl_works="guessing no"]) ]) ]) fi HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi AC_SUBST([HAVE_WCTYPE_H]) case "$gl_cv_func_iswcntrl_works" in *yes) REPLACE_ISWCNTRL=0 ;; *) REPLACE_ISWCNTRL=1 ;; esac AC_SUBST([REPLACE_ISWCNTRL]) if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then dnl Redefine all of iswcntrl, ..., iswxdigit in . : fi if test $REPLACE_ISWCNTRL = 1; then REPLACE_TOWLOWER=1 else AC_CHECK_FUNCS([towlower]) if test $ac_cv_func_towlower = yes; then REPLACE_TOWLOWER=0 else AC_CHECK_DECLS([towlower],,, [[/* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if HAVE_WCTYPE_H # include #endif ]]) if test $ac_cv_have_decl_towlower = yes; then dnl On Minix 3.1.8, the system's declares towlower() and dnl towupper() although it does not have the functions. Avoid a dnl collision with gnulib's replacement. REPLACE_TOWLOWER=1 else REPLACE_TOWLOWER=0 fi fi fi AC_SUBST([REPLACE_TOWLOWER]) if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then dnl Redefine towlower, towupper in . : fi dnl We assume that the wctype() and iswctype() functions exist if and only dnl if the type wctype_t is defined in or in if that dnl exists. dnl HP-UX 11.00 declares all these in and lacks . AC_CACHE_CHECK([for wctype_t], [gl_cv_type_wctype_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[/* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if HAVE_WCTYPE_H # include #endif wctype_t a; ]], [[]])], [gl_cv_type_wctype_t=yes], [gl_cv_type_wctype_t=no]) ]) if test $gl_cv_type_wctype_t = no; then HAVE_WCTYPE_T=0 fi dnl We assume that the wctrans() and towctrans() functions exist if and only dnl if the type wctrans_t is defined in . AC_CACHE_CHECK([for wctrans_t], [gl_cv_type_wctrans_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[/* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include wctrans_t a; ]], [[]])], [gl_cv_type_wctrans_t=yes], [gl_cv_type_wctrans_t=no]) ]) if test $gl_cv_type_wctrans_t = no; then HAVE_WCTRANS_T=0 fi dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # include #endif #include ]], [wctype iswctype wctrans towctrans ]) ]) AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_WCTYPE_H_DEFAULTS], [ GNULIB_ISWBLANK=0; AC_SUBST([GNULIB_ISWBLANK]) GNULIB_WCTYPE=0; AC_SUBST([GNULIB_WCTYPE]) GNULIB_ISWCTYPE=0; AC_SUBST([GNULIB_ISWCTYPE]) GNULIB_WCTRANS=0; AC_SUBST([GNULIB_WCTRANS]) GNULIB_TOWCTRANS=0; AC_SUBST([GNULIB_TOWCTRANS]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_ISWBLANK=1; AC_SUBST([HAVE_ISWBLANK]) HAVE_WCTYPE_T=1; AC_SUBST([HAVE_WCTYPE_T]) HAVE_WCTRANS_T=1; AC_SUBST([HAVE_WCTRANS_T]) REPLACE_ISWBLANK=0; AC_SUBST([REPLACE_ISWBLANK]) ]) pspp-1.0.1/gl/m4/printf-posix-rpl.m40000644000175000017500000000137413124536242014044 00000000000000# printf-posix-rpl.m4 serial 4 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_PRINTF_POSIX], [ AC_REQUIRE([gl_FUNC_VFPRINTF_POSIX]) if test $gl_cv_func_vfprintf_posix = no; then gl_REPLACE_PRINTF fi ]) AC_DEFUN([gl_REPLACE_PRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_ASM_SYMBOL_PREFIX]) AC_LIBOBJ([printf]) REPLACE_PRINTF=1 AC_DEFINE([REPLACE_PRINTF_POSIX], [1], [Define if printf is overridden by a POSIX compliant gnulib implementation.]) gl_PREREQ_PRINTF ]) AC_DEFUN([gl_PREREQ_PRINTF], [:]) pspp-1.0.1/gl/m4/getdtablesize.m40000644000175000017500000000474013132510756013436 00000000000000# getdtablesize.m4 serial 7 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_GETDTABLESIZE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([getdtablesize]) AC_CHECK_DECLS_ONCE([getdtablesize]) if test $ac_cv_func_getdtablesize = yes && test $ac_cv_have_decl_getdtablesize = yes; then AC_CACHE_CHECK([whether getdtablesize works], [gl_cv_func_getdtablesize_works], [dnl There are two concepts: the "maximum possible file descriptor value + 1" dnl and the "maximum number of open file descriptors in a process". dnl Per SUSv2 and POSIX, getdtablesize() should return the first one. dnl On most platforms, the first and the second concept are the same. dnl On OpenVMS, however, they are different and getdtablesize() returns dnl the second one; thus the test below fails. But we don't care dnl because there's no good way to write a replacement getdtablesize(). case "$host_os" in vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;; *) dnl Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft dnl limit up to an unchangeable hard limit; all other platforms dnl correctly require setrlimit before getdtablesize() can report dnl a larger value. AC_RUN_IFELSE([ AC_LANG_PROGRAM([[#include ]], [int size = getdtablesize(); if (dup2 (0, getdtablesize()) != -1) return 1; if (size != getdtablesize()) return 2; ])], [gl_cv_func_getdtablesize_works=yes], [gl_cv_func_getdtablesize_works=no], [case "$host_os" in cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows gl_cv_func_getdtablesize_works="guessing no" ;; *) gl_cv_func_getdtablesize_works="guessing yes" ;; esac ]) ;; esac ]) case "$gl_cv_func_getdtablesize_works" in *yes | "no (limitation)") ;; *) REPLACE_GETDTABLESIZE=1 ;; esac else HAVE_GETDTABLESIZE=0 fi ]) # Prerequisites of lib/getdtablesize.c. AC_DEFUN([gl_PREREQ_GETDTABLESIZE], [:]) pspp-1.0.1/gl/m4/ceil.m40000644000175000017500000000617613132510756011531 00000000000000# ceil.m4 serial 10 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_CEIL], [ m4_divert_text([DEFAULTS], [gl_ceil_required=plain]) AC_REQUIRE([gl_MATH_H_DEFAULTS]) dnl Test whether ceil() can be used without libm. gl_FUNC_CEIL_LIBS if test "$CEIL_LIBM" = "?"; then CEIL_LIBM= fi m4_ifdef([gl_FUNC_CEIL_IEEE], [ if test $gl_ceil_required = ieee && test $REPLACE_CEIL = 0; then AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether ceil works according to ISO C 99 with IEC 60559], [gl_cv_func_ceil_ieee], [ save_LIBS="$LIBS" LIBS="$LIBS $CEIL_LIBM" AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include ]gl_DOUBLE_MINUS_ZERO_CODE[ ]gl_DOUBLE_SIGNBIT_CODE[ static double dummy (double f) { return 0; } int main (int argc, char *argv[]) { double (*my_ceil) (double) = argc ? ceil : dummy; int result = 0; /* Test whether ceil (-0.0) is -0.0. */ if (signbitd (minus_zerod) && !signbitd (my_ceil (minus_zerod))) result |= 1; /* Test whether ceil (-0.3) is -0.0. */ if (signbitd (-0.3) && !signbitd (my_ceil (-0.3))) result |= 2; return result; } ]])], [gl_cv_func_ceil_ieee=yes], [gl_cv_func_ceil_ieee=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_ceil_ieee="guessing yes" ;; # Guess yes on native Windows. mingw*) gl_cv_func_ceil_ieee="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_ceil_ieee="guessing no" ;; esac ]) LIBS="$save_LIBS" ]) case "$gl_cv_func_ceil_ieee" in *yes) ;; *) REPLACE_CEIL=1 ;; esac fi ]) if test $REPLACE_CEIL = 1; then dnl No libraries are needed to link lib/ceil.c. CEIL_LIBM= fi AC_SUBST([CEIL_LIBM]) ]) # Determines the libraries needed to get the ceil() function. # Sets CEIL_LIBM. AC_DEFUN([gl_FUNC_CEIL_LIBS], [ gl_CACHE_VAL_SILENT([gl_cv_func_ceil_libm], [ gl_cv_func_ceil_libm=? AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include double x;]], [[x = ceil(x);]])], [gl_cv_func_ceil_libm=]) if test "$gl_cv_func_ceil_libm" = "?"; then save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include double x;]], [[x = ceil(x);]])], [gl_cv_func_ceil_libm="-lm"]) LIBS="$save_LIBS" fi ]) CEIL_LIBM="$gl_cv_func_ceil_libm" ]) pspp-1.0.1/gl/m4/strcasestr.m40000644000175000017500000001076213132510757013007 00000000000000# strcasestr.m4 serial 23 dnl Copyright (C) 2005, 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check that strcasestr is present and works. AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) dnl Persuade glibc to declare strcasestr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FUNC_MEMCHR]) AC_CHECK_FUNCS([strcasestr]) if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 else if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then REPLACE_STRCASESTR=1 else dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. AC_CACHE_CHECK([whether strcasestr works], [gl_cv_func_strcasestr_works_always], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include /* for strcasestr */ #define P "_EF_BF_BD" #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P #define NEEDLE P P P P P ]], [[return !!strcasestr (HAYSTACK, NEEDLE); ]])], [gl_cv_func_strcasestr_works_always=yes], [gl_cv_func_strcasestr_works_always=no], [dnl glibc 2.12 and cygwin 1.7.7 have a known bug. uClibc is not dnl affected, since it uses different source code for strcasestr dnl than glibc. dnl Assume that it works on all other platforms, even if it is not dnl linear. AC_EGREP_CPP([Lucky user], [ #ifdef __GNU_LIBRARY__ #include #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ || defined __UCLIBC__ Lucky user #endif #elif defined __CYGWIN__ #include #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) Lucky user #endif #else Lucky user #endif ], [gl_cv_func_strcasestr_works_always="guessing yes"], [gl_cv_func_strcasestr_works_always="guessing no"]) ]) ]) case "$gl_cv_func_strcasestr_works_always" in *yes) ;; *) REPLACE_STRCASESTR=1 ;; esac fi fi ]) # gl_FUNC_STRCASESTR_SIMPLE dnl Additionally, check that strcasestr is efficient. AC_DEFUN([gl_FUNC_STRCASESTR], [ AC_REQUIRE([gl_FUNC_STRCASESTR_SIMPLE]) if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then AC_CACHE_CHECK([whether strcasestr works in linear time], [gl_cv_func_strcasestr_linear], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include /* for signal */ #include /* for strcasestr */ #include /* for malloc */ #include /* for alarm */ static void quit (int sig) { _exit (sig + 128); } ]], [[ int result = 0; size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 2); char *needle = (char *) malloc (m + 2); /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack strcasestr. */ signal (SIGALRM, quit); alarm (5); /* Check for quadratic performance. */ if (haystack && needle) { memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; haystack[2 * m + 1] = 0; memset (needle, 'A', m); needle[m] = 'B'; needle[m + 1] = 0; if (!strcasestr (haystack, needle)) result |= 1; } /* Free allocated memory, in case some sanitizer is watching. */ free (haystack); free (needle); return result; ]])], [gl_cv_func_strcasestr_linear=yes], [gl_cv_func_strcasestr_linear=no], [dnl Only glibc > 2.12 and cygwin > 1.7.7 are known to have a dnl strcasestr that works in linear time. AC_EGREP_CPP([Lucky user], [ #include #ifdef __GNU_LIBRARY__ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ && !defined __UCLIBC__ Lucky user #endif #endif #ifdef __CYGWIN__ #include #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) Lucky user #endif #endif ], [gl_cv_func_strcasestr_linear="guessing yes"], [gl_cv_func_strcasestr_linear="guessing no"]) ]) ]) case "$gl_cv_func_strcasestr_linear" in *yes) ;; *) REPLACE_STRCASESTR=1 ;; esac fi ]) # gl_FUNC_STRCASESTR # Prerequisites of lib/strcasestr.c. AC_DEFUN([gl_PREREQ_STRCASESTR], [ : ]) pspp-1.0.1/gl/m4/sys_select_h.m40000644000175000017500000000671613124536242013300 00000000000000# sys_select_h.m4 serial 20 dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HEADER_SYS_SELECT], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_select_h_selfcontained], [ dnl Test against two bugs: dnl 1. On many platforms, assumes prior inclusion of dnl . dnl 2. On OSF/1 4.0, provides only a forward declaration dnl of 'struct timeval', and no definition of this type. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct timeval b;]])], [gl_cv_header_sys_select_h_selfcontained=yes], [gl_cv_header_sys_select_h_selfcontained=no]) dnl Test against another bug: dnl 3. On Solaris 10, provides an FD_ZERO implementation dnl that relies on memset(), but without including . if test $gl_cv_header_sys_select_h_selfcontained = yes; then AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[int memset; int bzero;]]) ], [AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[ #undef memset #define memset nonexistent_memset extern #ifdef __cplusplus "C" #endif void *memset (void *, int, unsigned long); #undef bzero #define bzero nonexistent_bzero extern #ifdef __cplusplus "C" #endif void bzero (void *, unsigned long); fd_set fds; FD_ZERO (&fds); ]]) ], [], [gl_cv_header_sys_select_h_selfcontained=no]) ]) fi ]) dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([sys/select.h]) if test $ac_cv_header_sys_select_h = yes; then HAVE_SYS_SELECT_H=1 else HAVE_SYS_SELECT_H=0 fi AC_SUBST([HAVE_SYS_SELECT_H]) gl_PREREQ_SYS_H_WINSOCK2 dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Some systems require prerequisite headers. */ #include #if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H # include #endif #include ]], [pselect select]) ]) AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS], [ GNULIB_PSELECT=0; AC_SUBST([GNULIB_PSELECT]) GNULIB_SELECT=0; AC_SUBST([GNULIB_SELECT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_PSELECT=1; AC_SUBST([HAVE_PSELECT]) REPLACE_PSELECT=0; AC_SUBST([REPLACE_PSELECT]) REPLACE_SELECT=0; AC_SUBST([REPLACE_SELECT]) ]) pspp-1.0.1/gl/m4/setenv.m40000644000175000017500000001101213124536242012101 00000000000000# setenv.m4 serial 26 dnl Copyright (C) 2001-2004, 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SETENV], [ AC_REQUIRE([gl_FUNC_SETENV_SEPARATE]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles if test $ac_cv_func_setenv = no; then HAVE_SETENV=0 else AC_CACHE_CHECK([whether setenv validates arguments], [gl_cv_func_setenv_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include ]], [[ int result = 0; { if (setenv ("", "", 0) != -1) result |= 1; else if (errno != EINVAL) result |= 2; } { if (setenv ("a", "=", 1) != 0) result |= 4; else if (strcmp (getenv ("a"), "=") != 0) result |= 8; } return result; ]])], [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_setenv_works="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_setenv_works="guessing no" ;; esac ])]) case "$gl_cv_func_setenv_works" in *yes) ;; *) REPLACE_SETENV=1 ;; esac fi ]) # Like gl_FUNC_SETENV, except prepare for separate compilation # (no REPLACE_SETENV, no AC_LIBOBJ). AC_DEFUN([gl_FUNC_SETENV_SEPARATE], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([setenv]) if test $ac_cv_have_decl_setenv = no; then HAVE_DECL_SETENV=0 fi AC_CHECK_FUNCS_ONCE([setenv]) gl_PREREQ_SETENV ]) AC_DEFUN([gl_FUNC_UNSETENV], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_DECLS_ONCE([unsetenv]) if test $ac_cv_have_decl_unsetenv = no; then HAVE_DECL_UNSETENV=0 fi AC_CHECK_FUNCS([unsetenv]) if test $ac_cv_func_unsetenv = no; then HAVE_UNSETENV=0 else HAVE_UNSETENV=1 dnl Some BSDs return void, failing to do error checking. AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #undef _BSD #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */ #include extern #ifdef __cplusplus "C" #endif int unsetenv (const char *name); ]], [[]])], [gt_cv_func_unsetenv_ret='int'], [gt_cv_func_unsetenv_ret='void'])]) if test $gt_cv_func_unsetenv_ret = 'void'; then AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void instead of int.]) REPLACE_UNSETENV=1 fi dnl Solaris 10 unsetenv does not remove all copies of a name. dnl Haiku alpha 2 unsetenv gets confused by assignment to environ. dnl OpenBSD 4.7 unsetenv("") does not fail. AC_CACHE_CHECK([whether unsetenv obeys POSIX], [gl_cv_func_unsetenv_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include extern char **environ; ]], [[ char entry1[] = "a=1"; char entry2[] = "b=2"; char *env[] = { entry1, entry2, NULL }; if (putenv ((char *) "a=1")) return 1; if (putenv (entry2)) return 2; entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 3; if (!unsetenv ("") || errno != EINVAL) return 4; entry2[0] = 'b'; environ = env; if (!getenv ("a")) return 5; entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 6; ]])], [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_unsetenv_works="guessing no" ;; esac ])]) case "$gl_cv_func_unsetenv_works" in *yes) ;; *) REPLACE_UNSETENV=1 ;; esac fi ]) # Prerequisites of lib/setenv.c. AC_DEFUN([gl_PREREQ_SETENV], [ AC_REQUIRE([AC_FUNC_ALLOCA]) AC_REQUIRE([gl_ENVIRON]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_HEADERS([search.h]) AC_CHECK_FUNCS([tsearch]) ]) # Prerequisites of lib/unsetenv.c. AC_DEFUN([gl_PREREQ_UNSETENV], [ AC_REQUIRE([gl_ENVIRON]) AC_CHECK_HEADERS_ONCE([unistd.h]) ]) pspp-1.0.1/gl/m4/round.m40000644000175000017500000001201513132510757011732 00000000000000# round.m4 serial 18 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ROUND], [ m4_divert_text([DEFAULTS], [gl_round_required=plain]) AC_REQUIRE([gl_MATH_H_DEFAULTS]) dnl Persuade glibc to declare round(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) gl_CHECK_MATH_LIB([ROUND_LIBM], [x = round (x);], [extern #ifdef __cplusplus "C" #endif double round (double); ]) if test "$ROUND_LIBM" != missing; then HAVE_ROUND=1 dnl Also check whether it's declared. dnl IRIX 6.5 has round() in libm but doesn't declare it in . AC_CHECK_DECLS([round], , [HAVE_DECL_ROUND=0], [[#include ]]) dnl Test whether round() produces correct results. On NetBSD 3.0, for dnl x = 1/2 - 2^-54, the system's round() returns a wrong result. AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether round works], [gl_cv_func_round_works], [ save_LIBS="$LIBS" LIBS="$LIBS $ROUND_LIBM" AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include extern #ifdef __cplusplus "C" #endif double round (double); #ifdef _MSC_VER # pragma fenv_access (off) #endif int main() { /* 2^DBL_MANT_DIG. */ static const double TWO_MANT_DIG = /* Assume DBL_MANT_DIG <= 5 * 31. Use the identity n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5). */ (double) (1U << (DBL_MANT_DIG / 5)) * (double) (1U << ((DBL_MANT_DIG + 1) / 5)) * (double) (1U << ((DBL_MANT_DIG + 2) / 5)) * (double) (1U << ((DBL_MANT_DIG + 3) / 5)) * (double) (1U << ((DBL_MANT_DIG + 4) / 5)); volatile double x = 0.5 - 0.5 / TWO_MANT_DIG; return (x < 0.5 && round (x) != 0.0); }]])], [gl_cv_func_round_works=yes], [gl_cv_func_round_works=no], [case "$host_os" in netbsd* | aix*) gl_cv_func_round_works="guessing no" ;; # Guess yes on MSVC, no on mingw. mingw*) AC_EGREP_CPP([Known], [ #ifdef _MSC_VER Known #endif ], [gl_cv_func_round_works="guessing yes"], [gl_cv_func_round_works="guessing no"]) ;; *) gl_cv_func_round_works="guessing yes" ;; esac ]) LIBS="$save_LIBS" ]) case "$gl_cv_func_round_works" in *no) REPLACE_ROUND=1 ;; esac m4_ifdef([gl_FUNC_ROUND_IEEE], [ if test $gl_round_required = ieee && test $REPLACE_ROUND = 0; then AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether round works according to ISO C 99 with IEC 60559], [gl_cv_func_round_ieee], [ save_LIBS="$LIBS" LIBS="$LIBS $ROUND_LIBM" AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include extern #ifdef __cplusplus "C" #endif double round (double); ]gl_DOUBLE_MINUS_ZERO_CODE[ ]gl_DOUBLE_SIGNBIT_CODE[ static double dummy (double f) { return 0; } int main (int argc, char *argv[]) { double (*my_round) (double) = argc ? round : dummy; /* Test whether round (-0.0) is -0.0. */ if (signbitd (minus_zerod) && !signbitd (my_round (minus_zerod))) return 1; return 0; } ]])], [gl_cv_func_round_ieee=yes], [gl_cv_func_round_ieee=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_round_ieee="guessing yes" ;; # Guess yes on MSVC, no on mingw. mingw*) AC_EGREP_CPP([Known], [ #ifdef _MSC_VER Known #endif ], [gl_cv_func_round_ieee="guessing yes"], [gl_cv_func_round_ieee="guessing no"]) ;; # If we don't know, assume the worst. *) gl_cv_func_round_ieee="guessing no" ;; esac ]) LIBS="$save_LIBS" ]) case "$gl_cv_func_round_ieee" in *yes) ;; *) REPLACE_ROUND=1 ;; esac fi ]) else HAVE_ROUND=0 HAVE_DECL_ROUND=0 fi if test $HAVE_ROUND = 0 || test $REPLACE_ROUND = 1; then dnl Find libraries needed to link lib/round.c. gl_FUNC_FLOOR_LIBS gl_FUNC_CEIL_LIBS ROUND_LIBM= dnl Append $FLOOR_LIBM to ROUND_LIBM, avoiding gratuitous duplicates. case " $ROUND_LIBM " in *" $FLOOR_LIBM "*) ;; *) ROUND_LIBM="$ROUND_LIBM $FLOOR_LIBM" ;; esac dnl Append $CEIL_LIBM to ROUND_LIBM, avoiding gratuitous duplicates. case " $ROUND_LIBM " in *" $CEIL_LIBM "*) ;; *) ROUND_LIBM="$ROUND_LIBM $CEIL_LIBM" ;; esac fi AC_SUBST([ROUND_LIBM]) ]) pspp-1.0.1/gl/m4/inttypes_h.m40000644000175000017500000000177413124536242013001 00000000000000# inttypes_h.m4 serial 10 dnl Copyright (C) 1997-2004, 2006, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([gl_AC_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[uintmax_t i = (uintmax_t) -1; return !i;]])], [gl_cv_header_inttypes_h=yes], [gl_cv_header_inttypes_h=no])]) if test $gl_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) pspp-1.0.1/gl/m4/vsnprintf.m40000644000175000017500000000362113124536242012635 00000000000000# vsnprintf.m4 serial 7 dnl Copyright (C) 2002-2004, 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Libintl 0.17 will replace vsnprintf only if it does not support %1$s, dnl but defers to any gnulib vsnprintf replacements. Therefore, gnulib dnl must guarantee that the decision for replacing vsnprintf is a superset dnl of the reasons checked by libintl. AC_DEFUN([gl_FUNC_VSNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_cv_func_vsnprintf_usable=no AC_CHECK_FUNCS([vsnprintf]) if test $ac_cv_func_vsnprintf = yes; then gl_SNPRINTF_SIZE1 case "$gl_cv_func_snprintf_size1" in *yes) gl_SNPRINTF_RETVAL_C99 case "$gl_cv_func_snprintf_retval_c99" in *yes) gl_PRINTF_POSITIONS case "$gl_cv_func_printf_positions" in *yes) gl_cv_func_vsnprintf_usable=yes ;; esac ;; esac ;; esac fi if test $gl_cv_func_vsnprintf_usable = no; then gl_REPLACE_VSNPRINTF fi AC_CHECK_DECLS_ONCE([vsnprintf]) if test $ac_cv_have_decl_vsnprintf = no; then HAVE_DECL_VSNPRINTF=0 fi ]) AC_DEFUN([gl_REPLACE_VSNPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([vsnprintf]) if test $ac_cv_func_vsnprintf = yes; then REPLACE_VSNPRINTF=1 else AC_CHECK_DECLS_ONCE([vsnprintf]) if test $ac_cv_have_decl_vsnprintf = yes; then dnl If the function is declared but does not appear to exist, it may be dnl defined as an inline function. In order to avoid a conflict, we have dnl to define rpl_vsnprintf, not vsnprintf. REPLACE_VSNPRINTF=1 fi fi gl_PREREQ_VSNPRINTF ]) # Prerequisites of lib/vsnprintf.c. AC_DEFUN([gl_PREREQ_VSNPRINTF], [:]) pspp-1.0.1/gl/m4/safe-read.m40000644000175000017500000000063113124536242012431 00000000000000# safe-read.m4 serial 6 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Prerequisites of lib/safe-read.c. AC_DEFUN([gl_PREREQ_SAFE_READ], [ AC_REQUIRE([gt_TYPE_SSIZE_T]) ]) pspp-1.0.1/gl/m4/gnulib-common.m40000644000175000017500000004277413124536242013366 00000000000000# gnulib-common.m4 serial 38 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_COMMON # is expanded unconditionally through gnulib-tool magic. AC_DEFUN([gl_COMMON], [ dnl Use AC_REQUIRE here, so that the code is expanded once only. AC_REQUIRE([gl_00GNULIB]) AC_REQUIRE([gl_COMMON_BODY]) ]) AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([_Noreturn], [/* The _Noreturn keyword of C11. */ #if ! (defined _Noreturn \ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif #endif ]) AH_VERBATIM([isoc99_inline], [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for Mac OS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif]) AH_VERBATIM([unused_parameter], [/* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED /* gcc supports the "unused" attribute on possibly unused labels, and g++ has since version 4.5. Note to support C++ as well as C, _GL_UNUSED_LABEL should be used with a trailing ; */ #if !defined __cplusplus || __GNUC__ > 4 \ || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) # define _GL_UNUSED_LABEL _GL_UNUSED #else # define _GL_UNUSED_LABEL #endif /* The __pure__ attribute was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* The __const__ attribute was added in gcc 2.95. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) #else # define _GL_ATTRIBUTE_CONST /* empty */ #endif ]) dnl Preparation for running test programs: dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not dnl to /dev/tty, so they can be redirected to log files. Such diagnostics dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ ]) # gl_MODULE_INDICATOR_CONDITION # expands to a C preprocessor expression that evaluates to 1 or 0, depending # whether a gnulib module that has been requested shall be considered present # or not. m4_define([gl_MODULE_INDICATOR_CONDITION], [1]) # gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) # sets the shell variable that indicates the presence of the given module to # a C preprocessor expression that will evaluate to 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], [ gl_MODULE_INDICATOR_SET_VARIABLE_AUX( [GNULIB_[]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], [gl_MODULE_INDICATOR_CONDITION]) ]) # gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable]) # modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION. # The shell variable's value is a C preprocessor expression that evaluates # to 0 or 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX], [ m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1], [ dnl Simplify the expression VALUE || 1 to 1. $1=1 ], [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1], [gl_MODULE_INDICATOR_CONDITION])]) ]) # gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition]) # modifies the shell variable to include the given condition. The shell # variable's value is a C preprocessor expression that evaluates to 0 or 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR], [ dnl Simplify the expression 1 || CONDITION to 1. if test "$[]$1" != 1; then dnl Simplify the expression 0 || CONDITION to CONDITION. if test "$[]$1" = 0; then $1=$2 else $1="($[]$1 || $2)" fi fi ]) # gl_MODULE_INDICATOR([modulename]) # defines a C macro indicating the presence of the given module # in a location where it can be used. # | Value | Value | # | in lib/ | in tests/ | # --------------------------------------------+---------+-----------+ # Module present among main modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module present among tests-related modules: | 0 | 1 | # --------------------------------------------+---------+-----------+ # Module not present at all: | 0 | 0 | # --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR], [ AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [gl_MODULE_INDICATOR_CONDITION], [Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module $1 shall be considered present.]) ]) # gl_MODULE_INDICATOR_FOR_TESTS([modulename]) # defines a C macro indicating the presence of the given module # in lib or tests. This is useful to determine whether the module # should be tested. # | Value | Value | # | in lib/ | in tests/ | # --------------------------------------------+---------+-----------+ # Module present among main modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module present among tests-related modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module not present at all: | 0 | 0 | # --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [ AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], [Define to 1 when the gnulib module $1 should be tested.]) ]) # gl_ASSERT_NO_GNULIB_POSIXCHECK # asserts that there will never be a need to #define GNULIB_POSIXCHECK. # and thereby enables an optimization of configure and config.h. # Used by Emacs. AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], [ dnl Override gl_WARN_ON_USE_PREPARE. dnl But hide this definition from 'aclocal'. AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], []) ]) # gl_ASSERT_NO_GNULIB_TESTS # asserts that there will be no gnulib tests in the scope of the configure.ac # and thereby enables an optimization of config.h. # Used by Emacs. AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS], [ dnl Override gl_MODULE_INDICATOR_FOR_TESTS. AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) ]) # Test whether exists. # Set HAVE_FEATURES_H. AC_DEFUN([gl_FEATURES_H], [ AC_CHECK_HEADERS_ONCE([features.h]) if test $ac_cv_header_features_h = yes; then HAVE_FEATURES_H=1 else HAVE_FEATURES_H=0 fi AC_SUBST([HAVE_FEATURES_H]) ]) # m4_foreach_w # is a backport of autoconf-2.59c's m4_foreach_w. # Remove this macro when we can assume autoconf >= 2.60. m4_ifndef([m4_foreach_w], [m4_define([m4_foreach_w], [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) # AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) # ---------------------------------------------------- # Backport of autoconf-2.63b's macro. # Remove this macro when we can assume autoconf >= 2.64. m4_ifndef([AS_VAR_IF], [m4_define([AS_VAR_IF], [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) # gl_PROG_CC_C99 # Modifies the value of the shell variable CC in an attempt to make $CC # understand ISO C99 source code. # This is like AC_PROG_CC_C99, except that # - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60, # - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC # , # but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 # . # Remaining problems: # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options # to CC twice # . # - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. AC_DEFUN([gl_PROG_CC_C99], [ dnl Change that version number to the minimum Autoconf version that supports dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls. m4_version_prereq([9.0], [AC_REQUIRE([AC_PROG_CC_C99])], [AC_REQUIRE([AC_PROG_CC_STDC])]) ]) # gl_PROG_AR_RANLIB # Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. # The user can set the variables AR, ARFLAGS, RANLIB if he wants to override # the values. AC_DEFUN([gl_PROG_AR_RANLIB], [ dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler dnl as "cc", and GCC as "gcc". They have different object file formats and dnl library formats. In particular, the GNU binutils programs ar and ranlib dnl produce libraries that work only with gcc, not with cc. AC_REQUIRE([AC_PROG_CC]) dnl The '][' hides this use from 'aclocal'. AC_BEFORE([$0], [A][M_PROG_AR]) AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], [ AC_EGREP_CPP([Amsterdam], [ #ifdef __ACK__ Amsterdam #endif ], [gl_cv_c_amsterdam_compiler=yes], [gl_cv_c_amsterdam_compiler=no]) ]) dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not dnl building with __ACK__. if test $gl_cv_c_amsterdam_compiler = yes; then if test -z "$AR"; then AR='cc -c.a' fi if test -z "$ARFLAGS"; then ARFLAGS='-o' fi else dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST dnl ARFLAGS variable (it is filed into Makefile.in directly by automake dnl script on-demand, if not specified by ./configure of course). dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block dnl because AM_PROG_AR is written so it could re-set AR variable even for dnl __ACK__. It may seem like its easier to avoid calling the macro here, dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good dnl default value and automake should usually know them). dnl dnl The '][' hides this use from 'aclocal'. m4_ifdef([A][M_PROG_AR], [A][M_PROG_AR], [:]) fi dnl In case the code above has not helped with setting AR/ARFLAGS, use dnl Automake-documented default values for AR and ARFLAGS, but prefer dnl ${host}-ar over ar (useful for cross-compiling). AC_CHECK_TOOL([AR], [ar], [ar]) if test -z "$ARFLAGS"; then ARFLAGS='cr' fi AC_SUBST([AR]) AC_SUBST([ARFLAGS]) if test -z "$RANLIB"; then if test $gl_cv_c_amsterdam_compiler = yes; then RANLIB=':' else dnl Use the ranlib program if it is available. AC_PROG_RANLIB fi fi AC_SUBST([RANLIB]) ]) # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix # for interoperability with automake-1.9.6 from autoconf-2.62. # Remove this macro when we can assume autoconf >= 2.62 or # autoconf >= 2.60 && automake >= 1.10. # AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness. m4_ifndef([AC_AUTOCONF_VERSION],[ m4_ifdef([AC_PROG_MKDIR_P], [ dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. m4_define([AC_PROG_MKDIR_P], m4_defn([AC_PROG_MKDIR_P])[ AC_SUBST([MKDIR_P])])], [ dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. AC_DEFUN_ONCE([AC_PROG_MKDIR_P], [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' AC_SUBST([MKDIR_P])])]) ]) # AC_C_RESTRICT # This definition is copied from post-2.69 Autoconf and overrides the # AC_C_RESTRICT macro from autoconf 2.60..2.69. It can be removed # once autoconf >= 2.70 can be assumed. It's painful to check version # numbers, and in practice this macro is more up-to-date than Autoconf # is, so override Autoconf unconditionally. AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[typedef int *int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ int bar (int ip[$ac_kw]) { return ip[0]; } ]], [[int s[1]; int *$ac_kw t = s; t[0] = 0; return foo (t) + bar (t); ]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done ]) AH_VERBATIM([restrict], [/* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE([restrict], []) ;; *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac ])# AC_C_RESTRICT # gl_BIGENDIAN # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. # Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some # macros invoke AC_C_BIGENDIAN with arguments. AC_DEFUN([gl_BIGENDIAN], [ AC_C_BIGENDIAN ]) # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not # output a spurious "(cached)" mark in the midst of other configure output. # This macro should be used instead of AC_CACHE_VAL when it is not surrounded # by an AC_MSG_CHECKING/AC_MSG_RESULT pair. AC_DEFUN([gl_CACHE_VAL_SILENT], [ saved_as_echo_n="$as_echo_n" as_echo_n=':' AC_CACHE_VAL([$1], [$2]) as_echo_n="$saved_as_echo_n" ]) # AS_VAR_COPY was added in autoconf 2.63b m4_define_default([AS_VAR_COPY], [AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) # AC_PROG_SED was added in autoconf 2.59b m4_ifndef([AC_PROG_SED], [AC_DEFUN([AC_PROG_SED], [AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED, [dnl ac_script should not contain more than 99 commands (for HP-UX sed), dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed. 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]) if test -z "$SED"; then ac_path_SED_found=false _AS_PATH_WALK([], [ 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" AS_EXECUTABLE_P(["$ac_path_SED"]) || continue 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 echo >> conftest.nl "$ac_path_SED" -f conftest.sed 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 so far, but keep looking for better ac_cv_path_SED=$ac_path_SED ac_path_SED_max=$ac_count fi 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]) if test -z "$ac_cv_path_SED"; then AC_ERROR([no acceptable sed could be found in \$PATH]) fi else ac_cv_path_SED=$SED fi ]) SED="$ac_cv_path_SED" AC_SUBST([SED])dnl rm -f conftest.sed ]) ]) pspp-1.0.1/gl/m4/vasprintf-posix.m40000644000175000017500000001030213124536242013752 00000000000000# vasprintf-posix.m4 serial 13 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VASPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_vasprintf_posix=no AC_CHECK_FUNCS([vasprintf]) case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) if test $ac_cv_func_vasprintf = yes; then # vasprintf exists and is # already POSIX compliant. gl_cv_func_vasprintf_posix=yes fi ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac if test $gl_cv_func_vasprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_VASPRINTF fi ]) pspp-1.0.1/gl/m4/mbrtowc.m40000644000175000017500000004776513132510756012303 00000000000000# mbrtowc.m4 serial 29 -*- coding: utf-8 -*- dnl Copyright (C) 2001-2002, 2004-2005, 2008-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBRTOWC], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 AC_CHECK_DECLS([mbrtowc],,, [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]]) if test $ac_cv_have_decl_mbrtowc = yes; then dnl On Minix 3.1.8, the system's declares mbrtowc() although dnl it does not have the function. Avoid a collision with gnulib's dnl replacement. REPLACE_MBRTOWC=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 else gl_MBRTOWC_NULL_ARG1 gl_MBRTOWC_NULL_ARG2 gl_MBRTOWC_RETVAL gl_MBRTOWC_NUL_RETVAL gl_MBRTOWC_EMPTY_INPUT gl_MBRTOWC_C_LOCALE case "$gl_cv_func_mbrtowc_null_arg1" in *yes) ;; *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1], [Define if the mbrtowc function has the NULL pwc argument bug.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_null_arg2" in *yes) ;; *) AC_DEFINE([MBRTOWC_NULL_ARG2_BUG], [1], [Define if the mbrtowc function has the NULL string argument bug.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_retval" in *yes) ;; *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], [Define if the mbrtowc function returns a wrong return value.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_nul_retval" in *yes) ;; *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1], [Define if the mbrtowc function does not return 0 for a NUL character.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_empty_input" in *yes) ;; *) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1], [Define if the mbrtowc function does not return (size_t) -2 for empty input.]) REPLACE_MBRTOWC=1 ;; esac case $gl_cv_C_locale_sans_EILSEQ in *yes) ;; *) AC_DEFINE([C_LOCALE_MAYBE_EILSEQ], [1], [Define to 1 if the C locale may have encoding errors.]) REPLACE_MBRTOWC=1 ;; esac fi fi ]) dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that dnl redefines the semantics of the given mbstate_t type. dnl Result is REPLACE_MBSTATE_T. dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to dnl avoid inconsistencies. AC_DEFUN([gl_MBSTATE_T_BROKEN], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_FUNCS_ONCE([mbsinit]) AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then gl_MBRTOWC_INCOMPLETE_STATE gl_MBRTOWC_SANITYCHECK REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi ]) dnl Test whether mbrtowc puts the state into non-initial state when parsing an dnl incomplete multibyte character. dnl Result is gl_cv_func_mbrtowc_incomplete_state. AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles incomplete characters], [gl_cv_func_mbrtowc_incomplete_state], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on AIX and OSF/1. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_JA != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 2; } return 0; }]])], [gl_cv_func_mbrtowc_incomplete_state=yes], [gl_cv_func_mbrtowc_incomplete_state=no], [:]) fi ]) ]) dnl Test whether mbrtowc works not worse than mbtowc. dnl Result is gl_cv_func_mbrtowc_sanitycheck. AC_DEFUN([gl_MBRTOWC_SANITYCHECK], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc], [gl_cv_func_mbrtowc_sanitycheck], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_ZH_CN != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 2; } return 0; }]])], [gl_cv_func_mbrtowc_sanitycheck=yes], [gl_cv_func_mbrtowc_sanitycheck=no], [:]) fi ]) ]) dnl Test whether mbrtowc supports a NULL pwc argument correctly. dnl Result is gl_cv_func_mbrtowc_null_arg1. AC_DEFUN([gl_MBRTOWC_NULL_ARG1], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles a NULL pwc argument], [gl_cv_func_mbrtowc_null_arg1], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris. solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR_UTF8 != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "\303\237er"; mbstate_t state; wchar_t wc; size_t ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 5, &state); if (ret != 2) result |= 1; if (!mbsinit (&state)) result |= 2; memset (&state, '\0', sizeof (mbstate_t)); ret = mbrtowc (NULL, input, 5, &state); if (ret != 2) /* Solaris 7 fails here: ret is -1. */ result |= 4; if (!mbsinit (&state)) result |= 8; } return result; }]])], [gl_cv_func_mbrtowc_null_arg1=yes], [gl_cv_func_mbrtowc_null_arg1=no], [:]) fi ]) ]) dnl Test whether mbrtowc supports a NULL string argument correctly. dnl Result is gl_cv_func_mbrtowc_null_arg2. AC_DEFUN([gl_MBRTOWC_NULL_ARG2], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument], [gl_cv_func_mbrtowc_null_arg2], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on OSF/1. osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR_UTF8 != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { mbstate_t state; wchar_t wc; int ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; mbrtowc (&wc, NULL, 5, &state); /* Check that wc was not modified. */ if (wc != (wchar_t) 0xBADFACE) return 2; } return 0; }]])], [gl_cv_func_mbrtowc_null_arg2=yes], [gl_cv_func_mbrtowc_null_arg2=no], [:]) fi ]) ]) dnl Test whether mbrtowc, when parsing the end of a multibyte character, dnl correctly returns the number of bytes that were needed to complete the dnl character (not the total number of bytes of the multibyte character). dnl Result is gl_cv_func_mbrtowc_retval. AC_DEFUN([gl_MBRTOWC_RETVAL], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether mbrtowc has a correct return value], [gl_cv_func_mbrtowc_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on HP-UX, Solaris, native Windows. hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ || { case "$host_os" in mingw*) true;; *) false;; esac; }; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; int found_some_locale = 0; /* This fails on Solaris. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "B\303\274\303\237er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 1) result |= 1; } found_some_locale = 1; } /* This fails on HP-UX 11.11. */ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 2) result |= 2; } found_some_locale = 1; } /* This fails on native Windows. */ if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) { char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 4; } found_some_locale = 1; } if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) { char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 8; } found_some_locale = 1; } if (setlocale (LC_ALL, "Chinese_China.936") != NULL) { char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 16; } found_some_locale = 1; } return (found_some_locale ? result : 77); }]])], [gl_cv_func_mbrtowc_retval=yes], [if test $? != 77; then gl_cv_func_mbrtowc_retval=no fi ], [:]) fi ]) ]) dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0. dnl Result is gl_cv_func_mbrtowc_nul_retval. AC_DEFUN([gl_MBRTOWC_NUL_RETVAL], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character], [gl_cv_func_mbrtowc_nul_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris 8 and 9. solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_ZH_CN != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8 and 9. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, "", 1, &state) != 0) return 2; } return 0; }]])], [gl_cv_func_mbrtowc_nul_retval=yes], [gl_cv_func_mbrtowc_nul_retval=no], [:]) fi ]) ]) dnl Test whether mbrtowc returns the correct value on empty input. AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc works on empty input], [gl_cv_func_mbrtowc_empty_input], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on AIX and glibc systems. aix* | *-gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; # Guess yes on native Windows. mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; esac changequote([,])dnl AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include static wchar_t wc; static mbstate_t mbs; int main (void) { return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2; }]])], [gl_cv_func_mbrtowc_empty_input=yes], [gl_cv_func_mbrtowc_empty_input=no], [:]) ]) ]) dnl Test whether mbrtowc reports encoding errors in the C locale. dnl Although POSIX was never intended to allow this, the GNU C Library dnl and other implementations do it. See: dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932 AC_DEFUN([gl_MBRTOWC_C_LOCALE], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether the C locale is free of encoding errors], [gl_cv_C_locale_sans_EILSEQ], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. gl_cv_C_locale_sans_EILSEQ="guessing no" AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include ]], [[ int i; char *locale = setlocale (LC_ALL, "C"); if (! locale) return 2; for (i = CHAR_MIN; i <= CHAR_MAX; i++) { char c = i; wchar_t wc; mbstate_t mbs = { 0, }; size_t ss = mbrtowc (&wc, &c, 1, &mbs); if (1 < ss) return 3; } return 0; ]])], [gl_cv_C_locale_sans_EILSEQ=yes], [gl_cv_C_locale_sans_EILSEQ=no], [case "$host_os" in # Guess yes on native Windows. mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;; esac ]) ]) ]) # Prerequisites of lib/mbrtowc.c. AC_DEFUN([gl_PREREQ_MBRTOWC], [ : ]) dnl From Paul Eggert dnl This is an override of an autoconf macro. AC_DEFUN([AC_FUNC_MBRTOWC], [ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], [gl_cv_func_mbrtowc], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[/* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]], [[wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], [gl_cv_func_mbrtowc=yes], [gl_cv_func_mbrtowc=no])]) if test $gl_cv_func_mbrtowc = yes; then AC_DEFINE([HAVE_MBRTOWC], [1], [Define to 1 if mbrtowc and mbstate_t are properly declared.]) fi ]) pspp-1.0.1/gl/m4/lock.m40000644000175000017500000000303713124536242011535 00000000000000# lock.m4 serial 14 dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([gl_LOCK], [ AC_REQUIRE([gl_THREADLIB]) if test "$gl_threads_api" = posix; then # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the # pthread_rwlock_* functions. has_rwlock=false AC_CHECK_TYPE([pthread_rwlock_t], [has_rwlock=true AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], [Define if the POSIX multithreading library has read/write locks.])], [], [#include ]) if $has_rwlock; then gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER fi # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( [[#include ]], [[ #if __FreeBSD__ == 4 error "No, in FreeBSD 4.0 recursive mutexes actually don't work." #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." #else int x = (int)PTHREAD_MUTEX_RECURSIVE; return !x; #endif ]])], [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) fi gl_PREREQ_LOCK ]) # Prerequisites of lib/glthread/lock.c. AC_DEFUN([gl_PREREQ_LOCK], [:]) pspp-1.0.1/gl/m4/check-math-lib.m40000644000175000017500000000205013124536242013347 00000000000000# check-math-lib.m4 serial 4 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl gl_CHECK_MATH_LIB (VARIABLE, EXPRESSION [, EXTRA-CODE]) dnl dnl Sets the shell VARIABLE according to the libraries needed by EXPRESSION dnl to compile and link: to the empty string if no extra libraries are needed, dnl to "-lm" if -lm is needed, or to "missing" if it does not compile and dnl link either way. dnl dnl Example: gl_CHECK_MATH_LIB([ROUNDF_LIBM], [x = roundf (x);]) AC_DEFUN([gl_CHECK_MATH_LIB], [ save_LIBS=$LIBS $1=missing for libm in "" "-lm"; do LIBS="$save_LIBS $libm" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include $3 double x;]], [$2])], [$1=$libm break]) done LIBS=$save_LIBS ]) pspp-1.0.1/gl/m4/lseek.m40000644000175000017500000000436113124536242011711 00000000000000# lseek.m4 serial 10 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_LSEEK], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_CC]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe], [case "$host_os" in mingw*) dnl Native Windows. dnl The result of lseek (fd, (off_t)0, SEEK_CUR) or dnl SetFilePointer(handle, 0, NULL, FILE_CURRENT) dnl for a pipe depends on the environment: In a Cygwin 1.5 dnl environment it succeeds (wrong); in a Cygwin 1.7 environment dnl it fails with a wrong errno value. gl_cv_func_lseek_pipe=no ;; *) if test $cross_compiling = no; then AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include /* for off_t */ #include /* for SEEK_CUR */ #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include #endif ]], [[ /* Exit with success only if stdin is seekable. */ return lseek (0, (off_t)0, SEEK_CUR) < 0; ]])], [if test -s conftest$ac_exeext \ && ./conftest$ac_exeext < conftest.$ac_ext \ && test 1 = "`echo hi \ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then gl_cv_func_lseek_pipe=yes else gl_cv_func_lseek_pipe=no fi ], [gl_cv_func_lseek_pipe=no]) else AC_COMPILE_IFELSE( [AC_LANG_SOURCE([[ #if defined __BEOS__ /* BeOS mistakenly return 0 when trying to seek on pipes. */ Choke me. #endif]])], [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no]) fi ;; esac ]) if test $gl_cv_func_lseek_pipe = no; then REPLACE_LSEEK=1 AC_DEFINE([LSEEK_PIPE_BROKEN], [1], [Define to 1 if lseek does not detect pipes.]) fi AC_REQUIRE([gl_SYS_TYPES_H]) if test $WINDOWS_64_BIT_OFF_T = 1; then REPLACE_LSEEK=1 fi ]) pspp-1.0.1/gl/m4/isfinite.m40000644000175000017500000001217313132510756012421 00000000000000# isfinite.m4 serial 16 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_ISFINITE], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) dnl Persuade glibc to declare isfinite. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS([isfinite], , , [[#include ]]) if test "$ac_cv_have_decl_isfinite" = yes; then gl_CHECK_MATH_LIB([ISFINITE_LIBM], [x = isfinite (x) + isfinite ((float) x);]) if test "$ISFINITE_LIBM" != missing; then dnl Test whether isfinite() on 'long double' works. gl_ISFINITEL_WORKS case "$gl_cv_func_isfinitel_works" in *yes) ;; *) ISFINITE_LIBM=missing;; esac dnl Also, isfinite() on 'double' does not work on Linux/ia64 (because of dnl signalling NaNs). But this does not have to be tested, since dnl isfinite(long double) also does not work in this situation. fi fi if test "$ac_cv_have_decl_isfinite" != yes || test "$ISFINITE_LIBM" = missing; then REPLACE_ISFINITE=1 dnl No libraries are needed to link lib/isfinite.c. ISFINITE_LIBM= fi AC_SUBST([ISFINITE_LIBM]) ]) dnl Test whether isfinite() on 'long double' recognizes all canonical values dnl which are neither finite nor infinite. AC_DEFUN([gl_ISFINITEL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether isfinite(long double) works], [gl_cv_func_isfinitel_works], [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; long double value; } memory_long_double; /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the runtime type conversion. */ #ifdef __sgi static long double NaNl () { double zero = 0.0; return zero / zero; } #else # define NaNl() (0.0L / 0.0L) #endif int main () { int result = 0; { memory_long_double m; unsigned int i; /* The isfinite macro should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit (since the exponent never extends to bit 31). */ m.value = NaNl (); m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); for (i = 0; i < NWORDS; i++) m.word[i] |= 1; if (isfinite (m.value)) result |= 1; } #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (isfinite (x.value)) result |= 2; } { /* Signalling NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (isfinite (x.value)) result |= 2; } /* isfinite should return something even for noncanonical values. */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (isfinite (x.value) && !isfinite (x.value)) result |= 4; } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (isfinite (x.value) && !isfinite (x.value)) result |= 8; } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (isfinite (x.value) && !isfinite (x.value)) result |= 16; } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (isfinite (x.value) && !isfinite (x.value)) result |= 32; } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (isfinite (x.value) && !isfinite (x.value)) result |= 64; } #endif return result; }]])], [gl_cv_func_isfinitel_works=yes], [gl_cv_func_isfinitel_works=no], [case "$host_os" in # Guess no on native Windows. mingw*) gl_cv_func_isfinitel_works="guessing no" ;; *) gl_cv_func_isfinitel_works="guessing yes" ;; esac ]) ]) ]) pspp-1.0.1/gl/m4/libunistring-base.m40000644000175000017500000001426013124536242014226 00000000000000# libunistring-base.m4 serial 5 dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paolo Bonzini and Bruno Haible. dnl gl_LIBUNISTRING_MODULE([VERSION], [Module]) dnl Declares that the source files of Module should be compiled, unless we dnl are linking with libunistring and its version is >= the given VERSION. dnl Defines an automake conditional LIBUNISTRING_COMPILE_$MODULE that is dnl true if the source files of Module should be compiled. dnl This macro is to be used for public libunistring API, not for dnl undocumented API. dnl dnl You have to bump the VERSION argument to the next projected version dnl number each time you make a change that affects the behaviour of the dnl functions defined in Module (even if the sources of Module itself do not dnl change). AC_DEFUN([gl_LIBUNISTRING_MODULE], [ AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from dnl gl_LIBUNISTRING_CORE if that macro has been run. AM_CONDITIONAL(AS_TR_CPP([LIBUNISTRING_COMPILE_$2]), [gl_LIBUNISTRING_VERSION_CMP([$1])]) ]) dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile]) dnl Declares that HeaderFile should be created, unless we are linking dnl with libunistring and its version is >= the given VERSION. dnl HeaderFile should be relative to the lib directory and end in '.h'. dnl Prepares for substituting LIBUNISTRING_HEADERFILE (to HeaderFile or empty). dnl dnl When we are linking with the already installed libunistring and its version dnl is < VERSION, we create HeaderFile here, because we may compile functions dnl (via gl_LIBUNISTRING_MODULE above) that are not contained in the installed dnl version. dnl When we are linking with the already installed libunistring and its version dnl is > VERSION, we don't create HeaderFile here: it could cause compilation dnl errors in other libunistring header files if some types are missing. dnl dnl You have to bump the VERSION argument to the next projected version dnl number each time you make a non-comment change to the HeaderFile. AC_DEFUN([gl_LIBUNISTRING_LIBHEADER], [ AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from dnl gl_LIBUNISTRING_CORE if that macro has been run. if gl_LIBUNISTRING_VERSION_CMP([$1]); then LIBUNISTRING_[]AS_TR_CPP([$2])='$2' else LIBUNISTRING_[]AS_TR_CPP([$2])= fi AC_SUBST([LIBUNISTRING_]AS_TR_CPP([$2])) ]) dnl Miscellaneous preparations/initializations. AC_DEFUN([gl_LIBUNISTRING_LIB_PREPARE], [ dnl Ensure that HAVE_LIBUNISTRING is fully determined at this point. m4_ifdef([gl_LIBUNISTRING], [AC_REQUIRE([gl_LIBUNISTRING])]) AC_REQUIRE([AC_PROG_AWK]) dnl Sed expressions to extract the parts of a version number. changequote(,) gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} i\ 0 q ' gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} i\ 0 q ' gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} i\ 0 q ' changequote([,]) if test "$HAVE_LIBUNISTRING" = yes; then LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` fi ]) dnl gl_LIBUNISTRING_VERSION_CMP([VERSION]) dnl Expands to a shell statement that evaluates to true if LIBUNISTRING_VERSION dnl is less than the VERSION argument. AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP], [ { test "$HAVE_LIBUNISTRING" != yes \ || { dnl AS_LITERAL_IF exists and works fine since autoconf-2.59 at least. AS_LITERAL_IF([$1], [dnl This is the optimized variant, that assumes the argument is a literal: m4_pushdef([requested_version_major], [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^\([0-9]*\).*], [\1]), [])]) m4_pushdef([requested_version_minor], [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.]\([0-9]*\).*], [\1]), [$1])]) m4_pushdef([requested_version_subminor], [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.][0-9]*[.]\([0-9]*\).*], [\1]), [$1])]) test $LIBUNISTRING_VERSION_MAJOR -lt requested_version_major \ || { test $LIBUNISTRING_VERSION_MAJOR -eq requested_version_major \ && { test $LIBUNISTRING_VERSION_MINOR -lt requested_version_minor \ || { test $LIBUNISTRING_VERSION_MINOR -eq requested_version_minor \ && test $LIBUNISTRING_VERSION_SUBMINOR -lt requested_version_subminor } } } m4_popdef([requested_version_subminor]) m4_popdef([requested_version_minor]) m4_popdef([requested_version_major]) ], [dnl This is the unoptimized variant: requested_version_major=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_major"` requested_version_minor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_minor"` requested_version_subminor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_subminor"` test $LIBUNISTRING_VERSION_MAJOR -lt $requested_version_major \ || { test $LIBUNISTRING_VERSION_MAJOR -eq $requested_version_major \ && { test $LIBUNISTRING_VERSION_MINOR -lt $requested_version_minor \ || { test $LIBUNISTRING_VERSION_MINOR -eq $requested_version_minor \ && test $LIBUNISTRING_VERSION_SUBMINOR -lt $requested_version_subminor } } } ]) } }]) dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the dnl same as ORIG, otherwise to 0. m4_define([gl_LIBUNISTRING_ARG_OR_ZERO], [m4_if([$1], [$2], [0], [$1])]) pspp-1.0.1/gl/m4/off_t.m40000644000175000017500000000100613124536242011674 00000000000000# off_t.m4 serial 1 dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check whether to override the 'off_t' type. dnl Set WINDOWS_64_BIT_OFF_T. AC_DEFUN([gl_TYPE_OFF_T], [ m4_ifdef([gl_LARGEFILE], [ AC_REQUIRE([gl_LARGEFILE]) ], [ WINDOWS_64_BIT_OFF_T=0 ]) AC_SUBST([WINDOWS_64_BIT_OFF_T]) ]) pspp-1.0.1/gl/m4/vsnprintf-posix.m40000644000175000017500000001412313124536242013774 00000000000000# vsnprintf-posix.m4 serial 15 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VSNPRINTF_POSIX], [ AC_REQUIRE([gl_PRINTF_SIZES_C99]) AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_INFINITE]) AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) AC_REQUIRE([gl_PRINTF_POSITIONS]) AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) AC_REQUIRE([gl_PRINTF_PRECISION]) AC_REQUIRE([gl_PRINTF_ENOMEM]) gl_cv_func_vsnprintf_posix=no AC_CHECK_FUNCS([vsnprintf]) if test $ac_cv_func_vsnprintf = yes; then dnl These tests use vsnprintf() if snprintf() does not exist. gl_SNPRINTF_TRUNCATION_C99 gl_SNPRINTF_RETVAL_C99 gl_SNPRINTF_DIRECTIVE_N gl_SNPRINTF_SIZE1 gl_VSNPRINTF_ZEROSIZE_C99 case "$gl_cv_func_printf_sizes_c99" in *yes) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) case "$gl_cv_func_printf_directive_a" in *yes) case "$gl_cv_func_printf_directive_f" in *yes) case "$gl_cv_func_printf_directive_n" in *yes) case "$gl_cv_func_printf_directive_ls" in *yes) case "$gl_cv_func_printf_positions" in *yes) case "$gl_cv_func_printf_flag_grouping" in *yes) case "$gl_cv_func_printf_flag_leftadjust" in *yes) case "$gl_cv_func_printf_flag_zero" in *yes) case "$gl_cv_func_printf_precision" in *yes) case "$gl_cv_func_printf_enomem" in *yes) case "$gl_cv_func_snprintf_truncation_c99" in *yes) case "$gl_cv_func_snprintf_retval_c99" in *yes) case "$gl_cv_func_snprintf_directive_n" in *yes) case "$gl_cv_func_snprintf_size1" in *yes) case "$gl_cv_func_vsnprintf_zerosize_c99" in *yes) # vsnprintf exists and is # already POSIX compliant. gl_cv_func_vsnprintf_posix=yes ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac ;; esac fi if test $gl_cv_func_vsnprintf_posix = no; then gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM gl_REPLACE_VASNPRINTF gl_REPLACE_VSNPRINTF fi ]) pspp-1.0.1/gl/m4/time_rz.m40000644000175000017500000000115413124536242012254 00000000000000dnl Time zone functions: tzalloc, localtime_rz, etc. dnl Copyright (C) 2015-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_TIME_RZ], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([AC_STRUCT_TIMEZONE]) AC_CHECK_TYPES([timezone_t], [], [], [[#include ]]) if test "$ac_cv_type_timezone_t" = yes; then HAVE_TIMEZONE_T=1 fi ]) pspp-1.0.1/gl/m4/printf-frexp.m40000644000175000017500000000226613124536242013234 00000000000000# printf-frexp.m4 serial 5 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to define printf_frexp() without linking with libm. AC_DEFUN([gl_FUNC_PRINTF_FREXP], [ AC_REQUIRE([gl_CHECK_FREXP_NO_LIBM]) if test $gl_cv_func_frexp_no_libm = yes; then gl_FUNC_FREXP_WORKS case "$gl_cv_func_frexp_works" in *yes) AC_DEFINE([HAVE_FREXP_IN_LIBC], [1], [Define if the frexp function is available in libc.]) ;; esac fi AC_CACHE_CHECK([whether ldexp can be used without linking with libm], [gl_cv_func_ldexp_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include double x; int y;]], [[return ldexp (x, y) < 1;]])], [gl_cv_func_ldexp_no_libm=yes], [gl_cv_func_ldexp_no_libm=no]) ]) if test $gl_cv_func_ldexp_no_libm = yes; then AC_DEFINE([HAVE_LDEXP_IN_LIBC], [1], [Define if the ldexp function is available in libc.]) fi ]) pspp-1.0.1/gl/m4/getprogname.m40000644000175000017500000000263313124536241013115 00000000000000# getprogname.m4 - check for getprogname or replacements for it # Copyright (C) 2016-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([gl_FUNC_GETPROGNAME], [ AC_CHECK_FUNCS_ONCE([getprogname getexecname]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) ac_found=0 AC_CHECK_DECLS([program_invocation_name], [ac_found=1], [], [#include ]) AC_CHECK_DECLS([program_invocation_short_name], [ac_found=1], [], [#include ]) AC_CHECK_DECLS([__argv], [ac_found=1], [], [#include ]) # Incur the cost of this test only if none of the above worked. if test $ac_found = 0; then # On OpenBSD 5.1, using the global __progname variable appears to be # the only way to implement getprogname. AC_CACHE_CHECK([whether __progname is defined in default libraries], [gl_cv_var___progname], [ gl_cv_var___progname= AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[extern char *__progname;]], [[return *__progname;]] )], [gl_cv_var___progname=yes] ) ] ) if test "$gl_cv_var___progname" = yes; then AC_DEFINE([HAVE_VAR___PROGNAME], 1, [Define if you have a global __progname variable]) fi fi ]) pspp-1.0.1/gl/m4/vasnprintf.m40000644000175000017500000002113313124536242012774 00000000000000# vasnprintf.m4 serial 36 dnl Copyright (C) 2002-2004, 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_VASNPRINTF], [ AC_CHECK_FUNCS_ONCE([vasnprintf]) if test $ac_cv_func_vasnprintf = no; then gl_REPLACE_VASNPRINTF fi ]) AC_DEFUN([gl_REPLACE_VASNPRINTF], [ AC_CHECK_FUNCS_ONCE([vasnprintf]) AC_LIBOBJ([vasnprintf]) AC_LIBOBJ([printf-args]) AC_LIBOBJ([printf-parse]) AC_LIBOBJ([asnprintf]) if test $ac_cv_func_vasnprintf = yes; then AC_DEFINE([REPLACE_VASNPRINTF], [1], [Define if vasnprintf exists but is overridden by gnulib.]) fi gl_PREREQ_PRINTF_ARGS gl_PREREQ_PRINTF_PARSE gl_PREREQ_VASNPRINTF gl_PREREQ_ASNPRINTF ]) # Prerequisites of lib/printf-args.h, lib/printf-args.c. AC_DEFUN([gl_PREREQ_PRINTF_ARGS], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) ]) # Prerequisites of lib/printf-parse.h, lib/printf-parse.c. AC_DEFUN([gl_PREREQ_PRINTF_PARSE], [ AC_REQUIRE([gl_FEATURES_H]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_REQUIRE([AC_TYPE_SIZE_T]) AC_CHECK_TYPE([ptrdiff_t], , [AC_DEFINE([ptrdiff_t], [long], [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) ]) AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) ]) # Prerequisites of lib/vasnprintf.c. AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], [ AC_REQUIRE([AC_FUNC_ALLOCA]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). AC_CHECK_DECLS([_snprintf], , , [[#include ]]) dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE. AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) dnl We can avoid a lot of code by assuming that snprintf's return value dnl conforms to ISO C99. So check that. AC_REQUIRE([gl_SNPRINTF_RETVAL_C99]) case "$gl_cv_func_snprintf_retval_c99" in *yes) AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1], [Define if the return value of the snprintf function is the number of of bytes (excluding the terminating NUL) that would have been produced if the buffer had been large enough.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting 'long double' # arguments. AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) case "$gl_cv_func_printf_long_double" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double' # arguments. AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE], [ AC_REQUIRE([gl_PRINTF_INFINITE]) case "$gl_cv_func_printf_infinite" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for infinite 'double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double' # arguments. AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE], [ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if dnl NEED_PRINTF_LONG_DOUBLE is already set. AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE]) case "$gl_cv_func_printf_long_double" in *yes) case "$gl_cv_func_printf_infinite_long_double" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for infinite 'long double' arguments.]) ;; esac ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) case "$gl_cv_func_printf_directive_a" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1], [Define if the vasnprintf implementation needs special code for the 'a' and 'A' directives.]) AC_CHECK_FUNCS([nl_langinfo]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) case "$gl_cv_func_printf_directive_f" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1], [Define if the vasnprintf implementation needs special code for the 'F' directive.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive. AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS], [ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) case "$gl_cv_func_printf_directive_ls" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1], [Define if the vasnprintf implementation needs special code for the 'ls' directive.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the ' flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING], [ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) case "$gl_cv_func_printf_flag_grouping" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1], [Define if the vasnprintf implementation needs special code for the ' flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST], [ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) case "$gl_cv_func_printf_flag_leftadjust" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1], [Define if the vasnprintf implementation needs special code for the '-' flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag. AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO], [ AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) case "$gl_cv_func_printf_flag_zero" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1], [Define if the vasnprintf implementation needs special code for the 0 flag.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for supporting large precisions. AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION], [ AC_REQUIRE([gl_PRINTF_PRECISION]) case "$gl_cv_func_printf_precision" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1], [Define if the vasnprintf implementation needs special code for supporting large precisions without arbitrary bounds.]) AC_DEFINE([NEED_PRINTF_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'double' arguments.]) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory # conditions. AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM], [ AC_REQUIRE([gl_PRINTF_ENOMEM]) case "$gl_cv_func_printf_enomem" in *yes) ;; *) AC_DEFINE([NEED_PRINTF_ENOMEM], [1], [Define if the vasnprintf implementation needs special code for surviving out-of-memory conditions.]) AC_DEFINE([NEED_PRINTF_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'double' arguments.]) AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], [Define if the vasnprintf implementation needs special code for 'long double' arguments.]) ;; esac ]) # Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance. AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS], [ AC_REQUIRE([gl_PREREQ_VASNPRINTF]) gl_PREREQ_VASNPRINTF_LONG_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE gl_PREREQ_VASNPRINTF_DIRECTIVE_A gl_PREREQ_VASNPRINTF_DIRECTIVE_F gl_PREREQ_VASNPRINTF_DIRECTIVE_LS gl_PREREQ_VASNPRINTF_FLAG_GROUPING gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST gl_PREREQ_VASNPRINTF_FLAG_ZERO gl_PREREQ_VASNPRINTF_PRECISION gl_PREREQ_VASNPRINTF_ENOMEM ]) # Prerequisites of lib/asnprintf.c. AC_DEFUN([gl_PREREQ_ASNPRINTF], [ ]) pspp-1.0.1/gl/m4/double-slash-root.m40000644000175000017500000000312513124536242014146 00000000000000# double-slash-root.m4 serial 4 -*- Autoconf -*- dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DOUBLE_SLASH_ROOT], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root], [ if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # . case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi]) if test "$gl_cv_double_slash_root" = yes; then AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1], [Define to 1 if // is a file system root distinct from /.]) fi ]) pspp-1.0.1/gl/m4/ssize_t.m40000644000175000017500000000146313124536242012266 00000000000000# ssize_t.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2001-2003, 2006, 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether ssize_t is defined. AC_DEFUN([gt_TYPE_SSIZE_T], [ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x;]])], [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) if test $gt_cv_ssize_t = no; then AC_DEFINE([ssize_t], [int], [Define as a signed type of the same size as size_t.]) fi ]) pspp-1.0.1/gl/m4/secure_getenv.m40000644000175000017500000000152413124536242013442 00000000000000# Look up an environment variable more securely. dnl Copyright 2013-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SECURE_GETENV], [ dnl Persuade glibc to declare secure_getenv(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([secure_getenv]) if test $ac_cv_func_secure_getenv = no; then HAVE_SECURE_GETENV=0 fi ]) # Prerequisites of lib/secure_getenv.c. AC_DEFUN([gl_PREREQ_SECURE_GETENV], [ AC_CHECK_FUNCS([__secure_getenv]) if test $ac_cv_func___secure_getenv = no; then AC_CHECK_FUNCS([issetugid]) fi AC_CHECK_FUNCS_ONCE([getuid geteuid getgid getegid]) ]) pspp-1.0.1/gl/m4/fcntl.m40000644000175000017500000001035113124536242011710 00000000000000# fcntl.m4 serial 9 dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # For now, this module ensures that fcntl() # - supports F_DUPFD correctly # - supports or emulates F_DUPFD_CLOEXEC # - supports F_GETFD # Still to be ported to mingw: # - F_SETFD # - F_GETFL, F_SETFL # - F_GETOWN, F_SETOWN # - F_GETLK, F_SETLK, F_SETLKW AC_DEFUN([gl_FUNC_FCNTL], [ dnl Persuade glibc to expose F_DUPFD_CLOEXEC. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([fcntl]) if test $ac_cv_func_fcntl = no; then gl_REPLACE_FCNTL else dnl cygwin 1.5.x F_DUPFD has wrong errno, and allows negative target dnl haiku alpha 2 F_DUPFD has wrong errno AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly], [gl_cv_func_fcntl_f_dupfd_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include #include #include #ifndef RLIM_SAVED_CUR # define RLIM_SAVED_CUR RLIM_INFINITY #endif #ifndef RLIM_SAVED_MAX # define RLIM_SAVED_MAX RLIM_INFINITY #endif ]], [[int result = 0; int bad_fd = INT_MAX; struct rlimit rlim; if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX && rlim.rlim_cur != RLIM_INFINITY && rlim.rlim_cur != RLIM_SAVED_MAX && rlim.rlim_cur != RLIM_SAVED_CUR) bad_fd = rlim.rlim_cur; if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; if (errno != EINVAL) result |= 2; if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4; if (errno != EINVAL) result |= 8; /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */ { int fd; fd = open (".", O_RDONLY); if (fd == -1) result |= 16; else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1) result |= 32; close (fd); } return result;]])], [gl_cv_func_fcntl_f_dupfd_works=yes], [gl_cv_func_fcntl_f_dupfd_works=no], [case $host_os in aix* | cygwin* | haiku*) gl_cv_func_fcntl_f_dupfd_works="guessing no" ;; *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;; esac])]) case $gl_cv_func_fcntl_f_dupfd_works in *yes) ;; *) gl_REPLACE_FCNTL AC_DEFINE([FCNTL_DUPFD_BUGGY], [1], [Define this to 1 if F_DUPFD behavior does not match POSIX]) ;; esac dnl Many systems lack F_DUPFD_CLOEXEC AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC], [gl_cv_func_fcntl_f_dupfd_cloexec], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifndef F_DUPFD_CLOEXEC choke me #endif ]])], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #ifdef __linux__ /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace it to support the semantics on older kernels that failed with EINVAL. */ choke me #endif ]])], [gl_cv_func_fcntl_f_dupfd_cloexec=yes], [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])], [gl_cv_func_fcntl_f_dupfd_cloexec=no])]) if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then gl_REPLACE_FCNTL dnl No witness macro needed for this bug. fi fi dnl Replace fcntl() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then gl_REPLACE_FCNTL fi ]) ]) AC_DEFUN([gl_REPLACE_FCNTL], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([fcntl]) if test $ac_cv_func_fcntl = no; then HAVE_FCNTL=0 else REPLACE_FCNTL=1 fi ]) pspp-1.0.1/gl/m4/read-file.m40000644000175000017500000000055213124536242012434 00000000000000# read-file.m4 serial 3 dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Prerequisites of lib/read-file.c. AC_DEFUN([gl_PREREQ_READ_FILE], [:]) pspp-1.0.1/gl/m4/relocatable-lib.m40000644000175000017500000000274413124536242013632 00000000000000# relocatable-lib.m4 serial 6 dnl Copyright (C) 2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Support for relocatable libraries. AC_DEFUN([gl_RELOCATABLE_LIBRARY], [ AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY]) ]) AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY], [ AC_REQUIRE([gl_RELOCATABLE_NOP]) dnl Easier to put this here once, instead of into the DEFS of each Makefile. if test "X$prefix" = "XNONE"; then reloc_final_prefix="$ac_default_prefix" else reloc_final_prefix="$prefix" fi AC_DEFINE_UNQUOTED([INSTALLPREFIX], ["${reloc_final_prefix}"], [Define to the value of ${prefix}, as a string.]) if test $RELOCATABLE = yes; then AC_DEFINE([ENABLE_RELOCATABLE], [1], [Define to 1 if the package shall run at any location in the file system.]) fi ]) dnl Support for relocatable packages for which it is a nop. AC_DEFUN([gl_RELOCATABLE_NOP], [ AC_MSG_CHECKING([whether to activate relocatable installation]) AC_ARG_ENABLE([relocatable], [AS_HELP_STRING([--enable-relocatable], [install a package that can be moved in the file system])], [if test "$enableval" != no; then RELOCATABLE=yes else RELOCATABLE=no fi ], RELOCATABLE=no) AC_SUBST([RELOCATABLE]) AC_MSG_RESULT([$RELOCATABLE]) ]) pspp-1.0.1/gl/m4/tm_gmtoff.m40000644000175000017500000000103513124536242012563 00000000000000# tm_gmtoff.m4 serial 3 dnl Copyright (C) 2002, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_TM_GMTOFF], [ AC_CHECK_MEMBER([struct tm.tm_gmtoff], [AC_DEFINE([HAVE_TM_GMTOFF], [1], [Define if struct tm has the tm_gmtoff member.])], , [#include ]) ]) pspp-1.0.1/gl/m4/multiarch.m40000644000175000017500000000367413124536242012604 00000000000000# multiarch.m4 serial 7 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine whether the compiler is or may be producing universal binaries. # # On Mac OS X 10.5 and later systems, the user can create libraries and # executables that work on multiple system types--known as "fat" or # "universal" binaries--by specifying multiple '-arch' options to the # compiler but only a single '-arch' option to the preprocessor. Like # this: # # ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ # CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ # CPP="gcc -E" CXXCPP="g++ -E" # # Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly. AC_DEFUN_ONCE([gl_MULTIARCH], [ dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. gl_cv_c_multiarch=no AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; ]])], [ dnl Check for potential -arch flags. It is not universal unless dnl there are at least two -arch flags with different values. arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done ]) if test $gl_cv_c_multiarch = yes; then APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi AC_SUBST([APPLE_UNIVERSAL_BUILD]) ]) pspp-1.0.1/gl/m4/langinfo_h.m40000644000175000017500000000672113124536242012714 00000000000000# langinfo_h.m4 serial 7 dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LANGINFO_H], [ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) dnl Persuade glibc-2.0.6 to define CODESET. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([langinfo.h]) dnl Determine whether exists. It is missing on mingw and BeOS. HAVE_LANGINFO_CODESET=0 HAVE_LANGINFO_T_FMT_AMPM=0 HAVE_LANGINFO_ERA=0 HAVE_LANGINFO_YESEXPR=0 AC_CHECK_HEADERS_ONCE([langinfo.h]) if test $ac_cv_header_langinfo_h = yes; then HAVE_LANGINFO_H=1 dnl Determine what defines. CODESET and ERA etc. are missing dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3. AC_CACHE_CHECK([whether langinfo.h defines CODESET], [gl_cv_header_langinfo_codeset], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include int a = CODESET; ]])], [gl_cv_header_langinfo_codeset=yes], [gl_cv_header_langinfo_codeset=no]) ]) if test $gl_cv_header_langinfo_codeset = yes; then HAVE_LANGINFO_CODESET=1 fi AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM], [gl_cv_header_langinfo_t_fmt_ampm], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include int a = T_FMT_AMPM; ]])], [gl_cv_header_langinfo_t_fmt_ampm=yes], [gl_cv_header_langinfo_t_fmt_ampm=no]) ]) if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then HAVE_LANGINFO_T_FMT_AMPM=1 fi AC_CACHE_CHECK([whether langinfo.h defines ERA], [gl_cv_header_langinfo_era], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include int a = ERA; ]])], [gl_cv_header_langinfo_era=yes], [gl_cv_header_langinfo_era=no]) ]) if test $gl_cv_header_langinfo_era = yes; then HAVE_LANGINFO_ERA=1 fi AC_CACHE_CHECK([whether langinfo.h defines YESEXPR], [gl_cv_header_langinfo_yesexpr], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include int a = YESEXPR; ]])], [gl_cv_header_langinfo_yesexpr=yes], [gl_cv_header_langinfo_yesexpr=no]) ]) if test $gl_cv_header_langinfo_yesexpr = yes; then HAVE_LANGINFO_YESEXPR=1 fi else HAVE_LANGINFO_H=0 fi AC_SUBST([HAVE_LANGINFO_H]) AC_SUBST([HAVE_LANGINFO_CODESET]) AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM]) AC_SUBST([HAVE_LANGINFO_ERA]) AC_SUBST([HAVE_LANGINFO_YESEXPR]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [nl_langinfo]) ]) AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_LANGINFO_H_DEFAULTS], [ GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO]) REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO]) ]) pspp-1.0.1/gl/m4/float_h.m40000644000175000017500000000510113132510756012214 00000000000000# float_h.m4 serial 11 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FLOAT_H], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) FLOAT_H= REPLACE_FLOAT_LDBL=0 case "$host_os" in aix* | beos* | openbsd* | mirbsd* | irix*) FLOAT_H=float.h ;; freebsd* | dragonfly*) case "$host_cpu" in changequote(,)dnl i[34567]86 ) changequote([,])dnl FLOAT_H=float.h ;; x86_64 ) # On x86_64 systems, the C compiler may still be generating # 32-bit code. AC_EGREP_CPP([yes], [#if defined __LP64__ || defined __x86_64__ || defined __amd64__ yes #endif], [], [FLOAT_H=float.h]) ;; esac ;; linux*) case "$host_cpu" in powerpc*) FLOAT_H=float.h ;; esac ;; esac case "$host_os" in aix* | freebsd* | dragonfly* | linux*) if test -n "$FLOAT_H"; then REPLACE_FLOAT_LDBL=1 fi ;; esac dnl Test against glibc-2.7 Linux/SPARC64 bug. REPLACE_ITOLD=0 AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works], [gl_cv_func_itold_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ int i = -1; volatile long double ld; int main () { ld += i * 1.0L; if (ld > 0) return 1; return 0; }]])], [gl_cv_func_itold_works=yes], [gl_cv_func_itold_works=no], [case "$host" in sparc*-*-linux*) AC_EGREP_CPP([yes], [#if defined __LP64__ || defined __arch64__ yes #endif], [gl_cv_func_itold_works="guessing no"], [gl_cv_func_itold_works="guessing yes"]) ;; # Guess yes on native Windows. mingw*) gl_cv_func_itold_works="guessing yes" ;; *) gl_cv_func_itold_works="guessing yes" ;; esac ]) ]) case "$gl_cv_func_itold_works" in *no) REPLACE_ITOLD=1 dnl We add the workaround to but also to , dnl to increase the chances that the fix function gets pulled in. FLOAT_H=float.h ;; esac if test -n "$FLOAT_H"; then gl_NEXT_HEADERS([float.h]) fi AC_SUBST([FLOAT_H]) AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"]) AC_SUBST([REPLACE_ITOLD]) ]) pspp-1.0.1/gl/m4/isnanf.m40000644000175000017500000001264313132510756012067 00000000000000# isnanf.m4 serial 15 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check how to get or define isnanf(). AC_DEFUN([gl_FUNC_ISNANF], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) ISNANF_LIBM= gl_HAVE_ISNANF_NO_LIBM if test $gl_cv_func_isnanf_no_libm = no; then gl_HAVE_ISNANF_IN_LIBM if test $gl_cv_func_isnanf_in_libm = yes; then ISNANF_LIBM=-lm fi fi dnl The variable gl_func_isnanf set here is used by isnan.m4. if test $gl_cv_func_isnanf_no_libm = yes \ || test $gl_cv_func_isnanf_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $ISNANF_LIBM" gl_ISNANF_WORKS LIBS="$save_LIBS" case "$gl_cv_func_isnanf_works" in *yes) gl_func_isnanf=yes ;; *) gl_func_isnanf=no; ISNANF_LIBM= ;; esac else gl_func_isnanf=no fi if test $gl_func_isnanf != yes; then HAVE_ISNANF=0 fi AC_SUBST([ISNANF_LIBM]) ]) dnl Check how to get or define isnanf() without linking with libm. AC_DEFUN([gl_FUNC_ISNANF_NO_LIBM], [ gl_HAVE_ISNANF_NO_LIBM if test $gl_cv_func_isnanf_no_libm = yes; then gl_ISNANF_WORKS fi if test $gl_cv_func_isnanf_no_libm = yes \ && { case "$gl_cv_func_isnanf_works" in *yes) true;; *) false;; esac }; then gl_func_isnanf_no_libm=yes AC_DEFINE([HAVE_ISNANF_IN_LIBC], [1], [Define if the isnan(float) function is available in libc.]) else gl_func_isnanf_no_libm=no fi ]) dnl Prerequisites of replacement isnanf definition. It does not need -lm. AC_DEFUN([gl_PREREQ_ISNANF], [ gl_FLOAT_EXPONENT_LOCATION ]) dnl Test whether isnanf() can be used without libm. AC_DEFUN([gl_HAVE_ISNANF_NO_LIBM], [ AC_CACHE_CHECK([whether isnan(float) can be used without linking with libm], [gl_cv_func_isnanf_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif float x;]], [[return isnanf (x);]])], [gl_cv_func_isnanf_no_libm=yes], [gl_cv_func_isnanf_no_libm=no]) ]) ]) dnl Test whether isnanf() can be used with libm. AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM], [ AC_CACHE_CHECK([whether isnan(float) can be used with libm], [gl_cv_func_isnanf_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif float x;]], [[return isnanf (x);]])], [gl_cv_func_isnanf_in_libm=yes], [gl_cv_func_isnanf_in_libm=no]) LIBS="$save_LIBS" ]) ]) dnl Test whether isnanf() rejects Infinity (this fails on Solaris 2.5.1), dnl recognizes a NaN (this fails on IRIX 6.5 with cc), and recognizes a NaN dnl with in-memory representation 0x7fbfffff (this fails on IRIX 6.5). AC_DEFUN([gl_ISNANF_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION]) AC_CACHE_CHECK([whether isnan(float) works], [gl_cv_func_isnanf_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #if __GNUC__ >= 4 # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) #endif /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ #ifdef __DECC static float NaN () { static float zero = 0.0f; return zero / zero; } #else # define NaN() (0.0f / 0.0f) #endif #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; float value; } memory_float; int main() { int result = 0; if (isnanf (1.0f / 0.0f)) result |= 1; if (!isnanf (NaN ())) result |= 2; #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT /* The isnanf function should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit. */ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0) { memory_float m; m.value = NaN (); /* Set the bits below the exponent to 01111...111. */ m.word[0] &= -1U << FLT_EXPBIT0_BIT; m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; if (!isnanf (m.value)) result |= 4; } #endif return result; }]])], [gl_cv_func_isnanf_works=yes], [gl_cv_func_isnanf_works=no], [case "$host_os" in irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;; mingw*) # Guess yes on mingw, no on MSVC. AC_EGREP_CPP([Known], [ #ifdef __MINGW32__ Known #endif ], [gl_cv_func_isnanf_works="guessing yes"], [gl_cv_func_isnanf_works="guessing no"]) ;; *) gl_cv_func_isnanf_works="guessing yes" ;; esac ]) ]) ]) pspp-1.0.1/gl/m4/wcrtomb.m40000644000175000017500000000703513132510757012266 00000000000000# wcrtomb.m4 serial 12 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCRTOMB], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN AC_CHECK_FUNCS_ONCE([wcrtomb]) if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 AC_CHECK_DECLS([wcrtomb],,, [[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]]) if test $ac_cv_have_decl_wcrtomb = yes; then dnl On Minix 3.1.8, the system's declares wcrtomb() although dnl it does not have the function. Avoid a collision with gnulib's dnl replacement. REPLACE_WCRTOMB=1 fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_WCRTOMB=1 else dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes dnl returns 0 instead of 1. AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether wcrtomb return value is correct], [gl_cv_func_wcrtomb_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on AIX 4, OSF/1 and Solaris. aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; # Guess yes on native Windows. mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;; # Guess yes otherwise. *) gl_cv_func_wcrtomb_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 1; } if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 2; } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 4; } if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 8; } return result; }]])], [gl_cv_func_wcrtomb_retval=yes], [gl_cv_func_wcrtomb_retval=no], [:]) fi ]) case "$gl_cv_func_wcrtomb_retval" in *yes) ;; *) REPLACE_WCRTOMB=1 ;; esac fi fi ]) # Prerequisites of lib/wcrtomb.c. AC_DEFUN([gl_PREREQ_WCRTOMB], [ : ]) pspp-1.0.1/gl/m4/fseeko.m40000644000175000017500000000437513132510756012070 00000000000000# fseeko.m4 serial 18 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FSEEKO], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) AC_REQUIRE([gl_SYS_TYPES_H]) AC_REQUIRE([AC_PROG_CC]) dnl Persuade glibc to declare fseeko(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [fseeko (stdin, 0, 0);])], [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no]) ]) AC_CHECK_DECLS_ONCE([fseeko]) if test $ac_cv_have_decl_fseeko = no; then HAVE_DECL_FSEEKO=0 fi if test $gl_cv_func_fseeko = no; then HAVE_FSEEKO=0 else if test $WINDOWS_64_BIT_OFF_T = 1; then REPLACE_FSEEKO=1 fi if test $gl_cv_var_stdin_large_offset = no; then REPLACE_FSEEKO=1 fi m4_ifdef([gl_FUNC_FFLUSH_STDIN], [ gl_FUNC_FFLUSH_STDIN case "$gl_cv_func_fflush_stdin" in *yes) ;; *) REPLACE_FSEEKO=1 ;; esac ]) fi ]) dnl Code shared by fseeko and ftello. Determine if large files are supported, dnl but stdin does not start as a large file by default. AC_DEFUN([gl_STDIN_LARGE_OFFSET], [ AC_CACHE_CHECK([whether stdin defaults to large file offsets], [gl_cv_var_stdin_large_offset], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[#if defined __SL64 && defined __SCLE /* cygwin */ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and it is easier to do a version check than building a runtime test. */ # include # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) choke me # endif #endif]])], [gl_cv_var_stdin_large_offset=yes], [gl_cv_var_stdin_large_offset=no])]) ]) # Prerequisites of lib/fseeko.c. AC_DEFUN([gl_PREREQ_FSEEKO], [ dnl Native Windows has the function _fseeki64. mingw hides it, but mingw64 dnl makes it usable again. AC_CHECK_FUNCS([_fseeki64]) ]) pspp-1.0.1/gl/m4/iconv.m40000644000175000017500000002277713124536242011737 00000000000000# iconv.m4 serial 21 dnl Copyright (C) 2000-2002, 2007-2014, 2016-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif ]], [[int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 16; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ]])], [am_cv_func_iconv_works=yes], , [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [m4_ifdef([gl_00GNULIB], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ]], [[]])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) else dnl When compiling GNU libiconv on a system that does not have iconv yet, dnl pick the POSIX compliant declaration without 'const'. am_cv_proto_iconv_arg1="" fi AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test -n "$am_cv_proto_iconv_arg1"; then ICONV_CONST="const" fi ]) ]) pspp-1.0.1/gl/m4/configmake.m40000644000175000017500000000402113124536242012702 00000000000000# configmake.m4 serial 2 dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_CONFIGMAKE_PREP # ------------------ # Guarantee all of the standard directory variables, even when used with # autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir # in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b, # and runstatedir in 1.14.1). AC_DEFUN([gl_CONFIGMAKE_PREP], [ dnl Technically, datadir should default to datarootdir. But if dnl autoconf is too old to provide datarootdir, then reversing the dnl definition is a reasonable compromise. Only AC_SUBST a variable dnl if it was not already defined earlier by autoconf. if test "x$datarootdir" = x; then AC_SUBST([datarootdir], ['${datadir}']) fi dnl Copy the approach used in autoconf 2.60. if test "x$docdir" = x; then AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], ['${datarootdir}/doc/${PACKAGE_TARNAME}'], ['${datarootdir}/doc/${PACKAGE}'])]) fi dnl The remaining variables missing from autoconf 2.59 are easier. if test "x$htmldir" = x; then AC_SUBST([htmldir], ['${docdir}']) fi if test "x$dvidir" = x; then AC_SUBST([dvidir], ['${docdir}']) fi if test "x$pdfdir" = x; then AC_SUBST([pdfdir], ['${docdir}']) fi if test "x$psdir" = x; then AC_SUBST([psdir], ['${docdir}']) fi if test "x$lispdir" = x; then AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp']) fi if test "x$localedir" = x; then AC_SUBST([localedir], ['${datarootdir}/locale']) fi dnl Added in autoconf 2.70 if test "x$runstatedir" = x; then AC_SUBST([runstatedir], ['${localstatedir}/run']) fi dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe. AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}']) ]) pspp-1.0.1/gl/m4/wcwidth.m40000644000175000017500000000604513124536242012260 00000000000000# wcwidth.m4 serial 23 dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCWIDTH], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Persuade glibc to declare wcwidth(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_CHECK_HEADERS_ONCE([wchar.h]) AC_CHECK_FUNCS_ONCE([wcwidth]) AC_CHECK_DECLS([wcwidth], [], [], [[ /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]]) if test $ac_cv_have_decl_wcwidth != yes; then HAVE_DECL_WCWIDTH=0 fi if test $ac_cv_func_wcwidth = yes; then HAVE_WCWIDTH=1 dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. dnl On OpenBSD 5.0, wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1. dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1. dnl On OpenBSD 5.8, wcwidth(0xFF1A) (FULLWIDTH COLON) returns 0. dnl This leads to bugs in 'ls' (coreutils). AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales], [gl_cv_func_wcwidth_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if !HAVE_DECL_WCWIDTH extern # ifdef __cplusplus "C" # endif int wcwidth (int); #endif int main () { int result = 0; if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL) { if (wcwidth (0x0301) > 0) result |= 1; if (wcwidth (0x05B0) > 0) result |= 2; if (wcwidth (0x200B) > 0) result |= 4; if (wcwidth (0xFF1A) == 0) result |= 8; } return result; }]])], [gl_cv_func_wcwidth_works=yes], [gl_cv_func_wcwidth_works=no], [ changequote(,)dnl case "$host_os" in # Guess yes on glibc and AIX 7 systems. *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; *) gl_cv_func_wcwidth_works="guessing no";; esac changequote([,])dnl ]) ]) case "$gl_cv_func_wcwidth_works" in *yes) ;; *no) REPLACE_WCWIDTH=1 ;; esac else HAVE_WCWIDTH=0 fi dnl We don't substitute HAVE_WCWIDTH. We assume that if the system does not dnl have the wcwidth function, then it does not declare it. ]) pspp-1.0.1/gl/m4/stdio_h.m40000644000175000017500000002525613124536242012245 00000000000000# stdio_h.m4 serial 48 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDIO_H], [ AH_VERBATIM([MINGW_ANSI_STDIO], [/* Use GNU style printf and scanf. */ #ifndef __USE_MINGW_ANSI_STDIO # undef __USE_MINGW_ANSI_STDIO #endif ]) AC_DEFINE([__USE_MINGW_ANSI_STDIO]) AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_NEXT_HEADERS([stdio.h]) dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and dnl inttypes.h behave like gnu instead of system; we must give our dnl printf wrapper the right attribute to match. AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros], [gl_cv_func_printf_attribute_flavor], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #define __STDC_FORMAT_MACROS 1 #include #include /* For non-mingw systems, compilation will trivially succeed. For mingw, compilation will succeed for older mingw (system printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; #endif ]])], [gl_cv_func_printf_attribute_flavor=system], [gl_cv_func_printf_attribute_flavor=gnu])]) if test "$gl_cv_func_printf_attribute_flavor" = gnu; then AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1], [Define to 1 if printf and friends should be labeled with attribute "__gnu_printf__" instead of "__printf__"]) fi dnl No need to create extra modules for these functions. Everyone who uses dnl likely needs them. GNULIB_FSCANF=1 gl_MODULE_INDICATOR([fscanf]) GNULIB_SCANF=1 gl_MODULE_INDICATOR([scanf]) GNULIB_FGETC=1 GNULIB_GETC=1 GNULIB_GETCHAR=1 GNULIB_FGETS=1 GNULIB_FREAD=1 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c" dnl "expected source file, required through AC_LIBSOURCES, not found". It is dnl also an optimization, to avoid performing a configure check whose result dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING dnl or GNULIB_NONBLOCKING redundant. m4_ifdef([gl_NONBLOCKING_IO], [ gl_NONBLOCKING_IO if test $gl_cv_have_nonblocking != yes; then REPLACE_STDIO_READ_FUNCS=1 AC_LIBOBJ([stdio-read]) fi ]) dnl No need to create extra modules for these functions. Everyone who uses dnl likely needs them. GNULIB_FPRINTF=1 GNULIB_PRINTF=1 GNULIB_VFPRINTF=1 GNULIB_VPRINTF=1 GNULIB_FPUTC=1 GNULIB_PUTC=1 GNULIB_PUTCHAR=1 GNULIB_FPUTS=1 GNULIB_PUTS=1 GNULIB_FWRITE=1 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" dnl "expected source file, required through AC_LIBSOURCES, not found". It is dnl also an optimization, to avoid performing a configure check whose result dnl is not used. But it does not make the test of GNULIB_STDIO_H_SIGPIPE or dnl GNULIB_SIGPIPE redundant. m4_ifdef([gl_SIGNAL_SIGPIPE], [ gl_SIGNAL_SIGPIPE if test $gl_cv_header_signal_h_SIGPIPE != yes; then REPLACE_STDIO_WRITE_FUNCS=1 AC_LIBOBJ([stdio-write]) fi ]) dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" dnl "expected source file, required through AC_LIBSOURCES, not found". It is dnl also an optimization, to avoid performing a configure check whose result dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING dnl or GNULIB_NONBLOCKING redundant. m4_ifdef([gl_NONBLOCKING_IO], [ gl_NONBLOCKING_IO if test $gl_cv_have_nonblocking != yes; then REPLACE_STDIO_WRITE_FUNCS=1 AC_LIBOBJ([stdio-write]) fi ]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by both C89 and C11. gl_WARN_ON_USE_PREPARE([[#include ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf]) ]) AC_DEFUN([gl_STDIO_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_STDIO_H_DEFAULTS], [ GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) GNULIB_FDOPEN=0; AC_SUBST([GNULIB_FDOPEN]) GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) GNULIB_FGETC=0; AC_SUBST([GNULIB_FGETC]) GNULIB_FGETS=0; AC_SUBST([GNULIB_FGETS]) GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) GNULIB_FREAD=0; AC_SUBST([GNULIB_FREAD]) GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) GNULIB_FSCANF=0; AC_SUBST([GNULIB_FSCANF]) GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) GNULIB_GETC=0; AC_SUBST([GNULIB_GETC]) GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR]) GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE]) GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) GNULIB_SCANF=0; AC_SUBST([GNULIB_SCANF]) GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) GNULIB_STDIO_H_NONBLOCKING=0; AC_SUBST([GNULIB_STDIO_H_NONBLOCKING]) GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) GNULIB_VFSCANF=0; AC_SUBST([GNULIB_VFSCANF]) GNULIB_VSCANF=0; AC_SUBST([GNULIB_VSCANF]) GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) HAVE_DECL_FSEEKO=1; AC_SUBST([HAVE_DECL_FSEEKO]) HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO]) HAVE_PCLOSE=1; AC_SUBST([HAVE_PCLOSE]) HAVE_POPEN=1; AC_SUBST([HAVE_POPEN]) HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN]) REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) REPLACE_STDIO_READ_FUNCS=0; AC_SUBST([REPLACE_STDIO_READ_FUNCS]) REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE]) REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) ]) pspp-1.0.1/gl/m4/btowc.m40000644000175000017500000000647313132510756011733 00000000000000# btowc.m4 serial 11 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_BTOWC], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) dnl Check whether is usable at all, first. Otherwise the test dnl program below may lead to an endless loop. See dnl . AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) AC_CHECK_FUNCS_ONCE([btowc]) if test $ac_cv_func_btowc = no; then HAVE_BTOWC=0 else AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Cygwin 1.7.2 btowc('\0') is WEOF, not 0. AC_CACHE_CHECK([whether btowc(0) is correct], [gl_cv_func_btowc_nul], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (btowc ('\0') != 0) return 1; return 0; }]])], [gl_cv_func_btowc_nul=yes], [gl_cv_func_btowc_nul=no], [ changequote(,)dnl case "$host_os" in # Guess no on Cygwin. cygwin*) gl_cv_func_btowc_nul="guessing no" ;; # Guess yes on native Windows. mingw*) gl_cv_func_btowc_nul="guessing yes" ;; # Guess yes otherwise. *) gl_cv_func_btowc_nul="guessing yes" ;; esac changequote([,])dnl ]) ]) dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF. AC_CACHE_CHECK([whether btowc(EOF) is correct], [gl_cv_func_btowc_eof], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on IRIX. irix*) gl_cv_func_btowc_eof="guessing no" ;; # Guess yes on native Windows. mingw*) gl_cv_func_btowc_eof="guessing yes" ;; # Guess yes otherwise. *) gl_cv_func_btowc_eof="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR != none; then AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (btowc (EOF) != WEOF) return 1; } return 0; }]])], [gl_cv_func_btowc_eof=yes], [gl_cv_func_btowc_eof=no], [:]) fi ]) case "$gl_cv_func_btowc_nul" in *yes) ;; *) REPLACE_BTOWC=1 ;; esac case "$gl_cv_func_btowc_eof" in *yes) ;; *) REPLACE_BTOWC=1 ;; esac fi ]) # Prerequisites of lib/btowc.c. AC_DEFUN([gl_PREREQ_BTOWC], [ : ]) pspp-1.0.1/gl/m4/gnulib-comp.m40000644000175000017500000014450413132510767013031 00000000000000# DO NOT EDIT! GENERATED AUTOMATICALLY! # Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; you can 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 file is distributed in the hope that 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 file. If not, see . # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the compiled summary of the specification in # gnulib-cache.m4. It lists the computed macro invocations that need # to be invoked from configure.ac. # In projects that use version control, this file can be treated like # other built files. # This macro should be invoked from ./configure.ac, in the section # "Checks for programs", right after AC_PROG_CC, and certainly before # any checks for libraries, header files, types and library functions. AC_DEFUN([gl_EARLY], [ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable # Pre-early section. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_PROG_AR_RANLIB]) AC_REQUIRE([AM_PROG_CC_C_O]) # Code from module absolute-header: # Code from module alloca: # Code from module alloca-opt: # Code from module allocator: # Code from module areadlink: # Code from module array-mergesort: # Code from module assert: # Code from module binary-io: # Code from module btowc: # Code from module builtin-expect: # Code from module byteswap: # Code from module c-ctype: # Code from module c-snprintf: # Code from module c-strcase: # Code from module c-strcasestr: # Code from module c-strtod: # Code from module c-vasnprintf: # Code from module c-vasprintf: # Code from module c-xvasprintf: # Code from module canonicalize-lgpl: # Code from module careadlinkat: # Code from module chdir: # Code from module clean-temp: # Code from module close: # Code from module configmake: # Code from module count-one-bits: # Code from module crc: # Code from module crypto/md4: # Code from module crypto/rijndael: # Code from module dirname: # Code from module dirname-lgpl: # Code from module dosname: # Code from module double-slash-root: # Code from module dtoastr: # Code from module dup2: # Code from module environ: # Code from module errno: # Code from module error: # Code from module exitfail: # Code from module extensions: # Code from module extern-inline: # Code from module fatal-signal: # Code from module fcntl: # Code from module fcntl-h: # Code from module fd-hook: # Code from module filename: # Code from module flexmember: # Code from module float: # Code from module floor: # Code from module fpieee: AC_REQUIRE([gl_FP_IEEE]) # Code from module fprintf-posix: # Code from module fpucw: # Code from module frexp-nolibm: # Code from module frexpl-nolibm: # Code from module fseek: # Code from module fseeko: AC_REQUIRE([AC_FUNC_FSEEKO]) # Code from module fseterr: # Code from module fstat: # Code from module ftell: # Code from module ftello: AC_REQUIRE([AC_FUNC_FSEEKO]) # Code from module full-read: # Code from module full-write: # Code from module fwriteerror: # Code from module getdelim: # Code from module getdtablesize: # Code from module getline: # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module getpass: # Code from module getprogname: # Code from module gettext: # Code from module gettext-h: # Code from module gettimeofday: # Code from module gitlog-to-changelog: # Code from module gperf: # Code from module hard-locale: # Code from module havelib: # Code from module include_next: # Code from module inline: # Code from module intprops: # Code from module inttostr: # Code from module isfinite: # Code from module isinf: # Code from module isnan: # Code from module isnand: # Code from module isnand-nolibm: # Code from module isnanf: # Code from module isnanf-nolibm: # Code from module isnanl: # Code from module isnanl-nolibm: # Code from module iswblank: # Code from module langinfo: # Code from module largefile: AC_REQUIRE([AC_SYS_LARGEFILE]) # Code from module limits-h: # Code from module linkedhash-list: # Code from module list: # Code from module localcharset: # Code from module locale: # Code from module localeconv: # Code from module localtime-buffer: # Code from module lock: # Code from module lseek: # Code from module lstat: # Code from module malloc-posix: # Code from module malloca: # Code from module math: # Code from module mbchar: # Code from module mbiter: # Code from module mbrtowc: # Code from module mbsinit: # Code from module mbtowc: # Code from module memcasecmp: # Code from module memchr: # Code from module memchr2: # Code from module mempcpy: # Code from module memrchr: # Code from module minmax: # Code from module mkdtemp: # Code from module mkstemp: # Code from module mktime: # Code from module mktime-internal: # Code from module msvc-inval: # Code from module msvc-nothrow: # Code from module multiarch: # Code from module nl_langinfo: # Code from module nocrash: # Code from module open: # Code from module pathmax: # Code from module pipe2: # Code from module printf-frexp: # Code from module printf-frexpl: # Code from module printf-posix: # Code from module printf-safe: # Code from module progname: # Code from module raise: # Code from module rawmemchr: # Code from module read: # Code from module read-file: # Code from module readlink: # Code from module realloc-posix: # Code from module regex: # Code from module relocatable-prog: # Code from module relocatable-prog-wrapper: # Code from module rename: # Code from module rmdir: # Code from module round: # Code from module safe-read: # Code from module safe-write: # Code from module same-inode: # Code from module secure_getenv: # Code from module select: # Code from module setenv: # Code from module sigaction: # Code from module signal-h: # Code from module signbit: # Code from module sigprocmask: # Code from module size_max: # Code from module snippet/_Noreturn: # Code from module snippet/arg-nonnull: # Code from module snippet/c++defs: # Code from module snippet/unused-parameter: # Code from module snippet/warn-on-use: # Code from module snprintf: # Code from module snprintf-posix: # Code from module socketlib: # Code from module sockets: # Code from module socklen: # Code from module sprintf-posix: # Code from module ssize_t: # Code from module stat: # Code from module stdalign: # Code from module stdarg: dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode dnl for the builtin va_copy to work. With Autoconf 2.60 or later, dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99 dnl shouldn't hurt, though installers are on their own to set c99 mode. gl_PROG_CC_C99 # Code from module stdbool: # Code from module stddef: # Code from module stdint: # Code from module stdio: # Code from module stdlib: # Code from module stpcpy: # Code from module strcase: # Code from module strcasestr: # Code from module strcasestr-simple: # Code from module strdup-posix: # Code from module streq: # Code from module strerror: # Code from module strerror-override: # Code from module strftime: # Code from module string: # Code from module strings: # Code from module strncat: # Code from module strndup: # Code from module strnlen: # Code from module strsep: # Code from module strtod: # Code from module strtok_r: # Code from module sys_select: # Code from module sys_socket: # Code from module sys_stat: # Code from module sys_time: # Code from module sys_types: # Code from module sys_uio: # Code from module tempname: # Code from module termios: # Code from module threadlib: gl_THREADLIB_EARLY # Code from module time: # Code from module time_r: # Code from module time_rz: # Code from module timegm: # Code from module tmpdir: # Code from module trunc: # Code from module tzset: # Code from module unicase/base: # Code from module unicase/cased: # Code from module unicase/empty-prefix-context: # Code from module unicase/empty-suffix-context: # Code from module unicase/ignorable: # Code from module unicase/special-casing: # Code from module unicase/tocasefold: # Code from module unicase/tolower: # Code from module unicase/toupper: # Code from module unicase/u8-casecmp: # Code from module unicase/u8-casefold: # Code from module unicase/u8-casemap: # Code from module unicase/u8-ct-casefold: # Code from module unicase/u8-tolower: # Code from module unicase/u8-toupper: # Code from module unictype/base: # Code from module unictype/category-none: # Code from module unictype/category-of: # Code from module unictype/combining-class: # Code from module unictype/ctype-print: # Code from module unictype/property-soft-dotted: # Code from module unigbrk/base: # Code from module unigbrk/uc-gbrk-prop: # Code from module unigbrk/uc-is-grapheme-break: # Code from module unilbrk/base: # Code from module unilbrk/tables: # Code from module unilbrk/u8-possible-linebreaks: # Code from module uninorm/base: # Code from module uninorm/canonical-decomposition: # Code from module uninorm/compat-decomposition: # Code from module uninorm/decompose-internal: # Code from module uninorm/decomposing-form: # Code from module uninorm/decomposition: # Code from module uninorm/decomposition-table: # Code from module uninorm/nfd: # Code from module uninorm/nfkd: # Code from module uninorm/u8-normalize: # Code from module unistd: # Code from module unistr/base: # Code from module unistr/u8-check: # Code from module unistr/u8-cmp: # Code from module unistr/u8-cmp2: # Code from module unistr/u8-cpy: # Code from module unistr/u8-mblen: # Code from module unistr/u8-mbtouc: # Code from module unistr/u8-mbtouc-unsafe: # Code from module unistr/u8-mbtoucr: # Code from module unistr/u8-strlen: # Code from module unistr/u8-strmbtouc: # Code from module unistr/u8-strncat: # Code from module unistr/u8-uctomb: # Code from module unitypes: # Code from module uniwidth/base: # Code from module uniwidth/u8-strwidth: # Code from module uniwidth/u8-width: # Code from module uniwidth/width: # Code from module unlocked-io: # Code from module unsetenv: # Code from module vasnprintf: # Code from module vasprintf: # Code from module vasprintf-posix: # Code from module verify: # Code from module version-etc: # Code from module version-etc-fsf: # Code from module vfprintf-posix: # Code from module vprintf-posix: # Code from module vsnprintf: # Code from module vsnprintf-posix: # Code from module vsprintf-posix: # Code from module wchar: # Code from module wcrtomb: # Code from module wctype-h: # Code from module wcwidth: # Code from module write: # Code from module xalloc: # Code from module xalloc-die: # Code from module xalloc-oversized: # Code from module xlist: # Code from module xmalloca: # Code from module xmemdup0: # Code from module xreadlink: # Code from module xsize: # Code from module xstrndup: # Code from module xvasprintf: ]) # This macro should be invoked from ./configure.ac, in the section # "Check for header files, types and library functions". AC_DEFUN([gl_INIT], [ AM_CONDITIONAL([GL_COND_LIBTOOL], [true]) gl_cond_libtool=true gl_m4_base='gl/m4' m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) m4_pushdef([gl_LIBSOURCES_LIST], []) m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gl' changequote(,)dnl LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'` changequote([, ])dnl AC_SUBST([LTALLOCA]) gl_FUNC_ALLOCA gl_ASSERT gl_FUNC_BTOWC if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then AC_LIBOBJ([btowc]) gl_PREREQ_BTOWC fi gl_WCHAR_MODULE_INDICATOR([btowc]) gl___BUILTIN_EXPECT gl_BYTESWAP gl_C_STRTOD gl_PREREQ_VASNPRINTF_WITH_EXTRAS gl_CANONICALIZE_LGPL if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then AC_LIBOBJ([canonicalize-lgpl]) fi gl_MODULE_INDICATOR([canonicalize-lgpl]) gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name]) gl_STDLIB_MODULE_INDICATOR([realpath]) AC_CHECK_FUNCS_ONCE([readlinkat]) gl_UNISTD_MODULE_INDICATOR([chdir]) AC_DEFINE([SIGNAL_SAFE_LIST], [1], [Define if lists must be signal-safe.]) gl_FUNC_CLOSE if test $REPLACE_CLOSE = 1; then AC_LIBOBJ([close]) fi gl_UNISTD_MODULE_INDICATOR([close]) gl_CONFIGMAKE_PREP gl_COUNT_ONE_BITS gl_MD4 gl_DIRNAME gl_MODULE_INDICATOR([dirname]) gl_DIRNAME_LGPL gl_DOUBLE_SLASH_ROOT AC_REQUIRE([gl_C99_STRTOLD]) gl_FUNC_DUP2 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then AC_LIBOBJ([dup2]) gl_PREREQ_DUP2 fi gl_UNISTD_MODULE_INDICATOR([dup2]) gl_ENVIRON gl_UNISTD_MODULE_INDICATOR([environ]) gl_HEADER_ERRNO_H gl_ERROR if test $ac_cv_lib_error_at_line = no; then AC_LIBOBJ([error]) gl_PREREQ_ERROR fi m4_ifdef([AM_XGETTEXT_OPTION], [AM_][XGETTEXT_OPTION([--flag=error:3:c-format]) AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])]) AC_REQUIRE([gl_EXTERN_INLINE]) gl_FATAL_SIGNAL gl_FUNC_FCNTL if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then AC_LIBOBJ([fcntl]) fi gl_FCNTL_MODULE_INDICATOR([fcntl]) gl_FCNTL_H AC_C_FLEXIBLE_ARRAY_MEMBER gl_FLOAT_H if test $REPLACE_FLOAT_LDBL = 1; then AC_LIBOBJ([float]) fi if test $REPLACE_ITOLD = 1; then AC_LIBOBJ([itold]) fi gl_FUNC_FLOOR if test $REPLACE_FLOOR = 1; then AC_LIBOBJ([floor]) fi gl_MATH_MODULE_INDICATOR([floor]) gl_FUNC_FPRINTF_POSIX gl_STDIO_MODULE_INDICATOR([fprintf-posix]) gl_FUNC_FREXP_NO_LIBM if test $gl_func_frexp_no_libm != yes; then AC_LIBOBJ([frexp]) fi gl_MATH_MODULE_INDICATOR([frexp]) gl_FUNC_FREXPL_NO_LIBM if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then AC_LIBOBJ([frexpl]) fi gl_MATH_MODULE_INDICATOR([frexpl]) gl_FUNC_FSEEK if test $REPLACE_FSEEK = 1; then AC_LIBOBJ([fseek]) fi gl_STDIO_MODULE_INDICATOR([fseek]) gl_FUNC_FSEEKO if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then AC_LIBOBJ([fseeko]) gl_PREREQ_FSEEKO fi gl_STDIO_MODULE_INDICATOR([fseeko]) gl_FUNC_FSETERR if test $ac_cv_func___fseterr = no; then AC_LIBOBJ([fseterr]) fi gl_FUNC_FSTAT if test $REPLACE_FSTAT = 1; then AC_LIBOBJ([fstat]) case "$host_os" in mingw*) AC_LIBOBJ([stat-w32]) ;; esac gl_PREREQ_FSTAT fi gl_SYS_STAT_MODULE_INDICATOR([fstat]) gl_FUNC_FTELL if test $REPLACE_FTELL = 1; then AC_LIBOBJ([ftell]) fi gl_STDIO_MODULE_INDICATOR([ftell]) gl_FUNC_FTELLO if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then AC_LIBOBJ([ftello]) gl_PREREQ_FTELLO fi gl_STDIO_MODULE_INDICATOR([ftello]) gl_MODULE_INDICATOR([fwriteerror]) gl_FUNC_GETDELIM if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then AC_LIBOBJ([getdelim]) gl_PREREQ_GETDELIM fi gl_STDIO_MODULE_INDICATOR([getdelim]) gl_FUNC_GETDTABLESIZE if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then AC_LIBOBJ([getdtablesize]) gl_PREREQ_GETDTABLESIZE fi gl_UNISTD_MODULE_INDICATOR([getdtablesize]) gl_FUNC_GETLINE if test $REPLACE_GETLINE = 1; then AC_LIBOBJ([getline]) gl_PREREQ_GETLINE fi gl_STDIO_MODULE_INDICATOR([getline]) gl_FUNC_GETOPT_GNU dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are dnl done in the getopt-posix module. gl_FUNC_GETOPT_POSIX if test $REPLACE_GETOPT = 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) dnl Arrange for unistd.h to include getopt.h. GNULIB_GL_UNISTD_H_GETOPT=1 fi AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) gl_FUNC_GETPASS if test $HAVE_GETPASS = 0; then AC_LIBOBJ([getpass]) gl_PREREQ_GETPASS fi gl_FUNC_GETPROGNAME dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac. AM_GNU_GETTEXT_VERSION([0.18.1]) AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) gl_FUNC_GETTIMEOFDAY if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then AC_LIBOBJ([gettimeofday]) gl_PREREQ_GETTIMEOFDAY fi gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) gl_HARD_LOCALE gl_INLINE gl_INTTOSTR gl_ISFINITE if test $REPLACE_ISFINITE = 1; then AC_LIBOBJ([isfinite]) fi gl_MATH_MODULE_INDICATOR([isfinite]) gl_ISINF if test $REPLACE_ISINF = 1; then AC_LIBOBJ([isinf]) fi gl_MATH_MODULE_INDICATOR([isinf]) gl_ISNAN gl_MATH_MODULE_INDICATOR([isnan]) gl_FUNC_ISNAND m4_ifdef([gl_ISNAN], [ AC_REQUIRE([gl_ISNAN]) ]) if test $HAVE_ISNAND = 0 || test $REPLACE_ISNAN = 1; then AC_LIBOBJ([isnand]) gl_PREREQ_ISNAND fi gl_MATH_MODULE_INDICATOR([isnand]) gl_FUNC_ISNAND_NO_LIBM if test $gl_func_isnand_no_libm != yes; then AC_LIBOBJ([isnand]) gl_PREREQ_ISNAND fi gl_FUNC_ISNANF m4_ifdef([gl_ISNAN], [ AC_REQUIRE([gl_ISNAN]) ]) if test $HAVE_ISNANF = 0 || test $REPLACE_ISNAN = 1; then AC_LIBOBJ([isnanf]) gl_PREREQ_ISNANF fi gl_MATH_MODULE_INDICATOR([isnanf]) gl_FUNC_ISNANF_NO_LIBM if test $gl_func_isnanf_no_libm != yes; then AC_LIBOBJ([isnanf]) gl_PREREQ_ISNANF fi gl_FUNC_ISNANL m4_ifdef([gl_ISNAN], [ AC_REQUIRE([gl_ISNAN]) ]) if test $HAVE_ISNANL = 0 || test $REPLACE_ISNAN = 1; then AC_LIBOBJ([isnanl]) gl_PREREQ_ISNANL fi gl_MATH_MODULE_INDICATOR([isnanl]) gl_FUNC_ISNANL_NO_LIBM if test $gl_func_isnanl_no_libm != yes; then AC_LIBOBJ([isnanl]) gl_PREREQ_ISNANL fi gl_FUNC_ISWBLANK if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then : else if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then AC_LIBOBJ([iswblank]) fi fi gl_WCTYPE_MODULE_INDICATOR([iswblank]) gl_LANGINFO_H AC_REQUIRE([gl_LARGEFILE]) gl_LIMITS_H gl_LOCALCHARSET LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) gl_LOCALE_H gl_FUNC_LOCALECONV if test $REPLACE_LOCALECONV = 1; then AC_LIBOBJ([localeconv]) gl_PREREQ_LOCALECONV fi gl_LOCALE_MODULE_INDICATOR([localeconv]) AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) AC_LIBOBJ([localtime-buffer]) gl_LOCK gl_MODULE_INDICATOR([lock]) gl_FUNC_LSEEK if test $REPLACE_LSEEK = 1; then AC_LIBOBJ([lseek]) fi gl_UNISTD_MODULE_INDICATOR([lseek]) gl_FUNC_LSTAT if test $REPLACE_LSTAT = 1; then AC_LIBOBJ([lstat]) gl_PREREQ_LSTAT fi gl_SYS_STAT_MODULE_INDICATOR([lstat]) gl_FUNC_MALLOC_POSIX if test $REPLACE_MALLOC = 1; then AC_LIBOBJ([malloc]) fi gl_STDLIB_MODULE_INDICATOR([malloc-posix]) gl_MALLOCA gl_MATH_H gl_MBCHAR gl_MBITER gl_FUNC_MBRTOWC if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then AC_LIBOBJ([mbrtowc]) gl_PREREQ_MBRTOWC fi gl_WCHAR_MODULE_INDICATOR([mbrtowc]) gl_FUNC_MBSINIT if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then AC_LIBOBJ([mbsinit]) gl_PREREQ_MBSINIT fi gl_WCHAR_MODULE_INDICATOR([mbsinit]) gl_FUNC_MBTOWC if test $REPLACE_MBTOWC = 1; then AC_LIBOBJ([mbtowc]) gl_PREREQ_MBTOWC fi gl_STDLIB_MODULE_INDICATOR([mbtowc]) gl_MEMCASECMP gl_FUNC_MEMCHR if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then AC_LIBOBJ([memchr]) gl_PREREQ_MEMCHR fi gl_STRING_MODULE_INDICATOR([memchr]) gl_FUNC_MEMPCPY if test $HAVE_MEMPCPY = 0; then AC_LIBOBJ([mempcpy]) gl_PREREQ_MEMPCPY fi gl_STRING_MODULE_INDICATOR([mempcpy]) gl_FUNC_MEMRCHR if test $ac_cv_func_memrchr = no; then AC_LIBOBJ([memrchr]) gl_PREREQ_MEMRCHR fi gl_STRING_MODULE_INDICATOR([memrchr]) gl_MINMAX gl_FUNC_MKDTEMP if test $HAVE_MKDTEMP = 0; then AC_LIBOBJ([mkdtemp]) gl_PREREQ_MKDTEMP fi gl_STDLIB_MODULE_INDICATOR([mkdtemp]) gl_FUNC_MKSTEMP if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then AC_LIBOBJ([mkstemp]) gl_PREREQ_MKSTEMP fi gl_STDLIB_MODULE_INDICATOR([mkstemp]) gl_FUNC_MKTIME if test $REPLACE_MKTIME = 1; then AC_LIBOBJ([mktime]) gl_PREREQ_MKTIME fi gl_TIME_MODULE_INDICATOR([mktime]) gl_FUNC_MKTIME_INTERNAL if test $WANT_MKTIME_INTERNAL = 1; then AC_LIBOBJ([mktime]) gl_PREREQ_MKTIME fi AC_REQUIRE([gl_MSVC_INVAL]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then AC_LIBOBJ([msvc-inval]) fi AC_REQUIRE([gl_MSVC_NOTHROW]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then AC_LIBOBJ([msvc-nothrow]) fi gl_MODULE_INDICATOR([msvc-nothrow]) gl_MULTIARCH gl_FUNC_NL_LANGINFO if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then AC_LIBOBJ([nl_langinfo]) fi gl_LANGINFO_MODULE_INDICATOR([nl_langinfo]) gl_FUNC_OPEN if test $REPLACE_OPEN = 1; then AC_LIBOBJ([open]) gl_PREREQ_OPEN fi gl_FCNTL_MODULE_INDICATOR([open]) gl_PATHMAX gl_FUNC_PIPE2 gl_UNISTD_MODULE_INDICATOR([pipe2]) gl_FUNC_PRINTF_FREXP gl_FUNC_PRINTF_FREXPL gl_FUNC_PRINTF_POSIX gl_STDIO_MODULE_INDICATOR([printf-posix]) m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes]) AC_CHECK_DECLS([program_invocation_name], [], [], [#include ]) AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include ]) gl_FUNC_RAISE if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then AC_LIBOBJ([raise]) gl_PREREQ_RAISE fi gl_SIGNAL_MODULE_INDICATOR([raise]) gl_FUNC_RAWMEMCHR if test $HAVE_RAWMEMCHR = 0; then AC_LIBOBJ([rawmemchr]) gl_PREREQ_RAWMEMCHR fi gl_STRING_MODULE_INDICATOR([rawmemchr]) gl_FUNC_READ if test $REPLACE_READ = 1; then AC_LIBOBJ([read]) gl_PREREQ_READ fi gl_UNISTD_MODULE_INDICATOR([read]) gl_PREREQ_READ_FILE gl_FUNC_READLINK if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then AC_LIBOBJ([readlink]) gl_PREREQ_READLINK fi gl_UNISTD_MODULE_INDICATOR([readlink]) gl_FUNC_REALLOC_POSIX if test $REPLACE_REALLOC = 1; then AC_LIBOBJ([realloc]) fi gl_STDLIB_MODULE_INDICATOR([realloc-posix]) gl_REGEX if test $ac_use_included_regex = yes; then AC_LIBOBJ([regex]) gl_PREREQ_REGEX fi gl_RELOCATABLE([$gl_source_base]) if test $RELOCATABLE = yes; then AC_LIBOBJ([progreloc]) AC_LIBOBJ([relocatable]) fi gl_FUNC_READLINK_SEPARATE gl_CANONICALIZE_LGPL_SEPARATE gl_MALLOCA gl_RELOCATABLE_LIBRARY gl_FUNC_SETENV_SEPARATE gl_FUNC_RENAME if test $REPLACE_RENAME = 1; then AC_LIBOBJ([rename]) fi gl_STDIO_MODULE_INDICATOR([rename]) gl_FUNC_RMDIR if test $REPLACE_RMDIR = 1; then AC_LIBOBJ([rmdir]) fi gl_UNISTD_MODULE_INDICATOR([rmdir]) gl_FUNC_ROUND if test $HAVE_ROUND = 0 || test $REPLACE_ROUND = 1; then AC_LIBOBJ([round]) fi gl_MATH_MODULE_INDICATOR([round]) gl_PREREQ_SAFE_READ gl_PREREQ_SAFE_WRITE gl_FUNC_SECURE_GETENV if test $HAVE_SECURE_GETENV = 0; then AC_LIBOBJ([secure_getenv]) gl_PREREQ_SECURE_GETENV fi gl_STDLIB_MODULE_INDICATOR([secure_getenv]) gl_FUNC_SELECT if test $REPLACE_SELECT = 1; then AC_LIBOBJ([select]) fi gl_SYS_SELECT_MODULE_INDICATOR([select]) gl_FUNC_SETENV if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then AC_LIBOBJ([setenv]) fi gl_STDLIB_MODULE_INDICATOR([setenv]) gl_SIGACTION if test $HAVE_SIGACTION = 0; then AC_LIBOBJ([sigaction]) gl_PREREQ_SIGACTION fi gl_SIGNAL_MODULE_INDICATOR([sigaction]) gl_SIGNAL_H gl_SIGNBIT if test $REPLACE_SIGNBIT = 1; then AC_LIBOBJ([signbitf]) AC_LIBOBJ([signbitd]) AC_LIBOBJ([signbitl]) fi gl_MATH_MODULE_INDICATOR([signbit]) gl_SIGNALBLOCKING if test $HAVE_POSIX_SIGNALBLOCKING = 0; then AC_LIBOBJ([sigprocmask]) gl_PREREQ_SIGPROCMASK fi gl_SIGNAL_MODULE_INDICATOR([sigprocmask]) gl_SIZE_MAX gl_FUNC_SNPRINTF gl_STDIO_MODULE_INDICATOR([snprintf]) gl_MODULE_INDICATOR([snprintf]) gl_FUNC_SNPRINTF_POSIX AC_REQUIRE([gl_SOCKETLIB]) AC_REQUIRE([gl_SOCKETS]) gl_TYPE_SOCKLEN_T gl_FUNC_SPRINTF_POSIX gl_STDIO_MODULE_INDICATOR([sprintf-posix]) gt_TYPE_SSIZE_T gl_FUNC_STAT if test $REPLACE_STAT = 1; then AC_LIBOBJ([stat]) case "$host_os" in mingw*) AC_LIBOBJ([stat-w32]) ;; esac gl_PREREQ_STAT fi gl_SYS_STAT_MODULE_INDICATOR([stat]) gl_STDALIGN_H gl_STDARG_H AM_STDBOOL_H gl_STDDEF_H gl_STDINT_H gl_STDIO_H gl_STDLIB_H gl_FUNC_STPCPY if test $HAVE_STPCPY = 0; then AC_LIBOBJ([stpcpy]) gl_PREREQ_STPCPY fi gl_STRING_MODULE_INDICATOR([stpcpy]) gl_STRCASE if test $HAVE_STRCASECMP = 0; then AC_LIBOBJ([strcasecmp]) gl_PREREQ_STRCASECMP fi if test $HAVE_STRNCASECMP = 0; then AC_LIBOBJ([strncasecmp]) gl_PREREQ_STRNCASECMP fi gl_FUNC_STRCASESTR if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then AC_LIBOBJ([strcasestr]) gl_PREREQ_STRCASESTR fi gl_FUNC_STRCASESTR_SIMPLE if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then AC_LIBOBJ([strcasestr]) gl_PREREQ_STRCASESTR fi gl_STRING_MODULE_INDICATOR([strcasestr]) gl_FUNC_STRDUP_POSIX if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then AC_LIBOBJ([strdup]) gl_PREREQ_STRDUP fi gl_STRING_MODULE_INDICATOR([strdup]) gl_FUNC_STRERROR if test $REPLACE_STRERROR = 1; then AC_LIBOBJ([strerror]) fi gl_MODULE_INDICATOR([strerror]) gl_STRING_MODULE_INDICATOR([strerror]) AC_REQUIRE([gl_HEADER_ERRNO_H]) AC_REQUIRE([gl_FUNC_STRERROR_0]) if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then AC_LIBOBJ([strerror-override]) gl_PREREQ_SYS_H_WINSOCK2 fi gl_FUNC_GNU_STRFTIME gl_HEADER_STRING_H gl_HEADER_STRINGS_H gl_FUNC_STRNCAT if test $REPLACE_STRNCAT = 1; then AC_LIBOBJ([strncat]) gl_PREREQ_STRNCAT fi gl_STRING_MODULE_INDICATOR([strncat]) gl_FUNC_STRNDUP if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then AC_LIBOBJ([strndup]) fi gl_STRING_MODULE_INDICATOR([strndup]) gl_FUNC_STRNLEN if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then AC_LIBOBJ([strnlen]) gl_PREREQ_STRNLEN fi gl_STRING_MODULE_INDICATOR([strnlen]) gl_FUNC_STRSEP if test $HAVE_STRSEP = 0; then AC_LIBOBJ([strsep]) gl_PREREQ_STRSEP fi gl_STRING_MODULE_INDICATOR([strsep]) gl_FUNC_STRTOD if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then AC_LIBOBJ([strtod]) gl_PREREQ_STRTOD fi gl_STDLIB_MODULE_INDICATOR([strtod]) gl_FUNC_STRTOK_R if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then AC_LIBOBJ([strtok_r]) gl_PREREQ_STRTOK_R fi gl_STRING_MODULE_INDICATOR([strtok_r]) AC_REQUIRE([gl_HEADER_SYS_SELECT]) AC_PROG_MKDIR_P AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_PROG_MKDIR_P gl_HEADER_SYS_STAT_H AC_PROG_MKDIR_P gl_HEADER_SYS_TIME_H AC_PROG_MKDIR_P gl_SYS_TYPES_H AC_PROG_MKDIR_P gl_HEADER_SYS_UIO AC_PROG_MKDIR_P gl_FUNC_GEN_TEMPNAME gl_TERMIOS_H gl_THREADLIB gl_HEADER_TIME_H gl_TIME_R if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then AC_LIBOBJ([time_r]) gl_PREREQ_TIME_R fi gl_TIME_MODULE_INDICATOR([time_r]) gl_TIME_RZ if test $HAVE_TIMEZONE_T = 0; then AC_LIBOBJ([time_rz]) fi gl_TIME_MODULE_INDICATOR([time_rz]) gl_FUNC_TIMEGM if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then AC_LIBOBJ([timegm]) gl_PREREQ_TIMEGM fi gl_TIME_MODULE_INDICATOR([timegm]) gt_TMPDIR gl_FUNC_TRUNC if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then AC_LIBOBJ([trunc]) fi gl_MATH_MODULE_INDICATOR([trunc]) gl_FUNC_TZSET if test $HAVE_TZSET = 0 || test $REPLACE_TZSET = 1; then AC_LIBOBJ([tzset]) fi gl_TIME_MODULE_INDICATOR([tzset]) gl_LIBUNISTRING_LIBHEADER([0.9.4], [unicase.h]) AC_REQUIRE([AC_C_INLINE]) gl_LIBUNISTRING_MODULE([0.9.1], [unicase/empty-prefix-context]) gl_LIBUNISTRING_MODULE([0.9.1], [unicase/empty-suffix-context]) AC_REQUIRE([AC_C_INLINE]) gl_LIBUNISTRING_MODULE([0.9.6], [unicase/tolower]) gl_LIBUNISTRING_MODULE([0.9.6], [unicase/toupper]) gl_LIBUNISTRING_MODULE([0.9.6], [unicase/u8-casecmp]) gl_LIBUNISTRING_MODULE([0.9.6], [unicase/u8-casefold]) gl_LIBUNISTRING_MODULE([0.9.6], [unicase/u8-ct-casefold]) gl_LIBUNISTRING_MODULE([0.9.6], [unicase/u8-tolower]) gl_LIBUNISTRING_MODULE([0.9.6], [unicase/u8-toupper]) gl_LIBUNISTRING_LIBHEADER([0.9.4], [unictype.h]) gl_LIBUNISTRING_MODULE([0.9.5], [unictype/category-none]) AC_REQUIRE([AC_C_INLINE]) gl_LIBUNISTRING_MODULE([0.9.6], [unictype/category-of]) gl_LIBUNISTRING_MODULE([0.9.6], [unictype/combining-class]) AC_REQUIRE([AC_C_INLINE]) gl_LIBUNISTRING_MODULE([0.9.6], [unictype/ctype-print]) AC_REQUIRE([AC_C_INLINE]) gl_LIBUNISTRING_MODULE([0.9.6], [unictype/property-soft-dotted]) gl_LIBUNISTRING_LIBHEADER([0.9.4], [unigbrk.h]) gl_LIBUNISTRING_MODULE([0.9.6], [unigbrk/uc-gbrk-prop]) gl_LIBUNISTRING_MODULE([0.9.6], [unigbrk/uc-is-grapheme-break]) gl_LIBUNISTRING_LIBHEADER([0.9.4], [unilbrk.h]) AC_REQUIRE([AC_C_INLINE]) gl_LIBUNISTRING_MODULE([0.9.6], [unilbrk/u8-possible-linebreaks]) gl_LIBUNISTRING_LIBHEADER([0.9.4], [uninorm.h]) gl_LIBUNISTRING_MODULE([0.9.6], [uninorm/canonical-decomposition]) gl_LIBUNISTRING_MODULE([0.9.5], [uninorm/decomposing-form]) gl_LIBUNISTRING_MODULE([0.9.6], [uninorm/decomposition]) AC_REQUIRE([AC_C_INLINE]) gl_LIBUNISTRING_MODULE([0.9.6], [uninorm/nfd]) gl_LIBUNISTRING_MODULE([0.9.6], [uninorm/nfkd]) gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u8-normalize]) gl_LIBUNISTRING_MODULE([0.9.6], [uninorm/u8-normalize]) gl_UNISTD_H gl_LIBUNISTRING_LIBHEADER([0.9.4], [unistr.h]) gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-check]) gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-cmp]) gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-cmp2]) gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-cpy]) gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-mblen]) gl_MODULE_INDICATOR([unistr/u8-mbtouc]) gl_LIBUNISTRING_MODULE([0.9.4], [unistr/u8-mbtouc]) gl_MODULE_INDICATOR([unistr/u8-mbtouc-unsafe]) gl_LIBUNISTRING_MODULE([0.9.4], [unistr/u8-mbtouc-unsafe]) gl_MODULE_INDICATOR([unistr/u8-mbtoucr]) gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-mbtoucr]) gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-strlen]) gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-strmbtouc]) gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-strncat]) gl_MODULE_INDICATOR([unistr/u8-uctomb]) gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-uctomb]) gl_LIBUNISTRING_LIBHEADER([0.9.4], [unitypes.h]) gl_LIBUNISTRING_LIBHEADER([0.9.4], [uniwidth.h]) gl_LIBUNISTRING_MODULE([0.9.6], [uniwidth/u8-strwidth]) gl_LIBUNISTRING_MODULE([0.9.6], [uniwidth/u8-width]) gl_LIBUNISTRING_MODULE([0.9.6], [uniwidth/width]) gl_FUNC_GLIBC_UNLOCKED_IO gl_FUNC_UNSETENV if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then AC_LIBOBJ([unsetenv]) gl_PREREQ_UNSETENV fi gl_STDLIB_MODULE_INDICATOR([unsetenv]) gl_FUNC_VASNPRINTF gl_FUNC_VASPRINTF gl_STDIO_MODULE_INDICATOR([vasprintf]) m4_ifdef([AM_XGETTEXT_OPTION], [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format]) AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])]) gl_FUNC_VASPRINTF_POSIX gl_VERSION_ETC gl_FUNC_VFPRINTF_POSIX gl_STDIO_MODULE_INDICATOR([vfprintf-posix]) gl_FUNC_VPRINTF_POSIX gl_STDIO_MODULE_INDICATOR([vprintf-posix]) gl_FUNC_VSNPRINTF gl_STDIO_MODULE_INDICATOR([vsnprintf]) gl_FUNC_VSNPRINTF_POSIX gl_FUNC_VSPRINTF_POSIX gl_STDIO_MODULE_INDICATOR([vsprintf-posix]) gl_WCHAR_H gl_FUNC_WCRTOMB if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then AC_LIBOBJ([wcrtomb]) gl_PREREQ_WCRTOMB fi gl_WCHAR_MODULE_INDICATOR([wcrtomb]) gl_WCTYPE_H gl_FUNC_WCWIDTH if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then AC_LIBOBJ([wcwidth]) fi gl_WCHAR_MODULE_INDICATOR([wcwidth]) gl_FUNC_WRITE if test $REPLACE_WRITE = 1; then AC_LIBOBJ([write]) gl_PREREQ_WRITE fi gl_UNISTD_MODULE_INDICATOR([write]) gl_XALLOC AC_LIBOBJ([xmemdup0]) gl_XSIZE gl_XSTRNDUP gl_XVASPRINTF m4_ifdef([AM_XGETTEXT_OPTION], [AM_][XGETTEXT_OPTION([--flag=xasprintf:1:c-format])]) # End of code from modules m4_ifval(gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || for gl_file in ]gl_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gl_LIBSOURCES_DIR]) m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) ]) gltests_libdeps= gltests_ltlibdeps= m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) m4_pushdef([gltests_LIBSOURCES_LIST], []) m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='tests' changequote(,)dnl gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS changequote([, ])dnl AC_SUBST([gltests_WITNESS]) gl_module_indicator_condition=$gltests_WITNESS m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) m4_popdef([gl_MODULE_INDICATOR_CONDITION]) m4_ifval(gltests_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || for gl_file in ]gltests_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gltests_LIBSOURCES_DIR]) m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) ]) ]) # Like AC_LIBOBJ, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_LIBOBJ], [ AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gl_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gl_LIBSOURCES_DIR], [gl]) m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # Like AC_LIBOBJ, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_LIBOBJ], [ AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gltests_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gltests_LIBSOURCES_DIR], [tests]) m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ build-aux/config.libpath build-aux/config.rpath build-aux/gitlog-to-changelog build-aux/install-reloc build-aux/reloc-ldflags doc/relocatable.texi lib/_Noreturn.h lib/alloca.c lib/alloca.in.h lib/allocator.c lib/allocator.h lib/anytostr.c lib/areadlink.c lib/areadlink.h lib/arg-nonnull.h lib/array-mergesort.h lib/asnprintf.c lib/asprintf.c lib/basename-lgpl.c lib/basename.c lib/binary-io.c lib/binary-io.h lib/btowc.c lib/byteswap.in.h lib/c++defs.h lib/c-asprintf.c lib/c-ctype.c lib/c-ctype.h lib/c-snprintf.c lib/c-snprintf.h lib/c-strcase.h lib/c-strcasecmp.c lib/c-strcasestr.c lib/c-strcasestr.h lib/c-strncasecmp.c lib/c-strtod.c lib/c-strtod.h lib/c-vasnprintf.c lib/c-vasnprintf.h lib/c-vasprintf.c lib/c-vasprintf.h lib/c-xasprintf.c lib/c-xvasprintf.c lib/c-xvasprintf.h lib/canonicalize-lgpl.c lib/careadlinkat.c lib/careadlinkat.h lib/clean-temp.c lib/clean-temp.h lib/close.c lib/config.charset lib/count-one-bits.c lib/count-one-bits.h lib/crc.c lib/crc.h lib/dirname-lgpl.c lib/dirname.c lib/dirname.h lib/dosname.h lib/dtoastr.c lib/dup2.c lib/errno.in.h lib/error.c lib/error.h lib/exitfail.c lib/exitfail.h lib/fatal-signal.c lib/fatal-signal.h lib/fcntl.c lib/fcntl.in.h lib/fd-hook.c lib/fd-hook.h lib/filename.h lib/flexmember.h lib/float+.h lib/float.c lib/float.in.h lib/floor.c lib/fprintf.c lib/fpucw.h lib/frexp.c lib/frexpl.c lib/fseek.c lib/fseeko.c lib/fseterr.c lib/fseterr.h lib/fstat.c lib/ftell.c lib/ftello.c lib/ftoastr.c lib/ftoastr.h lib/full-read.c lib/full-read.h lib/full-write.c lib/full-write.h lib/fwriteerror.c lib/fwriteerror.h lib/getdelim.c lib/getdtablesize.c lib/getline.c lib/getopt-cdefs.in.h lib/getopt-core.h lib/getopt-ext.h lib/getopt-pfx-core.h lib/getopt-pfx-ext.h lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h lib/getpass.c lib/getpass.h lib/getprogname.c lib/getprogname.h lib/gettext.h lib/gettimeofday.c lib/gl_anyhash_list1.h lib/gl_anyhash_list2.h lib/gl_anylinked_list1.h lib/gl_anylinked_list2.h lib/gl_linkedhash_list.c lib/gl_linkedhash_list.h lib/gl_list.c lib/gl_list.h lib/gl_xlist.c lib/gl_xlist.h lib/glthread/lock.c lib/glthread/lock.h lib/glthread/threadlib.c lib/hard-locale.c lib/hard-locale.h lib/imaxtostr.c lib/intprops.h lib/inttostr.c lib/inttostr.h lib/isfinite.c lib/isinf.c lib/isnan.c lib/isnand-nolibm.h lib/isnand.c lib/isnanf-nolibm.h lib/isnanf.c lib/isnanl-nolibm.h lib/isnanl.c lib/iswblank.c lib/itold.c lib/langinfo.in.h lib/limits.in.h lib/localcharset.c lib/localcharset.h lib/locale.in.h lib/localeconv.c lib/localtime-buffer.c lib/localtime-buffer.h lib/lseek.c lib/lstat.c lib/malloc.c lib/malloca.c lib/malloca.h lib/malloca.valgrind lib/math.c lib/math.in.h lib/mbchar.c lib/mbchar.h lib/mbiter.c lib/mbiter.h lib/mbrtowc.c lib/mbsinit.c lib/mbtowc-impl.h lib/mbtowc.c lib/md4.c lib/md4.h lib/memcasecmp.c lib/memcasecmp.h lib/memchr.c lib/memchr.valgrind lib/memchr2.c lib/memchr2.h lib/memchr2.valgrind lib/mempcpy.c lib/memrchr.c lib/minmax.h lib/mkdtemp.c lib/mkstemp.c lib/mktime-internal.h lib/mktime.c lib/msvc-inval.c lib/msvc-inval.h lib/msvc-nothrow.c lib/msvc-nothrow.h lib/nl_langinfo.c lib/offtostr.c lib/open.c lib/pathmax.h lib/pipe2.c lib/printf-args.c lib/printf-args.h lib/printf-frexp.c lib/printf-frexp.h lib/printf-frexpl.c lib/printf-frexpl.h lib/printf-parse.c lib/printf-parse.h lib/printf.c lib/progname.c lib/progname.h lib/progreloc.c lib/raise.c lib/rawmemchr.c lib/rawmemchr.valgrind lib/read-file.c lib/read-file.h lib/read.c lib/readlink.c lib/realloc.c lib/ref-add.sin lib/ref-del.sin lib/regcomp.c lib/regex.c lib/regex.h lib/regex_internal.c lib/regex_internal.h lib/regexec.c lib/relocatable.c lib/relocatable.h lib/relocwrapper.c lib/rename.c lib/rijndael-alg-fst.c lib/rijndael-alg-fst.h lib/rijndael-api-fst.c lib/rijndael-api-fst.h lib/rmdir.c lib/round.c lib/safe-read.c lib/safe-read.h lib/safe-write.c lib/safe-write.h lib/same-inode.h lib/secure_getenv.c lib/select.c lib/setenv.c lib/sig-handler.c lib/sig-handler.h lib/sigaction.c lib/signal.in.h lib/signbitd.c lib/signbitf.c lib/signbitl.c lib/sigprocmask.c lib/size_max.h lib/snprintf.c lib/sockets.c lib/sockets.h lib/sprintf.c lib/stat-w32.c lib/stat-w32.h lib/stat.c lib/stdalign.in.h lib/stdarg.in.h lib/stdbool.in.h lib/stddef.in.h lib/stdint.in.h lib/stdio-impl.h lib/stdio.in.h lib/stdlib.in.h lib/stpcpy.c lib/str-two-way.h lib/strcasecmp.c lib/strcasestr.c lib/strdup.c lib/streq.h lib/strerror-override.c lib/strerror-override.h lib/strerror.c lib/strftime.c lib/strftime.h lib/string.in.h lib/strings.in.h lib/stripslash.c lib/strncasecmp.c lib/strncat.c lib/strndup.c lib/strnlen.c lib/strsep.c lib/strtod.c lib/strtok_r.c lib/sys_select.in.h lib/sys_socket.c lib/sys_socket.in.h lib/sys_stat.in.h lib/sys_time.in.h lib/sys_types.in.h lib/sys_uio.in.h lib/tempname.c lib/tempname.h lib/termios.in.h lib/time-internal.h lib/time.in.h lib/time_r.c lib/time_rz.c lib/timegm.c lib/tmpdir.c lib/tmpdir.h lib/trunc.c lib/tzset.c lib/uinttostr.c lib/umaxtostr.c lib/unicase.in.h lib/unicase/cased.c lib/unicase/cased.h lib/unicase/casefold.h lib/unicase/caseprop.h lib/unicase/context.h lib/unicase/empty-prefix-context.c lib/unicase/empty-suffix-context.c lib/unicase/ignorable.c lib/unicase/ignorable.h lib/unicase/simple-mapping.h lib/unicase/special-casing-table.gperf lib/unicase/special-casing.c lib/unicase/special-casing.in.h lib/unicase/tocasefold.c lib/unicase/tocasefold.h lib/unicase/tolower.c lib/unicase/tolower.h lib/unicase/toupper.c lib/unicase/toupper.h lib/unicase/u-casecmp.h lib/unicase/u-casefold.h lib/unicase/u-casemap.h lib/unicase/u-ct-casefold.h lib/unicase/u8-casecmp.c lib/unicase/u8-casefold.c lib/unicase/u8-casemap.c lib/unicase/u8-ct-casefold.c lib/unicase/u8-tolower.c lib/unicase/u8-toupper.c lib/unicase/unicasemap.h lib/unictype.in.h lib/unictype/bitmap.h lib/unictype/categ_none.c lib/unictype/categ_of.c lib/unictype/categ_of.h lib/unictype/combiningclass.c lib/unictype/combiningclass.h lib/unictype/ctype_print.c lib/unictype/ctype_print.h lib/unictype/pr_soft_dotted.c lib/unictype/pr_soft_dotted.h lib/unigbrk.in.h lib/unigbrk/gbrkprop.h lib/unigbrk/uc-gbrk-prop.c lib/unigbrk/uc-is-grapheme-break.c lib/unilbrk.in.h lib/unilbrk/lbrkprop1.h lib/unilbrk/lbrkprop2.h lib/unilbrk/lbrktables.c lib/unilbrk/lbrktables.h lib/unilbrk/u8-possible-linebreaks.c lib/uninorm.in.h lib/uninorm/canonical-decomposition.c lib/uninorm/compat-decomposition.c lib/uninorm/decompose-internal.c lib/uninorm/decompose-internal.h lib/uninorm/decomposing-form.c lib/uninorm/decomposition-table.c lib/uninorm/decomposition-table.h lib/uninorm/decomposition-table1.h lib/uninorm/decomposition-table2.h lib/uninorm/decomposition.c lib/uninorm/nfd.c lib/uninorm/nfkd.c lib/uninorm/normalize-internal.h lib/uninorm/u-normalize-internal.h lib/uninorm/u8-normalize.c lib/unistd.c lib/unistd.in.h lib/unistr.in.h lib/unistr/u-cmp2.h lib/unistr/u-cpy.h lib/unistr/u8-check.c lib/unistr/u8-cmp.c lib/unistr/u8-cmp2.c lib/unistr/u8-cpy.c lib/unistr/u8-mblen.c lib/unistr/u8-mbtouc-aux.c lib/unistr/u8-mbtouc-unsafe-aux.c lib/unistr/u8-mbtouc-unsafe.c lib/unistr/u8-mbtouc.c lib/unistr/u8-mbtoucr.c lib/unistr/u8-strlen.c lib/unistr/u8-strmbtouc.c lib/unistr/u8-strncat.c lib/unistr/u8-uctomb-aux.c lib/unistr/u8-uctomb.c lib/unitypes.in.h lib/uniwidth.in.h lib/uniwidth/cjk.h lib/uniwidth/u8-strwidth.c lib/uniwidth/u8-width.c lib/uniwidth/width.c lib/unlocked-io.h lib/unsetenv.c lib/unused-parameter.h lib/vasnprintf.c lib/vasnprintf.h lib/vasprintf.c lib/verify.h lib/version-etc-fsf.c lib/version-etc.c lib/version-etc.h lib/vfprintf.c lib/vprintf.c lib/vsnprintf.c lib/vsprintf.c lib/w32sock.h lib/warn-on-use.h lib/wchar.in.h lib/wcrtomb.c lib/wctype-h.c lib/wctype.in.h lib/wcwidth.c lib/write.c lib/xalloc-die.c lib/xalloc-oversized.h lib/xalloc.h lib/xasprintf.c lib/xmalloc.c lib/xmalloca.c lib/xmalloca.h lib/xmemdup0.c lib/xmemdup0.h lib/xreadlink.c lib/xreadlink.h lib/xsize.c lib/xsize.h lib/xstrndup.c lib/xstrndup.h lib/xvasprintf.c lib/xvasprintf.h m4/00gnulib.m4 m4/absolute-header.m4 m4/alloca.m4 m4/asm-underscore.m4 m4/assert.m4 m4/btowc.m4 m4/builtin-expect.m4 m4/byteswap.m4 m4/c-strtod.m4 m4/canonicalize.m4 m4/ceil.m4 m4/check-math-lib.m4 m4/close.m4 m4/codeset.m4 m4/configmake.m4 m4/count-one-bits.m4 m4/dirname.m4 m4/double-slash-root.m4 m4/dup2.m4 m4/eealloc.m4 m4/environ.m4 m4/errno_h.m4 m4/error.m4 m4/exponentd.m4 m4/exponentf.m4 m4/exponentl.m4 m4/extensions.m4 m4/extern-inline.m4 m4/fatal-signal.m4 m4/fcntl-o.m4 m4/fcntl.m4 m4/fcntl_h.m4 m4/flexmember.m4 m4/float_h.m4 m4/floor.m4 m4/fpieee.m4 m4/fprintf-posix.m4 m4/frexp.m4 m4/frexpl.m4 m4/fseek.m4 m4/fseeko.m4 m4/fseterr.m4 m4/fstat.m4 m4/ftell.m4 m4/ftello.m4 m4/getdelim.m4 m4/getdtablesize.m4 m4/getline.m4 m4/getopt.m4 m4/getpass.m4 m4/getprogname.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc2.m4 m4/glibc21.m4 m4/gnulib-common.m4 m4/hard-locale.m4 m4/iconv.m4 m4/include_next.m4 m4/inline.m4 m4/intdiv0.m4 m4/intl.m4 m4/intldir.m4 m4/intlmacosx.m4 m4/intmax.m4 m4/intmax_t.m4 m4/inttostr.m4 m4/inttypes-pri.m4 m4/inttypes_h.m4 m4/isfinite.m4 m4/isinf.m4 m4/isnan.m4 m4/isnand.m4 m4/isnanf.m4 m4/isnanl.m4 m4/iswblank.m4 m4/langinfo_h.m4 m4/largefile.m4 m4/lcmessage.m4 m4/ldexp.m4 m4/ldexpl.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/libunistring-base.m4 m4/limits-h.m4 m4/localcharset.m4 m4/locale-fr.m4 m4/locale-ja.m4 m4/locale-zh.m4 m4/locale_h.m4 m4/localeconv.m4 m4/localtime-buffer.m4 m4/lock.m4 m4/longlong.m4 m4/lseek.m4 m4/lstat.m4 m4/malloc.m4 m4/malloca.m4 m4/math_h.m4 m4/mbchar.m4 m4/mbiter.m4 m4/mbrtowc.m4 m4/mbsinit.m4 m4/mbstate_t.m4 m4/mbtowc.m4 m4/md4.m4 m4/memcasecmp.m4 m4/memchr.m4 m4/mempcpy.m4 m4/memrchr.m4 m4/minmax.m4 m4/mkdtemp.m4 m4/mkstemp.m4 m4/mktime.m4 m4/mmap-anon.m4 m4/mode_t.m4 m4/msvc-inval.m4 m4/msvc-nothrow.m4 m4/multiarch.m4 m4/nl_langinfo.m4 m4/nls.m4 m4/nocrash.m4 m4/off_t.m4 m4/open.m4 m4/pathmax.m4 m4/pipe2.m4 m4/po.m4 m4/printf-frexp.m4 m4/printf-frexpl.m4 m4/printf-posix-rpl.m4 m4/printf-posix.m4 m4/printf.m4 m4/progtest.m4 m4/pthread_rwlock_rdlock.m4 m4/raise.m4 m4/rawmemchr.m4 m4/read-file.m4 m4/read.m4 m4/readlink.m4 m4/realloc.m4 m4/regex.m4 m4/relocatable-lib.m4 m4/relocatable.m4 m4/rename.m4 m4/rmdir.m4 m4/round.m4 m4/safe-read.m4 m4/safe-write.m4 m4/secure_getenv.m4 m4/select.m4 m4/setenv.m4 m4/sig_atomic_t.m4 m4/sigaction.m4 m4/signal_h.m4 m4/signalblocking.m4 m4/signbit.m4 m4/size_max.m4 m4/snprintf-posix.m4 m4/snprintf.m4 m4/socketlib.m4 m4/sockets.m4 m4/socklen.m4 m4/sockpfaf.m4 m4/sprintf-posix.m4 m4/ssize_t.m4 m4/stat.m4 m4/stdalign.m4 m4/stdarg.m4 m4/stdbool.m4 m4/stddef_h.m4 m4/stdint.m4 m4/stdint_h.m4 m4/stdio_h.m4 m4/stdlib_h.m4 m4/stpcpy.m4 m4/strcase.m4 m4/strcasestr.m4 m4/strdup.m4 m4/strerror.m4 m4/strftime.m4 m4/string_h.m4 m4/strings_h.m4 m4/strncat.m4 m4/strndup.m4 m4/strnlen.m4 m4/strsep.m4 m4/strtod.m4 m4/strtok_r.m4 m4/sys_select_h.m4 m4/sys_socket_h.m4 m4/sys_stat_h.m4 m4/sys_time_h.m4 m4/sys_types_h.m4 m4/sys_uio_h.m4 m4/tempname.m4 m4/termios_h.m4 m4/threadlib.m4 m4/time_h.m4 m4/time_r.m4 m4/time_rz.m4 m4/timegm.m4 m4/tm_gmtoff.m4 m4/tmpdir.m4 m4/trunc.m4 m4/tzset.m4 m4/uintmax_t.m4 m4/unistd_h.m4 m4/unlocked-io.m4 m4/vasnprintf.m4 m4/vasprintf-posix.m4 m4/vasprintf.m4 m4/version-etc.m4 m4/vfprintf-posix.m4 m4/visibility.m4 m4/vprintf-posix.m4 m4/vsnprintf-posix.m4 m4/vsnprintf.m4 m4/vsprintf-posix.m4 m4/warn-on-use.m4 m4/wchar_h.m4 m4/wchar_t.m4 m4/wcrtomb.m4 m4/wctype_h.m4 m4/wcwidth.m4 m4/wint_t.m4 m4/write.m4 m4/xalloc.m4 m4/xsize.m4 m4/xstrndup.m4 m4/xvasprintf.m4 ]) pspp-1.0.1/gl/m4/strtod.m40000644000175000017500000001016113132510757012122 00000000000000# strtod.m4 serial 23 dnl Copyright (C) 2002-2003, 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRTOD], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles m4_ifdef([gl_FUNC_STRTOD_OBSOLETE], [ dnl Test whether strtod is declared. dnl Don't call AC_FUNC_STRTOD, because it does not have the right guess dnl when cross-compiling. dnl Don't call AC_CHECK_FUNCS([strtod]) because it would collide with the dnl ac_cv_func_strtod variable set by the AC_FUNC_STRTOD macro. AC_CHECK_DECLS_ONCE([strtod]) if test $ac_cv_have_decl_strtod != yes; then HAVE_STRTOD=0 fi ]) if test $HAVE_STRTOD = 1; then AC_CACHE_CHECK([whether strtod obeys C99], [gl_cv_func_strtod_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include /* Compare two numbers with ==. This is a separate function because IRIX 6.5 "cc -O" miscompiles an 'x == x' test. */ static int numeric_equal (double x, double y) { return x == y; } ]], [[ int result = 0; { /* In some old versions of Linux (2000 or before), strtod mis-parses strings with leading '+'. */ const char *string = " +69"; char *term; double value = strtod (string, &term); if (value != 69 || term != (string + 4)) result |= 1; } { /* Under Solaris 2.4, strtod returns the wrong value for the terminating character under some conditions. */ const char *string = "NaN"; char *term; strtod (string, &term); if (term != string && *(term - 1) == 0) result |= 2; } { /* Older glibc and Cygwin mis-parse "-0x". */ const char *string = "-0x"; char *term; double value = strtod (string, &term); double zero = 0.0; if (1.0 / value != -1.0 / zero || term != (string + 2)) result |= 4; } { /* Many platforms do not parse hex floats. */ const char *string = "0XaP+1"; char *term; double value = strtod (string, &term); if (value != 20.0 || term != (string + 6)) result |= 8; } { /* Many platforms do not parse infinities. HP-UX 11.31 parses inf, but mistakenly sets errno. */ const char *string = "inf"; char *term; double value; errno = 0; value = strtod (string, &term); if (value != HUGE_VAL || term != (string + 3) || errno) result |= 16; } { /* glibc 2.7 and cygwin 1.5.24 misparse "nan()". */ const char *string = "nan()"; char *term; double value = strtod (string, &term); if (numeric_equal (value, value) || term != (string + 5)) result |= 32; } { /* darwin 10.6.1 misparses "nan(". */ const char *string = "nan("; char *term; double value = strtod (string, &term); if (numeric_equal (value, value) || term != (string + 3)) result |= 64; } return result; ]])], [gl_cv_func_strtod_works=yes], [gl_cv_func_strtod_works=no], [dnl The last known bugs in glibc strtod(), as of this writing, dnl were fixed in version 2.8 AC_EGREP_CPP([Lucky user], [ #include #ifdef __GNU_LIBRARY__ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) || (__GLIBC__ > 2)) \ && !defined __UCLIBC__ Lucky user #endif #endif ], [gl_cv_func_strtod_works="guessing yes"], [case "$host_os" in # Guess yes on native Windows. mingw*) gl_cv_func_strtod_works="guessing yes" ;; *) gl_cv_func_strtod_works="guessing no" ;; esac ]) ]) ]) case "$gl_cv_func_strtod_works" in *yes) ;; *) REPLACE_STRTOD=1 ;; esac fi ]) # Prerequisites of lib/strtod.c. AC_DEFUN([gl_PREREQ_STRTOD], [ AC_REQUIRE([gl_CHECK_LDEXP_NO_LIBM]) if test $gl_cv_func_ldexp_no_libm = yes; then AC_DEFINE([HAVE_LDEXP_IN_LIBC], [1], [Define if the ldexp function is available in libc.]) fi ]) pspp-1.0.1/gl/m4/memchr.m40000644000175000017500000000577713132510756012076 00000000000000# memchr.m4 serial 13 dnl Copyright (C) 2002-2004, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_FUNC_MEMCHR], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) AC_CHECK_FUNCS_ONCE([mprotect]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) m4_ifdef([gl_FUNC_MEMCHR_OBSOLETE], [ dnl These days, we assume memchr is present. But if support for old dnl platforms is desired: AC_CHECK_FUNCS_ONCE([memchr]) if test $ac_cv_func_memchr = no; then HAVE_MEMCHR=0 fi ]) if test $HAVE_MEMCHR = 1; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 # http://bugzilla.redhat.com/499689 # memchr should not dereference overestimated length after a match # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #if HAVE_SYS_MMAN_H # include # include # include # include # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif ]], [[ int result = 0; char *fence = NULL; #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) fence = two_pages + pagesize; } #endif if (fence) { if (memchr (fence, 0, 0)) result |= 1; strcpy (fence - 9, "12345678"); if (memchr (fence - 9, 0, 79) != fence - 1) result |= 2; if (memchr (fence - 1, 0, 3) != fence - 1) result |= 4; } return result; ]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], [case "$host_os" in # Guess yes on native Windows. mingw*) gl_cv_func_memchr_works="guessing yes" ;; # Be pessimistic for now. *) gl_cv_func_memchr_works="guessing no" ;; esac ]) ]) case "$gl_cv_func_memchr_works" in *yes) ;; *) REPLACE_MEMCHR=1 ;; esac fi ]) # Prerequisites of lib/memchr.c. AC_DEFUN([gl_PREREQ_MEMCHR], [ AC_CHECK_HEADERS([bp-sym.h]) ]) pspp-1.0.1/gl/m4/ldexpl.m40000644000175000017500000000763013132510756012101 00000000000000# ldexpl.m4 serial 17 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_LDEXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) AC_REQUIRE([gl_FUNC_ISNANL]) dnl for ISNANL_LIBM dnl Persuade glibc to declare ldexpl(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) dnl Check whether it's declared. dnl Mac OS X 10.3 has ldexpl() in libc but doesn't declare it in . AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include ]]) LDEXPL_LIBM= if test $HAVE_DECL_LDEXPL = 1; then gl_CHECK_LDEXPL_NO_LIBM if test $gl_cv_func_ldexpl_no_libm = no; then AC_CACHE_CHECK([whether ldexpl() can be used with libm], [gl_cv_func_ldexpl_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include long double x;]], [[return ldexpl (x, -1) > 0;]])], [gl_cv_func_ldexpl_in_libm=yes], [gl_cv_func_ldexpl_in_libm=no]) LIBS="$save_LIBS" ]) if test $gl_cv_func_ldexpl_in_libm = yes; then LDEXPL_LIBM=-lm fi fi if test $gl_cv_func_ldexpl_no_libm = yes \ || test $gl_cv_func_ldexpl_in_libm = yes; then save_LIBS="$LIBS" LIBS="$LIBS $LDEXPL_LIBM" gl_FUNC_LDEXPL_WORKS LIBS="$save_LIBS" case "$gl_cv_func_ldexpl_works" in *yes) gl_func_ldexpl=yes ;; *) gl_func_ldexpl=no; REPLACE_LDEXPL=1 ;; esac else gl_func_ldexpl=no fi if test $gl_func_ldexpl = yes; then AC_DEFINE([HAVE_LDEXPL], [1], [Define if the ldexpl() function is available.]) fi fi if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then dnl Find libraries needed to link lib/ldexpl.c. if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then AC_REQUIRE([gl_FUNC_LDEXP]) LDEXPL_LIBM="$LDEXP_LIBM" else LDEXPL_LIBM="$ISNANL_LIBM" fi fi AC_SUBST([LDEXPL_LIBM]) ]) dnl Test whether ldexpl() can be used without linking with libm. dnl Set gl_cv_func_ldexpl_no_libm to 'yes' or 'no' accordingly. AC_DEFUN([gl_CHECK_LDEXPL_NO_LIBM], [ AC_CACHE_CHECK([whether ldexpl() can be used without linking with libm], [gl_cv_func_ldexpl_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include long double x;]], [[return ldexpl (x, -1) > 0;]])], [gl_cv_func_ldexpl_no_libm=yes], [gl_cv_func_ldexpl_no_libm=no]) ]) ]) dnl Test whether ldexpl() works on finite numbers (this fails on AIX 5.1 dnl and Mac OS X 10.4/PowerPC). AC_DEFUN([gl_FUNC_LDEXPL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether ldexpl works], [gl_cv_func_ldexpl_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include extern #ifdef __cplusplus "C" #endif long double ldexpl (long double, int); int main() { int result = 0; { volatile long double x = 1.0; volatile long double y = ldexpl (x, -1); if (y != 0.5L) result |= 1; } { volatile long double x = 1.73205L; volatile long double y = ldexpl (x, 0); if (y != x) result |= 2; } return result; }]])], [gl_cv_func_ldexpl_works=yes], [gl_cv_func_ldexpl_works=no], [ changequote(,)dnl case "$host_os" in aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;; # Guess yes on native Windows. mingw*) gl_cv_func_ldexpl_works="guessing yes" ;; *) gl_cv_func_ldexpl_works="guessing yes" ;; esac changequote([,])dnl ]) ]) ]) pspp-1.0.1/gl/m4/asm-underscore.m40000644000175000017500000000440213124536242013531 00000000000000# asm-underscore.m4 serial 3 dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. Based on as-underscore.m4 in GNU clisp. # gl_ASM_SYMBOL_PREFIX # Tests for the prefix of C symbols at the assembly language level and the # linker level. This prefix is either an underscore or empty. Defines the # C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to # a stringified variant of this prefix. AC_DEFUN([gl_ASM_SYMBOL_PREFIX], [ dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because dnl 1. It works only for GCC. dnl 2. It is incorrectly defined on some platforms, in some GCC versions. AC_REQUIRE([gl_C_ASM]) AC_CACHE_CHECK( [whether C symbols are prefixed with underscore at the linker level], [gl_cv_prog_as_underscore], [cat > conftest.c </dev/null 2>&1 if LC_ALL=C grep -E '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then gl_cv_prog_as_underscore=yes else gl_cv_prog_as_underscore=no fi rm -f conftest* ]) if test $gl_cv_prog_as_underscore = yes; then USER_LABEL_PREFIX=_ else USER_LABEL_PREFIX= fi AC_DEFINE_UNQUOTED([USER_LABEL_PREFIX], [$USER_LABEL_PREFIX], [Define to the prefix of C symbols at the assembler and linker level, either an underscore or empty.]) ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"' AC_SUBST([ASM_SYMBOL_PREFIX]) ]) # gl_C_ASM # Determines how to produce an assembly language file from C source code. # Sets the variables: # gl_asmext - the extension of assembly language output, # gl_c_asm_opt - the C compiler option that produces assembly language output. AC_DEFUN([gl_C_ASM], [ AC_EGREP_CPP([MicrosoftCompiler], [ #ifdef _MSC_VER MicrosoftCompiler #endif ], [gl_asmext='asm' gl_c_asm_opt='-c -Fa' ], [gl_asmext='s' gl_c_asm_opt='-S' ]) ]) pspp-1.0.1/gl/m4/strndup.m40000644000175000017500000000327413124536242012307 00000000000000# strndup.m4 serial 22 dnl Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRNDUP], [ dnl Persuade glibc to declare strndup(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([strndup]) AC_CHECK_FUNCS_ONCE([strndup]) if test $ac_cv_have_decl_strndup = no; then HAVE_DECL_STRNDUP=0 fi if test $ac_cv_func_strndup = yes; then HAVE_STRNDUP=1 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works], [AC_RUN_IFELSE([ AC_LANG_PROGRAM([[#include #include ]], [[ #if !HAVE_DECL_STRNDUP extern #ifdef __cplusplus "C" #endif char *strndup (const char *, size_t); #endif int result; char *s; s = strndup ("some longer string", 15); free (s); s = strndup ("shorter string", 13); result = s[13] != '\0'; free (s); return result;]])], [gl_cv_func_strndup_works=yes], [gl_cv_func_strndup_works=no], [ changequote(,)dnl case $host_os in aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; *) gl_cv_func_strndup_works="guessing yes";; esac changequote([,])dnl ])]) case $gl_cv_func_strndup_works in *no) REPLACE_STRNDUP=1 ;; esac else HAVE_STRNDUP=0 fi ]) pspp-1.0.1/gl/m4/exponentd.m40000644000175000017500000000755213124536242012617 00000000000000# exponentd.m4 serial 3 dnl Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DOUBLE_EXPONENT_LOCATION], [ AC_CACHE_CHECK([where to find the exponent in a 'double'], [gl_cv_cc_double_expbit0], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #include #define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { double value; unsigned int word[NWORDS]; } memory_double; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (double x) { memory_double m; size_t i; /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ memset (&m, 0, sizeof (memory_double)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25); add_to_ored_words (0.5); add_to_ored_words (1.0); add_to_ored_words (2.0); add_to_ored_words (4.0); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } ]])], [gl_cv_cc_double_expbit0=`cat conftest.out`], [gl_cv_cc_double_expbit0="unknown"], [ dnl On ARM, there are two 'double' floating-point formats, used by dnl different sets of instructions: The older FPA instructions assume dnl that they are stored in big-endian word order, while the words dnl (like integer types) are stored in little-endian byte order. dnl The newer VFP instructions assume little-endian order dnl consistently. AC_EGREP_CPP([mixed_endianness], [ #if defined arm || defined __arm || defined __arm__ mixed_endianness #endif ], [gl_cv_cc_double_expbit0="unknown"], [ pushdef([AC_MSG_CHECKING],[:])dnl pushdef([AC_MSG_RESULT],[:])dnl pushdef([AC_MSG_RESULT_UNQUOTED],[:])dnl AC_C_BIGENDIAN( [gl_cv_cc_double_expbit0="word 0 bit 20"], [gl_cv_cc_double_expbit0="word 1 bit 20"], [gl_cv_cc_double_expbit0="unknown"]) popdef([AC_MSG_RESULT_UNQUOTED])dnl popdef([AC_MSG_RESULT])dnl popdef([AC_MSG_CHECKING])dnl ]) ]) rm -f conftest.out ]) case "$gl_cv_cc_double_expbit0" in word*bit*) word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([DBL_EXPBIT0_WORD], [$word], [Define as the word index where to find the exponent of 'double'.]) AC_DEFINE_UNQUOTED([DBL_EXPBIT0_BIT], [$bit], [Define as the bit index in the word where to find bit 0 of the exponent of 'double'.]) ;; esac ]) pspp-1.0.1/gl/m4/mbtowc.m40000644000175000017500000000071413124536242012077 00000000000000# mbtowc.m4 serial 2 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBTOWC], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) if false; then REPLACE_MBTOWC=1 fi ]) # Prerequisites of lib/mbtowc.c. AC_DEFUN([gl_PREREQ_MBTOWC], [ : ]) pspp-1.0.1/gl/m4/memcasecmp.m40000644000175000017500000000046613124536242012722 00000000000000#serial 6 dnl Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MEMCASECMP], [ : ]) pspp-1.0.1/gl/m4/xalloc.m40000644000175000017500000000047213124536242012067 00000000000000# xalloc.m4 serial 18 dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XALLOC], [:]) pspp-1.0.1/gl/m4/sys_time_h.m40000644000175000017500000000734113124536242012752 00000000000000# Configure a replacement for . # serial 9 # Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert and Martin Lambers. AC_DEFUN([gl_HEADER_SYS_TIME_H], [ dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1 dnl statements that occur in other macros. AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) AC_CHECK_HEADERS_ONCE([sys/time.h]) gl_CHECK_NEXT_HEADERS([sys/time.h]) if test $ac_cv_header_sys_time_h != yes; then HAVE_SYS_TIME_H=0 fi dnl On native Windows with MSVC, 'struct timeval' is defined in dnl only. So include that header in the list. gl_PREREQ_SYS_H_WINSOCK2 AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#if HAVE_SYS_TIME_H #include #endif #include #if HAVE_WINSOCK2_H # include #endif ]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])], [gl_cv_sys_struct_timeval=yes], [gl_cv_sys_struct_timeval=no]) ]) if test $gl_cv_sys_struct_timeval != yes; then HAVE_STRUCT_TIMEVAL=0 else dnl On native Windows with a 64-bit 'time_t', 'struct timeval' is defined dnl (in and for mingw64, in only dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is dnl smaller than the 'time_t' type mandated by POSIX. dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but dnl that is good enough. AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member], [gl_cv_sys_struct_timeval_tv_sec], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#if HAVE_SYS_TIME_H #include #endif #include #if HAVE_WINSOCK2_H # include #endif ]], [[static struct timeval x; typedef int verify_tv_sec_type[ sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 ]; ]])], [gl_cv_sys_struct_timeval_tv_sec=yes], [gl_cv_sys_struct_timeval_tv_sec=no]) ]) if test $gl_cv_sys_struct_timeval_tv_sec != yes; then REPLACE_STRUCT_TIMEVAL=1 fi fi dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ #if HAVE_SYS_TIME_H # include #endif #include ]], [gettimeofday]) ]) AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], [ GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY]) dnl Assume POSIX behavior unless another module says otherwise. HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY]) HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H]) REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY]) REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL]) ]) pspp-1.0.1/gl/m4/memrchr.m40000644000175000017500000000125313124536242012240 00000000000000# memrchr.m4 serial 10 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MEMRCHR], [ dnl Persuade glibc to declare memrchr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([memrchr]) if test $ac_cv_have_decl_memrchr = no; then HAVE_DECL_MEMRCHR=0 fi AC_CHECK_FUNCS([memrchr]) ]) # Prerequisites of lib/memrchr.c. AC_DEFUN([gl_PREREQ_MEMRCHR], [:]) pspp-1.0.1/gl/m4/stdlib_h.m40000644000175000017500000001335513124536242012401 00000000000000# stdlib_h.m4 serial 43 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDLIB_H], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_NEXT_HEADERS([stdlib.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include #if HAVE_SYS_LOADAVG_H # include #endif #if HAVE_RANDOM_H # include #endif ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_STDLIB_H_DEFAULTS], [ GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R]) GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R]) HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME]) REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R]) REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) ]) pspp-1.0.1/gl/m4/lib-link.m40000644000175000017500000010044313124536242012305 00000000000000# lib-link.m4 serial 26 (gettext-0.18.2) dnl Copyright (C) 2001-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ([2.54]) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[m4_translit([$1],[./+-], [____])]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes popdef([NAME]) popdef([Name]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. The missing-message dnl defaults to 'no' and may contain additional hints for the user. dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) pushdef([Name],[m4_translit([$1],[./+-], [____])]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, dnl because these -l options might require -L options that are present in dnl LIBS. -l options benefit only from the -L options listed before it. dnl Otherwise, add it to the front of LIBS, because it may be a static dnl library that depends on another static library that is present in LIBS. dnl Static libraries benefit only from the static libraries listed after dnl it. case " $LIB[]NAME" in *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; *) LIBS="$LIB[]NAME $LIBS" ;; esac AC_LINK_IFELSE( [AC_LANG_PROGRAM([[$3]], [[$4]])], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) popdef([NAME]) popdef([Name]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_libname_spec, dnl acl_library_names_spec, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) pspp-1.0.1/gl/m4/safe-write.m40000644000175000017500000000061113124536242012646 00000000000000# safe-write.m4 serial 4 dnl Copyright (C) 2002, 2005-2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Prerequisites of lib/safe-write.c. AC_DEFUN([gl_PREREQ_SAFE_WRITE], [ gl_PREREQ_SAFE_READ ]) pspp-1.0.1/gl/m4/sys_types_h.m40000644000175000017500000000334013124536242013153 00000000000000# sys_types_h.m4 serial 8 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_SYS_TYPES_H], [ dnl Use sane struct stat types in OpenVMS 8.2 and later. AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.]) AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) gl_NEXT_HEADERS([sys/types.h]) dnl Ensure the type pid_t gets defined. AC_REQUIRE([AC_TYPE_PID_T]) dnl Ensure the type mode_t gets defined. AC_REQUIRE([AC_TYPE_MODE_T]) dnl Whether to override the 'off_t' type. AC_REQUIRE([gl_TYPE_OFF_T]) dnl Whether to override the 'dev_t' and 'ino_t' types. m4_ifdef([gl_WINDOWS_STAT_INODES], [ AC_REQUIRE([gl_WINDOWS_STAT_INODES]) ], [ WINDOWS_STAT_INODES=0 ]) AC_SUBST([WINDOWS_STAT_INODES]) ]) AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], [ ]) # This works around a buggy version in autoconf <= 2.69. # See m4_version_prereq([2.70], [], [ # This is taken from the following Autoconf patch: # http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98 m4_undefine([AC_HEADER_MAJOR]) AC_DEFUN([AC_HEADER_MAJOR], [AC_CHECK_HEADERS_ONCE([sys/types.h]) AC_CHECK_HEADER([sys/mkdev.h], [AC_DEFINE([MAJOR_IN_MKDEV], [1], [Define to 1 if `major', `minor', and `makedev' are declared in .])]) if test $ac_cv_header_sys_mkdev_h = no; then AC_CHECK_HEADER([sys/sysmacros.h], [AC_DEFINE([MAJOR_IN_SYSMACROS], [1], [Define to 1 if `major', `minor', and `makedev' are declared in .])]) fi ]) ]) pspp-1.0.1/gl/m4/raise.m40000644000175000017500000000177113124536242011713 00000000000000# raise.m4 serial 4 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_RAISE], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS([raise]) if test $ac_cv_func_raise = no; then HAVE_RAISE=0 else m4_ifdef([gl_MSVC_INVAL], [ AC_REQUIRE([gl_MSVC_INVAL]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_RAISE=1 fi ]) m4_ifdef([gl_SIGNALBLOCKING], [ gl_SIGNALBLOCKING if test $HAVE_POSIX_SIGNALBLOCKING = 0; then m4_ifdef([gl_SIGNAL_SIGPIPE], [ gl_SIGNAL_SIGPIPE if test $gl_cv_header_signal_h_SIGPIPE != yes; then REPLACE_RAISE=1 fi ], [:]) fi ]) fi ]) # Prerequisites of lib/raise.c. AC_DEFUN([gl_PREREQ_RAISE], [:]) pspp-1.0.1/gl/m4/mbstate_t.m40000644000175000017500000000256713124536242012576 00000000000000# mbstate_t.m4 serial 13 dnl Copyright (C) 2000-2002, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # From Paul Eggert. # BeOS 5 has but does not define mbstate_t, # so you can't declare an object of that type. # Check for this incompatibility with Standard C. # AC_TYPE_MBSTATE_T # ----------------- AC_DEFUN([AC_TYPE_MBSTATE_T], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11 AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT[ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]], [[mbstate_t x; return sizeof x;]])], [ac_cv_type_mbstate_t=yes], [ac_cv_type_mbstate_t=no])]) if test $ac_cv_type_mbstate_t = yes; then AC_DEFINE([HAVE_MBSTATE_T], [1], [Define to 1 if declares mbstate_t.]) else AC_DEFINE([mbstate_t], [int], [Define to a type if does not define.]) fi ]) pspp-1.0.1/gl/m4/sys_uio_h.m40000644000175000017500000000165413124536242012611 00000000000000# sys_uio_h.m4 serial 1 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HEADER_SYS_UIO], [ AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS]) dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([sys/uio.h]) if test $ac_cv_header_sys_uio_h = yes; then HAVE_SYS_UIO_H=1 else HAVE_SYS_UIO_H=0 fi AC_SUBST([HAVE_SYS_UIO_H]) ]) AC_DEFUN([gl_SYS_UIO_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_UIO_H_DEFAULTS], [ ]) pspp-1.0.1/gl/m4/locale-fr.m40000644000175000017500000002422513124536242012453 00000000000000# locale-fr.m4 serial 17 dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a french locale with traditional encoding. AC_DEFUN([gt_LOCALE_FR], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* ]) LOCALE_FR=$gt_cv_locale_fr AC_SUBST([LOCALE_FR]) ]) dnl Determine the name of a french locale with UTF-8 encoding. AC_DEFUN([gt_LOCALE_FR_UTF8], [ AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; #endif return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* ]) LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 AC_SUBST([LOCALE_FR_UTF8]) ]) pspp-1.0.1/gl/m4/nl_langinfo.m40000644000175000017500000000352413124536242013074 00000000000000# nl_langinfo.m4 serial 5 dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_NL_LANGINFO], [ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) AC_REQUIRE([gl_LANGINFO_H]) AC_CHECK_FUNCS_ONCE([nl_langinfo]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles if test $ac_cv_func_nl_langinfo = yes; then # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. AC_CACHE_CHECK([whether YESEXPR works], [gl_cv_func_nl_langinfo_yesexpr_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[return !*nl_langinfo(YESEXPR); ]])], [gl_cv_func_nl_langinfo_yesexpr_works=yes], [gl_cv_func_nl_langinfo_yesexpr_works=no], [ case "$host_os" in # Guess no on irix systems. irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; # Guess yes elsewhere. *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; esac ]) ]) case $gl_cv_func_nl_langinfo_yesexpr_works in *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; esac AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS], [$FUNC_NL_LANGINFO_YESEXPR_WORKS], [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.]) if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then : else REPLACE_NL_LANGINFO=1 AC_DEFINE([REPLACE_NL_LANGINFO], [1], [Define if nl_langinfo exists but is overridden by gnulib.]) fi else HAVE_NL_LANGINFO=0 fi ]) pspp-1.0.1/gl/m4/sys_socket_h.m40000644000175000017500000001416313124536242013304 00000000000000# sys_socket_h.m4 serial 23 dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Simon Josefsson. AC_DEFUN([gl_HEADER_SYS_SOCKET], [ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have dnl old-style declarations (with return type 'int' instead of 'ssize_t') dnl unless _POSIX_PII_SOCKET is defined. case "$host_os" in osf*) AC_DEFINE([_POSIX_PII_SOCKET], [1], [Define to 1 in order to get the POSIX compatible declarations of socket functions.]) ;; esac AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_socket_h_selfcontained], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [gl_cv_header_sys_socket_h_selfcontained=yes], [gl_cv_header_sys_socket_h_selfcontained=no]) ]) if test $gl_cv_header_sys_socket_h_selfcontained = yes; then dnl If the shutdown function exists, should define dnl SHUT_RD, SHUT_WR, SHUT_RDWR. AC_CHECK_FUNCS([shutdown]) if test $ac_cv_func_shutdown = yes; then AC_CACHE_CHECK([whether defines the SHUT_* macros], [gl_cv_header_sys_socket_h_shut], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])], [gl_cv_header_sys_socket_h_shut=yes], [gl_cv_header_sys_socket_h_shut=no]) ]) if test $gl_cv_header_sys_socket_h_shut = no; then SYS_SOCKET_H='sys/socket.h' fi fi fi # We need to check for ws2tcpip.h now. gl_PREREQ_SYS_H_SOCKET AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif ]) if test $ac_cv_type_struct_sockaddr_storage = no; then HAVE_STRUCT_SOCKADDR_STORAGE=0 fi if test $ac_cv_type_sa_family_t = no; then HAVE_SA_FAMILY_T=0 fi if test $ac_cv_type_struct_sockaddr_storage != no; then AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family], [], [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0], [#include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif ]) fi if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then SYS_SOCKET_H='sys/socket.h' fi gl_PREREQ_SYS_H_WINSOCK2 dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Some systems require prerequisite headers. */ #include #include ]], [socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4]) ]) AC_DEFUN([gl_PREREQ_SYS_H_SOCKET], [ dnl Check prerequisites of the replacement. AC_REQUIRE([gl_CHECK_SOCKET_HEADERS]) gl_CHECK_NEXT_HEADERS([sys/socket.h]) if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else HAVE_WS2TCPIP_H=0 fi fi AC_SUBST([HAVE_SYS_SOCKET_H]) AC_SUBST([HAVE_WS2TCPIP_H]) ]) # Common prerequisites of the replacement and of the # replacement. # Sets and substitutes HAVE_WINSOCK2_H. AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2], [ m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])]) m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])]) AC_CHECK_HEADERS_ONCE([sys/socket.h]) if test $ac_cv_header_sys_socket_h != yes; then dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make dnl the check for those headers unconditional; yet cygwin reports dnl that the headers are present but cannot be compiled (since on dnl cygwin, all socket information should come from sys/socket.h). AC_CHECK_HEADERS([winsock2.h]) fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi AC_SUBST([HAVE_WINSOCK2_H]) ]) AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], [ GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET]) GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT]) GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT]) GNULIB_BIND=0; AC_SUBST([GNULIB_BIND]) GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME]) GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME]) GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT]) GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN]) GNULIB_RECV=0; AC_SUBST([GNULIB_RECV]) GNULIB_SEND=0; AC_SUBST([GNULIB_SEND]) GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM]) GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO]) GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT]) GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN]) GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4]) HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE]) HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY]) HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T]) HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4]) ]) pspp-1.0.1/gl/m4/xvasprintf.m40000644000175000017500000000054313124536242013010 00000000000000# xvasprintf.m4 serial 2 dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Prerequisites of lib/xvasprintf.c. AC_DEFUN([gl_XVASPRINTF], [:]) pspp-1.0.1/gl/m4/socketlib.m40000644000175000017500000000524413124536242012566 00000000000000# socketlib.m4 serial 1 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl gl_SOCKETLIB dnl Determines the library to use for socket functions. dnl Sets and AC_SUBSTs LIBSOCKET. AC_DEFUN([gl_SOCKETLIB], [ gl_PREREQ_SYS_H_WINSOCK2 dnl for HAVE_WINSOCK2_H LIBSOCKET= if test $HAVE_WINSOCK2_H = 1; then dnl Native Windows API (not Cygwin). AC_CACHE_CHECK([if we need to call WSAStartup in winsock2.h and -lws2_32], [gl_cv_func_wsastartup], [ gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_WINSOCK2_H # include #endif]], [[ WORD wVersionRequested = MAKEWORD(1, 1); WSADATA wsaData; int err = WSAStartup(wVersionRequested, &wsaData); WSACleanup ();]])], gl_cv_func_wsastartup=yes, gl_cv_func_wsastartup=no) LIBS="$gl_save_LIBS" ]) if test "$gl_cv_func_wsastartup" = "yes"; then AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.]) LIBSOCKET='-lws2_32' fi else dnl Unix API. dnl Solaris has most socket functions in libsocket. dnl Haiku has most socket functions in libnetwork. dnl BeOS has most socket functions in libnet. AC_CACHE_CHECK([for library containing setsockopt], [gl_cv_lib_socket], [ gl_cv_lib_socket= AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern #ifdef __cplusplus "C" #endif char setsockopt();]], [[setsockopt();]])], [], [gl_save_LIBS="$LIBS" LIBS="$gl_save_LIBS -lsocket" AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern #ifdef __cplusplus "C" #endif char setsockopt();]], [[setsockopt();]])], [gl_cv_lib_socket="-lsocket"]) if test -z "$gl_cv_lib_socket"; then LIBS="$gl_save_LIBS -lnetwork" AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern #ifdef __cplusplus "C" #endif char setsockopt();]], [[setsockopt();]])], [gl_cv_lib_socket="-lnetwork"]) if test -z "$gl_cv_lib_socket"; then LIBS="$gl_save_LIBS -lnet" AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern #ifdef __cplusplus "C" #endif char setsockopt();]], [[setsockopt();]])], [gl_cv_lib_socket="-lnet"]) fi fi LIBS="$gl_save_LIBS" ]) if test -z "$gl_cv_lib_socket"; then gl_cv_lib_socket="none needed" fi ]) if test "$gl_cv_lib_socket" != "none needed"; then LIBSOCKET="$gl_cv_lib_socket" fi fi AC_SUBST([LIBSOCKET]) ]) pspp-1.0.1/gl/m4/nocrash.m40000644000175000017500000001060213124536242012236 00000000000000# nocrash.m4 serial 4 dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini. AC_PREREQ([2.13]) dnl Expands to some code for use in .c programs that will cause the configure dnl test to exit instead of crashing. This is useful to avoid triggering dnl action from a background debugger and to avoid core dumps. dnl Usage: ... dnl ]GL_NOCRASH[ dnl ... dnl int main() { nocrash_init(); ... } AC_DEFUN([GL_NOCRASH],[[ #include #if defined __MACH__ && defined __APPLE__ /* Avoid a crash on Mac OS X. */ #include #include #include #include #include #include /* The exception port on which our thread listens. */ static mach_port_t our_exception_port; /* The main function of the thread listening for exceptions of type EXC_BAD_ACCESS. */ static void * mach_exception_thread (void *arg) { /* Buffer for a message to be received. */ struct { mach_msg_header_t head; mach_msg_body_t msgh_body; char data[1024]; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); if (retval != MACH_MSG_SUCCESS) abort (); exit (1); } static void nocrash_init (void) { mach_port_t self = mach_task_self (); /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting for us. */ exception_mask_t mask = EXC_MASK_BAD_ACCESS; /* Create the thread listening on the exception port. */ pthread_attr_t attr; pthread_t thread; if (pthread_attr_init (&attr) == 0 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { pthread_attr_destroy (&attr); /* Replace the exception port info for these exceptions with our own. Note that we replace the exception port for the entire task, not only for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } } } } #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid a crash on native Windows. */ #define WIN32_LEAN_AND_MEAN #include #include static LONG WINAPI exception_filter (EXCEPTION_POINTERS *ExceptionInfo) { switch (ExceptionInfo->ExceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPTION_IN_PAGE_ERROR: case EXCEPTION_STACK_OVERFLOW: case EXCEPTION_GUARD_PAGE: case EXCEPTION_PRIV_INSTRUCTION: case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_DATATYPE_MISALIGNMENT: case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: case EXCEPTION_NONCONTINUABLE_EXCEPTION: exit (1); } return EXCEPTION_CONTINUE_SEARCH; } static void nocrash_init (void) { SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); } #else /* Avoid a crash on POSIX systems. */ #include #include /* A POSIX signal handler. */ static void exception_handler (int sig) { _exit (1); } static void nocrash_init (void) { #ifdef SIGSEGV signal (SIGSEGV, exception_handler); #endif #ifdef SIGBUS signal (SIGBUS, exception_handler); #endif } #endif ]]) pspp-1.0.1/gl/m4/limits-h.m40000644000175000017500000000202613124536241012327 00000000000000dnl Check whether limits.h has needed features. dnl Copyright 2016-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. AC_DEFUN_ONCE([gl_LIMITS_H], [ gl_CHECK_NEXT_HEADERS([limits.h]) AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.], [gl_cv_header_limits_width], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 #endif #include int ullw = ULLONG_WIDTH;]])], [gl_cv_header_limits_width=yes], [gl_cv_header_limits_width=no])]) if test "$gl_cv_header_limits_width" = yes; then LIMITS_H= else LIMITS_H=limits.h fi AC_SUBST([LIMITS_H]) AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) ]) pspp-1.0.1/gl/m4/open.m40000644000175000017500000000504613124536242011550 00000000000000# open.m4 serial 14 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_OPEN], [ AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in mingw* | pw*) REPLACE_OPEN=1 ;; *) dnl open("foo/") should not create a file when the file name has a dnl trailing slash. FreeBSD only has the problem on symlinks. AC_CHECK_FUNCS_ONCE([lstat]) AC_CACHE_CHECK([whether open recognizes a trailing slash], [gl_cv_func_open_slash], [# Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then touch conftest.tmp ln -s conftest.tmp conftest.lnk fi AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #if HAVE_UNISTD_H # include #endif int main () { int result = 0; #if HAVE_LSTAT if (open ("conftest.lnk/", O_RDONLY) != -1) result |= 1; #endif if (open ("conftest.sl/", O_CREAT, 0600) >= 0) result |= 2; return result; }]])], [gl_cv_func_open_slash=yes], [gl_cv_func_open_slash=no], [ changequote(,)dnl case "$host_os" in freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) gl_cv_func_open_slash="guessing no" ;; *) gl_cv_func_open_slash="guessing yes" ;; esac changequote([,])dnl ]) rm -f conftest.sl conftest.tmp conftest.lnk ]) case "$gl_cv_func_open_slash" in *no) AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], [Define to 1 if open() fails to recognize a trailing slash.]) REPLACE_OPEN=1 ;; esac ;; esac dnl Replace open() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ if test $REPLACE_OPEN = 0; then gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then REPLACE_OPEN=1 fi fi ]) dnl Replace open() for supporting the gnulib-defined O_NONBLOCK flag. m4_ifdef([gl_NONBLOCKING_IO], [ if test $REPLACE_OPEN = 0; then gl_NONBLOCKING_IO if test $gl_cv_have_open_O_NONBLOCK != yes; then REPLACE_OPEN=1 fi fi ]) ]) # Prerequisites of lib/open.c. AC_DEFUN([gl_PREREQ_OPEN], [ AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) : ]) pspp-1.0.1/gl/m4/locale-ja.m40000644000175000017500000001260313124536242012433 00000000000000# locale-ja.m4 serial 12 dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a japanese locale with EUC-JP encoding. AC_DEFUN([gt_LOCALE_JA], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Note that on native Windows, the Japanese locale is # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi ;; esac fi rm -fr conftest* ]) LOCALE_JA=$gt_cv_locale_ja AC_SUBST([LOCALE_JA]) ]) pspp-1.0.1/gl/m4/pathmax.m40000644000175000017500000000220413124536242012242 00000000000000# pathmax.m4 serial 10 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_PATHMAX], [ dnl Prerequisites of lib/pathmax.h. AC_CHECK_HEADERS_ONCE([sys/param.h]) ]) # Expands to a piece of C program that defines PATH_MAX in the same way as # "pathmax.h" will do. AC_DEFUN([gl_PATHMAX_SNIPPET], [[ /* Arrange to define PATH_MAX, like "pathmax.h" does. */ #if HAVE_UNISTD_H # include #endif #include #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include #endif #if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN #endif #ifdef __hpux # undef PATH_MAX # define PATH_MAX 1024 #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif ]]) # Prerequisites of gl_PATHMAX_SNIPPET. AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ], [ AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h]) ]) pspp-1.0.1/gl/m4/stat.m40000644000175000017500000000440613124536242011561 00000000000000# serial 12 # Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STAT], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([lstat]) case "$host_os" in mingw*) dnl On this platform, the original stat() returns st_atime, st_mtime, dnl st_ctime values that are affected by the time zone. REPLACE_STAT=1 ;; *) dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/"). dnl (For mingw, this is due to a broken stat() override in libmingwex.a.) dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/"). AC_CACHE_CHECK([whether stat handles trailing slashes on files], [gl_cv_func_stat_file_slash], [touch conftest.tmp # Assume that if we have lstat, we can also check symlinks. if test $ac_cv_func_lstat = yes; then ln -s conftest.tmp conftest.lnk fi AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[int result = 0; struct stat st; if (!stat ("conftest.tmp/", &st)) result |= 1; #if HAVE_LSTAT if (!stat ("conftest.lnk/", &st)) result |= 2; #endif return result; ]])], [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_stat_file_slash="guessing no" ;; esac ]) rm -f conftest.tmp conftest.lnk]) case $gl_cv_func_stat_file_slash in *no) REPLACE_STAT=1 AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs help when passed a file name with a trailing slash]);; esac ;; esac ]) # Prerequisites of lib/stat.c and lib/stat-w32.c. AC_DEFUN([gl_PREREQ_STAT], [ AC_REQUIRE([gl_HEADER_SYS_STAT_H]) : ]) pspp-1.0.1/gl/m4/read.m40000644000175000017500000000161013124536242011513 00000000000000# read.m4 serial 5 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_READ], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) m4_ifdef([gl_MSVC_INVAL], [ AC_REQUIRE([gl_MSVC_INVAL]) if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then REPLACE_READ=1 fi ]) dnl This ifdef is just an optimization, to avoid performing a configure dnl check whose result is not used. It does not make the test of dnl GNULIB_UNISTD_H_NONBLOCKING or GNULIB_NONBLOCKING redundant. m4_ifdef([gl_NONBLOCKING_IO], [ gl_NONBLOCKING_IO if test $gl_cv_have_nonblocking != yes; then REPLACE_READ=1 fi ]) ]) # Prerequisites of lib/read.c. AC_DEFUN([gl_PREREQ_READ], [:]) pspp-1.0.1/gl/m4/isinf.m40000644000175000017500000001222613132510756011716 00000000000000# isinf.m4 serial 12 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_ISINF], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) dnl Persuade glibc to declare isinf. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_DECLS([isinf], , , [[#include #ifndef isinf #error "isinf must be a macro, not a function" #endif ]]) if test "$ac_cv_have_decl_isinf" = yes; then gl_CHECK_MATH_LIB([ISINF_LIBM], [x = isinf (x) + isinf ((float) x);]) if test "$ISINF_LIBM" != missing; then dnl Test whether isinf() on 'long double' works. gl_ISINFL_WORKS case "$gl_cv_func_isinfl_works" in *yes) ;; *) ISINF_LIBM=missing;; esac fi fi if test "$ac_cv_have_decl_isinf" != yes || test "$ISINF_LIBM" = missing; then REPLACE_ISINF=1 dnl No libraries are needed to link lib/isinf.c. ISINF_LIBM= fi AC_SUBST([ISINF_LIBM]) ]) dnl Test whether isinf() works: dnl 1) Whether it correctly returns false for LDBL_MAX. dnl 2) Whether on 'long double' recognizes all canonical values which are dnl infinite. AC_DEFUN([gl_ISINFL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether isinf(long double) works], [gl_cv_func_isinfl_works], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { unsigned int word[NWORDS]; long double value; } memory_long_double; /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the runtime type conversion. */ #ifdef __sgi static long double NaNl () { double zero = 0.0; return zero / zero; } #else # define NaNl() (0.0L / 0.0L) #endif int main () { int result = 0; if (isinf (LDBL_MAX)) result |= 1; { memory_long_double m; unsigned int i; /* The isinf macro should be immune against changes in the sign bit and in the mantissa bits. The xor operation twiddles a bit that can only be a sign bit or a mantissa bit (since the exponent never extends to bit 31). */ m.value = NaNl (); m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); for (i = 0; i < NWORDS; i++) m.word[i] |= 1; if (isinf (m.value)) result |= 2; } #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else # define LDBL80_WORDS(exponent,manthi,mantlo) \ { mantlo, manthi, exponent } # endif { /* Quiet NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; if (isinf (x.value)) result |= 2; } { /* Signalling NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; if (isinf (x.value)) result |= 2; } /* isinf should return something even for noncanonical values. */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; if (isinf (x.value) && !isinf (x.value)) result |= 4; } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; if (isinf (x.value) && !isinf (x.value)) result |= 8; } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; if (isinf (x.value) && !isinf (x.value)) result |= 16; } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; if (isinf (x.value) && !isinf (x.value)) result |= 32; } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; if (isinf (x.value) && !isinf (x.value)) result |= 64; } #endif return result; }]])], [gl_cv_func_isinfl_works=yes], [gl_cv_func_isinfl_works=no], [case "$host_os" in mingw*) # Guess yes on mingw, no on MSVC. AC_EGREP_CPP([Known], [ #ifdef __MINGW32__ Known #endif ], [gl_cv_func_isinfl_works="guessing yes"], [gl_cv_func_isinfl_works="guessing no"]) ;; *) gl_cv_func_isinfl_works="guessing yes" ;; esac ]) ]) ]) pspp-1.0.1/gl/m4/strings_h.m40000644000175000017500000000316313124536242012605 00000000000000# Configure a replacement for . # serial 6 # Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HEADER_STRINGS_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_STRINGS_H_BODY]) ]) AC_DEFUN([gl_HEADER_STRINGS_H_BODY], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([strings.h]) if test $ac_cv_header_strings_h = yes; then HAVE_STRINGS_H=1 else HAVE_STRINGS_H=0 fi AC_SUBST([HAVE_STRINGS_H]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Minix 3.1.8 has a bug: must be included before . */ #include #include ]], [ffs strcasecmp strncasecmp]) ]) AC_DEFUN([gl_STRINGS_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS], [ GNULIB_FFS=0; AC_SUBST([GNULIB_FFS]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FFS=1; AC_SUBST([HAVE_FFS]) HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP]) ]) pspp-1.0.1/gl/m4/environ.m40000644000175000017500000000261613124536242012267 00000000000000# environ.m4 serial 6 dnl Copyright (C) 2001-2004, 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_ENVIRON], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl Persuade glibc to declare environ. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_HEADERS_ONCE([unistd.h]) gt_CHECK_VAR_DECL( [#if HAVE_UNISTD_H #include #endif /* mingw, BeOS, Haiku declare environ in , not in . */ #include ], [environ]) if test $gt_cv_var_environ_declaration != yes; then HAVE_DECL_ENVIRON=0 fi ]) # Check if a variable is properly declared. # gt_CHECK_VAR_DECL(includes,variable) AC_DEFUN([gt_CHECK_VAR_DECL], [ define([gt_cv_var], [gt_cv_var_]$2[_declaration]) AC_MSG_CHECKING([if $2 is properly declared]) AC_CACHE_VAL([gt_cv_var], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[$1 extern struct { int foo; } $2;]], [[$2.foo = 1;]])], [gt_cv_var=no], [gt_cv_var=yes])]) AC_MSG_RESULT([$gt_cv_var]) if test $gt_cv_var = yes; then AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1, [Define if you have the declaration of $2.]) fi undefine([gt_cv_var]) ]) pspp-1.0.1/gl/m4/stdalign.m40000644000175000017500000000442613124536242012415 00000000000000# Check for stdalign.h that conforms to C11. dnl Copyright 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Prepare for substituting if it is not supported. AC_DEFUN([gl_STDALIGN_H], [ AC_CACHE_CHECK([for working stdalign.h], [gl_cv_header_working_stdalign_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include #include /* Test that alignof yields a result consistent with offsetof. This catches GCC bug 52023 . */ #ifdef __cplusplus template struct alignof_helper { char a; t b; }; # define ao(type) offsetof (alignof_helper, b) #else # define ao(type) offsetof (struct { char a; type b; }, b) #endif char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; /* Test _Alignas only on platforms where gnulib can help. */ #if \ ((defined __cplusplus && 201103 <= __cplusplus) \ || (defined __APPLE__ && defined __MACH__ \ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ : __GNUC__) \ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ || 1300 <= _MSC_VER) struct alignas_test { char c; char alignas (8) alignas_8; }; char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 ? 1 : -1]; #endif ]])], [gl_cv_header_working_stdalign_h=yes], [gl_cv_header_working_stdalign_h=no])]) if test $gl_cv_header_working_stdalign_h = yes; then STDALIGN_H='' else STDALIGN_H='stdalign.h' fi AC_SUBST([STDALIGN_H]) AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"]) ]) pspp-1.0.1/gl/m4/select.m40000644000175000017500000000634413124536242012070 00000000000000# select.m4 serial 8 dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_SELECT], [ AC_REQUIRE([gl_HEADER_SYS_SELECT]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SOCKETS]) if test "$ac_cv_header_winsock2_h" = yes; then REPLACE_SELECT=1 else dnl On Interix 3.5, select(0, NULL, NULL, NULL, timeout) fails with error dnl EFAULT. AC_CHECK_HEADERS_ONCE([sys/select.h]) AC_CACHE_CHECK([whether select supports a 0 argument], [gl_cv_func_select_supports0], [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #if HAVE_SYS_SELECT_H #include #endif int main () { struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 5; return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0; }]])], [gl_cv_func_select_supports0=yes], [gl_cv_func_select_supports0=no], [ changequote(,)dnl case "$host_os" in # Guess no on Interix. interix*) gl_cv_func_select_supports0="guessing no";; # Guess yes otherwise. *) gl_cv_func_select_supports0="guessing yes";; esac changequote([,])dnl ]) ]) case "$gl_cv_func_select_supports0" in *yes) ;; *) REPLACE_SELECT=1 ;; esac dnl On FreeBSD 8.2, select() doesn't always reject bad fds. AC_CACHE_CHECK([whether select detects invalid fds], [gl_cv_func_select_detects_ebadf], [ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #if HAVE_SYS_SELECT_H # include #endif #include #include ]],[[ fd_set set; dup2(0, 16); FD_ZERO(&set); FD_SET(16, &set); close(16); struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 5; return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF; ]])], [gl_cv_func_select_detects_ebadf=yes], [gl_cv_func_select_detects_ebadf=no], [ case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_select_detects_ebadf="guessing no" ;; esac ]) ]) case $gl_cv_func_select_detects_ebadf in *yes) ;; *) REPLACE_SELECT=1 ;; esac fi dnl Determine the needed libraries. LIB_SELECT="$LIBSOCKET" if test $REPLACE_SELECT = 1; then case "$host_os" in mingw*) dnl On the MSVC platform, the function MsgWaitForMultipleObjects dnl (used in lib/select.c) requires linking with -luser32. On mingw, dnl it is implicit. AC_LINK_IFELSE( [AC_LANG_SOURCE([[ #define WIN32_LEAN_AND_MEAN #include int main () { MsgWaitForMultipleObjects (0, NULL, 0, 0, 0); return 0; }]])], [], [LIB_SELECT="$LIB_SELECT -luser32"]) ;; esac fi AC_SUBST([LIB_SELECT]) ]) pspp-1.0.1/gl/m4/socklen.m40000644000175000017500000000623613124536242012247 00000000000000# socklen.m4 serial 10 dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Albert Chin, Windows fixes from Simon Josefsson. dnl Check for socklen_t: historically on BSD it is an int, and in dnl POSIX 1g it is a type of its own, but some platforms use different dnl types for the argument to getsockopt, getpeername, etc.: dnl HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS. dnl So we have to test to find something that will work. AC_DEFUN([gl_TYPE_SOCKLEN_T], [AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])dnl AC_CHECK_TYPE([socklen_t], , [AC_MSG_CHECKING([for socklen_t equivalent]) AC_CACHE_VAL([gl_cv_socklen_t_equiv], [# Systems have either "struct sockaddr *" or # "void *" as the second argument to getpeername gl_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void; do for t in int size_t "unsigned int" "long int" "unsigned long int"; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include #include int getpeername (int, $arg2 *, $t *);]], [[$t len; getpeername (0, 0, &len);]])], [gl_cv_socklen_t_equiv="$t"]) test "$gl_cv_socklen_t_equiv" != "" && break done test "$gl_cv_socklen_t_equiv" != "" && break done ]) if test "$gl_cv_socklen_t_equiv" = ""; then AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) fi AC_MSG_RESULT([$gl_cv_socklen_t_equiv]) AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], [type to use in place of socklen_t if not defined])], [gl_SOCKET_HEADERS])]) dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find dnl it there too. But on Cygwin, wc2tcpip.h must not be included. Users dnl of this module should use the same include pattern as gl_SOCKET_HEADERS. dnl When you change this macro, keep also in sync: dnl - gl_CHECK_SOCKET_HEADERS, dnl - the Include section of modules/socklen. AC_DEFUN([gl_SOCKET_HEADERS], [ /* is not needed according to POSIX, but the in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #if HAVE_SYS_SOCKET_H # include #elif HAVE_WS2TCPIP_H # include #endif ]) dnl Tests for the existence of the header for socket facilities. dnl Defines the C macros HAVE_SYS_SOCKET_H, HAVE_WS2TCPIP_H. dnl This macro must match gl_SOCKET_HEADERS. AC_DEFUN([gl_CHECK_SOCKET_HEADERS], [AC_CHECK_HEADERS_ONCE([sys/socket.h]) if test $ac_cv_header_sys_socket_h = no; then dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make dnl the check for those headers unconditional; yet cygwin reports dnl that the headers are present but cannot be compiled (since on dnl cygwin, all socket information should come from sys/socket.h). AC_CHECK_HEADERS([ws2tcpip.h]) fi ]) pspp-1.0.1/gl/m4/version-etc.m40000644000175000017500000000222613124536242013042 00000000000000# version-etc.m4 serial 1 # Copyright (C) 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl $1 - configure flag and define name dnl $2 - human readable description m4_define([gl_VERSION_ETC_FLAG], [dnl AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])], [dnl case $withval in yes|no) ;; *) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;; esac ]) ]) AC_DEFUN([gl_VERSION_ETC], [dnl gl_VERSION_ETC_FLAG([packager], [String identifying the packager of this software]) gl_VERSION_ETC_FLAG([packager-version], [Packager-specific version information]) gl_VERSION_ETC_FLAG([packager-bug-reports], [Packager info for bug reports (URL/e-mail/...)]) if test "X$with_packager" = "X" && \ test "X$with_packager_version$with_packager_bug_reports" != "X" then AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager]) fi ]) pspp-1.0.1/gl/m4/codeset.m40000644000175000017500000000151213020461274012224 00000000000000# codeset.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[char* cs = nl_langinfo(CODESET); return !cs;]])], [am_cv_langinfo_codeset=yes], [am_cv_langinfo_codeset=no]) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE([HAVE_LANGINFO_CODESET], [1], [Define if you have and nl_langinfo(CODESET).]) fi ]) pspp-1.0.1/gl/m4/extensions.m40000644000175000017500000001476513124536242013016 00000000000000# serial 15 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git # Autoconf. Perhaps we can remove this once we can assume Autoconf # 2.70 or later everywhere, but since Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. # If autoconf reports a warning # warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # the fix is # 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked # but always AC_REQUIREd, # 2) to ensure that for each occurrence of # AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) # or # AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # the corresponding gnulib module description has 'extensions' among # its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS # invocation occurs in gl_EARLY, not in gl_INIT. # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. # # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that # cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], [Define to 1 if you need to in order for 'stat' and other things to work.]) AC_DEFINE([_POSIX_1_SOURCE], [2], [Define to 2 if the system does not provide POSIX.1 features except with this defined.]) AC_DEFINE([_MINIX], [1], [Define to 1 if on MINIX.]) AC_DEFINE([_NETBSD_SOURCE], [1], [Define to 1 to make NetBSD features available. MINIX 3 needs this.]) fi dnl Use a different key than __EXTENSIONS__, as that name broke existing dnl configure.ac when using autoheader 2.62. AH_VERBATIM([USE_SYSTEM_EXTENSIONS], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable general extensions on macOS. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ # undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ # undef __STDC_WANT_IEC_60559_BFP_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # undef __STDC_WANT_IEC_60559_DFP_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # undef __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # undef __STDC_WANT_IEC_60559_TYPES_EXT__ #endif /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ #ifndef __STDC_WANT_LIB_EXT2__ # undef __STDC_WANT_LIB_EXT2__ #endif /* Enable extensions specified by ISO/IEC 24747:2009. */ #ifndef __STDC_WANT_MATH_SPEC_FUNCS__ # undef __STDC_WANT_MATH_SPEC_FUNCS__ #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable X/Open extensions if necessary. HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of whether compiling with -Ae or -D_HPUX_SOURCE=1. */ #ifndef _XOPEN_SOURCE # undef _XOPEN_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ # define __EXTENSIONS__ 1 ]AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_DARWIN_C_SOURCE]) AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__]) AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__]) AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__]) AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__]) AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__]) AC_DEFINE([__STDC_WANT_LIB_EXT2__]) AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__]) AC_DEFINE([_TANDEM_SOURCE]) AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], [ac_cv_should_define__xopen_source], [ac_cv_should_define__xopen_source=no AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ #include mbstate_t x;]])], [], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ #define _XOPEN_SOURCE 500 #include mbstate_t x;]])], [ac_cv_should_define__xopen_source=yes])])]) test $ac_cv_should_define__xopen_source = yes && AC_DEFINE([_XOPEN_SOURCE], [500]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], [ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. dnl gnulib does not need it. But if it gets required by third-party macros dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. AC_REQUIRE([AC_GNU_SOURCE]) AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) pspp-1.0.1/gl/m4/exponentf.m40000644000175000017500000000545613124536242012622 00000000000000# exponentf.m4 serial 2 dnl Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FLOAT_EXPONENT_LOCATION], [ AC_CACHE_CHECK([where to find the exponent in a 'float'], [gl_cv_cc_float_expbit0], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #include #define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { float value; unsigned int word[NWORDS]; } memory_float; static unsigned int ored_words[NWORDS]; static unsigned int anded_words[NWORDS]; static void add_to_ored_words (float x) { memory_float m; size_t i; /* Clear it first, in case sizeof (float) < sizeof (memory_float). */ memset (&m, 0, sizeof (memory_float)); m.value = x; for (i = 0; i < NWORDS; i++) { ored_words[i] |= m.word[i]; anded_words[i] &= m.word[i]; } } int main () { size_t j; FILE *fp = fopen ("conftest.out", "w"); if (fp == NULL) return 1; for (j = 0; j < NWORDS; j++) anded_words[j] = ~ (unsigned int) 0; add_to_ored_words (0.25f); add_to_ored_words (0.5f); add_to_ored_words (1.0f); add_to_ored_words (2.0f); add_to_ored_words (4.0f); /* Remove bits that are common (e.g. if representation of the first mantissa bit is explicit). */ for (j = 0; j < NWORDS; j++) ored_words[j] &= ~anded_words[j]; /* Now find the nonzero word. */ for (j = 0; j < NWORDS; j++) if (ored_words[j] != 0) break; if (j < NWORDS) { size_t i; for (i = j + 1; i < NWORDS; i++) if (ored_words[i] != 0) { fprintf (fp, "unknown"); return (fclose (fp) != 0); } for (i = 0; ; i++) if ((ored_words[j] >> i) & 1) { fprintf (fp, "word %d bit %d", (int) j, (int) i); return (fclose (fp) != 0); } } fprintf (fp, "unknown"); return (fclose (fp) != 0); } ]])], [gl_cv_cc_float_expbit0=`cat conftest.out`], [gl_cv_cc_float_expbit0="unknown"], [gl_cv_cc_float_expbit0="word 0 bit 23"]) rm -f conftest.out ]) case "$gl_cv_cc_float_expbit0" in word*bit*) word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` AC_DEFINE_UNQUOTED([FLT_EXPBIT0_WORD], [$word], [Define as the word index where to find the exponent of 'float'.]) AC_DEFINE_UNQUOTED([FLT_EXPBIT0_BIT], [$bit], [Define as the bit index in the word where to find bit 0 of the exponent of 'float'.]) ;; esac ]) pspp-1.0.1/gl/m4/fcntl-o.m40000644000175000017500000001144013132510756012145 00000000000000# fcntl-o.m4 serial 5 dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. # Test whether the flags O_NOATIME and O_NOFOLLOW actually work. # Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. # Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. AC_DEFUN([gl_FCNTL_O_FLAGS], [ dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes dnl AC_GNU_SOURCE. m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], [AC_REQUIRE([AC_GNU_SOURCE])]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_FUNCS_ONCE([symlink]) AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #if HAVE_UNISTD_H # include #else /* on Windows with MSVC */ # include # include # defined sleep(n) _sleep ((n) * 1000) #endif #include #ifndef O_NOATIME #define O_NOATIME 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif static int const constants[] = { O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY }; ]], [[ int result = !constants; #if HAVE_SYMLINK { static char const sym[] = "conftest.sym"; if (symlink ("/dev/null", sym) != 0) result |= 2; else { int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); if (fd >= 0) { close (fd); result |= 4; } } if (unlink (sym) != 0 || symlink (".", sym) != 0) result |= 2; else { int fd = open (sym, O_RDONLY | O_NOFOLLOW); if (fd >= 0) { close (fd); result |= 4; } } unlink (sym); } #endif { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); if (fd < 0) result |= 8; else { struct stat st0; if (fstat (fd, &st0) != 0) result |= 16; else { char c; sleep (1); if (read (fd, &c, 1) != 1) result |= 24; else { if (close (fd) != 0) result |= 32; else { struct stat st1; if (stat (file, &st1) != 0) result |= 40; else if (st0.st_atime != st1.st_atime) result |= 64; } } } } } return result;]])], [gl_cv_header_working_fcntl_h=yes], [case $? in #( 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac], [case "$host_os" in # Guess 'no' on native Windows. mingw*) gl_cv_header_working_fcntl_h='no' ;; *) gl_cv_header_working_fcntl_h=cross-compiling ;; esac ]) ]) case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], [Define to 1 if O_NOATIME works.]) case $gl_cv_header_working_fcntl_h in #( *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], [Define to 1 if O_NOFOLLOW works.]) ]) pspp-1.0.1/gl/m4/signal_h.m40000644000175000017500000000604213124536242012370 00000000000000# signal_h.m4 serial 18 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SIGNAL_H], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T]) gl_NEXT_HEADERS([signal.h]) # AIX declares sig_atomic_t to already include volatile, and C89 compilers # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. AC_CHECK_TYPE([volatile sig_atomic_t], [], [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[ #include ]]) dnl Ensure the type pid_t gets defined. AC_REQUIRE([AC_TYPE_PID_T]) AC_REQUIRE([AC_TYPE_UID_T]) dnl Persuade glibc to define sighandler_t. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[ #include ]]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ]], [pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask]) ]) AC_DEFUN([gl_CHECK_TYPE_SIGSET_T], [ AC_CHECK_TYPES([sigset_t], [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no], [[ #include /* Mingw defines sigset_t not in , but in . */ #include ]]) if test $gl_cv_type_sigset_t != yes; then HAVE_SIGSET_T=0 fi ]) AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SIGNAL_H_DEFAULTS], [ GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK]) GNULIB_RAISE=0; AC_SUBST([GNULIB_RAISE]) GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK]) GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK]) HAVE_RAISE=1; AC_SUBST([HAVE_RAISE]) HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T]) HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T]) HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION]) HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION]) HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T]) HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T]) REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK]) REPLACE_RAISE=0; AC_SUBST([REPLACE_RAISE]) ]) pspp-1.0.1/gl/m4/dup2.m40000644000175000017500000001013413124536242011453 00000000000000#serial 25 dnl Copyright (C) 2002, 2005, 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_DUP2], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [ AC_CHECK_FUNCS_ONCE([dup2]) if test $ac_cv_func_dup2 = no; then HAVE_DUP2=0 fi ], [ AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.]) ]) if test $HAVE_DUP2 = 1; then AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works], [AC_RUN_IFELSE([ AC_LANG_PROGRAM( [[#include #include #include #include #include #ifndef RLIM_SAVED_CUR # define RLIM_SAVED_CUR RLIM_INFINITY #endif #ifndef RLIM_SAVED_MAX # define RLIM_SAVED_MAX RLIM_INFINITY #endif ]], [[int result = 0; int bad_fd = INT_MAX; struct rlimit rlim; if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX && rlim.rlim_cur != RLIM_INFINITY && rlim.rlim_cur != RLIM_SAVED_MAX && rlim.rlim_cur != RLIM_SAVED_CUR) bad_fd = rlim.rlim_cur; #ifdef FD_CLOEXEC if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) result |= 1; #endif if (dup2 (1, 1) != 1) result |= 2; #ifdef FD_CLOEXEC if (fcntl (1, F_GETFD) != FD_CLOEXEC) result |= 4; #endif close (0); if (dup2 (0, 0) != -1) result |= 8; /* Many gnulib modules require POSIX conformance of EBADF. */ if (dup2 (2, bad_fd) == -1 && errno != EBADF) result |= 16; /* Flush out some cygwin core dumps. */ if (dup2 (2, -1) != -1 || errno != EBADF) result |= 32; dup2 (2, 255); dup2 (2, 256); /* On OS/2 kLIBC, dup2() does not work on a directory fd. */ { int fd = open (".", O_RDONLY); if (fd == -1) result |= 64; else if (dup2 (fd, fd + 1) == -1) result |= 128; close (fd); } return result;]]) ], [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], [case "$host_os" in mingw*) # on this platform, dup2 always returns 0 for success gl_cv_func_dup2_works="guessing no" ;; cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 gl_cv_func_dup2_works="guessing no" ;; aix* | freebsd*) # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE, # not EBADF. gl_cv_func_dup2_works="guessing no" ;; haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. gl_cv_func_dup2_works="guessing no" ;; *-android*) # implemented using dup3(), which fails if oldfd == newfd gl_cv_func_dup2_works="guessing no" ;; os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd. gl_cv_func_dup2_works="guessing no" ;; *) gl_cv_func_dup2_works="guessing yes" ;; esac]) ]) case "$gl_cv_func_dup2_works" in *yes) ;; *) REPLACE_DUP2=1 AC_CHECK_FUNCS([setdtablesize]) ;; esac fi dnl Replace dup2() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ gl_TEST_FCHDIR if test $HAVE_FCHDIR = 0; then if test $HAVE_DUP2 = 1; then REPLACE_DUP2=1 fi fi ]) ]) # Prerequisites of lib/dup2.c. AC_DEFUN([gl_PREREQ_DUP2], []) pspp-1.0.1/gl/m4/nls.m40000644000175000017500000000230713020461274011375 00000000000000# nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software dnl Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT([$USE_NLS]) AC_SUBST([USE_NLS]) ]) pspp-1.0.1/gl/m4/canonicalize.m40000644000175000017500000000756613132510756013260 00000000000000# canonicalize.m4 serial 29 dnl Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Provides canonicalize_file_name and canonicalize_filename_mode, but does # not provide or fix realpath. AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([canonicalize_file_name]) AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) if test $ac_cv_func_canonicalize_file_name = no; then HAVE_CANONICALIZE_FILE_NAME=0 else case "$gl_cv_func_realpath_works" in *yes) ;; *) REPLACE_CANONICALIZE_FILE_NAME=1 ;; esac fi ]) # Provides canonicalize_file_name and realpath. AC_DEFUN([gl_CANONICALIZE_LGPL], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE]) if test $ac_cv_func_canonicalize_file_name = no; then HAVE_CANONICALIZE_FILE_NAME=0 if test $ac_cv_func_realpath = no; then HAVE_REALPATH=0 else case "$gl_cv_func_realpath_works" in *yes) ;; *) REPLACE_REALPATH=1 ;; esac fi else case "$gl_cv_func_realpath_works" in *yes) ;; *) REPLACE_CANONICALIZE_FILE_NAME=1 REPLACE_REALPATH=1 ;; esac fi ]) # Like gl_CANONICALIZE_LGPL, except prepare for separate compilation # (no REPLACE_CANONICALIZE_FILE_NAME, no REPLACE_REALPATH, no AC_LIBOBJ). AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink]) AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) AC_CHECK_HEADERS_ONCE([sys/param.h]) ]) # Check whether realpath works. Assume that if a platform has both # realpath and canonicalize_file_name, but the former is broken, then # so is the latter. AC_DEFUN([gl_FUNC_REALPATH_WORKS], [ AC_CHECK_FUNCS_ONCE([realpath]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [ touch conftest.a mkdir conftest.d AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ ]GL_NOCRASH[ #include #include ]], [[ int result = 0; { char *name = realpath ("conftest.a", NULL); if (!(name && *name == '/')) result |= 1; free (name); } { char *name = realpath ("conftest.b/../conftest.a", NULL); if (name != NULL) result |= 2; free (name); } { char *name = realpath ("conftest.a/", NULL); if (name != NULL) result |= 4; free (name); } { char *name1 = realpath (".", NULL); char *name2 = realpath ("conftest.d//./..", NULL); if (! name1 || ! name2 || strcmp (name1, name2)) result |= 8; free (name1); free (name2); } return result; ]]) ], [gl_cv_func_realpath_works=yes], [gl_cv_func_realpath_works=no], [case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; # Guess no on native Windows. mingw*) gl_cv_func_realpath_works="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_func_realpath_works="guessing no" ;; esac ]) rm -rf conftest.a conftest.d ]) case "$gl_cv_func_realpath_works" in *yes) AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath() can malloc memory, always gives an absolute path, and handles trailing slash correctly.]) ;; esac ]) pspp-1.0.1/gl/m4/ldexp.m40000644000175000017500000000363613124536242011726 00000000000000# ldexp.m4 serial 1 dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_LDEXP], [ AC_REQUIRE([gl_CHECK_LDEXP_NO_LIBM]) LDEXP_LIBM= if test $gl_cv_func_ldexp_no_libm = no; then AC_CACHE_CHECK([whether ldexp() can be used with libm], [gl_cv_func_ldexp_in_libm], [ save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include double (*funcptr) (double, int) = ldexp; double x;]], [[return ldexp (x, -1) > 0;]])], [gl_cv_func_ldexp_in_libm=yes], [gl_cv_func_ldexp_in_libm=no]) LIBS="$save_LIBS" ]) if test $gl_cv_func_ldexp_in_libm = yes; then LDEXP_LIBM=-lm fi fi AC_SUBST([LDEXP_LIBM]) ]) dnl Test whether ldexp() can be used without linking with libm. dnl Set gl_cv_func_ldexp_no_libm to 'yes' or 'no' accordingly. AC_DEFUN([gl_CHECK_LDEXP_NO_LIBM], [ AC_CACHE_CHECK([whether ldexp() can be used without linking with libm], [gl_cv_func_ldexp_no_libm], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#ifndef __NO_MATH_INLINES # define __NO_MATH_INLINES 1 /* for glibc */ #endif #include double (*funcptr) (double, int) = ldexp; double x;]], [[return ldexp (x, -1) > 0;]])], [gl_cv_func_ldexp_no_libm=yes], [gl_cv_func_ldexp_no_libm=no]) ]) ]) pspp-1.0.1/gl/m4/fcntl_h.m40000644000175000017500000000327113124536242012222 00000000000000# serial 15 # Configure fcntl.h. dnl Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_FCNTL_H], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_REQUIRE([gl_FCNTL_O_FLAGS]) gl_NEXT_HEADERS([fcntl.h]) dnl Ensure the type pid_t gets defined. AC_REQUIRE([AC_TYPE_PID_T]) dnl Ensure the type mode_t gets defined. AC_REQUIRE([AC_TYPE_MODE_T]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, if it is not common dnl enough to be declared everywhere. gl_WARN_ON_USE_PREPARE([[#include ]], [fcntl openat]) ]) AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_FCNTL_H_DEFAULTS], [ GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING]) GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT]) ]) pspp-1.0.1/gl/m4/c-strtod.m40000644000175000017500000000306413124536242012344 00000000000000# c-strtod.m4 serial 15 # Copyright (C) 2004-2006, 2009-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert. AC_DEFUN([gl_C99_STRTOLD], [ AC_CACHE_CHECK([whether strtold conforms to C99], [gl_cv_func_c99_strtold], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[/* On HP-UX before 11.23, strtold returns a struct instead of long double. Reject implementations like that, by requiring compatibility with the C99 prototype. */ #include static long double (*p) (char const *, char **) = strtold; static long double test (char const *nptr, char **endptr) { long double r; r = strtold (nptr, endptr); return r; }]], [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])], [gl_cv_func_c99_strtold=yes], [gl_cv_func_c99_strtold=no])]) if test $gl_cv_func_c99_strtold = yes; then AC_DEFINE([HAVE_C99_STRTOLD], [1], [Define to 1 if strtold conforms to C99.]) fi ]) dnl Prerequisites of lib/c-strtod.c. AC_DEFUN([gl_C_STRTOD], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS([strtod_l]) ]) dnl Prerequisites of lib/c-strtold.c. AC_DEFUN([gl_C_STRTOLD], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_C99_STRTOLD]) AC_CHECK_FUNCS([strtold_l]) ]) pspp-1.0.1/gl/strerror-override.h0000644000175000017500000000374313124536243013700 00000000000000/* strerror-override.h --- POSIX compatible system error routine Copyright (C) 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _GL_STRERROR_OVERRIDE_H # define _GL_STRERROR_OVERRIDE_H # include # include /* Reasonable buffer size that should never trigger ERANGE; if this proves too small, we intentionally abort(), to remind us to fix this value. */ # define STACKBUF_LEN 256 /* If ERRNUM maps to an errno value defined by gnulib, return a string describing the error. Otherwise return NULL. */ # if REPLACE_STRERROR_0 \ || GNULIB_defined_ESOCK \ || GNULIB_defined_ESTREAMS \ || GNULIB_defined_EWINSOCK \ || GNULIB_defined_ENOMSG \ || GNULIB_defined_EIDRM \ || GNULIB_defined_ENOLINK \ || GNULIB_defined_EPROTO \ || GNULIB_defined_EMULTIHOP \ || GNULIB_defined_EBADMSG \ || GNULIB_defined_EOVERFLOW \ || GNULIB_defined_ENOTSUP \ || GNULIB_defined_ENETRESET \ || GNULIB_defined_ECONNABORTED \ || GNULIB_defined_ESTALE \ || GNULIB_defined_EDQUOT \ || GNULIB_defined_ECANCELED \ || GNULIB_defined_EOWNERDEAD \ || GNULIB_defined_ENOTRECOVERABLE \ || GNULIB_defined_EILSEQ extern const char *strerror_override (int errnum) _GL_ATTRIBUTE_CONST; # else # define strerror_override(ignored) NULL # endif #endif /* _GL_STRERROR_OVERRIDE_H */ pspp-1.0.1/gl/malloca.h0000644000175000017500000001067313124536242011610 00000000000000/* Safe automatic memory allocation. Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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, 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 . */ #ifndef _MALLOCA_H #define _MALLOCA_H #include #include #include #include #include "xalloc-oversized.h" #ifdef __cplusplus extern "C" { #endif /* safe_alloca(N) is equivalent to alloca(N) when it is safe to call alloca(N); otherwise it returns NULL. It either returns N bytes of memory allocated on the stack, that lasts until the function returns, or NULL. Use of safe_alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns. */ #if HAVE_ALLOCA /* The OS usually guarantees only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely allocate anything larger than 4096 bytes. Also care for the possibility of a few compiler-allocated temporary stack slots. This must be a macro, not a function. */ # define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) #else # define safe_alloca(N) ((void) (N), NULL) #endif /* malloca(N) is a safe variant of alloca(N). It allocates N bytes of memory allocated on the stack, that must be freed using freea() before the function returns. Upon failure, it returns NULL. */ #if HAVE_ALLOCA # define malloca(N) \ ((N) < 4032 - sa_increment \ ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ : mmalloca (N)) #else # define malloca(N) \ mmalloca (N) #endif extern void * mmalloca (size_t n); /* Free a block of memory allocated through malloca(). */ #if HAVE_ALLOCA extern void freea (void *p); #else # define freea free #endif /* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). It allocates an array of N objects, each with S bytes of memory, on the stack. S must be positive and N must be nonnegative. The array must be freed using freea() before the function returns. */ #define nmalloca(n, s) (xalloc_oversized (n, s) ? NULL : malloca ((n) * (s))) #ifdef __cplusplus } #endif /* ------------------- Auxiliary, non-public definitions ------------------- */ /* Determine the alignment of a type at compile time. */ #if defined __GNUC__ || defined __IBM__ALIGNOF__ # define sa_alignof __alignof__ #elif defined __cplusplus template struct sa_alignof_helper { char __slot1; type __slot2; }; # define sa_alignof(type) offsetof (sa_alignof_helper, __slot2) #elif defined __hpux /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof values. */ # define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) #elif defined _AIX /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof values. */ # define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) #else # define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) #endif enum { /* The desired alignment of memory allocations is the maximum alignment among all elementary types. */ sa_alignment_long = sa_alignof (long), sa_alignment_double = sa_alignof (double), #if HAVE_LONG_LONG_INT sa_alignment_longlong = sa_alignof (long long), #endif sa_alignment_longdouble = sa_alignof (long double), sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1) #if HAVE_LONG_LONG_INT | (sa_alignment_longlong - 1) #endif | (sa_alignment_longdouble - 1) ) + 1, /* The increment that guarantees room for a magic word must be >= sizeof (int) and a multiple of sa_alignment_max. */ sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max }; #endif /* _MALLOCA_H */ pspp-1.0.1/gl/fseek.c0000644000175000017500000000203513124536241011260 00000000000000/* An fseek() function that, together with fflush(), is POSIX compliant. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include /* Get off_t. */ #include int fseek (FILE *fp, long offset, int whence) { /* Use the replacement fseeko function with all its workarounds. */ return fseeko (fp, (off_t)offset, whence); } pspp-1.0.1/gl/uninorm.in.h0000644000175000017500000002437113124536243012275 00000000000000/* Normalization forms (composition and decomposition) of Unicode strings. Copyright (C) 2001-2002, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #ifndef _UNINORM_H #define _UNINORM_H /* Get size_t. */ #include #include "unitypes.h" #ifdef __cplusplus extern "C" { #endif /* Conventions: All functions prefixed with u8_ operate on UTF-8 encoded strings. Their unit is an uint8_t (1 byte). All functions prefixed with u16_ operate on UTF-16 encoded strings. Their unit is an uint16_t (a 2-byte word). All functions prefixed with u32_ operate on UCS-4 encoded strings. Their unit is an uint32_t (a 4-byte word). All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly n units. Functions returning a string result take a (resultbuf, lengthp) argument pair. If resultbuf is not NULL and the result fits into *lengthp units, it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly allocated string is returned. In both cases, *lengthp is set to the length (number of units) of the returned string. In case of error, NULL is returned and errno is set. */ enum { UC_DECOMP_CANONICAL,/* Canonical decomposition. */ UC_DECOMP_FONT, /* A font variant (e.g. a blackletter form). */ UC_DECOMP_NOBREAK, /* A no-break version of a space or hyphen. */ UC_DECOMP_INITIAL, /* An initial presentation form (Arabic). */ UC_DECOMP_MEDIAL, /* A medial presentation form (Arabic). */ UC_DECOMP_FINAL, /* A final presentation form (Arabic). */ UC_DECOMP_ISOLATED,/* An isolated presentation form (Arabic). */ UC_DECOMP_CIRCLE, /* An encircled form. */ UC_DECOMP_SUPER, /* A superscript form. */ UC_DECOMP_SUB, /* A subscript form. */ UC_DECOMP_VERTICAL,/* A vertical layout presentation form. */ UC_DECOMP_WIDE, /* A wide (or zenkaku) compatibility character. */ UC_DECOMP_NARROW, /* A narrow (or hankaku) compatibility character. */ UC_DECOMP_SMALL, /* A small variant form (CNS compatibility). */ UC_DECOMP_SQUARE, /* A CJK squared font variant. */ UC_DECOMP_FRACTION,/* A vulgar fraction form. */ UC_DECOMP_COMPAT /* Otherwise unspecified compatibility character. */ }; /* Maximum size of decomposition of a single Unicode character. */ #define UC_DECOMPOSITION_MAX_LENGTH 32 /* Return the character decomposition mapping of a Unicode character. DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH ucs_t elements. When a decomposition exists, DECOMPOSITION[0..N-1] and *DECOMP_TAG are filled and N is returned. Otherwise -1 is returned. */ extern int uc_decomposition (ucs4_t uc, int *decomp_tag, ucs4_t *decomposition); /* Return the canonical character decomposition mapping of a Unicode character. DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH ucs_t elements. When a decomposition exists, DECOMPOSITION[0..N-1] is filled and N is returned. Otherwise -1 is returned. */ extern int uc_canonical_decomposition (ucs4_t uc, ucs4_t *decomposition); /* Attempt to combine the Unicode characters uc1, uc2. uc1 is known to have canonical combining class 0. Return the combination of uc1 and uc2, if it exists. Return 0 otherwise. Not all decompositions can be recombined using this function. See the Unicode file CompositionExclusions.txt for details. */ extern ucs4_t uc_composition (ucs4_t uc1, ucs4_t uc2) _UC_ATTRIBUTE_CONST; /* An object of type uninorm_t denotes a Unicode normalization form. */ struct unicode_normalization_form; typedef const struct unicode_normalization_form *uninorm_t; /* UNINORM_NFD: Normalization form D: canonical decomposition. */ extern const struct unicode_normalization_form uninorm_nfd; #define UNINORM_NFD (&uninorm_nfd) /* UNINORM_NFC: Normalization form C: canonical decomposition, then canonical composition. */ extern const struct unicode_normalization_form uninorm_nfc; #define UNINORM_NFC (&uninorm_nfc) /* UNINORM_NFKD: Normalization form KD: compatibility decomposition. */ extern const struct unicode_normalization_form uninorm_nfkd; #define UNINORM_NFKD (&uninorm_nfkd) /* UNINORM_NFKC: Normalization form KC: compatibility decomposition, then canonical composition. */ extern const struct unicode_normalization_form uninorm_nfkc; #define UNINORM_NFKC (&uninorm_nfkc) /* Test whether a normalization form does compatibility decomposition. */ #define uninorm_is_compat_decomposing(nf) \ ((* (const unsigned int *) (nf) >> 0) & 1) /* Test whether a normalization form includes canonical composition. */ #define uninorm_is_composing(nf) \ ((* (const unsigned int *) (nf) >> 1) & 1) /* Return the decomposing variant of a normalization form. This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD. */ extern uninorm_t uninorm_decomposing_form (uninorm_t nf) _UC_ATTRIBUTE_PURE; /* Return the specified normalization form of a string. */ extern uint8_t * u8_normalize (uninorm_t nf, const uint8_t *s, size_t n, uint8_t *resultbuf, size_t *lengthp); extern uint16_t * u16_normalize (uninorm_t nf, const uint16_t *s, size_t n, uint16_t *resultbuf, size_t *lengthp); extern uint32_t * u32_normalize (uninorm_t nf, const uint32_t *s, size_t n, uint32_t *resultbuf, size_t *lengthp); /* Compare S1 and S2, ignoring differences in normalization. NF must be either UNINORM_NFD or UNINORM_NFKD. If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and return 0. Upon failure, return -1 with errno set. */ extern int u8_normcmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, uninorm_t nf, int *resultp); extern int u16_normcmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, uninorm_t nf, int *resultp); extern int u32_normcmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, uninorm_t nf, int *resultp); /* Converts the string S of length N to a NUL-terminated byte sequence, in such a way that comparing uN_normxfrm (S1) and uN_normxfrm (S2) with uN_cmp2() is equivalent to comparing S1 and S2 with uN_normcoll(). NF must be either UNINORM_NFC or UNINORM_NFKC. */ extern char * u8_normxfrm (const uint8_t *s, size_t n, uninorm_t nf, char *resultbuf, size_t *lengthp); extern char * u16_normxfrm (const uint16_t *s, size_t n, uninorm_t nf, char *resultbuf, size_t *lengthp); extern char * u32_normxfrm (const uint32_t *s, size_t n, uninorm_t nf, char *resultbuf, size_t *lengthp); /* Compare S1 and S2, ignoring differences in normalization, using the collation rules of the current locale. NF must be either UNINORM_NFC or UNINORM_NFKC. If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and return 0. Upon failure, return -1 with errno set. */ extern int u8_normcoll (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, uninorm_t nf, int *resultp); extern int u16_normcoll (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, uninorm_t nf, int *resultp); extern int u32_normcoll (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, uninorm_t nf, int *resultp); /* Normalization of a stream of Unicode characters. A "stream of Unicode characters" is essentially a function that accepts an ucs4_t argument repeatedly, optionally combined with a function that "flushes" the stream. */ /* Data type of a stream of Unicode characters that normalizes its input according to a given normalization form and passes the normalized character sequence to the encapsulated stream of Unicode characters. */ struct uninorm_filter; /* Create and return a normalization filter for Unicode characters. The pair (stream_func, stream_data) is the encapsulated stream. stream_func (stream_data, uc) receives the Unicode character uc and returns 0 if successful, or -1 with errno set upon failure. Return the new filter, or NULL with errno set upon failure. */ extern struct uninorm_filter * uninorm_filter_create (uninorm_t nf, int (*stream_func) (void *stream_data, ucs4_t uc), void *stream_data); /* Stuff a Unicode character into a normalizing filter. Return 0 if successful, or -1 with errno set upon failure. */ extern int uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc); /* Bring data buffered in the filter to its destination, the encapsulated stream. Return 0 if successful, or -1 with errno set upon failure. Note! If after calling this function, additional characters are written into the filter, the resulting character sequence in the encapsulated stream will not necessarily be normalized. */ extern int uninorm_filter_flush (struct uninorm_filter *filter); /* Bring data buffered in the filter to its destination, the encapsulated stream, then close and free the filter. Return 0 if successful, or -1 with errno set upon failure. */ extern int uninorm_filter_free (struct uninorm_filter *filter); #ifdef __cplusplus } #endif #endif /* _UNINORM_H */ pspp-1.0.1/gl/unictype/0000755000175000017500000000000013150620334011733 500000000000000pspp-1.0.1/gl/unictype/combiningclass.h0000644000175000017500000016273013020461274015032 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Combining class of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ #define combclass_header_0 16 #define combclass_header_1 2 #define combclass_header_2 7 #define combclass_header_3 511 #define combclass_header_4 127 static const struct { int level1[2]; short level2[2 << 9]; unsigned char level3[72 << 7]; } u_combclass = { { 0, 512 }, { -1, -1, -1, -1, -1, -1, 0, -1, -1, 128, -1, 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1280, 1280, 1280, 1408, 1536, 1280, 1408, 1664, 1792, 1920, 2048, 2176, 2304, 2432, -1, -1, -1, -1, 2560, -1, -1, -1, -1, -1, -1, -1, 2688, 2816, -1, 2944, 3072, -1, 3200, 3328, 3456, 3584, 3712, 3840, -1, 3968, -1, -1, -1, -1, -1, 4096, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4224, 4352, 4480, -1, -1, -1, -1, 4608, 4736, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4864, 4992, -1, -1, 5120, 5248, 5376, 5504, -1, 5632, -1, 5760, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5888, -1, -1, -1, -1, -1, 6016, -1, -1, -1, -1, -1, -1, 6144, -1, 6272, 6400, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6528, 6656, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6784, 6912, 7040, 7168, 7296, 7424, 7552, -1, -1, 7680, -1, 7808, 7936, 8064, 8192, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8320, 8448, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8576, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8704, 8832, 8960, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9088, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 232, 220, 220, 220, 220, 232, 216, 220, 220, 220, 220, 220, 202, 202, 220, 220, 220, 220, 202, 202, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1, 1, 1, 1, 1, 220, 220, 220, 220, 230, 230, 230, 230, 230, 230, 230, 230, 240, 230, 220, 220, 220, 230, 230, 230, 220, 220, 0, 230, 230, 230, 220, 220, 220, 220, 230, 232, 220, 220, 230, 233, 234, 234, 233, 234, 234, 233, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 230, 230, 230, 230, 220, 230, 230, 230, 222, 220, 230, 230, 230, 230, 230, 230, 220, 220, 220, 220, 220, 220, 230, 230, 220, 230, 230, 222, 228, 230, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 0, 23, 0, 24, 25, 0, 230, 220, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 230, 30, 31, 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, 27, 28, 29, 30, 31, 32, 33, 34, 230, 230, 220, 220, 230, 230, 230, 230, 230, 220, 230, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 0, 0, 230, 230, 230, 230, 220, 230, 0, 0, 230, 230, 0, 220, 230, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 220, 230, 230, 220, 230, 230, 220, 220, 220, 230, 220, 220, 230, 220, 230, 230, 230, 220, 230, 220, 230, 220, 230, 220, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 220, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 0, 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, 230, 230, 230, 0, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 230, 230, 220, 230, 230, 220, 230, 230, 230, 220, 220, 220, 27, 28, 29, 230, 230, 230, 220, 230, 230, 220, 220, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 230, 220, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 84, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, 103, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, 122, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 220, 0, 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, 0, 132, 0, 0, 0, 0, 0, 130, 130, 130, 130, 0, 0, 130, 0, 230, 230, 9, 0, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 230, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 220, 220, 220, 220, 220, 220, 230, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 220, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 0, 1, 220, 220, 220, 220, 220, 230, 230, 220, 220, 220, 220, 230, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 230, 0, 0, 0, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 220, 230, 230, 230, 230, 230, 230, 230, 220, 230, 230, 234, 214, 220, 202, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 233, 220, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 1, 1, 230, 230, 230, 230, 1, 1, 1, 230, 230, 0, 0, 0, 0, 230, 0, 0, 0, 1, 1, 230, 220, 230, 1, 1, 220, 220, 220, 220, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 228, 232, 222, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, 230, 230, 220, 0, 0, 230, 230, 0, 0, 0, 0, 0, 230, 230, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 220, 220, 220, 220, 220, 220, 220, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 1, 220, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, 216, 1, 1, 1, 0, 0, 0, 226, 216, 216, 216, 216, 216, 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 220, 220, 220, 220, 220, 220, 0, 0, 230, 230, 230, 230, 230, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 220, 220, 220, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; pspp-1.0.1/gl/unictype/categ_none.c0000644000175000017500000000177613124536243014142 00000000000000/* Categories of Unicode characters. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2007. 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 . */ #include /* Specification. */ #include "unictype.h" static bool always_false (ucs4_t uc, uint32_t bitmask) { return false; } const uc_general_category_t _UC_CATEGORY_NONE = { 0, 1, { &always_false } }; pspp-1.0.1/gl/unictype/combiningclass.c0000644000175000017500000000301613124536243015020 00000000000000/* Combining classes of Unicode characters. Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unictype.h" /* Define u_combclass table. */ #include "combiningclass.h" int uc_combining_class (ucs4_t uc) { unsigned int index1 = uc >> combclass_header_0; if (index1 < combclass_header_1) { int lookup1 = u_combclass.level1[index1]; if (lookup1 >= 0) { unsigned int index2 = (uc >> combclass_header_2) & combclass_header_3; int lookup2 = u_combclass.level2[lookup1 + index2]; if (lookup2 >= 0) { unsigned int index3 = (uc & combclass_header_4); unsigned int lookup3 = u_combclass.level3[lookup2 + index3]; return lookup3; } } } return 0; } pspp-1.0.1/gl/unictype/ctype_print.c0000644000175000017500000000203513124536243014365 00000000000000/* ISO C like properties of Unicode characters. Copyright (C) 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unictype.h" #include "bitmap.h" /* Define u_is_print table. */ #include "ctype_print.h" bool uc_is_print (ucs4_t uc) { return bitmap_lookup (&u_is_print, uc); } pspp-1.0.1/gl/unictype/bitmap.h0000644000175000017500000000320213124536243013303 00000000000000/* Three-level bitmap lookup. Copyright (C) 2000-2002, 2005-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2000-2002. 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 . */ static inline int bitmap_lookup (const void *table, ucs4_t uc); /* These values are currently hardcoded into gen-ctype.c. */ #define header_0 16 #define header_2 9 #define header_3 127 #define header_4 15 static inline int bitmap_lookup (const void *table, ucs4_t uc) { unsigned int index1 = uc >> header_0; if (index1 < ((const int *) table)[0]) { int lookup1 = ((const int *) table)[1 + index1]; if (lookup1 >= 0) { unsigned int index2 = (uc >> header_2) & header_3; int lookup2 = ((const short *) table)[lookup1 + index2]; if (lookup2 >= 0) { unsigned int index3 = (uc >> 5) & header_4; unsigned int lookup3 = ((const int *) table)[lookup2 + index3]; return (lookup3 >> (uc & 0x1f)) & 1; } } } return 0; } pspp-1.0.1/gl/unictype/pr_soft_dotted.h0000644000175000017500000001302013020461274015041 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Properties of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ #define header_0 16 #define header_2 9 #define header_3 127 #define header_4 15 static const struct { int header[1]; int level1[2]; short level2[2 << 7]; /*unsigned*/ int level3[9 << 4]; } u_property_soft_dotted = { { 2 }, { 3 * sizeof (int) / sizeof (short) + 0, 3 * sizeof (int) / sizeof (short) + 128 }, { 3 + 256 * sizeof (short) / sizeof (int) + 0, 3 + 256 * sizeof (short) / sizeof (int) + 16, 3 + 256 * sizeof (short) / sizeof (int) + 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 48, 3 + 256 * sizeof (short) / sizeof (int) + 64, 3 + 256 * sizeof (short) / sizeof (int) + 80, -1, -1, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 112, 3 + 256 * sizeof (short) / sizeof (int) + 128, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 0x00000000, 0x00000000, 0x00000000, 0x00000600, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00008000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000200, 0x00000100, 0x20000000, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00080000, 0x00000000, 0x00000000, 0x01400000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00400000, 0x00000110, 0x00000000, 0x00000000, 0x00000000, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000800, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000C, 0x00C00000, 0x00000000, 0x00000C00, 0xC0000000, 0x00000000, 0x000C0000, 0x00000000, 0x000000C0, 0x0C000000, 0x00000000, 0x0000C000, 0x00000000, 0x0000000C, 0x00C00000, 0x00000000, 0x00000C00, 0xC0000000, 0x00000000, 0x000C0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }; pspp-1.0.1/gl/unictype/pr_soft_dotted.c0000644000175000017500000000220413124536243015042 00000000000000/* Properties of Unicode characters. Copyright (C) 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unictype.h" #include "bitmap.h" /* Define u_property_soft_dotted table. */ #include "pr_soft_dotted.h" bool uc_is_property_soft_dotted (ucs4_t uc) { return bitmap_lookup (&u_property_soft_dotted, uc); } const uc_property_t UC_PROPERTY_SOFT_DOTTED = { &uc_is_property_soft_dotted }; pspp-1.0.1/gl/unictype/categ_of.c0000644000175000017500000000447013124536243013601 00000000000000/* Categories of Unicode characters. Copyright (C) 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unictype.h" /* Define u_category table. */ #include "categ_of.h" static inline int lookup_withtable (ucs4_t uc) { unsigned int index1 = uc >> category_header_0; if (index1 < category_header_1) { int lookup1 = u_category.level1[index1]; if (lookup1 >= 0) { unsigned int index2 = (uc >> category_header_2) & category_header_3; int lookup2 = u_category.level2[lookup1 + index2]; if (lookup2 >= 0) { unsigned int index3 = ((uc & category_header_4) + lookup2) * 5; /* level3 contains 5-bit values, packed into 16-bit words. */ unsigned int lookup3 = ((u_category.level3[index3>>4] | ((unsigned int) u_category.level3[(index3>>4)+1] << 16)) >> (index3 % 16)) & 0x1f; return lookup3; } } return 29; /* = log2(UC_CATEGORY_MASK_Cn) */ } return -1; } bool uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask) { int bit = lookup_withtable (uc); if (bit >= 0) return ((bitmask >> bit) & 1); else return false; } uc_general_category_t uc_general_category (ucs4_t uc) { int bit = lookup_withtable (uc); uc_general_category_t result; if (bit >= 0) { result.bitmask = 1 << bit; result.generic = 1; result.lookup.lookup_fn = &uc_is_general_category_withtable; return result; } else return _UC_CATEGORY_NONE; } pspp-1.0.1/gl/unictype/ctype_print.h0000644000175000017500000012324113020461274014371 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* ISO C like properties of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ #define header_0 16 #define header_2 9 #define header_3 127 #define header_4 15 static const struct { int header[1]; int level1[17]; short level2[5 << 7]; /*unsigned*/ int level3[75 << 4]; } u_is_print = { { 17 }, { 18 * sizeof (int) / sizeof (short) + 0, 18 * sizeof (int) / sizeof (short) + 128, 18 * sizeof (int) / sizeof (short) + 256, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 18 * sizeof (int) / sizeof (short) + 384, 18 * sizeof (int) / sizeof (short) + 512, 18 * sizeof (int) / sizeof (short) + 512 }, { 18 + 640 * sizeof (short) / sizeof (int) + 0, 18 + 640 * sizeof (short) / sizeof (int) + 16, 18 + 640 * sizeof (short) / sizeof (int) + 32, 18 + 640 * sizeof (short) / sizeof (int) + 48, 18 + 640 * sizeof (short) / sizeof (int) + 64, 18 + 640 * sizeof (short) / sizeof (int) + 80, 18 + 640 * sizeof (short) / sizeof (int) + 96, 18 + 640 * sizeof (short) / sizeof (int) + 112, 18 + 640 * sizeof (short) / sizeof (int) + 128, 18 + 640 * sizeof (short) / sizeof (int) + 144, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 176, 18 + 640 * sizeof (short) / sizeof (int) + 192, 18 + 640 * sizeof (short) / sizeof (int) + 208, 18 + 640 * sizeof (short) / sizeof (int) + 224, 18 + 640 * sizeof (short) / sizeof (int) + 240, 18 + 640 * sizeof (short) / sizeof (int) + 256, 18 + 640 * sizeof (short) / sizeof (int) + 272, 18 + 640 * sizeof (short) / sizeof (int) + 288, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 304, 18 + 640 * sizeof (short) / sizeof (int) + 320, 18 + 640 * sizeof (short) / sizeof (int) + 336, 18 + 640 * sizeof (short) / sizeof (int) + 352, 18 + 640 * sizeof (short) / sizeof (int) + 368, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 384, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 400, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 416, 18 + 640 * sizeof (short) / sizeof (int) + 432, 18 + 640 * sizeof (short) / sizeof (int) + 448, 18 + 640 * sizeof (short) / sizeof (int) + 464, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 480, -1, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 496, 18 + 640 * sizeof (short) / sizeof (int) + 512, 18 + 640 * sizeof (short) / sizeof (int) + 528, 18 + 640 * sizeof (short) / sizeof (int) + 544, 18 + 640 * sizeof (short) / sizeof (int) + 560, 18 + 640 * sizeof (short) / sizeof (int) + 576, 18 + 640 * sizeof (short) / sizeof (int) + 592, 18 + 640 * sizeof (short) / sizeof (int) + 608, 18 + 640 * sizeof (short) / sizeof (int) + 624, 18 + 640 * sizeof (short) / sizeof (int) + 640, 18 + 640 * sizeof (short) / sizeof (int) + 656, 18 + 640 * sizeof (short) / sizeof (int) + 672, 18 + 640 * sizeof (short) / sizeof (int) + 688, 18 + 640 * sizeof (short) / sizeof (int) + 704, 18 + 640 * sizeof (short) / sizeof (int) + 720, 18 + 640 * sizeof (short) / sizeof (int) + 736, 18 + 640 * sizeof (short) / sizeof (int) + 752, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 768, 18 + 640 * sizeof (short) / sizeof (int) + 784, -1, -1, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 800, -1, -1, -1, -1, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 816, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 832, -1, 18 + 640 * sizeof (short) / sizeof (int) + 848, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 864, -1, -1, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 880, -1, -1, -1, -1, -1, -1, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 896, 18 + 640 * sizeof (short) / sizeof (int) + 912, 18 + 640 * sizeof (short) / sizeof (int) + 928, 18 + 640 * sizeof (short) / sizeof (int) + 944, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 960, -1, -1, -1, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 976, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 992, 18 + 640 * sizeof (short) / sizeof (int) + 1008, 18 + 640 * sizeof (short) / sizeof (int) + 1024, 18 + 640 * sizeof (short) / sizeof (int) + 1040, 18 + 640 * sizeof (short) / sizeof (int) + 1056, 18 + 640 * sizeof (short) / sizeof (int) + 1072, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 1088, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 1104, 18 + 640 * sizeof (short) / sizeof (int) + 1120, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 1136, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 1152, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 1168, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 160, 18 + 640 * sizeof (short) / sizeof (int) + 1184 }, { 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x7FFFFFFF, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFCFFFFFF, 0xFFFFD7F0, 0xFFFFFFFB, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFEFFFF, 0xFE7FFFFF, 0xFFFFFFFE, 0xFFFEE6FF, 0xFFFFFFFF, 0xFFFF00FF, 0x001F07FF, 0xDFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFBFFF, 0xFFFFFFFF, 0xFFFFE7FF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0003FFFF, 0xFFFFFFFF, 0x07FFFFFF, 0xFFFFFFFF, 0x7FFF3FFF, 0x4FFFFFFF, 0x00000000, 0x00000000, 0x001FFFFF, 0x00000000, 0xFFFFFFF8, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFF99FEF, 0xF3C5FDFF, 0xB080799F, 0x0FFFFFCF, 0xFFF987EE, 0xD36DFDFF, 0x5E023987, 0x003FFFC0, 0xFFFBBFEE, 0xF3EDFDFF, 0x00013BBF, 0x0203FFCF, 0xFFF99FEE, 0xF3EDFDFF, 0xB0C0399F, 0x00FFFFCF, 0xD63DC7EC, 0xC3FFC718, 0x00813DC7, 0x07FFFFC0, 0xFFFDDFEF, 0xE3FFFDFF, 0x07603DDF, 0xFF00FFCF, 0xFFFDDFEE, 0xF3EFFDFF, 0x40603DDF, 0x0006FFCF, 0xFFFDDFEE, 0xE7FFFFFF, 0x80807DDF, 0xFE3FFFCF, 0xFC7FFFEC, 0x2FFBFFFF, 0xFF5F847F, 0x001CFFC0, 0xFFFFFFFE, 0x87FFFFFF, 0x0FFFFFFF, 0x00000000, 0xFEF02596, 0x3BFFECAE, 0xF3FF3F5F, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFEFF, 0xFFFE1FFF, 0xFEFFFFFF, 0xDFFFFFFF, 0x07FFDFFF, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF20BF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x3D7F3DFF, 0xFFFFFFFF, 0xFFFF3DFF, 0x7F3DFFFF, 0xFF7FFF3D, 0xFFFFFFFF, 0xFF3DFFFF, 0xFFFFFFFF, 0xE7FFFFFF, 0x1FFFFFFF, 0x03FFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x3F3FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x1FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x01FFFFFF, 0x001FDFFF, 0x007FFFFF, 0x000FFFFF, 0x000DDFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x3FFFFFFF, 0x03FF03FF, 0x03FF7FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00FFFFFF, 0xFFFFFFFF, 0xFFFF07FF, 0xFFFFFFFF, 0x003FFFFF, 0x7FFFFFFF, 0x0FFF0FFF, 0xFFFFFFF1, 0x001F3FFF, 0xFFFFFFFF, 0xFFFF0FFF, 0xC7FF03FF, 0xFFFFFFFF, 0xCFFFFFFF, 0xFFFFFFFF, 0x7FFFFFFF, 0x9FFFFFFF, 0x03FF03FF, 0x7FFF3FFF, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF0FFF, 0x1FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xF00FFFFF, 0xFFFFFFFF, 0xF8FFFFFF, 0xFFFFE3FF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0xFFFF00FF, 0x037FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xF03FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF, 0xFFFFFFFF, 0xFFDFFFFF, 0xEFCFFFDF, 0x7FDCFFFF, 0xFFFFFFFF, 0xFFFFFCFF, 0xFFFFFFFF, 0xFFF3FFDF, 0x1FFF7FFF, 0x7FFFFFFF, 0xFFFF0000, 0x0001FFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF0FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x07FFFFFF, 0xFFFFFFFF, 0x0000007F, 0x000007FF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFCFFFFF, 0xFF3FFFFF, 0xE3FFFFFF, 0x0003FDFF, 0x0000F000, 0xFFFFFFFF, 0xFFFF7FFF, 0x7FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFE0FFFFF, 0xFFFFFFFF, 0xFFFF20BF, 0xFFFFFFFF, 0x800180FF, 0x007FFFFF, 0x7F7F7F7F, 0x7F7F7F7F, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000007, 0x00000000, 0xFBFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x000FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x003FFFFF, 0x0FFF0000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0xFE7FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFE0, 0xFFFE3FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF7FFF, 0x07FFFFFF, 0xFFFFFFFF, 0xFFFF000F, 0x7FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x7FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x003FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x003FFFFF, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF1FFF, 0xFFFFFFFF, 0xFFFF007F, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00FFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00FF3FFF, 0x00000000, 0xFF800000, 0xFFFFFFFF, 0x03FF0FFF, 0xFFFFFFFF, 0x00FFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFC01F, 0x3FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x800FFFFF, 0x1FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xC3FFBFFF, 0x7FFFFFFF, 0xFFFFFFFF, 0x007FFFFF, 0xF3FF3FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xF8000007, 0x007FFFFF, 0x007E7E7E, 0xFFFF7F7F, 0xFFFFFFFF, 0xFFFF003F, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FF3FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF000F, 0xFFFFF87F, 0x0FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF3FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFFFFF, 0x00000000, 0xE0F8007F, 0x5F7FFFFF, 0xFFFFFFDB, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFF80003, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF0000, 0xFFFFFFFF, 0xFFFCFFFF, 0xFFFFFFFF, 0x000000FF, 0x3FFF0000, 0x03FFFFFF, 0xFFFFFFFF, 0xFFF7FFFF, 0xFFDF0F7F, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x9FFFFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x7FFFFFFF, 0x1CFCFCFC, 0x3E007F7F, 0xFFFFEFFF, 0xB7FFFF7F, 0x3FFF3FFF, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x07FFFFFF, 0xFFFFFF87, 0xFF8FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0FFF1FFF, 0x00000001, 0xFFFF0000, 0x3FFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x1FFFFFFF, 0xFFFFFFFF, 0x0001FFFF, 0x0FFFFFFF, 0xFFFFFFFF, 0xFFFF000F, 0xFFFF07FF, 0x07FFFFFF, 0xBFFFFFFF, 0xFFFFFFFF, 0x003FFF0F, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x3FFFFFFF, 0x000003FF, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFF00FF, 0xFFFFFFFF, 0x0000800F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x007FFFFF, 0x003FFFFF, 0x000000FF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFD3F, 0x91BFFFFF, 0xFFBFFFFF, 0xFFFFFFFF, 0x7FFFFFFF, 0x0000FF80, 0x00000000, 0xF837FFFF, 0x8FFFFFFF, 0x83FFFFFF, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xF0FFFFFF, 0xFFFCFFFF, 0xFFFFFFFF, 0xFEEFF06F, 0x870FFFFF, 0x01FF00FF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0x007FF87F, 0xFFFFFFFF, 0xFE3FFFFF, 0xFF3FFFFF, 0xFF07FFFF, 0x1E03FFFF, 0x0000FE00, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x000001FF, 0x00000000, 0xFFFFFFFF, 0x0007FFFF, 0xFFFFFFFF, 0xFC07FFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7FFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFC3FFF, 0x8000FFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF0003, 0x03FF01FF, 0xFFFFFFFF, 0xFFDFFFFF, 0xFFFF000F, 0x007FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF3FFF, 0x001FFFFE, 0xFFFBFFFF, 0x3FFFFFFF, 0x00000000, 0x00000000, 0xBFFFBD7F, 0xFFFF03FF, 0xFFFFFFFF, 0x03FF07FF, 0xFFF99FEF, 0xF3EDFDFF, 0xE081399F, 0x001F1FCF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FF00FF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFF3FFFFF, 0x3FFFFFFF, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FF001F, 0x00000000, 0xFFFFFFFF, 0x00FFFFFF, 0x000003FF, 0x00000000, 0xE3FFFFFF, 0xFFFF0FFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x8007FFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x01FFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFFFFF, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x001F7FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x00007FFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000007F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x01FFFFFF, 0x7FFFFFFF, 0x0000C3FF, 0x00000000, 0x00000000, 0xFFFF0000, 0x003F3FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFBFF003F, 0xE0FFFFFB, 0x0000FFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF001F, 0x7FFFFFFF, 0xFFFF8000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x1FFF07FF, 0xF3FF01FF, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x003FFFFF, 0xFFFFFFFF, 0xFFFFFE7F, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x000001FF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x007FFFFF, 0x0003FFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFDFFFFF, 0xFFFFFFFF, 0xDFFFFFFF, 0xEBFFDE64, 0xFFFFFFEF, 0xFFFFFFFF, 0xDFDFE7BF, 0x7BFFFFFF, 0xFFFDFC5F, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFF3F, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFCFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xF8000FFF, 0x0000FFFE, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x007FFF9F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFEF, 0x0AF7FE96, 0xAA96EA84, 0x5EF7F796, 0x0FFFFBFF, 0x0FFFFBEE, 0x00000000, 0x00030000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFF0FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x000FFFFF, 0xFFFE7FFF, 0xFFFEFFFE, 0x003FFFFF, 0xFFFF1FFF, 0xFFFF7FFF, 0xFFFFFFFF, 0xFFFF0FFF, 0x07FFFFFF, 0x00000000, 0x00000000, 0xFFFFFFC0, 0xFFFF0007, 0x07FFFFFF, 0x000301FF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFBFFFFFF, 0xFFFFFFFF, 0xFFFFFFEF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0001FFFF, 0x000F1FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x000FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x001FFFFF, 0x00000000, 0xFFFF0FFF, 0xFFFFFFFF, 0x03FF00FF, 0xFFFFFFFF, 0xFFFF00FF, 0x00003FFF, 0x00000000, 0x00000000, 0x01FF0000, 0x00000000, 0x00000000, 0x00000000, 0x0000001F, 0x00000000, 0x00000001, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x007FFFFF, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x001FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x3FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3FFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000FFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x3FFFFFFF } }; pspp-1.0.1/gl/unictype/categ_of.h0000644000175000017500000026262413020461274013611 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Categories of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ #define category_header_0 16 #define category_header_1 17 #define category_header_2 7 #define category_header_3 511 #define category_header_4 127 static const struct { int level1[17]; short level2[5 << 9]; unsigned short level3[211 * 40 + 1]; } u_category = { { 0, 512, 1024, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1536, 2048, 2048 }, { 0, 128, 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1408, 1536, 1664, 1792, 1920, 2048, 2176, 2304, 2432, 2560, 2688, 2816, 2944, 3072, 3200, 3328, 3456, 3584, 3712, 3840, 3968, 4096, 4224, 4352, 4352, 4480, 4608, 4736, 4864, 4992, 4352, 4352, 4352, 5120, 5248, 5376, 5504, 5632, 5760, 5888, 6016, 6144, 6272, 6400, 6528, 6656, 6784, 6912, 7040, 7168, 7296, 7424, 7552, 7680, 7808, 7936, 8064, 8192, 8192, 8320, 8448, 8576, 8704, 8832, 8960, 9088, 8832, 9216, 9344, 8832, 8832, 8192, 9472, 8192, 8192, 9600, 9728, 9856, 9984, 10112, 10240, 10368, 10496, 8832, 10624, 10752, 10880, 11008, 11136, 11264, 11392, 8832, 8832, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 11520, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 11648, 11776, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 11904, 4352, 4352, 12032, 12160, 12288, 12416, 12544, 12672, 12800, 12928, 13056, 13184, 13312, 13440, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 13568, 13696, 13696, 13696, 13696, 13696, 13696, 13696, 13696, 13696, 13696, 13696, 13696, 13696, 13696, 13696, 13696, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 4352, 4352, 13952, 14080, 14208, 14336, 4352, 4352, 14464, 14592, 14720, 14848, 14976, 15104, 15232, 15360, 15488, 15616, -1, 15744, 15872, 16000, 16128, 16256, 16384, -1, 4352, 4352, 16512, -1, 16640, 16768, 16896, 17024, 17152, 17280, 17408, 17536, 17664, 17792, -1, -1, 17920, -1, -1, -1, 18048, 18176, 18304, 18432, 18560, 18688, 18816, -1, -1, 18944, -1, 19072, 19200, 19328, 19456, -1, -1, 19584, -1, -1, -1, 19712, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 19840, 19968, 4352, 20096, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 20224, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4352, 4352, 4352, 4352, 20352, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4352, 4352, 4352, 4352, 20480, 20608, 20736, 20864, -1, -1, -1, -1, -1, -1, 20992, 21120, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21248, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21376, 21504, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8832, 21632, 21760, 21888, 22016, -1, 22144, -1, 22272, 22400, 22528, 22656, 22784, 22912, 23040, 23168, 8832, 8832, 8832, 8832, 23296, 23424, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4352, 23552, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23680, 23808, -1, -1, 23936, 24064, 24192, 24320, 24448, -1, 8832, 24576, 8832, 8832, 24704, 24832, 8832, 24960, 25088, 25216, 25344, 25472, 25600, 25728, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 25856, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 25984, 4352, 26112, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 4352, 26240, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4352, 4352, 4352, 4352, 26368, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26496, -1, 26624, 26752, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 13824, 26880 }, { 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xc636, 0x6338, 0xcd8c, 0x1945, 0x8c59, 0x2108, 0x1084, 0x0842, 0x28c5, 0x8ca5, 0x0011, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1680, 0x5d1d, 0x8434, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x2684, 0xcc9d, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xce36, 0x6739, 0xb48d, 0x2792, 0xa575, 0x2a55, 0x4345, 0x548c, 0xa811, 0x8a94, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0090, 0x0000, 0x0800, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2190, 0x1084, 0x0842, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x0108, 0x1004, 0x0040, 0x0401, 0x4010, 0x2100, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x0008, 0x1004, 0x0840, 0x8001, 0x0200, 0x0100, 0x1000, 0x0002, 0x0400, 0x0200, 0x2000, 0x0084, 0x0040, 0x8020, 0x0200, 0x0100, 0x0084, 0x0002, 0x0001, 0x4010, 0x2000, 0x0204, 0x0842, 0x1084, 0x4402, 0x2200, 0x1100, 0x0040, 0x0401, 0x4010, 0x0100, 0x1004, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8801, 0x0200, 0x2000, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x4210, 0x2108, 0x1000, 0x0800, 0x0401, 0x0000, 0x2008, 0x0080, 0x0802, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4240, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8c63, 0xc631, 0x6318, 0x318c, 0x18c6, 0x5063, 0xe94a, 0x6318, 0x318c, 0x18c6, 0x5063, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x8c63, 0x2831, 0x94a5, 0x3a52, 0xa0e8, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x8020, 0x2830, 0xbd08, 0x108f, 0x0442, 0xf7bd, 0x294e, 0x0088, 0x0e80, 0x003a, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x7400, 0x0000, 0x0000, 0x1000, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0042, 0x0021, 0x4200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8421, 0x8200, 0x0104, 0x1080, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0xd420, 0x4a52, 0xe729, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x0400, 0x4010, 0x0100, 0x1004, 0x0840, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x001d, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7de8, 0x18c4, 0x8c63, 0x843d, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x3d08, 0xdeb2, 0x9d6b, 0x94bd, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x2b0a, 0x94b1, 0x4a58, 0xbd2c, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xde90, 0xef7b, 0x9084, 0x7b18, 0xbdef, 0xdef7, 0xef7b, 0x6b5a, 0xb5ad, 0x3294, 0x19c6, 0xad63, 0x94a5, 0x4a52, 0xa529, 0xa894, 0x8c7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1083, 0x0842, 0x8421, 0x5290, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x2108, 0x1084, 0x0842, 0x18c5, 0x2123, 0x1085, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4912, 0xa529, 0x5294, 0x2d74, 0x94a5, 0xc652, 0xa528, 0x5296, 0x210a, 0x2108, 0x1084, 0x0842, 0x4211, 0x256a, 0xc631, 0x6318, 0x318c, 0x18c6, 0xd763, 0x10a4, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0xde94, 0x2109, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0xa529, 0x5294, 0x294a, 0xf485, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x2108, 0x1084, 0x0842, 0x4211, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x5290, 0x294a, 0x94a5, 0x4632, 0x318d, 0xde8e, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0xa529, 0x528c, 0x294a, 0x94a5, 0x4a32, 0xa329, 0x5294, 0xef4a, 0xc631, 0x6318, 0x318c, 0x18c6, 0xec63, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0xd294, 0xec7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x7a42, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x14a5, 0x0843, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x5314, 0x3188, 0x94a6, 0x4a52, 0xc529, 0x6318, 0x318a, 0x94a4, 0x4a52, 0x8429, 0x4210, 0x2108, 0x9484, 0x2312, 0x0842, 0x8421, 0x4210, 0x1071, 0x0842, 0x8421, 0x4210, 0x2108, 0x18a4, 0x09d3, 0x8421, 0x4210, 0x277a, 0x77a4, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0x4213, 0x2108, 0x93a4, 0x3bde, 0x8421, 0x5ef4, 0x3188, 0x94a6, 0x7a52, 0xa637, 0x6377, 0xe90a, 0xf7bd, 0x7bde, 0xbd37, 0x4ef7, 0x2748, 0x9484, 0x3bd2, 0x0842, 0x8421, 0x4210, 0xcc84, 0x94a9, 0x4a52, 0xd9d5, 0xef7b, 0x14bd, 0x09d3, 0x8421, 0xde90, 0x277b, 0x77a4, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0x4213, 0x2108, 0x13a4, 0x09d2, 0x84e9, 0x5ef4, 0x31ba, 0x94a6, 0x7bde, 0xa52f, 0x52f7, 0xef4a, 0xf4bd, 0x7bde, 0x9def, 0x4210, 0xe93a, 0xf7bd, 0x3bde, 0x0842, 0x8421, 0x4210, 0x10a5, 0x4a42, 0xbdef, 0xdef7, 0xef7b, 0x14bd, 0x09d3, 0x8421, 0x4210, 0x2748, 0x7484, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0x4213, 0x2108, 0x13a4, 0x09d2, 0x8421, 0x5ef4, 0x3188, 0x94a6, 0x4a52, 0xc52f, 0x6374, 0xef4a, 0xf7a4, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x9484, 0x3bd2, 0x0842, 0x8421, 0x4210, 0xf671, 0x7bde, 0x9def, 0xdef4, 0xef7b, 0x18bd, 0x09d3, 0x8421, 0x4210, 0x277a, 0x77a4, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0x4213, 0x2108, 0x13a4, 0x09d2, 0x8421, 0x5ef4, 0x2988, 0x94a6, 0x7a52, 0xa637, 0x6377, 0xef4a, 0xf7bd, 0x7bde, 0xbd31, 0x4ef7, 0x2748, 0x9484, 0x3bd2, 0x0842, 0x8421, 0x4210, 0x2895, 0x94a5, 0xbd52, 0xdef7, 0xef7b, 0x17bd, 0x09d2, 0x8421, 0xde90, 0x213b, 0x13a4, 0x4842, 0x9def, 0x4e90, 0x213a, 0x77bd, 0x7a42, 0x84ef, 0xde90, 0x213b, 0x1084, 0x0842, 0x8421, 0xdef4, 0x31bb, 0x98c5, 0xbbde, 0xa631, 0x631b, 0xef4a, 0xf7a4, 0x7bde, 0xbd37, 0xdef7, 0xef7b, 0xf7bd, 0x3bde, 0x0842, 0x8421, 0x4210, 0xa94a, 0x6b5a, 0x75ad, 0xded6, 0xef7b, 0x18c5, 0x09d3, 0x8421, 0x4210, 0x213a, 0x13a4, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0x4213, 0x2108, 0x1084, 0x0842, 0x8421, 0xdef4, 0x2949, 0x18c5, 0x7a63, 0xa529, 0x5297, 0xef4a, 0xf7bd, 0x4bde, 0x84e9, 0xde90, 0xef7b, 0x9484, 0x3bd2, 0x0842, 0x8421, 0x4210, 0xf7bd, 0x7bde, 0x4aef, 0xa529, 0xaa94, 0x18bd, 0x09d3, 0x8421, 0x4210, 0x213a, 0x13a4, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0x4213, 0x2108, 0x1084, 0x09d2, 0x8421, 0x5ef4, 0x2988, 0x18c6, 0x7a63, 0xa631, 0x531b, 0xef4a, 0xf7bd, 0x8dde, 0xbde9, 0xdef7, 0xe93b, 0x9484, 0x3bd2, 0x0842, 0x8421, 0x4210, 0x909d, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x18bd, 0x09d3, 0x8421, 0x4210, 0x213a, 0x13a4, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xde90, 0x3189, 0x94a6, 0xba52, 0xa631, 0x631b, 0xe90a, 0xf7bd, 0x7bde, 0xbd37, 0xdef7, 0x277b, 0x9484, 0x3bd2, 0x0842, 0x8421, 0x4210, 0x294a, 0x54a5, 0xbdef, 0x4212, 0x2108, 0x1bbd, 0x09d3, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbde9, 0x4213, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x7484, 0x0842, 0x8421, 0xd210, 0xef49, 0x1084, 0x0842, 0xbde9, 0xde97, 0x377b, 0x94c6, 0x7a52, 0xc6e9, 0x6318, 0x318c, 0xf7bd, 0x3bde, 0x0842, 0x8421, 0x4210, 0x1bbd, 0x7b13, 0xbdef, 0xdef7, 0xef7b, 0x109d, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x10a4, 0x4a52, 0xa529, 0xde94, 0x9f7b, 0x1084, 0xc842, 0xa528, 0x5294, 0x894a, 0x2108, 0x1084, 0x0842, 0xd8c5, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x909d, 0x7a4e, 0xa427, 0xde93, 0xef49, 0xf7bd, 0x084e, 0x9d21, 0x4210, 0x2108, 0x109d, 0x49d2, 0xbd27, 0xd213, 0x2109, 0x10a4, 0x4a52, 0xa529, 0x52f4, 0xef48, 0x1084, 0xfa42, 0xa5e8, 0x5294, 0xef4a, 0x2108, 0x1084, 0x0842, 0x4ef5, 0x2108, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6a4, 0x631a, 0x318c, 0x18c6, 0x8c63, 0xc631, 0x6b1a, 0xa5ad, 0x5ad4, 0xad6b, 0x2108, 0x1084, 0x0842, 0xa529, 0x5294, 0x294a, 0x4b55, 0xb52d, 0xd734, 0x319c, 0x1084, 0x0842, 0x9d21, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef7a, 0x94bd, 0x4a52, 0xa529, 0x5294, 0x314a, 0x94a5, 0x6252, 0x8429, 0x4210, 0x294a, 0x94a5, 0x4a52, 0xbd29, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0xad7a, 0xd6b5, 0x6b5a, 0xb5a9, 0x5ad6, 0xad7b, 0xc631, 0x6b18, 0x35ad, 0xdec6, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x6310, 0x294a, 0x94c5, 0x4a52, 0xa629, 0x6314, 0x214a, 0x2108, 0x1084, 0x0842, 0x18c5, 0x8c63, 0x1084, 0x8842, 0xa531, 0x4210, 0x2948, 0x1885, 0x0863, 0xc631, 0x6318, 0x210c, 0x94a4, 0x0852, 0x8421, 0x4210, 0x2108, 0x1484, 0x4a63, 0xc631, 0x6318, 0x310a, 0x2108, 0x1084, 0x0842, 0x6319, 0xad4a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0xbd07, 0xdef7, 0xef41, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x3890, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0x4213, 0xef48, 0x1084, 0x0842, 0xa4e9, 0x4213, 0xef48, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0x4213, 0xef48, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x13a4, 0x4842, 0x84ef, 0x4210, 0xe908, 0x13a4, 0x4842, 0x84ef, 0x4210, 0x2108, 0x1084, 0x0842, 0x84e9, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x13a4, 0x4842, 0x84ef, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xde90, 0x294b, 0xc631, 0x6318, 0x518c, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0xef7a, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0xd6b5, 0x6b5a, 0xb5ad, 0xdef6, 0xef7b, 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, 0x4000, 0x21ef, 0x1084, 0xef42, 0x108c, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2462, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1096, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xe690, 0xef7a, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x1890, 0x4a63, 0x1089, 0x0842, 0xa421, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x213a, 0x9484, 0x7a52, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x9484, 0x6252, 0xbdec, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x9484, 0x7bd2, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x213a, 0x97a4, 0x7bd2, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x8a52, 0xa529, 0x5294, 0x318a, 0x18c6, 0x4c63, 0xa631, 0x5294, 0x294a, 0x94a5, 0x6312, 0x311c, 0x49c6, 0xef4a, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0x294a, 0x94a5, 0x4a52, 0xdef5, 0xef7b, 0xc631, 0x2318, 0x318b, 0x52c6, 0xee8a, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x9084, 0x0841, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbd21, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0xde90, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xe908, 0x14a5, 0x8c63, 0xc529, 0xd318, 0xef7b, 0x14c6, 0x8c63, 0xa631, 0xd294, 0xef7b, 0xf7b5, 0x231e, 0x0842, 0x8421, 0x4210, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef48, 0x1084, 0x7a42, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xd210, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xdef4, 0xef7b, 0x2108, 0x1084, 0x0842, 0xdea9, 0xad7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xc529, 0xd298, 0x8c7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4c42, 0xa531, 0x5294, 0xe94a, 0x14c5, 0x4a63, 0xa529, 0x5294, 0x318c, 0x98c6, 0x4a52, 0xa529, 0x5294, 0x2f7a, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0xc631, 0x6318, 0x311c, 0x18c6, 0xef63, 0x94a5, 0x4a52, 0xa529, 0x5294, 0xe9ca, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x94a5, 0x0862, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4c52, 0xa529, 0x5314, 0x318c, 0x14c6, 0x0863, 0x8421, 0xd210, 0xef7b, 0x2108, 0x1084, 0x0842, 0x18c5, 0x8c63, 0xd6b1, 0x6b5a, 0xb5ad, 0x52d6, 0x294a, 0x94a5, 0x6b52, 0xb5ad, 0x5ad6, 0xef7b, 0x18a5, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x94c4, 0x8a52, 0xa531, 0x5298, 0x210a, 0x2108, 0x1084, 0x0842, 0x4211, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0xa531, 0x6318, 0x298a, 0x18a5, 0x7bd3, 0xbdef, 0x1ef7, 0x8c63, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x8c62, 0xc631, 0x5318, 0x294a, 0x94a5, 0x4c62, 0xbd29, 0x18f7, 0x8c63, 0x2108, 0x1084, 0x0842, 0xdef5, 0x2109, 0x2108, 0x1084, 0x0842, 0x4211, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x6321, 0x318c, 0x8c46, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xc631, 0x6318, 0xbd8c, 0xdef7, 0xef7b, 0x94a5, 0x4a58, 0xa529, 0x5294, 0x294a, 0x94c5, 0x4a52, 0x8529, 0x4210, 0x210a, 0x1884, 0x0853, 0xa5e9, 0xdef4, 0xef7b, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x3084, 0x18c6, 0x8c63, 0xc631, 0x6318, 0x318c, 0x18c6, 0x8c63, 0xc631, 0x6318, 0x318c, 0x18c6, 0x8c63, 0xc631, 0x6318, 0x318c, 0x18c6, 0x8c63, 0xc631, 0x6318, 0x108c, 0x0842, 0x8421, 0x4210, 0x2308, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x3184, 0x18c6, 0x8c63, 0xc631, 0x6318, 0x318c, 0x18c6, 0x8c63, 0xc631, 0x6318, 0x318c, 0x18c6, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xbdef, 0x5ef7, 0x294a, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x4200, 0x2108, 0x1084, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8421, 0x4210, 0x0008, 0x0000, 0x0000, 0x8421, 0x4210, 0x00ef, 0x0000, 0xef40, 0x8421, 0x4210, 0x0008, 0x0000, 0x0000, 0x8421, 0x4210, 0x0008, 0x0000, 0x0000, 0x8421, 0x4210, 0x00ef, 0x0000, 0xef40, 0x8421, 0x4210, 0x1d08, 0xd074, 0x0741, 0x8421, 0x4210, 0x0008, 0x0000, 0x0000, 0x8421, 0x4210, 0x2108, 0x1084, 0xef42, 0x8421, 0x4210, 0x4208, 0x2108, 0x1084, 0x8421, 0x4210, 0x4208, 0x2108, 0x1084, 0x8421, 0x4210, 0x4208, 0x2108, 0x1084, 0x8421, 0x7a10, 0x0008, 0x2000, 0xa068, 0x8694, 0x7a10, 0x0008, 0x2000, 0xa528, 0x8421, 0x7bd0, 0x0008, 0xd000, 0xa529, 0x8421, 0x4210, 0x0008, 0x0000, 0xa528, 0x87bd, 0x7a10, 0x0008, 0x2000, 0xed28, 0x5ad6, 0xad6b, 0xd6b5, 0xad5a, 0xd6b5, 0x318c, 0x58c6, 0x0f8c, 0xf7b6, 0x7b60, 0xc631, 0x6318, 0x178c, 0xad6b, 0xb6b5, 0xc631, 0x6318, 0xf18c, 0x18c1, 0x5c63, 0xc62b, 0x9b28, 0x318b, 0x18c6, 0x8c63, 0xca31, 0x62b8, 0x318c, 0x18c6, 0xb463, 0x6b5a, 0xbbad, 0x5ad6, 0xad6b, 0xd6b5, 0xf46a, 0x94ae, 0x4a52, 0x2949, 0x1b9b, 0x294a, 0x94a5, 0x4a52, 0x2949, 0xeb9b, 0x8c63, 0xc631, 0x6318, 0x318c, 0xef7a, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0xece7, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x39ce, 0x9ca7, 0x4a73, 0xa529, 0x5294, 0x294a, 0xf7a5, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x82b5, 0x6b5a, 0xb505, 0x0006, 0x0840, 0x8000, 0x4150, 0x12ad, 0x0000, 0xad40, 0xd6b5, 0x2a0a, 0xa0a8, 0x0002, 0x0d40, 0x0000, 0x0810, 0x2421, 0x1ad4, 0x0002, 0x4a52, 0x4129, 0x2108, 0x5954, 0xa86b, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0x2529, 0x5210, 0x494a, 0xdad5, 0xef7b, 0x4a52, 0x6b29, 0xb5ad, 0x594a, 0xad6b, 0x56b2, 0xab59, 0xb5ac, 0x5ad6, 0xacab, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0x94ab, 0xcab5, 0x6b2a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0xa52a, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0xd6b5, 0x6b5a, 0xcdad, 0x5735, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd652, 0x6b5a, 0xb5ad, 0x5ab9, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x2ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x2956, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0x6b59, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x2ad6, 0x94a5, 0xd652, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0xded6, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xbded, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0xded6, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0x5529, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0xa52a, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb595, 0x5ad6, 0xad6b, 0xd655, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0x52ad, 0x294a, 0x94a5, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0x956b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xcdad, 0xd735, 0x735c, 0x35cd, 0x9cd7, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x6b55, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0x4a52, 0x9b29, 0x5293, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0x6529, 0xcd73, 0xd735, 0x735c, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0xca52, 0x9ae6, 0xae6b, 0xe6b9, 0x6b9a, 0xb9ae, 0x9ae6, 0x4e6b, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0xcd94, 0x2735, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0xd94a, 0x949c, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0x6b29, 0x5295, 0x294a, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x7bda, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ef, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0xdef6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad7, 0xad6b, 0xf6b5, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0x5ef7, 0xad6b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe800, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0xe842, 0x0020, 0x4200, 0x0100, 0x1004, 0x0000, 0x8020, 0x4010, 0x2108, 0x3084, 0x0006, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x6a10, 0xb5ad, 0x1056, 0x2840, 0x80a5, 0x7bd0, 0x3def, 0x18c6, 0x8c55, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xbd0f, 0xdef7, 0xef43, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbd21, 0xdef7, 0x1f7b, 0xf7b1, 0x7bde, 0xbdef, 0xdef7, 0x2f7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbde9, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x84e9, 0x4210, 0xe908, 0x1084, 0x0842, 0x84e9, 0x4210, 0xe908, 0x1084, 0x0842, 0x84e9, 0x4210, 0xe908, 0x1084, 0x0842, 0x84e9, 0x4210, 0xe908, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x3e31, 0x60f8, 0xf18c, 0xf8c1, 0x8c60, 0xc631, 0x6318, 0x3164, 0xf8b2, 0x8c60, 0x360f, 0x5cd7, 0xcd73, 0x18c5, 0x1c63, 0xc631, 0x6318, 0x318c, 0x1632, 0x8c63, 0xb62c, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5af6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x7bda, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0xdad6, 0xef7b, 0xc636, 0x0758, 0xcd49, 0xd735, 0x735c, 0xd5cd, 0x5cda, 0xcd73, 0xc735, 0x739a, 0xa535, 0x5294, 0x294a, 0x5295, 0x318a, 0x8c6c, 0x4631, 0x29ad, 0x41a5, 0xad62, 0x109d, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbde9, 0x4a14, 0x20c7, 0x108c, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x3890, 0x20c6, 0xf7bd, 0x09de, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef48, 0x109d, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xe908, 0x2ab5, 0x54a5, 0xb5ad, 0x5ad6, 0xad6b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xde90, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x7bda, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xed6b, 0x294a, 0x94a5, 0x4a52, 0x5ad5, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0x4aad, 0xa529, 0x5294, 0x2955, 0x94a5, 0x4a52, 0xa529, 0x5294, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0x294a, 0x94a5, 0x4a52, 0x5ad5, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0x2955, 0x94a5, 0x4a52, 0xa529, 0x5294, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xed6b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0642, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef7a, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xbded, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x6321, 0x318c, 0x8c46, 0x1084, 0x0842, 0x8421, 0x3210, 0x8c62, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x2108, 0x1084, 0x0842, 0xd211, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x2902, 0x9ce7, 0x4a58, 0xa529, 0x5294, 0x1c4a, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x3080, 0x2946, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0x294a, 0x94a5, 0x4a52, 0xc4a5, 0x6318, 0xbd8c, 0xdef7, 0xef7b, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x631d, 0x318c, 0x18c6, 0x8294, 0x0200, 0x2008, 0x0080, 0x0802, 0x8021, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0080, 0x0802, 0x8423, 0x4210, 0x0108, 0x1004, 0x0800, 0x8020, 0x0200, 0x8308, 0x1052, 0x2040, 0x8020, 0x0210, 0x2008, 0x0080, 0x0802, 0x8020, 0x0200, 0x2008, 0x0000, 0xef40, 0x0000, 0x0200, 0xbd08, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0x6327, 0x4204, 0x2108, 0x1484, 0x4842, 0x8421, 0x4290, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4a63, 0xb531, 0xdad6, 0xef7b, 0x294a, 0x54a5, 0xb3ad, 0xdef6, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x6312, 0xbd8c, 0xdef7, 0xef7b, 0x10c6, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x8c62, 0xc631, 0x6318, 0x318c, 0x18c6, 0x7a53, 0xbdef, 0xdef7, 0x8c7b, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x10a5, 0x0842, 0x3121, 0x1246, 0xef49, 0x2108, 0x1084, 0x0842, 0x4211, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0xa529, 0x5294, 0x8c4a, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa529, 0x5294, 0x294a, 0x18a5, 0x7bd3, 0xbdef, 0xdef7, 0x8f7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef7a, 0x14a5, 0x0843, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x9084, 0x4c62, 0xa529, 0x5318, 0x318c, 0xc626, 0x6318, 0x318c, 0x18c6, 0x1f63, 0x2108, 0x1084, 0x0842, 0xdef5, 0x8c7b, 0x1084, 0xca42, 0x8420, 0x4210, 0x2108, 0x2108, 0x1084, 0x0842, 0x4211, 0xe908, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0x5294, 0x314a, 0x14a6, 0x4a63, 0xbde9, 0xdef7, 0xef7b, 0x9084, 0x0842, 0x8421, 0x5210, 0xef4c, 0x2108, 0x1084, 0x0842, 0x1ef5, 0x8c63, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1083, 0x0842, 0xb5a9, 0x5312, 0x210c, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x9485, 0x0852, 0x8529, 0x4210, 0x2948, 0x90a4, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0x4277, 0x8c46, 0x1084, 0x0842, 0x8421, 0x5310, 0x318a, 0x9231, 0x4c31, 0xbde9, 0xdef7, 0xef7b, 0x109d, 0x0842, 0x9de9, 0x4210, 0xe908, 0x109d, 0x0842, 0xbde9, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x84e9, 0x4210, 0xe908, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x3a04, 0x18c6, 0x8421, 0x4210, 0xbdef, 0xdef7, 0xef7b, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x8a63, 0xc531, 0x6898, 0xef4a, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x7bd2, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbde9, 0x4277, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xd210, 0xef7b, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef48, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xdef4, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x8421, 0x4210, 0xbde8, 0xdef7, 0xef7b, 0xf7bd, 0x4210, 0xbd08, 0xdef7, 0x2149, 0x1084, 0x0842, 0x4421, 0x4212, 0x2108, 0x1084, 0x0842, 0x84e9, 0x4210, 0xe93a, 0x7484, 0x3a42, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x5084, 0x294a, 0x94a5, 0x4a52, 0xa529, 0xf694, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x77bd, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x6b88, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x13bd, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbd21, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x3210, 0xef6b, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0xc631, 0x6318, 0x2e6c, 0xdef6, 0xef7b, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0xb191, 0x9ab5, 0xae6b, 0xe6b9, 0x6b9a, 0xb9ae, 0x62e6, 0x2e6c, 0x18c6, 0x5ad7, 0xc631, 0x631e, 0xac8c, 0xe6b9, 0x8b9a, 0x4a31, 0xa526, 0x71ec, 0xd8c6, 0xef7b, 0x1084, 0x3a42, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xd77a, 0xc63d, 0x6338, 0xcd8c, 0x1945, 0x8c59, 0x2108, 0x1084, 0x0842, 0x28c5, 0x8ca5, 0x0011, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1680, 0x5d1d, 0x8434, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x2684, 0x6c9d, 0x362e, 0x2317, 0x8421, 0x4210, 0x2108, 0x1083, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x18c8, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xe908, 0x13bd, 0x0842, 0xbd21, 0x4213, 0x2108, 0x13bd, 0x0842, 0xbd21, 0x4213, 0xef7a, 0x4a73, 0xe75a, 0x55ec, 0x294a, 0xed6b, 0xf7bd, 0x7bde, 0x5def, 0x5d6b, 0xef6b, 0x1084, 0x0842, 0x8421, 0xd210, 0x2109, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x84e9, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4e90, 0x2748, 0x1084, 0x0842, 0x8421, 0x4210, 0xef48, 0x1084, 0x0842, 0x8421, 0x4210, 0xef48, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xde90, 0xef7b, 0xc631, 0x7bde, 0x4a57, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x7bd5, 0xb5af, 0x5ad6, 0xad6b, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x9494, 0xaa52, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x552a, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0xdad6, 0xef7b, 0xf7b5, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xef4b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef7a, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0xf7a4, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x2945, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xd529, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x294a, 0x7bd5, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1124, 0x0842, 0x8421, 0xdea4, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0xa529, 0xde94, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x8f48, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x7bd2, 0x84ef, 0x4210, 0x2108, 0xa531, 0x5294, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2100, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef48, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbd21, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x7bd2, 0xbdef, 0xdef7, 0x8f7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbde9, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0xbd21, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x4842, 0xa4ef, 0x4213, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0xa427, 0x4ef7, 0x277a, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0x4a8f, 0xa529, 0x5294, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x55a9, 0xa529, 0x5294, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xe908, 0xf7bd, 0x7bde, 0x4a57, 0xa529, 0x5294, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x9084, 0x484e, 0xbdef, 0xa577, 0x5294, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x8842, 0x4a52, 0xd529, 0x8f7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xdef4, 0x8f7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbd21, 0xaef7, 0x2114, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x2bbd, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x94a4, 0x4bd2, 0xbde9, 0x5ef7, 0x294a, 0x1084, 0x09d2, 0x9d21, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x7bd2, 0xa5ef, 0xde94, 0x2f7b, 0x294a, 0x94a5, 0xbd52, 0xdef7, 0xef7b, 0xc631, 0x6318, 0xb18c, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x8a94, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x5294, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x9521, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4a42, 0xbde9, 0xa577, 0x5294, 0xc631, 0x6318, 0xbdec, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0x3def, 0x18c6, 0x8c63, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4842, 0x4aef, 0xa529, 0x5294, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x9084, 0x7bde, 0x4aef, 0xa529, 0x5294, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0xf484, 0x7bde, 0x3def, 0x18c6, 0xef7b, 0xf7bd, 0x7bde, 0x5def, 0xa529, 0x5294, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x7bde, 0xbdef, 0xa52b, 0x5294, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0xea94, 0x18a6, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa521, 0x5294, 0x294a, 0x94a5, 0x4a52, 0x3189, 0x18c6, 0xef63, 0x2bbd, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x14a5, 0x0842, 0x8421, 0x4210, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0x2f7b, 0x18a5, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x98c6, 0x4a52, 0xa631, 0x1894, 0x8c75, 0xf631, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0xdef7, 0xef7b, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0x14a5, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa529, 0x6294, 0x294a, 0x94a5, 0x3a52, 0x0842, 0x8421, 0x4210, 0xc631, 0x7bd8, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x9084, 0x2312, 0xbde9, 0xdef7, 0xef7b, 0x18a5, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x4c63, 0xa529, 0x5294, 0x314a, 0x1086, 0x6242, 0x318c, 0x5296, 0xef62, 0x2108, 0x1084, 0x0842, 0x4891, 0x8c62, 0x295d, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x7aa5, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x7484, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x6210, 0x298c, 0x18a5, 0x4c53, 0x3129, 0x18c6, 0xef63, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0xa4e9, 0x4213, 0x2748, 0x1084, 0x0842, 0x8421, 0x4210, 0x2748, 0x1084, 0x0842, 0x2421, 0xdef6, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2908, 0x98c6, 0x4a52, 0xa529, 0xde94, 0xef7b, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0x18a5, 0x09d3, 0x8421, 0x4210, 0x277a, 0x77a4, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0x4213, 0x2108, 0x13a4, 0x09d2, 0x8421, 0x5ef4, 0x3188, 0x18c5, 0x7a63, 0xa637, 0x6377, 0xef4c, 0xf7a4, 0x7bde, 0xbd37, 0xdef7, 0x2109, 0x1884, 0x7bd3, 0xa529, 0x5294, 0xef7a, 0x94a5, 0x7a52, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x98c6, 0x4a52, 0xc529, 0x6314, 0x298c, 0x94c5, 0x4842, 0xbd24, 0xdef7, 0xef7b, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x3108, 0x94c6, 0x4a52, 0xc6ef, 0x5318, 0x298a, 0xc625, 0x6318, 0x318c, 0x18c6, 0x8c63, 0xc631, 0x6318, 0x848c, 0x5210, 0xef4a, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x98c6, 0x4a52, 0xa529, 0x6314, 0x298a, 0xc625, 0x7a48, 0xbdef, 0xdef7, 0xef7b, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x6290, 0x318a, 0x94a5, 0x8a52, 0xbd29, 0xdef7, 0xef7b, 0x2108, 0x1084, 0x0842, 0xdef5, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xdef4, 0x294b, 0x94c6, 0x8a52, 0xa529, 0xd294, 0xef7b, 0x2108, 0x1084, 0x0842, 0x1529, 0xac63, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x2108, 0x1084, 0x0842, 0xa529, 0x5294, 0xa94a, 0x7bde, 0xbdef, 0xdef7, 0x277b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xdef4, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0xea52, 0xc631, 0x7b18, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x7bd2, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xe908, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbde9, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xa421, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xe908, 0x2108, 0x1084, 0x0842, 0xdef5, 0x8c7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef48, 0x94a5, 0x6252, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x94a5, 0x4a52, 0x3189, 0x58c6, 0xad6b, 0x8c63, 0x6b11, 0xbdef, 0xdef7, 0xef7b, 0x2108, 0x1084, 0x0842, 0xa575, 0x5294, 0x754a, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbd21, 0xdef7, 0x2109, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x7a42, 0xbdef, 0xdef7, 0xef7b, 0x18c4, 0x8c63, 0xc631, 0x6318, 0x318c, 0x18c6, 0x8c63, 0xc631, 0x6318, 0x318c, 0x18c6, 0x8c63, 0xc631, 0x6318, 0xe98c, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0x2f7b, 0x94a5, 0xc631, 0x6318, 0x318c, 0x18c6, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf484, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0xde90, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0xef7a, 0x1084, 0x0842, 0xa421, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x5ef4, 0x894b, 0x6b5a, 0x7bdd, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xbded, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x8d5a, 0xa529, 0x5ad4, 0x318d, 0x18c6, 0xb5ad, 0x5ad6, 0x52eb, 0x294a, 0x94a5, 0x4b5a, 0xa529, 0x5294, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5296, 0xad4a, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0x96b5, 0x6a52, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xbded, 0xdef7, 0xef7b, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0xf54a, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0840, 0x8421, 0x7a10, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8400, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x0084, 0x003a, 0x83bd, 0x01de, 0x1de8, 0x0000, 0x003a, 0x0000, 0x4000, 0x2108, 0xd0f4, 0x0843, 0x8421, 0x43d0, 0x2108, 0x1084, 0x0842, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4000, 0x0007, 0xde80, 0x0001, 0x0000, 0x3a00, 0x0000, 0x0000, 0x087a, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x0008, 0x0074, 0xe800, 0x0000, 0x3a00, 0xbde8, 0x0003, 0x0000, 0x87a0, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x0084, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0840, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8400, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x0084, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x00ef, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8640, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1904, 0x0842, 0x0021, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1900, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x6410, 0x2108, 0x0084, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6400, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x9042, 0x8421, 0x0210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9000, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x4108, 0x1086, 0x0842, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0x1086, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x0421, 0x4219, 0x2108, 0xd080, 0x423b, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xb5a9, 0x52d6, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0xad6a, 0xd6b5, 0x4b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6a5a, 0x318d, 0xd8c6, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0x52f7, 0x294a, 0x94bd, 0x4a52, 0xa529, 0x5294, 0x294a, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x7a42, 0x4a57, 0xa529, 0x5294, 0x94a5, 0x4a52, 0xbde9, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x09d2, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x909d, 0x7a4e, 0x9d27, 0x4210, 0x2108, 0x9084, 0x084e, 0x9d21, 0xd274, 0xef7b, 0x93bd, 0x7bde, 0x9d27, 0xd274, 0x2109, 0x909d, 0x7a4e, 0x9d27, 0xd274, 0x2749, 0x909d, 0x7a4e, 0x8427, 0x4e90, 0x2108, 0x9084, 0x084e, 0x9d21, 0x4210, 0xe93a, 0x1084, 0x0842, 0x8421, 0x4274, 0x2108, 0x1084, 0x0842, 0x8421, 0xd210, 0xef7b, 0x109d, 0x09d2, 0x8421, 0x4274, 0x2108, 0x1084, 0x0842, 0x8421, 0xd210, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf652, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0xdad6, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x7bda, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xed6b, 0xd6bd, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6bd, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6bd, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xbdef, 0xdef7, 0xef7b, 0x294a, 0x94a5, 0x4a52, 0xa529, 0xef7a, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xed6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0xdad6, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0xded6, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0xded6, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0xdef7, 0xef7b, 0xf6b5, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x4a56, 0xa529, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5af6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6bda, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xf7b5, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xef7b, 0xd6b5, 0x7bda, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x7bda, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x7b5a, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0xdad6, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xbdad, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0xdef6, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xbdad, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xef6b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x6b5a, 0xb5ad, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xd6b5, 0x7b5a, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7b5, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0xbde9, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x7a42, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef48, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0xf484, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x1084, 0x0842, 0x8421, 0x4210, 0x2108, 0x1084, 0x0842, 0x8421, 0x4210, 0xef48, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf75d, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x6b5a, 0xb5ad, 0x5ad6, 0xad6b, 0xd6b5, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0x94a5, 0x4a52, 0xa529, 0x5294, 0x294a, 0xf7bd, 0x7bde, 0xbdef, 0xdef7, 0xef7b, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xe739, 0x739c, 0x39ce, 0x9ce7, 0xce73, 0xef79, 0x0000 } }; pspp-1.0.1/gl/fseeko.c0000644000175000017500000001360313132510756011444 00000000000000/* An fseeko() function that, together with fflush(), is POSIX compliant. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include /* Get off_t, lseek, _POSIX_VERSION. */ #include #include "stdio-impl.h" int fseeko (FILE *fp, off_t offset, int whence) #undef fseeko #if !HAVE_FSEEKO # undef fseek # define fseeko fseek #endif #if _GL_WINDOWS_64_BIT_OFF_T # undef fseeko # if HAVE__FSEEKI64 /* msvc, mingw64 */ # define fseeko _fseeki64 # else /* mingw */ # define fseeko fseeko64 # endif #endif { #if LSEEK_PIPE_BROKEN /* mingw gives bogus answers rather than failure on non-seekable files. */ if (lseek (fileno (fp), 0, SEEK_CUR) == -1) return EOF; #endif /* These tests are based on fpurge.c. */ #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ if (fp->_IO_read_end == fp->_IO_read_ptr && fp->_IO_write_ptr == fp->_IO_write_base && fp->_IO_save_base == NULL) #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ # if defined __SL64 && defined __SCLE /* Cygwin */ if ((fp->_flags & __SL64) == 0) { /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit mode; but has an fseeko that requires 64-bit mode. */ FILE *tmp = fopen ("/dev/null", "r"); if (!tmp) return -1; fp->_flags |= __SL64; fp->_seek64 = tmp->_seek64; fclose (tmp); } # endif if (fp_->_p == fp_->_bf._base && fp_->_r == 0 && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ ? fp_->_bf._size : 0) && fp_ub._base == NULL) #elif defined __EMX__ /* emx+gcc */ if (fp->_ptr == fp->_buffer && fp->_rcount == 0 && fp->_wcount == 0 && fp->_ungetc_count == 0) #elif defined __minix /* Minix */ if (fp_->_ptr == fp_->_buf && (fp_->_ptr == NULL || fp_->_count == 0)) #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */ if (fp_->_ptr == fp_->_base && (fp_->_ptr == NULL || fp_->_cnt == 0)) #elif defined __UCLIBC__ /* uClibc */ if (((fp->__modeflags & __FLAG_WRITING) == 0 || fp->__bufpos == fp->__bufstart) && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0 || fp->__bufpos == fp->__bufread)) #elif defined __QNX__ /* QNX */ if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend) && fp->_Rback == fp->_Back + sizeof (fp->_Back) && fp->_Rsave == NULL) #elif defined __MINT__ /* Atari FreeMiNT */ if (fp->__bufp == fp->__buffer && fp->__get_limit == fp->__bufp && fp->__put_limit == fp->__bufp && !fp->__pushed_back) #elif defined EPLAN9 /* Plan9 */ if (fp->rp == fp->buf && fp->wp == fp->buf) #elif FUNC_FFLUSH_STDIN < 0 && 200809 <= _POSIX_VERSION /* Cross-compiling to some other system advertising conformance to POSIX.1-2008 or later. Assume fseeko and fflush work as advertised. If this assumption is incorrect, please report the bug to bug-gnulib. */ if (0) #else #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib." #endif { /* We get here when an fflush() call immediately preceded this one (or if ftell() has created buffers but no I/O has occurred on a newly-opened stream). We know there are no buffers. */ off_t pos = lseek (fileno (fp), offset, whence); if (pos == -1) { #if defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ fp_->_flags &= ~__SOFF; #endif return -1; } #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ fp->_flags &= ~_IO_EOF_SEEN; fp->_offset = pos; #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ # if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) || defined __minix /* fp_->_offset is typed as an integer. */ fp_->_offset = pos; # else /* fp_->_offset is an fpos_t. */ { /* Use a union, since on NetBSD, the compilation flags determine whether fpos_t is typedef'd to off_t or a struct containing a single off_t member. */ union { fpos_t f; off_t o; } u; u.o = pos; fp_->_offset = u.f; } # endif fp_->_flags |= __SOFF; fp_->_flags &= ~__SEOF; #elif defined __EMX__ /* emx+gcc */ fp->_flags &= ~_IOEOF; #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */ fp_->_flag &= ~_IOEOF; #elif defined __MINT__ /* Atari FreeMiNT */ fp->__offset = pos; fp->__eof = 0; #endif return 0; } return fseeko (fp, offset, whence); } pspp-1.0.1/gl/anytostr.c0000644000175000017500000000315113124536241012046 00000000000000/* anytostr.c -- convert integers to printable strings Copyright (C) 2001, 2006, 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paul Eggert */ /* Tell gcc not to warn about the (i < 0) test, below. */ #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wtype-limits" #elif defined __clang__ # pragma clang diagnostic ignored "-Wtautological-compare" #endif #include #include "inttostr.h" /* Convert I to a printable string in BUF, which must be at least INT_BUFSIZE_BOUND (INTTYPE) bytes long. Return the address of the printable string, which need not start at BUF. */ char * __attribute_warn_unused_result__ anytostr (inttype i, char *buf) { char *p = buf + INT_STRLEN_BOUND (inttype); *p = 0; if (i < 0) { do *--p = '0' - i % 10; while ((i /= 10) != 0); *--p = '-'; } else { do *--p = '0' + i % 10; while ((i /= 10) != 0); } return p; } pspp-1.0.1/gl/mkdtemp.c0000644000175000017500000000245413124536242011632 00000000000000/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2017 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 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 . */ /* Extracted from misc/mkdtemp.c. */ #include /* Specification. */ #include #include "tempname.h" /* Generate a unique temporary directory from XTEMPLATE. The last six characters of XTEMPLATE must be "XXXXXX"; they are replaced with a string that makes the filename unique. The directory is created, mode 700, and its name is returned. (This function comes from OpenBSD.) */ char * mkdtemp (char *xtemplate) { if (gen_tempname (xtemplate, 0, 0, GT_DIR)) return NULL; else return xtemplate; } pspp-1.0.1/gl/strndup.c0000644000175000017500000000202413124536243011662 00000000000000/* A replacement function, for systems that lack strndup. Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include #include #include char * strndup (char const *s, size_t n) { size_t len = strnlen (s, n); char *new = malloc (len + 1); if (new == NULL) return NULL; new[len] = '\0'; return memcpy (new, s, len); } pspp-1.0.1/gl/mbrtowc.c0000644000175000017500000002545413124536242011653 00000000000000/* Convert multibyte character to wide character. Copyright (C) 1999-2002, 2005-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 . */ #include /* Specification. */ #include #if C_LOCALE_MAYBE_EILSEQ # include "hard-locale.h" # include #endif #if GNULIB_defined_mbstate_t /* Implement mbrtowc() on top of mbtowc(). */ # include # include # include "localcharset.h" # include "streq.h" # include "verify.h" #ifndef FALLTHROUGH # if __GNUC__ < 7 # define FALLTHROUGH ((void) 0) # else # define FALLTHROUGH __attribute__ ((__fallthrough__)) # endif #endif verify (sizeof (mbstate_t) >= 4); static char internal_state[4]; size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { char *pstate = (char *)ps; if (s == NULL) { pwc = NULL; s = ""; n = 1; } if (n == 0) return (size_t)(-2); /* Here n > 0. */ if (pstate == NULL) pstate = internal_state; { size_t nstate = pstate[0]; char buf[4]; const char *p; size_t m; switch (nstate) { case 0: p = s; m = n; break; case 3: buf[2] = pstate[3]; FALLTHROUGH; case 2: buf[1] = pstate[2]; FALLTHROUGH; case 1: buf[0] = pstate[1]; p = buf; m = nstate; buf[m++] = s[0]; if (n >= 2 && m < 4) { buf[m++] = s[1]; if (n >= 3 && m < 4) buf[m++] = s[2]; } break; default: errno = EINVAL; return (size_t)(-1); } /* Here m > 0. */ # if __GLIBC__ || defined __UCLIBC__ /* Work around bug */ mbtowc (NULL, NULL, 0); # endif { int res = mbtowc (pwc, p, m); if (res >= 0) { if (pwc != NULL && ((*pwc == 0) != (res == 0))) abort (); if (nstate >= (res > 0 ? res : 1)) abort (); res -= nstate; pstate[0] = 0; return res; } /* mbtowc does not distinguish between invalid and incomplete multibyte sequences. But mbrtowc needs to make this distinction. There are two possible approaches: - Use iconv() and its return value. - Use built-in knowledge about the possible encodings. Given the low quality of implementation of iconv() on the systems that lack mbrtowc(), we use the second approach. The possible encodings are: - 8-bit encodings, - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS, - UTF-8. Use specialized code for each. */ if (m >= 4 || m >= MB_CUR_MAX) goto invalid; /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ { const char *encoding = locale_charset (); if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) { /* Cf. unistr/u8-mblen.c. */ unsigned char c = (unsigned char) p[0]; if (c >= 0xc2) { if (c < 0xe0) { if (m == 1) goto incomplete; } else if (c < 0xf0) { if (m == 1) goto incomplete; if (m == 2) { unsigned char c2 = (unsigned char) p[1]; if ((c2 ^ 0x80) < 0x40 && (c >= 0xe1 || c2 >= 0xa0) && (c != 0xed || c2 < 0xa0)) goto incomplete; } } else if (c <= 0xf4) { if (m == 1) goto incomplete; else /* m == 2 || m == 3 */ { unsigned char c2 = (unsigned char) p[1]; if ((c2 ^ 0x80) < 0x40 && (c >= 0xf1 || c2 >= 0x90) && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) { if (m == 2) goto incomplete; else /* m == 3 */ { unsigned char c3 = (unsigned char) p[2]; if ((c3 ^ 0x80) < 0x40) goto incomplete; } } } } } goto invalid; } /* As a reference for this code, you can use the GNU libiconv implementation. Look for uses of the RET_TOOFEW macro. */ if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f) goto incomplete; } if (m == 2) { unsigned char c = (unsigned char) p[0]; if (c == 0x8f) { unsigned char c2 = (unsigned char) p[1]; if (c2 >= 0xa1 && c2 < 0xff) goto incomplete; } } goto invalid; } if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if (c >= 0xa1 && c < 0xff) goto incomplete; } goto invalid; } if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0xa1 && c < 0xff) || c == 0x8e) goto incomplete; } else /* m == 2 || m == 3 */ { unsigned char c = (unsigned char) p[0]; if (c == 0x8e) goto incomplete; } goto invalid; } if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe)) goto incomplete; } else /* m == 2 || m == 3 */ { unsigned char c = (unsigned char) p[0]; if (c >= 0x90 && c <= 0xe3) { unsigned char c2 = (unsigned char) p[1]; if (c2 >= 0x30 && c2 <= 0x39) { if (m == 2) goto incomplete; else /* m == 3 */ { unsigned char c3 = (unsigned char) p[2]; if (c3 >= 0x81 && c3 <= 0xfe) goto incomplete; } } } } goto invalid; } if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea) || (c >= 0xf0 && c <= 0xf9)) goto incomplete; } goto invalid; } /* An unknown multibyte encoding. */ goto incomplete; } incomplete: { size_t k = nstate; /* Here 0 <= k < m < 4. */ pstate[++k] = s[0]; if (k < m) { pstate[++k] = s[1]; if (k < m) pstate[++k] = s[2]; } if (k != m) abort (); } pstate[0] = m; return (size_t)(-2); invalid: errno = EILSEQ; /* The conversion state is undefined, says POSIX. */ return (size_t)(-1); } } } #else /* Override the system's mbrtowc() function. */ # undef mbrtowc size_t rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { size_t ret; wchar_t wc; # if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG || MBRTOWC_EMPTY_INPUT_BUG if (s == NULL) { pwc = NULL; s = ""; n = 1; } # endif # if MBRTOWC_EMPTY_INPUT_BUG if (n == 0) return (size_t) -2; # endif if (! pwc) pwc = &wc; # if MBRTOWC_RETVAL_BUG { static mbstate_t internal_state; /* Override mbrtowc's internal state. We cannot call mbsinit() on the hidden internal state, but we can call it on our variable. */ if (ps == NULL) ps = &internal_state; if (!mbsinit (ps)) { /* Parse the rest of the multibyte character byte for byte. */ size_t count = 0; for (; n > 0; s++, n--) { ret = mbrtowc (&wc, s, 1, ps); if (ret == (size_t)(-1)) return (size_t)(-1); count++; if (ret != (size_t)(-2)) { /* The multibyte character has been completed. */ *pwc = wc; return (wc == 0 ? 0 : count); } } return (size_t)(-2); } } # endif ret = mbrtowc (pwc, s, n, ps); # if MBRTOWC_NUL_RETVAL_BUG if (ret < (size_t) -2 && !*pwc) return 0; # endif # if C_LOCALE_MAYBE_EILSEQ if ((size_t) -2 <= ret && n != 0 && ! hard_locale (LC_CTYPE)) { unsigned char uc = *s; *pwc = uc; return 1; } # endif return ret; } #endif pspp-1.0.1/gl/sys_stat.in.h0000644000175000017500000005370113124536243012456 00000000000000/* Provide a more complete sys/stat.h header file. Copyright (C) 2005-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ /* This file is supposed to be used on platforms where is incomplete. It is intended to provide definitions and prototypes needed by an application. Start with what the system provides. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_system_sys_stat_h /* Special invocation convention. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_SYS_STAT_H /* Get nlink_t. May also define off_t to a 64-bit type on native Windows. */ #include /* Get struct timespec. */ #include /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #ifndef _@GUARD_PREFIX@_SYS_STAT_H #define _@GUARD_PREFIX@_SYS_STAT_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Before doing "#define mkdir rpl_mkdir" below, we need to include all headers that may declare mkdir(). Native Windows platforms declare mkdir in and/or , not in . */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include /* mingw32, mingw64 */ # include /* mingw64, MSVC 9 */ #endif /* Native Windows platforms declare umask() in . */ #if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include #endif /* Large File Support on native Windows. */ #if @WINDOWS_64_BIT_ST_SIZE@ # define stat _stati64 #endif /* Optionally, override 'struct stat' on native Windows. */ #if @GNULIB_OVERRIDES_STRUCT_STAT@ # undef stat # if @GNULIB_STAT@ # define stat rpl_stat # else /* Provoke a clear link error if stat() is used as a function and module 'stat' is not in use. */ # define stat stat_used_without_requesting_gnulib_module_stat # endif # if !GNULIB_defined_struct_stat struct stat { dev_t st_dev; ino_t st_ino; mode_t st_mode; nlink_t st_nlink; # if 0 uid_t st_uid; # else /* uid_t is not defined by default on native Windows. */ short st_uid; # endif # if 0 gid_t st_gid; # else /* gid_t is not defined by default on native Windows. */ short st_gid; # endif dev_t st_rdev; off_t st_size; # if 0 blksize_t st_blksize; blkcnt_t st_blocks; # endif # if @WINDOWS_STAT_TIMESPEC@ struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; # else time_t st_atime; time_t st_mtime; time_t st_ctime; # endif }; # if @WINDOWS_STAT_TIMESPEC@ # define st_atime st_atim.tv_sec # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec /* Indicator, for gnulib internal purposes. */ # define _GL_WINDOWS_STAT_TIMESPEC 1 # endif # define GNULIB_defined_struct_stat 1 # endif /* Other possible values of st_mode. */ # if 0 # define _S_IFBLK 0x6000 # endif # if 0 # define _S_IFLNK 0xA000 # endif # if 0 # define _S_IFSOCK 0xC000 # endif #endif #ifndef S_IFIFO # ifdef _S_IFIFO # define S_IFIFO _S_IFIFO # endif #endif #ifndef S_IFMT # define S_IFMT 0170000 #endif #if STAT_MACROS_BROKEN # undef S_ISBLK # undef S_ISCHR # undef S_ISDIR # undef S_ISFIFO # undef S_ISLNK # undef S_ISNAM # undef S_ISMPB # undef S_ISMPC # undef S_ISNWK # undef S_ISREG # undef S_ISSOCK #endif #ifndef S_ISBLK # ifdef S_IFBLK # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) # else # define S_ISBLK(m) 0 # endif #endif #ifndef S_ISCHR # ifdef S_IFCHR # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) # else # define S_ISCHR(m) 0 # endif #endif #ifndef S_ISDIR # ifdef S_IFDIR # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) # else # define S_ISDIR(m) 0 # endif #endif #ifndef S_ISDOOR /* Solaris 2.5 and up */ # define S_ISDOOR(m) 0 #endif #ifndef S_ISFIFO # ifdef S_IFIFO # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) # else # define S_ISFIFO(m) 0 # endif #endif #ifndef S_ISLNK # ifdef S_IFLNK # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) # else # define S_ISLNK(m) 0 # endif #endif #ifndef S_ISMPB /* V7 */ # ifdef S_IFMPB # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) # else # define S_ISMPB(m) 0 # define S_ISMPC(m) 0 # endif #endif #ifndef S_ISMPX /* AIX */ # define S_ISMPX(m) 0 #endif #ifndef S_ISNAM /* Xenix */ # ifdef S_IFNAM # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) # else # define S_ISNAM(m) 0 # endif #endif #ifndef S_ISNWK /* HP/UX */ # ifdef S_IFNWK # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) # else # define S_ISNWK(m) 0 # endif #endif #ifndef S_ISPORT /* Solaris 10 and up */ # define S_ISPORT(m) 0 #endif #ifndef S_ISREG # ifdef S_IFREG # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) # else # define S_ISREG(m) 0 # endif #endif #ifndef S_ISSOCK # ifdef S_IFSOCK # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) # else # define S_ISSOCK(m) 0 # endif #endif #ifndef S_TYPEISMQ # define S_TYPEISMQ(p) 0 #endif #ifndef S_TYPEISTMO # define S_TYPEISTMO(p) 0 #endif #ifndef S_TYPEISSEM # ifdef S_INSEM # define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) # else # define S_TYPEISSEM(p) 0 # endif #endif #ifndef S_TYPEISSHM # ifdef S_INSHD # define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) # else # define S_TYPEISSHM(p) 0 # endif #endif /* high performance ("contiguous data") */ #ifndef S_ISCTG # define S_ISCTG(p) 0 #endif /* Cray DMF (data migration facility): off line, with data */ #ifndef S_ISOFD # define S_ISOFD(p) 0 #endif /* Cray DMF (data migration facility): off line, with no data */ #ifndef S_ISOFL # define S_ISOFL(p) 0 #endif /* 4.4BSD whiteout */ #ifndef S_ISWHT # define S_ISWHT(m) 0 #endif /* If any of the following are undefined, define them to their de facto standard values. */ #if !S_ISUID # define S_ISUID 04000 #endif #if !S_ISGID # define S_ISGID 02000 #endif /* S_ISVTX is a common extension to POSIX. */ #ifndef S_ISVTX # define S_ISVTX 01000 #endif #if !S_IRUSR && S_IREAD # define S_IRUSR S_IREAD #endif #if !S_IRUSR # define S_IRUSR 00400 #endif #if !S_IRGRP # define S_IRGRP (S_IRUSR >> 3) #endif #if !S_IROTH # define S_IROTH (S_IRUSR >> 6) #endif #if !S_IWUSR && S_IWRITE # define S_IWUSR S_IWRITE #endif #if !S_IWUSR # define S_IWUSR 00200 #endif #if !S_IWGRP # define S_IWGRP (S_IWUSR >> 3) #endif #if !S_IWOTH # define S_IWOTH (S_IWUSR >> 6) #endif #if !S_IXUSR && S_IEXEC # define S_IXUSR S_IEXEC #endif #if !S_IXUSR # define S_IXUSR 00100 #endif #if !S_IXGRP # define S_IXGRP (S_IXUSR >> 3) #endif #if !S_IXOTH # define S_IXOTH (S_IXUSR >> 6) #endif #if !S_IRWXU # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #endif #if !S_IRWXG # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) #endif #if !S_IRWXO # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif /* S_IXUGO is a common extension to POSIX. */ #if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif #ifndef S_IRWXUGO # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif /* Macros for futimens and utimensat. */ #ifndef UTIME_NOW # define UTIME_NOW (-1) # define UTIME_OMIT (-2) #endif #if @GNULIB_FCHMODAT@ # if !@HAVE_FCHMODAT@ _GL_FUNCDECL_SYS (fchmodat, int, (int fd, char const *file, mode_t mode, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (fchmodat, int, (int fd, char const *file, mode_t mode, int flag)); _GL_CXXALIASWARN (fchmodat); #elif defined GNULIB_POSIXCHECK # undef fchmodat # if HAVE_RAW_DECL_FCHMODAT _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FSTAT@ # if @REPLACE_FSTAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fstat # define fstat rpl_fstat # endif _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); # else _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); # endif _GL_CXXALIASWARN (fstat); #elif @GNULIB_OVERRIDES_STRUCT_STAT@ # undef fstat # define fstat fstat_used_without_requesting_gnulib_module_fstat #elif @WINDOWS_64_BIT_ST_SIZE@ /* Above, we define stat to _stati64. */ # define fstat _fstati64 #elif defined GNULIB_POSIXCHECK # undef fstat # if HAVE_RAW_DECL_FSTAT _GL_WARN_ON_USE (fstat, "fstat has portability problems - " "use gnulib module fstat for portability"); # endif #endif #if @GNULIB_FSTATAT@ # if @REPLACE_FSTATAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fstatat # define fstatat rpl_fstatat # endif _GL_FUNCDECL_RPL (fstatat, int, (int fd, char const *name, struct stat *st, int flags) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (fstatat, int, (int fd, char const *name, struct stat *st, int flags)); # else # if !@HAVE_FSTATAT@ _GL_FUNCDECL_SYS (fstatat, int, (int fd, char const *name, struct stat *st, int flags) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (fstatat, int, (int fd, char const *name, struct stat *st, int flags)); # endif _GL_CXXALIASWARN (fstatat); #elif @GNULIB_OVERRIDES_STRUCT_STAT@ # undef fstatat # define fstatat fstatat_used_without_requesting_gnulib_module_fstatat #elif defined GNULIB_POSIXCHECK # undef fstatat # if HAVE_RAW_DECL_FSTATAT _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FUTIMENS@ /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens implementation relies on futimesat, which on Solaris 10 makes an invocation to futimens that is meant to invoke the libc's futimens(), not gnulib's futimens(). */ # if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef futimens # define futimens rpl_futimens # endif _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); # else # if !@HAVE_FUTIMENS@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif # if @HAVE_FUTIMENS@ _GL_CXXALIASWARN (futimens); # endif #elif defined GNULIB_POSIXCHECK # undef futimens # if HAVE_RAW_DECL_FUTIMENS _GL_WARN_ON_USE (futimens, "futimens is not portable - " "use gnulib module futimens for portability"); # endif #endif #if @GNULIB_LCHMOD@ /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME denotes a symbolic link. */ # if !@HAVE_LCHMOD@ /* The lchmod replacement follows symbolic links. Callers should take this into account; lchmod should be applied only to arguments that are known to not be symbolic links. On hosts that lack lchmod, this can lead to race conditions between the check and the invocation of lchmod, but we know of no workarounds that are reliable in general. You might try requesting support for lchmod from your operating system supplier. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lchmod chmod # endif /* Need to cast, because on mingw, the second parameter of chmod is int mode. */ _GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, (const char *filename, mode_t mode)); # else # if 0 /* assume already declared */ _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); # endif # if @HAVE_LCHMOD@ _GL_CXXALIASWARN (lchmod); # endif #elif defined GNULIB_POSIXCHECK # undef lchmod # if HAVE_RAW_DECL_LCHMOD _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " "use gnulib module lchmod for portability"); # endif #endif #if @GNULIB_LSTAT@ # if ! @HAVE_LSTAT@ /* mingw does not support symlinks, therefore it does not have lstat. But without links, stat does just fine. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lstat stat # endif _GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf)); # elif @REPLACE_LSTAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lstat # define lstat rpl_lstat # endif _GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); # else _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); # endif # if @HAVE_LSTAT@ _GL_CXXALIASWARN (lstat); # endif #elif @GNULIB_OVERRIDES_STRUCT_STAT@ # undef lstat # define lstat lstat_used_without_requesting_gnulib_module_lstat #elif defined GNULIB_POSIXCHECK # undef lstat # if HAVE_RAW_DECL_LSTAT _GL_WARN_ON_USE (lstat, "lstat is unportable - " "use gnulib module lstat for portability"); # endif #endif #if @REPLACE_MKDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mkdir # define mkdir rpl_mkdir # endif _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); #else /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included above. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # if !GNULIB_defined_rpl_mkdir static int rpl_mkdir (char const *name, mode_t mode) { return _mkdir (name); } # define GNULIB_defined_rpl_mkdir 1 # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mkdir rpl_mkdir # endif _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); # else _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); # endif #endif _GL_CXXALIASWARN (mkdir); #if @GNULIB_MKDIRAT@ # if !@HAVE_MKDIRAT@ _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); _GL_CXXALIASWARN (mkdirat); #elif defined GNULIB_POSIXCHECK # undef mkdirat # if HAVE_RAW_DECL_MKDIRAT _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_MKFIFO@ # if @REPLACE_MKFIFO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mkfifo # define mkfifo rpl_mkfifo # endif _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); # else # if !@HAVE_MKFIFO@ _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); # endif _GL_CXXALIASWARN (mkfifo); #elif defined GNULIB_POSIXCHECK # undef mkfifo # if HAVE_RAW_DECL_MKFIFO _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " "use gnulib module mkfifo for portability"); # endif #endif #if @GNULIB_MKFIFOAT@ # if !@HAVE_MKFIFOAT@ _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); _GL_CXXALIASWARN (mkfifoat); #elif defined GNULIB_POSIXCHECK # undef mkfifoat # if HAVE_RAW_DECL_MKFIFOAT _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " "use gnulib module mkfifoat for portability"); # endif #endif #if @GNULIB_MKNOD@ # if @REPLACE_MKNOD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mknod # define mknod rpl_mknod # endif _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); # else # if !@HAVE_MKNOD@ _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ _GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); # endif _GL_CXXALIASWARN (mknod); #elif defined GNULIB_POSIXCHECK # undef mknod # if HAVE_RAW_DECL_MKNOD _GL_WARN_ON_USE (mknod, "mknod is not portable - " "use gnulib module mknod for portability"); # endif #endif #if @GNULIB_MKNODAT@ # if !@HAVE_MKNODAT@ _GL_FUNCDECL_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev)); _GL_CXXALIASWARN (mknodat); #elif defined GNULIB_POSIXCHECK # undef mknodat # if HAVE_RAW_DECL_MKNODAT _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " "use gnulib module mkfifoat for portability"); # endif #endif #if @GNULIB_STAT@ # if @REPLACE_STAT@ # if !@GNULIB_OVERRIDES_STRUCT_STAT@ /* We can't use the object-like #define stat rpl_stat, because of struct stat. This means that rpl_stat will not be used if the user does (stat)(a,b). Oh well. */ # if defined _AIX && defined stat && defined _LARGE_FILES /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, so we have to replace stat64() instead of stat(). */ # undef stat64 # define stat64(name, st) rpl_stat (name, st) # elif @WINDOWS_64_BIT_ST_SIZE@ /* Above, we define stat to _stati64. */ # if defined __MINGW32__ && defined _stati64 # ifndef _USE_32BIT_TIME_T /* The system headers define _stati64 to _stat64. */ # undef _stat64 # define _stat64(name, st) rpl_stat (name, st) # endif # elif defined _MSC_VER && defined _stati64 # ifdef _USE_32BIT_TIME_T /* The system headers define _stati64 to _stat32i64. */ # undef _stat32i64 # define _stat32i64(name, st) rpl_stat (name, st) # else /* The system headers define _stati64 to _stat64. */ # undef _stat64 # define _stat64(name, st) rpl_stat (name, st) # endif # else # undef _stati64 # define _stati64(name, st) rpl_stat (name, st) # endif # elif defined __MINGW32__ && defined stat # ifdef _USE_32BIT_TIME_T /* The system headers define stat to _stat32i64. */ # undef _stat32i64 # define _stat32i64(name, st) rpl_stat (name, st) # else /* The system headers define stat to _stat64. */ # undef _stat64 # define _stat64(name, st) rpl_stat (name, st) # endif # elif defined _MSC_VER && defined stat # ifdef _USE_32BIT_TIME_T /* The system headers define stat to _stat32. */ # undef _stat32 # define _stat32(name, st) rpl_stat (name, st) # else /* The system headers define stat to _stat64i32. */ # undef _stat64i32 # define _stat64i32(name, st) rpl_stat (name, st) # endif # else /* !(_AIX || __MINGW32__ || _MSC_VER) */ # undef stat # define stat(name, st) rpl_stat (name, st) # endif /* !_LARGE_FILES */ # endif /* !@GNULIB_OVERRIDES_STRUCT_STAT@ */ _GL_EXTERN_C int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2)); # endif #elif @GNULIB_OVERRIDES_STRUCT_STAT@ /* see above: #define stat stat_used_without_requesting_gnulib_module_stat */ #elif defined GNULIB_POSIXCHECK # undef stat # if HAVE_RAW_DECL_STAT _GL_WARN_ON_USE (stat, "stat is unportable - " "use gnulib module stat for portability"); # endif #endif #if @GNULIB_UTIMENSAT@ /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat implementation relies on futimesat, which on Solaris 10 makes an invocation to utimensat that is meant to invoke the libc's utimensat(), not gnulib's utimensat(). */ # if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef utimensat # define utimensat rpl_utimensat # endif _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # else # if !@HAVE_UTIMENSAT@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # endif # if @HAVE_UTIMENSAT@ _GL_CXXALIASWARN (utimensat); # endif #elif defined GNULIB_POSIXCHECK # undef utimensat # if HAVE_RAW_DECL_UTIMENSAT _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " "use gnulib module utimensat for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_SYS_STAT_H */ #endif /* _@GUARD_PREFIX@_SYS_STAT_H */ #endif pspp-1.0.1/gl/btowc.c0000644000175000017500000000210713124536241011301 00000000000000/* Convert unibyte character to wide character. Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 . */ #include /* Specification. */ #include #include #include wint_t btowc (int c) { if (c != EOF) { char buf[1]; wchar_t wc; buf[0] = c; if (mbtowc (&wc, buf, 1) >= 0) return wc; } return WEOF; } pspp-1.0.1/gl/strcasestr.c0000644000175000017500000000573713124536243012376 00000000000000/* Case-insensitive searching in a string. Copyright (C) 2005-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2005. 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, 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 . */ #include /* Specification. */ #include #include #include #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Two-Way algorithm. */ #define RETURN_TYPE char * #define AVAILABLE(h, h_l, j, n_l) \ (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ && ((h_l) = (j) + (n_l))) #define CANON_ELEMENT(c) TOLOWER (c) #define CMP_FUNC(p1, p2, l) \ strncasecmp ((const char *) (p1), (const char *) (p2), l) #include "str-two-way.h" /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. This function gives unspecified results in multibyte locales. */ char * strcasestr (const char *haystack_start, const char *needle_start) { const char *haystack = haystack_start; const char *needle = needle_start; size_t needle_len; /* Length of NEEDLE. */ size_t haystack_len; /* Known minimum length of HAYSTACK. */ bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ /* Determine length of NEEDLE, and in the process, make sure HAYSTACK is at least as long (no point processing all of a long NEEDLE if HAYSTACK is too short). */ while (*haystack && *needle) { ok &= (TOLOWER ((unsigned char) *haystack) == TOLOWER ((unsigned char) *needle)); haystack++; needle++; } if (*needle) return NULL; if (ok) return (char *) haystack_start; needle_len = needle - needle_start; haystack = haystack_start + 1; haystack_len = needle_len - 1; /* Perform the search. Abstract memory is considered to be an array of 'unsigned char' values, not an array of 'char' values. See ISO C 99 section 6.2.6.1. */ if (needle_len < LONG_NEEDLE_THRESHOLD) return two_way_short_needle ((const unsigned char *) haystack, haystack_len, (const unsigned char *) needle_start, needle_len); return two_way_long_needle ((const unsigned char *) haystack, haystack_len, (const unsigned char *) needle_start, needle_len); } #undef LONG_NEEDLE_THRESHOLD pspp-1.0.1/gl/w32sock.h0000644000175000017500000000643013124536243011470 00000000000000/* w32sock.h --- internal auxiliary functions for Windows socket functions Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paolo Bonzini */ #include /* Get O_RDWR and O_BINARY. */ #include /* Get _open_osfhandle(). */ #include /* Get _get_osfhandle(). */ #if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" #else # include #endif #define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd))) #define SOCKET_TO_FD(fh) (_open_osfhandle ((intptr_t) (fh), O_RDWR | O_BINARY)) static inline void set_winsock_errno (void) { int err = WSAGetLastError (); /* Map some WSAE* errors to the runtime library's error codes. */ switch (err) { case WSA_INVALID_HANDLE: errno = EBADF; break; case WSA_NOT_ENOUGH_MEMORY: errno = ENOMEM; break; case WSA_INVALID_PARAMETER: errno = EINVAL; break; case WSAENAMETOOLONG: errno = ENAMETOOLONG; break; case WSAENOTEMPTY: errno = ENOTEMPTY; break; case WSAEWOULDBLOCK: errno = EWOULDBLOCK; break; case WSAEINPROGRESS: errno = EINPROGRESS; break; case WSAEALREADY: errno = EALREADY; break; case WSAENOTSOCK: errno = ENOTSOCK; break; case WSAEDESTADDRREQ: errno = EDESTADDRREQ; break; case WSAEMSGSIZE: errno = EMSGSIZE; break; case WSAEPROTOTYPE: errno = EPROTOTYPE; break; case WSAENOPROTOOPT: errno = ENOPROTOOPT; break; case WSAEPROTONOSUPPORT: errno = EPROTONOSUPPORT; break; case WSAEOPNOTSUPP: errno = EOPNOTSUPP; break; case WSAEAFNOSUPPORT: errno = EAFNOSUPPORT; break; case WSAEADDRINUSE: errno = EADDRINUSE; break; case WSAEADDRNOTAVAIL: errno = EADDRNOTAVAIL; break; case WSAENETDOWN: errno = ENETDOWN; break; case WSAENETUNREACH: errno = ENETUNREACH; break; case WSAENETRESET: errno = ENETRESET; break; case WSAECONNABORTED: errno = ECONNABORTED; break; case WSAECONNRESET: errno = ECONNRESET; break; case WSAENOBUFS: errno = ENOBUFS; break; case WSAEISCONN: errno = EISCONN; break; case WSAENOTCONN: errno = ENOTCONN; break; case WSAETIMEDOUT: errno = ETIMEDOUT; break; case WSAECONNREFUSED: errno = ECONNREFUSED; break; case WSAELOOP: errno = ELOOP; break; case WSAEHOSTUNREACH: errno = EHOSTUNREACH; break; default: errno = (err > 10000 && err < 10025) ? err - 10000 : err; break; } } pspp-1.0.1/gl/vsprintf.c0000644000175000017500000000406213124536243012042 00000000000000/* Formatted output to strings. Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include #include #include #include #include #include #include "vasnprintf.h" #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif /* Print formatted output to string STR. Return string length of formatted string. On error, return a negative value. */ int vsprintf (char *str, const char *format, va_list args) { char *output; size_t len; size_t lenbuf; /* vasnprintf fails with EOVERFLOW when the buffer size argument is larger than INT_MAX (if that fits into a 'size_t' at all). Also note that glibc's iconv fails with E2BIG when we pass a length that is so large that str + lenbuf wraps around, i.e. (uintptr_t) (str + lenbuf) < (uintptr_t) str. Therefore set lenbuf = min (SIZE_MAX, INT_MAX, - (uintptr_t) str - 1). */ lenbuf = (SIZE_MAX < INT_MAX ? SIZE_MAX : INT_MAX); if (lenbuf > ~ (uintptr_t) str) lenbuf = ~ (uintptr_t) str; output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; if (!output) return -1; if (output != str) { /* len is near SIZE_MAX. */ free (output); errno = EOVERFLOW; return -1; } if (len > INT_MAX) { errno = EOVERFLOW; return -1; } return len; } pspp-1.0.1/gl/xsize.c0000644000175000017500000000011613020461275011322 00000000000000#include #define XSIZE_INLINE _GL_EXTERN_INLINE #include "xsize.h" pspp-1.0.1/gl/asprintf.c0000644000175000017500000000210113124536241012003 00000000000000/* Formatted output to strings. Copyright (C) 1999, 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #ifdef IN_LIBASPRINTF # include "vasprintf.h" #else # include #endif #include int asprintf (char **resultp, const char *format, ...) { va_list args; int result; va_start (args, format); result = vasprintf (resultp, format, args); va_end (args); return result; } pspp-1.0.1/gl/signbitf.c0000644000175000017500000000407713124536243012002 00000000000000/* signbit() macro: Determine the sign bit of a floating-point number. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include #include #include "isnanf-nolibm.h" #include "float+.h" #ifdef gl_signbitf_OPTIMIZED_MACRO # undef gl_signbitf #endif int gl_signbitf (float arg) { #if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT /* The use of a union to extract the bits of the representation of a 'long double' is safe in practice, despite of the "aliasing rules" of C99, because the GCC docs say "Even with '-fstrict-aliasing', type-punning is allowed, provided the memory is accessed through the union type." and similarly for other compilers. */ # define NWORDS \ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { float value; unsigned int word[NWORDS]; } m; m.value = arg; return (m.word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; #elif HAVE_COPYSIGNF_IN_LIBC return copysignf (1.0f, arg) < 0; #else /* This does not do the right thing for NaN, but this is irrelevant for most use cases. */ if (isnanf (arg)) return 0; if (arg < 0.0f) return 1; else if (arg == 0.0f) { /* Distinguish 0.0f and -0.0f. */ static float plus_zero = 0.0f; float arg_mem = arg; return (memcmp (&plus_zero, &arg_mem, SIZEOF_FLT) != 0); } else return 0; #endif } pspp-1.0.1/gl/stpcpy.c0000644000175000017500000000254213124536243011512 00000000000000/* stpcpy.c -- copy a string and return pointer to end of new string Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2017 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. 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 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 . */ #include #include #undef __stpcpy #ifdef _LIBC # undef stpcpy #endif #ifndef weak_alias # define __stpcpy stpcpy #endif /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ char * __stpcpy (char *dest, const char *src) { register char *d = dest; register const char *s = src; do *d++ = *s; while (*s++ != '\0'); return d - 1; } #ifdef weak_alias weak_alias (__stpcpy, stpcpy) #endif pspp-1.0.1/gl/vsnprintf.c0000644000175000017500000000354013124536243012220 00000000000000/* Formatted output to strings. Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. Written by Simon Josefsson and Yoann Vandoorselaere . 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, 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 . */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include #include #include #include #include #include #include "vasnprintf.h" /* Print formatted output to string STR. Similar to vsprintf, but additional length SIZE limit how much is written into STR. Returns string length of formatted string (which may be larger than SIZE). STR may be NULL, in which case nothing will be written. On error, return a negative value. */ int vsnprintf (char *str, size_t size, const char *format, va_list args) { char *output; size_t len; size_t lenbuf = size; output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; if (!output) return -1; if (output != str) { if (size) { size_t pruned_len = (len < size ? len : size - 1); memcpy (str, output, pruned_len); str[pruned_len] = '\0'; } free (output); } if (len > INT_MAX) { errno = EOVERFLOW; return -1; } return len; } pspp-1.0.1/gl/flexmember.h0000644000175000017500000000335313124536241012322 00000000000000/* Sizes of structs with flexible array members. Copyright 2016-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . Written by Paul Eggert. */ #include /* Nonzero multiple of alignment of TYPE, suitable for FLEXSIZEOF below. On older platforms without _Alignof, use a pessimistic bound that is safe in practice even if FLEXIBLE_ARRAY_MEMBER is 1. On newer platforms, use _Alignof to get a tighter bound. */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 # define FLEXALIGNOF(type) (sizeof (type) & ~ (sizeof (type) - 1)) #else # define FLEXALIGNOF(type) _Alignof (type) #endif /* Upper bound on the size of a struct of type TYPE with a flexible array member named MEMBER that is followed by N bytes of other data. This is not simply sizeof (TYPE) + N, since it may require alignment on unusually picky C11 platforms, and FLEXIBLE_ARRAY_MEMBER may be 1 on pre-C11 platforms. Yield a value less than N if and only if arithmetic overflow occurs. */ #define FLEXSIZEOF(type, member, n) \ ((offsetof (type, member) + FLEXALIGNOF (type) - 1 + (n)) \ & ~ (FLEXALIGNOF (type) - 1)) pspp-1.0.1/gl/unistr.in.h0000644000175000017500000005506313124536243012134 00000000000000/* Elementary Unicode string functions. Copyright (C) 2001-2002, 2005-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _UNISTR_H #define _UNISTR_H #include "unitypes.h" /* Get common macros for C. */ #include "unused-parameter.h" /* Get bool. */ #include /* Get size_t. */ #include #ifdef __cplusplus extern "C" { #endif /* Conventions: All functions prefixed with u8_ operate on UTF-8 encoded strings. Their unit is an uint8_t (1 byte). All functions prefixed with u16_ operate on UTF-16 encoded strings. Their unit is an uint16_t (a 2-byte word). All functions prefixed with u32_ operate on UCS-4 encoded strings. Their unit is an uint32_t (a 4-byte word). All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly n units. All arguments starting with "str" and the arguments of functions starting with u8_str/u16_str/u32_str denote a NUL terminated string, i.e. a string which terminates at the first NUL unit. This termination unit is considered part of the string for all memory allocation purposes, but is not considered part of the string for all other logical purposes. Functions returning a string result take a (resultbuf, lengthp) argument pair. If resultbuf is not NULL and the result fits into *lengthp units, it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly allocated string is returned. In both cases, *lengthp is set to the length (number of units) of the returned string. In case of error, NULL is returned and errno is set. */ /* Elementary string checks. */ /* Check whether an UTF-8 string is well-formed. Return NULL if valid, or a pointer to the first invalid unit otherwise. */ extern const uint8_t * u8_check (const uint8_t *s, size_t n) _UC_ATTRIBUTE_PURE; /* Check whether an UTF-16 string is well-formed. Return NULL if valid, or a pointer to the first invalid unit otherwise. */ extern const uint16_t * u16_check (const uint16_t *s, size_t n) _UC_ATTRIBUTE_PURE; /* Check whether an UCS-4 string is well-formed. Return NULL if valid, or a pointer to the first invalid unit otherwise. */ extern const uint32_t * u32_check (const uint32_t *s, size_t n) _UC_ATTRIBUTE_PURE; /* Elementary string conversions. */ /* Convert an UTF-8 string to an UTF-16 string. */ extern uint16_t * u8_to_u16 (const uint8_t *s, size_t n, uint16_t *resultbuf, size_t *lengthp); /* Convert an UTF-8 string to an UCS-4 string. */ extern uint32_t * u8_to_u32 (const uint8_t *s, size_t n, uint32_t *resultbuf, size_t *lengthp); /* Convert an UTF-16 string to an UTF-8 string. */ extern uint8_t * u16_to_u8 (const uint16_t *s, size_t n, uint8_t *resultbuf, size_t *lengthp); /* Convert an UTF-16 string to an UCS-4 string. */ extern uint32_t * u16_to_u32 (const uint16_t *s, size_t n, uint32_t *resultbuf, size_t *lengthp); /* Convert an UCS-4 string to an UTF-8 string. */ extern uint8_t * u32_to_u8 (const uint32_t *s, size_t n, uint8_t *resultbuf, size_t *lengthp); /* Convert an UCS-4 string to an UTF-16 string. */ extern uint16_t * u32_to_u16 (const uint32_t *s, size_t n, uint16_t *resultbuf, size_t *lengthp); /* Elementary string functions. */ /* Return the length (number of units) of the first character in S, which is no longer than N. Return 0 if it is the NUL character. Return -1 upon failure. */ /* Similar to mblen(), except that s must not be NULL. */ extern int u8_mblen (const uint8_t *s, size_t n) _UC_ATTRIBUTE_PURE; extern int u16_mblen (const uint16_t *s, size_t n) _UC_ATTRIBUTE_PURE; extern int u32_mblen (const uint32_t *s, size_t n) _UC_ATTRIBUTE_PURE; /* Return the length (number of units) of the first character in S, putting its 'ucs4_t' representation in *PUC. Upon failure, *PUC is set to 0xfffd, and an appropriate number of units is returned. The number of available units, N, must be > 0. */ /* Similar to mbtowc(), except that puc and s must not be NULL, n must be > 0, and the NUL character is not treated specially. */ /* The variants with _safe suffix are safe, even if the library is compiled without --enable-safety. */ #if GNULIB_UNISTR_U8_MBTOUC_UNSAFE || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n); # else extern int u8_mbtouc_unsafe_aux (ucs4_t *puc, const uint8_t *s, size_t n); static inline int u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n) { uint8_t c = *s; if (c < 0x80) { *puc = c; return 1; } else return u8_mbtouc_unsafe_aux (puc, s, n); } # endif #endif #if GNULIB_UNISTR_U16_MBTOUC_UNSAFE || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n); # else extern int u16_mbtouc_unsafe_aux (ucs4_t *puc, const uint16_t *s, size_t n); static inline int u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n) { uint16_t c = *s; if (c < 0xd800 || c >= 0xe000) { *puc = c; return 1; } else return u16_mbtouc_unsafe_aux (puc, s, n); } # endif #endif #if GNULIB_UNISTR_U32_MBTOUC_UNSAFE || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n); # else static inline int u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER) { uint32_t c = *s; if (c < 0xd800 || (c >= 0xe000 && c < 0x110000)) *puc = c; else /* invalid multibyte character */ *puc = 0xfffd; return 1; } # endif #endif #if GNULIB_UNISTR_U8_MBTOUC || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n); # else extern int u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n); static inline int u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n) { uint8_t c = *s; if (c < 0x80) { *puc = c; return 1; } else return u8_mbtouc_aux (puc, s, n); } # endif #endif #if GNULIB_UNISTR_U16_MBTOUC || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n); # else extern int u16_mbtouc_aux (ucs4_t *puc, const uint16_t *s, size_t n); static inline int u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n) { uint16_t c = *s; if (c < 0xd800 || c >= 0xe000) { *puc = c; return 1; } else return u16_mbtouc_aux (puc, s, n); } # endif #endif #if GNULIB_UNISTR_U32_MBTOUC || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n); # else static inline int u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER) { uint32_t c = *s; if (c < 0xd800 || (c >= 0xe000 && c < 0x110000)) *puc = c; else /* invalid multibyte character */ *puc = 0xfffd; return 1; } # endif #endif /* Return the length (number of units) of the first character in S, putting its 'ucs4_t' representation in *PUC. Upon failure, *PUC is set to 0xfffd, and -1 is returned for an invalid sequence of units, -2 is returned for an incomplete sequence of units. The number of available units, N, must be > 0. */ /* Similar to u*_mbtouc(), except that the return value gives more details about the failure, similar to mbrtowc(). */ #if GNULIB_UNISTR_U8_MBTOUCR || HAVE_LIBUNISTRING extern int u8_mbtoucr (ucs4_t *puc, const uint8_t *s, size_t n); #endif #if GNULIB_UNISTR_U16_MBTOUCR || HAVE_LIBUNISTRING extern int u16_mbtoucr (ucs4_t *puc, const uint16_t *s, size_t n); #endif #if GNULIB_UNISTR_U32_MBTOUCR || HAVE_LIBUNISTRING extern int u32_mbtoucr (ucs4_t *puc, const uint32_t *s, size_t n); #endif /* Put the multibyte character represented by UC in S, returning its length. Return -1 upon failure, -2 if the number of available units, N, is too small. The latter case cannot occur if N >= 6/2/1, respectively. */ /* Similar to wctomb(), except that s must not be NULL, and the argument n must be specified. */ #if GNULIB_UNISTR_U8_UCTOMB || HAVE_LIBUNISTRING /* Auxiliary function, also used by u8_chr, u8_strchr, u8_strrchr. */ extern int u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n); # if !HAVE_INLINE extern int u8_uctomb (uint8_t *s, ucs4_t uc, int n); # else static inline int u8_uctomb (uint8_t *s, ucs4_t uc, int n) { if (uc < 0x80 && n > 0) { s[0] = uc; return 1; } else return u8_uctomb_aux (s, uc, n); } # endif #endif #if GNULIB_UNISTR_U16_UCTOMB || HAVE_LIBUNISTRING /* Auxiliary function, also used by u16_chr, u16_strchr, u16_strrchr. */ extern int u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n); # if !HAVE_INLINE extern int u16_uctomb (uint16_t *s, ucs4_t uc, int n); # else static inline int u16_uctomb (uint16_t *s, ucs4_t uc, int n) { if (uc < 0xd800 && n > 0) { s[0] = uc; return 1; } else return u16_uctomb_aux (s, uc, n); } # endif #endif #if GNULIB_UNISTR_U32_UCTOMB || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int u32_uctomb (uint32_t *s, ucs4_t uc, int n); # else static inline int u32_uctomb (uint32_t *s, ucs4_t uc, int n) { if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000)) { if (n > 0) { *s = uc; return 1; } else return -2; } else return -1; } # endif #endif /* Copy N units from SRC to DEST. */ /* Similar to memcpy(). */ extern uint8_t * u8_cpy (uint8_t *dest, const uint8_t *src, size_t n); extern uint16_t * u16_cpy (uint16_t *dest, const uint16_t *src, size_t n); extern uint32_t * u32_cpy (uint32_t *dest, const uint32_t *src, size_t n); /* Copy N units from SRC to DEST, guaranteeing correct behavior for overlapping memory areas. */ /* Similar to memmove(). */ extern uint8_t * u8_move (uint8_t *dest, const uint8_t *src, size_t n); extern uint16_t * u16_move (uint16_t *dest, const uint16_t *src, size_t n); extern uint32_t * u32_move (uint32_t *dest, const uint32_t *src, size_t n); /* Set the first N characters of S to UC. UC should be a character that occupies only 1 unit. */ /* Similar to memset(). */ extern uint8_t * u8_set (uint8_t *s, ucs4_t uc, size_t n); extern uint16_t * u16_set (uint16_t *s, ucs4_t uc, size_t n); extern uint32_t * u32_set (uint32_t *s, ucs4_t uc, size_t n); /* Compare S1 and S2, each of length N. */ /* Similar to memcmp(). */ extern int u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n) _UC_ATTRIBUTE_PURE; extern int u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n) _UC_ATTRIBUTE_PURE; extern int u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n) _UC_ATTRIBUTE_PURE; /* Compare S1 and S2. */ /* Similar to the gnulib function memcmp2(). */ extern int u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2) _UC_ATTRIBUTE_PURE; extern int u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2) _UC_ATTRIBUTE_PURE; extern int u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2) _UC_ATTRIBUTE_PURE; /* Search the string at S for UC. */ /* Similar to memchr(). */ extern uint8_t * u8_chr (const uint8_t *s, size_t n, ucs4_t uc) _UC_ATTRIBUTE_PURE; extern uint16_t * u16_chr (const uint16_t *s, size_t n, ucs4_t uc) _UC_ATTRIBUTE_PURE; extern uint32_t * u32_chr (const uint32_t *s, size_t n, ucs4_t uc) _UC_ATTRIBUTE_PURE; /* Count the number of Unicode characters in the N units from S. */ /* Similar to mbsnlen(). */ extern size_t u8_mbsnlen (const uint8_t *s, size_t n) _UC_ATTRIBUTE_PURE; extern size_t u16_mbsnlen (const uint16_t *s, size_t n) _UC_ATTRIBUTE_PURE; extern size_t u32_mbsnlen (const uint32_t *s, size_t n) _UC_ATTRIBUTE_PURE; /* Elementary string functions with memory allocation. */ /* Make a freshly allocated copy of S, of length N. */ extern uint8_t * u8_cpy_alloc (const uint8_t *s, size_t n); extern uint16_t * u16_cpy_alloc (const uint16_t *s, size_t n); extern uint32_t * u32_cpy_alloc (const uint32_t *s, size_t n); /* Elementary string functions on NUL terminated strings. */ /* Return the length (number of units) of the first character in S. Return 0 if it is the NUL character. Return -1 upon failure. */ extern int u8_strmblen (const uint8_t *s) _UC_ATTRIBUTE_PURE; extern int u16_strmblen (const uint16_t *s) _UC_ATTRIBUTE_PURE; extern int u32_strmblen (const uint32_t *s) _UC_ATTRIBUTE_PURE; /* Return the length (number of units) of the first character in S, putting its 'ucs4_t' representation in *PUC. Return 0 if it is the NUL character. Return -1 upon failure. */ extern int u8_strmbtouc (ucs4_t *puc, const uint8_t *s); extern int u16_strmbtouc (ucs4_t *puc, const uint16_t *s); extern int u32_strmbtouc (ucs4_t *puc, const uint32_t *s); /* Forward iteration step. Advances the pointer past the next character, or returns NULL if the end of the string has been reached. Puts the character's 'ucs4_t' representation in *PUC. */ extern const uint8_t * u8_next (ucs4_t *puc, const uint8_t *s); extern const uint16_t * u16_next (ucs4_t *puc, const uint16_t *s); extern const uint32_t * u32_next (ucs4_t *puc, const uint32_t *s); /* Backward iteration step. Advances the pointer to point to the previous character, or returns NULL if the beginning of the string had been reached. Puts the character's 'ucs4_t' representation in *PUC. */ extern const uint8_t * u8_prev (ucs4_t *puc, const uint8_t *s, const uint8_t *start); extern const uint16_t * u16_prev (ucs4_t *puc, const uint16_t *s, const uint16_t *start); extern const uint32_t * u32_prev (ucs4_t *puc, const uint32_t *s, const uint32_t *start); /* Return the number of units in S. */ /* Similar to strlen(), wcslen(). */ extern size_t u8_strlen (const uint8_t *s) _UC_ATTRIBUTE_PURE; extern size_t u16_strlen (const uint16_t *s) _UC_ATTRIBUTE_PURE; extern size_t u32_strlen (const uint32_t *s) _UC_ATTRIBUTE_PURE; /* Return the number of units in S, but at most MAXLEN. */ /* Similar to strnlen(), wcsnlen(). */ extern size_t u8_strnlen (const uint8_t *s, size_t maxlen) _UC_ATTRIBUTE_PURE; extern size_t u16_strnlen (const uint16_t *s, size_t maxlen) _UC_ATTRIBUTE_PURE; extern size_t u32_strnlen (const uint32_t *s, size_t maxlen) _UC_ATTRIBUTE_PURE; /* Copy SRC to DEST. */ /* Similar to strcpy(), wcscpy(). */ extern uint8_t * u8_strcpy (uint8_t *dest, const uint8_t *src); extern uint16_t * u16_strcpy (uint16_t *dest, const uint16_t *src); extern uint32_t * u32_strcpy (uint32_t *dest, const uint32_t *src); /* Copy SRC to DEST, returning the address of the terminating NUL in DEST. */ /* Similar to stpcpy(). */ extern uint8_t * u8_stpcpy (uint8_t *dest, const uint8_t *src); extern uint16_t * u16_stpcpy (uint16_t *dest, const uint16_t *src); extern uint32_t * u32_stpcpy (uint32_t *dest, const uint32_t *src); /* Copy no more than N units of SRC to DEST. */ /* Similar to strncpy(), wcsncpy(). */ extern uint8_t * u8_strncpy (uint8_t *dest, const uint8_t *src, size_t n); extern uint16_t * u16_strncpy (uint16_t *dest, const uint16_t *src, size_t n); extern uint32_t * u32_strncpy (uint32_t *dest, const uint32_t *src, size_t n); /* Copy no more than N units of SRC to DEST. Return a pointer past the last non-NUL unit written into DEST. */ /* Similar to stpncpy(). */ extern uint8_t * u8_stpncpy (uint8_t *dest, const uint8_t *src, size_t n); extern uint16_t * u16_stpncpy (uint16_t *dest, const uint16_t *src, size_t n); extern uint32_t * u32_stpncpy (uint32_t *dest, const uint32_t *src, size_t n); /* Append SRC onto DEST. */ /* Similar to strcat(), wcscat(). */ extern uint8_t * u8_strcat (uint8_t *dest, const uint8_t *src); extern uint16_t * u16_strcat (uint16_t *dest, const uint16_t *src); extern uint32_t * u32_strcat (uint32_t *dest, const uint32_t *src); /* Append no more than N units of SRC onto DEST. */ /* Similar to strncat(), wcsncat(). */ extern uint8_t * u8_strncat (uint8_t *dest, const uint8_t *src, size_t n); extern uint16_t * u16_strncat (uint16_t *dest, const uint16_t *src, size_t n); extern uint32_t * u32_strncat (uint32_t *dest, const uint32_t *src, size_t n); /* Compare S1 and S2. */ /* Similar to strcmp(), wcscmp(). */ #ifdef __sun /* Avoid a collision with the u8_strcmp() function in Solaris 11 libc. */ extern int u8_strcmp_gnu (const uint8_t *s1, const uint8_t *s2) _UC_ATTRIBUTE_PURE; # define u8_strcmp u8_strcmp_gnu #else extern int u8_strcmp (const uint8_t *s1, const uint8_t *s2) _UC_ATTRIBUTE_PURE; #endif extern int u16_strcmp (const uint16_t *s1, const uint16_t *s2) _UC_ATTRIBUTE_PURE; extern int u32_strcmp (const uint32_t *s1, const uint32_t *s2) _UC_ATTRIBUTE_PURE; /* Compare S1 and S2 using the collation rules of the current locale. Return -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2. Upon failure, set errno and return any value. */ /* Similar to strcoll(), wcscoll(). */ extern int u8_strcoll (const uint8_t *s1, const uint8_t *s2); extern int u16_strcoll (const uint16_t *s1, const uint16_t *s2); extern int u32_strcoll (const uint32_t *s1, const uint32_t *s2); /* Compare no more than N units of S1 and S2. */ /* Similar to strncmp(), wcsncmp(). */ extern int u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n) _UC_ATTRIBUTE_PURE; extern int u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n) _UC_ATTRIBUTE_PURE; extern int u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n) _UC_ATTRIBUTE_PURE; /* Duplicate S, returning an identical malloc'd string. */ /* Similar to strdup(), wcsdup(). */ extern uint8_t * u8_strdup (const uint8_t *s); extern uint16_t * u16_strdup (const uint16_t *s); extern uint32_t * u32_strdup (const uint32_t *s); /* Find the first occurrence of UC in STR. */ /* Similar to strchr(), wcschr(). */ extern uint8_t * u8_strchr (const uint8_t *str, ucs4_t uc) _UC_ATTRIBUTE_PURE; extern uint16_t * u16_strchr (const uint16_t *str, ucs4_t uc) _UC_ATTRIBUTE_PURE; extern uint32_t * u32_strchr (const uint32_t *str, ucs4_t uc) _UC_ATTRIBUTE_PURE; /* Find the last occurrence of UC in STR. */ /* Similar to strrchr(), wcsrchr(). */ extern uint8_t * u8_strrchr (const uint8_t *str, ucs4_t uc) _UC_ATTRIBUTE_PURE; extern uint16_t * u16_strrchr (const uint16_t *str, ucs4_t uc) _UC_ATTRIBUTE_PURE; extern uint32_t * u32_strrchr (const uint32_t *str, ucs4_t uc) _UC_ATTRIBUTE_PURE; /* Return the length of the initial segment of STR which consists entirely of Unicode characters not in REJECT. */ /* Similar to strcspn(), wcscspn(). */ extern size_t u8_strcspn (const uint8_t *str, const uint8_t *reject) _UC_ATTRIBUTE_PURE; extern size_t u16_strcspn (const uint16_t *str, const uint16_t *reject) _UC_ATTRIBUTE_PURE; extern size_t u32_strcspn (const uint32_t *str, const uint32_t *reject) _UC_ATTRIBUTE_PURE; /* Return the length of the initial segment of STR which consists entirely of Unicode characters in ACCEPT. */ /* Similar to strspn(), wcsspn(). */ extern size_t u8_strspn (const uint8_t *str, const uint8_t *accept) _UC_ATTRIBUTE_PURE; extern size_t u16_strspn (const uint16_t *str, const uint16_t *accept) _UC_ATTRIBUTE_PURE; extern size_t u32_strspn (const uint32_t *str, const uint32_t *accept) _UC_ATTRIBUTE_PURE; /* Find the first occurrence in STR of any character in ACCEPT. */ /* Similar to strpbrk(), wcspbrk(). */ extern uint8_t * u8_strpbrk (const uint8_t *str, const uint8_t *accept) _UC_ATTRIBUTE_PURE; extern uint16_t * u16_strpbrk (const uint16_t *str, const uint16_t *accept) _UC_ATTRIBUTE_PURE; extern uint32_t * u32_strpbrk (const uint32_t *str, const uint32_t *accept) _UC_ATTRIBUTE_PURE; /* Find the first occurrence of NEEDLE in HAYSTACK. */ /* Similar to strstr(), wcsstr(). */ extern uint8_t * u8_strstr (const uint8_t *haystack, const uint8_t *needle) _UC_ATTRIBUTE_PURE; extern uint16_t * u16_strstr (const uint16_t *haystack, const uint16_t *needle) _UC_ATTRIBUTE_PURE; extern uint32_t * u32_strstr (const uint32_t *haystack, const uint32_t *needle) _UC_ATTRIBUTE_PURE; /* Test whether STR starts with PREFIX. */ extern bool u8_startswith (const uint8_t *str, const uint8_t *prefix) _UC_ATTRIBUTE_PURE; extern bool u16_startswith (const uint16_t *str, const uint16_t *prefix) _UC_ATTRIBUTE_PURE; extern bool u32_startswith (const uint32_t *str, const uint32_t *prefix) _UC_ATTRIBUTE_PURE; /* Test whether STR ends with SUFFIX. */ extern bool u8_endswith (const uint8_t *str, const uint8_t *suffix) _UC_ATTRIBUTE_PURE; extern bool u16_endswith (const uint16_t *str, const uint16_t *suffix) _UC_ATTRIBUTE_PURE; extern bool u32_endswith (const uint32_t *str, const uint32_t *suffix) _UC_ATTRIBUTE_PURE; /* Divide STR into tokens separated by characters in DELIM. This interface is actually more similar to wcstok than to strtok. */ /* Similar to strtok_r(), wcstok(). */ extern uint8_t * u8_strtok (uint8_t *str, const uint8_t *delim, uint8_t **ptr); extern uint16_t * u16_strtok (uint16_t *str, const uint16_t *delim, uint16_t **ptr); extern uint32_t * u32_strtok (uint32_t *str, const uint32_t *delim, uint32_t **ptr); #ifdef __cplusplus } #endif #endif /* _UNISTR_H */ pspp-1.0.1/gl/dtoastr.c0000644000175000017500000000004613020461273011640 00000000000000#define LENGTH 2 #include "ftoastr.c" pspp-1.0.1/gl/getopt-core.h0000644000175000017500000000710213124536241012420 00000000000000/* Declarations for getopt (basic, portable features only). Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ #ifndef _GETOPT_CORE_H #define _GETOPT_CORE_H 1 /* This header should not be used directly; include getopt.h or unistd.h instead. Unlike most bits headers, it does not have a protective #error, because the guard macro for getopt.h in gnulib is not fixed. */ __BEGIN_DECLS /* For communication from 'getopt' to the caller. When 'getopt' finds an option that takes an argument, the argument value is returned here. Also, when 'ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to 'getopt'. On entry to 'getopt', zero means this is the first call; initialize. When 'getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, 'optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message 'getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, 'optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in 'optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU 'getopt'. The argument '--' causes premature termination of argument scanning, explicitly telling 'getopt' that there are no more options. If OPTS begins with '-', then non-option arguments are treated as arguments to the option '\1'. This behavior is specific to the GNU 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in the environment, then do not permute arguments. For standards compliance, the 'argv' argument has the type char *const *, but this is inaccurate; if argument permutation is enabled, the argv array (not the strings it points to) must be writable. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW _GL_ARG_NONNULL ((2, 3)); __END_DECLS #endif /* _GETOPT_CORE_H */ pspp-1.0.1/gl/printf-args.h0000644000175000017500000000753313124536242012435 00000000000000/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be declared. STATIC Set to 'static' to declare the function static. */ /* Default parameters. */ #ifndef PRINTF_FETCHARGS # define PRINTF_FETCHARGS printf_fetchargs #endif /* Get size_t. */ #include /* Get wchar_t. */ #if HAVE_WCHAR_T # include #endif /* Get wint_t. */ #if HAVE_WINT_T # include #endif /* Get va_list. */ #include /* Argument types */ typedef enum { TYPE_NONE, TYPE_SCHAR, TYPE_UCHAR, TYPE_SHORT, TYPE_USHORT, TYPE_INT, TYPE_UINT, TYPE_LONGINT, TYPE_ULONGINT, #if HAVE_LONG_LONG_INT TYPE_LONGLONGINT, TYPE_ULONGLONGINT, #endif TYPE_DOUBLE, TYPE_LONGDOUBLE, TYPE_CHAR, #if HAVE_WINT_T TYPE_WIDE_CHAR, #endif TYPE_STRING, #if HAVE_WCHAR_T TYPE_WIDE_STRING, #endif TYPE_POINTER, TYPE_COUNT_SCHAR_POINTER, TYPE_COUNT_SHORT_POINTER, TYPE_COUNT_INT_POINTER, TYPE_COUNT_LONGINT_POINTER #if HAVE_LONG_LONG_INT , TYPE_COUNT_LONGLONGINT_POINTER #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ , TYPE_U8_STRING , TYPE_U16_STRING , TYPE_U32_STRING #endif } arg_type; /* Polymorphic argument */ typedef struct { arg_type type; union { signed char a_schar; unsigned char a_uchar; short a_short; unsigned short a_ushort; int a_int; unsigned int a_uint; long int a_longint; unsigned long int a_ulongint; #if HAVE_LONG_LONG_INT long long int a_longlongint; unsigned long long int a_ulonglongint; #endif float a_float; double a_double; long double a_longdouble; int a_char; #if HAVE_WINT_T wint_t a_wide_char; #endif const char* a_string; #if HAVE_WCHAR_T const wchar_t* a_wide_string; #endif void* a_pointer; signed char * a_count_schar_pointer; short * a_count_short_pointer; int * a_count_int_pointer; long int * a_count_longint_pointer; #if HAVE_LONG_LONG_INT long long int * a_count_longlongint_pointer; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ const uint8_t * a_u8_string; const uint16_t * a_u16_string; const uint32_t * a_u32_string; #endif } a; } argument; /* Number of directly allocated arguments (no malloc() needed). */ #define N_DIRECT_ALLOC_ARGUMENTS 7 typedef struct { size_t count; argument *arg; argument direct_alloc_arg[N_DIRECT_ALLOC_ARGUMENTS]; } arguments; /* Fetch the arguments, putting them into a. */ #ifdef STATIC STATIC #else extern #endif int PRINTF_FETCHARGS (va_list args, arguments *a); #endif /* _PRINTF_ARGS_H */ pspp-1.0.1/gl/localtime-buffer.c0000644000175000017500000000313313124536241013403 00000000000000/* Provide access to the last buffer returned by localtime() or gmtime(). Copyright (C) 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* written by Jim Meyering */ #include /* Specification. */ #include "localtime-buffer.h" #if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME static struct tm tm_zero_buffer; struct tm *localtime_buffer_addr = &tm_zero_buffer; /* This is a wrapper for localtime. On the first call, record the address of the static buffer that localtime uses for its result. */ struct tm * rpl_localtime (time_t const *timep) { struct tm *tm = localtime (timep); if (localtime_buffer_addr == &tm_zero_buffer) localtime_buffer_addr = tm; return tm; } /* Same as above, since gmtime and localtime use the same buffer. */ struct tm * rpl_gmtime (time_t const *timep) { struct tm *tm = gmtime (timep); if (localtime_buffer_addr == &tm_zero_buffer) localtime_buffer_addr = tm; return tm; } #endif pspp-1.0.1/gl/alloca.c0000644000175000017500000003445413020461273011425 00000000000000/* alloca.c -- allocate automatically reclaimed memory (Mostly) portable public-domain implementation -- D A Gwyn This implementation of the PWB library alloca function, which is used to allocate space off the run-time stack so that it is automatically reclaimed upon procedure exit, was inspired by discussions with J. Q. Johnson of Cornell. J.Otto Tennant contributed the Cray support. There are some preprocessor constants that can be defined when compiling for your specific system, for improved efficiency; however, the defaults should be okay. The general concept of this implementation is to keep track of all alloca-allocated blocks, and reclaim any that are found to be deeper in the stack than the current invocation. This heuristic does not reclaim storage as soon as it becomes invalid, but it will do so eventually. As a special case, alloca(0) reclaims storage without allocating any. It is a good idea to use alloca(0) in your main control loop, etc. to force garbage collection. */ #include #include #include #include #ifdef emacs # include "lisp.h" # include "blockinput.h" # ifdef EMACS_FREE # undef free # define free EMACS_FREE # endif #else # define memory_full() abort () #endif /* If compiling with GCC 2, this file's not needed. */ #if !defined (__GNUC__) || __GNUC__ < 2 /* If someone has defined alloca as a macro, there must be some other way alloca is supposed to work. */ # ifndef alloca # ifdef emacs # ifdef static /* actually, only want this if static is defined as "" -- this is for usg, in which emacs must undefine static in order to make unexec workable */ # ifndef STACK_DIRECTION you lose -- must know STACK_DIRECTION at compile-time /* Using #error here is not wise since this file should work for old and obscure compilers. */ # endif /* STACK_DIRECTION undefined */ # endif /* static */ # endif /* emacs */ /* If your stack is a linked list of frames, you have to provide an "address metric" ADDRESS_FUNCTION macro. */ # if defined (CRAY) && defined (CRAY_STACKSEG_END) long i00afunc (); # define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) # else # define ADDRESS_FUNCTION(arg) &(arg) # endif /* Define STACK_DIRECTION 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 */ # ifndef STACK_DIRECTION # define STACK_DIRECTION 0 /* Direction unknown. */ # endif # if STACK_DIRECTION != 0 # define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ # else /* STACK_DIRECTION == 0; need run-time code. */ static int stack_dir; /* 1 or -1 once known. */ # define STACK_DIR stack_dir static int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } # endif /* STACK_DIRECTION == 0 */ /* An "alloca header" is used to: (a) chain together all alloca'ed blocks; (b) keep track of stack depth. It is very important that sizeof(header) agree with malloc alignment chunk size. The following default should work okay. */ # ifndef ALIGN_SIZE # define ALIGN_SIZE sizeof(double) # endif typedef union hdr { char align[ALIGN_SIZE]; /* To force sizeof(header). */ struct { union hdr *next; /* For chaining headers. */ char *deep; /* For stack depth measure. */ } h; } header; static header *last_alloca_header = NULL; /* -> last alloca header. */ /* Return a pointer to at least SIZE bytes of storage, which will be automatically reclaimed upon exit from the procedure that called alloca. Originally, this space was supposed to be taken from the current stack frame of the caller, but that method cannot be made to work for some implementations of C, for example under Gould's UTX/32. */ void * alloca (size_t size) { auto char probe; /* Probes stack depth: */ register char *depth = ADDRESS_FUNCTION (probe); # if STACK_DIRECTION == 0 if (STACK_DIR == 0) /* Unknown growth direction. */ STACK_DIR = find_stack_direction (NULL, (size & 1) + 20); # endif /* Reclaim garbage, defined as all alloca'd storage that was allocated from deeper in the stack than currently. */ { register header *hp; /* Traverses linked list. */ # ifdef emacs BLOCK_INPUT; # endif for (hp = last_alloca_header; hp != NULL;) if ((STACK_DIR > 0 && hp->h.deep > depth) || (STACK_DIR < 0 && hp->h.deep < depth)) { register header *np = hp->h.next; free (hp); /* Collect garbage. */ hp = np; /* -> next header. */ } else break; /* Rest are not deeper. */ last_alloca_header = hp; /* -> last valid storage. */ # ifdef emacs UNBLOCK_INPUT; # endif } if (size == 0) return NULL; /* No allocation required. */ /* Allocate combined header + user data storage. */ { /* Address of header. */ register header *new; size_t combined_size = sizeof (header) + size; if (combined_size < sizeof (header)) memory_full (); new = malloc (combined_size); if (! new) memory_full (); new->h.next = last_alloca_header; new->h.deep = depth; last_alloca_header = new; /* User storage begins just after header. */ return (void *) (new + 1); } } # if defined (CRAY) && defined (CRAY_STACKSEG_END) # ifdef DEBUG_I00AFUNC # include # endif # ifndef CRAY_STACK # define CRAY_STACK # ifndef CRAY2 /* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ struct stack_control_header { long shgrow:32; /* Number of times stack has grown. */ long shaseg:32; /* Size of increments to stack. */ long shhwm:32; /* High water mark of stack. */ long shsize:32; /* Current size of stack (all segments). */ }; /* The stack segment linkage control information occurs at the high-address end of a stack segment. (The stack grows from low addresses to high addresses.) The initial part of the stack segment linkage control information is 0200 (octal) words. This provides for register storage for the routine which overflows the stack. */ struct stack_segment_linkage { long ss[0200]; /* 0200 overflow words. */ long sssize:32; /* Number of words in this segment. */ long ssbase:32; /* Offset to stack base. */ long:32; long sspseg:32; /* Offset to linkage control of previous segment of stack. */ long:32; long sstcpt:32; /* Pointer to task common address block. */ long sscsnm; /* Private control structure number for microtasking. */ long ssusr1; /* Reserved for user. */ long ssusr2; /* Reserved for user. */ long sstpid; /* Process ID for pid based multi-tasking. */ long ssgvup; /* Pointer to multitasking thread giveup. */ long sscray[7]; /* Reserved for Cray Research. */ long ssa0; long ssa1; long ssa2; long ssa3; long ssa4; long ssa5; long ssa6; long ssa7; long sss0; long sss1; long sss2; long sss3; long sss4; long sss5; long sss6; long sss7; }; # else /* CRAY2 */ /* The following structure defines the vector of words returned by the STKSTAT library routine. */ struct stk_stat { long now; /* Current total stack size. */ long maxc; /* Amount of contiguous space which would be required to satisfy the maximum stack demand to date. */ long high_water; /* Stack high-water mark. */ long overflows; /* Number of stack overflow ($STKOFEN) calls. */ long hits; /* Number of internal buffer hits. */ long extends; /* Number of block extensions. */ long stko_mallocs; /* Block allocations by $STKOFEN. */ long underflows; /* Number of stack underflow calls ($STKRETN). */ long stko_free; /* Number of deallocations by $STKRETN. */ long stkm_free; /* Number of deallocations by $STKMRET. */ long segments; /* Current number of stack segments. */ long maxs; /* Maximum number of stack segments so far. */ long pad_size; /* Stack pad size. */ long current_address; /* Current stack segment address. */ long current_size; /* Current stack segment size. This number is actually corrupted by STKSTAT to include the fifteen word trailer area. */ long initial_address; /* Address of initial segment. */ long initial_size; /* Size of initial segment. */ }; /* The following structure describes the data structure which trails any stack segment. I think that the description in 'asdef' is out of date. I only describe the parts that I am sure about. */ struct stk_trailer { long this_address; /* Address of this block. */ long this_size; /* Size of this block (does not include this trailer). */ long unknown2; long unknown3; long link; /* Address of trailer block of previous segment. */ long unknown5; long unknown6; long unknown7; long unknown8; long unknown9; long unknown10; long unknown11; long unknown12; long unknown13; long unknown14; }; # endif /* CRAY2 */ # endif /* not CRAY_STACK */ # ifdef CRAY2 /* Determine a "stack measure" for an arbitrary ADDRESS. I doubt that "lint" will like this much. */ static long i00afunc (long *address) { struct stk_stat status; struct stk_trailer *trailer; long *block, size; long result = 0; /* We want to iterate through all of the segments. The first step is to get the stack status structure. We could do this more quickly and more directly, perhaps, by referencing the $LM00 common block, but I know that this works. */ STKSTAT (&status); /* Set up the iteration. */ trailer = (struct stk_trailer *) (status.current_address + status.current_size - 15); /* There must be at least one stack segment. Therefore it is a fatal error if "trailer" is null. */ if (trailer == 0) abort (); /* Discard segments that do not contain our argument address. */ while (trailer != 0) { block = (long *) trailer->this_address; size = trailer->this_size; if (block == 0 || size == 0) abort (); trailer = (struct stk_trailer *) trailer->link; if ((block <= address) && (address < (block + size))) break; } /* Set the result to the offset in this segment and add the sizes of all predecessor segments. */ result = address - block; if (trailer == 0) { return result; } do { if (trailer->this_size <= 0) abort (); result += trailer->this_size; trailer = (struct stk_trailer *) trailer->link; } while (trailer != 0); /* We are done. Note that if you present a bogus address (one not in any segment), you will get a different number back, formed from subtracting the address of the first block. This is probably not what you want. */ return (result); } # else /* not CRAY2 */ /* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. Determine the number of the cell within the stack, given the address of the cell. The purpose of this routine is to linearize, in some sense, stack addresses for alloca. */ static long i00afunc (long address) { long stkl = 0; long size, pseg, this_segment, stack; long result = 0; struct stack_segment_linkage *ssptr; /* Register B67 contains the address of the end of the current stack segment. If you (as a subprogram) store your registers on the stack and find that you are past the contents of B67, you have overflowed the segment. B67 also points to the stack segment linkage control area, which is what we are really interested in. */ stkl = CRAY_STACKSEG_END (); ssptr = (struct stack_segment_linkage *) stkl; /* If one subtracts 'size' from the end of the segment, one has the address of the first word of the segment. If this is not the first segment, 'pseg' will be nonzero. */ pseg = ssptr->sspseg; size = ssptr->sssize; this_segment = stkl - size; /* It is possible that calling this routine itself caused a stack overflow. Discard stack segments which do not contain the target address. */ while (!(this_segment <= address && address <= stkl)) { # ifdef DEBUG_I00AFUNC fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); # endif if (pseg == 0) break; stkl = stkl - pseg; ssptr = (struct stack_segment_linkage *) stkl; size = ssptr->sssize; pseg = ssptr->sspseg; this_segment = stkl - size; } result = address - this_segment; /* If you subtract pseg from the current end of the stack, you get the address of the previous stack segment's end. This seems a little convoluted to me, but I'll bet you save a cycle somewhere. */ while (pseg != 0) { # ifdef DEBUG_I00AFUNC fprintf (stderr, "%011o %011o\n", pseg, size); # endif stkl = stkl - pseg; ssptr = (struct stack_segment_linkage *) stkl; size = ssptr->sssize; pseg = ssptr->sspseg; result += size; } return (result); } # endif /* not CRAY2 */ # endif /* CRAY */ # endif /* no alloca */ #endif /* not GCC 2 */ pspp-1.0.1/gl/str-two-way.h0000644000175000017500000004216513124536243012417 00000000000000/* Byte-wise substring search, using the Two-Way algorithm. Copyright (C) 2008-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Eric Blake , 2008. 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, 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 . */ /* Before including this file, you need to include and , and define: RESULT_TYPE A macro that expands to the return type. AVAILABLE(h, h_l, j, n_l) A macro that returns nonzero if there are at least N_L bytes left starting at H[J]. H is 'unsigned char *', H_L, J, and N_L are 'size_t'; H_L is an lvalue. For NUL-terminated searches, H_L can be modified each iteration to avoid having to compute the end of H up front. For case-insensitivity, you may optionally define: CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L characters of P1 and P2 are equal. CANON_ELEMENT(c) A macro that canonicalizes an element right after it has been fetched from one of the two strings. The argument is an 'unsigned char'; the result must be an 'unsigned char' as well. This file undefines the macros documented above, and defines LONG_NEEDLE_THRESHOLD. */ #include #include /* We use the Two-Way string matching algorithm (also known as Chrochemore-Perrin), which guarantees linear complexity with constant space. Additionally, for long needles, we also use a bad character shift table similar to the Boyer-Moore algorithm to achieve improved (potentially sub-linear) performance. See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf */ /* Point at which computing a bad-byte shift table is likely to be worthwhile. Small needles should not compute a table, since it adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a speedup no greater than a factor of NEEDLE_LEN. The larger the needle, the better the potential performance gain. On the other hand, on non-POSIX systems with CHAR_BIT larger than eight, the memory required for the table is prohibitive. */ #if CHAR_BIT < 10 # define LONG_NEEDLE_THRESHOLD 32U #else # define LONG_NEEDLE_THRESHOLD SIZE_MAX #endif #ifndef MAX # define MAX(a, b) ((a < b) ? (b) : (a)) #endif #ifndef CANON_ELEMENT # define CANON_ELEMENT(c) c #endif #ifndef CMP_FUNC # define CMP_FUNC memcmp #endif /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. Return the index of the first byte in the right half, and set *PERIOD to the global period of the right half. The global period of a string is the smallest index (possibly its length) at which all remaining bytes in the string are repetitions of the prefix (the last repetition may be a subset of the prefix). When NEEDLE is factored into two halves, a local period is the length of the smallest word that shares a suffix with the left half and shares a prefix with the right half. All factorizations of a non-empty NEEDLE have a local period of at least 1 and no greater than NEEDLE_LEN. A critical factorization has the property that the local period equals the global period. All strings have at least one critical factorization with the left half smaller than the global period. And while some strings have more than one critical factorization, it is provable that with an ordered alphabet, at least one of the critical factorizations corresponds to a maximal suffix. Given an ordered alphabet, a critical factorization can be computed in linear time, with 2 * NEEDLE_LEN comparisons, by computing the shorter of two ordered maximal suffixes. The ordered maximal suffixes are determined by lexicographic comparison while tracking periodicity. */ static size_t critical_factorization (const unsigned char *needle, size_t needle_len, size_t *period) { /* Index of last byte of left half, or SIZE_MAX. */ size_t max_suffix, max_suffix_rev; size_t j; /* Index into NEEDLE for current candidate suffix. */ size_t k; /* Offset into current period. */ size_t p; /* Intermediate period. */ unsigned char a, b; /* Current comparison bytes. */ /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered out 0-length needles. */ if (needle_len < 3) { *period = 1; return needle_len - 1; } /* Invariants: 0 <= j < NEEDLE_LEN - 1 -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed) min(max_suffix, max_suffix_rev) < global period of NEEDLE 1 <= p <= global period of NEEDLE p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j] 1 <= k <= p */ /* Perform lexicographic search. */ max_suffix = SIZE_MAX; j = 0; k = p = 1; while (j + k < needle_len) { a = CANON_ELEMENT (needle[j + k]); b = CANON_ELEMENT (needle[max_suffix + k]); if (a < b) { /* Suffix is smaller, period is entire prefix so far. */ j += k; k = 1; p = j - max_suffix; } else if (a == b) { /* Advance through repetition of the current period. */ if (k != p) ++k; else { j += p; k = 1; } } else /* b < a */ { /* Suffix is larger, start over from current location. */ max_suffix = j++; k = p = 1; } } *period = p; /* Perform reverse lexicographic search. */ max_suffix_rev = SIZE_MAX; j = 0; k = p = 1; while (j + k < needle_len) { a = CANON_ELEMENT (needle[j + k]); b = CANON_ELEMENT (needle[max_suffix_rev + k]); if (b < a) { /* Suffix is smaller, period is entire prefix so far. */ j += k; k = 1; p = j - max_suffix_rev; } else if (a == b) { /* Advance through repetition of the current period. */ if (k != p) ++k; else { j += p; k = 1; } } else /* a < b */ { /* Suffix is larger, start over from current location. */ max_suffix_rev = j++; k = p = 1; } } /* Choose the shorter suffix. Return the index of the first byte of the right half, rather than the last byte of the left half. For some examples, 'banana' has two critical factorizations, both exposed by the two lexicographic extreme suffixes of 'anana' and 'nana', where both suffixes have a period of 2. On the other hand, with 'aab' and 'bba', both strings have a single critical factorization of the last byte, with the suffix having a period of 1. While the maximal lexicographic suffix of 'aab' is 'b', the maximal lexicographic suffix of 'bba' is 'ba', which is not a critical factorization. Conversely, the maximal reverse lexicographic suffix of 'a' works for 'bba', but not 'ab' for 'aab'. The shorter suffix of the two will always be a critical factorization. */ if (max_suffix_rev + 1 < max_suffix + 1) return max_suffix + 1; *period = p; return max_suffix_rev + 1; } /* Return the first location of non-empty NEEDLE within HAYSTACK, or NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD. Performance is guaranteed to be linear, with an initialization cost of 2 * NEEDLE_LEN comparisons. If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ static RETURN_TYPE two_way_short_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { size_t i; /* Index into current byte of NEEDLE. */ size_t j; /* Index into current window of HAYSTACK. */ size_t period; /* The period of the right half of needle. */ size_t suffix; /* The index of the right half of needle. */ /* Factor the needle into two halves, such that the left half is smaller than the global period, and the right half is periodic (with a period as large as NEEDLE_LEN - suffix). */ suffix = critical_factorization (needle, needle_len, &period); /* Perform the search. Each iteration compares the right half first. */ if (CMP_FUNC (needle, needle + period, suffix) == 0) { /* Entire needle is periodic; a mismatch in the left half can only advance by the period, so use memory to avoid rescanning known occurrences of the period in the right half. */ size_t memory = 0; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Scan for matches in right half. */ i = MAX (suffix, memory); while (i < needle_len && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (memory < i + 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i + 1 < memory + 1) return (RETURN_TYPE) (haystack + j); /* No match, so remember how many repetitions of period on the right half were scanned. */ j += period; memory = needle_len - period; } else { j += i - suffix + 1; memory = 0; } } } else { /* The two halves of needle are distinct; no extra memory is required, and any mismatch results in a maximal shift. */ period = MAX (suffix, needle_len - suffix) + 1; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Scan for matches in right half. */ i = suffix; while (i < needle_len && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i == SIZE_MAX) return (RETURN_TYPE) (haystack + j); j += period; } else j += i - suffix + 1; } } return NULL; } /* Return the first location of non-empty NEEDLE within HAYSTACK, or NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN. Performance is guaranteed to be linear, with an initialization cost of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations. If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible. If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and sublinear performance is not possible. */ static RETURN_TYPE two_way_long_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { size_t i; /* Index into current byte of NEEDLE. */ size_t j; /* Index into current window of HAYSTACK. */ size_t period; /* The period of the right half of needle. */ size_t suffix; /* The index of the right half of needle. */ size_t shift_table[1U << CHAR_BIT]; /* See below. */ /* Factor the needle into two halves, such that the left half is smaller than the global period, and the right half is periodic (with a period as large as NEEDLE_LEN - suffix). */ suffix = critical_factorization (needle, needle_len, &period); /* Populate shift_table. For each possible byte value c, shift_table[c] is the distance from the last occurrence of c to the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ for (i = 0; i < 1U << CHAR_BIT; i++) shift_table[i] = needle_len; for (i = 0; i < needle_len; i++) shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; /* Perform the search. Each iteration compares the right half first. */ if (CMP_FUNC (needle, needle + period, suffix) == 0) { /* Entire needle is periodic; a mismatch in the left half can only advance by the period, so use memory to avoid rescanning known occurrences of the period in the right half. */ size_t memory = 0; size_t shift; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Check the last byte first; if it does not match, then shift to the next possible match location. */ shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; if (0 < shift) { if (memory && shift < period) { /* Since needle is periodic, but the last period has a byte out of place, there can be no match until after the mismatch. */ shift = needle_len - period; } memory = 0; j += shift; continue; } /* Scan for matches in right half. The last byte has already been matched, by virtue of the shift table. */ i = MAX (suffix, memory); while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len - 1 <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (memory < i + 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i + 1 < memory + 1) return (RETURN_TYPE) (haystack + j); /* No match, so remember how many repetitions of period on the right half were scanned. */ j += period; memory = needle_len - period; } else { j += i - suffix + 1; memory = 0; } } } else { /* The two halves of needle are distinct; no extra memory is required, and any mismatch results in a maximal shift. */ size_t shift; period = MAX (suffix, needle_len - suffix) + 1; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Check the last byte first; if it does not match, then shift to the next possible match location. */ shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; if (0 < shift) { j += shift; continue; } /* Scan for matches in right half. The last byte has already been matched, by virtue of the shift table. */ i = suffix; while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len - 1 <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i == SIZE_MAX) return (RETURN_TYPE) (haystack + j); j += period; } else j += i - suffix + 1; } } return NULL; } #undef AVAILABLE #undef CANON_ELEMENT #undef CMP_FUNC #undef MAX #undef RETURN_TYPE pspp-1.0.1/gl/xalloc-die.c0000644000175000017500000000243413124536243012211 00000000000000/* Report a memory allocation failure and exit. Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include "xalloc.h" #include #include "error.h" #include "exitfail.h" #include "gettext.h" #define _(msgid) gettext (msgid) void xalloc_die (void) { error (exit_failure, 0, "%s", _("memory exhausted")); /* _Noreturn cannot be given to error, since it may return if its first argument is 0. To help compilers understand the xalloc_die does not return, call abort. Also, the abort is a safety feature if exit_failure is 0 (which shouldn't happen). */ abort (); } pspp-1.0.1/gl/count-one-bits.h0000644000175000017500000001143313124536241013040 00000000000000/* count-one-bits.h -- counts the number of 1-bits in a word. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Ben Pfaff. */ #ifndef COUNT_ONE_BITS_H #define COUNT_ONE_BITS_H 1 #include #include #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef COUNT_ONE_BITS_INLINE # define COUNT_ONE_BITS_INLINE _GL_INLINE #endif /* Expand to code that computes the number of 1-bits of the local variable 'x' of type TYPE (an unsigned integer type) and return it from the current function. */ #define COUNT_ONE_BITS_GENERIC(TYPE) \ do \ { \ int count = 0; \ int bits; \ for (bits = 0; bits < sizeof (TYPE) * CHAR_BIT; bits += 32) \ { \ count += count_one_bits_32 (x); \ x = x >> 31 >> 1; \ } \ return count; \ } \ while (0) /* Assuming the GCC builtin is BUILTIN and the MSC builtin is MSC_BUILTIN, expand to code that computes the number of 1-bits of the local variable 'x' of type TYPE (an unsigned integer type) and return it from the current function. */ #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # define COUNT_ONE_BITS(BUILTIN, MSC_BUILTIN, TYPE) return BUILTIN (x) #else /* Compute and return the number of 1-bits set in the least significant 32 bits of X. */ COUNT_ONE_BITS_INLINE int count_one_bits_32 (unsigned int x) { x = ((x & 0xaaaaaaaaU) >> 1) + (x & 0x55555555U); x = ((x & 0xccccccccU) >> 2) + (x & 0x33333333U); x = (x >> 16) + (x & 0xffff); x = ((x & 0xf0f0) >> 4) + (x & 0x0f0f); return (x >> 8) + (x & 0x00ff); } # if 1500 <= _MSC_VER && (defined _M_IX86 || defined _M_X64) /* While gcc falls back to its own generic code if the machine on which it's running doesn't support popcount, with Microsoft's compiler we need to detect and fallback ourselves. */ # pragma intrinsic __cpuid # pragma intrinsic __popcnt # pragma intrinsic __popcnt64 /* Return nonzero if popcount is supported. */ /* 1 if supported, 0 if not supported, -1 if unknown. */ extern int popcount_support; COUNT_ONE_BITS_INLINE int popcount_supported (void) { if (popcount_support < 0) { int cpu_info[4]; __cpuid (cpu_info, 1); popcount_support = (cpu_info[2] >> 23) & 1; /* See MSDN. */ } return popcount_support; } # define COUNT_ONE_BITS(BUILTIN, MSC_BUILTIN, TYPE) \ do \ { \ if (popcount_supported ()) \ return MSC_BUILTIN (x); \ else \ COUNT_ONE_BITS_GENERIC (TYPE); \ } \ while (0) # else # define COUNT_ONE_BITS(BUILTIN, MSC_BUILTIN, TYPE) \ COUNT_ONE_BITS_GENERIC (TYPE) # endif #endif /* Compute and return the number of 1-bits set in X. */ COUNT_ONE_BITS_INLINE int count_one_bits (unsigned int x) { COUNT_ONE_BITS (__builtin_popcount, __popcnt, unsigned int); } /* Compute and return the number of 1-bits set in X. */ COUNT_ONE_BITS_INLINE int count_one_bits_l (unsigned long int x) { COUNT_ONE_BITS (__builtin_popcountl, __popcnt, unsigned long int); } #if HAVE_UNSIGNED_LONG_LONG_INT /* Compute and return the number of 1-bits set in X. */ COUNT_ONE_BITS_INLINE int count_one_bits_ll (unsigned long long int x) { COUNT_ONE_BITS (__builtin_popcountll, __popcnt64, unsigned long long int); } #endif _GL_INLINE_HEADER_END #endif /* COUNT_ONE_BITS_H */ pspp-1.0.1/gl/unused-parameter.h0000644000175000017500000000304213124536241013450 00000000000000/* A C macro for declaring that specific function parameters are not used. Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter declarations for parameters that are not used. This helps to reduce warnings, such as from GCC -Wunused-parameter. The syntax is as follows: type param _GL_UNUSED_PARAMETER or more generally param_decl _GL_UNUSED_PARAMETER For example: int param _GL_UNUSED_PARAMETER int *(*param)(void) _GL_UNUSED_PARAMETER Other possible, but obscure and discouraged syntaxes: int _GL_UNUSED_PARAMETER *(*param)(void) _GL_UNUSED_PARAMETER int *(*param)(void) */ #ifndef _GL_UNUSED_PARAMETER # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) # else # define _GL_UNUSED_PARAMETER # endif #endif pspp-1.0.1/gl/getopt_int.h0000644000175000017500000001006213124536242012344 00000000000000/* Internal declarations for getopt. Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ #ifndef _GETOPT_INT_H #define _GETOPT_INT_H 1 #include extern int _getopt_internal (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int __posixly_correct); /* Reentrant versions which can handle parsing multiple argument vectors at the same time. */ /* Describe how to deal with options that follow non-option ARGV-elements. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what POSIX specifies should happen. PERMUTE means permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. The special argument '--' forces an end of option-scanning regardless of the value of 'ordering'. In the case of RETURN_IN_ORDER, only '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */ enum __ord { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }; /* Data type for reentrant functions. */ struct _getopt_data { /* These have exactly the same meaning as the corresponding global variables, except that they are used for the reentrant versions of getopt. */ int optind; int opterr; int optopt; char *optarg; /* Internal members. */ /* True if the internal members have been initialized. */ int __initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ char *__nextchar; /* See __ord above. */ enum __ord __ordering; /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. 'first_nonopt' is the index in ARGV of the first of them; 'last_nonopt' is the index after the last of them. */ int __first_nonopt; int __last_nonopt; }; /* The initializer is necessary to set OPTIND and OPTERR to their default values and to clear the initialization flag. */ #define _GETOPT_DATA_INITIALIZER { 1, 1 } extern int _getopt_internal_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, struct _getopt_data *__data, int __posixly_correct); extern int _getopt_long_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); extern int _getopt_long_only_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); #endif /* getopt_int.h */ pspp-1.0.1/gl/sockets.h0000644000175000017500000000315213124536243011646 00000000000000/* sockets.h - wrappers for Windows socket functions Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Simon Josefsson */ #ifndef SOCKETS_H #define SOCKETS_H 1 #define SOCKETS_1_0 0x0001 #define SOCKETS_1_1 0x0101 #define SOCKETS_2_0 0x0002 #define SOCKETS_2_1 0x0102 #define SOCKETS_2_2 0x0202 int gl_sockets_startup (int version) #ifndef WINDOWS_SOCKETS _GL_ATTRIBUTE_CONST #endif ; int gl_sockets_cleanup (void) #ifndef WINDOWS_SOCKETS _GL_ATTRIBUTE_CONST #endif ; /* This function is useful it you create a socket using gnulib's Winsock wrappers but needs to pass on the socket handle to some other library that only accepts sockets. */ #ifdef WINDOWS_SOCKETS # include # if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" # else # include # endif static inline SOCKET gl_fd_to_handle (int fd) { return _get_osfhandle (fd); } #else # define gl_fd_to_handle(x) (x) #endif /* WINDOWS_SOCKETS */ #endif /* SOCKETS_H */ pspp-1.0.1/gl/unigbrk.in.h0000644000175000017500000001040313124536243012236 00000000000000/* Grapheme cluster breaks in Unicode strings. Copyright (C) 2010-2017 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. 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 . */ #ifndef _UNIGBRK_H #define _UNIGBRK_H /* Get bool. */ #include /* Get size_t. */ #include #include "unitypes.h" #ifdef __cplusplus extern "C" { #endif /* ========================================================================= */ /* Property defined in Unicode Standard Annex #29, section "Grapheme Cluster Boundaries" */ /* Possible values of the Grapheme_Cluster_Break property. This enumeration may be extended in the future. */ enum { GBP_OTHER = 0, GBP_CR = 1, GBP_LF = 2, GBP_CONTROL = 3, GBP_EXTEND = 4, GBP_PREPEND = 5, GBP_SPACINGMARK = 6, GBP_L = 7, GBP_V = 8, GBP_T = 9, GBP_LV = 10, GBP_LVT = 11, GBP_RI = 12 }; /* Return the Grapheme_Cluster_Break property of a Unicode character. */ extern int uc_graphemeclusterbreak_property (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Grapheme cluster breaks. */ /* Returns true if there is a grapheme cluster boundary between Unicode code points A and B. A "grapheme cluster" is an approximation to a user-perceived character, which sometimes corresponds to multiple code points. For example, an English letter followed by an acute accent can be expressed as two consecutive Unicode code points, but it is perceived by the user as only a single character and therefore constitutes a single grapheme cluster. Implements extended (not legacy) grapheme cluster rules, because UAX #29 indicates that they are preferred. Use A == 0 or B == 0 to indicate start of text or end of text, respectively. */ extern bool uc_is_grapheme_break (ucs4_t a, ucs4_t b) _UC_ATTRIBUTE_CONST; /* Returns the start of the next grapheme cluster following S, or NULL if the end of the string has been reached. */ extern const uint8_t * u8_grapheme_next (const uint8_t *s, const uint8_t *end) _UC_ATTRIBUTE_PURE; extern const uint16_t * u16_grapheme_next (const uint16_t *s, const uint16_t *end) _UC_ATTRIBUTE_PURE; extern const uint32_t * u32_grapheme_next (const uint32_t *s, const uint32_t *end) _UC_ATTRIBUTE_PURE; /* Returns the start of the previous grapheme cluster before S, or NULL if the start of the string has been reached. */ extern const uint8_t * u8_grapheme_prev (const uint8_t *s, const uint8_t *start) _UC_ATTRIBUTE_PURE; extern const uint16_t * u16_grapheme_prev (const uint16_t *s, const uint16_t *start) _UC_ATTRIBUTE_PURE; extern const uint32_t * u32_grapheme_prev (const uint32_t *s, const uint32_t *start) _UC_ATTRIBUTE_PURE; /* Determine the grapheme cluster boundaries in S, and store the result at p[0..n-1]. p[i] = 1 means that a new grapheme cluster begins at s[i]. p[i] = 0 means that s[i-1] and s[i] are part of the same grapheme cluster. p[0] will always be 1. */ extern void u8_grapheme_breaks (const uint8_t *s, size_t n, char *p); extern void u16_grapheme_breaks (const uint16_t *s, size_t n, char *p); extern void u32_grapheme_breaks (const uint32_t *s, size_t n, char *p); extern void ulc_grapheme_breaks (const char *s, size_t n, char *p); /* ========================================================================= */ #ifdef __cplusplus } #endif #endif /* _UNIGBRK_H */ pspp-1.0.1/gl/memchr.c0000644000175000017500000001334613124536242011446 00000000000000/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2017 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and commentary by Jim Blandy (jimb@ai.mit.edu); adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), and implemented by Roland McGrath (roland@ai.mit.edu). NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. 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 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 . */ #ifndef _LIBC # include #endif #include #include #if defined _LIBC # include #else # define reg_char char #endif #include #if HAVE_BP_SYM_H || defined _LIBC # include #else # define BP_SYM(sym) sym #endif #undef __memchr #ifdef _LIBC # undef memchr #endif #ifndef weak_alias # define __memchr memchr #endif /* Search no more than N bytes of S for C. */ void * __memchr (void const *s, int c_in, size_t n) { /* On 32-bit hardware, choosing longword to be a 32-bit unsigned long instead of a 64-bit uintmax_t tends to give better performance. On 64-bit hardware, unsigned long is generally 64 bits already. Change this typedef to experiment with performance. */ typedef unsigned long int longword; const unsigned char *char_ptr; const longword *longword_ptr; longword repeated_one; longword repeated_c; unsigned reg_char c; c = (unsigned char) c_in; /* Handle the first few bytes by reading one byte at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ for (char_ptr = (const unsigned char *) s; n > 0 && (size_t) char_ptr % sizeof (longword) != 0; --n, ++char_ptr) if (*char_ptr == c) return (void *) char_ptr; longword_ptr = (const longword *) char_ptr; /* All these elucidatory comments refer to 4-byte longwords, but the theory applies equally well to any size longwords. */ /* Compute auxiliary longword values: repeated_one is a value which has a 1 in every byte. repeated_c has c in every byte. */ repeated_one = 0x01010101; repeated_c = c | (c << 8); repeated_c |= repeated_c << 16; if (0xffffffffU < (longword) -1) { repeated_one |= repeated_one << 31 << 1; repeated_c |= repeated_c << 31 << 1; if (8 < sizeof (longword)) { size_t i; for (i = 64; i < sizeof (longword) * 8; i *= 2) { repeated_one |= repeated_one << i; repeated_c |= repeated_c << i; } } } /* Instead of the traditional loop which tests each byte, we will test a longword at a time. The tricky part is testing if *any of the four* bytes in the longword in question are equal to c. We first use an xor with repeated_c. This reduces the task to testing whether *any of the four* bytes in longword1 is zero. We compute tmp = ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). That is, we perform the following operations: 1. Subtract repeated_one. 2. & ~longword1. 3. & a mask consisting of 0x80 in every byte. Consider what happens in each byte: - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, and step 3 transforms it into 0x80. A carry can also be propagated to more significant bytes. - If a byte of longword1 is nonzero, let its lowest 1 bit be at position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, the byte ends in a single bit of value 0 and k bits of value 1. After step 2, the result is just k bits of value 1: 2^k - 1. After step 3, the result is 0. And no carry is produced. So, if longword1 has only non-zero bytes, tmp is zero. Whereas if longword1 has a zero byte, call j the position of the least significant zero byte. Then the result has a zero at positions 0, ..., j-1 and a 0x80 at position j. We cannot predict the result at the more significant bytes (positions j+1..3), but it does not matter since we already have a non-zero bit at position 8*j+7. So, the test whether any byte in longword1 is zero is equivalent to testing whether tmp is nonzero. */ while (n >= sizeof (longword)) { longword longword1 = *longword_ptr ^ repeated_c; if ((((longword1 - repeated_one) & ~longword1) & (repeated_one << 7)) != 0) break; longword_ptr++; n -= sizeof (longword); } char_ptr = (const unsigned char *) longword_ptr; /* At this point, we know that either n < sizeof (longword), or one of the sizeof (longword) bytes starting at char_ptr is == c. On little-endian machines, we could determine the first such byte without any further memory accesses, just by looking at the tmp result from the last loop iteration. But this does not work on big-endian machines. Choose code that works in both cases. */ for (; n > 0; --n, ++char_ptr) { if (*char_ptr == c) return (void *) char_ptr; } return NULL; } #ifdef weak_alias weak_alias (__memchr, BP_SYM (memchr)) #endif pspp-1.0.1/gl/wchar.in.h0000644000175000017500000010576513124536243011721 00000000000000/* A substitute for ISO C99 , for platforms that have issues. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Eric Blake. */ /* * ISO C 99 for platforms that have issues. * * * For now, this just ensures proper prerequisite inclusion order and * the declaration of wcwidth(). */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if (((defined __need_mbstate_t || defined __need_wint_t) \ && !defined __MINGW32__ && !defined __KLIBC__) \ || (defined __hpux \ && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \ || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \ || defined _GL_ALREADY_INCLUDING_WCHAR_H) /* Special invocation convention: - Inside glibc and uClibc header files, but not MinGW. - On HP-UX 11.00 we have a sequence of nested includes -> -> , and the latter includes , once indirectly -> -> -> and once directly. In both situations 'wint_t' is not yet defined, therefore we cannot provide the function overrides; instead include only the system's . - With MinGW 3.22, when includes , only some part of is actually processed, and that doesn't include 'mbstate_t'. - On IRIX 6.5, similarly, we have an include -> , and the latter includes . But here, we have no way to detect whether is completely included or is still being included. */ #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_WCHAR_H #define _GL_ALREADY_INCLUDING_WCHAR_H #if @HAVE_FEATURES_H@ # include /* for __GLIBC__ */ #endif /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . In some builds of uClibc, is nonexistent and wchar_t is defined by . But avoid namespace pollution on glibc systems. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include #endif #ifndef __GLIBC__ # include # include #endif /* Include the original if it exists. Some builds of uClibc lack it. */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCHAR_H@ # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ #endif #undef _GL_ALREADY_INCLUDING_WCHAR_H #ifndef _@GUARD_PREFIX@_WCHAR_H #define _@GUARD_PREFIX@_WCHAR_H /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Define wint_t and WEOF. (Also done in wctype.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #else /* mingw and MSVC define wint_t as 'unsigned short' in or . This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be "unchanged by default argument promotions". Override it. */ # if @GNULIB_OVERRIDES_WINT_T@ # if !GNULIB_defined_wint_t # if @HAVE_CRTDEFS_H@ # include # else # include # endif typedef unsigned int rpl_wint_t; # undef wint_t # define wint_t rpl_wint_t # define GNULIB_defined_wint_t 1 # endif # endif # ifndef WEOF # define WEOF ((wint_t) -1) # endif #endif /* Override mbstate_t if it is too small. On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for implementing mbrtowc for encodings like UTF-8. */ #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ # if !GNULIB_defined_mbstate_t typedef int rpl_mbstate_t; # undef mbstate_t # define mbstate_t rpl_mbstate_t # define GNULIB_defined_mbstate_t 1 # endif #endif /* Convert a single-byte character to a wide character. */ #if @GNULIB_BTOWC@ # if @REPLACE_BTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef btowc # define btowc rpl_btowc # endif _GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); _GL_CXXALIAS_RPL (btowc, wint_t, (int c)); # else # if !@HAVE_BTOWC@ _GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (btowc, wint_t, (int c)); # endif _GL_CXXALIASWARN (btowc); #elif defined GNULIB_POSIXCHECK # undef btowc # if HAVE_RAW_DECL_BTOWC _GL_WARN_ON_USE (btowc, "btowc is unportable - " "use gnulib module btowc for portability"); # endif #endif /* Convert a wide character to a single-byte character. */ #if @GNULIB_WCTOB@ # if @REPLACE_WCTOB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wctob # define wctob rpl_wctob # endif _GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); _GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); # else # if !defined wctob && !@HAVE_DECL_WCTOB@ /* wctob is provided by gnulib, or wctob exists but is not declared. */ _GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); # endif _GL_CXXALIASWARN (wctob); #elif defined GNULIB_POSIXCHECK # undef wctob # if HAVE_RAW_DECL_WCTOB _GL_WARN_ON_USE (wctob, "wctob is unportable - " "use gnulib module wctob for portability"); # endif #endif /* Test whether *PS is in the initial state. */ #if @GNULIB_MBSINIT@ # if @REPLACE_MBSINIT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsinit # define mbsinit rpl_mbsinit # endif _GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); _GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); # else # if !@HAVE_MBSINIT@ _GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbsinit); #elif defined GNULIB_POSIXCHECK # undef mbsinit # if HAVE_RAW_DECL_MBSINIT _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " "use gnulib module mbsinit for portability"); # endif #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBRTOWC@ # if @REPLACE_MBRTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbrtowc # define mbrtowc rpl_mbrtowc # endif _GL_FUNCDECL_RPL (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); _GL_CXXALIAS_RPL (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); # else # if !@HAVE_MBRTOWC@ _GL_FUNCDECL_SYS (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbrtowc); #elif defined GNULIB_POSIXCHECK # undef mbrtowc # if HAVE_RAW_DECL_MBRTOWC _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " "use gnulib module mbrtowc for portability"); # endif #endif /* Recognize a multibyte character. */ #if @GNULIB_MBRLEN@ # if @REPLACE_MBRLEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbrlen # define mbrlen rpl_mbrlen # endif _GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); _GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # else # if !@HAVE_MBRLEN@ _GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbrlen); #elif defined GNULIB_POSIXCHECK # undef mbrlen # if HAVE_RAW_DECL_MBRLEN _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " "use gnulib module mbrlen for portability"); # endif #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSRTOWCS@ # if @REPLACE_MBSRTOWCS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsrtowcs # define mbsrtowcs rpl_mbsrtowcs # endif _GL_FUNCDECL_RPL (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)); # else # if !@HAVE_MBSRTOWCS@ _GL_FUNCDECL_SYS (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbsrtowcs); #elif defined GNULIB_POSIXCHECK # undef mbsrtowcs # if HAVE_RAW_DECL_MBSRTOWCS _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " "use gnulib module mbsrtowcs for portability"); # endif #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSNRTOWCS@ # if @REPLACE_MBSNRTOWCS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsnrtowcs # define mbsnrtowcs rpl_mbsnrtowcs # endif _GL_FUNCDECL_RPL (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)); # else # if !@HAVE_MBSNRTOWCS@ _GL_FUNCDECL_SYS (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbsnrtowcs); #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " "use gnulib module mbsnrtowcs for portability"); # endif #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCRTOMB@ # if @REPLACE_WCRTOMB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcrtomb # define wcrtomb rpl_wcrtomb # endif _GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); _GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # else # if !@HAVE_WCRTOMB@ _GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # endif _GL_CXXALIASWARN (wcrtomb); #elif defined GNULIB_POSIXCHECK # undef wcrtomb # if HAVE_RAW_DECL_WCRTOMB _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " "use gnulib module wcrtomb for portability"); # endif #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSRTOMBS@ # if @REPLACE_WCSRTOMBS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcsrtombs # define wcsrtombs rpl_wcsrtombs # endif _GL_FUNCDECL_RPL (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)); # else # if !@HAVE_WCSRTOMBS@ _GL_FUNCDECL_SYS (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (wcsrtombs); #elif defined GNULIB_POSIXCHECK # undef wcsrtombs # if HAVE_RAW_DECL_WCSRTOMBS _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " "use gnulib module wcsrtombs for portability"); # endif #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSNRTOMBS@ # if @REPLACE_WCSNRTOMBS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcsnrtombs # define wcsnrtombs rpl_wcsnrtombs # endif _GL_FUNCDECL_RPL (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)); # else # if !@HAVE_WCSNRTOMBS@ _GL_FUNCDECL_SYS (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (wcsnrtombs); #elif defined GNULIB_POSIXCHECK # undef wcsnrtombs # if HAVE_RAW_DECL_WCSNRTOMBS _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " "use gnulib module wcsnrtombs for portability"); # endif #endif /* Return the number of screen columns needed for WC. */ #if @GNULIB_WCWIDTH@ # if @REPLACE_WCWIDTH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcwidth # define wcwidth rpl_wcwidth # endif _GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); # else # if !@HAVE_DECL_WCWIDTH@ /* wcwidth exists but is not declared. */ _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); # elif defined __KLIBC__ /* On OS/2 kLIBC, wcwidth is a macro that expands to the name of a static inline function. The implementation of wcwidth in wcwidth.c causes a "conflicting types" error. */ # undef wcwidth # endif _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); # endif _GL_CXXALIASWARN (wcwidth); #elif defined GNULIB_POSIXCHECK # undef wcwidth # if HAVE_RAW_DECL_WCWIDTH _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " "use gnulib module wcwidth for portability"); # endif #endif /* Search N wide characters of S for C. */ #if @GNULIB_WMEMCHR@ # if !@HAVE_WMEMCHR@ _GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n) _GL_ATTRIBUTE_PURE); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t); wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t); } */ _GL_CXXALIAS_SYS_CAST2 (wmemchr, wchar_t *, (const wchar_t *, wchar_t, size_t), const wchar_t *, (const wchar_t *, wchar_t, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); _GL_CXXALIASWARN1 (wmemchr, const wchar_t *, (const wchar_t *s, wchar_t c, size_t n)); # else _GL_CXXALIASWARN (wmemchr); # endif #elif defined GNULIB_POSIXCHECK # undef wmemchr # if HAVE_RAW_DECL_WMEMCHR _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " "use gnulib module wmemchr for portability"); # endif #endif /* Compare N wide characters of S1 and S2. */ #if @GNULIB_WMEMCMP@ # if !@HAVE_WMEMCMP@ _GL_FUNCDECL_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wmemcmp); #elif defined GNULIB_POSIXCHECK # undef wmemcmp # if HAVE_RAW_DECL_WMEMCMP _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " "use gnulib module wmemcmp for portability"); # endif #endif /* Copy N wide characters of SRC to DEST. */ #if @GNULIB_WMEMCPY@ # if !@HAVE_WMEMCPY@ _GL_FUNCDECL_SYS (wmemcpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wmemcpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wmemcpy); #elif defined GNULIB_POSIXCHECK # undef wmemcpy # if HAVE_RAW_DECL_WMEMCPY _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " "use gnulib module wmemcpy for portability"); # endif #endif /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for overlapping memory areas. */ #if @GNULIB_WMEMMOVE@ # if !@HAVE_WMEMMOVE@ _GL_FUNCDECL_SYS (wmemmove, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wmemmove, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wmemmove); #elif defined GNULIB_POSIXCHECK # undef wmemmove # if HAVE_RAW_DECL_WMEMMOVE _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " "use gnulib module wmemmove for portability"); # endif #endif /* Set N wide characters of S to C. */ #if @GNULIB_WMEMSET@ # if !@HAVE_WMEMSET@ _GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); # endif _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); _GL_CXXALIASWARN (wmemset); #elif defined GNULIB_POSIXCHECK # undef wmemset # if HAVE_RAW_DECL_WMEMSET _GL_WARN_ON_USE (wmemset, "wmemset is unportable - " "use gnulib module wmemset for portability"); # endif #endif /* Return the number of wide characters in S. */ #if @GNULIB_WCSLEN@ # if !@HAVE_WCSLEN@ _GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); _GL_CXXALIASWARN (wcslen); #elif defined GNULIB_POSIXCHECK # undef wcslen # if HAVE_RAW_DECL_WCSLEN _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " "use gnulib module wcslen for portability"); # endif #endif /* Return the number of wide characters in S, but at most MAXLEN. */ #if @GNULIB_WCSNLEN@ # if !@HAVE_WCSNLEN@ _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); _GL_CXXALIASWARN (wcsnlen); #elif defined GNULIB_POSIXCHECK # undef wcsnlen # if HAVE_RAW_DECL_WCSNLEN _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " "use gnulib module wcsnlen for portability"); # endif #endif /* Copy SRC to DEST. */ #if @GNULIB_WCSCPY@ # if !@HAVE_WCSCPY@ _GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); _GL_CXXALIASWARN (wcscpy); #elif defined GNULIB_POSIXCHECK # undef wcscpy # if HAVE_RAW_DECL_WCSCPY _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " "use gnulib module wcscpy for portability"); # endif #endif /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ #if @GNULIB_WCPCPY@ # if !@HAVE_WCPCPY@ _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); _GL_CXXALIASWARN (wcpcpy); #elif defined GNULIB_POSIXCHECK # undef wcpcpy # if HAVE_RAW_DECL_WCPCPY _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " "use gnulib module wcpcpy for portability"); # endif #endif /* Copy no more than N wide characters of SRC to DEST. */ #if @GNULIB_WCSNCPY@ # if !@HAVE_WCSNCPY@ _GL_FUNCDECL_SYS (wcsncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wcsncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wcsncpy); #elif defined GNULIB_POSIXCHECK # undef wcsncpy # if HAVE_RAW_DECL_WCSNCPY _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " "use gnulib module wcsncpy for portability"); # endif #endif /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ #if @GNULIB_WCPNCPY@ # if !@HAVE_WCPNCPY@ _GL_FUNCDECL_SYS (wcpncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wcpncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wcpncpy); #elif defined GNULIB_POSIXCHECK # undef wcpncpy # if HAVE_RAW_DECL_WCPNCPY _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " "use gnulib module wcpncpy for portability"); # endif #endif /* Append SRC onto DEST. */ #if @GNULIB_WCSCAT@ # if !@HAVE_WCSCAT@ _GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); _GL_CXXALIASWARN (wcscat); #elif defined GNULIB_POSIXCHECK # undef wcscat # if HAVE_RAW_DECL_WCSCAT _GL_WARN_ON_USE (wcscat, "wcscat is unportable - " "use gnulib module wcscat for portability"); # endif #endif /* Append no more than N wide characters of SRC onto DEST. */ #if @GNULIB_WCSNCAT@ # if !@HAVE_WCSNCAT@ _GL_FUNCDECL_SYS (wcsncat, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wcsncat, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wcsncat); #elif defined GNULIB_POSIXCHECK # undef wcsncat # if HAVE_RAW_DECL_WCSNCAT _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " "use gnulib module wcsncat for portability"); # endif #endif /* Compare S1 and S2. */ #if @GNULIB_WCSCMP@ # if !@HAVE_WCSCMP@ _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscmp); #elif defined GNULIB_POSIXCHECK # undef wcscmp # if HAVE_RAW_DECL_WCSCMP _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " "use gnulib module wcscmp for portability"); # endif #endif /* Compare no more than N wide characters of S1 and S2. */ #if @GNULIB_WCSNCMP@ # if !@HAVE_WCSNCMP@ _GL_FUNCDECL_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wcsncmp); #elif defined GNULIB_POSIXCHECK # undef wcsncmp # if HAVE_RAW_DECL_WCSNCMP _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " "use gnulib module wcsncmp for portability"); # endif #endif /* Compare S1 and S2, ignoring case. */ #if @GNULIB_WCSCASECMP@ # if !@HAVE_WCSCASECMP@ _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscasecmp); #elif defined GNULIB_POSIXCHECK # undef wcscasecmp # if HAVE_RAW_DECL_WCSCASECMP _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " "use gnulib module wcscasecmp for portability"); # endif #endif /* Compare no more than N chars of S1 and S2, ignoring case. */ #if @GNULIB_WCSNCASECMP@ # if !@HAVE_WCSNCASECMP@ _GL_FUNCDECL_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wcsncasecmp); #elif defined GNULIB_POSIXCHECK # undef wcsncasecmp # if HAVE_RAW_DECL_WCSNCASECMP _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " "use gnulib module wcsncasecmp for portability"); # endif #endif /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the current locale. */ #if @GNULIB_WCSCOLL@ # if !@HAVE_WCSCOLL@ _GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); # endif _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscoll); #elif defined GNULIB_POSIXCHECK # undef wcscoll # if HAVE_RAW_DECL_WCSCOLL _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " "use gnulib module wcscoll for portability"); # endif #endif /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying 'wcscoll' to the original strings. */ #if @GNULIB_WCSXFRM@ # if !@HAVE_WCSXFRM@ _GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); # endif _GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wcsxfrm); #elif defined GNULIB_POSIXCHECK # undef wcsxfrm # if HAVE_RAW_DECL_WCSXFRM _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " "use gnulib module wcsxfrm for portability"); # endif #endif /* Duplicate S, returning an identical malloc'd string. */ #if @GNULIB_WCSDUP@ # if !@HAVE_WCSDUP@ _GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s)); # endif _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); _GL_CXXALIASWARN (wcsdup); #elif defined GNULIB_POSIXCHECK # undef wcsdup # if HAVE_RAW_DECL_WCSDUP _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " "use gnulib module wcsdup for portability"); # endif #endif /* Find the first occurrence of WC in WCS. */ #if @GNULIB_WCSCHR@ # if !@HAVE_WCSCHR@ _GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc) _GL_ATTRIBUTE_PURE); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcschr (const wchar_t *, wchar_t); wchar_t * std::wcschr (wchar_t *, wchar_t); } */ _GL_CXXALIAS_SYS_CAST2 (wcschr, wchar_t *, (const wchar_t *, wchar_t), const wchar_t *, (const wchar_t *, wchar_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); # else _GL_CXXALIASWARN (wcschr); # endif #elif defined GNULIB_POSIXCHECK # undef wcschr # if HAVE_RAW_DECL_WCSCHR _GL_WARN_ON_USE (wcschr, "wcschr is unportable - " "use gnulib module wcschr for portability"); # endif #endif /* Find the last occurrence of WC in WCS. */ #if @GNULIB_WCSRCHR@ # if !@HAVE_WCSRCHR@ _GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc) _GL_ATTRIBUTE_PURE); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcsrchr (const wchar_t *, wchar_t); wchar_t * std::wcsrchr (wchar_t *, wchar_t); } */ _GL_CXXALIAS_SYS_CAST2 (wcsrchr, wchar_t *, (const wchar_t *, wchar_t), const wchar_t *, (const wchar_t *, wchar_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); # else _GL_CXXALIASWARN (wcsrchr); # endif #elif defined GNULIB_POSIXCHECK # undef wcsrchr # if HAVE_RAW_DECL_WCSRCHR _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " "use gnulib module wcsrchr for portability"); # endif #endif /* Return the length of the initial segmet of WCS which consists entirely of wide characters not in REJECT. */ #if @GNULIB_WCSCSPN@ # if !@HAVE_WCSCSPN@ _GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); _GL_CXXALIASWARN (wcscspn); #elif defined GNULIB_POSIXCHECK # undef wcscspn # if HAVE_RAW_DECL_WCSCSPN _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " "use gnulib module wcscspn for portability"); # endif #endif /* Return the length of the initial segmet of WCS which consists entirely of wide characters in ACCEPT. */ #if @GNULIB_WCSSPN@ # if !@HAVE_WCSSPN@ _GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); _GL_CXXALIASWARN (wcsspn); #elif defined GNULIB_POSIXCHECK # undef wcsspn # if HAVE_RAW_DECL_WCSSPN _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " "use gnulib module wcsspn for portability"); # endif #endif /* Find the first occurrence in WCS of any character in ACCEPT. */ #if @GNULIB_WCSPBRK@ # if !@HAVE_WCSPBRK@ _GL_FUNCDECL_SYS (wcspbrk, wchar_t *, (const wchar_t *wcs, const wchar_t *accept) _GL_ATTRIBUTE_PURE); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *); wchar_t * std::wcspbrk (wchar_t *, const wchar_t *); } */ _GL_CXXALIAS_SYS_CAST2 (wcspbrk, wchar_t *, (const wchar_t *, const wchar_t *), const wchar_t *, (const wchar_t *, const wchar_t *)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcspbrk, wchar_t *, (wchar_t *wcs, const wchar_t *accept)); _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, (const wchar_t *wcs, const wchar_t *accept)); # else _GL_CXXALIASWARN (wcspbrk); # endif #elif defined GNULIB_POSIXCHECK # undef wcspbrk # if HAVE_RAW_DECL_WCSPBRK _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " "use gnulib module wcspbrk for portability"); # endif #endif /* Find the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_WCSSTR@ # if !@HAVE_WCSSTR@ _GL_FUNCDECL_SYS (wcsstr, wchar_t *, (const wchar_t *haystack, const wchar_t *needle) _GL_ATTRIBUTE_PURE); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); wchar_t * std::wcsstr (wchar_t *, const wchar_t *); } */ _GL_CXXALIAS_SYS_CAST2 (wcsstr, wchar_t *, (const wchar_t *, const wchar_t *), const wchar_t *, (const wchar_t *, const wchar_t *)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcsstr, wchar_t *, (wchar_t *haystack, const wchar_t *needle)); _GL_CXXALIASWARN1 (wcsstr, const wchar_t *, (const wchar_t *haystack, const wchar_t *needle)); # else _GL_CXXALIASWARN (wcsstr); # endif #elif defined GNULIB_POSIXCHECK # undef wcsstr # if HAVE_RAW_DECL_WCSSTR _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " "use gnulib module wcsstr for portability"); # endif #endif /* Divide WCS into tokens separated by characters in DELIM. */ #if @GNULIB_WCSTOK@ # if !@HAVE_WCSTOK@ _GL_FUNCDECL_SYS (wcstok, wchar_t *, (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); # endif _GL_CXXALIAS_SYS (wcstok, wchar_t *, (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); _GL_CXXALIASWARN (wcstok); #elif defined GNULIB_POSIXCHECK # undef wcstok # if HAVE_RAW_DECL_WCSTOK _GL_WARN_ON_USE (wcstok, "wcstok is unportable - " "use gnulib module wcstok for portability"); # endif #endif /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ #if @GNULIB_WCSWIDTH@ # if @REPLACE_WCSWIDTH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcswidth # define wcswidth rpl_wcswidth # endif _GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n) _GL_ATTRIBUTE_PURE); _GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); # else # if !@HAVE_WCSWIDTH@ _GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); # endif _GL_CXXALIASWARN (wcswidth); #elif defined GNULIB_POSIXCHECK # undef wcswidth # if HAVE_RAW_DECL_WCSWIDTH _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " "use gnulib module wcswidth for portability"); # endif #endif /* Convert *TP to a date and time wide string. See . */ #if @GNULIB_WCSFTIME@ # if @REPLACE_WCSFTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcsftime # define wcsftime rpl_wcsftime # endif _GL_FUNCDECL_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, const wchar_t *__fmt, const struct tm *__tp) _GL_ARG_NONNULL ((1, 3, 4))); _GL_CXXALIAS_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, const wchar_t *__fmt, const struct tm *__tp)); # else # if !@HAVE_WCSFTIME@ _GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, const wchar_t *__fmt, const struct tm *__tp) _GL_ARG_NONNULL ((1, 3, 4))); # endif _GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, const wchar_t *__fmt, const struct tm *__tp)); # endif _GL_CXXALIASWARN (wcsftime); #elif defined GNULIB_POSIXCHECK # undef wcsftime # if HAVE_RAW_DECL_WCSFTIME _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " "use gnulib module wcsftime for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_WCHAR_H */ #endif /* _@GUARD_PREFIX@_WCHAR_H */ #endif pspp-1.0.1/gl/version-etc.c0000644000175000017500000002176513124536243012436 00000000000000/* Print --version and bug-reporting information in a consistent format. Copyright (C) 1999-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Jim Meyering. */ #include /* Specification. */ #include "version-etc.h" #include #include #include #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif #include "gettext.h" #define _(msgid) gettext (msgid) /* If you use AM_INIT_AUTOMAKE's no-define option, PACKAGE is not defined. Use PACKAGE_TARNAME instead. */ #if ! defined PACKAGE && defined PACKAGE_TARNAME # define PACKAGE PACKAGE_TARNAME #endif enum { COPYRIGHT_YEAR = 2017 }; /* The three functions below display the --version information the standard way. If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of the program. The formats are therefore: PACKAGE VERSION or COMMAND_NAME (PACKAGE) VERSION. The functions differ in the way they are passed author names. */ /* Display the --version information the standard way. Author names are given in the array AUTHORS. N_AUTHORS is the number of elements in the array. */ void version_etc_arn (FILE *stream, const char *command_name, const char *package, const char *version, const char * const * authors, size_t n_authors) { if (command_name) fprintf (stream, "%s (%s) %s\n", command_name, package, version); else fprintf (stream, "%s %s\n", package, version); #ifdef PACKAGE_PACKAGER # ifdef PACKAGE_PACKAGER_VERSION fprintf (stream, _("Packaged by %s (%s)\n"), PACKAGE_PACKAGER, PACKAGE_PACKAGER_VERSION); # else fprintf (stream, _("Packaged by %s\n"), PACKAGE_PACKAGER); # endif #endif /* TRANSLATORS: Translate "(C)" to the copyright symbol (C-in-a-circle), if this symbol is available in the user's locale. Otherwise, do not translate "(C)"; leave it as-is. */ fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR); fputs (_("\ \n\ License GPLv3+: GNU GPL version 3 or later .\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n\ \n\ "), stream); switch (n_authors) { case 0: /* The caller must provide at least one author name. */ abort (); case 1: /* TRANSLATORS: %s denotes an author name. */ fprintf (stream, _("Written by %s.\n"), authors[0]); break; case 2: /* TRANSLATORS: Each %s denotes an author name. */ fprintf (stream, _("Written by %s and %s.\n"), authors[0], authors[1]); break; case 3: /* TRANSLATORS: Each %s denotes an author name. */ fprintf (stream, _("Written by %s, %s, and %s.\n"), authors[0], authors[1], authors[2]); break; case 4: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ fprintf (stream, _("Written by %s, %s, %s,\nand %s.\n"), authors[0], authors[1], authors[2], authors[3]); break; case 5: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ fprintf (stream, _("Written by %s, %s, %s,\n%s, and %s.\n"), authors[0], authors[1], authors[2], authors[3], authors[4]); break; case 6: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, and %s.\n"), authors[0], authors[1], authors[2], authors[3], authors[4], authors[5]); break; case 7: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"), authors[0], authors[1], authors[2], authors[3], authors[4], authors[5], authors[6]); break; case 8: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ fprintf (stream, _("\ Written by %s, %s, %s,\n%s, %s, %s, %s,\nand %s.\n"), authors[0], authors[1], authors[2], authors[3], authors[4], authors[5], authors[6], authors[7]); break; case 9: /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ fprintf (stream, _("\ Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"), authors[0], authors[1], authors[2], authors[3], authors[4], authors[5], authors[6], authors[7], authors[8]); break; default: /* 10 or more authors. Use an abbreviation, since the human reader will probably not want to read the entire list anyway. */ /* TRANSLATORS: Each %s denotes an author name. You can use line breaks, estimating that each author name occupies ca. 16 screen columns and that a screen line has ca. 80 columns. */ fprintf (stream, _("\ Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"), authors[0], authors[1], authors[2], authors[3], authors[4], authors[5], authors[6], authors[7], authors[8]); break; } } /* Display the --version information the standard way. See the initial comment to this module, for more information. Author names are given in the NULL-terminated array AUTHORS. */ void version_etc_ar (FILE *stream, const char *command_name, const char *package, const char *version, const char * const * authors) { size_t n_authors; for (n_authors = 0; authors[n_authors]; n_authors++) ; version_etc_arn (stream, command_name, package, version, authors, n_authors); } /* Display the --version information the standard way. See the initial comment to this module, for more information. Author names are given in the NULL-terminated va_list AUTHORS. */ void version_etc_va (FILE *stream, const char *command_name, const char *package, const char *version, va_list authors) { size_t n_authors; const char *authtab[10]; for (n_authors = 0; n_authors < 10 && (authtab[n_authors] = va_arg (authors, const char *)) != NULL; n_authors++) ; version_etc_arn (stream, command_name, package, version, authtab, n_authors); } /* Display the --version information the standard way. If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of the program. The formats are therefore: PACKAGE VERSION or COMMAND_NAME (PACKAGE) VERSION. The authors names are passed as separate arguments, with an additional NULL argument at the end. */ void version_etc (FILE *stream, const char *command_name, const char *package, const char *version, /* const char *author1, ...*/ ...) { va_list authors; va_start (authors, version); version_etc_va (stream, command_name, package, version, authors); va_end (authors); } void emit_bug_reporting_address (void) { /* TRANSLATORS: The placeholder indicates the bug-reporting address for this package. Please add _another line_ saying "Report translation bugs to <...>\n" with the address for translation bugs (typically your translation team's web or email address). */ printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT); #ifdef PACKAGE_PACKAGER_BUG_REPORTS printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER, PACKAGE_PACKAGER_BUG_REPORTS); #endif #ifdef PACKAGE_URL printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); #else printf (_("%s home page: \n"), PACKAGE_NAME, PACKAGE); #endif fputs (_("General help using GNU software: \n"), stdout); } pspp-1.0.1/gl/isnand-nolibm.h0000644000175000017500000000221613124536242012724 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #if HAVE_ISNAND_IN_LIBC /* Get declaration of isnan macro. */ # include # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) # else # undef isnand # define isnand(x) isnan ((double)(x)) # endif #else /* Test whether X is a NaN. */ # undef isnand # define isnand rpl_isnand extern int isnand (double x); #endif pspp-1.0.1/gl/memcasecmp.c0000644000175000017500000000267513124536242012310 00000000000000/* Case-insensitive buffer comparator. Copyright (C) 1996-1997, 2000, 2003, 2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Jim Meyering. */ #include #include "memcasecmp.h" #include #include /* Like memcmp, but ignore differences in case. Convert to upper case (not lower) before comparing so that join -i works with sort -f. */ int memcasecmp (const void *vs1, const void *vs2, size_t n) { size_t i; char const *s1 = vs1; char const *s2 = vs2; for (i = 0; i < n; i++) { unsigned char u1 = s1[i]; unsigned char u2 = s2[i]; int U1 = toupper (u1); int U2 = toupper (u2); int diff = (UCHAR_MAX <= INT_MAX ? U1 - U2 : U1 < U2 ? -1 : U2 < U1); if (diff) return diff; } return 0; } pspp-1.0.1/gl/frexpl.c0000644000175000017500000000175613124536241011474 00000000000000/* Split a 'long double' into fraction and mantissa. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Specification. */ # include long double frexpl (long double x, int *expptr) { return frexp (x, expptr); } #else # define USE_LONG_DOUBLE # include "frexp.c" #endif pspp-1.0.1/gl/math.in.h0000644000175000017500000020653413132510757011543 00000000000000/* A GNU-like . Copyright (C) 2002-2003, 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _@GUARD_PREFIX@_MATH_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ #ifndef _@GUARD_PREFIX@_MATH_H #define _@GUARD_PREFIX@_MATH_H /* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ #if defined __VMS && ! defined NAN # include #endif #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_MATH_INLINE # define _GL_MATH_INLINE _GL_INLINE #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus /* Helper macros to define type-generic function FUNC as overloaded functions, rather than as macros like in C. POSIX declares these with an argument of real-floating (that is, one of float, double, or long double). */ # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ static inline int \ _gl_cxx_ ## func ## f (float f) \ { \ return func (f); \ } \ static inline int \ _gl_cxx_ ## func ## d (double d) \ { \ return func (d); \ } \ static inline int \ _gl_cxx_ ## func ## l (long double l) \ { \ return func (l); \ } # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \ _GL_BEGIN_NAMESPACE \ inline int \ func (float f) \ { \ return _gl_cxx_ ## func ## f (f); \ } \ inline int \ func (double d) \ { \ return _gl_cxx_ ## func ## d (d); \ } \ inline int \ func (long double l) \ { \ return _gl_cxx_ ## func ## l (l); \ } \ _GL_END_NAMESPACE #endif /* Helper macros to define a portability warning for the classification macro FUNC called with VALUE. POSIX declares the classification macros with an argument of real-floating (that is, one of float, double, or long double). */ #define _GL_WARN_REAL_FLOATING_DECL(func) \ _GL_MATH_INLINE int \ rpl_ ## func ## f (float f) \ { \ return func (f); \ } \ _GL_MATH_INLINE int \ rpl_ ## func ## d (double d) \ { \ return func (d); \ } \ _GL_MATH_INLINE int \ rpl_ ## func ## l (long double l) \ { \ return func (l); \ } \ _GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \ "use gnulib module " #func " for portability"); \ _GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \ "use gnulib module " #func " for portability"); \ _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \ "use gnulib module " #func " for portability") #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ : rpl_ ## func ## l (value)) #if @REPLACE_ITOLD@ /* Pull in a function that fixes the 'int' to 'long double' conversion of glibc 2.7. */ _GL_EXTERN_C void _Qp_itoq (long double *, int); static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; #endif /* POSIX allows platforms that don't support NAN. But all major machines in the past 15 years have supported something close to IEEE NaN, so we define this unconditionally. We also must define it on platforms like Solaris 10, where NAN is present but defined as a function pointer rather than a floating point constant. */ #if !defined NAN || @REPLACE_NAN@ # if !GNULIB_defined_NAN # undef NAN /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke on the expression 0.0 / 0.0. */ # if defined __DECC || defined _MSC_VER _GL_MATH_INLINE float _NaN () { static float zero = 0.0f; return zero / zero; } # define NAN (_NaN()) # else # define NAN (0.0f / 0.0f) # endif # define GNULIB_defined_NAN 1 # endif #endif /* Solaris 10 defines HUGE_VAL, but as a function pointer rather than a floating point constant. */ #if @REPLACE_HUGE_VAL@ # undef HUGE_VALF # define HUGE_VALF (1.0f / 0.0f) # undef HUGE_VAL # define HUGE_VAL (1.0 / 0.0) # undef HUGE_VALL # define HUGE_VALL (1.0L / 0.0L) #endif /* HUGE_VALF is a 'float' Infinity. */ #ifndef HUGE_VALF # if defined _MSC_VER /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ # define HUGE_VALF (1e25f * 1e25f) # else # define HUGE_VALF (1.0f / 0.0f) # endif #endif /* HUGE_VAL is a 'double' Infinity. */ #ifndef HUGE_VAL # if defined _MSC_VER /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ # define HUGE_VAL (1e250 * 1e250) # else # define HUGE_VAL (1.0 / 0.0) # endif #endif /* HUGE_VALL is a 'long double' Infinity. */ #ifndef HUGE_VALL # if defined _MSC_VER /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ # define HUGE_VALL (1e250L * 1e250L) # else # define HUGE_VALL (1.0L / 0.0L) # endif #endif /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ #if !(defined FP_ILOGB0 && defined FP_ILOGBNAN) # if defined __NetBSD__ || defined __sgi /* NetBSD, IRIX 6.5: match what ilogb() does */ # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ # elif defined _AIX /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ # define FP_ILOGBNAN 2147483647 /* INT_MAX */ # elif defined __sun /* Solaris 9: match what ilogb() does */ # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ # define FP_ILOGBNAN 2147483647 /* INT_MAX */ # else /* Gnulib defined values. */ # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ # endif #endif #if @GNULIB_ACOSF@ # if @REPLACE_ACOSF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef acosf # define acosf rpl_acosf # endif _GL_FUNCDECL_RPL (acosf, float, (float x)); _GL_CXXALIAS_RPL (acosf, float, (float x)); # else # if !@HAVE_ACOSF@ # undef acosf _GL_FUNCDECL_SYS (acosf, float, (float x)); # endif _GL_CXXALIAS_SYS (acosf, float, (float x)); # endif _GL_CXXALIASWARN (acosf); #elif defined GNULIB_POSIXCHECK # undef acosf # if HAVE_RAW_DECL_ACOSF _GL_WARN_ON_USE (acosf, "acosf is unportable - " "use gnulib module acosf for portability"); # endif #endif #if @GNULIB_ACOSL@ # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@ # undef acosl _GL_FUNCDECL_SYS (acosl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (acosl, long double, (long double x)); _GL_CXXALIASWARN (acosl); #elif defined GNULIB_POSIXCHECK # undef acosl # if HAVE_RAW_DECL_ACOSL _GL_WARN_ON_USE (acosl, "acosl is unportable - " "use gnulib module acosl for portability"); # endif #endif #if @GNULIB_ASINF@ # if @REPLACE_ASINF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef asinf # define asinf rpl_asinf # endif _GL_FUNCDECL_RPL (asinf, float, (float x)); _GL_CXXALIAS_RPL (asinf, float, (float x)); # else # if !@HAVE_ASINF@ # undef asinf _GL_FUNCDECL_SYS (asinf, float, (float x)); # endif _GL_CXXALIAS_SYS (asinf, float, (float x)); # endif _GL_CXXALIASWARN (asinf); #elif defined GNULIB_POSIXCHECK # undef asinf # if HAVE_RAW_DECL_ASINF _GL_WARN_ON_USE (asinf, "asinf is unportable - " "use gnulib module asinf for portability"); # endif #endif #if @GNULIB_ASINL@ # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@ # undef asinl _GL_FUNCDECL_SYS (asinl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (asinl, long double, (long double x)); _GL_CXXALIASWARN (asinl); #elif defined GNULIB_POSIXCHECK # undef asinl # if HAVE_RAW_DECL_ASINL _GL_WARN_ON_USE (asinl, "asinl is unportable - " "use gnulib module asinl for portability"); # endif #endif #if @GNULIB_ATANF@ # if @REPLACE_ATANF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef atanf # define atanf rpl_atanf # endif _GL_FUNCDECL_RPL (atanf, float, (float x)); _GL_CXXALIAS_RPL (atanf, float, (float x)); # else # if !@HAVE_ATANF@ # undef atanf _GL_FUNCDECL_SYS (atanf, float, (float x)); # endif _GL_CXXALIAS_SYS (atanf, float, (float x)); # endif _GL_CXXALIASWARN (atanf); #elif defined GNULIB_POSIXCHECK # undef atanf # if HAVE_RAW_DECL_ATANF _GL_WARN_ON_USE (atanf, "atanf is unportable - " "use gnulib module atanf for portability"); # endif #endif #if @GNULIB_ATANL@ # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@ # undef atanl _GL_FUNCDECL_SYS (atanl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (atanl, long double, (long double x)); _GL_CXXALIASWARN (atanl); #elif defined GNULIB_POSIXCHECK # undef atanl # if HAVE_RAW_DECL_ATANL _GL_WARN_ON_USE (atanl, "atanl is unportable - " "use gnulib module atanl for portability"); # endif #endif #if @GNULIB_ATAN2F@ # if @REPLACE_ATAN2F@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef atan2f # define atan2f rpl_atan2f # endif _GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); _GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); # else # if !@HAVE_ATAN2F@ # undef atan2f _GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); # endif _GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); # endif _GL_CXXALIASWARN (atan2f); #elif defined GNULIB_POSIXCHECK # undef atan2f # if HAVE_RAW_DECL_ATAN2F _GL_WARN_ON_USE (atan2f, "atan2f is unportable - " "use gnulib module atan2f for portability"); # endif #endif #if @GNULIB_CBRTF@ # if @REPLACE_CBRTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef cbrtf # define cbrtf rpl_cbrtf # endif _GL_FUNCDECL_RPL (cbrtf, float, (float x)); _GL_CXXALIAS_RPL (cbrtf, float, (float x)); # else # if !@HAVE_DECL_CBRTF@ _GL_FUNCDECL_SYS (cbrtf, float, (float x)); # endif _GL_CXXALIAS_SYS (cbrtf, float, (float x)); # endif _GL_CXXALIASWARN (cbrtf); #elif defined GNULIB_POSIXCHECK # undef cbrtf # if HAVE_RAW_DECL_CBRTF _GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " "use gnulib module cbrtf for portability"); # endif #endif #if @GNULIB_CBRT@ # if !@HAVE_CBRT@ _GL_FUNCDECL_SYS (cbrt, double, (double x)); # endif _GL_CXXALIAS_SYS (cbrt, double, (double x)); _GL_CXXALIASWARN (cbrt); #elif defined GNULIB_POSIXCHECK # undef cbrt # if HAVE_RAW_DECL_CBRT _GL_WARN_ON_USE (cbrt, "cbrt is unportable - " "use gnulib module cbrt for portability"); # endif #endif #if @GNULIB_CBRTL@ # if @REPLACE_CBRTL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef cbrtl # define cbrtl rpl_cbrtl # endif _GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); _GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); # else # if !@HAVE_DECL_CBRTL@ _GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); # endif _GL_CXXALIASWARN (cbrtl); #elif defined GNULIB_POSIXCHECK # undef cbrtl # if HAVE_RAW_DECL_CBRTL _GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " "use gnulib module cbrtl for portability"); # endif #endif #if @GNULIB_CEILF@ # if @REPLACE_CEILF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ceilf # define ceilf rpl_ceilf # endif _GL_FUNCDECL_RPL (ceilf, float, (float x)); _GL_CXXALIAS_RPL (ceilf, float, (float x)); # else # if !@HAVE_DECL_CEILF@ # undef ceilf _GL_FUNCDECL_SYS (ceilf, float, (float x)); # endif _GL_CXXALIAS_SYS (ceilf, float, (float x)); # endif _GL_CXXALIASWARN (ceilf); #elif defined GNULIB_POSIXCHECK # undef ceilf # if HAVE_RAW_DECL_CEILF _GL_WARN_ON_USE (ceilf, "ceilf is unportable - " "use gnulib module ceilf for portability"); # endif #endif #if @GNULIB_CEIL@ # if @REPLACE_CEIL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ceil # define ceil rpl_ceil # endif _GL_FUNCDECL_RPL (ceil, double, (double x)); _GL_CXXALIAS_RPL (ceil, double, (double x)); # else _GL_CXXALIAS_SYS (ceil, double, (double x)); # endif _GL_CXXALIASWARN (ceil); #endif #if @GNULIB_CEILL@ # if @REPLACE_CEILL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ceill # define ceill rpl_ceill # endif _GL_FUNCDECL_RPL (ceill, long double, (long double x)); _GL_CXXALIAS_RPL (ceill, long double, (long double x)); # else # if !@HAVE_DECL_CEILL@ # undef ceill _GL_FUNCDECL_SYS (ceill, long double, (long double x)); # endif _GL_CXXALIAS_SYS (ceill, long double, (long double x)); # endif _GL_CXXALIASWARN (ceill); #elif defined GNULIB_POSIXCHECK # undef ceill # if HAVE_RAW_DECL_CEILL _GL_WARN_ON_USE (ceill, "ceill is unportable - " "use gnulib module ceill for portability"); # endif #endif #if @GNULIB_COPYSIGNF@ # if !@HAVE_DECL_COPYSIGNF@ _GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); _GL_CXXALIASWARN (copysignf); #elif defined GNULIB_POSIXCHECK # undef copysignf # if HAVE_RAW_DECL_COPYSIGNF _GL_WARN_ON_USE (copysignf, "copysignf is unportable - " "use gnulib module copysignf for portability"); # endif #endif #if @GNULIB_COPYSIGN@ # if !@HAVE_COPYSIGN@ _GL_FUNCDECL_SYS (copysign, double, (double x, double y)); # endif _GL_CXXALIAS_SYS (copysign, double, (double x, double y)); _GL_CXXALIASWARN (copysign); #elif defined GNULIB_POSIXCHECK # undef copysign # if HAVE_RAW_DECL_COPYSIGN _GL_WARN_ON_USE (copysign, "copysign is unportable - " "use gnulib module copysign for portability"); # endif #endif #if @GNULIB_COPYSIGNL@ # if !@HAVE_COPYSIGNL@ _GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); _GL_CXXALIASWARN (copysignl); #elif defined GNULIB_POSIXCHECK # undef copysignl # if HAVE_RAW_DECL_COPYSIGNL _GL_WARN_ON_USE (copysign, "copysignl is unportable - " "use gnulib module copysignl for portability"); # endif #endif #if @GNULIB_COSF@ # if @REPLACE_COSF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef cosf # define cosf rpl_cosf # endif _GL_FUNCDECL_RPL (cosf, float, (float x)); _GL_CXXALIAS_RPL (cosf, float, (float x)); # else # if !@HAVE_COSF@ # undef cosf _GL_FUNCDECL_SYS (cosf, float, (float x)); # endif _GL_CXXALIAS_SYS (cosf, float, (float x)); # endif _GL_CXXALIASWARN (cosf); #elif defined GNULIB_POSIXCHECK # undef cosf # if HAVE_RAW_DECL_COSF _GL_WARN_ON_USE (cosf, "cosf is unportable - " "use gnulib module cosf for portability"); # endif #endif #if @GNULIB_COSL@ # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@ # undef cosl _GL_FUNCDECL_SYS (cosl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (cosl, long double, (long double x)); _GL_CXXALIASWARN (cosl); #elif defined GNULIB_POSIXCHECK # undef cosl # if HAVE_RAW_DECL_COSL _GL_WARN_ON_USE (cosl, "cosl is unportable - " "use gnulib module cosl for portability"); # endif #endif #if @GNULIB_COSHF@ # if @REPLACE_COSHF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef coshf # define coshf rpl_coshf # endif _GL_FUNCDECL_RPL (coshf, float, (float x)); _GL_CXXALIAS_RPL (coshf, float, (float x)); # else # if !@HAVE_COSHF@ # undef coshf _GL_FUNCDECL_SYS (coshf, float, (float x)); # endif _GL_CXXALIAS_SYS (coshf, float, (float x)); # endif _GL_CXXALIASWARN (coshf); #elif defined GNULIB_POSIXCHECK # undef coshf # if HAVE_RAW_DECL_COSHF _GL_WARN_ON_USE (coshf, "coshf is unportable - " "use gnulib module coshf for portability"); # endif #endif #if @GNULIB_EXPF@ # if @REPLACE_EXPF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef expf # define expf rpl_expf # endif _GL_FUNCDECL_RPL (expf, float, (float x)); _GL_CXXALIAS_RPL (expf, float, (float x)); # else # if !@HAVE_EXPF@ # undef expf _GL_FUNCDECL_SYS (expf, float, (float x)); # endif _GL_CXXALIAS_SYS (expf, float, (float x)); # endif _GL_CXXALIASWARN (expf); #elif defined GNULIB_POSIXCHECK # undef expf # if HAVE_RAW_DECL_EXPF _GL_WARN_ON_USE (expf, "expf is unportable - " "use gnulib module expf for portability"); # endif #endif #if @GNULIB_EXPL@ # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@ # undef expl _GL_FUNCDECL_SYS (expl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (expl, long double, (long double x)); _GL_CXXALIASWARN (expl); #elif defined GNULIB_POSIXCHECK # undef expl # if HAVE_RAW_DECL_EXPL _GL_WARN_ON_USE (expl, "expl is unportable - " "use gnulib module expl for portability"); # endif #endif #if @GNULIB_EXP2F@ # if !@HAVE_DECL_EXP2F@ _GL_FUNCDECL_SYS (exp2f, float, (float x)); # endif _GL_CXXALIAS_SYS (exp2f, float, (float x)); _GL_CXXALIASWARN (exp2f); #elif defined GNULIB_POSIXCHECK # undef exp2f # if HAVE_RAW_DECL_EXP2F _GL_WARN_ON_USE (exp2f, "exp2f is unportable - " "use gnulib module exp2f for portability"); # endif #endif #if @GNULIB_EXP2@ # if @REPLACE_EXP2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef exp2 # define exp2 rpl_exp2 # endif _GL_FUNCDECL_RPL (exp2, double, (double x)); _GL_CXXALIAS_RPL (exp2, double, (double x)); # else # if !@HAVE_DECL_EXP2@ _GL_FUNCDECL_SYS (exp2, double, (double x)); # endif _GL_CXXALIAS_SYS (exp2, double, (double x)); # endif _GL_CXXALIASWARN (exp2); #elif defined GNULIB_POSIXCHECK # undef exp2 # if HAVE_RAW_DECL_EXP2 _GL_WARN_ON_USE (exp2, "exp2 is unportable - " "use gnulib module exp2 for portability"); # endif #endif #if @GNULIB_EXP2L@ # if @REPLACE_EXP2L@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef exp2l # define exp2l rpl_exp2l # endif _GL_FUNCDECL_RPL (exp2l, long double, (long double x)); _GL_CXXALIAS_RPL (exp2l, long double, (long double x)); # else # if !@HAVE_DECL_EXP2L@ # undef exp2l _GL_FUNCDECL_SYS (exp2l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (exp2l, long double, (long double x)); # endif _GL_CXXALIASWARN (exp2l); #elif defined GNULIB_POSIXCHECK # undef exp2l # if HAVE_RAW_DECL_EXP2L _GL_WARN_ON_USE (exp2l, "exp2l is unportable - " "use gnulib module exp2l for portability"); # endif #endif #if @GNULIB_EXPM1F@ # if @REPLACE_EXPM1F@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef expm1f # define expm1f rpl_expm1f # endif _GL_FUNCDECL_RPL (expm1f, float, (float x)); _GL_CXXALIAS_RPL (expm1f, float, (float x)); # else # if !@HAVE_EXPM1F@ _GL_FUNCDECL_SYS (expm1f, float, (float x)); # endif _GL_CXXALIAS_SYS (expm1f, float, (float x)); # endif _GL_CXXALIASWARN (expm1f); #elif defined GNULIB_POSIXCHECK # undef expm1f # if HAVE_RAW_DECL_EXPM1F _GL_WARN_ON_USE (expm1f, "expm1f is unportable - " "use gnulib module expm1f for portability"); # endif #endif #if @GNULIB_EXPM1@ # if @REPLACE_EXPM1@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef expm1 # define expm1 rpl_expm1 # endif _GL_FUNCDECL_RPL (expm1, double, (double x)); _GL_CXXALIAS_RPL (expm1, double, (double x)); # else # if !@HAVE_EXPM1@ _GL_FUNCDECL_SYS (expm1, double, (double x)); # endif _GL_CXXALIAS_SYS (expm1, double, (double x)); # endif _GL_CXXALIASWARN (expm1); #elif defined GNULIB_POSIXCHECK # undef expm1 # if HAVE_RAW_DECL_EXPM1 _GL_WARN_ON_USE (expm1, "expm1 is unportable - " "use gnulib module expm1 for portability"); # endif #endif #if @GNULIB_EXPM1L@ # if !@HAVE_DECL_EXPM1L@ # undef expm1l _GL_FUNCDECL_SYS (expm1l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (expm1l, long double, (long double x)); _GL_CXXALIASWARN (expm1l); #elif defined GNULIB_POSIXCHECK # undef expm1l # if HAVE_RAW_DECL_EXPM1L _GL_WARN_ON_USE (expm1l, "expm1l is unportable - " "use gnulib module expm1l for portability"); # endif #endif #if @GNULIB_FABSF@ # if !@HAVE_FABSF@ # undef fabsf _GL_FUNCDECL_SYS (fabsf, float, (float x)); # endif _GL_CXXALIAS_SYS (fabsf, float, (float x)); _GL_CXXALIASWARN (fabsf); #elif defined GNULIB_POSIXCHECK # undef fabsf # if HAVE_RAW_DECL_FABSF _GL_WARN_ON_USE (fabsf, "fabsf is unportable - " "use gnulib module fabsf for portability"); # endif #endif #if @GNULIB_FABSL@ # if @REPLACE_FABSL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fabsl # define fabsl rpl_fabsl # endif _GL_FUNCDECL_RPL (fabsl, long double, (long double x)); _GL_CXXALIAS_RPL (fabsl, long double, (long double x)); # else # if !@HAVE_FABSL@ # undef fabsl _GL_FUNCDECL_SYS (fabsl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (fabsl, long double, (long double x)); # endif _GL_CXXALIASWARN (fabsl); #elif defined GNULIB_POSIXCHECK # undef fabsl # if HAVE_RAW_DECL_FABSL _GL_WARN_ON_USE (fabsl, "fabsl is unportable - " "use gnulib module fabsl for portability"); # endif #endif #if @GNULIB_FLOORF@ # if @REPLACE_FLOORF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef floorf # define floorf rpl_floorf # endif _GL_FUNCDECL_RPL (floorf, float, (float x)); _GL_CXXALIAS_RPL (floorf, float, (float x)); # else # if !@HAVE_DECL_FLOORF@ # undef floorf _GL_FUNCDECL_SYS (floorf, float, (float x)); # endif _GL_CXXALIAS_SYS (floorf, float, (float x)); # endif _GL_CXXALIASWARN (floorf); #elif defined GNULIB_POSIXCHECK # undef floorf # if HAVE_RAW_DECL_FLOORF _GL_WARN_ON_USE (floorf, "floorf is unportable - " "use gnulib module floorf for portability"); # endif #endif #if @GNULIB_FLOOR@ # if @REPLACE_FLOOR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef floor # define floor rpl_floor # endif _GL_FUNCDECL_RPL (floor, double, (double x)); _GL_CXXALIAS_RPL (floor, double, (double x)); # else _GL_CXXALIAS_SYS (floor, double, (double x)); # endif _GL_CXXALIASWARN (floor); #endif #if @GNULIB_FLOORL@ # if @REPLACE_FLOORL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef floorl # define floorl rpl_floorl # endif _GL_FUNCDECL_RPL (floorl, long double, (long double x)); _GL_CXXALIAS_RPL (floorl, long double, (long double x)); # else # if !@HAVE_DECL_FLOORL@ # undef floorl _GL_FUNCDECL_SYS (floorl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (floorl, long double, (long double x)); # endif _GL_CXXALIASWARN (floorl); #elif defined GNULIB_POSIXCHECK # undef floorl # if HAVE_RAW_DECL_FLOORL _GL_WARN_ON_USE (floorl, "floorl is unportable - " "use gnulib module floorl for portability"); # endif #endif #if @GNULIB_FMAF@ # if @REPLACE_FMAF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fmaf # define fmaf rpl_fmaf # endif _GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); _GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); # else # if !@HAVE_FMAF@ _GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); # endif _GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); # endif _GL_CXXALIASWARN (fmaf); #elif defined GNULIB_POSIXCHECK # undef fmaf # if HAVE_RAW_DECL_FMAF _GL_WARN_ON_USE (fmaf, "fmaf is unportable - " "use gnulib module fmaf for portability"); # endif #endif #if @GNULIB_FMA@ # if @REPLACE_FMA@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fma # define fma rpl_fma # endif _GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); _GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); # else # if !@HAVE_FMA@ _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); # endif _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); # endif _GL_CXXALIASWARN (fma); #elif defined GNULIB_POSIXCHECK # undef fma # if HAVE_RAW_DECL_FMA _GL_WARN_ON_USE (fma, "fma is unportable - " "use gnulib module fma for portability"); # endif #endif #if @GNULIB_FMAL@ # if @REPLACE_FMAL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fmal # define fmal rpl_fmal # endif _GL_FUNCDECL_RPL (fmal, long double, (long double x, long double y, long double z)); _GL_CXXALIAS_RPL (fmal, long double, (long double x, long double y, long double z)); # else # if !@HAVE_FMAL@ # undef fmal _GL_FUNCDECL_SYS (fmal, long double, (long double x, long double y, long double z)); # endif _GL_CXXALIAS_SYS (fmal, long double, (long double x, long double y, long double z)); # endif _GL_CXXALIASWARN (fmal); #elif defined GNULIB_POSIXCHECK # undef fmal # if HAVE_RAW_DECL_FMAL _GL_WARN_ON_USE (fmal, "fmal is unportable - " "use gnulib module fmal for portability"); # endif #endif #if @GNULIB_FMODF@ # if @REPLACE_FMODF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fmodf # define fmodf rpl_fmodf # endif _GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); _GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); # else # if !@HAVE_FMODF@ # undef fmodf _GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); # endif _GL_CXXALIASWARN (fmodf); #elif defined GNULIB_POSIXCHECK # undef fmodf # if HAVE_RAW_DECL_FMODF _GL_WARN_ON_USE (fmodf, "fmodf is unportable - " "use gnulib module fmodf for portability"); # endif #endif #if @GNULIB_FMOD@ # if @REPLACE_FMOD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fmod # define fmod rpl_fmod # endif _GL_FUNCDECL_RPL (fmod, double, (double x, double y)); _GL_CXXALIAS_RPL (fmod, double, (double x, double y)); # else _GL_CXXALIAS_SYS (fmod, double, (double x, double y)); # endif _GL_CXXALIASWARN (fmod); #elif defined GNULIB_POSIXCHECK # undef fmod # if HAVE_RAW_DECL_FMOD _GL_WARN_ON_USE (fmod, "fmod has portability problems - " "use gnulib module fmod for portability"); # endif #endif #if @GNULIB_FMODL@ # if @REPLACE_FMODL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fmodl # define fmodl rpl_fmodl # endif _GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); _GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); # else # if !@HAVE_FMODL@ # undef fmodl _GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); # endif _GL_CXXALIASWARN (fmodl); #elif defined GNULIB_POSIXCHECK # undef fmodl # if HAVE_RAW_DECL_FMODL _GL_WARN_ON_USE (fmodl, "fmodl is unportable - " "use gnulib module fmodl for portability"); # endif #endif /* Write x as x = mantissa * 2^exp where If x finite and nonzero: 0.5 <= |mantissa| < 1.0. If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ #if @GNULIB_FREXPF@ # if @REPLACE_FREXPF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef frexpf # define frexpf rpl_frexpf # endif _GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); # else # if !@HAVE_FREXPF@ # undef frexpf _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); # endif _GL_CXXALIASWARN (frexpf); #elif defined GNULIB_POSIXCHECK # undef frexpf # if HAVE_RAW_DECL_FREXPF _GL_WARN_ON_USE (frexpf, "frexpf is unportable - " "use gnulib module frexpf for portability"); # endif #endif /* Write x as x = mantissa * 2^exp where If x finite and nonzero: 0.5 <= |mantissa| < 1.0. If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ #if @GNULIB_FREXP@ # if @REPLACE_FREXP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef frexp # define frexp rpl_frexp # endif _GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); # else _GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); # endif _GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); #elif defined GNULIB_POSIXCHECK # undef frexp /* Assume frexp is always declared. */ _GL_WARN_ON_USE (frexp, "frexp is unportable - " "use gnulib module frexp for portability"); #endif /* Write x as x = mantissa * 2^exp where If x finite and nonzero: 0.5 <= |mantissa| < 1.0. If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef frexpl # define frexpl rpl_frexpl # endif _GL_FUNCDECL_RPL (frexpl, long double, (long double x, int *expptr) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); #else # if !@HAVE_DECL_FREXPL@ _GL_FUNCDECL_SYS (frexpl, long double, (long double x, int *expptr) _GL_ARG_NONNULL ((2))); # endif # if @GNULIB_FREXPL@ _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); # endif #endif #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@) _GL_CXXALIASWARN (frexpl); #endif #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK # undef frexpl # if HAVE_RAW_DECL_FREXPL _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " "use gnulib module frexpl for portability"); # endif #endif /* Return sqrt(x^2+y^2). */ #if @GNULIB_HYPOTF@ # if @REPLACE_HYPOTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef hypotf # define hypotf rpl_hypotf # endif _GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); _GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); # else # if !@HAVE_HYPOTF@ _GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); # endif _GL_CXXALIASWARN (hypotf); #elif defined GNULIB_POSIXCHECK # undef hypotf # if HAVE_RAW_DECL_HYPOTF _GL_WARN_ON_USE (hypotf, "hypotf is unportable - " "use gnulib module hypotf for portability"); # endif #endif /* Return sqrt(x^2+y^2). */ #if @GNULIB_HYPOT@ # if @REPLACE_HYPOT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef hypot # define hypot rpl_hypot # endif _GL_FUNCDECL_RPL (hypot, double, (double x, double y)); _GL_CXXALIAS_RPL (hypot, double, (double x, double y)); # else _GL_CXXALIAS_SYS (hypot, double, (double x, double y)); # endif _GL_CXXALIASWARN (hypot); #elif defined GNULIB_POSIXCHECK # undef hypot # if HAVE_RAW_DECL_HYPOT _GL_WARN_ON_USE (hypotf, "hypot has portability problems - " "use gnulib module hypot for portability"); # endif #endif /* Return sqrt(x^2+y^2). */ #if @GNULIB_HYPOTL@ # if @REPLACE_HYPOTL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef hypotl # define hypotl rpl_hypotl # endif _GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); _GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); # else # if !@HAVE_HYPOTL@ _GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); # endif _GL_CXXALIASWARN (hypotl); #elif defined GNULIB_POSIXCHECK # undef hypotl # if HAVE_RAW_DECL_HYPOTL _GL_WARN_ON_USE (hypotl, "hypotl is unportable - " "use gnulib module hypotl for portability"); # endif #endif #if @GNULIB_ILOGBF@ # if @REPLACE_ILOGBF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ilogbf # define ilogbf rpl_ilogbf # endif _GL_FUNCDECL_RPL (ilogbf, int, (float x)); _GL_CXXALIAS_RPL (ilogbf, int, (float x)); # else # if !@HAVE_ILOGBF@ _GL_FUNCDECL_SYS (ilogbf, int, (float x)); # endif _GL_CXXALIAS_SYS (ilogbf, int, (float x)); # endif _GL_CXXALIASWARN (ilogbf); #elif defined GNULIB_POSIXCHECK # undef ilogbf # if HAVE_RAW_DECL_ILOGBF _GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " "use gnulib module ilogbf for portability"); # endif #endif #if @GNULIB_ILOGB@ # if @REPLACE_ILOGB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ilogb # define ilogb rpl_ilogb # endif _GL_FUNCDECL_RPL (ilogb, int, (double x)); _GL_CXXALIAS_RPL (ilogb, int, (double x)); # else # if !@HAVE_ILOGB@ _GL_FUNCDECL_SYS (ilogb, int, (double x)); # endif _GL_CXXALIAS_SYS (ilogb, int, (double x)); # endif _GL_CXXALIASWARN (ilogb); #elif defined GNULIB_POSIXCHECK # undef ilogb # if HAVE_RAW_DECL_ILOGB _GL_WARN_ON_USE (ilogb, "ilogb is unportable - " "use gnulib module ilogb for portability"); # endif #endif #if @GNULIB_ILOGBL@ # if !@HAVE_ILOGBL@ _GL_FUNCDECL_SYS (ilogbl, int, (long double x)); # endif _GL_CXXALIAS_SYS (ilogbl, int, (long double x)); _GL_CXXALIASWARN (ilogbl); #elif defined GNULIB_POSIXCHECK # undef ilogbl # if HAVE_RAW_DECL_ILOGBL _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " "use gnulib module ilogbl for portability"); # endif #endif /* Return x * 2^exp. */ #if @GNULIB_LDEXPF@ # if !@HAVE_LDEXPF@ # undef ldexpf _GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); # endif _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); _GL_CXXALIASWARN (ldexpf); #elif defined GNULIB_POSIXCHECK # undef ldexpf # if HAVE_RAW_DECL_LDEXPF _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " "use gnulib module ldexpf for portability"); # endif #endif /* Return x * 2^exp. */ #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ldexpl # define ldexpl rpl_ldexpl # endif _GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); _GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); #else # if !@HAVE_DECL_LDEXPL@ _GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); # endif # if @GNULIB_LDEXPL@ _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); # endif #endif #if @GNULIB_LDEXPL@ _GL_CXXALIASWARN (ldexpl); #endif #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK # undef ldexpl # if HAVE_RAW_DECL_LDEXPL _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " "use gnulib module ldexpl for portability"); # endif #endif #if @GNULIB_LOGF@ # if @REPLACE_LOGF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef logf # define logf rpl_logf # endif _GL_FUNCDECL_RPL (logf, float, (float x)); _GL_CXXALIAS_RPL (logf, float, (float x)); # else # if !@HAVE_LOGF@ # undef logf _GL_FUNCDECL_SYS (logf, float, (float x)); # endif _GL_CXXALIAS_SYS (logf, float, (float x)); # endif _GL_CXXALIASWARN (logf); #elif defined GNULIB_POSIXCHECK # undef logf # if HAVE_RAW_DECL_LOGF _GL_WARN_ON_USE (logf, "logf is unportable - " "use gnulib module logf for portability"); # endif #endif #if @GNULIB_LOG@ # if @REPLACE_LOG@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log # define log rpl_log # endif _GL_FUNCDECL_RPL (log, double, (double x)); _GL_CXXALIAS_RPL (log, double, (double x)); # else _GL_CXXALIAS_SYS (log, double, (double x)); # endif _GL_CXXALIASWARN (log); #elif defined GNULIB_POSIXCHECK # undef log # if HAVE_RAW_DECL_LOG _GL_WARN_ON_USE (log, "log has portability problems - " "use gnulib module log for portability"); # endif #endif #if @GNULIB_LOGL@ # if @REPLACE_LOGL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef logl # define logl rpl_logl # endif _GL_FUNCDECL_RPL (logl, long double, (long double x)); _GL_CXXALIAS_RPL (logl, long double, (long double x)); # else # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ # undef logl _GL_FUNCDECL_SYS (logl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (logl, long double, (long double x)); # endif _GL_CXXALIASWARN (logl); #elif defined GNULIB_POSIXCHECK # undef logl # if HAVE_RAW_DECL_LOGL _GL_WARN_ON_USE (logl, "logl is unportable - " "use gnulib module logl for portability"); # endif #endif #if @GNULIB_LOG10F@ # if @REPLACE_LOG10F@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log10f # define log10f rpl_log10f # endif _GL_FUNCDECL_RPL (log10f, float, (float x)); _GL_CXXALIAS_RPL (log10f, float, (float x)); # else # if !@HAVE_LOG10F@ # undef log10f _GL_FUNCDECL_SYS (log10f, float, (float x)); # endif _GL_CXXALIAS_SYS (log10f, float, (float x)); # endif _GL_CXXALIASWARN (log10f); #elif defined GNULIB_POSIXCHECK # undef log10f # if HAVE_RAW_DECL_LOG10F _GL_WARN_ON_USE (log10f, "log10f is unportable - " "use gnulib module log10f for portability"); # endif #endif #if @GNULIB_LOG10@ # if @REPLACE_LOG10@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log10 # define log10 rpl_log10 # endif _GL_FUNCDECL_RPL (log10, double, (double x)); _GL_CXXALIAS_RPL (log10, double, (double x)); # else _GL_CXXALIAS_SYS (log10, double, (double x)); # endif _GL_CXXALIASWARN (log10); #elif defined GNULIB_POSIXCHECK # undef log10 # if HAVE_RAW_DECL_LOG10 _GL_WARN_ON_USE (log10, "log10 has portability problems - " "use gnulib module log10 for portability"); # endif #endif #if @GNULIB_LOG10L@ # if @REPLACE_LOG10L@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log10l # define log10l rpl_log10l # endif _GL_FUNCDECL_RPL (log10l, long double, (long double x)); _GL_CXXALIAS_RPL (log10l, long double, (long double x)); # else # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@ # undef log10l _GL_FUNCDECL_SYS (log10l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log10l, long double, (long double x)); # endif _GL_CXXALIASWARN (log10l); #elif defined GNULIB_POSIXCHECK # undef log10l # if HAVE_RAW_DECL_LOG10L _GL_WARN_ON_USE (log10l, "log10l is unportable - " "use gnulib module log10l for portability"); # endif #endif #if @GNULIB_LOG1PF@ # if @REPLACE_LOG1PF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log1pf # define log1pf rpl_log1pf # endif _GL_FUNCDECL_RPL (log1pf, float, (float x)); _GL_CXXALIAS_RPL (log1pf, float, (float x)); # else # if !@HAVE_LOG1PF@ _GL_FUNCDECL_SYS (log1pf, float, (float x)); # endif _GL_CXXALIAS_SYS (log1pf, float, (float x)); # endif _GL_CXXALIASWARN (log1pf); #elif defined GNULIB_POSIXCHECK # undef log1pf # if HAVE_RAW_DECL_LOG1PF _GL_WARN_ON_USE (log1pf, "log1pf is unportable - " "use gnulib module log1pf for portability"); # endif #endif #if @GNULIB_LOG1P@ # if @REPLACE_LOG1P@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log1p # define log1p rpl_log1p # endif _GL_FUNCDECL_RPL (log1p, double, (double x)); _GL_CXXALIAS_RPL (log1p, double, (double x)); # else # if !@HAVE_LOG1P@ _GL_FUNCDECL_SYS (log1p, double, (double x)); # endif _GL_CXXALIAS_SYS (log1p, double, (double x)); # endif _GL_CXXALIASWARN (log1p); #elif defined GNULIB_POSIXCHECK # undef log1p # if HAVE_RAW_DECL_LOG1P _GL_WARN_ON_USE (log1p, "log1p has portability problems - " "use gnulib module log1p for portability"); # endif #endif #if @GNULIB_LOG1PL@ # if @REPLACE_LOG1PL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log1pl # define log1pl rpl_log1pl # endif _GL_FUNCDECL_RPL (log1pl, long double, (long double x)); _GL_CXXALIAS_RPL (log1pl, long double, (long double x)); # else # if !@HAVE_LOG1PL@ _GL_FUNCDECL_SYS (log1pl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log1pl, long double, (long double x)); # endif _GL_CXXALIASWARN (log1pl); #elif defined GNULIB_POSIXCHECK # undef log1pl # if HAVE_RAW_DECL_LOG1PL _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " "use gnulib module log1pl for portability"); # endif #endif #if @GNULIB_LOG2F@ # if @REPLACE_LOG2F@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log2f # define log2f rpl_log2f # endif _GL_FUNCDECL_RPL (log2f, float, (float x)); _GL_CXXALIAS_RPL (log2f, float, (float x)); # else # if !@HAVE_DECL_LOG2F@ # undef log2f _GL_FUNCDECL_SYS (log2f, float, (float x)); # endif _GL_CXXALIAS_SYS (log2f, float, (float x)); # endif _GL_CXXALIASWARN (log2f); #elif defined GNULIB_POSIXCHECK # undef log2f # if HAVE_RAW_DECL_LOG2F _GL_WARN_ON_USE (log2f, "log2f is unportable - " "use gnulib module log2f for portability"); # endif #endif #if @GNULIB_LOG2@ # if @REPLACE_LOG2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log2 # define log2 rpl_log2 # endif _GL_FUNCDECL_RPL (log2, double, (double x)); _GL_CXXALIAS_RPL (log2, double, (double x)); # else # if !@HAVE_DECL_LOG2@ # undef log2 _GL_FUNCDECL_SYS (log2, double, (double x)); # endif _GL_CXXALIAS_SYS (log2, double, (double x)); # endif _GL_CXXALIASWARN (log2); #elif defined GNULIB_POSIXCHECK # undef log2 # if HAVE_RAW_DECL_LOG2 _GL_WARN_ON_USE (log2, "log2 is unportable - " "use gnulib module log2 for portability"); # endif #endif #if @GNULIB_LOG2L@ # if @REPLACE_LOG2L@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log2l # define log2l rpl_log2l # endif _GL_FUNCDECL_RPL (log2l, long double, (long double x)); _GL_CXXALIAS_RPL (log2l, long double, (long double x)); # else # if !@HAVE_DECL_LOG2L@ _GL_FUNCDECL_SYS (log2l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log2l, long double, (long double x)); # endif _GL_CXXALIASWARN (log2l); #elif defined GNULIB_POSIXCHECK # undef log2l # if HAVE_RAW_DECL_LOG2L _GL_WARN_ON_USE (log2l, "log2l is unportable - " "use gnulib module log2l for portability"); # endif #endif #if @GNULIB_LOGBF@ # if @REPLACE_LOGBF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef logbf # define logbf rpl_logbf # endif _GL_FUNCDECL_RPL (logbf, float, (float x)); _GL_CXXALIAS_RPL (logbf, float, (float x)); # else # if !@HAVE_LOGBF@ _GL_FUNCDECL_SYS (logbf, float, (float x)); # endif _GL_CXXALIAS_SYS (logbf, float, (float x)); # endif _GL_CXXALIASWARN (logbf); #elif defined GNULIB_POSIXCHECK # undef logbf # if HAVE_RAW_DECL_LOGBF _GL_WARN_ON_USE (logbf, "logbf is unportable - " "use gnulib module logbf for portability"); # endif #endif #if @GNULIB_LOGB@ # if @REPLACE_LOGB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef logb # define logb rpl_logb # endif _GL_FUNCDECL_RPL (logb, double, (double x)); _GL_CXXALIAS_RPL (logb, double, (double x)); # else # if !@HAVE_DECL_LOGB@ _GL_FUNCDECL_SYS (logb, double, (double x)); # endif _GL_CXXALIAS_SYS (logb, double, (double x)); # endif _GL_CXXALIASWARN (logb); #elif defined GNULIB_POSIXCHECK # undef logb # if HAVE_RAW_DECL_LOGB _GL_WARN_ON_USE (logb, "logb is unportable - " "use gnulib module logb for portability"); # endif #endif #if @GNULIB_LOGBL@ # if @REPLACE_LOGBL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef logbl # define logbl rpl_logbl # endif _GL_FUNCDECL_RPL (logbl, long double, (long double x)); _GL_CXXALIAS_RPL (logbl, long double, (long double x)); # else # if !@HAVE_LOGBL@ _GL_FUNCDECL_SYS (logbl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (logbl, long double, (long double x)); # endif _GL_CXXALIASWARN (logbl); #elif defined GNULIB_POSIXCHECK # undef logbl # if HAVE_RAW_DECL_LOGBL _GL_WARN_ON_USE (logbl, "logbl is unportable - " "use gnulib module logbl for portability"); # endif #endif #if @GNULIB_MODFF@ # if @REPLACE_MODFF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef modff # define modff rpl_modff # endif _GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); # else # if !@HAVE_MODFF@ # undef modff _GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); # endif _GL_CXXALIASWARN (modff); #elif defined GNULIB_POSIXCHECK # undef modff # if HAVE_RAW_DECL_MODFF _GL_WARN_ON_USE (modff, "modff is unportable - " "use gnulib module modff for portability"); # endif #endif #if @GNULIB_MODF@ # if @REPLACE_MODF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef modf # define modf rpl_modf # endif _GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); # else _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); # endif _GL_CXXALIASWARN (modf); #elif defined GNULIB_POSIXCHECK # undef modf # if HAVE_RAW_DECL_MODF _GL_WARN_ON_USE (modf, "modf has portability problems - " "use gnulib module modf for portability"); # endif #endif #if @GNULIB_MODFL@ # if @REPLACE_MODFL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef modfl # define modfl rpl_modfl # endif _GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); # else # if !@HAVE_MODFL@ # undef modfl _GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); # endif _GL_CXXALIASWARN (modfl); #elif defined GNULIB_POSIXCHECK # undef modfl # if HAVE_RAW_DECL_MODFL _GL_WARN_ON_USE (modfl, "modfl is unportable - " "use gnulib module modfl for portability"); # endif #endif #if @GNULIB_POWF@ # if !@HAVE_POWF@ # undef powf _GL_FUNCDECL_SYS (powf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (powf, float, (float x, float y)); _GL_CXXALIASWARN (powf); #elif defined GNULIB_POSIXCHECK # undef powf # if HAVE_RAW_DECL_POWF _GL_WARN_ON_USE (powf, "powf is unportable - " "use gnulib module powf for portability"); # endif #endif #if @GNULIB_REMAINDERF@ # if @REPLACE_REMAINDERF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef remainderf # define remainderf rpl_remainderf # endif _GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); _GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); # else # if !@HAVE_REMAINDERF@ _GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); # endif _GL_CXXALIASWARN (remainderf); #elif defined GNULIB_POSIXCHECK # undef remainderf # if HAVE_RAW_DECL_REMAINDERF _GL_WARN_ON_USE (remainderf, "remainderf is unportable - " "use gnulib module remainderf for portability"); # endif #endif #if @GNULIB_REMAINDER@ # if @REPLACE_REMAINDER@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef remainder # define remainder rpl_remainder # endif _GL_FUNCDECL_RPL (remainder, double, (double x, double y)); _GL_CXXALIAS_RPL (remainder, double, (double x, double y)); # else # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@ _GL_FUNCDECL_SYS (remainder, double, (double x, double y)); # endif _GL_CXXALIAS_SYS (remainder, double, (double x, double y)); # endif _GL_CXXALIASWARN (remainder); #elif defined GNULIB_POSIXCHECK # undef remainder # if HAVE_RAW_DECL_REMAINDER _GL_WARN_ON_USE (remainder, "remainder is unportable - " "use gnulib module remainder for portability"); # endif #endif #if @GNULIB_REMAINDERL@ # if @REPLACE_REMAINDERL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef remainderl # define remainderl rpl_remainderl # endif _GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); _GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); # else # if !@HAVE_DECL_REMAINDERL@ # undef remainderl _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); # endif _GL_CXXALIASWARN (remainderl); #elif defined GNULIB_POSIXCHECK # undef remainderl # if HAVE_RAW_DECL_REMAINDERL _GL_WARN_ON_USE (remainderl, "remainderl is unportable - " "use gnulib module remainderl for portability"); # endif #endif #if @GNULIB_RINTF@ # if !@HAVE_DECL_RINTF@ _GL_FUNCDECL_SYS (rintf, float, (float x)); # endif _GL_CXXALIAS_SYS (rintf, float, (float x)); _GL_CXXALIASWARN (rintf); #elif defined GNULIB_POSIXCHECK # undef rintf # if HAVE_RAW_DECL_RINTF _GL_WARN_ON_USE (rintf, "rintf is unportable - " "use gnulib module rintf for portability"); # endif #endif #if @GNULIB_RINT@ # if !@HAVE_RINT@ _GL_FUNCDECL_SYS (rint, double, (double x)); # endif _GL_CXXALIAS_SYS (rint, double, (double x)); _GL_CXXALIASWARN (rint); #elif defined GNULIB_POSIXCHECK # undef rint # if HAVE_RAW_DECL_RINT _GL_WARN_ON_USE (rint, "rint is unportable - " "use gnulib module rint for portability"); # endif #endif #if @GNULIB_RINTL@ # if !@HAVE_RINTL@ _GL_FUNCDECL_SYS (rintl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (rintl, long double, (long double x)); _GL_CXXALIASWARN (rintl); #elif defined GNULIB_POSIXCHECK # undef rintl # if HAVE_RAW_DECL_RINTL _GL_WARN_ON_USE (rintl, "rintl is unportable - " "use gnulib module rintl for portability"); # endif #endif #if @GNULIB_ROUNDF@ # if @REPLACE_ROUNDF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef roundf # define roundf rpl_roundf # endif _GL_FUNCDECL_RPL (roundf, float, (float x)); _GL_CXXALIAS_RPL (roundf, float, (float x)); # else # if !@HAVE_DECL_ROUNDF@ _GL_FUNCDECL_SYS (roundf, float, (float x)); # endif _GL_CXXALIAS_SYS (roundf, float, (float x)); # endif _GL_CXXALIASWARN (roundf); #elif defined GNULIB_POSIXCHECK # undef roundf # if HAVE_RAW_DECL_ROUNDF _GL_WARN_ON_USE (roundf, "roundf is unportable - " "use gnulib module roundf for portability"); # endif #endif #if @GNULIB_ROUND@ # if @REPLACE_ROUND@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef round # define round rpl_round # endif _GL_FUNCDECL_RPL (round, double, (double x)); _GL_CXXALIAS_RPL (round, double, (double x)); # else # if !@HAVE_DECL_ROUND@ _GL_FUNCDECL_SYS (round, double, (double x)); # endif _GL_CXXALIAS_SYS (round, double, (double x)); # endif _GL_CXXALIASWARN (round); #elif defined GNULIB_POSIXCHECK # undef round # if HAVE_RAW_DECL_ROUND _GL_WARN_ON_USE (round, "round is unportable - " "use gnulib module round for portability"); # endif #endif #if @GNULIB_ROUNDL@ # if @REPLACE_ROUNDL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef roundl # define roundl rpl_roundl # endif _GL_FUNCDECL_RPL (roundl, long double, (long double x)); _GL_CXXALIAS_RPL (roundl, long double, (long double x)); # else # if !@HAVE_DECL_ROUNDL@ # undef roundl _GL_FUNCDECL_SYS (roundl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (roundl, long double, (long double x)); # endif _GL_CXXALIASWARN (roundl); #elif defined GNULIB_POSIXCHECK # undef roundl # if HAVE_RAW_DECL_ROUNDL _GL_WARN_ON_USE (roundl, "roundl is unportable - " "use gnulib module roundl for portability"); # endif #endif #if @GNULIB_SINF@ # if @REPLACE_SINF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sinf # define sinf rpl_sinf # endif _GL_FUNCDECL_RPL (sinf, float, (float x)); _GL_CXXALIAS_RPL (sinf, float, (float x)); # else # if !@HAVE_SINF@ # undef sinf _GL_FUNCDECL_SYS (sinf, float, (float x)); # endif _GL_CXXALIAS_SYS (sinf, float, (float x)); # endif _GL_CXXALIASWARN (sinf); #elif defined GNULIB_POSIXCHECK # undef sinf # if HAVE_RAW_DECL_SINF _GL_WARN_ON_USE (sinf, "sinf is unportable - " "use gnulib module sinf for portability"); # endif #endif #if @GNULIB_SINL@ # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@ # undef sinl _GL_FUNCDECL_SYS (sinl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (sinl, long double, (long double x)); _GL_CXXALIASWARN (sinl); #elif defined GNULIB_POSIXCHECK # undef sinl # if HAVE_RAW_DECL_SINL _GL_WARN_ON_USE (sinl, "sinl is unportable - " "use gnulib module sinl for portability"); # endif #endif #if @GNULIB_SINHF@ # if @REPLACE_SINHF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sinhf # define sinhf rpl_sinhf # endif _GL_FUNCDECL_RPL (sinhf, float, (float x)); _GL_CXXALIAS_RPL (sinhf, float, (float x)); # else # if !@HAVE_SINHF@ # undef sinhf _GL_FUNCDECL_SYS (sinhf, float, (float x)); # endif _GL_CXXALIAS_SYS (sinhf, float, (float x)); # endif _GL_CXXALIASWARN (sinhf); #elif defined GNULIB_POSIXCHECK # undef sinhf # if HAVE_RAW_DECL_SINHF _GL_WARN_ON_USE (sinhf, "sinhf is unportable - " "use gnulib module sinhf for portability"); # endif #endif #if @GNULIB_SQRTF@ # if @REPLACE_SQRTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sqrtf # define sqrtf rpl_sqrtf # endif _GL_FUNCDECL_RPL (sqrtf, float, (float x)); _GL_CXXALIAS_RPL (sqrtf, float, (float x)); # else # if !@HAVE_SQRTF@ # undef sqrtf _GL_FUNCDECL_SYS (sqrtf, float, (float x)); # endif _GL_CXXALIAS_SYS (sqrtf, float, (float x)); # endif _GL_CXXALIASWARN (sqrtf); #elif defined GNULIB_POSIXCHECK # undef sqrtf # if HAVE_RAW_DECL_SQRTF _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " "use gnulib module sqrtf for portability"); # endif #endif #if @GNULIB_SQRTL@ # if @REPLACE_SQRTL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sqrtl # define sqrtl rpl_sqrtl # endif _GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); _GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); # else # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@ # undef sqrtl _GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); # endif _GL_CXXALIASWARN (sqrtl); #elif defined GNULIB_POSIXCHECK # undef sqrtl # if HAVE_RAW_DECL_SQRTL _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " "use gnulib module sqrtl for portability"); # endif #endif #if @GNULIB_TANF@ # if @REPLACE_TANF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef tanf # define tanf rpl_tanf # endif _GL_FUNCDECL_RPL (tanf, float, (float x)); _GL_CXXALIAS_RPL (tanf, float, (float x)); # else # if !@HAVE_TANF@ # undef tanf _GL_FUNCDECL_SYS (tanf, float, (float x)); # endif _GL_CXXALIAS_SYS (tanf, float, (float x)); # endif _GL_CXXALIASWARN (tanf); #elif defined GNULIB_POSIXCHECK # undef tanf # if HAVE_RAW_DECL_TANF _GL_WARN_ON_USE (tanf, "tanf is unportable - " "use gnulib module tanf for portability"); # endif #endif #if @GNULIB_TANL@ # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@ # undef tanl _GL_FUNCDECL_SYS (tanl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (tanl, long double, (long double x)); _GL_CXXALIASWARN (tanl); #elif defined GNULIB_POSIXCHECK # undef tanl # if HAVE_RAW_DECL_TANL _GL_WARN_ON_USE (tanl, "tanl is unportable - " "use gnulib module tanl for portability"); # endif #endif #if @GNULIB_TANHF@ # if @REPLACE_TANHF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef tanhf # define tanhf rpl_tanhf # endif _GL_FUNCDECL_RPL (tanhf, float, (float x)); _GL_CXXALIAS_RPL (tanhf, float, (float x)); # else # if !@HAVE_TANHF@ # undef tanhf _GL_FUNCDECL_SYS (tanhf, float, (float x)); # endif _GL_CXXALIAS_SYS (tanhf, float, (float x)); # endif _GL_CXXALIASWARN (tanhf); #elif defined GNULIB_POSIXCHECK # undef tanhf # if HAVE_RAW_DECL_TANHF _GL_WARN_ON_USE (tanhf, "tanhf is unportable - " "use gnulib module tanhf for portability"); # endif #endif #if @GNULIB_TRUNCF@ # if @REPLACE_TRUNCF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef truncf # define truncf rpl_truncf # endif _GL_FUNCDECL_RPL (truncf, float, (float x)); _GL_CXXALIAS_RPL (truncf, float, (float x)); # else # if !@HAVE_DECL_TRUNCF@ _GL_FUNCDECL_SYS (truncf, float, (float x)); # endif _GL_CXXALIAS_SYS (truncf, float, (float x)); # endif _GL_CXXALIASWARN (truncf); #elif defined GNULIB_POSIXCHECK # undef truncf # if HAVE_RAW_DECL_TRUNCF _GL_WARN_ON_USE (truncf, "truncf is unportable - " "use gnulib module truncf for portability"); # endif #endif #if @GNULIB_TRUNC@ # if @REPLACE_TRUNC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef trunc # define trunc rpl_trunc # endif _GL_FUNCDECL_RPL (trunc, double, (double x)); _GL_CXXALIAS_RPL (trunc, double, (double x)); # else # if !@HAVE_DECL_TRUNC@ _GL_FUNCDECL_SYS (trunc, double, (double x)); # endif _GL_CXXALIAS_SYS (trunc, double, (double x)); # endif _GL_CXXALIASWARN (trunc); #elif defined GNULIB_POSIXCHECK # undef trunc # if HAVE_RAW_DECL_TRUNC _GL_WARN_ON_USE (trunc, "trunc is unportable - " "use gnulib module trunc for portability"); # endif #endif #if @GNULIB_TRUNCL@ # if @REPLACE_TRUNCL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef truncl # define truncl rpl_truncl # endif _GL_FUNCDECL_RPL (truncl, long double, (long double x)); _GL_CXXALIAS_RPL (truncl, long double, (long double x)); # else # if !@HAVE_DECL_TRUNCL@ _GL_FUNCDECL_SYS (truncl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (truncl, long double, (long double x)); # endif _GL_CXXALIASWARN (truncl); #elif defined GNULIB_POSIXCHECK # undef truncl # if HAVE_RAW_DECL_TRUNCL _GL_WARN_ON_USE (truncl, "truncl is unportable - " "use gnulib module truncl for portability"); # endif #endif /* Definitions of function-like macros come here, after the function declarations. */ #if @GNULIB_ISFINITE@ # if @REPLACE_ISFINITE@ _GL_EXTERN_C int gl_isfinitef (float x); _GL_EXTERN_C int gl_isfinited (double x); _GL_EXTERN_C int gl_isfinitel (long double x); # undef isfinite # define isfinite(x) \ (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ gl_isfinitef (x)) # endif # ifdef __cplusplus # if defined isfinite || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) # undef isfinite _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite) # endif # endif #elif defined GNULIB_POSIXCHECK # if defined isfinite _GL_WARN_REAL_FLOATING_DECL (isfinite); # undef isfinite # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) # endif #endif #if @GNULIB_ISINF@ # if @REPLACE_ISINF@ _GL_EXTERN_C int gl_isinff (float x); _GL_EXTERN_C int gl_isinfd (double x); _GL_EXTERN_C int gl_isinfl (long double x); # undef isinf # define isinf(x) \ (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ gl_isinff (x)) # endif # ifdef __cplusplus # if defined isinf || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) # undef isinf _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf) # endif # endif #elif defined GNULIB_POSIXCHECK # if defined isinf _GL_WARN_REAL_FLOATING_DECL (isinf); # undef isinf # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) # endif #endif #if @GNULIB_ISNANF@ /* Test for NaN for 'float' numbers. */ # if @HAVE_ISNANF@ /* The original included above provides a declaration of isnan macro or (older) isnanf function. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) # elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) # endif # else /* Test whether X is a NaN. */ # undef isnanf # define isnanf rpl_isnanf _GL_EXTERN_C int isnanf (float x); # endif #endif #if @GNULIB_ISNAND@ /* Test for NaN for 'double' numbers. This function is a gnulib extension, unlike isnan() which applied only to 'double' numbers earlier but now is a type-generic macro. */ # if @HAVE_ISNAND@ /* The original included above provides a declaration of isnan macro. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) # else # undef isnand # define isnand(x) isnan ((double)(x)) # endif # else /* Test whether X is a NaN. */ # undef isnand # define isnand rpl_isnand _GL_EXTERN_C int isnand (double x); # endif #endif #if @GNULIB_ISNANL@ /* Test for NaN for 'long double' numbers. */ # if @HAVE_ISNANL@ /* The original included above provides a declaration of isnan macro or (older) isnanl function. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) # elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) # endif # else /* Test whether X is a NaN. */ # undef isnanl # define isnanl rpl_isnanl _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; # endif #endif /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ #if @GNULIB_ISNAN@ # if @REPLACE_ISNAN@ /* We can't just use the isnanf macro (e.g.) as exposed by isnanf.h (e.g.) here, because those may end up being macros that recursively expand back to isnan. So use the gnulib replacements for them directly. */ # if @HAVE_ISNANF@ && __GNUC__ >= 4 # define gl_isnan_f(x) __builtin_isnanf ((float)(x)) # else _GL_EXTERN_C int rpl_isnanf (float x); # define gl_isnan_f(x) rpl_isnanf (x) # endif # if @HAVE_ISNAND@ && __GNUC__ >= 4 # define gl_isnan_d(x) __builtin_isnan ((double)(x)) # else _GL_EXTERN_C int rpl_isnand (double x); # define gl_isnan_d(x) rpl_isnand (x) # endif # if @HAVE_ISNANL@ && __GNUC__ >= 4 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) # else _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; # define gl_isnan_l(x) rpl_isnanl (x) # endif # undef isnan # define isnan(x) \ (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ gl_isnan_f (x)) # elif __GNUC__ >= 4 # undef isnan # define isnan(x) \ (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ __builtin_isnanf ((float)(x))) # endif # ifdef __cplusplus # if defined isnan || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) # undef isnan _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan) # endif # else /* Ensure isnan is a macro. */ # ifndef isnan # define isnan isnan # endif # endif #elif defined GNULIB_POSIXCHECK # if defined isnan _GL_WARN_REAL_FLOATING_DECL (isnan); # undef isnan # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) # endif #endif #if @GNULIB_SIGNBIT@ # if (@REPLACE_SIGNBIT_USING_GCC@ \ && (!defined __cplusplus || __cplusplus < 201103)) # undef signbit /* GCC 4.0 and newer provides three built-ins for signbit. */ # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ __builtin_signbitf (x)) # endif # if @REPLACE_SIGNBIT@ # undef signbit _GL_EXTERN_C int gl_signbitf (float arg); _GL_EXTERN_C int gl_signbitd (double arg); _GL_EXTERN_C int gl_signbitl (long double arg); # if __GNUC__ >= 2 && !defined __STRICT_ANSI__ # define _GL_NUM_UINT_WORDS(type) \ ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf # define gl_signbitf_OPTIMIZED_MACRO # define gl_signbitf(arg) \ ({ union { float _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ } _m; \ _m._value = (arg); \ (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ }) # endif # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd # define gl_signbitd_OPTIMIZED_MACRO # define gl_signbitd(arg) \ ({ union { double _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ } _m; \ _m._value = (arg); \ (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ }) # endif # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl # define gl_signbitl_OPTIMIZED_MACRO # define gl_signbitl(arg) \ ({ union { long double _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ } _m; \ _m._value = (arg); \ (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ }) # endif # endif # define signbit(x) \ (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ gl_signbitf (x)) # endif # ifdef __cplusplus # if defined signbit || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) # undef signbit _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit) # endif # endif #elif defined GNULIB_POSIXCHECK # if defined signbit _GL_WARN_REAL_FLOATING_DECL (signbit); # undef signbit # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) # endif #endif _GL_INLINE_HEADER_END #endif /* _@GUARD_PREFIX@_MATH_H */ #endif /* _@GUARD_PREFIX@_MATH_H */ pspp-1.0.1/gl/binary-io.h0000644000175000017500000000474613124536241012074 00000000000000/* Binary mode I/O. Copyright (C) 2001, 2003, 2005, 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _BINARY_H #define _BINARY_H /* For systems that distinguish between text and binary I/O. O_BINARY is guaranteed by the gnulib . */ #include /* The MSVC7 doesn't like to be included after '#define fileno ...', so we include it here first. */ #include #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef BINARY_IO_INLINE # define BINARY_IO_INLINE _GL_INLINE #endif #if O_BINARY # if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__ # include /* declares setmode() */ # define __gl_setmode setmode # else # define __gl_setmode _setmode # undef fileno # define fileno _fileno # endif #else /* On reasonable systems, binary I/O is the only choice. */ /* Use a function rather than a macro, to avoid gcc warnings "warning: statement with no effect". */ BINARY_IO_INLINE int __gl_setmode (int fd, int mode) { (void) fd; (void) mode; return O_BINARY; } #endif #if defined __DJGPP__ || defined __EMX__ extern int __gl_setmode_check (int); #else BINARY_IO_INLINE int __gl_setmode_check (int fd) { return 0; } #endif /* Set FD's mode to MODE, which should be either O_TEXT or O_BINARY. Return the old mode if successful, -1 (setting errno) on failure. Ordinarily this function would be called 'setmode', since that is its name on MS-Windows, but it is called 'set_binary_mode' here to avoid colliding with a BSD function of another name. */ BINARY_IO_INLINE int set_binary_mode (int fd, int mode) { int r = __gl_setmode_check (fd); return r != 0 ? r : __gl_setmode (fd, mode); } /* This macro is obsolescent. */ #define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY)) _GL_INLINE_HEADER_END #endif /* _BINARY_H */ pspp-1.0.1/gl/lseek.c0000644000175000017500000000352613124536242011275 00000000000000/* An lseek() function that detects pipes. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Windows platforms. */ /* Get GetFileType. */ # include /* Get _get_osfhandle. */ # if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" # else # include # endif #else # include #endif #include #undef lseek off_t rpl_lseek (int fd, off_t offset, int whence) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */ HANDLE h = (HANDLE) _get_osfhandle (fd); if (h == INVALID_HANDLE_VALUE) { errno = EBADF; return -1; } if (GetFileType (h) != FILE_TYPE_DISK) { errno = ESPIPE; return -1; } #else /* BeOS lseek mistakenly succeeds on pipes... */ struct stat statbuf; if (fstat (fd, &statbuf) < 0) return -1; if (!S_ISREG (statbuf.st_mode)) { errno = ESPIPE; return -1; } #endif #if _GL_WINDOWS_64_BIT_OFF_T return _lseeki64 (fd, offset, whence); #else return lseek (fd, offset, whence); #endif } pspp-1.0.1/gl/mbtowc.c0000644000175000017500000000164613124536242011466 00000000000000/* Convert multibyte character to wide character. Copyright (C) 2011-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2011. 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 . */ #include #include #include #include #include #include "mbtowc-impl.h" pspp-1.0.1/gl/strdup.c0000644000175000017500000000247013124536243011511 00000000000000/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2017 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 3, 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 . */ #ifndef _LIBC # include #endif /* Get specification. */ #include #include #undef __strdup #ifdef _LIBC # undef strdup #endif #ifndef weak_alias # define __strdup strdup #endif /* Duplicate S, returning an identical malloc'd string. */ char * __strdup (const char *s) { size_t len = strlen (s) + 1; void *new = malloc (len); if (new == NULL) return NULL; return (char *) memcpy (new, s, len); } #ifdef libc_hidden_def libc_hidden_def (__strdup) #endif #ifdef weak_alias weak_alias (__strdup, strdup) #endif pspp-1.0.1/gl/snprintf.c0000644000175000017500000000352313124536243012033 00000000000000/* Formatted output to strings. Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. Written by Simon Josefsson and Paul Eggert. 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, 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 . */ #include /* Specification. */ #include #include #include #include #include #include #include "vasnprintf.h" /* Print formatted output to string STR. Similar to sprintf, but additional length SIZE limit how much is written into STR. Returns string length of formatted string (which may be larger than SIZE). STR may be NULL, in which case nothing will be written. On error, return a negative value. */ int snprintf (char *str, size_t size, const char *format, ...) { char *output; size_t len; size_t lenbuf = size; va_list args; va_start (args, format); output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; va_end (args); if (!output) return -1; if (output != str) { if (size) { size_t pruned_len = (len < size ? len : size - 1); memcpy (str, output, pruned_len); str[pruned_len] = '\0'; } free (output); } if (INT_MAX < len) { errno = EOVERFLOW; return -1; } return len; } pspp-1.0.1/gl/rijndael-alg-fst.c0000644000175000017500000012744713124536243013327 00000000000000/* rijndael-alg-fst.c --- Rijndael cipher implementation. * Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. * * This file is free software; you can 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, or (at your * option) any later version. * * This file is distributed in the hope that 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 file; if not, see . * */ /* Adapted for gnulib by Simon Josefsson. * * Based on public domain "Optimised C code" retrieved from (SHA1 * 7c8e4b00d06685d1dbc6724a9e0d502353de339e): * http://www.iaik.tu-graz.ac.at/research/krypto/AES/old/~rijmen/rijndael/rijndael-fst-3.0.zip */ #include /** * rijndael-alg-fst.c * * @version 3.0 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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 "rijndael-alg-fst.h" /* Te0[x] = S [x].[02, 01, 01, 03]; Te1[x] = S [x].[03, 02, 01, 01]; Te2[x] = S [x].[01, 03, 02, 01]; Te3[x] = S [x].[01, 01, 03, 02]; Te4[x] = S [x].[01, 01, 01, 01]; Td0[x] = Si[x].[0e, 09, 0d, 0b]; Td1[x] = Si[x].[0b, 0e, 09, 0d]; Td2[x] = Si[x].[0d, 0b, 0e, 09]; Td3[x] = Si[x].[09, 0d, 0b, 0e]; Td4[x] = Si[x].[01, 01, 01, 01]; */ static const uint32_t Te0[256] = { 0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a, }; static const uint32_t Te1[256] = { 0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616, }; static const uint32_t Te2[256] = { 0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16, }; static const uint32_t Te3[256] = { 0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c, }; static const uint32_t Te4[256] = { 0x63636363, 0x7c7c7c7c, 0x77777777, 0x7b7b7b7b, 0xf2f2f2f2, 0x6b6b6b6b, 0x6f6f6f6f, 0xc5c5c5c5, 0x30303030, 0x01010101, 0x67676767, 0x2b2b2b2b, 0xfefefefe, 0xd7d7d7d7, 0xabababab, 0x76767676, 0xcacacaca, 0x82828282, 0xc9c9c9c9, 0x7d7d7d7d, 0xfafafafa, 0x59595959, 0x47474747, 0xf0f0f0f0, 0xadadadad, 0xd4d4d4d4, 0xa2a2a2a2, 0xafafafaf, 0x9c9c9c9c, 0xa4a4a4a4, 0x72727272, 0xc0c0c0c0, 0xb7b7b7b7, 0xfdfdfdfd, 0x93939393, 0x26262626, 0x36363636, 0x3f3f3f3f, 0xf7f7f7f7, 0xcccccccc, 0x34343434, 0xa5a5a5a5, 0xe5e5e5e5, 0xf1f1f1f1, 0x71717171, 0xd8d8d8d8, 0x31313131, 0x15151515, 0x04040404, 0xc7c7c7c7, 0x23232323, 0xc3c3c3c3, 0x18181818, 0x96969696, 0x05050505, 0x9a9a9a9a, 0x07070707, 0x12121212, 0x80808080, 0xe2e2e2e2, 0xebebebeb, 0x27272727, 0xb2b2b2b2, 0x75757575, 0x09090909, 0x83838383, 0x2c2c2c2c, 0x1a1a1a1a, 0x1b1b1b1b, 0x6e6e6e6e, 0x5a5a5a5a, 0xa0a0a0a0, 0x52525252, 0x3b3b3b3b, 0xd6d6d6d6, 0xb3b3b3b3, 0x29292929, 0xe3e3e3e3, 0x2f2f2f2f, 0x84848484, 0x53535353, 0xd1d1d1d1, 0x00000000, 0xedededed, 0x20202020, 0xfcfcfcfc, 0xb1b1b1b1, 0x5b5b5b5b, 0x6a6a6a6a, 0xcbcbcbcb, 0xbebebebe, 0x39393939, 0x4a4a4a4a, 0x4c4c4c4c, 0x58585858, 0xcfcfcfcf, 0xd0d0d0d0, 0xefefefef, 0xaaaaaaaa, 0xfbfbfbfb, 0x43434343, 0x4d4d4d4d, 0x33333333, 0x85858585, 0x45454545, 0xf9f9f9f9, 0x02020202, 0x7f7f7f7f, 0x50505050, 0x3c3c3c3c, 0x9f9f9f9f, 0xa8a8a8a8, 0x51515151, 0xa3a3a3a3, 0x40404040, 0x8f8f8f8f, 0x92929292, 0x9d9d9d9d, 0x38383838, 0xf5f5f5f5, 0xbcbcbcbc, 0xb6b6b6b6, 0xdadadada, 0x21212121, 0x10101010, 0xffffffff, 0xf3f3f3f3, 0xd2d2d2d2, 0xcdcdcdcd, 0x0c0c0c0c, 0x13131313, 0xecececec, 0x5f5f5f5f, 0x97979797, 0x44444444, 0x17171717, 0xc4c4c4c4, 0xa7a7a7a7, 0x7e7e7e7e, 0x3d3d3d3d, 0x64646464, 0x5d5d5d5d, 0x19191919, 0x73737373, 0x60606060, 0x81818181, 0x4f4f4f4f, 0xdcdcdcdc, 0x22222222, 0x2a2a2a2a, 0x90909090, 0x88888888, 0x46464646, 0xeeeeeeee, 0xb8b8b8b8, 0x14141414, 0xdededede, 0x5e5e5e5e, 0x0b0b0b0b, 0xdbdbdbdb, 0xe0e0e0e0, 0x32323232, 0x3a3a3a3a, 0x0a0a0a0a, 0x49494949, 0x06060606, 0x24242424, 0x5c5c5c5c, 0xc2c2c2c2, 0xd3d3d3d3, 0xacacacac, 0x62626262, 0x91919191, 0x95959595, 0xe4e4e4e4, 0x79797979, 0xe7e7e7e7, 0xc8c8c8c8, 0x37373737, 0x6d6d6d6d, 0x8d8d8d8d, 0xd5d5d5d5, 0x4e4e4e4e, 0xa9a9a9a9, 0x6c6c6c6c, 0x56565656, 0xf4f4f4f4, 0xeaeaeaea, 0x65656565, 0x7a7a7a7a, 0xaeaeaeae, 0x08080808, 0xbabababa, 0x78787878, 0x25252525, 0x2e2e2e2e, 0x1c1c1c1c, 0xa6a6a6a6, 0xb4b4b4b4, 0xc6c6c6c6, 0xe8e8e8e8, 0xdddddddd, 0x74747474, 0x1f1f1f1f, 0x4b4b4b4b, 0xbdbdbdbd, 0x8b8b8b8b, 0x8a8a8a8a, 0x70707070, 0x3e3e3e3e, 0xb5b5b5b5, 0x66666666, 0x48484848, 0x03030303, 0xf6f6f6f6, 0x0e0e0e0e, 0x61616161, 0x35353535, 0x57575757, 0xb9b9b9b9, 0x86868686, 0xc1c1c1c1, 0x1d1d1d1d, 0x9e9e9e9e, 0xe1e1e1e1, 0xf8f8f8f8, 0x98989898, 0x11111111, 0x69696969, 0xd9d9d9d9, 0x8e8e8e8e, 0x94949494, 0x9b9b9b9b, 0x1e1e1e1e, 0x87878787, 0xe9e9e9e9, 0xcececece, 0x55555555, 0x28282828, 0xdfdfdfdf, 0x8c8c8c8c, 0xa1a1a1a1, 0x89898989, 0x0d0d0d0d, 0xbfbfbfbf, 0xe6e6e6e6, 0x42424242, 0x68686868, 0x41414141, 0x99999999, 0x2d2d2d2d, 0x0f0f0f0f, 0xb0b0b0b0, 0x54545454, 0xbbbbbbbb, 0x16161616, }; static const uint32_t Td0[256] = { 0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742, }; static const uint32_t Td1[256] = { 0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857, }; static const uint32_t Td2[256] = { 0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8, }; static const uint32_t Td3[256] = { 0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0, }; static const uint32_t Td4[256] = { 0x52525252, 0x09090909, 0x6a6a6a6a, 0xd5d5d5d5, 0x30303030, 0x36363636, 0xa5a5a5a5, 0x38383838, 0xbfbfbfbf, 0x40404040, 0xa3a3a3a3, 0x9e9e9e9e, 0x81818181, 0xf3f3f3f3, 0xd7d7d7d7, 0xfbfbfbfb, 0x7c7c7c7c, 0xe3e3e3e3, 0x39393939, 0x82828282, 0x9b9b9b9b, 0x2f2f2f2f, 0xffffffff, 0x87878787, 0x34343434, 0x8e8e8e8e, 0x43434343, 0x44444444, 0xc4c4c4c4, 0xdededede, 0xe9e9e9e9, 0xcbcbcbcb, 0x54545454, 0x7b7b7b7b, 0x94949494, 0x32323232, 0xa6a6a6a6, 0xc2c2c2c2, 0x23232323, 0x3d3d3d3d, 0xeeeeeeee, 0x4c4c4c4c, 0x95959595, 0x0b0b0b0b, 0x42424242, 0xfafafafa, 0xc3c3c3c3, 0x4e4e4e4e, 0x08080808, 0x2e2e2e2e, 0xa1a1a1a1, 0x66666666, 0x28282828, 0xd9d9d9d9, 0x24242424, 0xb2b2b2b2, 0x76767676, 0x5b5b5b5b, 0xa2a2a2a2, 0x49494949, 0x6d6d6d6d, 0x8b8b8b8b, 0xd1d1d1d1, 0x25252525, 0x72727272, 0xf8f8f8f8, 0xf6f6f6f6, 0x64646464, 0x86868686, 0x68686868, 0x98989898, 0x16161616, 0xd4d4d4d4, 0xa4a4a4a4, 0x5c5c5c5c, 0xcccccccc, 0x5d5d5d5d, 0x65656565, 0xb6b6b6b6, 0x92929292, 0x6c6c6c6c, 0x70707070, 0x48484848, 0x50505050, 0xfdfdfdfd, 0xedededed, 0xb9b9b9b9, 0xdadadada, 0x5e5e5e5e, 0x15151515, 0x46464646, 0x57575757, 0xa7a7a7a7, 0x8d8d8d8d, 0x9d9d9d9d, 0x84848484, 0x90909090, 0xd8d8d8d8, 0xabababab, 0x00000000, 0x8c8c8c8c, 0xbcbcbcbc, 0xd3d3d3d3, 0x0a0a0a0a, 0xf7f7f7f7, 0xe4e4e4e4, 0x58585858, 0x05050505, 0xb8b8b8b8, 0xb3b3b3b3, 0x45454545, 0x06060606, 0xd0d0d0d0, 0x2c2c2c2c, 0x1e1e1e1e, 0x8f8f8f8f, 0xcacacaca, 0x3f3f3f3f, 0x0f0f0f0f, 0x02020202, 0xc1c1c1c1, 0xafafafaf, 0xbdbdbdbd, 0x03030303, 0x01010101, 0x13131313, 0x8a8a8a8a, 0x6b6b6b6b, 0x3a3a3a3a, 0x91919191, 0x11111111, 0x41414141, 0x4f4f4f4f, 0x67676767, 0xdcdcdcdc, 0xeaeaeaea, 0x97979797, 0xf2f2f2f2, 0xcfcfcfcf, 0xcececece, 0xf0f0f0f0, 0xb4b4b4b4, 0xe6e6e6e6, 0x73737373, 0x96969696, 0xacacacac, 0x74747474, 0x22222222, 0xe7e7e7e7, 0xadadadad, 0x35353535, 0x85858585, 0xe2e2e2e2, 0xf9f9f9f9, 0x37373737, 0xe8e8e8e8, 0x1c1c1c1c, 0x75757575, 0xdfdfdfdf, 0x6e6e6e6e, 0x47474747, 0xf1f1f1f1, 0x1a1a1a1a, 0x71717171, 0x1d1d1d1d, 0x29292929, 0xc5c5c5c5, 0x89898989, 0x6f6f6f6f, 0xb7b7b7b7, 0x62626262, 0x0e0e0e0e, 0xaaaaaaaa, 0x18181818, 0xbebebebe, 0x1b1b1b1b, 0xfcfcfcfc, 0x56565656, 0x3e3e3e3e, 0x4b4b4b4b, 0xc6c6c6c6, 0xd2d2d2d2, 0x79797979, 0x20202020, 0x9a9a9a9a, 0xdbdbdbdb, 0xc0c0c0c0, 0xfefefefe, 0x78787878, 0xcdcdcdcd, 0x5a5a5a5a, 0xf4f4f4f4, 0x1f1f1f1f, 0xdddddddd, 0xa8a8a8a8, 0x33333333, 0x88888888, 0x07070707, 0xc7c7c7c7, 0x31313131, 0xb1b1b1b1, 0x12121212, 0x10101010, 0x59595959, 0x27272727, 0x80808080, 0xecececec, 0x5f5f5f5f, 0x60606060, 0x51515151, 0x7f7f7f7f, 0xa9a9a9a9, 0x19191919, 0xb5b5b5b5, 0x4a4a4a4a, 0x0d0d0d0d, 0x2d2d2d2d, 0xe5e5e5e5, 0x7a7a7a7a, 0x9f9f9f9f, 0x93939393, 0xc9c9c9c9, 0x9c9c9c9c, 0xefefefef, 0xa0a0a0a0, 0xe0e0e0e0, 0x3b3b3b3b, 0x4d4d4d4d, 0xaeaeaeae, 0x2a2a2a2a, 0xf5f5f5f5, 0xb0b0b0b0, 0xc8c8c8c8, 0xebebebeb, 0xbbbbbbbb, 0x3c3c3c3c, 0x83838383, 0x53535353, 0x99999999, 0x61616161, 0x17171717, 0x2b2b2b2b, 0x04040404, 0x7e7e7e7e, 0xbabababa, 0x77777777, 0xd6d6d6d6, 0x26262626, 0xe1e1e1e1, 0x69696969, 0x14141414, 0x63636363, 0x55555555, 0x21212121, 0x0c0c0c0c, 0x7d7d7d7d, }; static const uint32_t rcon[] = { 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000 /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ }; #define GETU32(pt) (((uint32_t)((pt)[0] & 0xFF) << 24) ^ \ ((uint32_t)((pt)[1] & 0xFF) << 16) ^ \ ((uint32_t)((pt)[2] & 0xFF) << 8) ^ \ ((uint32_t)((pt)[3] & 0xFF))) #define PUTU32(ct, st) { \ (ct)[0] = (char)((st) >> 24); \ (ct)[1] = (char)((st) >> 16); \ (ct)[2] = (char)((st) >> 8); \ (ct)[3] = (char)(st); } /** * Expand the cipher key into the encryption key schedule. * * @return the number of rounds for the given cipher key size. */ int rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], const char cipherKey[], size_t keyBits) { size_t i = 0; uint32_t temp; rk[0] = GETU32 (cipherKey); rk[1] = GETU32 (cipherKey + 4); rk[2] = GETU32 (cipherKey + 8); rk[3] = GETU32 (cipherKey + 12); if (keyBits == 128) { for (;;) { temp = rk[3]; rk[4] = rk[0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24)] & 0x000000ff) ^ rcon[i]; rk[5] = rk[1] ^ rk[4]; rk[6] = rk[2] ^ rk[5]; rk[7] = rk[3] ^ rk[6]; if (++i == 10) { return 10; } rk += 4; } } rk[4] = GETU32 (cipherKey + 16); rk[5] = GETU32 (cipherKey + 20); if (keyBits == 192) { for (;;) { temp = rk[5]; rk[6] = rk[0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24)] & 0x000000ff) ^ rcon[i]; rk[7] = rk[1] ^ rk[6]; rk[8] = rk[2] ^ rk[7]; rk[9] = rk[3] ^ rk[8]; if (++i == 8) { return 12; } rk[10] = rk[4] ^ rk[9]; rk[11] = rk[5] ^ rk[10]; rk += 6; } } rk[6] = GETU32 (cipherKey + 24); rk[7] = GETU32 (cipherKey + 28); if (keyBits == 256) { for (;;) { temp = rk[7]; rk[8] = rk[0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24)] & 0x000000ff) ^ rcon[i]; rk[9] = rk[1] ^ rk[8]; rk[10] = rk[2] ^ rk[9]; rk[11] = rk[3] ^ rk[10]; if (++i == 7) { return 14; } temp = rk[11]; rk[12] = rk[4] ^ (Te4[(temp >> 24)] & 0xff000000) ^ (Te4[(temp >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(temp >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(temp) & 0xff] & 0x000000ff); rk[13] = rk[5] ^ rk[12]; rk[14] = rk[6] ^ rk[13]; rk[15] = rk[7] ^ rk[14]; rk += 8; } } return 0; } /** * Expand the cipher key into the decryption key schedule. * * @return the number of rounds for the given cipher key size. */ int rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], const char cipherKey[], size_t keyBits) { size_t Nr, i, j; uint32_t temp; /* expand the cipher key: */ Nr = rijndaelKeySetupEnc (rk, cipherKey, keyBits); /* invert the order of the round keys: */ for (i = 0, j = 4 * Nr; i < j; i += 4, j -= 4) { temp = rk[i]; rk[i] = rk[j]; rk[j] = temp; temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp; temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp; temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp; } /* apply the inverse MixColumn transform to all round keys but the first and the last: */ for (i = 1; i < Nr; i++) { rk += 4; rk[0] = Td0[Te4[(rk[0] >> 24)] & 0xff] ^ Td1[Te4[(rk[0] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[0] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[0]) & 0xff] & 0xff]; rk[1] = Td0[Te4[(rk[1] >> 24)] & 0xff] ^ Td1[Te4[(rk[1] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[1] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[1]) & 0xff] & 0xff]; rk[2] = Td0[Te4[(rk[2] >> 24)] & 0xff] ^ Td1[Te4[(rk[2] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[2] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[2]) & 0xff] & 0xff]; rk[3] = Td0[Te4[(rk[3] >> 24)] & 0xff] ^ Td1[Te4[(rk[3] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[3] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[3]) & 0xff] & 0xff]; } return Nr; } void rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, const char pt[16], char ct[16]) { uint32_t s0, s1, s2, s3, t0, t1, t2, t3; size_t r; /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32 (pt) ^ rk[0]; s1 = GETU32 (pt + 4) ^ rk[1]; s2 = GETU32 (pt + 8) ^ rk[2]; s3 = GETU32 (pt + 12) ^ rk[3]; /* * Nr - 1 full rounds: */ r = Nr >> 1; for (;;) { t0 = Te0[(s0 >> 24)] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[(s3) & 0xff] ^ rk[4]; t1 = Te0[(s1 >> 24)] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[(s0) & 0xff] ^ rk[5]; t2 = Te0[(s2 >> 24)] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[(s1) & 0xff] ^ rk[6]; t3 = Te0[(s3 >> 24)] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[(s2) & 0xff] ^ rk[7]; rk += 8; if (--r == 0) { break; } s0 = Te0[(t0 >> 24)] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[(t3) & 0xff] ^ rk[0]; s1 = Te0[(t1 >> 24)] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[(t0) & 0xff] ^ rk[1]; s2 = Te0[(t2 >> 24)] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[(t1) & 0xff] ^ rk[2]; s3 = Te0[(t3 >> 24)] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[(t2) & 0xff] ^ rk[3]; } /* * apply last round and * map cipher state to byte array block: */ s0 = (Te4[(t0 >> 24)] & 0xff000000) ^ (Te4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t3) & 0xff] & 0x000000ff) ^ rk[0]; PUTU32 (ct, s0); s1 = (Te4[(t1 >> 24)] & 0xff000000) ^ (Te4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t0) & 0xff] & 0x000000ff) ^ rk[1]; PUTU32 (ct + 4, s1); s2 = (Te4[(t2 >> 24)] & 0xff000000) ^ (Te4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t1) & 0xff] & 0x000000ff) ^ rk[2]; PUTU32 (ct + 8, s2); s3 = (Te4[(t3 >> 24)] & 0xff000000) ^ (Te4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t2) & 0xff] & 0x000000ff) ^ rk[3]; PUTU32 (ct + 12, s3); } void rijndaelDecrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, const char ct[16], char pt[16]) { uint32_t s0, s1, s2, s3, t0, t1, t2, t3; size_t r; /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32 (ct) ^ rk[0]; s1 = GETU32 (ct + 4) ^ rk[1]; s2 = GETU32 (ct + 8) ^ rk[2]; s3 = GETU32 (ct + 12) ^ rk[3]; /* * Nr - 1 full rounds: */ r = Nr >> 1; for (;;) { t0 = Td0[(s0 >> 24)] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[(s1) & 0xff] ^ rk[4]; t1 = Td0[(s1 >> 24)] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[(s2) & 0xff] ^ rk[5]; t2 = Td0[(s2 >> 24)] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[(s3) & 0xff] ^ rk[6]; t3 = Td0[(s3 >> 24)] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[(s0) & 0xff] ^ rk[7]; rk += 8; if (--r == 0) { break; } s0 = Td0[(t0 >> 24)] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[(t1) & 0xff] ^ rk[0]; s1 = Td0[(t1 >> 24)] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[(t2) & 0xff] ^ rk[1]; s2 = Td0[(t2 >> 24)] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[(t3) & 0xff] ^ rk[2]; s3 = Td0[(t3 >> 24)] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[(t0) & 0xff] ^ rk[3]; } /* * apply last round and * map cipher state to byte array block: */ s0 = (Td4[(t0 >> 24)] & 0xff000000) ^ (Td4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t1) & 0xff] & 0x000000ff) ^ rk[0]; PUTU32 (pt, s0); s1 = (Td4[(t1 >> 24)] & 0xff000000) ^ (Td4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t2) & 0xff] & 0x000000ff) ^ rk[1]; PUTU32 (pt + 4, s1); s2 = (Td4[(t2 >> 24)] & 0xff000000) ^ (Td4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t3) & 0xff] & 0x000000ff) ^ rk[2]; PUTU32 (pt + 8, s2); s3 = (Td4[(t3 >> 24)] & 0xff000000) ^ (Td4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t0) & 0xff] & 0x000000ff) ^ rk[3]; PUTU32 (pt + 12, s3); } pspp-1.0.1/gl/signal.in.h0000644000175000017500000003462313124536243012064 00000000000000/* A GNU-like . Copyright (C) 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T) /* Special invocation convention: - Inside glibc header files. - On glibc systems we have a sequence of nested includes -> -> . In this situation, the functions are not yet declared, therefore we cannot provide the C++ aliases. - On glibc systems with GCC 4.3 we have a sequence of nested includes -> -> -> . In this situation, some of the functions are not yet declared, therefore we cannot provide the C++ aliases. */ # @INCLUDE_NEXT@ @NEXT_SIGNAL_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_SIGNAL_H #define _GL_ALREADY_INCLUDING_SIGNAL_H /* Define pid_t, uid_t. Also, mingw defines sigset_t not in , but in . On Solaris 10, includes , which eventually includes us; so include now, before the second inclusion guard. */ #include /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SIGNAL_H@ #undef _GL_ALREADY_INCLUDING_SIGNAL_H #ifndef _@GUARD_PREFIX@_SIGNAL_H #define _@GUARD_PREFIX@_SIGNAL_H /* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android declare pthread_sigmask in , not in . But avoid namespace pollution on glibc systems.*/ #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \ && ((defined __APPLE__ && defined __MACH__) \ || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ || defined __sun || defined __ANDROID__) \ && ! defined __GLIBC__ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* On AIX, sig_atomic_t already includes volatile. C99 requires that 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not. Hence, redefine this to a non-volatile type as needed. */ #if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ # if !GNULIB_defined_sig_atomic_t typedef int rpl_sig_atomic_t; # undef sig_atomic_t # define sig_atomic_t rpl_sig_atomic_t # define GNULIB_defined_sig_atomic_t 1 # endif #endif /* A set or mask of signals. */ #if !@HAVE_SIGSET_T@ # if !GNULIB_defined_sigset_t typedef unsigned int sigset_t; # define GNULIB_defined_sigset_t 1 # endif #endif /* Define sighandler_t, the type of signal handlers. A GNU extension. */ #if !@HAVE_SIGHANDLER_T@ # ifdef __cplusplus extern "C" { # endif # if !GNULIB_defined_sighandler_t typedef void (*sighandler_t) (int); # define GNULIB_defined_sighandler_t 1 # endif # ifdef __cplusplus } # endif #endif #if @GNULIB_SIGNAL_H_SIGPIPE@ # ifndef SIGPIPE /* Define SIGPIPE to a value that does not overlap with other signals. */ # define SIGPIPE 13 # define GNULIB_defined_SIGPIPE 1 /* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask', 'write', 'stdio'. */ # endif #endif /* Maximum signal number + 1. */ #ifndef NSIG # if defined __TANDEM # define NSIG 32 # endif #endif #if @GNULIB_PTHREAD_SIGMASK@ # if @REPLACE_PTHREAD_SIGMASK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pthread_sigmask # define pthread_sigmask rpl_pthread_sigmask # endif _GL_FUNCDECL_RPL (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); _GL_CXXALIAS_RPL (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # else # if !@HAVE_PTHREAD_SIGMASK@ _GL_FUNCDECL_SYS (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # endif _GL_CXXALIAS_SYS (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # endif _GL_CXXALIASWARN (pthread_sigmask); #elif defined GNULIB_POSIXCHECK # undef pthread_sigmask # if HAVE_RAW_DECL_PTHREAD_SIGMASK _GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - " "use gnulib module pthread_sigmask for portability"); # endif #endif #if @GNULIB_RAISE@ # if @REPLACE_RAISE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef raise # define raise rpl_raise # endif _GL_FUNCDECL_RPL (raise, int, (int sig)); _GL_CXXALIAS_RPL (raise, int, (int sig)); # else # if !@HAVE_RAISE@ _GL_FUNCDECL_SYS (raise, int, (int sig)); # endif _GL_CXXALIAS_SYS (raise, int, (int sig)); # endif _GL_CXXALIASWARN (raise); #elif defined GNULIB_POSIXCHECK # undef raise /* Assume raise is always declared. */ _GL_WARN_ON_USE (raise, "raise can crash on native Windows - " "use gnulib module raise for portability"); #endif #if @GNULIB_SIGPROCMASK@ # if !@HAVE_POSIX_SIGNALBLOCKING@ # ifndef GNULIB_defined_signal_blocking # define GNULIB_defined_signal_blocking 1 # endif /* Maximum signal number + 1. */ # ifndef NSIG # define NSIG 32 # endif /* This code supports only 32 signals. */ # if !GNULIB_defined_verify_NSIG_constraint typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1]; # define GNULIB_defined_verify_NSIG_constraint 1 # endif # endif /* When also using extern inline, suppress the use of static inline in standard headers of problematic Apple configurations, as Libc at least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., . Perhaps Apple will fix this some day. */ #if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ && (defined __i386__ || defined __x86_64__)) # undef sigaddset # undef sigdelset # undef sigemptyset # undef sigfillset # undef sigismember #endif /* Test whether a given signal is contained in a signal set. */ # if @HAVE_POSIX_SIGNALBLOCKING@ /* This function is defined as a macro on Mac OS X. */ # if defined __cplusplus && defined GNULIB_NAMESPACE # undef sigismember # endif # else _GL_FUNCDECL_SYS (sigismember, int, (const sigset_t *set, int sig) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigismember, int, (const sigset_t *set, int sig)); _GL_CXXALIASWARN (sigismember); /* Initialize a signal set to the empty set. */ # if @HAVE_POSIX_SIGNALBLOCKING@ /* This function is defined as a macro on Mac OS X. */ # if defined __cplusplus && defined GNULIB_NAMESPACE # undef sigemptyset # endif # else _GL_FUNCDECL_SYS (sigemptyset, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigemptyset, int, (sigset_t *set)); _GL_CXXALIASWARN (sigemptyset); /* Add a signal to a signal set. */ # if @HAVE_POSIX_SIGNALBLOCKING@ /* This function is defined as a macro on Mac OS X. */ # if defined __cplusplus && defined GNULIB_NAMESPACE # undef sigaddset # endif # else _GL_FUNCDECL_SYS (sigaddset, int, (sigset_t *set, int sig) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigaddset, int, (sigset_t *set, int sig)); _GL_CXXALIASWARN (sigaddset); /* Remove a signal from a signal set. */ # if @HAVE_POSIX_SIGNALBLOCKING@ /* This function is defined as a macro on Mac OS X. */ # if defined __cplusplus && defined GNULIB_NAMESPACE # undef sigdelset # endif # else _GL_FUNCDECL_SYS (sigdelset, int, (sigset_t *set, int sig) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigdelset, int, (sigset_t *set, int sig)); _GL_CXXALIASWARN (sigdelset); /* Fill a signal set with all possible signals. */ # if @HAVE_POSIX_SIGNALBLOCKING@ /* This function is defined as a macro on Mac OS X. */ # if defined __cplusplus && defined GNULIB_NAMESPACE # undef sigfillset # endif # else _GL_FUNCDECL_SYS (sigfillset, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigfillset, int, (sigset_t *set)); _GL_CXXALIASWARN (sigfillset); /* Return the set of those blocked signals that are pending. */ # if !@HAVE_POSIX_SIGNALBLOCKING@ _GL_FUNCDECL_SYS (sigpending, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigpending, int, (sigset_t *set)); _GL_CXXALIASWARN (sigpending); /* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET. Then, if SET is not NULL, affect the current set of blocked signals by combining it with *SET as indicated in OPERATION. In this implementation, you are not allowed to change a signal handler while the signal is blocked. */ # if !@HAVE_POSIX_SIGNALBLOCKING@ # define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */ # define SIG_SETMASK 1 /* blocked_set = *set; */ # define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */ _GL_FUNCDECL_SYS (sigprocmask, int, (int operation, const sigset_t *set, sigset_t *old_set)); # endif _GL_CXXALIAS_SYS (sigprocmask, int, (int operation, const sigset_t *set, sigset_t *old_set)); _GL_CXXALIASWARN (sigprocmask); /* Install the handler FUNC for signal SIG, and return the previous handler. */ # ifdef __cplusplus extern "C" { # endif # if !GNULIB_defined_function_taking_int_returning_void_t typedef void (*_gl_function_taking_int_returning_void_t) (int); # define GNULIB_defined_function_taking_int_returning_void_t 1 # endif # ifdef __cplusplus } # endif # if !@HAVE_POSIX_SIGNALBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define signal rpl_signal # endif _GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t, (int sig, _gl_function_taking_int_returning_void_t func)); _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, (int sig, _gl_function_taking_int_returning_void_t func)); # else _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, (int sig, _gl_function_taking_int_returning_void_t func)); # endif _GL_CXXALIASWARN (signal); # if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE /* Raise signal SIGPIPE. */ _GL_EXTERN_C int _gl_raise_SIGPIPE (void); # endif #elif defined GNULIB_POSIXCHECK # undef sigaddset # if HAVE_RAW_DECL_SIGADDSET _GL_WARN_ON_USE (sigaddset, "sigaddset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigdelset # if HAVE_RAW_DECL_SIGDELSET _GL_WARN_ON_USE (sigdelset, "sigdelset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigemptyset # if HAVE_RAW_DECL_SIGEMPTYSET _GL_WARN_ON_USE (sigemptyset, "sigemptyset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigfillset # if HAVE_RAW_DECL_SIGFILLSET _GL_WARN_ON_USE (sigfillset, "sigfillset is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigismember # if HAVE_RAW_DECL_SIGISMEMBER _GL_WARN_ON_USE (sigismember, "sigismember is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigpending # if HAVE_RAW_DECL_SIGPENDING _GL_WARN_ON_USE (sigpending, "sigpending is unportable - " "use the gnulib module sigprocmask for portability"); # endif # undef sigprocmask # if HAVE_RAW_DECL_SIGPROCMASK _GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - " "use the gnulib module sigprocmask for portability"); # endif #endif /* @GNULIB_SIGPROCMASK@ */ #if @GNULIB_SIGACTION@ # if !@HAVE_SIGACTION@ # if !@HAVE_SIGINFO_T@ # if !GNULIB_defined_siginfo_types /* Present to allow compilation, but unsupported by gnulib. */ union sigval { int sival_int; void *sival_ptr; }; /* Present to allow compilation, but unsupported by gnulib. */ struct siginfo_t { int si_signo; int si_code; int si_errno; pid_t si_pid; uid_t si_uid; void *si_addr; int si_status; long si_band; union sigval si_value; }; typedef struct siginfo_t siginfo_t; # define GNULIB_defined_siginfo_types 1 # endif # endif /* !@HAVE_SIGINFO_T@ */ /* We assume that platforms which lack the sigaction() function also lack the 'struct sigaction' type, and vice versa. */ # if !GNULIB_defined_struct_sigaction struct sigaction { union { void (*_sa_handler) (int); /* Present to allow compilation, but unsupported by gnulib. POSIX says that implementations may, but not must, make sa_sigaction overlap with sa_handler, but we know of no implementation where they do not overlap. */ void (*_sa_sigaction) (int, siginfo_t *, void *); } _sa_func; sigset_t sa_mask; /* Not all POSIX flags are supported. */ int sa_flags; }; # define sa_handler _sa_func._sa_handler # define sa_sigaction _sa_func._sa_sigaction /* Unsupported flags are not present. */ # define SA_RESETHAND 1 # define SA_NODEFER 2 # define SA_RESTART 4 # define GNULIB_defined_struct_sigaction 1 # endif _GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict, struct sigaction *restrict)); # elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ # define sa_sigaction sa_handler # endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */ _GL_CXXALIAS_SYS (sigaction, int, (int, const struct sigaction *restrict, struct sigaction *restrict)); _GL_CXXALIASWARN (sigaction); #elif defined GNULIB_POSIXCHECK # undef sigaction # if HAVE_RAW_DECL_SIGACTION _GL_WARN_ON_USE (sigaction, "sigaction is unportable - " "use the gnulib module sigaction for portability"); # endif #endif /* Some systems don't have SA_NODEFER. */ #ifndef SA_NODEFER # define SA_NODEFER 0 #endif #endif /* _@GUARD_PREFIX@_SIGNAL_H */ #endif /* _@GUARD_PREFIX@_SIGNAL_H */ #endif pspp-1.0.1/gl/tmpdir.c0000644000175000017500000001017513124536243011470 00000000000000/* Copyright (C) 1999, 2001-2002, 2006, 2009-2017 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 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 . */ /* Extracted from sysdeps/posix/tempname.c. */ #include /* Specification. */ #include "tmpdir.h" #include #include #include #include #ifndef __set_errno # define __set_errno(Val) errno = (Val) #endif #include #ifndef P_tmpdir # ifdef _P_tmpdir /* native Windows */ # define P_tmpdir _P_tmpdir # else # define P_tmpdir "/tmp" # endif #endif #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include #endif #include "pathmax.h" #if _LIBC # define struct_stat64 struct stat64 #else # define struct_stat64 struct stat # define __libc_secure_getenv secure_getenv # define __xstat64(version, path, buf) stat (path, buf) #endif /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else /* Unix */ # define ISSLASH(C) ((C) == '/') #endif /* Return nonzero if DIR is an existent directory. */ static bool direxists (const char *dir) { struct_stat64 buf; return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode); } /* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is non-null and exists, uses it; otherwise uses the first of $TMPDIR, P_tmpdir, /tmp that exists. Copies into TMPL a template suitable for use with mk[s]temp. Will fail (-1) if DIR is non-null and doesn't exist, none of the searched dirs exists, or there's not enough space in TMPL. */ int path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, bool try_tmpdir) { const char *d; size_t dlen, plen; bool add_slash; if (!pfx || !pfx[0]) { pfx = "file"; plen = 4; } else { plen = strlen (pfx); if (plen > 5) plen = 5; } if (try_tmpdir) { d = __libc_secure_getenv ("TMPDIR"); if (d != NULL && direxists (d)) dir = d; else if (dir != NULL && direxists (dir)) /* nothing */ ; else dir = NULL; } if (dir == NULL) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ char dirbuf[PATH_MAX]; DWORD retval; /* Find Windows temporary file directory. We try this before P_tmpdir because Windows defines P_tmpdir to "\\" and will therefore try to put all temporary files in the root directory (unless $TMPDIR is set). */ retval = GetTempPath (PATH_MAX, dirbuf); if (retval > 0 && retval < PATH_MAX && direxists (dirbuf)) dir = dirbuf; else #endif if (direxists (P_tmpdir)) dir = P_tmpdir; else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp")) dir = "/tmp"; else { __set_errno (ENOENT); return -1; } } dlen = strlen (dir); #ifdef __VMS add_slash = 0; #else add_slash = dlen != 0 && !ISSLASH (dir[dlen - 1]); #endif /* check we have room for "${dir}/${pfx}XXXXXX\0" */ if (tmpl_len < dlen + add_slash + plen + 6 + 1) { __set_errno (EINVAL); return -1; } memcpy (tmpl, dir, dlen); sprintf (tmpl + dlen, &"/%.*sXXXXXX"[!add_slash], (int) plen, pfx); return 0; } pspp-1.0.1/gl/c-snprintf.c0000644000175000017500000000402113124536241012243 00000000000000/* Formatted output to strings in C locale. Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. Written by Simon Josefsson and Paul Eggert. Modified for C locale by Ben Pfaff. 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, 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 . */ #include /* Specification. */ #include #include #include #include #include #include #include "c-vasnprintf.h" /* Print formatted output to string STR. Similar to sprintf, but additional length SIZE limit how much is written into STR. Returns string length of formatted string (which may be larger than SIZE). STR may be NULL, in which case nothing will be written. On error, return a negative value. Formatting takes place in the C locale, that is, the decimal point used in floating-point formatting directives is always '.'. */ int c_snprintf (char *str, size_t size, const char *format, ...) { char *output; size_t len; size_t lenbuf = size; va_list args; va_start (args, format); output = c_vasnprintf (str, &lenbuf, format, args); len = lenbuf; va_end (args); if (!output) return -1; if (output != str) { if (size) { size_t pruned_len = (len < size ? len : size - 1); memcpy (str, output, pruned_len); str[pruned_len] = '\0'; } free (output); } if (INT_MAX < len) { errno = EOVERFLOW; return -1; } return len; } pspp-1.0.1/gl/xreadlink.c0000644000175000017500000000270013124536243012145 00000000000000/* xreadlink.c -- readlink wrapper to return the link name in malloc'd storage Copyright (C) 2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Jim Meyering and Bruno Haible . */ #include /* Specification. */ #include "xreadlink.h" #include #include "areadlink.h" #include "xalloc.h" /* Call readlink to get the symbolic link value of FILENAME. Return a pointer to that NUL-terminated string in malloc'd storage. If readlink fails, return NULL and set errno. If realloc fails, or if the link value is longer than SIZE_MAX :-), give a diagnostic and exit. */ char * xreadlink (char const *filename) { char *result = areadlink (filename); if (result == NULL && errno == ENOMEM) xalloc_die (); return result; } pspp-1.0.1/gl/sys_types.in.h0000644000175000017500000000544713124536243012653 00000000000000/* Provide a more complete sys/types.h. Copyright (C) 2011-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #ifndef _@GUARD_PREFIX@_SYS_TYPES_H /* The include_next requires a split double-inclusion guard. */ # define _GL_INCLUDING_SYS_TYPES_H #@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@ # undef _GL_INCLUDING_SYS_TYPES_H #ifndef _@GUARD_PREFIX@_SYS_TYPES_H #define _@GUARD_PREFIX@_SYS_TYPES_H /* Override off_t if Large File Support is requested on native Windows. */ #if @WINDOWS_64_BIT_OFF_T@ /* Same as int64_t in . */ # if defined _MSC_VER # define off_t __int64 # else # define off_t long long int # endif /* Indicator, for gnulib internal purposes. */ # define _GL_WINDOWS_64_BIT_OFF_T 1 #endif /* Override dev_t and ino_t if distinguishable inodes support is requested on native Windows. */ #if @WINDOWS_STAT_INODES@ # if @WINDOWS_STAT_INODES@ == 2 /* Experimental, not useful in Windows 10. */ /* Define dev_t to a 64-bit type. */ # if !defined GNULIB_defined_dev_t typedef unsigned long long int rpl_dev_t; # undef dev_t # define dev_t rpl_dev_t # define GNULIB_defined_dev_t 1 # endif /* Define ino_t to a 128-bit type. */ # if !defined GNULIB_defined_ino_t /* MSVC does not have a 128-bit integer type. GCC has a 128-bit integer type __int128, but only on 64-bit targets. */ typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t; # undef ino_t # define ino_t rpl_ino_t # define GNULIB_defined_ino_t 1 # endif # else /* @WINDOWS_STAT_INODES@ == 1 */ /* Define ino_t to a 64-bit type. */ # if !defined GNULIB_defined_ino_t typedef unsigned long long int rpl_ino_t; # undef ino_t # define ino_t rpl_ino_t # define GNULIB_defined_ino_t 1 # endif # endif /* Indicator, for gnulib internal purposes. */ # define _GL_WINDOWS_STAT_INODES @WINDOWS_STAT_INODES@ #endif /* MSVC 9 defines size_t in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ && ! defined __GLIBC__ # include #endif #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ pspp-1.0.1/gl/gl_linkedhash_list.c0000644000175000017500000000672413124536242014024 00000000000000/* Sequential list data type implemented by a hash table with a linked list. Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 . */ #include /* Specification. */ #include "gl_linkedhash_list.h" #include /* for SIZE_MAX */ #include #include "xsize.h" #ifndef uintptr_t # define uintptr_t unsigned long #endif #define WITH_HASHTABLE 1 /* -------------------------- gl_list_t Data Type -------------------------- */ /* Generic hash-table code. */ #include "gl_anyhash_list1.h" /* Generic linked list code. */ #include "gl_anylinked_list1.h" /* Generic hash-table code. */ #include "gl_anyhash_list2.h" /* Resize the hash table if needed, after list->count was incremented. */ static void hash_resize_after_add (gl_list_t list) { size_t count = list->count; size_t estimate = xsum (count, count / 2); /* 1.5 * count */ if (estimate > list->table_size) hash_resize (list, estimate); } /* Add a node to the hash table structure. */ static void add_to_bucket (gl_list_t list, gl_list_node_t node) { size_t bucket = node->h.hashcode % list->table_size; node->h.hash_next = list->table[bucket]; list->table[bucket] = &node->h; } /* Tell all compilers that the return value is 0. */ #define add_to_bucket(list,node) ((add_to_bucket) (list, node), 0) /* Remove a node from the hash table structure. */ static void remove_from_bucket (gl_list_t list, gl_list_node_t node) { size_t bucket = node->h.hashcode % list->table_size; gl_hash_entry_t *p; for (p = &list->table[bucket]; ; p = &(*p)->hash_next) { if (*p == &node->h) { *p = node->h.hash_next; break; } if (*p == NULL) /* node is not in the right bucket. Did the hash codes change inadvertently? */ abort (); } } /* Generic linked list code. */ #include "gl_anylinked_list2.h" const struct gl_list_implementation gl_linkedhash_list_implementation = { gl_linked_nx_create_empty, gl_linked_nx_create, gl_linked_size, gl_linked_node_value, gl_linked_node_nx_set_value, gl_linked_next_node, gl_linked_previous_node, gl_linked_get_at, gl_linked_nx_set_at, gl_linked_search_from_to, gl_linked_indexof_from_to, gl_linked_nx_add_first, gl_linked_nx_add_last, gl_linked_nx_add_before, gl_linked_nx_add_after, gl_linked_nx_add_at, gl_linked_remove_node, gl_linked_remove_at, gl_linked_remove, gl_linked_list_free, gl_linked_iterator, gl_linked_iterator_from_to, gl_linked_iterator_next, gl_linked_iterator_free, gl_linked_sortedlist_search, gl_linked_sortedlist_search_from_to, gl_linked_sortedlist_indexof, gl_linked_sortedlist_indexof_from_to, gl_linked_sortedlist_nx_add, gl_linked_sortedlist_remove }; pspp-1.0.1/gl/stdbool.in.h0000644000175000017500000001177213124536243012255 00000000000000/* Copyright (C) 2001-2003, 2006-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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, 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 . */ #ifndef _GL_STDBOOL_H #define _GL_STDBOOL_H /* ISO C 99 for platforms that lack it. */ /* Usage suggestions: Programs that use should be aware of some limitations and standards compliance issues. Standards compliance: - must be #included before 'bool', 'false', 'true' can be used. - You cannot assume that sizeof (bool) == 1. - Programs should not undefine the macros bool, true, and false, as C99 lists that as an "obsolescent feature". Limitations of this substitute, when used in a C89 environment: - must be #included before the '_Bool' type can be used. - You cannot assume that _Bool is a typedef; it might be a macro. - Bit-fields of type 'bool' are not supported. Portable code should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - In C99, casts and automatic conversions to '_Bool' or 'bool' are performed in such a way that every nonzero value gets converted to 'true', and zero gets converted to 'false'. This doesn't work with this substitute. With this substitute, only the values 0 and 1 give the expected result when converted to _Bool' or 'bool'. - C99 allows the use of (_Bool)0.0 in constant expressions, but this substitute cannot always provide this property. Also, it is suggested that programs use 'bool' rather than '_Bool'; this isn't required, but 'bool' is more common. */ /* 7.16. Boolean type and values */ /* BeOS already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ #if defined __BEOS__ && !defined __HAIKU__ # include /* defines bool but not _Bool */ # undef false # undef true #endif #ifdef __cplusplus # define _Bool bool # define bool bool #else # if defined __BEOS__ && !defined __HAIKU__ /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ # if !@HAVE__BOOL@ typedef bool _Bool; # endif # else # if !defined __GNUC__ /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html Similar bugs are likely with other compilers as well; this file wouldn't be used if was working. So we override the _Bool type. If !@HAVE__BOOL@: Need to define _Bool ourselves. As 'signed char' or as an enum type? Use of a typedef, with SunPRO C, leads to a stupid "warning: _Bool is a keyword in ISO C99". Use of an enum type, with IRIX cc, leads to a stupid "warning(1185): enumerated type mixed with another type". Even the existence of an enum type, without a typedef, "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. The only benefit of the enum, debuggability, is not important with these compilers. So use 'signed char' and no enum. */ # define _Bool signed char # else /* With this compiler, trust the _Bool type if the compiler has it. */ # if !@HAVE__BOOL@ /* For the sake of symbolic names in gdb, define true and false as enum constants, not only as macros. It is tempting to write typedef enum { false = 0, true = 1 } _Bool; so that gdb prints values of type 'bool' symbolically. But then values of type '_Bool' might promote to 'int' or 'unsigned int' (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; # endif # endif # endif # define bool _Bool #endif /* The other macros must be usable in preprocessor directives. */ #ifdef __cplusplus # define false false # define true true #else # define false 0 # define true 1 #endif #define __bool_true_false_are_defined 1 #endif /* _GL_STDBOOL_H */ pspp-1.0.1/gl/relocatable.c0000644000175000017500000004346713124536243012460 00000000000000/* Provide relocatable packages. Copyright (C) 2003-2006, 2008-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 . */ /* Tell glibc's to provide a prototype for getline(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #define _GL_USE_STDLIB_ALLOC 1 #include /* Specification. */ #include "relocatable.h" #if ENABLE_RELOCATABLE #include #include #include #include #ifdef NO_XMALLOC # define xmalloc malloc #else # include "xalloc.h" #endif #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include #endif #ifdef __EMX__ # define INCL_DOS # include # define strcmp stricmp # define strncmp strnicmp #endif #if DEPENDS_ON_LIBCHARSET # include #endif #if DEPENDS_ON_LIBICONV && HAVE_ICONV # include #endif #if DEPENDS_ON_LIBINTL && ENABLE_NLS # include #endif /* Faked cheap 'bool'. */ #undef bool #undef false #undef true #define bool int #define false 0 #define true 1 /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ /* Native Windows, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_PATH_WITH_DIR(P) \ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) # define FILE_SYSTEM_PREFIX_LEN(P) 0 #endif /* Whether to enable the more costly support for relocatable libraries. It allows libraries to be have been installed with a different original prefix than the program. But it is quite costly, especially on Cygwin platforms, see below. Therefore we enable it by default only on native Windows platforms. */ #ifndef ENABLE_COSTLY_RELOCATABLE # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define ENABLE_COSTLY_RELOCATABLE 1 # else # define ENABLE_COSTLY_RELOCATABLE 0 # endif #endif /* Original installation prefix. */ static char *orig_prefix; static size_t orig_prefix_len; /* Current installation prefix. */ static char *curr_prefix; static size_t curr_prefix_len; /* These prefixes do not end in a slash. Anything that will be concatenated to them must start with a slash. */ /* Sets the original and the current installation prefix of this module. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ static void set_this_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) { if (orig_prefix_arg != NULL && curr_prefix_arg != NULL /* Optimization: if orig_prefix and curr_prefix are equal, the relocation is a nop. */ && strcmp (orig_prefix_arg, curr_prefix_arg) != 0) { /* Duplicate the argument strings. */ char *memory; orig_prefix_len = strlen (orig_prefix_arg); curr_prefix_len = strlen (curr_prefix_arg); memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1); #ifdef NO_XMALLOC if (memory != NULL) #endif { memcpy (memory, orig_prefix_arg, orig_prefix_len + 1); orig_prefix = memory; memory += orig_prefix_len + 1; memcpy (memory, curr_prefix_arg, curr_prefix_len + 1); curr_prefix = memory; return; } } orig_prefix = NULL; curr_prefix = NULL; /* Don't worry about wasted memory here - this function is usually only called once. */ } /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ void set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg) { set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg); /* Now notify all dependent libraries. */ #if DEPENDS_ON_LIBCHARSET libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif #if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109 libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif #if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg); #endif } #if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE) /* Convenience function: Computes the current installation prefix, based on the original installation prefix, the original installation directory of a particular file, and the current pathname of this file. Returns it, freshly allocated. Returns NULL upon failure. */ #ifdef IN_LIBRARY #define compute_curr_prefix local_compute_curr_prefix static #endif char * compute_curr_prefix (const char *orig_installprefix, const char *orig_installdir, const char *curr_pathname) { char *curr_installdir; const char *rel_installdir; if (curr_pathname == NULL) return NULL; /* Determine the relative installation directory, relative to the prefix. This is simply the difference between orig_installprefix and orig_installdir. */ if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix)) != 0) /* Shouldn't happen - nothing should be installed outside $(prefix). */ return NULL; rel_installdir = orig_installdir + strlen (orig_installprefix); /* Determine the current installation directory. */ { const char *p_base = curr_pathname + FILE_SYSTEM_PREFIX_LEN (curr_pathname); const char *p = curr_pathname + strlen (curr_pathname); char *q; while (p > p_base) { p--; if (ISSLASH (*p)) break; } q = (char *) xmalloc (p - curr_pathname + 1); #ifdef NO_XMALLOC if (q == NULL) return NULL; #endif memcpy (q, curr_pathname, p - curr_pathname); q[p - curr_pathname] = '\0'; curr_installdir = q; } /* Compute the current installation prefix by removing the trailing rel_installdir from it. */ { const char *rp = rel_installdir + strlen (rel_installdir); const char *cp = curr_installdir + strlen (curr_installdir); const char *cp_base = curr_installdir + FILE_SYSTEM_PREFIX_LEN (curr_installdir); while (rp > rel_installdir && cp > cp_base) { bool same = false; const char *rpi = rp; const char *cpi = cp; while (rpi > rel_installdir && cpi > cp_base) { rpi--; cpi--; if (ISSLASH (*rpi) || ISSLASH (*cpi)) { if (ISSLASH (*rpi) && ISSLASH (*cpi)) same = true; break; } /* Do case-insensitive comparison if the file system is always or often case-insensitive. It's better to accept the comparison if the difference is only in case, rather than to fail. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS - case insignificant file system */ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi) != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi)) break; #else if (*rpi != *cpi) break; #endif } if (!same) break; /* The last pathname component was the same. opi and cpi now point to the slash before it. */ rp = rpi; cp = cpi; } if (rp > rel_installdir) { /* Unexpected: The curr_installdir does not end with rel_installdir. */ free (curr_installdir); return NULL; } { size_t curr_prefix_len = cp - curr_installdir; char *curr_prefix; curr_prefix = (char *) xmalloc (curr_prefix_len + 1); #ifdef NO_XMALLOC if (curr_prefix == NULL) { free (curr_installdir); return NULL; } #endif memcpy (curr_prefix, curr_installdir, curr_prefix_len); curr_prefix[curr_prefix_len] = '\0'; free (curr_installdir); return curr_prefix; } } } #endif /* !IN_LIBRARY || PIC */ #if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE /* Full pathname of shared library, or NULL. */ static char *shared_library_fullname; #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* Native Windows only. On Cygwin, it is better to use the Cygwin provided /proc interface, than to use native Windows API and cygwin_conv_to_posix_path, because it supports longer file names (see ). */ /* Determine the full pathname of the shared library when it is loaded. */ BOOL WINAPI DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved) { (void) reserved; if (event == DLL_PROCESS_ATTACH) { /* The DLL is being loaded into an application's address range. */ static char location[MAX_PATH]; if (!GetModuleFileName (module_handle, location, sizeof (location))) /* Shouldn't happen. */ return FALSE; if (!IS_PATH_WITH_DIR (location)) /* Shouldn't happen. */ return FALSE; shared_library_fullname = strdup (location); } return TRUE; } #elif defined __EMX__ extern int _CRT_init (void); extern void _CRT_term (void); extern void __ctordtorInit (void); extern void __ctordtorTerm (void); unsigned long _System _DLL_InitTerm (unsigned long hModule, unsigned long ulFlag) { static char location[CCHMAXPATH]; switch (ulFlag) { case 0: if (_CRT_init () == -1) return 0; __ctordtorInit(); /* See http://cyberkinetica.homeunix.net/os2tk45/cp1/1247_L2H_DosQueryModuleNameSy.html for specification of DosQueryModuleName(). */ if (DosQueryModuleName (hModule, sizeof (location), location)) return 0; _fnslashify (location); shared_library_fullname = strdup (location); break; case 1: __ctordtorTerm(); _CRT_term (); break; } return 1; } #else /* Unix */ static void find_shared_library_fullname () { #if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__ /* Linux has /proc/self/maps. glibc 2 and uClibc have the getline() function. Cygwin >= 1.5 has /proc/self/maps and the getline() function too. But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on Cygwin 1.7. */ FILE *fp; /* Open the current process' maps file. It describes one VMA per line. */ fp = fopen ("/proc/self/maps", "r"); if (fp) { unsigned long address = (unsigned long) &find_shared_library_fullname; for (;;) { unsigned long start, end; int c; if (fscanf (fp, "%lx-%lx", &start, &end) != 2) break; if (address >= start && address <= end - 1) { /* Found it. Now see if this line contains a filename. */ while (c = getc (fp), c != EOF && c != '\n' && c != '/') continue; if (c == '/') { size_t size; int len; ungetc (c, fp); shared_library_fullname = NULL; size = 0; len = getline (&shared_library_fullname, &size, fp); if (len >= 0) { /* Success: filled shared_library_fullname. */ if (len > 0 && shared_library_fullname[len - 1] == '\n') shared_library_fullname[len - 1] = '\0'; } } break; } while (c = getc (fp), c != EOF && c != '\n') continue; } fclose (fp); } #endif } #endif /* Native Windows / EMX / Unix */ /* Return the full pathname of the current shared library. Return NULL if unknown. Guaranteed to work only on Linux, EMX, Cygwin, and native Windows. */ static char * get_shared_library_fullname () { #if (!((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) \ && !defined __EMX__) static bool tried_find_shared_library_fullname; if (!tried_find_shared_library_fullname) { find_shared_library_fullname (); tried_find_shared_library_fullname = true; } #endif return shared_library_fullname; } #endif /* PIC */ /* Returns the pathname, relocated according to the current installation directory. The returned string is either PATHNAME unmodified or a freshly allocated string that you can free with free() after casting it to 'char *'. */ const char * relocate (const char *pathname) { #if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE static int initialized; /* Initialization code for a shared library. */ if (!initialized) { /* At this point, orig_prefix and curr_prefix likely have already been set through the main program's set_program_name_and_installdir function. This is sufficient in the case that the library has initially been installed in the same orig_prefix. But we can do better, to also cover the cases that 1. it has been installed in a different prefix before being moved to orig_prefix and (later) to curr_prefix, 2. unlike the program, it has not moved away from orig_prefix. */ const char *orig_installprefix = INSTALLPREFIX; const char *orig_installdir = INSTALLDIR; char *curr_prefix_better; curr_prefix_better = compute_curr_prefix (orig_installprefix, orig_installdir, get_shared_library_fullname ()); set_relocation_prefix (orig_installprefix, curr_prefix_better != NULL ? curr_prefix_better : curr_prefix); if (curr_prefix_better != NULL) free (curr_prefix_better); initialized = 1; } #endif /* Note: It is not necessary to perform case insensitive comparison here, even for DOS-like file systems, because the pathname argument was typically created from the same Makefile variable as orig_prefix came from. */ if (orig_prefix != NULL && curr_prefix != NULL && strncmp (pathname, orig_prefix, orig_prefix_len) == 0) { if (pathname[orig_prefix_len] == '\0') { /* pathname equals orig_prefix. */ char *result = (char *) xmalloc (strlen (curr_prefix) + 1); #ifdef NO_XMALLOC if (result != NULL) #endif { strcpy (result, curr_prefix); return result; } } else if (ISSLASH (pathname[orig_prefix_len])) { /* pathname starts with orig_prefix. */ const char *pathname_tail = &pathname[orig_prefix_len]; char *result = (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1); #ifdef NO_XMALLOC if (result != NULL) #endif { memcpy (result, curr_prefix, curr_prefix_len); strcpy (result + curr_prefix_len, pathname_tail); return result; } } } #ifdef __EMX__ # ifdef __KLIBC__ # undef strncmp if (strncmp (pathname, "/@unixroot", 10) == 0 && (pathname[10] == '\0' || ISSLASH (pathname[10]))) { /* kLIBC itself processes /@unixroot prefix */ return pathname; } else # endif if (ISSLASH (pathname[0])) { const char *unixroot = getenv ("UNIXROOT"); if (unixroot && HAS_DEVICE (unixroot) && unixroot[2] == '\0') { char *result = (char *) xmalloc (2 + strlen (pathname) + 1); #ifdef NO_XMALLOC if (result != NULL) #endif { memcpy (result, unixroot, 2); strcpy (result + 2, pathname); return result; } } } #endif /* Nothing to relocate. */ return pathname; } /* Returns the pathname, relocated according to the current installation directory. This function sets *ALLOCATEDP to the allocated memory, or to NULL if no memory allocation occurs. So that, after you're done with the return value, to reclaim allocated memory, you can do: free (*ALLOCATEDP). */ const char * relocate2 (const char *pathname, char **allocatedp) { const char *result = relocate (pathname); *allocatedp = (result != pathname ? (char *) result : NULL); return result; } #endif pspp-1.0.1/gl/strtod.c0000644000175000017500000002416413124536243011513 00000000000000/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include #include #include #include #include #include #include #include #include "c-ctype.h" #ifndef HAVE_LDEXP_IN_LIBC #define HAVE_LDEXP_IN_LIBC 0 #endif /* Return true if C is a space in the current locale, avoiding problems with signed char and isspace. */ static bool locale_isspace (char c) { unsigned char uc = c; return isspace (uc) != 0; } #if !HAVE_LDEXP_IN_LIBC #define ldexp dummy_ldexp /* A dummy definition that will never be invoked. */ static double ldexp (double x _GL_UNUSED, int exponent _GL_UNUSED) { abort (); return 0.0; } #endif /* Return X * BASE**EXPONENT. Return an extreme value and set errno to ERANGE if underflow or overflow occurs. */ static double scale_radix_exp (double x, int radix, long int exponent) { /* If RADIX == 10, this code is neither precise nor fast; it is merely a straightforward and relatively portable approximation. If N == 2, this code is precise on a radix-2 implementation, albeit perhaps not fast if ldexp is not in libc. */ long int e = exponent; if (HAVE_LDEXP_IN_LIBC && radix == 2) return ldexp (x, e < INT_MIN ? INT_MIN : INT_MAX < e ? INT_MAX : e); else { double r = x; if (r != 0) { if (e < 0) { while (e++ != 0) { r /= radix; if (r == 0 && x != 0) { errno = ERANGE; break; } } } else { while (e-- != 0) { if (r < -DBL_MAX / radix) { errno = ERANGE; return -HUGE_VAL; } else if (DBL_MAX / radix < r) { errno = ERANGE; return HUGE_VAL; } else r *= radix; } } } return r; } } /* Parse a number at NPTR; this is a bit like strtol (NPTR, ENDPTR) except there are no leading spaces or signs or "0x", and ENDPTR is nonnull. The number uses a base BASE (either 10 or 16) fraction, a radix RADIX (either 10 or 2) exponent, and exponent character EXPCHAR. To convert from a number of digits to a radix exponent, multiply by RADIX_MULTIPLIER (either 1 or 4). */ static double parse_number (const char *nptr, int base, int radix, int radix_multiplier, char expchar, char **endptr) { const char *s = nptr; bool got_dot = false; long int exponent = 0; double num = 0; for (;; ++s) { int digit; if (c_isdigit (*s)) digit = *s - '0'; else if (base == 16 && c_isxdigit (*s)) digit = c_tolower (*s) - ('a' - 10); else if (! got_dot && *s == '.') { /* Record that we have found the decimal point. */ got_dot = true; continue; } else /* Any other character terminates the number. */ break; /* Make sure that multiplication by base will not overflow. */ if (num <= DBL_MAX / base) num = num * base + digit; else { /* The value of the digit doesn't matter, since we have already gotten as many digits as can be represented in a 'double'. This doesn't necessarily mean the result will overflow. The exponent may reduce it to within range. We just need to record that there was another digit so that we can multiply by 10 later. */ exponent += radix_multiplier; } /* Keep track of the number of digits after the decimal point. If we just divided by base here, we might lose precision. */ if (got_dot) exponent -= radix_multiplier; } if (c_tolower (*s) == expchar && ! locale_isspace (s[1])) { /* Add any given exponent to the implicit one. */ int save = errno; char *end; long int value = strtol (s + 1, &end, 10); errno = save; if (s + 1 != end) { /* Skip past the exponent, and add in the implicit exponent, resulting in an extreme value on overflow. */ s = end; exponent = (exponent < 0 ? (value < LONG_MIN - exponent ? LONG_MIN : exponent + value) : (LONG_MAX - exponent < value ? LONG_MAX : exponent + value)); } } *endptr = (char *) s; return scale_radix_exp (num, radix, exponent); } static double underlying_strtod (const char *, char **); /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. ICC 10.0 has a bug when optimizing the expression -zero. The expression -DBL_MIN * DBL_MIN does not work when cross-compiling to PowerPC on Mac OS X 10.5. */ #if defined __hpux || defined __sgi || defined __ICC static double compute_minus_zero (void) { return -DBL_MIN * DBL_MIN; } # define minus_zero compute_minus_zero () #else double minus_zero = -0.0; #endif /* Convert NPTR to a double. If ENDPTR is not NULL, a pointer to the character after the last one used in the number is put in *ENDPTR. */ double strtod (const char *nptr, char **endptr) { bool negative = false; /* The number so far. */ double num; const char *s = nptr; const char *end; char *endbuf; int saved_errno = errno; /* Eat whitespace. */ while (locale_isspace (*s)) ++s; /* Get the sign. */ negative = *s == '-'; if (*s == '-' || *s == '+') ++s; num = underlying_strtod (s, &endbuf); end = endbuf; if (c_isdigit (s[*s == '.'])) { /* If a hex float was converted incorrectly, do it ourselves. If the string starts with "0x" but does not contain digits, consume the "0" ourselves. If a hex float is followed by a 'p' but no exponent, then adjust the end pointer. */ if (*s == '0' && c_tolower (s[1]) == 'x') { if (! c_isxdigit (s[2 + (s[2] == '.')])) { end = s + 1; /* strtod() on z/OS returns ERANGE for "0x". */ errno = saved_errno; } else if (end <= s + 2) { num = parse_number (s + 2, 16, 2, 4, 'p', &endbuf); end = endbuf; } else { const char *p = s + 2; while (p < end && c_tolower (*p) != 'p') p++; if (p < end && ! c_isdigit (p[1 + (p[1] == '-' || p[1] == '+')])) end = p; } } else { /* If "1e 1" was misparsed as 10.0 instead of 1.0, re-do the underlying strtod on a copy of the original string truncated to avoid the bug. */ const char *e = s + 1; while (e < end && c_tolower (*e) != 'e') e++; if (e < end && ! c_isdigit (e[1 + (e[1] == '-' || e[1] == '+')])) { char *dup = strdup (s); errno = saved_errno; if (!dup) { /* Not really our day, is it. Rounding errors are better than outright failure. */ num = parse_number (s, 10, 10, 1, 'e', &endbuf); } else { dup[e - s] = '\0'; num = underlying_strtod (dup, &endbuf); saved_errno = errno; free (dup); errno = saved_errno; } end = e; } } s = end; } /* Check for infinities and NaNs. */ else if (c_tolower (*s) == 'i' && c_tolower (s[1]) == 'n' && c_tolower (s[2]) == 'f') { s += 3; if (c_tolower (*s) == 'i' && c_tolower (s[1]) == 'n' && c_tolower (s[2]) == 'i' && c_tolower (s[3]) == 't' && c_tolower (s[4]) == 'y') s += 5; num = HUGE_VAL; errno = saved_errno; } else if (c_tolower (*s) == 'n' && c_tolower (s[1]) == 'a' && c_tolower (s[2]) == 'n') { s += 3; if (*s == '(') { const char *p = s + 1; while (c_isalnum (*p)) p++; if (*p == ')') s = p + 1; } /* If the underlying implementation misparsed the NaN, assume its result is incorrect, and return a NaN. Normally it's better to use the underlying implementation's result, since a nice implementation populates the bits of the NaN according to interpreting n-char-sequence as a hexadecimal number. */ if (s != end || num == num) num = NAN; errno = saved_errno; } else { /* No conversion could be performed. */ errno = EINVAL; s = nptr; } if (endptr != NULL) *endptr = (char *) s; /* Special case -0.0, since at least ICC miscompiles negation. We can't use copysign(), as that drags in -lm on some platforms. */ if (!num && negative) return minus_zero; return negative ? -num : num; } /* The underlying strtod implementation. This must be defined after strtod because it #undefs strtod. */ static double underlying_strtod (const char *nptr, char **endptr) { #undef strtod return strtod (nptr, endptr); } pspp-1.0.1/gl/isnand.c0000644000175000017500000000146713124536242011450 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible , 2008. */ #include "isnan.c" pspp-1.0.1/gl/rawmemchr.c0000644000175000017500000001220113124536243012146 00000000000000/* Searching in a string. Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include /* Find the first occurrence of C in S. */ void * rawmemchr (const void *s, int c_in) { /* On 32-bit hardware, choosing longword to be a 32-bit unsigned long instead of a 64-bit uintmax_t tends to give better performance. On 64-bit hardware, unsigned long is generally 64 bits already. Change this typedef to experiment with performance. */ typedef unsigned long int longword; const unsigned char *char_ptr; const longword *longword_ptr; longword repeated_one; longword repeated_c; unsigned char c; c = (unsigned char) c_in; /* Handle the first few bytes by reading one byte at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ for (char_ptr = (const unsigned char *) s; (size_t) char_ptr % sizeof (longword) != 0; ++char_ptr) if (*char_ptr == c) return (void *) char_ptr; longword_ptr = (const longword *) char_ptr; /* All these elucidatory comments refer to 4-byte longwords, but the theory applies equally well to any size longwords. */ /* Compute auxiliary longword values: repeated_one is a value which has a 1 in every byte. repeated_c has c in every byte. */ repeated_one = 0x01010101; repeated_c = c | (c << 8); repeated_c |= repeated_c << 16; if (0xffffffffU < (longword) -1) { repeated_one |= repeated_one << 31 << 1; repeated_c |= repeated_c << 31 << 1; if (8 < sizeof (longword)) { size_t i; for (i = 64; i < sizeof (longword) * 8; i *= 2) { repeated_one |= repeated_one << i; repeated_c |= repeated_c << i; } } } /* Instead of the traditional loop which tests each byte, we will test a longword at a time. The tricky part is testing if *any of the four* bytes in the longword in question are equal to NUL or c. We first use an xor with repeated_c. This reduces the task to testing whether *any of the four* bytes in longword1 is zero. We compute tmp = ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). That is, we perform the following operations: 1. Subtract repeated_one. 2. & ~longword1. 3. & a mask consisting of 0x80 in every byte. Consider what happens in each byte: - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, and step 3 transforms it into 0x80. A carry can also be propagated to more significant bytes. - If a byte of longword1 is nonzero, let its lowest 1 bit be at position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, the byte ends in a single bit of value 0 and k bits of value 1. After step 2, the result is just k bits of value 1: 2^k - 1. After step 3, the result is 0. And no carry is produced. So, if longword1 has only non-zero bytes, tmp is zero. Whereas if longword1 has a zero byte, call j the position of the least significant zero byte. Then the result has a zero at positions 0, ..., j-1 and a 0x80 at position j. We cannot predict the result at the more significant bytes (positions j+1..3), but it does not matter since we already have a non-zero bit at position 8*j+7. The test whether any byte in longword1 is zero is equivalent to testing whether tmp is nonzero. This test can read beyond the end of a string, depending on where C_IN is encountered. However, this is considered safe since the initialization phase ensured that the read will be aligned, therefore, the read will not cross page boundaries and will not cause a fault. */ while (1) { longword longword1 = *longword_ptr ^ repeated_c; if ((((longword1 - repeated_one) & ~longword1) & (repeated_one << 7)) != 0) break; longword_ptr++; } char_ptr = (const unsigned char *) longword_ptr; /* At this point, we know that one of the sizeof (longword) bytes starting at char_ptr is == c. On little-endian machines, we could determine the first such byte without any further memory accesses, just by looking at the tmp result from the last loop iteration. But this does not work on big-endian machines. Choose code that works in both cases. */ char_ptr = (unsigned char *) longword_ptr; while (*char_ptr != c) char_ptr++; return (void *) char_ptr; } pspp-1.0.1/gl/areadlink.h0000644000175000017500000000231113124536241012117 00000000000000/* Read symbolic links without size limitation. Copyright (C) 2001, 2003-2004, 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Jim Meyering */ #include extern char *areadlink (char const *filename); extern char *areadlink_with_size (char const *filename, size_t size_hint); #if GNULIB_AREADLINKAT extern char *areadlinkat (int fd, char const *filename); #endif #if GNULIB_AREADLINKAT_WITH_SIZE extern char *areadlinkat_with_size (int fd, char const *filename, size_t size_hint); #endif pspp-1.0.1/gl/streq.h0000644000175000017500000000763613124536243011344 00000000000000/* Optimized string comparison. Copyright (C) 2001-2002, 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible . */ #ifndef _GL_STREQ_H #define _GL_STREQ_H #include /* STREQ_OPT allows to optimize string comparison with a small literal string. STREQ_OPT (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) is semantically equivalent to strcmp (s, "EUC-KR") == 0 just faster. */ /* Help GCC to generate good code for string comparisons with immediate strings. */ #if defined (__GNUC__) && defined (__OPTIMIZE__) static inline int streq9 (const char *s1, const char *s2) { return strcmp (s1 + 9, s2 + 9) == 0; } static inline int streq8 (const char *s1, const char *s2, char s28) { if (s1[8] == s28) { if (s28 == 0) return 1; else return streq9 (s1, s2); } else return 0; } static inline int streq7 (const char *s1, const char *s2, char s27, char s28) { if (s1[7] == s27) { if (s27 == 0) return 1; else return streq8 (s1, s2, s28); } else return 0; } static inline int streq6 (const char *s1, const char *s2, char s26, char s27, char s28) { if (s1[6] == s26) { if (s26 == 0) return 1; else return streq7 (s1, s2, s27, s28); } else return 0; } static inline int streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28) { if (s1[5] == s25) { if (s25 == 0) return 1; else return streq6 (s1, s2, s26, s27, s28); } else return 0; } static inline int streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28) { if (s1[4] == s24) { if (s24 == 0) return 1; else return streq5 (s1, s2, s25, s26, s27, s28); } else return 0; } static inline int streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[3] == s23) { if (s23 == 0) return 1; else return streq4 (s1, s2, s24, s25, s26, s27, s28); } else return 0; } static inline int streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[2] == s22) { if (s22 == 0) return 1; else return streq3 (s1, s2, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[1] == s21) { if (s21 == 0) return 1; else return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[0] == s20) { if (s20 == 0) return 1; else return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28); } else return 0; } #define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) #else #define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ (strcmp (s1, s2) == 0) #endif #endif /* _GL_STREQ_H */ pspp-1.0.1/gl/itold.c0000644000175000017500000000201013124536242011270 00000000000000/* Replacement for 'int' to 'long double' conversion routine. Copyright (C) 2011-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2011. 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 . */ #include /* Specification. */ #include void _Qp_itoq (long double *result, int a) { /* Convert from 'int' to 'double', then from 'double' to 'long double'. */ *result = (double) a; } pspp-1.0.1/gl/fseterr.h0000644000175000017500000000235213124536242011645 00000000000000/* Set the error indicator of a stream. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _FSETERR_H #define _FSETERR_H #include /* Set the error indicator of the stream FP. The "error indicator" is set when an I/O operation on the stream fails, and is cleared (together with the "end-of-file" indicator) by clearerr (FP). */ #if HAVE___FSETERR /* musl libc */ # include # define fseterr(fp) __fseterr (fp) #else # ifdef __cplusplus extern "C" { # endif extern void fseterr (FILE *fp); # ifdef __cplusplus } # endif #endif #endif /* _FSETERR_H */ pspp-1.0.1/gl/mktime.c0000644000175000017500000005337413124536242011466 00000000000000/* Convert a 'struct tm' to a time_t value. Copyright (C) 1993-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Eggert . The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ /* Define this to 1 to have a standalone program to test this implementation of mktime. */ #ifndef DEBUG_MKTIME # define DEBUG_MKTIME 0 #endif /* The following macros influence what gets defined when this file is compiled: Macro/expression Which gnulib module This compilation unit should define NEED_MKTIME_WORKING mktime rpl_mktime || NEED_MKTIME_WINDOWS NEED_MKTIME_INTERNAL mktime-internal mktime_internal DEBUG_MKTIME (defined manually) my_mktime, main */ #if !defined _LIBC && !DEBUG_MKTIME # include #endif /* Assume that leap seconds are possible, unless told otherwise. If the host has a 'zic' command with a '-L leapsecondfilename' option, then it supports leap seconds; otherwise it probably doesn't. */ #ifndef LEAP_SECONDS_POSSIBLE # define LEAP_SECONDS_POSSIBLE 1 #endif #include #include #include #include #include #if DEBUG_MKTIME # include # include # include /* Make it work even if the system's libc has its own mktime routine. */ # undef mktime # define mktime my_mktime #endif #if NEED_MKTIME_WINDOWS /* on native Windows */ # include # include #endif #if NEED_MKTIME_WORKING || NEED_MKTIME_INTERNAL || DEBUG_MKTIME /* A signed type that can represent an integer number of years multiplied by three times the number of seconds in a year. It is needed when converting a tm_year value times the number of seconds in a year. The factor of three comes because these products need to be subtracted from each other, and sometimes with an offset added to them, without worrying about overflow. Much of the code uses long_int to represent time_t values, to lessen the hassle of dealing with platforms where time_t is unsigned, and because long_int should suffice to represent all time_t values that mktime can generate even on platforms where time_t is excessively wide. */ #if INT_MAX <= LONG_MAX / 3 / 366 / 24 / 60 / 60 typedef long int long_int; #else typedef long long int long_int; #endif verify (INT_MAX <= TYPE_MAXIMUM (long_int) / 3 / 366 / 24 / 60 / 60); /* Shift A right by B bits portably, by dividing A by 2**B and truncating towards minus infinity. B should be in the range 0 <= B <= LONG_INT_BITS - 2, where LONG_INT_BITS is the number of useful bits in a long_int. LONG_INT_BITS is at least 32. ISO C99 says that A >> B is implementation-defined if A < 0. Some implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift right in the usual way when A < 0, so SHR falls back on division if ordinary A >> B doesn't seem to be the usual signed shift. */ static long_int shr (long_int a, int b) { long_int one = 1; return (-one >> 1 == -1 ? a >> b : a / (one << b) - (a % (one << b) < 0)); } /* Bounds for the intersection of time_t and long_int. */ static long_int const mktime_min = ((TYPE_SIGNED (time_t) && TYPE_MINIMUM (time_t) < TYPE_MINIMUM (long_int)) ? TYPE_MINIMUM (long_int) : TYPE_MINIMUM (time_t)); static long_int const mktime_max = (TYPE_MAXIMUM (long_int) < TYPE_MAXIMUM (time_t) ? TYPE_MAXIMUM (long_int) : TYPE_MAXIMUM (time_t)); verify (TYPE_IS_INTEGER (time_t)); #define EPOCH_YEAR 1970 #define TM_YEAR_BASE 1900 verify (TM_YEAR_BASE % 100 == 0); /* Is YEAR + TM_YEAR_BASE a leap year? */ static bool leapyear (long_int year) { /* Don't add YEAR to TM_YEAR_BASE, as that might overflow. Also, work even if YEAR is negative. */ return ((year & 3) == 0 && (year % 100 != 0 || ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3))); } /* How many days come before each month (0-12). */ #ifndef _LIBC static #endif const unsigned short int __mon_yday[2][13] = { /* Normal years. */ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, /* Leap years. */ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } }; #ifdef _LIBC typedef time_t mktime_offset_t; #else /* Portable standalone applications should supply a that declares a POSIX-compliant localtime_r, for the benefit of older implementations that lack localtime_r or have a nonstandard one. See the gnulib time_r module for one way to implement this. */ # undef __localtime_r # define __localtime_r localtime_r # define __mktime_internal mktime_internal # include "mktime-internal.h" #endif /* Do the values A and B differ according to the rules for tm_isdst? A and B differ if one is zero and the other positive. */ static bool isdst_differ (int a, int b) { return (!a != !b) && (0 <= a) && (0 <= b); } /* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) - (YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks were not adjusted between the timestamps. The YEAR values uses the same numbering as TP->tm_year. Values need not be in the usual range. However, YEAR1 must not overflow when multiplied by three times the number of seconds in a year, and likewise for YDAY1 and three times the number of seconds in a day. */ static long_int ydhms_diff (long_int year1, long_int yday1, int hour1, int min1, int sec1, int year0, int yday0, int hour0, int min0, int sec0) { verify (-1 / 2 == 0); /* Compute intervening leap days correctly even if year is negative. Take care to avoid integer overflow here. */ int a4 = shr (year1, 2) + shr (TM_YEAR_BASE, 2) - ! (year1 & 3); int b4 = shr (year0, 2) + shr (TM_YEAR_BASE, 2) - ! (year0 & 3); int a100 = a4 / 25 - (a4 % 25 < 0); int b100 = b4 / 25 - (b4 % 25 < 0); int a400 = shr (a100, 2); int b400 = shr (b100, 2); int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); /* Compute the desired time without overflowing. */ long_int years = year1 - year0; long_int days = 365 * years + yday1 - yday0 + intervening_leap_days; long_int hours = 24 * days + hour1 - hour0; long_int minutes = 60 * hours + min1 - min0; long_int seconds = 60 * minutes + sec1 - sec0; return seconds; } /* Return the average of A and B, even if A + B would overflow. Round toward positive infinity. */ static long_int long_int_avg (long_int a, long_int b) { return shr (a, 1) + shr (b, 1) + ((a | b) & 1); } /* Return a time_t value corresponding to (YEAR-YDAY HOUR:MIN:SEC), assuming that T corresponds to *TP and that no clock adjustments occurred between *TP and the desired time. Although T and the returned value are of type long_int, they represent time_t values and must be in time_t range. If TP is null, return a value not equal to T; this avoids false matches. YEAR and YDAY must not be so large that multiplying them by three times the number of seconds in a year (or day, respectively) would overflow long_int. If the returned value would be out of range, yield the minimal or maximal in-range value, except do not yield a value equal to T. */ static long_int guess_time_tm (long_int year, long_int yday, int hour, int min, int sec, long_int t, const struct tm *tp) { if (tp) { long_int result; long_int d = ydhms_diff (year, yday, hour, min, sec, tp->tm_year, tp->tm_yday, tp->tm_hour, tp->tm_min, tp->tm_sec); if (! INT_ADD_WRAPV (t, d, &result)) return result; } /* Overflow occurred one way or another. Return the nearest result that is actually in range, except don't report a zero difference if the actual difference is nonzero, as that would cause a false match; and don't oscillate between two values, as that would confuse the spring-forward gap detector. */ return (t < long_int_avg (mktime_min, mktime_max) ? (t <= mktime_min + 1 ? t + 1 : mktime_min) : (mktime_max - 1 <= t ? t - 1 : mktime_max)); } /* Use CONVERT to convert T to a struct tm value in *TM. T must be in range for time_t. Return TM if successful, NULL if T is out of range for CONVERT. */ static struct tm * convert_time (struct tm *(*convert) (const time_t *, struct tm *), long_int t, struct tm *tm) { time_t x = t; return convert (&x, tm); } /* Use CONVERT to convert *T to a broken down time in *TP. If *T is out of range for conversion, adjust it so that it is the nearest in-range value and then convert that. A value is in range if it fits in both time_t and long_int. */ static struct tm * ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), long_int *t, struct tm *tp) { struct tm *r; if (*t < mktime_min) *t = mktime_min; else if (mktime_max < *t) *t = mktime_max; r = convert_time (convert, *t, tp); if (!r && *t) { long_int bad = *t; long_int ok = 0; /* BAD is a known unconvertible value, and OK is a known good one. Use binary search to narrow the range between BAD and OK until they differ by 1. */ while (true) { long_int mid = long_int_avg (ok, bad); if (mid != ok && mid != bad) break; r = convert_time (convert, mid, tp); if (r) ok = mid; else bad = mid; } if (!r && ok) { /* The last conversion attempt failed; revert to the most recent successful attempt. */ r = convert_time (convert, ok, tp); } } return r; } /* Convert *TP to a time_t value, inverting the monotonic and mostly-unit-linear conversion function CONVERT. Use *OFFSET to keep track of a guess at the offset of the result, compared to what the result would be for UTC without leap seconds. If *OFFSET's guess is correct, only one CONVERT call is needed. This function is external because it is used also by timegm.c. */ time_t __mktime_internal (struct tm *tp, struct tm *(*convert) (const time_t *, struct tm *), mktime_offset_t *offset) { long_int t, gt, t0, t1, t2, dt; struct tm tm; /* The maximum number of probes (calls to CONVERT) should be enough to handle any combinations of time zone rule changes, solar time, leap seconds, and oscillations around a spring-forward gap. POSIX.1 prohibits leap seconds, but some hosts have them anyway. */ int remaining_probes = 6; /* Time requested. Copy it in case CONVERT modifies *TP; this can occur if TP is localtime's returned value and CONVERT is localtime. */ int sec = tp->tm_sec; int min = tp->tm_min; int hour = tp->tm_hour; int mday = tp->tm_mday; int mon = tp->tm_mon; int year_requested = tp->tm_year; int isdst = tp->tm_isdst; /* 1 if the previous probe was DST. */ int dst2; /* Ensure that mon is in range, and set year accordingly. */ int mon_remainder = mon % 12; int negative_mon_remainder = mon_remainder < 0; int mon_years = mon / 12 - negative_mon_remainder; long_int lyear_requested = year_requested; long_int year = lyear_requested + mon_years; /* The other values need not be in range: the remaining code handles overflows correctly. */ /* Calculate day of year from year, month, and day of month. The result need not be in range. */ int mon_yday = ((__mon_yday[leapyear (year)] [mon_remainder + 12 * negative_mon_remainder]) - 1); long_int lmday = mday; long_int yday = mon_yday + lmday; int negative_offset_guess; int sec_requested = sec; if (LEAP_SECONDS_POSSIBLE) { /* Handle out-of-range seconds specially, since ydhms_tm_diff assumes every minute has 60 seconds. */ if (sec < 0) sec = 0; if (59 < sec) sec = 59; } /* Invert CONVERT by probing. First assume the same offset as last time. */ INT_SUBTRACT_WRAPV (0, *offset, &negative_offset_guess); t0 = ydhms_diff (year, yday, hour, min, sec, EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, negative_offset_guess); /* Repeatedly use the error to improve the guess. */ for (t = t1 = t2 = t0, dst2 = 0; (gt = guess_time_tm (year, yday, hour, min, sec, t, ranged_convert (convert, &t, &tm)), t != gt); t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0) if (t == t1 && t != t2 && (tm.tm_isdst < 0 || (isdst < 0 ? dst2 <= (tm.tm_isdst != 0) : (isdst != 0) != (tm.tm_isdst != 0)))) /* We can't possibly find a match, as we are oscillating between two values. The requested time probably falls within a spring-forward gap of size GT - T. Follow the common practice in this case, which is to return a time that is GT - T away from the requested time, preferring a time whose tm_isdst differs from the requested value. (If no tm_isdst was requested and only one of the two values has a nonzero tm_isdst, prefer that value.) In practice, this is more useful than returning -1. */ goto offset_found; else if (--remaining_probes == 0) return -1; /* We have a match. Check whether tm.tm_isdst has the requested value, if any. */ if (isdst_differ (isdst, tm.tm_isdst)) { /* tm.tm_isdst has the wrong value. Look for a neighboring time with the right value, and use its UTC offset. Heuristic: probe the adjacent timestamps in both directions, looking for the desired isdst. This should work for all real time zone histories in the tz database. */ /* Distance between probes when looking for a DST boundary. In tzdata2003a, the shortest period of DST is 601200 seconds (e.g., America/Recife starting 2000-10-08 01:00), and the shortest period of non-DST surrounded by DST is 694800 seconds (Africa/Tunis starting 1943-04-17 01:00). Use the minimum of these two values, so we don't miss these short periods when probing. */ int stride = 601200; /* The longest period of DST in tzdata2003a is 536454000 seconds (e.g., America/Jujuy starting 1946-10-01 01:00). The longest period of non-DST is much longer, but it makes no real sense to search for more than a year of non-DST, so use the DST max. */ int duration_max = 536454000; /* Search in both directions, so the maximum distance is half the duration; add the stride to avoid off-by-1 problems. */ int delta_bound = duration_max / 2 + stride; int delta, direction; for (delta = stride; delta < delta_bound; delta += stride) for (direction = -1; direction <= 1; direction += 2) { long_int ot; if (! INT_ADD_WRAPV (t, delta * direction, &ot)) { struct tm otm; ranged_convert (convert, &ot, &otm); if (! isdst_differ (isdst, otm.tm_isdst)) { /* We found the desired tm_isdst. Extrapolate back to the desired time. */ t = guess_time_tm (year, yday, hour, min, sec, ot, &otm); ranged_convert (convert, &t, &tm); goto offset_found; } } } } offset_found: /* Set *OFFSET to the low-order bits of T - T0 - NEGATIVE_OFFSET_GUESS. This is just a heuristic to speed up the next mktime call, and correctness is unaffected if integer overflow occurs here. */ INT_SUBTRACT_WRAPV (t, t0, &dt); INT_SUBTRACT_WRAPV (dt, negative_offset_guess, offset); if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec) { /* Adjust time to reflect the tm_sec requested, not the normalized value. Also, repair any damage from a false match due to a leap second. */ long_int sec_adjustment = sec == 0 && tm.tm_sec == 60; sec_adjustment -= sec; sec_adjustment += sec_requested; if (INT_ADD_WRAPV (t, sec_adjustment, &t) || ! (mktime_min <= t && t <= mktime_max) || ! convert_time (convert, t, &tm)) return -1; } *tp = tm; return t; } #endif /* NEED_MKTIME_WORKING || NEED_MKTIME_INTERNAL || DEBUG_MKTIME */ #if NEED_MKTIME_WORKING || NEED_MKTIME_WINDOWS || DEBUG_MKTIME # if NEED_MKTIME_WORKING || DEBUG_MKTIME static mktime_offset_t localtime_offset; # endif /* Convert *TP to a time_t value. */ time_t mktime (struct tm *tp) { # if NEED_MKTIME_WINDOWS /* Rectify the value of the environment variable TZ. There are four possible kinds of such values: - Traditional US time zone names, e.g. "PST8PDT". Syntax: see - Time zone names based on geography, that contain one or more slashes, e.g. "Europe/Moscow". - Time zone names based on geography, without slashes, e.g. "Singapore". - Time zone names that contain explicit DST rules. Syntax: see The Microsoft CRT understands only the first kind. It produces incorrect results if the value of TZ is of the other kinds. But in a Cygwin environment, /etc/profile.d/tzset.sh sets TZ to a value of the second kind for most geographies, or of the first kind in a few other geographies. If it is of the second kind, neutralize it. For the Microsoft CRT, an absent or empty TZ means the time zone that the user has set in the Windows Control Panel. If the value of TZ is of the third or fourth kind -- Cygwin programs understand these syntaxes as well --, it does not matter whether we neutralize it or not, since these values occur only when a Cygwin user has set TZ explicitly; this case is 1. rare and 2. under the user's responsibility. */ const char *tz = getenv ("TZ"); if (tz != NULL && strchr (tz, '/') != NULL) _putenv ("TZ="); # endif # if NEED_MKTIME_WORKING || DEBUG_MKTIME # ifdef _LIBC /* POSIX.1 8.1.1 requires that whenever mktime() is called, the time zone names contained in the external variable 'tzname' shall be set as if the tzset() function had been called. */ __tzset (); # elif HAVE_TZSET tzset (); # endif return __mktime_internal (tp, __localtime_r, &localtime_offset); # else # undef mktime return mktime (tp); # endif } #endif /* NEED_MKTIME_WORKING || NEED_MKTIME_WINDOWS || DEBUG_MKTIME */ #ifdef weak_alias weak_alias (mktime, timelocal) #endif #ifdef _LIBC libc_hidden_def (mktime) libc_hidden_weak (timelocal) #endif #if DEBUG_MKTIME static int not_equal_tm (const struct tm *a, const struct tm *b) { return ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | (a->tm_yday ^ b->tm_yday) | isdst_differ (a->tm_isdst, b->tm_isdst)); } static void print_tm (const struct tm *tp) { if (tp) printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d", tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec, tp->tm_yday, tp->tm_wday, tp->tm_isdst); else printf ("0"); } static int check_result (time_t tk, struct tm tmk, time_t tl, const struct tm *lt) { if (tk != tl || !lt || not_equal_tm (&tmk, lt)) { printf ("mktime ("); print_tm (lt); printf (")\nyields ("); print_tm (&tmk); printf (") == %ld, should be %ld\n", (long int) tk, (long int) tl); return 1; } return 0; } int main (int argc, char **argv) { int status = 0; struct tm tm, tmk, tml; struct tm *lt; time_t tk, tl, tl1; char trailer; /* Sanity check, plus call tzset. */ tl = 0; if (! localtime (&tl)) { printf ("localtime (0) fails\n"); status = 1; } if ((argc == 3 || argc == 4) && (sscanf (argv[1], "%d-%d-%d%c", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer) == 3) && (sscanf (argv[2], "%d:%d:%d%c", &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer) == 3)) { tm.tm_year -= TM_YEAR_BASE; tm.tm_mon--; tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); tmk = tm; tl = mktime (&tmk); lt = localtime_r (&tl, &tml); printf ("mktime returns %ld == ", (long int) tl); print_tm (&tmk); printf ("\n"); status = check_result (tl, tmk, tl, lt); } else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0)) { time_t from = atol (argv[1]); time_t by = atol (argv[2]); time_t to = atol (argv[3]); if (argc == 4) for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) { lt = localtime_r (&tl, &tml); if (lt) { tmk = tml; tk = mktime (&tmk); status |= check_result (tk, tmk, tl, &tml); } else { printf ("localtime_r (%ld) yields 0\n", (long int) tl); status = 1; } tl1 = tl + by; if ((tl1 < tl) != (by < 0)) break; } else for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) { /* Null benchmark. */ lt = localtime_r (&tl, &tml); if (lt) { tmk = tml; tk = tl; status |= check_result (tk, tmk, tl, &tml); } else { printf ("localtime_r (%ld) yields 0\n", (long int) tl); status = 1; } tl1 = tl + by; if ((tl1 < tl) != (by < 0)) break; } } else printf ("Usage:\ \t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\ \t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\ \t%s FROM BY TO - # Do not test those values (for benchmark).\n", argv[0], argv[0], argv[0]); return status; } #endif /* DEBUG_MKTIME */ /* Local Variables: compile-command: "gcc -DDEBUG_MKTIME -I. -Wall -W -O2 -g mktime.c -o mktime" End: */ pspp-1.0.1/gl/exitfail.h0000644000175000017500000000140213124536241011772 00000000000000/* Failure exit status Copyright (C) 2002, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ extern int volatile exit_failure; pspp-1.0.1/gl/gettext.h0000644000175000017500000002407713124536242011667 00000000000000/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option or through "#define ENABLE NLS 0" before including this file. */ #if defined ENABLE_NLS && ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # undef gettext # define gettext(Msgid) ((const char *) (Msgid)) # undef dgettext # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # undef dcgettext # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) # undef textdomain # define textdomain(Domainname) ((const char *) (Domainname)) # undef bindtextdomain # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # undef bind_textdomain_codeset # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* Prefer gnulib's setlocale override over libintl's setlocale override. */ #ifdef GNULIB_defined_setlocale # undef setlocale # define setlocale rpl_setlocale #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ /* || __STDC_VERSION__ == 199901L || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ ) # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 #else # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 #endif #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { int found_translation; memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); found_translation = (translation != msg_ctxt_id); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (found_translation) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { int found_translation; memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); found_translation = !(translation == msg_ctxt_id || translation == msgid_plural); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (found_translation) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ pspp-1.0.1/gl/mbsinit.c0000644000175000017500000000453613124536242011641 00000000000000/* Test for initial conversion state. Copyright (C) 2008-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 . */ #include /* Specification. */ #include #include "verify.h" #if GNULIB_defined_mbstate_t /* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() and wcrtomb(), wcsrtombs(). We assume that - sizeof (mbstate_t) >= 4, - only stateless encodings are supported (such as UTF-8 and EUC-JP, but not ISO-2022 variants), - for each encoding, the number of bytes for a wide character is <= 4. (This maximum is attained for UTF-8, GB18030, EUC-TW.) We define the meaning of mbstate_t as follows: - In mb -> wc direction, mbstate_t's first byte contains the number of buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. See mbrtowc.c. - In wc -> mb direction, mbstate_t contains no information. In other words, it is always in the initial state. */ verify (sizeof (mbstate_t) >= 4); int mbsinit (const mbstate_t *ps) { const char *pstate = (const char *)ps; return pstate == NULL || pstate[0] == 0; } #else int mbsinit (const mbstate_t *ps) { # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* Native Windows. */ # ifdef __MINGW32__ /* On mingw, 'mbstate_t' is defined as 'int'. */ return ps == NULL || *ps == 0; # else /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter. */ return ps == NULL || *(const unsigned int *)ps == 0; # endif # else /* Minix, HP-UX 11.00, Solaris 2.6, Interix, ... */ /* Maybe this definition works, maybe not... */ return ps == NULL || *(const char *)ps == 0; # endif } #endif pspp-1.0.1/gl/termios.in.h0000644000175000017500000000436513124536243012271 00000000000000/* Substitute for and wrapper around . Copyright (C) 2010-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _@GUARD_PREFIX@_TERMIOS_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* On HP-UX 11.00, some of the function declarations in , included by , are not protected by extern "C". Enforce "C" linkage for these functions nevertheless. */ #if defined __hpux && defined __cplusplus # include # include extern "C" { # include } #endif /* The include_next requires a split double-inclusion guard. */ #if @HAVE_TERMIOS_H@ # @INCLUDE_NEXT@ @NEXT_TERMIOS_H@ #endif #ifndef _@GUARD_PREFIX@_TERMIOS_H #define _@GUARD_PREFIX@_TERMIOS_H /* Get pid_t. */ #include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ #if @GNULIB_TCGETSID@ /* Return the session ID of the controlling terminal of the current process. The argument is a descriptor if this controlling terminal. Return -1, with errno set, upon failure. errno = ENOSYS means that the function is unsupported. */ # if !@HAVE_DECL_TCGETSID@ _GL_FUNCDECL_SYS (tcgetsid, pid_t, (int fd)); # endif _GL_CXXALIAS_SYS (tcgetsid, pid_t, (int fd)); _GL_CXXALIASWARN (tcgetsid); #elif defined GNULIB_POSIXCHECK # undef tcgetsid # if HAVE_RAW_DECL_TCGETSID _GL_WARN_ON_USE (tcgetsid, "tcgetsid is not portable - " "use gnulib module tcgetsid for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_TERMIOS_H */ #endif /* _@GUARD_PREFIX@_TERMIOS_H */ pspp-1.0.1/gl/xstrndup.h0000644000175000017500000000177413124536243012072 00000000000000/* Duplicate a bounded initial segment of a string, with out-of-memory checking. Copyright (C) 2003, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Return a newly allocated copy of at most N bytes of STRING. In other words, return a copy of the initial segment of length N of STRING. */ extern char *xstrndup (const char *string, size_t n); pspp-1.0.1/gl/stddef.in.h0000644000175000017500000000726213124536243012057 00000000000000/* A substitute for POSIX 2008 , for platforms that have issues. Copyright (C) 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Eric Blake. */ /* * POSIX 2008 for platforms that have issues. * */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_wchar_t || defined __need_size_t \ || defined __need_ptrdiff_t || defined __need_NULL \ || defined __need_wint_t /* Special invocation convention inside gcc header files. In particular, gcc provides a version of that blindly redefines NULL even when __need_wint_t was defined, even though wint_t is not normally provided by . Hence, we must remember if special invocation has ever been used to obtain wint_t, in which case we need to clean up NULL yet again. */ # if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) # ifdef __need_wint_t # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # endif #else /* Normal invocation convention. */ # ifndef _@GUARD_PREFIX@_STDDEF_H /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ # if (@REPLACE_NULL@ \ && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T)) # undef NULL # ifdef __cplusplus /* ISO C++ says that the macro NULL must expand to an integer constant expression, hence '((void *) 0)' is not allowed in C++. */ # if __GNUG__ >= 3 /* GNU C++ has a __null macro that behaves like an integer ('int' or 'long') but has the same size as a pointer. Use that, to avoid warnings. */ # define NULL __null # else # define NULL 0L # endif # else # define NULL ((void *) 0) # endif # endif # ifndef _@GUARD_PREFIX@_STDDEF_H # define _@GUARD_PREFIX@_STDDEF_H /* Some platforms lack wchar_t. */ #if !@HAVE_WCHAR_T@ # define wchar_t int #endif /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is a hack in case the configure-time test was done with g++ even though we are currently compiling with gcc. */ #if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) /* On the x86, the maximum storage alignment of double, long, etc. is 4, but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, and the C11 standard allows this. Work around this problem by using __alignof__ (which returns 8 for double) rather than _Alignof (which returns 4), and align each union member accordingly. */ # ifdef __GNUC__ # define _GL_STDDEF_ALIGNAS(type) \ __attribute__ ((__aligned__ (__alignof__ (type)))) # else # define _GL_STDDEF_ALIGNAS(type) /* */ # endif typedef union { char *__p _GL_STDDEF_ALIGNAS (char *); double __d _GL_STDDEF_ALIGNAS (double); long double __ld _GL_STDDEF_ALIGNAS (long double); long int __i _GL_STDDEF_ALIGNAS (long int); } max_align_t; #endif # endif /* _@GUARD_PREFIX@_STDDEF_H */ # endif /* _@GUARD_PREFIX@_STDDEF_H */ #endif /* __need_XXX */ pspp-1.0.1/gl/mbtowc-impl.h0000644000175000017500000000262613124536242012431 00000000000000/* Convert multibyte character to wide character. Copyright (C) 2011-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2011. 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 . */ /* We don't need a static internal state, because the encoding is not state dependent, and when mbrtowc returns (size_t)(-2). we throw the result away. */ int mbtowc (wchar_t *pwc, const char *s, size_t n) { if (s == NULL) return 0; else { mbstate_t state; wchar_t wc; size_t result; memset (&state, 0, sizeof (mbstate_t)); result = mbrtowc (&wc, s, n, &state); if (result == (size_t)-1 || result == (size_t)-2) { errno = EILSEQ; return -1; } if (pwc != NULL) *pwc = wc; return (wc == 0 ? 0 : result); } } pspp-1.0.1/gl/gl_anylinked_list2.h0000644000175000017500000007557013124536242013764 00000000000000/* Sequential list data type implemented by a linked list. Copyright (C) 2006-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 . */ /* Common code of gl_linked_list.c and gl_linkedhash_list.c. */ /* If the symbol SIGNAL_SAFE_LIST is defined, the code is compiled in such a way that a gl_list_t data structure may be used from within a signal handler. The operations allowed in the signal handler are: gl_list_iterator, gl_list_iterator_next, gl_list_iterator_free. The list and node fields that are therefore accessed from the signal handler are: list->root, node->next, node->value. We are careful to make modifications to these fields only in an order that maintains the consistency of the list data structure at any moment, and we use 'volatile' assignments to prevent the compiler from reordering such assignments. */ #ifdef SIGNAL_SAFE_LIST # define ASYNCSAFE(type) *(type volatile *)& #else # define ASYNCSAFE(type) #endif /* -------------------------- gl_list_t Data Type -------------------------- */ static gl_list_t gl_linked_nx_create_empty (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates) { struct gl_list_impl *list = (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl)); if (list == NULL) return NULL; list->base.vtable = implementation; list->base.equals_fn = equals_fn; list->base.hashcode_fn = hashcode_fn; list->base.dispose_fn = dispose_fn; list->base.allow_duplicates = allow_duplicates; #if WITH_HASHTABLE list->table_size = 11; list->table = (gl_hash_entry_t *) calloc (list->table_size, sizeof (gl_hash_entry_t)); if (list->table == NULL) goto fail; #endif list->root.next = &list->root; list->root.prev = &list->root; list->count = 0; return list; #if WITH_HASHTABLE fail: free (list); return NULL; #endif } static gl_list_t gl_linked_nx_create (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates, size_t count, const void **contents) { struct gl_list_impl *list = (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl)); gl_list_node_t tail; if (list == NULL) return NULL; list->base.vtable = implementation; list->base.equals_fn = equals_fn; list->base.hashcode_fn = hashcode_fn; list->base.dispose_fn = dispose_fn; list->base.allow_duplicates = allow_duplicates; #if WITH_HASHTABLE { size_t estimate = xsum (count, count / 2); /* 1.5 * count */ if (estimate < 10) estimate = 10; list->table_size = next_prime (estimate); if (size_overflow_p (xtimes (list->table_size, sizeof (gl_hash_entry_t)))) goto fail1; list->table = (gl_hash_entry_t *) calloc (list->table_size, sizeof (gl_hash_entry_t)); if (list->table == NULL) goto fail1; } #endif list->count = count; tail = &list->root; for (; count > 0; contents++, count--) { gl_list_node_t node = (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl)); if (node == NULL) goto fail2; node->value = *contents; #if WITH_HASHTABLE node->h.hashcode = (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (node->value) : (size_t)(uintptr_t) node->value); /* Add node to the hash table. */ if (add_to_bucket (list, node) < 0) { free (node); goto fail2; } #endif /* Add node to the list. */ node->prev = tail; tail->next = node; tail = node; } tail->next = &list->root; list->root.prev = tail; return list; fail2: { gl_list_node_t node; for (node = tail; node != &list->root; ) { gl_list_node_t prev = node->prev; free (node); node = prev; } } #if WITH_HASHTABLE free (list->table); fail1: #endif free (list); return NULL; } static size_t _GL_ATTRIBUTE_PURE gl_linked_size (gl_list_t list) { return list->count; } static const void * _GL_ATTRIBUTE_PURE gl_linked_node_value (gl_list_t list, gl_list_node_t node) { return node->value; } static int gl_linked_node_nx_set_value (gl_list_t list, gl_list_node_t node, const void *elt) { #if WITH_HASHTABLE if (elt != node->value) { size_t new_hashcode = (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (elt) : (size_t)(uintptr_t) elt); if (new_hashcode != node->h.hashcode) { remove_from_bucket (list, node); node->value = elt; node->h.hashcode = new_hashcode; if (add_to_bucket (list, node) < 0) { /* Out of memory. We removed node from a bucket but cannot add it to another bucket. In order to avoid inconsistencies, we must remove node entirely from the list. */ gl_list_node_t before_removed = node->prev; gl_list_node_t after_removed = node->next; ASYNCSAFE(gl_list_node_t) before_removed->next = after_removed; after_removed->prev = before_removed; list->count--; free (node); return -1; } } else node->value = elt; } #else node->value = elt; #endif return 0; } static gl_list_node_t _GL_ATTRIBUTE_PURE gl_linked_next_node (gl_list_t list, gl_list_node_t node) { return (node->next != &list->root ? node->next : NULL); } static gl_list_node_t _GL_ATTRIBUTE_PURE gl_linked_previous_node (gl_list_t list, gl_list_node_t node) { return (node->prev != &list->root ? node->prev : NULL); } static const void * _GL_ATTRIBUTE_PURE gl_linked_get_at (gl_list_t list, size_t position) { size_t count = list->count; gl_list_node_t node; if (!(position < count)) /* Invalid argument. */ abort (); /* Here we know count > 0. */ if (position <= ((count - 1) / 2)) { node = list->root.next; for (; position > 0; position--) node = node->next; } else { position = count - 1 - position; node = list->root.prev; for (; position > 0; position--) node = node->prev; } return node->value; } static gl_list_node_t gl_linked_nx_set_at (gl_list_t list, size_t position, const void *elt) { size_t count = list->count; gl_list_node_t node; if (!(position < count)) /* Invalid argument. */ abort (); /* Here we know count > 0. */ if (position <= ((count - 1) / 2)) { node = list->root.next; for (; position > 0; position--) node = node->next; } else { position = count - 1 - position; node = list->root.prev; for (; position > 0; position--) node = node->prev; } #if WITH_HASHTABLE if (elt != node->value) { size_t new_hashcode = (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (elt) : (size_t)(uintptr_t) elt); if (new_hashcode != node->h.hashcode) { remove_from_bucket (list, node); node->value = elt; node->h.hashcode = new_hashcode; if (add_to_bucket (list, node) < 0) { /* Out of memory. We removed node from a bucket but cannot add it to another bucket. In order to avoid inconsistencies, we must remove node entirely from the list. */ gl_list_node_t before_removed = node->prev; gl_list_node_t after_removed = node->next; ASYNCSAFE(gl_list_node_t) before_removed->next = after_removed; after_removed->prev = before_removed; list->count--; free (node); return NULL; } } else node->value = elt; } #else node->value = elt; #endif return node; } static gl_list_node_t _GL_ATTRIBUTE_PURE gl_linked_search_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt) { size_t count = list->count; if (!(start_index <= end_index && end_index <= count)) /* Invalid arguments. */ abort (); { #if WITH_HASHTABLE size_t hashcode = (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (elt) : (size_t)(uintptr_t) elt); size_t bucket = hashcode % list->table_size; gl_listelement_equals_fn equals = list->base.equals_fn; if (!list->base.allow_duplicates) { /* Look for the first match in the hash bucket. */ gl_list_node_t found = NULL; gl_list_node_t node; for (node = (gl_list_node_t) list->table[bucket]; node != NULL; node = (gl_list_node_t) node->h.hash_next) if (node->h.hashcode == hashcode && (equals != NULL ? equals (elt, node->value) : elt == node->value)) { found = node; break; } if (start_index > 0) /* Look whether found's index is < start_index. */ for (node = list->root.next; ; node = node->next) { if (node == found) return NULL; if (--start_index == 0) break; } if (end_index < count) /* Look whether found's index is >= end_index. */ { end_index = count - end_index; for (node = list->root.prev; ; node = node->prev) { if (node == found) return NULL; if (--end_index == 0) break; } } return found; } else { /* Look whether there is more than one match in the hash bucket. */ bool multiple_matches = false; gl_list_node_t first_match = NULL; gl_list_node_t node; for (node = (gl_list_node_t) list->table[bucket]; node != NULL; node = (gl_list_node_t) node->h.hash_next) if (node->h.hashcode == hashcode && (equals != NULL ? equals (elt, node->value) : elt == node->value)) { if (first_match == NULL) first_match = node; else { multiple_matches = true; break; } } if (multiple_matches) { /* We need the match with the smallest index. But we don't have a fast mapping node -> index. So we have to walk the list. */ end_index -= start_index; node = list->root.next; for (; start_index > 0; start_index--) node = node->next; for (; end_index > 0; node = node->next, end_index--) if (node->h.hashcode == hashcode && (equals != NULL ? equals (elt, node->value) : elt == node->value)) return node; /* The matches must have all been at indices < start_index or >= end_index. */ return NULL; } else { if (start_index > 0) /* Look whether first_match's index is < start_index. */ for (node = list->root.next; node != &list->root; node = node->next) { if (node == first_match) return NULL; if (--start_index == 0) break; } if (end_index < list->count) /* Look whether first_match's index is >= end_index. */ { end_index = list->count - end_index; for (node = list->root.prev; ; node = node->prev) { if (node == first_match) return NULL; if (--end_index == 0) break; } } return first_match; } } #else gl_listelement_equals_fn equals = list->base.equals_fn; gl_list_node_t node = list->root.next; end_index -= start_index; for (; start_index > 0; start_index--) node = node->next; if (equals != NULL) { for (; end_index > 0; node = node->next, end_index--) if (equals (elt, node->value)) return node; } else { for (; end_index > 0; node = node->next, end_index--) if (elt == node->value) return node; } return NULL; #endif } } static size_t _GL_ATTRIBUTE_PURE gl_linked_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt) { size_t count = list->count; if (!(start_index <= end_index && end_index <= count)) /* Invalid arguments. */ abort (); { #if WITH_HASHTABLE /* Here the hash table doesn't help much. It only allows us to minimize the number of equals() calls, by looking up first the node and then its index. */ size_t hashcode = (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (elt) : (size_t)(uintptr_t) elt); size_t bucket = hashcode % list->table_size; gl_listelement_equals_fn equals = list->base.equals_fn; gl_list_node_t node; /* First step: Look up the node. */ if (!list->base.allow_duplicates) { /* Look for the first match in the hash bucket. */ for (node = (gl_list_node_t) list->table[bucket]; node != NULL; node = (gl_list_node_t) node->h.hash_next) if (node->h.hashcode == hashcode && (equals != NULL ? equals (elt, node->value) : elt == node->value)) break; } else { /* Look whether there is more than one match in the hash bucket. */ bool multiple_matches = false; gl_list_node_t first_match = NULL; for (node = (gl_list_node_t) list->table[bucket]; node != NULL; node = (gl_list_node_t) node->h.hash_next) if (node->h.hashcode == hashcode && (equals != NULL ? equals (elt, node->value) : elt == node->value)) { if (first_match == NULL) first_match = node; else { multiple_matches = true; break; } } if (multiple_matches) { /* We need the match with the smallest index. But we don't have a fast mapping node -> index. So we have to walk the list. */ size_t index; index = start_index; node = list->root.next; for (; start_index > 0; start_index--) node = node->next; for (; index < end_index; node = node->next, index++) if (node->h.hashcode == hashcode && (equals != NULL ? equals (elt, node->value) : elt == node->value)) return index; /* The matches must have all been at indices < start_index or >= end_index. */ return (size_t)(-1); } node = first_match; } /* Second step: Look up the index of the node. */ if (node == NULL) return (size_t)(-1); else { size_t index = 0; for (; node->prev != &list->root; node = node->prev) index++; if (index >= start_index && index < end_index) return index; else return (size_t)(-1); } #else gl_listelement_equals_fn equals = list->base.equals_fn; size_t index = start_index; gl_list_node_t node = list->root.next; for (; start_index > 0; start_index--) node = node->next; if (equals != NULL) { for (; index < end_index; node = node->next, index++) if (equals (elt, node->value)) return index; } else { for (; index < end_index; node = node->next, index++) if (elt == node->value) return index; } return (size_t)(-1); #endif } } static gl_list_node_t gl_linked_nx_add_first (gl_list_t list, const void *elt) { gl_list_node_t node = (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl)); if (node == NULL) return NULL; ASYNCSAFE(const void *) node->value = elt; #if WITH_HASHTABLE node->h.hashcode = (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (node->value) : (size_t)(uintptr_t) node->value); /* Add node to the hash table. */ if (add_to_bucket (list, node) < 0) { free (node); return NULL; } #endif /* Add node to the list. */ node->prev = &list->root; ASYNCSAFE(gl_list_node_t) node->next = list->root.next; node->next->prev = node; ASYNCSAFE(gl_list_node_t) list->root.next = node; list->count++; #if WITH_HASHTABLE hash_resize_after_add (list); #endif return node; } static gl_list_node_t gl_linked_nx_add_last (gl_list_t list, const void *elt) { gl_list_node_t node = (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl)); if (node == NULL) return NULL; ASYNCSAFE(const void *) node->value = elt; #if WITH_HASHTABLE node->h.hashcode = (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (node->value) : (size_t)(uintptr_t) node->value); /* Add node to the hash table. */ if (add_to_bucket (list, node) < 0) { free (node); return NULL; } #endif /* Add node to the list. */ ASYNCSAFE(gl_list_node_t) node->next = &list->root; node->prev = list->root.prev; ASYNCSAFE(gl_list_node_t) node->prev->next = node; list->root.prev = node; list->count++; #if WITH_HASHTABLE hash_resize_after_add (list); #endif return node; } static gl_list_node_t gl_linked_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt) { gl_list_node_t new_node = (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl)); if (new_node == NULL) return NULL; ASYNCSAFE(const void *) new_node->value = elt; #if WITH_HASHTABLE new_node->h.hashcode = (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (new_node->value) : (size_t)(uintptr_t) new_node->value); /* Add new_node to the hash table. */ if (add_to_bucket (list, new_node) < 0) { free (new_node); return NULL; } #endif /* Add new_node to the list. */ ASYNCSAFE(gl_list_node_t) new_node->next = node; new_node->prev = node->prev; ASYNCSAFE(gl_list_node_t) new_node->prev->next = new_node; node->prev = new_node; list->count++; #if WITH_HASHTABLE hash_resize_after_add (list); #endif return new_node; } static gl_list_node_t gl_linked_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt) { gl_list_node_t new_node = (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl)); if (new_node == NULL) return NULL; ASYNCSAFE(const void *) new_node->value = elt; #if WITH_HASHTABLE new_node->h.hashcode = (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (new_node->value) : (size_t)(uintptr_t) new_node->value); /* Add new_node to the hash table. */ if (add_to_bucket (list, new_node) < 0) { free (new_node); return NULL; } #endif /* Add new_node to the list. */ new_node->prev = node; ASYNCSAFE(gl_list_node_t) new_node->next = node->next; new_node->next->prev = new_node; ASYNCSAFE(gl_list_node_t) node->next = new_node; list->count++; #if WITH_HASHTABLE hash_resize_after_add (list); #endif return new_node; } static gl_list_node_t gl_linked_nx_add_at (gl_list_t list, size_t position, const void *elt) { size_t count = list->count; gl_list_node_t new_node; if (!(position <= count)) /* Invalid argument. */ abort (); new_node = (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl)); if (new_node == NULL) return NULL; ASYNCSAFE(const void *) new_node->value = elt; #if WITH_HASHTABLE new_node->h.hashcode = (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (new_node->value) : (size_t)(uintptr_t) new_node->value); /* Add new_node to the hash table. */ if (add_to_bucket (list, new_node) < 0) { free (new_node); return NULL; } #endif /* Add new_node to the list. */ if (position <= (count / 2)) { gl_list_node_t node; node = &list->root; for (; position > 0; position--) node = node->next; new_node->prev = node; ASYNCSAFE(gl_list_node_t) new_node->next = node->next; new_node->next->prev = new_node; ASYNCSAFE(gl_list_node_t) node->next = new_node; } else { gl_list_node_t node; position = count - position; node = &list->root; for (; position > 0; position--) node = node->prev; ASYNCSAFE(gl_list_node_t) new_node->next = node; new_node->prev = node->prev; ASYNCSAFE(gl_list_node_t) new_node->prev->next = new_node; node->prev = new_node; } list->count++; #if WITH_HASHTABLE hash_resize_after_add (list); #endif return new_node; } static bool gl_linked_remove_node (gl_list_t list, gl_list_node_t node) { gl_list_node_t prev; gl_list_node_t next; #if WITH_HASHTABLE /* Remove node from the hash table. */ remove_from_bucket (list, node); #endif /* Remove node from the list. */ prev = node->prev; next = node->next; ASYNCSAFE(gl_list_node_t) prev->next = next; next->prev = prev; list->count--; if (list->base.dispose_fn != NULL) list->base.dispose_fn (node->value); free (node); return true; } static bool gl_linked_remove_at (gl_list_t list, size_t position) { size_t count = list->count; gl_list_node_t removed_node; if (!(position < count)) /* Invalid argument. */ abort (); /* Here we know count > 0. */ if (position <= ((count - 1) / 2)) { gl_list_node_t node; gl_list_node_t after_removed; node = &list->root; for (; position > 0; position--) node = node->next; removed_node = node->next; after_removed = node->next->next; ASYNCSAFE(gl_list_node_t) node->next = after_removed; after_removed->prev = node; } else { gl_list_node_t node; gl_list_node_t before_removed; position = count - 1 - position; node = &list->root; for (; position > 0; position--) node = node->prev; removed_node = node->prev; before_removed = node->prev->prev; node->prev = before_removed; ASYNCSAFE(gl_list_node_t) before_removed->next = node; } #if WITH_HASHTABLE remove_from_bucket (list, removed_node); #endif list->count--; if (list->base.dispose_fn != NULL) list->base.dispose_fn (removed_node->value); free (removed_node); return true; } static bool gl_linked_remove (gl_list_t list, const void *elt) { gl_list_node_t node = gl_linked_search_from_to (list, 0, list->count, elt); if (node != NULL) return gl_linked_remove_node (list, node); else return false; } static void gl_linked_list_free (gl_list_t list) { gl_listelement_dispose_fn dispose = list->base.dispose_fn; gl_list_node_t node; for (node = list->root.next; node != &list->root; ) { gl_list_node_t next = node->next; if (dispose != NULL) dispose (node->value); free (node); node = next; } #if WITH_HASHTABLE free (list->table); #endif free (list); } /* --------------------- gl_list_iterator_t Data Type --------------------- */ static gl_list_iterator_t gl_linked_iterator (gl_list_t list) { gl_list_iterator_t result; result.vtable = list->base.vtable; result.list = list; result.p = list->root.next; result.q = &list->root; #if defined GCC_LINT || defined lint result.i = 0; result.j = 0; result.count = 0; #endif return result; } static gl_list_iterator_t gl_linked_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index) { gl_list_iterator_t result; size_t n1, n2, n3; if (!(start_index <= end_index && end_index <= list->count)) /* Invalid arguments. */ abort (); result.vtable = list->base.vtable; result.list = list; n1 = start_index; n2 = end_index - start_index; n3 = list->count - end_index; /* Find the maximum among n1, n2, n3, so as to reduce the number of loop iterations to n1 + n2 + n3 - max(n1,n2,n3). */ if (n1 > n2 && n1 > n3) { /* n1 is the maximum, use n2 and n3. */ gl_list_node_t node; size_t i; node = &list->root; for (i = n3; i > 0; i--) node = node->prev; result.q = node; for (i = n2; i > 0; i--) node = node->prev; result.p = node; } else if (n2 > n3) { /* n2 is the maximum, use n1 and n3. */ gl_list_node_t node; size_t i; node = list->root.next; for (i = n1; i > 0; i--) node = node->next; result.p = node; node = &list->root; for (i = n3; i > 0; i--) node = node->prev; result.q = node; } else { /* n3 is the maximum, use n1 and n2. */ gl_list_node_t node; size_t i; node = list->root.next; for (i = n1; i > 0; i--) node = node->next; result.p = node; for (i = n2; i > 0; i--) node = node->next; result.q = node; } #if defined GCC_LINT || defined lint result.i = 0; result.j = 0; result.count = 0; #endif return result; } static bool gl_linked_iterator_next (gl_list_iterator_t *iterator, const void **eltp, gl_list_node_t *nodep) { if (iterator->p != iterator->q) { gl_list_node_t node = (gl_list_node_t) iterator->p; *eltp = node->value; if (nodep != NULL) *nodep = node; iterator->p = node->next; return true; } else return false; } static void gl_linked_iterator_free (gl_list_iterator_t *iterator) { } /* ---------------------- Sorted gl_list_t Data Type ---------------------- */ static gl_list_node_t _GL_ATTRIBUTE_PURE gl_linked_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { gl_list_node_t node; for (node = list->root.next; node != &list->root; node = node->next) { int cmp = compar (node->value, elt); if (cmp > 0) break; if (cmp == 0) return node; } return NULL; } static gl_list_node_t _GL_ATTRIBUTE_PURE gl_linked_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t low, size_t high, const void *elt) { size_t count = list->count; if (!(low <= high && high <= list->count)) /* Invalid arguments. */ abort (); high -= low; if (high > 0) { /* Here we know low < count. */ size_t position = low; gl_list_node_t node; if (position <= ((count - 1) / 2)) { node = list->root.next; for (; position > 0; position--) node = node->next; } else { position = count - 1 - position; node = list->root.prev; for (; position > 0; position--) node = node->prev; } do { int cmp = compar (node->value, elt); if (cmp > 0) break; if (cmp == 0) return node; node = node->next; } while (--high > 0); } return NULL; } static size_t _GL_ATTRIBUTE_PURE gl_linked_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { gl_list_node_t node; size_t index; for (node = list->root.next, index = 0; node != &list->root; node = node->next, index++) { int cmp = compar (node->value, elt); if (cmp > 0) break; if (cmp == 0) return index; } return (size_t)(-1); } static size_t _GL_ATTRIBUTE_PURE gl_linked_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t low, size_t high, const void *elt) { size_t count = list->count; if (!(low <= high && high <= list->count)) /* Invalid arguments. */ abort (); high -= low; if (high > 0) { /* Here we know low < count. */ size_t index = low; size_t position = low; gl_list_node_t node; if (position <= ((count - 1) / 2)) { node = list->root.next; for (; position > 0; position--) node = node->next; } else { position = count - 1 - position; node = list->root.prev; for (; position > 0; position--) node = node->prev; } do { int cmp = compar (node->value, elt); if (cmp > 0) break; if (cmp == 0) return index; node = node->next; index++; } while (--high > 0); } return (size_t)(-1); } static gl_list_node_t gl_linked_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { gl_list_node_t node; for (node = list->root.next; node != &list->root; node = node->next) if (compar (node->value, elt) >= 0) return gl_linked_nx_add_before (list, node, elt); return gl_linked_nx_add_last (list, elt); } static bool gl_linked_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { gl_list_node_t node; for (node = list->root.next; node != &list->root; node = node->next) { int cmp = compar (node->value, elt); if (cmp > 0) break; if (cmp == 0) return gl_linked_remove_node (list, node); } return false; } pspp-1.0.1/gl/localcharset.h0000644000175000017500000000243213124536242012636 00000000000000/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2003, 2009-2017 Free Software Foundation, Inc. This file is part of the GNU CHARSET 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 3, 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 . */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H #ifdef __cplusplus extern "C" { #endif /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); #ifdef __cplusplus } #endif #endif /* _LOCALCHARSET_H */ pspp-1.0.1/gl/malloca.c0000644000175000017500000001157613124536242011606 00000000000000/* Safe automatic memory allocation. Copyright (C) 2003, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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, 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 . */ #define _GL_USE_STDLIB_ALLOC 1 #include /* Specification. */ #include "malloca.h" #include #include "verify.h" /* The speed critical point in this file is freea() applied to an alloca() result: it must be fast, to match the speed of alloca(). The speed of mmalloca() and freea() in the other case are not critical, because they are only invoked for big memory sizes. */ #if HAVE_ALLOCA /* Store the mmalloca() results in a hash table. This is needed to reliably distinguish a mmalloca() result and an alloca() result. Although it is possible that the same pointer is returned by alloca() and by mmalloca() at different times in the same application, it does not lead to a bug in freea(), because: - Before a pointer returned by alloca() can point into malloc()ed memory, the function must return, and once this has happened the programmer must not call freea() on it anyway. - Before a pointer returned by mmalloca() can point into the stack, it must be freed. The only function that can free it is freea(), and when freea() frees it, it also removes it from the hash table. */ #define MAGIC_NUMBER 0x1415fb4a #define MAGIC_SIZE sizeof (int) /* This is how the header info would look like without any alignment considerations. */ struct preliminary_header { void *next; int magic; }; /* But the header's size must be a multiple of sa_alignment_max. */ #define HEADER_SIZE \ (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max) union header { void *next; struct { char room[HEADER_SIZE - MAGIC_SIZE]; int word; } magic; }; verify (HEADER_SIZE == sizeof (union header)); /* We make the hash table quite big, so that during lookups the probability of empty hash buckets is quite high. There is no need to make the hash table resizable, because when the hash table gets filled so much that the lookup becomes slow, it means that the application has memory leaks. */ #define HASH_TABLE_SIZE 257 static void * mmalloca_results[HASH_TABLE_SIZE]; #endif void * mmalloca (size_t n) { #if HAVE_ALLOCA /* Allocate one more word, that serves as an indicator for malloc()ed memory, so that freea() of an alloca() result is fast. */ size_t nplus = n + HEADER_SIZE; if (nplus >= n) { void *p = malloc (nplus); if (p != NULL) { size_t slot; union header *h = p; p = h + 1; /* Put a magic number into the indicator word. */ h->magic.word = MAGIC_NUMBER; /* Enter p into the hash table. */ slot = (uintptr_t) p % HASH_TABLE_SIZE; h->next = mmalloca_results[slot]; mmalloca_results[slot] = p; return p; } } /* Out of memory. */ return NULL; #else # if !MALLOC_0_IS_NONNULL if (n == 0) n = 1; # endif return malloc (n); #endif } #if HAVE_ALLOCA void freea (void *p) { /* mmalloca() may have returned NULL. */ if (p != NULL) { /* Attempt to quickly distinguish the mmalloca() result - which has a magic indicator word - and the alloca() result - which has an uninitialized indicator word. It is for this test that sa_increment additional bytes are allocated in the alloca() case. */ if (((int *) p)[-1] == MAGIC_NUMBER) { /* Looks like a mmalloca() result. To see whether it really is one, perform a lookup in the hash table. */ size_t slot = (uintptr_t) p % HASH_TABLE_SIZE; void **chain = &mmalloca_results[slot]; for (; *chain != NULL;) { union header *h = p; if (*chain == p) { /* Found it. Remove it from the hash table and free it. */ union header *p_begin = h - 1; *chain = p_begin->next; free (p_begin); return; } h = *chain; chain = &h[-1].next; } } /* At this point, we know it was not a mmalloca() result. */ } } #endif pspp-1.0.1/gl/full-write.c0000644000175000017500000000436113124536242012262 00000000000000/* An interface to read and write that retries (if necessary) until complete. Copyright (C) 1993-1994, 1997-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #ifdef FULL_READ # include "full-read.h" #else # include "full-write.h" #endif #include #ifdef FULL_READ # include "safe-read.h" # define safe_rw safe_read # define full_rw full_read # undef const # define const /* empty */ #else # include "safe-write.h" # define safe_rw safe_write # define full_rw full_write #endif #ifdef FULL_READ /* Set errno to zero upon EOF. */ # define ZERO_BYTE_TRANSFER_ERRNO 0 #else /* Some buggy drivers return 0 when one tries to write beyond a device's end. (Example: Linux 1.2.13 on /dev/fd0.) Set errno to ENOSPC so they get a sensible diagnostic. */ # define ZERO_BYTE_TRANSFER_ERRNO ENOSPC #endif /* Write(read) COUNT bytes at BUF to(from) descriptor FD, retrying if interrupted or if a partial write(read) occurs. Return the number of bytes transferred. When writing, set errno if fewer than COUNT bytes are written. When reading, if fewer than COUNT bytes are read, you must examine errno to distinguish failure from EOF (errno == 0). */ size_t full_rw (int fd, const void *buf, size_t count) { size_t total = 0; const char *ptr = (const char *) buf; while (count > 0) { size_t n_rw = safe_rw (fd, ptr, count); if (n_rw == (size_t) -1) break; if (n_rw == 0) { errno = ZERO_BYTE_TRANSFER_ERRNO; break; } total += n_rw; ptr += n_rw; count -= n_rw; } return total; } pspp-1.0.1/gl/wctype-h.c0000644000175000017500000000023313020461275011720 00000000000000/* Normally this would be wctype.c, but that name's already taken. */ #include #define _GL_WCTYPE_INLINE _GL_EXTERN_INLINE #include "wctype.h" pspp-1.0.1/gl/safe-write.h0000644000175000017500000000333413124536243012243 00000000000000/* An interface to write() that retries after interrupts. Copyright (C) 2002, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Some system calls may be interrupted and fail with errno = EINTR in the following situations: - The process is stopped and restarted (signal SIGSTOP and SIGCONT, user types Ctrl-Z) on some platforms: Mac OS X. - The process receives a signal for which a signal handler was installed with sigaction() with an sa_flags field that does not contain SA_RESTART. - The process receives a signal for which a signal handler was installed with signal() and for which no call to siginterrupt(sig,0) was done, on some platforms: AIX, HP-UX, IRIX, OSF/1, Solaris. This module provides a wrapper around write() that handles EINTR. */ #include #define SAFE_WRITE_ERROR ((size_t) -1) /* Write up to COUNT bytes at BUF to descriptor FD, retrying if interrupted. Return the actual number of bytes written, zero for EOF, or SAFE_WRITE_ERROR upon error. */ extern size_t safe_write (int fd, const void *buf, size_t count); pspp-1.0.1/gl/isnanl.c0000644000175000017500000000152513124536242011453 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible , 2007. */ #define USE_LONG_DOUBLE #include "isnan.c" pspp-1.0.1/gl/dirname.h0000644000175000017500000000277713124536241011624 00000000000000/* Take file names apart into directory and base names. Copyright (C) 1998, 2001, 2003-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef DIRNAME_H_ # define DIRNAME_H_ 1 # include # include # include "dosname.h" # ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' # endif # ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT # define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 # endif #ifdef __cplusplus extern "C" { #endif # if GNULIB_DIRNAME char *base_name (char const *file); char *dir_name (char const *file); # endif char *mdir_name (char const *file); size_t base_len (char const *file) _GL_ATTRIBUTE_PURE; size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE; char *last_component (char const *file) _GL_ATTRIBUTE_PURE; bool strip_trailing_slashes (char *file); #ifdef __cplusplus } /* extern "C" */ #endif #endif /* not DIRNAME_H_ */ pspp-1.0.1/gl/rename.c0000644000175000017500000003210513124536243011435 00000000000000/* Work around rename bugs in some systems. Copyright (C) 2001-2003, 2005-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Volker Borchert, Eric Blake. */ #include #include #undef rename #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* The mingw rename has problems with trailing slashes; it also requires use of native Windows calls to allow atomic renames over existing files. */ # include # include # include # include # include # define WIN32_LEAN_AND_MEAN # include # include "dirname.h" /* Rename the file SRC to DST. This replacement is necessary on Windows, on which the system rename function will not replace an existing DST. */ int rpl_rename (char const *src, char const *dst) { int error; size_t src_len = strlen (src); size_t dst_len = strlen (dst); char *src_base = last_component (src); char *dst_base = last_component (dst); bool src_slash; bool dst_slash; bool dst_exists; struct stat src_st; struct stat dst_st; /* Filter out dot as last component. */ if (!src_len || !dst_len) { errno = ENOENT; return -1; } if (*src_base == '.') { size_t len = base_len (src_base); if (len == 1 || (len == 2 && src_base[1] == '.')) { errno = EINVAL; return -1; } } if (*dst_base == '.') { size_t len = base_len (dst_base); if (len == 1 || (len == 2 && dst_base[1] == '.')) { errno = EINVAL; return -1; } } /* Presence of a trailing slash requires directory semantics. If the source does not exist, or if the destination cannot be turned into a directory, give up now. Otherwise, strip trailing slashes before calling rename. There are no symlinks on mingw, so stat works instead of lstat. */ src_slash = ISSLASH (src[src_len - 1]); dst_slash = ISSLASH (dst[dst_len - 1]); if (stat (src, &src_st)) return -1; if (stat (dst, &dst_st)) { if (errno != ENOENT || (!S_ISDIR (src_st.st_mode) && dst_slash)) return -1; dst_exists = false; } else { if (S_ISDIR (dst_st.st_mode) != S_ISDIR (src_st.st_mode)) { errno = S_ISDIR (dst_st.st_mode) ? EISDIR : ENOTDIR; return -1; } dst_exists = true; } /* There are no symlinks, so if a file existed with a trailing slash, it must be a directory, and we don't have to worry about stripping strip trailing slash. However, mingw refuses to replace an existing empty directory, so we have to help it out. And canonicalize_file_name is not yet ported to mingw; however, for directories, getcwd works as a viable alternative. Ensure that we can get back to where we started before using it; later attempts to return are fatal. Note that we can end up losing a directory if rename then fails, but it was empty, so not much damage was done. */ if (dst_exists && S_ISDIR (dst_st.st_mode)) { char *cwd = getcwd (NULL, 0); char *src_temp; char *dst_temp; if (!cwd || chdir (cwd)) return -1; if (IS_ABSOLUTE_FILE_NAME (src)) { dst_temp = chdir (dst) ? NULL : getcwd (NULL, 0); src_temp = chdir (src) ? NULL : getcwd (NULL, 0); } else { src_temp = chdir (src) ? NULL : getcwd (NULL, 0); if (!IS_ABSOLUTE_FILE_NAME (dst) && chdir (cwd)) abort (); dst_temp = chdir (dst) ? NULL : getcwd (NULL, 0); } if (chdir (cwd)) abort (); free (cwd); if (!src_temp || !dst_temp) { free (src_temp); free (dst_temp); errno = ENOMEM; return -1; } src_len = strlen (src_temp); if (strncmp (src_temp, dst_temp, src_len) == 0 && (ISSLASH (dst_temp[src_len]) || dst_temp[src_len] == '\0')) { error = dst_temp[src_len]; free (src_temp); free (dst_temp); if (error) { errno = EINVAL; return -1; } return 0; } if (rmdir (dst)) { error = errno; free (src_temp); free (dst_temp); errno = error; return -1; } free (src_temp); free (dst_temp); } /* MoveFileEx works if SRC is a directory without any flags, but fails with MOVEFILE_REPLACE_EXISTING, so try without flags first. Thankfully, MoveFileEx handles hard links correctly, even though rename() does not. */ if (MoveFileEx (src, dst, 0)) return 0; /* Retry with MOVEFILE_REPLACE_EXISTING if the move failed due to the destination already existing. */ error = GetLastError (); if (error == ERROR_FILE_EXISTS || error == ERROR_ALREADY_EXISTS) { if (MoveFileEx (src, dst, MOVEFILE_REPLACE_EXISTING)) return 0; error = GetLastError (); } switch (error) { case ERROR_FILE_NOT_FOUND: case ERROR_PATH_NOT_FOUND: case ERROR_BAD_PATHNAME: case ERROR_DIRECTORY: errno = ENOENT; break; case ERROR_ACCESS_DENIED: case ERROR_SHARING_VIOLATION: errno = EACCES; break; case ERROR_OUTOFMEMORY: errno = ENOMEM; break; case ERROR_CURRENT_DIRECTORY: errno = EBUSY; break; case ERROR_NOT_SAME_DEVICE: errno = EXDEV; break; case ERROR_WRITE_PROTECT: errno = EROFS; break; case ERROR_WRITE_FAULT: case ERROR_READ_FAULT: case ERROR_GEN_FAILURE: errno = EIO; break; case ERROR_HANDLE_DISK_FULL: case ERROR_DISK_FULL: case ERROR_DISK_TOO_FRAGMENTED: errno = ENOSPC; break; case ERROR_FILE_EXISTS: case ERROR_ALREADY_EXISTS: errno = EEXIST; break; case ERROR_BUFFER_OVERFLOW: case ERROR_FILENAME_EXCED_RANGE: errno = ENAMETOOLONG; break; case ERROR_INVALID_NAME: case ERROR_DELETE_PENDING: errno = EPERM; /* ? */ break; # ifndef ERROR_FILE_TOO_LARGE /* This value is documented but not defined in all versions of windows.h. */ # define ERROR_FILE_TOO_LARGE 223 # endif case ERROR_FILE_TOO_LARGE: errno = EFBIG; break; default: errno = EINVAL; break; } return -1; } #else /* ! W32 platform */ # include # include # include # include # include # include # include "dirname.h" # include "same-inode.h" /* Rename the file SRC to DST, fixing any trailing slash bugs. */ int rpl_rename (char const *src, char const *dst) { size_t src_len = strlen (src); size_t dst_len = strlen (dst); char *src_temp = (char *) src; char *dst_temp = (char *) dst; bool src_slash; bool dst_slash; bool dst_exists _GL_UNUSED; int ret_val = -1; int rename_errno = ENOTDIR; struct stat src_st; struct stat dst_st; if (!src_len || !dst_len) return rename (src, dst); /* Let strace see the ENOENT failure. */ # if RENAME_DEST_EXISTS_BUG { char *src_base = last_component (src); char *dst_base = last_component (dst); if (*src_base == '.') { size_t len = base_len (src_base); if (len == 1 || (len == 2 && src_base[1] == '.')) { errno = EINVAL; return -1; } } if (*dst_base == '.') { size_t len = base_len (dst_base); if (len == 1 || (len == 2 && dst_base[1] == '.')) { errno = EINVAL; return -1; } } } # endif /* RENAME_DEST_EXISTS_BUG */ src_slash = src[src_len - 1] == '/'; dst_slash = dst[dst_len - 1] == '/'; # if !RENAME_HARD_LINK_BUG && !RENAME_DEST_EXISTS_BUG /* If there are no trailing slashes, then trust the native implementation unless we also suspect issues with hard link detection or file/directory conflicts. */ if (!src_slash && !dst_slash) return rename (src, dst); # endif /* !RENAME_HARD_LINK_BUG && !RENAME_DEST_EXISTS_BUG */ /* Presence of a trailing slash requires directory semantics. If the source does not exist, or if the destination cannot be turned into a directory, give up now. Otherwise, strip trailing slashes before calling rename. */ if (lstat (src, &src_st)) return -1; if (lstat (dst, &dst_st)) { if (errno != ENOENT || (!S_ISDIR (src_st.st_mode) && dst_slash)) return -1; dst_exists = false; } else { if (S_ISDIR (dst_st.st_mode) != S_ISDIR (src_st.st_mode)) { errno = S_ISDIR (dst_st.st_mode) ? EISDIR : ENOTDIR; return -1; } # if RENAME_HARD_LINK_BUG if (SAME_INODE (src_st, dst_st)) return 0; # endif /* RENAME_HARD_LINK_BUG */ dst_exists = true; } # if (RENAME_TRAILING_SLASH_SOURCE_BUG || RENAME_DEST_EXISTS_BUG \ || RENAME_HARD_LINK_BUG) /* If the only bug was that a trailing slash was allowed on a non-existing file destination, as in Solaris 10, then we've already covered that situation. But if there is any problem with a trailing slash on an existing source or destination, as in Solaris 9, or if a directory can overwrite a symlink, as on Cygwin 1.5, or if directories cannot be created with trailing slash, as on NetBSD 1.6, then we must strip the offending slash and check that we have not encountered a symlink instead of a directory. Stripping a trailing slash interferes with POSIX semantics, where rename behavior on a symlink with a trailing slash operates on the corresponding target directory. We prefer the GNU semantics of rejecting any use of a symlink with trailing slash, but do not enforce them, since Solaris 10 is able to obey POSIX semantics and there might be clients expecting it, as counter-intuitive as those semantics are. Technically, we could also follow the POSIX behavior by chasing a readlink trail, but that is harder to implement. */ if (src_slash) { src_temp = strdup (src); if (!src_temp) { /* Rather than rely on strdup-posix, we set errno ourselves. */ rename_errno = ENOMEM; goto out; } strip_trailing_slashes (src_temp); if (lstat (src_temp, &src_st)) { rename_errno = errno; goto out; } if (S_ISLNK (src_st.st_mode)) goto out; } if (dst_slash) { dst_temp = strdup (dst); if (!dst_temp) { rename_errno = ENOMEM; goto out; } strip_trailing_slashes (dst_temp); if (lstat (dst_temp, &dst_st)) { if (errno != ENOENT) { rename_errno = errno; goto out; } } else if (S_ISLNK (dst_st.st_mode)) goto out; } # endif /* RENAME_TRAILING_SLASH_SOURCE_BUG || RENAME_DEST_EXISTS_BUG || RENAME_HARD_LINK_BUG */ # if RENAME_DEST_EXISTS_BUG /* Cygwin 1.5 sometimes behaves oddly when moving a non-empty directory on top of an empty one (the old directory name can reappear if the new directory tree is removed). Work around this by removing the target first, but don't remove the target if it is a subdirectory of the source. Note that we can end up losing a directory if rename then fails, but it was empty, so not much damage was done. */ if (dst_exists && S_ISDIR (dst_st.st_mode)) { if (src_st.st_dev != dst_st.st_dev) { rename_errno = EXDEV; goto out; } if (src_temp != src) free (src_temp); src_temp = canonicalize_file_name (src); if (dst_temp != dst) free (dst_temp); dst_temp = canonicalize_file_name (dst); if (!src_temp || !dst_temp) { rename_errno = ENOMEM; goto out; } src_len = strlen (src_temp); if (strncmp (src_temp, dst_temp, src_len) == 0 && dst_temp[src_len] == '/') { rename_errno = EINVAL; goto out; } if (rmdir (dst)) { rename_errno = errno; goto out; } } # endif /* RENAME_DEST_EXISTS_BUG */ ret_val = rename (src_temp, dst_temp); rename_errno = errno; out: _GL_UNUSED_LABEL; if (src_temp != src) free (src_temp); if (dst_temp != dst) free (dst_temp); errno = rename_errno; return ret_val; } #endif /* ! W32 platform */ pspp-1.0.1/gl/mbchar.c0000644000175000017500000000234013124536242011417 00000000000000/* Copyright (C) 2001, 2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #define MBCHAR_INLINE _GL_EXTERN_INLINE #include #include "mbchar.h" #if IS_BASIC_ASCII /* Bit table of characters in the ISO C "basic character set". */ const unsigned int is_basic_table [UCHAR_MAX / 32 + 1] = { 0x00001a00, /* '\t' '\v' '\f' */ 0xffffffef, /* ' '...'#' '%'...'?' */ 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */ 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */ /* The remaining bits are 0. */ }; #endif /* IS_BASIC_ASCII */ pspp-1.0.1/gl/strcasecmp.c0000644000175000017500000000342713124536243012337 00000000000000/* Case-insensitive string comparison function. Copyright (C) 1998-1999, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include #include #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function does not work with multibyte strings! */ int strcasecmp (const char *s1, const char *s2) { const unsigned char *p1 = (const unsigned char *) s1; const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2) return 0; do { c1 = TOLOWER (*p1); c2 = TOLOWER (*p2); if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } pspp-1.0.1/gl/xmemdup0.h0000644000175000017500000000243013124536243011730 00000000000000/* xmemdup0.h -- copy a block of arbitrary bytes, plus a trailing NUL Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef XMEMDUP_H_ # define XMEMDUP_H_ # include # ifdef __cplusplus extern "C" { # endif /* This function is always triggered when memory is exhausted. It must be defined by the application, either explicitly or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ extern _Noreturn void xalloc_die (void); char *xmemdup0 (void const *p, size_t s); # ifdef __cplusplus } # endif #endif /* !XMEMDUP0_H_ */ pspp-1.0.1/gl/fstat.c0000644000175000017500000000502413124536242011306 00000000000000/* fstat() replacement. Copyright (C) 2011-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* If the user's config.h happens to include , let it include only the system's here, so that orig_fstat doesn't recurse to rpl_fstat. */ #define __need_system_sys_stat_h #include /* Get the original definition of fstat. It might be defined as a macro. */ #include #include #undef __need_system_sys_stat_h #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WINDOWS_NATIVE #endif #if !defined WINDOWS_NATIVE static int orig_fstat (int fd, struct stat *buf) { return fstat (fd, buf); } #endif /* Specification. */ /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include above. */ #include "sys/stat.h" #include #include #ifdef WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include # if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" # else # include # endif # include "stat-w32.h" #endif int rpl_fstat (int fd, struct stat *buf) { #if REPLACE_FCHDIR && REPLACE_OPEN_DIRECTORY /* Handle the case when rpl_open() used a dummy file descriptor to work around an open() that can't normally visit directories. */ const char *name = _gl_directory_name (fd); if (name != NULL) return stat (name, buf); #endif #ifdef WINDOWS_NATIVE /* Fill the fields ourselves, because the original fstat function returns values for st_atime, st_mtime, st_ctime that depend on the current time zone. See */ HANDLE h = (HANDLE) _get_osfhandle (fd); if (h == INVALID_HANDLE_VALUE) { errno = EBADF; return -1; } return _gl_fstat_by_handle (h, NULL, buf); #else return orig_fstat (fd, buf); #endif } pspp-1.0.1/gl/error.c0000644000175000017500000002476213124536241011327 00000000000000/* Error handler for noninteractive utilities Copyright (C) 1990-1998, 2000-2007, 2009-2017 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 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 . */ /* Written by David MacKenzie . */ #if !_LIBC # include #endif #include "error.h" #include #include #include #include #if !_LIBC && ENABLE_NLS # include "gettext.h" # define _(msgid) gettext (msgid) #endif #ifdef _LIBC # include # include # include # include # define mbsrtowcs __mbsrtowcs # define USE_UNLOCKED_IO 0 # define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b) # define _GL_ARG_NONNULL(a) #else # include "getprogname.h" #endif #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif #ifndef _ # define _(String) String #endif /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this function without parameters instead. */ void (*error_print_progname) (void); /* This variable is incremented each time 'error' is called. */ unsigned int error_message_count; #ifdef _LIBC /* In the GNU C library, there is a predefined variable for this. */ # define program_name program_invocation_name # include # include # include /* In GNU libc we want do not want to use the common name 'error' directly. Instead make it a weak alias. */ extern void __error (int status, int errnum, const char *message, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern void __error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *message, ...) __attribute__ ((__format__ (__printf__, 5, 6))); # define error __error # define error_at_line __error_at_line # include # define fflush(s) _IO_fflush (s) # undef putc # define putc(c, fp) _IO_putc (c, fp) # include #else /* not _LIBC */ # include # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ # if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" # else # include # endif # endif /* The gnulib override of fcntl is not needed in this file. */ # undef fcntl # if !(GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R) # ifndef HAVE_DECL_STRERROR_R "this configure-time declaration test was not run" # endif # if STRERROR_R_CHAR_P char *strerror_r (int errnum, char *buf, size_t buflen); # else int strerror_r (int errnum, char *buf, size_t buflen); # endif # endif #define program_name getprogname () # if GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r # endif /* GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r */ #endif /* not _LIBC */ #if !_LIBC /* Return non-zero if FD is open. */ static int is_open (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows: The initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE. There is no fcntl, and the gnulib replacement fcntl does not support F_GETFL. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; # else # ifndef F_GETFL # error Please port fcntl to your platform # endif return 0 <= fcntl (fd, F_GETFL); # endif } #endif static void flush_stdout (void) { #if !_LIBC int stdout_fd; # if GNULIB_FREOPEN_SAFER /* Use of gnulib's freopen-safer module normally ensures that fileno (stdout) == 1 whenever stdout is open. */ stdout_fd = STDOUT_FILENO; # else /* POSIX states that fileno (stdout) after fclose is unspecified. But in practice it is not a problem, because stdout is statically allocated and the fd of a FILE stream is stored as a field in its allocated memory. */ stdout_fd = fileno (stdout); # endif /* POSIX states that fflush (stdout) after fclose is unspecified; it is safe in glibc, but not on all other platforms. fflush (NULL) is always defined, but too draconian. */ if (0 <= stdout_fd && is_open (stdout_fd)) #endif fflush (stdout); } static void print_errno_message (int errnum) { char const *s; #if _LIBC || GNULIB_STRERROR_R_POSIX || defined HAVE_STRERROR_R char errbuf[1024]; # if _LIBC || (!GNULIB_STRERROR_R_POSIX && STRERROR_R_CHAR_P) s = __strerror_r (errnum, errbuf, sizeof errbuf); # else if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) s = errbuf; else s = 0; # endif #else s = strerror (errnum); #endif #if !_LIBC if (! s) s = _("Unknown system error"); #endif #if _LIBC __fxprintf (NULL, ": %s", s); #else fprintf (stderr, ": %s", s); #endif } static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3)) error_tail (int status, int errnum, const char *message, va_list args) { #if _LIBC if (_IO_fwide (stderr, 0) > 0) { size_t len = strlen (message) + 1; wchar_t *wmessage = NULL; mbstate_t st; size_t res; const char *tmp; bool use_malloc = false; while (1) { if (__libc_use_alloca (len * sizeof (wchar_t))) wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); else { if (!use_malloc) wmessage = NULL; wchar_t *p = (wchar_t *) realloc (wmessage, len * sizeof (wchar_t)); if (p == NULL) { free (wmessage); fputws_unlocked (L"out of memory\n", stderr); return; } wmessage = p; use_malloc = true; } memset (&st, '\0', sizeof (st)); tmp = message; res = mbsrtowcs (wmessage, &tmp, len, &st); if (res != len) break; if (__builtin_expect (len >= SIZE_MAX / sizeof (wchar_t) / 2, 0)) { /* This really should not happen if everything is fine. */ res = (size_t) -1; break; } len *= 2; } if (res == (size_t) -1) { /* The string cannot be converted. */ if (use_malloc) { free (wmessage); use_malloc = false; } wmessage = (wchar_t *) L"???"; } __vfwprintf (stderr, wmessage, args); if (use_malloc) free (wmessage); } else #endif vfprintf (stderr, message, args); ++error_message_count; if (errnum) print_errno_message (errnum); #if _LIBC __fxprintf (NULL, "\n"); #else putc ('\n', stderr); #endif fflush (stderr); if (status) exit (status); } /* Print the program name and error message MESSAGE, which is a printf-style format string with optional args. If ERRNUM is nonzero, print its corresponding system error message. Exit with status STATUS if it is nonzero. */ void error (int status, int errnum, const char *message, ...) { va_list args; #if defined _LIBC && defined __libc_ptf_call /* We do not want this call to be cut short by a thread cancellation. Therefore disable cancellation for now. */ int state = PTHREAD_CANCEL_ENABLE; __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), 0); #endif flush_stdout (); #ifdef _LIBC _IO_flockfile (stderr); #endif if (error_print_progname) (*error_print_progname) (); else { #if _LIBC __fxprintf (NULL, "%s: ", program_name); #else fprintf (stderr, "%s: ", program_name); #endif } va_start (args, message); error_tail (status, errnum, message, args); va_end (args); #ifdef _LIBC _IO_funlockfile (stderr); # ifdef __libc_ptf_call __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); # endif #endif } /* Sometimes we want to have at most one error per line. This variable controls whether this mode is selected or not. */ int error_one_per_line; void error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *message, ...) { va_list args; if (error_one_per_line) { static const char *old_file_name; static unsigned int old_line_number; if (old_line_number == line_number && (file_name == old_file_name || (old_file_name != NULL && file_name != NULL && strcmp (old_file_name, file_name) == 0))) /* Simply return and print nothing. */ return; old_file_name = file_name; old_line_number = line_number; } #if defined _LIBC && defined __libc_ptf_call /* We do not want this call to be cut short by a thread cancellation. Therefore disable cancellation for now. */ int state = PTHREAD_CANCEL_ENABLE; __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), 0); #endif flush_stdout (); #ifdef _LIBC _IO_flockfile (stderr); #endif if (error_print_progname) (*error_print_progname) (); else { #if _LIBC __fxprintf (NULL, "%s:", program_name); #else fprintf (stderr, "%s:", program_name); #endif } #if _LIBC __fxprintf (NULL, file_name != NULL ? "%s:%u: " : " ", file_name, line_number); #else fprintf (stderr, file_name != NULL ? "%s:%u: " : " ", file_name, line_number); #endif va_start (args, message); error_tail (status, errnum, message, args); va_end (args); #ifdef _LIBC _IO_funlockfile (stderr); # ifdef __libc_ptf_call __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); # endif #endif } #ifdef _LIBC /* Make the weak alias. */ # undef error # undef error_at_line weak_alias (__error, error) weak_alias (__error_at_line, error_at_line) #endif pspp-1.0.1/gl/fatal-signal.c0000644000175000017500000001722413124536241012533 00000000000000/* Emergency actions in case of a fatal signal. Copyright (C) 2003-2004, 2006-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 . */ #include /* Specification. */ #include "fatal-signal.h" #include #include #include #include #include "sig-handler.h" #include "xalloc.h" #define SIZEOF(a) (sizeof(a) / sizeof(a[0])) /* ========================================================================= */ /* The list of fatal signals. These are those signals whose default action is to terminate the process without a core dump, except SIGKILL - because it cannot be caught, SIGALRM SIGUSR1 SIGUSR2 SIGPOLL SIGIO SIGLOST - because applications often use them for their own purpose, SIGPROF SIGVTALRM - because they are used for profiling, SIGSTKFLT - because it is more similar to SIGFPE, SIGSEGV, SIGBUS, SIGSYS - because it is more similar to SIGABRT, SIGSEGV, SIGPWR - because it of too special use, SIGRTMIN...SIGRTMAX - because they are reserved for application use. plus SIGXCPU, SIGXFSZ - because they are quite similar to SIGTERM. */ static int fatal_signals[] = { /* ISO C 99 signals. */ #ifdef SIGINT SIGINT, #endif #ifdef SIGTERM SIGTERM, #endif /* POSIX:2001 signals. */ #ifdef SIGHUP SIGHUP, #endif #ifdef SIGPIPE SIGPIPE, #endif /* BSD signals. */ #ifdef SIGXCPU SIGXCPU, #endif #ifdef SIGXFSZ SIGXFSZ, #endif /* Native Windows signals. */ #ifdef SIGBREAK SIGBREAK, #endif 0 }; #define num_fatal_signals (SIZEOF (fatal_signals) - 1) /* Eliminate signals whose signal handler is SIG_IGN. */ static void init_fatal_signals (void) { static bool fatal_signals_initialized = false; if (!fatal_signals_initialized) { size_t i; for (i = 0; i < num_fatal_signals; i++) { struct sigaction action; if (sigaction (fatal_signals[i], NULL, &action) >= 0 && get_handler (&action) == SIG_IGN) fatal_signals[i] = -1; } fatal_signals_initialized = true; } } /* ========================================================================= */ typedef void (*action_t) (void); /* Type of an entry in the actions array. The 'action' field is accessed from within the fatal_signal_handler(), therefore we mark it as 'volatile'. */ typedef struct { volatile action_t action; } actions_entry_t; /* The registered cleanup actions. */ static actions_entry_t static_actions[32]; static actions_entry_t * volatile actions = static_actions; static sig_atomic_t volatile actions_count = 0; static size_t actions_allocated = SIZEOF (static_actions); /* The saved signal handlers. Size 32 would not be sufficient: On HP-UX, SIGXCPU = 33, SIGXFSZ = 34. */ static struct sigaction saved_sigactions[64]; /* Uninstall the handlers. */ static void uninstall_handlers (void) { size_t i; for (i = 0; i < num_fatal_signals; i++) if (fatal_signals[i] >= 0) { int sig = fatal_signals[i]; if (saved_sigactions[sig].sa_handler == SIG_IGN) saved_sigactions[sig].sa_handler = SIG_DFL; sigaction (sig, &saved_sigactions[sig], NULL); } } /* The signal handler. It gets called asynchronously. */ static void fatal_signal_handler (int sig) { for (;;) { /* Get the last registered cleanup action, in a reentrant way. */ action_t action; size_t n = actions_count; if (n == 0) break; n--; actions_count = n; action = actions[n].action; /* Execute the action. */ action (); } /* Now execute the signal's default action. If the signal being delivered was blocked, the re-raised signal would be delivered when this handler returns. But the way we install this handler, no signal is blocked, and the re-raised signal is delivered already during raise(). */ uninstall_handlers (); raise (sig); } /* Install the handlers. */ static void install_handlers (void) { size_t i; struct sigaction action; action.sa_handler = &fatal_signal_handler; /* If we get a fatal signal while executing fatal_signal_handler, enter fatal_signal_handler recursively, since it is reentrant. Hence no SA_RESETHAND. */ action.sa_flags = SA_NODEFER; sigemptyset (&action.sa_mask); for (i = 0; i < num_fatal_signals; i++) if (fatal_signals[i] >= 0) { int sig = fatal_signals[i]; if (!(sig < sizeof (saved_sigactions) / sizeof (saved_sigactions[0]))) abort (); sigaction (sig, &action, &saved_sigactions[sig]); } } /* Register a cleanup function to be executed when a catchable fatal signal occurs. */ void at_fatal_signal (action_t action) { static bool cleanup_initialized = false; if (!cleanup_initialized) { init_fatal_signals (); install_handlers (); cleanup_initialized = true; } if (actions_count == actions_allocated) { /* Extend the actions array. Note that we cannot use xrealloc(), because then the cleanup() function could access an already deallocated array. */ actions_entry_t *old_actions = actions; size_t old_actions_allocated = actions_allocated; size_t new_actions_allocated = 2 * actions_allocated; actions_entry_t *new_actions = XNMALLOC (new_actions_allocated, actions_entry_t); size_t k; /* Don't use memcpy() here, because memcpy takes non-volatile arguments and is therefore not guaranteed to complete all memory stores before the next statement. */ for (k = 0; k < old_actions_allocated; k++) new_actions[k] = old_actions[k]; actions = new_actions; actions_allocated = new_actions_allocated; /* Now we can free the old actions array. */ if (old_actions != static_actions) free (old_actions); } /* The two uses of 'volatile' in the types above (and ISO C 99 section 5.1.2.3.(5)) ensure that we increment the actions_count only after the new action has been written to the memory location actions[actions_count]. */ actions[actions_count].action = action; actions_count++; } /* ========================================================================= */ static sigset_t fatal_signal_set; static void init_fatal_signal_set (void) { static bool fatal_signal_set_initialized = false; if (!fatal_signal_set_initialized) { size_t i; init_fatal_signals (); sigemptyset (&fatal_signal_set); for (i = 0; i < num_fatal_signals; i++) if (fatal_signals[i] >= 0) sigaddset (&fatal_signal_set, fatal_signals[i]); fatal_signal_set_initialized = true; } } /* Temporarily delay the catchable fatal signals. */ void block_fatal_signals (void) { init_fatal_signal_set (); sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL); } /* Stop delaying the catchable fatal signals. */ void unblock_fatal_signals (void) { init_fatal_signal_set (); sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL); } pspp-1.0.1/gl/stdlib.in.h0000644000175000017500000010371213124536243012064 00000000000000/* A GNU-like . Copyright (C) 1995, 2001-2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_system_stdlib_h || defined __need_malloc_and_calloc /* Special invocation conventions inside some gnulib header files, and inside some glibc header files, respectively. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_STDLIB_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #ifndef _@GUARD_PREFIX@_STDLIB_H #define _@GUARD_PREFIX@_STDLIB_H /* NetBSD 5.0 mis-defines NULL. */ #include /* MirBSD 10 defines WEXITSTATUS in , not in . */ #if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS # include #endif /* Solaris declares getloadavg() in . */ #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ # include #endif /* Native Windows platforms declare mktemp() in . */ #if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include #endif #if @GNULIB_RANDOM_R@ /* OSF/1 5.1 declares 'struct random_data' in , which is included from if _REENTRANT is defined. Include it whenever we need 'struct random_data'. */ # if @HAVE_RANDOM_H@ # include # endif # if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@ # include # endif # if !@HAVE_STRUCT_RANDOM_DATA@ /* Define 'struct random_data'. But allow multiple gnulib generated replacements to coexist. */ # if !GNULIB_defined_struct_random_data struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; # define GNULIB_defined_struct_random_data 1 # endif # endif #endif #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* On Mac OS X 10.3, only declares mkstemp. */ /* On Mac OS X 10.5, only declares mkstemps. */ /* On Cygwin 1.7.1, only declares getsubopt. */ /* But avoid namespace pollution on glibc systems and native Windows. */ # include #endif /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* The definition of _Noreturn is copied here. */ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems do not define EXIT_*, despite otherwise supporting C89. */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere with proper operation of xargs. */ #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 #elif EXIT_FAILURE != 1 # undef EXIT_FAILURE # define EXIT_FAILURE 1 #endif #if @GNULIB__EXIT@ /* Terminate the current process with the given return code, without running the 'atexit' handlers. */ # if !@HAVE__EXIT@ _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); # endif _GL_CXXALIAS_SYS (_Exit, void, (int status)); _GL_CXXALIASWARN (_Exit); #elif defined GNULIB_POSIXCHECK # undef _Exit # if HAVE_RAW_DECL__EXIT _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " "use gnulib module _Exit for portability"); # endif #endif #if @GNULIB_ATOLL@ /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ # if !@HAVE_ATOLL@ _GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (atoll, long long, (const char *string)); _GL_CXXALIASWARN (atoll); #elif defined GNULIB_POSIXCHECK # undef atoll # if HAVE_RAW_DECL_ATOLL _GL_WARN_ON_USE (atoll, "atoll is unportable - " "use gnulib module atoll for portability"); # endif #endif #if @GNULIB_CALLOC_POSIX@ # if @REPLACE_CALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc # endif _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif _GL_CXXALIASWARN (calloc); #elif defined GNULIB_POSIXCHECK # undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); #endif #if @GNULIB_CANONICALIZE_FILE_NAME@ # if @REPLACE_CANONICALIZE_FILE_NAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define canonicalize_file_name rpl_canonicalize_file_name # endif _GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); # else # if !@HAVE_CANONICALIZE_FILE_NAME@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); # endif _GL_CXXALIASWARN (canonicalize_file_name); #elif defined GNULIB_POSIXCHECK # undef canonicalize_file_name # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_GETLOADAVG@ /* Store max(NELEM,3) load average numbers in LOADAVG[]. The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ # if !@HAVE_DECL_GETLOADAVG@ _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); _GL_CXXALIASWARN (getloadavg); #elif defined GNULIB_POSIXCHECK # undef getloadavg # if HAVE_RAW_DECL_GETLOADAVG _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " "use gnulib module getloadavg for portability"); # endif #endif #if @GNULIB_GETSUBOPT@ /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. If the first element refers to a "token" that is member of the given NULL-terminated array of tokens: - It replaces the comma with a NUL byte, updates *OPTIONP to point past the first option and the comma, sets *VALUEP to the value of the element (or NULL if it doesn't contain an "=" sign), - It returns the index of the "token" in the given array of tokens. Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX:2001 specification. http://www.opengroup.org/susv3xsh/getsubopt.html */ # if !@HAVE_GETSUBOPT@ _GL_FUNCDECL_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep)); _GL_CXXALIASWARN (getsubopt); #elif defined GNULIB_POSIXCHECK # undef getsubopt # if HAVE_RAW_DECL_GETSUBOPT _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " "use gnulib module getsubopt for portability"); # endif #endif #if @GNULIB_GRANTPT@ /* Change the ownership and access permission of the slave side of the pseudo-terminal whose master side is specified by FD. */ # if !@HAVE_GRANTPT@ _GL_FUNCDECL_SYS (grantpt, int, (int fd)); # endif _GL_CXXALIAS_SYS (grantpt, int, (int fd)); _GL_CXXALIASWARN (grantpt); #elif defined GNULIB_POSIXCHECK # undef grantpt # if HAVE_RAW_DECL_GRANTPT _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " "use gnulib module grantpt for portability"); # endif #endif /* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not rely on GNU or POSIX semantics for malloc and realloc (for example, by never specifying a zero size), so it does not need malloc or realloc to be redefined. */ #if @GNULIB_MALLOC_POSIX@ # if @REPLACE_MALLOC@ # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef malloc # define malloc rpl_malloc # endif _GL_FUNCDECL_RPL (malloc, void *, (size_t size)); _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); # else _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif _GL_CXXALIASWARN (malloc); #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC # undef malloc /* Assume malloc is always declared. */ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " "use gnulib module malloc-posix for portability"); #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBTOWC@ # if @REPLACE_MBTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbtowc # define mbtowc rpl_mbtowc # endif _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # else _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # endif _GL_CXXALIASWARN (mbtowc); #endif #if @GNULIB_MKDTEMP@ /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ # if !@HAVE_MKDTEMP@ _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); _GL_CXXALIASWARN (mkdtemp); #elif defined GNULIB_POSIXCHECK # undef mkdtemp # if HAVE_RAW_DECL_MKDTEMP _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " "use gnulib module mkdtemp for portability"); # endif #endif #if @GNULIB_MKOSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKOSTEMP@ _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); _GL_CXXALIASWARN (mkostemp); #elif defined GNULIB_POSIXCHECK # undef mkostemp # if HAVE_RAW_DECL_MKOSTEMP _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " "use gnulib module mkostemp for portability"); # endif #endif #if @GNULIB_MKOSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE before a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKOSTEMPS@ _GL_FUNCDECL_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/)); _GL_CXXALIASWARN (mkostemps); #elif defined GNULIB_POSIXCHECK # undef mkostemps # if HAVE_RAW_DECL_MKOSTEMPS _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " "use gnulib module mkostemps for portability"); # endif #endif #if @GNULIB_MKSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if @REPLACE_MKSTEMP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mkstemp rpl_mkstemp # endif _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); # else # if ! @HAVE_MKSTEMP@ _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); # endif _GL_CXXALIASWARN (mkstemp); #elif defined GNULIB_POSIXCHECK # undef mkstemp # if HAVE_RAW_DECL_MKSTEMP _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " "use gnulib module mkstemp for portability"); # endif #endif #if @GNULIB_MKSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE prior to a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKSTEMPS@ _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); _GL_CXXALIASWARN (mkstemps); #elif defined GNULIB_POSIXCHECK # undef mkstemps # if HAVE_RAW_DECL_MKSTEMPS _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " "use gnulib module mkstemps for portability"); # endif #endif #if @GNULIB_POSIX_OPENPT@ /* Return an FD open to the master side of a pseudo-terminal. Flags should include O_RDWR, and may also include O_NOCTTY. */ # if !@HAVE_POSIX_OPENPT@ _GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); # endif _GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); _GL_CXXALIASWARN (posix_openpt); #elif defined GNULIB_POSIXCHECK # undef posix_openpt # if HAVE_RAW_DECL_POSIX_OPENPT _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " "use gnulib module posix_openpt for portability"); # endif #endif #if @GNULIB_PTSNAME@ /* Return the pathname of the pseudo-terminal slave associated with the master FD is open on, or NULL on errors. */ # if @REPLACE_PTSNAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ptsname # define ptsname rpl_ptsname # endif _GL_FUNCDECL_RPL (ptsname, char *, (int fd)); _GL_CXXALIAS_RPL (ptsname, char *, (int fd)); # else # if !@HAVE_PTSNAME@ _GL_FUNCDECL_SYS (ptsname, char *, (int fd)); # endif _GL_CXXALIAS_SYS (ptsname, char *, (int fd)); # endif _GL_CXXALIASWARN (ptsname); #elif defined GNULIB_POSIXCHECK # undef ptsname # if HAVE_RAW_DECL_PTSNAME _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " "use gnulib module ptsname for portability"); # endif #endif #if @GNULIB_PTSNAME_R@ /* Set the pathname of the pseudo-terminal slave associated with the master FD is open on and return 0, or set errno and return non-zero on errors. */ # if @REPLACE_PTSNAME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ptsname_r # define ptsname_r rpl_ptsname_r # endif _GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); _GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); # else # if !@HAVE_PTSNAME_R@ _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); # endif _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); # endif _GL_CXXALIASWARN (ptsname_r); #elif defined GNULIB_POSIXCHECK # undef ptsname_r # if HAVE_RAW_DECL_PTSNAME_R _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " "use gnulib module ptsname_r for portability"); # endif #endif #if @GNULIB_PUTENV@ # if @REPLACE_PUTENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putenv # define putenv rpl_putenv # endif _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif _GL_CXXALIASWARN (putenv); #endif #if @GNULIB_QSORT_R@ /* Sort an array of NMEMB elements, starting at address BASE, each element occupying SIZE bytes, in ascending order according to the comparison function COMPARE. */ # if @REPLACE_QSORT_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef qsort_r # define qsort_r rpl_qsort_r # endif _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, int (*compare) (void const *, void const *, void *), void *arg) _GL_ARG_NONNULL ((1, 4))); _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, int (*compare) (void const *, void const *, void *), void *arg)); # else # if !@HAVE_QSORT_R@ _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, int (*compare) (void const *, void const *, void *), void *arg) _GL_ARG_NONNULL ((1, 4))); # endif _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, int (*compare) (void const *, void const *, void *), void *arg)); # endif _GL_CXXALIASWARN (qsort_r); #elif defined GNULIB_POSIXCHECK # undef qsort_r # if HAVE_RAW_DECL_QSORT_R _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " "use gnulib module qsort_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ # ifndef RAND_MAX # define RAND_MAX 2147483647 # endif # endif #endif #if @GNULIB_RANDOM@ # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (random, long, (void)); # endif _GL_CXXALIAS_SYS (random, long, (void)); _GL_CXXALIASWARN (random); #elif defined GNULIB_POSIXCHECK # undef random # if HAVE_RAW_DECL_RANDOM _GL_WARN_ON_USE (random, "random is unportable - " "use gnulib module random for portability"); # endif #endif #if @GNULIB_RANDOM@ # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); # endif _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); _GL_CXXALIASWARN (srandom); #elif defined GNULIB_POSIXCHECK # undef srandom # if HAVE_RAW_DECL_SRANDOM _GL_WARN_ON_USE (srandom, "srandom is unportable - " "use gnulib module random for portability"); # endif #endif #if @GNULIB_RANDOM@ # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (initstate, char *, (unsigned int seed, char *buf, size_t buf_size) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (initstate, char *, (unsigned int seed, char *buf, size_t buf_size)); _GL_CXXALIASWARN (initstate); #elif defined GNULIB_POSIXCHECK # undef initstate # if HAVE_RAW_DECL_INITSTATE_R _GL_WARN_ON_USE (initstate, "initstate is unportable - " "use gnulib module random for portability"); # endif #endif #if @GNULIB_RANDOM@ # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); _GL_CXXALIASWARN (setstate); #elif defined GNULIB_POSIXCHECK # undef setstate # if HAVE_RAW_DECL_SETSTATE_R _GL_WARN_ON_USE (setstate, "setstate is unportable - " "use gnulib module random for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if @REPLACE_RANDOM_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef random_r # define random_r rpl_random_r # endif _GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); # else # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); # endif _GL_CXXALIASWARN (random_r); #elif defined GNULIB_POSIXCHECK # undef random_r # if HAVE_RAW_DECL_RANDOM_R _GL_WARN_ON_USE (random_r, "random_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if @REPLACE_RANDOM_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef srandom_r # define srandom_r rpl_srandom_r # endif _GL_FUNCDECL_RPL (srandom_r, int, (unsigned int seed, struct random_data *rand_state) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (srandom_r, int, (unsigned int seed, struct random_data *rand_state)); # else # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (srandom_r, int, (unsigned int seed, struct random_data *rand_state) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (srandom_r, int, (unsigned int seed, struct random_data *rand_state)); # endif _GL_CXXALIASWARN (srandom_r); #elif defined GNULIB_POSIXCHECK # undef srandom_r # if HAVE_RAW_DECL_SRANDOM_R _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if @REPLACE_RANDOM_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef initstate_r # define initstate_r rpl_initstate_r # endif _GL_FUNCDECL_RPL (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state) _GL_ARG_NONNULL ((2, 4))); _GL_CXXALIAS_RPL (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state)); # else # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state)); # endif _GL_CXXALIASWARN (initstate_r); #elif defined GNULIB_POSIXCHECK # undef initstate_r # if HAVE_RAW_DECL_INITSTATE_R _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if @REPLACE_RANDOM_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setstate_r # define setstate_r rpl_setstate_r # endif _GL_FUNCDECL_RPL (setstate_r, int, (char *arg_state, struct random_data *rand_state) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (setstate_r, int, (char *arg_state, struct random_data *rand_state)); # else # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state)); # endif _GL_CXXALIASWARN (setstate_r); #elif defined GNULIB_POSIXCHECK # undef setstate_r # if HAVE_RAW_DECL_SETSTATE_R _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_REALLOC_POSIX@ # if @REPLACE_REALLOC@ # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef realloc # define realloc rpl_realloc # endif _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); # else _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif _GL_CXXALIASWARN (realloc); #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC # undef realloc /* Assume realloc is always declared. */ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); #endif #if @GNULIB_REALPATH@ # if @REPLACE_REALPATH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define realpath rpl_realpath # endif _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); # else # if !@HAVE_REALPATH@ _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); # endif _GL_CXXALIASWARN (realpath); #elif defined GNULIB_POSIXCHECK # undef realpath # if HAVE_RAW_DECL_REALPATH _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " "canonicalize or canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_RPMATCH@ /* Test a user response to a question. Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ # if !@HAVE_RPMATCH@ _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); _GL_CXXALIASWARN (rpmatch); #elif defined GNULIB_POSIXCHECK # undef rpmatch # if HAVE_RAW_DECL_RPMATCH _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " "use gnulib module rpmatch for portability"); # endif #endif #if @GNULIB_SECURE_GETENV@ /* Look up NAME in the environment, returning 0 in insecure situations. */ # if !@HAVE_SECURE_GETENV@ _GL_FUNCDECL_SYS (secure_getenv, char *, (char const *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); _GL_CXXALIASWARN (secure_getenv); #elif defined GNULIB_POSIXCHECK # undef secure_getenv # if HAVE_RAW_DECL_SECURE_GETENV _GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " "use gnulib module secure_getenv for portability"); # endif #endif #if @GNULIB_SETENV@ /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ # if @REPLACE_SETENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setenv # define setenv rpl_setenv # endif _GL_FUNCDECL_RPL (setenv, int, (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (setenv, int, (const char *name, const char *value, int replace)); # else # if !@HAVE_DECL_SETENV@ _GL_FUNCDECL_SYS (setenv, int, (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (setenv, int, (const char *name, const char *value, int replace)); # endif # if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) _GL_CXXALIASWARN (setenv); # endif #elif defined GNULIB_POSIXCHECK # undef setenv # if HAVE_RAW_DECL_SETENV _GL_WARN_ON_USE (setenv, "setenv is unportable - " "use gnulib module setenv for portability"); # endif #endif #if @GNULIB_STRTOD@ /* Parse a double from STRING, updating ENDP if appropriate. */ # if @REPLACE_STRTOD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strtod rpl_strtod # endif _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); # else # if !@HAVE_STRTOD@ _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); # endif _GL_CXXALIASWARN (strtod); #elif defined GNULIB_POSIXCHECK # undef strtod # if HAVE_RAW_DECL_STRTOD _GL_WARN_ON_USE (strtod, "strtod is unportable - " "use gnulib module strtod for portability"); # endif #endif #if @GNULIB_STRTOLL@ /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ # if !@HAVE_STRTOLL@ _GL_FUNCDECL_SYS (strtoll, long long, (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *string, char **endptr, int base)); _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll # if HAVE_RAW_DECL_STRTOLL _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " "use gnulib module strtoll for portability"); # endif #endif #if @GNULIB_STRTOULL@ /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ # if !@HAVE_STRTOULL@ _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *string, char **endptr, int base)); _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull # if HAVE_RAW_DECL_STRTOULL _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " "use gnulib module strtoull for portability"); # endif #endif #if @GNULIB_UNLOCKPT@ /* Unlock the slave side of the pseudo-terminal whose master side is specified by FD, so that it can be opened. */ # if !@HAVE_UNLOCKPT@ _GL_FUNCDECL_SYS (unlockpt, int, (int fd)); # endif _GL_CXXALIAS_SYS (unlockpt, int, (int fd)); _GL_CXXALIASWARN (unlockpt); #elif defined GNULIB_POSIXCHECK # undef unlockpt # if HAVE_RAW_DECL_UNLOCKPT _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " "use gnulib module unlockpt for portability"); # endif #endif #if @GNULIB_UNSETENV@ /* Remove the variable NAME from the environment. */ # if @REPLACE_UNSETENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unsetenv # define unsetenv rpl_unsetenv # endif _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); # else # if !@HAVE_DECL_UNSETENV@ _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); # endif # if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) _GL_CXXALIASWARN (unsetenv); # endif #elif defined GNULIB_POSIXCHECK # undef unsetenv # if HAVE_RAW_DECL_UNSETENV _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " "use gnulib module unsetenv for portability"); # endif #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCTOMB@ # if @REPLACE_WCTOMB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wctomb # define wctomb rpl_wctomb # endif _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); # else _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); # endif _GL_CXXALIASWARN (wctomb); #endif #endif /* _@GUARD_PREFIX@_STDLIB_H */ #endif /* _@GUARD_PREFIX@_STDLIB_H */ #endif pspp-1.0.1/gl/tempname.h0000644000175000017500000000441413124536243012003 00000000000000/* Create a temporary file or directory. Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* header written by Eric Blake */ #ifndef GL_TEMPNAME_H # define GL_TEMPNAME_H # include # ifdef __GT_FILE # define GT_FILE __GT_FILE # define GT_DIR __GT_DIR # define GT_NOCREATE __GT_NOCREATE # else # define GT_FILE 0 # define GT_DIR 1 # define GT_NOCREATE 2 # endif #ifdef __cplusplus extern "C" { #endif /* Generate a temporary file name based on TMPL. TMPL must match the rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). The name constructed does not exist at the time of the call to gen_tempname. TMPL is overwritten with the result. KIND may be one of: GT_NOCREATE: simply verify that the name does not exist at the time of the call. GT_FILE: create a large file using open(O_CREAT|O_EXCL) and return a read-write fd. The file is mode 0600. GT_DIR: create a directory, which will be mode 0700. We use a clever algorithm to get hard-to-predict names. */ extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind); /* Similar to gen_tempname, but TRYFUNC is called for each temporary name to try. If TRYFUNC returns a non-negative number, TRY_GEN_TEMPNAME returns with this value. Otherwise, if errno is set to EEXIST, another name is tried, or else TRY_GEN_TEMPNAME returns -1. */ extern int try_tempname (char *tmpl, int suffixlen, void *args, int (*tryfunc) (char *, void *)); #ifdef __cplusplus } #endif #endif /* GL_TEMPNAME_H */ pspp-1.0.1/gl/gl_list.h0000644000175000017500000010617613124536242011641 00000000000000/* Abstract sequential list data type. -*- coding: utf-8 -*- Copyright (C) 2006-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 . */ #ifndef _GL_LIST_H #define _GL_LIST_H #include #include #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef GL_LIST_INLINE # define GL_LIST_INLINE _GL_INLINE #endif #ifdef __cplusplus extern "C" { #endif /* gl_list is an abstract list data type. It can contain any number of objects ('void *' or 'const void *' pointers) in any given order. Duplicates are allowed, but can optionally be forbidden. There are several implementations of this list datatype, optimized for different operations or for memory. You can start using the simplest list implementation, GL_ARRAY_LIST, and switch to a different implementation later, when you realize which operations are performed the most frequently. The API of the different implementations is exactly the same; when switching to a different implementation, you only have to change the gl_list_create call. The implementations are: GL_ARRAY_LIST a growable array GL_CARRAY_LIST a growable circular array GL_LINKED_LIST a linked list GL_AVLTREE_LIST a binary tree (AVL tree) GL_RBTREE_LIST a binary tree (red-black tree) GL_LINKEDHASH_LIST a hash table with a linked list GL_AVLTREEHASH_LIST a hash table with a binary tree (AVL tree) GL_RBTREEHASH_LIST a hash table with a binary tree (red-black tree) The memory consumption is asymptotically the same: O(1) for every object in the list. When looking more closely at the average memory consumed for an object, GL_ARRAY_LIST is the most compact representation, and GL_LINKEDHASH_LIST and GL_TREEHASH_LIST need more memory. The guaranteed average performance of the operations is, for a list of n elements: Operation ARRAY LINKED TREE LINKEDHASH TREEHASH CARRAY with|without with|without duplicates duplicates gl_list_size O(1) O(1) O(1) O(1) O(1) gl_list_node_value O(1) O(1) O(1) O(1) O(1) gl_list_node_set_value O(1) O(1) O(1) O(1) O((log n)²)/O(1) gl_list_next_node O(1) O(1) O(log n) O(1) O(log n) gl_list_previous_node O(1) O(1) O(log n) O(1) O(log n) gl_list_get_at O(1) O(n) O(log n) O(n) O(log n) gl_list_set_at O(1) O(n) O(log n) O(n) O((log n)²)/O(log n) gl_list_search O(n) O(n) O(n) O(n)/O(1) O(log n)/O(1) gl_list_search_from O(n) O(n) O(n) O(n)/O(1) O((log n)²)/O(log n) gl_list_search_from_to O(n) O(n) O(n) O(n)/O(1) O((log n)²)/O(log n) gl_list_indexof O(n) O(n) O(n) O(n) O(log n) gl_list_indexof_from O(n) O(n) O(n) O(n) O((log n)²)/O(log n) gl_list_indexof_from_to O(n) O(n) O(n) O(n) O((log n)²)/O(log n) gl_list_add_first O(n)/O(1) O(1) O(log n) O(1) O((log n)²)/O(log n) gl_list_add_last O(1) O(1) O(log n) O(1) O((log n)²)/O(log n) gl_list_add_before O(n) O(1) O(log n) O(1) O((log n)²)/O(log n) gl_list_add_after O(n) O(1) O(log n) O(1) O((log n)²)/O(log n) gl_list_add_at O(n) O(n) O(log n) O(n) O((log n)²)/O(log n) gl_list_remove_node O(n) O(1) O(log n) O(n)/O(1) O((log n)²)/O(log n) gl_list_remove_at O(n) O(n) O(log n) O(n) O((log n)²)/O(log n) gl_list_remove O(n) O(n) O(n) O(n)/O(1) O((log n)²)/O(log n) gl_list_iterator O(1) O(1) O(log n) O(1) O(log n) gl_list_iterator_from_to O(1) O(n) O(log n) O(n) O(log n) gl_list_iterator_next O(1) O(1) O(log n) O(1) O(log n) gl_sortedlist_search O(log n) O(n) O(log n) O(n) O(log n) gl_sortedlist_search_from O(log n) O(n) O(log n) O(n) O(log n) gl_sortedlist_indexof O(log n) O(n) O(log n) O(n) O(log n) gl_sortedlist_indexof_fro O(log n) O(n) O(log n) O(n) O(log n) gl_sortedlist_add O(n) O(n) O(log n) O(n) O((log n)²)/O(log n) gl_sortedlist_remove O(n) O(n) O(log n) O(n) O((log n)²)/O(log n) */ /* -------------------------- gl_list_t Data Type -------------------------- */ /* Type of function used to compare two elements. NULL denotes pointer comparison. */ typedef bool (*gl_listelement_equals_fn) (const void *elt1, const void *elt2); /* Type of function used to compute a hash code. NULL denotes a function that depends only on the pointer itself. */ typedef size_t (*gl_listelement_hashcode_fn) (const void *elt); /* Type of function used to dispose an element once it's removed from a list. NULL denotes a no-op. */ typedef void (*gl_listelement_dispose_fn) (const void *elt); struct gl_list_impl; /* Type representing an entire list. */ typedef struct gl_list_impl * gl_list_t; struct gl_list_node_impl; /* Type representing the position of an element in the list, in a way that is more adapted to the list implementation than a plain index. Note: It is invalidated by insertions and removals! */ typedef struct gl_list_node_impl * gl_list_node_t; struct gl_list_implementation; /* Type representing a list datatype implementation. */ typedef const struct gl_list_implementation * gl_list_implementation_t; #if 0 /* Unless otherwise specified, these are defined inline below. */ /* Create an empty list. IMPLEMENTATION is one of GL_ARRAY_LIST, GL_CARRAY_LIST, GL_LINKED_LIST, GL_AVLTREE_LIST, GL_RBTREE_LIST, GL_LINKEDHASH_LIST, GL_AVLTREEHASH_LIST, GL_RBTREEHASH_LIST. EQUALS_FN is an element comparison function or NULL. HASHCODE_FN is an element hash code function or NULL. DISPOSE_FN is an element disposal function or NULL. ALLOW_DUPLICATES is false if duplicate elements shall not be allowed in the list. The implementation may verify this at runtime. */ /* declared in gl_xlist.h */ extern gl_list_t gl_list_create_empty (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates); /* Likewise. Return NULL upon out-of-memory. */ extern gl_list_t gl_list_nx_create_empty (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates); /* Create a list with given contents. IMPLEMENTATION is one of GL_ARRAY_LIST, GL_CARRAY_LIST, GL_LINKED_LIST, GL_AVLTREE_LIST, GL_RBTREE_LIST, GL_LINKEDHASH_LIST, GL_AVLTREEHASH_LIST, GL_RBTREEHASH_LIST. EQUALS_FN is an element comparison function or NULL. HASHCODE_FN is an element hash code function or NULL. DISPOSE_FN is an element disposal function or NULL. ALLOW_DUPLICATES is false if duplicate elements shall not be allowed in the list. The implementation may verify this at runtime. COUNT is the number of initial elements. CONTENTS[0..COUNT-1] is the initial contents. */ /* declared in gl_xlist.h */ extern gl_list_t gl_list_create (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates, size_t count, const void **contents); /* Likewise. Return NULL upon out-of-memory. */ extern gl_list_t gl_list_nx_create (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates, size_t count, const void **contents); /* Return the current number of elements in a list. */ extern size_t gl_list_size (gl_list_t list); /* Return the element value represented by a list node. */ extern const void * gl_list_node_value (gl_list_t list, gl_list_node_t node); /* Replace the element value represented by a list node. */ /* declared in gl_xlist.h */ extern void gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt); /* Likewise. Return 0 upon success, -1 upon out-of-memory. */ extern int gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node, const void *elt) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif ; /* Return the node immediately after the given node in the list, or NULL if the given node is the last (rightmost) one in the list. */ extern gl_list_node_t gl_list_next_node (gl_list_t list, gl_list_node_t node); /* Return the node immediately before the given node in the list, or NULL if the given node is the first (leftmost) one in the list. */ extern gl_list_node_t gl_list_previous_node (gl_list_t list, gl_list_node_t node); /* Return the element at a given position in the list. POSITION must be >= 0 and < gl_list_size (list). */ extern const void * gl_list_get_at (gl_list_t list, size_t position); /* Replace the element at a given position in the list. POSITION must be >= 0 and < gl_list_size (list). Return its node. */ /* declared in gl_xlist.h */ extern gl_list_node_t gl_list_set_at (gl_list_t list, size_t position, const void *elt); /* Likewise. Return NULL upon out-of-memory. */ extern gl_list_node_t gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif ; /* Search whether an element is already in the list. Return its node if found, or NULL if not present in the list. */ extern gl_list_node_t gl_list_search (gl_list_t list, const void *elt); /* Search whether an element is already in the list, at a position >= START_INDEX. Return its node if found, or NULL if not present in the list. */ extern gl_list_node_t gl_list_search_from (gl_list_t list, size_t start_index, const void *elt); /* Search whether an element is already in the list, at a position >= START_INDEX and < END_INDEX. Return its node if found, or NULL if not present in the list. */ extern gl_list_node_t gl_list_search_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt); /* Search whether an element is already in the list. Return its position if found, or (size_t)(-1) if not present in the list. */ extern size_t gl_list_indexof (gl_list_t list, const void *elt); /* Search whether an element is already in the list, at a position >= START_INDEX. Return its position if found, or (size_t)(-1) if not present in the list. */ extern size_t gl_list_indexof_from (gl_list_t list, size_t start_index, const void *elt); /* Search whether an element is already in the list, at a position >= START_INDEX and < END_INDEX. Return its position if found, or (size_t)(-1) if not present in the list. */ extern size_t gl_list_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt); /* Add an element as the first element of the list. Return its node. */ /* declared in gl_xlist.h */ extern gl_list_node_t gl_list_add_first (gl_list_t list, const void *elt); /* Likewise. Return NULL upon out-of-memory. */ extern gl_list_node_t gl_list_nx_add_first (gl_list_t list, const void *elt) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif ; /* Add an element as the last element of the list. Return its node. */ /* declared in gl_xlist.h */ extern gl_list_node_t gl_list_add_last (gl_list_t list, const void *elt); /* Likewise. Return NULL upon out-of-memory. */ extern gl_list_node_t gl_list_nx_add_last (gl_list_t list, const void *elt) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif ; /* Add an element before a given element node of the list. Return its node. */ /* declared in gl_xlist.h */ extern gl_list_node_t gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt); /* Likewise. Return NULL upon out-of-memory. */ extern gl_list_node_t gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif ; /* Add an element after a given element node of the list. Return its node. */ /* declared in gl_xlist.h */ extern gl_list_node_t gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt); /* Likewise. Return NULL upon out-of-memory. */ extern gl_list_node_t gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif ; /* Add an element at a given position in the list. POSITION must be >= 0 and <= gl_list_size (list). */ /* declared in gl_xlist.h */ extern gl_list_node_t gl_list_add_at (gl_list_t list, size_t position, const void *elt); /* Likewise. Return NULL upon out-of-memory. */ extern gl_list_node_t gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif ; /* Remove an element from the list. Return true. */ extern bool gl_list_remove_node (gl_list_t list, gl_list_node_t node); /* Remove an element at a given position from the list. POSITION must be >= 0 and < gl_list_size (list). Return true. */ extern bool gl_list_remove_at (gl_list_t list, size_t position); /* Search and remove an element from the list. Return true if it was found and removed. */ extern bool gl_list_remove (gl_list_t list, const void *elt); /* Free an entire list. (But this call does not free the elements of the list.) */ extern void gl_list_free (gl_list_t list); #endif /* End of inline and gl_xlist.h-defined functions. */ /* --------------------- gl_list_iterator_t Data Type --------------------- */ /* Functions for iterating through a list. */ /* Type of an iterator that traverses a list. This is a fixed-size struct, so that creation of an iterator doesn't need memory allocation on the heap. */ typedef struct { /* For fast dispatch of gl_list_iterator_next. */ const struct gl_list_implementation *vtable; /* For detecting whether the last returned element was removed. */ gl_list_t list; size_t count; /* Other, implementation-private fields. */ void *p; void *q; size_t i; size_t j; } gl_list_iterator_t; #if 0 /* These are defined inline below. */ /* Create an iterator traversing a list. The list contents must not be modified while the iterator is in use, except for replacing or removing the last returned element. */ extern gl_list_iterator_t gl_list_iterator (gl_list_t list); /* Create an iterator traversing the element with indices i, start_index <= i < end_index, of a list. The list contents must not be modified while the iterator is in use, except for replacing or removing the last returned element. */ extern gl_list_iterator_t gl_list_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index); /* If there is a next element, store the next element in *ELTP, store its node in *NODEP if NODEP is non-NULL, advance the iterator and return true. Otherwise, return false. */ extern bool gl_list_iterator_next (gl_list_iterator_t *iterator, const void **eltp, gl_list_node_t *nodep); /* Free an iterator. */ extern void gl_list_iterator_free (gl_list_iterator_t *iterator); #endif /* End of inline functions. */ /* ---------------------- Sorted gl_list_t Data Type ---------------------- */ /* The following functions are for lists without duplicates where the order is given by a sort criterion. */ /* Type of function used to compare two elements. Same as for qsort(). NULL denotes pointer comparison. */ typedef int (*gl_listelement_compar_fn) (const void *elt1, const void *elt2); #if 0 /* Unless otherwise specified, these are defined inline below. */ /* Search whether an element is already in the list. The list is assumed to be sorted with COMPAR. Return its node if found, or NULL if not present in the list. If the list contains several copies of ELT, the node of the leftmost one is returned. */ extern gl_list_node_t gl_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, const void *elt); /* Search whether an element is already in the list. The list is assumed to be sorted with COMPAR. Only list elements with indices >= START_INDEX and < END_INDEX are considered; the implementation uses these bounds to minimize the number of COMPAR invocations. Return its node if found, or NULL if not present in the list. If the list contains several copies of ELT, the node of the leftmost one is returned. */ extern gl_list_node_t gl_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt); /* Search whether an element is already in the list. The list is assumed to be sorted with COMPAR. Return its position if found, or (size_t)(-1) if not present in the list. If the list contains several copies of ELT, the position of the leftmost one is returned. */ extern size_t gl_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt); /* Search whether an element is already in the list. The list is assumed to be sorted with COMPAR. Only list elements with indices >= START_INDEX and < END_INDEX are considered; the implementation uses these bounds to minimize the number of COMPAR invocations. Return its position if found, or (size_t)(-1) if not present in the list. If the list contains several copies of ELT, the position of the leftmost one is returned. */ extern size_t gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt); /* Add an element at the appropriate position in the list. The list is assumed to be sorted with COMPAR. Return its node. */ /* declared in gl_xlist.h */ extern gl_list_node_t gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt); /* Likewise. Return NULL upon out-of-memory. */ extern gl_list_node_t gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif ; /* Search and remove an element from the list. The list is assumed to be sorted with COMPAR. Return true if it was found and removed. If the list contains several copies of ELT, only the leftmost one is removed. */ extern bool gl_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar, const void *elt); #endif /* End of inline and gl_xlist.h-defined functions. */ /* ------------------------ Implementation Details ------------------------ */ struct gl_list_implementation { /* gl_list_t functions. */ gl_list_t (*nx_create_empty) (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates); gl_list_t (*nx_create) (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates, size_t count, const void **contents); size_t (*size) (gl_list_t list); const void * (*node_value) (gl_list_t list, gl_list_node_t node); int (*node_nx_set_value) (gl_list_t list, gl_list_node_t node, const void *elt); gl_list_node_t (*next_node) (gl_list_t list, gl_list_node_t node); gl_list_node_t (*previous_node) (gl_list_t list, gl_list_node_t node); const void * (*get_at) (gl_list_t list, size_t position); gl_list_node_t (*nx_set_at) (gl_list_t list, size_t position, const void *elt); gl_list_node_t (*search_from_to) (gl_list_t list, size_t start_index, size_t end_index, const void *elt); size_t (*indexof_from_to) (gl_list_t list, size_t start_index, size_t end_index, const void *elt); gl_list_node_t (*nx_add_first) (gl_list_t list, const void *elt); gl_list_node_t (*nx_add_last) (gl_list_t list, const void *elt); gl_list_node_t (*nx_add_before) (gl_list_t list, gl_list_node_t node, const void *elt); gl_list_node_t (*nx_add_after) (gl_list_t list, gl_list_node_t node, const void *elt); gl_list_node_t (*nx_add_at) (gl_list_t list, size_t position, const void *elt); bool (*remove_node) (gl_list_t list, gl_list_node_t node); bool (*remove_at) (gl_list_t list, size_t position); bool (*remove_elt) (gl_list_t list, const void *elt); void (*list_free) (gl_list_t list); /* gl_list_iterator_t functions. */ gl_list_iterator_t (*iterator) (gl_list_t list); gl_list_iterator_t (*iterator_from_to) (gl_list_t list, size_t start_index, size_t end_index); bool (*iterator_next) (gl_list_iterator_t *iterator, const void **eltp, gl_list_node_t *nodep); void (*iterator_free) (gl_list_iterator_t *iterator); /* Sorted gl_list_t functions. */ gl_list_node_t (*sortedlist_search) (gl_list_t list, gl_listelement_compar_fn compar, const void *elt); gl_list_node_t (*sortedlist_search_from_to) (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt); size_t (*sortedlist_indexof) (gl_list_t list, gl_listelement_compar_fn compar, const void *elt); size_t (*sortedlist_indexof_from_to) (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt); gl_list_node_t (*sortedlist_nx_add) (gl_list_t list, gl_listelement_compar_fn compar, const void *elt); bool (*sortedlist_remove) (gl_list_t list, gl_listelement_compar_fn compar, const void *elt); }; struct gl_list_impl_base { const struct gl_list_implementation *vtable; gl_listelement_equals_fn equals_fn; gl_listelement_hashcode_fn hashcode_fn; gl_listelement_dispose_fn dispose_fn; bool allow_duplicates; }; /* Define all functions of this file as accesses to the struct gl_list_implementation. */ GL_LIST_INLINE gl_list_t gl_list_nx_create_empty (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates) { return implementation->nx_create_empty (implementation, equals_fn, hashcode_fn, dispose_fn, allow_duplicates); } GL_LIST_INLINE gl_list_t gl_list_nx_create (gl_list_implementation_t implementation, gl_listelement_equals_fn equals_fn, gl_listelement_hashcode_fn hashcode_fn, gl_listelement_dispose_fn dispose_fn, bool allow_duplicates, size_t count, const void **contents) { return implementation->nx_create (implementation, equals_fn, hashcode_fn, dispose_fn, allow_duplicates, count, contents); } GL_LIST_INLINE size_t gl_list_size (gl_list_t list) { return ((const struct gl_list_impl_base *) list)->vtable ->size (list); } GL_LIST_INLINE const void * gl_list_node_value (gl_list_t list, gl_list_node_t node) { return ((const struct gl_list_impl_base *) list)->vtable ->node_value (list, node); } GL_LIST_INLINE int #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->node_nx_set_value (list, node, elt); } GL_LIST_INLINE gl_list_node_t gl_list_next_node (gl_list_t list, gl_list_node_t node) { return ((const struct gl_list_impl_base *) list)->vtable ->next_node (list, node); } GL_LIST_INLINE gl_list_node_t gl_list_previous_node (gl_list_t list, gl_list_node_t node) { return ((const struct gl_list_impl_base *) list)->vtable ->previous_node (list, node); } GL_LIST_INLINE const void * gl_list_get_at (gl_list_t list, size_t position) { return ((const struct gl_list_impl_base *) list)->vtable ->get_at (list, position); } GL_LIST_INLINE gl_list_node_t #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->nx_set_at (list, position, elt); } GL_LIST_INLINE gl_list_node_t gl_list_search (gl_list_t list, const void *elt) { size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list); return ((const struct gl_list_impl_base *) list)->vtable ->search_from_to (list, 0, size, elt); } GL_LIST_INLINE gl_list_node_t gl_list_search_from (gl_list_t list, size_t start_index, const void *elt) { size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list); return ((const struct gl_list_impl_base *) list)->vtable ->search_from_to (list, start_index, size, elt); } GL_LIST_INLINE gl_list_node_t gl_list_search_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->search_from_to (list, start_index, end_index, elt); } GL_LIST_INLINE size_t gl_list_indexof (gl_list_t list, const void *elt) { size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list); return ((const struct gl_list_impl_base *) list)->vtable ->indexof_from_to (list, 0, size, elt); } GL_LIST_INLINE size_t gl_list_indexof_from (gl_list_t list, size_t start_index, const void *elt) { size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list); return ((const struct gl_list_impl_base *) list)->vtable ->indexof_from_to (list, start_index, size, elt); } GL_LIST_INLINE size_t gl_list_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->indexof_from_to (list, start_index, end_index, elt); } GL_LIST_INLINE gl_list_node_t #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif gl_list_nx_add_first (gl_list_t list, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->nx_add_first (list, elt); } GL_LIST_INLINE gl_list_node_t #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif gl_list_nx_add_last (gl_list_t list, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->nx_add_last (list, elt); } GL_LIST_INLINE gl_list_node_t #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->nx_add_before (list, node, elt); } GL_LIST_INLINE gl_list_node_t #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->nx_add_after (list, node, elt); } GL_LIST_INLINE gl_list_node_t #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->nx_add_at (list, position, elt); } GL_LIST_INLINE bool gl_list_remove_node (gl_list_t list, gl_list_node_t node) { return ((const struct gl_list_impl_base *) list)->vtable ->remove_node (list, node); } GL_LIST_INLINE bool gl_list_remove_at (gl_list_t list, size_t position) { return ((const struct gl_list_impl_base *) list)->vtable ->remove_at (list, position); } GL_LIST_INLINE bool gl_list_remove (gl_list_t list, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->remove_elt (list, elt); } GL_LIST_INLINE void gl_list_free (gl_list_t list) { ((const struct gl_list_impl_base *) list)->vtable->list_free (list); } GL_LIST_INLINE gl_list_iterator_t gl_list_iterator (gl_list_t list) { return ((const struct gl_list_impl_base *) list)->vtable ->iterator (list); } GL_LIST_INLINE gl_list_iterator_t gl_list_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index) { return ((const struct gl_list_impl_base *) list)->vtable ->iterator_from_to (list, start_index, end_index); } GL_LIST_INLINE bool gl_list_iterator_next (gl_list_iterator_t *iterator, const void **eltp, gl_list_node_t *nodep) { return iterator->vtable->iterator_next (iterator, eltp, nodep); } GL_LIST_INLINE void gl_list_iterator_free (gl_list_iterator_t *iterator) { iterator->vtable->iterator_free (iterator); } GL_LIST_INLINE gl_list_node_t gl_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->sortedlist_search (list, compar, elt); } GL_LIST_INLINE gl_list_node_t gl_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->sortedlist_search_from_to (list, compar, start_index, end_index, elt); } GL_LIST_INLINE size_t gl_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->sortedlist_indexof (list, compar, elt); } GL_LIST_INLINE size_t gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->sortedlist_indexof_from_to (list, compar, start_index, end_index, elt); } GL_LIST_INLINE gl_list_node_t #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) __attribute__ ((__warn_unused_result__)) #endif gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->sortedlist_nx_add (list, compar, elt); } GL_LIST_INLINE bool gl_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar, const void *elt) { return ((const struct gl_list_impl_base *) list)->vtable ->sortedlist_remove (list, compar, elt); } #ifdef __cplusplus } #endif _GL_INLINE_HEADER_END #endif /* _GL_LIST_H */ pspp-1.0.1/gl/signbitd.c0000644000175000017500000000406613124536243011776 00000000000000/* signbit() macro: Determine the sign bit of a floating-point number. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include #include #include "isnand-nolibm.h" #include "float+.h" #ifdef gl_signbitd_OPTIMIZED_MACRO # undef gl_signbitd #endif int gl_signbitd (double arg) { #if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT /* The use of a union to extract the bits of the representation of a 'long double' is safe in practice, despite of the "aliasing rules" of C99, because the GCC docs say "Even with '-fstrict-aliasing', type-punning is allowed, provided the memory is accessed through the union type." and similarly for other compilers. */ # define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { double value; unsigned int word[NWORDS]; } m; m.value = arg; return (m.word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; #elif HAVE_COPYSIGN_IN_LIBC return copysign (1.0, arg) < 0; #else /* This does not do the right thing for NaN, but this is irrelevant for most use cases. */ if (isnand (arg)) return 0; if (arg < 0.0) return 1; else if (arg == 0.0) { /* Distinguish 0.0 and -0.0. */ static double plus_zero = 0.0; double arg_mem = arg; return (memcmp (&plus_zero, &arg_mem, SIZEOF_DBL) != 0); } else return 0; #endif } pspp-1.0.1/gl/mbiter.h0000644000175000017500000001675313124536242011467 00000000000000/* Iterating through multibyte strings: macros for multi-byte encodings. Copyright (C) 2001, 2005, 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible . */ /* The macros in this file implement forward iteration through a multi-byte string. With these macros, an iteration loop that looks like char *iter; for (iter = buf; iter < buf + buflen; iter++) { do_something (*iter); } becomes mbi_iterator_t iter; for (mbi_init (iter, buf, buflen); mbi_avail (iter); mbi_advance (iter)) { do_something (mbi_cur_ptr (iter), mb_len (mbi_cur (iter))); } The benefit of these macros over plain use of mbrtowc is: - Handling of invalid multibyte sequences is possible without making the code more complicated, while still preserving the invalid multibyte sequences. mbi_iterator_t is a type usable for variable declarations. mbi_init (iter, startptr, length) initializes the iterator, starting at startptr and crossing length bytes. mbi_avail (iter) returns true if there are more multibyte characters available before the end of string is reached. In this case, mbi_cur (iter) is initialized to the next multibyte character. mbi_advance (iter) advances the iterator by one multibyte character. mbi_cur (iter) returns the current multibyte character, of type mbchar_t. All the macros defined in mbchar.h can be used on it. mbi_cur_ptr (iter) return a pointer to the beginning of the current multibyte character. mbi_reloc (iter, ptrdiff) relocates iterator when the string is moved by ptrdiff bytes. mbi_copy (&destiter, &srciter) copies srciter to destiter. Here are the function prototypes of the macros. extern void mbi_init (mbi_iterator_t iter, const char *startptr, size_t length); extern bool mbi_avail (mbi_iterator_t iter); extern void mbi_advance (mbi_iterator_t iter); extern mbchar_t mbi_cur (mbi_iterator_t iter); extern const char * mbi_cur_ptr (mbi_iterator_t iter); extern void mbi_reloc (mbi_iterator_t iter, ptrdiff_t ptrdiff); extern void mbi_copy (mbi_iterator_t *new, const mbi_iterator_t *old); */ #ifndef _MBITER_H #define _MBITER_H 1 #include #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.1 has a bug: and must be included before . */ #include #include #include #include "mbchar.h" #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef MBITER_INLINE # define MBITER_INLINE _GL_INLINE #endif struct mbiter_multi { const char *limit; /* pointer to end of string */ bool in_shift; /* true if next byte may not be interpreted as ASCII */ mbstate_t state; /* if in_shift: current shift state */ bool next_done; /* true if mbi_avail has already filled the following */ struct mbchar cur; /* the current character: const char *cur.ptr pointer to current character The following are only valid after mbi_avail. size_t cur.bytes number of bytes of current character bool cur.wc_valid true if wc is a valid wide character wchar_t cur.wc if wc_valid: the current character */ }; MBITER_INLINE void mbiter_multi_next (struct mbiter_multi *iter) { if (iter->next_done) return; if (iter->in_shift) goto with_shift; /* Handle most ASCII characters quickly, without calling mbrtowc(). */ if (is_basic (*iter->cur.ptr)) { /* These characters are part of the basic character set. ISO C 99 guarantees that their wide character code is identical to their char code. */ iter->cur.bytes = 1; iter->cur.wc = *iter->cur.ptr; iter->cur.wc_valid = true; } else { assert (mbsinit (&iter->state)); iter->in_shift = true; with_shift: iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr, iter->limit - iter->cur.ptr, &iter->state); if (iter->cur.bytes == (size_t) -1) { /* An invalid multibyte sequence was encountered. */ iter->cur.bytes = 1; iter->cur.wc_valid = false; /* Whether to set iter->in_shift = false and reset iter->state or not is not very important; the string is bogus anyway. */ } else if (iter->cur.bytes == (size_t) -2) { /* An incomplete multibyte character at the end. */ iter->cur.bytes = iter->limit - iter->cur.ptr; iter->cur.wc_valid = false; /* Whether to set iter->in_shift = false and reset iter->state or not is not important; the string end is reached anyway. */ } else { if (iter->cur.bytes == 0) { /* A null wide character was encountered. */ iter->cur.bytes = 1; assert (*iter->cur.ptr == '\0'); assert (iter->cur.wc == 0); } iter->cur.wc_valid = true; /* When in the initial state, we can go back treating ASCII characters more quickly. */ if (mbsinit (&iter->state)) iter->in_shift = false; } } iter->next_done = true; } MBITER_INLINE void mbiter_multi_reloc (struct mbiter_multi *iter, ptrdiff_t ptrdiff) { iter->cur.ptr += ptrdiff; iter->limit += ptrdiff; } MBITER_INLINE void mbiter_multi_copy (struct mbiter_multi *new_iter, const struct mbiter_multi *old_iter) { new_iter->limit = old_iter->limit; if ((new_iter->in_shift = old_iter->in_shift)) memcpy (&new_iter->state, &old_iter->state, sizeof (mbstate_t)); else memset (&new_iter->state, 0, sizeof (mbstate_t)); new_iter->next_done = old_iter->next_done; mb_copy (&new_iter->cur, &old_iter->cur); } /* Iteration macros. */ typedef struct mbiter_multi mbi_iterator_t; #define mbi_init(iter, startptr, length) \ ((iter).cur.ptr = (startptr), (iter).limit = (iter).cur.ptr + (length), \ (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \ (iter).next_done = false) #define mbi_avail(iter) \ ((iter).cur.ptr < (iter).limit && (mbiter_multi_next (&(iter)), true)) #define mbi_advance(iter) \ ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false) /* Access to the current character. */ #define mbi_cur(iter) (iter).cur #define mbi_cur_ptr(iter) (iter).cur.ptr /* Relocation. */ #define mbi_reloc(iter, ptrdiff) mbiter_multi_reloc (&iter, ptrdiff) /* Copying an iterator. */ #define mbi_copy mbiter_multi_copy _GL_INLINE_HEADER_END #endif /* _MBITER_H */ pspp-1.0.1/gl/sys_uio.in.h0000644000175000017500000000317413124536243012276 00000000000000/* Substitute for . Copyright (C) 2011-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif @PRAGMA_COLUMNS@ #ifndef _@GUARD_PREFIX@_SYS_UIO_H #if @HAVE_SYS_UIO_H@ /* On OpenBSD 4.4, assumes prior inclusion of . */ # include /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_UIO_H@ #endif #ifndef _@GUARD_PREFIX@_SYS_UIO_H #define _@GUARD_PREFIX@_SYS_UIO_H #if !@HAVE_SYS_UIO_H@ /* A platform that lacks . */ /* Get 'size_t' and 'ssize_t'. */ # include # ifdef __cplusplus extern "C" { # endif # if !GNULIB_defined_struct_iovec /* All known platforms that lack also lack any declaration of struct iovec in any other header. */ struct iovec { void *iov_base; size_t iov_len; }; # define GNULIB_defined_struct_iovec 1 # endif # ifdef __cplusplus } # endif #endif #endif /* _@GUARD_PREFIX@_SYS_UIO_H */ #endif /* _@GUARD_PREFIX@_SYS_UIO_H */ pspp-1.0.1/gl/secure_getenv.c0000644000175000017500000000377613124536243013040 00000000000000/* Look up an environment variable, returning NULL in insecure situations. Copyright 2013-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include #if !HAVE___SECURE_GETENV # if HAVE_ISSETUGID || (HAVE_GETUID && HAVE_GETEUID && HAVE_GETGID && HAVE_GETEGID) # include # endif #endif char * secure_getenv (char const *name) { #if HAVE___SECURE_GETENV /* glibc */ return __secure_getenv (name); #elif HAVE_ISSETUGID /* OS X, FreeBSD, NetBSD, OpenBSD */ if (issetugid ()) return NULL; return getenv (name); #elif HAVE_GETUID && HAVE_GETEUID && HAVE_GETGID && HAVE_GETEGID /* other Unix */ if (geteuid () != getuid () || getegid () != getgid ()) return NULL; return getenv (name); #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* native Windows */ /* On native Windows, there is no such concept as setuid or setgid binaries. - Programs launched as system services have high privileges, but they don't inherit environment variables from a user. - Programs launched by a user with "Run as Administrator" have high privileges and use the environment variables, but the user has been asked whether he agrees. - Programs launched by a user without "Run as Administrator" cannot gain high privileges, therefore there is no risk. */ return getenv (name); #else return NULL; #endif } pspp-1.0.1/gl/progname.c0000644000175000017500000000615013124536242011776 00000000000000/* Program name management. Copyright (C) 2001-2003, 2005-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #include /* Specification. */ #undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */ #include "progname.h" #include /* get program_invocation_name declaration */ #include #include #include /* String containing name the program is called with. To be initialized by main(). */ const char *program_name = NULL; /* Set program_name, based on argv[0]. argv0 must be a string allocated with indefinite extent, and must not be modified after this call. */ void set_program_name (const char *argv0) { /* libtool creates a temporary executable whose name is sometimes prefixed with "lt-" (depends on the platform). It also makes argv[0] absolute. But the name of the temporary executable is a detail that should not be visible to the end user and to the test suite. Remove this "/.libs/" or "/.libs/lt-" prefix here. */ const char *slash; const char *base; /* Sanity check. POSIX requires the invoking process to pass a non-NULL argv[0]. */ if (argv0 == NULL) { /* It's a bug in the invoking program. Help diagnosing it. */ fputs ("A NULL argv[0] was passed through an exec system call.\n", stderr); abort (); } slash = strrchr (argv0, '/'); base = (slash != NULL ? slash + 1 : argv0); if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0) { argv0 = base; if (strncmp (base, "lt-", 3) == 0) { argv0 = base + 3; /* On glibc systems, remove the "lt-" prefix from the variable program_invocation_short_name. */ #if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME program_invocation_short_name = (char *) argv0; #endif } } /* But don't strip off a leading / in general, because when the user runs /some/hidden/place/bin/cp foo foo he should get the error message /some/hidden/place/bin/cp: `foo' and `foo' are the same file not cp: `foo' and `foo' are the same file */ program_name = argv0; /* On glibc systems, the error() function comes from libc and uses the variable program_invocation_name, not program_name. So set this variable as well. */ #if HAVE_DECL_PROGRAM_INVOCATION_NAME program_invocation_name = (char *) argv0; #endif } pspp-1.0.1/gl/printf-parse.h0000644000175000017500000001216313124536242012606 00000000000000/* Parse printf format string. Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _PRINTF_PARSE_H #define _PRINTF_PARSE_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. STATIC Set to 'static' to declare the function static. */ #if HAVE_FEATURES_H # include /* for __GLIBC__, __UCLIBC__ */ #endif #include "printf-args.h" /* Flags */ #define FLAG_GROUP 1 /* ' flag */ #define FLAG_LEFT 2 /* - flag */ #define FLAG_SHOWSIGN 4 /* + flag */ #define FLAG_SPACE 8 /* space flag */ #define FLAG_ALT 16 /* # flag */ #define FLAG_ZERO 32 #if __GLIBC__ >= 2 && !defined __UCLIBC__ # define FLAG_LOCALIZED 64 /* I flag, uses localized digits */ #endif /* arg_index value indicating that no argument is consumed. */ #define ARG_NONE (~(size_t)0) /* xxx_directive: A parsed directive. xxx_directives: A parsed format string. */ /* Number of directly allocated directives (no malloc() needed). */ #define N_DIRECT_ALLOC_DIRECTIVES 7 /* A parsed directive. */ typedef struct { const char* dir_start; const char* dir_end; int flags; const char* width_start; const char* width_end; size_t width_arg_index; const char* precision_start; const char* precision_end; size_t precision_arg_index; char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } char_directive; /* A parsed format string. */ typedef struct { size_t count; char_directive *dir; size_t max_width_length; size_t max_precision_length; char_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } char_directives; #if ENABLE_UNISTDIO /* A parsed directive. */ typedef struct { const uint8_t* dir_start; const uint8_t* dir_end; int flags; const uint8_t* width_start; const uint8_t* width_end; size_t width_arg_index; const uint8_t* precision_start; const uint8_t* precision_end; size_t precision_arg_index; uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u8_directive; /* A parsed format string. */ typedef struct { size_t count; u8_directive *dir; size_t max_width_length; size_t max_precision_length; u8_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u8_directives; /* A parsed directive. */ typedef struct { const uint16_t* dir_start; const uint16_t* dir_end; int flags; const uint16_t* width_start; const uint16_t* width_end; size_t width_arg_index; const uint16_t* precision_start; const uint16_t* precision_end; size_t precision_arg_index; uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u16_directive; /* A parsed format string. */ typedef struct { size_t count; u16_directive *dir; size_t max_width_length; size_t max_precision_length; u16_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u16_directives; /* A parsed directive. */ typedef struct { const uint32_t* dir_start; const uint32_t* dir_end; int flags; const uint32_t* width_start; const uint32_t* width_end; size_t width_arg_index; const uint32_t* precision_start; const uint32_t* precision_end; size_t precision_arg_index; uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u32_directive; /* A parsed format string. */ typedef struct { size_t count; u32_directive *dir; size_t max_width_length; size_t max_precision_length; u32_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u32_directives; #endif /* Parses the format string. Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments. */ #if ENABLE_UNISTDIO extern int ulc_printf_parse (const char *format, char_directives *d, arguments *a); extern int u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a); extern int u16_printf_parse (const uint16_t *format, u16_directives *d, arguments *a); extern int u32_printf_parse (const uint32_t *format, u32_directives *d, arguments *a); #else # ifdef STATIC STATIC # else extern # endif int printf_parse (const char *format, char_directives *d, arguments *a); #endif #endif /* _PRINTF_PARSE_H */ pspp-1.0.1/gl/md4.h0000644000175000017500000000603013124536242010654 00000000000000/* Declarations of functions and data types used for MD4 sum library functions. Copyright (C) 2000-2001, 2003, 2005, 2008-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef MD4_H # define MD4_H 1 # include # include # ifdef __cplusplus extern "C" { # endif # define MD4_DIGEST_SIZE 16 /* Structure to save state of computation between the single steps. */ struct md4_ctx { uint32_t A; uint32_t B; uint32_t C; uint32_t D; uint32_t total[2]; uint32_t buflen; uint32_t buffer[32]; }; /* Initialize structure containing state of computation. */ extern void md4_init_ctx (struct md4_ctx *ctx); /* Starting with the result of former calls of this function (or the initialization function update the context for the next LEN bytes starting at BUFFER. It is necessary that LEN is a multiple of 64!!! */ extern void md4_process_block (const void *buffer, size_t len, struct md4_ctx *ctx); /* Starting with the result of former calls of this function (or the initialization function update the context for the next LEN bytes starting at BUFFER. It is NOT required that LEN is a multiple of 64. */ extern void md4_process_bytes (const void *buffer, size_t len, struct md4_ctx *ctx); /* Process the remaining bytes in the buffer and put result from CTX in first 16 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *md4_finish_ctx (struct md4_ctx *ctx, void *resbuf); /* Put result from CTX in first 16 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *md4_read_ctx (const struct md4_ctx *ctx, void *resbuf); /* Compute MD4 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ extern int md4_stream (FILE * stream, void *resblock); /* Compute MD4 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *md4_buffer (const char *buffer, size_t len, void *resblock); # ifdef __cplusplus } # endif #endif pspp-1.0.1/gl/progreloc.c0000644000175000017500000003005513124536242012163 00000000000000/* Provide relocatable programs. Copyright (C) 2003-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 . */ #define _GL_USE_STDLIB_ALLOC 1 #include /* Specification. */ #include "progname.h" #include #include #include #include #include #include #include /* Get declaration of _NSGetExecutablePath on Mac OS X 10.2 or newer. */ #if HAVE_MACH_O_DYLD_H # include #endif #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define WINDOWS_NATIVE #endif #ifdef WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif #ifdef __EMX__ # define INCL_DOS # include #endif #include "relocatable.h" #ifdef NO_XMALLOC # include "areadlink.h" # define xreadlink areadlink #else # include "xreadlink.h" #endif #ifdef NO_XMALLOC # define xmalloc malloc # define xstrdup strdup #else # include "xalloc.h" #endif #ifndef O_EXEC # define O_EXEC O_RDONLY /* This is often close enough in older systems. */ #endif /* Declare canonicalize_file_name. The included above may be the system's one, not the gnulib one. */ extern char * canonicalize_file_name (const char *name); /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ /* Native Windows, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_PATH_WITH_DIR(P) \ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) # define FILE_SYSTEM_PREFIX_LEN(P) 0 #endif /* Use the system functions, not the gnulib overrides in this file. */ #undef sprintf #undef set_program_name #if ENABLE_RELOCATABLE #if defined __linux__ || defined __CYGWIN__ /* File descriptor of the executable. (Only used to verify that we find the correct executable.) */ static int executable_fd = -1; #endif /* Tests whether a given pathname may belong to the executable. */ static bool maybe_executable (const char *filename) { /* The native Windows API lacks the access() function. */ #if !defined WINDOWS_NATIVE if (access (filename, X_OK) < 0) return false; #endif #if defined __linux__ || defined __CYGWIN__ if (executable_fd >= 0) { /* If we already have an executable_fd, check that filename points to the same inode. */ struct stat statexe; struct stat statfile; if (fstat (executable_fd, &statexe) >= 0) { if (stat (filename, &statfile) < 0) return false; if (!(statfile.st_dev && statfile.st_dev == statexe.st_dev && statfile.st_ino == statexe.st_ino)) return false; } } #endif return true; } /* Determine the full pathname of the current executable, freshly allocated. Return NULL if unknown. Guaranteed to work on Linux and native Windows. Likely to work on the other Unixes (maybe except BeOS), under most conditions. */ static char * find_executable (const char *argv0) { #if defined WINDOWS_NATIVE /* Native Windows only. On Cygwin, it is better to use the Cygwin provided /proc interface, than to use native Windows API and cygwin_conv_to_posix_path, because it supports longer file names (see ). */ char location[MAX_PATH]; int length = GetModuleFileName (NULL, location, sizeof (location)); if (length < 0) return NULL; if (!IS_PATH_WITH_DIR (location)) /* Shouldn't happen. */ return NULL; return xstrdup (location); #elif defined __EMX__ PPIB ppib; char location[CCHMAXPATH]; /* See http://cyberkinetica.homeunix.net/os2tk45/cp1/619_L2H_DosGetInfoBlocksSynt.html for specification of DosGetInfoBlocks(). */ if (DosGetInfoBlocks (NULL, &ppib)) return NULL; /* See http://cyberkinetica.homeunix.net/os2tk45/cp1/1247_L2H_DosQueryModuleNameSy.html for specification of DosQueryModuleName(). */ if (DosQueryModuleName (ppib->pib_hmte, sizeof (location), location)) return NULL; _fnslashify (location); return xstrdup (location); #else /* Unix */ # ifdef __linux__ /* The executable is accessible as /proc//exe. In newer Linux versions, also as /proc/self/exe. Linux >= 2.1 provides a symlink to the true pathname; older Linux versions give only device and ino, enclosed in brackets, which we cannot use here. */ { char *link; link = xreadlink ("/proc/self/exe"); if (link != NULL && link[0] != '[') return link; if (executable_fd < 0) executable_fd = open ("/proc/self/exe", O_EXEC, 0); { char buf[6+10+5]; sprintf (buf, "/proc/%d/exe", getpid ()); link = xreadlink (buf); if (link != NULL && link[0] != '[') return link; if (executable_fd < 0) executable_fd = open (buf, O_EXEC, 0); } } # endif # ifdef __CYGWIN__ /* The executable is accessible as /proc//exe, at least in Cygwin >= 1.5. */ { char *link; link = xreadlink ("/proc/self/exe"); if (link != NULL) return link; if (executable_fd < 0) executable_fd = open ("/proc/self/exe", O_EXEC, 0); } # endif # if HAVE_MACH_O_DYLD_H && HAVE__NSGETEXECUTABLEPATH /* On Mac OS X 10.2 or newer, the function int _NSGetExecutablePath (char *buf, uint32_t *bufsize); can be used to retrieve the executable's full path. */ char location[4096]; unsigned int length = sizeof (location); if (_NSGetExecutablePath (location, &length) == 0 && location[0] == '/') return canonicalize_file_name (location); # endif /* Guess the executable's full path. We assume the executable has been called via execlp() or execvp() with properly set up argv[0]. The login(1) convention to add a '-' prefix to argv[0] is not supported. */ { bool has_slash = false; { const char *p; for (p = argv0; *p; p++) if (*p == '/') { has_slash = true; break; } } if (!has_slash) { /* exec searches paths without slashes in the directory list given by $PATH. */ const char *path = getenv ("PATH"); if (path != NULL) { const char *p; const char *p_next; for (p = path; *p; p = p_next) { const char *q; size_t p_len; char *concat_name; for (q = p; *q; q++) if (*q == ':') break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); /* We have a path item at p, of length p_len. Now concatenate the path item and argv0. */ concat_name = (char *) xmalloc (p_len + strlen (argv0) + 2); # ifdef NO_XMALLOC if (concat_name == NULL) return NULL; # endif if (p_len == 0) /* An empty PATH element designates the current directory. */ strcpy (concat_name, argv0); else { memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, argv0); } if (maybe_executable (concat_name)) return canonicalize_file_name (concat_name); free (concat_name); } } /* Not found in the PATH, assume the current directory. */ } /* exec treats paths containing slashes as relative to the current directory. */ if (maybe_executable (argv0)) return canonicalize_file_name (argv0); } /* No way to find the executable. */ return NULL; #endif } /* Full pathname of executable, or NULL. */ static char *executable_fullname; static void prepare_relocate (const char *orig_installprefix, const char *orig_installdir, const char *argv0) { char *curr_prefix; /* Determine the full pathname of the current executable. */ executable_fullname = find_executable (argv0); /* Determine the current installation prefix from it. */ curr_prefix = compute_curr_prefix (orig_installprefix, orig_installdir, executable_fullname); if (curr_prefix != NULL) { /* Now pass this prefix to all copies of the relocate.c source file. */ set_relocation_prefix (orig_installprefix, curr_prefix); free (curr_prefix); } } /* Set program_name, based on argv[0], and original installation prefix and directory, for relocatability. */ void set_program_name_and_installdir (const char *argv0, const char *orig_installprefix, const char *orig_installdir) { const char *argv0_stripped = argv0; /* Relocatable programs are renamed to .bin by install-reloc. Or, more generally, their suffix is changed from $exeext to .bin$exeext. Remove the ".bin" here. */ { size_t argv0_len = strlen (argv0); const size_t exeext_len = sizeof (EXEEXT) - sizeof (""); if (argv0_len > 4 + exeext_len) if (memcmp (argv0 + argv0_len - exeext_len - 4, ".bin", 4) == 0) { if (sizeof (EXEEXT) > sizeof ("")) { /* Compare using an inlined copy of c_strncasecmp(), because the filenames may have undergone a case conversion since they were packaged. In other words, EXEEXT may be ".exe" on one system and ".EXE" on another. */ static const char exeext[] = EXEEXT; const char *s1 = argv0 + argv0_len - exeext_len; const char *s2 = exeext; for (; *s1 != '\0'; s1++, s2++) { unsigned char c1 = *s1; unsigned char c2 = *s2; if ((c1 >= 'A' && c1 <= 'Z' ? c1 - 'A' + 'a' : c1) != (c2 >= 'A' && c2 <= 'Z' ? c2 - 'A' + 'a' : c2)) goto done_stripping; } } /* Remove ".bin" before EXEEXT or its equivalent. */ { char *shorter = (char *) xmalloc (argv0_len - 4 + 1); #ifdef NO_XMALLOC if (shorter != NULL) #endif { memcpy (shorter, argv0, argv0_len - exeext_len - 4); if (sizeof (EXEEXT) > sizeof ("")) memcpy (shorter + argv0_len - exeext_len - 4, argv0 + argv0_len - exeext_len - 4, exeext_len); shorter[argv0_len - 4] = '\0'; argv0_stripped = shorter; } } done_stripping: ; } } set_program_name (argv0_stripped); prepare_relocate (orig_installprefix, orig_installdir, argv0); } /* Return the full pathname of the current executable, based on the earlier call to set_program_name_and_installdir. Return NULL if unknown. */ char * get_full_program_name (void) { return executable_fullname; } #endif pspp-1.0.1/gl/mbchar.h0000644000175000017500000003342413124536242011433 00000000000000/* Multibyte character data type. Copyright (C) 2001, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible . */ /* A multibyte character is a short subsequence of a char* string, representing a single wide character. We use multibyte characters instead of wide characters because of the following goals: 1) correct multibyte handling, i.e. operate according to the LC_CTYPE locale, 2) ease of maintenance, i.e. the maintainer needs not know all details of the ISO C 99 standard, 3) don't fail grossly if the input is not in the encoding set by the locale, because often different encodings are in use in the same countries (ISO-8859-1/UTF-8, EUC-JP/Shift_JIS, ...), 4) fast in the case of ASCII characters, 5) portability, i.e. don't make unportable assumptions about wchar_t. Multibyte characters are only accessed through the mb* macros. mb_ptr (mbc) return a pointer to the beginning of the multibyte sequence. mb_len (mbc) returns the number of bytes occupied by the multibyte sequence. Always > 0. mb_iseq (mbc, sc) returns true if mbc is the standard ASCII character sc. mb_isnul (mbc) returns true if mbc is the nul character. mb_cmp (mbc1, mbc2) returns a positive, zero, or negative value depending on whether mbc1 sorts after, same or before mbc2. mb_casecmp (mbc1, mbc2) returns a positive, zero, or negative value depending on whether mbc1 sorts after, same or before mbc2, modulo upper/lowercase conversion. mb_equal (mbc1, mbc2) returns true if mbc1 and mbc2 are equal. mb_caseequal (mbc1, mbc2) returns true if mbc1 and mbc2 are equal modulo upper/lowercase conversion. mb_isalnum (mbc) returns true if mbc is alphanumeric. mb_isalpha (mbc) returns true if mbc is alphabetic. mb_isascii(mbc) returns true if mbc is plain ASCII. mb_isblank (mbc) returns true if mbc is a blank. mb_iscntrl (mbc) returns true if mbc is a control character. mb_isdigit (mbc) returns true if mbc is a decimal digit. mb_isgraph (mbc) returns true if mbc is a graphic character. mb_islower (mbc) returns true if mbc is lowercase. mb_isprint (mbc) returns true if mbc is a printable character. mb_ispunct (mbc) returns true if mbc is a punctuation character. mb_isspace (mbc) returns true if mbc is a space character. mb_isupper (mbc) returns true if mbc is uppercase. mb_isxdigit (mbc) returns true if mbc is a hexadecimal digit. mb_width (mbc) returns the number of columns on the output device occupied by mbc. Always >= 0. mb_putc (mbc, stream) outputs mbc on stream, a byte oriented FILE stream opened for output. mb_setascii (&mbc, sc) assigns the standard ASCII character sc to mbc. mb_copy (&destmbc, &srcmbc) copies srcmbc to destmbc. Here are the function prototypes of the macros. extern const char * mb_ptr (const mbchar_t mbc); extern size_t mb_len (const mbchar_t mbc); extern bool mb_iseq (const mbchar_t mbc, char sc); extern bool mb_isnul (const mbchar_t mbc); extern int mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2); extern int mb_casecmp (const mbchar_t mbc1, const mbchar_t mbc2); extern bool mb_equal (const mbchar_t mbc1, const mbchar_t mbc2); extern bool mb_caseequal (const mbchar_t mbc1, const mbchar_t mbc2); extern bool mb_isalnum (const mbchar_t mbc); extern bool mb_isalpha (const mbchar_t mbc); extern bool mb_isascii (const mbchar_t mbc); extern bool mb_isblank (const mbchar_t mbc); extern bool mb_iscntrl (const mbchar_t mbc); extern bool mb_isdigit (const mbchar_t mbc); extern bool mb_isgraph (const mbchar_t mbc); extern bool mb_islower (const mbchar_t mbc); extern bool mb_isprint (const mbchar_t mbc); extern bool mb_ispunct (const mbchar_t mbc); extern bool mb_isspace (const mbchar_t mbc); extern bool mb_isupper (const mbchar_t mbc); extern bool mb_isxdigit (const mbchar_t mbc); extern int mb_width (const mbchar_t mbc); extern void mb_putc (const mbchar_t mbc, FILE *stream); extern void mb_setascii (mbchar_t *new, char sc); extern void mb_copy (mbchar_t *new, const mbchar_t *old); */ #ifndef _MBCHAR_H #define _MBCHAR_H 1 #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.1 has a bug: and must be included before . */ #include #include #include #include #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef MBCHAR_INLINE # define MBCHAR_INLINE _GL_INLINE #endif #define MBCHAR_BUF_SIZE 24 struct mbchar { const char *ptr; /* pointer to current character */ size_t bytes; /* number of bytes of current character, > 0 */ bool wc_valid; /* true if wc is a valid wide character */ wchar_t wc; /* if wc_valid: the current character */ char buf[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */ }; /* EOF (not a real character) is represented with bytes = 0 and wc_valid = false. */ typedef struct mbchar mbchar_t; /* Access the current character. */ #define mb_ptr(mbc) ((mbc).ptr) #define mb_len(mbc) ((mbc).bytes) /* Comparison of characters. */ #define mb_iseq(mbc, sc) ((mbc).wc_valid && (mbc).wc == (sc)) #define mb_isnul(mbc) ((mbc).wc_valid && (mbc).wc == 0) #define mb_cmp(mbc1, mbc2) \ ((mbc1).wc_valid \ ? ((mbc2).wc_valid \ ? (int) (mbc1).wc - (int) (mbc2).wc \ : -1) \ : ((mbc2).wc_valid \ ? 1 \ : (mbc1).bytes == (mbc2).bytes \ ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ : (mbc1).bytes < (mbc2).bytes \ ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) #define mb_casecmp(mbc1, mbc2) \ ((mbc1).wc_valid \ ? ((mbc2).wc_valid \ ? (int) towlower ((mbc1).wc) - (int) towlower ((mbc2).wc) \ : -1) \ : ((mbc2).wc_valid \ ? 1 \ : (mbc1).bytes == (mbc2).bytes \ ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ : (mbc1).bytes < (mbc2).bytes \ ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) #define mb_equal(mbc1, mbc2) \ ((mbc1).wc_valid && (mbc2).wc_valid \ ? (mbc1).wc == (mbc2).wc \ : (mbc1).bytes == (mbc2).bytes \ && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) #define mb_caseequal(mbc1, mbc2) \ ((mbc1).wc_valid && (mbc2).wc_valid \ ? towlower ((mbc1).wc) == towlower ((mbc2).wc) \ : (mbc1).bytes == (mbc2).bytes \ && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) /* , classification. */ #define mb_isascii(mbc) \ ((mbc).wc_valid && (mbc).wc >= 0 && (mbc).wc <= 127) #define mb_isalnum(mbc) ((mbc).wc_valid && iswalnum ((mbc).wc)) #define mb_isalpha(mbc) ((mbc).wc_valid && iswalpha ((mbc).wc)) #define mb_isblank(mbc) ((mbc).wc_valid && iswblank ((mbc).wc)) #define mb_iscntrl(mbc) ((mbc).wc_valid && iswcntrl ((mbc).wc)) #define mb_isdigit(mbc) ((mbc).wc_valid && iswdigit ((mbc).wc)) #define mb_isgraph(mbc) ((mbc).wc_valid && iswgraph ((mbc).wc)) #define mb_islower(mbc) ((mbc).wc_valid && iswlower ((mbc).wc)) #define mb_isprint(mbc) ((mbc).wc_valid && iswprint ((mbc).wc)) #define mb_ispunct(mbc) ((mbc).wc_valid && iswpunct ((mbc).wc)) #define mb_isspace(mbc) ((mbc).wc_valid && iswspace ((mbc).wc)) #define mb_isupper(mbc) ((mbc).wc_valid && iswupper ((mbc).wc)) #define mb_isxdigit(mbc) ((mbc).wc_valid && iswxdigit ((mbc).wc)) /* Extra function. */ /* Unprintable characters appear as a small box of width 1. */ #define MB_UNPRINTABLE_WIDTH 1 MBCHAR_INLINE int mb_width_aux (wint_t wc) { int w = wcwidth (wc); /* For unprintable characters, arbitrarily return 0 for control characters and MB_UNPRINTABLE_WIDTH otherwise. */ return (w >= 0 ? w : iswcntrl (wc) ? 0 : MB_UNPRINTABLE_WIDTH); } #define mb_width(mbc) \ ((mbc).wc_valid ? mb_width_aux ((mbc).wc) : MB_UNPRINTABLE_WIDTH) /* Output. */ #define mb_putc(mbc, stream) fwrite ((mbc).ptr, 1, (mbc).bytes, (stream)) /* Assignment. */ #define mb_setascii(mbc, sc) \ ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \ (mbc)->wc = (mbc)->buf[0] = (sc)) /* Copying a character. */ MBCHAR_INLINE void mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc) { if (old_mbc->ptr == &old_mbc->buf[0]) { memcpy (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes); new_mbc->ptr = &new_mbc->buf[0]; } else new_mbc->ptr = old_mbc->ptr; new_mbc->bytes = old_mbc->bytes; if ((new_mbc->wc_valid = old_mbc->wc_valid)) new_mbc->wc = old_mbc->wc; } /* is_basic(c) tests whether the single-byte character c is in the ISO C "basic character set". This is a convenience function, and is in this file only to share code between mbiter_multi.h and mbfile_multi.h. */ #if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) /* The character set is ISO-646, not EBCDIC. */ # define IS_BASIC_ASCII 1 extern const unsigned int is_basic_table[]; MBCHAR_INLINE bool is_basic (char c) { return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) & 1; } #else MBCHAR_INLINE bool is_basic (char c) { switch (c) { case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': return 1; default: return 0; } } #endif _GL_INLINE_HEADER_END #endif /* _MBCHAR_H */ pspp-1.0.1/gl/lstat.c0000644000175000017500000000667413124536242011330 00000000000000/* Work around a bug of lstat on some systems Copyright (C) 1997-2006, 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* written by Jim Meyering */ /* If the user's config.h happens to include , let it include only the system's here, so that orig_lstat doesn't recurse to rpl_lstat. */ #define __need_system_sys_stat_h #include #if !HAVE_LSTAT /* On systems that lack symlinks, our replacement already defined lstat as stat, so there is nothing further to do other than avoid an empty file. */ typedef int dummy; #else /* HAVE_LSTAT */ /* Get the original definition of lstat. It might be defined as a macro. */ # include # include # undef __need_system_sys_stat_h static int orig_lstat (const char *filename, struct stat *buf) { return lstat (filename, buf); } /* Specification. */ /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include above. */ # include "sys/stat.h" # include # include /* lstat works differently on Linux and Solaris systems. POSIX (see "pathname resolution" in the glossary) requires that programs like 'ls' take into consideration the fact that FILE has a trailing slash when FILE is a symbolic link. On Linux and Solaris 10 systems, the lstat function already has the desired semantics (in treating 'lstat ("symlink/", sbuf)' just like 'lstat ("symlink/.", sbuf)', but on Solaris 9 and earlier it does not. If FILE has a trailing slash and specifies a symbolic link, then use stat() to get more info on the referent of FILE. If the referent is a non-directory, then set errno to ENOTDIR and return -1. Otherwise, return stat's result. */ int rpl_lstat (const char *file, struct stat *sbuf) { size_t len; int lstat_result = orig_lstat (file, sbuf); if (lstat_result != 0) return lstat_result; /* This replacement file can blindly check against '/' rather than using the ISSLASH macro, because all platforms with '\\' either lack symlinks (mingw) or have working lstat (cygwin) and thus do not compile this file. 0 len should have already been filtered out above, with a failure return of ENOENT. */ len = strlen (file); if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode)) return 0; /* At this point, a trailing slash is only permitted on symlink-to-dir; but it should have found information on the directory, not the symlink. Call stat() to get info about the link's referent. Our replacement stat guarantees valid results, even if the symlink is not pointing to a directory. */ if (!S_ISLNK (sbuf->st_mode)) { errno = ENOTDIR; return -1; } return stat (file, sbuf); } #endif /* HAVE_LSTAT */ pspp-1.0.1/gl/getopt.c0000644000175000017500000005711013124536242011472 00000000000000/* Getopt for GNU. Copyright (C) 1987-2017 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ #ifndef _LIBC # include #endif #include "getopt.h" #include #include #include #include #ifdef _LIBC /* When used as part of glibc, error printing must be done differently for standards compliance. getopt is not a cancellation point, so it must not call functions that are, and it is specified by an older standard than stdio locking, so it must not refer to functions in the "user namespace" related to stdio locking. Finally, it must use glibc's internal message translation so that the messages are looked up in the proper text domain. */ # include # define fprintf __fxprintf_nocancel # define flockfile(fp) _IO_flockfile (fp) # define funlockfile(fp) _IO_funlockfile (fp) #else # include "gettext.h" # define _(msgid) gettext (msgid) /* When used standalone, flockfile and funlockfile might not be available. */ # if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) # define flockfile(fp) /* nop */ # define funlockfile(fp) /* nop */ # endif /* When used standalone, do not attempt to use alloca. */ # define __libc_use_alloca(size) 0 # undef alloca # define alloca(size) (abort (), (void *)0) #endif /* This implementation of 'getopt' has three modes for handling options interspersed with non-option arguments. It can stop scanning for options at the first non-option argument encountered, as POSIX specifies. It can continue scanning for options after the first non-option argument, but permute 'argv' as it goes so that, after 'getopt' is done, all the options precede all the non-option arguments and 'optind' points to the first non-option argument. Or, it can report non-option arguments as if they were arguments to the option character '\x01'. The default behavior of 'getopt_long' is to permute the argument list. When this implementation is used standalone, the default behavior of 'getopt' is to stop at the first non-option argument, but when it is used as part of GNU libc it also permutes the argument list. In both cases, setting the environment variable POSIXLY_CORRECT to any value disables permutation. If the first character of the OPTSTRING argument to 'getopt' or 'getopt_long' is '+', both functions will stop at the first non-option argument. If it is '-', both functions will report non-option arguments as arguments to the option character '\x01'. */ #include "getopt_int.h" /* For communication from 'getopt' to the caller. When 'getopt' finds an option that takes an argument, the argument value is returned here. Also, when 'ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to 'getopt'. On entry to 'getopt', zero means this is the first call; initialize. When 'getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, 'optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Keep a global copy of all internal members of getopt_data. */ static struct _getopt_data getopt_data; /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. 'first_nonopt' and 'last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (char **argv, struct _getopt_data *d) { int bottom = d->__first_nonopt; int middle = d->__last_nonopt; int top = d->optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ d->__first_nonopt += (d->optind - d->__last_nonopt); d->__last_nonopt = d->optind; } /* Process the argument starting with d->__nextchar as a long option. d->optind should *not* have been advanced over this argument. If the value returned is -1, it was not actually a long option, the state is unchanged, and the argument should be processed as a set of short options (this can only happen when long_only is true). Otherwise, the option (and its argument, if any) have been consumed and the return value is the value to return from _getopt_internal_r. */ static int process_long_option (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int print_errors, const char *prefix) { char *nameend; size_t namelen; const struct option *p; const struct option *pfound = NULL; int n_options; int option_index; for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; namelen = nameend - d->__nextchar; /* First look for an exact match, counting the options as a side effect. */ for (p = longopts, n_options = 0; p->name; p++, n_options++) if (!strncmp (p->name, d->__nextchar, namelen) && namelen == strlen (p->name)) { /* Exact match found. */ pfound = p; option_index = n_options; break; } if (pfound == NULL) { /* Didn't find an exact match, so look for abbreviations. */ unsigned char *ambig_set = NULL; int ambig_malloced = 0; int ambig_fallback = 0; int indfound = -1; for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, namelen)) { if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) { /* Second or later nonexact match found. */ if (!ambig_fallback) { if (!print_errors) /* Don't waste effort tracking the ambig set if we're not going to print it anyway. */ ambig_fallback = 1; else if (!ambig_set) { if (__libc_use_alloca (n_options)) ambig_set = alloca (n_options); else if ((ambig_set = malloc (n_options)) == NULL) /* Fall back to simpler error message. */ ambig_fallback = 1; else ambig_malloced = 1; if (ambig_set) { memset (ambig_set, 0, n_options); ambig_set[indfound] = 1; } } if (ambig_set) ambig_set[option_index] = 1; } } } if (ambig_set || ambig_fallback) { if (print_errors) { if (ambig_fallback) fprintf (stderr, _("%s: option '%s%s' is ambiguous\n"), argv[0], prefix, d->__nextchar); else { flockfile (stderr); fprintf (stderr, _("%s: option '%s%s' is ambiguous; possibilities:"), argv[0], prefix, d->__nextchar); for (option_index = 0; option_index < n_options; option_index++) if (ambig_set[option_index]) fprintf (stderr, " '%s%s'", prefix, longopts[option_index].name); /* This must use 'fprintf' even though it's only printing a single character, so that it goes through __fxprintf_nocancel when compiled as part of glibc. */ fprintf (stderr, "\n"); funlockfile (stderr); } } if (ambig_malloced) free (ambig_set); d->__nextchar += strlen (d->__nextchar); d->optind++; d->optopt = 0; return '?'; } option_index = indfound; } if (pfound == NULL) { /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. */ if (!long_only || argv[d->optind][1] == '-' || strchr (optstring, *d->__nextchar) == NULL) { if (print_errors) fprintf (stderr, _("%s: unrecognized option '%s%s'\n"), argv[0], prefix, d->__nextchar); d->__nextchar = NULL; d->optind++; d->optopt = 0; return '?'; } /* Otherwise interpret it as a short option. */ return -1; } /* We have found a matching long option. Consume it. */ d->optind++; d->__nextchar = NULL; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) fprintf (stderr, _("%s: option '%s%s' doesn't allow an argument\n"), argv[0], prefix, pfound->name); d->optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) fprintf (stderr, _("%s: option '%s%s' requires an argument\n"), argv[0], prefix, pfound->name); d->optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Initialize internal data upon the first call to getopt. */ static const char * _getopt_initialize (int argc _GL_UNUSED, char **argv _GL_UNUSED, const char *optstring, struct _getopt_data *d, int posixly_correct) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ if (d->optind == 0) d->optind = 1; d->__first_nonopt = d->__last_nonopt = d->optind; d->__nextchar = NULL; /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { d->__ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { d->__ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct || !!getenv ("POSIXLY_CORRECT")) d->__ordering = REQUIRE_ORDER; else d->__ordering = PERMUTE; d->__initialized = 1; return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If 'getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If 'getopt' finds another option character, it returns that character, updating 'optind' and 'nextchar' so that the next call to 'getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, 'getopt' returns -1. Then 'optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set 'opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in 'optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in 'optarg', otherwise 'optarg' is set to zero. If OPTSTRING starts with '-' or '+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with '--' instead of '-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a '=', or else the in next ARGV-element. When 'getopt' finds a long-named option, it returns 0 if that option's 'flag' field is nonzero, the value of the option's 'val' field if the 'flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of 'struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal_r (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int posixly_correct) { int print_errors = d->opterr; if (argc < 1) return -1; d->optarg = NULL; if (d->optind == 0 || !d->__initialized) optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct); else if (optstring[0] == '-' || optstring[0] == '+') optstring++; if (optstring[0] == ':') print_errors = 0; /* Test whether ARGV[optind] points to a non-option argument. */ #define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') if (d->__nextchar == NULL || *d->__nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (d->__last_nonopt > d->optind) d->__last_nonopt = d->optind; if (d->__first_nonopt > d->optind) d->__first_nonopt = d->optind; if (d->__ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange (argv, d); else if (d->__last_nonopt != d->optind) d->__first_nonopt = d->optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (d->optind < argc && NONOPTION_P) d->optind++; d->__last_nonopt = d->optind; } /* The special ARGV-element '--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (d->optind != argc && !strcmp (argv[d->optind], "--")) { d->optind++; if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange (argv, d); else if (d->__first_nonopt == d->__last_nonopt) d->__first_nonopt = d->optind; d->__last_nonopt = argc; d->optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (d->optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (d->__first_nonopt != d->__last_nonopt) d->optind = d->__first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (d->__ordering == REQUIRE_ORDER) return -1; d->optarg = argv[d->optind++]; return 1; } /* We have found another option-ARGV-element. Check whether it might be a long option. */ if (longopts) { if (argv[d->optind][1] == '-') { /* "--foo" is always a long option. The special option "--" was handled above. */ d->__nextchar = argv[d->optind] + 2; return process_long_option (argc, argv, optstring, longopts, longind, long_only, d, print_errors, "--"); } /* If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (long_only && (argv[d->optind][2] || !strchr (optstring, argv[d->optind][1]))) { int code; d->__nextchar = argv[d->optind] + 1; code = process_long_option (argc, argv, optstring, longopts, longind, long_only, d, print_errors, "-"); if (code != -1) return code; } } /* It is not a long option. Skip the initial punctuation. */ d->__nextchar = argv[d->optind] + 1; } /* Look at and handle the next short option-character. */ { char c = *d->__nextchar++; const char *temp = strchr (optstring, c); /* Increment 'optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; if (temp == NULL || c == ':' || c == ';') { if (print_errors) fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); d->optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';' && longopts != NULL) { /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') d->optarg = d->__nextchar; else if (d->optind == argc) { if (print_errors) fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else d->optarg = argv[d->optind]; d->__nextchar = d->optarg; d->optarg = NULL; return process_long_option (argc, argv, optstring, longopts, longind, 0 /* long_only */, d, print_errors, "-W "); } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; d->optind++; } else d->optarg = NULL; d->__nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented 'optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; } } return c; } } int _getopt_internal (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct) { int result; getopt_data.optind = optind; getopt_data.opterr = opterr; result = _getopt_internal_r (argc, argv, optstring, longopts, longind, long_only, &getopt_data, posixly_correct); optind = getopt_data.optind; optarg = getopt_data.optarg; optopt = getopt_data.optopt; return result; } /* glibc gets a LSB-compliant getopt and a POSIX-complaint __posix_getopt. Standalone applications just get a POSIX-compliant getopt. POSIX and LSB both require these functions to take 'char *const *argv' even though this is incorrect (because of the permutation). */ #define GETOPT_ENTRY(NAME, POSIXLY_CORRECT) \ int \ NAME (int argc, char *const *argv, const char *optstring) \ { \ return _getopt_internal (argc, (char **)argv, optstring, \ 0, 0, 0, POSIXLY_CORRECT); \ } #ifdef _LIBC GETOPT_ENTRY(getopt, 0) GETOPT_ENTRY(__posix_getopt, 1) #else GETOPT_ENTRY(getopt, 1) #endif #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of 'getopt'. */ int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value '%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ pspp-1.0.1/gl/xasprintf.c0000644000175000017500000000201313124536243012177 00000000000000/* vasprintf and asprintf with out-of-memory checking. Copyright (C) 1999, 2002-2004, 2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include "xvasprintf.h" char * xasprintf (const char *format, ...) { va_list args; char *result; va_start (args, format); result = xvasprintf (format, args); va_end (args); return result; } pspp-1.0.1/gl/read-file.c0000644000175000017500000001164313124536243012022 00000000000000/* read-file.c -- read file contents into a string Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. Written by Simon Josefsson and Bruno Haible. 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, 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 . */ #include #include "read-file.h" /* Get fstat. */ #include /* Get ftello. */ #include /* Get SIZE_MAX. */ #include /* Get malloc, realloc, free. */ #include /* Get errno. */ #include /* Read a STREAM and return a newly allocated string with the content, and set *LENGTH to the length of the string. The string is zero-terminated, but the terminating zero byte is not counted in *LENGTH. On errors, *LENGTH is undefined, errno preserves the values set by system functions (if any), and NULL is returned. */ char * fread_file (FILE *stream, size_t *length) { char *buf = NULL; size_t alloc = BUFSIZ; /* For a regular file, allocate a buffer that has exactly the right size. This avoids the need to do dynamic reallocations later. */ { struct stat st; if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode)) { off_t pos = ftello (stream); if (pos >= 0 && pos < st.st_size) { off_t alloc_off = st.st_size - pos; /* '1' below, accounts for the trailing NUL. */ if (SIZE_MAX - 1 < alloc_off) { errno = ENOMEM; return NULL; } alloc = alloc_off + 1; } } } if (!(buf = malloc (alloc))) return NULL; /* errno is ENOMEM. */ { size_t size = 0; /* number of bytes read so far */ int save_errno; for (;;) { /* This reads 1 more than the size of a regular file so that we get eof immediately. */ size_t requested = alloc - size; size_t count = fread (buf + size, 1, requested, stream); size += count; if (count != requested) { save_errno = errno; if (ferror (stream)) break; /* Shrink the allocated memory if possible. */ if (size < alloc - 1) { char *smaller_buf = realloc (buf, size + 1); if (smaller_buf != NULL) buf = smaller_buf; } buf[size] = '\0'; *length = size; return buf; } { char *new_buf; if (alloc == SIZE_MAX) { save_errno = ENOMEM; break; } if (alloc < SIZE_MAX - alloc / 2) alloc = alloc + alloc / 2; else alloc = SIZE_MAX; if (!(new_buf = realloc (buf, alloc))) { save_errno = errno; break; } buf = new_buf; } } free (buf); errno = save_errno; return NULL; } } static char * internal_read_file (const char *filename, size_t *length, const char *mode) { FILE *stream = fopen (filename, mode); char *out; int save_errno; if (!stream) return NULL; out = fread_file (stream, length); save_errno = errno; if (fclose (stream) != 0) { if (out) { save_errno = errno; free (out); } errno = save_errno; return NULL; } return out; } /* Open and read the contents of FILENAME, and return a newly allocated string with the content, and set *LENGTH to the length of the string. The string is zero-terminated, but the terminating zero byte is not counted in *LENGTH. On errors, *LENGTH is undefined, errno preserves the values set by system functions (if any), and NULL is returned. */ char * read_file (const char *filename, size_t *length) { return internal_read_file (filename, length, "r"); } /* Open (on non-POSIX systems, in binary mode) and read the contents of FILENAME, and return a newly allocated string with the content, and set LENGTH to the length of the string. The string is zero-terminated, but the terminating zero byte is not counted in the LENGTH variable. On errors, *LENGTH is undefined, errno preserves the values set by system functions (if any), and NULL is returned. */ char * read_binary_file (const char *filename, size_t *length) { return internal_read_file (filename, length, "rb"); } pspp-1.0.1/gl/umaxtostr.c0000644000175000017500000000011313020461274012222 00000000000000#define anytostr umaxtostr #define inttype uintmax_t #include "anytostr.c" pspp-1.0.1/gl/c-strtod.h0000644000175000017500000000364213124536241011734 00000000000000/* Convert string to double, using the C locale. -*- coding: utf-8 -*- Copyright (C) 2003-2004, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifdef __cplusplus extern "C" { #endif /* Parse the initial portion of the string pointed to by NPTR as a floating- point number (in decimal or hexadecimal notation), like in the C locale: accepting only the ASCII digits '0'..'9', and only '.' as decimal point character. If ENDPTR is not NULL, set *ENDPTR to point to the first byte beyond the parsed number or to NPTR if the string does not start with a parsable number. Return value: - If successful, return the value as a double or 'long double', respectively, and don't modify errno. - In case of overflow, return ±HUGE_VAL or ±HUGE_VALL, respectively, and set errno to ERANGE. - In case of underflow, return a value very near to 0 and set errno to ERANGE. - If the string does not start with a number at all, return 0 (and recall that if ENDPTR != NULL, *ENDPTR is set to NPTR), and maybe set errno to EINVAL. - In case of other error, return 0 and set errno, for example to ENOMEM. */ extern double c_strtod (char const *nptr, char **endptr); extern long double c_strtold (char const *nptr, char **endptr); #ifdef __cplusplus } #endif pspp-1.0.1/gl/rijndael-alg-fst.h0000644000175000017500000000513513124536243013321 00000000000000/* rijndael-alg-fst.h --- Rijndael cipher implementation. * Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. * * This file is free software; you can 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, or (at your * option) any later version. * * This file is distributed in the hope that 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 file; if not, see . * */ /* Adapted for gnulib by Simon Josefsson. */ /** * rijndael-alg-fst.h * * @version 3.0 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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 __RIJNDAEL_ALG_FST_H #define __RIJNDAEL_ALG_FST_H #include #include #define RIJNDAEL_MAXKC (256/32) #define RIJNDAEL_MAXKB (256/8) #define RIJNDAEL_MAXNR 14 int rijndaelKeySetupEnc (uint32_t rk[ /*4*(Nr + 1) */ ], const char cipherKey[], size_t keyBits); int rijndaelKeySetupDec (uint32_t rk[ /*4*(Nr + 1) */ ], const char cipherKey[], size_t keyBits); void rijndaelEncrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, const char pt[16], char ct[16]); void rijndaelDecrypt (const uint32_t rk[ /*4*(Nr + 1) */ ], size_t Nr, const char ct[16], char pt[16]); #endif /* __RIJNDAEL_ALG_FST_H */ pspp-1.0.1/gl/getpass.h0000644000175000017500000000211113124536242011632 00000000000000/* getpass.h -- Read a password of arbitrary length from /dev/tty or stdin. Copyright (C) 2004, 2009-2017 Free Software Foundation, Inc. Contributed by Simon Josefsson , 2004. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef GETPASS_H # define GETPASS_H /* Get getpass declaration, if available. */ # include # if !HAVE_DECL_GETPASS /* Read a password of arbitrary length from /dev/tty or stdin. */ char *getpass (const char *prompt); # endif #endif /* GETPASS_H */ pspp-1.0.1/gl/xalloc.h0000644000175000017500000001724313124536243011463 00000000000000/* xalloc.h -- malloc with out-of-memory checking Copyright (C) 1990-2000, 2003-2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef XALLOC_H_ #define XALLOC_H_ #include #include #include "xalloc-oversized.h" #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef XALLOC_INLINE # define XALLOC_INLINE _GL_INLINE #endif #ifdef __cplusplus extern "C" { #endif #if __GNUC__ >= 3 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) #else # define _GL_ATTRIBUTE_MALLOC #endif #if ! defined __clang__ && \ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) # define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) #else # define _GL_ATTRIBUTE_ALLOC_SIZE(args) #endif /* This function is always triggered when memory is exhausted. It must be defined by the application, either explicitly or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ extern _Noreturn void xalloc_die (void); void *xmalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); void *xzalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); void *xcalloc (size_t n, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); void *xrealloc (void *p, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2)); void *x2realloc (void *p, size_t *pn); void *xmemdup (void const *p, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2)); char *xstrdup (char const *str) _GL_ATTRIBUTE_MALLOC; /* In the following macros, T must be an elementary or structure/union or typedef'ed type, or a pointer to such a type. To apply one of the following macros to a function pointer or array type, you need to typedef it first and use the typedef name. */ /* Allocate an object of type T dynamically, with error checking. */ /* extern t *XMALLOC (typename t); */ #define XMALLOC(t) ((t *) xmalloc (sizeof (t))) /* Allocate memory for N elements of type T, with error checking. */ /* extern t *XNMALLOC (size_t n, typename t); */ #define XNMALLOC(n, t) \ ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t)))) /* Allocate an object of type T dynamically, with error checking, and zero it. */ /* extern t *XZALLOC (typename t); */ #define XZALLOC(t) ((t *) xzalloc (sizeof (t))) /* Allocate memory for N elements of type T, with error checking, and zero it. */ /* extern t *XCALLOC (size_t n, typename t); */ #define XCALLOC(n, t) \ ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t)))) /* Allocate an array of N objects, each with S bytes of memory, dynamically, with error checking. S must be nonzero. */ XALLOC_INLINE void *xnmalloc (size_t n, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); XALLOC_INLINE void * xnmalloc (size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return xmalloc (n * s); } /* Change the size of an allocated block of memory P to an array of N objects each of S bytes, with error checking. S must be nonzero. */ XALLOC_INLINE void *xnrealloc (void *p, size_t n, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)); XALLOC_INLINE void * xnrealloc (void *p, size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return xrealloc (p, n * s); } /* If P is null, allocate a block of at least *PN such objects; otherwise, reallocate P so that it contains more than *PN objects each of S bytes. S must be nonzero. Set *PN to the new number of objects, and return the pointer to the new block. *PN is never set to zero, and the returned pointer is never null. Repeated reallocations are guaranteed to make progress, either by allocating an initial block with a nonzero size, or by allocating a larger block. In the following implementation, nonzero sizes are increased by a factor of approximately 1.5 so that repeated reallocations have O(N) overall cost rather than O(N**2) cost, but the specification for this function does not guarantee that rate. Here is an example of use: int *p = NULL; size_t used = 0; size_t allocated = 0; void append_int (int value) { if (used == allocated) p = x2nrealloc (p, &allocated, sizeof *p); p[used++] = value; } This causes x2nrealloc to allocate a block of some nonzero size the first time it is called. To have finer-grained control over the initial size, set *PN to a nonzero value before calling this function with P == NULL. For example: int *p = NULL; size_t used = 0; size_t allocated = 0; size_t allocated1 = 1000; void append_int (int value) { if (used == allocated) { p = x2nrealloc (p, &allocated1, sizeof *p); allocated = allocated1; } p[used++] = value; } */ XALLOC_INLINE void * x2nrealloc (void *p, size_t *pn, size_t s) { size_t n = *pn; if (! p) { if (! n) { /* The approximate size to use for initial small allocation requests, when the invoking code specifies an old size of zero. This is the largest "small" request for the GNU C library malloc. */ enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; n = DEFAULT_MXFAST / s; n += !n; } if (xalloc_oversized (n, s)) xalloc_die (); } else { /* Set N = floor (1.5 * N) + 1 so that progress is made even if N == 0. Check for overflow, so that N * S stays in both ptrdiff_t and size_t range. The check may be slightly conservative, but an exact check isn't worth the trouble. */ if ((PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX) / 3 * 2 / s <= n) xalloc_die (); n += n / 2 + 1; } *pn = n; return xrealloc (p, n * s); } /* Return a pointer to a new buffer of N bytes. This is like xmalloc, except it returns char *. */ XALLOC_INLINE char *xcharalloc (size_t n) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); XALLOC_INLINE char * xcharalloc (size_t n) { return XNMALLOC (n, char); } #ifdef __cplusplus } /* C++ does not allow conversions from void * to other pointer types without a cast. Use templates to work around the problem when possible. */ template inline T * xrealloc (T *p, size_t s) { return (T *) xrealloc ((void *) p, s); } template inline T * xnrealloc (T *p, size_t n, size_t s) { return (T *) xnrealloc ((void *) p, n, s); } template inline T * x2realloc (T *p, size_t *pn) { return (T *) x2realloc ((void *) p, pn); } template inline T * x2nrealloc (T *p, size_t *pn, size_t s) { return (T *) x2nrealloc ((void *) p, pn, s); } template inline T * xmemdup (T const *p, size_t s) { return (T *) xmemdup ((void const *) p, s); } #endif _GL_INLINE_HEADER_END #endif /* !XALLOC_H_ */ pspp-1.0.1/gl/allocator.c0000644000175000017500000000025113020461273012136 00000000000000#define _GL_USE_STDLIB_ALLOC 1 #include #include "allocator.h" #include struct allocator const stdlib_allocator = { malloc, realloc, free, NULL }; pspp-1.0.1/gl/unitypes.in.h0000644000175000017500000000316313124536243012462 00000000000000/* Elementary types and macros for the GNU UniString library. Copyright (C) 2002, 2005-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _UNITYPES_H #define _UNITYPES_H /* Get uint8_t, uint16_t, uint32_t. */ #include /* Type representing a Unicode character. */ typedef uint32_t ucs4_t; /* Attribute of a function whose result depends only on the arguments (not pointers!) and which has no side effects. */ #ifndef _UC_ATTRIBUTE_CONST # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) # define _UC_ATTRIBUTE_CONST __attribute__ ((__const__)) # else # define _UC_ATTRIBUTE_CONST # endif #endif /* Attribute of a function whose result depends only on the arguments (possibly pointers) and global memory, and which has no side effects. */ #ifndef _UC_ATTRIBUTE_PURE # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _UC_ATTRIBUTE_PURE # endif #endif #endif /* _UNITYPES_H */ pspp-1.0.1/gl/frexp.c0000644000175000017500000001036113124536241011310 00000000000000/* Split a double into fraction and mantissa. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paolo Bonzini , 2003, and Bruno Haible , 2007. */ #if ! defined USE_LONG_DOUBLE # include #endif /* Specification. */ #include #include #ifdef USE_LONG_DOUBLE # include "isnanl-nolibm.h" # include "fpucw.h" #else # include "isnand-nolibm.h" #endif /* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater than 2, or not even a power of 2, some rounding errors can occur, so that then the returned mantissa is only guaranteed to be <= 1.0, not < 1.0. */ #ifdef USE_LONG_DOUBLE # define FUNC frexpl # define DOUBLE long double # define ISNAN isnanl # define DECL_ROUNDING DECL_LONG_DOUBLE_ROUNDING # define BEGIN_ROUNDING() BEGIN_LONG_DOUBLE_ROUNDING () # define END_ROUNDING() END_LONG_DOUBLE_ROUNDING () # define L_(literal) literal##L #else # define FUNC frexp # define DOUBLE double # define ISNAN isnand # define DECL_ROUNDING # define BEGIN_ROUNDING() # define END_ROUNDING() # define L_(literal) literal #endif DOUBLE FUNC (DOUBLE x, int *expptr) { int sign; int exponent; DECL_ROUNDING /* Test for NaN, infinity, and zero. */ if (ISNAN (x) || x + x == x) { *expptr = 0; return x; } sign = 0; if (x < 0) { x = - x; sign = -1; } BEGIN_ROUNDING (); { /* Since the exponent is an 'int', it fits in 64 bits. Therefore the loops are executed no more than 64 times. */ DOUBLE pow2[64]; /* pow2[i] = 2^2^i */ DOUBLE powh[64]; /* powh[i] = 2^-2^i */ int i; exponent = 0; if (x >= L_(1.0)) { /* A positive exponent. */ DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x >= 1.0. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (x >= pow2_i) { exponent += (1 << i); x *= powh_i; } else break; pow2[i] = pow2_i; powh[i] = powh_i; } /* Avoid making x too small, as it could become a denormalized number and thus lose precision. */ while (i > 0 && x < pow2[i - 1]) { i--; powh_i = powh[i]; } exponent += (1 << i); x *= powh_i; /* Here 2^-2^i <= x < 1.0. */ } else { /* A negative or zero exponent. */ DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x < 1.0. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (x < powh_i) { exponent -= (1 << i); x *= pow2_i; } else break; pow2[i] = pow2_i; powh[i] = powh_i; } /* Here 2^-2^i <= x < 1.0. */ } /* Invariants: x * 2^exponent = argument, and 2^-2^i <= x < 1.0. */ while (i > 0) { i--; if (x < powh[i]) { exponent -= (1 << i); x *= pow2[i]; } } /* Here 0.5 <= x < 1.0. */ } if (sign < 0) x = - x; END_ROUNDING (); *expptr = exponent; return x; } pspp-1.0.1/gl/getdelim.c0000644000175000017500000000755213124536242011767 00000000000000/* getdelim.c --- Implementation of replacement getdelim function. Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Ported from glibc by Simon Josefsson. */ /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */ #define _GL_ARG_NONNULL(params) #include #include #include #include #include #include #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif #if USE_UNLOCKED_IO # include "unlocked-io.h" # define getc_maybe_unlocked(fp) getc(fp) #elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED # undef flockfile # undef funlockfile # define flockfile(x) ((void) 0) # define funlockfile(x) ((void) 0) # define getc_maybe_unlocked(fp) getc(fp) #else # define getc_maybe_unlocked(fp) getc_unlocked(fp) #endif static void alloc_failed (void) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid errno problem without using the realloc module; see: http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00025.html */ errno = ENOMEM; #endif } /* Read up to (and including) a DELIMITER from FP into *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *N characters of space. It is realloc'ed as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. */ ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) { ssize_t result; size_t cur_len = 0; if (lineptr == NULL || n == NULL || fp == NULL) { errno = EINVAL; return -1; } flockfile (fp); if (*lineptr == NULL || *n == 0) { char *new_lineptr; *n = 120; new_lineptr = (char *) realloc (*lineptr, *n); if (new_lineptr == NULL) { alloc_failed (); result = -1; goto unlock_return; } *lineptr = new_lineptr; } for (;;) { int i; i = getc_maybe_unlocked (fp); if (i == EOF) { result = -1; break; } /* Make enough space for len+1 (for final NUL) bytes. */ if (cur_len + 1 >= *n) { size_t needed_max = SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; size_t needed = 2 * *n + 1; /* Be generous. */ char *new_lineptr; if (needed_max < needed) needed = needed_max; if (cur_len + 1 >= needed) { result = -1; errno = EOVERFLOW; goto unlock_return; } new_lineptr = (char *) realloc (*lineptr, needed); if (new_lineptr == NULL) { alloc_failed (); result = -1; goto unlock_return; } *lineptr = new_lineptr; *n = needed; } (*lineptr)[cur_len] = i; cur_len++; if (i == delimiter) break; } (*lineptr)[cur_len] = '\0'; result = cur_len ? cur_len : result; unlock_return: funlockfile (fp); /* doesn't set errno */ return result; } pspp-1.0.1/gl/regcomp.c0000644000175000017500000033544213124536243011634 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ #ifdef _LIBC # include #endif static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax); static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap); static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset); #endif /* RE_ENABLE_I18N */ static void free_workarea_compile (regex_t *preg); static reg_errcode_t create_initial_state (re_dfa_t *dfa); #ifdef RE_ENABLE_I18N static void optimize_utf8 (re_dfa_t *dfa); #endif static reg_errcode_t analyze (regex_t *preg); static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node); static reg_errcode_t calc_first (void *extra, bin_tree_t *node); static reg_errcode_t calc_next (void *extra, bin_tree_t *node); static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint); static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, unsigned int constraint); static reg_errcode_t calc_eclosure (re_dfa_t *dfa); static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root); static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); static Idx fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax); static int peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) internal_function; static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, bool accept_hyphen); static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token); #ifdef RE_ENABLE_I18N static reg_errcode_t build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, const char *class_name, reg_syntax_t syntax); #else /* not RE_ENABLE_I18N */ static reg_errcode_t build_equiv_class (bitset_t sbcset, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const char *class_name, reg_syntax_t syntax); #endif /* not RE_ENABLE_I18N */ static bin_tree_t *build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const char *class_name, const char *extra, bool non_match, reg_errcode_t *err); static bin_tree_t *create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type); static bin_tree_t *create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token); static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); static void free_token (re_token_t *node); static reg_errcode_t free_tree (void *extra, bin_tree_t *node); static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, but why not be nice? */ static const char __re_error_msgid[] = { #define REG_NOERROR_IDX 0 gettext_noop ("Success") /* REG_NOERROR */ "\0" #define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") gettext_noop ("No match") /* REG_NOMATCH */ "\0" #define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") gettext_noop ("Invalid regular expression") /* REG_BADPAT */ "\0" #define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ "\0" #define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") gettext_noop ("Invalid character class name") /* REG_ECTYPE */ "\0" #define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") gettext_noop ("Trailing backslash") /* REG_EESCAPE */ "\0" #define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") gettext_noop ("Invalid back reference") /* REG_ESUBREG */ "\0" #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") gettext_noop ("Unmatched [, [^, [:, [., or [=") /* REG_EBRACK */ "\0" #define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [, [^, [:, [., or [=") gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ "\0" #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") gettext_noop ("Unmatched \\{") /* REG_EBRACE */ "\0" #define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ "\0" #define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") gettext_noop ("Invalid range end") /* REG_ERANGE */ "\0" #define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") gettext_noop ("Memory exhausted") /* REG_ESPACE */ "\0" #define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ "\0" #define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") gettext_noop ("Premature end of regular expression") /* REG_EEND */ "\0" #define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") gettext_noop ("Regular expression too big") /* REG_ESIZE */ "\0" #define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ }; static const size_t __re_error_msgid_idx[] = { REG_NOERROR_IDX, REG_NOMATCH_IDX, REG_BADPAT_IDX, REG_ECOLLATE_IDX, REG_ECTYPE_IDX, REG_EESCAPE_IDX, REG_ESUBREG_IDX, REG_EBRACK_IDX, REG_EPAREN_IDX, REG_EBRACE_IDX, REG_BADBR_IDX, REG_ERANGE_IDX, REG_ESPACE_IDX, REG_BADRPT_IDX, REG_EEND_IDX, REG_ESIZE_IDX, REG_ERPAREN_IDX }; /* Entry points for GNU code. */ /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length LENGTH) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields are set in BUFP on entry. */ const char * re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *bufp) { reg_errcode_t ret; /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub, unless RE_NO_SUB is set. */ bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); /* Match anchors at newline. */ bufp->newline_anchor = 1; ret = re_compile_internal (bufp, pattern, length, re_syntax_options); if (!ret) return NULL; return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC weak_alias (__re_compile_pattern, re_compile_pattern) #endif /* Set by 're_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ /* This has no initializer because initialized variables in Emacs become read-only after dumping. */ reg_syntax_t re_syntax_options; /* Specify the precise syntax of regexps for compilation. This provides for compatibility for various utilities which historically have different, incompatible syntaxes. The argument SYNTAX is a bit mask comprised of the various bits defined in regex.h. We return the old syntax. */ reg_syntax_t re_set_syntax (reg_syntax_t syntax) { reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; return ret; } #ifdef _LIBC weak_alias (__re_set_syntax, re_set_syntax) #endif int re_compile_fastmap (struct re_pattern_buffer *bufp) { re_dfa_t *dfa = bufp->buffer; char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * SBC_MAX); re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); if (dfa->init_state != dfa->init_state_word) re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); if (dfa->init_state != dfa->init_state_nl) re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); if (dfa->init_state != dfa->init_state_begbuf) re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); bufp->fastmap_accurate = 1; return 0; } #ifdef _LIBC weak_alias (__re_compile_fastmap, re_compile_fastmap) #endif static inline void __attribute__ ((always_inline)) re_set_fastmap (char *fastmap, bool icase, int ch) { fastmap[ch] = 1; if (icase) fastmap[tolower (ch)] = 1; } /* Helper function for re_compile_fastmap. Compile fastmap for the initial_state INIT_STATE. */ static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap) { re_dfa_t *dfa = bufp->buffer; Idx node_cnt; bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { Idx node = init_state->nodes.elems[node_cnt]; re_token_type_t type = dfa->nodes[node].type; if (type == CHARACTER) { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); #ifdef RE_ENABLE_I18N if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { unsigned char buf[MB_LEN_MAX]; unsigned char *p; wchar_t wc; mbstate_t state; p = buf; *p++ = dfa->nodes[node].opr.c; while (++node < dfa->nodes_len && dfa->nodes[node].type == CHARACTER && dfa->nodes[node].mb_partial) *p++ = dfa->nodes[node].opr.c; memset (&state, '\0', sizeof (state)); if (__mbrtowc (&wc, (const char *) buf, p - buf, &state) == p - buf && (__wcrtomb ((char *) buf, __towlower (wc), &state) != (size_t) -1)) re_set_fastmap (fastmap, false, buf[0]); } #endif } else if (type == SIMPLE_BRACKET) { int i, ch; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) { int j; bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (w & ((bitset_word_t) 1 << j)) re_set_fastmap (fastmap, icase, ch); } } #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET) { re_charset_t *cset = dfa->nodes[node].opr.mbcset; Idx i; # ifdef _LIBC /* See if we have to try all bytes which start multiple collation elements. e.g. In da_DK, we want to catch 'a' since "aa" is a valid collation element, and don't catch 'b' since 'b' is the only collation element which starts from 'b' (and it is caught by SIMPLE_BRACKET). */ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0 && (cset->ncoll_syms || cset->nranges)) { const int32_t *table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); for (i = 0; i < SBC_MAX; ++i) if (table[i] < 0) re_set_fastmap (fastmap, icase, i); } # endif /* _LIBC */ /* See if we have to start the match at all multibyte characters, i.e. where we would not find an invalid sequence. This only applies to multibyte character sets; for single byte character sets, the SIMPLE_BRACKET again suffices. */ if (dfa->mb_cur_max > 1 && (cset->nchar_classes || cset->non_match || cset->nranges # ifdef _LIBC || cset->nequiv_classes # endif /* _LIBC */ )) { unsigned char c = 0; do { mbstate_t mbs; memset (&mbs, 0, sizeof (mbs)); if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2) re_set_fastmap (fastmap, false, (int) c); } while (++c != 0); } else { /* ... Else catch all bytes which can start the mbchars. */ for (i = 0; i < cset->nmbchars; ++i) { char buf[256]; mbstate_t state; memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { if (__wcrtomb (buf, __towlower (cset->mbchars[i]), &state) != (size_t) -1) re_set_fastmap (fastmap, false, *(unsigned char *) buf); } } } } #endif /* RE_ENABLE_I18N */ else if (type == OP_PERIOD #ifdef RE_ENABLE_I18N || type == OP_UTF8_PERIOD #endif /* RE_ENABLE_I18N */ || type == END_OF_RE) { memset (fastmap, '\1', sizeof (char) * SBC_MAX); if (type == END_OF_RE) bufp->can_be_null = 1; return; } } } /* Entry point for POSIX code. */ /* regcomp takes a regular expression as a string and compiles it. PREG is a regex_t *. We do not expect any fields to be initialized, since POSIX says we shouldn't. Thus, we set 'buffer' to the compiled pattern; 'used' to the length of the compiled pattern; 'syntax' to RE_SYNTAX_POSIX_EXTENDED if the REG_EXTENDED bit in CFLAGS is set; otherwise, to RE_SYNTAX_POSIX_BASIC; 'newline_anchor' to REG_NEWLINE being set in CFLAGS; 'fastmap' to an allocated space for the fastmap; 'fastmap_accurate' to zero; 're_nsub' to the number of subexpressions in PATTERN. PATTERN is the address of the pattern string. CFLAGS is a series of bits which affect compilation. If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we use POSIX basic syntax. If REG_NEWLINE is set, then . and [^...] don't match newline. Also, regexec will try a match beginning after every newline. If REG_ICASE is set, then we considers upper- and lowercase versions of letters to be equivalent when matching. If REG_NOSUB is set, then when PREG is passed to regexec, that routine will report only success or failure, and nothing about the registers. It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for the return codes and their meanings.) */ int regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags) { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC); preg->buffer = NULL; preg->allocated = 0; preg->used = 0; /* Try to allocate space for the fastmap. */ preg->fastmap = re_malloc (char, SBC_MAX); if (BE (preg->fastmap == NULL, 0)) return REG_ESPACE; syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; /* If REG_NEWLINE is set, newlines are treated differently. */ if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ syntax &= ~RE_DOT_NEWLINE; syntax |= RE_HAT_LISTS_NOT_NEWLINE; /* It also changes the matching behavior. */ preg->newline_anchor = 1; } else preg->newline_anchor = 0; preg->no_sub = !!(cflags & REG_NOSUB); preg->translate = NULL; ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; /* We have already checked preg->fastmap != NULL. */ if (BE (ret == REG_NOERROR, 1)) /* Compute the fastmap now, since regexec cannot modify the pattern buffer. This function never fails in this implementation. */ (void) re_compile_fastmap (preg); else { /* Some error occurred while compiling the expression. */ re_free (preg->fastmap); preg->fastmap = NULL; } return (int) ret; } #ifdef _LIBC weak_alias (__regcomp, regcomp) #endif /* Returns a message corresponding to an error code, ERRCODE, returned from either regcomp or regexec. We don't use PREG here. */ size_t regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf, size_t errbuf_size) { const char *msg; size_t msg_size; if (BE (errcode < 0 || errcode >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0)) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ abort (); msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); msg_size = strlen (msg) + 1; /* Includes the null. */ if (BE (errbuf_size != 0, 1)) { size_t cpy_size = msg_size; if (BE (msg_size > errbuf_size, 0)) { cpy_size = errbuf_size - 1; errbuf[cpy_size] = '\0'; } memcpy (errbuf, msg, cpy_size); } return msg_size; } #ifdef _LIBC weak_alias (__regerror, regerror) #endif #ifdef RE_ENABLE_I18N /* This static array is used for the map to single-byte characters when UTF-8 is used. Otherwise we would allocate memory just to initialize it the same all the time. UTF-8 is the preferred encoding so this is a worthwhile optimization. */ static const bitset_t utf8_sb_map = { /* Set the first 128 bits. */ # if defined __GNUC__ && !defined __STRICT_ANSI__ [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX # else # if 4 * BITSET_WORD_BITS < ASCII_CHARS # error "bitset_word_t is narrower than 32 bits" # elif 3 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX, # elif 2 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, # elif 1 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, # endif (BITSET_WORD_MAX >> (SBC_MAX % BITSET_WORD_BITS == 0 ? 0 : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) # endif }; #endif static void free_dfa_content (re_dfa_t *dfa) { Idx i, j; if (dfa->nodes) for (i = 0; i < dfa->nodes_len; ++i) free_token (dfa->nodes + i); re_free (dfa->nexts); for (i = 0; i < dfa->nodes_len; ++i) { if (dfa->eclosures != NULL) re_node_set_free (dfa->eclosures + i); if (dfa->inveclosures != NULL) re_node_set_free (dfa->inveclosures + i); if (dfa->edests != NULL) re_node_set_free (dfa->edests + i); } re_free (dfa->edests); re_free (dfa->eclosures); re_free (dfa->inveclosures); re_free (dfa->nodes); if (dfa->state_table) for (i = 0; i <= dfa->state_hash_mask; ++i) { struct re_state_table_entry *entry = dfa->state_table + i; for (j = 0; j < entry->num; ++j) { re_dfastate_t *state = entry->array[j]; free_state (state); } re_free (entry->array); } re_free (dfa->state_table); #ifdef RE_ENABLE_I18N if (dfa->sb_char != utf8_sb_map) re_free (dfa->sb_char); #endif re_free (dfa->subexp_map); #ifdef DEBUG re_free (dfa->re_str); #endif re_free (dfa); } /* Free dynamically allocated space used by PREG. */ void regfree (regex_t *preg) { re_dfa_t *dfa = preg->buffer; if (BE (dfa != NULL, 1)) { lock_fini (dfa->lock); free_dfa_content (dfa); } preg->buffer = NULL; preg->allocated = 0; re_free (preg->fastmap); preg->fastmap = NULL; re_free (preg->translate); preg->translate = NULL; } #ifdef _LIBC weak_alias (__regfree, regfree) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; char * # ifdef _LIBC /* Make these definitions weak in libc, so POSIX programs can redefine these names if they don't use our functions, and still use regcomp/regexec above without link errors. */ weak_function # endif re_comp (const char *s) { reg_errcode_t ret; char *fastmap; if (!s) { if (!re_comp_buf.buffer) return gettext ("No previous regular expression"); return 0; } if (re_comp_buf.buffer) { fastmap = re_comp_buf.fastmap; re_comp_buf.fastmap = NULL; __regfree (&re_comp_buf); memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); re_comp_buf.fastmap = fastmap; } if (re_comp_buf.fastmap == NULL) { re_comp_buf.fastmap = (char *) malloc (SBC_MAX); if (re_comp_buf.fastmap == NULL) return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE]); } /* Since 're_exec' always passes NULL for the 'regs' argument, we don't need to initialize the pattern buffer fields which affect it. */ /* Match anchors at newlines. */ re_comp_buf.newline_anchor = 1; ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); if (!ret) return NULL; /* Yes, we're discarding 'const' here if !HAVE_LIBINTL. */ return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC libc_freeres_fn (free_mem) { __regfree (&re_comp_buf); } #endif #endif /* _REGEX_RE_COMP */ /* Internal entry point. Compile the regular expression PATTERN, whose length is LENGTH. SYNTAX indicate regular expression's syntax. */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax) { reg_errcode_t err = REG_NOERROR; re_dfa_t *dfa; re_string_t regexp; /* Initialize the pattern buffer. */ preg->fastmap_accurate = 0; preg->syntax = syntax; preg->not_bol = preg->not_eol = 0; preg->used = 0; preg->re_nsub = 0; preg->can_be_null = 0; preg->regs_allocated = REGS_UNALLOCATED; /* Initialize the dfa. */ dfa = preg->buffer; if (BE (preg->allocated < sizeof (re_dfa_t), 0)) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but that is the user's responsibility. If ->buffer is NULL this is a simple allocation. */ dfa = re_realloc (preg->buffer, re_dfa_t, 1); if (dfa == NULL) return REG_ESPACE; preg->allocated = sizeof (re_dfa_t); preg->buffer = dfa; } preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); if (BE (err == REG_NOERROR && lock_init (dfa->lock) != 0, 0)) err = REG_ESPACE; if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } #ifdef DEBUG /* Note: length+1 will not overflow since it is checked in init_dfa. */ dfa->re_str = re_malloc (char, length + 1); strncpy (dfa->re_str, pattern, length + 1); #endif err = re_string_construct (®exp, pattern, length, preg->translate, (syntax & RE_ICASE) != 0, dfa); if (BE (err != REG_NOERROR, 0)) { re_compile_internal_free_return: free_workarea_compile (preg); re_string_destruct (®exp); lock_fini (dfa->lock); free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } /* Parse the regular expression, and build a structure tree. */ preg->re_nsub = 0; dfa->str_tree = parse (®exp, preg, syntax, &err); if (BE (dfa->str_tree == NULL, 0)) goto re_compile_internal_free_return; /* Analyze the tree and create the nfa. */ err = analyze (preg); if (BE (err != REG_NOERROR, 0)) goto re_compile_internal_free_return; #ifdef RE_ENABLE_I18N /* If possible, do searching in single byte encoding to speed things up. */ if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) optimize_utf8 (dfa); #endif /* Then create the initial state of the dfa. */ err = create_initial_state (dfa); /* Release work areas. */ free_workarea_compile (preg); re_string_destruct (®exp); if (BE (err != REG_NOERROR, 0)) { lock_fini (dfa->lock); free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; } return err; } /* Initialize DFA. We use the length of the regular expression PAT_LEN as the initial length of some arrays. */ static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len) { __re_size_t table_size; #ifndef _LIBC const char *codeset_name; #endif #ifdef RE_ENABLE_I18N size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); #else size_t max_i18n_object_size = 0; #endif size_t max_object_size = MAX (sizeof (struct re_state_table_entry), MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), MAX (sizeof (regmatch_t), max_i18n_object_size)))); memset (dfa, '\0', sizeof (re_dfa_t)); /* Force allocation of str_tree_storage the first time. */ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; /* Avoid overflows. The extra "/ 2" is for the table_size doubling calculation below, and for similar doubling calculations elsewhere. And it's <= rather than <, because some of the doubling calculations add 1 afterwards. */ if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 <= pat_len, 0)) return REG_ESPACE; dfa->nodes_alloc = pat_len + 1; dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); /* table_size = 2 ^ ceil(log pat_len) */ for (table_size = 1; ; table_size <<= 1) if (table_size > pat_len) break; dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; dfa->mb_cur_max = MB_CUR_MAX; #ifdef _LIBC if (dfa->mb_cur_max == 6 && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) dfa->is_utf8 = 1; dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) != 0); #else codeset_name = nl_langinfo (CODESET); if ((codeset_name[0] == 'U' || codeset_name[0] == 'u') && (codeset_name[1] == 'T' || codeset_name[1] == 't') && (codeset_name[2] == 'F' || codeset_name[2] == 'f') && strcmp (codeset_name + 3 + (codeset_name[3] == '-'), "8") == 0) dfa->is_utf8 = 1; /* We check exhaustively in the loop below if this charset is a superset of ASCII. */ dfa->map_notascii = 0; #endif #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { if (dfa->is_utf8) dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; else { int i, j, ch; dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); if (BE (dfa->sb_char == NULL, 0)) return REG_ESPACE; /* Set the bits corresponding to single byte chars. */ for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) { wint_t wch = __btowc (ch); if (wch != WEOF) dfa->sb_char[i] |= (bitset_word_t) 1 << j; # ifndef _LIBC if (isascii (ch) && wch != ch) dfa->map_notascii = 1; # endif } } } #endif if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } /* Initialize WORD_CHAR table, which indicate which character is "word". In this case "word" means that it is the word construction character used by some operators like "\<", "\>", etc. */ static void internal_function init_word_char (re_dfa_t *dfa) { int i = 0; int j; int ch = 0; dfa->word_ops_used = 1; if (BE (dfa->map_notascii == 0, 1)) { bitset_word_t bits0 = 0x00000000; bitset_word_t bits1 = 0x03ff0000; bitset_word_t bits2 = 0x87fffffe; bitset_word_t bits3 = 0x07fffffe; if (BITSET_WORD_BITS == 64) { dfa->word_char[0] = bits1 << 31 << 1 | bits0; dfa->word_char[1] = bits3 << 31 << 1 | bits2; i = 2; } else if (BITSET_WORD_BITS == 32) { dfa->word_char[0] = bits0; dfa->word_char[1] = bits1; dfa->word_char[2] = bits2; dfa->word_char[3] = bits3; i = 4; } else goto general_case; ch = 128; if (BE (dfa->is_utf8, 1)) { memset (&dfa->word_char[i], '\0', (SBC_MAX - ch) / 8); return; } } general_case: for (; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (isalnum (ch) || ch == '_') dfa->word_char[i] |= (bitset_word_t) 1 << j; } /* Free the work area which are only used while compiling. */ static void free_workarea_compile (regex_t *preg) { re_dfa_t *dfa = preg->buffer; bin_tree_storage_t *storage, *next; for (storage = dfa->str_tree_storage; storage; storage = next) { next = storage->next; re_free (storage); } dfa->str_tree_storage = NULL; dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; dfa->str_tree = NULL; re_free (dfa->org_indices); dfa->org_indices = NULL; } /* Create initial states for all contexts. */ static reg_errcode_t create_initial_state (re_dfa_t *dfa) { Idx first, i; reg_errcode_t err; re_node_set init_nodes; /* Initial states have the epsilon closure of the node which is the first node of the regular expression. */ first = dfa->str_tree->first->node_idx; dfa->init_node = first; err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); if (BE (err != REG_NOERROR, 0)) return err; /* The back-references which are in initial states can epsilon transit, since in this case all of the subexpressions can be null. Then we add epsilon closures of the nodes which are the next nodes of the back-references. */ if (dfa->nbackref > 0) for (i = 0; i < init_nodes.nelem; ++i) { Idx node_idx = init_nodes.elems[i]; re_token_type_t type = dfa->nodes[node_idx].type; Idx clexp_idx; if (type != OP_BACK_REF) continue; for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) { re_token_t *clexp_node; clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; if (clexp_node->type == OP_CLOSE_SUBEXP && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) break; } if (clexp_idx == init_nodes.nelem) continue; if (type == OP_BACK_REF) { Idx dest_idx = dfa->edests[node_idx].elems[0]; if (!re_node_set_contains (&init_nodes, dest_idx)) { reg_errcode_t merge_err = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); if (merge_err != REG_NOERROR) return merge_err; i = 0; } } } /* It must be the first time to invoke acquire_state. */ dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); /* We don't check ERR here, since the initial state must not be NULL. */ if (BE (dfa->init_state == NULL, 0)) return err; if (dfa->init_state->has_constraint) { dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_WORD); dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE); dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return err; } else dfa->init_state_word = dfa->init_state_nl = dfa->init_state_begbuf = dfa->init_state; re_node_set_free (&init_nodes); return REG_NOERROR; } #ifdef RE_ENABLE_I18N /* If it is possible to do searching in single byte encoding instead of UTF-8 to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change DFA nodes where needed. */ static void optimize_utf8 (re_dfa_t *dfa) { Idx node; int i; bool mb_chars = false; bool has_period = false; for (node = 0; node < dfa->nodes_len; ++node) switch (dfa->nodes[node].type) { case CHARACTER: if (dfa->nodes[node].opr.c >= ASCII_CHARS) mb_chars = true; break; case ANCHOR: switch (dfa->nodes[node].opr.ctx_type) { case LINE_FIRST: case LINE_LAST: case BUF_FIRST: case BUF_LAST: break; default: /* Word anchors etc. cannot be handled. It's okay to test opr.ctx_type since constraints (for all DFA nodes) are created by ORing one or more opr.ctx_type values. */ return; } break; case OP_PERIOD: has_period = true; break; case OP_BACK_REF: case OP_ALT: case END_OF_RE: case OP_DUP_ASTERISK: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: break; case COMPLEX_BRACKET: return; case SIMPLE_BRACKET: /* Just double check. */ { int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0 ? 0 : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS); for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) { if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0) return; rshift = 0; } } break; default: abort (); } if (mb_chars || has_period) for (node = 0; node < dfa->nodes_len; ++node) { if (dfa->nodes[node].type == CHARACTER && dfa->nodes[node].opr.c >= ASCII_CHARS) dfa->nodes[node].mb_partial = 0; else if (dfa->nodes[node].type == OP_PERIOD) dfa->nodes[node].type = OP_UTF8_PERIOD; } /* The search can be in single byte locale. */ dfa->mb_cur_max = 1; dfa->is_utf8 = 0; dfa->has_mb_node = dfa->nbackref > 0 || has_period; } #endif /* Analyze the structure tree, and calculate "first", "next", "edest", "eclosure", and "inveclosure". */ static reg_errcode_t analyze (regex_t *preg) { re_dfa_t *dfa = preg->buffer; reg_errcode_t ret; /* Allocate arrays. */ dfa->nexts = re_malloc (Idx, dfa->nodes_alloc); dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc); dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL || dfa->eclosures == NULL, 0)) return REG_ESPACE; dfa->subexp_map = re_malloc (Idx, preg->re_nsub); if (dfa->subexp_map != NULL) { Idx i; for (i = 0; i < preg->re_nsub; i++) dfa->subexp_map[i] = i; preorder (dfa->str_tree, optimize_subexps, dfa); for (i = 0; i < preg->re_nsub; i++) if (dfa->subexp_map[i] != i) break; if (i == preg->re_nsub) { free (dfa->subexp_map); dfa->subexp_map = NULL; } } ret = postorder (dfa->str_tree, lower_subexps, preg); if (BE (ret != REG_NOERROR, 0)) return ret; ret = postorder (dfa->str_tree, calc_first, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; preorder (dfa->str_tree, calc_next, dfa); ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; ret = calc_eclosure (dfa); if (BE (ret != REG_NOERROR, 0)) return ret; /* We only need this during the prune_impossible_nodes pass in regexec.c; skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) || dfa->nbackref) { dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); if (BE (dfa->inveclosures == NULL, 0)) return REG_ESPACE; ret = calc_inveclosure (dfa); } return ret; } /* Our parse trees are very unbalanced, so we cannot use a stack to implement parse tree visits. Instead, we use parent pointers and some hairy code in these two functions. */ static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node, *prev; for (node = root; ; ) { /* Descend down the tree, preferably to the left (or to the right if that's the only child). */ while (node->left || node->right) if (node->left) node = node->left; else node = node->right; do { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; if (node->parent == NULL) return REG_NOERROR; prev = node; node = node->parent; } /* Go up while we have a node that is reached from the right. */ while (node->right == prev || node->right == NULL); node = node->right; } } static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node; for (node = root; ; ) { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; /* Go to the left node, or up and to the right. */ if (node->left) node = node->left; else { bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; if (!node) return REG_NOERROR; } node = node->right; } } } /* Optimization pass: if a SUBEXP is entirely contained, strip it and tell re_search_internal to map the inner one's opr.idx to this one's. Adjust backreferences as well. Requires a preorder visit. */ static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == OP_BACK_REF && dfa->subexp_map) { int idx = node->token.opr.idx; node->token.opr.idx = dfa->subexp_map[idx]; dfa->used_bkref_map |= 1 << node->token.opr.idx; } else if (node->token.type == SUBEXP && node->left && node->left->token.type == SUBEXP) { Idx other_idx = node->left->token.opr.idx; node->left = node->left->left; if (node->left) node->left->parent = node; dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; if (other_idx < BITSET_WORD_BITS) dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); } return REG_NOERROR; } /* Lowering pass: Turn each SUBEXP node into the appropriate concatenation of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */ static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node) { regex_t *preg = (regex_t *) extra; reg_errcode_t err = REG_NOERROR; if (node->left && node->left->token.type == SUBEXP) { node->left = lower_subexp (&err, preg, node->left); if (node->left) node->left->parent = node; } if (node->right && node->right->token.type == SUBEXP) { node->right = lower_subexp (&err, preg, node->right); if (node->right) node->right->parent = node; } return err; } static bin_tree_t * lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) { re_dfa_t *dfa = preg->buffer; bin_tree_t *body = node->left; bin_tree_t *op, *cls, *tree1, *tree; if (preg->no_sub /* We do not optimize empty subexpressions, because otherwise we may have bad CONCAT nodes with NULL children. This is obviously not very common, so we do not lose much. An example that triggers this case is the sed "script" /\(\)/x. */ && node->left != NULL && (node->token.opr.idx >= BITSET_WORD_BITS || !(dfa->used_bkref_map & ((bitset_word_t) 1 << node->token.opr.idx)))) return node->left; /* Convert the SUBEXP node to the concatenation of an OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */ op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP); cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; tree = create_tree (dfa, op, tree1, CONCAT); if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) { *err = REG_ESPACE; return NULL; } op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; return tree; } /* Pass 1 in building the NFA: compute FIRST and create unlinked automaton nodes. Requires a postorder visit. */ static reg_errcode_t calc_first (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == CONCAT) { node->first = node->left->first; node->node_idx = node->left->node_idx; } else { node->first = node; node->node_idx = re_dfa_add_node (dfa, node->token); if (BE (node->node_idx == -1, 0)) return REG_ESPACE; if (node->token.type == ANCHOR) dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type; } return REG_NOERROR; } /* Pass 2: compute NEXT on the tree. Preorder visit. */ static reg_errcode_t calc_next (void *extra, bin_tree_t *node) { switch (node->token.type) { case OP_DUP_ASTERISK: node->left->next = node; break; case CONCAT: node->left->next = node->right->first; node->right->next = node->next; break; default: if (node->left) node->left->next = node->next; if (node->right) node->right->next = node->next; break; } return REG_NOERROR; } /* Pass 3: link all DFA nodes to their NEXT node (any order will do). */ static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; Idx idx = node->node_idx; reg_errcode_t err = REG_NOERROR; switch (node->token.type) { case CONCAT: break; case END_OF_RE: assert (node->next == NULL); break; case OP_DUP_ASTERISK: case OP_ALT: { Idx left, right; dfa->has_plural_match = 1; if (node->left != NULL) left = node->left->first->node_idx; else left = node->next->node_idx; if (node->right != NULL) right = node->right->first->node_idx; else right = node->next->node_idx; assert (left > -1); assert (right > -1); err = re_node_set_init_2 (dfa->edests + idx, left, right); } break; case ANCHOR: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); break; case OP_BACK_REF: dfa->nexts[idx] = node->next->node_idx; if (node->token.type == OP_BACK_REF) err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); break; default: assert (!IS_EPSILON_NODE (node->token.type)); dfa->nexts[idx] = node->next->node_idx; break; } return err; } /* Duplicate the epsilon closure of the node ROOT_NODE. Note that duplicated nodes have constraint INIT_CONSTRAINT in addition to their own constraint. */ static reg_errcode_t internal_function duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node, Idx root_node, unsigned int init_constraint) { Idx org_node, clone_node; bool ok; unsigned int constraint = init_constraint; for (org_node = top_org_node, clone_node = top_clone_node;;) { Idx org_dest, clone_dest; if (dfa->nodes[org_node].type == OP_BACK_REF) { /* If the back reference epsilon-transit, its destination must also have the constraint. Then duplicate the epsilon closure of the destination of the back reference, and store it in edests of the back reference. */ org_dest = dfa->nexts[org_node]; re_node_set_empty (dfa->edests + clone_node); clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; dfa->nexts[clone_node] = dfa->nexts[org_node]; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } else if (dfa->edests[org_node].nelem == 0) { /* In case of the node can't epsilon-transit, don't duplicate the destination and store the original destination as the destination of the node. */ dfa->nexts[clone_node] = dfa->nexts[org_node]; break; } else if (dfa->edests[org_node].nelem == 1) { /* In case of the node can epsilon-transit, and it has only one destination. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* If the node is root_node itself, it means the epsilon closure has a loop. Then tie it to the destination of the root_node. */ if (org_node == root_node && clone_node != org_node) { ok = re_node_set_insert (dfa->edests + clone_node, org_dest); if (BE (! ok, 0)) return REG_ESPACE; break; } /* In case the node has another constraint, append it. */ constraint |= dfa->nodes[org_node].constraint; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } else /* dfa->edests[org_node].nelem == 2 */ { /* In case of the node can epsilon-transit, and it has two destinations. In the bin_tree_t and DFA, that's '|' and '*'. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* Search for a duplicated node which satisfies the constraint. */ clone_dest = search_duplicated_node (dfa, org_dest, constraint); if (clone_dest == -1) { /* There is no such duplicated node, create a new one. */ reg_errcode_t err; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; err = duplicate_node_closure (dfa, org_dest, clone_dest, root_node, constraint); if (BE (err != REG_NOERROR, 0)) return err; } else { /* There is a duplicated node which satisfies the constraint, use it to avoid infinite loop. */ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } org_dest = dfa->edests[org_node].elems[1]; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == -1, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } org_node = org_dest; clone_node = clone_dest; } return REG_NOERROR; } /* Search for a node which is duplicated from the node ORG_NODE, and satisfies the constraint CONSTRAINT. */ static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, unsigned int constraint) { Idx idx; for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) { if (org_node == dfa->org_indices[idx] && constraint == dfa->nodes[idx].constraint) return idx; /* Found. */ } return -1; /* Not found. */ } /* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. Return the index of the new node, or -1 if insufficient storage is available. */ static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint) { Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); if (BE (dup_idx != -1, 1)) { dfa->nodes[dup_idx].constraint = constraint; dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; dfa->nodes[dup_idx].duplicated = 1; /* Store the index of the original node. */ dfa->org_indices[dup_idx] = org_idx; } return dup_idx; } static reg_errcode_t calc_inveclosure (re_dfa_t *dfa) { Idx src, idx; bool ok; for (idx = 0; idx < dfa->nodes_len; ++idx) re_node_set_init_empty (dfa->inveclosures + idx); for (src = 0; src < dfa->nodes_len; ++src) { Idx *elems = dfa->eclosures[src].elems; for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) { ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); if (BE (! ok, 0)) return REG_ESPACE; } } return REG_NOERROR; } /* Calculate "eclosure" for all the node in DFA. */ static reg_errcode_t calc_eclosure (re_dfa_t *dfa) { Idx node_idx; bool incomplete; #ifdef DEBUG assert (dfa->nodes_len > 0); #endif incomplete = false; /* For each nodes, calculate epsilon closure. */ for (node_idx = 0; ; ++node_idx) { reg_errcode_t err; re_node_set eclosure_elem; if (node_idx == dfa->nodes_len) { if (!incomplete) break; incomplete = false; node_idx = 0; } #ifdef DEBUG assert (dfa->eclosures[node_idx].nelem != -1); #endif /* If we have already calculated, skip it. */ if (dfa->eclosures[node_idx].nelem != 0) continue; /* Calculate epsilon closure of 'node_idx'. */ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true); if (BE (err != REG_NOERROR, 0)) return err; if (dfa->eclosures[node_idx].nelem == 0) { incomplete = true; re_node_set_free (&eclosure_elem); } } return REG_NOERROR; } /* Calculate epsilon closure of NODE. */ static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) { reg_errcode_t err; Idx i; re_node_set eclosure; bool ok; bool incomplete = false; err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); if (BE (err != REG_NOERROR, 0)) return err; /* This indicates that we are calculating this node now. We reference this value to avoid infinite loop. */ dfa->eclosures[node].nelem = -1; /* If the current node has constraints, duplicate all nodes since they must inherit the constraints. */ if (dfa->nodes[node].constraint && dfa->edests[node].nelem && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { err = duplicate_node_closure (dfa, node, node, node, dfa->nodes[node].constraint); if (BE (err != REG_NOERROR, 0)) return err; } /* Expand each epsilon destination nodes. */ if (IS_EPSILON_NODE(dfa->nodes[node].type)) for (i = 0; i < dfa->edests[node].nelem; ++i) { re_node_set eclosure_elem; Idx edest = dfa->edests[node].elems[i]; /* If calculating the epsilon closure of 'edest' is in progress, return intermediate result. */ if (dfa->eclosures[edest].nelem == -1) { incomplete = true; continue; } /* If we haven't calculated the epsilon closure of 'edest' yet, calculate now. Otherwise use calculated epsilon closure. */ if (dfa->eclosures[edest].nelem == 0) { err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false); if (BE (err != REG_NOERROR, 0)) return err; } else eclosure_elem = dfa->eclosures[edest]; /* Merge the epsilon closure of 'edest'. */ err = re_node_set_merge (&eclosure, &eclosure_elem); if (BE (err != REG_NOERROR, 0)) return err; /* If the epsilon closure of 'edest' is incomplete, the epsilon closure of this node is also incomplete. */ if (dfa->eclosures[edest].nelem == 0) { incomplete = true; re_node_set_free (&eclosure_elem); } } /* An epsilon closure includes itself. */ ok = re_node_set_insert (&eclosure, node); if (BE (! ok, 0)) return REG_ESPACE; if (incomplete && !root) dfa->eclosures[node].nelem = 0; else dfa->eclosures[node] = eclosure; *new_set = eclosure; return REG_NOERROR; } /* Functions for token which are used in the parser. */ /* Fetch a token from INPUT. We must not use this function inside bracket expressions. */ static void internal_function fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) { re_string_skip_bytes (input, peek_token (result, input, syntax)); } /* Peek a token from INPUT, and return the length of the token. We must not use this function inside bracket expressions. */ static int internal_function peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; token->word_char = 0; #ifdef RE_ENABLE_I18N token->mb_partial = 0; if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; token->mb_partial = 1; return 1; } #endif if (c == '\\') { unsigned char c2; if (re_string_cur_idx (input) + 1 >= re_string_length (input)) { token->type = BACK_SLASH; return 1; } c2 = re_string_peek_byte_case (input, 1); token->opr.c = c2; token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input) + 1); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (c2) != 0; switch (c2) { case '|': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!(syntax & RE_NO_BK_REFS)) { token->type = OP_BACK_REF; token->opr.idx = c2 - '1'; } break; case '<': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_FIRST; } break; case '>': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_LAST; } break; case 'b': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_DELIM; } break; case 'B': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = NOT_WORD_DELIM; } break; case 'w': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_WORD; break; case 'W': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTWORD; break; case 's': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_SPACE; break; case 'S': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTSPACE; break; case '`': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_FIRST; } break; case '\'': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_LAST; } break; case '(': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_OPEN_SUBEXP; break; case ')': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_CLOSE_SUBEXP; break; case '+': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_CLOSE_DUP_NUM; break; default: break; } return 2; } token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (token->opr.c); switch (c) { case '\n': if (syntax & RE_NEWLINE_ALT) token->type = OP_ALT; break; case '|': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '*': token->type = OP_DUP_ASTERISK; break; case '+': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_CLOSE_DUP_NUM; break; case '(': if (syntax & RE_NO_BK_PARENS) token->type = OP_OPEN_SUBEXP; break; case ')': if (syntax & RE_NO_BK_PARENS) token->type = OP_CLOSE_SUBEXP; break; case '[': token->type = OP_OPEN_BRACKET; break; case '.': token->type = OP_PERIOD; break; case '^': if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && re_string_cur_idx (input) != 0) { char prev = re_string_peek_byte (input, -1); if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') break; } token->type = ANCHOR; token->opr.ctx_type = LINE_FIRST; break; case '$': if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && re_string_cur_idx (input) + 1 != re_string_length (input)) { re_token_t next; re_string_skip_bytes (input, 1); peek_token (&next, input, syntax); re_string_skip_bytes (input, -1); if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) break; } token->type = ANCHOR; token->opr.ctx_type = LINE_LAST; break; default: break; } return 1; } /* Peek a token from INPUT, and return the length of the token. We must not use this function out of bracket expressions. */ static int internal_function peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; return 1; } #endif /* RE_ENABLE_I18N */ if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && re_string_cur_idx (input) + 1 < re_string_length (input)) { /* In this case, '\' escape a character. */ unsigned char c2; re_string_skip_bytes (input, 1); c2 = re_string_peek_byte (input, 0); token->opr.c = c2; token->type = CHARACTER; return 1; } if (c == '[') /* '[' is a special char in a bracket exps. */ { unsigned char c2; int token_len; if (re_string_cur_idx (input) + 1 < re_string_length (input)) c2 = re_string_peek_byte (input, 1); else c2 = 0; token->opr.c = c2; token_len = 2; switch (c2) { case '.': token->type = OP_OPEN_COLL_ELEM; break; case '=': token->type = OP_OPEN_EQUIV_CLASS; break; case ':': if (syntax & RE_CHAR_CLASSES) { token->type = OP_OPEN_CHAR_CLASS; break; } /* else fall through. */ default: token->type = CHARACTER; token->opr.c = c; token_len = 1; break; } return token_len; } switch (c) { case '-': token->type = OP_CHARSET_RANGE; break; case ']': token->type = OP_CLOSE_BRACKET; break; case '^': token->type = OP_NON_MATCH_LIST; break; default: token->type = CHARACTER; } return 1; } /* Functions for parser. */ /* Entry point of the parser. Parse the regular expression REGEXP and return the structure tree. If an error occurs, ERR is set by error code, and return NULL. This function build the following tree, from regular expression : CAT / \ / \ EOR CAT means concatenation. EOR means end of regular expression. */ static bin_tree_t * parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err) { re_dfa_t *dfa = preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; dfa->syntax = syntax; fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; eor = create_tree (dfa, NULL, NULL, END_OF_RE); if (tree != NULL) root = create_tree (dfa, tree, eor, CONCAT); else root = eor; if (BE (eor == NULL || root == NULL, 0)) { *err = REG_ESPACE; return NULL; } return root; } /* This function build the following tree, from regular expression |: ALT / \ / \ ALT means alternative, which represents the operator '|'. */ static bin_tree_t * parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = preg->buffer; bin_tree_t *tree, *branch = NULL; bitset_word_t initial_bkref_map = dfa->completed_bkref_map; tree = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type == OP_ALT) { fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); if (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { bitset_word_t accumulated_bkref_map = dfa->completed_bkref_map; dfa->completed_bkref_map = initial_bkref_map; branch = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && branch == NULL, 0)) { if (tree != NULL) postorder (tree, free_tree, NULL); return NULL; } dfa->completed_bkref_map |= accumulated_bkref_map; } else branch = NULL; tree = create_tree (dfa, tree, branch, OP_ALT); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } return tree; } /* This function build the following tree, from regular expression : CAT / \ / \ CAT means concatenation. */ static bin_tree_t * parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { bin_tree_t *tree, *expr; re_dfa_t *dfa = preg->buffer; tree = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { expr = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && expr == NULL, 0)) { if (tree != NULL) postorder (tree, free_tree, NULL); return NULL; } if (tree != NULL && expr != NULL) { bin_tree_t *newtree = create_tree (dfa, tree, expr, CONCAT); if (newtree == NULL) { postorder (expr, free_tree, NULL); postorder (tree, free_tree, NULL); *err = REG_ESPACE; return NULL; } tree = newtree; } else if (tree == NULL) tree = expr; /* Otherwise expr == NULL, we don't need to create new tree. */ } return tree; } /* This function build the following tree, from regular expression a*: * | a */ static bin_tree_t * parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = preg->buffer; bin_tree_t *tree; switch (token->type) { case CHARACTER: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (!re_string_eoi (regexp) && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) { bin_tree_t *mbc_remain; fetch_token (token, regexp, syntax); mbc_remain = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree, mbc_remain, CONCAT); if (BE (mbc_remain == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } } #endif break; case OP_OPEN_SUBEXP: tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_OPEN_BRACKET: tree = parse_bracket_exp (regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_BACK_REF: if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) { *err = REG_ESUBREG; return NULL; } dfa->used_bkref_map |= 1 << token->opr.idx; tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } ++dfa->nbackref; dfa->has_mb_node = 1; break; case OP_OPEN_DUP_NUM: if (syntax & RE_CONTEXT_INVALID_DUP) { *err = REG_BADRPT; return NULL; } /* FALLTHROUGH */ case OP_DUP_ASTERISK: case OP_DUP_PLUS: case OP_DUP_QUESTION: if (syntax & RE_CONTEXT_INVALID_OPS) { *err = REG_BADRPT; return NULL; } else if (syntax & RE_CONTEXT_INDEP_OPS) { fetch_token (token, regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); } /* else fall through */ case OP_CLOSE_SUBEXP: if ((token->type == OP_CLOSE_SUBEXP) && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) { *err = REG_ERPAREN; return NULL; } /* else fall through */ case OP_CLOSE_DUP_NUM: /* We treat it as a normal character. */ /* Then we can these characters as normal characters. */ token->type = CHARACTER; /* mb_partial and word_char bits should be initialized already by peek_token. */ tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } break; case ANCHOR: if ((token->opr.ctx_type & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) && dfa->word_ops_used == 0) init_word_char (dfa); if (token->opr.ctx_type == WORD_DELIM || token->opr.ctx_type == NOT_WORD_DELIM) { bin_tree_t *tree_first, *tree_last; if (token->opr.ctx_type == WORD_DELIM) { token->opr.ctx_type = WORD_FIRST; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = WORD_LAST; } else { token->opr.ctx_type = INSIDE_WORD; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = INSIDE_NOTWORD; } tree_last = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree_first, tree_last, OP_ALT); if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } else { tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } /* We must return here, since ANCHORs can't be followed by repetition operators. eg. RE"^*" is invalid or "", it must not be "". */ fetch_token (token, regexp, syntax); return tree; case OP_PERIOD: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } if (dfa->mb_cur_max > 1) dfa->has_mb_node = 1; break; case OP_WORD: case OP_NOTWORD: tree = build_charclass_op (dfa, regexp->trans, "alnum", "_", token->type == OP_NOTWORD, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_SPACE: case OP_NOTSPACE: tree = build_charclass_op (dfa, regexp->trans, "space", "", token->type == OP_NOTSPACE, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_ALT: case END_OF_RE: return NULL; case BACK_SLASH: *err = REG_EESCAPE; return NULL; default: /* Must not happen? */ #ifdef DEBUG assert (0); #endif return NULL; } fetch_token (token, regexp, syntax); while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) { bin_tree_t *dup_tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && dup_tree == NULL, 0)) { if (tree != NULL) postorder (tree, free_tree, NULL); return NULL; } tree = dup_tree; /* In BRE consecutive duplications are not allowed. */ if ((syntax & RE_CONTEXT_INVALID_DUP) && (token->type == OP_DUP_ASTERISK || token->type == OP_OPEN_DUP_NUM)) { if (tree != NULL) postorder (tree, free_tree, NULL); *err = REG_BADRPT; return NULL; } } return tree; } /* This function build the following tree, from regular expression (): SUBEXP | */ static bin_tree_t * parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = preg->buffer; bin_tree_t *tree; size_t cur_nsub; cur_nsub = preg->re_nsub++; fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); /* The subexpression may be a null string. */ if (token->type == OP_CLOSE_SUBEXP) tree = NULL; else { tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) { if (tree != NULL) postorder (tree, free_tree, NULL); *err = REG_EPAREN; } if (BE (*err != REG_NOERROR, 0)) return NULL; } if (cur_nsub <= '9' - '1') dfa->completed_bkref_map |= 1 << cur_nsub; tree = create_tree (dfa, tree, NULL, SUBEXP); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } tree->token.opr.idx = cur_nsub; return tree; } /* This function parse repetition operators like "*", "+", "{1,3}" etc. */ static bin_tree_t * parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { bin_tree_t *tree = NULL, *old_tree = NULL; Idx i, start, end, start_idx = re_string_cur_idx (regexp); re_token_t start_token = *token; if (token->type == OP_OPEN_DUP_NUM) { end = 0; start = fetch_number (regexp, token, syntax); if (start == -1) { if (token->type == CHARACTER && token->opr.c == ',') start = 0; /* We treat "{,m}" as "{0,m}". */ else { *err = REG_BADBR; /* {} is invalid. */ return NULL; } } if (BE (start != -2, 1)) { /* We treat "{n}" as "{n,n}". */ end = ((token->type == OP_CLOSE_DUP_NUM) ? start : ((token->type == CHARACTER && token->opr.c == ',') ? fetch_number (regexp, token, syntax) : -2)); } if (BE (start == -2 || end == -2, 0)) { /* Invalid sequence. */ if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) { if (token->type == END_OF_RE) *err = REG_EBRACE; else *err = REG_BADBR; return NULL; } /* If the syntax bit is set, rollback. */ re_string_set_index (regexp, start_idx); *token = start_token; token->type = CHARACTER; /* mb_partial and word_char bits should be already initialized by peek_token. */ return elem; } if (BE ((end != -1 && start > end) || token->type != OP_CLOSE_DUP_NUM, 0)) { /* First number greater than second. */ *err = REG_BADBR; return NULL; } if (BE (RE_DUP_MAX < (end == -1 ? start : end), 0)) { *err = REG_ESIZE; return NULL; } } else { start = (token->type == OP_DUP_PLUS) ? 1 : 0; end = (token->type == OP_DUP_QUESTION) ? 1 : -1; } fetch_token (token, regexp, syntax); if (BE (elem == NULL, 0)) return NULL; if (BE (start == 0 && end == 0, 0)) { postorder (elem, free_tree, NULL); return NULL; } /* Extract "{n,m}" to "...{0,}". */ if (BE (start > 0, 0)) { tree = elem; for (i = 2; i <= start; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; } if (start == end) return tree; /* Duplicate ELEM before it is marked optional. */ elem = duplicate_tree (elem, dfa); if (BE (elem == NULL, 0)) goto parse_dup_op_espace; old_tree = tree; } else old_tree = NULL; if (elem->token.type == SUBEXP) { uintptr_t subidx = elem->token.opr.idx; postorder (elem, mark_opt_subexp, (void *) subidx); } tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT)); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; /* From gnulib's "intprops.h": True if the arithmetic type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* This loop is actually executed only when end != -1, to rewrite {0,n} as ((...?)?)?... We have already created the start+1-th copy. */ if (TYPE_SIGNED (Idx) || end != -1) for (i = start + 2; i <= end; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; tree = create_tree (dfa, tree, NULL, OP_ALT); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; } if (old_tree) tree = create_tree (dfa, old_tree, tree, CONCAT); return tree; parse_dup_op_espace: *err = REG_ESPACE; return NULL; } /* Size of the names for collating symbol/equivalence_class/character_class. I'm not sure, but maybe enough. */ #define BRACKET_NAME_BUF_SIZE 32 #ifndef _LIBC # ifdef RE_ENABLE_I18N /* Convert the byte B to the corresponding wide character. In a unibyte locale, treat B as itself if it is an encoding error. In a multibyte locale, return WEOF if B is an encoding error. */ static wint_t parse_byte (unsigned char b, re_charset_t *mbcset) { wint_t wc = __btowc (b); return wc == WEOF && !mbcset ? b : wc; } #endif /* Local function for parse_bracket_exp only used in case of NOT _LIBC. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument since we may update it. */ static reg_errcode_t internal_function # ifdef RE_ENABLE_I18N build_range_exp (const reg_syntax_t syntax, bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc, const bracket_elem_t *start_elem, const bracket_elem_t *end_elem) # else /* not RE_ENABLE_I18N */ build_range_exp (const reg_syntax_t syntax, bitset_t sbcset, const bracket_elem_t *start_elem, const bracket_elem_t *end_elem) # endif /* not RE_ENABLE_I18N */ { unsigned int start_ch, end_ch; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; /* We can handle no multi character collating elements without libc support. */ if (BE ((start_elem->type == COLL_SYM && strlen ((char *) start_elem->opr.name) > 1) || (end_elem->type == COLL_SYM && strlen ((char *) end_elem->opr.name) > 1), 0)) return REG_ECOLLATE; # ifdef RE_ENABLE_I18N { wchar_t wc; wint_t start_wc; wint_t end_wc; start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) ? parse_byte (start_ch, mbcset) : start_elem->opr.wch); end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) ? parse_byte (end_ch, mbcset) : end_elem->opr.wch); if (start_wc == WEOF || end_wc == WEOF) return REG_ECOLLATE; else if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_wc > end_wc, 0)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, for !_LIBC we have no collation elements: if the character set is single byte, the single byte character set that we build below suffices. parse_bracket_exp passes no MBCSET if dfa->mb_cur_max == 1. */ if (mbcset) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ wchar_t *new_array_start, *new_array_end; Idx new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; /* Use realloc since mbcset->range_starts and mbcset->range_ends are NULL if *range_alloc == 0. */ new_array_start = re_realloc (mbcset->range_starts, wchar_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, wchar_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) { re_free (new_array_start); re_free (new_array_end); return REG_ESPACE; } mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_wc; mbcset->range_ends[mbcset->nranges++] = end_wc; } /* Build the table for single byte characters. */ for (wc = 0; wc < SBC_MAX; ++wc) { if (start_wc <= wc && wc <= end_wc) bitset_set (sbcset, wc); } } # else /* not RE_ENABLE_I18N */ { unsigned int ch; start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); if (start_ch > end_ch) return REG_ERANGE; /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ++ch) if (start_ch <= ch && ch <= end_ch) bitset_set (sbcset, ch); } # endif /* not RE_ENABLE_I18N */ return REG_NOERROR; } #endif /* not _LIBC */ #ifndef _LIBC /* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument since we may update it. */ static reg_errcode_t internal_function # ifdef RE_ENABLE_I18N build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, Idx *coll_sym_alloc, const unsigned char *name) # else /* not RE_ENABLE_I18N */ build_collating_symbol (bitset_t sbcset, const unsigned char *name) # endif /* not RE_ENABLE_I18N */ { size_t name_len = strlen ((const char *) name); if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } #endif /* not _LIBC */ /* This function parse bracket expression like "[abc]", "[a-c]", "[[.a-a.]]" etc. */ static bin_tree_t * parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { #ifdef _LIBC const unsigned char *collseqmb; const char *collseqwc; uint32_t nrules; int32_t table_size; const int32_t *symb_table; const unsigned char *extra; /* Local function for parse_bracket_exp used in _LIBC environment. Seek the collating symbol entry corresponding to NAME. Return the index of the symbol in the SYMB_TABLE, or -1 if not found. */ auto inline int32_t __attribute__ ((always_inline)) seek_collating_symbol_entry (const unsigned char *name, size_t name_len) { int32_t elem; for (elem = 0; elem < table_size; elem++) if (symb_table[2 * elem] != 0) { int32_t idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; if (/* Compare the length of the name. */ name_len == extra[idx] /* Compare the name. */ && memcmp (name, &extra[idx + 1], name_len) == 0) /* Yep, this is the entry. */ return elem; } return -1; } /* Local function for parse_bracket_exp used in _LIBC environment. Look up the collation sequence value of BR_ELEM. Return the value if succeeded, UINT_MAX otherwise. */ auto inline unsigned int __attribute__ ((always_inline)) lookup_collation_sequence_value (bracket_elem_t *br_elem) { if (br_elem->type == SB_CHAR) { /* if (MB_CUR_MAX == 1) */ if (nrules == 0) return collseqmb[br_elem->opr.ch]; else { wint_t wc = __btowc (br_elem->opr.ch); return __collseq_table_lookup (collseqwc, wc); } } else if (br_elem->type == MB_CHAR) { if (nrules != 0) return __collseq_table_lookup (collseqwc, br_elem->opr.wch); } else if (br_elem->type == COLL_SYM) { size_t sym_name_len = strlen ((char *) br_elem->opr.name); if (nrules != 0) { int32_t elem, idx; elem = seek_collating_symbol_entry (br_elem->opr.name, sym_name_len); if (elem != -1) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; /* Skip the byte sequence of the collating element. */ idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the multibyte collation sequence value. */ idx += sizeof (unsigned int); /* Skip the wide char sequence of the collating element. */ idx += sizeof (unsigned int) * (1 + *(unsigned int *) (extra + idx)); /* Return the collation sequence value. */ return *(unsigned int *) (extra + idx); } else if (sym_name_len == 1) { /* No valid character. Match it as a single byte character. */ return collseqmb[br_elem->opr.name[0]]; } } else if (sym_name_len == 1) return collseqmb[br_elem->opr.name[0]]; } return UINT_MAX; } /* Local function for parse_bracket_exp used in _LIBC environment. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument since we may update it. */ auto inline reg_errcode_t __attribute__ ((always_inline)) build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc, bracket_elem_t *start_elem, bracket_elem_t *end_elem) { unsigned int ch; uint32_t start_collseq; uint32_t end_collseq; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; /* FIXME: Implement rational ranges here, too. */ start_collseq = lookup_collation_sequence_value (start_elem); end_collseq = lookup_collation_sequence_value (end_elem); /* Check start/end collation sequence values. */ if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) return REG_ECOLLATE; if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, if we have no collation elements, and the character set is single byte, the single byte character set that we build below suffices. */ if (nrules > 0 || dfa->mb_cur_max > 1) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ uint32_t *new_array_start; uint32_t *new_array_end; Idx new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; new_array_start = re_realloc (mbcset->range_starts, uint32_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, uint32_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_collseq; mbcset->range_ends[mbcset->nranges++] = end_collseq; } /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ch++) { uint32_t ch_collseq; /* if (MB_CUR_MAX == 1) */ if (nrules == 0) ch_collseq = collseqmb[ch]; else ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) bitset_set (sbcset, ch); } return REG_NOERROR; } /* Local function for parse_bracket_exp used in _LIBC environment. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument since we may update it. */ auto inline reg_errcode_t __attribute__ ((always_inline)) build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, Idx *coll_sym_alloc, const unsigned char *name) { int32_t elem, idx; size_t name_len = strlen ((const char *) name); if (nrules != 0) { elem = seek_collating_symbol_entry (name, name_len); if (elem != -1) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; } else if (name_len == 1) { /* No valid character, treat it as a normal character. */ bitset_set (sbcset, name[0]); return REG_NOERROR; } else return REG_ECOLLATE; /* Got valid collation sequence, add it as a new entry. */ /* Check the space of the arrays. */ if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->ncoll_syms is 0. */ Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; /* Use realloc since mbcset->coll_syms is NULL if *alloc == 0. */ int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, new_coll_sym_alloc); if (BE (new_coll_syms == NULL, 0)) return REG_ESPACE; mbcset->coll_syms = new_coll_syms; *coll_sym_alloc = new_coll_sym_alloc; } mbcset->coll_syms[mbcset->ncoll_syms++] = idx; return REG_NOERROR; } else { if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } } #endif re_token_t br_token; re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; Idx equiv_class_alloc = 0, char_class_alloc = 0; #endif /* not RE_ENABLE_I18N */ bool non_match = false; bin_tree_t *work_tree; int token_len; bool first_round = true; #ifdef _LIBC collseqmb = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules) { /* if (MB_CUR_MAX > 1) */ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); } #endif sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else if (BE (sbcset == NULL, 0)) #endif /* RE_ENABLE_I18N */ { re_free (sbcset); #ifdef RE_ENABLE_I18N re_free (mbcset); #endif *err = REG_ESPACE; return NULL; } token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } if (token->type == OP_NON_MATCH_LIST) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ non_match = true; if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set (sbcset, '\n'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } } /* We treat the first ']' as a normal character. */ if (token->type == OP_CLOSE_BRACKET) token->type = CHARACTER; while (1) { bracket_elem_t start_elem, end_elem; unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; reg_errcode_t ret; int token_len2 = 0; bool is_range_exp = false; re_token_t token2; start_elem.opr.name = start_name_buf; start_elem.type = COLL_SYM; ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, syntax, first_round); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } first_round = false; /* Get information about the next token. We need it in any case. */ token_len = peek_token_bracket (token, regexp, syntax); /* Do not check for ranges if we know they are not allowed. */ if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) { if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CHARSET_RANGE) { re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ token_len2 = peek_token_bracket (&token2, regexp, syntax); if (BE (token2.type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token2.type == OP_CLOSE_BRACKET) { /* We treat the last '-' as a normal character. */ re_string_skip_bytes (regexp, -token_len); token->type = CHARACTER; } else is_range_exp = true; } } if (is_range_exp == true) { end_elem.opr.name = end_name_buf; end_elem.type = COLL_SYM; ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, dfa, syntax, true); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } token_len = peek_token_bracket (token, regexp, syntax); #ifdef _LIBC *err = build_range_exp (sbcset, mbcset, &range_alloc, &start_elem, &end_elem); #else # ifdef RE_ENABLE_I18N *err = build_range_exp (syntax, sbcset, dfa->mb_cur_max > 1 ? mbcset : NULL, &range_alloc, &start_elem, &end_elem); # else *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem); # endif #endif /* RE_ENABLE_I18N */ if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; } else { switch (start_elem.type) { case SB_CHAR: bitset_set (sbcset, start_elem.opr.ch); break; #ifdef RE_ENABLE_I18N case MB_CHAR: /* Check whether the array has enough space. */ if (BE (mbchar_alloc == mbcset->nmbchars, 0)) { wchar_t *new_mbchars; /* Not enough, realloc it. */ /* +1 in case of mbcset->nmbchars is 0. */ mbchar_alloc = 2 * mbcset->nmbchars + 1; /* Use realloc since array is NULL if *alloc == 0. */ new_mbchars = re_realloc (mbcset->mbchars, wchar_t, mbchar_alloc); if (BE (new_mbchars == NULL, 0)) goto parse_bracket_exp_espace; mbcset->mbchars = new_mbchars; } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; #endif /* RE_ENABLE_I18N */ case EQUIV_CLASS: *err = build_equiv_class (sbcset, #ifdef RE_ENABLE_I18N mbcset, &equiv_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case COLL_SYM: *err = build_collating_symbol (sbcset, #ifdef RE_ENABLE_I18N mbcset, &coll_sym_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case CHAR_CLASS: *err = build_charclass (regexp->trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &char_class_alloc, #endif /* RE_ENABLE_I18N */ (const char *) start_elem.opr.name, syntax); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; default: assert (0); break; } } if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CLOSE_BRACKET) break; } re_string_skip_bytes (regexp, token_len); /* Skip a token. */ /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes || mbcset->non_match))) { bin_tree_t *mbc_tree; int sbc_idx; /* Build a tree for complex bracket. */ dfa->has_mb_node = 1; br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto parse_bracket_exp_espace; for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) if (sbcset[sbc_idx]) break; /* If there are no bits set in sbcset, there is no point of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ if (sbc_idx < BITSET_WORDS) { /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; /* Then join them by ALT node. */ work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } else { re_free (sbcset); work_tree = mbc_tree; } } else #endif /* not RE_ENABLE_I18N */ { #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } return work_tree; parse_bracket_exp_espace: *err = REG_ESPACE; parse_bracket_exp_free_return: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ return NULL; } /* Parse an element in the bracket expression. */ static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, bool accept_hyphen) { #ifdef RE_ENABLE_I18N int cur_char_size; cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); if (cur_char_size > 1) { elem->type = MB_CHAR; elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); re_string_skip_bytes (regexp, cur_char_size); return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ re_string_skip_bytes (regexp, token_len); /* Skip a token. */ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) return parse_bracket_symbol (elem, regexp, token); if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) { /* A '-' must only appear as anything but a range indicator before the closing bracket. Everything else is an error. */ re_token_t token2; (void) peek_token_bracket (&token2, regexp, syntax); if (token2.type != OP_CLOSE_BRACKET) /* The actual error value is not standardized since this whole case is undefined. But ERANGE makes good sense. */ return REG_ERANGE; } elem->type = SB_CHAR; elem->opr.ch = token->opr.c; return REG_NOERROR; } /* Parse a bracket symbol in the bracket expression. Bracket symbols are such as [::], [..], and [==]. */ static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token) { unsigned char ch, delim = token->opr.c; int i = 0; if (re_string_eoi(regexp)) return REG_EBRACK; for (;; ++i) { if (i >= BRACKET_NAME_BUF_SIZE) return REG_EBRACK; if (token->type == OP_OPEN_CHAR_CLASS) ch = re_string_fetch_byte_case (regexp); else ch = re_string_fetch_byte (regexp); if (re_string_eoi(regexp)) return REG_EBRACK; if (ch == delim && re_string_peek_byte (regexp, 0) == ']') break; elem->opr.name[i] = ch; } re_string_skip_bytes (regexp, 1); elem->opr.name[i] = '\0'; switch (token->type) { case OP_OPEN_COLL_ELEM: elem->type = COLL_SYM; break; case OP_OPEN_EQUIV_CLASS: elem->type = EQUIV_CLASS; break; case OP_OPEN_CHAR_CLASS: elem->type = CHAR_CLASS; break; default: break; } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the equivalence class which is represented by NAME. The result are written to MBCSET and SBCSET. EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, is a pointer argument since we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, const unsigned char *name) #else /* not RE_ENABLE_I18N */ build_equiv_class (bitset_t sbcset, const unsigned char *name) #endif /* not RE_ENABLE_I18N */ { #ifdef _LIBC uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { const int32_t *table, *indirect; const unsigned char *weights, *extra, *cp; unsigned char char_buf[2]; int32_t idx1, idx2; unsigned int ch; size_t len; /* Calculate the index for equivalence class. */ cp = name; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); idx1 = findidx (table, indirect, extra, &cp, -1); if (BE (idx1 == 0 || *cp != '\0', 0)) /* This isn't a valid character. */ return REG_ECOLLATE; /* Build single byte matching table for this equivalence class. */ len = weights[idx1 & 0xffffff]; for (ch = 0; ch < SBC_MAX; ++ch) { char_buf[0] = ch; cp = char_buf; idx2 = findidx (table, indirect, extra, &cp, 1); /* idx2 = table[ch]; */ if (idx2 == 0) /* This isn't a valid character. */ continue; /* Compare only if the length matches and the collation rule index is the same. */ if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) { int cnt = 0; while (cnt <= len && weights[(idx1 & 0xffffff) + 1 + cnt] == weights[(idx2 & 0xffffff) + 1 + cnt]) ++cnt; if (cnt > len) bitset_set (sbcset, ch); } } /* Check whether the array has enough space. */ if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nequiv_classes is 0. */ Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; /* Use realloc since the array is NULL if *alloc == 0. */ int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, int32_t, new_equiv_class_alloc); if (BE (new_equiv_classes == NULL, 0)) return REG_ESPACE; mbcset->equiv_classes = new_equiv_classes; *equiv_class_alloc = new_equiv_class_alloc; } mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; } else #endif /* _LIBC */ { if (BE (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; bitset_set (sbcset, *name); } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the character class which is represented by NAME. The result are written to MBCSET and SBCSET. CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, is a pointer argument since we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, const char *class_name, reg_syntax_t syntax) #else /* not RE_ENABLE_I18N */ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const char *class_name, reg_syntax_t syntax) #endif /* not RE_ENABLE_I18N */ { int i; const char *name = class_name; /* In case of REG_ICASE "upper" and "lower" match the both of upper and lower cases. */ if ((syntax & RE_ICASE) && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) name = "alpha"; #ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nchar_classes is 0. */ Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1; /* Use realloc since array is NULL if *alloc == 0. */ wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, new_char_class_alloc); if (BE (new_char_classes == NULL, 0)) return REG_ESPACE; mbcset->char_classes = new_char_classes; *char_class_alloc = new_char_class_alloc; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); #endif /* RE_ENABLE_I18N */ #define BUILD_CHARCLASS_LOOP(ctype_func) \ do { \ if (BE (trans != NULL, 0)) \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, trans[i]); \ } \ else \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, i); \ } \ } while (0) if (strcmp (name, "alnum") == 0) BUILD_CHARCLASS_LOOP (isalnum); else if (strcmp (name, "cntrl") == 0) BUILD_CHARCLASS_LOOP (iscntrl); else if (strcmp (name, "lower") == 0) BUILD_CHARCLASS_LOOP (islower); else if (strcmp (name, "space") == 0) BUILD_CHARCLASS_LOOP (isspace); else if (strcmp (name, "alpha") == 0) BUILD_CHARCLASS_LOOP (isalpha); else if (strcmp (name, "digit") == 0) BUILD_CHARCLASS_LOOP (isdigit); else if (strcmp (name, "print") == 0) BUILD_CHARCLASS_LOOP (isprint); else if (strcmp (name, "upper") == 0) BUILD_CHARCLASS_LOOP (isupper); else if (strcmp (name, "blank") == 0) BUILD_CHARCLASS_LOOP (isblank); else if (strcmp (name, "graph") == 0) BUILD_CHARCLASS_LOOP (isgraph); else if (strcmp (name, "punct") == 0) BUILD_CHARCLASS_LOOP (ispunct); else if (strcmp (name, "xdigit") == 0) BUILD_CHARCLASS_LOOP (isxdigit); else return REG_ECTYPE; return REG_NOERROR; } static bin_tree_t * build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const char *class_name, const char *extra, bool non_match, reg_errcode_t *err) { re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; Idx alloc = 0; #endif /* not RE_ENABLE_I18N */ reg_errcode_t ret; re_token_t br_token; bin_tree_t *tree; sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); if (BE (sbcset == NULL, 0)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); if (BE (mbcset == NULL, 0)) { re_free (sbcset); *err = REG_ESPACE; return NULL; } mbcset->non_match = non_match; #endif /* RE_ENABLE_I18N */ /* We don't care the syntax in this case. */ ret = build_charclass (trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &alloc, #endif /* RE_ENABLE_I18N */ class_name, 0); if (BE (ret != REG_NOERROR, 0)) { re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = ret; return NULL; } /* \w match '_' also. */ for (; *extra; extra++) bitset_set (sbcset, *extra); /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); #endif /* Build a tree for simple bracket. */ #if defined GCC_LINT || defined lint memset (&br_token, 0, sizeof br_token); #endif br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (tree == NULL, 0)) goto build_word_op_espace; #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { bin_tree_t *mbc_tree; /* Build a tree for complex bracket. */ br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto build_word_op_espace; /* Then join them by ALT node. */ tree = create_tree (dfa, tree, mbc_tree, OP_ALT); if (BE (mbc_tree != NULL, 1)) return tree; } else { free_charset (mbcset); return tree; } #else /* not RE_ENABLE_I18N */ return tree; #endif /* not RE_ENABLE_I18N */ build_word_op_espace: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = REG_ESPACE; return NULL; } /* This is intended for the expressions like "a{1,3}". Fetch a number from 'input', and return the number. Return -1 if the number field is empty like "{,1}". Return RE_DUP_MAX + 1 if the number field is too large. Return -2 if an error occurred. */ static Idx fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) { Idx num = -1; unsigned char c; while (1) { fetch_token (token, input, syntax); c = token->opr.c; if (BE (token->type == END_OF_RE, 0)) return -2; if (token->type == OP_CLOSE_DUP_NUM || c == ',') break; num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2) ? -2 : num == -1 ? c - '0' : MIN (RE_DUP_MAX + 1, num * 10 + c - '0')); } return num; } #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset) { re_free (cset->mbchars); # ifdef _LIBC re_free (cset->coll_syms); re_free (cset->equiv_classes); re_free (cset->range_starts); re_free (cset->range_ends); # endif re_free (cset->char_classes); re_free (cset); } #endif /* RE_ENABLE_I18N */ /* Functions for binary tree operation. */ /* Create a tree node. */ static bin_tree_t * create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type) { re_token_t t; #if defined GCC_LINT || defined lint memset (&t, 0, sizeof t); #endif t.type = type; return create_token_tree (dfa, left, right, &t); } static bin_tree_t * create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token) { bin_tree_t *tree; if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) { bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); if (storage == NULL) return NULL; storage->next = dfa->str_tree_storage; dfa->str_tree_storage = storage; dfa->str_tree_storage_idx = 0; } tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; tree->parent = NULL; tree->left = left; tree->right = right; tree->token = *token; tree->token.duplicated = 0; tree->token.opt_subexp = 0; tree->first = NULL; tree->next = NULL; tree->node_idx = -1; if (left != NULL) left->parent = tree; if (right != NULL) right->parent = tree; return tree; } /* Mark the tree SRC as an optional subexpression. To be called from preorder or postorder. */ static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node) { Idx idx = (uintptr_t) extra; if (node->token.type == SUBEXP && node->token.opr.idx == idx) node->token.opt_subexp = 1; return REG_NOERROR; } /* Free the allocated memory inside NODE. */ static void free_token (re_token_t *node) { #ifdef RE_ENABLE_I18N if (node->type == COMPLEX_BRACKET && node->duplicated == 0) free_charset (node->opr.mbcset); else #endif /* RE_ENABLE_I18N */ if (node->type == SIMPLE_BRACKET && node->duplicated == 0) re_free (node->opr.sbcset); } /* Worker function for tree walking. Free the allocated memory inside NODE and its children. */ static reg_errcode_t free_tree (void *extra, bin_tree_t *node) { free_token (&node->token); return REG_NOERROR; } /* Duplicate the node SRC, and return new node. This is a preorder visit similar to the one implemented by the generic visitor, but we need more infrastructure to maintain two parallel trees --- so, it's easier to duplicate. */ static bin_tree_t * duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) { const bin_tree_t *node; bin_tree_t *dup_root; bin_tree_t **p_new = &dup_root, *dup_node = root->parent; for (node = root; ; ) { /* Create a new tree and link it back to the current parent. */ *p_new = create_token_tree (dfa, NULL, NULL, &node->token); if (*p_new == NULL) return NULL; (*p_new)->parent = dup_node; (*p_new)->token.duplicated = 1; dup_node = *p_new; /* Go to the left node, or up and to the right. */ if (node->left) { node = node->left; p_new = &dup_node->left; } else { const bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; dup_node = dup_node->parent; if (!node) return dup_root; } node = node->right; p_new = &dup_node->right; } } } pspp-1.0.1/gl/strncasecmp.c0000644000175000017500000000355713124536243012521 00000000000000/* strncasecmp.c -- case insensitive string comparator Copyright (C) 1998-1999, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include #include #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Compare no more than N bytes of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function cannot work correctly in multibyte locales. */ int strncasecmp (const char *s1, const char *s2, size_t n) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2 || n == 0) return 0; do { c1 = TOLOWER (*p1); c2 = TOLOWER (*p2); if (--n == 0 || c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } pspp-1.0.1/gl/iswblank.c0000644000175000017500000000153113124536242011776 00000000000000/* Test wide character for being blank. Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include int iswblank (wint_t wc) { return wc == ' ' || wc == '\t'; } pspp-1.0.1/gl/tmpdir.h0000644000175000017500000000235713124536243011500 00000000000000/* Determine a temporary directory. Copyright (C) 2001-2002, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include /* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is non-null and exists, uses it; otherwise uses the first of $TMPDIR, P_tmpdir, /tmp that exists. Copies into TMPL a template suitable for use with mk[s]temp. Will fail (-1) if DIR is non-null and doesn't exist, none of the searched dirs exists, or there's not enough space in TMPL. */ extern int path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, bool try_tmpdir); pspp-1.0.1/gl/gl_linkedhash_list.h0000644000175000017500000000222113124536242014015 00000000000000/* Sequential list data type implemented by a hash table with a linked list. Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 . */ #ifndef _GL_LINKEDHASH_LIST_H #define _GL_LINKEDHASH_LIST_H #include "gl_list.h" #ifdef __cplusplus extern "C" { #endif extern const struct gl_list_implementation gl_linkedhash_list_implementation; #define GL_LINKEDHASH_LIST &gl_linkedhash_list_implementation #ifdef __cplusplus } #endif #endif /* _GL_LINKEDHASH_LIST_H */ pspp-1.0.1/gl/c-xvasprintf.h0000644000175000017500000000433113124536241012615 00000000000000/* vasprintf and asprintf, with out-of-memory checking, in C locale. Copyright (C) 2002-2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _C_XVASPRINTF_H #define _C_XVASPRINTF_H /* Get va_list. */ #include /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(), and return it. Upon [ENOMEM] memory allocation error, call xalloc_die. On some other error - [EOVERFLOW] resulting string length is > INT_MAX, - [EINVAL] invalid format string, - [EILSEQ] error during conversion between wide and multibyte characters, return NULL. Formatting takes place in the C locale, that is, the decimal point used in floating-point formatting directives is always '.'. */ extern char *c_xasprintf (const char *format, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 1, 2)); extern char *c_xvasprintf (const char *format, va_list args) _GL_ATTRIBUTE_FORMAT ((__printf__, 1, 0)); #ifdef __cplusplus } #endif #endif /* _C_XVASPRINTF_H */ pspp-1.0.1/gl/pathmax.h0000644000175000017500000000555613124536242011646 00000000000000/* Define PATH_MAX somehow. Requires sys/types.h. Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _PATHMAX_H # define _PATHMAX_H /* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename, including the terminating NUL byte. PATH_MAX is not defined on systems which have no limit on filename length, such as GNU/Hurd. This file does *not* define PATH_MAX always. Programs that use this file can handle the GNU/Hurd case in several ways: - Either with a package-wide handling, or with a per-file handling, - Either through a #ifdef PATH_MAX or through a fallback like #ifndef PATH_MAX # define PATH_MAX 8192 #endif or through a fallback like #ifndef PATH_MAX # define PATH_MAX pathconf ("/", _PC_PATH_MAX) #endif */ # include # include # ifndef _POSIX_PATH_MAX # define _POSIX_PATH_MAX 256 # endif /* Don't include sys/param.h if it already has been. */ # if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include # endif # if !defined PATH_MAX && defined MAXPATHLEN # define PATH_MAX MAXPATHLEN # endif # ifdef __hpux /* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename, *not* including the terminating NUL byte, and is set to 1023. Additionally, when _XOPEN_SOURCE is defined to 500 or more, PATH_MAX is not defined at all any more. */ # undef PATH_MAX # define PATH_MAX 1024 # endif # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com, section "Maximum Path Length Limitation", explains that the maximum size of a filename, including the terminating NUL byte, is 260 = 3 + 256 + 1. This is the same value as - FILENAME_MAX in , - _MAX_PATH in , - MAX_PATH in . Undefine the original value, because mingw's gets it wrong. */ # undef PATH_MAX # define PATH_MAX 260 # endif #endif /* _PATHMAX_H */ pspp-1.0.1/gl/c-strtod.c0000644000175000017500000000510513124536241011723 00000000000000/* Convert string to double, using the C locale. Copyright (C) 2003-2004, 2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paul Eggert. */ #include #include "c-strtod.h" #include #include #include #include #if LONG # define C_STRTOD c_strtold # define DOUBLE long double # define STRTOD_L strtold_l #else # define C_STRTOD c_strtod # define DOUBLE double # define STRTOD_L strtod_l #endif /* c_strtold falls back on strtod if strtold doesn't conform to C99. */ #if LONG && HAVE_C99_STRTOLD # define STRTOD strtold #else # define STRTOD strtod #endif #if defined LC_ALL_MASK && (LONG ? HAVE_STRTOLD_L : HAVE_STRTOD_L) /* Cache for the C locale object. Marked volatile so that different threads see the same value (avoids locking). */ static volatile locale_t c_locale_cache; /* Return the C locale object, or (locale_t) 0 with errno set if it cannot be created. */ static locale_t c_locale (void) { if (!c_locale_cache) c_locale_cache = newlocale (LC_ALL_MASK, "C", (locale_t) 0); return c_locale_cache; } #endif DOUBLE C_STRTOD (char const *nptr, char **endptr) { DOUBLE r; #if defined LC_ALL_MASK && (LONG ? HAVE_STRTOLD_L : HAVE_STRTOD_L) locale_t locale = c_locale (); if (!locale) { if (endptr) *endptr = (char *) nptr; return 0; /* errno is set here */ } r = STRTOD_L (nptr, endptr, locale); #else char *saved_locale = setlocale (LC_NUMERIC, NULL); if (saved_locale) { saved_locale = strdup (saved_locale); if (saved_locale == NULL) { if (endptr) *endptr = (char *) nptr; return 0; /* errno is set here */ } setlocale (LC_NUMERIC, "C"); } r = STRTOD (nptr, endptr); if (saved_locale) { int saved_errno = errno; setlocale (LC_NUMERIC, saved_locale); free (saved_locale); errno = saved_errno; } #endif return r; } pspp-1.0.1/gl/time_r.c0000644000175000017500000000227313124536243011450 00000000000000/* Reentrant time functions like localtime_r. Copyright (C) 2003, 2006-2007, 2010-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Paul Eggert. */ #include #include static struct tm * copy_tm_result (struct tm *dest, struct tm const *src) { if (! src) return 0; *dest = *src; return dest; } struct tm * gmtime_r (time_t const * restrict t, struct tm * restrict tp) { return copy_tm_result (tp, gmtime (t)); } struct tm * localtime_r (time_t const * restrict t, struct tm * restrict tp) { return copy_tm_result (tp, localtime (t)); } pspp-1.0.1/gl/errno.in.h0000644000175000017500000001646313124536241011734 00000000000000/* A POSIX-like . Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _@GUARD_PREFIX@_ERRNO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_ERRNO_H@ #ifndef _@GUARD_PREFIX@_ERRNO_H #define _@GUARD_PREFIX@_ERRNO_H /* On native Windows platforms, many macros are not defined. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* These are the same values as defined by MSVC 10, for interoperability. */ # ifndef ENOMSG # define ENOMSG 122 # define GNULIB_defined_ENOMSG 1 # endif # ifndef EIDRM # define EIDRM 111 # define GNULIB_defined_EIDRM 1 # endif # ifndef ENOLINK # define ENOLINK 121 # define GNULIB_defined_ENOLINK 1 # endif # ifndef EPROTO # define EPROTO 134 # define GNULIB_defined_EPROTO 1 # endif # ifndef EBADMSG # define EBADMSG 104 # define GNULIB_defined_EBADMSG 1 # endif # ifndef EOVERFLOW # define EOVERFLOW 132 # define GNULIB_defined_EOVERFLOW 1 # endif # ifndef ENOTSUP # define ENOTSUP 129 # define GNULIB_defined_ENOTSUP 1 # endif # ifndef ENETRESET # define ENETRESET 117 # define GNULIB_defined_ENETRESET 1 # endif # ifndef ECONNABORTED # define ECONNABORTED 106 # define GNULIB_defined_ECONNABORTED 1 # endif # ifndef ECANCELED # define ECANCELED 105 # define GNULIB_defined_ECANCELED 1 # endif # ifndef EOWNERDEAD # define EOWNERDEAD 133 # define GNULIB_defined_EOWNERDEAD 1 # endif # ifndef ENOTRECOVERABLE # define ENOTRECOVERABLE 127 # define GNULIB_defined_ENOTRECOVERABLE 1 # endif # ifndef EINPROGRESS # define EINPROGRESS 112 # define EALREADY 103 # define ENOTSOCK 128 # define EDESTADDRREQ 109 # define EMSGSIZE 115 # define EPROTOTYPE 136 # define ENOPROTOOPT 123 # define EPROTONOSUPPORT 135 # define EOPNOTSUPP 130 # define EAFNOSUPPORT 102 # define EADDRINUSE 100 # define EADDRNOTAVAIL 101 # define ENETDOWN 116 # define ENETUNREACH 118 # define ECONNRESET 108 # define ENOBUFS 119 # define EISCONN 113 # define ENOTCONN 126 # define ETIMEDOUT 138 # define ECONNREFUSED 107 # define ELOOP 114 # define EHOSTUNREACH 110 # define EWOULDBLOCK 140 # define GNULIB_defined_ESOCK 1 # endif # ifndef ETXTBSY # define ETXTBSY 139 # define ENODATA 120 /* not required by POSIX */ # define ENOSR 124 /* not required by POSIX */ # define ENOSTR 125 /* not required by POSIX */ # define ETIME 137 /* not required by POSIX */ # define EOTHER 131 /* not required by POSIX */ # define GNULIB_defined_ESTREAMS 1 # endif /* These are intentionally the same values as the WSA* error numbers, defined in . */ # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ # define EPFNOSUPPORT 10046 /* not required by POSIX */ # define ESHUTDOWN 10058 /* not required by POSIX */ # define ETOOMANYREFS 10059 /* not required by POSIX */ # define EHOSTDOWN 10064 /* not required by POSIX */ # define EPROCLIM 10067 /* not required by POSIX */ # define EUSERS 10068 /* not required by POSIX */ # define EDQUOT 10069 # define ESTALE 10070 # define EREMOTE 10071 /* not required by POSIX */ # define GNULIB_defined_EWINSOCK 1 # endif /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ # if @EMULTIHOP_HIDDEN@ # define EMULTIHOP @EMULTIHOP_VALUE@ # define GNULIB_defined_EMULTIHOP 1 # endif # if @ENOLINK_HIDDEN@ # define ENOLINK @ENOLINK_VALUE@ # define GNULIB_defined_ENOLINK 1 # endif # if @EOVERFLOW_HIDDEN@ # define EOVERFLOW @EOVERFLOW_VALUE@ # define GNULIB_defined_EOVERFLOW 1 # endif /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. Likewise, on NonStop Kernel, EDQUOT is not defined. Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. Note: When one of these systems defines some of these macros some day, binaries will have to be recompiled so that they recognizes the new errno values from the system. */ # ifndef ENOMSG # define ENOMSG 2000 # define GNULIB_defined_ENOMSG 1 # endif # ifndef EIDRM # define EIDRM 2001 # define GNULIB_defined_EIDRM 1 # endif # ifndef ENOLINK # define ENOLINK 2002 # define GNULIB_defined_ENOLINK 1 # endif # ifndef EPROTO # define EPROTO 2003 # define GNULIB_defined_EPROTO 1 # endif # ifndef EMULTIHOP # define EMULTIHOP 2004 # define GNULIB_defined_EMULTIHOP 1 # endif # ifndef EBADMSG # define EBADMSG 2005 # define GNULIB_defined_EBADMSG 1 # endif # ifndef EOVERFLOW # define EOVERFLOW 2006 # define GNULIB_defined_EOVERFLOW 1 # endif # ifndef ENOTSUP # define ENOTSUP 2007 # define GNULIB_defined_ENOTSUP 1 # endif # ifndef ENETRESET # define ENETRESET 2011 # define GNULIB_defined_ENETRESET 1 # endif # ifndef ECONNABORTED # define ECONNABORTED 2012 # define GNULIB_defined_ECONNABORTED 1 # endif # ifndef ESTALE # define ESTALE 2009 # define GNULIB_defined_ESTALE 1 # endif # ifndef EDQUOT # define EDQUOT 2010 # define GNULIB_defined_EDQUOT 1 # endif # ifndef ECANCELED # define ECANCELED 2008 # define GNULIB_defined_ECANCELED 1 # endif /* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not defined. */ # ifndef EOWNERDEAD # if defined __sun /* Use the same values as defined for Solaris >= 8, for interoperability. */ # define EOWNERDEAD 58 # define ENOTRECOVERABLE 59 # elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* We have a conflict here: pthreads-win32 defines these values differently than MSVC 10. It's hairy to decide which one to use. */ # if defined __MINGW32__ && !defined USE_WINDOWS_THREADS /* Use the same values as defined by pthreads-win32, for interoperability. */ # define EOWNERDEAD 43 # define ENOTRECOVERABLE 44 # else /* Use the same values as defined by MSVC 10, for interoperability. */ # define EOWNERDEAD 133 # define ENOTRECOVERABLE 127 # endif # else # define EOWNERDEAD 2013 # define ENOTRECOVERABLE 2014 # endif # define GNULIB_defined_EOWNERDEAD 1 # define GNULIB_defined_ENOTRECOVERABLE 1 # endif # ifndef EILSEQ # define EILSEQ 2015 # define GNULIB_defined_EILSEQ 1 # endif #endif /* _@GUARD_PREFIX@_ERRNO_H */ #endif /* _@GUARD_PREFIX@_ERRNO_H */ pspp-1.0.1/gl/getprogname.c0000644000175000017500000001335313124536241012500 00000000000000/* Program name management. Copyright (C) 2016-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include "getprogname.h" #include /* get program_invocation_name declaration */ #include /* get __argv declaration */ #ifdef _AIX # include # include # include #endif #ifdef __MVS__ # ifndef _OPEN_SYS # define _OPEN_SYS # endif # include # include #endif #ifdef __hpux # include # include # include # include #endif #ifdef __sgi # include # include # include # include # include #endif #include "dirname.h" #ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */ char const * getprogname (void) { # if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* glibc, BeOS */ /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */ return program_invocation_short_name; # elif HAVE_DECL_PROGRAM_INVOCATION_NAME /* glibc, BeOS */ /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */ return last_component (program_invocation_name); # elif HAVE_GETEXECNAME /* Solaris */ /* http://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */ const char *p = getexecname (); if (!p) p = "?"; return last_component (p); # elif HAVE_DECL___ARGV /* mingw, MSVC */ /* https://msdn.microsoft.com/en-us/library/dn727674.aspx */ const char *p = __argv && __argv[0] ? __argv[0] : "?"; return last_component (p); # elif HAVE_VAR___PROGNAME /* OpenBSD, QNX */ /* http://man.openbsd.org/style.9 */ /* http://www.qnx.de/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.neutrino_lib_ref%2Fp%2F__progname.html */ /* Be careful to declare this only when we absolutely need it (OpenBSD 5.1), rather than when it's available. Otherwise, its mere declaration makes program_invocation_short_name malfunction (have zero length) with Fedora 25's glibc. */ extern char *__progname; const char *p = __progname; return p && p[0] ? p : "?"; # elif _AIX /* AIX */ /* Idea by Bastien ROUCARIÈS, http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00095.html Reference: http:// ibm.biz/knowctr#ssw_aix_53/com.ibm.aix.basetechref/doc/basetrf1/getprocs.htm */ static char *p; static int first = 1; if (first) { first = 0; pid_t pid = getpid (); struct procentry64 procs; p = (0 < getprocs64 (&procs, sizeof procs, NULL, 0, &pid, 1) ? strdup (procs.pi_comm) : NULL); if (!p) p = "?"; } return p; # elif defined __hpux static char *p; static int first = 1; if (first) { first = 0; pid_t pid = getpid (); struct pst_status status; p = (0 < pstat_getproc (&status, sizeof status, 0, pid) ? strdup (status.pst_ucomm) : NULL); if (!p) p = "?"; } return p; # elif __MVS__ /* z/OS */ /* https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/rtwgetp.htm */ static char *p = "?"; static int first = 1; if (first) { pid_t pid = getpid (); int token; W_PSPROC buf; first = 0; memset (&buf, 0, sizeof(buf)); buf.ps_cmdptr = (char *) malloc (buf.ps_cmdlen = PS_CMDBLEN_LONG); buf.ps_conttyptr = (char *) malloc (buf.ps_conttylen = PS_CONTTYBLEN); buf.ps_pathptr = (char *) malloc (buf.ps_pathlen = PS_PATHBLEN); if (buf.ps_cmdptr && buf.ps_conttyptr && buf.ps_pathptr) { for (token = 0; token >= 0; token = w_getpsent (token, &buf, sizeof(buf))) { if (token > 0 && buf.ps_pid == pid) { char *s = strdup (last_component (buf.ps_pathptr)); if (s) p = s; break; } } } free (buf.ps_cmdptr); free (buf.ps_conttyptr); free (buf.ps_pathptr); } return p; # elif defined __sgi /* IRIX */ char filename[50]; int fd; sprintf (filename, "/proc/pinfo/%d", (int) getpid ()); fd = open (filename, O_RDONLY); if (0 <= fd) { prpsinfo_t buf; int ioctl_ok = 0 <= ioctl (fd, PIOCPSINFO, &buf); close (fd); if (ioctl_ok) { char *name = buf.pr_fname; char *namesize = sizeof buf.pr_fname; char *namenul = memchr (name, '\0', namesize); size_t namelen = namenul ? namenul - name : namesize; char *namecopy = malloc (namelen + 1); if (namecopy) { namecopy[namelen] = 0; return memcpy (namecopy, name, namelen); } } } return NULL; # else # error "getprogname module not ported to this OS" # endif } #endif pspp-1.0.1/gl/xvasprintf.h0000644000175000017500000000407413124536243012403 00000000000000/* vasprintf and asprintf with out-of-memory checking. Copyright (C) 2002-2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _XVASPRINTF_H #define _XVASPRINTF_H /* Get va_list. */ #include /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(), and return it. Upon [ENOMEM] memory allocation error, call xalloc_die. On some other error - [EOVERFLOW] resulting string length is > INT_MAX, - [EINVAL] invalid format string, - [EILSEQ] error during conversion between wide and multibyte characters, return NULL. */ extern char *xasprintf (const char *format, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 1, 2)); extern char *xvasprintf (const char *format, va_list args) _GL_ATTRIBUTE_FORMAT ((__printf__, 1, 0)); #ifdef __cplusplus } #endif #endif /* _XVASPRINTF_H */ pspp-1.0.1/gl/printf-args.c0000644000175000017500000001463213124536242012426 00000000000000/* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be defined. STATIC Set to 'static' to declare the function static. */ #ifndef PRINTF_FETCHARGS # include #endif /* Specification. */ #ifndef PRINTF_FETCHARGS # include "printf-args.h" #endif #ifdef STATIC STATIC #endif int PRINTF_FETCHARGS (va_list args, arguments *a) { size_t i; argument *ap; for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) switch (ap->type) { case TYPE_SCHAR: ap->a.a_schar = va_arg (args, /*signed char*/ int); break; case TYPE_UCHAR: ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); break; case TYPE_SHORT: ap->a.a_short = va_arg (args, /*short*/ int); break; case TYPE_USHORT: ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); break; case TYPE_INT: ap->a.a_int = va_arg (args, int); break; case TYPE_UINT: ap->a.a_uint = va_arg (args, unsigned int); break; case TYPE_LONGINT: ap->a.a_longint = va_arg (args, long int); break; case TYPE_ULONGINT: ap->a.a_ulongint = va_arg (args, unsigned long int); break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: ap->a.a_longlongint = va_arg (args, long long int); break; case TYPE_ULONGLONGINT: ap->a.a_ulonglongint = va_arg (args, unsigned long long int); break; #endif case TYPE_DOUBLE: ap->a.a_double = va_arg (args, double); break; case TYPE_LONGDOUBLE: ap->a.a_longdouble = va_arg (args, long double); break; case TYPE_CHAR: ap->a.a_char = va_arg (args, int); break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by default argument promotions", this is not the case in mingw32, where wint_t is 'unsigned short'. */ ap->a.a_wide_char = (sizeof (wint_t) < sizeof (int) ? (wint_t) va_arg (args, int) : va_arg (args, wint_t)); break; #endif case TYPE_STRING: ap->a.a_string = va_arg (args, const char *); /* A null pointer is an invalid argument for "%s", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_string == NULL) ap->a.a_string = "(NULL)"; break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: ap->a.a_wide_string = va_arg (args, const wchar_t *); /* A null pointer is an invalid argument for "%ls", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_wide_string == NULL) { static const wchar_t wide_null_string[] = { (wchar_t)'(', (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', (wchar_t)')', (wchar_t)0 }; ap->a.a_wide_string = wide_null_string; } break; #endif case TYPE_POINTER: ap->a.a_pointer = va_arg (args, void *); break; case TYPE_COUNT_SCHAR_POINTER: ap->a.a_count_schar_pointer = va_arg (args, signed char *); break; case TYPE_COUNT_SHORT_POINTER: ap->a.a_count_short_pointer = va_arg (args, short *); break; case TYPE_COUNT_INT_POINTER: ap->a.a_count_int_pointer = va_arg (args, int *); break; case TYPE_COUNT_LONGINT_POINTER: ap->a.a_count_longint_pointer = va_arg (args, long int *); break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); break; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ case TYPE_U8_STRING: ap->a.a_u8_string = va_arg (args, const uint8_t *); /* A null pointer is an invalid argument for "%U", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u8_string == NULL) { static const uint8_t u8_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u8_string = u8_null_string; } break; case TYPE_U16_STRING: ap->a.a_u16_string = va_arg (args, const uint16_t *); /* A null pointer is an invalid argument for "%lU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u16_string == NULL) { static const uint16_t u16_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u16_string = u16_null_string; } break; case TYPE_U32_STRING: ap->a.a_u32_string = va_arg (args, const uint32_t *); /* A null pointer is an invalid argument for "%llU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u32_string == NULL) { static const uint32_t u32_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u32_string = u32_null_string; } break; #endif default: /* Unknown type. */ return -1; } return 0; } pspp-1.0.1/gl/isnanf.c0000644000175000017500000000151713124536242011446 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible , 2007. */ #define USE_FLOAT #include "isnan.c" pspp-1.0.1/gl/strncat.c0000644000175000017500000000210013124536243011634 00000000000000/* Concatenate strings. Copyright (C) 1999, 2002, 2006, 2010-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include char * strncat (char *dest, const char *src, size_t n) { char *destptr = dest + strlen (dest); for (; n > 0 && (*destptr = *src) != '\0'; src++, destptr++, n--) ; if (n == 0) *destptr = '\0'; return dest; } pspp-1.0.1/gl/stdint.in.h0000644000175000017500000005421613124536243012114 00000000000000/* Copyright (C) 2001-2002, 2004-2017 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. 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, 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 . */ /* * ISO C 99 for platforms that lack it. * */ #ifndef _@GUARD_PREFIX@_STDINT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* When including a system file that in turn includes , use the system , not our substitute. This avoids problems with (for example) VMS, whose includes . */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* On Android (Bionic libc), includes this file before having defined 'time_t'. Therefore in this case avoid including other system header files; just include the system's . Ideally we should test __BIONIC__ here, but it is only defined after has been included; hence test __ANDROID__ instead. */ #if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H # @INCLUDE_NEXT@ @NEXT_STDINT_H@ #else /* Get those types that are already defined in other system include files, so that we can "#define int8_t signed char" below without worrying about a later system include file containing a "typedef signed char int8_t;" that will get messed up by our macro. Our macros should all be consistent with the system versions, except for the "fast" types and macros, which we recommend against using in public interfaces due to compiler differences. */ #if @HAVE_STDINT_H@ # if defined __sgi && ! defined __c99 /* Bypass IRIX's if in C89 mode, since it merely annoys users with "This header file is to be used only for c99 mode compilations" diagnostics. */ # define __STDINT_H__ # endif /* Some pre-C++11 implementations need this. */ # ifdef __cplusplus # ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS 1 # endif # ifndef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS 1 # endif # endif /* Other systems may have an incomplete or buggy . Include it before , since any "#include " in would reinclude us, skipping our contents because _@GUARD_PREFIX@_STDINT_H is defined. The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDINT_H@ #endif #if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H #define _@GUARD_PREFIX@_STDINT_H /* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ #include /* Override WINT_MIN and WINT_MAX if gnulib's or overrides wint_t. */ #if @GNULIB_OVERRIDES_WINT_T@ # undef WINT_MIN # undef WINT_MAX # define WINT_MIN 0x0U # define WINT_MAX 0xffffffffU #endif #if ! @HAVE_C99_STDINT_H@ /* defines some of the stdint.h types as well, on glibc, IRIX 6.5, and OpenBSD 3.8 (via ). AIX 5.2 isn't needed and causes troubles. Mac OS X 10.4.6 includes (which is us), but relies on the system definitions, so include after @NEXT_STDINT_H@. */ # if @HAVE_SYS_TYPES_H@ && ! defined _AIX # include # endif # if @HAVE_INTTYPES_H@ /* In OpenBSD 3.8, includes , which defines int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. also defines intptr_t and uintptr_t. */ # include # elif @HAVE_SYS_INTTYPES_H@ /* Solaris 7 has the types except the *_fast*_t types, and the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ # include # endif # if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ /* Linux libc4 >= 4.6.7 and libc5 have a that defines int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is included by . */ # include # endif # undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Minimum and maximum values for an integer type under the usual assumption. Return an unspecified value if BITS == 0, adding a check to pacify picky compilers. */ /* These are separate macros, because if you try to merge these macros into a single one, HP-UX cc rejects the resulting expression in constant expressions. */ # define _STDINT_UNSIGNED_MIN(bits, zero) \ (zero) # define _STDINT_SIGNED_MIN(bits, zero) \ (~ _STDINT_MAX (1, bits, zero)) # define _STDINT_MAX(signed, bits, zero) \ (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) #if !GNULIB_defined_stdint_types /* 7.18.1.1. Exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ # undef int8_t # undef uint8_t typedef signed char gl_int8_t; typedef unsigned char gl_uint8_t; # define int8_t gl_int8_t # define uint8_t gl_uint8_t # undef int16_t # undef uint16_t typedef short int gl_int16_t; typedef unsigned short int gl_uint16_t; # define int16_t gl_int16_t # define uint16_t gl_uint16_t # undef int32_t # undef uint32_t typedef int gl_int32_t; typedef unsigned int gl_uint32_t; # define int32_t gl_int32_t # define uint32_t gl_uint32_t /* If the system defines INT64_MAX, assume int64_t works. That way, if the underlying platform defines int64_t to be a 64-bit long long int, the code below won't mistakenly define it to be a 64-bit long int, which would mess up C++ name mangling. We must use #ifdef rather than #if, to avoid an error with HP-UX 10.20 cc. */ # ifdef INT64_MAX # define GL_INT64_T # else /* Do not undefine int64_t if gnulib is not being used with 64-bit types, since otherwise it breaks platforms like Tandem/NSK. */ # if LONG_MAX >> 31 >> 31 == 1 # undef int64_t typedef long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # elif defined _MSC_VER # undef int64_t typedef __int64 gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # elif @HAVE_LONG_LONG_INT@ # undef int64_t typedef long long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # endif # endif # ifdef UINT64_MAX # define GL_UINT64_T # else # if ULONG_MAX >> 31 >> 31 >> 1 == 1 # undef uint64_t typedef unsigned long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # elif defined _MSC_VER # undef uint64_t typedef unsigned __int64 gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # elif @HAVE_UNSIGNED_LONG_LONG_INT@ # undef uint64_t typedef unsigned long long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # endif # endif /* Avoid collision with Solaris 2.5.1 etc. */ # define _UINT8_T # define _UINT32_T # define _UINT64_T /* 7.18.1.2. Minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ # undef int_least8_t # undef uint_least8_t # undef int_least16_t # undef uint_least16_t # undef int_least32_t # undef uint_least32_t # undef int_least64_t # undef uint_least64_t # define int_least8_t int8_t # define uint_least8_t uint8_t # define int_least16_t int16_t # define uint_least16_t uint16_t # define int_least32_t int32_t # define uint_least32_t uint32_t # ifdef GL_INT64_T # define int_least64_t int64_t # endif # ifdef GL_UINT64_T # define uint_least64_t uint64_t # endif /* 7.18.1.3. Fastest minimum-width integer types */ /* Note: Other substitutes may define these types differently. It is not recommended to use these types in public header files. */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. The following code normally uses types consistent with glibc, as that lessens the chance of incompatibility with older GNU hosts. */ # undef int_fast8_t # undef uint_fast8_t # undef int_fast16_t # undef uint_fast16_t # undef int_fast32_t # undef uint_fast32_t # undef int_fast64_t # undef uint_fast64_t typedef signed char gl_int_fast8_t; typedef unsigned char gl_uint_fast8_t; # ifdef __sun /* Define types compatible with SunOS 5.10, so that code compiled under earlier SunOS versions works with code compiled under SunOS 5.10. */ typedef int gl_int_fast32_t; typedef unsigned int gl_uint_fast32_t; # else typedef long int gl_int_fast32_t; typedef unsigned long int gl_uint_fast32_t; # endif typedef gl_int_fast32_t gl_int_fast16_t; typedef gl_uint_fast32_t gl_uint_fast16_t; # define int_fast8_t gl_int_fast8_t # define uint_fast8_t gl_uint_fast8_t # define int_fast16_t gl_int_fast16_t # define uint_fast16_t gl_uint_fast16_t # define int_fast32_t gl_int_fast32_t # define uint_fast32_t gl_uint_fast32_t # ifdef GL_INT64_T # define int_fast64_t int64_t # endif # ifdef GL_UINT64_T # define uint_fast64_t uint64_t # endif /* 7.18.1.4. Integer types capable of holding object pointers */ /* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own definitions of intptr_t and uintptr_t (which use int and unsigned) to avoid clashes with declarations of system functions like sbrk. */ # ifndef _INTPTR_T_DECLARED # undef intptr_t # undef uintptr_t typedef long int gl_intptr_t; typedef unsigned long int gl_uintptr_t; # define intptr_t gl_intptr_t # define uintptr_t gl_uintptr_t # endif /* 7.18.1.5. Greatest-width integer types */ /* Note: These types are compiler dependent. It may be unwise to use them in public header files. */ /* If the system defines INTMAX_MAX, assume that intmax_t works, and similarly for UINTMAX_MAX and uintmax_t. This avoids problems with assuming one type where another is used by the system. */ # ifndef INTMAX_MAX # undef INTMAX_C # undef intmax_t # if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 typedef long long int gl_intmax_t; # define intmax_t gl_intmax_t # elif defined GL_INT64_T # define intmax_t int64_t # else typedef long int gl_intmax_t; # define intmax_t gl_intmax_t # endif # endif # ifndef UINTMAX_MAX # undef UINTMAX_C # undef uintmax_t # if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 typedef unsigned long long int gl_uintmax_t; # define uintmax_t gl_uintmax_t # elif defined GL_UINT64_T # define uintmax_t uint64_t # else typedef unsigned long int gl_uintmax_t; # define uintmax_t gl_uintmax_t # endif # endif /* Verify that intmax_t and uintmax_t have the same size. Too much code breaks if this is not the case. If this check fails, the reason is likely to be found in the autoconf macros. */ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) ? 1 : -1]; # define GNULIB_defined_stdint_types 1 # endif /* !GNULIB_defined_stdint_types */ /* 7.18.2. Limits of specified-width integer types */ /* 7.18.2.1. Limits of exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ # undef INT8_MIN # undef INT8_MAX # undef UINT8_MAX # define INT8_MIN (~ INT8_MAX) # define INT8_MAX 127 # define UINT8_MAX 255 # undef INT16_MIN # undef INT16_MAX # undef UINT16_MAX # define INT16_MIN (~ INT16_MAX) # define INT16_MAX 32767 # define UINT16_MAX 65535 # undef INT32_MIN # undef INT32_MAX # undef UINT32_MAX # define INT32_MIN (~ INT32_MAX) # define INT32_MAX 2147483647 # define UINT32_MAX 4294967295U # if defined GL_INT64_T && ! defined INT64_MAX /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 evaluates the latter incorrectly in preprocessor expressions. */ # define INT64_MIN (- INTMAX_C (1) << 63) # define INT64_MAX INTMAX_C (9223372036854775807) # endif # if defined GL_UINT64_T && ! defined UINT64_MAX # define UINT64_MAX UINTMAX_C (18446744073709551615) # endif /* 7.18.2.2. Limits of minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ # undef INT_LEAST8_MIN # undef INT_LEAST8_MAX # undef UINT_LEAST8_MAX # define INT_LEAST8_MIN INT8_MIN # define INT_LEAST8_MAX INT8_MAX # define UINT_LEAST8_MAX UINT8_MAX # undef INT_LEAST16_MIN # undef INT_LEAST16_MAX # undef UINT_LEAST16_MAX # define INT_LEAST16_MIN INT16_MIN # define INT_LEAST16_MAX INT16_MAX # define UINT_LEAST16_MAX UINT16_MAX # undef INT_LEAST32_MIN # undef INT_LEAST32_MAX # undef UINT_LEAST32_MAX # define INT_LEAST32_MIN INT32_MIN # define INT_LEAST32_MAX INT32_MAX # define UINT_LEAST32_MAX UINT32_MAX # undef INT_LEAST64_MIN # undef INT_LEAST64_MAX # ifdef GL_INT64_T # define INT_LEAST64_MIN INT64_MIN # define INT_LEAST64_MAX INT64_MAX # endif # undef UINT_LEAST64_MAX # ifdef GL_UINT64_T # define UINT_LEAST64_MAX UINT64_MAX # endif /* 7.18.2.3. Limits of fastest minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. */ # undef INT_FAST8_MIN # undef INT_FAST8_MAX # undef UINT_FAST8_MAX # define INT_FAST8_MIN SCHAR_MIN # define INT_FAST8_MAX SCHAR_MAX # define UINT_FAST8_MAX UCHAR_MAX # undef INT_FAST16_MIN # undef INT_FAST16_MAX # undef UINT_FAST16_MAX # define INT_FAST16_MIN INT_FAST32_MIN # define INT_FAST16_MAX INT_FAST32_MAX # define UINT_FAST16_MAX UINT_FAST32_MAX # undef INT_FAST32_MIN # undef INT_FAST32_MAX # undef UINT_FAST32_MAX # ifdef __sun # define INT_FAST32_MIN INT_MIN # define INT_FAST32_MAX INT_MAX # define UINT_FAST32_MAX UINT_MAX # else # define INT_FAST32_MIN LONG_MIN # define INT_FAST32_MAX LONG_MAX # define UINT_FAST32_MAX ULONG_MAX # endif # undef INT_FAST64_MIN # undef INT_FAST64_MAX # ifdef GL_INT64_T # define INT_FAST64_MIN INT64_MIN # define INT_FAST64_MAX INT64_MAX # endif # undef UINT_FAST64_MAX # ifdef GL_UINT64_T # define UINT_FAST64_MAX UINT64_MAX # endif /* 7.18.2.4. Limits of integer types capable of holding object pointers */ # undef INTPTR_MIN # undef INTPTR_MAX # undef UINTPTR_MAX # define INTPTR_MIN LONG_MIN # define INTPTR_MAX LONG_MAX # define UINTPTR_MAX ULONG_MAX /* 7.18.2.5. Limits of greatest-width integer types */ # ifndef INTMAX_MAX # undef INTMAX_MIN # ifdef INT64_MAX # define INTMAX_MIN INT64_MIN # define INTMAX_MAX INT64_MAX # else # define INTMAX_MIN INT32_MIN # define INTMAX_MAX INT32_MAX # endif # endif # ifndef UINTMAX_MAX # ifdef UINT64_MAX # define UINTMAX_MAX UINT64_MAX # else # define UINTMAX_MAX UINT32_MAX # endif # endif /* 7.18.3. Limits of other integer types */ /* ptrdiff_t limits */ # undef PTRDIFF_MIN # undef PTRDIFF_MAX # if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) # else # define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) # endif # else # define PTRDIFF_MIN \ _STDINT_SIGNED_MIN (@BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX \ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # endif /* sig_atomic_t limits */ # undef SIG_ATOMIC_MIN # undef SIG_ATOMIC_MAX # if @HAVE_SIGNED_SIG_ATOMIC_T@ # define SIG_ATOMIC_MIN \ _STDINT_SIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) # else # define SIG_ATOMIC_MIN \ _STDINT_UNSIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) # endif # define SIG_ATOMIC_MAX \ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) /* size_t limit */ # undef SIZE_MAX # if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define SIZE_MAX _STDINT_MAX (0, 64, 0ul) # else # define SIZE_MAX _STDINT_MAX (0, 32, 0ul) # endif # else # define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) # endif /* wchar_t limits */ /* Get WCHAR_MIN, WCHAR_MAX. This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested includes -> -> -> , and the latter includes and assumes its types are already defined. */ # if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) /* BSD/OS 4.0.1 has a bug: , and must be included before . */ # include # include # include # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # endif # undef WCHAR_MIN # undef WCHAR_MAX # if @HAVE_SIGNED_WCHAR_T@ # define WCHAR_MIN \ _STDINT_SIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) # else # define WCHAR_MIN \ _STDINT_UNSIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) # endif # define WCHAR_MAX \ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ # undef WINT_MIN # undef WINT_MAX # if @HAVE_SIGNED_WINT_T@ # define WINT_MIN \ _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) # else # define WINT_MIN \ _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) # endif # define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) /* 7.18.4. Macros for integer constants */ /* 7.18.4.1. Macros for minimum-width integer constants */ /* According to ISO C 99 Technical Corrigendum 1 */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ # undef INT8_C # undef UINT8_C # define INT8_C(x) x # define UINT8_C(x) x # undef INT16_C # undef UINT16_C # define INT16_C(x) x # define UINT16_C(x) x # undef INT32_C # undef UINT32_C # define INT32_C(x) x # define UINT32_C(x) x ## U # undef INT64_C # undef UINT64_C # if LONG_MAX >> 31 >> 31 == 1 # define INT64_C(x) x##L # elif defined _MSC_VER # define INT64_C(x) x##i64 # elif @HAVE_LONG_LONG_INT@ # define INT64_C(x) x##LL # endif # if ULONG_MAX >> 31 >> 31 >> 1 == 1 # define UINT64_C(x) x##UL # elif defined _MSC_VER # define UINT64_C(x) x##ui64 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ # define UINT64_C(x) x##ULL # endif /* 7.18.4.2. Macros for greatest-width integer constants */ # ifndef INTMAX_C # if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define INTMAX_C(x) x##LL # elif defined GL_INT64_T # define INTMAX_C(x) INT64_C(x) # else # define INTMAX_C(x) x##L # endif # endif # ifndef UINTMAX_C # if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define UINTMAX_C(x) x##ULL # elif defined GL_UINT64_T # define UINTMAX_C(x) UINT64_C(x) # else # define UINTMAX_C(x) x##UL # endif # endif #endif /* !@HAVE_C99_STDINT_H@ */ /* Macros specified by ISO/IEC TS 18661-1:2014. */ #if (!defined UINTMAX_WIDTH \ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) # ifdef INT8_MAX # define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) # endif # ifdef UINT8_MAX # define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) # endif # ifdef INT16_MAX # define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) # endif # ifdef UINT16_MAX # define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) # endif # ifdef INT32_MAX # define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) # endif # ifdef UINT32_MAX # define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) # endif # ifdef INT64_MAX # define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) # endif # ifdef UINT64_MAX # define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) # endif # define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) # define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) # define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) # define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) # define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) # define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) # define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) # define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) # define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) # define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) # define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) # define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) # define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) # define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) # define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) # define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) # define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) # define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) # define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) # define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) # define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) # define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) # define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) # ifdef WINT_MAX # define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) # endif # ifdef SIG_ATOMIC_MAX # define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) # endif #endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ #endif /* _@GUARD_PREFIX@_STDINT_H */ #endif /* !(defined __ANDROID__ && ...) */ #endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ pspp-1.0.1/gl/memchr2.valgrind0000644000175000017500000000063313020461274013104 00000000000000# Suppress a valgrind message about use of uninitialized memory in memchr2(). # Like memchr, it is safe to overestimate the length when the terminator # is guaranteed to be found. In this case, we may end up reading a word # that is partially uninitialized, but this use is OK for a speedup. { memchr2-value4 Memcheck:Value4 fun:memchr2 } { memchr2-value8 Memcheck:Value8 fun:memchr2 } pspp-1.0.1/gl/write.c0000644000175000017500000001216613124536243011325 00000000000000/* POSIX compatible write() function. Copyright (C) 2008-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 . */ #include /* Specification. */ #include /* On native Windows platforms, SIGPIPE does not exist. When write() is called on a pipe with no readers, WriteFile() fails with error GetLastError() = ERROR_NO_DATA, and write() in consequence fails with error EINVAL. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # include # include # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # if HAVE_MSVC_INVALID_PARAMETER_HANDLER # include "msvc-inval.h" # endif # if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" # else # include # endif # undef write # if HAVE_MSVC_INVALID_PARAMETER_HANDLER static ssize_t write_nothrow (int fd, const void *buf, size_t count) { ssize_t result; TRY_MSVC_INVAL { result = write (fd, buf, count); } CATCH_MSVC_INVAL { result = -1; errno = EBADF; } DONE_MSVC_INVAL; return result; } # else # define write_nothrow write # endif ssize_t rpl_write (int fd, const void *buf, size_t count) { for (;;) { ssize_t ret = write_nothrow (fd, buf, count); if (ret < 0) { # if GNULIB_NONBLOCKING if (errno == ENOSPC) { HANDLE h = (HANDLE) _get_osfhandle (fd); if (GetFileType (h) == FILE_TYPE_PIPE) { /* h is a pipe or socket. */ DWORD state; if (GetNamedPipeHandleState (h, &state, NULL, NULL, NULL, NULL, 0) && (state & PIPE_NOWAIT) != 0) { /* h is a pipe in non-blocking mode. We can get here in four situations: 1. When the pipe buffer is full. 2. When count <= pipe_buf_size and the number of free bytes in the pipe buffer is < count. 3. When count > pipe_buf_size and the number of free bytes in the pipe buffer is > 0, < pipe_buf_size. 4. When count > pipe_buf_size and the pipe buffer is entirely empty. The cases 1 and 2 are POSIX compliant. In cases 3 and 4 POSIX specifies that write() must split the request and succeed with a partial write. We fix case 4. We don't fix case 3 because it is not essential for programs. */ DWORD out_size; /* size of the buffer for outgoing data */ DWORD in_size; /* size of the buffer for incoming data */ if (GetNamedPipeInfo (h, NULL, &out_size, &in_size, NULL)) { size_t reduced_count = count; /* In theory we need only one of out_size, in_size. But I don't know which of the two. The description is ambiguous. */ if (out_size != 0 && out_size < reduced_count) reduced_count = out_size; if (in_size != 0 && in_size < reduced_count) reduced_count = in_size; if (reduced_count < count) { /* Attempt to write only the first part. */ count = reduced_count; continue; } } /* Change errno from ENOSPC to EAGAIN. */ errno = EAGAIN; } } } else # endif { # if GNULIB_SIGPIPE if (GetLastError () == ERROR_NO_DATA && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE) { /* Try to raise signal SIGPIPE. */ raise (SIGPIPE); /* If it is currently blocked or ignored, change errno from EINVAL to EPIPE. */ errno = EPIPE; } # endif } } return ret; } } #endif pspp-1.0.1/gl/localeconv.c0000644000175000017500000000656213124536242012322 00000000000000/* Query locale dependent information for formatting numbers. Copyright (C) 2012-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include #if HAVE_STRUCT_LCONV_DECIMAL_POINT /* Override for platforms where 'struct lconv' lacks the int_p_*, int_n_* members. */ struct lconv * localeconv (void) { static struct lconv result; # undef lconv # undef localeconv struct lconv *sys_result = localeconv (); result.decimal_point = sys_result->decimal_point; result.thousands_sep = sys_result->thousands_sep; result.grouping = sys_result->grouping; result.mon_decimal_point = sys_result->mon_decimal_point; result.mon_thousands_sep = sys_result->mon_thousands_sep; result.mon_grouping = sys_result->mon_grouping; result.positive_sign = sys_result->positive_sign; result.negative_sign = sys_result->negative_sign; result.currency_symbol = sys_result->currency_symbol; result.frac_digits = sys_result->frac_digits; result.p_cs_precedes = sys_result->p_cs_precedes; result.p_sign_posn = sys_result->p_sign_posn; result.p_sep_by_space = sys_result->p_sep_by_space; result.n_cs_precedes = sys_result->n_cs_precedes; result.n_sign_posn = sys_result->n_sign_posn; result.n_sep_by_space = sys_result->n_sep_by_space; result.int_curr_symbol = sys_result->int_curr_symbol; result.int_frac_digits = sys_result->int_frac_digits; result.int_p_cs_precedes = sys_result->p_cs_precedes; result.int_p_sign_posn = sys_result->p_sign_posn; result.int_p_sep_by_space = sys_result->p_sep_by_space; result.int_n_cs_precedes = sys_result->n_cs_precedes; result.int_n_sign_posn = sys_result->n_sign_posn; result.int_n_sep_by_space = sys_result->n_sep_by_space; return &result; } #else /* Override for platforms where 'struct lconv' is a dummy. */ # include struct lconv * localeconv (void) { static /*const*/ struct lconv result = { /* decimal_point */ ".", /* thousands_sep */ "", /* grouping */ "", /* mon_decimal_point */ "", /* mon_thousands_sep */ "", /* mon_grouping */ "", /* positive_sign */ "", /* negative_sign */ "", /* currency_symbol */ "", /* frac_digits */ CHAR_MAX, /* p_cs_precedes */ CHAR_MAX, /* p_sign_posn */ CHAR_MAX, /* p_sep_by_space */ CHAR_MAX, /* n_cs_precedes */ CHAR_MAX, /* n_sign_posn */ CHAR_MAX, /* n_sep_by_space */ CHAR_MAX, /* int_curr_symbol */ "", /* int_frac_digits */ CHAR_MAX, /* int_p_cs_precedes */ CHAR_MAX, /* int_p_sign_posn */ CHAR_MAX, /* int_p_sep_by_space */ CHAR_MAX, /* int_n_cs_precedes */ CHAR_MAX, /* int_n_sign_posn */ CHAR_MAX, /* int_n_sep_by_space */ CHAR_MAX }; return &result; } #endif pspp-1.0.1/gl/hard-locale.h0000644000175000017500000000157113124536242012350 00000000000000/* Determine whether a locale is hard. Copyright (C) 1999, 2003-2004, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef HARD_LOCALE_H_ # define HARD_LOCALE_H_ 1 # include bool hard_locale (int); #endif /* HARD_LOCALE_H_ */ pspp-1.0.1/gl/open.c0000644000175000017500000001375513124536242011140 00000000000000/* Open a descriptor to a file. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible , 2007. */ /* If the user's config.h happens to include , let it include only the system's here, so that orig_open doesn't recurse to rpl_open. */ #define __need_system_fcntl_h #include /* Get the original definition of open. It might be defined as a macro. */ #include #include #undef __need_system_fcntl_h static int orig_open (const char *filename, int flags, mode_t mode) { return open (filename, flags, mode); } /* Specification. */ /* Write "fcntl.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include above. */ #include "fcntl.h" #include #include #include #include #include #include #ifndef REPLACE_OPEN_DIRECTORY # define REPLACE_OPEN_DIRECTORY 0 #endif int open (const char *filename, int flags, ...) { mode_t mode; int fd; mode = 0; if (flags & O_CREAT) { va_list arg; va_start (arg, flags); /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 creates crashing code when 'mode_t' is smaller than 'int'. */ mode = va_arg (arg, PROMOTED_MODE_T); va_end (arg); } #if GNULIB_defined_O_NONBLOCK /* The only known platform that lacks O_NONBLOCK is mingw, but it also lacks named pipes and Unix sockets, which are the only two file types that require non-blocking handling in open(). Therefore, it is safe to ignore O_NONBLOCK here. It is handy that mingw also lacks openat(), so that is also covered here. */ flags &= ~O_NONBLOCK; #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ if (strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif #if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR is specified, then fail. Rationale: POSIX says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file already exists as a directory, then - if O_CREAT is specified, open() must fail because of the semantics of O_CREAT, - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX says that it fails with errno = EISDIR in this case. If the named file does not exist or does not name a directory, then - if O_CREAT is specified, open() must fail since open() cannot create directories, - if O_WRONLY or O_RDWR is specified, open() must fail because the file does not contain a '.' directory. */ if (flags & (O_CREAT | O_WRONLY | O_RDWR)) { size_t len = strlen (filename); if (len > 0 && filename[len - 1] == '/') { errno = EISDIR; return -1; } } #endif fd = orig_open (filename, flags, mode); #if REPLACE_FCHDIR /* Implementing fchdir and fdopendir requires the ability to open a directory file descriptor. If open doesn't support that (as on mingw), we use a dummy file that behaves the same as directories on Linux (ie. always reports EOF on attempts to read()), and override fstat() in fchdir.c to hide the fact that we have a dummy. */ if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES && ((flags & O_ACCMODE) == O_RDONLY || (O_SEARCH != O_RDONLY && (flags & O_ACCMODE) == O_SEARCH))) { struct stat statbuf; if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)) { /* Maximum recursion depth of 1. */ fd = open ("/dev/null", flags, mode); if (0 <= fd) fd = _gl_register_fd (fd, filename); } else errno = EACCES; } #endif #if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and fd does not refer to a directory, then fail. Rationale: POSIX says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file without the slash is not a directory, open() must fail with ENOTDIR. */ if (fd >= 0) { /* We know len is positive, since open did not fail with ENOENT. */ size_t len = strlen (filename); if (filename[len - 1] == '/') { struct stat statbuf; if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) { close (fd); errno = ENOTDIR; return -1; } } } #endif #if REPLACE_FCHDIR if (!REPLACE_OPEN_DIRECTORY && 0 <= fd) fd = _gl_register_fd (fd, filename); #endif return fd; } pspp-1.0.1/gl/stat-w32.c0000644000175000017500000003736113124536241011561 00000000000000/* Core of implementation of fstat and stat for native Windows. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible. */ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Ensure that defines FILE_ID_INFO. */ #undef _WIN32_WINNT #define _WIN32_WINNT _WIN32_WINNT_WIN8 #include #include #include #include #include #include #include /* Specification. */ #include "stat-w32.h" #include "pathmax.h" #include "verify.h" #if _GL_WINDOWS_STAT_INODES == 2 /* GetFileInformationByHandleEx was introduced only in Windows Vista. */ typedef DWORD (WINAPI * GetFileInformationByHandleExFuncType) (HANDLE hFile, FILE_INFO_BY_HANDLE_CLASS fiClass, LPVOID lpBuffer, DWORD dwBufferSize); static GetFileInformationByHandleExFuncType GetFileInformationByHandleExFunc = NULL; #endif /* GetFinalPathNameByHandle was introduced only in Windows Vista. */ typedef DWORD (WINAPI * GetFinalPathNameByHandleFuncType) (HANDLE hFile, LPTSTR lpFilePath, DWORD lenFilePath, DWORD dwFlags); static GetFinalPathNameByHandleFuncType GetFinalPathNameByHandleFunc = NULL; static BOOL initialized = FALSE; static void initialize (void) { HMODULE kernel32 = LoadLibrary ("kernel32.dll"); if (kernel32 != NULL) { #if _GL_WINDOWS_STAT_INODES == 2 GetFileInformationByHandleExFunc = (GetFileInformationByHandleExFuncType) GetProcAddress (kernel32, "GetFileInformationByHandleEx"); #endif GetFinalPathNameByHandleFunc = (GetFinalPathNameByHandleFuncType) GetProcAddress (kernel32, "GetFinalPathNameByHandleA"); } initialized = TRUE; } /* Converts a FILETIME to GMT time since 1970-01-01 00:00:00. */ #if _GL_WINDOWS_STAT_TIMESPEC struct timespec _gl_convert_FILETIME_to_timespec (const FILETIME *ft) { struct timespec result; /* FILETIME: */ unsigned long long since_1601 = ((unsigned long long) ft->dwHighDateTime << 32) | (unsigned long long) ft->dwLowDateTime; if (since_1601 == 0) { result.tv_sec = 0; result.tv_nsec = 0; } else { /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 leap years, in total 134774 days. */ unsigned long long since_1970 = since_1601 - (unsigned long long) 134774 * (unsigned long long) 86400 * (unsigned long long) 10000000; result.tv_sec = since_1970 / (unsigned long long) 10000000; result.tv_nsec = (unsigned long) (since_1970 % (unsigned long long) 10000000) * 100; } return result; } #else time_t _gl_convert_FILETIME_to_POSIX (const FILETIME *ft) { /* FILETIME: */ unsigned long long since_1601 = ((unsigned long long) ft->dwHighDateTime << 32) | (unsigned long long) ft->dwLowDateTime; if (since_1601 == 0) return 0; else { /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 leap years, in total 134774 days. */ unsigned long long since_1970 = since_1601 - (unsigned long long) 134774 * (unsigned long long) 86400 * (unsigned long long) 10000000; return since_1970 / (unsigned long long) 10000000; } } #endif /* Fill *BUF with information about the file designated by H. PATH is the file name, if known, otherwise NULL. Return 0 if successful, or -1 with errno set upon failure. */ int _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf) { /* GetFileType */ DWORD type = GetFileType (h); if (type == FILE_TYPE_DISK) { if (!initialized) initialize (); /* st_mode can be determined through GetFileAttributesEx or through GetFileInformationByHandle or through GetFileInformationByHandleEx with argument FileBasicInfo The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ BY_HANDLE_FILE_INFORMATION info; if (! GetFileInformationByHandle (h, &info)) goto failed; /* Test for error conditions before starting to fill *buf. */ if (sizeof (buf->st_size) <= 4 && info.nFileSizeHigh > 0) { errno = EOVERFLOW; return -1; } #if _GL_WINDOWS_STAT_INODES /* st_ino can be determined through GetFileInformationByHandle as 64 bits, or through GetFileInformationByHandleEx with argument FileIdInfo as 128 bits. The latter requires -D_WIN32_WINNT=_WIN32_WINNT_WIN8 or higher. */ /* Experiments show that GetFileInformationByHandleEx does not provide much more information than GetFileInformationByHandle: * The dwVolumeSerialNumber from GetFileInformationByHandle is equal to the low 32 bits of the 64-bit VolumeSerialNumber from GetFileInformationByHandleEx, and is apparently sufficient for identifying the device. * The nFileIndex from GetFileInformationByHandle is equal to the low 64 bits of the 128-bit FileId from GetFileInformationByHandleEx, and the high 64 bits of this 128-bit FileId are zero. * On a FAT file system, GetFileInformationByHandleEx fails with error ERROR_INVALID_PARAMETER, whereas GetFileInformationByHandle succeeds. * On a CIFS/SMB file system, GetFileInformationByHandleEx fails with error ERROR_INVALID_LEVEL, whereas GetFileInformationByHandle succeeds. */ # if _GL_WINDOWS_STAT_INODES == 2 if (GetFileInformationByHandleExFunc != NULL) { FILE_ID_INFO id; if (GetFileInformationByHandleExFunc (h, FileIdInfo, &id, sizeof (id))) { buf->st_dev = id.VolumeSerialNumber; verify (sizeof (ino_t) == sizeof (id.FileId)); memcpy (&buf->st_ino, &id.FileId, sizeof (ino_t)); goto ino_done; } else { switch (GetLastError ()) { case ERROR_INVALID_PARAMETER: /* older Windows version, or FAT */ case ERROR_INVALID_LEVEL: /* CIFS/SMB file system */ goto fallback; default: goto failed; } } } fallback: ; /* Fallback for older Windows versions. */ buf->st_dev = info.dwVolumeSerialNumber; buf->st_ino._gl_ino[0] = ((ULONGLONG) info.nFileIndexHigh << 32) | (ULONGLONG) info.nFileIndexLow; buf->st_ino._gl_ino[1] = 0; ino_done: ; # else /* _GL_WINDOWS_STAT_INODES == 1 */ buf->st_dev = info.dwVolumeSerialNumber; buf->st_ino = ((ULONGLONG) info.nFileIndexHigh << 32) | (ULONGLONG) info.nFileIndexLow; # endif #else /* st_ino is not wide enough for identifying a file on a device. Without st_ino, st_dev is pointless. */ buf->st_dev = 0; buf->st_ino = 0; #endif /* st_mode. */ unsigned int mode = /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) | S_IREAD_UGO | ((info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE_UGO); if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { /* Determine whether the file is executable by looking at the file name suffix. If the file name is already known, use it. Otherwise, for non-empty files, it can be determined through GetFinalPathNameByHandle or through GetFileInformationByHandleEx with argument FileNameInfo Both require -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0) { char fpath[PATH_MAX]; if (path != NULL || (GetFinalPathNameByHandleFunc != NULL && GetFinalPathNameByHandleFunc (h, fpath, sizeof (fpath), VOLUME_NAME_NONE) < sizeof (fpath) && (path = fpath, 1))) { const char *last_dot = NULL; const char *p; for (p = path; *p != '\0'; p++) if (*p == '.') last_dot = p; if (last_dot != NULL) { const char *suffix = last_dot + 1; if (_stricmp (suffix, "exe") == 0 || _stricmp (suffix, "bat") == 0 || _stricmp (suffix, "cmd") == 0 || _stricmp (suffix, "com") == 0) mode |= S_IEXEC_UGO; } } else /* Cannot determine file name. Pretend that it is executable. */ mode |= S_IEXEC_UGO; } } buf->st_mode = mode; /* st_nlink can be determined through GetFileInformationByHandle or through GetFileInformationByHandleEx with argument FileStandardInfo The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ buf->st_nlink = (info.nNumberOfLinks > SHRT_MAX ? SHRT_MAX : info.nNumberOfLinks); /* There's no easy way to map the Windows SID concept to an integer. */ buf->st_uid = 0; buf->st_gid = 0; /* st_rdev is irrelevant for normal files and directories. */ buf->st_rdev = 0; /* st_size can be determined through GetFileSizeEx or through GetFileAttributesEx or through GetFileInformationByHandle or through GetFileInformationByHandleEx with argument FileStandardInfo The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ if (sizeof (buf->st_size) <= 4) /* Range check already done above. */ buf->st_size = info.nFileSizeLow; else buf->st_size = ((long long) info.nFileSizeHigh << 32) | (long long) info.nFileSizeLow; /* st_atime, st_mtime, st_ctime can be determined through GetFileTime or through GetFileAttributesEx or through GetFileInformationByHandle or through GetFileInformationByHandleEx with argument FileBasicInfo The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ #if _GL_WINDOWS_STAT_TIMESPEC buf->st_atim = _gl_convert_FILETIME_to_timespec (&info.ftLastAccessTime); buf->st_mtim = _gl_convert_FILETIME_to_timespec (&info.ftLastWriteTime); buf->st_ctim = _gl_convert_FILETIME_to_timespec (&info.ftCreationTime); #else buf->st_atime = _gl_convert_FILETIME_to_POSIX (&info.ftLastAccessTime); buf->st_mtime = _gl_convert_FILETIME_to_POSIX (&info.ftLastWriteTime); buf->st_ctime = _gl_convert_FILETIME_to_POSIX (&info.ftCreationTime); #endif return 0; } else if (type == FILE_TYPE_CHAR || type == FILE_TYPE_PIPE) { buf->st_dev = 0; #if _GL_WINDOWS_STAT_INODES == 2 buf->st_ino._gl_ino[0] = buf->st_ino._gl_ino[1] = 0; #else buf->st_ino = 0; #endif buf->st_mode = (type == FILE_TYPE_PIPE ? _S_IFIFO : _S_IFCHR); buf->st_nlink = 1; buf->st_uid = 0; buf->st_gid = 0; buf->st_rdev = 0; if (type == FILE_TYPE_PIPE) { /* PeekNamedPipe */ DWORD bytes_available; if (PeekNamedPipe (h, NULL, 0, NULL, &bytes_available, NULL)) buf->st_size = bytes_available; else buf->st_size = 0; } else buf->st_size = 0; #if _GL_WINDOWS_STAT_TIMESPEC buf->st_atim.tv_sec = 0; buf->st_atim.tv_nsec = 0; buf->st_mtim.tv_sec = 0; buf->st_mtim.tv_nsec = 0; buf->st_ctim.tv_sec = 0; buf->st_ctim.tv_nsec = 0; #else buf->st_atime = 0; buf->st_mtime = 0; buf->st_ctime = 0; #endif return 0; } else { errno = ENOENT; return -1; } failed: { DWORD error = GetLastError (); #if 0 fprintf (stderr, "_gl_fstat_by_handle error 0x%x\n", (unsigned int) error); #endif switch (error) { case ERROR_ACCESS_DENIED: case ERROR_SHARING_VIOLATION: errno = EACCES; break; case ERROR_OUTOFMEMORY: errno = ENOMEM; break; case ERROR_WRITE_FAULT: case ERROR_READ_FAULT: case ERROR_GEN_FAILURE: errno = EIO; break; default: errno = EINVAL; break; } return -1; } } #else /* This declaration is solely to ensure that after preprocessing this file is never empty. */ typedef int dummy; #endif pspp-1.0.1/gl/basename.c0000644000175000017500000000334513124536241011743 00000000000000/* basename.c -- return the last element in a file name Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include "dirname.h" #include #include "xalloc.h" #include "xstrndup.h" char * base_name (char const *name) { char const *base = last_component (name); size_t length; /* If there is no last component, then name is a file system root or the empty string. */ if (! *base) return xstrndup (name, base_len (name)); /* Collapse a sequence of trailing slashes into one. */ length = base_len (base); if (ISSLASH (base[length])) length++; /* On systems with drive letters, "a/b:c" must return "./b:c" rather than "b:c" to avoid confusion with a drive letter. On systems with pure POSIX semantics, this is not an issue. */ if (FILE_SYSTEM_PREFIX_LEN (base)) { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } /* Finally, copy the basename. */ return xstrndup (base, length); } pspp-1.0.1/gl/regex_internal.h0000644000175000017500000006175713124536243013220 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 #include #include #include #include #include #include #include #include #include #include #include #include "intprops.h" #ifdef _LIBC # include # define lock_define(name) __libc_lock_define (, name) # define lock_init(lock) (__libc_lock_init (lock), 0) # define lock_fini(lock) 0 # define lock_lock(lock) __libc_lock_lock (lock) # define lock_unlock(lock) __libc_lock_unlock (lock) #elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO # include "glthread/lock.h" /* Use gl_lock_define if empty macro arguments are known to work. Otherwise, fall back on less-portable substitutes. */ # if ((defined __GNUC__ && !defined __STRICT_ANSI__) \ || (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__)) # define lock_define(name) gl_lock_define (, name) # elif USE_POSIX_THREADS # define lock_define(name) pthread_mutex_t name; # elif USE_PTH_THREADS # define lock_define(name) pth_mutex_t name; # elif USE_SOLARIS_THREADS # define lock_define(name) mutex_t name; # elif USE_WINDOWS_THREADS # define lock_define(name) gl_lock_t name; # else # define lock_define(name) # endif # define lock_init(lock) glthread_lock_init (&(lock)) # define lock_fini(lock) glthread_lock_destroy (&(lock)) # define lock_lock(lock) glthread_lock_lock (&(lock)) # define lock_unlock(lock) glthread_lock_unlock (&(lock)) #elif defined GNULIB_PTHREAD && !defined USE_UNLOCKED_IO # include # define lock_define(name) pthread_mutex_t name; # define lock_init(lock) pthread_mutex_init (&(lock), 0) # define lock_fini(lock) pthread_mutex_destroy (&(lock)) # define lock_lock(lock) pthread_mutex_lock (&(lock)) # define lock_unlock(lock) pthread_mutex_unlock (&(lock)) #else # define lock_define(name) # define lock_init(lock) 0 # define lock_fini(lock) ((void) 0) /* The 'dfa' avoids an "unused variable 'dfa'" warning from GCC. */ # define lock_lock(lock) ((void) dfa) # define lock_unlock(lock) ((void) 0) #endif /* In case that the system doesn't have isblank(). */ #if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) # define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif #ifdef _LIBC # ifndef _RE_DEFINE_LOCALE_FUNCTIONS # define _RE_DEFINE_LOCALE_FUNCTIONS 1 # include # include # endif #endif /* This is for other GNU distributions with internationalized messages. */ #if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC # include # ifdef _LIBC # undef gettext # define gettext(msgid) \ __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES) # endif #else # undef gettext # define gettext(msgid) (msgid) #endif #ifndef gettext_noop /* This define is so xgettext can find the internationalizable strings. */ # define gettext_noop(String) String #endif #if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE) || _LIBC # define RE_ENABLE_I18N #endif #define BE(expr, val) __builtin_expect (expr, val) /* Number of ASCII characters. */ #define ASCII_CHARS 0x80 /* Number of single byte characters. */ #define SBC_MAX (UCHAR_MAX + 1) #define COLL_ELEM_LEN_MAX 8 /* The character which represents newline. */ #define NEWLINE_CHAR '\n' #define WIDE_NEWLINE_CHAR L'\n' /* Rename to standard API for using out of glibc. */ #ifndef _LIBC # undef __wctype # undef __iswctype # define __wctype wctype # define __iswalnum iswalnum # define __iswctype iswctype # define __towlower towlower # define __towupper towupper # define __btowc btowc # define __mbrtowc mbrtowc # define __wcrtomb wcrtomb # define __regfree regfree # define attribute_hidden #endif /* not _LIBC */ #if __GNUC__ < 3 + (__GNUC_MINOR__ < 1) # define __attribute__(arg) #endif #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif /* The type of indexes into strings. This is signed, not size_t, since the API requires indexes to fit in regoff_t anyway, and using signed integers makes the code a bit smaller and presumably faster. The traditional GNU regex implementation uses int for indexes. The POSIX-compatible implementation uses a possibly-wider type. The name 'Idx' is three letters to minimize the hassle of reindenting a lot of regex code that formerly used 'int'. */ typedef regoff_t Idx; #ifdef _REGEX_LARGE_OFFSETS # define IDX_MAX SSIZE_MAX #else # define IDX_MAX INT_MAX #endif /* A hash value, suitable for computing hash tables. */ typedef __re_size_t re_hashval_t; /* An integer used to represent a set of bits. It must be unsigned, and must be at least as wide as unsigned int. */ typedef unsigned long int bitset_word_t; /* All bits set in a bitset_word_t. */ #define BITSET_WORD_MAX ULONG_MAX /* Number of bits in a bitset_word_t. For portability to hosts with padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)'; instead, deduce it directly from BITSET_WORD_MAX. Avoid greater-than-32-bit integers and unconditional shifts by more than 31 bits, as they're not portable. */ #if BITSET_WORD_MAX == 0xffffffffUL # define BITSET_WORD_BITS 32 #elif BITSET_WORD_MAX >> 31 >> 4 == 1 # define BITSET_WORD_BITS 36 #elif BITSET_WORD_MAX >> 31 >> 16 == 1 # define BITSET_WORD_BITS 48 #elif BITSET_WORD_MAX >> 31 >> 28 == 1 # define BITSET_WORD_BITS 60 #elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1 # define BITSET_WORD_BITS 64 #elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1 # define BITSET_WORD_BITS 72 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1 # define BITSET_WORD_BITS 128 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1 # define BITSET_WORD_BITS 256 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1 # define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */ # if BITSET_WORD_BITS <= SBC_MAX # error "Invalid SBC_MAX" # endif #else # error "Add case for new bitset_word_t size" #endif /* Number of bitset_word_t values in a bitset_t. */ #define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS) typedef bitset_word_t bitset_t[BITSET_WORDS]; typedef bitset_word_t *re_bitset_ptr_t; typedef const bitset_word_t *re_const_bitset_ptr_t; #define PREV_WORD_CONSTRAINT 0x0001 #define PREV_NOTWORD_CONSTRAINT 0x0002 #define NEXT_WORD_CONSTRAINT 0x0004 #define NEXT_NOTWORD_CONSTRAINT 0x0008 #define PREV_NEWLINE_CONSTRAINT 0x0010 #define NEXT_NEWLINE_CONSTRAINT 0x0020 #define PREV_BEGBUF_CONSTRAINT 0x0040 #define NEXT_ENDBUF_CONSTRAINT 0x0080 #define WORD_DELIM_CONSTRAINT 0x0100 #define NOT_WORD_DELIM_CONSTRAINT 0x0200 typedef enum { INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, LINE_FIRST = PREV_NEWLINE_CONSTRAINT, LINE_LAST = NEXT_NEWLINE_CONSTRAINT, BUF_FIRST = PREV_BEGBUF_CONSTRAINT, BUF_LAST = NEXT_ENDBUF_CONSTRAINT, WORD_DELIM = WORD_DELIM_CONSTRAINT, NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT } re_context_type; typedef struct { Idx alloc; Idx nelem; Idx *elems; } re_node_set; typedef enum { NON_TYPE = 0, /* Node type, These are used by token, node, tree. */ CHARACTER = 1, END_OF_RE = 2, SIMPLE_BRACKET = 3, OP_BACK_REF = 4, OP_PERIOD = 5, #ifdef RE_ENABLE_I18N COMPLEX_BRACKET = 6, OP_UTF8_PERIOD = 7, #endif /* RE_ENABLE_I18N */ /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used when the debugger shows values of this enum type. */ #define EPSILON_BIT 8 OP_OPEN_SUBEXP = EPSILON_BIT | 0, OP_CLOSE_SUBEXP = EPSILON_BIT | 1, OP_ALT = EPSILON_BIT | 2, OP_DUP_ASTERISK = EPSILON_BIT | 3, ANCHOR = EPSILON_BIT | 4, /* Tree type, these are used only by tree. */ CONCAT = 16, SUBEXP = 17, /* Token type, these are used only by token. */ OP_DUP_PLUS = 18, OP_DUP_QUESTION, OP_OPEN_BRACKET, OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, OP_CLOSE_DUP_NUM, OP_NON_MATCH_LIST, OP_OPEN_COLL_ELEM, OP_CLOSE_COLL_ELEM, OP_OPEN_EQUIV_CLASS, OP_CLOSE_EQUIV_CLASS, OP_OPEN_CHAR_CLASS, OP_CLOSE_CHAR_CLASS, OP_WORD, OP_NOTWORD, OP_SPACE, OP_NOTSPACE, BACK_SLASH } re_token_type_t; #ifdef RE_ENABLE_I18N typedef struct { /* Multibyte characters. */ wchar_t *mbchars; /* Collating symbols. */ # ifdef _LIBC int32_t *coll_syms; # endif /* Equivalence classes. */ # ifdef _LIBC int32_t *equiv_classes; # endif /* Range expressions. */ # ifdef _LIBC uint32_t *range_starts; uint32_t *range_ends; # else /* not _LIBC */ wchar_t *range_starts; wchar_t *range_ends; # endif /* not _LIBC */ /* Character classes. */ wctype_t *char_classes; /* If this character set is the non-matching list. */ unsigned int non_match : 1; /* # of multibyte characters. */ Idx nmbchars; /* # of collating symbols. */ Idx ncoll_syms; /* # of equivalence classes. */ Idx nequiv_classes; /* # of range expressions. */ Idx nranges; /* # of character classes. */ Idx nchar_classes; } re_charset_t; #endif /* RE_ENABLE_I18N */ typedef struct { union { unsigned char c; /* for CHARACTER */ re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ #ifdef RE_ENABLE_I18N re_charset_t *mbcset; /* for COMPLEX_BRACKET */ #endif /* RE_ENABLE_I18N */ Idx idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; #if __GNUC__ >= 2 && !defined __STRICT_ANSI__ re_token_type_t type : 8; #else re_token_type_t type; #endif unsigned int constraint : 10; /* context constraint */ unsigned int duplicated : 1; unsigned int opt_subexp : 1; #ifdef RE_ENABLE_I18N unsigned int accept_mb : 1; /* These 2 bits can be moved into the union if needed (e.g. if running out of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ unsigned int mb_partial : 1; #endif unsigned int word_char : 1; } re_token_t; #define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) struct re_string_t { /* Indicate the raw buffer which is the original string passed as an argument of regexec(), re_search(), etc.. */ const unsigned char *raw_mbs; /* Store the multibyte string. In case of "case insensitive mode" like REG_ICASE, upper cases of the string are stored, otherwise MBS points the same address that RAW_MBS points. */ unsigned char *mbs; #ifdef RE_ENABLE_I18N /* Store the wide character string which is corresponding to MBS. */ wint_t *wcs; Idx *offsets; mbstate_t cur_state; #endif /* Index in RAW_MBS. Each character mbs[i] corresponds to raw_mbs[raw_mbs_idx + i]. */ Idx raw_mbs_idx; /* The length of the valid characters in the buffers. */ Idx valid_len; /* The corresponding number of bytes in raw_mbs array. */ Idx valid_raw_len; /* The length of the buffers MBS and WCS. */ Idx bufs_len; /* The index in MBS, which is updated by re_string_fetch_byte. */ Idx cur_idx; /* length of RAW_MBS array. */ Idx raw_len; /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ Idx len; /* End of the buffer may be shorter than its length in the cases such as re_match_2, re_search_2. Then, we use STOP for end of the buffer instead of LEN. */ Idx raw_stop; /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ Idx stop; /* The context of mbs[0]. We store the context independently, since the context of mbs[0] may be different from raw_mbs[0], which is the beginning of the input string. */ unsigned int tip_context; /* The translation passed as a part of an argument of re_compile_pattern. */ RE_TRANSLATE_TYPE trans; /* Copy of re_dfa_t's word_char. */ re_const_bitset_ptr_t word_char; /* true if REG_ICASE. */ unsigned char icase; unsigned char is_utf8; unsigned char map_notascii; unsigned char mbs_allocated; unsigned char offsets_needed; unsigned char newline_anchor; unsigned char word_ops_used; int mb_cur_max; }; typedef struct re_string_t re_string_t; struct re_dfa_t; typedef struct re_dfa_t re_dfa_t; #ifndef _LIBC # define internal_function # define IS_IN(libc) false #endif static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) internal_function; #ifdef RE_ENABLE_I18N static void build_wcs_buffer (re_string_t *pstr) internal_function; static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; #endif /* RE_ENABLE_I18N */ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; static unsigned int re_string_context_at (const re_string_t *input, Idx idx, int eflags) internal_function __attribute__ ((pure)); #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ ((pstr)->mbs[(pstr)->cur_idx++]) #define re_string_first_byte(pstr, idx) \ ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) #define re_string_is_single_byte_char(pstr, idx) \ ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ || (pstr)->wcs[(idx) + 1] != WEOF)) #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) #define re_string_cur_idx(pstr) ((pstr)->cur_idx) #define re_string_get_buffer(pstr) ((pstr)->mbs) #define re_string_length(pstr) ((pstr)->len) #define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) #if defined _LIBC || HAVE_ALLOCA # include #endif #ifndef _LIBC # if HAVE_ALLOCA /* The OS usually guarantees only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely allocate anything larger than 4096 bytes. Also care for the possibility of a few compiler-allocated temporary stack slots. */ # define __libc_use_alloca(n) ((n) < 4032) # else /* alloca is implemented with malloc, so just use malloc. */ # define __libc_use_alloca(n) 0 # undef alloca # define alloca(n) malloc (n) # endif #endif #ifdef _LIBC # define MALLOC_0_IS_NONNULL 1 #elif !defined MALLOC_0_IS_NONNULL # define MALLOC_0_IS_NONNULL 0 #endif #ifndef MAX # define MAX(a,b) ((a) < (b) ? (b) : (a)) #endif #ifndef MIN # define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) #define re_free(p) free (p) struct bin_tree_t { struct bin_tree_t *parent; struct bin_tree_t *left; struct bin_tree_t *right; struct bin_tree_t *first; struct bin_tree_t *next; re_token_t token; /* 'node_idx' is the index in dfa->nodes, if 'type' == 0. Otherwise 'type' indicate the type of this node. */ Idx node_idx; }; typedef struct bin_tree_t bin_tree_t; #define BIN_TREE_STORAGE_SIZE \ ((1024 - sizeof (void *)) / sizeof (bin_tree_t)) struct bin_tree_storage_t { struct bin_tree_storage_t *next; bin_tree_t data[BIN_TREE_STORAGE_SIZE]; }; typedef struct bin_tree_storage_t bin_tree_storage_t; #define CONTEXT_WORD 1 #define CONTEXT_NEWLINE (CONTEXT_WORD << 1) #define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) #define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) #define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) #define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) #define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) #define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) #define IS_ORDINARY_CONTEXT(c) ((c) == 0) #define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') #define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) #define IS_WIDE_WORD_CHAR(ch) (__iswalnum (ch) || (ch) == L'_') #define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) #define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) #define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) struct re_dfastate_t { re_hashval_t hash; re_node_set nodes; re_node_set non_eps_nodes; re_node_set inveclosure; re_node_set *entrance_nodes; struct re_dfastate_t **trtable, **word_trtable; unsigned int context : 4; unsigned int halt : 1; /* If this state can accept "multi byte". Note that we refer to multibyte characters, and multi character collating elements as "multi byte". */ unsigned int accept_mb : 1; /* If this state has backreference node(s). */ unsigned int has_backref : 1; unsigned int has_constraint : 1; }; typedef struct re_dfastate_t re_dfastate_t; struct re_state_table_entry { Idx num; Idx alloc; re_dfastate_t **array; }; /* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ typedef struct { Idx next_idx; Idx alloc; re_dfastate_t **array; } state_array_t; /* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ typedef struct { Idx node; Idx str_idx; /* The position NODE match at. */ state_array_t path; } re_sub_match_last_t; /* Store information about the node NODE whose type is OP_OPEN_SUBEXP. And information about the node, whose type is OP_CLOSE_SUBEXP, corresponding to NODE is stored in LASTS. */ typedef struct { Idx str_idx; Idx node; state_array_t *path; Idx alasts; /* Allocation size of LASTS. */ Idx nlasts; /* The number of LASTS. */ re_sub_match_last_t **lasts; } re_sub_match_top_t; struct re_backref_cache_entry { Idx node; Idx str_idx; Idx subexp_from; Idx subexp_to; char more; char unused; unsigned short int eps_reachable_subexps_map; }; typedef struct { /* The string object corresponding to the input string. */ re_string_t input; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) const re_dfa_t *const dfa; #else const re_dfa_t *dfa; #endif /* EFLAGS of the argument of regexec. */ int eflags; /* Where the matching ends. */ Idx match_last; Idx last_node; /* The state log used by the matcher. */ re_dfastate_t **state_log; Idx state_log_top; /* Back reference cache. */ Idx nbkref_ents; Idx abkref_ents; struct re_backref_cache_entry *bkref_ents; int max_mb_elem_len; Idx nsub_tops; Idx asub_tops; re_sub_match_top_t **sub_tops; } re_match_context_t; typedef struct { re_dfastate_t **sifted_states; re_dfastate_t **limited_states; Idx last_node; Idx last_str_idx; re_node_set limits; } re_sift_context_t; struct re_fail_stack_ent_t { Idx idx; Idx node; regmatch_t *regs; re_node_set eps_via_nodes; }; struct re_fail_stack_t { Idx num; Idx alloc; struct re_fail_stack_ent_t *stack; }; struct re_dfa_t { re_token_t *nodes; size_t nodes_alloc; size_t nodes_len; Idx *nexts; Idx *org_indices; re_node_set *edests; re_node_set *eclosures; re_node_set *inveclosures; struct re_state_table_entry *state_table; re_dfastate_t *init_state; re_dfastate_t *init_state_word; re_dfastate_t *init_state_nl; re_dfastate_t *init_state_begbuf; bin_tree_t *str_tree; bin_tree_storage_t *str_tree_storage; re_bitset_ptr_t sb_char; int str_tree_storage_idx; /* number of subexpressions 're_nsub' is in regex_t. */ re_hashval_t state_hash_mask; Idx init_node; Idx nbackref; /* The number of backreference in this dfa. */ /* Bitmap expressing which backreference is used. */ bitset_word_t used_bkref_map; bitset_word_t completed_bkref_map; unsigned int has_plural_match : 1; /* If this dfa has "multibyte node", which is a backreference or a node which can accept multibyte character or multi character collating element. */ unsigned int has_mb_node : 1; unsigned int is_utf8 : 1; unsigned int map_notascii : 1; unsigned int word_ops_used : 1; int mb_cur_max; bitset_t word_char; reg_syntax_t syntax; Idx *subexp_map; #ifdef DEBUG char* re_str; #endif lock_define (lock) }; #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) #define re_node_set_remove(set,id) \ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) #define re_node_set_empty(p) ((p)->nelem = 0) #define re_node_set_free(set) re_free ((set)->elems) typedef enum { SB_CHAR, MB_CHAR, EQUIV_CLASS, COLL_SYM, CHAR_CLASS } bracket_elem_type; typedef struct { bracket_elem_type type; union { unsigned char ch; unsigned char *name; wchar_t wch; } opr; } bracket_elem_t; /* Functions for bitset_t operation. */ static void bitset_set (bitset_t set, Idx i) { set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS; } static void bitset_clear (bitset_t set, Idx i) { set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS); } static bool bitset_contain (const bitset_t set, Idx i) { return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1; } static void bitset_empty (bitset_t set) { memset (set, '\0', sizeof (bitset_t)); } static void bitset_set_all (bitset_t set) { memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS)); if (SBC_MAX % BITSET_WORD_BITS != 0) set[BITSET_WORDS - 1] = ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; } static void bitset_copy (bitset_t dest, const bitset_t src) { memcpy (dest, src, sizeof (bitset_t)); } static void __attribute__ ((unused)) bitset_not (bitset_t set) { int bitset_i; for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) set[bitset_i] = ~set[bitset_i]; if (SBC_MAX % BITSET_WORD_BITS != 0) set[BITSET_WORDS - 1] = ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1) & ~set[BITSET_WORDS - 1]); } static void __attribute__ ((unused)) bitset_merge (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] |= src[bitset_i]; } static void __attribute__ ((unused)) bitset_mask (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] &= src[bitset_i]; } #ifdef RE_ENABLE_I18N /* Functions for re_string. */ static int internal_function __attribute__ ((pure, unused)) re_string_char_size_at (const re_string_t *pstr, Idx idx) { int byte_idx; if (pstr->mb_cur_max == 1) return 1; for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) if (pstr->wcs[idx + byte_idx] != WEOF) break; return byte_idx; } static wint_t internal_function __attribute__ ((pure, unused)) re_string_wchar_at (const re_string_t *pstr, Idx idx) { if (pstr->mb_cur_max == 1) return (wint_t) pstr->mbs[idx]; return (wint_t) pstr->wcs[idx]; } # ifdef _LIBC # include # endif static int internal_function __attribute__ ((pure, unused)) re_string_elem_size_at (const re_string_t *pstr, Idx idx) { # ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); p = pstr->mbs + idx; findidx (table, indirect, extra, &p, pstr->len - idx); return p - pstr->mbs - idx; } else # endif /* _LIBC */ return 1; } #endif /* RE_ENABLE_I18N */ #ifndef __GNUC_PREREQ # 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 #endif #if __GNUC_PREREQ (3,4) # undef __attribute_warn_unused_result__ # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) #else # define __attribute_warn_unused_result__ /* empty */ #endif #endif /* _REGEX_INTERNAL_H */ pspp-1.0.1/gl/warn-on-use.h0000644000175000017500000001200713124536241012343 00000000000000/* A C macro for emitting warnings if a function is used. Copyright (C) 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration for FUNCTION which will then trigger a compiler warning containing the text of "literal string" anywhere that function is called, if supported by the compiler. If the compiler does not support this feature, the macro expands to an unused extern declaration. This macro is useful for marking a function as a potential portability trap, with the intent that "literal string" include instructions on the replacement function that should be used instead. However, one of the reasons that a function is a portability trap is if it has the wrong signature. Declaring FUNCTION with a different signature in C is a compilation error, so this macro must use the same type as any existing declaration so that programs that avoid the problematic FUNCTION do not fail to compile merely because they included a header that poisoned the function. But this implies that _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already have a declaration. Use of this macro implies that there must not be any other macro hiding the declaration of FUNCTION; but undefining FUNCTION first is part of the poisoning process anyway (although for symbols that are provided only via a macro, the result is a compilation error rather than a warning containing "literal string"). Also note that in C++, it is only safe to use if FUNCTION has no overloads. For an example, it is possible to poison 'getline' by: - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], [getline]) in configure.ac, which potentially defines HAVE_RAW_DECL_GETLINE - adding this code to a header that wraps the system : #undef getline #if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" "not universally present; use the gnulib module getline"); #endif It is not possible to directly poison global variables. But it is possible to write a wrapper accessor function, and poison that (less common usage, like &environ, will cause a compilation error rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): #if HAVE_RAW_DECL_ENVIRON static char ***rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); # undef environ # define environ (*rpl_environ ()) #endif */ #ifndef _GL_WARN_ON_USE # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") is like _GL_WARN_ON_USE (function, "string"), except that the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes \ __attribute__ ((__warning__ (msg))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes # else /* Unsupported. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_EXTERN_C declaration; performs the declaration with C linkage. */ #ifndef _GL_WARN_EXTERN_C # if defined __cplusplus # define _GL_WARN_EXTERN_C extern "C" # else # define _GL_WARN_EXTERN_C extern # endif #endif pspp-1.0.1/gl/realloc.c0000644000175000017500000000407013124536243011607 00000000000000/* realloc() function that is glibc compatible. Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* written by Jim Meyering and Bruno Haible */ #define _GL_USE_STDLIB_ALLOC 1 #include /* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */ #ifdef realloc # define NEED_REALLOC_GNU 1 /* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU. */ #elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU # define NEED_REALLOC_GNU 1 #endif /* Infer the properties of the system's malloc function. The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ #if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU # define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1 #endif #include #include /* Change the size of an allocated block of memory P to N bytes, with error checking. If N is zero, change it to 1. If P is NULL, use malloc. */ void * rpl_realloc (void *p, size_t n) { void *result; #if NEED_REALLOC_GNU if (n == 0) { n = 1; /* In theory realloc might fail, so don't rely on it to free. */ free (p); p = NULL; } #endif if (p == NULL) { #if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE if (n == 0) n = 1; #endif result = malloc (n); } else result = realloc (p, n); #if !HAVE_REALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } pspp-1.0.1/gl/version-etc-fsf.c0000644000175000017500000000220213124536243013173 00000000000000/* Variable with FSF copyright information, for version-etc. Copyright (C) 1999-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Jim Meyering. */ #include /* Specification. */ #include "version-etc.h" /* Default copyright goes to the FSF. */ const char version_etc_copyright[] = /* Do *not* mark this string for translation. %s is a copyright symbol suitable for this locale, and %d is the copyright year. */ "Copyright %s %d Free Software Foundation, Inc."; pspp-1.0.1/gl/gl_anyhash_list1.h0000644000175000017500000000223613124536242013425 00000000000000/* Sequential list data type implemented by a hash table with another list. Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 . */ /* Common code of gl_linkedhash_list.c, gl_avltreehash_list.c, gl_rbtreehash_list.c. */ /* Hash table entry. */ struct gl_hash_entry { struct gl_hash_entry *hash_next; /* chain of entries in same bucket */ size_t hashcode; /* cache of values' common hash code */ }; typedef struct gl_hash_entry * gl_hash_entry_t; pspp-1.0.1/gl/strtok_r.c0000644000175000017500000000411413124536243012034 00000000000000/* Reentrant string tokenizer. Generic version. Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2017 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 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 . */ #ifdef HAVE_CONFIG_H # include #endif #include #ifdef _LIBC # undef strtok_r # undef __strtok_r #else # define __strtok_r strtok_r # define __rawmemchr strchr #endif /* Parse S into tokens separated by characters in DELIM. If S is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = strtok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" */ char * __strtok_r (char *s, const char *delim, char **save_ptr) { char *token; if (s == NULL) s = *save_ptr; /* Scan leading delimiters. */ s += strspn (s, delim); if (*s == '\0') { *save_ptr = s; return NULL; } /* Find the end of the token. */ token = s; s = strpbrk (token, delim); if (s == NULL) /* This token finishes the string. */ *save_ptr = __rawmemchr (token, '\0'); else { /* Terminate the token and make *SAVE_PTR point past it. */ *s = '\0'; *save_ptr = s + 1; } return token; } #ifdef weak_alias libc_hidden_def (__strtok_r) weak_alias (__strtok_r, strtok_r) #endif pspp-1.0.1/gl/rawmemchr.valgrind0000644000175000017500000000040313020461274013527 00000000000000# Suppress a valgrind message about use of uninitialized memory in rawmemchr(). # This use is OK because it provides only a speedup. { rawmemchr-value4 Memcheck:Value4 fun:rawmemchr } { rawmemchr-value8 Memcheck:Value8 fun:rawmemchr } pspp-1.0.1/gl/gl_anylinked_list1.h0000644000175000017500000000335013124536242013746 00000000000000/* Sequential list data type implemented by a linked list. Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 . */ /* Common code of gl_linked_list.c and gl_linkedhash_list.c. */ /* -------------------------- gl_list_t Data Type -------------------------- */ /* Concrete list node implementation, valid for this file only. */ struct gl_list_node_impl { #if WITH_HASHTABLE struct gl_hash_entry h; /* hash table entry fields; must be first */ #endif struct gl_list_node_impl *next; struct gl_list_node_impl *prev; const void *value; }; /* Concrete gl_list_impl type, valid for this file only. */ struct gl_list_impl { struct gl_list_impl_base base; #if WITH_HASHTABLE /* A hash table: managed as an array of collision lists. */ struct gl_hash_entry **table; size_t table_size; #endif /* A circular list anchored at root. The first node is = root.next, the last node is = root.prev. The root's value is unused. */ struct gl_list_node_impl root; /* Number of list nodes, excluding the root. */ size_t count; }; pspp-1.0.1/gl/count-one-bits.c0000644000175000017500000000027713020461273013034 00000000000000#include #define COUNT_ONE_BITS_INLINE _GL_EXTERN_INLINE #include "count-one-bits.h" #if 1500 <= _MSC_VER && (defined _M_IX86 || defined _M_X64) int popcount_support = -1; #endif pspp-1.0.1/gl/strftime.c0000644000175000017500000014014113124536243012023 00000000000000/* Copyright (C) 1991-2017 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 General Public License as published by the Free Software Foundation; either version 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ #ifdef _LIBC # define USE_IN_EXTENDED_LOCALE_MODEL 1 # define HAVE_STRUCT_ERA_ENTRY 1 # define HAVE_TM_GMTOFF 1 # define HAVE_TM_ZONE 1 # define HAVE_TZNAME 1 # define HAVE_TZSET 1 # include "../locale/localeinfo.h" #else # include # if FPRINTFTIME # include "fprintftime.h" # else # include "strftime.h" # endif # include "time-internal.h" #endif #include #include #if HAVE_TZNAME && !HAVE_DECL_TZNAME extern char *tzname[]; #endif /* Do multibyte processing if multibyte encodings are supported, unless multibyte sequences are safe in formats. Multibyte sequences are safe if they cannot contain byte sequences that look like format conversion specifications. The multibyte encodings used by the C library on the various platforms (UTF-8, GB2312, GBK, CP936, GB18030, EUC-TW, BIG5, BIG5-HKSCS, CP950, EUC-JP, EUC-KR, CP949, SHIFT_JIS, CP932, JOHAB) are safe for formats, because the byte '%' cannot occur in a multibyte character except in the first byte. The DEC-HANYU encoding used on OSF/1 is not safe for formats, but this encoding has never been seen in real-life use, so we ignore it. */ #if !(defined __osf__ && 0) # define MULTIBYTE_IS_FORMAT_SAFE 1 #endif #define DO_MULTIBYTE (! MULTIBYTE_IS_FORMAT_SAFE) #if DO_MULTIBYTE # include static const mbstate_t mbstate_zero; #endif #include #include #include #include #include #ifndef FALLTHROUGH # if __GNUC__ < 7 # define FALLTHROUGH ((void) 0) # else # define FALLTHROUGH __attribute__ ((__fallthrough__)) # endif #endif #ifdef COMPILE_WIDE # include # define CHAR_T wchar_t # define UCHAR_T unsigned int # define L_(Str) L##Str # define NLW(Sym) _NL_W##Sym # define MEMCPY(d, s, n) __wmemcpy (d, s, n) # define STRLEN(s) __wcslen (s) #else # define CHAR_T char # define UCHAR_T unsigned char # define L_(Str) Str # define NLW(Sym) Sym # define MEMCPY(d, s, n) memcpy (d, s, n) # define STRLEN(s) strlen (s) #endif /* Shift A right by B bits portably, by dividing A by 2**B and truncating towards minus infinity. A and B should be free of side effects, and B should be in the range 0 <= B <= INT_BITS - 2, where INT_BITS is the number of useful bits in an int. GNU code can assume that INT_BITS is at least 32. ISO C99 says that A >> B is implementation-defined if A < 0. Some implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift right in the usual way when A < 0, so SHR falls back on division if ordinary A >> B doesn't seem to be the usual signed shift. */ #define SHR(a, b) \ (-1 >> 1 == -1 \ ? (a) >> (b) \ : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) /* Bound on length of the string representing an integer type or expression T. Subtract 1 for the sign bit if t is signed; log10 (2.0) < 146/485; add 1 for integer division truncation; add 1 more for a minus sign if needed. */ #define INT_STRLEN_BOUND(t) \ ((sizeof (t) * CHAR_BIT - 1) * 146 / 485 + 2) #define TM_YEAR_BASE 1900 #ifndef __isleap /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ # define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #endif #ifdef _LIBC # define mktime_z(tz, tm) mktime (tm) # define tzname __tzname # define tzset __tzset #endif #ifndef FPRINTFTIME # define FPRINTFTIME 0 #endif #if FPRINTFTIME # define STREAM_OR_CHAR_T FILE # define STRFTIME_ARG(x) /* empty */ #else # define STREAM_OR_CHAR_T CHAR_T # define STRFTIME_ARG(x) x, #endif #if FPRINTFTIME # define memset_byte(P, Len, Byte) \ do { size_t _i; for (_i = 0; _i < Len; _i++) fputc (Byte, P); } while (0) # define memset_space(P, Len) memset_byte (P, Len, ' ') # define memset_zero(P, Len) memset_byte (P, Len, '0') #elif defined COMPILE_WIDE # define memset_space(P, Len) (wmemset (P, L' ', Len), (P) += (Len)) # define memset_zero(P, Len) (wmemset (P, L'0', Len), (P) += (Len)) #else # define memset_space(P, Len) (memset (P, ' ', Len), (P) += (Len)) # define memset_zero(P, Len) (memset (P, '0', Len), (P) += (Len)) #endif #if FPRINTFTIME # define advance(P, N) #else # define advance(P, N) ((P) += (N)) #endif #define add(n, f) \ do \ { \ size_t _n = (n); \ size_t _w = (width < 0 ? 0 : width); \ size_t _incr = _n < _w ? _w : _n; \ if (_incr >= maxsize - i) \ return 0; \ if (p) \ { \ if (digits == 0 && _n < _w) \ { \ size_t _delta = width - _n; \ if (pad == L_('0')) \ memset_zero (p, _delta); \ else \ memset_space (p, _delta); \ } \ f; \ advance (p, _n); \ } \ i += _incr; \ } while (0) #if FPRINTFTIME # define add1(C) add (1, fputc (C, p)) #else # define add1(C) add (1, *p = C) #endif #if FPRINTFTIME # define cpy(n, s) \ add ((n), \ do \ { \ if (to_lowcase) \ fwrite_lowcase (p, (s), _n); \ else if (to_uppcase) \ fwrite_uppcase (p, (s), _n); \ else \ { \ /* Ignore the value of fwrite. The caller can determine whether \ an error occurred by inspecting ferror (P). All known fwrite \ implementations set the stream's error indicator when they \ fail due to ENOMEM etc., even though C11 and POSIX.1-2008 do \ not require this. */ \ fwrite (s, _n, 1, p); \ } \ } \ while (0) \ ) #else # define cpy(n, s) \ add ((n), \ if (to_lowcase) \ memcpy_lowcase (p, (s), _n LOCALE_ARG); \ else if (to_uppcase) \ memcpy_uppcase (p, (s), _n LOCALE_ARG); \ else \ MEMCPY ((void *) p, (void const *) (s), _n)) #endif #ifdef COMPILE_WIDE # ifndef USE_IN_EXTENDED_LOCALE_MODEL # undef __mbsrtowcs_l # define __mbsrtowcs_l(d, s, l, st, loc) __mbsrtowcs (d, s, l, st) # endif # define widen(os, ws, l) \ { \ mbstate_t __st; \ const char *__s = os; \ memset (&__st, '\0', sizeof (__st)); \ l = __mbsrtowcs_l (NULL, &__s, 0, &__st, loc); \ ws = (wchar_t *) alloca ((l + 1) * sizeof (wchar_t)); \ (void) __mbsrtowcs_l (ws, &__s, l, &__st, loc); \ } #endif #if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL /* We use this code also for the extended locale handling where the function gets as an additional argument the locale which has to be used. To access the values we have to redefine the _NL_CURRENT macro. */ # define strftime __strftime_l # define wcsftime __wcsftime_l # undef _NL_CURRENT # define _NL_CURRENT(category, item) \ (current->values[_NL_ITEM_INDEX (item)].string) # define LOCALE_PARAM , __locale_t loc # define LOCALE_ARG , loc # define HELPER_LOCALE_ARG , current #else # define LOCALE_PARAM # define LOCALE_ARG # ifdef _LIBC # define HELPER_LOCALE_ARG , _NL_CURRENT_DATA (LC_TIME) # else # define HELPER_LOCALE_ARG # endif #endif #ifdef COMPILE_WIDE # ifdef USE_IN_EXTENDED_LOCALE_MODEL # define TOUPPER(Ch, L) __towupper_l (Ch, L) # define TOLOWER(Ch, L) __towlower_l (Ch, L) # else # define TOUPPER(Ch, L) towupper (Ch) # define TOLOWER(Ch, L) towlower (Ch) # endif #else # ifdef USE_IN_EXTENDED_LOCALE_MODEL # define TOUPPER(Ch, L) __toupper_l (Ch, L) # define TOLOWER(Ch, L) __tolower_l (Ch, L) # else # define TOUPPER(Ch, L) toupper (Ch) # define TOLOWER(Ch, L) tolower (Ch) # endif #endif /* We don't use 'isdigit' here since the locale dependent interpretation is not what we want here. We only need to accept the arabic digits in the ASCII range. One day there is perhaps a more reliable way to accept other sets of digits. */ #define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9) #if FPRINTFTIME static void fwrite_lowcase (FILE *fp, const CHAR_T *src, size_t len) { while (len-- > 0) { fputc (TOLOWER ((UCHAR_T) *src, loc), fp); ++src; } } static void fwrite_uppcase (FILE *fp, const CHAR_T *src, size_t len) { while (len-- > 0) { fputc (TOUPPER ((UCHAR_T) *src, loc), fp); ++src; } } #else static CHAR_T *memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM); static CHAR_T * memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM) { while (len-- > 0) dest[len] = TOLOWER ((UCHAR_T) src[len], loc); return dest; } static CHAR_T *memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM); static CHAR_T * memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM) { while (len-- > 0) dest[len] = TOUPPER ((UCHAR_T) src[len], loc); return dest; } #endif #if ! HAVE_TM_GMTOFF /* Yield the difference between *A and *B, measured in seconds, ignoring leap seconds. */ # define tm_diff ftime_tm_diff static int tm_diff (const struct tm *, const struct tm *); static int tm_diff (const struct tm *a, const struct tm *b) { /* Compute intervening leap days correctly even if year is negative. Take care to avoid int overflow in leap day calculations, but it's OK to assume that A and B are close to each other. */ int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); int a100 = a4 / 25 - (a4 % 25 < 0); int b100 = b4 / 25 - (b4 % 25 < 0); int a400 = SHR (a100, 2); int b400 = SHR (b100, 2); int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); int years = a->tm_year - b->tm_year; int days = (365 * years + intervening_leap_days + (a->tm_yday - b->tm_yday)); return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + (a->tm_min - b->tm_min)) + (a->tm_sec - b->tm_sec)); } #endif /* ! HAVE_TM_GMTOFF */ /* The number of days from the first day of the first ISO week of this year to the year day YDAY with week day WDAY. ISO weeks start on Monday; the first ISO week has the year's first Thursday. YDAY may be as small as YDAY_MINIMUM. */ #define ISO_WEEK_START_WDAY 1 /* Monday */ #define ISO_WEEK1_WDAY 4 /* Thursday */ #define YDAY_MINIMUM (-366) static int iso_week_days (int, int); #ifdef __GNUC__ __inline__ #endif static int iso_week_days (int yday, int wday) { /* Add enough to the first operand of % to make it nonnegative. */ int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7; return (yday - (yday - wday + ISO_WEEK1_WDAY + big_enough_multiple_of_7) % 7 + ISO_WEEK1_WDAY - ISO_WEEK_START_WDAY); } /* When compiling this file, GNU applications can #define my_strftime to a symbol (typically nstrftime) to get an extended strftime with extra arguments TZ and NS. */ #if FPRINTFTIME # undef my_strftime # define my_strftime fprintftime #endif #ifdef my_strftime # undef HAVE_TZSET # define extra_args , tz, ns # define extra_args_spec , timezone_t tz, int ns #else # if defined COMPILE_WIDE # define my_strftime wcsftime # define nl_get_alt_digit _nl_get_walt_digit # else # define my_strftime strftime # define nl_get_alt_digit _nl_get_alt_digit # endif # define extra_args # define extra_args_spec /* We don't have this information in general. */ # define tz 1 # define ns 0 #endif static size_t __strftime_internal (STREAM_OR_CHAR_T *, STRFTIME_ARG (size_t) const CHAR_T *, const struct tm *, bool, bool * extra_args_spec LOCALE_PARAM); /* Write information from TP into S according to the format string FORMAT, writing no more that MAXSIZE characters (including the terminating '\0') and returning number of characters written. If S is NULL, nothing will be written anywhere, so to determine how many characters would be written, use NULL for S and (size_t) -1 for MAXSIZE. */ size_t my_strftime (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) const CHAR_T *format, const struct tm *tp extra_args_spec LOCALE_PARAM) { bool tzset_called = false; return __strftime_internal (s, STRFTIME_ARG (maxsize) format, tp, false, &tzset_called extra_args LOCALE_ARG); } #if defined _LIBC && ! FPRINTFTIME libc_hidden_def (my_strftime) #endif /* Just like my_strftime, above, but with two more parameters. UPCASE indicate that the result should be converted to upper case, and *TZSET_CALLED indicates whether tzset has been called here. */ static size_t __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) const CHAR_T *format, const struct tm *tp, bool upcase, bool *tzset_called extra_args_spec LOCALE_PARAM) { #if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL struct __locale_data *const current = loc->__locales[LC_TIME]; #endif #if FPRINTFTIME size_t maxsize = (size_t) -1; #endif int hour12 = tp->tm_hour; #ifdef _NL_CURRENT /* We cannot make the following values variables since we must delay the evaluation of these values until really needed since some expressions might not be valid in every situation. The 'struct tm' might be generated by a strptime() call that initialized only a few elements. Dereference the pointers only if the format requires this. Then it is ok to fail if the pointers are invalid. */ # define a_wkday \ ((const CHAR_T *) (tp->tm_wday < 0 || tp->tm_wday > 6 \ ? "?" : _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday))) # define f_wkday \ ((const CHAR_T *) (tp->tm_wday < 0 || tp->tm_wday > 6 \ ? "?" : _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday))) # define a_month \ ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \ ? "?" : _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon))) # define f_month \ ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \ ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon))) # define ampm \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \ ? NLW(PM_STR) : NLW(AM_STR))) # define aw_len STRLEN (a_wkday) # define am_len STRLEN (a_month) # define ap_len STRLEN (ampm) #endif #if HAVE_TZNAME char **tzname_vec = tzname; #endif const char *zone; size_t i = 0; STREAM_OR_CHAR_T *p = s; const CHAR_T *f; #if DO_MULTIBYTE && !defined COMPILE_WIDE const char *format_end = NULL; #endif #if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST /* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned by localtime. On such systems, we must either use the tzset and localtime wrappers to work around the bug (which sets HAVE_RUN_TZSET_TEST) or make a copy of the structure. */ struct tm copy = *tp; tp = © #endif zone = NULL; #if HAVE_TM_ZONE /* The POSIX test suite assumes that setting the environment variable TZ to a new value before calling strftime() will influence the result (the %Z format) even if the information in TP is computed with a totally different time zone. This is bogus: though POSIX allows bad behavior like this, POSIX does not require it. Do the right thing instead. */ zone = (const char *) tp->tm_zone; #endif #if HAVE_TZNAME if (!tz) { if (! (zone && *zone)) zone = "GMT"; } else { # if !HAVE_TM_ZONE /* Infer the zone name from *TZ instead of from TZNAME. */ tzname_vec = tz->tzname_copy; # endif } /* The tzset() call might have changed the value. */ if (!(zone && *zone) && tp->tm_isdst >= 0) { /* POSIX.1 requires that local time zone information be used as though strftime called tzset. */ # if HAVE_TZSET if (!*tzset_called) { tzset (); *tzset_called = true; } # endif zone = tzname_vec[tp->tm_isdst != 0]; } #endif if (! zone) zone = ""; if (hour12 > 12) hour12 -= 12; else if (hour12 == 0) hour12 = 12; for (f = format; *f != '\0'; ++f) { int pad = 0; /* Padding for number ('-', '_', or 0). */ int modifier; /* Field modifier ('E', 'O', or 0). */ int digits = 0; /* Max digits for numeric format. */ int number_value; /* Numeric value to be printed. */ unsigned int u_number_value; /* (unsigned int) number_value. */ bool negative_number; /* The number is negative. */ bool always_output_a_sign; /* +/- should always be output. */ int tz_colon_mask; /* Bitmask of where ':' should appear. */ const CHAR_T *subfmt; CHAR_T sign_char; CHAR_T *bufp; CHAR_T buf[1 + 2 /* for the two colons in a %::z or %:::z time zone */ + (sizeof (int) < sizeof (time_t) ? INT_STRLEN_BOUND (time_t) : INT_STRLEN_BOUND (int))]; int width = -1; bool to_lowcase = false; bool to_uppcase = upcase; size_t colons; bool change_case = false; int format_char; #if DO_MULTIBYTE && !defined COMPILE_WIDE switch (*f) { case L_('%'): break; case L_('\b'): case L_('\t'): case L_('\n'): case L_('\v'): case L_('\f'): case L_('\r'): case L_(' '): case L_('!'): case L_('"'): case L_('#'): case L_('&'): case L_('\''): case L_('('): case L_(')'): case L_('*'): case L_('+'): case L_(','): case L_('-'): case L_('.'): case L_('/'): case L_('0'): case L_('1'): case L_('2'): case L_('3'): case L_('4'): case L_('5'): case L_('6'): case L_('7'): case L_('8'): case L_('9'): case L_(':'): case L_(';'): case L_('<'): case L_('='): case L_('>'): case L_('?'): case L_('A'): case L_('B'): case L_('C'): case L_('D'): case L_('E'): case L_('F'): case L_('G'): case L_('H'): case L_('I'): case L_('J'): case L_('K'): case L_('L'): case L_('M'): case L_('N'): case L_('O'): case L_('P'): case L_('Q'): case L_('R'): case L_('S'): case L_('T'): case L_('U'): case L_('V'): case L_('W'): case L_('X'): case L_('Y'): case L_('Z'): case L_('['): case L_('\\'): case L_(']'): case L_('^'): case L_('_'): case L_('a'): case L_('b'): case L_('c'): case L_('d'): case L_('e'): case L_('f'): case L_('g'): case L_('h'): case L_('i'): case L_('j'): case L_('k'): case L_('l'): case L_('m'): case L_('n'): case L_('o'): case L_('p'): case L_('q'): case L_('r'): case L_('s'): case L_('t'): case L_('u'): case L_('v'): case L_('w'): case L_('x'): case L_('y'): case L_('z'): case L_('{'): case L_('|'): case L_('}'): case L_('~'): /* The C Standard requires these 98 characters (plus '%') to be in the basic execution character set. None of these characters can start a multibyte sequence, so they need not be analyzed further. */ add1 (*f); continue; default: /* Copy this multibyte sequence until we reach its end, find an error, or come back to the initial shift state. */ { mbstate_t mbstate = mbstate_zero; size_t len = 0; size_t fsize; if (! format_end) format_end = f + strlen (f) + 1; fsize = format_end - f; do { size_t bytes = mbrlen (f + len, fsize - len, &mbstate); if (bytes == 0) break; if (bytes == (size_t) -2) { len += strlen (f + len); break; } if (bytes == (size_t) -1) { len++; break; } len += bytes; } while (! mbsinit (&mbstate)); cpy (len, f); f += len - 1; continue; } } #else /* ! DO_MULTIBYTE */ /* Either multibyte encodings are not supported, they are safe for formats, so any non-'%' byte can be copied through, or this is the wide character version. */ if (*f != L_('%')) { add1 (*f); continue; } #endif /* ! DO_MULTIBYTE */ /* Check for flags that can modify a format. */ while (1) { switch (*++f) { /* This influences the number formats. */ case L_('_'): case L_('-'): case L_('0'): pad = *f; continue; /* This changes textual output. */ case L_('^'): to_uppcase = true; continue; case L_('#'): change_case = true; continue; default: break; } break; } /* As a GNU extension we allow the field width to be specified. */ if (ISDIGIT (*f)) { width = 0; do { if (width > INT_MAX / 10 || (width == INT_MAX / 10 && *f - L_('0') > INT_MAX % 10)) /* Avoid overflow. */ width = INT_MAX; else { width *= 10; width += *f - L_('0'); } ++f; } while (ISDIGIT (*f)); } /* Check for modifiers. */ switch (*f) { case L_('E'): case L_('O'): modifier = *f++; break; default: modifier = 0; break; } /* Now do the specified format. */ format_char = *f; switch (format_char) { #define DO_NUMBER(d, v) \ do \ { \ digits = d; \ number_value = v; \ goto do_number; \ } \ while (0) #define DO_SIGNED_NUMBER(d, negative, v) \ do \ { \ digits = d; \ negative_number = negative; \ u_number_value = v; \ goto do_signed_number; \ } \ while (0) /* The mask is not what you might think. When the ordinal i'th bit is set, insert a colon before the i'th digit of the time zone representation. */ #define DO_TZ_OFFSET(d, mask, v) \ do \ { \ digits = d; \ tz_colon_mask = mask; \ u_number_value = v; \ goto do_tz_offset; \ } \ while (0) #define DO_NUMBER_SPACEPAD(d, v) \ do \ { \ digits = d; \ number_value = v; \ goto do_number_spacepad; \ } \ while (0) case L_('%'): if (modifier != 0) goto bad_format; add1 (*f); break; case L_('a'): if (modifier != 0) goto bad_format; if (change_case) { to_uppcase = true; to_lowcase = false; } #ifdef _NL_CURRENT cpy (aw_len, a_wkday); break; #else goto underlying_strftime; #endif case 'A': if (modifier != 0) goto bad_format; if (change_case) { to_uppcase = true; to_lowcase = false; } #ifdef _NL_CURRENT cpy (STRLEN (f_wkday), f_wkday); break; #else goto underlying_strftime; #endif case L_('b'): case L_('h'): if (change_case) { to_uppcase = true; to_lowcase = false; } if (modifier != 0) goto bad_format; #ifdef _NL_CURRENT cpy (am_len, a_month); break; #else goto underlying_strftime; #endif case L_('B'): if (modifier != 0) goto bad_format; if (change_case) { to_uppcase = true; to_lowcase = false; } #ifdef _NL_CURRENT cpy (STRLEN (f_month), f_month); break; #else goto underlying_strftime; #endif case L_('c'): if (modifier == L_('O')) goto bad_format; #ifdef _NL_CURRENT if (! (modifier == 'E' && (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_D_T_FMT))) != '\0'))) subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT)); #else goto underlying_strftime; #endif subformat: { size_t len = __strftime_internal (NULL, STRFTIME_ARG ((size_t) -1) subfmt, tp, to_uppcase, tzset_called extra_args LOCALE_ARG); add (len, __strftime_internal (p, STRFTIME_ARG (maxsize - i) subfmt, tp, to_uppcase, tzset_called extra_args LOCALE_ARG)); } break; #if !(defined _NL_CURRENT && HAVE_STRUCT_ERA_ENTRY) underlying_strftime: { /* The relevant information is available only via the underlying strftime implementation, so use that. */ char ufmt[5]; char *u = ufmt; char ubuf[1024]; /* enough for any single format in practice */ size_t len; /* Make sure we're calling the actual underlying strftime. In some cases, config.h contains something like "#define strftime rpl_strftime". */ # ifdef strftime # undef strftime size_t strftime (); # endif /* The space helps distinguish strftime failure from empty output. */ *u++ = ' '; *u++ = '%'; if (modifier != 0) *u++ = modifier; *u++ = format_char; *u = '\0'; len = strftime (ubuf, sizeof ubuf, ufmt, tp); if (len != 0) cpy (len - 1, ubuf + 1); } break; #endif case L_('C'): if (modifier == L_('E')) { #if HAVE_STRUCT_ERA_ENTRY struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { # ifdef COMPILE_WIDE size_t len = __wcslen (era->era_wname); cpy (len, era->era_wname); # else size_t len = strlen (era->era_name); cpy (len, era->era_name); # endif break; } #else goto underlying_strftime; #endif } { int century = tp->tm_year / 100 + TM_YEAR_BASE / 100; century -= tp->tm_year % 100 < 0 && 0 < century; DO_SIGNED_NUMBER (2, tp->tm_year < - TM_YEAR_BASE, century); } case L_('x'): if (modifier == L_('O')) goto bad_format; #ifdef _NL_CURRENT if (! (modifier == L_('E') && (*(subfmt = (const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT))) != L_('\0')))) subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT)); goto subformat; #else goto underlying_strftime; #endif case L_('D'): if (modifier != 0) goto bad_format; subfmt = L_("%m/%d/%y"); goto subformat; case L_('d'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_mday); case L_('e'): if (modifier == L_('E')) goto bad_format; DO_NUMBER_SPACEPAD (2, tp->tm_mday); /* All numeric formats set DIGITS and NUMBER_VALUE (or U_NUMBER_VALUE) and then jump to one of these labels. */ do_tz_offset: always_output_a_sign = true; goto do_number_body; do_number_spacepad: /* Force '_' flag unless overridden by '0' or '-' flag. */ if (pad != L_('0') && pad != L_('-')) pad = L_('_'); do_number: /* Format NUMBER_VALUE according to the MODIFIER flag. */ negative_number = number_value < 0; u_number_value = number_value; do_signed_number: always_output_a_sign = false; tz_colon_mask = 0; do_number_body: /* Format U_NUMBER_VALUE according to the MODIFIER flag. NEGATIVE_NUMBER is nonzero if the original number was negative; in this case it was converted directly to unsigned int (i.e., modulo (UINT_MAX + 1)) without negating it. */ if (modifier == L_('O') && !negative_number) { #ifdef _NL_CURRENT /* Get the locale specific alternate representation of the number. If none exist NULL is returned. */ const CHAR_T *cp = nl_get_alt_digit (u_number_value HELPER_LOCALE_ARG); if (cp != NULL) { size_t digitlen = STRLEN (cp); if (digitlen != 0) { cpy (digitlen, cp); break; } } #else goto underlying_strftime; #endif } bufp = buf + sizeof (buf) / sizeof (buf[0]); if (negative_number) u_number_value = - u_number_value; do { if (tz_colon_mask & 1) *--bufp = ':'; tz_colon_mask >>= 1; *--bufp = u_number_value % 10 + L_('0'); u_number_value /= 10; } while (u_number_value != 0 || tz_colon_mask != 0); do_number_sign_and_padding: if (digits < width) digits = width; sign_char = (negative_number ? L_('-') : always_output_a_sign ? L_('+') : 0); if (pad == L_('-')) { if (sign_char) add1 (sign_char); } else { int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0])) - bufp) - !!sign_char; if (padding > 0) { if (pad == L_('_')) { if ((size_t) padding >= maxsize - i) return 0; if (p) memset_space (p, padding); i += padding; width = width > padding ? width - padding : 0; if (sign_char) add1 (sign_char); } else { if ((size_t) digits >= maxsize - i) return 0; if (sign_char) add1 (sign_char); if (p) memset_zero (p, padding); i += padding; width = 0; } } else { if (sign_char) add1 (sign_char); } } cpy (buf + sizeof (buf) / sizeof (buf[0]) - bufp, bufp); break; case L_('F'): if (modifier != 0) goto bad_format; subfmt = L_("%Y-%m-%d"); goto subformat; case L_('H'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_hour); case L_('I'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, hour12); case L_('k'): /* GNU extension. */ if (modifier == L_('E')) goto bad_format; DO_NUMBER_SPACEPAD (2, tp->tm_hour); case L_('l'): /* GNU extension. */ if (modifier == L_('E')) goto bad_format; DO_NUMBER_SPACEPAD (2, hour12); case L_('j'): if (modifier == L_('E')) goto bad_format; DO_SIGNED_NUMBER (3, tp->tm_yday < -1, tp->tm_yday + 1U); case L_('M'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_min); case L_('m'): if (modifier == L_('E')) goto bad_format; DO_SIGNED_NUMBER (2, tp->tm_mon < -1, tp->tm_mon + 1U); #ifndef _LIBC case L_('N'): /* GNU extension. */ if (modifier == L_('E')) goto bad_format; number_value = ns; if (width == -1) width = 9; else { /* Take an explicit width less than 9 as a precision. */ int j; for (j = width; j < 9; j++) number_value /= 10; } DO_NUMBER (width, number_value); #endif case L_('n'): add1 (L_('\n')); break; case L_('P'): to_lowcase = true; #ifndef _NL_CURRENT format_char = L_('p'); #endif FALLTHROUGH; case L_('p'): if (change_case) { to_uppcase = false; to_lowcase = true; } #ifdef _NL_CURRENT cpy (ap_len, ampm); break; #else goto underlying_strftime; #endif case L_('q'): /* GNU extension. */ DO_SIGNED_NUMBER (1, false, ((tp->tm_mon * 11) >> 5) + 1); break; case L_('R'): subfmt = L_("%H:%M"); goto subformat; case L_('r'): #ifdef _NL_CURRENT if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT_AMPM))) == L_('\0')) subfmt = L_("%I:%M:%S %p"); goto subformat; #else goto underlying_strftime; #endif case L_('S'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_sec); case L_('s'): /* GNU extension. */ { struct tm ltm; time_t t; ltm = *tp; t = mktime_z (tz, <m); /* Generate string value for T using time_t arithmetic; this works even if sizeof (long) < sizeof (time_t). */ bufp = buf + sizeof (buf) / sizeof (buf[0]); negative_number = t < 0; do { int d = t % 10; t /= 10; *--bufp = (negative_number ? -d : d) + L_('0'); } while (t != 0); digits = 1; always_output_a_sign = false; goto do_number_sign_and_padding; } case L_('X'): if (modifier == L_('O')) goto bad_format; #ifdef _NL_CURRENT if (! (modifier == L_('E') && (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_T_FMT))) != L_('\0')))) subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT)); goto subformat; #else goto underlying_strftime; #endif case L_('T'): subfmt = L_("%H:%M:%S"); goto subformat; case L_('t'): add1 (L_('\t')); break; case L_('u'): DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1); case L_('U'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7); case L_('V'): case L_('g'): case L_('G'): if (modifier == L_('E')) goto bad_format; { /* YEAR is a leap year if and only if (tp->tm_year + TM_YEAR_BASE) is a leap year, except that YEAR and YEAR - 1 both work correctly even when (tp->tm_year + TM_YEAR_BASE) would overflow. */ int year = (tp->tm_year + (tp->tm_year < 0 ? TM_YEAR_BASE % 400 : TM_YEAR_BASE % 400 - 400)); int year_adjust = 0; int days = iso_week_days (tp->tm_yday, tp->tm_wday); if (days < 0) { /* This ISO week belongs to the previous year. */ year_adjust = -1; days = iso_week_days (tp->tm_yday + (365 + __isleap (year - 1)), tp->tm_wday); } else { int d = iso_week_days (tp->tm_yday - (365 + __isleap (year)), tp->tm_wday); if (0 <= d) { /* This ISO week belongs to the next year. */ year_adjust = 1; days = d; } } switch (*f) { case L_('g'): { int yy = (tp->tm_year % 100 + year_adjust) % 100; DO_NUMBER (2, (0 <= yy ? yy : tp->tm_year < -TM_YEAR_BASE - year_adjust ? -yy : yy + 100)); } case L_('G'): DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE - year_adjust, (tp->tm_year + (unsigned int) TM_YEAR_BASE + year_adjust)); default: DO_NUMBER (2, days / 7 + 1); } } case L_('W'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, (tp->tm_yday - (tp->tm_wday - 1 + 7) % 7 + 7) / 7); case L_('w'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (1, tp->tm_wday); case L_('Y'): if (modifier == 'E') { #if HAVE_STRUCT_ERA_ENTRY struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { # ifdef COMPILE_WIDE subfmt = era->era_wformat; # else subfmt = era->era_format; # endif goto subformat; } #else goto underlying_strftime; #endif } if (modifier == L_('O')) goto bad_format; DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE, tp->tm_year + (unsigned int) TM_YEAR_BASE); case L_('y'): if (modifier == L_('E')) { #if HAVE_STRUCT_ERA_ENTRY struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { int delta = tp->tm_year - era->start_date[0]; DO_NUMBER (1, (era->offset + delta * era->absolute_direction)); } #else goto underlying_strftime; #endif } { int yy = tp->tm_year % 100; if (yy < 0) yy = tp->tm_year < - TM_YEAR_BASE ? -yy : yy + 100; DO_NUMBER (2, yy); } case L_('Z'): if (change_case) { to_uppcase = false; to_lowcase = true; } #ifdef COMPILE_WIDE { /* The zone string is always given in multibyte form. We have to transform it first. */ wchar_t *wczone; size_t len; widen (zone, wczone, len); cpy (len, wczone); } #else cpy (strlen (zone), zone); #endif break; case L_(':'): /* :, ::, and ::: are valid only just before 'z'. :::: etc. are rejected later. */ for (colons = 1; f[colons] == L_(':'); colons++) continue; if (f[colons] != L_('z')) goto bad_format; f += colons; goto do_z_conversion; case L_('z'): colons = 0; do_z_conversion: if (tp->tm_isdst < 0) break; { int diff; int hour_diff; int min_diff; int sec_diff; #if HAVE_TM_GMTOFF diff = tp->tm_gmtoff; #else if (!tz) diff = 0; else { struct tm gtm; struct tm ltm; time_t lt; /* POSIX.1 requires that local time zone information be used as though strftime called tzset. */ # if HAVE_TZSET if (!*tzset_called) { tzset (); *tzset_called = true; } # endif ltm = *tp; lt = mktime_z (tz, <m); if (lt == (time_t) -1) { /* mktime returns -1 for errors, but -1 is also a valid time_t value. Check whether an error really occurred. */ struct tm tm; if (! localtime_rz (tz, <, &tm) || ((ltm.tm_sec ^ tm.tm_sec) | (ltm.tm_min ^ tm.tm_min) | (ltm.tm_hour ^ tm.tm_hour) | (ltm.tm_mday ^ tm.tm_mday) | (ltm.tm_mon ^ tm.tm_mon) | (ltm.tm_year ^ tm.tm_year))) break; } if (! localtime_rz (0, <, >m)) break; diff = tm_diff (<m, >m); } #endif negative_number = diff < 0 || (diff == 0 && *zone == '-'); hour_diff = diff / 60 / 60; min_diff = diff / 60 % 60; sec_diff = diff % 60; switch (colons) { case 0: /* +hhmm */ DO_TZ_OFFSET (5, 0, hour_diff * 100 + min_diff); case 1: tz_hh_mm: /* +hh:mm */ DO_TZ_OFFSET (6, 04, hour_diff * 100 + min_diff); case 2: tz_hh_mm_ss: /* +hh:mm:ss */ DO_TZ_OFFSET (9, 024, hour_diff * 10000 + min_diff * 100 + sec_diff); case 3: /* +hh if possible, else +hh:mm, else +hh:mm:ss */ if (sec_diff != 0) goto tz_hh_mm_ss; if (min_diff != 0) goto tz_hh_mm; DO_TZ_OFFSET (3, 0, hour_diff); default: goto bad_format; } } case L_('\0'): /* GNU extension: % at end of format. */ --f; FALLTHROUGH; default: /* Unknown format; output the format, including the '%', since this is most likely the right thing to do if a multibyte string has been misparsed. */ bad_format: { int flen; for (flen = 1; f[1 - flen] != L_('%'); flen++) continue; cpy (flen, &f[1 - flen]); } break; } } #if ! FPRINTFTIME if (p && maxsize != 0) *p = L_('\0'); #endif return i; } pspp-1.0.1/gl/progname.h0000644000175000017500000000373713124536242012013 00000000000000/* Program name management. Copyright (C) 2001-2004, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #ifndef _PROGNAME_H #define _PROGNAME_H /* Programs using this file should do the following in main(): set_program_name (argv[0]); */ #ifdef __cplusplus extern "C" { #endif /* String containing name the program is called with. */ extern const char *program_name; /* Set program_name, based on argv[0]. argv0 must be a string allocated with indefinite extent, and must not be modified after this call. */ extern void set_program_name (const char *argv0); #if ENABLE_RELOCATABLE /* Set program_name, based on argv[0], and original installation prefix and directory, for relocatability. */ extern void set_program_name_and_installdir (const char *argv0, const char *orig_installprefix, const char *orig_installdir); #undef set_program_name #define set_program_name(ARG0) \ set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR) /* Return the full pathname of the current executable, based on the earlier call to set_program_name_and_installdir. Return NULL if unknown. */ extern char *get_full_program_name (void); #endif #ifdef __cplusplus } #endif #endif /* _PROGNAME_H */ pspp-1.0.1/gl/sigaction.c0000644000175000017500000001614313124536243012152 00000000000000/* POSIX compatible signal blocking. Copyright (C) 2008-2017 Free Software Foundation, Inc. Written by Eric Blake , 2008. 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 . */ #include /* Specification. */ #include #include #include #include /* This implementation of sigaction is tailored to native Windows behavior: signal() has SysV semantics (ie. the handler is uninstalled before it is invoked). This is an inherent data race if an asynchronous signal is sent twice in a row before we can reinstall our handler, but there's nothing we can do about it. Meanwhile, sigprocmask() is not present, and while we can use the gnulib replacement to provide critical sections, it too suffers from potential data races in the face of an ill-timed asynchronous signal. And we compound the situation by reading static storage in a signal handler, which POSIX warns is not generically async-signal-safe. Oh well. Additionally: - We don't implement SA_NOCLDSTOP or SA_NOCLDWAIT, because SIGCHLD is not defined. - We don't implement SA_ONSTACK, because sigaltstack() is not present. - We ignore SA_RESTART, because blocking native Windows API calls are not interrupted anyway when an asynchronous signal occurs, and the MSVCRT runtime never sets errno to EINTR. - We don't implement SA_SIGINFO because it is impossible to do so portably. POSIX states that an application should not mix signal() and sigaction(). We support the use of signal() within the gnulib sigprocmask() substitute, but all other application code linked with this module should stick with only sigaction(). */ /* Check some of our assumptions. */ #if defined SIGCHLD || defined HAVE_SIGALTSTACK || defined HAVE_SIGINTERRUPT # error "Revisit the assumptions made in the sigaction module" #endif /* Out-of-range substitutes make a good fallback for uncatchable signals. */ #ifndef SIGKILL # define SIGKILL (-1) #endif #ifndef SIGSTOP # define SIGSTOP (-1) #endif /* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias for the signal SIGABRT. Only one signal handler is stored for both SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef SIGABRT_COMPAT # define SIGABRT_COMPAT 6 #endif /* A signal handler. */ typedef void (*handler_t) (int signal); /* Set of current actions. If sa_handler for an entry is NULL, then that signal is not currently handled by the sigaction handler. */ static struct sigaction volatile action_array[NSIG] /* = 0 */; /* Signal handler that is installed for signals. */ static void sigaction_handler (int sig) { handler_t handler; sigset_t mask; sigset_t oldmask; int saved_errno = errno; if (sig < 0 || NSIG <= sig || !action_array[sig].sa_handler) { /* Unexpected situation; be careful to avoid recursive abort. */ if (sig == SIGABRT) signal (SIGABRT, SIG_DFL); abort (); } /* Reinstall the signal handler when required; otherwise update the bookkeeping so that the user's handler may call sigaction and get accurate results. We know the signal isn't currently blocked, or we wouldn't be in its handler, therefore we know that we are not interrupting a sigaction() call. There is a race where any asynchronous instance of the same signal occurring before we reinstall the handler will trigger the default handler; oh well. */ handler = action_array[sig].sa_handler; if ((action_array[sig].sa_flags & SA_RESETHAND) == 0) signal (sig, sigaction_handler); else action_array[sig].sa_handler = NULL; /* Block appropriate signals. */ mask = action_array[sig].sa_mask; if ((action_array[sig].sa_flags & SA_NODEFER) == 0) sigaddset (&mask, sig); sigprocmask (SIG_BLOCK, &mask, &oldmask); /* Invoke the user's handler, then restore prior mask. */ errno = saved_errno; handler (sig); saved_errno = errno; sigprocmask (SIG_SETMASK, &oldmask, NULL); errno = saved_errno; } /* Change and/or query the action that will be taken on delivery of signal SIG. If not NULL, ACT describes the new behavior. If not NULL, OACT is set to the prior behavior. Return 0 on success, or set errno and return -1 on failure. */ int sigaction (int sig, const struct sigaction *restrict act, struct sigaction *restrict oact) { sigset_t mask; sigset_t oldmask; int saved_errno; if (sig < 0 || NSIG <= sig || sig == SIGKILL || sig == SIGSTOP || (act && act->sa_handler == SIG_ERR)) { errno = EINVAL; return -1; } #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif /* POSIX requires sigaction() to be async-signal-safe. In other words, if an asynchronous signal can occur while we are anywhere inside this function, the user's handler could then call sigaction() recursively and expect consistent results. We meet this rule by using sigprocmask to block all signals before modifying any data structure that could be read from a signal handler; this works since we know that the gnulib sigprocmask replacement does not try to use sigaction() from its handler. */ if (!act && !oact) return 0; sigfillset (&mask); sigprocmask (SIG_BLOCK, &mask, &oldmask); if (oact) { if (action_array[sig].sa_handler) *oact = action_array[sig]; else { /* Safe to change the handler at will here, since all signals are currently blocked. */ oact->sa_handler = signal (sig, SIG_DFL); if (oact->sa_handler == SIG_ERR) goto failure; signal (sig, oact->sa_handler); oact->sa_flags = SA_RESETHAND | SA_NODEFER; sigemptyset (&oact->sa_mask); } } if (act) { /* Safe to install the handler before updating action_array, since all signals are currently blocked. */ if (act->sa_handler == SIG_DFL || act->sa_handler == SIG_IGN) { if (signal (sig, act->sa_handler) == SIG_ERR) goto failure; action_array[sig].sa_handler = NULL; } else { if (signal (sig, sigaction_handler) == SIG_ERR) goto failure; action_array[sig] = *act; } } sigprocmask (SIG_SETMASK, &oldmask, NULL); return 0; failure: saved_errno = errno; sigprocmask (SIG_SETMASK, &oldmask, NULL); errno = saved_errno; return -1; } pspp-1.0.1/gl/fpucw.h0000644000175000017500000001116213124536241011315 00000000000000/* Manipulating the FPU control word. -*- coding: utf-8 -*- Copyright (C) 2007-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2007. 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 . */ #ifndef _FPUCW_H #define _FPUCW_H /* The i386 floating point hardware (the 387 compatible FPU, not the modern SSE/SSE2 hardware) has a controllable rounding precision. It is specified through the 'PC' bits in the FPU control word ('fctrl' register). (See the GNU libc i386 header for details.) On some platforms, such as Linux or Solaris, the default precision setting is set to "extended precision". This means that 'long double' instructions operate correctly, but 'double' computations often produce slightly different results as on strictly IEEE 754 conforming systems. On some platforms, such as NetBSD, the default precision is set to "double precision". This means that 'long double' instructions will operate only as 'double', i.e. lead to wrong results. Similarly on FreeBSD 6.4, at least for the division of 'long double' numbers. The FPU control word is under control of the application, i.e. it is not required to be set either way by the ABI. (In fact, the i386 ABI http://refspecs.freestandards.org/elf/abi386-4.pdf page 3-12 = page 38 is not clear about it. But in any case, gcc treats the control word like a "preserved" register: it emits code that assumes that the control word is preserved across calls, and it restores the control word at the end of functions that modify it.) See Vincent Lefèvre's page http://www.vinc17.org/research/extended.en.html for a good explanation. See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for some argumentation which setting should be the default. */ /* This header file provides the following facilities: fpucw_t integral type holding the value of 'fctrl' FPU_PC_MASK bit mask denoting the precision control FPU_PC_DOUBLE precision control for 53 bits mantissa FPU_PC_EXTENDED precision control for 64 bits mantissa GET_FPUCW () yields the current FPU control word SET_FPUCW (word) sets the FPU control word DECL_LONG_DOUBLE_ROUNDING variable declaration for BEGIN/END_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING () starts a sequence of instructions with 'long double' safe operation precision END_LONG_DOUBLE_ROUNDING () ends a sequence of instructions with 'long double' safe operation precision */ /* Inline assembler like this works only with GNU C. */ #if (defined __i386__ || defined __x86_64__) && defined __GNUC__ typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */ # define FPU_PC_MASK 0x0300 # define FPU_PC_DOUBLE 0x200 /* glibc calls this _FPU_DOUBLE */ # define FPU_PC_EXTENDED 0x300 /* glibc calls this _FPU_EXTENDED */ # define GET_FPUCW() \ ({ fpucw_t _cw; \ __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw)); \ _cw; \ }) # define SET_FPUCW(word) \ (void)({ fpucw_t _ncw = (word); \ __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw)); \ }) # define DECL_LONG_DOUBLE_ROUNDING \ fpucw_t oldcw; # define BEGIN_LONG_DOUBLE_ROUNDING() \ (void)(oldcw = GET_FPUCW (), \ SET_FPUCW ((oldcw & ~FPU_PC_MASK) | FPU_PC_EXTENDED)) # define END_LONG_DOUBLE_ROUNDING() \ SET_FPUCW (oldcw) #else typedef unsigned int fpucw_t; # define FPU_PC_MASK 0 # define FPU_PC_DOUBLE 0 # define FPU_PC_EXTENDED 0 # define GET_FPUCW() 0 # define SET_FPUCW(word) (void)(word) # define DECL_LONG_DOUBLE_ROUNDING # define BEGIN_LONG_DOUBLE_ROUNDING() # define END_LONG_DOUBLE_ROUNDING() #endif #endif /* _FPUCW_H */ pspp-1.0.1/gl/ref-add.sin0000644000175000017500000000175213124536243012043 00000000000000# Add this package to a list of references stored in a text file. # # Copyright (C) 2000, 2009-2017 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, 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 . # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// ta :a s/ @PACKAGE@ / @PACKAGE@ / tb s/ $/ @PACKAGE@ / :b s/^/# Packages using this file:/ } pspp-1.0.1/gl/memchr2.h0000644000175000017500000000211313124536242011523 00000000000000/* Scan memory for the first of two bytes. Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #ifdef __cplusplus extern "C" { #endif /* Return the first address of either C1 or C2 (treated as unsigned char) that occurs within N bytes of the memory region S. If neither byte appears, return NULL. */ extern void *memchr2 (void const *s, int c1, int c2, size_t n) _GL_ATTRIBUTE_PURE; #ifdef __cplusplus } #endif pspp-1.0.1/gl/readlink.c0000644000175000017500000000446313124536243011765 00000000000000/* Stub for readlink(). Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include #include #include #include #if !HAVE_READLINK /* readlink() substitute for systems that don't have a readlink() function, such as DJGPP 2.03 and mingw32. */ ssize_t readlink (const char *name, char *buf _GL_UNUSED, size_t bufsize _GL_UNUSED) { struct stat statbuf; /* In general we should use lstat() here, not stat(). But on platforms without symbolic links, lstat() - if it exists - would be equivalent to stat(), therefore we can use stat(). This saves us a configure check. */ if (stat (name, &statbuf) >= 0) errno = EINVAL; return -1; } #else /* HAVE_READLINK */ # undef readlink /* readlink() wrapper that uses correct types, for systems like cygwin 1.5.x where readlink returns int, and which rejects trailing slash, for Solaris 9. */ ssize_t rpl_readlink (const char *name, char *buf, size_t bufsize) { # if READLINK_TRAILING_SLASH_BUG size_t len = strlen (name); if (len && name[len - 1] == '/') { /* Even if name without the slash is a symlink to a directory, both lstat() and stat() must resolve the trailing slash to the directory rather than the symlink. We can therefore safely use stat() to distinguish between EINVAL and ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat(). */ struct stat st; if (stat (name, &st) == 0) errno = EINVAL; return -1; } # endif /* READLINK_TRAILING_SLASH_BUG */ return readlink (name, buf, bufsize); } #endif /* HAVE_READLINK */ pspp-1.0.1/gl/trunc.c0000644000175000017500000000722513124536243011326 00000000000000/* Round towards zero. Copyright (C) 2007, 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible , 2007. */ #if ! defined USE_LONG_DOUBLE # include #endif /* Specification. */ #include #include #undef MIN #ifdef USE_LONG_DOUBLE # define FUNC truncl # define DOUBLE long double # define MANT_DIG LDBL_MANT_DIG # define MIN LDBL_MIN # define L_(literal) literal##L #elif ! defined USE_FLOAT # define FUNC trunc # define DOUBLE double # define MANT_DIG DBL_MANT_DIG # define MIN DBL_MIN # define L_(literal) literal #else /* defined USE_FLOAT */ # define FUNC truncf # define DOUBLE float # define MANT_DIG FLT_MANT_DIG # define MIN FLT_MIN # define L_(literal) literal##f #endif /* -0.0. See minus-zero.h. */ #if defined __hpux || defined __sgi || defined __ICC # define MINUS_ZERO (-MIN * MIN) #else # define MINUS_ZERO L_(-0.0) #endif /* MSVC with option -fp:strict refuses to compile constant initializers that contain floating-point operations. Pacify this compiler. */ #ifdef _MSC_VER # pragma fenv_access (off) #endif /* 2^(MANT_DIG-1). */ static const DOUBLE TWO_MANT_DIG = /* Assume MANT_DIG <= 5 * 31. Use the identity n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5). */ (DOUBLE) (1U << ((MANT_DIG - 1) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5)); DOUBLE FUNC (DOUBLE x) { /* The use of 'volatile' guarantees that excess precision bits are dropped at each addition step and before the following comparison at the caller's site. It is necessary on x86 systems where double-floats are not IEEE compliant by default, to avoid that the results become platform and compiler option dependent. 'volatile' is a portable alternative to gcc's -ffloat-store option. */ volatile DOUBLE y = x; volatile DOUBLE z = y; if (z > L_(0.0)) { /* For 0 < x < 1, return +0.0 even if the current rounding mode is FE_DOWNWARD. */ if (z < L_(1.0)) z = L_(0.0); /* Avoid rounding errors for values near 2^k, where k >= MANT_DIG-1. */ else if (z < TWO_MANT_DIG) { /* Round to the next integer (nearest or up or down, doesn't matter). */ z += TWO_MANT_DIG; z -= TWO_MANT_DIG; /* Enforce rounding down. */ if (z > y) z -= L_(1.0); } } else if (z < L_(0.0)) { /* For -1 < x < 0, return -0.0 regardless of the current rounding mode. */ if (z > L_(-1.0)) z = MINUS_ZERO; /* Avoid rounding errors for values near -2^k, where k >= MANT_DIG-1. */ else if (z > - TWO_MANT_DIG) { /* Round to the next integer (nearest or up or down, doesn't matter). */ z -= TWO_MANT_DIG; z += TWO_MANT_DIG; /* Enforce rounding up. */ if (z < y) z += L_(1.0); } } return z; } pspp-1.0.1/gl/ftoastr.h0000644000175000017500000001414713124536242011662 00000000000000/* floating point to accurate string Copyright (C) 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paul Eggert. */ #ifndef _GL_FTOASTR_H #include "intprops.h" #include #include /* Store into BUF (of size BUFSIZE) an accurate minimal-precision string representation of a floating point number. FLAGS affect the formatting of the number. Pad the output string with spaces as necessary to width WIDTH bytes, in the style of printf. WIDTH must be nonnegative. X is the floating-point number to be converted. Return the number of bytes stored into BUF, not counting the terminating null. However, do not overrun BUF: if BUF is too small, return a fairly tight (but not necessarily exact) upper bound on the value that would have been returned if BUF had been big enough. If SIZE is zero, BUF may be a null pointer. On error (e.g., returned value would exceed INT_MAX), return -1 and set errno. Example: char buf[DBL_BUFSIZE_BOUND]; int r = dtoastr (buf, sizeof buf, 0, 0, 0.1); In the C locale, this sets R to 3 and stores "0.1" into BUF. */ int ftoastr (char *buf, size_t bufsize, int flags, int width, float x); int dtoastr (char *buf, size_t bufsize, int flags, int width, double x); int ldtoastr (char *buf, size_t bufsize, int flags, int width, long double x); /* Flag values for ftoastr etc. These can be ORed together. */ enum { /* Left justify within the width; the default is right justification. */ FTOASTR_LEFT_JUSTIFY = 1, /* Output "+" before positive numbers; the default outputs nothing. */ FTOASTR_ALWAYS_SIGNED = 2, /* Output " " before positive numbers; ignored if FTOASTR_ALWAYS_SIGNED is also given. */ FTOASTR_SPACE_POSITIVE = 4, /* Pad with zeros instead of spaces; ignored if FTOASTR_LEFT_JUSTIFY is also given. */ FTOASTR_ZERO_PAD = 8, /* Use 'E' instead of 'e' before the exponent. */ FTOASTR_UPPER_E = 16 }; /* _GL_FLT_PREC_BOUND is an upper bound on the precision needed to represent a float value without losing information. Likewise for _GL_DBL_PREC_BOUND and double, and _GL_LDBL_PREC_BOUND and long double. These are macros, not enums, to work around a bug in IBM xlc 12.1. */ #if FLT_RADIX == 10 /* decimal floating point */ # define _GL_FLT_PREC_BOUND FLT_MANT_DIG # define _GL_DBL_PREC_BOUND DBL_MANT_DIG # define _GL_LDBL_PREC_BOUND LDBL_MANT_DIG #else /* An upper bound on the number of bits needed to represent a single digit in a floating-point fraction. */ # if FLT_RADIX == 2 /* IEEE 754 floating point, VAX floating point, etc. */ # define _GL_FLOAT_DIG_BITS_BOUND 1 # elif FLT_RADIX <= 16 /* IBM hex floating point has FLT_RADIX == 16. */ # define _GL_FLOAT_DIG_BITS_BOUND 4 # else /* no machine is this bad, but let's be complete */ # define _GL_FLOAT_DIG_BITS_BOUND ((int) TYPE_WIDTH (int) - 1) # endif /* An upper bound on the number of decimal digits needed to represent a floating point number accurately, assuming a fraction contains DIG digits. For why the "+ 1" is needed, see "Binary to Decimal Conversion" in David Goldberg's paper "What Every Computer Scientist Should Know About Floating-Point Arithmetic" . */ # define _GL_FLOAT_PREC_BOUND(dig) \ (INT_BITS_STRLEN_BOUND ((dig) * _GL_FLOAT_DIG_BITS_BOUND) + 1) # define _GL_FLT_PREC_BOUND _GL_FLOAT_PREC_BOUND ( FLT_MANT_DIG) # define _GL_DBL_PREC_BOUND _GL_FLOAT_PREC_BOUND ( DBL_MANT_DIG) # define _GL_LDBL_PREC_BOUND _GL_FLOAT_PREC_BOUND (LDBL_MANT_DIG) #endif /* Bound on the number of bytes printed for an exponent in the range MIN..MAX, where MIN < 0 < MAX; printf always prints a sign and at least 2 digits. Although the maximum known exponent is 4932 for IEEE 754 binary128, support tight bounds for exponents up to a million, just in case. */ #define _GL_FLOAT_EXPONENT_STRLEN_BOUND(min, max) \ ( -100 < (min) && (max) < 100 ? 3 \ : -1000 < (min) && (max) < 1000 ? 4 \ : -10000 < (min) && (max) < 10000 ? 5 \ : -100000 < (min) && (max) < 100000 ? 6 \ : -1000000 < (min) && (max) < 1000000 ? 7 \ : INT_STRLEN_BOUND (int) /* not a tight bound */) /* A reasonably tight bound on the length of a type-T floating value formatted with ftoastr etc. Room is needed for sign, fraction digits, decimal point, "e", and exponent. POINTLEN should be a reasonably tight bound on the string length of the decimal point. */ #define _GL_FLOAT_STRLEN_BOUND_L(t, pointlen) \ (1 + _GL_##t##_PREC_BOUND + pointlen + 1 \ + _GL_FLOAT_EXPONENT_STRLEN_BOUND (t##_MIN_10_EXP, t##_MAX_10_EXP)) #define FLT_STRLEN_BOUND_L(pointlen) _GL_FLOAT_STRLEN_BOUND_L ( FLT, pointlen) #define DBL_STRLEN_BOUND_L(pointlen) _GL_FLOAT_STRLEN_BOUND_L ( DBL, pointlen) #define LDBL_STRLEN_BOUND_L(pointlen) _GL_FLOAT_STRLEN_BOUND_L (LDBL, pointlen) /* Looser bounds that are locale-independent and are integral constant expressions. */ #define FLT_STRLEN_BOUND FLT_STRLEN_BOUND_L (MB_LEN_MAX) #define DBL_STRLEN_BOUND DBL_STRLEN_BOUND_L (MB_LEN_MAX) #define LDBL_STRLEN_BOUND LDBL_STRLEN_BOUND_L (MB_LEN_MAX) /* Looser, locale-independent bounds that include the trailing null byte. */ #define FLT_BUFSIZE_BOUND ( FLT_STRLEN_BOUND + 1) #define DBL_BUFSIZE_BOUND ( DBL_STRLEN_BOUND + 1) #define LDBL_BUFSIZE_BOUND (LDBL_STRLEN_BOUND + 1) #endif /* _GL_FTOASTR_H */ pspp-1.0.1/gl/full-read.h0000644000175000017500000000206013124536242012042 00000000000000/* An interface to read() that reads all it is asked to read. Copyright (C) 2002, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Read COUNT bytes at BUF to descriptor FD, retrying if interrupted or if partial reads occur. Return the number of bytes successfully read, setting errno if that is less than COUNT. errno = 0 means EOF. */ extern size_t full_read (int fd, void *buf, size_t count); pspp-1.0.1/gl/c-xasprintf.c0000644000175000017500000000203513124536241012421 00000000000000/* vasprintf and asprintf with out-of-memory checking in C locale. Copyright (C) 1999, 2002-2004, 2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include "c-xvasprintf.h" char * c_xasprintf (const char *format, ...) { va_list args; char *result; va_start (args, format); result = c_xvasprintf (format, args); va_end (args); return result; } pspp-1.0.1/gl/unilbrk/0000755000175000017500000000000013150620334011541 500000000000000pspp-1.0.1/gl/unilbrk/lbrktables.h0000644000175000017500000000736313124536243013776 00000000000000/* Line breaking auxiliary tables. Copyright (C) 2001-2003, 2006-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #include "unitypes.h" /* Line breaking classification. */ enum { /* Values >= 27 are resolved at run time. */ LBP_BK = 27, /* mandatory break */ /*LBP_CR, carriage return - not used here because it's a DOSism */ /*LBP_LF, line feed - not used here because it's a DOSism */ LBP_CM = 28, /* attached characters and combining marks */ /*LBP_NL, next line - not used here because it's equivalent to LBP_BK */ /*LBP_SG, surrogates - not used here because they are not characters */ LBP_WJ = 0, /* word joiner */ LBP_ZW = 29, /* zero width space */ LBP_GL = 1, /* non-breaking (glue) */ LBP_SP = 30, /* space */ LBP_B2 = 2, /* break opportunity before and after */ LBP_BA = 3, /* break opportunity after */ LBP_BB = 4, /* break opportunity before */ LBP_HY = 5, /* hyphen */ LBP_CB = 31, /* contingent break opportunity */ LBP_CL = 6, /* closing punctuation */ LBP_CP = 7, /* closing parenthesis */ LBP_EX = 8, /* exclamation/interrogation */ LBP_IN = 9, /* inseparable */ LBP_NS = 10, /* non starter */ LBP_OP = 11, /* opening punctuation */ LBP_QU = 12, /* ambiguous quotation */ LBP_IS = 13, /* infix separator (numeric) */ LBP_NU = 14, /* numeric */ LBP_PO = 15, /* postfix (numeric) */ LBP_PR = 16, /* prefix (numeric) */ LBP_SY = 17, /* symbols allowing breaks */ LBP_AI = 32, /* ambiguous (alphabetic or ideograph) */ LBP_AL = 18, /* ordinary alphabetic and symbol characters */ /*LBP_CJ, conditional Japanese starters, resolved to NS */ LBP_H2 = 19, /* Hangul LV syllable */ LBP_H3 = 20, /* Hangul LVT syllable */ LBP_HL = 25, /* Hebrew letter */ LBP_ID = 21, /* ideographic */ LBP_JL = 22, /* Hangul L Jamo */ LBP_JV = 23, /* Hangul V Jamo */ LBP_JT = 24, /* Hangul T Jamo */ LBP_RI = 26, /* regional indicator */ LBP_SA = 33, /* complex context (South East Asian) */ LBP_XX = 34 /* unknown */ }; #include "lbrkprop1.h" static inline unsigned char unilbrkprop_lookup (ucs4_t uc) { unsigned int index1 = uc >> lbrkprop_header_0; if (index1 < lbrkprop_header_1) { int lookup1 = unilbrkprop.level1[index1]; if (lookup1 >= 0) { unsigned int index2 = (uc >> lbrkprop_header_2) & lbrkprop_header_3; int lookup2 = unilbrkprop.level2[lookup1 + index2]; if (lookup2 >= 0) { unsigned int index3 = uc & lbrkprop_header_4; return unilbrkprop.level3[lookup2 + index3]; } } } return LBP_XX; } /* Table indexed by two line breaking classifications. */ #define D 1 /* direct break opportunity, empty in table 7.3 of UTR #14 */ #define I 2 /* indirect break opportunity, '%' in table 7.3 of UTR #14 */ #define P 3 /* prohibited break, '^' in table 7.3 of UTR #14 */ extern const unsigned char unilbrk_table[27][27]; /* We don't support line breaking of complex-context dependent characters (Thai, Lao, Myanmar, Khmer) yet, because it requires dictionary lookup. */ pspp-1.0.1/gl/unilbrk/lbrkprop1.h0000644000175000017500000000224313020461275013552 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Line breaking properties of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ /* Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #define lbrkprop_header_0 16 #define lbrkprop_header_1 15 #define lbrkprop_header_2 7 #define lbrkprop_header_3 511 #define lbrkprop_header_4 127 typedef struct { int level1[15]; int level2[4 << 9]; unsigned char level3[206 << 7]; } lbrkprop_t; extern const lbrkprop_t unilbrkprop; pspp-1.0.1/gl/unilbrk/u8-possible-linebreaks.c0000644000175000017500000001645713124536243016137 00000000000000/* Line breaking of UTF-8 strings. Copyright (C) 2001-2003, 2006-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #include /* Specification. */ #include "unilbrk.h" #include #include #include "unilbrk/lbrktables.h" #include "uniwidth/cjk.h" #include "unistr.h" void u8_possible_linebreaks (const uint8_t *s, size_t n, const char *encoding, char *p) { int LBP_AI_REPLACEMENT = (is_cjk_encoding (encoding) ? LBP_ID : LBP_AL); const uint8_t *s_end = s + n; int last_prop = LBP_BK; /* line break property of last non-space character */ char *seen_space = NULL; /* Was a space seen after the last non-space character? */ char *seen_space2 = NULL; /* At least two spaces after the last non-space? */ /* Don't break inside multibyte characters. */ memset (p, UC_BREAK_PROHIBITED, n); while (s < s_end) { ucs4_t uc; int count = u8_mbtouc_unsafe (&uc, s, s_end - s); int prop = unilbrkprop_lookup (uc); if (prop == LBP_BK) { /* Mandatory break. */ *p = UC_BREAK_MANDATORY; last_prop = LBP_BK; seen_space = NULL; seen_space2 = NULL; } else { char *q; /* Resolve property values whose behaviour is not fixed. */ switch (prop) { case LBP_AI: /* Resolve ambiguous. */ prop = LBP_AI_REPLACEMENT; break; case LBP_CB: /* This is arbitrary. */ prop = LBP_ID; break; case LBP_SA: /* We don't handle complex scripts yet. Treat LBP_SA like LBP_XX. */ case LBP_XX: /* This is arbitrary. */ prop = LBP_AL; break; } /* Deal with spaces and combining characters. */ q = p; if (prop == LBP_SP) { /* Don't break just before a space. */ *p = UC_BREAK_PROHIBITED; seen_space2 = seen_space; seen_space = p; } else if (prop == LBP_ZW) { /* Don't break just before a zero-width space. */ *p = UC_BREAK_PROHIBITED; last_prop = LBP_ZW; seen_space = NULL; seen_space2 = NULL; } else if (prop == LBP_CM) { /* Don't break just before a combining character, except immediately after a zero-width space. */ if (last_prop == LBP_ZW) { /* Break after zero-width space. */ *p = UC_BREAK_POSSIBLE; /* A combining character turns a preceding space into LBP_ID. */ last_prop = LBP_ID; } else { *p = UC_BREAK_PROHIBITED; /* A combining character turns a preceding space into LBP_ID. */ if (seen_space != NULL) { q = seen_space; seen_space = seen_space2; prop = LBP_ID; goto lookup_via_table; } } } else { lookup_via_table: /* prop must be usable as an index for table 7.3 of UTR #14. */ if (!(prop >= 0 && prop < sizeof (unilbrk_table) / sizeof (unilbrk_table[0]))) abort (); if (last_prop == LBP_BK) { /* Don't break at the beginning of a line. */ *q = UC_BREAK_PROHIBITED; } else if (last_prop == LBP_ZW) { /* Break after zero-width space. */ *q = UC_BREAK_POSSIBLE; } else { switch (unilbrk_table [last_prop] [prop]) { case D: *q = UC_BREAK_POSSIBLE; break; case I: *q = (seen_space != NULL ? UC_BREAK_POSSIBLE : UC_BREAK_PROHIBITED); break; case P: *q = UC_BREAK_PROHIBITED; break; default: abort (); } } last_prop = prop; seen_space = NULL; seen_space2 = NULL; } } s += count; p += count; } } #ifdef TEST #include #include /* Read the contents of an input stream, and return it, terminated with a NUL byte. */ char * read_file (FILE *stream) { #define BUFSIZE 4096 char *buf = NULL; int alloc = 0; int size = 0; int count; while (! feof (stream)) { if (size + BUFSIZE > alloc) { alloc = alloc + alloc / 2; if (alloc < size + BUFSIZE) alloc = size + BUFSIZE; buf = realloc (buf, alloc); if (buf == NULL) { fprintf (stderr, "out of memory\n"); exit (1); } } count = fread (buf + size, 1, BUFSIZE, stream); if (count == 0) { if (ferror (stream)) { perror ("fread"); exit (1); } } else size += count; } buf = realloc (buf, size + 1); if (buf == NULL) { fprintf (stderr, "out of memory\n"); exit (1); } buf[size] = '\0'; return buf; #undef BUFSIZE } int main (int argc, char * argv[]) { if (argc == 1) { /* Display all the break opportunities in the input string. */ char *input = read_file (stdin); int length = strlen (input); char *breaks = malloc (length); int i; u8_possible_linebreaks ((uint8_t *) input, length, "UTF-8", breaks); for (i = 0; i < length; i++) { switch (breaks[i]) { case UC_BREAK_POSSIBLE: /* U+2027 in UTF-8 encoding */ putc (0xe2, stdout); putc (0x80, stdout); putc (0xa7, stdout); break; case UC_BREAK_MANDATORY: /* U+21B2 (or U+21B5) in UTF-8 encoding */ putc (0xe2, stdout); putc (0x86, stdout); putc (0xb2, stdout); break; case UC_BREAK_PROHIBITED: break; default: abort (); } putc (input[i], stdout); } free (breaks); return 0; } else return 1; } #endif /* TEST */ pspp-1.0.1/gl/unilbrk/lbrkprop2.h0000644000175000017500000072564413020461275013574 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Line breaking properties of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ /* Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ const lbrkprop_t unilbrkprop = { { 0, 512, 1024, 1024, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1536 }, { 0, 128, 256, 256, 256, 384, 512, 640, 256, 768, 896, 1024, 1152, 1280, 1408, 1536, 1664, 1792, 1920, 2048, 2176, 2304, 2432, 2560, 2688, 2816, 2944, 3072, 3200, 3328, 3456, 3584, 3712, 3840, 3968, 4096, 4224, 4352, 4480, 4608, 4736, 256, 256, 256, 256, 4864, 4992, 5120, 5248, 5376, 5504, 5632, 5760, 5888, 6016, 6144, 6272, 6400, 256, 6528, 256, 256, 6656, 6784, 6912, 7040, 7168, 7296, 7424, 7552, 7680, 7808, 7936, 8064, 8192, 8320, 8448, 8576, 8704, 8832, 256, 256, 256, 8960, 256, 256, 9088, 9216, 9344, 9472, 9600, 9728, 9856, 9984, 10112, 10240, 10368, 10496, 10624, 10752, 10880, 11008, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 11136, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 11264, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 11392, 256, 256, 11520, 11648, 256, 11776, 11904, 12032, 12160, 12288, 12416, 12544, 12672, 12800, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13312, 13440, 13568, 13696, 12928, 13056, 13184, 13824, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10112, 10112, 10112, 10112, 13952, 14080, 256, 256, 14208, 14336, 14464, 14592, 14720, 14848, 14976, 15104, 15232, 15360, -1, 15488, 15616, 15744, 256, 15872, 16000, -1, 256, 256, 16128, -1, 16256, 16384, 16512, 16640, 16768, 16896, 17024, 17152, 17280, 17408, -1, -1, 17536, -1, -1, -1, 17664, 17792, 17920, 18048, 18176, 18304, 18432, -1, -1, 18560, -1, 18688, 18816, 18944, 19072, -1, -1, 19200, -1, -1, -1, 19328, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, 256, 256, 256, 256, 256, 256, 19456, 19584, 256, 19712, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, 256, 256, 256, 19840, 19968, 20096, 256, 20224, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, 256, 256, 20352, 20480, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, 256, 256, 256, 20608, 20736, 20864, 20992, -1, -1, -1, -1, -1, -1, 21120, 21248, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21376, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21504, 21632, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, 21760, 21888, 22016, 22144, -1, 22272, -1, 22400, 22528, 22656, 256, 256, 22784, 256, 22912, 256, 256, 256, 256, 23040, 23168, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, 23296, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23424, 23552, -1, -1, 23680, 23808, 23936, 24064, 24192, -1, 10112, 24320, 10112, 24448, 24576, 24704, 24832, 24960, 25088, 25216, 25344, 25472, 25600, 25728, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 10112, 25856, 25984, -1, 26112, 26240, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_BK, LBP_BK, LBP_BK, LBP_BK, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_SP, LBP_EX, LBP_QU, LBP_AL, LBP_PR, LBP_PO, LBP_AL, LBP_QU, LBP_OP, LBP_CP, LBP_AL, LBP_PR, LBP_IS, LBP_HY, LBP_IS, LBP_SY, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_IS, LBP_IS, LBP_AL, LBP_AL, LBP_AL, LBP_EX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_PR, LBP_CP, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_BA, LBP_CL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BK, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_GL, LBP_OP, LBP_PO, LBP_PR, LBP_PR, LBP_PR, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AI, LBP_QU, LBP_AL, LBP_BA, LBP_AL, LBP_AL, LBP_PO, LBP_PR, LBP_AI, LBP_AI, LBP_BB, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_QU, LBP_AI, LBP_AI, LBP_AI, LBP_OP, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_BB, LBP_AI, LBP_AI, LBP_AI, LBP_BB, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AI, LBP_AL, LBP_BB, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_GL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_GL, LBP_GL, LBP_GL, LBP_GL, LBP_GL, LBP_GL, LBP_GL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_IS, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_IS, LBP_BA, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_PR, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_EX, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_HL, LBP_HL, LBP_HL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_PO, LBP_PO, LBP_PO, LBP_IS, LBP_IS, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_EX, LBP_CM, LBP_XX, LBP_EX, LBP_EX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_PO, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_EX, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_IS, LBP_EX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_BA, LBP_BA, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_PO, LBP_PO, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_PO, LBP_AL, LBP_PR, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_PR, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_PR, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_PO, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_PR, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_AL, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_BA, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_XX, LBP_SA, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_XX, LBP_SA, LBP_XX, LBP_XX, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_SA, LBP_XX, LBP_SA, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_SA, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_BB, LBP_BB, LBP_BB, LBP_BB, LBP_AL, LBP_BB, LBP_BB, LBP_GL, LBP_BB, LBP_BB, LBP_BA, LBP_GL, LBP_EX, LBP_EX, LBP_EX, LBP_EX, LBP_EX, LBP_GL, LBP_AL, LBP_EX, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_CM, LBP_AL, LBP_CM, LBP_AL, LBP_CM, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_BB, LBP_BB, LBP_BA, LBP_BB, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_GL, LBP_GL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_BA, LBP_BA, LBP_NS, LBP_SA, LBP_BA, LBP_AL, LBP_BA, LBP_PR, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_EX, LBP_EX, LBP_BA, LBP_BA, LBP_BB, LBP_AL, LBP_EX, LBP_EX, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_GL, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_EX, LBP_EX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_CM, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_BA, LBP_BA, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BB, LBP_AL, LBP_XX, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_GL, LBP_BA, LBP_BA, LBP_BA, LBP_ZW, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_GL, LBP_BA, LBP_BA, LBP_B2, LBP_AI, LBP_AI, LBP_AL, LBP_QU, LBP_QU, LBP_OP, LBP_QU, LBP_QU, LBP_QU, LBP_OP, LBP_QU, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_IN, LBP_IN, LBP_IN, LBP_BA, LBP_BK, LBP_BK, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_GL, LBP_PO, LBP_PO, LBP_PO, LBP_PO, LBP_PO, LBP_PO, LBP_PO, LBP_PO, LBP_AL, LBP_QU, LBP_QU, LBP_AI, LBP_NS, LBP_NS, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_IS, LBP_OP, LBP_CL, LBP_NS, LBP_NS, LBP_NS, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_WJ, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_AI, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PO, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PO, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PO, LBP_PR, LBP_PR, LBP_PO, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_PR, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_PO, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_PO, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_PR, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AI, LBP_PR, LBP_PR, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AI, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_IN, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_AI, LBP_AI, LBP_ID, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AI, LBP_ID, LBP_AI, LBP_AI, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_ID, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_AI, LBP_ID, LBP_ID, LBP_AI, LBP_AI, LBP_AI, LBP_ID, LBP_ID, LBP_AI, LBP_AI, LBP_ID, LBP_AI, LBP_AI, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_ID, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AI, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AI, LBP_AI, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_AL, LBP_EX, LBP_EX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_EX, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_EX, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_QU, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_BA, LBP_OP, LBP_BA, LBP_AL, LBP_AL, LBP_QU, LBP_QU, LBP_AL, LBP_AL, LBP_QU, LBP_QU, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_EX, LBP_AL, LBP_BA, LBP_BA, LBP_AL, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_B2, LBP_B2, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_BA, LBP_BA, LBP_OP, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_BA, LBP_CL, LBP_CL, LBP_ID, LBP_ID, LBP_NS, LBP_ID, LBP_ID, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_ID, LBP_ID, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_NS, LBP_OP, LBP_CL, LBP_CL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_CM, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_NS, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_ID, LBP_NS, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_EX, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_PO, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BB, LBP_BB, LBP_EX, LBP_EX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_BA, LBP_BA, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BB, LBP_AL, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_JL, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H2, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_H3, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_JV, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_JT, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_HL, LBP_CM, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_AL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_XX, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_XX, LBP_HL, LBP_XX, LBP_HL, LBP_HL, LBP_XX, LBP_HL, LBP_HL, LBP_XX, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_HL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CL, LBP_OP, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_PO, LBP_AL, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_IS, LBP_CL, LBP_CL, LBP_IS, LBP_IS, LBP_EX, LBP_EX, LBP_OP, LBP_CL, LBP_IN, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_ID, LBP_ID, LBP_OP, LBP_CL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_CL, LBP_ID, LBP_CL, LBP_XX, LBP_NS, LBP_NS, LBP_EX, LBP_EX, LBP_ID, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_ID, LBP_PR, LBP_PO, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_WJ, LBP_XX, LBP_EX, LBP_ID, LBP_ID, LBP_PR, LBP_PO, LBP_ID, LBP_ID, LBP_OP, LBP_CL, LBP_ID, LBP_ID, LBP_CL, LBP_ID, LBP_CL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_NS, LBP_NS, LBP_ID, LBP_ID, LBP_ID, LBP_EX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_OP, LBP_ID, LBP_CL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_OP, LBP_ID, LBP_CL, LBP_ID, LBP_OP, LBP_CL, LBP_CL, LBP_OP, LBP_CL, LBP_CL, LBP_NS, LBP_AL, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_NS, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_NS, LBP_NS, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_PO, LBP_PR, LBP_ID, LBP_ID, LBP_ID, LBP_PR, LBP_PR, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CB, LBP_AI, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_BA, LBP_BA, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_IN, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_BB, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_BA, LBP_AL, LBP_BA, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_BB, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_BA, LBP_AL, LBP_BA, LBP_BA, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_CM, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BB, LBP_BA, LBP_BA, LBP_EX, LBP_EX, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_SA, LBP_SA, LBP_BA, LBP_BA, LBP_BA, LBP_SA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_OP, LBP_OP, LBP_CL, LBP_CL, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_OP, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_OP, LBP_CL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_BA, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_BA, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_CM, LBP_CM, LBP_BA, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_NU, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_AL, LBP_AL, LBP_BA, LBP_BA, LBP_BA, LBP_BA, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_XX, LBP_XX, LBP_XX, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_XX, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_AI, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_RI, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_ID, LBP_AL, LBP_ID, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_ID, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_QU, LBP_QU, LBP_QU, LBP_NS, LBP_NS, LBP_NS, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_AL, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_ID, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_CM, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX, LBP_XX } }; pspp-1.0.1/gl/unilbrk/lbrktables.c0000644000175000017500000001016713124536243013765 00000000000000/* Line breaking auxiliary tables. Copyright (C) 2001-2003, 2006-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #include /* Specification. */ #include "unilbrk/lbrktables.h" /* Define unilbrkprop, table of line breaking properties. */ #include "unilbrk/lbrkprop2.h" const unsigned char unilbrk_table[27][27] = { /* after */ /* WJ GL B2 BA BB HY CL CP EX IN NS OP QU IS NU PO PR SY AL H2 H3 ID JL JV JT HL RI */ /* WJ */ { P, I, I, I, I, I, P, P, P, I, I, I, I, P, I, I, I, P, I, I, I, I, I, I, I, I, I, }, /* GL */ { P, I, I, I, I, I, P, P, P, I, I, I, I, P, I, I, I, P, I, I, I, I, I, I, I, I, I, }, /* B2 */ { P, I, P, I, D, I, P, P, P, D, I, D, I, P, D, D, D, P, D, D, D, D, D, D, D, D, D, }, /* BA */ { P, D, D, I, D, I, P, P, P, D, I, D, I, P, D, D, D, P, D, D, D, D, D, D, D, D, D, }, /* BB */ { P, I, I, I, I, I, P, P, P, I, I, I, I, P, I, I, I, P, I, I, I, I, I, I, I, I, I, }, /* HY */ { P, D, D, I, D, I, P, P, P, D, I, D, I, P, I, D, D, P, D, D, D, D, D, D, D, D, D, }, /* CL */ { P, I, D, I, D, I, P, P, P, D, P, D, I, P, D, I, I, P, D, D, D, D, D, D, D, D, D, }, /* CP */ { P, I, D, I, D, I, P, P, P, D, P, D, I, P, I, I, I, P, I, D, D, D, D, D, D, I, D, }, /* EX */ { P, I, D, I, D, I, P, P, P, I, I, D, I, P, D, D, D, P, D, D, D, D, D, D, D, D, D, }, /* IN */ { P, I, D, I, D, I, P, P, P, I, I, D, I, P, D, D, D, P, D, D, D, D, D, D, D, D, D, }, /* NS */ { P, I, D, I, D, I, P, P, P, D, I, D, I, P, D, D, D, P, D, D, D, D, D, D, D, D, D, }, /* OP */ { P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, P, }, /* QU */ { P, I, I, I, I, I, P, P, P, I, I, P, I, P, I, I, I, P, I, I, I, I, I, I, I, I, I, }, /* IS */ { P, I, D, I, D, I, P, P, P, D, I, D, I, P, I, D, D, P, D, D, D, D, D, D, D, D, D, }, /* NU */ { P, I, D, I, D, I, P, P, P, I, I, I, I, P, I, I, I, P, I, D, D, D, D, D, D, I, D, }, /* PO */ { P, I, D, I, D, I, P, P, P, D, I, I, I, P, I, D, D, P, I, D, D, D, D, D, D, I, D, }, /* PR */ { P, I, D, I, D, I, P, P, P, D, I, I, I, P, I, D, D, P, I, I, I, I, I, I, I, I, D, }, /* SY */ { P, I, D, I, D, I, P, P, P, D, I, D, I, P, I, D, D, P, D, D, D, D, D, D, D, I, D, }, /* AL */ { P, I, D, I, D, I, P, P, P, I, I, I, I, P, I, D, D, P, I, D, D, D, D, D, D, I, D, }, /* H2 */ { P, I, D, I, D, I, P, P, P, I, I, D, I, P, D, I, D, P, D, D, D, D, D, I, I, D, D, }, /* H3 */ { P, I, D, I, D, I, P, P, P, I, I, D, I, P, D, I, D, P, D, D, D, D, D, D, I, D, D, }, /* ID */ { P, I, D, I, D, I, P, P, P, I, I, D, I, P, D, I, D, P, D, D, D, D, D, D, D, D, D, }, /* JL */ { P, I, D, I, D, I, P, P, P, I, I, D, I, P, D, I, D, P, D, I, I, D, I, I, D, D, D, }, /* JV */ { P, I, D, I, D, I, P, P, P, I, I, D, I, P, D, I, D, P, D, D, D, D, D, I, I, D, D, }, /* JT */ { P, I, D, I, D, I, P, P, P, I, I, D, I, P, D, I, D, P, D, D, D, D, D, D, I, D, D, }, /* HL */ { P, I, D, I, D, I, P, P, P, I, I, I, I, P, I, D, D, P, I, D, D, D, D, D, D, I, D, }, /* RI */ { P, I, D, I, D, I, P, P, P, D, I, D, I, P, D, D, D, P, D, D, D, D, D, D, I, D, I, }, /* "" */ /* before */ }; /* Note: The (IS,AL) entry has been changed from I to D. In other words, the rule "Do not break between numeric punctuation and alphabetics" is not implemented here. We want to break before the HTML tag in strings like "

Some sentence.

" */ /* Note: The (B2,B2) entry should probably be D instead of P. */ /* Note: The (PR,ID) entry should probably be D instead of I. */ /* Note: The (WJ,*) and (GL,*) entries should probably be P instead of I. */ pspp-1.0.1/gl/c++defs.h0000644000175000017500000003412513124536241011407 00000000000000/* C++ compatible function declaration macros. Copyright (C) 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _GL_CXXDEFS_H #define _GL_CXXDEFS_H /* Begin/end the GNULIB_NAMESPACE namespace. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { # define _GL_END_NAMESPACE } #else # define _GL_BEGIN_NAMESPACE # define _GL_END_NAMESPACE #endif /* The three most frequent use cases of these macros are: * For providing a substitute for a function that is missing on some platforms, but is declared and works fine on the platforms on which it exists: #if @GNULIB_FOO@ # if !@HAVE_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on all platforms, but is broken/insufficient and needs to be replaced on some platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on some platforms but is broken/insufficient and needs to be replaced on some of them and is additionally either missing or undeclared on some other platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif */ /* _GL_EXTERN_C declaration; performs the declaration with C linkage. */ #if defined __cplusplus # define _GL_EXTERN_C extern "C" #else # define _GL_EXTERN_C extern #endif /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); declares a replacement function, named rpl_func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype rpl_func parameters_and_attributes /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); declares the system function, named func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype func parameters_and_attributes /* _GL_CXXALIAS_RPL (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to rpl_func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); Wrapping rpl_func in an object with an inline conversion operator avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is actually used in the program. */ #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ \ inline operator type () const \ { \ return ::rpl_func; \ } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ \ inline operator type () const \ { \ return reinterpret_cast(::rpl_func); \ } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); Wrapping func in an object with an inline conversion operator avoids a reference to func unless GNULIB_NAMESPACE::func is actually used in the program. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ \ inline operator type () const \ { \ return ::func; \ } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ \ inline operator type () const \ { \ return reinterpret_cast(::func); \ } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function is picked among a set of overloaded functions, namely the one with rettype2 and parameters2. Two consecutive casts are used to silence the "cannot find a match" and "invalid conversion" errors that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* The outer cast must be a reinterpret_cast. The inner cast: When the function is defined as a set of overloaded functions, it works as a static_cast<>, choosing the designated variant. When the function is defined as a single variant, it works as a reinterpret_cast<>. The parenthesized cast syntax works both ways. */ # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ namespace GNULIB_NAMESPACE \ { \ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ \ inline operator type () const \ { \ return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN (func); causes a warning to be emitted when ::func is used but not when GNULIB_NAMESPACE::func is used. func must be defined without overloaded variants. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN(func) \ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) # define _GL_CXXALIASWARN_1(func,namespace) \ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN_2(func,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN(func) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); causes a warning to be emitted when the given overloaded variant of ::func is used but not when GNULIB_NAMESPACE::func is used. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ GNULIB_NAMESPACE) # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif #endif /* _GL_CXXDEFS_H */ pspp-1.0.1/gl/uniwidth.in.h0000644000175000017500000000411113124536243012427 00000000000000/* Display width functions. Copyright (C) 2001-2002, 2005, 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _UNIWIDTH_H #define _UNIWIDTH_H #include "unitypes.h" /* Get size_t. */ #include /* Get locale_charset() declaration. */ #include "localcharset.h" #ifdef __cplusplus extern "C" { #endif /* Display width. */ /* These functions are locale dependent. The encoding argument identifies the encoding (e.g. "ISO-8859-2" for Polish). */ /* Determine number of column positions required for UC. */ extern int uc_width (ucs4_t uc, const char *encoding) _UC_ATTRIBUTE_PURE; /* Determine number of column positions required for first N units (or fewer if S ends before this) in S. */ extern int u8_width (const uint8_t *s, size_t n, const char *encoding) _UC_ATTRIBUTE_PURE; extern int u16_width (const uint16_t *s, size_t n, const char *encoding) _UC_ATTRIBUTE_PURE; extern int u32_width (const uint32_t *s, size_t n, const char *encoding) _UC_ATTRIBUTE_PURE; /* Determine number of column positions required for S. */ extern int u8_strwidth (const uint8_t *s, const char *encoding) _UC_ATTRIBUTE_PURE; extern int u16_strwidth (const uint16_t *s, const char *encoding) _UC_ATTRIBUTE_PURE; extern int u32_strwidth (const uint32_t *s, const char *encoding) _UC_ATTRIBUTE_PURE; #ifdef __cplusplus } #endif #endif /* _UNIWIDTH_H */ pspp-1.0.1/gl/c-ctype.h0000644000175000017500000002240613124536241011540 00000000000000/* Character handling in C locale. These functions work like the corresponding functions in , except that they have the C (POSIX) locale hardwired, whereas the functions' behaviour depends on the current locale set via setlocale. Copyright (C) 2000-2003, 2006, 2008-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef C_CTYPE_H #define C_CTYPE_H #include #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef C_CTYPE_INLINE # define C_CTYPE_INLINE _GL_INLINE #endif #ifdef __cplusplus extern "C" { #endif /* The functions defined in this file assume the "C" locale and a character set without diacritics (ASCII-US or EBCDIC-US or something like that). Even if the "C" locale on a particular system is an extension of the ASCII character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it is ISO-8859-1), the functions in this file recognize only the ASCII characters. */ #if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) /* The character set is ASCII or one of its variants or extensions, not EBCDIC. Testing the value of '\n' and '\r' is not relevant. */ # define C_CTYPE_ASCII 1 #elif ! (' ' == '\x40' && '0' == '\xf0' \ && 'A' == '\xc1' && 'J' == '\xd1' && 'S' == '\xe2' \ && 'a' == '\x81' && 'j' == '\x91' && 's' == '\xa2') # error "Only ASCII and EBCDIC are supported" #endif #if 'A' < 0 # error "EBCDIC and char is signed -- not supported" #endif /* Cases for control characters. */ #define _C_CTYPE_CNTRL \ case '\a': case '\b': case '\f': case '\n': \ case '\r': case '\t': case '\v': \ _C_CTYPE_OTHER_CNTRL /* ASCII control characters other than those with \-letter escapes. */ #if C_CTYPE_ASCII # define _C_CTYPE_OTHER_CNTRL \ case '\x00': case '\x01': case '\x02': case '\x03': \ case '\x04': case '\x05': case '\x06': case '\x0e': \ case '\x0f': case '\x10': case '\x11': case '\x12': \ case '\x13': case '\x14': case '\x15': case '\x16': \ case '\x17': case '\x18': case '\x19': case '\x1a': \ case '\x1b': case '\x1c': case '\x1d': case '\x1e': \ case '\x1f': case '\x7f' #else /* Use EBCDIC code page 1047's assignments for ASCII control chars; assume all EBCDIC code pages agree about these assignments. */ # define _C_CTYPE_OTHER_CNTRL \ case '\x00': case '\x01': case '\x02': case '\x03': \ case '\x07': case '\x0e': case '\x0f': case '\x10': \ case '\x11': case '\x12': case '\x13': case '\x18': \ case '\x19': case '\x1c': case '\x1d': case '\x1e': \ case '\x1f': case '\x26': case '\x27': case '\x2d': \ case '\x2e': case '\x32': case '\x37': case '\x3c': \ case '\x3d': case '\x3f' #endif /* Cases for lowercase hex letters, and lowercase letters, all offset by N. */ #define _C_CTYPE_LOWER_A_THRU_F_N(N) \ case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \ case 'e' + (N): case 'f' + (N) #define _C_CTYPE_LOWER_N(N) \ _C_CTYPE_LOWER_A_THRU_F_N(N): \ case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \ case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \ case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \ case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \ case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N) /* Cases for hex letters, digits, lower, punct, and upper. */ #define _C_CTYPE_A_THRU_F \ _C_CTYPE_LOWER_A_THRU_F_N (0): \ _C_CTYPE_LOWER_A_THRU_F_N ('A' - 'a') #define _C_CTYPE_DIGIT \ case '0': case '1': case '2': case '3': \ case '4': case '5': case '6': case '7': \ case '8': case '9' #define _C_CTYPE_LOWER _C_CTYPE_LOWER_N (0) #define _C_CTYPE_PUNCT \ case '!': case '"': case '#': case '$': \ case '%': case '&': case '\'': case '(': \ case ')': case '*': case '+': case ',': \ case '-': case '.': case '/': case ':': \ case ';': case '<': case '=': case '>': \ case '?': case '@': case '[': case '\\': \ case ']': case '^': case '_': case '`': \ case '{': case '|': case '}': case '~' #define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a') /* Function definitions. */ /* Unlike the functions in , which require an argument in the range of the 'unsigned char' type, the functions here operate on values that are in the 'unsigned char' range or in the 'char' range. In other words, when you have a 'char' value, you need to cast it before using it as argument to a function: const char *s = ...; if (isalpha ((unsigned char) *s)) ... but you don't need to cast it for the functions defined in this file: const char *s = ...; if (c_isalpha (*s)) ... */ C_CTYPE_INLINE bool c_isalnum (int c) { switch (c) { _C_CTYPE_DIGIT: _C_CTYPE_LOWER: _C_CTYPE_UPPER: return true; default: return false; } } C_CTYPE_INLINE bool c_isalpha (int c) { switch (c) { _C_CTYPE_LOWER: _C_CTYPE_UPPER: return true; default: return false; } } /* The function isascii is not locale dependent. Its use in EBCDIC is questionable. */ C_CTYPE_INLINE bool c_isascii (int c) { switch (c) { case ' ': _C_CTYPE_CNTRL: _C_CTYPE_DIGIT: _C_CTYPE_LOWER: _C_CTYPE_PUNCT: _C_CTYPE_UPPER: return true; default: return false; } } C_CTYPE_INLINE bool c_isblank (int c) { return c == ' ' || c == '\t'; } C_CTYPE_INLINE bool c_iscntrl (int c) { switch (c) { _C_CTYPE_CNTRL: return true; default: return false; } } C_CTYPE_INLINE bool c_isdigit (int c) { switch (c) { _C_CTYPE_DIGIT: return true; default: return false; } } C_CTYPE_INLINE bool c_isgraph (int c) { switch (c) { _C_CTYPE_DIGIT: _C_CTYPE_LOWER: _C_CTYPE_PUNCT: _C_CTYPE_UPPER: return true; default: return false; } } C_CTYPE_INLINE bool c_islower (int c) { switch (c) { _C_CTYPE_LOWER: return true; default: return false; } } C_CTYPE_INLINE bool c_isprint (int c) { switch (c) { case ' ': _C_CTYPE_DIGIT: _C_CTYPE_LOWER: _C_CTYPE_PUNCT: _C_CTYPE_UPPER: return true; default: return false; } } C_CTYPE_INLINE bool c_ispunct (int c) { switch (c) { _C_CTYPE_PUNCT: return true; default: return false; } } C_CTYPE_INLINE bool c_isspace (int c) { switch (c) { case ' ': case '\t': case '\n': case '\v': case '\f': case '\r': return true; default: return false; } } C_CTYPE_INLINE bool c_isupper (int c) { switch (c) { _C_CTYPE_UPPER: return true; default: return false; } } C_CTYPE_INLINE bool c_isxdigit (int c) { switch (c) { _C_CTYPE_DIGIT: _C_CTYPE_A_THRU_F: return true; default: return false; } } C_CTYPE_INLINE int c_tolower (int c) { switch (c) { _C_CTYPE_UPPER: return c - 'A' + 'a'; default: return c; } } C_CTYPE_INLINE int c_toupper (int c) { switch (c) { _C_CTYPE_LOWER: return c - 'a' + 'A'; default: return c; } } #ifdef __cplusplus } #endif _GL_INLINE_HEADER_END #endif /* C_CTYPE_H */ pspp-1.0.1/gl/fatal-signal.h0000644000175000017500000000640313124536241012535 00000000000000/* Emergency actions in case of a fatal signal. Copyright (C) 2003-2004, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 . */ #ifdef __cplusplus extern "C" { #endif /* It is often useful to do some cleanup action when a usually fatal signal terminates the process, like removing a temporary file or killing a subprocess that may be stuck waiting for a device, pipe or network input. Such signals are SIGHUP, SIGINT, SIGPIPE, SIGTERM, and possibly others. The limitation of this facility is that it cannot work for SIGKILL. Signals with a SIG_IGN handler are considered to be non-fatal. The functions in this file assume that when a SIG_IGN handler is installed for a signal, it was installed before any functions in this file were called and it stays so for the whole lifetime of the process. */ /* Register a cleanup function to be executed when a catchable fatal signal occurs. Restrictions for the cleanup function: - The cleanup function can do all kinds of system calls. - It can also access application dependent memory locations and data structures provided they are in a consistent state. One way to ensure this is through block_fatal_signals()/unblock_fatal_signals(), see below. Another - more tricky - way to ensure this is the careful use of 'volatile'. However, - malloc() and similarly complex facilities are not safe to be called because they are not guaranteed to be in a consistent state. - Also, the cleanup function must not block the catchable fatal signals and leave them blocked upon return. The cleanup function is executed asynchronously. It is unspecified whether during its execution the catchable fatal signals are blocked or not. */ extern void at_fatal_signal (void (*function) (void)); /* Sometimes it is necessary to block the usually fatal signals while the data structures being accessed by the cleanup action are being built or reorganized. This is the case, for example, when a temporary file or directory is created through mkstemp() or mkdtemp(), because these functions create the temporary file or directory _before_ returning its name to the application. */ /* Temporarily delay the catchable fatal signals. The signals will be blocked (= delayed) until the next call to unblock_fatal_signals(). If the signals are already blocked, a further call to block_fatal_signals() has no effect. */ extern void block_fatal_signals (void); /* Stop delaying the catchable fatal signals. */ extern void unblock_fatal_signals (void); #ifdef __cplusplus } #endif pspp-1.0.1/gl/stat-w32.h0000644000175000017500000000306013124536241011553 00000000000000/* Core of implementation of fstat and stat for native Windows. Copyright (C) 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _STAT_W32_H #define _STAT_W32_H 1 /* Converts a FILETIME to GMT time since 1970-01-01 00:00:00. */ #if _GL_WINDOWS_STAT_TIMESPEC extern struct timespec _gl_convert_FILETIME_to_timespec (const FILETIME *ft); #else extern time_t _gl_convert_FILETIME_to_POSIX (const FILETIME *ft); #endif /* Fill *BUF with information about the file designated by H. PATH is the file name, if known, otherwise NULL. Return 0 if successful, or -1 with errno set upon failure. */ extern int _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf); /* Bitmasks for st_mode. */ #define S_IREAD_UGO (_S_IREAD | (_S_IREAD >> 3) | (_S_IREAD >> 6)) #define S_IWRITE_UGO (_S_IWRITE | (_S_IWRITE >> 3) | (_S_IWRITE >> 6)) #define S_IEXEC_UGO (_S_IEXEC | (_S_IEXEC >> 3) | (_S_IEXEC >> 6)) #endif /* _STAT_W32_H */ pspp-1.0.1/gl/regexec.c0000644000175000017500000037645513124536243011633 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, Idx n) internal_function; static void match_ctx_clean (re_match_context_t *mctx) internal_function; static void match_ctx_free (re_match_context_t *cache) internal_function; static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node, Idx str_idx, Idx from, Idx to) internal_function; static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) internal_function; static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) internal_function; static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) internal_function; static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) internal_function; static reg_errcode_t re_search_internal (const regex_t *preg, const char *string, Idx length, Idx start, Idx last_start, Idx stop, size_t nmatch, regmatch_t pmatch[], int eflags) internal_function; static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, regoff_t range, struct re_registers *regs, Idx stop, bool ret_len) internal_function; static regoff_t re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length, Idx start, regoff_t range, Idx stop, struct re_registers *regs, bool ret_len) internal_function; static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, int regs_allocated) internal_function; static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) internal_function; static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, Idx *p_match_first) internal_function; static Idx check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, Idx idx) internal_function; static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) internal_function; static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) internal_function; static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) internal_function; static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) internal_function; #ifdef RE_ENABLE_I18N static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) internal_function; static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *cur_dest) internal_function; static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *dest_nodes) internal_function; static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) internal_function; static bool check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) internal_function; static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, Idx from_node, Idx bkref_idx) internal_function; static int check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx node, Idx str_idx, Idx bkref_idx) internal_function; static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) internal_function; static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, const re_node_set *candidates) internal_function; static reg_errcode_t merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, Idx num) internal_function; static re_dfastate_t *find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) internal_function; static re_dfastate_t *transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) internal_function; static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) internal_function; static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) internal_function; #if 0 static re_dfastate_t *transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif #ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) internal_function; static reg_errcode_t get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) internal_function; static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) internal_function; static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, Idx subexp_idx, int type) internal_function; static reg_errcode_t check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, Idx top_str, Idx last_node, Idx last_str, int type) internal_function; static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) internal_function; static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, Idx ex_subexp, int type) internal_function; static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) internal_function; static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type) internal_function; static bool build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) internal_function; #ifdef RE_ENABLE_I18N static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx idx) internal_function; # ifdef _LIBC static unsigned int find_collation_sequence_value (const unsigned char *mbs, size_t name_len) internal_function; # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, bitset_t *states_ch) internal_function; static bool check_node_accept (const re_match_context_t *mctx, const re_token_t *node, Idx idx) internal_function; static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len) internal_function; /* Entry point for POSIX code. */ /* regexec searches for a given pattern, specified by PREG, in the string STRING. If NMATCH is zero or REG_NOSUB was set in the cflags argument to 'regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. EFLAGS specifies "execution flags" which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. We return 0 if we find a match and REG_NOMATCH if not. */ int regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string, size_t nmatch, regmatch_t pmatch[], int eflags) { reg_errcode_t err; Idx start, length; re_dfa_t *dfa = preg->buffer; if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) return REG_BADPAT; if (eflags & REG_STARTEND) { start = pmatch[0].rm_so; length = pmatch[0].rm_eo; } else { start = 0; length = strlen (string); } lock_lock (dfa->lock); if (preg->no_sub) err = re_search_internal (preg, string, length, start, length, length, 0, NULL, eflags); else err = re_search_internal (preg, string, length, start, length, length, nmatch, pmatch, eflags); lock_unlock (dfa->lock); return err != REG_NOERROR; } #ifdef _LIBC # include versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) __typeof__ (__regexec) __compat_regexec; int attribute_compat_text_section __compat_regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string, size_t nmatch, regmatch_t pmatch[], int eflags) { return regexec (preg, string, nmatch, pmatch, eflags & (REG_NOTBOL | REG_NOTEOL)); } compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); # endif #endif /* Entry points for GNU code. */ /* re_match, re_search, re_match_2, re_search_2 The former two functions operate on STRING with length LENGTH, while the later two operate on concatenation of STRING1 and STRING2 with lengths LENGTH1 and LENGTH2, respectively. re_match() matches the compiled pattern in BUFP against the string, starting at index START. re_search() first tries matching at index START, then it tries to match starting from index START + 1, and so on. The last start position tried is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same way as re_match().) The parameter STOP of re_{match,search}_2 specifies that no match exceeding the first STOP characters of the concatenation of the strings should be concerned. If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match and all groups is stored in REGS. (For the "_2" variants, the offsets are computed relative to the concatenation, not relative to the individual strings.) On success, re_match* functions return the length of the match, re_search* return the position of the start of the match. Return value -1 means no match was found and -2 indicates an internal error. */ regoff_t re_match (struct re_pattern_buffer *bufp, const char *string, Idx length, Idx start, struct re_registers *regs) { return re_search_stub (bufp, string, length, start, 0, length, regs, true); } #ifdef _LIBC weak_alias (__re_match, re_match) #endif regoff_t re_search (struct re_pattern_buffer *bufp, const char *string, Idx length, Idx start, regoff_t range, struct re_registers *regs) { return re_search_stub (bufp, string, length, start, range, length, regs, false); } #ifdef _LIBC weak_alias (__re_search, re_search) #endif regoff_t re_match_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, struct re_registers *regs, Idx stop) { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, true); } #ifdef _LIBC weak_alias (__re_match_2, re_match_2) #endif regoff_t re_search_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, regoff_t range, struct re_registers *regs, Idx stop) { return re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, false); } #ifdef _LIBC weak_alias (__re_search_2, re_search_2) #endif static regoff_t internal_function re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, regoff_t range, struct re_registers *regs, Idx stop, bool ret_len) { const char *str; regoff_t rval; Idx len; char *s = NULL; if (BE ((length1 < 0 || length2 < 0 || stop < 0 || INT_ADD_WRAPV (length1, length2, &len)), 0)) return -2; /* Concatenate the strings. */ if (length2 > 0) if (length1 > 0) { s = re_malloc (char, len); if (BE (s == NULL, 0)) return -2; #ifdef _LIBC memcpy (__mempcpy (s, string1, length1), string2, length2); #else memcpy (s, string1, length1); memcpy (s + length1, string2, length2); #endif str = s; } else str = string2; else str = string1; rval = re_search_stub (bufp, str, len, start, range, stop, regs, ret_len); re_free (s); return rval; } /* The parameters have the same meaning as those of re_search. Additional parameters: If RET_LEN is true the length of the match is returned (re_match style); otherwise the position of the match is returned. */ static regoff_t internal_function re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length, Idx start, regoff_t range, Idx stop, struct re_registers *regs, bool ret_len) { reg_errcode_t result; regmatch_t *pmatch; Idx nregs; regoff_t rval; int eflags = 0; re_dfa_t *dfa = bufp->buffer; Idx last_start = start + range; /* Check for out-of-range. */ if (BE (start < 0 || start > length, 0)) return -1; if (BE (length < last_start || (0 <= range && last_start < start), 0)) last_start = length; else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0)) last_start = 0; lock_lock (dfa->lock); eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; /* Compile fastmap if we haven't yet. */ if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate) re_compile_fastmap (bufp); if (BE (bufp->no_sub, 0)) regs = NULL; /* We need at least 1 register. */ if (regs == NULL) nregs = 1; else if (BE (bufp->regs_allocated == REGS_FIXED && regs->num_regs <= bufp->re_nsub, 0)) { nregs = regs->num_regs; if (BE (nregs < 1, 0)) { /* Nothing can be copied to regs. */ regs = NULL; nregs = 1; } } else nregs = bufp->re_nsub + 1; pmatch = re_malloc (regmatch_t, nregs); if (BE (pmatch == NULL, 0)) { rval = -2; goto out; } result = re_search_internal (bufp, string, length, start, last_start, stop, nregs, pmatch, eflags); rval = 0; /* I hope we needn't fill their regs with -1's when no match was found. */ if (result != REG_NOERROR) rval = result == REG_NOMATCH ? -1 : -2; else if (regs != NULL) { /* If caller wants register contents data back, copy them. */ bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, bufp->regs_allocated); if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) rval = -2; } if (BE (rval == 0, 1)) { if (ret_len) { assert (pmatch[0].rm_so == start); rval = pmatch[0].rm_eo - start; } else rval = pmatch[0].rm_so; } re_free (pmatch); out: lock_unlock (dfa->lock); return rval; } static unsigned internal_function re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, int regs_allocated) { int rval = REGS_REALLOCATE; Idx i; Idx need_regs = nregs + 1; /* We need one extra element beyond 'num_regs' for the '-1' marker GNU code uses. */ /* Have the register data arrays been allocated? */ if (regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. */ regs->start = re_malloc (regoff_t, need_regs); if (BE (regs->start == NULL, 0)) return REGS_UNALLOCATED; regs->end = re_malloc (regoff_t, need_regs); if (BE (regs->end == NULL, 0)) { re_free (regs->start); return REGS_UNALLOCATED; } regs->num_regs = need_regs; } else if (regs_allocated == REGS_REALLOCATE) { /* Yes. If we need more elements than were already allocated, reallocate them. If we need fewer, just leave it alone. */ if (BE (need_regs > regs->num_regs, 0)) { regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); regoff_t *new_end; if (BE (new_start == NULL, 0)) return REGS_UNALLOCATED; new_end = re_realloc (regs->end, regoff_t, need_regs); if (BE (new_end == NULL, 0)) { re_free (new_start); return REGS_UNALLOCATED; } regs->start = new_start; regs->end = new_end; regs->num_regs = need_regs; } } else { assert (regs_allocated == REGS_FIXED); /* This function may not be called with REGS_FIXED and nregs too big. */ assert (regs->num_regs >= nregs); rval = REGS_FIXED; } /* Copy the regs. */ for (i = 0; i < nregs; ++i) { regs->start[i] = pmatch[i].rm_so; regs->end[i] = pmatch[i].rm_eo; } for ( ; i < regs->num_regs; ++i) regs->start[i] = regs->end[i] = -1; return rval; } /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated using the malloc library routine, and must each be at least NUM_REGS * sizeof (regoff_t) bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ void re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs, __re_size_t num_regs, regoff_t *starts, regoff_t *ends) { if (num_regs) { bufp->regs_allocated = REGS_REALLOCATE; regs->num_regs = num_regs; regs->start = starts; regs->end = ends; } else { bufp->regs_allocated = REGS_UNALLOCATED; regs->num_regs = 0; regs->start = regs->end = NULL; } } #ifdef _LIBC weak_alias (__re_set_registers, re_set_registers) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC int # ifdef _LIBC weak_function # endif re_exec (const char *s) { return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); } #endif /* _REGEX_RE_COMP */ /* Internal entry point. */ /* Searches for a compiled pattern PREG in the string STRING, whose length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same meaning as with regexec. LAST_START is START + RANGE, where START and RANGE have the same meaning as with re_search. Return REG_NOERROR if we find a match, and REG_NOMATCH if not, otherwise return the error code. Note: We assume front end functions already check ranges. (0 <= LAST_START && LAST_START <= LENGTH) */ static reg_errcode_t __attribute_warn_unused_result__ internal_function re_search_internal (const regex_t *preg, const char *string, Idx length, Idx start, Idx last_start, Idx stop, size_t nmatch, regmatch_t pmatch[], int eflags) { reg_errcode_t err; const re_dfa_t *dfa = preg->buffer; Idx left_lim, right_lim; int incr; bool fl_longest_match; int match_kind; Idx match_first; Idx match_last = -1; Idx extra_nmatch; bool sb; int ch; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) re_match_context_t mctx = { .dfa = dfa }; #else re_match_context_t mctx; #endif char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate && start != last_start && !preg->can_be_null) ? preg->fastmap : NULL); RE_TRANSLATE_TYPE t = preg->translate; #if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) memset (&mctx, '\0', sizeof (re_match_context_t)); mctx.dfa = dfa; #endif extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; nmatch -= extra_nmatch; /* Check if the DFA haven't been compiled. */ if (BE (preg->used == 0 || dfa->init_state == NULL || dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return REG_NOMATCH; #ifdef DEBUG /* We assume front-end functions already check them. */ assert (0 <= last_start && last_start <= length); #endif /* If initial states with non-begbuf contexts have no elements, the regex must be anchored. If preg->newline_anchor is set, we'll never use init_state_nl, so do not check it. */ if (dfa->init_state->nodes.nelem == 0 && dfa->init_state_word->nodes.nelem == 0 && (dfa->init_state_nl->nodes.nelem == 0 || !preg->newline_anchor)) { if (start != 0 && last_start != 0) return REG_NOMATCH; start = last_start = 0; } /* We must check the longest matching, if nmatch > 0. */ fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, preg->translate, (preg->syntax & RE_ICASE) != 0, dfa); if (BE (err != REG_NOERROR, 0)) goto free_return; mctx.input.stop = stop; mctx.input.raw_stop = stop; mctx.input.newline_anchor = preg->newline_anchor; err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); if (BE (err != REG_NOERROR, 0)) goto free_return; /* We will log all the DFA states through which the dfa pass, if nmatch > 1, or this dfa has "multibyte node", which is a back-reference or a node which can accept multibyte character or multi character collating element. */ if (nmatch > 1 || dfa->has_mb_node) { /* Avoid overflow. */ if (BE ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) <= mctx.input.bufs_len), 0)) { err = REG_ESPACE; goto free_return; } mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); if (BE (mctx.state_log == NULL, 0)) { err = REG_ESPACE; goto free_return; } } else mctx.state_log = NULL; match_first = start; mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF; /* Check incrementally whether the input string matches. */ incr = (last_start < start) ? -1 : 1; left_lim = (last_start < start) ? last_start : start; right_lim = (last_start < start) ? start : last_start; sb = dfa->mb_cur_max == 1; match_kind = (fastmap ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) | (start <= last_start ? 2 : 0) | (t != NULL ? 1 : 0)) : 8); for (;; match_first += incr) { err = REG_NOMATCH; if (match_first < left_lim || right_lim < match_first) goto free_return; /* Advance as rapidly as possible through the string, until we find a plausible place to start matching. This may be done with varying efficiency, so there are various possibilities: only the most common of them are specialized, in order to save on code size. We use a switch statement for speed. */ switch (match_kind) { case 8: /* No fastmap. */ break; case 7: /* Fastmap with single-byte translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[t[(unsigned char) string[match_first]]]) ++match_first; goto forward_match_found_start_or_reached_end; case 6: /* Fastmap without translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[(unsigned char) string[match_first]]) ++match_first; forward_match_found_start_or_reached_end: if (BE (match_first == right_lim, 0)) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (!fastmap[t ? t[ch] : ch]) goto free_return; } break; case 4: case 5: /* Fastmap without multi-byte translation, match backwards. */ while (match_first >= left_lim) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (fastmap[t ? t[ch] : ch]) break; --match_first; } if (match_first < left_lim) goto free_return; break; default: /* In this case, we can't determine easily the current byte, since it might be a component byte of a multibyte character. Then we use the constructed buffer instead. */ for (;;) { /* If MATCH_FIRST is out of the valid range, reconstruct the buffers. */ __re_size_t offset = match_first - mctx.input.raw_mbs_idx; if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0)) { err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; offset = match_first - mctx.input.raw_mbs_idx; } /* If MATCH_FIRST is out of the buffer, leave it as '\0'. Note that MATCH_FIRST must not be smaller than 0. */ ch = (match_first >= length ? 0 : re_string_byte_at (&mctx.input, offset)); if (fastmap[ch]) break; match_first += incr; if (match_first < left_lim || match_first > right_lim) { err = REG_NOMATCH; goto free_return; } } break; } /* Reconstruct the buffers so that the matcher can assume that the matching starts from the beginning of the buffer. */ err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; #ifdef RE_ENABLE_I18N /* Don't consider this char as a possible match start if it part, yet isn't the head, of a multibyte character. */ if (!sb && !re_string_first_byte (&mctx.input, 0)) continue; #endif /* It seems to be appropriate one, then use the matcher. */ /* We assume that the matching starts from 0. */ mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; match_last = check_matching (&mctx, fl_longest_match, start <= last_start ? &match_first : NULL); if (match_last != -1) { if (BE (match_last == -2, 0)) { err = REG_ESPACE; goto free_return; } else { mctx.match_last = match_last; if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) { re_dfastate_t *pstate = mctx.state_log[match_last]; mctx.last_node = check_halt_state_context (&mctx, pstate, match_last); } if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) || dfa->nbackref) { err = prune_impossible_nodes (&mctx); if (err == REG_NOERROR) break; if (BE (err != REG_NOMATCH, 0)) goto free_return; match_last = -1; } else break; /* We found a match. */ } } match_ctx_clean (&mctx); } #ifdef DEBUG assert (match_last != -1); assert (err == REG_NOERROR); #endif /* Set pmatch[] if we need. */ if (nmatch > 0) { Idx reg_idx; /* Initialize registers. */ for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; /* Set the points where matching start/end. */ pmatch[0].rm_so = 0; pmatch[0].rm_eo = mctx.match_last; /* FIXME: This function should fail if mctx.match_last exceeds the maximum possible regoff_t value. We need a new error code REG_OVERFLOW. */ if (!preg->no_sub && nmatch > 1) { err = set_regs (preg, &mctx, nmatch, pmatch, dfa->has_plural_match && dfa->nbackref > 0); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* At last, add the offset to each register, since we slid the buffers so that we could assume that the matching starts from 0. */ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so != -1) { #ifdef RE_ENABLE_I18N if (BE (mctx.input.offsets_needed != 0, 0)) { pmatch[reg_idx].rm_so = (pmatch[reg_idx].rm_so == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_so]); pmatch[reg_idx].rm_eo = (pmatch[reg_idx].rm_eo == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_eo]); } #else assert (mctx.input.offsets_needed == 0); #endif pmatch[reg_idx].rm_so += match_first; pmatch[reg_idx].rm_eo += match_first; } for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) { pmatch[nmatch + reg_idx].rm_so = -1; pmatch[nmatch + reg_idx].rm_eo = -1; } if (dfa->subexp_map) for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) if (dfa->subexp_map[reg_idx] != reg_idx) { pmatch[reg_idx + 1].rm_so = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; pmatch[reg_idx + 1].rm_eo = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; } } free_return: re_free (mctx.state_log); if (dfa->nbackref) match_ctx_free (&mctx); re_string_destruct (&mctx.input); return err; } static reg_errcode_t internal_function __attribute_warn_unused_result__ prune_impossible_nodes (re_match_context_t *mctx) { const re_dfa_t *const dfa = mctx->dfa; Idx halt_node, match_last; reg_errcode_t ret; re_dfastate_t **sifted_states; re_dfastate_t **lim_states = NULL; re_sift_context_t sctx; #ifdef DEBUG assert (mctx->state_log != NULL); #endif match_last = mctx->match_last; halt_node = mctx->last_node; /* Avoid overflow. */ if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) <= match_last, 0)) return REG_ESPACE; sifted_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (sifted_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } if (dfa->nbackref) { lim_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (lim_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } while (1) { memset (lim_states, '\0', sizeof (re_dfastate_t *) * (match_last + 1)); sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] != NULL || lim_states[0] != NULL) break; do { --match_last; if (match_last < 0) { ret = REG_NOMATCH; goto free_return; } } while (mctx->state_log[match_last] == NULL || !mctx->state_log[match_last]->halt); halt_node = check_halt_state_context (mctx, mctx->state_log[match_last], match_last); } ret = merge_state_array (dfa, sifted_states, lim_states, match_last + 1); re_free (lim_states); lim_states = NULL; if (BE (ret != REG_NOERROR, 0)) goto free_return; } else { sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] == NULL) { ret = REG_NOMATCH; goto free_return; } } re_free (mctx->state_log); mctx->state_log = sifted_states; sifted_states = NULL; mctx->last_node = halt_node; mctx->match_last = match_last; ret = REG_NOERROR; free_return: re_free (sifted_states); re_free (lim_states); return ret; } /* Acquire an initial state and return it. We must select appropriate initial state depending on the context, since initial states may have constraints like "\<", "^", etc.. */ static inline re_dfastate_t * __attribute__ ((always_inline)) internal_function acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, Idx idx) { const re_dfa_t *const dfa = mctx->dfa; if (dfa->init_state->has_constraint) { unsigned int context; context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return dfa->init_state_word; else if (IS_ORDINARY_CONTEXT (context)) return dfa->init_state; else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) return dfa->init_state_begbuf; else if (IS_NEWLINE_CONTEXT (context)) return dfa->init_state_nl; else if (IS_BEGBUF_CONTEXT (context)) { /* It is relatively rare case, then calculate on demand. */ return re_acquire_state_context (err, dfa, dfa->init_state->entrance_nodes, context); } else /* Must not happen? */ return dfa->init_state; } else return dfa->init_state; } /* Check whether the regular expression match input string INPUT or not, and return the index where the matching end. Return -1 if there is no match, and return -2 in case of an error. FL_LONGEST_MATCH means we want the POSIX longest matching. If P_MATCH_FIRST is not NULL, and the match fails, it is set to the next place where we may want to try matching. Note that the matcher assumes that the matching starts from the current index of the buffer. */ static Idx internal_function __attribute_warn_unused_result__ check_matching (re_match_context_t *mctx, bool fl_longest_match, Idx *p_match_first) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx match = 0; Idx match_last = -1; Idx cur_str_idx = re_string_cur_idx (&mctx->input); re_dfastate_t *cur_state; bool at_init_state = p_match_first != NULL; Idx next_start_idx = cur_str_idx; err = REG_NOERROR; cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); /* An initial state must not be NULL (invalid). */ if (BE (cur_state == NULL, 0)) { assert (err == REG_ESPACE); return -2; } if (mctx->state_log != NULL) { mctx->state_log[cur_str_idx] = cur_state; /* Check OP_OPEN_SUBEXP in the initial state in case that we use them later. E.g. Processing back references. */ if (BE (dfa->nbackref, 0)) { at_init_state = false; err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); if (BE (err != REG_NOERROR, 0)) return err; if (cur_state->has_backref) { err = transit_state_bkref (mctx, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } } } /* If the RE accepts NULL string. */ if (BE (cur_state->halt, 0)) { if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, cur_str_idx)) { if (!fl_longest_match) return cur_str_idx; else { match_last = cur_str_idx; match = 1; } } } while (!re_string_eoi (&mctx->input)) { re_dfastate_t *old_state = cur_state; Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; if ((BE (next_char_idx >= mctx->input.bufs_len, 0) && mctx->input.bufs_len < mctx->input.len) || (BE (next_char_idx >= mctx->input.valid_len, 0) && mctx->input.valid_len < mctx->input.len)) { err = extend_buffers (mctx, next_char_idx + 1); if (BE (err != REG_NOERROR, 0)) { assert (err == REG_ESPACE); return -2; } } cur_state = transit_state (&err, mctx, cur_state); if (mctx->state_log != NULL) cur_state = merge_state_with_log (&err, mctx, cur_state); if (cur_state == NULL) { /* Reached the invalid state or an error. Try to recover a valid state using the state log, if available and if we have not already found a valid (even if not the longest) match. */ if (BE (err != REG_NOERROR, 0)) return -2; if (mctx->state_log == NULL || (match && !fl_longest_match) || (cur_state = find_recover_state (&err, mctx)) == NULL) break; } if (BE (at_init_state, 0)) { if (old_state == cur_state) next_start_idx = next_char_idx; else at_init_state = false; } if (cur_state->halt) { /* Reached a halt state. Check the halt state can satisfy the current context. */ if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, re_string_cur_idx (&mctx->input))) { /* We found an appropriate halt state. */ match_last = re_string_cur_idx (&mctx->input); match = 1; /* We found a match, do not modify match_first below. */ p_match_first = NULL; if (!fl_longest_match) break; } } } if (p_match_first) *p_match_first += next_start_idx; return match_last; } /* Check NODE match the current context. */ static bool internal_function check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) { re_token_type_t type = dfa->nodes[node].type; unsigned int constraint = dfa->nodes[node].constraint; if (type != END_OF_RE) return false; if (!constraint) return true; if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) return false; return true; } /* Check the halt state STATE match the current context. Return 0 if not match, if the node, STATE has, is a halt node and match the context, return the node. */ static Idx internal_function check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, Idx idx) { Idx i; unsigned int context; #ifdef DEBUG assert (state->halt); #endif context = re_string_context_at (&mctx->input, idx, mctx->eflags); for (i = 0; i < state->nodes.nelem; ++i) if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) return state->nodes.elems[i]; return 0; } /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA corresponding to the DFA). Return the destination node, and update EPS_VIA_NODES; return -1 in case of errors. */ static Idx internal_function proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, Idx *pidx, Idx node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) { const re_dfa_t *const dfa = mctx->dfa; Idx i; bool ok; if (IS_EPSILON_NODE (dfa->nodes[node].type)) { re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; re_node_set *edests = &dfa->edests[node]; Idx dest_node; ok = re_node_set_insert (eps_via_nodes, node); if (BE (! ok, 0)) return -2; /* Pick up a valid destination, or return -1 if none is found. */ for (dest_node = -1, i = 0; i < edests->nelem; ++i) { Idx candidate = edests->elems[i]; if (!re_node_set_contains (cur_nodes, candidate)) continue; if (dest_node == -1) dest_node = candidate; else { /* In order to avoid infinite loop like "(a*)*", return the second epsilon-transition if the first was already considered. */ if (re_node_set_contains (eps_via_nodes, dest_node)) return candidate; /* Otherwise, push the second epsilon-transition on the fail stack. */ else if (fs != NULL && push_fail_stack (fs, *pidx, candidate, nregs, regs, eps_via_nodes)) return -2; /* We know we are going to exit. */ break; } } return dest_node; } else { Idx naccepted = 0; re_token_type_t type = dfa->nodes[node].type; #ifdef RE_ENABLE_I18N if (dfa->nodes[node].accept_mb) naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); else #endif /* RE_ENABLE_I18N */ if (type == OP_BACK_REF) { Idx subexp_idx = dfa->nodes[node].opr.idx + 1; naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; if (fs != NULL) { if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) return -1; else if (naccepted) { char *buf = (char *) re_string_get_buffer (&mctx->input); if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, naccepted) != 0) return -1; } } if (naccepted == 0) { Idx dest_node; ok = re_node_set_insert (eps_via_nodes, node); if (BE (! ok, 0)) return -2; dest_node = dfa->edests[node].elems[0]; if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node)) return dest_node; } } if (naccepted != 0 || check_node_accept (mctx, dfa->nodes + node, *pidx)) { Idx dest_node = dfa->nexts[node]; *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node))) return -1; re_node_set_empty (eps_via_nodes); return dest_node; } } return -1; } static reg_errcode_t internal_function __attribute_warn_unused_result__ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { reg_errcode_t err; Idx num = fs->num++; if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) * fs->alloc * 2)); if (new_array == NULL) return REG_ESPACE; fs->alloc *= 2; fs->stack = new_array; } fs->stack[num].idx = str_idx; fs->stack[num].node = dest_node; fs->stack[num].regs = re_malloc (regmatch_t, nregs); if (fs->stack[num].regs == NULL) return REG_ESPACE; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); return err; } static Idx internal_function pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { Idx num = --fs->num; assert (num >= 0); *pidx = fs->stack[num].idx; memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); re_node_set_free (eps_via_nodes); re_free (fs->stack[num].regs); *eps_via_nodes = fs->stack[num].eps_via_nodes; return fs->stack[num].node; } /* Set the positions where the subexpressions are starts/ends to registers PMATCH. Note: We assume that pmatch[0] is already set, and pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) { const re_dfa_t *dfa = preg->buffer; Idx idx, cur_node; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; struct re_fail_stack_t fs_body = { 0, 2, NULL }; regmatch_t *prev_idx_match; bool prev_idx_match_malloced = false; #ifdef DEBUG assert (nmatch > 1); assert (mctx->state_log != NULL); #endif if (fl_backtrack) { fs = &fs_body; fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); if (fs->stack == NULL) return REG_ESPACE; } else fs = NULL; cur_node = dfa->init_node; re_node_set_init_empty (&eps_via_nodes); if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); else { prev_idx_match = re_malloc (regmatch_t, nmatch); if (prev_idx_match == NULL) { free_fail_stack_return (fs); return REG_ESPACE; } prev_idx_match_malloced = true; } memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) { update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) { Idx reg_idx; if (fs) { for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) break; if (reg_idx == nmatch) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); } else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOERROR; } } /* Proceed to next node. */ cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, &eps_via_nodes, fs); if (BE (cur_node < 0, 0)) { if (BE (cur_node == -2, 0)) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); free_fail_stack_return (fs); return REG_ESPACE; } if (fs) cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOMATCH; } } } re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } static reg_errcode_t internal_function free_fail_stack_return (struct re_fail_stack_t *fs) { if (fs) { Idx fs_idx; for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) { re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); re_free (fs->stack[fs_idx].regs); } re_free (fs->stack); } return REG_NOERROR; } static void internal_function update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) { int type = dfa->nodes[cur_node].type; if (type == OP_OPEN_SUBEXP) { Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; /* We are at the first node of this sub expression. */ if (reg_num < nmatch) { pmatch[reg_num].rm_so = cur_idx; pmatch[reg_num].rm_eo = -1; } } else if (type == OP_CLOSE_SUBEXP) { Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { /* We are at the last node of this sub expression. */ if (pmatch[reg_num].rm_so < cur_idx) { pmatch[reg_num].rm_eo = cur_idx; /* This is a non-empty match or we are not inside an optional subexpression. Accept this right away. */ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); } else { if (dfa->nodes[cur_node].opt_subexp && prev_idx_match[reg_num].rm_so != -1) /* We transited through an empty match for an optional subexpression, like (a?)*, and this is not the subexp's first match. Copy back the old content of the registers so that matches of an inner subexpression are undone as well, like in ((a?))*. */ memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); else /* We completed a subexpression, but it may be part of an optional one, so do not update PREV_IDX_MATCH. */ pmatch[reg_num].rm_eo = cur_idx; } } } } /* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 and sift the nodes in each states according to the following rules. Updated state_log will be wrote to STATE_LOG. Rules: We throw away the Node 'a' in the STATE_LOG[STR_IDX] if... 1. When STR_IDX == MATCH_LAST(the last index in the state_log): If 'a' isn't the LAST_NODE and 'a' can't epsilon transit to the LAST_NODE, we throw away the node 'a'. 2. When 0 <= STR_IDX < MATCH_LAST and 'a' accepts string 's' and transit to 'b': i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw away the node 'a'. ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is thrown away, we throw away the node 'a'. 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b': i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the node 'a'. ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, we throw away the node 'a'. */ #define STATE_NODE_CONTAINS(state,node) \ ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) static reg_errcode_t internal_function sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) { reg_errcode_t err; int null_cnt = 0; Idx str_idx = sctx->last_str_idx; re_node_set cur_dest; #ifdef DEBUG assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); #endif /* Build sifted state_log[str_idx]. It has the nodes which can epsilon transit to the last_node and the last_node itself. */ err = re_node_set_init_1 (&cur_dest, sctx->last_node); if (BE (err != REG_NOERROR, 0)) return err; err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; /* Then check each states in the state_log. */ while (str_idx > 0) { /* Update counters. */ null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; if (null_cnt > mctx->max_mb_elem_len) { memset (sctx->sifted_states, '\0', sizeof (re_dfastate_t *) * str_idx); re_node_set_free (&cur_dest); return REG_NOERROR; } re_node_set_empty (&cur_dest); --str_idx; if (mctx->state_log[str_idx]) { err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* Add all the nodes which satisfy the following conditions: - It can epsilon transit to a node in CUR_DEST. - It is in CUR_SRC. And update state_log. */ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } err = REG_NOERROR; free_return: re_node_set_free (&cur_dest); return err; } static reg_errcode_t internal_function __attribute_warn_unused_result__ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *cur_dest) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; Idx i; /* Then build the next sifted state. We build the next sifted state on 'cur_dest', and update 'sifted_states[str_idx]' with 'cur_dest'. Note: 'cur_dest' is the sifted state from 'state_log[str_idx + 1]'. 'cur_src' points the node_set of the old 'state_log[str_idx]' (with the epsilon nodes pre-filtered out). */ for (i = 0; i < cur_src->nelem; i++) { Idx prev_node = cur_src->elems[i]; int naccepted = 0; bool ok; #ifdef DEBUG re_token_type_t type = dfa->nodes[prev_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept "multi byte". */ if (dfa->nodes[prev_node].accept_mb) naccepted = sift_states_iter_mb (mctx, sctx, prev_node, str_idx, sctx->last_str_idx); #endif /* RE_ENABLE_I18N */ /* We don't check backreferences here. See update_cur_sifted_state(). */ if (!naccepted && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], dfa->nexts[prev_node])) naccepted = 1; if (naccepted == 0) continue; if (sctx->limits.nelem) { Idx to_idx = str_idx + naccepted; if (check_dst_limits (mctx, &sctx->limits, dfa->nexts[prev_node], to_idx, prev_node, str_idx)) continue; } ok = re_node_set_insert (cur_dest, prev_node); if (BE (! ok, 0)) return REG_ESPACE; } return REG_NOERROR; } /* Helper functions. */ static reg_errcode_t internal_function clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) { Idx top = mctx->state_log_top; if ((next_state_log_idx >= mctx->input.bufs_len && mctx->input.bufs_len < mctx->input.len) || (next_state_log_idx >= mctx->input.valid_len && mctx->input.valid_len < mctx->input.len)) { reg_errcode_t err; err = extend_buffers (mctx, next_state_log_idx + 1); if (BE (err != REG_NOERROR, 0)) return err; } if (top < next_state_log_idx) { memset (mctx->state_log + top + 1, '\0', sizeof (re_dfastate_t *) * (next_state_log_idx - top)); mctx->state_log_top = next_state_log_idx; } return REG_NOERROR; } static reg_errcode_t internal_function merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, Idx num) { Idx st_idx; reg_errcode_t err; for (st_idx = 0; st_idx < num; ++st_idx) { if (dst[st_idx] == NULL) dst[st_idx] = src[st_idx]; else if (src[st_idx] != NULL) { re_node_set merged_set; err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, &src[st_idx]->nodes); if (BE (err != REG_NOERROR, 0)) return err; dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); re_node_set_free (&merged_set); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } static reg_errcode_t internal_function update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *dest_nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == NULL) ? NULL : &mctx->state_log[str_idx]->nodes); if (dest_nodes->nelem == 0) sctx->sifted_states[str_idx] = NULL; else { if (candidates) { /* At first, add the nodes which can epsilon transit to a node in DEST_NODE. */ err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; /* Then, check the limitations in the current sift_context. */ if (sctx->limits.nelem) { err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, mctx->bkref_ents, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; } if (candidates && mctx->state_log[str_idx]->has_backref) { err = sift_states_bkref (mctx, sctx, str_idx, candidates); if (BE (err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) { reg_errcode_t err = REG_NOERROR; Idx i; re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; if (!state->inveclosure.alloc) { err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < dest_nodes->nelem; i++) { err = re_node_set_merge (&state->inveclosure, dfa->inveclosures + dest_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; } } return re_node_set_add_intersect (dest_nodes, candidates, &state->inveclosure); } static reg_errcode_t internal_function sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, const re_node_set *candidates) { Idx ecl_idx; reg_errcode_t err; re_node_set *inv_eclosure = dfa->inveclosures + node; re_node_set except_nodes; re_node_set_init_empty (&except_nodes); for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { Idx cur_node = inv_eclosure->elems[ecl_idx]; if (cur_node == node) continue; if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) { Idx edst1 = dfa->edests[cur_node].elems[0]; Idx edst2 = ((dfa->edests[cur_node].nelem > 1) ? dfa->edests[cur_node].elems[1] : -1); if ((!re_node_set_contains (inv_eclosure, edst1) && re_node_set_contains (dest_nodes, edst1)) || (edst2 > 0 && !re_node_set_contains (inv_eclosure, edst2) && re_node_set_contains (dest_nodes, edst2))) { err = re_node_set_add_intersect (&except_nodes, candidates, dfa->inveclosures + cur_node); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&except_nodes); return err; } } } } for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { Idx cur_node = inv_eclosure->elems[ecl_idx]; if (!re_node_set_contains (&except_nodes, cur_node)) { Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1; re_node_set_remove_at (dest_nodes, idx); } } re_node_set_free (&except_nodes); return REG_NOERROR; } static bool internal_function check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx lim_idx, src_pos, dst_pos; Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { Idx subexp_idx; struct re_backref_cache_entry *ent; ent = mctx->bkref_ents + limits->elems[lim_idx]; subexp_idx = dfa->nodes[ent->node].opr.idx; dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, dst_node, dst_idx, dst_bkref_idx); src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, src_node, src_idx, src_bkref_idx); /* In case of: ( ) ( ) ( ) */ if (src_pos == dst_pos) continue; /* This is unrelated limitation. */ else return true; } return false; } static int internal_function check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, Idx from_node, Idx bkref_idx) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *eclosures = dfa->eclosures + from_node; Idx node_idx; /* Else, we are on the boundary: examine the nodes on the epsilon closure. */ for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) { Idx node = eclosures->elems[node_idx]; switch (dfa->nodes[node].type) { case OP_BACK_REF: if (bkref_idx != -1) { struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; do { Idx dst; int cpos; if (ent->node != node) continue; if (subexp_idx < BITSET_WORD_BITS && !(ent->eps_reachable_subexps_map & ((bitset_word_t) 1 << subexp_idx))) continue; /* Recurse trying to reach the OP_OPEN_SUBEXP and OP_CLOSE_SUBEXP cases below. But, if the destination node is the same node as the source node, don't recurse because it would cause an infinite loop: a regex that exhibits this behavior is ()\1*\1* */ dst = dfa->edests[node].elems[0]; if (dst == from_node) { if (boundaries & 1) return -1; else /* if (boundaries & 2) */ return 0; } cpos = check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, dst, bkref_idx); if (cpos == -1 /* && (boundaries & 1) */) return -1; if (cpos == 0 && (boundaries & 2)) return 0; if (subexp_idx < BITSET_WORD_BITS) ent->eps_reachable_subexps_map &= ~((bitset_word_t) 1 << subexp_idx); } while (ent++->more); } break; case OP_OPEN_SUBEXP: if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) return -1; break; case OP_CLOSE_SUBEXP: if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) return 0; break; default: break; } } return (boundaries & 2) ? 1 : 0; } static int internal_function check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx from_node, Idx str_idx, Idx bkref_idx) { struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; int boundaries; /* If we are outside the range of the subexpression, return -1 or 1. */ if (str_idx < lim->subexp_from) return -1; if (lim->subexp_to < str_idx) return 1; /* If we are within the subexpression, return 0. */ boundaries = (str_idx == lim->subexp_from); boundaries |= (str_idx == lim->subexp_to) << 1; if (boundaries == 0) return 0; /* Else, examine epsilon closure. */ return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, from_node, bkref_idx); } /* Check the limitations of sub expressions LIMITS, and remove the nodes which are against limitations from DEST_NODES. */ static reg_errcode_t internal_function check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) { reg_errcode_t err; Idx node_idx, lim_idx; for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { Idx subexp_idx; struct re_backref_cache_entry *ent; ent = bkref_ents + limits->elems[lim_idx]; if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) continue; /* This is unrelated limitation. */ subexp_idx = dfa->nodes[ent->node].opr.idx; if (ent->subexp_to == str_idx) { Idx ops_node = -1; Idx cls_node = -1; for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) ops_node = node; else if (type == OP_CLOSE_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) cls_node = node; } /* Check the limitation of the open subexpression. */ /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ if (ops_node >= 0) { err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } /* Check the limitation of the close subexpression. */ if (cls_node >= 0) for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; if (!re_node_set_contains (dfa->inveclosures + node, cls_node) && !re_node_set_contains (dfa->eclosures + node, cls_node)) { /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; --node_idx; } } } else /* (ent->subexp_to != str_idx) */ { for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) { if (subexp_idx != dfa->nodes[node].opr.idx) continue; /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } } } } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, const re_node_set *candidates) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx node_idx, node; re_sift_context_t local_sctx; Idx first_idx = search_cur_bkref_entry (mctx, str_idx); if (first_idx == -1) return REG_NOERROR; local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) { Idx enabled_idx; re_token_type_t type; struct re_backref_cache_entry *entry; node = candidates->elems[node_idx]; type = dfa->nodes[node].type; /* Avoid infinite loop for the REs like "()\1+". */ if (node == sctx->last_node && str_idx == sctx->last_str_idx) continue; if (type != OP_BACK_REF) continue; entry = mctx->bkref_ents + first_idx; enabled_idx = first_idx; do { Idx subexp_len; Idx to_idx; Idx dst_node; bool ok; re_dfastate_t *cur_state; if (entry->node != node) continue; subexp_len = entry->subexp_to - entry->subexp_from; to_idx = str_idx + subexp_len; dst_node = (subexp_len ? dfa->nexts[node] : dfa->edests[node].elems[0]); if (to_idx > sctx->last_str_idx || sctx->sifted_states[to_idx] == NULL || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) || check_dst_limits (mctx, &sctx->limits, node, str_idx, dst_node, to_idx)) continue; if (local_sctx.sifted_states == NULL) { local_sctx = *sctx; err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.last_node = node; local_sctx.last_str_idx = str_idx; ok = re_node_set_insert (&local_sctx.limits, enabled_idx); if (BE (! ok, 0)) { err = REG_ESPACE; goto free_return; } cur_state = local_sctx.sifted_states[str_idx]; err = sift_states_backward (mctx, &local_sctx); if (BE (err != REG_NOERROR, 0)) goto free_return; if (sctx->limited_states != NULL) { err = merge_state_array (dfa, sctx->limited_states, local_sctx.sifted_states, str_idx + 1); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.sifted_states[str_idx] = cur_state; re_node_set_remove (&local_sctx.limits, enabled_idx); /* mctx->bkref_ents may have changed, reload the pointer. */ entry = mctx->bkref_ents + enabled_idx; } while (enabled_idx++, entry++->more); } err = REG_NOERROR; free_return: if (local_sctx.sifted_states != NULL) { re_node_set_free (&local_sctx.limits); } return err; } #ifdef RE_ENABLE_I18N static int internal_function sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) { const re_dfa_t *const dfa = mctx->dfa; int naccepted; /* Check the node can accept "multi byte". */ naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); if (naccepted > 0 && str_idx + naccepted <= max_str_idx && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], dfa->nexts[node_idx])) /* The node can't accept the "multi byte", or the destination was already thrown away, then the node could't accept the current input "multi byte". */ naccepted = 0; /* Otherwise, it is sure that the node could accept 'naccepted' bytes input. */ return naccepted; } #endif /* RE_ENABLE_I18N */ /* Functions for state transition. */ /* Return the next state to which the current state STATE will transit by accepting the current input byte, and update STATE_LOG if necessary. If STATE can accept a multibyte char/collating element/back reference update the destination of STATE_LOG. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { re_dfastate_t **trtable; unsigned char ch; #ifdef RE_ENABLE_I18N /* If the current state can accept multibyte. */ if (BE (state->accept_mb, 0)) { *err = transit_state_mb (mctx, state); if (BE (*err != REG_NOERROR, 0)) return NULL; } #endif /* RE_ENABLE_I18N */ /* Then decide the next state with the single byte. */ #if 0 if (0) /* don't use transition table */ return transit_state_sb (err, mctx, state); #endif /* Use transition table */ ch = re_string_fetch_byte (&mctx->input); for (;;) { trtable = state->trtable; if (BE (trtable != NULL, 1)) return trtable[ch]; trtable = state->word_trtable; if (BE (trtable != NULL, 1)) { unsigned int context; context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return trtable[ch + SBC_MAX]; else return trtable[ch]; } if (!build_trtable (mctx->dfa, state)) { *err = REG_ESPACE; return NULL; } /* Retry, we now have a transition table. */ } } /* Update the state_log if we need */ static re_dfastate_t * internal_function merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) { const re_dfa_t *const dfa = mctx->dfa; Idx cur_idx = re_string_cur_idx (&mctx->input); if (cur_idx > mctx->state_log_top) { mctx->state_log[cur_idx] = next_state; mctx->state_log_top = cur_idx; } else if (mctx->state_log[cur_idx] == 0) { mctx->state_log[cur_idx] = next_state; } else { re_dfastate_t *pstate; unsigned int context; re_node_set next_nodes, *log_nodes, *table_nodes = NULL; /* If (state_log[cur_idx] != 0), it implies that cur_idx is the destination of a multibyte char/collating element/ back reference. Then the next state is the union set of these destinations and the results of the transition table. */ pstate = mctx->state_log[cur_idx]; log_nodes = pstate->entrance_nodes; if (next_state != NULL) { table_nodes = next_state->entrance_nodes; *err = re_node_set_init_union (&next_nodes, table_nodes, log_nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; } else next_nodes = *log_nodes; /* Note: We already add the nodes of the initial state, then we don't need to add them here. */ context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); next_state = mctx->state_log[cur_idx] = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ if (table_nodes != NULL) re_node_set_free (&next_nodes); } if (BE (dfa->nbackref, 0) && next_state != NULL) { /* Check OP_OPEN_SUBEXP in the current state in case that we use them later. We must check them here, since the back references in the next state might use them. */ *err = check_subexp_matching_top (mctx, &next_state->nodes, cur_idx); if (BE (*err != REG_NOERROR, 0)) return NULL; /* If the next state has back references. */ if (next_state->has_backref) { *err = transit_state_bkref (mctx, &next_state->nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; next_state = mctx->state_log[cur_idx]; } } return next_state; } /* Skip bytes in the input that correspond to part of a multi-byte match, then look in the log for a state from which to restart matching. */ static re_dfastate_t * internal_function find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { re_dfastate_t *cur_state; do { Idx max = mctx->state_log_top; Idx cur_str_idx = re_string_cur_idx (&mctx->input); do { if (++cur_str_idx > max) return NULL; re_string_skip_bytes (&mctx->input, 1); } while (mctx->state_log[cur_str_idx] == NULL); cur_state = merge_state_with_log (err, mctx, NULL); } while (*err == REG_NOERROR && cur_state == NULL); return cur_state; } /* Helper functions for transit_state. */ /* From the node set CUR_NODES, pick up the nodes whose types are OP_OPEN_SUBEXP and which have corresponding back references in the regular expression. And register them to use them later for evaluating the corresponding back references. */ static reg_errcode_t internal_function check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx node_idx; reg_errcode_t err; /* TODO: This isn't efficient. Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) { Idx node = cur_nodes->elems[node_idx]; if (dfa->nodes[node].type == OP_OPEN_SUBEXP && dfa->nodes[node].opr.idx < BITSET_WORD_BITS && (dfa->used_bkref_map & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) { err = match_ctx_add_subtop (mctx, node, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } #if 0 /* Return the next state to which the current state STATE will transit by accepting the current input byte. */ static re_dfastate_t * transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { const re_dfa_t *const dfa = mctx->dfa; re_node_set next_nodes; re_dfastate_t *next_state; Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); unsigned int context; *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); if (BE (*err != REG_NOERROR, 0)) return NULL; for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) { Idx cur_node = state->nodes.elems[node_cnt]; if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) { *err = re_node_set_merge (&next_nodes, dfa->eclosures + dfa->nexts[cur_node]); if (BE (*err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return NULL; } } } context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); next_state = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ re_node_set_free (&next_nodes); re_string_skip_bytes (&mctx->input, 1); return next_state; } #endif #ifdef RE_ENABLE_I18N static reg_errcode_t internal_function transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx i; for (i = 0; i < pstate->nodes.nelem; ++i) { re_node_set dest_nodes, *new_nodes; Idx cur_node_idx = pstate->nodes.elems[i]; int naccepted; Idx dest_idx; unsigned int context; re_dfastate_t *dest_state; if (!dfa->nodes[cur_node_idx].accept_mb) continue; if (dfa->nodes[cur_node_idx].constraint) { context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input), mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, context)) continue; } /* How many bytes the node can accept? */ naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, re_string_cur_idx (&mctx->input)); if (naccepted == 0) continue; /* The node can accepts 'naccepted' bytes. */ dest_idx = re_string_cur_idx (&mctx->input) + naccepted; mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted : mctx->max_mb_elem_len); err = clean_state_log_if_needed (mctx, dest_idx); if (BE (err != REG_NOERROR, 0)) return err; #ifdef DEBUG assert (dfa->nexts[cur_node_idx] != -1); #endif new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; dest_state = mctx->state_log[dest_idx]; if (dest_state == NULL) dest_nodes = *new_nodes; else { err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_nodes); if (BE (err != REG_NOERROR, 0)) return err; } context = re_string_context_at (&mctx->input, dest_idx - 1, mctx->eflags); mctx->state_log[dest_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); if (dest_state != NULL) re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ static reg_errcode_t internal_function transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx i; Idx cur_str_idx = re_string_cur_idx (&mctx->input); for (i = 0; i < nodes->nelem; ++i) { Idx dest_str_idx, prev_nelem, bkc_idx; Idx node_idx = nodes->elems[i]; unsigned int context; const re_token_t *node = dfa->nodes + node_idx; re_node_set *new_dest_nodes; /* Check whether 'node' is a backreference or not. */ if (node->type != OP_BACK_REF) continue; if (node->constraint) { context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) continue; } /* 'node' is a backreference. Check the substring which the substring matched. */ bkc_idx = mctx->nbkref_ents; err = get_subexp (mctx, node_idx, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; /* And add the epsilon closures (which is 'new_dest_nodes') of the backreference to appropriate state_log. */ #ifdef DEBUG assert (dfa->nexts[node_idx] != -1); #endif for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) { Idx subexp_len; re_dfastate_t *dest_state; struct re_backref_cache_entry *bkref_ent; bkref_ent = mctx->bkref_ents + bkc_idx; if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) continue; subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; new_dest_nodes = (subexp_len == 0 ? dfa->eclosures + dfa->edests[node_idx].elems[0] : dfa->eclosures + dfa->nexts[node_idx]); dest_str_idx = (cur_str_idx + bkref_ent->subexp_to - bkref_ent->subexp_from); context = re_string_context_at (&mctx->input, dest_str_idx - 1, mctx->eflags); dest_state = mctx->state_log[dest_str_idx]; prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 : mctx->state_log[cur_str_idx]->nodes.nelem); /* Add 'new_dest_node' to state_log. */ if (dest_state == NULL) { mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, new_dest_nodes, context); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } else { re_node_set dest_nodes; err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&dest_nodes); goto free_return; } mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } /* We need to check recursively if the backreference can epsilon transit. */ if (subexp_len == 0 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) { err = check_subexp_matching_top (mctx, new_dest_nodes, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; err = transit_state_bkref (mctx, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) goto free_return; } } } err = REG_NOERROR; free_return: return err; } /* Enumerate all the candidates which the backreference BKREF_NODE can match at BKREF_STR_IDX, and register them by match_ctx_add_entry(). Note that we might collect inappropriate candidates here. However, the cost of checking them strictly here is too high, then we delay these checking for prune_impossible_nodes(). */ static reg_errcode_t internal_function __attribute_warn_unused_result__ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx subexp_num, sub_top_idx; const char *buf = (const char *) re_string_get_buffer (&mctx->input); /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); if (cache_idx != -1) { const struct re_backref_cache_entry *entry = mctx->bkref_ents + cache_idx; do if (entry->node == bkref_node) return REG_NOERROR; /* We already checked it. */ while (entry++->more); } subexp_num = dfa->nodes[bkref_node].opr.idx; /* For each sub expression */ for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) { reg_errcode_t err; re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; re_sub_match_last_t *sub_last; Idx sub_last_idx, sl_str, bkref_str_off; if (dfa->nodes[sub_top->node].opr.idx != subexp_num) continue; /* It isn't related. */ sl_str = sub_top->str_idx; bkref_str_off = bkref_str_idx; /* At first, check the last node of sub expressions we already evaluated. */ for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) { regoff_t sl_str_diff; sub_last = sub_top->lasts[sub_last_idx]; sl_str_diff = sub_last->str_idx - sl_str; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_diff > 0) { if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) { /* Not enough chars for a successful match. */ if (bkref_str_off + sl_str_diff > mctx->input.len) break; err = clean_state_log_if_needed (mctx, bkref_str_off + sl_str_diff); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) /* We don't need to search this sub expression any more. */ break; } bkref_str_off += sl_str_diff; sl_str += sl_str_diff; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); /* Reload buf, since the preceding call might have reallocated the buffer. */ buf = (const char *) re_string_get_buffer (&mctx->input); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; } if (sub_last_idx < sub_top->nlasts) continue; if (sub_last_idx > 0) ++sl_str; /* Then, search for the other last nodes of the sub expression. */ for (; sl_str <= bkref_str_idx; ++sl_str) { Idx cls_node; regoff_t sl_str_off; const re_node_set *nodes; sl_str_off = sl_str - sub_top->str_idx; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_off > 0) { if (BE (bkref_str_off >= mctx->input.valid_len, 0)) { /* If we are at the end of the input, we cannot match. */ if (bkref_str_off >= mctx->input.len) break; err = extend_buffers (mctx, bkref_str_off + 1); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (buf [bkref_str_off++] != buf[sl_str - 1]) break; /* We don't need to search this sub expression any more. */ } if (mctx->state_log[sl_str] == NULL) continue; /* Does this state have a ')' of the sub expression? */ nodes = &mctx->state_log[sl_str]->nodes; cls_node = find_subexp_node (dfa, nodes, subexp_num, OP_CLOSE_SUBEXP); if (cls_node == -1) continue; /* No. */ if (sub_top->path == NULL) { sub_top->path = calloc (sizeof (state_array_t), sl_str - sub_top->str_idx + 1); if (sub_top->path == NULL) return REG_ESPACE; } /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node in the current context? */ err = check_arrival (mctx, sub_top->path, sub_top->node, sub_top->str_idx, cls_node, sl_str, OP_CLOSE_SUBEXP); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); if (BE (sub_last == NULL, 0)) return REG_ESPACE; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); if (err == REG_NOMATCH) continue; } } return REG_NOERROR; } /* Helper functions for get_subexp(). */ /* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. If it can arrive, register the sub expression expressed with SUB_TOP and SUB_LAST. */ static reg_errcode_t internal_function get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) { reg_errcode_t err; Idx to_idx; /* Can the subexpression arrive the back reference? */ err = check_arrival (mctx, &sub_last->path, sub_last->node, sub_last->str_idx, bkref_node, bkref_str, OP_OPEN_SUBEXP); if (err != REG_NOERROR) return err; err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, sub_last->str_idx); if (BE (err != REG_NOERROR, 0)) return err; to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; return clean_state_log_if_needed (mctx, to_idx); } /* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. Search '(' if FL_OPEN, or search ')' otherwise. TODO: This function isn't efficient... Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ static Idx internal_function find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, Idx subexp_idx, int type) { Idx cls_idx; for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) { Idx cls_node = nodes->elems[cls_idx]; const re_token_t *node = dfa->nodes + cls_node; if (node->type == type && node->opr.idx == subexp_idx) return cls_node; } return -1; } /* Check whether the node TOP_NODE at TOP_STR can arrive to the node LAST_NODE at LAST_STR. We record the path onto PATH since it will be heavily reused. Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, Idx top_str, Idx last_node, Idx last_str, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; Idx subexp_num, backup_cur_idx, str_idx, null_cnt; re_dfastate_t *cur_state = NULL; re_node_set *cur_nodes, next_nodes; re_dfastate_t **backup_state_log; unsigned int context; subexp_num = dfa->nodes[top_node].opr.idx; /* Extend the buffer if we need. */ if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) { re_dfastate_t **new_array; Idx old_alloc = path->alloc; Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1; Idx new_alloc; if (BE (IDX_MAX - old_alloc < incr_alloc, 0)) return REG_ESPACE; new_alloc = old_alloc + incr_alloc; if (BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0)) return REG_ESPACE; new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; path->array = new_array; path->alloc = new_alloc; memset (new_array + old_alloc, '\0', sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); } str_idx = path->next_idx ? path->next_idx : top_str; /* Temporary modify MCTX. */ backup_state_log = mctx->state_log; backup_cur_idx = mctx->input.cur_idx; mctx->state_log = path->array; mctx->input.cur_idx = str_idx; /* Setup initial node set. */ context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); if (str_idx == top_str) { err = re_node_set_init_1 (&next_nodes, top_node); if (BE (err != REG_NOERROR, 0)) return err; err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } else { cur_state = mctx->state_log[str_idx]; if (cur_state && cur_state->has_backref) { err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } else re_node_set_init_empty (&next_nodes); } if (str_idx == top_str || (cur_state && cur_state->has_backref)) { if (next_nodes.nelem) { err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; } for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) { re_node_set_empty (&next_nodes); if (mctx->state_log[str_idx + 1]) { err = re_node_set_merge (&next_nodes, &mctx->state_log[str_idx + 1]->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } if (cur_state) { err = check_arrival_add_next_nodes (mctx, str_idx, &cur_state->non_eps_nodes, &next_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } ++str_idx; if (next_nodes.nelem) { err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; null_cnt = cur_state == NULL ? null_cnt + 1 : 0; } re_node_set_free (&next_nodes); cur_nodes = (mctx->state_log[last_str] == NULL ? NULL : &mctx->state_log[last_str]->nodes); path->next_idx = str_idx; /* Fix MCTX. */ mctx->state_log = backup_state_log; mctx->input.cur_idx = backup_cur_idx; /* Then check the current node set has the node LAST_NODE. */ if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) return REG_NOERROR; return REG_NOMATCH; } /* Helper functions for check_arrival. */ /* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them to NEXT_NODES. TODO: This function is similar to the functions transit_state*(), however this function has many additional works. Can't we unify them? */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) { const re_dfa_t *const dfa = mctx->dfa; bool ok; Idx cur_idx; #ifdef RE_ENABLE_I18N reg_errcode_t err = REG_NOERROR; #endif re_node_set union_set; re_node_set_init_empty (&union_set); for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) { int naccepted = 0; Idx cur_node = cur_nodes->elems[cur_idx]; #ifdef DEBUG re_token_type_t type = dfa->nodes[cur_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept "multi byte". */ if (dfa->nodes[cur_node].accept_mb) { naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, str_idx); if (naccepted > 1) { re_dfastate_t *dest_state; Idx next_node = dfa->nexts[cur_node]; Idx next_idx = str_idx + naccepted; dest_state = mctx->state_log[next_idx]; re_node_set_empty (&union_set); if (dest_state) { err = re_node_set_merge (&union_set, &dest_state->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } ok = re_node_set_insert (&union_set, next_node); if (BE (! ok, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } mctx->state_log[next_idx] = re_acquire_state (&err, dfa, &union_set); if (BE (mctx->state_log[next_idx] == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } } #endif /* RE_ENABLE_I18N */ if (naccepted || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) { ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); if (BE (! ok, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } } } re_node_set_free (&union_set); return REG_NOERROR; } /* For all the nodes in CUR_NODES, add the epsilon closures of them to CUR_NODES, however exclude the nodes which are: - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. */ static reg_errcode_t internal_function check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, Idx ex_subexp, int type) { reg_errcode_t err; Idx idx, outside_node; re_node_set new_nodes; #ifdef DEBUG assert (cur_nodes->nelem); #endif err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return err; /* Create a new node set NEW_NODES with the nodes which are epsilon closures of the node in CUR_NODES. */ for (idx = 0; idx < cur_nodes->nelem; ++idx) { Idx cur_node = cur_nodes->elems[idx]; const re_node_set *eclosure = dfa->eclosures + cur_node; outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); if (outside_node == -1) { /* There are no problematic nodes, just merge them. */ err = re_node_set_merge (&new_nodes, eclosure); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } else { /* There are problematic nodes, re-calculate incrementally. */ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, ex_subexp, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } } re_node_set_free (cur_nodes); *cur_nodes = new_nodes; return REG_NOERROR; } /* Helper function for check_arrival_expand_ecl. Check incrementally the epsilon closure of TARGET, and if it isn't problematic append it to DST_NODES. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) { Idx cur_node; for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) { bool ok; if (dfa->nodes[cur_node].type == type && dfa->nodes[cur_node].opr.idx == ex_subexp) { if (type == OP_CLOSE_SUBEXP) { ok = re_node_set_insert (dst_nodes, cur_node); if (BE (! ok, 0)) return REG_ESPACE; } break; } ok = re_node_set_insert (dst_nodes, cur_node); if (BE (! ok, 0)) return REG_ESPACE; if (dfa->edests[cur_node].nelem == 0) break; if (dfa->edests[cur_node].nelem == 2) { reg_errcode_t err; err = check_arrival_expand_ecl_sub (dfa, dst_nodes, dfa->edests[cur_node].elems[1], ex_subexp, type); if (BE (err != REG_NOERROR, 0)) return err; } cur_node = dfa->edests[cur_node].elems[0]; } return REG_NOERROR; } /* For all the back references in the current state, calculate the destination of the back references by the appropriate entry in MCTX->BKREF_ENTS. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); struct re_backref_cache_entry *ent; if (cache_idx_start == -1) return REG_NOERROR; restart: ent = mctx->bkref_ents + cache_idx_start; do { Idx to_idx, next_node; /* Is this entry ENT is appropriate? */ if (!re_node_set_contains (cur_nodes, ent->node)) continue; /* No. */ to_idx = cur_str + ent->subexp_to - ent->subexp_from; /* Calculate the destination of the back reference, and append it to MCTX->STATE_LOG. */ if (to_idx == cur_str) { /* The backreference did epsilon transit, we must re-check all the node in the current state. */ re_node_set new_dests; reg_errcode_t err2, err3; next_node = dfa->edests[ent->node].elems[0]; if (re_node_set_contains (cur_nodes, next_node)) continue; err = re_node_set_init_1 (&new_dests, next_node); err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); err3 = re_node_set_merge (cur_nodes, &new_dests); re_node_set_free (&new_dests); if (BE (err != REG_NOERROR || err2 != REG_NOERROR || err3 != REG_NOERROR, 0)) { err = (err != REG_NOERROR ? err : (err2 != REG_NOERROR ? err2 : err3)); return err; } /* TODO: It is still inefficient... */ goto restart; } else { re_node_set union_set; next_node = dfa->nexts[ent->node]; if (mctx->state_log[to_idx]) { bool ok; if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, next_node)) continue; err = re_node_set_init_copy (&union_set, &mctx->state_log[to_idx]->nodes); ok = re_node_set_insert (&union_set, next_node); if (BE (err != REG_NOERROR || ! ok, 0)) { re_node_set_free (&union_set); err = err != REG_NOERROR ? err : REG_ESPACE; return err; } } else { err = re_node_set_init_1 (&union_set, next_node); if (BE (err != REG_NOERROR, 0)) return err; } mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); re_node_set_free (&union_set); if (BE (mctx->state_log[to_idx] == NULL && err != REG_NOERROR, 0)) return err; } } while (ent++->more); return REG_NOERROR; } /* Build transition table for the state. Return true if successful. */ static bool internal_function build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) { reg_errcode_t err; Idx i, j; int ch; bool need_word_trtable = false; bitset_word_t elem, mask; bool dests_node_malloced = false; bool dest_states_malloced = false; Idx ndests; /* Number of the destination states from 'state'. */ re_dfastate_t **trtable; re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; re_node_set follows, *dests_node; bitset_t *dests_ch; bitset_t acceptable; struct dests_alloc { re_node_set dests_node[SBC_MAX]; bitset_t dests_ch[SBC_MAX]; } *dests_alloc; /* We build DFA states which corresponds to the destination nodes from 'state'. 'dests_node[i]' represents the nodes which i-th destination state contains, and 'dests_ch[i]' represents the characters which i-th destination state accepts. */ if (__libc_use_alloca (sizeof (struct dests_alloc))) dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); else { dests_alloc = re_malloc (struct dests_alloc, 1); if (BE (dests_alloc == NULL, 0)) return false; dests_node_malloced = true; } dests_node = dests_alloc->dests_node; dests_ch = dests_alloc->dests_ch; /* Initialize transition table. */ state->word_trtable = state->trtable = NULL; /* At first, group all nodes belonging to 'state' into several destinations. */ ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); if (BE (ndests <= 0, 0)) { if (dests_node_malloced) free (dests_alloc); /* Return false in case of an error, true otherwise. */ if (ndests == 0) { state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (state->trtable == NULL, 0)) return false; return true; } return false; } err = re_node_set_alloc (&follows, ndests + 1); if (BE (err != REG_NOERROR, 0)) goto out_free; /* Avoid arithmetic overflow in size calculation. */ if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) / (3 * sizeof (re_dfastate_t *))) < ndests), 0)) goto out_free; if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX + ndests * 3 * sizeof (re_dfastate_t *))) dest_states = (re_dfastate_t **) alloca (ndests * 3 * sizeof (re_dfastate_t *)); else { dest_states = (re_dfastate_t **) malloc (ndests * 3 * sizeof (re_dfastate_t *)); if (BE (dest_states == NULL, 0)) { out_free: if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return false; } dest_states_malloced = true; } dest_states_word = dest_states + ndests; dest_states_nl = dest_states_word + ndests; bitset_empty (acceptable); /* Then build the states for all destinations. */ for (i = 0; i < ndests; ++i) { Idx next_node; re_node_set_empty (&follows); /* Merge the follows of this destination states. */ for (j = 0; j < dests_node[i].nelem; ++j) { next_node = dfa->nexts[dests_node[i].elems[j]]; if (next_node != -1) { err = re_node_set_merge (&follows, dfa->eclosures + next_node); if (BE (err != REG_NOERROR, 0)) goto out_free; } } dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) goto out_free; /* If the new state has context constraint, build appropriate states for these contexts. */ if (dest_states[i]->has_constraint) { dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_WORD); if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) goto out_free; if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) need_word_trtable = true; dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_NEWLINE); if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) goto out_free; } else { dest_states_word[i] = dest_states[i]; dest_states_nl[i] = dest_states[i]; } bitset_merge (acceptable, dests_ch[i]); } if (!BE (need_word_trtable, 0)) { /* We don't care about whether the following character is a word character, or we are in a single-byte character set so we can discern by looking at the character code: allocate a 256-entry transition table. */ trtable = state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ if (dfa->word_char[i] & mask) trtable[ch] = dest_states_word[j]; else trtable[ch] = dest_states[j]; } } else { /* We care about whether the following character is a word character, and we are in a multi-byte character set: discern by looking at the character code: build two 256-entry transition tables, one starting at trtable[0] and one starting at trtable[SBC_MAX]. */ trtable = state->word_trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ trtable[ch] = dest_states[j]; trtable[ch + SBC_MAX] = dest_states_word[j]; } } /* new line */ if (bitset_contain (acceptable, NEWLINE_CHAR)) { /* The current state accepts newline character. */ for (j = 0; j < ndests; ++j) if (bitset_contain (dests_ch[j], NEWLINE_CHAR)) { /* k-th destination accepts newline character. */ trtable[NEWLINE_CHAR] = dest_states_nl[j]; if (need_word_trtable) trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j]; /* There must be only one destination which accepts newline. See group_nodes_into_DFAstates. */ break; } } if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return true; } /* Group all nodes belonging to STATE into several destinations. Then for all destinations, set the nodes belonging to the destination to DESTS_NODE[i] and set the characters accepted by the destination to DEST_CH[i]. This function return the number of destinations. */ static Idx internal_function group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *dests_node, bitset_t *dests_ch) { reg_errcode_t err; bool ok; Idx i, j, k; Idx ndests; /* Number of the destinations from 'state'. */ bitset_t accepts; /* Characters a node can accept. */ const re_node_set *cur_nodes = &state->nodes; bitset_empty (accepts); ndests = 0; /* For all the nodes belonging to 'state', */ for (i = 0; i < cur_nodes->nelem; ++i) { re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; /* Enumerate all single byte character this node can accept. */ if (type == CHARACTER) bitset_set (accepts, node->opr.c); else if (type == SIMPLE_BRACKET) { bitset_merge (accepts, node->opr.sbcset); } else if (type == OP_PERIOD) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) bitset_merge (accepts, dfa->sb_char); else #endif bitset_set_all (accepts); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #ifdef RE_ENABLE_I18N else if (type == OP_UTF8_PERIOD) { if (ASCII_CHARS % BITSET_WORD_BITS == 0) memset (accepts, -1, ASCII_CHARS / CHAR_BIT); else bitset_merge (accepts, utf8_sb_map); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #endif else continue; /* Check the 'accepts' and sift the characters which are not match it the context. */ if (constraint) { if (constraint & NEXT_NEWLINE_CONSTRAINT) { bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); bitset_empty (accepts); if (accepts_newline) bitset_set (accepts, NEWLINE_CHAR); else continue; } if (constraint & NEXT_ENDBUF_CONSTRAINT) { bitset_empty (accepts); continue; } if (constraint & NEXT_WORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && !node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= dfa->word_char[j]); if (!any_set) continue; } if (constraint & NEXT_NOTWORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~dfa->word_char[j]); if (!any_set) continue; } } /* Then divide 'accepts' into DFA states, or create a new state. Above, we make sure that accepts is not empty. */ for (j = 0; j < ndests; ++j) { bitset_t intersec; /* Intersection sets, see below. */ bitset_t remains; /* Flags, see below. */ bitset_word_t has_intersec, not_subset, not_consumed; /* Optimization, skip if this state doesn't accept the character. */ if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) continue; /* Enumerate the intersection set of this state and 'accepts'. */ has_intersec = 0; for (k = 0; k < BITSET_WORDS; ++k) has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; /* And skip if the intersection set is empty. */ if (!has_intersec) continue; /* Then check if this state is a subset of 'accepts'. */ not_subset = not_consumed = 0; for (k = 0; k < BITSET_WORDS; ++k) { not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; } /* If this state isn't a subset of 'accepts', create a new group state, which has the 'remains'. */ if (not_subset) { bitset_copy (dests_ch[ndests], remains); bitset_copy (dests_ch[j], intersec); err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; } /* Put the position in the current group. */ ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); if (BE (! ok, 0)) goto error_return; /* If all characters are consumed, go to next node. */ if (!not_consumed) break; } /* Some characters remain, create a new group. */ if (j == ndests) { bitset_copy (dests_ch[ndests], accepts); err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; bitset_empty (accepts); } } return ndests; error_return: for (j = 0; j < ndests; ++j) re_node_set_free (dests_node + j); return -1; } #ifdef RE_ENABLE_I18N /* Check how many bytes the node 'dfa->nodes[node_idx]' accepts. Return the number of the bytes the node accepts. STR_IDX is the current index of the input string. This function handles the nodes which can accept one character, or one collating element like '.', '[a-z]', opposite to the other nodes can only accept one byte. */ # ifdef _LIBC # include # endif static int internal_function check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx str_idx) { const re_token_t *node = dfa->nodes + node_idx; int char_len, elem_len; Idx i; if (BE (node->type == OP_UTF8_PERIOD, 0)) { unsigned char c = re_string_byte_at (input, str_idx), d; if (BE (c < 0xc2, 1)) return 0; if (str_idx + 2 > input->len) return 0; d = re_string_byte_at (input, str_idx + 1); if (c < 0xe0) return (d < 0x80 || d > 0xbf) ? 0 : 2; else if (c < 0xf0) { char_len = 3; if (c == 0xe0 && d < 0xa0) return 0; } else if (c < 0xf8) { char_len = 4; if (c == 0xf0 && d < 0x90) return 0; } else if (c < 0xfc) { char_len = 5; if (c == 0xf8 && d < 0x88) return 0; } else if (c < 0xfe) { char_len = 6; if (c == 0xfc && d < 0x84) return 0; } else return 0; if (str_idx + char_len > input->len) return 0; for (i = 1; i < char_len; ++i) { d = re_string_byte_at (input, str_idx + i); if (d < 0x80 || d > 0xbf) return 0; } return char_len; } char_len = re_string_char_size_at (input, str_idx); if (node->type == OP_PERIOD) { if (char_len <= 1) return 0; /* FIXME: I don't think this if is needed, as both '\n' and '\0' are char_len == 1. */ /* '.' accepts any one character except the following two cases. */ if ((!(dfa->syntax & RE_DOT_NEWLINE) && re_string_byte_at (input, str_idx) == '\n') || ((dfa->syntax & RE_DOT_NOT_NULL) && re_string_byte_at (input, str_idx) == '\0')) return 0; return char_len; } elem_len = re_string_elem_size_at (input, str_idx); if ((elem_len <= 1 && char_len <= 1) || char_len == 0) return 0; if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; # ifdef _LIBC const unsigned char *pin = ((const unsigned char *) re_string_get_buffer (input) + str_idx); Idx j; uint32_t nrules; # endif /* _LIBC */ int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); /* match with multibyte character? */ for (i = 0; i < cset->nmbchars; ++i) if (wc == cset->mbchars[i]) { match_len = char_len; goto check_node_accept_bytes_match; } /* match with character_class? */ for (i = 0; i < cset->nchar_classes; ++i) { wctype_t wt = cset->char_classes[i]; if (__iswctype (wc, wt)) { match_len = char_len; goto check_node_accept_bytes_match; } } # ifdef _LIBC nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { unsigned int in_collseq = 0; const int32_t *table, *indirect; const unsigned char *weights, *extra; const char *collseqwc; /* match with collating_symbol? */ if (cset->ncoll_syms) extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); for (i = 0; i < cset->ncoll_syms; ++i) { const unsigned char *coll_sym = extra + cset->coll_syms[i]; /* Compare the length of input collating element and the length of current collating element. */ if (*coll_sym != elem_len) continue; /* Compare each bytes. */ for (j = 0; j < *coll_sym; j++) if (pin[j] != coll_sym[1 + j]) break; if (j == *coll_sym) { /* Match if every bytes is equal. */ match_len = j; goto check_node_accept_bytes_match; } } if (cset->nranges) { if (elem_len <= char_len) { collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); in_collseq = __collseq_table_lookup (collseqwc, wc); } else in_collseq = find_collation_sequence_value (pin, elem_len); } /* match with range expression? */ /* FIXME: Implement rational ranges here, too. */ for (i = 0; i < cset->nranges; ++i) if (cset->range_starts[i] <= in_collseq && in_collseq <= cset->range_ends[i]) { match_len = elem_len; goto check_node_accept_bytes_match; } /* match with equivalence_class? */ if (cset->nequiv_classes) { const unsigned char *cp = pin; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); int32_t idx = findidx (table, indirect, extra, &cp, elem_len); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { int32_t equiv_class_idx = cset->equiv_classes[i]; size_t weight_len = weights[idx & 0xffffff]; if (weight_len == weights[equiv_class_idx & 0xffffff] && (idx >> 24) == (equiv_class_idx >> 24)) { Idx cnt = 0; idx &= 0xffffff; equiv_class_idx &= 0xffffff; while (cnt <= weight_len && (weights[equiv_class_idx + 1 + cnt] == weights[idx + 1 + cnt])) ++cnt; if (cnt > weight_len) { match_len = elem_len; goto check_node_accept_bytes_match; } } } } } else # endif /* _LIBC */ { /* match with range expression? */ for (i = 0; i < cset->nranges; ++i) { if (cset->range_starts[i] <= wc && wc <= cset->range_ends[i]) { match_len = char_len; goto check_node_accept_bytes_match; } } } check_node_accept_bytes_match: if (!cset->non_match) return match_len; else { if (match_len > 0) return 0; else return (elem_len > char_len) ? elem_len : char_len; } } return 0; } # ifdef _LIBC static unsigned int internal_function find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules == 0) { if (mbs_len == 1) { /* No valid character. Match it as a single byte character. */ const unsigned char *collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); return collseq[mbs[0]]; } return UINT_MAX; } else { int32_t idx; const unsigned char *extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); int32_t extrasize = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; for (idx = 0; idx < extrasize;) { int mbs_cnt; bool found = false; int32_t elem_mbs_len; /* Skip the name of collating element name. */ idx = idx + extra[idx] + 1; elem_mbs_len = extra[idx++]; if (mbs_len == elem_mbs_len) { for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) break; if (mbs_cnt == elem_mbs_len) /* Found the entry. */ found = true; } /* Skip the byte sequence of the collating element. */ idx += elem_mbs_len; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the collation sequence value. */ idx += sizeof (uint32_t); /* Skip the wide char sequence of the collating element. */ idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1); /* If we found the entry, return the sequence value. */ if (found) return *(uint32_t *) (extra + idx); /* Skip the collation sequence value. */ idx += sizeof (uint32_t); } return UINT_MAX; } } # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ /* Check whether the node accepts the byte which is IDX-th byte of the INPUT. */ static bool internal_function check_node_accept (const re_match_context_t *mctx, const re_token_t *node, Idx idx) { unsigned char ch; ch = re_string_byte_at (&mctx->input, idx); switch (node->type) { case CHARACTER: if (node->opr.c != ch) return false; break; case SIMPLE_BRACKET: if (!bitset_contain (node->opr.sbcset, ch)) return false; break; #ifdef RE_ENABLE_I18N case OP_UTF8_PERIOD: if (ch >= ASCII_CHARS) return false; /* FALLTHROUGH */ #endif case OP_PERIOD: if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) return false; break; default: return false; } if (node->constraint) { /* The node has constraints. Check whether the current context satisfies the constraints. */ unsigned int context = re_string_context_at (&mctx->input, idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) return false; } return true; } /* Extend the buffers, if the buffers have run out. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ extend_buffers (re_match_context_t *mctx, int min_len) { reg_errcode_t ret; re_string_t *pstr = &mctx->input; /* Avoid overflow. */ if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2 <= pstr->bufs_len, 0)) return REG_ESPACE; /* Double the lengths of the buffers, but allocate at least MIN_LEN. */ ret = re_string_realloc_buffers (pstr, MAX (min_len, MIN (pstr->len, pstr->bufs_len * 2))); if (BE (ret != REG_NOERROR, 0)) return ret; if (mctx->state_log != NULL) { /* And double the length of state_log. */ /* XXX We have no indication of the size of this buffer. If this allocation fail we have no indication that the state_log array does not have the right size. */ re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, pstr->bufs_len + 1); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->state_log = new_array; } /* Then reconstruct the buffers. */ if (pstr->icase) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (pstr->trans != NULL) re_string_translate_buffer (pstr); } } return REG_NOERROR; } /* Functions for matching context. */ /* Initialize MCTX. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) { mctx->eflags = eflags; mctx->match_last = -1; if (n > 0) { /* Avoid overflow. */ size_t max_object_size = MAX (sizeof (struct re_backref_cache_entry), sizeof (re_sub_match_top_t *)); if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n, 0)) return REG_ESPACE; mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) return REG_ESPACE; } /* Already zero-ed by the caller. else mctx->bkref_ents = NULL; mctx->nbkref_ents = 0; mctx->nsub_tops = 0; */ mctx->abkref_ents = n; mctx->max_mb_elem_len = 1; mctx->asub_tops = n; return REG_NOERROR; } /* Clean the entries which depend on the current input in MCTX. This function must be invoked when the matcher changes the start index of the input, or changes the input string. */ static void internal_function match_ctx_clean (re_match_context_t *mctx) { Idx st_idx; for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) { Idx sl_idx; re_sub_match_top_t *top = mctx->sub_tops[st_idx]; for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) { re_sub_match_last_t *last = top->lasts[sl_idx]; re_free (last->path.array); re_free (last); } re_free (top->lasts); if (top->path) { re_free (top->path->array); re_free (top->path); } free (top); } mctx->nsub_tops = 0; mctx->nbkref_ents = 0; } /* Free all the memory associated with MCTX. */ static void internal_function match_ctx_free (re_match_context_t *mctx) { /* First, free all the memory associated with MCTX->SUB_TOPS. */ match_ctx_clean (mctx); re_free (mctx->sub_tops); re_free (mctx->bkref_ents); } /* Add a new backreference entry to MCTX. Note that we assume that caller never call this function with duplicate entry, and call with STR_IDX which isn't smaller than any existing entry. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, Idx to) { if (mctx->nbkref_ents >= mctx->abkref_ents) { struct re_backref_cache_entry* new_entry; new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, mctx->abkref_ents * 2); if (BE (new_entry == NULL, 0)) { re_free (mctx->bkref_ents); return REG_ESPACE; } mctx->bkref_ents = new_entry; memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); mctx->abkref_ents *= 2; } if (mctx->nbkref_ents > 0 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; mctx->bkref_ents[mctx->nbkref_ents].node = node; mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; /* This is a cache that saves negative results of check_dst_limits_calc_pos. If bit N is clear, means that this entry won't epsilon-transition to an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If it is set, check_dst_limits_calc_pos_1 will recurse and try to find one such node. A backreference does not epsilon-transition unless it is empty, so set to all zeros if FROM != TO. */ mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map = (from == to ? -1 : 0); mctx->bkref_ents[mctx->nbkref_ents++].more = 0; if (mctx->max_mb_elem_len < to - from) mctx->max_mb_elem_len = to - from; return REG_NOERROR; } /* Return the first entry with the same str_idx, or -1 if none is found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ static Idx internal_function search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) { Idx left, right, mid, last; last = right = mctx->nbkref_ents; for (left = 0; left < right;) { mid = (left + right) / 2; if (mctx->bkref_ents[mid].str_idx < str_idx) left = mid + 1; else right = mid; } if (left < last && mctx->bkref_ents[left].str_idx == str_idx) return left; else return -1; } /* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches at STR_IDX. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) { #ifdef DEBUG assert (mctx->sub_tops != NULL); assert (mctx->asub_tops > 0); #endif if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) { Idx new_asub_tops = mctx->asub_tops * 2; re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, re_sub_match_top_t *, new_asub_tops); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->sub_tops = new_array; mctx->asub_tops = new_asub_tops; } mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) return REG_ESPACE; mctx->sub_tops[mctx->nsub_tops]->node = node; mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; return REG_NOERROR; } /* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ static re_sub_match_last_t * internal_function match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) { re_sub_match_last_t *new_entry; if (BE (subtop->nlasts == subtop->alasts, 0)) { Idx new_alasts = 2 * subtop->alasts + 1; re_sub_match_last_t **new_array = re_realloc (subtop->lasts, re_sub_match_last_t *, new_alasts); if (BE (new_array == NULL, 0)) return NULL; subtop->lasts = new_array; subtop->alasts = new_alasts; } new_entry = calloc (1, sizeof (re_sub_match_last_t)); if (BE (new_entry != NULL, 1)) { subtop->lasts[subtop->nlasts] = new_entry; new_entry->node = node; new_entry->str_idx = str_idx; ++subtop->nlasts; } return new_entry; } static void internal_function sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) { sctx->sifted_states = sifted_sts; sctx->limited_states = limited_sts; sctx->last_node = last_node; sctx->last_str_idx = last_str_idx; re_node_set_init_empty (&sctx->limits); } pspp-1.0.1/gl/isfinite.c0000644000175000017500000000276013124536242012003 00000000000000/* Test for finite value (zero, subnormal, or normal, and not infinite or NaN). Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Ben Pfaff , 2007. */ #include #include "isnanf-nolibm.h" #include "isnand-nolibm.h" #include "isnanl-nolibm.h" /* The "cc" compiler on HP-UX 11.11, when optimizing, simplifies the test x - y == 0.0 to x == y, a simplification which is invalid when x and y are Infinity. Disable this optimization. */ #if defined __hpux && !defined __GNUC__ static float zerof; static double zerod; static long double zerol; #else # define zerof 0.f # define zerod 0. # define zerol 0.L #endif int gl_isfinitef (float x) { return !isnanf (x) && x - x == zerof; } int gl_isfinited (double x) { return !isnand (x) && x - x == zerod; } int gl_isfinitel (long double x) { return !isnanl (x) && x - x == zerol; } pspp-1.0.1/gl/inttostr.c0000644000175000017500000000010413020461274012042 00000000000000#define anytostr inttostr #define inttype int #include "anytostr.c" pspp-1.0.1/gl/gl_list.c0000644000175000017500000000012213020461274011611 00000000000000#include #define GL_LIST_INLINE _GL_EXTERN_INLINE #include "gl_list.h" pspp-1.0.1/gl/float.c0000644000175000017500000000250413124536241011271 00000000000000/* Auxiliary definitions for . Copyright (C) 2011-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2011. 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 . */ #include /* Specification. */ #include #if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ const union gl_long_double_union gl_LDBL_MAX = { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } }; #elif defined __i386__ const union gl_long_double_union gl_LDBL_MAX = { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } }; #else /* This declaration is solely to ensure that after preprocessing this file is never empty. */ typedef int dummy; #endif pspp-1.0.1/gl/arg-nonnull.h0000644000175000017500000000230013124536241012417 00000000000000/* A C macro for declaring that specific arguments must not be NULL. Copyright (C) 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) # endif #endif pspp-1.0.1/gl/clean-temp.c0000644000175000017500000005706313124536241012223 00000000000000/* Temporary directories and temporary files with automatic cleanup. Copyright (C) 2001, 2003, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 . */ #include /* Specification. */ #include "clean-temp.h" #include #include #include #include #include #include #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include #endif #include "error.h" #include "fatal-signal.h" #include "pathmax.h" #include "tmpdir.h" #include "xalloc.h" #include "xmalloca.h" #include "gl_xlist.h" #include "gl_linkedhash_list.h" #include "gettext.h" #if GNULIB_FWRITEERROR # include "fwriteerror.h" #endif #if GNULIB_CLOSE_STREAM # include "close-stream.h" #endif #if GNULIB_FCNTL_SAFER # include "fcntl--.h" #endif #if GNULIB_FOPEN_SAFER # include "stdio--.h" #endif #define _(str) gettext (str) /* GNU Hurd doesn't have PATH_MAX. Use a fallback. Temporary directory names are usually not that long. */ #ifndef PATH_MAX # define PATH_MAX 1024 #endif #ifndef uintptr_t # define uintptr_t unsigned long #endif /* The use of 'volatile' in the types below (and ISO C 99 section 5.1.2.3.(5)) ensure that while constructing or modifying the data structures, the field values are written to memory in the order of the C statements. So the signal handler can rely on these field values to be up to date. */ /* Registry for a single temporary directory. 'struct temp_dir' from the public header file overlaps with this. */ struct tempdir { /* The absolute pathname of the directory. */ char * volatile dirname; /* Whether errors during explicit cleanup are reported to standard error. */ bool cleanup_verbose; /* Absolute pathnames of subdirectories. */ gl_list_t /* */ volatile subdirs; /* Absolute pathnames of files. */ gl_list_t /* */ volatile files; }; /* List of all temporary directories. */ static struct { struct tempdir * volatile * volatile tempdir_list; size_t volatile tempdir_count; size_t tempdir_allocated; } cleanup_list /* = { NULL, 0, 0 } */; /* List of all open file descriptors to temporary files. */ static gl_list_t /* */ volatile descriptors; /* For the subdirs and for the files, we use a gl_list_t of type LINKEDHASH. Why? We need a data structure that 1) Can contain an arbitrary number of 'char *' values. The strings are compared via strcmp, not pointer comparison. 2) Has insertion and deletion operations that are fast: ideally O(1), or possibly O(log n). This is important for GNU sort, which may create a large number of temporary files. 3) Allows iteration through all elements from within a signal handler. 4) May or may not allow duplicates. It doesn't matter here, since any file or subdir can only be removed once. Criterion 1) would allow any gl_list_t or gl_oset_t implementation. Criterion 2) leaves only GL_LINKEDHASH_LIST, GL_TREEHASH_LIST, or GL_TREE_OSET. Criterion 3) puts at disadvantage GL_TREEHASH_LIST and GL_TREE_OSET. Namely, iteration through the elements of a binary tree requires access to many ->left, ->right, ->parent pointers. However, the rebalancing code for insertion and deletion in an AVL or red-black tree is so complicated that we cannot assume that >left, ->right, ->parent pointers are in a consistent state throughout these operations. Therefore, to avoid a crash in the signal handler, all destructive operations to the lists would have to be protected by a block_fatal_signals (); ... unblock_fatal_signals (); pair. Which causes extra system calls. Criterion 3) would also discourage GL_ARRAY_LIST and GL_CARRAY_LIST, if they were not already excluded. Namely, these implementations use xrealloc(), leaving a time window in which in the list->elements pointer points to already deallocated memory. To avoid a crash in the signal handler at such a moment, all destructive operations would have to protected by block/unblock_fatal_signals (), in this case too. A list of type GL_LINKEDHASH_LIST without duplicates fulfills all requirements: 2) Insertion and deletion are O(1) on average. 3) The gl_list_iterator, gl_list_iterator_next implementations do not trigger memory allocations, nor other system calls, and are therefore safe to be called from a signal handler. Furthermore, since SIGNAL_SAFE_LIST is defined, the implementation of the destructive functions ensures that the list structure is safe to be traversed at any moment, even when interrupted by an asynchronous signal. */ /* String equality and hash code functions used by the lists. */ static bool string_equals (const void *x1, const void *x2) { const char *s1 = (const char *) x1; const char *s2 = (const char *) x2; return strcmp (s1, s2) == 0; } #define SIZE_BITS (sizeof (size_t) * CHAR_BIT) /* A hash function for NUL-terminated char* strings using the method described by Bruno Haible. See http://www.haible.de/bruno/hashfunc.html. */ static size_t string_hash (const void *x) { const char *s = (const char *) x; size_t h = 0; for (; *s; s++) h = *s + ((h << 9) | (h >> (SIZE_BITS - 9))); return h; } /* The signal handler. It gets called asynchronously. */ static void cleanup () { size_t i; /* First close all file descriptors to temporary files. */ { gl_list_t fds = descriptors; if (fds != NULL) { gl_list_iterator_t iter; const void *element; iter = gl_list_iterator (fds); while (gl_list_iterator_next (&iter, &element, NULL)) { int fd = (int) (uintptr_t) element; close (fd); } gl_list_iterator_free (&iter); } } for (i = 0; i < cleanup_list.tempdir_count; i++) { struct tempdir *dir = cleanup_list.tempdir_list[i]; if (dir != NULL) { gl_list_iterator_t iter; const void *element; /* First cleanup the files in the subdirectories. */ iter = gl_list_iterator (dir->files); while (gl_list_iterator_next (&iter, &element, NULL)) { const char *file = (const char *) element; unlink (file); } gl_list_iterator_free (&iter); /* Then cleanup the subdirectories. */ iter = gl_list_iterator (dir->subdirs); while (gl_list_iterator_next (&iter, &element, NULL)) { const char *subdir = (const char *) element; rmdir (subdir); } gl_list_iterator_free (&iter); /* Then cleanup the temporary directory itself. */ rmdir (dir->dirname); } } } /* Create a temporary directory. PREFIX is used as a prefix for the name of the temporary directory. It should be short and still give an indication about the program. PARENTDIR can be used to specify the parent directory; if NULL, a default parent directory is used (either $TMPDIR or /tmp or similar). CLEANUP_VERBOSE determines whether errors during explicit cleanup are reported to standard error. Return a fresh 'struct temp_dir' on success. Upon error, an error message is shown and NULL is returned. */ struct temp_dir * create_temp_dir (const char *prefix, const char *parentdir, bool cleanup_verbose) { struct tempdir * volatile *tmpdirp = NULL; struct tempdir *tmpdir; size_t i; char *xtemplate; char *tmpdirname; /* See whether it can take the slot of an earlier temporary directory already cleaned up. */ for (i = 0; i < cleanup_list.tempdir_count; i++) if (cleanup_list.tempdir_list[i] == NULL) { tmpdirp = &cleanup_list.tempdir_list[i]; break; } if (tmpdirp == NULL) { /* See whether the array needs to be extended. */ if (cleanup_list.tempdir_count == cleanup_list.tempdir_allocated) { /* Note that we cannot use xrealloc(), because then the cleanup() function could access an already deallocated array. */ struct tempdir * volatile *old_array = cleanup_list.tempdir_list; size_t old_allocated = cleanup_list.tempdir_allocated; size_t new_allocated = 2 * cleanup_list.tempdir_allocated + 1; struct tempdir * volatile *new_array = XNMALLOC (new_allocated, struct tempdir * volatile); if (old_allocated == 0) /* First use of this facility. Register the cleanup handler. */ at_fatal_signal (&cleanup); else { /* Don't use memcpy() here, because memcpy takes non-volatile arguments and is therefore not guaranteed to complete all memory stores before the next statement. */ size_t k; for (k = 0; k < old_allocated; k++) new_array[k] = old_array[k]; } cleanup_list.tempdir_list = new_array; cleanup_list.tempdir_allocated = new_allocated; /* Now we can free the old array. */ if (old_array != NULL) free ((struct tempdir **) old_array); } tmpdirp = &cleanup_list.tempdir_list[cleanup_list.tempdir_count]; /* Initialize *tmpdirp before incrementing tempdir_count, so that cleanup() will skip this entry before it is fully initialized. */ *tmpdirp = NULL; cleanup_list.tempdir_count++; } /* Initialize a 'struct tempdir'. */ tmpdir = XMALLOC (struct tempdir); tmpdir->dirname = NULL; tmpdir->cleanup_verbose = cleanup_verbose; tmpdir->subdirs = gl_list_create_empty (GL_LINKEDHASH_LIST, string_equals, string_hash, NULL, false); tmpdir->files = gl_list_create_empty (GL_LINKEDHASH_LIST, string_equals, string_hash, NULL, false); /* Create the temporary directory. */ xtemplate = (char *) xmalloca (PATH_MAX); if (path_search (xtemplate, PATH_MAX, parentdir, prefix, parentdir == NULL)) { error (0, errno, _("cannot find a temporary directory, try setting $TMPDIR")); goto quit; } block_fatal_signals (); tmpdirname = mkdtemp (xtemplate); if (tmpdirname != NULL) { tmpdir->dirname = tmpdirname; *tmpdirp = tmpdir; } unblock_fatal_signals (); if (tmpdirname == NULL) { error (0, errno, _("cannot create a temporary directory using template \"%s\""), xtemplate); goto quit; } /* Replace tmpdir->dirname with a copy that has indefinite extent. We cannot do this inside the block_fatal_signals/unblock_fatal_signals block because then the cleanup handler would not remove the directory if xstrdup fails. */ tmpdir->dirname = xstrdup (tmpdirname); freea (xtemplate); return (struct temp_dir *) tmpdir; quit: freea (xtemplate); return NULL; } /* Register the given ABSOLUTE_FILE_NAME as being a file inside DIR, that needs to be removed before DIR can be removed. Should be called before the file ABSOLUTE_FILE_NAME is created. */ void register_temp_file (struct temp_dir *dir, const char *absolute_file_name) { struct tempdir *tmpdir = (struct tempdir *)dir; /* Add absolute_file_name to tmpdir->files, without duplicates. */ if (gl_list_search (tmpdir->files, absolute_file_name) == NULL) gl_list_add_first (tmpdir->files, xstrdup (absolute_file_name)); } /* Unregister the given ABSOLUTE_FILE_NAME as being a file inside DIR, that needs to be removed before DIR can be removed. Should be called when the file ABSOLUTE_FILE_NAME could not be created. */ void unregister_temp_file (struct temp_dir *dir, const char *absolute_file_name) { struct tempdir *tmpdir = (struct tempdir *)dir; gl_list_t list = tmpdir->files; gl_list_node_t node; node = gl_list_search (list, absolute_file_name); if (node != NULL) { char *old_string = (char *) gl_list_node_value (list, node); gl_list_remove_node (list, node); free (old_string); } } /* Register the given ABSOLUTE_DIR_NAME as being a subdirectory inside DIR, that needs to be removed before DIR can be removed. Should be called before the subdirectory ABSOLUTE_DIR_NAME is created. */ void register_temp_subdir (struct temp_dir *dir, const char *absolute_dir_name) { struct tempdir *tmpdir = (struct tempdir *)dir; /* Add absolute_dir_name to tmpdir->subdirs, without duplicates. */ if (gl_list_search (tmpdir->subdirs, absolute_dir_name) == NULL) gl_list_add_first (tmpdir->subdirs, xstrdup (absolute_dir_name)); } /* Unregister the given ABSOLUTE_DIR_NAME as being a subdirectory inside DIR, that needs to be removed before DIR can be removed. Should be called when the subdirectory ABSOLUTE_DIR_NAME could not be created. */ void unregister_temp_subdir (struct temp_dir *dir, const char *absolute_dir_name) { struct tempdir *tmpdir = (struct tempdir *)dir; gl_list_t list = tmpdir->subdirs; gl_list_node_t node; node = gl_list_search (list, absolute_dir_name); if (node != NULL) { char *old_string = (char *) gl_list_node_value (list, node); gl_list_remove_node (list, node); free (old_string); } } /* Remove a file, with optional error message. Return 0 upon success, or -1 if there was some problem. */ static int do_unlink (struct temp_dir *dir, const char *absolute_file_name) { if (unlink (absolute_file_name) < 0 && dir->cleanup_verbose && errno != ENOENT) { error (0, errno, _("cannot remove temporary file %s"), absolute_file_name); return -1; } return 0; } /* Remove a directory, with optional error message. Return 0 upon success, or -1 if there was some problem. */ static int do_rmdir (struct temp_dir *dir, const char *absolute_dir_name) { if (rmdir (absolute_dir_name) < 0 && dir->cleanup_verbose && errno != ENOENT) { error (0, errno, _("cannot remove temporary directory %s"), absolute_dir_name); return -1; } return 0; } /* Remove the given ABSOLUTE_FILE_NAME and unregister it. Return 0 upon success, or -1 if there was some problem. */ int cleanup_temp_file (struct temp_dir *dir, const char *absolute_file_name) { int err; err = do_unlink (dir, absolute_file_name); unregister_temp_file (dir, absolute_file_name); return err; } /* Remove the given ABSOLUTE_DIR_NAME and unregister it. Return 0 upon success, or -1 if there was some problem. */ int cleanup_temp_subdir (struct temp_dir *dir, const char *absolute_dir_name) { int err; err = do_rmdir (dir, absolute_dir_name); unregister_temp_subdir (dir, absolute_dir_name); return err; } /* Remove all registered files and subdirectories inside DIR. Return 0 upon success, or -1 if there was some problem. */ int cleanup_temp_dir_contents (struct temp_dir *dir) { struct tempdir *tmpdir = (struct tempdir *)dir; int err = 0; gl_list_t list; gl_list_iterator_t iter; const void *element; gl_list_node_t node; /* First cleanup the files in the subdirectories. */ list = tmpdir->files; iter = gl_list_iterator (list); while (gl_list_iterator_next (&iter, &element, &node)) { char *file = (char *) element; err |= do_unlink (dir, file); gl_list_remove_node (list, node); /* Now only we can free file. */ free (file); } gl_list_iterator_free (&iter); /* Then cleanup the subdirectories. */ list = tmpdir->subdirs; iter = gl_list_iterator (list); while (gl_list_iterator_next (&iter, &element, &node)) { char *subdir = (char *) element; err |= do_rmdir (dir, subdir); gl_list_remove_node (list, node); /* Now only we can free subdir. */ free (subdir); } gl_list_iterator_free (&iter); return err; } /* Remove all registered files and subdirectories inside DIR and DIR itself. DIR cannot be used any more after this call. Return 0 upon success, or -1 if there was some problem. */ int cleanup_temp_dir (struct temp_dir *dir) { struct tempdir *tmpdir = (struct tempdir *)dir; int err = 0; size_t i; err |= cleanup_temp_dir_contents (dir); err |= do_rmdir (dir, tmpdir->dirname); for (i = 0; i < cleanup_list.tempdir_count; i++) if (cleanup_list.tempdir_list[i] == tmpdir) { /* Remove cleanup_list.tempdir_list[i]. */ if (i + 1 == cleanup_list.tempdir_count) { while (i > 0 && cleanup_list.tempdir_list[i - 1] == NULL) i--; cleanup_list.tempdir_count = i; } else cleanup_list.tempdir_list[i] = NULL; /* Now only we can free the tmpdir->dirname, tmpdir->subdirs, tmpdir->files, and tmpdir itself. */ gl_list_free (tmpdir->files); gl_list_free (tmpdir->subdirs); free (tmpdir->dirname); free (tmpdir); return err; } /* The user passed an invalid DIR argument. */ abort (); } #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On Windows, opening a file with _O_TEMPORARY has the effect of passing the FILE_FLAG_DELETE_ON_CLOSE flag to CreateFile(), which has the effect of deleting the file when it is closed - even when the program crashes. But (according to the Cygwin sources) it works only on Windows NT or newer. So we cache the info whether we are running on Windows NT or newer. */ static bool supports_delete_on_close () { static int known; /* 1 = yes, -1 = no, 0 = unknown */ if (!known) { OSVERSIONINFO v; /* According to this structure must be initialized as follows: */ v.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); if (GetVersionEx (&v)) known = (v.dwPlatformId == VER_PLATFORM_WIN32_NT ? 1 : -1); else known = -1; } return (known > 0); } #endif /* Register a file descriptor to be closed. */ static void register_fd (int fd) { if (descriptors == NULL) descriptors = gl_list_create_empty (GL_LINKEDHASH_LIST, NULL, NULL, NULL, false); gl_list_add_first (descriptors, (void *) (uintptr_t) fd); } /* Unregister a file descriptor to be closed. */ static void unregister_fd (int fd) { gl_list_t fds = descriptors; gl_list_node_t node; if (fds == NULL) /* descriptors should already contain fd. */ abort (); node = gl_list_search (fds, (void *) (uintptr_t) fd); if (node == NULL) /* descriptors should already contain fd. */ abort (); gl_list_remove_node (fds, node); } /* Open a temporary file in a temporary directory. Registers the resulting file descriptor to be closed. */ int open_temp (const char *file_name, int flags, mode_t mode) { int fd; int saved_errno; block_fatal_signals (); /* Note: 'open' here is actually open() or open_safer(). */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Use _O_TEMPORARY when possible, to increase the chances that the temporary file is removed when the process crashes. */ if (supports_delete_on_close ()) fd = open (file_name, flags | _O_TEMPORARY, mode); else #endif fd = open (file_name, flags, mode); saved_errno = errno; if (fd >= 0) register_fd (fd); unblock_fatal_signals (); errno = saved_errno; return fd; } /* Open a temporary file in a temporary directory. Registers the resulting file descriptor to be closed. */ FILE * fopen_temp (const char *file_name, const char *mode) { FILE *fp; int saved_errno; block_fatal_signals (); /* Note: 'fopen' here is actually fopen() or fopen_safer(). */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Use _O_TEMPORARY when possible, to increase the chances that the temporary file is removed when the process crashes. */ if (supports_delete_on_close ()) { size_t mode_len = strlen (mode); char *augmented_mode = (char *) xmalloca (mode_len + 2); memcpy (augmented_mode, mode, mode_len); memcpy (augmented_mode + mode_len, "D", 2); fp = fopen (file_name, augmented_mode); saved_errno = errno; freea (augmented_mode); } else #endif { fp = fopen (file_name, mode); saved_errno = errno; } if (fp != NULL) { /* It is sufficient to register fileno (fp) instead of the entire fp, because at cleanup time there is no need to do an fflush (fp); a close (fileno (fp)) will be enough. */ int fd = fileno (fp); if (!(fd >= 0)) abort (); register_fd (fd); } unblock_fatal_signals (); errno = saved_errno; return fp; } /* Close a temporary file in a temporary directory. Unregisters the previously registered file descriptor. */ int close_temp (int fd) { if (fd >= 0) { /* No blocking of signals is needed here, since a double close of a file descriptor is harmless. */ int result = close (fd); int saved_errno = errno; /* No race condition here: we assume a single-threaded program, hence fd cannot be re-opened here. */ unregister_fd (fd); errno = saved_errno; return result; } else return close (fd); } /* Close a temporary file in a temporary directory. Unregisters the previously registered file descriptor. */ int fclose_temp (FILE *fp) { int fd = fileno (fp); /* No blocking of signals is needed here, since a double close of a file descriptor is harmless. */ int result = fclose (fp); int saved_errno = errno; /* No race condition here: we assume a single-threaded program, hence fd cannot be re-opened here. */ unregister_fd (fd); errno = saved_errno; return result; } #if GNULIB_FWRITEERROR /* Like fwriteerror. Unregisters the previously registered file descriptor. */ int fwriteerror_temp (FILE *fp) { int fd = fileno (fp); /* No blocking of signals is needed here, since a double close of a file descriptor is harmless. */ int result = fwriteerror (fp); int saved_errno = errno; /* No race condition here: we assume a single-threaded program, hence fd cannot be re-opened here. */ unregister_fd (fd); errno = saved_errno; return result; } #endif #if GNULIB_CLOSE_STREAM /* Like close_stream. Unregisters the previously registered file descriptor. */ int close_stream_temp (FILE *fp) { int fd = fileno (fp); /* No blocking of signals is needed here, since a double close of a file descriptor is harmless. */ int result = close_stream (fp); int saved_errno = errno; /* No race condition here: we assume a single-threaded program, hence fd cannot be re-opened here. */ unregister_fd (fd); errno = saved_errno; return result; } #endif pspp-1.0.1/gl/inttostr.h0000644000175000017500000000320213124536242012054 00000000000000/* inttostr.h -- convert integers to printable strings Copyright (C) 2001-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paul Eggert */ #include #include #include "intprops.h" #ifndef __GNUC_PREREQ # 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 #endif #if __GNUC_PREREQ (3,4) # undef __attribute_warn_unused_result__ # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) #else # define __attribute_warn_unused_result__ /* empty */ #endif char *imaxtostr (intmax_t, char *) __attribute_warn_unused_result__; char *inttostr (int, char *) __attribute_warn_unused_result__; char *offtostr (off_t, char *) __attribute_warn_unused_result__; char *uinttostr (unsigned int, char *) __attribute_warn_unused_result__; char *umaxtostr (uintmax_t, char *) __attribute_warn_unused_result__; pspp-1.0.1/gl/vasprintf.c0000644000175000017500000000247213124536243012206 00000000000000/* Formatted output to strings. Copyright (C) 1999, 2002, 2006-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #ifdef IN_LIBASPRINTF # include "vasprintf.h" #else # include #endif #include #include #include #include "vasnprintf.h" int vasprintf (char **resultp, const char *format, va_list args) { size_t length; char *result = vasnprintf (NULL, &length, format, args); if (result == NULL) return -1; if (length > INT_MAX) { free (result); errno = EOVERFLOW; return -1; } *resultp = result; /* Return the number of resulting bytes, excluding the trailing NUL. */ return length; } pspp-1.0.1/gl/c-asprintf.c0000644000175000017500000000203313124536241012227 00000000000000/* Formatted output to strings in C locale. Copyright (C) 1999, 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include "c-vasprintf.h" #include int c_asprintf (char **resultp, const char *format, ...) { va_list args; int result; va_start (args, format); result = c_vasprintf (resultp, format, args); va_end (args); return result; } pspp-1.0.1/gl/isinf.c0000644000175000017500000000201013124536242011265 00000000000000/* Test for positive or negative infinity. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Ben Pfaff , 2008. */ #include #include int gl_isinff (float x) { return x < -FLT_MAX || x > FLT_MAX; } int gl_isinfd (double x) { return x < -DBL_MAX || x > DBL_MAX; } int gl_isinfl (long double x) { return x < -LDBL_MAX || x > LDBL_MAX; } pspp-1.0.1/gl/c-snprintf.h0000644000175000017500000000306513124536241012257 00000000000000/* snprintf in C locale. Copyright (C) 2012-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _C_SNPRINTF_H #define _C_SNPRINTF_H /* Get size_t. */ #include /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif #ifdef __cplusplus extern "C" { #endif int c_snprintf (char *str, size_t size, const char *format, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); #ifdef __cplusplus } #endif #endif /* _C_SNPRINTF_H */ pspp-1.0.1/gl/areadlink.c0000644000175000017500000000372413124536241012123 00000000000000/* areadlink.c -- readlink wrapper to return the link name in malloc'd storage Unlike xreadlink and xreadlink_with_size, don't ever call exit. Copyright (C) 2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Jim Meyering and Bruno Haible . */ #include /* Specification. */ #include "areadlink.h" #include "careadlinkat.h" #include #include /* Get the symbolic link value of FILENAME and put it into BUFFER, with size BUFFER_SIZE. This function acts like readlink but has readlinkat's signature. */ static ssize_t careadlinkatcwd (int fd, char const *filename, char *buffer, size_t buffer_size) { /* FD must be AT_FDCWD here, otherwise the caller is using this function in contexts it was not meant for. */ if (fd != AT_FDCWD) abort (); return readlink (filename, buffer, buffer_size); } /* Call readlink to get the symbolic link value of FILENAME. Return a pointer to that NUL-terminated string in malloc'd storage. If readlink fails, return NULL and set errno. If allocation fails, or if the link value is longer than SIZE_MAX :-), return NULL and set errno to ENOMEM. */ char * areadlink (char const *filename) { return careadlinkat (AT_FDCWD, filename, NULL, 0, NULL, careadlinkatcwd); } pspp-1.0.1/gl/vprintf.c0000644000175000017500000000207513124536243011661 00000000000000/* Formatted output to a stream. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include #include /* Print formatted output to standard output. Return string length of formatted string. On error, return a negative value. */ int vprintf (const char *format, va_list args) { return vfprintf (stdout, format, args); } pspp-1.0.1/gl/ftello.c0000644000175000017500000000461013124536242011452 00000000000000/* An ftello() function that works around platform bugs. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include /* Get lseek. */ #include #include "stdio-impl.h" off_t ftello (FILE *fp) #undef ftello #if !HAVE_FTELLO # undef ftell # define ftello ftell #endif #if _GL_WINDOWS_64_BIT_OFF_T # undef ftello # if HAVE__FTELLI64 /* msvc, mingw64 */ # define ftello _ftelli64 # else /* mingw */ # define ftello ftello64 # endif #endif { #if LSEEK_PIPE_BROKEN /* mingw gives bogus answers rather than failure on non-seekable files. */ if (lseek (fileno (fp), 0, SEEK_CUR) == -1) return -1; #endif #if FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE /* Solaris */ /* The Solaris stdio leaves the _IOREAD flag set after reading from a file reaches EOF and the program then starts writing to the file. ftello gets confused by this. */ if (fp_->_flag & _IOWRT) { off_t pos; /* Call ftello nevertheless, for the side effects that it does on fp. */ ftello (fp); /* Compute the file position ourselves. */ pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR); if (pos >= 0) { if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) pos += fp_->_ptr - fp_->_base; } return pos; } #endif #if defined __SL64 && defined __SCLE /* Cygwin */ if ((fp->_flags & __SL64) == 0) { /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit mode; but has an ftello that requires 64-bit mode. */ FILE *tmp = fopen ("/dev/null", "r"); if (!tmp) return -1; fp->_flags |= __SL64; fp->_seek64 = tmp->_seek64; fclose (tmp); } #endif return ftello (fp); } pspp-1.0.1/gl/ref-del.sin0000644000175000017500000000167513124536243012063 00000000000000# Remove this package from a list of references stored in a text file. # # Copyright (C) 2000, 2009-2017 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, 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 . # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// s/ @PACKAGE@ / / s/^/# Packages using this file:/ } pspp-1.0.1/gl/langinfo.in.h0000644000175000017500000001321213124536242012372 00000000000000/* Substitute for and wrapper around . Copyright (C) 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* * POSIX for platforms that lack it or have an incomplete one. * */ #ifndef _@GUARD_PREFIX@_LANGINFO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_LANGINFO_H@ # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ #endif #ifndef _@GUARD_PREFIX@_LANGINFO_H #define _@GUARD_PREFIX@_LANGINFO_H #if !@HAVE_LANGINFO_H@ /* A platform that lacks . */ /* Assume that it also lacks and the nl_item type. */ # if !GNULIB_defined_nl_item typedef int nl_item; # define GNULIB_defined_nl_item 1 # endif /* nl_langinfo items of the LC_CTYPE category */ # define CODESET 10000 /* nl_langinfo items of the LC_NUMERIC category */ # define RADIXCHAR 10001 # define DECIMAL_POINT RADIXCHAR # define THOUSEP 10002 # define THOUSANDS_SEP THOUSEP # define GROUPING 10114 /* nl_langinfo items of the LC_TIME category */ # define D_T_FMT 10003 # define D_FMT 10004 # define T_FMT 10005 # define T_FMT_AMPM 10006 # define AM_STR 10007 # define PM_STR 10008 # define DAY_1 10009 # define DAY_2 (DAY_1 + 1) # define DAY_3 (DAY_1 + 2) # define DAY_4 (DAY_1 + 3) # define DAY_5 (DAY_1 + 4) # define DAY_6 (DAY_1 + 5) # define DAY_7 (DAY_1 + 6) # define ABDAY_1 10016 # define ABDAY_2 (ABDAY_1 + 1) # define ABDAY_3 (ABDAY_1 + 2) # define ABDAY_4 (ABDAY_1 + 3) # define ABDAY_5 (ABDAY_1 + 4) # define ABDAY_6 (ABDAY_1 + 5) # define ABDAY_7 (ABDAY_1 + 6) # define MON_1 10023 # define MON_2 (MON_1 + 1) # define MON_3 (MON_1 + 2) # define MON_4 (MON_1 + 3) # define MON_5 (MON_1 + 4) # define MON_6 (MON_1 + 5) # define MON_7 (MON_1 + 6) # define MON_8 (MON_1 + 7) # define MON_9 (MON_1 + 8) # define MON_10 (MON_1 + 9) # define MON_11 (MON_1 + 10) # define MON_12 (MON_1 + 11) # define ABMON_1 10035 # define ABMON_2 (ABMON_1 + 1) # define ABMON_3 (ABMON_1 + 2) # define ABMON_4 (ABMON_1 + 3) # define ABMON_5 (ABMON_1 + 4) # define ABMON_6 (ABMON_1 + 5) # define ABMON_7 (ABMON_1 + 6) # define ABMON_8 (ABMON_1 + 7) # define ABMON_9 (ABMON_1 + 8) # define ABMON_10 (ABMON_1 + 9) # define ABMON_11 (ABMON_1 + 10) # define ABMON_12 (ABMON_1 + 11) # define ERA 10047 # define ERA_D_FMT 10048 # define ERA_D_T_FMT 10049 # define ERA_T_FMT 10050 # define ALT_DIGITS 10051 /* nl_langinfo items of the LC_MONETARY category */ # define CRNCYSTR 10052 # define CURRENCY_SYMBOL CRNCYSTR # define INT_CURR_SYMBOL 10100 # define MON_DECIMAL_POINT 10101 # define MON_THOUSANDS_SEP 10102 # define MON_GROUPING 10103 # define POSITIVE_SIGN 10104 # define NEGATIVE_SIGN 10105 # define FRAC_DIGITS 10106 # define INT_FRAC_DIGITS 10107 # define P_CS_PRECEDES 10108 # define N_CS_PRECEDES 10109 # define P_SEP_BY_SPACE 10110 # define N_SEP_BY_SPACE 10111 # define P_SIGN_POSN 10112 # define N_SIGN_POSN 10113 /* nl_langinfo items of the LC_MESSAGES category */ # define YESEXPR 10053 # define NOEXPR 10054 #else /* A platform that has . */ # if !@HAVE_LANGINFO_CODESET@ # define CODESET 10000 # define GNULIB_defined_CODESET 1 # endif # if !@HAVE_LANGINFO_T_FMT_AMPM@ # define T_FMT_AMPM 10006 # define GNULIB_defined_T_FMT_AMPM 1 # endif # if !@HAVE_LANGINFO_ERA@ # define ERA 10047 # define ERA_D_FMT 10048 # define ERA_D_T_FMT 10049 # define ERA_T_FMT 10050 # define ALT_DIGITS 10051 # define GNULIB_defined_ERA 1 # endif # if !@HAVE_LANGINFO_YESEXPR@ # define YESEXPR 10053 # define NOEXPR 10054 # define GNULIB_defined_YESEXPR 1 # endif #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ /* Return a piece of locale dependent information. Note: The difference between nl_langinfo (CODESET) and locale_charset () is that the latter normalizes the encoding names to GNU conventions. */ #if @GNULIB_NL_LANGINFO@ # if @REPLACE_NL_LANGINFO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef nl_langinfo # define nl_langinfo rpl_nl_langinfo # endif _GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item)); _GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item)); # else # if !@HAVE_NL_LANGINFO@ _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); # endif _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); # endif _GL_CXXALIASWARN (nl_langinfo); #elif defined GNULIB_POSIXCHECK # undef nl_langinfo # if HAVE_RAW_DECL_NL_LANGINFO _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " "use gnulib module nl_langinfo for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_LANGINFO_H */ #endif /* _@GUARD_PREFIX@_LANGINFO_H */ pspp-1.0.1/gl/relocwrapper.c0000644000175000017500000001441013124536243012672 00000000000000/* Relocating wrapper program. Copyright (C) 2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 . */ /* Dependencies: relocwrapper -> progname -> progreloc -> areadlink -> careadlinkat -> allocator -> readlink -> stat -> dosname -> pathmax -> verify -> canonicalize-lgpl -> malloca -> lstat -> readlink -> relocatable -> setenv -> malloca -> fprintf-posix [ignore, cut dependency tree here] -> strerror [ignore, cut dependency tree here] -> c-ctype Macros that need to be set while compiling this file: - ENABLE_RELOCATABLE 1 - INSTALLPREFIX the base installation directory - INSTALLDIR the directory into which this program is installed - LIBPATHVAR the platform dependent runtime library path variable - LIBDIRS a comma-terminated list of strings representing the list of directories that contain the libraries at installation time We don't want to internationalize this wrapper because then it would depend on libintl and therefore need relocation itself. So use only libc functions, no gettext(), no error(), no xmalloc(), no xsetenv(). */ #define _GL_USE_STDLIB_ALLOC 1 #include #include #include #include #include #include #include "progname.h" #include "relocatable.h" #include "c-ctype.h" #include "verify.h" /* Use the system functions, not the gnulib overrides in this file. */ #undef fprintf #undef strerror /* Return a copy of the filename, with an extra ".bin" at the end. More generally, it replaces "${EXEEXT}" at the end with ".bin${EXEEXT}". */ static char * add_dotbin (const char *filename) { size_t filename_len = strlen (filename); char *result = (char *) malloc (filename_len + 4 + 1); if (result != NULL) { if (sizeof (EXEEXT) > sizeof ("")) { /* EXEEXT handling. */ const size_t exeext_len = sizeof (EXEEXT) - sizeof (""); static const char exeext[] = EXEEXT; if (filename_len > exeext_len) { /* Compare using an inlined copy of c_strncasecmp(), because the filenames may have undergone a case conversion since they were packaged. In other words, EXEEXT may be ".exe" on one system and ".EXE" on another. */ const char *s1 = filename + filename_len - exeext_len; const char *s2 = exeext; for (; *s1 != '\0'; s1++, s2++) { unsigned char c1 = *s1; unsigned char c2 = *s2; if (c_tolower (c1) != c_tolower (c2)) goto simple_append; } /* Insert ".bin" before EXEEXT or its equivalent. */ memcpy (result, filename, filename_len - exeext_len); memcpy (result + filename_len - exeext_len, ".bin", 4); memcpy (result + filename_len - exeext_len + 4, filename + filename_len - exeext_len, exeext_len + 1); return result; } } simple_append: /* Simply append ".bin". */ memcpy (result, filename, filename_len); memcpy (result + filename_len, ".bin", 4 + 1); return result; } else { fprintf (stderr, "%s: %s\n", program_name, "memory exhausted"); exit (1); } } /* List of directories that contain the libraries. */ static const char *libdirs[] = { LIBDIRS NULL }; /* Verify that at least one directory is given. */ verify (sizeof (libdirs) / sizeof (libdirs[0]) > 1); /* Relocate the list of directories that contain the libraries. */ static void relocate_libdirs () { size_t i; for (i = 0; i < sizeof (libdirs) / sizeof (libdirs[0]) - 1; i++) libdirs[i] = relocate (libdirs[i]); } /* Activate the list of directories in the LIBPATHVAR. */ static void activate_libdirs () { const char *old_value; size_t total; size_t i; char *value; char *p; old_value = getenv (LIBPATHVAR); if (old_value == NULL) old_value = ""; total = 0; for (i = 0; i < sizeof (libdirs) / sizeof (libdirs[0]) - 1; i++) total += strlen (libdirs[i]) + 1; total += strlen (old_value) + 1; value = (char *) malloc (total); if (value == NULL) { fprintf (stderr, "%s: %s\n", program_name, "memory exhausted"); exit (1); } p = value; for (i = 0; i < sizeof (libdirs) / sizeof (libdirs[0]) - 1; i++) { size_t len = strlen (libdirs[i]); memcpy (p, libdirs[i], len); p += len; *p++ = ':'; } if (old_value[0] != '\0') strcpy (p, old_value); else p[-1] = '\0'; if (setenv (LIBPATHVAR, value, 1) < 0) { fprintf (stderr, "%s: %s\n", program_name, "memory exhausted"); exit (1); } } int main (int argc, char *argv[]) { char *full_program_name; /* Set the program name and perform preparations for get_full_program_name() and relocate(). */ set_program_name_and_installdir (argv[0], INSTALLPREFIX, INSTALLDIR); /* Get the full program path. (Important if accessed through a symlink.) */ full_program_name = get_full_program_name (); if (full_program_name == NULL) full_program_name = argv[0]; /* Invoke the real program, with suffix ".bin". */ argv[0] = add_dotbin (full_program_name); relocate_libdirs (); activate_libdirs (); execv (argv[0], argv); fprintf (stderr, "%s: could not execute %s: %s\n", program_name, argv[0], strerror (errno)); exit (127); } pspp-1.0.1/gl/dirname-lgpl.c0000644000175000017500000000612013124536241012535 00000000000000/* dirname.c -- return all but the last element in a file name Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include "dirname.h" #include #include /* Return the length of the prefix of FILE that will be used by dir_name. If FILE is in the working directory, this returns zero even though 'dir_name (FILE)' will return ".". Works properly even if there are trailing slashes (by effectively ignoring them). */ size_t dir_len (char const *file) { size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); size_t length; /* Advance prefix_length beyond important leading slashes. */ prefix_length += (prefix_length != 0 ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && ISSLASH (file[prefix_length])) : (ISSLASH (file[0]) ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT && ISSLASH (file[1]) && ! ISSLASH (file[2]) ? 2 : 1)) : 0)); /* Strip the basename and any redundant slashes before it. */ for (length = last_component (file) - file; prefix_length < length; length--) if (! ISSLASH (file[length - 1])) break; return length; } /* In general, we can't use the builtin 'dirname' function if available, since it has different meanings in different environments. In some environments the builtin 'dirname' modifies its argument. Return the leading directories part of FILE, allocated with malloc. Works properly even if there are trailing slashes (by effectively ignoring them). Return NULL on failure. If lstat (FILE) would succeed, then { chdir (dir_name (FILE)); lstat (base_name (FILE)); } will access the same file. Likewise, if the sequence { chdir (dir_name (FILE)); rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE to "foo" in the same directory FILE was in. */ char * mdir_name (char const *file) { size_t length = dir_len (file); bool append_dot = (length == 0 || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && length == FILE_SYSTEM_PREFIX_LEN (file) && file[2] != '\0' && ! ISSLASH (file[2]))); char *dir = malloc (length + append_dot + 1); if (!dir) return NULL; memcpy (dir, file, length); if (append_dot) dir[length++] = '.'; dir[length] = '\0'; return dir; } pspp-1.0.1/gl/localtime-buffer.h0000644000175000017500000000200213124536241013402 00000000000000/* Provide access to the last buffer returned by localtime() or gmtime(). Copyright (C) 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* written by Jim Meyering */ #include #if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME /* The address of the last buffer returned by localtime() or gmtime(). */ extern struct tm *localtime_buffer_addr; #endif pspp-1.0.1/gl/xvasprintf.c0000644000175000017500000000530613124536243012375 00000000000000/* vasprintf and asprintf with out-of-memory checking. Copyright (C) 1999, 2002-2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include "xvasprintf.h" #include #include #include #include #include "xalloc.h" /* Checked size_t computations. */ #include "xsize.h" static char * xstrcat (size_t argcount, va_list args) { char *result; va_list ap; size_t totalsize; size_t i; char *p; /* Determine the total size. */ totalsize = 0; va_copy (ap, args); for (i = argcount; i > 0; i--) { const char *next = va_arg (ap, const char *); totalsize = xsum (totalsize, strlen (next)); } va_end (ap); /* Test for overflow in the summing pass above or in (totalsize + 1) below. Also, don't return a string longer than INT_MAX, for consistency with vasprintf(). */ if (totalsize == SIZE_MAX || totalsize > INT_MAX) { errno = EOVERFLOW; return NULL; } /* Allocate and fill the result string. */ result = XNMALLOC (totalsize + 1, char); p = result; for (i = argcount; i > 0; i--) { const char *next = va_arg (args, const char *); size_t len = strlen (next); memcpy (p, next, len); p += len; } *p = '\0'; return result; } char * xvasprintf (const char *format, va_list args) { char *result; /* Recognize the special case format = "%s...%s". It is a frequently used idiom for string concatenation and needs to be fast. We don't want to have a separate function xstrcat() for this purpose. */ { size_t argcount = 0; const char *f; for (f = format;;) { if (*f == '\0') /* Recognized the special case of string concatenation. */ return xstrcat (argcount, args); if (*f != '%') break; f++; if (*f != 's') break; f++; argcount++; } } if (vasprintf (&result, format, args) < 0) { if (errno == ENOMEM) xalloc_die (); return NULL; } return result; } pspp-1.0.1/gl/locale.in.h0000644000175000017500000001600213124536242012034 00000000000000/* A POSIX . Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #ifdef _GL_ALREADY_INCLUDING_LOCALE_H /* Special invocation conventions to handle Solaris header files (through Solaris 10) when combined with gettext's libintl.h. */ #@INCLUDE_NEXT@ @NEXT_LOCALE_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_LOCALE_H #define _GL_ALREADY_INCLUDING_LOCALE_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_LOCALE_H@ #undef _GL_ALREADY_INCLUDING_LOCALE_H #ifndef _@GUARD_PREFIX@_LOCALE_H #define _@GUARD_PREFIX@_LOCALE_H /* NetBSD 5.0 mis-defines NULL. */ #include /* Mac OS X 10.5 defines the locale_t type in . */ #if @HAVE_XLOCALE_H@ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C. On systems that don't define it, use the same value as GNU libintl. */ #if !defined LC_MESSAGES # define LC_MESSAGES 1729 #endif /* Bionic libc's 'struct lconv' is just a dummy. */ #if @REPLACE_STRUCT_LCONV@ # define lconv rpl_lconv struct lconv { /* All 'char *' are actually 'const char *'. */ /* Members that depend on the LC_NUMERIC category of the locale. See */ /* Symbol used as decimal point. */ char *decimal_point; /* Symbol used to separate groups of digits to the left of the decimal point. */ char *thousands_sep; /* Definition of the size of groups of digits to the left of the decimal point. */ char *grouping; /* Members that depend on the LC_MONETARY category of the locale. See */ /* Symbol used as decimal point. */ char *mon_decimal_point; /* Symbol used to separate groups of digits to the left of the decimal point. */ char *mon_thousands_sep; /* Definition of the size of groups of digits to the left of the decimal point. */ char *mon_grouping; /* Sign used to indicate a value >= 0. */ char *positive_sign; /* Sign used to indicate a value < 0. */ char *negative_sign; /* For formatting local currency. */ /* Currency symbol (3 characters) followed by separator (1 character). */ char *currency_symbol; /* Number of digits after the decimal point. */ char frac_digits; /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it comes after the number. */ char p_cs_precedes; /* For values >= 0: Position of the sign. */ char p_sign_posn; /* For values >= 0: Placement of spaces between currency symbol, sign, and number. */ char p_sep_by_space; /* For values < 0: 1 if the currency symbol precedes the number, 0 if it comes after the number. */ char n_cs_precedes; /* For values < 0: Position of the sign. */ char n_sign_posn; /* For values < 0: Placement of spaces between currency symbol, sign, and number. */ char n_sep_by_space; /* For formatting international currency. */ /* Currency symbol (3 characters) followed by separator (1 character). */ char *int_curr_symbol; /* Number of digits after the decimal point. */ char int_frac_digits; /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it comes after the number. */ char int_p_cs_precedes; /* For values >= 0: Position of the sign. */ char int_p_sign_posn; /* For values >= 0: Placement of spaces between currency symbol, sign, and number. */ char int_p_sep_by_space; /* For values < 0: 1 if the currency symbol precedes the number, 0 if it comes after the number. */ char int_n_cs_precedes; /* For values < 0: Position of the sign. */ char int_n_sign_posn; /* For values < 0: Placement of spaces between currency symbol, sign, and number. */ char int_n_sep_by_space; }; #endif #if @GNULIB_LOCALECONV@ # if @REPLACE_LOCALECONV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localeconv # define localeconv rpl_localeconv # endif _GL_FUNCDECL_RPL (localeconv, struct lconv *, (void)); _GL_CXXALIAS_RPL (localeconv, struct lconv *, (void)); # else _GL_CXXALIAS_SYS (localeconv, struct lconv *, (void)); # endif _GL_CXXALIASWARN (localeconv); #elif @REPLACE_STRUCT_LCONV@ # undef localeconv # define localeconv localeconv_used_without_requesting_gnulib_module_localeconv #elif defined GNULIB_POSIXCHECK # undef localeconv # if HAVE_RAW_DECL_LOCALECONV _GL_WARN_ON_USE (localeconv, "localeconv returns too few information on some platforms - " "use gnulib module localeconv for portability"); # endif #endif #if @GNULIB_SETLOCALE@ # if @REPLACE_SETLOCALE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setlocale # define setlocale rpl_setlocale # define GNULIB_defined_setlocale 1 # endif _GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale)); _GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale)); # else _GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); # endif _GL_CXXALIASWARN (setlocale); #elif defined GNULIB_POSIXCHECK # undef setlocale # if HAVE_RAW_DECL_SETLOCALE _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " "use gnulib module setlocale for portability"); # endif #endif #if @GNULIB_DUPLOCALE@ # if @REPLACE_DUPLOCALE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef duplocale # define duplocale rpl_duplocale # endif _GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); # else # if @HAVE_DUPLOCALE@ _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); # endif # endif # if @HAVE_DUPLOCALE@ _GL_CXXALIASWARN (duplocale); # endif #elif defined GNULIB_POSIXCHECK # undef duplocale # if HAVE_RAW_DECL_DUPLOCALE _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " "use gnulib module duplocale for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_LOCALE_H */ #endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */ #endif /* _@GUARD_PREFIX@_LOCALE_H */ pspp-1.0.1/gl/tempname.c0000644000175000017500000002167713124536243012010 00000000000000/* tempname.c - generate the name of a temporary file. Copyright (C) 1991-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Extracted from glibc sysdeps/posix/tempname.c. See also tmpdir.c. */ #if !_LIBC # include # include "tempname.h" #endif #include #include #include #ifndef __set_errno # define __set_errno(Val) errno = (Val) #endif #include #ifndef P_tmpdir # define P_tmpdir "/tmp" #endif #ifndef TMP_MAX # define TMP_MAX 238328 #endif #ifndef __GT_FILE # define __GT_FILE 0 # define __GT_DIR 1 # define __GT_NOCREATE 2 #endif #if !_LIBC && (GT_FILE != __GT_FILE || GT_DIR != __GT_DIR \ || GT_NOCREATE != __GT_NOCREATE) # error report this to bug-gnulib@gnu.org #endif #include #include #include #include #include #include #include #include #if _LIBC # define struct_stat64 struct stat64 #else # define struct_stat64 struct stat # define __try_tempname try_tempname # define __gen_tempname gen_tempname # define __getpid getpid # define __gettimeofday gettimeofday # define __mkdir mkdir # define __open open # define __lxstat64(version, file, buf) lstat (file, buf) # define __secure_getenv secure_getenv #endif #ifdef _LIBC # include # if HP_TIMING_AVAIL # define RANDOM_BITS(Var) \ if (__builtin_expect (value == UINT64_C (0), 0)) \ { \ /* If this is the first time this function is used initialize \ the variable we accumulate the value in to some somewhat \ random value. If we'd not do this programs at startup time \ might have a reduced set of possible names, at least on slow \ machines. */ \ struct timeval tv; \ __gettimeofday (&tv, NULL); \ value = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; \ } \ HP_TIMING_NOW (Var) # endif #endif /* Use the widest available unsigned type if uint64_t is not available. The algorithm below extracts a number less than 62**6 (approximately 2**35.725) from uint64_t, so ancient hosts where uintmax_t is only 32 bits lose about 3.725 bits of randomness, which is better than not having mkstemp at all. */ #if !defined UINT64_MAX && !defined uint64_t # define uint64_t uintmax_t #endif #if _LIBC /* Return nonzero if DIR is an existent directory. */ static int direxists (const char *dir) { struct_stat64 buf; return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode); } /* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is non-null and exists, uses it; otherwise uses the first of $TMPDIR, P_tmpdir, /tmp that exists. Copies into TMPL a template suitable for use with mk[s]temp. Will fail (-1) if DIR is non-null and doesn't exist, none of the searched dirs exists, or there's not enough space in TMPL. */ int __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, int try_tmpdir) { const char *d; size_t dlen, plen; if (!pfx || !pfx[0]) { pfx = "file"; plen = 4; } else { plen = strlen (pfx); if (plen > 5) plen = 5; } if (try_tmpdir) { d = __secure_getenv ("TMPDIR"); if (d != NULL && direxists (d)) dir = d; else if (dir != NULL && direxists (dir)) /* nothing */ ; else dir = NULL; } if (dir == NULL) { if (direxists (P_tmpdir)) dir = P_tmpdir; else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp")) dir = "/tmp"; else { __set_errno (ENOENT); return -1; } } dlen = strlen (dir); while (dlen > 1 && dir[dlen - 1] == '/') dlen--; /* remove trailing slashes */ /* check we have room for "${dir}/${pfx}XXXXXX\0" */ if (tmpl_len < dlen + 1 + plen + 6 + 1) { __set_errno (EINVAL); return -1; } sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx); return 0; } #endif /* _LIBC */ /* These are the characters used in temporary file names. */ static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; int __try_tempname (char *tmpl, int suffixlen, void *args, int (*tryfunc) (char *, void *)) { int len; char *XXXXXX; static uint64_t value; uint64_t random_time_bits; unsigned int count; int fd = -1; int save_errno = errno; /* A lower bound on the number of temporary files to attempt to generate. The maximum total number of temporary file names that can exist for a given template is 62**6. It should never be necessary to try all of these combinations. Instead if a reasonable number of names is tried (we define reasonable as 62**3) fail to give the system administrator the chance to remove the problems. */ #define ATTEMPTS_MIN (62 * 62 * 62) /* The number of times to attempt to generate a temporary file. To conform to POSIX, this must be no smaller than TMP_MAX. */ #if ATTEMPTS_MIN < TMP_MAX unsigned int attempts = TMP_MAX; #else unsigned int attempts = ATTEMPTS_MIN; #endif len = strlen (tmpl); if (len < 6 + suffixlen || memcmp (&tmpl[len - 6 - suffixlen], "XXXXXX", 6)) { __set_errno (EINVAL); return -1; } /* This is where the Xs start. */ XXXXXX = &tmpl[len - 6 - suffixlen]; /* Get some more or less random data. */ #ifdef RANDOM_BITS RANDOM_BITS (random_time_bits); #else { struct timeval tv; __gettimeofday (&tv, NULL); random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; } #endif value += random_time_bits ^ __getpid (); for (count = 0; count < attempts; value += 7777, ++count) { uint64_t v = value; /* Fill in the random bits. */ XXXXXX[0] = letters[v % 62]; v /= 62; XXXXXX[1] = letters[v % 62]; v /= 62; XXXXXX[2] = letters[v % 62]; v /= 62; XXXXXX[3] = letters[v % 62]; v /= 62; XXXXXX[4] = letters[v % 62]; v /= 62; XXXXXX[5] = letters[v % 62]; fd = tryfunc (tmpl, args); if (fd >= 0) { __set_errno (save_errno); return fd; } else if (errno != EEXIST) return -1; } /* We got out of the loop because we ran out of combinations to try. */ __set_errno (EEXIST); return -1; } static int try_file (char *tmpl, void *flags) { int *openflags = flags; return __open (tmpl, (*openflags & ~O_ACCMODE) | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); } static int try_dir (char *tmpl, void *flags _GL_UNUSED) { return __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR); } static int try_nocreate (char *tmpl, void *flags _GL_UNUSED) { struct_stat64 st; if (__lxstat64 (_STAT_VER, tmpl, &st) == 0) __set_errno (EEXIST); return errno == ENOENT ? 0 : -1; } /* Generate a temporary file name based on TMPL. TMPL must match the rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). The name constructed does not exist at the time of the call to __gen_tempname. TMPL is overwritten with the result. KIND may be one of: __GT_NOCREATE: simply verify that the name does not exist at the time of the call. __GT_FILE: create the file using open(O_CREAT|O_EXCL) and return a read-write fd. The file is mode 0600. __GT_DIR: create a directory, which will be mode 0700. We use a clever algorithm to get hard-to-predict names. */ int __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) { int (*tryfunc) (char *, void *); switch (kind) { case __GT_FILE: tryfunc = try_file; break; case __GT_DIR: tryfunc = try_dir; break; case __GT_NOCREATE: tryfunc = try_nocreate; break; default: assert (! "invalid KIND in __gen_tempname"); abort (); } return __try_tempname (tmpl, suffixlen, &flags, tryfunc); } pspp-1.0.1/gl/stdio.in.h0000644000175000017500000014433713124536243011735 00000000000000/* A GNU-like . Copyright (C) 2004, 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H /* Special invocation convention: - Inside glibc header files. - On OSF/1 5.1 we have a sequence of nested includes -> -> -> -> -> -> -> . In this situation, the functions are not yet declared, therefore we cannot provide the C++ aliases. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_STDIO_H #define _GL_ALREADY_INCLUDING_STDIO_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #undef _GL_ALREADY_INCLUDING_STDIO_H #ifndef _@GUARD_PREFIX@_STDIO_H #define _@GUARD_PREFIX@_STDIO_H /* Get va_list. Needed on many systems, including glibc 2.8. */ #include #include /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 and eglibc 2.11.2. May also define off_t to a 64-bit type on native Windows. */ #include /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif /* _GL_ATTRIBUTE_FORMAT_PRINTF indicates to GCC that the function takes a format string and arguments, where the format string directives are the ones standardized by ISO C99 and POSIX. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) #else # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) #endif /* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, except that it indicates to GCC that the supported format string directives are the ones of the system printf(), rather than the ones standardized by ISO C99 and POSIX. */ #if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU # define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) #else # define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) #endif /* _GL_ATTRIBUTE_FORMAT_SCANF indicates to GCC that the function takes a format string and arguments, where the format string directives are the ones standardized by ISO C99 and POSIX. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) # define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) #else # define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) #endif /* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, except that it indicates to GCC that the supported format string directives are the ones of the system scanf(), rather than the ones standardized by ISO C99 and POSIX. */ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) /* Solaris 10 declares renameat in , not in . */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ && ! defined __GLIBC__ # include #endif /* MSVC declares 'perror' in , not in . We must include it before we #define perror rpl_perror. */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_PERROR@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ && ! defined __GLIBC__ # include #endif /* MSVC declares 'remove' in , not in . We must include it before we #define remove rpl_remove. */ /* MSVC declares 'rename' in , not in . We must include it before we #define rename rpl_rename. */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_REMOVE@ || @GNULIB_RENAME@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ && ! defined __GLIBC__ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Macros for stringification. */ #define _GL_STDIO_STRINGIZE(token) #token #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) /* When also using extern inline, suppress the use of static inline in standard headers of problematic Apple configurations, as Libc at least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., . Perhaps Apple will fix this some day. */ #if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ && defined __GNUC__ && defined __STDC__) # undef putc_unlocked #endif #if @GNULIB_DPRINTF@ # if @REPLACE_DPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dprintf rpl_dprintf # endif _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); # else # if !@HAVE_DPRINTF@ _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); # endif _GL_CXXALIASWARN (dprintf); #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " "use gnulib module dprintf for portability"); # endif #endif #if @GNULIB_FCLOSE@ /* Close STREAM and its underlying file descriptor. */ # if @REPLACE_FCLOSE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fclose rpl_fclose # endif _GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); # else _GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); # endif _GL_CXXALIASWARN (fclose); #elif defined GNULIB_POSIXCHECK # undef fclose /* Assume fclose is always declared. */ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif #if @GNULIB_FDOPEN@ # if @REPLACE_FDOPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fdopen # define fdopen rpl_fdopen # endif _GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); # else _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); # endif _GL_CXXALIASWARN (fdopen); #elif defined GNULIB_POSIXCHECK # undef fdopen /* Assume fdopen is always declared. */ _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " "use gnulib module fdopen for portability"); #endif #if @GNULIB_FFLUSH@ /* Flush all pending data on STREAM according to POSIX rules. Both output and seekable input streams are supported. Note! LOSS OF DATA can occur if fflush is applied on an input stream that is _not_seekable_ or on an update stream that is _not_seekable_ and in which the most recent operation was input. Seekability can be tested with lseek(fileno(fp),0,SEEK_CUR). */ # if @REPLACE_FFLUSH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fflush rpl_fflush # endif _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); # else _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); # endif _GL_CXXALIASWARN (fflush); #elif defined GNULIB_POSIXCHECK # undef fflush /* Assume fflush is always declared. */ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " "use gnulib module fflush for portable POSIX compliance"); #endif #if @GNULIB_FGETC@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fgetc # define fgetc rpl_fgetc # endif _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); # else _GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); # endif _GL_CXXALIASWARN (fgetc); #endif #if @GNULIB_FGETS@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fgets # define fgets rpl_fgets # endif _GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream) _GL_ARG_NONNULL ((1, 3))); _GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream)); # else _GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream)); # endif _GL_CXXALIASWARN (fgets); #endif #if @GNULIB_FOPEN@ # if @REPLACE_FOPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen # endif _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); # else _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); # endif _GL_CXXALIASWARN (fopen); #elif defined GNULIB_POSIXCHECK # undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " "use gnulib module fopen for portability"); #endif #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ # if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fprintf rpl_fprintf # endif # define GNULIB_overrides_fprintf 1 # if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); # else _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); # endif _GL_CXXALIASWARN (fprintf); #endif #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_fprintf # undef fprintf # endif /* Assume fprintf is always declared. */ _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " "use gnulib module fprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_FPURGE@ /* Discard all pending buffered I/O data on STREAM. STREAM must not be wide-character oriented. When discarding pending output, the file position is set back to where it was before the write calls. When discarding pending input, the file position is advanced to match the end of the previously read input. Return 0 if successful. Upon error, return -1 and set errno. */ # if @REPLACE_FPURGE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fpurge rpl_fpurge # endif _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); # else # if !@HAVE_DECL_FPURGE@ _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); # endif _GL_CXXALIASWARN (fpurge); #elif defined GNULIB_POSIXCHECK # undef fpurge # if HAVE_RAW_DECL_FPURGE _GL_WARN_ON_USE (fpurge, "fpurge is not always present - " "use gnulib module fpurge for portability"); # endif #endif #if @GNULIB_FPUTC@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fputc # define fputc rpl_fputc # endif _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); # else _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); # endif _GL_CXXALIASWARN (fputc); #endif #if @GNULIB_FPUTS@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fputs # define fputs rpl_fputs # endif _GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); # else _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); # endif _GL_CXXALIASWARN (fputs); #endif #if @GNULIB_FREAD@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fread # define fread rpl_fread # endif _GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream) _GL_ARG_NONNULL ((4))); _GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); # else _GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); # endif _GL_CXXALIASWARN (fread); #endif #if @GNULIB_FREOPEN@ # if @REPLACE_FREOPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef freopen # define freopen rpl_freopen # endif _GL_FUNCDECL_RPL (freopen, FILE *, (const char *filename, const char *mode, FILE *stream) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (freopen, FILE *, (const char *filename, const char *mode, FILE *stream)); # else _GL_CXXALIAS_SYS (freopen, FILE *, (const char *filename, const char *mode, FILE *stream)); # endif _GL_CXXALIASWARN (freopen); #elif defined GNULIB_POSIXCHECK # undef freopen /* Assume freopen is always declared. */ _GL_WARN_ON_USE (freopen, "freopen on native Windows platforms is not POSIX compliant - " "use gnulib module freopen for portability"); #endif #if @GNULIB_FSCANF@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fscanf # define fscanf rpl_fscanf # endif _GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...)); # else _GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...)); # endif _GL_CXXALIASWARN (fscanf); #endif /* Set up the following warnings, based on which modules are in use. GNU Coding Standards discourage the use of fseek, since it imposes an arbitrary limitation on some 32-bit hosts. Remember that the fseek module depends on the fseeko module, so we only have three cases to consider: 1. The developer is not using either module. Issue a warning under GNULIB_POSIXCHECK for both functions, to remind them that both functions have bugs on some systems. _GL_NO_LARGE_FILES has no impact on this warning. 2. The developer is using both modules. They may be unaware of the arbitrary limitations of fseek, so issue a warning under GNULIB_POSIXCHECK. On the other hand, they may be using both modules intentionally, so the developer can define _GL_NO_LARGE_FILES in the compilation units where the use of fseek is safe, to silence the warning. 3. The developer is using the fseeko module, but not fseek. Gnulib guarantees that fseek will still work around platform bugs in that case, but we presume that the developer is aware of the pitfalls of fseek and was trying to avoid it, so issue a warning even when GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be defined to silence the warning in particular compilation units. In C++ compilations with GNULIB_NAMESPACE, in order to avoid that fseek gets defined as a macro, it is recommended that the developer uses the fseek module, even if he is not calling the fseek function. Most gnulib clients that perform stream operations should fall into category 3. */ #if @GNULIB_FSEEK@ # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 2, above. */ # undef fseek # endif # if @REPLACE_FSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fseek # define fseek rpl_fseek # endif _GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); # else _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); # endif _GL_CXXALIASWARN (fseek); #endif #if @GNULIB_FSEEKO@ # if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 3, above. */ # undef fseek # endif # if @REPLACE_FSEEKO@ /* Provide an fseeko function that is aware of a preceding fflush(), and which detects pipes. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fseeko # define fseeko rpl_fseeko # endif _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); # else # if ! @HAVE_DECL_FSEEKO@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); # endif _GL_CXXALIASWARN (fseeko); #elif defined GNULIB_POSIXCHECK # define _GL_FSEEK_WARN /* Category 1, above. */ # undef fseek # undef fseeko # if HAVE_RAW_DECL_FSEEKO _GL_WARN_ON_USE (fseeko, "fseeko is unportable - " "use gnulib module fseeko for portability"); # endif #endif #ifdef _GL_FSEEK_WARN # undef _GL_FSEEK_WARN /* Here, either fseek is undefined (but C89 guarantees that it is declared), or it is defined as rpl_fseek (declared above). */ _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " "on 32-bit platforms - " "use fseeko function for handling of large files"); #endif /* ftell, ftello. See the comments on fseek/fseeko. */ #if @GNULIB_FTELL@ # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 2, above. */ # undef ftell # endif # if @REPLACE_FTELL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ftell # define ftell rpl_ftell # endif _GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); # else _GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); # endif _GL_CXXALIASWARN (ftell); #endif #if @GNULIB_FTELLO@ # if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 3, above. */ # undef ftell # endif # if @REPLACE_FTELLO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ftello # define ftello rpl_ftello # endif _GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); # else # if ! @HAVE_DECL_FTELLO@ _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); # endif _GL_CXXALIASWARN (ftello); #elif defined GNULIB_POSIXCHECK # define _GL_FTELL_WARN /* Category 1, above. */ # undef ftell # undef ftello # if HAVE_RAW_DECL_FTELLO _GL_WARN_ON_USE (ftello, "ftello is unportable - " "use gnulib module ftello for portability"); # endif #endif #ifdef _GL_FTELL_WARN # undef _GL_FTELL_WARN /* Here, either ftell is undefined (but C89 guarantees that it is declared), or it is defined as rpl_ftell (declared above). */ _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " "on 32-bit platforms - " "use ftello function for handling of large files"); #endif #if @GNULIB_FWRITE@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fwrite # define fwrite rpl_fwrite # endif _GL_FUNCDECL_RPL (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream) _GL_ARG_NONNULL ((1, 4))); _GL_CXXALIAS_RPL (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream)); # else _GL_CXXALIAS_SYS (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream)); /* Work around bug 11959 when fortifying glibc 2.4 through 2.15 , which sometimes causes an unwanted diagnostic for fwrite calls. This affects only function declaration attributes under certain versions of gcc and clang, and is not needed for C++. */ # if (0 < __USE_FORTIFY_LEVEL \ && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ && !defined __cplusplus) # undef fwrite # undef fwrite_unlocked extern size_t __REDIRECT (rpl_fwrite, (const void *__restrict, size_t, size_t, FILE *__restrict), fwrite); extern size_t __REDIRECT (rpl_fwrite_unlocked, (const void *__restrict, size_t, size_t, FILE *__restrict), fwrite_unlocked); # define fwrite rpl_fwrite # define fwrite_unlocked rpl_fwrite_unlocked # endif # endif _GL_CXXALIASWARN (fwrite); #endif #if @GNULIB_GETC@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getc # define getc rpl_fgetc # endif _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); # else _GL_CXXALIAS_SYS (getc, int, (FILE *stream)); # endif _GL_CXXALIASWARN (getc); #endif #if @GNULIB_GETCHAR@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getchar # define getchar rpl_getchar # endif _GL_FUNCDECL_RPL (getchar, int, (void)); _GL_CXXALIAS_RPL (getchar, int, (void)); # else _GL_CXXALIAS_SYS (getchar, int, (void)); # endif _GL_CXXALIASWARN (getchar); #endif #if @GNULIB_GETDELIM@ /* Read input, up to (and including) the next occurrence of DELIMITER, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ # if @REPLACE_GETDELIM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getdelim # define getdelim rpl_getdelim # endif _GL_FUNCDECL_RPL (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream) _GL_ARG_NONNULL ((1, 2, 4))); _GL_CXXALIAS_RPL (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream)); # else # if !@HAVE_DECL_GETDELIM@ _GL_FUNCDECL_SYS (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream) _GL_ARG_NONNULL ((1, 2, 4))); # endif _GL_CXXALIAS_SYS (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream)); # endif _GL_CXXALIASWARN (getdelim); #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM _GL_WARN_ON_USE (getdelim, "getdelim is unportable - " "use gnulib module getdelim for portability"); # endif #endif #if @GNULIB_GETLINE@ /* Read a line, up to (and including) the next newline, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ # if @REPLACE_GETLINE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getline # define getline rpl_getline # endif _GL_FUNCDECL_RPL (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream) _GL_ARG_NONNULL ((1, 2, 3))); _GL_CXXALIAS_RPL (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream)); # else # if !@HAVE_DECL_GETLINE@ _GL_FUNCDECL_SYS (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream)); # endif # if @HAVE_DECL_GETLINE@ _GL_CXXALIASWARN (getline); # endif #elif defined GNULIB_POSIXCHECK # undef getline # if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is unportable - " "use gnulib module getline for portability"); # endif #endif /* It is very rare that the developer ever has full control of stdin, so any use of gets warrants an unconditional warning; besides, C11 removed it. */ #undef gets #if HAVE_RAW_DECL_GETS && !defined __cplusplus _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ struct obstack; /* Grow an obstack with formatted output. Return the number of bytes added to OBS. No trailing nul byte is added, and the object should be closed with obstack_finish before use. Upon memory allocation error, call obstack_alloc_failed_handler. Upon other error, return -1. */ # if @REPLACE_OBSTACK_PRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define obstack_printf rpl_obstack_printf # endif _GL_FUNCDECL_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...)); # else # if !@HAVE_DECL_OBSTACK_PRINTF@ _GL_FUNCDECL_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...)); # endif _GL_CXXALIASWARN (obstack_printf); # if @REPLACE_OBSTACK_PRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define obstack_vprintf rpl_obstack_vprintf # endif _GL_FUNCDECL_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); # else # if !@HAVE_DECL_OBSTACK_PRINTF@ _GL_FUNCDECL_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); # endif _GL_CXXALIASWARN (obstack_vprintf); #endif #if @GNULIB_PCLOSE@ # if !@HAVE_PCLOSE@ _GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); _GL_CXXALIASWARN (pclose); #elif defined GNULIB_POSIXCHECK # undef pclose # if HAVE_RAW_DECL_PCLOSE _GL_WARN_ON_USE (pclose, "pclose is unportable - " "use gnulib module pclose for more portability"); # endif #endif #if @GNULIB_PERROR@ /* Print a message to standard error, describing the value of ERRNO, (if STRING is not NULL and not empty) prefixed with STRING and ": ", and terminated with a newline. */ # if @REPLACE_PERROR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define perror rpl_perror # endif _GL_FUNCDECL_RPL (perror, void, (const char *string)); _GL_CXXALIAS_RPL (perror, void, (const char *string)); # else _GL_CXXALIAS_SYS (perror, void, (const char *string)); # endif _GL_CXXALIASWARN (perror); #elif defined GNULIB_POSIXCHECK # undef perror /* Assume perror is always declared. */ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " "use gnulib module perror for portability"); #endif #if @GNULIB_POPEN@ # if @REPLACE_POPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef popen # define popen rpl_popen # endif _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); # else # if !@HAVE_POPEN@ _GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); # endif _GL_CXXALIASWARN (popen); #elif defined GNULIB_POSIXCHECK # undef popen # if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); # endif #endif #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) # if defined __GNUC__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ # endif # if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *format, ...) __asm__ (@ASM_SYMBOL_PREFIX@ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *format, ...) __asm__ (@ASM_SYMBOL_PREFIX@ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); # else # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define printf rpl_printf # endif _GL_FUNCDECL_RPL (printf, int, (const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); # endif # define GNULIB_overrides_printf 1 # else _GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); # endif _GL_CXXALIASWARN (printf); #endif #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_printf # undef printf # endif /* Assume printf is always declared. */ _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " "use gnulib module printf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_PUTC@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putc # define putc rpl_fputc # endif _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); # else _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); # endif _GL_CXXALIASWARN (putc); #endif #if @GNULIB_PUTCHAR@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putchar # define putchar rpl_putchar # endif _GL_FUNCDECL_RPL (putchar, int, (int c)); _GL_CXXALIAS_RPL (putchar, int, (int c)); # else _GL_CXXALIAS_SYS (putchar, int, (int c)); # endif _GL_CXXALIASWARN (putchar); #endif #if @GNULIB_PUTS@ # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef puts # define puts rpl_puts # endif _GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (puts, int, (const char *string)); # else _GL_CXXALIAS_SYS (puts, int, (const char *string)); # endif _GL_CXXALIASWARN (puts); #endif #if @GNULIB_REMOVE@ # if @REPLACE_REMOVE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef remove # define remove rpl_remove # endif _GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (remove, int, (const char *name)); # else _GL_CXXALIAS_SYS (remove, int, (const char *name)); # endif _GL_CXXALIASWARN (remove); #elif defined GNULIB_POSIXCHECK # undef remove /* Assume remove is always declared. */ _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " "use gnulib module remove for more portability"); #endif #if @GNULIB_RENAME@ # if @REPLACE_RENAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef rename # define rename rpl_rename # endif _GL_FUNCDECL_RPL (rename, int, (const char *old_filename, const char *new_filename) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (rename, int, (const char *old_filename, const char *new_filename)); # else _GL_CXXALIAS_SYS (rename, int, (const char *old_filename, const char *new_filename)); # endif _GL_CXXALIASWARN (rename); #elif defined GNULIB_POSIXCHECK # undef rename /* Assume rename is always declared. */ _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " "use gnulib module rename for more portability"); #endif #if @GNULIB_RENAMEAT@ # if @REPLACE_RENAMEAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef renameat # define renameat rpl_renameat # endif _GL_FUNCDECL_RPL (renameat, int, (int fd1, char const *file1, int fd2, char const *file2) _GL_ARG_NONNULL ((2, 4))); _GL_CXXALIAS_RPL (renameat, int, (int fd1, char const *file1, int fd2, char const *file2)); # else # if !@HAVE_RENAMEAT@ _GL_FUNCDECL_SYS (renameat, int, (int fd1, char const *file1, int fd2, char const *file2) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (renameat, int, (int fd1, char const *file1, int fd2, char const *file2)); # endif _GL_CXXALIASWARN (renameat); #elif defined GNULIB_POSIXCHECK # undef renameat # if HAVE_RAW_DECL_RENAMEAT _GL_WARN_ON_USE (renameat, "renameat is not portable - " "use gnulib module renameat for portability"); # endif #endif #if @GNULIB_SCANF@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if defined __GNUC__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef scanf /* Don't break __attribute__((format(scanf,M,N))). */ # define scanf __scanf__ # endif _GL_FUNCDECL_RPL_1 (__scanf__, int, (const char *format, ...) __asm__ (@ASM_SYMBOL_PREFIX@ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...)); # else # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef scanf # define scanf rpl_scanf # endif _GL_FUNCDECL_RPL (scanf, int, (const char *format, ...) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (scanf, int, (const char *format, ...)); # endif # else _GL_CXXALIAS_SYS (scanf, int, (const char *format, ...)); # endif _GL_CXXALIASWARN (scanf); #endif #if @GNULIB_SNPRINTF@ # if @REPLACE_SNPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif _GL_FUNCDECL_RPL (snprintf, int, (char *str, size_t size, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (snprintf, int, (char *str, size_t size, const char *format, ...)); # else # if !@HAVE_DECL_SNPRINTF@ _GL_FUNCDECL_SYS (snprintf, int, (char *str, size_t size, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (snprintf, int, (char *str, size_t size, const char *format, ...)); # endif _GL_CXXALIASWARN (snprintf); #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " "use gnulib module snprintf for portability"); # endif #endif /* Some people would argue that all sprintf uses should be warned about (for example, OpenBSD issues a link warning for it), since it can cause security holes due to buffer overruns. However, we believe that sprintf can be used safely, and is more efficient than snprintf in those safe cases; and as proof of our belief, we use sprintf in several gnulib modules. So this header intentionally avoids adding a warning to sprintf except when GNULIB_POSIXCHECK is defined. */ #if @GNULIB_SPRINTF_POSIX@ # if @REPLACE_SPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); # else _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); # endif _GL_CXXALIASWARN (sprintf); #elif defined GNULIB_POSIXCHECK # undef sprintf /* Assume sprintf is always declared. */ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "use gnulib module sprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_TMPFILE@ # if @REPLACE_TMPFILE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define tmpfile rpl_tmpfile # endif _GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); # else _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); # endif _GL_CXXALIASWARN (tmpfile); #elif defined GNULIB_POSIXCHECK # undef tmpfile # if HAVE_RAW_DECL_TMPFILE _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " "use gnulib module tmpfile for portability"); # endif #endif #if @GNULIB_VASPRINTF@ /* Write formatted output to a string dynamically allocated with malloc(). If the memory allocation succeeds, store the address of the string in *RESULT and return the number of resulting bytes, excluding the trailing NUL. Upon memory allocation error, or some other error, return -1. */ # if @REPLACE_VASPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (asprintf, int, (char **result, const char *format, ...)); # else # if !@HAVE_VASPRINTF@ _GL_FUNCDECL_SYS (asprintf, int, (char **result, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (asprintf, int, (char **result, const char *format, ...)); # endif _GL_CXXALIASWARN (asprintf); # if @REPLACE_VASPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vasprintf, int, (char **result, const char *format, va_list args)); # else # if !@HAVE_VASPRINTF@ _GL_FUNCDECL_SYS (vasprintf, int, (char **result, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (vasprintf, int, (char **result, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vasprintf); #endif #if @GNULIB_VDPRINTF@ # if @REPLACE_VDPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vdprintf rpl_vdprintf # endif _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); # else # if !@HAVE_VDPRINTF@ _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((2))); # endif /* Need to cast, because on Solaris, the third parameter will likely be __va_list args. */ _GL_CXXALIAS_SYS_CAST (vdprintf, int, (int fd, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vdprintf); #elif defined GNULIB_POSIXCHECK # undef vdprintf # if HAVE_RAW_DECL_VDPRINTF _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " "use gnulib module vdprintf for portability"); # endif #endif #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vfprintf rpl_vfprintf # endif # define GNULIB_overrides_vfprintf 1 # if @GNULIB_VFPRINTF_POSIX@ _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); # else /* Need to cast, because on Solaris, the third parameter is __va_list args and GCC's fixincludes did not change this to __gnuc_va_list. */ _GL_CXXALIAS_SYS_CAST (vfprintf, int, (FILE *fp, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vfprintf); #endif #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_vfprintf # undef vfprintf # endif /* Assume vfprintf is always declared. */ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " "use gnulib module vfprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VFSCANF@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef vfscanf # define vfscanf rpl_vfscanf # endif _GL_FUNCDECL_RPL (vfscanf, int, (FILE *stream, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vfscanf, int, (FILE *stream, const char *format, va_list args)); # else _GL_CXXALIAS_SYS (vfscanf, int, (FILE *stream, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vfscanf); #endif #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vprintf rpl_vprintf # endif # define GNULIB_overrides_vprintf 1 # if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); # else /* Need to cast, because on Solaris, the second parameter is __va_list args and GCC's fixincludes did not change this to __gnuc_va_list. */ _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); # endif _GL_CXXALIASWARN (vprintf); #endif #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_vprintf # undef vprintf # endif /* Assume vprintf is always declared. */ _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " "use gnulib module vprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VSCANF@ # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef vscanf # define vscanf rpl_vscanf # endif _GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args)); # else _GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args)); # endif _GL_CXXALIASWARN (vscanf); #endif #if @GNULIB_VSNPRINTF@ # if @REPLACE_VSNPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif _GL_FUNCDECL_RPL (vsnprintf, int, (char *str, size_t size, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (vsnprintf, int, (char *str, size_t size, const char *format, va_list args)); # else # if !@HAVE_DECL_VSNPRINTF@ _GL_FUNCDECL_SYS (vsnprintf, int, (char *str, size_t size, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (vsnprintf, int, (char *str, size_t size, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vsnprintf); #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " "use gnulib module vsnprintf for portability"); # endif #endif #if @GNULIB_VSPRINTF_POSIX@ # if @REPLACE_VSPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif _GL_FUNCDECL_RPL (vsprintf, int, (char *str, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vsprintf, int, (char *str, const char *format, va_list args)); # else /* Need to cast, because on Solaris, the third parameter is __va_list args and GCC's fixincludes did not change this to __gnuc_va_list. */ _GL_CXXALIAS_SYS_CAST (vsprintf, int, (char *str, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vsprintf); #elif defined GNULIB_POSIXCHECK # undef vsprintf /* Assume vsprintf is always declared. */ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " "use gnulib module vsprintf-posix for portable " "POSIX compliance"); #endif #endif /* _@GUARD_PREFIX@_STDIO_H */ #endif /* _@GUARD_PREFIX@_STDIO_H */ #endif pspp-1.0.1/gl/_Noreturn.h0000644000175000017500000000046213124536241012145 00000000000000#if !defined _Noreturn && __STDC_VERSION__ < 201112 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif #endif pspp-1.0.1/gl/careadlinkat.h0000644000175000017500000000475413124536241012624 00000000000000/* Read symbolic links into a buffer without size limitation, relative to fd. Copyright (C) 2011-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef _GL_CAREADLINKAT_H #define _GL_CAREADLINKAT_H #include #include struct allocator; /* Assuming the current directory is FD, get the symbolic link value of FILENAME as a null-terminated string and put it into a buffer. If FD is AT_FDCWD, FILENAME is interpreted relative to the current working directory, as in openat. If the link is small enough to fit into BUFFER put it there. BUFFER's size is BUFFER_SIZE, and BUFFER can be null if BUFFER_SIZE is zero. If the link is not small, put it into a dynamically allocated buffer managed by ALLOC. It is the caller's responsibility to free the returned value if it is nonnull and is not BUFFER. The PREADLINKAT function specifies how to read links. It operates like POSIX readlinkat() but can assume that its first argument is the same as FD. If successful, return the buffer address; otherwise return NULL and set errno. */ char *careadlinkat (int fd, char const *filename, char *buffer, size_t buffer_size, struct allocator const *alloc, ssize_t (*preadlinkat) (int, char const *, char *, size_t)); /* Suitable value for careadlinkat's FD argument. */ #if HAVE_READLINKAT /* AT_FDCWD is declared in . */ #else /* Define AT_FDCWD independently, so that the careadlinkat module does not depend on the fcntl-h module. We might as well use the same value as fcntl-h. */ # ifndef AT_FDCWD # define AT_FDCWD (-3041965) # endif #endif #endif /* _GL_CAREADLINKAT_H */ pspp-1.0.1/gl/unistd.in.h0000644000175000017500000015355013124536243012116 00000000000000/* Substitute for and wrapper around . Copyright (C) 2003-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _@GUARD_PREFIX@_UNISTD_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #ifdef _GL_INCLUDING_UNISTD_H /* Special invocation convention: - On Mac OS X 10.3.9 we have a sequence of nested includes -> -> -> In this situation, the functions are not yet declared, therefore we cannot provide the C++ aliases. */ #@INCLUDE_NEXT@ @NEXT_UNISTD_H@ #else /* Normal invocation convention. */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ # define _GL_INCLUDING_UNISTD_H # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ # undef _GL_INCLUDING_UNISTD_H #endif /* Get all possible declarations of gethostname(). */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ && !defined _GL_INCLUDING_WINSOCK2_H # define _GL_INCLUDING_WINSOCK2_H # include # undef _GL_INCLUDING_WINSOCK2_H #endif #if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H #define _@GUARD_PREFIX@_UNISTD_H /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ #include /* mingw doesn't define the SEEK_* or *_FILENO macros in . */ /* MSVC declares 'unlink' in , not in . We must include it before we #define unlink rpl_unlink. */ /* Cygwin 1.7.1 declares symlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) \ || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ && defined __CYGWIN__)) \ && ! defined __GLIBC__ # include #endif /* Cygwin 1.7.1 declares unlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ && ! defined __GLIBC__ # include #endif /* mingw fails to declare _exit in . */ /* mingw, MSVC, BeOS, Haiku declare environ in , not in . */ /* Solaris declares getcwd not only in but also in . */ /* OSF Tru64 Unix cannot see gnulib rpl_strtod when system is included here. */ /* But avoid namespace pollution on glibc systems. */ #if !defined __GLIBC__ && !defined __osf__ # define __need_system_stdlib_h # include # undef __need_system_stdlib_h #endif /* Native Windows platforms declare chdir, getcwd, rmdir in and/or , not in . They also declare access(), chmod(), close(), dup(), dup2(), isatty(), lseek(), read(), unlink(), write() in . */ #if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) # include /* mingw32, mingw64 */ # include /* mingw64, MSVC 9 */ #elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \ || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include #endif /* AIX and OSF/1 5.1 declare getdomainname in , not in . NonStop Kernel declares gethostname in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ && !defined __GLIBC__ # include #endif /* MSVC defines off_t in . May also define off_t to a 64-bit type on native Windows. */ #if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@ /* Get off_t. */ # include #endif #if (@GNULIB_READ@ || @GNULIB_WRITE@ \ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) /* Get ssize_t. */ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems. */ #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT # include # include #endif #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_UNISTD_INLINE # define _GL_UNISTD_INLINE _GL_INLINE #endif /* Hide some function declarations from . */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef socket # define socket socket_used_without_including_sys_socket_h # undef connect # define connect connect_used_without_including_sys_socket_h # undef accept # define accept accept_used_without_including_sys_socket_h # undef bind # define bind bind_used_without_including_sys_socket_h # undef getpeername # define getpeername getpeername_used_without_including_sys_socket_h # undef getsockname # define getsockname getsockname_used_without_including_sys_socket_h # undef getsockopt # define getsockopt getsockopt_used_without_including_sys_socket_h # undef listen # define listen listen_used_without_including_sys_socket_h # undef recv # define recv recv_used_without_including_sys_socket_h # undef send # define send send_used_without_including_sys_socket_h # undef recvfrom # define recvfrom recvfrom_used_without_including_sys_socket_h # undef sendto # define sendto sendto_used_without_including_sys_socket_h # undef setsockopt # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h # else _GL_WARN_ON_USE (socket, "socket() used without including "); _GL_WARN_ON_USE (connect, "connect() used without including "); _GL_WARN_ON_USE (accept, "accept() used without including "); _GL_WARN_ON_USE (bind, "bind() used without including "); _GL_WARN_ON_USE (getpeername, "getpeername() used without including "); _GL_WARN_ON_USE (getsockname, "getsockname() used without including "); _GL_WARN_ON_USE (getsockopt, "getsockopt() used without including "); _GL_WARN_ON_USE (listen, "listen() used without including "); _GL_WARN_ON_USE (recv, "recv() used without including "); _GL_WARN_ON_USE (send, "send() used without including "); _GL_WARN_ON_USE (recvfrom, "recvfrom() used without including "); _GL_WARN_ON_USE (sendto, "sendto() used without including "); _GL_WARN_ON_USE (setsockopt, "setsockopt() used without including "); _GL_WARN_ON_USE (shutdown, "shutdown() used without including "); # endif # endif # if !defined _@GUARD_PREFIX@_SYS_SELECT_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef select # define select select_used_without_including_sys_select_h # else _GL_WARN_ON_USE (select, "select() used without including "); # endif # endif #endif /* OS/2 EMX lacks these macros. */ #ifndef STDIN_FILENO # define STDIN_FILENO 0 #endif #ifndef STDOUT_FILENO # define STDOUT_FILENO 1 #endif #ifndef STDERR_FILENO # define STDERR_FILENO 2 #endif /* Ensure *_OK macros exist. */ #ifndef F_OK # define F_OK 0 # define X_OK 1 # define W_OK 2 # define R_OK 4 #endif /* Declare overridden functions. */ #if defined GNULIB_POSIXCHECK /* The access() function is a security risk. */ _GL_WARN_ON_USE (access, "the access function is a security risk - " "use the gnulib module faccessat instead"); #endif #if @GNULIB_CHDIR@ _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIASWARN (chdir); #elif defined GNULIB_POSIXCHECK # undef chdir # if HAVE_RAW_DECL_CHDIR _GL_WARN_ON_USE (chown, "chdir is not always in - " "use gnulib module chdir for portability"); # endif #endif #if @GNULIB_CHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ # if @REPLACE_DUP2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup2 rpl_dup2 # endif _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); # else # if !@HAVE_DUP2@ _GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); # endif _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); # endif _GL_CXXALIASWARN (dup2); #elif defined GNULIB_POSIXCHECK # undef dup2 # if HAVE_RAW_DECL_DUP2 _GL_WARN_ON_USE (dup2, "dup2 is unportable - " "use gnulib module dup2 for portability"); # endif #endif #if @GNULIB_DUP3@ /* Copy the file descriptor OLDFD into file descriptor NEWFD, with the specified flags. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). Close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the Linux man page at . */ # if @HAVE_DUP3@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup3 rpl_dup3 # endif _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); # else _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); # endif _GL_CXXALIASWARN (dup3); #elif defined GNULIB_POSIXCHECK # undef dup3 # if HAVE_RAW_DECL_DUP3 _GL_WARN_ON_USE (dup3, "dup3 is unportable - " "use gnulib module dup3 for portability"); # endif #endif #if @GNULIB_ENVIRON@ # if !@HAVE_DECL_ENVIRON@ /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ # include # if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR # define _GL_USE_CRT_EXTERNS # endif # endif # ifdef _GL_USE_CRT_EXTERNS # include # define environ (*_NSGetEnviron ()) # else # ifdef __cplusplus extern "C" { # endif extern char **environ; # ifdef __cplusplus } # endif # endif # endif #elif defined GNULIB_POSIXCHECK # if HAVE_RAW_DECL_ENVIRON _GL_UNISTD_INLINE char *** rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is unportable - " "use gnulib module environ for portability"); # undef environ # define environ (*rpl_environ ()) # endif #endif #if @GNULIB_EUIDACCESS@ /* Like access(), except that it uses the effective user id and group id of the current process. */ # if !@HAVE_EUIDACCESS@ _GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); _GL_CXXALIASWARN (euidaccess); # if defined GNULIB_POSIXCHECK /* Like access(), this function is a security risk. */ _GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " "use the gnulib module faccessat instead"); # endif #elif defined GNULIB_POSIXCHECK # undef euidaccess # if HAVE_RAW_DECL_EUIDACCESS _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " "use gnulib module euidaccess for portability"); # endif #endif #if @GNULIB_FACCESSAT@ # if !@HAVE_FACCESSAT@ _GL_FUNCDECL_SYS (faccessat, int, (int fd, char const *file, int mode, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); _GL_CXXALIASWARN (faccessat); #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " "use gnulib module faccessat for portability"); # endif #endif #if @GNULIB_FCHDIR@ /* Change the process' current working directory to the directory on which the given file descriptor is open. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ # if ! @HAVE_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); /* Gnulib internal hooks needed to maintain the fchdir metadata. */ _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) _GL_ARG_NONNULL ((2)); _GL_EXTERN_C void _gl_unregister_fd (int fd); _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); _GL_EXTERN_C const char *_gl_directory_name (int fd); # else # if !@HAVE_DECL_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); # endif # endif _GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); _GL_CXXALIASWARN (fchdir); #elif defined GNULIB_POSIXCHECK # undef fchdir # if HAVE_RAW_DECL_FCHDIR _GL_WARN_ON_USE (fchdir, "fchdir is unportable - " "use gnulib module fchdir for portability"); # endif #endif #if @GNULIB_FCHOWNAT@ # if @REPLACE_FCHOWNAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fchownat # define fchownat rpl_fchownat # endif _GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag)); # else # if !@HAVE_FCHOWNAT@ _GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag)); # endif _GL_CXXALIASWARN (fchownat); #elif defined GNULIB_POSIXCHECK # undef fchownat # if HAVE_RAW_DECL_FCHOWNAT _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FDATASYNC@ /* Synchronize changes to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification . */ # if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@ _GL_FUNCDECL_SYS (fdatasync, int, (int fd)); # endif _GL_CXXALIAS_SYS (fdatasync, int, (int fd)); _GL_CXXALIASWARN (fdatasync); #elif defined GNULIB_POSIXCHECK # undef fdatasync # if HAVE_RAW_DECL_FDATASYNC _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " "use gnulib module fdatasync for portability"); # endif #endif #if @GNULIB_FSYNC@ /* Synchronize changes, including metadata, to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification . */ # if !@HAVE_FSYNC@ _GL_FUNCDECL_SYS (fsync, int, (int fd)); # endif _GL_CXXALIAS_SYS (fsync, int, (int fd)); _GL_CXXALIASWARN (fsync); #elif defined GNULIB_POSIXCHECK # undef fsync # if HAVE_RAW_DECL_FSYNC _GL_WARN_ON_USE (fsync, "fsync is unportable - " "use gnulib module fsync for portability"); # endif #endif #if @GNULIB_FTRUNCATE@ /* Change the size of the file to which FD is opened to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ # if @REPLACE_FTRUNCATE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ftruncate # define ftruncate rpl_ftruncate # endif _GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length)); _GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length)); # else # if !@HAVE_FTRUNCATE@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIASWARN (ftruncate); #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " "use gnulib module ftruncate for portability"); # endif #endif #if @GNULIB_GETCWD@ /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. See the POSIX:2008 specification . Additionally, the gnulib module 'getcwd' guarantees the following GNU extension: If BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ # if @REPLACE_GETCWD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getcwd rpl_getcwd # endif _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); # else /* Need to cast, because on mingw, the second parameter is int size. */ _GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); # endif _GL_CXXALIASWARN (getcwd); #elif defined GNULIB_POSIXCHECK # undef getcwd # if HAVE_RAW_DECL_GETCWD _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " "use gnulib module getcwd for portability"); # endif #endif #if @GNULIB_GETDOMAINNAME@ /* Return the NIS domain name of the machine. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. WARNING! The NIS domain name is usually the empty string or "(none)" when not using NIS. Put up to LEN bytes of the NIS domain name into NAME. Null terminate it if the name is shorter than LEN. If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @REPLACE_GETDOMAINNAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getdomainname # define getdomainname rpl_getdomainname # endif _GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); # else # if !@HAVE_DECL_GETDOMAINNAME@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (getdomainname); #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " "use gnulib module getdomainname for portability"); # endif #endif #if @GNULIB_GETDTABLESIZE@ /* Return the maximum number of file descriptors in the current process. In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ # if @REPLACE_GETDTABLESIZE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getdtablesize # define getdtablesize rpl_getdtablesize # endif _GL_FUNCDECL_RPL (getdtablesize, int, (void)); _GL_CXXALIAS_RPL (getdtablesize, int, (void)); # else # if !@HAVE_GETDTABLESIZE@ _GL_FUNCDECL_SYS (getdtablesize, int, (void)); # endif _GL_CXXALIAS_SYS (getdtablesize, int, (void)); # endif _GL_CXXALIASWARN (getdtablesize); #elif defined GNULIB_POSIXCHECK # undef getdtablesize # if HAVE_RAW_DECL_GETDTABLESIZE _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " "use gnulib module getdtablesize for portability"); # endif #endif #if @GNULIB_GETGROUPS@ /* Return the supplemental groups that the current process belongs to. It is unspecified whether the effective group id is in the list. If N is 0, return the group count; otherwise, N describes how many entries are available in GROUPS. Return -1 and set errno if N is not 0 and not large enough. Fails with ENOSYS on some systems. */ # if @REPLACE_GETGROUPS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getgroups # define getgroups rpl_getgroups # endif _GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); _GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); # else # if !@HAVE_GETGROUPS@ _GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); # endif _GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); # endif _GL_CXXALIASWARN (getgroups); #elif defined GNULIB_POSIXCHECK # undef getgroups # if HAVE_RAW_DECL_GETGROUPS _GL_WARN_ON_USE (getgroups, "getgroups is unportable - " "use gnulib module getgroups for portability"); # endif #endif #if @GNULIB_GETHOSTNAME@ /* Return the standard host name of the machine. WARNING! The host name may or may not be fully qualified. Put up to LEN bytes of the host name into NAME. Null terminate it if the name is shorter than LEN. If the host name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname rpl_gethostname # endif _GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); # else # if !@HAVE_GETHOSTNAME@ _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second parameter is int len. */ _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (gethostname); #elif @UNISTD_H_HAVE_WINSOCK2_H@ # undef gethostname # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname #elif defined GNULIB_POSIXCHECK # undef gethostname # if HAVE_RAW_DECL_GETHOSTNAME _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " "use gnulib module gethostname for portability"); # endif #endif #if @GNULIB_GETLOGIN@ /* Returns the user's login name, or NULL if it cannot be found. Upon error, returns NULL with errno set. See . Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if !@HAVE_DECL_GETLOGIN@ _GL_FUNCDECL_SYS (getlogin, char *, (void)); # endif _GL_CXXALIAS_SYS (getlogin, char *, (void)); _GL_CXXALIASWARN (getlogin); #elif defined GNULIB_POSIXCHECK # undef getlogin # if HAVE_RAW_DECL_GETLOGIN _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " "use gnulib module getlogin for portability"); # endif #endif #if @GNULIB_GETLOGIN_R@ /* Copies the user's login name to NAME. The array pointed to by NAME has room for SIZE bytes. Returns 0 if successful. Upon error, an error number is returned, or -1 in the case that the login name cannot be found but no specific error is provided (this case is hopefully rare but is left open by the POSIX spec). See . Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if @REPLACE_GETLOGIN_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getlogin_r rpl_getlogin_r # endif _GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); # else # if !@HAVE_DECL_GETLOGIN_R@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 10 systems, the second argument is int size. */ _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); # endif _GL_CXXALIASWARN (getlogin_r); #elif defined GNULIB_POSIXCHECK # undef getlogin_r # if HAVE_RAW_DECL_GETLOGIN_R _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " "use gnulib module getlogin_r for portability"); # endif #endif #if @GNULIB_GETPAGESIZE@ # if @REPLACE_GETPAGESIZE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize rpl_getpagesize # endif _GL_FUNCDECL_RPL (getpagesize, int, (void)); _GL_CXXALIAS_RPL (getpagesize, int, (void)); # else # if !@HAVE_GETPAGESIZE@ # if !defined getpagesize /* This is for POSIX systems. */ # if !defined _gl_getpagesize && defined _SC_PAGESIZE # if ! (defined __VMS && __VMS_VER < 70000000) # define _gl_getpagesize() sysconf (_SC_PAGESIZE) # endif # endif /* This is for older VMS. */ # if !defined _gl_getpagesize && defined __VMS # ifdef __ALPHA # define _gl_getpagesize() 8192 # else # define _gl_getpagesize() 512 # endif # endif /* This is for BeOS. */ # if !defined _gl_getpagesize && @HAVE_OS_H@ # include # if defined B_PAGE_SIZE # define _gl_getpagesize() B_PAGE_SIZE # endif # endif /* This is for AmigaOS4.0. */ # if !defined _gl_getpagesize && defined __amigaos4__ # define _gl_getpagesize() 2048 # endif /* This is for older Unix systems. */ # if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ # include # ifdef EXEC_PAGESIZE # define _gl_getpagesize() EXEC_PAGESIZE # else # ifdef NBPG # ifndef CLSIZE # define CLSIZE 1 # endif # define _gl_getpagesize() (NBPG * CLSIZE) # else # ifdef NBPC # define _gl_getpagesize() NBPC # endif # endif # endif # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize() _gl_getpagesize () # else # if !GNULIB_defined_getpagesize_function _GL_UNISTD_INLINE int getpagesize () { return _gl_getpagesize (); } # define GNULIB_defined_getpagesize_function 1 # endif # endif # endif # endif /* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ _GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); # endif # if @HAVE_DECL_GETPAGESIZE@ _GL_CXXALIASWARN (getpagesize); # endif #elif defined GNULIB_POSIXCHECK # undef getpagesize # if HAVE_RAW_DECL_GETPAGESIZE _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " "use gnulib module getpagesize for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (getusershell, char *, (void)); # endif _GL_CXXALIAS_SYS (getusershell, char *, (void)); _GL_CXXALIASWARN (getusershell); #elif defined GNULIB_POSIXCHECK # undef getusershell # if HAVE_RAW_DECL_GETUSERSHELL _GL_WARN_ON_USE (getusershell, "getusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Rewind to pointer that is advanced at each getusershell() call. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (setusershell, void, (void)); # endif _GL_CXXALIAS_SYS (setusershell, void, (void)); _GL_CXXALIASWARN (setusershell); #elif defined GNULIB_POSIXCHECK # undef setusershell # if HAVE_RAW_DECL_SETUSERSHELL _GL_WARN_ON_USE (setusershell, "setusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Free the pointer that is advanced at each getusershell() call and associated resources. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (endusershell, void, (void)); # endif _GL_CXXALIAS_SYS (endusershell, void, (void)); _GL_CXXALIASWARN (endusershell); #elif defined GNULIB_POSIXCHECK # undef endusershell # if HAVE_RAW_DECL_ENDUSERSHELL _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GROUP_MEMBER@ /* Determine whether group id is in calling user's group list. */ # if !@HAVE_GROUP_MEMBER@ _GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); # endif _GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); _GL_CXXALIASWARN (group_member); #elif defined GNULIB_POSIXCHECK # undef group_member # if HAVE_RAW_DECL_GROUP_MEMBER _GL_WARN_ON_USE (group_member, "group_member is unportable - " "use gnulib module group-member for portability"); # endif #endif #if @GNULIB_ISATTY@ # if @REPLACE_ISATTY@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef isatty # define isatty rpl_isatty # endif _GL_FUNCDECL_RPL (isatty, int, (int fd)); _GL_CXXALIAS_RPL (isatty, int, (int fd)); # else _GL_CXXALIAS_SYS (isatty, int, (int fd)); # endif _GL_CXXALIASWARN (isatty); #elif defined GNULIB_POSIXCHECK # undef isatty # if HAVE_RAW_DECL_ISATTY _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " "use gnulib module isatty for portability"); # endif #endif #if @GNULIB_LCHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Do not follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ # if @REPLACE_LCHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lchown # define lchown rpl_lchown # endif _GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); # else # if !@HAVE_LCHOWN@ _GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); # endif _GL_CXXALIASWARN (lchown); #elif defined GNULIB_POSIXCHECK # undef lchown # if HAVE_RAW_DECL_LCHOWN _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " "use gnulib module lchown for portability"); # endif #endif #if @GNULIB_LINK@ /* Create a new hard link for an existing file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification . */ # if @REPLACE_LINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define link rpl_link # endif _GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); # else # if !@HAVE_LINK@ _GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); # endif _GL_CXXALIASWARN (link); #elif defined GNULIB_POSIXCHECK # undef link # if HAVE_RAW_DECL_LINK _GL_WARN_ON_USE (link, "link is unportable - " "use gnulib module link for portability"); # endif #endif #if @GNULIB_LINKAT@ /* Create a new hard link for an existing file, relative to two directories. FLAG controls whether symlinks are followed. Return 0 if successful, otherwise -1 and errno set. */ # if @REPLACE_LINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef linkat # define linkat rpl_linkat # endif _GL_FUNCDECL_RPL (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4))); _GL_CXXALIAS_RPL (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # else # if !@HAVE_LINKAT@ _GL_FUNCDECL_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # endif _GL_CXXALIASWARN (linkat); #elif defined GNULIB_POSIXCHECK # undef linkat # if HAVE_RAW_DECL_LINKAT _GL_WARN_ON_USE (linkat, "linkat is unportable - " "use gnulib module linkat for portability"); # endif #endif #if @GNULIB_LSEEK@ /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. Return the new offset if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ # if @REPLACE_LSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lseek rpl_lseek # endif _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); # else _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); # endif _GL_CXXALIASWARN (lseek); #elif defined GNULIB_POSIXCHECK # undef lseek # if HAVE_RAW_DECL_LSEEK _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " "systems - use gnulib module lseek for portability"); # endif #endif #if @GNULIB_PIPE@ /* Create a pipe, defaulting to O_BINARY mode. Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. */ # if !@HAVE_PIPE@ _GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (pipe, int, (int fd[2])); _GL_CXXALIASWARN (pipe); #elif defined GNULIB_POSIXCHECK # undef pipe # if HAVE_RAW_DECL_PIPE _GL_WARN_ON_USE (pipe, "pipe is unportable - " "use gnulib module pipe-posix for portability"); # endif #endif #if @GNULIB_PIPE2@ /* Create a pipe, applying the given flags when opening the read-end of the pipe and the write-end of the pipe. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. See also the Linux man page at . */ # if @HAVE_PIPE2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pipe2 rpl_pipe2 # endif _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); # else _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); # endif _GL_CXXALIASWARN (pipe2); #elif defined GNULIB_POSIXCHECK # undef pipe2 # if HAVE_RAW_DECL_PIPE2 _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " "use gnulib module pipe2 for portability"); # endif #endif #if @GNULIB_PREAD@ /* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. Return the number of bytes placed into BUF if successful, otherwise set errno and return -1. 0 indicates EOF. See the POSIX:2008 specification . */ # if @REPLACE_PREAD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pread # define pread rpl_pread # endif _GL_FUNCDECL_RPL (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # else # if !@HAVE_PREAD@ _GL_FUNCDECL_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # endif _GL_CXXALIASWARN (pread); #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD _GL_WARN_ON_USE (pread, "pread is unportable - " "use gnulib module pread for portability"); # endif #endif #if @GNULIB_PWRITE@ /* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. Return the number of bytes written if successful, otherwise set errno and return -1. 0 indicates nothing written. See the POSIX:2008 specification . */ # if @REPLACE_PWRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pwrite # define pwrite rpl_pwrite # endif _GL_FUNCDECL_RPL (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # else # if !@HAVE_PWRITE@ _GL_FUNCDECL_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # endif _GL_CXXALIASWARN (pwrite); #elif defined GNULIB_POSIXCHECK # undef pwrite # if HAVE_RAW_DECL_PWRITE _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " "use gnulib module pwrite for portability"); # endif #endif #if @GNULIB_READ@ /* Read up to COUNT bytes from file descriptor FD into the buffer starting at BUF. See the POSIX:2008 specification . */ # if @REPLACE_READ@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef read # define read rpl_read # endif _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); # else /* Need to cast, because on mingw, the third parameter is unsigned int count and the return type is 'int'. */ _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); # endif _GL_CXXALIASWARN (read); #endif #if @GNULIB_READLINK@ /* Read the contents of the symbolic link FILE and place the first BUFSIZE bytes of it into BUF. Return the number of bytes placed into BUF if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ # if @REPLACE_READLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define readlink rpl_readlink # endif _GL_FUNCDECL_RPL (readlink, ssize_t, (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (readlink, ssize_t, (const char *file, char *buf, size_t bufsize)); # else # if !@HAVE_READLINK@ _GL_FUNCDECL_SYS (readlink, ssize_t, (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (readlink, ssize_t, (const char *file, char *buf, size_t bufsize)); # endif _GL_CXXALIASWARN (readlink); #elif defined GNULIB_POSIXCHECK # undef readlink # if HAVE_RAW_DECL_READLINK _GL_WARN_ON_USE (readlink, "readlink is unportable - " "use gnulib module readlink for portability"); # endif #endif #if @GNULIB_READLINKAT@ # if @REPLACE_READLINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define readlinkat rpl_readlinkat # endif _GL_FUNCDECL_RPL (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len)); # else # if !@HAVE_READLINKAT@ _GL_FUNCDECL_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len)); # endif _GL_CXXALIASWARN (readlinkat); #elif defined GNULIB_POSIXCHECK # undef readlinkat # if HAVE_RAW_DECL_READLINKAT _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " "use gnulib module readlinkat for portability"); # endif #endif #if @GNULIB_RMDIR@ /* Remove the directory DIR. */ # if @REPLACE_RMDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define rmdir rpl_rmdir # endif _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); # else _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); # endif _GL_CXXALIASWARN (rmdir); #elif defined GNULIB_POSIXCHECK # undef rmdir # if HAVE_RAW_DECL_RMDIR _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " "use gnulib module rmdir for portability"); # endif #endif #if @GNULIB_SETHOSTNAME@ /* Set the host name of the machine. The host name may or may not be fully qualified. Put LEN bytes of NAME into the host name. Return 0 if successful, otherwise, set errno and return -1. Platforms with no ability to set the hostname return -1 and set errno = ENOSYS. */ # if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@ _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 and FreeBSD 6.4 the second parameter is int. On Solaris 11 2011-10, the first parameter is not const. */ _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); _GL_CXXALIASWARN (sethostname); #elif defined GNULIB_POSIXCHECK # undef sethostname # if HAVE_RAW_DECL_SETHOSTNAME _GL_WARN_ON_USE (sethostname, "sethostname is unportable - " "use gnulib module sethostname for portability"); # endif #endif #if @GNULIB_SLEEP@ /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. See the POSIX:2008 specification . */ # if @REPLACE_SLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sleep # define sleep rpl_sleep # endif _GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); _GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); # else # if !@HAVE_SLEEP@ _GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); # endif _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); # endif _GL_CXXALIASWARN (sleep); #elif defined GNULIB_POSIXCHECK # undef sleep # if HAVE_RAW_DECL_SLEEP _GL_WARN_ON_USE (sleep, "sleep is unportable - " "use gnulib module sleep for portability"); # endif #endif #if @GNULIB_SYMLINK@ # if @REPLACE_SYMLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef symlink # define symlink rpl_symlink # endif _GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); # else # if !@HAVE_SYMLINK@ _GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); # endif _GL_CXXALIASWARN (symlink); #elif defined GNULIB_POSIXCHECK # undef symlink # if HAVE_RAW_DECL_SYMLINK _GL_WARN_ON_USE (symlink, "symlink is not portable - " "use gnulib module symlink for portability"); # endif #endif #if @GNULIB_SYMLINKAT@ # if @REPLACE_SYMLINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef symlinkat # define symlinkat rpl_symlinkat # endif _GL_FUNCDECL_RPL (symlinkat, int, (char const *contents, int fd, char const *file) _GL_ARG_NONNULL ((1, 3))); _GL_CXXALIAS_RPL (symlinkat, int, (char const *contents, int fd, char const *file)); # else # if !@HAVE_SYMLINKAT@ _GL_FUNCDECL_SYS (symlinkat, int, (char const *contents, int fd, char const *file) _GL_ARG_NONNULL ((1, 3))); # endif _GL_CXXALIAS_SYS (symlinkat, int, (char const *contents, int fd, char const *file)); # endif _GL_CXXALIASWARN (symlinkat); #elif defined GNULIB_POSIXCHECK # undef symlinkat # if HAVE_RAW_DECL_SYMLINKAT _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " "use gnulib module symlinkat for portability"); # endif #endif #if @GNULIB_TRUNCATE@ /* Change the size of the file designated by FILENAME to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ # if @REPLACE_TRUNCATE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef truncate # define truncate rpl_truncate # endif _GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length)); # else # if !@HAVE_TRUNCATE@ _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); # endif _GL_CXXALIASWARN (truncate); #elif defined GNULIB_POSIXCHECK # undef truncate # if HAVE_RAW_DECL_TRUNCATE _GL_WARN_ON_USE (truncate, "truncate is unportable - " "use gnulib module truncate for portability"); # endif #endif #if @GNULIB_TTYNAME_R@ /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ # if @REPLACE_TTYNAME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ttyname_r # define ttyname_r rpl_ttyname_r # endif _GL_FUNCDECL_RPL (ttyname_r, int, (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (ttyname_r, int, (int fd, char *buf, size_t buflen)); # else # if !@HAVE_DECL_TTYNAME_R@ _GL_FUNCDECL_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen)); # endif _GL_CXXALIASWARN (ttyname_r); #elif defined GNULIB_POSIXCHECK # undef ttyname_r # if HAVE_RAW_DECL_TTYNAME_R _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " "use gnulib module ttyname_r for portability"); # endif #endif #if @GNULIB_UNLINK@ # if @REPLACE_UNLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlink # define unlink rpl_unlink # endif _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unlink, int, (char const *file)); # else _GL_CXXALIAS_SYS (unlink, int, (char const *file)); # endif _GL_CXXALIASWARN (unlink); #elif defined GNULIB_POSIXCHECK # undef unlink # if HAVE_RAW_DECL_UNLINK _GL_WARN_ON_USE (unlink, "unlink is not portable - " "use gnulib module unlink for portability"); # endif #endif #if @GNULIB_UNLINKAT@ # if @REPLACE_UNLINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlinkat # define unlinkat rpl_unlinkat # endif _GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); # else # if !@HAVE_UNLINKAT@ _GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); # endif _GL_CXXALIASWARN (unlinkat); #elif defined GNULIB_POSIXCHECK # undef unlinkat # if HAVE_RAW_DECL_UNLINKAT _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_USLEEP@ /* Pause the execution of the current thread for N microseconds. Returns 0 on completion, or -1 on range error. See the POSIX:2001 specification . */ # if @REPLACE_USLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef usleep # define usleep rpl_usleep # endif _GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); # else # if !@HAVE_USLEEP@ _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); # endif _GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); # endif _GL_CXXALIASWARN (usleep); #elif defined GNULIB_POSIXCHECK # undef usleep # if HAVE_RAW_DECL_USLEEP _GL_WARN_ON_USE (usleep, "usleep is unportable - " "use gnulib module usleep for portability"); # endif #endif #if @GNULIB_WRITE@ /* Write up to COUNT bytes starting at BUF to file descriptor FD. See the POSIX:2008 specification . */ # if @REPLACE_WRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef write # define write rpl_write # endif _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); # else /* Need to cast, because on mingw, the third parameter is unsigned int count and the return type is 'int'. */ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif _GL_INLINE_HEADER_END #endif /* _@GUARD_PREFIX@_UNISTD_H */ #endif /* _GL_INCLUDING_UNISTD_H */ #endif /* _@GUARD_PREFIX@_UNISTD_H */ pspp-1.0.1/gl/wcwidth.c0000644000175000017500000000277713124536243011653 00000000000000/* Determine the number of screen columns needed for a character. Copyright (C) 2006-2007, 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include /* Get iswprint. */ #include #include "localcharset.h" #include "streq.h" #include "uniwidth.h" int wcwidth (wchar_t wc) #undef wcwidth { /* In UTF-8 locales, use a Unicode aware width function. */ const char *encoding = locale_charset (); if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0)) { /* We assume that in a UTF-8 locale, a wide character is the same as a Unicode character. */ return uc_width (wc, encoding); } else { /* Otherwise, fall back to the system's wcwidth function. */ #if HAVE_WCWIDTH return wcwidth (wc); #else return wc == 0 ? 0 : iswprint (wc) ? 1 : -1; #endif } } pspp-1.0.1/gl/sys_socket.c0000644000175000017500000000015713020461274012352 00000000000000#include #define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE #include "sys/socket.h" typedef int dummy; pspp-1.0.1/gl/safe-write.c0000644000175000017500000000145213124536243012235 00000000000000/* An interface to write that retries after interrupts. Copyright (C) 2002, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #define SAFE_WRITE #include "safe-read.c" pspp-1.0.1/gl/dirname.c0000644000175000017500000000226313124536241011605 00000000000000/* dirname.c -- return all but the last element in a file name Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include "dirname.h" #include #include #include "xalloc.h" /* Just like mdir_name (dirname-lgpl.c), except, rather than returning NULL upon malloc failure, here, we report the "memory exhausted" condition and exit. */ char * dir_name (char const *file) { char *result = mdir_name (file); if (!result) xalloc_die (); return result; } pspp-1.0.1/gl/rijndael-api-fst.h0000644000175000017500000002006213124536243013323 00000000000000/* rijndael-api-fst.h --- Rijndael cipher implementation. * Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. * * This file is free software; you can 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, or (at your * option) any later version. * * This file is distributed in the hope that 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 file; if not, see . * */ /* Adapted for gnulib by Simon Josefsson. */ /** * rijndael-api-fst.h * * @version 2.9 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. * * Acknowledgements: * * We are deeply indebted to the following people for their bug reports, * fixes, and improvement suggestions to this implementation. Though we * tried to list all contributions, we apologise in advance for any * missing reference. * * Andrew Bales * Markus Friedl * John Skodon */ #ifndef __RIJNDAEL_API_FST_H #define __RIJNDAEL_API_FST_H #include "rijndael-alg-fst.h" #include /* Default number of bits in a cipher block */ #define RIJNDAEL_BITSPERBLOCK 128 /* Number of ASCII char's needed to represent a key */ #define RIJNDAEL_MAX_KEY_SIZE 64 /* Number bytes needed to represent an IV */ #define RIJNDAEL_MAX_IV_SIZE 16 typedef enum { /* Key direction is invalid, e.g., unknown value */ RIJNDAEL_BAD_KEY_DIR = -1, /* Key material not of correct length */ RIJNDAEL_BAD_KEY_MAT = -2, /* Key passed is not valid */ RIJNDAEL_BAD_KEY_INSTANCE = -3, /* Params struct passed to cipherInit invalid */ RIJNDAEL_BAD_CIPHER_MODE = -4, /* Cipher in wrong state (e.g., not initialized) */ RIJNDAEL_BAD_CIPHER_STATE = -5, RIJNDAEL_BAD_BLOCK_LENGTH = -6, RIJNDAEL_BAD_CIPHER_INSTANCE = -7, /* Data contents are invalid, e.g., invalid padding */ RIJNDAEL_BAD_DATA = -8, /* Unknown error */ RIJNDAEL_BAD_OTHER = -9 } rijndael_rc; typedef enum { RIJNDAEL_DIR_ENCRYPT = 0, /* Are we encrypting? */ RIJNDAEL_DIR_DECRYPT = 1 /* Are we decrypting? */ } rijndael_direction; typedef enum { RIJNDAEL_MODE_ECB = 1, /* Are we ciphering in ECB mode? */ RIJNDAEL_MODE_CBC = 2, /* Are we ciphering in CBC mode? */ RIJNDAEL_MODE_CFB1 = 3 /* Are we ciphering in 1-bit CFB mode? */ } rijndael_mode; /* The structure for key information */ typedef struct { /* Key used for encrypting or decrypting? */ rijndael_direction direction; /* Length of the key */ size_t keyLen; /* Raw key data in ASCII, e.g., user input or KAT values */ char keyMaterial[RIJNDAEL_MAX_KEY_SIZE + 1]; /* key-length-dependent number of rounds */ int Nr; /* key schedule */ uint32_t rk[4 * (RIJNDAEL_MAXNR + 1)]; /* CFB1 key schedule (encryption only) */ uint32_t ek[4 * (RIJNDAEL_MAXNR + 1)]; } rijndaelKeyInstance; /* The structure for cipher information */ typedef struct { /* changed order of the components */ rijndael_mode mode; /* MODE_ECB, MODE_CBC, or MODE_CFB1 */ /* A possible Initialization Vector for ciphering */ char IV[RIJNDAEL_MAX_IV_SIZE]; } rijndaelCipherInstance; /* Function prototypes */ /* Create KEY, for encryption or decryption depending on DIRECTION, from KEYMATERIAL, a hex string, of KEYLEN size. KEYLEN should be 128, 192 or 256. Returns 0 on success, or an error code. */ extern rijndael_rc rijndaelMakeKey (rijndaelKeyInstance *key, rijndael_direction direction, size_t keyLen, const char *keyMaterial); /* Initialize cipher state CIPHER for encryption MODE (e.g., RIJNDAEL_MODE_CBC) with initialization vector IV, a hex string of 2*RIJNDAEL_MAX_IV_SIZE length. IV may be NULL for modes that do not need an IV (i.e., RIJNDAEL_MODE_ECB). */ extern rijndael_rc rijndaelCipherInit (rijndaelCipherInstance *cipher, rijndael_mode mode, const char *IV); /* Encrypt data in INPUT, of INPUTLEN/8 bytes length, placing the output in the pre-allocated OUTBUFFER which must hold at least INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be initialized with rijndaelCipherInit before calling this function. The encryption KEY must be initialized with rijndaelMakeKey before calling this function. Return the number of bits written, or a negative rijndael_rc error code. */ extern int rijndaelBlockEncrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputLen, char *outBuffer); /* Encrypt data in INPUT, of INPUTOCTETS bytes length, placing the output in the pre-allocated OUTBUFFER which must hold at least INPUTOCTETS aligned to the next block size boundary. Ciphertext-Stealing as described in RFC 2040 is used to encrypt partial blocks. The CIPHER is used as state, and must be initialized with rijndaelCipherInit before calling this function. The encryption KEY must be initialized with rijndaelMakeKey before calling this function. Return the number of bits written, or a negative rijndael_rc error code. */ extern int rijndaelPadEncrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputOctets, char *outBuffer); /* Decrypt data in INPUT, of INPUTLEN/8 bytes length, placing the output in the pre-allocated OUTBUFFER which must hold at least INPUTLEN/8 bytes of data. The CIPHER is used as state, and must be initialized with rijndaelCipherInit before calling this function. The encryption KEY must be initialized with rijndaelMakeKey before calling this function. Return the number of bits written, or a negative rijndael_rc error code. */ extern int rijndaelBlockDecrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputLen, char *outBuffer); /* Decrypt data in INPUT, of INPUTOCTETS bytes length, placing the output in the pre-allocated OUTBUFFER which must hold at least INPUTOCTETS aligned to the next block size boundary. Ciphertext-Stealing as described in RFC 2040 is used to encrypt partial blocks. The CIPHER is used as state, and must be initialized with rijndaelCipherInit before calling this function. The encryption KEY must be initialized with rijndaelMakeKey before calling this function. Return the number of bits written, or a negative rijndael_rc error code. */ extern int rijndaelPadDecrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputOctets, char *outBuffer); #endif /* __RIJNDAEL_API_FST_H */ pspp-1.0.1/gl/version-etc.h0000644000175000017500000000555513124536243012442 00000000000000/* Print --version and bug-reporting information in a consistent format. Copyright (C) 1999, 2003, 2005, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Jim Meyering. */ #ifndef VERSION_ETC_H # define VERSION_ETC_H 1 # include # include /* The 'sentinel' attribute was added in gcc 4.0. */ #ifndef _GL_ATTRIBUTE_SENTINEL # if 4 <= __GNUC__ # define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__)) # else # define _GL_ATTRIBUTE_SENTINEL /* empty */ # endif #endif extern const char version_etc_copyright[]; /* The three functions below display the --version information in the standard way: command and package names, package version, followed by a short GPLv3+ notice and a list of up to 10 author names. If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of the program. The formats are therefore: PACKAGE VERSION or COMMAND_NAME (PACKAGE) VERSION. The functions differ in the way they are passed author names: */ /* N_AUTHORS names are supplied in array AUTHORS. */ extern void version_etc_arn (FILE *stream, const char *command_name, const char *package, const char *version, const char * const * authors, size_t n_authors); /* Names are passed in the NULL-terminated array AUTHORS. */ extern void version_etc_ar (FILE *stream, const char *command_name, const char *package, const char *version, const char * const * authors); /* Names are passed in the NULL-terminated va_list. */ extern void version_etc_va (FILE *stream, const char *command_name, const char *package, const char *version, va_list authors); /* Names are passed as separate arguments, with an additional NULL argument at the end. */ extern void version_etc (FILE *stream, const char *command_name, const char *package, const char *version, /* const char *author1, ..., NULL */ ...) _GL_ATTRIBUTE_SENTINEL; /* Display the usual "Report bugs to" stanza. */ extern void emit_bug_reporting_address (void); #endif /* VERSION_ETC_H */ pspp-1.0.1/gl/minmax.h0000644000175000017500000000447013124536242011467 00000000000000/* MIN, MAX macros. Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _MINMAX_H #define _MINMAX_H /* Note: MIN, MAX are also defined in on some systems (glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about MIN, MAX macro redefinitions on some systems; the workaround is to #include this file as the last one among the #include list. */ /* Before we define the following symbols we get the file since otherwise we get redefinitions on some systems if is included after this file. Likewise for . If more than one of these system headers define MIN and MAX, pick just one of the headers (because the definitions most likely are the same). */ #if HAVE_MINMAX_IN_LIMITS_H # include #elif HAVE_MINMAX_IN_SYS_PARAM_H # include #endif /* Note: MIN and MAX should be used with two arguments of the same type. They might not return the minimum and maximum of their two arguments, if the arguments have different types or have unusual floating-point values. For example, on a typical host with 32-bit 'int', 64-bit 'long long', and 64-bit IEEE 754 'double' types: MAX (-1, 2147483648) returns 4294967295. MAX (9007199254740992.0, 9007199254740993) returns 9007199254740992.0. MAX (NaN, 0.0) returns 0.0. MAX (+0.0, -0.0) returns -0.0. and in each case the answer is in some sense bogus. */ /* MAX(a,b) returns the maximum of A and B. */ #ifndef MAX # define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif /* MIN(a,b) returns the minimum of A and B. */ #ifndef MIN # define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif #endif /* _MINMAX_H */ pspp-1.0.1/gl/getdtablesize.c0000644000175000017500000000657213132510756013025 00000000000000/* getdtablesize() function: Return maximum possible file descriptor value + 1. Copyright (C) 2008-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 . */ #include /* Specification. */ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # if HAVE_MSVC_INVALID_PARAMETER_HANDLER # include "msvc-inval.h" # endif # if HAVE_MSVC_INVALID_PARAMETER_HANDLER static int _setmaxstdio_nothrow (int newmax) { int result; TRY_MSVC_INVAL { result = _setmaxstdio (newmax); } CATCH_MSVC_INVAL { result = -1; } DONE_MSVC_INVAL; return result; } # else # define _setmaxstdio_nothrow _setmaxstdio # endif /* Cache for the previous getdtablesize () result. Safe to cache because Windows also lacks setrlimit. */ static int dtablesize; int getdtablesize (void) { if (dtablesize == 0) { /* We are looking for the number N such that the valid file descriptors are 0..N-1. It can be obtained through a loop as follows: { int fd; for (fd = 3; fd < 65536; fd++) if (dup2 (0, fd) == -1) break; return fd; } On Windows XP, the result is 2048. The drawback of this loop is that it allocates memory for a libc internal array that is never freed. The number N can also be obtained as the upper bound for _getmaxstdio (). _getmaxstdio () returns the maximum number of open FILE objects. The sanity check in _setmaxstdio reveals the maximum number of file descriptors. This too allocates memory, but it is freed when we call _setmaxstdio with the original value. */ int orig_max_stdio = _getmaxstdio (); unsigned int bound; for (bound = 0x10000; _setmaxstdio_nothrow (bound) < 0; bound = bound / 2) ; _setmaxstdio_nothrow (orig_max_stdio); dtablesize = bound; } return dtablesize; } #else # include # include # ifndef RLIM_SAVED_CUR # define RLIM_SAVED_CUR RLIM_INFINITY # endif # ifndef RLIM_SAVED_MAX # define RLIM_SAVED_MAX RLIM_INFINITY # endif # ifdef __CYGWIN__ /* Cygwin 1.7.25 auto-increases the RLIMIT_NOFILE soft limit until it hits the compile-time constant hard limit of 3200. We might as well just report the hard limit. */ # define rlim_cur rlim_max # endif int getdtablesize (void) { struct rlimit lim; if (getrlimit (RLIMIT_NOFILE, &lim) == 0 && 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX && lim.rlim_cur != RLIM_INFINITY && lim.rlim_cur != RLIM_SAVED_CUR && lim.rlim_cur != RLIM_SAVED_MAX) return lim.rlim_cur; return INT_MAX; } #endif pspp-1.0.1/gl/md4.c0000644000175000017500000002536513124536242010663 00000000000000/* Functions to compute MD4 message digest of files or memory blocks. according to the definition of MD4 in RFC 1320 from April 1992. Copyright (C) 1995-1997, 1999-2003, 2005-2006, 2008-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Adapted by Simon Josefsson from gnulib md5.? and Libgcrypt cipher/md4.c . */ #include #include "md4.h" #include #include #include #include #include #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif #ifdef WORDS_BIGENDIAN # define SWAP(n) \ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) #else # define SWAP(n) (n) #endif #define BLOCKSIZE 32768 #if BLOCKSIZE % 64 != 0 # error "invalid BLOCKSIZE" #endif /* This array contains the bytes used to pad the buffer to the next 64-byte boundary. (RFC 1320, 3.1: Step 1) */ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; /* Initialize structure containing state of computation. (RFC 1320, 3.3: Step 3) */ void md4_init_ctx (struct md4_ctx *ctx) { ctx->A = 0x67452301; ctx->B = 0xefcdab89; ctx->C = 0x98badcfe; ctx->D = 0x10325476; ctx->total[0] = ctx->total[1] = 0; ctx->buflen = 0; } /* Copy the 4 byte value from v into the memory location pointed to by *cp, If your architecture allows unaligned access this is equivalent to * (uint32_t *) cp = v */ static void set_uint32 (char *cp, uint32_t v) { memcpy (cp, &v, sizeof v); } /* Put result from CTX in first 16 bytes following RESBUF. The result must be in little endian byte order. */ void * md4_read_ctx (const struct md4_ctx *ctx, void *resbuf) { char *r = resbuf; set_uint32 (r + 0 * sizeof ctx->A, SWAP (ctx->A)); set_uint32 (r + 1 * sizeof ctx->B, SWAP (ctx->B)); set_uint32 (r + 2 * sizeof ctx->C, SWAP (ctx->C)); set_uint32 (r + 3 * sizeof ctx->D, SWAP (ctx->D)); return resbuf; } /* Process the remaining bytes in the internal buffer and the usual prolog according to the standard and write the result to RESBUF. */ void * md4_finish_ctx (struct md4_ctx *ctx, void *resbuf) { /* Take yet unprocessed bytes into account. */ uint32_t bytes = ctx->buflen; size_t pad; /* Now count remaining bytes. */ ctx->total[0] += bytes; if (ctx->total[0] < bytes) ++ctx->total[1]; pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; memcpy (&((char*)ctx->buffer)[bytes], fillbuf, pad); /* Put the 64-bit file length in *bits* at the end of the buffer. */ ctx->buffer[(bytes + pad) / 4] = SWAP (ctx->total[0] << 3); ctx->buffer[(bytes + pad) / 4 + 1] = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); /* Process last bytes. */ md4_process_block (ctx->buffer, bytes + pad + 8, ctx); return md4_read_ctx (ctx, resbuf); } /* Compute MD4 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ int md4_stream (FILE * stream, void *resblock) { struct md4_ctx ctx; size_t sum; char *buffer = malloc (BLOCKSIZE + 72); if (!buffer) return 1; /* Initialize the computation context. */ md4_init_ctx (&ctx); /* Iterate over full file contents. */ while (1) { /* We read the file in blocks of BLOCKSIZE bytes. One call of the computation function processes the whole buffer so that with the next round of the loop another block can be read. */ size_t n; sum = 0; /* Read block. Take care for partial reads. */ while (1) { n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); sum += n; if (sum == BLOCKSIZE) break; if (n == 0) { /* Check for the error flag IFF N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) { free (buffer); return 1; } goto process_partial_block; } /* We've read at least one byte, so ignore errors. But always check for EOF, since feof may be true even though N > 0. Otherwise, we could end up calling fread after EOF. */ if (feof (stream)) goto process_partial_block; } /* Process buffer with BLOCKSIZE bytes. Note that BLOCKSIZE % 64 == 0 */ md4_process_block (buffer, BLOCKSIZE, &ctx); } process_partial_block:; /* Process any remaining bytes. */ if (sum > 0) md4_process_bytes (buffer, sum, &ctx); /* Construct result in desired memory. */ md4_finish_ctx (&ctx, resblock); free (buffer); return 0; } /* Compute MD4 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ void * md4_buffer (const char *buffer, size_t len, void *resblock) { struct md4_ctx ctx; /* Initialize the computation context. */ md4_init_ctx (&ctx); /* Process whole buffer but last len % 64 bytes. */ md4_process_bytes (buffer, len, &ctx); /* Put result in desired memory area. */ return md4_finish_ctx (&ctx, resblock); } void md4_process_bytes (const void *buffer, size_t len, struct md4_ctx *ctx) { /* When we already have some bits in our internal buffer concatenate both inputs first. */ if (ctx->buflen != 0) { size_t left_over = ctx->buflen; size_t add = 128 - left_over > len ? len : 128 - left_over; memcpy (&((char*)ctx->buffer)[left_over], buffer, add); ctx->buflen += add; if (ctx->buflen > 64) { md4_process_block (ctx->buffer, ctx->buflen & ~63, ctx); ctx->buflen &= 63; /* The regions in the following copy operation cannot overlap. */ memcpy (ctx->buffer, &((char*)ctx->buffer)[(left_over + add) & ~63], ctx->buflen); } buffer = (const char *) buffer + add; len -= add; } /* Process available complete blocks. */ if (len >= 64) { #if !(_STRING_ARCH_unaligned || _STRING_INLINE_unaligned) # define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { md4_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); buffer = (const char *) buffer + 64; len -= 64; } else #endif { md4_process_block (buffer, len & ~63, ctx); buffer = (const char *) buffer + (len & ~63); len &= 63; } } /* Move remaining bytes in internal buffer. */ if (len > 0) { size_t left_over = ctx->buflen; memcpy (&((char*)ctx->buffer)[left_over], buffer, len); left_over += len; if (left_over >= 64) { md4_process_block (ctx->buffer, 64, ctx); left_over -= 64; memcpy (ctx->buffer, &ctx->buffer[16], left_over); } ctx->buflen = left_over; } } /* --- Code below is the primary difference between md5.c and md4.c --- */ /* MD4 round constants */ #define K1 0x5a827999 #define K2 0x6ed9eba1 /* Round functions. */ #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) #define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) #define H(x, y, z) ((x) ^ (y) ^ (z)) #define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n)))) #define R1(a,b,c,d,k,s) a=rol(a+F(b,c,d)+x[k],s); #define R2(a,b,c,d,k,s) a=rol(a+G(b,c,d)+x[k]+K1,s); #define R3(a,b,c,d,k,s) a=rol(a+H(b,c,d)+x[k]+K2,s); /* Process LEN bytes of BUFFER, accumulating context into CTX. It is assumed that LEN % 64 == 0. */ void md4_process_block (const void *buffer, size_t len, struct md4_ctx *ctx) { const uint32_t *words = buffer; size_t nwords = len / sizeof (uint32_t); const uint32_t *endp = words + nwords; uint32_t x[16]; uint32_t A = ctx->A; uint32_t B = ctx->B; uint32_t C = ctx->C; uint32_t D = ctx->D; uint32_t lolen = len; /* First increment the byte count. RFC 1320 specifies the possible length of the file up to 2^64 bits. Here we only compute the number of bytes. Do a double word increment. */ ctx->total[0] += lolen; ctx->total[1] += (len >> 31 >> 1) + (ctx->total[0] < lolen); /* Process all bytes in the buffer with 64 bytes in each round of the loop. */ while (words < endp) { int t; for (t = 0; t < 16; t++) { x[t] = SWAP (*words); words++; } /* Round 1. */ R1 (A, B, C, D, 0, 3); R1 (D, A, B, C, 1, 7); R1 (C, D, A, B, 2, 11); R1 (B, C, D, A, 3, 19); R1 (A, B, C, D, 4, 3); R1 (D, A, B, C, 5, 7); R1 (C, D, A, B, 6, 11); R1 (B, C, D, A, 7, 19); R1 (A, B, C, D, 8, 3); R1 (D, A, B, C, 9, 7); R1 (C, D, A, B, 10, 11); R1 (B, C, D, A, 11, 19); R1 (A, B, C, D, 12, 3); R1 (D, A, B, C, 13, 7); R1 (C, D, A, B, 14, 11); R1 (B, C, D, A, 15, 19); /* Round 2. */ R2 (A, B, C, D, 0, 3); R2 (D, A, B, C, 4, 5); R2 (C, D, A, B, 8, 9); R2 (B, C, D, A, 12, 13); R2 (A, B, C, D, 1, 3); R2 (D, A, B, C, 5, 5); R2 (C, D, A, B, 9, 9); R2 (B, C, D, A, 13, 13); R2 (A, B, C, D, 2, 3); R2 (D, A, B, C, 6, 5); R2 (C, D, A, B, 10, 9); R2 (B, C, D, A, 14, 13); R2 (A, B, C, D, 3, 3); R2 (D, A, B, C, 7, 5); R2 (C, D, A, B, 11, 9); R2 (B, C, D, A, 15, 13); /* Round 3. */ R3 (A, B, C, D, 0, 3); R3 (D, A, B, C, 8, 9); R3 (C, D, A, B, 4, 11); R3 (B, C, D, A, 12, 15); R3 (A, B, C, D, 2, 3); R3 (D, A, B, C, 10, 9); R3 (C, D, A, B, 6, 11); R3 (B, C, D, A, 14, 15); R3 (A, B, C, D, 1, 3); R3 (D, A, B, C, 9, 9); R3 (C, D, A, B, 5, 11); R3 (B, C, D, A, 13, 15); R3 (A, B, C, D, 3, 3); R3 (D, A, B, C, 11, 9); R3 (C, D, A, B, 7, 11); R3 (B, C, D, A, 15, 15); A = ctx->A += A; B = ctx->B += B; C = ctx->C += C; D = ctx->D += D; } } pspp-1.0.1/gl/isnanf-nolibm.h0000644000175000017500000000270113124536242012725 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #if HAVE_ISNANF_IN_LIBC /* Get declaration of isnan macro or (older) isnanf function. */ # include # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanf # define isnanf(x) __builtin_isnanf ((float)(x)) # elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) # else /* Get declaration of isnanf(), if not declared in . */ # if defined __sgi /* We can't include , because it conflicts with our definition of isnand. Therefore declare isnanf separately. */ extern int isnanf (float x); # endif # endif #else /* Test whether X is a NaN. */ # undef isnanf # define isnanf rpl_isnanf extern int isnanf (float x); #endif pspp-1.0.1/gl/unlocked-io.h0000644000175000017500000000672613124536243012416 00000000000000/* Prefer faster, non-thread-safe stdio functions if available. Copyright (C) 2001-2004, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Jim Meyering. */ #ifndef UNLOCKED_IO_H # define UNLOCKED_IO_H 1 /* These are wrappers for functions/macros from the GNU C library, and from other C libraries supporting POSIX's optional thread-safe functions. The standard I/O functions are thread-safe. These *_unlocked ones are more efficient but not thread-safe. That they're not thread-safe is fine since all of the applications in this package are single threaded. Also, some code that is shared with the GNU C library may invoke the *_unlocked functions directly. On hosts that lack those functions, invoke the non-thread-safe versions instead. */ # include # if HAVE_DECL_CLEARERR_UNLOCKED # undef clearerr # define clearerr(x) clearerr_unlocked (x) # else # define clearerr_unlocked(x) clearerr (x) # endif # if HAVE_DECL_FEOF_UNLOCKED # undef feof # define feof(x) feof_unlocked (x) # else # define feof_unlocked(x) feof (x) # endif # if HAVE_DECL_FERROR_UNLOCKED # undef ferror # define ferror(x) ferror_unlocked (x) # else # define ferror_unlocked(x) ferror (x) # endif # if HAVE_DECL_FFLUSH_UNLOCKED # undef fflush # define fflush(x) fflush_unlocked (x) # else # define fflush_unlocked(x) fflush (x) # endif # if HAVE_DECL_FGETS_UNLOCKED # undef fgets # define fgets(x,y,z) fgets_unlocked (x,y,z) # else # define fgets_unlocked(x,y,z) fgets (x,y,z) # endif # if HAVE_DECL_FPUTC_UNLOCKED # undef fputc # define fputc(x,y) fputc_unlocked (x,y) # else # define fputc_unlocked(x,y) fputc (x,y) # endif # if HAVE_DECL_FPUTS_UNLOCKED # undef fputs # define fputs(x,y) fputs_unlocked (x,y) # else # define fputs_unlocked(x,y) fputs (x,y) # endif # if HAVE_DECL_FREAD_UNLOCKED # undef fread # define fread(w,x,y,z) fread_unlocked (w,x,y,z) # else # define fread_unlocked(w,x,y,z) fread (w,x,y,z) # endif # if HAVE_DECL_FWRITE_UNLOCKED # undef fwrite # define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z) # else # define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z) # endif # if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc(x) getc_unlocked (x) # else # define getc_unlocked(x) getc (x) # endif # if HAVE_DECL_GETCHAR_UNLOCKED # undef getchar # define getchar() getchar_unlocked () # else # define getchar_unlocked() getchar () # endif # if HAVE_DECL_PUTC_UNLOCKED # undef putc # define putc(x,y) putc_unlocked (x,y) # else # define putc_unlocked(x,y) putc (x,y) # endif # if HAVE_DECL_PUTCHAR_UNLOCKED # undef putchar # define putchar(x) putchar_unlocked (x) # else # define putchar_unlocked(x) putchar (x) # endif # undef flockfile # define flockfile(x) ((void) 0) # undef ftrylockfile # define ftrylockfile(x) 0 # undef funlockfile # define funlockfile(x) ((void) 0) #endif /* UNLOCKED_IO_H */ pspp-1.0.1/gl/mktime-internal.h0000644000175000017500000000270713124536242013277 00000000000000/* mktime variant that also uses an offset guess Copyright 2016-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* mktime_offset_t is a signed type wide enough to hold a UTC offset in seconds, and used as part of the type of the offset-guess argument to mktime_internal. Use time_t on platforms where time_t is signed, to be compatible with platforms like BeOS that export this implementation detail of mktime. On platforms where time_t is unsigned, GNU and POSIX code can assume 'int' is at least 32 bits which is wide enough for a UTC offset. */ #if TIME_T_IS_SIGNED typedef time_t mktime_offset_t; #else typedef int mktime_offset_t; #endif time_t mktime_internal (struct tm *, struct tm * (*) (time_t const *, struct tm *), mktime_offset_t *); pspp-1.0.1/gl/isnanl-nolibm.h0000644000175000017500000000230713124536242012735 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #if HAVE_ISNANL_IN_LIBC /* Get declaration of isnan macro or (older) isnanl function. */ # include # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanl # define isnanl(x) __builtin_isnanl ((long double)(x)) # elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) # endif #else /* Test whether X is a NaN. */ # undef isnanl # define isnanl rpl_isnanl extern int isnanl (long double x); #endif pspp-1.0.1/gl/regex.h0000644000175000017500000006013413124536243011310 00000000000000/* Definitions for data structures and routines for the regular expression library. Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2017 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 General Public License as published by the Free Software Foundation; either version 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ #ifndef _REGEX_H #define _REGEX_H 1 #include /* Allow the use in C++ code. */ #ifdef __cplusplus extern "C" { #endif /* Define __USE_GNU to declare GNU extensions that violate the POSIX name space rules. */ #ifdef _GNU_SOURCE # define __USE_GNU 1 #endif #ifdef _REGEX_LARGE_OFFSETS /* Use types and values that are wide enough to represent signed and unsigned byte offsets in memory. This currently works only when the regex code is used outside of the GNU C library; it is not yet supported within glibc itself, and glibc users should not define _REGEX_LARGE_OFFSETS. */ /* The type of object sizes. */ typedef size_t __re_size_t; /* The type of object sizes, in places where the traditional code uses unsigned long int. */ typedef size_t __re_long_size_t; #else /* The traditional GNU regex implementation mishandles strings longer than INT_MAX. */ typedef unsigned int __re_size_t; typedef unsigned long int __re_long_size_t; #endif /* The following two types have to be signed and unsigned integer type wide enough to hold a value of a pointer. For most ANSI compilers ptrdiff_t and size_t should be likely OK. Still size of these two types is 2 for Microsoft C. Ugh... */ typedef long int s_reg_t; typedef unsigned long int active_reg_t; /* The following bits are used to determine the regexp syntax we recognize. The set/not-set meanings are chosen so that Emacs syntax remains the value 0. The bits are given in alphabetical order, and the definitions shifted by one from the previous bit; thus, when we add or remove a bit, only one other definition need change. */ typedef unsigned long int reg_syntax_t; #ifdef __USE_GNU /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ # define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) /* If this bit is not set, then + and ? are operators, and \+ and \? are literals. If set, then \+ and \? are operators and + and ? are literals. */ # define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) /* If this bit is set, then character classes are supported. They are: [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. If not set, then character classes are not supported. */ # define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) /* If this bit is set, then ^ and $ are always anchors (outside bracket expressions, of course). If this bit is not set, then it depends: ^ is an anchor if it is at the beginning of a regular expression or after an open-group or an alternation operator; $ is an anchor if it is at the end of a regular expression, or before a close-group or an alternation operator. This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because POSIX draft 11.2 says that * etc. in leading positions is undefined. We already implemented a previous draft which made those constructs invalid, though, so we haven't changed the code back. */ # define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) /* If this bit is set, then special characters are always special regardless of where they are in the pattern. If this bit is not set, then special characters are special only in some contexts; otherwise they are ordinary. Specifically, * + ? and intervals are only special when not after the beginning, open-group, or alternation operator. */ # define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) /* If this bit is set, then *, +, ?, and { cannot be first in an re or immediately after an alternation or begin-group operator. */ # define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) /* If this bit is set, then . matches newline. If not set, then it doesn't. */ # define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) /* If this bit is set, then . doesn't match NUL. If not set, then it does. */ # define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) /* If this bit is set, nonmatching lists [^...] do not match newline. If not set, they do. */ # define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) /* If this bit is set, either \{...\} or {...} defines an interval, depending on RE_NO_BK_BRACES. If not set, \{, \}, {, and } are literals. */ # define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) /* If this bit is set, +, ? and | aren't recognized as operators. If not set, they are. */ # define RE_LIMITED_OPS (RE_INTERVALS << 1) /* If this bit is set, newline is an alternation operator. If not set, newline is literal. */ # define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) /* If this bit is set, then '{...}' defines an interval, and \{ and \} are literals. If not set, then '\{...\}' defines an interval. */ # define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) /* If this bit is set, (...) defines a group, and \( and \) are literals. If not set, \(...\) defines a group, and ( and ) are literals. */ # define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) /* If this bit is set, then \ matches . If not set, then \ is a back-reference. */ # define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) /* If this bit is set, then | is an alternation operator, and \| is literal. If not set, then \| is an alternation operator, and | is literal. */ # define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) /* If this bit is set, then an ending range point collating higher than the starting range point, as in [z-a], is invalid. If not set, then when ending range point collates higher than the starting range point, the range is ignored. */ # define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) /* If this bit is set, then an unmatched ) is ordinary. If not set, then an unmatched ) is invalid. */ # define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) /* If this bit is set, succeed as soon as we match the whole pattern, without further backtracking. */ # define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) /* If this bit is set, do not process the GNU regex operators. If not set, then the GNU regex operators are recognized. */ # define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) /* If this bit is set, turn on internal regex debugging. If not set, and debugging was on, turn it off. This only works if regex.c is compiled -DDEBUG. We define this bit always, so that all that's needed to turn on debugging is to recompile regex.c; the calling code can always have this bit set, and it won't affect anything in the normal case. */ # define RE_DEBUG (RE_NO_GNU_OPS << 1) /* If this bit is set, a syntactically invalid interval is treated as a string of ordinary characters. For example, the ERE 'a{1' is treated as 'a\{1'. */ # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ # define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) /* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only for ^, because it is difficult to scan the regex backwards to find whether ^ should be special. */ # define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) /* If this bit is set, then \{ cannot be first in a regex or immediately after an alternation, open-group or \} operator. */ # define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) /* If this bit is set, then no_sub will be set to 1 during re_compile_pattern. */ # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) #endif /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is stored in the pattern buffer, so changing this does not affect already-compiled regexps. */ extern reg_syntax_t re_syntax_options; #ifdef __USE_GNU /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ /* [[[begin syntaxes]]] */ # define RE_SYNTAX_EMACS 0 # define RE_SYNTAX_AWK \ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ | RE_CHAR_CLASSES \ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) # define RE_SYNTAX_GNU_AWK \ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ | RE_INVALID_INTERVAL_ORD) \ & ~(RE_DOT_NOT_NULL | RE_CONTEXT_INDEP_OPS \ | RE_CONTEXT_INVALID_OPS )) # define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ | RE_INTERVALS | RE_NO_GNU_OPS \ | RE_INVALID_INTERVAL_ORD) # define RE_SYNTAX_GREP \ ((RE_SYNTAX_POSIX_BASIC | RE_NEWLINE_ALT) \ & ~(RE_CONTEXT_INVALID_DUP | RE_DOT_NOT_NULL)) # define RE_SYNTAX_EGREP \ ((RE_SYNTAX_POSIX_EXTENDED | RE_INVALID_INTERVAL_ORD | RE_NEWLINE_ALT) \ & ~(RE_CONTEXT_INVALID_OPS | RE_DOT_NOT_NULL)) /* POSIX grep -E behavior is no longer incompatible with GNU. */ # define RE_SYNTAX_POSIX_EGREP \ RE_SYNTAX_EGREP /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ # define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC # define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC /* Syntax bits common to both basic and extended POSIX regex syntax. */ # define _RE_SYNTAX_POSIX_COMMON \ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) # define RE_SYNTAX_POSIX_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this isn't minimal, since other operators, such as \`, aren't disabled. */ # define RE_SYNTAX_POSIX_MINIMAL_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) # define RE_SYNTAX_POSIX_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is removed and RE_NO_BK_REFS is added. */ # define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ /* Maximum number of duplicates an interval can allow. POSIX-conforming systems might define this in , but we want our value, so remove any previous define. */ # ifdef _REGEX_INCLUDE_LIMITS_H # include # endif # ifdef RE_DUP_MAX # undef RE_DUP_MAX # endif /* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored the counter as a 2-byte signed integer. This is no longer true, so RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to ((SIZE_MAX - 9) / 10) if _REGEX_LARGE_OFFSETS is defined. However, there would be a huge performance problem if someone actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains its historical value. */ # define RE_DUP_MAX (0x7fff) #endif /* POSIX 'cflags' bits (i.e., information for 'regcomp'). */ /* If this bit is set, then use extended regular expression syntax. If not set, then use basic regular expression syntax. */ #define REG_EXTENDED 1 /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ #define REG_ICASE (1 << 1) /* If this bit is set, then anchors do not match at newline characters in the string. If not set, then anchors do match at newlines. */ #define REG_NEWLINE (1 << 2) /* If this bit is set, then report only success or fail in regexec. If not set, then returns differ between not matching and errors. */ #define REG_NOSUB (1 << 3) /* POSIX 'eflags' bits (i.e., information for regexec). */ /* If this bit is set, then the beginning-of-line operator doesn't match the beginning of the string (presumably because it's not the beginning of a line). If not set, then the beginning-of-line operator does match the beginning of the string. */ #define REG_NOTBOL 1 /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) /* Use PMATCH[0] to delimit the start and end of the search in the buffer. */ #define REG_STARTEND (1 << 2) /* If any error codes are removed, changed, or added, update the '__re_error_msgid' table in regcomp.c. */ typedef enum { _REG_ENOSYS = -1, /* This will never happen for this implementation. */ _REG_NOERROR = 0, /* Success. */ _REG_NOMATCH, /* Didn't find a match (for regexec). */ /* POSIX regcomp return error codes. (In the order listed in the standard.) */ _REG_BADPAT, /* Invalid pattern. */ _REG_ECOLLATE, /* Invalid collating element. */ _REG_ECTYPE, /* Invalid character class name. */ _REG_EESCAPE, /* Trailing backslash. */ _REG_ESUBREG, /* Invalid back reference. */ _REG_EBRACK, /* Unmatched left bracket. */ _REG_EPAREN, /* Parenthesis imbalance. */ _REG_EBRACE, /* Unmatched \{. */ _REG_BADBR, /* Invalid contents of \{\}. */ _REG_ERANGE, /* Invalid range end. */ _REG_ESPACE, /* Ran out of memory. */ _REG_BADRPT, /* No preceding re for repetition op. */ /* Error codes we've added. */ _REG_EEND, /* Premature end. */ _REG_ESIZE, /* Too large (e.g., repeat count too large). */ _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; #if defined _XOPEN_SOURCE || defined __USE_XOPEN2K # define REG_ENOSYS _REG_ENOSYS #endif #define REG_NOERROR _REG_NOERROR #define REG_NOMATCH _REG_NOMATCH #define REG_BADPAT _REG_BADPAT #define REG_ECOLLATE _REG_ECOLLATE #define REG_ECTYPE _REG_ECTYPE #define REG_EESCAPE _REG_EESCAPE #define REG_ESUBREG _REG_ESUBREG #define REG_EBRACK _REG_EBRACK #define REG_EPAREN _REG_EPAREN #define REG_EBRACE _REG_EBRACE #define REG_BADBR _REG_BADBR #define REG_ERANGE _REG_ERANGE #define REG_ESPACE _REG_ESPACE #define REG_BADRPT _REG_BADRPT #define REG_EEND _REG_EEND #define REG_ESIZE _REG_ESIZE #define REG_ERPAREN _REG_ERPAREN /* This data structure represents a compiled pattern. Before calling the pattern compiler, the fields 'buffer', 'allocated', 'fastmap', and 'translate' can be set. After the pattern has been compiled, the fields 're_nsub', 'not_bol' and 'not_eol' are available. All other fields are private to the regex routines. */ #ifndef RE_TRANSLATE_TYPE # define __RE_TRANSLATE_TYPE unsigned char * # ifdef __USE_GNU # define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE # endif #endif #ifdef __USE_GNU # define __REPB_PREFIX(name) name #else # define __REPB_PREFIX(name) __##name #endif struct re_pattern_buffer { /* Space that holds the compiled pattern. The type 'struct re_dfa_t' is private and is not declared here. */ struct re_dfa_t *__REPB_PREFIX(buffer); /* Number of bytes to which 'buffer' points. */ __re_long_size_t __REPB_PREFIX(allocated); /* Number of bytes actually used in 'buffer'. */ __re_long_size_t __REPB_PREFIX(used); /* Syntax setting with which the pattern was compiled. */ reg_syntax_t __REPB_PREFIX(syntax); /* Pointer to a fastmap, if any, otherwise zero. re_search uses the fastmap, if there is one, to skip over impossible starting points for matches. */ char *__REPB_PREFIX(fastmap); /* Either a translate table to apply to all characters before comparing them, or zero for no translation. The translation is applied to a pattern when it is compiled and to a string when it is matched. */ __RE_TRANSLATE_TYPE __REPB_PREFIX(translate); /* Number of subexpressions found by the compiler. */ size_t re_nsub; /* Zero if this pattern cannot match the empty string, one else. Well, in truth it's used only in 're_search_2', to see whether or not we should use the fastmap, so we don't set this absolutely perfectly; see 're_compile_fastmap' (the "duplicate" case). */ unsigned __REPB_PREFIX(can_be_null) : 1; /* If REGS_UNALLOCATED, allocate space in the 'regs' structure for 'max (RE_NREGS, re_nsub + 1)' groups. If REGS_REALLOCATE, reallocate space if necessary. If REGS_FIXED, use what's there. */ #ifdef __USE_GNU # define REGS_UNALLOCATED 0 # define REGS_REALLOCATE 1 # define REGS_FIXED 2 #endif unsigned __REPB_PREFIX(regs_allocated) : 2; /* Set to zero when 're_compile_pattern' compiles a pattern; set to one by 're_compile_fastmap' if it updates the fastmap. */ unsigned __REPB_PREFIX(fastmap_accurate) : 1; /* If set, 're_match_2' does not return information about subexpressions. */ unsigned __REPB_PREFIX(no_sub) : 1; /* If set, a beginning-of-line anchor doesn't match at the beginning of the string. */ unsigned __REPB_PREFIX(not_bol) : 1; /* Similarly for an end-of-line anchor. */ unsigned __REPB_PREFIX(not_eol) : 1; /* If true, an anchor at a newline matches. */ unsigned __REPB_PREFIX(newline_anchor) : 1; }; typedef struct re_pattern_buffer regex_t; /* Type for byte offsets within the string. POSIX mandates this. */ #ifdef _REGEX_LARGE_OFFSETS /* POSIX 1003.1-2008 requires that regoff_t be at least as wide as ptrdiff_t and ssize_t. We don't know of any hosts where ptrdiff_t is wider than ssize_t, so ssize_t is safe. ptrdiff_t is not visible here, so use ssize_t. */ typedef ssize_t regoff_t; #else /* The traditional GNU regex implementation mishandles strings longer than INT_MAX. */ typedef int regoff_t; #endif #ifdef __USE_GNU /* This is the structure we store register match data in. See regex.texinfo for a full description of what registers match. */ struct re_registers { __re_size_t num_regs; regoff_t *start; regoff_t *end; }; /* If 'regs_allocated' is REGS_UNALLOCATED in the pattern buffer, 're_match_2' returns information about at least this many registers the first time a 'regs' structure is passed. */ # ifndef RE_NREGS # define RE_NREGS 30 # endif #endif /* POSIX specification for registers. Aside from the different names than 're_registers', POSIX uses an array of structures, instead of a structure of arrays. */ typedef struct { regoff_t rm_so; /* Byte offset from string's start to substring's start. */ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ } regmatch_t; /* Declarations for routines. */ #ifdef __USE_GNU /* Sets the current default syntax to SYNTAX, and return the old syntax. You can also simply assign to the 're_syntax_options' variable. */ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); /* Compile the regular expression PATTERN, with length LENGTH and syntax given by the global 're_syntax_options', into the buffer BUFFER. Return NULL if successful, and an error string if not. To free the allocated storage, you must call 'regfree' on BUFFER. Note that the translate table must either have been initialized by 'regcomp', with a malloc'ed value, or set to NULL before calling 'regfree'. */ extern const char *re_compile_pattern (const char *__pattern, size_t __length, struct re_pattern_buffer *__buffer); /* Compile a fastmap for the compiled pattern in BUFFER; used to accelerate searches. Return 0 if successful and -2 if was an internal error. */ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); /* Search in the string STRING (with length LENGTH) for the pattern compiled into BUFFER. Start searching at position START, for RANGE characters. Return the starting position of the match, -1 for no match, or -2 for an internal error. Also return register information in REGS (if REGS and BUFFER->no_sub are nonzero). */ extern regoff_t re_search (struct re_pattern_buffer *__buffer, const char *__String, regoff_t __length, regoff_t __start, regoff_t __range, struct re_registers *__regs); /* Like 're_search', but search in the concatenation of STRING1 and STRING2. Also, stop searching at index START + STOP. */ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, const char *__string1, regoff_t __length1, const char *__string2, regoff_t __length2, regoff_t __start, regoff_t __range, struct re_registers *__regs, regoff_t __stop); /* Like 're_search', but return how many characters in STRING the regexp in BUFFER matched, starting at position START. */ extern regoff_t re_match (struct re_pattern_buffer *__buffer, const char *__String, regoff_t __length, regoff_t __start, struct re_registers *__regs); /* Relates to 're_match' as 're_search_2' relates to 're_search'. */ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer, const char *__string1, regoff_t __length1, const char *__string2, regoff_t __length2, regoff_t __start, struct re_registers *__regs, regoff_t __stop); /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated with malloc, and must each be at least 'NUM_REGS * sizeof (regoff_t)' bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using BUFFER will allocate its own register data, without freeing the old data. */ extern void re_set_registers (struct re_pattern_buffer *__buffer, struct re_registers *__regs, __re_size_t __num_regs, regoff_t *__starts, regoff_t *__ends); #endif /* Use GNU */ #if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_MISC) # ifndef _CRAY /* 4.2 bsd compatibility. */ extern char *re_comp (const char *); extern int re_exec (const char *); # endif #endif /* GCC 2.95 and later have "__restrict"; C99 compilers have "restrict", and "configure" may have defined "restrict". Other compilers use __restrict, __restrict__, and _Restrict, and 'configure' might #define 'restrict' to those words, so pick a different name. */ #ifndef _Restrict_ # if 199901L <= __STDC_VERSION__ # define _Restrict_ restrict # elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) # define _Restrict_ __restrict # else # define _Restrict_ # endif #endif /* gcc 3.1 and up support the [restrict] syntax. Don't trust sys/cdefs.h's definition of __restrict_arr, though, as it mishandles gcc -ansi -pedantic. */ #ifndef _Restrict_arr_ # if ((199901L <= __STDC_VERSION__ \ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ && !defined __STRICT_ANSI__)) \ && !defined __GNUG__) # define _Restrict_arr_ _Restrict_ # else # define _Restrict_arr_ # endif #endif /* POSIX compatibility. */ extern int regcomp (regex_t *_Restrict_ __preg, const char *_Restrict_ __pattern, int __cflags); extern int regexec (const regex_t *_Restrict_ __preg, const char *_Restrict_ __String, size_t __nmatch, regmatch_t __pmatch[_Restrict_arr_], int __eflags); extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg, char *_Restrict_ __errbuf, size_t __errbuf_size); extern void regfree (regex_t *__preg); #ifdef __cplusplus } #endif /* C++ */ #endif /* regex.h */ pspp-1.0.1/gl/stripslash.c0000644000175000017500000000304113124536243012357 00000000000000/* stripslash.c -- remove redundant trailing slashes from a file name Copyright (C) 1990, 2001, 2003-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include "dirname.h" /* Remove trailing slashes from FILE. Return true if a trailing slash was removed. This is useful when using file name completion from a shell that adds a "/" after directory names (such as tcsh and bash), because on symlinks to directories, several system calls have different semantics according to whether a trailing slash is present. */ bool strip_trailing_slashes (char *file) { char *base = last_component (file); char *base_lim; bool had_slash; /* last_component returns "" for file system roots, but we need to turn "///" into "/". */ if (! *base) base = file; base_lim = base + base_len (base); had_slash = (*base_lim != '\0'); *base_lim = '\0'; return had_slash; } pspp-1.0.1/gl/memchr.valgrind0000644000175000017500000000065213020461274013023 00000000000000# Suppress a valgrind message about use of uninitialized memory in memchr(). # POSIX states that when the character is found, memchr must not read extra # bytes in an overestimated length (for example, where memchr is used to # implement strnlen). However, we use a safe word read to provide a speedup. { memchr-value4 Memcheck:Value4 fun:rpl_memchr } { memchr-value8 Memcheck:Value8 fun:rpl_memchr } pspp-1.0.1/gl/getprogname.h0000644000175000017500000000217313124536241012503 00000000000000/* Program name management. Copyright (C) 2016-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _GL_GETPROGNAME_H #define _GL_GETPROGNAME_H #include #ifdef __cplusplus extern "C" { #endif /* Return the base name of the executing program. On native Windows this will usually end in ".exe" or ".EXE". */ #ifndef HAVE_GETPROGNAME extern char const *getprogname (void) # ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME _GL_ATTRIBUTE_PURE # endif ; #endif #ifdef __cplusplus } #endif #endif pspp-1.0.1/gl/error.h0000644000175000017500000000553213124536241011326 00000000000000/* Declaration for error-reporting function Copyright (C) 1995-1997, 2003, 2006, 2008-2017 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 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 . */ #ifndef _ERROR_H #define _ERROR_H 1 /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif /* On mingw, the flavor of printf depends on whether the extensions module * is in use; the check for determines the witness macro. */ #ifndef _GL_ATTRIBUTE_SPEC_PRINTF # if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU # define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__ # else # define _GL_ATTRIBUTE_SPEC_PRINTF __printf__ # endif #endif #ifdef __cplusplus extern "C" { #endif /* Print a message with 'fprintf (stderr, FORMAT, ...)'; if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ extern void error (int __status, int __errnum, const char *__format, ...) _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4)); extern void error_at_line (int __status, int __errnum, const char *__fname, unsigned int __lineno, const char *__format, ...) _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6)); /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this function without parameters instead. */ extern void (*error_print_progname) (void); /* This variable is incremented each time 'error' is called. */ extern unsigned int error_message_count; /* Sometimes we want to have at most one error per line. This variable controls whether this mode is selected or not. */ extern int error_one_per_line; #ifdef __cplusplus } #endif #endif /* error.h */ pspp-1.0.1/gl/ftoastr.c0000644000175000017500000001043413124536242011650 00000000000000/* floating point to accurate string Copyright (C) 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paul Eggert. */ /* This code can misbehave on some buggy or older platforms, when operating on arguments on floating types other than 'double', or when given unusual combinations of options. Gnulib's snprintf-posix module works around many of these problems. This code relies on sprintf, strtod, etc. operating accurately; otherwise, the resulting strings could be inaccurate or too long. */ #include #include "ftoastr.h" #include #include #include #if LENGTH == 3 # define FLOAT long double # define FLOAT_DIG LDBL_DIG # define FLOAT_MIN LDBL_MIN # define FLOAT_PREC_BOUND _GL_LDBL_PREC_BOUND # define FTOASTR ldtoastr # define PROMOTED_FLOAT long double # if HAVE_C99_STRTOLD # define STRTOF strtold # endif #elif LENGTH == 2 # define FLOAT double # define FLOAT_DIG DBL_DIG # define FLOAT_MIN DBL_MIN # define FLOAT_PREC_BOUND _GL_DBL_PREC_BOUND # define FTOASTR dtoastr # define PROMOTED_FLOAT double #else # define LENGTH 1 # define FLOAT float # define FLOAT_DIG FLT_DIG # define FLOAT_MIN FLT_MIN # define FLOAT_PREC_BOUND _GL_FLT_PREC_BOUND # define FTOASTR ftoastr # define PROMOTED_FLOAT double # if HAVE_STRTOF # define STRTOF strtof # endif #endif /* On pre-C99 hosts, approximate strtof and strtold with strtod. This may generate one or two extra digits, but that's better than not working at all. */ #ifndef STRTOF # define STRTOF strtod #endif /* On hosts where it's not known that snprintf works, use sprintf to implement the subset needed here. Typically BUFSIZE is big enough and there's little or no performance hit. */ #if ! GNULIB_SNPRINTF # undef snprintf # define snprintf ftoastr_snprintf static int ftoastr_snprintf (char *buf, size_t bufsize, char const *format, int width, int prec, FLOAT x) { PROMOTED_FLOAT promoted_x = x; char width_0_buffer[LENGTH == 1 ? FLT_BUFSIZE_BOUND : LENGTH == 2 ? DBL_BUFSIZE_BOUND : LDBL_BUFSIZE_BOUND]; int n = width; if (bufsize < sizeof width_0_buffer) { n = sprintf (width_0_buffer, format, 0, prec, promoted_x); if (n < 0) return n; if (n < width) n = width; } if (n < bufsize) n = sprintf (buf, format, width, prec, promoted_x); return n; } #endif int FTOASTR (char *buf, size_t bufsize, int flags, int width, FLOAT x) { /* The following method is simple but slow. For ideas about speeding things up, please see: Andrysco M, Jhala R, Lerner S. Printing floating-point numbers: a faster, always correct method. ACM SIGPLAN notices - POPL '16. 2016;51(1):555-67 ; draft at . */ PROMOTED_FLOAT promoted_x = x; char format[sizeof "%-+ 0*.*Lg"]; FLOAT abs_x = x < 0 ? -x : x; int prec; char *p = format; *p++ = '%'; /* Support flags that generate output parsable by strtof. */ *p = '-'; p += (flags & FTOASTR_LEFT_JUSTIFY ) != 0; *p = '+'; p += (flags & FTOASTR_ALWAYS_SIGNED ) != 0; *p = ' '; p += (flags & FTOASTR_SPACE_POSITIVE) != 0; *p = '0'; p += (flags & FTOASTR_ZERO_PAD ) != 0; *p++ = '*'; *p++ = '.'; *p++ = '*'; *p = 'L'; p += 2 < LENGTH; *p++ = flags & FTOASTR_UPPER_E ? 'G' : 'g'; *p = '\0'; for (prec = abs_x < FLOAT_MIN ? 1 : FLOAT_DIG; ; prec++) { int n = snprintf (buf, bufsize, format, width, prec, promoted_x); if (n < 0 || FLOAT_PREC_BOUND <= prec || (n < bufsize && STRTOF (buf, NULL) == x)) return n; } } pspp-1.0.1/gl/crc.h0000644000175000017500000000364713124536241010751 00000000000000/* crc.h -- cyclic redundancy checks Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Simon Josefsson. */ #ifndef CRC_H # define CRC_H 1 #include #include /* Compute CRC-32 value of LEN bytes long BUF, and return it. */ extern uint32_t crc32 (const char *buf, size_t len); /* Incrementally update CRC-32 value CRC using LEN bytes long BUF. In the first call, use 0 as the value for CRC. Return the updated CRC-32 value. */ extern uint32_t crc32_update (uint32_t crc, const char *buf, size_t len); /* Compute modified-CRC-32 value of LEN bytes long BUF, and return it. The "modification" is to avoid the initial and final XOR operation. Due to historic implementation errors, this variant is sometimes used (i.e., in RFC 3961). */ extern uint32_t crc32_no_xor (const char *buf, size_t len); /* Incrementally update modified-CRC-32 value CRC using LEN bytes long BUF. In the first call, use 0 as the value for CRC. Return the updated modified-CRC-32 value. The "modification" is to avoid the initial and final XOR operation. Due to historic implementation errors, this variant is sometimes used (i.e., in RFC 3961). */ extern uint32_t crc32_update_no_xor (uint32_t crc, const char *buf, size_t len); #endif /* CRC_H */ pspp-1.0.1/gl/clean-temp.h0000644000175000017500000001424113124536241012217 00000000000000/* Temporary directories and temporary files with automatic cleanup. Copyright (C) 2006, 2011-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 . */ #ifndef _CLEAN_TEMP_H #define _CLEAN_TEMP_H #include #include #include #ifdef __cplusplus extern "C" { #endif /* Temporary directories and temporary files should be automatically removed when the program exits either normally or through a fatal signal. We can't rely on the "unlink before close" idiom, because it works only on Unix and also - if no signal blocking is used - leaves a time window where a fatal signal would not clean up the temporary file. Also, open file descriptors need to be closed before the temporary files and the temporary directories can be removed, because only on Unix (excluding Cygwin) can one remove directories containing open files. This module provides support for temporary directories and temporary files inside these temporary directories. Temporary files without temporary directories are not supported here. The temporary directories and files are automatically cleaned up (at the latest) when the program exits or dies from a fatal signal such as SIGINT, SIGTERM, SIGHUP, but not if it dies from a fatal signal such as SIGQUIT, SIGKILL, or SIGABRT, SIGSEGV, SIGBUS, SIGILL, SIGFPE. For the cleanup in the normal case, programs that use this module need to call 'cleanup_temp_dir' for each successful return of 'create_temp_dir'. The cleanup in the case of a fatal signal such as SIGINT, SIGTERM, SIGHUP, is done entirely automatically by the functions of this module. */ struct temp_dir { /* The absolute pathname of the directory. */ const char * const dir_name; /* Whether errors during explicit cleanup are reported to standard error. */ bool cleanup_verbose; /* More fields are present here, but not public. */ }; /* Create a temporary directory. PREFIX is used as a prefix for the name of the temporary directory. It should be short and still give an indication about the program. PARENTDIR can be used to specify the parent directory; if NULL, a default parent directory is used (either $TMPDIR or /tmp or similar). CLEANUP_VERBOSE determines whether errors during explicit cleanup are reported to standard error. Return a fresh 'struct temp_dir' on success. Upon error, an error message is shown and NULL is returned. */ extern struct temp_dir * create_temp_dir (const char *prefix, const char *parentdir, bool cleanup_verbose); /* Register the given ABSOLUTE_FILE_NAME as being a file inside DIR, that needs to be removed before DIR can be removed. Should be called before the file ABSOLUTE_FILE_NAME is created. */ extern void register_temp_file (struct temp_dir *dir, const char *absolute_file_name); /* Unregister the given ABSOLUTE_FILE_NAME as being a file inside DIR, that needs to be removed before DIR can be removed. Should be called when the file ABSOLUTE_FILE_NAME could not be created. */ extern void unregister_temp_file (struct temp_dir *dir, const char *absolute_file_name); /* Register the given ABSOLUTE_DIR_NAME as being a subdirectory inside DIR, that needs to be removed before DIR can be removed. Should be called before the subdirectory ABSOLUTE_DIR_NAME is created. */ extern void register_temp_subdir (struct temp_dir *dir, const char *absolute_dir_name); /* Unregister the given ABSOLUTE_DIR_NAME as being a subdirectory inside DIR, that needs to be removed before DIR can be removed. Should be called when the subdirectory ABSOLUTE_DIR_NAME could not be created. */ extern void unregister_temp_subdir (struct temp_dir *dir, const char *absolute_dir_name); /* Remove the given ABSOLUTE_FILE_NAME and unregister it. Return 0 upon success, or -1 if there was some problem. */ extern int cleanup_temp_file (struct temp_dir *dir, const char *absolute_file_name); /* Remove the given ABSOLUTE_DIR_NAME and unregister it. Return 0 upon success, or -1 if there was some problem. */ extern int cleanup_temp_subdir (struct temp_dir *dir, const char *absolute_dir_name); /* Remove all registered files and subdirectories inside DIR. Return 0 upon success, or -1 if there was some problem. */ extern int cleanup_temp_dir_contents (struct temp_dir *dir); /* Remove all registered files and subdirectories inside DIR and DIR itself. DIR cannot be used any more after this call. Return 0 upon success, or -1 if there was some problem. */ extern int cleanup_temp_dir (struct temp_dir *dir); /* Open a temporary file in a temporary directory. Registers the resulting file descriptor to be closed. */ extern int open_temp (const char *file_name, int flags, mode_t mode); extern FILE * fopen_temp (const char *file_name, const char *mode); /* Close a temporary file in a temporary directory. Unregisters the previously registered file descriptor. */ extern int close_temp (int fd); extern int fclose_temp (FILE *fp); /* Like fwriteerror. Unregisters the previously registered file descriptor. */ extern int fwriteerror_temp (FILE *fp); /* Like close_stream. Unregisters the previously registered file descriptor. */ extern int close_stream_temp (FILE *fp); #ifdef __cplusplus } #endif #endif /* _CLEAN_TEMP_H */ pspp-1.0.1/gl/c-vasprintf.c0000644000175000017500000000242613124536241012423 00000000000000/* Formatted output to strings in C locale. Copyright (C) 1999, 2002, 2006-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include "c-vasprintf.h" #include #include #include #include "c-vasnprintf.h" int c_vasprintf (char **resultp, const char *format, va_list args) { size_t length; char *result = c_vasnprintf (NULL, &length, format, args); if (result == NULL) return -1; if (length > INT_MAX) { free (result); errno = EOVERFLOW; return -1; } *resultp = result; /* Return the number of resulting bytes, excluding the trailing NUL. */ return length; } pspp-1.0.1/gl/c-xvasprintf.c0000644000175000017500000000220213124536241012603 00000000000000/* vasprintf with out-of-memory checking in C locale. Copyright (C) 1999, 2002-2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include "c-xvasprintf.h" #include #include #include "c-vasprintf.h" #include "xalloc.h" char * c_xvasprintf (const char *format, va_list args) { char *result; if (c_vasprintf (&result, format, args) < 0) { if (errno == ENOMEM) xalloc_die (); return NULL; } return result; } pspp-1.0.1/gl/xreadlink.h0000644000175000017500000000171213124536243012154 00000000000000/* Reading symbolic links without size limitation. Copyright (C) 2001, 2003-2004, 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Jim Meyering */ extern char *xreadlink (char const *filename); #if GNULIB_XREADLINKAT extern char *xreadlinkat (int fd, char const *filename); #endif pspp-1.0.1/gl/xmalloca.h0000644000175000017500000000406213124536243011774 00000000000000/* Safe automatic memory allocation with out of memory checking. Copyright (C) 2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 . */ #ifndef _XMALLOCA_H #define _XMALLOCA_H #include "malloca.h" #include "xalloc.h" #ifdef __cplusplus extern "C" { #endif /* xmalloca(N) is a checking safe variant of alloca(N). It allocates N bytes of memory allocated on the stack, that must be freed using freea() before the function returns. Upon failure, it exits with an error message. */ #if HAVE_ALLOCA # define xmalloca(N) \ ((N) < 4032 - sa_increment \ ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ : xmmalloca (N)) extern void * xmmalloca (size_t n); #else # define xmalloca(N) \ xmalloc (N) #endif /* xnmalloca(N,S) is an overflow-safe variant of xmalloca (N * S). It allocates an array of N objects, each with S bytes of memory, on the stack. S must be positive and N must be nonnegative. The array must be freed using freea() before the function returns. Upon failure, it exits with an error message. */ #if HAVE_ALLOCA /* Rely on xmalloca (SIZE_MAX) calling xalloc_die (). */ # define xnmalloca(n, s) \ xmalloca (xalloc_oversized ((n), (s)) ? (size_t) (-1) : (n) * (s)) #else # define xnmalloca(n, s) \ xnmalloc ((n), (s)) #endif #ifdef __cplusplus } #endif #endif /* _XMALLOCA_H */ pspp-1.0.1/gl/strftime.h0000644000175000017500000000222413124536243012027 00000000000000/* declarations for strftime.c Copyright (C) 2002, 2004, 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #ifdef __cplusplus extern "C" { #endif /* Just like strftime, but with two more arguments: POSIX requires that strftime use the local timezone information. Use the timezone __TZ instead. Use __NS as the number of nanoseconds in the %N directive. */ size_t nstrftime (char *, size_t, char const *, struct tm const *, timezone_t __tz, int __ns); #ifdef __cplusplus } #endif pspp-1.0.1/gl/regex.c0000644000175000017500000000615313124536243011304 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ #ifndef _LIBC # include # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" # endif # if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wold-style-definition" # pragma GCC diagnostic ignored "-Wtype-limits" # endif #endif /* Make sure no one compiles this code with a C++ compiler. */ #if defined __cplusplus && defined _LIBC # error "This is C code, use a C compiler" #endif #ifdef _LIBC /* We have to keep the namespace clean. */ # define regfree(preg) __regfree (preg) # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) # define regerror(errcode, preg, errbuf, errbuf_size) \ __regerror(errcode, preg, errbuf, errbuf_size) # define re_set_registers(bu, re, nu, st, en) \ __re_set_registers (bu, re, nu, st, en) # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) # define re_match(bufp, string, size, pos, regs) \ __re_match (bufp, string, size, pos, regs) # define re_search(bufp, string, size, startpos, range, regs) \ __re_search (bufp, string, size, startpos, range, regs) # define re_compile_pattern(pattern, length, bufp) \ __re_compile_pattern (pattern, length, bufp) # define re_set_syntax(syntax) __re_set_syntax (syntax) # define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) # define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) # include "../locale/localeinfo.h" #endif /* On some systems, limits.h sets RE_DUP_MAX to a lower value than GNU regex allows. Include it before , which correctly #undefs RE_DUP_MAX and sets it to the right value. */ #include #include #include "regex_internal.h" #include "regex_internal.c" #include "regcomp.c" #include "regexec.c" /* Binary backward compatibility. */ #if _LIBC # include # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") int re_max_failures = 2000; # endif #endif pspp-1.0.1/gl/memchr2.c0000644000175000017500000001447013124536242011527 00000000000000/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2017 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and commentary by Jim Blandy (jimb@ai.mit.edu); adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), and implemented in glibc by Roland McGrath (roland@ai.mit.edu). Extension to memchr2 implemented by Eric Blake (ebb9@byu.net). 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 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 . */ #include #include "memchr2.h" #include #include #include /* Return the first address of either C1 or C2 (treated as unsigned char) that occurs within N bytes of the memory region S. If neither byte appears, return NULL. */ void * memchr2 (void const *s, int c1_in, int c2_in, size_t n) { /* On 32-bit hardware, choosing longword to be a 32-bit unsigned long instead of a 64-bit uintmax_t tends to give better performance. On 64-bit hardware, unsigned long is generally 64 bits already. Change this typedef to experiment with performance. */ typedef unsigned long int longword; const unsigned char *char_ptr; void const *void_ptr; const longword *longword_ptr; longword repeated_one; longword repeated_c1; longword repeated_c2; unsigned char c1; unsigned char c2; c1 = (unsigned char) c1_in; c2 = (unsigned char) c2_in; if (c1 == c2) return memchr (s, c1, n); /* Handle the first few bytes by reading one byte at a time. Do this until VOID_PTR is aligned on a longword boundary. */ for (void_ptr = s; n > 0 && (uintptr_t) void_ptr % sizeof (longword) != 0; --n) { char_ptr = void_ptr; if (*char_ptr == c1 || *char_ptr == c2) return (void *) void_ptr; void_ptr = char_ptr + 1; } longword_ptr = void_ptr; /* All these elucidatory comments refer to 4-byte longwords, but the theory applies equally well to any size longwords. */ /* Compute auxiliary longword values: repeated_one is a value which has a 1 in every byte. repeated_c1 has c1 in every byte. repeated_c2 has c2 in every byte. */ repeated_one = 0x01010101; repeated_c1 = c1 | (c1 << 8); repeated_c2 = c2 | (c2 << 8); repeated_c1 |= repeated_c1 << 16; repeated_c2 |= repeated_c2 << 16; if (0xffffffffU < (longword) -1) { repeated_one |= repeated_one << 31 << 1; repeated_c1 |= repeated_c1 << 31 << 1; repeated_c2 |= repeated_c2 << 31 << 1; if (8 < sizeof (longword)) { size_t i; for (i = 64; i < sizeof (longword) * 8; i *= 2) { repeated_one |= repeated_one << i; repeated_c1 |= repeated_c1 << i; repeated_c2 |= repeated_c2 << i; } } } /* Instead of the traditional loop which tests each byte, we will test a longword at a time. The tricky part is testing if *any of the four* bytes in the longword in question are equal to c1 or c2. We first use an xor with repeated_c1 and repeated_c2, respectively. This reduces the task to testing whether *any of the four* bytes in longword1 or longword2 is zero. Let's consider longword1. We compute tmp1 = ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). That is, we perform the following operations: 1. Subtract repeated_one. 2. & ~longword1. 3. & a mask consisting of 0x80 in every byte. Consider what happens in each byte: - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, and step 3 transforms it into 0x80. A carry can also be propagated to more significant bytes. - If a byte of longword1 is nonzero, let its lowest 1 bit be at position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, the byte ends in a single bit of value 0 and k bits of value 1. After step 2, the result is just k bits of value 1: 2^k - 1. After step 3, the result is 0. And no carry is produced. So, if longword1 has only non-zero bytes, tmp1 is zero. Whereas if longword1 has a zero byte, call j the position of the least significant zero byte. Then the result has a zero at positions 0, ..., j-1 and a 0x80 at position j. We cannot predict the result at the more significant bytes (positions j+1..3), but it does not matter since we already have a non-zero bit at position 8*j+7. Similarly, we compute tmp2 = ((longword2 - repeated_one) & ~longword2) & (repeated_one << 7). The test whether any byte in longword1 or longword2 is zero is equivalent to testing whether tmp1 is nonzero or tmp2 is nonzero. We can combine this into a single test, whether (tmp1 | tmp2) is nonzero. */ while (n >= sizeof (longword)) { longword longword1 = *longword_ptr ^ repeated_c1; longword longword2 = *longword_ptr ^ repeated_c2; if (((((longword1 - repeated_one) & ~longword1) | ((longword2 - repeated_one) & ~longword2)) & (repeated_one << 7)) != 0) break; longword_ptr++; n -= sizeof (longword); } char_ptr = (const unsigned char *) longword_ptr; /* At this point, we know that either n < sizeof (longword), or one of the sizeof (longword) bytes starting at char_ptr is == c1 or == c2. On little-endian machines, we could determine the first such byte without any further memory accesses, just by looking at the (tmp1 | tmp2) result from the last loop iteration. But this does not work on big-endian machines. Choose code that works in both cases. */ for (; n > 0; --n, ++char_ptr) { if (*char_ptr == c1 || *char_ptr == c2) return (void *) char_ptr; } return NULL; } pspp-1.0.1/gl/sigprocmask.c0000644000175000017500000002062713124536243012516 00000000000000/* POSIX compatible signal blocking. Copyright (C) 2006-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 . */ #include /* Specification. */ #include #include #include #include #if HAVE_MSVC_INVALID_PARAMETER_HANDLER # include "msvc-inval.h" #endif /* We assume that a platform without POSIX signal blocking functions also does not have the POSIX sigaction() function, only the signal() function. We also assume signal() has SysV semantics, where any handler is uninstalled prior to being invoked. This is true for native Windows platforms. */ /* We use raw signal(), but also provide a wrapper rpl_signal() so that applications can query or change a blocked signal. */ #undef signal /* Provide invalid signal numbers as fallbacks if the uncatchable signals are not defined. */ #ifndef SIGKILL # define SIGKILL (-1) #endif #ifndef SIGSTOP # define SIGSTOP (-1) #endif /* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias for the signal SIGABRT. Only one signal handler is stored for both SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef SIGABRT_COMPAT # define SIGABRT_COMPAT 6 #endif #ifdef SIGABRT_COMPAT # define SIGABRT_COMPAT_MASK (1U << SIGABRT_COMPAT) #else # define SIGABRT_COMPAT_MASK 0 #endif typedef void (*handler_t) (int); #if HAVE_MSVC_INVALID_PARAMETER_HANDLER static handler_t signal_nothrow (int sig, handler_t handler) { handler_t result; TRY_MSVC_INVAL { result = signal (sig, handler); } CATCH_MSVC_INVAL { result = SIG_ERR; errno = EINVAL; } DONE_MSVC_INVAL; return result; } # define signal signal_nothrow #endif /* Handling of gnulib defined signals. */ #if GNULIB_defined_SIGPIPE static handler_t SIGPIPE_handler = SIG_DFL; #endif #if GNULIB_defined_SIGPIPE static handler_t ext_signal (int sig, handler_t handler) { switch (sig) { case SIGPIPE: { handler_t old_handler = SIGPIPE_handler; SIGPIPE_handler = handler; return old_handler; } default: /* System defined signal */ return signal (sig, handler); } } # undef signal # define signal ext_signal #endif int sigismember (const sigset_t *set, int sig) { if (sig >= 0 && sig < NSIG) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif return (*set >> sig) & 1; } else return 0; } int sigemptyset (sigset_t *set) { *set = 0; return 0; } int sigaddset (sigset_t *set, int sig) { if (sig >= 0 && sig < NSIG) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif *set |= 1U << sig; return 0; } else { errno = EINVAL; return -1; } } int sigdelset (sigset_t *set, int sig) { if (sig >= 0 && sig < NSIG) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif *set &= ~(1U << sig); return 0; } else { errno = EINVAL; return -1; } } int sigfillset (sigset_t *set) { *set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK; return 0; } /* Set of currently blocked signals. */ static volatile sigset_t blocked_set /* = 0 */; /* Set of currently blocked and pending signals. */ static volatile sig_atomic_t pending_array[NSIG] /* = { 0 } */; /* Signal handler that is installed for blocked signals. */ static void blocked_handler (int sig) { /* Reinstall the handler, in case the signal occurs multiple times while blocked. There is an inherent race where an asynchronous signal in between when the kernel uninstalled the handler and when we reinstall it will trigger the default handler; oh well. */ signal (sig, blocked_handler); if (sig >= 0 && sig < NSIG) pending_array[sig] = 1; } int sigpending (sigset_t *set) { sigset_t pending = 0; int sig; for (sig = 0; sig < NSIG; sig++) if (pending_array[sig]) pending |= 1U << sig; *set = pending; return 0; } /* The previous signal handlers. Only the array elements corresponding to blocked signals are relevant. */ static volatile handler_t old_handlers[NSIG]; int sigprocmask (int operation, const sigset_t *set, sigset_t *old_set) { if (old_set != NULL) *old_set = blocked_set; if (set != NULL) { sigset_t new_blocked_set; sigset_t to_unblock; sigset_t to_block; switch (operation) { case SIG_BLOCK: new_blocked_set = blocked_set | *set; break; case SIG_SETMASK: new_blocked_set = *set; break; case SIG_UNBLOCK: new_blocked_set = blocked_set & ~*set; break; default: errno = EINVAL; return -1; } to_unblock = blocked_set & ~new_blocked_set; to_block = new_blocked_set & ~blocked_set; if (to_block != 0) { int sig; for (sig = 0; sig < NSIG; sig++) if ((to_block >> sig) & 1) { pending_array[sig] = 0; if ((old_handlers[sig] = signal (sig, blocked_handler)) != SIG_ERR) blocked_set |= 1U << sig; } } if (to_unblock != 0) { sig_atomic_t received[NSIG]; int sig; for (sig = 0; sig < NSIG; sig++) if ((to_unblock >> sig) & 1) { if (signal (sig, old_handlers[sig]) != blocked_handler) /* The application changed a signal handler while the signal was blocked, bypassing our rpl_signal replacement. We don't support this. */ abort (); received[sig] = pending_array[sig]; blocked_set &= ~(1U << sig); pending_array[sig] = 0; } else received[sig] = 0; for (sig = 0; sig < NSIG; sig++) if (received[sig]) raise (sig); } } return 0; } /* Install the handler FUNC for signal SIG, and return the previous handler. */ handler_t rpl_signal (int sig, handler_t handler) { /* We must provide a wrapper, so that a user can query what handler they installed even if that signal is currently blocked. */ if (sig >= 0 && sig < NSIG && sig != SIGKILL && sig != SIGSTOP && handler != SIG_ERR) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif if (blocked_set & (1U << sig)) { /* POSIX states that sigprocmask and signal are both async-signal-safe. This is not true of our implementation - there is a slight data race where an asynchronous interrupt on signal A can occur after we install blocked_handler but before we have updated old_handlers for signal B, such that handler A can see stale information if it calls signal(B). Oh well - signal handlers really shouldn't try to manipulate the installed handlers of unrelated signals. */ handler_t result = old_handlers[sig]; old_handlers[sig] = handler; return result; } else return signal (sig, handler); } else { errno = EINVAL; return SIG_ERR; } } #if GNULIB_defined_SIGPIPE /* Raise the signal SIGPIPE. */ int _gl_raise_SIGPIPE (void) { if (blocked_set & (1U << SIGPIPE)) pending_array[SIGPIPE] = 1; else { handler_t handler = SIGPIPE_handler; if (handler == SIG_DFL) exit (128 + SIGPIPE); else if (handler != SIG_IGN) (*handler) (SIGPIPE); } return 0; } #endif pspp-1.0.1/gl/uniwidth/0000755000175000017500000000000013150620334011726 500000000000000pspp-1.0.1/gl/uniwidth/u8-strwidth.c0000644000175000017500000000176713124536243014235 00000000000000/* Determine display width of UTF-8 string. Copyright (C) 2001-2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "uniwidth.h" #include "unistr.h" int u8_strwidth (const uint8_t *s, const char *encoding) { return u8_width (s, u8_strlen (s), encoding); } pspp-1.0.1/gl/uniwidth/u8-width.c0000644000175000017500000000247513124536243013501 00000000000000/* Determine display width of UTF-8 string. Copyright (C) 2001-2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "uniwidth.h" #include "unistr.h" int u8_width (const uint8_t *s, size_t n, const char *encoding) { const uint8_t *s_end = s + n; int width = 0; while (s < s_end) { ucs4_t uc; int w; s += u8_mbtouc_unsafe (&uc, s, s_end - s); if (uc == 0) break; /* end of string reached */ w = uc_width (uc, encoding); if (w >= 0) /* ignore control characters in the string */ width += w; } return width; } pspp-1.0.1/gl/uniwidth/width.c0000644000175000017500000006326013124536243013146 00000000000000/* Determine display width of Unicode character. Copyright (C) 2001-2002, 2006-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "uniwidth.h" #include "cjk.h" /* * Non-spacing attribute table. * Consists of: * - Non-spacing characters; generated from PropList.txt or * "grep '^[^;]*;[^;]*;[^;]*;[^;]*;NSM;' UnicodeData.txt" * - Format control characters; generated from * "grep '^[^;]*;[^;]*;Cf;' UnicodeData.txt" * - Zero width characters; generated from * "grep '^[^;]*;ZERO WIDTH ' UnicodeData.txt" */ static const unsigned char nonspacing_table_data[36*64] = { /* 0x0000-0x01ff */ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */ 0xff, 0xff, 0xff, 0xff, 0x00, 0x20, 0x00, 0x00, /* 0x0080-0x00bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00c0-0x00ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0100-0x013f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0140-0x017f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0180-0x01bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x01c0-0x01ff */ /* 0x0200-0x03ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0200-0x023f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0240-0x027f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0280-0x02bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x02c0-0x02ff */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x0300-0x033f */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, /* 0x0340-0x037f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0380-0x03bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x03c0-0x03ff */ /* 0x0400-0x05ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0400-0x043f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0440-0x047f */ 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0480-0x04bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x04c0-0x04ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0500-0x053f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0540-0x057f */ 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, /* 0x0580-0x05bf */ 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x05c0-0x05ff */ /* 0x0600-0x07ff */ 0x3f, 0x00, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, /* 0x0600-0x063f */ 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, /* 0x0640-0x067f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0680-0x06bf */ 0x00, 0x00, 0xc0, 0xbf, 0x9f, 0x3d, 0x00, 0x00, /* 0x06c0-0x06ff */ 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x0700-0x073f */ 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0740-0x077f */ 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, /* 0x0780-0x07bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x07c0-0x07ff */ /* 0x0800-0x09ff */ 0x00, 0x00, 0xc0, 0xfb, 0xef, 0x3e, 0x00, 0x00, /* 0x0800-0x083f */ 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, /* 0x0840-0x087f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */ 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, /* 0x08c0-0x08ff */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, /* 0x0900-0x093f */ 0xfe, 0x21, 0xfe, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0940-0x097f */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0980-0x09bf */ 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x09c0-0x09ff */ /* 0x0a00-0x0bff */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a00-0x0a3f */ 0x86, 0x39, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, /* 0x0a40-0x0a7f */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a80-0x0abf */ 0xbe, 0x21, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0ac0-0x0aff */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, /* 0x0b00-0x0b3f */ 0x1e, 0x20, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0b40-0x0b7f */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0b80-0x0bbf */ 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0bc0-0x0bff */ /* 0x0c00-0x0dff */ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, /* 0x0c00-0x0c3f */ 0xc1, 0x3d, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0c40-0x0c7f */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0c80-0x0cbf */ 0x00, 0x30, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0cc0-0x0cff */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d00-0x0d3f */ 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0d40-0x0d7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d80-0x0dbf */ 0x00, 0x04, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0dc0-0x0dff */ /* 0x0e00-0x0fff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x07, /* 0x0e00-0x0e3f */ 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0e40-0x0e7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x1b, /* 0x0e80-0x0ebf */ 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0ec0-0x0eff */ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x02, /* 0x0f00-0x0f3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, /* 0x0f40-0x0f7f */ 0xdf, 0xe0, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x1f, /* 0x0f80-0x0fbf */ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0fc0-0x0fff */ /* 0x1000-0x11ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfd, 0x66, /* 0x1000-0x103f */ 0x00, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x1e, 0x00, /* 0x1040-0x107f */ 0x64, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x1080-0x10bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10c0-0x10ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1100-0x113f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1140-0x117f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1180-0x11bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11c0-0x11ff */ /* 0x1200-0x13ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1200-0x123f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1240-0x127f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1280-0x12bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x12c0-0x12ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1300-0x133f */ 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, /* 0x1340-0x137f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1380-0x13bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13c0-0x13ff */ /* 0x1600-0x17ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1600-0x163f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1640-0x167f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1680-0x16bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16c0-0x16ff */ 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, /* 0x1700-0x173f */ 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, /* 0x1740-0x177f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x3f, /* 0x1780-0x17bf */ 0x40, 0xfe, 0x0f, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x17c0-0x17ff */ /* 0x1800-0x19ff */ 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1800-0x183f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1840-0x187f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18c0-0x18ff */ 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x04, 0x0e, /* 0x1900-0x193f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1940-0x197f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1980-0x19bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x19c0-0x19ff */ /* 0x1a00-0x1bff */ 0x00, 0x00, 0x80, 0x09, 0x00, 0x00, 0x00, 0x00, /* 0x1a00-0x1a3f */ 0x00, 0x00, 0x40, 0x7f, 0xe5, 0x1f, 0xf8, 0x9f, /* 0x1a40-0x1a7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, /* 0x1a80-0x1abf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1ac0-0x1aff */ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x17, /* 0x1b00-0x1b3f */ 0x04, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x1b40-0x1b7f */ 0x03, 0x00, 0x00, 0x00, 0x3c, 0x3b, 0x00, 0x00, /* 0x1b80-0x1bbf */ 0x00, 0x00, 0x00, 0x00, 0x40, 0xa3, 0x03, 0x00, /* 0x1bc0-0x1bff */ /* 0x1c00-0x1dff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xcf, 0x00, /* 0x1c00-0x1c3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c40-0x1c7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c80-0x1cbf */ 0x00, 0x00, 0xf7, 0xff, 0xfd, 0x21, 0x10, 0x03, /* 0x1cc0-0x1cff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d00-0x1d3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d40-0x1d7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d80-0x1dbf */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf0, /* 0x1dc0-0x1dff */ /* 0x2000-0x21ff */ 0x00, 0xf8, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, /* 0x2000-0x203f */ 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0x00, 0x00, /* 0x2040-0x207f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2080-0x20bf */ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, /* 0x20c0-0x20ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2100-0x213f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2140-0x217f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2180-0x21bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x21c0-0x21ff */ /* 0x2c00-0x2dff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c00-0x2c3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c40-0x2c7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c80-0x2cbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, /* 0x2cc0-0x2cff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d00-0x2d3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x2d40-0x2d7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d80-0x2dbf */ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* 0x2dc0-0x2dff */ /* 0x3000-0x31ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, /* 0x3000-0x303f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3040-0x307f */ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, /* 0x3080-0x30bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30c0-0x30ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3100-0x313f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3140-0x317f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3180-0x31bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x31c0-0x31ff */ /* 0xa600-0xa7ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa600-0xa63f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf7, 0x3f, /* 0xa640-0xa67f */ 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, /* 0xa680-0xa6bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, /* 0xa6c0-0xa6ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa700-0xa73f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa740-0xa77f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa780-0xa7bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa7c0-0xa7ff */ /* 0xa800-0xa9ff */ 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, /* 0xa800-0xa83f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa840-0xa87f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa880-0xa8bf */ 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, /* 0xa8c0-0xa8ff */ 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, /* 0xa900-0xa93f */ 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa940-0xa97f */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x13, /* 0xa980-0xa9bf */ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, /* 0xa9c0-0xa9ff */ /* 0xaa00-0xabff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x00, /* 0xaa00-0xaa3f */ 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0xaa40-0xaa7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0xc1, /* 0xaa80-0xaabf */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x30, 0x40, 0x00, /* 0xaac0-0xaaff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab00-0xab3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab40-0xab7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab80-0xabbf */ 0x00, 0x00, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00, /* 0xabc0-0xabff */ /* 0xfa00-0xfbff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa00-0xfa3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa40-0xfa7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa80-0xfabf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfac0-0xfaff */ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* 0xfb00-0xfb3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb40-0xfb7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb80-0xfbbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfbc0-0xfbff */ /* 0xfe00-0xffff */ 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, /* 0xfe00-0xfe3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe40-0xfe7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe80-0xfebf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0xfec0-0xfeff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff00-0xff3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff40-0xff7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff80-0xffbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, /* 0xffc0-0xffff */ /* 0x10000-0x101ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10000-0x1003f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10040-0x1007f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10080-0x100bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x100c0-0x100ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10100-0x1013f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10140-0x1017f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10180-0x101bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, /* 0x101c0-0x101ff */ /* 0x10200-0x103ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10200-0x1023f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10240-0x1027f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10280-0x102bf */ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, /* 0x102c0-0x102ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10300-0x1033f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, /* 0x10340-0x1037f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10380-0x103bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x103c0-0x103ff */ /* 0x10a00-0x10bff */ 0x6e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, /* 0x10a00-0x10a3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a40-0x10a7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a80-0x10abf */ 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, /* 0x10ac0-0x10aff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b00-0x10b3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b40-0x10b7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b80-0x10bbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10bc0-0x10bff */ /* 0x11000-0x111ff */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, /* 0x11000-0x1103f */ 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x11040-0x1107f */ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x26, /* 0x11080-0x110bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x110c0-0x110ff */ 0x07, 0x00, 0x00, 0x00, 0x80, 0xef, 0x1f, 0x00, /* 0x11100-0x1113f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, /* 0x11140-0x1117f */ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, /* 0x11180-0x111bf */ 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x111c0-0x111ff */ /* 0x11200-0x113ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd3, 0x00, /* 0x11200-0x1123f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11240-0x1127f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11280-0x112bf */ 0x00, 0x00, 0x00, 0x80, 0xf8, 0x07, 0x00, 0x00, /* 0x112c0-0x112ff */ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x11300-0x1133f */ 0x01, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x1f, 0x00, /* 0x11340-0x1137f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11380-0x113bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x113c0-0x113ff */ /* 0x11400-0x115ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11400-0x1143f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11440-0x1147f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x85, /* 0x11480-0x114bf */ 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x114c0-0x114ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11500-0x1153f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11540-0x1157f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xb0, /* 0x11580-0x115bf */ 0x01, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, /* 0x115c0-0x115ff */ /* 0x11600-0x117ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xa7, /* 0x11600-0x1163f */ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11640-0x1167f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xbf, 0x00, /* 0x11680-0x116bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x116c0-0x116ff */ 0x00, 0x00, 0x00, 0xe0, 0xbc, 0x0f, 0x00, 0x00, /* 0x11700-0x1173f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11740-0x1177f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11780-0x117bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x117c0-0x117ff */ /* 0x16a00-0x16bff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16a00-0x16a3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16a40-0x16a7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16a80-0x16abf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, /* 0x16ac0-0x16aff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, /* 0x16b00-0x16b3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16b40-0x16b7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16b80-0x16bbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16bc0-0x16bff */ /* 0x16e00-0x16fff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16e00-0x16e3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16e40-0x16e7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16e80-0x16ebf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16ec0-0x16eff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16f00-0x16f3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16f40-0x16f7f */ 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16f80-0x16fbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16fc0-0x16fff */ /* 0x1bc00-0x1bdff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1bc00-0x1bc3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1bc40-0x1bc7f */ 0x00, 0x00, 0x00, 0x60, 0x0f, 0x00, 0x00, 0x00, /* 0x1bc80-0x1bcbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1bcc0-0x1bcff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1bd00-0x1bd3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1bd40-0x1bd7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1bd80-0x1bdbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1bdc0-0x1bdff */ /* 0x1d000-0x1d1ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d000-0x1d03f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d040-0x1d07f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d080-0x1d0bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d0c0-0x1d0ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d100-0x1d13f */ 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0xf8, 0xff, /* 0x1d140-0x1d17f */ 0xe7, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, /* 0x1d180-0x1d1bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d1c0-0x1d1ff */ /* 0x1d200-0x1d3ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d200-0x1d23f */ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d240-0x1d27f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d280-0x1d2bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d2c0-0x1d2ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d300-0x1d33f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d340-0x1d37f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d380-0x1d3bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d3c0-0x1d3ff */ /* 0x1da00-0x1dbff */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xf8, /* 0x1da00-0x1da3f */ 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x20, 0x00, /* 0x1da40-0x1da7f */ 0x10, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0x00, 0x00, /* 0x1da80-0x1dabf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1dac0-0x1daff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1db00-0x1db3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1db40-0x1db7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1db80-0x1dbbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1dbc0-0x1dbff */ /* 0x1e800-0x1e9ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e800-0x1e83f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e840-0x1e87f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e880-0x1e8bf */ 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e8c0-0x1e8ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e900-0x1e93f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e940-0x1e97f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1e980-0x1e9bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0x1e9c0-0x1e9ff */ }; static const signed char nonspacing_table_ind[248] = { 0, 1, 2, 3, 4, 5, 6, 7, /* 0x0000-0x0fff */ 8, 9, -1, 10, 11, 12, 13, -1, /* 0x1000-0x1fff */ 14, -1, -1, -1, -1, -1, 15, -1, /* 0x2000-0x2fff */ 16, -1, -1, -1, -1, -1, -1, -1, /* 0x3000-0x3fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x4000-0x4fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x5000-0x5fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x6000-0x6fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x7000-0x7fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x8000-0x8fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x9000-0x9fff */ -1, -1, -1, 17, 18, 19, -1, -1, /* 0xa000-0xafff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb000-0xbfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc000-0xcfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd000-0xdfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe000-0xefff */ -1, -1, -1, -1, -1, 20, -1, 21, /* 0xf000-0xffff */ 22, 23, -1, -1, -1, 24, -1, -1, /* 0x10000-0x10fff */ 25, 26, 27, 28, -1, -1, -1, -1, /* 0x11000-0x11fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x12000-0x12fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x13000-0x13fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x14000-0x14fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x15000-0x15fff */ -1, -1, -1, -1, -1, 29, -1, 30, /* 0x16000-0x16fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x17000-0x17fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x18000-0x18fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x19000-0x19fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1a000-0x1afff */ -1, -1, -1, -1, -1, -1, 31, -1, /* 0x1b000-0x1bfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1c000-0x1cfff */ 32, 33, -1, -1, -1, 34, -1, -1, /* 0x1d000-0x1dfff */ -1, -1, -1, -1, 35, -1, -1, -1 /* 0x1e000-0x1efff */ }; /* Determine number of column positions required for UC. */ int uc_width (ucs4_t uc, const char *encoding) { /* Test for non-spacing or control character. */ if ((uc >> 9) < 248) { int ind = nonspacing_table_ind[uc >> 9]; if (ind >= 0) if ((nonspacing_table_data[64*ind + ((uc >> 3) & 63)] >> (uc & 7)) & 1) { if (uc > 0 && uc < 0xa0) return -1; else return 0; } } else if ((uc >> 9) == (0xe0000 >> 9)) { if (uc >= 0xe0100) { if (uc <= 0xe01ef) return 0; } else { if (uc >= 0xe0020 ? uc <= 0xe007f : uc == 0xe0001) return 0; } } /* Test for double-width character. * Generated from "grep '^[^;]\{4,5\};[WF]' EastAsianWidth.txt" * and "grep '^[^;]\{4,5\};[^WF]' EastAsianWidth.txt" */ if (uc >= 0x1100 && ((uc < 0x1160) /* Hangul Jamo */ || (uc >= 0x2329 && uc < 0x232b) /* Angle Brackets */ || (uc >= 0x2e80 && uc < 0xa4d0 /* CJK ... Yi */ && !(uc == 0x303f) && !(uc >= 0x4dc0 && uc < 0x4e00)) || (uc >= 0xac00 && uc < 0xd7a4) /* Hangul Syllables */ || (uc >= 0xf900 && uc < 0xfb00) /* CJK Compatibility Ideographs */ || (uc >= 0xfe10 && uc < 0xfe20) /* Presentation Forms for Vertical */ || (uc >= 0xfe30 && uc < 0xfe70) /* CJK Compatibility Forms */ || (uc >= 0xff00 && uc < 0xff61) /* Fullwidth Forms */ || (uc >= 0xffe0 && uc < 0xffe7) /* Fullwidth Signs */ || (uc >= 0x20000 && uc <= 0x2ffff) /* Supplementary Ideographic Plane */ || (uc >= 0x30000 && uc <= 0x3ffff) /* Tertiary Ideographic Plane */ ) ) return 2; /* In ancient CJK encodings, Cyrillic and most other characters are double-width as well. */ if (uc >= 0x00A1 && uc < 0xFF61 && uc != 0x20A9 && is_cjk_encoding (encoding)) return 2; return 1; } pspp-1.0.1/gl/uniwidth/cjk.h0000644000175000017500000000314513124536243012577 00000000000000/* Test for CJK encoding. Copyright (C) 2001-2002, 2005-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include "streq.h" static int is_cjk_encoding (const char *encoding) { if (0 /* Legacy Japanese encodings */ || STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0) /* Legacy Chinese encodings */ || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) || STREQ_OPT (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0) || STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0) || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0) /* Legacy Korean encodings */ || STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) || STREQ_OPT (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0) || STREQ_OPT (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0)) return 1; return 0; } pspp-1.0.1/gl/timegm.c0000644000175000017500000000233413124536243011451 00000000000000/* Convert UTC calendar time to simple time. Like mktime but assumes UTC. Copyright (C) 1994, 1997, 2003-2004, 2006-2007, 2009-2017 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 3, 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 . */ #ifndef _LIBC # include #endif #include #ifdef _LIBC typedef time_t mktime_offset_t; #else # undef __gmtime_r # define __gmtime_r gmtime_r # define __mktime_internal mktime_internal # include "mktime-internal.h" #endif time_t timegm (struct tm *tmp) { static mktime_offset_t gmtime_offset; tmp->tm_isdst = 0; return __mktime_internal (tmp, __gmtime_r, &gmtime_offset); } pspp-1.0.1/gl/Makefile.in0000644000175000017500000063636713150617707012117 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; you can 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 file is distributed in the hope that 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 file. If not, see . # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=gl/doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl assert byteswap c-ctype c-snprintf c-strcase c-strcasestr c-strtod c-xvasprintf clean-temp close configmake count-one-bits crc crypto/md4 crypto/rijndael dirname dtoastr environ fatal-signal fcntl fpieee fprintf-posix fseeko ftello full-read full-write fwriteerror getline getopt-gnu getpass gettext gettimeofday gitlog-to-changelog include_next intprops inttostr isfinite isinf isnan localcharset mbchar mbiter memcasecmp memchr memchr2 mempcpy memrchr minmax mkdtemp mkstemp pipe2 printf-posix printf-safe progname rawmemchr read-file regex relocatable-prog rename round select snprintf snprintf-posix sprintf-posix stdarg stdbool stdint stpcpy strcasestr strerror strftime strsep strtod strtok_r sys_stat tempname termios trunc unicase/u8-casecmp unicase/u8-casefold unicase/u8-tolower unicase/u8-toupper unictype/category-of unictype/ctype-print unigbrk/uc-is-grapheme-break unilbrk/u8-possible-linebreaks uninorm/nfkd unistd unistr/u8-check unistr/u8-cpy unistr/u8-mblen unistr/u8-mbtouc unistr/u8-mbtoucr unistr/u8-strlen unistr/u8-strmbtouc unistr/u8-strncat unistr/u8-uctomb unitypes uniwidth/u8-strwidth unlocked-io vasprintf-posix version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf vsnprintf-posix vsprintf-posix xalloc xalloc-die xmalloca xmemdup0 xsize xstrndup xvasprintf VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT_TRUE@am__append_1 = unicase/empty-prefix-context.c @LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT_TRUE@am__append_2 = unicase/empty-suffix-context.c @LIBUNISTRING_COMPILE_UNICASE_TOLOWER_TRUE@am__append_3 = unicase/tolower.c @LIBUNISTRING_COMPILE_UNICASE_TOUPPER_TRUE@am__append_4 = unicase/toupper.c @LIBUNISTRING_COMPILE_UNICASE_U8_CASECMP_TRUE@am__append_5 = unicase/u8-casecmp.c @LIBUNISTRING_COMPILE_UNICASE_U8_CASEFOLD_TRUE@am__append_6 = unicase/u8-casefold.c @LIBUNISTRING_COMPILE_UNICASE_U8_CT_CASEFOLD_TRUE@am__append_7 = unicase/u8-ct-casefold.c @LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER_TRUE@am__append_8 = unicase/u8-tolower.c @LIBUNISTRING_COMPILE_UNICASE_U8_TOUPPER_TRUE@am__append_9 = unicase/u8-toupper.c @LIBUNISTRING_COMPILE_UNICTYPE_CATEGORY_NONE_TRUE@am__append_10 = unictype/categ_none.c @LIBUNISTRING_COMPILE_UNICTYPE_CATEGORY_OF_TRUE@am__append_11 = unictype/categ_of.c @LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_TRUE@am__append_12 = unictype/combiningclass.c @LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_PRINT_TRUE@am__append_13 = unictype/ctype_print.c @LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED_TRUE@am__append_14 = unictype/pr_soft_dotted.c @LIBUNISTRING_COMPILE_UNIGBRK_UC_GBRK_PROP_TRUE@am__append_15 = unigbrk/uc-gbrk-prop.c @LIBUNISTRING_COMPILE_UNIGBRK_UC_IS_GRAPHEME_BREAK_TRUE@am__append_16 = unigbrk/uc-is-grapheme-break.c @LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_TRUE@am__append_17 = unilbrk/u8-possible-linebreaks.c @LIBUNISTRING_COMPILE_UNINORM_CANONICAL_DECOMPOSITION_TRUE@am__append_18 = uninorm/canonical-decomposition.c @LIBUNISTRING_COMPILE_UNINORM_DECOMPOSING_FORM_TRUE@am__append_19 = uninorm/decomposing-form.c @LIBUNISTRING_COMPILE_UNINORM_DECOMPOSITION_TRUE@am__append_20 = uninorm/decomposition.c @LIBUNISTRING_COMPILE_UNINORM_NFD_TRUE@am__append_21 = uninorm/nfd.c @LIBUNISTRING_COMPILE_UNINORM_NFKD_TRUE@am__append_22 = uninorm/nfkd.c @LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE_TRUE@am__append_23 = uninorm/u8-normalize.c @LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_TRUE@am__append_24 = unistr/u8-check.c @LIBUNISTRING_COMPILE_UNISTR_U8_CMP_TRUE@am__append_25 = unistr/u8-cmp.c @LIBUNISTRING_COMPILE_UNISTR_U8_CMP2_TRUE@am__append_26 = unistr/u8-cmp2.c @LIBUNISTRING_COMPILE_UNISTR_U8_CPY_TRUE@am__append_27 = unistr/u8-cpy.c @LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_TRUE@am__append_28 = unistr/u8-mblen.c @LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_TRUE@am__append_29 = unistr/u8-mbtouc.c unistr/u8-mbtouc-aux.c @LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE@am__append_30 = unistr/u8-mbtouc-unsafe.c unistr/u8-mbtouc-unsafe-aux.c @LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__append_31 = unistr/u8-mbtoucr.c @LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_TRUE@am__append_32 = unistr/u8-strlen.c @LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC_TRUE@am__append_33 = unistr/u8-strmbtouc.c @LIBUNISTRING_COMPILE_UNISTR_U8_STRNCAT_TRUE@am__append_34 = unistr/u8-strncat.c @LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__append_35 = unistr/u8-uctomb.c unistr/u8-uctomb-aux.c @LIBUNISTRING_COMPILE_UNIWIDTH_U8_STRWIDTH_TRUE@am__append_36 = uniwidth/u8-strwidth.c @LIBUNISTRING_COMPILE_UNIWIDTH_U8_WIDTH_TRUE@am__append_37 = uniwidth/u8-width.c @LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_38 = uniwidth/width.c subdir = gl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/absolute-header.m4 \ $(top_srcdir)/gl/m4/alloca.m4 \ $(top_srcdir)/gl/m4/asm-underscore.m4 \ $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/btowc.m4 \ $(top_srcdir)/gl/m4/builtin-expect.m4 \ $(top_srcdir)/gl/m4/byteswap.m4 \ $(top_srcdir)/gl/m4/c-strtod.m4 \ $(top_srcdir)/gl/m4/canonicalize.m4 \ $(top_srcdir)/gl/m4/ceil.m4 \ $(top_srcdir)/gl/m4/check-math-lib.m4 \ $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/codeset.m4 \ $(top_srcdir)/gl/m4/configmake.m4 \ $(top_srcdir)/gl/m4/count-one-bits.m4 \ $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/dup2.m4 $(top_srcdir)/gl/m4/eealloc.m4 \ $(top_srcdir)/gl/m4/environ.m4 $(top_srcdir)/gl/m4/errno_h.m4 \ $(top_srcdir)/gl/m4/error.m4 $(top_srcdir)/gl/m4/exponentd.m4 \ $(top_srcdir)/gl/m4/exponentf.m4 \ $(top_srcdir)/gl/m4/exponentl.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/extern-inline.m4 \ $(top_srcdir)/gl/m4/fatal-signal.m4 \ $(top_srcdir)/gl/m4/fcntl-o.m4 $(top_srcdir)/gl/m4/fcntl.m4 \ $(top_srcdir)/gl/m4/fcntl_h.m4 \ $(top_srcdir)/gl/m4/flexmember.m4 \ $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/floor.m4 \ $(top_srcdir)/gl/m4/fpieee.m4 \ $(top_srcdir)/gl/m4/fprintf-posix.m4 \ $(top_srcdir)/gl/m4/frexp.m4 $(top_srcdir)/gl/m4/frexpl.m4 \ $(top_srcdir)/gl/m4/fseek.m4 $(top_srcdir)/gl/m4/fseeko.m4 \ $(top_srcdir)/gl/m4/fseterr.m4 $(top_srcdir)/gl/m4/fstat.m4 \ $(top_srcdir)/gl/m4/ftell.m4 $(top_srcdir)/gl/m4/ftello.m4 \ $(top_srcdir)/gl/m4/getdelim.m4 \ $(top_srcdir)/gl/m4/getdtablesize.m4 \ $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/getpass.m4 \ $(top_srcdir)/gl/m4/getprogname.m4 \ $(top_srcdir)/gl/m4/gettext.m4 \ $(top_srcdir)/gl/m4/gettimeofday.m4 \ $(top_srcdir)/gl/m4/glibc21.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/hard-locale.m4 \ $(top_srcdir)/gl/m4/iconv.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/inline.m4 \ $(top_srcdir)/gl/m4/intlmacosx.m4 \ $(top_srcdir)/gl/m4/intmax_t.m4 \ $(top_srcdir)/gl/m4/inttostr.m4 \ $(top_srcdir)/gl/m4/inttypes_h.m4 \ $(top_srcdir)/gl/m4/isfinite.m4 $(top_srcdir)/gl/m4/isinf.m4 \ $(top_srcdir)/gl/m4/isnan.m4 $(top_srcdir)/gl/m4/isnand.m4 \ $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ $(top_srcdir)/gl/m4/iswblank.m4 \ $(top_srcdir)/gl/m4/langinfo_h.m4 \ $(top_srcdir)/gl/m4/largefile.m4 $(top_srcdir)/gl/m4/ldexp.m4 \ $(top_srcdir)/gl/m4/ldexpl.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ $(top_srcdir)/gl/m4/lib-link.m4 \ $(top_srcdir)/gl/m4/lib-prefix.m4 \ $(top_srcdir)/gl/m4/libunistring-base.m4 \ $(top_srcdir)/gl/m4/limits-h.m4 \ $(top_srcdir)/gl/m4/localcharset.m4 \ $(top_srcdir)/gl/m4/locale-fr.m4 \ $(top_srcdir)/gl/m4/locale-ja.m4 \ $(top_srcdir)/gl/m4/locale-zh.m4 \ $(top_srcdir)/gl/m4/locale_h.m4 \ $(top_srcdir)/gl/m4/localeconv.m4 \ $(top_srcdir)/gl/m4/localtime-buffer.m4 \ $(top_srcdir)/gl/m4/lock.m4 $(top_srcdir)/gl/m4/longlong.m4 \ $(top_srcdir)/gl/m4/lseek.m4 $(top_srcdir)/gl/m4/lstat.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/malloca.m4 \ $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mbchar.m4 \ $(top_srcdir)/gl/m4/mbiter.m4 $(top_srcdir)/gl/m4/mbrtowc.m4 \ $(top_srcdir)/gl/m4/mbsinit.m4 \ $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ $(top_srcdir)/gl/m4/md4.m4 $(top_srcdir)/gl/m4/memcasecmp.m4 \ $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/minmax.m4 \ $(top_srcdir)/gl/m4/mkdtemp.m4 $(top_srcdir)/gl/m4/mkstemp.m4 \ $(top_srcdir)/gl/m4/mktime.m4 $(top_srcdir)/gl/m4/mmap-anon.m4 \ $(top_srcdir)/gl/m4/mode_t.m4 \ $(top_srcdir)/gl/m4/msvc-inval.m4 \ $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ $(top_srcdir)/gl/m4/multiarch.m4 \ $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ $(top_srcdir)/gl/m4/open.m4 $(top_srcdir)/gl/m4/pathmax.m4 \ $(top_srcdir)/gl/m4/pipe2.m4 $(top_srcdir)/gl/m4/po.m4 \ $(top_srcdir)/gl/m4/printf-frexp.m4 \ $(top_srcdir)/gl/m4/printf-frexpl.m4 \ $(top_srcdir)/gl/m4/printf-posix-rpl.m4 \ $(top_srcdir)/gl/m4/printf.m4 \ $(top_srcdir)/gl/m4/pthread_rwlock_rdlock.m4 \ $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/rawmemchr.m4 \ $(top_srcdir)/gl/m4/read-file.m4 $(top_srcdir)/gl/m4/read.m4 \ $(top_srcdir)/gl/m4/readlink.m4 $(top_srcdir)/gl/m4/realloc.m4 \ $(top_srcdir)/gl/m4/regex.m4 \ $(top_srcdir)/gl/m4/relocatable-lib.m4 \ $(top_srcdir)/gl/m4/relocatable.m4 \ $(top_srcdir)/gl/m4/rename.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ $(top_srcdir)/gl/m4/round.m4 $(top_srcdir)/gl/m4/safe-read.m4 \ $(top_srcdir)/gl/m4/safe-write.m4 \ $(top_srcdir)/gl/m4/secure_getenv.m4 \ $(top_srcdir)/gl/m4/select.m4 $(top_srcdir)/gl/m4/setenv.m4 \ $(top_srcdir)/gl/m4/sig_atomic_t.m4 \ $(top_srcdir)/gl/m4/sigaction.m4 \ $(top_srcdir)/gl/m4/signal_h.m4 \ $(top_srcdir)/gl/m4/signalblocking.m4 \ $(top_srcdir)/gl/m4/signbit.m4 $(top_srcdir)/gl/m4/size_max.m4 \ $(top_srcdir)/gl/m4/snprintf-posix.m4 \ $(top_srcdir)/gl/m4/snprintf.m4 \ $(top_srcdir)/gl/m4/socketlib.m4 \ $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ $(top_srcdir)/gl/m4/sprintf-posix.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stat.m4 \ $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ $(top_srcdir)/gl/m4/strcasestr.m4 \ $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ $(top_srcdir)/gl/m4/strftime.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/strings_h.m4 \ $(top_srcdir)/gl/m4/strncat.m4 $(top_srcdir)/gl/m4/strndup.m4 \ $(top_srcdir)/gl/m4/strnlen.m4 $(top_srcdir)/gl/m4/strsep.m4 \ $(top_srcdir)/gl/m4/strtod.m4 $(top_srcdir)/gl/m4/strtok_r.m4 \ $(top_srcdir)/gl/m4/sys_select_h.m4 \ $(top_srcdir)/gl/m4/sys_socket_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/sys_time_h.m4 \ $(top_srcdir)/gl/m4/sys_types_h.m4 \ $(top_srcdir)/gl/m4/sys_uio_h.m4 \ $(top_srcdir)/gl/m4/tempname.m4 \ $(top_srcdir)/gl/m4/termios_h.m4 \ $(top_srcdir)/gl/m4/threadlib.m4 $(top_srcdir)/gl/m4/time_h.m4 \ $(top_srcdir)/gl/m4/time_r.m4 $(top_srcdir)/gl/m4/time_rz.m4 \ $(top_srcdir)/gl/m4/timegm.m4 $(top_srcdir)/gl/m4/tm_gmtoff.m4 \ $(top_srcdir)/gl/m4/tmpdir.m4 $(top_srcdir)/gl/m4/trunc.m4 \ $(top_srcdir)/gl/m4/tzset.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/unlocked-io.m4 \ $(top_srcdir)/gl/m4/vasnprintf.m4 \ $(top_srcdir)/gl/m4/vasprintf-posix.m4 \ $(top_srcdir)/gl/m4/vasprintf.m4 \ $(top_srcdir)/gl/m4/version-etc.m4 \ $(top_srcdir)/gl/m4/vfprintf-posix.m4 \ $(top_srcdir)/gl/m4/vprintf-posix.m4 \ $(top_srcdir)/gl/m4/vsnprintf-posix.m4 \ $(top_srcdir)/gl/m4/vsnprintf.m4 \ $(top_srcdir)/gl/m4/vsprintf-posix.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_h.m4 $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/gl/m4/wcrtomb.m4 $(top_srcdir)/gl/m4/wctype_h.m4 \ $(top_srcdir)/gl/m4/wcwidth.m4 $(top_srcdir)/gl/m4/wint_t.m4 \ $(top_srcdir)/gl/m4/write.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ $(top_srcdir)/gl/m4/xsize.m4 $(top_srcdir)/gl/m4/xstrndup.m4 \ $(top_srcdir)/gl/m4/xvasprintf.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = am__libgl_la_SOURCES_DIST = allocator.c areadlink.c binary-io.h \ binary-io.c c-ctype.h c-ctype.c c-snprintf.c c-strcase.h \ c-strcasecmp.c c-strncasecmp.c c-strcasestr.h c-strcasestr.c \ c-strtod.c c-vasnprintf.c c-asprintf.c c-vasprintf.c \ c-xasprintf.c c-xvasprintf.c careadlinkat.c clean-temp.h \ clean-temp.c count-one-bits.c crc.c md4.c rijndael-alg-fst.c \ rijndael-api-fst.c dirname.c basename.c dirname-lgpl.c \ basename-lgpl.c stripslash.c dtoastr.c exitfail.c \ fatal-signal.h fatal-signal.c fd-hook.c full-read.h \ full-read.c full-write.h full-write.c fwriteerror.h \ fwriteerror.c getprogname.h getprogname.c gettext.h \ hard-locale.c imaxtostr.c inttostr.c offtostr.c uinttostr.c \ umaxtostr.c gl_linkedhash_list.h gl_linkedhash_list.c \ gl_anyhash_list1.h gl_anyhash_list2.h gl_anylinked_list1.h \ gl_anylinked_list2.h gl_list.h gl_list.c localcharset.h \ localcharset.c glthread/lock.h glthread/lock.c malloca.c \ math.c mbchar.c mbiter.h mbiter.c memcasecmp.c memchr2.h \ memchr2.c minmax.h pipe2.c printf-frexp.c printf-frexpl.c \ progname.h progname.c read-file.c safe-read.c safe-write.c \ sig-handler.c size_max.h sockets.h sockets.c strftime.c \ sys_socket.c tempname.c glthread/threadlib.c tmpdir.h tmpdir.c \ unicase/cased.c unicase/empty-prefix-context.c \ unicase/empty-suffix-context.c unicase/ignorable.c \ unicase/special-casing.c unicase/tocasefold.c \ unicase/tolower.c unicase/toupper.c unicase/u8-casecmp.c \ unicase/u8-casefold.c unicase/u8-casemap.c \ unicase/u8-ct-casefold.c unicase/u8-tolower.c \ unicase/u8-toupper.c unictype/categ_none.c unictype/categ_of.c \ unictype/combiningclass.c unictype/ctype_print.c \ unictype/pr_soft_dotted.c unigbrk/uc-gbrk-prop.c \ unigbrk/uc-is-grapheme-break.c unilbrk/lbrktables.c \ unilbrk/u8-possible-linebreaks.c \ uninorm/canonical-decomposition.c \ uninorm/compat-decomposition.c uninorm/decompose-internal.c \ uninorm/decomposing-form.c uninorm/decomposition.c \ uninorm/decomposition-table.c uninorm/nfd.c uninorm/nfkd.c \ uninorm/u8-normalize.c unistd.c unistr/u8-check.c \ unistr/u8-cmp.c unistr/u8-cmp2.c unistr/u8-cpy.c \ unistr/u8-mblen.c unistr/u8-mbtouc.c unistr/u8-mbtouc-aux.c \ unistr/u8-mbtouc-unsafe.c unistr/u8-mbtouc-unsafe-aux.c \ unistr/u8-mbtoucr.c unistr/u8-strlen.c unistr/u8-strmbtouc.c \ unistr/u8-strncat.c unistr/u8-uctomb.c unistr/u8-uctomb-aux.c \ uniwidth/u8-strwidth.c uniwidth/u8-width.c uniwidth/width.c \ version-etc.h version-etc.c version-etc-fsf.c wctype-h.c \ xmalloc.c xalloc-die.c gl_xlist.h gl_xlist.c xmalloca.c \ xreadlink.c xsize.h xsize.c xstrndup.h xstrndup.c xvasprintf.h \ xvasprintf.c xasprintf.c am__dirstamp = $(am__leading_dot)dirstamp @LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT_TRUE@am__objects_1 = unicase/empty-prefix-context.lo @LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT_TRUE@am__objects_2 = unicase/empty-suffix-context.lo @LIBUNISTRING_COMPILE_UNICASE_TOLOWER_TRUE@am__objects_3 = \ @LIBUNISTRING_COMPILE_UNICASE_TOLOWER_TRUE@ unicase/tolower.lo @LIBUNISTRING_COMPILE_UNICASE_TOUPPER_TRUE@am__objects_4 = \ @LIBUNISTRING_COMPILE_UNICASE_TOUPPER_TRUE@ unicase/toupper.lo @LIBUNISTRING_COMPILE_UNICASE_U8_CASECMP_TRUE@am__objects_5 = unicase/u8-casecmp.lo @LIBUNISTRING_COMPILE_UNICASE_U8_CASEFOLD_TRUE@am__objects_6 = unicase/u8-casefold.lo @LIBUNISTRING_COMPILE_UNICASE_U8_CT_CASEFOLD_TRUE@am__objects_7 = unicase/u8-ct-casefold.lo @LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER_TRUE@am__objects_8 = unicase/u8-tolower.lo @LIBUNISTRING_COMPILE_UNICASE_U8_TOUPPER_TRUE@am__objects_9 = unicase/u8-toupper.lo @LIBUNISTRING_COMPILE_UNICTYPE_CATEGORY_NONE_TRUE@am__objects_10 = unictype/categ_none.lo @LIBUNISTRING_COMPILE_UNICTYPE_CATEGORY_OF_TRUE@am__objects_11 = unictype/categ_of.lo @LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_TRUE@am__objects_12 = unictype/combiningclass.lo @LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_PRINT_TRUE@am__objects_13 = unictype/ctype_print.lo @LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED_TRUE@am__objects_14 = unictype/pr_soft_dotted.lo @LIBUNISTRING_COMPILE_UNIGBRK_UC_GBRK_PROP_TRUE@am__objects_15 = unigbrk/uc-gbrk-prop.lo @LIBUNISTRING_COMPILE_UNIGBRK_UC_IS_GRAPHEME_BREAK_TRUE@am__objects_16 = unigbrk/uc-is-grapheme-break.lo @LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_TRUE@am__objects_17 = unilbrk/u8-possible-linebreaks.lo @LIBUNISTRING_COMPILE_UNINORM_CANONICAL_DECOMPOSITION_TRUE@am__objects_18 = uninorm/canonical-decomposition.lo @LIBUNISTRING_COMPILE_UNINORM_DECOMPOSING_FORM_TRUE@am__objects_19 = uninorm/decomposing-form.lo @LIBUNISTRING_COMPILE_UNINORM_DECOMPOSITION_TRUE@am__objects_20 = uninorm/decomposition.lo @LIBUNISTRING_COMPILE_UNINORM_NFD_TRUE@am__objects_21 = \ @LIBUNISTRING_COMPILE_UNINORM_NFD_TRUE@ uninorm/nfd.lo @LIBUNISTRING_COMPILE_UNINORM_NFKD_TRUE@am__objects_22 = \ @LIBUNISTRING_COMPILE_UNINORM_NFKD_TRUE@ uninorm/nfkd.lo @LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE_TRUE@am__objects_23 = uninorm/u8-normalize.lo @LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_TRUE@am__objects_24 = \ @LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_TRUE@ unistr/u8-check.lo @LIBUNISTRING_COMPILE_UNISTR_U8_CMP_TRUE@am__objects_25 = \ @LIBUNISTRING_COMPILE_UNISTR_U8_CMP_TRUE@ unistr/u8-cmp.lo @LIBUNISTRING_COMPILE_UNISTR_U8_CMP2_TRUE@am__objects_26 = \ @LIBUNISTRING_COMPILE_UNISTR_U8_CMP2_TRUE@ unistr/u8-cmp2.lo @LIBUNISTRING_COMPILE_UNISTR_U8_CPY_TRUE@am__objects_27 = \ @LIBUNISTRING_COMPILE_UNISTR_U8_CPY_TRUE@ unistr/u8-cpy.lo @LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_TRUE@am__objects_28 = \ @LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_TRUE@ unistr/u8-mblen.lo @LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_TRUE@am__objects_29 = unistr/u8-mbtouc.lo \ @LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_TRUE@ unistr/u8-mbtouc-aux.lo @LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE@am__objects_30 = unistr/u8-mbtouc-unsafe.lo \ @LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE@ unistr/u8-mbtouc-unsafe-aux.lo @LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__objects_31 = unistr/u8-mbtoucr.lo @LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_TRUE@am__objects_32 = unistr/u8-strlen.lo @LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC_TRUE@am__objects_33 = unistr/u8-strmbtouc.lo @LIBUNISTRING_COMPILE_UNISTR_U8_STRNCAT_TRUE@am__objects_34 = unistr/u8-strncat.lo @LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__objects_35 = unistr/u8-uctomb.lo \ @LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@ unistr/u8-uctomb-aux.lo @LIBUNISTRING_COMPILE_UNIWIDTH_U8_STRWIDTH_TRUE@am__objects_36 = uniwidth/u8-strwidth.lo @LIBUNISTRING_COMPILE_UNIWIDTH_U8_WIDTH_TRUE@am__objects_37 = uniwidth/u8-width.lo @LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__objects_38 = \ @LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@ uniwidth/width.lo am_libgl_la_OBJECTS = allocator.lo areadlink.lo binary-io.lo \ c-ctype.lo c-snprintf.lo c-strcasecmp.lo c-strncasecmp.lo \ c-strcasestr.lo c-strtod.lo c-vasnprintf.lo c-asprintf.lo \ c-vasprintf.lo c-xasprintf.lo c-xvasprintf.lo careadlinkat.lo \ clean-temp.lo count-one-bits.lo crc.lo md4.lo \ rijndael-alg-fst.lo rijndael-api-fst.lo dirname.lo basename.lo \ dirname-lgpl.lo basename-lgpl.lo stripslash.lo dtoastr.lo \ exitfail.lo fatal-signal.lo fd-hook.lo full-read.lo \ full-write.lo fwriteerror.lo getprogname.lo hard-locale.lo \ imaxtostr.lo inttostr.lo offtostr.lo uinttostr.lo umaxtostr.lo \ gl_linkedhash_list.lo gl_list.lo localcharset.lo \ glthread/lock.lo malloca.lo math.lo mbchar.lo mbiter.lo \ memcasecmp.lo memchr2.lo pipe2.lo printf-frexp.lo \ printf-frexpl.lo progname.lo read-file.lo safe-read.lo \ safe-write.lo sig-handler.lo sockets.lo strftime.lo \ sys_socket.lo tempname.lo glthread/threadlib.lo tmpdir.lo \ unicase/cased.lo $(am__objects_1) $(am__objects_2) \ unicase/ignorable.lo unicase/special-casing.lo \ unicase/tocasefold.lo $(am__objects_3) $(am__objects_4) \ $(am__objects_5) $(am__objects_6) unicase/u8-casemap.lo \ $(am__objects_7) $(am__objects_8) $(am__objects_9) \ $(am__objects_10) $(am__objects_11) $(am__objects_12) \ $(am__objects_13) $(am__objects_14) $(am__objects_15) \ $(am__objects_16) unilbrk/lbrktables.lo $(am__objects_17) \ $(am__objects_18) uninorm/compat-decomposition.lo \ uninorm/decompose-internal.lo $(am__objects_19) \ $(am__objects_20) uninorm/decomposition-table.lo \ $(am__objects_21) $(am__objects_22) $(am__objects_23) \ unistd.lo $(am__objects_24) $(am__objects_25) \ $(am__objects_26) $(am__objects_27) $(am__objects_28) \ $(am__objects_29) $(am__objects_30) $(am__objects_31) \ $(am__objects_32) $(am__objects_33) $(am__objects_34) \ $(am__objects_35) $(am__objects_36) $(am__objects_37) \ $(am__objects_38) version-etc.lo version-etc-fsf.lo \ wctype-h.lo xmalloc.lo xalloc-die.lo gl_xlist.lo xmalloca.lo \ xreadlink.lo xsize.lo xstrndup.lo xvasprintf.lo xasprintf.lo libgl_la_OBJECTS = $(am_libgl_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libgl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libgl_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgl_la_SOURCES) $(EXTRA_libgl_la_SOURCES) DIST_SOURCES = $(am__libgl_la_SOURCES_DIST) $(EXTRA_libgl_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp alloca.c DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AM_MAKEINFOFLAGS = @AM_MAKEINFOFLAGS@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ AS = @AS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BYTESWAP_H = @BYTESWAP_H@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ -DEXEEXT=\"@EXEEXT@\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ FLOOR_LIBM = @FLOOR_LIBM@ GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ GETOPT_H = @GETOPT_H@ GLADE_UI_CFLAGS = @GLADE_UI_CFLAGS@ GLADE_UI_LIBS = @GLADE_UI_LIBS@ GLIBC21 = @GLIBC21@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GNM_READ_SUPPORT = @GNM_READ_SUPPORT@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CBRT = @GNULIB_CBRT@ GNULIB_CBRTF = @GNULIB_CBRTF@ GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_CTIME = @GNULIB_CTIME@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXP2 = @GNULIB_EXP2@ GNULIB_EXP2F = @GNULIB_EXP2F@ GNULIB_EXP2L = @GNULIB_EXP2L@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_EXPM1 = @GNULIB_EXPM1@ GNULIB_EXPM1F = @GNULIB_EXPM1F@ GNULIB_EXPM1L = @GNULIB_EXPM1L@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMOD = @GNULIB_FMOD@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_HYPOT = @GNULIB_HYPOT@ GNULIB_HYPOTF = @GNULIB_HYPOTF@ GNULIB_HYPOTL = @GNULIB_HYPOTL@ GNULIB_ILOGB = @GNULIB_ILOGB@ GNULIB_ILOGBF = @GNULIB_ILOGBF@ GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ GNULIB_LOG = @GNULIB_LOG@ GNULIB_LOG10 = @GNULIB_LOG10@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOG10L = @GNULIB_LOG10L@ GNULIB_LOG1P = @GNULIB_LOG1P@ GNULIB_LOG1PF = @GNULIB_LOG1PF@ GNULIB_LOG1PL = @GNULIB_LOG1PL@ GNULIB_LOG2 = @GNULIB_LOG2@ GNULIB_LOG2F = @GNULIB_LOG2F@ GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGBF = @GNULIB_LOGBF@ GNULIB_LOGBL = @GNULIB_LOGBL@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODF = @GNULIB_MODF@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PSELECT = @GNULIB_PSELECT@ GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMAINDER = @GNULIB_REMAINDER@ GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRFTIME = @GNULIB_STRFTIME@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TCGETSID = @GNULIB_TCGETSID@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_TZSET = @GNULIB_TZSET@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_LIBS = @GSL_LIBS@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CBRT = @HAVE_CBRT@ HAVE_CBRTF = @HAVE_CBRTF@ HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TCGETSID = @HAVE_DECL_TCGETSID@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_EXPM1 = @HAVE_EXPM1@ HAVE_EXPM1F = @HAVE_EXPM1F@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FMODL = @HAVE_FMODL@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_HYPOTF = @HAVE_HYPOTF@ HAVE_HYPOTL = @HAVE_HYPOTL@ HAVE_ILOGB = @HAVE_ILOGB@ HAVE_ILOGBF = @HAVE_ILOGBF@ HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOG10L = @HAVE_LOG10L@ HAVE_LOG1P = @HAVE_LOG1P@ HAVE_LOG1PF = @HAVE_LOG1PF@ HAVE_LOG1PL = @HAVE_LOG1PL@ HAVE_LOGBF = @HAVE_LOGBF@ HAVE_LOGBL = @HAVE_LOGBL@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MODFL = @HAVE_MODFL@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PSELECT = @HAVE_PSELECT@ HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_QSORT_R = @HAVE_QSORT_R@ HAVE_RAISE = @HAVE_RAISE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REMAINDER = @HAVE_REMAINDER@ HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ HAVE_TRUNCATE = @HAVE_TRUNCATE@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_TZSET = @HAVE_TZSET@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSFTIME = @HAVE_WCSFTIME@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM_ENV = @INSTALL_PROGRAM_ENV@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ ISFINITE_LIBM = @ISFINITE_LIBM@ ISINF_LIBM = @ISINF_LIBM@ ISNAND_LIBM = @ISNAND_LIBM@ ISNANF_LIBM = @ISNANF_LIBM@ ISNANL_LIBM = @ISNANL_LIBM@ ISNAN_LIBM = @ISNAN_LIBM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBUNISTRING_UNICASE_H = @LIBUNISTRING_UNICASE_H@ LIBUNISTRING_UNICTYPE_H = @LIBUNISTRING_UNICTYPE_H@ LIBUNISTRING_UNIGBRK_H = @LIBUNISTRING_UNIGBRK_H@ LIBUNISTRING_UNILBRK_H = @LIBUNISTRING_UNILBRK_H@ LIBUNISTRING_UNINORM_H = @LIBUNISTRING_UNINORM_H@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIB_SELECT = @LIB_SELECT@ LIMITS_H = @LIMITS_H@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTALLOCA = @LTALLOCA@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBREADLINE = @LTLIBREADLINE@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_GTK_GTK_H = @NEXT_AS_FIRST_DIRECTIVE_GTK_GTK_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_TERMIOS_H = @NEXT_AS_FIRST_DIRECTIVE_TERMIOS_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_GTK_GTK_H = @NEXT_GTK_GTK_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_TERMIOS_H = @NEXT_TERMIOS_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODF_READ_SUPPORT = @ODF_READ_SUPPORT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PG_CFLAGS = @PG_CFLAGS@ PG_CONFIG = @PG_CONFIG@ PG_LDFLAGS = @PG_LDFLAGS@ PG_LIBS = @PG_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PSPPIRE_LDFLAGS = @PSPPIRE_LDFLAGS@ PSPP_LDFLAGS = @PSPP_LDFLAGS@ PSQL_SUPPORT = @PSQL_SUPPORT@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ RELOCATABLE_BUILD_DIR = @RELOCATABLE_BUILD_DIR@ RELOCATABLE_CONFIG_H_DIR = @RELOCATABLE_CONFIG_H_DIR@ RELOCATABLE_LDFLAGS = @RELOCATABLE_LDFLAGS@ RELOCATABLE_LIBRARY_PATH = @RELOCATABLE_LIBRARY_PATH@ RELOCATABLE_SRC_DIR = @RELOCATABLE_SRC_DIR@ RELOCATABLE_STRIP = @RELOCATABLE_STRIP@ REPLACE_ACOSF = @REPLACE_ACOSF@ REPLACE_ASINF = @REPLACE_ASINF@ REPLACE_ATAN2F = @REPLACE_ATAN2F@ REPLACE_ATANF = @REPLACE_ATANF@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CBRTF = @REPLACE_CBRTF@ REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_COSF = @REPLACE_COSF@ REPLACE_COSHF = @REPLACE_COSHF@ REPLACE_CTIME = @REPLACE_CTIME@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_EXP2 = @REPLACE_EXP2@ REPLACE_EXP2L = @REPLACE_EXP2L@ REPLACE_EXPF = @REPLACE_EXPF@ REPLACE_EXPM1 = @REPLACE_EXPM1@ REPLACE_EXPM1F = @REPLACE_EXPM1F@ REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FMOD = @REPLACE_FMOD@ REPLACE_FMODF = @REPLACE_FMODF@ REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_HYPOT = @REPLACE_HYPOT@ REPLACE_HYPOTF = @REPLACE_HYPOTF@ REPLACE_HYPOTL = @REPLACE_HYPOTL@ REPLACE_ILOGB = @REPLACE_ILOGB@ REPLACE_ILOGBF = @REPLACE_ILOGBF@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LOG = @REPLACE_LOG@ REPLACE_LOG10 = @REPLACE_LOG10@ REPLACE_LOG10F = @REPLACE_LOG10F@ REPLACE_LOG10L = @REPLACE_LOG10L@ REPLACE_LOG1P = @REPLACE_LOG1P@ REPLACE_LOG1PF = @REPLACE_LOG1PF@ REPLACE_LOG1PL = @REPLACE_LOG1PL@ REPLACE_LOG2 = @REPLACE_LOG2@ REPLACE_LOG2F = @REPLACE_LOG2F@ REPLACE_LOG2L = @REPLACE_LOG2L@ REPLACE_LOGB = @REPLACE_LOGB@ REPLACE_LOGBF = @REPLACE_LOGBF@ REPLACE_LOGBL = @REPLACE_LOGBL@ REPLACE_LOGF = @REPLACE_LOGF@ REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_MODF = @REPLACE_MODF@ REPLACE_MODFF = @REPLACE_MODFF@ REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PSELECT = @REPLACE_PSELECT@ REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMAINDER = @REPLACE_REMAINDER@ REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SINF = @REPLACE_SINF@ REPLACE_SINHF = @REPLACE_SINHF@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_SQRTF = @REPLACE_SQRTF@ REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRFTIME = @REPLACE_STRFTIME@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TANF = @REPLACE_TANF@ REPLACE_TANHF = @REPLACE_TANHF@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_TZSET = @REPLACE_TZSET@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ ROUND_LIBM = @ROUND_LIBM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ TRUNC_LIBM = @TRUNC_LIBM@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VERSION_FOR_PERL = @VERSION_FOR_PERL@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WITH_PERL_MODULE = @WITH_PERL_MODULE@ XMLLINT = @XMLLINT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = libgl.la # No GNU Make output. # If your project uses "gettextize --intl" to put a source-code # copy of libintl into the package, every Makefile.am needs # -I$(top_builddir)/intl, so that can be found in this directory. # Here's one way to do this: #AM_CPPFLAGS += -I$(top_builddir)/intl # This option has no effect when the user disables NLS (because then # the intl directory contains no libintl.h file). This option is not # enabled by default because the intl directory might not exist if # your project does not use "gettext --intl", and some compilers # complain about -I options applied to nonexistent directories. EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h allocator.h \ areadlink.h array-mergesort.h btowc.c byteswap.in.h \ c-snprintf.h str-two-way.h c-strtod.h c-vasnprintf.h float+.h \ printf-args.c printf-args.h printf-parse.c printf-parse.h \ vasnprintf.c vasnprintf.h c-vasprintf.h c-xvasprintf.h \ canonicalize-lgpl.c careadlinkat.h close.c count-one-bits.h \ crc.h md4.h rijndael-alg-fst.h rijndael-api-fst.h stripslash.c \ dirname.h dosname.h ftoastr.c ftoastr.h dup2.c errno.in.h \ error.c error.h exitfail.h fcntl.c fcntl.in.h fd-hook.h \ filename.h flexmember.h float.c float.in.h itold.c floor.c \ fprintf.c fpucw.h frexp.c frexp.c frexpl.c fseek.c fseeko.c \ stdio-impl.h fseterr.c fseterr.h stdio-impl.h fstat.c \ stat-w32.c stat-w32.h ftell.c ftello.c stdio-impl.h \ full-write.c getdelim.c getdtablesize.c getline.c \ getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h \ getopt-pfx-ext.h getopt.c getopt.in.h getopt1.c getopt_int.h \ getpass.c getpass.h $(top_srcdir)/build-aux/config.rpath \ gettimeofday.c $(top_srcdir)/build-aux/gitlog-to-changelog \ hard-locale.h $(top_srcdir)/build-aux/config.rpath intprops.h \ anytostr.c inttostr.h isfinite.c isinf.c float+.h isnan.c \ isnand.c float+.h isnan.c isnand-nolibm.h isnand.c float+.h \ isnan.c isnanf.c float+.h isnan.c isnanf-nolibm.h isnanf.c \ float+.h isnan.c isnanl.c float+.h isnan.c isnanl-nolibm.h \ isnanl.c iswblank.c langinfo.in.h limits.in.h config.charset \ ref-add.sin ref-del.sin locale.in.h localeconv.c \ localtime-buffer.c localtime-buffer.h lseek.c lstat.c malloc.c \ malloca.h malloca.valgrind math.in.h mbchar.h mbrtowc.c \ mbsinit.c mbtowc-impl.h mbtowc.c memcasecmp.h memchr.c \ memchr.valgrind memchr2.valgrind mempcpy.c memrchr.c mkdtemp.c \ mkstemp.c mktime-internal.h mktime.c mktime-internal.h \ mktime.c msvc-inval.c msvc-inval.h msvc-nothrow.c \ msvc-nothrow.h nl_langinfo.c open.c pathmax.h printf-frexp.h \ printf-frexp.c printf-frexpl.h printf.c raise.c rawmemchr.c \ rawmemchr.valgrind read.c read-file.h readlink.c realloc.c \ regcomp.c regex.c regex.h regex_internal.c regex_internal.h \ regexec.c progreloc.c relocatable.c relocatable.h \ $(top_srcdir)/build-aux/config.libpath \ $(top_srcdir)/build-aux/reloc-ldflags allocator.c allocator.h \ areadlink.c areadlink.h c-ctype.c c-ctype.h \ canonicalize-lgpl.c careadlinkat.c careadlinkat.h lstat.c \ malloca.c malloca.h progname.c progname.h progreloc.c \ readlink.c relocatable.c relocatable.h relocwrapper.c setenv.c \ stat.c $(top_srcdir)/build-aux/install-reloc rename.c rmdir.c \ round.c safe-read.h safe-read.c safe-write.h same-inode.h \ secure_getenv.c select.c setenv.c sig-handler.h sigaction.c \ signal.in.h float+.h signbitd.c signbitf.c signbitl.c \ sigprocmask.c _Noreturn.h arg-nonnull.h c++defs.h \ unused-parameter.h warn-on-use.h snprintf.c w32sock.h \ sprintf.c stat-w32.c stat-w32.h stat.c stdalign.in.h \ stdarg.in.h stdbool.in.h stddef.in.h stdint.in.h stdio.in.h \ stdlib.in.h stpcpy.c strcasecmp.c strncasecmp.c str-two-way.h \ strcasestr.c strdup.c streq.h strerror.c strerror-override.c \ strerror-override.h strftime.h string.in.h strings.in.h \ strncat.c strndup.c strnlen.c strsep.c strtod.c strtok_r.c \ sys_select.in.h sys_socket.in.h sys_stat.in.h sys_time.in.h \ sys_types.in.h sys_uio.in.h tempname.h termios.in.h \ $(top_srcdir)/build-aux/config.rpath time.in.h time_r.c \ time-internal.h time_rz.c mktime-internal.h timegm.c trunc.c \ tzset.c unicase.in.h unicase/cased.h unicase/caseprop.h \ unictype/bitmap.h unicase/caseprop.h unicase/ignorable.h \ unictype/bitmap.h unicase/special-casing-table.h \ unicase/special-casing-table.gperf unicase/special-casing.in.h \ unicase/casefold.h unicase/simple-mapping.h \ unicase/tocasefold.h unicase/simple-mapping.h \ unicase/tolower.h unicase/simple-mapping.h unicase/toupper.h \ unicase/u-casecmp.h unicase/u-casefold.h unicase/context.h \ unicase/u-casemap.h unicase/unicasemap.h \ unicase/u-ct-casefold.h unictype.in.h unictype/categ_of.h \ unictype/combiningclass.h unictype/bitmap.h \ unictype/ctype_print.h unictype/bitmap.h \ unictype/pr_soft_dotted.h unigbrk.in.h unigbrk/gbrkprop.h \ unilbrk.in.h unilbrk/lbrkprop1.h unilbrk/lbrkprop2.h \ unilbrk/lbrktables.h uniwidth/cjk.h uninorm.in.h \ uninorm/decompose-internal.h uninorm/decompose-internal.h \ uninorm/normalize-internal.h uninorm/decomposition-table.h \ uninorm/decomposition-table1.h uninorm/decomposition-table2.h \ uninorm/normalize-internal.h uninorm/normalize-internal.h \ uninorm/normalize-internal.h uninorm/u-normalize-internal.h \ unistd.in.h unistr.in.h unistr/u-cmp2.h unistr/u-cpy.h \ unitypes.in.h localcharset.h uniwidth.in.h uniwidth/cjk.h \ unlocked-io.h unsetenv.c asnprintf.c float+.h printf-args.c \ printf-args.h printf-parse.c printf-parse.h vasnprintf.c \ vasnprintf.h asprintf.c vasprintf.c verify.h vfprintf.c \ vprintf.c vsnprintf.c vsprintf.c wchar.in.h wcrtomb.c \ wctype.in.h wcwidth.c write.c xalloc.h xalloc-oversized.h \ xmalloca.h xmemdup0.c xmemdup0.h xreadlink.h xalloc.h BUILT_SOURCES = $(ALLOCA_H) $(BYTESWAP_H) configmake.h $(ERRNO_H) \ fcntl.h $(FLOAT_H) $(GETOPT_H) $(GETOPT_CDEFS_H) langinfo.h \ $(LIMITS_H) locale.h math.h signal.h $(STDALIGN_H) $(STDARG_H) \ $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h \ strings.h sys/select.h sys/socket.h sys/stat.h sys/time.h \ sys/types.h sys/uio.h termios.h time.h \ $(LIBUNISTRING_UNICASE_H) unicase/special-casing-table.h \ unicase/special-casing.h $(LIBUNISTRING_UNICTYPE_H) \ $(LIBUNISTRING_UNIGBRK_H) $(LIBUNISTRING_UNILBRK_H) \ $(LIBUNISTRING_UNINORM_H) unistd.h $(LIBUNISTRING_UNISTR_H) \ $(LIBUNISTRING_UNITYPES_H) $(LIBUNISTRING_UNIWIDTH_H) wchar.h \ wctype.h SUFFIXES = .sed .sin MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t byteswap.h \ byteswap.h-t errno.h errno.h-t fcntl.h fcntl.h-t float.h \ float.h-t getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t \ langinfo.h langinfo.h-t limits.h limits.h-t locale.h \ locale.h-t math.h math.h-t signal.h signal.h-t stdalign.h \ stdalign.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t \ stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \ stdlib.h stdlib.h-t string.h string.h-t strings.h strings.h-t \ sys/select.h sys/select.h-t sys/socket.h sys/socket.h-t \ sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t sys/types.h \ sys/types.h-t sys/uio.h sys/uio.h-t termios.h termios.h-t \ time.h time.h-t unicase.h unicase.h-t \ unicase/special-casing-table.h-t unicase/special-casing.h \ unicase/special-casing.h-t unictype.h unictype.h-t unigbrk.h \ unigbrk.h-t unilbrk.h unilbrk.h-t uninorm.h uninorm.h-t \ unistd.h unistd.h-t unistr.h unistr.h-t unitypes.h \ unitypes.h-t uniwidth.h uniwidth.h-t wchar.h wchar.h-t \ wctype.h wctype.h-t MOSTLYCLEANDIRS = sys sys sys sys CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ ref-del.sed DISTCLEANFILES = MAINTAINERCLEANFILES = unicase/special-casing-table.h AM_CPPFLAGS = AM_CFLAGS = libgl_la_SOURCES = allocator.c areadlink.c binary-io.h binary-io.c \ c-ctype.h c-ctype.c c-snprintf.c c-strcase.h c-strcasecmp.c \ c-strncasecmp.c c-strcasestr.h c-strcasestr.c c-strtod.c \ c-vasnprintf.c c-asprintf.c c-vasprintf.c c-xasprintf.c \ c-xvasprintf.c careadlinkat.c clean-temp.h clean-temp.c \ count-one-bits.c crc.c md4.c rijndael-alg-fst.c \ rijndael-api-fst.c dirname.c basename.c dirname-lgpl.c \ basename-lgpl.c stripslash.c dtoastr.c exitfail.c \ fatal-signal.h fatal-signal.c fd-hook.c full-read.h \ full-read.c full-write.h full-write.c fwriteerror.h \ fwriteerror.c getprogname.h getprogname.c gettext.h \ hard-locale.c imaxtostr.c inttostr.c offtostr.c uinttostr.c \ umaxtostr.c gl_linkedhash_list.h gl_linkedhash_list.c \ gl_anyhash_list1.h gl_anyhash_list2.h gl_anylinked_list1.h \ gl_anylinked_list2.h gl_list.h gl_list.c localcharset.h \ localcharset.c glthread/lock.h glthread/lock.c malloca.c \ math.c mbchar.c mbiter.h mbiter.c memcasecmp.c memchr2.h \ memchr2.c minmax.h pipe2.c printf-frexp.c printf-frexpl.c \ progname.h progname.c read-file.c safe-read.c safe-write.c \ sig-handler.c size_max.h sockets.h sockets.c strftime.c \ sys_socket.c tempname.c glthread/threadlib.c tmpdir.h tmpdir.c \ unicase/cased.c $(am__append_1) $(am__append_2) \ unicase/ignorable.c unicase/special-casing.c \ unicase/tocasefold.c $(am__append_3) $(am__append_4) \ $(am__append_5) $(am__append_6) unicase/u8-casemap.c \ $(am__append_7) $(am__append_8) $(am__append_9) \ $(am__append_10) $(am__append_11) $(am__append_12) \ $(am__append_13) $(am__append_14) $(am__append_15) \ $(am__append_16) unilbrk/lbrktables.c $(am__append_17) \ $(am__append_18) uninorm/compat-decomposition.c \ uninorm/decompose-internal.c $(am__append_19) $(am__append_20) \ uninorm/decomposition-table.c $(am__append_21) \ $(am__append_22) $(am__append_23) unistd.c $(am__append_24) \ $(am__append_25) $(am__append_26) $(am__append_27) \ $(am__append_28) $(am__append_29) $(am__append_30) \ $(am__append_31) $(am__append_32) $(am__append_33) \ $(am__append_34) $(am__append_35) $(am__append_36) \ $(am__append_37) $(am__append_38) version-etc.h version-etc.c \ version-etc-fsf.c wctype-h.c xmalloc.c xalloc-die.c gl_xlist.h \ gl_xlist.c xmalloca.c xreadlink.c xsize.h xsize.c xstrndup.h \ xstrndup.c xvasprintf.h xvasprintf.c xasprintf.c libgl_la_LIBADD = $(gl_LTLIBOBJS) @LTALLOCA@ libgl_la_DEPENDENCIES = $(gl_LTLIBOBJS) @LTALLOCA@ EXTRA_libgl_la_SOURCES = alloca.c btowc.c printf-args.c printf-parse.c \ vasnprintf.c canonicalize-lgpl.c close.c stripslash.c \ ftoastr.c dup2.c error.c fcntl.c float.c itold.c floor.c \ fprintf.c frexp.c frexp.c frexpl.c fseek.c fseeko.c fseterr.c \ fstat.c stat-w32.c ftell.c ftello.c full-write.c getdelim.c \ getdtablesize.c getline.c getopt.c getopt1.c getpass.c \ gettimeofday.c anytostr.c isfinite.c isinf.c isnan.c isnand.c \ isnan.c isnand.c isnan.c isnanf.c isnan.c isnanf.c isnan.c \ isnanl.c isnan.c isnanl.c iswblank.c localeconv.c \ localtime-buffer.c lseek.c lstat.c malloc.c mbrtowc.c \ mbsinit.c mbtowc.c memchr.c mempcpy.c memrchr.c mkdtemp.c \ mkstemp.c mktime.c mktime.c msvc-inval.c msvc-nothrow.c \ nl_langinfo.c open.c printf-frexp.c printf.c raise.c \ rawmemchr.c read.c readlink.c realloc.c regcomp.c regex.c \ regex_internal.c regexec.c progreloc.c relocatable.c rename.c \ rmdir.c round.c safe-read.c secure_getenv.c select.c setenv.c \ sigaction.c signbitd.c signbitf.c signbitl.c sigprocmask.c \ snprintf.c sprintf.c stat-w32.c stat.c stpcpy.c strcasecmp.c \ strncasecmp.c strcasestr.c strdup.c strerror.c \ strerror-override.c strncat.c strndup.c strnlen.c strsep.c \ strtod.c strtok_r.c time_r.c time_rz.c timegm.c trunc.c \ tzset.c unsetenv.c asnprintf.c printf-args.c printf-parse.c \ vasnprintf.c asprintf.c vasprintf.c vfprintf.c vprintf.c \ vsnprintf.c vsprintf.c wcrtomb.c wcwidth.c write.c xmemdup0.c libgl_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(FLOOR_LIBM) \ $(ISNAND_LIBM) $(ISNANF_LIBM) $(ISNANL_LIBM) $(LIBSOCKET) \ $(LIB_SELECT) $(LTLIBINTL) $(LTLIBTHREAD) $(ROUND_LIBM) \ $(TRUNC_LIBM) # Use this preprocessor expression to decide whether #include_next works. # Do not rely on a 'configure'-time test for this, since the expression # might appear in an installed header, which is used by some other compiler. HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) GPERF = gperf V_GPERF = $(V_GPERF_@AM_V@) V_GPERF_ = $(V_GPERF_@AM_DEFAULT_V@) V_GPERF_0 = @echo " GPERF " $@; charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. _NORETURN_H = $(srcdir)/_Noreturn.h # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. ARG_NONNULL_H = $(srcdir)/arg-nonnull.h # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. CXXDEFS_H = $(srcdir)/c++defs.h # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. UNUSED_PARAMETER_H = $(srcdir)/unused-parameter.h # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. WARN_ON_USE_H = $(srcdir)/warn-on-use.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .sed .sin .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits gl/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } glthread/$(am__dirstamp): @$(MKDIR_P) glthread @: > glthread/$(am__dirstamp) glthread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) glthread/$(DEPDIR) @: > glthread/$(DEPDIR)/$(am__dirstamp) glthread/lock.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) glthread/threadlib.lo: glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) unicase/$(am__dirstamp): @$(MKDIR_P) unicase @: > unicase/$(am__dirstamp) unicase/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) unicase/$(DEPDIR) @: > unicase/$(DEPDIR)/$(am__dirstamp) unicase/cased.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/empty-prefix-context.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/empty-suffix-context.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/ignorable.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/special-casing.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/tocasefold.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/tolower.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/toupper.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/u8-casecmp.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/u8-casefold.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/u8-casemap.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/u8-ct-casefold.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/u8-tolower.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unicase/u8-toupper.lo: unicase/$(am__dirstamp) \ unicase/$(DEPDIR)/$(am__dirstamp) unictype/$(am__dirstamp): @$(MKDIR_P) unictype @: > unictype/$(am__dirstamp) unictype/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) unictype/$(DEPDIR) @: > unictype/$(DEPDIR)/$(am__dirstamp) unictype/categ_none.lo: unictype/$(am__dirstamp) \ unictype/$(DEPDIR)/$(am__dirstamp) unictype/categ_of.lo: unictype/$(am__dirstamp) \ unictype/$(DEPDIR)/$(am__dirstamp) unictype/combiningclass.lo: unictype/$(am__dirstamp) \ unictype/$(DEPDIR)/$(am__dirstamp) unictype/ctype_print.lo: unictype/$(am__dirstamp) \ unictype/$(DEPDIR)/$(am__dirstamp) unictype/pr_soft_dotted.lo: unictype/$(am__dirstamp) \ unictype/$(DEPDIR)/$(am__dirstamp) unigbrk/$(am__dirstamp): @$(MKDIR_P) unigbrk @: > unigbrk/$(am__dirstamp) unigbrk/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) unigbrk/$(DEPDIR) @: > unigbrk/$(DEPDIR)/$(am__dirstamp) unigbrk/uc-gbrk-prop.lo: unigbrk/$(am__dirstamp) \ unigbrk/$(DEPDIR)/$(am__dirstamp) unigbrk/uc-is-grapheme-break.lo: unigbrk/$(am__dirstamp) \ unigbrk/$(DEPDIR)/$(am__dirstamp) unilbrk/$(am__dirstamp): @$(MKDIR_P) unilbrk @: > unilbrk/$(am__dirstamp) unilbrk/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) unilbrk/$(DEPDIR) @: > unilbrk/$(DEPDIR)/$(am__dirstamp) unilbrk/lbrktables.lo: unilbrk/$(am__dirstamp) \ unilbrk/$(DEPDIR)/$(am__dirstamp) unilbrk/u8-possible-linebreaks.lo: unilbrk/$(am__dirstamp) \ unilbrk/$(DEPDIR)/$(am__dirstamp) uninorm/$(am__dirstamp): @$(MKDIR_P) uninorm @: > uninorm/$(am__dirstamp) uninorm/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) uninorm/$(DEPDIR) @: > uninorm/$(DEPDIR)/$(am__dirstamp) uninorm/canonical-decomposition.lo: uninorm/$(am__dirstamp) \ uninorm/$(DEPDIR)/$(am__dirstamp) uninorm/compat-decomposition.lo: uninorm/$(am__dirstamp) \ uninorm/$(DEPDIR)/$(am__dirstamp) uninorm/decompose-internal.lo: uninorm/$(am__dirstamp) \ uninorm/$(DEPDIR)/$(am__dirstamp) uninorm/decomposing-form.lo: uninorm/$(am__dirstamp) \ uninorm/$(DEPDIR)/$(am__dirstamp) uninorm/decomposition.lo: uninorm/$(am__dirstamp) \ uninorm/$(DEPDIR)/$(am__dirstamp) uninorm/decomposition-table.lo: uninorm/$(am__dirstamp) \ uninorm/$(DEPDIR)/$(am__dirstamp) uninorm/nfd.lo: uninorm/$(am__dirstamp) \ uninorm/$(DEPDIR)/$(am__dirstamp) uninorm/nfkd.lo: uninorm/$(am__dirstamp) \ uninorm/$(DEPDIR)/$(am__dirstamp) uninorm/u8-normalize.lo: uninorm/$(am__dirstamp) \ uninorm/$(DEPDIR)/$(am__dirstamp) unistr/$(am__dirstamp): @$(MKDIR_P) unistr @: > unistr/$(am__dirstamp) unistr/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) unistr/$(DEPDIR) @: > unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-check.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-cmp.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-cmp2.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-cpy.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-mblen.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-mbtouc.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-mbtouc-aux.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-mbtouc-unsafe.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-mbtouc-unsafe-aux.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-mbtoucr.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-strlen.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-strmbtouc.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-strncat.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-uctomb.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) unistr/u8-uctomb-aux.lo: unistr/$(am__dirstamp) \ unistr/$(DEPDIR)/$(am__dirstamp) uniwidth/$(am__dirstamp): @$(MKDIR_P) uniwidth @: > uniwidth/$(am__dirstamp) uniwidth/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) uniwidth/$(DEPDIR) @: > uniwidth/$(DEPDIR)/$(am__dirstamp) uniwidth/u8-strwidth.lo: uniwidth/$(am__dirstamp) \ uniwidth/$(DEPDIR)/$(am__dirstamp) uniwidth/u8-width.lo: uniwidth/$(am__dirstamp) \ uniwidth/$(DEPDIR)/$(am__dirstamp) uniwidth/width.lo: uniwidth/$(am__dirstamp) \ uniwidth/$(DEPDIR)/$(am__dirstamp) libgl.la: $(libgl_la_OBJECTS) $(libgl_la_DEPENDENCIES) $(EXTRA_libgl_la_DEPENDENCIES) $(AM_V_CCLD)$(libgl_la_LINK) $(libgl_la_OBJECTS) $(libgl_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f glthread/*.$(OBJEXT) -rm -f glthread/*.lo -rm -f unicase/*.$(OBJEXT) -rm -f unicase/*.lo -rm -f unictype/*.$(OBJEXT) -rm -f unictype/*.lo -rm -f unigbrk/*.$(OBJEXT) -rm -f unigbrk/*.lo -rm -f unilbrk/*.$(OBJEXT) -rm -f unilbrk/*.lo -rm -f uninorm/*.$(OBJEXT) -rm -f uninorm/*.lo -rm -f unistr/*.$(OBJEXT) -rm -f unistr/*.lo -rm -f uniwidth/*.$(OBJEXT) -rm -f uniwidth/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anytostr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlink.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary-io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-asprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-snprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasestr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strtod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-vasnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-vasprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-xasprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-xvasprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize-lgpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/careadlinkat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clean-temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count-one-bits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fatal-signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseek.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseterr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftello.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fwriteerror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpass.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprogname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_linkedhash_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_xlist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imaxtostr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inttostr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isfinite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isinf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iswblank.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbchar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbiter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcasecmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdtemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/offtostr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-frexp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-frexpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progreloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read-file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relocatable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rijndael-alg-fst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rijndael-api-fst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secure_getenv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig-handler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-w32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpcpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtok_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_rz.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timegm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmpdir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tzset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uinttostr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umaxtostr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc-fsf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcwidth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xasprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloca.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmemdup0.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xreadlink.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvasprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/cased.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/empty-prefix-context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/empty-suffix-context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/ignorable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/special-casing.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/tocasefold.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/tolower.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/toupper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/u8-casecmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/u8-casefold.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/u8-casemap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/u8-ct-casefold.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/u8-tolower.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unicase/$(DEPDIR)/u8-toupper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unictype/$(DEPDIR)/categ_none.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unictype/$(DEPDIR)/categ_of.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unictype/$(DEPDIR)/combiningclass.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unictype/$(DEPDIR)/ctype_print.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unictype/$(DEPDIR)/pr_soft_dotted.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unigbrk/$(DEPDIR)/uc-gbrk-prop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unigbrk/$(DEPDIR)/uc-is-grapheme-break.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unilbrk/$(DEPDIR)/lbrktables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unilbrk/$(DEPDIR)/u8-possible-linebreaks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uninorm/$(DEPDIR)/canonical-decomposition.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uninorm/$(DEPDIR)/compat-decomposition.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uninorm/$(DEPDIR)/decompose-internal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uninorm/$(DEPDIR)/decomposing-form.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uninorm/$(DEPDIR)/decomposition-table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uninorm/$(DEPDIR)/decomposition.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uninorm/$(DEPDIR)/nfd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uninorm/$(DEPDIR)/nfkd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uninorm/$(DEPDIR)/u8-normalize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-cmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-cmp2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-cpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-mblen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-mbtouc-aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-mbtouc-unsafe-aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-mbtouc-unsafe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-mbtouc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-mbtoucr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-strlen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-strmbtouc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-strncat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-uctomb-aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-uctomb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/u8-strwidth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/u8-width.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/width.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf glthread/.libs glthread/_libs -rm -rf unicase/.libs unicase/_libs -rm -rf unictype/.libs unictype/_libs -rm -rf unigbrk/.libs unigbrk/_libs -rm -rf unilbrk/.libs unilbrk/_libs -rm -rf uninorm/.libs uninorm/_libs -rm -rf unistr/.libs unistr/_libs -rm -rf uniwidth/.libs uniwidth/_libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f glthread/$(DEPDIR)/$(am__dirstamp) -rm -f glthread/$(am__dirstamp) -rm -f unicase/$(DEPDIR)/$(am__dirstamp) -rm -f unicase/$(am__dirstamp) -rm -f unictype/$(DEPDIR)/$(am__dirstamp) -rm -f unictype/$(am__dirstamp) -rm -f unigbrk/$(DEPDIR)/$(am__dirstamp) -rm -f unigbrk/$(am__dirstamp) -rm -f unilbrk/$(DEPDIR)/$(am__dirstamp) -rm -f unilbrk/$(am__dirstamp) -rm -f uninorm/$(DEPDIR)/$(am__dirstamp) -rm -f uninorm/$(am__dirstamp) -rm -f unistr/$(DEPDIR)/$(am__dirstamp) -rm -f unistr/$(am__dirstamp) -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp) -rm -f uniwidth/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) @RELOCATABLE_VIA_WRAPPER_FALSE@uninstall-hook: clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf $(DEPDIR) ./$(DEPDIR) glthread/$(DEPDIR) unicase/$(DEPDIR) unictype/$(DEPDIR) unigbrk/$(DEPDIR) unilbrk/$(DEPDIR) uninorm/$(DEPDIR) unistr/$(DEPDIR) uniwidth/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-exec-local install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf $(DEPDIR) ./$(DEPDIR) glthread/$(DEPDIR) unicase/$(DEPDIR) unictype/$(DEPDIR) unigbrk/$(DEPDIR) unilbrk/$(DEPDIR) uninorm/$(DEPDIR) unistr/$(DEPDIR) uniwidth/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-local @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(am__recursive_targets) all check install install-am \ install-strip uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstLTLIBRARIES cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-local install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \ tags-am uninstall uninstall-am uninstall-hook uninstall-local .PRECIOUS: Makefile # We need the following in order to create when the system # doesn't have one that works with the given compiler. @GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in.h $(top_builddir)/config.status @GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_ALLOCA_H_TRUE@ cat $(srcdir)/alloca.in.h; \ @GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t && \ @GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@ @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one. @GL_GENERATE_BYTESWAP_H_TRUE@byteswap.h: byteswap.in.h $(top_builddir)/config.status @GL_GENERATE_BYTESWAP_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_BYTESWAP_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_BYTESWAP_H_TRUE@ cat $(srcdir)/byteswap.in.h; \ @GL_GENERATE_BYTESWAP_H_TRUE@ } > $@-t && \ @GL_GENERATE_BYTESWAP_H_TRUE@ mv -f $@-t $@ @GL_GENERATE_BYTESWAP_H_FALSE@byteswap.h: $(top_builddir)/config.status @GL_GENERATE_BYTESWAP_H_FALSE@ rm -f $@ # Listed in the same order as the GNU makefile conventions, and # provided by autoconf 2.59c+ or 2.70. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile $(AM_V_GEN)rm -f $@-t && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ echo '#define SBINDIR "$(sbindir)"'; \ echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ echo '#define RUNSTATEDIR "$(runstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ echo '#define INFODIR "$(infodir)"'; \ echo '#define HTMLDIR "$(htmldir)"'; \ echo '#define DVIDIR "$(dvidir)"'; \ echo '#define PDFDIR "$(pdfdir)"'; \ echo '#define PSDIR "$(psdir)"'; \ echo '#define LIBDIR "$(libdir)"'; \ echo '#define LISPDIR "$(lispdir)"'; \ echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ echo '#define PKGDATADIR "$(pkgdatadir)"'; \ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t && \ mv -f $@-t $@ # We need the following in order to create when the system # doesn't have one that is POSIX compliant. @GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status @GL_GENERATE_ERRNO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_ERRNO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_ERRNO_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ @GL_GENERATE_ERRNO_H_TRUE@ < $(srcdir)/errno.in.h; \ @GL_GENERATE_ERRNO_H_TRUE@ } > $@-t && \ @GL_GENERATE_ERRNO_H_TRUE@ mv $@-t $@ @GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status @GL_GENERATE_ERRNO_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/fcntl.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. @GL_GENERATE_FLOAT_H_TRUE@float.h: float.in.h $(top_builddir)/config.status @GL_GENERATE_FLOAT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_FLOAT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_FLOAT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ @GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ @GL_GENERATE_FLOAT_H_TRUE@ < $(srcdir)/float.in.h; \ @GL_GENERATE_FLOAT_H_TRUE@ } > $@-t && \ @GL_GENERATE_FLOAT_H_TRUE@ mv $@-t $@ @GL_GENERATE_FLOAT_H_FALSE@float.h: $(top_builddir)/config.status @GL_GENERATE_FLOAT_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ < $(srcdir)/getopt-cdefs.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create an empty placeholder for # when the system doesn't have one. langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/langinfo.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that is compatible with GNU. @GL_GENERATE_LIMITS_H_TRUE@limits.h: limits.in.h $(top_builddir)/config.status @GL_GENERATE_LIMITS_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_LIMITS_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_LIMITS_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \ @GL_GENERATE_LIMITS_H_TRUE@ < $(srcdir)/limits.in.h; \ @GL_GENERATE_LIMITS_H_TRUE@ } > $@-t && \ @GL_GENERATE_LIMITS_H_TRUE@ mv $@-t $@ @GL_GENERATE_LIMITS_H_FALSE@limits.h: $(top_builddir)/config.status @GL_GENERATE_LIMITS_H_FALSE@ rm -f $@ # We need the following in order to install a simple file in $(libdir) # which is shared with other installed packages. We use a list of referencing # packages so that "make uninstall" will remove the file if and only if it # is not used by another installed package. # On systems with glibc-2.1 or newer, the file is redundant, therefore we # avoid installing it. all-local: charset.alias ref-add.sed ref-del.sed install-exec-local: install-exec-localcharset install-exec-localcharset: all-local if test $(GLIBC21) = no; then \ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ darwin* | cygwin* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ esac ; \ else \ need_charset_alias=false ; \ fi ; \ if $$need_charset_alias; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ fi ; \ if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ else \ if $$need_charset_alias; then \ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ fi ; \ fi uninstall-local: uninstall-localcharset uninstall-localcharset: all-local if test -f $(charset_alias); then \ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ if grep '^# Packages using this file: $$' $(charset_tmp) \ > /dev/null; then \ rm -f $(charset_alias); \ else \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ fi; \ rm -f $(charset_tmp); \ fi charset.alias: config.charset $(AM_V_GEN)rm -f t-$@ $@ && \ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ mv t-$@ $@ .sin.sed: $(AM_V_GEN)rm -f t-$@ $@ && \ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ mv t-$@ $@ # We need the following in order to create when the system # doesn't have one that provides all definitions. locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \ -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/locale.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ -e 's/@''GNULIB_ACOSF''@/$(GNULIB_ACOSF)/g' \ -e 's/@''GNULIB_ACOSL''@/$(GNULIB_ACOSL)/g' \ -e 's/@''GNULIB_ASINF''@/$(GNULIB_ASINF)/g' \ -e 's/@''GNULIB_ASINL''@/$(GNULIB_ASINL)/g' \ -e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \ -e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \ -e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \ -e 's/@''GNULIB_CBRT''@/$(GNULIB_CBRT)/g' \ -e 's/@''GNULIB_CBRTF''@/$(GNULIB_CBRTF)/g' \ -e 's/@''GNULIB_CBRTL''@/$(GNULIB_CBRTL)/g' \ -e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \ -e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \ -e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \ -e 's/@''GNULIB_COPYSIGN''@/$(GNULIB_COPYSIGN)/g' \ -e 's/@''GNULIB_COPYSIGNF''@/$(GNULIB_COPYSIGNF)/g' \ -e 's/@''GNULIB_COPYSIGNL''@/$(GNULIB_COPYSIGNL)/g' \ -e 's/@''GNULIB_COSF''@/$(GNULIB_COSF)/g' \ -e 's/@''GNULIB_COSL''@/$(GNULIB_COSL)/g' \ -e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \ -e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \ -e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \ -e 's/@''GNULIB_EXP2''@/$(GNULIB_EXP2)/g' \ -e 's/@''GNULIB_EXP2F''@/$(GNULIB_EXP2F)/g' \ -e 's/@''GNULIB_EXP2L''@/$(GNULIB_EXP2L)/g' \ -e 's/@''GNULIB_EXPM1''@/$(GNULIB_EXPM1)/g' \ -e 's/@''GNULIB_EXPM1F''@/$(GNULIB_EXPM1F)/g' \ -e 's/@''GNULIB_EXPM1L''@/$(GNULIB_EXPM1L)/g' \ -e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \ -e 's/@''GNULIB_FABSL''@/$(GNULIB_FABSL)/g' \ -e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \ -e 's/@''GNULIB_FLOORF''@/$(GNULIB_FLOORF)/g' \ -e 's/@''GNULIB_FLOORL''@/$(GNULIB_FLOORL)/g' \ -e 's/@''GNULIB_FMA''@/$(GNULIB_FMA)/g' \ -e 's/@''GNULIB_FMAF''@/$(GNULIB_FMAF)/g' \ -e 's/@''GNULIB_FMAL''@/$(GNULIB_FMAL)/g' \ -e 's/@''GNULIB_FMOD''@/$(GNULIB_FMOD)/g' \ -e 's/@''GNULIB_FMODF''@/$(GNULIB_FMODF)/g' \ -e 's/@''GNULIB_FMODL''@/$(GNULIB_FMODL)/g' \ -e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \ -e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \ -e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \ -e 's/@''GNULIB_HYPOT''@/$(GNULIB_HYPOT)/g' \ -e 's/@''GNULIB_HYPOTF''@/$(GNULIB_HYPOTF)/g' \ -e 's/@''GNULIB_HYPOTL''@/$(GNULIB_HYPOTL)/g' \ < $(srcdir)/math.in.h | \ sed -e 's/@''GNULIB_ILOGB''@/$(GNULIB_ILOGB)/g' \ -e 's/@''GNULIB_ILOGBF''@/$(GNULIB_ILOGBF)/g' \ -e 's/@''GNULIB_ILOGBL''@/$(GNULIB_ILOGBL)/g' \ -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \ -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \ -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \ -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \ -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \ -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \ -e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \ -e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \ -e 's/@''GNULIB_LOG''@/$(GNULIB_LOG)/g' \ -e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \ -e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \ -e 's/@''GNULIB_LOG10''@/$(GNULIB_LOG10)/g' \ -e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \ -e 's/@''GNULIB_LOG10L''@/$(GNULIB_LOG10L)/g' \ -e 's/@''GNULIB_LOG1P''@/$(GNULIB_LOG1P)/g' \ -e 's/@''GNULIB_LOG1PF''@/$(GNULIB_LOG1PF)/g' \ -e 's/@''GNULIB_LOG1PL''@/$(GNULIB_LOG1PL)/g' \ -e 's/@''GNULIB_LOG2''@/$(GNULIB_LOG2)/g' \ -e 's/@''GNULIB_LOG2F''@/$(GNULIB_LOG2F)/g' \ -e 's/@''GNULIB_LOG2L''@/$(GNULIB_LOG2L)/g' \ -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \ -e 's/@''GNULIB_LOGBF''@/$(GNULIB_LOGBF)/g' \ -e 's/@''GNULIB_LOGBL''@/$(GNULIB_LOGBL)/g' \ -e 's/@''GNULIB_MODF''@/$(GNULIB_MODF)/g' \ -e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \ -e 's/@''GNULIB_MODFL''@/$(GNULIB_MODFL)/g' \ -e 's/@''GNULIB_POWF''@/$(GNULIB_POWF)/g' \ -e 's/@''GNULIB_REMAINDER''@/$(GNULIB_REMAINDER)/g' \ -e 's/@''GNULIB_REMAINDERF''@/$(GNULIB_REMAINDERF)/g' \ -e 's/@''GNULIB_REMAINDERL''@/$(GNULIB_REMAINDERL)/g' \ -e 's/@''GNULIB_RINT''@/$(GNULIB_RINT)/g' \ -e 's/@''GNULIB_RINTF''@/$(GNULIB_RINTF)/g' \ -e 's/@''GNULIB_RINTL''@/$(GNULIB_RINTL)/g' \ -e 's/@''GNULIB_ROUND''@/$(GNULIB_ROUND)/g' \ -e 's/@''GNULIB_ROUNDF''@/$(GNULIB_ROUNDF)/g' \ -e 's/@''GNULIB_ROUNDL''@/$(GNULIB_ROUNDL)/g' \ -e 's/@''GNULIB_SIGNBIT''@/$(GNULIB_SIGNBIT)/g' \ -e 's/@''GNULIB_SINF''@/$(GNULIB_SINF)/g' \ -e 's/@''GNULIB_SINL''@/$(GNULIB_SINL)/g' \ -e 's/@''GNULIB_SINHF''@/$(GNULIB_SINHF)/g' \ -e 's/@''GNULIB_SQRTF''@/$(GNULIB_SQRTF)/g' \ -e 's/@''GNULIB_SQRTL''@/$(GNULIB_SQRTL)/g' \ -e 's/@''GNULIB_TANF''@/$(GNULIB_TANF)/g' \ -e 's/@''GNULIB_TANL''@/$(GNULIB_TANL)/g' \ -e 's/@''GNULIB_TANHF''@/$(GNULIB_TANHF)/g' \ -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \ -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \ -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \ | \ sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \ -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ -e 's|@''HAVE_ASINF''@|$(HAVE_ASINF)|g' \ -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \ -e 's|@''HAVE_ATANF''@|$(HAVE_ATANF)|g' \ -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \ -e 's|@''HAVE_ATAN2F''@|$(HAVE_ATAN2F)|g' \ -e 's|@''HAVE_CBRT''@|$(HAVE_CBRT)|g' \ -e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \ -e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \ -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \ -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \ -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \ -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \ -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \ -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ -e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \ -e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \ -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \ -e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \ -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \ -e 's|@''HAVE_FMAF''@|$(HAVE_FMAF)|g' \ -e 's|@''HAVE_FMAL''@|$(HAVE_FMAL)|g' \ -e 's|@''HAVE_FMODF''@|$(HAVE_FMODF)|g' \ -e 's|@''HAVE_FMODL''@|$(HAVE_FMODL)|g' \ -e 's|@''HAVE_FREXPF''@|$(HAVE_FREXPF)|g' \ -e 's|@''HAVE_HYPOTF''@|$(HAVE_HYPOTF)|g' \ -e 's|@''HAVE_HYPOTL''@|$(HAVE_HYPOTL)|g' \ -e 's|@''HAVE_ILOGB''@|$(HAVE_ILOGB)|g' \ -e 's|@''HAVE_ILOGBF''@|$(HAVE_ILOGBF)|g' \ -e 's|@''HAVE_ILOGBL''@|$(HAVE_ILOGBL)|g' \ -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \ -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \ -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \ -e 's|@''HAVE_LDEXPF''@|$(HAVE_LDEXPF)|g' \ -e 's|@''HAVE_LOGF''@|$(HAVE_LOGF)|g' \ -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \ -e 's|@''HAVE_LOG10F''@|$(HAVE_LOG10F)|g' \ -e 's|@''HAVE_LOG10L''@|$(HAVE_LOG10L)|g' \ -e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \ -e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \ -e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \ -e 's|@''HAVE_LOGBF''@|$(HAVE_LOGBF)|g' \ -e 's|@''HAVE_LOGBL''@|$(HAVE_LOGBL)|g' \ -e 's|@''HAVE_MODFF''@|$(HAVE_MODFF)|g' \ -e 's|@''HAVE_MODFL''@|$(HAVE_MODFL)|g' \ -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \ -e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \ -e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \ -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \ -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \ -e 's|@''HAVE_SINF''@|$(HAVE_SINF)|g' \ -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \ -e 's|@''HAVE_SINHF''@|$(HAVE_SINHF)|g' \ -e 's|@''HAVE_SQRTF''@|$(HAVE_SQRTF)|g' \ -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \ -e 's|@''HAVE_TANF''@|$(HAVE_TANF)|g' \ -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \ -e 's|@''HAVE_TANHF''@|$(HAVE_TANHF)|g' \ -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ -e 's|@''HAVE_DECL_CBRTF''@|$(HAVE_DECL_CBRTF)|g' \ -e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \ -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \ -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \ -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \ -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ -e 's|@''HAVE_DECL_EXP2''@|$(HAVE_DECL_EXP2)|g' \ -e 's|@''HAVE_DECL_EXP2F''@|$(HAVE_DECL_EXP2F)|g' \ -e 's|@''HAVE_DECL_EXP2L''@|$(HAVE_DECL_EXP2L)|g' \ -e 's|@''HAVE_DECL_EXPM1L''@|$(HAVE_DECL_EXPM1L)|g' \ -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \ -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \ -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ -e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \ -e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \ -e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \ -e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \ -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \ -e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \ -e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \ -e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \ -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \ -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \ -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \ -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \ -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \ | \ sed -e 's|@''REPLACE_ACOSF''@|$(REPLACE_ACOSF)|g' \ -e 's|@''REPLACE_ASINF''@|$(REPLACE_ASINF)|g' \ -e 's|@''REPLACE_ATANF''@|$(REPLACE_ATANF)|g' \ -e 's|@''REPLACE_ATAN2F''@|$(REPLACE_ATAN2F)|g' \ -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \ -e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \ -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \ -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ -e 's|@''REPLACE_COSF''@|$(REPLACE_COSF)|g' \ -e 's|@''REPLACE_COSHF''@|$(REPLACE_COSHF)|g' \ -e 's|@''REPLACE_EXPF''@|$(REPLACE_EXPF)|g' \ -e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \ -e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \ -e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \ -e 's|@''REPLACE_EXP2L''@|$(REPLACE_EXP2L)|g' \ -e 's|@''REPLACE_FABSL''@|$(REPLACE_FABSL)|g' \ -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \ -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \ -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \ -e 's|@''REPLACE_FMA''@|$(REPLACE_FMA)|g' \ -e 's|@''REPLACE_FMAF''@|$(REPLACE_FMAF)|g' \ -e 's|@''REPLACE_FMAL''@|$(REPLACE_FMAL)|g' \ -e 's|@''REPLACE_FMOD''@|$(REPLACE_FMOD)|g' \ -e 's|@''REPLACE_FMODF''@|$(REPLACE_FMODF)|g' \ -e 's|@''REPLACE_FMODL''@|$(REPLACE_FMODL)|g' \ -e 's|@''REPLACE_FREXPF''@|$(REPLACE_FREXPF)|g' \ -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \ -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \ -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \ -e 's|@''REPLACE_HYPOT''@|$(REPLACE_HYPOT)|g' \ -e 's|@''REPLACE_HYPOTF''@|$(REPLACE_HYPOTF)|g' \ -e 's|@''REPLACE_HYPOTL''@|$(REPLACE_HYPOTL)|g' \ -e 's|@''REPLACE_ILOGB''@|$(REPLACE_ILOGB)|g' \ -e 's|@''REPLACE_ILOGBF''@|$(REPLACE_ILOGBF)|g' \ -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \ -e 's|@''REPLACE_LOG''@|$(REPLACE_LOG)|g' \ -e 's|@''REPLACE_LOGF''@|$(REPLACE_LOGF)|g' \ -e 's|@''REPLACE_LOGL''@|$(REPLACE_LOGL)|g' \ -e 's|@''REPLACE_LOG10''@|$(REPLACE_LOG10)|g' \ -e 's|@''REPLACE_LOG10F''@|$(REPLACE_LOG10F)|g' \ -e 's|@''REPLACE_LOG10L''@|$(REPLACE_LOG10L)|g' \ -e 's|@''REPLACE_LOG1P''@|$(REPLACE_LOG1P)|g' \ -e 's|@''REPLACE_LOG1PF''@|$(REPLACE_LOG1PF)|g' \ -e 's|@''REPLACE_LOG1PL''@|$(REPLACE_LOG1PL)|g' \ -e 's|@''REPLACE_LOG2''@|$(REPLACE_LOG2)|g' \ -e 's|@''REPLACE_LOG2F''@|$(REPLACE_LOG2F)|g' \ -e 's|@''REPLACE_LOG2L''@|$(REPLACE_LOG2L)|g' \ -e 's|@''REPLACE_LOGB''@|$(REPLACE_LOGB)|g' \ -e 's|@''REPLACE_LOGBF''@|$(REPLACE_LOGBF)|g' \ -e 's|@''REPLACE_LOGBL''@|$(REPLACE_LOGBL)|g' \ -e 's|@''REPLACE_MODF''@|$(REPLACE_MODF)|g' \ -e 's|@''REPLACE_MODFF''@|$(REPLACE_MODFF)|g' \ -e 's|@''REPLACE_MODFL''@|$(REPLACE_MODFL)|g' \ -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \ -e 's|@''REPLACE_REMAINDER''@|$(REPLACE_REMAINDER)|g' \ -e 's|@''REPLACE_REMAINDERF''@|$(REPLACE_REMAINDERF)|g' \ -e 's|@''REPLACE_REMAINDERL''@|$(REPLACE_REMAINDERL)|g' \ -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \ -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \ -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ -e 's|@''REPLACE_SINF''@|$(REPLACE_SINF)|g' \ -e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \ -e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \ -e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \ -e 's|@''REPLACE_TANF''@|$(REPLACE_TANF)|g' \ -e 's|@''REPLACE_TANHF''@|$(REPLACE_TANHF)|g' \ -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \ -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \ -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ @RELOCATABLE_VIA_WRAPPER_TRUE@uninstall-hook: uninstall-relocwrapper @RELOCATABLE_VIA_WRAPPER_TRUE@uninstall-relocwrapper: @RELOCATABLE_VIA_WRAPPER_TRUE@ if test $(RELOCATABLE) = yes; then \ @RELOCATABLE_VIA_WRAPPER_TRUE@ case '$(EXEEXT)' in \ @RELOCATABLE_VIA_WRAPPER_TRUE@ .bin*) ;; \ @RELOCATABLE_VIA_WRAPPER_TRUE@ *) cd $(top_builddir) && \ @RELOCATABLE_VIA_WRAPPER_TRUE@ $(MAKE) $(AM_MAKEFLAGS) EXEEXT=.bin$(EXEEXT) \ @RELOCATABLE_VIA_WRAPPER_TRUE@ AM_MAKEFLAGS='$(AM_MAKEFLAGS) EXEEXT=.bin$(EXEEXT)' \ @RELOCATABLE_VIA_WRAPPER_TRUE@ uninstall ;; \ @RELOCATABLE_VIA_WRAPPER_TRUE@ esac; \ @RELOCATABLE_VIA_WRAPPER_TRUE@ fi @RELOCATABLE_VIA_WRAPPER_TRUE@.PHONY: uninstall-relocwrapper # We need the following in order to create when the system # doesn't have a complete one. signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \ -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \ -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \ -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \ -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \ -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/signal.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works. @GL_GENERATE_STDALIGN_H_TRUE@stdalign.h: stdalign.in.h $(top_builddir)/config.status @GL_GENERATE_STDALIGN_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDALIGN_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_STDALIGN_H_TRUE@ cat $(srcdir)/stdalign.in.h; \ @GL_GENERATE_STDALIGN_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDALIGN_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDALIGN_H_FALSE@stdalign.h: $(top_builddir)/config.status @GL_GENERATE_STDALIGN_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. @GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status @GL_GENERATE_STDARG_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDARG_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_STDARG_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_STDARG_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_STDARG_H_TRUE@ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ @GL_GENERATE_STDARG_H_TRUE@ < $(srcdir)/stdarg.in.h; \ @GL_GENERATE_STDARG_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDARG_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDARG_H_FALSE@stdarg.h: $(top_builddir)/config.status @GL_GENERATE_STDARG_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works. @GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status @GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDBOOL_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_STDBOOL_H_TRUE@ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ @GL_GENERATE_STDBOOL_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDBOOL_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status @GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. @GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status @GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \ @GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status @GL_GENERATE_STDDEF_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. @GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status @GL_GENERATE_STDINT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDINT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_STDINT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ < $(srcdir)/stdint.in.h; \ @GL_GENERATE_STDINT_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDINT_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDINT_H_FALSE@stdint.h: $(top_builddir)/config.status @GL_GENERATE_STDINT_H_FALSE@ rm -f $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \ -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \ -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ -e 's|@''GNULIB_FFS''@|$(GNULIB_FFS)|g' \ -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/strings.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \ -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \ -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \ -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_select.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \ -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \ -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \ -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \ -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \ -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \ -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \ -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \ -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \ -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \ -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \ -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \ -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \ -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \ -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \ -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_socket.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_time.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/types.h: sys_types.in.h $(top_builddir)/config.status $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ < $(srcdir)/sys_types.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/uio.h: sys_uio.in.h $(top_builddir)/config.status $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \ -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \ < $(srcdir)/sys_uio.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create when the system # version does not have all declarations. termios.h: termios.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TERMIOS_H''@|$(NEXT_TERMIOS_H)|g' \ -e 's/@''GNULIB_TCGETSID''@/$(GNULIB_TCGETSID)/g' \ -e 's|@''HAVE_DECL_TCGETSID''@|$(HAVE_DECL_TCGETSID)|g' \ -e 's|@''HAVE_TERMIOS_H''@|$(HAVE_TERMIOS_H)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/termios.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \ -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \ -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \ -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ -e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \ -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \ -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ unicase.h: unicase.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unicase.in.h; \ } > $@-t && \ mv -f $@-t $@ unicase/special-casing-table.h: $(srcdir)/unicase/special-casing-table.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unicase/special-casing-table.gperf > $(srcdir)/unicase/special-casing-table.h-t && \ mv $(srcdir)/unicase/special-casing-table.h-t $(srcdir)/unicase/special-casing-table.h # Generate special-casing.h with a declaration that depends on the gperf version. unicase/special-casing.h: unicase/special-casing.in.h unicase/special-casing-table.h $(AM_V_GEN)rm -f $@-t $@ && \ declaration=`grep '^gl_unicase_special_lookup' $(srcdir)/unicase/special-casing-table.h | sed -e 's/register //g'` && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e "/gl_unicase_special_lookup/s/gl_unicase_special_lookup.*/$${declaration};/" $(srcdir)/unicase/special-casing.in.h; \ } > $@-t && \ mv -f $@-t $@ unictype.h: unictype.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unictype.in.h; \ } > $@-t && \ mv -f $@-t $@ unigbrk.h: unigbrk.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unigbrk.in.h; \ } > $@-t && \ mv -f $@-t $@ unilbrk.h: unilbrk.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unilbrk.in.h; \ } > $@-t && \ mv -f $@-t $@ uninorm.h: uninorm.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/uninorm.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ unistr.h: unistr.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unistr.in.h; \ } > $@-t && \ mv -f $@-t $@ unitypes.h: unitypes.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unitypes.in.h; \ } > $@-t && \ mv -f $@-t $@ uniwidth.h: uniwidth.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/uniwidth.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \ < $(srcdir)/wchar.in.h | \ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | \ sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wctype.in.h; \ } > $@-t && \ mv $@-t $@ mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pspp-1.0.1/gl/printf-frexpl.c0000644000175000017500000000210013124536242012755 00000000000000/* Split a 'long double' into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Specification. */ # include "printf-frexpl.h" # include "printf-frexp.h" long double printf_frexpl (long double x, int *expptr) { return printf_frexp (x, expptr); } #else # define USE_LONG_DOUBLE # include "printf-frexp.c" #endif pspp-1.0.1/gl/dosname.h0000644000175000017500000000373313124536241011624 00000000000000/* File names on MS-DOS/Windows systems. Copyright (C) 2000-2001, 2004-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . From Paul Eggert and Jim Meyering. */ #ifndef _DOSNAME_H #define _DOSNAME_H #if (defined _WIN32 || defined __WIN32__ || \ defined __MSDOS__ || defined __CYGWIN__ || \ defined __EMX__ || defined __DJGPP__) /* This internal macro assumes ASCII, but all hosts that support drive letters use ASCII. */ # define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ <= 'z' - 'a') # define FILE_SYSTEM_PREFIX_LEN(Filename) \ (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) # ifndef __CYGWIN__ # define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 # endif # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else # define FILE_SYSTEM_PREFIX_LEN(Filename) 0 # define ISSLASH(C) ((C) == '/') #endif #ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE # define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 #endif #if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE # define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) # else # define IS_ABSOLUTE_FILE_NAME(F) \ (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0) #endif #define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) #endif /* DOSNAME_H_ */ pspp-1.0.1/gl/safe-read.c0000644000175000017500000000414713124536243012022 00000000000000/* An interface to read and write that retries after interrupts. Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #ifdef SAFE_WRITE # include "safe-write.h" #else # include "safe-read.h" #endif /* Get ssize_t. */ #include #include #include #ifdef EINTR # define IS_EINTR(x) ((x) == EINTR) #else # define IS_EINTR(x) 0 #endif #include #ifdef SAFE_WRITE # define safe_rw safe_write # define rw write #else # define safe_rw safe_read # define rw read # undef const # define const /* empty */ #endif /* Read(write) up to COUNT bytes at BUF from(to) descriptor FD, retrying if interrupted. Return the actual number of bytes read(written), zero for EOF, or SAFE_READ_ERROR(SAFE_WRITE_ERROR) upon error. */ size_t safe_rw (int fd, void const *buf, size_t count) { /* Work around a bug in Tru64 5.1. Attempting to read more than INT_MAX bytes fails with errno == EINVAL. See . When decreasing COUNT, keep it block-aligned. */ enum { BUGGY_READ_MAXIMUM = INT_MAX & ~8191 }; for (;;) { ssize_t result = rw (fd, buf, count); if (0 <= result) return result; else if (IS_EINTR (errno)) continue; else if (errno == EINVAL && BUGGY_READ_MAXIMUM < count) count = BUGGY_READ_MAXIMUM; else return result; } } pspp-1.0.1/gl/array-mergesort.h0000644000175000017500000001712413124536241013320 00000000000000/* Stable-sorting of an array using mergesort. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ /* This file implements stable sorting of an array, using the mergesort algorithm. Worst-case running time for an array of length N is O(N log N). Unlike the mpsort module, the algorithm here attempts to minimize not only the number of comparisons, but also the number of copying operations. Before including this file, you need to define ELEMENT The type of every array element. COMPARE A two-argument macro that takes two 'const ELEMENT *' pointers and returns a negative, zero, or positive 'int' value if the element pointed to by the first argument is, respectively, less, equal, or greater than the element pointed to by the second argument. STATIC The storage class of the functions being defined. Before including this file, you also need to include: #include */ /* Merge the sorted arrays src1[0..n1-1] and src2[0..n2-1] into dst[0..n1+n2-1]. In case of ambiguity, put the elements of src1 before the elements of src2. n1 and n2 must be > 0. The arrays src1 and src2 must not overlap the dst array, except that src1 may be dst[n2..n1+n2-1], or src2 may be dst[n1..n1+n2-1]. */ static void merge (const ELEMENT *src1, size_t n1, const ELEMENT *src2, size_t n2, ELEMENT *dst) { for (;;) /* while (n1 > 0 && n2 > 0) */ { if (COMPARE (src1, src2) <= 0) { *dst++ = *src1++; n1--; if (n1 == 0) break; } else { *dst++ = *src2++; n2--; if (n2 == 0) break; } } /* Here n1 == 0 || n2 == 0 but also n1 > 0 || n2 > 0. */ if (n1 > 0) { if (dst != src1) do { *dst++ = *src1++; n1--; } while (n1 > 0); } else /* n2 > 0 */ { if (dst != src2) do { *dst++ = *src2++; n2--; } while (n2 > 0); } } /* Sort src[0..n-1] into dst[0..n-1], using tmp[0..n/2-1] as temporary (scratch) storage. The arrays src, dst, tmp must not overlap. */ STATIC void merge_sort_fromto (const ELEMENT *src, ELEMENT *dst, size_t n, ELEMENT *tmp) { switch (n) { case 0: return; case 1: /* Nothing to do. */ dst[0] = src[0]; return; case 2: /* Trivial case. */ if (COMPARE (&src[0], &src[1]) <= 0) { /* src[0] <= src[1] */ dst[0] = src[0]; dst[1] = src[1]; } else { dst[0] = src[1]; dst[1] = src[0]; } break; case 3: /* Simple case. */ if (COMPARE (&src[0], &src[1]) <= 0) { if (COMPARE (&src[1], &src[2]) <= 0) { /* src[0] <= src[1] <= src[2] */ dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; } else if (COMPARE (&src[0], &src[2]) <= 0) { /* src[0] <= src[2] < src[1] */ dst[0] = src[0]; dst[1] = src[2]; dst[2] = src[1]; } else { /* src[2] < src[0] <= src[1] */ dst[0] = src[2]; dst[1] = src[0]; dst[2] = src[1]; } } else { if (COMPARE (&src[0], &src[2]) <= 0) { /* src[1] < src[0] <= src[2] */ dst[0] = src[1]; dst[1] = src[0]; dst[2] = src[2]; } else if (COMPARE (&src[1], &src[2]) <= 0) { /* src[1] <= src[2] < src[0] */ dst[0] = src[1]; dst[1] = src[2]; dst[2] = src[0]; } else { /* src[2] < src[1] < src[0] */ dst[0] = src[2]; dst[1] = src[1]; dst[2] = src[0]; } } break; default: { size_t n1 = n / 2; size_t n2 = (n + 1) / 2; /* Note: n1 + n2 = n, n1 <= n2. */ /* Sort src[n1..n-1] into dst[n1..n-1], scratching tmp[0..n2/2-1]. */ merge_sort_fromto (src + n1, dst + n1, n2, tmp); /* Sort src[0..n1-1] into tmp[0..n1-1], scratching dst[0..n1-1]. */ merge_sort_fromto (src, tmp, n1, dst); /* Merge the two half results. */ merge (tmp, n1, dst + n1, n2, dst); } break; } } /* Sort src[0..n-1], using tmp[0..n-1] as temporary (scratch) storage. The arrays src, tmp must not overlap. */ STATIC void merge_sort_inplace (ELEMENT *src, size_t n, ELEMENT *tmp) { switch (n) { case 0: case 1: /* Nothing to do. */ return; case 2: /* Trivial case. */ if (COMPARE (&src[0], &src[1]) <= 0) { /* src[0] <= src[1] */ } else { ELEMENT t = src[0]; src[0] = src[1]; src[1] = t; } break; case 3: /* Simple case. */ if (COMPARE (&src[0], &src[1]) <= 0) { if (COMPARE (&src[1], &src[2]) <= 0) { /* src[0] <= src[1] <= src[2] */ } else if (COMPARE (&src[0], &src[2]) <= 0) { /* src[0] <= src[2] < src[1] */ ELEMENT t = src[1]; src[1] = src[2]; src[2] = t; } else { /* src[2] < src[0] <= src[1] */ ELEMENT t = src[0]; src[0] = src[2]; src[2] = src[1]; src[1] = t; } } else { if (COMPARE (&src[0], &src[2]) <= 0) { /* src[1] < src[0] <= src[2] */ ELEMENT t = src[0]; src[0] = src[1]; src[1] = t; } else if (COMPARE (&src[1], &src[2]) <= 0) { /* src[1] <= src[2] < src[0] */ ELEMENT t = src[0]; src[0] = src[1]; src[1] = src[2]; src[2] = t; } else { /* src[2] < src[1] < src[0] */ ELEMENT t = src[0]; src[0] = src[2]; src[2] = t; } } break; default: { size_t n1 = n / 2; size_t n2 = (n + 1) / 2; /* Note: n1 + n2 = n, n1 <= n2. */ /* Sort src[n1..n-1], scratching tmp[0..n2-1]. */ merge_sort_inplace (src + n1, n2, tmp); /* Sort src[0..n1-1] into tmp[0..n1-1], scratching tmp[n1..2*n1-1]. */ merge_sort_fromto (src, tmp, n1, tmp + n1); /* Merge the two half results. */ merge (tmp, n1, src + n1, n2, src); } break; } } #undef ELEMENT #undef COMPARE #undef STATIC pspp-1.0.1/gl/getline.c0000644000175000017500000000166613124536242011624 00000000000000/* getline.c --- Implementation of replacement getline function. Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Simon Josefsson. */ #include #include ssize_t getline (char **lineptr, size_t *n, FILE *stream) { return getdelim (lineptr, n, '\n', stream); } pspp-1.0.1/gl/floor.c0000644000175000017500000000644713124536241011317 00000000000000/* Round towards negative infinity. Copyright (C) 2007, 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible , 2007. */ #if ! defined USE_LONG_DOUBLE # include #endif /* Specification. */ #include #include #ifdef USE_LONG_DOUBLE # define FUNC floorl # define DOUBLE long double # define MANT_DIG LDBL_MANT_DIG # define L_(literal) literal##L #elif ! defined USE_FLOAT # define FUNC floor # define DOUBLE double # define MANT_DIG DBL_MANT_DIG # define L_(literal) literal #else /* defined USE_FLOAT */ # define FUNC floorf # define DOUBLE float # define MANT_DIG FLT_MANT_DIG # define L_(literal) literal##f #endif /* MSVC with option -fp:strict refuses to compile constant initializers that contain floating-point operations. Pacify this compiler. */ #ifdef _MSC_VER # pragma fenv_access (off) #endif /* 2^(MANT_DIG-1). */ static const DOUBLE TWO_MANT_DIG = /* Assume MANT_DIG <= 5 * 31. Use the identity n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5). */ (DOUBLE) (1U << ((MANT_DIG - 1) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5)); DOUBLE FUNC (DOUBLE x) { /* The use of 'volatile' guarantees that excess precision bits are dropped at each addition step and before the following comparison at the caller's site. It is necessary on x86 systems where double-floats are not IEEE compliant by default, to avoid that the results become platform and compiler option dependent. 'volatile' is a portable alternative to gcc's -ffloat-store option. */ volatile DOUBLE y = x; volatile DOUBLE z = y; if (z > L_(0.0)) { /* For 0 < x < 1, return +0.0 even if the current rounding mode is FE_DOWNWARD. */ if (z < L_(1.0)) z = L_(0.0); /* Avoid rounding errors for values near 2^k, where k >= MANT_DIG-1. */ else if (z < TWO_MANT_DIG) { /* Round to the next integer (nearest or up or down, doesn't matter). */ z += TWO_MANT_DIG; z -= TWO_MANT_DIG; /* Enforce rounding down. */ if (z > y) z -= L_(1.0); } } else if (z < L_(0.0)) { /* Avoid rounding errors for values near -2^k, where k >= MANT_DIG-1. */ if (z > - TWO_MANT_DIG) { /* Round to the next integer (nearest or up or down, doesn't matter). */ z -= TWO_MANT_DIG; z += TWO_MANT_DIG; /* Enforce rounding down. */ if (z > y) z -= L_(1.0); } } return z; } pspp-1.0.1/gl/signbitl.c0000644000175000017500000000414213124536243012001 00000000000000/* signbit() macro: Determine the sign bit of a floating-point number. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include #include #include "isnanl-nolibm.h" #include "float+.h" #ifdef gl_signbitl_OPTIMIZED_MACRO # undef gl_signbitl #endif int gl_signbitl (long double arg) { #if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT /* The use of a union to extract the bits of the representation of a 'long double' is safe in practice, despite of the "aliasing rules" of C99, because the GCC docs say "Even with '-fstrict-aliasing', type-punning is allowed, provided the memory is accessed through the union type." and similarly for other compilers. */ # define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { long double value; unsigned int word[NWORDS]; } m; m.value = arg; return (m.word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; #elif HAVE_COPYSIGNL_IN_LIBC return copysignl (1.0L, arg) < 0; #else /* This does not do the right thing for NaN, but this is irrelevant for most use cases. */ if (isnanl (arg)) return 0; if (arg < 0.0L) return 1; else if (arg == 0.0L) { /* Distinguish 0.0L and -0.0L. */ static long double plus_zero = 0.0L; long double arg_mem = arg; return (memcmp (&plus_zero, &arg_mem, SIZEOF_LDBL) != 0); } else return 0; #endif } pspp-1.0.1/gl/c-ctype.c0000644000175000017500000000012213020461273011517 00000000000000#include #define C_CTYPE_INLINE _GL_EXTERN_INLINE #include "c-ctype.h" pspp-1.0.1/gl/verify.h0000644000175000017500000002561013124536243011502 00000000000000/* Compile-time assert-like macros. Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef _GL_VERIFY_H #define _GL_VERIFY_H /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. This is supported by GCC 4.6.0 and later, in C mode, and its use here generates easier-to-read diagnostics when verify (R) fails. Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. This will likely be supported by future GCC versions, in C++ mode. Use this only with GCC. If we were willing to slow 'configure' down we could also use it with other compilers, but since this affects only the quality of diagnostics, why bother? */ #if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ && !defined __cplusplus) # define _GL_HAVE__STATIC_ASSERT 1 #endif /* The condition (99 < __GNUC__) is temporary, until we know about the first G++ release that supports static_assert. */ #if (99 < __GNUC__) && defined __cplusplus # define _GL_HAVE_STATIC_ASSERT 1 #endif /* FreeBSD 9.1 , included by and lots of other system headers, defines a conflicting _Static_assert that is no better than ours; override it. */ #ifndef _GL_HAVE_STATIC_ASSERT # include # undef _Static_assert #endif /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike assert (R), there is no run-time overhead. If _Static_assert works, verify (R) uses it directly. Similarly, _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct that is an operand of sizeof. The code below uses several ideas for C++ compilers, and for C compilers that do not support _Static_assert: * The first step is ((R) ? 1 : -1). Given an expression R, of integral or boolean or floating-point type, this yields an expression of integral type, whose value is later verified to be constant and nonnegative. * Next this expression W is wrapped in a type struct _gl_verify_type { unsigned int _gl_verify_error_if_negative: W; }. If W is negative, this yields a compile-time error. No compiler can deal with a bit-field of negative size. One might think that an array size check would have the same effect, that is, that the type struct { unsigned int dummy[W]; } would work as well. However, inside a function, some compilers (such as C++ compilers and GNU C) allow local parameters and variables inside array size expressions. With these compilers, an array size check would not properly diagnose this misuse of the verify macro: void function (int n) { verify (n < 0); } * For the verify macro, the struct _gl_verify_type will need to somehow be embedded into a declaration. To be portable, this declaration must declare an object, a constant, a function, or a typedef name. If the declared entity uses the type directly, such as in struct dummy {...}; typedef struct {...} dummy; extern struct {...} *dummy; extern void dummy (struct {...} *); extern struct {...} *dummy (void); two uses of the verify macro would yield colliding declarations if the entity names are not disambiguated. A workaround is to attach the current line number to the entity name: #define _GL_CONCAT0(x, y) x##y #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) extern struct {...} * _GL_CONCAT (dummy, __LINE__); But this has the problem that two invocations of verify from within the same macro would collide, since the __LINE__ value would be the same for both invocations. (The GCC __COUNTER__ macro solves this problem, but is not portable.) A solution is to use the sizeof operator. It yields a number, getting rid of the identity of the type. Declarations like extern int dummy [sizeof (struct {...})]; extern void dummy (int [sizeof (struct {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; can be repeated. * Should the implementation use a named struct or an unnamed struct? Which of the following alternatives can be used? extern int dummy [sizeof (struct {...})]; extern int dummy [sizeof (struct _gl_verify_type {...})]; extern void dummy (int [sizeof (struct {...})]); extern void dummy (int [sizeof (struct _gl_verify_type {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})]; In the second and sixth case, the struct type is exported to the outer scope; two such declarations therefore collide. GCC warns about the first, third, and fourth cases. So the only remaining possibility is the fifth case: extern int (*dummy (void)) [sizeof (struct {...})]; * GCC warns about duplicate declarations of the dummy function if -Wredundant-decls is used. GCC 4.3 and later have a builtin __COUNTER__ macro that can let us generate unique identifiers for each dummy function, to suppress this warning. * This implementation exploits the fact that older versions of GCC, which do not support _Static_assert, also do not warn about the last declaration mentioned above. * GCC warns if -Wnested-externs is enabled and verify() is used within a function body; but inside a function, you can always arrange to use verify_expr() instead. * In C++, any struct definition inside sizeof is invalid. Use a template type to work around the problem. */ /* Concatenate two preprocessor tokens. */ #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) #define _GL_CONCAT0(x, y) x##y /* _GL_COUNTER is an integer, preferably one that changes each time we use it. Use __COUNTER__ if it works, falling back on __LINE__ otherwise. __LINE__ isn't perfect, but it's better than a constant. */ #if defined __COUNTER__ && __COUNTER__ != __COUNTER__ # define _GL_COUNTER __COUNTER__ #else # define _GL_COUNTER __LINE__ #endif /* Generate a symbol with the given prefix, making it unique if possible. */ #define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) /* Verify requirement R at compile-time, as an integer constant expression that returns 1. If R is false, fail at compile-time, preferably with a diagnostic that includes the string-literal DIAGNOSTIC. */ #define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) #ifdef __cplusplus # if !GNULIB_defined_struct__gl_verify_type template struct _gl_verify_type { unsigned int _gl_verify_error_if_negative: w; }; # define GNULIB_defined_struct__gl_verify_type 1 # endif # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ _gl_verify_type<(R) ? 1 : -1> #elif defined _GL_HAVE__STATIC_ASSERT # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ struct { \ _Static_assert (R, DIAGNOSTIC); \ int _gl_dummy; \ } #else # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } #endif /* Verify requirement R at compile-time, as a declaration without a trailing ';'. If R is false, fail at compile-time, preferably with a diagnostic that includes the string-literal DIAGNOSTIC. Unfortunately, unlike C11, this implementation must appear as an ordinary declaration, and cannot appear inside struct { ... }. */ #ifdef _GL_HAVE__STATIC_ASSERT # define _GL_VERIFY _Static_assert #else # define _GL_VERIFY(R, DIAGNOSTIC) \ extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] #endif /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ #ifdef _GL_STATIC_ASSERT_H # if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert # define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) # endif # if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert # define static_assert _Static_assert /* C11 requires this #define. */ # endif #endif /* @assert.h omit start@ */ /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike assert (R), there is no run-time overhead. There are two macros, since no single macro can be used in all contexts in C. verify_true (R) is for scalar contexts, including integer constant expression contexts. verify (R) is for declaration contexts, e.g., the top level. */ /* Verify requirement R at compile-time, as an integer constant expression. Return 1. This is equivalent to verify_expr (R, 1). verify_true is obsolescent; please use verify_expr instead. */ #define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") /* Verify requirement R at compile-time. Return the value of the expression E. */ #define verify_expr(R, E) \ (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ #ifdef __GNUC__ # define verify(R) _GL_VERIFY (R, "verify (" #R ")") #else /* PGI barfs if R is long. Play it safe. */ # define verify(R) _GL_VERIFY (R, "verify (...)") #endif #ifndef __has_builtin # define __has_builtin(x) 0 #endif /* Assume that R always holds. This lets the compiler optimize accordingly. R should not have side-effects; it may or may not be evaluated. Behavior is undefined if R is false. */ #if (__has_builtin (__builtin_unreachable) \ || 4 < __GNUC__ + (5 <= __GNUC_MINOR__)) # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) #elif 1200 <= _MSC_VER # define assume(R) __assume (R) #elif ((defined GCC_LINT || defined lint) \ && (__has_builtin (__builtin_trap) \ || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__)))) /* Doing it this way helps various packages when configured with --enable-gcc-warnings, which compiles with -Dlint. It's nicer when 'assume' silences warnings even with older GCCs. */ # define assume(R) ((R) ? (void) 0 : __builtin_trap ()) #else # define assume(R) ((void) (0 && (R))) #endif /* @assert.h omit end@ */ #endif pspp-1.0.1/gl/getopt-pfx-core.h0000644000175000017500000000425313124536241013217 00000000000000/* getopt (basic, portable features) gnulib wrapper header. Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. gnulib is free software; you can 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. gnulib is distributed in the hope that 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 gnulib; if not, see . */ #ifndef _GETOPT_PFX_CORE_H #define _GETOPT_PFX_CORE_H 1 /* This header should not be used directly; include getopt.h or unistd.h instead. It does not have a protective #error, because the guard macro for getopt.h in gnulib is not fixed. */ /* Standalone applications should #define __GETOPT_PREFIX to an identifier that prefixes the external functions and variables defined in getopt-core.h and getopt-ext.h. Systematically rename identifiers so that they do not collide with the system functions and variables. Renaming avoids problems with some compilers and linkers. */ #ifdef __GETOPT_PREFIX # ifndef __GETOPT_ID # define __GETOPT_CONCAT(x, y) x ## y # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) # endif # undef getopt # undef optarg # undef opterr # undef optind # undef optopt # define getopt __GETOPT_ID (getopt) # define optarg __GETOPT_ID (optarg) # define opterr __GETOPT_ID (opterr) # define optind __GETOPT_ID (optind) # define optopt __GETOPT_ID (optopt) /* The system's getopt.h may have already included getopt-core.h to declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that getopt-core.h declares them with prefixes. */ # undef _GETOPT_CORE_H #endif #include #endif /* _GETOPT_PFX_CORE_H */ pspp-1.0.1/gl/crc.c0000644000175000017500000001140213124536241010730 00000000000000/* crc.c -- cyclic redundancy checks Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Simon Josefsson. */ #include #include "crc.h" /* Table of CRCs of all 8-bit messages. Generated by running code from RFC 1952 modified to print out the table. */ static const uint32_t crc32_table[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; /* * The following function was extracted from RFC 1952 by Simon * Josefsson. It was modified to avoid initial and final XOR, to use * size_t for the buffer length, and to use the const keyword. */ uint32_t crc32_update_no_xor (uint32_t crc, const char *buf, size_t len) { size_t n; for (n = 0; n < len; n++) crc = crc32_table[(crc ^ buf[n]) & 0xff] ^ (crc >> 8); return crc; } uint32_t crc32_no_xor (const char *buf, size_t len) { return crc32_update_no_xor (0L, buf, len); } uint32_t crc32_update (uint32_t crc, const char *buf, size_t len) { return crc32_update_no_xor (crc ^ 0xffffffff, buf, len) ^ 0xffffffff; } uint32_t crc32 (const char *buf, size_t len) { return crc32_update (0L, buf, len); } pspp-1.0.1/gl/c-strcase.h0000644000175000017500000000401413124536241012053 00000000000000/* Case-insensitive string comparison functions in C locale. Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef C_STRCASE_H #define C_STRCASE_H #include /* The functions defined in this file assume the "C" locale and a character set without diacritics (ASCII-US or EBCDIC-US or something like that). Even if the "C" locale on a particular system is an extension of the ASCII character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it is ISO-8859-1), the functions in this file recognize only the ASCII characters. More precisely, one of the string arguments must be an ASCII string; the other one can also contain non-ASCII characters (but then the comparison result will be nonzero). */ #ifdef __cplusplus extern "C" { #endif /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ extern int c_strcasecmp (const char *s1, const char *s2) _GL_ATTRIBUTE_PURE; /* Compare no more than N characters of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ extern int c_strncasecmp (const char *s1, const char *s2, size_t n) _GL_ATTRIBUTE_PURE; #ifdef __cplusplus } #endif #endif /* C_STRCASE_H */ pspp-1.0.1/gl/float+.h0000644000175000017500000001274513124536241011361 00000000000000/* Supplemental information about the floating-point formats. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2007. 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, 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 . */ #ifndef _FLOATPLUS_H #define _FLOATPLUS_H #include #include /* Number of bits in the mantissa of a floating-point number, including the "hidden bit". */ #if FLT_RADIX == 2 # define FLT_MANT_BIT FLT_MANT_DIG # define DBL_MANT_BIT DBL_MANT_DIG # define LDBL_MANT_BIT LDBL_MANT_DIG #elif FLT_RADIX == 4 # define FLT_MANT_BIT (FLT_MANT_DIG * 2) # define DBL_MANT_BIT (DBL_MANT_DIG * 2) # define LDBL_MANT_BIT (LDBL_MANT_DIG * 2) #elif FLT_RADIX == 16 # define FLT_MANT_BIT (FLT_MANT_DIG * 4) # define DBL_MANT_BIT (DBL_MANT_DIG * 4) # define LDBL_MANT_BIT (LDBL_MANT_DIG * 4) #endif /* Bit mask that can be used to mask the exponent, as an unsigned number. */ #define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7) #define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) #define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7) /* Number of bits used for the exponent of a floating-point number, including the exponent's sign. */ #define FLT_EXP_BIT \ (FLT_EXP_MASK < 0x100 ? 8 : \ FLT_EXP_MASK < 0x200 ? 9 : \ FLT_EXP_MASK < 0x400 ? 10 : \ FLT_EXP_MASK < 0x800 ? 11 : \ FLT_EXP_MASK < 0x1000 ? 12 : \ FLT_EXP_MASK < 0x2000 ? 13 : \ FLT_EXP_MASK < 0x4000 ? 14 : \ FLT_EXP_MASK < 0x8000 ? 15 : \ FLT_EXP_MASK < 0x10000 ? 16 : \ FLT_EXP_MASK < 0x20000 ? 17 : \ FLT_EXP_MASK < 0x40000 ? 18 : \ FLT_EXP_MASK < 0x80000 ? 19 : \ FLT_EXP_MASK < 0x100000 ? 20 : \ FLT_EXP_MASK < 0x200000 ? 21 : \ FLT_EXP_MASK < 0x400000 ? 22 : \ FLT_EXP_MASK < 0x800000 ? 23 : \ FLT_EXP_MASK < 0x1000000 ? 24 : \ FLT_EXP_MASK < 0x2000000 ? 25 : \ FLT_EXP_MASK < 0x4000000 ? 26 : \ FLT_EXP_MASK < 0x8000000 ? 27 : \ FLT_EXP_MASK < 0x10000000 ? 28 : \ FLT_EXP_MASK < 0x20000000 ? 29 : \ FLT_EXP_MASK < 0x40000000 ? 30 : \ FLT_EXP_MASK <= 0x7fffffff ? 31 : \ 32) #define DBL_EXP_BIT \ (DBL_EXP_MASK < 0x100 ? 8 : \ DBL_EXP_MASK < 0x200 ? 9 : \ DBL_EXP_MASK < 0x400 ? 10 : \ DBL_EXP_MASK < 0x800 ? 11 : \ DBL_EXP_MASK < 0x1000 ? 12 : \ DBL_EXP_MASK < 0x2000 ? 13 : \ DBL_EXP_MASK < 0x4000 ? 14 : \ DBL_EXP_MASK < 0x8000 ? 15 : \ DBL_EXP_MASK < 0x10000 ? 16 : \ DBL_EXP_MASK < 0x20000 ? 17 : \ DBL_EXP_MASK < 0x40000 ? 18 : \ DBL_EXP_MASK < 0x80000 ? 19 : \ DBL_EXP_MASK < 0x100000 ? 20 : \ DBL_EXP_MASK < 0x200000 ? 21 : \ DBL_EXP_MASK < 0x400000 ? 22 : \ DBL_EXP_MASK < 0x800000 ? 23 : \ DBL_EXP_MASK < 0x1000000 ? 24 : \ DBL_EXP_MASK < 0x2000000 ? 25 : \ DBL_EXP_MASK < 0x4000000 ? 26 : \ DBL_EXP_MASK < 0x8000000 ? 27 : \ DBL_EXP_MASK < 0x10000000 ? 28 : \ DBL_EXP_MASK < 0x20000000 ? 29 : \ DBL_EXP_MASK < 0x40000000 ? 30 : \ DBL_EXP_MASK <= 0x7fffffff ? 31 : \ 32) #define LDBL_EXP_BIT \ (LDBL_EXP_MASK < 0x100 ? 8 : \ LDBL_EXP_MASK < 0x200 ? 9 : \ LDBL_EXP_MASK < 0x400 ? 10 : \ LDBL_EXP_MASK < 0x800 ? 11 : \ LDBL_EXP_MASK < 0x1000 ? 12 : \ LDBL_EXP_MASK < 0x2000 ? 13 : \ LDBL_EXP_MASK < 0x4000 ? 14 : \ LDBL_EXP_MASK < 0x8000 ? 15 : \ LDBL_EXP_MASK < 0x10000 ? 16 : \ LDBL_EXP_MASK < 0x20000 ? 17 : \ LDBL_EXP_MASK < 0x40000 ? 18 : \ LDBL_EXP_MASK < 0x80000 ? 19 : \ LDBL_EXP_MASK < 0x100000 ? 20 : \ LDBL_EXP_MASK < 0x200000 ? 21 : \ LDBL_EXP_MASK < 0x400000 ? 22 : \ LDBL_EXP_MASK < 0x800000 ? 23 : \ LDBL_EXP_MASK < 0x1000000 ? 24 : \ LDBL_EXP_MASK < 0x2000000 ? 25 : \ LDBL_EXP_MASK < 0x4000000 ? 26 : \ LDBL_EXP_MASK < 0x8000000 ? 27 : \ LDBL_EXP_MASK < 0x10000000 ? 28 : \ LDBL_EXP_MASK < 0x20000000 ? 29 : \ LDBL_EXP_MASK < 0x40000000 ? 30 : \ LDBL_EXP_MASK <= 0x7fffffff ? 31 : \ 32) /* Number of bits used for a floating-point number: the mantissa (not counting the "hidden bit", since it may or may not be explicit), the exponent, and the sign. */ #define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1) #define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1) #define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1) /* Number of bytes used for a floating-point number. This can be smaller than the 'sizeof'. For example, on i386 systems, 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but sizeof (long double) = 12 or = 16. */ #define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) #define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) #define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) /* Verify that SIZEOF_FLT <= sizeof (float) etc. */ typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1]; typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1]; typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1]; #endif /* _FLOATPLUS_H */ pspp-1.0.1/gl/size_max.h0000644000175000017500000000221113124536243012005 00000000000000/* size_max.h -- declare SIZE_MAX through system headers Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. Written by Simon Josefsson. 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, 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 . */ #ifndef GNULIB_SIZE_MAX_H #define GNULIB_SIZE_MAX_H /* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ # include /* Get SIZE_MAX declaration on systems like glibc 2. */ # if HAVE_STDINT_H # include # endif /* On systems where these include files don't define it, SIZE_MAX is defined in config.h. */ #endif /* GNULIB_SIZE_MAX_H */ pspp-1.0.1/gl/gettimeofday.c0000644000175000017500000001073613124536242012654 00000000000000/* Provide gettimeofday for systems that don't have it or for which it's broken. Copyright (C) 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* written by Jim Meyering */ #include /* Specification. */ #include #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WINDOWS_NATIVE # include #endif #include "localtime-buffer.h" #ifdef WINDOWS_NATIVE /* GetSystemTimePreciseAsFileTime was introduced only in Windows 8. */ typedef void (WINAPI * GetSystemTimePreciseAsFileTimeFuncType) (FILETIME *lpTime); static GetSystemTimePreciseAsFileTimeFuncType GetSystemTimePreciseAsFileTimeFunc = NULL; static BOOL initialized = FALSE; static void initialize (void) { HMODULE kernel32 = LoadLibrary ("kernel32.dll"); if (kernel32 != NULL) { GetSystemTimePreciseAsFileTimeFunc = (GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime"); } initialized = TRUE; } #endif /* This is a wrapper for gettimeofday. It is used only on systems that lack this function, or whose implementation of this function causes problems. Work around the bug in some systems whereby gettimeofday clobbers the static buffer that localtime uses for its return value. The gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has this problem. */ int gettimeofday (struct timeval *restrict tv, void *restrict tz) { #undef gettimeofday #ifdef WINDOWS_NATIVE /* On native Windows, there are two ways to get the current time: GetSystemTimeAsFileTime or GetSystemTimePreciseAsFileTime . GetSystemTimeAsFileTime produces values that jump by increments of 15.627 milliseconds (!) on average. Whereas GetSystemTimePreciseAsFileTime values usually jump by 1 or 2 microseconds. More discussion on this topic: . */ FILETIME current_time; if (!initialized) initialize (); if (GetSystemTimePreciseAsFileTimeFunc != NULL) GetSystemTimePreciseAsFileTimeFunc (¤t_time); else GetSystemTimeAsFileTime (¤t_time); /* Convert from FILETIME to 'struct timeval'. */ /* FILETIME: */ ULONGLONG since_1601 = ((ULONGLONG) current_time.dwHighDateTime << 32) | (ULONGLONG) current_time.dwLowDateTime; /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 leap years, in total 134774 days. */ ULONGLONG since_1970 = since_1601 - (ULONGLONG) 134774 * (ULONGLONG) 86400 * (ULONGLONG) 10000000; ULONGLONG microseconds_since_1970 = since_1970 / (ULONGLONG) 10; tv->tv_sec = microseconds_since_1970 / (ULONGLONG) 1000000; tv->tv_usec = microseconds_since_1970 % (ULONGLONG) 1000000; return 0; #else # if HAVE_GETTIMEOFDAY # if GETTIMEOFDAY_CLOBBERS_LOCALTIME /* Save and restore the contents of the buffer used for localtime's result around the call to gettimeofday. */ struct tm save = *localtime_buffer_addr; # endif # if defined timeval /* 'struct timeval' overridden by gnulib? */ # undef timeval struct timeval otv; int result = gettimeofday (&otv, (struct timezone *) tz); if (result == 0) { tv->tv_sec = otv.tv_sec; tv->tv_usec = otv.tv_usec; } # else int result = gettimeofday (tv, (struct timezone *) tz); # endif # if GETTIMEOFDAY_CLOBBERS_LOCALTIME *localtime_buffer_addr = save; # endif return result; # else # if !defined OK_TO_USE_1S_CLOCK # error "Only 1-second nominal clock resolution found. Is that intended?" \ "If so, compile with the -DOK_TO_USE_1S_CLOCK option." # endif tv->tv_sec = time (NULL); tv->tv_usec = 0; return 0; # endif #endif } pspp-1.0.1/gl/read-file.h0000644000175000017500000000213513124536243012023 00000000000000/* read-file.h -- read file contents into a string Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. Written by Simon Josefsson. 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, 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 . */ #ifndef READ_FILE_H #define READ_FILE_H /* Get size_t. */ #include /* Get FILE. */ #include extern char *fread_file (FILE * stream, size_t * length); extern char *read_file (const char *filename, size_t * length); extern char *read_binary_file (const char *filename, size_t * length); #endif /* READ_FILE_H */ pspp-1.0.1/gl/msvc-inval.h0000644000175000017500000002113513124536242012252 00000000000000/* Invalid parameter handler for MSVC runtime libraries. Copyright (C) 2011-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _MSVC_INVAL_H #define _MSVC_INVAL_H /* With MSVC runtime libraries with the "invalid parameter handler" concept, functions like fprintf(), dup2(), or close() crash when the caller passes an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF) instead. This file defines macros that turn such an invalid parameter notification into a non-local exit. An error code can then be produced at the target of this exit. You can thus write code like TRY_MSVC_INVAL { } CATCH_MSVC_INVAL { } DONE_MSVC_INVAL; This entire block expands to a single statement. The handling of invalid parameters can be done in three ways: * The default way, which is reasonable for programs (not libraries): AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [DEFAULT_HANDLING]) * The way for libraries that make "hairy" calls (like close(-1), or fclose(fp) where fileno(fp) is closed, or simply getdtablesize()): AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [HAIRY_LIBRARY_HANDLING]) * The way for libraries that make no "hairy" calls: AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [SANE_LIBRARY_HANDLING]) */ #define DEFAULT_HANDLING 0 #define HAIRY_LIBRARY_HANDLING 1 #define SANE_LIBRARY_HANDLING 2 #if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING) /* A native Windows platform with the "invalid parameter handler" concept, and either DEFAULT_HANDLING or HAIRY_LIBRARY_HANDLING. */ # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING /* Default handling. */ # ifdef __cplusplus extern "C" { # endif /* Ensure that the invalid parameter handler in installed that just returns. Because we assume no other part of the program installs a different invalid parameter handler, this solution is multithread-safe. */ extern void gl_msvc_inval_ensure_handler (void); # ifdef __cplusplus } # endif # define TRY_MSVC_INVAL \ do \ { \ gl_msvc_inval_ensure_handler (); \ if (1) # define CATCH_MSVC_INVAL \ else # define DONE_MSVC_INVAL \ } \ while (0) # else /* Handling for hairy libraries. */ # include /* Gnulib can define its own status codes, as described in the page "Raising Software Exceptions" on microsoft.com . Our status codes are composed of - 0xE0000000, mandatory for all user-defined status codes, - 0x474E550, a API identifier ("GNU"), - 0, 1, 2, ..., used to distinguish different status codes from the same API. */ # define STATUS_GNULIB_INVALID_PARAMETER (0xE0000000 + 0x474E550 + 0) # if defined _MSC_VER /* A compiler that supports __try/__except, as described in the page "try-except statement" on microsoft.com . With __try/__except, we can use the multithread-safe exception handling. */ # ifdef __cplusplus extern "C" { # endif /* Ensure that the invalid parameter handler in installed that raises a software exception with code STATUS_GNULIB_INVALID_PARAMETER. Because we assume no other part of the program installs a different invalid parameter handler, this solution is multithread-safe. */ extern void gl_msvc_inval_ensure_handler (void); # ifdef __cplusplus } # endif # define TRY_MSVC_INVAL \ do \ { \ gl_msvc_inval_ensure_handler (); \ __try # define CATCH_MSVC_INVAL \ __except (GetExceptionCode () == STATUS_GNULIB_INVALID_PARAMETER \ ? EXCEPTION_EXECUTE_HANDLER \ : EXCEPTION_CONTINUE_SEARCH) # define DONE_MSVC_INVAL \ } \ while (0) # else /* Any compiler. We can only use setjmp/longjmp. */ # include # ifdef __cplusplus extern "C" { # endif struct gl_msvc_inval_per_thread { /* The restart that will resume execution at the code between CATCH_MSVC_INVAL and DONE_MSVC_INVAL. It is enabled only between TRY_MSVC_INVAL and CATCH_MSVC_INVAL. */ jmp_buf restart; /* Tells whether the contents of restart is valid. */ int restart_valid; }; /* Ensure that the invalid parameter handler in installed that passes control to the gl_msvc_inval_restart if it is valid, or raises a software exception with code STATUS_GNULIB_INVALID_PARAMETER otherwise. Because we assume no other part of the program installs a different invalid parameter handler, this solution is multithread-safe. */ extern void gl_msvc_inval_ensure_handler (void); /* Return a pointer to the per-thread data for the current thread. */ extern struct gl_msvc_inval_per_thread *gl_msvc_inval_current (void); # ifdef __cplusplus } # endif # define TRY_MSVC_INVAL \ do \ { \ struct gl_msvc_inval_per_thread *msvc_inval_current; \ gl_msvc_inval_ensure_handler (); \ msvc_inval_current = gl_msvc_inval_current (); \ /* First, initialize gl_msvc_inval_restart. */ \ if (setjmp (msvc_inval_current->restart) == 0) \ { \ /* Then, mark it as valid. */ \ msvc_inval_current->restart_valid = 1; # define CATCH_MSVC_INVAL \ /* Execution completed. \ Mark gl_msvc_inval_restart as invalid. */ \ msvc_inval_current->restart_valid = 0; \ } \ else \ { \ /* Execution triggered an invalid parameter notification. \ Mark gl_msvc_inval_restart as invalid. */ \ msvc_inval_current->restart_valid = 0; # define DONE_MSVC_INVAL \ } \ } \ while (0) # endif # endif #else /* A platform that does not need to the invalid parameter handler, or when SANE_LIBRARY_HANDLING is desired. */ /* The braces here avoid GCC warnings like "warning: suggest explicit braces to avoid ambiguous 'else'". */ # define TRY_MSVC_INVAL \ do \ { \ if (1) # define CATCH_MSVC_INVAL \ else # define DONE_MSVC_INVAL \ } \ while (0) #endif #endif /* _MSVC_INVAL_H */ pspp-1.0.1/gl/fcntl.c0000644000175000017500000002733613124536241011304 00000000000000/* Provide file descriptor control. Copyright (C) 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Eric Blake . */ #include /* Specification. */ #include #include #include #include #include #if !HAVE_FCNTL # define rpl_fcntl fcntl #endif #undef fcntl #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ # if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" # else # include # endif /* Upper bound on getdtablesize(). See lib/getdtablesize.c. */ # define OPEN_MAX_MAX 0x10000 /* Duplicate OLDFD into the first available slot of at least NEWFD, which must be positive, with FLAGS determining whether the duplicate will be inheritable. */ static int dupfd (int oldfd, int newfd, int flags) { /* Mingw has no way to create an arbitrary fd. Iterate until all file descriptors less than newfd are filled up. */ HANDLE curr_process = GetCurrentProcess (); HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd); unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT]; unsigned int fds_to_close_bound = 0; int result; BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE; int mode; if (newfd < 0 || getdtablesize () <= newfd) { errno = EINVAL; return -1; } if (old_handle == INVALID_HANDLE_VALUE || (mode = setmode (oldfd, O_BINARY)) == -1) { /* oldfd is not open, or is an unassigned standard file descriptor. */ errno = EBADF; return -1; } setmode (oldfd, mode); flags |= mode; for (;;) { HANDLE new_handle; int duplicated_fd; unsigned int index; if (!DuplicateHandle (curr_process, /* SourceProcessHandle */ old_handle, /* SourceHandle */ curr_process, /* TargetProcessHandle */ (PHANDLE) &new_handle, /* TargetHandle */ (DWORD) 0, /* DesiredAccess */ inherit, /* InheritHandle */ DUPLICATE_SAME_ACCESS)) /* Options */ { switch (GetLastError ()) { case ERROR_TOO_MANY_OPEN_FILES: errno = EMFILE; break; case ERROR_INVALID_HANDLE: case ERROR_INVALID_TARGET_HANDLE: case ERROR_DIRECT_ACCESS_HANDLE: errno = EBADF; break; case ERROR_INVALID_PARAMETER: case ERROR_INVALID_FUNCTION: case ERROR_INVALID_ACCESS: errno = EINVAL; break; default: errno = EACCES; break; } result = -1; break; } duplicated_fd = _open_osfhandle ((intptr_t) new_handle, flags); if (duplicated_fd < 0) { CloseHandle (new_handle); result = -1; break; } if (newfd <= duplicated_fd) { result = duplicated_fd; break; } /* Set the bit duplicated_fd in fds_to_close[]. */ index = (unsigned int) duplicated_fd / CHAR_BIT; if (fds_to_close_bound <= index) { if (sizeof fds_to_close <= index) /* Need to increase OPEN_MAX_MAX. */ abort (); memset (fds_to_close + fds_to_close_bound, '\0', index + 1 - fds_to_close_bound); fds_to_close_bound = index + 1; } fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT); } /* Close the previous fds that turned out to be too small. */ { int saved_errno = errno; unsigned int duplicated_fd; for (duplicated_fd = 0; duplicated_fd < fds_to_close_bound * CHAR_BIT; duplicated_fd++) if ((fds_to_close[duplicated_fd / CHAR_BIT] >> (duplicated_fd % CHAR_BIT)) & 1) close (duplicated_fd); errno = saved_errno; } # if REPLACE_FCHDIR if (0 <= result) result = _gl_register_dup (oldfd, result); # endif return result; } #endif /* W32 */ #ifdef __KLIBC__ # define INCL_DOS # include static int klibc_fcntl (int fd, int action, /* arg */...) { va_list arg_ptr; int arg; struct stat sbuf; int result = -1; va_start (arg_ptr, action); arg = va_arg (arg_ptr, int); result = fcntl (fd, action, arg); /* EPERM for F_DUPFD, ENOTSUP for others */ if (result == -1 && (errno == EPERM || errno == ENOTSUP) && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode)) { ULONG ulMode; switch (action) { case F_DUPFD: /* Find available fd */ while (fcntl (arg, F_GETFL) != -1 || errno != EBADF) arg++; result = dup2 (fd, arg); break; /* Using underlying APIs is right ? */ case F_GETFD: if (DosQueryFHState (fd, &ulMode)) break; result = (ulMode & OPEN_FLAGS_NOINHERIT) ? FD_CLOEXEC : 0; break; case F_SETFD: if (arg & ~FD_CLOEXEC) break; if (DosQueryFHState (fd, &ulMode)) break; if (arg & FD_CLOEXEC) ulMode |= OPEN_FLAGS_NOINHERIT; else ulMode &= ~OPEN_FLAGS_NOINHERIT; /* Filter supported flags. */ ulMode &= (OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT); if (DosSetFHState (fd, ulMode)) break; result = 0; break; case F_GETFL: result = 0; break; case F_SETFL: if (arg != 0) break; result = 0; break; default : errno = EINVAL; break; } } va_end (arg_ptr); return result; } # define fcntl klibc_fcntl #endif /* Perform the specified ACTION on the file descriptor FD, possibly using the argument ARG further described below. This replacement handles the following actions, and forwards all others on to the native fcntl. An unrecognized ACTION returns -1 with errno set to EINVAL. F_DUPFD - duplicate FD, with int ARG being the minimum target fd. If successful, return the duplicate, which will be inheritable; otherwise return -1 and set errno. F_DUPFD_CLOEXEC - duplicate FD, with int ARG being the minimum target fd. If successful, return the duplicate, which will not be inheritable; otherwise return -1 and set errno. F_GETFD - ARG need not be present. If successful, return a non-negative value containing the descriptor flags of FD (only FD_CLOEXEC is portable, but other flags may be present); otherwise return -1 and set errno. */ int rpl_fcntl (int fd, int action, /* arg */...) { va_list arg; int result = -1; va_start (arg, action); switch (action) { #if !HAVE_FCNTL case F_DUPFD: { int target = va_arg (arg, int); result = dupfd (fd, target, 0); break; } #elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR case F_DUPFD: { int target = va_arg (arg, int); /* Detect invalid target; needed for cygwin 1.5.x. */ if (target < 0 || getdtablesize () <= target) errno = EINVAL; else { /* Haiku alpha 2 loses fd flags on original. */ int flags = fcntl (fd, F_GETFD); if (flags < 0) { result = -1; break; } result = fcntl (fd, action, target); if (0 <= result && fcntl (fd, F_SETFD, flags) == -1) { int saved_errno = errno; close (result); result = -1; errno = saved_errno; } # if REPLACE_FCHDIR if (0 <= result) result = _gl_register_dup (fd, result); # endif } break; } /* F_DUPFD */ #endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */ case F_DUPFD_CLOEXEC: { int target = va_arg (arg, int); #if !HAVE_FCNTL result = dupfd (fd, target, O_CLOEXEC); break; #else /* HAVE_FCNTL */ /* Try the system call first, if the headers claim it exists (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we may be running with a glibc that has the macro but with an older kernel that does not support it. Cache the information on whether the system call really works, but avoid caching failure if the corresponding F_DUPFD fails for any reason. 0 = unknown, 1 = yes, -1 = no. */ static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0; if (0 <= have_dupfd_cloexec) { result = fcntl (fd, action, target); if (0 <= result || errno != EINVAL) { have_dupfd_cloexec = 1; # if REPLACE_FCHDIR if (0 <= result) result = _gl_register_dup (fd, result); # endif } else { result = rpl_fcntl (fd, F_DUPFD, target); if (result < 0) break; have_dupfd_cloexec = -1; } } else result = rpl_fcntl (fd, F_DUPFD, target); if (0 <= result && have_dupfd_cloexec == -1) { int flags = fcntl (result, F_GETFD); if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1) { int saved_errno = errno; close (result); errno = saved_errno; result = -1; } } break; #endif /* HAVE_FCNTL */ } /* F_DUPFD_CLOEXEC */ #if !HAVE_FCNTL case F_GETFD: { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ HANDLE handle = (HANDLE) _get_osfhandle (fd); DWORD flags; if (handle == INVALID_HANDLE_VALUE || GetHandleInformation (handle, &flags) == 0) errno = EBADF; else result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC; # else /* !W32 */ /* Use dup2 to reject invalid file descriptors. No way to access this information, so punt. */ if (0 <= dup2 (fd, fd)) result = 0; # endif /* !W32 */ break; } /* F_GETFD */ #endif /* !HAVE_FCNTL */ /* Implementing F_SETFD on mingw is not trivial - there is no API for changing the O_NOINHERIT bit on an fd, and merely changing the HANDLE_FLAG_INHERIT bit on the underlying handle can lead to odd state. It may be possible by duplicating the handle, using _open_osfhandle with the right flags, then using dup2 to move the duplicate onto the original, but that is not supported for now. */ default: { #if HAVE_FCNTL void *p = va_arg (arg, void *); result = fcntl (fd, action, p); #else errno = EINVAL; #endif break; } } va_end (arg); return result; } pspp-1.0.1/gl/time-internal.h0000644000175000017500000000355513124536243012752 00000000000000/* Time internal interface Copyright 2015-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Paul Eggert. */ /* A time zone rule. */ struct tm_zone { /* More abbreviations, should they be needed. Their TZ_IS_SET members are zero. */ struct tm_zone *next; #if HAVE_TZNAME && !HAVE_TM_ZONE /* Copies of recent strings taken from tzname[0] and tzname[1]. The copies are in ABBRS, so that they survive tzset. Null if unknown. */ char *tzname_copy[2]; #endif /* If nonzero, the rule represents the TZ environment variable set to the first "abbreviation" (this may be the empty string). Otherwise, it represents an unset TZ. */ char tz_is_set; /* A sequence of null-terminated strings packed next to each other. The strings are followed by an extra null byte. If TZ_IS_SET, there must be at least one string and the first string (which is actually a TZ environment value) may be empty. Otherwise all strings must be nonempty. Abbreviations are stored here because otherwise the values of tm_zone and/or tzname would be dead after changing TZ and calling tzset. Abbreviations never move once allocated, and are live until tzfree is called. */ char abbrs[FLEXIBLE_ARRAY_MEMBER]; }; pspp-1.0.1/gl/tzset.c0000644000175000017500000000652513124536241011344 00000000000000/* Provide tzset for systems that don't have it or for which it's broken. Copyright (C) 2001-2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* written by Jim Meyering */ #include /* Specification. */ #include #include "localtime-buffer.h" /* This is a wrapper for tzset, for systems on which tzset may clobber the static buffer used for localtime's result. Work around the bug in some systems whereby tzset clobbers the static buffer that localtime uses for its return value. The tzset function from Solaris 2.5, 2.5.1, and 2.6 has this problem. */ void tzset (void) #undef tzset { #if TZSET_CLOBBERS_LOCALTIME /* Save and restore the contents of the buffer used for localtime's result around the call to tzset. */ struct tm save = *localtime_buffer_addr; #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Rectify the value of the environment variable TZ. There are four possible kinds of such values: - Traditional US time zone names, e.g. "PST8PDT". Syntax: see - Time zone names based on geography, that contain one or more slashes, e.g. "Europe/Moscow". - Time zone names based on geography, without slashes, e.g. "Singapore". - Time zone names that contain explicit DST rules. Syntax: see The Microsoft CRT understands only the first kind. It produces incorrect results if the value of TZ is of the other kinds. But in a Cygwin environment, /etc/profile.d/tzset.sh sets TZ to a value of the second kind for most geographies, or of the first kind in a few other geographies. If it is of the second kind, neutralize it. For the Microsoft CRT, an absent or empty TZ means the time zone that the user has set in the Windows Control Panel. If the value of TZ is of the third or fourth kind -- Cygwin programs understand these syntaxes as well --, it does not matter whether we neutralize it or not, since these values occur only when a Cygwin user has set TZ explicitly; this case is 1. rare and 2. under the user's responsibility. */ const char *tz = getenv ("TZ"); if (tz != NULL && strchr (tz, '/') != NULL) _putenv ("TZ="); /* On native Windows, tzset() is deprecated. Use _tzset() instead. See https://msdn.microsoft.com/en-us/library/ms235451.aspx https://msdn.microsoft.com/en-us/library/90s5c885.aspx */ _tzset (); #elif HAVE_TZSET tzset (); #else /* Do nothing. Avoid infinite recursion. */ #endif #if TZSET_CLOBBERS_LOCALTIME *localtime_buffer_addr = save; #endif } pspp-1.0.1/gl/strings.in.h0000644000175000017500000000765613124536243012306 00000000000000/* A substitute . Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _@GUARD_PREFIX@_STRINGS_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Minix 3.1.8 has a bug: must be included before . But avoid namespace pollution on glibc systems. */ #if defined __minix && !defined __GLIBC__ # include #endif /* The include_next requires a split double-inclusion guard. */ #if @HAVE_STRINGS_H@ # @INCLUDE_NEXT@ @NEXT_STRINGS_H@ #endif #ifndef _@GUARD_PREFIX@_STRINGS_H #define _@GUARD_PREFIX@_STRINGS_H #if ! @HAVE_DECL_STRNCASECMP@ /* Get size_t. */ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif /* Find the index of the least-significant set bit. */ #if @GNULIB_FFS@ # if !@HAVE_FFS@ _GL_FUNCDECL_SYS (ffs, int, (int i)); # endif _GL_CXXALIAS_SYS (ffs, int, (int i)); _GL_CXXALIASWARN (ffs); #elif defined GNULIB_POSIXCHECK # undef ffs # if HAVE_RAW_DECL_FFS _GL_WARN_ON_USE (ffs, "ffs is not portable - use the ffs module"); # endif #endif /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function does not work in multibyte locales. */ #if ! @HAVE_STRCASECMP@ extern int strcasecmp (char const *s1, char const *s2) _GL_ARG_NONNULL ((1, 2)); #endif #if defined GNULIB_POSIXCHECK /* strcasecmp() does not work with multibyte strings: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strcasecmp # if HAVE_RAW_DECL_STRCASECMP _GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character " "strings in multibyte locales - " "use mbscasecmp if you care about " "internationalization, or use c_strcasecmp , " "gnulib module c-strcase) if you want a locale " "independent function"); # endif #endif /* Compare no more than N bytes of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function cannot work correctly in multibyte locales. */ #if ! @HAVE_DECL_STRNCASECMP@ extern int strncasecmp (char const *s1, char const *s2, size_t n) _GL_ARG_NONNULL ((1, 2)); #endif #if defined GNULIB_POSIXCHECK /* strncasecmp() does not work with multibyte strings: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strncasecmp # if HAVE_RAW_DECL_STRNCASECMP _GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character " "strings in multibyte locales - " "use mbsncasecmp or mbspcasecmp if you care about " "internationalization, or use c_strncasecmp , " "gnulib module c-strcase) if you want a locale " "independent function"); # endif #endif #ifdef __cplusplus } #endif #endif /* _@GUARD_PREFIX@_STRING_H */ #endif /* _@GUARD_PREFIX@_STRING_H */ pspp-1.0.1/gl/getpass.c0000644000175000017500000001217413124536242011637 00000000000000/* Copyright (C) 1992-2001, 2003-2007, 2009-2017 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 3, 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 . */ #ifndef _LIBC # include #endif #include "getpass.h" #include #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) # include # if HAVE_DECL___FSETLOCKING && HAVE___FSETLOCKING # if HAVE_STDIO_EXT_H # include # endif # else # define __fsetlocking(stream, type) /* empty */ # endif # if HAVE_TERMIOS_H # include # endif # if USE_UNLOCKED_IO # include "unlocked-io.h" # else # if !HAVE_DECL_FFLUSH_UNLOCKED # undef fflush_unlocked # define fflush_unlocked(x) fflush (x) # endif # if !HAVE_DECL_FLOCKFILE # undef flockfile # define flockfile(x) ((void) 0) # endif # if !HAVE_DECL_FUNLOCKFILE # undef funlockfile # define funlockfile(x) ((void) 0) # endif # if !HAVE_DECL_FPUTS_UNLOCKED # undef fputs_unlocked # define fputs_unlocked(str,stream) fputs (str, stream) # endif # if !HAVE_DECL_PUTC_UNLOCKED # undef putc_unlocked # define putc_unlocked(c,stream) putc (c, stream) # endif # endif /* It is desirable to use this bit on systems that have it. The only bit of terminal state we want to twiddle is echoing, which is done in software; there is no need to change the state of the terminal hardware. */ # ifndef TCSASOFT # define TCSASOFT 0 # endif static void call_fclose (void *arg) { if (arg != NULL) fclose (arg); } char * getpass (const char *prompt) { FILE *tty; FILE *in, *out; # if HAVE_TCGETATTR struct termios s, t; # endif bool tty_changed = false; static char *buf; static size_t bufsize; ssize_t nread; /* Try to write to and read from the terminal if we can. If we can't open the terminal, use stderr and stdin. */ tty = fopen ("/dev/tty", "w+"); if (tty == NULL) { in = stdin; out = stderr; } else { /* We do the locking ourselves. */ __fsetlocking (tty, FSETLOCKING_BYCALLER); out = in = tty; } flockfile (out); /* Turn echoing off if it is on now. */ # if HAVE_TCGETATTR if (tcgetattr (fileno (in), &t) == 0) { /* Save the old one. */ s = t; /* Tricky, tricky. */ t.c_lflag &= ~(ECHO | ISIG); tty_changed = (tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &t) == 0); } # endif /* Write the prompt. */ fputs_unlocked (prompt, out); fflush_unlocked (out); /* Read the password. */ nread = getline (&buf, &bufsize, in); /* According to the C standard, input may not be followed by output on the same stream without an intervening call to a file positioning function. Suppose in == out; then without this fseek call, on Solaris, HP-UX, AIX, OSF/1, the previous input gets echoed, whereas on IRIX, the following newline is not output as it should be. POSIX imposes similar restrictions if fileno (in) == fileno (out). The POSIX restrictions are tricky and change from POSIX version to POSIX version, so play it safe and invoke fseek even if in != out. */ fseeko (out, 0, SEEK_CUR); if (buf != NULL) { if (nread < 0) buf[0] = '\0'; else if (buf[nread - 1] == '\n') { /* Remove the newline. */ buf[nread - 1] = '\0'; if (tty_changed) { /* Write the newline that was not echoed. */ putc_unlocked ('\n', out); } } } /* Restore the original setting. */ # if HAVE_TCSETATTR if (tty_changed) tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &s); # endif funlockfile (out); call_fclose (tty); return buf; } #else /* W32 native */ /* Windows implementation by Martin Lambers , improved by Simon Josefsson. */ /* For PASS_MAX. */ # include /* For _getch(). */ # include /* For strdup(). */ # include # ifndef PASS_MAX # define PASS_MAX 512 # endif char * getpass (const char *prompt) { char getpassbuf[PASS_MAX + 1]; size_t i = 0; int c; if (prompt) { fputs (prompt, stderr); fflush (stderr); } for (;;) { c = _getch (); if (c == '\r') { getpassbuf[i] = '\0'; break; } else if (i < PASS_MAX) { getpassbuf[i++] = c; } if (i >= PASS_MAX) { getpassbuf[i] = '\0'; break; } } if (prompt) { fputs ("\r\n", stderr); fflush (stderr); } return strdup (getpassbuf); } #endif pspp-1.0.1/gl/asnprintf.c0000644000175000017500000000204613124536241012171 00000000000000/* Formatted output to strings. Copyright (C) 1999, 2002, 2006, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include "vasnprintf.h" #include char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) { va_list args; char *result; va_start (args, format); result = vasnprintf (resultbuf, lengthp, format, args); va_end (args); return result; } pspp-1.0.1/gl/c-strcasestr.h0000644000175000017500000000207013124536241012604 00000000000000/* Case-insensitive searching in a string in C locale. Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef C_STRCASESTR_H #define C_STRCASESTR_H #ifdef __cplusplus extern "C" { #endif /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. */ extern char *c_strcasestr (const char *haystack, const char *needle); #ifdef __cplusplus } #endif #endif /* C_STRCASESTR_H */ pspp-1.0.1/gl/c-strcasestr.c0000644000175000017500000000566313124536241012612 00000000000000/* c-strcasestr.c -- case insensitive substring search in C locale Copyright (C) 2005-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2005. 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 . */ #include /* Specification. */ #include "c-strcasestr.h" #include #include #include "c-ctype.h" #include "c-strcase.h" /* Two-Way algorithm. */ #define RETURN_TYPE char * #define AVAILABLE(h, h_l, j, n_l) \ (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ && ((h_l) = (j) + (n_l))) #define CANON_ELEMENT c_tolower #define CMP_FUNC(p1, p2, l) \ c_strncasecmp ((const char *) (p1), (const char *) (p2), l) #include "str-two-way.h" /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison from the C locale, regardless of the current locale. */ char * c_strcasestr (const char *haystack_start, const char *needle_start) { const char *haystack = haystack_start; const char *needle = needle_start; size_t needle_len; /* Length of NEEDLE. */ size_t haystack_len; /* Known minimum length of HAYSTACK. */ bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ /* Determine length of NEEDLE, and in the process, make sure HAYSTACK is at least as long (no point processing all of a long NEEDLE if HAYSTACK is too short). */ while (*haystack && *needle) ok &= (c_tolower ((unsigned char) *haystack++) == c_tolower ((unsigned char) *needle++)); if (*needle) return NULL; if (ok) return (char *) haystack_start; needle_len = needle - needle_start; haystack = haystack_start + 1; haystack_len = needle_len - 1; /* Perform the search. Abstract memory is considered to be an array of 'unsigned char' values, not an array of 'char' values. See ISO C 99 section 6.2.6.1. */ if (needle_len < LONG_NEEDLE_THRESHOLD) return two_way_short_needle ((const unsigned char *) haystack, haystack_len, (const unsigned char *) needle_start, needle_len); return two_way_long_needle ((const unsigned char *) haystack, haystack_len, (const unsigned char *) needle_start, needle_len); } #undef LONG_NEEDLE_THRESHOLD pspp-1.0.1/gl/msvc-inval.c0000644000175000017500000000751113124536242012247 00000000000000/* Invalid parameter handler for MSVC runtime libraries. Copyright (C) 2011-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include "msvc-inval.h" #if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING) /* Get _invalid_parameter_handler type and _set_invalid_parameter_handler declaration. */ # include # if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING static void __cdecl gl_msvc_invalid_parameter_handler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t dummy) { } # else /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include # if defined _MSC_VER static void __cdecl gl_msvc_invalid_parameter_handler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t dummy) { RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL); } # else /* An index to thread-local storage. */ static DWORD tls_index; static int tls_initialized /* = 0 */; /* Used as a fallback only. */ static struct gl_msvc_inval_per_thread not_per_thread; struct gl_msvc_inval_per_thread * gl_msvc_inval_current (void) { if (!tls_initialized) { tls_index = TlsAlloc (); tls_initialized = 1; } if (tls_index == TLS_OUT_OF_INDEXES) /* TlsAlloc had failed. */ return ¬_per_thread; else { struct gl_msvc_inval_per_thread *pointer = (struct gl_msvc_inval_per_thread *) TlsGetValue (tls_index); if (pointer == NULL) { /* First call. Allocate a new 'struct gl_msvc_inval_per_thread'. */ pointer = (struct gl_msvc_inval_per_thread *) malloc (sizeof (struct gl_msvc_inval_per_thread)); if (pointer == NULL) /* Could not allocate memory. Use the global storage. */ pointer = ¬_per_thread; TlsSetValue (tls_index, pointer); } return pointer; } } static void __cdecl gl_msvc_invalid_parameter_handler (const wchar_t *expression, const wchar_t *function, const wchar_t *file, unsigned int line, uintptr_t dummy) { struct gl_msvc_inval_per_thread *current = gl_msvc_inval_current (); if (current->restart_valid) longjmp (current->restart, 1); else /* An invalid parameter notification from outside the gnulib code. Give the caller a chance to intervene. */ RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL); } # endif # endif static int gl_msvc_inval_initialized /* = 0 */; void gl_msvc_inval_ensure_handler (void) { if (gl_msvc_inval_initialized == 0) { _set_invalid_parameter_handler (gl_msvc_invalid_parameter_handler); gl_msvc_inval_initialized = 1; } } #endif pspp-1.0.1/gl/memcasecmp.h0000644000175000017500000000160213124536242012302 00000000000000/* Case-insensitive buffer comparator. Copyright (C) 1996, 1998, 2003, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Jim Meyering. */ #include int memcasecmp (const void *vs1, const void *vs2, size_t n) _GL_ATTRIBUTE_PURE; pspp-1.0.1/gl/safe-read.h0000644000175000017500000000343413124536243012025 00000000000000/* An interface to read() that retries after interrupts. Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Some system calls may be interrupted and fail with errno = EINTR in the following situations: - The process is stopped and restarted (signal SIGSTOP and SIGCONT, user types Ctrl-Z) on some platforms: Mac OS X. - The process receives a signal for which a signal handler was installed with sigaction() with an sa_flags field that does not contain SA_RESTART. - The process receives a signal for which a signal handler was installed with signal() and for which no call to siginterrupt(sig,0) was done, on some platforms: AIX, HP-UX, IRIX, OSF/1, Solaris. This module provides a wrapper around read() that handles EINTR. */ #include #ifdef __cplusplus extern "C" { #endif #define SAFE_READ_ERROR ((size_t) -1) /* Read up to COUNT bytes at BUF from descriptor FD, retrying if interrupted. Return the actual number of bytes read, zero for EOF, or SAFE_READ_ERROR upon error. */ extern size_t safe_read (int fd, void *buf, size_t count); #ifdef __cplusplus } #endif pspp-1.0.1/gl/xsize.h0000644000175000017500000000705613124536243011344 00000000000000/* xsize.h -- Checked size_t computations. Copyright (C) 2003, 2008-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _XSIZE_H #define _XSIZE_H /* Get size_t. */ #include /* Get SIZE_MAX. */ #include #if HAVE_STDINT_H # include #endif #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef XSIZE_INLINE # define XSIZE_INLINE _GL_INLINE #endif /* The size of memory objects is often computed through expressions of type size_t. Example: void* p = malloc (header_size + n * element_size). These computations can lead to overflow. When this happens, malloc() returns a piece of memory that is way too small, and the program then crashes while attempting to fill the memory. To avoid this, the functions and macros in this file check for overflow. The convention is that SIZE_MAX represents overflow. malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc implementation that uses mmap --, it's recommended to use size_overflow_p() or size_in_bounds_p() before invoking malloc(). The example thus becomes: size_t size = xsum (header_size, xtimes (n, element_size)); void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); */ /* Convert an arbitrary value >= 0 to type size_t. */ #define xcast_size_t(N) \ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) /* Sum of two sizes, with overflow check. */ XSIZE_INLINE size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum (size_t size1, size_t size2) { size_t sum = size1 + size2; return (sum >= size1 ? sum : SIZE_MAX); } /* Sum of three sizes, with overflow check. */ XSIZE_INLINE size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum3 (size_t size1, size_t size2, size_t size3) { return xsum (xsum (size1, size2), size3); } /* Sum of four sizes, with overflow check. */ XSIZE_INLINE size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) { return xsum (xsum (xsum (size1, size2), size3), size4); } /* Maximum of two sizes, with overflow check. */ XSIZE_INLINE size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xmax (size_t size1, size_t size2) { /* No explicit check is needed here, because for any n: max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ return (size1 >= size2 ? size1 : size2); } /* Multiplication of a count with an element size, with overflow check. The count must be >= 0 and the element size must be > 0. This is a macro, not a function, so that it works correctly even when N is of a wider type and N > SIZE_MAX. */ #define xtimes(N, ELSIZE) \ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) /* Check for overflow. */ #define size_overflow_p(SIZE) \ ((SIZE) == SIZE_MAX) /* Check against overflow. */ #define size_in_bounds_p(SIZE) \ ((SIZE) != SIZE_MAX) _GL_INLINE_HEADER_END #endif /* _XSIZE_H */ pspp-1.0.1/gl/fwriteerror.c0000644000175000017500000001216413124536242012542 00000000000000/* Detect write error on a stream. Copyright (C) 2003-2006, 2008-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 . */ #include /* Specification. */ #include "fwriteerror.h" #include #include static int do_fwriteerror (FILE *fp, bool ignore_ebadf) { /* State to allow multiple calls to fwriteerror (stdout). */ static bool stdout_closed = false; if (fp == stdout) { if (stdout_closed) return 0; /* If we are closing stdout, don't attempt to do it later again. */ stdout_closed = true; } /* This function returns an error indication if there was a previous failure or if fclose failed, with two exceptions: - Ignore an fclose failure if there was no previous error, no data remains to be flushed, and fclose failed with EBADF. That can happen when a program like cp is invoked like this 'cp a b >&-' (i.e., with standard output closed) and doesn't generate any output (hence no previous error and nothing to be flushed). - Ignore an fclose failure due to EPIPE. That can happen when a program blocks or ignores SIGPIPE, and the output pipe or socket has no readers now. The EPIPE tells us that we should stop writing to this output. That's what we are doing anyway here. Need to 1. test the error indicator of the stream, 2. flush the buffers both in userland and in the kernel, through fclose, testing for error again. */ /* Clear errno, so that on non-POSIX systems the caller doesn't see a wrong value of errno when we return -1. */ errno = 0; if (ferror (fp)) { if (fflush (fp)) goto close_preserving_errno; /* errno is set here */ /* The stream had an error earlier, but its errno was lost. If the error was not temporary, we can get the same errno by writing and flushing one more byte. We can do so because at this point the stream's contents is garbage anyway. */ if (fputc ('\0', fp) == EOF) goto close_preserving_errno; /* errno is set here */ if (fflush (fp)) goto close_preserving_errno; /* errno is set here */ /* Give up on errno. */ errno = 0; goto close_preserving_errno; } if (ignore_ebadf) { /* We need an explicit fflush to tell whether some output was already done on FP. */ if (fflush (fp)) goto close_preserving_errno; /* errno is set here */ if (fclose (fp) && errno != EBADF) goto got_errno; /* errno is set here */ } else { if (fclose (fp)) goto got_errno; /* errno is set here */ } return 0; close_preserving_errno: /* There's an error. Nevertheless call fclose(fp), for consistency with the other cases. */ { int saved_errno = errno; fclose (fp); errno = saved_errno; } got_errno: /* There's an error. Ignore EPIPE. */ if (errno == EPIPE) return 0; else return -1; } int fwriteerror (FILE *fp) { return do_fwriteerror (fp, false); } int fwriteerror_no_ebadf (FILE *fp) { return do_fwriteerror (fp, true); } #if TEST /* Name of a file on which writing fails. On systems without /dev/full, you can choose a filename on a full file system. */ #define UNWRITABLE_FILE "/dev/full" int main () { static int sizes[] = { 511, 512, 513, 1023, 1024, 1025, 2047, 2048, 2049, 4095, 4096, 4097, 8191, 8192, 8193 }; static char dummy[8193]; unsigned int i, j; for (i = 0; i < sizeof (sizes) / sizeof (sizes[0]); i++) { size_t size = sizes[i]; for (j = 0; j < 2; j++) { /* Run a test depending on i and j: Write size bytes and then calls fflush if j==1. */ FILE *stream = fopen (UNWRITABLE_FILE, "w"); if (stream == NULL) { fprintf (stderr, "Test %u:%u: could not open file\n", i, j); continue; } fwrite (dummy, 347, 1, stream); fwrite (dummy, size - 347, 1, stream); if (j) fflush (stream); if (fwriteerror (stream) == -1) { if (errno != ENOSPC) fprintf (stderr, "Test %u:%u: fwriteerror ok, errno = %d\n", i, j, errno); } else fprintf (stderr, "Test %u:%u: fwriteerror found no error!\n", i, j); } } return 0; } #endif pspp-1.0.1/gl/limits.in.h0000644000175000017500000000605013124536241012077 00000000000000/* A GNU-like . Copyright 2016-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _@GUARD_PREFIX@_LIMITS_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_LIMITS_H@ #ifndef _@GUARD_PREFIX@_LIMITS_H #define _@GUARD_PREFIX@_LIMITS_H /* For HP-UX 11.31. */ #if defined LONG_LONG_MIN && !defined LLONG_MIN # define LLONG_MIN LONG_LONG_MIN #endif #if defined LONG_LONG_MAX && !defined LLONG_MAX # define LLONG_MAX LONG_LONG_MAX #endif #if defined ULONG_LONG_MAX && !defined ULLONG_MAX # define ULLONG_MAX ULONG_LONG_MAX #endif /* The number of usable bits in an unsigned or signed integer type with minimum value MIN and maximum value MAX, as an int expression suitable in #if. Cover all known practical hosts. This implementation exploits the fact that MAX is 1 less than a power of 2, and merely counts the number of 1 bits in MAX; "COBn" means "count the number of 1 bits in the low-order n bits"). */ #define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max)) #define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n)) #define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n)) #define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n)) #define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n)) #define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n)) #define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1)) /* Macros specified by ISO/IEC TS 18661-1:2014. */ #if (! defined ULLONG_WIDTH \ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) # define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) # define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) # define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) # define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX) # define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX) # define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX) # define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX) # define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX) # define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) # define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) #endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ #endif /* _@GUARD_PREFIX@_LIMITS_H */ #endif /* _@GUARD_PREFIX@_LIMITS_H */ pspp-1.0.1/gl/read.c0000644000175000017500000000425513124536243011106 00000000000000/* POSIX compatible read() function. Copyright (C) 2008-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2011. 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 . */ #include /* Specification. */ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # include # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # if HAVE_MSVC_INVALID_PARAMETER_HANDLER # include "msvc-inval.h" # endif # if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" # else # include # endif # undef read # if HAVE_MSVC_INVALID_PARAMETER_HANDLER static ssize_t read_nothrow (int fd, void *buf, size_t count) { ssize_t result; TRY_MSVC_INVAL { result = read (fd, buf, count); } CATCH_MSVC_INVAL { result = -1; errno = EBADF; } DONE_MSVC_INVAL; return result; } # else # define read_nothrow read # endif ssize_t rpl_read (int fd, void *buf, size_t count) { ssize_t ret = read_nothrow (fd, buf, count); # if GNULIB_NONBLOCKING if (ret < 0 && GetLastError () == ERROR_NO_DATA) { HANDLE h = (HANDLE) _get_osfhandle (fd); if (GetFileType (h) == FILE_TYPE_PIPE) { /* h is a pipe or socket. */ DWORD state; if (GetNamedPipeHandleState (h, &state, NULL, NULL, NULL, NULL, 0) && (state & PIPE_NOWAIT) != 0) /* h is a pipe in non-blocking mode. Change errno from EINVAL to EAGAIN. */ errno = EAGAIN; } } # endif return ret; } #endif pspp-1.0.1/gl/binary-io.c0000644000175000017500000000177613124536241012067 00000000000000/* Binary mode I/O. Copyright 2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #define BINARY_IO_INLINE _GL_EXTERN_INLINE #include "binary-io.h" #if defined __DJGPP__ || defined __EMX__ # include # include int __gl_setmode_check (int fd) { if (isatty (fd)) { errno = EINVAL; return -1; } else return 0; } #endif pspp-1.0.1/gl/getopt-cdefs.in.h0000644000175000017500000000375213124536241013170 00000000000000/* getopt-on-non-glibc compatibility macros. Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. gnulib is free software; you can 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. gnulib is distributed in the hope that 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 gnulib; if not, see . */ #ifndef _GETOPT_CDEFS_H #define _GETOPT_CDEFS_H 1 /* This header should not be used directly; include getopt.h or unistd.h instead. It does not have a protective #error, because the guard macro for getopt.h in gnulib is not fixed. */ /* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect a number of the internal macros supplied to GNU libc's headers by sys/cdefs.h. Provide fallback definitions for all of them. */ #if @HAVE_SYS_CDEFS_H@ # include #endif #ifndef __BEGIN_DECLS # ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # else # define __BEGIN_DECLS /* nothing */ # endif #endif #ifndef __END_DECLS # ifdef __cplusplus # define __END_DECLS } # else # define __END_DECLS /* nothing */ # endif #endif #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_VERSION__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # else # define __GNUC_PREREQ(maj, min) 0 # endif #endif #ifndef __THROW # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW # endif #endif #endif /* _GETOPT_CDEFS_H */ pspp-1.0.1/gl/getopt-ext.h0000644000175000017500000000572313124536241012277 00000000000000/* Declarations for getopt (GNU extensions). Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ #ifndef _GETOPT_EXT_H #define _GETOPT_EXT_H 1 /* This header should not be used directly; include getopt.h instead. Unlike most bits headers, it does not have a protective #error, because the guard macro for getopt.h in gnulib is not fixed. */ __BEGIN_DECLS /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of 'struct option' terminated by an element containing a name which is zero. The field 'has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field 'flag' is not NULL, it points to a variable that is set to the value given in the field 'val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an 'int' to a compiled-in constant, such as set a value from 'optarg', set the option's 'flag' field to zero and its 'val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero 'flag' field, 'getopt' returns the contents of the 'val' field. */ struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the 'has_arg' field of 'struct option'. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); __END_DECLS #endif /* _GETOPT_EXT_H */ pspp-1.0.1/gl/string.in.h0000644000175000017500000011734413124536243012117 00000000000000/* A GNU-like . Copyright (C) 1995-1996, 2001-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined _GL_ALREADY_INCLUDING_STRING_H /* Special invocation convention: - On OS X/NetBSD we have a sequence of nested includes -> -> "string.h" In this situation system _chk variants due to -D_FORTIFY_SOURCE might be used after any replacements defined here. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_STRING_H #define _GL_ALREADY_INCLUDING_STRING_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ #undef _GL_ALREADY_INCLUDING_STRING_H #ifndef _@GUARD_PREFIX@_STRING_H #define _@GUARD_PREFIX@_STRING_H /* NetBSD 5.0 mis-defines NULL. */ #include /* MirBSD defines mbslen as a macro. */ #if @GNULIB_MBSLEN@ && defined __MirBSD__ # include #endif /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* NetBSD 5.0 declares strsignal in , not in . */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ && ! defined __GLIBC__ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Find the index of the least-significant set bit. */ #if @GNULIB_FFSL@ # if !@HAVE_FFSL@ _GL_FUNCDECL_SYS (ffsl, int, (long int i)); # endif _GL_CXXALIAS_SYS (ffsl, int, (long int i)); _GL_CXXALIASWARN (ffsl); #elif defined GNULIB_POSIXCHECK # undef ffsl # if HAVE_RAW_DECL_FFSL _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); # endif #endif /* Find the index of the least-significant set bit. */ #if @GNULIB_FFSLL@ # if !@HAVE_FFSLL@ _GL_FUNCDECL_SYS (ffsll, int, (long long int i)); # endif _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); _GL_CXXALIASWARN (ffsll); #elif defined GNULIB_POSIXCHECK # undef ffsll # if HAVE_RAW_DECL_FFSLL _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); # endif #endif /* Return the first instance of C within N bytes of S, or NULL. */ #if @GNULIB_MEMCHR@ # if @REPLACE_MEMCHR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define memchr rpl_memchr # endif _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); # else # if ! @HAVE_MEMCHR@ _GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C" { const void * std::memchr (const void *, int, size_t); } extern "C++" { void * std::memchr (void *, int, size_t); } */ _GL_CXXALIAS_SYS_CAST2 (memchr, void *, (void const *__s, int __c, size_t __n), void const *, (void const *__s, int __c, size_t __n)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); _GL_CXXALIASWARN1 (memchr, void const *, (void const *__s, int __c, size_t __n)); # else _GL_CXXALIASWARN (memchr); # endif #elif defined GNULIB_POSIXCHECK # undef memchr /* Assume memchr is always declared. */ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " "use gnulib module memchr for portability" ); #endif /* Return the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_MEMMEM@ # if @REPLACE_MEMMEM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define memmem rpl_memmem # endif _GL_FUNCDECL_RPL (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 3))); _GL_CXXALIAS_RPL (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len)); # else # if ! @HAVE_DECL_MEMMEM@ _GL_FUNCDECL_SYS (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 3))); # endif _GL_CXXALIAS_SYS (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len)); # endif _GL_CXXALIASWARN (memmem); #elif defined GNULIB_POSIXCHECK # undef memmem # if HAVE_RAW_DECL_MEMMEM _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " "use gnulib module memmem-simple for portability, " "and module memmem for speed" ); # endif #endif /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ #if @GNULIB_MEMPCPY@ # if ! @HAVE_MEMPCPY@ _GL_FUNCDECL_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n)); _GL_CXXALIASWARN (mempcpy); #elif defined GNULIB_POSIXCHECK # undef mempcpy # if HAVE_RAW_DECL_MEMPCPY _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " "use gnulib module mempcpy for portability"); # endif #endif /* Search backwards through a block for a byte (specified as an int). */ #if @GNULIB_MEMRCHR@ # if ! @HAVE_DECL_MEMRCHR@ _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const void * std::memrchr (const void *, int, size_t); } extern "C++" { void * std::memrchr (void *, int, size_t); } */ _GL_CXXALIAS_SYS_CAST2 (memrchr, void *, (void const *, int, size_t), void const *, (void const *, int, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); # else _GL_CXXALIASWARN (memrchr); # endif #elif defined GNULIB_POSIXCHECK # undef memrchr # if HAVE_RAW_DECL_MEMRCHR _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " "use gnulib module memrchr for portability"); # endif #endif /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ #if @GNULIB_RAWMEMCHR@ # if ! @HAVE_RAWMEMCHR@ _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const void * std::rawmemchr (const void *, int); } extern "C++" { void * std::rawmemchr (void *, int); } */ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, void *, (void const *__s, int __c_in), void const *, (void const *__s, int __c_in)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); _GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); # else _GL_CXXALIASWARN (rawmemchr); # endif #elif defined GNULIB_POSIXCHECK # undef rawmemchr # if HAVE_RAW_DECL_RAWMEMCHR _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " "use gnulib module rawmemchr for portability"); # endif #endif /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if @GNULIB_STPCPY@ # if ! @HAVE_STPCPY@ _GL_FUNCDECL_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src)); _GL_CXXALIASWARN (stpcpy); #elif defined GNULIB_POSIXCHECK # undef stpcpy # if HAVE_RAW_DECL_STPCPY _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " "use gnulib module stpcpy for portability"); # endif #endif /* Copy no more than N bytes of SRC to DST, returning a pointer past the last non-NUL byte written into DST. */ #if @GNULIB_STPNCPY@ # if @REPLACE_STPNCPY@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef stpncpy # define stpncpy rpl_stpncpy # endif _GL_FUNCDECL_RPL (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # else # if ! @HAVE_STPNCPY@ _GL_FUNCDECL_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # endif _GL_CXXALIASWARN (stpncpy); #elif defined GNULIB_POSIXCHECK # undef stpncpy # if HAVE_RAW_DECL_STPNCPY _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " "use gnulib module stpncpy for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strchr /* Assume strchr is always declared. */ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " "in some multibyte locales - " "use mbschr if you care about internationalization"); #endif /* Find the first occurrence of C in S or the final NUL byte. */ #if @GNULIB_STRCHRNUL@ # if @REPLACE_STRCHRNUL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strchrnul rpl_strchrnul # endif _GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strchrnul, char *, (const char *str, int ch)); # else # if ! @HAVE_STRCHRNUL@ _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * std::strchrnul (const char *, int); } extern "C++" { char * std::strchrnul (char *, int); } */ _GL_CXXALIAS_SYS_CAST2 (strchrnul, char *, (char const *__s, int __c_in), char const *, (char const *__s, int __c_in)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); _GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); # else _GL_CXXALIASWARN (strchrnul); # endif #elif defined GNULIB_POSIXCHECK # undef strchrnul # if HAVE_RAW_DECL_STRCHRNUL _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " "use gnulib module strchrnul for portability"); # endif #endif /* Duplicate S, returning an identical malloc'd string. */ #if @GNULIB_STRDUP@ # if @REPLACE_STRDUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strdup # define strdup rpl_strdup # endif _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup /* strdup exists as a function and as a macro. Get rid of the macro. */ # undef strdup # endif # if !(@HAVE_DECL_STRDUP@ || defined strdup) _GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); # endif _GL_CXXALIASWARN (strdup); #elif defined GNULIB_POSIXCHECK # undef strdup # if HAVE_RAW_DECL_STRDUP _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); # endif #endif /* Append no more than N characters from SRC onto DEST. */ #if @GNULIB_STRNCAT@ # if @REPLACE_STRNCAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strncat # define strncat rpl_strncat # endif _GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); # else _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); # endif _GL_CXXALIASWARN (strncat); #elif defined GNULIB_POSIXCHECK # undef strncat # if HAVE_RAW_DECL_STRNCAT _GL_WARN_ON_USE (strncat, "strncat is unportable - " "use gnulib module strncat for portability"); # endif #endif /* Return a newly allocated copy of at most N bytes of STRING. */ #if @GNULIB_STRNDUP@ # if @REPLACE_STRNDUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strndup # define strndup rpl_strndup # endif _GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); # else # if ! @HAVE_DECL_STRNDUP@ _GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); # endif _GL_CXXALIASWARN (strndup); #elif defined GNULIB_POSIXCHECK # undef strndup # if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); # endif #endif /* Find the length (number of bytes) of STRING, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many bytes, return MAXLEN. */ #if @GNULIB_STRNLEN@ # if @REPLACE_STRNLEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strnlen # define strnlen rpl_strnlen # endif _GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)); # else # if ! @HAVE_DECL_STRNLEN@ _GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)); # endif _GL_CXXALIASWARN (strnlen); #elif defined GNULIB_POSIXCHECK # undef strnlen # if HAVE_RAW_DECL_STRNLEN _GL_WARN_ON_USE (strnlen, "strnlen is unportable - " "use gnulib module strnlen for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strcspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strcspn /* Assume strcspn is always declared. */ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " "in multibyte locales - " "use mbscspn if you care about internationalization"); #endif /* Find the first occurrence in S of any character in ACCEPT. */ #if @GNULIB_STRPBRK@ # if ! @HAVE_STRPBRK@ _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); # endif /* On some systems, this function is defined as an overloaded function: extern "C" { const char * strpbrk (const char *, const char *); } extern "C++" { char * strpbrk (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strpbrk, char *, (char const *__s, char const *__accept), const char *, (char const *__s, char const *__accept)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); _GL_CXXALIASWARN1 (strpbrk, char const *, (char const *__s, char const *__accept)); # else _GL_CXXALIASWARN (strpbrk); # endif # if defined GNULIB_POSIXCHECK /* strpbrk() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk _GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " "in multibyte locales - " "use mbspbrk if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strpbrk # if HAVE_RAW_DECL_STRPBRK _GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " "use gnulib module strpbrk for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it cannot work with multibyte strings. */ # undef strspn /* Assume strspn is always declared. */ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " "in multibyte locales - " "use mbsspn if you care about internationalization"); #endif #if defined GNULIB_POSIXCHECK /* strrchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strrchr /* Assume strrchr is always declared. */ _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " "in some multibyte locales - " "use mbsrchr if you care about internationalization"); #endif /* Search the next delimiter (char listed in DELIM) starting at *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next char after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of strtok() that is multithread-safe and supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strtok_r(). */ #if @GNULIB_STRSEP@ # if ! @HAVE_STRSEP@ _GL_FUNCDECL_SYS (strsep, char *, (char **restrict __stringp, char const *restrict __delim) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (strsep, char *, (char **restrict __stringp, char const *restrict __delim)); _GL_CXXALIASWARN (strsep); # if defined GNULIB_POSIXCHECK # undef strsep _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " "in multibyte locales - " "use mbssep if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strsep # if HAVE_RAW_DECL_STRSEP _GL_WARN_ON_USE (strsep, "strsep is unportable - " "use gnulib module strsep for portability"); # endif #endif #if @GNULIB_STRSTR@ # if @REPLACE_STRSTR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strstr rpl_strstr # endif _GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); # else /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * strstr (const char *, const char *); } extern "C++" { char * strstr (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strstr, char *, (const char *haystack, const char *needle), const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strstr, const char *, (const char *haystack, const char *needle)); # else _GL_CXXALIASWARN (strstr); # endif #elif defined GNULIB_POSIXCHECK /* strstr() does not work with multibyte strings if the locale encoding is different from UTF-8: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strstr /* Assume strstr is always declared. */ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " "work correctly on character strings in most " "multibyte locales - " "use mbsstr if you care about internationalization, " "or use strstr if you care about speed"); #endif /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. */ #if @GNULIB_STRCASESTR@ # if @REPLACE_STRCASESTR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strcasestr rpl_strcasestr # endif _GL_FUNCDECL_RPL (strcasestr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strcasestr, char *, (const char *haystack, const char *needle)); # else # if ! @HAVE_STRCASESTR@ _GL_FUNCDECL_SYS (strcasestr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * strcasestr (const char *, const char *); } extern "C++" { char * strcasestr (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strcasestr, char *, (const char *haystack, const char *needle), const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strcasestr, const char *, (const char *haystack, const char *needle)); # else _GL_CXXALIASWARN (strcasestr); # endif #elif defined GNULIB_POSIXCHECK /* strcasestr() does not work with multibyte strings: It is a glibc extension, and glibc implements it only for unibyte locales. */ # undef strcasestr # if HAVE_RAW_DECL_STRCASESTR _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " "strings in multibyte locales - " "use mbscasestr if you care about " "internationalization, or use c-strcasestr if you want " "a locale independent function"); # endif #endif /* Parse S into tokens separated by characters in DELIM. If S is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = strtok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" This is a variant of strtok() that is multithread-safe. For the POSIX documentation for this function, see: http://www.opengroup.org/susv3xsh/strtok.html Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strsep(). */ #if @GNULIB_STRTOK_R@ # if @REPLACE_STRTOK_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strtok_r # define strtok_r rpl_strtok_r # endif _GL_FUNCDECL_RPL (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr)); # else # if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK # undef strtok_r # endif # if ! @HAVE_DECL_STRTOK_R@ _GL_FUNCDECL_SYS (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr)); # endif _GL_CXXALIASWARN (strtok_r); # if defined GNULIB_POSIXCHECK _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " "strings in multibyte locales - " "use mbstok_r if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strtok_r # if HAVE_RAW_DECL_STRTOK_R _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " "use gnulib module strtok_r for portability"); # endif #endif /* The following functions are not specified by POSIX. They are gnulib extensions. */ #if @GNULIB_MBSLEN@ /* Return the number of multibyte characters in the character string STRING. This considers multibyte characters, unlike strlen, which counts bytes. */ # ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ # undef mbslen # endif # if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbslen rpl_mbslen # endif _GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); # else _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); # endif _GL_CXXALIASWARN (mbslen); #endif #if @GNULIB_MBSNLEN@ /* Return the number of multibyte characters in the character string starting at STRING and ending at STRING + LEN. */ _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSCHR@ /* Locate the first single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # if defined __hpux # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbschr rpl_mbschr /* avoid collision with HP-UX function */ # endif _GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); # else _GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); # endif _GL_CXXALIASWARN (mbschr); #endif #if @GNULIB_MBSRCHR@ /* Locate the last single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strrchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # if defined __hpux || defined __INTERIX # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbsrchr rpl_mbsrchr /* avoid collision with system function */ # endif _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); # else _GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); # endif _GL_CXXALIASWARN (mbsrchr); #endif #if @GNULIB_MBSSTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. Unlike strstr(), this function works correctly in multibyte locales with encodings different from UTF-8. */ _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASECMP@ /* Compare the character strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function may, in multibyte locales, return 0 for strings of different lengths! Unlike strcasecmp(), this function works correctly in multibyte locales. */ _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSNCASECMP@ /* Compare the initial segment of the character string S1 consisting of at most N characters with the initial segment of the character string S2 consisting of at most N characters, ignoring case, returning less than, equal to or greater than zero if the initial segment of S1 is lexicographically less than, equal to or greater than the initial segment of S2. Note: This function may, in multibyte locales, return 0 for initial segments of different lengths! Unlike strncasecmp(), this function works correctly in multibyte locales. But beware that N is not a byte count but a character count! */ _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPCASECMP@ /* Compare the initial segment of the character string STRING consisting of at most mbslen (PREFIX) characters with the character string PREFIX, ignoring case. If the two match, return a pointer to the first byte after this prefix in STRING. Otherwise, return NULL. Note: This function may, in multibyte locales, return non-NULL if STRING is of smaller length than PREFIX! Unlike strncasecmp(), this function works correctly in multibyte locales. */ _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASESTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK, using case-insensitive comparison. Note: This function may, in multibyte locales, return success even if strlen (haystack) < strlen (needle) ! Unlike strcasestr(), this function works correctly in multibyte locales. */ _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCSPN@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strcspn(), this function works correctly in multibyte locales. */ _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPBRK@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the pointer to it, or NULL if none exists. Unlike strpbrk(), this function works correctly in multibyte locales. */ # if defined __hpux # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ # endif _GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); # else _GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); # endif _GL_CXXALIASWARN (mbspbrk); #endif #if @GNULIB_MBSSPN@ /* Find the first occurrence in the character string STRING of any character not in the character string REJECT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strspn(), this function works correctly in multibyte locales. */ _GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSSEP@ /* Search the next delimiter (multibyte character listed in the character string DELIM) starting at the character string *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next multibyte character after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of mbstok_r() that supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbstok_r(). */ _GL_EXTERN_C char * mbssep (char **stringp, const char *delim) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSTOK_R@ /* Parse the character string STRING into tokens separated by characters in the character string DELIM. If STRING is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = mbstok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbssep(). */ _GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr) _GL_ARG_NONNULL ((2, 3)); #endif /* Map any int, typically from errno, into an error message. */ #if @GNULIB_STRERROR@ # if @REPLACE_STRERROR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strerror # define strerror rpl_strerror # endif _GL_FUNCDECL_RPL (strerror, char *, (int)); _GL_CXXALIAS_RPL (strerror, char *, (int)); # else _GL_CXXALIAS_SYS (strerror, char *, (int)); # endif _GL_CXXALIASWARN (strerror); #elif defined GNULIB_POSIXCHECK # undef strerror /* Assume strerror is always declared. */ _GL_WARN_ON_USE (strerror, "strerror is unportable - " "use gnulib module strerror to guarantee non-NULL result"); #endif /* Map any int, typically from errno, into an error message. Multithread-safe. Uses the POSIX declaration, not the glibc declaration. */ #if @GNULIB_STRERROR_R@ # if @REPLACE_STRERROR_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strerror_r # define strerror_r rpl_strerror_r # endif _GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); # else # if !@HAVE_DECL_STRERROR_R@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); # endif # if @HAVE_DECL_STRERROR_R@ _GL_CXXALIASWARN (strerror_r); # endif #elif defined GNULIB_POSIXCHECK # undef strerror_r # if HAVE_RAW_DECL_STRERROR_R _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " "use gnulib module strerror_r-posix for portability"); # endif #endif #if @GNULIB_STRSIGNAL@ # if @REPLACE_STRSIGNAL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strsignal rpl_strsignal # endif _GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); _GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); # else # if ! @HAVE_DECL_STRSIGNAL@ _GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); # endif /* Need to cast, because on Cygwin 1.5.x systems, the return type is 'const char *'. */ _GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); # endif _GL_CXXALIASWARN (strsignal); #elif defined GNULIB_POSIXCHECK # undef strsignal # if HAVE_RAW_DECL_STRSIGNAL _GL_WARN_ON_USE (strsignal, "strsignal is unportable - " "use gnulib module strsignal for portability"); # endif #endif #if @GNULIB_STRVERSCMP@ # if !@HAVE_STRVERSCMP@ _GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); _GL_CXXALIASWARN (strverscmp); #elif defined GNULIB_POSIXCHECK # undef strverscmp # if HAVE_RAW_DECL_STRVERSCMP _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " "use gnulib module strverscmp for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_STRING_H */ #endif /* _@GUARD_PREFIX@_STRING_H */ #endif pspp-1.0.1/gl/nl_langinfo.c0000644000175000017500000002201713124536242012454 00000000000000/* nl_langinfo() replacement: query locale dependent information. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include #include #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # include #endif /* Return the codeset of the current locale, if this is easily deducible. Otherwise, return "". */ static char * ctype_codeset (void) { static char buf[2 + 10 + 1]; char const *locale = setlocale (LC_CTYPE, NULL); char *codeset = buf; size_t codesetlen; codeset[0] = '\0'; if (locale && locale[0]) { /* If the locale name contains an encoding after the dot, return it. */ char *dot = strchr (locale, '.'); if (dot) { /* Look for the possible @... trailer and remove it, if any. */ char *codeset_start = dot + 1; char const *modifier = strchr (codeset_start, '@'); if (! modifier) codeset = codeset_start; else { codesetlen = modifier - codeset_start; if (codesetlen < sizeof buf) { codeset = memcpy (buf, codeset_start, codesetlen); codeset[codesetlen] = '\0'; } } } } #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* If setlocale is successful, it returns the number of the codepage, as a string. Otherwise, fall back on Windows API GetACP, which returns the locale's codepage as a number (although this doesn't change according to what the 'setlocale' call specified). Either way, prepend "CP" to make it a valid codeset name. */ codesetlen = strlen (codeset); if (0 < codesetlen && codesetlen < sizeof buf - 2) memmove (buf + 2, codeset, codesetlen + 1); else sprintf (buf + 2, "%u", GetACP ()); codeset = memcpy (buf, "CP", 2); #endif return codeset; } #if REPLACE_NL_LANGINFO /* Override nl_langinfo with support for added nl_item values. */ # undef nl_langinfo char * rpl_nl_langinfo (nl_item item) { switch (item) { # if GNULIB_defined_CODESET case CODESET: return ctype_codeset (); # endif # if GNULIB_defined_T_FMT_AMPM case T_FMT_AMPM: return (char *) "%I:%M:%S %p"; # endif # if GNULIB_defined_ERA case ERA: /* The format is not standardized. In glibc it is a sequence of strings of the form "direction:offset:start_date:end_date:era_name:era_format" with an empty string at the end. */ return (char *) ""; case ERA_D_FMT: /* The %Ex conversion in strftime behaves like %x if the locale does not have an alternative time format. */ item = D_FMT; break; case ERA_D_T_FMT: /* The %Ec conversion in strftime behaves like %c if the locale does not have an alternative time format. */ item = D_T_FMT; break; case ERA_T_FMT: /* The %EX conversion in strftime behaves like %X if the locale does not have an alternative time format. */ item = T_FMT; break; case ALT_DIGITS: /* The format is not standardized. In glibc it is a sequence of 10 strings, appended in memory. */ return (char *) "\0\0\0\0\0\0\0\0\0\0"; # endif # if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS case YESEXPR: return (char *) "^[yY]"; case NOEXPR: return (char *) "^[nN]"; # endif default: break; } return nl_langinfo (item); } #else /* Provide nl_langinfo from scratch, either for native MS-Windows, or for old Unix platforms without locales, such as Linux libc5 or BeOS. */ # include char * nl_langinfo (nl_item item) { static char nlbuf[100]; struct tm tmm = { 0 }; switch (item) { /* nl_langinfo items of the LC_CTYPE category */ case CODESET: { char *codeset = ctype_codeset (); if (*codeset) return codeset; } # ifdef __BEOS__ return (char *) "UTF-8"; # else return (char *) "ISO-8859-1"; # endif /* nl_langinfo items of the LC_NUMERIC category */ case RADIXCHAR: return localeconv () ->decimal_point; case THOUSEP: return localeconv () ->thousands_sep; case GROUPING: return localeconv () ->grouping; /* nl_langinfo items of the LC_TIME category. TODO: Really use the locale. */ case D_T_FMT: case ERA_D_T_FMT: return (char *) "%a %b %e %H:%M:%S %Y"; case D_FMT: case ERA_D_FMT: return (char *) "%m/%d/%y"; case T_FMT: case ERA_T_FMT: return (char *) "%H:%M:%S"; case T_FMT_AMPM: return (char *) "%I:%M:%S %p"; case AM_STR: if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm)) return (char *) "AM"; return nlbuf; case PM_STR: tmm.tm_hour = 12; if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm)) return (char *) "PM"; return nlbuf; case DAY_1: case DAY_2: case DAY_3: case DAY_4: case DAY_5: case DAY_6: case DAY_7: { static char const days[][sizeof "Wednesday"] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; tmm.tm_wday = item - DAY_1; if (!strftime (nlbuf, sizeof nlbuf, "%A", &tmm)) return (char *) days[item - DAY_1]; return nlbuf; } case ABDAY_1: case ABDAY_2: case ABDAY_3: case ABDAY_4: case ABDAY_5: case ABDAY_6: case ABDAY_7: { static char const abdays[][sizeof "Sun"] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; tmm.tm_wday = item - ABDAY_1; if (!strftime (nlbuf, sizeof nlbuf, "%a", &tmm)) return (char *) abdays[item - ABDAY_1]; return nlbuf; } case MON_1: case MON_2: case MON_3: case MON_4: case MON_5: case MON_6: case MON_7: case MON_8: case MON_9: case MON_10: case MON_11: case MON_12: { static char const months[][sizeof "September"] = { "January", "February", "March", "April", "May", "June", "July", "September", "October", "November", "December" }; tmm.tm_mon = item - MON_1; if (!strftime (nlbuf, sizeof nlbuf, "%B", &tmm)) return (char *) months[item - MON_1]; return nlbuf; } case ABMON_1: case ABMON_2: case ABMON_3: case ABMON_4: case ABMON_5: case ABMON_6: case ABMON_7: case ABMON_8: case ABMON_9: case ABMON_10: case ABMON_11: case ABMON_12: { static char const abmonths[][sizeof "Jan"] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Sep", "Oct", "Nov", "Dec" }; tmm.tm_mon = item - ABMON_1; if (!strftime (nlbuf, sizeof nlbuf, "%b", &tmm)) return (char *) abmonths[item - ABMON_1]; return nlbuf; } case ERA: return (char *) ""; case ALT_DIGITS: return (char *) "\0\0\0\0\0\0\0\0\0\0"; /* nl_langinfo items of the LC_MONETARY category. */ case CRNCYSTR: return localeconv () ->currency_symbol; case INT_CURR_SYMBOL: return localeconv () ->int_curr_symbol; case MON_DECIMAL_POINT: return localeconv () ->mon_decimal_point; case MON_THOUSANDS_SEP: return localeconv () ->mon_thousands_sep; case MON_GROUPING: return localeconv () ->mon_grouping; case POSITIVE_SIGN: return localeconv () ->positive_sign; case NEGATIVE_SIGN: return localeconv () ->negative_sign; case FRAC_DIGITS: return & localeconv () ->frac_digits; case INT_FRAC_DIGITS: return & localeconv () ->int_frac_digits; case P_CS_PRECEDES: return & localeconv () ->p_cs_precedes; case N_CS_PRECEDES: return & localeconv () ->n_cs_precedes; case P_SEP_BY_SPACE: return & localeconv () ->p_sep_by_space; case N_SEP_BY_SPACE: return & localeconv () ->n_sep_by_space; case P_SIGN_POSN: return & localeconv () ->p_sign_posn; case N_SIGN_POSN: return & localeconv () ->n_sign_posn; /* nl_langinfo items of the LC_MESSAGES category TODO: Really use the locale. */ case YESEXPR: return (char *) "^[yY]"; case NOEXPR: return (char *) "^[nN]"; default: return (char *) ""; } } #endif pspp-1.0.1/gl/gl_anyhash_list2.h0000644000175000017500000001411513124536242013425 00000000000000/* Sequential list data type implemented by a hash table with another list. Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 . */ /* Common code of gl_linkedhash_list.c, gl_avltreehash_list.c, gl_rbtreehash_list.c. */ /* Array of primes, approximately in steps of factor 1.2. This table was computed by executing the Common Lisp expression (dotimes (i 244) (format t "nextprime(~D)~%" (ceiling (expt 1.2d0 i)))) and feeding the result to PARI/gp. */ static const size_t primes[] = { 11, 13, 17, 19, 23, 29, 37, 41, 47, 59, 67, 83, 97, 127, 139, 167, 199, 239, 293, 347, 419, 499, 593, 709, 853, 1021, 1229, 1471, 1777, 2129, 2543, 3049, 3659, 4391, 5273, 6323, 7589, 9103, 10937, 13109, 15727, 18899, 22651, 27179, 32609, 39133, 46957, 56359, 67619, 81157, 97369, 116849, 140221, 168253, 201907, 242309, 290761, 348889, 418667, 502409, 602887, 723467, 868151, 1041779, 1250141, 1500181, 1800191, 2160233, 2592277, 3110741, 3732887, 4479463, 5375371, 6450413, 7740517, 9288589, 11146307, 13375573, 16050689, 19260817, 23112977, 27735583, 33282701, 39939233, 47927081, 57512503, 69014987, 82818011, 99381577, 119257891, 143109469, 171731387, 206077643, 247293161, 296751781, 356102141, 427322587, 512787097, 615344489, 738413383, 886096061, 1063315271, 1275978331, 1531174013, 1837408799, 2204890543UL, 2645868653UL, 3175042391UL, 3810050851UL, #if SIZE_MAX > 4294967295UL 4572061027UL, 5486473229UL, 6583767889UL, 7900521449UL, 9480625733UL, 11376750877UL, 13652101063UL, 16382521261UL, 19659025513UL, 23590830631UL, 28308996763UL, 33970796089UL, 40764955463UL, 48917946377UL, 58701535657UL, 70441842749UL, 84530211301UL, 101436253561UL, 121723504277UL, 146068205131UL, 175281846149UL, 210338215379UL, 252405858521UL, 302887030151UL, 363464436191UL, 436157323417UL, 523388788231UL, 628066545713UL, 753679854847UL, 904415825857UL, 1085298991109UL, 1302358789181UL, 1562830547009UL, 1875396656429UL, 2250475987709UL, 2700571185239UL, 3240685422287UL, 3888822506759UL, 4666587008147UL, 5599904409713UL, 6719885291641UL, 8063862349969UL, 9676634819959UL, 11611961783951UL, 13934354140769UL, 16721224968907UL, 20065469962669UL, 24078563955191UL, 28894276746229UL, 34673132095507UL, 41607758514593UL, 49929310217531UL, 59915172260971UL, 71898206713183UL, 86277848055823UL, 103533417666967UL, 124240101200359UL, 149088121440451UL, 178905745728529UL, 214686894874223UL, 257624273849081UL, 309149128618903UL, 370978954342639UL, 445174745211143UL, 534209694253381UL, 641051633104063UL, 769261959724877UL, 923114351670013UL, 1107737222003791UL, 1329284666404567UL, 1595141599685509UL, 1914169919622551UL, 2297003903547091UL, 2756404684256459UL, 3307685621107757UL, 3969222745329323UL, 4763067294395177UL, 5715680753274209UL, 6858816903929113UL, 8230580284714831UL, 9876696341657791UL, 11852035609989371UL, 14222442731987227UL, 17066931278384657UL, 20480317534061597UL, 24576381040873903UL, 29491657249048679UL, 35389988698858471UL, 42467986438630267UL, 50961583726356109UL, 61153900471627387UL, 73384680565952851UL, 88061616679143347UL, 105673940014972061UL, 126808728017966413UL, 152170473621559703UL, 182604568345871671UL, 219125482015045997UL, 262950578418055169UL, 315540694101666193UL, 378648832921999397UL, 454378599506399233UL, 545254319407679131UL, 654305183289214771UL, 785166219947057701UL, 942199463936469157UL, 1130639356723763129UL, 1356767228068515623UL, 1628120673682218619UL, 1953744808418662409UL, 2344493770102394881UL, 2813392524122873857UL, 3376071028947448339UL, 4051285234736937517UL, 4861542281684325481UL, 5833850738021191727UL, 7000620885625427969UL, 8400745062750513217UL, 10080894075300616261UL, 12097072890360739951UL, 14516487468432885797UL, 17419784962119465179UL, #endif SIZE_MAX /* sentinel, to ensure the search terminates */ }; /* Return a suitable prime >= ESTIMATE. */ static size_t next_prime (size_t estimate) { size_t i; for (i = 0; i < sizeof (primes) / sizeof (primes[0]); i++) if (primes[i] >= estimate) return primes[i]; return SIZE_MAX; /* not a prime, but better than nothing */ } /* Resize the hash table with a new estimated size. */ static void hash_resize (gl_list_t list, size_t estimate) { size_t new_size = next_prime (estimate); if (new_size > list->table_size) { gl_hash_entry_t *old_table = list->table; /* Allocate the new table. */ gl_hash_entry_t *new_table; size_t i; if (size_overflow_p (xtimes (new_size, sizeof (gl_hash_entry_t)))) goto fail; new_table = (gl_hash_entry_t *) calloc (new_size, sizeof (gl_hash_entry_t)); if (new_table == NULL) goto fail; /* Iterate through the entries of the old table. */ for (i = list->table_size; i > 0; ) { gl_hash_entry_t node = old_table[--i]; while (node != NULL) { gl_hash_entry_t next = node->hash_next; /* Add the entry to the new table. */ size_t bucket = node->hashcode % new_size; node->hash_next = new_table[bucket]; new_table[bucket] = node; node = next; } } list->table = new_table; list->table_size = new_size; free (old_table); } return; fail: /* Just continue without resizing the table. */ return; } pspp-1.0.1/gl/relocatable.h0000644000175000017500000000755013124536243012456 00000000000000/* Provide relocatable packages. Copyright (C) 2003, 2005, 2008-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 . */ #ifndef _RELOCATABLE_H #define _RELOCATABLE_H #ifdef __cplusplus extern "C" { #endif /* This can be enabled through the configure --enable-relocatable option. */ #if ENABLE_RELOCATABLE /* When building a DLL, we must export some functions. Note that because this is a private .h file, we don't need to use __declspec(dllimport) in any case. */ #if HAVE_VISIBILITY && BUILDING_DLL # define RELOCATABLE_DLL_EXPORTED __attribute__((__visibility__("default"))) #elif defined _MSC_VER && BUILDING_DLL # define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) #else # define RELOCATABLE_DLL_EXPORTED #endif /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ extern RELOCATABLE_DLL_EXPORTED void set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); /* Returns the pathname, relocated according to the current installation directory. The returned string is either PATHNAME unmodified or a freshly allocated string that you can free with free() after casting it to 'char *'. */ extern const char * relocate (const char *pathname); /* Returns the pathname, relocated according to the current installation directory. This function sets *ALLOCATEDP to the allocated memory, or to NULL if no memory allocation occurs. So that, after you're done with the return value, to reclaim allocated memory, you can do: free (*ALLOCATEDP). */ extern const char * relocate2 (const char *pathname, char **allocatedp); /* Memory management: relocate() potentially allocates memory, because it has to construct a fresh pathname. If this is a problem because your program calls relocate() frequently or because you want to fix all potential memory leaks anyway, you have three options: 1) Use this idiom: const char *pathname = ...; const char *rel_pathname = relocate (pathname); ... if (rel_pathname != pathname) free ((char *) rel_pathname); 2) Use this idiom: char *allocated; const char *rel_pathname = relocate2 (..., &allocated); ... free (allocated); 3) Think about caching the result. */ /* Convenience function: Computes the current installation prefix, based on the original installation prefix, the original installation directory of a particular file, and the current pathname of this file. Returns it, freshly allocated. Returns NULL upon failure. */ extern char * compute_curr_prefix (const char *orig_installprefix, const char *orig_installdir, const char *curr_pathname); #else /* By default, we use the hardwired pathnames. */ #define relocate(pathname) (pathname) #define relocate2(pathname,allocatedp) (*(allocatedp) = NULL, (pathname)) #endif #ifdef __cplusplus } #endif #endif /* _RELOCATABLE_H */ pspp-1.0.1/gl/unsetenv.c0000644000175000017500000000547213124536243012044 00000000000000/* Copyright (C) 1992, 1995-2002, 2005-2017 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 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 . */ /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the name == NULL test below. */ #define _GL_ARG_NONNULL(params) #include /* Specification. */ #include #include #if !_LIBC # define __set_errno(ev) ((errno) = (ev)) #endif #include #include #if !_LIBC # define __environ environ #endif #if _LIBC /* This lock protects against simultaneous modifications of 'environ'. */ # include __libc_lock_define_initialized (static, envlock) # define LOCK __libc_lock_lock (envlock) # define UNLOCK __libc_lock_unlock (envlock) #else # define LOCK # define UNLOCK #endif /* In the GNU C library we must keep the namespace clean. */ #ifdef _LIBC # define unsetenv __unsetenv #endif #if _LIBC || !HAVE_UNSETENV int unsetenv (const char *name) { size_t len; char **ep; if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) { __set_errno (EINVAL); return -1; } len = strlen (name); LOCK; ep = __environ; while (*ep != NULL) if (!strncmp (*ep, name, len) && (*ep)[len] == '=') { /* Found it. Remove this pointer by moving later ones back. */ char **dp = ep; do dp[0] = dp[1]; while (*dp++); /* Continue the loop in case NAME appears again. */ } else ++ep; UNLOCK; return 0; } #ifdef _LIBC # undef unsetenv weak_alias (__unsetenv, unsetenv) #endif #else /* HAVE_UNSETENV */ # undef unsetenv # if !HAVE_DECL_UNSETENV # if VOID_UNSETENV extern void unsetenv (const char *); # else extern int unsetenv (const char *); # endif # endif /* Call the underlying unsetenv, in case there is hidden bookkeeping that needs updating beyond just modifying environ. */ int rpl_unsetenv (const char *name) { int result = 0; if (!name || !*name || strchr (name, '=')) { errno = EINVAL; return -1; } while (getenv (name)) # if !VOID_UNSETENV result = # endif unsetenv (name); return result; } #endif /* HAVE_UNSETENV */ pspp-1.0.1/gl/close.c0000644000175000017500000000276713124536241011304 00000000000000/* close replacement. Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include #include #include "fd-hook.h" #if HAVE_MSVC_INVALID_PARAMETER_HANDLER # include "msvc-inval.h" #endif #undef close #if HAVE_MSVC_INVALID_PARAMETER_HANDLER static int close_nothrow (int fd) { int result; TRY_MSVC_INVAL { result = close (fd); } CATCH_MSVC_INVAL { result = -1; errno = EBADF; } DONE_MSVC_INVAL; return result; } #else # define close_nothrow close #endif /* Override close() to call into other gnulib modules. */ int rpl_close (int fd) { #if WINDOWS_SOCKETS int retval = execute_all_close_hooks (close_nothrow, fd); #else int retval = close_nothrow (fd); #endif #if REPLACE_FCHDIR if (retval >= 0) _gl_unregister_fd (fd); #endif return retval; } pspp-1.0.1/gl/mkstemp.c0000644000175000017500000000300513124536242011642 00000000000000/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2017 Free Software Foundation, Inc. This file is derived from the one in 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 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 . */ #if !_LIBC # include #endif #include #if !_LIBC # include "tempname.h" # define __gen_tempname gen_tempname # ifndef __GT_FILE # define __GT_FILE GT_FILE # endif #endif #include #ifndef __GT_FILE # define __GT_FILE 0 #endif /* Generate a unique temporary file name from XTEMPLATE. The last six characters of XTEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. Then open the file and return a fd. If you are creating temporary files which will later be removed, consider using the clean-temp module, which avoids several pitfalls of using mkstemp directly. */ int mkstemp (char *xtemplate) { return __gen_tempname (xtemplate, 0, 0, __GT_FILE); } pspp-1.0.1/gl/stdalign.in.h0000644000175000017500000001116613124536243012411 00000000000000/* A substitute for ISO C11 . Copyright 2011-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Paul Eggert and Bruno Haible. */ #ifndef _GL_STDALIGN_H #define _GL_STDALIGN_H /* ISO C11 for platforms that lack it. References: ISO C11 (latest free draft ) sections 6.5.3.4, 6.7.5, 7.15. C++11 (latest free draft ) section 18.10. */ /* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment requirement of a structure member (i.e., slot or field) that is of type TYPE, as an integer constant expression. This differs from GCC's __alignof__ operator, which can yield a better-performing alignment for an object of that type. For example, on x86 with GCC, __alignof__ (double) and __alignof__ (long long) are 8, whereas alignof (double) and alignof (long long) are 4 unless the option '-malign-double' is used. The result cannot be used as a value for an 'enum' constant, if you want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. Include for offsetof. */ #include /* FreeBSD 9.1 , included by and lots of other standard headers, defines conflicting implementations of _Alignas and _Alignof that are no better than ours; override them. */ #undef _Alignas #undef _Alignof /* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 . */ #if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9))) # ifdef __cplusplus # if 201103 <= __cplusplus # define _Alignof(type) alignof (type) # else template struct __alignof_helper { char __a; __t __b; }; # define _Alignof(type) offsetof (__alignof_helper, __b) # endif # else # define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) # endif #endif #if ! (defined __cplusplus && 201103 <= __cplusplus) # define alignof _Alignof #endif #define __alignof_is_defined 1 /* alignas (A), also known as _Alignas (A), aligns a variable or type to the alignment A, where A is an integer constant expression. For example: int alignas (8) foo; struct s { int a; int alignas (8) bar; }; aligns the address of FOO and the offset of BAR to be multiples of 8. A should be a power of two that is at least the type's alignment and at most the implementation's alignment limit. This limit is 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable to MSVC through at least version 10.0, A should be an integer constant, as MSVC does not support expressions such as 1 << 3. To be portable to Sun C 5.11, do not align auto variables to anything stricter than their default alignment. The following C11 requirements are not supported here: - If A is zero, alignas has no effect. - alignas can be used multiple times; the strictest one wins. - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 # if defined __cplusplus && 201103 <= __cplusplus # define _Alignas(a) alignas (a) # elif ((defined __APPLE__ && defined __MACH__ \ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ : __GNUC__) \ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) # define _Alignas(a) __attribute__ ((__aligned__ (a))) # elif 1300 <= _MSC_VER # define _Alignas(a) __declspec (align (a)) # endif #endif #if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) # define alignas _Alignas #endif #if defined alignas || (defined __cplusplus && 201103 <= __cplusplus) # define __alignas_is_defined 1 #endif #endif /* _GL_STDALIGN_H */ pspp-1.0.1/gl/printf-parse.c0000644000175000017500000005317113124536242012605 00000000000000/* Formatted output to strings. Copyright (C) 1999-2000, 2002-2003, 2006-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* This file can be parametrized with the following macros: CHAR_T The element type of the format string. CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. DIRECTIVE Structure denoting a format directive. Depends on CHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on CHAR_T. PRINTF_PARSE Function that parses a format string. Depends on CHAR_T. STATIC Set to 'static' to declare the function static. ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ #ifndef PRINTF_PARSE # include #endif /* Specification. */ #ifndef PRINTF_PARSE # include "printf-parse.h" #endif /* Default parameters. */ #ifndef PRINTF_PARSE # define PRINTF_PARSE printf_parse # define CHAR_T char # define DIRECTIVE char_directive # define DIRECTIVES char_directives #endif /* Get size_t, NULL. */ #include /* Get intmax_t. */ #if defined IN_LIBINTL || defined IN_LIBASPRINTF # if HAVE_STDINT_H_WITH_UINTMAX # include # endif # if HAVE_INTTYPES_H_WITH_UINTMAX # include # endif #else # include #endif /* malloc(), realloc(), free(). */ #include /* memcpy(). */ #include /* errno. */ #include /* Checked size_t computations. */ #include "xsize.h" #if CHAR_T_ONLY_ASCII /* c_isascii(). */ # include "c-ctype.h" #endif #ifdef STATIC STATIC #endif int PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) { const CHAR_T *cp = format; /* pointer into format */ size_t arg_posn = 0; /* number of regular arguments consumed */ size_t d_allocated; /* allocated elements of d->dir */ size_t a_allocated; /* allocated elements of a->arg */ size_t max_width_length = 0; size_t max_precision_length = 0; d->count = 0; d_allocated = N_DIRECT_ALLOC_DIRECTIVES; d->dir = d->direct_alloc_dir; a->count = 0; a_allocated = N_DIRECT_ALLOC_ARGUMENTS; a->arg = a->direct_alloc_arg; #define REGISTER_ARG(_index_,_type_) \ { \ size_t n = (_index_); \ if (n >= a_allocated) \ { \ size_t memory_size; \ argument *memory; \ \ a_allocated = xtimes (a_allocated, 2); \ if (a_allocated <= n) \ a_allocated = xsum (n, 1); \ memory_size = xtimes (a_allocated, sizeof (argument)); \ if (size_overflow_p (memory_size)) \ /* Overflow, would lead to out of memory. */ \ goto out_of_memory; \ memory = (argument *) (a->arg != a->direct_alloc_arg \ ? realloc (a->arg, memory_size) \ : malloc (memory_size)); \ if (memory == NULL) \ /* Out of memory. */ \ goto out_of_memory; \ if (a->arg == a->direct_alloc_arg) \ memcpy (memory, a->arg, a->count * sizeof (argument)); \ a->arg = memory; \ } \ while (a->count <= n) \ a->arg[a->count++].type = TYPE_NONE; \ if (a->arg[n].type == TYPE_NONE) \ a->arg[n].type = (_type_); \ else if (a->arg[n].type != (_type_)) \ /* Ambiguous type for positional argument. */ \ goto error; \ } while (*cp != '\0') { CHAR_T c = *cp++; if (c == '%') { size_t arg_index = ARG_NONE; DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ /* Initialize the next directive. */ dp->dir_start = cp - 1; dp->flags = 0; dp->width_start = NULL; dp->width_end = NULL; dp->width_arg_index = ARG_NONE; dp->precision_start = NULL; dp->precision_end = NULL; dp->precision_arg_index = ARG_NONE; dp->arg_index = ARG_NONE; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; arg_index = n - 1; cp = np + 1; } } /* Read the flags. */ for (;;) { if (*cp == '\'') { dp->flags |= FLAG_GROUP; cp++; } else if (*cp == '-') { dp->flags |= FLAG_LEFT; cp++; } else if (*cp == '+') { dp->flags |= FLAG_SHOWSIGN; cp++; } else if (*cp == ' ') { dp->flags |= FLAG_SPACE; cp++; } else if (*cp == '#') { dp->flags |= FLAG_ALT; cp++; } else if (*cp == '0') { dp->flags |= FLAG_ZERO; cp++; } #if __GLIBC__ >= 2 && !defined __UCLIBC__ else if (*cp == 'I') { dp->flags |= FLAG_LOCALIZED; cp++; } #endif else break; } /* Parse the field width. */ if (*cp == '*') { dp->width_start = cp; cp++; dp->width_end = cp; if (max_width_length < 1) max_width_length = 1; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->width_arg_index = n - 1; cp = np + 1; } } if (dp->width_arg_index == ARG_NONE) { dp->width_arg_index = arg_posn++; if (dp->width_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->width_arg_index, TYPE_INT); } else if (*cp >= '0' && *cp <= '9') { size_t width_length; dp->width_start = cp; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->width_end = cp; width_length = dp->width_end - dp->width_start; if (max_width_length < width_length) max_width_length = width_length; } /* Parse the precision. */ if (*cp == '.') { cp++; if (*cp == '*') { dp->precision_start = cp - 1; cp++; dp->precision_end = cp; if (max_precision_length < 2) max_precision_length = 2; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->precision_arg_index = n - 1; cp = np + 1; } } if (dp->precision_arg_index == ARG_NONE) { dp->precision_arg_index = arg_posn++; if (dp->precision_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->precision_arg_index, TYPE_INT); } else { size_t precision_length; dp->precision_start = cp - 1; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->precision_end = cp; precision_length = dp->precision_end - dp->precision_start; if (max_precision_length < precision_length) max_precision_length = precision_length; } } { arg_type type; /* Parse argument type/size specifiers. */ { int flags = 0; for (;;) { if (*cp == 'h') { flags |= (1 << (flags & 1)); cp++; } else if (*cp == 'L') { flags |= 4; cp++; } else if (*cp == 'l') { flags += 8; cp++; } else if (*cp == 'j') { if (sizeof (intmax_t) > sizeof (long)) { /* intmax_t = long long */ flags += 16; } else if (sizeof (intmax_t) > sizeof (int)) { /* intmax_t = long */ flags += 8; } cp++; } else if (*cp == 'z' || *cp == 'Z') { /* 'z' is standardized in ISO C 99, but glibc uses 'Z' because the warning facility in gcc-2.95.2 understands only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ if (sizeof (size_t) > sizeof (long)) { /* size_t = long long */ flags += 16; } else if (sizeof (size_t) > sizeof (int)) { /* size_t = long */ flags += 8; } cp++; } else if (*cp == 't') { if (sizeof (ptrdiff_t) > sizeof (long)) { /* ptrdiff_t = long long */ flags += 16; } else if (sizeof (ptrdiff_t) > sizeof (int)) { /* ptrdiff_t = long */ flags += 8; } cp++; } #if defined __APPLE__ && defined __MACH__ /* On Mac OS X 10.3, PRIdMAX is defined as "qd". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'q') { if (64 / 8 > sizeof (long)) { /* int64_t = long long */ flags += 16; } else { /* int64_t = long */ flags += 8; } cp++; } #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows, PRIdMAX is defined as "I64d". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') { if (64 / 8 > sizeof (long)) { /* __int64 = long long */ flags += 16; } else { /* __int64 = long */ flags += 8; } cp += 3; } #endif else break; } /* Read the conversion character. */ c = *cp++; switch (c) { case 'd': case 'i': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_LONGLONGINT; else #endif /* If 'long long' exists and is the same as 'long', we parse "lld" into TYPE_LONGINT. */ if (flags >= 8) type = TYPE_LONGINT; else if (flags & 2) type = TYPE_SCHAR; else if (flags & 1) type = TYPE_SHORT; else type = TYPE_INT; break; case 'o': case 'u': case 'x': case 'X': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_ULONGLONGINT; else #endif /* If 'unsigned long long' exists and is the same as 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ if (flags >= 8) type = TYPE_ULONGINT; else if (flags & 2) type = TYPE_UCHAR; else if (flags & 1) type = TYPE_USHORT; else type = TYPE_UINT; break; case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': if (flags >= 16 || (flags & 4)) type = TYPE_LONGDOUBLE; else type = TYPE_DOUBLE; break; case 'c': if (flags >= 8) #if HAVE_WINT_T type = TYPE_WIDE_CHAR; #else goto error; #endif else type = TYPE_CHAR; break; #if HAVE_WINT_T case 'C': type = TYPE_WIDE_CHAR; c = 'c'; break; #endif case 's': if (flags >= 8) #if HAVE_WCHAR_T type = TYPE_WIDE_STRING; #else goto error; #endif else type = TYPE_STRING; break; #if HAVE_WCHAR_T case 'S': type = TYPE_WIDE_STRING; c = 's'; break; #endif case 'p': type = TYPE_POINTER; break; case 'n': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_COUNT_LONGLONGINT_POINTER; else #endif /* If 'long long' exists and is the same as 'long', we parse "lln" into TYPE_COUNT_LONGINT_POINTER. */ if (flags >= 8) type = TYPE_COUNT_LONGINT_POINTER; else if (flags & 2) type = TYPE_COUNT_SCHAR_POINTER; else if (flags & 1) type = TYPE_COUNT_SHORT_POINTER; else type = TYPE_COUNT_INT_POINTER; break; #if ENABLE_UNISTDIO /* The unistdio extensions. */ case 'U': if (flags >= 16) type = TYPE_U32_STRING; else if (flags >= 8) type = TYPE_U16_STRING; else type = TYPE_U8_STRING; break; #endif case '%': type = TYPE_NONE; break; default: /* Unknown conversion character. */ goto error; } } if (type != TYPE_NONE) { dp->arg_index = arg_index; if (dp->arg_index == ARG_NONE) { dp->arg_index = arg_posn++; if (dp->arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->arg_index, type); } dp->conversion = c; dp->dir_end = cp; } d->count++; if (d->count >= d_allocated) { size_t memory_size; DIRECTIVE *memory; d_allocated = xtimes (d_allocated, 2); memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); if (size_overflow_p (memory_size)) /* Overflow, would lead to out of memory. */ goto out_of_memory; memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir ? realloc (d->dir, memory_size) : malloc (memory_size)); if (memory == NULL) /* Out of memory. */ goto out_of_memory; if (d->dir == d->direct_alloc_dir) memcpy (memory, d->dir, d->count * sizeof (DIRECTIVE)); d->dir = memory; } } #if CHAR_T_ONLY_ASCII else if (!c_isascii (c)) { /* Non-ASCII character. Not supported. */ goto error; } #endif } d->dir[d->count].dir_start = cp; d->max_width_length = max_width_length; d->max_precision_length = max_precision_length; return 0; error: if (a->arg != a->direct_alloc_arg) free (a->arg); if (d->dir != d->direct_alloc_dir) free (d->dir); errno = EINVAL; return -1; out_of_memory: if (a->arg != a->direct_alloc_arg) free (a->arg); if (d->dir != d->direct_alloc_dir) free (d->dir); errno = ENOMEM; return -1; } #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef CHAR_T_ONLY_ASCII #undef CHAR_T pspp-1.0.1/gl/fd-hook.h0000644000175000017500000001134213124536241011520 00000000000000/* Hook for making file descriptor functions close(), ioctl() extensible. Copyright (C) 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef FD_HOOK_H #define FD_HOOK_H #ifdef __cplusplus extern "C" { #endif /* Currently, this entire code is only needed for the handling of sockets on native Windows platforms. */ #if WINDOWS_SOCKETS /* Type of function that closes FD. */ typedef int (*gl_close_fn) (int fd); /* Type of function that applies a control request to FD. */ typedef int (*gl_ioctl_fn) (int fd, int request, void *arg); /* An element of the list of file descriptor hooks. In CLOS (Common Lisp Object System) speak, it consists of an "around" method for the close() function and an "around" method for the ioctl() function. The fields of this structure are considered private. */ struct fd_hook { /* Doubly linked list. */ struct fd_hook *private_next; struct fd_hook *private_prev; /* Function that treats the types of FD that it knows about and calls execute_close_hooks (REMAINING_LIST, PRIMARY, FD) as a fallback. */ int (*private_close_fn) (const struct fd_hook *remaining_list, gl_close_fn primary, int fd); /* Function that treats the types of FD that it knows about and calls execute_ioctl_hooks (REMAINING_LIST, PRIMARY, FD, REQUEST, ARG) as a fallback. */ int (*private_ioctl_fn) (const struct fd_hook *remaining_list, gl_ioctl_fn primary, int fd, int request, void *arg); }; /* This type of function closes FD, applying special knowledge for the FD types it knows about, and calls execute_close_hooks (REMAINING_LIST, PRIMARY, FD) for the other FD types. In CLOS speak, REMAINING_LIST is the remaining list of "around" methods, and PRIMARY is the "primary" method for close(). */ typedef int (*close_hook_fn) (const struct fd_hook *remaining_list, gl_close_fn primary, int fd); /* Execute the close hooks in REMAINING_LIST, with PRIMARY as "primary" method. Return 0 or -1, like close() would do. */ extern int execute_close_hooks (const struct fd_hook *remaining_list, gl_close_fn primary, int fd); /* Execute all close hooks, with PRIMARY as "primary" method. Return 0 or -1, like close() would do. */ extern int execute_all_close_hooks (gl_close_fn primary, int fd); /* This type of function applies a control request to FD, applying special knowledge for the FD types it knows about, and calls execute_ioctl_hooks (REMAINING_LIST, PRIMARY, FD, REQUEST, ARG) for the other FD types. In CLOS speak, REMAINING_LIST is the remaining list of "around" methods, and PRIMARY is the "primary" method for ioctl(). */ typedef int (*ioctl_hook_fn) (const struct fd_hook *remaining_list, gl_ioctl_fn primary, int fd, int request, void *arg); /* Execute the ioctl hooks in REMAINING_LIST, with PRIMARY as "primary" method. Return 0 or -1, like ioctl() would do. */ extern int execute_ioctl_hooks (const struct fd_hook *remaining_list, gl_ioctl_fn primary, int fd, int request, void *arg); /* Execute all ioctl hooks, with PRIMARY as "primary" method. Return 0 or -1, like ioctl() would do. */ extern int execute_all_ioctl_hooks (gl_ioctl_fn primary, int fd, int request, void *arg); /* Add a function pair to the list of file descriptor hooks. CLOSE_HOOK and IOCTL_HOOK may be NULL, indicating no change. The LINK variable points to a piece of memory which is guaranteed to be accessible until the corresponding call to unregister_fd_hook. */ extern void register_fd_hook (close_hook_fn close_hook, ioctl_hook_fn ioctl_hook, struct fd_hook *link); /* Removes a hook from the list of file descriptor hooks. */ extern void unregister_fd_hook (struct fd_hook *link); #endif #ifdef __cplusplus } #endif #endif /* FD_HOOK_H */ pspp-1.0.1/gl/vasnprintf.c0000644000175000017500000066634713132510757012406 00000000000000/* vsprintf with automatic memory allocation. Copyright (C) 1999, 2002-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* This file can be parametrized with the following macros: VASNPRINTF The name of the function being defined. FCHAR_T The element type of the format string. DCHAR_T The element type of the destination (result) string. FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. MUST be set if FCHAR_T and DCHAR_T are not the same type. DIRECTIVE Structure denoting a format directive. Depends on FCHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on FCHAR_T. PRINTF_PARSE Function that parses a format string. Depends on FCHAR_T. DCHAR_CPY memcpy like function for DCHAR_T[] arrays. DCHAR_SET memset like function for DCHAR_T[] arrays. DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. SNPRINTF The system's snprintf (or similar) function. This may be either snprintf or swprintf. TCHAR_T The element type of the argument and result string of the said SNPRINTF function. This may be either char or wchar_t. The code exploits that sizeof (TCHAR_T) | sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ /* Tell glibc's to provide a prototype for snprintf(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifndef VASNPRINTF # include #endif #ifndef IN_LIBINTL # include #endif /* Specification. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "vasnwprintf.h" # else # include "vasnprintf.h" # endif #endif #include /* localeconv() */ #include /* snprintf(), sprintf() */ #include /* abort(), malloc(), realloc(), free() */ #include /* memcpy(), strlen() */ #include /* errno */ #include /* CHAR_BIT */ #include /* DBL_MAX_EXP, LDBL_MAX_EXP */ #if HAVE_NL_LANGINFO # include #endif #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "wprintf-parse.h" # else # include "printf-parse.h" # endif #endif /* Checked size_t computations. */ #include "xsize.h" #include "verify.h" #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "float+.h" #endif #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL # include # include "isnand-nolibm.h" #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "isnanl-nolibm.h" # include "fpucw.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL # include # include "isnand-nolibm.h" # include "printf-frexp.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "isnanl-nolibm.h" # include "printf-frexpl.h" # include "fpucw.h" #endif #ifndef FALLTHROUGH # if __GNUC__ < 7 # define FALLTHROUGH ((void) 0) # else # define FALLTHROUGH __attribute__ ((__fallthrough__)) # endif #endif /* Default parameters. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # define VASNPRINTF vasnwprintf # define FCHAR_T wchar_t # define DCHAR_T wchar_t # define TCHAR_T wchar_t # define DCHAR_IS_TCHAR 1 # define DIRECTIVE wchar_t_directive # define DIRECTIVES wchar_t_directives # define PRINTF_PARSE wprintf_parse # define DCHAR_CPY wmemcpy # define DCHAR_SET wmemset # else # define VASNPRINTF vasnprintf # define FCHAR_T char # define DCHAR_T char # define TCHAR_T char # define DCHAR_IS_TCHAR 1 # define DIRECTIVE char_directive # define DIRECTIVES char_directives # define PRINTF_PARSE printf_parse # define DCHAR_CPY memcpy # define DCHAR_SET memset # endif #endif #if WIDE_CHAR_VERSION /* TCHAR_T is wchar_t. */ # define USE_SNPRINTF 1 # if HAVE_DECL__SNWPRINTF /* On Windows, the function swprintf() has a different signature than on Unix; we use the function _snwprintf() or - on mingw - snwprintf() instead. The mingw function snwprintf() has fewer bugs than the MSVCRT function _snwprintf(), so prefer that. */ # if defined __MINGW32__ # define SNPRINTF snwprintf # else # define SNPRINTF _snwprintf # define USE_MSVC__SNPRINTF 1 # endif # else /* Unix. */ # define SNPRINTF swprintf # endif #else /* TCHAR_T is char. */ /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. But don't use it on BeOS, since BeOS snprintf produces no output if the size argument is >= 0x3000000. Also don't use it on Linux libc5, since there snprintf with size = 1 writes any output without bounds, like sprintf. */ # if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1) # define USE_SNPRINTF 1 # else # define USE_SNPRINTF 0 # endif # if HAVE_DECL__SNPRINTF /* Windows. The mingw function snprintf() has fewer bugs than the MSVCRT function _snprintf(), so prefer that. */ # if defined __MINGW32__ # define SNPRINTF snprintf /* Here we need to call the native snprintf, not rpl_snprintf. */ # undef snprintf # else /* MSVC versions < 14 did not have snprintf, only _snprintf. */ # define SNPRINTF _snprintf # define USE_MSVC__SNPRINTF 1 # endif # else /* Unix. */ # define SNPRINTF snprintf /* Here we need to call the native snprintf, not rpl_snprintf. */ # undef snprintf # endif #endif /* Here we need to call the native sprintf, not rpl_sprintf. */ #undef sprintf /* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized" warnings in this file. Use -Dlint to suppress them. */ #if defined GCC_LINT || defined lint # define IF_LINT(Code) Code #else # define IF_LINT(Code) /* empty */ #endif /* Avoid some warnings from "gcc -Wshadow". This file doesn't use the exp() and remainder() functions. */ #undef exp #define exp expo #undef remainder #define remainder rem #if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && !WIDE_CHAR_VERSION # if (HAVE_STRNLEN && !defined _AIX) # define local_strnlen strnlen # else # ifndef local_strnlen_defined # define local_strnlen_defined 1 static size_t local_strnlen (const char *string, size_t maxlen) { const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; } # endif # endif #endif #if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T # if HAVE_WCSLEN # define local_wcslen wcslen # else /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid a dependency towards this library, here is a local substitute. Define this substitute only once, even if this file is included twice in the same compilation unit. */ # ifndef local_wcslen_defined # define local_wcslen_defined 1 static size_t local_wcslen (const wchar_t *s) { const wchar_t *ptr; for (ptr = s; *ptr != (wchar_t) 0; ptr++) ; return ptr - s; } # endif # endif #endif #if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && HAVE_WCHAR_T && WIDE_CHAR_VERSION # if HAVE_WCSNLEN # define local_wcsnlen wcsnlen # else # ifndef local_wcsnlen_defined # define local_wcsnlen_defined 1 static size_t local_wcsnlen (const wchar_t *s, size_t maxlen) { const wchar_t *ptr; for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--) ; return ptr - s; } # endif # endif #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL /* Determine the decimal-point character according to the current locale. */ # ifndef decimal_point_char_defined # define decimal_point_char_defined 1 static char decimal_point_char (void) { const char *point; /* Determine it in a multithread-safe way. We know nl_langinfo is multithread-safe on glibc systems and Mac OS X systems, but is not required to be multithread-safe by POSIX. sprintf(), however, is multithread-safe. localeconv() is rarely multithread-safe. */ # if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__)) point = nl_langinfo (RADIXCHAR); # elif 1 char pointbuf[5]; sprintf (pointbuf, "%#.0f", 1.0); point = &pointbuf[1]; # else point = localeconv () -> decimal_point; # endif /* The decimal point is always a single byte: either '.' or ','. */ return (point[0] != '\0' ? point[0] : '.'); } # endif #endif #if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zero (double x) { return isnand (x) || x + x == x; } #endif #if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zerol (long double x) { return isnanl (x) || x + x == x; } #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL /* Converting 'long double' to decimal without rare rounding bugs requires real bignums. We use the naming conventions of GNU gmp, but vastly simpler (and slower) algorithms. */ typedef unsigned int mp_limb_t; # define GMP_LIMB_BITS 32 verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS); typedef unsigned long long mp_twolimb_t; # define GMP_TWOLIMB_BITS 64 verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS); /* Representation of a bignum >= 0. */ typedef struct { size_t nlimbs; mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ } mpn_t; /* Compute the product of two bignums >= 0. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * multiply (mpn_t src1, mpn_t src2, mpn_t *dest) { const mp_limb_t *p1; const mp_limb_t *p2; size_t len1; size_t len2; if (src1.nlimbs <= src2.nlimbs) { len1 = src1.nlimbs; p1 = src1.limbs; len2 = src2.nlimbs; p2 = src2.limbs; } else { len1 = src2.nlimbs; p1 = src2.limbs; len2 = src1.nlimbs; p2 = src1.limbs; } /* Now 0 <= len1 <= len2. */ if (len1 == 0) { /* src1 or src2 is zero. */ dest->nlimbs = 0; dest->limbs = (mp_limb_t *) malloc (1); } else { /* Here 1 <= len1 <= len2. */ size_t dlen; mp_limb_t *dp; size_t k, i, j; dlen = len1 + len2; dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); if (dp == NULL) return NULL; for (k = len2; k > 0; ) dp[--k] = 0; for (i = 0; i < len1; i++) { mp_limb_t digit1 = p1[i]; mp_twolimb_t carry = 0; for (j = 0; j < len2; j++) { mp_limb_t digit2 = p2[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; carry += dp[i + j]; dp[i + j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } dp[i + len2] = (mp_limb_t) carry; } /* Normalise. */ while (dlen > 0 && dp[dlen - 1] == 0) dlen--; dest->nlimbs = dlen; dest->limbs = dp; } return dest->limbs; } /* Compute the quotient of a bignum a >= 0 and a bignum b > 0. a is written as a = q * b + r with 0 <= r < b. q is the quotient, r the remainder. Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, q is incremented. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * divide (mpn_t a, mpn_t b, mpn_t *q) { /* Algorithm: First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). If m=n=1, perform a single-precision division: r:=0, j:=m, while j>0 do {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r=n>1, perform a multiple-precision division: We have a/b < beta^(m-n+1). s:=intDsize-1-(highest bit in b[n-1]), 0<=s=beta/2. For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} Compute q* : q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). In case of overflow (q* >= beta) set q* := beta-1. Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] and c3 := b[n-2] * q*. {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow occurred. Furthermore 0 <= c3 < beta^2. If there was overflow and r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, the next test can be skipped.} While c3 > c2, {Here 0 <= c2 < c3 < beta^2} Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. If q* > 0: Put r := r - b * q* * beta^j. In detail: [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. hence: u:=0, for i:=0 to n-1 do u := u + q* * b[i], r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), u:=u div beta (+ 1, if carry in subtraction) r[n+j]:=r[n+j]-u. {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 < q* + 1 <= beta, the carry u does not overflow.} If a negative carry occurs, put q* := q* - 1 and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. Set q[j] := q*. Normalise [q[m-n],..,q[0]]; this yields the quotient q. Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the rest r. The room for q[j] can be allocated at the memory location of r[n+j]. Finally, round-to-even: Shift r left by 1 bit. If r > b or if r = b and q[0] is odd, q := q+1. */ const mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; const mp_limb_t *b_ptr = b.limbs; size_t b_len = b.nlimbs; mp_limb_t *roomptr; mp_limb_t *tmp_roomptr = NULL; mp_limb_t *q_ptr; size_t q_len; mp_limb_t *r_ptr; size_t r_len; /* Allocate room for a_len+2 digits. (Need a_len+1 digits for the real division and 1 more digit for the final rounding of q.) */ roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); if (roomptr == NULL) return NULL; /* Normalise a. */ while (a_len > 0 && a_ptr[a_len - 1] == 0) a_len--; /* Normalise b. */ for (;;) { if (b_len == 0) /* Division by zero. */ abort (); if (b_ptr[b_len - 1] == 0) b_len--; else break; } /* Here m = a_len >= 0 and n = b_len > 0. */ if (a_len < b_len) { /* m beta^(m-2) <= a/b < beta^m */ r_ptr = roomptr; q_ptr = roomptr + 1; { mp_limb_t den = b_ptr[0]; mp_limb_t remainder = 0; const mp_limb_t *sourceptr = a_ptr + a_len; mp_limb_t *destptr = q_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; *--destptr = num / den; remainder = num % den; } /* Normalise and store r. */ if (remainder > 0) { r_ptr[0] = remainder; r_len = 1; } else r_len = 0; /* Normalise q. */ q_len = a_len; if (q_ptr[q_len - 1] == 0) q_len--; } } else { /* n>1: multiple precision division. beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> beta^(m-n-1) <= a/b < beta^(m-n+1). */ /* Determine s. */ size_t s; { mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ /* Determine s = GMP_LIMB_BITS - integer_length (msd). Code copied from gnulib's integer_length.c. */ # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) s = __builtin_clz (msd); # else # if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT if (GMP_LIMB_BITS <= DBL_MANT_BIT) { /* Use 'double' operations. Assumes an IEEE 754 'double' implementation. */ # define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) # define DBL_EXP_BIAS (DBL_EXP_MASK / 2 - 1) # define NWORDS \ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) union { double value; unsigned int word[NWORDS]; } m; /* Use a single integer to floating-point conversion. */ m.value = msd; s = GMP_LIMB_BITS - (((m.word[DBL_EXPBIT0_WORD] >> DBL_EXPBIT0_BIT) & DBL_EXP_MASK) - DBL_EXP_BIAS); } else # undef NWORDS # endif { s = 31; if (msd >= 0x10000) { msd = msd >> 16; s -= 16; } if (msd >= 0x100) { msd = msd >> 8; s -= 8; } if (msd >= 0x10) { msd = msd >> 4; s -= 4; } if (msd >= 0x4) { msd = msd >> 2; s -= 2; } if (msd >= 0x2) { msd = msd >> 1; s -= 1; } } # endif } /* 0 <= s < GMP_LIMB_BITS. Copy b, shifting it left by s bits. */ if (s > 0) { tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); if (tmp_roomptr == NULL) { free (roomptr); return NULL; } { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = tmp_roomptr; mp_twolimb_t accu = 0; size_t count; for (count = b_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } /* accu must be zero, since that was how s was determined. */ if (accu != 0) abort (); } b_ptr = tmp_roomptr; } /* Copy a, shifting it left by s bits, yields r. Memory layout: At the beginning: r = roomptr[0..a_len], at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ r_ptr = roomptr; if (s == 0) { memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); r_ptr[a_len] = 0; } else { const mp_limb_t *sourceptr = a_ptr; mp_limb_t *destptr = r_ptr; mp_twolimb_t accu = 0; size_t count; for (count = a_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } *destptr++ = (mp_limb_t) accu; } q_ptr = roomptr + b_len; q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ { size_t j = a_len - b_len; /* m-n */ mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; /* Division loop, traversed m-n+1 times. j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ for (;;) { mp_limb_t q_star; mp_limb_t c1; if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ { /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ mp_twolimb_t num = ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) | r_ptr[j + b_len - 1]; q_star = num / b_msd; c1 = num % b_msd; } else { /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) {<= beta !}. If yes, jump directly to the subtraction loop. (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ if (r_ptr[j + b_len] > b_msd || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) /* r[j+n] >= b[n-1]+1 or r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a carry. */ goto subtract; } /* q_star = q*, c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, 0, decrease it by b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 this can happen only twice. */ if (c3 > c2) { q_star = q_star - 1; /* q* := q* - 1 */ if (c3 - c2 > b_msdd) q_star = q_star - 1; /* q* := q* - 1 */ } } if (q_star > 0) subtract: { /* Subtract r := r - b * q* * beta^j. */ mp_limb_t cr; { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_twolimb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { /* Here 0 <= carry <= q*. */ carry = carry + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ + (mp_limb_t) ~(*destptr); /* Here 0 <= carry <= beta*q* + beta-1. */ *destptr++ = ~(mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; /* <= q* */ } cr = (mp_limb_t) carry; } /* Subtract cr from r_ptr[j + b_len], then forget about r_ptr[j + b_len]. */ if (cr > r_ptr[j + b_len]) { /* Subtraction gave a carry. */ q_star = q_star - 1; /* q* := q* - 1 */ /* Add b back. */ { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_limb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { mp_limb_t source1 = *sourceptr++; mp_limb_t source2 = *destptr; *destptr++ = source1 + source2 + carry; carry = (carry ? source1 >= (mp_limb_t) ~source2 : source1 > (mp_limb_t) ~source2); } } /* Forget about the carry and about r[j+n]. */ } } /* q* is determined. Store it as q[j]. */ q_ptr[j] = q_star; if (j == 0) break; j--; } } r_len = b_len; /* Normalise q. */ if (q_ptr[q_len - 1] == 0) q_len--; # if 0 /* Not needed here, since we need r only to compare it with b/2, and b is shifted left by s bits. */ /* Shift r right by s bits. */ if (s > 0) { mp_limb_t ptr = r_ptr + r_len; mp_twolimb_t accu = 0; size_t count; for (count = r_len; count > 0; count--) { accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); } } # endif /* Normalise r. */ while (r_len > 0 && r_ptr[r_len - 1] == 0) r_len--; } /* Compare r << 1 with b. */ if (r_len > b_len) goto increment_q; { size_t i; for (i = b_len;;) { mp_limb_t r_i = (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) | (i < r_len ? r_ptr[i] << 1 : 0); mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); if (r_i > b_i) goto increment_q; if (r_i < b_i) goto keep_q; if (i == 0) break; i--; } } if (q_len > 0 && ((q_ptr[0] & 1) != 0)) /* q is odd. */ increment_q: { size_t i; for (i = 0; i < q_len; i++) if (++(q_ptr[i]) != 0) goto keep_q; q_ptr[q_len++] = 1; } keep_q: if (tmp_roomptr != NULL) free (tmp_roomptr); q->limbs = q_ptr; q->nlimbs = q_len; return roomptr; } /* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal representation. Destroys the contents of a. Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * convert_to_decimal (mpn_t a, size_t extra_zeroes) { mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); if (c_ptr != NULL) { char *d_ptr = c_ptr; for (; extra_zeroes > 0; extra_zeroes--) *d_ptr++ = '0'; while (a_len > 0) { /* Divide a by 10^9, in-place. */ mp_limb_t remainder = 0; mp_limb_t *ptr = a_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; *ptr = num / 1000000000; remainder = num % 1000000000; } /* Store the remainder as 9 decimal digits. */ for (count = 9; count > 0; count--) { *d_ptr++ = '0' + (remainder % 10); remainder = remainder / 10; } /* Normalize a. */ if (a_ptr[a_len - 1] == 0) a_len--; } /* Remove leading zeroes. */ while (d_ptr > c_ptr && d_ptr[-1] == '0') d_ptr--; /* But keep at least one zero. */ if (d_ptr == c_ptr) *d_ptr++ = '0'; /* Terminate the string. */ *d_ptr = '\0'; } return c_ptr; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_long_double (long double x, int *ep, mpn_t *mp) { mpn_t m; int exp; long double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * 2^LDBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * 2^LDBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'long double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess precision. */ if (!(y == 0.0L)) abort (); # endif /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - LDBL_MANT_BIT; return m.limbs; } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_double (double x, int *ep, mpn_t *mp) { mpn_t m; int exp; double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * 2^DBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * 2^DBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } if (!(y == 0.0)) abort (); /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - DBL_MANT_BIT; return m.limbs; } # endif /* Assuming x = 2^e * m is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) { int s; size_t extra_zeroes; unsigned int abs_n; unsigned int abs_s; mp_limb_t *pow5_ptr; size_t pow5_len; unsigned int s_limbs; unsigned int s_bits; mpn_t pow5; mpn_t z; void *z_memory; char *digits; if (memory == NULL) return NULL; /* x = 2^e * m, hence y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) = round (2^s * 5^n * m). */ s = e + n; extra_zeroes = 0; /* Factor out a common power of 10 if possible. */ if (s > 0 && n > 0) { extra_zeroes = (s < n ? s : n); s -= extra_zeroes; n -= extra_zeroes; } /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. Before converting to decimal, we need to compute z = round (2^s * 5^n * m). */ /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same sign. 2.322 is slightly larger than log(5)/log(2). */ abs_n = (n >= 0 ? n : -n); abs_s = (s >= 0 ? s : -s); pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 + abs_s / GMP_LIMB_BITS + 1) * sizeof (mp_limb_t)); if (pow5_ptr == NULL) { free (memory); return NULL; } /* Initialize with 1. */ pow5_ptr[0] = 1; pow5_len = 1; /* Multiply with 5^|n|. */ if (abs_n > 0) { static mp_limb_t const small_pow5[13 + 1] = { 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125 }; unsigned int n13; for (n13 = 0; n13 <= abs_n; n13 += 13) { mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; size_t j; mp_twolimb_t carry = 0; for (j = 0; j < pow5_len; j++) { mp_limb_t digit2 = pow5_ptr[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; pow5_ptr[j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } if (carry > 0) pow5_ptr[pow5_len++] = (mp_limb_t) carry; } } s_limbs = abs_s / GMP_LIMB_BITS; s_bits = abs_s % GMP_LIMB_BITS; if (n >= 0 ? s >= 0 : s <= 0) { /* Multiply with 2^|s|. */ if (s_bits > 0) { mp_limb_t *ptr = pow5_ptr; mp_twolimb_t accu = 0; size_t count; for (count = pow5_len; count > 0; count--) { accu += (mp_twolimb_t) *ptr << s_bits; *ptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) { *ptr = (mp_limb_t) accu; pow5_len++; } } if (s_limbs > 0) { size_t count; for (count = pow5_len; count > 0;) { count--; pow5_ptr[s_limbs + count] = pow5_ptr[count]; } for (count = s_limbs; count > 0;) { count--; pow5_ptr[count] = 0; } pow5_len += s_limbs; } pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* Multiply m with pow5. No division needed. */ z_memory = multiply (m, pow5, &z); } else { /* Divide m by pow5 and round. */ z_memory = divide (m, pow5, &z); } } else { pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* n >= 0, s < 0. Multiply m with pow5, then divide by 2^|s|. */ mpn_t numerator; mpn_t denominator; void *tmp_memory; tmp_memory = multiply (m, pow5, &numerator); if (tmp_memory == NULL) { free (pow5_ptr); free (memory); return NULL; } /* Construct 2^|s|. */ { mp_limb_t *ptr = pow5_ptr + pow5_len; size_t i; for (i = 0; i < s_limbs; i++) ptr[i] = 0; ptr[s_limbs] = (mp_limb_t) 1 << s_bits; denominator.limbs = ptr; denominator.nlimbs = s_limbs + 1; } z_memory = divide (numerator, denominator, &z); free (tmp_memory); } else { /* n < 0, s > 0. Multiply m with 2^s, then divide by pow5. */ mpn_t numerator; mp_limb_t *num_ptr; num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) * sizeof (mp_limb_t)); if (num_ptr == NULL) { free (pow5_ptr); free (memory); return NULL; } { mp_limb_t *destptr = num_ptr; { size_t i; for (i = 0; i < s_limbs; i++) *destptr++ = 0; } if (s_bits > 0) { const mp_limb_t *sourceptr = m.limbs; mp_twolimb_t accu = 0; size_t count; for (count = m.nlimbs; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s_bits; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) *destptr++ = (mp_limb_t) accu; } else { const mp_limb_t *sourceptr = m.limbs; size_t count; for (count = m.nlimbs; count > 0; count--) *destptr++ = *sourceptr++; } numerator.limbs = num_ptr; numerator.nlimbs = destptr - num_ptr; } z_memory = divide (numerator, pow5, &z); free (num_ptr); } } free (pow5_ptr); free (memory); /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ if (z_memory == NULL) return NULL; digits = convert_to_decimal (z, extra_zeroes); free (z_memory); return digits; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_long_double (long double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_long_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_double (double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10l (long double x) { int exp; long double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); if (y == 0.0L) return INT_MIN; if (y < 0.5L) { while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0L / (1 << 16))) { y *= 1.0L * (1 << 16); exp -= 16; } if (y < (1.0L / (1 << 8))) { y *= 1.0L * (1 << 8); exp -= 8; } if (y < (1.0L / (1 << 4))) { y *= 1.0L * (1 << 4); exp -= 4; } if (y < (1.0L / (1 << 2))) { y *= 1.0L * (1 << 2); exp -= 2; } if (y < (1.0L / (1 << 1))) { y *= 1.0L * (1 << 1); exp -= 1; } } if (!(y >= 0.5L && y < 1.0L)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) Four terms are enough to get an approximation with error < 10^-7. */ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10 (double x) { int exp; double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); if (y == 0.0) return INT_MIN; if (y < 0.5) { while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0 / (1 << 16))) { y *= 1.0 * (1 << 16); exp -= 16; } if (y < (1.0 / (1 << 8))) { y *= 1.0 * (1 << 8); exp -= 8; } if (y < (1.0 / (1 << 4))) { y *= 1.0 * (1 << 4); exp -= 4; } if (y < (1.0 / (1 << 2))) { y *= 1.0 * (1 << 2); exp -= 2; } if (y < (1.0 / (1 << 1))) { y *= 1.0 * (1 << 1); exp -= 1; } } if (!(y >= 0.5 && y < 1.0)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) Four terms are enough to get an approximation with error < 10^-7. */ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif /* Tests whether a string of digits consists of exactly PRECISION zeroes and a single '1' digit. */ static int is_borderline (const char *digits, size_t precision) { for (; precision > 0; precision--, digits++) if (*digits != '0') return 0; if (*digits != '1') return 0; digits++; return *digits == '\0'; } #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF /* Use a different function name, to make it possible that the 'wchar_t' parametrization and the 'char' parametrization get compiled in the same translation unit. */ # if WIDE_CHAR_VERSION # define MAX_ROOM_NEEDED wmax_room_needed # else # define MAX_ROOM_NEEDED max_room_needed # endif /* Returns the number of TCHAR_T units needed as temporary space for the result of sprintf or SNPRINTF of a single conversion directive. */ static size_t MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion, arg_type type, int flags, size_t width, int has_precision, size_t precision, int pad_ourselves) { size_t tmp_length; switch (conversion) { case 'd': case 'i': case 'u': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Multiply by 2, as an estimate for FLAG_GROUP. */ tmp_length = xsum (tmp_length, tmp_length); /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'o': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'x': case 'X': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 2, to account for a leading sign or alternate form. */ tmp_length = xsum (tmp_length, 2); break; case 'f': case 'F': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ else tmp_length = (unsigned int) (DBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ tmp_length = xsum (tmp_length, precision); break; case 'e': case 'E': case 'g': case 'G': tmp_length = 12; /* sign, decimal point, exponent etc. */ tmp_length = xsum (tmp_length, precision); break; case 'a': case 'A': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (DBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); break; case 'c': # if HAVE_WINT_T && !WIDE_CHAR_VERSION if (type == TYPE_WIDE_CHAR) tmp_length = MB_CUR_MAX; else # endif tmp_length = 1; break; case 's': # if HAVE_WCHAR_T if (type == TYPE_WIDE_STRING) { # if WIDE_CHAR_VERSION /* ISO C says about %ls in fwprintf: "If the precision is not specified or is greater than the size of the array, the array shall contain a null wide character." So if there is a precision, we must not use wcslen. */ const wchar_t *arg = ap->arg[arg_index].a.a_wide_string; if (has_precision) tmp_length = local_wcsnlen (arg, precision); else tmp_length = local_wcslen (arg); # else /* ISO C says about %ls in fprintf: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." So if there is a precision, we must not use wcslen. */ /* This case has already been handled separately in VASNPRINTF. */ abort (); # endif } else # endif { # if WIDE_CHAR_VERSION /* ISO C says about %s in fwprintf: "If the precision is not specified or is greater than the size of the converted array, the converted array shall contain a null wide character." So if there is a precision, we must not use strlen. */ /* This case has already been handled separately in VASNPRINTF. */ abort (); # else /* ISO C says about %s in fprintf: "If the precision is not specified or greater than the size of the array, the array shall contain a null character." So if there is a precision, we must not use strlen. */ const char *arg = ap->arg[arg_index].a.a_string; if (has_precision) tmp_length = local_strnlen (arg, precision); else tmp_length = strlen (arg); # endif } break; case 'p': tmp_length = (unsigned int) (sizeof (void *) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1 /* turn floor into ceil */ + 2; /* account for leading 0x */ break; default: abort (); } if (!pad_ourselves) { # if ENABLE_UNISTDIO /* Padding considers the number of characters, therefore the number of elements after padding may be > max (tmp_length, width) but is certainly <= tmp_length + width. */ tmp_length = xsum (tmp_length, width); # else /* Padding considers the number of elements, says POSIX. */ if (tmp_length < width) tmp_length = width; # endif } tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ return tmp_length; } #endif DCHAR_T * VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, const FCHAR_T *format, va_list args) { DIRECTIVES d; arguments a; if (PRINTF_PARSE (format, &d, &a) < 0) /* errno is already set. */ return NULL; #define CLEANUP() \ if (d.dir != d.direct_alloc_dir) \ free (d.dir); \ if (a.arg != a.direct_alloc_arg) \ free (a.arg); if (PRINTF_FETCHARGS (args, &a) < 0) { CLEANUP (); errno = EINVAL; return NULL; } { size_t buf_neededlength; TCHAR_T *buf; TCHAR_T *buf_malloced; const FCHAR_T *cp; size_t i; DIRECTIVE *dp; /* Output string accumulator. */ DCHAR_T *result; size_t allocated; size_t length; /* Allocate a small buffer that will hold a directive passed to sprintf or snprintf. */ buf_neededlength = xsum4 (7, d.max_width_length, d.max_precision_length, 6); #if HAVE_ALLOCA if (buf_neededlength < 4000 / sizeof (TCHAR_T)) { buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); buf_malloced = NULL; } else #endif { size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); if (size_overflow_p (buf_memsize)) goto out_of_memory_1; buf = (TCHAR_T *) malloc (buf_memsize); if (buf == NULL) goto out_of_memory_1; buf_malloced = buf; } if (resultbuf != NULL) { result = resultbuf; allocated = *lengthp; } else { result = NULL; allocated = 0; } length = 0; /* Invariants: result is either == resultbuf or == NULL or malloc-allocated. If length > 0, then result != NULL. */ /* Ensures that allocated >= needed. Aborts through a jump to out_of_memory if needed is SIZE_MAX or otherwise too big. */ #define ENSURE_ALLOCATION(needed) \ if ((needed) > allocated) \ { \ size_t memory_size; \ DCHAR_T *memory; \ \ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ if ((needed) > allocated) \ allocated = (needed); \ memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ if (size_overflow_p (memory_size)) \ goto out_of_memory; \ if (result == resultbuf || result == NULL) \ memory = (DCHAR_T *) malloc (memory_size); \ else \ memory = (DCHAR_T *) realloc (result, memory_size); \ if (memory == NULL) \ goto out_of_memory; \ if (result == resultbuf && length > 0) \ DCHAR_CPY (memory, result, length); \ result = memory; \ } for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) { if (cp != dp->dir_start) { size_t n = dp->dir_start - cp; size_t augmented_length = xsum (length, n); ENSURE_ALLOCATION (augmented_length); /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we need that the format string contains only ASCII characters if FCHAR_T and DCHAR_T are not the same type. */ if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) { DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); length = augmented_length; } else { do result[length++] = *cp++; while (--n > 0); } } if (i == d.count) break; /* Execute a single directive. */ if (dp->conversion == '%') { size_t augmented_length; if (!(dp->arg_index == ARG_NONE)) abort (); augmented_length = xsum (length, 1); ENSURE_ALLOCATION (augmented_length); result[length] = '%'; length = augmented_length; } else { if (!(dp->arg_index != ARG_NONE)) abort (); if (dp->conversion == 'n') { switch (a.arg[dp->arg_index].type) { case TYPE_COUNT_SCHAR_POINTER: *a.arg[dp->arg_index].a.a_count_schar_pointer = length; break; case TYPE_COUNT_SHORT_POINTER: *a.arg[dp->arg_index].a.a_count_short_pointer = length; break; case TYPE_COUNT_INT_POINTER: *a.arg[dp->arg_index].a.a_count_int_pointer = length; break; case TYPE_COUNT_LONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longint_pointer = length; break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; break; #endif default: abort (); } } #if ENABLE_UNISTDIO /* The unistdio extensions. */ else if (dp->conversion == 'U') { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; width = arg; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = -width; } } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } switch (type) { case TYPE_U8_STRING: { const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; const uint8_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u8_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (characters < width && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT8_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-8 to locale encoding. */ converted = u8_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-8 to UTF-16/UTF-32. */ converted = U8_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (characters < width && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U16_STRING: { const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; const uint16_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u16_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (characters < width && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT16_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-16 to locale encoding. */ converted = u16_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-16 to UTF-8/UTF-32. */ converted = U16_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (characters < width && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U32_STRING: { const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; const uint32_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u32_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (characters < width && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT32_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-32 to locale encoding. */ converted = u32_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-32 to UTF-8/UTF-16. */ converted = U32_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (characters < width && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; default: abort (); } } #endif #if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T else if (dp->conversion == 's' # if WIDE_CHAR_VERSION && a.arg[dp->arg_index].type != TYPE_WIDE_STRING # else && a.arg[dp->arg_index].type == TYPE_WIDE_STRING # endif ) { /* The normal handling of the 's' directive below requires allocating a temporary buffer. The determination of its length (tmp_length), in the case when a precision is specified, below requires a conversion between a char[] string and a wchar_t[] wide string. It could be done, but we have no guarantee that the implementation of sprintf will use the exactly same algorithm. Without this guarantee, it is possible to have buffer overrun bugs. In order to avoid such bugs, we implement the entire processing of the 's' directive ourselves. */ int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; width = arg; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = -width; } } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } # if WIDE_CHAR_VERSION /* %s in vasnwprintf. See the specification of fwprintf. */ { const char *arg = a.arg[dp->arg_index].a.a_string; const char *arg_end; size_t characters; if (has_precision) { /* Use only as many bytes as needed to produce PRECISION wide characters, from the left. */ # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count; # if HAVE_MBRTOWC count = mbrlen (arg_end, MB_CUR_MAX, &state); # else count = mblen (arg_end, MB_CUR_MAX); # endif if (count == 0) /* Found the terminating NUL. */ break; if (count < 0) { /* Invalid or incomplete multibyte character. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of wide characters. */ # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (;;) { int count; # if HAVE_MBRTOWC count = mbrlen (arg_end, MB_CUR_MAX, &state); # else count = mblen (arg_end, MB_CUR_MAX); # endif if (count == 0) /* Found the terminating NUL. */ break; if (count < 0) { /* Invalid or incomplete multibyte character. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (characters < width && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } if (has_precision || has_width) { /* We know the number of wide characters in advance. */ size_t remaining; # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif ENSURE_ALLOCATION (xsum (length, characters)); for (remaining = characters; remaining > 0; remaining--) { wchar_t wc; int count; # if HAVE_MBRTOWC count = mbrtowc (&wc, arg, arg_end - arg, &state); # else count = mbtowc (&wc, arg, arg_end - arg); # endif if (count <= 0) /* mbrtowc not consistent with mbrlen, or mbtowc not consistent with mblen. */ abort (); result[length++] = wc; arg += count; } if (!(arg == arg_end)) abort (); } else { # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif while (arg < arg_end) { wchar_t wc; int count; # if HAVE_MBRTOWC count = mbrtowc (&wc, arg, arg_end - arg, &state); # else count = mbtowc (&wc, arg, arg_end - arg); # endif if (count <= 0) /* mbrtowc not consistent with mbrlen, or mbtowc not consistent with mblen. */ abort (); ENSURE_ALLOCATION (xsum (length, 1)); result[length++] = wc; arg += count; } } if (characters < width && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } # else /* %ls in vasnprintf. See the specification of fprintf. */ { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; const wchar_t *arg_end; size_t characters; # if !DCHAR_IS_TCHAR /* This code assumes that TCHAR_T is 'char'. */ verify (sizeof (TCHAR_T) == 1); TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; # endif size_t w; if (has_precision) { /* Use only as many wide characters as needed to produce at most PRECISION bytes, from the left. */ # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; while (precision > 0) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg_end == 0) /* Found the terminating null wide character. */ break; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg_end, &state); # else count = wctomb (cbuf, *arg_end); # endif if (count < 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } if (precision < count) break; arg_end++; characters += count; precision -= count; } } # if DCHAR_IS_TCHAR else if (has_width) # else else # endif { /* Use the entire string, and count the number of bytes. */ # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (;;) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg_end == 0) /* Found the terminating null wide character. */ break; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg_end, &state); # else count = wctomb (cbuf, *arg_end); # endif if (count < 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end++; characters += count; } } # if DCHAR_IS_TCHAR else { /* Use the entire string. */ arg_end = arg + local_wcslen (arg); /* The number of bytes doesn't matter. */ characters = 0; } # endif # if !DCHAR_IS_TCHAR /* Convert the string into a piece of temporary memory. */ tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T)); if (tmpsrc == NULL) goto out_of_memory; { TCHAR_T *tmpptr = tmpsrc; size_t remaining; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif for (remaining = characters; remaining > 0; ) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); memcpy (tmpptr, cbuf, count); tmpptr += count; arg++; remaining -= count; } if (!(arg == arg_end)) abort (); } /* Convert from TCHAR_T[] to DCHAR_T[]. */ tmpdst = DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, characters, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) { int saved_errno = errno; free (tmpsrc); if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } free (tmpsrc); # endif if (has_width) { # if ENABLE_UNISTDIO /* Outside POSIX, it's preferable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, characters); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = characters; # endif } else /* w doesn't matter. */ w = 0; if (w < width && !(dp->flags & FLAG_LEFT)) { size_t n = width - w; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_TCHAR if (has_precision || has_width) { /* We know the number of bytes in advance. */ size_t remaining; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif ENSURE_ALLOCATION (xsum (length, characters)); for (remaining = characters; remaining > 0; ) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); memcpy (result + length, cbuf, count); length += count; arg++; remaining -= count; } if (!(arg == arg_end)) abort (); } else { # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif while (arg < arg_end) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } ENSURE_ALLOCATION (xsum (length, count)); memcpy (result + length, cbuf, count); length += count; arg++; } } # else ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); length += tmpdst_len; # endif if (w < width && (dp->flags & FLAG_LEFT)) { size_t n = width - w; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } # endif } #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'a' || dp->conversion == 'A') # if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE)) && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # endif ) # endif ) { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; size_t width; int has_precision; size_t precision; size_t tmp_length; size_t count; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; width = arg; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = -width; } } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* Allocate a temporary buffer of sufficient size. */ if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) ((LDBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) ((DBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; if (type == TYPE_LONGDOUBLE) { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; long double mantissa; if (arg > 0.0L) mantissa = printf_frexpl (arg, &exponent); else { exponent = 0; mantissa = 0.0L; } if (has_precision && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ long double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5L : tail > 0.5L) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0L; } if (tail != 0.0L) for (q = precision; q > 0; q--) tail *= 0.0625L; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0L || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0L) { mantissa *= 16.0L; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } END_LONG_DOUBLE_ROUNDING (); } # else abort (); # endif } else { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE double arg = a.arg[dp->arg_index].a.a_double; if (isnand (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; double mantissa; if (arg > 0.0) mantissa = printf_frexp (arg, &exponent); else { exponent = 0; mantissa = 0.0; } if (has_precision && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5 : tail > 0.5) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0; } if (tail != 0.0) for (q = precision; q > 0; q--) tail *= 0.0625; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0 || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0) { mantissa *= 16.0; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } } # else abort (); # endif } /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ count = p - tmp; if (count < width) { size_t pad = width - count; DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } #endif #if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'f' || dp->conversion == 'F' || dp->conversion == 'e' || dp->conversion == 'E' || dp->conversion == 'g' || dp->conversion == 'G' || dp->conversion == 'a' || dp->conversion == 'A') && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # elif NEED_PRINTF_INFINITE_DOUBLE || (a.arg[dp->arg_index].type == TYPE_DOUBLE /* The systems (mingw) which produce wrong output for Inf, -Inf, and NaN also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # elif NEED_PRINTF_INFINITE_LONG_DOUBLE || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE /* Some systems produce wrong output for Inf, -Inf, and NaN. Some systems in this category (IRIX 5.3) also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) # endif )) { # if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) arg_type type = a.arg[dp->arg_index].type; # endif int flags = dp->flags; size_t width; size_t count; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; width = arg; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = -width; } } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* POSIX specifies the default precision to be 6 for %f, %F, %e, %E, but not for %g, %G. Implementations appear to use the same default precision also for %g, %G. But for %a, %A, the default precision is 0. */ if (!has_precision) if (!(dp->conversion == 'a' || dp->conversion == 'A')) precision = 6; /* Allocate a temporary buffer of sufficient size. */ # if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); # elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); # elif NEED_PRINTF_LONG_DOUBLE tmp_length = LDBL_DIG + 1; # elif NEED_PRINTF_DOUBLE tmp_length = DBL_DIG + 1; # else tmp_length = 0; # endif if (tmp_length < precision) tmp_length = precision; # if NEED_PRINTF_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (!(isnanl (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10l (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif # if NEED_PRINTF_DOUBLE # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE if (type == TYPE_DOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { double arg = a.arg[dp->arg_index].a.a_double; if (!(isnand (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10 (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_LONG_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_long_double (arg, precision); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0L) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0L. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)precision - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ if (is_borderline (digits, precision)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_long_double (arg, (int)precision - exponent + 1); if (digits2 == NULL) { free (digits); END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } if (strlen (digits2) == precision + 1) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0L) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0L. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ if (is_borderline (digits, precision - 1)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent + 1); if (digits2 == NULL) { free (digits); END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } if (strlen (digits2) == precision) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t ecount = exponent + 1; /* Note: count <= precision = ndigits. */ for (; ecount > 0; ecount--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t ecount = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; ecount > 0; ecount--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0L)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else if (dp->conversion == 'a' || dp->conversion == 'A') { *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion - 'A' + 'P'; *p++ = '+'; *p++ = '0'; } else abort (); # endif } END_LONG_DOUBLE_ROUNDING (); } } # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE else # endif # endif # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE { double arg = a.arg[dp->arg_index].a.a_double; if (isnand (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_double (arg, precision); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)precision - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ if (is_borderline (digits, precision)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_double (arg, (int)precision - exponent + 1); if (digits2 == NULL) { free (digits); goto out_of_memory; } if (strlen (digits2) == precision + 1) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ if (is_borderline (digits, precision - 1)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent + 1); if (digits2 == NULL) { free (digits); goto out_of_memory; } if (strlen (digits2) == precision) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t ecount = exponent + 1; /* Note: ecount <= precision = ndigits. */ for (; ecount > 0; ecount--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t ecount = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; ecount > 0; ecount--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *p++ = '0'; # endif *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else abort (); # endif } } } # endif /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ count = p - tmp; if (count < width) { size_t pad = width - count; DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } #endif else { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int has_width; #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION size_t width; #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION int has_precision; size_t precision; #endif #if NEED_PRINTF_UNBOUNDED_PRECISION int prec_ourselves; #else # define prec_ourselves 0 #endif #if NEED_PRINTF_FLAG_LEFTADJUST # define pad_ourselves 1 #elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int pad_ourselves; #else # define pad_ourselves 0 #endif TCHAR_T *fbp; unsigned int prefix_count; int prefixes[2] IF_LINT (= { 0 }); int orig_errno; #if !USE_SNPRINTF size_t tmp_length; TCHAR_T tmpbuf[700]; TCHAR_T *tmp; #endif #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION has_width = 0; #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; width = arg; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = -width; } } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION has_width = 1; #endif } #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } #endif /* Decide whether to handle the precision ourselves. */ #if NEED_PRINTF_UNBOUNDED_PRECISION switch (dp->conversion) { case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': prec_ourselves = has_precision && (precision > 0); break; default: prec_ourselves = 0; break; } #endif /* Decide whether to perform the padding ourselves. */ #if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION) switch (dp->conversion) { # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need to perform the padding after this conversion. Functions with unistdio extensions perform the padding based on character count rather than element count. */ case 'c': case 's': # endif # if NEED_PRINTF_FLAG_ZERO case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': # endif pad_ourselves = 1; break; default: pad_ourselves = prec_ourselves; break; } #endif #if !USE_SNPRINTF /* Allocate a temporary buffer of sufficient size for calling sprintf. */ tmp_length = MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type, flags, width, has_precision, precision, pad_ourselves); if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (TCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } #endif /* Construct the format string for calling snprintf or sprintf. */ fbp = buf; *fbp++ = '%'; #if NEED_PRINTF_FLAG_GROUPING /* The underlying implementation doesn't support the ' flag. Produce no grouping characters in this case; this is acceptable because the grouping is locale dependent. */ #else if (flags & FLAG_GROUP) *fbp++ = '\''; #endif if (flags & FLAG_LEFT) *fbp++ = '-'; if (flags & FLAG_SHOWSIGN) *fbp++ = '+'; if (flags & FLAG_SPACE) *fbp++ = ' '; if (flags & FLAG_ALT) *fbp++ = '#'; #if __GLIBC__ >= 2 && !defined __UCLIBC__ if (flags & FLAG_LOCALIZED) *fbp++ = 'I'; #endif if (!pad_ourselves) { if (flags & FLAG_ZERO) *fbp++ = '0'; if (dp->width_start != dp->width_end) { size_t n = dp->width_end - dp->width_start; /* The width specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->width_start; do *fbp++ = *mp++; while (--n > 0); } } } if (!prec_ourselves) { if (dp->precision_start != dp->precision_end) { size_t n = dp->precision_end - dp->precision_start; /* The precision specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->precision_start; do *fbp++ = *mp++; while (--n > 0); } } } switch (type) { #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *fbp++ = 'I'; *fbp++ = '6'; *fbp++ = '4'; break; # else *fbp++ = 'l'; # endif #endif FALLTHROUGH; case TYPE_LONGINT: case TYPE_ULONGINT: #if HAVE_WINT_T case TYPE_WIDE_CHAR: #endif #if HAVE_WCHAR_T case TYPE_WIDE_STRING: #endif *fbp++ = 'l'; break; case TYPE_LONGDOUBLE: *fbp++ = 'L'; break; default: break; } #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') *fbp = 'f'; else #endif *fbp = dp->conversion; #if USE_SNPRINTF # if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \ && !defined __UCLIBC__) \ || (defined __APPLE__ && defined __MACH__) \ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) fbp[1] = '%'; fbp[2] = 'n'; fbp[3] = '\0'; # else /* On glibc2 systems from glibc >= 2.3 - probably also older ones - we know that snprintf's return value conforms to ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and gl_SNPRINTF_TRUNCATION_C99 pass. Therefore we can avoid using %n in this situation. On glibc2 systems from 2004-10-18 or newer, the use of %n in format strings in writable memory may crash the program (if compiled with _FORTIFY_SOURCE=2), so we should avoid it in this situation. */ /* On Mac OS X 10.3 or newer, we know that snprintf's return value conforms to ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and gl_SNPRINTF_TRUNCATION_C99 pass. Therefore we can avoid using %n in this situation. On Mac OS X 10.13 or newer, the use of %n in format strings in writable memory by default crashes the program, so we should avoid it in this situation. */ /* On native Windows systems (such as mingw), we can avoid using %n because: - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, snprintf does not write more than the specified number of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes '4', '5', '6' into buf, not '4', '5', '\0'.) - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf allows us to recognize the case of an insufficient buffer size: it returns -1 in this case. On native Windows systems (such as mingw) where the OS is Windows Vista, the use of %n in format strings by default crashes the program. See and So we should avoid %n in this situation. */ fbp[1] = '\0'; # endif #else fbp[1] = '\0'; #endif /* Construct the arguments for calling snprintf or sprintf. */ prefix_count = 0; if (!pad_ourselves && dp->width_arg_index != ARG_NONE) { if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; } if (!prec_ourselves && dp->precision_arg_index != ARG_NONE) { if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; } #if USE_SNPRINTF /* The SNPRINTF result is appended after result[0..length]. The latter is an array of DCHAR_T; SNPRINTF appends an array of TCHAR_T to it. This is possible because sizeof (TCHAR_T) divides sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). */ # define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) /* Ensure that maxlen below will be >= 2. Needed on BeOS, where an snprintf() with maxlen==1 acts like sprintf(). */ ENSURE_ALLOCATION (xsum (length, (2 + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR)); /* Prepare checking whether snprintf returns the count via %n. */ *(TCHAR_T *) (result + length) = '\0'; #endif orig_errno = errno; for (;;) { int count = -1; #if USE_SNPRINTF int retcount = 0; size_t maxlen = allocated - length; /* SNPRINTF can fail if its second argument is > INT_MAX. */ if (maxlen > INT_MAX / TCHARS_PER_DCHAR) maxlen = INT_MAX / TCHARS_PER_DCHAR; maxlen = maxlen * TCHARS_PER_DCHAR; # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ arg, &count); \ break; \ case 1: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], arg, &count); \ break; \ case 2: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], prefixes[1], arg, \ &count); \ break; \ default: \ abort (); \ } #else # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ count = sprintf (tmp, buf, arg); \ break; \ case 1: \ count = sprintf (tmp, buf, prefixes[0], arg); \ break; \ case 2: \ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ arg); \ break; \ default: \ abort (); \ } #endif errno = 0; switch (type) { case TYPE_SCHAR: { int arg = a.arg[dp->arg_index].a.a_schar; SNPRINTF_BUF (arg); } break; case TYPE_UCHAR: { unsigned int arg = a.arg[dp->arg_index].a.a_uchar; SNPRINTF_BUF (arg); } break; case TYPE_SHORT: { int arg = a.arg[dp->arg_index].a.a_short; SNPRINTF_BUF (arg); } break; case TYPE_USHORT: { unsigned int arg = a.arg[dp->arg_index].a.a_ushort; SNPRINTF_BUF (arg); } break; case TYPE_INT: { int arg = a.arg[dp->arg_index].a.a_int; SNPRINTF_BUF (arg); } break; case TYPE_UINT: { unsigned int arg = a.arg[dp->arg_index].a.a_uint; SNPRINTF_BUF (arg); } break; case TYPE_LONGINT: { long int arg = a.arg[dp->arg_index].a.a_longint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGINT: { unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; SNPRINTF_BUF (arg); } break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: { long long int arg = a.arg[dp->arg_index].a.a_longlongint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGLONGINT: { unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; SNPRINTF_BUF (arg); } break; #endif case TYPE_DOUBLE: { double arg = a.arg[dp->arg_index].a.a_double; SNPRINTF_BUF (arg); } break; case TYPE_LONGDOUBLE: { long double arg = a.arg[dp->arg_index].a.a_longdouble; SNPRINTF_BUF (arg); } break; case TYPE_CHAR: { int arg = a.arg[dp->arg_index].a.a_char; SNPRINTF_BUF (arg); } break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: { wint_t arg = a.arg[dp->arg_index].a.a_wide_char; SNPRINTF_BUF (arg); } break; #endif case TYPE_STRING: { const char *arg = a.arg[dp->arg_index].a.a_string; SNPRINTF_BUF (arg); } break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; SNPRINTF_BUF (arg); } break; #endif case TYPE_POINTER: { void *arg = a.arg[dp->arg_index].a.a_pointer; SNPRINTF_BUF (arg); } break; default: abort (); } #if USE_SNPRINTF /* Portability: Not all implementations of snprintf() are ISO C 99 compliant. Determine the number of bytes that snprintf() has produced or would have produced. */ if (count >= 0) { /* Verify that snprintf() has NUL-terminated its result. */ if (count < maxlen && ((TCHAR_T *) (result + length)) [count] != '\0') abort (); /* Portability hack. */ if (retcount > count) count = retcount; } else { /* snprintf() doesn't understand the '%n' directive. */ if (fbp[1] != '\0') { /* Don't use the '%n' directive; instead, look at the snprintf() return value. */ fbp[1] = '\0'; continue; } else { /* Look at the snprintf() return value. */ if (retcount < 0) { # if !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF /* HP-UX 10.20 snprintf() is doubly deficient: It doesn't understand the '%n' directive, *and* it returns -1 (rather than the length that would have been required) when the buffer is too small. But a failure at this point can also come from other reasons than a too small buffer, such as an invalid wide string argument to the %ls directive, or possibly an invalid floating-point argument. */ size_t tmp_length = MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type, flags, width, has_precision, precision, pad_ourselves); if (maxlen < tmp_length) { /* Make more room. But try to do through this reallocation only once. */ size_t bigger_need = xsum (length, xsum (tmp_length, TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR); /* And always grow proportionally. (There may be several arguments, each needing a little more room than the previous one.) */ size_t bigger_need2 = xsum (xtimes (allocated, 2), 12); if (bigger_need < bigger_need2) bigger_need = bigger_need2; ENSURE_ALLOCATION (bigger_need); continue; } # endif } else count = retcount; } } #endif /* Attempt to handle failure. */ if (count < 0) { /* SNPRINTF or sprintf failed. Save and use the errno that it has set, if any. */ int saved_errno = errno; if (saved_errno == 0) { if (dp->conversion == 'c' || dp->conversion == 's') saved_errno = EILSEQ; else saved_errno = EINVAL; } if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } #if USE_SNPRINTF /* Handle overflow of the allocated buffer. If such an overflow occurs, a C99 compliant snprintf() returns a count >= maxlen. However, a non-compliant snprintf() function returns only count = maxlen - 1. To cover both cases, test whether count >= maxlen - 1. */ if ((unsigned int) count + 1 >= maxlen) { /* If maxlen already has attained its allowed maximum, allocating more memory will not increase maxlen. Instead of looping, bail out. */ if (maxlen == INT_MAX / TCHARS_PER_DCHAR) goto overflow; else { /* Need at least (count + 1) * sizeof (TCHAR_T) bytes. (The +1 is for the trailing NUL.) But ask for (count + 2) * sizeof (TCHAR_T) bytes, so that in the next round, we likely get maxlen > (unsigned int) count + 1 and so we don't get here again. And allocate proportionally, to avoid looping eternally if snprintf() reports a too small count. */ size_t n = xmax (xsum (length, ((unsigned int) count + 2 + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); continue; } } #endif #if NEED_PRINTF_UNBOUNDED_PRECISION if (prec_ourselves) { /* Handle the precision. */ TCHAR_T *prec_ptr = # if USE_SNPRINTF (TCHAR_T *) (result + length); # else tmp; # endif size_t prefix_count; size_t move; prefix_count = 0; /* Put the additional zeroes after the sign. */ if (count >= 1 && (*prec_ptr == '-' || *prec_ptr == '+' || *prec_ptr == ' ')) prefix_count = 1; /* Put the additional zeroes after the 0x prefix if (flags & FLAG_ALT) || (dp->conversion == 'p'). */ else if (count >= 2 && prec_ptr[0] == '0' && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X')) prefix_count = 2; move = count - prefix_count; if (precision > move) { /* Insert zeroes. */ size_t insert = precision - move; TCHAR_T *prec_end; # if USE_SNPRINTF size_t n = xsum (length, (count + insert + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR); length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; ENSURE_ALLOCATION (n); length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; prec_ptr = (TCHAR_T *) (result + length); # endif prec_end = prec_ptr + count; prec_ptr += prefix_count; while (prec_end > prec_ptr) { prec_end--; prec_end[insert] = prec_end[0]; } prec_end += insert; do *--prec_end = '0'; while (prec_end > prec_ptr); count += insert; } } #endif #if !USE_SNPRINTF if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); #endif #if !DCHAR_IS_TCHAR /* Convert from TCHAR_T[] to DCHAR_T[]. */ if (dp->conversion == 'c' || dp->conversion == 's') { /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING TYPE_WIDE_STRING. The result string is not certainly ASCII. */ const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; /* This code assumes that TCHAR_T is 'char'. */ verify (sizeof (TCHAR_T) == 1); # if USE_SNPRINTF tmpsrc = (TCHAR_T *) (result + length); # else tmpsrc = tmp; # endif tmpdst = DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, count, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); count = tmpdst_len; } else { /* The result string is ASCII. Simple 1:1 conversion. */ # if USE_SNPRINTF /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a no-op conversion, in-place on the array starting at (result + length). */ if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) # endif { const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t n; # if USE_SNPRINTF if (result == resultbuf) { tmpsrc = (TCHAR_T *) (result + length); /* ENSURE_ALLOCATION will not move tmpsrc (because it's part of resultbuf). */ ENSURE_ALLOCATION (xsum (length, count)); } else { /* ENSURE_ALLOCATION will move the array (because it uses realloc(). */ ENSURE_ALLOCATION (xsum (length, count)); tmpsrc = (TCHAR_T *) (result + length); } # else tmpsrc = tmp; ENSURE_ALLOCATION (xsum (length, count)); # endif tmpdst = result + length; /* Copy backwards, because of overlapping. */ tmpsrc += count; tmpdst += count; for (n = count; n > 0; n--) *--tmpdst = *--tmpsrc; } } #endif #if DCHAR_IS_TCHAR && !USE_SNPRINTF /* Make room for the result. */ if (count > allocated - length) { /* Need at least count elements. But allocate proportionally. */ size_t n = xmax (xsum (length, count), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); } #endif /* Here count <= allocated - length. */ /* Perform padding. */ #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION if (pad_ourselves && has_width) { size_t w; # if ENABLE_UNISTDIO /* Outside POSIX, it's preferable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, count); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = count; # endif if (w < width) { size_t pad = width - w; /* Make room for the result. */ if (xsum (count, pad) > allocated - length) { /* Need at least count + pad elements. But allocate proportionally. */ size_t n = xmax (xsum3 (length, count, pad), xtimes (allocated, 2)); # if USE_SNPRINTF length += count; ENSURE_ALLOCATION (n); length -= count; # else ENSURE_ALLOCATION (n); # endif } /* Here count + pad <= allocated - length. */ { # if !DCHAR_IS_TCHAR || USE_SNPRINTF DCHAR_T * const rp = result + length; # else DCHAR_T * const rp = tmp; # endif DCHAR_T *p = rp + count; DCHAR_T *end = p + pad; DCHAR_T *pad_ptr; # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO if (dp->conversion == 'c' || dp->conversion == 's') /* No zero-padding for string directives. */ pad_ptr = NULL; else # endif { pad_ptr = (*rp == '-' ? rp + 1 : rp); /* No zero-padding of "inf" and "nan". */ if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) pad_ptr = NULL; } /* The generated string now extends from rp to p, with the zero padding insertion point being at pad_ptr. */ count = count + pad; /* = end - rp */ if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > rp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } } } } #endif /* Here still count <= allocated - length. */ #if !DCHAR_IS_TCHAR || USE_SNPRINTF /* The snprintf() result did fit. */ #else /* Append the sprintf() result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); #endif #if !USE_SNPRINTF if (tmp != tmpbuf) free (tmp); #endif #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') { /* Convert the %f result to upper case for %F. */ DCHAR_T *rp = result + length; size_t rc; for (rc = count; rc > 0; rc--, rp++) if (*rp >= 'a' && *rp <= 'z') *rp = *rp - 'a' + 'A'; } #endif length += count; break; } errno = orig_errno; #undef pad_ourselves #undef prec_ourselves } } } /* Add the final NUL. */ ENSURE_ALLOCATION (xsum (length, 1)); result[length] = '\0'; if (result != resultbuf && length + 1 < allocated) { /* Shrink the allocated memory if possible. */ DCHAR_T *memory; memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); if (memory != NULL) result = memory; } if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); *lengthp = length; /* Note that we can produce a big string of a length > INT_MAX. POSIX says that snprintf() fails with errno = EOVERFLOW in this case, but that's only because snprintf() returns an 'int'. This function does not have this limitation. */ return result; #if USE_SNPRINTF overflow: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EOVERFLOW; return NULL; #endif out_of_memory: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); out_of_memory_1: CLEANUP (); errno = ENOMEM; return NULL; } } #undef MAX_ROOM_NEEDED #undef TCHARS_PER_DCHAR #undef SNPRINTF #undef USE_SNPRINTF #undef DCHAR_SET #undef DCHAR_CPY #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef DCHAR_IS_TCHAR #undef TCHAR_T #undef DCHAR_T #undef FCHAR_T #undef VASNPRINTF pspp-1.0.1/gl/byteswap.in.h0000644000175000017500000000372313124536241012440 00000000000000/* byteswap.h - Byte swapping Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc. Written by Oskar Liljeblad , 2005. 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 . */ #ifndef _GL_BYTESWAP_H #define _GL_BYTESWAP_H /* Given an unsigned 16-bit argument X, return the value corresponding to X with reversed byte order. */ #define bswap_16(x) ((((x) & 0x00FF) << 8) | \ (((x) & 0xFF00) >> 8)) /* Given an unsigned 32-bit argument X, return the value corresponding to X with reversed byte order. */ #define bswap_32(x) ((((x) & 0x000000FF) << 24) | \ (((x) & 0x0000FF00) << 8) | \ (((x) & 0x00FF0000) >> 8) | \ (((x) & 0xFF000000) >> 24)) /* Given an unsigned 64-bit argument X, return the value corresponding to X with reversed byte order. */ #define bswap_64(x) ((((x) & 0x00000000000000FFULL) << 56) | \ (((x) & 0x000000000000FF00ULL) << 40) | \ (((x) & 0x0000000000FF0000ULL) << 24) | \ (((x) & 0x00000000FF000000ULL) << 8) | \ (((x) & 0x000000FF00000000ULL) >> 8) | \ (((x) & 0x0000FF0000000000ULL) >> 24) | \ (((x) & 0x00FF000000000000ULL) >> 40) | \ (((x) & 0xFF00000000000000ULL) >> 56)) #endif /* _GL_BYTESWAP_H */ pspp-1.0.1/gl/uinttostr.c0000644000175000017500000000011613020461274012232 00000000000000#define anytostr uinttostr #define inttype unsigned int #include "anytostr.c" pspp-1.0.1/gl/same-inode.h0000644000175000017500000000324413124536243012216 00000000000000/* Determine whether two stat buffers are known to refer to the same file. Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef SAME_INODE_H # define SAME_INODE_H 1 # include # if defined __VMS && __CRTL_VER < 80200000 # define SAME_INODE(a, b) \ ((a).st_ino[0] == (b).st_ino[0] \ && (a).st_ino[1] == (b).st_ino[1] \ && (a).st_ino[2] == (b).st_ino[2] \ && (a).st_dev == (b).st_dev) # elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Windows. */ # if _GL_WINDOWS_STAT_INODES /* stat() and fstat() set st_dev and st_ino to 0 if information about the inode is not available. */ # define SAME_INODE(a, b) \ (!((a).st_ino == 0 && (a).st_dev == 0) \ && (a).st_ino == (b).st_ino && (a).st_dev == (b).st_dev) # else /* stat() and fstat() set st_ino to 0 always. */ # define SAME_INODE(a, b) 0 # endif # else # define SAME_INODE(a, b) \ ((a).st_ino == (b).st_ino \ && (a).st_dev == (b).st_dev) # endif #endif pspp-1.0.1/gl/stdio-impl.h0000644000175000017500000001207413132510757012260 00000000000000/* Implementation details of FILE streams. Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Many stdio implementations have the same logic and therefore can share the same implementation of stdio extension API, except that some fields have different naming conventions, or their access requires some casts. */ /* BSD stdio derived implementations. */ #if defined __NetBSD__ /* NetBSD */ /* Get __NetBSD_Version__. */ # include #endif #include /* For detecting Plan9. */ #if defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ # if defined __DragonFly__ /* DragonFly */ /* See . */ # define fp_ ((struct { struct __FILE_public pub; \ struct { unsigned char *_base; int _size; } _bf; \ void *cookie; \ void *_close; \ void *_read; \ void *_seek; \ void *_write; \ struct { unsigned char *_base; int _size; } _ub; \ int _ur; \ unsigned char _ubuf[3]; \ unsigned char _nbuf[1]; \ struct { unsigned char *_base; int _size; } _lb; \ int _blksize; \ fpos_t _offset; \ /* More fields, not relevant here. */ \ } *) fp) /* See . */ # define _p pub._p # define _flags pub._flags # define _r pub._r # define _w pub._w # else # define fp_ fp # endif # if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Minix 3, Android */ /* See and */ struct __sfileext { struct __sbuf _ub; /* ungetc buffer */ /* More fields, not relevant here. */ }; # define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub # else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */ # define fp_ub fp_->_ub # endif # define HASUB(fp) (fp_ub._base != NULL) #endif /* SystemV derived implementations. */ #ifdef __TANDEM /* NonStop Kernel */ # ifndef _IOERR /* These values were determined by the program 'stdioext-flags' at . */ # define _IOERR 0x40 # define _IOREAD 0x80 # define _IOWRT 0x4 # define _IORW 0x100 # endif #endif #if defined _IOERR # if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */ # define fp_ ((struct { unsigned char *_ptr; \ unsigned char *_base; \ unsigned char *_end; \ long _cnt; \ int _file; \ unsigned int _flag; \ } *) fp) # elif defined __VMS /* OpenVMS */ # define fp_ ((struct _iobuf *) fp) # else # define fp_ fp # endif # if defined _SCO_DS /* OpenServer */ # define _cnt __cnt # define _ptr __ptr # define _base __base # define _flag __flag # endif #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */ /* does not define the innards of FILE any more. */ # define WINDOWS_OPAQUE_FILE struct _gl_real_FILE { /* Note: Compared to older Windows and to mingw, it has the fields _base and _cnt swapped. */ unsigned char *_ptr; unsigned char *_base; int _cnt; int _flag; int _file; int _charbuf; int _bufsiz; }; # define fp_ ((struct _gl_real_FILE *) fp) /* These values were determined by a program similar to the one at . */ # define _IOREAD 0x1 # define _IOWRT 0x2 # define _IORW 0x4 # define _IOEOF 0x8 # define _IOERR 0x10 #endif pspp-1.0.1/gl/ftell.c0000644000175000017500000000215513124536242011275 00000000000000/* An ftell() function that works around platform bugs. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include #include #include long ftell (FILE *fp) { /* Use the replacement ftello function with all its workarounds. */ off_t offset = ftello (fp); if (LONG_MIN <= offset && offset <= LONG_MAX) return /* (long) */ offset; else { errno = EOVERFLOW; return -1; } } pspp-1.0.1/gl/alloca.in.h0000644000175000017500000000400113124536241012023 00000000000000/* Memory allocation on the stack. Copyright (C) 1995, 1999, 2001-2004, 2006-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ #ifndef _GL_ALLOCA_H #define _GL_ALLOCA_H /* alloca (N) returns a pointer to N bytes of memory allocated on the stack, which will last until the function returns. Use of alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns, - for huge N (say, N >= 65536) - you never know how large (or small) the stack is, and when the stack cannot fulfill the memory allocation request, the program just crashes. */ #ifndef alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _AIX # define alloca __alloca # elif defined _MSC_VER # include # define alloca _alloca # elif defined __DECC && defined __VMS # define alloca __ALLOCA # elif defined __TANDEM && defined _TNS_E_TARGET # ifdef __cplusplus extern "C" # endif void *_alloca (unsigned short); # pragma intrinsic (_alloca) # define alloca _alloca # elif defined __MVS__ # include # else # include # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif #endif /* _GL_ALLOCA_H */ pspp-1.0.1/gl/isnan.c0000644000175000017500000001560513124536242011303 00000000000000/* Test for NaN that does not need libm. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible , 2007. */ #include /* Specification. */ #ifdef USE_LONG_DOUBLE /* Specification found in math.h or isnanl-nolibm.h. */ extern int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; #elif ! defined USE_FLOAT /* Specification found in math.h or isnand-nolibm.h. */ extern int rpl_isnand (double x); #else /* defined USE_FLOAT */ /* Specification found in math.h or isnanf-nolibm.h. */ extern int rpl_isnanf (float x); #endif #include #include #include "float+.h" #ifdef USE_LONG_DOUBLE # define FUNC rpl_isnanl # define DOUBLE long double # define MAX_EXP LDBL_MAX_EXP # define MIN_EXP LDBL_MIN_EXP # if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT # define KNOWN_EXPBIT0_LOCATION # define EXPBIT0_WORD LDBL_EXPBIT0_WORD # define EXPBIT0_BIT LDBL_EXPBIT0_BIT # endif # define SIZE SIZEOF_LDBL # define L_(literal) literal##L #elif ! defined USE_FLOAT # define FUNC rpl_isnand # define DOUBLE double # define MAX_EXP DBL_MAX_EXP # define MIN_EXP DBL_MIN_EXP # if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT # define KNOWN_EXPBIT0_LOCATION # define EXPBIT0_WORD DBL_EXPBIT0_WORD # define EXPBIT0_BIT DBL_EXPBIT0_BIT # endif # define SIZE SIZEOF_DBL # define L_(literal) literal #else /* defined USE_FLOAT */ # define FUNC rpl_isnanf # define DOUBLE float # define MAX_EXP FLT_MAX_EXP # define MIN_EXP FLT_MIN_EXP # if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT # define KNOWN_EXPBIT0_LOCATION # define EXPBIT0_WORD FLT_EXPBIT0_WORD # define EXPBIT0_BIT FLT_EXPBIT0_BIT # endif # define SIZE SIZEOF_FLT # define L_(literal) literal##f #endif #define EXP_MASK ((MAX_EXP - MIN_EXP) | 7) #define NWORDS \ ((sizeof (DOUBLE) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { DOUBLE value; unsigned int word[NWORDS]; } memory_double; /* Most hosts nowadays use IEEE floating point, so they use IEC 60559 representations, have infinities and NaNs, and do not trap on exceptions. Define IEEE_FLOATING_POINT if this host is one of the typical ones. The C11 macro __STDC_IEC_559__ is close to what is wanted here, but is not quite right because this file does not require all the features of C11 Annex F (and does not require C11 at all, for that matter). */ #define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) int FUNC (DOUBLE x) { #if defined KNOWN_EXPBIT0_LOCATION && IEEE_FLOATING_POINT # if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Special CPU dependent code is needed to treat bit patterns outside the IEEE 754 specification (such as Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals) as NaNs. These bit patterns are: - exponent = 0x0001..0x7FFF, mantissa bit 63 = 0, - exponent = 0x0000, mantissa bit 63 = 1. The NaN bit pattern is: - exponent = 0x7FFF, mantissa >= 0x8000000000000001. */ memory_double m; unsigned int exponent; m.value = x; exponent = (m.word[EXPBIT0_WORD] >> EXPBIT0_BIT) & EXP_MASK; # ifdef WORDS_BIGENDIAN /* Big endian: EXPBIT0_WORD = 0, EXPBIT0_BIT = 16. */ if (exponent == 0) return 1 & (m.word[0] >> 15); else if (exponent == EXP_MASK) return (((m.word[0] ^ 0x8000U) << 16) | m.word[1] | (m.word[2] >> 16)) != 0; else return 1 & ~(m.word[0] >> 15); # else /* Little endian: EXPBIT0_WORD = 2, EXPBIT0_BIT = 0. */ if (exponent == 0) return (m.word[1] >> 31); else if (exponent == EXP_MASK) return ((m.word[1] ^ 0x80000000U) | m.word[0]) != 0; else return (m.word[1] >> 31) ^ 1; # endif # else /* Be careful to not do any floating-point operation on x, such as x == x, because x may be a signaling NaN. */ # if defined __SUNPRO_C || defined __ICC || defined _MSC_VER \ || defined __DECC || defined __TINYC__ \ || (defined __sgi && !defined __GNUC__) /* The Sun C 5.0, Intel ICC 10.0, Microsoft Visual C/C++ 9.0, Compaq (ex-DEC) 6.4, and TinyCC compilers don't recognize the initializers as constant expressions. The Compaq compiler also fails when constant-folding 0.0 / 0.0 even when constant-folding is not required. The Microsoft Visual C/C++ compiler also fails when constant-folding 1.0 / 0.0 even when constant-folding is not required. The SGI MIPSpro C compiler complains about "floating-point operation result is out of range". */ static DOUBLE zero = L_(0.0); memory_double nan; DOUBLE plus_inf = L_(1.0) / zero; DOUBLE minus_inf = -L_(1.0) / zero; nan.value = zero / zero; # else static memory_double nan = { L_(0.0) / L_(0.0) }; static DOUBLE plus_inf = L_(1.0) / L_(0.0); static DOUBLE minus_inf = -L_(1.0) / L_(0.0); # endif { memory_double m; /* A NaN can be recognized through its exponent. But exclude +Infinity and -Infinity, which have the same exponent. */ m.value = x; if (((m.word[EXPBIT0_WORD] ^ nan.word[EXPBIT0_WORD]) & (EXP_MASK << EXPBIT0_BIT)) == 0) return (memcmp (&m.value, &plus_inf, SIZE) != 0 && memcmp (&m.value, &minus_inf, SIZE) != 0); else return 0; } # endif #else /* The configuration did not find sufficient information, or does not use IEEE floating point. Give up about the signaling NaNs; handle only the quiet NaNs. */ if (x == x) { # if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Detect any special bit patterns that pass ==; see comment above. */ memory_double m1; memory_double m2; memset (&m1.value, 0, SIZE); memset (&m2.value, 0, SIZE); m1.value = x; m2.value = x + (x ? 0.0L : -0.0L); if (memcmp (&m1.value, &m2.value, SIZE) != 0) return 1; # endif return 0; } else return 1; #endif } pspp-1.0.1/gl/printf-frexp.h0000644000175000017500000000206013124536242012613 00000000000000/* Split a double into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Write a finite, positive number x as x = mantissa * 2^exp where exp >= DBL_MIN_EXP - 1, mantissa < 2.0, if x is not a denormalized number then mantissa >= 1.0. Store exp in *EXPPTR and return mantissa. */ extern double printf_frexp (double x, int *expptr); pspp-1.0.1/gl/stdarg.in.h0000644000175000017500000000216213124536243012064 00000000000000/* Substitute for and wrapper around . Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _@GUARD_PREFIX@_STDARG_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDARG_H@ #ifndef _@GUARD_PREFIX@_STDARG_H #define _@GUARD_PREFIX@_STDARG_H #ifndef va_copy # define va_copy(a,b) ((a) = (b)) #endif #endif /* _@GUARD_PREFIX@_STDARG_H */ #endif /* _@GUARD_PREFIX@_STDARG_H */ pspp-1.0.1/gl/xmalloc.c0000644000175000017500000000641413124536243011631 00000000000000/* xmalloc.c -- malloc with out of memory checking Copyright (C) 1990-2000, 2002-2006, 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #define XALLOC_INLINE _GL_EXTERN_INLINE #include "xalloc.h" #include #include /* 1 if calloc is known to be compatible with GNU calloc. This matters if we are not also using the calloc module, which defines HAVE_CALLOC_GNU and supports the GNU API even on non-GNU platforms. */ #if defined HAVE_CALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__) enum { HAVE_GNU_CALLOC = 1 }; #else enum { HAVE_GNU_CALLOC = 0 }; #endif /* Allocate N bytes of memory dynamically, with error checking. */ void * xmalloc (size_t n) { void *p = malloc (n); if (!p && n != 0) xalloc_die (); return p; } /* Change the size of an allocated block of memory P to N bytes, with error checking. */ void * xrealloc (void *p, size_t n) { if (!n && p) { /* The GNU and C99 realloc behaviors disagree here. Act like GNU, even if the underlying realloc is C99. */ free (p); return NULL; } p = realloc (p, n); if (!p && n) xalloc_die (); return p; } /* If P is null, allocate a block of at least *PN bytes; otherwise, reallocate P so that it contains more than *PN bytes. *PN must be nonzero unless P is null. Set *PN to the new block's size, and return the pointer to the new block. *PN is never set to zero, and the returned pointer is never null. */ void * x2realloc (void *p, size_t *pn) { return x2nrealloc (p, pn, 1); } /* Allocate S bytes of zeroed memory dynamically, with error checking. There's no need for xnzalloc (N, S), since it would be equivalent to xcalloc (N, S). */ void * xzalloc (size_t s) { return memset (xmalloc (s), 0, s); } /* Allocate zeroed memory for N elements of S bytes, with error checking. S must be nonzero. */ void * xcalloc (size_t n, size_t s) { void *p; /* Test for overflow, since objects with size greater than PTRDIFF_MAX cause pointer subtraction to go awry. Omit size-zero tests if HAVE_GNU_CALLOC, since GNU calloc never returns NULL if successful. */ if (xalloc_oversized (n, s) || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0))) xalloc_die (); return p; } /* Clone an object P of size S, with error checking. There's no need for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any need for an arithmetic overflow check. */ void * xmemdup (void const *p, size_t s) { return memcpy (xmalloc (s), p, s); } /* Clone STRING. */ char * xstrdup (char const *string) { return xmemdup (string, strlen (string) + 1); } pspp-1.0.1/gl/strerror-override.c0000644000175000017500000002146513124536243013674 00000000000000/* strerror-override.c --- POSIX compatible system error routine Copyright (C) 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Bruno Haible , 2010. */ #include #include "strerror-override.h" #include #if GNULIB_defined_EWINSOCK /* native Windows platforms */ # if HAVE_WINSOCK2_H # include # endif #endif /* If ERRNUM maps to an errno value defined by gnulib, return a string describing the error. Otherwise return NULL. */ const char * strerror_override (int errnum) { /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */ switch (errnum) { #if REPLACE_STRERROR_0 case 0: return "Success"; #endif #if GNULIB_defined_ESOCK /* native Windows platforms with older */ case EINPROGRESS: return "Operation now in progress"; case EALREADY: return "Operation already in progress"; case ENOTSOCK: return "Socket operation on non-socket"; case EDESTADDRREQ: return "Destination address required"; case EMSGSIZE: return "Message too long"; case EPROTOTYPE: return "Protocol wrong type for socket"; case ENOPROTOOPT: return "Protocol not available"; case EPROTONOSUPPORT: return "Protocol not supported"; case EOPNOTSUPP: return "Operation not supported"; case EAFNOSUPPORT: return "Address family not supported by protocol"; case EADDRINUSE: return "Address already in use"; case EADDRNOTAVAIL: return "Cannot assign requested address"; case ENETDOWN: return "Network is down"; case ENETUNREACH: return "Network is unreachable"; case ECONNRESET: return "Connection reset by peer"; case ENOBUFS: return "No buffer space available"; case EISCONN: return "Transport endpoint is already connected"; case ENOTCONN: return "Transport endpoint is not connected"; case ETIMEDOUT: return "Connection timed out"; case ECONNREFUSED: return "Connection refused"; case ELOOP: return "Too many levels of symbolic links"; case EHOSTUNREACH: return "No route to host"; case EWOULDBLOCK: return "Operation would block"; #endif #if GNULIB_defined_ESTREAMS /* native Windows platforms with older */ case ETXTBSY: return "Text file busy"; case ENODATA: return "No data available"; case ENOSR: return "Out of streams resources"; case ENOSTR: return "Device not a stream"; case ETIME: return "Timer expired"; case EOTHER: return "Other error"; #endif #if GNULIB_defined_EWINSOCK /* native Windows platforms */ case ESOCKTNOSUPPORT: return "Socket type not supported"; case EPFNOSUPPORT: return "Protocol family not supported"; case ESHUTDOWN: return "Cannot send after transport endpoint shutdown"; case ETOOMANYREFS: return "Too many references: cannot splice"; case EHOSTDOWN: return "Host is down"; case EPROCLIM: return "Too many processes"; case EUSERS: return "Too many users"; case EDQUOT: return "Disk quota exceeded"; case ESTALE: return "Stale NFS file handle"; case EREMOTE: return "Object is remote"; # if HAVE_WINSOCK2_H /* WSA_INVALID_HANDLE maps to EBADF */ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */ /* WSA_INVALID_PARAMETER maps to EINVAL */ case WSA_OPERATION_ABORTED: return "Overlapped operation aborted"; case WSA_IO_INCOMPLETE: return "Overlapped I/O event object not in signaled state"; case WSA_IO_PENDING: return "Overlapped operations will complete later"; /* WSAEINTR maps to EINTR */ /* WSAEBADF maps to EBADF */ /* WSAEACCES maps to EACCES */ /* WSAEFAULT maps to EFAULT */ /* WSAEINVAL maps to EINVAL */ /* WSAEMFILE maps to EMFILE */ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */ /* WSAEINPROGRESS maps to EINPROGRESS */ /* WSAEALREADY maps to EALREADY */ /* WSAENOTSOCK maps to ENOTSOCK */ /* WSAEDESTADDRREQ maps to EDESTADDRREQ */ /* WSAEMSGSIZE maps to EMSGSIZE */ /* WSAEPROTOTYPE maps to EPROTOTYPE */ /* WSAENOPROTOOPT maps to ENOPROTOOPT */ /* WSAEPROTONOSUPPORT maps to EPROTONOSUPPORT */ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */ /* WSAEOPNOTSUPP maps to EOPNOTSUPP */ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */ /* WSAEAFNOSUPPORT maps to EAFNOSUPPORT */ /* WSAEADDRINUSE maps to EADDRINUSE */ /* WSAEADDRNOTAVAIL maps to EADDRNOTAVAIL */ /* WSAENETDOWN maps to ENETDOWN */ /* WSAENETUNREACH maps to ENETUNREACH */ /* WSAENETRESET maps to ENETRESET */ /* WSAECONNABORTED maps to ECONNABORTED */ /* WSAECONNRESET maps to ECONNRESET */ /* WSAENOBUFS maps to ENOBUFS */ /* WSAEISCONN maps to EISCONN */ /* WSAENOTCONN maps to ENOTCONN */ /* WSAESHUTDOWN is ESHUTDOWN */ /* WSAETOOMANYREFS is ETOOMANYREFS */ /* WSAETIMEDOUT maps to ETIMEDOUT */ /* WSAECONNREFUSED maps to ECONNREFUSED */ /* WSAELOOP maps to ELOOP */ /* WSAENAMETOOLONG maps to ENAMETOOLONG */ /* WSAEHOSTDOWN is EHOSTDOWN */ /* WSAEHOSTUNREACH maps to EHOSTUNREACH */ /* WSAENOTEMPTY maps to ENOTEMPTY */ /* WSAEPROCLIM is EPROCLIM */ /* WSAEUSERS is EUSERS */ /* WSAEDQUOT is EDQUOT */ /* WSAESTALE is ESTALE */ /* WSAEREMOTE is EREMOTE */ case WSASYSNOTREADY: return "Network subsystem is unavailable"; case WSAVERNOTSUPPORTED: return "Winsock.dll version out of range"; case WSANOTINITIALISED: return "Successful WSAStartup not yet performed"; case WSAEDISCON: return "Graceful shutdown in progress"; case WSAENOMORE: case WSA_E_NO_MORE: return "No more results"; case WSAECANCELLED: case WSA_E_CANCELLED: return "Call was canceled"; case WSAEINVALIDPROCTABLE: return "Procedure call table is invalid"; case WSAEINVALIDPROVIDER: return "Service provider is invalid"; case WSAEPROVIDERFAILEDINIT: return "Service provider failed to initialize"; case WSASYSCALLFAILURE: return "System call failure"; case WSASERVICE_NOT_FOUND: return "Service not found"; case WSATYPE_NOT_FOUND: return "Class type not found"; case WSAEREFUSED: return "Database query was refused"; case WSAHOST_NOT_FOUND: return "Host not found"; case WSATRY_AGAIN: return "Nonauthoritative host not found"; case WSANO_RECOVERY: return "Nonrecoverable error"; case WSANO_DATA: return "Valid name, no data record of requested type"; /* WSA_QOS_* omitted */ # endif #endif #if GNULIB_defined_ENOMSG case ENOMSG: return "No message of desired type"; #endif #if GNULIB_defined_EIDRM case EIDRM: return "Identifier removed"; #endif #if GNULIB_defined_ENOLINK case ENOLINK: return "Link has been severed"; #endif #if GNULIB_defined_EPROTO case EPROTO: return "Protocol error"; #endif #if GNULIB_defined_EMULTIHOP case EMULTIHOP: return "Multihop attempted"; #endif #if GNULIB_defined_EBADMSG case EBADMSG: return "Bad message"; #endif #if GNULIB_defined_EOVERFLOW case EOVERFLOW: return "Value too large for defined data type"; #endif #if GNULIB_defined_ENOTSUP case ENOTSUP: return "Not supported"; #endif #if GNULIB_defined_ENETRESET case ENETRESET: return "Network dropped connection on reset"; #endif #if GNULIB_defined_ECONNABORTED case ECONNABORTED: return "Software caused connection abort"; #endif #if GNULIB_defined_ESTALE case ESTALE: return "Stale NFS file handle"; #endif #if GNULIB_defined_EDQUOT case EDQUOT: return "Disk quota exceeded"; #endif #if GNULIB_defined_ECANCELED case ECANCELED: return "Operation canceled"; #endif #if GNULIB_defined_EOWNERDEAD case EOWNERDEAD: return "Owner died"; #endif #if GNULIB_defined_ENOTRECOVERABLE case ENOTRECOVERABLE: return "State not recoverable"; #endif #if GNULIB_defined_EILSEQ case EILSEQ: return "Invalid or incomplete multibyte or wide character"; #endif default: return NULL; } } pspp-1.0.1/gl/dup2.c0000644000175000017500000001161113124536241011035 00000000000000/* Duplicate an open file descriptor to a specified file descriptor. Copyright (C) 1999, 2004-2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* written by Paul Eggert */ #include /* Specification. */ #include #include #include #if HAVE_DUP2 # undef dup2 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include # if HAVE_MSVC_INVALID_PARAMETER_HANDLER # include "msvc-inval.h" # endif /* Get _get_osfhandle. */ # if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" # else # include # endif # if HAVE_MSVC_INVALID_PARAMETER_HANDLER static int dup2_nothrow (int fd, int desired_fd) { int result; TRY_MSVC_INVAL { result = dup2 (fd, desired_fd); } CATCH_MSVC_INVAL { errno = EBADF; result = -1; } DONE_MSVC_INVAL; return result; } # else # define dup2_nothrow dup2 # endif static int ms_windows_dup2 (int fd, int desired_fd) { int result; /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open, dup2 (fd, fd) returns 0, but all further attempts to use fd in future dup2 calls will hang. */ if (fd == desired_fd) { if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE) { errno = EBADF; return -1; } return fd; } /* Wine 1.0.1 return 0 when desired_fd is negative but not -1: http://bugs.winehq.org/show_bug.cgi?id=21289 */ if (desired_fd < 0) { errno = EBADF; return -1; } result = dup2_nothrow (fd, desired_fd); if (result == 0) result = desired_fd; return result; } # define dup2 ms_windows_dup2 # elif defined __KLIBC__ # include static int klibc_dup2dirfd (int fd, int desired_fd) { int tempfd; int dupfd; tempfd = open ("NUL", O_RDONLY); if (tempfd == -1) return -1; if (tempfd == desired_fd) { close (tempfd); char path[_MAX_PATH]; if (__libc_Back_ioFHToPath (fd, path, sizeof (path))) return -1; return open(path, O_RDONLY); } dupfd = klibc_dup2dirfd (fd, desired_fd); close (tempfd); return dupfd; } static int klibc_dup2 (int fd, int desired_fd) { int dupfd; struct stat sbuf; dupfd = dup2 (fd, desired_fd); if (dupfd == -1 && errno == ENOTSUP \ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode)) { close (desired_fd); return klibc_dup2dirfd (fd, desired_fd); } return dupfd; } # define dup2 klibc_dup2 # endif int rpl_dup2 (int fd, int desired_fd) { int result; # ifdef F_GETFL /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF. On Cygwin 1.5.x, dup2 (1, 1) returns 0. On Cygwin 1.7.17, dup2 (1, -1) dumps core. On Cygwin 1.7.25, dup2 (1, 256) can dump core. On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */ # if HAVE_SETDTABLESIZE setdtablesize (desired_fd + 1); # endif if (desired_fd < 0) fd = desired_fd; if (fd == desired_fd) return fcntl (fd, F_GETFL) == -1 ? -1 : fd; # endif result = dup2 (fd, desired_fd); /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */ if (result == -1 && errno == EMFILE) errno = EBADF; # if REPLACE_FCHDIR if (fd != desired_fd && result != -1) result = _gl_register_dup (fd, result); # endif return result; } #else /* !HAVE_DUP2 */ /* On older platforms, dup2 did not exist. */ # ifndef F_DUPFD static int dupfd (int fd, int desired_fd) { int duplicated_fd = dup (fd); if (duplicated_fd < 0 || duplicated_fd == desired_fd) return duplicated_fd; else { int r = dupfd (fd, desired_fd); int e = errno; close (duplicated_fd); errno = e; return r; } } # endif int dup2 (int fd, int desired_fd) { int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; if (result == -1 || fd == desired_fd) return result; close (desired_fd); # ifdef F_DUPFD result = fcntl (fd, F_DUPFD, desired_fd); # if REPLACE_FCHDIR if (0 <= result) result = _gl_register_dup (fd, result); # endif # else result = dupfd (fd, desired_fd); # endif if (result == -1 && (errno == EMFILE || errno == EINVAL)) errno = EBADF; return result; } #endif /* !HAVE_DUP2 */ pspp-1.0.1/gl/strnlen.c0000644000175000017500000000216413124536243011655 00000000000000/* Find the length of STRING, but scan at most MAXLEN characters. Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. Written by Simon Josefsson. 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, 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 . */ #include #include /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ size_t strnlen (const char *string, size_t maxlen) { const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; } pspp-1.0.1/gl/vfprintf.c0000644000175000017500000000330213124536243012021 00000000000000/* Formatted output to a stream. Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include #include #include #include #include #include "fseterr.h" #include "vasnprintf.h" /* Print formatted output to the stream FP. Return string length of formatted string. On error, return a negative value. */ int vfprintf (FILE *fp, const char *format, va_list args) { char buf[2000]; char *output; size_t len; size_t lenbuf = sizeof (buf); output = vasnprintf (buf, &lenbuf, format, args); len = lenbuf; if (!output) { fseterr (fp); return -1; } if (fwrite (output, 1, len, fp) < len) { if (output != buf) { int saved_errno = errno; free (output); errno = saved_errno; } return -1; } if (output != buf) free (output); if (len > INT_MAX) { errno = EOVERFLOW; fseterr (fp); return -1; } return len; } pspp-1.0.1/gl/math.c0000644000175000017500000000014313020461274011110 00000000000000#include #define _GL_MATH_INLINE _GL_EXTERN_INLINE #include "math.h" typedef int dummy; pspp-1.0.1/gl/gl_xlist.c0000644000175000017500000000012413020461274012003 00000000000000#include #define GL_XLIST_INLINE _GL_EXTERN_INLINE #include "gl_xlist.h" pspp-1.0.1/gl/c-vasnprintf.c0000644000175000017500000000237113124536241012600 00000000000000/* Formatted output to strings in C locale. Copyright (C) 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include #include "printf-parse.h" #define VASNPRINTF c_vasnprintf #define FCHAR_T char #define DCHAR_T char #define DIRECTIVE char_directive #define DIRECTIVES char_directives #define PRINTF_PARSE printf_parse #define DCHAR_CPY memcpy #define DCHAR_SET memset #define DCHAR_IS_TCHAR 1 #define TCHAR_T char #define NEED_PRINTF_DOUBLE 1 #define NEED_PRINTF_LONG_DOUBLE 1 #define decimal_point_char_defined 1 static char decimal_point_char (void) { return '.'; } #include "vasnprintf.c" pspp-1.0.1/gl/imaxtostr.c0000644000175000017500000000011213020461274012205 00000000000000#define anytostr imaxtostr #define inttype intmax_t #include "anytostr.c" pspp-1.0.1/gl/fwriteerror.h0000644000175000017500000000506213124536242012546 00000000000000/* Detect write error on a stream. Copyright (C) 2003, 2005-2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 . */ /* There are two approaches for detecting a write error on a stream opened for writing: (a) Test the return value of every fwrite() or fprintf() call, and react immediately. (b) Just before fclose(), test the error indicator in the stream and the return value of the final fclose() call. The benefit of (a) is that non file related errors (such that ENOMEM during fprintf) and temporary error conditions can be diagnosed accurately. A theoretical benefit of (a) is also that, on POSIX systems, in the case of an ENOSPC error, errno is set and can be used by error() to provide a more accurate error message. But in practice, this benefit is not big because users can easily figure out by themselves why a file cannot be written to, and furthermore the function fwriteerror() can provide errno as well. The big drawback of (a) is extensive error checking code: Every function which does stream output must return an error indicator. This file provides support for (b). */ #include #ifdef __cplusplus extern "C" { #endif /* Write out the not yet written buffered contents of the stream FP, close the stream FP, and test whether some error occurred on the stream FP. FP must be a stream opened for writing. Return 0 if no error occurred and fclose (fp) succeeded. Return -1 and set errno if there was an error. The errno value will be 0 if the cause of the error cannot be determined. For any given stream FP other than stdout, fwriteerror (FP) may only be called once. */ extern int fwriteerror (FILE *fp); /* Likewise, but don't consider it an error if FP has an invalid file descriptor and no output was done to FP. */ extern int fwriteerror_no_ebadf (FILE *fp); #ifdef __cplusplus } #endif pspp-1.0.1/gl/Makefile.am0000644000175000017500000040273413124536251012066 00000000000000## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; you can 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 file is distributed in the hope that 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 file. If not, see . # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=gl/doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl assert byteswap c-ctype c-snprintf c-strcase c-strcasestr c-strtod c-xvasprintf clean-temp close configmake count-one-bits crc crypto/md4 crypto/rijndael dirname dtoastr environ fatal-signal fcntl fpieee fprintf-posix fseeko ftello full-read full-write fwriteerror getline getopt-gnu getpass gettext gettimeofday gitlog-to-changelog include_next intprops inttostr isfinite isinf isnan localcharset mbchar mbiter memcasecmp memchr memchr2 mempcpy memrchr minmax mkdtemp mkstemp pipe2 printf-posix printf-safe progname rawmemchr read-file regex relocatable-prog rename round select snprintf snprintf-posix sprintf-posix stdarg stdbool stdint stpcpy strcasestr strerror strftime strsep strtod strtok_r sys_stat tempname termios trunc unicase/u8-casecmp unicase/u8-casefold unicase/u8-tolower unicase/u8-toupper unictype/category-of unictype/ctype-print unigbrk/uc-is-grapheme-break unilbrk/u8-possible-linebreaks uninorm/nfkd unistd unistr/u8-check unistr/u8-cpy unistr/u8-mblen unistr/u8-mbtouc unistr/u8-mbtoucr unistr/u8-strlen unistr/u8-strmbtouc unistr/u8-strncat unistr/u8-uctomb unitypes uniwidth/u8-strwidth unlocked-io vasprintf-posix version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf vsnprintf-posix vsprintf-posix xalloc xalloc-die xmalloca xmemdup0 xsize xstrndup xvasprintf AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = EXTRA_DIST = BUILT_SOURCES = SUFFIXES = MOSTLYCLEANFILES = core *.stackdump MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = # No GNU Make output. EXTRA_DIST += m4/gnulib-cache.m4 AM_CPPFLAGS = AM_CFLAGS = noinst_LTLIBRARIES += libgl.la libgl_la_SOURCES = libgl_la_LIBADD = $(gl_LTLIBOBJS) libgl_la_DEPENDENCIES = $(gl_LTLIBOBJS) EXTRA_libgl_la_SOURCES = libgl_la_LDFLAGS = $(AM_LDFLAGS) libgl_la_LDFLAGS += -no-undefined libgl_la_LDFLAGS += $(FLOOR_LIBM) libgl_la_LDFLAGS += $(ISNAND_LIBM) libgl_la_LDFLAGS += $(ISNANF_LIBM) libgl_la_LDFLAGS += $(ISNANL_LIBM) libgl_la_LDFLAGS += $(LIBSOCKET) libgl_la_LDFLAGS += $(LIB_SELECT) libgl_la_LDFLAGS += $(LTLIBINTL) libgl_la_LDFLAGS += $(LTLIBTHREAD) libgl_la_LDFLAGS += $(ROUND_LIBM) libgl_la_LDFLAGS += $(TRUNC_LIBM) ## begin gnulib module absolute-header # Use this preprocessor expression to decide whether #include_next works. # Do not rely on a 'configure'-time test for this, since the expression # might appear in an installed header, which is used by some other compiler. HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) ## end gnulib module absolute-header ## begin gnulib module alloca libgl_la_LIBADD += @LTALLOCA@ libgl_la_DEPENDENCIES += @LTALLOCA@ EXTRA_DIST += alloca.c EXTRA_libgl_la_SOURCES += alloca.c ## end gnulib module alloca ## begin gnulib module alloca-opt BUILT_SOURCES += $(ALLOCA_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. if GL_GENERATE_ALLOCA_H alloca.h: alloca.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t && \ mv -f $@-t $@ else alloca.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += alloca.h alloca.h-t EXTRA_DIST += alloca.in.h ## end gnulib module alloca-opt ## begin gnulib module allocator libgl_la_SOURCES += allocator.c EXTRA_DIST += allocator.h ## end gnulib module allocator ## begin gnulib module areadlink libgl_la_SOURCES += areadlink.c EXTRA_DIST += areadlink.h ## end gnulib module areadlink ## begin gnulib module array-mergesort EXTRA_DIST += array-mergesort.h ## end gnulib module array-mergesort ## begin gnulib module binary-io libgl_la_SOURCES += binary-io.h binary-io.c ## end gnulib module binary-io ## begin gnulib module btowc EXTRA_DIST += btowc.c EXTRA_libgl_la_SOURCES += btowc.c ## end gnulib module btowc ## begin gnulib module byteswap BUILT_SOURCES += $(BYTESWAP_H) # We need the following in order to create when the system # doesn't have one. if GL_GENERATE_BYTESWAP_H byteswap.h: byteswap.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/byteswap.in.h; \ } > $@-t && \ mv -f $@-t $@ else byteswap.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += byteswap.h byteswap.h-t EXTRA_DIST += byteswap.in.h ## end gnulib module byteswap ## begin gnulib module c-ctype libgl_la_SOURCES += c-ctype.h c-ctype.c ## end gnulib module c-ctype ## begin gnulib module c-snprintf libgl_la_SOURCES += c-snprintf.c EXTRA_DIST += c-snprintf.h ## end gnulib module c-snprintf ## begin gnulib module c-strcase libgl_la_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c ## end gnulib module c-strcase ## begin gnulib module c-strcasestr libgl_la_SOURCES += c-strcasestr.h c-strcasestr.c EXTRA_DIST += str-two-way.h ## end gnulib module c-strcasestr ## begin gnulib module c-strtod libgl_la_SOURCES += c-strtod.c EXTRA_DIST += c-strtod.h ## end gnulib module c-strtod ## begin gnulib module c-vasnprintf libgl_la_SOURCES += c-vasnprintf.c EXTRA_DIST += c-vasnprintf.h float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h EXTRA_libgl_la_SOURCES += printf-args.c printf-parse.c vasnprintf.c ## end gnulib module c-vasnprintf ## begin gnulib module c-vasprintf libgl_la_SOURCES += c-asprintf.c c-vasprintf.c EXTRA_DIST += c-vasprintf.h ## end gnulib module c-vasprintf ## begin gnulib module c-xvasprintf libgl_la_SOURCES += c-xasprintf.c c-xvasprintf.c EXTRA_DIST += c-xvasprintf.h ## end gnulib module c-xvasprintf ## begin gnulib module canonicalize-lgpl EXTRA_DIST += canonicalize-lgpl.c EXTRA_libgl_la_SOURCES += canonicalize-lgpl.c ## end gnulib module canonicalize-lgpl ## begin gnulib module careadlinkat libgl_la_SOURCES += careadlinkat.c EXTRA_DIST += careadlinkat.h ## end gnulib module careadlinkat ## begin gnulib module clean-temp libgl_la_SOURCES += clean-temp.h clean-temp.c ## end gnulib module clean-temp ## begin gnulib module close EXTRA_DIST += close.c EXTRA_libgl_la_SOURCES += close.c ## end gnulib module close ## begin gnulib module configmake # Listed in the same order as the GNU makefile conventions, and # provided by autoconf 2.59c+ or 2.70. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile $(AM_V_GEN)rm -f $@-t && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ echo '#define SBINDIR "$(sbindir)"'; \ echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ echo '#define RUNSTATEDIR "$(runstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ echo '#define INFODIR "$(infodir)"'; \ echo '#define HTMLDIR "$(htmldir)"'; \ echo '#define DVIDIR "$(dvidir)"'; \ echo '#define PDFDIR "$(pdfdir)"'; \ echo '#define PSDIR "$(psdir)"'; \ echo '#define LIBDIR "$(libdir)"'; \ echo '#define LISPDIR "$(lispdir)"'; \ echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ echo '#define PKGDATADIR "$(pkgdatadir)"'; \ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t && \ mv -f $@-t $@ BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t ## end gnulib module configmake ## begin gnulib module count-one-bits libgl_la_SOURCES += count-one-bits.c EXTRA_DIST += count-one-bits.h ## end gnulib module count-one-bits ## begin gnulib module crc libgl_la_SOURCES += crc.c EXTRA_DIST += crc.h ## end gnulib module crc ## begin gnulib module crypto/md4 libgl_la_SOURCES += md4.c EXTRA_DIST += md4.h ## end gnulib module crypto/md4 ## begin gnulib module crypto/rijndael libgl_la_SOURCES += rijndael-alg-fst.c rijndael-api-fst.c EXTRA_DIST += rijndael-alg-fst.h rijndael-api-fst.h ## end gnulib module crypto/rijndael ## begin gnulib module dirname libgl_la_SOURCES += dirname.c basename.c EXTRA_DIST += stripslash.c EXTRA_libgl_la_SOURCES += stripslash.c ## end gnulib module dirname ## begin gnulib module dirname-lgpl libgl_la_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c EXTRA_DIST += dirname.h ## end gnulib module dirname-lgpl ## begin gnulib module dosname EXTRA_DIST += dosname.h ## end gnulib module dosname ## begin gnulib module dtoastr libgl_la_SOURCES += dtoastr.c EXTRA_DIST += ftoastr.c ftoastr.h EXTRA_libgl_la_SOURCES += ftoastr.c ## end gnulib module dtoastr ## begin gnulib module dup2 EXTRA_DIST += dup2.c EXTRA_libgl_la_SOURCES += dup2.c ## end gnulib module dup2 ## begin gnulib module errno BUILT_SOURCES += $(ERRNO_H) # We need the following in order to create when the system # doesn't have one that is POSIX compliant. if GL_GENERATE_ERRNO_H errno.h: errno.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t && \ mv $@-t $@ else errno.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += errno.h errno.h-t EXTRA_DIST += errno.in.h ## end gnulib module errno ## begin gnulib module error EXTRA_DIST += error.c error.h EXTRA_libgl_la_SOURCES += error.c ## end gnulib module error ## begin gnulib module exitfail libgl_la_SOURCES += exitfail.c EXTRA_DIST += exitfail.h ## end gnulib module exitfail ## begin gnulib module fatal-signal libgl_la_SOURCES += fatal-signal.h fatal-signal.c ## end gnulib module fatal-signal ## begin gnulib module fcntl EXTRA_DIST += fcntl.c EXTRA_libgl_la_SOURCES += fcntl.c ## end gnulib module fcntl ## begin gnulib module fcntl-h BUILT_SOURCES += fcntl.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/fcntl.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += fcntl.h fcntl.h-t EXTRA_DIST += fcntl.in.h ## end gnulib module fcntl-h ## begin gnulib module fd-hook libgl_la_SOURCES += fd-hook.c EXTRA_DIST += fd-hook.h ## end gnulib module fd-hook ## begin gnulib module filename EXTRA_DIST += filename.h ## end gnulib module filename ## begin gnulib module flexmember EXTRA_DIST += flexmember.h ## end gnulib module flexmember ## begin gnulib module float BUILT_SOURCES += $(FLOAT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. if GL_GENERATE_FLOAT_H float.h: float.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ < $(srcdir)/float.in.h; \ } > $@-t && \ mv $@-t $@ else float.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += float.h float.h-t EXTRA_DIST += float.c float.in.h itold.c EXTRA_libgl_la_SOURCES += float.c itold.c ## end gnulib module float ## begin gnulib module floor EXTRA_DIST += floor.c EXTRA_libgl_la_SOURCES += floor.c ## end gnulib module floor ## begin gnulib module fprintf-posix EXTRA_DIST += fprintf.c EXTRA_libgl_la_SOURCES += fprintf.c ## end gnulib module fprintf-posix ## begin gnulib module fpucw EXTRA_DIST += fpucw.h ## end gnulib module fpucw ## begin gnulib module frexp-nolibm EXTRA_DIST += frexp.c EXTRA_libgl_la_SOURCES += frexp.c ## end gnulib module frexp-nolibm ## begin gnulib module frexpl-nolibm EXTRA_DIST += frexp.c frexpl.c EXTRA_libgl_la_SOURCES += frexp.c frexpl.c ## end gnulib module frexpl-nolibm ## begin gnulib module fseek EXTRA_DIST += fseek.c EXTRA_libgl_la_SOURCES += fseek.c ## end gnulib module fseek ## begin gnulib module fseeko EXTRA_DIST += fseeko.c stdio-impl.h EXTRA_libgl_la_SOURCES += fseeko.c ## end gnulib module fseeko ## begin gnulib module fseterr EXTRA_DIST += fseterr.c fseterr.h stdio-impl.h EXTRA_libgl_la_SOURCES += fseterr.c ## end gnulib module fseterr ## begin gnulib module fstat EXTRA_DIST += fstat.c stat-w32.c stat-w32.h EXTRA_libgl_la_SOURCES += fstat.c stat-w32.c ## end gnulib module fstat ## begin gnulib module ftell EXTRA_DIST += ftell.c EXTRA_libgl_la_SOURCES += ftell.c ## end gnulib module ftell ## begin gnulib module ftello EXTRA_DIST += ftello.c stdio-impl.h EXTRA_libgl_la_SOURCES += ftello.c ## end gnulib module ftello ## begin gnulib module full-read libgl_la_SOURCES += full-read.h full-read.c EXTRA_DIST += full-write.c EXTRA_libgl_la_SOURCES += full-write.c ## end gnulib module full-read ## begin gnulib module full-write libgl_la_SOURCES += full-write.h full-write.c ## end gnulib module full-write ## begin gnulib module fwriteerror libgl_la_SOURCES += fwriteerror.h fwriteerror.c ## end gnulib module fwriteerror ## begin gnulib module getdelim EXTRA_DIST += getdelim.c EXTRA_libgl_la_SOURCES += getdelim.c ## end gnulib module getdelim ## begin gnulib module getdtablesize EXTRA_DIST += getdtablesize.c EXTRA_libgl_la_SOURCES += getdtablesize.c ## end gnulib module getdtablesize ## begin gnulib module getline EXTRA_DIST += getline.c EXTRA_libgl_la_SOURCES += getline.c ## end gnulib module getline ## begin gnulib module getopt-posix BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ < $(srcdir)/getopt-cdefs.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h getopt.c getopt.in.h getopt1.c getopt_int.h EXTRA_libgl_la_SOURCES += getopt.c getopt1.c ## end gnulib module getopt-posix ## begin gnulib module getpass EXTRA_DIST += getpass.c getpass.h EXTRA_libgl_la_SOURCES += getpass.c ## end gnulib module getpass ## begin gnulib module getprogname libgl_la_SOURCES += getprogname.h getprogname.c ## end gnulib module getprogname ## begin gnulib module gettext # If your project uses "gettextize --intl" to put a source-code # copy of libintl into the package, every Makefile.am needs # -I$(top_builddir)/intl, so that can be found in this directory. # Here's one way to do this: #AM_CPPFLAGS += -I$(top_builddir)/intl # This option has no effect when the user disables NLS (because then # the intl directory contains no libintl.h file). This option is not # enabled by default because the intl directory might not exist if # your project does not use "gettext --intl", and some compilers # complain about -I options applied to nonexistent directories. EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath ## end gnulib module gettext ## begin gnulib module gettext-h libgl_la_SOURCES += gettext.h ## end gnulib module gettext-h ## begin gnulib module gettimeofday EXTRA_DIST += gettimeofday.c EXTRA_libgl_la_SOURCES += gettimeofday.c ## end gnulib module gettimeofday ## begin gnulib module gitlog-to-changelog EXTRA_DIST += $(top_srcdir)/build-aux/gitlog-to-changelog ## end gnulib module gitlog-to-changelog ## begin gnulib module gperf GPERF = gperf V_GPERF = $(V_GPERF_@AM_V@) V_GPERF_ = $(V_GPERF_@AM_DEFAULT_V@) V_GPERF_0 = @echo " GPERF " $@; ## end gnulib module gperf ## begin gnulib module hard-locale libgl_la_SOURCES += hard-locale.c EXTRA_DIST += hard-locale.h ## end gnulib module hard-locale ## begin gnulib module havelib EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath ## end gnulib module havelib ## begin gnulib module intprops EXTRA_DIST += intprops.h ## end gnulib module intprops ## begin gnulib module inttostr libgl_la_SOURCES += imaxtostr.c inttostr.c offtostr.c uinttostr.c umaxtostr.c EXTRA_DIST += anytostr.c inttostr.h EXTRA_libgl_la_SOURCES += anytostr.c ## end gnulib module inttostr ## begin gnulib module isfinite EXTRA_DIST += isfinite.c EXTRA_libgl_la_SOURCES += isfinite.c ## end gnulib module isfinite ## begin gnulib module isinf EXTRA_DIST += isinf.c EXTRA_libgl_la_SOURCES += isinf.c ## end gnulib module isinf ## begin gnulib module isnand EXTRA_DIST += float+.h isnan.c isnand.c EXTRA_libgl_la_SOURCES += isnan.c isnand.c ## end gnulib module isnand ## begin gnulib module isnand-nolibm EXTRA_DIST += float+.h isnan.c isnand-nolibm.h isnand.c EXTRA_libgl_la_SOURCES += isnan.c isnand.c ## end gnulib module isnand-nolibm ## begin gnulib module isnanf EXTRA_DIST += float+.h isnan.c isnanf.c EXTRA_libgl_la_SOURCES += isnan.c isnanf.c ## end gnulib module isnanf ## begin gnulib module isnanf-nolibm EXTRA_DIST += float+.h isnan.c isnanf-nolibm.h isnanf.c EXTRA_libgl_la_SOURCES += isnan.c isnanf.c ## end gnulib module isnanf-nolibm ## begin gnulib module isnanl EXTRA_DIST += float+.h isnan.c isnanl.c EXTRA_libgl_la_SOURCES += isnan.c isnanl.c ## end gnulib module isnanl ## begin gnulib module isnanl-nolibm EXTRA_DIST += float+.h isnan.c isnanl-nolibm.h isnanl.c EXTRA_libgl_la_SOURCES += isnan.c isnanl.c ## end gnulib module isnanl-nolibm ## begin gnulib module iswblank EXTRA_DIST += iswblank.c EXTRA_libgl_la_SOURCES += iswblank.c ## end gnulib module iswblank ## begin gnulib module langinfo BUILT_SOURCES += langinfo.h # We need the following in order to create an empty placeholder for # when the system doesn't have one. langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/langinfo.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += langinfo.h langinfo.h-t EXTRA_DIST += langinfo.in.h ## end gnulib module langinfo ## begin gnulib module limits-h BUILT_SOURCES += $(LIMITS_H) # We need the following in order to create when the system # doesn't have one that is compatible with GNU. if GL_GENERATE_LIMITS_H limits.h: limits.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \ < $(srcdir)/limits.in.h; \ } > $@-t && \ mv $@-t $@ else limits.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += limits.h limits.h-t EXTRA_DIST += limits.in.h ## end gnulib module limits-h ## begin gnulib module linkedhash-list libgl_la_SOURCES += gl_linkedhash_list.h gl_linkedhash_list.c gl_anyhash_list1.h gl_anyhash_list2.h gl_anylinked_list1.h gl_anylinked_list2.h ## end gnulib module linkedhash-list ## begin gnulib module list libgl_la_SOURCES += gl_list.h gl_list.c ## end gnulib module list ## begin gnulib module localcharset libgl_la_SOURCES += localcharset.h localcharset.c # We need the following in order to install a simple file in $(libdir) # which is shared with other installed packages. We use a list of referencing # packages so that "make uninstall" will remove the file if and only if it # is not used by another installed package. # On systems with glibc-2.1 or newer, the file is redundant, therefore we # avoid installing it. all-local: charset.alias ref-add.sed ref-del.sed charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp install-exec-local: install-exec-localcharset install-exec-localcharset: all-local if test $(GLIBC21) = no; then \ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ darwin* | cygwin* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ esac ; \ else \ need_charset_alias=false ; \ fi ; \ if $$need_charset_alias; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ fi ; \ if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ else \ if $$need_charset_alias; then \ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ fi ; \ fi uninstall-local: uninstall-localcharset uninstall-localcharset: all-local if test -f $(charset_alias); then \ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ if grep '^# Packages using this file: $$' $(charset_tmp) \ > /dev/null; then \ rm -f $(charset_alias); \ else \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ fi; \ rm -f $(charset_tmp); \ fi charset.alias: config.charset $(AM_V_GEN)rm -f t-$@ $@ && \ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ mv t-$@ $@ SUFFIXES += .sed .sin .sin.sed: $(AM_V_GEN)rm -f t-$@ $@ && \ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ mv t-$@ $@ CLEANFILES += charset.alias ref-add.sed ref-del.sed EXTRA_DIST += config.charset ref-add.sin ref-del.sin ## end gnulib module localcharset ## begin gnulib module locale BUILT_SOURCES += locale.h # We need the following in order to create when the system # doesn't have one that provides all definitions. locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \ -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/locale.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += locale.h locale.h-t EXTRA_DIST += locale.in.h ## end gnulib module locale ## begin gnulib module localeconv EXTRA_DIST += localeconv.c EXTRA_libgl_la_SOURCES += localeconv.c ## end gnulib module localeconv ## begin gnulib module localtime-buffer EXTRA_DIST += localtime-buffer.c localtime-buffer.h EXTRA_libgl_la_SOURCES += localtime-buffer.c ## end gnulib module localtime-buffer ## begin gnulib module lock libgl_la_SOURCES += glthread/lock.h glthread/lock.c ## end gnulib module lock ## begin gnulib module lseek EXTRA_DIST += lseek.c EXTRA_libgl_la_SOURCES += lseek.c ## end gnulib module lseek ## begin gnulib module lstat EXTRA_DIST += lstat.c EXTRA_libgl_la_SOURCES += lstat.c ## end gnulib module lstat ## begin gnulib module malloc-posix EXTRA_DIST += malloc.c EXTRA_libgl_la_SOURCES += malloc.c ## end gnulib module malloc-posix ## begin gnulib module malloca libgl_la_SOURCES += malloca.c EXTRA_DIST += malloca.h malloca.valgrind ## end gnulib module malloca ## begin gnulib module math BUILT_SOURCES += math.h libgl_la_SOURCES += math.c # We need the following in order to create when the system # doesn't have one that works with the given compiler. math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ -e 's/@''GNULIB_ACOSF''@/$(GNULIB_ACOSF)/g' \ -e 's/@''GNULIB_ACOSL''@/$(GNULIB_ACOSL)/g' \ -e 's/@''GNULIB_ASINF''@/$(GNULIB_ASINF)/g' \ -e 's/@''GNULIB_ASINL''@/$(GNULIB_ASINL)/g' \ -e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \ -e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \ -e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \ -e 's/@''GNULIB_CBRT''@/$(GNULIB_CBRT)/g' \ -e 's/@''GNULIB_CBRTF''@/$(GNULIB_CBRTF)/g' \ -e 's/@''GNULIB_CBRTL''@/$(GNULIB_CBRTL)/g' \ -e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \ -e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \ -e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \ -e 's/@''GNULIB_COPYSIGN''@/$(GNULIB_COPYSIGN)/g' \ -e 's/@''GNULIB_COPYSIGNF''@/$(GNULIB_COPYSIGNF)/g' \ -e 's/@''GNULIB_COPYSIGNL''@/$(GNULIB_COPYSIGNL)/g' \ -e 's/@''GNULIB_COSF''@/$(GNULIB_COSF)/g' \ -e 's/@''GNULIB_COSL''@/$(GNULIB_COSL)/g' \ -e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \ -e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \ -e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \ -e 's/@''GNULIB_EXP2''@/$(GNULIB_EXP2)/g' \ -e 's/@''GNULIB_EXP2F''@/$(GNULIB_EXP2F)/g' \ -e 's/@''GNULIB_EXP2L''@/$(GNULIB_EXP2L)/g' \ -e 's/@''GNULIB_EXPM1''@/$(GNULIB_EXPM1)/g' \ -e 's/@''GNULIB_EXPM1F''@/$(GNULIB_EXPM1F)/g' \ -e 's/@''GNULIB_EXPM1L''@/$(GNULIB_EXPM1L)/g' \ -e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \ -e 's/@''GNULIB_FABSL''@/$(GNULIB_FABSL)/g' \ -e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \ -e 's/@''GNULIB_FLOORF''@/$(GNULIB_FLOORF)/g' \ -e 's/@''GNULIB_FLOORL''@/$(GNULIB_FLOORL)/g' \ -e 's/@''GNULIB_FMA''@/$(GNULIB_FMA)/g' \ -e 's/@''GNULIB_FMAF''@/$(GNULIB_FMAF)/g' \ -e 's/@''GNULIB_FMAL''@/$(GNULIB_FMAL)/g' \ -e 's/@''GNULIB_FMOD''@/$(GNULIB_FMOD)/g' \ -e 's/@''GNULIB_FMODF''@/$(GNULIB_FMODF)/g' \ -e 's/@''GNULIB_FMODL''@/$(GNULIB_FMODL)/g' \ -e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \ -e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \ -e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \ -e 's/@''GNULIB_HYPOT''@/$(GNULIB_HYPOT)/g' \ -e 's/@''GNULIB_HYPOTF''@/$(GNULIB_HYPOTF)/g' \ -e 's/@''GNULIB_HYPOTL''@/$(GNULIB_HYPOTL)/g' \ < $(srcdir)/math.in.h | \ sed -e 's/@''GNULIB_ILOGB''@/$(GNULIB_ILOGB)/g' \ -e 's/@''GNULIB_ILOGBF''@/$(GNULIB_ILOGBF)/g' \ -e 's/@''GNULIB_ILOGBL''@/$(GNULIB_ILOGBL)/g' \ -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \ -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \ -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \ -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \ -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \ -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \ -e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \ -e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \ -e 's/@''GNULIB_LOG''@/$(GNULIB_LOG)/g' \ -e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \ -e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \ -e 's/@''GNULIB_LOG10''@/$(GNULIB_LOG10)/g' \ -e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \ -e 's/@''GNULIB_LOG10L''@/$(GNULIB_LOG10L)/g' \ -e 's/@''GNULIB_LOG1P''@/$(GNULIB_LOG1P)/g' \ -e 's/@''GNULIB_LOG1PF''@/$(GNULIB_LOG1PF)/g' \ -e 's/@''GNULIB_LOG1PL''@/$(GNULIB_LOG1PL)/g' \ -e 's/@''GNULIB_LOG2''@/$(GNULIB_LOG2)/g' \ -e 's/@''GNULIB_LOG2F''@/$(GNULIB_LOG2F)/g' \ -e 's/@''GNULIB_LOG2L''@/$(GNULIB_LOG2L)/g' \ -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \ -e 's/@''GNULIB_LOGBF''@/$(GNULIB_LOGBF)/g' \ -e 's/@''GNULIB_LOGBL''@/$(GNULIB_LOGBL)/g' \ -e 's/@''GNULIB_MODF''@/$(GNULIB_MODF)/g' \ -e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \ -e 's/@''GNULIB_MODFL''@/$(GNULIB_MODFL)/g' \ -e 's/@''GNULIB_POWF''@/$(GNULIB_POWF)/g' \ -e 's/@''GNULIB_REMAINDER''@/$(GNULIB_REMAINDER)/g' \ -e 's/@''GNULIB_REMAINDERF''@/$(GNULIB_REMAINDERF)/g' \ -e 's/@''GNULIB_REMAINDERL''@/$(GNULIB_REMAINDERL)/g' \ -e 's/@''GNULIB_RINT''@/$(GNULIB_RINT)/g' \ -e 's/@''GNULIB_RINTF''@/$(GNULIB_RINTF)/g' \ -e 's/@''GNULIB_RINTL''@/$(GNULIB_RINTL)/g' \ -e 's/@''GNULIB_ROUND''@/$(GNULIB_ROUND)/g' \ -e 's/@''GNULIB_ROUNDF''@/$(GNULIB_ROUNDF)/g' \ -e 's/@''GNULIB_ROUNDL''@/$(GNULIB_ROUNDL)/g' \ -e 's/@''GNULIB_SIGNBIT''@/$(GNULIB_SIGNBIT)/g' \ -e 's/@''GNULIB_SINF''@/$(GNULIB_SINF)/g' \ -e 's/@''GNULIB_SINL''@/$(GNULIB_SINL)/g' \ -e 's/@''GNULIB_SINHF''@/$(GNULIB_SINHF)/g' \ -e 's/@''GNULIB_SQRTF''@/$(GNULIB_SQRTF)/g' \ -e 's/@''GNULIB_SQRTL''@/$(GNULIB_SQRTL)/g' \ -e 's/@''GNULIB_TANF''@/$(GNULIB_TANF)/g' \ -e 's/@''GNULIB_TANL''@/$(GNULIB_TANL)/g' \ -e 's/@''GNULIB_TANHF''@/$(GNULIB_TANHF)/g' \ -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \ -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \ -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \ | \ sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \ -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ -e 's|@''HAVE_ASINF''@|$(HAVE_ASINF)|g' \ -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \ -e 's|@''HAVE_ATANF''@|$(HAVE_ATANF)|g' \ -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \ -e 's|@''HAVE_ATAN2F''@|$(HAVE_ATAN2F)|g' \ -e 's|@''HAVE_CBRT''@|$(HAVE_CBRT)|g' \ -e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \ -e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \ -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \ -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \ -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \ -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \ -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \ -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ -e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \ -e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \ -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \ -e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \ -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \ -e 's|@''HAVE_FMAF''@|$(HAVE_FMAF)|g' \ -e 's|@''HAVE_FMAL''@|$(HAVE_FMAL)|g' \ -e 's|@''HAVE_FMODF''@|$(HAVE_FMODF)|g' \ -e 's|@''HAVE_FMODL''@|$(HAVE_FMODL)|g' \ -e 's|@''HAVE_FREXPF''@|$(HAVE_FREXPF)|g' \ -e 's|@''HAVE_HYPOTF''@|$(HAVE_HYPOTF)|g' \ -e 's|@''HAVE_HYPOTL''@|$(HAVE_HYPOTL)|g' \ -e 's|@''HAVE_ILOGB''@|$(HAVE_ILOGB)|g' \ -e 's|@''HAVE_ILOGBF''@|$(HAVE_ILOGBF)|g' \ -e 's|@''HAVE_ILOGBL''@|$(HAVE_ILOGBL)|g' \ -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \ -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \ -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \ -e 's|@''HAVE_LDEXPF''@|$(HAVE_LDEXPF)|g' \ -e 's|@''HAVE_LOGF''@|$(HAVE_LOGF)|g' \ -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \ -e 's|@''HAVE_LOG10F''@|$(HAVE_LOG10F)|g' \ -e 's|@''HAVE_LOG10L''@|$(HAVE_LOG10L)|g' \ -e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \ -e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \ -e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \ -e 's|@''HAVE_LOGBF''@|$(HAVE_LOGBF)|g' \ -e 's|@''HAVE_LOGBL''@|$(HAVE_LOGBL)|g' \ -e 's|@''HAVE_MODFF''@|$(HAVE_MODFF)|g' \ -e 's|@''HAVE_MODFL''@|$(HAVE_MODFL)|g' \ -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \ -e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \ -e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \ -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \ -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \ -e 's|@''HAVE_SINF''@|$(HAVE_SINF)|g' \ -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \ -e 's|@''HAVE_SINHF''@|$(HAVE_SINHF)|g' \ -e 's|@''HAVE_SQRTF''@|$(HAVE_SQRTF)|g' \ -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \ -e 's|@''HAVE_TANF''@|$(HAVE_TANF)|g' \ -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \ -e 's|@''HAVE_TANHF''@|$(HAVE_TANHF)|g' \ -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ -e 's|@''HAVE_DECL_CBRTF''@|$(HAVE_DECL_CBRTF)|g' \ -e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \ -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \ -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \ -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \ -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ -e 's|@''HAVE_DECL_EXP2''@|$(HAVE_DECL_EXP2)|g' \ -e 's|@''HAVE_DECL_EXP2F''@|$(HAVE_DECL_EXP2F)|g' \ -e 's|@''HAVE_DECL_EXP2L''@|$(HAVE_DECL_EXP2L)|g' \ -e 's|@''HAVE_DECL_EXPM1L''@|$(HAVE_DECL_EXPM1L)|g' \ -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \ -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \ -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ -e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \ -e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \ -e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \ -e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \ -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \ -e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \ -e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \ -e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \ -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \ -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \ -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \ -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \ -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \ | \ sed -e 's|@''REPLACE_ACOSF''@|$(REPLACE_ACOSF)|g' \ -e 's|@''REPLACE_ASINF''@|$(REPLACE_ASINF)|g' \ -e 's|@''REPLACE_ATANF''@|$(REPLACE_ATANF)|g' \ -e 's|@''REPLACE_ATAN2F''@|$(REPLACE_ATAN2F)|g' \ -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \ -e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \ -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \ -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ -e 's|@''REPLACE_COSF''@|$(REPLACE_COSF)|g' \ -e 's|@''REPLACE_COSHF''@|$(REPLACE_COSHF)|g' \ -e 's|@''REPLACE_EXPF''@|$(REPLACE_EXPF)|g' \ -e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \ -e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \ -e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \ -e 's|@''REPLACE_EXP2L''@|$(REPLACE_EXP2L)|g' \ -e 's|@''REPLACE_FABSL''@|$(REPLACE_FABSL)|g' \ -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \ -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \ -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \ -e 's|@''REPLACE_FMA''@|$(REPLACE_FMA)|g' \ -e 's|@''REPLACE_FMAF''@|$(REPLACE_FMAF)|g' \ -e 's|@''REPLACE_FMAL''@|$(REPLACE_FMAL)|g' \ -e 's|@''REPLACE_FMOD''@|$(REPLACE_FMOD)|g' \ -e 's|@''REPLACE_FMODF''@|$(REPLACE_FMODF)|g' \ -e 's|@''REPLACE_FMODL''@|$(REPLACE_FMODL)|g' \ -e 's|@''REPLACE_FREXPF''@|$(REPLACE_FREXPF)|g' \ -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \ -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \ -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \ -e 's|@''REPLACE_HYPOT''@|$(REPLACE_HYPOT)|g' \ -e 's|@''REPLACE_HYPOTF''@|$(REPLACE_HYPOTF)|g' \ -e 's|@''REPLACE_HYPOTL''@|$(REPLACE_HYPOTL)|g' \ -e 's|@''REPLACE_ILOGB''@|$(REPLACE_ILOGB)|g' \ -e 's|@''REPLACE_ILOGBF''@|$(REPLACE_ILOGBF)|g' \ -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \ -e 's|@''REPLACE_LOG''@|$(REPLACE_LOG)|g' \ -e 's|@''REPLACE_LOGF''@|$(REPLACE_LOGF)|g' \ -e 's|@''REPLACE_LOGL''@|$(REPLACE_LOGL)|g' \ -e 's|@''REPLACE_LOG10''@|$(REPLACE_LOG10)|g' \ -e 's|@''REPLACE_LOG10F''@|$(REPLACE_LOG10F)|g' \ -e 's|@''REPLACE_LOG10L''@|$(REPLACE_LOG10L)|g' \ -e 's|@''REPLACE_LOG1P''@|$(REPLACE_LOG1P)|g' \ -e 's|@''REPLACE_LOG1PF''@|$(REPLACE_LOG1PF)|g' \ -e 's|@''REPLACE_LOG1PL''@|$(REPLACE_LOG1PL)|g' \ -e 's|@''REPLACE_LOG2''@|$(REPLACE_LOG2)|g' \ -e 's|@''REPLACE_LOG2F''@|$(REPLACE_LOG2F)|g' \ -e 's|@''REPLACE_LOG2L''@|$(REPLACE_LOG2L)|g' \ -e 's|@''REPLACE_LOGB''@|$(REPLACE_LOGB)|g' \ -e 's|@''REPLACE_LOGBF''@|$(REPLACE_LOGBF)|g' \ -e 's|@''REPLACE_LOGBL''@|$(REPLACE_LOGBL)|g' \ -e 's|@''REPLACE_MODF''@|$(REPLACE_MODF)|g' \ -e 's|@''REPLACE_MODFF''@|$(REPLACE_MODFF)|g' \ -e 's|@''REPLACE_MODFL''@|$(REPLACE_MODFL)|g' \ -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \ -e 's|@''REPLACE_REMAINDER''@|$(REPLACE_REMAINDER)|g' \ -e 's|@''REPLACE_REMAINDERF''@|$(REPLACE_REMAINDERF)|g' \ -e 's|@''REPLACE_REMAINDERL''@|$(REPLACE_REMAINDERL)|g' \ -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \ -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \ -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ -e 's|@''REPLACE_SINF''@|$(REPLACE_SINF)|g' \ -e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \ -e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \ -e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \ -e 's|@''REPLACE_TANF''@|$(REPLACE_TANF)|g' \ -e 's|@''REPLACE_TANHF''@|$(REPLACE_TANHF)|g' \ -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \ -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \ -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += math.h math.h-t EXTRA_DIST += math.in.h ## end gnulib module math ## begin gnulib module mbchar libgl_la_SOURCES += mbchar.c EXTRA_DIST += mbchar.h ## end gnulib module mbchar ## begin gnulib module mbiter libgl_la_SOURCES += mbiter.h mbiter.c ## end gnulib module mbiter ## begin gnulib module mbrtowc EXTRA_DIST += mbrtowc.c EXTRA_libgl_la_SOURCES += mbrtowc.c ## end gnulib module mbrtowc ## begin gnulib module mbsinit EXTRA_DIST += mbsinit.c EXTRA_libgl_la_SOURCES += mbsinit.c ## end gnulib module mbsinit ## begin gnulib module mbtowc EXTRA_DIST += mbtowc-impl.h mbtowc.c EXTRA_libgl_la_SOURCES += mbtowc.c ## end gnulib module mbtowc ## begin gnulib module memcasecmp libgl_la_SOURCES += memcasecmp.c EXTRA_DIST += memcasecmp.h ## end gnulib module memcasecmp ## begin gnulib module memchr EXTRA_DIST += memchr.c memchr.valgrind EXTRA_libgl_la_SOURCES += memchr.c ## end gnulib module memchr ## begin gnulib module memchr2 libgl_la_SOURCES += memchr2.h memchr2.c EXTRA_DIST += memchr2.valgrind ## end gnulib module memchr2 ## begin gnulib module mempcpy EXTRA_DIST += mempcpy.c EXTRA_libgl_la_SOURCES += mempcpy.c ## end gnulib module mempcpy ## begin gnulib module memrchr EXTRA_DIST += memrchr.c EXTRA_libgl_la_SOURCES += memrchr.c ## end gnulib module memrchr ## begin gnulib module minmax libgl_la_SOURCES += minmax.h ## end gnulib module minmax ## begin gnulib module mkdtemp EXTRA_DIST += mkdtemp.c EXTRA_libgl_la_SOURCES += mkdtemp.c ## end gnulib module mkdtemp ## begin gnulib module mkstemp EXTRA_DIST += mkstemp.c EXTRA_libgl_la_SOURCES += mkstemp.c ## end gnulib module mkstemp ## begin gnulib module mktime EXTRA_DIST += mktime-internal.h mktime.c EXTRA_libgl_la_SOURCES += mktime.c ## end gnulib module mktime ## begin gnulib module mktime-internal EXTRA_DIST += mktime-internal.h mktime.c EXTRA_libgl_la_SOURCES += mktime.c ## end gnulib module mktime-internal ## begin gnulib module msvc-inval EXTRA_DIST += msvc-inval.c msvc-inval.h EXTRA_libgl_la_SOURCES += msvc-inval.c ## end gnulib module msvc-inval ## begin gnulib module msvc-nothrow EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h EXTRA_libgl_la_SOURCES += msvc-nothrow.c ## end gnulib module msvc-nothrow ## begin gnulib module nl_langinfo EXTRA_DIST += nl_langinfo.c EXTRA_libgl_la_SOURCES += nl_langinfo.c ## end gnulib module nl_langinfo ## begin gnulib module open EXTRA_DIST += open.c EXTRA_libgl_la_SOURCES += open.c ## end gnulib module open ## begin gnulib module pathmax EXTRA_DIST += pathmax.h ## end gnulib module pathmax ## begin gnulib module pipe2 libgl_la_SOURCES += pipe2.c ## end gnulib module pipe2 ## begin gnulib module printf-frexp libgl_la_SOURCES += printf-frexp.c EXTRA_DIST += printf-frexp.h ## end gnulib module printf-frexp ## begin gnulib module printf-frexpl libgl_la_SOURCES += printf-frexpl.c EXTRA_DIST += printf-frexp.c printf-frexpl.h EXTRA_libgl_la_SOURCES += printf-frexp.c ## end gnulib module printf-frexpl ## begin gnulib module printf-posix EXTRA_DIST += printf.c EXTRA_libgl_la_SOURCES += printf.c ## end gnulib module printf-posix ## begin gnulib module progname libgl_la_SOURCES += progname.h progname.c ## end gnulib module progname ## begin gnulib module raise EXTRA_DIST += raise.c EXTRA_libgl_la_SOURCES += raise.c ## end gnulib module raise ## begin gnulib module rawmemchr EXTRA_DIST += rawmemchr.c rawmemchr.valgrind EXTRA_libgl_la_SOURCES += rawmemchr.c ## end gnulib module rawmemchr ## begin gnulib module read EXTRA_DIST += read.c EXTRA_libgl_la_SOURCES += read.c ## end gnulib module read ## begin gnulib module read-file libgl_la_SOURCES += read-file.c EXTRA_DIST += read-file.h ## end gnulib module read-file ## begin gnulib module readlink EXTRA_DIST += readlink.c EXTRA_libgl_la_SOURCES += readlink.c ## end gnulib module readlink ## begin gnulib module realloc-posix EXTRA_DIST += realloc.c EXTRA_libgl_la_SOURCES += realloc.c ## end gnulib module realloc-posix ## begin gnulib module regex EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c EXTRA_libgl_la_SOURCES += regcomp.c regex.c regex_internal.c regexec.c ## end gnulib module regex ## begin gnulib module relocatable-prog DEFS += -DEXEEXT=\"@EXEEXT@\" if RELOCATABLE_VIA_WRAPPER uninstall-hook: uninstall-relocwrapper uninstall-relocwrapper: if test $(RELOCATABLE) = yes; then \ case '$(EXEEXT)' in \ .bin*) ;; \ *) cd $(top_builddir) && \ $(MAKE) $(AM_MAKEFLAGS) EXEEXT=.bin$(EXEEXT) \ AM_MAKEFLAGS='$(AM_MAKEFLAGS) EXEEXT=.bin$(EXEEXT)' \ uninstall ;; \ esac; \ fi .PHONY: uninstall-relocwrapper endif EXTRA_DIST += progreloc.c relocatable.c relocatable.h EXTRA_libgl_la_SOURCES += progreloc.c relocatable.c EXTRA_DIST += $(top_srcdir)/build-aux/config.libpath $(top_srcdir)/build-aux/reloc-ldflags ## end gnulib module relocatable-prog ## begin gnulib module relocatable-prog-wrapper EXTRA_DIST += allocator.c allocator.h areadlink.c areadlink.h c-ctype.c c-ctype.h canonicalize-lgpl.c careadlinkat.c careadlinkat.h lstat.c malloca.c malloca.h progname.c progname.h progreloc.c readlink.c relocatable.c relocatable.h relocwrapper.c setenv.c stat.c EXTRA_DIST += $(top_srcdir)/build-aux/install-reloc ## end gnulib module relocatable-prog-wrapper ## begin gnulib module rename EXTRA_DIST += rename.c EXTRA_libgl_la_SOURCES += rename.c ## end gnulib module rename ## begin gnulib module rmdir EXTRA_DIST += rmdir.c EXTRA_libgl_la_SOURCES += rmdir.c ## end gnulib module rmdir ## begin gnulib module round EXTRA_DIST += round.c EXTRA_libgl_la_SOURCES += round.c ## end gnulib module round ## begin gnulib module safe-read libgl_la_SOURCES += safe-read.c EXTRA_DIST += safe-read.h ## end gnulib module safe-read ## begin gnulib module safe-write libgl_la_SOURCES += safe-write.c EXTRA_DIST += safe-read.c safe-write.h EXTRA_libgl_la_SOURCES += safe-read.c ## end gnulib module safe-write ## begin gnulib module same-inode EXTRA_DIST += same-inode.h ## end gnulib module same-inode ## begin gnulib module secure_getenv EXTRA_DIST += secure_getenv.c EXTRA_libgl_la_SOURCES += secure_getenv.c ## end gnulib module secure_getenv ## begin gnulib module select EXTRA_DIST += select.c EXTRA_libgl_la_SOURCES += select.c ## end gnulib module select ## begin gnulib module setenv EXTRA_DIST += setenv.c EXTRA_libgl_la_SOURCES += setenv.c ## end gnulib module setenv ## begin gnulib module sigaction libgl_la_SOURCES += sig-handler.c EXTRA_DIST += sig-handler.h sigaction.c EXTRA_libgl_la_SOURCES += sigaction.c ## end gnulib module sigaction ## begin gnulib module signal-h BUILT_SOURCES += signal.h # We need the following in order to create when the system # doesn't have a complete one. signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \ -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \ -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \ -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \ -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \ -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/signal.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += signal.h signal.h-t EXTRA_DIST += signal.in.h ## end gnulib module signal-h ## begin gnulib module signbit EXTRA_DIST += float+.h signbitd.c signbitf.c signbitl.c EXTRA_libgl_la_SOURCES += signbitd.c signbitf.c signbitl.c ## end gnulib module signbit ## begin gnulib module sigprocmask EXTRA_DIST += sigprocmask.c EXTRA_libgl_la_SOURCES += sigprocmask.c ## end gnulib module sigprocmask ## begin gnulib module size_max libgl_la_SOURCES += size_max.h ## end gnulib module size_max ## begin gnulib module snippet/_Noreturn # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. _NORETURN_H=$(srcdir)/_Noreturn.h EXTRA_DIST += _Noreturn.h ## end gnulib module snippet/_Noreturn ## begin gnulib module snippet/arg-nonnull # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. ARG_NONNULL_H=$(srcdir)/arg-nonnull.h EXTRA_DIST += arg-nonnull.h ## end gnulib module snippet/arg-nonnull ## begin gnulib module snippet/c++defs # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. CXXDEFS_H=$(srcdir)/c++defs.h EXTRA_DIST += c++defs.h ## end gnulib module snippet/c++defs ## begin gnulib module snippet/unused-parameter # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. UNUSED_PARAMETER_H=$(srcdir)/unused-parameter.h EXTRA_DIST += unused-parameter.h ## end gnulib module snippet/unused-parameter ## begin gnulib module snippet/warn-on-use # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. WARN_ON_USE_H=$(srcdir)/warn-on-use.h EXTRA_DIST += warn-on-use.h ## end gnulib module snippet/warn-on-use ## begin gnulib module snprintf EXTRA_DIST += snprintf.c EXTRA_libgl_la_SOURCES += snprintf.c ## end gnulib module snprintf ## begin gnulib module sockets libgl_la_SOURCES += sockets.h sockets.c EXTRA_DIST += w32sock.h ## end gnulib module sockets ## begin gnulib module sprintf-posix EXTRA_DIST += sprintf.c EXTRA_libgl_la_SOURCES += sprintf.c ## end gnulib module sprintf-posix ## begin gnulib module stat EXTRA_DIST += stat-w32.c stat-w32.h stat.c EXTRA_libgl_la_SOURCES += stat-w32.c stat.c ## end gnulib module stat ## begin gnulib module stdalign BUILT_SOURCES += $(STDALIGN_H) # We need the following in order to create when the system # doesn't have one that works. if GL_GENERATE_STDALIGN_H stdalign.h: stdalign.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/stdalign.in.h; \ } > $@-t && \ mv $@-t $@ else stdalign.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stdalign.h stdalign.h-t EXTRA_DIST += stdalign.in.h ## end gnulib module stdalign ## begin gnulib module stdarg BUILT_SOURCES += $(STDARG_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. if GL_GENERATE_STDARG_H stdarg.h: stdarg.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ < $(srcdir)/stdarg.in.h; \ } > $@-t && \ mv $@-t $@ else stdarg.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stdarg.h stdarg.h-t EXTRA_DIST += stdarg.in.h ## end gnulib module stdarg ## begin gnulib module stdbool BUILT_SOURCES += $(STDBOOL_H) # We need the following in order to create when the system # doesn't have one that works. if GL_GENERATE_STDBOOL_H stdbool.h: stdbool.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t && \ mv $@-t $@ else stdbool.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stdbool.h stdbool.h-t EXTRA_DIST += stdbool.in.h ## end gnulib module stdbool ## begin gnulib module stddef BUILT_SOURCES += $(STDDEF_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. if GL_GENERATE_STDDEF_H stddef.h: stddef.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ else stddef.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stddef.h stddef.h-t EXTRA_DIST += stddef.in.h ## end gnulib module stddef ## begin gnulib module stdint BUILT_SOURCES += $(STDINT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. if GL_GENERATE_STDINT_H stdint.h: stdint.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ else stdint.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stdint.h stdint.h-t EXTRA_DIST += stdint.in.h ## end gnulib module stdint ## begin gnulib module stdio BUILT_SOURCES += stdio.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \ -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \ -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdio.h stdio.h-t EXTRA_DIST += stdio.in.h ## end gnulib module stdio ## begin gnulib module stdlib BUILT_SOURCES += stdlib.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t EXTRA_DIST += stdlib.in.h ## end gnulib module stdlib ## begin gnulib module stpcpy EXTRA_DIST += stpcpy.c EXTRA_libgl_la_SOURCES += stpcpy.c ## end gnulib module stpcpy ## begin gnulib module strcase EXTRA_DIST += strcasecmp.c strncasecmp.c EXTRA_libgl_la_SOURCES += strcasecmp.c strncasecmp.c ## end gnulib module strcase ## begin gnulib module strcasestr-simple EXTRA_DIST += str-two-way.h strcasestr.c EXTRA_libgl_la_SOURCES += strcasestr.c ## end gnulib module strcasestr-simple ## begin gnulib module strdup-posix EXTRA_DIST += strdup.c EXTRA_libgl_la_SOURCES += strdup.c ## end gnulib module strdup-posix ## begin gnulib module streq EXTRA_DIST += streq.h ## end gnulib module streq ## begin gnulib module strerror EXTRA_DIST += strerror.c EXTRA_libgl_la_SOURCES += strerror.c ## end gnulib module strerror ## begin gnulib module strerror-override EXTRA_DIST += strerror-override.c strerror-override.h EXTRA_libgl_la_SOURCES += strerror-override.c ## end gnulib module strerror-override ## begin gnulib module strftime libgl_la_SOURCES += strftime.c EXTRA_DIST += strftime.h ## end gnulib module strftime ## begin gnulib module string BUILT_SOURCES += string.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += string.h string.h-t EXTRA_DIST += string.in.h ## end gnulib module string ## begin gnulib module strings BUILT_SOURCES += strings.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ -e 's|@''GNULIB_FFS''@|$(GNULIB_FFS)|g' \ -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/strings.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += strings.h strings.h-t EXTRA_DIST += strings.in.h ## end gnulib module strings ## begin gnulib module strncat EXTRA_DIST += strncat.c EXTRA_libgl_la_SOURCES += strncat.c ## end gnulib module strncat ## begin gnulib module strndup EXTRA_DIST += strndup.c EXTRA_libgl_la_SOURCES += strndup.c ## end gnulib module strndup ## begin gnulib module strnlen EXTRA_DIST += strnlen.c EXTRA_libgl_la_SOURCES += strnlen.c ## end gnulib module strnlen ## begin gnulib module strsep EXTRA_DIST += strsep.c EXTRA_libgl_la_SOURCES += strsep.c ## end gnulib module strsep ## begin gnulib module strtod EXTRA_DIST += strtod.c EXTRA_libgl_la_SOURCES += strtod.c ## end gnulib module strtod ## begin gnulib module strtok_r EXTRA_DIST += strtok_r.c EXTRA_libgl_la_SOURCES += strtok_r.c ## end gnulib module strtok_r ## begin gnulib module sys_select BUILT_SOURCES += sys/select.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \ -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \ -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \ -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_select.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/select.h sys/select.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_select.in.h ## end gnulib module sys_select ## begin gnulib module sys_socket BUILT_SOURCES += sys/socket.h libgl_la_SOURCES += sys_socket.c # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \ -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \ -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \ -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \ -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \ -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \ -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \ -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \ -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \ -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \ -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \ -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \ -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \ -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \ -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \ -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_socket.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_socket.in.h ## end gnulib module sys_socket ## begin gnulib module sys_stat BUILT_SOURCES += sys/stat.h # We need the following in order to create when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_stat.in.h ## end gnulib module sys_stat ## begin gnulib module sys_time BUILT_SOURCES += sys/time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/time.h sys/time.h-t EXTRA_DIST += sys_time.in.h ## end gnulib module sys_time ## begin gnulib module sys_types BUILT_SOURCES += sys/types.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/types.h: sys_types.in.h $(top_builddir)/config.status $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ < $(srcdir)/sys_types.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/types.h sys/types.h-t EXTRA_DIST += sys_types.in.h ## end gnulib module sys_types ## begin gnulib module sys_uio BUILT_SOURCES += sys/uio.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/uio.h: sys_uio.in.h $(top_builddir)/config.status $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \ -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \ < $(srcdir)/sys_uio.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += sys/uio.h sys/uio.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_uio.in.h ## end gnulib module sys_uio ## begin gnulib module tempname libgl_la_SOURCES += tempname.c EXTRA_DIST += tempname.h ## end gnulib module tempname ## begin gnulib module termios BUILT_SOURCES += termios.h # We need the following in order to create when the system # version does not have all declarations. termios.h: termios.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TERMIOS_H''@|$(NEXT_TERMIOS_H)|g' \ -e 's/@''GNULIB_TCGETSID''@/$(GNULIB_TCGETSID)/g' \ -e 's|@''HAVE_DECL_TCGETSID''@|$(HAVE_DECL_TCGETSID)|g' \ -e 's|@''HAVE_TERMIOS_H''@|$(HAVE_TERMIOS_H)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/termios.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += termios.h termios.h-t EXTRA_DIST += termios.in.h ## end gnulib module termios ## begin gnulib module threadlib libgl_la_SOURCES += glthread/threadlib.c EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath ## end gnulib module threadlib ## begin gnulib module time BUILT_SOURCES += time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \ -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \ -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \ -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ -e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \ -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \ -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h ## end gnulib module time ## begin gnulib module time_r EXTRA_DIST += time_r.c EXTRA_libgl_la_SOURCES += time_r.c ## end gnulib module time_r ## begin gnulib module time_rz EXTRA_DIST += time-internal.h time_rz.c EXTRA_libgl_la_SOURCES += time_rz.c ## end gnulib module time_rz ## begin gnulib module timegm EXTRA_DIST += mktime-internal.h timegm.c EXTRA_libgl_la_SOURCES += timegm.c ## end gnulib module timegm ## begin gnulib module tmpdir libgl_la_SOURCES += tmpdir.h tmpdir.c ## end gnulib module tmpdir ## begin gnulib module trunc EXTRA_DIST += trunc.c EXTRA_libgl_la_SOURCES += trunc.c ## end gnulib module trunc ## begin gnulib module tzset EXTRA_DIST += tzset.c EXTRA_libgl_la_SOURCES += tzset.c ## end gnulib module tzset ## begin gnulib module unicase/base BUILT_SOURCES += $(LIBUNISTRING_UNICASE_H) unicase.h: unicase.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unicase.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += unicase.h unicase.h-t EXTRA_DIST += unicase.in.h ## end gnulib module unicase/base ## begin gnulib module unicase/cased libgl_la_SOURCES += unicase/cased.c EXTRA_DIST += unicase/cased.h unicase/caseprop.h unictype/bitmap.h ## end gnulib module unicase/cased ## begin gnulib module unicase/empty-prefix-context if LIBUNISTRING_COMPILE_UNICASE_EMPTY_PREFIX_CONTEXT libgl_la_SOURCES += unicase/empty-prefix-context.c endif ## end gnulib module unicase/empty-prefix-context ## begin gnulib module unicase/empty-suffix-context if LIBUNISTRING_COMPILE_UNICASE_EMPTY_SUFFIX_CONTEXT libgl_la_SOURCES += unicase/empty-suffix-context.c endif ## end gnulib module unicase/empty-suffix-context ## begin gnulib module unicase/ignorable libgl_la_SOURCES += unicase/ignorable.c EXTRA_DIST += unicase/caseprop.h unicase/ignorable.h unictype/bitmap.h ## end gnulib module unicase/ignorable ## begin gnulib module unicase/special-casing libgl_la_SOURCES += unicase/special-casing.c unicase/special-casing-table.h: $(srcdir)/unicase/special-casing-table.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unicase/special-casing-table.gperf > $(srcdir)/unicase/special-casing-table.h-t && \ mv $(srcdir)/unicase/special-casing-table.h-t $(srcdir)/unicase/special-casing-table.h BUILT_SOURCES += unicase/special-casing-table.h MOSTLYCLEANFILES += unicase/special-casing-table.h-t MAINTAINERCLEANFILES += unicase/special-casing-table.h EXTRA_DIST += unicase/special-casing-table.h # Generate special-casing.h with a declaration that depends on the gperf version. unicase/special-casing.h: unicase/special-casing.in.h unicase/special-casing-table.h $(AM_V_GEN)rm -f $@-t $@ && \ declaration=`grep '^gl_unicase_special_lookup' $(srcdir)/unicase/special-casing-table.h | sed -e 's/register //g'` && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e "/gl_unicase_special_lookup/s/gl_unicase_special_lookup.*/$${declaration};/" $(srcdir)/unicase/special-casing.in.h; \ } > $@-t && \ mv -f $@-t $@ BUILT_SOURCES += unicase/special-casing.h MOSTLYCLEANFILES += unicase/special-casing.h unicase/special-casing.h-t EXTRA_DIST += unicase/special-casing-table.gperf unicase/special-casing.in.h ## end gnulib module unicase/special-casing ## begin gnulib module unicase/tocasefold libgl_la_SOURCES += unicase/tocasefold.c EXTRA_DIST += unicase/casefold.h unicase/simple-mapping.h unicase/tocasefold.h ## end gnulib module unicase/tocasefold ## begin gnulib module unicase/tolower if LIBUNISTRING_COMPILE_UNICASE_TOLOWER libgl_la_SOURCES += unicase/tolower.c endif EXTRA_DIST += unicase/simple-mapping.h unicase/tolower.h ## end gnulib module unicase/tolower ## begin gnulib module unicase/toupper if LIBUNISTRING_COMPILE_UNICASE_TOUPPER libgl_la_SOURCES += unicase/toupper.c endif EXTRA_DIST += unicase/simple-mapping.h unicase/toupper.h ## end gnulib module unicase/toupper ## begin gnulib module unicase/u8-casecmp if LIBUNISTRING_COMPILE_UNICASE_U8_CASECMP libgl_la_SOURCES += unicase/u8-casecmp.c endif EXTRA_DIST += unicase/u-casecmp.h ## end gnulib module unicase/u8-casecmp ## begin gnulib module unicase/u8-casefold if LIBUNISTRING_COMPILE_UNICASE_U8_CASEFOLD libgl_la_SOURCES += unicase/u8-casefold.c endif EXTRA_DIST += unicase/u-casefold.h ## end gnulib module unicase/u8-casefold ## begin gnulib module unicase/u8-casemap libgl_la_SOURCES += unicase/u8-casemap.c EXTRA_DIST += unicase/context.h unicase/u-casemap.h unicase/unicasemap.h ## end gnulib module unicase/u8-casemap ## begin gnulib module unicase/u8-ct-casefold if LIBUNISTRING_COMPILE_UNICASE_U8_CT_CASEFOLD libgl_la_SOURCES += unicase/u8-ct-casefold.c endif EXTRA_DIST += unicase/u-ct-casefold.h ## end gnulib module unicase/u8-ct-casefold ## begin gnulib module unicase/u8-tolower if LIBUNISTRING_COMPILE_UNICASE_U8_TOLOWER libgl_la_SOURCES += unicase/u8-tolower.c endif ## end gnulib module unicase/u8-tolower ## begin gnulib module unicase/u8-toupper if LIBUNISTRING_COMPILE_UNICASE_U8_TOUPPER libgl_la_SOURCES += unicase/u8-toupper.c endif ## end gnulib module unicase/u8-toupper ## begin gnulib module unictype/base BUILT_SOURCES += $(LIBUNISTRING_UNICTYPE_H) unictype.h: unictype.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unictype.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += unictype.h unictype.h-t EXTRA_DIST += unictype.in.h ## end gnulib module unictype/base ## begin gnulib module unictype/category-none if LIBUNISTRING_COMPILE_UNICTYPE_CATEGORY_NONE libgl_la_SOURCES += unictype/categ_none.c endif ## end gnulib module unictype/category-none ## begin gnulib module unictype/category-of if LIBUNISTRING_COMPILE_UNICTYPE_CATEGORY_OF libgl_la_SOURCES += unictype/categ_of.c endif EXTRA_DIST += unictype/categ_of.h ## end gnulib module unictype/category-of ## begin gnulib module unictype/combining-class if LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS libgl_la_SOURCES += unictype/combiningclass.c endif EXTRA_DIST += unictype/combiningclass.h ## end gnulib module unictype/combining-class ## begin gnulib module unictype/ctype-print if LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_PRINT libgl_la_SOURCES += unictype/ctype_print.c endif EXTRA_DIST += unictype/bitmap.h unictype/ctype_print.h ## end gnulib module unictype/ctype-print ## begin gnulib module unictype/property-soft-dotted if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_SOFT_DOTTED libgl_la_SOURCES += unictype/pr_soft_dotted.c endif EXTRA_DIST += unictype/bitmap.h unictype/pr_soft_dotted.h ## end gnulib module unictype/property-soft-dotted ## begin gnulib module unigbrk/base BUILT_SOURCES += $(LIBUNISTRING_UNIGBRK_H) unigbrk.h: unigbrk.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unigbrk.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += unigbrk.h unigbrk.h-t EXTRA_DIST += unigbrk.in.h ## end gnulib module unigbrk/base ## begin gnulib module unigbrk/uc-gbrk-prop if LIBUNISTRING_COMPILE_UNIGBRK_UC_GBRK_PROP libgl_la_SOURCES += unigbrk/uc-gbrk-prop.c endif EXTRA_DIST += unigbrk/gbrkprop.h ## end gnulib module unigbrk/uc-gbrk-prop ## begin gnulib module unigbrk/uc-is-grapheme-break if LIBUNISTRING_COMPILE_UNIGBRK_UC_IS_GRAPHEME_BREAK libgl_la_SOURCES += unigbrk/uc-is-grapheme-break.c endif ## end gnulib module unigbrk/uc-is-grapheme-break ## begin gnulib module unilbrk/base BUILT_SOURCES += $(LIBUNISTRING_UNILBRK_H) unilbrk.h: unilbrk.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unilbrk.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += unilbrk.h unilbrk.h-t EXTRA_DIST += unilbrk.in.h ## end gnulib module unilbrk/base ## begin gnulib module unilbrk/tables libgl_la_SOURCES += unilbrk/lbrktables.c EXTRA_DIST += unilbrk/lbrkprop1.h unilbrk/lbrkprop2.h unilbrk/lbrktables.h ## end gnulib module unilbrk/tables ## begin gnulib module unilbrk/u8-possible-linebreaks if LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS libgl_la_SOURCES += unilbrk/u8-possible-linebreaks.c endif EXTRA_DIST += uniwidth/cjk.h ## end gnulib module unilbrk/u8-possible-linebreaks ## begin gnulib module uninorm/base BUILT_SOURCES += $(LIBUNISTRING_UNINORM_H) uninorm.h: uninorm.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/uninorm.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += uninorm.h uninorm.h-t EXTRA_DIST += uninorm.in.h ## end gnulib module uninorm/base ## begin gnulib module uninorm/canonical-decomposition if LIBUNISTRING_COMPILE_UNINORM_CANONICAL_DECOMPOSITION libgl_la_SOURCES += uninorm/canonical-decomposition.c endif ## end gnulib module uninorm/canonical-decomposition ## begin gnulib module uninorm/compat-decomposition libgl_la_SOURCES += uninorm/compat-decomposition.c EXTRA_DIST += uninorm/decompose-internal.h ## end gnulib module uninorm/compat-decomposition ## begin gnulib module uninorm/decompose-internal libgl_la_SOURCES += uninorm/decompose-internal.c EXTRA_DIST += uninorm/decompose-internal.h ## end gnulib module uninorm/decompose-internal ## begin gnulib module uninorm/decomposing-form if LIBUNISTRING_COMPILE_UNINORM_DECOMPOSING_FORM libgl_la_SOURCES += uninorm/decomposing-form.c endif EXTRA_DIST += uninorm/normalize-internal.h ## end gnulib module uninorm/decomposing-form ## begin gnulib module uninorm/decomposition if LIBUNISTRING_COMPILE_UNINORM_DECOMPOSITION libgl_la_SOURCES += uninorm/decomposition.c endif ## end gnulib module uninorm/decomposition ## begin gnulib module uninorm/decomposition-table libgl_la_SOURCES += uninorm/decomposition-table.c EXTRA_DIST += uninorm/decomposition-table.h uninorm/decomposition-table1.h uninorm/decomposition-table2.h ## end gnulib module uninorm/decomposition-table ## begin gnulib module uninorm/nfd if LIBUNISTRING_COMPILE_UNINORM_NFD libgl_la_SOURCES += uninorm/nfd.c endif EXTRA_DIST += uninorm/normalize-internal.h ## end gnulib module uninorm/nfd ## begin gnulib module uninorm/nfkd if LIBUNISTRING_COMPILE_UNINORM_NFKD libgl_la_SOURCES += uninorm/nfkd.c endif EXTRA_DIST += uninorm/normalize-internal.h ## end gnulib module uninorm/nfkd ## begin gnulib module uninorm/u8-normalize if LIBUNISTRING_COMPILE_UNINORM_U8_NORMALIZE libgl_la_SOURCES += uninorm/u8-normalize.c endif EXTRA_DIST += uninorm/normalize-internal.h uninorm/u-normalize-internal.h ## end gnulib module uninorm/u8-normalize ## begin gnulib module unistd BUILT_SOURCES += unistd.h libgl_la_SOURCES += unistd.c # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += unistd.h unistd.h-t EXTRA_DIST += unistd.in.h ## end gnulib module unistd ## begin gnulib module unistr/base BUILT_SOURCES += $(LIBUNISTRING_UNISTR_H) unistr.h: unistr.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unistr.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += unistr.h unistr.h-t EXTRA_DIST += unistr.in.h ## end gnulib module unistr/base ## begin gnulib module unistr/u8-check if LIBUNISTRING_COMPILE_UNISTR_U8_CHECK libgl_la_SOURCES += unistr/u8-check.c endif ## end gnulib module unistr/u8-check ## begin gnulib module unistr/u8-cmp if LIBUNISTRING_COMPILE_UNISTR_U8_CMP libgl_la_SOURCES += unistr/u8-cmp.c endif ## end gnulib module unistr/u8-cmp ## begin gnulib module unistr/u8-cmp2 if LIBUNISTRING_COMPILE_UNISTR_U8_CMP2 libgl_la_SOURCES += unistr/u8-cmp2.c endif EXTRA_DIST += unistr/u-cmp2.h ## end gnulib module unistr/u8-cmp2 ## begin gnulib module unistr/u8-cpy if LIBUNISTRING_COMPILE_UNISTR_U8_CPY libgl_la_SOURCES += unistr/u8-cpy.c endif EXTRA_DIST += unistr/u-cpy.h ## end gnulib module unistr/u8-cpy ## begin gnulib module unistr/u8-mblen if LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN libgl_la_SOURCES += unistr/u8-mblen.c endif ## end gnulib module unistr/u8-mblen ## begin gnulib module unistr/u8-mbtouc if LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC libgl_la_SOURCES += unistr/u8-mbtouc.c unistr/u8-mbtouc-aux.c endif ## end gnulib module unistr/u8-mbtouc ## begin gnulib module unistr/u8-mbtouc-unsafe if LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE libgl_la_SOURCES += unistr/u8-mbtouc-unsafe.c unistr/u8-mbtouc-unsafe-aux.c endif ## end gnulib module unistr/u8-mbtouc-unsafe ## begin gnulib module unistr/u8-mbtoucr if LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR libgl_la_SOURCES += unistr/u8-mbtoucr.c endif ## end gnulib module unistr/u8-mbtoucr ## begin gnulib module unistr/u8-strlen if LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN libgl_la_SOURCES += unistr/u8-strlen.c endif ## end gnulib module unistr/u8-strlen ## begin gnulib module unistr/u8-strmbtouc if LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC libgl_la_SOURCES += unistr/u8-strmbtouc.c endif ## end gnulib module unistr/u8-strmbtouc ## begin gnulib module unistr/u8-strncat if LIBUNISTRING_COMPILE_UNISTR_U8_STRNCAT libgl_la_SOURCES += unistr/u8-strncat.c endif ## end gnulib module unistr/u8-strncat ## begin gnulib module unistr/u8-uctomb if LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB libgl_la_SOURCES += unistr/u8-uctomb.c unistr/u8-uctomb-aux.c endif ## end gnulib module unistr/u8-uctomb ## begin gnulib module unitypes BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H) unitypes.h: unitypes.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/unitypes.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += unitypes.h unitypes.h-t EXTRA_DIST += unitypes.in.h ## end gnulib module unitypes ## begin gnulib module uniwidth/base BUILT_SOURCES += $(LIBUNISTRING_UNIWIDTH_H) uniwidth.h: uniwidth.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/uniwidth.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += uniwidth.h uniwidth.h-t EXTRA_DIST += localcharset.h uniwidth.in.h ## end gnulib module uniwidth/base ## begin gnulib module uniwidth/u8-strwidth if LIBUNISTRING_COMPILE_UNIWIDTH_U8_STRWIDTH libgl_la_SOURCES += uniwidth/u8-strwidth.c endif ## end gnulib module uniwidth/u8-strwidth ## begin gnulib module uniwidth/u8-width if LIBUNISTRING_COMPILE_UNIWIDTH_U8_WIDTH libgl_la_SOURCES += uniwidth/u8-width.c endif ## end gnulib module uniwidth/u8-width ## begin gnulib module uniwidth/width if LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH libgl_la_SOURCES += uniwidth/width.c endif EXTRA_DIST += uniwidth/cjk.h ## end gnulib module uniwidth/width ## begin gnulib module unlocked-io EXTRA_DIST += unlocked-io.h ## end gnulib module unlocked-io ## begin gnulib module unsetenv EXTRA_DIST += unsetenv.c EXTRA_libgl_la_SOURCES += unsetenv.c ## end gnulib module unsetenv ## begin gnulib module vasnprintf EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h EXTRA_libgl_la_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c ## end gnulib module vasnprintf ## begin gnulib module vasprintf EXTRA_DIST += asprintf.c vasprintf.c EXTRA_libgl_la_SOURCES += asprintf.c vasprintf.c ## end gnulib module vasprintf ## begin gnulib module verify EXTRA_DIST += verify.h ## end gnulib module verify ## begin gnulib module version-etc libgl_la_SOURCES += version-etc.h version-etc.c ## end gnulib module version-etc ## begin gnulib module version-etc-fsf libgl_la_SOURCES += version-etc-fsf.c ## end gnulib module version-etc-fsf ## begin gnulib module vfprintf-posix EXTRA_DIST += vfprintf.c EXTRA_libgl_la_SOURCES += vfprintf.c ## end gnulib module vfprintf-posix ## begin gnulib module vprintf-posix EXTRA_DIST += vprintf.c EXTRA_libgl_la_SOURCES += vprintf.c ## end gnulib module vprintf-posix ## begin gnulib module vsnprintf EXTRA_DIST += vsnprintf.c EXTRA_libgl_la_SOURCES += vsnprintf.c ## end gnulib module vsnprintf ## begin gnulib module vsprintf-posix EXTRA_DIST += vsprintf.c EXTRA_libgl_la_SOURCES += vsprintf.c ## end gnulib module vsprintf-posix ## begin gnulib module wchar BUILT_SOURCES += wchar.h # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \ < $(srcdir)/wchar.in.h | \ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | \ sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += wchar.h wchar.h-t EXTRA_DIST += wchar.in.h ## end gnulib module wchar ## begin gnulib module wcrtomb EXTRA_DIST += wcrtomb.c EXTRA_libgl_la_SOURCES += wcrtomb.c ## end gnulib module wcrtomb ## begin gnulib module wctype-h BUILT_SOURCES += wctype.h libgl_la_SOURCES += wctype-h.c # We need the following in order to create when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wctype.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += wctype.h wctype.h-t EXTRA_DIST += wctype.in.h ## end gnulib module wctype-h ## begin gnulib module wcwidth EXTRA_DIST += wcwidth.c EXTRA_libgl_la_SOURCES += wcwidth.c ## end gnulib module wcwidth ## begin gnulib module write EXTRA_DIST += write.c EXTRA_libgl_la_SOURCES += write.c ## end gnulib module write ## begin gnulib module xalloc libgl_la_SOURCES += xmalloc.c EXTRA_DIST += xalloc.h ## end gnulib module xalloc ## begin gnulib module xalloc-die libgl_la_SOURCES += xalloc-die.c ## end gnulib module xalloc-die ## begin gnulib module xalloc-oversized EXTRA_DIST += xalloc-oversized.h ## end gnulib module xalloc-oversized ## begin gnulib module xlist libgl_la_SOURCES += gl_xlist.h gl_xlist.c ## end gnulib module xlist ## begin gnulib module xmalloca libgl_la_SOURCES += xmalloca.c EXTRA_DIST += xmalloca.h ## end gnulib module xmalloca ## begin gnulib module xmemdup0 EXTRA_DIST += xmemdup0.c xmemdup0.h EXTRA_libgl_la_SOURCES += xmemdup0.c ## end gnulib module xmemdup0 ## begin gnulib module xreadlink libgl_la_SOURCES += xreadlink.c EXTRA_DIST += xreadlink.h ## end gnulib module xreadlink ## begin gnulib module xsize libgl_la_SOURCES += xsize.h xsize.c ## end gnulib module xsize ## begin gnulib module xstrndup libgl_la_SOURCES += xstrndup.h xstrndup.c ## end gnulib module xstrndup ## begin gnulib module xvasprintf libgl_la_SOURCES += xvasprintf.h xvasprintf.c xasprintf.c EXTRA_DIST += xalloc.h ## end gnulib module xvasprintf mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : pspp-1.0.1/gl/unistd.c0000644000175000017500000000014713020461275011472 00000000000000#include #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE #include "unistd.h" typedef int dummy; pspp-1.0.1/gl/printf-frexpl.h0000644000175000017500000000210313124536242012765 00000000000000/* Split a 'long double' into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Write a finite, positive number x as x = mantissa * 2^exp where exp >= LDBL_MIN_EXP - 1, mantissa < 2.0, if x is not a denormalized number then mantissa >= 1.0. Store exp in *EXPPTR and return mantissa. */ extern long double printf_frexpl (long double x, int *expptr); pspp-1.0.1/gl/unicase/0000755000175000017500000000000013150620334011522 500000000000000pspp-1.0.1/gl/unicase/u8-casemap.c0000644000175000017500000000237213124536243013563 00000000000000/* Case mapping for UTF-8 strings (locale dependent). Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicasemap.h" #include #include #include #include "unistr.h" #include "unictype.h" #include "uninorm.h" #include "caseprop.h" #include "context.h" #include "unicase/special-casing.h" #define FUNC u8_casemap #define UNIT uint8_t #define U_MBTOUC_UNSAFE u8_mbtouc_unsafe #define U_UCTOMB u8_uctomb #define U_CPY u8_cpy #define U_NORMALIZE u8_normalize #include "u-casemap.h" pspp-1.0.1/gl/unicase/u8-ct-casefold.c0000644000175000017500000000222013124536243014326 00000000000000/* Casefolding mapping for UTF-8 substrings (locale dependent). Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicase.h" #include #include #include #include "unicasemap.h" #include "unicase/special-casing.h" #include "casefold.h" #define FUNC u8_ct_casefold #define UNIT uint8_t #define U_CASEMAP u8_casemap #define U_NORMALIZE u8_normalize #include "u-ct-casefold.h" pspp-1.0.1/gl/unicase/special-casing-table.h0000644000175000017500000007641013020461376015577 00000000000000/* ANSI-C code produced by gperf version 3.0.4 */ /* Command-line: gperf -m 10 ../../gl/unicase/special-casing-table.gperf */ /* Computed positions: -k'1-3' */ #define TOTAL_KEYWORDS 122 #define MIN_WORD_LENGTH 3 #define MAX_WORD_LENGTH 3 #define MIN_HASH_VALUE 0 #define MAX_HASH_VALUE 121 /* maximum key range = 122, duplicates = 0 */ #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif /*ARGSUSED*/ static unsigned int gl_unicase_special_hash (register const char *str, register unsigned int len) { static const unsigned char asso_values[] = { 2, 0, 4, 5, 37, 12, 121, 4, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 120, 119, 118, 117, 116, 122, 122, 122, 122, 122, 122, 5, 3, 122, 122, 122, 122, 122, 122, 122, 122, 115, 122, 122, 122, 122, 122, 114, 122, 6, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 1, 111, 122, 122, 122, 122, 122, 109, 122, 108, 122, 107, 122, 106, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 33, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 105, 104, 103, 102, 101, 100, 99, 31, 98, 97, 96, 95, 94, 93, 92, 91, 28, 90, 89, 88, 87, 86, 27, 24, 23, 20, 19, 85, 84, 83, 16, 82, 81, 80, 79, 15, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 64, 122, 65, 64, 63, 122, 62, 61, 122, 122, 122, 122, 60, 122, 122, 122, 122, 122, 59, 58, 57, 122, 56, 55, 122, 122, 122, 122, 14, 55, 122, 122, 122, 122, 53, 52, 122, 122, 51, 50, 122, 122, 122, 122, 122, 122, 122, 50, 122, 122, 48, 47, 46, 122, 45, 44, 122, 122, 122, 122, 122, 122, 122, 122, 46, 122, 42, 41, 39, 122, 38, 35, 122, 122, 122, 0, 33, 122, 122, 122, 122 }; return asso_values[(unsigned char)str[2]+1] + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]]; } #ifdef __GNUC__ __inline #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif const struct special_casing_rule * gl_unicase_special_lookup (register const char *str, register unsigned int len) { static const unsigned char lengthtable[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }; static const struct special_casing_rule wordlist[] = { #line 126 "../../gl/unicase/special-casing-table.gperf" {"\373\001\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0046, 0x0049, 0 }, { 0xFB01, 0, 0 }, { 0x0046, 0x0069, 0 }, { 0x0066, 0x0069, 0 }}, #line 31 "../../gl/unicase/special-casing-table.gperf" {"\001I\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x02BC, 0x004E, 0 }, { 0x0149, 0, 0 }, { 0x02BC, 0x004E, 0 }, { 0x02BC, 0x006E, 0 }}, #line 125 "../../gl/unicase/special-casing-table.gperf" {"\373\000\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0046, 0x0046, 0 }, { 0xFB00, 0, 0 }, { 0x0046, 0x0066, 0 }, { 0x0066, 0x0066, 0 }}, #line 15 "../../gl/unicase/special-casing-table.gperf" {"\000I\000", 1, SCC_MORE_ABOVE , { 'l', 't' }, { 0x0049, 0, 0 }, { 0x0069, 0x0307, 0 }, { 0x0049, 0, 0 }, { 0x0069, 0, 0 }}, #line 127 "../../gl/unicase/special-casing-table.gperf" {"\373\002\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0046, 0x004C, 0 }, { 0xFB02, 0, 0 }, { 0x0046, 0x006C, 0 }, { 0x0066, 0x006C, 0 }}, #line 128 "../../gl/unicase/special-casing-table.gperf" {"\373\003\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0046, 0x0046, 0x0049 }, { 0xFB03, 0, 0 }, { 0x0046, 0x0066, 0x0069 }, { 0x0066, 0x0066, 0x0069 }}, #line 28 "../../gl/unicase/special-casing-table.gperf" {"\0010\000", 1, SCC_ALWAYS , { 't', 'r' }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }}, #line 16 "../../gl/unicase/special-casing-table.gperf" {"\000I\001", 1, -SCC_BEFORE_DOT , { 't', 'r' }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 }}, #line 17 "../../gl/unicase/special-casing-table.gperf" {"\000I\002", 1, -SCC_BEFORE_DOT , { 'a', 'z' }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 }}, #line 33 "../../gl/unicase/special-casing-table.gperf" {"\003\007\000", 1, SCC_AFTER_SOFT_DOTTED, { 'l', 't' }, { 0, 0, 0 }, { 0x0307, 0, 0 }, { 0, 0, 0 }, { 0x0307, 0, 0 }}, #line 29 "../../gl/unicase/special-casing-table.gperf" {"\0010\001", 1, SCC_ALWAYS , { 'a', 'z' }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }}, #line 30 "../../gl/unicase/special-casing-table.gperf" {"\0010\002", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0130, 0, 0 }, { 0x0069, 0x0307, 0 }, { 0x0130, 0, 0 }, { 0x0069, 0x0307, 0 }}, #line 130 "../../gl/unicase/special-casing-table.gperf" {"\373\005\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0053, 0x0054, 0 }, { 0xFB05, 0, 0 }, { 0x0053, 0x0074, 0 }, { 0x0073, 0x0074, 0 }}, #line 34 "../../gl/unicase/special-casing-table.gperf" {"\003\007\001", 1, SCC_AFTER_I , { 't', 'r' }, { 0x0307, 0, 0 }, { 0, 0, 0 }, { 0x0307, 0, 0 }, { 0x0307, 0, 0 }}, #line 35 "../../gl/unicase/special-casing-table.gperf" {"\003\007\002", 0, SCC_AFTER_I , { 'a', 'z' }, { 0x0307, 0, 0 }, { 0, 0, 0 }, { 0x0307, 0, 0 }, { 0x0307, 0, 0 }}, #line 19 "../../gl/unicase/special-casing-table.gperf" {"\000I\004", 0, SCC_ALWAYS , { 'a', 'z' }, { 0x0049, 0, 0 }, { 0x0069, 0, 0 }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 }}, #line 23 "../../gl/unicase/special-casing-table.gperf" {"\000\314\000", 0, SCC_ALWAYS , { 'l', 't' }, { 0x00CC, 0, 0 }, { 0x0069, 0x0307, 0x0300 }, { 0x00CC, 0, 0 }, { 0x00EC, 0, 0 }}, #line 109 "../../gl/unicase/special-casing-table.gperf" {"\037\314\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0397, 0x0399, 0 }, { 0x1FC3, 0, 0 }, { 0x1FCC, 0, 0 }, { 0x03B7, 0x03B9, 0 }}, #line 85 "../../gl/unicase/special-casing-table.gperf" {"\037\243\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6B, 0x0399, 0 }, { 0x1FA3, 0, 0 }, { 0x1FAB, 0, 0 }, { 0x1F63, 0x03B9, 0 }}, #line 80 "../../gl/unicase/special-casing-table.gperf" {"\037\236\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2E, 0x0399, 0 }, { 0x1F96, 0, 0 }, { 0x1F9E, 0, 0 }, { 0x1F26, 0x03B9, 0 }}, #line 37 "../../gl/unicase/special-casing-table.gperf" {"\003\243\000", 0, SCC_FINAL_SIGMA , { '\0', '\0' }, { 0x03A3, 0, 0 }, { 0x03C2, 0, 0 }, { 0x03A3, 0, 0 }, { 0x03C3, 0, 0 }}, #line 45 "../../gl/unicase/special-casing-table.gperf" {"\036\236\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1E9E, 0, 0 }, { 0x00DF, 0, 0 }, { 0x1E9E, 0, 0 }, { 0x0073, 0x0073, 0 }}, #line 76 "../../gl/unicase/special-casing-table.gperf" {"\037\232\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2A, 0x0399, 0 }, { 0x1F92, 0, 0 }, { 0x1F9A, 0, 0 }, { 0x1F22, 0x03B9, 0 }}, #line 75 "../../gl/unicase/special-casing-table.gperf" {"\037\231\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F29, 0x0399, 0 }, { 0x1F91, 0, 0 }, { 0x1F99, 0, 0 }, { 0x1F21, 0x03B9, 0 }}, #line 44 "../../gl/unicase/special-casing-table.gperf" {"\036\232\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0041, 0x02BE, 0 }, { 0x1E9A, 0, 0 }, { 0x0041, 0x02BE, 0 }, { 0x0061, 0x02BE, 0 }}, #line 43 "../../gl/unicase/special-casing-table.gperf" {"\036\231\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0059, 0x030A, 0 }, { 0x1E99, 0, 0 }, { 0x0059, 0x030A, 0 }, { 0x0079, 0x030A, 0 }}, #line 74 "../../gl/unicase/special-casing-table.gperf" {"\037\230\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F28, 0x0399, 0 }, { 0x1F90, 0, 0 }, { 0x1F98, 0, 0 }, { 0x1F20, 0x03B9, 0 }}, #line 73 "../../gl/unicase/special-casing-table.gperf" {"\037\227\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2F, 0x0399, 0 }, { 0x1F97, 0, 0 }, { 0x1F9F, 0, 0 }, { 0x1F27, 0x03B9, 0 }}, #line 42 "../../gl/unicase/special-casing-table.gperf" {"\036\230\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0057, 0x030A, 0 }, { 0x1E98, 0, 0 }, { 0x0057, 0x030A, 0 }, { 0x0077, 0x030A, 0 }}, #line 41 "../../gl/unicase/special-casing-table.gperf" {"\036\227\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0054, 0x0308, 0 }, { 0x1E97, 0, 0 }, { 0x0054, 0x0308, 0 }, { 0x0074, 0x0308, 0 }}, #line 72 "../../gl/unicase/special-casing-table.gperf" {"\037\226\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2E, 0x0399, 0 }, { 0x1F96, 0, 0 }, { 0x1F9E, 0, 0 }, { 0x1F26, 0x03B9, 0 }}, #line 66 "../../gl/unicase/special-casing-table.gperf" {"\037\220\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F28, 0x0399, 0 }, { 0x1F90, 0, 0 }, { 0x1F98, 0, 0 }, { 0x1F20, 0x03B9, 0 }}, #line 40 "../../gl/unicase/special-casing-table.gperf" {"\036\226\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0048, 0x0331, 0 }, { 0x1E96, 0, 0 }, { 0x0048, 0x0331, 0 }, { 0x0068, 0x0331, 0 }}, #line 36 "../../gl/unicase/special-casing-table.gperf" {"\003\220\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0399, 0x0308, 0x0301 }, { 0x0390, 0, 0 }, { 0x0399, 0x0308, 0x0301 }, { 0x03B9, 0x0308, 0x0301 }}, #line 57 "../../gl/unicase/special-casing-table.gperf" {"\037\207\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0F, 0x0399, 0 }, { 0x1F87, 0, 0 }, { 0x1F8F, 0, 0 }, { 0x1F07, 0x03B9, 0 }}, #line 21 "../../gl/unicase/special-casing-table.gperf" {"\000i\000", 1, SCC_ALWAYS , { 't', 'r' }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }}, #line 124 "../../gl/unicase/special-casing-table.gperf" {"\037\374\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A9, 0x0399, 0 }, { 0x1FF3, 0, 0 }, { 0x1FFC, 0, 0 }, { 0x03C9, 0x03B9, 0 }}, #line 129 "../../gl/unicase/special-casing-table.gperf" {"\373\004\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0046, 0x0046, 0x004C }, { 0xFB04, 0, 0 }, { 0x0046, 0x0066, 0x006C }, { 0x0066, 0x0066, 0x006C }}, #line 123 "../../gl/unicase/special-casing-table.gperf" {"\037\367\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A9, 0x0342, 0x0399 }, { 0x1FF7, 0, 0 }, { 0x03A9, 0x0342, 0x0345 }, { 0x03C9, 0x0342, 0x03B9 }}, #line 22 "../../gl/unicase/special-casing-table.gperf" {"\000i\001", 0, SCC_ALWAYS , { 'a', 'z' }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }}, #line 18 "../../gl/unicase/special-casing-table.gperf" {"\000I\003", 1, SCC_ALWAYS , { 't', 'r' }, { 0x0049, 0, 0 }, { 0x0069, 0, 0 }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 }}, #line 122 "../../gl/unicase/special-casing-table.gperf" {"\037\366\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A9, 0x0342, 0 }, { 0x1FF6, 0, 0 }, { 0x03A9, 0x0342, 0 }, { 0x03C9, 0x0342, 0 }}, #line 121 "../../gl/unicase/special-casing-table.gperf" {"\037\364\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x038F, 0x0399, 0 }, { 0x1FF4, 0, 0 }, { 0x038F, 0x0345, 0 }, { 0x03CE, 0x03B9, 0 }}, #line 39 "../../gl/unicase/special-casing-table.gperf" {"\005\207\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0535, 0x0552, 0 }, { 0x0587, 0, 0 }, { 0x0535, 0x0582, 0 }, { 0x0565, 0x0582, 0 }}, #line 120 "../../gl/unicase/special-casing-table.gperf" {"\037\363\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A9, 0x0399, 0 }, { 0x1FF3, 0, 0 }, { 0x1FFC, 0, 0 }, { 0x03C9, 0x03B9, 0 }}, #line 119 "../../gl/unicase/special-casing-table.gperf" {"\037\362\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1FFA, 0x0399, 0 }, { 0x1FF2, 0, 0 }, { 0x1FFA, 0x0345, 0 }, { 0x1F7C, 0x03B9, 0 }}, #line 32 "../../gl/unicase/special-casing-table.gperf" {"\001\360\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x004A, 0x030C, 0 }, { 0x01F0, 0, 0 }, { 0x004A, 0x030C, 0 }, { 0x006A, 0x030C, 0 }}, #line 118 "../../gl/unicase/special-casing-table.gperf" {"\037\347\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0308, 0x0342 }, { 0x1FE7, 0, 0 }, { 0x03A5, 0x0308, 0x0342 }, { 0x03C5, 0x0308, 0x0342 }}, #line 117 "../../gl/unicase/special-casing-table.gperf" {"\037\346\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0342, 0 }, { 0x1FE6, 0, 0 }, { 0x03A5, 0x0342, 0 }, { 0x03C5, 0x0342, 0 }}, #line 116 "../../gl/unicase/special-casing-table.gperf" {"\037\344\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A1, 0x0313, 0 }, { 0x1FE4, 0, 0 }, { 0x03A1, 0x0313, 0 }, { 0x03C1, 0x0313, 0 }}, #line 115 "../../gl/unicase/special-casing-table.gperf" {"\037\343\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0308, 0x0301 }, { 0x1FE3, 0, 0 }, { 0x03A5, 0x0308, 0x0301 }, { 0x03C5, 0x0308, 0x0301 }}, #line 114 "../../gl/unicase/special-casing-table.gperf" {"\037\342\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0308, 0x0300 }, { 0x1FE2, 0, 0 }, { 0x03A5, 0x0308, 0x0300 }, { 0x03C5, 0x0308, 0x0300 }}, #line 25 "../../gl/unicase/special-casing-table.gperf" {"\000\337\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0053, 0x0053, 0 }, { 0x00DF, 0, 0 }, { 0x0053, 0x0073, 0 }, { 0x0073, 0x0073, 0 }}, #line 113 "../../gl/unicase/special-casing-table.gperf" {"\037\327\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0399, 0x0308, 0x0342 }, { 0x1FD7, 0, 0 }, { 0x0399, 0x0308, 0x0342 }, { 0x03B9, 0x0308, 0x0342 }}, #line 112 "../../gl/unicase/special-casing-table.gperf" {"\037\326\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0399, 0x0342, 0 }, { 0x1FD6, 0, 0 }, { 0x0399, 0x0342, 0 }, { 0x03B9, 0x0342, 0 }}, #line 111 "../../gl/unicase/special-casing-table.gperf" {"\037\323\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0399, 0x0308, 0x0301 }, { 0x1FD3, 0, 0 }, { 0x0399, 0x0308, 0x0301 }, { 0x03B9, 0x0308, 0x0301 }}, #line 110 "../../gl/unicase/special-casing-table.gperf" {"\037\322\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0399, 0x0308, 0x0300 }, { 0x1FD2, 0, 0 }, { 0x0399, 0x0308, 0x0300 }, { 0x03B9, 0x0308, 0x0300 }}, #line 24 "../../gl/unicase/special-casing-table.gperf" {"\000\315\000", 0, SCC_ALWAYS , { 'l', 't' }, { 0x00CD, 0, 0 }, { 0x0069, 0x0307, 0x0301 }, { 0x00CD, 0, 0 }, { 0x00ED, 0, 0 }}, #line 108 "../../gl/unicase/special-casing-table.gperf" {"\037\307\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0397, 0x0342, 0x0399 }, { 0x1FC7, 0, 0 }, { 0x0397, 0x0342, 0x0345 }, { 0x03B7, 0x0342, 0x03B9 }}, #line 107 "../../gl/unicase/special-casing-table.gperf" {"\037\306\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0397, 0x0342, 0 }, { 0x1FC6, 0, 0 }, { 0x0397, 0x0342, 0 }, { 0x03B7, 0x0342, 0 }}, #line 106 "../../gl/unicase/special-casing-table.gperf" {"\037\304\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0389, 0x0399, 0 }, { 0x1FC4, 0, 0 }, { 0x0389, 0x0345, 0 }, { 0x03AE, 0x03B9, 0 }}, #line 105 "../../gl/unicase/special-casing-table.gperf" {"\037\303\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0397, 0x0399, 0 }, { 0x1FC3, 0, 0 }, { 0x1FCC, 0, 0 }, { 0x03B7, 0x03B9, 0 }}, #line 104 "../../gl/unicase/special-casing-table.gperf" {"\037\302\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1FCA, 0x0399, 0 }, { 0x1FC2, 0, 0 }, { 0x1FCA, 0x0345, 0 }, { 0x1F74, 0x03B9, 0 }}, #line 103 "../../gl/unicase/special-casing-table.gperf" {"\037\274\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0391, 0x0399, 0 }, { 0x1FB3, 0, 0 }, { 0x1FBC, 0, 0 }, { 0x03B1, 0x03B9, 0 }}, #line 102 "../../gl/unicase/special-casing-table.gperf" {"\037\267\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0391, 0x0342, 0x0399 }, { 0x1FB7, 0, 0 }, { 0x0391, 0x0342, 0x0345 }, { 0x03B1, 0x0342, 0x03B9 }}, #line 101 "../../gl/unicase/special-casing-table.gperf" {"\037\266\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0391, 0x0342, 0 }, { 0x1FB6, 0, 0 }, { 0x0391, 0x0342, 0 }, { 0x03B1, 0x0342, 0 }}, #line 100 "../../gl/unicase/special-casing-table.gperf" {"\037\264\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0386, 0x0399, 0 }, { 0x1FB4, 0, 0 }, { 0x0386, 0x0345, 0 }, { 0x03AC, 0x03B9, 0 }}, #line 99 "../../gl/unicase/special-casing-table.gperf" {"\037\263\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0391, 0x0399, 0 }, { 0x1FB3, 0, 0 }, { 0x1FBC, 0, 0 }, { 0x03B1, 0x03B9, 0 }}, #line 98 "../../gl/unicase/special-casing-table.gperf" {"\037\262\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1FBA, 0x0399, 0 }, { 0x1FB2, 0, 0 }, { 0x1FBA, 0x0345, 0 }, { 0x1F70, 0x03B9, 0 }}, #line 38 "../../gl/unicase/special-casing-table.gperf" {"\003\260\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0308, 0x0301 }, { 0x03B0, 0, 0 }, { 0x03A5, 0x0308, 0x0301 }, { 0x03C5, 0x0308, 0x0301 }}, #line 97 "../../gl/unicase/special-casing-table.gperf" {"\037\257\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6F, 0x0399, 0 }, { 0x1FA7, 0, 0 }, { 0x1FAF, 0, 0 }, { 0x1F67, 0x03B9, 0 }}, #line 96 "../../gl/unicase/special-casing-table.gperf" {"\037\256\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6E, 0x0399, 0 }, { 0x1FA6, 0, 0 }, { 0x1FAE, 0, 0 }, { 0x1F66, 0x03B9, 0 }}, #line 95 "../../gl/unicase/special-casing-table.gperf" {"\037\255\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6D, 0x0399, 0 }, { 0x1FA5, 0, 0 }, { 0x1FAD, 0, 0 }, { 0x1F65, 0x03B9, 0 }}, #line 94 "../../gl/unicase/special-casing-table.gperf" {"\037\254\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6C, 0x0399, 0 }, { 0x1FA4, 0, 0 }, { 0x1FAC, 0, 0 }, { 0x1F64, 0x03B9, 0 }}, #line 93 "../../gl/unicase/special-casing-table.gperf" {"\037\253\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6B, 0x0399, 0 }, { 0x1FA3, 0, 0 }, { 0x1FAB, 0, 0 }, { 0x1F63, 0x03B9, 0 }}, #line 92 "../../gl/unicase/special-casing-table.gperf" {"\037\252\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6A, 0x0399, 0 }, { 0x1FA2, 0, 0 }, { 0x1FAA, 0, 0 }, { 0x1F62, 0x03B9, 0 }}, #line 91 "../../gl/unicase/special-casing-table.gperf" {"\037\251\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F69, 0x0399, 0 }, { 0x1FA1, 0, 0 }, { 0x1FA9, 0, 0 }, { 0x1F61, 0x03B9, 0 }}, #line 90 "../../gl/unicase/special-casing-table.gperf" {"\037\250\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F68, 0x0399, 0 }, { 0x1FA0, 0, 0 }, { 0x1FA8, 0, 0 }, { 0x1F60, 0x03B9, 0 }}, #line 89 "../../gl/unicase/special-casing-table.gperf" {"\037\247\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6F, 0x0399, 0 }, { 0x1FA7, 0, 0 }, { 0x1FAF, 0, 0 }, { 0x1F67, 0x03B9, 0 }}, #line 88 "../../gl/unicase/special-casing-table.gperf" {"\037\246\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6E, 0x0399, 0 }, { 0x1FA6, 0, 0 }, { 0x1FAE, 0, 0 }, { 0x1F66, 0x03B9, 0 }}, #line 87 "../../gl/unicase/special-casing-table.gperf" {"\037\245\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6D, 0x0399, 0 }, { 0x1FA5, 0, 0 }, { 0x1FAD, 0, 0 }, { 0x1F65, 0x03B9, 0 }}, #line 86 "../../gl/unicase/special-casing-table.gperf" {"\037\244\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6C, 0x0399, 0 }, { 0x1FA4, 0, 0 }, { 0x1FAC, 0, 0 }, { 0x1F64, 0x03B9, 0 }}, #line 84 "../../gl/unicase/special-casing-table.gperf" {"\037\242\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6A, 0x0399, 0 }, { 0x1FA2, 0, 0 }, { 0x1FAA, 0, 0 }, { 0x1F62, 0x03B9, 0 }}, #line 83 "../../gl/unicase/special-casing-table.gperf" {"\037\241\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F69, 0x0399, 0 }, { 0x1FA1, 0, 0 }, { 0x1FA9, 0, 0 }, { 0x1F61, 0x03B9, 0 }}, #line 82 "../../gl/unicase/special-casing-table.gperf" {"\037\240\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F68, 0x0399, 0 }, { 0x1FA0, 0, 0 }, { 0x1FA8, 0, 0 }, { 0x1F60, 0x03B9, 0 }}, #line 81 "../../gl/unicase/special-casing-table.gperf" {"\037\237\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2F, 0x0399, 0 }, { 0x1F97, 0, 0 }, { 0x1F9F, 0, 0 }, { 0x1F27, 0x03B9, 0 }}, #line 79 "../../gl/unicase/special-casing-table.gperf" {"\037\235\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2D, 0x0399, 0 }, { 0x1F95, 0, 0 }, { 0x1F9D, 0, 0 }, { 0x1F25, 0x03B9, 0 }}, #line 78 "../../gl/unicase/special-casing-table.gperf" {"\037\234\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2C, 0x0399, 0 }, { 0x1F94, 0, 0 }, { 0x1F9C, 0, 0 }, { 0x1F24, 0x03B9, 0 }}, #line 77 "../../gl/unicase/special-casing-table.gperf" {"\037\233\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2B, 0x0399, 0 }, { 0x1F93, 0, 0 }, { 0x1F9B, 0, 0 }, { 0x1F23, 0x03B9, 0 }}, #line 71 "../../gl/unicase/special-casing-table.gperf" {"\037\225\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2D, 0x0399, 0 }, { 0x1F95, 0, 0 }, { 0x1F9D, 0, 0 }, { 0x1F25, 0x03B9, 0 }}, #line 70 "../../gl/unicase/special-casing-table.gperf" {"\037\224\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2C, 0x0399, 0 }, { 0x1F94, 0, 0 }, { 0x1F9C, 0, 0 }, { 0x1F24, 0x03B9, 0 }}, #line 69 "../../gl/unicase/special-casing-table.gperf" {"\037\223\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2B, 0x0399, 0 }, { 0x1F93, 0, 0 }, { 0x1F9B, 0, 0 }, { 0x1F23, 0x03B9, 0 }}, #line 68 "../../gl/unicase/special-casing-table.gperf" {"\037\222\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2A, 0x0399, 0 }, { 0x1F92, 0, 0 }, { 0x1F9A, 0, 0 }, { 0x1F22, 0x03B9, 0 }}, #line 67 "../../gl/unicase/special-casing-table.gperf" {"\037\221\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F29, 0x0399, 0 }, { 0x1F91, 0, 0 }, { 0x1F99, 0, 0 }, { 0x1F21, 0x03B9, 0 }}, #line 65 "../../gl/unicase/special-casing-table.gperf" {"\037\217\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0F, 0x0399, 0 }, { 0x1F87, 0, 0 }, { 0x1F8F, 0, 0 }, { 0x1F07, 0x03B9, 0 }}, #line 64 "../../gl/unicase/special-casing-table.gperf" {"\037\216\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0E, 0x0399, 0 }, { 0x1F86, 0, 0 }, { 0x1F8E, 0, 0 }, { 0x1F06, 0x03B9, 0 }}, #line 63 "../../gl/unicase/special-casing-table.gperf" {"\037\215\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0D, 0x0399, 0 }, { 0x1F85, 0, 0 }, { 0x1F8D, 0, 0 }, { 0x1F05, 0x03B9, 0 }}, #line 62 "../../gl/unicase/special-casing-table.gperf" {"\037\214\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0C, 0x0399, 0 }, { 0x1F84, 0, 0 }, { 0x1F8C, 0, 0 }, { 0x1F04, 0x03B9, 0 }}, #line 61 "../../gl/unicase/special-casing-table.gperf" {"\037\213\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0B, 0x0399, 0 }, { 0x1F83, 0, 0 }, { 0x1F8B, 0, 0 }, { 0x1F03, 0x03B9, 0 }}, #line 60 "../../gl/unicase/special-casing-table.gperf" {"\037\212\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0A, 0x0399, 0 }, { 0x1F82, 0, 0 }, { 0x1F8A, 0, 0 }, { 0x1F02, 0x03B9, 0 }}, #line 59 "../../gl/unicase/special-casing-table.gperf" {"\037\211\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F09, 0x0399, 0 }, { 0x1F81, 0, 0 }, { 0x1F89, 0, 0 }, { 0x1F01, 0x03B9, 0 }}, #line 58 "../../gl/unicase/special-casing-table.gperf" {"\037\210\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F08, 0x0399, 0 }, { 0x1F80, 0, 0 }, { 0x1F88, 0, 0 }, { 0x1F00, 0x03B9, 0 }}, #line 56 "../../gl/unicase/special-casing-table.gperf" {"\037\206\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0E, 0x0399, 0 }, { 0x1F86, 0, 0 }, { 0x1F8E, 0, 0 }, { 0x1F06, 0x03B9, 0 }}, #line 55 "../../gl/unicase/special-casing-table.gperf" {"\037\205\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0D, 0x0399, 0 }, { 0x1F85, 0, 0 }, { 0x1F8D, 0, 0 }, { 0x1F05, 0x03B9, 0 }}, #line 54 "../../gl/unicase/special-casing-table.gperf" {"\037\204\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0C, 0x0399, 0 }, { 0x1F84, 0, 0 }, { 0x1F8C, 0, 0 }, { 0x1F04, 0x03B9, 0 }}, #line 53 "../../gl/unicase/special-casing-table.gperf" {"\037\203\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0B, 0x0399, 0 }, { 0x1F83, 0, 0 }, { 0x1F8B, 0, 0 }, { 0x1F03, 0x03B9, 0 }}, #line 52 "../../gl/unicase/special-casing-table.gperf" {"\037\202\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0A, 0x0399, 0 }, { 0x1F82, 0, 0 }, { 0x1F8A, 0, 0 }, { 0x1F02, 0x03B9, 0 }}, #line 51 "../../gl/unicase/special-casing-table.gperf" {"\037\201\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F09, 0x0399, 0 }, { 0x1F81, 0, 0 }, { 0x1F89, 0, 0 }, { 0x1F01, 0x03B9, 0 }}, #line 50 "../../gl/unicase/special-casing-table.gperf" {"\037\200\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F08, 0x0399, 0 }, { 0x1F80, 0, 0 }, { 0x1F88, 0, 0 }, { 0x1F00, 0x03B9, 0 }}, #line 49 "../../gl/unicase/special-casing-table.gperf" {"\037V\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0313, 0x0342 }, { 0x1F56, 0, 0 }, { 0x03A5, 0x0313, 0x0342 }, { 0x03C5, 0x0313, 0x0342 }}, #line 48 "../../gl/unicase/special-casing-table.gperf" {"\037T\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0313, 0x0301 }, { 0x1F54, 0, 0 }, { 0x03A5, 0x0313, 0x0301 }, { 0x03C5, 0x0313, 0x0301 }}, #line 47 "../../gl/unicase/special-casing-table.gperf" {"\037R\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0313, 0x0300 }, { 0x1F52, 0, 0 }, { 0x03A5, 0x0313, 0x0300 }, { 0x03C5, 0x0313, 0x0300 }}, #line 46 "../../gl/unicase/special-casing-table.gperf" {"\037P\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0313, 0 }, { 0x1F50, 0, 0 }, { 0x03A5, 0x0313, 0 }, { 0x03C5, 0x0313, 0 }}, #line 20 "../../gl/unicase/special-casing-table.gperf" {"\000J\000", 0, SCC_MORE_ABOVE , { 'l', 't' }, { 0x004A, 0, 0 }, { 0x006A, 0x0307, 0 }, { 0x004A, 0, 0 }, { 0x006A, 0, 0 }}, #line 27 "../../gl/unicase/special-casing-table.gperf" {"\001.\000", 0, SCC_MORE_ABOVE , { 'l', 't' }, { 0x012E, 0, 0 }, { 0x012F, 0x0307, 0 }, { 0x012E, 0, 0 }, { 0x012F, 0, 0 }}, #line 26 "../../gl/unicase/special-casing-table.gperf" {"\001(\000", 0, SCC_ALWAYS , { 'l', 't' }, { 0x0128, 0, 0 }, { 0x0069, 0x0307, 0x0303 }, { 0x0128, 0, 0 }, { 0x0129, 0, 0 }}, #line 136 "../../gl/unicase/special-casing-table.gperf" {"\373\027\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0544, 0x053D, 0 }, { 0xFB17, 0, 0 }, { 0x0544, 0x056D, 0 }, { 0x0574, 0x056D, 0 }}, #line 135 "../../gl/unicase/special-casing-table.gperf" {"\373\026\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x054E, 0x0546, 0 }, { 0xFB16, 0, 0 }, { 0x054E, 0x0576, 0 }, { 0x057E, 0x0576, 0 }}, #line 134 "../../gl/unicase/special-casing-table.gperf" {"\373\025\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0544, 0x053B, 0 }, { 0xFB15, 0, 0 }, { 0x0544, 0x056B, 0 }, { 0x0574, 0x056B, 0 }}, #line 133 "../../gl/unicase/special-casing-table.gperf" {"\373\024\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0544, 0x0535, 0 }, { 0xFB14, 0, 0 }, { 0x0544, 0x0565, 0 }, { 0x0574, 0x0565, 0 }}, #line 132 "../../gl/unicase/special-casing-table.gperf" {"\373\023\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0544, 0x0546, 0 }, { 0xFB13, 0, 0 }, { 0x0544, 0x0576, 0 }, { 0x0574, 0x0576, 0 }}, #line 131 "../../gl/unicase/special-casing-table.gperf" {"\373\006\000", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0053, 0x0054, 0 }, { 0xFB06, 0, 0 }, { 0x0053, 0x0074, 0 }, { 0x0073, 0x0074, 0 }} }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { register int key = gl_unicase_special_hash (str, len); if (key <= MAX_HASH_VALUE && key >= 0) if (len == lengthtable[key]) { register const char *s = wordlist[key].code; if (*str == *s && !memcmp (str + 1, s + 1, len - 1)) return &wordlist[key]; } } return 0; } pspp-1.0.1/gl/unicase/cased.h0000644000175000017500000002043113020461274012674 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Casing Properties of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ #define header_0 16 #define header_2 9 #define header_3 127 #define header_4 15 static const struct { int header[1]; int level1[2]; short level2[2 << 7]; /*unsigned*/ int level3[20 << 4]; } u_casing_property_cased = { { 2 }, { 3 * sizeof (int) / sizeof (short) + 0, 3 * sizeof (int) / sizeof (short) + 128 }, { 3 + 256 * sizeof (short) / sizeof (int) + 0, 3 + 256 * sizeof (short) / sizeof (int) + 16, 3 + 256 * sizeof (short) / sizeof (int) + 32, -1, -1, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 48, 3 + 256 * sizeof (short) / sizeof (int) + 64, -1, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 80, 3 + 256 * sizeof (short) / sizeof (int) + 96, 3 + 256 * sizeof (short) / sizeof (int) + 112, -1, 3 + 256 * sizeof (short) / sizeof (int) + 128, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 144, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 160, -1, 3 + 256 * sizeof (short) / sizeof (int) + 176, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 192, -1, 3 + 256 * sizeof (short) / sizeof (int) + 208, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 224, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 240, -1, -1, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 256, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 272, 3 + 256 * sizeof (short) / sizeof (int) + 288, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3 + 256 * sizeof (short) / sizeof (int) + 304, -1, -1, -1, -1, -1, -1, -1 }, { 0x00000000, 0x00000000, 0x07FFFFFE, 0x07FFFFFE, 0x00000000, 0x04200400, 0xFF7FFFFF, 0xFF7FFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xF7FFFFFF, 0xFFFFFFF0, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFEFFFFF, 0x01FFFFFF, 0x00000003, 0x0000001F, 0x00000000, 0x00000000, 0x00000020, 0xBCCF0000, 0xFFFFD740, 0xFFFFFFFB, 0xFFFFFFFF, 0xFFBFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFC03, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFEFFFF, 0x007FFFFF, 0xFFFFFFFE, 0x000000FF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x000020BF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x3F3FFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF, 0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF, 0x00000000, 0x00000000, 0x00000000, 0x80020000, 0x1FFF0000, 0x00000000, 0x00000000, 0x00000000, 0x3E2FFC84, 0xF21FBD50, 0x000043E0, 0xFFFFFFFF, 0x00000018, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFC00000, 0xFFFFFFFF, 0x000003FF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFF7FFF, 0x7FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x000C781F, 0xFFFFFFFF, 0x000020BF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x00003FFF, 0x3FFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFC, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF78FF, 0x00FF3FFF, 0x00000000, 0x07000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFF0000, 0xF7FFFFFF, 0xFFFF003F, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00F8007F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07FFFFFE, 0x07FFFFFE, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000FFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x0007FFFF, 0xFFFFFFFF, 0x0007FFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFDFFFFF, 0xFFFFFFFF, 0xDFFFFFFF, 0xEBFFDE64, 0xFFFFFFEF, 0xFFFFFFFF, 0xDFDFE7BF, 0x7BFFFFFF, 0xFFFDFC5F, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFF3F, 0xF7FFFFFD, 0xF7FFFFFF, 0xFFDFFFFF, 0xFFDFFFFF, 0xFFFF7FFF, 0xFFFF7FFF, 0xFFFFFDFF, 0xFFFFFDFF, 0x00000FF7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFF0000, 0xFFFF03FF, 0xFFFF03FF, 0x000003FF, 0x00000000, 0x00000000, 0x00000000 } }; pspp-1.0.1/gl/unicase/toupper.h0000644000175000017500000011763513020461274013330 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Simple character mapping of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ #define mapping_header_0 16 #define mapping_header_1 2 #define mapping_header_2 7 #define mapping_header_3 511 #define mapping_header_4 127 static const struct { int level1[2]; short level2[2 << 9]; int level3[34 << 7]; } u_mapping = { { 0, 512 }, { 0, 128, 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1408, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1536, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1664, -1, 1792, 1920, 2048, 2176, -1, -1, 2304, 2432, -1, -1, -1, -1, -1, 2560, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2688, 2816, 2944, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3072, 3200, 3328, 3456, -1, -1, -1, -1, -1, -1, 3584, 3712, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3840, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3968, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4096, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4224, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -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, 743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, 0, -32, -32, -32, -32, -32, -32, -32, 121, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -232, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, -300, 195, 0, 0, -1, 0, -1, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, 97, 0, 0, 0, -1, 163, 0, 0, 0, 130, 0, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, 0, 0, -1, 0, 56, 0, 0, 0, 0, 0, -1, -2, 0, -1, -2, 0, -1, -2, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, -79, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, -2, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 10815, 10815, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 10783, 10780, 10782, -210, -206, 0, -205, -205, 0, -202, 0, -203, 42319, 0, 0, 0, -205, 42315, 0, -207, 0, 42280, 42308, 0, -209, -211, 0, 10743, 42305, 0, 0, -211, 0, 10749, -213, 0, 0, -214, 0, 0, 0, 0, 0, 0, 0, 10727, 0, 0, -218, 0, 0, -218, 0, 0, 0, 42282, -218, -69, -217, -217, -71, 0, 0, 0, 0, 0, -219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42261, 42258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, -1, 0, 0, 0, -1, 0, 0, 0, 130, 130, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38, -37, -37, -37, 0, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -31, -32, -32, -32, -32, -32, -32, -32, -32, -32, -64, -63, -63, 0, -62, -57, 0, 0, 0, -47, -54, -8, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, -86, -80, 7, -116, 0, -96, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, -15, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35332, 0, 0, 0, 3814, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, -59, 0, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 74, 74, 86, 86, 86, 86, 100, 100, 128, 128, 112, 112, 126, 126, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7205, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, 0, 0, -1, 0, 0, 0, -10795, -10792, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, -7264, 0, -7264, 0, 0, 0, 0, 0, -7264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -928, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -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, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -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 } }; pspp-1.0.1/gl/unicase/ignorable.c0000644000175000017500000000470713124536243013566 00000000000000/* Test whether a Unicode character is case-ignorable. Copyright (C) 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "caseprop.h" /* Quoting the Unicode standard: Definition: A character is defined to be "case-ignorable" if it has the value MidLetter {or the value MidNumLet} for the Word_Break property or its General_Category is one of Nonspacing_Mark (Mn), Enclosing_Mark (Me), Format (Cf), Modifier_Letter (Lm), or Modifier_Symbol (Sk). The text marked in braces was added in Unicode 5.1.0, see section "Update of Definition of case-ignorable". */ /* Since this predicate is only used for the "Before C" and "After C" conditions of FINAL_SIGMA, we exclude the "cased" characters here. This simplifies the evaluation of the regular expressions \p{cased} (\p{case-ignorable})* C and C (\p{case-ignorable})* \p{cased} */ #if 0 #include "unictype.h" #include "uniwbrk.h" bool uc_is_case_ignorable (ucs4_t uc) { int wbp = uc_wordbreak_property (uc); return (wbp == WBP_MIDLETTER || wbp == WBP_MIDNUMLET || uc_is_general_category_withtable (uc, UC_CATEGORY_MASK_Mn | UC_CATEGORY_MASK_Me | UC_CATEGORY_MASK_Cf | UC_CATEGORY_MASK_Lm | UC_CATEGORY_MASK_Sk)) && !uc_is_cased (uc); } #else #include "unictype/bitmap.h" /* Define u_casing_property_case_ignorable table. */ #include "ignorable.h" bool uc_is_case_ignorable (ucs4_t uc) { return bitmap_lookup (&u_casing_property_case_ignorable, uc); } #endif pspp-1.0.1/gl/unicase/special-casing-table.gperf0000644000175000017500000005127613020461274016453 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Special casing rules of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ struct special_casing_rule { char code[3]; }; %struct-type %language=ANSI-C %define slot-name code %define hash-function-name gl_unicase_special_hash %define lookup-function-name gl_unicase_special_lookup %compare-lengths %compare-strncmp %readonly-tables %omit-struct-type %% "\x00\x49\x00", 1, SCC_MORE_ABOVE , { 'l', 't' }, { 0x0049, 0, 0 }, { 0x0069, 0x0307, 0 }, { 0x0049, 0, 0 }, { 0x0069, 0, 0 } "\x00\x49\x01", 1, -SCC_BEFORE_DOT , { 't', 'r' }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 } "\x00\x49\x02", 1, -SCC_BEFORE_DOT , { 'a', 'z' }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 } "\x00\x49\x03", 1, SCC_ALWAYS , { 't', 'r' }, { 0x0049, 0, 0 }, { 0x0069, 0, 0 }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 } "\x00\x49\x04", 0, SCC_ALWAYS , { 'a', 'z' }, { 0x0049, 0, 0 }, { 0x0069, 0, 0 }, { 0x0049, 0, 0 }, { 0x0131, 0, 0 } "\x00\x4a\x00", 0, SCC_MORE_ABOVE , { 'l', 't' }, { 0x004A, 0, 0 }, { 0x006A, 0x0307, 0 }, { 0x004A, 0, 0 }, { 0x006A, 0, 0 } "\x00\x69\x00", 1, SCC_ALWAYS , { 't', 'r' }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 } "\x00\x69\x01", 0, SCC_ALWAYS , { 'a', 'z' }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 } "\x00\xcc\x00", 0, SCC_ALWAYS , { 'l', 't' }, { 0x00CC, 0, 0 }, { 0x0069, 0x0307, 0x0300 }, { 0x00CC, 0, 0 }, { 0x00EC, 0, 0 } "\x00\xcd\x00", 0, SCC_ALWAYS , { 'l', 't' }, { 0x00CD, 0, 0 }, { 0x0069, 0x0307, 0x0301 }, { 0x00CD, 0, 0 }, { 0x00ED, 0, 0 } "\x00\xdf\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0053, 0x0053, 0 }, { 0x00DF, 0, 0 }, { 0x0053, 0x0073, 0 }, { 0x0073, 0x0073, 0 } "\x01\x28\x00", 0, SCC_ALWAYS , { 'l', 't' }, { 0x0128, 0, 0 }, { 0x0069, 0x0307, 0x0303 }, { 0x0128, 0, 0 }, { 0x0129, 0, 0 } "\x01\x2e\x00", 0, SCC_MORE_ABOVE , { 'l', 't' }, { 0x012E, 0, 0 }, { 0x012F, 0x0307, 0 }, { 0x012E, 0, 0 }, { 0x012F, 0, 0 } "\x01\x30\x00", 1, SCC_ALWAYS , { 't', 'r' }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 } "\x01\x30\x01", 1, SCC_ALWAYS , { 'a', 'z' }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 }, { 0x0130, 0, 0 }, { 0x0069, 0, 0 } "\x01\x30\x02", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0130, 0, 0 }, { 0x0069, 0x0307, 0 }, { 0x0130, 0, 0 }, { 0x0069, 0x0307, 0 } "\x01\x49\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x02BC, 0x004E, 0 }, { 0x0149, 0, 0 }, { 0x02BC, 0x004E, 0 }, { 0x02BC, 0x006E, 0 } "\x01\xf0\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x004A, 0x030C, 0 }, { 0x01F0, 0, 0 }, { 0x004A, 0x030C, 0 }, { 0x006A, 0x030C, 0 } "\x03\x07\x00", 1, SCC_AFTER_SOFT_DOTTED, { 'l', 't' }, { 0, 0, 0 }, { 0x0307, 0, 0 }, { 0, 0, 0 }, { 0x0307, 0, 0 } "\x03\x07\x01", 1, SCC_AFTER_I , { 't', 'r' }, { 0x0307, 0, 0 }, { 0, 0, 0 }, { 0x0307, 0, 0 }, { 0x0307, 0, 0 } "\x03\x07\x02", 0, SCC_AFTER_I , { 'a', 'z' }, { 0x0307, 0, 0 }, { 0, 0, 0 }, { 0x0307, 0, 0 }, { 0x0307, 0, 0 } "\x03\x90\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0399, 0x0308, 0x0301 }, { 0x0390, 0, 0 }, { 0x0399, 0x0308, 0x0301 }, { 0x03B9, 0x0308, 0x0301 } "\x03\xa3\x00", 0, SCC_FINAL_SIGMA , { '\0', '\0' }, { 0x03A3, 0, 0 }, { 0x03C2, 0, 0 }, { 0x03A3, 0, 0 }, { 0x03C3, 0, 0 } "\x03\xb0\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0308, 0x0301 }, { 0x03B0, 0, 0 }, { 0x03A5, 0x0308, 0x0301 }, { 0x03C5, 0x0308, 0x0301 } "\x05\x87\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0535, 0x0552, 0 }, { 0x0587, 0, 0 }, { 0x0535, 0x0582, 0 }, { 0x0565, 0x0582, 0 } "\x1e\x96\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0048, 0x0331, 0 }, { 0x1E96, 0, 0 }, { 0x0048, 0x0331, 0 }, { 0x0068, 0x0331, 0 } "\x1e\x97\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0054, 0x0308, 0 }, { 0x1E97, 0, 0 }, { 0x0054, 0x0308, 0 }, { 0x0074, 0x0308, 0 } "\x1e\x98\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0057, 0x030A, 0 }, { 0x1E98, 0, 0 }, { 0x0057, 0x030A, 0 }, { 0x0077, 0x030A, 0 } "\x1e\x99\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0059, 0x030A, 0 }, { 0x1E99, 0, 0 }, { 0x0059, 0x030A, 0 }, { 0x0079, 0x030A, 0 } "\x1e\x9a\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0041, 0x02BE, 0 }, { 0x1E9A, 0, 0 }, { 0x0041, 0x02BE, 0 }, { 0x0061, 0x02BE, 0 } "\x1e\x9e\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1E9E, 0, 0 }, { 0x00DF, 0, 0 }, { 0x1E9E, 0, 0 }, { 0x0073, 0x0073, 0 } "\x1f\x50\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0313, 0 }, { 0x1F50, 0, 0 }, { 0x03A5, 0x0313, 0 }, { 0x03C5, 0x0313, 0 } "\x1f\x52\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0313, 0x0300 }, { 0x1F52, 0, 0 }, { 0x03A5, 0x0313, 0x0300 }, { 0x03C5, 0x0313, 0x0300 } "\x1f\x54\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0313, 0x0301 }, { 0x1F54, 0, 0 }, { 0x03A5, 0x0313, 0x0301 }, { 0x03C5, 0x0313, 0x0301 } "\x1f\x56\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0313, 0x0342 }, { 0x1F56, 0, 0 }, { 0x03A5, 0x0313, 0x0342 }, { 0x03C5, 0x0313, 0x0342 } "\x1f\x80\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F08, 0x0399, 0 }, { 0x1F80, 0, 0 }, { 0x1F88, 0, 0 }, { 0x1F00, 0x03B9, 0 } "\x1f\x81\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F09, 0x0399, 0 }, { 0x1F81, 0, 0 }, { 0x1F89, 0, 0 }, { 0x1F01, 0x03B9, 0 } "\x1f\x82\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0A, 0x0399, 0 }, { 0x1F82, 0, 0 }, { 0x1F8A, 0, 0 }, { 0x1F02, 0x03B9, 0 } "\x1f\x83\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0B, 0x0399, 0 }, { 0x1F83, 0, 0 }, { 0x1F8B, 0, 0 }, { 0x1F03, 0x03B9, 0 } "\x1f\x84\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0C, 0x0399, 0 }, { 0x1F84, 0, 0 }, { 0x1F8C, 0, 0 }, { 0x1F04, 0x03B9, 0 } "\x1f\x85\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0D, 0x0399, 0 }, { 0x1F85, 0, 0 }, { 0x1F8D, 0, 0 }, { 0x1F05, 0x03B9, 0 } "\x1f\x86\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0E, 0x0399, 0 }, { 0x1F86, 0, 0 }, { 0x1F8E, 0, 0 }, { 0x1F06, 0x03B9, 0 } "\x1f\x87\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0F, 0x0399, 0 }, { 0x1F87, 0, 0 }, { 0x1F8F, 0, 0 }, { 0x1F07, 0x03B9, 0 } "\x1f\x88\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F08, 0x0399, 0 }, { 0x1F80, 0, 0 }, { 0x1F88, 0, 0 }, { 0x1F00, 0x03B9, 0 } "\x1f\x89\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F09, 0x0399, 0 }, { 0x1F81, 0, 0 }, { 0x1F89, 0, 0 }, { 0x1F01, 0x03B9, 0 } "\x1f\x8a\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0A, 0x0399, 0 }, { 0x1F82, 0, 0 }, { 0x1F8A, 0, 0 }, { 0x1F02, 0x03B9, 0 } "\x1f\x8b\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0B, 0x0399, 0 }, { 0x1F83, 0, 0 }, { 0x1F8B, 0, 0 }, { 0x1F03, 0x03B9, 0 } "\x1f\x8c\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0C, 0x0399, 0 }, { 0x1F84, 0, 0 }, { 0x1F8C, 0, 0 }, { 0x1F04, 0x03B9, 0 } "\x1f\x8d\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0D, 0x0399, 0 }, { 0x1F85, 0, 0 }, { 0x1F8D, 0, 0 }, { 0x1F05, 0x03B9, 0 } "\x1f\x8e\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0E, 0x0399, 0 }, { 0x1F86, 0, 0 }, { 0x1F8E, 0, 0 }, { 0x1F06, 0x03B9, 0 } "\x1f\x8f\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F0F, 0x0399, 0 }, { 0x1F87, 0, 0 }, { 0x1F8F, 0, 0 }, { 0x1F07, 0x03B9, 0 } "\x1f\x90\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F28, 0x0399, 0 }, { 0x1F90, 0, 0 }, { 0x1F98, 0, 0 }, { 0x1F20, 0x03B9, 0 } "\x1f\x91\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F29, 0x0399, 0 }, { 0x1F91, 0, 0 }, { 0x1F99, 0, 0 }, { 0x1F21, 0x03B9, 0 } "\x1f\x92\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2A, 0x0399, 0 }, { 0x1F92, 0, 0 }, { 0x1F9A, 0, 0 }, { 0x1F22, 0x03B9, 0 } "\x1f\x93\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2B, 0x0399, 0 }, { 0x1F93, 0, 0 }, { 0x1F9B, 0, 0 }, { 0x1F23, 0x03B9, 0 } "\x1f\x94\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2C, 0x0399, 0 }, { 0x1F94, 0, 0 }, { 0x1F9C, 0, 0 }, { 0x1F24, 0x03B9, 0 } "\x1f\x95\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2D, 0x0399, 0 }, { 0x1F95, 0, 0 }, { 0x1F9D, 0, 0 }, { 0x1F25, 0x03B9, 0 } "\x1f\x96\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2E, 0x0399, 0 }, { 0x1F96, 0, 0 }, { 0x1F9E, 0, 0 }, { 0x1F26, 0x03B9, 0 } "\x1f\x97\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2F, 0x0399, 0 }, { 0x1F97, 0, 0 }, { 0x1F9F, 0, 0 }, { 0x1F27, 0x03B9, 0 } "\x1f\x98\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F28, 0x0399, 0 }, { 0x1F90, 0, 0 }, { 0x1F98, 0, 0 }, { 0x1F20, 0x03B9, 0 } "\x1f\x99\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F29, 0x0399, 0 }, { 0x1F91, 0, 0 }, { 0x1F99, 0, 0 }, { 0x1F21, 0x03B9, 0 } "\x1f\x9a\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2A, 0x0399, 0 }, { 0x1F92, 0, 0 }, { 0x1F9A, 0, 0 }, { 0x1F22, 0x03B9, 0 } "\x1f\x9b\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2B, 0x0399, 0 }, { 0x1F93, 0, 0 }, { 0x1F9B, 0, 0 }, { 0x1F23, 0x03B9, 0 } "\x1f\x9c\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2C, 0x0399, 0 }, { 0x1F94, 0, 0 }, { 0x1F9C, 0, 0 }, { 0x1F24, 0x03B9, 0 } "\x1f\x9d\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2D, 0x0399, 0 }, { 0x1F95, 0, 0 }, { 0x1F9D, 0, 0 }, { 0x1F25, 0x03B9, 0 } "\x1f\x9e\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2E, 0x0399, 0 }, { 0x1F96, 0, 0 }, { 0x1F9E, 0, 0 }, { 0x1F26, 0x03B9, 0 } "\x1f\x9f\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F2F, 0x0399, 0 }, { 0x1F97, 0, 0 }, { 0x1F9F, 0, 0 }, { 0x1F27, 0x03B9, 0 } "\x1f\xa0\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F68, 0x0399, 0 }, { 0x1FA0, 0, 0 }, { 0x1FA8, 0, 0 }, { 0x1F60, 0x03B9, 0 } "\x1f\xa1\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F69, 0x0399, 0 }, { 0x1FA1, 0, 0 }, { 0x1FA9, 0, 0 }, { 0x1F61, 0x03B9, 0 } "\x1f\xa2\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6A, 0x0399, 0 }, { 0x1FA2, 0, 0 }, { 0x1FAA, 0, 0 }, { 0x1F62, 0x03B9, 0 } "\x1f\xa3\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6B, 0x0399, 0 }, { 0x1FA3, 0, 0 }, { 0x1FAB, 0, 0 }, { 0x1F63, 0x03B9, 0 } "\x1f\xa4\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6C, 0x0399, 0 }, { 0x1FA4, 0, 0 }, { 0x1FAC, 0, 0 }, { 0x1F64, 0x03B9, 0 } "\x1f\xa5\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6D, 0x0399, 0 }, { 0x1FA5, 0, 0 }, { 0x1FAD, 0, 0 }, { 0x1F65, 0x03B9, 0 } "\x1f\xa6\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6E, 0x0399, 0 }, { 0x1FA6, 0, 0 }, { 0x1FAE, 0, 0 }, { 0x1F66, 0x03B9, 0 } "\x1f\xa7\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6F, 0x0399, 0 }, { 0x1FA7, 0, 0 }, { 0x1FAF, 0, 0 }, { 0x1F67, 0x03B9, 0 } "\x1f\xa8\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F68, 0x0399, 0 }, { 0x1FA0, 0, 0 }, { 0x1FA8, 0, 0 }, { 0x1F60, 0x03B9, 0 } "\x1f\xa9\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F69, 0x0399, 0 }, { 0x1FA1, 0, 0 }, { 0x1FA9, 0, 0 }, { 0x1F61, 0x03B9, 0 } "\x1f\xaa\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6A, 0x0399, 0 }, { 0x1FA2, 0, 0 }, { 0x1FAA, 0, 0 }, { 0x1F62, 0x03B9, 0 } "\x1f\xab\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6B, 0x0399, 0 }, { 0x1FA3, 0, 0 }, { 0x1FAB, 0, 0 }, { 0x1F63, 0x03B9, 0 } "\x1f\xac\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6C, 0x0399, 0 }, { 0x1FA4, 0, 0 }, { 0x1FAC, 0, 0 }, { 0x1F64, 0x03B9, 0 } "\x1f\xad\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6D, 0x0399, 0 }, { 0x1FA5, 0, 0 }, { 0x1FAD, 0, 0 }, { 0x1F65, 0x03B9, 0 } "\x1f\xae\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6E, 0x0399, 0 }, { 0x1FA6, 0, 0 }, { 0x1FAE, 0, 0 }, { 0x1F66, 0x03B9, 0 } "\x1f\xaf\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1F6F, 0x0399, 0 }, { 0x1FA7, 0, 0 }, { 0x1FAF, 0, 0 }, { 0x1F67, 0x03B9, 0 } "\x1f\xb2\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1FBA, 0x0399, 0 }, { 0x1FB2, 0, 0 }, { 0x1FBA, 0x0345, 0 }, { 0x1F70, 0x03B9, 0 } "\x1f\xb3\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0391, 0x0399, 0 }, { 0x1FB3, 0, 0 }, { 0x1FBC, 0, 0 }, { 0x03B1, 0x03B9, 0 } "\x1f\xb4\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0386, 0x0399, 0 }, { 0x1FB4, 0, 0 }, { 0x0386, 0x0345, 0 }, { 0x03AC, 0x03B9, 0 } "\x1f\xb6\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0391, 0x0342, 0 }, { 0x1FB6, 0, 0 }, { 0x0391, 0x0342, 0 }, { 0x03B1, 0x0342, 0 } "\x1f\xb7\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0391, 0x0342, 0x0399 }, { 0x1FB7, 0, 0 }, { 0x0391, 0x0342, 0x0345 }, { 0x03B1, 0x0342, 0x03B9 } "\x1f\xbc\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0391, 0x0399, 0 }, { 0x1FB3, 0, 0 }, { 0x1FBC, 0, 0 }, { 0x03B1, 0x03B9, 0 } "\x1f\xc2\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1FCA, 0x0399, 0 }, { 0x1FC2, 0, 0 }, { 0x1FCA, 0x0345, 0 }, { 0x1F74, 0x03B9, 0 } "\x1f\xc3\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0397, 0x0399, 0 }, { 0x1FC3, 0, 0 }, { 0x1FCC, 0, 0 }, { 0x03B7, 0x03B9, 0 } "\x1f\xc4\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0389, 0x0399, 0 }, { 0x1FC4, 0, 0 }, { 0x0389, 0x0345, 0 }, { 0x03AE, 0x03B9, 0 } "\x1f\xc6\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0397, 0x0342, 0 }, { 0x1FC6, 0, 0 }, { 0x0397, 0x0342, 0 }, { 0x03B7, 0x0342, 0 } "\x1f\xc7\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0397, 0x0342, 0x0399 }, { 0x1FC7, 0, 0 }, { 0x0397, 0x0342, 0x0345 }, { 0x03B7, 0x0342, 0x03B9 } "\x1f\xcc\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0397, 0x0399, 0 }, { 0x1FC3, 0, 0 }, { 0x1FCC, 0, 0 }, { 0x03B7, 0x03B9, 0 } "\x1f\xd2\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0399, 0x0308, 0x0300 }, { 0x1FD2, 0, 0 }, { 0x0399, 0x0308, 0x0300 }, { 0x03B9, 0x0308, 0x0300 } "\x1f\xd3\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0399, 0x0308, 0x0301 }, { 0x1FD3, 0, 0 }, { 0x0399, 0x0308, 0x0301 }, { 0x03B9, 0x0308, 0x0301 } "\x1f\xd6\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0399, 0x0342, 0 }, { 0x1FD6, 0, 0 }, { 0x0399, 0x0342, 0 }, { 0x03B9, 0x0342, 0 } "\x1f\xd7\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0399, 0x0308, 0x0342 }, { 0x1FD7, 0, 0 }, { 0x0399, 0x0308, 0x0342 }, { 0x03B9, 0x0308, 0x0342 } "\x1f\xe2\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0308, 0x0300 }, { 0x1FE2, 0, 0 }, { 0x03A5, 0x0308, 0x0300 }, { 0x03C5, 0x0308, 0x0300 } "\x1f\xe3\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0308, 0x0301 }, { 0x1FE3, 0, 0 }, { 0x03A5, 0x0308, 0x0301 }, { 0x03C5, 0x0308, 0x0301 } "\x1f\xe4\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A1, 0x0313, 0 }, { 0x1FE4, 0, 0 }, { 0x03A1, 0x0313, 0 }, { 0x03C1, 0x0313, 0 } "\x1f\xe6\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0342, 0 }, { 0x1FE6, 0, 0 }, { 0x03A5, 0x0342, 0 }, { 0x03C5, 0x0342, 0 } "\x1f\xe7\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A5, 0x0308, 0x0342 }, { 0x1FE7, 0, 0 }, { 0x03A5, 0x0308, 0x0342 }, { 0x03C5, 0x0308, 0x0342 } "\x1f\xf2\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x1FFA, 0x0399, 0 }, { 0x1FF2, 0, 0 }, { 0x1FFA, 0x0345, 0 }, { 0x1F7C, 0x03B9, 0 } "\x1f\xf3\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A9, 0x0399, 0 }, { 0x1FF3, 0, 0 }, { 0x1FFC, 0, 0 }, { 0x03C9, 0x03B9, 0 } "\x1f\xf4\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x038F, 0x0399, 0 }, { 0x1FF4, 0, 0 }, { 0x038F, 0x0345, 0 }, { 0x03CE, 0x03B9, 0 } "\x1f\xf6\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A9, 0x0342, 0 }, { 0x1FF6, 0, 0 }, { 0x03A9, 0x0342, 0 }, { 0x03C9, 0x0342, 0 } "\x1f\xf7\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A9, 0x0342, 0x0399 }, { 0x1FF7, 0, 0 }, { 0x03A9, 0x0342, 0x0345 }, { 0x03C9, 0x0342, 0x03B9 } "\x1f\xfc\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x03A9, 0x0399, 0 }, { 0x1FF3, 0, 0 }, { 0x1FFC, 0, 0 }, { 0x03C9, 0x03B9, 0 } "\xfb\x00\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0046, 0x0046, 0 }, { 0xFB00, 0, 0 }, { 0x0046, 0x0066, 0 }, { 0x0066, 0x0066, 0 } "\xfb\x01\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0046, 0x0049, 0 }, { 0xFB01, 0, 0 }, { 0x0046, 0x0069, 0 }, { 0x0066, 0x0069, 0 } "\xfb\x02\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0046, 0x004C, 0 }, { 0xFB02, 0, 0 }, { 0x0046, 0x006C, 0 }, { 0x0066, 0x006C, 0 } "\xfb\x03\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0046, 0x0046, 0x0049 }, { 0xFB03, 0, 0 }, { 0x0046, 0x0066, 0x0069 }, { 0x0066, 0x0066, 0x0069 } "\xfb\x04\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0046, 0x0046, 0x004C }, { 0xFB04, 0, 0 }, { 0x0046, 0x0066, 0x006C }, { 0x0066, 0x0066, 0x006C } "\xfb\x05\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0053, 0x0054, 0 }, { 0xFB05, 0, 0 }, { 0x0053, 0x0074, 0 }, { 0x0073, 0x0074, 0 } "\xfb\x06\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0053, 0x0054, 0 }, { 0xFB06, 0, 0 }, { 0x0053, 0x0074, 0 }, { 0x0073, 0x0074, 0 } "\xfb\x13\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0544, 0x0546, 0 }, { 0xFB13, 0, 0 }, { 0x0544, 0x0576, 0 }, { 0x0574, 0x0576, 0 } "\xfb\x14\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0544, 0x0535, 0 }, { 0xFB14, 0, 0 }, { 0x0544, 0x0565, 0 }, { 0x0574, 0x0565, 0 } "\xfb\x15\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0544, 0x053B, 0 }, { 0xFB15, 0, 0 }, { 0x0544, 0x056B, 0 }, { 0x0574, 0x056B, 0 } "\xfb\x16\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x054E, 0x0546, 0 }, { 0xFB16, 0, 0 }, { 0x054E, 0x0576, 0 }, { 0x057E, 0x0576, 0 } "\xfb\x17\x00", 0, SCC_ALWAYS , { '\0', '\0' }, { 0x0544, 0x053D, 0 }, { 0xFB17, 0, 0 }, { 0x0544, 0x056D, 0 }, { 0x0574, 0x056D, 0 } pspp-1.0.1/gl/unicase/u8-tolower.c0000644000175000017500000000573613124536243013654 00000000000000/* Lowercase mapping for UTF-8 strings (locale dependent). Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicase.h" #include #include "unicasemap.h" #include "unicase/special-casing.h" uint8_t * u8_tolower (const uint8_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint8_t *resultbuf, size_t *lengthp) { return u8_casemap (s, n, unicase_empty_prefix_context, unicase_empty_suffix_context, iso639_language, uc_tolower, offsetof (struct special_casing_rule, lower[0]), nf, resultbuf, lengthp); } #ifdef TEST #include #include #include #include /* Read the contents of an input stream, and return it, terminated with a NUL byte. */ char * read_file (FILE *stream) { #define BUFSIZE 4096 char *buf = NULL; int alloc = 0; int size = 0; int count; while (! feof (stream)) { if (size + BUFSIZE > alloc) { alloc = alloc + alloc / 2; if (alloc < size + BUFSIZE) alloc = size + BUFSIZE; buf = realloc (buf, alloc); if (buf == NULL) { fprintf (stderr, "out of memory\n"); exit (1); } } count = fread (buf + size, 1, BUFSIZE, stream); if (count == 0) { if (ferror (stream)) { perror ("fread"); exit (1); } } else size += count; } buf = realloc (buf, size + 1); if (buf == NULL) { fprintf (stderr, "out of memory\n"); exit (1); } buf[size] = '\0'; return buf; #undef BUFSIZE } int main (int argc, char * argv[]) { setlocale (LC_ALL, ""); if (argc == 1) { /* Display the lower case of the input string. */ char *input = read_file (stdin); int length = strlen (input); size_t output_length; uint8_t *output = u8_tolower ((uint8_t *) input, length, uc_locale_language (), NULL, NULL, &output_length); fwrite (output, 1, output_length, stdout); return 0; } else return 1; } #endif /* TEST */ pspp-1.0.1/gl/unicase/tocasefold.c0000644000175000017500000000200013124536243013727 00000000000000/* Casefold mapping for Unicode characters (locale and context independent). Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "casefold.h" /* Define u_mapping table. */ #include "tocasefold.h" #define FUNC uc_tocasefold #include "simple-mapping.h" pspp-1.0.1/gl/unicase/u-casemap.h0000644000175000017500000003615113124536243013502 00000000000000/* Case mapping for UTF-8/UTF-16/UTF-32 strings (locale dependent). Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ UNIT * FUNC (const UNIT *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, ucs4_t (*single_character_map) (ucs4_t), size_t offset_in_rule, /* offset in 'struct special_casing_rule' */ uninorm_t nf, UNIT *resultbuf, size_t *lengthp) { /* The result being accumulated. */ UNIT *result; size_t length; size_t allocated; /* Initialize the accumulator. */ if (nf != NULL || resultbuf == NULL) { result = NULL; allocated = 0; } else { result = resultbuf; allocated = *lengthp; } length = 0; { const UNIT *s_end = s + n; /* Helper for evaluating the FINAL_SIGMA condition: Last character that was not case-ignorable. */ ucs4_t last_char_except_ignorable = prefix_context.last_char_except_ignorable; /* Helper for evaluating the AFTER_SOFT_DOTTED and AFTER_I conditions: Last character that was of combining class 230 ("Above") or 0. */ ucs4_t last_char_normal_or_above = prefix_context.last_char_normal_or_above; while (s < s_end) { ucs4_t uc; int count = U_MBTOUC_UNSAFE (&uc, s, s_end - s); ucs4_t mapped_uc[3]; unsigned int mapped_count; if (uc < 0x10000) { /* Look first in the special-casing table. */ char code[3]; code[0] = (uc >> 8) & 0xff; code[1] = uc & 0xff; for (code[2] = 0; ; code[2]++) { const struct special_casing_rule *rule = gl_unicase_special_lookup (code, 3); if (rule == NULL) break; /* Test if the condition applies. */ /* Does the language apply? */ if (rule->language[0] == '\0' || (iso639_language != NULL && iso639_language[0] == rule->language[0] && iso639_language[1] == rule->language[1])) { /* Does the context apply? */ int context = rule->context; bool applies; if (context < 0) context = - context; switch (context) { case SCC_ALWAYS: applies = true; break; case SCC_FINAL_SIGMA: /* "Before" condition: preceded by a sequence consisting of a cased letter and a case-ignorable sequence. "After" condition: not followed by a sequence consisting of a case-ignorable sequence and then a cased letter. */ /* Test the "before" condition. */ applies = uc_is_cased (last_char_except_ignorable); /* Test the "after" condition. */ if (applies) { const UNIT *s2 = s + count; for (;;) { if (s2 < s_end) { ucs4_t uc2; int count2 = U_MBTOUC_UNSAFE (&uc2, s2, s_end - s2); /* Our uc_is_case_ignorable function is known to return false for all cased characters. So we can call uc_is_case_ignorable first. */ if (!uc_is_case_ignorable (uc2)) { applies = ! uc_is_cased (uc2); break; } s2 += count2; } else { applies = ! uc_is_cased (suffix_context.first_char_except_ignorable); break; } } } break; case SCC_AFTER_SOFT_DOTTED: /* "Before" condition: There is a Soft_Dotted character before it, with no intervening character of combining class 0 or 230 (Above). */ /* Test the "before" condition. */ applies = uc_is_property_soft_dotted (last_char_normal_or_above); break; case SCC_MORE_ABOVE: /* "After" condition: followed by a character of combining class 230 (Above) with no intervening character of combining class 0 or 230 (Above). */ /* Test the "after" condition. */ { const UNIT *s2 = s + count; applies = false; for (;;) { if (s2 < s_end) { ucs4_t uc2; int count2 = U_MBTOUC_UNSAFE (&uc2, s2, s_end - s2); int ccc = uc_combining_class (uc2); if (ccc == UC_CCC_A) { applies = true; break; } if (ccc == UC_CCC_NR) break; s2 += count2; } else { applies = ((suffix_context.bits & SCC_MORE_ABOVE_MASK) != 0); break; } } } break; case SCC_BEFORE_DOT: /* "After" condition: followed by COMBINING DOT ABOVE (U+0307). Any sequence of characters with a combining class that is neither 0 nor 230 may intervene between the current character and the combining dot above. */ /* Test the "after" condition. */ { const UNIT *s2 = s + count; applies = false; for (;;) { if (s2 < s_end) { ucs4_t uc2; int count2 = U_MBTOUC_UNSAFE (&uc2, s2, s_end - s2); if (uc2 == 0x0307) /* COMBINING DOT ABOVE */ { applies = true; break; } { int ccc = uc_combining_class (uc2); if (ccc == UC_CCC_A || ccc == UC_CCC_NR) break; } s2 += count2; } else { applies = ((suffix_context.bits & SCC_BEFORE_DOT_MASK) != 0); break; } } } break; case SCC_AFTER_I: /* "Before" condition: There is an uppercase I before it, and there is no intervening character of combining class 0 or 230 (Above). */ /* Test the "before" condition. */ applies = (last_char_normal_or_above == 'I'); break; default: abort (); } if (rule->context < 0) applies = !applies; if (applies) { /* The rule applies. Look up the mapping (0 to 3 characters). */ const unsigned short *mapped_in_rule = (const unsigned short *)((const char *)rule + offset_in_rule); if (mapped_in_rule[0] == 0) mapped_count = 0; else { mapped_uc[0] = mapped_in_rule[0]; if (mapped_in_rule[1] == 0) mapped_count = 1; else { mapped_uc[1] = mapped_in_rule[1]; if (mapped_in_rule[2] == 0) mapped_count = 2; else { mapped_uc[2] = mapped_in_rule[2]; mapped_count = 3; } } } goto found_mapping; } } /* Optimization: Save a hash table lookup in the next round. */ if (!rule->has_next) break; } } /* No special-cased mapping. So use the locale and context independent mapping. */ mapped_uc[0] = single_character_map (uc); mapped_count = 1; found_mapping: /* Found the mapping: uc maps to mapped_uc[0..mapped_count-1]. */ { unsigned int i; for (i = 0; i < mapped_count; i++) { ucs4_t muc = mapped_uc[i]; /* Append muc to the result accumulator. */ if (length < allocated) { int ret = U_UCTOMB (result + length, muc, allocated - length); if (ret == -1) { errno = EINVAL; goto fail; } if (ret >= 0) { length += ret; goto done_appending; } } { size_t old_allocated = allocated; size_t new_allocated = 2 * old_allocated; if (new_allocated < 64) new_allocated = 64; if (new_allocated < old_allocated) /* integer overflow? */ abort (); { UNIT *larger_result; if (result == NULL) { larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT)); if (larger_result == NULL) { errno = ENOMEM; goto fail; } } else if (result == resultbuf) { larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT)); if (larger_result == NULL) { errno = ENOMEM; goto fail; } U_CPY (larger_result, resultbuf, length); } else { larger_result = (UNIT *) realloc (result, new_allocated * sizeof (UNIT)); if (larger_result == NULL) { errno = ENOMEM; goto fail; } } result = larger_result; allocated = new_allocated; { int ret = U_UCTOMB (result + length, muc, allocated - length); if (ret == -1) { errno = EINVAL; goto fail; } if (ret < 0) abort (); length += ret; goto done_appending; } } } done_appending: ; } } if (!uc_is_case_ignorable (uc)) last_char_except_ignorable = uc; { int ccc = uc_combining_class (uc); if (ccc == UC_CCC_A || ccc == UC_CCC_NR) last_char_normal_or_above = uc; } s += count; } } if (nf != NULL) { /* Finally, normalize the result. */ UNIT *normalized_result; normalized_result = U_NORMALIZE (nf, result, length, resultbuf, lengthp); if (normalized_result == NULL) goto fail; free (result); return normalized_result; } if (length == 0) { if (result == NULL) { /* Return a non-NULL value. NULL means error. */ result = (UNIT *) malloc (1); if (result == NULL) { errno = ENOMEM; goto fail; } } } else if (result != resultbuf && length < allocated) { /* Shrink the allocated memory if possible. */ UNIT *memory; memory = (UNIT *) realloc (result, length * sizeof (UNIT)); if (memory != NULL) result = memory; } *lengthp = length; return result; fail: if (result != resultbuf) { int saved_errno = errno; free (result); errno = saved_errno; } return NULL; } pspp-1.0.1/gl/unicase/u8-toupper.c0000644000175000017500000000573613124536243013657 00000000000000/* Uppercase mapping for UTF-8 strings (locale dependent). Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicase.h" #include #include "unicasemap.h" #include "unicase/special-casing.h" uint8_t * u8_toupper (const uint8_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint8_t *resultbuf, size_t *lengthp) { return u8_casemap (s, n, unicase_empty_prefix_context, unicase_empty_suffix_context, iso639_language, uc_toupper, offsetof (struct special_casing_rule, upper[0]), nf, resultbuf, lengthp); } #ifdef TEST #include #include #include #include /* Read the contents of an input stream, and return it, terminated with a NUL byte. */ char * read_file (FILE *stream) { #define BUFSIZE 4096 char *buf = NULL; int alloc = 0; int size = 0; int count; while (! feof (stream)) { if (size + BUFSIZE > alloc) { alloc = alloc + alloc / 2; if (alloc < size + BUFSIZE) alloc = size + BUFSIZE; buf = realloc (buf, alloc); if (buf == NULL) { fprintf (stderr, "out of memory\n"); exit (1); } } count = fread (buf + size, 1, BUFSIZE, stream); if (count == 0) { if (ferror (stream)) { perror ("fread"); exit (1); } } else size += count; } buf = realloc (buf, size + 1); if (buf == NULL) { fprintf (stderr, "out of memory\n"); exit (1); } buf[size] = '\0'; return buf; #undef BUFSIZE } int main (int argc, char * argv[]) { setlocale (LC_ALL, ""); if (argc == 1) { /* Display the upper case of the input string. */ char *input = read_file (stdin); int length = strlen (input); size_t output_length; uint8_t *output = u8_toupper ((uint8_t *) input, length, uc_locale_language (), NULL, NULL, &output_length); fwrite (output, 1, output_length, stdout); return 0; } else return 1; } #endif /* TEST */ pspp-1.0.1/gl/unicase/u-casecmp.h0000644000175000017500000000415713124536243013505 00000000000000/* Case and normalization insensitive comparison of Unicode strings. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ int FUNC (const SRC_UNIT *s1, size_t n1, const SRC_UNIT *s2, size_t n2, const char *iso639_language, uninorm_t nf, int *resultp) { UNIT buf1[2048 / sizeof (UNIT)]; UNIT buf2[2048 / sizeof (UNIT)]; UNIT *norms1; size_t norms1_length; UNIT *norms2; size_t norms2_length; int cmp; /* Optimization: There is no need to do canonical composition of each string. Decomposition is enough. */ if (nf != NULL) nf = uninorm_decomposing_form (nf); /* Case-fold and normalize S1. */ norms1_length = sizeof (buf1) / sizeof (UNIT); norms1 = U_CASEFOLD (s1, n1, iso639_language, nf, buf1, &norms1_length); if (norms1 == NULL) /* errno is set here. */ return -1; /* Case-fold and normalize S2. */ norms2_length = sizeof (buf2) / sizeof (UNIT); norms2 = U_CASEFOLD (s2, n2, iso639_language, nf, buf2, &norms2_length); if (norms2 == NULL) { if (norms1 != buf1) { int saved_errno = errno; free (norms1); errno = saved_errno; } return -1; } /* Compare the normalized strings. */ cmp = U_CMP2 (norms1, norms1_length, norms2, norms2_length); if (cmp > 0) cmp = 1; else if (cmp < 0) cmp = -1; if (norms2 != buf2) free (norms2); if (norms1 != buf1) free (norms1); *resultp = cmp; return 0; } pspp-1.0.1/gl/unicase/u8-casefold.c0000644000175000017500000000505713124536243013735 00000000000000/* Casefolding mapping for UTF-8 strings (locale dependent). Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicase.h" #define FUNC u8_casefold #define UNIT uint8_t #define U_CT_CASEFOLD u8_ct_casefold #include "u-casefold.h" #ifdef TEST #include #include #include #include /* Read the contents of an input stream, and return it, terminated with a NUL byte. */ char * read_file (FILE *stream) { #define BUFSIZE 4096 char *buf = NULL; int alloc = 0; int size = 0; int count; while (! feof (stream)) { if (size + BUFSIZE > alloc) { alloc = alloc + alloc / 2; if (alloc < size + BUFSIZE) alloc = size + BUFSIZE; buf = realloc (buf, alloc); if (buf == NULL) { fprintf (stderr, "out of memory\n"); exit (1); } } count = fread (buf + size, 1, BUFSIZE, stream); if (count == 0) { if (ferror (stream)) { perror ("fread"); exit (1); } } else size += count; } buf = realloc (buf, size + 1); if (buf == NULL) { fprintf (stderr, "out of memory\n"); exit (1); } buf[size] = '\0'; return buf; #undef BUFSIZE } int main (int argc, char * argv[]) { setlocale (LC_ALL, ""); if (argc == 1) { /* Display the case folded input string. */ char *input = read_file (stdin); int length = strlen (input); size_t output_length; uint8_t *output = u8_casefold ((uint8_t *) input, length, uc_locale_language (), NULL, NULL, &output_length); fwrite (output, 1, output_length, stdout); return 0; } else return 1; } #endif /* TEST */ pspp-1.0.1/gl/unicase/simple-mapping.h0000644000175000017500000000256313124536243014551 00000000000000/* Simple case mapping for Unicode characters. Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ ucs4_t FUNC (ucs4_t uc) { unsigned int index1 = uc >> mapping_header_0; if (index1 < mapping_header_1) { int lookup1 = u_mapping.level1[index1]; if (lookup1 >= 0) { unsigned int index2 = (uc >> mapping_header_2) & mapping_header_3; int lookup2 = u_mapping.level2[lookup1 + index2]; if (lookup2 >= 0) { unsigned int index3 = (uc & mapping_header_4); int lookup3 = u_mapping.level3[lookup2 + index3]; return uc + lookup3; } } } return uc; } pspp-1.0.1/gl/unicase/tolower.c0000644000175000017500000000177213124536243013316 00000000000000/* Lowercase mapping for Unicode characters (locale and context independent). Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicase.h" /* Define u_mapping table. */ #include "tolower.h" #define FUNC uc_tolower #include "simple-mapping.h" pspp-1.0.1/gl/unicase/unicasemap.h0000644000175000017500000000444113124536243013751 00000000000000/* Case mapping for UTF-8/UTF-16/UTF-32 strings (locale dependent). Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include #include "unitypes.h" #include "unicase.h" #include "uninorm.h" extern uint8_t * u8_casemap (const uint8_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, ucs4_t (*single_character_map) (ucs4_t), size_t offset_in_rule, /* offset in 'struct special_casing_rule' */ uninorm_t nf, uint8_t *resultbuf, size_t *lengthp); extern uint16_t * u16_casemap (const uint16_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, ucs4_t (*single_character_map) (ucs4_t), size_t offset_in_rule, /* offset in 'struct special_casing_rule' */ uninorm_t nf, uint16_t *resultbuf, size_t *lengthp); extern uint32_t * u32_casemap (const uint32_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, ucs4_t (*single_character_map) (ucs4_t), size_t offset_in_rule, /* offset in 'struct special_casing_rule' */ uninorm_t nf, uint32_t *resultbuf, size_t *lengthp); pspp-1.0.1/gl/unicase/empty-suffix-context.c0000644000175000017500000000175413124536243015745 00000000000000/* Case-mapping context of empty suffix string. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicase.h" const casing_suffix_context_t unicase_empty_suffix_context = { 0xFFFD /* first_char_except_ignorable */, 0 /* bits */ }; pspp-1.0.1/gl/unicase/special-casing.in.h0000644000175000017500000000374713124536241015121 00000000000000/* Special casing table. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* A special casing context. A context is negated through x -> -x. */ enum { SCC_ALWAYS = 0, SCC_FINAL_SIGMA = 1, SCC_AFTER_SOFT_DOTTED = 2, SCC_MORE_ABOVE = 3, SCC_BEFORE_DOT = 4, SCC_AFTER_I = 5 }; struct special_casing_rule { /* The first two bytes are the code, in big-endian order. The third byte only distinguishes different rules pertaining to the same code. */ /*unsigned*/ char code[3]; /* True when this rule is not the last one for the given code. */ /*bool*/ unsigned int has_next : 1; /* Context. */ signed int context : 7; /* Language, or an empty string. */ char language[2]; /* Mapping to upper case. Between 0 and 3 characters. Filled with 0s. */ unsigned short upper[3]; /* Mapping to lower case. Between 0 and 3 characters. Filled with 0s. */ unsigned short lower[3]; /* Mapping to title case. Between 0 and 3 characters. Filled with 0s. */ unsigned short title[3]; /* Casefolding mapping. Between 0 and 3 characters. Filled with 0s. */ unsigned short casefold[3]; }; extern const struct special_casing_rule * gl_unicase_special_lookup (const char *str, size_t len); pspp-1.0.1/gl/unicase/u-casefold.h0000644000175000017500000000223413124536243013644 00000000000000/* Casefolding mapping for Unicode strings (locale dependent). Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ UNIT * FUNC (const UNIT *s, size_t n, const char *iso639_language, uninorm_t nf, UNIT *resultbuf, size_t *lengthp) { return U_CT_CASEFOLD (s, n, unicase_empty_prefix_context, unicase_empty_suffix_context, iso639_language, nf, resultbuf, lengthp); } pspp-1.0.1/gl/unicase/u8-casecmp.c0000644000175000017500000000216313124536243013563 00000000000000/* Case and normalization insensitive comparison of UTF-8 strings. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicase.h" #include #include #include "minmax.h" #include "uninorm.h" #include "unistr.h" #define FUNC u8_casecmp #define UNIT uint8_t #define SRC_UNIT uint8_t #define U_CASEFOLD u8_casefold #define U_CMP2 u8_cmp2 #include "u-casecmp.h" pspp-1.0.1/gl/unicase/tocasefold.h0000644000175000017500000011215413020461274013744 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Simple character mapping of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ #define mapping_header_0 16 #define mapping_header_1 2 #define mapping_header_2 7 #define mapping_header_3 511 #define mapping_header_4 127 static const struct { int level1[2]; short level2[2 << 9]; int level3[31 << 7]; } u_mapping = { { 0, 512 }, { 0, 128, 256, 384, 512, -1, 640, 768, 896, 1024, 1152, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1280, -1, -1, -1, -1, -1, 1408, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1536, 1664, 1792, 1920, -1, -1, 2048, 2176, -1, -1, -1, -1, -1, 2304, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2432, 2560, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2688, 2816, 2944, 3072, -1, -1, -1, -1, -1, -1, 3200, 3328, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3456, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3584, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3712, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3840, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 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, 775, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 32, 32, 32, 32, 32, 32, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -121, 1, 0, 1, 0, 1, 0, -268, 0, 210, 1, 0, 1, 0, 206, 1, 0, 205, 205, 1, 0, 0, 79, 202, 203, 1, 0, 205, 207, 0, 211, 209, 1, 0, 0, 0, 211, 213, 0, 214, 1, 0, 1, 0, 1, 0, 218, 1, 0, 218, 0, 0, 1, 0, 218, 1, 0, 217, 217, 1, 0, 1, 0, 219, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 2, 1, 0, 1, 0, -97, -56, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -130, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 10795, 1, 0, -163, 10792, 0, 0, 1, 0, -195, 69, 71, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 38, 0, 37, 37, 37, 0, 64, 0, 63, 63, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 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, 0, 0, 0, 0, 0, 0, 0, 8, -30, -25, 0, 0, 0, -15, -22, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -54, -48, 0, 0, -60, -64, 0, 1, 0, -7, 1, 0, 0, -130, -130, -130, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 15, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 0, 7264, 0, 0, 0, 0, 0, 7264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, -8, -8, -8, -8, -8, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, -58, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 0, -8, 0, -8, 0, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, -8, -74, -74, 0, 0, -7173, 0, 0, 0, 0, 0, 0, 0, 0, 0, -86, -86, -86, -86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -100, -100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -112, -112, -7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, -128, -126, -126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7517, 0, 0, 0, -8383, -8262, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, -10743, -3814, -10727, 0, 0, 1, 0, 1, 0, 1, 0, -10780, -10749, -10783, -10782, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -10815, -10815, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, -35332, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, -42280, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -42308, -42319, -42315, -42305, 0, 0, -42258, -42282, -42261, 928, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, -38864, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 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, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 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 } }; pspp-1.0.1/gl/unicase/caseprop.h0000644000175000017500000000253213124536243013437 00000000000000/* Case related properties of Unicode characters. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include #include "unitypes.h" /* Determine whether a character is "cased" according to the Unicode Standard, , section 3.13, definition D120. */ extern bool uc_is_cased (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Determine whether a character is "case-ignorable" according to the Unicode Standard, , section 3.13, definition D121. */ extern bool uc_is_case_ignorable (ucs4_t uc) _UC_ATTRIBUTE_CONST; pspp-1.0.1/gl/unicase/tolower.h0000644000175000017500000010623413020461274013316 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Simple character mapping of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ #define mapping_header_0 16 #define mapping_header_1 2 #define mapping_header_2 7 #define mapping_header_3 511 #define mapping_header_4 127 static const struct { int level1[2]; short level2[2 << 9]; int level3[29 << 7]; } u_mapping = { { 0, 512 }, { 0, 128, 256, 384, 512, -1, 640, 768, 896, 1024, 1152, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1280, -1, -1, -1, -1, -1, 1408, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1536, 1664, 1792, 1920, -1, -1, 2048, 2176, -1, -1, -1, -1, -1, 2304, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2432, 2560, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2688, 2816, 2944, 3072, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3200, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3328, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3456, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3584, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 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, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 32, 32, 32, 32, 32, 32, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -199, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -121, 1, 0, 1, 0, 1, 0, 0, 0, 210, 1, 0, 1, 0, 206, 1, 0, 205, 205, 1, 0, 0, 79, 202, 203, 1, 0, 205, 207, 0, 211, 209, 1, 0, 0, 0, 211, 213, 0, 214, 1, 0, 1, 0, 1, 0, 218, 1, 0, 218, 0, 0, 1, 0, 218, 1, 0, 217, 217, 1, 0, 1, 0, 219, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 2, 1, 0, 1, 0, -97, -56, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -130, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 10795, 1, 0, -163, 10792, 0, 0, 1, 0, -195, 69, 71, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 38, 0, 37, 37, 37, 0, 64, 0, 63, 63, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 32, 32, 32, 32, 32, 32, 32, 32, 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, 8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, -60, 0, 0, 1, 0, -7, 1, 0, 0, -130, -130, -130, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 15, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 0, 7264, 0, 0, 0, 0, 0, 7264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 38864, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7615, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 0, -8, 0, -8, 0, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 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, -8, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -8, -8, -8, -8, -8, -8, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -74, -74, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -86, -86, -86, -86, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -100, -100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, -8, -112, -112, -7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, -128, -126, -126, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7517, 0, 0, 0, -8383, -8262, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, -10743, -3814, -10727, 0, 0, 1, 0, 1, 0, 1, 0, -10780, -10749, -10783, -10782, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -10815, -10815, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, -35332, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, -42280, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, -42308, -42319, -42315, -42305, 0, 0, -42258, -42282, -42261, 928, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 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, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 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 } }; pspp-1.0.1/gl/unicase/toupper.c0000644000175000017500000000177213124536243013321 00000000000000/* Uppercase mapping for Unicode characters (locale and context independent). Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicase.h" /* Define u_mapping table. */ #include "toupper.h" #define FUNC uc_toupper #include "simple-mapping.h" pspp-1.0.1/gl/unicase/empty-prefix-context.c0000644000175000017500000000200513124536243015724 00000000000000/* Case-mapping context of empty prefix string. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicase.h" const casing_prefix_context_t unicase_empty_prefix_context = { 0xFFFD /* last_char_except_ignorable */, 0xFFFD /* last_char_normal_or_above */ }; pspp-1.0.1/gl/unicase/context.h0000644000175000017500000000534513124536243013314 00000000000000/* Case-mapping contexts of UTF-8/UTF-16/UTF-32 substring. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ /* The context of a prefix string combines the information of the "Before C" conditions of the Unicode Standard, , section 3.13, table 3-14 "Context Specification for Casing". casing_prefix_context_t contains the following fields: // Helper for evaluating the FINAL_SIGMA condition: // Last character that was not case-ignorable. ucs4_t last_char_except_ignorable; // Helper for evaluating the AFTER_SOFT_DOTTED and AFTER_I conditions: // Last character that was of combining class 230 ("Above") or 0. ucs4_t last_char_normal_or_above; Three bits would be sufficient to carry the context information, but that would require to invoke uc_is_cased and uc_is_property_soft_dotted ahead of time, more often than actually needed. */ /* The context of a suffix string combines the information of the "After C" conditions of the Unicode Standard, , section 3.13, table 3-14 "Context Specification for Casing". casing_suffix_context_t contains the following fields: // For evaluating the FINAL_SIGMA condition: // First character that was not case-ignorable. ucs4_t first_char_except_ignorable; // For evaluating the MORE_ABOVE condition: // Bit 0 is set if the suffix contains a character of combining class // 230 (Above) with no character of combining class 0 or 230 (Above) // before it. // // For evaluating the BEFORE_DOT condition: // Bit 1 is set if the suffix contains a COMBINING DOT ABOVE (U+0307) // with no character of combining class 0 or 230 (Above) before it. // uint32_t bits; Three bits would be sufficient to carry the context information, but that would require to invoke uc_is_cased ahead of time, more often than actually needed. */ #define SCC_MORE_ABOVE_MASK 1 #define SCC_BEFORE_DOT_MASK 2 pspp-1.0.1/gl/unicase/ignorable.h0000644000175000017500000003653313020461274013571 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Casing Properties of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ #define header_0 16 #define header_2 9 #define header_3 127 #define header_4 15 static const struct { int header[1]; int level1[15]; short level2[3 << 7]; /*unsigned*/ int level3[42 << 4]; } u_casing_property_case_ignorable = { { 15 }, { 16 * sizeof (int) / sizeof (short) + 0, 16 * sizeof (int) / sizeof (short) + 128, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16 * sizeof (int) / sizeof (short) + 256 }, { 16 + 384 * sizeof (short) / sizeof (int) + 0, 16 + 384 * sizeof (short) / sizeof (int) + 16, 16 + 384 * sizeof (short) / sizeof (int) + 32, 16 + 384 * sizeof (short) / sizeof (int) + 48, 16 + 384 * sizeof (short) / sizeof (int) + 64, 16 + 384 * sizeof (short) / sizeof (int) + 80, 16 + 384 * sizeof (short) / sizeof (int) + 96, 16 + 384 * sizeof (short) / sizeof (int) + 112, 16 + 384 * sizeof (short) / sizeof (int) + 128, 16 + 384 * sizeof (short) / sizeof (int) + 144, -1, 16 + 384 * sizeof (short) / sizeof (int) + 160, 16 + 384 * sizeof (short) / sizeof (int) + 176, 16 + 384 * sizeof (short) / sizeof (int) + 192, 16 + 384 * sizeof (short) / sizeof (int) + 208, 16 + 384 * sizeof (short) / sizeof (int) + 224, 16 + 384 * sizeof (short) / sizeof (int) + 240, -1, -1, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 256, 16 + 384 * sizeof (short) / sizeof (int) + 272, 16 + 384 * sizeof (short) / sizeof (int) + 288, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 304, -1, 16 + 384 * sizeof (short) / sizeof (int) + 320, 16 + 384 * sizeof (short) / sizeof (int) + 336, 16 + 384 * sizeof (short) / sizeof (int) + 352, 16 + 384 * sizeof (short) / sizeof (int) + 368, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 384, -1, 16 + 384 * sizeof (short) / sizeof (int) + 400, 16 + 384 * sizeof (short) / sizeof (int) + 416, 16 + 384 * sizeof (short) / sizeof (int) + 432, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 448, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 464, 16 + 384 * sizeof (short) / sizeof (int) + 480, 16 + 384 * sizeof (short) / sizeof (int) + 496, 16 + 384 * sizeof (short) / sizeof (int) + 512, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 528, -1, 16 + 384 * sizeof (short) / sizeof (int) + 544, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 560, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 576, 16 + 384 * sizeof (short) / sizeof (int) + 592, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 608, -1, -1, -1, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 624, -1, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 640, -1, -1, -1, -1, -1, -1, 16 + 384 * sizeof (short) / sizeof (int) + 656, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 0x00000000, 0x04004000, 0x40000000, 0x00000001, 0x00000000, 0x0190A100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFE000000, 0xFFFFFFFC, 0xFFFFFFE0, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFDF, 0x0030FFFF, 0x000000B0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003F8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000000, 0x00000000, 0xFFFE0000, 0xBFFFFFFF, 0x000000B6, 0x00100000, 0x17FF003F, 0x00000000, 0xFFFFF801, 0x00010000, 0x00000000, 0x00000000, 0xBFC00000, 0x00003DFF, 0x00028000, 0xFFFF0000, 0x000007FF, 0x00000000, 0x00000000, 0x0001FFC0, 0x00000000, 0x043FF800, 0xFFC00000, 0x00003FFF, 0x0E000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFF8, 0x00000007, 0x14000000, 0x00FE21FE, 0x0002000C, 0x00000002, 0x10000000, 0x0000201E, 0x0000000C, 0x00000006, 0x10000000, 0x00023986, 0x00230000, 0x00000006, 0x10000000, 0x000021BE, 0x0000000C, 0x00000002, 0x90000000, 0x0040201E, 0x0000000C, 0x00000004, 0x00000000, 0x00002001, 0x00000000, 0x00000001, 0xC0000000, 0x00603DC1, 0x0000000C, 0x00000002, 0x90000000, 0x00003040, 0x0000000C, 0x00000002, 0x00000000, 0x0000201E, 0x0000000C, 0x00000000, 0x00000000, 0x005C0400, 0x00000000, 0x00000000, 0x07F20000, 0x00007FC0, 0x00000000, 0x00000000, 0x1BF20000, 0x00003F40, 0x00000000, 0x03000000, 0x02A00000, 0x00000000, 0x7FFE0000, 0xFEFFE0DF, 0x1FFFFFFF, 0x00000040, 0x00000000, 0x00000000, 0x66FDE000, 0xC3000000, 0x001E0001, 0x20002064, 0x00000000, 0x00000000, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xE0000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x001C0000, 0x001C0000, 0x000C0000, 0x000C0000, 0x00000000, 0x3FB00000, 0x208FFE40, 0x00000000, 0x00007800, 0x00000000, 0x00000008, 0x00000000, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x0E040187, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x09800000, 0x00000000, 0x7F400000, 0x9FF81FE5, 0x00000000, 0x7FFF0080, 0x00000000, 0x00000000, 0x0000000F, 0x17D00000, 0x00000004, 0x000FF800, 0x00000003, 0x00003B3C, 0x00000000, 0x0003A340, 0x00000000, 0x00CFF000, 0x00000000, 0x3F000000, 0x00000000, 0x00000000, 0xFFF70000, 0x031021FD, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xF03FFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA0000000, 0xE000E003, 0x6000E000, 0x0300F800, 0x00007C90, 0x00000000, 0x0000FFDF, 0x00000000, 0x00000000, 0xFFFF0000, 0x0001FFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00038000, 0x00000000, 0x00000000, 0x00000000, 0x80008000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00008000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000020, 0x083E3C00, 0x00000000, 0x00000000, 0x7E000000, 0x00000000, 0x00000000, 0x70000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00200000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3F000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00001000, 0x00000000, 0x00000000, 0xBFF78000, 0xC0000000, 0x00000000, 0x00000000, 0x00030000, 0xFFFFFFFF, 0x00000003, 0x00000000, 0x00000000, 0x00000700, 0x00000000, 0x00000000, 0x00000000, 0x00000844, 0x00000060, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x0003FFFF, 0x00000000, 0x00003FC0, 0x0003FF80, 0x00000000, 0x00000007, 0x13C80000, 0x00008000, 0x00000060, 0x00000000, 0x00667E00, 0x00001008, 0x10010000, 0x00000000, 0xC19D0000, 0x20000002, 0x00583000, 0x00000000, 0x00000000, 0x08000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00002120, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFC0000, 0x00000003, 0x00000000, 0x0008FFFF, 0x0000FFFF, 0x00240000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x04004080, 0x40000000, 0x00000001, 0x00010000, 0xC0000000, 0x00000000, 0x00000000, 0x0E000008, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x20000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x07C00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000F06E, 0x87000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000060, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0xFF000000, 0x0000007F, 0x80000000, 0x00000003, 0x26780000, 0x00000000, 0x00000000, 0x00000007, 0x001FEF80, 0x00000000, 0x00080000, 0x00000003, 0x7FC00000, 0x00001C00, 0x00000000, 0x00000000, 0x00D38000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x000007F8, 0x00000003, 0x10000000, 0x00000001, 0x001F1FC0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x85F80000, 0x0000000D, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xB03C0000, 0x30000001, 0x00000000, 0x00000000, 0xA7F80000, 0x00000001, 0x00000000, 0x00000000, 0x00BF2800, 0x00000000, 0x00000000, 0xE0000000, 0x00000FBC, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x001F0000, 0x00000000, 0x007F0000, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFF8000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60000000, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFF80380, 0x00000FE7, 0x00003C00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000001C, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xF87FFFFF, 0xFFFFFFFF, 0x00201FFF, 0xF8000010, 0x0000FFFE, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x007F0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xF8000000, 0x00000002, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000FFFF } }; pspp-1.0.1/gl/unicase/casefold.h0000644000175000017500000000163613124536243013407 00000000000000/* Casefolding of Unicode characters. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include "unitypes.h" /* Return the casefold mapping of a Unicode character. */ extern ucs4_t uc_tocasefold (ucs4_t uc); pspp-1.0.1/gl/unicase/special-casing.c0000644000175000017500000000163613124536243014504 00000000000000/* Special casing table. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unicase/special-casing.h" #include #include "unicase/special-casing-table.h" pspp-1.0.1/gl/unicase/cased.c0000644000175000017500000000273113124536243012676 00000000000000/* Test whether a Unicode character is cased. Copyright (C) 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "caseprop.h" /* Quoting the Unicode standard: Definition: A character is defined to be "cased" if it has the Lowercase or Uppercase property or has a General_Category value of Titlecase_Letter. */ #if 0 #include "unictype.h" bool uc_is_cased (ucs4_t uc) { return (uc_is_property_lowercase (uc) || uc_is_property_uppercase (uc) || uc_is_general_category (uc, UC_TITLECASE_LETTER)); } #else #include "unictype/bitmap.h" /* Define u_casing_property_cased table. */ #include "cased.h" bool uc_is_cased (ucs4_t uc) { return bitmap_lookup (&u_casing_property_cased, uc); } #endif pspp-1.0.1/gl/unicase/u-ct-casefold.h0000644000175000017500000000752013124536243014253 00000000000000/* Casefolding mapping for Unicode substrings (locale dependent). Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ UNIT * FUNC (const UNIT *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, UNIT *resultbuf, size_t *lengthp) { /* Implement the three definitions of caseless matching, as described in Unicode 5.0, section "Default caseless matching": - If no normalization is requested, simply apply the casefolding. X -> toCasefold(X). - If canonical normalization is requested, apply it, and apply an NFD before. X -> NFD(toCasefold(NFD(X))). - If compatibility normalization is requested, apply it twice, apply the normalization after each, and apply an NFD before: X -> NFKD(toCasefold(NFKD(toCasefold(NFD(X))))). */ if (nf == NULL) /* X -> toCasefold(X) */ return U_CASEMAP (s, n, prefix_context, suffix_context, iso639_language, uc_tocasefold, offsetof (struct special_casing_rule, casefold[0]), NULL, resultbuf, lengthp); else { uninorm_t nfd = uninorm_decomposing_form (nf); /* X -> nf(toCasefold(NFD(X))) or X -> nf(toCasefold(nfd(toCasefold(NFD(X))))) */ int repeat = (uninorm_is_compat_decomposing (nf) ? 2 : 1); UNIT tmpbuf1[2048 / sizeof (UNIT)]; UNIT tmpbuf2[2048 / sizeof (UNIT)]; UNIT *tmp1; size_t tmp1_length; UNIT *tmp2; size_t tmp2_length; tmp1_length = sizeof (tmpbuf1) / sizeof (UNIT); tmp1 = U_NORMALIZE (UNINORM_NFD, s, n, tmpbuf1, &tmp1_length); if (tmp1 == NULL) /* errno is set here. */ return NULL; do { tmp2_length = sizeof (tmpbuf2) / sizeof (UNIT); tmp2 = U_CASEMAP (tmp1, tmp1_length, prefix_context, suffix_context, iso639_language, uc_tocasefold, offsetof (struct special_casing_rule, casefold[0]), NULL, tmpbuf2, &tmp2_length); if (tmp2 == NULL) { int saved_errno = errno; if (tmp1 != tmpbuf1) free (tmp1); errno = saved_errno; return NULL; } if (tmp1 != tmpbuf1) free (tmp1); if (repeat > 1) { tmp1_length = sizeof (tmpbuf1) / sizeof (UNIT); tmp1 = U_NORMALIZE (nfd, tmp2, tmp2_length, tmpbuf1, &tmp1_length); } else /* Last run through this loop. */ tmp1 = U_NORMALIZE (nf, tmp2, tmp2_length, resultbuf, lengthp); if (tmp1 == NULL) { int saved_errno = errno; if (tmp2 != tmpbuf2) free (tmp2); errno = saved_errno; return NULL; } if (tmp2 != tmpbuf2) free (tmp2); } while (--repeat > 0); return tmp1; } } pspp-1.0.1/gl/wcrtomb.c0000644000175000017500000000271513124536243011647 00000000000000/* Convert wide character to multibyte character. Copyright (C) 2008-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 . */ #include /* Specification. */ #include #include #include size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps) { /* This implementation of wcrtomb on top of wctomb() supports only stateless encodings. ps must be in the initial state. */ if (ps != NULL && !mbsinit (ps)) { errno = EINVAL; return (size_t)(-1); } if (s == NULL) /* We know the NUL wide character corresponds to the NUL character. */ return 1; else { int ret = wctomb (s, wc); if (ret >= 0) return ret; else { errno = EILSEQ; return (size_t)(-1); } } } pspp-1.0.1/gl/offtostr.c0000644000175000017500000000010613020461274012024 00000000000000#define anytostr offtostr #define inttype off_t #include "anytostr.c" pspp-1.0.1/gl/unicase.in.h0000644000175000017500000004735113124536243012240 00000000000000/* Unicode character case mappings. Copyright (C) 2002, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _UNICASE_H #define _UNICASE_H #include "unitypes.h" /* Get bool. */ #include /* Get size_t. */ #include /* Get uninorm_t. */ #include "uninorm.h" #ifdef __cplusplus extern "C" { #endif /* ========================================================================= */ /* Character case mappings. These mappings are locale and context independent. WARNING! These functions are not sufficient for languages such as German. Better use the functions below that treat an entire string at once and are language aware. */ /* Return the uppercase mapping of a Unicode character. */ extern ucs4_t uc_toupper (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Return the lowercase mapping of a Unicode character. */ extern ucs4_t uc_tolower (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* Return the titlecase mapping of a Unicode character. */ extern ucs4_t uc_totitle (ucs4_t uc) _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* String case mappings. */ /* These functions are locale dependent. The iso639_language argument identifies the language (e.g. "tr" for Turkish). NULL means to use locale independent case mappings. */ /* Return the ISO 639 language code of the current locale. Return "" if it is unknown, or in the "C" locale. */ extern const char * uc_locale_language (void) _UC_ATTRIBUTE_PURE; /* Conventions: All functions prefixed with u8_ operate on UTF-8 encoded strings. Their unit is an uint8_t (1 byte). All functions prefixed with u16_ operate on UTF-16 encoded strings. Their unit is an uint16_t (a 2-byte word). All functions prefixed with u32_ operate on UCS-4 encoded strings. Their unit is an uint32_t (a 4-byte word). All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly n units. Functions returning a string result take a (resultbuf, lengthp) argument pair. If resultbuf is not NULL and the result fits into *lengthp units, it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly allocated string is returned. In both cases, *lengthp is set to the length (number of units) of the returned string. In case of error, NULL is returned and errno is set. */ /* Return the uppercase mapping of a string. The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization. */ extern uint8_t * u8_toupper (const uint8_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint8_t *resultbuf, size_t *lengthp); extern uint16_t * u16_toupper (const uint16_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint16_t *resultbuf, size_t *lengthp); extern uint32_t * u32_toupper (const uint32_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint32_t *resultbuf, size_t *lengthp); /* Return the lowercase mapping of a string. The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization. */ extern uint8_t * u8_tolower (const uint8_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint8_t *resultbuf, size_t *lengthp); extern uint16_t * u16_tolower (const uint16_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint16_t *resultbuf, size_t *lengthp); extern uint32_t * u32_tolower (const uint32_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint32_t *resultbuf, size_t *lengthp); /* Return the titlecase mapping of a string. The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization. */ extern uint8_t * u8_totitle (const uint8_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint8_t *resultbuf, size_t *lengthp); extern uint16_t * u16_totitle (const uint16_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint16_t *resultbuf, size_t *lengthp); extern uint32_t * u32_totitle (const uint32_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint32_t *resultbuf, size_t *lengthp); /* The case-mapping context given by a prefix string. */ typedef struct casing_prefix_context { /* These fields are private, undocumented. */ uint32_t last_char_except_ignorable; uint32_t last_char_normal_or_above; } casing_prefix_context_t; /* The case-mapping context of the empty prefix string. */ extern const casing_prefix_context_t unicase_empty_prefix_context; /* Return the case-mapping context of a given prefix string. */ extern casing_prefix_context_t u8_casing_prefix_context (const uint8_t *s, size_t n); extern casing_prefix_context_t u16_casing_prefix_context (const uint16_t *s, size_t n); extern casing_prefix_context_t u32_casing_prefix_context (const uint32_t *s, size_t n); /* Return the case-mapping context of the prefix concat(A, S), given the case-mapping context of the prefix A. */ extern casing_prefix_context_t u8_casing_prefixes_context (const uint8_t *s, size_t n, casing_prefix_context_t a_context); extern casing_prefix_context_t u16_casing_prefixes_context (const uint16_t *s, size_t n, casing_prefix_context_t a_context); extern casing_prefix_context_t u32_casing_prefixes_context (const uint32_t *s, size_t n, casing_prefix_context_t a_context); /* The case-mapping context given by a suffix string. */ typedef struct casing_suffix_context { /* These fields are private, undocumented. */ uint32_t first_char_except_ignorable; uint32_t bits; } casing_suffix_context_t; /* The case-mapping context of the empty suffix string. */ extern const casing_suffix_context_t unicase_empty_suffix_context; /* Return the case-mapping context of a given suffix string. */ extern casing_suffix_context_t u8_casing_suffix_context (const uint8_t *s, size_t n); extern casing_suffix_context_t u16_casing_suffix_context (const uint16_t *s, size_t n); extern casing_suffix_context_t u32_casing_suffix_context (const uint32_t *s, size_t n); /* Return the case-mapping context of the suffix concat(S, A), given the case-mapping context of the suffix A. */ extern casing_suffix_context_t u8_casing_suffixes_context (const uint8_t *s, size_t n, casing_suffix_context_t a_context); extern casing_suffix_context_t u16_casing_suffixes_context (const uint16_t *s, size_t n, casing_suffix_context_t a_context); extern casing_suffix_context_t u32_casing_suffixes_context (const uint32_t *s, size_t n, casing_suffix_context_t a_context); /* Return the uppercase mapping of a string that is surrounded by a prefix and a suffix. */ extern uint8_t * u8_ct_toupper (const uint8_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint8_t *resultbuf, size_t *lengthp); extern uint16_t * u16_ct_toupper (const uint16_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint16_t *resultbuf, size_t *lengthp); extern uint32_t * u32_ct_toupper (const uint32_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint32_t *resultbuf, size_t *lengthp); /* Return the lowercase mapping of a string that is surrounded by a prefix and a suffix. */ extern uint8_t * u8_ct_tolower (const uint8_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint8_t *resultbuf, size_t *lengthp); extern uint16_t * u16_ct_tolower (const uint16_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint16_t *resultbuf, size_t *lengthp); extern uint32_t * u32_ct_tolower (const uint32_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint32_t *resultbuf, size_t *lengthp); /* Return the titlecase mapping of a string that is surrounded by a prefix and a suffix. */ extern uint8_t * u8_ct_totitle (const uint8_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint8_t *resultbuf, size_t *lengthp); extern uint16_t * u16_ct_totitle (const uint16_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint16_t *resultbuf, size_t *lengthp); extern uint32_t * u32_ct_totitle (const uint32_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint32_t *resultbuf, size_t *lengthp); /* Return the case folded string. Comparing uN_casefold (S1) and uN_casefold (S2) with uN_cmp2() is equivalent to comparing S1 and S2 with uN_casecmp(). The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization. */ extern uint8_t * u8_casefold (const uint8_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint8_t *resultbuf, size_t *lengthp); extern uint16_t * u16_casefold (const uint16_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint16_t *resultbuf, size_t *lengthp); extern uint32_t * u32_casefold (const uint32_t *s, size_t n, const char *iso639_language, uninorm_t nf, uint32_t *resultbuf, size_t *lengthp); /* Likewise, for a string that is surrounded by a prefix and a suffix. */ extern uint8_t * u8_ct_casefold (const uint8_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint8_t *resultbuf, size_t *lengthp); extern uint16_t * u16_ct_casefold (const uint16_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint16_t *resultbuf, size_t *lengthp); extern uint32_t * u32_ct_casefold (const uint32_t *s, size_t n, casing_prefix_context_t prefix_context, casing_suffix_context_t suffix_context, const char *iso639_language, uninorm_t nf, uint32_t *resultbuf, size_t *lengthp); /* Compare S1 and S2, ignoring differences in case and normalization. The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization. If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and return 0. Upon failure, return -1 with errno set. */ extern int u8_casecmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, const char *iso639_language, uninorm_t nf, int *resultp); extern int u16_casecmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, const char *iso639_language, uninorm_t nf, int *resultp); extern int u32_casecmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, const char *iso639_language, uninorm_t nf, int *resultp); extern int ulc_casecmp (const char *s1, size_t n1, const char *s2, size_t n2, const char *iso639_language, uninorm_t nf, int *resultp); /* Convert the string S of length N to a NUL-terminated byte sequence, in such a way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with the gnulib function memcmp2() is equivalent to comparing S1 and S2 with uN_casecoll(). NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalization. */ extern char * u8_casexfrm (const uint8_t *s, size_t n, const char *iso639_language, uninorm_t nf, char *resultbuf, size_t *lengthp); extern char * u16_casexfrm (const uint16_t *s, size_t n, const char *iso639_language, uninorm_t nf, char *resultbuf, size_t *lengthp); extern char * u32_casexfrm (const uint32_t *s, size_t n, const char *iso639_language, uninorm_t nf, char *resultbuf, size_t *lengthp); extern char * ulc_casexfrm (const char *s, size_t n, const char *iso639_language, uninorm_t nf, char *resultbuf, size_t *lengthp); /* Compare S1 and S2, ignoring differences in case and normalization, using the collation rules of the current locale. The nf argument identifies the normalization form to apply after the case-mapping. It must be either UNINORM_NFC or UNINORM_NFKC. It can also be NULL, for no normalization. If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and return 0. Upon failure, return -1 with errno set. */ extern int u8_casecoll (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, const char *iso639_language, uninorm_t nf, int *resultp); extern int u16_casecoll (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, const char *iso639_language, uninorm_t nf, int *resultp); extern int u32_casecoll (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, const char *iso639_language, uninorm_t nf, int *resultp); extern int ulc_casecoll (const char *s1, size_t n1, const char *s2, size_t n2, const char *iso639_language, uninorm_t nf, int *resultp); /* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to false otherwise, and return 0. Upon failure, return -1 with errno set. */ extern int u8_is_uppercase (const uint8_t *s, size_t n, const char *iso639_language, bool *resultp); extern int u16_is_uppercase (const uint16_t *s, size_t n, const char *iso639_language, bool *resultp); extern int u32_is_uppercase (const uint32_t *s, size_t n, const char *iso639_language, bool *resultp); /* Set *RESULTP to true if mapping NFD(S) to lower case is a no-op, or to false otherwise, and return 0. Upon failure, return -1 with errno set. */ extern int u8_is_lowercase (const uint8_t *s, size_t n, const char *iso639_language, bool *resultp); extern int u16_is_lowercase (const uint16_t *s, size_t n, const char *iso639_language, bool *resultp); extern int u32_is_lowercase (const uint32_t *s, size_t n, const char *iso639_language, bool *resultp); /* Set *RESULTP to true if mapping NFD(S) to title case is a no-op, or to false otherwise, and return 0. Upon failure, return -1 with errno set. */ extern int u8_is_titlecase (const uint8_t *s, size_t n, const char *iso639_language, bool *resultp); extern int u16_is_titlecase (const uint16_t *s, size_t n, const char *iso639_language, bool *resultp); extern int u32_is_titlecase (const uint32_t *s, size_t n, const char *iso639_language, bool *resultp); /* Set *RESULTP to true if applying case folding to NFD(S) is a no-op, or to false otherwise, and return 0. Upon failure, return -1 with errno set. */ extern int u8_is_casefolded (const uint8_t *s, size_t n, const char *iso639_language, bool *resultp); extern int u16_is_casefolded (const uint16_t *s, size_t n, const char *iso639_language, bool *resultp); extern int u32_is_casefolded (const uint32_t *s, size_t n, const char *iso639_language, bool *resultp); /* Set *RESULTP to true if case matters for S, that is, if mapping NFD(S) to either upper case or lower case or title case is not a no-op. Set *RESULTP to false if NFD(S) maps to itself under the upper case mapping, under the lower case mapping, and under the title case mapping; in other words, when NFD(S) consists entirely of caseless characters. Upon failure, return -1 with errno set. */ extern int u8_is_cased (const uint8_t *s, size_t n, const char *iso639_language, bool *resultp); extern int u16_is_cased (const uint16_t *s, size_t n, const char *iso639_language, bool *resultp); extern int u32_is_cased (const uint32_t *s, size_t n, const char *iso639_language, bool *resultp); /* ========================================================================= */ #ifdef __cplusplus } #endif #endif /* _UNICASE_H */ pspp-1.0.1/gl/round.c0000644000175000017500000001221413124536243011314 00000000000000/* Round toward nearest, breaking ties away from zero. Copyright (C) 2007, 2010-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Ben Pfaff , 2007. Based heavily on code by Bruno Haible. */ #if ! defined USE_LONG_DOUBLE # include #endif /* Specification. */ #include #include #undef MIN #ifdef USE_LONG_DOUBLE # define ROUND roundl # define FLOOR floorl # define CEIL ceill # define DOUBLE long double # define MANT_DIG LDBL_MANT_DIG # define MIN LDBL_MIN # define L_(literal) literal##L # define HAVE_FLOOR_AND_CEIL HAVE_FLOORL_AND_CEILL #elif ! defined USE_FLOAT # define ROUND round # define FLOOR floor # define CEIL ceil # define DOUBLE double # define MANT_DIG DBL_MANT_DIG # define MIN DBL_MIN # define L_(literal) literal # define HAVE_FLOOR_AND_CEIL 1 #else /* defined USE_FLOAT */ # define ROUND roundf # define FLOOR floorf # define CEIL ceilf # define DOUBLE float # define MANT_DIG FLT_MANT_DIG # define MIN FLT_MIN # define L_(literal) literal##f # define HAVE_FLOOR_AND_CEIL HAVE_FLOORF_AND_CEILF #endif /* -0.0. See minus-zero.h. */ #if defined __hpux || defined __sgi || defined __ICC # define MINUS_ZERO (-MIN * MIN) #else # define MINUS_ZERO L_(-0.0) #endif /* MSVC with option -fp:strict refuses to compile constant initializers that contain floating-point operations. Pacify this compiler. */ #ifdef _MSC_VER # pragma fenv_access (off) #endif /* If we're being included from test-round2[f].c, it already defined names for our round implementations. Otherwise, pick the preferred implementation for this machine. */ #if !defined FLOOR_BASED_ROUND && !defined FLOOR_FREE_ROUND # if HAVE_FLOOR_AND_CEIL # define FLOOR_BASED_ROUND ROUND # else # define FLOOR_FREE_ROUND ROUND # endif #endif #ifdef FLOOR_BASED_ROUND /* An implementation of the C99 round function based on floor and ceil. We use this when floor and ceil are available, on the assumption that they are faster than the open-coded versions below. */ DOUBLE FLOOR_BASED_ROUND (DOUBLE x) { if (x >= L_(0.0)) { DOUBLE y = FLOOR (x); if (x - y >= L_(0.5)) y += L_(1.0); return y; } else { DOUBLE y = CEIL (x); if (y - x >= L_(0.5)) y -= L_(1.0); return y; } } #endif /* FLOOR_BASED_ROUND */ #ifdef FLOOR_FREE_ROUND /* An implementation of the C99 round function without floor or ceil. We use this when floor or ceil is missing. */ DOUBLE FLOOR_FREE_ROUND (DOUBLE x) { /* 2^(MANT_DIG-1). */ static const DOUBLE TWO_MANT_DIG = /* Assume MANT_DIG <= 5 * 31. Use the identity n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5). */ (DOUBLE) (1U << ((MANT_DIG - 1) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5)) * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5)); /* The use of 'volatile' guarantees that excess precision bits are dropped at each addition step and before the following comparison at the caller's site. It is necessary on x86 systems where double-floats are not IEEE compliant by default, to avoid that the results become platform and compiler option dependent. 'volatile' is a portable alternative to gcc's -ffloat-store option. */ volatile DOUBLE y = x; volatile DOUBLE z = y; if (z > L_(0.0)) { /* Avoid rounding error for x = 0.5 - 2^(-MANT_DIG-1). */ if (z < L_(0.5)) z = L_(0.0); /* Avoid rounding errors for values near 2^k, where k >= MANT_DIG-1. */ else if (z < TWO_MANT_DIG) { /* Add 0.5 to the absolute value. */ y = z += L_(0.5); /* Round to the next integer (nearest or up or down, doesn't matter). */ z += TWO_MANT_DIG; z -= TWO_MANT_DIG; /* Enforce rounding down. */ if (z > y) z -= L_(1.0); } } else if (z < L_(0.0)) { /* Avoid rounding error for x = -(0.5 - 2^(-MANT_DIG-1)). */ if (z > - L_(0.5)) z = MINUS_ZERO; /* Avoid rounding errors for values near -2^k, where k >= MANT_DIG-1. */ else if (z > -TWO_MANT_DIG) { /* Add 0.5 to the absolute value. */ y = z -= L_(0.5); /* Round to the next integer (nearest or up or down, doesn't matter). */ z -= TWO_MANT_DIG; z += TWO_MANT_DIG; /* Enforce rounding up. */ if (z < y) z += L_(1.0); } } return z; } #endif /* FLOOR_FREE_ROUND */ pspp-1.0.1/gl/time_rz.c0000644000175000017500000002070413124536243011641 00000000000000/* Time zone functions such as tzalloc and localtime_rz Copyright 2015-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Paul Eggert. */ /* Although this module is not thread-safe, any races should be fairly rare and reasonably benign. For complete thread-safety, use a C library with a working timezone_t type, so that this module is not needed. */ #include #include #include #include #include #include #include #include #include "flexmember.h" #include "time-internal.h" #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif /* The approximate size to use for small allocation requests. This is the largest "small" request for the GNU C library malloc. */ enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; /* Minimum size of the ABBRS member of struct tm_zone. ABBRS is larger only in the unlikely case where an abbreviation longer than this is used. */ enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - offsetof (struct tm_zone, abbrs) }; /* Magic cookie timezone_t value, for local time. It differs from NULL and from all other timezone_t values. Only the address matters; the pointer is never dereferenced. */ static timezone_t const local_tz = (timezone_t) 1; #if HAVE_TM_ZONE || HAVE_TZNAME /* Return true if the values A and B differ according to the rules for tm_isdst: A and B differ if one is zero and the other positive. */ static bool isdst_differ (int a, int b) { return !a != !b && 0 <= a && 0 <= b; } /* Return true if A and B are equal. */ static int equal_tm (const struct tm *a, const struct tm *b) { return ! ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | isdst_differ (a->tm_isdst, b->tm_isdst)); } #endif /* Copy to ABBRS the abbreviation at ABBR with size ABBR_SIZE (this includes its trailing null byte). Append an extra null byte to mark the end of ABBRS. */ static void extend_abbrs (char *abbrs, char const *abbr, size_t abbr_size) { memcpy (abbrs, abbr, abbr_size); abbrs[abbr_size] = '\0'; } /* Return a newly allocated time zone for NAME, or NULL on failure. A null NAME stands for wall clock time (which is like unset TZ). */ timezone_t tzalloc (char const *name) { size_t name_size = name ? strlen (name) + 1 : 0; size_t abbr_size = name_size < ABBR_SIZE_MIN ? ABBR_SIZE_MIN : name_size + 1; timezone_t tz = malloc (FLEXSIZEOF (struct tm_zone, abbrs, abbr_size)); if (tz) { tz->next = NULL; #if HAVE_TZNAME && !HAVE_TM_ZONE tz->tzname_copy[0] = tz->tzname_copy[1] = NULL; #endif tz->tz_is_set = !!name; tz->abbrs[0] = '\0'; if (name) extend_abbrs (tz->abbrs, name, name_size); } return tz; } /* Save into TZ any nontrivial time zone abbreviation used by TM, and update *TM (if HAVE_TM_ZONE) or *TZ (if !HAVE_TM_ZONE && HAVE_TZNAME) if they use the abbreviation. Return true if successful, false (setting errno) otherwise. */ static bool save_abbr (timezone_t tz, struct tm *tm) { #if HAVE_TM_ZONE || HAVE_TZNAME char const *zone = NULL; char *zone_copy = (char *) ""; # if HAVE_TZNAME int tzname_index = -1; # endif # if HAVE_TM_ZONE zone = tm->tm_zone; # endif # if HAVE_TZNAME if (! (zone && *zone) && 0 <= tm->tm_isdst) { tzname_index = tm->tm_isdst != 0; zone = tzname[tzname_index]; } # endif /* No need to replace null zones, or zones within the struct tm. */ if (!zone || ((char *) tm <= zone && zone < (char *) (tm + 1))) return true; if (*zone) { zone_copy = tz->abbrs; while (strcmp (zone_copy, zone) != 0) { if (! (*zone_copy || (zone_copy == tz->abbrs && tz->tz_is_set))) { size_t zone_size = strlen (zone) + 1; size_t zone_used = zone_copy - tz->abbrs; if (SIZE_MAX - zone_used < zone_size) { errno = ENOMEM; return false; } if (zone_used + zone_size < ABBR_SIZE_MIN) extend_abbrs (zone_copy, zone, zone_size); else { tz = tz->next = tzalloc (zone); if (!tz) return false; tz->tz_is_set = 0; zone_copy = tz->abbrs; } break; } zone_copy += strlen (zone_copy) + 1; if (!*zone_copy && tz->next) { tz = tz->next; zone_copy = tz->abbrs; } } } /* Replace the zone name so that its lifetime matches that of TZ. */ # if HAVE_TM_ZONE tm->tm_zone = zone_copy; # else if (0 <= tzname_index) tz->tzname_copy[tzname_index] = zone_copy; # endif #endif return true; } /* Free a time zone. */ void tzfree (timezone_t tz) { if (tz != local_tz) while (tz) { timezone_t next = tz->next; free (tz); tz = next; } } /* Get and set the TZ environment variable. These functions can be overridden by programs like Emacs that manage their own environment. */ #ifndef getenv_TZ static char * getenv_TZ (void) { return getenv ("TZ"); } #endif #ifndef setenv_TZ static int setenv_TZ (char const *tz) { return tz ? setenv ("TZ", tz, 1) : unsetenv ("TZ"); } #endif /* Change the environment to match the specified timezone_t value. Return true if successful, false (setting errno) otherwise. */ static bool change_env (timezone_t tz) { if (setenv_TZ (tz->tz_is_set ? tz->abbrs : NULL) != 0) return false; tzset (); return true; } /* Temporarily set the time zone to TZ, which must not be null. Return LOCAL_TZ if the time zone setting is already correct. Otherwise return a newly allocated time zone representing the old setting, or NULL (setting errno) on failure. */ static timezone_t set_tz (timezone_t tz) { char *env_tz = getenv_TZ (); if (env_tz ? tz->tz_is_set && strcmp (tz->abbrs, env_tz) == 0 : !tz->tz_is_set) return local_tz; else { timezone_t old_tz = tzalloc (env_tz); if (!old_tz) return old_tz; if (! change_env (tz)) { int saved_errno = errno; tzfree (old_tz); errno = saved_errno; return NULL; } return old_tz; } } /* Restore an old setting returned by set_tz. It must not be null. Return true (preserving errno) if successful, false (setting errno) otherwise. */ static bool revert_tz (timezone_t tz) { if (tz == local_tz) return true; else { int saved_errno = errno; bool ok = change_env (tz); if (!ok) saved_errno = errno; tzfree (tz); errno = saved_errno; return ok; } } /* Use time zone TZ to compute localtime_r (T, TM). */ struct tm * localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) { if (!tz) return gmtime_r (t, tm); else { timezone_t old_tz = set_tz (tz); if (old_tz) { bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm); if (revert_tz (old_tz) && abbr_saved) return tm; } return NULL; } } /* Use time zone TZ to compute mktime (TM). */ time_t mktime_z (timezone_t tz, struct tm *tm) { if (!tz) return timegm (tm); else { timezone_t old_tz = set_tz (tz); if (old_tz) { time_t t = mktime (tm); #if HAVE_TM_ZONE || HAVE_TZNAME time_t badtime = -1; struct tm tm_1; if ((t != badtime || (localtime_r (&t, &tm_1) && equal_tm (tm, &tm_1))) && !save_abbr (tz, tm)) t = badtime; #endif if (revert_tz (old_tz)) return t; } return -1; } } pspp-1.0.1/gl/stat.c0000644000175000017500000003154413124536243011147 00000000000000/* Work around platform bugs in stat. Copyright (C) 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Eric Blake and Bruno Haible. */ /* If the user's config.h happens to include , let it include only the system's here, so that orig_stat doesn't recurse to rpl_stat. */ #define __need_system_sys_stat_h #include /* Get the original definition of stat. It might be defined as a macro. */ #include #include #undef __need_system_sys_stat_h #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WINDOWS_NATIVE #endif #if !defined WINDOWS_NATIVE static int orig_stat (const char *filename, struct stat *buf) { return stat (filename, buf); } #endif /* Specification. */ /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include above. */ #include "sys/stat.h" #include #include #include #include #include "filename.h" #include "malloca.h" #include "verify.h" #ifdef WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include # include "stat-w32.h" #endif #ifdef WINDOWS_NATIVE /* Return TRUE if the given file name denotes an UNC root. */ static BOOL is_unc_root (const char *rname) { /* Test whether it has the syntax '\\server\share'. */ if (ISSLASH (rname[0]) && ISSLASH (rname[1])) { /* It starts with two slashes. Find the next slash. */ const char *p = rname + 2; const char *q = p; while (*q != '\0' && !ISSLASH (*q)) q++; if (q > p && *q != '\0') { /* Found the next slash at q. */ q++; const char *r = q; while (*r != '\0' && !ISSLASH (*r)) r++; if (r > q && *r == '\0') return TRUE; } } return FALSE; } #endif /* Store information about NAME into ST. Work around bugs with trailing slashes. Mingw has other bugs (such as st_ino always being 0 on success) which this wrapper does not work around. But at least this implementation provides the ability to emulate fchdir correctly. */ int rpl_stat (char const *name, struct stat *buf) { #ifdef WINDOWS_NATIVE /* Fill the fields ourselves, because the original stat function returns values for st_atime, st_mtime, st_ctime that depend on the current time zone. See */ /* XXX Should we convert to wchar_t* and prepend '\\?\', in order to work around length limitations ? */ /* POSIX specifies: "More than two leading characters shall be treated as a single character." */ if (ISSLASH (name[0]) && ISSLASH (name[1]) && ISSLASH (name[2])) { name += 2; while (ISSLASH (name[1])) name++; } size_t len = strlen (name); size_t drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); /* Remove trailing slashes (except the very first one, at position drive_prefix_len), but remember their presence. */ size_t rlen; bool check_dir = false; rlen = len; while (rlen > drive_prefix_len && ISSLASH (name[rlen-1])) { check_dir = true; if (rlen == drive_prefix_len + 1) break; rlen--; } /* Handle '' and 'C:'. */ if (!check_dir && rlen == drive_prefix_len) { errno = ENOENT; return -1; } /* Handle '\\'. */ if (rlen == 1 && ISSLASH (name[0]) && len >= 2) { errno = ENOENT; return -1; } const char *rname; char *malloca_rname; if (rlen == len) { rname = name; malloca_rname = NULL; } else { malloca_rname = malloca (rlen + 1); if (malloca_rname == NULL) { errno = ENOMEM; return -1; } memcpy (malloca_rname, name, rlen); malloca_rname[rlen] = '\0'; rname = malloca_rname; } /* There are two ways to get at the requested information: - by scanning the parent directory and examining the relevant directory entry, - by opening the file directly. The first approach fails for root directories (e.g. 'C:\') and UNC root directories (e.g. '\\server\share'). The second approach fails for some system files (e.g. 'C:\pagefile.sys' and 'C:\hiberfil.sys'): ERROR_SHARING_VIOLATION. The second approach gives more information (in particular, correct st_dev, st_ino, st_nlink fields). So we use the second approach and, as a fallback except for root and UNC root directories, also the first approach. */ { int ret; { /* Approach based on the file. */ /* Open a handle to the file. CreateFile */ HANDLE h = CreateFile (rname, FILE_READ_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, /* FILE_FLAG_POSIX_SEMANTICS (treat file names that differ only in case as different) makes sense only when applied to *all* filesystem operations. */ FILE_FLAG_BACKUP_SEMANTICS /* | FILE_FLAG_POSIX_SEMANTICS */, NULL); if (h != INVALID_HANDLE_VALUE) { ret = _gl_fstat_by_handle (h, rname, buf); CloseHandle (h); goto done; } } /* Test for root and UNC root directories. */ if ((rlen == drive_prefix_len + 1 && ISSLASH (rname[drive_prefix_len])) || is_unc_root (rname)) goto failed; /* Fallback. */ { /* Approach based on the directory entry. */ if (strchr (rname, '?') != NULL || strchr (rname, '*') != NULL) { /* Other Windows API functions would fail with error ERROR_INVALID_NAME. */ if (malloca_rname != NULL) freea (malloca_rname); errno = ENOENT; return -1; } /* Get the details about the directory entry. This can be done through FindFirstFile or through FindFirstFileEx with argument FindExInfoBasic */ WIN32_FIND_DATA info; HANDLE h = FindFirstFile (rname, &info); if (h == INVALID_HANDLE_VALUE) goto failed; /* Test for error conditions before starting to fill *buf. */ if (sizeof (buf->st_size) <= 4 && info.nFileSizeHigh > 0) { FindClose (h); if (malloca_rname != NULL) freea (malloca_rname); errno = EOVERFLOW; return -1; } # if _GL_WINDOWS_STAT_INODES buf->st_dev = 0; # if _GL_WINDOWS_STAT_INODES == 2 buf->st_ino._gl_ino[0] = buf->st_ino._gl_ino[1] = 0; # else /* _GL_WINDOWS_STAT_INODES == 1 */ buf->st_ino = 0; # endif # else /* st_ino is not wide enough for identifying a file on a device. Without st_ino, st_dev is pointless. */ buf->st_dev = 0; buf->st_ino = 0; # endif /* st_mode. */ unsigned int mode = /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) | S_IREAD_UGO | ((info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE_UGO); if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { /* Determine whether the file is executable by looking at the file name suffix. */ if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0) { const char *last_dot = NULL; const char *p; for (p = info.cFileName; *p != '\0'; p++) if (*p == '.') last_dot = p; if (last_dot != NULL) { const char *suffix = last_dot + 1; if (_stricmp (suffix, "exe") == 0 || _stricmp (suffix, "bat") == 0 || _stricmp (suffix, "cmd") == 0 || _stricmp (suffix, "com") == 0) mode |= S_IEXEC_UGO; } } } buf->st_mode = mode; /* st_nlink. Ignore hard links here. */ buf->st_nlink = 1; /* There's no easy way to map the Windows SID concept to an integer. */ buf->st_uid = 0; buf->st_gid = 0; /* st_rdev is irrelevant for normal files and directories. */ buf->st_rdev = 0; /* st_size. */ if (sizeof (buf->st_size) <= 4) /* Range check already done above. */ buf->st_size = info.nFileSizeLow; else buf->st_size = ((long long) info.nFileSizeHigh << 32) | (long long) info.nFileSizeLow; /* st_atime, st_mtime, st_ctime. */ # if _GL_WINDOWS_STAT_TIMESPEC buf->st_atim = _gl_convert_FILETIME_to_timespec (&info.ftLastAccessTime); buf->st_mtim = _gl_convert_FILETIME_to_timespec (&info.ftLastWriteTime); buf->st_ctim = _gl_convert_FILETIME_to_timespec (&info.ftCreationTime); # else buf->st_atime = _gl_convert_FILETIME_to_POSIX (&info.ftLastAccessTime); buf->st_mtime = _gl_convert_FILETIME_to_POSIX (&info.ftLastWriteTime); buf->st_ctime = _gl_convert_FILETIME_to_POSIX (&info.ftCreationTime); # endif FindClose (h); ret = 0; } done: if (ret >= 0 && check_dir && !S_ISDIR (buf->st_mode)) { errno = ENOTDIR; ret = -1; } if (malloca_rname != NULL) { int saved_errno = errno; freea (malloca_rname); errno = saved_errno; } return ret; } failed: { DWORD error = GetLastError (); #if 0 fprintf (stderr, "rpl_stat error 0x%x\n", (unsigned int) error); #endif if (malloca_rname != NULL) freea (malloca_rname); switch (error) { /* Some of these errors probably cannot happen with the specific flags that we pass to CreateFile. But who knows... */ case ERROR_FILE_NOT_FOUND: /* The last component of rname does not exist. */ case ERROR_PATH_NOT_FOUND: /* Some directory component in rname does not exist. */ case ERROR_BAD_PATHNAME: /* rname is such as '\\server'. */ case ERROR_BAD_NET_NAME: /* rname is such as '\\server\nonexistentshare'. */ case ERROR_INVALID_NAME: /* rname contains wildcards, misplaced colon, etc. */ case ERROR_DIRECTORY: errno = ENOENT; break; case ERROR_ACCESS_DENIED: /* rname is such as 'C:\System Volume Information\foo'. */ case ERROR_SHARING_VIOLATION: /* rname is such as 'C:\pagefile.sys' (second approach only). */ /* XXX map to EACCESS or EPERM? */ errno = EACCES; break; case ERROR_OUTOFMEMORY: errno = ENOMEM; break; case ERROR_WRITE_PROTECT: errno = EROFS; break; case ERROR_WRITE_FAULT: case ERROR_READ_FAULT: case ERROR_GEN_FAILURE: errno = EIO; break; case ERROR_BUFFER_OVERFLOW: case ERROR_FILENAME_EXCED_RANGE: errno = ENAMETOOLONG; break; case ERROR_DELETE_PENDING: /* XXX map to EACCESS or EPERM? */ errno = EPERM; break; default: errno = EINVAL; break; } return -1; } #else int result = orig_stat (name, buf); # if REPLACE_FUNC_STAT_FILE /* Solaris 9 mistakenly succeeds when given a non-directory with a trailing slash. */ if (result == 0 && !S_ISDIR (buf->st_mode)) { size_t len = strlen (name); if (ISSLASH (name[len - 1])) { errno = ENOTDIR; return -1; } } # endif /* REPLACE_FUNC_STAT_FILE */ return result; #endif } pspp-1.0.1/gl/intprops.h0000644000175000017500000005065113124536242012056 00000000000000/* intprops.h -- properties of integer types Copyright (C) 2001-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paul Eggert. */ #ifndef _GL_INTPROPS_H #define _GL_INTPROPS_H #include /* Return a value with the common real type of E and V and the value of V. */ #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see . */ #define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v)) /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ /* True if the arithmetic type T is an integer type. bool counts as an integer. */ #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) /* True if the real type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* Return 1 if the real expression E, after promotion, has a signed or floating type. */ #define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) /* Minimum and maximum values for integer types and expressions. */ /* The width in bits of the integer type or expression T. Padding bits are not supported; this is checked at compile-time below. */ #define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) /* The maximum and minimum values for the integer type T. */ #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) #define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) /* The maximum and minimum values for the type of the expression E, after integer promotion. E should not have side effects. */ #define _GL_INT_MINIMUM(e) \ (EXPR_SIGNED (e) \ ? ~ _GL_SIGNED_INT_MAXIMUM (e) \ : _GL_INT_CONVERT (e, 0)) #define _GL_INT_MAXIMUM(e) \ (EXPR_SIGNED (e) \ ? _GL_SIGNED_INT_MAXIMUM (e) \ : _GL_INT_NEGATE_CONVERT (e, 1)) #define _GL_SIGNED_INT_MAXIMUM(e) \ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) /* Work around OpenVMS incompatibility with C99. */ #if !defined LLONG_MAX && defined __INT64_MAX # define LLONG_MAX __INT64_MAX # define LLONG_MIN __INT64_MIN #endif /* This include file assumes that signed types are two's complement without padding bits; the above macros have undefined behavior otherwise. If this is a problem for you, please let us know how to fix it for your host. This assumption is tested by the intprops-tests module. */ /* Does the __typeof__ keyword work? This could be done by 'configure', but for now it's easier to do it by hand. */ #if (2 <= __GNUC__ \ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ || (0x5110 <= __SUNPRO_C && !__STDC__)) # define _GL_HAVE___TYPEOF__ 1 #else # define _GL_HAVE___TYPEOF__ 0 #endif /* Return 1 if the integer type or expression T might be signed. Return 0 if it is definitely unsigned. This macro does not evaluate its argument, and expands to an integer constant expression. */ #if _GL_HAVE___TYPEOF__ # define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t)) #else # define _GL_SIGNED_TYPE_OR_EXPR(t) 1 #endif /* Bound on length of the string representing an unsigned integer value representable in B bits. log10 (2.0) < 146/485. The smallest value of B where this bound is not tight is 2621. */ #define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) /* Bound on length of the string representing an integer type or expression T. Subtract 1 for the sign bit if T is signed, and then add 1 more for a minus sign if needed. Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is signed, this macro may overestimate the true bound by one byte when applied to unsigned types of size 2, 4, 16, ... bytes. */ #define INT_STRLEN_BOUND(t) \ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ + _GL_SIGNED_TYPE_OR_EXPR (t)) /* Bound on buffer size needed to represent an integer type or expression T, including the terminating null. */ #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) /* Range overflow checks. The INT__RANGE_OVERFLOW macros return 1 if the corresponding C operators might not yield numerically correct answers due to arithmetic overflow. They do not rely on undefined or implementation-defined behavior. Their implementations are simple and straightforward, but they are a bit harder to use than the INT__OVERFLOW macros described below. Example usage: long int i = ...; long int j = ...; if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX)) printf ("multiply would overflow"); else printf ("product is %ld", i * j); Restrictions on *_RANGE_OVERFLOW macros: These macros do not check for all possible numerical problems or undefined or unspecified behavior: they do not check for division by zero, for bad shift counts, or for shifting negative numbers. These macros may evaluate their arguments zero or multiple times, so the arguments should not have side effects. The arithmetic arguments (including the MIN and MAX arguments) must be of the same integer type after the usual arithmetic conversions, and the type must have minimum value MIN and maximum MAX. Unsigned types should use a zero MIN of the proper type. These macros are tuned for constant MIN and MAX. For commutative operations such as A + B, they are also tuned for constant B. */ /* Return 1 if A + B would overflow in [MIN,MAX] arithmetic. See above for restrictions. */ #define INT_ADD_RANGE_OVERFLOW(a, b, min, max) \ ((b) < 0 \ ? (a) < (min) - (b) \ : (max) - (b) < (a)) /* Return 1 if A - B would overflow in [MIN,MAX] arithmetic. See above for restrictions. */ #define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max) \ ((b) < 0 \ ? (max) + (b) < (a) \ : (a) < (min) + (b)) /* Return 1 if - A would overflow in [MIN,MAX] arithmetic. See above for restrictions. */ #define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \ ((min) < 0 \ ? (a) < - (max) \ : 0 < (a)) /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Avoid && and || as they tickle bugs in Sun C 5.11 2010/08/13 and other compilers; see . */ #define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \ ((b) < 0 \ ? ((a) < 0 \ ? (a) < (max) / (b) \ : (b) == -1 \ ? 0 \ : (min) / (b) < (a)) \ : (b) == 0 \ ? 0 \ : ((a) < 0 \ ? (a) < (min) / (b) \ : (max) / (b) < (a))) /* Return 1 if A / B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Do not check for division by zero. */ #define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max) \ ((min) < 0 && (b) == -1 && (a) < - (max)) /* Return 1 if A % B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Do not check for division by zero. Mathematically, % should never overflow, but on x86-like hosts INT_MIN % -1 traps, and the C standard permits this, so treat this as an overflow too. */ #define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max) \ INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max) /* Return 1 if A << B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Here, MIN and MAX are for A only, and B need not be of the same type as the other arguments. The C standard says that behavior is undefined for shifts unless 0 <= B < wordwidth, and that when A is negative then A << B has undefined behavior and A >> B has implementation-defined behavior, but do not check these other restrictions. */ #define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max) \ ((a) < 0 \ ? (a) < (min) >> (b) \ : (max) >> (b) < (a)) /* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ #if 5 <= __GNUC__ && !defined __ICC # define _GL_HAS_BUILTIN_OVERFLOW 1 #else # define _GL_HAS_BUILTIN_OVERFLOW 0 #endif /* True if __builtin_add_overflow_p (A, B, C) works. */ #define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) /* The _GL*_OVERFLOW macros have the same restrictions as the *_RANGE_OVERFLOW macros, except that they do not assume that operands (e.g., A and B) have the same type as MIN and MAX. Instead, they assume that the result (e.g., A + B) has that type. */ #if _GL_HAS_BUILTIN_OVERFLOW_P # define _GL_ADD_OVERFLOW(a, b, min, max) \ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) # define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) # define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) #else # define _GL_ADD_OVERFLOW(a, b, min, max) \ ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ : (a) < 0 ? (b) <= (a) + (b) \ : (b) < 0 ? (a) <= (a) + (b) \ : (a) + (b) < (b)) # define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ : (a) < 0 ? 1 \ : (b) < 0 ? (a) - (b) <= (a) \ : (a) < (b)) # define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) #endif #define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ : (a) < 0 ? (b) <= (a) + (b) - 1 \ : (b) < 0 && (a) + (b) <= (a)) #define _GL_REMAINDER_OVERFLOW(a, b, min, max) \ ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \ : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max)) /* Return a nonzero value if A is a mathematical multiple of B, where A is unsigned, B is negative, and MAX is the maximum value of A's type. A's type must be the same as (A % B)'s type. Normally (A % -B == 0) suffices, but things get tricky if -B would overflow. */ #define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) \ (((b) < -_GL_SIGNED_INT_MAXIMUM (b) \ ? (_GL_SIGNED_INT_MAXIMUM (b) == (max) \ ? (a) \ : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1)) \ : (a) % - (b)) \ == 0) /* Check for integer overflow, and report low order bits of answer. The INT__OVERFLOW macros return 1 if the corresponding C operators might not yield numerically correct answers due to arithmetic overflow. The INT__WRAPV macros also store the low-order bits of the answer. These macros work correctly on all known practical hosts, and do not rely on undefined behavior due to signed arithmetic overflow. Example usage, assuming A and B are long int: if (INT_MULTIPLY_OVERFLOW (a, b)) printf ("result would overflow\n"); else printf ("result is %ld (no overflow)\n", a * b); Example usage with WRAPV flavor: long int result; bool overflow = INT_MULTIPLY_WRAPV (a, b, &result); printf ("result is %ld (%s)\n", result, overflow ? "after overflow" : "no overflow"); Restrictions on these macros: These macros do not check for all possible numerical problems or undefined or unspecified behavior: they do not check for division by zero, for bad shift counts, or for shifting negative numbers. These macros may evaluate their arguments zero or multiple times, so the arguments should not have side effects. The WRAPV macros are not constant expressions. They support only +, binary -, and *. The result type must be signed. These macros are tuned for their last argument being a constant. Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, A % B, and A << B would overflow, respectively. */ #define INT_ADD_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) #define INT_SUBTRACT_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) #if _GL_HAS_BUILTIN_OVERFLOW_P # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) #else # define INT_NEGATE_OVERFLOW(a) \ INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) #endif #define INT_MULTIPLY_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) #define INT_DIVIDE_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW) #define INT_REMAINDER_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW) #define INT_LEFT_SHIFT_OVERFLOW(a, b) \ INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \ _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) /* Return 1 if the expression A B would overflow, where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test, assuming MIN and MAX are the minimum and maximum for the result type. Arguments should be free of side effects. */ #define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \ op_result_overflow (a, b, \ _GL_INT_MINIMUM (0 * (b) + (a)), \ _GL_INT_MAXIMUM (0 * (b) + (a))) /* Store the low-order bits of A + B, A - B, A * B, respectively, into *R. Return 1 if the result overflows. See above for restrictions. */ #define INT_ADD_WRAPV(a, b, r) \ _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW) #define INT_SUBTRACT_WRAPV(a, b, r) \ _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW) #define INT_MULTIPLY_WRAPV(a, b, r) \ _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 https://llvm.org/bugs/show_bug.cgi?id=25390 For now, assume all versions of GCC-like compilers generate bogus warnings for _Generic. This matters only for older compilers that lack __builtin_add_overflow. */ #if __GNUC__ # define _GL__GENERIC_BOGUS 1 #else # define _GL__GENERIC_BOGUS 0 #endif /* Store the low-order bits of A B into *R, where OP specifies the operation. BUILTIN is the builtin operation, and OVERFLOW the overflow predicate. Return 1 if the result overflows. See above for restrictions. */ #if _GL_HAS_BUILTIN_OVERFLOW # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ (_Generic \ (*(r), \ signed char: \ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ signed char, SCHAR_MIN, SCHAR_MAX), \ short int: \ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ short int, SHRT_MIN, SHRT_MAX), \ int: \ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ int, INT_MIN, INT_MAX), \ long int: \ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ long int, LONG_MIN, LONG_MAX), \ long long int: \ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ long long int, LLONG_MIN, LLONG_MAX))) #else # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ (sizeof *(r) == sizeof (signed char) \ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ signed char, SCHAR_MIN, SCHAR_MAX) \ : sizeof *(r) == sizeof (short int) \ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ short int, SHRT_MIN, SHRT_MAX) \ : sizeof *(r) == sizeof (int) \ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ int, INT_MIN, INT_MAX) \ : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) # ifdef LLONG_MAX # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ (sizeof *(r) == sizeof (long int) \ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ long int, LONG_MIN, LONG_MAX) \ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ long long int, LLONG_MIN, LLONG_MAX)) # else # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ long int, LONG_MIN, LONG_MAX) # endif #endif /* Store the low-order bits of A B into *R, where the operation is given by OP. Use the unsigned type UT for calculation to avoid overflow problems. *R's type is T, with extrema TMIN and TMAX. T must be a signed integer type. Return 1 if the result overflows. */ #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ (sizeof ((a) op (b)) < sizeof (t) \ ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \ : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax)) #define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \ ((overflow (a, b) \ || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ || (tmax) < ((a) op (b))) \ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0)) /* Return the low-order bits of A B, where the operation is given by OP. Use the unsigned type UT for calculation to avoid undefined behavior on signed integer overflow, and convert the result to type T. UT is at least as wide as T and is no narrower than unsigned int, T is two's complement, and there is no padding or trap representations. Assume that converting UT to T yields the low-order bits, as is done in all known two's-complement C compilers. E.g., see: https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html According to the C standard, converting UT to T yields an implementation-defined result or signal for values outside T's range. However, code that works around this theoretical problem runs afoul of a compiler bug in Oracle Studio 12.3 x86. See: http://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00049.html As the compiler bug is real, don't try to work around the theoretical problem. */ #define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \ ((t) ((ut) (a) op (ut) (b))) #endif /* _GL_INTPROPS_H */ pspp-1.0.1/gl/config.charset0000644000175000017500000005473613124536241012656 00000000000000#! /bin/sh # Output a system dependent table of character encoding aliases. # # Copyright (C) 2000-2004, 2006-2017 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, 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 . # # The table consists of lines of the form # ALIAS CANONICAL # # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". # ALIAS is compared in a case sensitive way. # # CANONICAL is the GNU canonical name for this character encoding. # It must be an encoding supported by libiconv. Support by GNU libc is # also desirable. CANONICAL is case insensitive. Usually an upper case # MIME charset name is preferred. # The current list of GNU canonical charset names is as follows. # # name MIME? used by which systems # (darwin = Mac OS X, woe32 = native Windows) # # ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin # ISO-8859-3 Y glibc solaris cygwin # ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin # ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin # ISO-8859-6 Y glibc aix hpux solaris cygwin # ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin # ISO-8859-8 Y glibc aix hpux osf solaris cygwin # ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin # ISO-8859-13 glibc netbsd openbsd darwin cygwin # ISO-8859-14 glibc cygwin # ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin # KOI8-R Y glibc solaris freebsd netbsd openbsd darwin # KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin # KOI8-T glibc # CP437 dos # CP775 dos # CP850 aix osf dos # CP852 dos # CP855 dos # CP856 aix # CP857 dos # CP861 dos # CP862 dos # CP864 dos # CP865 dos # CP866 freebsd netbsd openbsd darwin dos # CP869 dos # CP874 woe32 dos # CP922 aix # CP932 aix cygwin woe32 dos # CP943 aix # CP949 osf darwin woe32 dos # CP950 woe32 dos # CP1046 aix # CP1124 aix # CP1125 dos # CP1129 aix # CP1131 darwin # CP1250 woe32 # CP1251 glibc solaris netbsd openbsd darwin cygwin woe32 # CP1252 aix woe32 # CP1253 woe32 # CP1254 woe32 # CP1255 glibc woe32 # CP1256 woe32 # CP1257 woe32 # GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin # EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin # EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin # EUC-TW glibc aix hpux irix osf solaris netbsd # BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin # BIG5-HKSCS glibc solaris darwin # GBK glibc aix osf solaris darwin cygwin woe32 dos # GB18030 glibc solaris netbsd darwin # SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin # JOHAB glibc solaris woe32 # TIS-620 glibc aix hpux osf solaris cygwin # VISCII Y glibc # TCVN5712-1 glibc # ARMSCII-8 glibc darwin # GEORGIAN-PS glibc cygwin # PT154 glibc # HP-ROMAN8 hpux # HP-ARABIC8 hpux # HP-GREEK8 hpux # HP-HEBREW8 hpux # HP-TURKISH8 hpux # HP-KANA8 hpux # DEC-KANJI osf # DEC-HANYU osf # UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin # # Note: Names which are not marked as being a MIME name should not be used in # Internet protocols for information interchange (mail, news, etc.). # # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications # must understand both names and treat them as equivalent. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM host="$1" os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` echo "# This file contains a table of character encoding aliases," echo "# suitable for operating system '${os}'." echo "# It was automatically generated from config.charset." # List of references, updated during installation: echo "# Packages using this file: " case "$os" in linux-gnulibc1*) # Linux libc5 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" echo "POSIX ASCII" for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ sv_FI sv_SE; do echo "$l ISO-8859-1" echo "$l.iso-8859-1 ISO-8859-1" echo "$l.iso-8859-15 ISO-8859-15" echo "$l.iso-8859-15@euro ISO-8859-15" echo "$l@euro ISO-8859-15" echo "$l.cp-437 CP437" echo "$l.cp-850 CP850" echo "$l.cp-1252 CP1252" echo "$l.cp-1252@euro CP1252" #echo "$l.atari-st ATARI-ST" # not a commonly used encoding echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ sl_SI sr sr_CS sr_YU; do echo "$l ISO-8859-2" echo "$l.iso-8859-2 ISO-8859-2" echo "$l.cp-852 CP852" echo "$l.cp-1250 CP1250" echo "$l.utf-8 UTF-8" done for l in mk mk_MK ru ru_RU; do echo "$l ISO-8859-5" echo "$l.iso-8859-5 ISO-8859-5" echo "$l.koi8-r KOI8-R" echo "$l.cp-866 CP866" echo "$l.cp-1251 CP1251" echo "$l.utf-8 UTF-8" done for l in ar ar_SA; do echo "$l ISO-8859-6" echo "$l.iso-8859-6 ISO-8859-6" echo "$l.cp-864 CP864" #echo "$l.cp-868 CP868" # not a commonly used encoding echo "$l.cp-1256 CP1256" echo "$l.utf-8 UTF-8" done for l in el el_GR gr gr_GR; do echo "$l ISO-8859-7" echo "$l.iso-8859-7 ISO-8859-7" echo "$l.cp-869 CP869" echo "$l.cp-1253 CP1253" echo "$l.cp-1253@euro CP1253" echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in he he_IL iw iw_IL; do echo "$l ISO-8859-8" echo "$l.iso-8859-8 ISO-8859-8" echo "$l.cp-862 CP862" echo "$l.cp-1255 CP1255" echo "$l.utf-8 UTF-8" done for l in tr tr_TR; do echo "$l ISO-8859-9" echo "$l.iso-8859-9 ISO-8859-9" echo "$l.cp-857 CP857" echo "$l.cp-1254 CP1254" echo "$l.utf-8 UTF-8" done for l in lt lt_LT lv lv_LV; do #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name echo "$l ISO-8859-13" done for l in ru_UA uk uk_UA; do echo "$l KOI8-U" done for l in zh zh_CN; do #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name echo "$l GB2312" done for l in ja ja_JP ja_JP.EUC; do echo "$l EUC-JP" done for l in ko ko_KR; do echo "$l EUC-KR" done for l in th th_TH; do echo "$l TIS-620" done for l in fa fa_IR; do #echo "$l ISIRI-3342" # a broken encoding echo "$l.utf-8 UTF-8" done ;; linux* | *-gnu*) # With glibc-2.1 or newer, we don't need any canonicalization, # because glibc has iconv and both glibc and libiconv support all # GNU canonical names directly. Therefore, the Makefile does not # need to install the alias file at all. # The following applies only to glibc-2.0.x and older libcs. echo "ISO_646.IRV:1983 ASCII" ;; aix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "IBM-850 CP850" echo "IBM-856 CP856" echo "IBM-921 ISO-8859-13" echo "IBM-922 CP922" echo "IBM-932 CP932" echo "IBM-943 CP943" echo "IBM-1046 CP1046" echo "IBM-1124 CP1124" echo "IBM-1129 CP1129" echo "IBM-1252 CP1252" echo "IBM-eucCN GB2312" echo "IBM-eucJP EUC-JP" echo "IBM-eucKR EUC-KR" echo "IBM-eucTW EUC-TW" echo "big5 BIG5" echo "GBK GBK" echo "TIS-620 TIS-620" echo "UTF-8 UTF-8" ;; hpux*) echo "iso88591 ISO-8859-1" echo "iso88592 ISO-8859-2" echo "iso88595 ISO-8859-5" echo "iso88596 ISO-8859-6" echo "iso88597 ISO-8859-7" echo "iso88598 ISO-8859-8" echo "iso88599 ISO-8859-9" echo "iso885915 ISO-8859-15" echo "roman8 HP-ROMAN8" echo "arabic8 HP-ARABIC8" echo "greek8 HP-GREEK8" echo "hebrew8 HP-HEBREW8" echo "turkish8 HP-TURKISH8" echo "kana8 HP-KANA8" echo "tis620 TIS-620" echo "big5 BIG5" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "hp15CN GB2312" #echo "ccdc ?" # what is this? echo "SJIS SHIFT_JIS" echo "utf8 UTF-8" ;; irix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" ;; osf*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "cp850 CP850" echo "big5 BIG5" echo "dechanyu DEC-HANYU" echo "dechanzi GB2312" echo "deckanji DEC-KANJI" echo "deckorean EUC-KR" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "GBK GBK" echo "KSC5601 CP949" echo "sdeckanji EUC-JP" echo "SJIS SHIFT_JIS" echo "TACTIS TIS-620" echo "UTF-8 UTF-8" ;; solaris*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-3 ISO-8859-3" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "koi8-r KOI8-R" echo "ansi-1251 CP1251" echo "BIG5 BIG5" echo "Big5-HKSCS BIG5-HKSCS" echo "gb2312 GB2312" echo "GBK GBK" echo "GB18030 GB18030" echo "cns11643 EUC-TW" echo "5601 EUC-KR" echo "ko_KR.johap92 JOHAB" echo "eucJP EUC-JP" echo "PCK SHIFT_JIS" echo "TIS620.2533 TIS-620" #echo "sun_eu_greek ?" # what is this? echo "UTF-8 UTF-8" ;; freebsd*) # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" echo "US-ASCII ASCII" for l in la_LN lt_LN; do echo "$l.ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do echo "$l.ISO_8859-1 ISO-8859-1" echo "$l.DIS_8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do echo "$l.ISO_8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO_8859-4 ISO-8859-4" done for l in ru_RU ru_SU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO_8859-5 ISO-8859-5" echo "$l.CP866 CP866" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ja_JP.Shift_JIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; netbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "BIG5 BIG5" echo "SJIS SHIFT_JIS" ;; openbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" ;; darwin[56]*) # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" for l in en_AU en_CA en_GB en_US la_LN; do echo "$l.US-ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ nl_NL no_NO pt_PT sv_SE; do echo "$l ISO-8859-1" echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in la_LN; do echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do echo "$l.ISO8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO8859-4 ISO-8859-4" done for l in ru_RU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO8859-5 ISO-8859-5" echo "$l.CP866 CP866" done for l in bg_BG; do echo "$l.CP1251 CP1251" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; darwin*) # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is # useless: # - It returns the empty string when LANG is set to a locale of the # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 # LC_CTYPE file. # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. # - The documentation says: # "... all code that calls BSD system routines should ensure # that the const *char parameters of these routines are in UTF-8 # encoding. All BSD system functions expect their string # parameters to be in UTF-8 encoding and nothing else." # It also says # "An additional caveat is that string parameters for files, # paths, and other file-system entities must be in canonical # UTF-8. In a canonical UTF-8 Unicode string, all decomposable # characters are decomposed ..." # but this is not true: You can pass non-decomposed UTF-8 strings # to file system functions, and it is the OS which will convert # them to decomposed UTF-8 before accessing the file system. # - The Apple Terminal application displays UTF-8 by default. # - However, other applications are free to use different encodings: # - xterm uses ISO-8859-1 by default. # - TextEdit uses MacRoman by default. # We prefer UTF-8 over decomposed UTF-8-MAC because one should # minimize the use of decomposed Unicode. Unfortunately, through the # Darwin file system, decomposed UTF-8 strings are leaked into user # space nevertheless. # Then there are also the locales with encodings other than US-ASCII # and UTF-8. These locales can be occasionally useful to users (e.g. # when grepping through ISO-8859-1 encoded text files), when all their # file names are in US-ASCII. echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "KOI8-R KOI8-R" echo "KOI8-U KOI8-U" echo "CP866 CP866" echo "CP949 CP949" echo "CP1131 CP1131" echo "CP1251 CP1251" echo "eucCN GB2312" echo "GB2312 GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "Big5 BIG5" echo "Big5HKSCS BIG5-HKSCS" echo "GBK GBK" echo "GB18030 GB18030" echo "SJIS SHIFT_JIS" echo "ARMSCII-8 ARMSCII-8" echo "PT154 PT154" #echo "ISCII-DEV ?" echo "* UTF-8" ;; beos* | haiku*) # BeOS and Haiku have a single locale, and it has UTF-8 encoding. echo "* UTF-8" ;; msdosdjgpp*) # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "#" echo "# The encodings given here may not all be correct." echo "# If you find that the encoding given for your language and" echo "# country is not the one your DOS machine actually uses, just" echo "# correct it in this file, and send a mail to" echo "# Juan Manuel Guerrero " echo "# and Bruno Haible ." echo "#" echo "C ASCII" # ISO-8859-1 languages echo "ca CP850" echo "ca_ES CP850" echo "da CP865" # not CP850 ?? echo "da_DK CP865" # not CP850 ?? echo "de CP850" echo "de_AT CP850" echo "de_CH CP850" echo "de_DE CP850" echo "en CP850" echo "en_AU CP850" # not CP437 ?? echo "en_CA CP850" echo "en_GB CP850" echo "en_NZ CP437" echo "en_US CP437" echo "en_ZA CP850" # not CP437 ?? echo "es CP850" echo "es_AR CP850" echo "es_BO CP850" echo "es_CL CP850" echo "es_CO CP850" echo "es_CR CP850" echo "es_CU CP850" echo "es_DO CP850" echo "es_EC CP850" echo "es_ES CP850" echo "es_GT CP850" echo "es_HN CP850" echo "es_MX CP850" echo "es_NI CP850" echo "es_PA CP850" echo "es_PY CP850" echo "es_PE CP850" echo "es_SV CP850" echo "es_UY CP850" echo "es_VE CP850" echo "et CP850" echo "et_EE CP850" echo "eu CP850" echo "eu_ES CP850" echo "fi CP850" echo "fi_FI CP850" echo "fr CP850" echo "fr_BE CP850" echo "fr_CA CP850" echo "fr_CH CP850" echo "fr_FR CP850" echo "ga CP850" echo "ga_IE CP850" echo "gd CP850" echo "gd_GB CP850" echo "gl CP850" echo "gl_ES CP850" echo "id CP850" # not CP437 ?? echo "id_ID CP850" # not CP437 ?? echo "is CP861" # not CP850 ?? echo "is_IS CP861" # not CP850 ?? echo "it CP850" echo "it_CH CP850" echo "it_IT CP850" echo "lt CP775" echo "lt_LT CP775" echo "lv CP775" echo "lv_LV CP775" echo "nb CP865" # not CP850 ?? echo "nb_NO CP865" # not CP850 ?? echo "nl CP850" echo "nl_BE CP850" echo "nl_NL CP850" echo "nn CP865" # not CP850 ?? echo "nn_NO CP865" # not CP850 ?? echo "no CP865" # not CP850 ?? echo "no_NO CP865" # not CP850 ?? echo "pt CP850" echo "pt_BR CP850" echo "pt_PT CP850" echo "sv CP850" echo "sv_SE CP850" # ISO-8859-2 languages echo "cs CP852" echo "cs_CZ CP852" echo "hr CP852" echo "hr_HR CP852" echo "hu CP852" echo "hu_HU CP852" echo "pl CP852" echo "pl_PL CP852" echo "ro CP852" echo "ro_RO CP852" echo "sk CP852" echo "sk_SK CP852" echo "sl CP852" echo "sl_SI CP852" echo "sq CP852" echo "sq_AL CP852" echo "sr CP852" # CP852 or CP866 or CP855 ?? echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? # ISO-8859-3 languages echo "mt CP850" echo "mt_MT CP850" # ISO-8859-5 languages echo "be CP866" echo "be_BE CP866" echo "bg CP866" # not CP855 ?? echo "bg_BG CP866" # not CP855 ?? echo "mk CP866" # not CP855 ?? echo "mk_MK CP866" # not CP855 ?? echo "ru CP866" echo "ru_RU CP866" echo "uk CP1125" echo "uk_UA CP1125" # ISO-8859-6 languages echo "ar CP864" echo "ar_AE CP864" echo "ar_DZ CP864" echo "ar_EG CP864" echo "ar_IQ CP864" echo "ar_IR CP864" echo "ar_JO CP864" echo "ar_KW CP864" echo "ar_MA CP864" echo "ar_OM CP864" echo "ar_QA CP864" echo "ar_SA CP864" echo "ar_SY CP864" # ISO-8859-7 languages echo "el CP869" echo "el_GR CP869" # ISO-8859-8 languages echo "he CP862" echo "he_IL CP862" # ISO-8859-9 languages echo "tr CP857" echo "tr_TR CP857" # Japanese echo "ja CP932" echo "ja_JP CP932" # Chinese echo "zh_CN GBK" echo "zh_TW CP950" # not CP938 ?? # Korean echo "kr CP949" # not CP934 ?? echo "kr_KR CP949" # not CP934 ?? # Thai echo "th CP874" echo "th_TH CP874" # Other echo "eo CP850" echo "eo_EO CP850" ;; esac pspp-1.0.1/gl/regex_internal.c0000644000175000017500000013651113124536243013202 00000000000000/* Extended regular expression matching and search library. Copyright (C) 2002-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ static void re_string_construct_common (const char *str, Idx len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) internal_function; static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, re_hashval_t hash) internal_function; static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, re_hashval_t hash) internal_function; /* Functions for string operation. */ /* This function allocate the buffers. It is necessary to call re_string_reconstruct before using the object. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { reg_errcode_t ret; Idx init_buf_len; /* Ensure at least one character fits into the buffers. */ if (init_len < dfa->mb_cur_max) init_len = dfa->mb_cur_max; init_buf_len = (len + 1 < init_len) ? len + 1: init_len; re_string_construct_common (str, len, pstr, trans, icase, dfa); ret = re_string_realloc_buffers (pstr, init_buf_len); if (BE (ret != REG_NOERROR, 0)) return ret; pstr->word_char = dfa->word_char; pstr->word_ops_used = dfa->word_ops_used; pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; pstr->valid_raw_len = pstr->valid_len; return REG_NOERROR; } /* This function allocate the buffers, and initialize them. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_construct (re_string_t *pstr, const char *str, Idx len, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { reg_errcode_t ret; memset (pstr, '\0', sizeof (re_string_t)); re_string_construct_common (str, len, pstr, trans, icase, dfa); if (len > 0) { ret = re_string_realloc_buffers (pstr, len + 1); if (BE (ret != REG_NOERROR, 0)) return ret; } pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; if (icase) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; if (pstr->valid_raw_len >= len) break; if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) break; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; } } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (trans != NULL) re_string_translate_buffer (pstr); else { pstr->valid_len = pstr->bufs_len; pstr->valid_raw_len = pstr->bufs_len; } } } return REG_NOERROR; } /* Helper functions for re_string_allocate, and re_string_construct. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { wint_t *new_wcs; /* Avoid overflow in realloc. */ const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_buf_len, 0)) return REG_ESPACE; new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); if (BE (new_wcs == NULL, 0)) return REG_ESPACE; pstr->wcs = new_wcs; if (pstr->offsets != NULL) { Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); if (BE (new_offsets == NULL, 0)) return REG_ESPACE; pstr->offsets = new_offsets; } } #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) { unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, new_buf_len); if (BE (new_mbs == NULL, 0)) return REG_ESPACE; pstr->mbs = new_mbs; } pstr->bufs_len = new_buf_len; return REG_NOERROR; } static void internal_function re_string_construct_common (const char *str, Idx len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { pstr->raw_mbs = (const unsigned char *) str; pstr->len = len; pstr->raw_len = len; pstr->trans = trans; pstr->icase = icase; pstr->mbs_allocated = (trans != NULL || icase); pstr->mb_cur_max = dfa->mb_cur_max; pstr->is_utf8 = dfa->is_utf8; pstr->map_notascii = dfa->map_notascii; pstr->stop = pstr->len; pstr->raw_stop = pstr->stop; } #ifdef RE_ENABLE_I18N /* Build wide character buffer PSTR->WCS. If the byte sequence of the string are: (0), (1), (0), (1), Then wide character buffer will be: , WEOF , , WEOF , We use WEOF for padding, they indicate that the position isn't a first byte of a multibyte character. Note that this function assumes PSTR->VALID_LEN elements are already built and starts from PSTR->VALID_LEN. */ static void internal_function build_wcs_buffer (re_string_t *pstr) { #ifdef _LIBC unsigned char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else unsigned char buf[64]; #endif mbstate_t prev_st; Idx byte_idx, end_idx, remain_len; size_t mbclen; /* Build the buffers from pstr->valid_len to either pstr->len or pstr->bufs_len. */ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (byte_idx = pstr->valid_len; byte_idx < end_idx;) { wchar_t wc; const char *p; remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; /* Apply the translation if we need. */ if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -1 || mbclen == 0 || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0)) { /* We treat these cases as a singlebyte character. */ mbclen = 1; wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; if (BE (pstr->trans != NULL, 0)) wc = pstr->trans[wc]; pstr->cur_state = prev_st; } else if (BE (mbclen == (size_t) -2, 0)) { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } /* Write wide character and padding. */ pstr->wcs[byte_idx++] = wc; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; } /* Build wide character buffer PSTR->WCS like build_wcs_buffer, but for REG_ICASE. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ build_wcs_upper_buffer (re_string_t *pstr) { mbstate_t prev_st; Idx src_idx, byte_idx, end_idx, remain_len; size_t mbclen; #ifdef _LIBC char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else char buf[64]; #endif byte_idx = pstr->valid_len; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; /* The following optimization assumes that ASCII characters can be mapped to wide characters with a simple cast. */ if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) { while (byte_idx < end_idx) { wchar_t wc; if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) && mbsinit (&pstr->cur_state)) { /* In case of a singlebyte character. */ pstr->mbs[byte_idx] = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); /* The next step uses the assumption that wchar_t is encoded ASCII-safe: all ASCII values can be converted like this. */ pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; ++byte_idx; continue; } remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); if (BE (mbclen < (size_t) -2, 1)) { wchar_t wcu = __towupper (wc); if (wcu != wc) { size_t mbcdlen; mbcdlen = __wcrtomb (buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else { src_idx = byte_idx; goto offsets_needed; } } else memcpy (pstr->mbs + byte_idx, pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0 || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) { /* It is an invalid character, an incomplete character at the end of the string, or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr->mbs[byte_idx] = ch; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; return REG_NOERROR; } else for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) { wchar_t wc; const char *p; offsets_needed: remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; buf[i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen < (size_t) -2, 1)) { wchar_t wcu = __towupper (wc); if (wcu != wc) { size_t mbcdlen; mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else if (mbcdlen != (size_t) -1) { size_t i; if (byte_idx + mbcdlen > pstr->bufs_len) { pstr->cur_state = prev_st; break; } if (pstr->offsets == NULL) { pstr->offsets = re_malloc (Idx, pstr->bufs_len); if (pstr->offsets == NULL) return REG_ESPACE; } if (!pstr->offsets_needed) { for (i = 0; i < (size_t) byte_idx; ++i) pstr->offsets[i] = i; pstr->offsets_needed = 1; } memcpy (pstr->mbs + byte_idx, buf, mbcdlen); pstr->wcs[byte_idx] = wcu; pstr->offsets[byte_idx] = src_idx; for (i = 1; i < mbcdlen; ++i) { pstr->offsets[byte_idx + i] = src_idx + (i < mbclen ? i : mbclen - 1); pstr->wcs[byte_idx + i] = WEOF; } pstr->len += mbcdlen - mbclen; if (pstr->raw_stop > src_idx) pstr->stop += mbcdlen - mbclen; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; byte_idx += mbcdlen; src_idx += mbclen; continue; } else memcpy (pstr->mbs + byte_idx, p, mbclen); } else memcpy (pstr->mbs + byte_idx, p, mbclen); if (BE (pstr->offsets_needed != 0, 0)) { size_t i; for (i = 0; i < mbclen; ++i) pstr->offsets[byte_idx + i] = src_idx + i; } src_idx += mbclen; pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0 || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) { /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans [ch]; pstr->mbs[byte_idx] = ch; if (BE (pstr->offsets_needed != 0, 0)) pstr->offsets[byte_idx] = src_idx; ++src_idx; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = src_idx; return REG_NOERROR; } /* Skip characters until the index becomes greater than NEW_RAW_IDX. Return the index. */ static Idx internal_function re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) { mbstate_t prev_st; Idx rawbuf_idx; size_t mbclen; wint_t wc = WEOF; /* Skip the characters which are not necessary to check. */ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; rawbuf_idx < new_raw_idx;) { wchar_t wc2; Idx remain_len = pstr->raw_len - rawbuf_idx; prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a single byte character. */ if (mbclen == 0 || remain_len == 0) wc = L'\0'; else wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); mbclen = 1; pstr->cur_state = prev_st; } else wc = wc2; /* Then proceed the next character. */ rawbuf_idx += mbclen; } *last_wc = wc; return rawbuf_idx; } #endif /* RE_ENABLE_I18N */ /* Build the buffer PSTR->MBS, and apply the translation if we need. This function is used in case of REG_ICASE. */ static void internal_function build_upper_buffer (re_string_t *pstr) { Idx char_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans[ch]; pstr->mbs[char_idx] = toupper (ch); } pstr->valid_len = char_idx; pstr->valid_raw_len = char_idx; } /* Apply TRANS to the buffer in PSTR. */ static void internal_function re_string_translate_buffer (re_string_t *pstr) { Idx buf_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; pstr->mbs[buf_idx] = pstr->trans[ch]; } pstr->valid_len = buf_idx; pstr->valid_raw_len = buf_idx; } /* This function re-construct the buffers. Concretely, convert to wide character in case of pstr->mb_cur_max > 1, convert to upper case in case of REG_ICASE, apply translation. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) { Idx offset; if (BE (pstr->raw_mbs_idx <= idx, 0)) offset = idx - pstr->raw_mbs_idx; else { /* Reset buffer. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); #endif /* RE_ENABLE_I18N */ pstr->len = pstr->raw_len; pstr->stop = pstr->raw_stop; pstr->valid_len = 0; pstr->raw_mbs_idx = 0; pstr->valid_raw_len = 0; pstr->offsets_needed = 0; pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (!pstr->mbs_allocated) pstr->mbs = (unsigned char *) pstr->raw_mbs; offset = idx; } if (BE (offset != 0, 1)) { /* Should the already checked characters be kept? */ if (BE (offset < pstr->valid_raw_len, 1)) { /* Yes, move them to the front of the buffer. */ #ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { Idx low = 0, high = pstr->valid_len, mid; do { mid = (high + low) / 2; if (pstr->offsets[mid] > offset) high = mid; else if (pstr->offsets[mid] < offset) low = mid + 1; else break; } while (low < high); if (pstr->offsets[mid] < offset) ++mid; pstr->tip_context = re_string_context_at (pstr, mid - 1, eflags); /* This can be quite complicated, so handle specially only the common and easy case where the character with different length representation of lower and upper case is present at or after offset. */ if (pstr->valid_len > offset && mid == offset && pstr->offsets[mid] == offset) { memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; for (low = 0; low < pstr->valid_len; low++) pstr->offsets[low] = pstr->offsets[low + offset] - offset; } else { /* Otherwise, just find out how long the partial multibyte character at offset is and fill it with WEOF/255. */ pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; while (mid > 0 && pstr->offsets[mid - 1] == offset) --mid; while (mid < pstr->valid_len) if (pstr->wcs[mid] != WEOF) break; else ++mid; if (mid == pstr->valid_len) pstr->valid_len = 0; else { pstr->valid_len = pstr->offsets[mid] - offset; if (pstr->valid_len) { for (low = 0; low < pstr->valid_len; ++low) pstr->wcs[low] = WEOF; memset (pstr->mbs, 255, pstr->valid_len); } } pstr->valid_raw_len = pstr->valid_len; } } else #endif { pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; #if defined DEBUG && DEBUG assert (pstr->valid_len > 0); #endif } } else { #ifdef RE_ENABLE_I18N /* No, skip all characters until IDX. */ Idx prev_valid_len = pstr->valid_len; if (BE (pstr->offsets_needed, 0)) { pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; } #endif pstr->valid_len = 0; #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { Idx wcs_idx; wint_t wc = WEOF; if (pstr->is_utf8) { const unsigned char *raw, *p, *end; /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; end = raw + (offset - pstr->mb_cur_max); if (end < pstr->raw_mbs) end = pstr->raw_mbs; p = raw + offset - 1; #ifdef _LIBC /* We know the wchar_t encoding is UCS4, so for the simple case, ASCII characters, skip the conversion step. */ if (isascii (*p) && BE (pstr->trans == NULL, 1)) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); /* pstr->valid_len = 0; */ wc = (wchar_t) *p; } else #endif for (; p >= end; --p) if ((*p & 0xc0) != 0x80) { mbstate_t cur_state; wchar_t wc2; Idx mlen = raw + pstr->len - p; unsigned char buf[6]; size_t mbclen; const unsigned char *pp = p; if (BE (pstr->trans != NULL, 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; pp = buf; } /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ memset (&cur_state, 0, sizeof (cur_state)); mbclen = __mbrtowc (&wc2, (const char *) pp, mlen, &cur_state); if (raw + offset - p <= mbclen && mbclen < (size_t) -2) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr->valid_len = mbclen - (raw + offset - p); wc = wc2; } break; } } if (wc == WEOF) pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; if (wc == WEOF) pstr->tip_context = re_string_context_at (pstr, prev_valid_len - 1, eflags); else pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) ? CONTEXT_WORD : ((IS_WIDE_NEWLINE (wc) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); if (BE (pstr->valid_len, 0)) { for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr->wcs[wcs_idx] = WEOF; if (pstr->mbs_allocated) memset (pstr->mbs, 255, pstr->valid_len); } pstr->valid_raw_len = pstr->valid_len; } else #endif /* RE_ENABLE_I18N */ { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; pstr->valid_raw_len = 0; if (pstr->trans) c = pstr->trans[c]; pstr->tip_context = (bitset_contain (pstr->word_char, c) ? CONTEXT_WORD : ((IS_NEWLINE (c) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); } } if (!BE (pstr->mbs_allocated, 0)) pstr->mbs += offset; } pstr->raw_mbs_idx = idx; pstr->len -= offset; pstr->stop -= offset; /* Then build the buffers. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { if (pstr->icase) { reg_errcode_t ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else build_wcs_buffer (pstr); } else #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) { if (pstr->icase) build_upper_buffer (pstr); else if (pstr->trans != NULL) re_string_translate_buffer (pstr); } else pstr->valid_len = pstr->len; pstr->cur_idx = 0; return REG_NOERROR; } static unsigned char internal_function __attribute__ ((pure)) re_string_peek_byte_case (const re_string_t *pstr, Idx idx) { int ch; Idx off; /* Handle the common (easiest) cases first. */ if (BE (!pstr->mbs_allocated, 1)) return re_string_peek_byte (pstr, idx); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1 && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) return re_string_peek_byte (pstr, idx); #endif off = pstr->cur_idx + idx; #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) off = pstr->offsets[off]; #endif ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; #ifdef RE_ENABLE_I18N /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I this function returns CAPITAL LETTER I instead of first byte of DOTLESS SMALL LETTER I. The latter would confuse the parser, since peek_byte_case doesn't advance cur_idx in any way. */ if (pstr->offsets_needed && !isascii (ch)) return re_string_peek_byte (pstr, idx); #endif return ch; } static unsigned char internal_function re_string_fetch_byte_case (re_string_t *pstr) { if (BE (!pstr->mbs_allocated, 1)) return re_string_fetch_byte (pstr); #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) { Idx off; int ch; /* For tr_TR.UTF-8 [[:islower:]] there is [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip in that case the whole multi-byte character and return the original letter. On the other side, with [[: DOTLESS SMALL LETTER I return [[:I, as doing anything else would complicate things too much. */ if (!re_string_first_byte (pstr, pstr->cur_idx)) return re_string_fetch_byte (pstr); off = pstr->offsets[pstr->cur_idx]; ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; if (! isascii (ch)) return re_string_fetch_byte (pstr); re_string_skip_bytes (pstr, re_string_char_size_at (pstr, pstr->cur_idx)); return ch; } #endif return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; } static void internal_function re_string_destruct (re_string_t *pstr) { #ifdef RE_ENABLE_I18N re_free (pstr->wcs); re_free (pstr->offsets); #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) re_free (pstr->mbs); } /* Return the context at IDX in INPUT. */ static unsigned int internal_function re_string_context_at (const re_string_t *input, Idx idx, int eflags) { int c; if (BE (idx < 0, 0)) /* In this case, we use the value stored in input->tip_context, since we can't know the character in input->mbs[-1] here. */ return input->tip_context; if (BE (idx == input->len, 0)) return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc; Idx wc_idx = idx; while(input->wcs[wc_idx] == WEOF) { #if defined DEBUG && DEBUG /* It must not happen. */ assert (wc_idx >= 0); #endif --wc_idx; if (wc_idx < 0) return input->tip_context; } wc = input->wcs[wc_idx]; if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) return CONTEXT_WORD; return (IS_WIDE_NEWLINE (wc) && input->newline_anchor ? CONTEXT_NEWLINE : 0); } else #endif { c = re_string_byte_at (input, idx); if (bitset_contain (input->word_char, c)) return CONTEXT_WORD; return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; } } /* Functions for set operation. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_alloc (re_node_set *set, Idx size) { set->alloc = size; set->nelem = 0; set->elems = re_malloc (Idx, size); if (BE (set->elems == NULL, 0) && (MALLOC_0_IS_NONNULL || size != 0)) return REG_ESPACE; return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_1 (re_node_set *set, Idx elem) { set->alloc = 1; set->nelem = 1; set->elems = re_malloc (Idx, 1); if (BE (set->elems == NULL, 0)) { set->alloc = set->nelem = 0; return REG_ESPACE; } set->elems[0] = elem; return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2) { set->alloc = 2; set->elems = re_malloc (Idx, 2); if (BE (set->elems == NULL, 0)) return REG_ESPACE; if (elem1 == elem2) { set->nelem = 1; set->elems[0] = elem1; } else { set->nelem = 2; if (elem1 < elem2) { set->elems[0] = elem1; set->elems[1] = elem2; } else { set->elems[0] = elem2; set->elems[1] = elem1; } } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_copy (re_node_set *dest, const re_node_set *src) { dest->nelem = src->nelem; if (src->nelem > 0) { dest->alloc = dest->nelem; dest->elems = re_malloc (Idx, dest->alloc); if (BE (dest->elems == NULL, 0)) { dest->alloc = dest->nelem = 0; return REG_ESPACE; } memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); } else re_node_set_init_empty (dest); return REG_NOERROR; } /* Calculate the intersection of the sets SRC1 and SRC2. And merge it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. Note: We assume dest->elems is NULL, when dest->alloc is 0. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { Idx i1, i2, is, id, delta, sbase; if (src1->nelem == 0 || src2->nelem == 0) return REG_NOERROR; /* We need dest->nelem + 2 * elems_in_intersection; this is a conservative estimate. */ if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) { Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc); if (BE (new_elems == NULL, 0)) return REG_ESPACE; dest->elems = new_elems; dest->alloc = new_alloc; } /* Find the items in the intersection of SRC1 and SRC2, and copy into the top of DEST those that are not already in DEST itself. */ sbase = dest->nelem + src1->nelem + src2->nelem; i1 = src1->nelem - 1; i2 = src2->nelem - 1; id = dest->nelem - 1; for (;;) { if (src1->elems[i1] == src2->elems[i2]) { /* Try to find the item in DEST. Maybe we could binary search? */ while (id >= 0 && dest->elems[id] > src1->elems[i1]) --id; if (id < 0 || dest->elems[id] != src1->elems[i1]) dest->elems[--sbase] = src1->elems[i1]; if (--i1 < 0 || --i2 < 0) break; } /* Lower the highest of the two items. */ else if (src1->elems[i1] < src2->elems[i2]) { if (--i2 < 0) break; } else { if (--i1 < 0) break; } } id = dest->nelem - 1; is = dest->nelem + src1->nelem + src2->nelem - 1; delta = is - sbase + 1; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place; this is more or less the same loop that is in re_node_set_merge. */ dest->nelem += delta; if (delta > 0 && id >= 0) for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (--id < 0) break; } } /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); return REG_NOERROR; } /* Calculate the union set of the sets SRC1 and SRC2. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_union (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { Idx i1, i2, id; if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) { dest->alloc = src1->nelem + src2->nelem; dest->elems = re_malloc (Idx, dest->alloc); if (BE (dest->elems == NULL, 0)) return REG_ESPACE; } else { if (src1 != NULL && src1->nelem > 0) return re_node_set_init_copy (dest, src1); else if (src2 != NULL && src2->nelem > 0) return re_node_set_init_copy (dest, src2); else re_node_set_init_empty (dest); return REG_NOERROR; } for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) { if (src1->elems[i1] > src2->elems[i2]) { dest->elems[id++] = src2->elems[i2++]; continue; } if (src1->elems[i1] == src2->elems[i2]) ++i2; dest->elems[id++] = src1->elems[i1++]; } if (i1 < src1->nelem) { memcpy (dest->elems + id, src1->elems + i1, (src1->nelem - i1) * sizeof (Idx)); id += src1->nelem - i1; } else if (i2 < src2->nelem) { memcpy (dest->elems + id, src2->elems + i2, (src2->nelem - i2) * sizeof (Idx)); id += src2->nelem - i2; } dest->nelem = id; return REG_NOERROR; } /* Calculate the union set of the sets DEST and SRC. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_merge (re_node_set *dest, const re_node_set *src) { Idx is, id, sbase, delta; if (src == NULL || src->nelem == 0) return REG_NOERROR; if (dest->alloc < 2 * src->nelem + dest->nelem) { Idx new_alloc = 2 * (src->nelem + dest->alloc); Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc); if (BE (new_buffer == NULL, 0)) return REG_ESPACE; dest->elems = new_buffer; dest->alloc = new_alloc; } if (BE (dest->nelem == 0, 0)) { dest->nelem = src->nelem; memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); return REG_NOERROR; } /* Copy into the top of DEST the items of SRC that are not found in DEST. Maybe we could binary search in DEST? */ for (sbase = dest->nelem + 2 * src->nelem, is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; ) { if (dest->elems[id] == src->elems[is]) is--, id--; else if (dest->elems[id] < src->elems[is]) dest->elems[--sbase] = src->elems[is--]; else /* if (dest->elems[id] > src->elems[is]) */ --id; } if (is >= 0) { /* If DEST is exhausted, the remaining items of SRC must be unique. */ sbase -= is + 1; memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx)); } id = dest->nelem - 1; is = dest->nelem + 2 * src->nelem - 1; delta = is - sbase + 1; if (delta == 0) return REG_NOERROR; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place. */ dest->nelem += delta; for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (--id < 0) { /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); break; } } } return REG_NOERROR; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have ELEM. Return true if successful. */ static bool internal_function __attribute_warn_unused_result__ re_node_set_insert (re_node_set *set, Idx elem) { Idx idx; /* In case the set is empty. */ if (set->alloc == 0) return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1); if (BE (set->nelem, 0) == 0) { /* We already guaranteed above that set->alloc != 0. */ set->elems[0] = elem; ++set->nelem; return true; } /* Realloc if we need. */ if (set->alloc == set->nelem) { Idx *new_elems; set->alloc = set->alloc * 2; new_elems = re_realloc (set->elems, Idx, set->alloc); if (BE (new_elems == NULL, 0)) return false; set->elems = new_elems; } /* Move the elements which follows the new element. Test the first element separately to skip a check in the inner loop. */ if (elem < set->elems[0]) { idx = 0; for (idx = set->nelem; idx > 0; idx--) set->elems[idx] = set->elems[idx - 1]; } else { for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) set->elems[idx] = set->elems[idx - 1]; } /* Insert the new element. */ set->elems[idx] = elem; ++set->nelem; return true; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have any element greater than or equal to ELEM. Return true if successful. */ static bool internal_function __attribute_warn_unused_result__ re_node_set_insert_last (re_node_set *set, Idx elem) { /* Realloc if we need. */ if (set->alloc == set->nelem) { Idx *new_elems; set->alloc = (set->alloc + 1) * 2; new_elems = re_realloc (set->elems, Idx, set->alloc); if (BE (new_elems == NULL, 0)) return false; set->elems = new_elems; } /* Insert the new element. */ set->elems[set->nelem++] = elem; return true; } /* Compare two node sets SET1 and SET2. Return true if SET1 and SET2 are equivalent. */ static bool internal_function __attribute__ ((pure)) re_node_set_compare (const re_node_set *set1, const re_node_set *set2) { Idx i; if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) return false; for (i = set1->nelem ; --i >= 0 ; ) if (set1->elems[i] != set2->elems[i]) return false; return true; } /* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ static Idx internal_function __attribute__ ((pure)) re_node_set_contains (const re_node_set *set, Idx elem) { __re_size_t idx, right, mid; if (set->nelem <= 0) return 0; /* Binary search the element. */ idx = 0; right = set->nelem - 1; while (idx < right) { mid = (idx + right) / 2; if (set->elems[mid] < elem) idx = mid + 1; else right = mid; } return set->elems[idx] == elem ? idx + 1 : 0; } static void internal_function re_node_set_remove_at (re_node_set *set, Idx idx) { if (idx < 0 || idx >= set->nelem) return; --set->nelem; for (; idx < set->nelem; idx++) set->elems[idx] = set->elems[idx + 1]; } /* Add the token TOKEN to dfa->nodes, and return the index of the token. Or return -1 if an error occurred. */ static Idx internal_function re_dfa_add_node (re_dfa_t *dfa, re_token_t token) { if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) { size_t new_nodes_alloc = dfa->nodes_alloc * 2; Idx *new_nexts, *new_indices; re_node_set *new_edests, *new_eclosures; re_token_t *new_nodes; /* Avoid overflows in realloc. */ const size_t max_object_size = MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), sizeof (Idx))); if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0)) return -1; new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); if (BE (new_nodes == NULL, 0)) return -1; dfa->nodes = new_nodes; new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); if (BE (new_nexts == NULL || new_indices == NULL || new_edests == NULL || new_eclosures == NULL, 0)) { re_free (new_nexts); re_free (new_indices); re_free (new_edests); re_free (new_eclosures); return -1; } dfa->nexts = new_nexts; dfa->org_indices = new_indices; dfa->edests = new_edests; dfa->eclosures = new_eclosures; dfa->nodes_alloc = new_nodes_alloc; } dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N dfa->nodes[dfa->nodes_len].accept_mb = ((token.type == OP_PERIOD && dfa->mb_cur_max > 1) || token.type == COMPLEX_BRACKET); #endif dfa->nexts[dfa->nodes_len] = -1; re_node_set_init_empty (dfa->edests + dfa->nodes_len); re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); return dfa->nodes_len++; } static re_hashval_t internal_function calc_state_hash (const re_node_set *nodes, unsigned int context) { re_hashval_t hash = nodes->nelem + context; Idx i; for (i = 0 ; i < nodes->nelem ; i++) hash += nodes->elems[i]; return hash; } /* Search for the state whose node_set is equivalent to NODES. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes) { re_hashval_t hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; Idx i; #if defined GCC_LINT || defined lint /* Suppress bogus uninitialized-variable warnings. */ *err = REG_NOERROR; #endif if (BE (nodes->nelem == 0, 0)) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, 0); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (hash != state->hash) continue; if (re_node_set_compare (&state->nodes, nodes)) return state; } /* There are no appropriate state in the dfa, create the new one. */ new_state = create_ci_newstate (dfa, nodes, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Search for the state whose node_set is equivalent to NODES and whose context is equivalent to CONTEXT. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context) { re_hashval_t hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; Idx i; #if defined GCC_LINT || defined lint /* Suppress bogus uninitialized-variable warnings. */ *err = REG_NOERROR; #endif if (nodes->nelem == 0) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, context); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (state->hash == hash && state->context == context && re_node_set_compare (state->entrance_nodes, nodes)) return state; } /* There are no appropriate state in 'dfa', create the new one. */ new_state = create_cd_newstate (dfa, nodes, context, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Finish initialization of the new state NEWSTATE, and using its hash value HASH put in the appropriate bucket of DFA's state table. Return value indicates the error code if failed. */ static reg_errcode_t __attribute_warn_unused_result__ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, re_hashval_t hash) { struct re_state_table_entry *spot; reg_errcode_t err; Idx i; newstate->hash = hash; err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < newstate->nodes.nelem; i++) { Idx elem = newstate->nodes.elems[i]; if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) if (! re_node_set_insert_last (&newstate->non_eps_nodes, elem)) return REG_ESPACE; } spot = dfa->state_table + (hash & dfa->state_hash_mask); if (BE (spot->alloc <= spot->num, 0)) { Idx new_alloc = 2 * spot->num + 2; re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; spot->array = new_array; spot->alloc = new_alloc; } spot->array[spot->num++] = newstate; return REG_NOERROR; } static void free_state (re_dfastate_t *state) { re_node_set_free (&state->non_eps_nodes); re_node_set_free (&state->inveclosure); if (state->entrance_nodes != &state->nodes) { re_node_set_free (state->entrance_nodes); re_free (state->entrance_nodes); } re_node_set_free (&state->nodes); re_free (state->word_trtable); re_free (state->trtable); re_free (state); } /* Create the new state which is independent of contexts. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, re_hashval_t hash) { Idx i; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (type == CHARACTER && !node->constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR || node->constraint) newstate->has_constraint = 1; } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } /* Create the new state which is depend on the context CONTEXT. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, re_hashval_t hash) { Idx i, nctx_nodes = 0; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->context = context; newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; if (type == CHARACTER && !constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; if (constraint) { if (newstate->entrance_nodes == &newstate->nodes) { newstate->entrance_nodes = re_malloc (re_node_set, 1); if (BE (newstate->entrance_nodes == NULL, 0)) { free_state (newstate); return NULL; } if (re_node_set_init_copy (newstate->entrance_nodes, nodes) != REG_NOERROR) return NULL; nctx_nodes = 0; newstate->has_constraint = 1; } if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) { re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); ++nctx_nodes; } } } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } pspp-1.0.1/gl/sprintf.c0000644000175000017500000000414413124536243011655 00000000000000/* Formatted output to strings. Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include #include #include #include #include #include #include "vasnprintf.h" #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif /* Print formatted output to string STR. Return string length of formatted string. On error, return a negative value. */ int sprintf (char *str, const char *format, ...) { char *output; size_t len; size_t lenbuf; va_list args; /* vasnprintf fails with EOVERFLOW when the buffer size argument is larger than INT_MAX (if that fits into a 'size_t' at all). Also note that glibc's iconv fails with E2BIG when we pass a length that is so large that str + lenbuf wraps around, i.e. (uintptr_t) (str + lenbuf) < (uintptr_t) str. Therefore set lenbuf = min (SIZE_MAX, INT_MAX, - (uintptr_t) str - 1). */ lenbuf = (SIZE_MAX < INT_MAX ? SIZE_MAX : INT_MAX); if (lenbuf > ~ (uintptr_t) str) lenbuf = ~ (uintptr_t) str; va_start (args, format); output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; va_end (args); if (!output) return -1; if (output != str) { /* len is near SIZE_MAX. */ free (output); errno = EOVERFLOW; return -1; } if (len > INT_MAX) { errno = EOVERFLOW; return -1; } return len; } pspp-1.0.1/gl/uninorm/0000755000175000017500000000000013150620334011562 500000000000000pspp-1.0.1/gl/uninorm/decomposition-table1.h0000644000175000017500000000104513020461275015700 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Decomposition of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ extern const unsigned char gl_uninorm_decomp_chars_table[]; #define decomp_header_0 10 #define decomp_header_1 191 #define decomp_header_2 5 #define decomp_header_3 31 #define decomp_header_4 31 typedef struct { int level1[191]; int level2[23 << 5]; unsigned short level3[277 << 5]; } decomp_index_table_t; extern const decomp_index_table_t gl_uninorm_decomp_index_table; pspp-1.0.1/gl/uninorm/decomposition-table.h0000644000175000017500000000345213124536243015626 00000000000000/* Decomposition of Unicode characters. Copyright (C) 2001-2003, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include "unitypes.h" /* The decomposition table is made of two parts: - A table containing the actual arrays of decomposed equivalents. (This table is separate because the maximum length of a decomposition is 18, much larger than the average length 1.497 of a decomposition). - A 3-level table of indices into this array. */ #include "decomposition-table1.h" static inline unsigned short decomp_index (ucs4_t uc) { unsigned int index1 = uc >> decomp_header_0; if (index1 < decomp_header_1) { int lookup1 = gl_uninorm_decomp_index_table.level1[index1]; if (lookup1 >= 0) { unsigned int index2 = (uc >> decomp_header_2) & decomp_header_3; int lookup2 = gl_uninorm_decomp_index_table.level2[lookup1 + index2]; if (lookup2 >= 0) { unsigned int index3 = uc & decomp_header_4; return gl_uninorm_decomp_index_table.level3[lookup2 + index3]; } } } return (unsigned short)(-1); } pspp-1.0.1/gl/uninorm/compat-decomposition.c0000644000175000017500000000202213124536243016005 00000000000000/* Compatibility decomposition of Unicode characters. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "decompose-internal.h" #include "uninorm.h" int uc_compat_decomposition (ucs4_t uc, ucs4_t *decomposition) { int tag; return uc_decomposition (uc, &tag, decomposition); } pspp-1.0.1/gl/uninorm/nfkd.c0000644000175000017500000000206113124536243012575 00000000000000/* Unicode Normalization Form KD. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "uninorm.h" #include "normalize-internal.h" #include "decompose-internal.h" const struct unicode_normalization_form uninorm_nfkd = { NF_IS_COMPAT_DECOMPOSING, uc_compat_decomposition, NULL, &uninorm_nfkd }; pspp-1.0.1/gl/uninorm/nfd.c0000644000175000017500000000177213124536243012432 00000000000000/* Unicode Normalization Form D. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "uninorm.h" #include "normalize-internal.h" const struct unicode_normalization_form uninorm_nfd = { 0, uc_canonical_decomposition, NULL, &uninorm_nfd }; pspp-1.0.1/gl/uninorm/decompose-internal.h0000644000175000017500000000252313124536243015453 00000000000000/* Decomposition of Unicode strings. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include #include "unitypes.h" /* Variant of uc_decomposition that does not produce the 'tag'. */ extern int uc_compat_decomposition (ucs4_t uc, ucs4_t *decomposition); /* A Unicode character together with its canonical combining class. */ struct ucs4_with_ccc { ucs4_t code; int ccc; /* range 0..255 */ }; /* Stable-sort an array of 'struct ucs4_with_ccc'. */ extern void gl_uninorm_decompose_merge_sort_inplace (struct ucs4_with_ccc *src, size_t n, struct ucs4_with_ccc *tmp); pspp-1.0.1/gl/uninorm/u-normalize-internal.h0000644000175000017500000003327513124536243015747 00000000000000/* Decomposition and composition of Unicode strings. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ UNIT * FUNC (uninorm_t nf, const UNIT *s, size_t n, UNIT *resultbuf, size_t *lengthp) { int (*decomposer) (ucs4_t uc, ucs4_t *decomposition) = nf->decomposer; ucs4_t (*composer) (ucs4_t uc1, ucs4_t uc2) = nf->composer; /* The result being accumulated. */ UNIT *result; size_t length; size_t allocated; /* The buffer for sorting. */ #define SORTBUF_PREALLOCATED 64 struct ucs4_with_ccc sortbuf_preallocated[2 * SORTBUF_PREALLOCATED]; struct ucs4_with_ccc *sortbuf; /* array of size 2 * sortbuf_allocated */ size_t sortbuf_allocated; size_t sortbuf_count; /* Initialize the accumulator. */ if (resultbuf == NULL) { result = NULL; allocated = 0; } else { result = resultbuf; allocated = *lengthp; } length = 0; /* Initialize the buffer for sorting. */ sortbuf = sortbuf_preallocated; sortbuf_allocated = SORTBUF_PREALLOCATED; sortbuf_count = 0; { const UNIT *s_end = s + n; for (;;) { int count; ucs4_t decomposed[UC_DECOMPOSITION_MAX_LENGTH]; int decomposed_count; int i; if (s < s_end) { /* Fetch the next character. */ count = U_MBTOUC_UNSAFE (&decomposed[0], s, s_end - s); decomposed_count = 1; /* Decompose it, recursively. It would be possible to precompute the recursive decomposition and store it in a table. But this would significantly increase the size of the decomposition tables, because for example for U+1FC1 the recursive canonical decomposition and the recursive compatibility decomposition are different. */ { int curr; for (curr = 0; curr < decomposed_count; ) { /* Invariant: decomposed[0..curr-1] is fully decomposed, i.e. all elements are atomic. */ ucs4_t curr_decomposed[UC_DECOMPOSITION_MAX_LENGTH]; int curr_decomposed_count; curr_decomposed_count = decomposer (decomposed[curr], curr_decomposed); if (curr_decomposed_count >= 0) { /* Move curr_decomposed[0..curr_decomposed_count-1] over decomposed[curr], making room. It's not worth using memcpy() here, since the counts are so small. */ int shift = curr_decomposed_count - 1; if (shift < 0) abort (); if (shift > 0) { int j; decomposed_count += shift; if (decomposed_count > UC_DECOMPOSITION_MAX_LENGTH) abort (); for (j = decomposed_count - 1 - shift; j > curr; j--) decomposed[j + shift] = decomposed[j]; } for (; shift >= 0; shift--) decomposed[curr + shift] = curr_decomposed[shift]; } else { /* decomposed[curr] is atomic. */ curr++; } } } } else { count = 0; decomposed_count = 0; } i = 0; for (;;) { ucs4_t uc; int ccc; if (s < s_end) { /* Fetch the next character from the decomposition. */ if (i == decomposed_count) break; uc = decomposed[i]; ccc = uc_combining_class (uc); } else { /* End of string reached. */ uc = 0; ccc = 0; } if (ccc == 0) { size_t j; /* Apply the canonical ordering algorithm to the accumulated sequence of characters. */ if (sortbuf_count > 1) gl_uninorm_decompose_merge_sort_inplace (sortbuf, sortbuf_count, sortbuf + sortbuf_count); if (composer != NULL) { /* Attempt to combine decomposed characters, as specified in the Unicode Standard Annex #15 "Unicode Normalization Forms". We need to check 1. whether the first accumulated character is a "starter" (i.e. has ccc = 0). This is usually the case. But when the string starts with a non-starter, the sortbuf also starts with a non-starter. Btw, this check could also be omitted, because the composition table has only entries (code1, code2) for which code1 is a starter; if the first accumulated character is not a starter, no lookup will succeed. 2. If the sortbuf has more than one character, check for each of these characters that are not "blocked" from the starter (i.e. have a ccc that is higher than the ccc of the previous character) whether it can be combined with the first character. 3. If only one character is left in sortbuf, check whether it can be combined with the next character (also a starter). */ if (sortbuf_count > 0 && sortbuf[0].ccc == 0) { for (j = 1; j < sortbuf_count; ) { if (sortbuf[j].ccc > sortbuf[j - 1].ccc) { ucs4_t combined = composer (sortbuf[0].code, sortbuf[j].code); if (combined) { size_t k; sortbuf[0].code = combined; /* sortbuf[0].ccc = 0, still valid. */ for (k = j + 1; k < sortbuf_count; k++) sortbuf[k - 1] = sortbuf[k]; sortbuf_count--; continue; } } j++; } if (s < s_end && sortbuf_count == 1) { ucs4_t combined = composer (sortbuf[0].code, uc); if (combined) { uc = combined; ccc = 0; /* uc could be further combined with subsequent characters. So don't put it into sortbuf[0] in this round, only in the next round. */ sortbuf_count = 0; } } } } for (j = 0; j < sortbuf_count; j++) { ucs4_t muc = sortbuf[j].code; /* Append muc to the result accumulator. */ if (length < allocated) { int ret = U_UCTOMB (result + length, muc, allocated - length); if (ret == -1) { errno = EINVAL; goto fail; } if (ret >= 0) { length += ret; goto done_appending; } } { size_t old_allocated = allocated; size_t new_allocated = 2 * old_allocated; if (new_allocated < 64) new_allocated = 64; if (new_allocated < old_allocated) /* integer overflow? */ abort (); { UNIT *larger_result; if (result == NULL) { larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT)); if (larger_result == NULL) { errno = ENOMEM; goto fail; } } else if (result == resultbuf) { larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT)); if (larger_result == NULL) { errno = ENOMEM; goto fail; } U_CPY (larger_result, resultbuf, length); } else { larger_result = (UNIT *) realloc (result, new_allocated * sizeof (UNIT)); if (larger_result == NULL) { errno = ENOMEM; goto fail; } } result = larger_result; allocated = new_allocated; { int ret = U_UCTOMB (result + length, muc, allocated - length); if (ret == -1) { errno = EINVAL; goto fail; } if (ret < 0) abort (); length += ret; goto done_appending; } } } done_appending: ; } /* sortbuf is now empty. */ sortbuf_count = 0; } if (!(s < s_end)) /* End of string reached. */ break; /* Append (uc, ccc) to sortbuf. */ if (sortbuf_count == sortbuf_allocated) { struct ucs4_with_ccc *new_sortbuf; sortbuf_allocated = 2 * sortbuf_allocated; if (sortbuf_allocated < sortbuf_count) /* integer overflow? */ abort (); new_sortbuf = (struct ucs4_with_ccc *) malloc (2 * sortbuf_allocated * sizeof (struct ucs4_with_ccc)); if (new_sortbuf == NULL) { errno = ENOMEM; goto fail; } memcpy (new_sortbuf, sortbuf, sortbuf_count * sizeof (struct ucs4_with_ccc)); if (sortbuf != sortbuf_preallocated) free (sortbuf); sortbuf = new_sortbuf; } sortbuf[sortbuf_count].code = uc; sortbuf[sortbuf_count].ccc = ccc; sortbuf_count++; i++; } if (!(s < s_end)) /* End of string reached. */ break; s += count; } } if (length == 0) { if (result == NULL) { /* Return a non-NULL value. NULL means error. */ result = (UNIT *) malloc (1); if (result == NULL) { errno = ENOMEM; goto fail; } } } else if (result != resultbuf && length < allocated) { /* Shrink the allocated memory if possible. */ UNIT *memory; memory = (UNIT *) realloc (result, length * sizeof (UNIT)); if (memory != NULL) result = memory; } if (sortbuf_count > 0) abort (); if (sortbuf != sortbuf_preallocated) free (sortbuf); *lengthp = length; return result; fail: { int saved_errno = errno; if (sortbuf != sortbuf_preallocated) free (sortbuf); if (result != resultbuf) free (result); errno = saved_errno; } return NULL; } pspp-1.0.1/gl/uninorm/decompose-internal.c0000644000175000017500000000214713124536243015450 00000000000000/* Decomposition of Unicode strings. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "decompose-internal.h" #define ELEMENT struct ucs4_with_ccc #define COMPARE(a,b) ((a)->ccc - (b)->ccc) #define STATIC #define merge_sort_fromto gl_uninorm_decompose_merge_sort_fromto #define merge_sort_inplace gl_uninorm_decompose_merge_sort_inplace #include "array-mergesort.h" pspp-1.0.1/gl/uninorm/decomposition-table.c0000644000175000017500000000163513124536243015622 00000000000000/* Decomposition of Unicode characters. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "uninorm/decomposition-table.h" #include "uninorm/decomposition-table2.h" pspp-1.0.1/gl/uninorm/u8-normalize.c0000644000175000017500000000227713124536243014216 00000000000000/* Normalization of UTF-8 strings. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "uninorm.h" #include #include #include #include #include "unistr.h" #include "unictype.h" #include "normalize-internal.h" #include "decompose-internal.h" #define FUNC u8_normalize #define UNIT uint8_t #define U_MBTOUC_UNSAFE u8_mbtouc_unsafe #define U_UCTOMB u8_uctomb #define U_CPY u8_cpy #include "u-normalize-internal.h" pspp-1.0.1/gl/uninorm/canonical-decomposition.c0000644000175000017500000000633613124536243016465 00000000000000/* Canonical decomposition of Unicode characters. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "uninorm.h" #include #include "decomposition-table.h" int uc_canonical_decomposition (ucs4_t uc, ucs4_t *decomposition) { if (uc >= 0xAC00 && uc < 0xD7A4) { /* Hangul syllable. See Unicode standard, chapter 3, section "Hangul Syllable Decomposition", See also the clarification at , section "Clarification of Hangul Jamo Handling". */ unsigned int t; uc -= 0xAC00; t = uc % 28; if (t == 0) { unsigned int v, l; uc = uc / 28; v = uc % 21; l = uc / 21; decomposition[0] = 0x1100 + l; decomposition[1] = 0x1161 + v; return 2; } else { #if 1 /* Return the pairwise decomposition, not the full decomposition. */ decomposition[0] = 0xAC00 + uc - t; /* = 0xAC00 + (l * 21 + v) * 28; */ decomposition[1] = 0x11A7 + t; return 2; #else unsigned int v, l; uc = uc / 28; v = uc % 21; l = uc / 21; decomposition[0] = 0x1100 + l; decomposition[1] = 0x1161 + v; decomposition[2] = 0x11A7 + t; return 3; #endif } } else if (uc < 0x110000) { unsigned short entry = decomp_index (uc); /* An entry of (unsigned short)(-1) denotes an absent entry. Otherwise, bit 15 of the entry tells whether the decomposition is a canonical one. */ if (entry < 0x8000) { const unsigned char *p; unsigned int element; unsigned int length; p = &gl_uninorm_decomp_chars_table[3 * entry]; element = (p[0] << 16) | (p[1] << 8) | p[2]; /* The first element has 5 bits for the decomposition type. */ if (((element >> 18) & 0x1f) != UC_DECOMP_CANONICAL) abort (); length = 1; for (;;) { /* Every element has an 18 bits wide Unicode code point. */ *decomposition = element & 0x3ffff; /* Bit 23 tells whether there are more elements, */ if ((element & (1 << 23)) == 0) break; p += 3; element = (p[0] << 16) | (p[1] << 8) | p[2]; decomposition++; length++; } return length; } } return -1; } pspp-1.0.1/gl/uninorm/decomposing-form.c0000644000175000017500000000174013124536243015126 00000000000000/* Decomposing variant of a normalization form. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "uninorm.h" #include "normalize-internal.h" uninorm_t uninorm_decomposing_form (uninorm_t nf) { return nf->decomposing_variant; } pspp-1.0.1/gl/uninorm/normalize-internal.h0000644000175000017500000000267013124536243015500 00000000000000/* Normalization of Unicode strings. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include "unitypes.h" /* Complete definition of normalization form descriptor. */ struct unicode_normalization_form { /* Bit mask containing meta-information. This must be the first field. */ unsigned int description; #define NF_IS_COMPAT_DECOMPOSING (1 << 0) #define NF_IS_COMPOSING (1 << 1) /* Function that decomposes a Unicode character. */ int (*decomposer) (ucs4_t uc, ucs4_t *decomposition); /* Function that combines two Unicode characters, a starter and another character. */ ucs4_t (*composer) (ucs4_t uc1, ucs4_t uc2); /* Decomposing variant. */ const struct unicode_normalization_form *decomposing_variant; }; pspp-1.0.1/gl/uninorm/decomposition.c0000644000175000017500000000607013124536243014533 00000000000000/* Decomposition of Unicode characters. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "uninorm.h" #include "decomposition-table.h" int uc_decomposition (ucs4_t uc, int *decomp_tag, ucs4_t *decomposition) { if (uc >= 0xAC00 && uc < 0xD7A4) { /* Hangul syllable. See Unicode standard, chapter 3, section "Hangul Syllable Decomposition", See also the clarification at , section "Clarification of Hangul Jamo Handling". */ unsigned int t; uc -= 0xAC00; t = uc % 28; *decomp_tag = UC_DECOMP_CANONICAL; if (t == 0) { unsigned int v, l; uc = uc / 28; v = uc % 21; l = uc / 21; decomposition[0] = 0x1100 + l; decomposition[1] = 0x1161 + v; return 2; } else { #if 1 /* Return the pairwise decomposition, not the full decomposition. */ decomposition[0] = 0xAC00 + uc - t; /* = 0xAC00 + (l * 21 + v) * 28; */ decomposition[1] = 0x11A7 + t; return 2; #else unsigned int v, l; uc = uc / 28; v = uc % 21; l = uc / 21; decomposition[0] = 0x1100 + l; decomposition[1] = 0x1161 + v; decomposition[2] = 0x11A7 + t; return 3; #endif } } else if (uc < 0x110000) { unsigned short entry = decomp_index (uc); if (entry != (unsigned short)(-1)) { const unsigned char *p; unsigned int element; unsigned int length; p = &gl_uninorm_decomp_chars_table[3 * (entry & 0x7FFF)]; element = (p[0] << 16) | (p[1] << 8) | p[2]; /* The first element has 5 bits for the decomposition type. */ *decomp_tag = (element >> 18) & 0x1f; length = 1; for (;;) { /* Every element has an 18 bits wide Unicode code point. */ *decomposition = element & 0x3ffff; /* Bit 23 tells whether there are more elements, */ if ((element & (1 << 23)) == 0) break; p += 3; element = (p[0] << 16) | (p[1] << 8) | p[2]; decomposition++; length++; } return length; } } return -1; } pspp-1.0.1/gl/uninorm/decomposition-table2.h0000644000175000017500000070401013020461275015703 00000000000000/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Decomposition of Unicode characters. */ /* Generated automatically by gen-uni-tables.c for Unicode 8.0.0. */ const unsigned char gl_uninorm_decomp_chars_table[] = { 0x08, 0x00, 0x20, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x08, 0x20, 0x00, 0x61, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x04, 0x20, 0x00, 0x32, 0x20, 0x00, 0x33, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x01, 0x40, 0x03, 0xBC, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x27, 0x20, 0x00, 0x31, 0x20, 0x00, 0x6F, 0xBC, 0x00, 0x31, 0x80, 0x20, 0x44, 0x00, 0x00, 0x34, 0xBC, 0x00, 0x31, 0x80, 0x20, 0x44, 0x00, 0x00, 0x32, 0xBC, 0x00, 0x33, 0x80, 0x20, 0x44, 0x00, 0x00, 0x34, 0x80, 0x00, 0x41, 0x00, 0x03, 0x00, 0x80, 0x00, 0x41, 0x00, 0x03, 0x01, 0x80, 0x00, 0x41, 0x00, 0x03, 0x02, 0x80, 0x00, 0x41, 0x00, 0x03, 0x03, 0x80, 0x00, 0x41, 0x00, 0x03, 0x08, 0x80, 0x00, 0x41, 0x00, 0x03, 0x0A, 0x80, 0x00, 0x43, 0x00, 0x03, 0x27, 0x80, 0x00, 0x45, 0x00, 0x03, 0x00, 0x80, 0x00, 0x45, 0x00, 0x03, 0x01, 0x80, 0x00, 0x45, 0x00, 0x03, 0x02, 0x80, 0x00, 0x45, 0x00, 0x03, 0x08, 0x80, 0x00, 0x49, 0x00, 0x03, 0x00, 0x80, 0x00, 0x49, 0x00, 0x03, 0x01, 0x80, 0x00, 0x49, 0x00, 0x03, 0x02, 0x80, 0x00, 0x49, 0x00, 0x03, 0x08, 0x80, 0x00, 0x4E, 0x00, 0x03, 0x03, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x00, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x01, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x02, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x03, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x08, 0x80, 0x00, 0x55, 0x00, 0x03, 0x00, 0x80, 0x00, 0x55, 0x00, 0x03, 0x01, 0x80, 0x00, 0x55, 0x00, 0x03, 0x02, 0x80, 0x00, 0x55, 0x00, 0x03, 0x08, 0x80, 0x00, 0x59, 0x00, 0x03, 0x01, 0x80, 0x00, 0x61, 0x00, 0x03, 0x00, 0x80, 0x00, 0x61, 0x00, 0x03, 0x01, 0x80, 0x00, 0x61, 0x00, 0x03, 0x02, 0x80, 0x00, 0x61, 0x00, 0x03, 0x03, 0x80, 0x00, 0x61, 0x00, 0x03, 0x08, 0x80, 0x00, 0x61, 0x00, 0x03, 0x0A, 0x80, 0x00, 0x63, 0x00, 0x03, 0x27, 0x80, 0x00, 0x65, 0x00, 0x03, 0x00, 0x80, 0x00, 0x65, 0x00, 0x03, 0x01, 0x80, 0x00, 0x65, 0x00, 0x03, 0x02, 0x80, 0x00, 0x65, 0x00, 0x03, 0x08, 0x80, 0x00, 0x69, 0x00, 0x03, 0x00, 0x80, 0x00, 0x69, 0x00, 0x03, 0x01, 0x80, 0x00, 0x69, 0x00, 0x03, 0x02, 0x80, 0x00, 0x69, 0x00, 0x03, 0x08, 0x80, 0x00, 0x6E, 0x00, 0x03, 0x03, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x00, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x01, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x02, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x03, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x08, 0x80, 0x00, 0x75, 0x00, 0x03, 0x00, 0x80, 0x00, 0x75, 0x00, 0x03, 0x01, 0x80, 0x00, 0x75, 0x00, 0x03, 0x02, 0x80, 0x00, 0x75, 0x00, 0x03, 0x08, 0x80, 0x00, 0x79, 0x00, 0x03, 0x01, 0x80, 0x00, 0x79, 0x00, 0x03, 0x08, 0x80, 0x00, 0x41, 0x00, 0x03, 0x04, 0x80, 0x00, 0x61, 0x00, 0x03, 0x04, 0x80, 0x00, 0x41, 0x00, 0x03, 0x06, 0x80, 0x00, 0x61, 0x00, 0x03, 0x06, 0x80, 0x00, 0x41, 0x00, 0x03, 0x28, 0x80, 0x00, 0x61, 0x00, 0x03, 0x28, 0x80, 0x00, 0x43, 0x00, 0x03, 0x01, 0x80, 0x00, 0x63, 0x00, 0x03, 0x01, 0x80, 0x00, 0x43, 0x00, 0x03, 0x02, 0x80, 0x00, 0x63, 0x00, 0x03, 0x02, 0x80, 0x00, 0x43, 0x00, 0x03, 0x07, 0x80, 0x00, 0x63, 0x00, 0x03, 0x07, 0x80, 0x00, 0x43, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x63, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x44, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x64, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x45, 0x00, 0x03, 0x04, 0x80, 0x00, 0x65, 0x00, 0x03, 0x04, 0x80, 0x00, 0x45, 0x00, 0x03, 0x06, 0x80, 0x00, 0x65, 0x00, 0x03, 0x06, 0x80, 0x00, 0x45, 0x00, 0x03, 0x07, 0x80, 0x00, 0x65, 0x00, 0x03, 0x07, 0x80, 0x00, 0x45, 0x00, 0x03, 0x28, 0x80, 0x00, 0x65, 0x00, 0x03, 0x28, 0x80, 0x00, 0x45, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x65, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x47, 0x00, 0x03, 0x02, 0x80, 0x00, 0x67, 0x00, 0x03, 0x02, 0x80, 0x00, 0x47, 0x00, 0x03, 0x06, 0x80, 0x00, 0x67, 0x00, 0x03, 0x06, 0x80, 0x00, 0x47, 0x00, 0x03, 0x07, 0x80, 0x00, 0x67, 0x00, 0x03, 0x07, 0x80, 0x00, 0x47, 0x00, 0x03, 0x27, 0x80, 0x00, 0x67, 0x00, 0x03, 0x27, 0x80, 0x00, 0x48, 0x00, 0x03, 0x02, 0x80, 0x00, 0x68, 0x00, 0x03, 0x02, 0x80, 0x00, 0x49, 0x00, 0x03, 0x03, 0x80, 0x00, 0x69, 0x00, 0x03, 0x03, 0x80, 0x00, 0x49, 0x00, 0x03, 0x04, 0x80, 0x00, 0x69, 0x00, 0x03, 0x04, 0x80, 0x00, 0x49, 0x00, 0x03, 0x06, 0x80, 0x00, 0x69, 0x00, 0x03, 0x06, 0x80, 0x00, 0x49, 0x00, 0x03, 0x28, 0x80, 0x00, 0x69, 0x00, 0x03, 0x28, 0x80, 0x00, 0x49, 0x00, 0x03, 0x07, 0xC0, 0x00, 0x49, 0x00, 0x00, 0x4A, 0xC0, 0x00, 0x69, 0x00, 0x00, 0x6A, 0x80, 0x00, 0x4A, 0x00, 0x03, 0x02, 0x80, 0x00, 0x6A, 0x00, 0x03, 0x02, 0x80, 0x00, 0x4B, 0x00, 0x03, 0x27, 0x80, 0x00, 0x6B, 0x00, 0x03, 0x27, 0x80, 0x00, 0x4C, 0x00, 0x03, 0x01, 0x80, 0x00, 0x6C, 0x00, 0x03, 0x01, 0x80, 0x00, 0x4C, 0x00, 0x03, 0x27, 0x80, 0x00, 0x6C, 0x00, 0x03, 0x27, 0x80, 0x00, 0x4C, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x6C, 0x00, 0x03, 0x0C, 0xC0, 0x00, 0x4C, 0x00, 0x00, 0xB7, 0xC0, 0x00, 0x6C, 0x00, 0x00, 0xB7, 0x80, 0x00, 0x4E, 0x00, 0x03, 0x01, 0x80, 0x00, 0x6E, 0x00, 0x03, 0x01, 0x80, 0x00, 0x4E, 0x00, 0x03, 0x27, 0x80, 0x00, 0x6E, 0x00, 0x03, 0x27, 0x80, 0x00, 0x4E, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x6E, 0x00, 0x03, 0x0C, 0xC0, 0x02, 0xBC, 0x00, 0x00, 0x6E, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x04, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x04, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x06, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x06, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x0B, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x0B, 0x80, 0x00, 0x52, 0x00, 0x03, 0x01, 0x80, 0x00, 0x72, 0x00, 0x03, 0x01, 0x80, 0x00, 0x52, 0x00, 0x03, 0x27, 0x80, 0x00, 0x72, 0x00, 0x03, 0x27, 0x80, 0x00, 0x52, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x72, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x53, 0x00, 0x03, 0x01, 0x80, 0x00, 0x73, 0x00, 0x03, 0x01, 0x80, 0x00, 0x53, 0x00, 0x03, 0x02, 0x80, 0x00, 0x73, 0x00, 0x03, 0x02, 0x80, 0x00, 0x53, 0x00, 0x03, 0x27, 0x80, 0x00, 0x73, 0x00, 0x03, 0x27, 0x80, 0x00, 0x53, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x73, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x54, 0x00, 0x03, 0x27, 0x80, 0x00, 0x74, 0x00, 0x03, 0x27, 0x80, 0x00, 0x54, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x74, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x55, 0x00, 0x03, 0x03, 0x80, 0x00, 0x75, 0x00, 0x03, 0x03, 0x80, 0x00, 0x55, 0x00, 0x03, 0x04, 0x80, 0x00, 0x75, 0x00, 0x03, 0x04, 0x80, 0x00, 0x55, 0x00, 0x03, 0x06, 0x80, 0x00, 0x75, 0x00, 0x03, 0x06, 0x80, 0x00, 0x55, 0x00, 0x03, 0x0A, 0x80, 0x00, 0x75, 0x00, 0x03, 0x0A, 0x80, 0x00, 0x55, 0x00, 0x03, 0x0B, 0x80, 0x00, 0x75, 0x00, 0x03, 0x0B, 0x80, 0x00, 0x55, 0x00, 0x03, 0x28, 0x80, 0x00, 0x75, 0x00, 0x03, 0x28, 0x80, 0x00, 0x57, 0x00, 0x03, 0x02, 0x80, 0x00, 0x77, 0x00, 0x03, 0x02, 0x80, 0x00, 0x59, 0x00, 0x03, 0x02, 0x80, 0x00, 0x79, 0x00, 0x03, 0x02, 0x80, 0x00, 0x59, 0x00, 0x03, 0x08, 0x80, 0x00, 0x5A, 0x00, 0x03, 0x01, 0x80, 0x00, 0x7A, 0x00, 0x03, 0x01, 0x80, 0x00, 0x5A, 0x00, 0x03, 0x07, 0x80, 0x00, 0x7A, 0x00, 0x03, 0x07, 0x80, 0x00, 0x5A, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x7A, 0x00, 0x03, 0x0C, 0x40, 0x00, 0x73, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x1B, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x1B, 0x80, 0x00, 0x55, 0x00, 0x03, 0x1B, 0x80, 0x00, 0x75, 0x00, 0x03, 0x1B, 0xC0, 0x00, 0x44, 0x00, 0x01, 0x7D, 0xC0, 0x00, 0x44, 0x00, 0x01, 0x7E, 0xC0, 0x00, 0x64, 0x00, 0x01, 0x7E, 0xC0, 0x00, 0x4C, 0x00, 0x00, 0x4A, 0xC0, 0x00, 0x4C, 0x00, 0x00, 0x6A, 0xC0, 0x00, 0x6C, 0x00, 0x00, 0x6A, 0xC0, 0x00, 0x4E, 0x00, 0x00, 0x4A, 0xC0, 0x00, 0x4E, 0x00, 0x00, 0x6A, 0xC0, 0x00, 0x6E, 0x00, 0x00, 0x6A, 0x80, 0x00, 0x41, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x61, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x49, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x69, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x55, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x75, 0x00, 0x03, 0x0C, 0x80, 0x00, 0xDC, 0x00, 0x03, 0x04, 0x80, 0x00, 0xFC, 0x00, 0x03, 0x04, 0x80, 0x00, 0xDC, 0x00, 0x03, 0x01, 0x80, 0x00, 0xFC, 0x00, 0x03, 0x01, 0x80, 0x00, 0xDC, 0x00, 0x03, 0x0C, 0x80, 0x00, 0xFC, 0x00, 0x03, 0x0C, 0x80, 0x00, 0xDC, 0x00, 0x03, 0x00, 0x80, 0x00, 0xFC, 0x00, 0x03, 0x00, 0x80, 0x00, 0xC4, 0x00, 0x03, 0x04, 0x80, 0x00, 0xE4, 0x00, 0x03, 0x04, 0x80, 0x02, 0x26, 0x00, 0x03, 0x04, 0x80, 0x02, 0x27, 0x00, 0x03, 0x04, 0x80, 0x00, 0xC6, 0x00, 0x03, 0x04, 0x80, 0x00, 0xE6, 0x00, 0x03, 0x04, 0x80, 0x00, 0x47, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x67, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x4B, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x6B, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x28, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x28, 0x80, 0x01, 0xEA, 0x00, 0x03, 0x04, 0x80, 0x01, 0xEB, 0x00, 0x03, 0x04, 0x80, 0x01, 0xB7, 0x00, 0x03, 0x0C, 0x80, 0x02, 0x92, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x6A, 0x00, 0x03, 0x0C, 0xC0, 0x00, 0x44, 0x00, 0x00, 0x5A, 0xC0, 0x00, 0x44, 0x00, 0x00, 0x7A, 0xC0, 0x00, 0x64, 0x00, 0x00, 0x7A, 0x80, 0x00, 0x47, 0x00, 0x03, 0x01, 0x80, 0x00, 0x67, 0x00, 0x03, 0x01, 0x80, 0x00, 0x4E, 0x00, 0x03, 0x00, 0x80, 0x00, 0x6E, 0x00, 0x03, 0x00, 0x80, 0x00, 0xC5, 0x00, 0x03, 0x01, 0x80, 0x00, 0xE5, 0x00, 0x03, 0x01, 0x80, 0x00, 0xC6, 0x00, 0x03, 0x01, 0x80, 0x00, 0xE6, 0x00, 0x03, 0x01, 0x80, 0x00, 0xD8, 0x00, 0x03, 0x01, 0x80, 0x00, 0xF8, 0x00, 0x03, 0x01, 0x80, 0x00, 0x41, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x61, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x41, 0x00, 0x03, 0x11, 0x80, 0x00, 0x61, 0x00, 0x03, 0x11, 0x80, 0x00, 0x45, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x65, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x45, 0x00, 0x03, 0x11, 0x80, 0x00, 0x65, 0x00, 0x03, 0x11, 0x80, 0x00, 0x49, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x69, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x49, 0x00, 0x03, 0x11, 0x80, 0x00, 0x69, 0x00, 0x03, 0x11, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x11, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x11, 0x80, 0x00, 0x52, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x72, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x52, 0x00, 0x03, 0x11, 0x80, 0x00, 0x72, 0x00, 0x03, 0x11, 0x80, 0x00, 0x55, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x75, 0x00, 0x03, 0x0F, 0x80, 0x00, 0x55, 0x00, 0x03, 0x11, 0x80, 0x00, 0x75, 0x00, 0x03, 0x11, 0x80, 0x00, 0x53, 0x00, 0x03, 0x26, 0x80, 0x00, 0x73, 0x00, 0x03, 0x26, 0x80, 0x00, 0x54, 0x00, 0x03, 0x26, 0x80, 0x00, 0x74, 0x00, 0x03, 0x26, 0x80, 0x00, 0x48, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x68, 0x00, 0x03, 0x0C, 0x80, 0x00, 0x41, 0x00, 0x03, 0x07, 0x80, 0x00, 0x61, 0x00, 0x03, 0x07, 0x80, 0x00, 0x45, 0x00, 0x03, 0x27, 0x80, 0x00, 0x65, 0x00, 0x03, 0x27, 0x80, 0x00, 0xD6, 0x00, 0x03, 0x04, 0x80, 0x00, 0xF6, 0x00, 0x03, 0x04, 0x80, 0x00, 0xD5, 0x00, 0x03, 0x04, 0x80, 0x00, 0xF5, 0x00, 0x03, 0x04, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x07, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x07, 0x80, 0x02, 0x2E, 0x00, 0x03, 0x04, 0x80, 0x02, 0x2F, 0x00, 0x03, 0x04, 0x80, 0x00, 0x59, 0x00, 0x03, 0x04, 0x80, 0x00, 0x79, 0x00, 0x03, 0x04, 0x20, 0x00, 0x68, 0x20, 0x02, 0x66, 0x20, 0x00, 0x6A, 0x20, 0x00, 0x72, 0x20, 0x02, 0x79, 0x20, 0x02, 0x7B, 0x20, 0x02, 0x81, 0x20, 0x00, 0x77, 0x20, 0x00, 0x79, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x06, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x07, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x0A, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x28, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x03, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x0B, 0x20, 0x02, 0x63, 0x20, 0x00, 0x6C, 0x20, 0x00, 0x73, 0x20, 0x00, 0x78, 0x20, 0x02, 0x95, 0x00, 0x03, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x13, 0x80, 0x03, 0x08, 0x00, 0x03, 0x01, 0x00, 0x02, 0xB9, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x45, 0x00, 0x00, 0x3B, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x01, 0x80, 0x00, 0xA8, 0x00, 0x03, 0x01, 0x80, 0x03, 0x91, 0x00, 0x03, 0x01, 0x00, 0x00, 0xB7, 0x80, 0x03, 0x95, 0x00, 0x03, 0x01, 0x80, 0x03, 0x97, 0x00, 0x03, 0x01, 0x80, 0x03, 0x99, 0x00, 0x03, 0x01, 0x80, 0x03, 0x9F, 0x00, 0x03, 0x01, 0x80, 0x03, 0xA5, 0x00, 0x03, 0x01, 0x80, 0x03, 0xA9, 0x00, 0x03, 0x01, 0x80, 0x03, 0xCA, 0x00, 0x03, 0x01, 0x80, 0x03, 0x99, 0x00, 0x03, 0x08, 0x80, 0x03, 0xA5, 0x00, 0x03, 0x08, 0x80, 0x03, 0xB1, 0x00, 0x03, 0x01, 0x80, 0x03, 0xB5, 0x00, 0x03, 0x01, 0x80, 0x03, 0xB7, 0x00, 0x03, 0x01, 0x80, 0x03, 0xB9, 0x00, 0x03, 0x01, 0x80, 0x03, 0xCB, 0x00, 0x03, 0x01, 0x80, 0x03, 0xB9, 0x00, 0x03, 0x08, 0x80, 0x03, 0xC5, 0x00, 0x03, 0x08, 0x80, 0x03, 0xBF, 0x00, 0x03, 0x01, 0x80, 0x03, 0xC5, 0x00, 0x03, 0x01, 0x80, 0x03, 0xC9, 0x00, 0x03, 0x01, 0x40, 0x03, 0xB2, 0x40, 0x03, 0xB8, 0x40, 0x03, 0xA5, 0x80, 0x03, 0xD2, 0x00, 0x03, 0x01, 0x80, 0x03, 0xD2, 0x00, 0x03, 0x08, 0x40, 0x03, 0xC6, 0x40, 0x03, 0xC0, 0x40, 0x03, 0xBA, 0x40, 0x03, 0xC1, 0x40, 0x03, 0xC2, 0x40, 0x03, 0x98, 0x40, 0x03, 0xB5, 0x40, 0x03, 0xA3, 0x80, 0x04, 0x15, 0x00, 0x03, 0x00, 0x80, 0x04, 0x15, 0x00, 0x03, 0x08, 0x80, 0x04, 0x13, 0x00, 0x03, 0x01, 0x80, 0x04, 0x06, 0x00, 0x03, 0x08, 0x80, 0x04, 0x1A, 0x00, 0x03, 0x01, 0x80, 0x04, 0x18, 0x00, 0x03, 0x00, 0x80, 0x04, 0x23, 0x00, 0x03, 0x06, 0x80, 0x04, 0x18, 0x00, 0x03, 0x06, 0x80, 0x04, 0x38, 0x00, 0x03, 0x06, 0x80, 0x04, 0x35, 0x00, 0x03, 0x00, 0x80, 0x04, 0x35, 0x00, 0x03, 0x08, 0x80, 0x04, 0x33, 0x00, 0x03, 0x01, 0x80, 0x04, 0x56, 0x00, 0x03, 0x08, 0x80, 0x04, 0x3A, 0x00, 0x03, 0x01, 0x80, 0x04, 0x38, 0x00, 0x03, 0x00, 0x80, 0x04, 0x43, 0x00, 0x03, 0x06, 0x80, 0x04, 0x74, 0x00, 0x03, 0x0F, 0x80, 0x04, 0x75, 0x00, 0x03, 0x0F, 0x80, 0x04, 0x16, 0x00, 0x03, 0x06, 0x80, 0x04, 0x36, 0x00, 0x03, 0x06, 0x80, 0x04, 0x10, 0x00, 0x03, 0x06, 0x80, 0x04, 0x30, 0x00, 0x03, 0x06, 0x80, 0x04, 0x10, 0x00, 0x03, 0x08, 0x80, 0x04, 0x30, 0x00, 0x03, 0x08, 0x80, 0x04, 0x15, 0x00, 0x03, 0x06, 0x80, 0x04, 0x35, 0x00, 0x03, 0x06, 0x80, 0x04, 0xD8, 0x00, 0x03, 0x08, 0x80, 0x04, 0xD9, 0x00, 0x03, 0x08, 0x80, 0x04, 0x16, 0x00, 0x03, 0x08, 0x80, 0x04, 0x36, 0x00, 0x03, 0x08, 0x80, 0x04, 0x17, 0x00, 0x03, 0x08, 0x80, 0x04, 0x37, 0x00, 0x03, 0x08, 0x80, 0x04, 0x18, 0x00, 0x03, 0x04, 0x80, 0x04, 0x38, 0x00, 0x03, 0x04, 0x80, 0x04, 0x18, 0x00, 0x03, 0x08, 0x80, 0x04, 0x38, 0x00, 0x03, 0x08, 0x80, 0x04, 0x1E, 0x00, 0x03, 0x08, 0x80, 0x04, 0x3E, 0x00, 0x03, 0x08, 0x80, 0x04, 0xE8, 0x00, 0x03, 0x08, 0x80, 0x04, 0xE9, 0x00, 0x03, 0x08, 0x80, 0x04, 0x2D, 0x00, 0x03, 0x08, 0x80, 0x04, 0x4D, 0x00, 0x03, 0x08, 0x80, 0x04, 0x23, 0x00, 0x03, 0x04, 0x80, 0x04, 0x43, 0x00, 0x03, 0x04, 0x80, 0x04, 0x23, 0x00, 0x03, 0x08, 0x80, 0x04, 0x43, 0x00, 0x03, 0x08, 0x80, 0x04, 0x23, 0x00, 0x03, 0x0B, 0x80, 0x04, 0x43, 0x00, 0x03, 0x0B, 0x80, 0x04, 0x27, 0x00, 0x03, 0x08, 0x80, 0x04, 0x47, 0x00, 0x03, 0x08, 0x80, 0x04, 0x2B, 0x00, 0x03, 0x08, 0x80, 0x04, 0x4B, 0x00, 0x03, 0x08, 0xC0, 0x05, 0x65, 0x00, 0x05, 0x82, 0x80, 0x06, 0x27, 0x00, 0x06, 0x53, 0x80, 0x06, 0x27, 0x00, 0x06, 0x54, 0x80, 0x06, 0x48, 0x00, 0x06, 0x54, 0x80, 0x06, 0x27, 0x00, 0x06, 0x55, 0x80, 0x06, 0x4A, 0x00, 0x06, 0x54, 0xC0, 0x06, 0x27, 0x00, 0x06, 0x74, 0xC0, 0x06, 0x48, 0x00, 0x06, 0x74, 0xC0, 0x06, 0xC7, 0x00, 0x06, 0x74, 0xC0, 0x06, 0x4A, 0x00, 0x06, 0x74, 0x80, 0x06, 0xD5, 0x00, 0x06, 0x54, 0x80, 0x06, 0xC1, 0x00, 0x06, 0x54, 0x80, 0x06, 0xD2, 0x00, 0x06, 0x54, 0x80, 0x09, 0x28, 0x00, 0x09, 0x3C, 0x80, 0x09, 0x30, 0x00, 0x09, 0x3C, 0x80, 0x09, 0x33, 0x00, 0x09, 0x3C, 0x80, 0x09, 0x15, 0x00, 0x09, 0x3C, 0x80, 0x09, 0x16, 0x00, 0x09, 0x3C, 0x80, 0x09, 0x17, 0x00, 0x09, 0x3C, 0x80, 0x09, 0x1C, 0x00, 0x09, 0x3C, 0x80, 0x09, 0x21, 0x00, 0x09, 0x3C, 0x80, 0x09, 0x22, 0x00, 0x09, 0x3C, 0x80, 0x09, 0x2B, 0x00, 0x09, 0x3C, 0x80, 0x09, 0x2F, 0x00, 0x09, 0x3C, 0x80, 0x09, 0xC7, 0x00, 0x09, 0xBE, 0x80, 0x09, 0xC7, 0x00, 0x09, 0xD7, 0x80, 0x09, 0xA1, 0x00, 0x09, 0xBC, 0x80, 0x09, 0xA2, 0x00, 0x09, 0xBC, 0x80, 0x09, 0xAF, 0x00, 0x09, 0xBC, 0x80, 0x0A, 0x32, 0x00, 0x0A, 0x3C, 0x80, 0x0A, 0x38, 0x00, 0x0A, 0x3C, 0x80, 0x0A, 0x16, 0x00, 0x0A, 0x3C, 0x80, 0x0A, 0x17, 0x00, 0x0A, 0x3C, 0x80, 0x0A, 0x1C, 0x00, 0x0A, 0x3C, 0x80, 0x0A, 0x2B, 0x00, 0x0A, 0x3C, 0x80, 0x0B, 0x47, 0x00, 0x0B, 0x56, 0x80, 0x0B, 0x47, 0x00, 0x0B, 0x3E, 0x80, 0x0B, 0x47, 0x00, 0x0B, 0x57, 0x80, 0x0B, 0x21, 0x00, 0x0B, 0x3C, 0x80, 0x0B, 0x22, 0x00, 0x0B, 0x3C, 0x80, 0x0B, 0x92, 0x00, 0x0B, 0xD7, 0x80, 0x0B, 0xC6, 0x00, 0x0B, 0xBE, 0x80, 0x0B, 0xC7, 0x00, 0x0B, 0xBE, 0x80, 0x0B, 0xC6, 0x00, 0x0B, 0xD7, 0x80, 0x0C, 0x46, 0x00, 0x0C, 0x56, 0x80, 0x0C, 0xBF, 0x00, 0x0C, 0xD5, 0x80, 0x0C, 0xC6, 0x00, 0x0C, 0xD5, 0x80, 0x0C, 0xC6, 0x00, 0x0C, 0xD6, 0x80, 0x0C, 0xC6, 0x00, 0x0C, 0xC2, 0x80, 0x0C, 0xCA, 0x00, 0x0C, 0xD5, 0x80, 0x0D, 0x46, 0x00, 0x0D, 0x3E, 0x80, 0x0D, 0x47, 0x00, 0x0D, 0x3E, 0x80, 0x0D, 0x46, 0x00, 0x0D, 0x57, 0x80, 0x0D, 0xD9, 0x00, 0x0D, 0xCA, 0x80, 0x0D, 0xD9, 0x00, 0x0D, 0xCF, 0x80, 0x0D, 0xDC, 0x00, 0x0D, 0xCA, 0x80, 0x0D, 0xD9, 0x00, 0x0D, 0xDF, 0xC0, 0x0E, 0x4D, 0x00, 0x0E, 0x32, 0xC0, 0x0E, 0xCD, 0x00, 0x0E, 0xB2, 0xC0, 0x0E, 0xAB, 0x00, 0x0E, 0x99, 0xC0, 0x0E, 0xAB, 0x00, 0x0E, 0xA1, 0x08, 0x0F, 0x0B, 0x80, 0x0F, 0x42, 0x00, 0x0F, 0xB7, 0x80, 0x0F, 0x4C, 0x00, 0x0F, 0xB7, 0x80, 0x0F, 0x51, 0x00, 0x0F, 0xB7, 0x80, 0x0F, 0x56, 0x00, 0x0F, 0xB7, 0x80, 0x0F, 0x5B, 0x00, 0x0F, 0xB7, 0x80, 0x0F, 0x40, 0x00, 0x0F, 0xB5, 0x80, 0x0F, 0x71, 0x00, 0x0F, 0x72, 0x80, 0x0F, 0x71, 0x00, 0x0F, 0x74, 0x80, 0x0F, 0xB2, 0x00, 0x0F, 0x80, 0xC0, 0x0F, 0xB2, 0x00, 0x0F, 0x81, 0x80, 0x0F, 0xB3, 0x00, 0x0F, 0x80, 0xC0, 0x0F, 0xB3, 0x00, 0x0F, 0x81, 0x80, 0x0F, 0x71, 0x00, 0x0F, 0x80, 0x80, 0x0F, 0x92, 0x00, 0x0F, 0xB7, 0x80, 0x0F, 0x9C, 0x00, 0x0F, 0xB7, 0x80, 0x0F, 0xA1, 0x00, 0x0F, 0xB7, 0x80, 0x0F, 0xA6, 0x00, 0x0F, 0xB7, 0x80, 0x0F, 0xAB, 0x00, 0x0F, 0xB7, 0x80, 0x0F, 0x90, 0x00, 0x0F, 0xB5, 0x80, 0x10, 0x25, 0x00, 0x10, 0x2E, 0x20, 0x10, 0xDC, 0x80, 0x1B, 0x05, 0x00, 0x1B, 0x35, 0x80, 0x1B, 0x07, 0x00, 0x1B, 0x35, 0x80, 0x1B, 0x09, 0x00, 0x1B, 0x35, 0x80, 0x1B, 0x0B, 0x00, 0x1B, 0x35, 0x80, 0x1B, 0x0D, 0x00, 0x1B, 0x35, 0x80, 0x1B, 0x11, 0x00, 0x1B, 0x35, 0x80, 0x1B, 0x3A, 0x00, 0x1B, 0x35, 0x80, 0x1B, 0x3C, 0x00, 0x1B, 0x35, 0x80, 0x1B, 0x3E, 0x00, 0x1B, 0x35, 0x80, 0x1B, 0x3F, 0x00, 0x1B, 0x35, 0x80, 0x1B, 0x42, 0x00, 0x1B, 0x35, 0x20, 0x00, 0x41, 0x20, 0x00, 0xC6, 0x20, 0x00, 0x42, 0x20, 0x00, 0x44, 0x20, 0x00, 0x45, 0x20, 0x01, 0x8E, 0x20, 0x00, 0x47, 0x20, 0x00, 0x48, 0x20, 0x00, 0x49, 0x20, 0x00, 0x4A, 0x20, 0x00, 0x4B, 0x20, 0x00, 0x4C, 0x20, 0x00, 0x4D, 0x20, 0x00, 0x4E, 0x20, 0x00, 0x4F, 0x20, 0x02, 0x22, 0x20, 0x00, 0x50, 0x20, 0x00, 0x52, 0x20, 0x00, 0x54, 0x20, 0x00, 0x55, 0x20, 0x00, 0x57, 0x20, 0x00, 0x61, 0x20, 0x02, 0x50, 0x20, 0x02, 0x51, 0x20, 0x1D, 0x02, 0x20, 0x00, 0x62, 0x20, 0x00, 0x64, 0x20, 0x00, 0x65, 0x20, 0x02, 0x59, 0x20, 0x02, 0x5B, 0x20, 0x02, 0x5C, 0x20, 0x00, 0x67, 0x20, 0x00, 0x6B, 0x20, 0x00, 0x6D, 0x20, 0x01, 0x4B, 0x20, 0x00, 0x6F, 0x20, 0x02, 0x54, 0x20, 0x1D, 0x16, 0x20, 0x1D, 0x17, 0x20, 0x00, 0x70, 0x20, 0x00, 0x74, 0x20, 0x00, 0x75, 0x20, 0x1D, 0x1D, 0x20, 0x02, 0x6F, 0x20, 0x00, 0x76, 0x20, 0x1D, 0x25, 0x20, 0x03, 0xB2, 0x20, 0x03, 0xB3, 0x20, 0x03, 0xB4, 0x20, 0x03, 0xC6, 0x20, 0x03, 0xC7, 0x24, 0x00, 0x69, 0x24, 0x00, 0x72, 0x24, 0x00, 0x75, 0x24, 0x00, 0x76, 0x24, 0x03, 0xB2, 0x24, 0x03, 0xB3, 0x24, 0x03, 0xC1, 0x24, 0x03, 0xC6, 0x24, 0x03, 0xC7, 0x20, 0x04, 0x3D, 0x20, 0x02, 0x52, 0x20, 0x00, 0x63, 0x20, 0x02, 0x55, 0x20, 0x00, 0xF0, 0x20, 0x02, 0x5C, 0x20, 0x00, 0x66, 0x20, 0x02, 0x5F, 0x20, 0x02, 0x61, 0x20, 0x02, 0x65, 0x20, 0x02, 0x68, 0x20, 0x02, 0x69, 0x20, 0x02, 0x6A, 0x20, 0x1D, 0x7B, 0x20, 0x02, 0x9D, 0x20, 0x02, 0x6D, 0x20, 0x1D, 0x85, 0x20, 0x02, 0x9F, 0x20, 0x02, 0x71, 0x20, 0x02, 0x70, 0x20, 0x02, 0x72, 0x20, 0x02, 0x73, 0x20, 0x02, 0x74, 0x20, 0x02, 0x75, 0x20, 0x02, 0x78, 0x20, 0x02, 0x82, 0x20, 0x02, 0x83, 0x20, 0x01, 0xAB, 0x20, 0x02, 0x89, 0x20, 0x02, 0x8A, 0x20, 0x1D, 0x1C, 0x20, 0x02, 0x8B, 0x20, 0x02, 0x8C, 0x20, 0x00, 0x7A, 0x20, 0x02, 0x90, 0x20, 0x02, 0x91, 0x20, 0x02, 0x92, 0x20, 0x03, 0xB8, 0x80, 0x00, 0x41, 0x00, 0x03, 0x25, 0x80, 0x00, 0x61, 0x00, 0x03, 0x25, 0x80, 0x00, 0x42, 0x00, 0x03, 0x07, 0x80, 0x00, 0x62, 0x00, 0x03, 0x07, 0x80, 0x00, 0x42, 0x00, 0x03, 0x23, 0x80, 0x00, 0x62, 0x00, 0x03, 0x23, 0x80, 0x00, 0x42, 0x00, 0x03, 0x31, 0x80, 0x00, 0x62, 0x00, 0x03, 0x31, 0x80, 0x00, 0xC7, 0x00, 0x03, 0x01, 0x80, 0x00, 0xE7, 0x00, 0x03, 0x01, 0x80, 0x00, 0x44, 0x00, 0x03, 0x07, 0x80, 0x00, 0x64, 0x00, 0x03, 0x07, 0x80, 0x00, 0x44, 0x00, 0x03, 0x23, 0x80, 0x00, 0x64, 0x00, 0x03, 0x23, 0x80, 0x00, 0x44, 0x00, 0x03, 0x31, 0x80, 0x00, 0x64, 0x00, 0x03, 0x31, 0x80, 0x00, 0x44, 0x00, 0x03, 0x27, 0x80, 0x00, 0x64, 0x00, 0x03, 0x27, 0x80, 0x00, 0x44, 0x00, 0x03, 0x2D, 0x80, 0x00, 0x64, 0x00, 0x03, 0x2D, 0x80, 0x01, 0x12, 0x00, 0x03, 0x00, 0x80, 0x01, 0x13, 0x00, 0x03, 0x00, 0x80, 0x01, 0x12, 0x00, 0x03, 0x01, 0x80, 0x01, 0x13, 0x00, 0x03, 0x01, 0x80, 0x00, 0x45, 0x00, 0x03, 0x2D, 0x80, 0x00, 0x65, 0x00, 0x03, 0x2D, 0x80, 0x00, 0x45, 0x00, 0x03, 0x30, 0x80, 0x00, 0x65, 0x00, 0x03, 0x30, 0x80, 0x02, 0x28, 0x00, 0x03, 0x06, 0x80, 0x02, 0x29, 0x00, 0x03, 0x06, 0x80, 0x00, 0x46, 0x00, 0x03, 0x07, 0x80, 0x00, 0x66, 0x00, 0x03, 0x07, 0x80, 0x00, 0x47, 0x00, 0x03, 0x04, 0x80, 0x00, 0x67, 0x00, 0x03, 0x04, 0x80, 0x00, 0x48, 0x00, 0x03, 0x07, 0x80, 0x00, 0x68, 0x00, 0x03, 0x07, 0x80, 0x00, 0x48, 0x00, 0x03, 0x23, 0x80, 0x00, 0x68, 0x00, 0x03, 0x23, 0x80, 0x00, 0x48, 0x00, 0x03, 0x08, 0x80, 0x00, 0x68, 0x00, 0x03, 0x08, 0x80, 0x00, 0x48, 0x00, 0x03, 0x27, 0x80, 0x00, 0x68, 0x00, 0x03, 0x27, 0x80, 0x00, 0x48, 0x00, 0x03, 0x2E, 0x80, 0x00, 0x68, 0x00, 0x03, 0x2E, 0x80, 0x00, 0x49, 0x00, 0x03, 0x30, 0x80, 0x00, 0x69, 0x00, 0x03, 0x30, 0x80, 0x00, 0xCF, 0x00, 0x03, 0x01, 0x80, 0x00, 0xEF, 0x00, 0x03, 0x01, 0x80, 0x00, 0x4B, 0x00, 0x03, 0x01, 0x80, 0x00, 0x6B, 0x00, 0x03, 0x01, 0x80, 0x00, 0x4B, 0x00, 0x03, 0x23, 0x80, 0x00, 0x6B, 0x00, 0x03, 0x23, 0x80, 0x00, 0x4B, 0x00, 0x03, 0x31, 0x80, 0x00, 0x6B, 0x00, 0x03, 0x31, 0x80, 0x00, 0x4C, 0x00, 0x03, 0x23, 0x80, 0x00, 0x6C, 0x00, 0x03, 0x23, 0x80, 0x1E, 0x36, 0x00, 0x03, 0x04, 0x80, 0x1E, 0x37, 0x00, 0x03, 0x04, 0x80, 0x00, 0x4C, 0x00, 0x03, 0x31, 0x80, 0x00, 0x6C, 0x00, 0x03, 0x31, 0x80, 0x00, 0x4C, 0x00, 0x03, 0x2D, 0x80, 0x00, 0x6C, 0x00, 0x03, 0x2D, 0x80, 0x00, 0x4D, 0x00, 0x03, 0x01, 0x80, 0x00, 0x6D, 0x00, 0x03, 0x01, 0x80, 0x00, 0x4D, 0x00, 0x03, 0x07, 0x80, 0x00, 0x6D, 0x00, 0x03, 0x07, 0x80, 0x00, 0x4D, 0x00, 0x03, 0x23, 0x80, 0x00, 0x6D, 0x00, 0x03, 0x23, 0x80, 0x00, 0x4E, 0x00, 0x03, 0x07, 0x80, 0x00, 0x6E, 0x00, 0x03, 0x07, 0x80, 0x00, 0x4E, 0x00, 0x03, 0x23, 0x80, 0x00, 0x6E, 0x00, 0x03, 0x23, 0x80, 0x00, 0x4E, 0x00, 0x03, 0x31, 0x80, 0x00, 0x6E, 0x00, 0x03, 0x31, 0x80, 0x00, 0x4E, 0x00, 0x03, 0x2D, 0x80, 0x00, 0x6E, 0x00, 0x03, 0x2D, 0x80, 0x00, 0xD5, 0x00, 0x03, 0x01, 0x80, 0x00, 0xF5, 0x00, 0x03, 0x01, 0x80, 0x00, 0xD5, 0x00, 0x03, 0x08, 0x80, 0x00, 0xF5, 0x00, 0x03, 0x08, 0x80, 0x01, 0x4C, 0x00, 0x03, 0x00, 0x80, 0x01, 0x4D, 0x00, 0x03, 0x00, 0x80, 0x01, 0x4C, 0x00, 0x03, 0x01, 0x80, 0x01, 0x4D, 0x00, 0x03, 0x01, 0x80, 0x00, 0x50, 0x00, 0x03, 0x01, 0x80, 0x00, 0x70, 0x00, 0x03, 0x01, 0x80, 0x00, 0x50, 0x00, 0x03, 0x07, 0x80, 0x00, 0x70, 0x00, 0x03, 0x07, 0x80, 0x00, 0x52, 0x00, 0x03, 0x07, 0x80, 0x00, 0x72, 0x00, 0x03, 0x07, 0x80, 0x00, 0x52, 0x00, 0x03, 0x23, 0x80, 0x00, 0x72, 0x00, 0x03, 0x23, 0x80, 0x1E, 0x5A, 0x00, 0x03, 0x04, 0x80, 0x1E, 0x5B, 0x00, 0x03, 0x04, 0x80, 0x00, 0x52, 0x00, 0x03, 0x31, 0x80, 0x00, 0x72, 0x00, 0x03, 0x31, 0x80, 0x00, 0x53, 0x00, 0x03, 0x07, 0x80, 0x00, 0x73, 0x00, 0x03, 0x07, 0x80, 0x00, 0x53, 0x00, 0x03, 0x23, 0x80, 0x00, 0x73, 0x00, 0x03, 0x23, 0x80, 0x01, 0x5A, 0x00, 0x03, 0x07, 0x80, 0x01, 0x5B, 0x00, 0x03, 0x07, 0x80, 0x01, 0x60, 0x00, 0x03, 0x07, 0x80, 0x01, 0x61, 0x00, 0x03, 0x07, 0x80, 0x1E, 0x62, 0x00, 0x03, 0x07, 0x80, 0x1E, 0x63, 0x00, 0x03, 0x07, 0x80, 0x00, 0x54, 0x00, 0x03, 0x07, 0x80, 0x00, 0x74, 0x00, 0x03, 0x07, 0x80, 0x00, 0x54, 0x00, 0x03, 0x23, 0x80, 0x00, 0x74, 0x00, 0x03, 0x23, 0x80, 0x00, 0x54, 0x00, 0x03, 0x31, 0x80, 0x00, 0x74, 0x00, 0x03, 0x31, 0x80, 0x00, 0x54, 0x00, 0x03, 0x2D, 0x80, 0x00, 0x74, 0x00, 0x03, 0x2D, 0x80, 0x00, 0x55, 0x00, 0x03, 0x24, 0x80, 0x00, 0x75, 0x00, 0x03, 0x24, 0x80, 0x00, 0x55, 0x00, 0x03, 0x30, 0x80, 0x00, 0x75, 0x00, 0x03, 0x30, 0x80, 0x00, 0x55, 0x00, 0x03, 0x2D, 0x80, 0x00, 0x75, 0x00, 0x03, 0x2D, 0x80, 0x01, 0x68, 0x00, 0x03, 0x01, 0x80, 0x01, 0x69, 0x00, 0x03, 0x01, 0x80, 0x01, 0x6A, 0x00, 0x03, 0x08, 0x80, 0x01, 0x6B, 0x00, 0x03, 0x08, 0x80, 0x00, 0x56, 0x00, 0x03, 0x03, 0x80, 0x00, 0x76, 0x00, 0x03, 0x03, 0x80, 0x00, 0x56, 0x00, 0x03, 0x23, 0x80, 0x00, 0x76, 0x00, 0x03, 0x23, 0x80, 0x00, 0x57, 0x00, 0x03, 0x00, 0x80, 0x00, 0x77, 0x00, 0x03, 0x00, 0x80, 0x00, 0x57, 0x00, 0x03, 0x01, 0x80, 0x00, 0x77, 0x00, 0x03, 0x01, 0x80, 0x00, 0x57, 0x00, 0x03, 0x08, 0x80, 0x00, 0x77, 0x00, 0x03, 0x08, 0x80, 0x00, 0x57, 0x00, 0x03, 0x07, 0x80, 0x00, 0x77, 0x00, 0x03, 0x07, 0x80, 0x00, 0x57, 0x00, 0x03, 0x23, 0x80, 0x00, 0x77, 0x00, 0x03, 0x23, 0x80, 0x00, 0x58, 0x00, 0x03, 0x07, 0x80, 0x00, 0x78, 0x00, 0x03, 0x07, 0x80, 0x00, 0x58, 0x00, 0x03, 0x08, 0x80, 0x00, 0x78, 0x00, 0x03, 0x08, 0x80, 0x00, 0x59, 0x00, 0x03, 0x07, 0x80, 0x00, 0x79, 0x00, 0x03, 0x07, 0x80, 0x00, 0x5A, 0x00, 0x03, 0x02, 0x80, 0x00, 0x7A, 0x00, 0x03, 0x02, 0x80, 0x00, 0x5A, 0x00, 0x03, 0x23, 0x80, 0x00, 0x7A, 0x00, 0x03, 0x23, 0x80, 0x00, 0x5A, 0x00, 0x03, 0x31, 0x80, 0x00, 0x7A, 0x00, 0x03, 0x31, 0x80, 0x00, 0x68, 0x00, 0x03, 0x31, 0x80, 0x00, 0x74, 0x00, 0x03, 0x08, 0x80, 0x00, 0x77, 0x00, 0x03, 0x0A, 0x80, 0x00, 0x79, 0x00, 0x03, 0x0A, 0xC0, 0x00, 0x61, 0x00, 0x02, 0xBE, 0x80, 0x01, 0x7F, 0x00, 0x03, 0x07, 0x80, 0x00, 0x41, 0x00, 0x03, 0x23, 0x80, 0x00, 0x61, 0x00, 0x03, 0x23, 0x80, 0x00, 0x41, 0x00, 0x03, 0x09, 0x80, 0x00, 0x61, 0x00, 0x03, 0x09, 0x80, 0x00, 0xC2, 0x00, 0x03, 0x01, 0x80, 0x00, 0xE2, 0x00, 0x03, 0x01, 0x80, 0x00, 0xC2, 0x00, 0x03, 0x00, 0x80, 0x00, 0xE2, 0x00, 0x03, 0x00, 0x80, 0x00, 0xC2, 0x00, 0x03, 0x09, 0x80, 0x00, 0xE2, 0x00, 0x03, 0x09, 0x80, 0x00, 0xC2, 0x00, 0x03, 0x03, 0x80, 0x00, 0xE2, 0x00, 0x03, 0x03, 0x80, 0x1E, 0xA0, 0x00, 0x03, 0x02, 0x80, 0x1E, 0xA1, 0x00, 0x03, 0x02, 0x80, 0x01, 0x02, 0x00, 0x03, 0x01, 0x80, 0x01, 0x03, 0x00, 0x03, 0x01, 0x80, 0x01, 0x02, 0x00, 0x03, 0x00, 0x80, 0x01, 0x03, 0x00, 0x03, 0x00, 0x80, 0x01, 0x02, 0x00, 0x03, 0x09, 0x80, 0x01, 0x03, 0x00, 0x03, 0x09, 0x80, 0x01, 0x02, 0x00, 0x03, 0x03, 0x80, 0x01, 0x03, 0x00, 0x03, 0x03, 0x80, 0x1E, 0xA0, 0x00, 0x03, 0x06, 0x80, 0x1E, 0xA1, 0x00, 0x03, 0x06, 0x80, 0x00, 0x45, 0x00, 0x03, 0x23, 0x80, 0x00, 0x65, 0x00, 0x03, 0x23, 0x80, 0x00, 0x45, 0x00, 0x03, 0x09, 0x80, 0x00, 0x65, 0x00, 0x03, 0x09, 0x80, 0x00, 0x45, 0x00, 0x03, 0x03, 0x80, 0x00, 0x65, 0x00, 0x03, 0x03, 0x80, 0x00, 0xCA, 0x00, 0x03, 0x01, 0x80, 0x00, 0xEA, 0x00, 0x03, 0x01, 0x80, 0x00, 0xCA, 0x00, 0x03, 0x00, 0x80, 0x00, 0xEA, 0x00, 0x03, 0x00, 0x80, 0x00, 0xCA, 0x00, 0x03, 0x09, 0x80, 0x00, 0xEA, 0x00, 0x03, 0x09, 0x80, 0x00, 0xCA, 0x00, 0x03, 0x03, 0x80, 0x00, 0xEA, 0x00, 0x03, 0x03, 0x80, 0x1E, 0xB8, 0x00, 0x03, 0x02, 0x80, 0x1E, 0xB9, 0x00, 0x03, 0x02, 0x80, 0x00, 0x49, 0x00, 0x03, 0x09, 0x80, 0x00, 0x69, 0x00, 0x03, 0x09, 0x80, 0x00, 0x49, 0x00, 0x03, 0x23, 0x80, 0x00, 0x69, 0x00, 0x03, 0x23, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x23, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x23, 0x80, 0x00, 0x4F, 0x00, 0x03, 0x09, 0x80, 0x00, 0x6F, 0x00, 0x03, 0x09, 0x80, 0x00, 0xD4, 0x00, 0x03, 0x01, 0x80, 0x00, 0xF4, 0x00, 0x03, 0x01, 0x80, 0x00, 0xD4, 0x00, 0x03, 0x00, 0x80, 0x00, 0xF4, 0x00, 0x03, 0x00, 0x80, 0x00, 0xD4, 0x00, 0x03, 0x09, 0x80, 0x00, 0xF4, 0x00, 0x03, 0x09, 0x80, 0x00, 0xD4, 0x00, 0x03, 0x03, 0x80, 0x00, 0xF4, 0x00, 0x03, 0x03, 0x80, 0x1E, 0xCC, 0x00, 0x03, 0x02, 0x80, 0x1E, 0xCD, 0x00, 0x03, 0x02, 0x80, 0x01, 0xA0, 0x00, 0x03, 0x01, 0x80, 0x01, 0xA1, 0x00, 0x03, 0x01, 0x80, 0x01, 0xA0, 0x00, 0x03, 0x00, 0x80, 0x01, 0xA1, 0x00, 0x03, 0x00, 0x80, 0x01, 0xA0, 0x00, 0x03, 0x09, 0x80, 0x01, 0xA1, 0x00, 0x03, 0x09, 0x80, 0x01, 0xA0, 0x00, 0x03, 0x03, 0x80, 0x01, 0xA1, 0x00, 0x03, 0x03, 0x80, 0x01, 0xA0, 0x00, 0x03, 0x23, 0x80, 0x01, 0xA1, 0x00, 0x03, 0x23, 0x80, 0x00, 0x55, 0x00, 0x03, 0x23, 0x80, 0x00, 0x75, 0x00, 0x03, 0x23, 0x80, 0x00, 0x55, 0x00, 0x03, 0x09, 0x80, 0x00, 0x75, 0x00, 0x03, 0x09, 0x80, 0x01, 0xAF, 0x00, 0x03, 0x01, 0x80, 0x01, 0xB0, 0x00, 0x03, 0x01, 0x80, 0x01, 0xAF, 0x00, 0x03, 0x00, 0x80, 0x01, 0xB0, 0x00, 0x03, 0x00, 0x80, 0x01, 0xAF, 0x00, 0x03, 0x09, 0x80, 0x01, 0xB0, 0x00, 0x03, 0x09, 0x80, 0x01, 0xAF, 0x00, 0x03, 0x03, 0x80, 0x01, 0xB0, 0x00, 0x03, 0x03, 0x80, 0x01, 0xAF, 0x00, 0x03, 0x23, 0x80, 0x01, 0xB0, 0x00, 0x03, 0x23, 0x80, 0x00, 0x59, 0x00, 0x03, 0x00, 0x80, 0x00, 0x79, 0x00, 0x03, 0x00, 0x80, 0x00, 0x59, 0x00, 0x03, 0x23, 0x80, 0x00, 0x79, 0x00, 0x03, 0x23, 0x80, 0x00, 0x59, 0x00, 0x03, 0x09, 0x80, 0x00, 0x79, 0x00, 0x03, 0x09, 0x80, 0x00, 0x59, 0x00, 0x03, 0x03, 0x80, 0x00, 0x79, 0x00, 0x03, 0x03, 0x80, 0x03, 0xB1, 0x00, 0x03, 0x13, 0x80, 0x03, 0xB1, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x00, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x01, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x01, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x00, 0x00, 0x03, 0x42, 0x80, 0x1F, 0x01, 0x00, 0x03, 0x42, 0x80, 0x03, 0x91, 0x00, 0x03, 0x13, 0x80, 0x03, 0x91, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x08, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x09, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x08, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x09, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x08, 0x00, 0x03, 0x42, 0x80, 0x1F, 0x09, 0x00, 0x03, 0x42, 0x80, 0x03, 0xB5, 0x00, 0x03, 0x13, 0x80, 0x03, 0xB5, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x10, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x11, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x10, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x11, 0x00, 0x03, 0x01, 0x80, 0x03, 0x95, 0x00, 0x03, 0x13, 0x80, 0x03, 0x95, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x18, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x19, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x18, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x19, 0x00, 0x03, 0x01, 0x80, 0x03, 0xB7, 0x00, 0x03, 0x13, 0x80, 0x03, 0xB7, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x20, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x21, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x20, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x21, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x20, 0x00, 0x03, 0x42, 0x80, 0x1F, 0x21, 0x00, 0x03, 0x42, 0x80, 0x03, 0x97, 0x00, 0x03, 0x13, 0x80, 0x03, 0x97, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x28, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x29, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x28, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x29, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x28, 0x00, 0x03, 0x42, 0x80, 0x1F, 0x29, 0x00, 0x03, 0x42, 0x80, 0x03, 0xB9, 0x00, 0x03, 0x13, 0x80, 0x03, 0xB9, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x30, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x31, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x30, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x31, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x30, 0x00, 0x03, 0x42, 0x80, 0x1F, 0x31, 0x00, 0x03, 0x42, 0x80, 0x03, 0x99, 0x00, 0x03, 0x13, 0x80, 0x03, 0x99, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x38, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x39, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x38, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x39, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x38, 0x00, 0x03, 0x42, 0x80, 0x1F, 0x39, 0x00, 0x03, 0x42, 0x80, 0x03, 0xBF, 0x00, 0x03, 0x13, 0x80, 0x03, 0xBF, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x40, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x41, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x40, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x41, 0x00, 0x03, 0x01, 0x80, 0x03, 0x9F, 0x00, 0x03, 0x13, 0x80, 0x03, 0x9F, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x48, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x49, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x48, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x49, 0x00, 0x03, 0x01, 0x80, 0x03, 0xC5, 0x00, 0x03, 0x13, 0x80, 0x03, 0xC5, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x50, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x51, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x50, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x51, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x50, 0x00, 0x03, 0x42, 0x80, 0x1F, 0x51, 0x00, 0x03, 0x42, 0x80, 0x03, 0xA5, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x59, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x59, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x59, 0x00, 0x03, 0x42, 0x80, 0x03, 0xC9, 0x00, 0x03, 0x13, 0x80, 0x03, 0xC9, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x60, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x61, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x60, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x61, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x60, 0x00, 0x03, 0x42, 0x80, 0x1F, 0x61, 0x00, 0x03, 0x42, 0x80, 0x03, 0xA9, 0x00, 0x03, 0x13, 0x80, 0x03, 0xA9, 0x00, 0x03, 0x14, 0x80, 0x1F, 0x68, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x69, 0x00, 0x03, 0x00, 0x80, 0x1F, 0x68, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x69, 0x00, 0x03, 0x01, 0x80, 0x1F, 0x68, 0x00, 0x03, 0x42, 0x80, 0x1F, 0x69, 0x00, 0x03, 0x42, 0x80, 0x03, 0xB1, 0x00, 0x03, 0x00, 0x00, 0x03, 0xAC, 0x80, 0x03, 0xB5, 0x00, 0x03, 0x00, 0x00, 0x03, 0xAD, 0x80, 0x03, 0xB7, 0x00, 0x03, 0x00, 0x00, 0x03, 0xAE, 0x80, 0x03, 0xB9, 0x00, 0x03, 0x00, 0x00, 0x03, 0xAF, 0x80, 0x03, 0xBF, 0x00, 0x03, 0x00, 0x00, 0x03, 0xCC, 0x80, 0x03, 0xC5, 0x00, 0x03, 0x00, 0x00, 0x03, 0xCD, 0x80, 0x03, 0xC9, 0x00, 0x03, 0x00, 0x00, 0x03, 0xCE, 0x80, 0x1F, 0x00, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x01, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x02, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x03, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x04, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x05, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x06, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x07, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x08, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x09, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x0A, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x0B, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x0C, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x0D, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x0E, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x0F, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x20, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x21, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x22, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x23, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x24, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x25, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x26, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x27, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x28, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x29, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x2A, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x2B, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x2C, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x2D, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x2E, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x2F, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x60, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x61, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x62, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x63, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x64, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x65, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x66, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x67, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x68, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x69, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x6A, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x6B, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x6C, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x6D, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x6E, 0x00, 0x03, 0x45, 0x80, 0x1F, 0x6F, 0x00, 0x03, 0x45, 0x80, 0x03, 0xB1, 0x00, 0x03, 0x06, 0x80, 0x03, 0xB1, 0x00, 0x03, 0x04, 0x80, 0x1F, 0x70, 0x00, 0x03, 0x45, 0x80, 0x03, 0xB1, 0x00, 0x03, 0x45, 0x80, 0x03, 0xAC, 0x00, 0x03, 0x45, 0x80, 0x03, 0xB1, 0x00, 0x03, 0x42, 0x80, 0x1F, 0xB6, 0x00, 0x03, 0x45, 0x80, 0x03, 0x91, 0x00, 0x03, 0x06, 0x80, 0x03, 0x91, 0x00, 0x03, 0x04, 0x80, 0x03, 0x91, 0x00, 0x03, 0x00, 0x00, 0x03, 0x86, 0x80, 0x03, 0x91, 0x00, 0x03, 0x45, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x13, 0x00, 0x03, 0xB9, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x13, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x42, 0x80, 0x00, 0xA8, 0x00, 0x03, 0x42, 0x80, 0x1F, 0x74, 0x00, 0x03, 0x45, 0x80, 0x03, 0xB7, 0x00, 0x03, 0x45, 0x80, 0x03, 0xAE, 0x00, 0x03, 0x45, 0x80, 0x03, 0xB7, 0x00, 0x03, 0x42, 0x80, 0x1F, 0xC6, 0x00, 0x03, 0x45, 0x80, 0x03, 0x95, 0x00, 0x03, 0x00, 0x00, 0x03, 0x88, 0x80, 0x03, 0x97, 0x00, 0x03, 0x00, 0x00, 0x03, 0x89, 0x80, 0x03, 0x97, 0x00, 0x03, 0x45, 0x80, 0x1F, 0xBF, 0x00, 0x03, 0x00, 0x80, 0x1F, 0xBF, 0x00, 0x03, 0x01, 0x80, 0x1F, 0xBF, 0x00, 0x03, 0x42, 0x80, 0x03, 0xB9, 0x00, 0x03, 0x06, 0x80, 0x03, 0xB9, 0x00, 0x03, 0x04, 0x80, 0x03, 0xCA, 0x00, 0x03, 0x00, 0x00, 0x03, 0x90, 0x80, 0x03, 0xB9, 0x00, 0x03, 0x42, 0x80, 0x03, 0xCA, 0x00, 0x03, 0x42, 0x80, 0x03, 0x99, 0x00, 0x03, 0x06, 0x80, 0x03, 0x99, 0x00, 0x03, 0x04, 0x80, 0x03, 0x99, 0x00, 0x03, 0x00, 0x00, 0x03, 0x8A, 0x80, 0x1F, 0xFE, 0x00, 0x03, 0x00, 0x80, 0x1F, 0xFE, 0x00, 0x03, 0x01, 0x80, 0x1F, 0xFE, 0x00, 0x03, 0x42, 0x80, 0x03, 0xC5, 0x00, 0x03, 0x06, 0x80, 0x03, 0xC5, 0x00, 0x03, 0x04, 0x80, 0x03, 0xCB, 0x00, 0x03, 0x00, 0x00, 0x03, 0xB0, 0x80, 0x03, 0xC1, 0x00, 0x03, 0x13, 0x80, 0x03, 0xC1, 0x00, 0x03, 0x14, 0x80, 0x03, 0xC5, 0x00, 0x03, 0x42, 0x80, 0x03, 0xCB, 0x00, 0x03, 0x42, 0x80, 0x03, 0xA5, 0x00, 0x03, 0x06, 0x80, 0x03, 0xA5, 0x00, 0x03, 0x04, 0x80, 0x03, 0xA5, 0x00, 0x03, 0x00, 0x00, 0x03, 0x8E, 0x80, 0x03, 0xA1, 0x00, 0x03, 0x14, 0x80, 0x00, 0xA8, 0x00, 0x03, 0x00, 0x00, 0x03, 0x85, 0x00, 0x00, 0x60, 0x80, 0x1F, 0x7C, 0x00, 0x03, 0x45, 0x80, 0x03, 0xC9, 0x00, 0x03, 0x45, 0x80, 0x03, 0xCE, 0x00, 0x03, 0x45, 0x80, 0x03, 0xC9, 0x00, 0x03, 0x42, 0x80, 0x1F, 0xF6, 0x00, 0x03, 0x45, 0x80, 0x03, 0x9F, 0x00, 0x03, 0x00, 0x00, 0x03, 0x8C, 0x80, 0x03, 0xA9, 0x00, 0x03, 0x00, 0x00, 0x03, 0x8F, 0x80, 0x03, 0xA9, 0x00, 0x03, 0x45, 0x00, 0x00, 0xB4, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x14, 0x00, 0x20, 0x02, 0x00, 0x20, 0x03, 0x40, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0x20, 0x08, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0x20, 0x08, 0x20, 0x10, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x33, 0x40, 0x00, 0x2E, 0xC0, 0x00, 0x2E, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x2E, 0x80, 0x00, 0x2E, 0x00, 0x00, 0x2E, 0x08, 0x00, 0x20, 0xC0, 0x20, 0x32, 0x00, 0x20, 0x32, 0xC0, 0x20, 0x32, 0x80, 0x20, 0x32, 0x00, 0x20, 0x32, 0xC0, 0x20, 0x35, 0x00, 0x20, 0x35, 0xC0, 0x20, 0x35, 0x80, 0x20, 0x35, 0x00, 0x20, 0x35, 0xC0, 0x00, 0x21, 0x00, 0x00, 0x21, 0xC0, 0x00, 0x20, 0x00, 0x03, 0x05, 0xC0, 0x00, 0x3F, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0x00, 0x00, 0x21, 0xC0, 0x00, 0x21, 0x00, 0x00, 0x3F, 0xC0, 0x20, 0x32, 0x80, 0x20, 0x32, 0x80, 0x20, 0x32, 0x00, 0x20, 0x32, 0x40, 0x00, 0x20, 0x20, 0x00, 0x30, 0x20, 0x00, 0x69, 0x20, 0x00, 0x34, 0x20, 0x00, 0x35, 0x20, 0x00, 0x36, 0x20, 0x00, 0x37, 0x20, 0x00, 0x38, 0x20, 0x00, 0x39, 0x20, 0x00, 0x2B, 0x20, 0x22, 0x12, 0x20, 0x00, 0x3D, 0x20, 0x00, 0x28, 0x20, 0x00, 0x29, 0x20, 0x00, 0x6E, 0x24, 0x00, 0x30, 0x24, 0x00, 0x31, 0x24, 0x00, 0x32, 0x24, 0x00, 0x33, 0x24, 0x00, 0x34, 0x24, 0x00, 0x35, 0x24, 0x00, 0x36, 0x24, 0x00, 0x37, 0x24, 0x00, 0x38, 0x24, 0x00, 0x39, 0x24, 0x00, 0x2B, 0x24, 0x22, 0x12, 0x24, 0x00, 0x3D, 0x24, 0x00, 0x28, 0x24, 0x00, 0x29, 0x24, 0x00, 0x61, 0x24, 0x00, 0x65, 0x24, 0x00, 0x6F, 0x24, 0x00, 0x78, 0x24, 0x02, 0x59, 0x24, 0x00, 0x68, 0x24, 0x00, 0x6B, 0x24, 0x00, 0x6C, 0x24, 0x00, 0x6D, 0x24, 0x00, 0x6E, 0x24, 0x00, 0x70, 0x24, 0x00, 0x73, 0x24, 0x00, 0x74, 0xC0, 0x00, 0x52, 0x00, 0x00, 0x73, 0xC0, 0x00, 0x61, 0x80, 0x00, 0x2F, 0x00, 0x00, 0x63, 0xC0, 0x00, 0x61, 0x80, 0x00, 0x2F, 0x00, 0x00, 0x73, 0x04, 0x00, 0x43, 0xC0, 0x00, 0xB0, 0x00, 0x00, 0x43, 0xC0, 0x00, 0x63, 0x80, 0x00, 0x2F, 0x00, 0x00, 0x6F, 0xC0, 0x00, 0x63, 0x80, 0x00, 0x2F, 0x00, 0x00, 0x75, 0x40, 0x01, 0x90, 0xC0, 0x00, 0xB0, 0x00, 0x00, 0x46, 0x04, 0x00, 0x67, 0x04, 0x00, 0x48, 0x04, 0x00, 0x48, 0x04, 0x00, 0x48, 0x04, 0x00, 0x68, 0x04, 0x01, 0x27, 0x04, 0x00, 0x49, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x4E, 0xC0, 0x00, 0x4E, 0x00, 0x00, 0x6F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x52, 0x04, 0x00, 0x52, 0xA0, 0x00, 0x53, 0x00, 0x00, 0x4D, 0xC0, 0x00, 0x54, 0x80, 0x00, 0x45, 0x00, 0x00, 0x4C, 0xA0, 0x00, 0x54, 0x00, 0x00, 0x4D, 0x04, 0x00, 0x5A, 0x00, 0x03, 0xA9, 0x04, 0x00, 0x5A, 0x00, 0x00, 0x4B, 0x00, 0x00, 0xC5, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x65, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x6F, 0x40, 0x05, 0xD0, 0x40, 0x05, 0xD1, 0x40, 0x05, 0xD2, 0x40, 0x05, 0xD3, 0x04, 0x00, 0x69, 0xC0, 0x00, 0x46, 0x80, 0x00, 0x41, 0x00, 0x00, 0x58, 0x04, 0x03, 0xC0, 0x04, 0x03, 0xB3, 0x04, 0x03, 0x93, 0x04, 0x03, 0xA0, 0x04, 0x22, 0x11, 0x04, 0x00, 0x44, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0xBC, 0x00, 0x31, 0x80, 0x20, 0x44, 0x00, 0x00, 0x37, 0xBC, 0x00, 0x31, 0x80, 0x20, 0x44, 0x00, 0x00, 0x39, 0xBC, 0x00, 0x31, 0x80, 0x20, 0x44, 0x80, 0x00, 0x31, 0x00, 0x00, 0x30, 0xBC, 0x00, 0x31, 0x80, 0x20, 0x44, 0x00, 0x00, 0x33, 0xBC, 0x00, 0x32, 0x80, 0x20, 0x44, 0x00, 0x00, 0x33, 0xBC, 0x00, 0x31, 0x80, 0x20, 0x44, 0x00, 0x00, 0x35, 0xBC, 0x00, 0x32, 0x80, 0x20, 0x44, 0x00, 0x00, 0x35, 0xBC, 0x00, 0x33, 0x80, 0x20, 0x44, 0x00, 0x00, 0x35, 0xBC, 0x00, 0x34, 0x80, 0x20, 0x44, 0x00, 0x00, 0x35, 0xBC, 0x00, 0x31, 0x80, 0x20, 0x44, 0x00, 0x00, 0x36, 0xBC, 0x00, 0x35, 0x80, 0x20, 0x44, 0x00, 0x00, 0x36, 0xBC, 0x00, 0x31, 0x80, 0x20, 0x44, 0x00, 0x00, 0x38, 0xBC, 0x00, 0x33, 0x80, 0x20, 0x44, 0x00, 0x00, 0x38, 0xBC, 0x00, 0x35, 0x80, 0x20, 0x44, 0x00, 0x00, 0x38, 0xBC, 0x00, 0x37, 0x80, 0x20, 0x44, 0x00, 0x00, 0x38, 0xBC, 0x00, 0x31, 0x00, 0x20, 0x44, 0x40, 0x00, 0x49, 0xC0, 0x00, 0x49, 0x00, 0x00, 0x49, 0xC0, 0x00, 0x49, 0x80, 0x00, 0x49, 0x00, 0x00, 0x49, 0xC0, 0x00, 0x49, 0x00, 0x00, 0x56, 0x40, 0x00, 0x56, 0xC0, 0x00, 0x56, 0x00, 0x00, 0x49, 0xC0, 0x00, 0x56, 0x80, 0x00, 0x49, 0x00, 0x00, 0x49, 0xC0, 0x00, 0x56, 0x80, 0x00, 0x49, 0x80, 0x00, 0x49, 0x00, 0x00, 0x49, 0xC0, 0x00, 0x49, 0x00, 0x00, 0x58, 0x40, 0x00, 0x58, 0xC0, 0x00, 0x58, 0x00, 0x00, 0x49, 0xC0, 0x00, 0x58, 0x80, 0x00, 0x49, 0x00, 0x00, 0x49, 0x40, 0x00, 0x4C, 0x40, 0x00, 0x43, 0x40, 0x00, 0x44, 0x40, 0x00, 0x4D, 0x40, 0x00, 0x69, 0xC0, 0x00, 0x69, 0x00, 0x00, 0x69, 0xC0, 0x00, 0x69, 0x80, 0x00, 0x69, 0x00, 0x00, 0x69, 0xC0, 0x00, 0x69, 0x00, 0x00, 0x76, 0x40, 0x00, 0x76, 0xC0, 0x00, 0x76, 0x00, 0x00, 0x69, 0xC0, 0x00, 0x76, 0x80, 0x00, 0x69, 0x00, 0x00, 0x69, 0xC0, 0x00, 0x76, 0x80, 0x00, 0x69, 0x80, 0x00, 0x69, 0x00, 0x00, 0x69, 0xC0, 0x00, 0x69, 0x00, 0x00, 0x78, 0x40, 0x00, 0x78, 0xC0, 0x00, 0x78, 0x00, 0x00, 0x69, 0xC0, 0x00, 0x78, 0x80, 0x00, 0x69, 0x00, 0x00, 0x69, 0x40, 0x00, 0x6C, 0x40, 0x00, 0x63, 0x40, 0x00, 0x64, 0x40, 0x00, 0x6D, 0xBC, 0x00, 0x30, 0x80, 0x20, 0x44, 0x00, 0x00, 0x33, 0x80, 0x21, 0x90, 0x00, 0x03, 0x38, 0x80, 0x21, 0x92, 0x00, 0x03, 0x38, 0x80, 0x21, 0x94, 0x00, 0x03, 0x38, 0x80, 0x21, 0xD0, 0x00, 0x03, 0x38, 0x80, 0x21, 0xD4, 0x00, 0x03, 0x38, 0x80, 0x21, 0xD2, 0x00, 0x03, 0x38, 0x80, 0x22, 0x03, 0x00, 0x03, 0x38, 0x80, 0x22, 0x08, 0x00, 0x03, 0x38, 0x80, 0x22, 0x0B, 0x00, 0x03, 0x38, 0x80, 0x22, 0x23, 0x00, 0x03, 0x38, 0x80, 0x22, 0x25, 0x00, 0x03, 0x38, 0xC0, 0x22, 0x2B, 0x00, 0x22, 0x2B, 0xC0, 0x22, 0x2B, 0x80, 0x22, 0x2B, 0x00, 0x22, 0x2B, 0xC0, 0x22, 0x2E, 0x00, 0x22, 0x2E, 0xC0, 0x22, 0x2E, 0x80, 0x22, 0x2E, 0x00, 0x22, 0x2E, 0x80, 0x22, 0x3C, 0x00, 0x03, 0x38, 0x80, 0x22, 0x43, 0x00, 0x03, 0x38, 0x80, 0x22, 0x45, 0x00, 0x03, 0x38, 0x80, 0x22, 0x48, 0x00, 0x03, 0x38, 0x80, 0x00, 0x3D, 0x00, 0x03, 0x38, 0x80, 0x22, 0x61, 0x00, 0x03, 0x38, 0x80, 0x22, 0x4D, 0x00, 0x03, 0x38, 0x80, 0x00, 0x3C, 0x00, 0x03, 0x38, 0x80, 0x00, 0x3E, 0x00, 0x03, 0x38, 0x80, 0x22, 0x64, 0x00, 0x03, 0x38, 0x80, 0x22, 0x65, 0x00, 0x03, 0x38, 0x80, 0x22, 0x72, 0x00, 0x03, 0x38, 0x80, 0x22, 0x73, 0x00, 0x03, 0x38, 0x80, 0x22, 0x76, 0x00, 0x03, 0x38, 0x80, 0x22, 0x77, 0x00, 0x03, 0x38, 0x80, 0x22, 0x7A, 0x00, 0x03, 0x38, 0x80, 0x22, 0x7B, 0x00, 0x03, 0x38, 0x80, 0x22, 0x82, 0x00, 0x03, 0x38, 0x80, 0x22, 0x83, 0x00, 0x03, 0x38, 0x80, 0x22, 0x86, 0x00, 0x03, 0x38, 0x80, 0x22, 0x87, 0x00, 0x03, 0x38, 0x80, 0x22, 0xA2, 0x00, 0x03, 0x38, 0x80, 0x22, 0xA8, 0x00, 0x03, 0x38, 0x80, 0x22, 0xA9, 0x00, 0x03, 0x38, 0x80, 0x22, 0xAB, 0x00, 0x03, 0x38, 0x80, 0x22, 0x7C, 0x00, 0x03, 0x38, 0x80, 0x22, 0x7D, 0x00, 0x03, 0x38, 0x80, 0x22, 0x91, 0x00, 0x03, 0x38, 0x80, 0x22, 0x92, 0x00, 0x03, 0x38, 0x80, 0x22, 0xB2, 0x00, 0x03, 0x38, 0x80, 0x22, 0xB3, 0x00, 0x03, 0x38, 0x80, 0x22, 0xB4, 0x00, 0x03, 0x38, 0x80, 0x22, 0xB5, 0x00, 0x03, 0x38, 0x00, 0x30, 0x08, 0x00, 0x30, 0x09, 0x1C, 0x00, 0x31, 0x1C, 0x00, 0x32, 0x1C, 0x00, 0x33, 0x1C, 0x00, 0x34, 0x1C, 0x00, 0x35, 0x1C, 0x00, 0x36, 0x1C, 0x00, 0x37, 0x1C, 0x00, 0x38, 0x1C, 0x00, 0x39, 0x9C, 0x00, 0x31, 0x00, 0x00, 0x30, 0x9C, 0x00, 0x31, 0x00, 0x00, 0x31, 0x9C, 0x00, 0x31, 0x00, 0x00, 0x32, 0x9C, 0x00, 0x31, 0x00, 0x00, 0x33, 0x9C, 0x00, 0x31, 0x00, 0x00, 0x34, 0x9C, 0x00, 0x31, 0x00, 0x00, 0x35, 0x9C, 0x00, 0x31, 0x00, 0x00, 0x36, 0x9C, 0x00, 0x31, 0x00, 0x00, 0x37, 0x9C, 0x00, 0x31, 0x00, 0x00, 0x38, 0x9C, 0x00, 0x31, 0x00, 0x00, 0x39, 0x9C, 0x00, 0x32, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x32, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x33, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x34, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x35, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x36, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x37, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x38, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x39, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x80, 0x00, 0x30, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x80, 0x00, 0x31, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x80, 0x00, 0x32, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x80, 0x00, 0x33, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x80, 0x00, 0x34, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x80, 0x00, 0x35, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x80, 0x00, 0x36, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x80, 0x00, 0x37, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x80, 0x00, 0x38, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x31, 0x80, 0x00, 0x39, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x32, 0x80, 0x00, 0x30, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x31, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x32, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x33, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x34, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x35, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x36, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x37, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x38, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x39, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x30, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x31, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x32, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x33, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x34, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x35, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x36, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x37, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x38, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x39, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x30, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x62, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x63, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x64, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x65, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x66, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x67, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x68, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x69, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x6A, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x6B, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x6C, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x6D, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x6E, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x6F, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x70, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x71, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x72, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x73, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x74, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x75, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x76, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x77, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x78, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x79, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x7A, 0x00, 0x00, 0x29, 0x1C, 0x00, 0x41, 0x1C, 0x00, 0x42, 0x1C, 0x00, 0x43, 0x1C, 0x00, 0x44, 0x1C, 0x00, 0x45, 0x1C, 0x00, 0x46, 0x1C, 0x00, 0x47, 0x1C, 0x00, 0x48, 0x1C, 0x00, 0x49, 0x1C, 0x00, 0x4A, 0x1C, 0x00, 0x4B, 0x1C, 0x00, 0x4C, 0x1C, 0x00, 0x4D, 0x1C, 0x00, 0x4E, 0x1C, 0x00, 0x4F, 0x1C, 0x00, 0x50, 0x1C, 0x00, 0x51, 0x1C, 0x00, 0x52, 0x1C, 0x00, 0x53, 0x1C, 0x00, 0x54, 0x1C, 0x00, 0x55, 0x1C, 0x00, 0x56, 0x1C, 0x00, 0x57, 0x1C, 0x00, 0x58, 0x1C, 0x00, 0x59, 0x1C, 0x00, 0x5A, 0x1C, 0x00, 0x61, 0x1C, 0x00, 0x62, 0x1C, 0x00, 0x63, 0x1C, 0x00, 0x64, 0x1C, 0x00, 0x65, 0x1C, 0x00, 0x66, 0x1C, 0x00, 0x67, 0x1C, 0x00, 0x68, 0x1C, 0x00, 0x69, 0x1C, 0x00, 0x6A, 0x1C, 0x00, 0x6B, 0x1C, 0x00, 0x6C, 0x1C, 0x00, 0x6D, 0x1C, 0x00, 0x6E, 0x1C, 0x00, 0x6F, 0x1C, 0x00, 0x70, 0x1C, 0x00, 0x71, 0x1C, 0x00, 0x72, 0x1C, 0x00, 0x73, 0x1C, 0x00, 0x74, 0x1C, 0x00, 0x75, 0x1C, 0x00, 0x76, 0x1C, 0x00, 0x77, 0x1C, 0x00, 0x78, 0x1C, 0x00, 0x79, 0x1C, 0x00, 0x7A, 0x1C, 0x00, 0x30, 0xC0, 0x22, 0x2B, 0x80, 0x22, 0x2B, 0x80, 0x22, 0x2B, 0x00, 0x22, 0x2B, 0xC0, 0x00, 0x3A, 0x80, 0x00, 0x3A, 0x00, 0x00, 0x3D, 0xC0, 0x00, 0x3D, 0x00, 0x00, 0x3D, 0xC0, 0x00, 0x3D, 0x80, 0x00, 0x3D, 0x00, 0x00, 0x3D, 0x80, 0x2A, 0xDD, 0x00, 0x03, 0x38, 0x24, 0x00, 0x6A, 0x20, 0x00, 0x56, 0x20, 0x2D, 0x61, 0x40, 0x6B, 0xCD, 0x40, 0x9F, 0x9F, 0x40, 0x4E, 0x00, 0x40, 0x4E, 0x28, 0x40, 0x4E, 0x36, 0x40, 0x4E, 0x3F, 0x40, 0x4E, 0x59, 0x40, 0x4E, 0x85, 0x40, 0x4E, 0x8C, 0x40, 0x4E, 0xA0, 0x40, 0x4E, 0xBA, 0x40, 0x51, 0x3F, 0x40, 0x51, 0x65, 0x40, 0x51, 0x6B, 0x40, 0x51, 0x82, 0x40, 0x51, 0x96, 0x40, 0x51, 0xAB, 0x40, 0x51, 0xE0, 0x40, 0x51, 0xF5, 0x40, 0x52, 0x00, 0x40, 0x52, 0x9B, 0x40, 0x52, 0xF9, 0x40, 0x53, 0x15, 0x40, 0x53, 0x1A, 0x40, 0x53, 0x38, 0x40, 0x53, 0x41, 0x40, 0x53, 0x5C, 0x40, 0x53, 0x69, 0x40, 0x53, 0x82, 0x40, 0x53, 0xB6, 0x40, 0x53, 0xC8, 0x40, 0x53, 0xE3, 0x40, 0x56, 0xD7, 0x40, 0x57, 0x1F, 0x40, 0x58, 0xEB, 0x40, 0x59, 0x02, 0x40, 0x59, 0x0A, 0x40, 0x59, 0x15, 0x40, 0x59, 0x27, 0x40, 0x59, 0x73, 0x40, 0x5B, 0x50, 0x40, 0x5B, 0x80, 0x40, 0x5B, 0xF8, 0x40, 0x5C, 0x0F, 0x40, 0x5C, 0x22, 0x40, 0x5C, 0x38, 0x40, 0x5C, 0x6E, 0x40, 0x5C, 0x71, 0x40, 0x5D, 0xDB, 0x40, 0x5D, 0xE5, 0x40, 0x5D, 0xF1, 0x40, 0x5D, 0xFE, 0x40, 0x5E, 0x72, 0x40, 0x5E, 0x7A, 0x40, 0x5E, 0x7F, 0x40, 0x5E, 0xF4, 0x40, 0x5E, 0xFE, 0x40, 0x5F, 0x0B, 0x40, 0x5F, 0x13, 0x40, 0x5F, 0x50, 0x40, 0x5F, 0x61, 0x40, 0x5F, 0x73, 0x40, 0x5F, 0xC3, 0x40, 0x62, 0x08, 0x40, 0x62, 0x36, 0x40, 0x62, 0x4B, 0x40, 0x65, 0x2F, 0x40, 0x65, 0x34, 0x40, 0x65, 0x87, 0x40, 0x65, 0x97, 0x40, 0x65, 0xA4, 0x40, 0x65, 0xB9, 0x40, 0x65, 0xE0, 0x40, 0x65, 0xE5, 0x40, 0x66, 0xF0, 0x40, 0x67, 0x08, 0x40, 0x67, 0x28, 0x40, 0x6B, 0x20, 0x40, 0x6B, 0x62, 0x40, 0x6B, 0x79, 0x40, 0x6B, 0xB3, 0x40, 0x6B, 0xCB, 0x40, 0x6B, 0xD4, 0x40, 0x6B, 0xDB, 0x40, 0x6C, 0x0F, 0x40, 0x6C, 0x14, 0x40, 0x6C, 0x34, 0x40, 0x70, 0x6B, 0x40, 0x72, 0x2A, 0x40, 0x72, 0x36, 0x40, 0x72, 0x3B, 0x40, 0x72, 0x3F, 0x40, 0x72, 0x47, 0x40, 0x72, 0x59, 0x40, 0x72, 0x5B, 0x40, 0x72, 0xAC, 0x40, 0x73, 0x84, 0x40, 0x73, 0x89, 0x40, 0x74, 0xDC, 0x40, 0x74, 0xE6, 0x40, 0x75, 0x18, 0x40, 0x75, 0x1F, 0x40, 0x75, 0x28, 0x40, 0x75, 0x30, 0x40, 0x75, 0x8B, 0x40, 0x75, 0x92, 0x40, 0x76, 0x76, 0x40, 0x76, 0x7D, 0x40, 0x76, 0xAE, 0x40, 0x76, 0xBF, 0x40, 0x76, 0xEE, 0x40, 0x77, 0xDB, 0x40, 0x77, 0xE2, 0x40, 0x77, 0xF3, 0x40, 0x79, 0x3A, 0x40, 0x79, 0xB8, 0x40, 0x79, 0xBE, 0x40, 0x7A, 0x74, 0x40, 0x7A, 0xCB, 0x40, 0x7A, 0xF9, 0x40, 0x7C, 0x73, 0x40, 0x7C, 0xF8, 0x40, 0x7F, 0x36, 0x40, 0x7F, 0x51, 0x40, 0x7F, 0x8A, 0x40, 0x7F, 0xBD, 0x40, 0x80, 0x01, 0x40, 0x80, 0x0C, 0x40, 0x80, 0x12, 0x40, 0x80, 0x33, 0x40, 0x80, 0x7F, 0x40, 0x80, 0x89, 0x40, 0x81, 0xE3, 0x40, 0x81, 0xEA, 0x40, 0x81, 0xF3, 0x40, 0x81, 0xFC, 0x40, 0x82, 0x0C, 0x40, 0x82, 0x1B, 0x40, 0x82, 0x1F, 0x40, 0x82, 0x6E, 0x40, 0x82, 0x72, 0x40, 0x82, 0x78, 0x40, 0x86, 0x4D, 0x40, 0x86, 0x6B, 0x40, 0x88, 0x40, 0x40, 0x88, 0x4C, 0x40, 0x88, 0x63, 0x40, 0x89, 0x7E, 0x40, 0x89, 0x8B, 0x40, 0x89, 0xD2, 0x40, 0x8A, 0x00, 0x40, 0x8C, 0x37, 0x40, 0x8C, 0x46, 0x40, 0x8C, 0x55, 0x40, 0x8C, 0x78, 0x40, 0x8C, 0x9D, 0x40, 0x8D, 0x64, 0x40, 0x8D, 0x70, 0x40, 0x8D, 0xB3, 0x40, 0x8E, 0xAB, 0x40, 0x8E, 0xCA, 0x40, 0x8F, 0x9B, 0x40, 0x8F, 0xB0, 0x40, 0x8F, 0xB5, 0x40, 0x90, 0x91, 0x40, 0x91, 0x49, 0x40, 0x91, 0xC6, 0x40, 0x91, 0xCC, 0x40, 0x91, 0xD1, 0x40, 0x95, 0x77, 0x40, 0x95, 0x80, 0x40, 0x96, 0x1C, 0x40, 0x96, 0xB6, 0x40, 0x96, 0xB9, 0x40, 0x96, 0xE8, 0x40, 0x97, 0x51, 0x40, 0x97, 0x5E, 0x40, 0x97, 0x62, 0x40, 0x97, 0x69, 0x40, 0x97, 0xCB, 0x40, 0x97, 0xED, 0x40, 0x97, 0xF3, 0x40, 0x98, 0x01, 0x40, 0x98, 0xA8, 0x40, 0x98, 0xDB, 0x40, 0x98, 0xDF, 0x40, 0x99, 0x96, 0x40, 0x99, 0x99, 0x40, 0x99, 0xAC, 0x40, 0x9A, 0xA8, 0x40, 0x9A, 0xD8, 0x40, 0x9A, 0xDF, 0x40, 0x9B, 0x25, 0x40, 0x9B, 0x2F, 0x40, 0x9B, 0x32, 0x40, 0x9B, 0x3C, 0x40, 0x9B, 0x5A, 0x40, 0x9C, 0xE5, 0x40, 0x9E, 0x75, 0x40, 0x9E, 0x7F, 0x40, 0x9E, 0xA5, 0x40, 0x9E, 0xBB, 0x40, 0x9E, 0xC3, 0x40, 0x9E, 0xCD, 0x40, 0x9E, 0xD1, 0x40, 0x9E, 0xF9, 0x40, 0x9E, 0xFD, 0x40, 0x9F, 0x0E, 0x40, 0x9F, 0x13, 0x40, 0x9F, 0x20, 0x40, 0x9F, 0x3B, 0x40, 0x9F, 0x4A, 0x40, 0x9F, 0x52, 0x40, 0x9F, 0x8D, 0x40, 0x9F, 0x9C, 0x40, 0x9F, 0xA0, 0x2C, 0x00, 0x20, 0x40, 0x30, 0x12, 0x40, 0x53, 0x41, 0x40, 0x53, 0x44, 0x40, 0x53, 0x45, 0x80, 0x30, 0x4B, 0x00, 0x30, 0x99, 0x80, 0x30, 0x4D, 0x00, 0x30, 0x99, 0x80, 0x30, 0x4F, 0x00, 0x30, 0x99, 0x80, 0x30, 0x51, 0x00, 0x30, 0x99, 0x80, 0x30, 0x53, 0x00, 0x30, 0x99, 0x80, 0x30, 0x55, 0x00, 0x30, 0x99, 0x80, 0x30, 0x57, 0x00, 0x30, 0x99, 0x80, 0x30, 0x59, 0x00, 0x30, 0x99, 0x80, 0x30, 0x5B, 0x00, 0x30, 0x99, 0x80, 0x30, 0x5D, 0x00, 0x30, 0x99, 0x80, 0x30, 0x5F, 0x00, 0x30, 0x99, 0x80, 0x30, 0x61, 0x00, 0x30, 0x99, 0x80, 0x30, 0x64, 0x00, 0x30, 0x99, 0x80, 0x30, 0x66, 0x00, 0x30, 0x99, 0x80, 0x30, 0x68, 0x00, 0x30, 0x99, 0x80, 0x30, 0x6F, 0x00, 0x30, 0x99, 0x80, 0x30, 0x6F, 0x00, 0x30, 0x9A, 0x80, 0x30, 0x72, 0x00, 0x30, 0x99, 0x80, 0x30, 0x72, 0x00, 0x30, 0x9A, 0x80, 0x30, 0x75, 0x00, 0x30, 0x99, 0x80, 0x30, 0x75, 0x00, 0x30, 0x9A, 0x80, 0x30, 0x78, 0x00, 0x30, 0x99, 0x80, 0x30, 0x78, 0x00, 0x30, 0x9A, 0x80, 0x30, 0x7B, 0x00, 0x30, 0x99, 0x80, 0x30, 0x7B, 0x00, 0x30, 0x9A, 0x80, 0x30, 0x46, 0x00, 0x30, 0x99, 0xC0, 0x00, 0x20, 0x00, 0x30, 0x99, 0xC0, 0x00, 0x20, 0x00, 0x30, 0x9A, 0x80, 0x30, 0x9D, 0x00, 0x30, 0x99, 0xA8, 0x30, 0x88, 0x00, 0x30, 0x8A, 0x80, 0x30, 0xAB, 0x00, 0x30, 0x99, 0x80, 0x30, 0xAD, 0x00, 0x30, 0x99, 0x80, 0x30, 0xAF, 0x00, 0x30, 0x99, 0x80, 0x30, 0xB1, 0x00, 0x30, 0x99, 0x80, 0x30, 0xB3, 0x00, 0x30, 0x99, 0x80, 0x30, 0xB5, 0x00, 0x30, 0x99, 0x80, 0x30, 0xB7, 0x00, 0x30, 0x99, 0x80, 0x30, 0xB9, 0x00, 0x30, 0x99, 0x80, 0x30, 0xBB, 0x00, 0x30, 0x99, 0x80, 0x30, 0xBD, 0x00, 0x30, 0x99, 0x80, 0x30, 0xBF, 0x00, 0x30, 0x99, 0x80, 0x30, 0xC1, 0x00, 0x30, 0x99, 0x80, 0x30, 0xC4, 0x00, 0x30, 0x99, 0x80, 0x30, 0xC6, 0x00, 0x30, 0x99, 0x80, 0x30, 0xC8, 0x00, 0x30, 0x99, 0x80, 0x30, 0xCF, 0x00, 0x30, 0x99, 0x80, 0x30, 0xCF, 0x00, 0x30, 0x9A, 0x80, 0x30, 0xD2, 0x00, 0x30, 0x99, 0x80, 0x30, 0xD2, 0x00, 0x30, 0x9A, 0x80, 0x30, 0xD5, 0x00, 0x30, 0x99, 0x80, 0x30, 0xD5, 0x00, 0x30, 0x9A, 0x80, 0x30, 0xD8, 0x00, 0x30, 0x99, 0x80, 0x30, 0xD8, 0x00, 0x30, 0x9A, 0x80, 0x30, 0xDB, 0x00, 0x30, 0x99, 0x80, 0x30, 0xDB, 0x00, 0x30, 0x9A, 0x80, 0x30, 0xA6, 0x00, 0x30, 0x99, 0x80, 0x30, 0xEF, 0x00, 0x30, 0x99, 0x80, 0x30, 0xF0, 0x00, 0x30, 0x99, 0x80, 0x30, 0xF1, 0x00, 0x30, 0x99, 0x80, 0x30, 0xF2, 0x00, 0x30, 0x99, 0x80, 0x30, 0xFD, 0x00, 0x30, 0x99, 0xA8, 0x30, 0xB3, 0x00, 0x30, 0xC8, 0x40, 0x11, 0x00, 0x40, 0x11, 0x01, 0x40, 0x11, 0xAA, 0x40, 0x11, 0x02, 0x40, 0x11, 0xAC, 0x40, 0x11, 0xAD, 0x40, 0x11, 0x03, 0x40, 0x11, 0x04, 0x40, 0x11, 0x05, 0x40, 0x11, 0xB0, 0x40, 0x11, 0xB1, 0x40, 0x11, 0xB2, 0x40, 0x11, 0xB3, 0x40, 0x11, 0xB4, 0x40, 0x11, 0xB5, 0x40, 0x11, 0x1A, 0x40, 0x11, 0x06, 0x40, 0x11, 0x07, 0x40, 0x11, 0x08, 0x40, 0x11, 0x21, 0x40, 0x11, 0x09, 0x40, 0x11, 0x0A, 0x40, 0x11, 0x0B, 0x40, 0x11, 0x0C, 0x40, 0x11, 0x0D, 0x40, 0x11, 0x0E, 0x40, 0x11, 0x0F, 0x40, 0x11, 0x10, 0x40, 0x11, 0x11, 0x40, 0x11, 0x12, 0x40, 0x11, 0x61, 0x40, 0x11, 0x62, 0x40, 0x11, 0x63, 0x40, 0x11, 0x64, 0x40, 0x11, 0x65, 0x40, 0x11, 0x66, 0x40, 0x11, 0x67, 0x40, 0x11, 0x68, 0x40, 0x11, 0x69, 0x40, 0x11, 0x6A, 0x40, 0x11, 0x6B, 0x40, 0x11, 0x6C, 0x40, 0x11, 0x6D, 0x40, 0x11, 0x6E, 0x40, 0x11, 0x6F, 0x40, 0x11, 0x70, 0x40, 0x11, 0x71, 0x40, 0x11, 0x72, 0x40, 0x11, 0x73, 0x40, 0x11, 0x74, 0x40, 0x11, 0x75, 0x40, 0x11, 0x60, 0x40, 0x11, 0x14, 0x40, 0x11, 0x15, 0x40, 0x11, 0xC7, 0x40, 0x11, 0xC8, 0x40, 0x11, 0xCC, 0x40, 0x11, 0xCE, 0x40, 0x11, 0xD3, 0x40, 0x11, 0xD7, 0x40, 0x11, 0xD9, 0x40, 0x11, 0x1C, 0x40, 0x11, 0xDD, 0x40, 0x11, 0xDF, 0x40, 0x11, 0x1D, 0x40, 0x11, 0x1E, 0x40, 0x11, 0x20, 0x40, 0x11, 0x22, 0x40, 0x11, 0x23, 0x40, 0x11, 0x27, 0x40, 0x11, 0x29, 0x40, 0x11, 0x2B, 0x40, 0x11, 0x2C, 0x40, 0x11, 0x2D, 0x40, 0x11, 0x2E, 0x40, 0x11, 0x2F, 0x40, 0x11, 0x32, 0x40, 0x11, 0x36, 0x40, 0x11, 0x40, 0x40, 0x11, 0x47, 0x40, 0x11, 0x4C, 0x40, 0x11, 0xF1, 0x40, 0x11, 0xF2, 0x40, 0x11, 0x57, 0x40, 0x11, 0x58, 0x40, 0x11, 0x59, 0x40, 0x11, 0x84, 0x40, 0x11, 0x85, 0x40, 0x11, 0x88, 0x40, 0x11, 0x91, 0x40, 0x11, 0x92, 0x40, 0x11, 0x94, 0x40, 0x11, 0x9E, 0x40, 0x11, 0xA1, 0x20, 0x4E, 0x00, 0x20, 0x4E, 0x8C, 0x20, 0x4E, 0x09, 0x20, 0x56, 0xDB, 0x20, 0x4E, 0x0A, 0x20, 0x4E, 0x2D, 0x20, 0x4E, 0x0B, 0x20, 0x75, 0x32, 0x20, 0x4E, 0x59, 0x20, 0x4E, 0x19, 0x20, 0x4E, 0x01, 0x20, 0x59, 0x29, 0x20, 0x57, 0x30, 0x20, 0x4E, 0xBA, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x00, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x02, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x03, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x05, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x06, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x07, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x09, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0B, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0C, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0E, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0F, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x10, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x11, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x12, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x00, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x02, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x03, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x05, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x06, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x07, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x09, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0B, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0C, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0E, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0F, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x10, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x11, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x12, 0x80, 0x11, 0x61, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0C, 0x80, 0x11, 0x6E, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0B, 0x80, 0x11, 0x69, 0x80, 0x11, 0x0C, 0x80, 0x11, 0x65, 0x80, 0x11, 0xAB, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x11, 0x0B, 0x80, 0x11, 0x69, 0x80, 0x11, 0x12, 0x80, 0x11, 0x6E, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x4E, 0x00, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x4E, 0x8C, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x4E, 0x09, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x56, 0xDB, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x4E, 0x94, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x51, 0x6D, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x4E, 0x03, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x51, 0x6B, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x4E, 0x5D, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x53, 0x41, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x67, 0x08, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x70, 0x6B, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x6C, 0x34, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x67, 0x28, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x91, 0xD1, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x57, 0x1F, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x65, 0xE5, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x68, 0x2A, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x67, 0x09, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x79, 0x3E, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x54, 0x0D, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x72, 0x79, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x8C, 0xA1, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x79, 0x5D, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x52, 0xB4, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x4E, 0xE3, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x54, 0x7C, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x5B, 0x66, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x76, 0xE3, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x4F, 0x01, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x8C, 0xC7, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x53, 0x54, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x79, 0x6D, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x4F, 0x11, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x81, 0xEA, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x81, 0xF3, 0x00, 0x00, 0x29, 0x1C, 0x55, 0x4F, 0x1C, 0x5E, 0x7C, 0x1C, 0x65, 0x87, 0x1C, 0x7B, 0x8F, 0xB8, 0x00, 0x50, 0x80, 0x00, 0x54, 0x00, 0x00, 0x45, 0x9C, 0x00, 0x32, 0x00, 0x00, 0x31, 0x9C, 0x00, 0x32, 0x00, 0x00, 0x32, 0x9C, 0x00, 0x32, 0x00, 0x00, 0x33, 0x9C, 0x00, 0x32, 0x00, 0x00, 0x34, 0x9C, 0x00, 0x32, 0x00, 0x00, 0x35, 0x9C, 0x00, 0x32, 0x00, 0x00, 0x36, 0x9C, 0x00, 0x32, 0x00, 0x00, 0x37, 0x9C, 0x00, 0x32, 0x00, 0x00, 0x38, 0x9C, 0x00, 0x32, 0x00, 0x00, 0x39, 0x9C, 0x00, 0x33, 0x00, 0x00, 0x30, 0x9C, 0x00, 0x33, 0x00, 0x00, 0x31, 0x9C, 0x00, 0x33, 0x00, 0x00, 0x32, 0x9C, 0x00, 0x33, 0x00, 0x00, 0x33, 0x9C, 0x00, 0x33, 0x00, 0x00, 0x34, 0x9C, 0x00, 0x33, 0x00, 0x00, 0x35, 0x1C, 0x11, 0x00, 0x1C, 0x11, 0x02, 0x1C, 0x11, 0x03, 0x1C, 0x11, 0x05, 0x1C, 0x11, 0x06, 0x1C, 0x11, 0x07, 0x1C, 0x11, 0x09, 0x1C, 0x11, 0x0B, 0x1C, 0x11, 0x0C, 0x1C, 0x11, 0x0E, 0x1C, 0x11, 0x0F, 0x1C, 0x11, 0x10, 0x1C, 0x11, 0x11, 0x1C, 0x11, 0x12, 0x9C, 0x11, 0x00, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x02, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x03, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x05, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x06, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x07, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x09, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x0B, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x0C, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x0E, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x0F, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x10, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x11, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x12, 0x00, 0x11, 0x61, 0x9C, 0x11, 0x0E, 0x80, 0x11, 0x61, 0x80, 0x11, 0xB7, 0x80, 0x11, 0x00, 0x00, 0x11, 0x69, 0x9C, 0x11, 0x0C, 0x80, 0x11, 0x6E, 0x80, 0x11, 0x0B, 0x00, 0x11, 0x74, 0x9C, 0x11, 0x0B, 0x00, 0x11, 0x6E, 0x1C, 0x4E, 0x00, 0x1C, 0x4E, 0x8C, 0x1C, 0x4E, 0x09, 0x1C, 0x56, 0xDB, 0x1C, 0x4E, 0x94, 0x1C, 0x51, 0x6D, 0x1C, 0x4E, 0x03, 0x1C, 0x51, 0x6B, 0x1C, 0x4E, 0x5D, 0x1C, 0x53, 0x41, 0x1C, 0x67, 0x08, 0x1C, 0x70, 0x6B, 0x1C, 0x6C, 0x34, 0x1C, 0x67, 0x28, 0x1C, 0x91, 0xD1, 0x1C, 0x57, 0x1F, 0x1C, 0x65, 0xE5, 0x1C, 0x68, 0x2A, 0x1C, 0x67, 0x09, 0x1C, 0x79, 0x3E, 0x1C, 0x54, 0x0D, 0x1C, 0x72, 0x79, 0x1C, 0x8C, 0xA1, 0x1C, 0x79, 0x5D, 0x1C, 0x52, 0xB4, 0x1C, 0x79, 0xD8, 0x1C, 0x75, 0x37, 0x1C, 0x59, 0x73, 0x1C, 0x90, 0x69, 0x1C, 0x51, 0x2A, 0x1C, 0x53, 0x70, 0x1C, 0x6C, 0xE8, 0x1C, 0x98, 0x05, 0x1C, 0x4F, 0x11, 0x1C, 0x51, 0x99, 0x1C, 0x6B, 0x63, 0x1C, 0x4E, 0x0A, 0x1C, 0x4E, 0x2D, 0x1C, 0x4E, 0x0B, 0x1C, 0x5D, 0xE6, 0x1C, 0x53, 0xF3, 0x1C, 0x53, 0x3B, 0x1C, 0x5B, 0x97, 0x1C, 0x5B, 0x66, 0x1C, 0x76, 0xE3, 0x1C, 0x4F, 0x01, 0x1C, 0x8C, 0xC7, 0x1C, 0x53, 0x54, 0x1C, 0x59, 0x1C, 0x9C, 0x00, 0x33, 0x00, 0x00, 0x36, 0x9C, 0x00, 0x33, 0x00, 0x00, 0x37, 0x9C, 0x00, 0x33, 0x00, 0x00, 0x38, 0x9C, 0x00, 0x33, 0x00, 0x00, 0x39, 0x9C, 0x00, 0x34, 0x00, 0x00, 0x30, 0x9C, 0x00, 0x34, 0x00, 0x00, 0x31, 0x9C, 0x00, 0x34, 0x00, 0x00, 0x32, 0x9C, 0x00, 0x34, 0x00, 0x00, 0x33, 0x9C, 0x00, 0x34, 0x00, 0x00, 0x34, 0x9C, 0x00, 0x34, 0x00, 0x00, 0x35, 0x9C, 0x00, 0x34, 0x00, 0x00, 0x36, 0x9C, 0x00, 0x34, 0x00, 0x00, 0x37, 0x9C, 0x00, 0x34, 0x00, 0x00, 0x38, 0x9C, 0x00, 0x34, 0x00, 0x00, 0x39, 0x9C, 0x00, 0x35, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x31, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x32, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x33, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x34, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x35, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x36, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x37, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x38, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x39, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x30, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x31, 0x00, 0x67, 0x08, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x32, 0x00, 0x67, 0x08, 0xB8, 0x00, 0x48, 0x00, 0x00, 0x67, 0xB8, 0x00, 0x65, 0x80, 0x00, 0x72, 0x00, 0x00, 0x67, 0xB8, 0x00, 0x65, 0x00, 0x00, 0x56, 0xB8, 0x00, 0x4C, 0x80, 0x00, 0x54, 0x00, 0x00, 0x44, 0x1C, 0x30, 0xA2, 0x1C, 0x30, 0xA4, 0x1C, 0x30, 0xA6, 0x1C, 0x30, 0xA8, 0x1C, 0x30, 0xAA, 0x1C, 0x30, 0xAB, 0x1C, 0x30, 0xAD, 0x1C, 0x30, 0xAF, 0x1C, 0x30, 0xB1, 0x1C, 0x30, 0xB3, 0x1C, 0x30, 0xB5, 0x1C, 0x30, 0xB7, 0x1C, 0x30, 0xB9, 0x1C, 0x30, 0xBB, 0x1C, 0x30, 0xBD, 0x1C, 0x30, 0xBF, 0x1C, 0x30, 0xC1, 0x1C, 0x30, 0xC4, 0x1C, 0x30, 0xC6, 0x1C, 0x30, 0xC8, 0x1C, 0x30, 0xCA, 0x1C, 0x30, 0xCB, 0x1C, 0x30, 0xCC, 0x1C, 0x30, 0xCD, 0x1C, 0x30, 0xCE, 0x1C, 0x30, 0xCF, 0x1C, 0x30, 0xD2, 0x1C, 0x30, 0xD5, 0x1C, 0x30, 0xD8, 0x1C, 0x30, 0xDB, 0x1C, 0x30, 0xDE, 0x1C, 0x30, 0xDF, 0x1C, 0x30, 0xE0, 0x1C, 0x30, 0xE1, 0x1C, 0x30, 0xE2, 0x1C, 0x30, 0xE4, 0x1C, 0x30, 0xE6, 0x1C, 0x30, 0xE8, 0x1C, 0x30, 0xE9, 0x1C, 0x30, 0xEA, 0x1C, 0x30, 0xEB, 0x1C, 0x30, 0xEC, 0x1C, 0x30, 0xED, 0x1C, 0x30, 0xEF, 0x1C, 0x30, 0xF0, 0x1C, 0x30, 0xF1, 0x1C, 0x30, 0xF2, 0xB8, 0x30, 0xA2, 0x80, 0x30, 0xD1, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xC8, 0xB8, 0x30, 0xA2, 0x80, 0x30, 0xEB, 0x80, 0x30, 0xD5, 0x00, 0x30, 0xA1, 0xB8, 0x30, 0xA2, 0x80, 0x30, 0xF3, 0x80, 0x30, 0xDA, 0x00, 0x30, 0xA2, 0xB8, 0x30, 0xA2, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xA4, 0x80, 0x30, 0xCB, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xB0, 0xB8, 0x30, 0xA4, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xC1, 0xB8, 0x30, 0xA6, 0x80, 0x30, 0xA9, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xA8, 0x80, 0x30, 0xB9, 0x80, 0x30, 0xAF, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xC9, 0xB8, 0x30, 0xA8, 0x80, 0x30, 0xFC, 0x80, 0x30, 0xAB, 0x00, 0x30, 0xFC, 0xB8, 0x30, 0xAA, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xB9, 0xB8, 0x30, 0xAA, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xE0, 0xB8, 0x30, 0xAB, 0x80, 0x30, 0xA4, 0x00, 0x30, 0xEA, 0xB8, 0x30, 0xAB, 0x80, 0x30, 0xE9, 0x80, 0x30, 0xC3, 0x00, 0x30, 0xC8, 0xB8, 0x30, 0xAB, 0x80, 0x30, 0xED, 0x80, 0x30, 0xEA, 0x00, 0x30, 0xFC, 0xB8, 0x30, 0xAC, 0x80, 0x30, 0xED, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xAC, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xDE, 0xB8, 0x30, 0xAE, 0x00, 0x30, 0xAC, 0xB8, 0x30, 0xAE, 0x80, 0x30, 0xCB, 0x00, 0x30, 0xFC, 0xB8, 0x30, 0xAD, 0x80, 0x30, 0xE5, 0x80, 0x30, 0xEA, 0x00, 0x30, 0xFC, 0xB8, 0x30, 0xAE, 0x80, 0x30, 0xEB, 0x80, 0x30, 0xC0, 0x00, 0x30, 0xFC, 0xB8, 0x30, 0xAD, 0x00, 0x30, 0xED, 0xB8, 0x30, 0xAD, 0x80, 0x30, 0xED, 0x80, 0x30, 0xB0, 0x80, 0x30, 0xE9, 0x00, 0x30, 0xE0, 0xB8, 0x30, 0xAD, 0x80, 0x30, 0xED, 0x80, 0x30, 0xE1, 0x80, 0x30, 0xFC, 0x80, 0x30, 0xC8, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xAD, 0x80, 0x30, 0xED, 0x80, 0x30, 0xEF, 0x80, 0x30, 0xC3, 0x00, 0x30, 0xC8, 0xB8, 0x30, 0xB0, 0x80, 0x30, 0xE9, 0x00, 0x30, 0xE0, 0xB8, 0x30, 0xB0, 0x80, 0x30, 0xE9, 0x80, 0x30, 0xE0, 0x80, 0x30, 0xC8, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xAF, 0x80, 0x30, 0xEB, 0x80, 0x30, 0xBC, 0x80, 0x30, 0xA4, 0x00, 0x30, 0xED, 0xB8, 0x30, 0xAF, 0x80, 0x30, 0xED, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xCD, 0xB8, 0x30, 0xB1, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xB9, 0xB8, 0x30, 0xB3, 0x80, 0x30, 0xEB, 0x00, 0x30, 0xCA, 0xB8, 0x30, 0xB3, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xDD, 0xB8, 0x30, 0xB5, 0x80, 0x30, 0xA4, 0x80, 0x30, 0xAF, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xB5, 0x80, 0x30, 0xF3, 0x80, 0x30, 0xC1, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xE0, 0xB8, 0x30, 0xB7, 0x80, 0x30, 0xEA, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xB0, 0xB8, 0x30, 0xBB, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xC1, 0xB8, 0x30, 0xBB, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xC8, 0xB8, 0x30, 0xC0, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xB9, 0xB8, 0x30, 0xC7, 0x00, 0x30, 0xB7, 0xB8, 0x30, 0xC9, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xC8, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xCA, 0x00, 0x30, 0xCE, 0xB8, 0x30, 0xCE, 0x80, 0x30, 0xC3, 0x00, 0x30, 0xC8, 0xB8, 0x30, 0xCF, 0x80, 0x30, 0xA4, 0x00, 0x30, 0xC4, 0xB8, 0x30, 0xD1, 0x80, 0x30, 0xFC, 0x80, 0x30, 0xBB, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xC8, 0xB8, 0x30, 0xD1, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xC4, 0xB8, 0x30, 0xD0, 0x80, 0x30, 0xFC, 0x80, 0x30, 0xEC, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xD4, 0x80, 0x30, 0xA2, 0x80, 0x30, 0xB9, 0x80, 0x30, 0xC8, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xD4, 0x80, 0x30, 0xAF, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xD4, 0x00, 0x30, 0xB3, 0xB8, 0x30, 0xD3, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xD5, 0x80, 0x30, 0xA1, 0x80, 0x30, 0xE9, 0x80, 0x30, 0xC3, 0x00, 0x30, 0xC9, 0xB8, 0x30, 0xD5, 0x80, 0x30, 0xA3, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xC8, 0xB8, 0x30, 0xD6, 0x80, 0x30, 0xC3, 0x80, 0x30, 0xB7, 0x80, 0x30, 0xA7, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xD5, 0x80, 0x30, 0xE9, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xD8, 0x80, 0x30, 0xAF, 0x80, 0x30, 0xBF, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xDA, 0x00, 0x30, 0xBD, 0xB8, 0x30, 0xDA, 0x80, 0x30, 0xCB, 0x00, 0x30, 0xD2, 0xB8, 0x30, 0xD8, 0x80, 0x30, 0xEB, 0x00, 0x30, 0xC4, 0xB8, 0x30, 0xDA, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xB9, 0xB8, 0x30, 0xDA, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xB8, 0xB8, 0x30, 0xD9, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xBF, 0xB8, 0x30, 0xDD, 0x80, 0x30, 0xA4, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xC8, 0xB8, 0x30, 0xDC, 0x80, 0x30, 0xEB, 0x00, 0x30, 0xC8, 0xB8, 0x30, 0xDB, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xDD, 0x80, 0x30, 0xF3, 0x00, 0x30, 0xC9, 0xB8, 0x30, 0xDB, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xDB, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xDE, 0x80, 0x30, 0xA4, 0x80, 0x30, 0xAF, 0x00, 0x30, 0xED, 0xB8, 0x30, 0xDE, 0x80, 0x30, 0xA4, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xDE, 0x80, 0x30, 0xC3, 0x00, 0x30, 0xCF, 0xB8, 0x30, 0xDE, 0x80, 0x30, 0xEB, 0x00, 0x30, 0xAF, 0xB8, 0x30, 0xDE, 0x80, 0x30, 0xF3, 0x80, 0x30, 0xB7, 0x80, 0x30, 0xE7, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xDF, 0x80, 0x30, 0xAF, 0x80, 0x30, 0xED, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xDF, 0x00, 0x30, 0xEA, 0xB8, 0x30, 0xDF, 0x80, 0x30, 0xEA, 0x80, 0x30, 0xD0, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xE1, 0x00, 0x30, 0xAC, 0xB8, 0x30, 0xE1, 0x80, 0x30, 0xAC, 0x80, 0x30, 0xC8, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xE1, 0x80, 0x30, 0xFC, 0x80, 0x30, 0xC8, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xE4, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xC9, 0xB8, 0x30, 0xE4, 0x80, 0x30, 0xFC, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xE6, 0x80, 0x30, 0xA2, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xEA, 0x80, 0x30, 0xC3, 0x80, 0x30, 0xC8, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xEA, 0x00, 0x30, 0xE9, 0xB8, 0x30, 0xEB, 0x80, 0x30, 0xD4, 0x00, 0x30, 0xFC, 0xB8, 0x30, 0xEB, 0x80, 0x30, 0xFC, 0x80, 0x30, 0xD6, 0x00, 0x30, 0xEB, 0xB8, 0x30, 0xEC, 0x00, 0x30, 0xE0, 0xB8, 0x30, 0xEC, 0x80, 0x30, 0xF3, 0x80, 0x30, 0xC8, 0x80, 0x30, 0xB2, 0x00, 0x30, 0xF3, 0xB8, 0x30, 0xEF, 0x80, 0x30, 0xC3, 0x00, 0x30, 0xC8, 0xC0, 0x00, 0x30, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x32, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x33, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x34, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x35, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x36, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x37, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x38, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x39, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x30, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x31, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x32, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x33, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x34, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x35, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x36, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x37, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x38, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x39, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x30, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x31, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x32, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x33, 0x00, 0x70, 0xB9, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x34, 0x00, 0x70, 0xB9, 0xB8, 0x00, 0x68, 0x80, 0x00, 0x50, 0x00, 0x00, 0x61, 0xB8, 0x00, 0x64, 0x00, 0x00, 0x61, 0xB8, 0x00, 0x41, 0x00, 0x00, 0x55, 0xB8, 0x00, 0x62, 0x80, 0x00, 0x61, 0x00, 0x00, 0x72, 0xB8, 0x00, 0x6F, 0x00, 0x00, 0x56, 0xB8, 0x00, 0x70, 0x00, 0x00, 0x63, 0xB8, 0x00, 0x64, 0x00, 0x00, 0x6D, 0xB8, 0x00, 0x64, 0x80, 0x00, 0x6D, 0x00, 0x00, 0xB2, 0xB8, 0x00, 0x64, 0x80, 0x00, 0x6D, 0x00, 0x00, 0xB3, 0xB8, 0x00, 0x49, 0x00, 0x00, 0x55, 0xB8, 0x5E, 0x73, 0x00, 0x62, 0x10, 0xB8, 0x66, 0x2D, 0x00, 0x54, 0x8C, 0xB8, 0x59, 0x27, 0x00, 0x6B, 0x63, 0xB8, 0x66, 0x0E, 0x00, 0x6C, 0xBB, 0xB8, 0x68, 0x2A, 0x80, 0x5F, 0x0F, 0x80, 0x4F, 0x1A, 0x00, 0x79, 0x3E, 0xB8, 0x00, 0x70, 0x00, 0x00, 0x41, 0xB8, 0x00, 0x6E, 0x00, 0x00, 0x41, 0xB8, 0x03, 0xBC, 0x00, 0x00, 0x41, 0xB8, 0x00, 0x6D, 0x00, 0x00, 0x41, 0xB8, 0x00, 0x6B, 0x00, 0x00, 0x41, 0xB8, 0x00, 0x4B, 0x00, 0x00, 0x42, 0xB8, 0x00, 0x4D, 0x00, 0x00, 0x42, 0xB8, 0x00, 0x47, 0x00, 0x00, 0x42, 0xB8, 0x00, 0x63, 0x80, 0x00, 0x61, 0x00, 0x00, 0x6C, 0xB8, 0x00, 0x6B, 0x80, 0x00, 0x63, 0x80, 0x00, 0x61, 0x00, 0x00, 0x6C, 0xB8, 0x00, 0x70, 0x00, 0x00, 0x46, 0xB8, 0x00, 0x6E, 0x00, 0x00, 0x46, 0xB8, 0x03, 0xBC, 0x00, 0x00, 0x46, 0xB8, 0x03, 0xBC, 0x00, 0x00, 0x67, 0xB8, 0x00, 0x6D, 0x00, 0x00, 0x67, 0xB8, 0x00, 0x6B, 0x00, 0x00, 0x67, 0xB8, 0x00, 0x48, 0x00, 0x00, 0x7A, 0xB8, 0x00, 0x6B, 0x80, 0x00, 0x48, 0x00, 0x00, 0x7A, 0xB8, 0x00, 0x4D, 0x80, 0x00, 0x48, 0x00, 0x00, 0x7A, 0xB8, 0x00, 0x47, 0x80, 0x00, 0x48, 0x00, 0x00, 0x7A, 0xB8, 0x00, 0x54, 0x80, 0x00, 0x48, 0x00, 0x00, 0x7A, 0xB8, 0x03, 0xBC, 0x00, 0x21, 0x13, 0xB8, 0x00, 0x6D, 0x00, 0x21, 0x13, 0xB8, 0x00, 0x64, 0x00, 0x21, 0x13, 0xB8, 0x00, 0x6B, 0x00, 0x21, 0x13, 0xB8, 0x00, 0x66, 0x00, 0x00, 0x6D, 0xB8, 0x00, 0x6E, 0x00, 0x00, 0x6D, 0xB8, 0x03, 0xBC, 0x00, 0x00, 0x6D, 0xB8, 0x00, 0x6D, 0x00, 0x00, 0x6D, 0xB8, 0x00, 0x63, 0x00, 0x00, 0x6D, 0xB8, 0x00, 0x6B, 0x00, 0x00, 0x6D, 0xB8, 0x00, 0x6D, 0x80, 0x00, 0x6D, 0x00, 0x00, 0xB2, 0xB8, 0x00, 0x63, 0x80, 0x00, 0x6D, 0x00, 0x00, 0xB2, 0xB8, 0x00, 0x6D, 0x00, 0x00, 0xB2, 0xB8, 0x00, 0x6B, 0x80, 0x00, 0x6D, 0x00, 0x00, 0xB2, 0xB8, 0x00, 0x6D, 0x80, 0x00, 0x6D, 0x00, 0x00, 0xB3, 0xB8, 0x00, 0x63, 0x80, 0x00, 0x6D, 0x00, 0x00, 0xB3, 0xB8, 0x00, 0x6D, 0x00, 0x00, 0xB3, 0xB8, 0x00, 0x6B, 0x80, 0x00, 0x6D, 0x00, 0x00, 0xB3, 0xB8, 0x00, 0x6D, 0x80, 0x22, 0x15, 0x00, 0x00, 0x73, 0xB8, 0x00, 0x6D, 0x80, 0x22, 0x15, 0x80, 0x00, 0x73, 0x00, 0x00, 0xB2, 0xB8, 0x00, 0x50, 0x00, 0x00, 0x61, 0xB8, 0x00, 0x6B, 0x80, 0x00, 0x50, 0x00, 0x00, 0x61, 0xB8, 0x00, 0x4D, 0x80, 0x00, 0x50, 0x00, 0x00, 0x61, 0xB8, 0x00, 0x47, 0x80, 0x00, 0x50, 0x00, 0x00, 0x61, 0xB8, 0x00, 0x72, 0x80, 0x00, 0x61, 0x00, 0x00, 0x64, 0xB8, 0x00, 0x72, 0x80, 0x00, 0x61, 0x80, 0x00, 0x64, 0x80, 0x22, 0x15, 0x00, 0x00, 0x73, 0xB8, 0x00, 0x72, 0x80, 0x00, 0x61, 0x80, 0x00, 0x64, 0x80, 0x22, 0x15, 0x80, 0x00, 0x73, 0x00, 0x00, 0xB2, 0xB8, 0x00, 0x70, 0x00, 0x00, 0x73, 0xB8, 0x00, 0x6E, 0x00, 0x00, 0x73, 0xB8, 0x03, 0xBC, 0x00, 0x00, 0x73, 0xB8, 0x00, 0x6D, 0x00, 0x00, 0x73, 0xB8, 0x00, 0x70, 0x00, 0x00, 0x56, 0xB8, 0x00, 0x6E, 0x00, 0x00, 0x56, 0xB8, 0x03, 0xBC, 0x00, 0x00, 0x56, 0xB8, 0x00, 0x6D, 0x00, 0x00, 0x56, 0xB8, 0x00, 0x6B, 0x00, 0x00, 0x56, 0xB8, 0x00, 0x4D, 0x00, 0x00, 0x56, 0xB8, 0x00, 0x70, 0x00, 0x00, 0x57, 0xB8, 0x00, 0x6E, 0x00, 0x00, 0x57, 0xB8, 0x03, 0xBC, 0x00, 0x00, 0x57, 0xB8, 0x00, 0x6D, 0x00, 0x00, 0x57, 0xB8, 0x00, 0x6B, 0x00, 0x00, 0x57, 0xB8, 0x00, 0x4D, 0x00, 0x00, 0x57, 0xB8, 0x00, 0x6B, 0x00, 0x03, 0xA9, 0xB8, 0x00, 0x4D, 0x00, 0x03, 0xA9, 0xB8, 0x00, 0x61, 0x80, 0x00, 0x2E, 0x80, 0x00, 0x6D, 0x00, 0x00, 0x2E, 0xB8, 0x00, 0x42, 0x00, 0x00, 0x71, 0xB8, 0x00, 0x63, 0x00, 0x00, 0x63, 0xB8, 0x00, 0x63, 0x00, 0x00, 0x64, 0xB8, 0x00, 0x43, 0x80, 0x22, 0x15, 0x80, 0x00, 0x6B, 0x00, 0x00, 0x67, 0xB8, 0x00, 0x43, 0x80, 0x00, 0x6F, 0x00, 0x00, 0x2E, 0xB8, 0x00, 0x64, 0x00, 0x00, 0x42, 0xB8, 0x00, 0x47, 0x00, 0x00, 0x79, 0xB8, 0x00, 0x68, 0x00, 0x00, 0x61, 0xB8, 0x00, 0x48, 0x00, 0x00, 0x50, 0xB8, 0x00, 0x69, 0x00, 0x00, 0x6E, 0xB8, 0x00, 0x4B, 0x00, 0x00, 0x4B, 0xB8, 0x00, 0x4B, 0x00, 0x00, 0x4D, 0xB8, 0x00, 0x6B, 0x00, 0x00, 0x74, 0xB8, 0x00, 0x6C, 0x00, 0x00, 0x6D, 0xB8, 0x00, 0x6C, 0x00, 0x00, 0x6E, 0xB8, 0x00, 0x6C, 0x80, 0x00, 0x6F, 0x00, 0x00, 0x67, 0xB8, 0x00, 0x6C, 0x00, 0x00, 0x78, 0xB8, 0x00, 0x6D, 0x00, 0x00, 0x62, 0xB8, 0x00, 0x6D, 0x80, 0x00, 0x69, 0x00, 0x00, 0x6C, 0xB8, 0x00, 0x6D, 0x80, 0x00, 0x6F, 0x00, 0x00, 0x6C, 0xB8, 0x00, 0x50, 0x00, 0x00, 0x48, 0xB8, 0x00, 0x70, 0x80, 0x00, 0x2E, 0x80, 0x00, 0x6D, 0x00, 0x00, 0x2E, 0xB8, 0x00, 0x50, 0x80, 0x00, 0x50, 0x00, 0x00, 0x4D, 0xB8, 0x00, 0x50, 0x00, 0x00, 0x52, 0xB8, 0x00, 0x73, 0x00, 0x00, 0x72, 0xB8, 0x00, 0x53, 0x00, 0x00, 0x76, 0xB8, 0x00, 0x57, 0x00, 0x00, 0x62, 0xB8, 0x00, 0x56, 0x80, 0x22, 0x15, 0x00, 0x00, 0x6D, 0xB8, 0x00, 0x41, 0x80, 0x22, 0x15, 0x00, 0x00, 0x6D, 0xC0, 0x00, 0x31, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x33, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x34, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x35, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x36, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x37, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x38, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x39, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x30, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x31, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x32, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x33, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x34, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x35, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x36, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x37, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x38, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x31, 0x80, 0x00, 0x39, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x30, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x31, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x32, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x33, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x34, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x35, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x36, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x37, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x38, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x32, 0x80, 0x00, 0x39, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x33, 0x80, 0x00, 0x30, 0x00, 0x65, 0xE5, 0xC0, 0x00, 0x33, 0x80, 0x00, 0x31, 0x00, 0x65, 0xE5, 0xB8, 0x00, 0x67, 0x80, 0x00, 0x61, 0x00, 0x00, 0x6C, 0x20, 0x04, 0x4A, 0x20, 0x04, 0x4C, 0x20, 0xA7, 0x6F, 0x20, 0x01, 0x26, 0x20, 0x01, 0x53, 0x20, 0xA7, 0x27, 0x20, 0xAB, 0x37, 0x20, 0x02, 0x6B, 0x20, 0xAB, 0x52, 0x00, 0x8C, 0x48, 0x00, 0x66, 0xF4, 0x00, 0x8E, 0xCA, 0x00, 0x8C, 0xC8, 0x00, 0x6E, 0xD1, 0x00, 0x4E, 0x32, 0x00, 0x53, 0xE5, 0x00, 0x9F, 0x9C, 0x00, 0x9F, 0x9C, 0x00, 0x59, 0x51, 0x00, 0x91, 0xD1, 0x00, 0x55, 0x87, 0x00, 0x59, 0x48, 0x00, 0x61, 0xF6, 0x00, 0x76, 0x69, 0x00, 0x7F, 0x85, 0x00, 0x86, 0x3F, 0x00, 0x87, 0xBA, 0x00, 0x88, 0xF8, 0x00, 0x90, 0x8F, 0x00, 0x6A, 0x02, 0x00, 0x6D, 0x1B, 0x00, 0x70, 0xD9, 0x00, 0x73, 0xDE, 0x00, 0x84, 0x3D, 0x00, 0x91, 0x6A, 0x00, 0x99, 0xF1, 0x00, 0x4E, 0x82, 0x00, 0x53, 0x75, 0x00, 0x6B, 0x04, 0x00, 0x72, 0x1B, 0x00, 0x86, 0x2D, 0x00, 0x9E, 0x1E, 0x00, 0x5D, 0x50, 0x00, 0x6F, 0xEB, 0x00, 0x85, 0xCD, 0x00, 0x89, 0x64, 0x00, 0x62, 0xC9, 0x00, 0x81, 0xD8, 0x00, 0x88, 0x1F, 0x00, 0x5E, 0xCA, 0x00, 0x67, 0x17, 0x00, 0x6D, 0x6A, 0x00, 0x72, 0xFC, 0x00, 0x90, 0xCE, 0x00, 0x4F, 0x86, 0x00, 0x51, 0xB7, 0x00, 0x52, 0xDE, 0x00, 0x64, 0xC4, 0x00, 0x6A, 0xD3, 0x00, 0x72, 0x10, 0x00, 0x76, 0xE7, 0x00, 0x80, 0x01, 0x00, 0x86, 0x06, 0x00, 0x86, 0x5C, 0x00, 0x8D, 0xEF, 0x00, 0x97, 0x32, 0x00, 0x9B, 0x6F, 0x00, 0x9D, 0xFA, 0x00, 0x78, 0x8C, 0x00, 0x79, 0x7F, 0x00, 0x7D, 0xA0, 0x00, 0x83, 0xC9, 0x00, 0x93, 0x04, 0x00, 0x9E, 0x7F, 0x00, 0x8A, 0xD6, 0x00, 0x58, 0xDF, 0x00, 0x5F, 0x04, 0x00, 0x7C, 0x60, 0x00, 0x80, 0x7E, 0x00, 0x72, 0x62, 0x00, 0x78, 0xCA, 0x00, 0x8C, 0xC2, 0x00, 0x96, 0xF7, 0x00, 0x58, 0xD8, 0x00, 0x5C, 0x62, 0x00, 0x6A, 0x13, 0x00, 0x6D, 0xDA, 0x00, 0x6F, 0x0F, 0x00, 0x7D, 0x2F, 0x00, 0x7E, 0x37, 0x00, 0x96, 0x4B, 0x00, 0x52, 0xD2, 0x00, 0x80, 0x8B, 0x00, 0x51, 0xDC, 0x00, 0x51, 0xCC, 0x00, 0x7A, 0x1C, 0x00, 0x7D, 0xBE, 0x00, 0x83, 0xF1, 0x00, 0x96, 0x75, 0x00, 0x8B, 0x80, 0x00, 0x62, 0xCF, 0x00, 0x6A, 0x02, 0x00, 0x8A, 0xFE, 0x00, 0x4E, 0x39, 0x00, 0x5B, 0xE7, 0x00, 0x60, 0x12, 0x00, 0x73, 0x87, 0x00, 0x75, 0x70, 0x00, 0x53, 0x17, 0x00, 0x78, 0xFB, 0x00, 0x4F, 0xBF, 0x00, 0x5F, 0xA9, 0x00, 0x4E, 0x0D, 0x00, 0x6C, 0xCC, 0x00, 0x65, 0x78, 0x00, 0x7D, 0x22, 0x00, 0x53, 0xC3, 0x00, 0x58, 0x5E, 0x00, 0x77, 0x01, 0x00, 0x84, 0x49, 0x00, 0x8A, 0xAA, 0x00, 0x6B, 0xBA, 0x00, 0x8F, 0xB0, 0x00, 0x6C, 0x88, 0x00, 0x62, 0xFE, 0x00, 0x82, 0xE5, 0x00, 0x63, 0xA0, 0x00, 0x75, 0x65, 0x00, 0x4E, 0xAE, 0x00, 0x51, 0x69, 0x00, 0x51, 0xC9, 0x00, 0x68, 0x81, 0x00, 0x7C, 0xE7, 0x00, 0x82, 0x6F, 0x00, 0x8A, 0xD2, 0x00, 0x91, 0xCF, 0x00, 0x52, 0xF5, 0x00, 0x54, 0x42, 0x00, 0x59, 0x73, 0x00, 0x5E, 0xEC, 0x00, 0x65, 0xC5, 0x00, 0x6F, 0xFE, 0x00, 0x79, 0x2A, 0x00, 0x95, 0xAD, 0x00, 0x9A, 0x6A, 0x00, 0x9E, 0x97, 0x00, 0x9E, 0xCE, 0x00, 0x52, 0x9B, 0x00, 0x66, 0xC6, 0x00, 0x6B, 0x77, 0x00, 0x8F, 0x62, 0x00, 0x5E, 0x74, 0x00, 0x61, 0x90, 0x00, 0x62, 0x00, 0x00, 0x64, 0x9A, 0x00, 0x6F, 0x23, 0x00, 0x71, 0x49, 0x00, 0x74, 0x89, 0x00, 0x79, 0xCA, 0x00, 0x7D, 0xF4, 0x00, 0x80, 0x6F, 0x00, 0x8F, 0x26, 0x00, 0x84, 0xEE, 0x00, 0x90, 0x23, 0x00, 0x93, 0x4A, 0x00, 0x52, 0x17, 0x00, 0x52, 0xA3, 0x00, 0x54, 0xBD, 0x00, 0x70, 0xC8, 0x00, 0x88, 0xC2, 0x00, 0x8A, 0xAA, 0x00, 0x5E, 0xC9, 0x00, 0x5F, 0xF5, 0x00, 0x63, 0x7B, 0x00, 0x6B, 0xAE, 0x00, 0x7C, 0x3E, 0x00, 0x73, 0x75, 0x00, 0x4E, 0xE4, 0x00, 0x56, 0xF9, 0x00, 0x5B, 0xE7, 0x00, 0x5D, 0xBA, 0x00, 0x60, 0x1C, 0x00, 0x73, 0xB2, 0x00, 0x74, 0x69, 0x00, 0x7F, 0x9A, 0x00, 0x80, 0x46, 0x00, 0x92, 0x34, 0x00, 0x96, 0xF6, 0x00, 0x97, 0x48, 0x00, 0x98, 0x18, 0x00, 0x4F, 0x8B, 0x00, 0x79, 0xAE, 0x00, 0x91, 0xB4, 0x00, 0x96, 0xB8, 0x00, 0x60, 0xE1, 0x00, 0x4E, 0x86, 0x00, 0x50, 0xDA, 0x00, 0x5B, 0xEE, 0x00, 0x5C, 0x3F, 0x00, 0x65, 0x99, 0x00, 0x6A, 0x02, 0x00, 0x71, 0xCE, 0x00, 0x76, 0x42, 0x00, 0x84, 0xFC, 0x00, 0x90, 0x7C, 0x00, 0x9F, 0x8D, 0x00, 0x66, 0x88, 0x00, 0x96, 0x2E, 0x00, 0x52, 0x89, 0x00, 0x67, 0x7B, 0x00, 0x67, 0xF3, 0x00, 0x6D, 0x41, 0x00, 0x6E, 0x9C, 0x00, 0x74, 0x09, 0x00, 0x75, 0x59, 0x00, 0x78, 0x6B, 0x00, 0x7D, 0x10, 0x00, 0x98, 0x5E, 0x00, 0x51, 0x6D, 0x00, 0x62, 0x2E, 0x00, 0x96, 0x78, 0x00, 0x50, 0x2B, 0x00, 0x5D, 0x19, 0x00, 0x6D, 0xEA, 0x00, 0x8F, 0x2A, 0x00, 0x5F, 0x8B, 0x00, 0x61, 0x44, 0x00, 0x68, 0x17, 0x00, 0x73, 0x87, 0x00, 0x96, 0x86, 0x00, 0x52, 0x29, 0x00, 0x54, 0x0F, 0x00, 0x5C, 0x65, 0x00, 0x66, 0x13, 0x00, 0x67, 0x4E, 0x00, 0x68, 0xA8, 0x00, 0x6C, 0xE5, 0x00, 0x74, 0x06, 0x00, 0x75, 0xE2, 0x00, 0x7F, 0x79, 0x00, 0x88, 0xCF, 0x00, 0x88, 0xE1, 0x00, 0x91, 0xCC, 0x00, 0x96, 0xE2, 0x00, 0x53, 0x3F, 0x00, 0x6E, 0xBA, 0x00, 0x54, 0x1D, 0x00, 0x71, 0xD0, 0x00, 0x74, 0x98, 0x00, 0x85, 0xFA, 0x00, 0x96, 0xA3, 0x00, 0x9C, 0x57, 0x00, 0x9E, 0x9F, 0x00, 0x67, 0x97, 0x00, 0x6D, 0xCB, 0x00, 0x81, 0xE8, 0x00, 0x7A, 0xCB, 0x00, 0x7B, 0x20, 0x00, 0x7C, 0x92, 0x00, 0x72, 0xC0, 0x00, 0x70, 0x99, 0x00, 0x8B, 0x58, 0x00, 0x4E, 0xC0, 0x00, 0x83, 0x36, 0x00, 0x52, 0x3A, 0x00, 0x52, 0x07, 0x00, 0x5E, 0xA6, 0x00, 0x62, 0xD3, 0x00, 0x7C, 0xD6, 0x00, 0x5B, 0x85, 0x00, 0x6D, 0x1E, 0x00, 0x66, 0xB4, 0x00, 0x8F, 0x3B, 0x00, 0x88, 0x4C, 0x00, 0x96, 0x4D, 0x00, 0x89, 0x8B, 0x00, 0x5E, 0xD3, 0x00, 0x51, 0x40, 0x00, 0x55, 0xC0, 0x00, 0x58, 0x5A, 0x00, 0x66, 0x74, 0x00, 0x51, 0xDE, 0x00, 0x73, 0x2A, 0x00, 0x76, 0xCA, 0x00, 0x79, 0x3C, 0x00, 0x79, 0x5E, 0x00, 0x79, 0x65, 0x00, 0x79, 0x8F, 0x00, 0x97, 0x56, 0x00, 0x7C, 0xBE, 0x00, 0x7F, 0xBD, 0x00, 0x86, 0x12, 0x00, 0x8A, 0xF8, 0x00, 0x90, 0x38, 0x00, 0x90, 0xFD, 0x00, 0x98, 0xEF, 0x00, 0x98, 0xFC, 0x00, 0x99, 0x28, 0x00, 0x9D, 0xB4, 0x00, 0x90, 0xDE, 0x00, 0x96, 0xB7, 0x00, 0x4F, 0xAE, 0x00, 0x50, 0xE7, 0x00, 0x51, 0x4D, 0x00, 0x52, 0xC9, 0x00, 0x52, 0xE4, 0x00, 0x53, 0x51, 0x00, 0x55, 0x9D, 0x00, 0x56, 0x06, 0x00, 0x56, 0x68, 0x00, 0x58, 0x40, 0x00, 0x58, 0xA8, 0x00, 0x5C, 0x64, 0x00, 0x5C, 0x6E, 0x00, 0x60, 0x94, 0x00, 0x61, 0x68, 0x00, 0x61, 0x8E, 0x00, 0x61, 0xF2, 0x00, 0x65, 0x4F, 0x00, 0x65, 0xE2, 0x00, 0x66, 0x91, 0x00, 0x68, 0x85, 0x00, 0x6D, 0x77, 0x00, 0x6E, 0x1A, 0x00, 0x6F, 0x22, 0x00, 0x71, 0x6E, 0x00, 0x72, 0x2B, 0x00, 0x74, 0x22, 0x00, 0x78, 0x91, 0x00, 0x79, 0x3E, 0x00, 0x79, 0x49, 0x00, 0x79, 0x48, 0x00, 0x79, 0x50, 0x00, 0x79, 0x56, 0x00, 0x79, 0x5D, 0x00, 0x79, 0x8D, 0x00, 0x79, 0x8E, 0x00, 0x7A, 0x40, 0x00, 0x7A, 0x81, 0x00, 0x7B, 0xC0, 0x00, 0x7D, 0xF4, 0x00, 0x7E, 0x09, 0x00, 0x7E, 0x41, 0x00, 0x7F, 0x72, 0x00, 0x80, 0x05, 0x00, 0x81, 0xED, 0x00, 0x82, 0x79, 0x00, 0x82, 0x79, 0x00, 0x84, 0x57, 0x00, 0x89, 0x10, 0x00, 0x89, 0x96, 0x00, 0x8B, 0x01, 0x00, 0x8B, 0x39, 0x00, 0x8C, 0xD3, 0x00, 0x8D, 0x08, 0x00, 0x8F, 0xB6, 0x00, 0x90, 0x38, 0x00, 0x96, 0xE3, 0x00, 0x97, 0xFF, 0x00, 0x98, 0x3B, 0x00, 0x60, 0x75, 0x02, 0x42, 0xEE, 0x00, 0x82, 0x18, 0x00, 0x4E, 0x26, 0x00, 0x51, 0xB5, 0x00, 0x51, 0x68, 0x00, 0x4F, 0x80, 0x00, 0x51, 0x45, 0x00, 0x51, 0x80, 0x00, 0x52, 0xC7, 0x00, 0x52, 0xFA, 0x00, 0x55, 0x9D, 0x00, 0x55, 0x55, 0x00, 0x55, 0x99, 0x00, 0x55, 0xE2, 0x00, 0x58, 0x5A, 0x00, 0x58, 0xB3, 0x00, 0x59, 0x44, 0x00, 0x59, 0x54, 0x00, 0x5A, 0x62, 0x00, 0x5B, 0x28, 0x00, 0x5E, 0xD2, 0x00, 0x5E, 0xD9, 0x00, 0x5F, 0x69, 0x00, 0x5F, 0xAD, 0x00, 0x60, 0xD8, 0x00, 0x61, 0x4E, 0x00, 0x61, 0x08, 0x00, 0x61, 0x8E, 0x00, 0x61, 0x60, 0x00, 0x61, 0xF2, 0x00, 0x62, 0x34, 0x00, 0x63, 0xC4, 0x00, 0x64, 0x1C, 0x00, 0x64, 0x52, 0x00, 0x65, 0x56, 0x00, 0x66, 0x74, 0x00, 0x67, 0x17, 0x00, 0x67, 0x1B, 0x00, 0x67, 0x56, 0x00, 0x6B, 0x79, 0x00, 0x6B, 0xBA, 0x00, 0x6D, 0x41, 0x00, 0x6E, 0xDB, 0x00, 0x6E, 0xCB, 0x00, 0x6F, 0x22, 0x00, 0x70, 0x1E, 0x00, 0x71, 0x6E, 0x00, 0x77, 0xA7, 0x00, 0x72, 0x35, 0x00, 0x72, 0xAF, 0x00, 0x73, 0x2A, 0x00, 0x74, 0x71, 0x00, 0x75, 0x06, 0x00, 0x75, 0x3B, 0x00, 0x76, 0x1D, 0x00, 0x76, 0x1F, 0x00, 0x76, 0xCA, 0x00, 0x76, 0xDB, 0x00, 0x76, 0xF4, 0x00, 0x77, 0x4A, 0x00, 0x77, 0x40, 0x00, 0x78, 0xCC, 0x00, 0x7A, 0xB1, 0x00, 0x7B, 0xC0, 0x00, 0x7C, 0x7B, 0x00, 0x7D, 0x5B, 0x00, 0x7D, 0xF4, 0x00, 0x7F, 0x3E, 0x00, 0x80, 0x05, 0x00, 0x83, 0x52, 0x00, 0x83, 0xEF, 0x00, 0x87, 0x79, 0x00, 0x89, 0x41, 0x00, 0x89, 0x86, 0x00, 0x89, 0x96, 0x00, 0x8A, 0xBF, 0x00, 0x8A, 0xF8, 0x00, 0x8A, 0xCB, 0x00, 0x8B, 0x01, 0x00, 0x8A, 0xFE, 0x00, 0x8A, 0xED, 0x00, 0x8B, 0x39, 0x00, 0x8B, 0x8A, 0x00, 0x8D, 0x08, 0x00, 0x8F, 0x38, 0x00, 0x90, 0x72, 0x00, 0x91, 0x99, 0x00, 0x92, 0x76, 0x00, 0x96, 0x7C, 0x00, 0x96, 0xE3, 0x00, 0x97, 0x56, 0x00, 0x97, 0xDB, 0x00, 0x97, 0xFF, 0x00, 0x98, 0x0B, 0x00, 0x98, 0x3B, 0x00, 0x9B, 0x12, 0x00, 0x9F, 0x9C, 0x02, 0x28, 0x4A, 0x02, 0x28, 0x44, 0x02, 0x33, 0xD5, 0x00, 0x3B, 0x9D, 0x00, 0x40, 0x18, 0x00, 0x40, 0x39, 0x02, 0x52, 0x49, 0x02, 0x5C, 0xD0, 0x02, 0x7E, 0xD3, 0x00, 0x9F, 0x43, 0x00, 0x9F, 0x8E, 0xC0, 0x00, 0x66, 0x00, 0x00, 0x66, 0xC0, 0x00, 0x66, 0x00, 0x00, 0x69, 0xC0, 0x00, 0x66, 0x00, 0x00, 0x6C, 0xC0, 0x00, 0x66, 0x80, 0x00, 0x66, 0x00, 0x00, 0x69, 0xC0, 0x00, 0x66, 0x80, 0x00, 0x66, 0x00, 0x00, 0x6C, 0xC0, 0x01, 0x7F, 0x00, 0x00, 0x74, 0xC0, 0x00, 0x73, 0x00, 0x00, 0x74, 0xC0, 0x05, 0x74, 0x00, 0x05, 0x76, 0xC0, 0x05, 0x74, 0x00, 0x05, 0x65, 0xC0, 0x05, 0x74, 0x00, 0x05, 0x6B, 0xC0, 0x05, 0x7E, 0x00, 0x05, 0x76, 0xC0, 0x05, 0x74, 0x00, 0x05, 0x6D, 0x80, 0x05, 0xD9, 0x00, 0x05, 0xB4, 0x80, 0x05, 0xF2, 0x00, 0x05, 0xB7, 0x04, 0x05, 0xE2, 0x04, 0x05, 0xD0, 0x04, 0x05, 0xD3, 0x04, 0x05, 0xD4, 0x04, 0x05, 0xDB, 0x04, 0x05, 0xDC, 0x04, 0x05, 0xDD, 0x04, 0x05, 0xE8, 0x04, 0x05, 0xEA, 0x04, 0x00, 0x2B, 0x80, 0x05, 0xE9, 0x00, 0x05, 0xC1, 0x80, 0x05, 0xE9, 0x00, 0x05, 0xC2, 0x80, 0xFB, 0x49, 0x00, 0x05, 0xC1, 0x80, 0xFB, 0x49, 0x00, 0x05, 0xC2, 0x80, 0x05, 0xD0, 0x00, 0x05, 0xB7, 0x80, 0x05, 0xD0, 0x00, 0x05, 0xB8, 0x80, 0x05, 0xD0, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xD1, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xD2, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xD3, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xD4, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xD5, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xD6, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xD8, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xD9, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xDA, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xDB, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xDC, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xDE, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xE0, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xE1, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xE3, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xE4, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xE6, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xE7, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xE8, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xE9, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xEA, 0x00, 0x05, 0xBC, 0x80, 0x05, 0xD5, 0x00, 0x05, 0xB9, 0x80, 0x05, 0xD1, 0x00, 0x05, 0xBF, 0x80, 0x05, 0xDB, 0x00, 0x05, 0xBF, 0x80, 0x05, 0xE4, 0x00, 0x05, 0xBF, 0xC0, 0x05, 0xD0, 0x00, 0x05, 0xDC, 0x18, 0x06, 0x71, 0x14, 0x06, 0x71, 0x18, 0x06, 0x7B, 0x14, 0x06, 0x7B, 0x0C, 0x06, 0x7B, 0x10, 0x06, 0x7B, 0x18, 0x06, 0x7E, 0x14, 0x06, 0x7E, 0x0C, 0x06, 0x7E, 0x10, 0x06, 0x7E, 0x18, 0x06, 0x80, 0x14, 0x06, 0x80, 0x0C, 0x06, 0x80, 0x10, 0x06, 0x80, 0x18, 0x06, 0x7A, 0x14, 0x06, 0x7A, 0x0C, 0x06, 0x7A, 0x10, 0x06, 0x7A, 0x18, 0x06, 0x7F, 0x14, 0x06, 0x7F, 0x0C, 0x06, 0x7F, 0x10, 0x06, 0x7F, 0x18, 0x06, 0x79, 0x14, 0x06, 0x79, 0x0C, 0x06, 0x79, 0x10, 0x06, 0x79, 0x18, 0x06, 0xA4, 0x14, 0x06, 0xA4, 0x0C, 0x06, 0xA4, 0x10, 0x06, 0xA4, 0x18, 0x06, 0xA6, 0x14, 0x06, 0xA6, 0x0C, 0x06, 0xA6, 0x10, 0x06, 0xA6, 0x18, 0x06, 0x84, 0x14, 0x06, 0x84, 0x0C, 0x06, 0x84, 0x10, 0x06, 0x84, 0x18, 0x06, 0x83, 0x14, 0x06, 0x83, 0x0C, 0x06, 0x83, 0x10, 0x06, 0x83, 0x18, 0x06, 0x86, 0x14, 0x06, 0x86, 0x0C, 0x06, 0x86, 0x10, 0x06, 0x86, 0x18, 0x06, 0x87, 0x14, 0x06, 0x87, 0x0C, 0x06, 0x87, 0x10, 0x06, 0x87, 0x18, 0x06, 0x8D, 0x14, 0x06, 0x8D, 0x18, 0x06, 0x8C, 0x14, 0x06, 0x8C, 0x18, 0x06, 0x8E, 0x14, 0x06, 0x8E, 0x18, 0x06, 0x88, 0x14, 0x06, 0x88, 0x18, 0x06, 0x98, 0x14, 0x06, 0x98, 0x18, 0x06, 0x91, 0x14, 0x06, 0x91, 0x18, 0x06, 0xA9, 0x14, 0x06, 0xA9, 0x0C, 0x06, 0xA9, 0x10, 0x06, 0xA9, 0x18, 0x06, 0xAF, 0x14, 0x06, 0xAF, 0x0C, 0x06, 0xAF, 0x10, 0x06, 0xAF, 0x18, 0x06, 0xB3, 0x14, 0x06, 0xB3, 0x0C, 0x06, 0xB3, 0x10, 0x06, 0xB3, 0x18, 0x06, 0xB1, 0x14, 0x06, 0xB1, 0x0C, 0x06, 0xB1, 0x10, 0x06, 0xB1, 0x18, 0x06, 0xBA, 0x14, 0x06, 0xBA, 0x18, 0x06, 0xBB, 0x14, 0x06, 0xBB, 0x0C, 0x06, 0xBB, 0x10, 0x06, 0xBB, 0x18, 0x06, 0xC0, 0x14, 0x06, 0xC0, 0x18, 0x06, 0xC1, 0x14, 0x06, 0xC1, 0x0C, 0x06, 0xC1, 0x10, 0x06, 0xC1, 0x18, 0x06, 0xBE, 0x14, 0x06, 0xBE, 0x0C, 0x06, 0xBE, 0x10, 0x06, 0xBE, 0x18, 0x06, 0xD2, 0x14, 0x06, 0xD2, 0x18, 0x06, 0xD3, 0x14, 0x06, 0xD3, 0x18, 0x06, 0xAD, 0x14, 0x06, 0xAD, 0x0C, 0x06, 0xAD, 0x10, 0x06, 0xAD, 0x18, 0x06, 0xC7, 0x14, 0x06, 0xC7, 0x18, 0x06, 0xC6, 0x14, 0x06, 0xC6, 0x18, 0x06, 0xC8, 0x14, 0x06, 0xC8, 0x18, 0x06, 0x77, 0x18, 0x06, 0xCB, 0x14, 0x06, 0xCB, 0x18, 0x06, 0xC5, 0x14, 0x06, 0xC5, 0x18, 0x06, 0xC9, 0x14, 0x06, 0xC9, 0x18, 0x06, 0xD0, 0x14, 0x06, 0xD0, 0x0C, 0x06, 0xD0, 0x10, 0x06, 0xD0, 0x0C, 0x06, 0x49, 0x10, 0x06, 0x49, 0x98, 0x06, 0x26, 0x00, 0x06, 0x27, 0x94, 0x06, 0x26, 0x00, 0x06, 0x27, 0x98, 0x06, 0x26, 0x00, 0x06, 0xD5, 0x94, 0x06, 0x26, 0x00, 0x06, 0xD5, 0x98, 0x06, 0x26, 0x00, 0x06, 0x48, 0x94, 0x06, 0x26, 0x00, 0x06, 0x48, 0x98, 0x06, 0x26, 0x00, 0x06, 0xC7, 0x94, 0x06, 0x26, 0x00, 0x06, 0xC7, 0x98, 0x06, 0x26, 0x00, 0x06, 0xC6, 0x94, 0x06, 0x26, 0x00, 0x06, 0xC6, 0x98, 0x06, 0x26, 0x00, 0x06, 0xC8, 0x94, 0x06, 0x26, 0x00, 0x06, 0xC8, 0x98, 0x06, 0x26, 0x00, 0x06, 0xD0, 0x94, 0x06, 0x26, 0x00, 0x06, 0xD0, 0x8C, 0x06, 0x26, 0x00, 0x06, 0xD0, 0x98, 0x06, 0x26, 0x00, 0x06, 0x49, 0x94, 0x06, 0x26, 0x00, 0x06, 0x49, 0x8C, 0x06, 0x26, 0x00, 0x06, 0x49, 0x18, 0x06, 0xCC, 0x14, 0x06, 0xCC, 0x0C, 0x06, 0xCC, 0x10, 0x06, 0xCC, 0x98, 0x06, 0x26, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x26, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x26, 0x00, 0x06, 0x45, 0x98, 0x06, 0x26, 0x00, 0x06, 0x49, 0x98, 0x06, 0x26, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x28, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x28, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x28, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x28, 0x00, 0x06, 0x45, 0x98, 0x06, 0x28, 0x00, 0x06, 0x49, 0x98, 0x06, 0x28, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x2A, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x2A, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x2A, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x2A, 0x00, 0x06, 0x45, 0x98, 0x06, 0x2A, 0x00, 0x06, 0x49, 0x98, 0x06, 0x2A, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x2B, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x2B, 0x00, 0x06, 0x45, 0x98, 0x06, 0x2B, 0x00, 0x06, 0x49, 0x98, 0x06, 0x2B, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x2C, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x2C, 0x00, 0x06, 0x45, 0x98, 0x06, 0x2D, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x2D, 0x00, 0x06, 0x45, 0x98, 0x06, 0x2E, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x2E, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x2E, 0x00, 0x06, 0x45, 0x98, 0x06, 0x33, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x33, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x33, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x33, 0x00, 0x06, 0x45, 0x98, 0x06, 0x35, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x35, 0x00, 0x06, 0x45, 0x98, 0x06, 0x36, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x36, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x36, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x36, 0x00, 0x06, 0x45, 0x98, 0x06, 0x37, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x37, 0x00, 0x06, 0x45, 0x98, 0x06, 0x38, 0x00, 0x06, 0x45, 0x98, 0x06, 0x39, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x39, 0x00, 0x06, 0x45, 0x98, 0x06, 0x3A, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x3A, 0x00, 0x06, 0x45, 0x98, 0x06, 0x41, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x41, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x41, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x41, 0x00, 0x06, 0x45, 0x98, 0x06, 0x41, 0x00, 0x06, 0x49, 0x98, 0x06, 0x41, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x42, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x42, 0x00, 0x06, 0x45, 0x98, 0x06, 0x42, 0x00, 0x06, 0x49, 0x98, 0x06, 0x42, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x43, 0x00, 0x06, 0x27, 0x98, 0x06, 0x43, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x43, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x43, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x43, 0x00, 0x06, 0x44, 0x98, 0x06, 0x43, 0x00, 0x06, 0x45, 0x98, 0x06, 0x43, 0x00, 0x06, 0x49, 0x98, 0x06, 0x43, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x44, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x44, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x44, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x44, 0x00, 0x06, 0x45, 0x98, 0x06, 0x44, 0x00, 0x06, 0x49, 0x98, 0x06, 0x44, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x45, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x45, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x45, 0x00, 0x06, 0x45, 0x98, 0x06, 0x45, 0x00, 0x06, 0x49, 0x98, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x46, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x46, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x46, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x46, 0x00, 0x06, 0x45, 0x98, 0x06, 0x46, 0x00, 0x06, 0x49, 0x98, 0x06, 0x46, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x47, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x47, 0x00, 0x06, 0x45, 0x98, 0x06, 0x47, 0x00, 0x06, 0x49, 0x98, 0x06, 0x47, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x4A, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x4A, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x4A, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x4A, 0x00, 0x06, 0x45, 0x98, 0x06, 0x4A, 0x00, 0x06, 0x49, 0x98, 0x06, 0x4A, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x30, 0x00, 0x06, 0x70, 0x98, 0x06, 0x31, 0x00, 0x06, 0x70, 0x98, 0x06, 0x49, 0x00, 0x06, 0x70, 0x98, 0x00, 0x20, 0x80, 0x06, 0x4C, 0x00, 0x06, 0x51, 0x98, 0x00, 0x20, 0x80, 0x06, 0x4D, 0x00, 0x06, 0x51, 0x98, 0x00, 0x20, 0x80, 0x06, 0x4E, 0x00, 0x06, 0x51, 0x98, 0x00, 0x20, 0x80, 0x06, 0x4F, 0x00, 0x06, 0x51, 0x98, 0x00, 0x20, 0x80, 0x06, 0x50, 0x00, 0x06, 0x51, 0x98, 0x00, 0x20, 0x80, 0x06, 0x51, 0x00, 0x06, 0x70, 0x94, 0x06, 0x26, 0x00, 0x06, 0x31, 0x94, 0x06, 0x26, 0x00, 0x06, 0x32, 0x94, 0x06, 0x26, 0x00, 0x06, 0x45, 0x94, 0x06, 0x26, 0x00, 0x06, 0x46, 0x94, 0x06, 0x26, 0x00, 0x06, 0x49, 0x94, 0x06, 0x26, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x28, 0x00, 0x06, 0x31, 0x94, 0x06, 0x28, 0x00, 0x06, 0x32, 0x94, 0x06, 0x28, 0x00, 0x06, 0x45, 0x94, 0x06, 0x28, 0x00, 0x06, 0x46, 0x94, 0x06, 0x28, 0x00, 0x06, 0x49, 0x94, 0x06, 0x28, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2A, 0x00, 0x06, 0x31, 0x94, 0x06, 0x2A, 0x00, 0x06, 0x32, 0x94, 0x06, 0x2A, 0x00, 0x06, 0x45, 0x94, 0x06, 0x2A, 0x00, 0x06, 0x46, 0x94, 0x06, 0x2A, 0x00, 0x06, 0x49, 0x94, 0x06, 0x2A, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2B, 0x00, 0x06, 0x31, 0x94, 0x06, 0x2B, 0x00, 0x06, 0x32, 0x94, 0x06, 0x2B, 0x00, 0x06, 0x45, 0x94, 0x06, 0x2B, 0x00, 0x06, 0x46, 0x94, 0x06, 0x2B, 0x00, 0x06, 0x49, 0x94, 0x06, 0x2B, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x41, 0x00, 0x06, 0x49, 0x94, 0x06, 0x41, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x42, 0x00, 0x06, 0x49, 0x94, 0x06, 0x42, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x43, 0x00, 0x06, 0x27, 0x94, 0x06, 0x43, 0x00, 0x06, 0x44, 0x94, 0x06, 0x43, 0x00, 0x06, 0x45, 0x94, 0x06, 0x43, 0x00, 0x06, 0x49, 0x94, 0x06, 0x43, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x44, 0x00, 0x06, 0x45, 0x94, 0x06, 0x44, 0x00, 0x06, 0x49, 0x94, 0x06, 0x44, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x45, 0x00, 0x06, 0x27, 0x94, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x46, 0x00, 0x06, 0x31, 0x94, 0x06, 0x46, 0x00, 0x06, 0x32, 0x94, 0x06, 0x46, 0x00, 0x06, 0x45, 0x94, 0x06, 0x46, 0x00, 0x06, 0x46, 0x94, 0x06, 0x46, 0x00, 0x06, 0x49, 0x94, 0x06, 0x46, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x49, 0x00, 0x06, 0x70, 0x94, 0x06, 0x4A, 0x00, 0x06, 0x31, 0x94, 0x06, 0x4A, 0x00, 0x06, 0x32, 0x94, 0x06, 0x4A, 0x00, 0x06, 0x45, 0x94, 0x06, 0x4A, 0x00, 0x06, 0x46, 0x94, 0x06, 0x4A, 0x00, 0x06, 0x49, 0x94, 0x06, 0x4A, 0x00, 0x06, 0x4A, 0x8C, 0x06, 0x26, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x26, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x26, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x26, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x26, 0x00, 0x06, 0x47, 0x8C, 0x06, 0x28, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x28, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x28, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x28, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x28, 0x00, 0x06, 0x47, 0x8C, 0x06, 0x2A, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x2A, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x2A, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x2A, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x2A, 0x00, 0x06, 0x47, 0x8C, 0x06, 0x2B, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x2C, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x2C, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x2D, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x2D, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x2E, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x2E, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x33, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x33, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x33, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x33, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x35, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x35, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x35, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x36, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x36, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x36, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x36, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x37, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x38, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x39, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x39, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x3A, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x3A, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x41, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x41, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x41, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x41, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x42, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x42, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x43, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x43, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x43, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x43, 0x00, 0x06, 0x44, 0x8C, 0x06, 0x43, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x44, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x44, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x44, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x44, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x44, 0x00, 0x06, 0x47, 0x8C, 0x06, 0x45, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x45, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x45, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x46, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x46, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x46, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x46, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x46, 0x00, 0x06, 0x47, 0x8C, 0x06, 0x47, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x47, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x47, 0x00, 0x06, 0x70, 0x8C, 0x06, 0x4A, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x4A, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x4A, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x4A, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x4A, 0x00, 0x06, 0x47, 0x90, 0x06, 0x26, 0x00, 0x06, 0x45, 0x90, 0x06, 0x26, 0x00, 0x06, 0x47, 0x90, 0x06, 0x28, 0x00, 0x06, 0x45, 0x90, 0x06, 0x28, 0x00, 0x06, 0x47, 0x90, 0x06, 0x2A, 0x00, 0x06, 0x45, 0x90, 0x06, 0x2A, 0x00, 0x06, 0x47, 0x90, 0x06, 0x2B, 0x00, 0x06, 0x45, 0x90, 0x06, 0x2B, 0x00, 0x06, 0x47, 0x90, 0x06, 0x33, 0x00, 0x06, 0x45, 0x90, 0x06, 0x33, 0x00, 0x06, 0x47, 0x90, 0x06, 0x34, 0x00, 0x06, 0x45, 0x90, 0x06, 0x34, 0x00, 0x06, 0x47, 0x90, 0x06, 0x43, 0x00, 0x06, 0x44, 0x90, 0x06, 0x43, 0x00, 0x06, 0x45, 0x90, 0x06, 0x44, 0x00, 0x06, 0x45, 0x90, 0x06, 0x46, 0x00, 0x06, 0x45, 0x90, 0x06, 0x46, 0x00, 0x06, 0x47, 0x90, 0x06, 0x4A, 0x00, 0x06, 0x45, 0x90, 0x06, 0x4A, 0x00, 0x06, 0x47, 0x90, 0x06, 0x40, 0x80, 0x06, 0x4E, 0x00, 0x06, 0x51, 0x90, 0x06, 0x40, 0x80, 0x06, 0x4F, 0x00, 0x06, 0x51, 0x90, 0x06, 0x40, 0x80, 0x06, 0x50, 0x00, 0x06, 0x51, 0x98, 0x06, 0x37, 0x00, 0x06, 0x49, 0x98, 0x06, 0x37, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x39, 0x00, 0x06, 0x49, 0x98, 0x06, 0x39, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x3A, 0x00, 0x06, 0x49, 0x98, 0x06, 0x3A, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x33, 0x00, 0x06, 0x49, 0x98, 0x06, 0x33, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x34, 0x00, 0x06, 0x49, 0x98, 0x06, 0x34, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x2D, 0x00, 0x06, 0x49, 0x98, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x2C, 0x00, 0x06, 0x49, 0x98, 0x06, 0x2C, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x2E, 0x00, 0x06, 0x49, 0x98, 0x06, 0x2E, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x35, 0x00, 0x06, 0x49, 0x98, 0x06, 0x35, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x36, 0x00, 0x06, 0x49, 0x98, 0x06, 0x36, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x34, 0x00, 0x06, 0x2C, 0x98, 0x06, 0x34, 0x00, 0x06, 0x2D, 0x98, 0x06, 0x34, 0x00, 0x06, 0x2E, 0x98, 0x06, 0x34, 0x00, 0x06, 0x45, 0x98, 0x06, 0x34, 0x00, 0x06, 0x31, 0x98, 0x06, 0x33, 0x00, 0x06, 0x31, 0x98, 0x06, 0x35, 0x00, 0x06, 0x31, 0x98, 0x06, 0x36, 0x00, 0x06, 0x31, 0x94, 0x06, 0x37, 0x00, 0x06, 0x49, 0x94, 0x06, 0x37, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x39, 0x00, 0x06, 0x49, 0x94, 0x06, 0x39, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x3A, 0x00, 0x06, 0x49, 0x94, 0x06, 0x3A, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x33, 0x00, 0x06, 0x49, 0x94, 0x06, 0x33, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x34, 0x00, 0x06, 0x49, 0x94, 0x06, 0x34, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2D, 0x00, 0x06, 0x49, 0x94, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2C, 0x00, 0x06, 0x49, 0x94, 0x06, 0x2C, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2E, 0x00, 0x06, 0x49, 0x94, 0x06, 0x2E, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x35, 0x00, 0x06, 0x49, 0x94, 0x06, 0x35, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x36, 0x00, 0x06, 0x49, 0x94, 0x06, 0x36, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x34, 0x00, 0x06, 0x2C, 0x94, 0x06, 0x34, 0x00, 0x06, 0x2D, 0x94, 0x06, 0x34, 0x00, 0x06, 0x2E, 0x94, 0x06, 0x34, 0x00, 0x06, 0x45, 0x94, 0x06, 0x34, 0x00, 0x06, 0x31, 0x94, 0x06, 0x33, 0x00, 0x06, 0x31, 0x94, 0x06, 0x35, 0x00, 0x06, 0x31, 0x94, 0x06, 0x36, 0x00, 0x06, 0x31, 0x8C, 0x06, 0x34, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x34, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x34, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x34, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x33, 0x00, 0x06, 0x47, 0x8C, 0x06, 0x34, 0x00, 0x06, 0x47, 0x8C, 0x06, 0x37, 0x00, 0x06, 0x45, 0x90, 0x06, 0x33, 0x00, 0x06, 0x2C, 0x90, 0x06, 0x33, 0x00, 0x06, 0x2D, 0x90, 0x06, 0x33, 0x00, 0x06, 0x2E, 0x90, 0x06, 0x34, 0x00, 0x06, 0x2C, 0x90, 0x06, 0x34, 0x00, 0x06, 0x2D, 0x90, 0x06, 0x34, 0x00, 0x06, 0x2E, 0x90, 0x06, 0x37, 0x00, 0x06, 0x45, 0x90, 0x06, 0x38, 0x00, 0x06, 0x45, 0x94, 0x06, 0x27, 0x00, 0x06, 0x4B, 0x98, 0x06, 0x27, 0x00, 0x06, 0x4B, 0x8C, 0x06, 0x2A, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x45, 0x94, 0x06, 0x2A, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x2A, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x2A, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x2A, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x2A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x2A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x2A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2E, 0x94, 0x06, 0x2C, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x2C, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x94, 0x06, 0x2D, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2D, 0x80, 0x06, 0x45, 0x00, 0x06, 0x49, 0x8C, 0x06, 0x33, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x33, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x2D, 0x94, 0x06, 0x33, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x49, 0x94, 0x06, 0x33, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x33, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x33, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2C, 0x94, 0x06, 0x33, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x33, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x35, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x35, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x2D, 0x94, 0x06, 0x35, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x34, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x34, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x45, 0x94, 0x06, 0x34, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x34, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x34, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2E, 0x94, 0x06, 0x34, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x34, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x36, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x49, 0x94, 0x06, 0x36, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x36, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x45, 0x94, 0x06, 0x37, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x37, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x37, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x37, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x39, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x45, 0x94, 0x06, 0x39, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x39, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x39, 0x80, 0x06, 0x45, 0x00, 0x06, 0x49, 0x94, 0x06, 0x3A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x3A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x3A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x49, 0x94, 0x06, 0x41, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x41, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x45, 0x94, 0x06, 0x42, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x94, 0x06, 0x42, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x44, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x45, 0x94, 0x06, 0x44, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x44, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x49, 0x8C, 0x06, 0x44, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x2C, 0x94, 0x06, 0x44, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x2C, 0x94, 0x06, 0x44, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x44, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x45, 0x94, 0x06, 0x44, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x44, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x45, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x45, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x45, 0x94, 0x06, 0x45, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x8C, 0x06, 0x45, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x45, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x45, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x45, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x45, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x2E, 0x8C, 0x06, 0x47, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2C, 0x8C, 0x06, 0x47, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x46, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x45, 0x94, 0x06, 0x46, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x49, 0x94, 0x06, 0x46, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x46, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x45, 0x94, 0x06, 0x46, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x49, 0x94, 0x06, 0x46, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x46, 0x80, 0x06, 0x45, 0x00, 0x06, 0x49, 0x94, 0x06, 0x4A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x4A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x28, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2A, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2A, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x49, 0x94, 0x06, 0x2A, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2A, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x49, 0x94, 0x06, 0x2A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x49, 0x94, 0x06, 0x2C, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2C, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x49, 0x94, 0x06, 0x2C, 0x80, 0x06, 0x45, 0x00, 0x06, 0x49, 0x94, 0x06, 0x33, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x49, 0x94, 0x06, 0x35, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x34, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x36, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x44, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x44, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x4A, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x4A, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x4A, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x45, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x42, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x46, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x8C, 0x06, 0x42, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2D, 0x8C, 0x06, 0x44, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x45, 0x94, 0x06, 0x39, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x43, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x8C, 0x06, 0x46, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x2D, 0x94, 0x06, 0x45, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x4A, 0x8C, 0x06, 0x44, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x45, 0x94, 0x06, 0x43, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x44, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x45, 0x94, 0x06, 0x46, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x2D, 0x94, 0x06, 0x2C, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x2D, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x45, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x41, 0x80, 0x06, 0x45, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x28, 0x80, 0x06, 0x2D, 0x00, 0x06, 0x4A, 0x8C, 0x06, 0x43, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x39, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x45, 0x8C, 0x06, 0x35, 0x80, 0x06, 0x45, 0x00, 0x06, 0x45, 0x94, 0x06, 0x33, 0x80, 0x06, 0x2E, 0x00, 0x06, 0x4A, 0x94, 0x06, 0x46, 0x80, 0x06, 0x2C, 0x00, 0x06, 0x4A, 0x98, 0x06, 0x35, 0x80, 0x06, 0x44, 0x00, 0x06, 0xD2, 0x98, 0x06, 0x42, 0x80, 0x06, 0x44, 0x00, 0x06, 0xD2, 0x98, 0x06, 0x27, 0x80, 0x06, 0x44, 0x80, 0x06, 0x44, 0x00, 0x06, 0x47, 0x98, 0x06, 0x27, 0x80, 0x06, 0x43, 0x80, 0x06, 0x28, 0x00, 0x06, 0x31, 0x98, 0x06, 0x45, 0x80, 0x06, 0x2D, 0x80, 0x06, 0x45, 0x00, 0x06, 0x2F, 0x98, 0x06, 0x35, 0x80, 0x06, 0x44, 0x80, 0x06, 0x39, 0x00, 0x06, 0x45, 0x98, 0x06, 0x31, 0x80, 0x06, 0x33, 0x80, 0x06, 0x48, 0x00, 0x06, 0x44, 0x98, 0x06, 0x39, 0x80, 0x06, 0x44, 0x80, 0x06, 0x4A, 0x00, 0x06, 0x47, 0x98, 0x06, 0x48, 0x80, 0x06, 0x33, 0x80, 0x06, 0x44, 0x00, 0x06, 0x45, 0x98, 0x06, 0x35, 0x80, 0x06, 0x44, 0x00, 0x06, 0x49, 0x98, 0x06, 0x35, 0x80, 0x06, 0x44, 0x80, 0x06, 0x49, 0x80, 0x00, 0x20, 0x80, 0x06, 0x27, 0x80, 0x06, 0x44, 0x80, 0x06, 0x44, 0x80, 0x06, 0x47, 0x80, 0x00, 0x20, 0x80, 0x06, 0x39, 0x80, 0x06, 0x44, 0x80, 0x06, 0x4A, 0x80, 0x06, 0x47, 0x80, 0x00, 0x20, 0x80, 0x06, 0x48, 0x80, 0x06, 0x33, 0x80, 0x06, 0x44, 0x00, 0x06, 0x45, 0x98, 0x06, 0x2C, 0x80, 0x06, 0x44, 0x80, 0x00, 0x20, 0x80, 0x06, 0x2C, 0x80, 0x06, 0x44, 0x80, 0x06, 0x27, 0x80, 0x06, 0x44, 0x00, 0x06, 0x47, 0x98, 0x06, 0x31, 0x80, 0x06, 0xCC, 0x80, 0x06, 0x27, 0x00, 0x06, 0x44, 0x28, 0x00, 0x2C, 0x28, 0x30, 0x01, 0x28, 0x30, 0x02, 0x28, 0x00, 0x3A, 0x28, 0x00, 0x3B, 0x28, 0x00, 0x21, 0x28, 0x00, 0x3F, 0x28, 0x30, 0x16, 0x28, 0x30, 0x17, 0x28, 0x20, 0x26, 0x28, 0x20, 0x25, 0x28, 0x20, 0x14, 0x28, 0x20, 0x13, 0x28, 0x00, 0x5F, 0x28, 0x00, 0x5F, 0x28, 0x00, 0x28, 0x28, 0x00, 0x29, 0x28, 0x00, 0x7B, 0x28, 0x00, 0x7D, 0x28, 0x30, 0x14, 0x28, 0x30, 0x15, 0x28, 0x30, 0x10, 0x28, 0x30, 0x11, 0x28, 0x30, 0x0A, 0x28, 0x30, 0x0B, 0x28, 0x30, 0x08, 0x28, 0x30, 0x09, 0x28, 0x30, 0x0C, 0x28, 0x30, 0x0D, 0x28, 0x30, 0x0E, 0x28, 0x30, 0x0F, 0x28, 0x00, 0x5B, 0x28, 0x00, 0x5D, 0x40, 0x20, 0x3E, 0x40, 0x20, 0x3E, 0x40, 0x20, 0x3E, 0x40, 0x20, 0x3E, 0x40, 0x00, 0x5F, 0x40, 0x00, 0x5F, 0x40, 0x00, 0x5F, 0x34, 0x00, 0x2C, 0x34, 0x30, 0x01, 0x34, 0x00, 0x2E, 0x34, 0x00, 0x3B, 0x34, 0x00, 0x3A, 0x34, 0x00, 0x3F, 0x34, 0x00, 0x21, 0x34, 0x20, 0x14, 0x34, 0x00, 0x28, 0x34, 0x00, 0x29, 0x34, 0x00, 0x7B, 0x34, 0x00, 0x7D, 0x34, 0x30, 0x14, 0x34, 0x30, 0x15, 0x34, 0x00, 0x23, 0x34, 0x00, 0x26, 0x34, 0x00, 0x2A, 0x34, 0x00, 0x2B, 0x34, 0x00, 0x2D, 0x34, 0x00, 0x3C, 0x34, 0x00, 0x3E, 0x34, 0x00, 0x3D, 0x34, 0x00, 0x5C, 0x34, 0x00, 0x24, 0x34, 0x00, 0x25, 0x34, 0x00, 0x40, 0x98, 0x00, 0x20, 0x00, 0x06, 0x4B, 0x90, 0x06, 0x40, 0x00, 0x06, 0x4B, 0x98, 0x00, 0x20, 0x00, 0x06, 0x4C, 0x98, 0x00, 0x20, 0x00, 0x06, 0x4D, 0x98, 0x00, 0x20, 0x00, 0x06, 0x4E, 0x90, 0x06, 0x40, 0x00, 0x06, 0x4E, 0x98, 0x00, 0x20, 0x00, 0x06, 0x4F, 0x90, 0x06, 0x40, 0x00, 0x06, 0x4F, 0x98, 0x00, 0x20, 0x00, 0x06, 0x50, 0x90, 0x06, 0x40, 0x00, 0x06, 0x50, 0x98, 0x00, 0x20, 0x00, 0x06, 0x51, 0x90, 0x06, 0x40, 0x00, 0x06, 0x51, 0x98, 0x00, 0x20, 0x00, 0x06, 0x52, 0x90, 0x06, 0x40, 0x00, 0x06, 0x52, 0x18, 0x06, 0x21, 0x18, 0x06, 0x22, 0x14, 0x06, 0x22, 0x18, 0x06, 0x23, 0x14, 0x06, 0x23, 0x18, 0x06, 0x24, 0x14, 0x06, 0x24, 0x18, 0x06, 0x25, 0x14, 0x06, 0x25, 0x18, 0x06, 0x26, 0x14, 0x06, 0x26, 0x0C, 0x06, 0x26, 0x10, 0x06, 0x26, 0x18, 0x06, 0x27, 0x14, 0x06, 0x27, 0x18, 0x06, 0x28, 0x14, 0x06, 0x28, 0x0C, 0x06, 0x28, 0x10, 0x06, 0x28, 0x18, 0x06, 0x29, 0x14, 0x06, 0x29, 0x18, 0x06, 0x2A, 0x14, 0x06, 0x2A, 0x0C, 0x06, 0x2A, 0x10, 0x06, 0x2A, 0x18, 0x06, 0x2B, 0x14, 0x06, 0x2B, 0x0C, 0x06, 0x2B, 0x10, 0x06, 0x2B, 0x18, 0x06, 0x2C, 0x14, 0x06, 0x2C, 0x0C, 0x06, 0x2C, 0x10, 0x06, 0x2C, 0x18, 0x06, 0x2D, 0x14, 0x06, 0x2D, 0x0C, 0x06, 0x2D, 0x10, 0x06, 0x2D, 0x18, 0x06, 0x2E, 0x14, 0x06, 0x2E, 0x0C, 0x06, 0x2E, 0x10, 0x06, 0x2E, 0x18, 0x06, 0x2F, 0x14, 0x06, 0x2F, 0x18, 0x06, 0x30, 0x14, 0x06, 0x30, 0x18, 0x06, 0x31, 0x14, 0x06, 0x31, 0x18, 0x06, 0x32, 0x14, 0x06, 0x32, 0x18, 0x06, 0x33, 0x14, 0x06, 0x33, 0x0C, 0x06, 0x33, 0x10, 0x06, 0x33, 0x18, 0x06, 0x34, 0x14, 0x06, 0x34, 0x0C, 0x06, 0x34, 0x10, 0x06, 0x34, 0x18, 0x06, 0x35, 0x14, 0x06, 0x35, 0x0C, 0x06, 0x35, 0x10, 0x06, 0x35, 0x18, 0x06, 0x36, 0x14, 0x06, 0x36, 0x0C, 0x06, 0x36, 0x10, 0x06, 0x36, 0x18, 0x06, 0x37, 0x14, 0x06, 0x37, 0x0C, 0x06, 0x37, 0x10, 0x06, 0x37, 0x18, 0x06, 0x38, 0x14, 0x06, 0x38, 0x0C, 0x06, 0x38, 0x10, 0x06, 0x38, 0x18, 0x06, 0x39, 0x14, 0x06, 0x39, 0x0C, 0x06, 0x39, 0x10, 0x06, 0x39, 0x18, 0x06, 0x3A, 0x14, 0x06, 0x3A, 0x0C, 0x06, 0x3A, 0x10, 0x06, 0x3A, 0x18, 0x06, 0x41, 0x14, 0x06, 0x41, 0x0C, 0x06, 0x41, 0x10, 0x06, 0x41, 0x18, 0x06, 0x42, 0x14, 0x06, 0x42, 0x0C, 0x06, 0x42, 0x10, 0x06, 0x42, 0x18, 0x06, 0x43, 0x14, 0x06, 0x43, 0x0C, 0x06, 0x43, 0x10, 0x06, 0x43, 0x18, 0x06, 0x44, 0x14, 0x06, 0x44, 0x0C, 0x06, 0x44, 0x10, 0x06, 0x44, 0x18, 0x06, 0x45, 0x14, 0x06, 0x45, 0x0C, 0x06, 0x45, 0x10, 0x06, 0x45, 0x18, 0x06, 0x46, 0x14, 0x06, 0x46, 0x0C, 0x06, 0x46, 0x10, 0x06, 0x46, 0x18, 0x06, 0x47, 0x14, 0x06, 0x47, 0x0C, 0x06, 0x47, 0x10, 0x06, 0x47, 0x18, 0x06, 0x48, 0x14, 0x06, 0x48, 0x18, 0x06, 0x49, 0x14, 0x06, 0x49, 0x18, 0x06, 0x4A, 0x14, 0x06, 0x4A, 0x0C, 0x06, 0x4A, 0x10, 0x06, 0x4A, 0x98, 0x06, 0x44, 0x00, 0x06, 0x22, 0x94, 0x06, 0x44, 0x00, 0x06, 0x22, 0x98, 0x06, 0x44, 0x00, 0x06, 0x23, 0x94, 0x06, 0x44, 0x00, 0x06, 0x23, 0x98, 0x06, 0x44, 0x00, 0x06, 0x25, 0x94, 0x06, 0x44, 0x00, 0x06, 0x25, 0x98, 0x06, 0x44, 0x00, 0x06, 0x27, 0x94, 0x06, 0x44, 0x00, 0x06, 0x27, 0x2C, 0x00, 0x21, 0x2C, 0x00, 0x22, 0x2C, 0x00, 0x23, 0x2C, 0x00, 0x24, 0x2C, 0x00, 0x25, 0x2C, 0x00, 0x26, 0x2C, 0x00, 0x27, 0x2C, 0x00, 0x28, 0x2C, 0x00, 0x29, 0x2C, 0x00, 0x2A, 0x2C, 0x00, 0x2B, 0x2C, 0x00, 0x2C, 0x2C, 0x00, 0x2D, 0x2C, 0x00, 0x2E, 0x2C, 0x00, 0x2F, 0x2C, 0x00, 0x30, 0x2C, 0x00, 0x31, 0x2C, 0x00, 0x32, 0x2C, 0x00, 0x33, 0x2C, 0x00, 0x34, 0x2C, 0x00, 0x35, 0x2C, 0x00, 0x36, 0x2C, 0x00, 0x37, 0x2C, 0x00, 0x38, 0x2C, 0x00, 0x39, 0x2C, 0x00, 0x3A, 0x2C, 0x00, 0x3B, 0x2C, 0x00, 0x3C, 0x2C, 0x00, 0x3D, 0x2C, 0x00, 0x3E, 0x2C, 0x00, 0x3F, 0x2C, 0x00, 0x40, 0x2C, 0x00, 0x41, 0x2C, 0x00, 0x42, 0x2C, 0x00, 0x43, 0x2C, 0x00, 0x44, 0x2C, 0x00, 0x45, 0x2C, 0x00, 0x46, 0x2C, 0x00, 0x47, 0x2C, 0x00, 0x48, 0x2C, 0x00, 0x49, 0x2C, 0x00, 0x4A, 0x2C, 0x00, 0x4B, 0x2C, 0x00, 0x4C, 0x2C, 0x00, 0x4D, 0x2C, 0x00, 0x4E, 0x2C, 0x00, 0x4F, 0x2C, 0x00, 0x50, 0x2C, 0x00, 0x51, 0x2C, 0x00, 0x52, 0x2C, 0x00, 0x53, 0x2C, 0x00, 0x54, 0x2C, 0x00, 0x55, 0x2C, 0x00, 0x56, 0x2C, 0x00, 0x57, 0x2C, 0x00, 0x58, 0x2C, 0x00, 0x59, 0x2C, 0x00, 0x5A, 0x2C, 0x00, 0x5B, 0x2C, 0x00, 0x5C, 0x2C, 0x00, 0x5D, 0x2C, 0x00, 0x5E, 0x2C, 0x00, 0x5F, 0x2C, 0x00, 0x60, 0x2C, 0x00, 0x61, 0x2C, 0x00, 0x62, 0x2C, 0x00, 0x63, 0x2C, 0x00, 0x64, 0x2C, 0x00, 0x65, 0x2C, 0x00, 0x66, 0x2C, 0x00, 0x67, 0x2C, 0x00, 0x68, 0x2C, 0x00, 0x69, 0x2C, 0x00, 0x6A, 0x2C, 0x00, 0x6B, 0x2C, 0x00, 0x6C, 0x2C, 0x00, 0x6D, 0x2C, 0x00, 0x6E, 0x2C, 0x00, 0x6F, 0x2C, 0x00, 0x70, 0x2C, 0x00, 0x71, 0x2C, 0x00, 0x72, 0x2C, 0x00, 0x73, 0x2C, 0x00, 0x74, 0x2C, 0x00, 0x75, 0x2C, 0x00, 0x76, 0x2C, 0x00, 0x77, 0x2C, 0x00, 0x78, 0x2C, 0x00, 0x79, 0x2C, 0x00, 0x7A, 0x2C, 0x00, 0x7B, 0x2C, 0x00, 0x7C, 0x2C, 0x00, 0x7D, 0x2C, 0x00, 0x7E, 0x2C, 0x29, 0x85, 0x2C, 0x29, 0x86, 0x30, 0x30, 0x02, 0x30, 0x30, 0x0C, 0x30, 0x30, 0x0D, 0x30, 0x30, 0x01, 0x30, 0x30, 0xFB, 0x30, 0x30, 0xF2, 0x30, 0x30, 0xA1, 0x30, 0x30, 0xA3, 0x30, 0x30, 0xA5, 0x30, 0x30, 0xA7, 0x30, 0x30, 0xA9, 0x30, 0x30, 0xE3, 0x30, 0x30, 0xE5, 0x30, 0x30, 0xE7, 0x30, 0x30, 0xC3, 0x30, 0x30, 0xFC, 0x30, 0x30, 0xA2, 0x30, 0x30, 0xA4, 0x30, 0x30, 0xA6, 0x30, 0x30, 0xA8, 0x30, 0x30, 0xAA, 0x30, 0x30, 0xAB, 0x30, 0x30, 0xAD, 0x30, 0x30, 0xAF, 0x30, 0x30, 0xB1, 0x30, 0x30, 0xB3, 0x30, 0x30, 0xB5, 0x30, 0x30, 0xB7, 0x30, 0x30, 0xB9, 0x30, 0x30, 0xBB, 0x30, 0x30, 0xBD, 0x30, 0x30, 0xBF, 0x30, 0x30, 0xC1, 0x30, 0x30, 0xC4, 0x30, 0x30, 0xC6, 0x30, 0x30, 0xC8, 0x30, 0x30, 0xCA, 0x30, 0x30, 0xCB, 0x30, 0x30, 0xCC, 0x30, 0x30, 0xCD, 0x30, 0x30, 0xCE, 0x30, 0x30, 0xCF, 0x30, 0x30, 0xD2, 0x30, 0x30, 0xD5, 0x30, 0x30, 0xD8, 0x30, 0x30, 0xDB, 0x30, 0x30, 0xDE, 0x30, 0x30, 0xDF, 0x30, 0x30, 0xE0, 0x30, 0x30, 0xE1, 0x30, 0x30, 0xE2, 0x30, 0x30, 0xE4, 0x30, 0x30, 0xE6, 0x30, 0x30, 0xE8, 0x30, 0x30, 0xE9, 0x30, 0x30, 0xEA, 0x30, 0x30, 0xEB, 0x30, 0x30, 0xEC, 0x30, 0x30, 0xED, 0x30, 0x30, 0xEF, 0x30, 0x30, 0xF3, 0x30, 0x30, 0x99, 0x30, 0x30, 0x9A, 0x30, 0x31, 0x64, 0x30, 0x31, 0x31, 0x30, 0x31, 0x32, 0x30, 0x31, 0x33, 0x30, 0x31, 0x34, 0x30, 0x31, 0x35, 0x30, 0x31, 0x36, 0x30, 0x31, 0x37, 0x30, 0x31, 0x38, 0x30, 0x31, 0x39, 0x30, 0x31, 0x3A, 0x30, 0x31, 0x3B, 0x30, 0x31, 0x3C, 0x30, 0x31, 0x3D, 0x30, 0x31, 0x3E, 0x30, 0x31, 0x3F, 0x30, 0x31, 0x40, 0x30, 0x31, 0x41, 0x30, 0x31, 0x42, 0x30, 0x31, 0x43, 0x30, 0x31, 0x44, 0x30, 0x31, 0x45, 0x30, 0x31, 0x46, 0x30, 0x31, 0x47, 0x30, 0x31, 0x48, 0x30, 0x31, 0x49, 0x30, 0x31, 0x4A, 0x30, 0x31, 0x4B, 0x30, 0x31, 0x4C, 0x30, 0x31, 0x4D, 0x30, 0x31, 0x4E, 0x30, 0x31, 0x4F, 0x30, 0x31, 0x50, 0x30, 0x31, 0x51, 0x30, 0x31, 0x52, 0x30, 0x31, 0x53, 0x30, 0x31, 0x54, 0x30, 0x31, 0x55, 0x30, 0x31, 0x56, 0x30, 0x31, 0x57, 0x30, 0x31, 0x58, 0x30, 0x31, 0x59, 0x30, 0x31, 0x5A, 0x30, 0x31, 0x5B, 0x30, 0x31, 0x5C, 0x30, 0x31, 0x5D, 0x30, 0x31, 0x5E, 0x30, 0x31, 0x5F, 0x30, 0x31, 0x60, 0x30, 0x31, 0x61, 0x30, 0x31, 0x62, 0x30, 0x31, 0x63, 0x2C, 0x00, 0xA2, 0x2C, 0x00, 0xA3, 0x2C, 0x00, 0xAC, 0x2C, 0x00, 0xAF, 0x2C, 0x00, 0xA6, 0x2C, 0x00, 0xA5, 0x2C, 0x20, 0xA9, 0x30, 0x25, 0x02, 0x30, 0x21, 0x90, 0x30, 0x21, 0x91, 0x30, 0x21, 0x92, 0x30, 0x21, 0x93, 0x30, 0x25, 0xA0, 0x30, 0x25, 0xCB, 0x81, 0x10, 0x99, 0x01, 0x10, 0xBA, 0x81, 0x10, 0x9B, 0x01, 0x10, 0xBA, 0x81, 0x10, 0xA5, 0x01, 0x10, 0xBA, 0x81, 0x11, 0x31, 0x01, 0x11, 0x27, 0x81, 0x11, 0x32, 0x01, 0x11, 0x27, 0x81, 0x13, 0x47, 0x01, 0x13, 0x3E, 0x81, 0x13, 0x47, 0x01, 0x13, 0x57, 0x81, 0x14, 0xB9, 0x01, 0x14, 0xBA, 0x81, 0x14, 0xB9, 0x01, 0x14, 0xB0, 0x81, 0x14, 0xB9, 0x01, 0x14, 0xBD, 0x81, 0x15, 0xB8, 0x01, 0x15, 0xAF, 0x81, 0x15, 0xB9, 0x01, 0x15, 0xAF, 0x81, 0xD1, 0x57, 0x01, 0xD1, 0x65, 0x81, 0xD1, 0x58, 0x01, 0xD1, 0x65, 0x81, 0xD1, 0x5F, 0x01, 0xD1, 0x6E, 0x81, 0xD1, 0x5F, 0x01, 0xD1, 0x6F, 0x81, 0xD1, 0x5F, 0x01, 0xD1, 0x70, 0x81, 0xD1, 0x5F, 0x01, 0xD1, 0x71, 0x81, 0xD1, 0x5F, 0x01, 0xD1, 0x72, 0x81, 0xD1, 0xB9, 0x01, 0xD1, 0x65, 0x81, 0xD1, 0xBA, 0x01, 0xD1, 0x65, 0x81, 0xD1, 0xBB, 0x01, 0xD1, 0x6E, 0x81, 0xD1, 0xBC, 0x01, 0xD1, 0x6E, 0x81, 0xD1, 0xBB, 0x01, 0xD1, 0x6F, 0x81, 0xD1, 0xBC, 0x01, 0xD1, 0x6F, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x48, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x48, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x48, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x47, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x66, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x48, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x48, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x48, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x48, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x48, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x48, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x00, 0x41, 0x04, 0x00, 0x42, 0x04, 0x00, 0x43, 0x04, 0x00, 0x44, 0x04, 0x00, 0x45, 0x04, 0x00, 0x46, 0x04, 0x00, 0x47, 0x04, 0x00, 0x48, 0x04, 0x00, 0x49, 0x04, 0x00, 0x4A, 0x04, 0x00, 0x4B, 0x04, 0x00, 0x4C, 0x04, 0x00, 0x4D, 0x04, 0x00, 0x4E, 0x04, 0x00, 0x4F, 0x04, 0x00, 0x50, 0x04, 0x00, 0x51, 0x04, 0x00, 0x52, 0x04, 0x00, 0x53, 0x04, 0x00, 0x54, 0x04, 0x00, 0x55, 0x04, 0x00, 0x56, 0x04, 0x00, 0x57, 0x04, 0x00, 0x58, 0x04, 0x00, 0x59, 0x04, 0x00, 0x5A, 0x04, 0x00, 0x61, 0x04, 0x00, 0x62, 0x04, 0x00, 0x63, 0x04, 0x00, 0x64, 0x04, 0x00, 0x65, 0x04, 0x00, 0x66, 0x04, 0x00, 0x67, 0x04, 0x00, 0x68, 0x04, 0x00, 0x69, 0x04, 0x00, 0x6A, 0x04, 0x00, 0x6B, 0x04, 0x00, 0x6C, 0x04, 0x00, 0x6D, 0x04, 0x00, 0x6E, 0x04, 0x00, 0x6F, 0x04, 0x00, 0x70, 0x04, 0x00, 0x71, 0x04, 0x00, 0x72, 0x04, 0x00, 0x73, 0x04, 0x00, 0x74, 0x04, 0x00, 0x75, 0x04, 0x00, 0x76, 0x04, 0x00, 0x77, 0x04, 0x00, 0x78, 0x04, 0x00, 0x79, 0x04, 0x00, 0x7A, 0x04, 0x01, 0x31, 0x04, 0x02, 0x37, 0x04, 0x03, 0x91, 0x04, 0x03, 0x92, 0x04, 0x03, 0x93, 0x04, 0x03, 0x94, 0x04, 0x03, 0x95, 0x04, 0x03, 0x96, 0x04, 0x03, 0x97, 0x04, 0x03, 0x98, 0x04, 0x03, 0x99, 0x04, 0x03, 0x9A, 0x04, 0x03, 0x9B, 0x04, 0x03, 0x9C, 0x04, 0x03, 0x9D, 0x04, 0x03, 0x9E, 0x04, 0x03, 0x9F, 0x04, 0x03, 0xA0, 0x04, 0x03, 0xA1, 0x04, 0x03, 0xF4, 0x04, 0x03, 0xA3, 0x04, 0x03, 0xA4, 0x04, 0x03, 0xA5, 0x04, 0x03, 0xA6, 0x04, 0x03, 0xA7, 0x04, 0x03, 0xA8, 0x04, 0x03, 0xA9, 0x04, 0x22, 0x07, 0x04, 0x03, 0xB1, 0x04, 0x03, 0xB2, 0x04, 0x03, 0xB3, 0x04, 0x03, 0xB4, 0x04, 0x03, 0xB5, 0x04, 0x03, 0xB6, 0x04, 0x03, 0xB7, 0x04, 0x03, 0xB8, 0x04, 0x03, 0xB9, 0x04, 0x03, 0xBA, 0x04, 0x03, 0xBB, 0x04, 0x03, 0xBC, 0x04, 0x03, 0xBD, 0x04, 0x03, 0xBE, 0x04, 0x03, 0xBF, 0x04, 0x03, 0xC0, 0x04, 0x03, 0xC1, 0x04, 0x03, 0xC2, 0x04, 0x03, 0xC3, 0x04, 0x03, 0xC4, 0x04, 0x03, 0xC5, 0x04, 0x03, 0xC6, 0x04, 0x03, 0xC7, 0x04, 0x03, 0xC8, 0x04, 0x03, 0xC9, 0x04, 0x22, 0x02, 0x04, 0x03, 0xF5, 0x04, 0x03, 0xD1, 0x04, 0x03, 0xF0, 0x04, 0x03, 0xD5, 0x04, 0x03, 0xF1, 0x04, 0x03, 0xD6, 0x04, 0x03, 0x91, 0x04, 0x03, 0x92, 0x04, 0x03, 0x93, 0x04, 0x03, 0x94, 0x04, 0x03, 0x95, 0x04, 0x03, 0x96, 0x04, 0x03, 0x97, 0x04, 0x03, 0x98, 0x04, 0x03, 0x99, 0x04, 0x03, 0x9A, 0x04, 0x03, 0x9B, 0x04, 0x03, 0x9C, 0x04, 0x03, 0x9D, 0x04, 0x03, 0x9E, 0x04, 0x03, 0x9F, 0x04, 0x03, 0xA0, 0x04, 0x03, 0xA1, 0x04, 0x03, 0xF4, 0x04, 0x03, 0xA3, 0x04, 0x03, 0xA4, 0x04, 0x03, 0xA5, 0x04, 0x03, 0xA6, 0x04, 0x03, 0xA7, 0x04, 0x03, 0xA8, 0x04, 0x03, 0xA9, 0x04, 0x22, 0x07, 0x04, 0x03, 0xB1, 0x04, 0x03, 0xB2, 0x04, 0x03, 0xB3, 0x04, 0x03, 0xB4, 0x04, 0x03, 0xB5, 0x04, 0x03, 0xB6, 0x04, 0x03, 0xB7, 0x04, 0x03, 0xB8, 0x04, 0x03, 0xB9, 0x04, 0x03, 0xBA, 0x04, 0x03, 0xBB, 0x04, 0x03, 0xBC, 0x04, 0x03, 0xBD, 0x04, 0x03, 0xBE, 0x04, 0x03, 0xBF, 0x04, 0x03, 0xC0, 0x04, 0x03, 0xC1, 0x04, 0x03, 0xC2, 0x04, 0x03, 0xC3, 0x04, 0x03, 0xC4, 0x04, 0x03, 0xC5, 0x04, 0x03, 0xC6, 0x04, 0x03, 0xC7, 0x04, 0x03, 0xC8, 0x04, 0x03, 0xC9, 0x04, 0x22, 0x02, 0x04, 0x03, 0xF5, 0x04, 0x03, 0xD1, 0x04, 0x03, 0xF0, 0x04, 0x03, 0xD5, 0x04, 0x03, 0xF1, 0x04, 0x03, 0xD6, 0x04, 0x03, 0x91, 0x04, 0x03, 0x92, 0x04, 0x03, 0x93, 0x04, 0x03, 0x94, 0x04, 0x03, 0x95, 0x04, 0x03, 0x96, 0x04, 0x03, 0x97, 0x04, 0x03, 0x98, 0x04, 0x03, 0x99, 0x04, 0x03, 0x9A, 0x04, 0x03, 0x9B, 0x04, 0x03, 0x9C, 0x04, 0x03, 0x9D, 0x04, 0x03, 0x9E, 0x04, 0x03, 0x9F, 0x04, 0x03, 0xA0, 0x04, 0x03, 0xA1, 0x04, 0x03, 0xF4, 0x04, 0x03, 0xA3, 0x04, 0x03, 0xA4, 0x04, 0x03, 0xA5, 0x04, 0x03, 0xA6, 0x04, 0x03, 0xA7, 0x04, 0x03, 0xA8, 0x04, 0x03, 0xA9, 0x04, 0x22, 0x07, 0x04, 0x03, 0xB1, 0x04, 0x03, 0xB2, 0x04, 0x03, 0xB3, 0x04, 0x03, 0xB4, 0x04, 0x03, 0xB5, 0x04, 0x03, 0xB6, 0x04, 0x03, 0xB7, 0x04, 0x03, 0xB8, 0x04, 0x03, 0xB9, 0x04, 0x03, 0xBA, 0x04, 0x03, 0xBB, 0x04, 0x03, 0xBC, 0x04, 0x03, 0xBD, 0x04, 0x03, 0xBE, 0x04, 0x03, 0xBF, 0x04, 0x03, 0xC0, 0x04, 0x03, 0xC1, 0x04, 0x03, 0xC2, 0x04, 0x03, 0xC3, 0x04, 0x03, 0xC4, 0x04, 0x03, 0xC5, 0x04, 0x03, 0xC6, 0x04, 0x03, 0xC7, 0x04, 0x03, 0xC8, 0x04, 0x03, 0xC9, 0x04, 0x22, 0x02, 0x04, 0x03, 0xF5, 0x04, 0x03, 0xD1, 0x04, 0x03, 0xF0, 0x04, 0x03, 0xD5, 0x04, 0x03, 0xF1, 0x04, 0x03, 0xD6, 0x04, 0x03, 0x91, 0x04, 0x03, 0x92, 0x04, 0x03, 0x93, 0x04, 0x03, 0x94, 0x04, 0x03, 0x95, 0x04, 0x03, 0x96, 0x04, 0x03, 0x97, 0x04, 0x03, 0x98, 0x04, 0x03, 0x99, 0x04, 0x03, 0x9A, 0x04, 0x03, 0x9B, 0x04, 0x03, 0x9C, 0x04, 0x03, 0x9D, 0x04, 0x03, 0x9E, 0x04, 0x03, 0x9F, 0x04, 0x03, 0xA0, 0x04, 0x03, 0xA1, 0x04, 0x03, 0xF4, 0x04, 0x03, 0xA3, 0x04, 0x03, 0xA4, 0x04, 0x03, 0xA5, 0x04, 0x03, 0xA6, 0x04, 0x03, 0xA7, 0x04, 0x03, 0xA8, 0x04, 0x03, 0xA9, 0x04, 0x22, 0x07, 0x04, 0x03, 0xB1, 0x04, 0x03, 0xB2, 0x04, 0x03, 0xB3, 0x04, 0x03, 0xB4, 0x04, 0x03, 0xB5, 0x04, 0x03, 0xB6, 0x04, 0x03, 0xB7, 0x04, 0x03, 0xB8, 0x04, 0x03, 0xB9, 0x04, 0x03, 0xBA, 0x04, 0x03, 0xBB, 0x04, 0x03, 0xBC, 0x04, 0x03, 0xBD, 0x04, 0x03, 0xBE, 0x04, 0x03, 0xBF, 0x04, 0x03, 0xC0, 0x04, 0x03, 0xC1, 0x04, 0x03, 0xC2, 0x04, 0x03, 0xC3, 0x04, 0x03, 0xC4, 0x04, 0x03, 0xC5, 0x04, 0x03, 0xC6, 0x04, 0x03, 0xC7, 0x04, 0x03, 0xC8, 0x04, 0x03, 0xC9, 0x04, 0x22, 0x02, 0x04, 0x03, 0xF5, 0x04, 0x03, 0xD1, 0x04, 0x03, 0xF0, 0x04, 0x03, 0xD5, 0x04, 0x03, 0xF1, 0x04, 0x03, 0xD6, 0x04, 0x03, 0x91, 0x04, 0x03, 0x92, 0x04, 0x03, 0x93, 0x04, 0x03, 0x94, 0x04, 0x03, 0x95, 0x04, 0x03, 0x96, 0x04, 0x03, 0x97, 0x04, 0x03, 0x98, 0x04, 0x03, 0x99, 0x04, 0x03, 0x9A, 0x04, 0x03, 0x9B, 0x04, 0x03, 0x9C, 0x04, 0x03, 0x9D, 0x04, 0x03, 0x9E, 0x04, 0x03, 0x9F, 0x04, 0x03, 0xA0, 0x04, 0x03, 0xA1, 0x04, 0x03, 0xF4, 0x04, 0x03, 0xA3, 0x04, 0x03, 0xA4, 0x04, 0x03, 0xA5, 0x04, 0x03, 0xA6, 0x04, 0x03, 0xA7, 0x04, 0x03, 0xA8, 0x04, 0x03, 0xA9, 0x04, 0x22, 0x07, 0x04, 0x03, 0xB1, 0x04, 0x03, 0xB2, 0x04, 0x03, 0xB3, 0x04, 0x03, 0xB4, 0x04, 0x03, 0xB5, 0x04, 0x03, 0xB6, 0x04, 0x03, 0xB7, 0x04, 0x03, 0xB8, 0x04, 0x03, 0xB9, 0x04, 0x03, 0xBA, 0x04, 0x03, 0xBB, 0x04, 0x03, 0xBC, 0x04, 0x03, 0xBD, 0x04, 0x03, 0xBE, 0x04, 0x03, 0xBF, 0x04, 0x03, 0xC0, 0x04, 0x03, 0xC1, 0x04, 0x03, 0xC2, 0x04, 0x03, 0xC3, 0x04, 0x03, 0xC4, 0x04, 0x03, 0xC5, 0x04, 0x03, 0xC6, 0x04, 0x03, 0xC7, 0x04, 0x03, 0xC8, 0x04, 0x03, 0xC9, 0x04, 0x22, 0x02, 0x04, 0x03, 0xF5, 0x04, 0x03, 0xD1, 0x04, 0x03, 0xF0, 0x04, 0x03, 0xD5, 0x04, 0x03, 0xF1, 0x04, 0x03, 0xD6, 0x04, 0x03, 0xDC, 0x04, 0x03, 0xDD, 0x04, 0x00, 0x30, 0x04, 0x00, 0x31, 0x04, 0x00, 0x32, 0x04, 0x00, 0x33, 0x04, 0x00, 0x34, 0x04, 0x00, 0x35, 0x04, 0x00, 0x36, 0x04, 0x00, 0x37, 0x04, 0x00, 0x38, 0x04, 0x00, 0x39, 0x04, 0x00, 0x30, 0x04, 0x00, 0x31, 0x04, 0x00, 0x32, 0x04, 0x00, 0x33, 0x04, 0x00, 0x34, 0x04, 0x00, 0x35, 0x04, 0x00, 0x36, 0x04, 0x00, 0x37, 0x04, 0x00, 0x38, 0x04, 0x00, 0x39, 0x04, 0x00, 0x30, 0x04, 0x00, 0x31, 0x04, 0x00, 0x32, 0x04, 0x00, 0x33, 0x04, 0x00, 0x34, 0x04, 0x00, 0x35, 0x04, 0x00, 0x36, 0x04, 0x00, 0x37, 0x04, 0x00, 0x38, 0x04, 0x00, 0x39, 0x04, 0x00, 0x30, 0x04, 0x00, 0x31, 0x04, 0x00, 0x32, 0x04, 0x00, 0x33, 0x04, 0x00, 0x34, 0x04, 0x00, 0x35, 0x04, 0x00, 0x36, 0x04, 0x00, 0x37, 0x04, 0x00, 0x38, 0x04, 0x00, 0x39, 0x04, 0x00, 0x30, 0x04, 0x00, 0x31, 0x04, 0x00, 0x32, 0x04, 0x00, 0x33, 0x04, 0x00, 0x34, 0x04, 0x00, 0x35, 0x04, 0x00, 0x36, 0x04, 0x00, 0x37, 0x04, 0x00, 0x38, 0x04, 0x00, 0x39, 0x04, 0x06, 0x27, 0x04, 0x06, 0x28, 0x04, 0x06, 0x2C, 0x04, 0x06, 0x2F, 0x04, 0x06, 0x48, 0x04, 0x06, 0x32, 0x04, 0x06, 0x2D, 0x04, 0x06, 0x37, 0x04, 0x06, 0x4A, 0x04, 0x06, 0x43, 0x04, 0x06, 0x44, 0x04, 0x06, 0x45, 0x04, 0x06, 0x46, 0x04, 0x06, 0x33, 0x04, 0x06, 0x39, 0x04, 0x06, 0x41, 0x04, 0x06, 0x35, 0x04, 0x06, 0x42, 0x04, 0x06, 0x31, 0x04, 0x06, 0x34, 0x04, 0x06, 0x2A, 0x04, 0x06, 0x2B, 0x04, 0x06, 0x2E, 0x04, 0x06, 0x30, 0x04, 0x06, 0x36, 0x04, 0x06, 0x38, 0x04, 0x06, 0x3A, 0x04, 0x06, 0x6E, 0x04, 0x06, 0xBA, 0x04, 0x06, 0xA1, 0x04, 0x06, 0x6F, 0x04, 0x06, 0x28, 0x04, 0x06, 0x2C, 0x04, 0x06, 0x47, 0x04, 0x06, 0x2D, 0x04, 0x06, 0x4A, 0x04, 0x06, 0x43, 0x04, 0x06, 0x44, 0x04, 0x06, 0x45, 0x04, 0x06, 0x46, 0x04, 0x06, 0x33, 0x04, 0x06, 0x39, 0x04, 0x06, 0x41, 0x04, 0x06, 0x35, 0x04, 0x06, 0x42, 0x04, 0x06, 0x34, 0x04, 0x06, 0x2A, 0x04, 0x06, 0x2B, 0x04, 0x06, 0x2E, 0x04, 0x06, 0x36, 0x04, 0x06, 0x3A, 0x04, 0x06, 0x2C, 0x04, 0x06, 0x2D, 0x04, 0x06, 0x4A, 0x04, 0x06, 0x44, 0x04, 0x06, 0x46, 0x04, 0x06, 0x33, 0x04, 0x06, 0x39, 0x04, 0x06, 0x35, 0x04, 0x06, 0x42, 0x04, 0x06, 0x34, 0x04, 0x06, 0x2E, 0x04, 0x06, 0x36, 0x04, 0x06, 0x3A, 0x04, 0x06, 0xBA, 0x04, 0x06, 0x6F, 0x04, 0x06, 0x28, 0x04, 0x06, 0x2C, 0x04, 0x06, 0x47, 0x04, 0x06, 0x2D, 0x04, 0x06, 0x37, 0x04, 0x06, 0x4A, 0x04, 0x06, 0x43, 0x04, 0x06, 0x45, 0x04, 0x06, 0x46, 0x04, 0x06, 0x33, 0x04, 0x06, 0x39, 0x04, 0x06, 0x41, 0x04, 0x06, 0x35, 0x04, 0x06, 0x42, 0x04, 0x06, 0x34, 0x04, 0x06, 0x2A, 0x04, 0x06, 0x2B, 0x04, 0x06, 0x2E, 0x04, 0x06, 0x36, 0x04, 0x06, 0x38, 0x04, 0x06, 0x3A, 0x04, 0x06, 0x6E, 0x04, 0x06, 0xA1, 0x04, 0x06, 0x27, 0x04, 0x06, 0x28, 0x04, 0x06, 0x2C, 0x04, 0x06, 0x2F, 0x04, 0x06, 0x47, 0x04, 0x06, 0x48, 0x04, 0x06, 0x32, 0x04, 0x06, 0x2D, 0x04, 0x06, 0x37, 0x04, 0x06, 0x4A, 0x04, 0x06, 0x44, 0x04, 0x06, 0x45, 0x04, 0x06, 0x46, 0x04, 0x06, 0x33, 0x04, 0x06, 0x39, 0x04, 0x06, 0x41, 0x04, 0x06, 0x35, 0x04, 0x06, 0x42, 0x04, 0x06, 0x31, 0x04, 0x06, 0x34, 0x04, 0x06, 0x2A, 0x04, 0x06, 0x2B, 0x04, 0x06, 0x2E, 0x04, 0x06, 0x30, 0x04, 0x06, 0x36, 0x04, 0x06, 0x38, 0x04, 0x06, 0x3A, 0x04, 0x06, 0x28, 0x04, 0x06, 0x2C, 0x04, 0x06, 0x2F, 0x04, 0x06, 0x48, 0x04, 0x06, 0x32, 0x04, 0x06, 0x2D, 0x04, 0x06, 0x37, 0x04, 0x06, 0x4A, 0x04, 0x06, 0x44, 0x04, 0x06, 0x45, 0x04, 0x06, 0x46, 0x04, 0x06, 0x33, 0x04, 0x06, 0x39, 0x04, 0x06, 0x41, 0x04, 0x06, 0x35, 0x04, 0x06, 0x42, 0x04, 0x06, 0x31, 0x04, 0x06, 0x34, 0x04, 0x06, 0x2A, 0x04, 0x06, 0x2B, 0x04, 0x06, 0x2E, 0x04, 0x06, 0x30, 0x04, 0x06, 0x36, 0x04, 0x06, 0x38, 0x04, 0x06, 0x3A, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x2E, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x2C, 0xC0, 0x00, 0x31, 0x00, 0x00, 0x2C, 0xC0, 0x00, 0x32, 0x00, 0x00, 0x2C, 0xC0, 0x00, 0x33, 0x00, 0x00, 0x2C, 0xC0, 0x00, 0x34, 0x00, 0x00, 0x2C, 0xC0, 0x00, 0x35, 0x00, 0x00, 0x2C, 0xC0, 0x00, 0x36, 0x00, 0x00, 0x2C, 0xC0, 0x00, 0x37, 0x00, 0x00, 0x2C, 0xC0, 0x00, 0x38, 0x00, 0x00, 0x2C, 0xC0, 0x00, 0x39, 0x00, 0x00, 0x2C, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x41, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x42, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x43, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x44, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x45, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x46, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x47, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x48, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x49, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x4A, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x4B, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x4C, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x4D, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x4E, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x4F, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x50, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x51, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x52, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x53, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x54, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x55, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x56, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x57, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x58, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x59, 0x00, 0x00, 0x29, 0xC0, 0x00, 0x28, 0x80, 0x00, 0x5A, 0x00, 0x00, 0x29, 0xC0, 0x30, 0x14, 0x80, 0x00, 0x53, 0x00, 0x30, 0x15, 0x1C, 0x00, 0x43, 0x1C, 0x00, 0x52, 0x9C, 0x00, 0x43, 0x00, 0x00, 0x44, 0x9C, 0x00, 0x57, 0x00, 0x00, 0x5A, 0x38, 0x00, 0x41, 0x38, 0x00, 0x42, 0x38, 0x00, 0x43, 0x38, 0x00, 0x44, 0x38, 0x00, 0x45, 0x38, 0x00, 0x46, 0x38, 0x00, 0x47, 0x38, 0x00, 0x48, 0x38, 0x00, 0x49, 0x38, 0x00, 0x4A, 0x38, 0x00, 0x4B, 0x38, 0x00, 0x4C, 0x38, 0x00, 0x4D, 0x38, 0x00, 0x4E, 0x38, 0x00, 0x4F, 0x38, 0x00, 0x50, 0x38, 0x00, 0x51, 0x38, 0x00, 0x52, 0x38, 0x00, 0x53, 0x38, 0x00, 0x54, 0x38, 0x00, 0x55, 0x38, 0x00, 0x56, 0x38, 0x00, 0x57, 0x38, 0x00, 0x58, 0x38, 0x00, 0x59, 0x38, 0x00, 0x5A, 0xB8, 0x00, 0x48, 0x00, 0x00, 0x56, 0xB8, 0x00, 0x4D, 0x00, 0x00, 0x56, 0xB8, 0x00, 0x53, 0x00, 0x00, 0x44, 0xB8, 0x00, 0x53, 0x00, 0x00, 0x53, 0xB8, 0x00, 0x50, 0x80, 0x00, 0x50, 0x00, 0x00, 0x56, 0xB8, 0x00, 0x57, 0x00, 0x00, 0x43, 0xA0, 0x00, 0x4D, 0x00, 0x00, 0x43, 0xA0, 0x00, 0x4D, 0x00, 0x00, 0x44, 0xB8, 0x00, 0x44, 0x00, 0x00, 0x4A, 0xB8, 0x30, 0x7B, 0x00, 0x30, 0x4B, 0xB8, 0x30, 0xB3, 0x00, 0x30, 0xB3, 0x38, 0x30, 0xB5, 0x38, 0x62, 0x4B, 0x38, 0x5B, 0x57, 0x38, 0x53, 0xCC, 0x38, 0x30, 0xC7, 0x38, 0x4E, 0x8C, 0x38, 0x59, 0x1A, 0x38, 0x89, 0xE3, 0x38, 0x59, 0x29, 0x38, 0x4E, 0xA4, 0x38, 0x66, 0x20, 0x38, 0x71, 0x21, 0x38, 0x65, 0x99, 0x38, 0x52, 0x4D, 0x38, 0x5F, 0x8C, 0x38, 0x51, 0x8D, 0x38, 0x65, 0xB0, 0x38, 0x52, 0x1D, 0x38, 0x7D, 0x42, 0x38, 0x75, 0x1F, 0x38, 0x8C, 0xA9, 0x38, 0x58, 0xF0, 0x38, 0x54, 0x39, 0x38, 0x6F, 0x14, 0x38, 0x62, 0x95, 0x38, 0x63, 0x55, 0x38, 0x4E, 0x00, 0x38, 0x4E, 0x09, 0x38, 0x90, 0x4A, 0x38, 0x5D, 0xE6, 0x38, 0x4E, 0x2D, 0x38, 0x53, 0xF3, 0x38, 0x63, 0x07, 0x38, 0x8D, 0x70, 0x38, 0x62, 0x53, 0x38, 0x79, 0x81, 0x38, 0x7A, 0x7A, 0x38, 0x54, 0x08, 0x38, 0x6E, 0x80, 0x38, 0x67, 0x09, 0x38, 0x67, 0x08, 0x38, 0x75, 0x33, 0x38, 0x52, 0x72, 0x38, 0x55, 0xB6, 0xC0, 0x30, 0x14, 0x80, 0x67, 0x2C, 0x00, 0x30, 0x15, 0xC0, 0x30, 0x14, 0x80, 0x4E, 0x09, 0x00, 0x30, 0x15, 0xC0, 0x30, 0x14, 0x80, 0x4E, 0x8C, 0x00, 0x30, 0x15, 0xC0, 0x30, 0x14, 0x80, 0x5B, 0x89, 0x00, 0x30, 0x15, 0xC0, 0x30, 0x14, 0x80, 0x70, 0xB9, 0x00, 0x30, 0x15, 0xC0, 0x30, 0x14, 0x80, 0x62, 0x53, 0x00, 0x30, 0x15, 0xC0, 0x30, 0x14, 0x80, 0x76, 0xD7, 0x00, 0x30, 0x15, 0xC0, 0x30, 0x14, 0x80, 0x52, 0xDD, 0x00, 0x30, 0x15, 0xC0, 0x30, 0x14, 0x80, 0x65, 0x57, 0x00, 0x30, 0x15, 0x1C, 0x5F, 0x97, 0x1C, 0x53, 0xEF, 0x00, 0x4E, 0x3D, 0x00, 0x4E, 0x38, 0x00, 0x4E, 0x41, 0x02, 0x01, 0x22, 0x00, 0x4F, 0x60, 0x00, 0x4F, 0xAE, 0x00, 0x4F, 0xBB, 0x00, 0x50, 0x02, 0x00, 0x50, 0x7A, 0x00, 0x50, 0x99, 0x00, 0x50, 0xE7, 0x00, 0x50, 0xCF, 0x00, 0x34, 0x9E, 0x02, 0x06, 0x3A, 0x00, 0x51, 0x4D, 0x00, 0x51, 0x54, 0x00, 0x51, 0x64, 0x00, 0x51, 0x77, 0x02, 0x05, 0x1C, 0x00, 0x34, 0xB9, 0x00, 0x51, 0x67, 0x00, 0x51, 0x8D, 0x02, 0x05, 0x4B, 0x00, 0x51, 0x97, 0x00, 0x51, 0xA4, 0x00, 0x4E, 0xCC, 0x00, 0x51, 0xAC, 0x00, 0x51, 0xB5, 0x02, 0x91, 0xDF, 0x00, 0x51, 0xF5, 0x00, 0x52, 0x03, 0x00, 0x34, 0xDF, 0x00, 0x52, 0x3B, 0x00, 0x52, 0x46, 0x00, 0x52, 0x72, 0x00, 0x52, 0x77, 0x00, 0x35, 0x15, 0x00, 0x52, 0xC7, 0x00, 0x52, 0xC9, 0x00, 0x52, 0xE4, 0x00, 0x52, 0xFA, 0x00, 0x53, 0x05, 0x00, 0x53, 0x06, 0x00, 0x53, 0x17, 0x00, 0x53, 0x49, 0x00, 0x53, 0x51, 0x00, 0x53, 0x5A, 0x00, 0x53, 0x73, 0x00, 0x53, 0x7D, 0x00, 0x53, 0x7F, 0x00, 0x53, 0x7F, 0x00, 0x53, 0x7F, 0x02, 0x0A, 0x2C, 0x00, 0x70, 0x70, 0x00, 0x53, 0xCA, 0x00, 0x53, 0xDF, 0x02, 0x0B, 0x63, 0x00, 0x53, 0xEB, 0x00, 0x53, 0xF1, 0x00, 0x54, 0x06, 0x00, 0x54, 0x9E, 0x00, 0x54, 0x38, 0x00, 0x54, 0x48, 0x00, 0x54, 0x68, 0x00, 0x54, 0xA2, 0x00, 0x54, 0xF6, 0x00, 0x55, 0x10, 0x00, 0x55, 0x53, 0x00, 0x55, 0x63, 0x00, 0x55, 0x84, 0x00, 0x55, 0x84, 0x00, 0x55, 0x99, 0x00, 0x55, 0xAB, 0x00, 0x55, 0xB3, 0x00, 0x55, 0xC2, 0x00, 0x57, 0x16, 0x00, 0x56, 0x06, 0x00, 0x57, 0x17, 0x00, 0x56, 0x51, 0x00, 0x56, 0x74, 0x00, 0x52, 0x07, 0x00, 0x58, 0xEE, 0x00, 0x57, 0xCE, 0x00, 0x57, 0xF4, 0x00, 0x58, 0x0D, 0x00, 0x57, 0x8B, 0x00, 0x58, 0x32, 0x00, 0x58, 0x31, 0x00, 0x58, 0xAC, 0x02, 0x14, 0xE4, 0x00, 0x58, 0xF2, 0x00, 0x58, 0xF7, 0x00, 0x59, 0x06, 0x00, 0x59, 0x1A, 0x00, 0x59, 0x22, 0x00, 0x59, 0x62, 0x02, 0x16, 0xA8, 0x02, 0x16, 0xEA, 0x00, 0x59, 0xEC, 0x00, 0x5A, 0x1B, 0x00, 0x5A, 0x27, 0x00, 0x59, 0xD8, 0x00, 0x5A, 0x66, 0x00, 0x36, 0xEE, 0x00, 0x36, 0xFC, 0x00, 0x5B, 0x08, 0x00, 0x5B, 0x3E, 0x00, 0x5B, 0x3E, 0x02, 0x19, 0xC8, 0x00, 0x5B, 0xC3, 0x00, 0x5B, 0xD8, 0x00, 0x5B, 0xE7, 0x00, 0x5B, 0xF3, 0x02, 0x1B, 0x18, 0x00, 0x5B, 0xFF, 0x00, 0x5C, 0x06, 0x00, 0x5F, 0x53, 0x00, 0x5C, 0x22, 0x00, 0x37, 0x81, 0x00, 0x5C, 0x60, 0x00, 0x5C, 0x6E, 0x00, 0x5C, 0xC0, 0x00, 0x5C, 0x8D, 0x02, 0x1D, 0xE4, 0x00, 0x5D, 0x43, 0x02, 0x1D, 0xE6, 0x00, 0x5D, 0x6E, 0x00, 0x5D, 0x6B, 0x00, 0x5D, 0x7C, 0x00, 0x5D, 0xE1, 0x00, 0x5D, 0xE2, 0x00, 0x38, 0x2F, 0x00, 0x5D, 0xFD, 0x00, 0x5E, 0x28, 0x00, 0x5E, 0x3D, 0x00, 0x5E, 0x69, 0x00, 0x38, 0x62, 0x02, 0x21, 0x83, 0x00, 0x38, 0x7C, 0x00, 0x5E, 0xB0, 0x00, 0x5E, 0xB3, 0x00, 0x5E, 0xB6, 0x00, 0x5E, 0xCA, 0x02, 0xA3, 0x92, 0x00, 0x5E, 0xFE, 0x02, 0x23, 0x31, 0x02, 0x23, 0x31, 0x00, 0x82, 0x01, 0x00, 0x5F, 0x22, 0x00, 0x5F, 0x22, 0x00, 0x38, 0xC7, 0x02, 0x32, 0xB8, 0x02, 0x61, 0xDA, 0x00, 0x5F, 0x62, 0x00, 0x5F, 0x6B, 0x00, 0x38, 0xE3, 0x00, 0x5F, 0x9A, 0x00, 0x5F, 0xCD, 0x00, 0x5F, 0xD7, 0x00, 0x5F, 0xF9, 0x00, 0x60, 0x81, 0x00, 0x39, 0x3A, 0x00, 0x39, 0x1C, 0x00, 0x60, 0x94, 0x02, 0x26, 0xD4, 0x00, 0x60, 0xC7, 0x00, 0x61, 0x48, 0x00, 0x61, 0x4C, 0x00, 0x61, 0x4E, 0x00, 0x61, 0x4C, 0x00, 0x61, 0x7A, 0x00, 0x61, 0x8E, 0x00, 0x61, 0xB2, 0x00, 0x61, 0xA4, 0x00, 0x61, 0xAF, 0x00, 0x61, 0xDE, 0x00, 0x61, 0xF2, 0x00, 0x61, 0xF6, 0x00, 0x62, 0x10, 0x00, 0x62, 0x1B, 0x00, 0x62, 0x5D, 0x00, 0x62, 0xB1, 0x00, 0x62, 0xD4, 0x00, 0x63, 0x50, 0x02, 0x2B, 0x0C, 0x00, 0x63, 0x3D, 0x00, 0x62, 0xFC, 0x00, 0x63, 0x68, 0x00, 0x63, 0x83, 0x00, 0x63, 0xE4, 0x02, 0x2B, 0xF1, 0x00, 0x64, 0x22, 0x00, 0x63, 0xC5, 0x00, 0x63, 0xA9, 0x00, 0x3A, 0x2E, 0x00, 0x64, 0x69, 0x00, 0x64, 0x7E, 0x00, 0x64, 0x9D, 0x00, 0x64, 0x77, 0x00, 0x3A, 0x6C, 0x00, 0x65, 0x4F, 0x00, 0x65, 0x6C, 0x02, 0x30, 0x0A, 0x00, 0x65, 0xE3, 0x00, 0x66, 0xF8, 0x00, 0x66, 0x49, 0x00, 0x3B, 0x19, 0x00, 0x66, 0x91, 0x00, 0x3B, 0x08, 0x00, 0x3A, 0xE4, 0x00, 0x51, 0x92, 0x00, 0x51, 0x95, 0x00, 0x67, 0x00, 0x00, 0x66, 0x9C, 0x00, 0x80, 0xAD, 0x00, 0x43, 0xD9, 0x00, 0x67, 0x17, 0x00, 0x67, 0x1B, 0x00, 0x67, 0x21, 0x00, 0x67, 0x5E, 0x00, 0x67, 0x53, 0x02, 0x33, 0xC3, 0x00, 0x3B, 0x49, 0x00, 0x67, 0xFA, 0x00, 0x67, 0x85, 0x00, 0x68, 0x52, 0x00, 0x68, 0x85, 0x02, 0x34, 0x6D, 0x00, 0x68, 0x8E, 0x00, 0x68, 0x1F, 0x00, 0x69, 0x14, 0x00, 0x3B, 0x9D, 0x00, 0x69, 0x42, 0x00, 0x69, 0xA3, 0x00, 0x69, 0xEA, 0x00, 0x6A, 0xA8, 0x02, 0x36, 0xA3, 0x00, 0x6A, 0xDB, 0x00, 0x3C, 0x18, 0x00, 0x6B, 0x21, 0x02, 0x38, 0xA7, 0x00, 0x6B, 0x54, 0x00, 0x3C, 0x4E, 0x00, 0x6B, 0x72, 0x00, 0x6B, 0x9F, 0x00, 0x6B, 0xBA, 0x00, 0x6B, 0xBB, 0x02, 0x3A, 0x8D, 0x02, 0x1D, 0x0B, 0x02, 0x3A, 0xFA, 0x00, 0x6C, 0x4E, 0x02, 0x3C, 0xBC, 0x00, 0x6C, 0xBF, 0x00, 0x6C, 0xCD, 0x00, 0x6C, 0x67, 0x00, 0x6D, 0x16, 0x00, 0x6D, 0x3E, 0x00, 0x6D, 0x77, 0x00, 0x6D, 0x41, 0x00, 0x6D, 0x69, 0x00, 0x6D, 0x78, 0x00, 0x6D, 0x85, 0x02, 0x3D, 0x1E, 0x00, 0x6D, 0x34, 0x00, 0x6E, 0x2F, 0x00, 0x6E, 0x6E, 0x00, 0x3D, 0x33, 0x00, 0x6E, 0xCB, 0x00, 0x6E, 0xC7, 0x02, 0x3E, 0xD1, 0x00, 0x6D, 0xF9, 0x00, 0x6F, 0x6E, 0x02, 0x3F, 0x5E, 0x02, 0x3F, 0x8E, 0x00, 0x6F, 0xC6, 0x00, 0x70, 0x39, 0x00, 0x70, 0x1E, 0x00, 0x70, 0x1B, 0x00, 0x3D, 0x96, 0x00, 0x70, 0x4A, 0x00, 0x70, 0x7D, 0x00, 0x70, 0x77, 0x00, 0x70, 0xAD, 0x02, 0x05, 0x25, 0x00, 0x71, 0x45, 0x02, 0x42, 0x63, 0x00, 0x71, 0x9C, 0x02, 0x43, 0xAB, 0x00, 0x72, 0x28, 0x00, 0x72, 0x35, 0x00, 0x72, 0x50, 0x02, 0x46, 0x08, 0x00, 0x72, 0x80, 0x00, 0x72, 0x95, 0x02, 0x47, 0x35, 0x02, 0x48, 0x14, 0x00, 0x73, 0x7A, 0x00, 0x73, 0x8B, 0x00, 0x3E, 0xAC, 0x00, 0x73, 0xA5, 0x00, 0x3E, 0xB8, 0x00, 0x3E, 0xB8, 0x00, 0x74, 0x47, 0x00, 0x74, 0x5C, 0x00, 0x74, 0x71, 0x00, 0x74, 0x85, 0x00, 0x74, 0xCA, 0x00, 0x3F, 0x1B, 0x00, 0x75, 0x24, 0x02, 0x4C, 0x36, 0x00, 0x75, 0x3E, 0x02, 0x4C, 0x92, 0x00, 0x75, 0x70, 0x02, 0x21, 0x9F, 0x00, 0x76, 0x10, 0x02, 0x4F, 0xA1, 0x02, 0x4F, 0xB8, 0x02, 0x50, 0x44, 0x00, 0x3F, 0xFC, 0x00, 0x40, 0x08, 0x00, 0x76, 0xF4, 0x02, 0x50, 0xF3, 0x02, 0x50, 0xF2, 0x02, 0x51, 0x19, 0x02, 0x51, 0x33, 0x00, 0x77, 0x1E, 0x00, 0x77, 0x1F, 0x00, 0x77, 0x1F, 0x00, 0x77, 0x4A, 0x00, 0x40, 0x39, 0x00, 0x77, 0x8B, 0x00, 0x40, 0x46, 0x00, 0x40, 0x96, 0x02, 0x54, 0x1D, 0x00, 0x78, 0x4E, 0x00, 0x78, 0x8C, 0x00, 0x78, 0xCC, 0x00, 0x40, 0xE3, 0x02, 0x56, 0x26, 0x00, 0x79, 0x56, 0x02, 0x56, 0x9A, 0x02, 0x56, 0xC5, 0x00, 0x79, 0x8F, 0x00, 0x79, 0xEB, 0x00, 0x41, 0x2F, 0x00, 0x7A, 0x40, 0x00, 0x7A, 0x4A, 0x00, 0x7A, 0x4F, 0x02, 0x59, 0x7C, 0x02, 0x5A, 0xA7, 0x02, 0x5A, 0xA7, 0x00, 0x7A, 0xEE, 0x00, 0x42, 0x02, 0x02, 0x5B, 0xAB, 0x00, 0x7B, 0xC6, 0x00, 0x7B, 0xC9, 0x00, 0x42, 0x27, 0x02, 0x5C, 0x80, 0x00, 0x7C, 0xD2, 0x00, 0x42, 0xA0, 0x00, 0x7C, 0xE8, 0x00, 0x7C, 0xE3, 0x00, 0x7D, 0x00, 0x02, 0x5F, 0x86, 0x00, 0x7D, 0x63, 0x00, 0x43, 0x01, 0x00, 0x7D, 0xC7, 0x00, 0x7E, 0x02, 0x00, 0x7E, 0x45, 0x00, 0x43, 0x34, 0x02, 0x62, 0x28, 0x02, 0x62, 0x47, 0x00, 0x43, 0x59, 0x02, 0x62, 0xD9, 0x00, 0x7F, 0x7A, 0x02, 0x63, 0x3E, 0x00, 0x7F, 0x95, 0x00, 0x7F, 0xFA, 0x00, 0x80, 0x05, 0x02, 0x64, 0xDA, 0x02, 0x65, 0x23, 0x00, 0x80, 0x60, 0x02, 0x65, 0xA8, 0x00, 0x80, 0x70, 0x02, 0x33, 0x5F, 0x00, 0x43, 0xD5, 0x00, 0x80, 0xB2, 0x00, 0x81, 0x03, 0x00, 0x44, 0x0B, 0x00, 0x81, 0x3E, 0x00, 0x5A, 0xB5, 0x02, 0x67, 0xA7, 0x02, 0x67, 0xB5, 0x02, 0x33, 0x93, 0x02, 0x33, 0x9C, 0x00, 0x82, 0x01, 0x00, 0x82, 0x04, 0x00, 0x8F, 0x9E, 0x00, 0x44, 0x6B, 0x00, 0x82, 0x91, 0x00, 0x82, 0x8B, 0x00, 0x82, 0x9D, 0x00, 0x52, 0xB3, 0x00, 0x82, 0xB1, 0x00, 0x82, 0xB3, 0x00, 0x82, 0xBD, 0x00, 0x82, 0xE6, 0x02, 0x6B, 0x3C, 0x00, 0x82, 0xE5, 0x00, 0x83, 0x1D, 0x00, 0x83, 0x63, 0x00, 0x83, 0xAD, 0x00, 0x83, 0x23, 0x00, 0x83, 0xBD, 0x00, 0x83, 0xE7, 0x00, 0x84, 0x57, 0x00, 0x83, 0x53, 0x00, 0x83, 0xCA, 0x00, 0x83, 0xCC, 0x00, 0x83, 0xDC, 0x02, 0x6C, 0x36, 0x02, 0x6D, 0x6B, 0x02, 0x6C, 0xD5, 0x00, 0x45, 0x2B, 0x00, 0x84, 0xF1, 0x00, 0x84, 0xF3, 0x00, 0x85, 0x16, 0x02, 0x73, 0xCA, 0x00, 0x85, 0x64, 0x02, 0x6F, 0x2C, 0x00, 0x45, 0x5D, 0x00, 0x45, 0x61, 0x02, 0x6F, 0xB1, 0x02, 0x70, 0xD2, 0x00, 0x45, 0x6B, 0x00, 0x86, 0x50, 0x00, 0x86, 0x5C, 0x00, 0x86, 0x67, 0x00, 0x86, 0x69, 0x00, 0x86, 0xA9, 0x00, 0x86, 0x88, 0x00, 0x87, 0x0E, 0x00, 0x86, 0xE2, 0x00, 0x87, 0x79, 0x00, 0x87, 0x28, 0x00, 0x87, 0x6B, 0x00, 0x87, 0x86, 0x00, 0x45, 0xD7, 0x00, 0x87, 0xE1, 0x00, 0x88, 0x01, 0x00, 0x45, 0xF9, 0x00, 0x88, 0x60, 0x00, 0x88, 0x63, 0x02, 0x76, 0x67, 0x00, 0x88, 0xD7, 0x00, 0x88, 0xDE, 0x00, 0x46, 0x35, 0x00, 0x88, 0xFA, 0x00, 0x34, 0xBB, 0x02, 0x78, 0xAE, 0x02, 0x79, 0x66, 0x00, 0x46, 0xBE, 0x00, 0x46, 0xC7, 0x00, 0x8A, 0xA0, 0x00, 0x8A, 0xED, 0x00, 0x8B, 0x8A, 0x00, 0x8C, 0x55, 0x02, 0x7C, 0xA8, 0x00, 0x8C, 0xAB, 0x00, 0x8C, 0xC1, 0x00, 0x8D, 0x1B, 0x00, 0x8D, 0x77, 0x02, 0x7F, 0x2F, 0x02, 0x08, 0x04, 0x00, 0x8D, 0xCB, 0x00, 0x8D, 0xBC, 0x00, 0x8D, 0xF0, 0x02, 0x08, 0xDE, 0x00, 0x8E, 0xD4, 0x00, 0x8F, 0x38, 0x02, 0x85, 0xD2, 0x02, 0x85, 0xED, 0x00, 0x90, 0x94, 0x00, 0x90, 0xF1, 0x00, 0x91, 0x11, 0x02, 0x87, 0x2E, 0x00, 0x91, 0x1B, 0x00, 0x92, 0x38, 0x00, 0x92, 0xD7, 0x00, 0x92, 0xD8, 0x00, 0x92, 0x7C, 0x00, 0x93, 0xF9, 0x00, 0x94, 0x15, 0x02, 0x8B, 0xFA, 0x00, 0x95, 0x8B, 0x00, 0x49, 0x95, 0x00, 0x95, 0xB7, 0x02, 0x8D, 0x77, 0x00, 0x49, 0xE6, 0x00, 0x96, 0xC3, 0x00, 0x5D, 0xB2, 0x00, 0x97, 0x23, 0x02, 0x91, 0x45, 0x02, 0x92, 0x1A, 0x00, 0x4A, 0x6E, 0x00, 0x4A, 0x76, 0x00, 0x97, 0xE0, 0x02, 0x94, 0x0A, 0x00, 0x4A, 0xB2, 0x02, 0x94, 0x96, 0x00, 0x98, 0x0B, 0x00, 0x98, 0x0B, 0x00, 0x98, 0x29, 0x02, 0x95, 0xB6, 0x00, 0x98, 0xE2, 0x00, 0x4B, 0x33, 0x00, 0x99, 0x29, 0x00, 0x99, 0xA7, 0x00, 0x99, 0xC2, 0x00, 0x99, 0xFE, 0x00, 0x4B, 0xCE, 0x02, 0x9B, 0x30, 0x00, 0x9B, 0x12, 0x00, 0x9C, 0x40, 0x00, 0x9C, 0xFD, 0x00, 0x4C, 0xCE, 0x00, 0x4C, 0xED, 0x00, 0x9D, 0x67, 0x02, 0xA0, 0xCE, 0x00, 0x4C, 0xF8, 0x02, 0xA1, 0x05, 0x02, 0xA2, 0x0E, 0x02, 0xA2, 0x91, 0x00, 0x9E, 0xBB, 0x00, 0x4D, 0x56, 0x00, 0x9E, 0xF9, 0x00, 0x9E, 0xFE, 0x00, 0x9F, 0x05, 0x00, 0x9F, 0x0F, 0x00, 0x9F, 0x16, 0x00, 0x9F, 0x3B, 0x02, 0xA6, 0x00 }; const decomp_index_table_t gl_uninorm_decomp_index_table = { { 0, 32, 64, 96, 128, -1, 160, 192, 224, 256, 288, 320, 352, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 384, 416, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 448, 480, -1, -1, -1, -1, 512, 544, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 576, 608, -1, -1, -1, -1, -1, 640, 672, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 704 }, { -1, -1, -1, -1, -1, 0, 32, 64, 96, 128, 160, 192, -1, 224, 256, 288, 320, 352, -1, -1, -1, 384, 416, 448, -1, -1, 480, 512, 544, 576, 608, 640, 672, 704, 736, 768, -1, -1, 800, 832, -1, -1, -1, -1, 864, -1, -1, -1, -1, 896, -1, 928, -1, -1, 960, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 992, 1024, -1, -1, -1, 1056, -1, -1, 1088, 1120, -1, -1, -1, -1, -1, -1, -1, 1152, -1, 1184, -1, 1216, -1, -1, -1, 1248, -1, -1, -1, 1280, -1, -1, -1, 1312, -1, -1, -1, 1344, -1, -1, 1376, -1, -1, -1, 1408, 1440, -1, 1472, -1, 1504, 1536, 1568, 1600, -1, -1, -1, 1632, -1, -1, -1, -1, -1, 1664, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1696, 1728, 1760, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1792, 1824, 1856, 1888, 1920, -1, -1, 1952, 1984, 2016, 2048, 2080, 2112, 2144, 2176, 2208, 2240, 2272, 2304, 2336, 2368, 2400, 2432, 2464, 2496, 2528, 2560, 2592, 2624, -1, -1, 2656, 2688, 2720, 2752, 2784, 2816, 2848, -1, 2880, 2912, 2944, 2976, 3008, 3040, -1, 3072, -1, 3104, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3136, 3168, 3200, 3232, 3264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3296, -1, -1, 3328, -1, -1, 3360, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3392, -1, -1, -1, -1, -1, -1, -1, 3424, -1, -1, -1, -1, -1, -1, -1, -1, 3456, -1, -1, 3488, 3520, 3552, 3584, 3616, 3648, 3680, 3712, -1, 3744, 3776, 3808, 3840, 3872, 3904, 3936, 3968, -1, 4000, 4032, 4064, 4096, -1, -1, -1, 4128, 4160, 4192, 4224, 4256, 4288, 4320, 4352, 4384, 4416, 4448, 4480, 4512, 4544, 4576, 4608, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4640, -1, -1, -1, -1, -1, -1, 4672, -1, -1, -1, 4704, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4736, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4768, 4800, 4832, 4864, 4896, 4928, 4960, 4992, 5024, 5056, 5088, 5120, 5152, 5184, 5216, -1, 5248, 5280, 5312, 5344, 5376, 5408, 5440, 5472, 5504, 5536, 5568, 5600, 5632, 5664, 5696, 5728, 5760, 5792, 5824, 5856, 5888, 5920, 5952, 5984, 6016, 6048, 6080, 6112, 6144, 6176, 6208, 6240, 6272, 6304, 6336, 6368, 6400, 6432, 6464, 6496, -1, -1, -1, -1, 6528, 6560, -1, -1, -1, 6592, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6624, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6656, -1, -1, -1, -1, -1, -1, -1, 6688, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6720, 6752, -1, 6784, 6816, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6848, 6880, 6912, 6944, 6976, 7008, 7040, 7072, 7104, 7136, 7168, 7200, 7232, 7264, 7296, 7328, 7360, 7392, 7424, 7456, 7488, 7520, 7552, 7584, 7616, 7648, 7680, 7712, 7744, 7776, 7808, 7840, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7872, 7904, 7936, 7968, 8000, 8032, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8064, 8096, 8128, 8160, 8192, -1, -1, -1, 8224, 8256, 8288, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8320, 8352, 8384, 8416, 8448, 8480, 8512, 8544, 8576, 8608, 8640, 8672, 8704, 8736, 8768, 8800, 8832, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 32768, -1, -1, -1, -1, -1, -1, -1, 32769, -1, 32771, -1, -1, -1, -1, 32772, -1, -1, 32774, 32775, 32776, 32778, -1, -1, 32779, 32781, 32782, -1, 32783, 32786, 32789, -1, 24, 26, 28, 30, 32, 34, -1, 36, 38, 40, 42, 44, 46, 48, 50, 52, -1, 54, 56, 58, 60, 62, 64, -1, -1, 66, 68, 70, 72, 74, -1, -1, 76, 78, 80, 82, 84, 86, -1, 88, 90, 92, 94, 96, 98, 100, 102, 104, -1, 106, 108, 110, 112, 114, 116, -1, -1, 118, 120, 122, 124, 126, -1, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, -1, -1, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, -1, -1, 202, 204, 206, 208, 210, 212, 214, 216, 218, -1, 32988, 32990, 224, 226, 228, 230, -1, 232, 234, 236, 238, 240, 242, 33012, 33014, -1, -1, 248, 250, 252, 254, 256, 258, 33028, -1, -1, 262, 264, 266, 268, 270, 272, -1, -1, 274, 276, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, -1, -1, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 352, 354, 33124, 357, 359, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 361, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33133, 33135, 33137, 33139, 33141, 33143, 33145, 33147, 33149, 383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 403, 405, 407, 409, 411, 413, -1, 415, 417, 419, 421, 423, 425, -1, -1, 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 447, 33217, 33219, 33221, 455, 457, -1, -1, 459, 461, 463, 465, 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 527, 529, -1, -1, 531, 533, -1, -1, -1, -1, -1, -1, 535, 537, 539, 541, 543, 545, 547, 549, 551, 553, 555, 557, 559, 561, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33331, 33332, 33333, 33334, 33335, 33336, 33337, 33338, 33339, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33340, 33342, 33344, 33346, 33348, 33350, -1, -1, 33352, 33353, 33354, 33355, 33356, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 589, 590, -1, 591, 592, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 594, -1, -1, -1, -1, -1, 33363, -1, -1, -1, 597, -1, -1, -1, -1, -1, 33366, 600, 602, 604, 605, 607, 609, -1, 611, -1, 613, 615, 617, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 619, 621, 623, 625, 627, 629, 631, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 633, 635, 637, 639, 641, -1, 33411, 33412, 33413, 646, 648, 33418, 33419, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33420, 33421, 33422, -1, 33423, 33424, -1, -1, -1, 33425, -1, -1, -1, -1, -1, -1, 658, 660, -1, 662, -1, -1, -1, 664, -1, -1, -1, -1, 666, 668, 670, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 672, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 674, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 676, 678, -1, 680, -1, -1, -1, 682, -1, -1, -1, -1, 684, 686, 688, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 690, 692, -1, -1, -1, -1, -1, -1, -1, -1, -1, 694, 696, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 698, 700, 702, 704, -1, -1, 706, 708, -1, -1, 710, 712, 714, 716, 718, 720, -1, -1, 722, 724, 726, 728, 730, 732, -1, -1, 734, 736, 738, 740, 742, 744, 746, 748, 750, 752, 754, 756, -1, -1, 758, 760, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33530, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 764, 766, 768, 770, 772, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33542, 33544, 33546, 33548, -1, -1, -1, -1, -1, -1, -1, 782, -1, 784, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 786, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 788, -1, -1, -1, -1, -1, -1, -1, 790, -1, -1, 792, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 794, 796, 798, 800, 802, 804, 806, 808, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 810, 812, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 814, 816, -1, 818, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 820, -1, -1, 822, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 824, 826, 828, -1, -1, 830, -1, -1, -1, -1, -1, -1, -1, -1, -1, 832, -1, -1, 834, 836, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 838, 840, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 842, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 844, 846, 848, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 850, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 852, -1, -1, -1, -1, -1, -1, 854, 856, -1, 858, 860, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 862, 864, 866, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 868, -1, 870, 872, 874, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33644, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33646, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33648, 33650, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33652, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 885, -1, -1, -1, -1, -1, -1, -1, -1, -1, 887, -1, -1, -1, -1, 889, -1, -1, -1, -1, 891, -1, -1, -1, -1, 893, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 895, -1, -1, -1, -1, -1, -1, -1, -1, -1, 897, -1, 899, 901, 33671, 905, 33675, -1, -1, -1, -1, -1, -1, -1, 909, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 911, -1, -1, -1, -1, -1, -1, -1, -1, -1, 913, -1, -1, -1, -1, 915, -1, -1, -1, -1, 917, -1, -1, -1, -1, 919, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 921, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 923, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33693, -1, -1, -1, -1, -1, -1, -1, -1, -1, 926, -1, 928, -1, 930, -1, 932, -1, 934, -1, -1, -1, 936, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 938, -1, 940, -1, -1, 942, 944, -1, 946, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33716, 33717, 33718, -1, 33719, 33720, 33721, 33722, 33723, 33724, 33725, 33726, 33727, 33728, 33729, -1, 33730, 33731, 33732, 33733, 33734, 33735, 33736, 33737, 33738, 33739, 33740, 33741, 33742, 33743, 33744, 33745, 33746, 33747, -1, 33748, 33749, 33750, 33751, 33752, 33753, 33754, 33755, 33756, 33757, 33758, 33759, 33760, 33761, 33762, 33763, 33764, 33765, 33766, 33767, 33768, 33769, 33770, 33771, 33772, 33773, 33774, 33775, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33776, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33777, 33778, 33779, 33780, 33781, 33782, 33783, 33784, 33785, 33786, 33787, 33788, 33789, 33790, 33791, 33792, 33793, 33794, 33795, 33796, 33797, 33798, 33799, 33800, 33801, 33802, 33803, 33804, 33805, 33806, 33807, 33808, 33809, 33810, 33811, 33812, 33813, 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 1066, 1068, 1070, 1072, 1074, 1076, 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1092, 1094, 1096, 1098, 1100, 1102, 1104, 1106, 1108, 1110, 1112, 1114, 1116, 1118, 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, 1136, 1138, 1140, 1142, 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, 1192, 1194, 1196, 1198, 1200, 1202, 1204, 1206, 1208, 1210, 1212, 1214, 1216, 1218, 1220, 1222, 1224, 1226, 1228, 1230, 1232, 1234, 1236, 1238, 1240, 1242, 1244, 1246, 1248, 1250, 1252, 1254, 1256, 1258, 1260, 1262, 1264, 1266, 1268, 1270, 1272, 1274, 1276, 1278, 1280, 1282, 1284, 1286, 1288, 1290, 1292, 1294, 1296, 1298, 1300, 1302, 1304, 1306, 1308, 1310, 1312, 1314, 1316, 1318, 1320, 1322, 1324, 1326, 1328, 1330, 1332, 1334, 1336, 1338, 1340, 1342, 1344, 1346, 1348, 1350, 1352, 34122, 1356, -1, -1, -1, -1, 1358, 1360, 1362, 1364, 1366, 1368, 1370, 1372, 1374, 1376, 1378, 1380, 1382, 1384, 1386, 1388, 1390, 1392, 1394, 1396, 1398, 1400, 1402, 1404, 1406, 1408, 1410, 1412, 1414, 1416, 1418, 1420, 1422, 1424, 1426, 1428, 1430, 1432, 1434, 1436, 1438, 1440, 1442, 1444, 1446, 1448, 1450, 1452, 1454, 1456, 1458, 1460, 1462, 1464, 1466, 1468, 1470, 1472, 1474, 1476, 1478, 1480, 1482, 1484, 1486, 1488, 1490, 1492, 1494, 1496, 1498, 1500, 1502, 1504, 1506, 1508, 1510, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526, 1528, 1530, 1532, 1534, 1536, -1, -1, -1, -1, -1, -1, 1538, 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 1562, 1564, 1566, 1568, 1570, 1572, 1574, 1576, 1578, 1580, -1, -1, 1582, 1584, 1586, 1588, 1590, 1592, -1, -1, 1594, 1596, 1598, 1600, 1602, 1604, 1606, 1608, 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1624, 1626, 1628, 1630, 1632, 1634, 1636, 1638, 1640, 1642, 1644, 1646, 1648, 1650, 1652, 1654, 1656, 1658, 1660, 1662, 1664, 1666, 1668, -1, -1, 1670, 1672, 1674, 1676, 1678, 1680, -1, -1, 1682, 1684, 1686, 1688, 1690, 1692, 1694, 1696, -1, 1698, -1, 1700, -1, 1702, -1, 1704, 1706, 1708, 1710, 1712, 1714, 1716, 1718, 1720, 1722, 1724, 1726, 1728, 1730, 1732, 1734, 1736, 1738, 1740, 1741, 1743, 1744, 1746, 1747, 1749, 1750, 1752, 1753, 1755, 1756, 1758, -1, -1, 1759, 1761, 1763, 1765, 1767, 1769, 1771, 1773, 1775, 1777, 1779, 1781, 1783, 1785, 1787, 1789, 1791, 1793, 1795, 1797, 1799, 1801, 1803, 1805, 1807, 1809, 1811, 1813, 1815, 1817, 1819, 1821, 1823, 1825, 1827, 1829, 1831, 1833, 1835, 1837, 1839, 1841, 1843, 1845, 1847, 1849, 1851, 1853, 1855, 1857, 1859, 1861, 1863, -1, 1865, 1867, 1869, 1871, 1873, 1875, 1876, 34646, 1880, 34649, 34651, 1885, 1887, 1889, 1891, -1, 1893, 1895, 1897, 1899, 1900, 1902, 1903, 1905, 1907, 1909, 1911, 1913, 1915, 1917, -1, -1, 1918, 1920, 1922, 1924, 1926, 1928, -1, 1929, 1931, 1933, 1935, 1937, 1939, 1941, 1942, 1944, 1946, 1948, 1950, 1952, 1954, 1956, 1957, 1959, 1961, 1962, -1, -1, 1963, 1965, 1967, -1, 1969, 1971, 1973, 1975, 1976, 1978, 1979, 1981, 34750, -1, 1984, 1985, 34754, 34755, 34756, 34757, 34758, 34759, 34760, 34761, 34762, -1, -1, -1, -1, -1, -1, 34763, -1, -1, -1, -1, -1, 34764, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34766, 34767, 34769, -1, -1, -1, -1, -1, -1, -1, -1, 34772, -1, -1, -1, 34773, 34775, -1, 34778, 34780, -1, -1, -1, -1, 34783, -1, 34785, -1, -1, -1, -1, -1, -1, -1, -1, 34787, 34789, 34791, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34793, -1, -1, -1, -1, -1, -1, -1, 34797, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34798, 34799, -1, -1, 34800, 34801, 34802, 34803, 34804, 34805, 34806, 34807, 34808, 34809, 34810, 34811, 34812, 34813, 34814, 34815, 34816, 34817, 34818, 34819, 34820, 34821, 34822, 34823, 34824, 34825, 34826, -1, 34827, 34828, 34829, 34830, 34831, 34832, 34833, 34834, 34835, 34836, 34837, 34838, 34839, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34840, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34842, 34845, 34848, 34849, -1, 34851, 34854, 34857, -1, 34858, 34860, 34861, 34862, 34863, 34864, 34865, 34866, 34867, 34868, 34869, -1, 34870, 34871, -1, -1, 34873, 34874, 34875, 34876, 34877, -1, -1, 34878, 34880, 34883, -1, 34885, -1, 2118, -1, 34887, -1, 2120, 2121, 34890, 34891, -1, 34892, 34893, 34894, -1, 34895, 34896, 34897, 34898, 34899, 34900, 34901, -1, 34902, 34905, 34906, 34907, 34908, 34909, -1, -1, -1, -1, 34910, 34911, 34912, 34913, 34914, -1, -1, -1, -1, -1, -1, 34915, 34918, 34921, 34925, 34928, 34931, 34934, 34937, 34940, 34943, 34946, 34949, 34952, 34955, 34958, 34961, 34963, 34964, 34966, 34969, 34971, 34972, 34974, 34977, 34981, 34983, 34984, 34986, 34989, 34990, 34991, 34992, 34993, 34994, 34996, 34999, 35001, 35002, 35004, 35007, 35011, 35013, 35014, 35016, 35019, 35020, 35021, 35022, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35023, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2258, 2260, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2262, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2264, 2266, 2268, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2270, -1, -1, -1, -1, 2272, -1, -1, 2274, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2276, -1, 2278, -1, -1, -1, -1, -1, 35048, 35050, -1, 35053, 35055, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2290, -1, -1, 2292, -1, -1, 2294, -1, 2296, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2298, -1, 2300, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2302, 2304, 2306, 2308, 2310, -1, -1, 2312, 2314, -1, -1, 2316, 2318, -1, -1, -1, -1, -1, -1, 2320, 2322, -1, -1, 2324, 2326, -1, -1, 2328, 2330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2332, 2334, 2336, 2338, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2340, 2342, 2344, 2346, -1, -1, -1, -1, -1, -1, 2348, 2350, 2352, 2354, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2356, 2357, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35126, 35127, 35128, 35129, 35130, 35131, 35132, 35133, 35134, 35135, 35137, 35139, 35141, 35143, 35145, 35147, 35149, 35151, 35153, 35155, 35157, 35160, 35163, 35166, 35169, 35172, 35175, 35178, 35181, 35184, 35188, 35192, 35196, 35200, 35204, 35208, 35212, 35216, 35220, 35224, 35228, 35230, 35232, 35234, 35236, 35238, 35240, 35242, 35244, 35246, 35249, 35252, 35255, 35258, 35261, 35264, 35267, 35270, 35273, 35276, 35279, 35282, 35285, 35288, 35291, 35294, 35297, 35300, 35303, 35306, 35309, 35312, 35315, 35318, 35321, 35324, 35327, 35330, 35333, 35336, 35339, 35342, 35345, 35348, 35351, 35354, 35357, 35358, 35359, 35360, 35361, 35362, 35363, 35364, 35365, 35366, 35367, 35368, 35369, 35370, 35371, 35372, 35373, 35374, 35375, 35376, 35377, 35378, 35379, 35380, 35381, 35382, 35383, 35384, 35385, 35386, 35387, 35388, 35389, 35390, 35391, 35392, 35393, 35394, 35395, 35396, 35397, 35398, 35399, 35400, 35401, 35402, 35403, 35404, 35405, 35406, 35407, 35408, 35409, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35410, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35414, 35417, 35419, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2654, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35424, 35425, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35426, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35427, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35428, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35429, 35430, 35431, 35432, 35433, 35434, 35435, 35436, 35437, 35438, 35439, 35440, 35441, 35442, 35443, 35444, 35445, 35446, 35447, 35448, 35449, 35450, 35451, 35452, 35453, 35454, 35455, 35456, 35457, 35458, 35459, 35460, 35461, 35462, 35463, 35464, 35465, 35466, 35467, 35468, 35469, 35470, 35471, 35472, 35473, 35474, 35475, 35476, 35477, 35478, 35479, 35480, 35481, 35482, 35483, 35484, 35485, 35486, 35487, 35488, 35489, 35490, 35491, 35492, 35493, 35494, 35495, 35496, 35497, 35498, 35499, 35500, 35501, 35502, 35503, 35504, 35505, 35506, 35507, 35508, 35509, 35510, 35511, 35512, 35513, 35514, 35515, 35516, 35517, 35518, 35519, 35520, 35521, 35522, 35523, 35524, 35525, 35526, 35527, 35528, 35529, 35530, 35531, 35532, 35533, 35534, 35535, 35536, 35537, 35538, 35539, 35540, 35541, 35542, 35543, 35544, 35545, 35546, 35547, 35548, 35549, 35550, 35551, 35552, 35553, 35554, 35555, 35556, 35557, 35558, 35559, 35560, 35561, 35562, 35563, 35564, 35565, 35566, 35567, 35568, 35569, 35570, 35571, 35572, 35573, 35574, 35575, 35576, 35577, 35578, 35579, 35580, 35581, 35582, 35583, 35584, 35585, 35586, 35587, 35588, 35589, 35590, 35591, 35592, 35593, 35594, 35595, 35596, 35597, 35598, 35599, 35600, 35601, 35602, 35603, 35604, 35605, 35606, 35607, 35608, 35609, 35610, 35611, 35612, 35613, 35614, 35615, 35616, 35617, 35618, 35619, 35620, 35621, 35622, 35623, 35624, 35625, 35626, 35627, 35628, 35629, 35630, 35631, 35632, 35633, 35634, 35635, 35636, 35637, 35638, 35639, 35640, 35641, 35642, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35643, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35644, -1, 35645, 35646, 35647, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2880, -1, 2882, -1, 2884, -1, 2886, -1, 2888, -1, 2890, -1, 2892, -1, 2894, -1, 2896, -1, 2898, -1, 2900, -1, 2902, -1, -1, 2904, -1, 2906, -1, 2908, -1, -1, -1, -1, -1, -1, 2910, 2912, -1, 2914, 2916, -1, 2918, 2920, -1, 2922, 2924, -1, 2926, 2928, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2930, -1, -1, -1, -1, -1, -1, 35700, 35702, -1, 2936, 35706, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2940, -1, 2942, -1, 2944, -1, 2946, -1, 2948, -1, 2950, -1, 2952, -1, 2954, -1, 2956, -1, 2958, -1, 2960, -1, 2962, -1, -1, 2964, -1, 2966, -1, 2968, -1, -1, -1, -1, -1, -1, 2970, 2972, -1, 2974, 2976, -1, 2978, 2980, -1, 2982, 2984, -1, 2986, 2988, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2990, -1, -1, 2992, 2994, 2996, 2998, -1, -1, -1, 3000, 35770, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35772, 35773, 35774, 35775, 35776, 35777, 35778, 35779, 35780, 35781, 35782, 35783, 35784, 35785, 35786, 35787, 35788, 35789, 35790, 35791, 35792, 35793, 35794, 35795, 35796, 35797, 35798, 35799, 35800, 35801, 35802, 35803, 35804, 35805, 35806, 35807, 35808, 35809, 35810, 35811, 35812, 35813, 35814, 35815, 35816, 35817, 35818, 35819, 35820, 35821, 35822, 35823, 35824, 35825, 35826, 35827, 35828, 35829, 35830, 35831, 35832, 35833, 35834, 35835, 35836, 35837, 35838, 35839, 35840, 35841, 35842, 35843, 35844, 35845, 35846, 35847, 35848, 35849, 35850, 35851, 35852, 35853, 35854, 35855, 35856, 35857, 35858, 35859, 35860, 35861, 35862, 35863, 35864, 35865, -1, -1, -1, 35866, 35867, 35868, 35869, 35870, 35871, 35872, 35873, 35874, 35875, 35876, 35877, 35878, 35879, 35880, 35883, 35886, 35889, 35892, 35895, 35898, 35901, 35904, 35907, 35910, 35913, 35916, 35919, 35922, 35926, 35930, 35934, 35938, 35942, 35946, 35950, 35954, 35958, 35962, 35966, 35970, 35974, 35978, 35982, 35989, -1, 35995, 35998, 36001, 36004, 36007, 36010, 36013, 36016, 36019, 36022, 36025, 36028, 36031, 36034, 36037, 36040, 36043, 36046, 36049, 36052, 36055, 36058, 36061, 36064, 36067, 36070, 36073, 36076, 36079, 36082, 36085, 36088, 36091, 36094, 36097, 36100, 36103, 36104, 36105, 36106, -1, -1, -1, -1, -1, -1, -1, -1, 36107, 36110, 36112, 36114, 36116, 36118, 36120, 36122, 36124, 36126, 36128, 36130, 36132, 36134, 36136, 36138, 36140, 36141, 36142, 36143, 36144, 36145, 36146, 36147, 36148, 36149, 36150, 36151, 36152, 36153, 36154, 36156, 36158, 36160, 36162, 36164, 36166, 36168, 36170, 36172, 36174, 36176, 36178, 36180, 36182, 36187, 36191, -1, 36193, 36194, 36195, 36196, 36197, 36198, 36199, 36200, 36201, 36202, 36203, 36204, 36205, 36206, 36207, 36208, 36209, 36210, 36211, 36212, 36213, 36214, 36215, 36216, 36217, 36218, 36219, 36220, 36221, 36222, 36223, 36224, 36225, 36226, 36227, 36228, 36229, 36230, 36231, 36232, 36233, 36234, 36235, 36236, 36237, 36238, 36239, 36240, 36241, 36242, 36244, 36246, 36248, 36250, 36252, 36254, 36256, 36258, 36260, 36262, 36264, 36266, 36268, 36270, 36272, 36274, 36276, 36278, 36280, 36282, 36284, 36286, 36288, 36290, 36293, 36296, 36299, 36301, 36304, 36306, 36309, 36310, 36311, 36312, 36313, 36314, 36315, 36316, 36317, 36318, 36319, 36320, 36321, 36322, 36323, 36324, 36325, 36326, 36327, 36328, 36329, 36330, 36331, 36332, 36333, 36334, 36335, 36336, 36337, 36338, 36339, 36340, 36341, 36342, 36343, 36344, 36345, 36346, 36347, 36348, 36349, 36350, 36351, 36352, 36353, 36354, 36355, -1, 36356, 36360, 36364, 36368, 36371, 36375, 36378, 36381, 36386, 36390, 36393, 36396, 36399, 36403, 36407, 36410, 36413, 36415, 36418, 36422, 36426, 36428, 36433, 36439, 36444, 36447, 36452, 36457, 36461, 36464, 36467, 36470, 36474, 36479, 36483, 36486, 36489, 36492, 36494, 36496, 36498, 36500, 36503, 36506, 36511, 36514, 36518, 36523, 36526, 36528, 36530, 36535, 36539, 36544, 36547, 36552, 36554, 36557, 36560, 36563, 36566, 36569, 36573, 36576, 36578, 36581, 36584, 36587, 36591, 36594, 36597, 36600, 36605, 36609, 36611, 36616, 36618, 36622, 36626, 36629, 36632, 36635, 36639, 36641, 36644, 36648, 36650, 36655, 36658, 36660, 36662, 36664, 36666, 36668, 36670, 36672, 36674, 36676, 36678, 36681, 36684, 36687, 36690, 36693, 36696, 36699, 36702, 36705, 36708, 36711, 36714, 36717, 36720, 36723, 36726, 36728, 36730, 36733, 36735, 36737, 36739, 36742, 36745, 36747, 36749, 36751, 36753, 36755, 36759, 36761, 36763, 36765, 36767, 36769, 36771, 36773, 36775, 36778, 36782, 36784, 36786, 36788, 36790, 36792, 36794, 36796, 36799, 36802, 36805, 36808, 36810, 36812, 36814, 36816, 36818, 36820, 36822, 36824, 36826, 36828, 36831, 36834, 36836, 36839, 36842, 36845, 36847, 36850, 36853, 36857, 36859, 36862, 36865, 36868, 36871, 36876, 36882, 36884, 36886, 36888, 36890, 36892, 36894, 36896, 36898, 36900, 36902, 36904, 36906, 36908, 36910, 36912, 36914, 36916, 36918, 36922, 36924, 36926, 36928, 36932, 36935, 36937, 36939, 36941, 36943, 36945, 36947, 36949, 36951, 36953, 36955, 36958, 36960, 36962, 36965, 36968, 36970, 36974, 36977, 36979, 36981, 36983, 36985, 36988, 36991, 36993, 36995, 36997, 36999, 37001, 37003, 37005, 37007, 37009, 37012, 37015, 37018, 37021, 37024, 37027, 37030, 37033, 37036, 37039, 37042, 37045, 37048, 37051, 37054, 37057, 37060, 37063, 37066, 37069, 37072, 37075, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37078, 37079, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37080, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37081, 37082, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37083, 37084, 37085, 37086, 4319, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4419, 4420, 4421, 4422, 4423, 4424, 4425, 4426, 4427, 4428, 4429, 4430, 4431, 4432, 4433, 4434, 4435, 4436, 4437, 4438, 4439, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448, 4449, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, 4465, 4466, 4467, 4468, 4469, 4470, 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 4480, 4481, 4482, 4483, 4484, 4485, 4486, 4487, 4488, 4489, 4490, 4491, 4492, 4493, 4494, 4495, 4496, 4497, 4498, 4499, 4500, 4501, 4502, 4503, 4504, 4505, 4506, 4507, 4508, 4509, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 4518, 4519, 4520, 4521, 4522, 4523, 4524, 4525, 4526, 4527, 4528, 4529, 4530, 4531, 4532, 4533, 4534, 4535, 4536, 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 4559, 4560, 4561, 4562, 4563, 4564, 4565, 4566, 4567, 4568, 4569, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 4580, 4581, 4582, 4583, 4584, 4585, 4586, 4587, 4588, -1, -1, 4589, -1, 4590, -1, -1, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 4600, -1, 4601, -1, 4602, -1, -1, 4603, 4604, -1, -1, -1, 4605, 4606, 4607, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4626, 4627, 4628, 4629, 4630, 4631, 4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, -1, -1, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4694, 4695, 4696, 4697, 4698, 4699, 4700, 4701, 4702, 4703, 4704, 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712, 4713, 4714, 4715, 4716, 4717, 4718, 4719, 4720, 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728, 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744, 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753, 4754, 4755, 4756, 4757, 4758, 4759, 4760, 4761, 4762, 4763, 4764, 4765, 4766, 4767, 4768, 4769, 4770, 4771, 4772, 4773, 4774, 4775, 4776, 4777, 4778, -1, -1, -1, -1, -1, -1, 37547, 37549, 37551, 37553, 37556, 37559, 37561, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37563, 37565, 37567, 37569, 37571, -1, -1, -1, -1, -1, 4805, -1, 4807, 37577, 37578, 37579, 37580, 37581, 37582, 37583, 37584, 37585, 37586, 4819, 4821, 4823, 4825, 4827, 4829, 4831, 4833, 4835, 4837, 4839, 4841, 4843, -1, 4845, 4847, 4849, 4851, 4853, -1, 4855, -1, 4857, 4859, -1, 4861, 4863, -1, 4865, 4867, 4869, 4871, 4873, 4875, 4877, 4879, 4881, 37651, 37653, 37654, 37655, 37656, 37657, 37658, 37659, 37660, 37661, 37662, 37663, 37664, 37665, 37666, 37667, 37668, 37669, 37670, 37671, 37672, 37673, 37674, 37675, 37676, 37677, 37678, 37679, 37680, 37681, 37682, 37683, 37684, 37685, 37686, 37687, 37688, 37689, 37690, 37691, 37692, 37693, 37694, 37695, 37696, 37697, 37698, 37699, 37700, 37701, 37702, 37703, 37704, 37705, 37706, 37707, 37708, 37709, 37710, 37711, 37712, 37713, 37714, 37715, 37716, 37717, 37718, 37719, 37720, 37721, 37722, 37723, 37724, 37725, 37726, 37727, 37728, 37729, 37730, 37731, 37732, 37733, 37734, 37735, 37736, 37737, 37738, 37739, 37740, 37741, 37742, 37743, 37744, 37745, 37746, 37747, 37748, 37749, 37750, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 37751, 37752, 37753, 37754, 37755, 37756, 37757, 37758, 37759, 37760, 37761, 37762, 37763, 37764, 37765, 37766, 37767, 37768, 37769, 37770, 37771, 37772, 37773, 37774, 37776, 37778, 37780, 37782, 37784, 37786, 37788, 37790, 37792, 37794, 37796, 37798, 37800, 37802, 37804, 37806, 37808, 37810, 37811, 37812, 37813, 37814, 37816, 37818, 37820, 37822, 37824, 37826, 37828, 37830, 37832, 37834, 37836, 37838, 37840, 37842, 37844, 37846, 37848, 37850, 37852, 37854, 37856, 37858, 37860, 37862, 37864, 37866, 37868, 37870, 37872, 37874, 37876, 37878, 37880, 37882, 37884, 37886, 37888, 37890, 37892, 37894, 37896, 37898, 37900, 37902, 37904, 37906, 37908, 37910, 37912, 37914, 37916, 37918, 37920, 37922, 37924, 37926, 37928, 37930, 37932, 37934, 37936, 37938, 37940, 37942, 37944, 37946, 37948, 37950, 37952, 37954, 37956, 37958, 37960, 37962, 37964, 37966, 37968, 37970, 37972, 37974, 37976, 37978, 37980, 37982, 37984, 37986, 37988, 37990, 37992, 37994, 37996, 37998, 38000, 38002, 38005, 38008, 38011, 38014, 38017, 38020, 38022, 38024, 38026, 38028, 38030, 38032, 38034, 38036, 38038, 38040, 38042, 38044, 38046, 38048, 38050, 38052, 38054, 38056, 38058, 38060, 38062, 38064, 38066, 38068, 38070, 38072, 38074, 38076, 38078, 38080, 38082, 38084, 38086, 38088, 38090, 38092, 38094, 38096, 38098, 38100, 38102, 38104, 38106, 38108, 38110, 38112, 38114, 38116, 38118, 38120, 38122, 38124, 38126, 38128, 38130, 38132, 38134, 38136, 38138, 38140, 38142, 38144, 38146, 38148, 38150, 38152, 38154, 38156, 38158, 38160, 38162, 38164, 38166, 38168, 38170, 38172, 38174, 38176, 38178, 38180, 38182, 38184, 38186, 38188, 38190, 38192, 38194, 38196, 38198, 38200, 38202, 38204, 38206, 38208, 38210, 38212, 38214, 38216, 38218, 38220, 38222, 38224, 38226, 38228, 38230, 38232, 38234, 38236, 38238, 38240, 38242, 38244, 38246, 38248, 38250, 38252, 38254, 38256, 38258, 38260, 38262, 38264, 38266, 38268, 38270, 38272, 38274, 38276, 38278, 38280, 38282, 38284, 38286, 38288, 38290, 38292, 38294, 38296, 38298, 38300, 38302, 38304, 38307, 38310, 38313, 38315, 38317, 38319, 38321, 38323, 38325, 38327, 38329, 38331, 38333, 38335, 38337, 38339, 38341, 38343, 38345, 38347, 38349, 38351, 38353, 38355, 38357, 38359, 38361, 38363, 38365, 38367, 38369, 38371, 38373, 38375, 38377, 38379, 38381, 38383, 38385, 38387, 38389, 38391, 38393, 38395, 38397, 38399, 38401, 38403, 38405, 38407, 38409, 38411, 38413, 38415, 38417, 38419, 38421, 38423, 38425, 38427, 38429, 38431, 38433, 38435, 38437, 38439, 38441, 38443, 38445, 38447, 38449, 38451, 38453, 38455, 38457, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38459, 38462, 38465, 38468, 38471, 38474, 38477, 38480, 38483, 38486, 38489, 38492, 38495, 38498, 38501, 38504, 38507, 38510, 38513, 38516, 38519, 38522, 38525, 38528, 38531, 38534, 38537, 38540, 38543, 38546, 38549, 38552, 38555, 38558, 38561, 38564, 38567, 38570, 38573, 38576, 38579, 38582, 38585, 38588, 38591, 38594, 38597, 38600, 38603, 38606, 38609, 38612, 38615, 38618, 38621, 38624, 38627, 38630, 38633, 38636, 38639, 38642, 38645, 38648, -1, -1, 38651, 38654, 38657, 38660, 38663, 38666, 38669, 38672, 38675, 38678, 38681, 38684, 38687, 38690, 38693, 38696, 38699, 38702, 38705, 38708, 38711, 38714, 38717, 38720, 38723, 38726, 38729, 38732, 38735, 38738, 38741, 38744, 38747, 38750, 38753, 38756, 38759, 38762, 38765, 38768, 38771, 38774, 38777, 38780, 38783, 38786, 38789, 38792, 38795, 38798, 38801, 38804, 38807, 38810, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38813, 38816, 38819, 38823, 38827, 38831, 38835, 38839, 38843, 38847, 38850, 38868, 38876, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38880, 38881, 38882, 38883, 38884, 38885, 38886, 38887, 38888, 38889, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38890, 38891, 38892, 38893, 38894, 38895, 38896, 38897, 38898, 38899, 38900, 38901, 38902, 38903, 38904, 38905, 38906, 38907, 38908, 38909, 38910, -1, -1, 38911, 38912, 38913, 38914, 38915, 38916, 38917, 38918, 38919, 38920, 38921, 38922, -1, 38923, 38924, 38925, 38926, 38927, 38928, 38929, 38930, 38931, 38932, 38933, 38934, 38935, 38936, 38937, 38938, 38939, 38940, 38941, -1, 38942, 38943, 38944, 38945, -1, -1, -1, -1, 38946, 38948, 38950, -1, 38952, -1, 38954, 38956, 38958, 38960, 38962, 38964, 38966, 38968, 38970, 38972, 38974, 38975, 38976, 38977, 38978, 38979, 38980, 38981, 38982, 38983, 38984, 38985, 38986, 38987, 38988, 38989, 38990, 38991, 38992, 38993, 38994, 38995, 38996, 38997, 38998, 38999, 39000, 39001, 39002, 39003, 39004, 39005, 39006, 39007, 39008, 39009, 39010, 39011, 39012, 39013, 39014, 39015, 39016, 39017, 39018, 39019, 39020, 39021, 39022, 39023, 39024, 39025, 39026, 39027, 39028, 39029, 39030, 39031, 39032, 39033, 39034, 39035, 39036, 39037, 39038, 39039, 39040, 39041, 39042, 39043, 39044, 39045, 39046, 39047, 39048, 39049, 39050, 39051, 39052, 39053, 39054, 39055, 39056, 39057, 39058, 39059, 39060, 39061, 39062, 39063, 39064, 39065, 39066, 39067, 39068, 39069, 39070, 39071, 39072, 39073, 39074, 39075, 39076, 39077, 39078, 39079, 39080, 39081, 39082, 39083, 39084, 39085, 39086, 39087, 39088, 39089, 39090, 39091, 39093, 39095, 39097, 39099, 39101, 39103, 39105, -1, -1, -1, -1, 39107, 39108, 39109, 39110, 39111, 39112, 39113, 39114, 39115, 39116, 39117, 39118, 39119, 39120, 39121, 39122, 39123, 39124, 39125, 39126, 39127, 39128, 39129, 39130, 39131, 39132, 39133, 39134, 39135, 39136, 39137, 39138, 39139, 39140, 39141, 39142, 39143, 39144, 39145, 39146, 39147, 39148, 39149, 39150, 39151, 39152, 39153, 39154, 39155, 39156, 39157, 39158, 39159, 39160, 39161, 39162, 39163, 39164, 39165, 39166, 39167, 39168, 39169, 39170, 39171, 39172, 39173, 39174, 39175, 39176, 39177, 39178, 39179, 39180, 39181, 39182, 39183, 39184, 39185, 39186, 39187, 39188, 39189, 39190, 39191, 39192, 39193, 39194, 39195, 39196, 39197, 39198, 39199, 39200, 39201, 39202, 39203, 39204, 39205, 39206, 39207, 39208, 39209, 39210, 39211, 39212, 39213, 39214, 39215, 39216, 39217, 39218, 39219, 39220, 39221, 39222, 39223, 39224, 39225, 39226, 39227, 39228, 39229, 39230, 39231, 39232, 39233, 39234, 39235, 39236, 39237, 39238, 39239, 39240, 39241, 39242, 39243, 39244, 39245, 39246, 39247, 39248, 39249, 39250, 39251, 39252, 39253, 39254, 39255, 39256, 39257, 39258, 39259, 39260, 39261, 39262, 39263, 39264, 39265, 39266, 39267, 39268, 39269, 39270, 39271, 39272, 39273, 39274, 39275, 39276, 39277, 39278, 39279, 39280, 39281, 39282, 39283, 39284, 39285, 39286, 39287, 39288, 39289, 39290, 39291, 39292, 39293, 39294, 39295, 39296, -1, -1, -1, 39297, 39298, 39299, 39300, 39301, 39302, -1, -1, 39303, 39304, 39305, 39306, 39307, 39308, -1, -1, 39309, 39310, 39311, 39312, 39313, 39314, -1, -1, 39315, 39316, 39317, -1, -1, -1, 39318, 39319, 39320, 39321, 39322, 39323, 39324, -1, 39325, 39326, 39327, 39328, 39329, 39330, 39331, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6564, -1, 6566, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6568, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6570, 6572, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6574, 6576, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6578, 6580, -1, 6582, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6584, 6586, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6588, 6590, 6592, 6594, 6596, 6598, 6600, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6602, 6604, 6606, 6608, 6610, 6612, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39382, 39383, 39384, 39385, 39386, 39387, 39388, 39389, 39390, 39391, 39392, 39393, 39394, 39395, 39396, 39397, 39398, 39399, 39400, 39401, 39402, 39403, 39404, 39405, 39406, 39407, 39408, 39409, 39410, 39411, 39412, 39413, 39414, 39415, 39416, 39417, 39418, 39419, 39420, 39421, 39422, 39423, 39424, 39425, 39426, 39427, 39428, 39429, 39430, 39431, 39432, 39433, 39434, 39435, 39436, 39437, 39438, 39439, 39440, 39441, 39442, 39443, 39444, 39445, 39446, 39447, 39448, 39449, 39450, 39451, 39452, 39453, 39454, 39455, 39456, 39457, 39458, 39459, 39460, 39461, 39462, 39463, 39464, 39465, 39466, -1, 39467, 39468, 39469, 39470, 39471, 39472, 39473, 39474, 39475, 39476, 39477, 39478, 39479, 39480, 39481, 39482, 39483, 39484, 39485, 39486, 39487, 39488, 39489, 39490, 39491, 39492, 39493, 39494, 39495, 39496, 39497, 39498, 39499, 39500, 39501, 39502, 39503, 39504, 39505, 39506, 39507, 39508, 39509, 39510, 39511, 39512, 39513, 39514, 39515, 39516, 39517, 39518, 39519, 39520, 39521, 39522, 39523, 39524, 39525, 39526, 39527, 39528, 39529, 39530, 39531, 39532, 39533, 39534, 39535, 39536, 39537, -1, 39538, 39539, -1, -1, 39540, -1, -1, 39541, 39542, -1, -1, 39543, 39544, 39545, 39546, -1, 39547, 39548, 39549, 39550, 39551, 39552, 39553, 39554, 39555, 39556, 39557, 39558, -1, 39559, -1, 39560, 39561, 39562, 39563, 39564, 39565, 39566, -1, 39567, 39568, 39569, 39570, 39571, 39572, 39573, 39574, 39575, 39576, 39577, 39578, 39579, 39580, 39581, 39582, 39583, 39584, 39585, 39586, 39587, 39588, 39589, 39590, 39591, 39592, 39593, 39594, 39595, 39596, 39597, 39598, 39599, 39600, 39601, 39602, 39603, 39604, 39605, 39606, 39607, 39608, 39609, 39610, 39611, 39612, 39613, 39614, 39615, 39616, 39617, 39618, 39619, 39620, 39621, 39622, 39623, 39624, 39625, 39626, 39627, 39628, 39629, 39630, 39631, -1, 39632, 39633, 39634, 39635, -1, -1, 39636, 39637, 39638, 39639, 39640, 39641, 39642, 39643, -1, 39644, 39645, 39646, 39647, 39648, 39649, 39650, -1, 39651, 39652, 39653, 39654, 39655, 39656, 39657, 39658, 39659, 39660, 39661, 39662, 39663, 39664, 39665, 39666, 39667, 39668, 39669, 39670, 39671, 39672, 39673, 39674, 39675, 39676, 39677, 39678, -1, 39679, 39680, 39681, 39682, -1, 39683, 39684, 39685, 39686, 39687, -1, 39688, -1, -1, -1, 39689, 39690, 39691, 39692, 39693, 39694, 39695, -1, 39696, 39697, 39698, 39699, 39700, 39701, 39702, 39703, 39704, 39705, 39706, 39707, 39708, 39709, 39710, 39711, 39712, 39713, 39714, 39715, 39716, 39717, 39718, 39719, 39720, 39721, 39722, 39723, 39724, 39725, 39726, 39727, 39728, 39729, 39730, 39731, 39732, 39733, 39734, 39735, 39736, 39737, 39738, 39739, 39740, 39741, 39742, 39743, 39744, 39745, 39746, 39747, 39748, 39749, 39750, 39751, 39752, 39753, 39754, 39755, 39756, 39757, 39758, 39759, 39760, 39761, 39762, 39763, 39764, 39765, 39766, 39767, 39768, 39769, 39770, 39771, 39772, 39773, 39774, 39775, 39776, 39777, 39778, 39779, 39780, 39781, 39782, 39783, 39784, 39785, 39786, 39787, 39788, 39789, 39790, 39791, 39792, 39793, 39794, 39795, 39796, 39797, 39798, 39799, 39800, 39801, 39802, 39803, 39804, 39805, 39806, 39807, 39808, 39809, 39810, 39811, 39812, 39813, 39814, 39815, 39816, 39817, 39818, 39819, 39820, 39821, 39822, 39823, 39824, 39825, 39826, 39827, 39828, 39829, 39830, 39831, 39832, 39833, 39834, 39835, 39836, 39837, 39838, 39839, 39840, 39841, 39842, 39843, 39844, 39845, 39846, 39847, 39848, 39849, 39850, 39851, 39852, 39853, 39854, 39855, 39856, 39857, 39858, 39859, 39860, 39861, 39862, 39863, 39864, 39865, 39866, 39867, 39868, 39869, 39870, 39871, 39872, 39873, 39874, 39875, 39876, 39877, 39878, 39879, 39880, 39881, 39882, 39883, 39884, 39885, 39886, 39887, 39888, 39889, 39890, 39891, 39892, 39893, 39894, 39895, 39896, 39897, 39898, 39899, 39900, 39901, 39902, 39903, 39904, 39905, 39906, 39907, 39908, 39909, 39910, 39911, 39912, 39913, 39914, 39915, 39916, 39917, 39918, 39919, 39920, 39921, 39922, 39923, 39924, 39925, 39926, 39927, 39928, 39929, 39930, 39931, 39932, 39933, 39934, 39935, 39936, 39937, 39938, 39939, 39940, 39941, 39942, 39943, 39944, 39945, 39946, 39947, 39948, 39949, 39950, 39951, 39952, 39953, 39954, 39955, 39956, 39957, 39958, 39959, 39960, 39961, 39962, 39963, 39964, 39965, 39966, 39967, 39968, 39969, 39970, 39971, 39972, 39973, 39974, 39975, 39976, 39977, 39978, 39979, 39980, 39981, 39982, 39983, 39984, 39985, 39986, 39987, 39988, 39989, 39990, 39991, 39992, 39993, 39994, 39995, 39996, 39997, 39998, 39999, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40013, 40014, 40015, 40016, 40017, 40018, 40019, 40020, 40021, 40022, 40023, 40024, 40025, 40026, 40027, 40028, 40029, 40030, 40031, 40032, 40033, 40034, 40035, -1, -1, 40036, 40037, 40038, 40039, 40040, 40041, 40042, 40043, 40044, 40045, 40046, 40047, 40048, 40049, 40050, 40051, 40052, 40053, 40054, 40055, 40056, 40057, 40058, 40059, 40060, 40061, 40062, 40063, 40064, 40065, 40066, 40067, 40068, 40069, 40070, 40071, 40072, 40073, 40074, 40075, 40076, 40077, 40078, 40079, 40080, 40081, 40082, 40083, 40084, 40085, 40086, 40087, 40088, 40089, 40090, 40091, 40092, 40093, 40094, 40095, 40096, 40097, 40098, 40099, 40100, 40101, 40102, 40103, 40104, 40105, 40106, 40107, 40108, 40109, 40110, 40111, 40112, 40113, 40114, 40115, 40116, 40117, 40118, 40119, 40120, 40121, 40122, 40123, 40124, 40125, 40126, 40127, 40128, 40129, 40130, 40131, 40132, 40133, 40134, 40135, 40136, 40137, 40138, 40139, 40140, 40141, 40142, 40143, 40144, 40145, 40146, 40147, 40148, 40149, 40150, 40151, 40152, 40153, 40154, 40155, 40156, 40157, 40158, 40159, 40160, 40161, 40162, 40163, 40164, 40165, 40166, 40167, 40168, 40169, 40170, 40171, 40172, 40173, 40174, 40175, 40176, 40177, 40178, 40179, 40180, 40181, 40182, 40183, 40184, 40185, 40186, 40187, 40188, 40189, 40190, 40191, 40192, 40193, 40194, 40195, 40196, 40197, 40198, 40199, 40200, 40201, 40202, 40203, 40204, 40205, 40206, 40207, 40208, 40209, 40210, 40211, 40212, 40213, 40214, 40215, 40216, 40217, 40218, 40219, 40220, 40221, 40222, 40223, 40224, 40225, 40226, 40227, 40228, 40229, 40230, 40231, 40232, 40233, 40234, 40235, 40236, 40237, 40238, 40239, 40240, 40241, 40242, 40243, 40244, 40245, 40246, 40247, 40248, 40249, 40250, 40251, 40252, 40253, 40254, 40255, 40256, 40257, 40258, 40259, 40260, 40261, 40262, 40263, 40264, 40265, 40266, 40267, 40268, 40269, 40270, 40271, 40272, 40273, 40274, 40275, 40276, 40277, 40278, 40279, 40280, 40281, 40282, 40283, 40284, 40285, 40286, 40287, 40288, 40289, 40290, 40291, 40292, 40293, 40294, 40295, 40296, 40297, 40298, 40299, 40300, 40301, 40302, 40303, 40304, 40305, 40306, 40307, 40308, 40309, 40310, 40311, 40312, 40313, 40314, 40315, 40316, 40317, 40318, 40319, 40320, 40321, 40322, 40323, 40324, 40325, 40326, 40327, -1, -1, 40328, 40329, 40330, 40331, 40332, 40333, 40334, 40335, 40336, 40337, 40338, 40339, 40340, 40341, 40342, 40343, 40344, 40345, 40346, 40347, 40348, 40349, 40350, 40351, 40352, 40353, 40354, 40355, 40356, 40357, 40358, 40359, 40360, 40361, 40362, 40363, 40364, 40365, 40366, 40367, 40368, 40369, 40370, 40371, 40372, 40373, 40374, 40375, 40376, 40377, 40378, 40379, 40380, 40381, -1, 40382, 40383, 40384, 40385, 40386, 40387, 40388, 40389, 40390, 40391, 40392, 40393, 40394, 40395, 40396, 40397, 40398, 40399, 40400, 40401, 40402, 40403, 40404, 40405, 40406, 40407, 40408, -1, 40409, 40410, -1, 40411, -1, -1, 40412, -1, 40413, 40414, 40415, 40416, 40417, 40418, 40419, 40420, 40421, 40422, -1, 40423, 40424, 40425, 40426, -1, 40427, -1, 40428, -1, -1, -1, -1, -1, -1, 40429, -1, -1, -1, -1, 40430, -1, 40431, -1, 40432, -1, 40433, 40434, 40435, -1, 40436, 40437, -1, 40438, -1, -1, 40439, -1, 40440, -1, 40441, -1, 40442, -1, 40443, -1, 40444, 40445, -1, 40446, -1, -1, 40447, 40448, 40449, 40450, -1, 40451, 40452, 40453, 40454, 40455, 40456, 40457, -1, 40458, 40459, 40460, 40461, -1, 40462, 40463, 40464, 40465, -1, 40466, -1, 40467, 40468, 40469, 40470, 40471, 40472, 40473, 40474, 40475, 40476, -1, 40477, 40478, 40479, 40480, 40481, 40482, 40483, 40484, 40485, 40486, 40487, 40488, 40489, 40490, 40491, 40492, 40493, -1, -1, -1, -1, -1, 40494, 40495, 40496, -1, 40497, 40498, 40499, 40500, 40501, -1, 40502, 40503, 40504, 40505, 40506, 40507, 40508, 40509, 40510, 40511, 40512, 40513, 40514, 40515, 40516, 40517, 40518, -1, -1, -1, -1, 40519, 40521, 40523, 40525, 40527, 40529, 40531, 40533, 40535, 40537, 40539, -1, -1, -1, -1, -1, 40541, 40544, 40547, 40550, 40553, 40556, 40559, 40562, 40565, 40568, 40571, 40574, 40577, 40580, 40583, 40586, 40589, 40592, 40595, 40598, 40601, 40604, 40607, 40610, 40613, 40616, 40619, 40622, 40623, 40624, 40626, -1, 40628, 40629, 40630, 40631, 40632, 40633, 40634, 40635, 40636, 40637, 40638, 40639, 40640, 40641, 40642, 40643, 40644, 40645, 40646, 40647, 40648, 40649, 40650, 40651, 40652, 40653, 40654, 40656, 40658, 40660, 40662, 40665, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40667, 40669, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40671, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40673, 40675, 40677, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40678, 40679, 40680, 40681, 40682, 40683, 40684, 40685, 40686, 40687, 40688, 40689, 40690, 40691, 40692, 40693, 40694, 40695, 40696, 40697, 40698, 40699, 40700, 40701, 40702, 40703, 40704, 40705, 40706, 40707, 40708, 40709, 40710, 40711, 40712, 40713, 40714, 40715, 40716, 40717, 40718, 40719, 40720, -1, -1, -1, -1, -1, 40721, 40724, 40727, 40730, 40733, 40736, 40739, 40742, 40745, -1, -1, -1, -1, -1, -1, -1, 40748, 40749, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7982, 7983, 7984, 7985, 7986, 7987, 7988, 7989, 7990, 7991, 7992, 7993, 7994, 7995, 7996, 7997, 7998, 7999, 8000, 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010, 8011, 8012, 8013, 8014, 8015, 8016, 8017, 8018, 8019, 8020, 8021, 8022, 8023, 8024, 8025, 8026, 8027, 8028, 8029, 8030, 8031, 8032, 8033, 8034, 8035, 8036, 8037, 8038, 8039, 8040, 8041, 8042, 8043, 8044, 8045, 8046, 8047, 8048, 8049, 8050, 8051, 8052, 8053, 8054, 8055, 8056, 8057, 8058, 8059, 8060, 8061, 8062, 8063, 8064, 8065, 8066, 8067, 8068, 8069, 8070, 8071, 8072, 8073, 8074, 8075, 8076, 8077, 8078, 8079, 8080, 8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, 8089, 8090, 8091, 8092, 8093, 8094, 8095, 8096, 8097, 8098, 8099, 8100, 8101, 8102, 8103, 8104, 8105, 8106, 8107, 8108, 8109, 8110, 8111, 8112, 8113, 8114, 8115, 8116, 8117, 8118, 8119, 8120, 8121, 8122, 8123, 8124, 8125, 8126, 8127, 8128, 8129, 8130, 8131, 8132, 8133, 8134, 8135, 8136, 8137, 8138, 8139, 8140, 8141, 8142, 8143, 8144, 8145, 8146, 8147, 8148, 8149, 8150, 8151, 8152, 8153, 8154, 8155, 8156, 8157, 8158, 8159, 8160, 8161, 8162, 8163, 8164, 8165, 8166, 8167, 8168, 8169, 8170, 8171, 8172, 8173, 8174, 8175, 8176, 8177, 8178, 8179, 8180, 8181, 8182, 8183, 8184, 8185, 8186, 8187, 8188, 8189, 8190, 8191, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8203, 8204, 8205, 8206, 8207, 8208, 8209, 8210, 8211, 8212, 8213, 8214, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8223, 8224, 8225, 8226, 8227, 8228, 8229, 8230, 8231, 8232, 8233, 8234, 8235, 8236, 8237, 8238, 8239, 8240, 8241, 8242, 8243, 8244, 8245, 8246, 8247, 8248, 8249, 8250, 8251, 8252, 8253, 8254, 8255, 8256, 8257, 8258, 8259, 8260, 8261, 8262, 8263, 8264, 8265, 8266, 8267, 8268, 8269, 8270, 8271, 8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281, 8282, 8283, 8284, 8285, 8286, 8287, 8288, 8289, 8290, 8291, 8292, 8293, 8294, 8295, 8296, 8297, 8298, 8299, 8300, 8301, 8302, 8303, 8304, 8305, 8306, 8307, 8308, 8309, 8310, 8311, 8312, 8313, 8314, 8315, 8316, 8317, 8318, 8319, 8320, 8321, 8322, 8323, 8324, 8325, 8326, 8327, 8328, 8329, 8330, 8331, 8332, 8333, 8334, 8335, 8336, 8337, 8338, 8339, 8340, 8341, 8342, 8343, 8344, 8345, 8346, 8347, 8348, 8349, 8350, 8351, 8352, 8353, 8354, 8355, 8356, 8357, 8358, 8359, 8360, 8361, 8362, 8363, 8364, 8365, 8366, 8367, 8368, 8369, 8370, 8371, 8372, 8373, 8374, 8375, 8376, 8377, 8378, 8379, 8380, 8381, 8382, 8383, 8384, 8385, 8386, 8387, 8388, 8389, 8390, 8391, 8392, 8393, 8394, 8395, 8396, 8397, 8398, 8399, 8400, 8401, 8402, 8403, 8404, 8405, 8406, 8407, 8408, 8409, 8410, 8411, 8412, 8413, 8414, 8415, 8416, 8417, 8418, 8419, 8420, 8421, 8422, 8423, 8424, 8425, 8426, 8427, 8428, 8429, 8430, 8431, 8432, 8433, 8434, 8435, 8436, 8437, 8438, 8439, 8440, 8441, 8442, 8443, 8444, 8445, 8446, 8447, 8448, 8449, 8450, 8451, 8452, 8453, 8454, 8455, 8456, 8457, 8458, 8459, 8460, 8461, 8462, 8463, 8464, 8465, 8466, 8467, 8468, 8469, 8470, 8471, 8472, 8473, 8474, 8475, 8476, 8477, 8478, 8479, 8480, 8481, 8482, 8483, 8484, 8485, 8486, 8487, 8488, 8489, 8490, 8491, 8492, 8493, 8494, 8495, 8496, 8497, 8498, 8499, 8500, 8501, 8502, 8503, 8504, 8505, 8506, 8507, 8508, 8509, 8510, 8511, 8512, 8513, 8514, 8515, 8516, 8517, 8518, 8519, 8520, 8521, 8522, 8523, -1, -1 } }; pspp-1.0.1/gl/unistr/0000755000175000017500000000000013150620334011417 500000000000000pspp-1.0.1/gl/unistr/u8-mbtoucr.c0000644000175000017500000001073413124536243013523 00000000000000/* Look at first character in UTF-8 string, returning an error code. Copyright (C) 1999-2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #include /* Specification. */ #include "unistr.h" int u8_mbtoucr (ucs4_t *puc, const uint8_t *s, size_t n) { uint8_t c = *s; if (c < 0x80) { *puc = c; return 1; } else if (c >= 0xc2) { if (c < 0xe0) { if (n >= 2) { if ((s[1] ^ 0x80) < 0x40) { *puc = ((unsigned int) (c & 0x1f) << 6) | (unsigned int) (s[1] ^ 0x80); return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; return -2; } } else if (c < 0xf0) { if (n >= 2) { if ((s[1] ^ 0x80) < 0x40 && (c >= 0xe1 || s[1] >= 0xa0) && (c != 0xed || s[1] < 0xa0)) { if (n >= 3) { if ((s[2] ^ 0x80) < 0x40) { *puc = ((unsigned int) (c & 0x0f) << 12) | ((unsigned int) (s[1] ^ 0x80) << 6) | (unsigned int) (s[2] ^ 0x80); return 3; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; return -2; } } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; return -2; } } else if (c < 0xf8) { if (n >= 2) { if ((s[1] ^ 0x80) < 0x40 && (c >= 0xf1 || s[1] >= 0x90) && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90))) { if (n >= 3) { if ((s[2] ^ 0x80) < 0x40) { if (n >= 4) { if ((s[3] ^ 0x80) < 0x40) { *puc = ((unsigned int) (c & 0x07) << 18) | ((unsigned int) (s[1] ^ 0x80) << 12) | ((unsigned int) (s[2] ^ 0x80) << 6) | (unsigned int) (s[3] ^ 0x80); return 4; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; return -2; } } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; return -2; } } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; return -2; } } } /* invalid multibyte character */ *puc = 0xfffd; return -1; } pspp-1.0.1/gl/unistr/u8-check.c0000644000175000017500000000427013124536243013123 00000000000000/* Check UTF-8 string. Copyright (C) 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unistr.h" const uint8_t * u8_check (const uint8_t *s, size_t n) { const uint8_t *s_end = s + n; while (s < s_end) { /* Keep in sync with unistr.h and u8-mbtouc-aux.c. */ uint8_t c = *s; if (c < 0x80) { s++; continue; } if (c >= 0xc2) { if (c < 0xe0) { if (s + 2 <= s_end && (s[1] ^ 0x80) < 0x40) { s += 2; continue; } } else if (c < 0xf0) { if (s + 3 <= s_end && (s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && (c >= 0xe1 || s[1] >= 0xa0) && (c != 0xed || s[1] < 0xa0)) { s += 3; continue; } } else if (c < 0xf8) { if (s + 4 <= s_end && (s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && (s[3] ^ 0x80) < 0x40 && (c >= 0xf1 || s[1] >= 0x90) && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90))) { s += 4; continue; } } } /* invalid or incomplete multibyte character */ return s; } return NULL; } pspp-1.0.1/gl/unistr/u8-mbtouc-aux.c0000644000175000017500000001052013124536243014125 00000000000000/* Conversion UTF-8 to UCS-4. Copyright (C) 2001-2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #include /* Specification. */ #include "unistr.h" #if defined IN_LIBUNISTRING || HAVE_INLINE int u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n) { uint8_t c = *s; if (c >= 0xc2) { if (c < 0xe0) { if (n >= 2) { if ((s[1] ^ 0x80) < 0x40) { *puc = ((unsigned int) (c & 0x1f) << 6) | (unsigned int) (s[1] ^ 0x80); return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; return 1; } } else if (c < 0xf0) { if (n >= 3) { if ((s[1] ^ 0x80) < 0x40) { if ((s[2] ^ 0x80) < 0x40) { if ((c >= 0xe1 || s[1] >= 0xa0) && (c != 0xed || s[1] < 0xa0)) { *puc = ((unsigned int) (c & 0x0f) << 12) | ((unsigned int) (s[1] ^ 0x80) << 6) | (unsigned int) (s[2] ^ 0x80); return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; if (n == 1 || (s[1] ^ 0x80) >= 0x40) return 1; else return 2; } } else if (c < 0xf8) { if (n >= 4) { if ((s[1] ^ 0x80) < 0x40) { if ((s[2] ^ 0x80) < 0x40) { if ((s[3] ^ 0x80) < 0x40) { if ((c >= 0xf1 || s[1] >= 0x90) && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90))) { *puc = ((unsigned int) (c & 0x07) << 18) | ((unsigned int) (s[1] ^ 0x80) << 12) | ((unsigned int) (s[2] ^ 0x80) << 6) | (unsigned int) (s[3] ^ 0x80); return 4; } /* invalid multibyte character */ *puc = 0xfffd; return 4; } /* invalid multibyte character */ *puc = 0xfffd; return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; if (n == 1 || (s[1] ^ 0x80) >= 0x40) return 1; else if (n == 2 || (s[2] ^ 0x80) >= 0x40) return 2; else return 3; } } } /* invalid multibyte character */ *puc = 0xfffd; return 1; } #endif pspp-1.0.1/gl/unistr/u8-uctomb.c0000644000175000017500000000367213124536243013344 00000000000000/* Store a character in UTF-8 string. Copyright (C) 2002, 2005-2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include #if defined IN_LIBUNISTRING /* Tell unistr.h to declare u8_uctomb as 'extern', not 'static inline'. */ # include "unistring-notinline.h" #endif /* Specification. */ #include "unistr.h" #if !HAVE_INLINE int u8_uctomb (uint8_t *s, ucs4_t uc, int n) { if (uc < 0x80) { if (n > 0) { s[0] = uc; return 1; } /* else return -2, below. */ } else { int count; if (uc < 0x800) count = 2; else if (uc < 0x10000) { if (uc < 0xd800 || uc >= 0xe000) count = 3; else return -1; } else if (uc < 0x110000) count = 4; else return -1; if (n >= count) { switch (count) /* note: code falls through cases! */ { case 4: s[3] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x10000; case 3: s[2] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x800; case 2: s[1] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0xc0; /*case 1:*/ s[0] = uc; } return count; } } return -2; } #endif pspp-1.0.1/gl/unistr/u-cpy.h0000644000175000017500000000205413124536243012554 00000000000000/* Copy piece of UTF-8/UTF-16/UTF-32 string. Copyright (C) 1999, 2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include UNIT * FUNC (UNIT *dest, const UNIT *src, size_t n) { #if 0 UNIT *destptr = dest; for (; n > 0; n--) *destptr++ = *src++; #else memcpy ((char *) dest, (const char *) src, n * sizeof (UNIT)); #endif return dest; } pspp-1.0.1/gl/unistr/u8-mbtouc-unsafe-aux.c0000644000175000017500000001056513124536243015415 00000000000000/* Conversion UTF-8 to UCS-4. Copyright (C) 2001-2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #include /* Specification. */ #include "unistr.h" #if defined IN_LIBUNISTRING || HAVE_INLINE int u8_mbtouc_unsafe_aux (ucs4_t *puc, const uint8_t *s, size_t n) { uint8_t c = *s; if (c >= 0xc2) { if (c < 0xe0) { if (n >= 2) { if ((s[1] ^ 0x80) < 0x40) { *puc = ((unsigned int) (c & 0x1f) << 6) | (unsigned int) (s[1] ^ 0x80); return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; return 1; } } else if (c < 0xf0) { if (n >= 3) { if ((s[1] ^ 0x80) < 0x40) { if ((s[2] ^ 0x80) < 0x40) { if ((c >= 0xe1 || s[1] >= 0xa0) && (c != 0xed || s[1] < 0xa0)) { *puc = ((unsigned int) (c & 0x0f) << 12) | ((unsigned int) (s[1] ^ 0x80) << 6) | (unsigned int) (s[2] ^ 0x80); return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; if (n == 1 || (s[1] ^ 0x80) >= 0x40) return 1; else return 2; } } else if (c < 0xf8) { if (n >= 4) { if ((s[1] ^ 0x80) < 0x40) { if ((s[2] ^ 0x80) < 0x40) { if ((s[3] ^ 0x80) < 0x40) { if ((c >= 0xf1 || s[1] >= 0x90) && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90)) ) { *puc = ((unsigned int) (c & 0x07) << 18) | ((unsigned int) (s[1] ^ 0x80) << 12) | ((unsigned int) (s[2] ^ 0x80) << 6) | (unsigned int) (s[3] ^ 0x80); return 4; } /* invalid multibyte character */ *puc = 0xfffd; return 4; } /* invalid multibyte character */ *puc = 0xfffd; return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; if (n == 1 || (s[1] ^ 0x80) >= 0x40) return 1; else if (n == 2 || (s[2] ^ 0x80) >= 0x40) return 2; else return 3; } } } /* invalid multibyte character */ *puc = 0xfffd; return 1; } #endif pspp-1.0.1/gl/unistr/u8-strncat.c0000644000175000017500000000200113124536243013512 00000000000000/* Concatenate UTF-8 strings. Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unistr.h" #include uint8_t * u8_strncat (uint8_t *dest, const uint8_t *src, size_t n) { return (uint8_t *) strncat ((char *) dest, (const char *) src, n); } pspp-1.0.1/gl/unistr/u8-cpy.c0000644000175000017500000000163513124536243012643 00000000000000/* Copy piece of UTF-8 string. Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unistr.h" #define FUNC u8_cpy #define UNIT uint8_t #include "u-cpy.h" pspp-1.0.1/gl/unistr/u8-cmp.c0000644000175000017500000000210313124536243012616 00000000000000/* Compare pieces of UTF-8 strings. Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unistr.h" #include int u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n) { /* Use the fact that the UTF-8 encoding preserves lexicographic order. */ return memcmp ((const char *) s1, (const char *) s2, n); } pspp-1.0.1/gl/unistr/u8-strmbtouc.c0000644000175000017500000000447613124536243014100 00000000000000/* Look at first character in UTF-8 string. Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unistr.h" int u8_strmbtouc (ucs4_t *puc, const uint8_t *s) { /* Keep in sync with unistr.h and u8-mbtouc-aux.c. */ uint8_t c = *s; if (c < 0x80) { *puc = c; return (c != 0 ? 1 : 0); } if (c >= 0xc2) { if (c < 0xe0) { if ((s[1] ^ 0x80) < 0x40) { *puc = ((unsigned int) (c & 0x1f) << 6) | (unsigned int) (s[1] ^ 0x80); return 2; } } else if (c < 0xf0) { if ((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && (c >= 0xe1 || s[1] >= 0xa0) && (c != 0xed || s[1] < 0xa0)) { *puc = ((unsigned int) (c & 0x0f) << 12) | ((unsigned int) (s[1] ^ 0x80) << 6) | (unsigned int) (s[2] ^ 0x80); return 3; } } else if (c < 0xf8) { if ((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && (s[3] ^ 0x80) < 0x40 && (c >= 0xf1 || s[1] >= 0x90) && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90))) { *puc = ((unsigned int) (c & 0x07) << 18) | ((unsigned int) (s[1] ^ 0x80) << 12) | ((unsigned int) (s[2] ^ 0x80) << 6) | (unsigned int) (s[3] ^ 0x80); return 4; } } } /* invalid or incomplete multibyte character */ return -1; } pspp-1.0.1/gl/unistr/u8-mblen.c0000644000175000017500000000364313124536243013146 00000000000000/* Look at first character in UTF-8 string. Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unistr.h" int u8_mblen (const uint8_t *s, size_t n) { if (n > 0) { /* Keep in sync with unistr.h and u8-mbtouc-aux.c. */ uint8_t c = *s; if (c < 0x80) return (c != 0 ? 1 : 0); if (c >= 0xc2) { if (c < 0xe0) { if (n >= 2 && (s[1] ^ 0x80) < 0x40) return 2; } else if (c < 0xf0) { if (n >= 3 && (s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && (c >= 0xe1 || s[1] >= 0xa0) && (c != 0xed || s[1] < 0xa0)) return 3; } else if (c < 0xf8) { if (n >= 4 && (s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && (s[3] ^ 0x80) < 0x40 && (c >= 0xf1 || s[1] >= 0x90) && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90))) return 4; } } } /* invalid or incomplete multibyte character */ return -1; } pspp-1.0.1/gl/unistr/u8-uctomb-aux.c0000644000175000017500000000337013124536243014132 00000000000000/* Conversion UCS-4 to UTF-8. Copyright (C) 2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unistr.h" #ifndef FALLTHROUGH # if __GNUC__ < 7 # define FALLTHROUGH ((void) 0) # else # define FALLTHROUGH __attribute__ ((__fallthrough__)) # endif #endif int u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n) { int count; if (uc < 0x80) /* The case n >= 1 is already handled by the caller. */ return -2; else if (uc < 0x800) count = 2; else if (uc < 0x10000) { if (uc < 0xd800 || uc >= 0xe000) count = 3; else return -1; } else if (uc < 0x110000) count = 4; else return -1; if (n < count) return -2; switch (count) /* note: code falls through cases! */ { case 4: s[3] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x10000; FALLTHROUGH; case 3: s[2] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x800; FALLTHROUGH; case 2: s[1] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0xc0; /*case 1:*/ s[0] = uc; } return count; } pspp-1.0.1/gl/unistr/u8-mbtouc-unsafe.c0000644000175000017500000001110213124536243014606 00000000000000/* Look at first character in UTF-8 string. Copyright (C) 1999-2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #include #if defined IN_LIBUNISTRING /* Tell unistr.h to declare u8_mbtouc_unsafe as 'extern', not 'static inline'. */ # include "unistring-notinline.h" #endif /* Specification. */ #include "unistr.h" #if !HAVE_INLINE int u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n) { uint8_t c = *s; if (c < 0x80) { *puc = c; return 1; } else if (c >= 0xc2) { if (c < 0xe0) { if (n >= 2) { if ((s[1] ^ 0x80) < 0x40) { *puc = ((unsigned int) (c & 0x1f) << 6) | (unsigned int) (s[1] ^ 0x80); return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; return 1; } } else if (c < 0xf0) { if (n >= 3) { if ((s[1] ^ 0x80) < 0x40) { if ((s[2] ^ 0x80) < 0x40) { if ((c >= 0xe1 || s[1] >= 0xa0) && (c != 0xed || s[1] < 0xa0)) { *puc = ((unsigned int) (c & 0x0f) << 12) | ((unsigned int) (s[1] ^ 0x80) << 6) | (unsigned int) (s[2] ^ 0x80); return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; if (n == 1 || (s[1] ^ 0x80) >= 0x40) return 1; else return 2; } } else if (c < 0xf8) { if (n >= 4) { if ((s[1] ^ 0x80) < 0x40) { if ((s[2] ^ 0x80) < 0x40) { if ((s[3] ^ 0x80) < 0x40) { if ((c >= 0xf1 || s[1] >= 0x90) && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90)) ) { *puc = ((unsigned int) (c & 0x07) << 18) | ((unsigned int) (s[1] ^ 0x80) << 12) | ((unsigned int) (s[2] ^ 0x80) << 6) | (unsigned int) (s[3] ^ 0x80); return 4; } /* invalid multibyte character */ *puc = 0xfffd; return 4; } /* invalid multibyte character */ *puc = 0xfffd; return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; if (n == 1 || (s[1] ^ 0x80) >= 0x40) return 1; else if (n == 2 || (s[2] ^ 0x80) >= 0x40) return 2; else return 3; } } } /* invalid multibyte character */ *puc = 0xfffd; return 1; } #endif pspp-1.0.1/gl/unistr/u8-mbtouc.c0000644000175000017500000001102313124536243013331 00000000000000/* Look at first character in UTF-8 string. Copyright (C) 1999-2002, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #include #if defined IN_LIBUNISTRING /* Tell unistr.h to declare u8_mbtouc as 'extern', not 'static inline'. */ # include "unistring-notinline.h" #endif /* Specification. */ #include "unistr.h" #if !HAVE_INLINE int u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n) { uint8_t c = *s; if (c < 0x80) { *puc = c; return 1; } else if (c >= 0xc2) { if (c < 0xe0) { if (n >= 2) { if ((s[1] ^ 0x80) < 0x40) { *puc = ((unsigned int) (c & 0x1f) << 6) | (unsigned int) (s[1] ^ 0x80); return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; return 1; } } else if (c < 0xf0) { if (n >= 3) { if ((s[1] ^ 0x80) < 0x40) { if ((s[2] ^ 0x80) < 0x40) { if ((c >= 0xe1 || s[1] >= 0xa0) && (c != 0xed || s[1] < 0xa0)) { *puc = ((unsigned int) (c & 0x0f) << 12) | ((unsigned int) (s[1] ^ 0x80) << 6) | (unsigned int) (s[2] ^ 0x80); return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; if (n == 1 || (s[1] ^ 0x80) >= 0x40) return 1; else return 2; } } else if (c < 0xf8) { if (n >= 4) { if ((s[1] ^ 0x80) < 0x40) { if ((s[2] ^ 0x80) < 0x40) { if ((s[3] ^ 0x80) < 0x40) { if ((c >= 0xf1 || s[1] >= 0x90) && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90))) { *puc = ((unsigned int) (c & 0x07) << 18) | ((unsigned int) (s[1] ^ 0x80) << 12) | ((unsigned int) (s[2] ^ 0x80) << 6) | (unsigned int) (s[3] ^ 0x80); return 4; } /* invalid multibyte character */ *puc = 0xfffd; return 4; } /* invalid multibyte character */ *puc = 0xfffd; return 3; } /* invalid multibyte character */ *puc = 0xfffd; return 2; } /* invalid multibyte character */ } else { /* incomplete multibyte character */ *puc = 0xfffd; if (n == 1 || (s[1] ^ 0x80) >= 0x40) return 1; else if (n == 2 || (s[2] ^ 0x80) >= 0x40) return 2; else return 3; } } } /* invalid multibyte character */ *puc = 0xfffd; return 1; } #endif pspp-1.0.1/gl/unistr/u8-strlen.c0000644000175000017500000000171013124536243013351 00000000000000/* Determine length of UTF-8 string. Copyright (C) 2002, 2006, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 . */ #include /* Specification. */ #include "unistr.h" #include size_t u8_strlen (const uint8_t *s) { return strlen ((const char *) s); } pspp-1.0.1/gl/unistr/u8-cmp2.c0000644000175000017500000000170213124536243012704 00000000000000/* Compare pieces of UTF-8 strings. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ #include /* Specification. */ #include "unistr.h" #include "minmax.h" #define FUNC u8_cmp2 #define UNIT uint8_t #define U_CMP u8_cmp #include "u-cmp2.h" pspp-1.0.1/gl/unistr/u-cmp2.h0000644000175000017500000000202013124536243012613 00000000000000/* Compare pieces of UTF-8/UTF-16/UTF-32 strings. Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 . */ int FUNC (const UNIT *s1, size_t n1, const UNIT *s2, size_t n2) { int cmp = U_CMP (s1, s2, MIN (n1, n2)); if (cmp == 0) { if (n1 < n2) cmp = -1; else if (n1 > n2) cmp = 1; } return cmp; } pspp-1.0.1/gl/mempcpy.c0000644000175000017500000000200213124536242011630 00000000000000/* Copy memory area and return pointer after last written byte. Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ void * mempcpy (void *dest, const void *src, size_t n) { return (char *) memcpy (dest, src, n) + n; } pspp-1.0.1/gl/sys_socket.in.h0000644000175000017500000005532513132510757013000 00000000000000/* Provide a sys/socket header file for systems lacking it (read: MinGW) and for systems where it is incomplete. Copyright (C) 2005-2017 Free Software Foundation, Inc. Written by Simon Josefsson. 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, 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 . */ /* This file is supposed to be used on platforms that lack , on platforms where cannot be included standalone, and on platforms where does not provide all necessary definitions. It is intended to provide definitions and prototypes needed by an application. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H /* Special invocation convention: - On Cygwin 1.5.x we have a sequence of nested includes -> -> -> , and the latter includes . In this situation, the functions are not yet declared, therefore we cannot provide the C++ aliases. */ #@INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_SYS_SOCKET_H #if @HAVE_SYS_SOCKET_H@ # define _GL_ALREADY_INCLUDING_SYS_SOCKET_H /* On many platforms, assumes prior inclusion of . */ # include /* On FreeBSD 6.4, defines some macros that assume that NULL is defined. */ # include /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ # undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H #endif #ifndef _@GUARD_PREFIX@_SYS_SOCKET_H #define _@GUARD_PREFIX@_SYS_SOCKET_H #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_SYS_SOCKET_INLINE # define _GL_SYS_SOCKET_INLINE _GL_INLINE #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #if !@HAVE_SA_FAMILY_T@ # if !GNULIB_defined_sa_family_t /* On OS/2 kLIBC, sa_family_t is unsigned char unless TCPV40HDRS is defined. */ # if !defined __KLIBC__ || defined TCPV40HDRS typedef unsigned short sa_family_t; # else typedef unsigned char sa_family_t; # endif # define GNULIB_defined_sa_family_t 1 # endif #endif #if @HAVE_STRUCT_SOCKADDR_STORAGE@ /* Make the 'struct sockaddr_storage' field 'ss_family' visible on AIX 7.1. */ # if !@HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ # ifndef ss_family # define ss_family __ss_family # endif # endif #else # include /* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */ # define __ss_aligntype unsigned long int # define _SS_SIZE 256 # define _SS_PADSIZE \ (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \ ? sizeof (sa_family_t) \ : alignof (__ss_aligntype)) \ + sizeof (__ss_aligntype))) # if !GNULIB_defined_struct_sockaddr_storage struct sockaddr_storage { sa_family_t ss_family; /* Address family, etc. */ __ss_aligntype __ss_align; /* Force desired alignment. */ char __ss_padding[_SS_PADSIZE]; }; # define GNULIB_defined_struct_sockaddr_storage 1 # endif #endif /* Get struct iovec. */ /* But avoid namespace pollution on glibc systems. */ #if ! defined __GLIBC__ # include #endif #if @HAVE_SYS_SOCKET_H@ /* A platform that has . */ /* For shutdown(). */ # if !defined SHUT_RD # define SHUT_RD 0 # endif # if !defined SHUT_WR # define SHUT_WR 1 # endif # if !defined SHUT_RDWR # define SHUT_RDWR 2 # endif # ifdef __VMS /* OpenVMS */ # ifndef CMSG_SPACE # define CMSG_SPACE(length) _CMSG_SPACE(length) # endif # ifndef CMSG_LEN # define CMSG_LEN(length) _CMSG_LEN(length) # endif # endif #else # ifdef __CYGWIN__ # error "Cygwin does have a sys/socket.h, doesn't it?!?" # endif /* A platform that lacks . Currently only MinGW is supported. See the gnulib manual regarding Windows sockets. MinGW has the header files winsock2.h and ws2tcpip.h that declare the sys/socket.h definitions we need. Note that you can influence which definitions you get by setting the WINVER symbol before including these two files. For example, getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that symbol is set indirectly through WINVER). You can set this by adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your code may not run on older Windows releases then. My Windows 2000 box was not able to run the code, for example. The situation is slightly confusing because suggests that getaddrinfo should be available on all Windows releases. */ # if @HAVE_WINSOCK2_H@ # include # endif # if @HAVE_WS2TCPIP_H@ # include # endif /* For shutdown(). */ # if !defined SHUT_RD && defined SD_RECEIVE # define SHUT_RD SD_RECEIVE # endif # if !defined SHUT_WR && defined SD_SEND # define SHUT_WR SD_SEND # endif # if !defined SHUT_RDWR && defined SD_BOTH # define SHUT_RDWR SD_BOTH # endif # if @HAVE_WINSOCK2_H@ /* Include headers needed by the emulation code. */ # include # include # if !GNULIB_defined_socklen_t typedef int socklen_t; # define GNULIB_defined_socklen_t 1 # endif # endif /* Rudimentary 'struct msghdr'; this works as long as you don't try to access msg_control or msg_controllen. */ struct msghdr { void *msg_name; socklen_t msg_namelen; struct iovec *msg_iov; int msg_iovlen; int msg_flags; }; #endif /* Fix some definitions from . */ #if @HAVE_WINSOCK2_H@ # if !GNULIB_defined_rpl_fd_isset /* Re-define FD_ISSET to avoid a WSA call while we are not using network sockets. */ _GL_SYS_SOCKET_INLINE int rpl_fd_isset (SOCKET fd, fd_set * set) { u_int i; if (set == NULL) return 0; for (i = 0; i < set->fd_count; i++) if (set->fd_array[i] == fd) return 1; return 0; } # define GNULIB_defined_rpl_fd_isset 1 # endif # undef FD_ISSET # define FD_ISSET(fd, set) rpl_fd_isset(fd, set) #endif /* Hide some function declarations from . */ #if @HAVE_WINSOCK2_H@ # if !defined _@GUARD_PREFIX@_UNISTD_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close close_used_without_including_unistd_h # else _GL_WARN_ON_USE (close, "close() used without including "); # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname gethostname_used_without_including_unistd_h # else _GL_WARN_ON_USE (gethostname, "gethostname() used without including "); # endif # endif # if !defined _@GUARD_PREFIX@_SYS_SELECT_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef select # define select select_used_without_including_sys_select_h # else _GL_WARN_ON_USE (select, "select() used without including "); # endif # endif #endif /* Wrap everything else to use libc file descriptors for sockets. */ #if @GNULIB_SOCKET@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef socket # define socket rpl_socket # endif _GL_FUNCDECL_RPL (socket, int, (int domain, int type, int protocol)); _GL_CXXALIAS_RPL (socket, int, (int domain, int type, int protocol)); # else _GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol)); # endif _GL_CXXALIASWARN (socket); #elif @HAVE_WINSOCK2_H@ # undef socket # define socket socket_used_without_requesting_gnulib_module_socket #elif defined GNULIB_POSIXCHECK # undef socket # if HAVE_RAW_DECL_SOCKET _GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - " "use gnulib module socket for portability"); # endif #endif #if @GNULIB_CONNECT@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef connect # define connect rpl_connect # endif _GL_FUNCDECL_RPL (connect, int, (int fd, const struct sockaddr *addr, socklen_t addrlen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (connect, int, (int fd, const struct sockaddr *addr, socklen_t addrlen)); # else /* Need to cast, because on NonStop Kernel, the third parameter is size_t addrlen. */ _GL_CXXALIAS_SYS_CAST (connect, int, (int fd, const struct sockaddr *addr, socklen_t addrlen)); # endif _GL_CXXALIASWARN (connect); #elif @HAVE_WINSOCK2_H@ # undef connect # define connect socket_used_without_requesting_gnulib_module_connect #elif defined GNULIB_POSIXCHECK # undef connect # if HAVE_RAW_DECL_CONNECT _GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - " "use gnulib module connect for portability"); # endif #endif #if @GNULIB_ACCEPT@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef accept # define accept rpl_accept # endif _GL_FUNCDECL_RPL (accept, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); _GL_CXXALIAS_RPL (accept, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # else /* Need to cast, because on Solaris 10 systems, the third parameter is void *addrlen. */ _GL_CXXALIAS_SYS_CAST (accept, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # endif _GL_CXXALIASWARN (accept); #elif @HAVE_WINSOCK2_H@ # undef accept # define accept accept_used_without_requesting_gnulib_module_accept #elif defined GNULIB_POSIXCHECK # undef accept # if HAVE_RAW_DECL_ACCEPT _GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - " "use gnulib module accept for portability"); # endif #endif #if @GNULIB_BIND@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef bind # define bind rpl_bind # endif _GL_FUNCDECL_RPL (bind, int, (int fd, const struct sockaddr *addr, socklen_t addrlen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (bind, int, (int fd, const struct sockaddr *addr, socklen_t addrlen)); # else /* Need to cast, because on NonStop Kernel, the third parameter is size_t addrlen. */ _GL_CXXALIAS_SYS_CAST (bind, int, (int fd, const struct sockaddr *addr, socklen_t addrlen)); # endif _GL_CXXALIASWARN (bind); #elif @HAVE_WINSOCK2_H@ # undef bind # define bind bind_used_without_requesting_gnulib_module_bind #elif defined GNULIB_POSIXCHECK # undef bind # if HAVE_RAW_DECL_BIND _GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - " "use gnulib module bind for portability"); # endif #endif #if @GNULIB_GETPEERNAME@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getpeername # define getpeername rpl_getpeername # endif _GL_FUNCDECL_RPL (getpeername, int, (int fd, struct sockaddr *addr, socklen_t *addrlen) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (getpeername, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # else /* Need to cast, because on Solaris 10 systems, the third parameter is void *addrlen. */ _GL_CXXALIAS_SYS_CAST (getpeername, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # endif _GL_CXXALIASWARN (getpeername); #elif @HAVE_WINSOCK2_H@ # undef getpeername # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername #elif defined GNULIB_POSIXCHECK # undef getpeername # if HAVE_RAW_DECL_GETPEERNAME _GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - " "use gnulib module getpeername for portability"); # endif #endif #if @GNULIB_GETSOCKNAME@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getsockname # define getsockname rpl_getsockname # endif _GL_FUNCDECL_RPL (getsockname, int, (int fd, struct sockaddr *addr, socklen_t *addrlen) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (getsockname, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # else /* Need to cast, because on Solaris 10 systems, the third parameter is void *addrlen. */ _GL_CXXALIAS_SYS_CAST (getsockname, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # endif _GL_CXXALIASWARN (getsockname); #elif @HAVE_WINSOCK2_H@ # undef getsockname # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname #elif defined GNULIB_POSIXCHECK # undef getsockname # if HAVE_RAW_DECL_GETSOCKNAME _GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - " "use gnulib module getsockname for portability"); # endif #endif #if @GNULIB_GETSOCKOPT@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getsockopt # define getsockopt rpl_getsockopt # endif _GL_FUNCDECL_RPL (getsockopt, int, (int fd, int level, int optname, void *optval, socklen_t *optlen) _GL_ARG_NONNULL ((4, 5))); _GL_CXXALIAS_RPL (getsockopt, int, (int fd, int level, int optname, void *optval, socklen_t *optlen)); # else /* Need to cast, because on Solaris 10 systems, the fifth parameter is void *optlen. */ _GL_CXXALIAS_SYS_CAST (getsockopt, int, (int fd, int level, int optname, void *optval, socklen_t *optlen)); # endif _GL_CXXALIASWARN (getsockopt); #elif @HAVE_WINSOCK2_H@ # undef getsockopt # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt #elif defined GNULIB_POSIXCHECK # undef getsockopt # if HAVE_RAW_DECL_GETSOCKOPT _GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - " "use gnulib module getsockopt for portability"); # endif #endif #if @GNULIB_LISTEN@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef listen # define listen rpl_listen # endif _GL_FUNCDECL_RPL (listen, int, (int fd, int backlog)); _GL_CXXALIAS_RPL (listen, int, (int fd, int backlog)); # else _GL_CXXALIAS_SYS (listen, int, (int fd, int backlog)); # endif _GL_CXXALIASWARN (listen); #elif @HAVE_WINSOCK2_H@ # undef listen # define listen listen_used_without_requesting_gnulib_module_listen #elif defined GNULIB_POSIXCHECK # undef listen # if HAVE_RAW_DECL_LISTEN _GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - " "use gnulib module listen for portability"); # endif #endif #if @GNULIB_RECV@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef recv # define recv rpl_recv # endif _GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); # else _GL_CXXALIAS_SYS (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); # endif _GL_CXXALIASWARN (recv); #elif @HAVE_WINSOCK2_H@ # undef recv # define recv recv_used_without_requesting_gnulib_module_recv #elif defined GNULIB_POSIXCHECK # undef recv # if HAVE_RAW_DECL_RECV _GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - " "use gnulib module recv for portability"); # endif #endif #if @GNULIB_SEND@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef send # define send rpl_send # endif _GL_FUNCDECL_RPL (send, ssize_t, (int fd, const void *buf, size_t len, int flags) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (send, ssize_t, (int fd, const void *buf, size_t len, int flags)); # else _GL_CXXALIAS_SYS (send, ssize_t, (int fd, const void *buf, size_t len, int flags)); # endif _GL_CXXALIASWARN (send); #elif @HAVE_WINSOCK2_H@ # undef send # define send send_used_without_requesting_gnulib_module_send #elif defined GNULIB_POSIXCHECK # undef send # if HAVE_RAW_DECL_SEND _GL_WARN_ON_USE (send, "send is not always POSIX compliant - " "use gnulib module send for portability"); # endif #endif #if @GNULIB_RECVFROM@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef recvfrom # define recvfrom rpl_recvfrom # endif _GL_FUNCDECL_RPL (recvfrom, ssize_t, (int fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (recvfrom, ssize_t, (int fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)); # else /* Need to cast, because on Solaris 10 systems, the sixth parameter is void *fromlen. */ _GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t, (int fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)); # endif _GL_CXXALIASWARN (recvfrom); #elif @HAVE_WINSOCK2_H@ # undef recvfrom # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom #elif defined GNULIB_POSIXCHECK # undef recvfrom # if HAVE_RAW_DECL_RECVFROM _GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - " "use gnulib module recvfrom for portability"); # endif #endif #if @GNULIB_SENDTO@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sendto # define sendto rpl_sendto # endif _GL_FUNCDECL_RPL (sendto, ssize_t, (int fd, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (sendto, ssize_t, (int fd, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)); # else /* Need to cast, because on NonStop Kernel, the sixth parameter is size_t tolen. */ _GL_CXXALIAS_SYS_CAST (sendto, ssize_t, (int fd, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)); # endif _GL_CXXALIASWARN (sendto); #elif @HAVE_WINSOCK2_H@ # undef sendto # define sendto sendto_used_without_requesting_gnulib_module_sendto #elif defined GNULIB_POSIXCHECK # undef sendto # if HAVE_RAW_DECL_SENDTO _GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - " "use gnulib module sendto for portability"); # endif #endif #if @GNULIB_SETSOCKOPT@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setsockopt # define setsockopt rpl_setsockopt # endif _GL_FUNCDECL_RPL (setsockopt, int, (int fd, int level, int optname, const void * optval, socklen_t optlen) _GL_ARG_NONNULL ((4))); _GL_CXXALIAS_RPL (setsockopt, int, (int fd, int level, int optname, const void * optval, socklen_t optlen)); # else /* Need to cast, because on NonStop Kernel, the fifth parameter is size_t optlen. */ _GL_CXXALIAS_SYS_CAST (setsockopt, int, (int fd, int level, int optname, const void * optval, socklen_t optlen)); # endif _GL_CXXALIASWARN (setsockopt); #elif @HAVE_WINSOCK2_H@ # undef setsockopt # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt #elif defined GNULIB_POSIXCHECK # undef setsockopt # if HAVE_RAW_DECL_SETSOCKOPT _GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - " "use gnulib module setsockopt for portability"); # endif #endif #if @GNULIB_SHUTDOWN@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef shutdown # define shutdown rpl_shutdown # endif _GL_FUNCDECL_RPL (shutdown, int, (int fd, int how)); _GL_CXXALIAS_RPL (shutdown, int, (int fd, int how)); # else _GL_CXXALIAS_SYS (shutdown, int, (int fd, int how)); # endif _GL_CXXALIASWARN (shutdown); #elif @HAVE_WINSOCK2_H@ # undef shutdown # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown #elif defined GNULIB_POSIXCHECK # undef shutdown # if HAVE_RAW_DECL_SHUTDOWN _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - " "use gnulib module shutdown for portability"); # endif #endif #if @GNULIB_ACCEPT4@ /* Accept a connection on a socket, with specific opening flags. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). See also the Linux man page at . */ # if @HAVE_ACCEPT4@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define accept4 rpl_accept4 # endif _GL_FUNCDECL_RPL (accept4, int, (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)); _GL_CXXALIAS_RPL (accept4, int, (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)); # else _GL_FUNCDECL_SYS (accept4, int, (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)); _GL_CXXALIAS_SYS (accept4, int, (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)); # endif _GL_CXXALIASWARN (accept4); #elif defined GNULIB_POSIXCHECK # undef accept4 # if HAVE_RAW_DECL_ACCEPT4 _GL_WARN_ON_USE (accept4, "accept4 is unportable - " "use gnulib module accept4 for portability"); # endif #endif _GL_INLINE_HEADER_END #endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */ #endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */ #endif pspp-1.0.1/gl/memrchr.c0000644000175000017500000001310113124536242011615 00000000000000/* memrchr -- find the last occurrence of a byte in a memory block Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2017 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and commentary by Jim Blandy (jimb@ai.mit.edu); adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), and implemented by Roland McGrath (roland@ai.mit.edu). 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 . */ #if defined _LIBC # include #else # include # define reg_char char #endif #include #include #undef __memrchr #ifdef _LIBC # undef memrchr #endif #ifndef weak_alias # define __memrchr memrchr #endif /* Search no more than N bytes of S for C. */ void * __memrchr (void const *s, int c_in, size_t n) { /* On 32-bit hardware, choosing longword to be a 32-bit unsigned long instead of a 64-bit uintmax_t tends to give better performance. On 64-bit hardware, unsigned long is generally 64 bits already. Change this typedef to experiment with performance. */ typedef unsigned long int longword; const unsigned char *char_ptr; const longword *longword_ptr; longword repeated_one; longword repeated_c; unsigned reg_char c; c = (unsigned char) c_in; /* Handle the last few bytes by reading one byte at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ for (char_ptr = (const unsigned char *) s + n; n > 0 && (size_t) char_ptr % sizeof (longword) != 0; --n) if (*--char_ptr == c) return (void *) char_ptr; longword_ptr = (const longword *) char_ptr; /* All these elucidatory comments refer to 4-byte longwords, but the theory applies equally well to any size longwords. */ /* Compute auxiliary longword values: repeated_one is a value which has a 1 in every byte. repeated_c has c in every byte. */ repeated_one = 0x01010101; repeated_c = c | (c << 8); repeated_c |= repeated_c << 16; if (0xffffffffU < (longword) -1) { repeated_one |= repeated_one << 31 << 1; repeated_c |= repeated_c << 31 << 1; if (8 < sizeof (longword)) { size_t i; for (i = 64; i < sizeof (longword) * 8; i *= 2) { repeated_one |= repeated_one << i; repeated_c |= repeated_c << i; } } } /* Instead of the traditional loop which tests each byte, we will test a longword at a time. The tricky part is testing if *any of the four* bytes in the longword in question are equal to c. We first use an xor with repeated_c. This reduces the task to testing whether *any of the four* bytes in longword1 is zero. We compute tmp = ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). That is, we perform the following operations: 1. Subtract repeated_one. 2. & ~longword1. 3. & a mask consisting of 0x80 in every byte. Consider what happens in each byte: - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, and step 3 transforms it into 0x80. A carry can also be propagated to more significant bytes. - If a byte of longword1 is nonzero, let its lowest 1 bit be at position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, the byte ends in a single bit of value 0 and k bits of value 1. After step 2, the result is just k bits of value 1: 2^k - 1. After step 3, the result is 0. And no carry is produced. So, if longword1 has only non-zero bytes, tmp is zero. Whereas if longword1 has a zero byte, call j the position of the least significant zero byte. Then the result has a zero at positions 0, ..., j-1 and a 0x80 at position j. We cannot predict the result at the more significant bytes (positions j+1..3), but it does not matter since we already have a non-zero bit at position 8*j+7. So, the test whether any byte in longword1 is zero is equivalent to testing whether tmp is nonzero. */ while (n >= sizeof (longword)) { longword longword1 = *--longword_ptr ^ repeated_c; if ((((longword1 - repeated_one) & ~longword1) & (repeated_one << 7)) != 0) { longword_ptr++; break; } n -= sizeof (longword); } char_ptr = (const unsigned char *) longword_ptr; /* At this point, we know that either n < sizeof (longword), or one of the sizeof (longword) bytes starting at char_ptr is == c. On little-endian machines, we could determine the first such byte without any further memory accesses, just by looking at the tmp result from the last loop iteration. But this does not work on big-endian machines. Choose code that works in both cases. */ while (n-- > 0) { if (*--char_ptr == c) return (void *) char_ptr; } return NULL; } #ifdef weak_alias weak_alias (__memrchr, memrchr) #endif pspp-1.0.1/gl/filename.h0000644000175000017500000000365213124536241011756 00000000000000/* Basic filename support macros. Copyright (C) 2001-2004, 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _FILENAME_H #define _FILENAME_H #ifdef __cplusplus extern "C" { #endif /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, it may be concatenated to a directory pathname. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) # define IS_PATH_WITH_DIR(P) \ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) #else /* Unix */ # define ISSLASH(C) ((C) == '/') # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) # define FILE_SYSTEM_PREFIX_LEN(P) 0 #endif #ifdef __cplusplus } #endif #endif /* _FILENAME_H */ pspp-1.0.1/gl/xstrndup.c0000644000175000017500000000224513124536243012057 00000000000000/* Duplicate a bounded initial segment of a string, with out-of-memory checking. Copyright (C) 2003, 2006-2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include "xstrndup.h" #include #include "xalloc.h" /* Return a newly allocated copy of at most N bytes of STRING. In other words, return a copy of the initial segment of length N of STRING. */ char * xstrndup (const char *string, size_t n) { char *s = strndup (string, n); if (! s) xalloc_die (); return s; } pspp-1.0.1/gl/select.c0000644000175000017500000003771013124536243011454 00000000000000/* Emulation for select(2) Contributed by Paolo Bonzini. Copyright 2008-2017 Free Software Foundation, Inc. This file is part of gnulib. 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, 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 . */ #include #include #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Windows. */ #include #include #include #include #include #include #include #include #include /* Get the overridden 'struct timeval'. */ #include #if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" #else # include #endif #undef select struct bitset { unsigned char in[FD_SETSIZE / CHAR_BIT]; unsigned char out[FD_SETSIZE / CHAR_BIT]; }; /* Declare data structures for ntdll functions. */ typedef struct _FILE_PIPE_LOCAL_INFORMATION { ULONG NamedPipeType; ULONG NamedPipeConfiguration; ULONG MaximumInstances; ULONG CurrentInstances; ULONG InboundQuota; ULONG ReadDataAvailable; ULONG OutboundQuota; ULONG WriteQuotaAvailable; ULONG NamedPipeState; ULONG NamedPipeEnd; } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION; typedef struct _IO_STATUS_BLOCK { union { DWORD Status; PVOID Pointer; } u; ULONG_PTR Information; } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; typedef enum _FILE_INFORMATION_CLASS { FilePipeLocalInformation = 24 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; typedef DWORD (WINAPI *PNtQueryInformationFile) (HANDLE, IO_STATUS_BLOCK *, VOID *, ULONG, FILE_INFORMATION_CLASS); #ifndef PIPE_BUF #define PIPE_BUF 512 #endif static BOOL IsConsoleHandle (HANDLE h) { DWORD mode; return GetConsoleMode (h, &mode) != 0; } static BOOL IsSocketHandle (HANDLE h) { WSANETWORKEVENTS ev; if (IsConsoleHandle (h)) return FALSE; /* Under Wine, it seems that getsockopt returns 0 for pipes too. WSAEnumNetworkEvents instead distinguishes the two correctly. */ ev.lNetworkEvents = 0xDEADBEEF; WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev); return ev.lNetworkEvents != 0xDEADBEEF; } /* Compute output fd_sets for libc descriptor FD (whose Windows handle is H). */ static int windows_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset *wbits, struct bitset *xbits) { BOOL read, write, except; int i, ret; INPUT_RECORD *irbuffer; DWORD avail, nbuffer; BOOL bRet; IO_STATUS_BLOCK iosb; FILE_PIPE_LOCAL_INFORMATION fpli; static PNtQueryInformationFile NtQueryInformationFile; static BOOL once_only; read = write = except = FALSE; switch (GetFileType (h)) { case FILE_TYPE_DISK: read = TRUE; write = TRUE; break; case FILE_TYPE_PIPE: if (!once_only) { NtQueryInformationFile = (PNtQueryInformationFile) GetProcAddress (GetModuleHandle ("ntdll.dll"), "NtQueryInformationFile"); once_only = TRUE; } if (PeekNamedPipe (h, NULL, 0, NULL, &avail, NULL) != 0) { if (avail) read = TRUE; } else if (GetLastError () == ERROR_BROKEN_PIPE) ; else { /* It was the write-end of the pipe. Check if it is writable. If NtQueryInformationFile fails, optimistically assume the pipe is writable. This could happen on Windows 9x, where NtQueryInformationFile is not available, or if we inherit a pipe that doesn't permit FILE_READ_ATTRIBUTES access on the write end (I think this should not happen since Windows XP SP2; WINE seems fine too). Otherwise, ensure that enough space is available for atomic writes. */ memset (&iosb, 0, sizeof (iosb)); memset (&fpli, 0, sizeof (fpli)); if (!NtQueryInformationFile || NtQueryInformationFile (h, &iosb, &fpli, sizeof (fpli), FilePipeLocalInformation) || fpli.WriteQuotaAvailable >= PIPE_BUF || (fpli.OutboundQuota < PIPE_BUF && fpli.WriteQuotaAvailable == fpli.OutboundQuota)) write = TRUE; } break; case FILE_TYPE_CHAR: write = TRUE; if (!(rbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) break; ret = WaitForSingleObject (h, 0); if (ret == WAIT_OBJECT_0) { if (!IsConsoleHandle (h)) { read = TRUE; break; } nbuffer = avail = 0; bRet = GetNumberOfConsoleInputEvents (h, &nbuffer); /* Screen buffers handles are filtered earlier. */ assert (bRet); if (nbuffer == 0) { except = TRUE; break; } irbuffer = (INPUT_RECORD *) alloca (nbuffer * sizeof (INPUT_RECORD)); bRet = PeekConsoleInput (h, irbuffer, nbuffer, &avail); if (!bRet || avail == 0) { except = TRUE; break; } for (i = 0; i < avail; i++) if (irbuffer[i].EventType == KEY_EVENT) read = TRUE; } break; default: ret = WaitForSingleObject (h, 0); write = TRUE; if (ret == WAIT_OBJECT_0) read = TRUE; break; } ret = 0; if (read && (rbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) { rbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); ret++; } if (write && (wbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) { wbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); ret++; } if (except && (xbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) { xbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); ret++; } return ret; } int rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, struct timeval *timeout) #undef timeval { static struct timeval tv0; static HANDLE hEvent; HANDLE h, handle_array[FD_SETSIZE + 2]; fd_set handle_rfds, handle_wfds, handle_xfds; struct bitset rbits, wbits, xbits; unsigned char anyfds_in[FD_SETSIZE / CHAR_BIT]; DWORD ret, wait_timeout, nhandles, nsock, nbuffer; MSG msg; int i, fd, rc; clock_t tend; if (nfds > FD_SETSIZE) nfds = FD_SETSIZE; if (!timeout) wait_timeout = INFINITE; else { wait_timeout = timeout->tv_sec * 1000 + timeout->tv_usec / 1000; /* select is also used as a portable usleep. */ if (!rfds && !wfds && !xfds) { Sleep (wait_timeout); return 0; } } if (!hEvent) hEvent = CreateEvent (NULL, FALSE, FALSE, NULL); handle_array[0] = hEvent; nhandles = 1; nsock = 0; /* Copy descriptors to bitsets. At the same time, eliminate bits in the "wrong" direction for console input buffers and screen buffers, because screen buffers are waitable and they will block until a character is available. */ memset (&rbits, 0, sizeof (rbits)); memset (&wbits, 0, sizeof (wbits)); memset (&xbits, 0, sizeof (xbits)); memset (anyfds_in, 0, sizeof (anyfds_in)); if (rfds) for (i = 0; i < rfds->fd_count; i++) { fd = rfds->fd_array[i]; h = (HANDLE) _get_osfhandle (fd); if (IsConsoleHandle (h) && !GetNumberOfConsoleInputEvents (h, &nbuffer)) continue; rbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); } else rfds = (fd_set *) alloca (sizeof (fd_set)); if (wfds) for (i = 0; i < wfds->fd_count; i++) { fd = wfds->fd_array[i]; h = (HANDLE) _get_osfhandle (fd); if (IsConsoleHandle (h) && GetNumberOfConsoleInputEvents (h, &nbuffer)) continue; wbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); } else wfds = (fd_set *) alloca (sizeof (fd_set)); if (xfds) for (i = 0; i < xfds->fd_count; i++) { fd = xfds->fd_array[i]; xbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); } else xfds = (fd_set *) alloca (sizeof (fd_set)); /* Zero all the fd_sets, including the application's. */ FD_ZERO (rfds); FD_ZERO (wfds); FD_ZERO (xfds); FD_ZERO (&handle_rfds); FD_ZERO (&handle_wfds); FD_ZERO (&handle_xfds); /* Classify handles. Create fd sets for sockets, poll the others. */ for (i = 0; i < nfds; i++) { if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) continue; h = (HANDLE) _get_osfhandle (i); if (!h) { errno = EBADF; return -1; } if (IsSocketHandle (h)) { int requested = FD_CLOSE; /* See above; socket handles are mapped onto select, but we need to map descriptors to handles. */ if (rbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { requested |= FD_READ | FD_ACCEPT; FD_SET ((SOCKET) h, rfds); FD_SET ((SOCKET) h, &handle_rfds); } if (wbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { requested |= FD_WRITE | FD_CONNECT; FD_SET ((SOCKET) h, wfds); FD_SET ((SOCKET) h, &handle_wfds); } if (xbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { requested |= FD_OOB; FD_SET ((SOCKET) h, xfds); FD_SET ((SOCKET) h, &handle_xfds); } WSAEventSelect ((SOCKET) h, hEvent, requested); nsock++; } else { handle_array[nhandles++] = h; /* Poll now. If we get an event, do not wait below. */ if (wait_timeout != 0 && windows_poll_handle (h, i, &rbits, &wbits, &xbits)) wait_timeout = 0; } } /* Place a sentinel at the end of the array. */ handle_array[nhandles] = NULL; /* When will the waiting period expire? */ if (wait_timeout != INFINITE) tend = clock () + wait_timeout; restart: if (wait_timeout == 0 || nsock == 0) rc = 0; else { /* See if we need to wait in the loop below. If any select is ready, do MsgWaitForMultipleObjects anyway to dispatch messages, but no need to call select again. */ rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0); if (rc == 0) { /* Restore the fd_sets for the other select we do below. */ memcpy (&handle_rfds, rfds, sizeof (fd_set)); memcpy (&handle_wfds, wfds, sizeof (fd_set)); memcpy (&handle_xfds, xfds, sizeof (fd_set)); } else wait_timeout = 0; } /* How much is left to wait? */ if (wait_timeout != INFINITE) { clock_t tnow = clock (); if (tend >= tnow) wait_timeout = tend - tnow; else wait_timeout = 0; } for (;;) { ret = MsgWaitForMultipleObjects (nhandles, handle_array, FALSE, wait_timeout, QS_ALLINPUT); if (ret == WAIT_OBJECT_0 + nhandles) { /* new input of some other kind */ BOOL bRet; while ((bRet = PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) != 0) { TranslateMessage (&msg); DispatchMessage (&msg); } } else break; } /* If we haven't done it yet, check the status of the sockets. */ if (rc == 0 && nsock > 0) rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0); if (nhandles > 1) { /* Count results that are not counted in the return value of select. */ nhandles = 1; for (i = 0; i < nfds; i++) { if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) continue; h = (HANDLE) _get_osfhandle (i); if (h == handle_array[nhandles]) { /* Not a socket. */ nhandles++; windows_poll_handle (h, i, &rbits, &wbits, &xbits); if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))) || wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))) || xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) rc++; } } if (rc == 0 && (wait_timeout == INFINITE /* If NHANDLES > 1, but no bits are set, it means we've been told incorrectly that some handle was signaled. This happens with anonymous pipes, which always cause MsgWaitForMultipleObjects to exit immediately, but no data is found ready to be read by windows_poll_handle. To avoid a total failure (whereby we return zero and don't wait at all), let's poll in a more busy loop. */ || (wait_timeout != 0 && nhandles > 1))) { /* Sleep 1 millisecond to avoid busy wait and retry with the original fd_sets. */ memcpy (&handle_rfds, rfds, sizeof (fd_set)); memcpy (&handle_wfds, wfds, sizeof (fd_set)); memcpy (&handle_xfds, xfds, sizeof (fd_set)); SleepEx (1, TRUE); goto restart; } if (timeout && wait_timeout == 0 && rc == 0) timeout->tv_sec = timeout->tv_usec = 0; } /* Now fill in the results. */ FD_ZERO (rfds); FD_ZERO (wfds); FD_ZERO (xfds); nhandles = 1; for (i = 0; i < nfds; i++) { if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) continue; h = (HANDLE) _get_osfhandle (i); if (h != handle_array[nhandles]) { /* Perform handle->descriptor mapping. */ WSAEventSelect ((SOCKET) h, NULL, 0); if (FD_ISSET (h, &handle_rfds)) FD_SET (i, rfds); if (FD_ISSET (h, &handle_wfds)) FD_SET (i, wfds); if (FD_ISSET (h, &handle_xfds)) FD_SET (i, xfds); } else { /* Not a socket. */ nhandles++; if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) FD_SET (i, rfds); if (wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) FD_SET (i, wfds); if (xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) FD_SET (i, xfds); } } return rc; } #else /* ! Native Windows. */ #include #include /* NULL */ #include #include #undef select int rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, struct timeval *timeout) { int i; /* FreeBSD 8.2 has a bug: it does not always detect invalid fds. */ if (nfds < 0 || nfds > FD_SETSIZE) { errno = EINVAL; return -1; } for (i = 0; i < nfds; i++) { if (((rfds && FD_ISSET (i, rfds)) || (wfds && FD_ISSET (i, wfds)) || (xfds && FD_ISSET (i, xfds))) && dup2 (i, i) != i) return -1; } /* Interix 3.5 has a bug: it does not support nfds == 0. */ if (nfds == 0) { nfds = 1; rfds = NULL; wfds = NULL; xfds = NULL; } return select (nfds, rfds, wfds, xfds, timeout); } #endif pspp-1.0.1/gl/sig-handler.h0000644000175000017500000000357713124536243012403 00000000000000/* Convenience declarations when working with . Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _GL_SIG_HANDLER_H #define _GL_SIG_HANDLER_H #include #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef SIG_HANDLER_INLINE # define SIG_HANDLER_INLINE _GL_INLINE #endif /* Convenience type when working with signal handlers. */ typedef void (*sa_handler_t) (int); /* Return the handler of a signal, as a sa_handler_t value regardless of its true type. The resulting function can be compared to special values like SIG_IGN but it is not portable to call it. */ SIG_HANDLER_INLINE sa_handler_t _GL_ATTRIBUTE_PURE get_handler (struct sigaction const *a) { #ifdef SA_SIGINFO /* POSIX says that special values like SIG_IGN can only occur when action.sa_flags does not contain SA_SIGINFO. But in Linux 2.4, for example, sa_sigaction and sa_handler are aliases and a signal is ignored if sa_sigaction (after casting) equals SIG_IGN. So use (and cast) sa_sigaction in that case. */ if (a->sa_flags & SA_SIGINFO) return (sa_handler_t) a->sa_sigaction; #endif return a->sa_handler; } _GL_INLINE_HEADER_END #endif /* _GL_SIG_HANDLER_H */ pspp-1.0.1/gl/c-strcasecmp.c0000644000175000017500000000304413124536241012550 00000000000000/* c-strcasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 2005-2006, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include "c-strcase.h" #include #include "c-ctype.h" int c_strcasecmp (const char *s1, const char *s2) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2) return 0; do { c1 = c_tolower (*p1); c2 = c_tolower (*p2); if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } pspp-1.0.1/gl/getopt-pfx-ext.h0000644000175000017500000000532313124536241013066 00000000000000/* getopt (GNU extensions) gnulib wrapper header. Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. gnulib is free software; you can 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. gnulib is distributed in the hope that 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 gnulib; if not, see . */ #ifndef _GETOPT_PFX_EXT_H #define _GETOPT_PFX_EXT_H 1 /* This header should not be used directly; include getopt.h instead. It does not have a protective #error, because the guard macro for getopt.h in gnulib is not fixed. */ /* Standalone applications should #define __GETOPT_PREFIX to an identifier that prefixes the external functions and variables defined in getopt-core.h and getopt-ext.h. Systematically rename identifiers so that they do not collide with the system functions and variables. Renaming avoids problems with some compilers and linkers. */ #ifdef __GETOPT_PREFIX # ifndef __GETOPT_ID # define __GETOPT_CONCAT(x, y) x ## y # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) # endif # undef getopt_long # undef getopt_long_only # undef option # undef _getopt_internal # define getopt_long __GETOPT_ID (getopt_long) # define getopt_long_only __GETOPT_ID (getopt_long_only) # define option __GETOPT_ID (option) # define _getopt_internal __GETOPT_ID (getopt_internal) /* The system's getopt.h may have already included getopt-ext.h to declare the unprefixed identifiers. Undef _GETOPT_EXT_H so that getopt-ext.h declares them with prefixes. */ # undef _GETOPT_EXT_H #endif /* Standalone applications get correct prototypes for getopt_long and getopt_long_only; they declare "char **argv". For backward compatibility with old applications, if __GETOPT_PREFIX is not defined, we supply GNU-libc-compatible, but incorrect, prototypes using "char *const *argv". (GNU libc is stuck with the incorrect prototypes, as they are baked into older versions of LSB.) */ #ifndef __getopt_argv_const # if defined __GETOPT_PREFIX # define __getopt_argv_const /* empty */ # else # define __getopt_argv_const const # endif #endif #include #endif /* _GETOPT_PFX_EXT_H */ pspp-1.0.1/gl/glthread/0000755000175000017500000000000013150620333011664 500000000000000pspp-1.0.1/gl/glthread/threadlib.c0000644000175000017500000000353613124536242013723 00000000000000/* Multithreading primitives. Copyright (C) 2005-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Bruno Haible , 2005. */ #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # include # if PTHREAD_IN_USE_DETECTION_HARD /* The function to be executed by a dummy thread. */ static void * dummy_thread_func (void *arg) { return arg; } int glthread_in_use (void) { static int tested; static int result; /* 1: linked with -lpthread, 0: only with libc */ if (!tested) { pthread_t thread; if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0) /* Thread creation failed. */ result = 0; else { /* Thread creation works. */ void *retval; if (pthread_join (thread, &retval) != 0) abort (); result = 1; } tested = 1; } return result; } # endif #endif /* ========================================================================= */ /* This declaration is solely to ensure that after preprocessing this file is never empty. */ typedef int dummy; pspp-1.0.1/gl/glthread/lock.h0000644000175000017500000011345713124536242012726 00000000000000/* Locking in multithreaded situations. Copyright (C) 2005-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ /* This file contains locking primitives for use with a given thread library. It does not contain primitives for creating threads or for other synchronization primitives. Normal (non-recursive) locks: Type: gl_lock_t Declaration: gl_lock_define(extern, name) Initializer: gl_lock_define_initialized(, name) Initialization: gl_lock_init (name); Taking the lock: gl_lock_lock (name); Releasing the lock: gl_lock_unlock (name); De-initialization: gl_lock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_lock_init (&name); Taking the lock: err = glthread_lock_lock (&name); Releasing the lock: err = glthread_lock_unlock (&name); De-initialization: err = glthread_lock_destroy (&name); Read-Write (non-recursive) locks: Type: gl_rwlock_t Declaration: gl_rwlock_define(extern, name) Initializer: gl_rwlock_define_initialized(, name) Initialization: gl_rwlock_init (name); Taking the lock: gl_rwlock_rdlock (name); gl_rwlock_wrlock (name); Releasing the lock: gl_rwlock_unlock (name); De-initialization: gl_rwlock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_rwlock_init (&name); Taking the lock: err = glthread_rwlock_rdlock (&name); err = glthread_rwlock_wrlock (&name); Releasing the lock: err = glthread_rwlock_unlock (&name); De-initialization: err = glthread_rwlock_destroy (&name); Recursive locks: Type: gl_recursive_lock_t Declaration: gl_recursive_lock_define(extern, name) Initializer: gl_recursive_lock_define_initialized(, name) Initialization: gl_recursive_lock_init (name); Taking the lock: gl_recursive_lock_lock (name); Releasing the lock: gl_recursive_lock_unlock (name); De-initialization: gl_recursive_lock_destroy (name); Equivalent functions with control of error handling: Initialization: err = glthread_recursive_lock_init (&name); Taking the lock: err = glthread_recursive_lock_lock (&name); Releasing the lock: err = glthread_recursive_lock_unlock (&name); De-initialization: err = glthread_recursive_lock_destroy (&name); Once-only execution: Type: gl_once_t Initializer: gl_once_define(extern, name) Execution: gl_once (name, initfunction); Equivalent functions with control of error handling: Execution: err = glthread_once (&name, initfunction); */ #ifndef _LOCK_H #define _LOCK_H #include #include /* ========================================================================= */ #if USE_POSIX_THREADS /* Use the POSIX threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ # define pthread_in_use() \ glthread_in_use () extern int glthread_in_use (void); # endif # if USE_POSIX_THREADS_WEAK /* Use weak references to the POSIX threads library. */ /* Weak references avoid dragging in external libraries if the other parts of the program don't use them. Here we use them, because we don't want every program that uses libintl to depend on libpthread. This assumes that libpthread would not be loaded after libintl; i.e. if libintl is loaded first, by an executable that does not depend on libpthread, and then a module is dynamically loaded that depends on libpthread, libintl will not be multithread-safe. */ /* The way to test at runtime whether libpthread is present is to test whether a function pointer's value, such as &pthread_mutex_init, is non-NULL. However, some versions of GCC have a bug through which, in PIC mode, &foo != NULL always evaluates to true if there is a direct call to foo(...) in the same function. To avoid this, we test the address of a function in libpthread that we don't use. */ # pragma weak pthread_mutex_init # pragma weak pthread_mutex_lock # pragma weak pthread_mutex_unlock # pragma weak pthread_mutex_destroy # pragma weak pthread_rwlock_init # pragma weak pthread_rwlock_rdlock # pragma weak pthread_rwlock_wrlock # pragma weak pthread_rwlock_unlock # pragma weak pthread_rwlock_destroy # pragma weak pthread_once # pragma weak pthread_cond_init # pragma weak pthread_cond_wait # pragma weak pthread_cond_signal # pragma weak pthread_cond_broadcast # pragma weak pthread_cond_destroy # pragma weak pthread_mutexattr_init # pragma weak pthread_mutexattr_settype # pragma weak pthread_mutexattr_destroy # pragma weak pthread_rwlockattr_init # if __GNU_LIBRARY__ > 1 # pragma weak pthread_rwlockattr_setkind_np # endif # pragma weak pthread_rwlockattr_destroy # ifndef pthread_self # pragma weak pthread_self # endif # if !PTHREAD_IN_USE_DETECTION_HARD # pragma weak pthread_cancel # define pthread_in_use() (pthread_cancel != NULL) # endif # else # if !PTHREAD_IN_USE_DETECTION_HARD # define pthread_in_use() 1 # endif # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef pthread_mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ PTHREAD_MUTEX_INITIALIZER # define glthread_lock_init(LOCK) \ (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0) # define glthread_lock_lock(LOCK) \ (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) # define glthread_lock_unlock(LOCK) \ (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) # define glthread_lock_destroy(LOCK) \ (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1))) # ifdef PTHREAD_RWLOCK_INITIALIZER typedef pthread_rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; # if HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER # define gl_rwlock_initializer \ PTHREAD_RWLOCK_INITIALIZER # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) # else /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */ # define gl_rwlock_initializer \ PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? glthread_rwlock_init_for_glibc (LOCK) : 0) extern int glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock); # endif # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0) # else typedef struct { int initialized; pthread_mutex_t guard; /* protects the initialization */ pthread_rwlock_t rwlock; /* read-write lock */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { 0, PTHREAD_MUTEX_INITIALIZER } # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); # endif # else typedef struct { pthread_mutex_t lock; /* protects the remaining fields */ pthread_cond_t waiting_readers; /* waiting readers */ pthread_cond_t waiting_writers; /* waiting writers */ unsigned int waiting_writers_count; /* number of waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } # define glthread_rwlock_init(LOCK) \ (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ # if HAVE_PTHREAD_MUTEX_RECURSIVE # if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP typedef pthread_mutex_t gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer; # ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER # define gl_recursive_lock_initializer \ PTHREAD_RECURSIVE_MUTEX_INITIALIZER # else # define gl_recursive_lock_initializer \ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP # endif # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); # else typedef struct { pthread_mutex_t recmutex; /* recursive mutex */ pthread_mutex_t guard; /* protects the initialization */ int initialized; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 } # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); # endif # else /* Old versions of POSIX threads on Solaris did not have recursive locks. We have to implement them ourselves. */ typedef struct { pthread_mutex_t mutex; pthread_t owner; unsigned long depth; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); # endif /* -------------------------- gl_once_t datatype -------------------------- */ typedef pthread_once_t gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (pthread_in_use () \ ? pthread_once (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_singlethreaded (pthread_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ # include # ifdef __cplusplus extern "C" { # endif # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ # pragma weak pth_mutex_init # pragma weak pth_mutex_acquire # pragma weak pth_mutex_release # pragma weak pth_rwlock_init # pragma weak pth_rwlock_acquire # pragma weak pth_rwlock_release # pragma weak pth_once # pragma weak pth_cancel # define pth_in_use() (pth_cancel != NULL) # else # define pth_in_use() 1 # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef pth_mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ PTH_MUTEX_INIT # define glthread_lock_init(LOCK) \ (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) # define glthread_lock_lock(LOCK) \ (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) # define glthread_lock_unlock(LOCK) \ (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) # define glthread_lock_destroy(LOCK) \ ((void)(LOCK), 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* Pth pth_rwlock_acquire always prefers readers. No autoconf test so far. */ # if HAVE_PTH_RWLOCK_ACQUIRE_PREFER_WRITER typedef pth_rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ PTH_RWLOCK_INIT # define glthread_rwlock_init(LOCK) \ (pth_in_use () && !pth_rwlock_init (LOCK) ? errno : 0) # define glthread_rwlock_rdlock(LOCK) \ (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? errno : 0) # define glthread_rwlock_wrlock(LOCK) \ (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? errno : 0) # define glthread_rwlock_unlock(LOCK) \ (pth_in_use () && !pth_rwlock_release (LOCK) ? errno : 0) # define glthread_rwlock_destroy(LOCK) \ ((void)(LOCK), 0) # else typedef struct { int initialized; pth_mutex_t lock; /* protects the remaining fields */ pth_cond_t waiting_readers; /* waiting readers */ pth_cond_t waiting_writers; /* waiting writers */ unsigned int waiting_writers_count; /* number of waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { 0 } # define glthread_rwlock_init(LOCK) \ (pth_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) # define glthread_rwlock_rdlock(LOCK) \ (pth_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (pth_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (pth_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (pth_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* In Pth, mutexes are recursive by default. */ typedef pth_mutex_t gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ PTH_MUTEX_INIT # define glthread_recursive_lock_init(LOCK) \ (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) # define glthread_recursive_lock_lock(LOCK) \ (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) # define glthread_recursive_lock_unlock(LOCK) \ (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) # define glthread_recursive_lock_destroy(LOCK) \ ((void)(LOCK), 0) /* -------------------------- gl_once_t datatype -------------------------- */ typedef pth_once_t gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (pth_in_use () \ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)); extern int glthread_once_singlethreaded (pth_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ # include # include # ifdef __cplusplus extern "C" { # endif # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ # pragma weak mutex_init # pragma weak mutex_lock # pragma weak mutex_unlock # pragma weak mutex_destroy # pragma weak rwlock_init # pragma weak rw_rdlock # pragma weak rw_wrlock # pragma weak rw_unlock # pragma weak rwlock_destroy # pragma weak thr_self # pragma weak thr_suspend # define thread_in_use() (thr_suspend != NULL) # else # define thread_in_use() 1 # endif /* -------------------------- gl_lock_t datatype -------------------------- */ typedef mutex_t gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS mutex_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS mutex_t NAME = gl_lock_initializer; # define gl_lock_initializer \ DEFAULTMUTEX # define glthread_lock_init(LOCK) \ (thread_in_use () ? mutex_init (LOCK, USYNC_THREAD, NULL) : 0) # define glthread_lock_lock(LOCK) \ (thread_in_use () ? mutex_lock (LOCK) : 0) # define glthread_lock_unlock(LOCK) \ (thread_in_use () ? mutex_unlock (LOCK) : 0) # define glthread_lock_destroy(LOCK) \ (thread_in_use () ? mutex_destroy (LOCK) : 0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef rwlock_t gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ DEFAULTRWLOCK # define glthread_rwlock_init(LOCK) \ (thread_in_use () ? rwlock_init (LOCK, USYNC_THREAD, NULL) : 0) # define glthread_rwlock_rdlock(LOCK) \ (thread_in_use () ? rw_rdlock (LOCK) : 0) # define glthread_rwlock_wrlock(LOCK) \ (thread_in_use () ? rw_wrlock (LOCK) : 0) # define glthread_rwlock_unlock(LOCK) \ (thread_in_use () ? rw_unlock (LOCK) : 0) # define glthread_rwlock_destroy(LOCK) \ (thread_in_use () ? rwlock_destroy (LOCK) : 0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* Old Solaris threads did not have recursive locks. We have to implement them ourselves. */ typedef struct { mutex_t mutex; thread_t owner; unsigned long depth; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { DEFAULTMUTEX, (thread_t) 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) # define glthread_recursive_lock_lock(LOCK) \ (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_unlock(LOCK) \ (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) # define glthread_recursive_lock_destroy(LOCK) \ (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); /* -------------------------- gl_once_t datatype -------------------------- */ typedef struct { volatile int inited; mutex_t mutex; } gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX }; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (thread_in_use () \ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) extern int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)); extern int glthread_once_singlethreaded (gl_once_t *once_control); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # ifdef __cplusplus extern "C" { # endif /* We can use CRITICAL_SECTION directly, rather than the native Windows Event, Mutex, Semaphore types, because - we need only to synchronize inside a single process (address space), not inter-process locking, - we don't need to support trylock operations. (TryEnterCriticalSection does not work on Windows 95/98/ME. Packages that need trylock usually define their own mutex type.) */ /* There is no way to statically initialize a CRITICAL_SECTION. It needs to be done lazily, once only. For this we need spinlocks. */ typedef struct { volatile int done; volatile long started; } gl_spinlock_t; /* -------------------------- gl_lock_t datatype -------------------------- */ typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; } gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_lock_t NAME; # define gl_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_lock_t NAME = gl_lock_initializer; # define gl_lock_initializer \ { { 0, -1 } } # define glthread_lock_init(LOCK) \ (glthread_lock_init_func (LOCK), 0) # define glthread_lock_lock(LOCK) \ glthread_lock_lock_func (LOCK) # define glthread_lock_unlock(LOCK) \ glthread_lock_unlock_func (LOCK) # define glthread_lock_destroy(LOCK) \ glthread_lock_destroy_func (LOCK) extern void glthread_lock_init_func (gl_lock_t *lock); extern int glthread_lock_lock_func (gl_lock_t *lock); extern int glthread_lock_unlock_func (gl_lock_t *lock); extern int glthread_lock_destroy_func (gl_lock_t *lock); /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* It is impossible to implement read-write locks using plain locks, without introducing an extra thread dedicated to managing read-write locks. Therefore here we need to use the low-level Event type. */ typedef struct { HANDLE *array; /* array of waiting threads, each represented by an event */ unsigned int count; /* number of waiting threads */ unsigned int alloc; /* length of allocated array */ unsigned int offset; /* index of first waiting thread in array */ } gl_carray_waitqueue_t; typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; /* protects the remaining fields */ gl_carray_waitqueue_t waiting_readers; /* waiting readers */ gl_carray_waitqueue_t waiting_writers; /* waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME; # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; # define gl_rwlock_initializer \ { { 0, -1 } } # define glthread_rwlock_init(LOCK) \ (glthread_rwlock_init_func (LOCK), 0) # define glthread_rwlock_rdlock(LOCK) \ glthread_rwlock_rdlock_func (LOCK) # define glthread_rwlock_wrlock(LOCK) \ glthread_rwlock_wrlock_func (LOCK) # define glthread_rwlock_unlock(LOCK) \ glthread_rwlock_unlock_func (LOCK) # define glthread_rwlock_destroy(LOCK) \ glthread_rwlock_destroy_func (LOCK) extern void glthread_rwlock_init_func (gl_rwlock_t *lock); extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock); extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock); /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* The native Windows documentation says that CRITICAL_SECTION already implements a recursive lock. But we need not rely on it: It's easy to implement a recursive lock without this assumption. */ typedef struct { gl_spinlock_t guard; /* protects the initialization */ DWORD owner; unsigned long depth; CRITICAL_SECTION lock; } gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME; # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; # define gl_recursive_lock_initializer \ { { 0, -1 }, 0, 0 } # define glthread_recursive_lock_init(LOCK) \ (glthread_recursive_lock_init_func (LOCK), 0) # define glthread_recursive_lock_lock(LOCK) \ glthread_recursive_lock_lock_func (LOCK) # define glthread_recursive_lock_unlock(LOCK) \ glthread_recursive_lock_unlock_func (LOCK) # define glthread_recursive_lock_destroy(LOCK) \ glthread_recursive_lock_destroy_func (LOCK) extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock); extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock); /* -------------------------- gl_once_t datatype -------------------------- */ typedef struct { volatile int inited; volatile long started; CRITICAL_SECTION lock; } gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = { -1, -1 }; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (glthread_once_func (ONCE_CONTROL, INITFUNCTION), 0) extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)); # ifdef __cplusplus } # endif #endif /* ========================================================================= */ #if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ /* -------------------------- gl_lock_t datatype -------------------------- */ typedef int gl_lock_t; # define gl_lock_define(STORAGECLASS, NAME) # define gl_lock_define_initialized(STORAGECLASS, NAME) # define glthread_lock_init(NAME) 0 # define glthread_lock_lock(NAME) 0 # define glthread_lock_unlock(NAME) 0 # define glthread_lock_destroy(NAME) 0 /* ------------------------- gl_rwlock_t datatype ------------------------- */ typedef int gl_rwlock_t; # define gl_rwlock_define(STORAGECLASS, NAME) # define gl_rwlock_define_initialized(STORAGECLASS, NAME) # define glthread_rwlock_init(NAME) 0 # define glthread_rwlock_rdlock(NAME) 0 # define glthread_rwlock_wrlock(NAME) 0 # define glthread_rwlock_unlock(NAME) 0 # define glthread_rwlock_destroy(NAME) 0 /* --------------------- gl_recursive_lock_t datatype --------------------- */ typedef int gl_recursive_lock_t; # define gl_recursive_lock_define(STORAGECLASS, NAME) # define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) # define glthread_recursive_lock_init(NAME) 0 # define glthread_recursive_lock_lock(NAME) 0 # define glthread_recursive_lock_unlock(NAME) 0 # define glthread_recursive_lock_destroy(NAME) 0 /* -------------------------- gl_once_t datatype -------------------------- */ typedef int gl_once_t; # define gl_once_define(STORAGECLASS, NAME) \ STORAGECLASS gl_once_t NAME = 0; # define glthread_once(ONCE_CONTROL, INITFUNCTION) \ (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0) #endif /* ========================================================================= */ /* Macros with built-in error handling. */ /* -------------------------- gl_lock_t datatype -------------------------- */ #define gl_lock_init(NAME) \ do \ { \ if (glthread_lock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_lock(NAME) \ do \ { \ if (glthread_lock_lock (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_unlock(NAME) \ do \ { \ if (glthread_lock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_lock_destroy(NAME) \ do \ { \ if (glthread_lock_destroy (&NAME)) \ abort (); \ } \ while (0) /* ------------------------- gl_rwlock_t datatype ------------------------- */ #define gl_rwlock_init(NAME) \ do \ { \ if (glthread_rwlock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_rdlock(NAME) \ do \ { \ if (glthread_rwlock_rdlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_wrlock(NAME) \ do \ { \ if (glthread_rwlock_wrlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_unlock(NAME) \ do \ { \ if (glthread_rwlock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_rwlock_destroy(NAME) \ do \ { \ if (glthread_rwlock_destroy (&NAME)) \ abort (); \ } \ while (0) /* --------------------- gl_recursive_lock_t datatype --------------------- */ #define gl_recursive_lock_init(NAME) \ do \ { \ if (glthread_recursive_lock_init (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_lock(NAME) \ do \ { \ if (glthread_recursive_lock_lock (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_unlock(NAME) \ do \ { \ if (glthread_recursive_lock_unlock (&NAME)) \ abort (); \ } \ while (0) #define gl_recursive_lock_destroy(NAME) \ do \ { \ if (glthread_recursive_lock_destroy (&NAME)) \ abort (); \ } \ while (0) /* -------------------------- gl_once_t datatype -------------------------- */ #define gl_once(NAME, INITFUNCTION) \ do \ { \ if (glthread_once (&NAME, INITFUNCTION)) \ abort (); \ } \ while (0) /* ========================================================================= */ #endif /* _LOCK_H */ pspp-1.0.1/gl/glthread/lock.c0000644000175000017500000007565713124536242012732 00000000000000/* Locking in multithreaded situations. Copyright (C) 2005-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, gthr-win32.h. */ #include #include "glthread/lock.h" /* ========================================================================= */ #if USE_POSIX_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1))) # ifdef PTHREAD_RWLOCK_INITIALIZER # if !HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */ int glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock) { pthread_rwlockattr_t attributes; int err; err = pthread_rwlockattr_init (&attributes); if (err != 0) return err; /* Note: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP is the only value that causes the writer to be preferred. PTHREAD_RWLOCK_PREFER_WRITER_NP does not do this; see http://man7.org/linux/man-pages/man3/pthread_rwlockattr_setkind_np.3.html */ err = pthread_rwlockattr_setkind_np (&attributes, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); if (err == 0) err = pthread_rwlock_init(lock, &attributes); /* pthread_rwlockattr_destroy always returns 0. It cannot influence the return value. */ pthread_rwlockattr_destroy (&attributes); return err; } # endif # else int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_rwlock_init (&lock->rwlock, NULL); if (err != 0) return err; lock->initialized = 1; return 0; } int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_rwlock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_rwlock_rdlock (&lock->rwlock); } int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_rwlock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_rwlock_wrlock (&lock->rwlock); } int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) return EINVAL; return pthread_rwlock_unlock (&lock->rwlock); } int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) { int err; if (!lock->initialized) return EINVAL; err = pthread_rwlock_destroy (&lock->rwlock); if (err != 0) return err; lock->initialized = 0; return 0; } # endif # else int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_init (&lock->lock, NULL); if (err != 0) return err; err = pthread_cond_init (&lock->waiting_readers, NULL); if (err != 0) return err; err = pthread_cond_init (&lock->waiting_writers, NULL); if (err != 0) return err; lock->waiting_writers_count = 0; lock->runcount = 0; return 0; } int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; /* Test whether only readers are currently running, and whether the runcount field will not overflow, and whether no writer is waiting. The latter condition is because POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ err = pthread_cond_wait (&lock->waiting_readers, &lock->lock); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } lock->runcount++; return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; /* Test whether no readers or writers are currently running. */ while (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ lock->waiting_writers_count++; err = pthread_cond_wait (&lock->waiting_writers, &lock->lock); if (err != 0) { lock->waiting_writers_count--; pthread_mutex_unlock (&lock->lock); return err; } lock->waiting_writers_count--; } lock->runcount--; /* runcount becomes -1 */ return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_lock (&lock->lock); if (err != 0) return err; if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) { pthread_mutex_unlock (&lock->lock); return EINVAL; } lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) { pthread_mutex_unlock (&lock->lock); return EINVAL; } lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers_count > 0) { /* Wake up one of the waiting writers. */ err = pthread_cond_signal (&lock->waiting_writers); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } else { /* Wake up all waiting readers. */ err = pthread_cond_broadcast (&lock->waiting_readers); if (err != 0) { pthread_mutex_unlock (&lock->lock); return err; } } } return pthread_mutex_unlock (&lock->lock); } int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) { int err; err = pthread_mutex_destroy (&lock->lock); if (err != 0) return err; err = pthread_cond_destroy (&lock->waiting_readers); if (err != 0) return err; err = pthread_cond_destroy (&lock->waiting_writers); if (err != 0) return err; return 0; } # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ # if HAVE_PTHREAD_MUTEX_RECURSIVE # if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { pthread_mutexattr_t attributes; int err; err = pthread_mutexattr_init (&attributes); if (err != 0) return err; err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutex_init (lock, &attributes); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutexattr_destroy (&attributes); if (err != 0) return err; return 0; } # else int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { pthread_mutexattr_t attributes; int err; err = pthread_mutexattr_init (&attributes); if (err != 0) return err; err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutex_init (&lock->recmutex, &attributes); if (err != 0) { pthread_mutexattr_destroy (&attributes); return err; } err = pthread_mutexattr_destroy (&attributes); if (err != 0) return err; lock->initialized = 1; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { if (!lock->initialized) { int err; err = pthread_mutex_lock (&lock->guard); if (err != 0) return err; if (!lock->initialized) { err = glthread_recursive_lock_init_multithreaded (lock); if (err != 0) { pthread_mutex_unlock (&lock->guard); return err; } } err = pthread_mutex_unlock (&lock->guard); if (err != 0) return err; } return pthread_mutex_lock (&lock->recmutex); } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (!lock->initialized) return EINVAL; return pthread_mutex_unlock (&lock->recmutex); } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { int err; if (!lock->initialized) return EINVAL; err = pthread_mutex_destroy (&lock->recmutex); if (err != 0) return err; lock->initialized = 0; return 0; } # endif # else int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { int err; err = pthread_mutex_init (&lock->mutex, NULL); if (err != 0) return err; lock->owner = (pthread_t) 0; lock->depth = 0; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { pthread_t self = pthread_self (); if (lock->owner != self) { int err; err = pthread_mutex_lock (&lock->mutex); if (err != 0) return err; lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } return 0; } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != pthread_self ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = (pthread_t) 0; return pthread_mutex_unlock (&lock->mutex); } else return 0; } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != (pthread_t) 0) return EBUSY; return pthread_mutex_destroy (&lock->mutex); } # endif /* -------------------------- gl_once_t datatype -------------------------- */ static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT; int glthread_once_singlethreaded (pthread_once_t *once_control) { /* We don't know whether pthread_once_t is an integer type, a floating-point type, a pointer type, or a structure type. */ char *firstbyte = (char *)once_control; if (*firstbyte == *(const char *)&fresh_once) { /* First time use of once_control. Invert the first byte. */ *firstbyte = ~ *(const char *)&fresh_once; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_PTH_THREADS /* Use the GNU Pth threads library. */ /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ # if !HAVE_PTH_RWLOCK_ACQUIRE_PREFER_WRITER int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) { if (!pth_mutex_init (&lock->lock)) return errno; if (!pth_cond_init (&lock->waiting_readers)) return errno; if (!pth_cond_init (&lock->waiting_writers)) return errno; lock->waiting_writers_count = 0; lock->runcount = 0; lock->initialized = 1; return 0; } int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) glthread_rwlock_init_multithreaded (lock); if (!pth_mutex_acquire (&lock->lock, 0, NULL)) return errno; /* Test whether only readers are currently running, and whether the runcount field will not overflow, and whether no writer is waiting. The latter condition is because POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ if (!pth_cond_await (&lock->waiting_readers, &lock->lock, NULL)) { int err = errno; pth_mutex_release (&lock->lock); return err; } } lock->runcount++; return (!pth_mutex_release (&lock->lock) ? errno : 0); } int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) { if (!lock->initialized) glthread_rwlock_init_multithreaded (lock); if (!pth_mutex_acquire (&lock->lock, 0, NULL)) return errno; /* Test whether no readers or writers are currently running. */ while (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ lock->waiting_writers_count++; if (!pth_cond_await (&lock->waiting_writers, &lock->lock, NULL)) { int err = errno; lock->waiting_writers_count--; pth_mutex_release (&lock->lock); return err; } lock->waiting_writers_count--; } lock->runcount--; /* runcount becomes -1 */ return (!pth_mutex_release (&lock->lock) ? errno : 0); } int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) { int err; if (!lock->initialized) return EINVAL; if (!pth_mutex_acquire (&lock->lock, 0, NULL)) return errno; if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) { pth_mutex_release (&lock->lock); return EINVAL; } lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) { pth_mutex_release (&lock->lock); return EINVAL; } lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers_count > 0) { /* Wake up one of the waiting writers. */ if (!pth_cond_notify (&lock->waiting_writers, FALSE)) { int err = errno; pth_mutex_release (&lock->lock); return err; } } else { /* Wake up all waiting readers. */ if (!pth_cond_notify (&lock->waiting_readers, TRUE)) { int err = errno; pth_mutex_release (&lock->lock); return err; } } } return (!pth_mutex_release (&lock->lock) ? errno : 0); } int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) { lock->initialized = 0; return 0; } # endif /* --------------------- gl_recursive_lock_t datatype --------------------- */ /* -------------------------- gl_once_t datatype -------------------------- */ static void glthread_once_call (void *arg) { void (**gl_once_temp_addr) (void) = (void (**) (void)) arg; void (*initfunction) (void) = *gl_once_temp_addr; initfunction (); } int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)) { void (*temp) (void) = initfunction; return (!pth_once (once_control, glthread_once_call, &temp) ? errno : 0); } int glthread_once_singlethreaded (pth_once_t *once_control) { /* We know that pth_once_t is an integer type. */ if (*once_control == PTH_ONCE_INIT) { /* First time use of once_control. Invert the marker. */ *once_control = ~ PTH_ONCE_INIT; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_SOLARIS_THREADS /* Use the old Solaris threads library. */ /* -------------------------- gl_lock_t datatype -------------------------- */ /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* --------------------- gl_recursive_lock_t datatype --------------------- */ int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) { int err; err = mutex_init (&lock->mutex, USYNC_THREAD, NULL); if (err != 0) return err; lock->owner = (thread_t) 0; lock->depth = 0; return 0; } int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) { thread_t self = thr_self (); if (lock->owner != self) { int err; err = mutex_lock (&lock->mutex); if (err != 0) return err; lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } return 0; } int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != thr_self ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = (thread_t) 0; return mutex_unlock (&lock->mutex); } else return 0; } int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) { if (lock->owner != (thread_t) 0) return EBUSY; return mutex_destroy (&lock->mutex); } /* -------------------------- gl_once_t datatype -------------------------- */ int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)) { if (!once_control->inited) { int err; /* Use the mutex to guarantee that if another thread is already calling the initfunction, this thread waits until it's finished. */ err = mutex_lock (&once_control->mutex); if (err != 0) return err; if (!once_control->inited) { once_control->inited = 1; initfunction (); } return mutex_unlock (&once_control->mutex); } else return 0; } int glthread_once_singlethreaded (gl_once_t *once_control) { /* We know that gl_once_t contains an integer type. */ if (!once_control->inited) { /* First time use of once_control. Invert the marker. */ once_control->inited = ~ 0; return 1; } else return 0; } #endif /* ========================================================================= */ #if USE_WINDOWS_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ void glthread_lock_init_func (gl_lock_t *lock) { InitializeCriticalSection (&lock->lock); lock->guard.done = 1; } int glthread_lock_lock_func (gl_lock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_lock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); return 0; } int glthread_lock_unlock_func (gl_lock_t *lock) { if (!lock->guard.done) return EINVAL; LeaveCriticalSection (&lock->lock); return 0; } int glthread_lock_destroy_func (gl_lock_t *lock) { if (!lock->guard.done) return EINVAL; DeleteCriticalSection (&lock->lock); lock->guard.done = 0; return 0; } /* ------------------------- gl_rwlock_t datatype ------------------------- */ /* In this file, the waitqueues are implemented as circular arrays. */ #define gl_waitqueue_t gl_carray_waitqueue_t static void gl_waitqueue_init (gl_waitqueue_t *wq) { wq->array = NULL; wq->count = 0; wq->alloc = 0; wq->offset = 0; } /* Enqueues the current thread, represented by an event, in a wait queue. Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */ static HANDLE gl_waitqueue_add (gl_waitqueue_t *wq) { HANDLE event; unsigned int index; if (wq->count == wq->alloc) { unsigned int new_alloc = 2 * wq->alloc + 1; HANDLE *new_array = (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE)); if (new_array == NULL) /* No more memory. */ return INVALID_HANDLE_VALUE; /* Now is a good opportunity to rotate the array so that its contents starts at offset 0. */ if (wq->offset > 0) { unsigned int old_count = wq->count; unsigned int old_alloc = wq->alloc; unsigned int old_offset = wq->offset; unsigned int i; if (old_offset + old_count > old_alloc) { unsigned int limit = old_offset + old_count - old_alloc; for (i = 0; i < limit; i++) new_array[old_alloc + i] = new_array[i]; } for (i = 0; i < old_count; i++) new_array[i] = new_array[old_offset + i]; wq->offset = 0; } wq->array = new_array; wq->alloc = new_alloc; } /* Whether the created event is a manual-reset one or an auto-reset one, does not matter, since we will wait on it only once. */ event = CreateEvent (NULL, TRUE, FALSE, NULL); if (event == INVALID_HANDLE_VALUE) /* No way to allocate an event. */ return INVALID_HANDLE_VALUE; index = wq->offset + wq->count; if (index >= wq->alloc) index -= wq->alloc; wq->array[index] = event; wq->count++; return event; } /* Notifies the first thread from a wait queue and dequeues it. */ static void gl_waitqueue_notify_first (gl_waitqueue_t *wq) { SetEvent (wq->array[wq->offset + 0]); wq->offset++; wq->count--; if (wq->count == 0 || wq->offset == wq->alloc) wq->offset = 0; } /* Notifies all threads from a wait queue and dequeues them all. */ static void gl_waitqueue_notify_all (gl_waitqueue_t *wq) { unsigned int i; for (i = 0; i < wq->count; i++) { unsigned int index = wq->offset + i; if (index >= wq->alloc) index -= wq->alloc; SetEvent (wq->array[index]); } wq->count = 0; wq->offset = 0; } void glthread_rwlock_init_func (gl_rwlock_t *lock) { InitializeCriticalSection (&lock->lock); gl_waitqueue_init (&lock->waiting_readers); gl_waitqueue_init (&lock->waiting_writers); lock->runcount = 0; lock->guard.done = 1; } int glthread_rwlock_rdlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_rwlock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); /* Test whether only readers are currently running, and whether the runcount field will not overflow, and whether no writer is waiting. The latter condition is because POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (!(lock->runcount + 1 > 0 && lock->waiting_writers.count == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_readers. */ HANDLE event = gl_waitqueue_add (&lock->waiting_readers); if (event != INVALID_HANDLE_VALUE) { DWORD result; LeaveCriticalSection (&lock->lock); /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); /* The thread which signalled the event already did the bookkeeping: removed us from the waiting_readers, incremented lock->runcount. */ if (!(lock->runcount > 0)) abort (); return 0; } else { /* Allocation failure. Weird. */ do { LeaveCriticalSection (&lock->lock); Sleep (1); EnterCriticalSection (&lock->lock); } while (!(lock->runcount + 1 > 0)); } } lock->runcount++; LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_wrlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_rwlock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } EnterCriticalSection (&lock->lock); /* Test whether no readers or writers are currently running. */ if (!(lock->runcount == 0)) { /* This thread has to wait for a while. Enqueue it among the waiting_writers. */ HANDLE event = gl_waitqueue_add (&lock->waiting_writers); if (event != INVALID_HANDLE_VALUE) { DWORD result; LeaveCriticalSection (&lock->lock); /* Wait until another thread signals this event. */ result = WaitForSingleObject (event, INFINITE); if (result == WAIT_FAILED || result == WAIT_TIMEOUT) abort (); CloseHandle (event); /* The thread which signalled the event already did the bookkeeping: removed us from the waiting_writers, set lock->runcount = -1. */ if (!(lock->runcount == -1)) abort (); return 0; } else { /* Allocation failure. Weird. */ do { LeaveCriticalSection (&lock->lock); Sleep (1); EnterCriticalSection (&lock->lock); } while (!(lock->runcount == 0)); } } lock->runcount--; /* runcount becomes -1 */ LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_unlock_func (gl_rwlock_t *lock) { if (!lock->guard.done) return EINVAL; EnterCriticalSection (&lock->lock); if (lock->runcount < 0) { /* Drop a writer lock. */ if (!(lock->runcount == -1)) abort (); lock->runcount = 0; } else { /* Drop a reader lock. */ if (!(lock->runcount > 0)) { LeaveCriticalSection (&lock->lock); return EPERM; } lock->runcount--; } if (lock->runcount == 0) { /* POSIX recommends that "write locks shall take precedence over read locks", to avoid "writer starvation". */ if (lock->waiting_writers.count > 0) { /* Wake up one of the waiting writers. */ lock->runcount--; gl_waitqueue_notify_first (&lock->waiting_writers); } else { /* Wake up all waiting readers. */ lock->runcount += lock->waiting_readers.count; gl_waitqueue_notify_all (&lock->waiting_readers); } } LeaveCriticalSection (&lock->lock); return 0; } int glthread_rwlock_destroy_func (gl_rwlock_t *lock) { if (!lock->guard.done) return EINVAL; if (lock->runcount != 0) return EBUSY; DeleteCriticalSection (&lock->lock); if (lock->waiting_readers.array != NULL) free (lock->waiting_readers.array); if (lock->waiting_writers.array != NULL) free (lock->waiting_writers.array); lock->guard.done = 0; return 0; } /* --------------------- gl_recursive_lock_t datatype --------------------- */ void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock) { lock->owner = 0; lock->depth = 0; InitializeCriticalSection (&lock->lock); lock->guard.done = 1; } int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock) { if (!lock->guard.done) { if (InterlockedIncrement (&lock->guard.started) == 0) /* This thread is the first one to need this lock. Initialize it. */ glthread_recursive_lock_init (lock); else /* Yield the CPU while waiting for another thread to finish initializing this lock. */ while (!lock->guard.done) Sleep (0); } { DWORD self = GetCurrentThreadId (); if (lock->owner != self) { EnterCriticalSection (&lock->lock); lock->owner = self; } if (++(lock->depth) == 0) /* wraparound? */ { lock->depth--; return EAGAIN; } } return 0; } int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock) { if (lock->owner != GetCurrentThreadId ()) return EPERM; if (lock->depth == 0) return EINVAL; if (--(lock->depth) == 0) { lock->owner = 0; LeaveCriticalSection (&lock->lock); } return 0; } int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock) { if (lock->owner != 0) return EBUSY; DeleteCriticalSection (&lock->lock); lock->guard.done = 0; return 0; } /* -------------------------- gl_once_t datatype -------------------------- */ void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)) { if (once_control->inited <= 0) { if (InterlockedIncrement (&once_control->started) == 0) { /* This thread is the first one to come to this once_control. */ InitializeCriticalSection (&once_control->lock); EnterCriticalSection (&once_control->lock); once_control->inited = 0; initfunction (); once_control->inited = 1; LeaveCriticalSection (&once_control->lock); } else { /* Undo last operation. */ InterlockedDecrement (&once_control->started); /* Some other thread has already started the initialization. Yield the CPU while waiting for the other thread to finish initializing and taking the lock. */ while (once_control->inited < 0) Sleep (0); if (once_control->inited <= 0) { /* Take the lock. This blocks until the other thread has finished calling the initfunction. */ EnterCriticalSection (&once_control->lock); LeaveCriticalSection (&once_control->lock); if (!(once_control->inited > 0)) abort (); } } } } #endif /* ========================================================================= */ pspp-1.0.1/gl/strsep.c0000644000175000017500000000261213124536243011506 00000000000000/* Copyright (C) 2004, 2007, 2009-2017 Free Software Foundation, Inc. Written by Yoann Vandoorselaere . 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, 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 . */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include char * strsep (char **stringp, const char *delim) { char *start = *stringp; char *ptr; if (start == NULL) return NULL; /* Optimize the case of no delimiters. */ if (delim[0] == '\0') { *stringp = NULL; return start; } /* Optimize the case of one delimiter. */ if (delim[1] == '\0') ptr = strchr (start, delim[0]); else /* The general case. */ ptr = strpbrk (start, delim); if (ptr == NULL) { *stringp = NULL; return start; } *ptr = '\0'; *stringp = ptr + 1; return start; } pspp-1.0.1/gl/malloca.valgrind0000644000175000017500000000025713020461274013161 00000000000000# Suppress a valgrind message about use of uninitialized memory in freea(). # This use is OK because it provides only a speedup. { freea Memcheck:Cond fun:freea } pspp-1.0.1/gl/pipe2.c0000644000175000017500000001034113124536242011202 00000000000000/* Create a pipe, with specific opening flags. Copyright (C) 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include #include #include #include "binary-io.h" #include "verify.h" #if GNULIB_defined_O_NONBLOCK # include "nonblocking.h" #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Windows API. */ # include #endif int pipe2 (int fd[2], int flags) { /* Mingw _pipe() corrupts fd on failure; also, if we succeed at creating the pipe but later fail at changing fcntl, we want to leave fd unchanged: http://austingroupbugs.net/view.php?id=467 */ int tmp[2]; tmp[0] = fd[0]; tmp[1] = fd[1]; #if HAVE_PIPE2 # undef pipe2 /* Try the system call first, if it exists. (We may be running with a glibc that has the function but with an older kernel that lacks it.) */ { /* Cache the information whether the system call really exists. */ static int have_pipe2_really; /* 0 = unknown, 1 = yes, -1 = no */ if (have_pipe2_really >= 0) { int result = pipe2 (fd, flags); if (!(result < 0 && errno == ENOSYS)) { have_pipe2_really = 1; return result; } have_pipe2_really = -1; } } #endif /* Check the supported flags. */ if ((flags & ~(O_CLOEXEC | O_NONBLOCK | O_BINARY | O_TEXT)) != 0) { errno = EINVAL; return -1; } #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Windows API. */ if (_pipe (fd, 4096, flags & ~O_NONBLOCK) < 0) { fd[0] = tmp[0]; fd[1] = tmp[1]; return -1; } /* O_NONBLOCK handling. On native Windows platforms, O_NONBLOCK is defined by gnulib. Use the functions defined by the gnulib module 'nonblocking'. */ # if GNULIB_defined_O_NONBLOCK if (flags & O_NONBLOCK) { if (set_nonblocking_flag (fd[0], true) != 0 || set_nonblocking_flag (fd[1], true) != 0) goto fail; } # else { verify (O_NONBLOCK == 0); } # endif return 0; #else /* Unix API. */ if (pipe (fd) < 0) return -1; /* POSIX says that initially, the O_NONBLOCK and FD_CLOEXEC flags are cleared on both fd[0] and fd[1]. */ /* O_NONBLOCK handling. On Unix platforms, O_NONBLOCK is defined by the system. Use fcntl(). */ if (flags & O_NONBLOCK) { int fcntl_flags; if ((fcntl_flags = fcntl (fd[1], F_GETFL, 0)) < 0 || fcntl (fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) == -1 || (fcntl_flags = fcntl (fd[0], F_GETFL, 0)) < 0 || fcntl (fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) == -1) goto fail; } if (flags & O_CLOEXEC) { int fcntl_flags; if ((fcntl_flags = fcntl (fd[1], F_GETFD, 0)) < 0 || fcntl (fd[1], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1 || (fcntl_flags = fcntl (fd[0], F_GETFD, 0)) < 0 || fcntl (fd[0], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1) goto fail; } # if O_BINARY if (flags & O_BINARY) { set_binary_mode (fd[1], O_BINARY); set_binary_mode (fd[0], O_BINARY); } else if (flags & O_TEXT) { set_binary_mode (fd[1], O_TEXT); set_binary_mode (fd[0], O_TEXT); } # endif return 0; #endif #if GNULIB_defined_O_NONBLOCK || \ !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) fail: { int saved_errno = errno; close (fd[0]); close (fd[1]); fd[0] = tmp[0]; fd[1] = tmp[1]; errno = saved_errno; return -1; } #endif } pspp-1.0.1/gl/time.in.h0000644000175000017500000003133713124536243011544 00000000000000/* A more-standard . Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. (However, skip this for MinGW as it treats __need_time_t incompatibly.) Also, Solaris 8 eventually includes itself recursively; if that is happening, just include the system without adding our own declarations. */ #if (((defined __need_time_t || defined __need_clock_t \ || defined __need_timespec) \ && !defined __MINGW32__) \ || defined _@GUARD_PREFIX@_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ #else # define _@GUARD_PREFIX@_TIME_H # @INCLUDE_NEXT@ @NEXT_TIME_H@ /* NetBSD 5.0 mis-defines NULL. */ # include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, but the pthreads-win32 library defines it in . */ # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ # include # elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ # include # elif @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ # include # else # ifdef __cplusplus extern "C" { # endif # if !GNULIB_defined_struct_timespec # undef timespec # define timespec rpl_timespec struct timespec { time_t tv_sec; long int tv_nsec; }; # define GNULIB_defined_struct_timespec 1 # endif # ifdef __cplusplus } # endif # endif # endif # if !GNULIB_defined_struct_time_t_must_be_integral /* Per http://austingroupbugs.net/view.php?id=327, POSIX requires time_t to be an integer type, even though C99 permits floating point. We don't know of any implementation that uses floating point, and it is much easier to write code that doesn't have to worry about that corner case, so we force the issue. */ struct __time_t_must_be_integral { unsigned int __floating_time_t_unsupported : (time_t) 1; }; # define GNULIB_defined_struct_time_t_must_be_integral 1 # endif /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ # if @GNULIB_NANOSLEEP@ # if @REPLACE_NANOSLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define nanosleep rpl_nanosleep # endif _GL_FUNCDECL_RPL (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # else # if ! @HAVE_NANOSLEEP@ _GL_FUNCDECL_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # endif _GL_CXXALIASWARN (nanosleep); # endif /* Initialize time conversion information. */ # if @GNULIB_TZSET@ # if @REPLACE_TZSET@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef tzset # define tzset rpl_tzset # endif _GL_FUNCDECL_RPL (tzset, void, (void)); _GL_CXXALIAS_RPL (tzset, void, (void)); # else # if ! @HAVE_TZSET@ _GL_FUNCDECL_SYS (tzset, void, (void)); # endif _GL_CXXALIAS_SYS (tzset, void, (void)); # endif _GL_CXXALIASWARN (tzset); # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if @GNULIB_MKTIME@ # if @REPLACE_MKTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mktime rpl_mktime # endif _GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); # else _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); # endif _GL_CXXALIASWARN (mktime); # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if @GNULIB_TIME_R@ # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime_r # define localtime_r rpl_localtime_r # endif _GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # else # if ! @HAVE_DECL_LOCALTIME_R@ _GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # endif # if @HAVE_DECL_LOCALTIME_R@ _GL_CXXALIASWARN (localtime_r); # endif # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime_r # define gmtime_r rpl_gmtime_r # endif _GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # else # if ! @HAVE_DECL_LOCALTIME_R@ _GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # endif # if @HAVE_DECL_LOCALTIME_R@ _GL_CXXALIASWARN (gmtime_r); # endif # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@ # if @REPLACE_LOCALTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime # define localtime rpl_localtime # endif _GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer)); # else _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); # endif _GL_CXXALIASWARN (localtime); # endif # if 0 || @REPLACE_GMTIME@ # if @REPLACE_GMTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime # define gmtime rpl_gmtime # endif _GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer)); # else _GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer)); # endif _GL_CXXALIASWARN (gmtime); # endif /* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See . */ # if @GNULIB_STRPTIME@ # if ! @HAVE_STRPTIME@ _GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm)); _GL_CXXALIASWARN (strptime); # endif /* Convert *TP to a date and time string. See . */ # if @GNULIB_CTIME@ # if @REPLACE_CTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define ctime rpl_ctime # endif _GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); # else _GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); # endif _GL_CXXALIASWARN (ctime); # endif /* Convert *TP to a date and time string. See . */ # if @GNULIB_STRFTIME@ # if @REPLACE_STRFTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strftime rpl_strftime # endif _GL_FUNCDECL_RPL (strftime, size_t, (char *__buf, size_t __bufsize, const char *__fmt, const struct tm *__tp) _GL_ARG_NONNULL ((1, 3, 4))); _GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize, const char *__fmt, const struct tm *__tp)); # else _GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize, const char *__fmt, const struct tm *__tp)); # endif _GL_CXXALIASWARN (strftime); # endif # if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ typedef struct tm_zone *timezone_t; _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); _GL_FUNCDECL_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result)); _GL_FUNCDECL_SYS (mktime_z, time_t, (timezone_t __tz, struct tm *restrict __result) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_SYS (mktime_z, time_t, (timezone_t __tz, struct tm *restrict __result)); # endif /* Convert TM to a time_t value, assuming UTC. */ # if @GNULIB_TIMEGM@ # if @REPLACE_TIMEGM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef timegm # define timegm rpl_timegm # endif _GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); # else # if ! @HAVE_TIMEGM@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); # endif _GL_CXXALIASWARN (timegm); # endif /* Encourage applications to avoid unsafe functions that can overrun buffers when given outlandish struct tm values. Portable applications should use strftime (or even sprintf) instead. */ # if defined GNULIB_POSIXCHECK # undef asctime _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef asctime_r _GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime _GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime_r _GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif #endif pspp-1.0.1/gl/raise.c0000644000175000017500000000325513124536243011275 00000000000000/* Provide a non-threads replacement for the POSIX raise function. Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* written by Jim Meyering and Bruno Haible */ #include /* Specification. */ #include #if HAVE_RAISE /* Native Windows platform. */ # include # if HAVE_MSVC_INVALID_PARAMETER_HANDLER # include "msvc-inval.h" # endif # undef raise # if HAVE_MSVC_INVALID_PARAMETER_HANDLER static int raise_nothrow (int sig) { int result; TRY_MSVC_INVAL { result = raise (sig); } CATCH_MSVC_INVAL { result = -1; errno = EINVAL; } DONE_MSVC_INVAL; return result; } # else # define raise_nothrow raise # endif #else /* An old Unix platform. */ # include # define rpl_raise raise #endif int rpl_raise (int sig) { #if GNULIB_defined_signal_blocking && GNULIB_defined_SIGPIPE if (sig == SIGPIPE) return _gl_raise_SIGPIPE (); #endif #if HAVE_RAISE return raise_nothrow (sig); #else return kill (getpid (), sig); #endif } pspp-1.0.1/gl/unilbrk.in.h0000644000175000017500000000767313124536243012262 00000000000000/* Line breaking of Unicode strings. Copyright (C) 2001-2003, 2005-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 . */ #ifndef _UNILBRK_H #define _UNILBRK_H /* Get size_t. */ #include #include "unitypes.h" /* Get locale_charset() declaration. */ #include "localcharset.h" #ifdef __cplusplus extern "C" { #endif /* These functions are locale dependent. The encoding argument identifies the encoding (e.g. "ISO-8859-2" for Polish). */ /* Line breaking. */ enum { UC_BREAK_UNDEFINED, UC_BREAK_PROHIBITED, UC_BREAK_POSSIBLE, UC_BREAK_MANDATORY, UC_BREAK_HYPHENATION }; /* Determine the line break points in S, and store the result at p[0..n-1]. p[i] = UC_BREAK_MANDATORY means that s[i] is a line break character. p[i] = UC_BREAK_POSSIBLE means that a line break may be inserted between s[i-1] and s[i]. p[i] = UC_BREAK_HYPHENATION means that a hyphen and a line break may be inserted between s[i-1] and s[i]. But beware of language dependent hyphenation rules. p[i] = UC_BREAK_PROHIBITED means that s[i-1] and s[i] must not be separated. */ extern void u8_possible_linebreaks (const uint8_t *s, size_t n, const char *encoding, char *p); extern void u16_possible_linebreaks (const uint16_t *s, size_t n, const char *encoding, char *p); extern void u32_possible_linebreaks (const uint32_t *s, size_t n, const char *encoding, char *p); extern void ulc_possible_linebreaks (const char *s, size_t n, const char *encoding, char *p); /* Choose the best line breaks, assuming the uc_width function. The string is s[0..n-1]. The maximum number of columns per line is given as WIDTH. The starting column of the string is given as START_COLUMN. If the algorithm shall keep room after the last piece, they can be given as AT_END_COLUMNS. o is an optional override; if o[i] != UC_BREAK_UNDEFINED, o[i] takes precedence over p[i] as returned by the *_possible_linebreaks function. The given ENCODING is used for disambiguating widths in uc_width. Return the column after the end of the string, and store the result at p[0..n-1]. */ extern int u8_width_linebreaks (const uint8_t *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p); extern int u16_width_linebreaks (const uint16_t *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p); extern int u32_width_linebreaks (const uint32_t *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p); extern int ulc_width_linebreaks (const char *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p); #ifdef __cplusplus } #endif #endif /* _UNILBRK_H */ pspp-1.0.1/gl/full-read.c0000644000175000017500000000150013124536242012033 00000000000000/* An interface to read that retries after partial reads and interrupts. Copyright (C) 2002-2003, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #define FULL_READ #include "full-write.c" pspp-1.0.1/gl/sys_select.in.h0000644000175000017500000002756613124536243012774 00000000000000/* Substitute for . Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif @PRAGMA_COLUMNS@ /* On OSF/1 and Solaris 2.6, and both include . On Cygwin, includes . Simply delegate to the system's header in this case. */ #if (@HAVE_SYS_SELECT_H@ \ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H \ && ((defined __osf__ && defined _SYS_TYPES_H_ \ && defined _OSF_SOURCE) \ || (defined __sun && defined _SYS_TYPES_H \ && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \ || defined __EXTENSIONS__)))) # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ #elif (@HAVE_SYS_SELECT_H@ \ && (defined _CYGWIN_SYS_TIME_H \ || (!defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \ && ((defined __osf__ && defined _SYS_TIME_H_ \ && defined _OSF_SOURCE) \ || (defined __sun && defined _SYS_TIME_H \ && (! (defined _XOPEN_SOURCE \ || defined _POSIX_C_SOURCE) \ || defined __EXTENSIONS__)))))) # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ /* On IRIX 6.5, includes , which includes , which includes . At this point we cannot include , because that includes , which gives a syntax error because has not been completely processed. Simply delegate to the system's header in this case. */ #elif @HAVE_SYS_SELECT_H@ && defined __sgi && (defined _SYS_BSD_TYPES_H && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H) # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ /* On OpenBSD 5.0, includes , which includes . At this point we cannot include , because that includes gnulib's pthread.h override, which gives a syntax error because /usr/include/pthread.h has not been completely processed. Simply delegate to the system's header in this case. */ #elif @HAVE_SYS_SELECT_H@ && defined __OpenBSD__ && (defined _PTHREAD_H_ && !defined PTHREAD_MUTEX_INITIALIZER) # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ #else #ifndef _@GUARD_PREFIX@_SYS_SELECT_H /* On many platforms, assumes prior inclusion of . Also, mingw defines sigset_t there, instead of in where it belongs. */ #include #if @HAVE_SYS_SELECT_H@ /* On OSF/1 4.0, provides only a forward declaration of 'struct timeval', and no definition of this type. Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select() in . But avoid namespace pollution on glibc systems and "unknown type name" problems on Cygwin. */ # if !(defined __GLIBC__ || defined __CYGWIN__) # include # endif /* On AIX 7 and Solaris 10, provides an FD_ZERO implementation that relies on memset(), but without including . But in any case avoid namespace pollution on glibc systems. */ # if (defined __OpenBSD__ || defined _AIX || defined __sun || defined __osf__ || defined __BEOS__) \ && ! defined __GLIBC__ # include # endif /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ #endif /* Get definition of 'sigset_t'. But avoid namespace pollution on glibc systems and "unknown type name" problems on Cygwin. Do this after the include_next (for the sake of OpenBSD 5.0) but before the split double-inclusion guard (for the sake of Solaris). */ #if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__) # include #endif #ifndef _@GUARD_PREFIX@_SYS_SELECT_H #define _@GUARD_PREFIX@_SYS_SELECT_H #if !@HAVE_SYS_SELECT_H@ /* A platform that lacks . */ /* Get the 'struct timeval' and 'fd_set' types and the FD_* macros on most platforms. */ # include /* On HP-UX 11, provides an FD_ZERO implementation that relies on memset(), but without including . */ # if defined __hpux # include # endif /* On native Windows platforms: Get the 'fd_set' type. Get the close() declaration before we override it. */ # if @HAVE_WINSOCK2_H@ # if !defined _GL_INCLUDING_WINSOCK2_H # define _GL_INCLUDING_WINSOCK2_H # include # undef _GL_INCLUDING_WINSOCK2_H # endif # include # endif #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Fix some definitions from . */ #if @HAVE_WINSOCK2_H@ # if !GNULIB_defined_rpl_fd_isset /* Re-define FD_ISSET to avoid a WSA call while we are not using network sockets. */ static int rpl_fd_isset (SOCKET fd, fd_set * set) { u_int i; if (set == NULL) return 0; for (i = 0; i < set->fd_count; i++) if (set->fd_array[i] == fd) return 1; return 0; } # define GNULIB_defined_rpl_fd_isset 1 # endif # undef FD_ISSET # define FD_ISSET(fd, set) rpl_fd_isset(fd, set) #endif /* Hide some function declarations from . */ #if @HAVE_WINSOCK2_H@ # if !defined _@GUARD_PREFIX@_UNISTD_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close close_used_without_including_unistd_h # else _GL_WARN_ON_USE (close, "close() used without including "); # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname gethostname_used_without_including_unistd_h # else _GL_WARN_ON_USE (gethostname, "gethostname() used without including "); # endif # endif # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef socket # define socket socket_used_without_including_sys_socket_h # undef connect # define connect connect_used_without_including_sys_socket_h # undef accept # define accept accept_used_without_including_sys_socket_h # undef bind # define bind bind_used_without_including_sys_socket_h # undef getpeername # define getpeername getpeername_used_without_including_sys_socket_h # undef getsockname # define getsockname getsockname_used_without_including_sys_socket_h # undef getsockopt # define getsockopt getsockopt_used_without_including_sys_socket_h # undef listen # define listen listen_used_without_including_sys_socket_h # undef recv # define recv recv_used_without_including_sys_socket_h # undef send # define send send_used_without_including_sys_socket_h # undef recvfrom # define recvfrom recvfrom_used_without_including_sys_socket_h # undef sendto # define sendto sendto_used_without_including_sys_socket_h # undef setsockopt # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h # else _GL_WARN_ON_USE (socket, "socket() used without including "); _GL_WARN_ON_USE (connect, "connect() used without including "); _GL_WARN_ON_USE (accept, "accept() used without including "); _GL_WARN_ON_USE (bind, "bind() used without including "); _GL_WARN_ON_USE (getpeername, "getpeername() used without including "); _GL_WARN_ON_USE (getsockname, "getsockname() used without including "); _GL_WARN_ON_USE (getsockopt, "getsockopt() used without including "); _GL_WARN_ON_USE (listen, "listen() used without including "); _GL_WARN_ON_USE (recv, "recv() used without including "); _GL_WARN_ON_USE (send, "send() used without including "); _GL_WARN_ON_USE (recvfrom, "recvfrom() used without including "); _GL_WARN_ON_USE (sendto, "sendto() used without including "); _GL_WARN_ON_USE (setsockopt, "setsockopt() used without including "); _GL_WARN_ON_USE (shutdown, "shutdown() used without including "); # endif # endif #endif #if @GNULIB_PSELECT@ # if @REPLACE_PSELECT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pselect # define pselect rpl_pselect # endif _GL_FUNCDECL_RPL (pselect, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timespec const *restrict, const sigset_t *restrict)); _GL_CXXALIAS_RPL (pselect, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timespec const *restrict, const sigset_t *restrict)); # else # if !@HAVE_PSELECT@ _GL_FUNCDECL_SYS (pselect, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timespec const *restrict, const sigset_t *restrict)); # endif _GL_CXXALIAS_SYS (pselect, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timespec const *restrict, const sigset_t *restrict)); # endif _GL_CXXALIASWARN (pselect); #elif defined GNULIB_POSIXCHECK # undef pselect # if HAVE_RAW_DECL_PSELECT _GL_WARN_ON_USE (pselect, "pselect is not portable - " "use gnulib module pselect for portability"); # endif #endif #if @GNULIB_SELECT@ # if @REPLACE_SELECT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef select # define select rpl_select # endif _GL_FUNCDECL_RPL (select, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timeval *restrict)); _GL_CXXALIAS_RPL (select, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timeval *restrict)); # else _GL_CXXALIAS_SYS (select, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timeval *restrict)); # endif _GL_CXXALIASWARN (select); #elif @HAVE_WINSOCK2_H@ # undef select # define select select_used_without_requesting_gnulib_module_select #elif defined GNULIB_POSIXCHECK # undef select # if HAVE_RAW_DECL_SELECT _GL_WARN_ON_USE (select, "select is not always POSIX compliant - " "use gnulib module select for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_SYS_SELECT_H */ #endif /* _@GUARD_PREFIX@_SYS_SELECT_H */ #endif /* OSF/1 */ pspp-1.0.1/gl/msvc-nothrow.h0000644000175000017500000000301013124536242012631 00000000000000/* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. Copyright (C) 2011-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _MSVC_NOTHROW_H #define _MSVC_NOTHROW_H /* With MSVC runtime libraries with the "invalid parameter handler" concept, functions like fprintf(), dup2(), or close() crash when the caller passes an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF) instead. This file defines wrappers that turn such an invalid parameter notification into an error code. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get original declaration of _get_osfhandle. */ # include # if HAVE_MSVC_INVALID_PARAMETER_HANDLER /* Override _get_osfhandle. */ extern intptr_t _gl_nothrow_get_osfhandle (int fd); # define _get_osfhandle _gl_nothrow_get_osfhandle # endif #endif #endif /* _MSVC_NOTHROW_H */ pspp-1.0.1/gl/sig-handler.c0000644000175000017500000000013213020461274012352 00000000000000#include #define SIG_HANDLER_INLINE _GL_EXTERN_INLINE #include "sig-handler.h" pspp-1.0.1/gl/localcharset.c0000644000175000017500000005033113124536242012632 00000000000000/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2006, 2008-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Bruno Haible . */ #include /* Specification. */ #include "localcharset.h" #include #include #include #include #include #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET # define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ #endif #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define WINDOWS_NATIVE # include #endif #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # ifndef OS2 # define OS2 # endif #endif #if !defined WINDOWS_NATIVE # include # if HAVE_LANGINFO_CODESET # include # else # if 0 /* see comment below */ # include # endif # endif # ifdef __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include # endif #elif defined WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif #if defined OS2 # define INCL_DOS # include #endif /* For MB_CUR_MAX_L */ #if defined DARWIN7 # include #endif #if ENABLE_RELOCATABLE # include "relocatable.h" #else # define relocate(pathname) (pathname) # define relocate2(pathname,allocatedp) (*(allocatedp) = NULL, (pathname)) #endif /* Get LIBDIR. */ #ifndef LIBDIR # include "configmake.h" #endif /* Define O_NOFOLLOW to 0 on platforms where it does not exist. */ #ifndef O_NOFOLLOW # define O_NOFOLLOW 0 #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif #ifndef ISSLASH # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) #endif #if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc getc_unlocked #endif /* The following static variable is declared 'volatile' to avoid a possible multithread problem in the function get_charset_aliases. If we are running in a threaded environment, and if two threads initialize 'charset_aliases' simultaneously, both will produce the same value, and everything will be ok if the two assignments to 'charset_aliases' are atomic. But I don't know what will happen if the two assignments mix. */ #if __STDC__ != 1 # define volatile /* empty */ #endif /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases (void) { const char *cp; cp = charset_aliases; if (cp == NULL) { #if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2) char *malloc_dir = NULL; const char *dir; const char *base = "charset.alias"; char *file_name; /* Make it possible to override the charset.alias location. This is necessary for running the testsuite before "make install". */ dir = getenv ("CHARSETALIASDIR"); if (dir == NULL || dir[0] == '\0') dir = relocate2 (LIBDIR, &malloc_dir); /* Concatenate dir and base into freshly allocated file_name. */ { size_t dir_len = strlen (dir); size_t base_len = strlen (base); int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); file_name = (char *) malloc (dir_len + add_slash + base_len + 1); if (file_name != NULL) { memcpy (file_name, dir, dir_len); if (add_slash) file_name[dir_len] = DIRECTORY_SEPARATOR; memcpy (file_name + dir_len + add_slash, base, base_len + 1); } } free (malloc_dir); if (file_name == NULL) /* Out of memory. Treat the file as empty. */ cp = ""; else { int fd; /* Open the file. Reject symbolic links on platforms that support O_NOFOLLOW. This is a security feature. Without it, an attacker could retrieve parts of the contents (namely, the tail of the first line that starts with "* ") of an arbitrary file by placing a symbolic link to that file under the name "charset.alias" in some writable directory and defining the environment variable CHARSETALIASDIR to point to that directory. */ fd = open (file_name, O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0)); if (fd < 0) /* File not found. Treat it as empty. */ cp = ""; else { FILE *fp; fp = fdopen (fd, "r"); if (fp == NULL) { /* Out of memory. Treat the file as empty. */ close (fd); cp = ""; } else { /* Parse the file's contents. */ char *res_ptr = NULL; size_t res_size = 0; for (;;) { int c; char buf1[50+1]; char buf2[50+1]; size_t l1, l2; char *old_res_ptr; c = getc (fp); if (c == EOF) break; if (c == '\n' || c == ' ' || c == '\t') continue; if (c == '#') { /* Skip comment, to end of line. */ do c = getc (fp); while (!(c == EOF || c == '\n')); if (c == EOF) break; continue; } ungetc (c, fp); if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) break; l1 = strlen (buf1); l2 = strlen (buf2); old_res_ptr = res_ptr; if (res_size == 0) { res_size = l1 + 1 + l2 + 1; res_ptr = (char *) malloc (res_size + 1); } else { res_size += l1 + 1 + l2 + 1; res_ptr = (char *) realloc (res_ptr, res_size + 1); } if (res_ptr == NULL) { /* Out of memory. */ res_size = 0; free (old_res_ptr); break; } strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); strcpy (res_ptr + res_size - (l2 + 1), buf2); } fclose (fp); if (res_size == 0) cp = ""; else { *(res_ptr + res_size) = '\0'; cp = res_ptr; } } } free (file_name); } #else # if defined DARWIN7 /* To avoid the trouble of installing a file that is shared by many GNU packages -- many packaging systems have problems with this --, simply inline the aliases here. */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-4" "\0" "ISO-8859-4" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" "ISO8859-13" "\0" "ISO-8859-13" "\0" "ISO8859-15" "\0" "ISO-8859-15" "\0" "KOI8-R" "\0" "KOI8-R" "\0" "KOI8-U" "\0" "KOI8-U" "\0" "CP866" "\0" "CP866" "\0" "CP949" "\0" "CP949" "\0" "CP1131" "\0" "CP1131" "\0" "CP1251" "\0" "CP1251" "\0" "eucCN" "\0" "GB2312" "\0" "GB2312" "\0" "GB2312" "\0" "eucJP" "\0" "EUC-JP" "\0" "eucKR" "\0" "EUC-KR" "\0" "Big5" "\0" "BIG5" "\0" "Big5HKSCS" "\0" "BIG5-HKSCS" "\0" "GBK" "\0" "GBK" "\0" "GB18030" "\0" "GB18030" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "ARMSCII-8" "\0" "ARMSCII-8" "\0" "PT154" "\0" "PT154" "\0" /*"ISCII-DEV" "\0" "?" "\0"*/ "*" "\0" "UTF-8" "\0"; # endif # if defined VMS /* To avoid the troubles of an extra file charset.alias_vms in the sources of many GNU packages, simply inline the aliases here. */ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation "Compaq C Run-Time Library Reference Manual for OpenVMS systems" section 10.7 "Handling Different Character Sets". */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-8" "\0" "ISO-8859-8" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" /* Japanese */ "eucJP" "\0" "EUC-JP" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "DECKANJI" "\0" "DEC-KANJI" "\0" "SDECKANJI" "\0" "EUC-JP" "\0" /* Chinese */ "eucTW" "\0" "EUC-TW" "\0" "DECHANYU" "\0" "DEC-HANYU" "\0" "DECHANZI" "\0" "GB2312" "\0" /* Korean */ "DECKOREAN" "\0" "EUC-KR" "\0"; # endif # if defined WINDOWS_NATIVE || defined __CYGWIN__ /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ cp = "CP936" "\0" "GBK" "\0" "CP1361" "\0" "JOHAB" "\0" "CP20127" "\0" "ASCII" "\0" "CP20866" "\0" "KOI8-R" "\0" "CP20936" "\0" "GB2312" "\0" "CP21866" "\0" "KOI8-RU" "\0" "CP28591" "\0" "ISO-8859-1" "\0" "CP28592" "\0" "ISO-8859-2" "\0" "CP28593" "\0" "ISO-8859-3" "\0" "CP28594" "\0" "ISO-8859-4" "\0" "CP28595" "\0" "ISO-8859-5" "\0" "CP28596" "\0" "ISO-8859-6" "\0" "CP28597" "\0" "ISO-8859-7" "\0" "CP28598" "\0" "ISO-8859-8" "\0" "CP28599" "\0" "ISO-8859-9" "\0" "CP28605" "\0" "ISO-8859-15" "\0" "CP38598" "\0" "ISO-8859-8" "\0" "CP51932" "\0" "EUC-JP" "\0" "CP51936" "\0" "GB2312" "\0" "CP51949" "\0" "EUC-KR" "\0" "CP51950" "\0" "EUC-TW" "\0" "CP54936" "\0" "GB18030" "\0" "CP65001" "\0" "UTF-8" "\0"; # endif # if defined OS2 /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ /* The list of encodings is taken from "List of OS/2 Codepages" by Alex Taylor: . See also "IBM Globalization - Code page identifiers": . */ cp = "CP813" "\0" "ISO-8859-7" "\0" "CP878" "\0" "KOI8-R" "\0" "CP819" "\0" "ISO-8859-1" "\0" "CP912" "\0" "ISO-8859-2" "\0" "CP913" "\0" "ISO-8859-3" "\0" "CP914" "\0" "ISO-8859-4" "\0" "CP915" "\0" "ISO-8859-5" "\0" "CP916" "\0" "ISO-8859-8" "\0" "CP920" "\0" "ISO-8859-9" "\0" "CP921" "\0" "ISO-8859-13" "\0" "CP923" "\0" "ISO-8859-15" "\0" "CP954" "\0" "EUC-JP" "\0" "CP964" "\0" "EUC-TW" "\0" "CP970" "\0" "EUC-KR" "\0" "CP1089" "\0" "ISO-8859-6" "\0" "CP1208" "\0" "UTF-8" "\0" "CP1381" "\0" "GB2312" "\0" "CP1386" "\0" "GBK" "\0" "CP3372" "\0" "EUC-JP" "\0"; # endif #endif charset_aliases = cp; } return cp; } /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ #ifdef STATIC STATIC #endif const char * locale_charset (void) { const char *codeset; const char *aliases; #if !(defined WINDOWS_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET /* Most systems support nl_langinfo (CODESET) nowadays. */ codeset = nl_langinfo (CODESET); # ifdef __CYGWIN__ /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always returns "US-ASCII". Return the suffix of the locale name from the environment variables (if present) or the codepage as a number. */ if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) { const char *locale; static char buf[2 + 10 + 1]; locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } } /* The Windows API has a function returning the locale's codepage as a number: GetACP(). This encoding is used by Cygwin, unless the user has set the environment variable CYGWIN=codepage:oem (which very few people do). Output directed to console windows needs to be converted (to GetOEMCP() if the console is using a raster font, or to GetConsoleOutputCP() if it is using a TrueType font). Cygwin does this conversion transparently (see winsup/cygwin/fhandler_console.cc), converting to GetConsoleOutputCP(). This leads to correct results, except when SetConsoleOutputCP has been called and a raster font is in use. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; } # endif # else /* On old systems which lack it, use setlocale or getenv. */ const char *locale = NULL; /* But most old systems don't have a complete set of locales. Some (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the locale name the user has set. */ # if 0 locale = setlocale (LC_CTYPE, NULL); # endif if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } } /* On some old systems, one used to set locale = "iso8859_1". On others, you set it to "language_COUNTRY.charset". In any case, we resolve it through the charset.alias file. */ codeset = locale; # endif #elif defined WINDOWS_NATIVE static char buf[2 + 10 + 1]; /* The Windows API has a function returning the locale's codepage as a number, but the value doesn't change according to what the 'setlocale' call specified. So we use it as a last resort, in case the string returned by 'setlocale' doesn't specify the codepage. */ char *current_locale = setlocale (LC_ALL, NULL); char *pdot; /* If they set different locales for different categories, 'setlocale' will return a semi-colon separated list of locale values. To make sure we use the correct one, we choose LC_CTYPE. */ if (strchr (current_locale, ';')) current_locale = setlocale (LC_CTYPE, NULL); pdot = strrchr (current_locale, '.'); if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf)) sprintf (buf, "CP%s", pdot + 1); else { /* The Windows API has a function returning the locale's codepage as a number: GetACP(). When the output goes to a console window, it needs to be provided in GetOEMCP() encoding if the console is using a raster font, or in GetConsoleOutputCP() encoding if it is using a TrueType font. But in GUI programs and for output sent to files and pipes, GetACP() encoding is the best bet. */ sprintf (buf, "CP%u", GetACP ()); } codeset = buf; #elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; ULONG cp[3]; ULONG cplen; codeset = NULL; /* Allow user to override the codeset, as set in the operating system, with standard language environment variables. */ locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } /* For the POSIX locale, don't use the system's codepage. */ if (strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0) codeset = ""; } if (codeset == NULL) { /* OS/2 has a function returning the locale's codepage as a number. */ if (DosQueryCp (sizeof (cp), cp, &cplen)) codeset = ""; else { sprintf (buf, "CP%u", cp[0]); codeset = buf; } } #endif if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; /* Resolve alias. */ for (aliases = get_charset_aliases (); *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) if (strcmp (codeset, aliases) == 0 || (aliases[0] == '*' && aliases[1] == '\0')) { codeset = aliases + strlen (aliases) + 1; break; } /* Don't return an empty string. GNU libc and GNU libiconv interpret the empty string as denoting "the locale's character encoding", thus GNU libiconv would call this function a second time. */ if (codeset[0] == '\0') codeset = "ASCII"; #ifdef DARWIN7 /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" (the default codeset) does not work when MB_CUR_MAX is 1. */ if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1) codeset = "ASCII"; #endif return codeset; } pspp-1.0.1/gl/rijndael-api-fst.c0000644000175000017500000003455013124536243013325 00000000000000/* rijndael-api-fst.c --- Rijndael cipher implementation. * Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. * * This file is free software; you can 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, or (at your * option) any later version. * * This file is distributed in the hope that 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 file; if not, see . * */ /* Adapted for gnulib by Simon Josefsson. * * Based on public domain "Optimised C code" retrieved from (SHA1 * 7c8e4b00d06685d1dbc6724a9e0d502353de339e): * http://www.iaik.tu-graz.ac.at/research/krypto/AES/old/~rijmen/rijndael/rijndael-fst-3.0.zip */ #include /** * rijndael-api-fst.c * * @version 2.9 (December 2000) * * Optimised ANSI C code for the Rijndael cipher (now AES) * * @author Vincent Rijmen * @author Antoon Bosselaers * @author Paulo Barreto * * This code is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. * * Acknowledgements: * * We are deeply indebted to the following people for their bug reports, * fixes, and improvement suggestions to this implementation. Though we * tried to list all contributions, we apologise in advance for any * missing reference. * * Andrew Bales * Markus Friedl * John Skodon */ #include "rijndael-alg-fst.h" #include "rijndael-api-fst.h" #include #include #include rijndael_rc rijndaelMakeKey (rijndaelKeyInstance *key, rijndael_direction direction, size_t keyLen, const char *keyMaterial) { size_t i; char *keyMat; char cipherKey[RIJNDAEL_MAXKB]; if (key == NULL) { return RIJNDAEL_BAD_KEY_INSTANCE; } if ((direction == RIJNDAEL_DIR_ENCRYPT) || (direction == RIJNDAEL_DIR_DECRYPT)) { key->direction = direction; } else { return RIJNDAEL_BAD_KEY_DIR; } if ((keyLen == 128) || (keyLen == 192) || (keyLen == 256)) { key->keyLen = keyLen; } else { return RIJNDAEL_BAD_KEY_MAT; } if (keyMaterial != NULL) { strncpy (key->keyMaterial, keyMaterial, keyLen / 4); } /* initialize key schedule: */ keyMat = key->keyMaterial; for (i = 0; i < key->keyLen / 8; i++) { char t, v; t = *keyMat++; if ((t >= '0') && (t <= '9')) v = (t - '0') << 4; else if ((t >= 'a') && (t <= 'f')) v = (t - 'a' + 10) << 4; else if ((t >= 'A') && (t <= 'F')) v = (t - 'A' + 10) << 4; else return RIJNDAEL_BAD_KEY_MAT; t = *keyMat++; if ((t >= '0') && (t <= '9')) v ^= (t - '0'); else if ((t >= 'a') && (t <= 'f')) v ^= (t - 'a' + 10); else if ((t >= 'A') && (t <= 'F')) v ^= (t - 'A' + 10); else return RIJNDAEL_BAD_KEY_MAT; cipherKey[i] = v; } if (direction == RIJNDAEL_DIR_ENCRYPT) { key->Nr = rijndaelKeySetupEnc (key->rk, cipherKey, keyLen); } else { key->Nr = rijndaelKeySetupDec (key->rk, cipherKey, keyLen); } rijndaelKeySetupEnc (key->ek, cipherKey, keyLen); return 0; } rijndael_rc rijndaelCipherInit (rijndaelCipherInstance *cipher, rijndael_mode mode, const char *IV) { if ((mode == RIJNDAEL_MODE_ECB) || (mode == RIJNDAEL_MODE_CBC) || (mode == RIJNDAEL_MODE_CFB1)) { cipher->mode = mode; } else { return RIJNDAEL_BAD_CIPHER_MODE; } if (IV != NULL) { int i; for (i = 0; i < RIJNDAEL_MAX_IV_SIZE; i++) { int t, j; t = IV[2 * i]; if ((t >= '0') && (t <= '9')) j = (t - '0') << 4; else if ((t >= 'a') && (t <= 'f')) j = (t - 'a' + 10) << 4; else if ((t >= 'A') && (t <= 'F')) j = (t - 'A' + 10) << 4; else return RIJNDAEL_BAD_CIPHER_INSTANCE; t = IV[2 * i + 1]; if ((t >= '0') && (t <= '9')) j ^= (t - '0'); else if ((t >= 'a') && (t <= 'f')) j ^= (t - 'a' + 10); else if ((t >= 'A') && (t <= 'F')) j ^= (t - 'A' + 10); else return RIJNDAEL_BAD_CIPHER_INSTANCE; cipher->IV[i] = (uint8_t) j; } } else { memset (cipher->IV, 0, RIJNDAEL_MAX_IV_SIZE); } return 0; } int rijndaelBlockEncrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputLen, char *outBuffer) { size_t i, k, t, numBlocks; union { char bytes[16]; uint32_t words[4]; } block; char *iv; if (cipher == NULL || key == NULL || key->direction == RIJNDAEL_DIR_DECRYPT) { return RIJNDAEL_BAD_CIPHER_STATE; } if (input == NULL || inputLen <= 0) { return 0; /* nothing to do */ } numBlocks = inputLen / 128; switch (cipher->mode) { case RIJNDAEL_MODE_ECB: for (i = numBlocks; i > 0; i--) { rijndaelEncrypt (key->rk, key->Nr, input, outBuffer); input += 16; outBuffer += 16; } break; case RIJNDAEL_MODE_CBC: iv = cipher->IV; for (i = numBlocks; i > 0; i--) { block.words[0] = ((uint32_t *) input)[0] ^ ((uint32_t *) iv)[0]; block.words[1] = ((uint32_t *) input)[1] ^ ((uint32_t *) iv)[1]; block.words[2] = ((uint32_t *) input)[2] ^ ((uint32_t *) iv)[2]; block.words[3] = ((uint32_t *) input)[3] ^ ((uint32_t *) iv)[3]; rijndaelEncrypt (key->rk, key->Nr, block.bytes, outBuffer); memcpy (cipher->IV, outBuffer, 16); input += 16; outBuffer += 16; } break; case RIJNDAEL_MODE_CFB1: iv = cipher->IV; for (i = numBlocks; i > 0; i--) { memcpy (outBuffer, input, 16); for (k = 0; k < 128; k++) { rijndaelEncrypt (key->ek, key->Nr, iv, block.bytes); outBuffer[k >> 3] ^= (block.bytes[0] & 0x80U) >> (k & 7); for (t = 0; t < 15; t++) { iv[t] = (iv[t] << 1) | (iv[t + 1] >> 7); } iv[15] = (iv[15] << 1) | ((outBuffer[k >> 3] >> (7 - (k & 7))) & 1); } outBuffer += 16; input += 16; } break; default: return RIJNDAEL_BAD_CIPHER_STATE; } return 128 * numBlocks; } int rijndaelPadEncrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputOctets, char *outBuffer) { size_t i, numBlocks, padLen; union { char bytes[16]; uint32_t words[4]; } block; char *iv; if (cipher == NULL || key == NULL || key->direction == RIJNDAEL_DIR_DECRYPT) { return RIJNDAEL_BAD_CIPHER_STATE; } if (input == NULL || inputOctets <= 0) { return 0; /* nothing to do */ } numBlocks = inputOctets / 16; switch (cipher->mode) { case RIJNDAEL_MODE_ECB: for (i = numBlocks; i > 0; i--) { rijndaelEncrypt (key->rk, key->Nr, input, outBuffer); input += 16; outBuffer += 16; } padLen = 16 - (inputOctets - 16 * numBlocks); assert (padLen > 0 && padLen <= 16); memcpy (block.bytes, input, 16 - padLen); memset (block.bytes + 16 - padLen, padLen, padLen); rijndaelEncrypt (key->rk, key->Nr, block.bytes, outBuffer); break; case RIJNDAEL_MODE_CBC: iv = cipher->IV; for (i = numBlocks; i > 0; i--) { block.words[0] = ((uint32_t *) input)[0] ^ ((uint32_t *) iv)[0]; block.words[1] = ((uint32_t *) input)[1] ^ ((uint32_t *) iv)[1]; block.words[2] = ((uint32_t *) input)[2] ^ ((uint32_t *) iv)[2]; block.words[3] = ((uint32_t *) input)[3] ^ ((uint32_t *) iv)[3]; rijndaelEncrypt (key->rk, key->Nr, block.bytes, outBuffer); memcpy (cipher->IV, outBuffer, 16); input += 16; outBuffer += 16; } padLen = 16 - (inputOctets - 16 * numBlocks); assert (padLen > 0 && padLen <= 16); for (i = 0; i < 16 - padLen; i++) { block.bytes[i] = input[i] ^ iv[i]; } for (i = 16 - padLen; i < 16; i++) { block.bytes[i] = (char) padLen ^ iv[i]; } rijndaelEncrypt (key->rk, key->Nr, block.bytes, outBuffer); memcpy (cipher->IV, outBuffer, 16); break; default: return RIJNDAEL_BAD_CIPHER_STATE; } return 16 * (numBlocks + 1); } int rijndaelBlockDecrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputLen, char *outBuffer) { size_t i, k, t, numBlocks; union { char bytes[16]; uint32_t words[4]; } block; char *iv; if (cipher == NULL || key == NULL || (cipher->mode != RIJNDAEL_MODE_CFB1 && key->direction == RIJNDAEL_DIR_ENCRYPT)) { return RIJNDAEL_BAD_CIPHER_STATE; } if (input == NULL || inputLen <= 0) { return 0; /* nothing to do */ } numBlocks = inputLen / 128; switch (cipher->mode) { case RIJNDAEL_MODE_ECB: for (i = numBlocks; i > 0; i--) { rijndaelDecrypt (key->rk, key->Nr, input, outBuffer); input += 16; outBuffer += 16; } break; case RIJNDAEL_MODE_CBC: iv = cipher->IV; for (i = numBlocks; i > 0; i--) { rijndaelDecrypt (key->rk, key->Nr, input, block.bytes); block.words[0] ^= ((uint32_t *) iv)[0]; block.words[1] ^= ((uint32_t *) iv)[1]; block.words[2] ^= ((uint32_t *) iv)[2]; block.words[3] ^= ((uint32_t *) iv)[3]; memcpy (cipher->IV, input, 16); memcpy (outBuffer, block.bytes, 16); input += 16; outBuffer += 16; } break; case RIJNDAEL_MODE_CFB1: iv = cipher->IV; for (i = numBlocks; i > 0; i--) { memcpy (outBuffer, input, 16); for (k = 0; k < 128; k++) { rijndaelEncrypt (key->ek, key->Nr, iv, block.bytes); for (t = 0; t < 15; t++) { iv[t] = (iv[t] << 1) | (iv[t + 1] >> 7); } iv[15] = (iv[15] << 1) | ((input[k >> 3] >> (7 - (k & 7))) & 1); outBuffer[k >> 3] ^= (block.bytes[0] & 0x80U) >> (k & 7); } outBuffer += 16; input += 16; } break; default: return RIJNDAEL_BAD_CIPHER_STATE; } return 128 * numBlocks; } int rijndaelPadDecrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputOctets, char *outBuffer) { size_t i, numBlocks, padLen; union { char bytes[16]; uint32_t words[4]; } block; char *iv; if (cipher == NULL || key == NULL || key->direction == RIJNDAEL_DIR_ENCRYPT) { return RIJNDAEL_BAD_CIPHER_STATE; } if (input == NULL || inputOctets <= 0) { return 0; /* nothing to do */ } if (inputOctets % 16 != 0) { return RIJNDAEL_BAD_DATA; } numBlocks = inputOctets / 16; switch (cipher->mode) { case RIJNDAEL_MODE_ECB: /* all blocks but last */ for (i = numBlocks - 1; i > 0; i--) { rijndaelDecrypt (key->rk, key->Nr, input, outBuffer); input += 16; outBuffer += 16; } /* last block */ rijndaelDecrypt (key->rk, key->Nr, input, block.bytes); padLen = block.bytes[15]; if (padLen >= 16) { return RIJNDAEL_BAD_DATA; } for (i = 16 - padLen; i < 16; i++) { if (block.bytes[i] != padLen) { return RIJNDAEL_BAD_DATA; } } memcpy (outBuffer, block.bytes, 16 - padLen); break; case RIJNDAEL_MODE_CBC: iv = cipher->IV; /* all blocks but last */ for (i = numBlocks - 1; i > 0; i--) { rijndaelDecrypt (key->rk, key->Nr, input, block.bytes); block.words[0] ^= ((uint32_t *) iv)[0]; block.words[1] ^= ((uint32_t *) iv)[1]; block.words[2] ^= ((uint32_t *) iv)[2]; block.words[3] ^= ((uint32_t *) iv)[3]; memcpy (iv, input, 16); memcpy (outBuffer, block.bytes, 16); input += 16; outBuffer += 16; } /* last block */ rijndaelDecrypt (key->rk, key->Nr, input, block.bytes); block.words[0] ^= ((uint32_t *) iv)[0]; block.words[1] ^= ((uint32_t *) iv)[1]; block.words[2] ^= ((uint32_t *) iv)[2]; block.words[3] ^= ((uint32_t *) iv)[3]; padLen = block.bytes[15]; if (padLen <= 0 || padLen > 16) { return RIJNDAEL_BAD_DATA; } for (i = 16 - padLen; i < 16; i++) { if (block.bytes[i] != padLen) { return RIJNDAEL_BAD_DATA; } } memcpy (outBuffer, block.bytes, 16 - padLen); break; default: return RIJNDAEL_BAD_CIPHER_STATE; } return 16 * numBlocks - padLen; } pspp-1.0.1/gl/msvc-nothrow.c0000644000175000017500000000251413124536242012634 00000000000000/* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. Copyright (C) 2011-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include "msvc-nothrow.h" /* Get declarations of the native Windows API functions. */ #define WIN32_LEAN_AND_MEAN #include #if HAVE_MSVC_INVALID_PARAMETER_HANDLER # include "msvc-inval.h" #endif #undef _get_osfhandle #if HAVE_MSVC_INVALID_PARAMETER_HANDLER intptr_t _gl_nothrow_get_osfhandle (int fd) { intptr_t result; TRY_MSVC_INVAL { result = _get_osfhandle (fd); } CATCH_MSVC_INVAL { result = (intptr_t) INVALID_HANDLE_VALUE; } DONE_MSVC_INVAL; return result; } #endif pspp-1.0.1/gl/allocator.h0000644000175000017500000000423413124536241012153 00000000000000/* Memory allocators such as malloc+free. Copyright (C) 2011-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paul Eggert. */ #ifndef _GL_ALLOCATOR_H #define _GL_ALLOCATOR_H #include /* An object describing a memory allocator family. */ struct allocator { /* Do not use GCC attributes such as __attribute__ ((malloc)) with the function types pointed at by these members, because these attributes do not work with pointers to functions. See . */ /* Call ALLOCATE to allocate memory, like 'malloc'. On failure ALLOCATE should return NULL, though not necessarily set errno. When given a zero size it may return NULL even if successful. */ void *(*allocate) (size_t); /* If nonnull, call REALLOCATE to reallocate memory, like 'realloc'. On failure REALLOCATE should return NULL, though not necessarily set errno. When given a zero size it may return NULL even if successful. */ void *(*reallocate) (void *, size_t); /* Call FREE to free memory, like 'free'. */ void (*free) (void *); /* If nonnull, call DIE (SIZE) if MALLOC (SIZE) or REALLOC (..., SIZE) fails. DIE should not return. SIZE should equal SIZE_MAX if size_t overflow was detected while calculating sizes to be passed to MALLOC or REALLOC. */ void (*die) (size_t); }; /* An allocator using the stdlib functions and a null DIE function. */ extern struct allocator const stdlib_allocator; #endif /* _GL_ALLOCATOR_H */ pspp-1.0.1/gl/printf.c0000644000175000017500000000222213124536242011464 00000000000000/* Formatted output to a stream. Copyright (C) 2007, 2010-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifdef HAVE_CONFIG_H # include #endif /* Specification. */ #include #include /* Print formatted output to standard output. Return string length of formatted string. On error, return a negative value. */ int printf (const char *format, ...) { int retval; va_list args; va_start (args, format); retval = vfprintf (stdout, format, args); va_end (args); return retval; } pspp-1.0.1/gl/careadlinkat.c0000644000175000017500000001127713124536241012615 00000000000000/* Read symbolic links into a buffer without size limitation, relative to fd. Copyright (C) 2001, 2003-2004, 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #include #include "careadlinkat.h" #include #include #include #include /* Define this independently so that stdint.h is not a prerequisite. */ #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif #include "allocator.h" /* Assuming the current directory is FD, get the symbolic link value of FILENAME as a null-terminated string and put it into a buffer. If FD is AT_FDCWD, FILENAME is interpreted relative to the current working directory, as in openat. If the link is small enough to fit into BUFFER put it there. BUFFER's size is BUFFER_SIZE, and BUFFER can be null if BUFFER_SIZE is zero. If the link is not small, put it into a dynamically allocated buffer managed by ALLOC. It is the caller's responsibility to free the returned value if it is nonnull and is not BUFFER. A null ALLOC stands for the standard allocator. The PREADLINKAT function specifies how to read links. It operates like POSIX readlinkat() but can assume that its first argument is the same as FD. If successful, return the buffer address; otherwise return NULL and set errno. */ char * careadlinkat (int fd, char const *filename, char *buffer, size_t buffer_size, struct allocator const *alloc, ssize_t (*preadlinkat) (int, char const *, char *, size_t)) { char *buf; size_t buf_size; size_t buf_size_max = SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; char stack_buf[1024]; if (! alloc) alloc = &stdlib_allocator; if (! buffer_size) { /* Allocate the initial buffer on the stack. This way, in the common case of a symlink of small size, we get away with a single small malloc() instead of a big malloc() followed by a shrinking realloc(). */ buffer = stack_buf; buffer_size = sizeof stack_buf; } buf = buffer; buf_size = buffer_size; do { /* Attempt to read the link into the current buffer. */ ssize_t link_length = preadlinkat (fd, filename, buf, buf_size); size_t link_size; if (link_length < 0) { /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1 with errno == ERANGE if the buffer is too small. */ int readlinkat_errno = errno; if (readlinkat_errno != ERANGE) { if (buf != buffer) { alloc->free (buf); errno = readlinkat_errno; } return NULL; } } link_size = link_length; if (link_size < buf_size) { buf[link_size++] = '\0'; if (buf == stack_buf) { char *b = (char *) alloc->allocate (link_size); buf_size = link_size; if (! b) break; memcpy (b, buf, link_size); buf = b; } else if (link_size < buf_size && buf != buffer && alloc->reallocate) { /* Shrink BUF before returning it. */ char *b = (char *) alloc->reallocate (buf, link_size); if (b) buf = b; } return buf; } if (buf != buffer) alloc->free (buf); if (buf_size <= buf_size_max / 2) buf_size *= 2; else if (buf_size < buf_size_max) buf_size = buf_size_max; else if (buf_size_max < SIZE_MAX) { errno = ENAMETOOLONG; return NULL; } else break; buf = (char *) alloc->allocate (buf_size); } while (buf); if (alloc->die) alloc->die (buf_size); errno = ENOMEM; return NULL; } pspp-1.0.1/gl/getopt1.c0000644000175000017500000000733013124536242011552 00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987-2017 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. The GNU C 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 3 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see . */ #ifndef _LIBC # include #endif #include "getopt.h" #include "getopt_int.h" int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 0, 0); } int _getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 0, d, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 1, 0); } int _getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d, 0); } #ifdef TEST #include #include int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static const struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value '%s'\n", optarg); break; case 'd': printf ("option d with value '%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ pspp-1.0.1/gl/setenv.c0000644000175000017500000002502613124536243011476 00000000000000/* Copyright (C) 1992, 1995-2003, 2005-2017 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 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 . */ #if !_LIBC /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the name == NULL test below. */ # define _GL_ARG_NONNULL(params) # define _GL_USE_STDLIB_ALLOC 1 # include #endif #include /* Specification. */ #include #include #ifndef __set_errno # define __set_errno(ev) ((errno) = (ev)) #endif #include #if _LIBC || HAVE_UNISTD_H # include #endif #if !_LIBC # include "malloca.h" #endif #if _LIBC || !HAVE_SETENV #if !_LIBC # define __environ environ #endif #if _LIBC /* This lock protects against simultaneous modifications of 'environ'. */ # include __libc_lock_define_initialized (static, envlock) # define LOCK __libc_lock_lock (envlock) # define UNLOCK __libc_lock_unlock (envlock) #else # define LOCK # define UNLOCK #endif /* In the GNU C library we must keep the namespace clean. */ #ifdef _LIBC # define setenv __setenv # define clearenv __clearenv # define tfind __tfind # define tsearch __tsearch #endif /* In the GNU C library implementation we try to be more clever and allow arbitrarily many changes of the environment given that the used values are from a small set. Outside glibc this will eat up all memory after a while. */ #if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \ && defined __GNUC__) # define USE_TSEARCH 1 # include typedef int (*compar_fn_t) (const void *, const void *); /* This is a pointer to the root of the search tree with the known values. */ static void *known_values; # define KNOWN_VALUE(Str) \ ({ \ void *value = tfind (Str, &known_values, (compar_fn_t) strcmp); \ value != NULL ? *(char **) value : NULL; \ }) # define STORE_VALUE(Str) \ tsearch (Str, &known_values, (compar_fn_t) strcmp) #else # undef USE_TSEARCH # define KNOWN_VALUE(Str) NULL # define STORE_VALUE(Str) do { } while (0) #endif /* If this variable is not a null pointer we allocated the current environment. */ static char **last_environ; /* This function is used by 'setenv' and 'putenv'. The difference between the two functions is that for the former must create a new string which is then placed in the environment, while the argument of 'putenv' must be used directly. This is all complicated by the fact that we try to reuse values once generated for a 'setenv' call since we can never free the strings. */ int __add_to_environ (const char *name, const char *value, const char *combined, int replace) { char **ep; size_t size; const size_t namelen = strlen (name); const size_t vallen = value != NULL ? strlen (value) + 1 : 0; LOCK; /* We have to get the pointer now that we have the lock and not earlier since another thread might have created a new environment. */ ep = __environ; size = 0; if (ep != NULL) { for (; *ep != NULL; ++ep) if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=') break; else ++size; } if (ep == NULL || *ep == NULL) { char **new_environ; #ifdef USE_TSEARCH char *new_value; #endif /* We allocated this space; we can extend it. */ new_environ = (char **) (last_environ == NULL ? malloc ((size + 2) * sizeof (char *)) : realloc (last_environ, (size + 2) * sizeof (char *))); if (new_environ == NULL) { /* It's easier to set errno to ENOMEM than to rely on the 'malloc-posix' and 'realloc-posix' gnulib modules. */ __set_errno (ENOMEM); UNLOCK; return -1; } /* If the whole entry is given add it. */ if (combined != NULL) /* We must not add the string to the search tree since it belongs to the user. */ new_environ[size] = (char *) combined; else { /* See whether the value is already known. */ #ifdef USE_TSEARCH # ifdef _LIBC new_value = (char *) alloca (namelen + 1 + vallen); __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), value, vallen); # else new_value = (char *) malloca (namelen + 1 + vallen); if (new_value == NULL) { __set_errno (ENOMEM); UNLOCK; return -1; } memcpy (new_value, name, namelen); new_value[namelen] = '='; memcpy (&new_value[namelen + 1], value, vallen); # endif new_environ[size] = KNOWN_VALUE (new_value); if (new_environ[size] == NULL) #endif { new_environ[size] = (char *) malloc (namelen + 1 + vallen); if (new_environ[size] == NULL) { #if defined USE_TSEARCH && !defined _LIBC freea (new_value); #endif __set_errno (ENOMEM); UNLOCK; return -1; } #ifdef USE_TSEARCH memcpy (new_environ[size], new_value, namelen + 1 + vallen); #else memcpy (new_environ[size], name, namelen); new_environ[size][namelen] = '='; memcpy (&new_environ[size][namelen + 1], value, vallen); #endif /* And save the value now. We cannot do this when we remove the string since then we cannot decide whether it is a user string or not. */ STORE_VALUE (new_environ[size]); } #if defined USE_TSEARCH && !defined _LIBC freea (new_value); #endif } if (__environ != last_environ) memcpy ((char *) new_environ, (char *) __environ, size * sizeof (char *)); new_environ[size + 1] = NULL; last_environ = __environ = new_environ; } else if (replace) { char *np; /* Use the user string if given. */ if (combined != NULL) np = (char *) combined; else { #ifdef USE_TSEARCH char *new_value; # ifdef _LIBC new_value = alloca (namelen + 1 + vallen); __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), value, vallen); # else new_value = malloca (namelen + 1 + vallen); if (new_value == NULL) { __set_errno (ENOMEM); UNLOCK; return -1; } memcpy (new_value, name, namelen); new_value[namelen] = '='; memcpy (&new_value[namelen + 1], value, vallen); # endif np = KNOWN_VALUE (new_value); if (np == NULL) #endif { np = (char *) malloc (namelen + 1 + vallen); if (np == NULL) { #if defined USE_TSEARCH && !defined _LIBC freea (new_value); #endif __set_errno (ENOMEM); UNLOCK; return -1; } #ifdef USE_TSEARCH memcpy (np, new_value, namelen + 1 + vallen); #else memcpy (np, name, namelen); np[namelen] = '='; memcpy (&np[namelen + 1], value, vallen); #endif /* And remember the value. */ STORE_VALUE (np); } #if defined USE_TSEARCH && !defined _LIBC freea (new_value); #endif } *ep = np; } UNLOCK; return 0; } int setenv (const char *name, const char *value, int replace) { if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) { __set_errno (EINVAL); return -1; } return __add_to_environ (name, value, NULL, replace); } /* The 'clearenv' was planned to be added to POSIX.1 but probably never made it. Nevertheless the POSIX.9 standard (POSIX bindings for Fortran 77) requires this function. */ int clearenv (void) { LOCK; if (__environ == last_environ && __environ != NULL) { /* We allocated this environment so we can free it. */ free (__environ); last_environ = NULL; } /* Clear the environment pointer removes the whole environment. */ __environ = NULL; UNLOCK; return 0; } #ifdef _LIBC static void free_mem (void) { /* Remove all traces. */ clearenv (); /* Now remove the search tree. */ __tdestroy (known_values, free); known_values = NULL; } text_set_element (__libc_subfreeres, free_mem); # undef setenv # undef clearenv weak_alias (__setenv, setenv) weak_alias (__clearenv, clearenv) #endif #endif /* _LIBC || !HAVE_SETENV */ /* The rest of this file is called into use when replacing an existing but buggy setenv. Known bugs include failure to diagnose invalid name, and consuming a leading '=' from value. */ #if HAVE_SETENV # undef setenv # if !HAVE_DECL_SETENV extern int setenv (const char *, const char *, int); # endif # define STREQ(a, b) (strcmp (a, b) == 0) int rpl_setenv (const char *name, const char *value, int replace) { int result; if (!name || !*name || strchr (name, '=')) { errno = EINVAL; return -1; } /* Call the real setenv even if replace is 0, in case implementation has underlying data to update, such as when environ changes. */ result = setenv (name, value, replace); if (result == 0 && replace && *value == '=') { char *tmp = getenv (name); if (!STREQ (tmp, value)) { int saved_errno; size_t len = strlen (value); tmp = malloca (len + 2); /* Since leading '=' is eaten, double it up. */ *tmp = '='; memcpy (tmp + 1, value, len + 1); result = setenv (name, tmp, replace); saved_errno = errno; freea (tmp); errno = saved_errno; } } return result; } #endif /* HAVE_SETENV */ pspp-1.0.1/gl/basename-lgpl.c0000644000175000017500000000406113124536241012673 00000000000000/* basename.c -- return the last element in a file name Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include "dirname.h" #include /* Return the address of the last file name component of NAME. If NAME has no relative file name components because it is a file system root, return the empty string. */ char * last_component (char const *name) { char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); char const *p; bool saw_slash = false; while (ISSLASH (*base)) base++; for (p = base; *p; p++) { if (ISSLASH (*p)) saw_slash = true; else if (saw_slash) { base = p; saw_slash = false; } } return (char *) base; } /* Return the length of the basename NAME. Typically NAME is the value returned by base_name or last_component. Act like strlen (NAME), except omit all trailing slashes. */ size_t base_len (char const *name) { size_t len; size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) continue; if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1 && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) return 2; if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len && len == prefix_len && ISSLASH (name[prefix_len])) return prefix_len + 1; return len; } pspp-1.0.1/gl/malloc.c0000644000175000017500000000273213124536242011437 00000000000000/* malloc() function that is glibc compatible. Copyright (C) 1997-1998, 2006-2007, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* written by Jim Meyering and Bruno Haible */ #define _GL_USE_STDLIB_ALLOC 1 #include /* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ #ifdef malloc # define NEED_MALLOC_GNU 1 # undef malloc /* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ #elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU # define NEED_MALLOC_GNU 1 #endif #include #include /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ void * rpl_malloc (size_t n) { void *result; #if NEED_MALLOC_GNU if (n == 0) n = 1; #endif result = malloc (n); #if !HAVE_MALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } pspp-1.0.1/gl/mbiter.c0000644000175000017500000000012013020461274011434 00000000000000#include #define MBITER_INLINE _GL_EXTERN_INLINE #include "mbiter.h" pspp-1.0.1/gl/vasnprintf.h0000644000175000017500000000560013124536243012365 00000000000000/* vsprintf with automatic memory allocation. Copyright (C) 2002-2004, 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #ifndef _VASNPRINTF_H #define _VASNPRINTF_H /* Get va_list. */ #include /* Get size_t. */ #include /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). You can pass a preallocated buffer for the result in RESULTBUF and its size in *LENGTHP; otherwise you pass RESULTBUF = NULL. If successful, return the address of the string (this may be = RESULTBUF if no dynamic memory allocation was necessary) and set *LENGTHP to the number of resulting bytes, excluding the trailing NUL. Upon error, set errno and return NULL. When dynamic memory allocation occurs, the preallocated buffer is left alone (with possibly modified contents). This makes it possible to use a statically allocated or stack-allocated buffer, like this: char buf[100]; size_t len = sizeof (buf); char *output = vasnprintf (buf, &len, format, args); if (output == NULL) ... error handling ...; else { ... use the output string ...; if (output != buf) free (output); } */ #if REPLACE_VASNPRINTF # define asnprintf rpl_asnprintf # define vasnprintf rpl_vasnprintf #endif extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0)); #ifdef __cplusplus } #endif #endif /* _VASNPRINTF_H */ pspp-1.0.1/gl/xalloc-oversized.h0000644000175000017500000000442413124536243013470 00000000000000/* xalloc-oversized.h -- memory allocation size checking Copyright (C) 1990-2000, 2003-2004, 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef XALLOC_OVERSIZED_H_ #define XALLOC_OVERSIZED_H_ #include #include /* True if N * S would overflow in a size_t calculation, or would generate a value larger than PTRDIFF_MAX. This expands to a constant expression if N and S are both constants. By gnulib convention, SIZE_MAX represents overflow in size calculations, so the conservative size_t-based dividend to use here is SIZE_MAX - 1. */ #define __xalloc_oversized(n, s) \ ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) < (n)) #if PTRDIFF_MAX < SIZE_MAX typedef ptrdiff_t __xalloc_count_type; #else typedef size_t __xalloc_count_type; #endif /* Return 1 if an array of N objects, each of size S, cannot exist reliably due to size or ptrdiff_t arithmetic overflow. S must be positive and N must be nonnegative. This is a macro, not a function, so that it works correctly even when SIZE_MAX < N. */ #if 7 <= __GNUC__ # define xalloc_oversized(n, s) \ __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) #elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ # define xalloc_oversized(n, s) \ (__builtin_constant_p (n) && __builtin_constant_p (s) \ ? __xalloc_oversized (n, s) \ : ({ __xalloc_count_type __xalloc_count; \ __builtin_mul_overflow (n, s, &__xalloc_count); })) /* Other compilers use integer division; this may be slower but is more portable. */ #else # define xalloc_oversized(n, s) __xalloc_oversized (n, s) #endif #endif /* !XALLOC_OVERSIZED_H_ */ pspp-1.0.1/gl/float.in.h0000644000175000017500000001676713124536241011723 00000000000000/* A correct . Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #ifndef _@GUARD_PREFIX@_FLOAT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FLOAT_H@ #ifndef _@GUARD_PREFIX@_FLOAT_H #define _@GUARD_PREFIX@_FLOAT_H /* 'long double' properties. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 64 /* Number of decimal digits that is sufficient for representing a number. */ # undef LDBL_DIG # define LDBL_DIG 18 /* x-1 where x is the smallest representable number > 1. */ # undef LDBL_EPSILON # define LDBL_EPSILON 1.0842021724855044340E-19L /* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) /* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ # undef LDBL_MAX_EXP # define LDBL_MAX_EXP 16384 /* Minimum positive normalized number. */ # undef LDBL_MIN # define LDBL_MIN 3.3621031431120935063E-4932L /* Maximum representable finite number. */ # undef LDBL_MAX # define LDBL_MAX 1.1897314953572317650E+4932L /* Minimum e such that 10^e is in the range of normalized numbers. */ # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP (-4931) /* Maximum e such that 10^e is in the range of representable finite numbers. */ # undef LDBL_MAX_10_EXP # define LDBL_MAX_10_EXP 4932 #endif /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of precision in the compiler but 64 bits of precision at runtime. See . */ #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 64 /* Number of decimal digits that is sufficient for representing a number. */ # undef LDBL_DIG # define LDBL_DIG 18 /* x-1 where x is the smallest representable number > 1. */ # undef LDBL_EPSILON # define LDBL_EPSILON 1.084202172485504434007452800869941711426e-19L /* 2^-63 */ /* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) /* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ # undef LDBL_MAX_EXP # define LDBL_MAX_EXP 16384 /* Minimum positive normalized number. */ # undef LDBL_MIN # define LDBL_MIN 3.3621031431120935E-4932L /* = 0x1p-16382L */ /* Maximum representable finite number. */ # undef LDBL_MAX /* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }. But the largest literal that GCC allows us to write is 0x0.fffffffffffff8p16384L = { 0xFFFFF800, 0xFFFFFFFF, 32766 }. So, define it like this through a reference to an external variable const unsigned int LDBL_MAX[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }; extern const long double LDBL_MAX; Unfortunately, this is not a constant expression. */ union gl_long_double_union { struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd; long double ld; }; extern const union gl_long_double_union gl_LDBL_MAX; # define LDBL_MAX (gl_LDBL_MAX.ld) /* Minimum e such that 10^e is in the range of normalized numbers. */ # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP (-4931) /* Maximum e such that 10^e is in the range of representable finite numbers. */ # undef LDBL_MAX_10_EXP # define LDBL_MAX_10_EXP 4932 #endif /* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are wrong. On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */ #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP DBL_MIN_10_EXP # undef LDBL_MIN # define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ #endif #if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ # undef LDBL_MAX /* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }. It is not easy to define: #define LDBL_MAX 1.79769313486231580793728971405302307166e308L is too small, whereas #define LDBL_MAX 1.79769313486231580793728971405302307167e308L is too large. Apparently a bug in GCC decimal-to-binary conversion. Also, I can't get values larger than #define LDBL63 ((long double) (1ULL << 63)) #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) #define LDBL945 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) #define LDBL1008 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) #define LDBL_MAX (LDBL1008 * 65535.0L + LDBL945 * (long double) 9223372036821221375ULL + LDBL882 * (long double) 4611686018427387904ULL) which is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xF8000000 }. So, define it like this through a reference to an external variable const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL }; extern const long double LDBL_MAX; or through a pointer cast #define LDBL_MAX \ (*(const long double *) (double[]) { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL }) Unfortunately, this is not a constant expression, and the latter expression does not work well when GCC is optimizing.. */ union gl_long_double_union { struct { double hi; double lo; } dd; long double ld; }; extern const union gl_long_double_union gl_LDBL_MAX; # define LDBL_MAX (gl_LDBL_MAX.ld) #endif /* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong. On IRIX 6.5, with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_EPSILON are wrong. */ #if defined __sgi && (LDBL_MANT_DIG >= 106) # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 106 # if defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP DBL_MIN_10_EXP # undef LDBL_MIN # define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ # undef LDBL_EPSILON # define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */ # endif #endif #if @REPLACE_ITOLD@ /* Pull in a function that fixes the 'int' to 'long double' conversion of glibc 2.7. */ extern # ifdef __cplusplus "C" # endif void _Qp_itoq (long double *, int); static void (*_gl_float_fix_itold) (long double *, int) = _Qp_itoq; #endif #endif /* _@GUARD_PREFIX@_FLOAT_H */ #endif /* _@GUARD_PREFIX@_FLOAT_H */ pspp-1.0.1/gl/hard-locale.c0000644000175000017500000000414513124536242012343 00000000000000/* hard-locale.c -- Determine whether a locale is hard. Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #include "hard-locale.h" #include #include #include #ifdef __GLIBC__ # define GLIBC_VERSION __GLIBC__ #elif defined __UCLIBC__ # define GLIBC_VERSION 2 #else # define GLIBC_VERSION 0 #endif /* Return true if the current CATEGORY locale is hard, i.e. if you can't get away with assuming traditional C or POSIX behavior. */ bool hard_locale (int category) { bool hard = true; char const *p = setlocale (category, NULL); if (p) { if (2 <= GLIBC_VERSION) { if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0) hard = false; } else { char *locale = strdup (p); if (locale) { /* Temporarily set the locale to the "C" and "POSIX" locales to find their names, so that we can determine whether one or the other is the caller's locale. */ if (((p = setlocale (category, "C")) && strcmp (p, locale) == 0) || ((p = setlocale (category, "POSIX")) && strcmp (p, locale) == 0)) hard = false; /* Restore the caller's locale. */ setlocale (category, locale); free (locale); } } } return hard; } pspp-1.0.1/gl/printf-frexp.c0000644000175000017500000001231613124536242012613 00000000000000/* Split a double into fraction and mantissa, for hexadecimal printf. Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #if ! defined USE_LONG_DOUBLE # include #endif /* Specification. */ #ifdef USE_LONG_DOUBLE # include "printf-frexpl.h" #else # include "printf-frexp.h" #endif #include #include #ifdef USE_LONG_DOUBLE # include "fpucw.h" #endif /* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater than 2, or not even a power of 2, some rounding errors can occur, so that then the returned mantissa is only guaranteed to be <= 2.0, not < 2.0. */ #ifdef USE_LONG_DOUBLE # define FUNC printf_frexpl # define DOUBLE long double # define MIN_EXP LDBL_MIN_EXP # if HAVE_FREXPL_IN_LIBC && HAVE_LDEXPL_IN_LIBC # define USE_FREXP_LDEXP # define FREXP frexpl # define LDEXP ldexpl # endif # define DECL_ROUNDING DECL_LONG_DOUBLE_ROUNDING # define BEGIN_ROUNDING() BEGIN_LONG_DOUBLE_ROUNDING () # define END_ROUNDING() END_LONG_DOUBLE_ROUNDING () # define L_(literal) literal##L #else # define FUNC printf_frexp # define DOUBLE double # define MIN_EXP DBL_MIN_EXP # if HAVE_FREXP_IN_LIBC && HAVE_LDEXP_IN_LIBC # define USE_FREXP_LDEXP # define FREXP frexp # define LDEXP ldexp # endif # define DECL_ROUNDING # define BEGIN_ROUNDING() # define END_ROUNDING() # define L_(literal) literal #endif DOUBLE FUNC (DOUBLE x, int *expptr) { int exponent; DECL_ROUNDING BEGIN_ROUNDING (); #ifdef USE_FREXP_LDEXP /* frexp and ldexp are usually faster than the loop below. */ x = FREXP (x, &exponent); x = x + x; exponent -= 1; if (exponent < MIN_EXP - 1) { x = LDEXP (x, exponent - (MIN_EXP - 1)); exponent = MIN_EXP - 1; } #else { /* Since the exponent is an 'int', it fits in 64 bits. Therefore the loops are executed no more than 64 times. */ DOUBLE pow2[64]; /* pow2[i] = 2^2^i */ DOUBLE powh[64]; /* powh[i] = 2^-2^i */ int i; exponent = 0; if (x >= L_(1.0)) { /* A nonnegative exponent. */ { DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x >= 1.0. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (x >= pow2_i) { exponent += (1 << i); x *= powh_i; } else break; pow2[i] = pow2_i; powh[i] = powh_i; } } /* Here 1.0 <= x < 2^2^i. */ } else { /* A negative exponent. */ { DOUBLE pow2_i; /* = pow2[i] */ DOUBLE powh_i; /* = powh[i] */ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i, x * 2^exponent = argument, x < 1.0, exponent >= MIN_EXP - 1. */ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5); ; i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i) { if (exponent - (1 << i) < MIN_EXP - 1) break; exponent -= (1 << i); x *= pow2_i; if (x >= L_(1.0)) break; pow2[i] = pow2_i; powh[i] = powh_i; } } /* Here either x < 1.0 and exponent - 2^i < MIN_EXP - 1 <= exponent, or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */ if (x < L_(1.0)) /* Invariants: x * 2^exponent = argument, x < 1.0 and exponent - 2^i < MIN_EXP - 1 <= exponent. */ while (i > 0) { i--; if (exponent - (1 << i) >= MIN_EXP - 1) { exponent -= (1 << i); x *= pow2[i]; if (x >= L_(1.0)) break; } } /* Here either x < 1.0 and exponent = MIN_EXP - 1, or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */ } /* Invariants: x * 2^exponent = argument, and either x < 1.0 and exponent = MIN_EXP - 1, or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */ while (i > 0) { i--; if (x >= pow2[i]) { exponent += (1 << i); x *= powh[i]; } } /* Here either x < 1.0 and exponent = MIN_EXP - 1, or 1.0 <= x < 2.0 and exponent >= MIN_EXP - 1. */ } #endif END_ROUNDING (); *expptr = exponent; return x; } pspp-1.0.1/gl/getopt.in.h0000644000175000017500000000405413124536242012103 00000000000000/* Declarations for getopt. Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library, which supplies a different version of this file. gnulib is free software; you can 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. gnulib is distributed in the hope that 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 gnulib; if not, see . */ #ifndef _@GUARD_PREFIX@_GETOPT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. We must also inform the replacement unistd.h to not recursively use ; our definitions will be present soon enough. */ #if @HAVE_GETOPT_H@ # define _GL_SYSTEM_GETOPT # @INCLUDE_NEXT@ @NEXT_GETOPT_H@ # undef _GL_SYSTEM_GETOPT #endif #define _@GUARD_PREFIX@_GETOPT_H 1 /* Standalone applications should #define __GETOPT_PREFIX to an identifier that prefixes the external functions and variables defined in getopt-core.h and getopt-ext.h. When this happens, include the headers that might declare getopt so that they will not cause confusion if included after this file (if the system had , we have already included it). */ #if defined __GETOPT_PREFIX # if !@HAVE_GETOPT_H@ # define __need_system_stdlib_h # include # undef __need_system_stdlib_h # include # include # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ #include #include #include #endif /* _@GUARD_PREFIX@_GETOPT_H */ pspp-1.0.1/gl/strerror.c0000644000175000017500000000405213124536243012050 00000000000000/* strerror.c --- POSIX compatible system error routine Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include /* Specification. */ #include #include #include #include #include #include "intprops.h" #include "strerror-override.h" #include "verify.h" /* Use the system functions, not the gnulib overrides in this file. */ #undef sprintf char * strerror (int n) #undef strerror { static char buf[STACKBUF_LEN]; size_t len; /* Cast away const, due to the historical signature of strerror; callers should not be modifying the string. */ const char *msg = strerror_override (n); if (msg) return (char *) msg; msg = strerror (n); /* Our strerror_r implementation might use the system's strerror buffer, so all other clients of strerror have to see the error copied into a buffer that we manage. This is not thread-safe, even if the system strerror is, but portable programs shouldn't be using strerror if they care about thread-safety. */ if (!msg || !*msg) { static char const fmt[] = "Unknown error %d"; verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n)); sprintf (buf, fmt, n); errno = EINVAL; return buf; } /* Fix STACKBUF_LEN if this ever aborts. */ len = strlen (msg); if (sizeof buf <= len) abort (); memcpy (buf, msg, len + 1); return buf; } pspp-1.0.1/gl/sys_time.in.h0000644000175000017500000001721513124536243012441 00000000000000/* Provide a more complete sys/time.h. Copyright (C) 2007-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ /* Written by Paul Eggert. */ #ifndef _@GUARD_PREFIX@_SYS_TIME_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* On Cygwin and on many BSDish systems, includes itself recursively via . Simply delegate to the system's header in this case; it is a no-op. Without this extra ifdef, the C++ gettimeofday declaration below would be a forward declaration in gnulib's nested . */ #if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ #else /* The include_next requires a split double-inclusion guard. */ #if @HAVE_SYS_TIME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ #endif #ifndef _@GUARD_PREFIX@_SYS_TIME_H #define _@GUARD_PREFIX@_SYS_TIME_H #if ! @HAVE_SYS_TIME_H@ # include #endif /* On native Windows with MSVC, get the 'struct timeval' type. Also, on native Windows with a 64-bit time_t, where we are overriding the 'struct timeval' type, get all declarations of system functions whose signature contains 'struct timeval'. */ #if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H # define _GL_INCLUDING_WINSOCK2_H # include # undef _GL_INCLUDING_WINSOCK2_H #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #ifdef __cplusplus extern "C" { #endif #if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@ # if @REPLACE_STRUCT_TIMEVAL@ # define timeval rpl_timeval # endif # if !GNULIB_defined_struct_timeval struct timeval { time_t tv_sec; long int tv_usec; }; # define GNULIB_defined_struct_timeval 1 # endif #endif #ifdef __cplusplus } #endif #if @GNULIB_GETTIMEOFDAY@ # if @REPLACE_GETTIMEOFDAY@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gettimeofday # define gettimeofday rpl_gettimeofday # endif _GL_FUNCDECL_RPL (gettimeofday, int, (struct timeval *restrict, void *restrict) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gettimeofday, int, (struct timeval *restrict, void *restrict)); # else # if !@HAVE_GETTIMEOFDAY@ _GL_FUNCDECL_SYS (gettimeofday, int, (struct timeval *restrict, void *restrict) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on glibc systems, by default, the second argument is struct timezone *. */ _GL_CXXALIAS_SYS_CAST (gettimeofday, int, (struct timeval *restrict, void *restrict)); # endif _GL_CXXALIASWARN (gettimeofday); # if defined __cplusplus && defined GNULIB_NAMESPACE namespace GNULIB_NAMESPACE { typedef ::timeval #undef timeval timeval; } # endif #elif defined GNULIB_POSIXCHECK # undef gettimeofday # if HAVE_RAW_DECL_GETTIMEOFDAY _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " "use gnulib module gettimeofday for portability"); # endif #endif /* Hide some function declarations from . */ #if defined _MSC_VER && @HAVE_WINSOCK2_H@ # if !defined _@GUARD_PREFIX@_UNISTD_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close close_used_without_including_unistd_h # else _GL_WARN_ON_USE (close, "close() used without including "); # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname gethostname_used_without_including_unistd_h # else _GL_WARN_ON_USE (gethostname, "gethostname() used without including "); # endif # endif # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef socket # define socket socket_used_without_including_sys_socket_h # undef connect # define connect connect_used_without_including_sys_socket_h # undef accept # define accept accept_used_without_including_sys_socket_h # undef bind # define bind bind_used_without_including_sys_socket_h # undef getpeername # define getpeername getpeername_used_without_including_sys_socket_h # undef getsockname # define getsockname getsockname_used_without_including_sys_socket_h # undef getsockopt # define getsockopt getsockopt_used_without_including_sys_socket_h # undef listen # define listen listen_used_without_including_sys_socket_h # undef recv # define recv recv_used_without_including_sys_socket_h # undef send # define send send_used_without_including_sys_socket_h # undef recvfrom # define recvfrom recvfrom_used_without_including_sys_socket_h # undef sendto # define sendto sendto_used_without_including_sys_socket_h # undef setsockopt # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h # else _GL_WARN_ON_USE (socket, "socket() used without including "); _GL_WARN_ON_USE (connect, "connect() used without including "); _GL_WARN_ON_USE (accept, "accept() used without including "); _GL_WARN_ON_USE (bind, "bind() used without including "); _GL_WARN_ON_USE (getpeername, "getpeername() used without including "); _GL_WARN_ON_USE (getsockname, "getsockname() used without including "); _GL_WARN_ON_USE (getsockopt, "getsockopt() used without including "); _GL_WARN_ON_USE (listen, "listen() used without including "); _GL_WARN_ON_USE (recv, "recv() used without including "); _GL_WARN_ON_USE (send, "send() used without including "); _GL_WARN_ON_USE (recvfrom, "recvfrom() used without including "); _GL_WARN_ON_USE (sendto, "sendto() used without including "); _GL_WARN_ON_USE (setsockopt, "setsockopt() used without including "); _GL_WARN_ON_USE (shutdown, "shutdown() used without including "); # endif # endif # if !defined _@GUARD_PREFIX@_SYS_SELECT_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef select # define select select_used_without_including_sys_select_h # else _GL_WARN_ON_USE (select, "select() used without including "); # endif # endif #endif #endif /* _@GUARD_PREFIX@_SYS_TIME_H */ #endif /* _CYGWIN_SYS_TIME_H */ #endif /* _@GUARD_PREFIX@_SYS_TIME_H */ pspp-1.0.1/gl/xmalloca.c0000644000175000017500000000205013124536243011762 00000000000000/* Safe automatic memory allocation with out of memory checking. Copyright (C) 2003, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 . */ #include /* Specification. */ #include "xmalloca.h" #include "xalloc.h" #if HAVE_ALLOCA void * xmmalloca (size_t n) { void *p; p = mmalloca (n); if (p == NULL) xalloc_die (); return p; } #endif pspp-1.0.1/gl/fcntl.in.h0000644000175000017500000002355513124536241011715 00000000000000/* Like , but with non-working flags defined to 0. Copyright (C) 2006-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* written by Paul Eggert */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_system_fcntl_h /* Special invocation convention. */ /* Needed before . May also define off_t to a 64-bit type on native Windows. */ #include /* On some systems other than glibc, is a prerequisite of . On glibc systems, we would like to avoid namespace pollution. But on glibc systems, includes inside an extern "C" { ... } block, which leads to errors in C++ mode with the overridden from gnulib. These errors are known to be gone with g++ version >= 4.3. */ #if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))) # include #endif #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_FCNTL_H /* Needed before . May also define off_t to a 64-bit type on native Windows. */ #include /* On some systems other than glibc, is a prerequisite of . On glibc systems, we would like to avoid namespace pollution. But on glibc systems, includes inside an extern "C" { ... } block, which leads to errors in C++ mode with the overridden from gnulib. These errors are known to be gone with g++ version >= 4.3. */ #if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))) # include #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ #ifndef _@GUARD_PREFIX@_FCNTL_H #define _@GUARD_PREFIX@_FCNTL_H #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ # include #endif /* Native Windows platforms declare open(), creat() in . */ #if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ #if @GNULIB_FCNTL@ # if @REPLACE_FCNTL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fcntl # define fcntl rpl_fcntl # endif _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...)); _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...)); # else # if !@HAVE_FCNTL@ _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...)); # endif _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...)); # endif _GL_CXXALIASWARN (fcntl); #elif defined GNULIB_POSIXCHECK # undef fcntl # if HAVE_RAW_DECL_FCNTL _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " "use gnulib module fcntl for portability"); # endif #endif #if @GNULIB_OPEN@ # if @REPLACE_OPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef open # define open rpl_open # endif _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); # else _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); # endif /* On HP-UX 11, in C++ mode, open() is defined as an inline function with a default argument. _GL_CXXALIASWARN does not work in this case. */ # if !defined __hpux _GL_CXXALIASWARN (open); # endif #elif defined GNULIB_POSIXCHECK # undef open /* Assume open is always declared. */ _GL_WARN_ON_USE (open, "open is not always POSIX compliant - " "use gnulib module open for portability"); #endif #if @GNULIB_OPENAT@ # if @REPLACE_OPENAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef openat # define openat rpl_openat # endif _GL_FUNCDECL_RPL (openat, int, (int fd, char const *file, int flags, /* mode_t mode */ ...) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (openat, int, (int fd, char const *file, int flags, /* mode_t mode */ ...)); # else # if !@HAVE_OPENAT@ _GL_FUNCDECL_SYS (openat, int, (int fd, char const *file, int flags, /* mode_t mode */ ...) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (openat, int, (int fd, char const *file, int flags, /* mode_t mode */ ...)); # endif _GL_CXXALIASWARN (openat); #elif defined GNULIB_POSIXCHECK # undef openat # if HAVE_RAW_DECL_OPENAT _GL_WARN_ON_USE (openat, "openat is not portable - " "use gnulib module openat for portability"); # endif #endif /* Fix up the FD_* macros, only known to be missing on mingw. */ #ifndef FD_CLOEXEC # define FD_CLOEXEC 1 #endif /* Fix up the supported F_* macros. Intentionally leave other F_* macros undefined. Only known to be missing on mingw. */ #ifndef F_DUPFD_CLOEXEC # define F_DUPFD_CLOEXEC 0x40000000 /* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */ # define GNULIB_defined_F_DUPFD_CLOEXEC 1 #else # define GNULIB_defined_F_DUPFD_CLOEXEC 0 #endif #ifndef F_DUPFD # define F_DUPFD 1 #endif #ifndef F_GETFD # define F_GETFD 2 #endif /* Fix up the O_* macros. */ /* AIX 7.1 with XL C 12.1 defines O_CLOEXEC, O_NOFOLLOW, and O_TTY_INIT to values outside 'int' range, so omit these misdefinitions. But avoid namespace pollution on non-AIX systems. */ #ifdef _AIX # include # if defined O_CLOEXEC && ! (INT_MIN <= O_CLOEXEC && O_CLOEXEC <= INT_MAX) # undef O_CLOEXEC # endif # if defined O_NOFOLLOW && ! (INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX) # undef O_NOFOLLOW # endif # if defined O_TTY_INIT && ! (INT_MIN <= O_TTY_INIT && O_TTY_INIT <= INT_MAX) # undef O_TTY_INIT # endif #endif #if !defined O_DIRECT && defined O_DIRECTIO /* Tru64 spells it 'O_DIRECTIO'. */ # define O_DIRECT O_DIRECTIO #endif #if !defined O_CLOEXEC && defined O_NOINHERIT /* Mingw spells it 'O_NOINHERIT'. */ # define O_CLOEXEC O_NOINHERIT #endif #ifndef O_CLOEXEC # define O_CLOEXEC 0 #endif #ifndef O_DIRECT # define O_DIRECT 0 #endif #ifndef O_DIRECTORY # define O_DIRECTORY 0 #endif #ifndef O_DSYNC # define O_DSYNC 0 #endif #ifndef O_EXEC # define O_EXEC O_RDONLY /* This is often close enough in older systems. */ #endif #ifndef O_IGNORE_CTTY # define O_IGNORE_CTTY 0 #endif #ifndef O_NDELAY # define O_NDELAY 0 #endif #ifndef O_NOATIME # define O_NOATIME 0 #endif #ifndef O_NONBLOCK # define O_NONBLOCK O_NDELAY #endif /* If the gnulib module 'nonblocking' is in use, guarantee a working non-zero value of O_NONBLOCK. Otherwise, O_NONBLOCK is defined (above) to O_NDELAY or to 0 as fallback. */ #if @GNULIB_NONBLOCKING@ # if O_NONBLOCK # define GNULIB_defined_O_NONBLOCK 0 # else # define GNULIB_defined_O_NONBLOCK 1 # undef O_NONBLOCK # define O_NONBLOCK 0x40000000 # endif #endif #ifndef O_NOCTTY # define O_NOCTTY 0 #endif #ifndef O_NOFOLLOW # define O_NOFOLLOW 0 #endif #ifndef O_NOLINK # define O_NOLINK 0 #endif #ifndef O_NOLINKS # define O_NOLINKS 0 #endif #ifndef O_NOTRANS # define O_NOTRANS 0 #endif #ifndef O_RSYNC # define O_RSYNC 0 #endif #ifndef O_SEARCH # define O_SEARCH O_RDONLY /* This is often close enough in older systems. */ #endif #ifndef O_SYNC # define O_SYNC 0 #endif #ifndef O_TTY_INIT # define O_TTY_INIT 0 #endif #if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) # undef O_ACCMODE # define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) #endif /* For systems that distinguish between text and binary I/O. O_BINARY is usually declared in fcntl.h */ #if !defined O_BINARY && defined _O_BINARY /* For MSC-compatible compilers. */ # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif #if defined __BEOS__ || defined __HAIKU__ /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT #endif #ifndef O_BINARY # define O_BINARY 0 # define O_TEXT 0 #endif /* Fix up the AT_* macros. */ /* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its value exceeds INT_MAX, so its use as an int doesn't conform to the C standard, and GCC and Sun C complain in some cases. If the bug is present, undef AT_FDCWD here, so it can be redefined below. */ #if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 # undef AT_FDCWD #endif /* Use the same bit pattern as Solaris 9, but with the proper signedness. The bit pattern is important, in case this actually is Solaris with the above workaround. */ #ifndef AT_FDCWD # define AT_FDCWD (-3041965) #endif /* Use the same values as Solaris 9. This shouldn't matter, but there's no real reason to differ. */ #ifndef AT_SYMLINK_NOFOLLOW # define AT_SYMLINK_NOFOLLOW 4096 #endif #ifndef AT_REMOVEDIR # define AT_REMOVEDIR 1 #endif /* Solaris 9 lacks these two, so just pick unique values. */ #ifndef AT_SYMLINK_FOLLOW # define AT_SYMLINK_FOLLOW 2 #endif #ifndef AT_EACCESS # define AT_EACCESS 4 #endif #endif /* _@GUARD_PREFIX@_FCNTL_H */ #endif /* _@GUARD_PREFIX@_FCNTL_H */ #endif pspp-1.0.1/gl/c-strncasecmp.c0000644000175000017500000000310613124536241012725 00000000000000/* c-strncasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 2005-2006, 2009-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, 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 . */ #include /* Specification. */ #include "c-strcase.h" #include #include "c-ctype.h" int c_strncasecmp (const char *s1, const char *s2, size_t n) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2 || n == 0) return 0; do { c1 = c_tolower (*p1); c2 = c_tolower (*p2); if (--n == 0 || c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } pspp-1.0.1/gl/sockets.c0000644000175000017500000001017013124536243011637 00000000000000/* sockets.c --- wrappers for Windows socket functions Copyright (C) 2008-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ /* Written by Simon Josefsson */ #include /* Specification. */ #include "sockets.h" #if WINDOWS_SOCKETS /* This includes winsock2.h on MinGW. */ # include # include "fd-hook.h" # if GNULIB_MSVC_NOTHROW # include "msvc-nothrow.h" # else # include # endif /* Get set_winsock_errno, FD_TO_SOCKET etc. */ # include "w32sock.h" static int close_fd_maybe_socket (const struct fd_hook *remaining_list, gl_close_fn primary, int fd) { /* Note about multithread-safety: There is a race condition where, between our calls to closesocket() and the primary close(), some other thread could make system calls that allocate precisely the same HANDLE value as sock; then the primary close() would call CloseHandle() on it. */ SOCKET sock; WSANETWORKEVENTS ev; /* Test whether fd refers to a socket. */ sock = FD_TO_SOCKET (fd); ev.lNetworkEvents = 0xDEADBEEF; WSAEnumNetworkEvents (sock, NULL, &ev); if (ev.lNetworkEvents != 0xDEADBEEF) { /* fd refers to a socket. */ /* FIXME: other applications, like squid, use an undocumented _free_osfhnd free function. But this is not enough: The 'osfile' flags for fd also needs to be cleared, but it is hard to access it. Instead, here we just close twice the file descriptor. */ if (closesocket (sock)) { set_winsock_errno (); return -1; } else { /* This call frees the file descriptor and does a CloseHandle ((HANDLE) _get_osfhandle (fd)), which fails. */ _close (fd); return 0; } } else /* Some other type of file descriptor. */ return execute_close_hooks (remaining_list, primary, fd); } static int ioctl_fd_maybe_socket (const struct fd_hook *remaining_list, gl_ioctl_fn primary, int fd, int request, void *arg) { SOCKET sock; WSANETWORKEVENTS ev; /* Test whether fd refers to a socket. */ sock = FD_TO_SOCKET (fd); ev.lNetworkEvents = 0xDEADBEEF; WSAEnumNetworkEvents (sock, NULL, &ev); if (ev.lNetworkEvents != 0xDEADBEEF) { /* fd refers to a socket. */ if (ioctlsocket (sock, request, arg) < 0) { set_winsock_errno (); return -1; } else return 0; } else /* Some other type of file descriptor. */ return execute_ioctl_hooks (remaining_list, primary, fd, request, arg); } static struct fd_hook fd_sockets_hook; static int initialized_sockets_version /* = 0 */; #endif /* WINDOWS_SOCKETS */ int gl_sockets_startup (int version _GL_UNUSED) { #if WINDOWS_SOCKETS if (version > initialized_sockets_version) { WSADATA data; int err; err = WSAStartup (version, &data); if (err != 0) return 1; if (data.wVersion != version) { WSACleanup (); return 2; } if (initialized_sockets_version == 0) register_fd_hook (close_fd_maybe_socket, ioctl_fd_maybe_socket, &fd_sockets_hook); initialized_sockets_version = version; } #endif return 0; } int gl_sockets_cleanup (void) { #if WINDOWS_SOCKETS int err; initialized_sockets_version = 0; unregister_fd_hook (&fd_sockets_hook); err = WSACleanup (); if (err != 0) return 1; #endif return 0; } pspp-1.0.1/gl/full-write.h0000644000175000017500000000216613124536242012270 00000000000000/* An interface to write() that writes all it is asked to write. Copyright (C) 2002-2003, 2009-2017 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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 . */ #include #ifdef __cplusplus extern "C" { #endif /* Write COUNT bytes at BUF to descriptor FD, retrying if interrupted or if partial writes occur. Return the number of bytes successfully written, setting errno if that is less than COUNT. */ extern size_t full_write (int fd, const void *buf, size_t count); #ifdef __cplusplus } #endif pspp-1.0.1/build-aux/0000755000175000017500000000000013150620334011363 500000000000000pspp-1.0.1/build-aux/depcomp0000755000175000017500000005601613020461172012667 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: pspp-1.0.1/build-aux/mdate-sh0000755000175000017500000001372613020461173012744 00000000000000#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2015-04-09.19; # UTC # Copyright (C) 1995-2014 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . 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 fi case $1 in '') echo "$0: No file. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification day of FILE, in the format: 1 January 1970 Report bugs to . EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac error () { echo "$0: $1" >&2 exit 1 } # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # Use UTC to get reproducible result TZ=UTC export TZ # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume 'unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi save_arg1=$1 # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # Avoid user/group names that might have spaces, when possible. if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi # A 'ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named "Jan", or "Feb", etc. However, it's unlikely that '/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set x`$ls_command /` # Find which argument is the month. month= command= until test $month do test $# -gt 0 || error "failed parsing '$ls_command /' output" shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done test -n "$month" || error "failed parsing '$ls_command /' output" # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\\\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac case $3 in ???*) day=$1;; *) day=$3; shift;; esac # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: pspp-1.0.1/build-aux/reloc-ldflags0000755000175000017500000000635213124536241013761 00000000000000#! /bin/sh # Output a system dependent linker command for putting a relocatable library # search path into an executable. # # Copyright 2003-2017 Free Software Foundation, Inc. # Written by Bruno Haible , 2003. # # 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 . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variable LD should be set by the caller. # # The second argument is a colon separated list of directories that contain # the libraries at installation time. # # The third argument is the directory into which the executable is going to be # installed. host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` library_path_value=$2 installdir=$3 # Verify that installdir is absolute. case "$installdir" in /*) ;; *) echo "installdir is not absolute: $installdir" 1>&2 exit 1 ;; esac case "$host_os" in linux* | kfreebsd*) rpath= save_IFS="$IFS"; IFS=":" for dir in $library_path_value; do IFS="$save_IFS" case "$dir" in /*) # Make dir relative to installdir. (Works only if dir is absolute.) idir="$installdir" while true; do dfirst=`echo "$dir" | sed -n -e 's,^//*\([^/]*\).*$,/\1,p'` ifirst=`echo "$idir" | sed -n -e 's,^//*\([^/]*\).*$,/\1,p'` if test -z "$dfirst" || test -z "$ifirst"; then break fi if test "$dfirst" != "$ifirst"; then break fi dir=`echo "$dir" | sed -e 's,^//*[^/]*,,'` idir=`echo "$idir" | sed -e 's,^//*[^/]*,,'` done dir="\$ORIGIN"`echo "$idir" | sed -e 's,//*[^/]*,/..,g'`"$dir" # Add dir to rpath. rpath="${rpath}${rpath:+ }$dir" ;; *) if test -n "$dir"; then echo "libdir is not absolute: $dir" 1>&2 fi ;; esac done IFS="$save_IFS" # Output it. if test -n "$rpath"; then echo "-Wl,-rpath,$rpath" fi ;; *) echo "relocation via rpath not supported on this system: $host" 1>&2 exit 1 ;; esac exit 0 pspp-1.0.1/build-aux/install-sh0000755000175000017500000003546313020461172013321 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: pspp-1.0.1/build-aux/compile0000755000175000017500000001624513020461172012670 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: pspp-1.0.1/build-aux/install-reloc0000755000175000017500000002111513124536241014005 00000000000000#!/bin/sh # install-reloc - install a program including a relocating wrapper # Copyright (C) 2003-2017 Free Software Foundation, Inc. # Written by Bruno Haible , 2003. # # 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 . # Usage 1: # install-reloc -- library_path_var library_path_value prefix destdir \ # compile_command srcdir builddir config_h_dir exeext \ # strip_command \ # install_command... destprog # where # - library_path_var is the platform dependent runtime library path variable # - library_path_value is a colon separated list of directories that contain # the libraries at installation time (use this instead of -rpath) # - prefix is the base directory at installation time # - destdir is a string that is prepended to all file names at installation # time; it is already prepended to destprog but not to library_path_value # and prefix # - compile_command is a C compiler compilation and linking command # - srcdir is the directory where to find relocwrapper.c and its dependencies # - builddir is the directory where to find built dependencies (namely, # alloca.h and stdbool.h) # - config_h_dir is the directory where to find config.h # - exeext is platform dependent suffix of executables # - strip_command is the command for stripping executables, or : if no # stripping is desired # - install_command is the install command line, excluding the final destprog # - destprog is the destination program name # Usage 2: # env RELOC_LIBRARY_PATH_VAR=library_path_var \ # RELOC_LIBRARY_PATH_VALUE=library_path_value \ # RELOC_PREFIX=prefix \ # RELOC_DESTDIR=destdir \ # RELOC_COMPILE_COMMAND=compile_command \ # RELOC_SRCDIR=srcdir \ # RELOC_BUILDDIR=builddir \ # RELOC_CONFIG_H_DIR=config_h_dir \ # RELOC_EXEEXT=exeext \ # RELOC_STRIP_PROG=strip_command \ # RELOC_INSTALL_PROG=install_command... \ # install-reloc prog1 ... destprog # where destprog is either the destination program name (when only one program # is specified) or the destination directory for all programs. # install-reloc renames destprog to destprog.bin and installs a relocating # wrapper in the place of destprog. progname=$0 if test $# -ge 12 && test "x$1" = "x--"; then # Get fixed position arguments. shift library_path_var=$1 library_path_value=$2 prefix=$3 destdir=$4 shift shift shift shift compile_command=$1 srcdir=$2 builddir=$3 config_h_dir=$4 exeext=$5 shift shift shift shift shift strip_prog=$1 shift install_prog=$1 # maybe not including the "-c" option shift else if test $# -ge 2; then # Get arguments from environment variables. library_path_var=$RELOC_LIBRARY_PATH_VAR library_path_value=$RELOC_LIBRARY_PATH_VALUE prefix=$RELOC_PREFIX destdir=$RELOC_DESTDIR compile_command=$RELOC_COMPILE_COMMAND srcdir=$RELOC_SRCDIR builddir=$RELOC_BUILDDIR config_h_dir=$RELOC_CONFIG_H_DIR exeext=$RELOC_EXEEXT strip_prog=$RELOC_STRIP_PROG install_prog=$RELOC_INSTALL_PROG # including the "-c" option else echo "Usage: $0 -- library_path_var library_path_value prefix destdir" \ "compile_command srcdir builddir config_h_dir exeext" \ "strip_command" \ "install_command... destprog" 1>&2 exit 1 fi fi # Get destprog, last argument. destprog= for arg do destprog=$arg done # Determine whether destprog is a program name or a directory name. if test -d "$destprog"; then sed_remove_trailing_slashes='s|//*$||' destprog_directory=`echo "$destprog" | sed -e "$sed_remove_trailing_slashes"` if test -z "$destprog_directory"; then destprog_directory='/' fi else destprog_directory= fi # Prepare for remove trailing $exeext, if present. if test -n "$exeext"; then sed_quote='s,\.,\\.,g' sed_remove_exeext='s|'`echo "$exeext" | sed -e "$sed_quote"`'$||' fi if test -z "$destprog_directory"; then # Remove trailing $exeext, if present. if test -n "$exeext"; then destprog=`echo "$destprog" | sed -e "$sed_remove_exeext"` fi fi # Outputs a command and runs it. func_verbose () { echo "$@" "$@" } # Run install_command. func_verbose $install_prog "$@" || exit $? # Iterate over all destination program names. # func_iterate f # applies f to each destination program names, after setting destprog. sed_basename_of_file='s|^.*/||' func_iterate () { if test -n "$destprog_directory"; then prev_arg= for arg do if test -n "prev_arg"; then destprog="$destprog_directory"/`echo "$prev_arg" | sed -e "$sed_basename_of_file"` $1 fi prev_arg="$arg" done else $1 fi } # Run strip_command. func_strip () { # Remove trailing $exeext, if present. if test -n "$exeext"; then destprog=`echo "$destprog" | sed -e "$sed_remove_exeext"` fi func_verbose "$strip_prog" "$destprog$exeext" || exit $? } if test "$strip_prog" != ':'; then func_iterate func_strip fi # If the platform doesn't support LD_LIBRARY_PATH or similar, we cannot build # a wrapper. test -n "$library_path_var" || exit 0 libdirs= save_IFS="$IFS"; IFS=":" for dir in $library_path_value; do IFS="$save_IFS" if test -n "$dir"; then case "$libdirs" in *"\"$dir\""*) ;; # remove duplicate *) libdirs="$libdirs\"$dir\"," ;; esac fi done IFS="$save_IFS" # If there are no library directories to add at runtime, we don't need a # wrapper. test -n "$libdirs" || exit 0 # Determine installdir from destprog, removing a leading destdir if present. if test -n "$destprog_directory"; then installdir="$destprog_directory" else installdir=`echo "$destprog" | sed -e 's,/[^/]*$,,'` fi if test -n "$destdir"; then sed_quote='s,\([|.\*^$[]\),\\\1,g' sed_remove_destdir='s|^'`echo "$destdir" | sed -e "$sed_quote"`'||' installdir=`echo "$installdir" | sed -e "$sed_remove_destdir"` fi # Compile and install wrapper. func_create_wrapper () { # Remove trailing $exeext, if present. if test -n "$exeext"; then destprog=`echo "$destprog" | sed -e "$sed_remove_exeext"` fi # Compile wrapper. func_verbose $compile_command \ -I"$builddir" -I"$srcdir" -I"$config_h_dir" \ -DHAVE_CONFIG_H -DIN_RELOCWRAPPER -DNO_XMALLOC \ -D"INSTALLPREFIX=\"$prefix\"" -D"INSTALLDIR=\"$installdir\"" \ -D"LIBPATHVAR=\"$library_path_var\"" -D"LIBDIRS=$libdirs" \ -D"EXEEXT=\"$exeext\"" \ "$srcdir"/relocwrapper.c \ "$srcdir"/progname.c \ "$srcdir"/progreloc.c \ "$srcdir"/areadlink.c \ "$srcdir"/careadlinkat.c \ "$srcdir"/allocator.c \ "$srcdir"/readlink.c \ "$srcdir"/stat.c \ "$srcdir"/canonicalize-lgpl.c \ "$srcdir"/malloca.c \ "$srcdir"/lstat.c \ "$srcdir"/relocatable.c \ "$srcdir"/setenv.c \ "$srcdir"/c-ctype.c \ -o "$destprog.wrapper$exeext" rc=$? # Clean up object files left over in the current directory by the native C # compilers on Solaris, HP-UX, OSF/1, IRIX. rm -f relocwrapper.o \ progname.o \ progreloc.o \ areadlink.o \ careadlinkat.o \ allocator.o \ readlink.o \ stat.o \ canonicalize-lgpl.o \ malloca.o \ lstat.o \ relocatable.o \ setenv.o \ c-ctype.o test $rc = 0 || exit $? # Clean up debugging information left over by the native C compiler on MacOS X. rm -rf "$destprog.wrapper$exeext.dSYM" test $rc = 0 || exit $? # Strip wrapper. test "$strip_prog" = ':' || func_verbose "$strip_prog" "$destprog.wrapper$exeext" || exit $? # Rename $destprog.wrapper -> $destprog -> $destprog.bin. ln -f "$destprog$exeext" "$destprog.bin$exeext" \ || { rm -f "$destprog.bin$exeext" \ && cp -p "$destprog$exeext" "$destprog.bin$exeext"; } \ || exit 1 mv "$destprog.wrapper$exeext" "$destprog$exeext" || exit 1 } func_iterate func_create_wrapper exit 0 pspp-1.0.1/build-aux/config.rpath0000755000175000017500000004421613124536241013626 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2017 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no 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 # 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. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 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 fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : 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 ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; 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 else 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 fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) 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 hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; 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=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) 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 ;; hpux10*) if test "$with_gnu_ld" = no; then 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 fi ;; hpux11*) 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_direct=yes # 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*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) 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 ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: pspp-1.0.1/build-aux/svg2png0000755000175000017500000000045012470434665012634 00000000000000#! /bin/sh comment=`cat $2` gimp -i -b "\ (let* ((image (car (gimp-file-load 1 \"$1\" \"$1\")))) (gimp-image-attach-parasite image (list \"gimp-comment\" 0 \"$comment\")) (gimp-file-save 1 image (car (gimp-image-get-active-drawable image)) \"$3\" \"$3\")) (gimp-quit 1)" pspp-1.0.1/build-aux/config.guess0000755000175000017500000012355013020461172013630 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-03-23' # This file is free software; you can 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 . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp 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` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pspp-1.0.1/build-aux/texinfo.tex0000644000175000017500000116703612523704223013522 00000000000000% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2013-02-01.11} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can 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 texinfo.tex file is distributed in the hope that 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 . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. This Exception is an additional permission under section 7 % of the GNU General Public License, version 3 ("GPLv3"). % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or % http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or % http://www.gnu.org/software/texinfo/ (the Texinfo home page) % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putworderror\undefined \gdef\putworderror{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\ampChar = `\& \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\hashChar = `\# \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\slashChar = `\/ \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % @errormsg{MSG}. Do the index-like expansions on MSG, but if things % aren't perfect, it's not the end of the world, being an error message, % after all. % \def\errormsg{\begingroup \indexnofonts \doerrormsg} \def\doerrormsg#1{\errmessage{#1}} % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty outside of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\unskip\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). This command % is not documented, not supported, and doesn't work. % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} % \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\centersub\centerH \else \let\centersub\centerV \fi \centersub{\hfil \ignorespaces#1\unskip \hfil}% \let\centersub\relax % don't let the definition persist, just in case } \def\centerH#1{{% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }} % \newcount\centerpenalty \def\centerV#1{% % The idea here is the same as in \startdefun, \cartouche, etc.: if % @center is the first thing after a section heading, we need to wipe % out the negative parskip inserted by \sectionheading, but still % prevent a page break here. \centerpenalty = \lastpenalty \ifnum\centerpenalty>10000 \vskip\parskip \fi \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi \line{\kern\leftskip #1\kern\rightskip}% } % @sp n outputs n lines of vertical space % \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment % \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} % \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as being undefined. \ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and % related messages. The final outcome is that it is up to the TeX user % to double the backslashes and otherwise make the string valid, so % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to % do this reliably, so we use it. % #1 is a control sequence in which to do the replacements, % which we \xdef. \def\txiescapepdf#1{% \ifx\pdfescapestring\thisisundefined % No primitive available; should we give a warning or log? % Many times it won't matter. \else % The expandable \pdfescapestring primitive escapes parentheses, % backslashes, and other special chars. \xdef#1{\pdfescapestring{#1}}% \fi } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead % of actual black. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .pdf, .png, .jpg (among % others). Let's try in that order, PDF first since if % someone has a scalable image, presumably better to use that than a % bitmap. \let\pdfimgext=\empty \begingroup \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \pdfimagewidth \fi \ifdim \wd2 >0pt height \pdfimageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \makevalueexpandable \def\pdfdestname{#1}% \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\rgbDarkRed} \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \edef\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else \txiescapepdf\pdfoutlinedest \fi % % Also escape PDF chars in the display string. \edef\pdfoutlinetext{#1}% \txiescapepdf\pdfoutlinetext % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Read toc silently, to get counts of subentries for \pdfoutline. \def\partentry##1##2##3##4{}% ignore parts in the outlines \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % TODO this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Too % much work for too little return. Just use the ASCII equivalents % we use for the index sort strings. % \indexnofonts \setupdatafile % We can have normal brace characters in the PDF outlines, unlike % Texinfo index files. So set that up. \def\{{\lbracecharliteral}% \def\}{\rbracecharliteral}% \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } {\catcode`[=1 \catcode`]=2 \catcode`{=\other \catcode`}=\other \gdef\lbracecharliteral[{]% \gdef\rbracecharliteral[}]% ] % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \nextsp} \def\getfilename#1{% \filenamelength=0 % If we don't expand the argument now, \skipspaces will get % snagged on things like "@value{foo}". \edef\temp{#1}% \expandafter\skipspaces\temp|\relax } \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \newdimen\textleading \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\thisisundefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % Set the font macro #1 to the font named \fontprefix#2. % #3 is the font's design size, #4 is a scale factor, #5 is the CMap % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). % Example: % #1 = \textrm % #2 = \rmshape % #3 = 10 % #4 = \mainmagstep % #5 = OT1 % \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % % (end of cmaps) % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\thisisundefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} % where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Definitions for a main text size of 11pt. (The default in Texinfo.) % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} \textleading = 13.2pt % line spacing for 11pt CM \textfonts % reset the current fonts \rm } % end of 11pt text font size definitions, \definetextfontsizexi % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} \divide\parskip by 2 % reduce space between paragraphs \textleading = 12pt % line spacing for 10pt CM \textfonts % reset the current fonts \rm } % end of 10pt text font size definitions, \definetextfontsizex % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xiword{11} \def\xword{10} \def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% %\wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright % \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright % \let\markupsetuplqkbd \markupsetcodequoteleft \let\markupsetuprqkbd \markupsetcodequoteright % \let\markupsetuplqsamp \markupsetcodequoteleft \let\markupsetuprqsamp \markupsetcodequoteright % \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright % \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright % Allow an option to not use regular directed right quote/apostrophe % (char 0x27), but instead the undirected quote from cmtt (char 0x0d). % The undirected quote is ugly, so don't make it the default, but it % works for pasting with more pdf viewers (at least evince), the % lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % Commands to set the quote options. % \parseargdef\codequoteundirected{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequoteundirected\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequoteundirected\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% \fi\fi } % \parseargdef\codequotebacktick{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequotebacktick\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequotebacktick\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% \fi\fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Font commands. % #1 is the font command (\sl or \it), #2 is the text to slant. % If we are in a monospaced environment, however, 1) always use \ttsl, % and 2) do not add an italic correction. \def\dosmartslant#1#2{% \ifusingtt {{\ttsl #2}\let\next=\relax}% {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% \next } \def\smartslanted{\dosmartslant\sl} \def\smartitalic{\dosmartslant\it} % Output an italic correction unless \next (presumed to be the following % character) is such as not to need one. \def\smartitaliccorrection{% \ifx\next,% \else\ifx\next-% \else\ifx\next.% \else\ptexslash \fi\fi\fi \aftersmartic } % Unconditional use \ttsl, and no ic. @var is set to this for defuns. \def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} \def\aftersmartic{} \def\var#1{% \let\saveaftersmartic = \aftersmartic \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% \smartslanted{#1}% } \let\i=\smartitalic \let\slanted=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % @indicateurl is \samp, that is, with quotes. \let\indicateurl=\samp % @code (and similar) prints in typewriter, but with spaces the same % size as normal in the surrounding text, without hyphenation, etc. % This is a subroutine for that. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\normaldash \let_\realunder \fi \codex } } \def\codex #1{\tclose{#1}\endgroup} \def\normaldash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is bad. % @allowcodebreaks provides a document-level way to turn breaking at - % and _ on and off. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% \fi\fi } % For @command, @env, @file, @option quotes seem unnecessary, % so use \code rather than \samp. \let\command=\code \let\env=\code \let\file=\code \let\option=\code % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. % (This \urefnobreak definition isn't used now, leaving it for a while % for comparison.) \def\urefnobreak#1{\dourefnobreak #1,,,\finish} \def\dourefnobreak#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % This \urefbreak definition is the active one. \def\urefbreak{\begingroup \urefcatcodes \dourefbreak} \let\uref=\urefbreak \def\dourefbreak#1{\urefbreakfinish #1,,,\finish} \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url \fi \else \urefcode{#1}% only url given, so show it \fi \fi \endlink \endgroup} % Allow line breaks around only a few characters (only). \def\urefcatcodes{% \catcode\ampChar=\active \catcode\dotChar=\active \catcode\hashChar=\active \catcode\questChar=\active \catcode\slashChar=\active } { \urefcatcodes % \global\def\urefcode{\begingroup \setupmarkupstyle{code}% \urefcatcodes \let&\urefcodeamp \let.\urefcodedot \let#\urefcodehash \let?\urefcodequest \let/\urefcodeslash \codex } % % By default, they are just regular characters. \global\def&{\normalamp} \global\def.{\normaldot} \global\def#{\normalhash} \global\def?{\normalquest} \global\def/{\normalslash} } % we put a little stretch before and after the breakable chars, to help % line breaking of long url's. The unequal skips make look better in % cmtt at least, especially for dots. \def\urefprestretch{\urefprebreak \hskip0pt plus.13em } \def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } % \def\urefcodeamp{\urefprestretch \&\urefpoststretch} \def\urefcodedot{\urefprestretch .\urefpoststretch} \def\urefcodehash{\urefprestretch \#\urefpoststretch} \def\urefcodequest{\urefprestretch ?\urefpoststretch} \def\urefcodeslash{\futurelet\next\urefcodeslashfinish} { \catcode`\/=\active \global\def\urefcodeslashfinish{% \urefprestretch \slashChar % Allow line break only after the final / in a sequence of % slashes, to avoid line break between the slashes in http://. \ifx\next/\else \urefpoststretch \fi } } % One more complication: by default we'll break after the special % characters, but some people like to break before the special chars, so % allow that. Also allow no breaking at all, for manual control. % \parseargdef\urefbreakstyle{% \def\txiarg{#1}% \ifx\txiarg\wordnone \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordbefore \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordafter \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} \else \errhelp = \EMsimple \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% \fi\fi\fi } \def\wordafter{after} \def\wordbefore{before} \def\wordnone{none} \urefbreakstyle after % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct'. \kbdinputstyle distinct % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} \def\xkey{\key} \def\kbdsub#1#2#3\par{% \def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi } % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\font\keysy=cmsy9 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% % \vbox{\hrule\kern-0.4pt % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi \null % reset \spacefactor=1000 } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi \null % reset \spacefactor=1000 } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a math (or tt) \. % FYI, plain.tex uses \\ as a temporary control sequence (for no % particular reason), but this is not advertised and we don't care. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % ctrl is no longer a Texinfo command, but leave this definition for fun. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, % except specified as a normal braced arg, so no newlines to worry about. % \def\outfmtnametex{tex} % \long\def\inlinefmt#1{\doinlinefmt #1,\finish} \long\def\doinlinefmt#1,#2,\finish{% \def\inlinefmtname{#1}% \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi } % For raw, must switch into @tex before parsing the argument, to avoid % setting catcodes prematurely. Doing it this way means that, for % example, @inlineraw{html, foo{bar} gets a parse error instead of being % ignored. But this isn't important because if people want a literal % *right* brace they would have to use a command anyway, so they may as % well use a command to get a left brace too. We could re-use the % delimiter character idea from \verb, but it seems like overkill. % \long\def\inlineraw{\tex \doinlineraw} \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} \def\doinlinerawtwo#1,#2,\finish{% \def\inlinerawname{#1}% \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi \endgroup % close group opened by \tex. } \message{glyphs,} % and logos. % @@ prints an @, as does @atchar{}. \def\@{\char64 } \let\atchar=\@ % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. % Unless we're in typewriter, use \ecfont because the CM text fonts do % not have braces, and we don't want to switch into math. \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} \let\{=\mylbrace \let\lbracechar=\{ \let\}=\myrbrace \let\rbracechar=\} \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \ptexc \let\dotaccent = \ptexdot \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \ptext \let\ubaraccent = \ptexb \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{% \ifx\textnominalsize\xwordpt % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. % Revert to plain's \scriptsize, which is 7pt. \count255=\the\fam $\fam\count255 \scriptstyle A$% \else % For 11pt, we can use our lllsize. \selectfonts\lllsize A% \fi }% \vss }}% \kern-.15em \TeX } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifmonospace % typewriter: \font\thisecfont = ectt\ecsize \space at \nominalsize \else \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\thisisundefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{% \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } % Settings used for typesetting titles: no hyphenation, no indentation, % don't worry much about spacing, ragged right. This should be used % inside a \vbox, and fonts need to be set appropriately first. Because % it is always used for titles, nothing else, we call \rmisbold. \par % should be specified before the end of the \vbox, since a vbox is a group. % \def\raggedtitlesettings{% \rmisbold \hyphenpenalty=10000 \parindent=0pt \tolerance=5000 \ptexraggedright } % Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \vbox{\titlefonts \raggedtitlesettings #1\par}% % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } % Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\headingsoff{% non-global headings elimination \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% } \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting \HEADINGSoff % it's the default % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil\relax \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % Maybe so, but it also creates really weird page breaks when the % table breaks over pages. Wouldn't \vfil be better? Wait until the % problem manifests itself, so it can be fixed for real --karl. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi % Test to see if parskip is larger than space between lines of % table. If not, do nothing. % If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller % than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller % than skip between lines in the table. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\normaldash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end executes the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written % without the @) is in fact defined. We can only feasibly check at the % TeX level, so something like `mathcode' is going to considered % defined even though it is not a Texinfo command. % \makecond{ifcommanddefined} \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} % \def\doifcmddefined#1#2{{% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname #2\endcsname\relax #1% If not defined, \let\next as above. \fi \expandafter }\next } \def\ifcmddefinedfail{\doignore{ifcommanddefined}} % @ifcommandnotdefined CMD ... handled similar to @ifclear above. \makecond{ifcommandnotdefined} \def\ifcommandnotdefined{% \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} % Set the `txicommandconditionals' variable, so documents have a way to % test if the @ifcommand...defined conditionals are available. \set txicommandconditionals % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % Need these unexpandable (because we define \tt as a dummy) % definitions when @{ or @} appear in index entry text. Also, more % complicated, when \tex is in effect and \{ is a \delimiter again. % We can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. Perhaps we % should define @lbrace and @rbrace commands a la @comma. \def\{{{\tt\char123}}% \def\}{{\tt\char125}}% % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% \definedummyletter\-% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\entrybreak \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\expansion \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\lbracechar \definedummyword\leq \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\rbracechar \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sansserif \definedummyword\sc \definedummyword\slanted \definedummyword\t % % Commands that take arguments. \definedummyword\abbr \definedummyword\acronym \definedummyword\anchor \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\dmn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\image \definedummyword\indicateurl \definedummyword\inforef \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% \def\_{\normalunderscore}% \def\-{}% @- shouldn't affect sorting % % Unfortunately, texindex is not prepared to handle braces in the % content at all. So for index sorting, we map @{ and @} to strings % starting with |, since that ASCII character is between ASCII { and }. \def\{{|a}% \def\lbracechar{|a}% % \def\}{|b}% \def\rbracechar{|b}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\leq{<=}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax \else \indexlquoteignore \fi % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } % Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us % ignore left quotes in the sort term. {\catcode`\`=\active \gdef\indexlquoteignore{\let`=\empty}} \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write or \pdfdest will make \lastskip zero. The result is that % sequences like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{\ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi} % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus1pt % % When reading the text of entry, convert explicit line breaks % from @* into spaces. The user might give these in long section % titles, for instance. \def\*{\unskip\space\ignorespaces}% \def\entrybreak{\hfil\break}% % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\entrybreak{\unskip\space\ignorespaces}% \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % Let's start with @part. \outer\parseargdef\part{\partzzz{#1}} \def\partzzz#1{% \chapoddpage \null \vskip.3\vsize % move it down on the page a bit \begingroup \noindent \titlefonts\rmisbold #1\par % the text \let\lastnode=\empty % no node to associate with \writetocentry{part}{#1}{}% but put it in the toc \headingsoff % no headline or footline on the part page \chapoddpage \endgroup } % \unnumberedno is an oxymoron. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achieve this, remember the "biggest" unnum. sec. we are currently in: \chardef\unnlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unnlevel \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else \chardef\unnlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % normally unnmhead0 calls unnumberedzzz: \outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. % \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } % normally calls appendixsectionzzz: \outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection % normally calls unnumberedseczzz: \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. % % normally calls numberedsubseczzz: \outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } % normally calls appendixsubseczzz: \outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } % normally calls unnumberedsubseczzz: \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. % % normally numberedsubsubseczzz: \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally appendixsubsubseczzz: \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally unnumberedsubsubseczzz: \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% \vbox{\chapfonts \raggedtitlesettings #1\par}% \nobreak\bigskip \nobreak \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. % Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip % Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \headingsoff \null \chappager \endgroup \fi } \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage \vbox{\chapfonts \raggedtitlesettings #1\par}% \nobreak\bigskip\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% \nobreak\bigskip \nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% \checkenv{}% should not be in an environment. % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) However, when a paragraph is not started next % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out % or the negative glue will cause weirdly wrong output, typically % obscuring the section heading with something else. \vskip-\parskip % % This is so the last item on the main vertical list is a known % \penalty > 10000, so \startdefun, etc., can recognize the situation % and do the needful. \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Parts, in the main contents. Replace the part number, which doesn't % exist, with an empty box. Let's hope all the numbers have the same width. % Also ignore the page number, which is conventionally not printed. \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} % % Parts, in the short toc. \def\shortpartentry#1#2#3#4{% \penalty-300 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip \shortchapentry{{\bf #1}}{\numeralbox}{}{}% } % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @tex ... @end tex escapes into raw TeX temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode`\`=\other \catcode`\'=\other \escapechar=`\\ % % ' is active in math mode (mathcode"8000). So reset it, and all our % other math active characters (just in case), to plain's definitions. \mathactive % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% % % If this cartouche directly follows a sectioning command, we need the % \parskip glue (backspaced over by default) or the cartouche can % collide with the section heading. \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi % \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it in one command. #1 is the env name, #2 the definition. \def\makedispenvdef#1#2{% \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two environment synonyms (#1 and #2) for an environment. \def\maketwodispenvdef#1#2#3{% \makedispenvdef{#1}{#3}% \makedispenvdef{#2}{#3}% } % % @lisp: indented, narrowed, typewriter font; % @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \makedispenvdef{quotation}{\quotationstart} % \def\quotationstart{% \indentedblockstart % same as \indentedblock, but increase right margin too. \ifx\nonarrowing\relax \advance\rightskip by \lispnarrowing \fi \parsearg\quotationlabel } % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } \def\Esmallquotation{\Equotation} % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % @indentedblock is like @quotation, but indents only on the left and % has no optional argument. % \makedispenvdef{indentedblock}{\indentedblockstart} % \def\indentedblockstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi } % Keep a nonzero parskip for the environment, since we're doing normal filling. % \def\Eindentedblock{% \par {\parskip=0pt \afterenvbreak}% } \def\Esmallindentedblock{\Eindentedblock} % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % % We typeset each line of the verbatim in an \hbox, so we can handle % tabs. The \global is in case the verbatim line starts with an accent, % or some other command that starts with a begin-group. Otherwise, the % entire \verbbox would disappear at the corresponding end-group, before % it is typeset. Meanwhile, we can't have nested verbatim commands % (can we?), so the \global won't be overwriting itself. \newbox\verbbox \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab \divide\dimen\verbbox by\tabw \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart \tt % easiest (and conventionally used) font for verbatim % The \leavevmode here is for blank lines. Otherwise, we would % never \starttabox and the \egroup would end verbatim mode. \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count. % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a further refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \doingtypefnfalse % distinguish typed functions from all else \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } \newif\ifdoingtypefn % doing typed function? \newif\ifrettypeownline % typeset return type on its own line? % @deftypefnnewline on|off says whether the return type of typed functions % are printed on their own line. This affects @deftypefn, @deftypefun, % @deftypeop, and @deftypemethod. % \parseargdef\deftypefnnewline{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxideftypefnnl\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETtxideftypefnnl\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @txideftypefnnl value `\temp', must be on|off}% \fi\fi } % Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } % Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \doingtypefntrue \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } % Types: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% \par % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % Determine if we are typesetting the return type of a typed function % on a line by itself. \rettypeownlinefalse \ifdoingtypefn % doing a typed function specifically? % then check user option for putting return type on its own line: \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else \rettypeownlinetrue \fi \fi % % How we'll format the category name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. We'll always have at % least two. \tempnum = 2 % % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % % If doing a return type on its own line, we'll have another line. \ifrettypeownline \advance\tempnum by 1 \def\maybeshapeline{0in \hsize}% \else \def\maybeshapeline{}% \fi % % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % % The final paragraph shape: \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 % % Put the category name at the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% text of the return type \ifx\temp\empty\else \tclose{\temp}% typeset the return type \ifrettypeownline % put return type on its own line; prohibit line break following: \hfil\vadjust{\nobreak}\break \else \space % type on same line, so just followed by a space \fi \fi % no return type #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. We used to recommend @var for that, so % leave the code in, but it's strange for @var to lead to typewriter. % Nowadays we recommend @code, since the difference between a ttsl hyphen % and a tt hyphen is pretty tiny. @code also disables ?` !`. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{\begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % % ... and for \example: \spaceisspace % % The \empty here causes a following catcode 5 newline to be eaten as % part of reading whitespace after a control sequence. It does not % eat a catcode 13 newline. There's no good way to handle the two % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX % would then have different behavior). See the Macro Details node in % the manual for the workaround we recommend for macros and % line-oriented commands. % \scantokens{#1\empty}% \endgroup} \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \ % to recognize macro arguments; this is the job of \mbodybackslash. % % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. % \def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% used when scanning invocations \scanctxt \catcode`\\=0 } % why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" % for the single characters \ { }. Thus, we end up with the "commands" % that would be written @\ @{ @} in a Texinfo document. % % We already have @{ and @}. For @\, we define it here, and only for % this purpose, to produce a typewriter backslash (so, the @\ that we % define for @math can't be used with @macro calls): % \def\\{\normalbackslash}% % % We would like to do this for \, too, since that is what makeinfo does. % But it is not possible, because Texinfo already has a command @, for a % cedilla accent. Documents must use @comma{} instead. % % \anythingelse will almost certainly be an error of some kind. % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. % {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\margbackslash#1{\char`\#1 } \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0\relax \else \expandafter\parsemargdef \argl;% \if\paramno>256\relax \ifx\eTeXversion\thisisundefined \errhelp = \EMsimple \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} \fi \fi \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % For macro processing make @ a letter so that we can make Texinfo private macro names. \edef\texiatcatcode{\the\catcode`\@} \catcode `@=11\relax % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.BLAH for each BLAH % in the params list to some hook where the argument si to be expanded. If % there are less than 10 arguments that hook is to be replaced by ##N where N % is the position in that list, that is to say the macro arguments are to be % defined `a la TeX in the macro body. % % That gets used by \mbodybackslash (above). % % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. % % If there are 10 or more arguments, a different technique is used, where the % hook remains in the body, and when macro is to be expanded the body is % processed again to replace the arguments. % % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the % argument N value and then \edef the body (nothing else will expand because of % the catcode regime underwhich the body was input). % % If you compile with TeX (not eTeX), and you have macros with 10 or more % arguments, you need that no macro has more than 256 arguments, otherwise an % error is produced. \def\parsemargdef#1;{% \paramno=0\def\paramlist{}% \let\hash\relax \let\xeatspaces\relax \parsemargdefxxx#1,;,% % In case that there are 10 or more arguments we parse again the arguments % list to set new definitions for the \macarg.BLAH macros corresponding to % each BLAH argument. It was anyhow needed to parse already once this list % in order to count the arguments, and as macros with at most 9 arguments % are by far more frequent than macro with 10 or more arguments, defining % twice the \macarg.BLAH macros does not cost too much processing power. \ifnum\paramno<10\relax\else \paramno0\relax \parsemmanyargdef@@#1,;,% 10 or more arguments \fi } \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} \def\parsemmanyargdef@@#1,{% \if#1;\let\next=\relax \else \let\next=\parsemmanyargdef@@ \edef\tempb{\eatspaces{#1}}% \expandafter\def\expandafter\tempa \expandafter{\csname macarg.\tempb\endcsname}% % Note that we need some extra \noexpand\noexpand, this is because we % don't want \the to be expanded in the \parsermacbody as it uses an % \xdef . \expandafter\edef\tempa {\noexpand\noexpand\noexpand\the\toks\the\paramno}% \advance\paramno by 1\relax \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) % \catcode `\@\texiatcatcode \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \catcode `\@=11\relax \let\endargs@\relax \let\nil@\relax \def\nilm@{\nil@}% \long\def\nillm@{\nil@}% % This macro is expanded during the Texinfo macro expansion, not during its % definition. It gets all the arguments values and assigns them to macros % macarg.ARGNAME % % #1 is the macro name % #2 is the list of argument names % #3 is the list of argument values \def\getargvals@#1#2#3{% \def\macargdeflist@{}% \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. \def\paramlist{#2,\nil@}% \def\macroname{#1}% \begingroup \macroargctxt \def\argvaluelist{#3,\nil@}% \def\@tempa{#3}% \ifx\@tempa\empty \setemptyargvalues@ \else \getargvals@@ \fi } % \def\getargvals@@{% \ifx\paramlist\nilm@ % Some sanity check needed here that \argvaluelist is also empty. \ifx\argvaluelist\nillm@ \else \errhelp = \EMsimple \errmessage{Too many arguments in macro `\macroname'!}% \fi \let\next\macargexpandinbody@ \else \ifx\argvaluelist\nillm@ % No more arguments values passed to macro. Set remaining named-arg % macros to empty. \let\next\setemptyargvalues@ \else % pop current arg name into \@tempb \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% \expandafter\@tempa\expandafter{\paramlist}% % pop current argument value into \@tempc \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% \expandafter\@tempa\expandafter{\argvaluelist}% % Here \@tempb is the current arg name and \@tempc is the current arg value. % First place the new argument macro definition into \@tempd \expandafter\macname\expandafter{\@tempc}% \expandafter\let\csname macarg.\@tempb\endcsname\relax \expandafter\def\expandafter\@tempe\expandafter{% \csname macarg.\@tempb\endcsname}% \edef\@tempd{\long\def\@tempe{\the\macname}}% \push@\@tempd\macargdeflist@ \let\next\getargvals@@ \fi \fi \next } \def\push@#1#2{% \expandafter\expandafter\expandafter\def \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% \expandafter#1#2}% } % Replace arguments by their values in the macro body, and place the result % in macro \@tempa \def\macvalstoargs@{% % To do this we use the property that token registers that are \the'ed % within an \edef expand only once. So we are going to place all argument % values into respective token registers. % % First we save the token context, and initialize argument numbering. \begingroup \paramno0\relax % Then, for each argument number #N, we place the corresponding argument % value into a new token list register \toks#N \expandafter\putargsintokens@\saveparamlist@,;,% % Then, we expand the body so that argument are replaced by their % values. The trick for values not to be expanded themselves is that they % are within tokens and that tokens expand only once in an \edef . \edef\@tempc{\csname mac.\macroname .body\endcsname}% % Now we restore the token stack pointer to free the token list registers % which we have used, but we make sure that expanded body is saved after % group. \expandafter \endgroup \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% } \def\macargexpandinbody@{% %% Define the named-macro outside of this group and then close this group. \expandafter \endgroup \macargdeflist@ % First the replace in body the macro arguments by their values, the result % is in \@tempa . \macvalstoargs@ % Then we point at the \norecurse or \gobble (for recursive) macro value % with \@tempb . \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname % Depending on whether it is recursive or not, we need some tailing % \egroup . \ifx\@tempb\gobble \let\@tempc\relax \else \let\@tempc\egroup \fi % And now we do the real job: \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% \@tempd } \def\putargsintokens@#1,{% \if#1;\let\next\relax \else \let\next\putargsintokens@ % First we allocate the new token list register, and give it a temporary % alias \@tempb . \toksdef\@tempb\the\paramno % Then we place the argument value into that token list register. \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname \expandafter\@tempb\expandafter{\@tempa}% \advance\paramno by 1\relax \fi \next } % Save the token stack pointer into macro #1 \def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} % Restore the token stack pointer from number in macro #1 \def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} % newtoks that can be used non \outer . \def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} % Tailing missing arguments are set to empty \def\setemptyargvalues@{% \ifx\paramlist\nilm@ \let\next\macargexpandinbody@ \else \expandafter\setemptyargvaluesparser@\paramlist\endargs@ \let\next\setemptyargvalues@ \fi \next } \def\setemptyargvaluesparser@#1,#2\endargs@{% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter\def\csname macarg.#1\endcsname{}}% \push@\@tempa\macargdeflist@ \def\paramlist{#2}% } % #1 is the element target macro % #2 is the list macro % #3,#4\endargs@ is the list value \def\pop@#1#2#3,#4\endargs@{% \def#1{#3}% \def#2{#4}% } \long\def\longpop@#1#2#3,#4\endargs@{% \long\def#1{#3}% \long\def#2{#4}% } % This defines a Texinfo @macro. There are eight cases: recursive and % nonrecursive macros of zero, one, up to nine, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. % \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else \ifnum\paramno<10\relax % at most 9 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \else % 10 or more \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble \fi \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % at most 9 \ifnum\paramno<10\relax \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % 10 or more: \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse \fi \fi \fi} \catcode `\@\texiatcatcode\relax \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg). % \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Make them active and then expand them all to nothing. % \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{% \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } % @xrefautosectiontitle on|off says whether @section(ing) names are used % automatically in xrefs, if the third arg is not explicitly specified. % This was provided as a "secret" @set xref-automatic-section-title % variable, now it's official. % \parseargdef\xrefautomaticsectiontitle{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', must be on|off}% \fi\fi } % % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} % \newbox\toprefbox \newbox\printedrefnamebox \newbox\infofilenamebox \newbox\printedmanualbox % \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces % % Get args without leading/trailing spaces. \def\printedrefname{\ignorespaces #3}% \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% % \def\infofilename{\ignorespaces #4}% \setbox\infofilenamebox = \hbox{\infofilename\unskip}% % \def\printedmanual{\ignorespaces #5}% \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% % % If the printed reference name (arg #3) was not explicitly given in % the @xref, figure out what we want to use. \ifdim \wd\printedrefnamebox = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax % Not auto section-title: use node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % Auto section-title: use chapter/section title inside % the square brackets if we have it. \ifdim \wd\printedmanualbox > 0pt % It is in another manual, so we don't have it; use node name. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We (should) know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive \makevalueexpandable % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. This ignores all spaces in % #4, including (wrongly) those in the middle of the filename. \getfilename{#4}% % % This (wrongly) does not take account of leading or trailing % spaces in #1, which should be ignored. \edef\pdfxrefdest{#1}% \ifx\pdfxrefdest\empty \def\pdfxrefdest{Top}% no empty targets \else \txiescapepdf\pdfxrefdest % escape PDF special chars \fi % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd\printedrefnamebox = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % If the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % If we use \unhbox to print the node names, TeX does not insert % empty discretionaries after hyphens, which means that it will not % find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, % this is a loss. Therefore, we give the text of the node name % again, so it is as if TeX is seeing it for the first time. % \ifdim \wd\printedmanualbox > 0pt % Cross-manual reference with a printed manual name. % \crossmanualxref{\cite{\printedmanual\unskip}}% % \else\ifdim \wd\infofilenamebox > 0pt % Cross-manual reference with only an info filename (arg 4), no % printed manual name (arg 5). This is essentially the same as % the case above; we output the filename, since we have nothing else. % \crossmanualxref{\code{\infofilename\unskip}}% % \else % Reference within this manual. % % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi\fi \fi \endlink \endgroup} % Output a cross-manual xref to #1. Used just above (twice). % % Only include the text "Section ``foo'' in" if the foo is neither % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply % "see The Foo Manual", the idea being to refer to the whole manual. % % But, this being TeX, we can't easily compare our node name against the % string "Top" while ignoring the possible spaces before and after in % the input. By adding the arbitrary 7sp below, we make it much less % likely that a real node name would have the same width as "Top" (e.g., % in a monospaced font). Hopefully it will never happen in practice. % % For the same basic reason, we retypeset the "Top" at every % reference, since the current font is indeterminate. % \def\crossmanualxref#1{% \setbox\toprefbox = \hbox{Top\kern7sp}% \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% \ifdim \wd2 > 7sp % nonempty? \ifdim \wd2 = \wd\toprefbox \else % same as Top? \putwordSection{} ``\printedrefname'' \putwordin{}\space \fi \fi #1% } % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs {\toks0 = {#1}% avoid expansion of possibly-complex value \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut % % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\thisisundefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \else \ifx\centersub\centerV % for @center @image, we need a vbox so we can have our vertical space \imagevmodetrue \vbox\bgroup % vbox has better behavior than vtop herev \fi\fi % \ifimagevmode \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. % However, if we're at the top level, we don't want the % normal paragraph indentation. % On the other hand, if we are in the case of @center @image, we don't % want to start a paragraph, which will create a hsize-width box and % eradicate the centering. \ifx\centersub\centerV\else \noindent \fi % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip % space after a standalone image \fi \ifx\centersub\centerV \egroup \fi \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{\tie} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{\tie} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'{\dotless{i}}} \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be very finicky about underfull hboxes, either. \hbadness = 6666 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} \def^^L{\par} % remove \outer, so ^L can appear in an @comment % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \def\normaldoublequote{"} \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix \catcode`\+=\other \def\normalplus{+} \catcode`\<=\other \def\normalless{<} \catcode`\>=\other \def\normalgreater{>} \catcode`\^=\other \def\normalcaret{^} \catcode`\_=\other \def\normalunderscore{_} \catcode`\|=\other \def\normalverticalbar{|} \catcode`\~=\other \def\normaltilde{~} % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active % @ for escape char from now on. % The story here is that in math mode, the \char of \backslashcurfont % ends up printing the roman \ from the math symbol font (because \char % in math mode uses the \mathcode, and plain.tex sets % \mathcode`\\="026E). It seems better for @backslashchar{} to always % print a typewriter backslash, hence we use an explicit \mathchar, % which is the decimal equivalent of "715c (class 7, e.g., use \fam; % ignored family value; char position "5C). We can't use " for the % usual hex value because it has already been made active. @def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} @let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. We switch back and forth between these. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. Also revert - to its normal character, in % case the active - from code has slipped in. % {@catcode`- = @active @gdef@normalturnoffactive{% @let-=@normaldash @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix @let+=@normalplus @let<=@normalless @let>=@normalgreater @let\=@normalbackslash @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let~=@normaltilde @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } } % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These (along with & and #) are made active for url-breaking, so need % active definitions as the normal characters. @def@normaldot{.} @def@normalquest{?} @def@normalslash{/} % These look ok in all fonts, so just make them not special. % @hashchar{} gets its own user-level command, because of #line. @catcode`@& = @other @def@normalamp{&} @catcode`@# = @other @def@normalhash{#} @catcode`@% = @other @def@normalpercent{%} @let @hashchar = @normalhash @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore pspp-1.0.1/build-aux/gitlog-to-changelog0000755000175000017500000003644313124536241015101 00000000000000eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"' & eval 'exec perl -wS "$0" $argv:q' if 0; # Convert git log output to ChangeLog format. my $VERSION = '2016-03-22 21:49'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. # Copyright (C) 2008-2017 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # Written by Jim Meyering use strict; use warnings; use Getopt::Long; use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; # use File::Coda; # http://meyering.net/code/Coda/ END { defined fileno STDOUT or return; close STDOUT and return; warn "$ME: failed to close standard output: $!\n"; $? ||= 1; } sub usage ($) { my ($exit_code) = @_; my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); if ($exit_code != 0) { print $STREAM "Try '$ME --help' for more information.\n"; } else { print $STREAM < ChangeLog $ME -- -n 5 foo > last-5-commits-to-branch-foo SPECIAL SYNTAX: The following types of strings are interpreted specially when they appear at the beginning of a log message line. They are not copied to the output. Copyright-paperwork-exempt: Yes Append the "(tiny change)" notation to the usual "date name email" ChangeLog header to mark a change that does not require a copyright assignment. Co-authored-by: Joe User List the specified name and email address on a second ChangeLog header, denoting a co-author. Signed-off-by: Joe User These lines are simply elided. In a FILE specified via --amend, comment lines (starting with "#") are ignored. FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on a line) referring to a commit in the current project, and CODE refers to one or more consecutive lines of Perl code. Pairs must be separated by one or more blank line. Here is sample input for use with --amend=FILE, from coreutils: 3a169f4c5d9159283548178668d2fae6fced3030 # fix typo in title: s/all tile types/all file types/ 1379ed974f1fa39b12e2ffab18b3f7a607082202 # Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. # Change the author to be Paul. Note the escaped "@": s,Jim .*>,Paul Eggert , EOF } exit $exit_code; } # If the string $S is a well-behaved file name, simply return it. # If it contains white space, quotes, etc., quote it, and return the new string. sub shell_quote($) { my ($s) = @_; if ($s =~ m![^\w+/.,-]!) { # Convert each single quote to '\'' $s =~ s/\'/\'\\\'\'/g; # Then single quote the string. $s = "'$s'"; } return $s; } sub quoted_cmd(@) { return join (' ', map {shell_quote $_} @_); } # Parse file F. # Comment lines (starting with "#") are ignored. # F must consist of pairs where SHA is a 40-byte SHA1 # (alone on a line) referring to a commit in the current project, and # CODE refers to one or more consecutive lines of Perl code. # Pairs must be separated by one or more blank line. sub parse_amend_file($) { my ($f) = @_; open F, '<', $f or die "$ME: $f: failed to open for reading: $!\n"; my $fail; my $h = {}; my $in_code = 0; my $sha; while (defined (my $line = )) { $line =~ /^\#/ and next; chomp $line; $line eq '' and $in_code = 0, next; if (!$in_code) { $line =~ /^([0-9a-fA-F]{40})$/ or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), $fail = 1, next; $sha = lc $1; $in_code = 1; exists $h->{$sha} and (warn "$ME: $f:$.: duplicate SHA1\n"), $fail = 1, next; } else { $h->{$sha} ||= ''; $h->{$sha} .= "$line\n"; } } close F; $fail and exit 1; return $h; } # git_dir_option $SRCDIR # # From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR # is undef). Return as a list (0 or 1 element). sub git_dir_option($) { my ($srcdir) = @_; my @res = (); if (defined $srcdir) { my $qdir = shell_quote $srcdir; my $cmd = "cd $qdir && git rev-parse --show-toplevel"; my $qcmd = shell_quote $cmd; my $git_dir = qx($cmd); defined $git_dir or die "$ME: cannot run $qcmd: $!\n"; $? == 0 or die "$ME: $qcmd had unexpected exit code or signal ($?)\n"; chomp $git_dir; push @res, "--git-dir=$git_dir/.git"; } @res; } { my $since_date; my $until_date; my $format_string = '%s%n%b%n'; my $amend_file; my $append_dot = 0; my $cluster = 1; my $ignore_matching; my $ignore_line; my $strip_tab = 0; my $strip_cherry_pick = 0; my $srcdir; GetOptions ( help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, 'since=s' => \$since_date, 'until=s' => \$until_date, 'format=s' => \$format_string, 'amend=s' => \$amend_file, 'append-dot' => \$append_dot, 'cluster!' => \$cluster, 'ignore-matching=s' => \$ignore_matching, 'ignore-line=s' => \$ignore_line, 'strip-tab' => \$strip_tab, 'strip-cherry-pick' => \$strip_cherry_pick, 'srcdir=s' => \$srcdir, ) or usage 1; defined $since_date and unshift @ARGV, "--since=$since_date"; defined $until_date and unshift @ARGV, "--until=$until_date"; # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) # that makes a correction in the log or attribution of that commit. my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; my @cmd = ('git', git_dir_option $srcdir, qw(log --log-size), '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); open PIPE, '-|', @cmd or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n" . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); my $prev_multi_paragraph; my $prev_date_line = ''; my @prev_coauthors = (); my @skipshas = (); while (1) { defined (my $in = ) or last; $in =~ /^log size (\d+)$/ or die "$ME:$.: Invalid line (expected log size):\n$in"; my $log_nbytes = $1; my $log; my $n_read = read PIPE, $log, $log_nbytes; $n_read == $log_nbytes or die "$ME:$.: unexpected EOF\n"; # Extract leading hash. my ($sha, $rest) = split ':', $log, 2; defined $sha or die "$ME:$.: malformed log entry\n"; $sha =~ /^[0-9a-fA-F]{40}$/ or die "$ME:$.: invalid SHA1: $sha\n"; my $skipflag = 0; if (@skipshas) { foreach(@skipshas) { if ($sha =~ /^$_/) { $skipflag = $_; last; } } } # If this commit's log requires any transformation, do it now. my $code = $amend_code->{$sha}; if (defined $code) { eval 'use Safe'; my $s = new Safe; # Put the unpreprocessed entry into "$_". $_ = $rest; # Let $code operate on it, safely. my $r = $s->reval("$code") or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; # Note that we've used this entry. delete $amend_code->{$sha}; # Update $rest upon success. $rest = $_; } # Remove lines inserted by "git cherry-pick". if ($strip_cherry_pick) { $rest =~ s/^\s*Conflicts:\n.*//sm; $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; } my @line = split /[ \t]*\n/, $rest; my $author_line = shift @line; defined $author_line or die "$ME:$.: unexpected EOF\n"; $author_line =~ /^(\d+) (.*>)$/ or die "$ME:$.: Invalid line " . "(expected date/author/email):\n$author_line\n"; # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog # `(tiny change)' annotation. my $tiny = (grep (/^(?:Copyright-paperwork-exempt|Tiny-change):\s+[Yy]es$/, @line) ? ' (tiny change)' : ''); my $date_line = sprintf "%s %s$tiny\n", strftime ("%Y-%m-%d", localtime ($1)), $2; my @coauthors = grep /^Co-authored-by:.*$/, @line; # Omit meta-data lines we've already interpreted. @line = grep !/^(?:Signed-off-by:[ ].*>$ |Co-authored-by:[ ] |Copyright-paperwork-exempt:[ ] |Tiny-change:[ ] )/x, @line; # Remove leading and trailing blank lines. if (@line) { while ($line[0] =~ /^\s*$/) { shift @line; } while ($line[$#line] =~ /^\s*$/) { pop @line; } } # Handle Emacs gitmerge.el "skipped" commits. # Yes, this should be controlled by an option. So sue me. if ( grep /^(; )?Merge from /, @line ) { my $found = 0; foreach (@line) { if (grep /^The following commit.*skipped:$/, $_) { $found = 1; ## Reset at each merge to reduce chance of false matches. @skipshas = (); next; } if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/) { push ( @skipshas, $1 ); } } } # Ignore commits that match the --ignore-matching pattern, if specified. if (defined $ignore_matching && @line && $line[0] =~ /$ignore_matching/) { $skipflag = 1; } elsif ($skipflag) { ## Perhaps only warn if a pattern matches more than once? warn "$ME: warning: skipping $sha due to $skipflag\n"; } if (! $skipflag) { if (defined $ignore_line && @line) { @line = grep ! /$ignore_line/, @line; while ($line[$#line] =~ /^\s*$/) { pop @line; } } # Record whether there are two or more paragraphs. my $multi_paragraph = grep /^\s*$/, @line; # Format 'Co-authored-by: A U Thor ' lines in # standard multi-author ChangeLog format. for (@coauthors) { s/^Co-authored-by:\s*/\t /; s/\s*/ or warn "$ME: warning: missing email address for " . substr ($_, 5) . "\n"; } # If clustering of commit messages has been disabled, if this header # would be different from the previous date/name/etc. header, # or if this or the previous entry consists of two or more paragraphs, # then print the header. if ( ! $cluster || $date_line ne $prev_date_line || "@coauthors" ne "@prev_coauthors" || $multi_paragraph || $prev_multi_paragraph) { $prev_date_line eq '' or print "\n"; print $date_line; @coauthors and print join ("\n", @coauthors), "\n"; } $prev_date_line = $date_line; @prev_coauthors = @coauthors; $prev_multi_paragraph = $multi_paragraph; # If there were any lines if (@line == 0) { warn "$ME: warning: empty commit message:\n $date_line\n"; } else { if ($append_dot) { # If the first line of the message has enough room, then if (length $line[0] < 72) { # append a dot if there is no other punctuation or blank # at the end. $line[0] =~ /[[:punct:]\s]$/ or $line[0] .= '.'; } } # Remove one additional leading TAB from each line. $strip_tab and map { s/^\t// } @line; # Prefix each non-empty line with a TAB. @line = map { length $_ ? "\t$_" : '' } @line; print "\n", join ("\n", @line), "\n"; } } defined ($in = ) or last; $in ne "\n" and die "$ME:$.: unexpected line:\n$in"; } close PIPE or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; # FIXME-someday: include $PROCESS_STATUS in the diagnostic # Complain about any unused entry in the --amend=F specified file. my $fail = 0; foreach my $sha (keys %$amend_code) { warn "$ME:$amend_file: unused entry: $sha\n"; $fail = 1; } exit $fail; } # Local Variables: # mode: perl # indent-tabs-mode: nil # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d %02H:%02M" # time-stamp-time-zone: "UTC0" # time-stamp-end: "'; # UTC" # End: pspp-1.0.1/build-aux/ltmain.sh0000644000175000017500000105203013143642674013141 00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # 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. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1.11" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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 BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # 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 () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # 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 () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -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_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # 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 "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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 BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # 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 relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 pspp-1.0.1/build-aux/config.libpath0000755000175000017500000001004613124536241014125 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable at run time. # # Copyright 1996-2017 Free Software Foundation, Inc. # Taken from GNU libtool, 2003 # Originally by Gordon Matzigkeit , 1996 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 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 . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variable LD should be set by the caller. # # The set of defined variables is at the end of this script. host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` shlibpath_var= case $host_os in aix3*) shlibpath_var=LIBPATH ;; aix[4-9]*) if test "$host_cpu" = ia64; then # AIX 5 supports IA64 shlibpath_var=LD_LIBRARY_PATH else shlibpath_var=LIBPATH fi ;; beos*) shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) shlibpath_var=LD_LIBRARY_PATH ;; cygwin* | mingw* | pw32* | cegcc*) # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) shlibpath_var=DYLD_LIBRARY_PATH ;; dgux*) shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) shlibpath_var=LD_LIBRARY_PATH ;; gnu*) shlibpath_var=LD_LIBRARY_PATH ;; hpux9* | hpux10* | hpux11*) case "$host_cpu" in ia64* | hppa*64*) shlibpath_var=LD_LIBRARY_PATH ;; *) shlibpath_var=SHLIB_PATH ;; esac ;; interix[3-9]*) shlibpath_var=LD_LIBRARY_PATH ;; irix5* | irix6* | nonstopux*) case $host_os in irix5* | nonstopux*) shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 ") shlibsuff= ;; *-n32|*"-n32 ") shlibsuff=N32 ;; *-64|*"-64 ") shlibsuff=64 ;; *) shlibsuff= ;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu) shlibpath_var=LD_LIBRARY_PATH ;; netbsd*) shlibpath_var=LD_LIBRARY_PATH ;; newsos6) shlibpath_var=LD_LIBRARY_PATH ;; nto-qnx*) shlibpath_var=LD_LIBRARY_PATH ;; openbsd*) shlibpath_var=LD_LIBRARY_PATH ;; os2*) shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) shlibpath_var=LD_LIBRARY_PATH ;; rdos*) ;; solaris*) shlibpath_var=LD_LIBRARY_PATH ;; sunos4*) shlibpath_var=LD_LIBRARY_PATH ;; sysv4 | sysv4.3*) shlibpath_var=LD_LIBRARY_PATH ;; sysv4*MP*) if test -d /usr/nec ;then shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) shlibpath_var=LD_LIBRARY_PATH ;; uts4*) shlibpath_var=LD_LIBRARY_PATH ;; esac LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pspp-1.0.1/build-aux/automake.mk0000644000175000017500000000154413137223525013454 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- EXTRA_DIST += build-aux/svg2png build-aux/icon-list pspp-1.0.1/build-aux/icon-list0000755000175000017500000000063712523704223013143 00000000000000#! /bin/sh id=$1 name=$2 shift; shift cat <. dnl dnl Process this file with autoconf to produce a configure script. dnl Initialize. AC_PREREQ(2.63) AC_INIT([GNU PSPP], [1.0.1], [bug-gnu-pspp@gnu.org], [pspp]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) AM_INIT_AUTOMAKE dnl Checks for programs. AC_GNU_SOURCE AC_PROG_CC gl_EARLY AM_PROG_CC_C_O AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL AC_HEADER_TIOCGWINSZ PKG_PROG_PKG_CONFIG m4_pattern_forbid([PKG_CHECK_MODULES]) PSPP_CHECK_CLICKSEQUENCE PSPP_CHECK_DOT PSPP_ENABLE_WERROR AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" ) PSPP_CC_FOR_BUILD PSPP_PERL dnl Disable automatic po/ support, because PSPP provides its own po/ support. AC_PROVIDE([AM_PO_SUBDIRS]) AM_GNU_GETTEXT([external], [need-ngettext]) LIBS="$LIBINTL $LIBS" AC_CHECK_PROGS([MSGFMT], [msgfmt]) if test "x$MSGFMT" = x; then PSPP_REQUIRED_PREREQ([msgfmt (is usually provided with gettext)]) fi dnl Checks for libraries. AC_SYS_LARGEFILE AC_SEARCH_LIBS([sin], [m]) PSPP_LC_PAPER AC_ARG_VAR([PSPP_LDFLAGS], [linker flags to be used for linking the pspp binary only]) AC_ARG_VAR([PSPPIRE_LDFLAGS], [linker flags to be used for linking the psppire binary only]) # Support for Cairo and Pango. AC_ARG_WITH([cairo], [AS_HELP_STRING( [--without-cairo], [Don't build support for charts (using Cairo and Pango); implies --without-gui])], [], [with_cairo=yes]) AM_CONDITIONAL([HAVE_CAIRO], [test "$with_cairo" != no]) if test "$with_cairo" != no; then PKG_CHECK_MODULES([CAIRO], [cairo >= 1.5 pango >= 1.22 pangocairo], [CPPFLAGS="$CPPFLAGS $CAIRO_CFLAGS" AC_DEFINE([HAVE_CAIRO], 1, [Define to 1 if Cairo and Pango are available.])], [PSPP_REQUIRED_PREREQ([cairo 1.5 or later and pango 1.22 or later (or use --without-cairo)])]) fi dnl Xmllint is used in the rules to build the documentation. It is not actually necessary, dnl but is used for post-build consistency checks. Thus, non-developers can live without it. dnl However for it to be useful, it needs to be a certain version and have certain features. dnl The macros below check that it the xmllint available is up to scratch. If it isn't dnl then a dummy /bin/echo is subsituted instead. AC_CACHE_CHECK([for an xmllint program which fits our needs],[ac_cv_path_XMLLINT], [AC_PATH_PROGS_FEATURE_CHECK([XMLLINT], [xmllint], [[$ac_path_XMLLINT --version 2>&1 | $GREP XPath > /dev/null && test `$ac_path_XMLLINT --version 2>&1 | $SED 's/^.* \([0-9]*\).*/\1/'` -gt 20900 && ac_cv_path_XMLLINT=$ac_path_XMLLINT]], [AC_MSG_WARN([no appropriate xmllint program found. Using a dummy (echo)]); ac_cv_path_XMLLINT=$ECHO])]) AC_SUBST([XMLLINT],[$ac_cv_path_XMLLINT]) # Support for GUI. AC_ARG_WITH([gui], [AS_HELP_STRING([--without-gui], [Don't build the PSPPIRE GUI (using GTK+)])], [], [with_gui=yes]) AM_CONDITIONAL([HAVE_GUI], [test "$with_cairo" != no && test "$with_gui" != "no"]) if test "$with_cairo" != no && test "$with_gui" != "no"; then PKG_CHECK_MODULES([GTHREAD], [gthread-2.0], [], [PSPP_REQUIRED_PREREQ([gthread 2.0 (or use --without-gui)])]) PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.14.5], [], [PSPP_REQUIRED_PREREQ([gtk+ 3.0 version 3.14.5 or later (or use --without-gui)])]) PKG_CHECK_MODULES([GTKSOURCEVIEW], [gtksourceview-3.0 >= 3.4.2], [], [PSPP_REQUIRED_PREREQ([gtksourceview 3.0 version 3.4.2 or later (or use --without-gui)])]) PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.32], [], [PSPP_REQUIRED_PREREQ([glib 2.0 version 2.32 or later (or use --without-gui)])]) AC_ARG_VAR([GLIB_GENMARSHAL]) AC_CHECK_PROGS([GLIB_GENMARSHAL], [glib-genmarshal]) if test "x$GLIB_GENMARSHAL" = x; then PSPP_REQUIRED_PREREQ([glib-genmarshal (or use --without-gui)]) fi AC_CHECK_PROGS([GLIB_COMPILE_RESOURCES], [glib-compile-resources]) if test "x$GLIB_COMPILE_RESOURCES" = x; then PSPP_REQUIRED_PREREQ([glib-compile-resources (or use --without-gui)]) fi fi gl_NEXT_HEADERS([gtk/gtk.h]) dnl Checks needed for psql reader dnl The 8.x series postgres tarballs installs with a default prefix of dnl /usr/local/pgsql whereas, OSes (such as debian) install into /usr . dnl If the libpq.so file is in a non standard path, (one which the linker dnl doesn't search) then we must set the PG_LDFLAGS to -R/usr/wherever/ dnl However, if the system happens to have more than one version of other dnl dependent libraries (eg. libgtk) in different standard paths. (eg: dnl /usr and /usr/local) then the wrong one may get linked. dnl To overcome this, we first check for libpq in the standard places, and dnl only set PG_LDFLAGS if it's not found. AC_ARG_WITH( libpq, [AS_HELP_STRING([--without-libpq], [don't compile in Postgres capability])]) AC_ARG_VAR([PG_CONFIG], [Full pathname of the pg_config program shipped with Postgresql]) AC_PATH_PROG([PG_CONFIG], [pg_config], [], [$PATH:/usr/local/pgsql/bin:/usr/pgsql/bin]) if test x"$with_libpq" != x"no" && test -n "$PG_CONFIG" ; then AC_SUBST(PG_CONFIG) PG_CFLAGS=-I`$PG_CONFIG --includedir` AC_SUBST(PG_CFLAGS) AC_CHECK_LIB([pq], [PQexec], [:], [PG_LDFLAGS="-L`$PG_CONFIG --libdir` -R`$PG_CONFIG --libdir`"]) AC_SUBST(PG_LDFLAGS) PG_LIBS=-lpq AC_SUBST(PG_LIBS) PKG_CHECK_EXISTS(libssl, AC_DEFINE([USE_SSL],1, [Define to 1 if the openssl library is present.]) ,) # Now verify that we can actually link against libpq. If we are # cross-compiling and picked up a host libpq, or if libpq is just # badly installed, this will fail. AC_CACHE_CHECK( [whether -lpq links successfully], [pspp_cv_have_libpq], [save_CPPFLAGS=$CPPFLAGS save_LIBS=$LIBS save_LDFLAGS=$LDFLAGS CPPFLAGS="$PG_CFLAGS $CPPFLAGS" LIBS="$PG_LIBS $LIBS" LDFLAGS="$PG_LDFLAGS $LDFLAGS" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [#include ], [PQfinish (0);])], [pspp_cv_have_libpq=yes], [pspp_cv_have_libpq=no]) CPPFLAGS=$save_CPPFLAGS LIBS=$save_LIBS LDFLAGS=$save_LDFLAGS]) if test $pspp_cv_have_libpq = yes; then PSQL_SUPPORT=yes AC_DEFINE([PSQL_SUPPORT], [1], [Define to 1 if building in support for reading from postgres databases.]) else PSQL_SUPPORT=no PG_CONFIG= PG_CFLAGS= PG_LDFLAGS= PG_LIBS= fi else PSQL_SUPPORT=no pspp_cv_have_libpq=no fi AC_SUBST([PSQL_SUPPORT]) dnl Check for libxml2 PKG_CHECK_MODULES( [LIBXML2], [libxml-2.0], [HAVE_LIBXML2=yes], [HAVE_LIBXML2=no PSPP_OPTIONAL_PREREQ([libxml2])]) dnl Check for zlib. AC_SEARCH_LIBS([gzopen], [z], [], [PSPP_REQUIRED_PREREQ([zlib])]) AC_CHECK_HEADERS([zlib.h], [], [PSPP_REQUIRED_PREREQ([zlib])]) dnl Avoid interference between zlib's crc32() function and gnulib's dnl crc32() function, which have different signatures. PSPP calls dnl only gnulib's crc32() directly, but it calls zlib's crc32() dnl indirectly through other zlib calls. If we don't rename gnulib's dnl crc32(), then zlib will call gnulib's version instead of its own, dnl causing failures. (This can happen even if zlib isn't detected dnl directly, because other libraries that PSPP uses, e.g. libpng, dnl sometimes use zlib themselves.) AC_DEFINE( [crc32], [gl_crc32], [Avoid making zlib call gnulib's crc32() instead of its own.]) dnl Gnumeric and OpenDocument (read) support requires libxml2 and zlib. if test $HAVE_LIBXML2 = yes; then GNM_READ_SUPPORT=yes ODF_READ_SUPPORT=yes AC_DEFINE( [GNM_READ_SUPPORT], [1], [Define to 1 if building in support for reading Gnumeric files.]) AC_DEFINE( [ODF_READ_SUPPORT], [1], [Define to 1 if building in support for reading OpenDocument files.]) else GNM_READ_SUPPORT=no ODF_READ_SUPPORT=no fi AC_SUBST([GNM_READ_SUPPORT]) AC_SUBST([ODF_READ_SUPPORT]) dnl ODF support requires libxml2 (zlib is optional). if test $HAVE_LIBXML2 = yes; then AC_DEFINE( [ODF_WRITE_SUPPORT], [1], [Define to 1 if building in support for writing OpenDocument files.]) fi AM_CONDITIONAL([ODF_WRITE_SUPPORT], [test $HAVE_LIBXML2 = yes]) AC_ARG_WITH( gui_tools, [AS_HELP_STRING([--with-gui-tools], [build the gui developer tools. For DEVELOPERS only! There is no reason why users will need this flag.])]) if test x"$with_gui_tools" = x"yes" ; then PKG_CHECK_MODULES(GLADE_UI, gladeui-2.0) fi AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" = x"yes") AC_ARG_WITH( [perl-module], [AS_HELP_STRING([--without-perl-module], [do not build the Perl module])], [case $with_perl_module in # ( yes|no) ;; # ( *) AC_MSG_FAILURE([--with-perl-module argument must be 'yes' or 'no']) ;; esac WITH_PERL_MODULE=$with_perl_module], [if test x"$cross_compiling" != x"yes"; then WITH_PERL_MODULE=yes else WITH_PERL_MODULE=no fi]) AC_SUBST([WITH_PERL_MODULE]) AM_CONDITIONAL(WITH_PERL_MODULE, test $WITH_PERL_MODULE = yes) AC_SEARCH_LIBS([cblas_dsdot], [gslcblas],,[PSPP_REQUIRED_PREREQ([libgslcblas])]) PKG_CHECK_MODULES([GSL], [gsl >= 1.13], [], AC_SEARCH_LIBS([gsl_poly_eval_derivs], [gsl],,[PSPP_REQUIRED_PREREQ([gsl version 1.13 or later])])) PSPP_GSL_NEEDS_FGNU89_INLINE PSPP_READLINE dnl Checks for header files. AC_CHECK_HEADERS([sys/wait.h fpu_control.h ieeefp.h fenv.h pwd.h]) dnl Some systems don't have SIGWINCH AC_CHECK_DECLS([SIGWINCH], [], [], [#include /* NetBSD declares sys_siglist in unistd.h. */ #ifdef HAVE_UNISTD_H # include #endif ]) # For gnulib. gl_INIT AC_C_INLINE AC_C_BIGENDIAN AC_CHECK_FUNCS([__setfpucw fork execl isinf isnan finite getpid feholdexcept fpsetmask popen round]) AC_PROG_LN_S AC_ARG_ENABLE( debug, [AS_HELP_STRING([--enable-debug], [Turn on diagnostic features in the program])]) if test x"$enable_debug" = x"yes" ; then AC_DEFINE(DEBUGGING, 1, [Define to 1 if debugging is enabled.]) fi # iconv is required AM_ICONV if test "$am_cv_func_iconv" != "yes"; then PSPP_REQUIRED_PREREQ([iconv (see http://www.gnu.org/software/libiconv/)]) fi LIBS="$LIBICONV $LIBS" dnl Required by the gnulib 'relocatable-prog' module. dnl See doc/relocatable-maint.texi in the gnulib tree for details. RELOCATABLE_LIBRARY_PATH='$(pkglibdir)' RELOCATABLE_STRIP=: PSPP_CHECK_PREREQS AC_CONFIG_FILES( [Makefile gl/Makefile po/Makefile tests/atlocal perl-module/lib/PSPP.pm]) AC_CONFIG_COMMANDS([doc/dummy], [:]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) AC_OUTPUT echo "PSPP configured successfully." dnl configure.ac ends here pspp-1.0.1/lib/0000755000175000017500000000000013150620333010236 500000000000000pspp-1.0.1/lib/linreg/0000755000175000017500000000000013150620333011516 500000000000000pspp-1.0.1/lib/linreg/sweep.h0000644000175000017500000000407112470242642012743 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef SWEEP_H #define SWEEP_H /* Find the least-squares estimate of b for the linear model: Y = Xb + Z where Y is an n-by-1 column vector, X is an n-by-p matrix of independent variables, b is a p-by-1 vector of regression coefficients, and Z is an n-by-1 normally-distributed random vector with independent identically distributed components with mean 0. This estimate is found via the sweep operator, which is a modification of Gauss-Jordan pivoting. References: Matrix Computations, third edition. GH Golub and CF Van Loan. The Johns Hopkins University Press. 1996. ISBN 0-8018-5414-8. Numerical Analysis for Statisticians. K Lange. Springer. 1999. ISBN 0-387-94979-8. Numerical Linear Algebra for Applications in Statistics. JE Gentle. Springer. 1998. ISBN 0-387-98542-5. */ /* The matrix A will be overwritten. In ordinary uses of the sweep operator, A will be the matrix __ __ |X'X X'Y| | | |Y'X Y'Y| -- -- X refers to the design matrix and Y to the vector of dependent observations. reg_sweep sweeps on the diagonal elements of X'X. The matrix A is assumed to be symmetric, so the sweep operation is performed only for the upper triangle of A. */ #include #include int reg_sweep (gsl_matrix *, int); #endif pspp-1.0.1/lib/linreg/sweep.c0000644000175000017500000000772013137223525012742 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2005, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* Find the least-squares estimate of b for the linear model: Y = Xb + Z where Y is an n-by-1 column vector, X is an n-by-p matrix of independent variables, b is a p-by-1 vector of regression coefficients, and Z is an n-by-1 normally-distributed random vector with independent identically distributed components with mean 0. This estimate is found via the sweep operator, which is a modification of Gauss-Jordan pivoting. References: Matrix Computations, third edition. GH Golub and CF Van Loan. The Johns Hopkins University Press. 1996. ISBN 0-8018-5414-8. Numerical Analysis for Statisticians. K Lange. Springer. 1999. ISBN 0-387-94979-8. Numerical Linear Algebra for Applications in Statistics. JE Gentle. Springer. 1998. ISBN 0-387-98542-5. */ #include #include "sweep.h" #include /* The matrix A will be overwritten. In ordinary uses of the sweep operator, A will be the matrix __ __ |X'X X'Y| | | |Y'X Y'Y| -- -- X refers to the design matrix and Y to the vector of dependent observations. reg_sweep sweeps on the diagonal elements of X'X. The matrix A is assumed to be symmetric, so the sweep operation is performed only for the upper triangle of A. LAST_COL is considered to be the final column in the augmented matrix, that is, the column to the right of the '=' sign of the system. */ int reg_sweep (gsl_matrix * A, int last_col) { int i; int j; int k; gsl_matrix *B; if (A == NULL) return GSL_EFAULT; if (A->size1 != A->size2) return GSL_ENOTSQR; assert (last_col < A->size1); gsl_matrix_swap_rows (A, A->size1 - 1, last_col); gsl_matrix_swap_columns (A, A->size1 - 1 , last_col); B = gsl_matrix_alloc (A->size1, A->size2); for (k = 0; k < (A->size1 - 1); k++) { const double sweep_element = gsl_matrix_get (A, k, k); if (fabs (sweep_element) > GSL_DBL_MIN) { gsl_matrix_set (B, k, k, -1.0 / sweep_element); /* Rows before current row k. */ for (i = 0; i < k; i++) { for (j = i; j < A->size2; j++) { /* Use only the upper triangle of A. */ double tmp; if (j < k) { tmp = gsl_matrix_get (A, i, j) - gsl_matrix_get (A, i, k) * gsl_matrix_get (A, j, k) / sweep_element; } else if (j > k) { tmp = gsl_matrix_get (A, i, j) - gsl_matrix_get (A, i, k) * gsl_matrix_get (A, k, j) / sweep_element; } else { tmp = gsl_matrix_get (A, i, k) / sweep_element; } gsl_matrix_set (B, i, j, tmp); } } /* Current row k. */ for (j = k + 1; j < A->size1; j++) { double tmp = gsl_matrix_get (A, k, j) / sweep_element; gsl_matrix_set (B, k, j, tmp); } /* Rows after the current row k. */ for (i = k + 1; i < A->size1; i++) { for (j = i; j < A->size2; j++) { double tmp = gsl_matrix_get (A, i, j) - gsl_matrix_get (A, k, i) * gsl_matrix_get (A, k, j) / sweep_element; gsl_matrix_set (B, i, j, tmp); } } } gsl_matrix_memcpy (A, B); } gsl_matrix_free (B); gsl_matrix_swap_columns (A, A->size1 - 1 , last_col); gsl_matrix_swap_rows (A, A->size1 - 1, last_col); return GSL_SUCCESS; } pspp-1.0.1/lib/linreg/automake.mk0000644000175000017500000000165413137223525013612 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- noinst_LTLIBRARIES += lib/linreg/liblinreg.la lib_linreg_liblinreg_la_SOURCES = \ lib/linreg/sweep.c lib/linreg/sweep.h pspp-1.0.1/lib/automake.mk0000644000175000017500000000171613137223525012331 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- include $(top_srcdir)/lib/linreg/automake.mk include $(top_srcdir)/lib/tukey/automake.mk if HAVE_GUI include $(top_srcdir)/lib/gtk-contrib/automake.mk endif pspp-1.0.1/lib/tukey/0000755000175000017500000000000013150620333011377 500000000000000pspp-1.0.1/lib/tukey/README0000644000175000017500000000010512470243700012176 00000000000000This is not part of the GNU PSPP program, but is used with GNU PSPP. pspp-1.0.1/lib/tukey/ptukey.c0000644000175000017500000003155613137223525013025 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This file is taken from the R project source code, and modified. The original copyright notice is reproduced below: */ /* * Mathlib : A C Library of Special Functions * Copyright (C) 1998 Ross Ihaka * Copyright (C) 2000--2007 The R Development Core Team * * 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, a copy is available at * http://www.r-project.org/Licenses/ * * SYNOPSIS * * #include * double ptukey(q, rr, cc, df, lower_tail, log_p); * * DESCRIPTION * * Computes the probability that the maximum of rr studentized * ranges, each based on cc means and with df degrees of freedom * for the standard error, is less than q. * * The algorithm is based on that of the reference. * * REFERENCE * * Copenhaver, Margaret Diponzio & Holland, Burt S. * Multiple comparisons of simple effects in * the two-way analysis of variance with fixed effects. * Journal of Statistical Computation and Simulation, * Vol.30, pp.1-15, 1988. */ #include #include "libpspp/compiler.h" #include "tukey.h" #include #include #include #include #define R_D__0 (log_p ? ML_NEGINF : 0.) /* 0 */ #define R_D__1 (log_p ? 0. : 1.) /* 1 */ #define R_DT_0 (lower_tail ? R_D__0 : R_D__1) /* 0 */ #define R_DT_1 (lower_tail ? R_D__1 : R_D__0) /* 1 */ #define R_D_val(x) (log_p ? log(x) : (x)) /* x in pF(x,..) */ #define R_D_Clog(p) (log_p ? log1p(-(p)) : (0.5 - (p) + 0.5)) /* [log](1-p) */ #define R_DT_val(x) (lower_tail ? R_D_val(x) : R_D_Clog(x)) #define ME_PRECISION 8 static inline double pnorm(double x, double mu, double sigma, int lower_tail, int log_p) { assert (lower_tail == 1); assert (log_p == 0); assert (sigma == 1.0); return gsl_cdf_gaussian_P (x - mu, sigma); } static double wprob (double w, double rr, double cc) { const double M_1_SQRT_2PI = 1 / sqrt (2 * M_PI); /* wprob() : This function calculates probability integral of Hartley's form of the range. w = value of range rr = no. of rows or groups cc = no. of columns or treatments ir = error flag = 1 if pr_w probability > 1 pr_w = returned probability integral from (0, w) program will not terminate if ir is raised. bb = upper limit of legendre integration iMax = maximum acceptable value of integral nleg = order of legendre quadrature ihalf = int ((nleg + 1) / 2) wlar = value of range above which wincr1 intervals are used to calculate second part of integral, else wincr2 intervals are used. C1, C2, C3 = values which are used as cutoffs for terminating or modifying a calculation. M_1_SQRT_2PI = 1 / sqrt(2 * pi); from abramowitz & stegun, p. 3. M_SQRT2 = sqrt(2) xleg = legendre 12-point nodes aleg = legendre 12-point coefficients */ #define nleg 12 #define ihalf 6 /* looks like this is suboptimal for double precision. (see how C1-C3 are used) */ /* const double iMax = 1.; not used if = 1 */ static const double C1 = -30.; static const double C2 = -50.; static const double C3 = 60.; static const double bb = 8.; static const double wlar = 3.; static const double wincr1 = 2.; static const double wincr2 = 3.; static const double xleg[ihalf] = { 0.981560634246719250690549090149, 0.904117256370474856678465866119, 0.769902674194304687036893833213, 0.587317954286617447296702418941, 0.367831498998180193752691536644, 0.125233408511468915472441369464 }; static const double aleg[ihalf] = { 0.047175336386511827194615961485, 0.106939325995318430960254718194, 0.160078328543346226334652529543, 0.203167426723065921749064455810, 0.233492536538354808760849898925, 0.249147045813402785000562436043 }; double a, ac, pr_w, b, binc, blb, c, cc1, pminus, pplus, qexpo, qsqz, rinsum, wi, wincr, xx; long double bub, einsum, elsum; int j, jj; qsqz = w * 0.5; /* if w >= 16 then the integral lower bound (occurs for c=20) */ /* is 0.99999999999995 so return a value of 1. */ if (qsqz >= bb) return 1.0; /* find (f(w/2) - 1) ^ cc */ /* (first term in integral of hartley's form). */ pr_w = 2 * pnorm (qsqz, 0., 1., 1, 0) - 1.; /* erf(qsqz / M_SQRT2) */ /* if pr_w ^ cc < 2e-22 then set pr_w = 0 */ if (pr_w >= exp (C2 / cc)) pr_w = pow (pr_w, cc); else pr_w = 0.0; /* if w is large then the second component of the */ /* integral is small, so fewer intervals are needed. */ if (w > wlar) wincr = wincr1; else wincr = wincr2; /* find the integral of second term of hartley's form */ /* for the integral of the range for equal-length */ /* intervals using legendre quadrature. limits of */ /* integration are from (w/2, 8). two or three */ /* equal-length intervals are used. */ /* blb and bub are lower and upper limits of integration. */ blb = qsqz; binc = (bb - qsqz) / wincr; bub = blb + binc; einsum = 0.0; /* integrate over each interval */ cc1 = cc - 1.0; for (wi = 1; wi <= wincr; wi++) { elsum = 0.0; a = 0.5 * (bub + blb); /* legendre quadrature with order = nleg */ b = 0.5 * (bub - blb); for (jj = 1; jj <= nleg; jj++) { if (ihalf < jj) { j = (nleg - jj) + 1; xx = xleg[j - 1]; } else { j = jj; xx = -xleg[j - 1]; } c = b * xx; ac = a + c; /* if exp(-qexpo/2) < 9e-14, */ /* then doesn't contribute to integral */ qexpo = ac * ac; if (qexpo > C3) break; pplus = 2 * pnorm (ac, 0., 1., 1, 0); pminus = 2 * pnorm (ac, w, 1., 1, 0); /* if rinsum ^ (cc-1) < 9e-14, */ /* then doesn't contribute to integral */ rinsum = (pplus * 0.5) - (pminus * 0.5); if (rinsum >= exp (C1 / cc1)) { rinsum = (aleg[j - 1] * exp (-(0.5 * qexpo))) * pow (rinsum, cc1); elsum += rinsum; } } elsum *= (((2.0 * b) * cc) * M_1_SQRT_2PI); einsum += elsum; blb = bub; bub += binc; } /* if pr_w ^ rr < 9e-14, then return 0 */ pr_w = einsum + pr_w; if (pr_w <= exp (C1 / rr)) return 0.; pr_w = pow (pr_w, rr); if (pr_w >= 1.) /* 1 was iMax was eps */ return 1.; return pr_w; } /* wprob() */ double ptukey (double q, double rr, double cc, double df, int lower_tail, int log_p) { const double ML_NEGINF = -1.0 / 0.0; /* function ptukey() [was qprob() ]: q = value of studentized range rr = no. of rows or groups cc = no. of columns or treatments df = degrees of freedom of error term ir[0] = error flag = 1 if wprob probability > 1 ir[1] = error flag = 1 if qprob probability > 1 qprob = returned probability integral over [0, q] The program will not terminate if ir[0] or ir[1] are raised. All references in wprob to Abramowitz and Stegun are from the following reference: Abramowitz, Milton and Stegun, Irene A. Handbook of Mathematical Functions. New York: Dover publications, Inc. (1970). All constants taken from this text are given to 25 significant digits. nlegq = order of legendre quadrature ihalfq = int ((nlegq + 1) / 2) eps = max. allowable value of integral eps1 & eps2 = values below which there is no contribution to integral. d.f. <= dhaf: integral is divided into ulen1 length intervals. else d.f. <= dquar: integral is divided into ulen2 length intervals. else d.f. <= deigh: integral is divided into ulen3 length intervals. else d.f. <= dlarg: integral is divided into ulen4 length intervals. d.f. > dlarg: the range is used to calculate integral. M_LN2 = log(2) xlegq = legendre 16-point nodes alegq = legendre 16-point coefficients The coefficients and nodes for the legendre quadrature used in qprob and wprob were calculated using the algorithms found in: Stroud, A. H. and Secrest, D. Gaussian Quadrature Formulas. Englewood Cliffs, New Jersey: Prentice-Hall, Inc, 1966. All values matched the tables (provided in same reference) to 30 significant digits. f(x) = .5 + erf(x / sqrt(2)) / 2 for x > 0 f(x) = erfc( -x / sqrt(2)) / 2 for x < 0 where f(x) is standard normal c. d. f. if degrees of freedom large, approximate integral with range distribution. */ #define nlegq 16 #define ihalfq 8 /* const double eps = 1.0; not used if = 1 */ static const double eps1 = -30.0; static const double eps2 = 1.0e-14; static const double dhaf = 100.0; static const double dquar = 800.0; static const double deigh = 5000.0; static const double dlarg = 25000.0; static const double ulen1 = 1.0; static const double ulen2 = 0.5; static const double ulen3 = 0.25; static const double ulen4 = 0.125; static const double xlegq[ihalfq] = { 0.989400934991649932596154173450, 0.944575023073232576077988415535, 0.865631202387831743880467897712, 0.755404408355003033895101194847, 0.617876244402643748446671764049, 0.458016777657227386342419442984, 0.281603550779258913230460501460, 0.950125098376374401853193354250e-1 }; static const double alegq[ihalfq] = { 0.271524594117540948517805724560e-1, 0.622535239386478928628438369944e-1, 0.951585116824927848099251076022e-1, 0.124628971255533872052476282192, 0.149595988816576732081501730547, 0.169156519395002538189312079030, 0.182603415044923588866763667969, 0.189450610455068496285396723208 }; double ans, f2, f21, f2lf, ff4, otsum, qsqz, rotsum, t1, twa1, ulen, wprb; int i, j, jj; assert (! (isnan (q) || isnan (rr) || isnan (cc) || isnan (df))); if (q <= 0) return R_DT_0; /* df must be > 1 */ /* there must be at least two values */ assert (! (df < 2 || rr < 1 || cc < 2)); if (!isfinite (q)) return R_DT_1; if (df > dlarg) return R_DT_val (wprob (q, rr, cc)); /* calculate leading constant */ f2 = df * 0.5; /* lgammafn(u) = log(gamma(u)) */ f2lf = ((f2 * log (df)) - (df * M_LN2)) - gsl_sf_lngamma (f2); f21 = f2 - 1.0; /* integral is divided into unit, half-unit, quarter-unit, or */ /* eighth-unit length intervals depending on the value of the */ /* degrees of freedom. */ ff4 = df * 0.25; if (df <= dhaf) ulen = ulen1; else if (df <= dquar) ulen = ulen2; else if (df <= deigh) ulen = ulen3; else ulen = ulen4; f2lf += log (ulen); /* integrate over each subinterval */ ans = 0.0; for (i = 1; i <= 50; i++) { otsum = 0.0; /* legendre quadrature with order = nlegq */ /* nodes (stored in xlegq) are symmetric around zero. */ twa1 = (2 * i - 1) * ulen; for (jj = 1; jj <= nlegq; jj++) { if (ihalfq < jj) { j = jj - ihalfq - 1; t1 = (f2lf + (f21 * log (twa1 + (xlegq[j] * ulen)))) - (((xlegq[j] * ulen) + twa1) * ff4); } else { j = jj - 1; t1 = (f2lf + (f21 * log (twa1 - (xlegq[j] * ulen)))) + (((xlegq[j] * ulen) - twa1) * ff4); } /* if exp(t1) < 9e-14, then doesn't contribute to integral */ if (t1 >= eps1) { if (ihalfq < jj) { qsqz = q * sqrt (((xlegq[j] * ulen) + twa1) * 0.5); } else { qsqz = q * sqrt (((-(xlegq[j] * ulen)) + twa1) * 0.5); } /* call wprob to find integral of range portion */ wprb = wprob (qsqz, rr, cc); rotsum = (wprb * alegq[j]) * exp (t1); otsum += rotsum; } /* end legendre integral for interval i */ /* L200: */ } /* if integral for interval i < 1e-14, then stop. * However, in order to avoid small area under left tail, * at least 1 / ulen intervals are calculated. */ if (i * ulen >= 1.0 && otsum <= eps2) break; /* end of interval i */ /* L330: */ ans += otsum; } assert (otsum <= eps2); /* not converged */ if (ans > 1.) ans = 1.; return R_DT_val (ans); } pspp-1.0.1/lib/tukey/tukey.h0000644000175000017500000000170212470243700012634 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ #ifndef TUKEY_H #define TUKEY_H 1 double qtukey(double p, double rr, double cc, double df, int lower_tail, int log_p); double ptukey (double q, double rr, double cc, double df, int lower_tail, int log_p); #endif pspp-1.0.1/lib/tukey/automake.mk0000644000175000017500000000174013137223525013467 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- noinst_LTLIBRARIES += lib/tukey/libtukey.la lib_tukey_libtukey_la_SOURCES = \ lib/tukey/ptukey.c \ lib/tukey/qtukey.c \ lib/tukey/tukey.h EXTRA_DIST += lib/tukey/README pspp-1.0.1/lib/tukey/qtukey.c0000644000175000017500000001650213137223525013020 00000000000000/* PSPP - a program for statistical analysis. Copyright (C) 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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 . */ /* This file is taken from the R project source code, and modified. The original copyright notice is reproduced below: */ /* * Mathlib : A C Library of Special Functions * Copyright (C) 1998 Ross Ihaka * Copyright (C) 2000--2005 The R Development Core Team * based in part on AS70 (C) 1974 Royal Statistical Society * * 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, a copy is available at * http://www.r-project.org/Licenses/ * * SYNOPSIS * * #include * double qtukey(p, rr, cc, df, lower_tail, log_p); * * DESCRIPTION * * Computes the quantiles of the maximum of rr studentized * ranges, each based on cc means and with df degrees of freedom * for the standard error, is less than q. * * The algorithm is based on that of the reference. * * REFERENCE * * Copenhaver, Margaret Diponzio & Holland, Burt S. * Multiple comparisons of simple effects in * the two-way analysis of variance with fixed effects. * Journal of Statistical Computation and Simulation, * Vol.30, pp.1-15, 1988. */ #include #include "tukey.h" #include #include #define TRUE (1) #define FALSE (0) #define ML_POSINF (1.0 / 0.0) #define ML_NEGINF (-1.0 / 0.0) #define R_D_Lval(p) (lower_tail ? (p) : (0.5 - (p) + 0.5)) /* p */ #define R_DT_qIv(p) (log_p ? (lower_tail ? exp(p) : - expm1(p)) \ : R_D_Lval(p)) static double fmax2(double x, double y) { if (isnan(x) || isnan(y)) return x + y; return (x < y) ? y : x; } #define R_Q_P01_boundaries(p, _LEFT_, _RIGHT_) \ if (log_p) { \ assert (p <= 0); \ if(p == 0) /* upper bound*/ \ return lower_tail ? _RIGHT_ : _LEFT_; \ if(p == ML_NEGINF) \ return lower_tail ? _LEFT_ : _RIGHT_; \ } \ else { /* !log_p */ \ assert (p >= 0 && p <= 1); \ if(p == 0) \ return lower_tail ? _LEFT_ : _RIGHT_; \ if(p == 1) \ return lower_tail ? _RIGHT_ : _LEFT_; \ } /* qinv() : * this function finds percentage point of the studentized range * which is used as initial estimate for the secant method. * function is adapted from portion of algorithm as 70 * from applied statistics (1974) ,vol. 23, no. 1 * by odeh, r. e. and evans, j. o. * * p = percentage point * c = no. of columns or treatments * v = degrees of freedom * qinv = returned initial estimate * * vmax is cutoff above which degrees of freedom * is treated as infinity. */ static double qinv(double p, double c, double v) { static const double p0 = 0.322232421088; static const double q0 = 0.993484626060e-01; static const double p1 = -1.0; static const double q1 = 0.588581570495; static const double p2 = -0.342242088547; static const double q2 = 0.531103462366; static const double p3 = -0.204231210125; static const double q3 = 0.103537752850; static const double p4 = -0.453642210148e-04; static const double q4 = 0.38560700634e-02; static const double c1 = 0.8832; static const double c2 = 0.2368; static const double c3 = 1.214; static const double c4 = 1.208; static const double c5 = 1.4142; static const double vmax = 120.0; double ps, q, t, yi; ps = 0.5 - 0.5 * p; yi = sqrt (log (1.0 / (ps * ps))); t = yi + (((( yi * p4 + p3) * yi + p2) * yi + p1) * yi + p0) / (((( yi * q4 + q3) * yi + q2) * yi + q1) * yi + q0); if (v < vmax) t += (t * t * t + t) / v / 4.0; q = c1 - c2 * t; if (v < vmax) q += -c3 / v + c4 * t / v; return t * (q * log (c - 1.0) + c5); } /* * Copenhaver, Margaret Diponzio & Holland, Burt S. * Multiple comparisons of simple effects in * the two-way analysis of variance with fixed effects. * Journal of Statistical Computation and Simulation, * Vol.30, pp.1-15, 1988. * * Uses the secant method to find critical values. * * p = confidence level (1 - alpha) * rr = no. of rows or groups * cc = no. of columns or treatments * df = degrees of freedom of error term * * ir(1) = error flag = 1 if wprob probability > 1 * ir(2) = error flag = 1 if ptukey probability > 1 * ir(3) = error flag = 1 if convergence not reached in 50 iterations * = 2 if df < 2 * * qtukey = returned critical value * * If the difference between successive iterates is less than eps, * the search is terminated */ double qtukey(double p, double rr, double cc, double df, int lower_tail, int log_p) { static const double eps = 0.0001; const int maxiter = 50; double ans = 0.0, valx0, valx1, x0, x1, xabs; int iter; if (isnan(p) || isnan(rr) || isnan(cc) || isnan(df)) { /* ML_ERROR(ME_DOMAIN, "qtukey"); */ return p + rr + cc + df; } /* df must be > 1 ; there must be at least two values */ /* ^^ JMD: The comment says 1 but the code says 2. Which is correct? */ assert (df >= 2); assert (rr >= 1); assert (cc >= 2); R_Q_P01_boundaries (p, 0, ML_POSINF); p = R_DT_qIv(p); /* lower_tail,non-log "p" */ /* Initial value */ x0 = qinv(p, cc, df); /* Find prob(value < x0) */ valx0 = ptukey(x0, rr, cc, df, /*LOWER*/TRUE, /*LOG_P*/FALSE) - p; /* Find the second iterate and prob(value < x1). */ /* If the first iterate has probability value */ /* exceeding p then second iterate is 1 less than */ /* first iterate; otherwise it is 1 greater. */ if (valx0 > 0.0) x1 = fmax2(0.0, x0 - 1.0); else x1 = x0 + 1.0; valx1 = ptukey(x1, rr, cc, df, /*LOWER*/TRUE, /*LOG_P*/FALSE) - p; /* Find new iterate */ for(iter=1 ; iter < maxiter ; iter++) { ans = x1 - ((valx1 * (x1 - x0)) / (valx1 - valx0)); valx0 = valx1; /* New iterate must be >= 0 */ x0 = x1; if (ans < 0.0) { ans = 0.0; valx1 = -p; } /* Find prob(value < new iterate) */ valx1 = ptukey(ans, rr, cc, df, /*LOWER*/TRUE, /*LOG_P*/FALSE) - p; x1 = ans; /* If the difference between two successive */ /* iterates is less than eps, stop */ xabs = fabs(x1 - x0); if (xabs < eps) return ans; } /* The process did not converge in 'maxiter' iterations */ assert (0); return ans; } pspp-1.0.1/lib/gtk-contrib/0000755000175000017500000000000013150620333012461 500000000000000pspp-1.0.1/lib/gtk-contrib/README0000644000175000017500000000037412470434665013304 00000000000000This is not part of the GNU PSPP program, but is used with GNU PSPP. This directory contains a version of the GtkXPaned widget. It includes minor modifications. GtkXPaned is licensed under the GNU Lesser General Public License. See COPYING.LESSER. pspp-1.0.1/lib/gtk-contrib/gtkxpaned.h0000644000175000017500000001675213137223525014561 00000000000000/******************************************************************************* **3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 ** 10 20 30 40 50 60 70 80 ** ** library for GtkXPaned-widget, a 2x2 grid-like variation of GtkPaned of gtk+ ** Copyright (C) 2005-2006 Mirco "MacSlow" Müller ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** Lesser General Public License for more details. ** ** You should have received a copy of the GNU Lesser General Public ** License along with this library; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ** ** GtkXPaned is based on GtkPaned which was done by... ** ** "Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald" ** ** and later modified by... ** ** "the GTK+ Team and others 1997-2000" ** *******************************************************************************/ #ifndef GTK_XPANED_H #define GTK_XPANED_H #include G_BEGIN_DECLS #define GTK_TYPE_XPANED (gtk_xpaned_get_type ()) #define GTK_XPANED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_XPANED, GtkXPaned)) #define GTK_XPANED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_XPANED, GtkXPanedClass)) #define GTK_IS_XPANED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_XPANED)) #define GTK_IS_XPANED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_XPANED)) #define GTK_XPANED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_XPANED, GtkXPanedClass)) typedef struct _GtkXPaned GtkXPaned; typedef struct _GtkXPanedClass GtkXPanedClass; typedef struct _GtkXPanedPrivate GtkXPanedPrivate; typedef enum _GtkXPanedChild { GTK_XPANED_TOP_LEFT = 0, GTK_XPANED_TOP_RIGHT, GTK_XPANED_BOTTOM_LEFT, GTK_XPANED_BOTTOM_RIGHT } GtkXPanedChild; struct _GtkXPaned { GtkContainer container; GtkWidget *top_left_child; GtkWidget *top_right_child; GtkWidget *bottom_left_child; GtkWidget *bottom_right_child; GdkWindow *handle_east; GdkWindow *handle_west; GdkWindow *handle_north; GdkWindow *handle_south; GdkWindow *handle_middle; GdkCursorType cursor_type_east; GdkCursorType cursor_type_west; GdkCursorType cursor_type_north; GdkCursorType cursor_type_south; GdkCursorType cursor_type_middle; /*< private > */ GdkRectangle handle_pos_east; GdkRectangle handle_pos_west; GdkRectangle handle_pos_north; GdkRectangle handle_pos_south; GdkRectangle handle_pos_middle; GtkRequisition top_left_child_size; GtkRequisition top_right_child_size; GtkRequisition bottom_left_child_size; GtkRequisition bottom_right_child_size; GtkRequisition last_allocation; GdkPoint min_position; GdkPoint max_position; gboolean maximized[4]; guint position_set:1; guint in_drag_vert:1; guint in_drag_horiz:1; guint in_drag_vert_and_horiz:1; guint top_left_child_shrink:1; guint top_left_child_resize:1; guint top_right_child_shrink:1; guint top_right_child_resize:1; guint bottom_left_child_shrink:1; guint bottom_left_child_resize:1; guint bottom_right_child_shrink:1; guint bottom_right_child_resize:1; guint in_recursion:1; guint handle_prelit:1; GtkWidget *last_top_left_child_focus; GtkWidget *last_top_right_child_focus; GtkWidget *last_bottom_left_child_focus; GtkWidget *last_bottom_right_child_focus; GtkXPanedPrivate *priv; GdkPoint drag_pos; GdkPoint original_position; GdkPoint unmaximized_position; }; struct _GtkXPanedClass { GtkContainerClass parent_class; gboolean (*cycle_child_focus) (GtkXPaned * xpaned, gboolean reverse); gboolean (*toggle_handle_focus) (GtkXPaned * xpaned); gboolean (*move_handle) (GtkXPaned * xpaned, GtkScrollType scroll); gboolean (*cycle_handle_focus) (GtkXPaned * xpaned, gboolean reverse); gboolean (*accept_position) (GtkXPaned * xpaned); gboolean (*cancel_position) (GtkXPaned * xpaned); }; GType gtk_xpaned_get_type (void) G_GNUC_CONST; GtkWidget *gtk_xpaned_new (void); void gtk_xpaned_add_top_left (GtkXPaned * xpaned, GtkWidget * child); void gtk_xpaned_add_top_right (GtkXPaned * xpaned, GtkWidget * child); void gtk_xpaned_add_bottom_left (GtkXPaned * xpaned, GtkWidget * child); void gtk_xpaned_add_bottom_right (GtkXPaned * xpaned, GtkWidget * child); void gtk_xpaned_pack_top_left (GtkXPaned * xpaned, GtkWidget * child, gboolean resize, gboolean shrink); void gtk_xpaned_pack_top_right (GtkXPaned * xpaned, GtkWidget * child, gboolean resize, gboolean shrink); void gtk_xpaned_pack_bottom_left (GtkXPaned * xpaned, GtkWidget * child, gboolean resize, gboolean shrink); void gtk_xpaned_pack_bottom_right (GtkXPaned * xpaned, GtkWidget * child, gboolean resize, gboolean shrink); gint gtk_xpaned_get_position_x (GtkXPaned * xpaned); gint gtk_xpaned_get_position_y (GtkXPaned * xpaned); void gtk_xpaned_set_position_x (GtkXPaned * xpaned, gint xposition); void gtk_xpaned_set_position_y (GtkXPaned * xpaned, gint yposition); void gtk_xpaned_save_unmaximized_x (GtkXPaned * xpaned); void gtk_xpaned_save_unmaximized_y (GtkXPaned * xpaned); gint gtk_xpaned_fetch_unmaximized_x (GtkXPaned * xpaned); gint gtk_xpaned_fetch_unmaximized_y (GtkXPaned * xpaned); GtkWidget *gtk_xpaned_get_top_left_child (GtkXPaned * xpaned); GtkWidget *gtk_xpaned_get_top_right_child (GtkXPaned * xpaned); GtkWidget *gtk_xpaned_get_bottom_right_child (GtkXPaned * xpaned); GtkWidget *gtk_xpaned_get_bottom_left_child (GtkXPaned * xpaned); gboolean gtk_xpaned_maximize_top_left (GtkXPaned * xpaned, gboolean maximize); gboolean gtk_xpaned_maximize_top_right (GtkXPaned * xpaned, gboolean maximize); gboolean gtk_xpaned_maximize_bottom_left (GtkXPaned * xpaned, gboolean maximize); gboolean gtk_xpaned_maximize_bottom_right (GtkXPaned * xpaned, gboolean maximize); /* Internal function */ #if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION) void gtk_xpaned_compute_position (GtkXPaned * xpaned, const GtkAllocation * allocation, GtkRequisition * top_left_child_req, GtkRequisition * top_right_child_req, GtkRequisition * bottom_left_child_req, GtkRequisition * bottom_right_child_req); #endif /* !GTK_DISABLE_DEPRECATED || GTK_COMPILATION */ #ifndef GTK_DISABLE_DEPRECATED #define gtk_xpaned_gutter_size(p,s) (void) 0 #define gtk_xpaned_set_gutter_size(p,s) (void) 0 #endif /* GTK_DISABLE_DEPRECATED */ G_END_DECLS #endif /* GTK_XPANED_H */ pspp-1.0.1/lib/gtk-contrib/gtkxpaned.c0000644000175000017500000034576013146355723014566 00000000000000/******************************************************************************* **3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 ** 10 20 30 40 50 60 70 80 ** ** library for GtkXPaned-widget, a 2x2 grid-like variation of GtkPaned of gtk+ ** Copyright (C) 2012, 2013 Free Software Foundation, Inc. ** Copyright (C) 2005-2006 Mirco "MacSlow" Müller ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License as published by the Free Software Foundation; either ** version 2.1 of the License, or (at your option) any later version. ** ** This library is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** Lesser General Public License for more details. ** ** You should have received a copy of the GNU Lesser General Public ** License along with this library; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ** ** GtkXPaned is based on GtkPaned which was done by... ** ** "Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald" ** ** and later modified by... ** ** "the GTK+ Team and others 1997-2000" ** *******************************************************************************/ #include #include "gtkxpaned.h" #include #include #include #include enum WidgetProperties { PROP_0, PROP_X_POSITION, PROP_Y_POSITION, PROP_POSITION_SET, PROP_MIN_X_POSITION, PROP_MIN_Y_POSITION, PROP_MAX_X_POSITION, PROP_MAX_Y_POSITION }; enum ChildProperties { CHILD_PROP_0, CHILD_PROP_RESIZE, CHILD_PROP_SHRINK }; enum WidgetSignals { CYCLE_CHILD_FOCUS, TOGGLE_HANDLE_FOCUS, MOVE_HANDLE, CYCLE_HANDLE_FOCUS, ACCEPT_POSITION, CANCEL_POSITION, LAST_SIGNAL }; static void gtk_xpaned_class_init (GtkXPanedClass * klass); static void gtk_xpaned_init (GtkXPaned * xpaned); static void gtk_xpaned_get_preferred_width (GtkWidget *widget, gint *minimal_width, gint *natural_width) { GtkXPaned *xpaned = GTK_XPANED (widget); gint tl[2], tr[2], bl[2], br[2]; gint overhead; gint w[2]; int i; if (xpaned->top_left_child && gtk_widget_get_visible (xpaned->top_left_child)) gtk_widget_get_preferred_width (xpaned->top_left_child, &tl[0], &tl[1]); else tl[0] = tl[1] = 0; if (xpaned->top_right_child && gtk_widget_get_visible (xpaned->top_right_child)) gtk_widget_get_preferred_width (xpaned->top_right_child, &tr[0], &tr[1]); else tr[0] = tr[1] = 0; if (xpaned->bottom_left_child && gtk_widget_get_visible (xpaned->bottom_left_child)) gtk_widget_get_preferred_width (xpaned->bottom_left_child, &bl[0], &bl[1]); else bl[0] = bl[1] = 0; if (xpaned->bottom_right_child && gtk_widget_get_visible (xpaned->bottom_right_child)) gtk_widget_get_preferred_width (xpaned->bottom_right_child, &br[0], &br[1]); else br[0] = br[1] = 0; /* add 2 times the set border-width to the GtkXPaneds requisition */ overhead = gtk_container_get_border_width (GTK_CONTAINER (xpaned)) * 2; /* also add the handle "thickness" to GtkXPaned's width requisition */ if (xpaned->top_left_child && gtk_widget_get_visible (xpaned->top_left_child) && xpaned->top_right_child && gtk_widget_get_visible (xpaned->top_right_child) && xpaned->bottom_left_child && gtk_widget_get_visible (xpaned->bottom_left_child) && xpaned->bottom_right_child && gtk_widget_get_visible (xpaned->bottom_right_child)) { gint handle_size; gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); overhead += handle_size; } for (i = 0; i < 2; i++) w[i] = (br[i] ? br[i] : MAX (tl[i] + tr[i], bl[i])) + overhead; *minimal_width = w[0]; *natural_width = w[1]; } static void gtk_xpaned_get_preferred_height (GtkWidget *widget, gint *minimal_height, gint *natural_height) { GtkXPaned *xpaned = GTK_XPANED (widget); gint tl[2], tr[2], bl[2], br[2]; gint overhead; gint h[2]; int i; if (xpaned->top_left_child && gtk_widget_get_visible (xpaned->top_left_child)) gtk_widget_get_preferred_height (xpaned->top_left_child, &tl[0], &tl[1]); else tl[0] = tl[1] = 0; if (xpaned->top_right_child && gtk_widget_get_visible (xpaned->top_right_child)) gtk_widget_get_preferred_height (xpaned->top_right_child, &tr[0], &tr[1]); else tr[0] = tr[1] = 0; if (xpaned->bottom_left_child && gtk_widget_get_visible (xpaned->bottom_left_child)) gtk_widget_get_preferred_height (xpaned->bottom_left_child, &bl[0], &bl[1]); else bl[0] = bl[1] = 0; if (xpaned->bottom_right_child && gtk_widget_get_visible (xpaned->bottom_right_child)) gtk_widget_get_preferred_height (xpaned->bottom_right_child, &br[0], &br[1]); else br[0] = br[1] = 0; /* add 2 times the set border-width to the GtkXPaneds requisition */ overhead = gtk_container_get_border_width (GTK_CONTAINER (xpaned)) * 2; /* also add the handle "thickness" to GtkXPaned's height-requisition */ if (xpaned->top_left_child && gtk_widget_get_visible (xpaned->top_left_child) && xpaned->top_right_child && gtk_widget_get_visible (xpaned->top_right_child) && xpaned->bottom_left_child && gtk_widget_get_visible (xpaned->bottom_left_child) && xpaned->bottom_right_child && gtk_widget_get_visible (xpaned->bottom_right_child)) { gint handle_size; gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); overhead += handle_size; } for (i = 0; i < 2; i++) h[i] = (br[i] ? br[i] : bl[i] + MAX (tl[i], tr[i])) + overhead; *minimal_height = h[0]; *natural_height = h[1]; } static void gtk_xpaned_size_allocate (GtkWidget * widget, GtkAllocation * allocation); static void gtk_xpaned_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gtk_xpaned_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gtk_xpaned_set_child_property (GtkContainer * container, GtkWidget * child, guint property_id, const GValue * value, GParamSpec * pspec); static void gtk_xpaned_get_child_property (GtkContainer * container, GtkWidget * child, guint property_id, GValue * value, GParamSpec * pspec); static void gtk_xpaned_finalize (GObject * object); static void gtk_xpaned_realize (GtkWidget * widget); static void gtk_xpaned_unrealize (GtkWidget * widget); static void gtk_xpaned_map (GtkWidget * widget); static void gtk_xpaned_unmap (GtkWidget * widget); static gboolean gtk_xpaned_draw (GtkWidget * widget, cairo_t *ct); static gboolean gtk_xpaned_enter (GtkWidget * widget, GdkEventCrossing * event); static gboolean gtk_xpaned_leave (GtkWidget * widget, GdkEventCrossing * event); static gboolean gtk_xpaned_button_press (GtkWidget * widget, GdkEventButton * event); static gboolean gtk_xpaned_button_release (GtkWidget * widget, GdkEventButton * event); static gboolean gtk_xpaned_motion (GtkWidget * widget, GdkEventMotion * event); static gboolean gtk_xpaned_focus (GtkWidget * widget, GtkDirectionType direction); static void gtk_xpaned_add (GtkContainer * container, GtkWidget * widget); static void gtk_xpaned_remove (GtkContainer * container, GtkWidget * widget); static void gtk_xpaned_forall (GtkContainer * container, gboolean include_internals, GtkCallback callback, gpointer callback_data); static void gtk_xpaned_set_focus_child (GtkContainer * container, GtkWidget * child); static void gtk_xpaned_set_saved_focus (GtkXPaned * xpaned, GtkWidget * widget); static void gtk_xpaned_set_first_xpaned (GtkXPaned * xpaned, GtkXPaned * first_xpaned); static void gtk_xpaned_set_last_top_left_child_focus (GtkXPaned * xpaned, GtkWidget * widget); static void gtk_xpaned_set_last_top_right_child_focus (GtkXPaned * xpaned, GtkWidget * widget); static void gtk_xpaned_set_last_bottom_left_child_focus (GtkXPaned * xpaned, GtkWidget * widget); static void gtk_xpaned_set_last_bottom_right_child_focus (GtkXPaned * xpaned, GtkWidget * widget); static gboolean gtk_xpaned_cycle_child_focus (GtkXPaned * xpaned, gboolean reverse); static gboolean gtk_xpaned_cycle_handle_focus (GtkXPaned * xpaned, gboolean reverse); static gboolean gtk_xpaned_move_handle (GtkXPaned * xpaned, GtkScrollType scroll); static gboolean gtk_xpaned_accept_position (GtkXPaned * xpaned); static gboolean gtk_xpaned_cancel_position (GtkXPaned * xpaned); static gboolean gtk_xpaned_toggle_handle_focus (GtkXPaned * xpaned); static GType gtk_xpaned_child_type (GtkContainer * container); static GtkContainerClass *parent_class = NULL; struct _GtkXPanedPrivate { GtkWidget *saved_focus; GtkXPaned *first_xpaned; }; GType gtk_xpaned_get_type (void) { static GType xpaned_type = 0; if (!xpaned_type) { static const GTypeInfo xpaned_info = { sizeof (GtkXPanedClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) gtk_xpaned_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (GtkXPaned), 0, /* n_preallocs */ (GInstanceInitFunc) gtk_xpaned_init }; xpaned_type = g_type_register_static (GTK_TYPE_CONTAINER, "GtkXPaned", &xpaned_info, 0); } return xpaned_type; } GtkWidget * gtk_xpaned_new (void) { GtkXPaned *xpaned; xpaned = g_object_new (GTK_TYPE_XPANED, NULL); return GTK_WIDGET (xpaned); } static guint signals[LAST_SIGNAL] = { 0 }; static void add_tab_bindings (GtkBindingSet * binding_set, GdkModifierType modifiers) { gtk_binding_entry_add_signal (binding_set, GDK_Tab, modifiers, "toggle_handle_focus", 0); gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, modifiers, "toggle_handle_focus", 0); } static void add_move_binding (GtkBindingSet * binding_set, guint keyval, GdkModifierType mask, GtkScrollType scroll) { gtk_binding_entry_add_signal (binding_set, keyval, mask, "move_handle", 1, GTK_TYPE_SCROLL_TYPE, scroll); } static void gtk_xpaned_class_init (GtkXPanedClass * class) { GObjectClass *object_class; GtkWidgetClass *widget_class; GtkContainerClass *container_class; GtkXPanedClass *xpaned_class; GtkBindingSet *binding_set; object_class = (GObjectClass *) class; widget_class = (GtkWidgetClass *) class; container_class = (GtkContainerClass *) class; xpaned_class = (GtkXPanedClass *) class; parent_class = g_type_class_peek_parent (class); object_class->set_property = gtk_xpaned_set_property; object_class->get_property = gtk_xpaned_get_property; object_class->finalize = gtk_xpaned_finalize; widget_class->realize = gtk_xpaned_realize; widget_class->unrealize = gtk_xpaned_unrealize; widget_class->map = gtk_xpaned_map; widget_class->unmap = gtk_xpaned_unmap; widget_class->draw = gtk_xpaned_draw; widget_class->focus = gtk_xpaned_focus; widget_class->enter_notify_event = gtk_xpaned_enter; widget_class->leave_notify_event = gtk_xpaned_leave; widget_class->button_press_event = gtk_xpaned_button_press; widget_class->button_release_event = gtk_xpaned_button_release; widget_class->motion_notify_event = gtk_xpaned_motion; widget_class->get_preferred_width = gtk_xpaned_get_preferred_width; widget_class->get_preferred_height = gtk_xpaned_get_preferred_height; widget_class->size_allocate = gtk_xpaned_size_allocate; container_class->add = gtk_xpaned_add; container_class->remove = gtk_xpaned_remove; container_class->forall = gtk_xpaned_forall; container_class->child_type = gtk_xpaned_child_type; container_class->set_focus_child = gtk_xpaned_set_focus_child; container_class->set_child_property = gtk_xpaned_set_child_property; container_class->get_child_property = gtk_xpaned_get_child_property; xpaned_class->cycle_child_focus = gtk_xpaned_cycle_child_focus; xpaned_class->toggle_handle_focus = gtk_xpaned_toggle_handle_focus; xpaned_class->move_handle = gtk_xpaned_move_handle; xpaned_class->cycle_handle_focus = gtk_xpaned_cycle_handle_focus; xpaned_class->accept_position = gtk_xpaned_accept_position; xpaned_class->cancel_position = gtk_xpaned_cancel_position; g_object_class_install_property (object_class, PROP_X_POSITION, g_param_spec_int ("x-position", ("x-Position"), ("x-Position of paned separator in pixels (0 means all the way to the left)"), 0, G_MAXINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_Y_POSITION, g_param_spec_int ("y-position", "y-Position", "y-Position of paned separator in pixels (0 means all the way to the top)", 0, G_MAXINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_POSITION_SET, g_param_spec_boolean ("position-set", "Position Set", "TRUE if the Position property should be used", FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE)); gtk_widget_class_install_style_property (widget_class, g_param_spec_int ("handle-size", "Handle Size", "Width of handle", 0, G_MAXINT, 3, G_PARAM_READABLE)); /** * GtkXPaned:min-x-position: * * The smallest possible value for the x-position property. This property is derived from the * size and shrinkability of the widget's children. * * Since: 2.4 */ g_object_class_install_property (object_class, PROP_MIN_X_POSITION, g_param_spec_int ("min-x-position", "Minimal x-Position", "Smallest possible value for the \"x-position\" property", 0, G_MAXINT, 0, G_PARAM_READABLE)); /** * GtkXPaned:min-y-position: * * The smallest possible value for the y-position property. This property is derived from the * size and shrinkability of the widget's children. * * Since: 2.4 */ g_object_class_install_property (object_class, PROP_MIN_Y_POSITION, g_param_spec_int ("min-y-position", "Minimal y-Position", "Smallest possible value for the \"y-position\" property", 0, G_MAXINT, 0, G_PARAM_READABLE)); /** * GtkPaned:max-x-position: * * The largest possible value for the x-position property. This property is derived from the * size and shrinkability of the widget's children. * * Since: 2.4 */ g_object_class_install_property (object_class, PROP_MAX_X_POSITION, g_param_spec_int ("max-x-position", "Maximal x-Position", "Largest possible value for the \"x-position\" property", 0, G_MAXINT, G_MAXINT, G_PARAM_READABLE)); /** * GtkPaned:max-y-position: * * The largest possible value for the y-position property. This property is derived from the * size and shrinkability of the widget's children. * * Since: 2.4 */ g_object_class_install_property (object_class, PROP_MAX_Y_POSITION, g_param_spec_int ("max-y-position", "Maximal y-Position", "Largest possible value for the \"y-position\" property", 0, G_MAXINT, G_MAXINT, G_PARAM_READABLE)); /** * GtkPaned:resize: * * The "resize" child property determines whether the child expands and * shrinks along with the paned widget. * * Since: 2.4 */ gtk_container_class_install_child_property (container_class, CHILD_PROP_RESIZE, g_param_spec_boolean ("resize", "Resize", "If TRUE, the child expands and shrinks along with the paned widget", TRUE, G_PARAM_READWRITE)); /** * GtkPaned:shrink: * * The "shrink" child property determines whether the child can be made * smaller than its requisition. * * Since: 2.4 */ gtk_container_class_install_child_property (container_class, CHILD_PROP_SHRINK, g_param_spec_boolean ("shrink", "Shrink", "If TRUE, the child can be made smaller than its requisition", TRUE, G_PARAM_READWRITE)); signals[CYCLE_CHILD_FOCUS] = g_signal_new ("cycle-child-focus", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkXPanedClass, cycle_child_focus), NULL, NULL, psppire_marshal_BOOLEAN__BOOLEAN, G_TYPE_BOOLEAN, 1, G_TYPE_BOOLEAN); signals[TOGGLE_HANDLE_FOCUS] = g_signal_new ("toggle-handle-focus", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkXPanedClass, toggle_handle_focus), NULL, NULL, psppire_marshal_BOOLEAN__VOID, G_TYPE_BOOLEAN, 0); signals[MOVE_HANDLE] = g_signal_new ("move-handle", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkXPanedClass, move_handle), NULL, NULL, psppire_marshal_BOOLEAN__ENUM, G_TYPE_BOOLEAN, 1, GTK_TYPE_SCROLL_TYPE); signals[CYCLE_HANDLE_FOCUS] = g_signal_new ("cycle-handle-focus", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkXPanedClass, cycle_handle_focus), NULL, NULL, psppire_marshal_BOOLEAN__BOOLEAN, G_TYPE_BOOLEAN, 1, G_TYPE_BOOLEAN); signals[ACCEPT_POSITION] = g_signal_new ("accept-position", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkXPanedClass, accept_position), NULL, NULL, psppire_marshal_BOOLEAN__VOID, G_TYPE_BOOLEAN, 0); signals[CANCEL_POSITION] = g_signal_new ("cancel-position", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkXPanedClass, cancel_position), NULL, NULL, psppire_marshal_BOOLEAN__VOID, G_TYPE_BOOLEAN, 0); binding_set = gtk_binding_set_by_class (class); /* F6 and friends */ gtk_binding_entry_add_signal (binding_set, GDK_F6, 0, "cycle-child-focus", 1, G_TYPE_BOOLEAN, FALSE); gtk_binding_entry_add_signal (binding_set, GDK_F6, GDK_SHIFT_MASK, "cycle-child-focus", 1, G_TYPE_BOOLEAN, TRUE); /* F8 and friends */ gtk_binding_entry_add_signal (binding_set, GDK_F8, 0, "cycle-handle-focus", 1, G_TYPE_BOOLEAN, FALSE); gtk_binding_entry_add_signal (binding_set, GDK_F8, GDK_SHIFT_MASK, "cycle-handle-focus", 1, G_TYPE_BOOLEAN, TRUE); add_tab_bindings (binding_set, 0); add_tab_bindings (binding_set, GDK_CONTROL_MASK); add_tab_bindings (binding_set, GDK_SHIFT_MASK); add_tab_bindings (binding_set, GDK_CONTROL_MASK | GDK_SHIFT_MASK); /* accept and cancel positions */ gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, "cancel-position", 0); gtk_binding_entry_add_signal (binding_set, GDK_Return, 0, "accept-position", 0); gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0, "accept-position", 0); gtk_binding_entry_add_signal (binding_set, GDK_space, 0, "accept-position", 0); gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0, "accept-position", 0); /* move handle */ add_move_binding (binding_set, GDK_Left, 0, GTK_SCROLL_STEP_LEFT); add_move_binding (binding_set, GDK_KP_Left, 0, GTK_SCROLL_STEP_LEFT); add_move_binding (binding_set, GDK_Left, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_LEFT); add_move_binding (binding_set, GDK_KP_Left, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_LEFT); add_move_binding (binding_set, GDK_Right, 0, GTK_SCROLL_STEP_RIGHT); add_move_binding (binding_set, GDK_Right, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_RIGHT); add_move_binding (binding_set, GDK_KP_Right, 0, GTK_SCROLL_STEP_RIGHT); add_move_binding (binding_set, GDK_KP_Right, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_RIGHT); add_move_binding (binding_set, GDK_Up, 0, GTK_SCROLL_STEP_UP); add_move_binding (binding_set, GDK_Up, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_UP); add_move_binding (binding_set, GDK_KP_Up, 0, GTK_SCROLL_STEP_UP); add_move_binding (binding_set, GDK_KP_Up, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_UP); add_move_binding (binding_set, GDK_Page_Up, 0, GTK_SCROLL_PAGE_UP); add_move_binding (binding_set, GDK_KP_Page_Up, 0, GTK_SCROLL_PAGE_UP); add_move_binding (binding_set, GDK_Down, 0, GTK_SCROLL_STEP_DOWN); add_move_binding (binding_set, GDK_Down, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_DOWN); add_move_binding (binding_set, GDK_KP_Down, 0, GTK_SCROLL_STEP_DOWN); add_move_binding (binding_set, GDK_KP_Down, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_DOWN); add_move_binding (binding_set, GDK_Page_Down, 0, GTK_SCROLL_PAGE_RIGHT); add_move_binding (binding_set, GDK_KP_Page_Down, 0, GTK_SCROLL_PAGE_RIGHT); add_move_binding (binding_set, GDK_Home, 0, GTK_SCROLL_START); add_move_binding (binding_set, GDK_KP_Home, 0, GTK_SCROLL_START); add_move_binding (binding_set, GDK_End, 0, GTK_SCROLL_END); add_move_binding (binding_set, GDK_KP_End, 0, GTK_SCROLL_END); } static GType gtk_xpaned_child_type (GtkContainer * container) { if (!GTK_XPANED (container)->top_left_child || !GTK_XPANED (container)->top_right_child || !GTK_XPANED (container)->bottom_left_child || !GTK_XPANED (container)->bottom_right_child) return GTK_TYPE_WIDGET; else return G_TYPE_NONE; } static void gtk_xpaned_init (GtkXPaned * xpaned) { gtk_widget_set_can_focus (GTK_WIDGET (xpaned), TRUE); gtk_widget_set_has_window (GTK_WIDGET (xpaned), FALSE); xpaned->top_left_child = NULL; xpaned->top_right_child = NULL; xpaned->bottom_left_child = NULL; xpaned->bottom_right_child = NULL; xpaned->handle_east = NULL; xpaned->handle_west = NULL; xpaned->handle_north = NULL; xpaned->handle_south = NULL; xpaned->handle_middle = NULL; xpaned->cursor_type_east = GDK_SB_V_DOUBLE_ARROW; xpaned->cursor_type_west = GDK_SB_V_DOUBLE_ARROW; xpaned->cursor_type_north = GDK_SB_H_DOUBLE_ARROW; xpaned->cursor_type_south = GDK_SB_H_DOUBLE_ARROW; xpaned->cursor_type_middle = GDK_FLEUR; xpaned->handle_pos_east.width = 5; xpaned->handle_pos_east.height = 5; xpaned->handle_pos_west.width = 5; xpaned->handle_pos_west.height = 5; xpaned->handle_pos_north.width = 5; xpaned->handle_pos_north.height = 5; xpaned->handle_pos_south.width = 5; xpaned->handle_pos_south.height = 5; xpaned->handle_pos_middle.width = 5; xpaned->handle_pos_middle.height = 5; xpaned->position_set = FALSE; xpaned->last_allocation.width = -1; xpaned->last_allocation.height = -1; xpaned->in_drag_vert = FALSE; xpaned->in_drag_horiz = FALSE; xpaned->in_drag_vert_and_horiz = FALSE; xpaned->maximized[GTK_XPANED_TOP_LEFT] = FALSE; xpaned->maximized[GTK_XPANED_TOP_RIGHT] = FALSE; xpaned->maximized[GTK_XPANED_BOTTOM_LEFT] = FALSE; xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT] = FALSE; xpaned->priv = g_new0 (GtkXPanedPrivate, 1); xpaned->last_top_left_child_focus = NULL; xpaned->last_top_right_child_focus = NULL; xpaned->last_bottom_left_child_focus = NULL; xpaned->last_bottom_right_child_focus = NULL; xpaned->in_recursion = FALSE; xpaned->handle_prelit = FALSE; xpaned->original_position.x = -1; xpaned->original_position.y = -1; xpaned->unmaximized_position.x = -1; xpaned->unmaximized_position.y = -1; xpaned->handle_pos_east.x = -1; xpaned->handle_pos_east.y = -1; xpaned->handle_pos_west.x = -1; xpaned->handle_pos_west.y = -1; xpaned->handle_pos_north.x = -1; xpaned->handle_pos_north.y = -1; xpaned->handle_pos_south.x = -1; xpaned->handle_pos_south.y = -1; xpaned->handle_pos_middle.x = -1; xpaned->handle_pos_middle.y = -1; xpaned->drag_pos.x = -1; xpaned->drag_pos.y = -1; } void gtk_xpaned_compute_position (GtkXPaned * xpaned, const GtkAllocation * allocation, GtkRequisition * top_left_child_req, GtkRequisition * top_right_child_req, GtkRequisition * bottom_left_child_req, GtkRequisition * bottom_right_child_req); static void gtk_xpaned_size_allocate (GtkWidget * widget, GtkAllocation * allocation) { GtkXPaned *xpaned = GTK_XPANED (widget); gint border_width = gtk_container_get_border_width (GTK_CONTAINER (xpaned)); GtkAllocation top_left_child_allocation; GtkAllocation top_right_child_allocation; GtkAllocation bottom_left_child_allocation; GtkAllocation bottom_right_child_allocation; GtkRequisition top_left_child_requisition; GtkRequisition top_right_child_requisition; GtkRequisition bottom_left_child_requisition; GtkRequisition bottom_right_child_requisition; gint handle_size; /* determine size of handle(s) */ gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); gtk_widget_set_allocation (widget, allocation); if (xpaned->top_left_child && gtk_widget_get_visible (xpaned->top_left_child) && xpaned->top_right_child && gtk_widget_get_visible (xpaned->top_right_child) && xpaned->bottom_left_child && gtk_widget_get_visible (xpaned->bottom_left_child) && xpaned->bottom_right_child && gtk_widget_get_visible (xpaned->bottom_right_child)) { /* what sizes do the children want to be at least at */ gtk_widget_get_preferred_size (xpaned->top_left_child, &top_left_child_requisition, NULL); gtk_widget_get_preferred_size (xpaned->top_right_child, &top_right_child_requisition, NULL); gtk_widget_get_preferred_size (xpaned->bottom_left_child, &bottom_left_child_requisition, NULL); gtk_widget_get_preferred_size (xpaned->bottom_right_child, &bottom_right_child_requisition, NULL); /* determine the total requisition-sum of all requisitions of borders, * handles, children etc. */ gtk_xpaned_compute_position (xpaned, allocation, &top_left_child_requisition, &top_right_child_requisition, &bottom_left_child_requisition, &bottom_right_child_requisition); /* calculate the current positions and sizes of the handles */ xpaned->handle_pos_east.x = allocation->x + border_width + xpaned->top_left_child_size.width + handle_size; xpaned->handle_pos_east.y = allocation->y + border_width + xpaned->top_left_child_size.height; xpaned->handle_pos_east.width = allocation->width - xpaned->top_left_child_size.width - 2 * border_width - handle_size; xpaned->handle_pos_east.height = handle_size; xpaned->handle_pos_west.x = allocation->x + border_width; xpaned->handle_pos_west.y = xpaned->handle_pos_east.y; xpaned->handle_pos_west.width = allocation->width - xpaned->handle_pos_east.width - 2 * border_width - handle_size; xpaned->handle_pos_west.height = handle_size; xpaned->handle_pos_north.x = xpaned->handle_pos_east.x - handle_size; xpaned->handle_pos_north.y = allocation->y + border_width; xpaned->handle_pos_north.width = handle_size; xpaned->handle_pos_north.height = xpaned->handle_pos_east.y - allocation->y - border_width; xpaned->handle_pos_south.x = xpaned->handle_pos_north.x; xpaned->handle_pos_south.y = xpaned->handle_pos_east.y + handle_size; xpaned->handle_pos_south.width = handle_size; xpaned->handle_pos_south.height = allocation->height - xpaned->handle_pos_north.height - 2 * border_width - handle_size; #define CENTRUM 20 xpaned->handle_pos_middle.x = xpaned->handle_pos_north.x; xpaned->handle_pos_middle.y = xpaned->handle_pos_east.y; xpaned->handle_pos_middle.width = handle_size + CENTRUM; xpaned->handle_pos_middle.height = handle_size + CENTRUM; /* set allocation for top-left child */ top_left_child_allocation.x = allocation->x + border_width; top_left_child_allocation.y = allocation->y + border_width; top_left_child_allocation.width = xpaned->handle_pos_west.width; top_left_child_allocation.height = xpaned->handle_pos_north.height; /* set allocation for top-right child */ top_right_child_allocation.x = allocation->x + border_width + handle_size + top_left_child_allocation.width; top_right_child_allocation.y = allocation->y + border_width; top_right_child_allocation.width = xpaned->handle_pos_east.width; top_right_child_allocation.height = xpaned->handle_pos_north.height; /* set allocation for bottom-left child */ bottom_left_child_allocation.x = xpaned->handle_pos_west.x; bottom_left_child_allocation.y = xpaned->handle_pos_south.y; bottom_left_child_allocation.width = xpaned->handle_pos_west.width; bottom_left_child_allocation.height = xpaned->handle_pos_south.height; /* set allocation for bottom-right child */ bottom_right_child_allocation.x = top_right_child_allocation.x; bottom_right_child_allocation.y = bottom_left_child_allocation.y; bottom_right_child_allocation.width = xpaned->handle_pos_east.width; bottom_right_child_allocation.height = xpaned->handle_pos_south.height; if (gtk_widget_get_realized (widget)) { if (gtk_widget_get_mapped (widget)) { gdk_window_show (xpaned->handle_east); gdk_window_show (xpaned->handle_west); gdk_window_show (xpaned->handle_north); gdk_window_show (xpaned->handle_south); gdk_window_show (xpaned->handle_middle); } gdk_window_move_resize (xpaned->handle_east, xpaned->handle_pos_east.x, xpaned->handle_pos_east.y, xpaned->handle_pos_east.width, xpaned->handle_pos_east.height); gdk_window_move_resize (xpaned->handle_west, xpaned->handle_pos_west.x, xpaned->handle_pos_west.y, xpaned->handle_pos_west.width, xpaned->handle_pos_west.height); gdk_window_move_resize (xpaned->handle_north, xpaned->handle_pos_north.x, xpaned->handle_pos_north.y, xpaned->handle_pos_north.width, xpaned->handle_pos_north.height); gdk_window_move_resize (xpaned->handle_south, xpaned->handle_pos_south.x, xpaned->handle_pos_south.y, xpaned->handle_pos_south.width, xpaned->handle_pos_south.height); gdk_window_move_resize (xpaned->handle_middle, xpaned->handle_pos_middle.x, xpaned->handle_pos_middle.y, xpaned->handle_pos_middle.width, xpaned->handle_pos_middle.height); } /* Now allocate the children, making sure, when resizing not to * overlap the windows */ if (gtk_widget_get_mapped (widget)) { gtk_widget_size_allocate (xpaned->top_right_child, &top_right_child_allocation); gtk_widget_size_allocate (xpaned->top_left_child, &top_left_child_allocation); gtk_widget_size_allocate (xpaned->bottom_left_child, &bottom_left_child_allocation); gtk_widget_size_allocate (xpaned->bottom_right_child, &bottom_right_child_allocation); } } } static void gtk_xpaned_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GtkXPaned *xpaned = GTK_XPANED (object); switch (prop_id) { case PROP_X_POSITION: gtk_xpaned_set_position_x (xpaned, g_value_get_int (value)); break; case PROP_Y_POSITION: gtk_xpaned_set_position_y (xpaned, g_value_get_int (value)); break; case PROP_POSITION_SET: xpaned->position_set = g_value_get_boolean (value); gtk_widget_queue_resize (GTK_WIDGET (xpaned)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void gtk_xpaned_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GtkXPaned *xpaned = GTK_XPANED (object); switch (prop_id) { case PROP_X_POSITION: g_value_set_int (value, xpaned->top_left_child_size.width); break; case PROP_Y_POSITION: g_value_set_int (value, xpaned->top_left_child_size.height); break; case PROP_POSITION_SET: g_value_set_boolean (value, xpaned->position_set); break; case PROP_MIN_X_POSITION: g_value_set_int (value, xpaned->min_position.x); break; case PROP_MIN_Y_POSITION: g_value_set_int (value, xpaned->min_position.y); break; case PROP_MAX_X_POSITION: g_value_set_int (value, xpaned->max_position.x); break; case PROP_MAX_Y_POSITION: g_value_set_int (value, xpaned->max_position.y); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void gtk_xpaned_set_child_property (GtkContainer * container, GtkWidget * child, guint property_id, const GValue * value, GParamSpec * pspec) { GtkXPaned *xpaned = GTK_XPANED (container); gboolean old_value = FALSE; gboolean new_value = FALSE; g_assert (child == xpaned->top_left_child || child == xpaned->top_right_child || child == xpaned->bottom_left_child || child == xpaned->bottom_right_child); new_value = g_value_get_boolean (value); switch (property_id) { case CHILD_PROP_RESIZE: if (child == xpaned->top_left_child) { old_value = xpaned->top_left_child_resize; xpaned->top_left_child_resize = new_value; } else if (child == xpaned->top_right_child) { old_value = xpaned->top_right_child_resize; xpaned->top_right_child_resize = new_value; } else if (child == xpaned->bottom_left_child) { old_value = xpaned->bottom_left_child_resize; xpaned->bottom_left_child_resize = new_value; } else if (child == xpaned->bottom_right_child) { old_value = xpaned->bottom_right_child_resize; xpaned->bottom_right_child_resize = new_value; } break; case CHILD_PROP_SHRINK: if (child == xpaned->top_left_child) { old_value = xpaned->top_left_child_shrink; xpaned->top_left_child_shrink = new_value; } else if (child == xpaned->top_right_child) { old_value = xpaned->top_right_child_shrink; xpaned->top_right_child_shrink = new_value; } else if (child == xpaned->bottom_left_child) { old_value = xpaned->bottom_left_child_shrink; xpaned->bottom_left_child_shrink = new_value; } else if (child == xpaned->bottom_right_child) { old_value = xpaned->bottom_right_child_shrink; xpaned->bottom_right_child_shrink = new_value; } break; default: GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec); old_value = -1; /* quiet gcc */ break; } if (old_value != new_value) gtk_widget_queue_resize (GTK_WIDGET (container)); } static void gtk_xpaned_get_child_property (GtkContainer * container, GtkWidget * child, guint property_id, GValue * value, GParamSpec * pspec) { GtkXPaned *xpaned = GTK_XPANED (container); g_assert (child == xpaned->top_left_child || child == xpaned->top_right_child || child == xpaned->bottom_left_child || child == xpaned->bottom_right_child); switch (property_id) { case CHILD_PROP_RESIZE: if (child == xpaned->top_left_child) g_value_set_boolean (value, xpaned->top_left_child_resize); else if (child == xpaned->top_right_child) g_value_set_boolean (value, xpaned->top_right_child_resize); else if (child == xpaned->bottom_left_child) g_value_set_boolean (value, xpaned->bottom_left_child_resize); else if (child == xpaned->bottom_right_child) g_value_set_boolean (value, xpaned->bottom_right_child_resize); break; case CHILD_PROP_SHRINK: if (child == xpaned->top_left_child) g_value_set_boolean (value, xpaned->top_left_child_shrink); else if (child == xpaned->top_right_child) g_value_set_boolean (value, xpaned->top_right_child_shrink); else if (child == xpaned->bottom_left_child) g_value_set_boolean (value, xpaned->bottom_left_child_shrink); else if (child == xpaned->bottom_right_child) g_value_set_boolean (value, xpaned->bottom_right_child_shrink); break; default: GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec); break; } } static void gtk_xpaned_finalize (GObject * object) { GtkXPaned *xpaned = GTK_XPANED (object); gtk_xpaned_set_saved_focus (xpaned, NULL); gtk_xpaned_set_first_xpaned (xpaned, NULL); g_free (xpaned->priv); G_OBJECT_CLASS (parent_class)->finalize (object); } static void gtk_xpaned_realize (GtkWidget * widget) { GtkXPaned *xpaned; GdkWindowAttr attributes_east; GdkWindowAttr attributes_west; GdkWindowAttr attributes_north; GdkWindowAttr attributes_south; GdkWindowAttr attributes_middle; gint attributes_mask_east; gint attributes_mask_west; gint attributes_mask_north; gint attributes_mask_south; gint attributes_mask_middle; gtk_widget_set_realized (widget, TRUE); xpaned = GTK_XPANED (widget); gtk_widget_set_window (widget, gtk_widget_get_parent_window (widget)); // g_object_ref (widget->window); attributes_east.window_type = GDK_WINDOW_CHILD; attributes_west.window_type = GDK_WINDOW_CHILD; attributes_north.window_type = GDK_WINDOW_CHILD; attributes_south.window_type = GDK_WINDOW_CHILD; attributes_middle.window_type = GDK_WINDOW_CHILD; attributes_east.wclass = GDK_INPUT_ONLY; attributes_west.wclass = GDK_INPUT_ONLY; attributes_north.wclass = GDK_INPUT_ONLY; attributes_south.wclass = GDK_INPUT_ONLY; attributes_middle.wclass = GDK_INPUT_ONLY; attributes_east.x = xpaned->handle_pos_east.x; attributes_east.y = xpaned->handle_pos_east.y; attributes_east.width = xpaned->handle_pos_east.width; attributes_east.height = xpaned->handle_pos_east.height; attributes_west.x = xpaned->handle_pos_west.x; attributes_west.y = xpaned->handle_pos_west.y; attributes_west.width = xpaned->handle_pos_west.width; attributes_west.height = xpaned->handle_pos_west.height; attributes_north.x = xpaned->handle_pos_north.x; attributes_north.y = xpaned->handle_pos_north.y; attributes_north.width = xpaned->handle_pos_north.width; attributes_north.height = xpaned->handle_pos_north.height; attributes_south.x = xpaned->handle_pos_south.x; attributes_south.y = xpaned->handle_pos_south.y; attributes_south.width = xpaned->handle_pos_south.width; attributes_south.height = xpaned->handle_pos_south.height; attributes_middle.x = xpaned->handle_pos_middle.x; attributes_middle.y = xpaned->handle_pos_middle.y; attributes_middle.width = xpaned->handle_pos_middle.width; attributes_middle.height = xpaned->handle_pos_middle.height; attributes_east.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), xpaned->cursor_type_east); attributes_west.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), xpaned->cursor_type_west); attributes_north.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), xpaned->cursor_type_north); attributes_south.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), xpaned->cursor_type_south); attributes_middle.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), xpaned->cursor_type_middle); attributes_east.event_mask = gtk_widget_get_events (widget); attributes_west.event_mask = gtk_widget_get_events (widget); attributes_north.event_mask = gtk_widget_get_events (widget); attributes_south.event_mask = gtk_widget_get_events (widget); attributes_middle.event_mask = gtk_widget_get_events (widget); attributes_east.event_mask |= (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); attributes_west.event_mask |= (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); attributes_north.event_mask |= (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); attributes_south.event_mask |= (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); attributes_middle.event_mask |= (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); attributes_mask_east = GDK_WA_X | GDK_WA_Y | GDK_WA_CURSOR; attributes_mask_west = GDK_WA_X | GDK_WA_Y | GDK_WA_CURSOR; attributes_mask_north = GDK_WA_X | GDK_WA_Y | GDK_WA_CURSOR; attributes_mask_south = GDK_WA_X | GDK_WA_Y | GDK_WA_CURSOR; attributes_mask_middle = GDK_WA_X | GDK_WA_Y | GDK_WA_CURSOR; xpaned->handle_east = gdk_window_new (gtk_widget_get_window (widget), &attributes_east, attributes_mask_east); xpaned->handle_west = gdk_window_new (gtk_widget_get_window (widget), &attributes_west, attributes_mask_west); xpaned->handle_north = gdk_window_new (gtk_widget_get_window (widget), &attributes_north, attributes_mask_north); xpaned->handle_south = gdk_window_new (gtk_widget_get_window (widget), &attributes_south, attributes_mask_south); xpaned->handle_middle = gdk_window_new (gtk_widget_get_window (widget), &attributes_middle, attributes_mask_middle); gdk_window_set_user_data (xpaned->handle_east, xpaned); gdk_window_set_user_data (xpaned->handle_west, xpaned); gdk_window_set_user_data (xpaned->handle_north, xpaned); gdk_window_set_user_data (xpaned->handle_south, xpaned); gdk_window_set_user_data (xpaned->handle_middle, xpaned); g_object_unref (attributes_east.cursor); g_object_unref (attributes_west.cursor); g_object_unref (attributes_north.cursor); g_object_unref (attributes_south.cursor); g_object_unref (attributes_middle.cursor); if (xpaned->top_left_child && gtk_widget_get_visible (xpaned->top_left_child) && xpaned->top_right_child && gtk_widget_get_visible (xpaned->top_right_child) && xpaned->bottom_left_child && gtk_widget_get_visible (xpaned->bottom_left_child) && xpaned->bottom_right_child && gtk_widget_get_visible (xpaned->bottom_right_child)) { gdk_window_show (xpaned->handle_east); gdk_window_show (xpaned->handle_west); gdk_window_show (xpaned->handle_north); gdk_window_show (xpaned->handle_south); gdk_window_show (xpaned->handle_middle); } } static void gtk_xpaned_unrealize (GtkWidget * widget) { GtkXPaned *xpaned = GTK_XPANED (widget); if (xpaned->handle_east) { gdk_window_set_user_data (xpaned->handle_east, NULL); gdk_window_destroy (xpaned->handle_east); xpaned->handle_east = NULL; } if (xpaned->handle_west) { gdk_window_set_user_data (xpaned->handle_west, NULL); gdk_window_destroy (xpaned->handle_west); xpaned->handle_west = NULL; } if (xpaned->handle_north) { gdk_window_set_user_data (xpaned->handle_north, NULL); gdk_window_destroy (xpaned->handle_north); xpaned->handle_north = NULL; } if (xpaned->handle_south) { gdk_window_set_user_data (xpaned->handle_south, NULL); gdk_window_destroy (xpaned->handle_south); xpaned->handle_south = NULL; } if (xpaned->handle_middle) { gdk_window_set_user_data (xpaned->handle_middle, NULL); gdk_window_destroy (xpaned->handle_middle); xpaned->handle_middle = NULL; } gtk_xpaned_set_last_top_left_child_focus (xpaned, NULL); gtk_xpaned_set_last_top_right_child_focus (xpaned, NULL); gtk_xpaned_set_last_bottom_left_child_focus (xpaned, NULL); gtk_xpaned_set_last_bottom_right_child_focus (xpaned, NULL); gtk_xpaned_set_saved_focus (xpaned, NULL); gtk_xpaned_set_first_xpaned (xpaned, NULL); if (GTK_WIDGET_CLASS (parent_class)->unrealize) (*GTK_WIDGET_CLASS (parent_class)->unrealize) (widget); } static void gtk_xpaned_map (GtkWidget * widget) { GtkXPaned *xpaned = GTK_XPANED (widget); gdk_window_show (xpaned->handle_east); gdk_window_show (xpaned->handle_west); gdk_window_show (xpaned->handle_north); gdk_window_show (xpaned->handle_south); gdk_window_show (xpaned->handle_middle); GTK_WIDGET_CLASS (parent_class)->map (widget); } static void gtk_xpaned_unmap (GtkWidget * widget) { GtkXPaned *xpaned = GTK_XPANED (widget); gdk_window_hide (xpaned->handle_east); gdk_window_hide (xpaned->handle_west); gdk_window_hide (xpaned->handle_north); gdk_window_hide (xpaned->handle_south); gdk_window_hide (xpaned->handle_middle); GTK_WIDGET_CLASS (parent_class)->unmap (widget); } static gboolean gtk_xpaned_draw (GtkWidget * widget, cairo_t *cr) { GtkXPaned *xpaned = GTK_XPANED (widget); gint handle_size; /* determine size of handle(s) */ gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); /* I want the handle-"thickness" to be at least 3 */ g_assert (handle_size >= 3); if (gtk_widget_get_visible (widget) && gtk_widget_get_mapped (widget) && xpaned->top_left_child && gtk_widget_get_visible (xpaned->top_left_child) && xpaned->top_right_child && gtk_widget_get_visible (xpaned->top_right_child) && xpaned->bottom_left_child && gtk_widget_get_visible (xpaned->bottom_left_child) && xpaned->bottom_right_child && gtk_widget_get_visible (xpaned->bottom_right_child)) { GtkStyleContext *context; context = gtk_widget_get_style_context (widget); gtk_render_handle (context, cr, xpaned->handle_pos_east.x - handle_size - 256 / 2, xpaned->handle_pos_west.y + 1, 256 + handle_size, handle_size - 2); gtk_render_handle (context, cr, xpaned->handle_pos_north.x + 1, xpaned->handle_pos_south.y - handle_size - 256 / 2, handle_size - 2, 256 + handle_size); } /* Chain up to draw children */ GTK_WIDGET_CLASS (parent_class)->draw (widget, cr); return FALSE; } static gboolean is_rtl (GtkXPaned * xpaned) { if (gtk_widget_get_direction (GTK_WIDGET (xpaned)) == GTK_TEXT_DIR_RTL) return TRUE; return FALSE; } static void update_drag (GtkXPaned * xpaned) { GdkPoint pos; GtkWidget *widget = GTK_WIDGET (xpaned); gint handle_size; GtkRequisition size; GtkAllocation allocation; gtk_widget_get_allocation (widget, &allocation); gdk_window_get_device_position (gtk_widget_get_window (widget), gdk_device_manager_get_client_pointer ( gdk_display_get_device_manager ( gtk_widget_get_display (widget))), &pos.x, &pos.y, NULL); if (!gtk_widget_get_has_window (widget)) { pos.x -= allocation.x; pos.y -= allocation.y; } if (xpaned->in_drag_vert) { pos.y -= xpaned->drag_pos.y; if (is_rtl (xpaned)) { gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); size.height = allocation.height - pos.y - handle_size; } else { size.height = pos.y; } size.height -= gtk_container_get_border_width (GTK_CONTAINER (xpaned)); size.height = CLAMP (size.height, xpaned->min_position.y, xpaned->max_position.y); if (size.height != xpaned->top_left_child_size.height) gtk_xpaned_set_position_y (xpaned, size.height); } if (xpaned->in_drag_horiz) { pos.x -= xpaned->drag_pos.x; if (is_rtl (xpaned)) { gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); size.width = allocation.width - pos.x - handle_size; } else { size.width = pos.x; } size.width -= gtk_container_get_border_width (GTK_CONTAINER (xpaned)); size.width = CLAMP (size.width, xpaned->min_position.x, xpaned->max_position.x); if (size.width != xpaned->top_left_child_size.width) gtk_xpaned_set_position_x (xpaned, size.width); } if (xpaned->in_drag_vert_and_horiz) { pos.x -= xpaned->drag_pos.x; pos.y -= xpaned->drag_pos.y; if (is_rtl (xpaned)) { gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); size.width = allocation.width - pos.x - handle_size; size.height = allocation.height - pos.y - handle_size; } else { size.width = pos.x; size.height = pos.y; } size.width -= gtk_container_get_border_width (GTK_CONTAINER (xpaned)); size.height -= gtk_container_get_border_width (GTK_CONTAINER (xpaned)); size.width = CLAMP (size.width, xpaned->min_position.x, xpaned->max_position.x); size.height = CLAMP (size.height, xpaned->min_position.y, xpaned->max_position.y); if (size.width != xpaned->top_left_child_size.width) gtk_xpaned_set_position_x (xpaned, size.width); if (size.height != xpaned->top_left_child_size.height) gtk_xpaned_set_position_y (xpaned, size.height); } } static gboolean gtk_xpaned_enter (GtkWidget * widget, GdkEventCrossing * event) { GtkXPaned *xpaned = GTK_XPANED (widget); if (xpaned->in_drag_vert || xpaned->in_drag_horiz || xpaned->in_drag_vert_and_horiz) update_drag (xpaned); else { xpaned->handle_prelit = TRUE; gtk_widget_queue_draw_area (widget, xpaned->handle_pos_east.x, xpaned->handle_pos_east.y, xpaned->handle_pos_east.width, xpaned->handle_pos_east.height); gtk_widget_queue_draw_area (widget, xpaned->handle_pos_west.x, xpaned->handle_pos_west.y, xpaned->handle_pos_west.width, xpaned->handle_pos_west.height); gtk_widget_queue_draw_area (widget, xpaned->handle_pos_north.x, xpaned->handle_pos_north.y, xpaned->handle_pos_north.width, xpaned->handle_pos_north.height); gtk_widget_queue_draw_area (widget, xpaned->handle_pos_south.x, xpaned->handle_pos_south.y, xpaned->handle_pos_south.width, xpaned->handle_pos_south.height); gtk_widget_queue_draw_area (widget, xpaned->handle_pos_middle.x, xpaned->handle_pos_middle.y, xpaned->handle_pos_middle.width, xpaned->handle_pos_middle.height); } return TRUE; } static gboolean gtk_xpaned_leave (GtkWidget * widget, GdkEventCrossing * event) { GtkXPaned *xpaned = GTK_XPANED (widget); if (xpaned->in_drag_vert || xpaned->in_drag_horiz || xpaned->in_drag_vert_and_horiz) update_drag (xpaned); else { xpaned->handle_prelit = FALSE; gtk_widget_queue_draw_area (widget, xpaned->handle_pos_east.x, xpaned->handle_pos_east.y, xpaned->handle_pos_east.width, xpaned->handle_pos_east.height); gtk_widget_queue_draw_area (widget, xpaned->handle_pos_west.x, xpaned->handle_pos_west.y, xpaned->handle_pos_west.width, xpaned->handle_pos_west.height); gtk_widget_queue_draw_area (widget, xpaned->handle_pos_north.x, xpaned->handle_pos_north.y, xpaned->handle_pos_north.width, xpaned->handle_pos_north.height); gtk_widget_queue_draw_area (widget, xpaned->handle_pos_south.x, xpaned->handle_pos_south.y, xpaned->handle_pos_south.width, xpaned->handle_pos_south.height); gtk_widget_queue_draw_area (widget, xpaned->handle_pos_middle.x, xpaned->handle_pos_middle.y, xpaned->handle_pos_middle.width, xpaned->handle_pos_middle.height); } return TRUE; } static gboolean gtk_xpaned_focus (GtkWidget * widget, GtkDirectionType direction) { gboolean retval; /* This is a hack, but how can this be done without * excessive cut-and-paste from gtkcontainer.c? */ gtk_widget_set_can_focus (GTK_WIDGET (widget), FALSE); retval = (*GTK_WIDGET_CLASS (parent_class)->focus) (widget, direction); gtk_widget_set_can_focus (GTK_WIDGET (widget), TRUE); return retval; } static void gtk_xpaned_button_press_grab (GdkWindow *handle, GdkEventButton *event) { /* We need a server grab here, not gtk_grab_add(), since * we don't want to pass events on to the widget's children */ gdk_device_grab (event->device, handle, GDK_OWNERSHIP_NONE, FALSE, (GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK), NULL, event->time); } static gboolean gtk_xpaned_button_press (GtkWidget * widget, GdkEventButton * event) { GtkXPaned *xpaned = GTK_XPANED (widget); /* if any child is currently maximized, jump right back */ if (xpaned->maximized[GTK_XPANED_TOP_LEFT] || xpaned->maximized[GTK_XPANED_TOP_RIGHT] || xpaned->maximized[GTK_XPANED_BOTTOM_LEFT] || xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT]) return FALSE; /* if user is dragging the handles around */ if (!xpaned->in_drag_vert_and_horiz && event->window != xpaned->handle_east && event->window != xpaned->handle_west && event->window != xpaned->handle_north && event->window != xpaned->handle_south && event->window == xpaned->handle_middle && event->button == 1) { xpaned->in_drag_vert_and_horiz = TRUE; gtk_xpaned_button_press_grab (xpaned->handle_middle, event); xpaned->drag_pos.x = event->x; xpaned->drag_pos.y = event->y; return TRUE; } else if (!xpaned->in_drag_vert && event->window == xpaned->handle_east && event->window != xpaned->handle_west && event->window != xpaned->handle_north && event->window != xpaned->handle_south && event->window != xpaned->handle_middle && event->button == 1) { xpaned->in_drag_vert = TRUE; gtk_xpaned_button_press_grab (xpaned->handle_east, event); xpaned->drag_pos.y = event->y; return TRUE; } else if (!xpaned->in_drag_vert && event->window != xpaned->handle_east && event->window == xpaned->handle_west && event->window != xpaned->handle_north && event->window != xpaned->handle_south && event->window != xpaned->handle_middle && event->button == 1) { xpaned->in_drag_vert = TRUE; gtk_xpaned_button_press_grab (xpaned->handle_west, event); xpaned->drag_pos.y = event->y; return TRUE; } else if (!xpaned->in_drag_horiz && event->window != xpaned->handle_east && event->window != xpaned->handle_west && event->window == xpaned->handle_north && event->window != xpaned->handle_south && event->window != xpaned->handle_middle && event->button == 1) { xpaned->in_drag_horiz = TRUE; gtk_xpaned_button_press_grab (xpaned->handle_north, event); xpaned->drag_pos.x = event->x; return TRUE; } else if (!xpaned->in_drag_horiz && event->window != xpaned->handle_east && event->window != xpaned->handle_west && event->window != xpaned->handle_north && event->window == xpaned->handle_south && event->window != xpaned->handle_middle && event->button == 1) { xpaned->in_drag_horiz = TRUE; gtk_xpaned_button_press_grab (xpaned->handle_south, event); xpaned->drag_pos.x = event->x; return TRUE; } return FALSE; } static gboolean gtk_xpaned_button_release (GtkWidget * widget, GdkEventButton * event) { GtkXPaned *xpaned = GTK_XPANED (widget); if (xpaned->in_drag_vert && (event->button == 1)) { xpaned->in_drag_vert = FALSE; xpaned->drag_pos.y = -1; xpaned->position_set = TRUE; gdk_device_ungrab (event->device, event->time); return TRUE; } else if (xpaned->in_drag_horiz && (event->button == 1)) { xpaned->in_drag_horiz = FALSE; xpaned->drag_pos.x = -1; xpaned->position_set = TRUE; gdk_device_ungrab (event->device, event->time); return TRUE; } else if (xpaned->in_drag_vert_and_horiz && (event->button == 1)) { xpaned->in_drag_vert_and_horiz = FALSE; xpaned->drag_pos.x = -1; xpaned->drag_pos.y = -1; xpaned->position_set = TRUE; gdk_device_ungrab (event->device, event->time); return TRUE; } return FALSE; } static gboolean gtk_xpaned_motion (GtkWidget * widget, GdkEventMotion * event) { GtkXPaned *xpaned = GTK_XPANED (widget); if (xpaned->in_drag_vert || xpaned->in_drag_horiz || xpaned->in_drag_vert_and_horiz) { update_drag (xpaned); return TRUE; } return FALSE; } void gtk_xpaned_add_top_left (GtkXPaned * xpaned, GtkWidget * widget) { gtk_xpaned_pack_top_left (xpaned, widget, FALSE, TRUE); } void gtk_xpaned_add_top_right (GtkXPaned * xpaned, GtkWidget * widget) { gtk_xpaned_pack_top_right (xpaned, widget, FALSE, TRUE); } void gtk_xpaned_add_bottom_left (GtkXPaned * xpaned, GtkWidget * widget) { gtk_xpaned_pack_bottom_left (xpaned, widget, FALSE, TRUE); } void gtk_xpaned_add_bottom_right (GtkXPaned * xpaned, GtkWidget * widget) { gtk_xpaned_pack_bottom_right (xpaned, widget, FALSE, TRUE); } void gtk_xpaned_pack_top_left (GtkXPaned * xpaned, GtkWidget * child, gboolean resize, gboolean shrink) { g_return_if_fail (GTK_IS_XPANED (xpaned)); g_return_if_fail (GTK_IS_WIDGET (child)); if (!xpaned->top_left_child) { xpaned->top_left_child = child; xpaned->top_left_child_resize = resize; xpaned->top_left_child_shrink = shrink; gtk_widget_set_parent (child, GTK_WIDGET (xpaned)); } } void gtk_xpaned_pack_top_right (GtkXPaned * xpaned, GtkWidget * child, gboolean resize, gboolean shrink) { g_return_if_fail (GTK_IS_XPANED (xpaned)); g_return_if_fail (GTK_IS_WIDGET (child)); if (!xpaned->top_right_child) { xpaned->top_right_child = child; xpaned->top_right_child_resize = resize; xpaned->top_right_child_shrink = shrink; gtk_widget_set_parent (child, GTK_WIDGET (xpaned)); } } void gtk_xpaned_pack_bottom_left (GtkXPaned * xpaned, GtkWidget * child, gboolean resize, gboolean shrink) { g_return_if_fail (GTK_IS_XPANED (xpaned)); g_return_if_fail (GTK_IS_WIDGET (child)); if (!xpaned->bottom_left_child) { xpaned->bottom_left_child = child; xpaned->bottom_left_child_resize = resize; xpaned->bottom_left_child_shrink = shrink; gtk_widget_set_parent (child, GTK_WIDGET (xpaned)); } } void gtk_xpaned_pack_bottom_right (GtkXPaned * xpaned, GtkWidget * child, gboolean resize, gboolean shrink) { g_return_if_fail (GTK_IS_XPANED (xpaned)); g_return_if_fail (GTK_IS_WIDGET (child)); if (!xpaned->bottom_right_child) { xpaned->bottom_right_child = child; xpaned->bottom_right_child_resize = resize; xpaned->bottom_right_child_shrink = shrink; gtk_widget_set_parent (child, GTK_WIDGET (xpaned)); } } static void gtk_xpaned_add (GtkContainer * container, GtkWidget * widget) { GtkXPaned *xpaned; g_return_if_fail (GTK_IS_XPANED (container)); xpaned = GTK_XPANED (container); if (!xpaned->top_left_child) gtk_xpaned_add_top_left (xpaned, widget); else if (!xpaned->top_right_child) gtk_xpaned_add_top_right (xpaned, widget); else if (!xpaned->bottom_left_child) gtk_xpaned_add_bottom_left (xpaned, widget); else if (!xpaned->bottom_right_child) gtk_xpaned_add_bottom_right (xpaned, widget); else g_warning ("GtkXPaned cannot have more than 4 children\n"); } static void gtk_xpaned_remove (GtkContainer * container, GtkWidget * widget) { GtkXPaned *xpaned; gboolean was_visible; xpaned = GTK_XPANED (container); was_visible = gtk_widget_get_visible (widget); if (xpaned->top_left_child == widget) { gtk_widget_unparent (widget); xpaned->top_left_child = NULL; if (was_visible && gtk_widget_get_visible (GTK_WIDGET (container))) gtk_widget_queue_resize (GTK_WIDGET (container)); } else if (xpaned->top_right_child == widget) { gtk_widget_unparent (widget); xpaned->top_right_child = NULL; if (was_visible && gtk_widget_get_visible (GTK_WIDGET (container))) gtk_widget_queue_resize (GTK_WIDGET (container)); } else if (xpaned->bottom_left_child == widget) { gtk_widget_unparent (widget); xpaned->bottom_left_child = NULL; if (was_visible && gtk_widget_get_visible (GTK_WIDGET (container))) gtk_widget_queue_resize (GTK_WIDGET (container)); } else if (xpaned->bottom_right_child == widget) { gtk_widget_unparent (widget); xpaned->bottom_right_child = NULL; if (was_visible && gtk_widget_get_visible (GTK_WIDGET (container))) gtk_widget_queue_resize (GTK_WIDGET (container)); } else g_warning ("GtkXPaned has no more children attached\n"); } static void gtk_xpaned_forall (GtkContainer * container, gboolean include_internals, GtkCallback callback, gpointer callback_data) { GtkXPaned *xpaned; g_return_if_fail (callback != NULL); xpaned = GTK_XPANED (container); if (xpaned->top_left_child) (*callback) (xpaned->top_left_child, callback_data); if (xpaned->top_right_child) (*callback) (xpaned->top_right_child, callback_data); if (xpaned->bottom_left_child) (*callback) (xpaned->bottom_left_child, callback_data); if (xpaned->bottom_right_child) (*callback) (xpaned->bottom_right_child, callback_data); } /** * gtk_xpaned_get_position_x: * @paned: a #GtkXPaned widget * * Obtains the x-position of the divider. * * Return value: x-position of the divider **/ gint gtk_xpaned_get_position_x (GtkXPaned * xpaned) { g_return_val_if_fail (GTK_IS_XPANED (xpaned), 0); return xpaned->top_left_child_size.width; } /** * gtk_xpaned_get_position_y: * @paned: a #GtkXPaned widget * * Obtains the y-position of the divider. * * Return value: y-position of the divider **/ gint gtk_xpaned_get_position_y (GtkXPaned * xpaned) { g_return_val_if_fail (GTK_IS_XPANED (xpaned), 0); return xpaned->top_left_child_size.height; } /** * gtk_xpaned_set_position_x: * @paned: a #GtkXPaned widget * @xposition: pixel x-position of divider, a negative values * of a component mean that the position is unset. * * Sets the x-position of the divider between the four panes. **/ void gtk_xpaned_set_position_x (GtkXPaned * xpaned, gint xposition) { GObject *object; g_return_if_fail (GTK_IS_XPANED (xpaned)); /* if any child is currently maximized, jump right back */ if (xpaned->maximized[GTK_XPANED_TOP_LEFT] || xpaned->maximized[GTK_XPANED_TOP_RIGHT] || xpaned->maximized[GTK_XPANED_BOTTOM_LEFT] || xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT]) return; object = G_OBJECT (xpaned); if (xposition >= 0) { /* We don't clamp here - the assumption is that * if the total allocation changes at the same time * as the position, the position set is with reference * to the new total size. If only the position changes, * then clamping will occur in gtk_paned_compute_position() */ xpaned->top_left_child_size.width = xposition; xpaned->position_set = TRUE; } else { xpaned->position_set = FALSE; } g_object_freeze_notify (object); g_object_notify (object, "x-position"); g_object_notify (object, "position-set"); g_object_thaw_notify (object); gtk_widget_queue_resize (GTK_WIDGET (xpaned)); } /** * gtk_xpaned_set_position_y: * @paned: a #GtkXPaned widget * @yposition: pixel y-position of divider, a negative values * of a component mean that the position is unset. * * Sets the y-position of the divider between the four panes. **/ void gtk_xpaned_set_position_y (GtkXPaned * xpaned, gint yposition) { GObject *object; g_return_if_fail (GTK_IS_XPANED (xpaned)); /* if any child is currently maximized, jump right back */ if (xpaned->maximized[GTK_XPANED_TOP_LEFT] || xpaned->maximized[GTK_XPANED_TOP_RIGHT] || xpaned->maximized[GTK_XPANED_BOTTOM_LEFT] || xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT]) return; object = G_OBJECT (xpaned); if (yposition >= 0) { /* We don't clamp here - the assumption is that * if the total allocation changes at the same time * as the position, the position set is with reference * to the new total size. If only the position changes, * then clamping will occur in gtk_paned_compute_position() */ xpaned->top_left_child_size.height = yposition; xpaned->position_set = TRUE; } else { xpaned->position_set = FALSE; } g_object_freeze_notify (object); g_object_notify (object, "y-position"); g_object_notify (object, "position-set"); g_object_thaw_notify (object); gtk_widget_queue_resize (GTK_WIDGET (xpaned)); } /* this call is private and only intended for internal use! */ void gtk_xpaned_save_unmaximized_x (GtkXPaned * xpaned) { xpaned->unmaximized_position.x = gtk_xpaned_get_position_x (xpaned); } /* this call is private and only intended for internal use! */ void gtk_xpaned_save_unmaximized_y (GtkXPaned * xpaned) { xpaned->unmaximized_position.y = gtk_xpaned_get_position_y (xpaned); } /* this call is private and only intended for internal use! */ gint gtk_xpaned_fetch_unmaximized_x (GtkXPaned * xpaned) { return xpaned->unmaximized_position.x; } /* this call is private and only intended for internal use! */ gint gtk_xpaned_fetch_unmaximized_y (GtkXPaned * xpaned) { return xpaned->unmaximized_position.y; } /** * gtk_xpaned_get_top_left_child: * @xpaned: a #GtkXPaned widget * * Obtains the top-left child of the xpaned widget. * * Return value: top-left child, or %NULL if it is not set. * * Since: 2.4 **/ GtkWidget * gtk_xpaned_get_top_left_child (GtkXPaned * xpaned) { g_return_val_if_fail (GTK_IS_XPANED (xpaned), NULL); return xpaned->top_left_child; } /** * gtk_xpaned_get_top_right_child: * @xpaned: a #GtkXPaned widget * * Obtains the top-right child of the xpaned widget. * * Return value: top-right child, or %NULL if it is not set. * * Since: 2.4 **/ GtkWidget * gtk_xpaned_get_top_right_child (GtkXPaned * xpaned) { g_return_val_if_fail (GTK_IS_XPANED (xpaned), NULL); return xpaned->top_right_child; } /** * gtk_xpaned_get_bottom_left_child: * @xpaned: a #GtkXPaned widget * * Obtains the bottom-left child of the xpaned widget. * * Return value: bottom-left child, or %NULL if it is not set. * * Since: 2.4 **/ GtkWidget * gtk_xpaned_get_bottom_left_child (GtkXPaned * xpaned) { g_return_val_if_fail (GTK_IS_XPANED (xpaned), NULL); return xpaned->bottom_left_child; } /** * gtk_xpaned_get_bottom_right_child: * @xpaned: a #GtkXPaned widget * * Obtains the bottom-right child of the xpaned widget. * * Return value: bottom-right child, or %NULL if it is not set. * * Since: 2.4 **/ GtkWidget * gtk_xpaned_get_bottom_right_child (GtkXPaned * xpaned) { g_return_val_if_fail (GTK_IS_XPANED (xpaned), NULL); return xpaned->bottom_right_child; } gboolean gtk_xpaned_maximize_top_left (GtkXPaned * xpaned, gboolean maximize) { if (maximize) { /* see if any child is already maximized */ if (!xpaned->maximized[GTK_XPANED_TOP_LEFT] && !xpaned->maximized[GTK_XPANED_TOP_RIGHT] && !xpaned->maximized[GTK_XPANED_BOTTOM_LEFT] && !xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT]) { /* save current position */ gtk_xpaned_save_unmaximized_x (xpaned); gtk_xpaned_save_unmaximized_y (xpaned); /* set new maximized position */ gtk_xpaned_set_position_x (xpaned, xpaned->max_position.x); gtk_xpaned_set_position_y (xpaned, xpaned->max_position.y); /* mark maximized flag for top-left child */ xpaned->maximized[GTK_XPANED_TOP_LEFT] = TRUE; return TRUE; } /* already one child maximized, report error */ else return FALSE; } else { /* verify that top-left child is really currently maximized */ if (xpaned->maximized[GTK_XPANED_TOP_LEFT]) { /* clear maximized flat for top-left child */ xpaned->maximized[GTK_XPANED_TOP_LEFT] = FALSE; /* restore unmaximized position */ gtk_xpaned_set_position_x (xpaned, gtk_xpaned_fetch_unmaximized_x (xpaned)); gtk_xpaned_set_position_y (xpaned, gtk_xpaned_fetch_unmaximized_y (xpaned)); return TRUE; } /* top-left child is currently not maximized, report error */ else return FALSE; } } gboolean gtk_xpaned_maximize_top_right (GtkXPaned * xpaned, gboolean maximize) { if (maximize) { /* see if any child is already maximized */ if (!xpaned->maximized[GTK_XPANED_TOP_LEFT] && !xpaned->maximized[GTK_XPANED_TOP_RIGHT] && !xpaned->maximized[GTK_XPANED_BOTTOM_LEFT] && !xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT]) { /* save current position */ gtk_xpaned_save_unmaximized_x (xpaned); gtk_xpaned_save_unmaximized_y (xpaned); /* set new maximized position */ gtk_xpaned_set_position_x (xpaned, xpaned->min_position.x); gtk_xpaned_set_position_y (xpaned, xpaned->max_position.y); /* mark maximized flag for top-right child */ xpaned->maximized[GTK_XPANED_TOP_RIGHT] = TRUE; return TRUE; } /* already one child maximized, report error */ else return FALSE; } else { /* verify that top-right child is really currently maximized */ if (xpaned->maximized[GTK_XPANED_TOP_RIGHT]) { /* clear maximized flat for top-right child */ xpaned->maximized[GTK_XPANED_TOP_RIGHT] = FALSE; /* restore unmaximized position */ gtk_xpaned_set_position_x (xpaned, gtk_xpaned_fetch_unmaximized_x (xpaned)); gtk_xpaned_set_position_y (xpaned, gtk_xpaned_fetch_unmaximized_y (xpaned)); return TRUE; } /* top-right child is currently not maximized, report error */ else return FALSE; } } gboolean gtk_xpaned_maximize_bottom_left (GtkXPaned * xpaned, gboolean maximize) { if (maximize) { /* see if any child is already maximized */ if (!xpaned->maximized[GTK_XPANED_TOP_LEFT] && !xpaned->maximized[GTK_XPANED_TOP_RIGHT] && !xpaned->maximized[GTK_XPANED_BOTTOM_LEFT] && !xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT]) { /* save current position */ gtk_xpaned_save_unmaximized_x (xpaned); gtk_xpaned_save_unmaximized_y (xpaned); /* set new maximized position */ gtk_xpaned_set_position_x (xpaned, xpaned->max_position.x); gtk_xpaned_set_position_y (xpaned, xpaned->min_position.y); /* mark maximized flag for bottom-left child */ xpaned->maximized[GTK_XPANED_BOTTOM_LEFT] = TRUE; return TRUE; } /* already one child maximized, report error */ else return FALSE; } else { /* verify that bottom-left child is really currently maximized */ if (xpaned->maximized[GTK_XPANED_BOTTOM_LEFT]) { /* clear maximized flat for bottom-left child */ xpaned->maximized[GTK_XPANED_BOTTOM_LEFT] = FALSE; /* restore unmaximized position */ gtk_xpaned_set_position_x (xpaned, gtk_xpaned_fetch_unmaximized_x (xpaned)); gtk_xpaned_set_position_y (xpaned, gtk_xpaned_fetch_unmaximized_y (xpaned)); return TRUE; } /* bottom-left child is currently not maximized, report error */ else return FALSE; } } gboolean gtk_xpaned_maximize_bottom_right (GtkXPaned * xpaned, gboolean maximize) { if (maximize) { /* see if any child is already maximized */ if (!xpaned->maximized[GTK_XPANED_TOP_LEFT] && !xpaned->maximized[GTK_XPANED_TOP_RIGHT] && !xpaned->maximized[GTK_XPANED_BOTTOM_LEFT] && !xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT]) { /* save current position */ gtk_xpaned_save_unmaximized_x (xpaned); gtk_xpaned_save_unmaximized_y (xpaned); /* set new maximized position */ gtk_xpaned_set_position_x (xpaned, xpaned->min_position.x); gtk_xpaned_set_position_y (xpaned, xpaned->min_position.y); /* mark maximized flag for bottom-right child */ xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT] = TRUE; return TRUE; } /* already one child maximized, report error */ else return FALSE; } else { /* verify that bottom-right child is really currently maximized */ if (xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT]) { /* clear maximized flat for bottom-right child */ xpaned->maximized[GTK_XPANED_BOTTOM_RIGHT] = FALSE; /* restore unmaximized position */ gtk_xpaned_set_position_x (xpaned, gtk_xpaned_fetch_unmaximized_x (xpaned)); gtk_xpaned_set_position_y (xpaned, gtk_xpaned_fetch_unmaximized_y (xpaned)); return TRUE; } /* bottom-right child is currently not maximized, report error */ else return FALSE; } } void gtk_xpaned_compute_position (GtkXPaned * xpaned, const GtkAllocation * allocation, GtkRequisition * top_left_child_req, GtkRequisition * top_right_child_req, GtkRequisition * bottom_left_child_req, GtkRequisition * bottom_right_child_req) { GdkPoint old_position; GdkPoint old_min_position; GdkPoint old_max_position; gint handle_size; gint border_width = gtk_container_get_border_width (GTK_CONTAINER (xpaned)); g_return_if_fail (GTK_IS_XPANED (xpaned)); old_position.x = xpaned->top_left_child_size.width; old_position.y = xpaned->top_left_child_size.height; old_min_position.x = xpaned->min_position.x; old_min_position.y = xpaned->min_position.y; old_max_position.x = xpaned->max_position.x; old_max_position.y = xpaned->max_position.y; xpaned->min_position.x = xpaned->top_left_child_shrink ? 0 : top_left_child_req->width; xpaned->min_position.y = xpaned->top_left_child_shrink ? 0 : top_left_child_req->height; gtk_widget_style_get (GTK_WIDGET (xpaned), "handle-size", &handle_size, NULL); xpaned->max_position.x = allocation->width - 2 * border_width - handle_size; xpaned->max_position.y = allocation->height - 2 * border_width - handle_size; if (!xpaned->top_left_child_shrink) xpaned->max_position.x = MAX (1, xpaned->max_position.x - top_left_child_req->width); xpaned->max_position.x = MAX (xpaned->min_position.x, xpaned->max_position.x); if (!xpaned->position_set) { if (xpaned->top_left_child_resize && !xpaned->top_right_child_resize) { xpaned->top_left_child_size.width = MAX (0, allocation->width - top_right_child_req->width); xpaned->top_left_child_size.height = MAX (0, allocation->height - top_right_child_req->height); } else if (!xpaned->top_left_child_resize && xpaned->top_right_child_resize) { xpaned->top_left_child_size.width = top_left_child_req->width; xpaned->top_left_child_size.height = top_left_child_req->height; } else { xpaned->top_left_child_size.width = allocation->width * 0.5 + 0.5; xpaned->top_left_child_size.height = allocation->height * 0.5 + 0.5; } } else { /* If the position was set before the initial allocation. ** (paned->last_allocation <= 0) just clamp it and leave it. */ if (xpaned->last_allocation.width > 0) { if (xpaned->top_left_child_resize && !xpaned->top_right_child_resize) { xpaned->top_left_child_size.width += allocation->width - xpaned->last_allocation.width; xpaned->top_left_child_size.height += allocation->height - xpaned->last_allocation.height; } else if (! (!xpaned->top_left_child_resize && xpaned->top_right_child_resize)) { xpaned->top_left_child_size.width = allocation->width * ((gdouble) xpaned->top_left_child_size.width / (xpaned->last_allocation.width)) + 0.5; xpaned->top_left_child_size.height = allocation->height * ((gdouble) xpaned->top_left_child_size.height / (xpaned->last_allocation.height)) + 0.5; } } if (xpaned->last_allocation.height > 0) { if (xpaned->top_left_child_resize && !xpaned->top_right_child_resize) { xpaned->top_left_child_size.width += allocation->width - xpaned->last_allocation.width; xpaned->top_left_child_size.height += allocation->height - xpaned->last_allocation.height; } else if (! (!xpaned->top_left_child_resize && xpaned->top_right_child_resize)) { xpaned->top_left_child_size.width = allocation->width * ((gdouble) xpaned->top_left_child_size.width / (xpaned->last_allocation.width)) + 0.5; xpaned->top_left_child_size.height = allocation->height * ((gdouble) xpaned->top_left_child_size.height / (xpaned->last_allocation.height)) + 0.5; } } } xpaned->top_left_child_size.width = CLAMP (xpaned->top_left_child_size.width, xpaned->min_position.x, xpaned->max_position.x); xpaned->top_left_child_size.height = CLAMP (xpaned->top_left_child_size.height, xpaned->min_position.y, xpaned->max_position.y); xpaned->top_right_child_size.width = CLAMP (xpaned->top_right_child_size.width, xpaned->min_position.x, xpaned->max_position.x); xpaned->top_right_child_size.height = CLAMP (xpaned->top_right_child_size.height, xpaned->min_position.y, xpaned->max_position.y); xpaned->bottom_left_child_size.width = CLAMP (xpaned->bottom_left_child_size.width, xpaned->min_position.x, xpaned->max_position.x); xpaned->bottom_left_child_size.height = CLAMP (xpaned->bottom_left_child_size.height, xpaned->min_position.y, xpaned->max_position.y); xpaned->bottom_right_child_size.width = CLAMP (xpaned->bottom_right_child_size.width, xpaned->min_position.x, xpaned->max_position.x); xpaned->bottom_right_child_size.height = CLAMP (xpaned->bottom_right_child_size.height, xpaned->min_position.y, xpaned->max_position.y); gtk_widget_set_child_visible (xpaned->top_left_child, TRUE); gtk_widget_set_child_visible (xpaned->top_right_child, TRUE); gtk_widget_set_child_visible (xpaned->bottom_left_child, TRUE); gtk_widget_set_child_visible (xpaned->bottom_right_child, TRUE); g_object_freeze_notify (G_OBJECT (xpaned)); if (xpaned->top_left_child_size.width != old_position.x) g_object_notify (G_OBJECT (xpaned), "x-position"); if (xpaned->top_left_child_size.height != old_position.y) g_object_notify (G_OBJECT (xpaned), "y-position"); if (xpaned->top_right_child_size.width != old_position.x) g_object_notify (G_OBJECT (xpaned), "x-position"); if (xpaned->top_right_child_size.height != old_position.y) g_object_notify (G_OBJECT (xpaned), "y-position"); if (xpaned->bottom_left_child_size.width != old_position.x) g_object_notify (G_OBJECT (xpaned), "x-position"); if (xpaned->bottom_left_child_size.height != old_position.y) g_object_notify (G_OBJECT (xpaned), "y-position"); if (xpaned->bottom_right_child_size.width != old_position.x) g_object_notify (G_OBJECT (xpaned), "x-position"); if (xpaned->bottom_right_child_size.height != old_position.y) g_object_notify (G_OBJECT (xpaned), "y-position"); if (xpaned->min_position.x != old_min_position.x) g_object_notify (G_OBJECT (xpaned), "min-x-position"); if (xpaned->min_position.y != old_min_position.y) g_object_notify (G_OBJECT (xpaned), "min-y-position"); if (xpaned->max_position.x != old_max_position.x) g_object_notify (G_OBJECT (xpaned), "max-y-position"); if (xpaned->max_position.y != old_max_position.y) g_object_notify (G_OBJECT (xpaned), "max-y-position"); g_object_thaw_notify (G_OBJECT (xpaned)); xpaned->last_allocation.width = allocation->width; xpaned->last_allocation.height = allocation->height; } static void gtk_xpaned_set_saved_focus (GtkXPaned * xpaned, GtkWidget * widget) { if (xpaned->priv->saved_focus) g_object_remove_weak_pointer (G_OBJECT (xpaned->priv->saved_focus), (gpointer *) & (xpaned->priv->saved_focus)); xpaned->priv->saved_focus = widget; if (xpaned->priv->saved_focus) g_object_add_weak_pointer (G_OBJECT (xpaned->priv->saved_focus), (gpointer *) & (xpaned->priv->saved_focus)); } static void gtk_xpaned_set_first_xpaned (GtkXPaned * xpaned, GtkXPaned * first_xpaned) { if (xpaned->priv->first_xpaned) g_object_remove_weak_pointer (G_OBJECT (xpaned->priv->first_xpaned), (gpointer *) & (xpaned->priv-> first_xpaned)); xpaned->priv->first_xpaned = first_xpaned; if (xpaned->priv->first_xpaned) g_object_add_weak_pointer (G_OBJECT (xpaned->priv->first_xpaned), (gpointer *) & (xpaned->priv->first_xpaned)); } static void gtk_xpaned_set_last_top_left_child_focus (GtkXPaned * xpaned, GtkWidget * widget) { if (xpaned->last_top_left_child_focus) g_object_remove_weak_pointer (G_OBJECT (xpaned->last_top_left_child_focus), (gpointer *) & (xpaned-> last_top_left_child_focus)); xpaned->last_top_left_child_focus = widget; if (xpaned->last_top_left_child_focus) g_object_add_weak_pointer (G_OBJECT (xpaned->last_top_left_child_focus), (gpointer *) & (xpaned-> last_top_left_child_focus)); } static void gtk_xpaned_set_last_top_right_child_focus (GtkXPaned * xpaned, GtkWidget * widget) { if (xpaned->last_top_right_child_focus) g_object_remove_weak_pointer (G_OBJECT (xpaned->last_top_right_child_focus), (gpointer *) & (xpaned-> last_top_right_child_focus)); xpaned->last_top_right_child_focus = widget; if (xpaned->last_top_right_child_focus) g_object_add_weak_pointer (G_OBJECT (xpaned->last_top_right_child_focus), (gpointer *) & (xpaned-> last_top_right_child_focus)); } static void gtk_xpaned_set_last_bottom_left_child_focus (GtkXPaned * xpaned, GtkWidget * widget) { if (xpaned->last_bottom_left_child_focus) g_object_remove_weak_pointer (G_OBJECT (xpaned->last_bottom_left_child_focus), (gpointer *) & (xpaned-> last_bottom_left_child_focus)); xpaned->last_bottom_left_child_focus = widget; if (xpaned->last_bottom_left_child_focus) g_object_add_weak_pointer (G_OBJECT (xpaned->last_bottom_left_child_focus), (gpointer *) & (xpaned-> last_bottom_left_child_focus)); } static void gtk_xpaned_set_last_bottom_right_child_focus (GtkXPaned * xpaned, GtkWidget * widget) { if (xpaned->last_bottom_right_child_focus) g_object_remove_weak_pointer (G_OBJECT (xpaned->last_bottom_right_child_focus), (gpointer *) & (xpaned-> last_bottom_right_child_focus)); xpaned->last_bottom_right_child_focus = widget; if (xpaned->last_bottom_right_child_focus) g_object_add_weak_pointer (G_OBJECT (xpaned->last_bottom_right_child_focus), (gpointer *) & (xpaned-> last_bottom_right_child_focus)); } static GtkWidget * xpaned_get_focus_widget (GtkXPaned * xpaned) { GtkWidget *toplevel; toplevel = gtk_widget_get_toplevel (GTK_WIDGET (xpaned)); if (gtk_widget_is_toplevel (toplevel)) return gtk_window_get_focus (GTK_WINDOW (toplevel)); return NULL; } static void gtk_xpaned_set_focus_child (GtkContainer * container, GtkWidget * focus_child) { GtkXPaned *xpaned; g_return_if_fail (GTK_IS_XPANED (container)); xpaned = GTK_XPANED (container); if (focus_child == NULL) { GtkWidget *last_focus; GtkWidget *w; last_focus = xpaned_get_focus_widget (xpaned); if (last_focus) { /* If there is one or more paned widgets between us and the * focus widget, we want the topmost of those as last_focus */ for (w = last_focus; w != GTK_WIDGET (xpaned); w = gtk_widget_get_parent (w)) if (GTK_IS_XPANED (w)) last_focus = w; if (gtk_container_get_focus_child (container) == xpaned->top_left_child) gtk_xpaned_set_last_top_left_child_focus (xpaned, last_focus); else if (gtk_container_get_focus_child (container) == xpaned->top_right_child) gtk_xpaned_set_last_top_right_child_focus (xpaned, last_focus); else if (gtk_container_get_focus_child (container) == xpaned->bottom_left_child) gtk_xpaned_set_last_bottom_left_child_focus (xpaned, last_focus); else if (gtk_container_get_focus_child (container) == xpaned->bottom_right_child) gtk_xpaned_set_last_bottom_right_child_focus (xpaned, last_focus); } } if (parent_class->set_focus_child) (*parent_class->set_focus_child) (container, focus_child); } static void gtk_xpaned_get_cycle_chain (GtkXPaned * xpaned, GtkDirectionType direction, GList ** widgets) { GtkContainer *container = GTK_CONTAINER (xpaned); GtkWidget *ancestor = NULL; GList *temp_list = NULL; GList *list; if (xpaned->in_recursion) return; g_assert (widgets != NULL); if (xpaned->last_top_left_child_focus && !gtk_widget_is_ancestor (xpaned->last_top_left_child_focus, GTK_WIDGET (xpaned))) { gtk_xpaned_set_last_top_left_child_focus (xpaned, NULL); } if (xpaned->last_top_right_child_focus && !gtk_widget_is_ancestor (xpaned->last_top_right_child_focus, GTK_WIDGET (xpaned))) { gtk_xpaned_set_last_top_right_child_focus (xpaned, NULL); } if (xpaned->last_bottom_left_child_focus && !gtk_widget_is_ancestor (xpaned->last_bottom_left_child_focus, GTK_WIDGET (xpaned))) { gtk_xpaned_set_last_bottom_left_child_focus (xpaned, NULL); } if (xpaned->last_bottom_right_child_focus && !gtk_widget_is_ancestor (xpaned->last_bottom_right_child_focus, GTK_WIDGET (xpaned))) { gtk_xpaned_set_last_bottom_right_child_focus (xpaned, NULL); } if (gtk_widget_get_parent (GTK_WIDGET (xpaned))) ancestor = gtk_widget_get_ancestor (gtk_widget_get_parent (GTK_WIDGET (xpaned)), GTK_TYPE_XPANED); /* The idea here is that temp_list is a list of widgets we want to cycle * to. The list is prioritized so that the first element is our first * choice, the next our second, and so on. * * We can't just use g_list_reverse(), because we want to try * paned->last_child?_focus before paned->child?, both when we * are going forward and backward. */ if (direction == GTK_DIR_TAB_FORWARD) { if (gtk_container_get_focus_child (container) == xpaned->top_left_child) { temp_list = g_list_append (temp_list, xpaned->last_top_right_child_focus); temp_list = g_list_append (temp_list, xpaned->top_right_child); temp_list = g_list_append (temp_list, ancestor); } else if (gtk_container_get_focus_child (container) == xpaned->top_right_child) { temp_list = g_list_append (temp_list, ancestor); temp_list = g_list_append (temp_list, xpaned->last_bottom_left_child_focus); temp_list = g_list_append (temp_list, xpaned->bottom_left_child); } else if (gtk_container_get_focus_child (container) == xpaned->bottom_left_child) { temp_list = g_list_append (temp_list, ancestor); temp_list = g_list_append (temp_list, xpaned->last_bottom_right_child_focus); temp_list = g_list_append (temp_list, xpaned->bottom_right_child); } else if (gtk_container_get_focus_child (container) == xpaned->bottom_right_child) { temp_list = g_list_append (temp_list, ancestor); temp_list = g_list_append (temp_list, xpaned->last_top_left_child_focus); temp_list = g_list_append (temp_list, xpaned->top_left_child); } else { temp_list = g_list_append (temp_list, xpaned->last_top_left_child_focus); temp_list = g_list_append (temp_list, xpaned->top_left_child); temp_list = g_list_append (temp_list, xpaned->last_top_right_child_focus); temp_list = g_list_append (temp_list, xpaned->top_right_child); temp_list = g_list_append (temp_list, xpaned->last_bottom_left_child_focus); temp_list = g_list_append (temp_list, xpaned->bottom_left_child); temp_list = g_list_append (temp_list, xpaned->last_bottom_right_child_focus); temp_list = g_list_append (temp_list, xpaned->bottom_right_child); temp_list = g_list_append (temp_list, ancestor); } } else { if (gtk_container_get_focus_child (container) == xpaned->top_left_child) { temp_list = g_list_append (temp_list, ancestor); temp_list = g_list_append (temp_list, xpaned->last_top_right_child_focus); temp_list = g_list_append (temp_list, xpaned->top_right_child); } else if (gtk_container_get_focus_child (container) == xpaned->top_right_child) { temp_list = g_list_append (temp_list, xpaned->last_bottom_left_child_focus); temp_list = g_list_append (temp_list, xpaned->bottom_left_child); temp_list = g_list_append (temp_list, ancestor); } else if (gtk_container_get_focus_child (container) == xpaned->bottom_right_child) { temp_list = g_list_append (temp_list, xpaned->last_bottom_left_child_focus); temp_list = g_list_append (temp_list, xpaned->bottom_left_child); temp_list = g_list_append (temp_list, ancestor); } else if (gtk_container_get_focus_child (container) == xpaned->top_right_child) { temp_list = g_list_append (temp_list, xpaned->last_bottom_left_child_focus); temp_list = g_list_append (temp_list, xpaned->bottom_left_child); temp_list = g_list_append (temp_list, ancestor); } else { temp_list = g_list_append (temp_list, xpaned->last_bottom_right_child_focus); temp_list = g_list_append (temp_list, xpaned->bottom_right_child); temp_list = g_list_append (temp_list, xpaned->last_bottom_left_child_focus); temp_list = g_list_append (temp_list, xpaned->bottom_left_child); temp_list = g_list_append (temp_list, xpaned->last_top_right_child_focus); temp_list = g_list_append (temp_list, xpaned->top_right_child); temp_list = g_list_append (temp_list, xpaned->last_top_left_child_focus); temp_list = g_list_append (temp_list, xpaned->top_left_child); temp_list = g_list_append (temp_list, ancestor); } } /* Walk the list and expand all the paned widgets. */ for (list = temp_list; list != NULL; list = list->next) { GtkWidget *widget = list->data; if (widget) { if (GTK_IS_XPANED (widget)) { xpaned->in_recursion = TRUE; gtk_xpaned_get_cycle_chain (GTK_XPANED (widget), direction, widgets); xpaned->in_recursion = FALSE; } else { *widgets = g_list_append (*widgets, widget); } } } g_list_free (temp_list); } static gboolean gtk_xpaned_cycle_child_focus (GtkXPaned * xpaned, gboolean reversed) { GList *cycle_chain = NULL; GList *list; GtkDirectionType direction = reversed ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD; /* ignore f6 if the handle is focused */ if (gtk_widget_is_focus (GTK_WIDGET (xpaned))) return TRUE; /* we can't just let the event propagate up the hierarchy, * because the paned will want to cycle focus _unless_ an * ancestor paned handles the event */ gtk_xpaned_get_cycle_chain (xpaned, direction, &cycle_chain); for (list = cycle_chain; list != NULL; list = list->next) if (gtk_widget_child_focus (GTK_WIDGET (list->data), direction)) break; g_list_free (cycle_chain); return TRUE; } static void get_child_xpanes (GtkWidget * widget, GList ** xpanes) { if (GTK_IS_XPANED (widget)) { GtkXPaned *xpaned = GTK_XPANED (widget); get_child_xpanes (xpaned->top_left_child, xpanes); *xpanes = g_list_prepend (*xpanes, widget); get_child_xpanes (xpaned->top_right_child, xpanes); *xpanes = g_list_prepend (*xpanes, widget); get_child_xpanes (xpaned->bottom_left_child, xpanes); *xpanes = g_list_prepend (*xpanes, widget); get_child_xpanes (xpaned->bottom_right_child, xpanes); } else if (GTK_IS_CONTAINER (widget)) { gtk_container_foreach (GTK_CONTAINER (widget), (GtkCallback) get_child_xpanes, xpanes); } } static GList * get_all_xpanes (GtkXPaned * xpaned) { GtkXPaned *topmost = NULL; GList *result = NULL; GtkWidget *w; for (w = GTK_WIDGET (xpaned); w != NULL; w = gtk_widget_get_parent (w)) { if (GTK_IS_XPANED (w)) topmost = GTK_XPANED (w); } g_assert (topmost); get_child_xpanes (GTK_WIDGET (topmost), &result); return g_list_reverse (result); } static void gtk_xpaned_find_neighbours (GtkXPaned * xpaned, GtkXPaned ** next, GtkXPaned ** prev) { GList *all_xpanes; GList *this_link; all_xpanes = get_all_xpanes (xpaned); g_assert (all_xpanes); this_link = g_list_find (all_xpanes, xpaned); g_assert (this_link); if (this_link->next) *next = this_link->next->data; else *next = all_xpanes->data; if (this_link->prev) *prev = this_link->prev->data; else *prev = g_list_last (all_xpanes)->data; g_list_free (all_xpanes); } static gboolean gtk_xpaned_move_handle (GtkXPaned * xpaned, GtkScrollType scroll) { if (gtk_widget_is_focus (GTK_WIDGET (xpaned))) { GdkPoint old_position; GdkPoint new_position; gint increment; enum { SINGLE_STEP_SIZE = 1, PAGE_STEP_SIZE = 75 }; new_position.x = old_position.x = gtk_xpaned_get_position_x (xpaned); new_position.y = old_position.y = gtk_xpaned_get_position_y (xpaned); increment = 0; switch (scroll) { case GTK_SCROLL_STEP_LEFT: case GTK_SCROLL_STEP_UP: case GTK_SCROLL_STEP_BACKWARD: increment = -SINGLE_STEP_SIZE; break; case GTK_SCROLL_STEP_RIGHT: case GTK_SCROLL_STEP_DOWN: case GTK_SCROLL_STEP_FORWARD: increment = SINGLE_STEP_SIZE; break; case GTK_SCROLL_PAGE_LEFT: case GTK_SCROLL_PAGE_UP: case GTK_SCROLL_PAGE_BACKWARD: increment = -PAGE_STEP_SIZE; break; case GTK_SCROLL_PAGE_RIGHT: case GTK_SCROLL_PAGE_DOWN: case GTK_SCROLL_PAGE_FORWARD: increment = PAGE_STEP_SIZE; break; case GTK_SCROLL_START: new_position.x = xpaned->min_position.x; new_position.y = xpaned->min_position.y; break; case GTK_SCROLL_END: new_position.x = xpaned->max_position.x; new_position.y = xpaned->max_position.y; break; default: break; } if (increment) { if (is_rtl (xpaned)) increment = -increment; new_position.x = old_position.x + increment; new_position.y = old_position.y + increment; } new_position.x = CLAMP (new_position.x, xpaned->min_position.x, xpaned->max_position.x); new_position.y = CLAMP (new_position.y, xpaned->min_position.y, xpaned->max_position.y); if (old_position.x != new_position.x) gtk_xpaned_set_position_x (xpaned, new_position.x); if (old_position.y != new_position.y) gtk_xpaned_set_position_y (xpaned, new_position.y); return TRUE; } return FALSE; } static void gtk_xpaned_restore_focus (GtkXPaned * xpaned) { if (gtk_widget_is_focus (GTK_WIDGET (xpaned))) { if (xpaned->priv->saved_focus && gtk_widget_get_sensitive (xpaned->priv->saved_focus)) { gtk_widget_grab_focus (xpaned->priv->saved_focus); } else { /* the saved focus is somehow not available for focusing, * try * 1) tabbing into the paned widget * if that didn't work, * 2) unset focus for the window if there is one */ if (!gtk_widget_child_focus (GTK_WIDGET (xpaned), GTK_DIR_TAB_FORWARD)) { GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (xpaned)); if (GTK_IS_WINDOW (toplevel)) gtk_window_set_focus (GTK_WINDOW (toplevel), NULL); } } gtk_xpaned_set_saved_focus (xpaned, NULL); gtk_xpaned_set_first_xpaned (xpaned, NULL); } } static gboolean gtk_xpaned_accept_position (GtkXPaned * xpaned) { if (gtk_widget_is_focus (GTK_WIDGET (xpaned))) { xpaned->original_position.x = -1; xpaned->original_position.y = -1; gtk_xpaned_restore_focus (xpaned); return TRUE; } return FALSE; } static gboolean gtk_xpaned_cancel_position (GtkXPaned * xpaned) { if (gtk_widget_is_focus (GTK_WIDGET (xpaned))) { if (xpaned->original_position.x != -1) { gtk_xpaned_set_position_x (xpaned, xpaned->original_position.x); xpaned->original_position.x = -1; } if (xpaned->original_position.y != -1) { gtk_xpaned_set_position_y (xpaned, xpaned->original_position.y); xpaned->original_position.y = -1; } gtk_xpaned_restore_focus (xpaned); return TRUE; } return FALSE; } static gboolean gtk_xpaned_cycle_handle_focus (GtkXPaned * xpaned, gboolean reversed) { GtkXPaned *next; GtkXPaned *prev; if (gtk_widget_is_focus (GTK_WIDGET (xpaned))) { GtkXPaned *focus = NULL; if (!xpaned->priv->first_xpaned) { /* The first_pane has disappeared. As an ad-hoc solution, * we make the currently focused paned the first_paned. To the * user this will seem like the paned cycling has been reset. */ gtk_xpaned_set_first_xpaned (xpaned, xpaned); } gtk_xpaned_find_neighbours (xpaned, &next, &prev); if (reversed && prev && prev != xpaned && xpaned != xpaned->priv->first_xpaned) { focus = prev; } else if (!reversed && next && next != xpaned && next != xpaned->priv->first_xpaned) { focus = next; } else { gtk_xpaned_accept_position (xpaned); return TRUE; } g_assert (focus); gtk_xpaned_set_saved_focus (focus, xpaned->priv->saved_focus); gtk_xpaned_set_first_xpaned (focus, xpaned->priv->first_xpaned); gtk_xpaned_set_saved_focus (xpaned, NULL); gtk_xpaned_set_first_xpaned (xpaned, NULL); gtk_widget_grab_focus (GTK_WIDGET (focus)); if (!gtk_widget_is_focus (GTK_WIDGET (xpaned))) { xpaned->original_position.x = -1; xpaned->original_position.y = -1; focus->original_position.x = gtk_xpaned_get_position_x (focus); focus->original_position.y = gtk_xpaned_get_position_y (focus); } } else { GtkContainer *container = GTK_CONTAINER (xpaned); GtkXPaned *focus; GtkXPaned *first; GtkXPaned *prev; GtkXPaned *next; GtkWidget *toplevel; gtk_xpaned_find_neighbours (xpaned, &next, &prev); if (gtk_container_get_focus_child (container) == xpaned->top_left_child) { if (reversed) { focus = prev; first = xpaned; } else { focus = xpaned; first = xpaned; } } else if (gtk_container_get_focus_child (container) == xpaned->top_right_child) { if (reversed) { focus = xpaned; first = next; } else { focus = next; first = next; } } else { /* Focus is not inside this xpaned, and we don't have focus. * Presumably this happened because the application wants us * to start keyboard navigating. */ focus = xpaned; if (reversed) first = xpaned; else first = next; } toplevel = gtk_widget_get_toplevel (GTK_WIDGET (xpaned)); if (GTK_IS_WINDOW (toplevel)) gtk_xpaned_set_saved_focus (focus, gtk_window_get_focus (GTK_WINDOW (toplevel))); gtk_xpaned_set_first_xpaned (focus, first); focus->original_position.x = gtk_xpaned_get_position_x (focus); focus->original_position.y = gtk_xpaned_get_position_y (focus); gtk_widget_grab_focus (GTK_WIDGET (focus)); } return TRUE; } static gboolean gtk_xpaned_toggle_handle_focus (GtkXPaned * xpaned) { /* This function/signal has the wrong name. It is called when you * press Tab or Shift-Tab and what we do is act as if * the user pressed Return and then Tab or Shift-Tab */ if (gtk_widget_is_focus (GTK_WIDGET (xpaned))) gtk_xpaned_accept_position (xpaned); return FALSE; } /*#define __GTK_XPANED_C__*/ /*#include "gtkaliasdef.c"*/ pspp-1.0.1/lib/gtk-contrib/automake.mk0000644000175000017500000000214213137223525014546 00000000000000# PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # ## Process this file with automake to produce Makefile.in -*- makefile -*- noinst_LIBRARIES += lib/gtk-contrib/libxpaned.a lib_gtk_contrib_libxpaned_a_CFLAGS = $(GTK_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1 lib_gtk_contrib_libxpaned_a_SOURCES = \ lib/gtk-contrib/gtkxpaned.c \ lib/gtk-contrib/gtkxpaned.h EXTRA_DIST += \ lib/gtk-contrib/README \ lib/gtk-contrib/COPYING.LESSER pspp-1.0.1/lib/gtk-contrib/COPYING.LESSER0000644000175000017500000006350012470242642014443 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! pspp-1.0.1/pspp-mode.el0000644000175000017500000003670412470242642011657 00000000000000;;; pspp-mode-el -- Major mode for editing PSPP files ;; Copyright (C) 2005 Free Software Foundation ;; Created: 05 March 2005 ;; Keywords: PSPP major-mode ;; Based on the example wpdl-mode.el by Scott Borton ;; Author: Scott Andrew Borton ;; Copyright (C) 2000, 2003 Scott Andrew Borton ;; 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 . ;;; Code: (defvar pspp-mode-hook nil) (defvar pspp-mode-map (let ((pspp-mode-map (make-keymap))) (define-key pspp-mode-map "\C-j" 'newline-and-indent) pspp-mode-map) "Keymap for PSPP major mode") (add-to-list 'auto-mode-alist '("\\.sps\\'" . pspp-mode)) (defun pspp-data-block-p () "Returns t if current line is inside a data block." (save-excursion (let ( (pspp-end-of-block-found nil) (pspp-start-of-block-found nil) ) (beginning-of-line) (while (not (or (or (bobp) pspp-end-of-block-found ) pspp-start-of-block-found ) ) (set 'pspp-end-of-block-found (looking-at "^[ \t]*END[\t ]+DATA\.")) (set 'pspp-start-of-block-found (looking-at "^[ \t]*BEGIN[\t ]+DATA")) (forward-line -1) ) (and pspp-start-of-block-found (not pspp-end-of-block-found)) ) ) ) (defconst pspp-indent-width 2 "size of indent" ) (defconst pspp-indenters (concat "^[\t ]*" (regexp-opt '("DO" "BEGIN" "LOOP" "INPUT") t) "[\t ]+") "constructs which cause indentation" ) (defconst pspp-unindenters (concat "^[\t ]*END[\t ]+" (regexp-opt '("IF" "DATA" "LOOP" "REPEAT" "INPUT") t) "[\t ]*") ;; Note that "END CASE" and "END FILE" do not unindent. "constructs which cause end of indentation" ) (defun pspp-indent-line () "Indent current line as PSPP code." (beginning-of-line) (let ( (verbatim nil) (the-indent 0) ; Default indent to column 0 (case-fold-search t) ) (if (bobp) (setq the-indent 0) ; First line is always non-indented ) (let ( (within-command nil) (blank-line t) ) ;; If the most recent non blank line ended with a `.' then ;; we're at the start of a new command. (save-excursion (while (and blank-line (not (bobp))) (forward-line -1) (if (and (not (pspp-data-block-p)) (not (looking-at "^[ \t]*$"))) (progn (setq blank-line nil) (if (not (looking-at ".*\\.[ \t]*$")) (setq within-command t) ) ) ) ) ) ;; If we're not at the start of a new command, then add an indent. (if within-command (set 'the-indent (+ 1 the-indent)) ) ) ;; Set the indentation according to the DO - END blocks (save-excursion (beginning-of-line) (while (not (bobp)) (beginning-of-line) (if (not (pspp-comment-p)) (cond ( (save-excursion (forward-line -1) (looking-at pspp-indenters) ) (set 'the-indent (+ the-indent 1) ) ) ( (looking-at pspp-unindenters) (set 'the-indent (- the-indent 1) ) ) ) ) (forward-line -1) ) ) (save-excursion (beginning-of-line) (if (looking-at "^[\t ]*ELSE") (set 'the-indent (- the-indent 1))) ) ;; Stuff in the data-blocks should be untouched (if (not (pspp-data-block-p)) (indent-line-to (* pspp-indent-width the-indent))) ) ) (defun pspp-comment-start-line-p () "Returns t if the current line is the first line of a comment, nil otherwise" (beginning-of-line) (or (looking-at "^\*") (looking-at "^[\t ]*COMMENT[\t ]") ) ) (defun pspp-comment-end-line-p () "Returns t if the current line is the candidate for the last line of a comment, nil otherwise" (beginning-of-line) (looking-at ".*\\.[\t ]*$") ) (defun pspp-comment-p () "Returns t if point is in a comment. Nil otherwise." (if (pspp-data-block-p) nil (let ( (pspp-comment-start-found nil) (pspp-comment-end-found nil) (pspp-single-line-comment nil) (lines 1) ) (save-excursion (end-of-line) (while (and (>= lines 0) (not pspp-comment-start-found) (not pspp-comment-end-found) ) (beginning-of-line) (if (pspp-comment-start-line-p) (set 'pspp-comment-start-found t)) (if (bobp) (set 'pspp-comment-end-found nil) (save-excursion (forward-line -1) (if (pspp-comment-end-line-p) (set 'pspp-comment-end-found t)) ) ) (set 'lines (forward-line -1)) ) ) (save-excursion (set 'pspp-single-line-comment (and (pspp-comment-start-line-p) (pspp-comment-end-line-p))) ) (or pspp-single-line-comment (and pspp-comment-start-found (not pspp-comment-end-found))) ) ) ) (defvar pspp-mode-syntax-table (let ( (x-pspp-mode-syntax-table (make-syntax-table)) ) ;; Special chars allowed in variables (modify-syntax-entry ?# "w" x-pspp-mode-syntax-table) (modify-syntax-entry ?@ "w" x-pspp-mode-syntax-table) (modify-syntax-entry ?$ "w" x-pspp-mode-syntax-table) ;; Comment syntax ;; This is incomplete, because: ;; a) Comments can also be given by COMMENT ;; b) The sequence .\n* is interpreted incorrectly. (modify-syntax-entry ?* ". 2" x-pspp-mode-syntax-table) (modify-syntax-entry ?. ". 3" x-pspp-mode-syntax-table) (modify-syntax-entry ?\n "- 41" x-pspp-mode-syntax-table) ;; String delimiters (modify-syntax-entry ?' "\"" x-pspp-mode-syntax-table) (modify-syntax-entry ?" "\"" x-pspp-mode-syntax-table) x-pspp-mode-syntax-table) "Syntax table for pspp-mode") (defconst pspp-font-lock-keywords (list (cons (concat "\\<" (regexp-opt '( "END DATA" "ACF" "ADD FILES" "ADD VALUE LABELS" "AGGREGATE" "ANOVA" "APPLY DICTIONARY" "AREG" "ARIMA" "AUTORECODE" "BEGIN DATA" "BREAK" "CASEPLOT" "CASESTOVARS" "CCF" "CLEAR TRANSFORMATIONS" "CLUSTER" "COMPUTE" "CONJOINT" "CORRELATIONS" "COXREG" "COUNT" "CREATE" "CROSSTABS" "CURVEFIT" "DATA LIST" "DATE" "DEBUG CASEFILE" "DEBUG EVALUATE" "DEBUG MOMENTS" "DEBUG POOL" "DELETE VARIABLES" "DESCRIPTIVES" "DISCRIMINANT" "DISPLAY" "DOCUMENT" "DO IF" "DO REPEAT" "DROP DOCUMENTS" "ECHO" "EDIT" "ELSE" "ELSE IF" "END CASE" "END FILE" "END FILE TYPE" "END IF" "END INPUT PROGRAM" "END LOOP" "END REPEAT" "ERASE" "EXAMINE" "EXECUTE" "EXIT" "EXPORT" "FACTOR" "FILE HANDLE" "FILE LABEL" "FILE TYPE" "FILTER" "FINISH" "FIT" "FLIP" "FORMATS" "FREQUENCIES" "GENLOG" "GET" "GET TRANSLATE" "GLM" "GRAPH" "HILOGLINEAR" "HOST" "IF" "IGRAPH" "IMPORT" "INCLUDE" "INFO" "INPUT MATRIX" "INPUT PROGRAM" "KEYED DATA LIST" "LEAVE" "LIST" "LOGLINEAR" "LOGISITIC REGRESSION" "LOOP" "MATCH FILES" "MATRIX DATA" "MCONVERT" "MEANS" "MISSING VALUES" "MODIFY VARS" "MULT RESPONSE" "MVA" "NEW FILE" "N" "N OF CASES" "NLR" "NONPAR CORR" "NPAR TESTS" "NUMBERED" "NUMERIC" "OLAP CUBES" "OMS" "ONEWAY" "ORTHOPLAN" "PACF" "PARTIAL CORR" "PEARSON CORRELATIONS" "PERMISSIONS" "PLOT" "POINT" "PPLOT" "PREDICT" "PRESERVE" "PRINT EJECT" "PRINT" "PRINT FORMATS" "PRINT SPACE" "PROCEDURE OUTPUT" "PROXIMITIES" "Q" "QUICK CLUSTER" "QUIT" "RANK" "RECODE" "RECORD TYPE" "REFORMAT" "REGRESSION" "RENAME VARIABLES" "REPEATING DATA" "REPORT" "REREAD" "RESTORE" "RMV" "SAMPLE" "SAVE" "SAVE TRANSLATE" "SCRIPT" "SELECT IF" "SET" "SHOW" "SORT CASES" "SORT" "SPCHART" "SPLIT FILE" "STRING" "SUBTITLE" "SUMMARIZE" "SURVIVAL" "SYSFILE INFO" "TEMPORARY" "TITLE" "TSET" "TSHOW" "TSPLOT" "T-TEST" "UNIANOVA" "UNNUMBERED" "UPDATE" "USE" "VALUE LABELS" "VARIABLE ALIGNMENT" "VARIABLE LABELS" "VARIABLE LEVEL" "VARIABLE WIDTH" "VARSTOCASES" "VECTOR" "VERIFY" "WEIGHT" "WRITE" "WRITE FORMATS" "XSAVE") t) "\\>" ) 'font-lock-builtin-face) (cons (concat "\\<" (regexp-opt '( "ALL" "AND" "BY" "EQ" "GE" "GT" "LE" "LT" "NE" "NOT" "OR" "TO" "WITH" ) t ) "\\>") 'font-lock-keyword-face) (cons (concat "\\<" (regexp-opt '( "ABS" "ACOS" "ANY" "ANY" "ARCOS" "ARSIN" "ARTAN" "ASIN" "ATAN" "CDF.BERNOULLI" "CDF.BETA" "CDF.BINOM" "CDF.BVNOR" "CDF.CAUCHY" "CDF.CHISQ" "CDF.EXP" "CDF.F" "CDF.GAMMA" "CDF.GEOM" "CDF.HALFNRM" "CDF.HYPER" "CDF.IGAUSS" "CDF.LAPLACE" "CDF.LNORMAL" "CDF.LOGISTIC" "CDF.NEGBIN" "CDF.NORMAL" "CDF.PARETO" "CDF.POISSON" "CDF.RAYLEIGH" "CDF.SMOD" "CDF.SRANGE" "CDF.T" "CDF.T1G" "CDF.T2G" "CDF.UNIFORM" "CDF.WEIBULL" "CDFNORM" "CFVAR" "CONCAT" "COS" "CTIME.DAYS" "CTIME.HOURS" "CTIME.MINUTES" "CTIME.SECONDS" "DATE.DMY" "DATE.MDY" "DATE.MOYR" "DATE.QYR" "DATE.WKYR" "DATE.YRDAY" "EXP" "IDF.BETA" "IDF.CAUCHY" "IDF.CHISQ" "IDF.EXP" "IDF.F" "IDF.GAMMA" "IDF.HALFNRM" "IDF.IGAUSS" "IDF.LAPLACE" "IDF.LNORMAL" "IDF.LOGISTIC" "IDF.NORMAL" "IDF.PARETO" "IDF.RAYLEIGH" "IDF.SMOD" "IDF.SRANGE" "IDF.T" "IDF.T1G" "IDF.T2G" "IDF.UNIFORM" "IDF.WEIBULL" "INDEX" "INDEX" "LAG" "LAG" "LAG" "LAG" "LENGTH" "LG10" "LN" "LNGAMMA" "LOWER" "LPAD" "LPAD" "LTRIM" "LTRIM" "MAX" "MAX" "MBLEN.BYTE" "MEAN" "MIN" "MIN" "MISSING" "MOD" "MOD10" "NCDF.BETA" "NCDF.CHISQ" "NCDF.F" "NCDF.T" "NMISS" "NORMAL" "NPDF.BETA" "NPDF.CHISQ" "NPDF.F" "NPDF.T" "NUMBER" "NVALID" "PDF.BERNOULLI" "PDF.BETA" "PDF.BINOM" "PDF.BVNOR" "PDF.CAUCHY" "PDF.CHISQ" "PDF.EXP" "PDF.F" "PDF.GAMMA" "PDF.GEOM" "PDF.HALFNRM" "PDF.HYPER" "PDF.IGAUSS" "PDF.LANDAU" "PDF.LAPLACE" "PDF.LNORMAL" "PDF.LOG" "PDF.LOGISTIC" "PDF.NEGBIN" "PDF.NORMAL" "PDF.NTAIL" "PDF.PARETO" "PDF.POISSON" "PDF.RAYLEIGH" "PDF.RTAIL" "PDF.T" "PDF.T1G" "PDF.T2G" "PDF.UNIFORM" "PDF.WEIBULL" "PDF.XPOWER" "PROBIT" "RANGE" "RANGE" "RINDEX" "RINDEX" "RND" "RPAD" "RPAD" "RTRIM" "RTRIM" "RV.BERNOULLI" "RV.BETA" "RV.BINOM" "RV.CAUCHY" "RV.CHISQ" "RV.EXP" "RV.F" "RV.GAMMA" "RV.GEOM" "RV.HALFNRM" "RV.HYPER" "RV.IGAUSS" "RV.LANDAU" "RV.LAPLACE" "RV.LEVY" "RV.LNORMAL" "RV.LOG" "RV.LOGISTIC" "RV.LVSKEW" "RV.NEGBIN" "RV.NORMAL" "RV.NTAIL" "RV.PARETO" "RV.POISSON" "RV.RAYLEIGH" "RV.RTAIL" "RV.T" "RV.T1G" "RV.T2G" "RV.UNIFORM" "RV.WEIBULL" "RV.XPOWER" "SD" "SIG.CHISQ" "SIG.F" "SIN" "SQRT" "STRING" "SUBSTR" "SUBSTR" "SUM" "SYSMIS" "SYSMIS" "TAN" "TIME.DAYS" "TIME.HMS" "TRUNC" "UNIFORM" "UPCASE" "VALUE" "VARIANCE" "XDATE.DATE" "XDATE.HOUR" "XDATE.JDAY" "XDATE.MDAY" "XDATE.MINUTE" "XDATE.MONTH" "XDATE.QUARTER" "XDATE.SECOND" "XDATE.TDAY" "XDATE.TIME" "XDATE.WEEK" "XDATE.WKDAY" "XDATE.YEAR" "YRMODA" ) t) "\\>" ) 'font-lock-function-name-face) '( "\\<[#$@a-zA-Z][a-zA-Z0-9_]*\\>" . font-lock-variable-name-face) ) "Highlighting expressions for PSPP mode.") (defun pspp-mode () (interactive) (kill-all-local-variables) (use-local-map pspp-mode-map) (set-syntax-table pspp-mode-syntax-table) (set (make-local-variable 'font-lock-keywords-case-fold-search) t) (set (make-local-variable 'font-lock-defaults) '(pspp-font-lock-keywords)) (set (make-local-variable 'indent-line-function) 'pspp-indent-line) (set (make-local-variable 'comment-start ) "* ") (set (make-local-variable 'compile-command) (concat "pspp " buffer-file-name )) (setq major-mode 'pspp-mode) (setq mode-name "PSPP") (run-hooks 'pspp-mode-hook)) (provide 'pspp-mode) ;;; pspp-mode.el ends here pspp-1.0.1/ABOUT-NLS0000644000175000017500000027215512470434665010672 000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. 1.1 Quick configuration advice ============================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. 1.2 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the included GNU `gettext' library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might not be desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.3 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.4 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.5 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of May 2010. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar as ast az be be@latin bg bn_IN bs ca crh +---------------------------------------------------+ a2ps | [] [] | aegis | | ant-phone | | anubis | | aspell | [] [] | bash | | bfd | | bibshelf | [] | binutils | | bison | | bison-runtime | [] | bluez-pin | [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] [] | cpio | | cppi | | cpplib | [] | cryptsetup | | dfarc | | dialog | [] [] | dico | | diffutils | [] | dink | | doodle | | e2fsprogs | [] | enscript | [] | exif | | fetchmail | [] | findutils | [] | flex | [] | freedink | | gas | | gawk | [] [] | gcal | [] | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gip | [] | gjay | | gliv | [] | glunarclock | [] [] | gnubiff | | gnucash | [] | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | | gold | | gpe-aerial | | gpe-beam | | gpe-bluetooth | | gpe-calendar | | gpe-clock | [] | gpe-conf | | gpe-contacts | | gpe-edit | | gpe-filemanager | | gpe-go | | gpe-login | | gpe-ownerinfo | [] | gpe-package | | gpe-sketchbook | | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] | gpe-today | [] | gpe-todo | | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | [] [] | gsasl | | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] [] [] | gtick | | gtkam | [] | gtkorphan | [] | gtkspell | [] [] [] | gutenprint | | hello | [] | help2man | | hylafax | | idutils | | indent | [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | | iso_639 | [] [] [] [] [] | iso_639_3 | [] | jwhois | | kbd | | keytouch | [] | keytouch-editor | | keytouch-keyboa... | [] | klavaro | [] | latrine | | ld | [] | leafpad | [] [] | libc | [] [] | libexif | () | libextractor | | libgnutls | | libgpewidget | | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | [] | libidn | | lifelines | | liferea | [] [] | lilypond | | linkdr | [] | lordsawar | | lprng | | lynx | [] | m4 | | mailfromd | | mailutils | | make | | man-db | | man-db-manpages | | minicom | | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | | psmisc | | pspp | [] | pwdutils | | radius | [] | recode | [] [] | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] [] | sed | [] [] | sharutils | [] [] | shishi | | skencil | | solfege | | solfege-manual | | soundtracker | | sp | | sysstat | | tar | [] | texinfo | | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] [] | wyslij-po | | xchat | [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +---------------------------------------------------+ af am ar as ast az be be@latin bg bn_IN bs ca crh 6 0 2 3 19 1 11 3 28 3 1 38 5 cs da de el en en_GB en_ZA eo es et eu fa fi +-------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] () | anubis | [] [] [] | aspell | [] [] [] [] [] | bash | [] [] [] [] | bfd | [] [] | bibshelf | [] [] [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] | bombono-dvd | [] [] | buzztard | [] [] [] | cflow | [] [] [] | clisp | [] [] [] [] | coreutils | [] [] [] [] | cpio | [] | cppi | [] | cpplib | [] [] [] | cryptsetup | [] | dfarc | [] [] [] [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] [] | dink | [] [] [] | doodle | [] | e2fsprogs | [] [] [] | enscript | [] [] [] | exif | () [] [] [] | fetchmail | [] [] () [] [] [] | findutils | [] [] [] [] | flex | [] [] [] | freedink | [] [] [] [] | gas | [] | gawk | [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] | gip | [] [] [] [] [] | gjay | [] [] | gliv | [] [] [] [] | glunarclock | [] [] [] | gnubiff | () | gnucash | [] () () () () () | gnuedu | [] [] | gnulib | [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] [] | gpe-aerial | [] [] [] [] [] | gpe-beam | [] [] [] [] [] | gpe-bluetooth | [] [] [] | gpe-calendar | [] [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] [] | gpe-go | [] [] [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] [] [] [] | gpe-sketchbook | [] [] [] [] [] | gpe-su | [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] | gpe-today | [] [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] [] () [] [] [] [] | gprof | [] [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] [] | grub | [] [] [] | gsasl | [] [] | gss | [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] [] | gstreamer | [] [] [] [] [] [] | gtick | [] () [] [] | gtkam | [] [] () [] [] | gtkorphan | [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] | gutenprint | [] [] [] [] | hello | [] [] [] [] [] | help2man | [] [] | hylafax | [] [] | idutils | [] [] [] | indent | [] [] [] [] [] [] [] [] | iso_15924 | [] () [] [] [] | iso_3166 | [] [] [] () [] [] [] () [] | iso_3166_2 | () | iso_4217 | [] [] [] () [] [] [] | iso_639 | [] [] [] () [] [] [] | iso_639_3 | | jwhois | [] [] | kbd | [] [] [] [] [] | keytouch | [] [] [] | keytouch-editor | [] [] [] | keytouch-keyboa... | [] [] | klavaro | [] [] [] [] | latrine | [] () [] | ld | [] [] [] | leafpad | [] [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] [] () | libextractor | | libgnutls | [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] () | libgphoto2_port | [] () [] | libgsasl | [] | libiconv | [] [] [] [] [] [] | libidn | [] [] [] [] | lifelines | [] () | liferea | [] [] [] [] [] | lilypond | [] [] [] [] | linkdr | [] [] [] [] | lordsawar | [] | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] [] [] | man-db | | man-db-manpages | | minicom | [] [] [] [] [] | mkisofs | [] | myserver | | nano | [] [] [] [] | opcodes | [] [] [] | parted | [] [] | pies | | popt | [] [] [] [] [] [] | psmisc | [] [] [] [] | pspp | [] | pwdutils | [] | radius | [] | recode | [] [] [] [] [] [] [] | rosegarden | () () () () | rpm | [] [] [] | rush | | sarg | | screem | | scrollkeeper | [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] | shishi | | skencil | [] () [] | solfege | [] [] [] [] | solfege-manual | [] [] | soundtracker | [] [] [] | sp | [] | sysstat | [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | tin | [] [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] [] | vice | () () | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] [] | wget | [] [] [] [] | wyslij-po | [] | xchat | [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] | +-------------------------------------------------+ cs da de el en en_GB en_ZA eo es et eu fa fi 64 105 117 18 1 8 0 28 89 18 19 0 104 fr ga gl gu he hi hr hu hy id is it ja ka kn +------------------------------------------------+ a2ps | [] [] [] | aegis | [] [] | ant-phone | [] [] | anubis | [] [] [] | aspell | [] [] [] [] | bash | [] [] [] | bfd | [] [] | bibshelf | [] [] [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] | bombono-dvd | | buzztard | [] | cflow | [] [] | clisp | [] | coreutils | [] [] [] [] [] | cpio | [] [] [] | cppi | [] | cpplib | [] [] | cryptsetup | [] [] [] | dfarc | [] [] | dialog | [] [] [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] [] [] | dink | [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] | exif | [] [] [] [] [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] | freedink | [] [] | gas | [] [] | gawk | [] [] [] [] () [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] [] | gjay | | gliv | () | glunarclock | [] [] [] | gnubiff | () [] () | gnucash | () () () () [] | gnuedu | [] [] | gnulib | [] [] [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] | gpe-aerial | [] [] | gpe-beam | [] [] [] | gpe-bluetooth | [] [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] [] [] | gpe-edit | [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] | gpe-su | [] [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] | grub | [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] [] | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | [] [] [] [] | gtick | [] [] [] [] | gtkam | [] [] [] [] [] | gtkorphan | [] [] [] | gtkspell | [] [] [] [] [] [] [] [] | gutenprint | [] [] [] | hello | [] [] | help2man | [] | hylafax | [] | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | () [] [] | iso_3166 | () [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | () [] [] [] | iso_4217 | () [] [] [] [] | iso_639 | () [] [] [] [] [] [] [] | iso_639_3 | () [] [] | jwhois | [] [] [] [] | kbd | [] [] | keytouch | [] [] [] [] [] | keytouch-editor | [] [] [] [] | keytouch-keyboa... | [] [] [] [] | klavaro | [] [] | latrine | [] [] | ld | [] [] [] | leafpad | [] [] [] [] [] [] () | libc | [] [] [] [] | libexif | | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] [] | lifelines | () | liferea | [] [] [] [] | lilypond | [] | linkdr | [] [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] [] [] | m4 | [] [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] | man-db | [] [] | man-db-manpages | [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | | nano | [] [] [] [] [] | opcodes | [] [] [] | parted | [] [] [] [] | pies | | popt | [] [] [] [] [] [] [] [] | psmisc | [] [] | pspp | | pwdutils | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] | rosegarden | () () () () | rpm | [] [] | rush | | sarg | [] | screem | [] [] | scrollkeeper | [] [] [] | sed | [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] | shishi | [] | skencil | [] | solfege | [] [] [] | solfege-manual | [] [] | soundtracker | [] [] | sp | [] () | sysstat | [] [] [] [] | tar | [] [] [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux-ng | [] [] [] [] [] | vice | () () () | vmm | [] | vorbis-tools | [] | wastesedge | () () | wdiff | | wget | [] [] [] [] [] [] [] | wyslij-po | [] [] | xchat | [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | +------------------------------------------------+ fr ga gl gu he hi hr hu hy id is it ja ka kn 121 53 20 4 8 2 5 53 2 120 5 83 66 0 4 ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne +-----------------------------------------------+ a2ps | [] | aegis | | ant-phone | | anubis | [] [] | aspell | [] | bash | | bfd | | bibshelf | [] [] | binutils | | bison | [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] | cpio | | cppi | | cpplib | | cryptsetup | | dfarc | [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] | dink | | doodle | | e2fsprogs | | enscript | | exif | [] | fetchmail | | findutils | | flex | | freedink | [] | gas | | gawk | | gcal | | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] | gettext-tools | [] | gip | [] [] | gjay | | gliv | | glunarclock | [] | gnubiff | | gnucash | () () () () | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | [] | gold | | gpe-aerial | [] | gpe-beam | [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] | gpe-timesheet | [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | | gsasl | | gss | | gst-plugins-bad | [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | | gtick | | gtkam | [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | | hello | [] [] [] | help2man | | hylafax | | idutils | | indent | | iso_15924 | [] [] | iso_3166 | [] [] () [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] | iso_639 | [] [] | iso_639_3 | [] | jwhois | [] | kbd | | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | klavaro | [] | latrine | [] | ld | | leafpad | [] [] [] | libc | [] | libexif | | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | | libidn | | lifelines | | liferea | | lilypond | | linkdr | | lordsawar | | lprng | | lynx | | m4 | | mailfromd | | mailutils | | make | [] | man-db | | man-db-manpages | | minicom | [] | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | [] [] [] | psmisc | | pspp | | pwdutils | | radius | | recode | | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] | sed | | sharutils | | shishi | | skencil | | solfege | [] | solfege-manual | | soundtracker | | sp | | sysstat | [] | tar | [] | texinfo | [] | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] | wyslij-po | | xchat | [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +-----------------------------------------------+ ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne 20 5 10 1 12 48 4 2 2 4 24 10 19 3 1 nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr +---------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] [] | anubis | [] [] [] | aspell | [] [] [] [] [] | bash | [] [] | bfd | [] | bibshelf | [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] () | buzztard | [] [] | cflow | [] | clisp | [] [] | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cppi | [] | cpplib | [] | cryptsetup | [] | dfarc | [] | dialog | [] [] [] [] | dico | [] | diffutils | [] [] [] [] [] [] | dink | () | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | exif | [] [] [] () [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] [] | freedink | [] [] | gas | | gawk | [] [] [] [] | gcal | | gcc | [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] | gip | [] [] [] [] [] | gjay | | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] | gnubiff | [] () | gnucash | [] () () () | gnuedu | [] | gnulib | [] [] [] [] | gnunet | | gnunet-gtk | | gnutls | [] [] | gold | | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] [] | gphoto2 | [] [] [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | grub | [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] [] [] | gutenprint | [] [] | hello | [] [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] [] [] [] | iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | iso_3166_2 | [] [] [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] [] [] | keytouch-editor | [] [] [] | keytouch-keyboa... | [] [] [] | klavaro | [] [] | latrine | [] [] | ld | | leafpad | [] [] [] [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] | libgphoto2_port | [] [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] | lifelines | [] [] | liferea | [] [] [] [] [] () () [] | lilypond | [] | linkdr | [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] | make | [] [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | | nano | [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | pies | [] | popt | [] [] [] [] | psmisc | [] [] [] | pspp | [] [] | pwdutils | [] | radius | [] [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () | rpm | [] [] [] | rush | [] [] | sarg | | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] [] [] [] | solfege-manual | [] [] [] | soundtracker | [] | sp | | sysstat | [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] [] | vice | [] | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] | +---------------------------------------------------+ nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr 135 10 4 7 105 1 29 61 47 91 3 55 47 8 37 sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW +---------------------------------------------------+ a2ps | [] [] [] [] [] | 27 aegis | [] | 9 ant-phone | [] [] [] [] | 9 anubis | [] [] [] [] | 15 aspell | [] [] [] | 20 bash | [] [] | 11 bfd | [] | 6 bibshelf | [] [] [] | 16 binutils | [] [] | 8 bison | [] [] | 12 bison-runtime | [] [] [] [] [] [] | 29 bluez-pin | [] [] [] [] [] [] [] [] | 37 bombono-dvd | [] | 4 buzztard | [] | 7 cflow | [] [] [] | 9 clisp | | 10 coreutils | [] [] [] [] | 22 cpio | [] [] [] [] [] [] | 13 cppi | [] [] | 5 cpplib | [] [] [] [] [] [] | 13 cryptsetup | [] [] | 7 dfarc | [] | 9 dialog | [] [] [] [] [] [] [] | 30 dico | [] | 2 diffutils | [] [] [] [] [] [] | 30 dink | | 4 doodle | [] [] | 7 e2fsprogs | [] [] [] | 11 enscript | [] [] [] [] | 17 exif | [] [] [] | 16 fetchmail | [] [] [] | 17 findutils | [] [] [] [] [] | 20 flex | [] [] [] [] | 15 freedink | [] | 10 gas | [] | 4 gawk | [] [] [] [] | 18 gcal | [] [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] [] | 34 gettext-runtime | [] [] [] [] [] [] [] | 30 gettext-tools | [] [] [] [] [] [] | 22 gip | [] [] [] [] | 22 gjay | [] | 3 gliv | [] [] [] | 14 glunarclock | [] [] [] [] [] | 19 gnubiff | [] [] | 4 gnucash | () [] () () | 9 gnuedu | [] [] | 7 gnulib | [] [] [] [] | 16 gnunet | [] | 1 gnunet-gtk | [] [] [] | 5 gnutls | [] [] [] | 10 gold | [] | 4 gpe-aerial | [] [] [] | 18 gpe-beam | [] [] [] | 19 gpe-bluetooth | [] [] [] | 13 gpe-calendar | [] [] [] [] | 12 gpe-clock | [] [] [] [] [] | 28 gpe-conf | [] [] [] [] | 20 gpe-contacts | [] [] [] | 17 gpe-edit | [] [] [] | 12 gpe-filemanager | [] [] [] [] | 16 gpe-go | [] [] [] [] [] | 25 gpe-login | [] [] [] | 11 gpe-ownerinfo | [] [] [] [] [] | 25 gpe-package | [] [] [] | 13 gpe-sketchbook | [] [] [] | 20 gpe-su | [] [] [] [] [] | 30 gpe-taskmanager | [] [] [] [] [] | 29 gpe-timesheet | [] [] [] [] [] | 25 gpe-today | [] [] [] [] [] [] | 30 gpe-todo | [] [] [] [] | 17 gphoto2 | [] [] [] [] [] | 24 gprof | [] [] [] | 15 gpsdrive | [] [] [] | 11 gramadoir | [] [] [] | 11 grep | [] [] [] | 10 grub | [] [] [] | 14 gsasl | [] [] [] [] | 14 gss | [] [] [] | 11 gst-plugins-bad | [] [] [] [] | 22 gst-plugins-base | [] [] [] [] [] | 24 gst-plugins-good | [] [] [] [] [] | 25 gst-plugins-ugly | [] [] [] [] [] | 29 gstreamer | [] [] [] [] | 22 gtick | [] [] [] | 13 gtkam | [] [] [] | 20 gtkorphan | [] [] [] | 14 gtkspell | [] [] [] [] [] [] [] [] [] | 45 gutenprint | [] | 10 hello | [] [] [] [] [] [] | 21 help2man | [] [] | 7 hylafax | [] | 5 idutils | [] [] [] [] | 17 indent | [] [] [] [] [] [] | 30 iso_15924 | () [] () [] [] | 16 iso_3166 | [] [] () [] [] () [] [] [] () | 53 iso_3166_2 | () [] () [] | 9 iso_4217 | [] () [] [] () [] [] | 26 iso_639 | [] [] [] () [] () [] [] [] [] | 38 iso_639_3 | [] () | 8 jwhois | [] [] [] [] [] | 16 kbd | [] [] [] [] [] | 15 keytouch | [] [] [] | 16 keytouch-editor | [] [] [] | 14 keytouch-keyboa... | [] [] [] | 14 klavaro | [] | 11 latrine | [] [] [] | 10 ld | [] [] [] [] | 11 leafpad | [] [] [] [] [] [] | 33 libc | [] [] [] [] [] | 21 libexif | [] () | 6 libextractor | [] | 1 libgnutls | [] [] [] | 9 libgpewidget | [] [] [] | 14 libgpg-error | [] [] [] | 9 libgphoto2 | [] [] | 8 libgphoto2_port | [] [] [] [] | 13 libgsasl | [] [] [] | 13 libiconv | [] [] [] [] | 21 libidn | () [] [] | 11 lifelines | [] | 4 liferea | [] [] [] | 21 lilypond | [] | 7 linkdr | [] [] [] [] [] | 17 lordsawar | | 1 lprng | [] | 3 lynx | [] [] [] [] | 17 m4 | [] [] [] [] | 19 mailfromd | [] [] | 3 mailutils | [] | 5 make | [] [] [] [] | 21 man-db | [] [] [] | 8 man-db-manpages | | 4 minicom | [] [] | 16 mkisofs | [] [] | 9 myserver | | 0 nano | [] [] [] [] | 21 opcodes | [] [] [] | 11 parted | [] [] [] [] [] | 15 pies | [] [] | 3 popt | [] [] [] [] [] [] | 27 psmisc | [] [] | 11 pspp | | 4 pwdutils | [] [] | 6 radius | [] [] | 9 recode | [] [] [] [] | 28 rosegarden | () | 0 rpm | [] [] [] | 11 rush | [] [] | 4 sarg | | 1 screem | [] | 3 scrollkeeper | [] [] [] [] [] | 27 sed | [] [] [] [] [] | 30 sharutils | [] [] [] [] [] | 22 shishi | [] | 3 skencil | [] [] | 7 solfege | [] [] [] [] | 16 solfege-manual | [] | 8 soundtracker | [] [] [] | 9 sp | [] | 3 sysstat | [] [] | 15 tar | [] [] [] [] [] [] | 23 texinfo | [] [] [] [] | 16 tin | | 4 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux-ng | [] [] [] [] | 20 vice | () () | 1 vmm | [] | 4 vorbis-tools | [] | 6 wastesedge | | 2 wdiff | [] [] | 7 wget | [] [] [] [] [] | 26 wyslij-po | [] [] | 8 xchat | [] [] [] [] [] [] | 36 xdg-user-dirs | [] [] [] [] [] [] [] [] [] | 60 xkeyboard-config | [] [] [] [] | 25 +---------------------------------------------------+ 84 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW 178 domains 119 1 3 2 0 10 66 50 155 17 97 7 41 2610 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If May 2010 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.6 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. pspp-1.0.1/Makefile.in0000644000175000017500000424307213150617707011504 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # Makefile variables for PO directory in any package using GNU gettext. # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # PSPP VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @cc_is_gcc_TRUE@am__append_1 = -Wall -W -Wwrite-strings -Wstrict-prototypes \ @cc_is_gcc_TRUE@-Wpointer-arith -Wno-sign-compare -Wmissing-prototypes noinst_PROGRAMS = $(am__EXEEXT_2) check_PROGRAMS = tests/data/datasheet-test$(EXEEXT) \ tests/data/sack$(EXEEXT) tests/data/inexactify$(EXEEXT) \ tests/language/lexer/command-name-test$(EXEEXT) \ tests/language/lexer/scan-test$(EXEEXT) \ tests/language/lexer/segment-test$(EXEEXT) \ tests/libpspp/abt-test$(EXEEXT) tests/libpspp/bt-test$(EXEEXT) \ tests/libpspp/cmac-aes256-test$(EXEEXT) \ tests/libpspp/encoding-guesser-test$(EXEEXT) \ tests/libpspp/heap-test$(EXEEXT) \ tests/libpspp/hmap-test$(EXEEXT) \ tests/libpspp/hmapx-test$(EXEEXT) \ tests/libpspp/i18n-test$(EXEEXT) \ tests/libpspp/line-reader-test$(EXEEXT) \ tests/libpspp/ll-test$(EXEEXT) tests/libpspp/llx-test$(EXEEXT) \ tests/libpspp/range-map-test$(EXEEXT) \ tests/libpspp/range-set-test$(EXEEXT) \ tests/libpspp/range-tower-test$(EXEEXT) \ tests/libpspp/sparse-array-test$(EXEEXT) \ tests/libpspp/sparse-xarray-test$(EXEEXT) \ tests/libpspp/str-test$(EXEEXT) \ tests/libpspp/string-map-test$(EXEEXT) \ tests/libpspp/stringi-map-test$(EXEEXT) \ tests/libpspp/string-set-test$(EXEEXT) \ tests/libpspp/stringi-set-test$(EXEEXT) \ tests/libpspp/tower-test$(EXEEXT) \ tests/libpspp/u8-istream-test$(EXEEXT) \ tests/libpspp/zip-test$(EXEEXT) \ tests/math/chart-get-ticks-format-test$(EXEEXT) \ tests/math/chart-get-scale-test$(EXEEXT) \ tests/output/render-test$(EXEEXT) \ tests/ui/syntax-gen-test$(EXEEXT) \ tests/language/lexer/command-name-test$(EXEEXT) \ tests/language/lexer/scan-test$(EXEEXT) \ tests/language/lexer/segment-test$(EXEEXT) \ tests/libpspp/zip-test$(EXEEXT) \ tests/math/chart-get-scale-test$(EXEEXT) \ tests/math/chart-get-ticks-format-test$(EXEEXT) \ tests/output/render-test$(EXEEXT) \ tests/ui/syntax-gen-test$(EXEEXT) bin_PROGRAMS = src/ui/terminal/pspp$(EXEEXT) $(am__EXEEXT_1) \ utilities/pspp-dump-sav$(EXEEXT) \ utilities/pspp-convert$(EXEEXT) @HAVE_GUI_TRUE@am__append_2 = lib/gtk-contrib/libxpaned.a @HAVE_GUI_TRUE@am__append_3 = \ @HAVE_GUI_TRUE@ lib/gtk-contrib/README \ @HAVE_GUI_TRUE@ lib/gtk-contrib/COPYING.LESSER @HAVE_CAIRO_TRUE@am__append_4 = \ @HAVE_CAIRO_TRUE@ src/output/cairo-chart.c \ @HAVE_CAIRO_TRUE@ src/output/cairo-chart.h \ @HAVE_CAIRO_TRUE@ src/output/cairo.c \ @HAVE_CAIRO_TRUE@ src/output/cairo.h \ @HAVE_CAIRO_TRUE@ src/output/charts/boxplot-cairo.c \ @HAVE_CAIRO_TRUE@ src/output/charts/np-plot-cairo.c \ @HAVE_CAIRO_TRUE@ src/output/charts/barchart-cairo.c \ @HAVE_CAIRO_TRUE@ src/output/charts/piechart-cairo.c \ @HAVE_CAIRO_TRUE@ src/output/charts/plot-hist-cairo.c \ @HAVE_CAIRO_TRUE@ src/output/charts/roc-chart-cairo.c \ @HAVE_CAIRO_TRUE@ src/output/charts/scree-cairo.c \ @HAVE_CAIRO_TRUE@ src/output/charts/spreadlevel-cairo.c \ @HAVE_CAIRO_TRUE@ src/output/charts/scatterplot-cairo.c @ODF_WRITE_SUPPORT_TRUE@am__append_5 = src/output/odt.c @RELOCATABLE_VIA_LD_TRUE@am__append_6 = `$(RELOCATABLE_LDFLAGS) $(bindir)` @HAVE_GUI_TRUE@am__append_7 = src/ui/gui/psppire @HAVE_GUI_TRUE@am__append_8 = src/ui/gui/spreadsheet-test @HAVE_GUI_TRUE@@RELOCATABLE_VIA_LD_TRUE@am__append_9 = `$(RELOCATABLE_LDFLAGS) $(bindir)` @HAVE_GUI_TRUE@@RELOCATABLE_VIA_LD_FALSE@am__append_10 = -rpath $(pkglibdir) @HAVE_GUI_TRUE@am__append_11 = install-lang @HAVE_GUI_TRUE@am__append_12 = yelp-check @HAVE_GUI_TRUE@am__append_13 = -Isrc @HAVE_GUI_TRUE@am__append_14 = src/ui/gui/pspp.desktop \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-marshal.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-marshal.h \ @HAVE_GUI_TRUE@ src/ui/gui/resources.c \ @HAVE_GUI_TRUE@ $(nodist_src_ui_gui_psppire_DATA) @HAVE_GUI_TRUE@am__append_15 = src/ui/gui/psppire-marshal.c src/ui/gui/psppire-marshal.h src/ui/gui/resources.c @HAVE_GUI_TRUE@am__append_16 = $(top_srcdir)/src/ui/gui/artwork/splash.svg $(icons) $(icon_srcs) @RELOCATABLE_VIA_LD_TRUE@am__append_17 = `$(RELOCATABLE_LDFLAGS) $(bindir)` @WITH_PERL_MODULE_TRUE@am__append_18 = module-make @WITH_PERL_MODULE_TRUE@am__append_19 = perl_module_tarball @WITH_PERL_MODULE_TRUE@am__append_20 = perl_module_clean @WITH_PERL_MODULE_TRUE@am__append_21 = \ @WITH_PERL_MODULE_TRUE@ perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz \ @WITH_PERL_MODULE_TRUE@ perl-module/pspp-module-config \ @WITH_PERL_MODULE_TRUE@ perl-module/const-c.inc \ @WITH_PERL_MODULE_TRUE@ perl-module/const-xs.inc @WITH_PERL_MODULE_TRUE@am__append_22 = $(module_sources) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/absolute-header.m4 \ $(top_srcdir)/gl/m4/alloca.m4 \ $(top_srcdir)/gl/m4/asm-underscore.m4 \ $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/btowc.m4 \ $(top_srcdir)/gl/m4/builtin-expect.m4 \ $(top_srcdir)/gl/m4/byteswap.m4 \ $(top_srcdir)/gl/m4/c-strtod.m4 \ $(top_srcdir)/gl/m4/canonicalize.m4 \ $(top_srcdir)/gl/m4/ceil.m4 \ $(top_srcdir)/gl/m4/check-math-lib.m4 \ $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/codeset.m4 \ $(top_srcdir)/gl/m4/configmake.m4 \ $(top_srcdir)/gl/m4/count-one-bits.m4 \ $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/dup2.m4 $(top_srcdir)/gl/m4/eealloc.m4 \ $(top_srcdir)/gl/m4/environ.m4 $(top_srcdir)/gl/m4/errno_h.m4 \ $(top_srcdir)/gl/m4/error.m4 $(top_srcdir)/gl/m4/exponentd.m4 \ $(top_srcdir)/gl/m4/exponentf.m4 \ $(top_srcdir)/gl/m4/exponentl.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/extern-inline.m4 \ $(top_srcdir)/gl/m4/fatal-signal.m4 \ $(top_srcdir)/gl/m4/fcntl-o.m4 $(top_srcdir)/gl/m4/fcntl.m4 \ $(top_srcdir)/gl/m4/fcntl_h.m4 \ $(top_srcdir)/gl/m4/flexmember.m4 \ $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/floor.m4 \ $(top_srcdir)/gl/m4/fpieee.m4 \ $(top_srcdir)/gl/m4/fprintf-posix.m4 \ $(top_srcdir)/gl/m4/frexp.m4 $(top_srcdir)/gl/m4/frexpl.m4 \ $(top_srcdir)/gl/m4/fseek.m4 $(top_srcdir)/gl/m4/fseeko.m4 \ $(top_srcdir)/gl/m4/fseterr.m4 $(top_srcdir)/gl/m4/fstat.m4 \ $(top_srcdir)/gl/m4/ftell.m4 $(top_srcdir)/gl/m4/ftello.m4 \ $(top_srcdir)/gl/m4/getdelim.m4 \ $(top_srcdir)/gl/m4/getdtablesize.m4 \ $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/getpass.m4 \ $(top_srcdir)/gl/m4/getprogname.m4 \ $(top_srcdir)/gl/m4/gettext.m4 \ $(top_srcdir)/gl/m4/gettimeofday.m4 \ $(top_srcdir)/gl/m4/glibc21.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/hard-locale.m4 \ $(top_srcdir)/gl/m4/iconv.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/inline.m4 \ $(top_srcdir)/gl/m4/intlmacosx.m4 \ $(top_srcdir)/gl/m4/intmax_t.m4 \ $(top_srcdir)/gl/m4/inttostr.m4 \ $(top_srcdir)/gl/m4/inttypes_h.m4 \ $(top_srcdir)/gl/m4/isfinite.m4 $(top_srcdir)/gl/m4/isinf.m4 \ $(top_srcdir)/gl/m4/isnan.m4 $(top_srcdir)/gl/m4/isnand.m4 \ $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ $(top_srcdir)/gl/m4/iswblank.m4 \ $(top_srcdir)/gl/m4/langinfo_h.m4 \ $(top_srcdir)/gl/m4/largefile.m4 $(top_srcdir)/gl/m4/ldexp.m4 \ $(top_srcdir)/gl/m4/ldexpl.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ $(top_srcdir)/gl/m4/lib-link.m4 \ $(top_srcdir)/gl/m4/lib-prefix.m4 \ $(top_srcdir)/gl/m4/libunistring-base.m4 \ $(top_srcdir)/gl/m4/limits-h.m4 \ $(top_srcdir)/gl/m4/localcharset.m4 \ $(top_srcdir)/gl/m4/locale-fr.m4 \ $(top_srcdir)/gl/m4/locale-ja.m4 \ $(top_srcdir)/gl/m4/locale-zh.m4 \ $(top_srcdir)/gl/m4/locale_h.m4 \ $(top_srcdir)/gl/m4/localeconv.m4 \ $(top_srcdir)/gl/m4/localtime-buffer.m4 \ $(top_srcdir)/gl/m4/lock.m4 $(top_srcdir)/gl/m4/longlong.m4 \ $(top_srcdir)/gl/m4/lseek.m4 $(top_srcdir)/gl/m4/lstat.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/malloca.m4 \ $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mbchar.m4 \ $(top_srcdir)/gl/m4/mbiter.m4 $(top_srcdir)/gl/m4/mbrtowc.m4 \ $(top_srcdir)/gl/m4/mbsinit.m4 \ $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ $(top_srcdir)/gl/m4/md4.m4 $(top_srcdir)/gl/m4/memcasecmp.m4 \ $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/minmax.m4 \ $(top_srcdir)/gl/m4/mkdtemp.m4 $(top_srcdir)/gl/m4/mkstemp.m4 \ $(top_srcdir)/gl/m4/mktime.m4 $(top_srcdir)/gl/m4/mmap-anon.m4 \ $(top_srcdir)/gl/m4/mode_t.m4 \ $(top_srcdir)/gl/m4/msvc-inval.m4 \ $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ $(top_srcdir)/gl/m4/multiarch.m4 \ $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ $(top_srcdir)/gl/m4/open.m4 $(top_srcdir)/gl/m4/pathmax.m4 \ $(top_srcdir)/gl/m4/pipe2.m4 $(top_srcdir)/gl/m4/po.m4 \ $(top_srcdir)/gl/m4/printf-frexp.m4 \ $(top_srcdir)/gl/m4/printf-frexpl.m4 \ $(top_srcdir)/gl/m4/printf-posix-rpl.m4 \ $(top_srcdir)/gl/m4/printf.m4 \ $(top_srcdir)/gl/m4/pthread_rwlock_rdlock.m4 \ $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/rawmemchr.m4 \ $(top_srcdir)/gl/m4/read-file.m4 $(top_srcdir)/gl/m4/read.m4 \ $(top_srcdir)/gl/m4/readlink.m4 $(top_srcdir)/gl/m4/realloc.m4 \ $(top_srcdir)/gl/m4/regex.m4 \ $(top_srcdir)/gl/m4/relocatable-lib.m4 \ $(top_srcdir)/gl/m4/relocatable.m4 \ $(top_srcdir)/gl/m4/rename.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ $(top_srcdir)/gl/m4/round.m4 $(top_srcdir)/gl/m4/safe-read.m4 \ $(top_srcdir)/gl/m4/safe-write.m4 \ $(top_srcdir)/gl/m4/secure_getenv.m4 \ $(top_srcdir)/gl/m4/select.m4 $(top_srcdir)/gl/m4/setenv.m4 \ $(top_srcdir)/gl/m4/sig_atomic_t.m4 \ $(top_srcdir)/gl/m4/sigaction.m4 \ $(top_srcdir)/gl/m4/signal_h.m4 \ $(top_srcdir)/gl/m4/signalblocking.m4 \ $(top_srcdir)/gl/m4/signbit.m4 $(top_srcdir)/gl/m4/size_max.m4 \ $(top_srcdir)/gl/m4/snprintf-posix.m4 \ $(top_srcdir)/gl/m4/snprintf.m4 \ $(top_srcdir)/gl/m4/socketlib.m4 \ $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ $(top_srcdir)/gl/m4/sprintf-posix.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stat.m4 \ $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ $(top_srcdir)/gl/m4/strcasestr.m4 \ $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ $(top_srcdir)/gl/m4/strftime.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/strings_h.m4 \ $(top_srcdir)/gl/m4/strncat.m4 $(top_srcdir)/gl/m4/strndup.m4 \ $(top_srcdir)/gl/m4/strnlen.m4 $(top_srcdir)/gl/m4/strsep.m4 \ $(top_srcdir)/gl/m4/strtod.m4 $(top_srcdir)/gl/m4/strtok_r.m4 \ $(top_srcdir)/gl/m4/sys_select_h.m4 \ $(top_srcdir)/gl/m4/sys_socket_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/sys_time_h.m4 \ $(top_srcdir)/gl/m4/sys_types_h.m4 \ $(top_srcdir)/gl/m4/sys_uio_h.m4 \ $(top_srcdir)/gl/m4/tempname.m4 \ $(top_srcdir)/gl/m4/termios_h.m4 \ $(top_srcdir)/gl/m4/threadlib.m4 $(top_srcdir)/gl/m4/time_h.m4 \ $(top_srcdir)/gl/m4/time_r.m4 $(top_srcdir)/gl/m4/time_rz.m4 \ $(top_srcdir)/gl/m4/timegm.m4 $(top_srcdir)/gl/m4/tm_gmtoff.m4 \ $(top_srcdir)/gl/m4/tmpdir.m4 $(top_srcdir)/gl/m4/trunc.m4 \ $(top_srcdir)/gl/m4/tzset.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/unlocked-io.m4 \ $(top_srcdir)/gl/m4/vasnprintf.m4 \ $(top_srcdir)/gl/m4/vasprintf-posix.m4 \ $(top_srcdir)/gl/m4/vasprintf.m4 \ $(top_srcdir)/gl/m4/version-etc.m4 \ $(top_srcdir)/gl/m4/vfprintf-posix.m4 \ $(top_srcdir)/gl/m4/vprintf-posix.m4 \ $(top_srcdir)/gl/m4/vsnprintf-posix.m4 \ $(top_srcdir)/gl/m4/vsnprintf.m4 \ $(top_srcdir)/gl/m4/vsprintf-posix.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_h.m4 $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/gl/m4/wcrtomb.m4 $(top_srcdir)/gl/m4/wctype_h.m4 \ $(top_srcdir)/gl/m4/wcwidth.m4 $(top_srcdir)/gl/m4/wint_t.m4 \ $(top_srcdir)/gl/m4/write.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ $(top_srcdir)/gl/m4/xsize.m4 $(top_srcdir)/gl/m4/xstrndup.m4 \ $(top_srcdir)/gl/m4/xvasprintf.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(srcdir)/doc/version.texi \ $(srcdir)/doc/stamp-vti $(srcdir)/doc/version-dev.texi \ $(srcdir)/doc/stamp-1 $(am__dist_appdata_DATA_DIST) \ $(am__dist_catalog_DATA_DIST) $(dist_docbook_DATA) \ $(am__dist_large_pixmap_DATA_DIST) \ $(am__dist_small_pixmap_DATA_DIST) \ $(am__dist_src_ui_gui_psppire_DATA_DIST) \ $(am__noinst_HEADERS_DIST) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = po/Makefile tests/atlocal perl-module/lib/PSPP.pm CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = lib_gtk_contrib_libxpaned_a_AR = $(AR) $(ARFLAGS) lib_gtk_contrib_libxpaned_a_LIBADD = am__lib_gtk_contrib_libxpaned_a_SOURCES_DIST = \ lib/gtk-contrib/gtkxpaned.c lib/gtk-contrib/gtkxpaned.h am__dirstamp = $(am__leading_dot)dirstamp @HAVE_GUI_TRUE@am_lib_gtk_contrib_libxpaned_a_OBJECTS = lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.$(OBJEXT) lib_gtk_contrib_libxpaned_a_OBJECTS = \ $(am_lib_gtk_contrib_libxpaned_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(pkglibdir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(desktopdir)" \ "$(DESTDIR)$(appdatadir)" "$(DESTDIR)$(catalogdir)" \ "$(DESTDIR)$(docbookdir)" "$(DESTDIR)$(large_pixmapdir)" \ "$(DESTDIR)$(small_pixmapdir)" \ "$(DESTDIR)$(src_ui_gui_psppiredir)" \ "$(DESTDIR)$(examplesdir)" \ "$(DESTDIR)$(src_ui_gui_psppiredir)" LTLIBRARIES = $(module_LTLIBRARIES) $(noinst_LTLIBRARIES) \ $(pkglib_LTLIBRARIES) lib_linreg_liblinreg_la_LIBADD = am_lib_linreg_liblinreg_la_OBJECTS = lib/linreg/sweep.lo lib_linreg_liblinreg_la_OBJECTS = \ $(am_lib_linreg_liblinreg_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = lib_tukey_libtukey_la_LIBADD = am_lib_tukey_libtukey_la_OBJECTS = lib/tukey/ptukey.lo \ lib/tukey/qtukey.lo lib_tukey_libtukey_la_OBJECTS = $(am_lib_tukey_libtukey_la_OBJECTS) @WITH_GUI_TOOLS_TRUE@libglade_psppire_la_DEPENDENCIES = gl/libgl.la am__libglade_psppire_la_SOURCES_DIST = src/ui/gui/helper.c \ src/ui/gui/dialog-common.c src/ui/gui/psppire-var-ptr.c \ src/data/format.c src/ui/gui/psppire-format.c \ src/data/value-labels.c src/ui/gui/psppire-conf.c \ src/ui/gui/psppire-acr.c src/ui/gui/psppire-buttonbox.c \ src/ui/gui/psppire-dialog.c src/ui/gui/psppire-keypad.c \ src/ui/gui/psppire-dictview.c src/ui/gui/psppire-selector.c \ src/ui/gui/psppire-select-dest.c src/ui/gui/psppire-var-view.c \ src/ui/gui/psppire-checkbox-treeview.c \ src/ui/gui/psppire-val-chooser.c \ src/ui/gui/psppire-value-entry.c \ src/ui/gui/psppire-window-base.c @WITH_GUI_TOOLS_TRUE@am_libglade_psppire_la_OBJECTS = \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-helper.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-dialog-common.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-var-ptr.lo \ @WITH_GUI_TOOLS_TRUE@ src/data/libglade_psppire_la-format.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-format.lo \ @WITH_GUI_TOOLS_TRUE@ src/data/libglade_psppire_la-value-labels.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-conf.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-acr.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-buttonbox.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-dialog.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-keypad.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-dictview.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-selector.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-select-dest.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-var-view.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-checkbox-treeview.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-val-chooser.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-value-entry.lo \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/libglade_psppire_la-psppire-window-base.lo libglade_psppire_la_OBJECTS = $(am_libglade_psppire_la_OBJECTS) libglade_psppire_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libglade_psppire_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @WITH_GUI_TOOLS_TRUE@am_libglade_psppire_la_rpath = -rpath \ @WITH_GUI_TOOLS_TRUE@ $(moduledir) am__DEPENDENCIES_1 = src_data_libdata_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_src_data_libdata_la_OBJECTS = \ src/data/src_data_libdata_la-any-reader.lo \ src/data/src_data_libdata_la-any-writer.lo \ src/data/src_data_libdata_la-attributes.lo \ src/data/src_data_libdata_la-calendar.lo \ src/data/src_data_libdata_la-case-map.lo \ src/data/src_data_libdata_la-case-matcher.lo \ src/data/src_data_libdata_la-caseproto.lo \ src/data/src_data_libdata_la-case.lo \ src/data/src_data_libdata_la-casegrouper.lo \ src/data/src_data_libdata_la-caseinit.lo \ src/data/src_data_libdata_la-casereader-filter.lo \ src/data/src_data_libdata_la-casereader-project.lo \ src/data/src_data_libdata_la-casereader-select.lo \ src/data/src_data_libdata_la-casereader-shim.lo \ src/data/src_data_libdata_la-casereader-translator.lo \ src/data/src_data_libdata_la-casereader.lo \ src/data/src_data_libdata_la-casewindow.lo \ src/data/src_data_libdata_la-casewriter-translator.lo \ src/data/src_data_libdata_la-casewriter.lo \ src/data/src_data_libdata_la-case-tmpfile.lo \ src/data/src_data_libdata_la-csv-file-writer.lo \ src/data/src_data_libdata_la-data-in.lo \ src/data/src_data_libdata_la-data-out.lo \ src/data/src_data_libdata_la-dataset.lo \ src/data/src_data_libdata_la-dataset-writer.lo \ src/data/src_data_libdata_la-datasheet.lo \ src/data/src_data_libdata_la-dict-class.lo \ src/data/src_data_libdata_la-dictionary.lo \ src/data/src_data_libdata_la-encrypted-file.lo \ src/data/src_data_libdata_la-file-handle-def.lo \ src/data/src_data_libdata_la-file-name.lo \ src/data/src_data_libdata_la-format-guesser.lo \ src/data/src_data_libdata_la-format.lo \ src/data/src_data_libdata_la-gnumeric-reader.lo \ src/data/src_data_libdata_la-identifier.lo \ src/data/src_data_libdata_la-identifier2.lo \ src/data/src_data_libdata_la-lazy-casereader.lo \ src/data/src_data_libdata_la-missing-values.lo \ src/data/src_data_libdata_la-make-file.lo \ src/data/src_data_libdata_la-mrset.lo \ src/data/src_data_libdata_la-ods-reader.lo \ src/data/src_data_libdata_la-pc+-file-reader.lo \ src/data/src_data_libdata_la-por-file-reader.lo \ src/data/src_data_libdata_la-por-file-writer.lo \ src/data/src_data_libdata_la-psql-reader.lo \ src/data/src_data_libdata_la-session.lo \ src/data/src_data_libdata_la-settings.lo \ src/data/src_data_libdata_la-short-names.lo \ src/data/src_data_libdata_la-spreadsheet-reader.lo \ src/data/src_data_libdata_la-subcase.lo \ src/data/src_data_libdata_la-sys-file-encoding.lo \ src/data/src_data_libdata_la-sys-file-private.lo \ src/data/src_data_libdata_la-sys-file-reader.lo \ src/data/src_data_libdata_la-sys-file-writer.lo \ src/data/src_data_libdata_la-transformations.lo \ src/data/src_data_libdata_la-value.lo \ src/data/src_data_libdata_la-value-labels.lo \ src/data/src_data_libdata_la-variable.lo \ src/data/src_data_libdata_la-vector.lo src_data_libdata_la_OBJECTS = $(am_src_data_libdata_la_OBJECTS) src_language_liblanguage_la_LIBADD = am__objects_1 = src/language/lexer/command-name.lo \ src/language/lexer/include-path.lo src/language/lexer/lexer.lo \ src/language/lexer/subcommand-list.lo \ src/language/lexer/format-parser.lo src/language/lexer/scan.lo \ src/language/lexer/segment.lo src/language/lexer/token.lo \ src/language/lexer/value-parser.lo \ src/language/lexer/variable-parser.lo am__objects_2 = src/language/xforms/compute.lo \ src/language/xforms/count.lo src/language/xforms/fail.lo \ src/language/xforms/sample.lo src/language/xforms/recode.lo \ src/language/xforms/select-if.lo am__objects_3 = src/language/control/control-stack.lo \ src/language/control/do-if.lo src/language/control/loop.lo \ src/language/control/repeat.lo \ src/language/control/temporary.lo am__objects_4 = src/language/dictionary/attributes.lo \ src/language/dictionary/apply-dictionary.lo \ src/language/dictionary/delete-variables.lo \ src/language/dictionary/formats.lo \ src/language/dictionary/missing-values.lo \ src/language/dictionary/modify-variables.lo \ src/language/dictionary/mrsets.lo \ src/language/dictionary/numeric.lo \ src/language/dictionary/rename-variables.lo \ src/language/dictionary/sort-variables.lo \ src/language/dictionary/split-file.lo \ src/language/dictionary/sys-file-info.lo \ src/language/dictionary/value-labels.lo \ src/language/dictionary/variable-label.lo \ src/language/dictionary/vector.lo \ src/language/dictionary/variable-display.lo \ src/language/dictionary/weight.lo am__objects_5 = src/language/tests/format-guesser-test.lo \ src/language/tests/float-format.lo \ src/language/tests/moments-test.lo \ src/language/tests/paper-size.lo \ src/language/tests/pool-test.lo am__objects_6 = src/language/utilities/cache.lo \ src/language/utilities/cd.lo src/language/utilities/date.lo \ src/language/utilities/echo.lo src/language/utilities/host.lo \ src/language/utilities/title.lo \ src/language/utilities/include.lo \ src/language/utilities/output.lo \ src/language/utilities/permissions.lo am__objects_7 = src/language/stats/aggregate.lo \ src/language/stats/autorecode.lo \ src/language/stats/binomial.lo src/language/stats/chisquare.lo \ src/language/stats/cochran.lo \ src/language/stats/correlations.lo \ src/language/stats/descriptives.lo \ src/language/stats/examine.lo src/language/stats/factor.lo \ src/language/stats/flip.lo src/language/stats/freq.lo \ src/language/stats/frequencies.lo \ src/language/stats/friedman.lo src/language/stats/glm.lo \ src/language/stats/graph.lo \ src/language/stats/kruskal-wallis.lo \ src/language/stats/ks-one-sample.lo \ src/language/stats/logistic.lo \ src/language/stats/jonckheere-terpstra.lo \ src/language/stats/mann-whitney.lo src/language/stats/means.lo \ src/language/stats/mcnemar.lo src/language/stats/median.lo \ src/language/stats/npar.lo src/language/stats/npar-summary.lo \ src/language/stats/oneway.lo \ src/language/stats/quick-cluster.lo src/language/stats/rank.lo \ src/language/stats/reliability.lo src/language/stats/roc.lo \ src/language/stats/regression.lo src/language/stats/runs.lo \ src/language/stats/sign.lo src/language/stats/sort-cases.lo \ src/language/stats/sort-criteria.lo \ src/language/stats/t-test-indep.lo \ src/language/stats/t-test-one-sample.lo \ src/language/stats/t-test-paired.lo \ src/language/stats/t-test-parser.lo \ src/language/stats/wilcoxon.lo am__objects_8 = src/language/data-io/combine-files.lo \ src/language/data-io/data-list.lo \ src/language/data-io/data-parser.lo \ src/language/data-io/data-reader.lo \ src/language/data-io/data-writer.lo \ src/language/data-io/dataset.lo \ src/language/data-io/file-handle.lo \ src/language/data-io/get-data.lo src/language/data-io/get.lo \ src/language/data-io/inpt-pgm.lo src/language/data-io/list.lo \ src/language/data-io/placement-parser.lo \ src/language/data-io/print-space.lo \ src/language/data-io/print.lo \ src/language/data-io/matrix-data.lo \ src/language/data-io/matrix-reader.lo \ src/language/data-io/save-translate.lo \ src/language/data-io/save.lo src/language/data-io/trim.lo am__objects_9 = src/language/expressions/evaluate.lo \ src/language/expressions/helpers.lo \ src/language/expressions/optimize.lo \ src/language/expressions/parse.lo am_src_language_liblanguage_la_OBJECTS = src/language/command.lo \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_5) $(am__objects_6) \ $(am__objects_7) $(am__objects_8) $(am__objects_9) am__objects_10 = src/language/utilities/set.lo am__objects_11 = src/language/stats/crosstabs.lo am__objects_12 = nodist_src_language_liblanguage_la_OBJECTS = $(am__objects_10) \ $(am__objects_11) $(am__objects_12) src_language_liblanguage_la_OBJECTS = \ $(am_src_language_liblanguage_la_OBJECTS) \ $(nodist_src_language_liblanguage_la_OBJECTS) src_libpspp_core_la_DEPENDENCIES = src/data/libdata.la \ src/libpspp/liblibpspp.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) gl/libgl.la am_src_libpspp_core_la_OBJECTS = src_libpspp_core_la_OBJECTS = $(am_src_libpspp_core_la_OBJECTS) src_libpspp_core_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(src_libpspp_core_la_LDFLAGS) \ $(LDFLAGS) -o $@ src_libpspp_la_DEPENDENCIES = src/language/liblanguage.la \ src/math/libpspp-math.la src/output/liboutput.la \ $(am__DEPENDENCIES_1) am_src_libpspp_la_OBJECTS = src_libpspp_la_OBJECTS = $(am_src_libpspp_la_OBJECTS) src_libpspp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(src_libpspp_la_CFLAGS) $(CFLAGS) $(src_libpspp_la_LDFLAGS) \ $(LDFLAGS) -o $@ src_libpspp_liblibpspp_la_LIBADD = am_src_libpspp_liblibpspp_la_OBJECTS = \ src/libpspp/src_libpspp_liblibpspp_la-abt.lo \ src/libpspp/src_libpspp_liblibpspp_la-argv-parser.lo \ src/libpspp/src_libpspp_liblibpspp_la-array.lo \ src/libpspp/src_libpspp_liblibpspp_la-bt.lo \ src/libpspp/src_libpspp_liblibpspp_la-cmac-aes256.lo \ src/libpspp/src_libpspp_liblibpspp_la-copyleft.lo \ src/libpspp/src_libpspp_liblibpspp_la-deque.lo \ src/libpspp/src_libpspp_liblibpspp_la-encoding-guesser.lo \ src/libpspp/src_libpspp_liblibpspp_la-ext-array.lo \ src/libpspp/src_libpspp_liblibpspp_la-float-format.lo \ src/libpspp/src_libpspp_liblibpspp_la-freaderror.lo \ src/libpspp/src_libpspp_liblibpspp_la-hash-functions.lo \ src/libpspp/src_libpspp_liblibpspp_la-inflate.lo \ src/libpspp/src_libpspp_liblibpspp_la-heap.lo \ src/libpspp/src_libpspp_liblibpspp_la-hmap.lo \ src/libpspp/src_libpspp_liblibpspp_la-hmapx.lo \ src/libpspp/src_libpspp_liblibpspp_la-i18n.lo \ src/libpspp/src_libpspp_liblibpspp_la-integer-format.lo \ src/libpspp/src_libpspp_liblibpspp_la-intern.lo \ src/libpspp/src_libpspp_liblibpspp_la-line-reader.lo \ src/libpspp/src_libpspp_liblibpspp_la-ll.lo \ src/libpspp/src_libpspp_liblibpspp_la-llx.lo \ src/libpspp/src_libpspp_liblibpspp_la-message.lo \ src/libpspp/src_libpspp_liblibpspp_la-misc.lo \ src/libpspp/src_libpspp_liblibpspp_la-model-checker.lo \ src/libpspp/src_libpspp_liblibpspp_la-pool.lo \ src/libpspp/src_libpspp_liblibpspp_la-prompt.lo \ src/libpspp/src_libpspp_liblibpspp_la-range-map.lo \ src/libpspp/src_libpspp_liblibpspp_la-range-set.lo \ src/libpspp/src_libpspp_liblibpspp_la-range-tower.lo \ src/libpspp/src_libpspp_liblibpspp_la-sparse-array.lo \ src/libpspp/src_libpspp_liblibpspp_la-sparse-xarray.lo \ src/libpspp/src_libpspp_liblibpspp_la-start-date.lo \ src/libpspp/src_libpspp_liblibpspp_la-string-array.lo \ src/libpspp/src_libpspp_liblibpspp_la-string-map.lo \ src/libpspp/src_libpspp_liblibpspp_la-string-set.lo \ src/libpspp/src_libpspp_liblibpspp_la-stringi-map.lo \ src/libpspp/src_libpspp_liblibpspp_la-stringi-set.lo \ src/libpspp/src_libpspp_liblibpspp_la-str.lo \ src/libpspp/src_libpspp_liblibpspp_la-taint.lo \ src/libpspp/src_libpspp_liblibpspp_la-temp-file.lo \ src/libpspp/src_libpspp_liblibpspp_la-tower.lo \ src/libpspp/src_libpspp_liblibpspp_la-u8-istream.lo \ src/libpspp/src_libpspp_liblibpspp_la-u8-line.lo \ src/libpspp/src_libpspp_liblibpspp_la-zip-reader.lo \ src/libpspp/src_libpspp_liblibpspp_la-zip-writer.lo nodist_src_libpspp_liblibpspp_la_OBJECTS = \ src/libpspp/src_libpspp_liblibpspp_la-version.lo src_libpspp_liblibpspp_la_OBJECTS = \ $(am_src_libpspp_liblibpspp_la_OBJECTS) \ $(nodist_src_libpspp_liblibpspp_la_OBJECTS) src_math_libpspp_math_la_DEPENDENCIES = lib/linreg/liblinreg.la \ lib/tukey/libtukey.la am_src_math_libpspp_math_la_OBJECTS = src/math/chart-geometry.lo \ src/math/box-whisker.lo src/math/categoricals.lo \ src/math/covariance.lo src/math/correlation.lo \ src/math/extrema.lo src/math/histogram.lo \ src/math/interaction.lo src/math/levene.lo src/math/linreg.lo \ src/math/merge.lo src/math/moments.lo src/math/np.lo \ src/math/order-stats.lo src/math/percentiles.lo \ src/math/random.lo src/math/sort.lo src/math/trimmed-mean.lo \ src/math/tukey-hinges.lo src/math/wilcoxon-sig.lo src_math_libpspp_math_la_OBJECTS = \ $(am_src_math_libpspp_math_la_OBJECTS) src_output_liboutput_la_LIBADD = am__src_output_liboutput_la_SOURCES_DIST = src/output/ascii.c \ src/output/ascii.h src/output/chart-item-provider.h \ src/output/chart-item.c src/output/chart-item.h \ src/output/charts/boxplot.c src/output/charts/boxplot.h \ src/output/charts/np-plot.c src/output/charts/np-plot.h \ src/output/charts/barchart.c src/output/charts/barchart.h \ src/output/charts/piechart.c src/output/charts/piechart.h \ src/output/charts/plot-hist.c src/output/charts/plot-hist.h \ src/output/charts/roc-chart.c src/output/charts/roc-chart.h \ src/output/charts/spreadlevel-plot.c \ src/output/charts/spreadlevel-plot.h src/output/charts/scree.c \ src/output/charts/scree.h src/output/charts/scatterplot.c \ src/output/charts/scatterplot.h src/output/csv.c \ src/output/driver-provider.h src/output/driver.c \ src/output/driver.h src/output/html.c src/output/journal.c \ src/output/journal.h src/output/measure.c src/output/measure.h \ src/output/message-item.c src/output/message-item.h \ src/output/msglog.c src/output/msglog.h src/output/options.c \ src/output/options.h src/output/output-item-provider.h \ src/output/output-item.c src/output/output-item.h \ src/output/render.c src/output/render.h src/output/tab.c \ src/output/tab.h src/output/table-casereader.c \ src/output/table-item.c src/output/table-item.h \ src/output/table-paste.c src/output/table-provider.h \ src/output/table-select.c src/output/table-stomp.c \ src/output/table-transpose.c src/output/table.c \ src/output/table.h src/output/text-item.c \ src/output/text-item.h src/output/cairo-chart.c \ src/output/cairo-chart.h src/output/cairo.c src/output/cairo.h \ src/output/charts/boxplot-cairo.c \ src/output/charts/np-plot-cairo.c \ src/output/charts/barchart-cairo.c \ src/output/charts/piechart-cairo.c \ src/output/charts/plot-hist-cairo.c \ src/output/charts/roc-chart-cairo.c \ src/output/charts/scree-cairo.c \ src/output/charts/spreadlevel-cairo.c \ src/output/charts/scatterplot-cairo.c src/output/odt.c @HAVE_CAIRO_TRUE@am__objects_13 = src/output/src_output_liboutput_la-cairo-chart.lo \ @HAVE_CAIRO_TRUE@ src/output/src_output_liboutput_la-cairo.lo \ @HAVE_CAIRO_TRUE@ src/output/charts/src_output_liboutput_la-boxplot-cairo.lo \ @HAVE_CAIRO_TRUE@ src/output/charts/src_output_liboutput_la-np-plot-cairo.lo \ @HAVE_CAIRO_TRUE@ src/output/charts/src_output_liboutput_la-barchart-cairo.lo \ @HAVE_CAIRO_TRUE@ src/output/charts/src_output_liboutput_la-piechart-cairo.lo \ @HAVE_CAIRO_TRUE@ src/output/charts/src_output_liboutput_la-plot-hist-cairo.lo \ @HAVE_CAIRO_TRUE@ src/output/charts/src_output_liboutput_la-roc-chart-cairo.lo \ @HAVE_CAIRO_TRUE@ src/output/charts/src_output_liboutput_la-scree-cairo.lo \ @HAVE_CAIRO_TRUE@ src/output/charts/src_output_liboutput_la-spreadlevel-cairo.lo \ @HAVE_CAIRO_TRUE@ src/output/charts/src_output_liboutput_la-scatterplot-cairo.lo @ODF_WRITE_SUPPORT_TRUE@am__objects_14 = src/output/src_output_liboutput_la-odt.lo am_src_output_liboutput_la_OBJECTS = \ src/output/src_output_liboutput_la-ascii.lo \ src/output/src_output_liboutput_la-chart-item.lo \ src/output/charts/src_output_liboutput_la-boxplot.lo \ src/output/charts/src_output_liboutput_la-np-plot.lo \ src/output/charts/src_output_liboutput_la-barchart.lo \ src/output/charts/src_output_liboutput_la-piechart.lo \ src/output/charts/src_output_liboutput_la-plot-hist.lo \ src/output/charts/src_output_liboutput_la-roc-chart.lo \ src/output/charts/src_output_liboutput_la-spreadlevel-plot.lo \ src/output/charts/src_output_liboutput_la-scree.lo \ src/output/charts/src_output_liboutput_la-scatterplot.lo \ src/output/src_output_liboutput_la-csv.lo \ src/output/src_output_liboutput_la-driver.lo \ src/output/src_output_liboutput_la-html.lo \ src/output/src_output_liboutput_la-journal.lo \ src/output/src_output_liboutput_la-measure.lo \ src/output/src_output_liboutput_la-message-item.lo \ src/output/src_output_liboutput_la-msglog.lo \ src/output/src_output_liboutput_la-options.lo \ src/output/src_output_liboutput_la-output-item.lo \ src/output/src_output_liboutput_la-render.lo \ src/output/src_output_liboutput_la-tab.lo \ src/output/src_output_liboutput_la-table-casereader.lo \ src/output/src_output_liboutput_la-table-item.lo \ src/output/src_output_liboutput_la-table-paste.lo \ src/output/src_output_liboutput_la-table-select.lo \ src/output/src_output_liboutput_la-table-stomp.lo \ src/output/src_output_liboutput_la-table-transpose.lo \ src/output/src_output_liboutput_la-table.lo \ src/output/src_output_liboutput_la-text-item.lo \ $(am__objects_13) $(am__objects_14) src_output_liboutput_la_OBJECTS = \ $(am_src_output_liboutput_la_OBJECTS) src_ui_libuicommon_la_LIBADD = am_src_ui_libuicommon_la_OBJECTS = src/ui/source-init-opts.lo \ src/ui/syntax-gen.lo src_ui_libuicommon_la_OBJECTS = $(am_src_ui_libuicommon_la_OBJECTS) src_ui_terminal_libui_la_LIBADD = am_src_ui_terminal_libui_la_OBJECTS = \ src/ui/terminal/src_ui_terminal_libui_la-main.lo \ src/ui/terminal/src_ui_terminal_libui_la-terminal-opts.lo \ src/ui/terminal/src_ui_terminal_libui_la-terminal-reader.lo \ src/ui/terminal/src_ui_terminal_libui_la-terminal.lo src_ui_terminal_libui_la_OBJECTS = \ $(am_src_ui_terminal_libui_la_OBJECTS) src_ui_terminal_libui_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(src_ui_terminal_libui_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_GUI_TRUE@am__EXEEXT_1 = src/ui/gui/psppire$(EXEEXT) @HAVE_GUI_TRUE@am__EXEEXT_2 = src/ui/gui/spreadsheet-test$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am__src_ui_gui_psppire_SOURCES_DIST = src/ui/gui/pspp-sheet-private.h \ src/ui/gui/pspp-sheet-selection.c \ src/ui/gui/pspp-sheet-selection.h \ src/ui/gui/pspp-sheet-view-column.c \ src/ui/gui/pspp-sheet-view-column.h \ src/ui/gui/pspp-sheet-view.c src/ui/gui/pspp-sheet-view.h \ src/ui/gui/pspp-widget-facade.c \ src/ui/gui/pspp-widget-facade.h \ src/ui/gui/psppire-button-editable.c \ src/ui/gui/psppire-button-editable.h \ src/ui/gui/psppire-cell-renderer-button.c \ src/ui/gui/psppire-cell-renderer-button.h \ src/ui/gui/psppire-dialog.c src/ui/gui/psppire-keypad.c \ src/ui/gui/psppire-selector.c src/ui/gui/psppire-buttonbox.c \ src/ui/gui/psppire-buttonbox.h src/ui/gui/psppire-scanf.c \ src/ui/gui/psppire-scanf.h src/ui/gui/psppire-acr.c \ src/ui/gui/psppire-import-assistant.c \ src/ui/gui/psppire-import-assistant.h \ src/ui/gui/builder-wrapper.c src/ui/gui/builder-wrapper.h \ src/ui/gui/dialog-common.c src/ui/gui/dialog-common.h \ src/ui/gui/dict-display.h src/ui/gui/dict-display.c \ src/ui/gui/entry-dialog.c src/ui/gui/entry-dialog.h \ src/ui/gui/executor.c src/ui/gui/executor.h \ src/ui/gui/find-dialog.c src/ui/gui/find-dialog.h \ src/ui/gui/goto-case-dialog.c src/ui/gui/goto-case-dialog.h \ src/ui/gui/helper.c src/ui/gui/help-menu.c \ src/ui/gui/help-menu.h src/ui/gui/helper.h src/ui/gui/main.c \ src/ui/gui/missing-val-dialog.c \ src/ui/gui/missing-val-dialog.h src/ui/gui/options-dialog.c \ src/ui/gui/options-dialog.h src/ui/gui/psppire.c \ src/ui/gui/psppire.h src/ui/gui/psppire-acr.h \ src/ui/gui/psppire-checkbox-treeview.c \ src/ui/gui/psppire-checkbox-treeview.h \ src/ui/gui/psppire-conf.c src/ui/gui/psppire-conf.h \ src/ui/gui/psppire-data-editor.c \ src/ui/gui/psppire-data-editor.h \ src/ui/gui/psppire-data-sheet.c \ src/ui/gui/psppire-data-sheet.h \ src/ui/gui/psppire-data-store.c \ src/ui/gui/psppire-data-store.h \ src/ui/gui/psppire-data-window.c \ src/ui/gui/psppire-data-window.h src/ui/gui/psppire-dialog.h \ src/ui/gui/psppire-dialog-action.c \ src/ui/gui/psppire-dialog-action.h \ src/ui/gui/psppire-dialog-action-aggregate.c \ src/ui/gui/psppire-dialog-action-aggregate.h \ src/ui/gui/psppire-dialog-action-autorecode.c \ src/ui/gui/psppire-dialog-action-autorecode.h \ src/ui/gui/psppire-dialog-action-1sks.c \ src/ui/gui/psppire-dialog-action-1sks.h \ src/ui/gui/psppire-dialog-action-barchart.c \ src/ui/gui/psppire-dialog-action-barchart.h \ src/ui/gui/psppire-dialog-action-binomial.c \ src/ui/gui/psppire-dialog-action-binomial.h \ src/ui/gui/psppire-dialog-action-chisquare.c \ src/ui/gui/psppire-dialog-action-chisquare.h \ src/ui/gui/psppire-dialog-action-compute.c \ src/ui/gui/psppire-dialog-action-compute.h \ src/ui/gui/psppire-dialog-action-comments.c \ src/ui/gui/psppire-dialog-action-comments.h \ src/ui/gui/psppire-dialog-action-count.c \ src/ui/gui/psppire-dialog-action-count.h \ src/ui/gui/psppire-dialog-action-correlation.c \ src/ui/gui/psppire-dialog-action-correlation.h \ src/ui/gui/psppire-dialog-action-crosstabs.c \ src/ui/gui/psppire-dialog-action-crosstabs.h \ src/ui/gui/psppire-dialog-action-descriptives.c \ src/ui/gui/psppire-dialog-action-descriptives.h \ src/ui/gui/psppire-dialog-action-examine.c \ src/ui/gui/psppire-dialog-action-examine.h \ src/ui/gui/psppire-dialog-action-factor.c \ src/ui/gui/psppire-dialog-action-factor.h \ src/ui/gui/psppire-dialog-action-flip.c \ src/ui/gui/psppire-dialog-action-flip.h \ src/ui/gui/psppire-dialog-action-frequencies.c \ src/ui/gui/psppire-dialog-action-frequencies.h \ src/ui/gui/psppire-dialog-action-histogram.c \ src/ui/gui/psppire-dialog-action-histogram.h \ src/ui/gui/psppire-dialog-action-indep-samps.c \ src/ui/gui/psppire-dialog-action-indep-samps.h \ src/ui/gui/psppire-dialog-action-kmeans.c \ src/ui/gui/psppire-dialog-action-kmeans.h \ src/ui/gui/psppire-dialog-action-logistic.c \ src/ui/gui/psppire-dialog-action-logistic.h \ src/ui/gui/psppire-dialog-action-k-independent.c \ src/ui/gui/psppire-dialog-action-k-independent.h \ src/ui/gui/psppire-dialog-action-k-related.c \ src/ui/gui/psppire-dialog-action-k-related.h \ src/ui/gui/psppire-dialog-action-means.c \ src/ui/gui/psppire-dialog-action-means.h \ src/ui/gui/psppire-dialog-action-oneway.c \ src/ui/gui/psppire-dialog-action-oneway.h \ src/ui/gui/psppire-dialog-action-paired.c \ src/ui/gui/psppire-dialog-action-paired.h \ src/ui/gui/psppire-dialog-action-rank.c \ src/ui/gui/psppire-dialog-action-rank.h \ src/ui/gui/psppire-dialog-action-recode.c \ src/ui/gui/psppire-dialog-action-recode.h \ src/ui/gui/psppire-dialog-action-recode-same.c \ src/ui/gui/psppire-dialog-action-recode-same.h \ src/ui/gui/psppire-dialog-action-recode-different.c \ src/ui/gui/psppire-dialog-action-recode-different.h \ src/ui/gui/psppire-dialog-action-regression.c \ src/ui/gui/psppire-dialog-action-regression.h \ src/ui/gui/psppire-dialog-action-reliability.c \ src/ui/gui/psppire-dialog-action-reliability.h \ src/ui/gui/psppire-dialog-action-roc.c \ src/ui/gui/psppire-dialog-action-roc.h \ src/ui/gui/psppire-dialog-action-runs.c \ src/ui/gui/psppire-dialog-action-runs.h \ src/ui/gui/psppire-dialog-action-scatterplot.c \ src/ui/gui/psppire-dialog-action-scatterplot.h \ src/ui/gui/psppire-dialog-action-sort.c \ src/ui/gui/psppire-dialog-action-sort.h \ src/ui/gui/psppire-dialog-action-select.c \ src/ui/gui/psppire-dialog-action-select.h \ src/ui/gui/psppire-dialog-action-split.c \ src/ui/gui/psppire-dialog-action-split.h \ src/ui/gui/psppire-dialog-action-tt1s.c \ src/ui/gui/psppire-dialog-action-tt1s.h \ src/ui/gui/psppire-dialog-action-two-sample.c \ src/ui/gui/psppire-dialog-action-two-sample.h \ src/ui/gui/psppire-dialog-action-univariate.c \ src/ui/gui/psppire-dialog-action-univariate.h \ src/ui/gui/psppire-dialog-action-var-info.c \ src/ui/gui/psppire-dialog-action-var-info.h \ src/ui/gui/psppire-dialog-action-weight.c \ src/ui/gui/psppire-dialog-action-weight.h \ src/ui/gui/psppire-dict.c src/ui/gui/psppire-dict.h \ src/ui/gui/psppire-dictview.c src/ui/gui/psppire-dictview.h \ src/ui/gui/psppire-empty-list-store.c \ src/ui/gui/psppire-empty-list-store.h \ src/ui/gui/psppire-encoding-selector.c \ src/ui/gui/psppire-encoding-selector.h \ src/ui/gui/psppire-format.c src/ui/gui/psppire-format.h \ src/ui/gui/psppire-keypad.h src/ui/gui/psppire-lex-reader.c \ src/ui/gui/psppire-lex-reader.h \ src/ui/gui/psppire-means-layer.c \ src/ui/gui/psppire-means-layer.h \ src/ui/gui/psppire-output-view.c \ src/ui/gui/psppire-output-view.h \ src/ui/gui/psppire-output-window.c \ src/ui/gui/psppire-output-window.h \ src/ui/gui/psppire-var-view.c src/ui/gui/psppire-var-view.h \ src/ui/gui/psppire-spreadsheet-model.c \ src/ui/gui/psppire-spreadsheet-model.h \ src/ui/gui/psppire-selector.h src/ui/gui/psppire-select-dest.c \ src/ui/gui/psppire-select-dest.h \ src/ui/gui/psppire-syntax-window.c \ src/ui/gui/psppire-syntax-window.h \ src/ui/gui/psppire-val-chooser.c \ src/ui/gui/psppire-val-chooser.h \ src/ui/gui/psppire-value-entry.c \ src/ui/gui/psppire-value-entry.h src/ui/gui/psppire-var-ptr.c \ src/ui/gui/psppire-var-ptr.h src/ui/gui/psppire-var-sheet.c \ src/ui/gui/psppire-var-sheet.h src/ui/gui/psppire-window.c \ src/ui/gui/psppire-window.h src/ui/gui/psppire-window-base.c \ src/ui/gui/psppire-window-base.h \ src/ui/gui/psppire-window-register.c \ src/ui/gui/psppire-window-register.h \ src/ui/gui/t-test-options.c src/ui/gui/t-test-options.h \ src/ui/gui/val-labs-dialog.c src/ui/gui/val-labs-dialog.h \ src/ui/gui/var-display.c src/ui/gui/var-display.h \ src/ui/gui/var-type-dialog.c src/ui/gui/var-type-dialog.h \ src/ui/gui/widget-io.c src/ui/gui/widget-io.h \ src/ui/gui/widgets.c src/ui/gui/widgets.h \ src/ui/gui/windows-menu.c src/ui/gui/windows-menu.h @HAVE_GUI_TRUE@am_src_ui_gui_psppire_OBJECTS = src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-button-editable.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-keypad.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-selector.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-scanf.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-acr.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-builder-wrapper.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-dialog-common.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-dict-display.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-entry-dialog.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-executor.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-find-dialog.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-goto-case-dialog.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-helper.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-help-menu.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-main.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-missing-val-dialog.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-options-dialog.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-conf.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-data-editor.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-data-store.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-data-window.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dict.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-dictview.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-format.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-means-layer.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-output-view.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-output-window.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-var-view.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-select-dest.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-value-entry.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-window.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-window-base.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-psppire-window-register.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-t-test-options.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-val-labs-dialog.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-var-display.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-var-type-dialog.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-widget-io.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-widgets.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-windows-menu.$(OBJEXT) @HAVE_GUI_TRUE@nodist_src_ui_gui_psppire_OBJECTS = src/ui/gui/src_ui_gui_psppire-psppire-marshal.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_psppire-resources.$(OBJEXT) src_ui_gui_psppire_OBJECTS = $(am_src_ui_gui_psppire_OBJECTS) \ $(nodist_src_ui_gui_psppire_OBJECTS) @HAVE_GUI_TRUE@src_ui_gui_psppire_DEPENDENCIES = \ @HAVE_GUI_TRUE@ lib/gtk-contrib/libxpaned.a \ @HAVE_GUI_TRUE@ src/ui/libuicommon.la src/libpspp.la \ @HAVE_GUI_TRUE@ src/libpspp-core.la $(am__DEPENDENCIES_1) \ @HAVE_GUI_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @HAVE_GUI_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @HAVE_GUI_TRUE@ $(am__DEPENDENCIES_1) src_ui_gui_psppire_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) \ $(src_ui_gui_psppire_LDFLAGS) $(LDFLAGS) -o $@ am__src_ui_gui_spreadsheet_test_SOURCES_DIST = \ src/ui/gui/spreadsheet-test.c \ src/ui/gui/psppire-spreadsheet-model.c @HAVE_GUI_TRUE@am_src_ui_gui_spreadsheet_test_OBJECTS = src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.$(OBJEXT) \ @HAVE_GUI_TRUE@ src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.$(OBJEXT) src_ui_gui_spreadsheet_test_OBJECTS = \ $(am_src_ui_gui_spreadsheet_test_OBJECTS) @HAVE_GUI_TRUE@src_ui_gui_spreadsheet_test_DEPENDENCIES = \ @HAVE_GUI_TRUE@ src/libpspp-core.la $(am__DEPENDENCIES_1) \ @HAVE_GUI_TRUE@ $(am__DEPENDENCIES_1) src_ui_gui_spreadsheet_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(src_ui_gui_spreadsheet_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_src_ui_terminal_pspp_OBJECTS = src_ui_terminal_pspp_OBJECTS = $(am_src_ui_terminal_pspp_OBJECTS) src_ui_terminal_pspp_DEPENDENCIES = src/ui/terminal/libui.la \ src/ui/libuicommon.la src/libpspp.la src/libpspp-core.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) src_ui_terminal_pspp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(src_ui_terminal_pspp_LDFLAGS) \ $(LDFLAGS) -o $@ am_tests_data_datasheet_test_OBJECTS = \ tests/data/tests_data_datasheet_test-datasheet-test.$(OBJEXT) tests_data_datasheet_test_OBJECTS = \ $(am_tests_data_datasheet_test_OBJECTS) tests_data_datasheet_test_DEPENDENCIES = src/libpspp-core.la tests_data_datasheet_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(tests_data_datasheet_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_tests_data_inexactify_OBJECTS = tests/data/inexactify.$(OBJEXT) tests_data_inexactify_OBJECTS = $(am_tests_data_inexactify_OBJECTS) tests_data_inexactify_LDADD = $(LDADD) tests_data_inexactify_DEPENDENCIES = gl/libgl.la am_tests_data_sack_OBJECTS = \ tests/data/tests_data_sack-sack.$(OBJEXT) tests_data_sack_OBJECTS = $(am_tests_data_sack_OBJECTS) tests_data_sack_DEPENDENCIES = src/libpspp-core.la tests_data_sack_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(tests_data_sack_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am_tests_language_lexer_command_name_test_OBJECTS = src/data/tests_language_lexer_command_name_test-identifier.$(OBJEXT) \ src/language/lexer/tests_language_lexer_command_name_test-command-name.$(OBJEXT) \ tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.$(OBJEXT) tests_language_lexer_command_name_test_OBJECTS = \ $(am_tests_language_lexer_command_name_test_OBJECTS) tests_language_lexer_command_name_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la tests_language_lexer_command_name_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(tests_language_lexer_command_name_test_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_tests_language_lexer_scan_test_OBJECTS = \ src/data/tests_language_lexer_scan_test-identifier.$(OBJEXT) \ src/language/lexer/tests_language_lexer_scan_test-command-name.$(OBJEXT) \ src/language/lexer/tests_language_lexer_scan_test-scan.$(OBJEXT) \ src/language/lexer/tests_language_lexer_scan_test-segment.$(OBJEXT) \ src/language/lexer/tests_language_lexer_scan_test-token.$(OBJEXT) \ tests/language/lexer/tests_language_lexer_scan_test-scan-test.$(OBJEXT) tests_language_lexer_scan_test_OBJECTS = \ $(am_tests_language_lexer_scan_test_OBJECTS) tests_language_lexer_scan_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la tests_language_lexer_scan_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_tests_language_lexer_segment_test_OBJECTS = src/data/tests_language_lexer_segment_test-identifier.$(OBJEXT) \ src/language/lexer/tests_language_lexer_segment_test-command-name.$(OBJEXT) \ src/language/lexer/tests_language_lexer_segment_test-segment.$(OBJEXT) \ tests/language/lexer/tests_language_lexer_segment_test-segment-test.$(OBJEXT) tests_language_lexer_segment_test_OBJECTS = \ $(am_tests_language_lexer_segment_test_OBJECTS) tests_language_lexer_segment_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la tests_language_lexer_segment_test_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CCLD) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_tests_libpspp_abt_test_OBJECTS = \ src/libpspp/tests_libpspp_abt_test-abt.$(OBJEXT) \ tests/libpspp/tests_libpspp_abt_test-abt-test.$(OBJEXT) tests_libpspp_abt_test_OBJECTS = $(am_tests_libpspp_abt_test_OBJECTS) tests_libpspp_abt_test_LDADD = $(LDADD) tests_libpspp_abt_test_DEPENDENCIES = gl/libgl.la am_tests_libpspp_bt_test_OBJECTS = \ src/libpspp/tests_libpspp_bt_test-bt.$(OBJEXT) \ tests/libpspp/tests_libpspp_bt_test-bt-test.$(OBJEXT) tests_libpspp_bt_test_OBJECTS = $(am_tests_libpspp_bt_test_OBJECTS) tests_libpspp_bt_test_LDADD = $(LDADD) tests_libpspp_bt_test_DEPENDENCIES = gl/libgl.la am_tests_libpspp_cmac_aes256_test_OBJECTS = src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.$(OBJEXT) \ tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.$(OBJEXT) tests_libpspp_cmac_aes256_test_OBJECTS = \ $(am_tests_libpspp_cmac_aes256_test_OBJECTS) tests_libpspp_cmac_aes256_test_LDADD = $(LDADD) tests_libpspp_cmac_aes256_test_DEPENDENCIES = gl/libgl.la am_tests_libpspp_encoding_guesser_test_OBJECTS = \ tests/libpspp/encoding-guesser-test.$(OBJEXT) tests_libpspp_encoding_guesser_test_OBJECTS = \ $(am_tests_libpspp_encoding_guesser_test_OBJECTS) tests_libpspp_encoding_guesser_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la am_tests_libpspp_heap_test_OBJECTS = \ tests/libpspp/tests_libpspp_heap_test-heap-test.$(OBJEXT) tests_libpspp_heap_test_OBJECTS = \ $(am_tests_libpspp_heap_test_OBJECTS) tests_libpspp_heap_test_DEPENDENCIES = src/libpspp/liblibpspp.la \ gl/libgl.la am_tests_libpspp_hmap_test_OBJECTS = \ src/libpspp/tests_libpspp_hmap_test-hmap.$(OBJEXT) \ tests/libpspp/tests_libpspp_hmap_test-hmap-test.$(OBJEXT) tests_libpspp_hmap_test_OBJECTS = \ $(am_tests_libpspp_hmap_test_OBJECTS) tests_libpspp_hmap_test_LDADD = $(LDADD) tests_libpspp_hmap_test_DEPENDENCIES = gl/libgl.la am_tests_libpspp_hmapx_test_OBJECTS = \ src/libpspp/tests_libpspp_hmapx_test-hmap.$(OBJEXT) \ src/libpspp/tests_libpspp_hmapx_test-hmapx.$(OBJEXT) \ tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.$(OBJEXT) tests_libpspp_hmapx_test_OBJECTS = \ $(am_tests_libpspp_hmapx_test_OBJECTS) tests_libpspp_hmapx_test_LDADD = $(LDADD) tests_libpspp_hmapx_test_DEPENDENCIES = gl/libgl.la am_tests_libpspp_i18n_test_OBJECTS = \ tests/libpspp/i18n-test.$(OBJEXT) tests_libpspp_i18n_test_OBJECTS = \ $(am_tests_libpspp_i18n_test_OBJECTS) tests_libpspp_i18n_test_DEPENDENCIES = src/libpspp/liblibpspp.la \ gl/libgl.la am_tests_libpspp_line_reader_test_OBJECTS = \ tests/libpspp/line-reader-test.$(OBJEXT) tests_libpspp_line_reader_test_OBJECTS = \ $(am_tests_libpspp_line_reader_test_OBJECTS) tests_libpspp_line_reader_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la am_tests_libpspp_ll_test_OBJECTS = \ src/libpspp/tests_libpspp_ll_test-ll.$(OBJEXT) \ tests/libpspp/tests_libpspp_ll_test-ll-test.$(OBJEXT) tests_libpspp_ll_test_OBJECTS = $(am_tests_libpspp_ll_test_OBJECTS) tests_libpspp_ll_test_LDADD = $(LDADD) tests_libpspp_ll_test_DEPENDENCIES = gl/libgl.la tests_libpspp_ll_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(tests_libpspp_ll_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_tests_libpspp_llx_test_OBJECTS = \ src/libpspp/tests_libpspp_llx_test-ll.$(OBJEXT) \ src/libpspp/tests_libpspp_llx_test-llx.$(OBJEXT) \ tests/libpspp/tests_libpspp_llx_test-llx-test.$(OBJEXT) tests_libpspp_llx_test_OBJECTS = $(am_tests_libpspp_llx_test_OBJECTS) tests_libpspp_llx_test_LDADD = $(LDADD) tests_libpspp_llx_test_DEPENDENCIES = gl/libgl.la tests_libpspp_llx_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_tests_libpspp_range_map_test_OBJECTS = \ src/libpspp/tests_libpspp_range_map_test-bt.$(OBJEXT) \ src/libpspp/tests_libpspp_range_map_test-range-map.$(OBJEXT) \ tests/libpspp/tests_libpspp_range_map_test-range-map-test.$(OBJEXT) tests_libpspp_range_map_test_OBJECTS = \ $(am_tests_libpspp_range_map_test_OBJECTS) tests_libpspp_range_map_test_LDADD = $(LDADD) tests_libpspp_range_map_test_DEPENDENCIES = gl/libgl.la am_tests_libpspp_range_set_test_OBJECTS = tests/libpspp/tests_libpspp_range_set_test-range-set-test.$(OBJEXT) tests_libpspp_range_set_test_OBJECTS = \ $(am_tests_libpspp_range_set_test_OBJECTS) tests_libpspp_range_set_test_DEPENDENCIES = src/libpspp/liblibpspp.la \ gl/libgl.la am_tests_libpspp_range_tower_test_OBJECTS = tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.$(OBJEXT) tests_libpspp_range_tower_test_OBJECTS = \ $(am_tests_libpspp_range_tower_test_OBJECTS) tests_libpspp_range_tower_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la am_tests_libpspp_sparse_array_test_OBJECTS = tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.$(OBJEXT) tests_libpspp_sparse_array_test_OBJECTS = \ $(am_tests_libpspp_sparse_array_test_OBJECTS) tests_libpspp_sparse_array_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la am_tests_libpspp_sparse_xarray_test_OBJECTS = tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.$(OBJEXT) tests_libpspp_sparse_xarray_test_OBJECTS = \ $(am_tests_libpspp_sparse_xarray_test_OBJECTS) tests_libpspp_sparse_xarray_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la src/libpspp-core.la gl/libgl.la am_tests_libpspp_str_test_OBJECTS = tests/libpspp/str-test.$(OBJEXT) tests_libpspp_str_test_OBJECTS = $(am_tests_libpspp_str_test_OBJECTS) tests_libpspp_str_test_DEPENDENCIES = src/libpspp/liblibpspp.la \ gl/libgl.la am_tests_libpspp_string_map_test_OBJECTS = tests/libpspp/tests_libpspp_string_map_test-string-map-test.$(OBJEXT) tests_libpspp_string_map_test_OBJECTS = \ $(am_tests_libpspp_string_map_test_OBJECTS) tests_libpspp_string_map_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la am_tests_libpspp_string_set_test_OBJECTS = src/libpspp/tests_libpspp_string_set_test-hash-functions.$(OBJEXT) \ src/libpspp/tests_libpspp_string_set_test-hmap.$(OBJEXT) \ src/libpspp/tests_libpspp_string_set_test-string-set.$(OBJEXT) \ tests/libpspp/tests_libpspp_string_set_test-string-set-test.$(OBJEXT) tests_libpspp_string_set_test_OBJECTS = \ $(am_tests_libpspp_string_set_test_OBJECTS) tests_libpspp_string_set_test_LDADD = $(LDADD) tests_libpspp_string_set_test_DEPENDENCIES = gl/libgl.la am_tests_libpspp_stringi_map_test_OBJECTS = tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.$(OBJEXT) tests_libpspp_stringi_map_test_OBJECTS = \ $(am_tests_libpspp_stringi_map_test_OBJECTS) tests_libpspp_stringi_map_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la am_tests_libpspp_stringi_set_test_OBJECTS = tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.$(OBJEXT) tests_libpspp_stringi_set_test_OBJECTS = \ $(am_tests_libpspp_stringi_set_test_OBJECTS) tests_libpspp_stringi_set_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la am_tests_libpspp_tower_test_OBJECTS = \ tests/libpspp/tests_libpspp_tower_test-tower-test.$(OBJEXT) tests_libpspp_tower_test_OBJECTS = \ $(am_tests_libpspp_tower_test_OBJECTS) tests_libpspp_tower_test_DEPENDENCIES = src/libpspp/liblibpspp.la \ gl/libgl.la am_tests_libpspp_u8_istream_test_OBJECTS = \ tests/libpspp/u8-istream-test.$(OBJEXT) tests_libpspp_u8_istream_test_OBJECTS = \ $(am_tests_libpspp_u8_istream_test_OBJECTS) tests_libpspp_u8_istream_test_DEPENDENCIES = \ src/libpspp/liblibpspp.la gl/libgl.la am_tests_libpspp_zip_test_OBJECTS = \ tests/libpspp/tests_libpspp_zip_test-zip-test.$(OBJEXT) tests_libpspp_zip_test_OBJECTS = $(am_tests_libpspp_zip_test_OBJECTS) tests_libpspp_zip_test_DEPENDENCIES = src/libpspp/liblibpspp.la \ src/libpspp-core.la gl/libgl.la tests_libpspp_zip_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(tests_libpspp_zip_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_tests_math_chart_get_scale_test_OBJECTS = \ tests/math/chart-get-scale-test.$(OBJEXT) tests_math_chart_get_scale_test_OBJECTS = \ $(am_tests_math_chart_get_scale_test_OBJECTS) tests_math_chart_get_scale_test_DEPENDENCIES = \ src/math/libpspp-math.la src/libpspp/liblibpspp.la \ src/libpspp-core.la gl/libgl.la am_tests_math_chart_get_ticks_format_test_OBJECTS = \ tests/math/chart-get-ticks-format-test.$(OBJEXT) tests_math_chart_get_ticks_format_test_OBJECTS = \ $(am_tests_math_chart_get_ticks_format_test_OBJECTS) tests_math_chart_get_ticks_format_test_DEPENDENCIES = \ src/math/libpspp-math.la src/libpspp/liblibpspp.la \ src/libpspp-core.la gl/libgl.la am_tests_output_render_test_OBJECTS = \ tests/output/render-test.$(OBJEXT) tests_output_render_test_OBJECTS = \ $(am_tests_output_render_test_OBJECTS) tests_output_render_test_DEPENDENCIES = src/libpspp.la \ src/libpspp-core.la $(am__DEPENDENCIES_1) am_tests_ui_syntax_gen_test_OBJECTS = \ tests/ui/syntax-gen-test.$(OBJEXT) tests_ui_syntax_gen_test_OBJECTS = \ $(am_tests_ui_syntax_gen_test_OBJECTS) tests_ui_syntax_gen_test_DEPENDENCIES = src/ui/libuicommon.la \ src/libpspp-core.la $(am__DEPENDENCIES_1) am_utilities_pspp_convert_OBJECTS = \ utilities/utilities_pspp_convert-pspp-convert.$(OBJEXT) utilities_pspp_convert_OBJECTS = $(am_utilities_pspp_convert_OBJECTS) utilities_pspp_convert_DEPENDENCIES = src/libpspp-core.la utilities_pspp_convert_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(utilities_pspp_convert_LDFLAGS) \ $(LDFLAGS) -o $@ am_utilities_pspp_dump_sav_OBJECTS = \ src/libpspp/utilities_pspp_dump_sav-integer-format.$(OBJEXT) \ src/libpspp/utilities_pspp_dump_sav-float-format.$(OBJEXT) \ utilities/utilities_pspp_dump_sav-pspp-dump-sav.$(OBJEXT) utilities_pspp_dump_sav_OBJECTS = \ $(am_utilities_pspp_dump_sav_OBJECTS) utilities_pspp_dump_sav_LDADD = $(LDADD) utilities_pspp_dump_sav_DEPENDENCIES = gl/libgl.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lib_gtk_contrib_libxpaned_a_SOURCES) \ $(lib_linreg_liblinreg_la_SOURCES) \ $(lib_tukey_libtukey_la_SOURCES) \ $(libglade_psppire_la_SOURCES) $(src_data_libdata_la_SOURCES) \ $(src_language_liblanguage_la_SOURCES) \ $(nodist_src_language_liblanguage_la_SOURCES) \ $(src_libpspp_core_la_SOURCES) $(src_libpspp_la_SOURCES) \ $(src_libpspp_liblibpspp_la_SOURCES) \ $(nodist_src_libpspp_liblibpspp_la_SOURCES) \ $(src_math_libpspp_math_la_SOURCES) \ $(src_output_liboutput_la_SOURCES) \ $(src_ui_libuicommon_la_SOURCES) \ $(src_ui_terminal_libui_la_SOURCES) \ $(src_ui_gui_psppire_SOURCES) \ $(nodist_src_ui_gui_psppire_SOURCES) \ $(src_ui_gui_spreadsheet_test_SOURCES) \ $(src_ui_terminal_pspp_SOURCES) \ $(tests_data_datasheet_test_SOURCES) \ $(tests_data_inexactify_SOURCES) $(tests_data_sack_SOURCES) \ $(tests_language_lexer_command_name_test_SOURCES) \ $(tests_language_lexer_scan_test_SOURCES) \ $(tests_language_lexer_segment_test_SOURCES) \ $(tests_libpspp_abt_test_SOURCES) \ $(tests_libpspp_bt_test_SOURCES) \ $(tests_libpspp_cmac_aes256_test_SOURCES) \ $(tests_libpspp_encoding_guesser_test_SOURCES) \ $(tests_libpspp_heap_test_SOURCES) \ $(tests_libpspp_hmap_test_SOURCES) \ $(tests_libpspp_hmapx_test_SOURCES) \ $(tests_libpspp_i18n_test_SOURCES) \ $(tests_libpspp_line_reader_test_SOURCES) \ $(tests_libpspp_ll_test_SOURCES) \ $(tests_libpspp_llx_test_SOURCES) \ $(tests_libpspp_range_map_test_SOURCES) \ $(tests_libpspp_range_set_test_SOURCES) \ $(tests_libpspp_range_tower_test_SOURCES) \ $(tests_libpspp_sparse_array_test_SOURCES) \ $(tests_libpspp_sparse_xarray_test_SOURCES) \ $(tests_libpspp_str_test_SOURCES) \ $(tests_libpspp_string_map_test_SOURCES) \ $(tests_libpspp_string_set_test_SOURCES) \ $(tests_libpspp_stringi_map_test_SOURCES) \ $(tests_libpspp_stringi_set_test_SOURCES) \ $(tests_libpspp_tower_test_SOURCES) \ $(tests_libpspp_u8_istream_test_SOURCES) \ $(tests_libpspp_zip_test_SOURCES) \ $(tests_math_chart_get_scale_test_SOURCES) \ $(tests_math_chart_get_ticks_format_test_SOURCES) \ $(tests_output_render_test_SOURCES) \ $(tests_ui_syntax_gen_test_SOURCES) \ $(utilities_pspp_convert_SOURCES) \ $(utilities_pspp_dump_sav_SOURCES) DIST_SOURCES = $(am__lib_gtk_contrib_libxpaned_a_SOURCES_DIST) \ $(lib_linreg_liblinreg_la_SOURCES) \ $(lib_tukey_libtukey_la_SOURCES) \ $(am__libglade_psppire_la_SOURCES_DIST) \ $(src_data_libdata_la_SOURCES) \ $(src_language_liblanguage_la_SOURCES) \ $(src_libpspp_core_la_SOURCES) $(src_libpspp_la_SOURCES) \ $(src_libpspp_liblibpspp_la_SOURCES) \ $(src_math_libpspp_math_la_SOURCES) \ $(am__src_output_liboutput_la_SOURCES_DIST) \ $(src_ui_libuicommon_la_SOURCES) \ $(src_ui_terminal_libui_la_SOURCES) \ $(am__src_ui_gui_psppire_SOURCES_DIST) \ $(am__src_ui_gui_spreadsheet_test_SOURCES_DIST) \ $(src_ui_terminal_pspp_SOURCES) \ $(tests_data_datasheet_test_SOURCES) \ $(tests_data_inexactify_SOURCES) $(tests_data_sack_SOURCES) \ $(tests_language_lexer_command_name_test_SOURCES) \ $(tests_language_lexer_scan_test_SOURCES) \ $(tests_language_lexer_segment_test_SOURCES) \ $(tests_libpspp_abt_test_SOURCES) \ $(tests_libpspp_bt_test_SOURCES) \ $(tests_libpspp_cmac_aes256_test_SOURCES) \ $(tests_libpspp_encoding_guesser_test_SOURCES) \ $(tests_libpspp_heap_test_SOURCES) \ $(tests_libpspp_hmap_test_SOURCES) \ $(tests_libpspp_hmapx_test_SOURCES) \ $(tests_libpspp_i18n_test_SOURCES) \ $(tests_libpspp_line_reader_test_SOURCES) \ $(tests_libpspp_ll_test_SOURCES) \ $(tests_libpspp_llx_test_SOURCES) \ $(tests_libpspp_range_map_test_SOURCES) \ $(tests_libpspp_range_set_test_SOURCES) \ $(tests_libpspp_range_tower_test_SOURCES) \ $(tests_libpspp_sparse_array_test_SOURCES) \ $(tests_libpspp_sparse_xarray_test_SOURCES) \ $(tests_libpspp_str_test_SOURCES) \ $(tests_libpspp_string_map_test_SOURCES) \ $(tests_libpspp_string_set_test_SOURCES) \ $(tests_libpspp_stringi_map_test_SOURCES) \ $(tests_libpspp_stringi_set_test_SOURCES) \ $(tests_libpspp_tower_test_SOURCES) \ $(tests_libpspp_u8_istream_test_SOURCES) \ $(tests_libpspp_zip_test_SOURCES) \ $(tests_math_chart_get_scale_test_SOURCES) \ $(tests_math_chart_get_ticks_format_test_SOURCES) \ $(tests_output_render_test_SOURCES) \ $(tests_ui_syntax_gen_test_SOURCES) \ $(utilities_pspp_convert_SOURCES) \ $(utilities_pspp_dump_sav_SOURCES) AM_V_DVIPS = $(am__v_DVIPS_@AM_V@) am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@) am__v_DVIPS_0 = @echo " DVIPS " $@; am__v_DVIPS_1 = AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@) am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@) am__v_MAKEINFO_0 = @echo " MAKEINFO" $@; am__v_MAKEINFO_1 = AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@) am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@) am__v_INFOHTML_0 = @echo " INFOHTML" $@; am__v_INFOHTML_1 = AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@) am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@) am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@; am__v_TEXI2DVI_1 = AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@) am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@) am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@; am__v_TEXI2PDF_1 = AM_V_texinfo = $(am__v_texinfo_@AM_V@) am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@) am__v_texinfo_0 = -q am__v_texinfo_1 = AM_V_texidevnull = $(am__v_texidevnull_@AM_V@) am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) am__v_texidevnull_0 = > /dev/null am__v_texidevnull_1 = INFO_DEPS = $(srcdir)/doc/pspp.info $(srcdir)/doc/pspp-dev.info TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux DVIS = doc/pspp.dvi doc/pspp-dev.dvi PDFS = doc/pspp.pdf doc/pspp-dev.pdf PSS = doc/pspp.ps doc/pspp-dev.ps HTMLS = doc/pspp.html doc/pspp-dev.html TEXINFOS = doc/pspp.texi doc/pspp-dev.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) am__dist_appdata_DATA_DIST = src/ui/gui/pspp.appdata.xml am__dist_catalog_DATA_DIST = glade/psppire.xml am__dist_large_pixmap_DATA_DIST = \ glade/icons/22x22/widget-psppire-psppire-acr.png \ glade/icons/22x22/widget-psppire-psppire-dialog.png \ glade/icons/22x22/widget-psppire-psppire-keypad.png \ glade/icons/22x22/widget-psppire-psppire-selector.png am__dist_small_pixmap_DATA_DIST = \ glade/icons/16x16/widget-psppire-psppire-acr.png \ glade/icons/16x16/widget-psppire-psppire-dialog.png \ glade/icons/16x16/widget-psppire-psppire-keypad.png \ glade/icons/16x16/widget-psppire-psppire-selector.png am__dist_src_ui_gui_psppire_DATA_DIST = src/ui/gui/aggregate.ui \ src/ui/gui/autorecode.ui src/ui/gui/binomial.ui \ src/ui/gui/compute.ui src/ui/gui/barchart.ui \ src/ui/gui/correlation.ui src/ui/gui/count.ui \ src/ui/gui/comments.ui src/ui/gui/crosstabs.ui \ src/ui/gui/chi-square.ui src/ui/gui/descriptives.ui \ src/ui/gui/entry-dialog.ui src/ui/gui/examine.ui \ src/ui/gui/goto-case.ui src/ui/gui/factor.ui \ src/ui/gui/find.ui src/ui/gui/frequencies.ui \ src/ui/gui/histogram.ui src/ui/gui/indep-samples.ui \ src/ui/gui/k-independent.ui src/ui/gui/k-means.ui \ src/ui/gui/k-related.ui src/ui/gui/ks-one-sample.ui \ src/ui/gui/logistic.ui src/ui/gui/means.ui \ src/ui/gui/missing-val-dialog.ui src/ui/gui/oneway.ui \ src/ui/gui/options.ui src/ui/gui/paired-samples.ui \ src/ui/gui/rank.ui src/ui/gui/runs.ui src/ui/gui/sort.ui \ src/ui/gui/split-file.ui src/ui/gui/recode.ui \ src/ui/gui/regression.ui src/ui/gui/reliability.ui \ src/ui/gui/roc.ui src/ui/gui/scatterplot.ui \ src/ui/gui/select-cases.ui src/ui/gui/t-test.ui \ src/ui/gui/text-data-import.ui src/ui/gui/transpose.ui \ src/ui/gui/univariate.ui src/ui/gui/val-labs-dialog.ui \ src/ui/gui/variable-info.ui src/ui/gui/data-editor.ui \ src/ui/gui/output-window.ui src/ui/gui/syntax-editor.ui \ src/ui/gui/var-type-dialog.ui src/ui/gui/weight.ui \ $(top_srcdir)/src/ui/gui/pspp.lang \ $(top_srcdir)/src/ui/gui/psppire.gtkrc DATA = $(desktop_DATA) $(dist_appdata_DATA) $(dist_catalog_DATA) \ $(dist_docbook_DATA) $(dist_large_pixmap_DATA) \ $(dist_small_pixmap_DATA) $(dist_src_ui_gui_psppire_DATA) \ $(examples_DATA) $(nodist_src_ui_gui_psppire_DATA) am__noinst_HEADERS_DIST = ONEWS pspp-mode.el build-aux/svg2png \ build-aux/icon-list po/cs.po po/en_GB.po po/ca.po po/de.po \ po/el.po po/es.po po/fr.po po/gl.po po/hu.po po/ja.po po/lt.po \ po/nl.po po/pl.po po/pt_BR.po po/ru.po po/sl.po po/tr.po \ po/uk.po po/zh_CN.po po/$(DOMAIN).pot po/ChangeLog \ po/cs.po,aux lib/tukey/README lib/gtk-contrib/README \ lib/gtk-contrib/COPYING.LESSER doc/get-commands.pl \ doc/help-pages-list examples/t-test.sps examples/descript.sps \ examples/grid.sps examples/hotel.sav examples/physiology.sav \ examples/repairs.sav examples/regress.sps \ examples/regress_categorical.sps src/data/sys-file-encoding.pl \ src/output/README src/output/mk-class-boilerplate \ src/language/lexer/q2c.c src/language/utilities/set.q \ src/language/stats/glm.c src/language/stats/crosstabs.q \ src/language/expressions/generate.pl \ src/language/expressions/operations.def \ src/language/expressions/TODO src/ui/gui/memorandum.txt \ src/ui/gui/gen-dot-desktop.sh src/ui/gui/marshaller-list \ src/ui/gui/pspplogo.svg src/ui/gui/include/gtk/gtk.in.h \ src/ui/gui/resources.xml \ src/ui/gui/icons/16x16/categories/align-left.png \ src/ui/gui/icons/16x16/categories/align-center.png \ src/ui/gui/icons/16x16/categories/align-right.png \ src/ui/gui/icons/16x16/categories/measure-scale.png \ src/ui/gui/icons/16x16/categories/measure-ordinal.png \ src/ui/gui/icons/16x16/categories/measure-nominal.png \ src/ui/gui/icons/16x16/categories/measure-date-scale.png \ src/ui/gui/icons/16x16/categories/measure-date-nominal.png \ src/ui/gui/icons/16x16/categories/measure-date-ordinal.png \ src/ui/gui/icons/16x16/categories/measure-time-scale.png \ src/ui/gui/icons/16x16/categories/measure-time-nominal.png \ src/ui/gui/icons/16x16/categories/measure-time-ordinal.png \ src/ui/gui/icons/16x16/categories/measure-string-nominal.png \ src/ui/gui/icons/16x16/categories/measure-string-ordinal.png \ src/ui/gui/icons/16x16/categories/measure-currency-scale.png \ src/ui/gui/icons/16x16/categories/measure-currency-nominal.png \ src/ui/gui/icons/16x16/categories/measure-currency-ordinal.png \ src/ui/gui/icons/16x16/categories/role-input.png \ src/ui/gui/icons/16x16/categories/role-target.png \ src/ui/gui/icons/16x16/categories/role-both.png \ src/ui/gui/icons/16x16/categories/role-none.png \ src/ui/gui/icons/16x16/categories/role-partition.png \ src/ui/gui/icons/16x16/categories/role-split.png \ src/ui/gui/icons/32x32/actions/data-split-file.png \ src/ui/gui/icons/32x32/actions/data-select-cases.png \ src/ui/gui/icons/32x32/actions/data-weight-cases.png \ src/ui/gui/icons/32x32/actions/transform-compute.png \ src/ui/gui/icons/32x32/actions/edit-find.png \ src/ui/gui/icons/32x32/actions/edit-go-to-case.png \ src/ui/gui/icons/32x32/actions/edit-go-to-variable.png \ src/ui/gui/icons/32x32/actions/edit-insert-case.png \ src/ui/gui/icons/32x32/actions/edit-insert-variable.png \ src/ui/gui/icons/32x32/actions/edit-cut.png \ src/ui/gui/icons/32x32/actions/edit-copy.png \ src/ui/gui/icons/32x32/actions/edit-paste.png \ src/ui/gui/icons/32x32/actions/edit-undo.png \ src/ui/gui/icons/32x32/actions/edit-redo.png \ src/ui/gui/icons/32x32/actions/edit-select-all.png \ src/ui/gui/icons/32x32/actions/file-open-data.png \ src/ui/gui/icons/32x32/actions/file-save-data.png \ src/ui/gui/icons/32x32/actions/file-export-data.png \ src/ui/gui/icons/32x32/actions/file-print.png \ src/ui/gui/icons/32x32/actions/view-value-labels.png \ src/ui/gui/icons/32x32/actions/utilities-variables.png \ src/ui/gui/icons/32x32/actions/run-all.png \ src/ui/gui/icons/24x24/actions/data-split-file.png \ src/ui/gui/icons/24x24/actions/data-select-cases.png \ src/ui/gui/icons/24x24/actions/data-weight-cases.png \ src/ui/gui/icons/24x24/actions/transform-compute.png \ src/ui/gui/icons/24x24/actions/edit-find.png \ src/ui/gui/icons/24x24/actions/edit-go-to-case.png \ src/ui/gui/icons/24x24/actions/edit-go-to-variable.png \ src/ui/gui/icons/24x24/actions/edit-insert-case.png \ src/ui/gui/icons/24x24/actions/edit-insert-variable.png \ src/ui/gui/icons/24x24/actions/edit-cut.png \ src/ui/gui/icons/24x24/actions/edit-copy.png \ src/ui/gui/icons/24x24/actions/edit-paste.png \ src/ui/gui/icons/24x24/actions/edit-undo.png \ src/ui/gui/icons/24x24/actions/edit-redo.png \ src/ui/gui/icons/24x24/actions/edit-select-all.png \ src/ui/gui/icons/24x24/actions/file-open-data.png \ src/ui/gui/icons/24x24/actions/file-save-data.png \ src/ui/gui/icons/24x24/actions/file-export-data.png \ src/ui/gui/icons/24x24/actions/file-print.png \ src/ui/gui/icons/24x24/actions/view-value-labels.png \ src/ui/gui/icons/24x24/actions/utilities-variables.png \ src/ui/gui/icons/24x24/actions/run-all.png \ src/ui/gui/icons/16x16/actions/file-new-data.png \ src/ui/gui/icons/16x16/actions/file-syntax-data.png \ src/ui/gui/icons/16x16/actions/file-system-data.png \ src/ui/gui/icons/16x16/actions/file-open-data.png \ src/ui/gui/icons/16x16/actions/file-import-data.png \ src/ui/gui/icons/16x16/actions/file-export-data.png \ src/ui/gui/icons/16x16/actions/file-save-data.png \ src/ui/gui/icons/16x16/actions/file-save-as.png \ src/ui/gui/icons/16x16/actions/file-print.png \ src/ui/gui/icons/16x16/actions/file-rename-data-set.png \ src/ui/gui/icons/16x16/actions/file-display-information.png \ src/ui/gui/icons/16x16/actions/display-information-working-file.png \ src/ui/gui/icons/16x16/actions/display-information-external-file.png \ src/ui/gui/icons/16x16/actions/file-recently-used.png \ src/ui/gui/icons/16x16/actions/file-quit.png \ src/ui/gui/icons/16x16/actions/edit-insert-variable.png \ src/ui/gui/icons/16x16/actions/edit-insert-case.png \ src/ui/gui/icons/16x16/actions/edit-go-to-variable.png \ src/ui/gui/icons/16x16/actions/edit-go-to-case.png \ src/ui/gui/icons/16x16/actions/edit-cut.png \ src/ui/gui/icons/16x16/actions/edit-copy.png \ src/ui/gui/icons/16x16/actions/edit-paste.png \ src/ui/gui/icons/16x16/actions/edit-delete.png \ src/ui/gui/icons/16x16/actions/edit-undo.png \ src/ui/gui/icons/16x16/actions/edit-redo.png \ src/ui/gui/icons/16x16/actions/edit-select-all.png \ src/ui/gui/icons/16x16/actions/edit-clear.png \ src/ui/gui/icons/16x16/actions/edit-find.png \ src/ui/gui/icons/16x16/actions/view-font.png \ src/ui/gui/icons/16x16/actions/view-value-labels.png \ src/ui/gui/icons/16x16/actions/data-sort-cases.png \ src/ui/gui/icons/16x16/actions/data-transpose.png \ src/ui/gui/icons/16x16/actions/data-aggregate.png \ src/ui/gui/icons/16x16/actions/data-split-file.png \ src/ui/gui/icons/16x16/actions/data-select-cases.png \ src/ui/gui/icons/16x16/actions/data-weight-cases.png \ src/ui/gui/icons/16x16/actions/run-all.png \ src/ui/gui/icons/16x16/actions/run-selection.png \ src/ui/gui/icons/16x16/actions/run-current-line.png \ src/ui/gui/icons/16x16/actions/run-to-end.png \ src/ui/gui/icons/16x16/actions/transform-compute.png \ src/ui/gui/icons/16x16/actions/transform-count.png \ src/ui/gui/icons/16x16/actions/transform-rank-cases.png \ src/ui/gui/icons/16x16/actions/transform-automatic-recode.png \ src/ui/gui/icons/16x16/actions/transform-in-to-same-variables.png \ src/ui/gui/icons/16x16/actions/transform-in-to-different-variables.png \ src/ui/gui/icons/16x16/actions/transform-run-pending.png \ src/ui/gui/icons/16x16/actions/analyze-descriptive-statistics.png \ src/ui/gui/icons/16x16/actions/analyze-compare-means.png \ src/ui/gui/icons/16x16/actions/analyze-univariate-analysis.png \ src/ui/gui/icons/16x16/actions/analyze-bivariate-correlation.png \ src/ui/gui/icons/16x16/actions/analyze-kmeans-cluster.png \ src/ui/gui/icons/16x16/actions/analyze-factor-analysis.png \ src/ui/gui/icons/16x16/actions/analyze-reliability.png \ src/ui/gui/icons/16x16/actions/analyze-regression.png \ src/ui/gui/icons/16x16/actions/analyze-non-parametric-statistics.png \ src/ui/gui/icons/16x16/actions/analyze-roc-curve.png \ src/ui/gui/icons/16x16/actions/utilities-variables.png \ src/ui/gui/icons/16x16/actions/utilities-data-file-comments.png \ src/ui/gui/icons/16x16/actions/windows-minimize-all.png \ src/ui/gui/icons/16x16/actions/windows-split.png \ src/ui/gui/icons/16x16/actions/help-reference-manual.png \ src/ui/gui/icons/16x16/actions/help-about.png \ src/ui/gui/icons/32x32/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/32x32/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/32x32/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/32x32/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/22x22/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/22x22/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/22x22/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/22x22/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/24x24/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/24x24/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/24x24/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/24x24/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/256x256/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/256x256/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/256x256/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/256x256/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/16x16/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/16x16/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/16x16/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/16x16/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/48x48/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/48x48/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/48x48/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/48x48/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/32x32/apps/pspp.png \ src/ui/gui/icons/22x22/apps/pspp.png \ src/ui/gui/icons/24x24/apps/pspp.png \ src/ui/gui/icons/16x16/apps/pspp.png \ src/ui/gui/icons/48x48/apps/pspp.png \ src/ui/gui/icons/256x256/apps/pspp.png \ src/ui/gui/icons/scalable/apps/pspp.svg \ src/ui/gui/icons/splash-t.png src/ui/gui/icons/splash-r.png \ src/ui/gui/artwork/16x16/categories/align-left.svg \ src/ui/gui/artwork/16x16/categories/align-center.svg \ src/ui/gui/artwork/16x16/categories/align-right.svg \ src/ui/gui/artwork/16x16/categories/measure-scale.svg \ src/ui/gui/artwork/16x16/categories/measure-ordinal.svg \ src/ui/gui/artwork/16x16/categories/measure-nominal.svg \ src/ui/gui/artwork/16x16/categories/measure-date-scale.svg \ src/ui/gui/artwork/16x16/categories/measure-date-nominal.svg \ src/ui/gui/artwork/16x16/categories/measure-date-ordinal.svg \ src/ui/gui/artwork/16x16/categories/measure-time-scale.svg \ src/ui/gui/artwork/16x16/categories/measure-time-nominal.svg \ src/ui/gui/artwork/16x16/categories/measure-time-ordinal.svg \ src/ui/gui/artwork/16x16/categories/measure-string-nominal.svg \ src/ui/gui/artwork/16x16/categories/measure-string-ordinal.svg \ src/ui/gui/artwork/16x16/categories/measure-currency-scale.svg \ src/ui/gui/artwork/16x16/categories/measure-currency-nominal.svg \ src/ui/gui/artwork/16x16/categories/measure-currency-ordinal.svg \ src/ui/gui/artwork/16x16/categories/role-input.svg \ src/ui/gui/artwork/16x16/categories/role-target.svg \ src/ui/gui/artwork/16x16/categories/role-both.svg \ src/ui/gui/artwork/16x16/categories/role-none.svg \ src/ui/gui/artwork/16x16/categories/role-partition.svg \ src/ui/gui/artwork/16x16/categories/role-split.svg \ src/ui/gui/artwork/32x32/actions/data-split-file.svg \ src/ui/gui/artwork/32x32/actions/data-select-cases.svg \ src/ui/gui/artwork/32x32/actions/data-weight-cases.svg \ src/ui/gui/artwork/32x32/actions/transform-compute.svg \ src/ui/gui/artwork/32x32/actions/edit-find.svg \ src/ui/gui/artwork/32x32/actions/edit-go-to-case.svg \ src/ui/gui/artwork/32x32/actions/edit-go-to-variable.svg \ src/ui/gui/artwork/32x32/actions/edit-insert-case.svg \ src/ui/gui/artwork/32x32/actions/edit-insert-variable.svg \ src/ui/gui/artwork/32x32/actions/edit-cut.svg \ src/ui/gui/artwork/32x32/actions/edit-copy.svg \ src/ui/gui/artwork/32x32/actions/edit-paste.svg \ src/ui/gui/artwork/32x32/actions/edit-undo.svg \ src/ui/gui/artwork/32x32/actions/edit-redo.svg \ src/ui/gui/artwork/32x32/actions/edit-select-all.svg \ src/ui/gui/artwork/32x32/actions/file-open-data.svg \ src/ui/gui/artwork/32x32/actions/file-save-data.svg \ src/ui/gui/artwork/32x32/actions/file-export-data.svg \ src/ui/gui/artwork/32x32/actions/file-print.svg \ src/ui/gui/artwork/32x32/actions/view-value-labels.svg \ src/ui/gui/artwork/32x32/actions/utilities-variables.svg \ src/ui/gui/artwork/32x32/actions/run-all.svg \ src/ui/gui/artwork/24x24/actions/data-split-file.svg \ src/ui/gui/artwork/24x24/actions/data-select-cases.svg \ src/ui/gui/artwork/24x24/actions/data-weight-cases.svg \ src/ui/gui/artwork/24x24/actions/transform-compute.svg \ src/ui/gui/artwork/24x24/actions/edit-find.svg \ src/ui/gui/artwork/24x24/actions/edit-go-to-case.svg \ src/ui/gui/artwork/24x24/actions/edit-go-to-variable.svg \ src/ui/gui/artwork/24x24/actions/edit-insert-case.svg \ src/ui/gui/artwork/24x24/actions/edit-insert-variable.svg \ src/ui/gui/artwork/24x24/actions/edit-cut.svg \ src/ui/gui/artwork/24x24/actions/edit-copy.svg \ src/ui/gui/artwork/24x24/actions/edit-paste.svg \ src/ui/gui/artwork/24x24/actions/edit-undo.svg \ src/ui/gui/artwork/24x24/actions/edit-redo.svg \ src/ui/gui/artwork/24x24/actions/edit-select-all.svg \ src/ui/gui/artwork/24x24/actions/file-open-data.svg \ src/ui/gui/artwork/24x24/actions/file-save-data.svg \ src/ui/gui/artwork/24x24/actions/file-export-data.svg \ src/ui/gui/artwork/24x24/actions/file-print.svg \ src/ui/gui/artwork/24x24/actions/view-value-labels.svg \ src/ui/gui/artwork/24x24/actions/utilities-variables.svg \ src/ui/gui/artwork/24x24/actions/run-all.svg \ src/ui/gui/artwork/16x16/actions/file-new-data.svg \ src/ui/gui/artwork/16x16/actions/file-syntax-data.svg \ src/ui/gui/artwork/16x16/actions/file-system-data.svg \ src/ui/gui/artwork/16x16/actions/file-open-data.svg \ src/ui/gui/artwork/16x16/actions/file-import-data.svg \ src/ui/gui/artwork/16x16/actions/file-export-data.svg \ src/ui/gui/artwork/16x16/actions/file-save-data.svg \ src/ui/gui/artwork/16x16/actions/file-save-as.svg \ src/ui/gui/artwork/16x16/actions/file-print.svg \ src/ui/gui/artwork/16x16/actions/file-rename-data-set.svg \ src/ui/gui/artwork/16x16/actions/file-display-information.svg \ src/ui/gui/artwork/16x16/actions/display-information-working-file.svg \ src/ui/gui/artwork/16x16/actions/display-information-external-file.svg \ src/ui/gui/artwork/16x16/actions/file-recently-used.svg \ src/ui/gui/artwork/16x16/actions/file-quit.svg \ src/ui/gui/artwork/16x16/actions/edit-insert-variable.svg \ src/ui/gui/artwork/16x16/actions/edit-insert-case.svg \ src/ui/gui/artwork/16x16/actions/edit-go-to-variable.svg \ src/ui/gui/artwork/16x16/actions/edit-go-to-case.svg \ src/ui/gui/artwork/16x16/actions/edit-cut.svg \ src/ui/gui/artwork/16x16/actions/edit-copy.svg \ src/ui/gui/artwork/16x16/actions/edit-paste.svg \ src/ui/gui/artwork/16x16/actions/edit-delete.svg \ src/ui/gui/artwork/16x16/actions/edit-undo.svg \ src/ui/gui/artwork/16x16/actions/edit-redo.svg \ src/ui/gui/artwork/16x16/actions/edit-select-all.svg \ src/ui/gui/artwork/16x16/actions/edit-clear.svg \ src/ui/gui/artwork/16x16/actions/edit-find.svg \ src/ui/gui/artwork/16x16/actions/view-font.svg \ src/ui/gui/artwork/16x16/actions/view-value-labels.svg \ src/ui/gui/artwork/16x16/actions/data-sort-cases.svg \ src/ui/gui/artwork/16x16/actions/data-transpose.svg \ src/ui/gui/artwork/16x16/actions/data-aggregate.svg \ src/ui/gui/artwork/16x16/actions/data-split-file.svg \ src/ui/gui/artwork/16x16/actions/data-select-cases.svg \ src/ui/gui/artwork/16x16/actions/data-weight-cases.svg \ src/ui/gui/artwork/16x16/actions/run-all.svg \ src/ui/gui/artwork/16x16/actions/run-selection.svg \ src/ui/gui/artwork/16x16/actions/run-current-line.svg \ src/ui/gui/artwork/16x16/actions/run-to-end.svg \ src/ui/gui/artwork/16x16/actions/transform-compute.svg \ src/ui/gui/artwork/16x16/actions/transform-count.svg \ src/ui/gui/artwork/16x16/actions/transform-rank-cases.svg \ src/ui/gui/artwork/16x16/actions/transform-automatic-recode.svg \ src/ui/gui/artwork/16x16/actions/transform-in-to-same-variables.svg \ src/ui/gui/artwork/16x16/actions/transform-in-to-different-variables.svg \ src/ui/gui/artwork/16x16/actions/transform-run-pending.svg \ src/ui/gui/artwork/16x16/actions/analyze-descriptive-statistics.svg \ src/ui/gui/artwork/16x16/actions/analyze-compare-means.svg \ src/ui/gui/artwork/16x16/actions/analyze-univariate-analysis.svg \ src/ui/gui/artwork/16x16/actions/analyze-bivariate-correlation.svg \ src/ui/gui/artwork/16x16/actions/analyze-kmeans-cluster.svg \ src/ui/gui/artwork/16x16/actions/analyze-factor-analysis.svg \ src/ui/gui/artwork/16x16/actions/analyze-reliability.svg \ src/ui/gui/artwork/16x16/actions/analyze-regression.svg \ src/ui/gui/artwork/16x16/actions/analyze-non-parametric-statistics.svg \ src/ui/gui/artwork/16x16/actions/analyze-roc-curve.svg \ src/ui/gui/artwork/16x16/actions/utilities-variables.svg \ src/ui/gui/artwork/16x16/actions/utilities-data-file-comments.svg \ src/ui/gui/artwork/16x16/actions/windows-minimize-all.svg \ src/ui/gui/artwork/16x16/actions/windows-split.svg \ src/ui/gui/artwork/16x16/actions/help-reference-manual.svg \ src/ui/gui/artwork/16x16/actions/help-about.svg \ src/ui/gui/artwork/32x32/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/32x32/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/32x32/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/32x32/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/22x22/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/22x22/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/22x22/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/22x22/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/24x24/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/24x24/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/24x24/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/24x24/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/256x256/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/256x256/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/256x256/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/256x256/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/16x16/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/16x16/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/16x16/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/16x16/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/48x48/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/48x48/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/48x48/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/48x48/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/32x32/apps/pspp.svg \ src/ui/gui/artwork/22x22/apps/pspp.svg \ src/ui/gui/artwork/24x24/apps/pspp.svg \ src/ui/gui/artwork/16x16/apps/pspp.svg \ src/ui/gui/artwork/48x48/apps/pspp.svg \ src/ui/gui/artwork/256x256/apps/pspp.svg \ src/ui/gui/artwork/scalable/apps/pspp.svg \ src/ui/gui/artwork/splash-t.svg \ src/ui/gui/artwork/splash-r.svg \ src/ui/gui/icons/COPYING_CCBYSA3 \ $(top_srcdir)/src/ui/gui/artwork/splash.svg tests/coverage.sh \ tests/data/CVE-2017-10791.sav tests/data/CVE-2017-10792.sav \ tests/data/bcd-in.expected.cmp.gz \ tests/data/binhex-in.expected.cmp.gz \ tests/data/binhex-out.expected.gz \ tests/data/hotel-encrypted.sav \ tests/data/legacy-in.expected.cmp.gz \ tests/data/num-in.expected.gz tests/data/num-out-cmp.pl \ tests/data/num-out.expected.cmp.gz tests/data/v13.sav \ tests/data/v14.sav tests/data/test-encrypted.sps \ tests/language/mann-whitney.txt \ tests/language/data-io/Book1.gnm.unzipped \ tests/language/data-io/test.ods \ tests/language/data-io/newone.ods \ tests/language/stats/llz.zsav tests/testsuite.in \ tests/data/calendar.at tests/data/data-in.at \ tests/data/data-out.at tests/data/datasheet-test.at \ tests/data/dictionary.at tests/data/file.at \ tests/data/format-guesser.at tests/data/pc+-file-reader.at \ tests/data/por-file.at tests/data/sys-file-reader.at \ tests/data/sys-file.at tests/data/encrypted-file.at \ tests/language/command.at tests/language/control/do-if.at \ tests/language/control/do-repeat.at \ tests/language/control/loop.at \ tests/language/control/temporary.at \ tests/language/data-io/add-files.at \ tests/language/data-io/data-list.at \ tests/language/data-io/data-reader.at \ tests/language/data-io/dataset.at \ tests/language/data-io/file-handle.at \ tests/language/data-io/get-data-spreadsheet.at \ tests/language/data-io/get-data-psql.at \ tests/language/data-io/get-data-txt.at \ tests/language/data-io/get.at \ tests/language/data-io/inpt-pgm.at \ tests/language/data-io/list.at \ tests/language/data-io/match-files.at \ tests/language/data-io/matrix-data.at \ tests/language/data-io/print-space.at \ tests/language/data-io/print.at tests/language/data-io/save.at \ tests/language/data-io/save-translate.at \ tests/language/data-io/update.at \ tests/language/dictionary/attributes.at \ tests/language/dictionary/delete-variables.at \ tests/language/dictionary/formats.at \ tests/language/dictionary/missing-values.at \ tests/language/dictionary/mrsets.at \ tests/language/dictionary/rename-variables.at \ tests/language/dictionary/sort-variables.at \ tests/language/dictionary/split-file.at \ tests/language/dictionary/sys-file-info.at \ tests/language/dictionary/value-labels.at \ tests/language/dictionary/variable-display.at \ tests/language/dictionary/vector.at \ tests/language/dictionary/weight.at \ tests/language/expressions/evaluate.at \ tests/language/expressions/parse.at \ tests/language/lexer/command-name.at \ tests/language/lexer/lexer.at tests/language/lexer/q2c.at \ tests/language/lexer/scan.at tests/language/lexer/segment.at \ tests/language/lexer/variable-parser.at \ tests/language/stats/aggregate.at \ tests/language/stats/autorecode.at \ tests/language/stats/correlations.at \ tests/language/stats/crosstabs.at \ tests/language/stats/descriptives.at \ tests/language/stats/examine.at tests/language/stats/graph.at \ tests/language/stats/factor.at tests/language/stats/flip.at \ tests/language/stats/frequencies.at \ tests/language/stats/glm.at tests/language/stats/logistic.at \ tests/language/stats/means.at tests/language/stats/npar.at \ tests/language/stats/oneway.at \ tests/language/stats/quick-cluster.at \ tests/language/stats/rank.at \ tests/language/stats/regression.at \ tests/language/stats/reliability.at \ tests/language/stats/roc.at tests/language/stats/sort-cases.at \ tests/language/stats/t-test.at \ tests/language/utilities/cache.at \ tests/language/utilities/cd.at \ tests/language/utilities/date.at \ tests/language/utilities/insert.at \ tests/language/utilities/permissions.at \ tests/language/utilities/set.at \ tests/language/utilities/show.at \ tests/language/utilities/title.at \ tests/language/xforms/compute.at \ tests/language/xforms/count.at tests/language/xforms/recode.at \ tests/language/xforms/sample.at \ tests/language/xforms/select-if.at tests/libpspp/abt.at \ tests/libpspp/bt.at tests/libpspp/encoding-guesser.at \ tests/libpspp/float-format.at tests/libpspp/heap.at \ tests/libpspp/hmap.at tests/libpspp/hmapx.at \ tests/libpspp/i18n.at tests/libpspp/line-reader.at \ tests/libpspp/ll.at tests/libpspp/llx.at \ tests/libpspp/range-map.at tests/libpspp/range-set.at \ tests/libpspp/range-tower.at tests/libpspp/sparse-array.at \ tests/libpspp/sparse-xarray-test.at tests/libpspp/str.at \ tests/libpspp/string-map.at tests/libpspp/stringi-map.at \ tests/libpspp/string-set.at tests/libpspp/stringi-set.at \ tests/libpspp/tower.at tests/libpspp/u8-istream.at \ tests/libpspp/zip.at tests/math/chart-geometry.at \ tests/math/moments.at tests/math/randist.at \ tests/output/ascii.at tests/output/charts.at \ tests/output/html.at tests/output/output.at \ tests/output/paper-size.at tests/output/render.at \ tests/output/tables.at tests/ui/terminal/main.at \ tests/ui/syntax-gen.at tests/utilities/pspp-convert.at \ tests/perl-module.at $(srcdir)/tests/testsuite \ tests/atlocal.in $(srcdir)/package.m4 tests/testsuite.at \ perl-module/Changes perl-module/COPYING \ perl-module/Examples.pod perl-module/Makefile.PL \ perl-module/MANIFEST perl-module/ppport.h perl-module/PSPP.xs \ perl-module/README perl-module/typemap perl-module/lib/PSPP.pm \ perl-module/t/Pspp.t HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(dist_man_MANS) $(doc_pspp_TEXINFOS) \ $(doc_pspp_dev_TEXINFOS) $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/build-aux/automake.mk \ $(top_srcdir)/build-aux/compile \ $(top_srcdir)/build-aux/config.guess \ $(top_srcdir)/build-aux/config.rpath \ $(top_srcdir)/build-aux/config.sub \ $(top_srcdir)/build-aux/depcomp \ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/ltmain.sh \ $(top_srcdir)/build-aux/mdate-sh \ $(top_srcdir)/build-aux/missing \ $(top_srcdir)/build-aux/texinfo.tex \ $(top_srcdir)/doc/automake.mk \ $(top_srcdir)/examples/automake.mk \ $(top_srcdir)/glade/automake.mk $(top_srcdir)/lib/automake.mk \ $(top_srcdir)/lib/gtk-contrib/automake.mk \ $(top_srcdir)/lib/linreg/automake.mk \ $(top_srcdir)/lib/tukey/automake.mk \ $(top_srcdir)/perl-module/automake.mk \ $(top_srcdir)/perl-module/lib/PSPP.pm.in \ $(top_srcdir)/po/Makefile.in $(top_srcdir)/po/Makevars \ $(top_srcdir)/po/automake.mk $(top_srcdir)/src/automake.mk \ $(top_srcdir)/src/data/automake.mk \ $(top_srcdir)/src/language/automake.mk \ $(top_srcdir)/src/language/control/automake.mk \ $(top_srcdir)/src/language/data-io/automake.mk \ $(top_srcdir)/src/language/dictionary/automake.mk \ $(top_srcdir)/src/language/expressions/automake.mk \ $(top_srcdir)/src/language/lexer/automake.mk \ $(top_srcdir)/src/language/stats/automake.mk \ $(top_srcdir)/src/language/tests/automake.mk \ $(top_srcdir)/src/language/utilities/automake.mk \ $(top_srcdir)/src/language/xforms/automake.mk \ $(top_srcdir)/src/libpspp/automake.mk \ $(top_srcdir)/src/math/automake.mk \ $(top_srcdir)/src/output/automake.mk \ $(top_srcdir)/src/ui/automake.mk \ $(top_srcdir)/src/ui/gui/automake.mk \ $(top_srcdir)/src/ui/gui/icons/automake.mk \ $(top_srcdir)/src/ui/gui/icons/manifest \ $(top_srcdir)/src/ui/terminal/automake.mk \ $(top_srcdir)/tests/atlocal.in $(top_srcdir)/tests/automake.mk \ $(top_srcdir)/utilities/automake.mk ABOUT-NLS AUTHORS COPYING \ ChangeLog INSTALL NEWS README THANKS TODO build-aux/ar-lib \ build-aux/compile build-aux/config.guess \ build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ build-aux/install-sh build-aux/ltmain.sh build-aux/mdate-sh \ build-aux/missing build-aux/texinfo.tex DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AM_MAKEINFOFLAGS = @AM_MAKEINFOFLAGS@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARFLAGS = @ARFLAGS@ AS = @AS@ ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BYTESWAP_H = @BYTESWAP_H@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ FLOOR_LIBM = @FLOOR_LIBM@ GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ GETOPT_H = @GETOPT_H@ GLADE_UI_CFLAGS = @GLADE_UI_CFLAGS@ GLADE_UI_LIBS = @GLADE_UI_LIBS@ GLIBC21 = @GLIBC21@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GNM_READ_SUPPORT = @GNM_READ_SUPPORT@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ GNULIB_ATAN2F = @GNULIB_ATAN2F@ GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CBRT = @GNULIB_CBRT@ GNULIB_CBRTF = @GNULIB_CBRTF@ GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_CTIME = @GNULIB_CTIME@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_EXP2 = @GNULIB_EXP2@ GNULIB_EXP2F = @GNULIB_EXP2F@ GNULIB_EXP2L = @GNULIB_EXP2L@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ GNULIB_EXPM1 = @GNULIB_EXPM1@ GNULIB_EXPM1F = @GNULIB_EXPM1F@ GNULIB_EXPM1L = @GNULIB_EXPM1L@ GNULIB_FABSF = @GNULIB_FABSF@ GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FFS = @GNULIB_FFS@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FGETC = @GNULIB_FGETC@ GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ GNULIB_FMA = @GNULIB_FMA@ GNULIB_FMAF = @GNULIB_FMAF@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMOD = @GNULIB_FMOD@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETC = @GNULIB_GETC@ GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_HYPOT = @GNULIB_HYPOT@ GNULIB_HYPOTF = @GNULIB_HYPOTF@ GNULIB_HYPOTL = @GNULIB_HYPOTL@ GNULIB_ILOGB = @GNULIB_ILOGB@ GNULIB_ILOGBF = @GNULIB_ILOGBF@ GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ GNULIB_ISNAND = @GNULIB_ISNAND@ GNULIB_ISNANF = @GNULIB_ISNANF@ GNULIB_ISNANL = @GNULIB_ISNANL@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ GNULIB_LOG = @GNULIB_LOG@ GNULIB_LOG10 = @GNULIB_LOG10@ GNULIB_LOG10F = @GNULIB_LOG10F@ GNULIB_LOG10L = @GNULIB_LOG10L@ GNULIB_LOG1P = @GNULIB_LOG1P@ GNULIB_LOG1PF = @GNULIB_LOG1PF@ GNULIB_LOG1PL = @GNULIB_LOG1PL@ GNULIB_LOG2 = @GNULIB_LOG2@ GNULIB_LOG2F = @GNULIB_LOG2F@ GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ GNULIB_LOGBF = @GNULIB_LOGBF@ GNULIB_LOGBL = @GNULIB_LOGBL@ GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_MODF = @GNULIB_MODF@ GNULIB_MODFF = @GNULIB_MODFF@ GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PSELECT = @GNULIB_PSELECT@ GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMAINDER = @GNULIB_REMAINDER@ GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RINT = @GNULIB_RINT@ GNULIB_RINTF = @GNULIB_RINTF@ GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SINF = @GNULIB_SINF@ GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRFTIME = @GNULIB_STRFTIME@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TANF = @GNULIB_TANF@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TCGETSID = @GNULIB_TCGETSID@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_TZSET = @GNULIB_TZSET@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_LIBS = @GSL_LIBS@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ HAVE_ATAN2F = @HAVE_ATAN2F@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CBRT = @HAVE_CBRT@ HAVE_CBRTF = @HAVE_CBRTF@ HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_COPYSIGN = @HAVE_COPYSIGN@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TCGETSID = @HAVE_DECL_TCGETSID@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ HAVE_EXPM1 = @HAVE_EXPM1@ HAVE_EXPM1F = @HAVE_EXPM1F@ HAVE_FABSF = @HAVE_FABSF@ HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FFS = @HAVE_FFS@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FMA = @HAVE_FMA@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FMODL = @HAVE_FMODL@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_HYPOTF = @HAVE_HYPOTF@ HAVE_HYPOTL = @HAVE_HYPOTL@ HAVE_ILOGB = @HAVE_ILOGB@ HAVE_ILOGBF = @HAVE_ILOGBF@ HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LOG10F = @HAVE_LOG10F@ HAVE_LOG10L = @HAVE_LOG10L@ HAVE_LOG1P = @HAVE_LOG1P@ HAVE_LOG1PF = @HAVE_LOG1PF@ HAVE_LOG1PL = @HAVE_LOG1PL@ HAVE_LOGBF = @HAVE_LOGBF@ HAVE_LOGBL = @HAVE_LOGBL@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_MODFF = @HAVE_MODFF@ HAVE_MODFL = @HAVE_MODFL@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PSELECT = @HAVE_PSELECT@ HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_QSORT_R = @HAVE_QSORT_R@ HAVE_RAISE = @HAVE_RAISE@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REMAINDER = @HAVE_REMAINDER@ HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RINT = @HAVE_RINT@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SINF = @HAVE_SINF@ HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ HAVE_TRUNCATE = @HAVE_TRUNCATE@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ HAVE_TZSET = @HAVE_TZSET@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSFTIME = @HAVE_WCSFTIME@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM_ENV = @INSTALL_PROGRAM_ENV@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ ISFINITE_LIBM = @ISFINITE_LIBM@ ISINF_LIBM = @ISINF_LIBM@ ISNAND_LIBM = @ISNAND_LIBM@ ISNANF_LIBM = @ISNANF_LIBM@ ISNANL_LIBM = @ISNANL_LIBM@ ISNAN_LIBM = @ISNAN_LIBM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBUNISTRING_UNICASE_H = @LIBUNISTRING_UNICASE_H@ LIBUNISTRING_UNICTYPE_H = @LIBUNISTRING_UNICTYPE_H@ LIBUNISTRING_UNIGBRK_H = @LIBUNISTRING_UNIGBRK_H@ LIBUNISTRING_UNILBRK_H = @LIBUNISTRING_UNILBRK_H@ LIBUNISTRING_UNINORM_H = @LIBUNISTRING_UNINORM_H@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIB_SELECT = @LIB_SELECT@ LIMITS_H = @LIMITS_H@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTALLOCA = @LTALLOCA@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ LTLIBREADLINE = @LTLIBREADLINE@ LTLIBTHREAD = @LTLIBTHREAD@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = msgfmt NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_GTK_GTK_H = @NEXT_AS_FIRST_DIRECTIVE_GTK_GTK_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ NEXT_AS_FIRST_DIRECTIVE_TERMIOS_H = @NEXT_AS_FIRST_DIRECTIVE_TERMIOS_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_GTK_GTK_H = @NEXT_GTK_GTK_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ NEXT_TERMIOS_H = @NEXT_TERMIOS_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODF_READ_SUPPORT = @ODF_READ_SUPPORT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PG_CFLAGS = @PG_CFLAGS@ PG_CONFIG = @PG_CONFIG@ PG_LDFLAGS = @PG_LDFLAGS@ PG_LIBS = @PG_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PSPPIRE_LDFLAGS = @PSPPIRE_LDFLAGS@ PSPP_LDFLAGS = @PSPP_LDFLAGS@ PSQL_SUPPORT = @PSQL_SUPPORT@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ RELOCATABLE = @RELOCATABLE@ RELOCATABLE_BUILD_DIR = @RELOCATABLE_BUILD_DIR@ RELOCATABLE_CONFIG_H_DIR = @RELOCATABLE_CONFIG_H_DIR@ RELOCATABLE_LDFLAGS = @RELOCATABLE_LDFLAGS@ RELOCATABLE_LIBRARY_PATH = @RELOCATABLE_LIBRARY_PATH@ RELOCATABLE_SRC_DIR = @RELOCATABLE_SRC_DIR@ RELOCATABLE_STRIP = @RELOCATABLE_STRIP@ REPLACE_ACOSF = @REPLACE_ACOSF@ REPLACE_ASINF = @REPLACE_ASINF@ REPLACE_ATAN2F = @REPLACE_ATAN2F@ REPLACE_ATANF = @REPLACE_ATANF@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CBRTF = @REPLACE_CBRTF@ REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_COSF = @REPLACE_COSF@ REPLACE_COSHF = @REPLACE_COSHF@ REPLACE_CTIME = @REPLACE_CTIME@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_EXP2 = @REPLACE_EXP2@ REPLACE_EXP2L = @REPLACE_EXP2L@ REPLACE_EXPF = @REPLACE_EXPF@ REPLACE_EXPM1 = @REPLACE_EXPM1@ REPLACE_EXPM1F = @REPLACE_EXPM1F@ REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ REPLACE_FMA = @REPLACE_FMA@ REPLACE_FMAF = @REPLACE_FMAF@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FMOD = @REPLACE_FMOD@ REPLACE_FMODF = @REPLACE_FMODF@ REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_HYPOT = @REPLACE_HYPOT@ REPLACE_HYPOTF = @REPLACE_HYPOTF@ REPLACE_HYPOTL = @REPLACE_HYPOTL@ REPLACE_ILOGB = @REPLACE_ILOGB@ REPLACE_ILOGBF = @REPLACE_ILOGBF@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LOG = @REPLACE_LOG@ REPLACE_LOG10 = @REPLACE_LOG10@ REPLACE_LOG10F = @REPLACE_LOG10F@ REPLACE_LOG10L = @REPLACE_LOG10L@ REPLACE_LOG1P = @REPLACE_LOG1P@ REPLACE_LOG1PF = @REPLACE_LOG1PF@ REPLACE_LOG1PL = @REPLACE_LOG1PL@ REPLACE_LOG2 = @REPLACE_LOG2@ REPLACE_LOG2F = @REPLACE_LOG2F@ REPLACE_LOG2L = @REPLACE_LOG2L@ REPLACE_LOGB = @REPLACE_LOGB@ REPLACE_LOGBF = @REPLACE_LOGBF@ REPLACE_LOGBL = @REPLACE_LOGBL@ REPLACE_LOGF = @REPLACE_LOGF@ REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_MODF = @REPLACE_MODF@ REPLACE_MODFF = @REPLACE_MODFF@ REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_OPENAT = @REPLACE_OPENAT@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PSELECT = @REPLACE_PSELECT@ REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMAINDER = @REPLACE_REMAINDER@ REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SINF = @REPLACE_SINF@ REPLACE_SINHF = @REPLACE_SINHF@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_SQRTF = @REPLACE_SQRTF@ REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRFTIME = @REPLACE_STRFTIME@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TANF = @REPLACE_TANF@ REPLACE_TANHF = @REPLACE_TANHF@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_TZSET = @REPLACE_TZSET@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ ROUND_LIBM = @ROUND_LIBM@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ TRUNC_LIBM = @TRUNC_LIBM@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VERSION_FOR_PERL = @VERSION_FOR_PERL@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WITH_PERL_MODULE = @WITH_PERL_MODULE@ XMLLINT = @XMLLINT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = std-options check-news 1.10.1 subdir-objects SUBDIRS = gl po DISTCLEANFILES = ./po/stamp-po xconfigure src/libpspp/version.c \ tests/atconfig tests/atlocal BUILT_SOURCES = $(expressions_built_sources) $(am__append_15) \ src/ui/gui/include/gtk/gtk.h AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_builddir)/gl \ -DINSTALLDIR=\"$(bindir)\" -I$(top_srcdir)/src \ -I$(top_srcdir)/lib -I$(top_srcdir)/src/language/stats \ -I$(top_builddir)/src/language/expressions \ -I$(top_srcdir)/src/language/expressions $(am__append_13) AM_CFLAGS = $(am__append_1) all_q_sources = $(src_language_utilities_built_sources:.c=.q) \ $(src_language_stats_built_sources:.c=.q) pkgsysconfdir = $(sysconfdir)/$(PACKAGE) # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # # Autotest testsuite EXTRA_DIST = ONEWS pspp-mode.el build-aux/svg2png build-aux/icon-list \ $(LOCALPOFILES) $(POFILES) $(POTFILE) po/ChangeLog \ po/cs.po,aux lib/tukey/README $(am__append_3) \ doc/get-commands.pl doc/help-pages-list $(examples_DATA) \ src/data/sys-file-encoding.pl src/output/README \ src/output/mk-class-boilerplate src/language/lexer/q2c.c \ $(src_language_utilities_built_sources:.c=.q) \ src/language/stats/glm.c \ $(src_language_stats_built_sources:.c=.q) $(helpers) \ src/language/expressions/TODO doc/help-pages-list \ src/ui/gui/memorandum.txt src/ui/gui/gen-dot-desktop.sh \ src/ui/gui/marshaller-list src/ui/gui/pspplogo.svg \ src/ui/gui/include/gtk/gtk.in.h src/ui/gui/resources.xml \ $(icons) $(icon_srcs) src/ui/gui/icons/COPYING_CCBYSA3 \ $(am__append_16) tests/coverage.sh \ tests/data/CVE-2017-10791.sav tests/data/CVE-2017-10792.sav \ tests/data/bcd-in.expected.cmp.gz \ tests/data/binhex-in.expected.cmp.gz \ tests/data/binhex-out.expected.gz \ tests/data/hotel-encrypted.sav \ tests/data/legacy-in.expected.cmp.gz \ tests/data/num-in.expected.gz tests/data/num-out-cmp.pl \ tests/data/num-out.expected.cmp.gz tests/data/v13.sav \ tests/data/v14.sav tests/data/test-encrypted.sps \ tests/language/mann-whitney.txt \ tests/language/data-io/Book1.gnm.unzipped \ tests/language/data-io/test.ods \ tests/language/data-io/newone.ods \ tests/language/stats/llz.zsav tests/testsuite.in \ $(TESTSUITE_AT) $(TESTSUITE) tests/atlocal.in \ $(srcdir)/package.m4 $(TESTSUITE) tests/testsuite.at \ $(am__append_22) CLEANFILES = $(GMOFILES) $(POTFILE) pspp-dev.dvi $(docbook_DATA) \ src/language/lexer/q2c$(EXEEXT_FOR_BUILD) \ $(src_language_utilities_built_sources) \ $(src_language_stats_built_sources) \ $(expressions_built_sources) $(am__append_14) \ src/ui/gui/include/gtk/gtk.h *.save pspp.* foo* \ $(am__append_21) distfiles gitfiles missing-distfiles CLEAN_LOCAL = po_CLEAN tests_clean $(am__append_20) # The following rules are from Open vSwitch. The original copyright notice # and license are: # # Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without warranty of any kind. # If we're checked out from a Git repository, make sure that every # file that is in Git is distributed. ALL_LOCAL = $(GMOFILES) $(am__append_19) dist-hook-git CHECK_LOCAL = tests_check ACLOCAL_AMFLAGS = -I m4 -I gl/m4 noinst_LIBRARIES = $(am__append_2) # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # noinst_LTLIBRARIES = lib/linreg/liblinreg.la lib/tukey/libtukey.la \ src/libpspp/liblibpspp.la src/data/libdata.la \ src/math/libpspp-math.la src/output/liboutput.la \ src/language/liblanguage.la src/ui/terminal/libui.la \ src/ui/libuicommon.la dist_man_MANS = doc/pspp.1 doc/psppire.1 utilities/pspp-dump-sav.1 \ utilities/pspp-convert.1 DIST_HOOKS = generate-changelog INSTALL_DATA_HOOKS = $(am__append_11) install-icons install-ext-icons \ update-icon-cache UNINSTALL_DATA_HOOKS = uninstall-icons uninstall-ext-icons \ update-icon-cache PHONY = $(am__append_12) $(am__append_18) $(DIST_HOOKS) \ $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) SUFFIXES = .q .po .gmo LDADD = gl/libgl.la # This ensures that files added to EXTRA_DIST are always distributed, # even if they are inside an Automake if...endif conditional block that is # disabled by some particular "configure" run. For more information, see: # http://article.gmane.org/gmane.comp.sysutils.automake.general/10891 noinst_HEADERS = $(EXTRA_DIST) # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Free Software Foundation, Inc. # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = pspp-dev@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = # PSPP - a program for statistical analysis. # Copyright (C) 2017 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 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 . # XGETTEXT = xgettext MSGMERGE = msgmerge POFILES = \ po/ca.po \ po/de.po \ po/el.po \ po/es.po \ po/fr.po \ po/gl.po \ po/hu.po \ po/ja.po \ po/lt.po \ po/nl.po \ po/pl.po \ po/pt_BR.po \ po/ru.po \ po/sl.po \ po/tr.po \ po/uk.po \ po/zh_CN.po LOCALPOFILES = po/cs.po po/en_GB.po POTFILE = po/$(DOMAIN).pot TRANSLATABLE_FILES = $(DIST_SOURCES) $(all_q_sources) XGETTEXT_OPTIONS = \ --copyright-holder="$(COPYRIGHT_HOLDER)" \ --package-name=$(PACKAGE) \ --package-version=$(VERSION) \ --msgid-bugs-address=$(MSGID_BUGS_ADDRESS) \ --from-code=UTF-8 \ --add-comments='TRANSLATORS:' GMOFILES = $(LOCALPOFILES:.po=.gmo) $(POFILES:.po=.gmo) RSYNC = rsync lib_linreg_liblinreg_la_SOURCES = \ lib/linreg/sweep.c lib/linreg/sweep.h lib_tukey_libtukey_la_SOURCES = \ lib/tukey/ptukey.c \ lib/tukey/qtukey.c \ lib/tukey/tukey.h @HAVE_GUI_TRUE@lib_gtk_contrib_libxpaned_a_CFLAGS = $(GTK_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1 @HAVE_GUI_TRUE@lib_gtk_contrib_libxpaned_a_SOURCES = \ @HAVE_GUI_TRUE@ lib/gtk-contrib/gtkxpaned.c \ @HAVE_GUI_TRUE@ lib/gtk-contrib/gtkxpaned.h info_TEXINFOS = doc/pspp.texi doc/pspp-dev.texi doc_pspp_TEXINFOS = doc/version.texi \ doc/bugs.texi \ doc/command-index.texi \ doc/concept-index.texi \ doc/data-io.texi \ doc/data-selection.texi \ doc/expressions.texi \ doc/files.texi \ doc/combining.texi \ doc/flow-control.texi \ doc/function-index.texi \ doc/installing.texi \ doc/introduction.texi \ doc/invoking.texi \ doc/language.texi \ doc/license.texi \ doc/pspp-convert.texi \ doc/pspp-dump-sav.texi \ doc/ni.texi \ doc/not-implemented.texi \ doc/statistics.texi \ doc/transformation.texi \ doc/tutorial.texi \ doc/tut.texi \ doc/regression.texi \ doc/utilities.texi \ doc/variables.texi \ doc/fdl.texi doc_pspp_dev_TEXINFOS = doc/version-dev.texi \ doc/dev/intro.texi \ doc/dev/concepts.texi \ doc/dev/syntax.texi \ doc/dev/data.texi \ doc/dev/i18n.texi \ doc/dev/output.texi \ doc/dev/system-file-format.texi \ doc/dev/pc+-file-format.texi \ doc/dev/portable-file-format.texi \ doc/dev/spv-file-format.texi \ doc/dev/encrypted-file-wrappers.texi \ doc/dev/q2c.texi docbookdir = $(docdir) dist_docbook_DATA = doc/pspp.xml examplesdir = $(pkgdatadir)/examples examples_DATA = \ examples/t-test.sps \ examples/descript.sps \ examples/grid.sps \ examples/hotel.sav \ examples/physiology.sav \ examples/repairs.sav \ examples/regress.sps \ examples/regress_categorical.sps src_libpspp_liblibpspp_la_SOURCES = \ src/libpspp/abt.c \ src/libpspp/abt.h \ src/libpspp/argv-parser.c \ src/libpspp/argv-parser.h \ src/libpspp/array.c \ src/libpspp/array.h \ src/libpspp/assertion.h \ src/libpspp/bit-vector.h \ src/libpspp/bt.c \ src/libpspp/bt.h \ src/libpspp/cast.h \ src/libpspp/cmac-aes256.c \ src/libpspp/cmac-aes256.h \ src/libpspp/compiler.h \ src/libpspp/copyleft.c \ src/libpspp/copyleft.h \ src/libpspp/deque.c \ src/libpspp/deque.h \ src/libpspp/encoding-guesser.c \ src/libpspp/encoding-guesser.h \ src/libpspp/ext-array.c \ src/libpspp/ext-array.h \ src/libpspp/float-format.c \ src/libpspp/float-format.h \ src/libpspp/freaderror.c \ src/libpspp/freaderror.h \ src/libpspp/hash-functions.c \ src/libpspp/hash-functions.h \ src/libpspp/inflate.c \ src/libpspp/inflate.h \ src/libpspp/heap.c \ src/libpspp/heap.h \ src/libpspp/hmap.c \ src/libpspp/hmap.h \ src/libpspp/hmapx.c \ src/libpspp/hmapx.h \ src/libpspp/i18n.c \ src/libpspp/i18n.h \ src/libpspp/integer-format.c \ src/libpspp/integer-format.h \ src/libpspp/intern.c \ src/libpspp/intern.h \ src/libpspp/line-reader.c \ src/libpspp/line-reader.h \ src/libpspp/ll.c \ src/libpspp/ll.h \ src/libpspp/llx.c \ src/libpspp/llx.h \ src/libpspp/message.c \ src/libpspp/message.h \ src/libpspp/misc.c \ src/libpspp/misc.h \ src/libpspp/model-checker.c \ src/libpspp/model-checker.h \ src/libpspp/pool.c \ src/libpspp/pool.h \ src/libpspp/prompt.c \ src/libpspp/prompt.h \ src/libpspp/range-map.c \ src/libpspp/range-map.h \ src/libpspp/range-set.c \ src/libpspp/range-set.h \ src/libpspp/range-tower.c \ src/libpspp/range-tower.h \ src/libpspp/sparse-array.c \ src/libpspp/sparse-array.h \ src/libpspp/sparse-xarray.c \ src/libpspp/sparse-xarray.h \ src/libpspp/start-date.c \ src/libpspp/start-date.h \ src/libpspp/string-array.c \ src/libpspp/string-array.h \ src/libpspp/string-map.c \ src/libpspp/string-map.h \ src/libpspp/string-set.c \ src/libpspp/string-set.h \ src/libpspp/stringi-map.c \ src/libpspp/stringi-map.h \ src/libpspp/stringi-set.c \ src/libpspp/stringi-set.h \ src/libpspp/str.c \ src/libpspp/str.h \ src/libpspp/taint.c \ src/libpspp/taint.h \ src/libpspp/temp-file.c \ src/libpspp/temp-file.h \ src/libpspp/tower.c \ src/libpspp/tower.h \ src/libpspp/u8-istream.c \ src/libpspp/u8-istream.h \ src/libpspp/u8-line.c \ src/libpspp/u8-line.h \ src/libpspp/version.h \ src/libpspp/zip-private.h \ src/libpspp/zip-reader.c \ src/libpspp/zip-reader.h \ src/libpspp/zip-writer.c \ src/libpspp/zip-writer.h src_libpspp_liblibpspp_la_CPPFLAGS = \ -I $(top_srcdir)/src/libpspp \ $(AM_CPPFLAGS) nodist_src_libpspp_liblibpspp_la_SOURCES = src/libpspp/version.c src_data_libdata_la_CPPFLAGS = $(LIBXML2_CFLAGS) $(PG_CFLAGS) $(AM_CPPFLAGS) src_data_libdata_la_LIBADD = $(LIBXML2_LIBS) $(PG_LIBS) src_data_libdata_la_SOURCES = \ src/data/any-reader.c \ src/data/any-reader.h \ src/data/any-writer.c \ src/data/any-writer.h \ src/data/attributes.c \ src/data/attributes.h \ src/data/calendar.c \ src/data/calendar.h \ src/data/case-map.c \ src/data/case-map.h \ src/data/case-matcher.c \ src/data/case-matcher.h \ src/data/caseproto.c \ src/data/caseproto.h \ src/data/case.c \ src/data/casegrouper.c \ src/data/casegrouper.h \ src/data/caseinit.c \ src/data/caseinit.h \ src/data/casereader-filter.c \ src/data/casereader-project.c \ src/data/casereader-provider.h \ src/data/casereader-select.c \ src/data/casereader-shim.c \ src/data/casereader-shim.h \ src/data/casereader-translator.c \ src/data/casereader.c \ src/data/casereader.h \ src/data/casewindow.c \ src/data/casewindow.h \ src/data/casewriter-provider.h \ src/data/casewriter-translator.c \ src/data/casewriter.c \ src/data/casewriter.h \ src/data/case.h \ src/data/case-tmpfile.c \ src/data/case-tmpfile.h \ src/data/csv-file-writer.c \ src/data/csv-file-writer.h \ src/data/data-in.c \ src/data/data-in.h \ src/data/data-out.c \ src/data/data-out.h \ src/data/dataset.c \ src/data/dataset.h \ src/data/dataset-writer.c \ src/data/dataset-writer.h \ src/data/datasheet.c \ src/data/datasheet.h \ src/data/dict-class.c \ src/data/dict-class.h \ src/data/dictionary.c \ src/data/dictionary.h \ src/data/encrypted-file.c \ src/data/encrypted-file.h \ src/data/file-handle-def.c \ src/data/file-handle-def.h \ src/data/file-name.c \ src/data/file-name.h \ src/data/format-guesser.c \ src/data/format-guesser.h \ src/data/format.c \ src/data/format.h \ src/data/format.def \ src/data/gnumeric-reader.c \ src/data/gnumeric-reader.h \ src/data/identifier.c \ src/data/identifier2.c \ src/data/identifier.h \ src/data/lazy-casereader.c \ src/data/lazy-casereader.h \ src/data/missing-values.c \ src/data/missing-values.h \ src/data/make-file.c \ src/data/make-file.h \ src/data/mrset.c \ src/data/mrset.h \ src/data/ods-reader.c \ src/data/ods-reader.h \ src/data/pc+-file-reader.c \ src/data/por-file-reader.c \ src/data/por-file-writer.c \ src/data/por-file-writer.h \ src/data/psql-reader.c \ src/data/psql-reader.h \ src/data/session.c \ src/data/session.h \ src/data/settings.c \ src/data/settings.h \ src/data/short-names.c \ src/data/short-names.h \ src/data/spreadsheet-reader.c \ src/data/spreadsheet-reader.h \ src/data/subcase.c \ src/data/subcase.h \ src/data/sys-file-encoding.c \ src/data/sys-file-private.c \ src/data/sys-file-private.h \ src/data/sys-file-reader.c \ src/data/sys-file-writer.c \ src/data/sys-file-writer.h \ src/data/transformations.c \ src/data/transformations.h \ src/data/val-type.h \ src/data/value.c \ src/data/value.h \ src/data/value-labels.c \ src/data/value-labels.h \ src/data/vardict.h \ src/data/variable.h \ src/data/variable.c \ src/data/vector.c \ src/data/vector.h pkglib_LTLIBRARIES = src/libpspp-core.la src/libpspp.la src_libpspp_core_la_SOURCES = src_libpspp_core_la_LDFLAGS = -release $(VERSION) src_libpspp_core_la_LIBADD = \ src/data/libdata.la \ src/libpspp/liblibpspp.la \ $(LIBXML2_LIBS) $(PG_LIBS) \ gl/libgl.la src_libpspp_la_SOURCES = src_libpspp_la_CFLAGS = $(GSL_CFLAGS) src_libpspp_la_LDFLAGS = -release $(VERSION) src_libpspp_la_LIBADD = \ src/language/liblanguage.la \ src/math/libpspp-math.la \ src/output/liboutput.la \ $(GSL_LIBS) src_math_libpspp_math_la_LIBADD = \ lib/linreg/liblinreg.la \ lib/tukey/libtukey.la src_math_libpspp_math_la_SOURCES = \ src/math/chart-geometry.c \ src/math/chart-geometry.h \ src/math/box-whisker.c src/math/box-whisker.h \ src/math/categoricals.h \ src/math/categoricals.c \ src/math/covariance.c \ src/math/covariance.h \ src/math/correlation.c \ src/math/correlation.h \ src/math/extrema.c src/math/extrema.h \ src/math/histogram.c src/math/histogram.h \ src/math/interaction.c src/math/interaction.h \ src/math/levene.c src/math/levene.h \ src/math/linreg.c src/math/linreg.h \ src/math/merge.c src/math/merge.h \ src/math/moments.c src/math/moments.h \ src/math/np.c src/math/np.h \ src/math/order-stats.c src/math/order-stats.h \ src/math/percentiles.c src/math/percentiles.h \ src/math/random.c src/math/random.h \ src/math/statistic.h \ src/math/sort.c src/math/sort.h \ src/math/trimmed-mean.c src/math/trimmed-mean.h \ src/math/tukey-hinges.c src/math/tukey-hinges.h \ src/math/wilcoxon-sig.c src/math/wilcoxon-sig.h src_output_liboutput_la_CPPFLAGS = $(LIBXML2_CFLAGS) $(AM_CPPFLAGS) src_output_liboutput_la_SOURCES = src/output/ascii.c \ src/output/ascii.h src/output/chart-item-provider.h \ src/output/chart-item.c src/output/chart-item.h \ src/output/charts/boxplot.c src/output/charts/boxplot.h \ src/output/charts/np-plot.c src/output/charts/np-plot.h \ src/output/charts/barchart.c src/output/charts/barchart.h \ src/output/charts/piechart.c src/output/charts/piechart.h \ src/output/charts/plot-hist.c src/output/charts/plot-hist.h \ src/output/charts/roc-chart.c src/output/charts/roc-chart.h \ src/output/charts/spreadlevel-plot.c \ src/output/charts/spreadlevel-plot.h src/output/charts/scree.c \ src/output/charts/scree.h src/output/charts/scatterplot.c \ src/output/charts/scatterplot.h src/output/csv.c \ src/output/driver-provider.h src/output/driver.c \ src/output/driver.h src/output/html.c src/output/journal.c \ src/output/journal.h src/output/measure.c src/output/measure.h \ src/output/message-item.c src/output/message-item.h \ src/output/msglog.c src/output/msglog.h src/output/options.c \ src/output/options.h src/output/output-item-provider.h \ src/output/output-item.c src/output/output-item.h \ src/output/render.c src/output/render.h src/output/tab.c \ src/output/tab.h src/output/table-casereader.c \ src/output/table-item.c src/output/table-item.h \ src/output/table-paste.c src/output/table-provider.h \ src/output/table-select.c src/output/table-stomp.c \ src/output/table-transpose.c src/output/table.c \ src/output/table.h src/output/text-item.c \ src/output/text-item.h $(am__append_4) $(am__append_5) language_lexer_sources = \ src/language/lexer/command-name.c \ src/language/lexer/command-name.h \ src/language/lexer/include-path.c \ src/language/lexer/include-path.h \ src/language/lexer/lexer.c \ src/language/lexer/lexer.h \ src/language/lexer/subcommand-list.c \ src/language/lexer/subcommand-list.h \ src/language/lexer/format-parser.c \ src/language/lexer/format-parser.h \ src/language/lexer/scan.c \ src/language/lexer/scan.h \ src/language/lexer/segment.c \ src/language/lexer/segment.h \ src/language/lexer/token.c \ src/language/lexer/token.h \ src/language/lexer/value-parser.c \ src/language/lexer/value-parser.h \ src/language/lexer/variable-parser.c \ src/language/lexer/variable-parser.h language_xforms_sources = \ src/language/xforms/compute.c \ src/language/xforms/count.c \ src/language/xforms/fail.c \ src/language/xforms/sample.c \ src/language/xforms/recode.c \ src/language/xforms/select-if.c language_control_sources = \ src/language/control/control-stack.c \ src/language/control/control-stack.h \ src/language/control/do-if.c \ src/language/control/loop.c \ src/language/control/repeat.c \ src/language/control/temporary.c language_dictionary_sources = \ src/language/dictionary/attributes.c \ src/language/dictionary/apply-dictionary.c \ src/language/dictionary/delete-variables.c \ src/language/dictionary/formats.c \ src/language/dictionary/missing-values.c \ src/language/dictionary/modify-variables.c \ src/language/dictionary/mrsets.c \ src/language/dictionary/numeric.c \ src/language/dictionary/rename-variables.c \ src/language/dictionary/sort-variables.c \ src/language/dictionary/split-file.c \ src/language/dictionary/split-file.h \ src/language/dictionary/sys-file-info.c \ src/language/dictionary/value-labels.c \ src/language/dictionary/variable-label.c \ src/language/dictionary/vector.c \ src/language/dictionary/variable-display.c \ src/language/dictionary/weight.c language_tests_sources = \ src/language/tests/format-guesser-test.c \ src/language/tests/float-format.c \ src/language/tests/moments-test.c \ src/language/tests/paper-size.c \ src/language/tests/pool-test.c src_language_utilities_built_sources = \ src/language/utilities/set.c language_utilities_sources = \ src/language/utilities/cache.c \ src/language/utilities/cd.c \ src/language/utilities/date.c \ src/language/utilities/echo.c \ src/language/utilities/host.c \ src/language/utilities/title.c \ src/language/utilities/include.c \ src/language/utilities/output.c \ src/language/utilities/permissions.c src_language_stats_built_sources = \ src/language/stats/crosstabs.c language_stats_sources = \ src/language/stats/aggregate.c \ src/language/stats/aggregate.h \ src/language/stats/autorecode.c \ src/language/stats/binomial.c \ src/language/stats/binomial.h \ src/language/stats/chart-category.h \ src/language/stats/chisquare.c \ src/language/stats/chisquare.h \ src/language/stats/cochran.c \ src/language/stats/cochran.h \ src/language/stats/correlations.c \ src/language/stats/descriptives.c \ src/language/stats/examine.c \ src/language/stats/factor.c \ src/language/stats/flip.c \ src/language/stats/freq.c \ src/language/stats/freq.h \ src/language/stats/frequencies.c \ src/language/stats/friedman.c \ src/language/stats/friedman.h \ src/language/stats/glm.c \ src/language/stats/graph.c \ src/language/stats/kruskal-wallis.c \ src/language/stats/kruskal-wallis.h \ src/language/stats/ks-one-sample.c \ src/language/stats/ks-one-sample.h \ src/language/stats/logistic.c \ src/language/stats/jonckheere-terpstra.c \ src/language/stats/jonckheere-terpstra.h \ src/language/stats/mann-whitney.c \ src/language/stats/mann-whitney.h \ src/language/stats/means.c \ src/language/stats/mcnemar.c \ src/language/stats/mcnemar.h \ src/language/stats/median.c \ src/language/stats/median.h \ src/language/stats/npar.c \ src/language/stats/npar.h \ src/language/stats/npar-summary.c \ src/language/stats/npar-summary.h \ src/language/stats/oneway.c \ src/language/stats/quick-cluster.c \ src/language/stats/rank.c \ src/language/stats/reliability.c \ src/language/stats/roc.c \ src/language/stats/roc.h \ src/language/stats/regression.c \ src/language/stats/runs.h \ src/language/stats/runs.c \ src/language/stats/sign.c \ src/language/stats/sign.h \ src/language/stats/sort-cases.c \ src/language/stats/sort-criteria.c \ src/language/stats/sort-criteria.h \ src/language/stats/t-test.h \ src/language/stats/t-test-indep.c \ src/language/stats/t-test-one-sample.c \ src/language/stats/t-test-paired.c \ src/language/stats/t-test-parser.c \ src/language/stats/wilcoxon.c \ src/language/stats/wilcoxon.h language_data_io_sources = \ src/language/data-io/combine-files.c \ src/language/data-io/data-list.c \ src/language/data-io/data-parser.c \ src/language/data-io/data-parser.h \ src/language/data-io/data-reader.c \ src/language/data-io/data-reader.h \ src/language/data-io/data-writer.c \ src/language/data-io/data-writer.h \ src/language/data-io/dataset.c \ src/language/data-io/file-handle.c \ src/language/data-io/file-handle.h \ src/language/data-io/get-data.c \ src/language/data-io/get.c \ src/language/data-io/inpt-pgm.c \ src/language/data-io/inpt-pgm.h \ src/language/data-io/list.c \ src/language/data-io/placement-parser.c \ src/language/data-io/placement-parser.h \ src/language/data-io/print-space.c \ src/language/data-io/print.c \ src/language/data-io/matrix-data.c \ src/language/data-io/matrix-reader.c \ src/language/data-io/matrix-reader.h \ src/language/data-io/save-translate.c \ src/language/data-io/save.c \ src/language/data-io/trim.c \ src/language/data-io/trim.h language_expressions_sources = \ src/language/expressions/evaluate.c \ src/language/expressions/helpers.c \ src/language/expressions/helpers.h \ src/language/expressions/optimize.c \ src/language/expressions/parse.c \ src/language/expressions/private.h \ src/language/expressions/public.h expressions_built_sources = \ src/language/expressions/evaluate.h \ src/language/expressions/evaluate.inc \ src/language/expressions/operations.h \ src/language/expressions/optimize.inc \ src/language/expressions/parse.inc helpers = src/language/expressions/generate.pl \ src/language/expressions/operations.def src_language_liblanguage_la_SOURCES = \ src/language/command.c \ src/language/command.h \ src/language/command.def \ $(language_lexer_sources) \ $(language_xforms_sources) \ $(language_control_sources) \ $(language_dictionary_sources) \ $(language_tests_sources) \ $(language_utilities_sources) \ $(language_stats_sources) \ $(language_data_io_sources) \ $(language_expressions_sources) nodist_src_language_liblanguage_la_SOURCES = \ $(src_language_data_io_built_sources) \ $(src_language_utilities_built_sources) \ $(src_language_stats_built_sources) \ $(language_tests_built_sources) \ $(expressions_built_sources) src_ui_terminal_libui_la_SOURCES = \ src/ui/terminal/main.c \ src/ui/terminal/terminal-opts.c \ src/ui/terminal/terminal-opts.h \ src/ui/terminal/terminal-reader.c \ src/ui/terminal/terminal-reader.h \ src/ui/terminal/terminal.c \ src/ui/terminal/terminal.h src_ui_terminal_libui_la_CFLAGS = $(NCURSES_CFLAGS) src_ui_terminal_pspp_SOURCES = src_ui_terminal_pspp_LDADD = \ src/ui/terminal/libui.la \ src/ui/libuicommon.la \ src/libpspp.la \ src/libpspp-core.la \ $(CAIRO_LIBS) \ $(NCURSES_LIBS) \ $(LTLIBREADLINE) \ $(GSL_LIBS) src_ui_terminal_pspp_LDFLAGS = $(PSPP_LDFLAGS) $(PG_LDFLAGS) \ $(am__append_6) UI_FILES = \ src/ui/gui/aggregate.ui \ src/ui/gui/autorecode.ui \ src/ui/gui/binomial.ui \ src/ui/gui/compute.ui \ src/ui/gui/barchart.ui \ src/ui/gui/correlation.ui \ src/ui/gui/count.ui \ src/ui/gui/comments.ui \ src/ui/gui/crosstabs.ui \ src/ui/gui/chi-square.ui \ src/ui/gui/descriptives.ui \ src/ui/gui/entry-dialog.ui \ src/ui/gui/examine.ui \ src/ui/gui/goto-case.ui \ src/ui/gui/factor.ui \ src/ui/gui/find.ui \ src/ui/gui/frequencies.ui \ src/ui/gui/histogram.ui \ src/ui/gui/indep-samples.ui \ src/ui/gui/k-independent.ui \ src/ui/gui/k-means.ui \ src/ui/gui/k-related.ui \ src/ui/gui/ks-one-sample.ui \ src/ui/gui/logistic.ui \ src/ui/gui/means.ui \ src/ui/gui/missing-val-dialog.ui \ src/ui/gui/oneway.ui \ src/ui/gui/options.ui \ src/ui/gui/paired-samples.ui \ src/ui/gui/rank.ui \ src/ui/gui/runs.ui \ src/ui/gui/sort.ui \ src/ui/gui/split-file.ui \ src/ui/gui/recode.ui \ src/ui/gui/regression.ui \ src/ui/gui/reliability.ui \ src/ui/gui/roc.ui \ src/ui/gui/scatterplot.ui \ src/ui/gui/select-cases.ui \ src/ui/gui/t-test.ui \ src/ui/gui/text-data-import.ui \ src/ui/gui/transpose.ui \ src/ui/gui/univariate.ui \ src/ui/gui/val-labs-dialog.ui \ src/ui/gui/variable-info.ui \ src/ui/gui/data-editor.ui \ src/ui/gui/output-window.ui \ src/ui/gui/syntax-editor.ui \ src/ui/gui/var-type-dialog.ui \ src/ui/gui/weight.ui @HAVE_GUI_TRUE@src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1 @HAVE_GUI_TRUE@src_ui_gui_spreadsheet_test_CFLAGS = $(GTK_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1 @HAVE_GUI_TRUE@src_ui_gui_psppire_LDFLAGS = $(PSPPIRE_LDFLAGS) \ @HAVE_GUI_TRUE@ $(PG_LDFLAGS) $(am__append_9) $(am__append_10) @HAVE_GUI_TRUE@src_ui_gui_psppire_LDADD = \ @HAVE_GUI_TRUE@ lib/gtk-contrib/libxpaned.a \ @HAVE_GUI_TRUE@ src/ui/libuicommon.la \ @HAVE_GUI_TRUE@ src/libpspp.la \ @HAVE_GUI_TRUE@ src/libpspp-core.la \ @HAVE_GUI_TRUE@ $(GTK_LIBS) \ @HAVE_GUI_TRUE@ $(GTHREAD_LIBS) \ @HAVE_GUI_TRUE@ $(GTKSOURCEVIEW_LIBS) \ @HAVE_GUI_TRUE@ $(CAIRO_LIBS) \ @HAVE_GUI_TRUE@ $(LIBINTL) \ @HAVE_GUI_TRUE@ $(GSL_LIBS) @HAVE_GUI_TRUE@src_ui_gui_spreadsheet_test_LDADD = \ @HAVE_GUI_TRUE@ src/libpspp-core.la \ @HAVE_GUI_TRUE@ $(GTK_LIBS) \ @HAVE_GUI_TRUE@ $(GTHREAD_LIBS) @HAVE_GUI_TRUE@src_ui_gui_spreadsheet_test_SOURCES = src/ui/gui/spreadsheet-test.c src/ui/gui/psppire-spreadsheet-model.c @HAVE_GUI_TRUE@src_ui_gui_psppiredir = $(pkgdatadir) @HAVE_GUI_TRUE@dist_src_ui_gui_psppire_DATA = \ @HAVE_GUI_TRUE@ $(UI_FILES) \ @HAVE_GUI_TRUE@ $(top_srcdir)/src/ui/gui/pspp.lang \ @HAVE_GUI_TRUE@ $(top_srcdir)/src/ui/gui/psppire.gtkrc @HAVE_GUI_TRUE@src_ui_gui_psppire_SOURCES = \ @HAVE_GUI_TRUE@ src/ui/gui/pspp-sheet-private.h \ @HAVE_GUI_TRUE@ src/ui/gui/pspp-sheet-selection.c \ @HAVE_GUI_TRUE@ src/ui/gui/pspp-sheet-selection.h \ @HAVE_GUI_TRUE@ src/ui/gui/pspp-sheet-view-column.c \ @HAVE_GUI_TRUE@ src/ui/gui/pspp-sheet-view-column.h \ @HAVE_GUI_TRUE@ src/ui/gui/pspp-sheet-view.c \ @HAVE_GUI_TRUE@ src/ui/gui/pspp-sheet-view.h \ @HAVE_GUI_TRUE@ src/ui/gui/pspp-widget-facade.c \ @HAVE_GUI_TRUE@ src/ui/gui/pspp-widget-facade.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-button-editable.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-button-editable.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-cell-renderer-button.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-cell-renderer-button.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-keypad.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-selector.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-buttonbox.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-buttonbox.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-scanf.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-scanf.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-acr.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-import-assistant.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-import-assistant.h \ @HAVE_GUI_TRUE@ src/ui/gui/builder-wrapper.c \ @HAVE_GUI_TRUE@ src/ui/gui/builder-wrapper.h \ @HAVE_GUI_TRUE@ src/ui/gui/dialog-common.c \ @HAVE_GUI_TRUE@ src/ui/gui/dialog-common.h \ @HAVE_GUI_TRUE@ src/ui/gui/dict-display.h \ @HAVE_GUI_TRUE@ src/ui/gui/dict-display.c \ @HAVE_GUI_TRUE@ src/ui/gui/entry-dialog.c \ @HAVE_GUI_TRUE@ src/ui/gui/entry-dialog.h \ @HAVE_GUI_TRUE@ src/ui/gui/executor.c \ @HAVE_GUI_TRUE@ src/ui/gui/executor.h \ @HAVE_GUI_TRUE@ src/ui/gui/find-dialog.c \ @HAVE_GUI_TRUE@ src/ui/gui/find-dialog.h \ @HAVE_GUI_TRUE@ src/ui/gui/goto-case-dialog.c \ @HAVE_GUI_TRUE@ src/ui/gui/goto-case-dialog.h \ @HAVE_GUI_TRUE@ src/ui/gui/helper.c \ @HAVE_GUI_TRUE@ src/ui/gui/help-menu.c \ @HAVE_GUI_TRUE@ src/ui/gui/help-menu.h \ @HAVE_GUI_TRUE@ src/ui/gui/helper.h \ @HAVE_GUI_TRUE@ src/ui/gui/main.c \ @HAVE_GUI_TRUE@ src/ui/gui/missing-val-dialog.c \ @HAVE_GUI_TRUE@ src/ui/gui/missing-val-dialog.h \ @HAVE_GUI_TRUE@ src/ui/gui/options-dialog.c \ @HAVE_GUI_TRUE@ src/ui/gui/options-dialog.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-acr.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-checkbox-treeview.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-checkbox-treeview.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-conf.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-conf.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-data-editor.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-data-editor.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-data-sheet.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-data-sheet.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-data-store.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-data-store.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-data-window.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-data-window.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-aggregate.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-aggregate.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-autorecode.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-autorecode.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-1sks.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-1sks.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-barchart.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-barchart.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-binomial.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-binomial.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-chisquare.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-chisquare.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-compute.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-compute.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-comments.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-comments.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-count.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-count.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-correlation.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-correlation.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-crosstabs.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-crosstabs.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-descriptives.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-descriptives.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-examine.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-examine.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-factor.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-factor.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-flip.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-flip.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-frequencies.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-frequencies.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-histogram.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-histogram.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-indep-samps.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-indep-samps.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-kmeans.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-kmeans.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-logistic.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-logistic.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-k-independent.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-k-independent.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-k-related.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-k-related.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-means.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-means.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-oneway.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-oneway.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-paired.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-paired.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-rank.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-rank.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-recode.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-recode.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-recode-same.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-recode-same.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-recode-different.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-recode-different.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-regression.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-regression.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-reliability.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-reliability.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-roc.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-roc.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-runs.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-runs.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-scatterplot.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-scatterplot.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-sort.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-sort.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-select.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-select.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-split.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-split.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-tt1s.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-tt1s.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-two-sample.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-two-sample.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-univariate.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-univariate.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-var-info.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-var-info.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-weight.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dialog-action-weight.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dict.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dict.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dictview.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-dictview.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-empty-list-store.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-empty-list-store.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-encoding-selector.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-encoding-selector.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-format.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-format.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-keypad.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-lex-reader.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-lex-reader.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-means-layer.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-means-layer.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-output-view.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-output-view.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-output-window.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-output-window.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-var-view.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-var-view.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-spreadsheet-model.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-spreadsheet-model.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-selector.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-select-dest.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-select-dest.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-syntax-window.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-syntax-window.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-val-chooser.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-val-chooser.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-value-entry.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-value-entry.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-var-ptr.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-var-ptr.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-var-sheet.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-var-sheet.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-window.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-window.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-window-base.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-window-base.h \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-window-register.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-window-register.h \ @HAVE_GUI_TRUE@ src/ui/gui/t-test-options.c \ @HAVE_GUI_TRUE@ src/ui/gui/t-test-options.h \ @HAVE_GUI_TRUE@ src/ui/gui/val-labs-dialog.c \ @HAVE_GUI_TRUE@ src/ui/gui/val-labs-dialog.h \ @HAVE_GUI_TRUE@ src/ui/gui/var-display.c \ @HAVE_GUI_TRUE@ src/ui/gui/var-display.h \ @HAVE_GUI_TRUE@ src/ui/gui/var-type-dialog.c \ @HAVE_GUI_TRUE@ src/ui/gui/var-type-dialog.h \ @HAVE_GUI_TRUE@ src/ui/gui/widget-io.c \ @HAVE_GUI_TRUE@ src/ui/gui/widget-io.h \ @HAVE_GUI_TRUE@ src/ui/gui/widgets.c \ @HAVE_GUI_TRUE@ src/ui/gui/widgets.h \ @HAVE_GUI_TRUE@ src/ui/gui/windows-menu.c \ @HAVE_GUI_TRUE@ src/ui/gui/windows-menu.h @HAVE_GUI_TRUE@OBSOLETE = \ @HAVE_GUI_TRUE@ src/ui/gui/page-assistant.c \ @HAVE_GUI_TRUE@ src/ui/gui/page-intro.c \ @HAVE_GUI_TRUE@ src/ui/gui/page-intro.h \ @HAVE_GUI_TRUE@ src/ui/gui/page-file.c \ @HAVE_GUI_TRUE@ src/ui/gui/page-first-line.c \ @HAVE_GUI_TRUE@ src/ui/gui/page-first-line.h \ @HAVE_GUI_TRUE@ src/ui/gui/page-formats.c \ @HAVE_GUI_TRUE@ src/ui/gui/page-formats.h \ @HAVE_GUI_TRUE@ src/ui/gui/page-separators.c \ @HAVE_GUI_TRUE@ src/ui/gui/page-separators.h \ @HAVE_GUI_TRUE@ src/ui/gui/page-sheet-spec.c \ @HAVE_GUI_TRUE@ src/ui/gui/page-sheet-spec.h \ @HAVE_GUI_TRUE@ src/ui/gui/text-data-import-dialog.c \ @HAVE_GUI_TRUE@ src/ui/gui/text-data-import-dialog.h @HAVE_GUI_TRUE@nodist_src_ui_gui_psppire_SOURCES = \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-marshal.c \ @HAVE_GUI_TRUE@ src/ui/gui/psppire-marshal.h \ @HAVE_GUI_TRUE@ src/ui/gui/resources.c @HAVE_GUI_TRUE@desktopdir = $(datadir)/applications @HAVE_GUI_TRUE@desktop_DATA = src/ui/gui/pspp.desktop @HAVE_GUI_TRUE@appdatadir = $(datadir)/appdata @HAVE_GUI_TRUE@dist_appdata_DATA = src/ui/gui/pspp.appdata.xml # wrapper src_ui_gui_psppire_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/ui/gui/include # This is a generated file. Do not edit. icons = \ src/ui/gui/icons/16x16/categories/align-left.png \ src/ui/gui/icons/16x16/categories/align-center.png \ src/ui/gui/icons/16x16/categories/align-right.png \ src/ui/gui/icons/16x16/categories/measure-scale.png \ src/ui/gui/icons/16x16/categories/measure-ordinal.png \ src/ui/gui/icons/16x16/categories/measure-nominal.png \ src/ui/gui/icons/16x16/categories/measure-date-scale.png \ src/ui/gui/icons/16x16/categories/measure-date-nominal.png \ src/ui/gui/icons/16x16/categories/measure-date-ordinal.png \ src/ui/gui/icons/16x16/categories/measure-time-scale.png \ src/ui/gui/icons/16x16/categories/measure-time-nominal.png \ src/ui/gui/icons/16x16/categories/measure-time-ordinal.png \ src/ui/gui/icons/16x16/categories/measure-string-nominal.png \ src/ui/gui/icons/16x16/categories/measure-string-ordinal.png \ src/ui/gui/icons/16x16/categories/measure-currency-scale.png \ src/ui/gui/icons/16x16/categories/measure-currency-nominal.png \ src/ui/gui/icons/16x16/categories/measure-currency-ordinal.png \ src/ui/gui/icons/16x16/categories/role-input.png \ src/ui/gui/icons/16x16/categories/role-target.png \ src/ui/gui/icons/16x16/categories/role-both.png \ src/ui/gui/icons/16x16/categories/role-none.png \ src/ui/gui/icons/16x16/categories/role-partition.png \ src/ui/gui/icons/16x16/categories/role-split.png \ src/ui/gui/icons/32x32/actions/data-split-file.png \ src/ui/gui/icons/32x32/actions/data-select-cases.png \ src/ui/gui/icons/32x32/actions/data-weight-cases.png \ src/ui/gui/icons/32x32/actions/transform-compute.png \ src/ui/gui/icons/32x32/actions/edit-find.png \ src/ui/gui/icons/32x32/actions/edit-go-to-case.png \ src/ui/gui/icons/32x32/actions/edit-go-to-variable.png \ src/ui/gui/icons/32x32/actions/edit-insert-case.png \ src/ui/gui/icons/32x32/actions/edit-insert-variable.png \ src/ui/gui/icons/32x32/actions/edit-cut.png \ src/ui/gui/icons/32x32/actions/edit-copy.png \ src/ui/gui/icons/32x32/actions/edit-paste.png \ src/ui/gui/icons/32x32/actions/edit-undo.png \ src/ui/gui/icons/32x32/actions/edit-redo.png \ src/ui/gui/icons/32x32/actions/edit-select-all.png \ src/ui/gui/icons/32x32/actions/file-open-data.png \ src/ui/gui/icons/32x32/actions/file-save-data.png \ src/ui/gui/icons/32x32/actions/file-export-data.png \ src/ui/gui/icons/32x32/actions/file-print.png \ src/ui/gui/icons/32x32/actions/view-value-labels.png \ src/ui/gui/icons/32x32/actions/utilities-variables.png \ src/ui/gui/icons/32x32/actions/run-all.png \ src/ui/gui/icons/24x24/actions/data-split-file.png \ src/ui/gui/icons/24x24/actions/data-select-cases.png \ src/ui/gui/icons/24x24/actions/data-weight-cases.png \ src/ui/gui/icons/24x24/actions/transform-compute.png \ src/ui/gui/icons/24x24/actions/edit-find.png \ src/ui/gui/icons/24x24/actions/edit-go-to-case.png \ src/ui/gui/icons/24x24/actions/edit-go-to-variable.png \ src/ui/gui/icons/24x24/actions/edit-insert-case.png \ src/ui/gui/icons/24x24/actions/edit-insert-variable.png \ src/ui/gui/icons/24x24/actions/edit-cut.png \ src/ui/gui/icons/24x24/actions/edit-copy.png \ src/ui/gui/icons/24x24/actions/edit-paste.png \ src/ui/gui/icons/24x24/actions/edit-undo.png \ src/ui/gui/icons/24x24/actions/edit-redo.png \ src/ui/gui/icons/24x24/actions/edit-select-all.png \ src/ui/gui/icons/24x24/actions/file-open-data.png \ src/ui/gui/icons/24x24/actions/file-save-data.png \ src/ui/gui/icons/24x24/actions/file-export-data.png \ src/ui/gui/icons/24x24/actions/file-print.png \ src/ui/gui/icons/24x24/actions/view-value-labels.png \ src/ui/gui/icons/24x24/actions/utilities-variables.png \ src/ui/gui/icons/24x24/actions/run-all.png \ src/ui/gui/icons/16x16/actions/file-new-data.png \ src/ui/gui/icons/16x16/actions/file-syntax-data.png \ src/ui/gui/icons/16x16/actions/file-system-data.png \ src/ui/gui/icons/16x16/actions/file-open-data.png \ src/ui/gui/icons/16x16/actions/file-import-data.png \ src/ui/gui/icons/16x16/actions/file-export-data.png \ src/ui/gui/icons/16x16/actions/file-save-data.png \ src/ui/gui/icons/16x16/actions/file-save-as.png \ src/ui/gui/icons/16x16/actions/file-print.png \ src/ui/gui/icons/16x16/actions/file-rename-data-set.png \ src/ui/gui/icons/16x16/actions/file-display-information.png \ src/ui/gui/icons/16x16/actions/display-information-working-file.png \ src/ui/gui/icons/16x16/actions/display-information-external-file.png \ src/ui/gui/icons/16x16/actions/file-recently-used.png \ src/ui/gui/icons/16x16/actions/file-quit.png \ src/ui/gui/icons/16x16/actions/file-display-information.png \ src/ui/gui/icons/16x16/actions/edit-insert-variable.png \ src/ui/gui/icons/16x16/actions/edit-insert-case.png \ src/ui/gui/icons/16x16/actions/edit-go-to-variable.png \ src/ui/gui/icons/16x16/actions/edit-go-to-case.png \ src/ui/gui/icons/16x16/actions/edit-cut.png \ src/ui/gui/icons/16x16/actions/edit-copy.png \ src/ui/gui/icons/16x16/actions/edit-paste.png \ src/ui/gui/icons/16x16/actions/edit-delete.png \ src/ui/gui/icons/16x16/actions/edit-undo.png \ src/ui/gui/icons/16x16/actions/edit-redo.png \ src/ui/gui/icons/16x16/actions/edit-select-all.png \ src/ui/gui/icons/16x16/actions/edit-clear.png \ src/ui/gui/icons/16x16/actions/edit-find.png \ src/ui/gui/icons/16x16/actions/view-font.png \ src/ui/gui/icons/16x16/actions/view-value-labels.png \ src/ui/gui/icons/16x16/actions/data-sort-cases.png \ src/ui/gui/icons/16x16/actions/data-transpose.png \ src/ui/gui/icons/16x16/actions/data-aggregate.png \ src/ui/gui/icons/16x16/actions/data-split-file.png \ src/ui/gui/icons/16x16/actions/data-select-cases.png \ src/ui/gui/icons/16x16/actions/data-weight-cases.png \ src/ui/gui/icons/16x16/actions/run-all.png \ src/ui/gui/icons/16x16/actions/run-selection.png \ src/ui/gui/icons/16x16/actions/run-current-line.png \ src/ui/gui/icons/16x16/actions/run-to-end.png \ src/ui/gui/icons/16x16/actions/transform-compute.png \ src/ui/gui/icons/16x16/actions/transform-count.png \ src/ui/gui/icons/16x16/actions/transform-rank-cases.png \ src/ui/gui/icons/16x16/actions/transform-automatic-recode.png \ src/ui/gui/icons/16x16/actions/transform-in-to-same-variables.png \ src/ui/gui/icons/16x16/actions/transform-in-to-different-variables.png \ src/ui/gui/icons/16x16/actions/transform-run-pending.png \ src/ui/gui/icons/16x16/actions/analyze-descriptive-statistics.png \ src/ui/gui/icons/16x16/actions/analyze-compare-means.png \ src/ui/gui/icons/16x16/actions/analyze-univariate-analysis.png \ src/ui/gui/icons/16x16/actions/analyze-bivariate-correlation.png \ src/ui/gui/icons/16x16/actions/analyze-kmeans-cluster.png \ src/ui/gui/icons/16x16/actions/analyze-factor-analysis.png \ src/ui/gui/icons/16x16/actions/analyze-reliability.png \ src/ui/gui/icons/16x16/actions/analyze-regression.png \ src/ui/gui/icons/16x16/actions/analyze-non-parametric-statistics.png \ src/ui/gui/icons/16x16/actions/analyze-roc-curve.png \ src/ui/gui/icons/16x16/actions/utilities-variables.png \ src/ui/gui/icons/16x16/actions/utilities-data-file-comments.png \ src/ui/gui/icons/16x16/actions/windows-minimize-all.png \ src/ui/gui/icons/16x16/actions/windows-split.png \ src/ui/gui/icons/16x16/actions/help-reference-manual.png \ src/ui/gui/icons/16x16/actions/help-about.png \ src/ui/gui/icons/32x32/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/32x32/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/32x32/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/32x32/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/22x22/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/22x22/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/22x22/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/22x22/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/24x24/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/24x24/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/24x24/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/24x24/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/256x256/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/256x256/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/256x256/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/256x256/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/16x16/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/16x16/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/16x16/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/16x16/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/48x48/mimetypes/application-x-spss-por.png \ src/ui/gui/icons/48x48/mimetypes/application-x-spss-sav.png \ src/ui/gui/icons/48x48/mimetypes/application-x-spss-sps.png \ src/ui/gui/icons/48x48/mimetypes/application-x-spss-zsav.png \ src/ui/gui/icons/32x32/apps/pspp.png \ src/ui/gui/icons/22x22/apps/pspp.png \ src/ui/gui/icons/24x24/apps/pspp.png \ src/ui/gui/icons/16x16/apps/pspp.png \ src/ui/gui/icons/48x48/apps/pspp.png \ src/ui/gui/icons/256x256/apps/pspp.png \ src/ui/gui/icons/scalable/apps/pspp.svg \ src/ui/gui/icons/splash-t.png \ src/ui/gui/icons/splash-r.png icon_srcs = \ src/ui/gui/artwork/16x16/categories/align-left.svg \ src/ui/gui/artwork/16x16/categories/align-center.svg \ src/ui/gui/artwork/16x16/categories/align-right.svg \ src/ui/gui/artwork/16x16/categories/measure-scale.svg \ src/ui/gui/artwork/16x16/categories/measure-ordinal.svg \ src/ui/gui/artwork/16x16/categories/measure-nominal.svg \ src/ui/gui/artwork/16x16/categories/measure-date-scale.svg \ src/ui/gui/artwork/16x16/categories/measure-date-nominal.svg \ src/ui/gui/artwork/16x16/categories/measure-date-ordinal.svg \ src/ui/gui/artwork/16x16/categories/measure-time-scale.svg \ src/ui/gui/artwork/16x16/categories/measure-time-nominal.svg \ src/ui/gui/artwork/16x16/categories/measure-time-ordinal.svg \ src/ui/gui/artwork/16x16/categories/measure-string-nominal.svg \ src/ui/gui/artwork/16x16/categories/measure-string-ordinal.svg \ src/ui/gui/artwork/16x16/categories/measure-currency-scale.svg \ src/ui/gui/artwork/16x16/categories/measure-currency-nominal.svg \ src/ui/gui/artwork/16x16/categories/measure-currency-ordinal.svg \ src/ui/gui/artwork/16x16/categories/role-input.svg \ src/ui/gui/artwork/16x16/categories/role-target.svg \ src/ui/gui/artwork/16x16/categories/role-both.svg \ src/ui/gui/artwork/16x16/categories/role-none.svg \ src/ui/gui/artwork/16x16/categories/role-partition.svg \ src/ui/gui/artwork/16x16/categories/role-split.svg \ src/ui/gui/artwork/32x32/actions/data-split-file.svg \ src/ui/gui/artwork/32x32/actions/data-select-cases.svg \ src/ui/gui/artwork/32x32/actions/data-weight-cases.svg \ src/ui/gui/artwork/32x32/actions/transform-compute.svg \ src/ui/gui/artwork/32x32/actions/edit-find.svg \ src/ui/gui/artwork/32x32/actions/edit-go-to-case.svg \ src/ui/gui/artwork/32x32/actions/edit-go-to-variable.svg \ src/ui/gui/artwork/32x32/actions/edit-insert-case.svg \ src/ui/gui/artwork/32x32/actions/edit-insert-variable.svg \ src/ui/gui/artwork/32x32/actions/edit-cut.svg \ src/ui/gui/artwork/32x32/actions/edit-copy.svg \ src/ui/gui/artwork/32x32/actions/edit-paste.svg \ src/ui/gui/artwork/32x32/actions/edit-undo.svg \ src/ui/gui/artwork/32x32/actions/edit-redo.svg \ src/ui/gui/artwork/32x32/actions/edit-select-all.svg \ src/ui/gui/artwork/32x32/actions/file-open-data.svg \ src/ui/gui/artwork/32x32/actions/file-save-data.svg \ src/ui/gui/artwork/32x32/actions/file-export-data.svg \ src/ui/gui/artwork/32x32/actions/file-print.svg \ src/ui/gui/artwork/32x32/actions/view-value-labels.svg \ src/ui/gui/artwork/32x32/actions/utilities-variables.svg \ src/ui/gui/artwork/32x32/actions/run-all.svg \ src/ui/gui/artwork/24x24/actions/data-split-file.svg \ src/ui/gui/artwork/24x24/actions/data-select-cases.svg \ src/ui/gui/artwork/24x24/actions/data-weight-cases.svg \ src/ui/gui/artwork/24x24/actions/transform-compute.svg \ src/ui/gui/artwork/24x24/actions/edit-find.svg \ src/ui/gui/artwork/24x24/actions/edit-go-to-case.svg \ src/ui/gui/artwork/24x24/actions/edit-go-to-variable.svg \ src/ui/gui/artwork/24x24/actions/edit-insert-case.svg \ src/ui/gui/artwork/24x24/actions/edit-insert-variable.svg \ src/ui/gui/artwork/24x24/actions/edit-cut.svg \ src/ui/gui/artwork/24x24/actions/edit-copy.svg \ src/ui/gui/artwork/24x24/actions/edit-paste.svg \ src/ui/gui/artwork/24x24/actions/edit-undo.svg \ src/ui/gui/artwork/24x24/actions/edit-redo.svg \ src/ui/gui/artwork/24x24/actions/edit-select-all.svg \ src/ui/gui/artwork/24x24/actions/file-open-data.svg \ src/ui/gui/artwork/24x24/actions/file-save-data.svg \ src/ui/gui/artwork/24x24/actions/file-export-data.svg \ src/ui/gui/artwork/24x24/actions/file-print.svg \ src/ui/gui/artwork/24x24/actions/view-value-labels.svg \ src/ui/gui/artwork/24x24/actions/utilities-variables.svg \ src/ui/gui/artwork/24x24/actions/run-all.svg \ src/ui/gui/artwork/16x16/actions/file-new-data.svg \ src/ui/gui/artwork/16x16/actions/file-syntax-data.svg \ src/ui/gui/artwork/16x16/actions/file-system-data.svg \ src/ui/gui/artwork/16x16/actions/file-open-data.svg \ src/ui/gui/artwork/16x16/actions/file-import-data.svg \ src/ui/gui/artwork/16x16/actions/file-export-data.svg \ src/ui/gui/artwork/16x16/actions/file-save-data.svg \ src/ui/gui/artwork/16x16/actions/file-save-as.svg \ src/ui/gui/artwork/16x16/actions/file-print.svg \ src/ui/gui/artwork/16x16/actions/file-rename-data-set.svg \ src/ui/gui/artwork/16x16/actions/file-display-information.svg \ src/ui/gui/artwork/16x16/actions/display-information-working-file.svg \ src/ui/gui/artwork/16x16/actions/display-information-external-file.svg \ src/ui/gui/artwork/16x16/actions/file-recently-used.svg \ src/ui/gui/artwork/16x16/actions/file-quit.svg \ src/ui/gui/artwork/16x16/actions/file-display-information.svg \ src/ui/gui/artwork/16x16/actions/edit-insert-variable.svg \ src/ui/gui/artwork/16x16/actions/edit-insert-case.svg \ src/ui/gui/artwork/16x16/actions/edit-go-to-variable.svg \ src/ui/gui/artwork/16x16/actions/edit-go-to-case.svg \ src/ui/gui/artwork/16x16/actions/edit-cut.svg \ src/ui/gui/artwork/16x16/actions/edit-copy.svg \ src/ui/gui/artwork/16x16/actions/edit-paste.svg \ src/ui/gui/artwork/16x16/actions/edit-delete.svg \ src/ui/gui/artwork/16x16/actions/edit-undo.svg \ src/ui/gui/artwork/16x16/actions/edit-redo.svg \ src/ui/gui/artwork/16x16/actions/edit-select-all.svg \ src/ui/gui/artwork/16x16/actions/edit-clear.svg \ src/ui/gui/artwork/16x16/actions/edit-find.svg \ src/ui/gui/artwork/16x16/actions/view-font.svg \ src/ui/gui/artwork/16x16/actions/view-value-labels.svg \ src/ui/gui/artwork/16x16/actions/data-sort-cases.svg \ src/ui/gui/artwork/16x16/actions/data-transpose.svg \ src/ui/gui/artwork/16x16/actions/data-aggregate.svg \ src/ui/gui/artwork/16x16/actions/data-split-file.svg \ src/ui/gui/artwork/16x16/actions/data-select-cases.svg \ src/ui/gui/artwork/16x16/actions/data-weight-cases.svg \ src/ui/gui/artwork/16x16/actions/run-all.svg \ src/ui/gui/artwork/16x16/actions/run-selection.svg \ src/ui/gui/artwork/16x16/actions/run-current-line.svg \ src/ui/gui/artwork/16x16/actions/run-to-end.svg \ src/ui/gui/artwork/16x16/actions/transform-compute.svg \ src/ui/gui/artwork/16x16/actions/transform-count.svg \ src/ui/gui/artwork/16x16/actions/transform-rank-cases.svg \ src/ui/gui/artwork/16x16/actions/transform-automatic-recode.svg \ src/ui/gui/artwork/16x16/actions/transform-in-to-same-variables.svg \ src/ui/gui/artwork/16x16/actions/transform-in-to-different-variables.svg \ src/ui/gui/artwork/16x16/actions/transform-run-pending.svg \ src/ui/gui/artwork/16x16/actions/analyze-descriptive-statistics.svg \ src/ui/gui/artwork/16x16/actions/analyze-compare-means.svg \ src/ui/gui/artwork/16x16/actions/analyze-univariate-analysis.svg \ src/ui/gui/artwork/16x16/actions/analyze-bivariate-correlation.svg \ src/ui/gui/artwork/16x16/actions/analyze-kmeans-cluster.svg \ src/ui/gui/artwork/16x16/actions/analyze-factor-analysis.svg \ src/ui/gui/artwork/16x16/actions/analyze-reliability.svg \ src/ui/gui/artwork/16x16/actions/analyze-regression.svg \ src/ui/gui/artwork/16x16/actions/analyze-non-parametric-statistics.svg \ src/ui/gui/artwork/16x16/actions/analyze-roc-curve.svg \ src/ui/gui/artwork/16x16/actions/utilities-variables.svg \ src/ui/gui/artwork/16x16/actions/utilities-data-file-comments.svg \ src/ui/gui/artwork/16x16/actions/windows-minimize-all.svg \ src/ui/gui/artwork/16x16/actions/windows-split.svg \ src/ui/gui/artwork/16x16/actions/help-reference-manual.svg \ src/ui/gui/artwork/16x16/actions/help-about.svg \ src/ui/gui/artwork/32x32/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/32x32/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/32x32/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/32x32/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/22x22/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/22x22/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/22x22/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/22x22/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/24x24/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/24x24/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/24x24/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/24x24/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/256x256/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/256x256/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/256x256/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/256x256/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/16x16/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/16x16/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/16x16/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/16x16/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/48x48/mimetypes/application-x-spss-por.svg \ src/ui/gui/artwork/48x48/mimetypes/application-x-spss-sav.svg \ src/ui/gui/artwork/48x48/mimetypes/application-x-spss-sps.svg \ src/ui/gui/artwork/48x48/mimetypes/application-x-spss-zsav.svg \ src/ui/gui/artwork/32x32/apps/pspp.svg \ src/ui/gui/artwork/22x22/apps/pspp.svg \ src/ui/gui/artwork/24x24/apps/pspp.svg \ src/ui/gui/artwork/16x16/apps/pspp.svg \ src/ui/gui/artwork/48x48/apps/pspp.svg \ src/ui/gui/artwork/256x256/apps/pspp.svg \ src/ui/gui/artwork/scalable/apps/pspp.svg \ src/ui/gui/artwork/splash-t.svg \ src/ui/gui/artwork/splash-r.svg themedir = $(DESTDIR)$(datadir)/icons/hicolor sizes = 16x16 22x22 24x24 32x32 48x48 256x256 scalable @HAVE_GUI_TRUE@nodist_src_ui_gui_psppire_DATA = src/ui/gui/icons/splash.png src_ui_libuicommon_la_SOURCES = \ src/ui/source-init-opts.c src/ui/source-init-opts.h \ src/ui/syntax-gen.c src/ui/syntax-gen.h utilities_pspp_dump_sav_SOURCES = \ src/libpspp/integer-format.c \ src/libpspp/float-format.c \ utilities/pspp-dump-sav.c utilities_pspp_dump_sav_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\" utilities_pspp_convert_SOURCES = utilities/pspp-convert.c utilities_pspp_convert_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\" utilities_pspp_convert_LDADD = src/libpspp-core.la utilities_pspp_convert_LDFLAGS = $(PSPP_LDFLAGS) $(PG_LDFLAGS) \ $(am__append_17) tests_data_datasheet_test_SOURCES = \ tests/data/datasheet-test.c tests_data_datasheet_test_LDADD = src/libpspp-core.la tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS) tests_data_sack_SOURCES = \ tests/data/sack.c tests_data_sack_LDADD = src/libpspp-core.la tests_data_sack_CFLAGS = $(AM_CFLAGS) tests_libpspp_line_reader_test_SOURCES = tests/libpspp/line-reader-test.c tests_libpspp_line_reader_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_ll_test_SOURCES = \ src/libpspp/ll.c \ tests/libpspp/ll-test.c tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS) tests_libpspp_llx_test_SOURCES = \ src/libpspp/ll.c \ src/libpspp/llx.c \ tests/libpspp/llx-test.c tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS) tests_libpspp_encoding_guesser_test_SOURCES = \ tests/libpspp/encoding-guesser-test.c tests_libpspp_encoding_guesser_test_LDADD = \ src/libpspp/liblibpspp.la \ gl/libgl.la tests_libpspp_heap_test_SOURCES = \ tests/libpspp/heap-test.c tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_heap_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_hmap_test_SOURCES = \ src/libpspp/hmap.c \ tests/libpspp/hmap-test.c tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_hmapx_test_SOURCES = \ src/libpspp/hmap.c \ src/libpspp/hmapx.c \ tests/libpspp/hmapx-test.c tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_i18n_test_SOURCES = tests/libpspp/i18n-test.c tests_libpspp_i18n_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_abt_test_SOURCES = \ src/libpspp/abt.c \ tests/libpspp/abt-test.c tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_bt_test_SOURCES = \ src/libpspp/bt.c \ tests/libpspp/bt-test.c tests_libpspp_bt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_cmac_aes256_test_SOURCES = \ src/libpspp/cmac-aes256.c \ tests/libpspp/cmac-aes256-test.c tests_libpspp_cmac_aes256_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_range_map_test_SOURCES = \ src/libpspp/bt.c \ src/libpspp/range-map.c \ tests/libpspp/range-map-test.c tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_range_set_test_SOURCES = \ tests/libpspp/range-set-test.c tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_range_set_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_range_tower_test_SOURCES = \ tests/libpspp/range-tower-test.c tests_libpspp_range_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_range_tower_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_str_test_SOURCES = \ tests/libpspp/str-test.c tests_libpspp_str_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_string_map_test_SOURCES = \ tests/libpspp/string-map-test.c tests_libpspp_string_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_string_map_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_stringi_map_test_SOURCES = \ tests/libpspp/stringi-map-test.c tests_libpspp_stringi_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_stringi_map_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_string_set_test_SOURCES = \ src/libpspp/hash-functions.c \ src/libpspp/hmap.c \ src/libpspp/string-set.c \ tests/libpspp/string-set-test.c tests_libpspp_string_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_stringi_set_test_SOURCES = \ tests/libpspp/stringi-set-test.c tests_libpspp_stringi_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_stringi_set_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_tower_test_SOURCES = \ tests/libpspp/tower-test.c tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_tower_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_u8_istream_test_SOURCES = tests/libpspp/u8-istream-test.c tests_libpspp_u8_istream_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_sparse_array_test_SOURCES = \ tests/libpspp/sparse-array-test.c tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_sparse_array_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la tests_libpspp_sparse_xarray_test_SOURCES = \ tests/libpspp/sparse-xarray-test.c tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10 tests_libpspp_sparse_xarray_test_LDADD = src/libpspp/liblibpspp.la \ src/libpspp-core.la \ gl/libgl.la tests_data_inexactify_SOURCES = tests/data/inexactify.c tests_language_lexer_command_name_test_SOURCES = \ src/data/identifier.c \ src/language/lexer/command-name.c \ tests/language/lexer/command-name-test.c tests_language_lexer_command_name_test_LDADD = \ src/libpspp/liblibpspp.la \ gl/libgl.la tests_language_lexer_command_name_test_CFLAGS = $(AM_CFLAGS) tests_language_lexer_scan_test_SOURCES = \ src/data/identifier.c \ src/language/lexer/command-name.c \ src/language/lexer/scan.c \ src/language/lexer/segment.c \ src/language/lexer/token.c \ tests/language/lexer/scan-test.c tests_language_lexer_scan_test_CFLAGS = $(AM_CFLAGS) tests_language_lexer_scan_test_LDADD = \ src/libpspp/liblibpspp.la \ gl/libgl.la tests_language_lexer_segment_test_SOURCES = \ src/data/identifier.c \ src/language/lexer/command-name.c \ src/language/lexer/segment.c \ tests/language/lexer/segment-test.c tests_language_lexer_segment_test_CFLAGS = $(AM_CFLAGS) tests_language_lexer_segment_test_LDADD = \ src/libpspp/liblibpspp.la \ gl/libgl.la tests_libpspp_zip_test_SOURCES = \ tests/libpspp/zip-test.c tests_libpspp_zip_test_CFLAGS = $(AM_CFLAGS) tests_libpspp_zip_test_LDADD = \ src/libpspp/liblibpspp.la \ src/libpspp-core.la \ gl/libgl.la tests_math_chart_get_scale_test_SOURCES = tests/math/chart-get-scale-test.c tests_math_chart_get_scale_test_LDADD = \ src/math/libpspp-math.la \ src/libpspp/liblibpspp.la \ src/libpspp-core.la \ gl/libgl.la tests_math_chart_get_ticks_format_test_SOURCES = tests/math/chart-get-ticks-format-test.c tests_math_chart_get_ticks_format_test_LDADD = \ src/math/libpspp-math.la \ src/libpspp/liblibpspp.la \ src/libpspp-core.la \ gl/libgl.la tests_output_render_test_SOURCES = tests/output/render-test.c tests_output_render_test_LDADD = \ src/libpspp.la \ src/libpspp-core.la \ $(CAIRO_LIBS) tests_ui_syntax_gen_test_SOURCES = tests/ui/syntax-gen-test.c tests_ui_syntax_gen_test_LDADD = \ src/ui/libuicommon.la \ src/libpspp-core.la \ $(CAIRO_LIBS) TESTSUITE_AT = \ tests/data/calendar.at \ tests/data/data-in.at \ tests/data/data-out.at \ tests/data/datasheet-test.at \ tests/data/dictionary.at \ tests/data/file.at \ tests/data/format-guesser.at \ tests/data/pc+-file-reader.at \ tests/data/por-file.at \ tests/data/sys-file-reader.at \ tests/data/sys-file.at \ tests/data/encrypted-file.at \ tests/language/command.at \ tests/language/control/do-if.at \ tests/language/control/do-repeat.at \ tests/language/control/loop.at \ tests/language/control/temporary.at \ tests/language/data-io/add-files.at \ tests/language/data-io/data-list.at \ tests/language/data-io/data-reader.at \ tests/language/data-io/dataset.at \ tests/language/data-io/file-handle.at \ tests/language/data-io/get-data-spreadsheet.at \ tests/language/data-io/get-data-psql.at \ tests/language/data-io/get-data-txt.at \ tests/language/data-io/get.at \ tests/language/data-io/inpt-pgm.at \ tests/language/data-io/list.at \ tests/language/data-io/match-files.at \ tests/language/data-io/matrix-data.at \ tests/language/data-io/print-space.at \ tests/language/data-io/print.at \ tests/language/data-io/save.at \ tests/language/data-io/save-translate.at \ tests/language/data-io/update.at \ tests/language/dictionary/attributes.at \ tests/language/dictionary/delete-variables.at \ tests/language/dictionary/formats.at \ tests/language/dictionary/missing-values.at \ tests/language/dictionary/mrsets.at \ tests/language/dictionary/rename-variables.at \ tests/language/dictionary/sort-variables.at \ tests/language/dictionary/split-file.at \ tests/language/dictionary/sys-file-info.at \ tests/language/dictionary/value-labels.at \ tests/language/dictionary/variable-display.at \ tests/language/dictionary/vector.at \ tests/language/dictionary/weight.at \ tests/language/expressions/evaluate.at \ tests/language/expressions/parse.at \ tests/language/lexer/command-name.at \ tests/language/lexer/lexer.at \ tests/language/lexer/q2c.at \ tests/language/lexer/scan.at \ tests/language/lexer/segment.at \ tests/language/lexer/variable-parser.at \ tests/language/stats/aggregate.at \ tests/language/stats/autorecode.at \ tests/language/stats/correlations.at \ tests/language/stats/crosstabs.at \ tests/language/stats/descriptives.at \ tests/language/stats/examine.at \ tests/language/stats/graph.at \ tests/language/stats/factor.at \ tests/language/stats/flip.at \ tests/language/stats/frequencies.at \ tests/language/stats/glm.at \ tests/language/stats/logistic.at \ tests/language/stats/means.at \ tests/language/stats/npar.at \ tests/language/stats/oneway.at \ tests/language/stats/quick-cluster.at \ tests/language/stats/rank.at \ tests/language/stats/regression.at \ tests/language/stats/reliability.at \ tests/language/stats/roc.at \ tests/language/stats/sort-cases.at \ tests/language/stats/t-test.at \ tests/language/utilities/cache.at \ tests/language/utilities/cd.at \ tests/language/utilities/date.at \ tests/language/utilities/insert.at \ tests/language/utilities/permissions.at \ tests/language/utilities/set.at \ tests/language/utilities/show.at \ tests/language/utilities/title.at \ tests/language/xforms/compute.at \ tests/language/xforms/count.at \ tests/language/xforms/recode.at \ tests/language/xforms/sample.at \ tests/language/xforms/select-if.at \ tests/libpspp/abt.at \ tests/libpspp/bt.at \ tests/libpspp/encoding-guesser.at \ tests/libpspp/float-format.at \ tests/libpspp/heap.at \ tests/libpspp/hmap.at \ tests/libpspp/hmapx.at \ tests/libpspp/i18n.at \ tests/libpspp/line-reader.at \ tests/libpspp/ll.at \ tests/libpspp/llx.at \ tests/libpspp/range-map.at \ tests/libpspp/range-set.at \ tests/libpspp/range-tower.at \ tests/libpspp/sparse-array.at \ tests/libpspp/sparse-xarray-test.at \ tests/libpspp/str.at \ tests/libpspp/string-map.at \ tests/libpspp/stringi-map.at \ tests/libpspp/string-set.at \ tests/libpspp/stringi-set.at \ tests/libpspp/tower.at \ tests/libpspp/u8-istream.at \ tests/libpspp/zip.at \ tests/math/chart-geometry.at \ tests/math/moments.at \ tests/math/randist.at \ tests/output/ascii.at \ tests/output/charts.at \ tests/output/html.at \ tests/output/output.at \ tests/output/paper-size.at \ tests/output/render.at \ tests/output/tables.at \ tests/ui/terminal/main.at \ tests/ui/syntax-gen.at \ tests/utilities/pspp-convert.at \ tests/perl-module.at TESTSUITE = $(srcdir)/tests/testsuite AUTOTEST_PATH = tests/data:tests/language/lexer:tests/libpspp:tests/output:src/ui/terminal:utilities AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te AUTOTEST = $(AUTOM4TE) --language=autotest @WITH_GUI_TOOLS_TRUE@module_LTLIBRARIES = libglade-psppire.la @WITH_GUI_TOOLS_TRUE@moduledir = `pkg-config --variable=moduledir gladeui-2.0` @WITH_GUI_TOOLS_TRUE@catalogdir = `pkg-config --variable=catalogdir gladeui-2.0` @WITH_GUI_TOOLS_TRUE@pixmapdir = `pkg-config --variable=pixmapdir gladeui-2.0` @WITH_GUI_TOOLS_TRUE@small_pixmapdir = $(pixmapdir)/hicolor/16x16/actions @WITH_GUI_TOOLS_TRUE@large_pixmapdir = $(pixmapdir)/hicolor/22x22/actions # format.c for psppire-value-entry.c @WITH_GUI_TOOLS_TRUE@libglade_psppire_la_SOURCES = \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/helper.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/dialog-common.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-var-ptr.c \ @WITH_GUI_TOOLS_TRUE@ src/data/format.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-format.c \ @WITH_GUI_TOOLS_TRUE@ src/data/value-labels.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-conf.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-acr.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-buttonbox.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-dialog.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-keypad.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-dictview.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-selector.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-select-dest.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-var-view.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-checkbox-treeview.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-val-chooser.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-value-entry.c \ @WITH_GUI_TOOLS_TRUE@ src/ui/gui/psppire-window-base.c @WITH_GUI_TOOLS_TRUE@dist_catalog_DATA = \ @WITH_GUI_TOOLS_TRUE@ glade/psppire.xml @WITH_GUI_TOOLS_TRUE@dist_small_pixmap_DATA = \ @WITH_GUI_TOOLS_TRUE@ glade/icons/16x16/widget-psppire-psppire-acr.png \ @WITH_GUI_TOOLS_TRUE@ glade/icons/16x16/widget-psppire-psppire-dialog.png \ @WITH_GUI_TOOLS_TRUE@ glade/icons/16x16/widget-psppire-psppire-keypad.png \ @WITH_GUI_TOOLS_TRUE@ glade/icons/16x16/widget-psppire-psppire-selector.png @WITH_GUI_TOOLS_TRUE@dist_large_pixmap_DATA = \ @WITH_GUI_TOOLS_TRUE@ glade/icons/22x22/widget-psppire-psppire-acr.png \ @WITH_GUI_TOOLS_TRUE@ glade/icons/22x22/widget-psppire-psppire-dialog.png \ @WITH_GUI_TOOLS_TRUE@ glade/icons/22x22/widget-psppire-psppire-keypad.png \ @WITH_GUI_TOOLS_TRUE@ glade/icons/22x22/widget-psppire-psppire-selector.png @WITH_GUI_TOOLS_TRUE@libglade_psppire_la_CFLAGS = $(GLADE_UI_CFLAGS) $(GLADE_CFLAGS) \ @WITH_GUI_TOOLS_TRUE@ $(GTKSOURCEVIEW_CFLAGS) -I $(top_srcdir)/src/ui/gui -DDEBUGGING @WITH_GUI_TOOLS_TRUE@libglade_psppire_la_LIBADD = gl/libgl.la @WITH_PERL_MODULE_TRUE@module_sources = \ @WITH_PERL_MODULE_TRUE@ perl-module/Changes \ @WITH_PERL_MODULE_TRUE@ perl-module/COPYING \ @WITH_PERL_MODULE_TRUE@ perl-module/Examples.pod \ @WITH_PERL_MODULE_TRUE@ perl-module/Makefile.PL \ @WITH_PERL_MODULE_TRUE@ perl-module/MANIFEST \ @WITH_PERL_MODULE_TRUE@ perl-module/ppport.h \ @WITH_PERL_MODULE_TRUE@ perl-module/PSPP.xs \ @WITH_PERL_MODULE_TRUE@ perl-module/README \ @WITH_PERL_MODULE_TRUE@ perl-module/typemap \ @WITH_PERL_MODULE_TRUE@ perl-module/lib/PSPP.pm \ @WITH_PERL_MODULE_TRUE@ perl-module/t/Pspp.t @WITH_PERL_MODULE_TRUE@PERL_MAKEFLAGS = $(AM_MAKEFLAGS) LD_RUN_PATH=$(pkglibdir) all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .q .po .gmo .c .dvi .lo .o .obj .ps am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/build-aux/automake.mk $(top_srcdir)/po/automake.mk $(top_srcdir)/po/Makevars $(top_srcdir)/lib/automake.mk $(top_srcdir)/lib/linreg/automake.mk $(top_srcdir)/lib/tukey/automake.mk $(top_srcdir)/lib/gtk-contrib/automake.mk $(top_srcdir)/doc/automake.mk $(top_srcdir)/examples/automake.mk $(top_srcdir)/src/automake.mk $(top_srcdir)/src/libpspp/automake.mk $(top_srcdir)/src/data/automake.mk $(top_srcdir)/src/math/automake.mk $(top_srcdir)/src/output/automake.mk $(top_srcdir)/src/language/automake.mk $(top_srcdir)/src/language/lexer/automake.mk $(top_srcdir)/src/language/xforms/automake.mk $(top_srcdir)/src/language/control/automake.mk $(top_srcdir)/src/language/dictionary/automake.mk $(top_srcdir)/src/language/tests/automake.mk $(top_srcdir)/src/language/utilities/automake.mk $(top_srcdir)/src/language/stats/automake.mk $(top_srcdir)/src/language/data-io/automake.mk $(top_srcdir)/src/language/expressions/automake.mk $(top_srcdir)/src/ui/automake.mk $(top_srcdir)/src/ui/terminal/automake.mk $(top_srcdir)/src/ui/gui/automake.mk $(top_srcdir)/src/ui/gui/icons/automake.mk $(top_srcdir)/src/ui/gui/icons/manifest $(top_srcdir)/utilities/automake.mk $(top_srcdir)/tests/automake.mk $(top_srcdir)/glade/automake.mk $(top_srcdir)/perl-module/automake.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/build-aux/automake.mk $(top_srcdir)/po/automake.mk $(top_srcdir)/po/Makevars $(top_srcdir)/lib/automake.mk $(top_srcdir)/lib/linreg/automake.mk $(top_srcdir)/lib/tukey/automake.mk $(top_srcdir)/lib/gtk-contrib/automake.mk $(top_srcdir)/doc/automake.mk $(top_srcdir)/examples/automake.mk $(top_srcdir)/src/automake.mk $(top_srcdir)/src/libpspp/automake.mk $(top_srcdir)/src/data/automake.mk $(top_srcdir)/src/math/automake.mk $(top_srcdir)/src/output/automake.mk $(top_srcdir)/src/language/automake.mk $(top_srcdir)/src/language/lexer/automake.mk $(top_srcdir)/src/language/xforms/automake.mk $(top_srcdir)/src/language/control/automake.mk $(top_srcdir)/src/language/dictionary/automake.mk $(top_srcdir)/src/language/tests/automake.mk $(top_srcdir)/src/language/utilities/automake.mk $(top_srcdir)/src/language/stats/automake.mk $(top_srcdir)/src/language/data-io/automake.mk $(top_srcdir)/src/language/expressions/automake.mk $(top_srcdir)/src/ui/automake.mk $(top_srcdir)/src/ui/terminal/automake.mk $(top_srcdir)/src/ui/gui/automake.mk $(top_srcdir)/src/ui/gui/icons/automake.mk $(top_srcdir)/src/ui/gui/icons/manifest $(top_srcdir)/utilities/automake.mk $(top_srcdir)/tests/automake.mk $(top_srcdir)/glade/automake.mk $(top_srcdir)/perl-module/automake.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 po/Makefile: $(top_builddir)/config.status $(top_srcdir)/po/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ tests/atlocal: $(top_builddir)/config.status $(top_srcdir)/tests/atlocal.in cd $(top_builddir) && $(SHELL) ./config.status $@ perl-module/lib/PSPP.pm: $(top_builddir)/config.status $(top_srcdir)/perl-module/lib/PSPP.pm.in cd $(top_builddir) && $(SHELL) ./config.status $@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) lib/gtk-contrib/$(am__dirstamp): @$(MKDIR_P) lib/gtk-contrib @: > lib/gtk-contrib/$(am__dirstamp) lib/gtk-contrib/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) lib/gtk-contrib/$(DEPDIR) @: > lib/gtk-contrib/$(DEPDIR)/$(am__dirstamp) lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.$(OBJEXT): \ lib/gtk-contrib/$(am__dirstamp) \ lib/gtk-contrib/$(DEPDIR)/$(am__dirstamp) lib/gtk-contrib/libxpaned.a: $(lib_gtk_contrib_libxpaned_a_OBJECTS) $(lib_gtk_contrib_libxpaned_a_DEPENDENCIES) $(EXTRA_lib_gtk_contrib_libxpaned_a_DEPENDENCIES) lib/gtk-contrib/$(am__dirstamp) $(AM_V_at)-rm -f lib/gtk-contrib/libxpaned.a $(AM_V_AR)$(lib_gtk_contrib_libxpaned_a_AR) lib/gtk-contrib/libxpaned.a $(lib_gtk_contrib_libxpaned_a_OBJECTS) $(lib_gtk_contrib_libxpaned_a_LIBADD) $(AM_V_at)$(RANLIB) lib/gtk-contrib/libxpaned.a install-moduleLTLIBRARIES: $(module_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(moduledir)'"; \ $(MKDIR_P) "$(DESTDIR)$(moduledir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(moduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(moduledir)"; \ } uninstall-moduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$f"; \ done clean-moduleLTLIBRARIES: -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) @list='$(module_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ } uninstall-pkglibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ done clean-pkglibLTLIBRARIES: -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) @list='$(pkglib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } lib/linreg/$(am__dirstamp): @$(MKDIR_P) lib/linreg @: > lib/linreg/$(am__dirstamp) lib/linreg/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) lib/linreg/$(DEPDIR) @: > lib/linreg/$(DEPDIR)/$(am__dirstamp) lib/linreg/sweep.lo: lib/linreg/$(am__dirstamp) \ lib/linreg/$(DEPDIR)/$(am__dirstamp) lib/linreg/liblinreg.la: $(lib_linreg_liblinreg_la_OBJECTS) $(lib_linreg_liblinreg_la_DEPENDENCIES) $(EXTRA_lib_linreg_liblinreg_la_DEPENDENCIES) lib/linreg/$(am__dirstamp) $(AM_V_CCLD)$(LINK) $(lib_linreg_liblinreg_la_OBJECTS) $(lib_linreg_liblinreg_la_LIBADD) $(LIBS) lib/tukey/$(am__dirstamp): @$(MKDIR_P) lib/tukey @: > lib/tukey/$(am__dirstamp) lib/tukey/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) lib/tukey/$(DEPDIR) @: > lib/tukey/$(DEPDIR)/$(am__dirstamp) lib/tukey/ptukey.lo: lib/tukey/$(am__dirstamp) \ lib/tukey/$(DEPDIR)/$(am__dirstamp) lib/tukey/qtukey.lo: lib/tukey/$(am__dirstamp) \ lib/tukey/$(DEPDIR)/$(am__dirstamp) lib/tukey/libtukey.la: $(lib_tukey_libtukey_la_OBJECTS) $(lib_tukey_libtukey_la_DEPENDENCIES) $(EXTRA_lib_tukey_libtukey_la_DEPENDENCIES) lib/tukey/$(am__dirstamp) $(AM_V_CCLD)$(LINK) $(lib_tukey_libtukey_la_OBJECTS) $(lib_tukey_libtukey_la_LIBADD) $(LIBS) src/ui/gui/$(am__dirstamp): @$(MKDIR_P) src/ui/gui @: > src/ui/gui/$(am__dirstamp) src/ui/gui/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/ui/gui/$(DEPDIR) @: > src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-helper.lo: src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-dialog-common.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-var-ptr.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/data/$(am__dirstamp): @$(MKDIR_P) src/data @: > src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/data/$(DEPDIR) @: > src/data/$(DEPDIR)/$(am__dirstamp) src/data/libglade_psppire_la-format.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-format.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/data/libglade_psppire_la-value-labels.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-conf.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-acr.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-buttonbox.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-dialog.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-keypad.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-dictview.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-selector.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-select-dest.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-var-view.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-checkbox-treeview.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-val-chooser.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-value-entry.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/libglade_psppire_la-psppire-window-base.lo: \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) libglade-psppire.la: $(libglade_psppire_la_OBJECTS) $(libglade_psppire_la_DEPENDENCIES) $(EXTRA_libglade_psppire_la_DEPENDENCIES) $(AM_V_CCLD)$(libglade_psppire_la_LINK) $(am_libglade_psppire_la_rpath) $(libglade_psppire_la_OBJECTS) $(libglade_psppire_la_LIBADD) $(LIBS) src/data/src_data_libdata_la-any-reader.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-any-writer.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-attributes.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-calendar.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-case-map.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-case-matcher.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-caseproto.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-case.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-casegrouper.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-caseinit.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-casereader-filter.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-casereader-project.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-casereader-select.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-casereader-shim.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-casereader-translator.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-casereader.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-casewindow.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-casewriter-translator.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-casewriter.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-case-tmpfile.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-csv-file-writer.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-data-in.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-data-out.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-dataset.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-dataset-writer.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-datasheet.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-dict-class.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-dictionary.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-encrypted-file.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-file-handle-def.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-file-name.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-format-guesser.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-format.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-gnumeric-reader.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-identifier.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-identifier2.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-lazy-casereader.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-missing-values.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-make-file.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-mrset.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-ods-reader.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-pc+-file-reader.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-por-file-reader.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-por-file-writer.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-psql-reader.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-session.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-settings.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-short-names.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-spreadsheet-reader.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-subcase.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-sys-file-encoding.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-sys-file-private.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-sys-file-reader.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-sys-file-writer.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-transformations.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-value.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-value-labels.lo: \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-variable.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/src_data_libdata_la-vector.lo: src/data/$(am__dirstamp) \ src/data/$(DEPDIR)/$(am__dirstamp) src/data/libdata.la: $(src_data_libdata_la_OBJECTS) $(src_data_libdata_la_DEPENDENCIES) $(EXTRA_src_data_libdata_la_DEPENDENCIES) src/data/$(am__dirstamp) $(AM_V_CCLD)$(LINK) $(src_data_libdata_la_OBJECTS) $(src_data_libdata_la_LIBADD) $(LIBS) src/language/$(am__dirstamp): @$(MKDIR_P) src/language @: > src/language/$(am__dirstamp) src/language/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/language/$(DEPDIR) @: > src/language/$(DEPDIR)/$(am__dirstamp) src/language/command.lo: src/language/$(am__dirstamp) \ src/language/$(DEPDIR)/$(am__dirstamp) src/language/lexer/$(am__dirstamp): @$(MKDIR_P) src/language/lexer @: > src/language/lexer/$(am__dirstamp) src/language/lexer/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/language/lexer/$(DEPDIR) @: > src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/command-name.lo: \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/include-path.lo: \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/lexer.lo: src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/subcommand-list.lo: \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/format-parser.lo: \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/scan.lo: src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/segment.lo: src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/token.lo: src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/value-parser.lo: \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/variable-parser.lo: \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/xforms/$(am__dirstamp): @$(MKDIR_P) src/language/xforms @: > src/language/xforms/$(am__dirstamp) src/language/xforms/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/language/xforms/$(DEPDIR) @: > src/language/xforms/$(DEPDIR)/$(am__dirstamp) src/language/xforms/compute.lo: src/language/xforms/$(am__dirstamp) \ src/language/xforms/$(DEPDIR)/$(am__dirstamp) src/language/xforms/count.lo: src/language/xforms/$(am__dirstamp) \ src/language/xforms/$(DEPDIR)/$(am__dirstamp) src/language/xforms/fail.lo: src/language/xforms/$(am__dirstamp) \ src/language/xforms/$(DEPDIR)/$(am__dirstamp) src/language/xforms/sample.lo: src/language/xforms/$(am__dirstamp) \ src/language/xforms/$(DEPDIR)/$(am__dirstamp) src/language/xforms/recode.lo: src/language/xforms/$(am__dirstamp) \ src/language/xforms/$(DEPDIR)/$(am__dirstamp) src/language/xforms/select-if.lo: src/language/xforms/$(am__dirstamp) \ src/language/xforms/$(DEPDIR)/$(am__dirstamp) src/language/control/$(am__dirstamp): @$(MKDIR_P) src/language/control @: > src/language/control/$(am__dirstamp) src/language/control/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/language/control/$(DEPDIR) @: > src/language/control/$(DEPDIR)/$(am__dirstamp) src/language/control/control-stack.lo: \ src/language/control/$(am__dirstamp) \ src/language/control/$(DEPDIR)/$(am__dirstamp) src/language/control/do-if.lo: src/language/control/$(am__dirstamp) \ src/language/control/$(DEPDIR)/$(am__dirstamp) src/language/control/loop.lo: src/language/control/$(am__dirstamp) \ src/language/control/$(DEPDIR)/$(am__dirstamp) src/language/control/repeat.lo: src/language/control/$(am__dirstamp) \ src/language/control/$(DEPDIR)/$(am__dirstamp) src/language/control/temporary.lo: \ src/language/control/$(am__dirstamp) \ src/language/control/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/$(am__dirstamp): @$(MKDIR_P) src/language/dictionary @: > src/language/dictionary/$(am__dirstamp) src/language/dictionary/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/language/dictionary/$(DEPDIR) @: > src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/attributes.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/apply-dictionary.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/delete-variables.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/formats.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/missing-values.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/modify-variables.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/mrsets.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/numeric.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/rename-variables.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/sort-variables.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/split-file.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/sys-file-info.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/value-labels.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/variable-label.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/vector.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/variable-display.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/dictionary/weight.lo: \ src/language/dictionary/$(am__dirstamp) \ src/language/dictionary/$(DEPDIR)/$(am__dirstamp) src/language/tests/$(am__dirstamp): @$(MKDIR_P) src/language/tests @: > src/language/tests/$(am__dirstamp) src/language/tests/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/language/tests/$(DEPDIR) @: > src/language/tests/$(DEPDIR)/$(am__dirstamp) src/language/tests/format-guesser-test.lo: \ src/language/tests/$(am__dirstamp) \ src/language/tests/$(DEPDIR)/$(am__dirstamp) src/language/tests/float-format.lo: \ src/language/tests/$(am__dirstamp) \ src/language/tests/$(DEPDIR)/$(am__dirstamp) src/language/tests/moments-test.lo: \ src/language/tests/$(am__dirstamp) \ src/language/tests/$(DEPDIR)/$(am__dirstamp) src/language/tests/paper-size.lo: src/language/tests/$(am__dirstamp) \ src/language/tests/$(DEPDIR)/$(am__dirstamp) src/language/tests/pool-test.lo: src/language/tests/$(am__dirstamp) \ src/language/tests/$(DEPDIR)/$(am__dirstamp) src/language/utilities/$(am__dirstamp): @$(MKDIR_P) src/language/utilities @: > src/language/utilities/$(am__dirstamp) src/language/utilities/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/language/utilities/$(DEPDIR) @: > src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/utilities/cache.lo: \ src/language/utilities/$(am__dirstamp) \ src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/utilities/cd.lo: src/language/utilities/$(am__dirstamp) \ src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/utilities/date.lo: \ src/language/utilities/$(am__dirstamp) \ src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/utilities/echo.lo: \ src/language/utilities/$(am__dirstamp) \ src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/utilities/host.lo: \ src/language/utilities/$(am__dirstamp) \ src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/utilities/title.lo: \ src/language/utilities/$(am__dirstamp) \ src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/utilities/include.lo: \ src/language/utilities/$(am__dirstamp) \ src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/utilities/output.lo: \ src/language/utilities/$(am__dirstamp) \ src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/utilities/permissions.lo: \ src/language/utilities/$(am__dirstamp) \ src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/stats/$(am__dirstamp): @$(MKDIR_P) src/language/stats @: > src/language/stats/$(am__dirstamp) src/language/stats/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/language/stats/$(DEPDIR) @: > src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/aggregate.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/autorecode.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/binomial.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/chisquare.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/cochran.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/correlations.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/descriptives.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/examine.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/factor.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/flip.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/freq.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/frequencies.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/friedman.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/glm.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/graph.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/kruskal-wallis.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/ks-one-sample.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/logistic.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/jonckheere-terpstra.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/mann-whitney.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/means.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/mcnemar.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/median.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/npar.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/npar-summary.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/oneway.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/quick-cluster.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/rank.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/reliability.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/roc.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/regression.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/runs.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/sign.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/sort-cases.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/sort-criteria.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/t-test-indep.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/t-test-one-sample.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/t-test-paired.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/t-test-parser.lo: \ src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/stats/wilcoxon.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/data-io/$(am__dirstamp): @$(MKDIR_P) src/language/data-io @: > src/language/data-io/$(am__dirstamp) src/language/data-io/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/language/data-io/$(DEPDIR) @: > src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/combine-files.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/data-list.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/data-parser.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/data-reader.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/data-writer.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/dataset.lo: src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/file-handle.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/get-data.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/get.lo: src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/inpt-pgm.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/list.lo: src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/placement-parser.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/print-space.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/print.lo: src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/matrix-data.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/matrix-reader.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/save-translate.lo: \ src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/save.lo: src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/data-io/trim.lo: src/language/data-io/$(am__dirstamp) \ src/language/data-io/$(DEPDIR)/$(am__dirstamp) src/language/expressions/$(am__dirstamp): @$(MKDIR_P) src/language/expressions @: > src/language/expressions/$(am__dirstamp) src/language/expressions/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/language/expressions/$(DEPDIR) @: > src/language/expressions/$(DEPDIR)/$(am__dirstamp) src/language/expressions/evaluate.lo: \ src/language/expressions/$(am__dirstamp) \ src/language/expressions/$(DEPDIR)/$(am__dirstamp) src/language/expressions/helpers.lo: \ src/language/expressions/$(am__dirstamp) \ src/language/expressions/$(DEPDIR)/$(am__dirstamp) src/language/expressions/optimize.lo: \ src/language/expressions/$(am__dirstamp) \ src/language/expressions/$(DEPDIR)/$(am__dirstamp) src/language/expressions/parse.lo: \ src/language/expressions/$(am__dirstamp) \ src/language/expressions/$(DEPDIR)/$(am__dirstamp) src/language/utilities/set.lo: src/language/utilities/$(am__dirstamp) \ src/language/utilities/$(DEPDIR)/$(am__dirstamp) src/language/stats/crosstabs.lo: src/language/stats/$(am__dirstamp) \ src/language/stats/$(DEPDIR)/$(am__dirstamp) src/language/liblanguage.la: $(src_language_liblanguage_la_OBJECTS) $(src_language_liblanguage_la_DEPENDENCIES) $(EXTRA_src_language_liblanguage_la_DEPENDENCIES) src/language/$(am__dirstamp) $(AM_V_CCLD)$(LINK) $(src_language_liblanguage_la_OBJECTS) $(src_language_liblanguage_la_LIBADD) $(LIBS) src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/libpspp-core.la: $(src_libpspp_core_la_OBJECTS) $(src_libpspp_core_la_DEPENDENCIES) $(EXTRA_src_libpspp_core_la_DEPENDENCIES) src/$(am__dirstamp) $(AM_V_CCLD)$(src_libpspp_core_la_LINK) -rpath $(pkglibdir) $(src_libpspp_core_la_OBJECTS) $(src_libpspp_core_la_LIBADD) $(LIBS) src/libpspp.la: $(src_libpspp_la_OBJECTS) $(src_libpspp_la_DEPENDENCIES) $(EXTRA_src_libpspp_la_DEPENDENCIES) src/$(am__dirstamp) $(AM_V_CCLD)$(src_libpspp_la_LINK) -rpath $(pkglibdir) $(src_libpspp_la_OBJECTS) $(src_libpspp_la_LIBADD) $(LIBS) src/libpspp/$(am__dirstamp): @$(MKDIR_P) src/libpspp @: > src/libpspp/$(am__dirstamp) src/libpspp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/libpspp/$(DEPDIR) @: > src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-abt.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-argv-parser.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-array.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-bt.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-cmac-aes256.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-copyleft.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-deque.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-encoding-guesser.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-ext-array.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-float-format.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-freaderror.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-hash-functions.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-inflate.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-heap.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-hmap.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-hmapx.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-i18n.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-integer-format.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-intern.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-line-reader.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-ll.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-llx.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-message.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-misc.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-model-checker.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-pool.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-prompt.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-range-map.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-range-set.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-range-tower.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-sparse-array.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-sparse-xarray.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-start-date.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-string-array.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-string-map.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-string-set.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-stringi-map.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-stringi-set.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-str.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-taint.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-temp-file.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-tower.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-u8-istream.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-u8-line.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-zip-reader.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-zip-writer.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/src_libpspp_liblibpspp_la-version.lo: \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/liblibpspp.la: $(src_libpspp_liblibpspp_la_OBJECTS) $(src_libpspp_liblibpspp_la_DEPENDENCIES) $(EXTRA_src_libpspp_liblibpspp_la_DEPENDENCIES) src/libpspp/$(am__dirstamp) $(AM_V_CCLD)$(LINK) $(src_libpspp_liblibpspp_la_OBJECTS) $(src_libpspp_liblibpspp_la_LIBADD) $(LIBS) src/math/$(am__dirstamp): @$(MKDIR_P) src/math @: > src/math/$(am__dirstamp) src/math/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/math/$(DEPDIR) @: > src/math/$(DEPDIR)/$(am__dirstamp) src/math/chart-geometry.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/box-whisker.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/categoricals.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/covariance.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/correlation.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/extrema.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/histogram.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/interaction.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/levene.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/linreg.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/merge.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/moments.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/np.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/order-stats.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/percentiles.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/random.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/sort.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/trimmed-mean.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/tukey-hinges.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/wilcoxon-sig.lo: src/math/$(am__dirstamp) \ src/math/$(DEPDIR)/$(am__dirstamp) src/math/libpspp-math.la: $(src_math_libpspp_math_la_OBJECTS) $(src_math_libpspp_math_la_DEPENDENCIES) $(EXTRA_src_math_libpspp_math_la_DEPENDENCIES) src/math/$(am__dirstamp) $(AM_V_CCLD)$(LINK) $(src_math_libpspp_math_la_OBJECTS) $(src_math_libpspp_math_la_LIBADD) $(LIBS) src/output/$(am__dirstamp): @$(MKDIR_P) src/output @: > src/output/$(am__dirstamp) src/output/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/output/$(DEPDIR) @: > src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-ascii.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-chart-item.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/charts/$(am__dirstamp): @$(MKDIR_P) src/output/charts @: > src/output/charts/$(am__dirstamp) src/output/charts/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/output/charts/$(DEPDIR) @: > src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-boxplot.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-np-plot.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-barchart.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-piechart.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-plot-hist.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-roc-chart.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-spreadlevel-plot.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-scree.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-scatterplot.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-csv.lo: src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-driver.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-html.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-journal.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-measure.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-message-item.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-msglog.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-options.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-output-item.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-render.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-tab.lo: src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-table-casereader.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-table-item.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-table-paste.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-table-select.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-table-stomp.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-table-transpose.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-table.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-text-item.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-cairo-chart.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-cairo.lo: \ src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-boxplot-cairo.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-np-plot-cairo.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-barchart-cairo.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-piechart-cairo.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-plot-hist-cairo.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-roc-chart-cairo.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-scree-cairo.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-spreadlevel-cairo.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/charts/src_output_liboutput_la-scatterplot-cairo.lo: \ src/output/charts/$(am__dirstamp) \ src/output/charts/$(DEPDIR)/$(am__dirstamp) src/output/src_output_liboutput_la-odt.lo: src/output/$(am__dirstamp) \ src/output/$(DEPDIR)/$(am__dirstamp) src/output/liboutput.la: $(src_output_liboutput_la_OBJECTS) $(src_output_liboutput_la_DEPENDENCIES) $(EXTRA_src_output_liboutput_la_DEPENDENCIES) src/output/$(am__dirstamp) $(AM_V_CCLD)$(LINK) $(src_output_liboutput_la_OBJECTS) $(src_output_liboutput_la_LIBADD) $(LIBS) src/ui/$(am__dirstamp): @$(MKDIR_P) src/ui @: > src/ui/$(am__dirstamp) src/ui/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/ui/$(DEPDIR) @: > src/ui/$(DEPDIR)/$(am__dirstamp) src/ui/source-init-opts.lo: src/ui/$(am__dirstamp) \ src/ui/$(DEPDIR)/$(am__dirstamp) src/ui/syntax-gen.lo: src/ui/$(am__dirstamp) \ src/ui/$(DEPDIR)/$(am__dirstamp) src/ui/libuicommon.la: $(src_ui_libuicommon_la_OBJECTS) $(src_ui_libuicommon_la_DEPENDENCIES) $(EXTRA_src_ui_libuicommon_la_DEPENDENCIES) src/ui/$(am__dirstamp) $(AM_V_CCLD)$(LINK) $(src_ui_libuicommon_la_OBJECTS) $(src_ui_libuicommon_la_LIBADD) $(LIBS) src/ui/terminal/$(am__dirstamp): @$(MKDIR_P) src/ui/terminal @: > src/ui/terminal/$(am__dirstamp) src/ui/terminal/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/ui/terminal/$(DEPDIR) @: > src/ui/terminal/$(DEPDIR)/$(am__dirstamp) src/ui/terminal/src_ui_terminal_libui_la-main.lo: \ src/ui/terminal/$(am__dirstamp) \ src/ui/terminal/$(DEPDIR)/$(am__dirstamp) src/ui/terminal/src_ui_terminal_libui_la-terminal-opts.lo: \ src/ui/terminal/$(am__dirstamp) \ src/ui/terminal/$(DEPDIR)/$(am__dirstamp) src/ui/terminal/src_ui_terminal_libui_la-terminal-reader.lo: \ src/ui/terminal/$(am__dirstamp) \ src/ui/terminal/$(DEPDIR)/$(am__dirstamp) src/ui/terminal/src_ui_terminal_libui_la-terminal.lo: \ src/ui/terminal/$(am__dirstamp) \ src/ui/terminal/$(DEPDIR)/$(am__dirstamp) src/ui/terminal/libui.la: $(src_ui_terminal_libui_la_OBJECTS) $(src_ui_terminal_libui_la_DEPENDENCIES) $(EXTRA_src_ui_terminal_libui_la_DEPENDENCIES) src/ui/terminal/$(am__dirstamp) $(AM_V_CCLD)$(src_ui_terminal_libui_la_LINK) $(src_ui_terminal_libui_la_OBJECTS) $(src_ui_terminal_libui_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-button-editable.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-keypad.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-selector.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-scanf.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-acr.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-builder-wrapper.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-dialog-common.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-dict-display.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-entry-dialog.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-executor.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-find-dialog.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-goto-case-dialog.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-helper.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-help-menu.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-main.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-missing-val-dialog.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-options-dialog.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-conf.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-data-editor.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-data-store.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-data-window.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dict.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-dictview.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-format.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-means-layer.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-output-view.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-output-window.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-var-view.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-select-dest.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-value-entry.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-window.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-window-base.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-window-register.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-t-test-options.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-val-labs-dialog.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-var-display.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-var-type-dialog.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-widget-io.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-widgets.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-windows-menu.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-psppire-marshal.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_psppire-resources.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/psppire$(EXEEXT): $(src_ui_gui_psppire_OBJECTS) $(src_ui_gui_psppire_DEPENDENCIES) $(EXTRA_src_ui_gui_psppire_DEPENDENCIES) src/ui/gui/$(am__dirstamp) @rm -f src/ui/gui/psppire$(EXEEXT) $(AM_V_CCLD)$(src_ui_gui_psppire_LINK) $(src_ui_gui_psppire_OBJECTS) $(src_ui_gui_psppire_LDADD) $(LIBS) src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.$(OBJEXT): \ src/ui/gui/$(am__dirstamp) \ src/ui/gui/$(DEPDIR)/$(am__dirstamp) src/ui/gui/spreadsheet-test$(EXEEXT): $(src_ui_gui_spreadsheet_test_OBJECTS) $(src_ui_gui_spreadsheet_test_DEPENDENCIES) $(EXTRA_src_ui_gui_spreadsheet_test_DEPENDENCIES) src/ui/gui/$(am__dirstamp) @rm -f src/ui/gui/spreadsheet-test$(EXEEXT) $(AM_V_CCLD)$(src_ui_gui_spreadsheet_test_LINK) $(src_ui_gui_spreadsheet_test_OBJECTS) $(src_ui_gui_spreadsheet_test_LDADD) $(LIBS) src/ui/terminal/pspp$(EXEEXT): $(src_ui_terminal_pspp_OBJECTS) $(src_ui_terminal_pspp_DEPENDENCIES) $(EXTRA_src_ui_terminal_pspp_DEPENDENCIES) src/ui/terminal/$(am__dirstamp) @rm -f src/ui/terminal/pspp$(EXEEXT) $(AM_V_CCLD)$(src_ui_terminal_pspp_LINK) $(src_ui_terminal_pspp_OBJECTS) $(src_ui_terminal_pspp_LDADD) $(LIBS) tests/data/$(am__dirstamp): @$(MKDIR_P) tests/data @: > tests/data/$(am__dirstamp) tests/data/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tests/data/$(DEPDIR) @: > tests/data/$(DEPDIR)/$(am__dirstamp) tests/data/tests_data_datasheet_test-datasheet-test.$(OBJEXT): \ tests/data/$(am__dirstamp) \ tests/data/$(DEPDIR)/$(am__dirstamp) tests/data/datasheet-test$(EXEEXT): $(tests_data_datasheet_test_OBJECTS) $(tests_data_datasheet_test_DEPENDENCIES) $(EXTRA_tests_data_datasheet_test_DEPENDENCIES) tests/data/$(am__dirstamp) @rm -f tests/data/datasheet-test$(EXEEXT) $(AM_V_CCLD)$(tests_data_datasheet_test_LINK) $(tests_data_datasheet_test_OBJECTS) $(tests_data_datasheet_test_LDADD) $(LIBS) tests/data/inexactify.$(OBJEXT): tests/data/$(am__dirstamp) \ tests/data/$(DEPDIR)/$(am__dirstamp) tests/data/inexactify$(EXEEXT): $(tests_data_inexactify_OBJECTS) $(tests_data_inexactify_DEPENDENCIES) $(EXTRA_tests_data_inexactify_DEPENDENCIES) tests/data/$(am__dirstamp) @rm -f tests/data/inexactify$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_data_inexactify_OBJECTS) $(tests_data_inexactify_LDADD) $(LIBS) tests/data/tests_data_sack-sack.$(OBJEXT): tests/data/$(am__dirstamp) \ tests/data/$(DEPDIR)/$(am__dirstamp) tests/data/sack$(EXEEXT): $(tests_data_sack_OBJECTS) $(tests_data_sack_DEPENDENCIES) $(EXTRA_tests_data_sack_DEPENDENCIES) tests/data/$(am__dirstamp) @rm -f tests/data/sack$(EXEEXT) $(AM_V_CCLD)$(tests_data_sack_LINK) $(tests_data_sack_OBJECTS) $(tests_data_sack_LDADD) $(LIBS) src/data/tests_language_lexer_command_name_test-identifier.$(OBJEXT): \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/language/lexer/tests_language_lexer_command_name_test-command-name.$(OBJEXT): \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) tests/language/lexer/$(am__dirstamp): @$(MKDIR_P) tests/language/lexer @: > tests/language/lexer/$(am__dirstamp) tests/language/lexer/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tests/language/lexer/$(DEPDIR) @: > tests/language/lexer/$(DEPDIR)/$(am__dirstamp) tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.$(OBJEXT): \ tests/language/lexer/$(am__dirstamp) \ tests/language/lexer/$(DEPDIR)/$(am__dirstamp) tests/language/lexer/command-name-test$(EXEEXT): $(tests_language_lexer_command_name_test_OBJECTS) $(tests_language_lexer_command_name_test_DEPENDENCIES) $(EXTRA_tests_language_lexer_command_name_test_DEPENDENCIES) tests/language/lexer/$(am__dirstamp) @rm -f tests/language/lexer/command-name-test$(EXEEXT) $(AM_V_CCLD)$(tests_language_lexer_command_name_test_LINK) $(tests_language_lexer_command_name_test_OBJECTS) $(tests_language_lexer_command_name_test_LDADD) $(LIBS) src/data/tests_language_lexer_scan_test-identifier.$(OBJEXT): \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/language/lexer/tests_language_lexer_scan_test-command-name.$(OBJEXT): \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/tests_language_lexer_scan_test-scan.$(OBJEXT): \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/tests_language_lexer_scan_test-segment.$(OBJEXT): \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/tests_language_lexer_scan_test-token.$(OBJEXT): \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) tests/language/lexer/tests_language_lexer_scan_test-scan-test.$(OBJEXT): \ tests/language/lexer/$(am__dirstamp) \ tests/language/lexer/$(DEPDIR)/$(am__dirstamp) tests/language/lexer/scan-test$(EXEEXT): $(tests_language_lexer_scan_test_OBJECTS) $(tests_language_lexer_scan_test_DEPENDENCIES) $(EXTRA_tests_language_lexer_scan_test_DEPENDENCIES) tests/language/lexer/$(am__dirstamp) @rm -f tests/language/lexer/scan-test$(EXEEXT) $(AM_V_CCLD)$(tests_language_lexer_scan_test_LINK) $(tests_language_lexer_scan_test_OBJECTS) $(tests_language_lexer_scan_test_LDADD) $(LIBS) src/data/tests_language_lexer_segment_test-identifier.$(OBJEXT): \ src/data/$(am__dirstamp) src/data/$(DEPDIR)/$(am__dirstamp) src/language/lexer/tests_language_lexer_segment_test-command-name.$(OBJEXT): \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) src/language/lexer/tests_language_lexer_segment_test-segment.$(OBJEXT): \ src/language/lexer/$(am__dirstamp) \ src/language/lexer/$(DEPDIR)/$(am__dirstamp) tests/language/lexer/tests_language_lexer_segment_test-segment-test.$(OBJEXT): \ tests/language/lexer/$(am__dirstamp) \ tests/language/lexer/$(DEPDIR)/$(am__dirstamp) tests/language/lexer/segment-test$(EXEEXT): $(tests_language_lexer_segment_test_OBJECTS) $(tests_language_lexer_segment_test_DEPENDENCIES) $(EXTRA_tests_language_lexer_segment_test_DEPENDENCIES) tests/language/lexer/$(am__dirstamp) @rm -f tests/language/lexer/segment-test$(EXEEXT) $(AM_V_CCLD)$(tests_language_lexer_segment_test_LINK) $(tests_language_lexer_segment_test_OBJECTS) $(tests_language_lexer_segment_test_LDADD) $(LIBS) src/libpspp/tests_libpspp_abt_test-abt.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/$(am__dirstamp): @$(MKDIR_P) tests/libpspp @: > tests/libpspp/$(am__dirstamp) tests/libpspp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tests/libpspp/$(DEPDIR) @: > tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/tests_libpspp_abt_test-abt-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/abt-test$(EXEEXT): $(tests_libpspp_abt_test_OBJECTS) $(tests_libpspp_abt_test_DEPENDENCIES) $(EXTRA_tests_libpspp_abt_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/abt-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_abt_test_OBJECTS) $(tests_libpspp_abt_test_LDADD) $(LIBS) src/libpspp/tests_libpspp_bt_test-bt.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/tests_libpspp_bt_test-bt-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/bt-test$(EXEEXT): $(tests_libpspp_bt_test_OBJECTS) $(tests_libpspp_bt_test_DEPENDENCIES) $(EXTRA_tests_libpspp_bt_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/bt-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_bt_test_OBJECTS) $(tests_libpspp_bt_test_LDADD) $(LIBS) src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/cmac-aes256-test$(EXEEXT): $(tests_libpspp_cmac_aes256_test_OBJECTS) $(tests_libpspp_cmac_aes256_test_DEPENDENCIES) $(EXTRA_tests_libpspp_cmac_aes256_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/cmac-aes256-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_cmac_aes256_test_OBJECTS) $(tests_libpspp_cmac_aes256_test_LDADD) $(LIBS) tests/libpspp/encoding-guesser-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/encoding-guesser-test$(EXEEXT): $(tests_libpspp_encoding_guesser_test_OBJECTS) $(tests_libpspp_encoding_guesser_test_DEPENDENCIES) $(EXTRA_tests_libpspp_encoding_guesser_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/encoding-guesser-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_encoding_guesser_test_OBJECTS) $(tests_libpspp_encoding_guesser_test_LDADD) $(LIBS) tests/libpspp/tests_libpspp_heap_test-heap-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/heap-test$(EXEEXT): $(tests_libpspp_heap_test_OBJECTS) $(tests_libpspp_heap_test_DEPENDENCIES) $(EXTRA_tests_libpspp_heap_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/heap-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_heap_test_OBJECTS) $(tests_libpspp_heap_test_LDADD) $(LIBS) src/libpspp/tests_libpspp_hmap_test-hmap.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/tests_libpspp_hmap_test-hmap-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/hmap-test$(EXEEXT): $(tests_libpspp_hmap_test_OBJECTS) $(tests_libpspp_hmap_test_DEPENDENCIES) $(EXTRA_tests_libpspp_hmap_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/hmap-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_hmap_test_OBJECTS) $(tests_libpspp_hmap_test_LDADD) $(LIBS) src/libpspp/tests_libpspp_hmapx_test-hmap.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/tests_libpspp_hmapx_test-hmapx.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/hmapx-test$(EXEEXT): $(tests_libpspp_hmapx_test_OBJECTS) $(tests_libpspp_hmapx_test_DEPENDENCIES) $(EXTRA_tests_libpspp_hmapx_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/hmapx-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_hmapx_test_OBJECTS) $(tests_libpspp_hmapx_test_LDADD) $(LIBS) tests/libpspp/i18n-test.$(OBJEXT): tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/i18n-test$(EXEEXT): $(tests_libpspp_i18n_test_OBJECTS) $(tests_libpspp_i18n_test_DEPENDENCIES) $(EXTRA_tests_libpspp_i18n_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/i18n-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_i18n_test_OBJECTS) $(tests_libpspp_i18n_test_LDADD) $(LIBS) tests/libpspp/line-reader-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/line-reader-test$(EXEEXT): $(tests_libpspp_line_reader_test_OBJECTS) $(tests_libpspp_line_reader_test_DEPENDENCIES) $(EXTRA_tests_libpspp_line_reader_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/line-reader-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_line_reader_test_OBJECTS) $(tests_libpspp_line_reader_test_LDADD) $(LIBS) src/libpspp/tests_libpspp_ll_test-ll.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/tests_libpspp_ll_test-ll-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/ll-test$(EXEEXT): $(tests_libpspp_ll_test_OBJECTS) $(tests_libpspp_ll_test_DEPENDENCIES) $(EXTRA_tests_libpspp_ll_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/ll-test$(EXEEXT) $(AM_V_CCLD)$(tests_libpspp_ll_test_LINK) $(tests_libpspp_ll_test_OBJECTS) $(tests_libpspp_ll_test_LDADD) $(LIBS) src/libpspp/tests_libpspp_llx_test-ll.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/tests_libpspp_llx_test-llx.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/tests_libpspp_llx_test-llx-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/llx-test$(EXEEXT): $(tests_libpspp_llx_test_OBJECTS) $(tests_libpspp_llx_test_DEPENDENCIES) $(EXTRA_tests_libpspp_llx_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/llx-test$(EXEEXT) $(AM_V_CCLD)$(tests_libpspp_llx_test_LINK) $(tests_libpspp_llx_test_OBJECTS) $(tests_libpspp_llx_test_LDADD) $(LIBS) src/libpspp/tests_libpspp_range_map_test-bt.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/tests_libpspp_range_map_test-range-map.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/tests_libpspp_range_map_test-range-map-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/range-map-test$(EXEEXT): $(tests_libpspp_range_map_test_OBJECTS) $(tests_libpspp_range_map_test_DEPENDENCIES) $(EXTRA_tests_libpspp_range_map_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/range-map-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_range_map_test_OBJECTS) $(tests_libpspp_range_map_test_LDADD) $(LIBS) tests/libpspp/tests_libpspp_range_set_test-range-set-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/range-set-test$(EXEEXT): $(tests_libpspp_range_set_test_OBJECTS) $(tests_libpspp_range_set_test_DEPENDENCIES) $(EXTRA_tests_libpspp_range_set_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/range-set-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_range_set_test_OBJECTS) $(tests_libpspp_range_set_test_LDADD) $(LIBS) tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/range-tower-test$(EXEEXT): $(tests_libpspp_range_tower_test_OBJECTS) $(tests_libpspp_range_tower_test_DEPENDENCIES) $(EXTRA_tests_libpspp_range_tower_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/range-tower-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_range_tower_test_OBJECTS) $(tests_libpspp_range_tower_test_LDADD) $(LIBS) tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/sparse-array-test$(EXEEXT): $(tests_libpspp_sparse_array_test_OBJECTS) $(tests_libpspp_sparse_array_test_DEPENDENCIES) $(EXTRA_tests_libpspp_sparse_array_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/sparse-array-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_sparse_array_test_OBJECTS) $(tests_libpspp_sparse_array_test_LDADD) $(LIBS) tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/sparse-xarray-test$(EXEEXT): $(tests_libpspp_sparse_xarray_test_OBJECTS) $(tests_libpspp_sparse_xarray_test_DEPENDENCIES) $(EXTRA_tests_libpspp_sparse_xarray_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/sparse-xarray-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_sparse_xarray_test_OBJECTS) $(tests_libpspp_sparse_xarray_test_LDADD) $(LIBS) tests/libpspp/str-test.$(OBJEXT): tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/str-test$(EXEEXT): $(tests_libpspp_str_test_OBJECTS) $(tests_libpspp_str_test_DEPENDENCIES) $(EXTRA_tests_libpspp_str_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/str-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_str_test_OBJECTS) $(tests_libpspp_str_test_LDADD) $(LIBS) tests/libpspp/tests_libpspp_string_map_test-string-map-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/string-map-test$(EXEEXT): $(tests_libpspp_string_map_test_OBJECTS) $(tests_libpspp_string_map_test_DEPENDENCIES) $(EXTRA_tests_libpspp_string_map_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/string-map-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_string_map_test_OBJECTS) $(tests_libpspp_string_map_test_LDADD) $(LIBS) src/libpspp/tests_libpspp_string_set_test-hash-functions.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/tests_libpspp_string_set_test-hmap.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/tests_libpspp_string_set_test-string-set.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/tests_libpspp_string_set_test-string-set-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/string-set-test$(EXEEXT): $(tests_libpspp_string_set_test_OBJECTS) $(tests_libpspp_string_set_test_DEPENDENCIES) $(EXTRA_tests_libpspp_string_set_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/string-set-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_string_set_test_OBJECTS) $(tests_libpspp_string_set_test_LDADD) $(LIBS) tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/stringi-map-test$(EXEEXT): $(tests_libpspp_stringi_map_test_OBJECTS) $(tests_libpspp_stringi_map_test_DEPENDENCIES) $(EXTRA_tests_libpspp_stringi_map_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/stringi-map-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_stringi_map_test_OBJECTS) $(tests_libpspp_stringi_map_test_LDADD) $(LIBS) tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/stringi-set-test$(EXEEXT): $(tests_libpspp_stringi_set_test_OBJECTS) $(tests_libpspp_stringi_set_test_DEPENDENCIES) $(EXTRA_tests_libpspp_stringi_set_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/stringi-set-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_stringi_set_test_OBJECTS) $(tests_libpspp_stringi_set_test_LDADD) $(LIBS) tests/libpspp/tests_libpspp_tower_test-tower-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/tower-test$(EXEEXT): $(tests_libpspp_tower_test_OBJECTS) $(tests_libpspp_tower_test_DEPENDENCIES) $(EXTRA_tests_libpspp_tower_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/tower-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_tower_test_OBJECTS) $(tests_libpspp_tower_test_LDADD) $(LIBS) tests/libpspp/u8-istream-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/u8-istream-test$(EXEEXT): $(tests_libpspp_u8_istream_test_OBJECTS) $(tests_libpspp_u8_istream_test_DEPENDENCIES) $(EXTRA_tests_libpspp_u8_istream_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/u8-istream-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_libpspp_u8_istream_test_OBJECTS) $(tests_libpspp_u8_istream_test_LDADD) $(LIBS) tests/libpspp/tests_libpspp_zip_test-zip-test.$(OBJEXT): \ tests/libpspp/$(am__dirstamp) \ tests/libpspp/$(DEPDIR)/$(am__dirstamp) tests/libpspp/zip-test$(EXEEXT): $(tests_libpspp_zip_test_OBJECTS) $(tests_libpspp_zip_test_DEPENDENCIES) $(EXTRA_tests_libpspp_zip_test_DEPENDENCIES) tests/libpspp/$(am__dirstamp) @rm -f tests/libpspp/zip-test$(EXEEXT) $(AM_V_CCLD)$(tests_libpspp_zip_test_LINK) $(tests_libpspp_zip_test_OBJECTS) $(tests_libpspp_zip_test_LDADD) $(LIBS) tests/math/$(am__dirstamp): @$(MKDIR_P) tests/math @: > tests/math/$(am__dirstamp) tests/math/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tests/math/$(DEPDIR) @: > tests/math/$(DEPDIR)/$(am__dirstamp) tests/math/chart-get-scale-test.$(OBJEXT): tests/math/$(am__dirstamp) \ tests/math/$(DEPDIR)/$(am__dirstamp) tests/math/chart-get-scale-test$(EXEEXT): $(tests_math_chart_get_scale_test_OBJECTS) $(tests_math_chart_get_scale_test_DEPENDENCIES) $(EXTRA_tests_math_chart_get_scale_test_DEPENDENCIES) tests/math/$(am__dirstamp) @rm -f tests/math/chart-get-scale-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_math_chart_get_scale_test_OBJECTS) $(tests_math_chart_get_scale_test_LDADD) $(LIBS) tests/math/chart-get-ticks-format-test.$(OBJEXT): \ tests/math/$(am__dirstamp) \ tests/math/$(DEPDIR)/$(am__dirstamp) tests/math/chart-get-ticks-format-test$(EXEEXT): $(tests_math_chart_get_ticks_format_test_OBJECTS) $(tests_math_chart_get_ticks_format_test_DEPENDENCIES) $(EXTRA_tests_math_chart_get_ticks_format_test_DEPENDENCIES) tests/math/$(am__dirstamp) @rm -f tests/math/chart-get-ticks-format-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_math_chart_get_ticks_format_test_OBJECTS) $(tests_math_chart_get_ticks_format_test_LDADD) $(LIBS) tests/output/$(am__dirstamp): @$(MKDIR_P) tests/output @: > tests/output/$(am__dirstamp) tests/output/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tests/output/$(DEPDIR) @: > tests/output/$(DEPDIR)/$(am__dirstamp) tests/output/render-test.$(OBJEXT): tests/output/$(am__dirstamp) \ tests/output/$(DEPDIR)/$(am__dirstamp) tests/output/render-test$(EXEEXT): $(tests_output_render_test_OBJECTS) $(tests_output_render_test_DEPENDENCIES) $(EXTRA_tests_output_render_test_DEPENDENCIES) tests/output/$(am__dirstamp) @rm -f tests/output/render-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_output_render_test_OBJECTS) $(tests_output_render_test_LDADD) $(LIBS) tests/ui/$(am__dirstamp): @$(MKDIR_P) tests/ui @: > tests/ui/$(am__dirstamp) tests/ui/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tests/ui/$(DEPDIR) @: > tests/ui/$(DEPDIR)/$(am__dirstamp) tests/ui/syntax-gen-test.$(OBJEXT): tests/ui/$(am__dirstamp) \ tests/ui/$(DEPDIR)/$(am__dirstamp) tests/ui/syntax-gen-test$(EXEEXT): $(tests_ui_syntax_gen_test_OBJECTS) $(tests_ui_syntax_gen_test_DEPENDENCIES) $(EXTRA_tests_ui_syntax_gen_test_DEPENDENCIES) tests/ui/$(am__dirstamp) @rm -f tests/ui/syntax-gen-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_ui_syntax_gen_test_OBJECTS) $(tests_ui_syntax_gen_test_LDADD) $(LIBS) utilities/$(am__dirstamp): @$(MKDIR_P) utilities @: > utilities/$(am__dirstamp) utilities/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) utilities/$(DEPDIR) @: > utilities/$(DEPDIR)/$(am__dirstamp) utilities/utilities_pspp_convert-pspp-convert.$(OBJEXT): \ utilities/$(am__dirstamp) utilities/$(DEPDIR)/$(am__dirstamp) utilities/pspp-convert$(EXEEXT): $(utilities_pspp_convert_OBJECTS) $(utilities_pspp_convert_DEPENDENCIES) $(EXTRA_utilities_pspp_convert_DEPENDENCIES) utilities/$(am__dirstamp) @rm -f utilities/pspp-convert$(EXEEXT) $(AM_V_CCLD)$(utilities_pspp_convert_LINK) $(utilities_pspp_convert_OBJECTS) $(utilities_pspp_convert_LDADD) $(LIBS) src/libpspp/utilities_pspp_dump_sav-integer-format.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) src/libpspp/utilities_pspp_dump_sav-float-format.$(OBJEXT): \ src/libpspp/$(am__dirstamp) \ src/libpspp/$(DEPDIR)/$(am__dirstamp) utilities/utilities_pspp_dump_sav-pspp-dump-sav.$(OBJEXT): \ utilities/$(am__dirstamp) utilities/$(DEPDIR)/$(am__dirstamp) utilities/pspp-dump-sav$(EXEEXT): $(utilities_pspp_dump_sav_OBJECTS) $(utilities_pspp_dump_sav_DEPENDENCIES) $(EXTRA_utilities_pspp_dump_sav_DEPENDENCIES) utilities/$(am__dirstamp) @rm -f utilities/pspp-dump-sav$(EXEEXT) $(AM_V_CCLD)$(LINK) $(utilities_pspp_dump_sav_OBJECTS) $(utilities_pspp_dump_sav_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f lib/gtk-contrib/*.$(OBJEXT) -rm -f lib/linreg/*.$(OBJEXT) -rm -f lib/linreg/*.lo -rm -f lib/tukey/*.$(OBJEXT) -rm -f lib/tukey/*.lo -rm -f src/data/*.$(OBJEXT) -rm -f src/data/*.lo -rm -f src/language/*.$(OBJEXT) -rm -f src/language/*.lo -rm -f src/language/control/*.$(OBJEXT) -rm -f src/language/control/*.lo -rm -f src/language/data-io/*.$(OBJEXT) -rm -f src/language/data-io/*.lo -rm -f src/language/dictionary/*.$(OBJEXT) -rm -f src/language/dictionary/*.lo -rm -f src/language/expressions/*.$(OBJEXT) -rm -f src/language/expressions/*.lo -rm -f src/language/lexer/*.$(OBJEXT) -rm -f src/language/lexer/*.lo -rm -f src/language/stats/*.$(OBJEXT) -rm -f src/language/stats/*.lo -rm -f src/language/tests/*.$(OBJEXT) -rm -f src/language/tests/*.lo -rm -f src/language/utilities/*.$(OBJEXT) -rm -f src/language/utilities/*.lo -rm -f src/language/xforms/*.$(OBJEXT) -rm -f src/language/xforms/*.lo -rm -f src/libpspp/*.$(OBJEXT) -rm -f src/libpspp/*.lo -rm -f src/math/*.$(OBJEXT) -rm -f src/math/*.lo -rm -f src/output/*.$(OBJEXT) -rm -f src/output/*.lo -rm -f src/output/charts/*.$(OBJEXT) -rm -f src/output/charts/*.lo -rm -f src/ui/*.$(OBJEXT) -rm -f src/ui/*.lo -rm -f src/ui/gui/*.$(OBJEXT) -rm -f src/ui/gui/*.lo -rm -f src/ui/terminal/*.$(OBJEXT) -rm -f src/ui/terminal/*.lo -rm -f tests/data/*.$(OBJEXT) -rm -f tests/language/lexer/*.$(OBJEXT) -rm -f tests/libpspp/*.$(OBJEXT) -rm -f tests/math/*.$(OBJEXT) -rm -f tests/output/*.$(OBJEXT) -rm -f tests/ui/*.$(OBJEXT) -rm -f utilities/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@lib/gtk-contrib/$(DEPDIR)/lib_gtk_contrib_libxpaned_a-gtkxpaned.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/linreg/$(DEPDIR)/sweep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/tukey/$(DEPDIR)/ptukey.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/tukey/$(DEPDIR)/qtukey.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/libglade_psppire_la-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/libglade_psppire_la-value-labels.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-any-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-any-writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-attributes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-calendar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-case-map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-case-matcher.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-case-tmpfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-case.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-casegrouper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-caseinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-caseproto.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-casereader-filter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-casereader-project.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-casereader-select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-casereader-shim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-casereader-translator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-casereader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-casewindow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-casewriter-translator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-casewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-csv-file-writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-data-in.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-data-out.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-dataset-writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-dataset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-datasheet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-dict-class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-dictionary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-encrypted-file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-file-handle-def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-file-name.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-format-guesser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-gnumeric-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-identifier2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-lazy-casereader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-make-file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-missing-values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-mrset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-ods-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-pc+-file-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-por-file-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-por-file-writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-psql-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-session.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-settings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-short-names.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-spreadsheet-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-subcase.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-sys-file-encoding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-sys-file-private.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-sys-file-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-sys-file-writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-transformations.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-value-labels.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-variable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/src_data_libdata_la-vector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/tests_language_lexer_command_name_test-identifier.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/tests_language_lexer_scan_test-identifier.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/data/$(DEPDIR)/tests_language_lexer_segment_test-identifier.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/$(DEPDIR)/command.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/control/$(DEPDIR)/control-stack.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/control/$(DEPDIR)/do-if.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/control/$(DEPDIR)/loop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/control/$(DEPDIR)/repeat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/control/$(DEPDIR)/temporary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/combine-files.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/data-list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/data-parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/data-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/data-writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/dataset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/file-handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/get-data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/get.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/inpt-pgm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/matrix-data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/matrix-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/placement-parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/print-space.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/print.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/save-translate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/save.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/data-io/$(DEPDIR)/trim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/apply-dictionary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/attributes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/delete-variables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/formats.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/missing-values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/modify-variables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/mrsets.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/numeric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/rename-variables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/sort-variables.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/split-file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/sys-file-info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/value-labels.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/variable-display.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/variable-label.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/vector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/dictionary/$(DEPDIR)/weight.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/expressions/$(DEPDIR)/evaluate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/expressions/$(DEPDIR)/helpers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/expressions/$(DEPDIR)/optimize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/expressions/$(DEPDIR)/parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/command-name.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/format-parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/include-path.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/lexer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/scan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/segment.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/subcommand-list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-command-name.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-segment.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-token.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-command-name.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/token.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/value-parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/lexer/$(DEPDIR)/variable-parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/aggregate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/autorecode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/binomial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/chisquare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/cochran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/correlations.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/crosstabs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/descriptives.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/examine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/factor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/flip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/freq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/frequencies.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/friedman.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/glm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/graph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/jonckheere-terpstra.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/kruskal-wallis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/ks-one-sample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/logistic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/mann-whitney.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/mcnemar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/means.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/median.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/npar-summary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/npar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/oneway.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/quick-cluster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/rank.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/regression.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/reliability.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/roc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/runs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/sign.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/sort-cases.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/sort-criteria.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/t-test-indep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/t-test-one-sample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/t-test-paired.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/t-test-parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/stats/$(DEPDIR)/wilcoxon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/tests/$(DEPDIR)/float-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/tests/$(DEPDIR)/format-guesser-test.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/tests/$(DEPDIR)/moments-test.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/tests/$(DEPDIR)/paper-size.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/tests/$(DEPDIR)/pool-test.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/utilities/$(DEPDIR)/cache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/utilities/$(DEPDIR)/cd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/utilities/$(DEPDIR)/date.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/utilities/$(DEPDIR)/echo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/utilities/$(DEPDIR)/host.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/utilities/$(DEPDIR)/include.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/utilities/$(DEPDIR)/output.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/utilities/$(DEPDIR)/permissions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/utilities/$(DEPDIR)/set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/utilities/$(DEPDIR)/title.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/xforms/$(DEPDIR)/compute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/xforms/$(DEPDIR)/count.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/xforms/$(DEPDIR)/fail.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/xforms/$(DEPDIR)/recode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/xforms/$(DEPDIR)/sample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/language/xforms/$(DEPDIR)/select-if.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-abt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-argv-parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-bt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-cmac-aes256.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-copyleft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-deque.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-encoding-guesser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-ext-array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-float-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-freaderror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hash-functions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-heap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hmapx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-i18n.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-inflate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-integer-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-intern.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-line-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-ll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-llx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-model-checker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-prompt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-tower.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-sparse-array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-sparse-xarray.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-start-date.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-str.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-stringi-map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-stringi-set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-taint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-temp-file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-tower.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-u8-istream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-u8-line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-zip-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-zip-writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-ll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-bt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hash-functions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-float-format.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-integer-format.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/box-whisker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/categoricals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/chart-geometry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/correlation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/covariance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/extrema.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/histogram.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/interaction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/levene.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/linreg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/merge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/moments.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/np.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/order-stats.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/percentiles.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/sort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/trimmed-mean.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/tukey-hinges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/math/$(DEPDIR)/wilcoxon-sig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-ascii.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-cairo-chart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-cairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-chart-item.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-csv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-html.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-journal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-measure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-message-item.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-msglog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-odt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-output-item.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-render.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-tab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-table-casereader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-table-item.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-table-paste.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-table-select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-table-stomp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-table-transpose.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/$(DEPDIR)/src_output_liboutput_la-text-item.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-barchart-cairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-barchart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-boxplot-cairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-boxplot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-np-plot-cairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-np-plot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-piechart-cairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-piechart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-plot-hist-cairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-plot-hist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-roc-chart-cairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-roc-chart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-scatterplot-cairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-scatterplot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-scree-cairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-scree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-spreadlevel-cairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/output/charts/$(DEPDIR)/src_output_liboutput_la-spreadlevel-plot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/$(DEPDIR)/source-init-opts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/$(DEPDIR)/syntax-gen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-dialog-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-helper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-acr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-buttonbox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-checkbox-treeview.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-conf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-dialog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-dictview.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-keypad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-select-dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-selector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-val-chooser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-value-entry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-var-ptr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-var-view.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-window-base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-builder-wrapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dialog-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dict-display.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-entry-dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-executor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-find-dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-goto-case-dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-help-menu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-missing-val-dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-options-dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-selection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view-column.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-widget-facade.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-acr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-button-editable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-buttonbox.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-cell-renderer-button.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-checkbox-treeview.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-conf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-editor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-sheet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-store.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-1sks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-aggregate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-autorecode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-barchart.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-binomial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-chisquare.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-comments.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-compute.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-correlation.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-count.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-crosstabs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-descriptives.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-examine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-factor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-flip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-frequencies.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-histogram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-indep-samps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-independent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-related.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-kmeans.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-logistic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-means.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-oneway.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-paired.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-rank.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-different.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-same.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-regression.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-reliability.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-roc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-runs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-scatterplot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-select.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-sort.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-split.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-tt1s.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-two-sample.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-univariate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-var-info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-weight.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dict.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dictview.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-empty-list-store.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-encoding-selector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-format.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-import-assistant.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-keypad.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-lex-reader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-marshal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-means-layer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-view.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-scanf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-select-dest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-selector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-spreadsheet-model.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-syntax-window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-val-chooser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-value-entry.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-ptr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-sheet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-view.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-base.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-register.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-resources.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-t-test-options.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-val-labs-dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-display.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-type-dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widget-io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widgets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-windows-menu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-spreadsheet-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal-opts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal-reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/data/$(DEPDIR)/inexactify.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/data/$(DEPDIR)/tests_data_datasheet_test-datasheet-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/data/$(DEPDIR)/tests_data_sack-sack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/encoding-guesser-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/i18n-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/line-reader-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/str-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_heap_test-heap-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_range_set_test-range-set-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_range_tower_test-range-tower-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_array_test-sparse-array-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_xarray_test-sparse-xarray-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_string_map_test-string-map-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_map_test-stringi-map-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_set_test-stringi-set-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_tower_test-tower-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/tests_libpspp_zip_test-zip-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/libpspp/$(DEPDIR)/u8-istream-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/math/$(DEPDIR)/chart-get-scale-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/math/$(DEPDIR)/chart-get-ticks-format-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/output/$(DEPDIR)/render-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/ui/$(DEPDIR)/syntax-gen-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utilities/$(DEPDIR)/utilities_pspp_convert-pspp-convert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utilities/$(DEPDIR)/utilities_pspp_dump_sav-pspp-dump-sav.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.o: lib/gtk-contrib/gtkxpaned.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_gtk_contrib_libxpaned_a_CFLAGS) $(CFLAGS) -MT lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.o -MD -MP -MF lib/gtk-contrib/$(DEPDIR)/lib_gtk_contrib_libxpaned_a-gtkxpaned.Tpo -c -o lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.o `test -f 'lib/gtk-contrib/gtkxpaned.c' || echo '$(srcdir)/'`lib/gtk-contrib/gtkxpaned.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/gtk-contrib/$(DEPDIR)/lib_gtk_contrib_libxpaned_a-gtkxpaned.Tpo lib/gtk-contrib/$(DEPDIR)/lib_gtk_contrib_libxpaned_a-gtkxpaned.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/gtk-contrib/gtkxpaned.c' object='lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_gtk_contrib_libxpaned_a_CFLAGS) $(CFLAGS) -c -o lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.o `test -f 'lib/gtk-contrib/gtkxpaned.c' || echo '$(srcdir)/'`lib/gtk-contrib/gtkxpaned.c lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.obj: lib/gtk-contrib/gtkxpaned.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_gtk_contrib_libxpaned_a_CFLAGS) $(CFLAGS) -MT lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.obj -MD -MP -MF lib/gtk-contrib/$(DEPDIR)/lib_gtk_contrib_libxpaned_a-gtkxpaned.Tpo -c -o lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.obj `if test -f 'lib/gtk-contrib/gtkxpaned.c'; then $(CYGPATH_W) 'lib/gtk-contrib/gtkxpaned.c'; else $(CYGPATH_W) '$(srcdir)/lib/gtk-contrib/gtkxpaned.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lib/gtk-contrib/$(DEPDIR)/lib_gtk_contrib_libxpaned_a-gtkxpaned.Tpo lib/gtk-contrib/$(DEPDIR)/lib_gtk_contrib_libxpaned_a-gtkxpaned.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib/gtk-contrib/gtkxpaned.c' object='lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_gtk_contrib_libxpaned_a_CFLAGS) $(CFLAGS) -c -o lib/gtk-contrib/lib_gtk_contrib_libxpaned_a-gtkxpaned.obj `if test -f 'lib/gtk-contrib/gtkxpaned.c'; then $(CYGPATH_W) 'lib/gtk-contrib/gtkxpaned.c'; else $(CYGPATH_W) '$(srcdir)/lib/gtk-contrib/gtkxpaned.c'; fi` src/ui/gui/libglade_psppire_la-helper.lo: src/ui/gui/helper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-helper.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-helper.Tpo -c -o src/ui/gui/libglade_psppire_la-helper.lo `test -f 'src/ui/gui/helper.c' || echo '$(srcdir)/'`src/ui/gui/helper.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-helper.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-helper.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/helper.c' object='src/ui/gui/libglade_psppire_la-helper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-helper.lo `test -f 'src/ui/gui/helper.c' || echo '$(srcdir)/'`src/ui/gui/helper.c src/ui/gui/libglade_psppire_la-dialog-common.lo: src/ui/gui/dialog-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-dialog-common.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-dialog-common.Tpo -c -o src/ui/gui/libglade_psppire_la-dialog-common.lo `test -f 'src/ui/gui/dialog-common.c' || echo '$(srcdir)/'`src/ui/gui/dialog-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-dialog-common.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-dialog-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/dialog-common.c' object='src/ui/gui/libglade_psppire_la-dialog-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-dialog-common.lo `test -f 'src/ui/gui/dialog-common.c' || echo '$(srcdir)/'`src/ui/gui/dialog-common.c src/ui/gui/libglade_psppire_la-psppire-var-ptr.lo: src/ui/gui/psppire-var-ptr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-var-ptr.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-var-ptr.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-var-ptr.lo `test -f 'src/ui/gui/psppire-var-ptr.c' || echo '$(srcdir)/'`src/ui/gui/psppire-var-ptr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-var-ptr.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-var-ptr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-var-ptr.c' object='src/ui/gui/libglade_psppire_la-psppire-var-ptr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-var-ptr.lo `test -f 'src/ui/gui/psppire-var-ptr.c' || echo '$(srcdir)/'`src/ui/gui/psppire-var-ptr.c src/data/libglade_psppire_la-format.lo: src/data/format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/data/libglade_psppire_la-format.lo -MD -MP -MF src/data/$(DEPDIR)/libglade_psppire_la-format.Tpo -c -o src/data/libglade_psppire_la-format.lo `test -f 'src/data/format.c' || echo '$(srcdir)/'`src/data/format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/libglade_psppire_la-format.Tpo src/data/$(DEPDIR)/libglade_psppire_la-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/format.c' object='src/data/libglade_psppire_la-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/data/libglade_psppire_la-format.lo `test -f 'src/data/format.c' || echo '$(srcdir)/'`src/data/format.c src/ui/gui/libglade_psppire_la-psppire-format.lo: src/ui/gui/psppire-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-format.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-format.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-format.lo `test -f 'src/ui/gui/psppire-format.c' || echo '$(srcdir)/'`src/ui/gui/psppire-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-format.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-format.c' object='src/ui/gui/libglade_psppire_la-psppire-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-format.lo `test -f 'src/ui/gui/psppire-format.c' || echo '$(srcdir)/'`src/ui/gui/psppire-format.c src/data/libglade_psppire_la-value-labels.lo: src/data/value-labels.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/data/libglade_psppire_la-value-labels.lo -MD -MP -MF src/data/$(DEPDIR)/libglade_psppire_la-value-labels.Tpo -c -o src/data/libglade_psppire_la-value-labels.lo `test -f 'src/data/value-labels.c' || echo '$(srcdir)/'`src/data/value-labels.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/libglade_psppire_la-value-labels.Tpo src/data/$(DEPDIR)/libglade_psppire_la-value-labels.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/value-labels.c' object='src/data/libglade_psppire_la-value-labels.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/data/libglade_psppire_la-value-labels.lo `test -f 'src/data/value-labels.c' || echo '$(srcdir)/'`src/data/value-labels.c src/ui/gui/libglade_psppire_la-psppire-conf.lo: src/ui/gui/psppire-conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-conf.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-conf.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-conf.lo `test -f 'src/ui/gui/psppire-conf.c' || echo '$(srcdir)/'`src/ui/gui/psppire-conf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-conf.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-conf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-conf.c' object='src/ui/gui/libglade_psppire_la-psppire-conf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-conf.lo `test -f 'src/ui/gui/psppire-conf.c' || echo '$(srcdir)/'`src/ui/gui/psppire-conf.c src/ui/gui/libglade_psppire_la-psppire-acr.lo: src/ui/gui/psppire-acr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-acr.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-acr.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-acr.lo `test -f 'src/ui/gui/psppire-acr.c' || echo '$(srcdir)/'`src/ui/gui/psppire-acr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-acr.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-acr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-acr.c' object='src/ui/gui/libglade_psppire_la-psppire-acr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-acr.lo `test -f 'src/ui/gui/psppire-acr.c' || echo '$(srcdir)/'`src/ui/gui/psppire-acr.c src/ui/gui/libglade_psppire_la-psppire-buttonbox.lo: src/ui/gui/psppire-buttonbox.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-buttonbox.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-buttonbox.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-buttonbox.lo `test -f 'src/ui/gui/psppire-buttonbox.c' || echo '$(srcdir)/'`src/ui/gui/psppire-buttonbox.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-buttonbox.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-buttonbox.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-buttonbox.c' object='src/ui/gui/libglade_psppire_la-psppire-buttonbox.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-buttonbox.lo `test -f 'src/ui/gui/psppire-buttonbox.c' || echo '$(srcdir)/'`src/ui/gui/psppire-buttonbox.c src/ui/gui/libglade_psppire_la-psppire-dialog.lo: src/ui/gui/psppire-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-dialog.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-dialog.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-dialog.lo `test -f 'src/ui/gui/psppire-dialog.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-dialog.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-dialog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog.c' object='src/ui/gui/libglade_psppire_la-psppire-dialog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-dialog.lo `test -f 'src/ui/gui/psppire-dialog.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog.c src/ui/gui/libglade_psppire_la-psppire-keypad.lo: src/ui/gui/psppire-keypad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-keypad.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-keypad.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-keypad.lo `test -f 'src/ui/gui/psppire-keypad.c' || echo '$(srcdir)/'`src/ui/gui/psppire-keypad.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-keypad.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-keypad.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-keypad.c' object='src/ui/gui/libglade_psppire_la-psppire-keypad.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-keypad.lo `test -f 'src/ui/gui/psppire-keypad.c' || echo '$(srcdir)/'`src/ui/gui/psppire-keypad.c src/ui/gui/libglade_psppire_la-psppire-dictview.lo: src/ui/gui/psppire-dictview.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-dictview.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-dictview.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-dictview.lo `test -f 'src/ui/gui/psppire-dictview.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dictview.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-dictview.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-dictview.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dictview.c' object='src/ui/gui/libglade_psppire_la-psppire-dictview.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-dictview.lo `test -f 'src/ui/gui/psppire-dictview.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dictview.c src/ui/gui/libglade_psppire_la-psppire-selector.lo: src/ui/gui/psppire-selector.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-selector.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-selector.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-selector.lo `test -f 'src/ui/gui/psppire-selector.c' || echo '$(srcdir)/'`src/ui/gui/psppire-selector.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-selector.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-selector.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-selector.c' object='src/ui/gui/libglade_psppire_la-psppire-selector.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-selector.lo `test -f 'src/ui/gui/psppire-selector.c' || echo '$(srcdir)/'`src/ui/gui/psppire-selector.c src/ui/gui/libglade_psppire_la-psppire-select-dest.lo: src/ui/gui/psppire-select-dest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-select-dest.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-select-dest.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-select-dest.lo `test -f 'src/ui/gui/psppire-select-dest.c' || echo '$(srcdir)/'`src/ui/gui/psppire-select-dest.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-select-dest.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-select-dest.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-select-dest.c' object='src/ui/gui/libglade_psppire_la-psppire-select-dest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-select-dest.lo `test -f 'src/ui/gui/psppire-select-dest.c' || echo '$(srcdir)/'`src/ui/gui/psppire-select-dest.c src/ui/gui/libglade_psppire_la-psppire-var-view.lo: src/ui/gui/psppire-var-view.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-var-view.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-var-view.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-var-view.lo `test -f 'src/ui/gui/psppire-var-view.c' || echo '$(srcdir)/'`src/ui/gui/psppire-var-view.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-var-view.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-var-view.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-var-view.c' object='src/ui/gui/libglade_psppire_la-psppire-var-view.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-var-view.lo `test -f 'src/ui/gui/psppire-var-view.c' || echo '$(srcdir)/'`src/ui/gui/psppire-var-view.c src/ui/gui/libglade_psppire_la-psppire-checkbox-treeview.lo: src/ui/gui/psppire-checkbox-treeview.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-checkbox-treeview.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-checkbox-treeview.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-checkbox-treeview.lo `test -f 'src/ui/gui/psppire-checkbox-treeview.c' || echo '$(srcdir)/'`src/ui/gui/psppire-checkbox-treeview.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-checkbox-treeview.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-checkbox-treeview.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-checkbox-treeview.c' object='src/ui/gui/libglade_psppire_la-psppire-checkbox-treeview.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-checkbox-treeview.lo `test -f 'src/ui/gui/psppire-checkbox-treeview.c' || echo '$(srcdir)/'`src/ui/gui/psppire-checkbox-treeview.c src/ui/gui/libglade_psppire_la-psppire-val-chooser.lo: src/ui/gui/psppire-val-chooser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-val-chooser.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-val-chooser.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-val-chooser.lo `test -f 'src/ui/gui/psppire-val-chooser.c' || echo '$(srcdir)/'`src/ui/gui/psppire-val-chooser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-val-chooser.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-val-chooser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-val-chooser.c' object='src/ui/gui/libglade_psppire_la-psppire-val-chooser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-val-chooser.lo `test -f 'src/ui/gui/psppire-val-chooser.c' || echo '$(srcdir)/'`src/ui/gui/psppire-val-chooser.c src/ui/gui/libglade_psppire_la-psppire-value-entry.lo: src/ui/gui/psppire-value-entry.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-value-entry.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-value-entry.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-value-entry.lo `test -f 'src/ui/gui/psppire-value-entry.c' || echo '$(srcdir)/'`src/ui/gui/psppire-value-entry.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-value-entry.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-value-entry.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-value-entry.c' object='src/ui/gui/libglade_psppire_la-psppire-value-entry.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-value-entry.lo `test -f 'src/ui/gui/psppire-value-entry.c' || echo '$(srcdir)/'`src/ui/gui/psppire-value-entry.c src/ui/gui/libglade_psppire_la-psppire-window-base.lo: src/ui/gui/psppire-window-base.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -MT src/ui/gui/libglade_psppire_la-psppire-window-base.lo -MD -MP -MF src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-window-base.Tpo -c -o src/ui/gui/libglade_psppire_la-psppire-window-base.lo `test -f 'src/ui/gui/psppire-window-base.c' || echo '$(srcdir)/'`src/ui/gui/psppire-window-base.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-window-base.Tpo src/ui/gui/$(DEPDIR)/libglade_psppire_la-psppire-window-base.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-window-base.c' object='src/ui/gui/libglade_psppire_la-psppire-window-base.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglade_psppire_la_CFLAGS) $(CFLAGS) -c -o src/ui/gui/libglade_psppire_la-psppire-window-base.lo `test -f 'src/ui/gui/psppire-window-base.c' || echo '$(srcdir)/'`src/ui/gui/psppire-window-base.c src/data/src_data_libdata_la-any-reader.lo: src/data/any-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-any-reader.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-any-reader.Tpo -c -o src/data/src_data_libdata_la-any-reader.lo `test -f 'src/data/any-reader.c' || echo '$(srcdir)/'`src/data/any-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-any-reader.Tpo src/data/$(DEPDIR)/src_data_libdata_la-any-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/any-reader.c' object='src/data/src_data_libdata_la-any-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-any-reader.lo `test -f 'src/data/any-reader.c' || echo '$(srcdir)/'`src/data/any-reader.c src/data/src_data_libdata_la-any-writer.lo: src/data/any-writer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-any-writer.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-any-writer.Tpo -c -o src/data/src_data_libdata_la-any-writer.lo `test -f 'src/data/any-writer.c' || echo '$(srcdir)/'`src/data/any-writer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-any-writer.Tpo src/data/$(DEPDIR)/src_data_libdata_la-any-writer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/any-writer.c' object='src/data/src_data_libdata_la-any-writer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-any-writer.lo `test -f 'src/data/any-writer.c' || echo '$(srcdir)/'`src/data/any-writer.c src/data/src_data_libdata_la-attributes.lo: src/data/attributes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-attributes.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-attributes.Tpo -c -o src/data/src_data_libdata_la-attributes.lo `test -f 'src/data/attributes.c' || echo '$(srcdir)/'`src/data/attributes.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-attributes.Tpo src/data/$(DEPDIR)/src_data_libdata_la-attributes.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/attributes.c' object='src/data/src_data_libdata_la-attributes.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-attributes.lo `test -f 'src/data/attributes.c' || echo '$(srcdir)/'`src/data/attributes.c src/data/src_data_libdata_la-calendar.lo: src/data/calendar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-calendar.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-calendar.Tpo -c -o src/data/src_data_libdata_la-calendar.lo `test -f 'src/data/calendar.c' || echo '$(srcdir)/'`src/data/calendar.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-calendar.Tpo src/data/$(DEPDIR)/src_data_libdata_la-calendar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/calendar.c' object='src/data/src_data_libdata_la-calendar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-calendar.lo `test -f 'src/data/calendar.c' || echo '$(srcdir)/'`src/data/calendar.c src/data/src_data_libdata_la-case-map.lo: src/data/case-map.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-case-map.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-case-map.Tpo -c -o src/data/src_data_libdata_la-case-map.lo `test -f 'src/data/case-map.c' || echo '$(srcdir)/'`src/data/case-map.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-case-map.Tpo src/data/$(DEPDIR)/src_data_libdata_la-case-map.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/case-map.c' object='src/data/src_data_libdata_la-case-map.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-case-map.lo `test -f 'src/data/case-map.c' || echo '$(srcdir)/'`src/data/case-map.c src/data/src_data_libdata_la-case-matcher.lo: src/data/case-matcher.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-case-matcher.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-case-matcher.Tpo -c -o src/data/src_data_libdata_la-case-matcher.lo `test -f 'src/data/case-matcher.c' || echo '$(srcdir)/'`src/data/case-matcher.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-case-matcher.Tpo src/data/$(DEPDIR)/src_data_libdata_la-case-matcher.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/case-matcher.c' object='src/data/src_data_libdata_la-case-matcher.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-case-matcher.lo `test -f 'src/data/case-matcher.c' || echo '$(srcdir)/'`src/data/case-matcher.c src/data/src_data_libdata_la-caseproto.lo: src/data/caseproto.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-caseproto.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-caseproto.Tpo -c -o src/data/src_data_libdata_la-caseproto.lo `test -f 'src/data/caseproto.c' || echo '$(srcdir)/'`src/data/caseproto.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-caseproto.Tpo src/data/$(DEPDIR)/src_data_libdata_la-caseproto.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/caseproto.c' object='src/data/src_data_libdata_la-caseproto.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-caseproto.lo `test -f 'src/data/caseproto.c' || echo '$(srcdir)/'`src/data/caseproto.c src/data/src_data_libdata_la-case.lo: src/data/case.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-case.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-case.Tpo -c -o src/data/src_data_libdata_la-case.lo `test -f 'src/data/case.c' || echo '$(srcdir)/'`src/data/case.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-case.Tpo src/data/$(DEPDIR)/src_data_libdata_la-case.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/case.c' object='src/data/src_data_libdata_la-case.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-case.lo `test -f 'src/data/case.c' || echo '$(srcdir)/'`src/data/case.c src/data/src_data_libdata_la-casegrouper.lo: src/data/casegrouper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-casegrouper.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-casegrouper.Tpo -c -o src/data/src_data_libdata_la-casegrouper.lo `test -f 'src/data/casegrouper.c' || echo '$(srcdir)/'`src/data/casegrouper.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-casegrouper.Tpo src/data/$(DEPDIR)/src_data_libdata_la-casegrouper.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/casegrouper.c' object='src/data/src_data_libdata_la-casegrouper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-casegrouper.lo `test -f 'src/data/casegrouper.c' || echo '$(srcdir)/'`src/data/casegrouper.c src/data/src_data_libdata_la-caseinit.lo: src/data/caseinit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-caseinit.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-caseinit.Tpo -c -o src/data/src_data_libdata_la-caseinit.lo `test -f 'src/data/caseinit.c' || echo '$(srcdir)/'`src/data/caseinit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-caseinit.Tpo src/data/$(DEPDIR)/src_data_libdata_la-caseinit.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/caseinit.c' object='src/data/src_data_libdata_la-caseinit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-caseinit.lo `test -f 'src/data/caseinit.c' || echo '$(srcdir)/'`src/data/caseinit.c src/data/src_data_libdata_la-casereader-filter.lo: src/data/casereader-filter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-casereader-filter.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-casereader-filter.Tpo -c -o src/data/src_data_libdata_la-casereader-filter.lo `test -f 'src/data/casereader-filter.c' || echo '$(srcdir)/'`src/data/casereader-filter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-casereader-filter.Tpo src/data/$(DEPDIR)/src_data_libdata_la-casereader-filter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/casereader-filter.c' object='src/data/src_data_libdata_la-casereader-filter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-casereader-filter.lo `test -f 'src/data/casereader-filter.c' || echo '$(srcdir)/'`src/data/casereader-filter.c src/data/src_data_libdata_la-casereader-project.lo: src/data/casereader-project.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-casereader-project.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-casereader-project.Tpo -c -o src/data/src_data_libdata_la-casereader-project.lo `test -f 'src/data/casereader-project.c' || echo '$(srcdir)/'`src/data/casereader-project.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-casereader-project.Tpo src/data/$(DEPDIR)/src_data_libdata_la-casereader-project.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/casereader-project.c' object='src/data/src_data_libdata_la-casereader-project.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-casereader-project.lo `test -f 'src/data/casereader-project.c' || echo '$(srcdir)/'`src/data/casereader-project.c src/data/src_data_libdata_la-casereader-select.lo: src/data/casereader-select.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-casereader-select.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-casereader-select.Tpo -c -o src/data/src_data_libdata_la-casereader-select.lo `test -f 'src/data/casereader-select.c' || echo '$(srcdir)/'`src/data/casereader-select.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-casereader-select.Tpo src/data/$(DEPDIR)/src_data_libdata_la-casereader-select.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/casereader-select.c' object='src/data/src_data_libdata_la-casereader-select.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-casereader-select.lo `test -f 'src/data/casereader-select.c' || echo '$(srcdir)/'`src/data/casereader-select.c src/data/src_data_libdata_la-casereader-shim.lo: src/data/casereader-shim.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-casereader-shim.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-casereader-shim.Tpo -c -o src/data/src_data_libdata_la-casereader-shim.lo `test -f 'src/data/casereader-shim.c' || echo '$(srcdir)/'`src/data/casereader-shim.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-casereader-shim.Tpo src/data/$(DEPDIR)/src_data_libdata_la-casereader-shim.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/casereader-shim.c' object='src/data/src_data_libdata_la-casereader-shim.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-casereader-shim.lo `test -f 'src/data/casereader-shim.c' || echo '$(srcdir)/'`src/data/casereader-shim.c src/data/src_data_libdata_la-casereader-translator.lo: src/data/casereader-translator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-casereader-translator.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-casereader-translator.Tpo -c -o src/data/src_data_libdata_la-casereader-translator.lo `test -f 'src/data/casereader-translator.c' || echo '$(srcdir)/'`src/data/casereader-translator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-casereader-translator.Tpo src/data/$(DEPDIR)/src_data_libdata_la-casereader-translator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/casereader-translator.c' object='src/data/src_data_libdata_la-casereader-translator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-casereader-translator.lo `test -f 'src/data/casereader-translator.c' || echo '$(srcdir)/'`src/data/casereader-translator.c src/data/src_data_libdata_la-casereader.lo: src/data/casereader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-casereader.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-casereader.Tpo -c -o src/data/src_data_libdata_la-casereader.lo `test -f 'src/data/casereader.c' || echo '$(srcdir)/'`src/data/casereader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-casereader.Tpo src/data/$(DEPDIR)/src_data_libdata_la-casereader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/casereader.c' object='src/data/src_data_libdata_la-casereader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-casereader.lo `test -f 'src/data/casereader.c' || echo '$(srcdir)/'`src/data/casereader.c src/data/src_data_libdata_la-casewindow.lo: src/data/casewindow.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-casewindow.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-casewindow.Tpo -c -o src/data/src_data_libdata_la-casewindow.lo `test -f 'src/data/casewindow.c' || echo '$(srcdir)/'`src/data/casewindow.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-casewindow.Tpo src/data/$(DEPDIR)/src_data_libdata_la-casewindow.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/casewindow.c' object='src/data/src_data_libdata_la-casewindow.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-casewindow.lo `test -f 'src/data/casewindow.c' || echo '$(srcdir)/'`src/data/casewindow.c src/data/src_data_libdata_la-casewriter-translator.lo: src/data/casewriter-translator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-casewriter-translator.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-casewriter-translator.Tpo -c -o src/data/src_data_libdata_la-casewriter-translator.lo `test -f 'src/data/casewriter-translator.c' || echo '$(srcdir)/'`src/data/casewriter-translator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-casewriter-translator.Tpo src/data/$(DEPDIR)/src_data_libdata_la-casewriter-translator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/casewriter-translator.c' object='src/data/src_data_libdata_la-casewriter-translator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-casewriter-translator.lo `test -f 'src/data/casewriter-translator.c' || echo '$(srcdir)/'`src/data/casewriter-translator.c src/data/src_data_libdata_la-casewriter.lo: src/data/casewriter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-casewriter.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-casewriter.Tpo -c -o src/data/src_data_libdata_la-casewriter.lo `test -f 'src/data/casewriter.c' || echo '$(srcdir)/'`src/data/casewriter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-casewriter.Tpo src/data/$(DEPDIR)/src_data_libdata_la-casewriter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/casewriter.c' object='src/data/src_data_libdata_la-casewriter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-casewriter.lo `test -f 'src/data/casewriter.c' || echo '$(srcdir)/'`src/data/casewriter.c src/data/src_data_libdata_la-case-tmpfile.lo: src/data/case-tmpfile.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-case-tmpfile.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-case-tmpfile.Tpo -c -o src/data/src_data_libdata_la-case-tmpfile.lo `test -f 'src/data/case-tmpfile.c' || echo '$(srcdir)/'`src/data/case-tmpfile.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-case-tmpfile.Tpo src/data/$(DEPDIR)/src_data_libdata_la-case-tmpfile.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/case-tmpfile.c' object='src/data/src_data_libdata_la-case-tmpfile.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-case-tmpfile.lo `test -f 'src/data/case-tmpfile.c' || echo '$(srcdir)/'`src/data/case-tmpfile.c src/data/src_data_libdata_la-csv-file-writer.lo: src/data/csv-file-writer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-csv-file-writer.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-csv-file-writer.Tpo -c -o src/data/src_data_libdata_la-csv-file-writer.lo `test -f 'src/data/csv-file-writer.c' || echo '$(srcdir)/'`src/data/csv-file-writer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-csv-file-writer.Tpo src/data/$(DEPDIR)/src_data_libdata_la-csv-file-writer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/csv-file-writer.c' object='src/data/src_data_libdata_la-csv-file-writer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-csv-file-writer.lo `test -f 'src/data/csv-file-writer.c' || echo '$(srcdir)/'`src/data/csv-file-writer.c src/data/src_data_libdata_la-data-in.lo: src/data/data-in.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-data-in.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-data-in.Tpo -c -o src/data/src_data_libdata_la-data-in.lo `test -f 'src/data/data-in.c' || echo '$(srcdir)/'`src/data/data-in.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-data-in.Tpo src/data/$(DEPDIR)/src_data_libdata_la-data-in.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/data-in.c' object='src/data/src_data_libdata_la-data-in.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-data-in.lo `test -f 'src/data/data-in.c' || echo '$(srcdir)/'`src/data/data-in.c src/data/src_data_libdata_la-data-out.lo: src/data/data-out.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-data-out.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-data-out.Tpo -c -o src/data/src_data_libdata_la-data-out.lo `test -f 'src/data/data-out.c' || echo '$(srcdir)/'`src/data/data-out.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-data-out.Tpo src/data/$(DEPDIR)/src_data_libdata_la-data-out.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/data-out.c' object='src/data/src_data_libdata_la-data-out.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-data-out.lo `test -f 'src/data/data-out.c' || echo '$(srcdir)/'`src/data/data-out.c src/data/src_data_libdata_la-dataset.lo: src/data/dataset.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-dataset.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-dataset.Tpo -c -o src/data/src_data_libdata_la-dataset.lo `test -f 'src/data/dataset.c' || echo '$(srcdir)/'`src/data/dataset.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-dataset.Tpo src/data/$(DEPDIR)/src_data_libdata_la-dataset.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/dataset.c' object='src/data/src_data_libdata_la-dataset.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-dataset.lo `test -f 'src/data/dataset.c' || echo '$(srcdir)/'`src/data/dataset.c src/data/src_data_libdata_la-dataset-writer.lo: src/data/dataset-writer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-dataset-writer.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-dataset-writer.Tpo -c -o src/data/src_data_libdata_la-dataset-writer.lo `test -f 'src/data/dataset-writer.c' || echo '$(srcdir)/'`src/data/dataset-writer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-dataset-writer.Tpo src/data/$(DEPDIR)/src_data_libdata_la-dataset-writer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/dataset-writer.c' object='src/data/src_data_libdata_la-dataset-writer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-dataset-writer.lo `test -f 'src/data/dataset-writer.c' || echo '$(srcdir)/'`src/data/dataset-writer.c src/data/src_data_libdata_la-datasheet.lo: src/data/datasheet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-datasheet.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-datasheet.Tpo -c -o src/data/src_data_libdata_la-datasheet.lo `test -f 'src/data/datasheet.c' || echo '$(srcdir)/'`src/data/datasheet.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-datasheet.Tpo src/data/$(DEPDIR)/src_data_libdata_la-datasheet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/datasheet.c' object='src/data/src_data_libdata_la-datasheet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-datasheet.lo `test -f 'src/data/datasheet.c' || echo '$(srcdir)/'`src/data/datasheet.c src/data/src_data_libdata_la-dict-class.lo: src/data/dict-class.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-dict-class.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-dict-class.Tpo -c -o src/data/src_data_libdata_la-dict-class.lo `test -f 'src/data/dict-class.c' || echo '$(srcdir)/'`src/data/dict-class.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-dict-class.Tpo src/data/$(DEPDIR)/src_data_libdata_la-dict-class.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/dict-class.c' object='src/data/src_data_libdata_la-dict-class.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-dict-class.lo `test -f 'src/data/dict-class.c' || echo '$(srcdir)/'`src/data/dict-class.c src/data/src_data_libdata_la-dictionary.lo: src/data/dictionary.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-dictionary.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-dictionary.Tpo -c -o src/data/src_data_libdata_la-dictionary.lo `test -f 'src/data/dictionary.c' || echo '$(srcdir)/'`src/data/dictionary.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-dictionary.Tpo src/data/$(DEPDIR)/src_data_libdata_la-dictionary.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/dictionary.c' object='src/data/src_data_libdata_la-dictionary.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-dictionary.lo `test -f 'src/data/dictionary.c' || echo '$(srcdir)/'`src/data/dictionary.c src/data/src_data_libdata_la-encrypted-file.lo: src/data/encrypted-file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-encrypted-file.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-encrypted-file.Tpo -c -o src/data/src_data_libdata_la-encrypted-file.lo `test -f 'src/data/encrypted-file.c' || echo '$(srcdir)/'`src/data/encrypted-file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-encrypted-file.Tpo src/data/$(DEPDIR)/src_data_libdata_la-encrypted-file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/encrypted-file.c' object='src/data/src_data_libdata_la-encrypted-file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-encrypted-file.lo `test -f 'src/data/encrypted-file.c' || echo '$(srcdir)/'`src/data/encrypted-file.c src/data/src_data_libdata_la-file-handle-def.lo: src/data/file-handle-def.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-file-handle-def.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-file-handle-def.Tpo -c -o src/data/src_data_libdata_la-file-handle-def.lo `test -f 'src/data/file-handle-def.c' || echo '$(srcdir)/'`src/data/file-handle-def.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-file-handle-def.Tpo src/data/$(DEPDIR)/src_data_libdata_la-file-handle-def.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/file-handle-def.c' object='src/data/src_data_libdata_la-file-handle-def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-file-handle-def.lo `test -f 'src/data/file-handle-def.c' || echo '$(srcdir)/'`src/data/file-handle-def.c src/data/src_data_libdata_la-file-name.lo: src/data/file-name.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-file-name.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-file-name.Tpo -c -o src/data/src_data_libdata_la-file-name.lo `test -f 'src/data/file-name.c' || echo '$(srcdir)/'`src/data/file-name.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-file-name.Tpo src/data/$(DEPDIR)/src_data_libdata_la-file-name.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/file-name.c' object='src/data/src_data_libdata_la-file-name.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-file-name.lo `test -f 'src/data/file-name.c' || echo '$(srcdir)/'`src/data/file-name.c src/data/src_data_libdata_la-format-guesser.lo: src/data/format-guesser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-format-guesser.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-format-guesser.Tpo -c -o src/data/src_data_libdata_la-format-guesser.lo `test -f 'src/data/format-guesser.c' || echo '$(srcdir)/'`src/data/format-guesser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-format-guesser.Tpo src/data/$(DEPDIR)/src_data_libdata_la-format-guesser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/format-guesser.c' object='src/data/src_data_libdata_la-format-guesser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-format-guesser.lo `test -f 'src/data/format-guesser.c' || echo '$(srcdir)/'`src/data/format-guesser.c src/data/src_data_libdata_la-format.lo: src/data/format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-format.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-format.Tpo -c -o src/data/src_data_libdata_la-format.lo `test -f 'src/data/format.c' || echo '$(srcdir)/'`src/data/format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-format.Tpo src/data/$(DEPDIR)/src_data_libdata_la-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/format.c' object='src/data/src_data_libdata_la-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-format.lo `test -f 'src/data/format.c' || echo '$(srcdir)/'`src/data/format.c src/data/src_data_libdata_la-gnumeric-reader.lo: src/data/gnumeric-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-gnumeric-reader.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-gnumeric-reader.Tpo -c -o src/data/src_data_libdata_la-gnumeric-reader.lo `test -f 'src/data/gnumeric-reader.c' || echo '$(srcdir)/'`src/data/gnumeric-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-gnumeric-reader.Tpo src/data/$(DEPDIR)/src_data_libdata_la-gnumeric-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/gnumeric-reader.c' object='src/data/src_data_libdata_la-gnumeric-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-gnumeric-reader.lo `test -f 'src/data/gnumeric-reader.c' || echo '$(srcdir)/'`src/data/gnumeric-reader.c src/data/src_data_libdata_la-identifier.lo: src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-identifier.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-identifier.Tpo -c -o src/data/src_data_libdata_la-identifier.lo `test -f 'src/data/identifier.c' || echo '$(srcdir)/'`src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-identifier.Tpo src/data/$(DEPDIR)/src_data_libdata_la-identifier.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/identifier.c' object='src/data/src_data_libdata_la-identifier.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-identifier.lo `test -f 'src/data/identifier.c' || echo '$(srcdir)/'`src/data/identifier.c src/data/src_data_libdata_la-identifier2.lo: src/data/identifier2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-identifier2.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-identifier2.Tpo -c -o src/data/src_data_libdata_la-identifier2.lo `test -f 'src/data/identifier2.c' || echo '$(srcdir)/'`src/data/identifier2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-identifier2.Tpo src/data/$(DEPDIR)/src_data_libdata_la-identifier2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/identifier2.c' object='src/data/src_data_libdata_la-identifier2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-identifier2.lo `test -f 'src/data/identifier2.c' || echo '$(srcdir)/'`src/data/identifier2.c src/data/src_data_libdata_la-lazy-casereader.lo: src/data/lazy-casereader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-lazy-casereader.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-lazy-casereader.Tpo -c -o src/data/src_data_libdata_la-lazy-casereader.lo `test -f 'src/data/lazy-casereader.c' || echo '$(srcdir)/'`src/data/lazy-casereader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-lazy-casereader.Tpo src/data/$(DEPDIR)/src_data_libdata_la-lazy-casereader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/lazy-casereader.c' object='src/data/src_data_libdata_la-lazy-casereader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-lazy-casereader.lo `test -f 'src/data/lazy-casereader.c' || echo '$(srcdir)/'`src/data/lazy-casereader.c src/data/src_data_libdata_la-missing-values.lo: src/data/missing-values.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-missing-values.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-missing-values.Tpo -c -o src/data/src_data_libdata_la-missing-values.lo `test -f 'src/data/missing-values.c' || echo '$(srcdir)/'`src/data/missing-values.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-missing-values.Tpo src/data/$(DEPDIR)/src_data_libdata_la-missing-values.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/missing-values.c' object='src/data/src_data_libdata_la-missing-values.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-missing-values.lo `test -f 'src/data/missing-values.c' || echo '$(srcdir)/'`src/data/missing-values.c src/data/src_data_libdata_la-make-file.lo: src/data/make-file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-make-file.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-make-file.Tpo -c -o src/data/src_data_libdata_la-make-file.lo `test -f 'src/data/make-file.c' || echo '$(srcdir)/'`src/data/make-file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-make-file.Tpo src/data/$(DEPDIR)/src_data_libdata_la-make-file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/make-file.c' object='src/data/src_data_libdata_la-make-file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-make-file.lo `test -f 'src/data/make-file.c' || echo '$(srcdir)/'`src/data/make-file.c src/data/src_data_libdata_la-mrset.lo: src/data/mrset.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-mrset.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-mrset.Tpo -c -o src/data/src_data_libdata_la-mrset.lo `test -f 'src/data/mrset.c' || echo '$(srcdir)/'`src/data/mrset.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-mrset.Tpo src/data/$(DEPDIR)/src_data_libdata_la-mrset.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/mrset.c' object='src/data/src_data_libdata_la-mrset.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-mrset.lo `test -f 'src/data/mrset.c' || echo '$(srcdir)/'`src/data/mrset.c src/data/src_data_libdata_la-ods-reader.lo: src/data/ods-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-ods-reader.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-ods-reader.Tpo -c -o src/data/src_data_libdata_la-ods-reader.lo `test -f 'src/data/ods-reader.c' || echo '$(srcdir)/'`src/data/ods-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-ods-reader.Tpo src/data/$(DEPDIR)/src_data_libdata_la-ods-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/ods-reader.c' object='src/data/src_data_libdata_la-ods-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-ods-reader.lo `test -f 'src/data/ods-reader.c' || echo '$(srcdir)/'`src/data/ods-reader.c src/data/src_data_libdata_la-pc+-file-reader.lo: src/data/pc+-file-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-pc+-file-reader.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-pc+-file-reader.Tpo -c -o src/data/src_data_libdata_la-pc+-file-reader.lo `test -f 'src/data/pc+-file-reader.c' || echo '$(srcdir)/'`src/data/pc+-file-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-pc+-file-reader.Tpo src/data/$(DEPDIR)/src_data_libdata_la-pc+-file-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/pc+-file-reader.c' object='src/data/src_data_libdata_la-pc+-file-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-pc+-file-reader.lo `test -f 'src/data/pc+-file-reader.c' || echo '$(srcdir)/'`src/data/pc+-file-reader.c src/data/src_data_libdata_la-por-file-reader.lo: src/data/por-file-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-por-file-reader.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-por-file-reader.Tpo -c -o src/data/src_data_libdata_la-por-file-reader.lo `test -f 'src/data/por-file-reader.c' || echo '$(srcdir)/'`src/data/por-file-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-por-file-reader.Tpo src/data/$(DEPDIR)/src_data_libdata_la-por-file-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/por-file-reader.c' object='src/data/src_data_libdata_la-por-file-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-por-file-reader.lo `test -f 'src/data/por-file-reader.c' || echo '$(srcdir)/'`src/data/por-file-reader.c src/data/src_data_libdata_la-por-file-writer.lo: src/data/por-file-writer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-por-file-writer.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-por-file-writer.Tpo -c -o src/data/src_data_libdata_la-por-file-writer.lo `test -f 'src/data/por-file-writer.c' || echo '$(srcdir)/'`src/data/por-file-writer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-por-file-writer.Tpo src/data/$(DEPDIR)/src_data_libdata_la-por-file-writer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/por-file-writer.c' object='src/data/src_data_libdata_la-por-file-writer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-por-file-writer.lo `test -f 'src/data/por-file-writer.c' || echo '$(srcdir)/'`src/data/por-file-writer.c src/data/src_data_libdata_la-psql-reader.lo: src/data/psql-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-psql-reader.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-psql-reader.Tpo -c -o src/data/src_data_libdata_la-psql-reader.lo `test -f 'src/data/psql-reader.c' || echo '$(srcdir)/'`src/data/psql-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-psql-reader.Tpo src/data/$(DEPDIR)/src_data_libdata_la-psql-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/psql-reader.c' object='src/data/src_data_libdata_la-psql-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-psql-reader.lo `test -f 'src/data/psql-reader.c' || echo '$(srcdir)/'`src/data/psql-reader.c src/data/src_data_libdata_la-session.lo: src/data/session.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-session.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-session.Tpo -c -o src/data/src_data_libdata_la-session.lo `test -f 'src/data/session.c' || echo '$(srcdir)/'`src/data/session.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-session.Tpo src/data/$(DEPDIR)/src_data_libdata_la-session.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/session.c' object='src/data/src_data_libdata_la-session.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-session.lo `test -f 'src/data/session.c' || echo '$(srcdir)/'`src/data/session.c src/data/src_data_libdata_la-settings.lo: src/data/settings.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-settings.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-settings.Tpo -c -o src/data/src_data_libdata_la-settings.lo `test -f 'src/data/settings.c' || echo '$(srcdir)/'`src/data/settings.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-settings.Tpo src/data/$(DEPDIR)/src_data_libdata_la-settings.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/settings.c' object='src/data/src_data_libdata_la-settings.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-settings.lo `test -f 'src/data/settings.c' || echo '$(srcdir)/'`src/data/settings.c src/data/src_data_libdata_la-short-names.lo: src/data/short-names.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-short-names.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-short-names.Tpo -c -o src/data/src_data_libdata_la-short-names.lo `test -f 'src/data/short-names.c' || echo '$(srcdir)/'`src/data/short-names.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-short-names.Tpo src/data/$(DEPDIR)/src_data_libdata_la-short-names.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/short-names.c' object='src/data/src_data_libdata_la-short-names.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-short-names.lo `test -f 'src/data/short-names.c' || echo '$(srcdir)/'`src/data/short-names.c src/data/src_data_libdata_la-spreadsheet-reader.lo: src/data/spreadsheet-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-spreadsheet-reader.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-spreadsheet-reader.Tpo -c -o src/data/src_data_libdata_la-spreadsheet-reader.lo `test -f 'src/data/spreadsheet-reader.c' || echo '$(srcdir)/'`src/data/spreadsheet-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-spreadsheet-reader.Tpo src/data/$(DEPDIR)/src_data_libdata_la-spreadsheet-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/spreadsheet-reader.c' object='src/data/src_data_libdata_la-spreadsheet-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-spreadsheet-reader.lo `test -f 'src/data/spreadsheet-reader.c' || echo '$(srcdir)/'`src/data/spreadsheet-reader.c src/data/src_data_libdata_la-subcase.lo: src/data/subcase.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-subcase.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-subcase.Tpo -c -o src/data/src_data_libdata_la-subcase.lo `test -f 'src/data/subcase.c' || echo '$(srcdir)/'`src/data/subcase.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-subcase.Tpo src/data/$(DEPDIR)/src_data_libdata_la-subcase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/subcase.c' object='src/data/src_data_libdata_la-subcase.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-subcase.lo `test -f 'src/data/subcase.c' || echo '$(srcdir)/'`src/data/subcase.c src/data/src_data_libdata_la-sys-file-encoding.lo: src/data/sys-file-encoding.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-sys-file-encoding.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-sys-file-encoding.Tpo -c -o src/data/src_data_libdata_la-sys-file-encoding.lo `test -f 'src/data/sys-file-encoding.c' || echo '$(srcdir)/'`src/data/sys-file-encoding.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-sys-file-encoding.Tpo src/data/$(DEPDIR)/src_data_libdata_la-sys-file-encoding.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/sys-file-encoding.c' object='src/data/src_data_libdata_la-sys-file-encoding.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-sys-file-encoding.lo `test -f 'src/data/sys-file-encoding.c' || echo '$(srcdir)/'`src/data/sys-file-encoding.c src/data/src_data_libdata_la-sys-file-private.lo: src/data/sys-file-private.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-sys-file-private.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-sys-file-private.Tpo -c -o src/data/src_data_libdata_la-sys-file-private.lo `test -f 'src/data/sys-file-private.c' || echo '$(srcdir)/'`src/data/sys-file-private.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-sys-file-private.Tpo src/data/$(DEPDIR)/src_data_libdata_la-sys-file-private.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/sys-file-private.c' object='src/data/src_data_libdata_la-sys-file-private.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-sys-file-private.lo `test -f 'src/data/sys-file-private.c' || echo '$(srcdir)/'`src/data/sys-file-private.c src/data/src_data_libdata_la-sys-file-reader.lo: src/data/sys-file-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-sys-file-reader.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-sys-file-reader.Tpo -c -o src/data/src_data_libdata_la-sys-file-reader.lo `test -f 'src/data/sys-file-reader.c' || echo '$(srcdir)/'`src/data/sys-file-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-sys-file-reader.Tpo src/data/$(DEPDIR)/src_data_libdata_la-sys-file-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/sys-file-reader.c' object='src/data/src_data_libdata_la-sys-file-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-sys-file-reader.lo `test -f 'src/data/sys-file-reader.c' || echo '$(srcdir)/'`src/data/sys-file-reader.c src/data/src_data_libdata_la-sys-file-writer.lo: src/data/sys-file-writer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-sys-file-writer.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-sys-file-writer.Tpo -c -o src/data/src_data_libdata_la-sys-file-writer.lo `test -f 'src/data/sys-file-writer.c' || echo '$(srcdir)/'`src/data/sys-file-writer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-sys-file-writer.Tpo src/data/$(DEPDIR)/src_data_libdata_la-sys-file-writer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/sys-file-writer.c' object='src/data/src_data_libdata_la-sys-file-writer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-sys-file-writer.lo `test -f 'src/data/sys-file-writer.c' || echo '$(srcdir)/'`src/data/sys-file-writer.c src/data/src_data_libdata_la-transformations.lo: src/data/transformations.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-transformations.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-transformations.Tpo -c -o src/data/src_data_libdata_la-transformations.lo `test -f 'src/data/transformations.c' || echo '$(srcdir)/'`src/data/transformations.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-transformations.Tpo src/data/$(DEPDIR)/src_data_libdata_la-transformations.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/transformations.c' object='src/data/src_data_libdata_la-transformations.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-transformations.lo `test -f 'src/data/transformations.c' || echo '$(srcdir)/'`src/data/transformations.c src/data/src_data_libdata_la-value.lo: src/data/value.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-value.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-value.Tpo -c -o src/data/src_data_libdata_la-value.lo `test -f 'src/data/value.c' || echo '$(srcdir)/'`src/data/value.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-value.Tpo src/data/$(DEPDIR)/src_data_libdata_la-value.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/value.c' object='src/data/src_data_libdata_la-value.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-value.lo `test -f 'src/data/value.c' || echo '$(srcdir)/'`src/data/value.c src/data/src_data_libdata_la-value-labels.lo: src/data/value-labels.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-value-labels.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-value-labels.Tpo -c -o src/data/src_data_libdata_la-value-labels.lo `test -f 'src/data/value-labels.c' || echo '$(srcdir)/'`src/data/value-labels.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-value-labels.Tpo src/data/$(DEPDIR)/src_data_libdata_la-value-labels.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/value-labels.c' object='src/data/src_data_libdata_la-value-labels.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-value-labels.lo `test -f 'src/data/value-labels.c' || echo '$(srcdir)/'`src/data/value-labels.c src/data/src_data_libdata_la-variable.lo: src/data/variable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-variable.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-variable.Tpo -c -o src/data/src_data_libdata_la-variable.lo `test -f 'src/data/variable.c' || echo '$(srcdir)/'`src/data/variable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-variable.Tpo src/data/$(DEPDIR)/src_data_libdata_la-variable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/variable.c' object='src/data/src_data_libdata_la-variable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-variable.lo `test -f 'src/data/variable.c' || echo '$(srcdir)/'`src/data/variable.c src/data/src_data_libdata_la-vector.lo: src/data/vector.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/data/src_data_libdata_la-vector.lo -MD -MP -MF src/data/$(DEPDIR)/src_data_libdata_la-vector.Tpo -c -o src/data/src_data_libdata_la-vector.lo `test -f 'src/data/vector.c' || echo '$(srcdir)/'`src/data/vector.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/src_data_libdata_la-vector.Tpo src/data/$(DEPDIR)/src_data_libdata_la-vector.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/vector.c' object='src/data/src_data_libdata_la-vector.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_data_libdata_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/data/src_data_libdata_la-vector.lo `test -f 'src/data/vector.c' || echo '$(srcdir)/'`src/data/vector.c src/libpspp/src_libpspp_liblibpspp_la-abt.lo: src/libpspp/abt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-abt.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-abt.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-abt.lo `test -f 'src/libpspp/abt.c' || echo '$(srcdir)/'`src/libpspp/abt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-abt.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-abt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/abt.c' object='src/libpspp/src_libpspp_liblibpspp_la-abt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-abt.lo `test -f 'src/libpspp/abt.c' || echo '$(srcdir)/'`src/libpspp/abt.c src/libpspp/src_libpspp_liblibpspp_la-argv-parser.lo: src/libpspp/argv-parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-argv-parser.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-argv-parser.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-argv-parser.lo `test -f 'src/libpspp/argv-parser.c' || echo '$(srcdir)/'`src/libpspp/argv-parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-argv-parser.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-argv-parser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/argv-parser.c' object='src/libpspp/src_libpspp_liblibpspp_la-argv-parser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-argv-parser.lo `test -f 'src/libpspp/argv-parser.c' || echo '$(srcdir)/'`src/libpspp/argv-parser.c src/libpspp/src_libpspp_liblibpspp_la-array.lo: src/libpspp/array.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-array.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-array.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-array.lo `test -f 'src/libpspp/array.c' || echo '$(srcdir)/'`src/libpspp/array.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-array.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-array.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/array.c' object='src/libpspp/src_libpspp_liblibpspp_la-array.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-array.lo `test -f 'src/libpspp/array.c' || echo '$(srcdir)/'`src/libpspp/array.c src/libpspp/src_libpspp_liblibpspp_la-bt.lo: src/libpspp/bt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-bt.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-bt.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-bt.lo `test -f 'src/libpspp/bt.c' || echo '$(srcdir)/'`src/libpspp/bt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-bt.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-bt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/bt.c' object='src/libpspp/src_libpspp_liblibpspp_la-bt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-bt.lo `test -f 'src/libpspp/bt.c' || echo '$(srcdir)/'`src/libpspp/bt.c src/libpspp/src_libpspp_liblibpspp_la-cmac-aes256.lo: src/libpspp/cmac-aes256.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-cmac-aes256.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-cmac-aes256.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-cmac-aes256.lo `test -f 'src/libpspp/cmac-aes256.c' || echo '$(srcdir)/'`src/libpspp/cmac-aes256.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-cmac-aes256.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-cmac-aes256.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/cmac-aes256.c' object='src/libpspp/src_libpspp_liblibpspp_la-cmac-aes256.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-cmac-aes256.lo `test -f 'src/libpspp/cmac-aes256.c' || echo '$(srcdir)/'`src/libpspp/cmac-aes256.c src/libpspp/src_libpspp_liblibpspp_la-copyleft.lo: src/libpspp/copyleft.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-copyleft.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-copyleft.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-copyleft.lo `test -f 'src/libpspp/copyleft.c' || echo '$(srcdir)/'`src/libpspp/copyleft.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-copyleft.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-copyleft.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/copyleft.c' object='src/libpspp/src_libpspp_liblibpspp_la-copyleft.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-copyleft.lo `test -f 'src/libpspp/copyleft.c' || echo '$(srcdir)/'`src/libpspp/copyleft.c src/libpspp/src_libpspp_liblibpspp_la-deque.lo: src/libpspp/deque.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-deque.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-deque.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-deque.lo `test -f 'src/libpspp/deque.c' || echo '$(srcdir)/'`src/libpspp/deque.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-deque.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-deque.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/deque.c' object='src/libpspp/src_libpspp_liblibpspp_la-deque.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-deque.lo `test -f 'src/libpspp/deque.c' || echo '$(srcdir)/'`src/libpspp/deque.c src/libpspp/src_libpspp_liblibpspp_la-encoding-guesser.lo: src/libpspp/encoding-guesser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-encoding-guesser.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-encoding-guesser.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-encoding-guesser.lo `test -f 'src/libpspp/encoding-guesser.c' || echo '$(srcdir)/'`src/libpspp/encoding-guesser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-encoding-guesser.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-encoding-guesser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/encoding-guesser.c' object='src/libpspp/src_libpspp_liblibpspp_la-encoding-guesser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-encoding-guesser.lo `test -f 'src/libpspp/encoding-guesser.c' || echo '$(srcdir)/'`src/libpspp/encoding-guesser.c src/libpspp/src_libpspp_liblibpspp_la-ext-array.lo: src/libpspp/ext-array.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-ext-array.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-ext-array.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-ext-array.lo `test -f 'src/libpspp/ext-array.c' || echo '$(srcdir)/'`src/libpspp/ext-array.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-ext-array.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-ext-array.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/ext-array.c' object='src/libpspp/src_libpspp_liblibpspp_la-ext-array.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-ext-array.lo `test -f 'src/libpspp/ext-array.c' || echo '$(srcdir)/'`src/libpspp/ext-array.c src/libpspp/src_libpspp_liblibpspp_la-float-format.lo: src/libpspp/float-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-float-format.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-float-format.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-float-format.lo `test -f 'src/libpspp/float-format.c' || echo '$(srcdir)/'`src/libpspp/float-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-float-format.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-float-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/float-format.c' object='src/libpspp/src_libpspp_liblibpspp_la-float-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-float-format.lo `test -f 'src/libpspp/float-format.c' || echo '$(srcdir)/'`src/libpspp/float-format.c src/libpspp/src_libpspp_liblibpspp_la-freaderror.lo: src/libpspp/freaderror.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-freaderror.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-freaderror.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-freaderror.lo `test -f 'src/libpspp/freaderror.c' || echo '$(srcdir)/'`src/libpspp/freaderror.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-freaderror.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-freaderror.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/freaderror.c' object='src/libpspp/src_libpspp_liblibpspp_la-freaderror.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-freaderror.lo `test -f 'src/libpspp/freaderror.c' || echo '$(srcdir)/'`src/libpspp/freaderror.c src/libpspp/src_libpspp_liblibpspp_la-hash-functions.lo: src/libpspp/hash-functions.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-hash-functions.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hash-functions.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-hash-functions.lo `test -f 'src/libpspp/hash-functions.c' || echo '$(srcdir)/'`src/libpspp/hash-functions.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hash-functions.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hash-functions.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hash-functions.c' object='src/libpspp/src_libpspp_liblibpspp_la-hash-functions.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-hash-functions.lo `test -f 'src/libpspp/hash-functions.c' || echo '$(srcdir)/'`src/libpspp/hash-functions.c src/libpspp/src_libpspp_liblibpspp_la-inflate.lo: src/libpspp/inflate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-inflate.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-inflate.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-inflate.lo `test -f 'src/libpspp/inflate.c' || echo '$(srcdir)/'`src/libpspp/inflate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-inflate.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-inflate.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/inflate.c' object='src/libpspp/src_libpspp_liblibpspp_la-inflate.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-inflate.lo `test -f 'src/libpspp/inflate.c' || echo '$(srcdir)/'`src/libpspp/inflate.c src/libpspp/src_libpspp_liblibpspp_la-heap.lo: src/libpspp/heap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-heap.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-heap.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-heap.lo `test -f 'src/libpspp/heap.c' || echo '$(srcdir)/'`src/libpspp/heap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-heap.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-heap.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/heap.c' object='src/libpspp/src_libpspp_liblibpspp_la-heap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-heap.lo `test -f 'src/libpspp/heap.c' || echo '$(srcdir)/'`src/libpspp/heap.c src/libpspp/src_libpspp_liblibpspp_la-hmap.lo: src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-hmap.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hmap.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-hmap.lo `test -f 'src/libpspp/hmap.c' || echo '$(srcdir)/'`src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hmap.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hmap.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hmap.c' object='src/libpspp/src_libpspp_liblibpspp_la-hmap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-hmap.lo `test -f 'src/libpspp/hmap.c' || echo '$(srcdir)/'`src/libpspp/hmap.c src/libpspp/src_libpspp_liblibpspp_la-hmapx.lo: src/libpspp/hmapx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-hmapx.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hmapx.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-hmapx.lo `test -f 'src/libpspp/hmapx.c' || echo '$(srcdir)/'`src/libpspp/hmapx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hmapx.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-hmapx.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hmapx.c' object='src/libpspp/src_libpspp_liblibpspp_la-hmapx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-hmapx.lo `test -f 'src/libpspp/hmapx.c' || echo '$(srcdir)/'`src/libpspp/hmapx.c src/libpspp/src_libpspp_liblibpspp_la-i18n.lo: src/libpspp/i18n.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-i18n.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-i18n.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-i18n.lo `test -f 'src/libpspp/i18n.c' || echo '$(srcdir)/'`src/libpspp/i18n.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-i18n.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-i18n.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/i18n.c' object='src/libpspp/src_libpspp_liblibpspp_la-i18n.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-i18n.lo `test -f 'src/libpspp/i18n.c' || echo '$(srcdir)/'`src/libpspp/i18n.c src/libpspp/src_libpspp_liblibpspp_la-integer-format.lo: src/libpspp/integer-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-integer-format.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-integer-format.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-integer-format.lo `test -f 'src/libpspp/integer-format.c' || echo '$(srcdir)/'`src/libpspp/integer-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-integer-format.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-integer-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/integer-format.c' object='src/libpspp/src_libpspp_liblibpspp_la-integer-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-integer-format.lo `test -f 'src/libpspp/integer-format.c' || echo '$(srcdir)/'`src/libpspp/integer-format.c src/libpspp/src_libpspp_liblibpspp_la-intern.lo: src/libpspp/intern.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-intern.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-intern.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-intern.lo `test -f 'src/libpspp/intern.c' || echo '$(srcdir)/'`src/libpspp/intern.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-intern.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-intern.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/intern.c' object='src/libpspp/src_libpspp_liblibpspp_la-intern.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-intern.lo `test -f 'src/libpspp/intern.c' || echo '$(srcdir)/'`src/libpspp/intern.c src/libpspp/src_libpspp_liblibpspp_la-line-reader.lo: src/libpspp/line-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-line-reader.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-line-reader.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-line-reader.lo `test -f 'src/libpspp/line-reader.c' || echo '$(srcdir)/'`src/libpspp/line-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-line-reader.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-line-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/line-reader.c' object='src/libpspp/src_libpspp_liblibpspp_la-line-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-line-reader.lo `test -f 'src/libpspp/line-reader.c' || echo '$(srcdir)/'`src/libpspp/line-reader.c src/libpspp/src_libpspp_liblibpspp_la-ll.lo: src/libpspp/ll.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-ll.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-ll.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-ll.lo `test -f 'src/libpspp/ll.c' || echo '$(srcdir)/'`src/libpspp/ll.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-ll.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-ll.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/ll.c' object='src/libpspp/src_libpspp_liblibpspp_la-ll.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-ll.lo `test -f 'src/libpspp/ll.c' || echo '$(srcdir)/'`src/libpspp/ll.c src/libpspp/src_libpspp_liblibpspp_la-llx.lo: src/libpspp/llx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-llx.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-llx.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-llx.lo `test -f 'src/libpspp/llx.c' || echo '$(srcdir)/'`src/libpspp/llx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-llx.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-llx.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/llx.c' object='src/libpspp/src_libpspp_liblibpspp_la-llx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-llx.lo `test -f 'src/libpspp/llx.c' || echo '$(srcdir)/'`src/libpspp/llx.c src/libpspp/src_libpspp_liblibpspp_la-message.lo: src/libpspp/message.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-message.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-message.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-message.lo `test -f 'src/libpspp/message.c' || echo '$(srcdir)/'`src/libpspp/message.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-message.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-message.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/message.c' object='src/libpspp/src_libpspp_liblibpspp_la-message.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-message.lo `test -f 'src/libpspp/message.c' || echo '$(srcdir)/'`src/libpspp/message.c src/libpspp/src_libpspp_liblibpspp_la-misc.lo: src/libpspp/misc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-misc.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-misc.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-misc.lo `test -f 'src/libpspp/misc.c' || echo '$(srcdir)/'`src/libpspp/misc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-misc.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-misc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/misc.c' object='src/libpspp/src_libpspp_liblibpspp_la-misc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-misc.lo `test -f 'src/libpspp/misc.c' || echo '$(srcdir)/'`src/libpspp/misc.c src/libpspp/src_libpspp_liblibpspp_la-model-checker.lo: src/libpspp/model-checker.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-model-checker.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-model-checker.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-model-checker.lo `test -f 'src/libpspp/model-checker.c' || echo '$(srcdir)/'`src/libpspp/model-checker.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-model-checker.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-model-checker.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/model-checker.c' object='src/libpspp/src_libpspp_liblibpspp_la-model-checker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-model-checker.lo `test -f 'src/libpspp/model-checker.c' || echo '$(srcdir)/'`src/libpspp/model-checker.c src/libpspp/src_libpspp_liblibpspp_la-pool.lo: src/libpspp/pool.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-pool.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-pool.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-pool.lo `test -f 'src/libpspp/pool.c' || echo '$(srcdir)/'`src/libpspp/pool.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-pool.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-pool.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/pool.c' object='src/libpspp/src_libpspp_liblibpspp_la-pool.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-pool.lo `test -f 'src/libpspp/pool.c' || echo '$(srcdir)/'`src/libpspp/pool.c src/libpspp/src_libpspp_liblibpspp_la-prompt.lo: src/libpspp/prompt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-prompt.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-prompt.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-prompt.lo `test -f 'src/libpspp/prompt.c' || echo '$(srcdir)/'`src/libpspp/prompt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-prompt.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-prompt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/prompt.c' object='src/libpspp/src_libpspp_liblibpspp_la-prompt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-prompt.lo `test -f 'src/libpspp/prompt.c' || echo '$(srcdir)/'`src/libpspp/prompt.c src/libpspp/src_libpspp_liblibpspp_la-range-map.lo: src/libpspp/range-map.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-range-map.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-map.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-range-map.lo `test -f 'src/libpspp/range-map.c' || echo '$(srcdir)/'`src/libpspp/range-map.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-map.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-map.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/range-map.c' object='src/libpspp/src_libpspp_liblibpspp_la-range-map.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-range-map.lo `test -f 'src/libpspp/range-map.c' || echo '$(srcdir)/'`src/libpspp/range-map.c src/libpspp/src_libpspp_liblibpspp_la-range-set.lo: src/libpspp/range-set.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-range-set.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-set.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-range-set.lo `test -f 'src/libpspp/range-set.c' || echo '$(srcdir)/'`src/libpspp/range-set.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-set.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-set.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/range-set.c' object='src/libpspp/src_libpspp_liblibpspp_la-range-set.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-range-set.lo `test -f 'src/libpspp/range-set.c' || echo '$(srcdir)/'`src/libpspp/range-set.c src/libpspp/src_libpspp_liblibpspp_la-range-tower.lo: src/libpspp/range-tower.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-range-tower.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-tower.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-range-tower.lo `test -f 'src/libpspp/range-tower.c' || echo '$(srcdir)/'`src/libpspp/range-tower.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-tower.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-range-tower.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/range-tower.c' object='src/libpspp/src_libpspp_liblibpspp_la-range-tower.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-range-tower.lo `test -f 'src/libpspp/range-tower.c' || echo '$(srcdir)/'`src/libpspp/range-tower.c src/libpspp/src_libpspp_liblibpspp_la-sparse-array.lo: src/libpspp/sparse-array.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-sparse-array.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-sparse-array.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-sparse-array.lo `test -f 'src/libpspp/sparse-array.c' || echo '$(srcdir)/'`src/libpspp/sparse-array.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-sparse-array.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-sparse-array.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/sparse-array.c' object='src/libpspp/src_libpspp_liblibpspp_la-sparse-array.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-sparse-array.lo `test -f 'src/libpspp/sparse-array.c' || echo '$(srcdir)/'`src/libpspp/sparse-array.c src/libpspp/src_libpspp_liblibpspp_la-sparse-xarray.lo: src/libpspp/sparse-xarray.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-sparse-xarray.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-sparse-xarray.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-sparse-xarray.lo `test -f 'src/libpspp/sparse-xarray.c' || echo '$(srcdir)/'`src/libpspp/sparse-xarray.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-sparse-xarray.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-sparse-xarray.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/sparse-xarray.c' object='src/libpspp/src_libpspp_liblibpspp_la-sparse-xarray.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-sparse-xarray.lo `test -f 'src/libpspp/sparse-xarray.c' || echo '$(srcdir)/'`src/libpspp/sparse-xarray.c src/libpspp/src_libpspp_liblibpspp_la-start-date.lo: src/libpspp/start-date.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-start-date.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-start-date.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-start-date.lo `test -f 'src/libpspp/start-date.c' || echo '$(srcdir)/'`src/libpspp/start-date.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-start-date.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-start-date.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/start-date.c' object='src/libpspp/src_libpspp_liblibpspp_la-start-date.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-start-date.lo `test -f 'src/libpspp/start-date.c' || echo '$(srcdir)/'`src/libpspp/start-date.c src/libpspp/src_libpspp_liblibpspp_la-string-array.lo: src/libpspp/string-array.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-string-array.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-array.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-string-array.lo `test -f 'src/libpspp/string-array.c' || echo '$(srcdir)/'`src/libpspp/string-array.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-array.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-array.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/string-array.c' object='src/libpspp/src_libpspp_liblibpspp_la-string-array.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-string-array.lo `test -f 'src/libpspp/string-array.c' || echo '$(srcdir)/'`src/libpspp/string-array.c src/libpspp/src_libpspp_liblibpspp_la-string-map.lo: src/libpspp/string-map.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-string-map.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-map.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-string-map.lo `test -f 'src/libpspp/string-map.c' || echo '$(srcdir)/'`src/libpspp/string-map.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-map.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-map.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/string-map.c' object='src/libpspp/src_libpspp_liblibpspp_la-string-map.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-string-map.lo `test -f 'src/libpspp/string-map.c' || echo '$(srcdir)/'`src/libpspp/string-map.c src/libpspp/src_libpspp_liblibpspp_la-string-set.lo: src/libpspp/string-set.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-string-set.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-set.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-string-set.lo `test -f 'src/libpspp/string-set.c' || echo '$(srcdir)/'`src/libpspp/string-set.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-set.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-string-set.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/string-set.c' object='src/libpspp/src_libpspp_liblibpspp_la-string-set.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-string-set.lo `test -f 'src/libpspp/string-set.c' || echo '$(srcdir)/'`src/libpspp/string-set.c src/libpspp/src_libpspp_liblibpspp_la-stringi-map.lo: src/libpspp/stringi-map.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-stringi-map.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-stringi-map.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-stringi-map.lo `test -f 'src/libpspp/stringi-map.c' || echo '$(srcdir)/'`src/libpspp/stringi-map.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-stringi-map.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-stringi-map.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/stringi-map.c' object='src/libpspp/src_libpspp_liblibpspp_la-stringi-map.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-stringi-map.lo `test -f 'src/libpspp/stringi-map.c' || echo '$(srcdir)/'`src/libpspp/stringi-map.c src/libpspp/src_libpspp_liblibpspp_la-stringi-set.lo: src/libpspp/stringi-set.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-stringi-set.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-stringi-set.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-stringi-set.lo `test -f 'src/libpspp/stringi-set.c' || echo '$(srcdir)/'`src/libpspp/stringi-set.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-stringi-set.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-stringi-set.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/stringi-set.c' object='src/libpspp/src_libpspp_liblibpspp_la-stringi-set.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-stringi-set.lo `test -f 'src/libpspp/stringi-set.c' || echo '$(srcdir)/'`src/libpspp/stringi-set.c src/libpspp/src_libpspp_liblibpspp_la-str.lo: src/libpspp/str.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-str.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-str.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-str.lo `test -f 'src/libpspp/str.c' || echo '$(srcdir)/'`src/libpspp/str.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-str.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-str.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/str.c' object='src/libpspp/src_libpspp_liblibpspp_la-str.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-str.lo `test -f 'src/libpspp/str.c' || echo '$(srcdir)/'`src/libpspp/str.c src/libpspp/src_libpspp_liblibpspp_la-taint.lo: src/libpspp/taint.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-taint.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-taint.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-taint.lo `test -f 'src/libpspp/taint.c' || echo '$(srcdir)/'`src/libpspp/taint.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-taint.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-taint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/taint.c' object='src/libpspp/src_libpspp_liblibpspp_la-taint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-taint.lo `test -f 'src/libpspp/taint.c' || echo '$(srcdir)/'`src/libpspp/taint.c src/libpspp/src_libpspp_liblibpspp_la-temp-file.lo: src/libpspp/temp-file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-temp-file.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-temp-file.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-temp-file.lo `test -f 'src/libpspp/temp-file.c' || echo '$(srcdir)/'`src/libpspp/temp-file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-temp-file.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-temp-file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/temp-file.c' object='src/libpspp/src_libpspp_liblibpspp_la-temp-file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-temp-file.lo `test -f 'src/libpspp/temp-file.c' || echo '$(srcdir)/'`src/libpspp/temp-file.c src/libpspp/src_libpspp_liblibpspp_la-tower.lo: src/libpspp/tower.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-tower.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-tower.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-tower.lo `test -f 'src/libpspp/tower.c' || echo '$(srcdir)/'`src/libpspp/tower.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-tower.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-tower.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/tower.c' object='src/libpspp/src_libpspp_liblibpspp_la-tower.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-tower.lo `test -f 'src/libpspp/tower.c' || echo '$(srcdir)/'`src/libpspp/tower.c src/libpspp/src_libpspp_liblibpspp_la-u8-istream.lo: src/libpspp/u8-istream.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-u8-istream.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-u8-istream.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-u8-istream.lo `test -f 'src/libpspp/u8-istream.c' || echo '$(srcdir)/'`src/libpspp/u8-istream.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-u8-istream.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-u8-istream.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/u8-istream.c' object='src/libpspp/src_libpspp_liblibpspp_la-u8-istream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-u8-istream.lo `test -f 'src/libpspp/u8-istream.c' || echo '$(srcdir)/'`src/libpspp/u8-istream.c src/libpspp/src_libpspp_liblibpspp_la-u8-line.lo: src/libpspp/u8-line.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-u8-line.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-u8-line.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-u8-line.lo `test -f 'src/libpspp/u8-line.c' || echo '$(srcdir)/'`src/libpspp/u8-line.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-u8-line.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-u8-line.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/u8-line.c' object='src/libpspp/src_libpspp_liblibpspp_la-u8-line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-u8-line.lo `test -f 'src/libpspp/u8-line.c' || echo '$(srcdir)/'`src/libpspp/u8-line.c src/libpspp/src_libpspp_liblibpspp_la-zip-reader.lo: src/libpspp/zip-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-zip-reader.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-zip-reader.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-zip-reader.lo `test -f 'src/libpspp/zip-reader.c' || echo '$(srcdir)/'`src/libpspp/zip-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-zip-reader.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-zip-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/zip-reader.c' object='src/libpspp/src_libpspp_liblibpspp_la-zip-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-zip-reader.lo `test -f 'src/libpspp/zip-reader.c' || echo '$(srcdir)/'`src/libpspp/zip-reader.c src/libpspp/src_libpspp_liblibpspp_la-zip-writer.lo: src/libpspp/zip-writer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-zip-writer.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-zip-writer.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-zip-writer.lo `test -f 'src/libpspp/zip-writer.c' || echo '$(srcdir)/'`src/libpspp/zip-writer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-zip-writer.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-zip-writer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/zip-writer.c' object='src/libpspp/src_libpspp_liblibpspp_la-zip-writer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-zip-writer.lo `test -f 'src/libpspp/zip-writer.c' || echo '$(srcdir)/'`src/libpspp/zip-writer.c src/libpspp/src_libpspp_liblibpspp_la-version.lo: src/libpspp/version.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/src_libpspp_liblibpspp_la-version.lo -MD -MP -MF src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-version.Tpo -c -o src/libpspp/src_libpspp_liblibpspp_la-version.lo `test -f 'src/libpspp/version.c' || echo '$(srcdir)/'`src/libpspp/version.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-version.Tpo src/libpspp/$(DEPDIR)/src_libpspp_liblibpspp_la-version.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/version.c' object='src/libpspp/src_libpspp_liblibpspp_la-version.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_libpspp_liblibpspp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/src_libpspp_liblibpspp_la-version.lo `test -f 'src/libpspp/version.c' || echo '$(srcdir)/'`src/libpspp/version.c src/output/src_output_liboutput_la-ascii.lo: src/output/ascii.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-ascii.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-ascii.Tpo -c -o src/output/src_output_liboutput_la-ascii.lo `test -f 'src/output/ascii.c' || echo '$(srcdir)/'`src/output/ascii.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-ascii.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-ascii.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/ascii.c' object='src/output/src_output_liboutput_la-ascii.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-ascii.lo `test -f 'src/output/ascii.c' || echo '$(srcdir)/'`src/output/ascii.c src/output/src_output_liboutput_la-chart-item.lo: src/output/chart-item.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-chart-item.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-chart-item.Tpo -c -o src/output/src_output_liboutput_la-chart-item.lo `test -f 'src/output/chart-item.c' || echo '$(srcdir)/'`src/output/chart-item.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-chart-item.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-chart-item.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/chart-item.c' object='src/output/src_output_liboutput_la-chart-item.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-chart-item.lo `test -f 'src/output/chart-item.c' || echo '$(srcdir)/'`src/output/chart-item.c src/output/charts/src_output_liboutput_la-boxplot.lo: src/output/charts/boxplot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-boxplot.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-boxplot.Tpo -c -o src/output/charts/src_output_liboutput_la-boxplot.lo `test -f 'src/output/charts/boxplot.c' || echo '$(srcdir)/'`src/output/charts/boxplot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-boxplot.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-boxplot.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/boxplot.c' object='src/output/charts/src_output_liboutput_la-boxplot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-boxplot.lo `test -f 'src/output/charts/boxplot.c' || echo '$(srcdir)/'`src/output/charts/boxplot.c src/output/charts/src_output_liboutput_la-np-plot.lo: src/output/charts/np-plot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-np-plot.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-np-plot.Tpo -c -o src/output/charts/src_output_liboutput_la-np-plot.lo `test -f 'src/output/charts/np-plot.c' || echo '$(srcdir)/'`src/output/charts/np-plot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-np-plot.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-np-plot.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/np-plot.c' object='src/output/charts/src_output_liboutput_la-np-plot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-np-plot.lo `test -f 'src/output/charts/np-plot.c' || echo '$(srcdir)/'`src/output/charts/np-plot.c src/output/charts/src_output_liboutput_la-barchart.lo: src/output/charts/barchart.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-barchart.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-barchart.Tpo -c -o src/output/charts/src_output_liboutput_la-barchart.lo `test -f 'src/output/charts/barchart.c' || echo '$(srcdir)/'`src/output/charts/barchart.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-barchart.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-barchart.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/barchart.c' object='src/output/charts/src_output_liboutput_la-barchart.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-barchart.lo `test -f 'src/output/charts/barchart.c' || echo '$(srcdir)/'`src/output/charts/barchart.c src/output/charts/src_output_liboutput_la-piechart.lo: src/output/charts/piechart.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-piechart.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-piechart.Tpo -c -o src/output/charts/src_output_liboutput_la-piechart.lo `test -f 'src/output/charts/piechart.c' || echo '$(srcdir)/'`src/output/charts/piechart.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-piechart.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-piechart.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/piechart.c' object='src/output/charts/src_output_liboutput_la-piechart.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-piechart.lo `test -f 'src/output/charts/piechart.c' || echo '$(srcdir)/'`src/output/charts/piechart.c src/output/charts/src_output_liboutput_la-plot-hist.lo: src/output/charts/plot-hist.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-plot-hist.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-plot-hist.Tpo -c -o src/output/charts/src_output_liboutput_la-plot-hist.lo `test -f 'src/output/charts/plot-hist.c' || echo '$(srcdir)/'`src/output/charts/plot-hist.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-plot-hist.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-plot-hist.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/plot-hist.c' object='src/output/charts/src_output_liboutput_la-plot-hist.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-plot-hist.lo `test -f 'src/output/charts/plot-hist.c' || echo '$(srcdir)/'`src/output/charts/plot-hist.c src/output/charts/src_output_liboutput_la-roc-chart.lo: src/output/charts/roc-chart.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-roc-chart.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-roc-chart.Tpo -c -o src/output/charts/src_output_liboutput_la-roc-chart.lo `test -f 'src/output/charts/roc-chart.c' || echo '$(srcdir)/'`src/output/charts/roc-chart.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-roc-chart.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-roc-chart.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/roc-chart.c' object='src/output/charts/src_output_liboutput_la-roc-chart.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-roc-chart.lo `test -f 'src/output/charts/roc-chart.c' || echo '$(srcdir)/'`src/output/charts/roc-chart.c src/output/charts/src_output_liboutput_la-spreadlevel-plot.lo: src/output/charts/spreadlevel-plot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-spreadlevel-plot.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-spreadlevel-plot.Tpo -c -o src/output/charts/src_output_liboutput_la-spreadlevel-plot.lo `test -f 'src/output/charts/spreadlevel-plot.c' || echo '$(srcdir)/'`src/output/charts/spreadlevel-plot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-spreadlevel-plot.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-spreadlevel-plot.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/spreadlevel-plot.c' object='src/output/charts/src_output_liboutput_la-spreadlevel-plot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-spreadlevel-plot.lo `test -f 'src/output/charts/spreadlevel-plot.c' || echo '$(srcdir)/'`src/output/charts/spreadlevel-plot.c src/output/charts/src_output_liboutput_la-scree.lo: src/output/charts/scree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-scree.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-scree.Tpo -c -o src/output/charts/src_output_liboutput_la-scree.lo `test -f 'src/output/charts/scree.c' || echo '$(srcdir)/'`src/output/charts/scree.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-scree.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-scree.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/scree.c' object='src/output/charts/src_output_liboutput_la-scree.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-scree.lo `test -f 'src/output/charts/scree.c' || echo '$(srcdir)/'`src/output/charts/scree.c src/output/charts/src_output_liboutput_la-scatterplot.lo: src/output/charts/scatterplot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-scatterplot.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-scatterplot.Tpo -c -o src/output/charts/src_output_liboutput_la-scatterplot.lo `test -f 'src/output/charts/scatterplot.c' || echo '$(srcdir)/'`src/output/charts/scatterplot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-scatterplot.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-scatterplot.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/scatterplot.c' object='src/output/charts/src_output_liboutput_la-scatterplot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-scatterplot.lo `test -f 'src/output/charts/scatterplot.c' || echo '$(srcdir)/'`src/output/charts/scatterplot.c src/output/src_output_liboutput_la-csv.lo: src/output/csv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-csv.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-csv.Tpo -c -o src/output/src_output_liboutput_la-csv.lo `test -f 'src/output/csv.c' || echo '$(srcdir)/'`src/output/csv.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-csv.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-csv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/csv.c' object='src/output/src_output_liboutput_la-csv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-csv.lo `test -f 'src/output/csv.c' || echo '$(srcdir)/'`src/output/csv.c src/output/src_output_liboutput_la-driver.lo: src/output/driver.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-driver.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-driver.Tpo -c -o src/output/src_output_liboutput_la-driver.lo `test -f 'src/output/driver.c' || echo '$(srcdir)/'`src/output/driver.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-driver.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-driver.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/driver.c' object='src/output/src_output_liboutput_la-driver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-driver.lo `test -f 'src/output/driver.c' || echo '$(srcdir)/'`src/output/driver.c src/output/src_output_liboutput_la-html.lo: src/output/html.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-html.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-html.Tpo -c -o src/output/src_output_liboutput_la-html.lo `test -f 'src/output/html.c' || echo '$(srcdir)/'`src/output/html.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-html.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-html.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/html.c' object='src/output/src_output_liboutput_la-html.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-html.lo `test -f 'src/output/html.c' || echo '$(srcdir)/'`src/output/html.c src/output/src_output_liboutput_la-journal.lo: src/output/journal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-journal.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-journal.Tpo -c -o src/output/src_output_liboutput_la-journal.lo `test -f 'src/output/journal.c' || echo '$(srcdir)/'`src/output/journal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-journal.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-journal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/journal.c' object='src/output/src_output_liboutput_la-journal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-journal.lo `test -f 'src/output/journal.c' || echo '$(srcdir)/'`src/output/journal.c src/output/src_output_liboutput_la-measure.lo: src/output/measure.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-measure.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-measure.Tpo -c -o src/output/src_output_liboutput_la-measure.lo `test -f 'src/output/measure.c' || echo '$(srcdir)/'`src/output/measure.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-measure.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-measure.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/measure.c' object='src/output/src_output_liboutput_la-measure.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-measure.lo `test -f 'src/output/measure.c' || echo '$(srcdir)/'`src/output/measure.c src/output/src_output_liboutput_la-message-item.lo: src/output/message-item.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-message-item.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-message-item.Tpo -c -o src/output/src_output_liboutput_la-message-item.lo `test -f 'src/output/message-item.c' || echo '$(srcdir)/'`src/output/message-item.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-message-item.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-message-item.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/message-item.c' object='src/output/src_output_liboutput_la-message-item.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-message-item.lo `test -f 'src/output/message-item.c' || echo '$(srcdir)/'`src/output/message-item.c src/output/src_output_liboutput_la-msglog.lo: src/output/msglog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-msglog.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-msglog.Tpo -c -o src/output/src_output_liboutput_la-msglog.lo `test -f 'src/output/msglog.c' || echo '$(srcdir)/'`src/output/msglog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-msglog.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-msglog.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/msglog.c' object='src/output/src_output_liboutput_la-msglog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-msglog.lo `test -f 'src/output/msglog.c' || echo '$(srcdir)/'`src/output/msglog.c src/output/src_output_liboutput_la-options.lo: src/output/options.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-options.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-options.Tpo -c -o src/output/src_output_liboutput_la-options.lo `test -f 'src/output/options.c' || echo '$(srcdir)/'`src/output/options.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-options.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-options.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/options.c' object='src/output/src_output_liboutput_la-options.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-options.lo `test -f 'src/output/options.c' || echo '$(srcdir)/'`src/output/options.c src/output/src_output_liboutput_la-output-item.lo: src/output/output-item.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-output-item.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-output-item.Tpo -c -o src/output/src_output_liboutput_la-output-item.lo `test -f 'src/output/output-item.c' || echo '$(srcdir)/'`src/output/output-item.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-output-item.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-output-item.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/output-item.c' object='src/output/src_output_liboutput_la-output-item.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-output-item.lo `test -f 'src/output/output-item.c' || echo '$(srcdir)/'`src/output/output-item.c src/output/src_output_liboutput_la-render.lo: src/output/render.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-render.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-render.Tpo -c -o src/output/src_output_liboutput_la-render.lo `test -f 'src/output/render.c' || echo '$(srcdir)/'`src/output/render.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-render.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-render.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/render.c' object='src/output/src_output_liboutput_la-render.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-render.lo `test -f 'src/output/render.c' || echo '$(srcdir)/'`src/output/render.c src/output/src_output_liboutput_la-tab.lo: src/output/tab.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-tab.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-tab.Tpo -c -o src/output/src_output_liboutput_la-tab.lo `test -f 'src/output/tab.c' || echo '$(srcdir)/'`src/output/tab.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-tab.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-tab.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/tab.c' object='src/output/src_output_liboutput_la-tab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-tab.lo `test -f 'src/output/tab.c' || echo '$(srcdir)/'`src/output/tab.c src/output/src_output_liboutput_la-table-casereader.lo: src/output/table-casereader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-table-casereader.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-table-casereader.Tpo -c -o src/output/src_output_liboutput_la-table-casereader.lo `test -f 'src/output/table-casereader.c' || echo '$(srcdir)/'`src/output/table-casereader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-table-casereader.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-table-casereader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/table-casereader.c' object='src/output/src_output_liboutput_la-table-casereader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-table-casereader.lo `test -f 'src/output/table-casereader.c' || echo '$(srcdir)/'`src/output/table-casereader.c src/output/src_output_liboutput_la-table-item.lo: src/output/table-item.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-table-item.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-table-item.Tpo -c -o src/output/src_output_liboutput_la-table-item.lo `test -f 'src/output/table-item.c' || echo '$(srcdir)/'`src/output/table-item.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-table-item.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-table-item.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/table-item.c' object='src/output/src_output_liboutput_la-table-item.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-table-item.lo `test -f 'src/output/table-item.c' || echo '$(srcdir)/'`src/output/table-item.c src/output/src_output_liboutput_la-table-paste.lo: src/output/table-paste.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-table-paste.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-table-paste.Tpo -c -o src/output/src_output_liboutput_la-table-paste.lo `test -f 'src/output/table-paste.c' || echo '$(srcdir)/'`src/output/table-paste.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-table-paste.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-table-paste.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/table-paste.c' object='src/output/src_output_liboutput_la-table-paste.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-table-paste.lo `test -f 'src/output/table-paste.c' || echo '$(srcdir)/'`src/output/table-paste.c src/output/src_output_liboutput_la-table-select.lo: src/output/table-select.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-table-select.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-table-select.Tpo -c -o src/output/src_output_liboutput_la-table-select.lo `test -f 'src/output/table-select.c' || echo '$(srcdir)/'`src/output/table-select.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-table-select.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-table-select.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/table-select.c' object='src/output/src_output_liboutput_la-table-select.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-table-select.lo `test -f 'src/output/table-select.c' || echo '$(srcdir)/'`src/output/table-select.c src/output/src_output_liboutput_la-table-stomp.lo: src/output/table-stomp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-table-stomp.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-table-stomp.Tpo -c -o src/output/src_output_liboutput_la-table-stomp.lo `test -f 'src/output/table-stomp.c' || echo '$(srcdir)/'`src/output/table-stomp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-table-stomp.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-table-stomp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/table-stomp.c' object='src/output/src_output_liboutput_la-table-stomp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-table-stomp.lo `test -f 'src/output/table-stomp.c' || echo '$(srcdir)/'`src/output/table-stomp.c src/output/src_output_liboutput_la-table-transpose.lo: src/output/table-transpose.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-table-transpose.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-table-transpose.Tpo -c -o src/output/src_output_liboutput_la-table-transpose.lo `test -f 'src/output/table-transpose.c' || echo '$(srcdir)/'`src/output/table-transpose.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-table-transpose.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-table-transpose.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/table-transpose.c' object='src/output/src_output_liboutput_la-table-transpose.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-table-transpose.lo `test -f 'src/output/table-transpose.c' || echo '$(srcdir)/'`src/output/table-transpose.c src/output/src_output_liboutput_la-table.lo: src/output/table.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-table.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-table.Tpo -c -o src/output/src_output_liboutput_la-table.lo `test -f 'src/output/table.c' || echo '$(srcdir)/'`src/output/table.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-table.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-table.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/table.c' object='src/output/src_output_liboutput_la-table.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-table.lo `test -f 'src/output/table.c' || echo '$(srcdir)/'`src/output/table.c src/output/src_output_liboutput_la-text-item.lo: src/output/text-item.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-text-item.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-text-item.Tpo -c -o src/output/src_output_liboutput_la-text-item.lo `test -f 'src/output/text-item.c' || echo '$(srcdir)/'`src/output/text-item.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-text-item.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-text-item.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/text-item.c' object='src/output/src_output_liboutput_la-text-item.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-text-item.lo `test -f 'src/output/text-item.c' || echo '$(srcdir)/'`src/output/text-item.c src/output/src_output_liboutput_la-cairo-chart.lo: src/output/cairo-chart.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-cairo-chart.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-cairo-chart.Tpo -c -o src/output/src_output_liboutput_la-cairo-chart.lo `test -f 'src/output/cairo-chart.c' || echo '$(srcdir)/'`src/output/cairo-chart.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-cairo-chart.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-cairo-chart.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/cairo-chart.c' object='src/output/src_output_liboutput_la-cairo-chart.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-cairo-chart.lo `test -f 'src/output/cairo-chart.c' || echo '$(srcdir)/'`src/output/cairo-chart.c src/output/src_output_liboutput_la-cairo.lo: src/output/cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-cairo.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-cairo.Tpo -c -o src/output/src_output_liboutput_la-cairo.lo `test -f 'src/output/cairo.c' || echo '$(srcdir)/'`src/output/cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-cairo.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/cairo.c' object='src/output/src_output_liboutput_la-cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-cairo.lo `test -f 'src/output/cairo.c' || echo '$(srcdir)/'`src/output/cairo.c src/output/charts/src_output_liboutput_la-boxplot-cairo.lo: src/output/charts/boxplot-cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-boxplot-cairo.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-boxplot-cairo.Tpo -c -o src/output/charts/src_output_liboutput_la-boxplot-cairo.lo `test -f 'src/output/charts/boxplot-cairo.c' || echo '$(srcdir)/'`src/output/charts/boxplot-cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-boxplot-cairo.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-boxplot-cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/boxplot-cairo.c' object='src/output/charts/src_output_liboutput_la-boxplot-cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-boxplot-cairo.lo `test -f 'src/output/charts/boxplot-cairo.c' || echo '$(srcdir)/'`src/output/charts/boxplot-cairo.c src/output/charts/src_output_liboutput_la-np-plot-cairo.lo: src/output/charts/np-plot-cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-np-plot-cairo.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-np-plot-cairo.Tpo -c -o src/output/charts/src_output_liboutput_la-np-plot-cairo.lo `test -f 'src/output/charts/np-plot-cairo.c' || echo '$(srcdir)/'`src/output/charts/np-plot-cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-np-plot-cairo.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-np-plot-cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/np-plot-cairo.c' object='src/output/charts/src_output_liboutput_la-np-plot-cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-np-plot-cairo.lo `test -f 'src/output/charts/np-plot-cairo.c' || echo '$(srcdir)/'`src/output/charts/np-plot-cairo.c src/output/charts/src_output_liboutput_la-barchart-cairo.lo: src/output/charts/barchart-cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-barchart-cairo.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-barchart-cairo.Tpo -c -o src/output/charts/src_output_liboutput_la-barchart-cairo.lo `test -f 'src/output/charts/barchart-cairo.c' || echo '$(srcdir)/'`src/output/charts/barchart-cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-barchart-cairo.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-barchart-cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/barchart-cairo.c' object='src/output/charts/src_output_liboutput_la-barchart-cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-barchart-cairo.lo `test -f 'src/output/charts/barchart-cairo.c' || echo '$(srcdir)/'`src/output/charts/barchart-cairo.c src/output/charts/src_output_liboutput_la-piechart-cairo.lo: src/output/charts/piechart-cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-piechart-cairo.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-piechart-cairo.Tpo -c -o src/output/charts/src_output_liboutput_la-piechart-cairo.lo `test -f 'src/output/charts/piechart-cairo.c' || echo '$(srcdir)/'`src/output/charts/piechart-cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-piechart-cairo.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-piechart-cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/piechart-cairo.c' object='src/output/charts/src_output_liboutput_la-piechart-cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-piechart-cairo.lo `test -f 'src/output/charts/piechart-cairo.c' || echo '$(srcdir)/'`src/output/charts/piechart-cairo.c src/output/charts/src_output_liboutput_la-plot-hist-cairo.lo: src/output/charts/plot-hist-cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-plot-hist-cairo.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-plot-hist-cairo.Tpo -c -o src/output/charts/src_output_liboutput_la-plot-hist-cairo.lo `test -f 'src/output/charts/plot-hist-cairo.c' || echo '$(srcdir)/'`src/output/charts/plot-hist-cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-plot-hist-cairo.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-plot-hist-cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/plot-hist-cairo.c' object='src/output/charts/src_output_liboutput_la-plot-hist-cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-plot-hist-cairo.lo `test -f 'src/output/charts/plot-hist-cairo.c' || echo '$(srcdir)/'`src/output/charts/plot-hist-cairo.c src/output/charts/src_output_liboutput_la-roc-chart-cairo.lo: src/output/charts/roc-chart-cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-roc-chart-cairo.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-roc-chart-cairo.Tpo -c -o src/output/charts/src_output_liboutput_la-roc-chart-cairo.lo `test -f 'src/output/charts/roc-chart-cairo.c' || echo '$(srcdir)/'`src/output/charts/roc-chart-cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-roc-chart-cairo.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-roc-chart-cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/roc-chart-cairo.c' object='src/output/charts/src_output_liboutput_la-roc-chart-cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-roc-chart-cairo.lo `test -f 'src/output/charts/roc-chart-cairo.c' || echo '$(srcdir)/'`src/output/charts/roc-chart-cairo.c src/output/charts/src_output_liboutput_la-scree-cairo.lo: src/output/charts/scree-cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-scree-cairo.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-scree-cairo.Tpo -c -o src/output/charts/src_output_liboutput_la-scree-cairo.lo `test -f 'src/output/charts/scree-cairo.c' || echo '$(srcdir)/'`src/output/charts/scree-cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-scree-cairo.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-scree-cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/scree-cairo.c' object='src/output/charts/src_output_liboutput_la-scree-cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-scree-cairo.lo `test -f 'src/output/charts/scree-cairo.c' || echo '$(srcdir)/'`src/output/charts/scree-cairo.c src/output/charts/src_output_liboutput_la-spreadlevel-cairo.lo: src/output/charts/spreadlevel-cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-spreadlevel-cairo.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-spreadlevel-cairo.Tpo -c -o src/output/charts/src_output_liboutput_la-spreadlevel-cairo.lo `test -f 'src/output/charts/spreadlevel-cairo.c' || echo '$(srcdir)/'`src/output/charts/spreadlevel-cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-spreadlevel-cairo.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-spreadlevel-cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/spreadlevel-cairo.c' object='src/output/charts/src_output_liboutput_la-spreadlevel-cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-spreadlevel-cairo.lo `test -f 'src/output/charts/spreadlevel-cairo.c' || echo '$(srcdir)/'`src/output/charts/spreadlevel-cairo.c src/output/charts/src_output_liboutput_la-scatterplot-cairo.lo: src/output/charts/scatterplot-cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/charts/src_output_liboutput_la-scatterplot-cairo.lo -MD -MP -MF src/output/charts/$(DEPDIR)/src_output_liboutput_la-scatterplot-cairo.Tpo -c -o src/output/charts/src_output_liboutput_la-scatterplot-cairo.lo `test -f 'src/output/charts/scatterplot-cairo.c' || echo '$(srcdir)/'`src/output/charts/scatterplot-cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/charts/$(DEPDIR)/src_output_liboutput_la-scatterplot-cairo.Tpo src/output/charts/$(DEPDIR)/src_output_liboutput_la-scatterplot-cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/charts/scatterplot-cairo.c' object='src/output/charts/src_output_liboutput_la-scatterplot-cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/charts/src_output_liboutput_la-scatterplot-cairo.lo `test -f 'src/output/charts/scatterplot-cairo.c' || echo '$(srcdir)/'`src/output/charts/scatterplot-cairo.c src/output/src_output_liboutput_la-odt.lo: src/output/odt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/output/src_output_liboutput_la-odt.lo -MD -MP -MF src/output/$(DEPDIR)/src_output_liboutput_la-odt.Tpo -c -o src/output/src_output_liboutput_la-odt.lo `test -f 'src/output/odt.c' || echo '$(srcdir)/'`src/output/odt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/output/$(DEPDIR)/src_output_liboutput_la-odt.Tpo src/output/$(DEPDIR)/src_output_liboutput_la-odt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/output/odt.c' object='src/output/src_output_liboutput_la-odt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_output_liboutput_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/output/src_output_liboutput_la-odt.lo `test -f 'src/output/odt.c' || echo '$(srcdir)/'`src/output/odt.c src/ui/terminal/src_ui_terminal_libui_la-main.lo: src/ui/terminal/main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_terminal_libui_la_CFLAGS) $(CFLAGS) -MT src/ui/terminal/src_ui_terminal_libui_la-main.lo -MD -MP -MF src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-main.Tpo -c -o src/ui/terminal/src_ui_terminal_libui_la-main.lo `test -f 'src/ui/terminal/main.c' || echo '$(srcdir)/'`src/ui/terminal/main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-main.Tpo src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-main.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/terminal/main.c' object='src/ui/terminal/src_ui_terminal_libui_la-main.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_terminal_libui_la_CFLAGS) $(CFLAGS) -c -o src/ui/terminal/src_ui_terminal_libui_la-main.lo `test -f 'src/ui/terminal/main.c' || echo '$(srcdir)/'`src/ui/terminal/main.c src/ui/terminal/src_ui_terminal_libui_la-terminal-opts.lo: src/ui/terminal/terminal-opts.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_terminal_libui_la_CFLAGS) $(CFLAGS) -MT src/ui/terminal/src_ui_terminal_libui_la-terminal-opts.lo -MD -MP -MF src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal-opts.Tpo -c -o src/ui/terminal/src_ui_terminal_libui_la-terminal-opts.lo `test -f 'src/ui/terminal/terminal-opts.c' || echo '$(srcdir)/'`src/ui/terminal/terminal-opts.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal-opts.Tpo src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal-opts.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/terminal/terminal-opts.c' object='src/ui/terminal/src_ui_terminal_libui_la-terminal-opts.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_terminal_libui_la_CFLAGS) $(CFLAGS) -c -o src/ui/terminal/src_ui_terminal_libui_la-terminal-opts.lo `test -f 'src/ui/terminal/terminal-opts.c' || echo '$(srcdir)/'`src/ui/terminal/terminal-opts.c src/ui/terminal/src_ui_terminal_libui_la-terminal-reader.lo: src/ui/terminal/terminal-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_terminal_libui_la_CFLAGS) $(CFLAGS) -MT src/ui/terminal/src_ui_terminal_libui_la-terminal-reader.lo -MD -MP -MF src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal-reader.Tpo -c -o src/ui/terminal/src_ui_terminal_libui_la-terminal-reader.lo `test -f 'src/ui/terminal/terminal-reader.c' || echo '$(srcdir)/'`src/ui/terminal/terminal-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal-reader.Tpo src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal-reader.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/terminal/terminal-reader.c' object='src/ui/terminal/src_ui_terminal_libui_la-terminal-reader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_terminal_libui_la_CFLAGS) $(CFLAGS) -c -o src/ui/terminal/src_ui_terminal_libui_la-terminal-reader.lo `test -f 'src/ui/terminal/terminal-reader.c' || echo '$(srcdir)/'`src/ui/terminal/terminal-reader.c src/ui/terminal/src_ui_terminal_libui_la-terminal.lo: src/ui/terminal/terminal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_terminal_libui_la_CFLAGS) $(CFLAGS) -MT src/ui/terminal/src_ui_terminal_libui_la-terminal.lo -MD -MP -MF src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal.Tpo -c -o src/ui/terminal/src_ui_terminal_libui_la-terminal.lo `test -f 'src/ui/terminal/terminal.c' || echo '$(srcdir)/'`src/ui/terminal/terminal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal.Tpo src/ui/terminal/$(DEPDIR)/src_ui_terminal_libui_la-terminal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/terminal/terminal.c' object='src/ui/terminal/src_ui_terminal_libui_la-terminal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_terminal_libui_la_CFLAGS) $(CFLAGS) -c -o src/ui/terminal/src_ui_terminal_libui_la-terminal.lo `test -f 'src/ui/terminal/terminal.c' || echo '$(srcdir)/'`src/ui/terminal/terminal.c src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.o: src/ui/gui/pspp-sheet-selection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-selection.Tpo -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.o `test -f 'src/ui/gui/pspp-sheet-selection.c' || echo '$(srcdir)/'`src/ui/gui/pspp-sheet-selection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-selection.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-selection.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/pspp-sheet-selection.c' object='src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.o `test -f 'src/ui/gui/pspp-sheet-selection.c' || echo '$(srcdir)/'`src/ui/gui/pspp-sheet-selection.c src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.obj: src/ui/gui/pspp-sheet-selection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-selection.Tpo -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.obj `if test -f 'src/ui/gui/pspp-sheet-selection.c'; then $(CYGPATH_W) 'src/ui/gui/pspp-sheet-selection.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/pspp-sheet-selection.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-selection.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-selection.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/pspp-sheet-selection.c' object='src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-selection.obj `if test -f 'src/ui/gui/pspp-sheet-selection.c'; then $(CYGPATH_W) 'src/ui/gui/pspp-sheet-selection.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/pspp-sheet-selection.c'; fi` src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.o: src/ui/gui/pspp-sheet-view-column.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view-column.Tpo -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.o `test -f 'src/ui/gui/pspp-sheet-view-column.c' || echo '$(srcdir)/'`src/ui/gui/pspp-sheet-view-column.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view-column.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view-column.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/pspp-sheet-view-column.c' object='src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.o `test -f 'src/ui/gui/pspp-sheet-view-column.c' || echo '$(srcdir)/'`src/ui/gui/pspp-sheet-view-column.c src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.obj: src/ui/gui/pspp-sheet-view-column.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view-column.Tpo -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.obj `if test -f 'src/ui/gui/pspp-sheet-view-column.c'; then $(CYGPATH_W) 'src/ui/gui/pspp-sheet-view-column.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/pspp-sheet-view-column.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view-column.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view-column.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/pspp-sheet-view-column.c' object='src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-view-column.obj `if test -f 'src/ui/gui/pspp-sheet-view-column.c'; then $(CYGPATH_W) 'src/ui/gui/pspp-sheet-view-column.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/pspp-sheet-view-column.c'; fi` src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.o: src/ui/gui/pspp-sheet-view.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view.Tpo -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.o `test -f 'src/ui/gui/pspp-sheet-view.c' || echo '$(srcdir)/'`src/ui/gui/pspp-sheet-view.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/pspp-sheet-view.c' object='src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.o `test -f 'src/ui/gui/pspp-sheet-view.c' || echo '$(srcdir)/'`src/ui/gui/pspp-sheet-view.c src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.obj: src/ui/gui/pspp-sheet-view.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view.Tpo -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.obj `if test -f 'src/ui/gui/pspp-sheet-view.c'; then $(CYGPATH_W) 'src/ui/gui/pspp-sheet-view.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/pspp-sheet-view.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-sheet-view.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/pspp-sheet-view.c' object='src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-pspp-sheet-view.obj `if test -f 'src/ui/gui/pspp-sheet-view.c'; then $(CYGPATH_W) 'src/ui/gui/pspp-sheet-view.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/pspp-sheet-view.c'; fi` src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.o: src/ui/gui/pspp-widget-facade.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-widget-facade.Tpo -c -o src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.o `test -f 'src/ui/gui/pspp-widget-facade.c' || echo '$(srcdir)/'`src/ui/gui/pspp-widget-facade.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-widget-facade.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-widget-facade.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/pspp-widget-facade.c' object='src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.o `test -f 'src/ui/gui/pspp-widget-facade.c' || echo '$(srcdir)/'`src/ui/gui/pspp-widget-facade.c src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.obj: src/ui/gui/pspp-widget-facade.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-widget-facade.Tpo -c -o src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.obj `if test -f 'src/ui/gui/pspp-widget-facade.c'; then $(CYGPATH_W) 'src/ui/gui/pspp-widget-facade.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/pspp-widget-facade.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-widget-facade.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-pspp-widget-facade.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/pspp-widget-facade.c' object='src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-pspp-widget-facade.obj `if test -f 'src/ui/gui/pspp-widget-facade.c'; then $(CYGPATH_W) 'src/ui/gui/pspp-widget-facade.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/pspp-widget-facade.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-button-editable.o: src/ui/gui/psppire-button-editable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-button-editable.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-button-editable.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-button-editable.o `test -f 'src/ui/gui/psppire-button-editable.c' || echo '$(srcdir)/'`src/ui/gui/psppire-button-editable.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-button-editable.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-button-editable.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-button-editable.c' object='src/ui/gui/src_ui_gui_psppire-psppire-button-editable.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-button-editable.o `test -f 'src/ui/gui/psppire-button-editable.c' || echo '$(srcdir)/'`src/ui/gui/psppire-button-editable.c src/ui/gui/src_ui_gui_psppire-psppire-button-editable.obj: src/ui/gui/psppire-button-editable.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-button-editable.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-button-editable.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-button-editable.obj `if test -f 'src/ui/gui/psppire-button-editable.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-button-editable.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-button-editable.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-button-editable.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-button-editable.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-button-editable.c' object='src/ui/gui/src_ui_gui_psppire-psppire-button-editable.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-button-editable.obj `if test -f 'src/ui/gui/psppire-button-editable.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-button-editable.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-button-editable.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.o: src/ui/gui/psppire-cell-renderer-button.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-cell-renderer-button.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.o `test -f 'src/ui/gui/psppire-cell-renderer-button.c' || echo '$(srcdir)/'`src/ui/gui/psppire-cell-renderer-button.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-cell-renderer-button.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-cell-renderer-button.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-cell-renderer-button.c' object='src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.o `test -f 'src/ui/gui/psppire-cell-renderer-button.c' || echo '$(srcdir)/'`src/ui/gui/psppire-cell-renderer-button.c src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.obj: src/ui/gui/psppire-cell-renderer-button.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-cell-renderer-button.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.obj `if test -f 'src/ui/gui/psppire-cell-renderer-button.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-cell-renderer-button.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-cell-renderer-button.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-cell-renderer-button.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-cell-renderer-button.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-cell-renderer-button.c' object='src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-cell-renderer-button.obj `if test -f 'src/ui/gui/psppire-cell-renderer-button.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-cell-renderer-button.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-cell-renderer-button.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog.o: src/ui/gui/psppire-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog.o `test -f 'src/ui/gui/psppire-dialog.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog.o `test -f 'src/ui/gui/psppire-dialog.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog.c src/ui/gui/src_ui_gui_psppire-psppire-dialog.obj: src/ui/gui/psppire-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog.obj `if test -f 'src/ui/gui/psppire-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog.obj `if test -f 'src/ui/gui/psppire-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-keypad.o: src/ui/gui/psppire-keypad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-keypad.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-keypad.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-keypad.o `test -f 'src/ui/gui/psppire-keypad.c' || echo '$(srcdir)/'`src/ui/gui/psppire-keypad.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-keypad.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-keypad.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-keypad.c' object='src/ui/gui/src_ui_gui_psppire-psppire-keypad.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-keypad.o `test -f 'src/ui/gui/psppire-keypad.c' || echo '$(srcdir)/'`src/ui/gui/psppire-keypad.c src/ui/gui/src_ui_gui_psppire-psppire-keypad.obj: src/ui/gui/psppire-keypad.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-keypad.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-keypad.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-keypad.obj `if test -f 'src/ui/gui/psppire-keypad.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-keypad.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-keypad.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-keypad.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-keypad.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-keypad.c' object='src/ui/gui/src_ui_gui_psppire-psppire-keypad.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-keypad.obj `if test -f 'src/ui/gui/psppire-keypad.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-keypad.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-keypad.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-selector.o: src/ui/gui/psppire-selector.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-selector.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-selector.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-selector.o `test -f 'src/ui/gui/psppire-selector.c' || echo '$(srcdir)/'`src/ui/gui/psppire-selector.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-selector.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-selector.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-selector.c' object='src/ui/gui/src_ui_gui_psppire-psppire-selector.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-selector.o `test -f 'src/ui/gui/psppire-selector.c' || echo '$(srcdir)/'`src/ui/gui/psppire-selector.c src/ui/gui/src_ui_gui_psppire-psppire-selector.obj: src/ui/gui/psppire-selector.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-selector.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-selector.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-selector.obj `if test -f 'src/ui/gui/psppire-selector.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-selector.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-selector.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-selector.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-selector.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-selector.c' object='src/ui/gui/src_ui_gui_psppire-psppire-selector.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-selector.obj `if test -f 'src/ui/gui/psppire-selector.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-selector.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-selector.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.o: src/ui/gui/psppire-buttonbox.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-buttonbox.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.o `test -f 'src/ui/gui/psppire-buttonbox.c' || echo '$(srcdir)/'`src/ui/gui/psppire-buttonbox.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-buttonbox.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-buttonbox.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-buttonbox.c' object='src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.o `test -f 'src/ui/gui/psppire-buttonbox.c' || echo '$(srcdir)/'`src/ui/gui/psppire-buttonbox.c src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.obj: src/ui/gui/psppire-buttonbox.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-buttonbox.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.obj `if test -f 'src/ui/gui/psppire-buttonbox.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-buttonbox.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-buttonbox.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-buttonbox.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-buttonbox.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-buttonbox.c' object='src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-buttonbox.obj `if test -f 'src/ui/gui/psppire-buttonbox.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-buttonbox.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-buttonbox.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-scanf.o: src/ui/gui/psppire-scanf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-scanf.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-scanf.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-scanf.o `test -f 'src/ui/gui/psppire-scanf.c' || echo '$(srcdir)/'`src/ui/gui/psppire-scanf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-scanf.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-scanf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-scanf.c' object='src/ui/gui/src_ui_gui_psppire-psppire-scanf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-scanf.o `test -f 'src/ui/gui/psppire-scanf.c' || echo '$(srcdir)/'`src/ui/gui/psppire-scanf.c src/ui/gui/src_ui_gui_psppire-psppire-scanf.obj: src/ui/gui/psppire-scanf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-scanf.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-scanf.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-scanf.obj `if test -f 'src/ui/gui/psppire-scanf.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-scanf.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-scanf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-scanf.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-scanf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-scanf.c' object='src/ui/gui/src_ui_gui_psppire-psppire-scanf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-scanf.obj `if test -f 'src/ui/gui/psppire-scanf.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-scanf.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-scanf.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-acr.o: src/ui/gui/psppire-acr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-acr.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-acr.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-acr.o `test -f 'src/ui/gui/psppire-acr.c' || echo '$(srcdir)/'`src/ui/gui/psppire-acr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-acr.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-acr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-acr.c' object='src/ui/gui/src_ui_gui_psppire-psppire-acr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-acr.o `test -f 'src/ui/gui/psppire-acr.c' || echo '$(srcdir)/'`src/ui/gui/psppire-acr.c src/ui/gui/src_ui_gui_psppire-psppire-acr.obj: src/ui/gui/psppire-acr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-acr.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-acr.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-acr.obj `if test -f 'src/ui/gui/psppire-acr.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-acr.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-acr.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-acr.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-acr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-acr.c' object='src/ui/gui/src_ui_gui_psppire-psppire-acr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-acr.obj `if test -f 'src/ui/gui/psppire-acr.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-acr.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-acr.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.o: src/ui/gui/psppire-import-assistant.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-import-assistant.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.o `test -f 'src/ui/gui/psppire-import-assistant.c' || echo '$(srcdir)/'`src/ui/gui/psppire-import-assistant.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-import-assistant.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-import-assistant.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-import-assistant.c' object='src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.o `test -f 'src/ui/gui/psppire-import-assistant.c' || echo '$(srcdir)/'`src/ui/gui/psppire-import-assistant.c src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.obj: src/ui/gui/psppire-import-assistant.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-import-assistant.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.obj `if test -f 'src/ui/gui/psppire-import-assistant.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-import-assistant.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-import-assistant.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-import-assistant.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-import-assistant.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-import-assistant.c' object='src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-import-assistant.obj `if test -f 'src/ui/gui/psppire-import-assistant.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-import-assistant.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-import-assistant.c'; fi` src/ui/gui/src_ui_gui_psppire-builder-wrapper.o: src/ui/gui/builder-wrapper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-builder-wrapper.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-builder-wrapper.Tpo -c -o src/ui/gui/src_ui_gui_psppire-builder-wrapper.o `test -f 'src/ui/gui/builder-wrapper.c' || echo '$(srcdir)/'`src/ui/gui/builder-wrapper.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-builder-wrapper.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-builder-wrapper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/builder-wrapper.c' object='src/ui/gui/src_ui_gui_psppire-builder-wrapper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-builder-wrapper.o `test -f 'src/ui/gui/builder-wrapper.c' || echo '$(srcdir)/'`src/ui/gui/builder-wrapper.c src/ui/gui/src_ui_gui_psppire-builder-wrapper.obj: src/ui/gui/builder-wrapper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-builder-wrapper.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-builder-wrapper.Tpo -c -o src/ui/gui/src_ui_gui_psppire-builder-wrapper.obj `if test -f 'src/ui/gui/builder-wrapper.c'; then $(CYGPATH_W) 'src/ui/gui/builder-wrapper.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/builder-wrapper.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-builder-wrapper.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-builder-wrapper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/builder-wrapper.c' object='src/ui/gui/src_ui_gui_psppire-builder-wrapper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-builder-wrapper.obj `if test -f 'src/ui/gui/builder-wrapper.c'; then $(CYGPATH_W) 'src/ui/gui/builder-wrapper.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/builder-wrapper.c'; fi` src/ui/gui/src_ui_gui_psppire-dialog-common.o: src/ui/gui/dialog-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-dialog-common.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dialog-common.Tpo -c -o src/ui/gui/src_ui_gui_psppire-dialog-common.o `test -f 'src/ui/gui/dialog-common.c' || echo '$(srcdir)/'`src/ui/gui/dialog-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dialog-common.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dialog-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/dialog-common.c' object='src/ui/gui/src_ui_gui_psppire-dialog-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-dialog-common.o `test -f 'src/ui/gui/dialog-common.c' || echo '$(srcdir)/'`src/ui/gui/dialog-common.c src/ui/gui/src_ui_gui_psppire-dialog-common.obj: src/ui/gui/dialog-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-dialog-common.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dialog-common.Tpo -c -o src/ui/gui/src_ui_gui_psppire-dialog-common.obj `if test -f 'src/ui/gui/dialog-common.c'; then $(CYGPATH_W) 'src/ui/gui/dialog-common.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/dialog-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dialog-common.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dialog-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/dialog-common.c' object='src/ui/gui/src_ui_gui_psppire-dialog-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-dialog-common.obj `if test -f 'src/ui/gui/dialog-common.c'; then $(CYGPATH_W) 'src/ui/gui/dialog-common.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/dialog-common.c'; fi` src/ui/gui/src_ui_gui_psppire-dict-display.o: src/ui/gui/dict-display.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-dict-display.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dict-display.Tpo -c -o src/ui/gui/src_ui_gui_psppire-dict-display.o `test -f 'src/ui/gui/dict-display.c' || echo '$(srcdir)/'`src/ui/gui/dict-display.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dict-display.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dict-display.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/dict-display.c' object='src/ui/gui/src_ui_gui_psppire-dict-display.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-dict-display.o `test -f 'src/ui/gui/dict-display.c' || echo '$(srcdir)/'`src/ui/gui/dict-display.c src/ui/gui/src_ui_gui_psppire-dict-display.obj: src/ui/gui/dict-display.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-dict-display.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dict-display.Tpo -c -o src/ui/gui/src_ui_gui_psppire-dict-display.obj `if test -f 'src/ui/gui/dict-display.c'; then $(CYGPATH_W) 'src/ui/gui/dict-display.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/dict-display.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dict-display.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-dict-display.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/dict-display.c' object='src/ui/gui/src_ui_gui_psppire-dict-display.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-dict-display.obj `if test -f 'src/ui/gui/dict-display.c'; then $(CYGPATH_W) 'src/ui/gui/dict-display.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/dict-display.c'; fi` src/ui/gui/src_ui_gui_psppire-entry-dialog.o: src/ui/gui/entry-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-entry-dialog.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-entry-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-entry-dialog.o `test -f 'src/ui/gui/entry-dialog.c' || echo '$(srcdir)/'`src/ui/gui/entry-dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-entry-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-entry-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/entry-dialog.c' object='src/ui/gui/src_ui_gui_psppire-entry-dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-entry-dialog.o `test -f 'src/ui/gui/entry-dialog.c' || echo '$(srcdir)/'`src/ui/gui/entry-dialog.c src/ui/gui/src_ui_gui_psppire-entry-dialog.obj: src/ui/gui/entry-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-entry-dialog.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-entry-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-entry-dialog.obj `if test -f 'src/ui/gui/entry-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/entry-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/entry-dialog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-entry-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-entry-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/entry-dialog.c' object='src/ui/gui/src_ui_gui_psppire-entry-dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-entry-dialog.obj `if test -f 'src/ui/gui/entry-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/entry-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/entry-dialog.c'; fi` src/ui/gui/src_ui_gui_psppire-executor.o: src/ui/gui/executor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-executor.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-executor.Tpo -c -o src/ui/gui/src_ui_gui_psppire-executor.o `test -f 'src/ui/gui/executor.c' || echo '$(srcdir)/'`src/ui/gui/executor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-executor.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-executor.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/executor.c' object='src/ui/gui/src_ui_gui_psppire-executor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-executor.o `test -f 'src/ui/gui/executor.c' || echo '$(srcdir)/'`src/ui/gui/executor.c src/ui/gui/src_ui_gui_psppire-executor.obj: src/ui/gui/executor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-executor.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-executor.Tpo -c -o src/ui/gui/src_ui_gui_psppire-executor.obj `if test -f 'src/ui/gui/executor.c'; then $(CYGPATH_W) 'src/ui/gui/executor.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/executor.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-executor.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-executor.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/executor.c' object='src/ui/gui/src_ui_gui_psppire-executor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-executor.obj `if test -f 'src/ui/gui/executor.c'; then $(CYGPATH_W) 'src/ui/gui/executor.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/executor.c'; fi` src/ui/gui/src_ui_gui_psppire-find-dialog.o: src/ui/gui/find-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-find-dialog.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-find-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-find-dialog.o `test -f 'src/ui/gui/find-dialog.c' || echo '$(srcdir)/'`src/ui/gui/find-dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-find-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-find-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/find-dialog.c' object='src/ui/gui/src_ui_gui_psppire-find-dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-find-dialog.o `test -f 'src/ui/gui/find-dialog.c' || echo '$(srcdir)/'`src/ui/gui/find-dialog.c src/ui/gui/src_ui_gui_psppire-find-dialog.obj: src/ui/gui/find-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-find-dialog.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-find-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-find-dialog.obj `if test -f 'src/ui/gui/find-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/find-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/find-dialog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-find-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-find-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/find-dialog.c' object='src/ui/gui/src_ui_gui_psppire-find-dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-find-dialog.obj `if test -f 'src/ui/gui/find-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/find-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/find-dialog.c'; fi` src/ui/gui/src_ui_gui_psppire-goto-case-dialog.o: src/ui/gui/goto-case-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-goto-case-dialog.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-goto-case-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-goto-case-dialog.o `test -f 'src/ui/gui/goto-case-dialog.c' || echo '$(srcdir)/'`src/ui/gui/goto-case-dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-goto-case-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-goto-case-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/goto-case-dialog.c' object='src/ui/gui/src_ui_gui_psppire-goto-case-dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-goto-case-dialog.o `test -f 'src/ui/gui/goto-case-dialog.c' || echo '$(srcdir)/'`src/ui/gui/goto-case-dialog.c src/ui/gui/src_ui_gui_psppire-goto-case-dialog.obj: src/ui/gui/goto-case-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-goto-case-dialog.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-goto-case-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-goto-case-dialog.obj `if test -f 'src/ui/gui/goto-case-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/goto-case-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/goto-case-dialog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-goto-case-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-goto-case-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/goto-case-dialog.c' object='src/ui/gui/src_ui_gui_psppire-goto-case-dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-goto-case-dialog.obj `if test -f 'src/ui/gui/goto-case-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/goto-case-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/goto-case-dialog.c'; fi` src/ui/gui/src_ui_gui_psppire-helper.o: src/ui/gui/helper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-helper.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-helper.Tpo -c -o src/ui/gui/src_ui_gui_psppire-helper.o `test -f 'src/ui/gui/helper.c' || echo '$(srcdir)/'`src/ui/gui/helper.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-helper.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/helper.c' object='src/ui/gui/src_ui_gui_psppire-helper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-helper.o `test -f 'src/ui/gui/helper.c' || echo '$(srcdir)/'`src/ui/gui/helper.c src/ui/gui/src_ui_gui_psppire-helper.obj: src/ui/gui/helper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-helper.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-helper.Tpo -c -o src/ui/gui/src_ui_gui_psppire-helper.obj `if test -f 'src/ui/gui/helper.c'; then $(CYGPATH_W) 'src/ui/gui/helper.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/helper.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-helper.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/helper.c' object='src/ui/gui/src_ui_gui_psppire-helper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-helper.obj `if test -f 'src/ui/gui/helper.c'; then $(CYGPATH_W) 'src/ui/gui/helper.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/helper.c'; fi` src/ui/gui/src_ui_gui_psppire-help-menu.o: src/ui/gui/help-menu.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-help-menu.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-help-menu.Tpo -c -o src/ui/gui/src_ui_gui_psppire-help-menu.o `test -f 'src/ui/gui/help-menu.c' || echo '$(srcdir)/'`src/ui/gui/help-menu.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-help-menu.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-help-menu.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/help-menu.c' object='src/ui/gui/src_ui_gui_psppire-help-menu.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-help-menu.o `test -f 'src/ui/gui/help-menu.c' || echo '$(srcdir)/'`src/ui/gui/help-menu.c src/ui/gui/src_ui_gui_psppire-help-menu.obj: src/ui/gui/help-menu.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-help-menu.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-help-menu.Tpo -c -o src/ui/gui/src_ui_gui_psppire-help-menu.obj `if test -f 'src/ui/gui/help-menu.c'; then $(CYGPATH_W) 'src/ui/gui/help-menu.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/help-menu.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-help-menu.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-help-menu.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/help-menu.c' object='src/ui/gui/src_ui_gui_psppire-help-menu.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-help-menu.obj `if test -f 'src/ui/gui/help-menu.c'; then $(CYGPATH_W) 'src/ui/gui/help-menu.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/help-menu.c'; fi` src/ui/gui/src_ui_gui_psppire-main.o: src/ui/gui/main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-main.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-main.Tpo -c -o src/ui/gui/src_ui_gui_psppire-main.o `test -f 'src/ui/gui/main.c' || echo '$(srcdir)/'`src/ui/gui/main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-main.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/main.c' object='src/ui/gui/src_ui_gui_psppire-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-main.o `test -f 'src/ui/gui/main.c' || echo '$(srcdir)/'`src/ui/gui/main.c src/ui/gui/src_ui_gui_psppire-main.obj: src/ui/gui/main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-main.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-main.Tpo -c -o src/ui/gui/src_ui_gui_psppire-main.obj `if test -f 'src/ui/gui/main.c'; then $(CYGPATH_W) 'src/ui/gui/main.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-main.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/main.c' object='src/ui/gui/src_ui_gui_psppire-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-main.obj `if test -f 'src/ui/gui/main.c'; then $(CYGPATH_W) 'src/ui/gui/main.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/main.c'; fi` src/ui/gui/src_ui_gui_psppire-missing-val-dialog.o: src/ui/gui/missing-val-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-missing-val-dialog.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-missing-val-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-missing-val-dialog.o `test -f 'src/ui/gui/missing-val-dialog.c' || echo '$(srcdir)/'`src/ui/gui/missing-val-dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-missing-val-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-missing-val-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/missing-val-dialog.c' object='src/ui/gui/src_ui_gui_psppire-missing-val-dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-missing-val-dialog.o `test -f 'src/ui/gui/missing-val-dialog.c' || echo '$(srcdir)/'`src/ui/gui/missing-val-dialog.c src/ui/gui/src_ui_gui_psppire-missing-val-dialog.obj: src/ui/gui/missing-val-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-missing-val-dialog.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-missing-val-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-missing-val-dialog.obj `if test -f 'src/ui/gui/missing-val-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/missing-val-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/missing-val-dialog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-missing-val-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-missing-val-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/missing-val-dialog.c' object='src/ui/gui/src_ui_gui_psppire-missing-val-dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-missing-val-dialog.obj `if test -f 'src/ui/gui/missing-val-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/missing-val-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/missing-val-dialog.c'; fi` src/ui/gui/src_ui_gui_psppire-options-dialog.o: src/ui/gui/options-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-options-dialog.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-options-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-options-dialog.o `test -f 'src/ui/gui/options-dialog.c' || echo '$(srcdir)/'`src/ui/gui/options-dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-options-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-options-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/options-dialog.c' object='src/ui/gui/src_ui_gui_psppire-options-dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-options-dialog.o `test -f 'src/ui/gui/options-dialog.c' || echo '$(srcdir)/'`src/ui/gui/options-dialog.c src/ui/gui/src_ui_gui_psppire-options-dialog.obj: src/ui/gui/options-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-options-dialog.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-options-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-options-dialog.obj `if test -f 'src/ui/gui/options-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/options-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/options-dialog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-options-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-options-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/options-dialog.c' object='src/ui/gui/src_ui_gui_psppire-options-dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-options-dialog.obj `if test -f 'src/ui/gui/options-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/options-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/options-dialog.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire.o: src/ui/gui/psppire.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire.o `test -f 'src/ui/gui/psppire.c' || echo '$(srcdir)/'`src/ui/gui/psppire.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire.c' object='src/ui/gui/src_ui_gui_psppire-psppire.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire.o `test -f 'src/ui/gui/psppire.c' || echo '$(srcdir)/'`src/ui/gui/psppire.c src/ui/gui/src_ui_gui_psppire-psppire.obj: src/ui/gui/psppire.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire.obj `if test -f 'src/ui/gui/psppire.c'; then $(CYGPATH_W) 'src/ui/gui/psppire.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire.c' object='src/ui/gui/src_ui_gui_psppire-psppire.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire.obj `if test -f 'src/ui/gui/psppire.c'; then $(CYGPATH_W) 'src/ui/gui/psppire.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.o: src/ui/gui/psppire-checkbox-treeview.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-checkbox-treeview.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.o `test -f 'src/ui/gui/psppire-checkbox-treeview.c' || echo '$(srcdir)/'`src/ui/gui/psppire-checkbox-treeview.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-checkbox-treeview.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-checkbox-treeview.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-checkbox-treeview.c' object='src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.o `test -f 'src/ui/gui/psppire-checkbox-treeview.c' || echo '$(srcdir)/'`src/ui/gui/psppire-checkbox-treeview.c src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.obj: src/ui/gui/psppire-checkbox-treeview.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-checkbox-treeview.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.obj `if test -f 'src/ui/gui/psppire-checkbox-treeview.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-checkbox-treeview.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-checkbox-treeview.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-checkbox-treeview.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-checkbox-treeview.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-checkbox-treeview.c' object='src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-checkbox-treeview.obj `if test -f 'src/ui/gui/psppire-checkbox-treeview.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-checkbox-treeview.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-checkbox-treeview.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-conf.o: src/ui/gui/psppire-conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-conf.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-conf.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-conf.o `test -f 'src/ui/gui/psppire-conf.c' || echo '$(srcdir)/'`src/ui/gui/psppire-conf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-conf.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-conf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-conf.c' object='src/ui/gui/src_ui_gui_psppire-psppire-conf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-conf.o `test -f 'src/ui/gui/psppire-conf.c' || echo '$(srcdir)/'`src/ui/gui/psppire-conf.c src/ui/gui/src_ui_gui_psppire-psppire-conf.obj: src/ui/gui/psppire-conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-conf.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-conf.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-conf.obj `if test -f 'src/ui/gui/psppire-conf.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-conf.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-conf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-conf.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-conf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-conf.c' object='src/ui/gui/src_ui_gui_psppire-psppire-conf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-conf.obj `if test -f 'src/ui/gui/psppire-conf.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-conf.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-conf.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-data-editor.o: src/ui/gui/psppire-data-editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-data-editor.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-editor.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-editor.o `test -f 'src/ui/gui/psppire-data-editor.c' || echo '$(srcdir)/'`src/ui/gui/psppire-data-editor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-editor.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-editor.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-data-editor.c' object='src/ui/gui/src_ui_gui_psppire-psppire-data-editor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-editor.o `test -f 'src/ui/gui/psppire-data-editor.c' || echo '$(srcdir)/'`src/ui/gui/psppire-data-editor.c src/ui/gui/src_ui_gui_psppire-psppire-data-editor.obj: src/ui/gui/psppire-data-editor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-data-editor.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-editor.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-editor.obj `if test -f 'src/ui/gui/psppire-data-editor.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-data-editor.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-data-editor.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-editor.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-editor.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-data-editor.c' object='src/ui/gui/src_ui_gui_psppire-psppire-data-editor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-editor.obj `if test -f 'src/ui/gui/psppire-data-editor.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-data-editor.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-data-editor.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.o: src/ui/gui/psppire-data-sheet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-sheet.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.o `test -f 'src/ui/gui/psppire-data-sheet.c' || echo '$(srcdir)/'`src/ui/gui/psppire-data-sheet.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-sheet.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-sheet.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-data-sheet.c' object='src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.o `test -f 'src/ui/gui/psppire-data-sheet.c' || echo '$(srcdir)/'`src/ui/gui/psppire-data-sheet.c src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.obj: src/ui/gui/psppire-data-sheet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-sheet.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.obj `if test -f 'src/ui/gui/psppire-data-sheet.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-data-sheet.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-data-sheet.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-sheet.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-sheet.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-data-sheet.c' object='src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-sheet.obj `if test -f 'src/ui/gui/psppire-data-sheet.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-data-sheet.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-data-sheet.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-data-store.o: src/ui/gui/psppire-data-store.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-data-store.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-store.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-store.o `test -f 'src/ui/gui/psppire-data-store.c' || echo '$(srcdir)/'`src/ui/gui/psppire-data-store.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-store.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-store.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-data-store.c' object='src/ui/gui/src_ui_gui_psppire-psppire-data-store.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-store.o `test -f 'src/ui/gui/psppire-data-store.c' || echo '$(srcdir)/'`src/ui/gui/psppire-data-store.c src/ui/gui/src_ui_gui_psppire-psppire-data-store.obj: src/ui/gui/psppire-data-store.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-data-store.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-store.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-store.obj `if test -f 'src/ui/gui/psppire-data-store.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-data-store.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-data-store.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-store.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-store.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-data-store.c' object='src/ui/gui/src_ui_gui_psppire-psppire-data-store.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-store.obj `if test -f 'src/ui/gui/psppire-data-store.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-data-store.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-data-store.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-data-window.o: src/ui/gui/psppire-data-window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-data-window.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-window.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-window.o `test -f 'src/ui/gui/psppire-data-window.c' || echo '$(srcdir)/'`src/ui/gui/psppire-data-window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-window.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-window.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-data-window.c' object='src/ui/gui/src_ui_gui_psppire-psppire-data-window.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-window.o `test -f 'src/ui/gui/psppire-data-window.c' || echo '$(srcdir)/'`src/ui/gui/psppire-data-window.c src/ui/gui/src_ui_gui_psppire-psppire-data-window.obj: src/ui/gui/psppire-data-window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-data-window.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-window.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-window.obj `if test -f 'src/ui/gui/psppire-data-window.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-data-window.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-data-window.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-window.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-data-window.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-data-window.c' object='src/ui/gui/src_ui_gui_psppire-psppire-data-window.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-data-window.obj `if test -f 'src/ui/gui/psppire-data-window.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-data-window.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-data-window.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.o: src/ui/gui/psppire-dialog-action.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.o `test -f 'src/ui/gui/psppire-dialog-action.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.o `test -f 'src/ui/gui/psppire-dialog-action.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.obj: src/ui/gui/psppire-dialog-action.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.obj `if test -f 'src/ui/gui/psppire-dialog-action.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action.obj `if test -f 'src/ui/gui/psppire-dialog-action.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.o: src/ui/gui/psppire-dialog-action-aggregate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-aggregate.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.o `test -f 'src/ui/gui/psppire-dialog-action-aggregate.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-aggregate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-aggregate.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-aggregate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-aggregate.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.o `test -f 'src/ui/gui/psppire-dialog-action-aggregate.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-aggregate.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.obj: src/ui/gui/psppire-dialog-action-aggregate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-aggregate.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.obj `if test -f 'src/ui/gui/psppire-dialog-action-aggregate.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-aggregate.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-aggregate.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-aggregate.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-aggregate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-aggregate.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-aggregate.obj `if test -f 'src/ui/gui/psppire-dialog-action-aggregate.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-aggregate.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-aggregate.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.o: src/ui/gui/psppire-dialog-action-autorecode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-autorecode.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.o `test -f 'src/ui/gui/psppire-dialog-action-autorecode.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-autorecode.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-autorecode.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-autorecode.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-autorecode.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.o `test -f 'src/ui/gui/psppire-dialog-action-autorecode.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-autorecode.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.obj: src/ui/gui/psppire-dialog-action-autorecode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-autorecode.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.obj `if test -f 'src/ui/gui/psppire-dialog-action-autorecode.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-autorecode.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-autorecode.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-autorecode.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-autorecode.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-autorecode.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-autorecode.obj `if test -f 'src/ui/gui/psppire-dialog-action-autorecode.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-autorecode.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-autorecode.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.o: src/ui/gui/psppire-dialog-action-1sks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-1sks.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.o `test -f 'src/ui/gui/psppire-dialog-action-1sks.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-1sks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-1sks.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-1sks.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-1sks.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.o `test -f 'src/ui/gui/psppire-dialog-action-1sks.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-1sks.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.obj: src/ui/gui/psppire-dialog-action-1sks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-1sks.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.obj `if test -f 'src/ui/gui/psppire-dialog-action-1sks.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-1sks.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-1sks.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-1sks.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-1sks.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-1sks.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-1sks.obj `if test -f 'src/ui/gui/psppire-dialog-action-1sks.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-1sks.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-1sks.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.o: src/ui/gui/psppire-dialog-action-barchart.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-barchart.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.o `test -f 'src/ui/gui/psppire-dialog-action-barchart.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-barchart.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-barchart.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-barchart.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-barchart.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.o `test -f 'src/ui/gui/psppire-dialog-action-barchart.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-barchart.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.obj: src/ui/gui/psppire-dialog-action-barchart.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-barchart.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.obj `if test -f 'src/ui/gui/psppire-dialog-action-barchart.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-barchart.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-barchart.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-barchart.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-barchart.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-barchart.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-barchart.obj `if test -f 'src/ui/gui/psppire-dialog-action-barchart.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-barchart.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-barchart.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.o: src/ui/gui/psppire-dialog-action-binomial.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-binomial.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.o `test -f 'src/ui/gui/psppire-dialog-action-binomial.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-binomial.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-binomial.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-binomial.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-binomial.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.o `test -f 'src/ui/gui/psppire-dialog-action-binomial.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-binomial.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.obj: src/ui/gui/psppire-dialog-action-binomial.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-binomial.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.obj `if test -f 'src/ui/gui/psppire-dialog-action-binomial.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-binomial.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-binomial.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-binomial.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-binomial.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-binomial.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-binomial.obj `if test -f 'src/ui/gui/psppire-dialog-action-binomial.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-binomial.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-binomial.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.o: src/ui/gui/psppire-dialog-action-chisquare.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-chisquare.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.o `test -f 'src/ui/gui/psppire-dialog-action-chisquare.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-chisquare.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-chisquare.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-chisquare.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-chisquare.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.o `test -f 'src/ui/gui/psppire-dialog-action-chisquare.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-chisquare.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.obj: src/ui/gui/psppire-dialog-action-chisquare.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-chisquare.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.obj `if test -f 'src/ui/gui/psppire-dialog-action-chisquare.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-chisquare.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-chisquare.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-chisquare.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-chisquare.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-chisquare.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-chisquare.obj `if test -f 'src/ui/gui/psppire-dialog-action-chisquare.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-chisquare.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-chisquare.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.o: src/ui/gui/psppire-dialog-action-compute.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-compute.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.o `test -f 'src/ui/gui/psppire-dialog-action-compute.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-compute.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-compute.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-compute.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-compute.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.o `test -f 'src/ui/gui/psppire-dialog-action-compute.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-compute.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.obj: src/ui/gui/psppire-dialog-action-compute.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-compute.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.obj `if test -f 'src/ui/gui/psppire-dialog-action-compute.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-compute.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-compute.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-compute.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-compute.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-compute.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-compute.obj `if test -f 'src/ui/gui/psppire-dialog-action-compute.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-compute.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-compute.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.o: src/ui/gui/psppire-dialog-action-comments.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-comments.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.o `test -f 'src/ui/gui/psppire-dialog-action-comments.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-comments.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-comments.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-comments.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-comments.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.o `test -f 'src/ui/gui/psppire-dialog-action-comments.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-comments.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.obj: src/ui/gui/psppire-dialog-action-comments.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-comments.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.obj `if test -f 'src/ui/gui/psppire-dialog-action-comments.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-comments.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-comments.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-comments.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-comments.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-comments.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-comments.obj `if test -f 'src/ui/gui/psppire-dialog-action-comments.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-comments.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-comments.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.o: src/ui/gui/psppire-dialog-action-count.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-count.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.o `test -f 'src/ui/gui/psppire-dialog-action-count.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-count.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-count.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-count.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-count.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.o `test -f 'src/ui/gui/psppire-dialog-action-count.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-count.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.obj: src/ui/gui/psppire-dialog-action-count.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-count.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.obj `if test -f 'src/ui/gui/psppire-dialog-action-count.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-count.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-count.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-count.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-count.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-count.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-count.obj `if test -f 'src/ui/gui/psppire-dialog-action-count.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-count.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-count.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.o: src/ui/gui/psppire-dialog-action-correlation.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-correlation.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.o `test -f 'src/ui/gui/psppire-dialog-action-correlation.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-correlation.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-correlation.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-correlation.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-correlation.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.o `test -f 'src/ui/gui/psppire-dialog-action-correlation.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-correlation.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.obj: src/ui/gui/psppire-dialog-action-correlation.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-correlation.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.obj `if test -f 'src/ui/gui/psppire-dialog-action-correlation.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-correlation.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-correlation.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-correlation.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-correlation.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-correlation.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-correlation.obj `if test -f 'src/ui/gui/psppire-dialog-action-correlation.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-correlation.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-correlation.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.o: src/ui/gui/psppire-dialog-action-crosstabs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-crosstabs.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.o `test -f 'src/ui/gui/psppire-dialog-action-crosstabs.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-crosstabs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-crosstabs.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-crosstabs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-crosstabs.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.o `test -f 'src/ui/gui/psppire-dialog-action-crosstabs.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-crosstabs.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.obj: src/ui/gui/psppire-dialog-action-crosstabs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-crosstabs.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.obj `if test -f 'src/ui/gui/psppire-dialog-action-crosstabs.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-crosstabs.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-crosstabs.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-crosstabs.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-crosstabs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-crosstabs.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-crosstabs.obj `if test -f 'src/ui/gui/psppire-dialog-action-crosstabs.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-crosstabs.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-crosstabs.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.o: src/ui/gui/psppire-dialog-action-descriptives.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-descriptives.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.o `test -f 'src/ui/gui/psppire-dialog-action-descriptives.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-descriptives.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-descriptives.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-descriptives.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-descriptives.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.o `test -f 'src/ui/gui/psppire-dialog-action-descriptives.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-descriptives.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.obj: src/ui/gui/psppire-dialog-action-descriptives.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-descriptives.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.obj `if test -f 'src/ui/gui/psppire-dialog-action-descriptives.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-descriptives.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-descriptives.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-descriptives.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-descriptives.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-descriptives.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-descriptives.obj `if test -f 'src/ui/gui/psppire-dialog-action-descriptives.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-descriptives.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-descriptives.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.o: src/ui/gui/psppire-dialog-action-examine.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-examine.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.o `test -f 'src/ui/gui/psppire-dialog-action-examine.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-examine.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-examine.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-examine.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-examine.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.o `test -f 'src/ui/gui/psppire-dialog-action-examine.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-examine.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.obj: src/ui/gui/psppire-dialog-action-examine.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-examine.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.obj `if test -f 'src/ui/gui/psppire-dialog-action-examine.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-examine.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-examine.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-examine.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-examine.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-examine.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-examine.obj `if test -f 'src/ui/gui/psppire-dialog-action-examine.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-examine.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-examine.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.o: src/ui/gui/psppire-dialog-action-factor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-factor.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.o `test -f 'src/ui/gui/psppire-dialog-action-factor.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-factor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-factor.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-factor.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-factor.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.o `test -f 'src/ui/gui/psppire-dialog-action-factor.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-factor.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.obj: src/ui/gui/psppire-dialog-action-factor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-factor.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.obj `if test -f 'src/ui/gui/psppire-dialog-action-factor.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-factor.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-factor.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-factor.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-factor.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-factor.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-factor.obj `if test -f 'src/ui/gui/psppire-dialog-action-factor.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-factor.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-factor.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.o: src/ui/gui/psppire-dialog-action-flip.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-flip.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.o `test -f 'src/ui/gui/psppire-dialog-action-flip.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-flip.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-flip.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-flip.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-flip.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.o `test -f 'src/ui/gui/psppire-dialog-action-flip.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-flip.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.obj: src/ui/gui/psppire-dialog-action-flip.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-flip.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.obj `if test -f 'src/ui/gui/psppire-dialog-action-flip.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-flip.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-flip.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-flip.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-flip.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-flip.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-flip.obj `if test -f 'src/ui/gui/psppire-dialog-action-flip.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-flip.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-flip.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.o: src/ui/gui/psppire-dialog-action-frequencies.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-frequencies.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.o `test -f 'src/ui/gui/psppire-dialog-action-frequencies.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-frequencies.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-frequencies.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-frequencies.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-frequencies.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.o `test -f 'src/ui/gui/psppire-dialog-action-frequencies.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-frequencies.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.obj: src/ui/gui/psppire-dialog-action-frequencies.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-frequencies.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.obj `if test -f 'src/ui/gui/psppire-dialog-action-frequencies.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-frequencies.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-frequencies.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-frequencies.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-frequencies.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-frequencies.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-frequencies.obj `if test -f 'src/ui/gui/psppire-dialog-action-frequencies.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-frequencies.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-frequencies.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.o: src/ui/gui/psppire-dialog-action-histogram.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-histogram.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.o `test -f 'src/ui/gui/psppire-dialog-action-histogram.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-histogram.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-histogram.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-histogram.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-histogram.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.o `test -f 'src/ui/gui/psppire-dialog-action-histogram.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-histogram.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.obj: src/ui/gui/psppire-dialog-action-histogram.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-histogram.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.obj `if test -f 'src/ui/gui/psppire-dialog-action-histogram.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-histogram.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-histogram.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-histogram.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-histogram.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-histogram.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-histogram.obj `if test -f 'src/ui/gui/psppire-dialog-action-histogram.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-histogram.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-histogram.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.o: src/ui/gui/psppire-dialog-action-indep-samps.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-indep-samps.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.o `test -f 'src/ui/gui/psppire-dialog-action-indep-samps.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-indep-samps.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-indep-samps.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-indep-samps.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-indep-samps.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.o `test -f 'src/ui/gui/psppire-dialog-action-indep-samps.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-indep-samps.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.obj: src/ui/gui/psppire-dialog-action-indep-samps.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-indep-samps.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.obj `if test -f 'src/ui/gui/psppire-dialog-action-indep-samps.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-indep-samps.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-indep-samps.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-indep-samps.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-indep-samps.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-indep-samps.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-indep-samps.obj `if test -f 'src/ui/gui/psppire-dialog-action-indep-samps.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-indep-samps.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-indep-samps.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.o: src/ui/gui/psppire-dialog-action-kmeans.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-kmeans.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.o `test -f 'src/ui/gui/psppire-dialog-action-kmeans.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-kmeans.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-kmeans.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-kmeans.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-kmeans.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.o `test -f 'src/ui/gui/psppire-dialog-action-kmeans.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-kmeans.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.obj: src/ui/gui/psppire-dialog-action-kmeans.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-kmeans.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.obj `if test -f 'src/ui/gui/psppire-dialog-action-kmeans.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-kmeans.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-kmeans.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-kmeans.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-kmeans.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-kmeans.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-kmeans.obj `if test -f 'src/ui/gui/psppire-dialog-action-kmeans.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-kmeans.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-kmeans.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.o: src/ui/gui/psppire-dialog-action-logistic.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-logistic.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.o `test -f 'src/ui/gui/psppire-dialog-action-logistic.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-logistic.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-logistic.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-logistic.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-logistic.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.o `test -f 'src/ui/gui/psppire-dialog-action-logistic.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-logistic.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.obj: src/ui/gui/psppire-dialog-action-logistic.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-logistic.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.obj `if test -f 'src/ui/gui/psppire-dialog-action-logistic.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-logistic.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-logistic.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-logistic.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-logistic.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-logistic.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-logistic.obj `if test -f 'src/ui/gui/psppire-dialog-action-logistic.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-logistic.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-logistic.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.o: src/ui/gui/psppire-dialog-action-k-independent.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-independent.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.o `test -f 'src/ui/gui/psppire-dialog-action-k-independent.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-k-independent.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-independent.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-independent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-k-independent.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.o `test -f 'src/ui/gui/psppire-dialog-action-k-independent.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-k-independent.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.obj: src/ui/gui/psppire-dialog-action-k-independent.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-independent.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.obj `if test -f 'src/ui/gui/psppire-dialog-action-k-independent.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-k-independent.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-k-independent.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-independent.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-independent.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-k-independent.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-independent.obj `if test -f 'src/ui/gui/psppire-dialog-action-k-independent.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-k-independent.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-k-independent.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.o: src/ui/gui/psppire-dialog-action-k-related.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-related.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.o `test -f 'src/ui/gui/psppire-dialog-action-k-related.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-k-related.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-related.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-related.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-k-related.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.o `test -f 'src/ui/gui/psppire-dialog-action-k-related.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-k-related.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.obj: src/ui/gui/psppire-dialog-action-k-related.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-related.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.obj `if test -f 'src/ui/gui/psppire-dialog-action-k-related.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-k-related.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-k-related.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-related.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-k-related.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-k-related.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-k-related.obj `if test -f 'src/ui/gui/psppire-dialog-action-k-related.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-k-related.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-k-related.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.o: src/ui/gui/psppire-dialog-action-means.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-means.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.o `test -f 'src/ui/gui/psppire-dialog-action-means.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-means.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-means.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-means.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-means.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.o `test -f 'src/ui/gui/psppire-dialog-action-means.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-means.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.obj: src/ui/gui/psppire-dialog-action-means.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-means.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.obj `if test -f 'src/ui/gui/psppire-dialog-action-means.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-means.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-means.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-means.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-means.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-means.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-means.obj `if test -f 'src/ui/gui/psppire-dialog-action-means.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-means.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-means.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.o: src/ui/gui/psppire-dialog-action-oneway.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-oneway.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.o `test -f 'src/ui/gui/psppire-dialog-action-oneway.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-oneway.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-oneway.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-oneway.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-oneway.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.o `test -f 'src/ui/gui/psppire-dialog-action-oneway.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-oneway.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.obj: src/ui/gui/psppire-dialog-action-oneway.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-oneway.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.obj `if test -f 'src/ui/gui/psppire-dialog-action-oneway.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-oneway.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-oneway.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-oneway.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-oneway.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-oneway.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-oneway.obj `if test -f 'src/ui/gui/psppire-dialog-action-oneway.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-oneway.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-oneway.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.o: src/ui/gui/psppire-dialog-action-paired.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-paired.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.o `test -f 'src/ui/gui/psppire-dialog-action-paired.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-paired.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-paired.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-paired.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-paired.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.o `test -f 'src/ui/gui/psppire-dialog-action-paired.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-paired.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.obj: src/ui/gui/psppire-dialog-action-paired.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-paired.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.obj `if test -f 'src/ui/gui/psppire-dialog-action-paired.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-paired.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-paired.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-paired.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-paired.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-paired.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-paired.obj `if test -f 'src/ui/gui/psppire-dialog-action-paired.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-paired.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-paired.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.o: src/ui/gui/psppire-dialog-action-rank.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-rank.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.o `test -f 'src/ui/gui/psppire-dialog-action-rank.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-rank.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-rank.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-rank.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-rank.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.o `test -f 'src/ui/gui/psppire-dialog-action-rank.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-rank.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.obj: src/ui/gui/psppire-dialog-action-rank.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-rank.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.obj `if test -f 'src/ui/gui/psppire-dialog-action-rank.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-rank.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-rank.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-rank.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-rank.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-rank.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-rank.obj `if test -f 'src/ui/gui/psppire-dialog-action-rank.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-rank.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-rank.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.o: src/ui/gui/psppire-dialog-action-recode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.o `test -f 'src/ui/gui/psppire-dialog-action-recode.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-recode.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-recode.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.o `test -f 'src/ui/gui/psppire-dialog-action-recode.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-recode.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.obj: src/ui/gui/psppire-dialog-action-recode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.obj `if test -f 'src/ui/gui/psppire-dialog-action-recode.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-recode.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-recode.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-recode.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode.obj `if test -f 'src/ui/gui/psppire-dialog-action-recode.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-recode.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-recode.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.o: src/ui/gui/psppire-dialog-action-recode-same.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-same.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.o `test -f 'src/ui/gui/psppire-dialog-action-recode-same.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-recode-same.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-same.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-same.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-recode-same.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.o `test -f 'src/ui/gui/psppire-dialog-action-recode-same.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-recode-same.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.obj: src/ui/gui/psppire-dialog-action-recode-same.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-same.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.obj `if test -f 'src/ui/gui/psppire-dialog-action-recode-same.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-recode-same.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-recode-same.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-same.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-same.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-recode-same.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-same.obj `if test -f 'src/ui/gui/psppire-dialog-action-recode-same.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-recode-same.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-recode-same.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.o: src/ui/gui/psppire-dialog-action-recode-different.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-different.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.o `test -f 'src/ui/gui/psppire-dialog-action-recode-different.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-recode-different.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-different.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-different.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-recode-different.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.o `test -f 'src/ui/gui/psppire-dialog-action-recode-different.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-recode-different.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.obj: src/ui/gui/psppire-dialog-action-recode-different.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-different.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.obj `if test -f 'src/ui/gui/psppire-dialog-action-recode-different.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-recode-different.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-recode-different.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-different.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-recode-different.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-recode-different.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-recode-different.obj `if test -f 'src/ui/gui/psppire-dialog-action-recode-different.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-recode-different.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-recode-different.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.o: src/ui/gui/psppire-dialog-action-regression.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-regression.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.o `test -f 'src/ui/gui/psppire-dialog-action-regression.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-regression.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-regression.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-regression.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-regression.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.o `test -f 'src/ui/gui/psppire-dialog-action-regression.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-regression.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.obj: src/ui/gui/psppire-dialog-action-regression.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-regression.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.obj `if test -f 'src/ui/gui/psppire-dialog-action-regression.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-regression.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-regression.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-regression.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-regression.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-regression.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-regression.obj `if test -f 'src/ui/gui/psppire-dialog-action-regression.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-regression.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-regression.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.o: src/ui/gui/psppire-dialog-action-reliability.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-reliability.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.o `test -f 'src/ui/gui/psppire-dialog-action-reliability.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-reliability.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-reliability.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-reliability.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-reliability.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.o `test -f 'src/ui/gui/psppire-dialog-action-reliability.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-reliability.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.obj: src/ui/gui/psppire-dialog-action-reliability.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-reliability.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.obj `if test -f 'src/ui/gui/psppire-dialog-action-reliability.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-reliability.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-reliability.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-reliability.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-reliability.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-reliability.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-reliability.obj `if test -f 'src/ui/gui/psppire-dialog-action-reliability.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-reliability.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-reliability.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.o: src/ui/gui/psppire-dialog-action-roc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-roc.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.o `test -f 'src/ui/gui/psppire-dialog-action-roc.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-roc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-roc.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-roc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-roc.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.o `test -f 'src/ui/gui/psppire-dialog-action-roc.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-roc.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.obj: src/ui/gui/psppire-dialog-action-roc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-roc.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.obj `if test -f 'src/ui/gui/psppire-dialog-action-roc.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-roc.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-roc.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-roc.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-roc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-roc.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-roc.obj `if test -f 'src/ui/gui/psppire-dialog-action-roc.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-roc.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-roc.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.o: src/ui/gui/psppire-dialog-action-runs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-runs.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.o `test -f 'src/ui/gui/psppire-dialog-action-runs.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-runs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-runs.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-runs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-runs.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.o `test -f 'src/ui/gui/psppire-dialog-action-runs.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-runs.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.obj: src/ui/gui/psppire-dialog-action-runs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-runs.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.obj `if test -f 'src/ui/gui/psppire-dialog-action-runs.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-runs.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-runs.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-runs.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-runs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-runs.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-runs.obj `if test -f 'src/ui/gui/psppire-dialog-action-runs.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-runs.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-runs.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.o: src/ui/gui/psppire-dialog-action-scatterplot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-scatterplot.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.o `test -f 'src/ui/gui/psppire-dialog-action-scatterplot.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-scatterplot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-scatterplot.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-scatterplot.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-scatterplot.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.o `test -f 'src/ui/gui/psppire-dialog-action-scatterplot.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-scatterplot.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.obj: src/ui/gui/psppire-dialog-action-scatterplot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-scatterplot.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.obj `if test -f 'src/ui/gui/psppire-dialog-action-scatterplot.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-scatterplot.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-scatterplot.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-scatterplot.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-scatterplot.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-scatterplot.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-scatterplot.obj `if test -f 'src/ui/gui/psppire-dialog-action-scatterplot.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-scatterplot.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-scatterplot.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.o: src/ui/gui/psppire-dialog-action-sort.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-sort.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.o `test -f 'src/ui/gui/psppire-dialog-action-sort.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-sort.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-sort.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-sort.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-sort.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.o `test -f 'src/ui/gui/psppire-dialog-action-sort.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-sort.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.obj: src/ui/gui/psppire-dialog-action-sort.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-sort.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.obj `if test -f 'src/ui/gui/psppire-dialog-action-sort.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-sort.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-sort.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-sort.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-sort.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-sort.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-sort.obj `if test -f 'src/ui/gui/psppire-dialog-action-sort.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-sort.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-sort.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.o: src/ui/gui/psppire-dialog-action-select.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-select.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.o `test -f 'src/ui/gui/psppire-dialog-action-select.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-select.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-select.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-select.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-select.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.o `test -f 'src/ui/gui/psppire-dialog-action-select.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-select.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.obj: src/ui/gui/psppire-dialog-action-select.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-select.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.obj `if test -f 'src/ui/gui/psppire-dialog-action-select.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-select.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-select.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-select.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-select.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-select.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-select.obj `if test -f 'src/ui/gui/psppire-dialog-action-select.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-select.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-select.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.o: src/ui/gui/psppire-dialog-action-split.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-split.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.o `test -f 'src/ui/gui/psppire-dialog-action-split.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-split.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-split.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-split.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-split.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.o `test -f 'src/ui/gui/psppire-dialog-action-split.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-split.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.obj: src/ui/gui/psppire-dialog-action-split.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-split.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.obj `if test -f 'src/ui/gui/psppire-dialog-action-split.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-split.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-split.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-split.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-split.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-split.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-split.obj `if test -f 'src/ui/gui/psppire-dialog-action-split.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-split.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-split.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.o: src/ui/gui/psppire-dialog-action-tt1s.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-tt1s.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.o `test -f 'src/ui/gui/psppire-dialog-action-tt1s.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-tt1s.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-tt1s.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-tt1s.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-tt1s.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.o `test -f 'src/ui/gui/psppire-dialog-action-tt1s.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-tt1s.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.obj: src/ui/gui/psppire-dialog-action-tt1s.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-tt1s.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.obj `if test -f 'src/ui/gui/psppire-dialog-action-tt1s.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-tt1s.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-tt1s.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-tt1s.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-tt1s.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-tt1s.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-tt1s.obj `if test -f 'src/ui/gui/psppire-dialog-action-tt1s.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-tt1s.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-tt1s.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.o: src/ui/gui/psppire-dialog-action-two-sample.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-two-sample.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.o `test -f 'src/ui/gui/psppire-dialog-action-two-sample.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-two-sample.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-two-sample.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-two-sample.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-two-sample.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.o `test -f 'src/ui/gui/psppire-dialog-action-two-sample.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-two-sample.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.obj: src/ui/gui/psppire-dialog-action-two-sample.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-two-sample.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.obj `if test -f 'src/ui/gui/psppire-dialog-action-two-sample.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-two-sample.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-two-sample.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-two-sample.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-two-sample.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-two-sample.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-two-sample.obj `if test -f 'src/ui/gui/psppire-dialog-action-two-sample.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-two-sample.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-two-sample.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.o: src/ui/gui/psppire-dialog-action-univariate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-univariate.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.o `test -f 'src/ui/gui/psppire-dialog-action-univariate.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-univariate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-univariate.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-univariate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-univariate.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.o `test -f 'src/ui/gui/psppire-dialog-action-univariate.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-univariate.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.obj: src/ui/gui/psppire-dialog-action-univariate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-univariate.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.obj `if test -f 'src/ui/gui/psppire-dialog-action-univariate.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-univariate.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-univariate.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-univariate.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-univariate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-univariate.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-univariate.obj `if test -f 'src/ui/gui/psppire-dialog-action-univariate.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-univariate.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-univariate.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.o: src/ui/gui/psppire-dialog-action-var-info.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-var-info.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.o `test -f 'src/ui/gui/psppire-dialog-action-var-info.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-var-info.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-var-info.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-var-info.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-var-info.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.o `test -f 'src/ui/gui/psppire-dialog-action-var-info.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-var-info.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.obj: src/ui/gui/psppire-dialog-action-var-info.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-var-info.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.obj `if test -f 'src/ui/gui/psppire-dialog-action-var-info.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-var-info.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-var-info.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-var-info.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-var-info.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-var-info.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-var-info.obj `if test -f 'src/ui/gui/psppire-dialog-action-var-info.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-var-info.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-var-info.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.o: src/ui/gui/psppire-dialog-action-weight.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-weight.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.o `test -f 'src/ui/gui/psppire-dialog-action-weight.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-weight.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-weight.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-weight.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-weight.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.o `test -f 'src/ui/gui/psppire-dialog-action-weight.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dialog-action-weight.c src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.obj: src/ui/gui/psppire-dialog-action-weight.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-weight.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.obj `if test -f 'src/ui/gui/psppire-dialog-action-weight.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-weight.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-weight.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-weight.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dialog-action-weight.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dialog-action-weight.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dialog-action-weight.obj `if test -f 'src/ui/gui/psppire-dialog-action-weight.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dialog-action-weight.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dialog-action-weight.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dict.o: src/ui/gui/psppire-dict.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dict.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dict.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dict.o `test -f 'src/ui/gui/psppire-dict.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dict.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dict.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dict.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dict.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dict.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dict.o `test -f 'src/ui/gui/psppire-dict.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dict.c src/ui/gui/src_ui_gui_psppire-psppire-dict.obj: src/ui/gui/psppire-dict.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dict.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dict.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dict.obj `if test -f 'src/ui/gui/psppire-dict.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dict.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dict.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dict.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dict.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dict.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dict.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dict.obj `if test -f 'src/ui/gui/psppire-dict.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dict.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dict.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-dictview.o: src/ui/gui/psppire-dictview.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dictview.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dictview.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dictview.o `test -f 'src/ui/gui/psppire-dictview.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dictview.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dictview.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dictview.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dictview.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dictview.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dictview.o `test -f 'src/ui/gui/psppire-dictview.c' || echo '$(srcdir)/'`src/ui/gui/psppire-dictview.c src/ui/gui/src_ui_gui_psppire-psppire-dictview.obj: src/ui/gui/psppire-dictview.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-dictview.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dictview.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-dictview.obj `if test -f 'src/ui/gui/psppire-dictview.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dictview.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dictview.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dictview.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-dictview.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-dictview.c' object='src/ui/gui/src_ui_gui_psppire-psppire-dictview.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-dictview.obj `if test -f 'src/ui/gui/psppire-dictview.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-dictview.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-dictview.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.o: src/ui/gui/psppire-empty-list-store.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-empty-list-store.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.o `test -f 'src/ui/gui/psppire-empty-list-store.c' || echo '$(srcdir)/'`src/ui/gui/psppire-empty-list-store.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-empty-list-store.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-empty-list-store.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-empty-list-store.c' object='src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.o `test -f 'src/ui/gui/psppire-empty-list-store.c' || echo '$(srcdir)/'`src/ui/gui/psppire-empty-list-store.c src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.obj: src/ui/gui/psppire-empty-list-store.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-empty-list-store.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.obj `if test -f 'src/ui/gui/psppire-empty-list-store.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-empty-list-store.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-empty-list-store.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-empty-list-store.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-empty-list-store.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-empty-list-store.c' object='src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-empty-list-store.obj `if test -f 'src/ui/gui/psppire-empty-list-store.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-empty-list-store.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-empty-list-store.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.o: src/ui/gui/psppire-encoding-selector.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-encoding-selector.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.o `test -f 'src/ui/gui/psppire-encoding-selector.c' || echo '$(srcdir)/'`src/ui/gui/psppire-encoding-selector.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-encoding-selector.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-encoding-selector.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-encoding-selector.c' object='src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.o `test -f 'src/ui/gui/psppire-encoding-selector.c' || echo '$(srcdir)/'`src/ui/gui/psppire-encoding-selector.c src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.obj: src/ui/gui/psppire-encoding-selector.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-encoding-selector.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.obj `if test -f 'src/ui/gui/psppire-encoding-selector.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-encoding-selector.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-encoding-selector.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-encoding-selector.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-encoding-selector.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-encoding-selector.c' object='src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-encoding-selector.obj `if test -f 'src/ui/gui/psppire-encoding-selector.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-encoding-selector.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-encoding-selector.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-format.o: src/ui/gui/psppire-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-format.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-format.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-format.o `test -f 'src/ui/gui/psppire-format.c' || echo '$(srcdir)/'`src/ui/gui/psppire-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-format.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-format.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-format.c' object='src/ui/gui/src_ui_gui_psppire-psppire-format.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-format.o `test -f 'src/ui/gui/psppire-format.c' || echo '$(srcdir)/'`src/ui/gui/psppire-format.c src/ui/gui/src_ui_gui_psppire-psppire-format.obj: src/ui/gui/psppire-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-format.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-format.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-format.obj `if test -f 'src/ui/gui/psppire-format.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-format.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-format.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-format.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-format.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-format.c' object='src/ui/gui/src_ui_gui_psppire-psppire-format.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-format.obj `if test -f 'src/ui/gui/psppire-format.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-format.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-format.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.o: src/ui/gui/psppire-lex-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-lex-reader.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.o `test -f 'src/ui/gui/psppire-lex-reader.c' || echo '$(srcdir)/'`src/ui/gui/psppire-lex-reader.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-lex-reader.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-lex-reader.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-lex-reader.c' object='src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.o `test -f 'src/ui/gui/psppire-lex-reader.c' || echo '$(srcdir)/'`src/ui/gui/psppire-lex-reader.c src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.obj: src/ui/gui/psppire-lex-reader.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-lex-reader.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.obj `if test -f 'src/ui/gui/psppire-lex-reader.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-lex-reader.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-lex-reader.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-lex-reader.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-lex-reader.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-lex-reader.c' object='src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-lex-reader.obj `if test -f 'src/ui/gui/psppire-lex-reader.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-lex-reader.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-lex-reader.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-means-layer.o: src/ui/gui/psppire-means-layer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-means-layer.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-means-layer.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-means-layer.o `test -f 'src/ui/gui/psppire-means-layer.c' || echo '$(srcdir)/'`src/ui/gui/psppire-means-layer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-means-layer.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-means-layer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-means-layer.c' object='src/ui/gui/src_ui_gui_psppire-psppire-means-layer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-means-layer.o `test -f 'src/ui/gui/psppire-means-layer.c' || echo '$(srcdir)/'`src/ui/gui/psppire-means-layer.c src/ui/gui/src_ui_gui_psppire-psppire-means-layer.obj: src/ui/gui/psppire-means-layer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-means-layer.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-means-layer.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-means-layer.obj `if test -f 'src/ui/gui/psppire-means-layer.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-means-layer.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-means-layer.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-means-layer.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-means-layer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-means-layer.c' object='src/ui/gui/src_ui_gui_psppire-psppire-means-layer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-means-layer.obj `if test -f 'src/ui/gui/psppire-means-layer.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-means-layer.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-means-layer.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-output-view.o: src/ui/gui/psppire-output-view.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-output-view.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-view.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-output-view.o `test -f 'src/ui/gui/psppire-output-view.c' || echo '$(srcdir)/'`src/ui/gui/psppire-output-view.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-view.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-view.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-output-view.c' object='src/ui/gui/src_ui_gui_psppire-psppire-output-view.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-output-view.o `test -f 'src/ui/gui/psppire-output-view.c' || echo '$(srcdir)/'`src/ui/gui/psppire-output-view.c src/ui/gui/src_ui_gui_psppire-psppire-output-view.obj: src/ui/gui/psppire-output-view.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-output-view.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-view.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-output-view.obj `if test -f 'src/ui/gui/psppire-output-view.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-output-view.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-output-view.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-view.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-view.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-output-view.c' object='src/ui/gui/src_ui_gui_psppire-psppire-output-view.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-output-view.obj `if test -f 'src/ui/gui/psppire-output-view.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-output-view.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-output-view.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-output-window.o: src/ui/gui/psppire-output-window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-output-window.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-window.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-output-window.o `test -f 'src/ui/gui/psppire-output-window.c' || echo '$(srcdir)/'`src/ui/gui/psppire-output-window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-window.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-window.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-output-window.c' object='src/ui/gui/src_ui_gui_psppire-psppire-output-window.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-output-window.o `test -f 'src/ui/gui/psppire-output-window.c' || echo '$(srcdir)/'`src/ui/gui/psppire-output-window.c src/ui/gui/src_ui_gui_psppire-psppire-output-window.obj: src/ui/gui/psppire-output-window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-output-window.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-window.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-output-window.obj `if test -f 'src/ui/gui/psppire-output-window.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-output-window.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-output-window.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-window.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-output-window.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-output-window.c' object='src/ui/gui/src_ui_gui_psppire-psppire-output-window.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-output-window.obj `if test -f 'src/ui/gui/psppire-output-window.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-output-window.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-output-window.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-var-view.o: src/ui/gui/psppire-var-view.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-var-view.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-view.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-view.o `test -f 'src/ui/gui/psppire-var-view.c' || echo '$(srcdir)/'`src/ui/gui/psppire-var-view.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-view.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-view.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-var-view.c' object='src/ui/gui/src_ui_gui_psppire-psppire-var-view.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-view.o `test -f 'src/ui/gui/psppire-var-view.c' || echo '$(srcdir)/'`src/ui/gui/psppire-var-view.c src/ui/gui/src_ui_gui_psppire-psppire-var-view.obj: src/ui/gui/psppire-var-view.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-var-view.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-view.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-view.obj `if test -f 'src/ui/gui/psppire-var-view.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-var-view.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-var-view.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-view.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-view.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-var-view.c' object='src/ui/gui/src_ui_gui_psppire-psppire-var-view.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-view.obj `if test -f 'src/ui/gui/psppire-var-view.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-var-view.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-var-view.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.o: src/ui/gui/psppire-spreadsheet-model.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-spreadsheet-model.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.o `test -f 'src/ui/gui/psppire-spreadsheet-model.c' || echo '$(srcdir)/'`src/ui/gui/psppire-spreadsheet-model.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-spreadsheet-model.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-spreadsheet-model.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-spreadsheet-model.c' object='src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.o `test -f 'src/ui/gui/psppire-spreadsheet-model.c' || echo '$(srcdir)/'`src/ui/gui/psppire-spreadsheet-model.c src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.obj: src/ui/gui/psppire-spreadsheet-model.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-spreadsheet-model.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.obj `if test -f 'src/ui/gui/psppire-spreadsheet-model.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-spreadsheet-model.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-spreadsheet-model.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-spreadsheet-model.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-spreadsheet-model.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-spreadsheet-model.c' object='src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-spreadsheet-model.obj `if test -f 'src/ui/gui/psppire-spreadsheet-model.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-spreadsheet-model.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-spreadsheet-model.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-select-dest.o: src/ui/gui/psppire-select-dest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-select-dest.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-select-dest.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-select-dest.o `test -f 'src/ui/gui/psppire-select-dest.c' || echo '$(srcdir)/'`src/ui/gui/psppire-select-dest.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-select-dest.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-select-dest.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-select-dest.c' object='src/ui/gui/src_ui_gui_psppire-psppire-select-dest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-select-dest.o `test -f 'src/ui/gui/psppire-select-dest.c' || echo '$(srcdir)/'`src/ui/gui/psppire-select-dest.c src/ui/gui/src_ui_gui_psppire-psppire-select-dest.obj: src/ui/gui/psppire-select-dest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-select-dest.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-select-dest.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-select-dest.obj `if test -f 'src/ui/gui/psppire-select-dest.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-select-dest.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-select-dest.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-select-dest.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-select-dest.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-select-dest.c' object='src/ui/gui/src_ui_gui_psppire-psppire-select-dest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-select-dest.obj `if test -f 'src/ui/gui/psppire-select-dest.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-select-dest.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-select-dest.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.o: src/ui/gui/psppire-syntax-window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-syntax-window.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.o `test -f 'src/ui/gui/psppire-syntax-window.c' || echo '$(srcdir)/'`src/ui/gui/psppire-syntax-window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-syntax-window.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-syntax-window.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-syntax-window.c' object='src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.o `test -f 'src/ui/gui/psppire-syntax-window.c' || echo '$(srcdir)/'`src/ui/gui/psppire-syntax-window.c src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.obj: src/ui/gui/psppire-syntax-window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-syntax-window.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.obj `if test -f 'src/ui/gui/psppire-syntax-window.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-syntax-window.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-syntax-window.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-syntax-window.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-syntax-window.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-syntax-window.c' object='src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-syntax-window.obj `if test -f 'src/ui/gui/psppire-syntax-window.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-syntax-window.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-syntax-window.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.o: src/ui/gui/psppire-val-chooser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-val-chooser.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.o `test -f 'src/ui/gui/psppire-val-chooser.c' || echo '$(srcdir)/'`src/ui/gui/psppire-val-chooser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-val-chooser.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-val-chooser.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-val-chooser.c' object='src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.o `test -f 'src/ui/gui/psppire-val-chooser.c' || echo '$(srcdir)/'`src/ui/gui/psppire-val-chooser.c src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.obj: src/ui/gui/psppire-val-chooser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-val-chooser.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.obj `if test -f 'src/ui/gui/psppire-val-chooser.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-val-chooser.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-val-chooser.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-val-chooser.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-val-chooser.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-val-chooser.c' object='src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-val-chooser.obj `if test -f 'src/ui/gui/psppire-val-chooser.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-val-chooser.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-val-chooser.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-value-entry.o: src/ui/gui/psppire-value-entry.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-value-entry.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-value-entry.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-value-entry.o `test -f 'src/ui/gui/psppire-value-entry.c' || echo '$(srcdir)/'`src/ui/gui/psppire-value-entry.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-value-entry.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-value-entry.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-value-entry.c' object='src/ui/gui/src_ui_gui_psppire-psppire-value-entry.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-value-entry.o `test -f 'src/ui/gui/psppire-value-entry.c' || echo '$(srcdir)/'`src/ui/gui/psppire-value-entry.c src/ui/gui/src_ui_gui_psppire-psppire-value-entry.obj: src/ui/gui/psppire-value-entry.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-value-entry.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-value-entry.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-value-entry.obj `if test -f 'src/ui/gui/psppire-value-entry.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-value-entry.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-value-entry.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-value-entry.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-value-entry.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-value-entry.c' object='src/ui/gui/src_ui_gui_psppire-psppire-value-entry.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-value-entry.obj `if test -f 'src/ui/gui/psppire-value-entry.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-value-entry.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-value-entry.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.o: src/ui/gui/psppire-var-ptr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-ptr.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.o `test -f 'src/ui/gui/psppire-var-ptr.c' || echo '$(srcdir)/'`src/ui/gui/psppire-var-ptr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-ptr.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-ptr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-var-ptr.c' object='src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.o `test -f 'src/ui/gui/psppire-var-ptr.c' || echo '$(srcdir)/'`src/ui/gui/psppire-var-ptr.c src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.obj: src/ui/gui/psppire-var-ptr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-ptr.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.obj `if test -f 'src/ui/gui/psppire-var-ptr.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-var-ptr.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-var-ptr.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-ptr.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-ptr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-var-ptr.c' object='src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-ptr.obj `if test -f 'src/ui/gui/psppire-var-ptr.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-var-ptr.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-var-ptr.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.o: src/ui/gui/psppire-var-sheet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-sheet.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.o `test -f 'src/ui/gui/psppire-var-sheet.c' || echo '$(srcdir)/'`src/ui/gui/psppire-var-sheet.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-sheet.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-sheet.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-var-sheet.c' object='src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.o `test -f 'src/ui/gui/psppire-var-sheet.c' || echo '$(srcdir)/'`src/ui/gui/psppire-var-sheet.c src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.obj: src/ui/gui/psppire-var-sheet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-sheet.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.obj `if test -f 'src/ui/gui/psppire-var-sheet.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-var-sheet.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-var-sheet.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-sheet.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-var-sheet.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-var-sheet.c' object='src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-var-sheet.obj `if test -f 'src/ui/gui/psppire-var-sheet.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-var-sheet.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-var-sheet.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-window.o: src/ui/gui/psppire-window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-window.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-window.o `test -f 'src/ui/gui/psppire-window.c' || echo '$(srcdir)/'`src/ui/gui/psppire-window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-window.c' object='src/ui/gui/src_ui_gui_psppire-psppire-window.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-window.o `test -f 'src/ui/gui/psppire-window.c' || echo '$(srcdir)/'`src/ui/gui/psppire-window.c src/ui/gui/src_ui_gui_psppire-psppire-window.obj: src/ui/gui/psppire-window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-window.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-window.obj `if test -f 'src/ui/gui/psppire-window.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-window.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-window.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-window.c' object='src/ui/gui/src_ui_gui_psppire-psppire-window.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-window.obj `if test -f 'src/ui/gui/psppire-window.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-window.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-window.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-window-base.o: src/ui/gui/psppire-window-base.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-window-base.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-base.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-window-base.o `test -f 'src/ui/gui/psppire-window-base.c' || echo '$(srcdir)/'`src/ui/gui/psppire-window-base.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-base.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-base.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-window-base.c' object='src/ui/gui/src_ui_gui_psppire-psppire-window-base.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-window-base.o `test -f 'src/ui/gui/psppire-window-base.c' || echo '$(srcdir)/'`src/ui/gui/psppire-window-base.c src/ui/gui/src_ui_gui_psppire-psppire-window-base.obj: src/ui/gui/psppire-window-base.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-window-base.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-base.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-window-base.obj `if test -f 'src/ui/gui/psppire-window-base.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-window-base.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-window-base.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-base.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-base.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-window-base.c' object='src/ui/gui/src_ui_gui_psppire-psppire-window-base.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-window-base.obj `if test -f 'src/ui/gui/psppire-window-base.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-window-base.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-window-base.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-window-register.o: src/ui/gui/psppire-window-register.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-window-register.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-register.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-window-register.o `test -f 'src/ui/gui/psppire-window-register.c' || echo '$(srcdir)/'`src/ui/gui/psppire-window-register.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-register.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-register.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-window-register.c' object='src/ui/gui/src_ui_gui_psppire-psppire-window-register.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-window-register.o `test -f 'src/ui/gui/psppire-window-register.c' || echo '$(srcdir)/'`src/ui/gui/psppire-window-register.c src/ui/gui/src_ui_gui_psppire-psppire-window-register.obj: src/ui/gui/psppire-window-register.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-window-register.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-register.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-window-register.obj `if test -f 'src/ui/gui/psppire-window-register.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-window-register.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-window-register.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-register.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-window-register.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-window-register.c' object='src/ui/gui/src_ui_gui_psppire-psppire-window-register.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-window-register.obj `if test -f 'src/ui/gui/psppire-window-register.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-window-register.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-window-register.c'; fi` src/ui/gui/src_ui_gui_psppire-t-test-options.o: src/ui/gui/t-test-options.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-t-test-options.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-t-test-options.Tpo -c -o src/ui/gui/src_ui_gui_psppire-t-test-options.o `test -f 'src/ui/gui/t-test-options.c' || echo '$(srcdir)/'`src/ui/gui/t-test-options.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-t-test-options.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-t-test-options.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/t-test-options.c' object='src/ui/gui/src_ui_gui_psppire-t-test-options.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-t-test-options.o `test -f 'src/ui/gui/t-test-options.c' || echo '$(srcdir)/'`src/ui/gui/t-test-options.c src/ui/gui/src_ui_gui_psppire-t-test-options.obj: src/ui/gui/t-test-options.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-t-test-options.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-t-test-options.Tpo -c -o src/ui/gui/src_ui_gui_psppire-t-test-options.obj `if test -f 'src/ui/gui/t-test-options.c'; then $(CYGPATH_W) 'src/ui/gui/t-test-options.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/t-test-options.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-t-test-options.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-t-test-options.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/t-test-options.c' object='src/ui/gui/src_ui_gui_psppire-t-test-options.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-t-test-options.obj `if test -f 'src/ui/gui/t-test-options.c'; then $(CYGPATH_W) 'src/ui/gui/t-test-options.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/t-test-options.c'; fi` src/ui/gui/src_ui_gui_psppire-val-labs-dialog.o: src/ui/gui/val-labs-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-val-labs-dialog.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-val-labs-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-val-labs-dialog.o `test -f 'src/ui/gui/val-labs-dialog.c' || echo '$(srcdir)/'`src/ui/gui/val-labs-dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-val-labs-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-val-labs-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/val-labs-dialog.c' object='src/ui/gui/src_ui_gui_psppire-val-labs-dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-val-labs-dialog.o `test -f 'src/ui/gui/val-labs-dialog.c' || echo '$(srcdir)/'`src/ui/gui/val-labs-dialog.c src/ui/gui/src_ui_gui_psppire-val-labs-dialog.obj: src/ui/gui/val-labs-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-val-labs-dialog.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-val-labs-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-val-labs-dialog.obj `if test -f 'src/ui/gui/val-labs-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/val-labs-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/val-labs-dialog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-val-labs-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-val-labs-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/val-labs-dialog.c' object='src/ui/gui/src_ui_gui_psppire-val-labs-dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-val-labs-dialog.obj `if test -f 'src/ui/gui/val-labs-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/val-labs-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/val-labs-dialog.c'; fi` src/ui/gui/src_ui_gui_psppire-var-display.o: src/ui/gui/var-display.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-var-display.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-display.Tpo -c -o src/ui/gui/src_ui_gui_psppire-var-display.o `test -f 'src/ui/gui/var-display.c' || echo '$(srcdir)/'`src/ui/gui/var-display.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-display.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-display.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/var-display.c' object='src/ui/gui/src_ui_gui_psppire-var-display.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-var-display.o `test -f 'src/ui/gui/var-display.c' || echo '$(srcdir)/'`src/ui/gui/var-display.c src/ui/gui/src_ui_gui_psppire-var-display.obj: src/ui/gui/var-display.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-var-display.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-display.Tpo -c -o src/ui/gui/src_ui_gui_psppire-var-display.obj `if test -f 'src/ui/gui/var-display.c'; then $(CYGPATH_W) 'src/ui/gui/var-display.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/var-display.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-display.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-display.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/var-display.c' object='src/ui/gui/src_ui_gui_psppire-var-display.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-var-display.obj `if test -f 'src/ui/gui/var-display.c'; then $(CYGPATH_W) 'src/ui/gui/var-display.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/var-display.c'; fi` src/ui/gui/src_ui_gui_psppire-var-type-dialog.o: src/ui/gui/var-type-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-var-type-dialog.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-type-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-var-type-dialog.o `test -f 'src/ui/gui/var-type-dialog.c' || echo '$(srcdir)/'`src/ui/gui/var-type-dialog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-type-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-type-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/var-type-dialog.c' object='src/ui/gui/src_ui_gui_psppire-var-type-dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-var-type-dialog.o `test -f 'src/ui/gui/var-type-dialog.c' || echo '$(srcdir)/'`src/ui/gui/var-type-dialog.c src/ui/gui/src_ui_gui_psppire-var-type-dialog.obj: src/ui/gui/var-type-dialog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-var-type-dialog.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-type-dialog.Tpo -c -o src/ui/gui/src_ui_gui_psppire-var-type-dialog.obj `if test -f 'src/ui/gui/var-type-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/var-type-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/var-type-dialog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-type-dialog.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-var-type-dialog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/var-type-dialog.c' object='src/ui/gui/src_ui_gui_psppire-var-type-dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-var-type-dialog.obj `if test -f 'src/ui/gui/var-type-dialog.c'; then $(CYGPATH_W) 'src/ui/gui/var-type-dialog.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/var-type-dialog.c'; fi` src/ui/gui/src_ui_gui_psppire-widget-io.o: src/ui/gui/widget-io.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-widget-io.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widget-io.Tpo -c -o src/ui/gui/src_ui_gui_psppire-widget-io.o `test -f 'src/ui/gui/widget-io.c' || echo '$(srcdir)/'`src/ui/gui/widget-io.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widget-io.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widget-io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/widget-io.c' object='src/ui/gui/src_ui_gui_psppire-widget-io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-widget-io.o `test -f 'src/ui/gui/widget-io.c' || echo '$(srcdir)/'`src/ui/gui/widget-io.c src/ui/gui/src_ui_gui_psppire-widget-io.obj: src/ui/gui/widget-io.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-widget-io.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widget-io.Tpo -c -o src/ui/gui/src_ui_gui_psppire-widget-io.obj `if test -f 'src/ui/gui/widget-io.c'; then $(CYGPATH_W) 'src/ui/gui/widget-io.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/widget-io.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widget-io.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widget-io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/widget-io.c' object='src/ui/gui/src_ui_gui_psppire-widget-io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-widget-io.obj `if test -f 'src/ui/gui/widget-io.c'; then $(CYGPATH_W) 'src/ui/gui/widget-io.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/widget-io.c'; fi` src/ui/gui/src_ui_gui_psppire-widgets.o: src/ui/gui/widgets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-widgets.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widgets.Tpo -c -o src/ui/gui/src_ui_gui_psppire-widgets.o `test -f 'src/ui/gui/widgets.c' || echo '$(srcdir)/'`src/ui/gui/widgets.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widgets.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widgets.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/widgets.c' object='src/ui/gui/src_ui_gui_psppire-widgets.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-widgets.o `test -f 'src/ui/gui/widgets.c' || echo '$(srcdir)/'`src/ui/gui/widgets.c src/ui/gui/src_ui_gui_psppire-widgets.obj: src/ui/gui/widgets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-widgets.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widgets.Tpo -c -o src/ui/gui/src_ui_gui_psppire-widgets.obj `if test -f 'src/ui/gui/widgets.c'; then $(CYGPATH_W) 'src/ui/gui/widgets.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/widgets.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widgets.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-widgets.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/widgets.c' object='src/ui/gui/src_ui_gui_psppire-widgets.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-widgets.obj `if test -f 'src/ui/gui/widgets.c'; then $(CYGPATH_W) 'src/ui/gui/widgets.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/widgets.c'; fi` src/ui/gui/src_ui_gui_psppire-windows-menu.o: src/ui/gui/windows-menu.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-windows-menu.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-windows-menu.Tpo -c -o src/ui/gui/src_ui_gui_psppire-windows-menu.o `test -f 'src/ui/gui/windows-menu.c' || echo '$(srcdir)/'`src/ui/gui/windows-menu.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-windows-menu.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-windows-menu.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/windows-menu.c' object='src/ui/gui/src_ui_gui_psppire-windows-menu.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-windows-menu.o `test -f 'src/ui/gui/windows-menu.c' || echo '$(srcdir)/'`src/ui/gui/windows-menu.c src/ui/gui/src_ui_gui_psppire-windows-menu.obj: src/ui/gui/windows-menu.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-windows-menu.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-windows-menu.Tpo -c -o src/ui/gui/src_ui_gui_psppire-windows-menu.obj `if test -f 'src/ui/gui/windows-menu.c'; then $(CYGPATH_W) 'src/ui/gui/windows-menu.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/windows-menu.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-windows-menu.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-windows-menu.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/windows-menu.c' object='src/ui/gui/src_ui_gui_psppire-windows-menu.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-windows-menu.obj `if test -f 'src/ui/gui/windows-menu.c'; then $(CYGPATH_W) 'src/ui/gui/windows-menu.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/windows-menu.c'; fi` src/ui/gui/src_ui_gui_psppire-psppire-marshal.o: src/ui/gui/psppire-marshal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-marshal.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-marshal.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-marshal.o `test -f 'src/ui/gui/psppire-marshal.c' || echo '$(srcdir)/'`src/ui/gui/psppire-marshal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-marshal.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-marshal.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-marshal.c' object='src/ui/gui/src_ui_gui_psppire-psppire-marshal.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-marshal.o `test -f 'src/ui/gui/psppire-marshal.c' || echo '$(srcdir)/'`src/ui/gui/psppire-marshal.c src/ui/gui/src_ui_gui_psppire-psppire-marshal.obj: src/ui/gui/psppire-marshal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-psppire-marshal.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-marshal.Tpo -c -o src/ui/gui/src_ui_gui_psppire-psppire-marshal.obj `if test -f 'src/ui/gui/psppire-marshal.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-marshal.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-marshal.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-marshal.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-psppire-marshal.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-marshal.c' object='src/ui/gui/src_ui_gui_psppire-psppire-marshal.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-psppire-marshal.obj `if test -f 'src/ui/gui/psppire-marshal.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-marshal.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-marshal.c'; fi` src/ui/gui/src_ui_gui_psppire-resources.o: src/ui/gui/resources.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-resources.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-resources.Tpo -c -o src/ui/gui/src_ui_gui_psppire-resources.o `test -f 'src/ui/gui/resources.c' || echo '$(srcdir)/'`src/ui/gui/resources.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-resources.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-resources.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/resources.c' object='src/ui/gui/src_ui_gui_psppire-resources.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-resources.o `test -f 'src/ui/gui/resources.c' || echo '$(srcdir)/'`src/ui/gui/resources.c src/ui/gui/src_ui_gui_psppire-resources.obj: src/ui/gui/resources.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_psppire-resources.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-resources.Tpo -c -o src/ui/gui/src_ui_gui_psppire-resources.obj `if test -f 'src/ui/gui/resources.c'; then $(CYGPATH_W) 'src/ui/gui/resources.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/resources.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-resources.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_psppire-resources.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/resources.c' object='src/ui/gui/src_ui_gui_psppire-resources.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_ui_gui_psppire_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_psppire_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_psppire-resources.obj `if test -f 'src/ui/gui/resources.c'; then $(CYGPATH_W) 'src/ui/gui/resources.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/resources.c'; fi` src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.o: src/ui/gui/spreadsheet-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_spreadsheet_test_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-spreadsheet-test.Tpo -c -o src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.o `test -f 'src/ui/gui/spreadsheet-test.c' || echo '$(srcdir)/'`src/ui/gui/spreadsheet-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-spreadsheet-test.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-spreadsheet-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/spreadsheet-test.c' object='src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_spreadsheet_test_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.o `test -f 'src/ui/gui/spreadsheet-test.c' || echo '$(srcdir)/'`src/ui/gui/spreadsheet-test.c src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.obj: src/ui/gui/spreadsheet-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_spreadsheet_test_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-spreadsheet-test.Tpo -c -o src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.obj `if test -f 'src/ui/gui/spreadsheet-test.c'; then $(CYGPATH_W) 'src/ui/gui/spreadsheet-test.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/spreadsheet-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-spreadsheet-test.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-spreadsheet-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/spreadsheet-test.c' object='src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_spreadsheet_test_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_spreadsheet_test-spreadsheet-test.obj `if test -f 'src/ui/gui/spreadsheet-test.c'; then $(CYGPATH_W) 'src/ui/gui/spreadsheet-test.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/spreadsheet-test.c'; fi` src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.o: src/ui/gui/psppire-spreadsheet-model.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_spreadsheet_test_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.o -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.Tpo -c -o src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.o `test -f 'src/ui/gui/psppire-spreadsheet-model.c' || echo '$(srcdir)/'`src/ui/gui/psppire-spreadsheet-model.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-spreadsheet-model.c' object='src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_spreadsheet_test_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.o `test -f 'src/ui/gui/psppire-spreadsheet-model.c' || echo '$(srcdir)/'`src/ui/gui/psppire-spreadsheet-model.c src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.obj: src/ui/gui/psppire-spreadsheet-model.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_spreadsheet_test_CFLAGS) $(CFLAGS) -MT src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.obj -MD -MP -MF src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.Tpo -c -o src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.obj `if test -f 'src/ui/gui/psppire-spreadsheet-model.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-spreadsheet-model.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-spreadsheet-model.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.Tpo src/ui/gui/$(DEPDIR)/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ui/gui/psppire-spreadsheet-model.c' object='src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_ui_gui_spreadsheet_test_CFLAGS) $(CFLAGS) -c -o src/ui/gui/src_ui_gui_spreadsheet_test-psppire-spreadsheet-model.obj `if test -f 'src/ui/gui/psppire-spreadsheet-model.c'; then $(CYGPATH_W) 'src/ui/gui/psppire-spreadsheet-model.c'; else $(CYGPATH_W) '$(srcdir)/src/ui/gui/psppire-spreadsheet-model.c'; fi` tests/data/tests_data_datasheet_test-datasheet-test.o: tests/data/datasheet-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_data_datasheet_test_CFLAGS) $(CFLAGS) -MT tests/data/tests_data_datasheet_test-datasheet-test.o -MD -MP -MF tests/data/$(DEPDIR)/tests_data_datasheet_test-datasheet-test.Tpo -c -o tests/data/tests_data_datasheet_test-datasheet-test.o `test -f 'tests/data/datasheet-test.c' || echo '$(srcdir)/'`tests/data/datasheet-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/data/$(DEPDIR)/tests_data_datasheet_test-datasheet-test.Tpo tests/data/$(DEPDIR)/tests_data_datasheet_test-datasheet-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/data/datasheet-test.c' object='tests/data/tests_data_datasheet_test-datasheet-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_data_datasheet_test_CFLAGS) $(CFLAGS) -c -o tests/data/tests_data_datasheet_test-datasheet-test.o `test -f 'tests/data/datasheet-test.c' || echo '$(srcdir)/'`tests/data/datasheet-test.c tests/data/tests_data_datasheet_test-datasheet-test.obj: tests/data/datasheet-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_data_datasheet_test_CFLAGS) $(CFLAGS) -MT tests/data/tests_data_datasheet_test-datasheet-test.obj -MD -MP -MF tests/data/$(DEPDIR)/tests_data_datasheet_test-datasheet-test.Tpo -c -o tests/data/tests_data_datasheet_test-datasheet-test.obj `if test -f 'tests/data/datasheet-test.c'; then $(CYGPATH_W) 'tests/data/datasheet-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/data/datasheet-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/data/$(DEPDIR)/tests_data_datasheet_test-datasheet-test.Tpo tests/data/$(DEPDIR)/tests_data_datasheet_test-datasheet-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/data/datasheet-test.c' object='tests/data/tests_data_datasheet_test-datasheet-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_data_datasheet_test_CFLAGS) $(CFLAGS) -c -o tests/data/tests_data_datasheet_test-datasheet-test.obj `if test -f 'tests/data/datasheet-test.c'; then $(CYGPATH_W) 'tests/data/datasheet-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/data/datasheet-test.c'; fi` tests/data/tests_data_sack-sack.o: tests/data/sack.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_data_sack_CFLAGS) $(CFLAGS) -MT tests/data/tests_data_sack-sack.o -MD -MP -MF tests/data/$(DEPDIR)/tests_data_sack-sack.Tpo -c -o tests/data/tests_data_sack-sack.o `test -f 'tests/data/sack.c' || echo '$(srcdir)/'`tests/data/sack.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/data/$(DEPDIR)/tests_data_sack-sack.Tpo tests/data/$(DEPDIR)/tests_data_sack-sack.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/data/sack.c' object='tests/data/tests_data_sack-sack.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_data_sack_CFLAGS) $(CFLAGS) -c -o tests/data/tests_data_sack-sack.o `test -f 'tests/data/sack.c' || echo '$(srcdir)/'`tests/data/sack.c tests/data/tests_data_sack-sack.obj: tests/data/sack.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_data_sack_CFLAGS) $(CFLAGS) -MT tests/data/tests_data_sack-sack.obj -MD -MP -MF tests/data/$(DEPDIR)/tests_data_sack-sack.Tpo -c -o tests/data/tests_data_sack-sack.obj `if test -f 'tests/data/sack.c'; then $(CYGPATH_W) 'tests/data/sack.c'; else $(CYGPATH_W) '$(srcdir)/tests/data/sack.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/data/$(DEPDIR)/tests_data_sack-sack.Tpo tests/data/$(DEPDIR)/tests_data_sack-sack.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/data/sack.c' object='tests/data/tests_data_sack-sack.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_data_sack_CFLAGS) $(CFLAGS) -c -o tests/data/tests_data_sack-sack.obj `if test -f 'tests/data/sack.c'; then $(CYGPATH_W) 'tests/data/sack.c'; else $(CYGPATH_W) '$(srcdir)/tests/data/sack.c'; fi` src/data/tests_language_lexer_command_name_test-identifier.o: src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -MT src/data/tests_language_lexer_command_name_test-identifier.o -MD -MP -MF src/data/$(DEPDIR)/tests_language_lexer_command_name_test-identifier.Tpo -c -o src/data/tests_language_lexer_command_name_test-identifier.o `test -f 'src/data/identifier.c' || echo '$(srcdir)/'`src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/tests_language_lexer_command_name_test-identifier.Tpo src/data/$(DEPDIR)/tests_language_lexer_command_name_test-identifier.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/identifier.c' object='src/data/tests_language_lexer_command_name_test-identifier.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -c -o src/data/tests_language_lexer_command_name_test-identifier.o `test -f 'src/data/identifier.c' || echo '$(srcdir)/'`src/data/identifier.c src/data/tests_language_lexer_command_name_test-identifier.obj: src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -MT src/data/tests_language_lexer_command_name_test-identifier.obj -MD -MP -MF src/data/$(DEPDIR)/tests_language_lexer_command_name_test-identifier.Tpo -c -o src/data/tests_language_lexer_command_name_test-identifier.obj `if test -f 'src/data/identifier.c'; then $(CYGPATH_W) 'src/data/identifier.c'; else $(CYGPATH_W) '$(srcdir)/src/data/identifier.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/tests_language_lexer_command_name_test-identifier.Tpo src/data/$(DEPDIR)/tests_language_lexer_command_name_test-identifier.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/identifier.c' object='src/data/tests_language_lexer_command_name_test-identifier.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -c -o src/data/tests_language_lexer_command_name_test-identifier.obj `if test -f 'src/data/identifier.c'; then $(CYGPATH_W) 'src/data/identifier.c'; else $(CYGPATH_W) '$(srcdir)/src/data/identifier.c'; fi` src/language/lexer/tests_language_lexer_command_name_test-command-name.o: src/language/lexer/command-name.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_command_name_test-command-name.o -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name.Tpo -c -o src/language/lexer/tests_language_lexer_command_name_test-command-name.o `test -f 'src/language/lexer/command-name.c' || echo '$(srcdir)/'`src/language/lexer/command-name.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/command-name.c' object='src/language/lexer/tests_language_lexer_command_name_test-command-name.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_command_name_test-command-name.o `test -f 'src/language/lexer/command-name.c' || echo '$(srcdir)/'`src/language/lexer/command-name.c src/language/lexer/tests_language_lexer_command_name_test-command-name.obj: src/language/lexer/command-name.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_command_name_test-command-name.obj -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name.Tpo -c -o src/language/lexer/tests_language_lexer_command_name_test-command-name.obj `if test -f 'src/language/lexer/command-name.c'; then $(CYGPATH_W) 'src/language/lexer/command-name.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/command-name.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/command-name.c' object='src/language/lexer/tests_language_lexer_command_name_test-command-name.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_command_name_test-command-name.obj `if test -f 'src/language/lexer/command-name.c'; then $(CYGPATH_W) 'src/language/lexer/command-name.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/command-name.c'; fi` tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.o: tests/language/lexer/command-name-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -MT tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.o -MD -MP -MF tests/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name-test.Tpo -c -o tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.o `test -f 'tests/language/lexer/command-name-test.c' || echo '$(srcdir)/'`tests/language/lexer/command-name-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name-test.Tpo tests/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/language/lexer/command-name-test.c' object='tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -c -o tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.o `test -f 'tests/language/lexer/command-name-test.c' || echo '$(srcdir)/'`tests/language/lexer/command-name-test.c tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.obj: tests/language/lexer/command-name-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -MT tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.obj -MD -MP -MF tests/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name-test.Tpo -c -o tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.obj `if test -f 'tests/language/lexer/command-name-test.c'; then $(CYGPATH_W) 'tests/language/lexer/command-name-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/language/lexer/command-name-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name-test.Tpo tests/language/lexer/$(DEPDIR)/tests_language_lexer_command_name_test-command-name-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/language/lexer/command-name-test.c' object='tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_command_name_test_CFLAGS) $(CFLAGS) -c -o tests/language/lexer/tests_language_lexer_command_name_test-command-name-test.obj `if test -f 'tests/language/lexer/command-name-test.c'; then $(CYGPATH_W) 'tests/language/lexer/command-name-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/language/lexer/command-name-test.c'; fi` src/data/tests_language_lexer_scan_test-identifier.o: src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT src/data/tests_language_lexer_scan_test-identifier.o -MD -MP -MF src/data/$(DEPDIR)/tests_language_lexer_scan_test-identifier.Tpo -c -o src/data/tests_language_lexer_scan_test-identifier.o `test -f 'src/data/identifier.c' || echo '$(srcdir)/'`src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/tests_language_lexer_scan_test-identifier.Tpo src/data/$(DEPDIR)/tests_language_lexer_scan_test-identifier.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/identifier.c' object='src/data/tests_language_lexer_scan_test-identifier.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o src/data/tests_language_lexer_scan_test-identifier.o `test -f 'src/data/identifier.c' || echo '$(srcdir)/'`src/data/identifier.c src/data/tests_language_lexer_scan_test-identifier.obj: src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT src/data/tests_language_lexer_scan_test-identifier.obj -MD -MP -MF src/data/$(DEPDIR)/tests_language_lexer_scan_test-identifier.Tpo -c -o src/data/tests_language_lexer_scan_test-identifier.obj `if test -f 'src/data/identifier.c'; then $(CYGPATH_W) 'src/data/identifier.c'; else $(CYGPATH_W) '$(srcdir)/src/data/identifier.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/tests_language_lexer_scan_test-identifier.Tpo src/data/$(DEPDIR)/tests_language_lexer_scan_test-identifier.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/identifier.c' object='src/data/tests_language_lexer_scan_test-identifier.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o src/data/tests_language_lexer_scan_test-identifier.obj `if test -f 'src/data/identifier.c'; then $(CYGPATH_W) 'src/data/identifier.c'; else $(CYGPATH_W) '$(srcdir)/src/data/identifier.c'; fi` src/language/lexer/tests_language_lexer_scan_test-command-name.o: src/language/lexer/command-name.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_scan_test-command-name.o -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-command-name.Tpo -c -o src/language/lexer/tests_language_lexer_scan_test-command-name.o `test -f 'src/language/lexer/command-name.c' || echo '$(srcdir)/'`src/language/lexer/command-name.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-command-name.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-command-name.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/command-name.c' object='src/language/lexer/tests_language_lexer_scan_test-command-name.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_scan_test-command-name.o `test -f 'src/language/lexer/command-name.c' || echo '$(srcdir)/'`src/language/lexer/command-name.c src/language/lexer/tests_language_lexer_scan_test-command-name.obj: src/language/lexer/command-name.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_scan_test-command-name.obj -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-command-name.Tpo -c -o src/language/lexer/tests_language_lexer_scan_test-command-name.obj `if test -f 'src/language/lexer/command-name.c'; then $(CYGPATH_W) 'src/language/lexer/command-name.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/command-name.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-command-name.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-command-name.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/command-name.c' object='src/language/lexer/tests_language_lexer_scan_test-command-name.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_scan_test-command-name.obj `if test -f 'src/language/lexer/command-name.c'; then $(CYGPATH_W) 'src/language/lexer/command-name.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/command-name.c'; fi` src/language/lexer/tests_language_lexer_scan_test-scan.o: src/language/lexer/scan.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_scan_test-scan.o -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan.Tpo -c -o src/language/lexer/tests_language_lexer_scan_test-scan.o `test -f 'src/language/lexer/scan.c' || echo '$(srcdir)/'`src/language/lexer/scan.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/scan.c' object='src/language/lexer/tests_language_lexer_scan_test-scan.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_scan_test-scan.o `test -f 'src/language/lexer/scan.c' || echo '$(srcdir)/'`src/language/lexer/scan.c src/language/lexer/tests_language_lexer_scan_test-scan.obj: src/language/lexer/scan.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_scan_test-scan.obj -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan.Tpo -c -o src/language/lexer/tests_language_lexer_scan_test-scan.obj `if test -f 'src/language/lexer/scan.c'; then $(CYGPATH_W) 'src/language/lexer/scan.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/scan.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/scan.c' object='src/language/lexer/tests_language_lexer_scan_test-scan.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_scan_test-scan.obj `if test -f 'src/language/lexer/scan.c'; then $(CYGPATH_W) 'src/language/lexer/scan.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/scan.c'; fi` src/language/lexer/tests_language_lexer_scan_test-segment.o: src/language/lexer/segment.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_scan_test-segment.o -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-segment.Tpo -c -o src/language/lexer/tests_language_lexer_scan_test-segment.o `test -f 'src/language/lexer/segment.c' || echo '$(srcdir)/'`src/language/lexer/segment.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-segment.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-segment.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/segment.c' object='src/language/lexer/tests_language_lexer_scan_test-segment.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_scan_test-segment.o `test -f 'src/language/lexer/segment.c' || echo '$(srcdir)/'`src/language/lexer/segment.c src/language/lexer/tests_language_lexer_scan_test-segment.obj: src/language/lexer/segment.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_scan_test-segment.obj -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-segment.Tpo -c -o src/language/lexer/tests_language_lexer_scan_test-segment.obj `if test -f 'src/language/lexer/segment.c'; then $(CYGPATH_W) 'src/language/lexer/segment.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/segment.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-segment.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-segment.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/segment.c' object='src/language/lexer/tests_language_lexer_scan_test-segment.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_scan_test-segment.obj `if test -f 'src/language/lexer/segment.c'; then $(CYGPATH_W) 'src/language/lexer/segment.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/segment.c'; fi` src/language/lexer/tests_language_lexer_scan_test-token.o: src/language/lexer/token.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_scan_test-token.o -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-token.Tpo -c -o src/language/lexer/tests_language_lexer_scan_test-token.o `test -f 'src/language/lexer/token.c' || echo '$(srcdir)/'`src/language/lexer/token.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-token.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-token.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/token.c' object='src/language/lexer/tests_language_lexer_scan_test-token.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_scan_test-token.o `test -f 'src/language/lexer/token.c' || echo '$(srcdir)/'`src/language/lexer/token.c src/language/lexer/tests_language_lexer_scan_test-token.obj: src/language/lexer/token.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_scan_test-token.obj -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-token.Tpo -c -o src/language/lexer/tests_language_lexer_scan_test-token.obj `if test -f 'src/language/lexer/token.c'; then $(CYGPATH_W) 'src/language/lexer/token.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/token.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-token.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-token.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/token.c' object='src/language/lexer/tests_language_lexer_scan_test-token.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_scan_test-token.obj `if test -f 'src/language/lexer/token.c'; then $(CYGPATH_W) 'src/language/lexer/token.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/token.c'; fi` tests/language/lexer/tests_language_lexer_scan_test-scan-test.o: tests/language/lexer/scan-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT tests/language/lexer/tests_language_lexer_scan_test-scan-test.o -MD -MP -MF tests/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan-test.Tpo -c -o tests/language/lexer/tests_language_lexer_scan_test-scan-test.o `test -f 'tests/language/lexer/scan-test.c' || echo '$(srcdir)/'`tests/language/lexer/scan-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan-test.Tpo tests/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/language/lexer/scan-test.c' object='tests/language/lexer/tests_language_lexer_scan_test-scan-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o tests/language/lexer/tests_language_lexer_scan_test-scan-test.o `test -f 'tests/language/lexer/scan-test.c' || echo '$(srcdir)/'`tests/language/lexer/scan-test.c tests/language/lexer/tests_language_lexer_scan_test-scan-test.obj: tests/language/lexer/scan-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -MT tests/language/lexer/tests_language_lexer_scan_test-scan-test.obj -MD -MP -MF tests/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan-test.Tpo -c -o tests/language/lexer/tests_language_lexer_scan_test-scan-test.obj `if test -f 'tests/language/lexer/scan-test.c'; then $(CYGPATH_W) 'tests/language/lexer/scan-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/language/lexer/scan-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan-test.Tpo tests/language/lexer/$(DEPDIR)/tests_language_lexer_scan_test-scan-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/language/lexer/scan-test.c' object='tests/language/lexer/tests_language_lexer_scan_test-scan-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_scan_test_CFLAGS) $(CFLAGS) -c -o tests/language/lexer/tests_language_lexer_scan_test-scan-test.obj `if test -f 'tests/language/lexer/scan-test.c'; then $(CYGPATH_W) 'tests/language/lexer/scan-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/language/lexer/scan-test.c'; fi` src/data/tests_language_lexer_segment_test-identifier.o: src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -MT src/data/tests_language_lexer_segment_test-identifier.o -MD -MP -MF src/data/$(DEPDIR)/tests_language_lexer_segment_test-identifier.Tpo -c -o src/data/tests_language_lexer_segment_test-identifier.o `test -f 'src/data/identifier.c' || echo '$(srcdir)/'`src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/tests_language_lexer_segment_test-identifier.Tpo src/data/$(DEPDIR)/tests_language_lexer_segment_test-identifier.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/identifier.c' object='src/data/tests_language_lexer_segment_test-identifier.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -c -o src/data/tests_language_lexer_segment_test-identifier.o `test -f 'src/data/identifier.c' || echo '$(srcdir)/'`src/data/identifier.c src/data/tests_language_lexer_segment_test-identifier.obj: src/data/identifier.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -MT src/data/tests_language_lexer_segment_test-identifier.obj -MD -MP -MF src/data/$(DEPDIR)/tests_language_lexer_segment_test-identifier.Tpo -c -o src/data/tests_language_lexer_segment_test-identifier.obj `if test -f 'src/data/identifier.c'; then $(CYGPATH_W) 'src/data/identifier.c'; else $(CYGPATH_W) '$(srcdir)/src/data/identifier.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/data/$(DEPDIR)/tests_language_lexer_segment_test-identifier.Tpo src/data/$(DEPDIR)/tests_language_lexer_segment_test-identifier.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/data/identifier.c' object='src/data/tests_language_lexer_segment_test-identifier.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -c -o src/data/tests_language_lexer_segment_test-identifier.obj `if test -f 'src/data/identifier.c'; then $(CYGPATH_W) 'src/data/identifier.c'; else $(CYGPATH_W) '$(srcdir)/src/data/identifier.c'; fi` src/language/lexer/tests_language_lexer_segment_test-command-name.o: src/language/lexer/command-name.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_segment_test-command-name.o -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-command-name.Tpo -c -o src/language/lexer/tests_language_lexer_segment_test-command-name.o `test -f 'src/language/lexer/command-name.c' || echo '$(srcdir)/'`src/language/lexer/command-name.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-command-name.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-command-name.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/command-name.c' object='src/language/lexer/tests_language_lexer_segment_test-command-name.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_segment_test-command-name.o `test -f 'src/language/lexer/command-name.c' || echo '$(srcdir)/'`src/language/lexer/command-name.c src/language/lexer/tests_language_lexer_segment_test-command-name.obj: src/language/lexer/command-name.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_segment_test-command-name.obj -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-command-name.Tpo -c -o src/language/lexer/tests_language_lexer_segment_test-command-name.obj `if test -f 'src/language/lexer/command-name.c'; then $(CYGPATH_W) 'src/language/lexer/command-name.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/command-name.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-command-name.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-command-name.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/command-name.c' object='src/language/lexer/tests_language_lexer_segment_test-command-name.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_segment_test-command-name.obj `if test -f 'src/language/lexer/command-name.c'; then $(CYGPATH_W) 'src/language/lexer/command-name.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/command-name.c'; fi` src/language/lexer/tests_language_lexer_segment_test-segment.o: src/language/lexer/segment.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_segment_test-segment.o -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment.Tpo -c -o src/language/lexer/tests_language_lexer_segment_test-segment.o `test -f 'src/language/lexer/segment.c' || echo '$(srcdir)/'`src/language/lexer/segment.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/segment.c' object='src/language/lexer/tests_language_lexer_segment_test-segment.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_segment_test-segment.o `test -f 'src/language/lexer/segment.c' || echo '$(srcdir)/'`src/language/lexer/segment.c src/language/lexer/tests_language_lexer_segment_test-segment.obj: src/language/lexer/segment.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -MT src/language/lexer/tests_language_lexer_segment_test-segment.obj -MD -MP -MF src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment.Tpo -c -o src/language/lexer/tests_language_lexer_segment_test-segment.obj `if test -f 'src/language/lexer/segment.c'; then $(CYGPATH_W) 'src/language/lexer/segment.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/segment.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment.Tpo src/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/language/lexer/segment.c' object='src/language/lexer/tests_language_lexer_segment_test-segment.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -c -o src/language/lexer/tests_language_lexer_segment_test-segment.obj `if test -f 'src/language/lexer/segment.c'; then $(CYGPATH_W) 'src/language/lexer/segment.c'; else $(CYGPATH_W) '$(srcdir)/src/language/lexer/segment.c'; fi` tests/language/lexer/tests_language_lexer_segment_test-segment-test.o: tests/language/lexer/segment-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -MT tests/language/lexer/tests_language_lexer_segment_test-segment-test.o -MD -MP -MF tests/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment-test.Tpo -c -o tests/language/lexer/tests_language_lexer_segment_test-segment-test.o `test -f 'tests/language/lexer/segment-test.c' || echo '$(srcdir)/'`tests/language/lexer/segment-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment-test.Tpo tests/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/language/lexer/segment-test.c' object='tests/language/lexer/tests_language_lexer_segment_test-segment-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -c -o tests/language/lexer/tests_language_lexer_segment_test-segment-test.o `test -f 'tests/language/lexer/segment-test.c' || echo '$(srcdir)/'`tests/language/lexer/segment-test.c tests/language/lexer/tests_language_lexer_segment_test-segment-test.obj: tests/language/lexer/segment-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -MT tests/language/lexer/tests_language_lexer_segment_test-segment-test.obj -MD -MP -MF tests/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment-test.Tpo -c -o tests/language/lexer/tests_language_lexer_segment_test-segment-test.obj `if test -f 'tests/language/lexer/segment-test.c'; then $(CYGPATH_W) 'tests/language/lexer/segment-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/language/lexer/segment-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment-test.Tpo tests/language/lexer/$(DEPDIR)/tests_language_lexer_segment_test-segment-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/language/lexer/segment-test.c' object='tests/language/lexer/tests_language_lexer_segment_test-segment-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_language_lexer_segment_test_CFLAGS) $(CFLAGS) -c -o tests/language/lexer/tests_language_lexer_segment_test-segment-test.obj `if test -f 'tests/language/lexer/segment-test.c'; then $(CYGPATH_W) 'tests/language/lexer/segment-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/language/lexer/segment-test.c'; fi` src/libpspp/tests_libpspp_abt_test-abt.o: src/libpspp/abt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_abt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_abt_test-abt.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt.Tpo -c -o src/libpspp/tests_libpspp_abt_test-abt.o `test -f 'src/libpspp/abt.c' || echo '$(srcdir)/'`src/libpspp/abt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/abt.c' object='src/libpspp/tests_libpspp_abt_test-abt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_abt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_abt_test-abt.o `test -f 'src/libpspp/abt.c' || echo '$(srcdir)/'`src/libpspp/abt.c src/libpspp/tests_libpspp_abt_test-abt.obj: src/libpspp/abt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_abt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_abt_test-abt.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt.Tpo -c -o src/libpspp/tests_libpspp_abt_test-abt.obj `if test -f 'src/libpspp/abt.c'; then $(CYGPATH_W) 'src/libpspp/abt.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/abt.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/abt.c' object='src/libpspp/tests_libpspp_abt_test-abt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_abt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_abt_test-abt.obj `if test -f 'src/libpspp/abt.c'; then $(CYGPATH_W) 'src/libpspp/abt.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/abt.c'; fi` tests/libpspp/tests_libpspp_abt_test-abt-test.o: tests/libpspp/abt-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_abt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_abt_test-abt-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt-test.Tpo -c -o tests/libpspp/tests_libpspp_abt_test-abt-test.o `test -f 'tests/libpspp/abt-test.c' || echo '$(srcdir)/'`tests/libpspp/abt-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/abt-test.c' object='tests/libpspp/tests_libpspp_abt_test-abt-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_abt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_abt_test-abt-test.o `test -f 'tests/libpspp/abt-test.c' || echo '$(srcdir)/'`tests/libpspp/abt-test.c tests/libpspp/tests_libpspp_abt_test-abt-test.obj: tests/libpspp/abt-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_abt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_abt_test-abt-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt-test.Tpo -c -o tests/libpspp/tests_libpspp_abt_test-abt-test.obj `if test -f 'tests/libpspp/abt-test.c'; then $(CYGPATH_W) 'tests/libpspp/abt-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/abt-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_abt_test-abt-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/abt-test.c' object='tests/libpspp/tests_libpspp_abt_test-abt-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_abt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_abt_test-abt-test.obj `if test -f 'tests/libpspp/abt-test.c'; then $(CYGPATH_W) 'tests/libpspp/abt-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/abt-test.c'; fi` src/libpspp/tests_libpspp_bt_test-bt.o: src/libpspp/bt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_bt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_bt_test-bt.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt.Tpo -c -o src/libpspp/tests_libpspp_bt_test-bt.o `test -f 'src/libpspp/bt.c' || echo '$(srcdir)/'`src/libpspp/bt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/bt.c' object='src/libpspp/tests_libpspp_bt_test-bt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_bt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_bt_test-bt.o `test -f 'src/libpspp/bt.c' || echo '$(srcdir)/'`src/libpspp/bt.c src/libpspp/tests_libpspp_bt_test-bt.obj: src/libpspp/bt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_bt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_bt_test-bt.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt.Tpo -c -o src/libpspp/tests_libpspp_bt_test-bt.obj `if test -f 'src/libpspp/bt.c'; then $(CYGPATH_W) 'src/libpspp/bt.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/bt.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/bt.c' object='src/libpspp/tests_libpspp_bt_test-bt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_bt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_bt_test-bt.obj `if test -f 'src/libpspp/bt.c'; then $(CYGPATH_W) 'src/libpspp/bt.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/bt.c'; fi` tests/libpspp/tests_libpspp_bt_test-bt-test.o: tests/libpspp/bt-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_bt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_bt_test-bt-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt-test.Tpo -c -o tests/libpspp/tests_libpspp_bt_test-bt-test.o `test -f 'tests/libpspp/bt-test.c' || echo '$(srcdir)/'`tests/libpspp/bt-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/bt-test.c' object='tests/libpspp/tests_libpspp_bt_test-bt-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_bt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_bt_test-bt-test.o `test -f 'tests/libpspp/bt-test.c' || echo '$(srcdir)/'`tests/libpspp/bt-test.c tests/libpspp/tests_libpspp_bt_test-bt-test.obj: tests/libpspp/bt-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_bt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_bt_test-bt-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt-test.Tpo -c -o tests/libpspp/tests_libpspp_bt_test-bt-test.obj `if test -f 'tests/libpspp/bt-test.c'; then $(CYGPATH_W) 'tests/libpspp/bt-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/bt-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_bt_test-bt-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/bt-test.c' object='tests/libpspp/tests_libpspp_bt_test-bt-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_bt_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_bt_test-bt-test.obj `if test -f 'tests/libpspp/bt-test.c'; then $(CYGPATH_W) 'tests/libpspp/bt-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/bt-test.c'; fi` src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.o: src/libpspp/cmac-aes256.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_cmac_aes256_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256.Tpo -c -o src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.o `test -f 'src/libpspp/cmac-aes256.c' || echo '$(srcdir)/'`src/libpspp/cmac-aes256.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/cmac-aes256.c' object='src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_cmac_aes256_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.o `test -f 'src/libpspp/cmac-aes256.c' || echo '$(srcdir)/'`src/libpspp/cmac-aes256.c src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.obj: src/libpspp/cmac-aes256.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_cmac_aes256_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256.Tpo -c -o src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.obj `if test -f 'src/libpspp/cmac-aes256.c'; then $(CYGPATH_W) 'src/libpspp/cmac-aes256.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/cmac-aes256.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/cmac-aes256.c' object='src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_cmac_aes256_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256.obj `if test -f 'src/libpspp/cmac-aes256.c'; then $(CYGPATH_W) 'src/libpspp/cmac-aes256.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/cmac-aes256.c'; fi` tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.o: tests/libpspp/cmac-aes256-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_cmac_aes256_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256-test.Tpo -c -o tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.o `test -f 'tests/libpspp/cmac-aes256-test.c' || echo '$(srcdir)/'`tests/libpspp/cmac-aes256-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/cmac-aes256-test.c' object='tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_cmac_aes256_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.o `test -f 'tests/libpspp/cmac-aes256-test.c' || echo '$(srcdir)/'`tests/libpspp/cmac-aes256-test.c tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.obj: tests/libpspp/cmac-aes256-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_cmac_aes256_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256-test.Tpo -c -o tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.obj `if test -f 'tests/libpspp/cmac-aes256-test.c'; then $(CYGPATH_W) 'tests/libpspp/cmac-aes256-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/cmac-aes256-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_cmac_aes256_test-cmac-aes256-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/cmac-aes256-test.c' object='tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_cmac_aes256_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_cmac_aes256_test-cmac-aes256-test.obj `if test -f 'tests/libpspp/cmac-aes256-test.c'; then $(CYGPATH_W) 'tests/libpspp/cmac-aes256-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/cmac-aes256-test.c'; fi` tests/libpspp/tests_libpspp_heap_test-heap-test.o: tests/libpspp/heap-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_heap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_heap_test-heap-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_heap_test-heap-test.Tpo -c -o tests/libpspp/tests_libpspp_heap_test-heap-test.o `test -f 'tests/libpspp/heap-test.c' || echo '$(srcdir)/'`tests/libpspp/heap-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_heap_test-heap-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_heap_test-heap-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/heap-test.c' object='tests/libpspp/tests_libpspp_heap_test-heap-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_heap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_heap_test-heap-test.o `test -f 'tests/libpspp/heap-test.c' || echo '$(srcdir)/'`tests/libpspp/heap-test.c tests/libpspp/tests_libpspp_heap_test-heap-test.obj: tests/libpspp/heap-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_heap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_heap_test-heap-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_heap_test-heap-test.Tpo -c -o tests/libpspp/tests_libpspp_heap_test-heap-test.obj `if test -f 'tests/libpspp/heap-test.c'; then $(CYGPATH_W) 'tests/libpspp/heap-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/heap-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_heap_test-heap-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_heap_test-heap-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/heap-test.c' object='tests/libpspp/tests_libpspp_heap_test-heap-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_heap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_heap_test-heap-test.obj `if test -f 'tests/libpspp/heap-test.c'; then $(CYGPATH_W) 'tests/libpspp/heap-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/heap-test.c'; fi` src/libpspp/tests_libpspp_hmap_test-hmap.o: src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_hmap_test-hmap.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap.Tpo -c -o src/libpspp/tests_libpspp_hmap_test-hmap.o `test -f 'src/libpspp/hmap.c' || echo '$(srcdir)/'`src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hmap.c' object='src/libpspp/tests_libpspp_hmap_test-hmap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_hmap_test-hmap.o `test -f 'src/libpspp/hmap.c' || echo '$(srcdir)/'`src/libpspp/hmap.c src/libpspp/tests_libpspp_hmap_test-hmap.obj: src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_hmap_test-hmap.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap.Tpo -c -o src/libpspp/tests_libpspp_hmap_test-hmap.obj `if test -f 'src/libpspp/hmap.c'; then $(CYGPATH_W) 'src/libpspp/hmap.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/hmap.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hmap.c' object='src/libpspp/tests_libpspp_hmap_test-hmap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_hmap_test-hmap.obj `if test -f 'src/libpspp/hmap.c'; then $(CYGPATH_W) 'src/libpspp/hmap.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/hmap.c'; fi` tests/libpspp/tests_libpspp_hmap_test-hmap-test.o: tests/libpspp/hmap-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_hmap_test-hmap-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap-test.Tpo -c -o tests/libpspp/tests_libpspp_hmap_test-hmap-test.o `test -f 'tests/libpspp/hmap-test.c' || echo '$(srcdir)/'`tests/libpspp/hmap-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/hmap-test.c' object='tests/libpspp/tests_libpspp_hmap_test-hmap-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_hmap_test-hmap-test.o `test -f 'tests/libpspp/hmap-test.c' || echo '$(srcdir)/'`tests/libpspp/hmap-test.c tests/libpspp/tests_libpspp_hmap_test-hmap-test.obj: tests/libpspp/hmap-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_hmap_test-hmap-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap-test.Tpo -c -o tests/libpspp/tests_libpspp_hmap_test-hmap-test.obj `if test -f 'tests/libpspp/hmap-test.c'; then $(CYGPATH_W) 'tests/libpspp/hmap-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/hmap-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_hmap_test-hmap-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/hmap-test.c' object='tests/libpspp/tests_libpspp_hmap_test-hmap-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmap_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_hmap_test-hmap-test.obj `if test -f 'tests/libpspp/hmap-test.c'; then $(CYGPATH_W) 'tests/libpspp/hmap-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/hmap-test.c'; fi` src/libpspp/tests_libpspp_hmapx_test-hmap.o: src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_hmapx_test-hmap.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmap.Tpo -c -o src/libpspp/tests_libpspp_hmapx_test-hmap.o `test -f 'src/libpspp/hmap.c' || echo '$(srcdir)/'`src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmap.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hmap.c' object='src/libpspp/tests_libpspp_hmapx_test-hmap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_hmapx_test-hmap.o `test -f 'src/libpspp/hmap.c' || echo '$(srcdir)/'`src/libpspp/hmap.c src/libpspp/tests_libpspp_hmapx_test-hmap.obj: src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_hmapx_test-hmap.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmap.Tpo -c -o src/libpspp/tests_libpspp_hmapx_test-hmap.obj `if test -f 'src/libpspp/hmap.c'; then $(CYGPATH_W) 'src/libpspp/hmap.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/hmap.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmap.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hmap.c' object='src/libpspp/tests_libpspp_hmapx_test-hmap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_hmapx_test-hmap.obj `if test -f 'src/libpspp/hmap.c'; then $(CYGPATH_W) 'src/libpspp/hmap.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/hmap.c'; fi` src/libpspp/tests_libpspp_hmapx_test-hmapx.o: src/libpspp/hmapx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_hmapx_test-hmapx.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx.Tpo -c -o src/libpspp/tests_libpspp_hmapx_test-hmapx.o `test -f 'src/libpspp/hmapx.c' || echo '$(srcdir)/'`src/libpspp/hmapx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hmapx.c' object='src/libpspp/tests_libpspp_hmapx_test-hmapx.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_hmapx_test-hmapx.o `test -f 'src/libpspp/hmapx.c' || echo '$(srcdir)/'`src/libpspp/hmapx.c src/libpspp/tests_libpspp_hmapx_test-hmapx.obj: src/libpspp/hmapx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_hmapx_test-hmapx.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx.Tpo -c -o src/libpspp/tests_libpspp_hmapx_test-hmapx.obj `if test -f 'src/libpspp/hmapx.c'; then $(CYGPATH_W) 'src/libpspp/hmapx.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/hmapx.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hmapx.c' object='src/libpspp/tests_libpspp_hmapx_test-hmapx.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_hmapx_test-hmapx.obj `if test -f 'src/libpspp/hmapx.c'; then $(CYGPATH_W) 'src/libpspp/hmapx.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/hmapx.c'; fi` tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.o: tests/libpspp/hmapx-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx-test.Tpo -c -o tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.o `test -f 'tests/libpspp/hmapx-test.c' || echo '$(srcdir)/'`tests/libpspp/hmapx-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/hmapx-test.c' object='tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.o `test -f 'tests/libpspp/hmapx-test.c' || echo '$(srcdir)/'`tests/libpspp/hmapx-test.c tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.obj: tests/libpspp/hmapx-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx-test.Tpo -c -o tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.obj `if test -f 'tests/libpspp/hmapx-test.c'; then $(CYGPATH_W) 'tests/libpspp/hmapx-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/hmapx-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_hmapx_test-hmapx-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/hmapx-test.c' object='tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_hmapx_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_hmapx_test-hmapx-test.obj `if test -f 'tests/libpspp/hmapx-test.c'; then $(CYGPATH_W) 'tests/libpspp/hmapx-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/hmapx-test.c'; fi` src/libpspp/tests_libpspp_ll_test-ll.o: src/libpspp/ll.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_ll_test_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_ll_test-ll.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll.Tpo -c -o src/libpspp/tests_libpspp_ll_test-ll.o `test -f 'src/libpspp/ll.c' || echo '$(srcdir)/'`src/libpspp/ll.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/ll.c' object='src/libpspp/tests_libpspp_ll_test-ll.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_ll_test_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_ll_test-ll.o `test -f 'src/libpspp/ll.c' || echo '$(srcdir)/'`src/libpspp/ll.c src/libpspp/tests_libpspp_ll_test-ll.obj: src/libpspp/ll.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_ll_test_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_ll_test-ll.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll.Tpo -c -o src/libpspp/tests_libpspp_ll_test-ll.obj `if test -f 'src/libpspp/ll.c'; then $(CYGPATH_W) 'src/libpspp/ll.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/ll.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/ll.c' object='src/libpspp/tests_libpspp_ll_test-ll.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_ll_test_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_ll_test-ll.obj `if test -f 'src/libpspp/ll.c'; then $(CYGPATH_W) 'src/libpspp/ll.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/ll.c'; fi` tests/libpspp/tests_libpspp_ll_test-ll-test.o: tests/libpspp/ll-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_ll_test_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_ll_test-ll-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll-test.Tpo -c -o tests/libpspp/tests_libpspp_ll_test-ll-test.o `test -f 'tests/libpspp/ll-test.c' || echo '$(srcdir)/'`tests/libpspp/ll-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/ll-test.c' object='tests/libpspp/tests_libpspp_ll_test-ll-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_ll_test_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_ll_test-ll-test.o `test -f 'tests/libpspp/ll-test.c' || echo '$(srcdir)/'`tests/libpspp/ll-test.c tests/libpspp/tests_libpspp_ll_test-ll-test.obj: tests/libpspp/ll-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_ll_test_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_ll_test-ll-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll-test.Tpo -c -o tests/libpspp/tests_libpspp_ll_test-ll-test.obj `if test -f 'tests/libpspp/ll-test.c'; then $(CYGPATH_W) 'tests/libpspp/ll-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/ll-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_ll_test-ll-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/ll-test.c' object='tests/libpspp/tests_libpspp_ll_test-ll-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_ll_test_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_ll_test-ll-test.obj `if test -f 'tests/libpspp/ll-test.c'; then $(CYGPATH_W) 'tests/libpspp/ll-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/ll-test.c'; fi` src/libpspp/tests_libpspp_llx_test-ll.o: src/libpspp/ll.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_llx_test-ll.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-ll.Tpo -c -o src/libpspp/tests_libpspp_llx_test-ll.o `test -f 'src/libpspp/ll.c' || echo '$(srcdir)/'`src/libpspp/ll.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-ll.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-ll.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/ll.c' object='src/libpspp/tests_libpspp_llx_test-ll.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_llx_test-ll.o `test -f 'src/libpspp/ll.c' || echo '$(srcdir)/'`src/libpspp/ll.c src/libpspp/tests_libpspp_llx_test-ll.obj: src/libpspp/ll.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_llx_test-ll.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-ll.Tpo -c -o src/libpspp/tests_libpspp_llx_test-ll.obj `if test -f 'src/libpspp/ll.c'; then $(CYGPATH_W) 'src/libpspp/ll.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/ll.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-ll.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-ll.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/ll.c' object='src/libpspp/tests_libpspp_llx_test-ll.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_llx_test-ll.obj `if test -f 'src/libpspp/ll.c'; then $(CYGPATH_W) 'src/libpspp/ll.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/ll.c'; fi` src/libpspp/tests_libpspp_llx_test-llx.o: src/libpspp/llx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_llx_test-llx.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx.Tpo -c -o src/libpspp/tests_libpspp_llx_test-llx.o `test -f 'src/libpspp/llx.c' || echo '$(srcdir)/'`src/libpspp/llx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/llx.c' object='src/libpspp/tests_libpspp_llx_test-llx.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_llx_test-llx.o `test -f 'src/libpspp/llx.c' || echo '$(srcdir)/'`src/libpspp/llx.c src/libpspp/tests_libpspp_llx_test-llx.obj: src/libpspp/llx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_llx_test-llx.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx.Tpo -c -o src/libpspp/tests_libpspp_llx_test-llx.obj `if test -f 'src/libpspp/llx.c'; then $(CYGPATH_W) 'src/libpspp/llx.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/llx.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/llx.c' object='src/libpspp/tests_libpspp_llx_test-llx.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_llx_test-llx.obj `if test -f 'src/libpspp/llx.c'; then $(CYGPATH_W) 'src/libpspp/llx.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/llx.c'; fi` tests/libpspp/tests_libpspp_llx_test-llx-test.o: tests/libpspp/llx-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_llx_test-llx-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx-test.Tpo -c -o tests/libpspp/tests_libpspp_llx_test-llx-test.o `test -f 'tests/libpspp/llx-test.c' || echo '$(srcdir)/'`tests/libpspp/llx-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/llx-test.c' object='tests/libpspp/tests_libpspp_llx_test-llx-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_llx_test-llx-test.o `test -f 'tests/libpspp/llx-test.c' || echo '$(srcdir)/'`tests/libpspp/llx-test.c tests/libpspp/tests_libpspp_llx_test-llx-test.obj: tests/libpspp/llx-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_llx_test-llx-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx-test.Tpo -c -o tests/libpspp/tests_libpspp_llx_test-llx-test.obj `if test -f 'tests/libpspp/llx-test.c'; then $(CYGPATH_W) 'tests/libpspp/llx-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/llx-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_llx_test-llx-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/llx-test.c' object='tests/libpspp/tests_libpspp_llx_test-llx-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_llx_test_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_llx_test-llx-test.obj `if test -f 'tests/libpspp/llx-test.c'; then $(CYGPATH_W) 'tests/libpspp/llx-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/llx-test.c'; fi` src/libpspp/tests_libpspp_range_map_test-bt.o: src/libpspp/bt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_range_map_test-bt.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-bt.Tpo -c -o src/libpspp/tests_libpspp_range_map_test-bt.o `test -f 'src/libpspp/bt.c' || echo '$(srcdir)/'`src/libpspp/bt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-bt.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-bt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/bt.c' object='src/libpspp/tests_libpspp_range_map_test-bt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_range_map_test-bt.o `test -f 'src/libpspp/bt.c' || echo '$(srcdir)/'`src/libpspp/bt.c src/libpspp/tests_libpspp_range_map_test-bt.obj: src/libpspp/bt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_range_map_test-bt.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-bt.Tpo -c -o src/libpspp/tests_libpspp_range_map_test-bt.obj `if test -f 'src/libpspp/bt.c'; then $(CYGPATH_W) 'src/libpspp/bt.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/bt.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-bt.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-bt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/bt.c' object='src/libpspp/tests_libpspp_range_map_test-bt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_range_map_test-bt.obj `if test -f 'src/libpspp/bt.c'; then $(CYGPATH_W) 'src/libpspp/bt.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/bt.c'; fi` src/libpspp/tests_libpspp_range_map_test-range-map.o: src/libpspp/range-map.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_range_map_test-range-map.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map.Tpo -c -o src/libpspp/tests_libpspp_range_map_test-range-map.o `test -f 'src/libpspp/range-map.c' || echo '$(srcdir)/'`src/libpspp/range-map.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/range-map.c' object='src/libpspp/tests_libpspp_range_map_test-range-map.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_range_map_test-range-map.o `test -f 'src/libpspp/range-map.c' || echo '$(srcdir)/'`src/libpspp/range-map.c src/libpspp/tests_libpspp_range_map_test-range-map.obj: src/libpspp/range-map.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_range_map_test-range-map.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map.Tpo -c -o src/libpspp/tests_libpspp_range_map_test-range-map.obj `if test -f 'src/libpspp/range-map.c'; then $(CYGPATH_W) 'src/libpspp/range-map.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/range-map.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/range-map.c' object='src/libpspp/tests_libpspp_range_map_test-range-map.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_range_map_test-range-map.obj `if test -f 'src/libpspp/range-map.c'; then $(CYGPATH_W) 'src/libpspp/range-map.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/range-map.c'; fi` tests/libpspp/tests_libpspp_range_map_test-range-map-test.o: tests/libpspp/range-map-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_range_map_test-range-map-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map-test.Tpo -c -o tests/libpspp/tests_libpspp_range_map_test-range-map-test.o `test -f 'tests/libpspp/range-map-test.c' || echo '$(srcdir)/'`tests/libpspp/range-map-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/range-map-test.c' object='tests/libpspp/tests_libpspp_range_map_test-range-map-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_range_map_test-range-map-test.o `test -f 'tests/libpspp/range-map-test.c' || echo '$(srcdir)/'`tests/libpspp/range-map-test.c tests/libpspp/tests_libpspp_range_map_test-range-map-test.obj: tests/libpspp/range-map-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_range_map_test-range-map-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map-test.Tpo -c -o tests/libpspp/tests_libpspp_range_map_test-range-map-test.obj `if test -f 'tests/libpspp/range-map-test.c'; then $(CYGPATH_W) 'tests/libpspp/range-map-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/range-map-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_range_map_test-range-map-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/range-map-test.c' object='tests/libpspp/tests_libpspp_range_map_test-range-map-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_range_map_test-range-map-test.obj `if test -f 'tests/libpspp/range-map-test.c'; then $(CYGPATH_W) 'tests/libpspp/range-map-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/range-map-test.c'; fi` tests/libpspp/tests_libpspp_range_set_test-range-set-test.o: tests/libpspp/range-set-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_range_set_test-range-set-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_range_set_test-range-set-test.Tpo -c -o tests/libpspp/tests_libpspp_range_set_test-range-set-test.o `test -f 'tests/libpspp/range-set-test.c' || echo '$(srcdir)/'`tests/libpspp/range-set-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_range_set_test-range-set-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_range_set_test-range-set-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/range-set-test.c' object='tests/libpspp/tests_libpspp_range_set_test-range-set-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_range_set_test-range-set-test.o `test -f 'tests/libpspp/range-set-test.c' || echo '$(srcdir)/'`tests/libpspp/range-set-test.c tests/libpspp/tests_libpspp_range_set_test-range-set-test.obj: tests/libpspp/range-set-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_range_set_test-range-set-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_range_set_test-range-set-test.Tpo -c -o tests/libpspp/tests_libpspp_range_set_test-range-set-test.obj `if test -f 'tests/libpspp/range-set-test.c'; then $(CYGPATH_W) 'tests/libpspp/range-set-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/range-set-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_range_set_test-range-set-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_range_set_test-range-set-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/range-set-test.c' object='tests/libpspp/tests_libpspp_range_set_test-range-set-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_range_set_test-range-set-test.obj `if test -f 'tests/libpspp/range-set-test.c'; then $(CYGPATH_W) 'tests/libpspp/range-set-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/range-set-test.c'; fi` tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.o: tests/libpspp/range-tower-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_tower_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_range_tower_test-range-tower-test.Tpo -c -o tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.o `test -f 'tests/libpspp/range-tower-test.c' || echo '$(srcdir)/'`tests/libpspp/range-tower-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_range_tower_test-range-tower-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_range_tower_test-range-tower-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/range-tower-test.c' object='tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_tower_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.o `test -f 'tests/libpspp/range-tower-test.c' || echo '$(srcdir)/'`tests/libpspp/range-tower-test.c tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.obj: tests/libpspp/range-tower-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_tower_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_range_tower_test-range-tower-test.Tpo -c -o tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.obj `if test -f 'tests/libpspp/range-tower-test.c'; then $(CYGPATH_W) 'tests/libpspp/range-tower-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/range-tower-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_range_tower_test-range-tower-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_range_tower_test-range-tower-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/range-tower-test.c' object='tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_range_tower_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_range_tower_test-range-tower-test.obj `if test -f 'tests/libpspp/range-tower-test.c'; then $(CYGPATH_W) 'tests/libpspp/range-tower-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/range-tower-test.c'; fi` tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.o: tests/libpspp/sparse-array-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_sparse_array_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_array_test-sparse-array-test.Tpo -c -o tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.o `test -f 'tests/libpspp/sparse-array-test.c' || echo '$(srcdir)/'`tests/libpspp/sparse-array-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_array_test-sparse-array-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_array_test-sparse-array-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/sparse-array-test.c' object='tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_sparse_array_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.o `test -f 'tests/libpspp/sparse-array-test.c' || echo '$(srcdir)/'`tests/libpspp/sparse-array-test.c tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.obj: tests/libpspp/sparse-array-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_sparse_array_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_array_test-sparse-array-test.Tpo -c -o tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.obj `if test -f 'tests/libpspp/sparse-array-test.c'; then $(CYGPATH_W) 'tests/libpspp/sparse-array-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/sparse-array-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_array_test-sparse-array-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_array_test-sparse-array-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/sparse-array-test.c' object='tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_sparse_array_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_sparse_array_test-sparse-array-test.obj `if test -f 'tests/libpspp/sparse-array-test.c'; then $(CYGPATH_W) 'tests/libpspp/sparse-array-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/sparse-array-test.c'; fi` tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.o: tests/libpspp/sparse-xarray-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_sparse_xarray_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_xarray_test-sparse-xarray-test.Tpo -c -o tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.o `test -f 'tests/libpspp/sparse-xarray-test.c' || echo '$(srcdir)/'`tests/libpspp/sparse-xarray-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_xarray_test-sparse-xarray-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_xarray_test-sparse-xarray-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/sparse-xarray-test.c' object='tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_sparse_xarray_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.o `test -f 'tests/libpspp/sparse-xarray-test.c' || echo '$(srcdir)/'`tests/libpspp/sparse-xarray-test.c tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.obj: tests/libpspp/sparse-xarray-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_sparse_xarray_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_xarray_test-sparse-xarray-test.Tpo -c -o tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.obj `if test -f 'tests/libpspp/sparse-xarray-test.c'; then $(CYGPATH_W) 'tests/libpspp/sparse-xarray-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/sparse-xarray-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_xarray_test-sparse-xarray-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_sparse_xarray_test-sparse-xarray-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/sparse-xarray-test.c' object='tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_sparse_xarray_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_sparse_xarray_test-sparse-xarray-test.obj `if test -f 'tests/libpspp/sparse-xarray-test.c'; then $(CYGPATH_W) 'tests/libpspp/sparse-xarray-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/sparse-xarray-test.c'; fi` tests/libpspp/tests_libpspp_string_map_test-string-map-test.o: tests/libpspp/string-map-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_string_map_test-string-map-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_string_map_test-string-map-test.Tpo -c -o tests/libpspp/tests_libpspp_string_map_test-string-map-test.o `test -f 'tests/libpspp/string-map-test.c' || echo '$(srcdir)/'`tests/libpspp/string-map-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_string_map_test-string-map-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_string_map_test-string-map-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/string-map-test.c' object='tests/libpspp/tests_libpspp_string_map_test-string-map-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_string_map_test-string-map-test.o `test -f 'tests/libpspp/string-map-test.c' || echo '$(srcdir)/'`tests/libpspp/string-map-test.c tests/libpspp/tests_libpspp_string_map_test-string-map-test.obj: tests/libpspp/string-map-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_string_map_test-string-map-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_string_map_test-string-map-test.Tpo -c -o tests/libpspp/tests_libpspp_string_map_test-string-map-test.obj `if test -f 'tests/libpspp/string-map-test.c'; then $(CYGPATH_W) 'tests/libpspp/string-map-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/string-map-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_string_map_test-string-map-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_string_map_test-string-map-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/string-map-test.c' object='tests/libpspp/tests_libpspp_string_map_test-string-map-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_string_map_test-string-map-test.obj `if test -f 'tests/libpspp/string-map-test.c'; then $(CYGPATH_W) 'tests/libpspp/string-map-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/string-map-test.c'; fi` src/libpspp/tests_libpspp_string_set_test-hash-functions.o: src/libpspp/hash-functions.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_string_set_test-hash-functions.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hash-functions.Tpo -c -o src/libpspp/tests_libpspp_string_set_test-hash-functions.o `test -f 'src/libpspp/hash-functions.c' || echo '$(srcdir)/'`src/libpspp/hash-functions.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hash-functions.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hash-functions.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hash-functions.c' object='src/libpspp/tests_libpspp_string_set_test-hash-functions.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_string_set_test-hash-functions.o `test -f 'src/libpspp/hash-functions.c' || echo '$(srcdir)/'`src/libpspp/hash-functions.c src/libpspp/tests_libpspp_string_set_test-hash-functions.obj: src/libpspp/hash-functions.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_string_set_test-hash-functions.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hash-functions.Tpo -c -o src/libpspp/tests_libpspp_string_set_test-hash-functions.obj `if test -f 'src/libpspp/hash-functions.c'; then $(CYGPATH_W) 'src/libpspp/hash-functions.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/hash-functions.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hash-functions.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hash-functions.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hash-functions.c' object='src/libpspp/tests_libpspp_string_set_test-hash-functions.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_string_set_test-hash-functions.obj `if test -f 'src/libpspp/hash-functions.c'; then $(CYGPATH_W) 'src/libpspp/hash-functions.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/hash-functions.c'; fi` src/libpspp/tests_libpspp_string_set_test-hmap.o: src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_string_set_test-hmap.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hmap.Tpo -c -o src/libpspp/tests_libpspp_string_set_test-hmap.o `test -f 'src/libpspp/hmap.c' || echo '$(srcdir)/'`src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hmap.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hmap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hmap.c' object='src/libpspp/tests_libpspp_string_set_test-hmap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_string_set_test-hmap.o `test -f 'src/libpspp/hmap.c' || echo '$(srcdir)/'`src/libpspp/hmap.c src/libpspp/tests_libpspp_string_set_test-hmap.obj: src/libpspp/hmap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_string_set_test-hmap.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hmap.Tpo -c -o src/libpspp/tests_libpspp_string_set_test-hmap.obj `if test -f 'src/libpspp/hmap.c'; then $(CYGPATH_W) 'src/libpspp/hmap.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/hmap.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hmap.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-hmap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/hmap.c' object='src/libpspp/tests_libpspp_string_set_test-hmap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_string_set_test-hmap.obj `if test -f 'src/libpspp/hmap.c'; then $(CYGPATH_W) 'src/libpspp/hmap.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/hmap.c'; fi` src/libpspp/tests_libpspp_string_set_test-string-set.o: src/libpspp/string-set.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_string_set_test-string-set.o -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set.Tpo -c -o src/libpspp/tests_libpspp_string_set_test-string-set.o `test -f 'src/libpspp/string-set.c' || echo '$(srcdir)/'`src/libpspp/string-set.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/string-set.c' object='src/libpspp/tests_libpspp_string_set_test-string-set.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_string_set_test-string-set.o `test -f 'src/libpspp/string-set.c' || echo '$(srcdir)/'`src/libpspp/string-set.c src/libpspp/tests_libpspp_string_set_test-string-set.obj: src/libpspp/string-set.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/tests_libpspp_string_set_test-string-set.obj -MD -MP -MF src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set.Tpo -c -o src/libpspp/tests_libpspp_string_set_test-string-set.obj `if test -f 'src/libpspp/string-set.c'; then $(CYGPATH_W) 'src/libpspp/string-set.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/string-set.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set.Tpo src/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/string-set.c' object='src/libpspp/tests_libpspp_string_set_test-string-set.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/tests_libpspp_string_set_test-string-set.obj `if test -f 'src/libpspp/string-set.c'; then $(CYGPATH_W) 'src/libpspp/string-set.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/string-set.c'; fi` tests/libpspp/tests_libpspp_string_set_test-string-set-test.o: tests/libpspp/string-set-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_string_set_test-string-set-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set-test.Tpo -c -o tests/libpspp/tests_libpspp_string_set_test-string-set-test.o `test -f 'tests/libpspp/string-set-test.c' || echo '$(srcdir)/'`tests/libpspp/string-set-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/string-set-test.c' object='tests/libpspp/tests_libpspp_string_set_test-string-set-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_string_set_test-string-set-test.o `test -f 'tests/libpspp/string-set-test.c' || echo '$(srcdir)/'`tests/libpspp/string-set-test.c tests/libpspp/tests_libpspp_string_set_test-string-set-test.obj: tests/libpspp/string-set-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_string_set_test-string-set-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set-test.Tpo -c -o tests/libpspp/tests_libpspp_string_set_test-string-set-test.obj `if test -f 'tests/libpspp/string-set-test.c'; then $(CYGPATH_W) 'tests/libpspp/string-set-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/string-set-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_string_set_test-string-set-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/string-set-test.c' object='tests/libpspp/tests_libpspp_string_set_test-string-set-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_string_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_string_set_test-string-set-test.obj `if test -f 'tests/libpspp/string-set-test.c'; then $(CYGPATH_W) 'tests/libpspp/string-set-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/string-set-test.c'; fi` tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.o: tests/libpspp/stringi-map-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_stringi_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_map_test-stringi-map-test.Tpo -c -o tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.o `test -f 'tests/libpspp/stringi-map-test.c' || echo '$(srcdir)/'`tests/libpspp/stringi-map-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_map_test-stringi-map-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_map_test-stringi-map-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/stringi-map-test.c' object='tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_stringi_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.o `test -f 'tests/libpspp/stringi-map-test.c' || echo '$(srcdir)/'`tests/libpspp/stringi-map-test.c tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.obj: tests/libpspp/stringi-map-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_stringi_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_map_test-stringi-map-test.Tpo -c -o tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.obj `if test -f 'tests/libpspp/stringi-map-test.c'; then $(CYGPATH_W) 'tests/libpspp/stringi-map-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/stringi-map-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_map_test-stringi-map-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_map_test-stringi-map-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/stringi-map-test.c' object='tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_stringi_map_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_stringi_map_test-stringi-map-test.obj `if test -f 'tests/libpspp/stringi-map-test.c'; then $(CYGPATH_W) 'tests/libpspp/stringi-map-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/stringi-map-test.c'; fi` tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.o: tests/libpspp/stringi-set-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_stringi_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_set_test-stringi-set-test.Tpo -c -o tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.o `test -f 'tests/libpspp/stringi-set-test.c' || echo '$(srcdir)/'`tests/libpspp/stringi-set-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_set_test-stringi-set-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_set_test-stringi-set-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/stringi-set-test.c' object='tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_stringi_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.o `test -f 'tests/libpspp/stringi-set-test.c' || echo '$(srcdir)/'`tests/libpspp/stringi-set-test.c tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.obj: tests/libpspp/stringi-set-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_stringi_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_set_test-stringi-set-test.Tpo -c -o tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.obj `if test -f 'tests/libpspp/stringi-set-test.c'; then $(CYGPATH_W) 'tests/libpspp/stringi-set-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/stringi-set-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_set_test-stringi-set-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_stringi_set_test-stringi-set-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/stringi-set-test.c' object='tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_stringi_set_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_stringi_set_test-stringi-set-test.obj `if test -f 'tests/libpspp/stringi-set-test.c'; then $(CYGPATH_W) 'tests/libpspp/stringi-set-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/stringi-set-test.c'; fi` tests/libpspp/tests_libpspp_tower_test-tower-test.o: tests/libpspp/tower-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_tower_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_tower_test-tower-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_tower_test-tower-test.Tpo -c -o tests/libpspp/tests_libpspp_tower_test-tower-test.o `test -f 'tests/libpspp/tower-test.c' || echo '$(srcdir)/'`tests/libpspp/tower-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_tower_test-tower-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_tower_test-tower-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/tower-test.c' object='tests/libpspp/tests_libpspp_tower_test-tower-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_tower_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_tower_test-tower-test.o `test -f 'tests/libpspp/tower-test.c' || echo '$(srcdir)/'`tests/libpspp/tower-test.c tests/libpspp/tests_libpspp_tower_test-tower-test.obj: tests/libpspp/tower-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_tower_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_tower_test-tower-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_tower_test-tower-test.Tpo -c -o tests/libpspp/tests_libpspp_tower_test-tower-test.obj `if test -f 'tests/libpspp/tower-test.c'; then $(CYGPATH_W) 'tests/libpspp/tower-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/tower-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_tower_test-tower-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_tower_test-tower-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/tower-test.c' object='tests/libpspp/tests_libpspp_tower_test-tower-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_libpspp_tower_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_tower_test-tower-test.obj `if test -f 'tests/libpspp/tower-test.c'; then $(CYGPATH_W) 'tests/libpspp/tower-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/tower-test.c'; fi` tests/libpspp/tests_libpspp_zip_test-zip-test.o: tests/libpspp/zip-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_zip_test_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_zip_test-zip-test.o -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_zip_test-zip-test.Tpo -c -o tests/libpspp/tests_libpspp_zip_test-zip-test.o `test -f 'tests/libpspp/zip-test.c' || echo '$(srcdir)/'`tests/libpspp/zip-test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_zip_test-zip-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_zip_test-zip-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/zip-test.c' object='tests/libpspp/tests_libpspp_zip_test-zip-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_zip_test_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_zip_test-zip-test.o `test -f 'tests/libpspp/zip-test.c' || echo '$(srcdir)/'`tests/libpspp/zip-test.c tests/libpspp/tests_libpspp_zip_test-zip-test.obj: tests/libpspp/zip-test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_zip_test_CFLAGS) $(CFLAGS) -MT tests/libpspp/tests_libpspp_zip_test-zip-test.obj -MD -MP -MF tests/libpspp/$(DEPDIR)/tests_libpspp_zip_test-zip-test.Tpo -c -o tests/libpspp/tests_libpspp_zip_test-zip-test.obj `if test -f 'tests/libpspp/zip-test.c'; then $(CYGPATH_W) 'tests/libpspp/zip-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/zip-test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/libpspp/$(DEPDIR)/tests_libpspp_zip_test-zip-test.Tpo tests/libpspp/$(DEPDIR)/tests_libpspp_zip_test-zip-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/libpspp/zip-test.c' object='tests/libpspp/tests_libpspp_zip_test-zip-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libpspp_zip_test_CFLAGS) $(CFLAGS) -c -o tests/libpspp/tests_libpspp_zip_test-zip-test.obj `if test -f 'tests/libpspp/zip-test.c'; then $(CYGPATH_W) 'tests/libpspp/zip-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/libpspp/zip-test.c'; fi` utilities/utilities_pspp_convert-pspp-convert.o: utilities/pspp-convert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_convert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utilities/utilities_pspp_convert-pspp-convert.o -MD -MP -MF utilities/$(DEPDIR)/utilities_pspp_convert-pspp-convert.Tpo -c -o utilities/utilities_pspp_convert-pspp-convert.o `test -f 'utilities/pspp-convert.c' || echo '$(srcdir)/'`utilities/pspp-convert.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) utilities/$(DEPDIR)/utilities_pspp_convert-pspp-convert.Tpo utilities/$(DEPDIR)/utilities_pspp_convert-pspp-convert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utilities/pspp-convert.c' object='utilities/utilities_pspp_convert-pspp-convert.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_convert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utilities/utilities_pspp_convert-pspp-convert.o `test -f 'utilities/pspp-convert.c' || echo '$(srcdir)/'`utilities/pspp-convert.c utilities/utilities_pspp_convert-pspp-convert.obj: utilities/pspp-convert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_convert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utilities/utilities_pspp_convert-pspp-convert.obj -MD -MP -MF utilities/$(DEPDIR)/utilities_pspp_convert-pspp-convert.Tpo -c -o utilities/utilities_pspp_convert-pspp-convert.obj `if test -f 'utilities/pspp-convert.c'; then $(CYGPATH_W) 'utilities/pspp-convert.c'; else $(CYGPATH_W) '$(srcdir)/utilities/pspp-convert.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) utilities/$(DEPDIR)/utilities_pspp_convert-pspp-convert.Tpo utilities/$(DEPDIR)/utilities_pspp_convert-pspp-convert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utilities/pspp-convert.c' object='utilities/utilities_pspp_convert-pspp-convert.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_convert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utilities/utilities_pspp_convert-pspp-convert.obj `if test -f 'utilities/pspp-convert.c'; then $(CYGPATH_W) 'utilities/pspp-convert.c'; else $(CYGPATH_W) '$(srcdir)/utilities/pspp-convert.c'; fi` src/libpspp/utilities_pspp_dump_sav-integer-format.o: src/libpspp/integer-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/utilities_pspp_dump_sav-integer-format.o -MD -MP -MF src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-integer-format.Tpo -c -o src/libpspp/utilities_pspp_dump_sav-integer-format.o `test -f 'src/libpspp/integer-format.c' || echo '$(srcdir)/'`src/libpspp/integer-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-integer-format.Tpo src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-integer-format.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/integer-format.c' object='src/libpspp/utilities_pspp_dump_sav-integer-format.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/utilities_pspp_dump_sav-integer-format.o `test -f 'src/libpspp/integer-format.c' || echo '$(srcdir)/'`src/libpspp/integer-format.c src/libpspp/utilities_pspp_dump_sav-integer-format.obj: src/libpspp/integer-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/utilities_pspp_dump_sav-integer-format.obj -MD -MP -MF src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-integer-format.Tpo -c -o src/libpspp/utilities_pspp_dump_sav-integer-format.obj `if test -f 'src/libpspp/integer-format.c'; then $(CYGPATH_W) 'src/libpspp/integer-format.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/integer-format.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-integer-format.Tpo src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-integer-format.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/integer-format.c' object='src/libpspp/utilities_pspp_dump_sav-integer-format.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/utilities_pspp_dump_sav-integer-format.obj `if test -f 'src/libpspp/integer-format.c'; then $(CYGPATH_W) 'src/libpspp/integer-format.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/integer-format.c'; fi` src/libpspp/utilities_pspp_dump_sav-float-format.o: src/libpspp/float-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/utilities_pspp_dump_sav-float-format.o -MD -MP -MF src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-float-format.Tpo -c -o src/libpspp/utilities_pspp_dump_sav-float-format.o `test -f 'src/libpspp/float-format.c' || echo '$(srcdir)/'`src/libpspp/float-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-float-format.Tpo src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-float-format.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/float-format.c' object='src/libpspp/utilities_pspp_dump_sav-float-format.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/utilities_pspp_dump_sav-float-format.o `test -f 'src/libpspp/float-format.c' || echo '$(srcdir)/'`src/libpspp/float-format.c src/libpspp/utilities_pspp_dump_sav-float-format.obj: src/libpspp/float-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/libpspp/utilities_pspp_dump_sav-float-format.obj -MD -MP -MF src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-float-format.Tpo -c -o src/libpspp/utilities_pspp_dump_sav-float-format.obj `if test -f 'src/libpspp/float-format.c'; then $(CYGPATH_W) 'src/libpspp/float-format.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/float-format.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-float-format.Tpo src/libpspp/$(DEPDIR)/utilities_pspp_dump_sav-float-format.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/libpspp/float-format.c' object='src/libpspp/utilities_pspp_dump_sav-float-format.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/libpspp/utilities_pspp_dump_sav-float-format.obj `if test -f 'src/libpspp/float-format.c'; then $(CYGPATH_W) 'src/libpspp/float-format.c'; else $(CYGPATH_W) '$(srcdir)/src/libpspp/float-format.c'; fi` utilities/utilities_pspp_dump_sav-pspp-dump-sav.o: utilities/pspp-dump-sav.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utilities/utilities_pspp_dump_sav-pspp-dump-sav.o -MD -MP -MF utilities/$(DEPDIR)/utilities_pspp_dump_sav-pspp-dump-sav.Tpo -c -o utilities/utilities_pspp_dump_sav-pspp-dump-sav.o `test -f 'utilities/pspp-dump-sav.c' || echo '$(srcdir)/'`utilities/pspp-dump-sav.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) utilities/$(DEPDIR)/utilities_pspp_dump_sav-pspp-dump-sav.Tpo utilities/$(DEPDIR)/utilities_pspp_dump_sav-pspp-dump-sav.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utilities/pspp-dump-sav.c' object='utilities/utilities_pspp_dump_sav-pspp-dump-sav.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utilities/utilities_pspp_dump_sav-pspp-dump-sav.o `test -f 'utilities/pspp-dump-sav.c' || echo '$(srcdir)/'`utilities/pspp-dump-sav.c utilities/utilities_pspp_dump_sav-pspp-dump-sav.obj: utilities/pspp-dump-sav.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utilities/utilities_pspp_dump_sav-pspp-dump-sav.obj -MD -MP -MF utilities/$(DEPDIR)/utilities_pspp_dump_sav-pspp-dump-sav.Tpo -c -o utilities/utilities_pspp_dump_sav-pspp-dump-sav.obj `if test -f 'utilities/pspp-dump-sav.c'; then $(CYGPATH_W) 'utilities/pspp-dump-sav.c'; else $(CYGPATH_W) '$(srcdir)/utilities/pspp-dump-sav.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) utilities/$(DEPDIR)/utilities_pspp_dump_sav-pspp-dump-sav.Tpo utilities/$(DEPDIR)/utilities_pspp_dump_sav-pspp-dump-sav.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utilities/pspp-dump-sav.c' object='utilities/utilities_pspp_dump_sav-pspp-dump-sav.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(utilities_pspp_dump_sav_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utilities/utilities_pspp_dump_sav-pspp-dump-sav.obj `if test -f 'utilities/pspp-dump-sav.c'; then $(CYGPATH_W) 'utilities/pspp-dump-sav.c'; else $(CYGPATH_W) '$(srcdir)/utilities/pspp-dump-sav.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf lib/linreg/.libs lib/linreg/_libs -rm -rf lib/tukey/.libs lib/tukey/_libs -rm -rf src/.libs src/_libs -rm -rf src/data/.libs src/data/_libs -rm -rf src/language/.libs src/language/_libs -rm -rf src/language/control/.libs src/language/control/_libs -rm -rf src/language/data-io/.libs src/language/data-io/_libs -rm -rf src/language/dictionary/.libs src/language/dictionary/_libs -rm -rf src/language/expressions/.libs src/language/expressions/_libs -rm -rf src/language/lexer/.libs src/language/lexer/_libs -rm -rf src/language/stats/.libs src/language/stats/_libs -rm -rf src/language/tests/.libs src/language/tests/_libs -rm -rf src/language/utilities/.libs src/language/utilities/_libs -rm -rf src/language/xforms/.libs src/language/xforms/_libs -rm -rf src/libpspp/.libs src/libpspp/_libs -rm -rf src/math/.libs src/math/_libs -rm -rf src/output/.libs src/output/_libs -rm -rf src/output/charts/.libs src/output/charts/_libs -rm -rf src/ui/.libs src/ui/_libs -rm -rf src/ui/gui/.libs src/ui/gui/_libs -rm -rf src/ui/terminal/.libs src/ui/terminal/_libs -rm -rf tests/data/.libs tests/data/_libs -rm -rf tests/language/lexer/.libs tests/language/lexer/_libs -rm -rf tests/libpspp/.libs tests/libpspp/_libs -rm -rf tests/math/.libs tests/math/_libs -rm -rf tests/output/.libs tests/output/_libs -rm -rf tests/ui/.libs tests/ui/_libs -rm -rf utilities/.libs utilities/_libs distclean-libtool: -rm -f libtool config.lt doc/$(am__dirstamp): @$(MKDIR_P) doc @: > doc/$(am__dirstamp) $(srcdir)/doc/pspp.info: doc/pspp.texi $(srcdir)/doc/version.texi $(doc_pspp_TEXINFOS) $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \ -o $@ $(srcdir)/doc/pspp.texi; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc doc/pspp.dvi: doc/pspp.texi $(srcdir)/doc/version.texi $(doc_pspp_TEXINFOS) doc/$(am__dirstamp) $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \ $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ `test -f 'doc/pspp.texi' || echo '$(srcdir)/'`doc/pspp.texi doc/pspp.pdf: doc/pspp.texi $(srcdir)/doc/version.texi $(doc_pspp_TEXINFOS) doc/$(am__dirstamp) $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \ $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ `test -f 'doc/pspp.texi' || echo '$(srcdir)/'`doc/pspp.texi doc/pspp.html: doc/pspp.texi $(srcdir)/doc/version.texi $(doc_pspp_TEXINFOS) doc/$(am__dirstamp) $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \ -o $(@:.html=.htp) `test -f 'doc/pspp.texi' || echo '$(srcdir)/'`doc/pspp.texi; \ then \ rm -rf $@ && mv $(@:.html=.htp) $@; \ else \ rm -rf $(@:.html=.htp); exit 1; \ fi $(srcdir)/doc/version.texi: $(srcdir)/doc/stamp-vti $(srcdir)/doc/stamp-vti: doc/pspp.texi $(top_srcdir)/configure @test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp) @(dir=.; test -f ./doc/pspp.texi || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/doc/pspp.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp$$$$ && \ (cmp -s vti.tmp$$$$ $(srcdir)/doc/version.texi \ || (echo "Updating $(srcdir)/doc/version.texi" && \ cp vti.tmp$$$$ $(srcdir)/doc/version.texi.tmp$$$$ && \ mv $(srcdir)/doc/version.texi.tmp$$$$ $(srcdir)/doc/version.texi)) && \ rm -f vti.tmp$$$$ $(srcdir)/doc/version.texi.$$$$ @cp $(srcdir)/doc/version.texi $@ mostlyclean-vti: -rm -f vti.tmp* $(srcdir)/doc/version.texi.tmp* maintainer-clean-vti: -rm -f $(srcdir)/doc/stamp-vti $(srcdir)/doc/version.texi $(srcdir)/doc/pspp-dev.info: doc/pspp-dev.texi $(srcdir)/doc/version-dev.texi $(doc_pspp_dev_TEXINFOS) $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \ -o $@ $(srcdir)/doc/pspp-dev.texi; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc doc/pspp-dev.dvi: doc/pspp-dev.texi $(srcdir)/doc/version-dev.texi $(doc_pspp_dev_TEXINFOS) doc/$(am__dirstamp) $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \ $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ `test -f 'doc/pspp-dev.texi' || echo '$(srcdir)/'`doc/pspp-dev.texi doc/pspp-dev.pdf: doc/pspp-dev.texi $(srcdir)/doc/version-dev.texi $(doc_pspp_dev_TEXINFOS) doc/$(am__dirstamp) $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \ $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ `test -f 'doc/pspp-dev.texi' || echo '$(srcdir)/'`doc/pspp-dev.texi doc/pspp-dev.html: doc/pspp-dev.texi $(srcdir)/doc/version-dev.texi $(doc_pspp_dev_TEXINFOS) doc/$(am__dirstamp) $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \ -o $(@:.html=.htp) `test -f 'doc/pspp-dev.texi' || echo '$(srcdir)/'`doc/pspp-dev.texi; \ then \ rm -rf $@ && mv $(@:.html=.htp) $@; \ else \ rm -rf $(@:.html=.htp); exit 1; \ fi $(srcdir)/doc/version-dev.texi: $(srcdir)/doc/stamp-1 $(srcdir)/doc/stamp-1: doc/pspp-dev.texi $(top_srcdir)/configure @test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp) @(dir=.; test -f ./doc/pspp-dev.texi || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/doc/pspp-dev.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > 1.tmp$$$$ && \ (cmp -s 1.tmp$$$$ $(srcdir)/doc/version-dev.texi \ || (echo "Updating $(srcdir)/doc/version-dev.texi" && \ cp 1.tmp$$$$ $(srcdir)/doc/version-dev.texi.tmp$$$$ && \ mv $(srcdir)/doc/version-dev.texi.tmp$$$$ $(srcdir)/doc/version-dev.texi)) && \ rm -f 1.tmp$$$$ $(srcdir)/doc/version-dev.texi.$$$$ @cp $(srcdir)/doc/version-dev.texi $@ mostlyclean-1: -rm -f 1.tmp* $(srcdir)/doc/version-dev.texi.tmp* maintainer-clean-1: -rm -f $(srcdir)/doc/stamp-1 $(srcdir)/doc/version-dev.texi .dvi.ps: $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) $(AM_V_texinfo) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf doc/pspp.t2d doc/pspp.t2p doc/pspp-dev.t2d doc/pspp-dev.t2p clean-aminfo: -test -z "doc/pspp.dvi doc/pspp.pdf doc/pspp.ps doc/pspp.html doc/pspp-dev.dvi \ doc/pspp-dev.pdf doc/pspp-dev.ps doc/pspp-dev.html" \ || rm -rf doc/pspp.dvi doc/pspp.pdf doc/pspp.ps doc/pspp.html doc/pspp-dev.dvi \ doc/pspp-dev.pdf doc/pspp-dev.ps doc/pspp-dev.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(dist_man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(desktopdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(desktopdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(desktopdir)'; $(am__uninstall_files_from_dir) install-dist_appdataDATA: $(dist_appdata_DATA) @$(NORMAL_INSTALL) @list='$(dist_appdata_DATA)'; test -n "$(appdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appdatadir)" || exit $$?; \ done uninstall-dist_appdataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_appdata_DATA)'; test -n "$(appdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appdatadir)'; $(am__uninstall_files_from_dir) install-dist_catalogDATA: $(dist_catalog_DATA) @$(NORMAL_INSTALL) @list='$(dist_catalog_DATA)'; test -n "$(catalogdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(catalogdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(catalogdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(catalogdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(catalogdir)" || exit $$?; \ done uninstall-dist_catalogDATA: @$(NORMAL_UNINSTALL) @list='$(dist_catalog_DATA)'; test -n "$(catalogdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(catalogdir)'; $(am__uninstall_files_from_dir) install-dist_docbookDATA: $(dist_docbook_DATA) @$(NORMAL_INSTALL) @list='$(dist_docbook_DATA)'; test -n "$(docbookdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docbookdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docbookdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docbookdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docbookdir)" || exit $$?; \ done uninstall-dist_docbookDATA: @$(NORMAL_UNINSTALL) @list='$(dist_docbook_DATA)'; test -n "$(docbookdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docbookdir)'; $(am__uninstall_files_from_dir) install-dist_large_pixmapDATA: $(dist_large_pixmap_DATA) @$(NORMAL_INSTALL) @list='$(dist_large_pixmap_DATA)'; test -n "$(large_pixmapdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(large_pixmapdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(large_pixmapdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(large_pixmapdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(large_pixmapdir)" || exit $$?; \ done uninstall-dist_large_pixmapDATA: @$(NORMAL_UNINSTALL) @list='$(dist_large_pixmap_DATA)'; test -n "$(large_pixmapdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(large_pixmapdir)'; $(am__uninstall_files_from_dir) install-dist_small_pixmapDATA: $(dist_small_pixmap_DATA) @$(NORMAL_INSTALL) @list='$(dist_small_pixmap_DATA)'; test -n "$(small_pixmapdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(small_pixmapdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(small_pixmapdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(small_pixmapdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(small_pixmapdir)" || exit $$?; \ done uninstall-dist_small_pixmapDATA: @$(NORMAL_UNINSTALL) @list='$(dist_small_pixmap_DATA)'; test -n "$(small_pixmapdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(small_pixmapdir)'; $(am__uninstall_files_from_dir) install-dist_src_ui_gui_psppireDATA: $(dist_src_ui_gui_psppire_DATA) @$(NORMAL_INSTALL) @list='$(dist_src_ui_gui_psppire_DATA)'; test -n "$(src_ui_gui_psppiredir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(src_ui_gui_psppiredir)'"; \ $(MKDIR_P) "$(DESTDIR)$(src_ui_gui_psppiredir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(src_ui_gui_psppiredir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(src_ui_gui_psppiredir)" || exit $$?; \ done uninstall-dist_src_ui_gui_psppireDATA: @$(NORMAL_UNINSTALL) @list='$(dist_src_ui_gui_psppire_DATA)'; test -n "$(src_ui_gui_psppiredir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(src_ui_gui_psppiredir)'; $(am__uninstall_files_from_dir) install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) install-nodist_src_ui_gui_psppireDATA: $(nodist_src_ui_gui_psppire_DATA) @$(NORMAL_INSTALL) @list='$(nodist_src_ui_gui_psppire_DATA)'; test -n "$(src_ui_gui_psppiredir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(src_ui_gui_psppiredir)'"; \ $(MKDIR_P) "$(DESTDIR)$(src_ui_gui_psppiredir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(src_ui_gui_psppiredir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(src_ui_gui_psppiredir)" || exit $$?; \ done uninstall-nodist_src_ui_gui_psppireDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_src_ui_gui_psppire_DATA)'; test -n "$(src_ui_gui_psppiredir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(src_ui_gui_psppiredir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) @case `sed 15q $(srcdir)/NEWS` in \ *"$(VERSION)"*) : ;; \ *) \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-local check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(INFO_DEPS) $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) \ $(MANS) $(DATA) $(HEADERS) config.h all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(appdatadir)" "$(DESTDIR)$(catalogdir)" "$(DESTDIR)$(docbookdir)" "$(DESTDIR)$(large_pixmapdir)" "$(DESTDIR)$(small_pixmapdir)" "$(DESTDIR)$(src_ui_gui_psppiredir)" "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(src_ui_gui_psppiredir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f doc/$(am__dirstamp) -rm -f lib/gtk-contrib/$(DEPDIR)/$(am__dirstamp) -rm -f lib/gtk-contrib/$(am__dirstamp) -rm -f lib/linreg/$(DEPDIR)/$(am__dirstamp) -rm -f lib/linreg/$(am__dirstamp) -rm -f lib/tukey/$(DEPDIR)/$(am__dirstamp) -rm -f lib/tukey/$(am__dirstamp) -rm -f src/$(am__dirstamp) -rm -f src/data/$(DEPDIR)/$(am__dirstamp) -rm -f src/data/$(am__dirstamp) -rm -f src/language/$(DEPDIR)/$(am__dirstamp) -rm -f src/language/$(am__dirstamp) -rm -f src/language/control/$(DEPDIR)/$(am__dirstamp) -rm -f src/language/control/$(am__dirstamp) -rm -f src/language/data-io/$(DEPDIR)/$(am__dirstamp) -rm -f src/language/data-io/$(am__dirstamp) -rm -f src/language/dictionary/$(DEPDIR)/$(am__dirstamp) -rm -f src/language/dictionary/$(am__dirstamp) -rm -f src/language/expressions/$(DEPDIR)/$(am__dirstamp) -rm -f src/language/expressions/$(am__dirstamp) -rm -f src/language/lexer/$(DEPDIR)/$(am__dirstamp) -rm -f src/language/lexer/$(am__dirstamp) -rm -f src/language/stats/$(DEPDIR)/$(am__dirstamp) -rm -f src/language/stats/$(am__dirstamp) -rm -f src/language/tests/$(DEPDIR)/$(am__dirstamp) -rm -f src/language/tests/$(am__dirstamp) -rm -f src/language/utilities/$(DEPDIR)/$(am__dirstamp) -rm -f src/language/utilities/$(am__dirstamp) -rm -f src/language/xforms/$(DEPDIR)/$(am__dirstamp) -rm -f src/language/xforms/$(am__dirstamp) -rm -f src/libpspp/$(DEPDIR)/$(am__dirstamp) -rm -f src/libpspp/$(am__dirstamp) -rm -f src/math/$(DEPDIR)/$(am__dirstamp) -rm -f src/math/$(am__dirstamp) -rm -f src/output/$(DEPDIR)/$(am__dirstamp) -rm -f src/output/$(am__dirstamp) -rm -f src/output/charts/$(DEPDIR)/$(am__dirstamp) -rm -f src/output/charts/$(am__dirstamp) -rm -f src/ui/$(DEPDIR)/$(am__dirstamp) -rm -f src/ui/$(am__dirstamp) -rm -f src/ui/gui/$(DEPDIR)/$(am__dirstamp) -rm -f src/ui/gui/$(am__dirstamp) -rm -f src/ui/terminal/$(DEPDIR)/$(am__dirstamp) -rm -f src/ui/terminal/$(am__dirstamp) -rm -f tests/data/$(DEPDIR)/$(am__dirstamp) -rm -f tests/data/$(am__dirstamp) -rm -f tests/language/lexer/$(DEPDIR)/$(am__dirstamp) -rm -f tests/language/lexer/$(am__dirstamp) -rm -f tests/libpspp/$(DEPDIR)/$(am__dirstamp) -rm -f tests/libpspp/$(am__dirstamp) -rm -f tests/math/$(DEPDIR)/$(am__dirstamp) -rm -f tests/math/$(am__dirstamp) -rm -f tests/output/$(DEPDIR)/$(am__dirstamp) -rm -f tests/output/$(am__dirstamp) -rm -f tests/ui/$(DEPDIR)/$(am__dirstamp) -rm -f tests/ui/$(am__dirstamp) -rm -f utilities/$(DEPDIR)/$(am__dirstamp) -rm -f utilities/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-aminfo clean-binPROGRAMS clean-checkPROGRAMS \ clean-generic clean-libtool clean-local \ clean-moduleLTLIBRARIES clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ clean-pkglibLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf lib/gtk-contrib/$(DEPDIR) lib/linreg/$(DEPDIR) lib/tukey/$(DEPDIR) src/data/$(DEPDIR) src/language/$(DEPDIR) src/language/control/$(DEPDIR) src/language/data-io/$(DEPDIR) src/language/dictionary/$(DEPDIR) src/language/expressions/$(DEPDIR) src/language/lexer/$(DEPDIR) src/language/stats/$(DEPDIR) src/language/tests/$(DEPDIR) src/language/utilities/$(DEPDIR) src/language/xforms/$(DEPDIR) src/libpspp/$(DEPDIR) src/math/$(DEPDIR) src/output/$(DEPDIR) src/output/charts/$(DEPDIR) src/ui/$(DEPDIR) src/ui/gui/$(DEPDIR) src/ui/terminal/$(DEPDIR) tests/data/$(DEPDIR) tests/language/lexer/$(DEPDIR) tests/libpspp/$(DEPDIR) tests/math/$(DEPDIR) tests/output/$(DEPDIR) tests/ui/$(DEPDIR) utilities/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: $(DVIS) html: html-recursive html-am: $(HTMLS) info: info-recursive info-am: $(INFO_DEPS) install-data-am: install-desktopDATA install-dist_appdataDATA \ install-dist_catalogDATA install-dist_docbookDATA \ install-dist_large_pixmapDATA install-dist_small_pixmapDATA \ install-dist_src_ui_gui_psppireDATA install-examplesDATA \ install-info-am install-man install-moduleLTLIBRARIES \ install-nodist_src_ui_gui_psppireDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-recursive install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-binPROGRAMS install-pkglibLTLIBRARIES install-html: install-html-recursive install-html-am: $(HTMLS) @$(NORMAL_INSTALL) @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ d2=$$d$$p; \ if test -d "$$d2"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d2"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-recursive install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \ $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \ fi; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-recursive install-ps-am: $(PSS) @$(NORMAL_INSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: installcheck-binPROGRAMS installcheck-local maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf lib/gtk-contrib/$(DEPDIR) lib/linreg/$(DEPDIR) lib/tukey/$(DEPDIR) src/data/$(DEPDIR) src/language/$(DEPDIR) src/language/control/$(DEPDIR) src/language/data-io/$(DEPDIR) src/language/dictionary/$(DEPDIR) src/language/expressions/$(DEPDIR) src/language/lexer/$(DEPDIR) src/language/stats/$(DEPDIR) src/language/tests/$(DEPDIR) src/language/utilities/$(DEPDIR) src/language/xforms/$(DEPDIR) src/libpspp/$(DEPDIR) src/math/$(DEPDIR) src/output/$(DEPDIR) src/output/charts/$(DEPDIR) src/ui/$(DEPDIR) src/ui/gui/$(DEPDIR) src/ui/terminal/$(DEPDIR) tests/data/$(DEPDIR) tests/language/lexer/$(DEPDIR) tests/libpspp/$(DEPDIR) tests/math/$(DEPDIR) tests/output/$(DEPDIR) tests/ui/$(DEPDIR) utilities/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-1 \ maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-vti mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-1 mostlyclean-aminfo mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf: pdf-recursive pdf-am: $(PDFS) ps: ps-recursive ps-am: $(PSS) uninstall-am: uninstall-binPROGRAMS uninstall-desktopDATA \ uninstall-dist_appdataDATA uninstall-dist_catalogDATA \ uninstall-dist_docbookDATA uninstall-dist_large_pixmapDATA \ uninstall-dist_small_pixmapDATA \ uninstall-dist_src_ui_gui_psppireDATA uninstall-dvi-am \ uninstall-examplesDATA uninstall-html-am uninstall-info-am \ uninstall-man uninstall-moduleLTLIBRARIES \ uninstall-nodist_src_ui_gui_psppireDATA uninstall-pdf-am \ uninstall-pkglibLTLIBRARIES uninstall-ps-am @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 .MAKE: $(am__recursive_targets) all check check-am install install-am \ install-data-am install-strip uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ am--refresh check check-am check-local clean clean-aminfo \ clean-binPROGRAMS clean-checkPROGRAMS clean-cscope \ clean-generic clean-libtool clean-local \ clean-moduleLTLIBRARIES clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ clean-pkglibLTLIBRARIES cscope cscopelist-am ctags ctags-am \ dist dist-all dist-bzip2 dist-gzip dist-hook dist-info \ dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \ distclean distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-data-hook install-desktopDATA \ install-dist_appdataDATA install-dist_catalogDATA \ install-dist_docbookDATA install-dist_large_pixmapDATA \ install-dist_small_pixmapDATA \ install-dist_src_ui_gui_psppireDATA install-dvi install-dvi-am \ install-examplesDATA install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-moduleLTLIBRARIES \ install-nodist_src_ui_gui_psppireDATA install-pdf \ install-pdf-am install-pkglibLTLIBRARIES install-ps \ install-ps-am install-strip installcheck installcheck-am \ installcheck-binPROGRAMS installcheck-local installdirs \ installdirs-am maintainer-clean maintainer-clean-1 \ maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-vti mostlyclean mostlyclean-1 \ mostlyclean-aminfo mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-vti pdf pdf-am ps ps-am tags \ tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-desktopDATA uninstall-dist_appdataDATA \ uninstall-dist_catalogDATA uninstall-dist_docbookDATA \ uninstall-dist_large_pixmapDATA \ uninstall-dist_small_pixmapDATA \ uninstall-dist_src_ui_gui_psppireDATA uninstall-dvi-am \ uninstall-examplesDATA uninstall-hook uninstall-html-am \ uninstall-info-am uninstall-man uninstall-man1 \ uninstall-moduleLTLIBRARIES \ uninstall-nodist_src_ui_gui_psppireDATA uninstall-pdf-am \ uninstall-pkglibLTLIBRARIES uninstall-ps-am .PRECIOUS: Makefile AM_V_P ?= : .q.c: @$(MKDIR_P) `dirname $@` $(AM_V_GEN)./src/language/lexer/q2c$(EXEEXT_FOR_BUILD) $< $@ $(all_q_sources:.q=.c): src/language/lexer/q2c$(EXEEXT_FOR_BUILD) generate-changelog: if test -d $(top_srcdir)/.git; then \ $(top_srcdir)/build-aux/gitlog-to-changelog --since=2008-07-27 --srcdir=$(top_srcdir) \ > $(distdir)/cl-t || exit 1; \ rm -f $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi $(POTFILE): $(TRANSLATABLE_FILES) $(UI_FILES) src/ui/gui/gen-dot-desktop.sh @$(MKDIR_P) po $(AM_V_GEN)$(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) $(TRANSLATABLE_FILES) --language=C --keyword=_ --keyword=N_ -o $@,tmp $(AM_V_at)$(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=glade -o $@,tmp $(AM_V_at)$(XGETTEXT) --directory=$(top_srcdir) $(XGETTEXT_OPTIONS) -j src/ui/gui/gen-dot-desktop.sh --language=shell --keyword=TRANSLATE -o $@,tmp $(AM_V_at)$(SED) -e '/^"POT-Creation-Date: .*/d' $@,tmp > $@ $(LOCALPOFILED) $(POFILES): $(POTFILE) $(AM_V_GEN)$(MSGMERGE) --quiet $(top_srcdir)/$@ $? -o $@,tmp $(AM_V_at)if test -e $(top_srcdir)/$@,aux ; then \ touch $@,tmp ; \ msgcat --use-first $(top_srcdir)/$@,aux $@,tmp -o $@,tmp; \ fi ; $(AM_V_at)$(SED) -e '/^"POT-Creation-Date: /d' $@,tmp > $@,tmp2 $(RM) $@,tmp mv $@,tmp2 $@ .po.gmo: @$(MKDIR_P) `dirname $@` $(AM_V_GEN)$(MSGFMT) $< -o $@ install-data-hook: $(GMOFILES) for f in $(GMOFILES); do \ lang=`echo $$f | $(SED) -e 's%po/\(.*\)\.gmo%\1%' ` ; \ $(MKDIR_P) $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES; \ $(INSTALL_DATA) $$f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \ done uninstall-hook: for f in $(GMOFILES); do \ lang=`echo $$f | $(SED) -e 's%po/\(.*\)\.gmo%\1%' ` ; \ rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \ done # Clean $(POFILES) from build directory but not if that's the same as # the source directory. po_CLEAN: @if test "$(srcdir)" != .; then \ echo rm -f $(LOCALPOFILES) $(POFILES); \ rm -f $(LOCALPOFILES) $(POFILES); \ fi po-update: $(RSYNC) -Lrtvz translationproject.org::tp/latest/pspp/ $(srcdir)/po $(srcdir)/doc/ni.texi: $(top_srcdir)/src/language/command.def doc/get-commands.pl @$(MKDIR_P) doc $(AM_V_GEN)$(PERL) $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@ $(srcdir)/doc/tut.texi: @$(MKDIR_P) doc $(AM_V_GEN)echo "@set example-dir $(examplesdir)" > $@ # The SED and AWK filters in this rule, are to work-around some nasty bugs in # makeinfo version 4.13, which produces broken docbook xml. These workarounds # are rather horrible and must be removed asap. $(srcdir)/doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) $(top_srcdir)/doc/help-pages-list @$(MKDIR_P) doc $(AM_V_GEN)$(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \ $(top_srcdir)/doc/pspp.texi -o - \ | $(SED) -e 's/Time-&-Date/Time-\&-Date/g' \ -e 's/“/\“/g' \ -e 's/”/\”/g' \ -e 's/‘/\‘/g' \ -e 's/’/\’/g' \ -e 's/—/\—/g' \ -e 's/–/\′/g' \ -e 's/é/\é/g' \ -e 's/©/\©/g' \ -e 's/−/\−/g' \ -e 's/…/\…/g' \ -e 's/•/\ߦ/g' \ -e 's/././g' \ -e 's%\(
]*\)>%\1/>%g' \ | $(AWK) '/.*.*<\/para>/{x=sub("",""); print; s=1;next}/<\/table>/{print; if (s==1) print ""; s=0; next}1' \ > $@,tmp $(AM_V_at)$(XMLLINT) --output /dev/null $@,tmp $(AM_V_at)cat $(top_srcdir)/doc/help-pages-list | while read node ; do \ $(XMLLINT) --xpath "$$node" $@,tmp > /dev/null; \ if test $$? -ne 0 ; then echo "$$node does not appear in $@" ; exit 1; fi ; \ done mv $@,tmp $@ doc: $(INFO_DEPS) $(DVIS) $(PDFS) $(PSS) $(HTMLS) $(dist_docbook_DATA) .PHONY: doc src/libpspp/version.c: $(top_srcdir)/AUTHORS Makefile @$(MKDIR_P) src/libpspp $(AM_V_GEN)echo "/* -*- mode: c; buffer-read-only: t -*-" > $@,tmp $(AM_V_at)echo " Generated by src/libpspp/automake.mk --- Do not edit.">> $@,tmp $(AM_V_at)echo "" >> $@,tmp $(AM_V_at)echo " The following line is for the benefit of the perl module" >>$@,tmp $(AM_V_at)echo "\$$VERSION='$(VERSION_FOR_PERL)';" >> $@,tmp $(AM_V_at)echo "*/" >> $@,tmp $(AM_V_at)echo "#include \"version.h\"" >> $@,tmp $(AM_V_at)echo "const char bare_version[] = \"$(VERSION)\";" >> $@,tmp $(AM_V_at)echo "const char version[] = \"GNU $(PACKAGE) $(VERSION)\";" >> $@,tmp $(AM_V_at)printf "const char announced_version[] = \"GNU $(PACKAGE) $(VERSION)\"" >> $@,tmp @case `echo $(VERSION) | $(SED) -e 's/[0-9][0-9]*\.[0-9]*\([0-9]\)\.[0-9][0-9]*/\1/'` in \ [13579]) printf "\"\\\nThis is an unreleased test version. It is not recommended for production use. Use at your own risk\"" >> $@,tmp \ ;;\ esac $(AM_V_at)printf ";\n" >> $@,tmp $(AM_V_at)echo "const char host_system[] = \"$(host_triplet)\";" >> $@,tmp $(AM_V_at)echo "const char build_system[] = \"$(build_triplet)\";" >> $@,tmp $(AM_V_at)echo "const char locale_dir[] = \"$(datadir)/locale\";" >> $@,tmp $(AM_V_at)echo "const char examples_dir[] = \"$(examplesdir)\";" >> $@,tmp $(AM_V_at)echo "const char *const authors[] = {" >> $@,tmp $(AM_V_at)$(SED) -e 's/^/ \"/' -e 's/$$/\",/' $(top_srcdir)/AUTHORS >> $@,tmp $(AM_V_at)echo "0 };" >> $@,tmp $(AM_V_at)mv $@,tmp $@ src/language/lexer/q2c$(EXEEXT_FOR_BUILD): $(top_srcdir)/src/language/lexer/q2c.c @$(MKDIR_P) `dirname $@` $(AM_V_GEN)$(CC_FOR_BUILD) $(top_srcdir)/src/language/lexer/q2c.c -o $(top_builddir)/src/language/lexer/q2c$(EXEEXT_FOR_BUILD) $(expressions_built_sources): $(helpers) $(AV_V_GEN)$(MKDIR_P) `dirname $@` && \ $(PERL) $< -o $@ -i $(top_srcdir)/src/language/expressions/operations.def $(top_srcdir)/doc/help-pages-list: $(UI_FILES) $(AM_V_GEN)cat $^ | grep '"help[-_]page"' | \ $(SED) -e 's% *\([^<]*\)%//*[@id='"'"'\1'"'"']%' \ -e 's%#%'"'"']/*[@id='"'"'%g' > $@,tmp test -s $@,tmp mv $@,tmp $@ @HAVE_GUI_TRUE@install-lang: @HAVE_GUI_TRUE@ $(INSTALL_DATA) $(top_srcdir)/src/ui/gui/pspp.lang $(DESTDIR)$(pkgdatadir) @HAVE_GUI_TRUE@yelp-check: @HAVE_GUI_TRUE@ @if ! yelp --version > /dev/null 2>&1 ; then \ @HAVE_GUI_TRUE@ echo ; \ @HAVE_GUI_TRUE@ echo ' The Yelp document viewer does not seem to be installed on the system.' ; \ @HAVE_GUI_TRUE@ echo ' If Yelp is not available at run time, then the PSPPIRE online reference' ; \ @HAVE_GUI_TRUE@ echo ' manual will not be available.' ; \ @HAVE_GUI_TRUE@ echo ' Yelp is available from the GNOME project. ftp://ftp.gnome.org/pub/gnome/sources/yelp' ; \ @HAVE_GUI_TRUE@ echo ; \ @HAVE_GUI_TRUE@ fi @HAVE_GUI_TRUE@src/ui/gui/pspp.desktop: src/ui/gui/gen-dot-desktop.sh $(POFILES) @HAVE_GUI_TRUE@ $(AM_V_GEN)POFILES="$(POFILES)" top_builddir="$(top_builddir)" $(SHELL) $< > $@ @HAVE_GUI_TRUE@src/ui/gui/resources.c: src/ui/gui/resources.xml @HAVE_GUI_TRUE@ $(AM_V_at)$(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/src/ui/gui --generate-source $< --target=$@,out @HAVE_GUI_TRUE@ $(AM_V_GEN)echo '#include ' > $@,tmp @HAVE_GUI_TRUE@ cat $@,out >> $@,tmp @HAVE_GUI_TRUE@ $(RM) $@,out @HAVE_GUI_TRUE@ mv $@,tmp $@ @HAVE_GUI_TRUE@src/ui/gui/psppire-marshal.c: src/ui/gui/marshaller-list @HAVE_GUI_TRUE@ $(AM_V_GEN)echo '#include ' > $@ @HAVE_GUI_TRUE@ $(AM_V_at)$(GLIB_GENMARSHAL) --body --prefix=psppire_marshal $? >> $@ @HAVE_GUI_TRUE@src/ui/gui/psppire-marshal.h: src/ui/gui/marshaller-list @HAVE_GUI_TRUE@ $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=psppire_marshal $? > $@ #ensure the installcheck passes even if there is no X server available installcheck-local: DISPLAY=/invalid/port $(MAKE) $(AM_MAKEFLAGS) installcheck-binPROGRAMS src/ui/gui/include/gtk/gtk.h: src/ui/gui/include/gtk/gtk.in.h @$(MKDIR_P) src/ui/gui/include/gtk $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ $(SED) -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GTK_GTK_H''@|$(NEXT_GTK_GTK_H)|g' \ < $(srcdir)/src/ui/gui/include/gtk/gtk.in.h; \ } > $@-t && \ mv $@-t $@ install-ext-icons: for context in apps mimetypes; do \ for size in $(sizes); do \ $(MKDIR_P) $(themedir)/$$size/$$context ; \ if (cd $(top_srcdir)/src/ui/gui/icons/$$size/$$context && \ (test ! "`printf '%s %s %s' . .. *`" = '. .. *' || test -f '*')) 2> /dev/null ; then \ $(INSTALL_DATA) $(top_srcdir)/src/ui/gui/icons/$$size/$$context/* $(themedir)/$$size/$$context ; \ fi ; \ done ; \ done uninstall-ext-icons: for context in apps mimetypes; do \ for size in $(sizes); do \ if (cd $(top_srcdir)/src/ui/gui/icons/$$size/$$context && \ (test ! "`printf '%s %s %s' . .. *`" = '. .. *' || test -f '*')) 2> /dev/null ; then \ rm -rf $(themedir)/$$size/$$context/application-x-spss-* ; \ rm -rf $(themedir)/$$size/$$context/pspp* ; \ fi ; \ done ; \ done install-icons: for context in actions categories ; do \ $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/$$context; \ for size in $(sizes); do \ if (cd $(top_srcdir)/src/ui/gui/icons/$$context/$$size && \ (test ! "`printf '%s %s %s' . .. *`" = '. .. *' || test -f '*')) 2> /dev/null ; then \ $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/$$context/$$size ; \ $(INSTALL_DATA) $(top_srcdir)/src/ui/gui/icons/$$context/$$size/* $(DESTDIR)$(pkgdatadir)/$$context/$$size ; \ fi ; \ done ; \ done uninstall-icons: for context in actions categories ; do \ for size in $(sizes); do \ if (cd $(top_srcdir)/src/ui/gui/icons/$$context/$$size && \ (test ! "`printf '%s %s %s' . .. *`" = '. .. *' || test -f '*')) 2> /dev/null ; then \ rm -rf $(DESTDIR)$(pkgdatadir)/$$context/$$size ; \ fi ; \ done ; \ done @HAVE_GUI_TRUE@src/ui/gui/icons/splash.png: $(top_srcdir)/src/ui/gui/icons/splash-t.png $(top_srcdir)/src/ui/gui/icons/splash-r.png Makefile @HAVE_GUI_TRUE@ @$(MKDIR_P) src/ui/gui/icons @HAVE_GUI_TRUE@ @case `echo $(VERSION) | $(SED) -e 's/[0-9][0-9]*\.[0-9]*\([0-9]\)\.[0-9][0-9]*/\1/'` in \ @HAVE_GUI_TRUE@ [13579]) cp $(top_srcdir)/src/ui/gui/icons/splash-t.png $@ ; \ @HAVE_GUI_TRUE@ ;;\ @HAVE_GUI_TRUE@ *) cp $(top_srcdir)/src/ui/gui/icons/splash-r.png $@ ; \ @HAVE_GUI_TRUE@ ;;\ @HAVE_GUI_TRUE@esac check-programs: $(check_PROGRAMS) $(srcdir)/tests/testsuite.at: tests/testsuite.in tests/automake.mk $(AM_V_GEN)printf '\043 Generated automatically -- do not modify! -*- buffer-read-only: t -*-\n' > $@,tmp $(AM_V_at)cat $< >> $@,tmp $(AM_V_at)for t in $(TESTSUITE_AT); do \ echo "m4_include([$$t])" >> $@,tmp ;\ done mv $@,tmp $@ tests_check: tests/atconfig tests/atlocal $(TESTSUITE) $(check_PROGRAMS) XTERM_LOCALE='' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) RUNNER='$(RUNNER)' $(TESTSUITEFLAGS) tests_clean: test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean $(TESTSUITE): package.m4 $(srcdir)/tests/testsuite.at $(TESTSUITE_AT) $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' $@.at | $(SED) 's/@<00A0>@/ /g' > $@.tmp test -s $@.tmp $(AM_V_at)mv $@.tmp $@ # The `:;' works around a Bash 3.2 bug when the output is not writeable. $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(AM_V_GEN):;{ \ echo '# Signature of the current package.' && \ echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])' && \ echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])' && \ echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])' && \ echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \ echo 'm4_define([AT_PACKAGE_URL], [$(PACKAGE_URL)])'; \ } >'$(srcdir)/package.m4' check-valgrind: $(MAKE) check RUNNER='$(SHELL) $(abs_top_builddir)/libtool --mode=execute valgrind --log-file=valgrind.%p --leak-check=full --num-callers=20' TESTSUITEFLAGS='$(TESTSUITEFLAGS) -d' @echo @echo '--------------------------------' @echo 'Valgrind output is in:' @echo 'tests/testsuite.dir/*/valgrind.*' @echo '--------------------------------' @WITH_PERL_MODULE_TRUE@perl-module/pspp-module-config: Makefile @WITH_PERL_MODULE_TRUE@ $(AM_V_GEN)(echo '%Locations = (';\ @WITH_PERL_MODULE_TRUE@ printf " SourceDir => '";\ @WITH_PERL_MODULE_TRUE@ (cd $(top_srcdir) && echo `pwd`\', ) ;\ @WITH_PERL_MODULE_TRUE@ printf " BuildDir => '";\ @WITH_PERL_MODULE_TRUE@ (cd $(top_builddir) && echo `pwd`\' );\ @WITH_PERL_MODULE_TRUE@ echo ');') > $(top_builddir)/perl-module/pspp-module-config @WITH_PERL_MODULE_TRUE@perl-module/Makefile: perl-module/Makefile.PL perl-module/pspp-module-config $(module_sources) @WITH_PERL_MODULE_TRUE@ $(AM_V_GEN)cd perl-module && $(PERL) Makefile.PL PREFIX=$(prefix) \ @WITH_PERL_MODULE_TRUE@ OPTIMIZE="$(CFLAGS) $(CPPFLAGS)" \ @WITH_PERL_MODULE_TRUE@ LD="`$(PERL) -V::ld:` $(LDFLAGS)" @WITH_PERL_MODULE_TRUE@perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz: $(module_sources) perl-module/Makefile @WITH_PERL_MODULE_TRUE@ $(AM_V_at)rm -f $@ @WITH_PERL_MODULE_TRUE@ $(AM_V_GEN)cd perl-module && $(MAKE) $(PERL_MAKEFLAGS) tardist @WITH_PERL_MODULE_TRUE@module-make: perl-module/Makefile @WITH_PERL_MODULE_TRUE@ $(AM_V_GEN)cd perl-module && $(MAKE) $(PERL_MAKEFLAGS) @WITH_PERL_MODULE_TRUE@perl_module_tarball: $(module_sources) src/libpspp-core.la @WITH_PERL_MODULE_TRUE@ @if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \ @WITH_PERL_MODULE_TRUE@ for f in $(module_sources); do \ @WITH_PERL_MODULE_TRUE@ destdir=`dirname $$f` ;\ @WITH_PERL_MODULE_TRUE@ mkdir -p $$destdir ;\ @WITH_PERL_MODULE_TRUE@ if test ! -e "$(top_builddir)/$$f" || \ @WITH_PERL_MODULE_TRUE@ test "$(top_srcdir)/$$f" -nt "$(top_builddir)/$$f" ; then \ @WITH_PERL_MODULE_TRUE@ if $(AM_V_P); then \ @WITH_PERL_MODULE_TRUE@ echo cp $(top_srcdir)/$$f $$destdir ; \ @WITH_PERL_MODULE_TRUE@ else \ @WITH_PERL_MODULE_TRUE@ echo " GEN $$destdir/$$f"; \ @WITH_PERL_MODULE_TRUE@ fi; \ @WITH_PERL_MODULE_TRUE@ cp $(top_srcdir)/$$f $$destdir ; \ @WITH_PERL_MODULE_TRUE@ fi ; \ @WITH_PERL_MODULE_TRUE@ done \ @WITH_PERL_MODULE_TRUE@ fi @WITH_PERL_MODULE_TRUE@ $(AM_V_GEN)$(MAKE) $(PERL_MAKEFLAGS) module-make perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz @WITH_PERL_MODULE_TRUE@perl_module_clean: @WITH_PERL_MODULE_TRUE@ cd perl-module && $(MAKE) $(AM_MAKEFLAGS) clean || true @WITH_PERL_MODULE_TRUE@ if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \ @WITH_PERL_MODULE_TRUE@ rm -f $(module_sources) ; \ @WITH_PERL_MODULE_TRUE@ fi @WITH_PERL_MODULE_TRUE@ rm -f perl-module/Makefile.old .PHONY: $(PHONY) dist-hook: $(DIST_HOOKS) install-data-hook: $(INSTALL_DATA_HOOKS) uninstall-hook: $(UNINSTALL_DATA_HOOKS) clean-local: $(CLEAN_LOCAL) all-local: $(ALL_LOCAL) check-local: $(CHECK_LOCAL) # A convenience target to build all the binaries programs: $(PROGRAMS) dist-hook-git: distfiles @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \ (cd $(srcdir) && git ls-files) \ | grep -vE '\.gitignore|README.Git|Smake|Bug-administration' \ | LC_ALL=C sort -u > gitfiles; \ LC_ALL=C comm -1 -3 distfiles gitfiles > missing-distfiles; \ if test -s missing-distfiles; then \ echo "The distribution is missing the following files:"; \ cat missing-distfiles; \ exit 1; \ fi; \ fi # The following is based on commands for the Automake "distdir" target. distfiles: Makefile @srcdirstrip=`echo "$(srcdir)" | $(SED) 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | $(SED) 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ for file in $$list; do echo $$file; done | \ $(SED) -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t" \ | LC_ALL=C sort -u > $@ .PHONY: dist-hook-git # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pspp-1.0.1/perl-module/0000755000175000017500000000000013150620333011715 500000000000000pspp-1.0.1/perl-module/COPYING0000644000175000017500000010437413126713270012707 00000000000000 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 . pspp-1.0.1/perl-module/Examples.pod0000644000175000017500000000671113126713270014132 00000000000000=pod =head1 PSPP::Examples This page shows some simple examples of using the PSPP module. See L for details on each of the subroutines. =head2 A Simple example This example creates a system file called F, containing one variable called "id". It contains no data. use PSPP; my $dict = PSPP::Dict->new (); my $var = PSPP::Var->new ($dict, "id"); my $sysfile = PSPP::Sysfile->new ("foo.sav", $dict); $sysfile->close(); =head2 A slightly more complex example In this example there are three variables, called "id", "name" and "dob". Their formats are F2.0, A80 and DATETIME17 respectively. use PSPP; my $dict = PSPP::Dict->new (); PSPP::Var->new ($dict, "id", (fmt=>PSPP::Fmt::F, width=>2, decimals=>0) ); PSPP::Var->new ($dict, "name", (fmt=>PSPP::Fmt::A, width=>80) ); PSPP::Var->new ($dict, "dob", (fmt=>PSPP::Fmt::DATETIME) ); my $sysfile = PSPP::Sysfile->new ("foo.sav", $dict); $sysfile->close(); =head2 Changing the properties of variables After a variable has been created, parameters may be set for it. use PSPP; my $dict = PSPP::Dict->new (); my $var1 = PSPP::Var->new ($dict, "id"); $var1->set_label ("A unique identifier"); $var1->add_value_label (0, "Zero"); $var1->add_value_label (1, "One"); =head2 Appending data to the file When a file is created, it contains no data. Data is added by appending cases to the file. This example creates a file with 3 cases. use PSPP; my $dict = PSPP::Dict->new (); PSPP::Var->new ($dict, "id", (fmt=>PSPP::Fmt::F, width=>2, decimals=>0) ); PSPP::Var->new ($dict, "name", (fmt=>PSPP::Fmt::A, width=>8) ); my $sysfile = PSPP::Sysfile->new ("foo.sav", $dict); $sysfile->append_case ( [1, "Alf"] ); $sysfile->append_case ( [2, "Bert"] ); $sysfile->append_case ( [3, "Charlie"] ); $sysfile->close(); =head2 Variables with differing input and output formats By default, a variable's output format corresponds to the input format. However, the output format may be changed after the variable has been created. This example shows how to create a DATETIME variable using the current time as its value. Since pspp uses a different epoch to perl, the constant PSPP::PERL_EPOCH needs to be added to the value returned from time(), in order that it be correctly represented by pspp. use PSPP; my $dict = PSPP::Dict->new (); my $var1 = PSPP::Var->new ($dict, "entrytime", (fmt=>PSPP::Fmt::F) ); $var1->set_output_format ( (fmt=>PSPP::Fmt::DATETIME, width=>20) ); my $sysfile = PSPP::Sysfile->new ("foo.sav", $dict); my $now = time (); $sysfile->append_case ( [ $now + PSPP::PERL_EPOCH] ) || die "Cant write case"; $sysfile->close(); =head2 Reading data Data can be read from a system file or other source: use PSPP; my $sf = PSPP::Reader->open ("foo.sav"); my $dict = $sf->get_dict (); Once opened, the dictionary can be used like any other. for ($v = 0 ; $v < $dict->get_var_cnt() ; $v++) { my $var = $dict->get_var ($v); # Print the variables my $name = $var->get_name (); my $label = $var->get_label (); print "Var: $name, Label: $label\n"; # Retrieve and print the value labels my $vl = $var->get_value_labels (); print "$_: $vl->{$_}\n" for keys %$vl; } Reading of data must be done sequentially using the C method. while (my $c = $sf->get_next_case () ) { my $v; for ($v = 0; $v < $dict->get_var_cnt(); $v++) { print "val$v: @$c[$v] "; } print "\n"; } =cutpspp-1.0.1/perl-module/Makefile.PL0000644000175000017500000000427613137223644013631 00000000000000use 5.008008; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. do './pspp-module-config' || do { my $build = prompt ("Enter the location of the build directory of the configured pspp source:", "" ); my $src = $top_srcdir; %Locations = (SourceDir => "$src", BuildDir => "$build"); }; WriteMakefile( FULLPERL => "PSPP_TEST_CMD=\"$Locations{BuildDir}/src/ui/terminal/pspp\" \$(PERL)", NAME => 'PSPP', DISTNAME => 'PSPP-Perl', VERSION_FROM => "$Locations{BuildDir}/src/libpspp/version.c", PREREQ_PM => {POSIX=>0}, PM => {"lib/PSPP.pm", "\$(INST_LIBDIR)/PSPP.pm"}, ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT => 'Perl extension to PSPP', AUTHOR => 'John Darrington ') : ()), INC => "-I $Locations{SourceDir} -I $Locations{SourceDir}/src -I $Locations{SourceDir}/gl -I $Locations{BuildDir}/gl -I $Locations{BuildDir}", MYEXTLIB => "$Locations{BuildDir}/src/.libs/libpspp-core.\$(SO)", MAN3PODS => {"lib/PSPP.pm", "\$(INST_MAN3DIR)/PSPP.3pm", "Examples.pod", "\$(INST_MAN3DIR)/PSPP::Examples.3pm"} ); if (eval {require ExtUtils::Constant; 1}) { # If you edit these definitions to change the constants used by this module, # you will need to use the generated const-c.inc and const-xs.inc # files to replace their "fallback" counterparts before distributing your # changes. my @names = (qw()); ExtUtils::Constant::WriteConstants( NAME => 'PSPP', NAMES => \@names, DEFAULT_TYPE => 'IV', C_FILE => 'const-c.inc', XS_FILE => 'const-xs.inc', ); } else { use File::Copy; use File::Spec; foreach my $file ('const-c.inc', 'const-xs.inc') { my $fallback = File::Spec->catfile('fallback', $file); copy ($fallback, $file) or die "Can't copy $fallback to $file: $!"; } } pspp-1.0.1/perl-module/README0000644000175000017500000000326713126713270012533 00000000000000PSPP version 0.7 ================ This module provides an interface allowing perl programs to create pspp system files. INSTALLATION To install you must have first installed and built pspp 0.7.2 or later. The Perl module does not use the installed PSPP binaries, but it does require the libpspp-core-$VERSION.so library installed with PSPP (see below). To install this module type the following: perl Makefile.PL make make install make test For "make test" to succeed, Perl must be able to find libpspp-core-$VERSION.so. It can do so if "make install" has been run (as shown above), or if LD_LIBRARY_PATH points to it (e.g. in src/.libs). Running "make check" from the top-level build directory will automatically set LD_LIBRARY_PATH. DEPENDENCIES This module requires the POSIX module. The modules Test::More, Text::Diff, File::Temp and the pspp source are required during installation, but are not needed to run the module. COPYRIGHT AND LICENCE Copyright (C) 2007, 2009, 2010 by Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. pspp-1.0.1/perl-module/t/0000755000175000017500000000000013150620333012160 500000000000000pspp-1.0.1/perl-module/t/Pspp.t0000644000175000017500000003172713126713270013227 00000000000000# -*-perl-*- # Before `make install' is performed this script should be runnable # with `make test' as long as libpspp-core-$VERSION.so is in # LD_LIBRARY_PATH. After `make install' it should work as `perl # PSPP.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 37; use Text::Diff; use File::Temp qw/ tempfile tempdir /; BEGIN { use_ok('PSPP') }; ######################### sub compare { my $file = shift; my $pattern = shift; return ! diff ("$file", \$pattern); } my $pspp_cmd = $ENV{PSPP_TEST_CMD}; if ( ! $pspp_cmd) { $pspp_cmd="pspp"; } sub run_pspp_syntax { my $tempdir = shift; my $syntax = shift; my $syntaxfile = "$tempdir/foo.sps"; open (FH, ">$syntaxfile"); print FH "$syntax"; close (FH); system ("cd $tempdir; $pspp_cmd -o pspp.csv $syntaxfile"); } sub run_pspp_syntax_cmp { my $tempdir = shift; my $syntax = shift; my $result = shift; run_pspp_syntax ($tempdir, $syntax); my $diff = diff ("$tempdir/pspp.csv", \$result); if ( ! ($diff eq "")) { diag ("$diff"); } return ($diff eq ""); } # Insert your test code below, the Test::More module is used here so read # its man page ( perldoc Test::More ) for help writing this test script. { my $d = PSPP::Dict->new(); ok (ref $d, "Dictionary Creation"); ok ($d->get_var_cnt () == 0); $d->set_label ("My Dictionary"); $d->add_document ("These Documents"); # Tests for variable creation my $var0 = PSPP::Var->new ($d, "le"); ok (!ref $var0, "Trap illegal variable name"); ok ($d->get_var_cnt () == 0); $var0 = PSPP::Var->new ($d, "legal"); ok (ref $var0, "Accept legal variable name"); ok ($d->get_var_cnt () == 1); my $var1 = PSPP::Var->new ($d, "legal"); ok (!ref $var1, "Trap duplicate variable name"); ok ($d->get_var_cnt () == 1); $var1 = PSPP::Var->new ($d, "money", (fmt=>PSPP::Fmt::DOLLAR, width=>4, decimals=>2) ); ok (ref $var1, "Accept valid format"); ok ($d->get_var_cnt () == 2); $d->set_weight ($var1); # Tests for system file creation # Make sure a system file can be created { my $tempdir = tempdir( CLEANUP => 1 ); my $tempfile = "$tempdir/testfile.sav"; my $syntaxfile = "$tempdir/syntax.sps"; my $sysfile = PSPP::Sysfile->new ("$tempfile", $d); ok (ref $sysfile, "Create sysfile object"); $sysfile->close (); ok (-s "$tempfile", "Write system file"); } } # Make sure we can write cases to a file { my $d = PSPP::Dict->new(); PSPP::Var->new ($d, "id", ( fmt=>PSPP::Fmt::F, width=>2, decimals=>0 ) ); PSPP::Var->new ($d, "name", ( fmt=>PSPP::Fmt::A, width=>20, ) ); $d->add_document ("This should not appear"); $d->clear_documents (); $d->add_document ("This is a document line"); $d->set_label ("This is the file label"); # Check that we can write system files { my $tempdir = tempdir( CLEANUP => 1 ); my $tempfile = "$tempdir/testfile.sav"; my $sysfile = PSPP::Sysfile->new ("$tempfile", $d); my $res = $sysfile->append_case ( [34, "frederick"]); ok ($res, "Append Case"); $res = $sysfile->append_case ( [34, "frederick", "extra"]); ok (!$res, "Appending Case with too many variables"); $sysfile->close (); ok (-s "$tempfile", "existance"); } # Check that sysfiles are closed properly { my $tempdir = tempdir( CLEANUP => 1 ); my $tempfile = "$tempdir/testfile.sav"; { my $sysfile = PSPP::Sysfile->new ("$tempfile", $d); my $res = $sysfile->append_case ( [21, "wheelbarrow"]); ok ($res, "Append Case 2"); # Don't close. We want to test that the destructor does that # automatically } ok (-s "$tempfile", "existance2"); ok (run_pspp_syntax_cmp ($tempdir, < 1 ); my $tempfile = "$tempdir/testfile.sav"; my $dict = PSPP::Dict->new(); ok (ref $dict, "Dictionary Creation 2"); my $int = PSPP::Var->new ($dict, "integer", (width=>8, decimals=>0) ); $int->set_label ("My Integer"); $int->add_value_label (99, "Silly"); $int->clear_value_labels (); $int->add_value_label (0, "Zero"); $int->add_value_label (1, "Unity"); $int->add_value_label (2, "Duality"); my $str = PSPP::Var->new ($dict, "string", (fmt=>PSPP::Fmt::A, width=>8) ); $str->set_label ("My String"); ok ($str->add_value_label ("xx", "foo"), "Value label for short string"); diag ($PSPP::errstr); $str->add_value_label ("yy", "bar"); $str->set_missing_values ("this", "that"); my $longstr = PSPP::Var->new ($dict, "longstring", (fmt=>PSPP::Fmt::A, width=>9) ); $longstr->set_label ("My Long String"); my $re = $longstr->add_value_label ("xxx", "xfoo"); ok ($re, "Value label for long string"); $int->set_missing_values (9, 99); my $sysfile = PSPP::Sysfile->new ("$tempfile", $dict); $sysfile->close (); ok (run_pspp_syntax_cmp ($tempdir, < 1 ); my $tempfile = "$tempdir/testfile.sav"; my $sysfile ; { my $d = PSPP::Dict->new(); PSPP::Var->new ($d, "id", ( fmt=>PSPP::Fmt::F, width=>2, decimals=>0 ) ); $sysfile = PSPP::Sysfile->new ("$tempfile", $d); } my $res = $sysfile->append_case ([3]); ok ($res, "Dictionary survives sysfile"); } # Basic reader test { my $tempdir = tempdir( CLEANUP => 1 ); generate_sav_file ("$tempdir/in.sav", "$tempdir"); my $sf = PSPP::Reader->open ("$tempdir/in.sav"); my $dict = $sf->get_dict (); open (MYFILE, ">$tempdir/out.txt"); for ($v = 0 ; $v < $dict->get_var_cnt() ; $v++) { my $var = $dict->get_var ($v); my $name = $var->get_name (); my $label = $var->get_label (); print MYFILE "Variable $v is \"$name\", label is \"$label\"\n"; my $vl = $var->get_value_labels (); print MYFILE "Value Labels:\n"; print MYFILE "$_ => $vl->{$_}\n" for (sort keys %$vl); } while (my @c = $sf->get_next_case () ) { for ($v = 0; $v < $dict->get_var_cnt(); $v++) { print MYFILE "val$v: \"$c[$v]\"\n"; } print MYFILE "\n"; } close (MYFILE); ok (compare ("$tempdir/out.txt", < ones 2222 => twos 3333 => threes Variable 1 is "longstring", label is "A Long String Variable" Value Labels: Variable 2 is "numeric", label is "A Numeric Variable" Value Labels: 1 => Unity 2 => Duality 3 => Thripality Variable 3 is "date", label is "A Date Variable" Value Labels: Variable 4 is "dollar", label is "A Dollar Variable" Value Labels: Variable 5 is "datetime", label is "A Datetime Variable" Value Labels: val0: "1111 " val1: "One " val2: "1" val3: "13197686400" val4: "1" val5: "13197690060" val0: "2222 " val1: "Two " val2: "2" val3: "13231987200" val4: "2" val5: "13231994520" val0: "3333 " val1: "Three " val2: "3" val3: "13266028800" val4: "3" val5: "13266039780" val0: ". " val1: ". " val2: "" val3: "" val4: "" val5: "" val0: "5555 " val1: "Five " val2: "5" val3: "13334630400" val4: "5" val5: "13334648700" EOF } # Check that we can stream one file into another { my $tempdir = tempdir( CLEANUP => 1 ); generate_sav_file ("$tempdir/in.sav", "$tempdir"); my $input = PSPP::Reader->open ("$tempdir/in.sav"); my $dict = $input->get_dict (); my $output = PSPP::Sysfile->new ("$tempdir/out.sav", $dict); while (my (@c) = $input->get_next_case () ) { $output->append_case (\@c); } $output->close (); #Check the two files are the same (except for metadata) run_pspp_syntax ($tempdir, < 1 ); run_pspp_syntax ($tempdir, <open ("$tempdir/dd.sav"); my $dict = $sf->get_dict (); my (@c) = $sf->get_next_case (); my $var = $dict->get_var (0); my $val = $c[0]; my $formatted = PSPP::format_value ($val, $var); my $str = gmtime ($val - PSPP::PERL_EPOCH); print "Formatted string is \"$formatted\"\n"; ok ( $formatted eq "11-SEP-2001 08:20", "format_value function"); ok ( $str eq "Tue Sep 11 08:20:00 2001", "Perl representation of time"); } # Check that attempting to open a non-existent file results in an error { my $tempdir = tempdir( CLEANUP => 1 ); unlink ("$tempdir/no-such-file.sav"); my $sf = PSPP::Reader->open ("$tempdir/no-such-file.sav"); ok ( !ref $sf, "Returns undef on opening failure"); ok ("$PSPP::errstr" eq "An error occurred while opening `$tempdir/no-such-file.sav': No such file or directory.", "Error string on open failure"); } # Missing value tests. { my $tempdir = tempdir( CLEANUP => 1 ); generate_sav_file ("$tempdir/in.sav", "$tempdir"); my $sf = PSPP::Reader->open ("$tempdir/in.sav"); my $dict = $sf->get_dict (); my (@c) = $sf->get_next_case (); my $stringvar = $dict->get_var (0); my $numericvar = $dict->get_var (2); my $val = $c[0]; ok ( !PSPP::value_is_missing ($val, $stringvar), "Missing Value Negative String"); $val = $c[2]; ok ( !PSPP::value_is_missing ($val, $numericvar), "Missing Value Negative Num"); @c = $sf->get_next_case (); @c = $sf->get_next_case (); $val = $c[0]; ok ( PSPP::value_is_missing ($val, $stringvar), "Missing Value Positive"); @c = $sf->get_next_case (); $val = $c[2]; ok ( PSPP::value_is_missing ($val, $numericvar), "Missing Value Positive SYS"); @c = $sf->get_next_case (); $val = $c[2]; ok ( PSPP::value_is_missing ($val, $numericvar), "Missing Value Positive Num"); } #Test reading of custom attributes { my $tempdir = tempdir( CLEANUP => 1 ); generate_sav_file ("$tempdir/in.sav", "$tempdir"); my $sf = PSPP::Reader->open ("$tempdir/in.sav"); my $dict = $sf->get_dict (); my $var = $dict->get_var_by_name ("numeric"); my $attr = $var->get_attributes (); open (MYFILE, ">$tempdir/out.txt"); foreach $k (sort (keys (%$attr))) { my $ll = $attr->{$k}; print MYFILE "$k =>"; print MYFILE map "$_\n", join ', ', @$ll; } close (MYFILE); ok (compare ("$tempdir/out.txt", <<'EOF'), "Custom Attributes"); $@Role =>0 colour =>blue, pink, violet nationality =>foreign size =>large EOF } # Test of the get_case_cnt function { my $tempdir = tempdir( CLEANUP => 1 ); generate_sav_file ("$tempdir/in.sav", "$tempdir"); my $sf = PSPP::Reader->open ("$tempdir/in.sav"); my $n = $sf->get_case_cnt (); ok ($n == 5, "Case count"); } pspp-1.0.1/perl-module/MANIFEST0000644000175000017500000000020013126713270012764 00000000000000Changes const-c.inc const-xs.inc COPYING Examples.pod lib/PSPP.pm Makefile.PL MANIFEST ppport.h PSPP.xs README t/Pspp.t typemap pspp-1.0.1/perl-module/PSPP.xs0000644000175000017500000004161113137223644013007 00000000000000/* PSPP - computes sample statistics. Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #undef VERSION #include /* The Gnulib "strftime" module defines my_strftime in for use by gl/strftime.c. Perl also defines my_strftime in embed.h for some other purpose. The former definition doesn't matter in this file, so suppress it to avoid a compiler warning. */ #undef my_strftime #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" #include "minmax.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef struct fmt_spec input_format ; typedef struct fmt_spec output_format ; /* A thin wrapper around sfm_writer */ struct syswriter_info { bool opened; /* A pointer to the writer. The writer is owned by the struct */ struct casewriter *writer; /* A pointer to the dictionary. Owned externally */ const struct pspp_dict *dict; /* The scalar containing the dictionary */ SV *dict_sv; }; /* A thin wrapper around sfm_reader */ struct sysreader_info { struct any_read_info opts; /* A pointer to the reader. The reader is owned by the struct */ struct casereader *reader; /* A pointer to the dictionary. */ struct pspp_dict *dict; }; struct input_format { struct hmap_node hmap_node; /* In struct pspp_dict's input_formats map. */ const struct variable *var; struct fmt_spec input_format; }; /* A thin wrapper around struct dictionary.*/ struct pspp_dict { struct dictionary *dict; struct hmap input_formats; /* Contains struct input_format. */ }; /* A message handler which writes messages to PSPP::errstr */ static void message_handler (const struct msg *m, void *aux) { SV *errstr = get_sv("PSPP::errstr", TRUE); sv_setpv (errstr, m->text); } static int sysfile_close (struct syswriter_info *swi) { int retval ; if ( ! swi->opened ) return 0; retval = casewriter_destroy (swi->writer); if (retval > 0 ) swi->opened = false; return retval; } static void scalar_to_value (union value *val, SV *scalar, const struct variable *var) { if ( var_is_numeric (var)) { if ( SvNOK (scalar) || SvIOK (scalar) ) val->f = SvNV (scalar); else val->f = SYSMIS; } else { STRLEN len; const char *p = SvPV (scalar, len); int width = var_get_width (var); value_set_missing (val, width); memcpy (value_str_rw (val, width), p, len); } } static SV * value_to_scalar (const union value *val, const struct variable *var) { if ( var_is_numeric (var)) { if ( var_is_value_missing (var, val, MV_SYSTEM)) return newSVpvn ("", 0); return newSVnv (val->f); } else { int width = var_get_width (var); return newSVpvn (value_str (val, width), width); } } static void make_value_from_scalar (union value *uv, SV *val, const struct variable *var) { value_init (uv, var_get_width (var)); scalar_to_value (uv, val, var); } static struct pspp_dict * create_pspp_dict (struct dictionary *dict) { struct pspp_dict *pspp_dict = xmalloc (sizeof *pspp_dict); pspp_dict->dict = dict; hmap_init (&pspp_dict->input_formats); return pspp_dict; } static const struct fmt_spec * find_input_format (const struct pspp_dict *dict, const struct variable *var) { struct input_format *input_format; HMAP_FOR_EACH_IN_BUCKET (input_format, struct input_format, hmap_node, hash_pointer (var, 0), &dict->input_formats) if (input_format->var == var) return &input_format->input_format; return NULL; } MODULE = PSPP MODULE = PSPP PACKAGE = PSPP PROTOTYPES: ENABLE void onBoot (ver) const char *ver CODE: /* Check that the version is correct up to the length of 'ver'. This allows PSPP autobuilders to add a "-build#" suffix to the PSPP version without causing failures here. */ assert (0 == strncmp (ver, bare_version, strlen (ver))); i18n_init (); msg_set_handler (message_handler, NULL); settings_init (); fh_init (); SV * format_value (val, var) SV *val struct variable *var CODE: SV *ret; const struct fmt_spec *fmt = var_get_print_format (var); union value uv; char *s; make_value_from_scalar (&uv, val, var); s = data_out (&uv, var_get_encoding (var), fmt); value_destroy (&uv, var_get_width (var)); ret = newSVpv (s, fmt->w); free (s); RETVAL = ret; OUTPUT: RETVAL int value_is_missing (val, var) SV *val struct variable *var CODE: union value uv; int ret; make_value_from_scalar (&uv, val, var); ret = var_is_value_missing (var, &uv, MV_ANY); value_destroy (&uv, var_get_width (var)); RETVAL = ret; OUTPUT: RETVAL MODULE = PSPP PACKAGE = PSPP::Dict struct pspp_dict * pxs_dict_new() CODE: RETVAL = create_pspp_dict (dict_create ("UTF-8")); OUTPUT: RETVAL void DESTROY (dict) struct pspp_dict *dict CODE: if (dict != NULL) { struct input_format *input_format, *next_input_format; HMAP_FOR_EACH_SAFE (input_format, next_input_format, struct input_format, hmap_node, &dict->input_formats) { hmap_delete (&dict->input_formats, &input_format->hmap_node); free (input_format); } hmap_destroy (&dict->input_formats); dict_destroy (dict->dict); free (dict); } int get_var_cnt (dict) struct pspp_dict *dict CODE: RETVAL = dict_get_var_cnt (dict->dict); OUTPUT: RETVAL void set_label (dict, label) struct pspp_dict *dict char *label CODE: dict_set_label (dict->dict, label); void set_documents (dict, docs) struct pspp_dict *dict char *docs CODE: dict_set_documents_string (dict->dict, docs); void add_document (dict, doc) struct pspp_dict *dict char *doc CODE: dict_add_document_line (dict->dict, doc, false); void clear_documents (dict) struct pspp_dict *dict CODE: dict_clear_documents (dict->dict); void set_weight (dict, var) struct pspp_dict *dict struct variable *var CODE: dict_set_weight (dict->dict, var); struct variable * pxs_get_variable (dict, idx) struct pspp_dict *dict SV *idx INIT: SV *errstr = get_sv("PSPP::errstr", TRUE); sv_setpv (errstr, ""); if ( SvIV (idx) >= dict_get_var_cnt (dict->dict)) { sv_setpv (errstr, "The dictionary doesn't have that many variables."); XSRETURN_UNDEF; } CODE: RETVAL = dict_get_var (dict->dict, SvIV (idx)); OUTPUT: RETVAL struct variable * pxs_get_var_by_name (dict, name) struct pspp_dict *dict const char *name INIT: SV *errstr = get_sv("PSPP::errstr", TRUE); sv_setpv (errstr, ""); CODE: struct variable *var = dict_lookup_var (dict->dict, name); if ( ! var ) sv_setpv (errstr, "No such variable."); RETVAL = var; OUTPUT: RETVAL MODULE = PSPP PACKAGE = PSPP::Var struct variable * pxs_dict_create_var (dict, name, ip_fmt) struct pspp_dict * dict char *name input_format ip_fmt INIT: SV *errstr = get_sv("PSPP::errstr", TRUE); sv_setpv (errstr, ""); if ( ! id_is_plausible (name, false)) { sv_setpv (errstr, "The variable name is not valid."); XSRETURN_UNDEF; } CODE: struct fmt_spec op_fmt; struct input_format *input_format; struct variable *v; op_fmt = fmt_for_output_from_input (&ip_fmt); v = dict_create_var (dict->dict, name, fmt_is_string (op_fmt.type) ? op_fmt.w : 0); if ( NULL == v ) { sv_setpv (errstr, "The variable could not be created (probably already exists)."); XSRETURN_UNDEF; } var_set_both_formats (v, &op_fmt); input_format = xmalloc (sizeof *input_format); input_format->var = v; input_format->input_format = ip_fmt; hmap_insert (&dict->input_formats, &input_format->hmap_node, hash_pointer (v, 0)); RETVAL = v; OUTPUT: RETVAL int set_missing_values (var, v1, ...) struct variable *var; SV *v1; INIT: int i; union value val[3]; if ( items > 4 ) croak ("No more than 3 missing values are permitted"); for (i = 0; i < items - 1; ++i) scalar_to_value (&val[i], ST(i+1), var); CODE: struct missing_values mv; mv_init (&mv, var_get_width (var)); for (i = 0 ; i < items - 1; ++i ) mv_add_value (&mv, &val[i]); var_set_missing_values (var, &mv); void set_label (var, label) struct variable *var; char *label CODE: var_set_label (var, label); void clear_value_labels (var) struct variable *var; CODE: var_clear_value_labels (var); SV * get_write_format (var) struct variable *var CODE: HV *fmthash = (HV *) sv_2mortal ((SV *) newHV()); const struct fmt_spec *fmt = var_get_write_format (var); hv_store (fmthash, "fmt", 3, newSVnv (fmt->type), 0); hv_store (fmthash, "decimals", 8, newSVnv (fmt->d), 0); hv_store (fmthash, "width", 5, newSVnv (fmt->w), 0); RETVAL = newRV ((SV *) fmthash); OUTPUT: RETVAL SV * get_print_format (var) struct variable *var CODE: HV *fmthash = (HV *) sv_2mortal ((SV *) newHV()); const struct fmt_spec *fmt = var_get_print_format (var); hv_store (fmthash, "fmt", 3, newSVnv (fmt->type), 0); hv_store (fmthash, "decimals", 8, newSVnv (fmt->d), 0); hv_store (fmthash, "width", 5, newSVnv (fmt->w), 0); RETVAL = newRV ((SV *) fmthash); OUTPUT: RETVAL void pxs_set_write_format (var, fmt) struct variable *var output_format fmt CODE: var_set_write_format (var, &fmt); void pxs_set_print_format (var, fmt) struct variable *var output_format fmt CODE: var_set_print_format (var, &fmt); void pxs_set_output_format (var, fmt) struct variable *var output_format fmt CODE: var_set_both_formats (var, &fmt); int add_value_label (var, key, label) struct variable *var SV *key char *label INIT: SV *errstr = get_sv("PSPP::errstr", TRUE); sv_setpv (errstr, ""); CODE: union value the_value; int width = var_get_width (var); int ok; value_init (&the_value, width); if ( var_is_numeric (var)) { if ( ! looks_like_number (key)) { sv_setpv (errstr, "Cannot add label with string key to a numeric variable"); value_destroy (&the_value, width); XSRETURN_IV (0); } the_value.f = SvNV (key); } else { value_copy_str_rpad (&the_value, width, SvPV_nolen(key), ' '); } ok = var_add_value_label (var, &the_value, label); value_destroy (&the_value, width); if (!ok) { sv_setpv (errstr, "Something went wrong"); XSRETURN_IV (0); } XSRETURN_IV (1); SV * get_attributes (var) struct variable *var CODE: HV *attrhash = (HV *) sv_2mortal ((SV *) newHV()); struct attrset *as = var_get_attributes (var); if ( as ) { struct attrset_iterator iter; struct attribute *attr; for (attr = attrset_first (as, &iter); attr; attr = attrset_next (as, &iter)) { int i; const char *name = attribute_get_name (attr); AV *values = newAV (); for (i = 0 ; i < attribute_get_n_values (attr); ++i ) { const char *value = attribute_get_value (attr, i); av_push (values, newSVpv (value, 0)); } hv_store (attrhash, name, strlen (name), newRV_noinc ((SV*) values), 0); } } RETVAL = newRV ((SV *) attrhash); OUTPUT: RETVAL const char * get_name (var) struct variable * var CODE: RETVAL = var_get_name (var); OUTPUT: RETVAL const char * get_label (var) struct variable * var CODE: RETVAL = var_get_label (var); OUTPUT: RETVAL SV * get_value_labels (var) struct variable *var CODE: HV *labelhash = (HV *) sv_2mortal ((SV *) newHV()); const struct val_lab *vl; struct val_labs_iterator *viter = NULL; const struct val_labs *labels = var_get_value_labels (var); if ( labels ) { for (vl = val_labs_first (labels); vl; vl = val_labs_next (labels, vl)) { SV *sv = value_to_scalar (&vl->value, var); STRLEN len; const char *s = SvPV (sv, len); hv_store (labelhash, s, len, newSVpv (val_lab_get_label (vl), 0), 0); } } RETVAL = newRV ((SV *) labelhash); OUTPUT: RETVAL MODULE = PSPP PACKAGE = PSPP::Sysfile struct syswriter_info * pxs_create_sysfile (name, dict, opts_hr) char *name struct pspp_dict *dict; SV *opts_hr INIT: SV *dict_sv = ST(1); struct sfm_write_options opts; if (!SvROK (opts_hr)) { opts = sfm_writer_default_options (); } else { HV *opt_h = (HV *) SvRV (opts_hr); SV** readonly = hv_fetch(opt_h, "readonly", 8, 0); SV** compress = hv_fetch(opt_h, "compress", 8, 0); SV** version = hv_fetch(opt_h, "version", 7, 0); opts.create_writeable = readonly ? ! SvIV (*readonly) : true; opts.compression = (compress && SvIV (*compress) ? ANY_COMP_SIMPLE : ANY_COMP_NONE); opts.version = version ? SvIV (*version) : 3 ; } CODE: struct file_handle *fh = fh_create_file (NULL, name, "UTF-8", fh_default_properties () ); struct syswriter_info *swi = xmalloc (sizeof (*swi)); swi->writer = sfm_open_writer (fh, dict->dict, opts); swi->dict = dict; swi->opened = true; swi->dict_sv = dict_sv; SvREFCNT_inc (swi->dict_sv); RETVAL = swi; OUTPUT: RETVAL int close (swi) struct syswriter_info *swi CODE: RETVAL = sysfile_close (swi); OUTPUT: RETVAL void DESTROY (swi) struct syswriter_info *swi CODE: sysfile_close (swi); SvREFCNT_dec (swi->dict_sv); free (swi); int append_case (swi, ccase) struct syswriter_info *swi SV *ccase INIT: SV *errstr = get_sv("PSPP::errstr", TRUE); sv_setpv (errstr, ""); if ( (!SvROK(ccase))) { XSRETURN_UNDEF; } CODE: int i = 0; AV *av_case = (AV*) SvRV (ccase); const struct variable **vv; size_t nv; struct ccase *c; SV *sv; if ( av_len (av_case) >= dict_get_var_cnt (swi->dict->dict)) XSRETURN_UNDEF; c = case_create (dict_get_proto (swi->dict->dict)); dict_get_vars (swi->dict->dict, &vv, &nv, 1u << DC_ORDINARY | 1u << DC_SYSTEM); for (sv = av_shift (av_case); SvOK (sv); sv = av_shift (av_case)) { const struct variable *v = vv[i++]; const struct fmt_spec *ifmt = find_input_format (swi->dict, v); /* If an input format has been set, then use it. Otherwise just convert the raw value. */ if ( ifmt ) { struct substring ss = ss_cstr (SvPV_nolen (sv)); char *error; bool ok; error = data_in (ss, SvUTF8(sv) ? UTF8: "iso-8859-1", ifmt->type, case_data_rw (c, v), var_get_width (v), dict_get_encoding (swi->dict->dict)); ok = error == NULL; free (error); if ( !ok ) { RETVAL = 0; goto finish; } } else { scalar_to_value (case_data_rw (c, v), sv, v); } } /* The remaining variables must be sysmis or blank string */ while (i < dict_get_var_cnt (swi->dict->dict)) { const struct variable *v = vv[i++]; union value *val = case_data_rw (c, v); value_set_missing (val, var_get_width (v)); } casewriter_write (swi->writer, c); RETVAL = 1; finish: free (vv); OUTPUT: RETVAL MODULE = PSPP PACKAGE = PSPP::Reader struct sysreader_info * pxs_open_sysfile (name) char * name CODE: struct casereader *reader; struct sysreader_info *sri = NULL; struct file_handle *fh = fh_create_file (NULL, name, "UTF-8", fh_default_properties () ); struct dictionary *dict; sri = xmalloc (sizeof (*sri)); sri->reader = any_reader_open_and_decode (fh, NULL, &dict, &sri->opts); if (sri->reader) sri->dict = create_pspp_dict (dict); else { free (sri); sri = NULL; } RETVAL = sri; OUTPUT: RETVAL struct pspp_dict * pxs_get_dict (reader) struct sysreader_info *reader; CODE: RETVAL = reader->dict; OUTPUT: RETVAL SV * get_case_cnt (sfr) struct sysreader_info *sfr; CODE: SV *ret; casenumber n = casereader_get_case_cnt (sfr->reader); if (n == CASENUMBER_MAX) ret = &PL_sv_undef; else ret = newSViv (n); RETVAL = ret; OUTPUT: RETVAL void get_next_case (sfr) struct sysreader_info *sfr; PPCODE: struct ccase *c; if ((c = casereader_read (sfr->reader)) != NULL) { int v; EXTEND (SP, dict_get_var_cnt (sfr->dict->dict)); for (v = 0; v < dict_get_var_cnt (sfr->dict->dict); ++v ) { const struct variable *var = dict_get_var (sfr->dict->dict, v); const union value *val = case_data (c, var); PUSHs (sv_2mortal (value_to_scalar (val, var))); } case_unref (c); } pspp-1.0.1/perl-module/lib/0000755000175000017500000000000013150620333012463 500000000000000pspp-1.0.1/perl-module/lib/PSPP.pm0000644000175000017500000002610113150617732013534 00000000000000use 5.008008; use strict; use warnings; =head1 NAME PSPP-Perl - Perl extension to PSPP =head1 SYNOPSIS use PSPP; =head1 DESCRIPTION PSPP-Perl provides an interface to the libraries used by pspp to read and write system files. =head1 EXPORT None by default. =cut BEGIN { $PSPP::VERSION='1.0.1'; require XSLoader; XSLoader::load('PSPP', $PSPP::VERSION); } PSPP::onBoot($PSPP::VERSION); =pod =head1 PROGRAMMER'S INTERFACE The subroutines in this package return zero or unref on error. When errors occur, a string describing the error is written to C<$PSPP::errstr>. =cut package PSPP; use POSIX ; use constant { SYSMIS => -(POSIX::DBL_MAX), PERL_EPOCH => 12219379200 # Number of seconds between # 14th October 1582 # and # 1st January 1970 }; package PSPP::Dict; =pod =head2 PSPP::Dict::new Creates a new dictionary. This returned dictionary will be empty. Returns undef on failure. =head3 set_documents ($string) Sets the documents (comments) to C. =head3 add_document ($string) Appends C to the documents. =head3 clear_documents () Removes all documents. =head3 set_weight ($var) Sets the weighting variable to C. =cut sub new { my $class = shift; my $self = pxs_dict_new (); bless ($self, $class); return $self; } =pod =head3 get_var_cnt () Returns the number of variables in the dictionary. =head3 get_var ($idx) Returns the Cth variable from the dictionary. Returns undef if C is greater than or equal to the number of variables in the dictionary. =cut sub get_var { my $dict = shift; my $idx = shift; my $var = pxs_get_variable ($dict, $idx); if ( ref $var ) { bless ($var, "PSPP::Var"); } return $var; } =pod =head3 get_var_by_name ($name) Returns the variable from the dictionary whose name is C. If there is no such variable, a null reference will be returned. =cut sub get_var_by_name { my $dict = shift; my $name = shift; my $var = pxs_get_var_by_name ($dict, $name); if ( ref $var ) { bless ($var, "PSPP::Var"); } return $var; } package PSPP::Fmt; =pod =head2 PSPP::Fmt Contains constants used to denote variable format types. The identifiers are the same as those used in pspp to denote formats. For example C defines floating point format, and C denotes string format. =cut # These must correspond to the values in src/data/format.h use constant { F => 0, COMMA => 1, DOT => 2, DOLLAR => 3, PCT => 4, E => 5, CCA => 6, CCB => 7, CCC => 8, CCD => 9, CCE => 10, N => 11, Z => 12, P => 13, PK => 14, IB => 15, PIB => 16, PIBHEX => 17, RB => 18, RBHEX => 19, DATE => 20, ADATE => 21, EDATE => 22, JDATE => 23, SDATE => 24, QYR => 25, MOYR => 26, WKYR => 27, DATETIME => 28, TIME => 29, DTIME => 30, WKDAY => 31, MONTH => 32, A => 33, AHEX => 34 }; =head2 PSPP::Var =cut package PSPP::Var; =head3 new ($dict, $name, %input_fmt) Creates and returns a new variable in the dictionary C. The new variable will have the name C. C must be a valid UTF8 string. The input format is set by the C parameter (See L). By default, the write and print formats are the same as the input format. The write and print formats may be changed (See L), L). The input format may not be changed after the variable has been created. If the variable cannot be created, undef is returned. =cut sub new { my $class = shift; my $dict = shift; my $name = shift; my %format = @_; my $self = pxs_dict_create_var ($dict, $name, \%format); if ( ref $self ) { bless ($self, $class); } return $self; } =pod =head3 set_label ($label) Sets the variable label to C